diff --git a/.golangci.yml b/.golangci.yml index 630d8ab486..f50aa0171a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -48,8 +48,8 @@ linters: - goconst - govet - megacheck - - goimports disable: + - goimports - errcheck - golint - prealloc diff --git a/.travis.yml b/.travis.yml index f44864c53c..dbb3a1d1e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - "1.10.3" + - "1.11" sudo: required services: - docker @@ -8,7 +8,7 @@ env: - "PATH=/home/travis/gopath/bin:$PATH" before_install: - go get -u github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/tcnksm/ghr - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10 + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0 install: - echo "No external dependencies required. Skipping travis default library dependency setup to use vendors..." script: diff --git a/Dockerfile b/Dockerfile index 11a96e1342..034f3b81ad 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM golang:1.10 -WORKDIR /go/src/github.com/phoreproject/openbazaar-go +FROM golang:1.11 +WORKDIR /go/src/github.com/OpenBazaar/openbazaar-go COPY . . RUN go build --ldflags '-extldflags "-static"' -o /opt/openbazaard . diff --git a/Dockerfile.dev b/Dockerfile.dev index 58f0837e4e..d2a77cc739 100755 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM golang:1.10 +FROM golang:1.11 VOLUME /var/lib/openbazaar RUN wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz && \ @@ -28,9 +28,10 @@ WORKDIR /go/src/github.com/phoreproject/openbazaar-go RUN go get -u github.com/gogo/protobuf/proto \ github.com/golang/protobuf/protoc-gen-go \ github.com/icrowley/fake \ - github.com/derekparker/delve/cmd/dlv + github.com/derekparker/delve/cmd/dlv \ + github.com/tools/godep -RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10 +RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0 WORKDIR /go/src/github.com/phoreproject/openbazaar-go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3a3280c953..6035ebbfab 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -113,15 +113,15 @@ }, { "ImportPath": "github.com/OpenBazaar/spvwallet", - "Rev": "09e89cb80f4f71f74910ecec97dbabf912327d6f" + "Rev": "06f6037251780164889a046526b67b2c2be29107" }, { "ImportPath": "github.com/OpenBazaar/spvwallet/exchangerates", - "Rev": "09e89cb80f4f71f74910ecec97dbabf912327d6f" + "Rev": "06f6037251780164889a046526b67b2c2be29107" }, { "ImportPath": "github.com/OpenBazaar/wallet-interface", - "Rev": "90321224966c0c88e02e99f1f9d3cef18a77f399" + "Rev": "ed1c16b1331fc11f83a37810e2a693557c30e8ae" }, { "ImportPath": "github.com/OpenBazaar/zcashd-wallet", @@ -131,6 +131,14 @@ "ImportPath": "github.com/OpenBazaar/zcashd-wallet/exchangerates", "Rev": "2b76590b8874e3eb371c51362eed6cb7a10c09b4" }, + { + "ImportPath": "github.com/agl/ed25519/edwards25519", + "Rev": "5312a61534124124185d41f09206b9fef1d88403" + }, + { + "ImportPath": "github.com/agl/ed25519/extra25519", + "Rev": "5312a61534124124185d41f09206b9fef1d88403" + }, { "ImportPath": "github.com/allegro/bigcache", "Comment": "v1.1.0-14-g06975fd", @@ -322,13 +330,13 @@ }, { "ImportPath": "github.com/cpacia/BitcoinCash-Wallet", - "Comment": "v0.3.0-58-gba9295d", - "Rev": "ba9295daa6d43b4cbd3f88e925379f0cf025b6b9" + "Comment": "v0.3.0-59-g4c3046e", + "Rev": "4c3046e2214e1761986809a54c3179f9a1d9cfd5" }, { "ImportPath": "github.com/cpacia/BitcoinCash-Wallet/exchangerates", - "Comment": "v0.3.0-58-gba9295d", - "Rev": "ba9295daa6d43b4cbd3f88e925379f0cf025b6b9" + "Comment": "v0.3.0-59-g4c3046e", + "Rev": "4c3046e2214e1761986809a54c3179f9a1d9cfd5" }, { "ImportPath": "github.com/cpacia/bchutil", @@ -497,6 +505,11 @@ "Comment": "v1.5.0-8-g5df930a", "Rev": "5df930a27be2502f99b292b7cc09ebad4d0891f4" }, + { + "ImportPath": "github.com/go-errors/errors", + "Comment": "v1.0.0-6-ga6af135", + "Rev": "a6af135bd4e28680facf08a3d206b454abc877a4" + }, { "ImportPath": "github.com/go-stack/stack", "Comment": "v1.8.0", @@ -531,11 +544,6 @@ "ImportPath": "github.com/golang/snappy", "Rev": "2e65f85255dbc3072edf28d6b5b8efc472979f5a" }, - { - "ImportPath": "github.com/google/uuid", - "Comment": "1.0.0-8-g9b3b1e0", - "Rev": "9b3b1e0f5f99ae461456d768e7d301a7acdaa2d8" - }, { "ImportPath": "github.com/gorilla/websocket", "Comment": "v1.4.0-5-g483fb8d", @@ -566,233 +574,243 @@ }, { "ImportPath": "github.com/ipfs/go-ipfs", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/assets", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/blocks/blockstoreutil", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/commands", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" - }, - { - "ImportPath": "github.com/ipfs/go-ipfs/commands/legacy", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/cmdenv", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/dag", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/e", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/name", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/object", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/commands/unixfs", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/coreapi", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" - }, - { - "ImportPath": "github.com/ipfs/go-ipfs/core/coreapi/interface", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" - }, - { - "ImportPath": "github.com/ipfs/go-ipfs/core/coreapi/interface/options", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/coredag", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/corehttp", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/corerepo", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/coreunix", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/core/mock", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/dagutils", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/exchange/reprovide", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/filestore", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/filestore/pb", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/fuse/ipns", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/fuse/mount", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/fuse/node", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/fuse/readonly", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/keystore", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/namesys", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" - }, - { - "ImportPath": "github.com/ipfs/go-ipfs/namesys/opts", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/namesys/republisher", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/p2p", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/pin", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/pin/gc", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/pin/internal/pb", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin/loader", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin/plugins/badgerds", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin/plugins/flatfs", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin/plugins/git", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" + }, + { + "ImportPath": "github.com/ipfs/go-ipfs/plugin/plugins/levelds", + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/repo", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/repo/common", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/repo/fsrepo", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/repo/fsrepo/migrations", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/tar", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/thirdparty/cidv0v1", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/thirdparty/dir", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/thirdparty/math2", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/ipfs/go-ipfs/thirdparty/verifbs", - "Comment": "v0.4.18", - "Rev": "aefc746f34e5ffdee5fba1915c6603b65a0ebf81" + "Comment": "v0.4.19", + "Rev": "83d3f7672b82ccb03e4c106d93e9dadc6427f246" }, { "ImportPath": "github.com/jbenet/go-context/io", @@ -920,6 +938,11 @@ "Comment": "v1.5.0-3-gdc7332a", "Rev": "dc7332ab32be5dfec05dae2a6ab79cbfa53b6407" }, + { + "ImportPath": "github.com/rs/xhandler", + "Comment": "v.11-5-g1eb70cf", + "Rev": "1eb70cf1520d43c307a89c5dabb7a7efd132fccd" + }, { "ImportPath": "github.com/shopspring/decimal", "Comment": "1.1.0", @@ -1098,1360 +1121,1404 @@ "Rev": "51d6538a90f86fe93ac480b35f37b2be17fef232" }, { - "ImportPath": "gx/ipfs/QmNi5J1mEQKAKWbPRBEMKKYVNok9EN4MsGM4YUqPvraPEX/go-crypto-dav/salsa20", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmNi5J1mEQKAKWbPRBEMKKYVNok9EN4MsGM4YUqPvraPEX/go-crypto-dav/salsa20", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmNtxDQBrVzy88FEjVikyM5tAbyfnHm5jJbJZcUhVykusq/snappy", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmNu2sEu7LuoBQbnSoy8u6wk6oWwFX8L5nVVUZoK7J67oQ/go-runewidth", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmP2i47tnU23ijdshrZtuvrSkQPtf9HhsMb9fwGVe8owj2/jsondiff", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/serialize", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/test", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmPJUtEJsm5YLUWhF6imvyCH8KZXRJa9Wup7FDMwTy5Ufz/backoff", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/insecure", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmPfFaAVvKzacBFh2UBqUzczkPNQxGcLyAXKKD1hjC22re/go-nat", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/providers", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/extra25519", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQFXpvKpF34dK9HcE7k8Ksk8V4BwWYZtdEcjzu5aUgRVr/go-flow-metrics", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/providers", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQine7gvHncNevKtG9QXxf3nXcwSj6aDDmMm52mHofEEp/tar-utils", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru/simplelru", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmQzJ5r1Ku82GvPwMEPtFhq3S3ZtC5LnEsS8zhTMPBPYw3/golang_protobuf_extensions/pbutil", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQzJ5r1Ku82GvPwMEPtFhq3S3ZtC5LnEsS8zhTMPBPYw3/golang_protobuf_extensions/pbutil", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRCUXvrfEEpWfqkLKqiaXE2uVaX73MGSVjLrfHDmzygTg/ansi", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP/go-farm", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRCUXvrfEEpWfqkLKqiaXE2uVaX73MGSVjLrfHDmzygTg/ansi", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8/go-ipfs-flags", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP/go-farm", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8/go-ipfs-flags", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/bpf", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/atom", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/charset", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/internal/iana", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/internal/socket", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/internal/timeseries", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/ipv4", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/ipv6", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/discovery", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fuseutil", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W/uuid", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fuseutil", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/test", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W/uuid", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTQuFQWHAWy4wMH6ZyPfGiawA5u9T8rs79FENoV8yXaoS/client_golang/prometheus", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/providers", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTQuFQWHAWy4wMH6ZyPfGiawA5u9T8rs79FENoV8yXaoS/client_golang/prometheus/promhttp", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/test", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTQuFQWHAWy4wMH6ZyPfGiawA5u9T8rs79FENoV8yXaoS/client_golang/prometheus", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTQuFQWHAWy4wMH6ZyPfGiawA5u9T8rs79FENoV8yXaoS/client_golang/prometheus/promhttp", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmTWEDbLX2d4NiMgPks6J2crRz47BamBtP16WiFuTL6Ydm/common/expfmt", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmTWEDbLX2d4NiMgPks6J2crRz47BamBtP16WiFuTL6Ydm/common/internal/bitbucket.org/ww/goautoneg", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmTWEDbLX2d4NiMgPks6J2crRz47BamBtP16WiFuTL6Ydm/common/model", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq/go-colorable", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/ackhandler", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/congestion", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/crypto", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/flowcontrol", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/handshake", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/protocol", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/utils", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/internal/wire", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/qerr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/discovery", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/routed", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/serialize", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmUNMbRUsVYHi1D14annF7Rr7pQAX7TNLwpRCa975ojKnw/yamux", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc/go-keyspace", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/delayed", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmV3bVtkAhSZqWncYGonUmsVcJcV6cpzWztsFwc3A9so5m/dns", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/mount", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/retrystore", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc/go-keyspace", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmV3bVtkAhSZqWncYGonUmsVcJcV6cpzWztsFwc3A9so5m/dns", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/charmap", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/htmlindex", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/internal", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/internal/identifier", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/japanese", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/korean", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/simplifiedchinese", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/traditionalchinese", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/unicode", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language/compact", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/tag", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/utf8internal", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/language", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/runes", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/transform", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/dcps/internetgateway1", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/dcps/internetgateway2", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/httpu", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/scpd", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/soap", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmVwfv63beSAAirq3tiLY6fkNqvjThLnCofL7363YkaScy/goupnp/ssdp", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2s", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/internal/edwards25519", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb/go-temp-err-catcher", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go/ext", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go/log", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmWVGFCGGTAGrT3adV261k1h6nntcyDhGVszGV2i2pzwPe/go-isatty", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd/btcec", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd/btcec", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93/go-os-helper", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" - }, - { - "ImportPath": "gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93/go-os-helper", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmYDxsntDcWC7CTisDmeorEvDVjkRAjjY9Vr9DJ6HSkXMS/go4-lock", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYRGECuvQnRX73fcvPnGbYijBcGN2HbKZQ7jh26qmLiHG/semver", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/b64", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/bin", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/test", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/hex", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/mux", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/cbor", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYaVovLzgcdBpCLEAnW41p8ujvCUxe3TFpfJxjK5qbzn7/client_model/go", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/json", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b/timecache", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYRGECuvQnRX73fcvPnGbYijBcGN2HbKZQ7jh26qmLiHG/semver", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYnf27kzqR2cxt6LFZdrAFJuQd6785fTkBvMuEj9EeRxM/proquint", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYaVovLzgcdBpCLEAnW41p8ujvCUxe3TFpfJxjK5qbzn7/client_model/go", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b/timecache", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYsYNh6saxUYHajdj49uiRzdxQgiFTtymrjf3d1f2Cer4/go-nat-pmp", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYnf27kzqR2cxt6LFZdrAFJuQd6785fTkBvMuEj9EeRxM/proquint", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmYsYNh6saxUYHajdj49uiRzdxQgiFTtymrjf3d1f2Cer4/go-nat-pmp", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/insecure", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/none", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZH5VXfAJouGMyCCHTRPGCT3e5MG9Lu78Ln3YAYW1XTts/websocket", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx/protobuf/proto", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZH5VXfAJouGMyCCHTRPGCT3e5MG9Lu78Ln3YAYW1XTts/websocket", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZUbTDJ39JpvtFCSubiWeUTQRvMA1tVE5RZCJrY4oeAsC/go-ipfs-pq", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx/protobuf/proto", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/b64", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZUbTDJ39JpvtFCSubiWeUTQRvMA1tVE5RZCJrY4oeAsC/go-ipfs-pq", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/bin", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/hex", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/mux", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZooytqEoUwQjv7KzH4d3xyJnyvD3AWJaCDMYt5pbCtua/chunker", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/cbor", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx/blake2b-simd", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/json", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZooytqEoUwQjv7KzH4d3xyJnyvD3AWJaCDMYt5pbCtua/chunker", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx/blake2b-simd", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/delayed", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/mount", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/retrystore", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/cache", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/comparer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/errors", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/filter", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/iterator", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/journal", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/memdb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/opt", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/storage", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/table", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/util", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbNinL4ErzM73BxQSNf8q2vPmAM4v3MNQM2DmDqDjt47D/perks/quantile", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmbNinL4ErzM73BxQSNf8q2vPmAM4v3MNQM2DmDqDjt47D/perks/quantile", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmbg4PQLEvf2XW8vrai9STFDerV7kttkfKcVdkoRf9Z7Xu/go-errwrap", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmbg4PQLEvf2XW8vrai9STFDerV7kttkfKcVdkoRf9Z7Xu/go-errwrap", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd/cbor/go", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd/cbor/go", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcaSwFc5RBg8yCq54QURwEU4nwjfCpjbpmaAm4VbdGLKv/go-logging", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/messagequeue", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/peermanager", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/providerquerymanager", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionmanager", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionpeermanager", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantmanager", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/file", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/balanced", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/none", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcaSwFc5RBg8yCq54QURwEU4nwjfCpjbpmaAm4VbdGLKv/go-logging", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmcrrEpx3VMUbrbgVroH3YiYyUS5c4YAykzyPJWKspUYLa/go-semver/semver", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf/go-msgio", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/internal/util", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/nfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/xfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdYwCmx8pZRkzdcd8MhmLJqYVoVTC1aGsy5Q4reMGLNLg/atomicfile", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2/pubsub", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/internal/util", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/nfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdCgRBcahWLSq3a2xdbcPb4ksrRREAhisYdfAaGfJ8hWb/procfs/xfs", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/providers", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdYwCmx8pZRkzdcd8MhmLJqYVoVTC1aGsy5Q4reMGLNLg/atomicfile", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2/pubsub", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier/Godeps/_workspace/src/github.com/jbenet/goprocess", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier/Godeps/_workspace/src/github.com/jbenet/goprocess/ratelimit", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmekaTKpWkYGcn4ZEC5PwJDRCQHapwugmmG86g2Xpz5GBH/mdns", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/Qmf2fBLzCvFxs3vvZaoQyKSTv2rjApek4F1kzRxAfK6P4P/gateway", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier/Godeps/_workspace/src/github.com/jbenet/goprocess", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG/go-notifier/Godeps/_workspace/src/github.com/jbenet/goprocess/ratelimit", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/tar", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmekaTKpWkYGcn4ZEC5PwJDRCQHapwugmmG86g2Xpz5GBH/mdns", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/balanced", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmf2fBLzCvFxs3vvZaoQyKSTv2rjApek4F1kzRxAfK6P4P/gateway", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { - "ImportPath": "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "ImportPath": "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc", + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3/go-multierror", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx/murmur3", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" }, { "ImportPath": "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32", - "Rev": "1ead2dde773af0b86b45040ee07ebdfa015bf1d7" + "Rev": "19b9eacefb7aef6729a55f53fa2646d1e172faff" + }, + { + "ImportPath": "github.com/OpenBazaar/multiwallet/client/errors", + "Rev": "5d687b8c67d127035479739cbf2258f7b275f3e7" } ] } diff --git a/README.md b/README.md index e34a52a564..9d0d652d72 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ You can either pull in remote changes as normal or run `go get -u github.com/pho ## Usage -You can run the server with `go run openbazaard.go start`. +You can run the server with `go run openbazaard.go start`. Ensure you are using at least version `1.10` of Golang, otherwise you might get errors while running. ### Options diff --git a/api/jsonapi.go b/api/jsonapi.go index 013717e249..f2aa9e9629 100644 --- a/api/jsonapi.go +++ b/api/jsonapi.go @@ -8,6 +8,8 @@ import ( "encoding/hex" "encoding/json" "fmt" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" "io/ioutil" "net/http" "net/http/httputil" @@ -21,12 +23,12 @@ import ( "sync" "time" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipnspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + ipnspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + datastore "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "github.com/OpenBazaar/jsonpb" "github.com/OpenBazaar/spvwallet" @@ -36,7 +38,6 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/ipfs/go-ipfs/core/coreapi" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" "github.com/ipfs/go-ipfs/namesys" "github.com/ipfs/go-ipfs/repo/fsrepo" "github.com/phoreproject/openbazaar-go/core" @@ -137,7 +138,7 @@ func (i *jsonAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { username, password, ok := r.BasicAuth() h := sha256.Sum256([]byte(password)) password = hex.EncodeToString(h[:]) - if !ok || username != i.config.Username || strings.ToLower(password) != strings.ToLower(i.config.Password) { + if !ok || username != i.config.Username || !strings.EqualFold(password, i.config.Password) { w.WriteHeader(http.StatusForbidden) fmt.Fprint(w, "403 - Forbidden") return @@ -176,6 +177,8 @@ func (i *jsonAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { deleter(i, u.String(), w, r) case "PATCH": patch(i, u.String(), w, r) + case "HEAD": + get(i, u.String(), w, r) } } @@ -1083,7 +1086,7 @@ func (i *jsonAPIHandler) GETFollowers(w http.ResponseWriter, r *http.Request) { } SanitizedResponse(w, string(ret)) } else { - followBytes, err := i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "followers.json")), time.Minute, useCache) + followBytes, err := ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "followers.json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return @@ -1136,7 +1139,7 @@ func (i *jsonAPIHandler) GETFollowing(w http.ResponseWriter, r *http.Request) { } SanitizedResponse(w, string(ret)) } else { - followBytes, err := i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "following.json")), time.Minute, useCache) + followBytes, err := ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "following.json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return @@ -1347,7 +1350,7 @@ func (i *jsonAPIHandler) GETListings(w http.ResponseWriter, r *http.Request) { } SanitizedResponse(w, string(listingsBytes)) } else { - listingsBytes, err := i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "listings.json")), time.Minute, useCache) + listingsBytes, err := ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "listings.json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return @@ -1422,7 +1425,7 @@ func (i *jsonAPIHandler) GETListing(w http.ResponseWriter, r *http.Request) { hash = listingID w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") } else { - listingBytes, err = i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "listings", listingID+".json")), time.Minute, useCache) + listingBytes, err = ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "listings", listingID+".json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return @@ -2668,23 +2671,31 @@ func (i *jsonAPIHandler) GETImage(w http.ResponseWriter, r *http.Request) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute*2) defer cancel() - api := coreapi.NewCoreAPI(i.node.IpfsNode) + api, err := coreapi.NewCoreAPI(i.node.IpfsNode) + if err != nil { + ErrorResponse(w, http.StatusInternalServerError, err.Error()) + return + } pth, err := iface.ParsePath("/ipfs/" + imageHash) if err != nil { ErrorResponse(w, http.StatusInternalServerError, err.Error()) return } - dr, err := api.Unixfs().Get(ctx, pth) + nd, err := api.Unixfs().Get(ctx, pth) if err != nil { ErrorResponse(w, http.StatusInternalServerError, err.Error()) return } + f, ok := nd.(files.File) + if !ok { + ErrorResponse(w, http.StatusInternalServerError, "Invalid type assertion") + return + } - defer dr.Close() w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") w.Header().Del("Content-Type") - http.ServeContent(w, r, imageHash, time.Now(), dr) + http.ServeContent(w, r, imageHash, time.Now(), f) } func (i *jsonAPIHandler) GETAvatar(w http.ResponseWriter, r *http.Request) { @@ -2699,7 +2710,6 @@ func (i *jsonAPIHandler) GETAvatar(w http.ResponseWriter, r *http.Request) { ErrorResponse(w, http.StatusInternalServerError, err.Error()) return } - defer dr.Close() w.Header().Set("Cache-Control", "public, max-age=600, immutable") w.Header().Del("Content-Type") http.ServeContent(w, r, path.Join("ipns", peerID, "images", size, "avatar"), time.Now(), dr) @@ -2717,7 +2727,6 @@ func (i *jsonAPIHandler) GETHeader(w http.ResponseWriter, r *http.Request) { ErrorResponse(w, http.StatusInternalServerError, err.Error()) return } - defer dr.Close() w.Header().Set("Cache-Control", "public, max-age=600, immutable") w.Header().Del("Content-Type") http.ServeContent(w, r, path.Join("ipns", peerID, "images", size, "header"), time.Now(), dr) @@ -2815,7 +2824,7 @@ func (i *jsonAPIHandler) POSTFetchProfiles(w http.ResponseWriter, r *http.Reques pro, err := i.node.FetchProfile(pid, useCache) if err != nil { - respondWithError("Not found") + respondWithError("not found") return } obj := pb.PeerAndProfileWithID{Id: id, PeerId: pid, Profile: &pro} @@ -2827,12 +2836,12 @@ func (i *jsonAPIHandler) POSTFetchProfiles(w http.ResponseWriter, r *http.Reques } respJSON, err := m.MarshalToString(&obj) if err != nil { - respondWithError("Error Marshalling to JSON") + respondWithError("error Marshalling to JSON") return } b, err := SanitizeProtobuf(respJSON, new(pb.PeerAndProfileWithID)) if err != nil { - respondWithError("Error Marshalling to JSON") + respondWithError("error Marshalling to JSON") return } i.node.Broadcast <- repo.PremarshalledNotifier{b} @@ -3403,8 +3412,7 @@ func (i *jsonAPIHandler) GETRatings(w http.ResponseWriter, r *http.Request) { var indexBytes []byte if peerID != i.node.IPFSIdentityString() { - indexBytes, _ = i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "ratings.json")), time.Minute, useCache) - + indexBytes, _ = ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "ratings.json")), time.Minute, i.node.IPNSQuorumSize, useCache) } else { indexBytes, _ = ioutil.ReadFile(path.Join(i.node.RepoPath, "root", "ratings.json")) } @@ -3580,8 +3588,8 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request RatingID string `json:"ratingId"` Error string `json:"error"` } - respondWithError := func(_ string) { - e := ratingError{id, rid, "Not found"} + respondWithError := func(errorMsg string) { + e := ratingError{id, rid, errorMsg} ret, err := json.MarshalIndent(e, "", " ") if err != nil { return @@ -3590,14 +3598,14 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request } ratingBytes, err := ipfs.Cat(i.node.IpfsNode, rid, time.Minute) if err != nil { - respondWithError("Not Found") + respondWithError("not Found") return } rating := new(pb.Rating) err = jsonpb.UnmarshalString(string(ratingBytes), rating) if err != nil { - respondWithError("Invalid rating") + respondWithError("invalid rating") return } valid, err := core.ValidateRating(rating) @@ -3617,12 +3625,12 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request } out, err := m.MarshalToString(resp) if err != nil { - respondWithError("Error marshalling rating") + respondWithError("error marshalling rating") return } b, err := SanitizeProtobuf(out, new(pb.RatingWithID)) if err != nil { - respondWithError("Error marshalling rating") + respondWithError("error marshalling rating") return } i.node.Broadcast <- repo.PremarshalledNotifier{b} @@ -4050,7 +4058,7 @@ func (i *jsonAPIHandler) GETPosts(w http.ResponseWriter, r *http.Request) { } SanitizedResponse(w, string(postsBytes)) } else { - postsBytes, err := i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "posts.json")), time.Minute, useCache) + postsBytes, err := ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "posts.json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return @@ -4116,7 +4124,7 @@ func (i *jsonAPIHandler) GETPost(w http.ResponseWriter, r *http.Request) { hash = postID w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") } else { - postBytes, err = i.node.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "posts", postID+".json")), time.Minute, useCache) + postBytes, err = ipfs.ResolveThenCat(i.node.IpfsNode, ipnspath.FromString(path.Join(peerID, "posts", postID+".json")), time.Minute, i.node.IPNSQuorumSize, useCache) if err != nil { ErrorResponse(w, http.StatusNotFound, err.Error()) return diff --git a/api/jsonapi_helpers_test.go b/api/jsonapi_helpers_test.go index 4d1eb7d507..03984f7116 100644 --- a/api/jsonapi_helpers_test.go +++ b/api/jsonapi_helpers_test.go @@ -4,8 +4,8 @@ import ( "bytes" "encoding/json" "fmt" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" "io/ioutil" "net/http" diff --git a/api/sanitize.go b/api/sanitize.go index 3c65b64709..4f70066dc0 100644 --- a/api/sanitize.go +++ b/api/sanitize.go @@ -56,13 +56,13 @@ func sanitize(data interface{}) { switch d := data.(type) { case map[string]interface{}: for k, v := range d { - switch v.(type) { + switch tv := v.(type) { case string: - d[k] = sanitizer.Sanitize(v.(string)) + d[k] = sanitizer.Sanitize(tv) case map[string]interface{}: - sanitize(v) + sanitize(tv) case []interface{}: - sanitize(v) + sanitize(tv) case nil: delete(d, k) } diff --git a/api/ws.go b/api/ws.go index 405f3a0396..ce7775cbb8 100644 --- a/api/ws.go +++ b/api/ws.go @@ -125,7 +125,7 @@ func (wsh wsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { username, password, ok := r.BasicAuth() h := sha256.Sum256([]byte(password)) password = hex.EncodeToString(h[:]) - if !ok || username != wsh.username || strings.ToLower(password) != strings.ToLower(wsh.password) { + if !ok || username != wsh.username || !strings.EqualFold(password, wsh.password) { wsh.logger.Error("refused websocket connection: invalid username and/or password") w.WriteHeader(http.StatusForbidden) fmt.Fprint(w, "403 - Forbidden") diff --git a/build.sh b/build.sh index 8b30400709..083e6c6b44 100755 --- a/build.sh +++ b/build.sh @@ -3,8 +3,7 @@ TARGETS=${1:-windows/386,windows/amd64,darwin/amd64,linux/386,linux/amd64,linux/arm} export CGO_ENABLED=1 -docker pull karalabe/xgo-latest go get github.com/karalabe/xgo mkdir dist && cd dist/ -xgo -go=1.10 --targets=$TARGETS ../ +xgo -go=1.11 --targets=$TARGETS ../ chmod +x * diff --git a/cmd/restore.go b/cmd/restore.go index 99492fb544..648e77baf5 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -5,17 +5,16 @@ import ( "context" "errors" "fmt" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" - bitswap "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dhtopts "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport" - "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" - oniontp "gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport" - ws "gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport" + "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + oniontp "gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + bitswap "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" "io" "io/ioutil" @@ -27,10 +26,11 @@ import ( "syscall" "time" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "github.com/ipfs/go-ipfs/core/coreapi" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" "github.com/OpenBazaar/wallet-interface" "github.com/phoreproject/multiwallet/util" @@ -57,7 +57,6 @@ type Restore struct { } func (x *Restore) Execute(args []string) error { - ipfscore.DHTOption = constructDHTRouting reader := bufio.NewReader(os.Stdin) if x.Mnemonic == "" { fmt.Print("This command will override any current user data. Do you want to continue? (y/n): ") @@ -218,24 +217,13 @@ func (x *Restore) Execute(args []string) error { if usingClearnet { transportOptions = libp2p.ChainOptions( transportOptions, - libp2p.Transport(ws.New), - ) - transportOptions = libp2p.ChainOptions( - transportOptions, - libp2p.Transport(tcp.NewTCPTransport), + libp2p.DefaultTransports, ) } libp2p.DefaultTransports = transportOptions } - ncfg := &ipfscore.BuildCfg{ - Repo: r, - Online: true, - ExtraOpts: map[string]bool{ - "mplex": true, - "ipnsps": true, - }, - } + ncfg := ipfs.PrepareIPFSConfig(r, schema.IPFSCachingRouterDefaultURI, false, false) fmt.Println("Starting node...") nd, err := ipfscore.NewNode(cctx, ncfg) if err != nil { @@ -321,14 +309,18 @@ func RestoreDirectory(repoPath, directory string, nd *ipfscore.IpfsNode, id *cid cctx, cancel := context.WithTimeout(context.Background(), time.Second*30) defer cancel() - api := coreapi.NewCoreAPI(nd) + api, err := coreapi.NewCoreAPI(nd) + if err != nil { + PrintError(fmt.Sprintf("Error retrieving %s\n", path.Join(directory, link.Name))) + return + } pth, err := iface.ParsePath("/ipfs/" + link.Cid.String()) if err != nil { PrintError(fmt.Sprintf("Error retrieving %s\n", path.Join(directory, link.Name))) return } - r, err := api.Unixfs().Get(cctx, pth) + ndi, err := api.Unixfs().Get(cctx, pth) if err != nil { PrintError(fmt.Sprintf("Error retrieving %s\n", path.Join(directory, link.Name))) return @@ -340,6 +332,11 @@ func RestoreDirectory(repoPath, directory string, nd *ipfscore.IpfsNode, id *cid PrintError(err.Error()) return } + r, ok := ndi.(files.File) + if !ok { + PrintError(fmt.Sprintf("Error retrieving %s\n", path.Join(directory, link.Name))) + return + } _, err = io.Copy(f, r) if err != nil { PrintError(err.Error()) diff --git a/cmd/start.go b/cmd/start.go index c162b06bd2..8eab1c2fcd 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -18,23 +18,17 @@ import ( "syscall" "time" - bitswap "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - dhtopts "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" - oniontp "gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport" - routinghelpers "gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers" - ipfslogging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ipnspb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + routinghelpers "gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers" + libp2p "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + dht "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + ipnspb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + oniontp "gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport" + ipfslogging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" wi "github.com/OpenBazaar/wallet-interface" "github.com/btcsuite/btcd/chaincfg" @@ -78,9 +72,7 @@ var fileLogFormat = logging.MustStringFormatter( `%{time:15:04:05.000} [%{level}] [%{module}/%{shortfunc}] %{message}`, ) -var ( - ErrNoGateways = errors.New("no gateway addresses configured") -) +var ErrNoGateways = errors.New("no gateway addresses configured") type Start struct { Password string `short:"p" long:"password" description:"the encryption password if the database is encrypted"` @@ -102,11 +94,13 @@ type Start struct { Storage string `long:"storage" description:"set the outgoing message storage option [self-hosted, dropbox] default=self-hosted"` BitcoinCash bool `long:"bitcoincash" description:"use a Bitcoin Cash wallet in a dedicated data directory"` ZCash string `long:"zcash" description:"use a ZCash wallet in a dedicated data directory. To use this you must pass in the location of the zcashd binary."` + + ForceKeyCachePurge bool `long:"forcekeypurge" description:"repair test for issue OpenBazaar/openbazaar-go#1593; use as instructed only"` } func (x *Start) Execute(args []string) error { - ipfscore.DHTOption = constructDHTRouting printSplashScreen(x.Verbose) + ipfs.UpdateIPFSGlobalProtocolVars(x.Testnet || x.Regtest) if x.Testnet && x.Regtest { return errors.New("invalid combination of testnet and regtest modes") @@ -297,19 +291,16 @@ func (x *Start) Execute(args []string) error { // Setup testnet if x.Testnet || x.Regtest { + // set testnet bootstrap addrs testnetBootstrapAddrs, err := schema.GetTestnetBootstrapAddrs(configFile) if err != nil { log.Error(err) return err } cfg.Bootstrap = testnetBootstrapAddrs - dhtopts.ProtocolDHT = "/openbazaar/kad/testnet/1.0.0" - bitswap.ProtocolBitswap = "/openbazaar/bitswap/testnet/1.1.0" - service.ProtocolOpenBazaar = "/openbazaar/app/testnet/1.0.0" + // don't use pushnodes on testnet dataSharing.PushTo = []string{} - } else { - bitswap.ProtocolBitswap = "/openbazaar/bitswap/1.1.0" } onionAddr, err := obnet.MaybeCreateHiddenServiceKey(repoPath) @@ -390,15 +381,7 @@ func (x *Start) Execute(args []string) error { cfg.Swarm.DisableNatPortMap = true } - ncfg := &ipfscore.BuildCfg{ - Repo: r, - Online: true, - ExtraOpts: map[string]bool{ - "mplex": true, - "ipnsps": true, - }, - } - + ncfg := ipfs.PrepareIPFSConfig(r, ipnsExtraConfig.APIRouter, x.Testnet, x.Regtest) nd, err := ipfscore.NewNode(cctx, ncfg) if err != nil { log.Error("create new ipfs node:", err) @@ -426,8 +409,12 @@ func (x *Start) Execute(args []string) error { } var dhtRouting *dht.IpfsDHT for _, router := range tiered.Routers { - if _, ok := router.(*dht.IpfsDHT); ok { - dhtRouting = router.(*dht.IpfsDHT) + if r, ok := router.(*ipfs.CachingRouter); ok { + r.APIRouter().Start(torDialer) + dhtRouting, err = r.DHT() + if err != nil { + return err + } } } if dhtRouting == nil { @@ -444,6 +431,12 @@ func (x *Start) Execute(args []string) error { err = proto.Unmarshal(ival, ourIpnsRecord) if err != nil { log.Error("unmarshal record value", err) + nd.Repo.Datastore().Delete(ipnskey) + } + + if x.ForceKeyCachePurge { + log.Infof("forcing key purge from namesys cache...") + nd.Repo.Datastore().Delete(ipnskey) } // Wallet @@ -601,13 +594,12 @@ func (x *Start) Execute(args []string) error { AcceptStoreRequests: dataSharing.AcceptStoreRequests, BanManager: bm, Datastore: sqliteDB, - IPNSBackupAPI: ipnsExtraConfig.FallbackAPI, IpfsNode: nd, DHT: dhtRouting, MasterPrivateKey: mPrivKey, Multiwallet: mw, OfflineMessageFailoverTimeout: 30 * time.Second, - Pubsub: ps, //nolint,gofmt,goimports + Pubsub: ps, PushNodes: pushNodes, RegressionTestEnable: x.Regtest, RepoPath: repoPath, @@ -692,6 +684,7 @@ func (x *Start) Execute(args []string) error { } core.Node.Service = service.New(core.Node, sqliteDB) core.Node.Service.WaitForReady() + log.Info("OpenBazaar Service Ready") core.Node.StartMessageRetriever() core.Node.StartPointerRepublisher() @@ -846,16 +839,6 @@ func newHTTPGateway(node *core.OpenBazaarNode, ctx commands.Context, authCookie return api.NewGateway(node, authCookie, manet.NetListener(gwLis), config, ml, opts...) } -const IpnsValidatorTag = "ipns" - -func constructDHTRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { - return dht.New( - ctx, host, - dhtopts.Datastore(dstore), - dhtopts.Validator(validator), - ) -} - // serveHTTPApi collects options, creates listener, prints status message and starts serving requests func serveHTTPApi(cctx *commands.Context) (<-chan error, error) { cfg, err := cctx.GetConfig() diff --git a/core/completion.go b/core/completion.go index ec48e748e0..7e78e1463c 100644 --- a/core/completion.go +++ b/core/completion.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "io/ioutil" "os" "path" diff --git a/core/confirmation.go b/core/confirmation.go index 264bdcdf14..7668ac1fc3 100644 --- a/core/confirmation.go +++ b/core/confirmation.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "time" "github.com/OpenBazaar/wallet-interface" diff --git a/core/core.go b/core/core.go index b88295e044..e2454ee059 100644 --- a/core/core.go +++ b/core/core.go @@ -3,13 +3,13 @@ package core import ( "errors" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" "path" "sync" @@ -25,7 +25,6 @@ import ( sto "github.com/phoreproject/openbazaar-go/storage" "github.com/btcsuite/btcutil/hdkeychain" - "github.com/gosimple/slug" "github.com/ipfs/go-ipfs/core" logging "github.com/op/go-logging" @@ -35,7 +34,7 @@ import ( const ( // VERSION - current version - VERSION = "2.1.0-dev4" + VERSION = "2.1.1-dev" // USERAGENT - user-agent header string USERAGENT = "/Phore-Marketplace-go:" + VERSION + "/" ) @@ -104,9 +103,6 @@ type OpenBazaarNode struct { // Allow other nodes to push data to this node for storage AcceptStoreRequests bool - // Last ditch API to find records that dropped out of the DHT - IPNSBackupAPI string - // RecordAgingNotifier is a worker that walks the cases datastore to // notify the user as disputes age past certain thresholds RecordAgingNotifier *recordAgingNotifier diff --git a/core/disputes.go b/core/disputes.go index 510d8687dc..53f3d14db1 100644 --- a/core/disputes.go +++ b/core/disputes.go @@ -5,8 +5,8 @@ import ( "encoding/hex" "errors" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "strconv" "sync" diff --git a/core/fulfillment.go b/core/fulfillment.go index f46ffb3f6f..2b00d90f8b 100644 --- a/core/fulfillment.go +++ b/core/fulfillment.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "errors" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "time" diff --git a/core/images.go b/core/images.go index 5930821999..592c36d518 100644 --- a/core/images.go +++ b/core/images.go @@ -1,12 +1,14 @@ package core import ( + "bytes" "encoding/base64" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" "image" // load gif _ "image/gif" "image/jpeg" // load png _ "image/png" + "io" "io/ioutil" "net" "net/http" @@ -16,8 +18,7 @@ import ( "strings" "time" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" "github.com/nfnt/resize" "github.com/phoreproject/openbazaar-go/ipfs" @@ -147,23 +148,23 @@ func getImageAttributes(targetWidth, targetHeight, imgWidth, imgHeight uint) (wi } // FetchAvatar - fetch image avatar from ipfs -func (n *OpenBazaarNode) FetchAvatar(peerID string, size string, useCache bool) (io.DagReader, error) { +func (n *OpenBazaarNode) FetchAvatar(peerID string, size string, useCache bool) (io.ReadSeeker, error) { return n.FetchImage(peerID, "avatar", size, useCache) } // FetchHeader - fetch image header from ipfs -func (n *OpenBazaarNode) FetchHeader(peerID string, size string, useCache bool) (io.DagReader, error) { +func (n *OpenBazaarNode) FetchHeader(peerID string, size string, useCache bool) (io.ReadSeeker, error) { return n.FetchImage(peerID, "header", size, useCache) } // FetchImage - fetch ipfs image -func (n *OpenBazaarNode) FetchImage(peerID string, imageType string, size string, useCache bool) (io.DagReader, error) { +func (n *OpenBazaarNode) FetchImage(peerID string, imageType string, size string, useCache bool) (io.ReadSeeker, error) { query := "/" + peerID + "/images/" + size + "/" + imageType - b, err := n.IPNSResolveThenCat(ipath.FromString(query), time.Minute, useCache) + b, err := ipfs.ResolveThenCat(n.IpfsNode, ipath.FromString(query), time.Minute, n.IPNSQuorumSize, useCache) if err != nil { return nil, err } - return io.NewBufDagReader(b), nil + return bytes.NewReader(b), nil } // GetBase64Image - fetch the image and return it as base64 encoded string diff --git a/core/images_test.go b/core/images_test.go index c6b08b0faa..1e7127879c 100644 --- a/core/images_test.go +++ b/core/images_test.go @@ -1,7 +1,7 @@ package core import ( - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" _ "image/gif" _ "image/png" "io/ioutil" diff --git a/core/inventory.go b/core/inventory.go index 3b4d07cd59..075e671e5b 100644 --- a/core/inventory.go +++ b/core/inventory.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "time" "github.com/phoreproject/openbazaar-go/repo" diff --git a/core/ipns.go b/core/ipns.go deleted file mode 100644 index fa17073884..0000000000 --- a/core/ipns.go +++ /dev/null @@ -1,136 +0,0 @@ -package core - -import ( - "encoding/hex" - "encoding/json" - "errors" - "fmt" - - "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - - "io/ioutil" - "net" - "net/http" - "strings" - "time" - - "github.com/ipfs/go-ipfs/namesys" - - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - - "github.com/phoreproject/openbazaar-go/ipfs" -) - -/* -These functions wrap the IPNS Resolve commands with code that will try fetching the record from an API -as a last ditch effort if it fails to find the record in the DHT. The API endpoint is loaded from the config file. -We need to take care to observe the Tor preference. -*/ - -// IPNSResolveThenCat - find the record in the DHT -func (n *OpenBazaarNode) IPNSResolveThenCat(ipnsPath ipath.Path, timeout time.Duration, usecache bool) ([]byte, error) { - var ret []byte - hash, err := n.IPNSResolve(ipnsPath.Segments()[0], timeout, usecache) - if err != nil { - return ret, err - } - p := make([]string, len(ipnsPath.Segments())) - p[0] = hash - for i := 0; i < len(ipnsPath.Segments())-1; i++ { - p[i+1] = ipnsPath.Segments()[i+1] - } - b, err := ipfs.Cat(n.IpfsNode, ipath.Join(p), timeout) - if err != nil { - return ret, err - } - return b, nil -} - -// IPNSResolve - try fetching the record from an API -func (n *OpenBazaarNode) IPNSResolve(peerID string, timeout time.Duration, usecache bool) (string, error) { - pid, err := peer.IDB58Decode(peerID) - if err != nil { - return "", err - } - val, err := ipfs.Resolve(n.IpfsNode, pid, timeout, n.IPNSQuorumSize, usecache) - if err != nil && n.IPNSBackupAPI != "" { - dial := net.Dial - if n.TorDialer != nil { - dial = n.TorDialer.Dial - } - tbTransport := &http.Transport{Dial: dial} - client := &http.Client{Transport: tbTransport, Timeout: time.Second * 5} - resp, err := client.Get(ipnsAPIPathTransform(n.IPNSBackupAPI, peerID)) - if err != nil { - log.Error(err) - return "", err - } - if resp.StatusCode != http.StatusOK { - return "", errors.New("IPNS record not found in network") - } - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Error(err) - return "", err - } - - type KeyAndRecord struct { - Pubkey string `json:"pubkey"` - Record string `json:"record"` - } - - rec := new(KeyAndRecord) - - err = json.Unmarshal(b, rec) - if err != nil { - log.Error(err) - return "", err - } - - pubkeyBytes, err := hex.DecodeString(rec.Pubkey) - if err != nil { - log.Error(err) - return "", err - } - - pubkey, err := crypto.UnmarshalPublicKey(pubkeyBytes) - if err != nil { - log.Error(err) - return "", err - } - id, err := peer.IDB58Decode(peerID) - if err != nil { - log.Error(err) - return "", err - } - if !id.MatchesPublicKey(pubkey) { - log.Error(err) - return "", fmt.Errorf("invalid key. Does not hash to %s", peerID) - } - - p, err := ipath.ParsePath(rec.Record) - if err != nil { - log.Error(err) - return "", err - } - - go func() { - n.IpfsNode.Repo.Datastore().Put(namesys.IpnsDsKey(id), []byte(p.String())) - n.IpfsNode.Repo.Datastore().Put(datastore.NewKey(KeyCachePrefix+pid.Pretty()), pubkeyBytes) - }() - - val = strings.TrimPrefix(p.String(), "/ipfs/") - return val, nil - } - return val, err -} - -func ipnsAPIPathTransform(url, peerID string) string { - if !strings.HasSuffix(url, "/") { - url = url + "/" - } - return url + "ob/ipns/" + peerID -} diff --git a/core/ipns_test.go b/core/ipns_test.go deleted file mode 100644 index 617c6b2b01..0000000000 --- a/core/ipns_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package core - -import "testing" - -func TestIpnsAPIPathTransform(t *testing.T) { - peerID := "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7" - expected := "https://gateway.ob1.io/ob/ipns/" + peerID - - testVectors := []string{ - "https://gateway.ob1.io", - "https://gateway.ob1.io/", - } - - for i, v := range testVectors { - pth := ipnsAPIPathTransform(v, peerID) - if pth != expected { - t.Errorf("IpnsAPIPathTransform test %d failed. Got %s, expected %s", i, pth, expected) - } - } -} diff --git a/core/listings.go b/core/listings.go index 3feef222fa..0857370106 100644 --- a/core/listings.go +++ b/core/listings.go @@ -6,8 +6,8 @@ import ( "errors" "fmt" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "io/ioutil" "os" "path" diff --git a/core/moderation.go b/core/moderation.go index 15efd95130..fd07711651 100644 --- a/core/moderation.go +++ b/core/moderation.go @@ -3,8 +3,8 @@ package core import ( "crypto/sha256" "errors" - "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "io/ioutil" "os" diff --git a/core/net.go b/core/net.go index 146f1eb976..9413163637 100644 --- a/core/net.go +++ b/core/net.go @@ -3,10 +3,10 @@ package core import ( "errors" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "sync" "time" diff --git a/core/order.go b/core/order.go index 6c72b14dc8..8244cdb24b 100644 --- a/core/order.go +++ b/core/order.go @@ -11,15 +11,15 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/phoreproject/openbazaar-go/ipfs" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "strconv" "strings" "time" - ipfspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + ipfspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" "github.com/OpenBazaar/jsonpb" "github.com/OpenBazaar/wallet-interface" @@ -1318,11 +1318,11 @@ collectListings: inv.Variant = selectedVariant for _, o := range listingMap[item.ListingHash].Item.Options { for _, checkOpt := range userOptions { - if strings.ToLower(o.Name) == strings.ToLower(checkOpt.Name) { + if strings.EqualFold(o.Name, checkOpt.Name) { // var validVariant bool validVariant := false for _, v := range o.Variants { - if strings.ToLower(v.Name) == strings.ToLower(checkOpt.Value) { + if strings.EqualFold(v.Name, checkOpt.Value) { validVariant = true } } @@ -1332,7 +1332,7 @@ collectListings: } check: for i, lopt := range listingOptions { - if strings.ToLower(checkOpt.Name) == strings.ToLower(lopt) { + if strings.EqualFold(checkOpt.Name, lopt) { listingOptions = append(listingOptions[:i], listingOptions[i+1:]...) continue check } @@ -1382,7 +1382,7 @@ collectListings: if option.Type != pb.Listing_ShippingOption_LOCAL_PICKUP { var service *pb.Listing_ShippingOption_Service for _, shippingService := range option.Services { - if strings.ToLower(shippingService.Name) == strings.ToLower(item.ShippingOption.Service) { + if strings.EqualFold(shippingService.Name, item.ShippingOption.Service) { service = shippingService } } @@ -1492,7 +1492,7 @@ func (n *OpenBazaarNode) ValidateModeratedPaymentAddress(order *pb.Order, timeou return err } ipnsPath := ipfspath.FromString(order.Payment.Moderator + "/profile.json") - profileBytes, err := n.IPNSResolveThenCat(ipnsPath, time.Minute, true) + profileBytes, err := ipfs.ResolveThenCat(n.IpfsNode, ipnsPath, time.Minute, n.IPNSQuorumSize, true) if err != nil { return err } @@ -1640,9 +1640,9 @@ func GetSelectedSku(listing *pb.Listing, itemOptions []*pb.Order_Item_Option) (i for _, s := range listing.Item.Options { optionsLoop: for _, o := range itemOptions { - if strings.ToLower(o.Name) == strings.ToLower(s.Name) { + if strings.EqualFold(o.Name, s.Name) { for i, va := range s.Variants { - if strings.ToLower(va.Name) == strings.ToLower(o.Value) { + if strings.EqualFold(va.Name, o.Value) { selected = append(selected, i) break optionsLoop } diff --git a/core/posts.go b/core/posts.go index e443d9443a..6b7e0ddd43 100644 --- a/core/posts.go +++ b/core/posts.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" "io/ioutil" "os" diff --git a/core/profile.go b/core/profile.go index 5b58a77e15..79b352a6da 100644 --- a/core/profile.go +++ b/core/profile.go @@ -6,8 +6,9 @@ import ( "encoding/json" "errors" "fmt" + "github.com/phoreproject/openbazaar-go/ipfs" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" "io/ioutil" "os" @@ -15,7 +16,7 @@ import ( "strings" "time" - ipnspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + ipnspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" "github.com/OpenBazaar/jsonpb" "github.com/golang/protobuf/ptypes" @@ -46,7 +47,7 @@ func (n *OpenBazaarNode) GetProfile() (pb.Profile, error) { // FetchProfile - fetch peer's profile func (n *OpenBazaarNode) FetchProfile(peerID string, useCache bool) (pb.Profile, error) { var pro pb.Profile - b, err := n.IPNSResolveThenCat(ipnspath.FromString(path.Join(peerID, "profile.json")), time.Minute, useCache) + b, err := ipfs.ResolveThenCat(n.IpfsNode, ipnspath.FromString(path.Join(peerID, "profile.json")), time.Minute, n.IPNSQuorumSize, true) if err != nil || len(b) == 0 { return pro, err } diff --git a/core/ratings.go b/core/ratings.go index 7eec5ef318..a1f29129e6 100644 --- a/core/ratings.go +++ b/core/ratings.go @@ -6,8 +6,8 @@ import ( "encoding/json" "errors" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "io/ioutil" "os" diff --git a/core/signatures.go b/core/signatures.go index 474a414416..9c9edba40a 100644 --- a/core/signatures.go +++ b/core/signatures.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "github.com/btcsuite/btcd/btcec" "github.com/golang/protobuf/proto" diff --git a/core/signatures_test.go b/core/signatures_test.go index 2e31d8d54d..84aa503944 100644 --- a/core/signatures_test.go +++ b/core/signatures_test.go @@ -2,7 +2,7 @@ package core_test import ( "encoding/hex" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "strings" "testing" diff --git a/core/spend.go b/core/spend.go index 37d7eff9d3..619e39ec10 100644 --- a/core/spend.go +++ b/core/spend.go @@ -26,6 +26,7 @@ type SpendRequest struct { OrderID string `json:"orderId"` RequireAssociatedOrder bool `json:"requireOrder"` Wallet string `json:"wallet"` + SpendAll bool `json:"spendAll"` } type SpendResponse struct { @@ -70,7 +71,7 @@ func (n *OpenBazaarNode) Spend(args *SpendRequest) (*SpendResponse, error) { feeLevel = wallet.NORMAL } - txid, err := wal.Spend(args.Amount, addr, feeLevel, args.OrderID, false) + txid, err := wal.Spend(args.Amount, addr, feeLevel, args.OrderID, args.SpendAll) if err != nil { switch { case err == wallet.ErrorInsuffientFunds: diff --git a/core/utils.go b/core/utils.go index fffb31c6c1..7e64c44423 100644 --- a/core/utils.go +++ b/core/utils.go @@ -6,11 +6,11 @@ import ( "fmt" "time" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - util "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + util "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "github.com/OpenBazaar/wallet-interface" "github.com/btcsuite/btcd/chaincfg/chainhash" diff --git a/docs/install-linux.md b/docs/install-linux.md index 3ec565a1c0..8cc0dc674f 100644 --- a/docs/install-linux.md +++ b/docs/install-linux.md @@ -12,13 +12,13 @@ sudo apt-get install build-essential git -y ### Install Go These are some condensed steps which will get you started quickly, but we recommend following the installation steps at [https://golang.org/doc/install](https://golang.org/doc/install). -Download Go 1.10 and extract executeables: +Download Go 1.11 and extract executeables: ``` -wget https://storage.googleapis.com/golang/go1.10.7.linux-amd64.tar.gz -sudo tar -zxvf go1.10.7.linux-amd64.tar.gz -C /usr/local/ +wget https://storage.googleapis.com/golang/go1.11.5.linux-amd64.tar.gz +sudo tar -zxvf go1.11.5.linux-amd64.tar.gz -C /usr/local/ ``` -Note: OpenBazaar has not been tested on v1.11 and may cause problems +Note: OpenBazaar has not been tested on v1.12 and may cause problems ### Setup Go @@ -54,7 +54,7 @@ It will use git to checkout the source code into `$GOPATH/src/github.com/phorepr Checkout a release version: ``` -git checkout v0.12.4 +git checkout v0.13.4 ``` Note: `go get` leaves the repo pointing at `master` which is a branch used for active development. Running OpenBazaar from `master` is NOT recommended. Check the [release versions](https://github.com/phoreproject/openbazaar-go/releases) for the available versions that you use in checkout. @@ -80,4 +80,4 @@ To start hacking and committing to your fork make sure to add your git remote in ``` cd $GOPATH/src/github.com/phoreproject/openbazaar-go git remote add myusername git@github.com:myusername/openbazaar-go.git -``` \ No newline at end of file +``` diff --git a/docs/install-osx.md b/docs/install-osx.md index b2eb5b2416..2593ea570a 100644 --- a/docs/install-osx.md +++ b/docs/install-osx.md @@ -12,9 +12,9 @@ brew install git ### Install Go These are some condensed steps which will get you started quickly, but we recommend following the installation steps at [https://golang.org/doc/install](https://golang.org/doc/install). -Use brew to install Go 1.10: +Use brew to install Go 1.11: ``` -brew install go@1.10 +brew install go@1.11 ``` Go may also be installed following the directions at [https://golang.org/doc/install](https://golang.org/doc/install). @@ -56,7 +56,7 @@ It will use git to checkout the source code into `$GOPATH/src/github.com/phorepr Checkout a release version: ``` -git checkout v0.12.4 +git checkout v0.13.4 ``` Note: `go get` leaves the repo pointing at `master` which is a branch used for active development. Running OpenBazaar from `master` is NOT recommended. Check the [release versions](https://github.com/phoreproject/openbazaar-go/releases) for the available versions that you use in checkout. diff --git a/docs/install-pi3.md b/docs/install-pi3.md index 360a9de4e4..ddbdb82270 100644 --- a/docs/install-pi3.md +++ b/docs/install-pi3.md @@ -14,10 +14,10 @@ sudo apt-get install build-essential git -y These are some condensed steps which will get you started quickly, but we recommend following the installation steps at [https://golang.org/doc/install](https://golang.org/doc/install). -Download Go 1.10 and extract executeables: +Download Go 1.11 and extract executeables: ``` -wget https://storage.googleapis.com/golang/go1.10.7.linux-armv6l.tar.gz -sudo tar -zxvf go1.10.7.linux-armv6l.tar.gz -C /usr/local/ +wget https://storage.googleapis.com/golang/go1.11.5.linux-armv6l.tar.gz +sudo tar -zxvf go1.11.5.linux-armv6l.tar.gz -C /usr/local/ ``` Note: OpenBazaar has not been tested on v1.11 and may cause problems @@ -57,7 +57,7 @@ It will use git to checkout the source code into `$GOPATH/src/github.com/phorepr Checkout a release version: ``` -git checkout v0.12.4 +git checkout v0.13.4 ``` Note: `go get` leaves the repo pointing at `master` which is a branch used for active development. Running OpenBazaar from `master` is NOT recommended. Check the [release versions](https://github.com/phoreproject/openbazaar-go/releases) for the available versions that you use iin checkout. diff --git a/docs/install-windows.md b/docs/install-windows.md index 6c979cf761..de5253b635 100644 --- a/docs/install-windows.md +++ b/docs/install-windows.md @@ -5,9 +5,9 @@ WINDOWS INSTALL NOTES You need to have Go, Git, and GCC installed to compile and run the OpenBazaar-Go daemon. -- **Go v1.10** +- **Go v1.11** + https://golang.org/dl - + Note: OpenBazaar has not been tested on v1.11 and may cause problems + + Note: OpenBazaar has not been tested on v1.12 and may cause problems - **Git** + https://git-scm.com/download/win - **TDM-GCC/MinGW-w64** @@ -27,9 +27,8 @@ Create a directory to store all your Go projects (e.g. `C:\goprojects`): - Install `openbazaar-go`: + Open the command prompt and run: `go get github.com/phoreproejct/openbazaar-go`. This will use git to checkout the source code into `%GOPATH%\src\github.com\phoreproject\openbazaar-go`. - Checkout an Phore Marketplace release: - + Run `git checkout v0.12.4` to checkout a release version. - + Note: `go get` leaves the repo pointing at `master` which is a branch used for active development. Running OpenBazaar from `master` is NOT recommended. Check the [release versions](https://github.com/phoreproject/openbazaar-go/releases) for the available versions that you use in checkout. + + Run `git checkout v0.13.4` to checkout a release version. + + Note: `go get` leaves the repo pointing at `master` which is a branch used for active development. Running Phore Marketplace from `master` is NOT recommended. Check the [release versions](https://github.com/phoreproject/openbazaar-go/releases) for the available versions that you use in checkout. - To compile and run `openbazaar-go`: + Open the command prompt and navigate the source directory: `cd %GOPATH%\src\github.com\phoreproject\openbazaar-go` + Type: `go run openbazaard.go start` - diff --git a/docs/multipleInstances.md b/docs/multipleInstances.md index 75dfdc49e9..f1ff59693e 100644 --- a/docs/multipleInstances.md +++ b/docs/multipleInstances.md @@ -6,7 +6,8 @@ Install and Run Multiple Servers In your server directory, use the datadir option to init the server with a new data directory. This will create the data directory if it doesn't already exist, and generate all the files needed to run the server from that directory. Example: -`go run openbazaard.go init -d=c://Users/Username/OpenBazaar2.0StoreB` +Windows: `go run openbazaard.go init -d=c://path/to/data/directory` +Linux/MacOS: `go run openbazaard.go init -d=/path/to/data/directory` ### Change the Ports in the Config File @@ -31,4 +32,5 @@ Example: You can now run an instance of the server from the new data directory with the daradir option. Multiple instances can be run simultaneously, one for each data directory you've created. Example: -`go run openbazaard.go start -d=c://Users/Username/OpenBazaar2.0StoreB` +Windows: `go run openbazaard.go start -d=c://path/to/data/directory` +Linux/MacOS: `go run openbazaard.go start -d=/path/to/data/directory` diff --git a/ipfs/add.go b/ipfs/add.go index dd968cd949..496b90f7bd 100644 --- a/ipfs/add.go +++ b/ipfs/add.go @@ -2,62 +2,46 @@ package ipfs import ( "context" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" "io" "io/ioutil" "math/rand" "os" - "path/filepath" "strconv" - "strings" - - "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" "github.com/ipfs/go-ipfs/core" + "github.com/ipfs/go-ipfs/core/coreapi" "github.com/ipfs/go-ipfs/core/coreunix" _ "github.com/ipfs/go-ipfs/core/mock" ) // Recursively add a directory to IPFS and return the root hash func AddDirectory(n *core.IpfsNode, root string) (rootHash string, err error) { - s := strings.Split(root, "/") - dirName := s[len(s)-1] - h, err := addAndPin(n, root) + api, err := coreapi.NewCoreAPI(n) + if err != nil { + return "", err + } + stat, err := os.Lstat(root) if err != nil { return "", err } - i, err := cid.Decode(h) + + f, err := files.NewSerialFile(root, false, stat) if err != nil { return "", err } - dag := merkledag.NewDAGService(n.Blocks) - m := make(map[string]bool) - ctx := context.Background() - m[i.String()] = true - for { - if len(m) == 0 { - break - } - for k := range m { - c, err := cid.Decode(k) - if err != nil { - return "", err - } - links, err := dag.GetLinks(ctx, c) - if err != nil { - return "", err - } - delete(m, k) - for _, link := range links { - if link.Name == dirName { - return link.Cid.String(), nil - } - m[link.Cid.String()] = true - } - } + + opts := []options.UnixfsAddOption{ + options.Unixfs.CidVersion(0), + options.Unixfs.Pin(true), + options.Unixfs.Wrap(true), + } + pth, err := api.Unixfs().Add(context.Background(), files.ToDir(f), opts...) + if err != nil { + return "", err } - return i.String(), nil + return pth.Root().String(), nil } func AddFile(n *core.IpfsNode, file string) (string, error) { @@ -90,7 +74,7 @@ func addAndPin(n *core.IpfsNode, root string) (rootHash string, err error) { return "", err } - f, err := files.NewSerialFile(filepath.Base(root), root, false, stat) + f, err := files.NewSerialFile(root, false, stat) if err != nil { return "", err } diff --git a/ipfs/add_test.go b/ipfs/add_test.go index b4a9cf3ba5..60acb667fd 100644 --- a/ipfs/add_test.go +++ b/ipfs/add_test.go @@ -17,13 +17,13 @@ func TestMain(m *testing.M) { } func setup() { - os.MkdirAll(path.Join("./", "root"), os.ModePerm) - d1 := []byte("hello world") - ioutil.WriteFile(path.Join("./", "root", "test"), d1, 0644) + os.MkdirAll(path.Join(os.TempDir(), "root"), os.ModePerm) + d := []byte("hello world") + ioutil.WriteFile(path.Join(os.TempDir(), "root", "test"), d, os.ModePerm) } func teardown() { - os.RemoveAll(path.Join("./", "root")) + os.RemoveAll(path.Join(os.TempDir(), "root")) } func TestAddFile(t *testing.T) { @@ -31,7 +31,7 @@ func TestAddFile(t *testing.T) { if err != nil { t.Error(err) } - hash, err := AddFile(n, path.Join("./", "root", "test")) + hash, err := AddFile(n, path.Join(os.TempDir(), "root", "test")) if err != nil { t.Error(err) } @@ -45,7 +45,7 @@ func TestAddDirectory(t *testing.T) { if err != nil { t.Error(err) } - root, err := AddDirectory(n, path.Join("./", "root")) + root, err := AddDirectory(n, path.Join(os.TempDir(), "root")) if err != nil { t.Error(err) } diff --git a/ipfs/api_router.go b/ipfs/api_router.go new file mode 100644 index 0000000000..f11a7971ea --- /dev/null +++ b/ipfs/api_router.go @@ -0,0 +1,129 @@ +package ipfs + +import ( + "bytes" + "context" + "encoding/base64" + "errors" + "golang.org/x/net/proxy" + "io/ioutil" + "net/http" + "time" + + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" +) + +var apiRouterHTTPClient = &http.Client{ + Timeout: time.Second * 30, +} + +// ensure APIRouter satisfies the interface +var _ routing.IpfsRouting = &APIRouter{} + +// ErrNotStarted is returned if a method is called before the router +// is started using the Start() method. +var ErrNotStarted = errors.New("API router not started") + +// APIRouter is a routing.IpfsRouting compliant struct backed by an API. It only +// provides the features offerened by routing.ValueStore and marks the others as +// unsupported. +type APIRouter struct { + uri string + started chan (struct{}) + validator record.Validator +} + +// NewAPIRouter creates a new APIRouter backed by the given URI. +func NewAPIRouter(uri string, validator record.Validator) APIRouter { + return APIRouter{uri: uri, started: make(chan (struct{})), validator: validator} +} + +func (r *APIRouter) Start(proxyDialer proxy.Dialer) { + if proxyDialer != nil { + tbTransport := &http.Transport{Dial: proxyDialer.Dial} + apiRouterHTTPClient.Transport = tbTransport + } + close(r.started) +} + +// Bootstrap is a no-op. We don't need any setup to query the API. +func (r APIRouter) Bootstrap(_ context.Context) error { + return nil +} + +// PutValue writes the given value to the API for the given key +func (r APIRouter) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) error { + <-r.started + path := r.pathForKey(key) + req, err := http.NewRequest("PUT", path, bytes.NewBuffer(value)) + if err != nil { + return err + } + + log.Debugf("write value to %s", path) + _, err = apiRouterHTTPClient.Do(req) + return err +} + +// GetValue reads the value for the given key +func (r APIRouter) GetValue(ctx context.Context, key string, opts ...ropts.Option) ([]byte, error) { + <-r.started + path := r.pathForKey(key) + resp, err := apiRouterHTTPClient.Get(path) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + log.Debugf("read value from %s", path) + value, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return value, r.validator.Validate(key, value) +} + +// GetValues reads the value for the given key. The API does not return multiple +// values. +func (r APIRouter) GetValues(ctx context.Context, key string, opts ...ropts.Option) ([]byte, error) { + <-r.started + return r.GetValue(ctx, key, opts...) +} + +// SearchValue returns the value for the given key. It return either an error or +// a closed channel containing one value. +func (r APIRouter) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + value, err := r.GetValue(ctx, key, opts...) + if err != nil { + return nil, err + } + + valueCh := make(chan []byte, 1) + valueCh <- value + close(valueCh) + return valueCh, nil +} + +// FindPeer is unsupported +func (r APIRouter) FindPeer(_ context.Context, id peer.ID) (pstore.PeerInfo, error) { + return pstore.PeerInfo{}, routing.ErrNotSupported +} + +// FindProvidersAsync is unsupported +func (r APIRouter) FindProvidersAsync(_ context.Context, _ cid.Cid, _ int) <-chan pstore.PeerInfo { + return nil +} + +// Provide is unsupported +func (r APIRouter) Provide(_ context.Context, _ cid.Cid, _ bool) error { + return routing.ErrNotSupported +} + +func (r APIRouter) pathForKey(key string) string { + return r.uri + "/value/" + base64.URLEncoding.EncodeToString([]byte(key)) +} diff --git a/ipfs/caching_router.go b/ipfs/caching_router.go new file mode 100644 index 0000000000..4c850467b5 --- /dev/null +++ b/ipfs/caching_router.go @@ -0,0 +1,95 @@ +package ipfs + +import ( + "context" + "encoding/hex" + "errors" + + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" +) + +var ( + ErrCachingRouterIncorrectRoutingType = errors.New("Incorrect routing type") +) + +type CachingRouter struct { + apiRouter *APIRouter + routing.IpfsRouting +} + +func NewCachingRouter(dht *dht.IpfsDHT, apiRouter *APIRouter) *CachingRouter { + return &CachingRouter{ + apiRouter: apiRouter, + IpfsRouting: dht, + } +} + +func (r *CachingRouter) DHT() (*dht.IpfsDHT, error) { + dht, ok := r.IpfsRouting.(*dht.IpfsDHT) + if !ok { + return nil, ErrCachingRouterIncorrectRoutingType + } + return dht, nil +} + +func (r *CachingRouter) APIRouter() *APIRouter { + return r.apiRouter +} + +func (r *CachingRouter) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) error { + // Write to the tiered router in the background then write to the caching + // router and return + var err error + if err = r.IpfsRouting.PutValue(ctx, key, value, opts...); err != nil { + log.Errorf("ipfs dht put (%s): %s", hex.EncodeToString([]byte(key)), err) + return err + } + if err = r.apiRouter.PutValue(ctx, key, value, opts...); err != nil { + log.Errorf("api cache put (%s): %s", hex.EncodeToString([]byte(key)), err) + } + return err +} + +func (r *CachingRouter) GetValue(ctx context.Context, key string, opts ...ropts.Option) ([]byte, error) { + // First check the DHT router. If it's successful return the value otherwise + // continue on to check the other routers. + val, err := r.IpfsRouting.GetValue(ctx, key, opts...) + if err != nil && len(val) == 0 { + // No values from the DHT, check the API cache + log.Warningf("ipfs dht lookup was empty: %s", err.Error()) + if val, err = r.apiRouter.GetValue(ctx, key, opts...); err != nil && len(val) == 0 { + // No values still, report NotFound + return nil, routing.ErrNotFound + } + } + if err := r.apiRouter.PutValue(ctx, key, val, opts...); err != nil { + log.Errorf("api cache put found dht value (%s): %s", hex.EncodeToString([]byte(key)), err.Error()) + } + return val, nil +} + +func (r *CachingRouter) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { + if dht, ok := r.IpfsRouting.(routing.PubKeyFetcher); ok { + return dht.GetPublicKey(ctx, p) + } + return nil, routing.ErrNotSupported +} + +func (r *CachingRouter) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + // TODO: Restore parallel lookup once validation is properly applied to + // the apiRouter results ensuring it doesn't return invalid records before the + // IpfsRouting object can. For some reason the validation is not being considered + // on returned results. + return r.IpfsRouting.SearchValue(ctx, key, opts...) + //return routinghelpers.Parallel{ + //Routers: []routing.IpfsRouting{ + //r.IpfsRouting, + //r.apiRouter, + //}, + //Validator: r.RecordValidator, + //}.SearchValue(ctx, key, opts...) +} diff --git a/ipfs/cat.go b/ipfs/cat.go index 4b929440a3..c276bc85b7 100644 --- a/ipfs/cat.go +++ b/ipfs/cat.go @@ -2,14 +2,18 @@ package ipfs import ( "context" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "io/ioutil" "strings" "time" + "github.com/go-errors/errors" + + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "github.com/ipfs/go-ipfs/core/coreapi" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" "github.com/ipfs/go-ipfs/core" ) @@ -22,16 +26,25 @@ func Cat(n *core.IpfsNode, path string, timeout time.Duration) ([]byte, error) { if !strings.HasPrefix(path, "/ipfs/") { path = "/ipfs/" + path } - api := coreapi.NewCoreAPI(n) - pth, err := iface.ParsePath(path) + api, err := coreapi.NewCoreAPI(n) + if err != nil { + return nil, err + } + pth, err := coreiface.ParsePath(path) if err != nil { return nil, err } - r, err := api.Unixfs().Get(ctx, pth) + nd, err := api.Unixfs().Get(ctx, pth) if err != nil { return nil, err } + + r, ok := nd.(files.File) + if !ok { + return nil, errors.New("Received incorrect type from Unixfs().Get()") + } + return ioutil.ReadAll(r) } diff --git a/ipfs/config.go b/ipfs/config.go new file mode 100644 index 0000000000..27e6e0f9af --- /dev/null +++ b/ipfs/config.go @@ -0,0 +1,105 @@ +package ipfs + +import ( + "context" + + dht "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + dhtopts "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + bitswap "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + + ipfscore "github.com/ipfs/go-ipfs/core" + "github.com/ipfs/go-ipfs/repo" +) + +var routerCacheURI string + +// UpdateIPFSGlobalProtocolVars is a hack to manage custom protocol strings +// which do not yet have an API to manage their configuration +func UpdateIPFSGlobalProtocolVars(testnetEnable bool) { + if testnetEnable { + bitswap.ProtocolBitswap = IPFSProtocolBitswapTestnetOneDotOne + bitswap.ProtocolBitswapOne = IPFSProtocolBitswapTestnetOne + bitswap.ProtocolBitswapNoVers = IPFSProtocolBitswapTestnetNoVers + } else { + bitswap.ProtocolBitswap = IPFSProtocolBitswapMainnetOneDotOne + bitswap.ProtocolBitswapOne = IPFSProtocolBitswapMainnetOne + bitswap.ProtocolBitswapNoVers = IPFSProtocolBitswapMainnetNoVers + } +} + +// PrepareIPFSConfig builds the configuration options for the internal +// IPFS node. +func PrepareIPFSConfig(r repo.Repo, routerAPIEndpoint string, testEnable, regtestEnable bool) *ipfscore.BuildCfg { + routerCacheURI = routerAPIEndpoint + ncfg := &ipfscore.BuildCfg{ + Repo: r, + Online: true, + ExtraOpts: map[string]bool{ + "mplex": true, + "ipnsps": true, + }, + } + + // regtest and test are never enabled together + ncfg.Routing = constructRouting + if regtestEnable { + ncfg.Routing = constructRegtestRouting + } else if testEnable { + ncfg.Routing = constructTestnetRouting + } + return ncfg +} + +func constructRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { + dhtRouting, err := dht.New( + ctx, host, + dhtopts.Datastore(dstore), + dhtopts.Validator(validator), + dhtopts.Protocols( + IPFSProtocolKademliaMainnetOne, + IPFSProtocolDHTMainnetLegacy, + ), + ) + if err != nil { + return nil, err + } + apiRouter := NewAPIRouter(routerCacheURI, dhtRouting.Validator) + cachingRouter := NewCachingRouter(dhtRouting, &apiRouter) + return cachingRouter, nil +} + +func constructRegtestRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { + return dht.New( + ctx, host, + dhtopts.Datastore(dstore), + dhtopts.Validator(validator), + dhtopts.Protocols( + IPFSProtocolKademliaMainnetOne, + IPFSProtocolDHTMainnetLegacy, + ), + ) +} + +func constructTestnetRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { + var ( + dhtRouting, err = dht.New( + ctx, host, + dhtopts.Datastore(dstore), + dhtopts.Validator(validator), + dhtopts.Protocols( + IPFSProtocolKademliaTestnetOne, + IPFSProtocolAppTestnetOne, + ), + ) + ) + if err != nil { + return nil, err + } + apiRouter := NewAPIRouter(routerCacheURI, dhtRouting.Validator) + cachingRouter := NewCachingRouter(dhtRouting, &apiRouter) + return cachingRouter, nil +} diff --git a/ipfs/constants.go b/ipfs/constants.go new file mode 100644 index 0000000000..0fc2deeb70 --- /dev/null +++ b/ipfs/constants.go @@ -0,0 +1,19 @@ +package ipfs + +const ( + IPFSProtocolAppMainnetOne = "/openbazaar/app/1.0.0" + IPFSProtocolAppTestnetOne = "/openbazaar/app/testnet/1.0.0" + + IPFSProtocolBitswapMainnetNoVers = "/openbazaar/bitswap" + IPFSProtocolBitswapMainnetOne = "/openbazaar/bitswap/1.0.0" + IPFSProtocolBitswapMainnetOneDotOne = "/openbazaar/bitswap/1.1.0" + IPFSProtocolBitswapTestnetNoVers = "/openbazaar/bitswap/testnet" + IPFSProtocolBitswapTestnetOne = "/openbazaar/bitswap/testnet/1.0.0" + IPFSProtocolBitswapTestnetOneDotOne = "/openbazaar/bitswap/testnet/1.1.0" + + IPFSProtocolDHTMainnetLegacy = "/openbazaar/dht" + IPFSProtocolDHTTestnetLegacy = "/openbazaar/dht/testnet" + + IPFSProtocolKademliaMainnetOne = "/openbazaar/kad/1.0.0" + IPFSProtocolKademliaTestnetOne = "/openbazaar/kad/testnet/1.0.0" +) diff --git a/ipfs/dag.go b/ipfs/dag.go index 8482910ccd..b4f37147e3 100644 --- a/ipfs/dag.go +++ b/ipfs/dag.go @@ -2,12 +2,12 @@ package ipfs import ( "context" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "sync" "time" - "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" "github.com/ipfs/go-ipfs/core" ) diff --git a/ipfs/identity.go b/ipfs/identity.go index e8dd1b3078..9555b4697f 100644 --- a/ipfs/identity.go +++ b/ipfs/identity.go @@ -6,17 +6,20 @@ import ( "crypto/sha256" "encoding/base64" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" + "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" ) +func init() { + peer.AdvancedEnableInlining = false +} + // IdentityFromKey returns IPFS peer identity based on private key func IdentityFromKey(privkey []byte) (config.Identity, error) { - ident := config.Identity{} - sk, err := libp2p.UnmarshalPrivateKey(privkey) + sk, err := crypto.UnmarshalPrivateKey(privkey) if err != nil { return ident, err } @@ -39,7 +42,7 @@ func IdentityKeyFromSeed(seed []byte, bits int) ([]byte, error) { hm := hmac.New(sha256.New, []byte("OpenBazaar seed")) hm.Write(seed) reader := bytes.NewReader(hm.Sum(nil)) - sk, _, err := libp2p.GenerateKeyPairWithReader(libp2p.Ed25519, bits, reader) + sk, _, err := crypto.GenerateKeyPairWithReader(crypto.Ed25519, bits, reader) if err != nil { return nil, err } diff --git a/ipfs/identity_test.go b/ipfs/identity_test.go index d7f81be827..5ee14ecccc 100644 --- a/ipfs/identity_test.go +++ b/ipfs/identity_test.go @@ -3,13 +3,13 @@ package ipfs import ( "bytes" "encoding/hex" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "testing" "github.com/tyler-smith/go-bip39" ) -var keyHex = "08011260499228645d120d15b5008b1da0b9dba898df328001ea03c0be84a64c41d205ff1b8339a303cd8cf2945b66c89ac29fa90e79731d67000694284791af404eeb1f1b8339a303cd8cf2945b66c89ac29fa90e79731d67000694284791af404eeb1f" +var keyHex = "08011240499228645d120d15b5008b1da0b9dba898df328001ea03c0be84a64c41d205ff1b8339a303cd8cf2945b66c89ac29fa90e79731d67000694284791af404eeb1f" func TestIdentityFromKey(t *testing.T) { keyBytes, err := hex.DecodeString(keyHex) diff --git a/ipfs/peers.go b/ipfs/peers.go index e4be7457e0..6890f2b42f 100644 --- a/ipfs/peers.go +++ b/ipfs/peers.go @@ -1,7 +1,7 @@ package ipfs import ( - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "github.com/ipfs/go-ipfs/core" ) diff --git a/ipfs/pin.go b/ipfs/pin.go index 54ba84d790..5fea046a4b 100644 --- a/ipfs/pin.go +++ b/ipfs/pin.go @@ -5,13 +5,28 @@ import ( "github.com/ipfs/go-ipfs/core/coreapi" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + "github.com/ipfs/go-ipfs/core" - "github.com/ipfs/go-ipfs/core/corerepo" ) /* Recursively un-pin a directory given its hash. This will allow it to be garbage collected. */ func UnPinDir(n *core.IpfsNode, rootHash string) error { - _, err := corerepo.Unpin(n, coreapi.NewCoreAPI(n), context.Background(), []string{"/ipfs/" + rootHash}, true) - return err + api, err := coreapi.NewCoreAPI(n) + if err != nil { + return err + } + p, err := coreiface.ParsePath("/ipfs/" + rootHash) + if err != nil { + return err + } + + rp, err := api.ResolvePath(context.Background(), p) + if err != nil { + return err + } + + return api.Pin().Rm(context.Background(), rp, options.Pin.RmRecursive(true)) } diff --git a/ipfs/pin_test.go b/ipfs/pin_test.go index d96dcf4212..b320dbefec 100644 --- a/ipfs/pin_test.go +++ b/ipfs/pin_test.go @@ -1,6 +1,7 @@ package ipfs import ( + "os" "path" "testing" @@ -13,7 +14,7 @@ func TestUnPinDir(t *testing.T) { t.Error(err) } - root, err := AddDirectory(n, path.Join("./", "root")) + root, err := AddDirectory(n, path.Join(os.TempDir(), "root")) if err != nil { t.Error(err) } diff --git a/ipfs/plugins.go b/ipfs/plugins.go new file mode 100644 index 0000000000..835da20a2d --- /dev/null +++ b/ipfs/plugins.go @@ -0,0 +1,29 @@ +package ipfs + +import ( + "github.com/ipfs/go-ipfs/plugin/loader" + "sync" +) + +var pluginOnce sync.Once + +// InstallDatabasePlugins installs the default database plugins +// used by openbazaar-go. This function is guarded by a sync.Once +// so it isn't accidentally called more than once. +func InstallDatabasePlugins() { + pluginOnce.Do(func() { + loader, err := loader.NewPluginLoader("") + if err != nil { + panic(err) + } + err = loader.Initialize() + if err != nil { + panic(err) + } + + err = loader.Inject() + if err != nil { + panic(err) + } + }) +} diff --git a/ipfs/pointers.go b/ipfs/pointers.go index 05ea1eda3b..4c0a78e1b1 100644 --- a/ipfs/pointers.go +++ b/ipfs/pointers.go @@ -6,13 +6,13 @@ import ( "encoding/binary" "encoding/hex" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - routing "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - dhtpb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + routing "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + dhtpb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "sync" "time" diff --git a/ipfs/pointers_test.go b/ipfs/pointers_test.go index e3993d5987..841f96c166 100644 --- a/ipfs/pointers_test.go +++ b/ipfs/pointers_test.go @@ -1,7 +1,7 @@ package ipfs import ( - "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "testing" ) diff --git a/ipfs/publish.go b/ipfs/publish.go index fe45801b4c..161135b1c4 100644 --- a/ipfs/publish.go +++ b/ipfs/publish.go @@ -4,7 +4,7 @@ import ( "context" "errors" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" "github.com/ipfs/go-ipfs/core" diff --git a/ipfs/pubsub.go b/ipfs/pubsub.go index 06b47ceeee..b17fefbe73 100644 --- a/ipfs/pubsub.go +++ b/ipfs/pubsub.go @@ -4,13 +4,13 @@ import ( "context" "errors" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - pubsub "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" "sync" "time" diff --git a/ipfs/query.go b/ipfs/query.go index efc47e2c87..f5cbe6ad38 100644 --- a/ipfs/query.go +++ b/ipfs/query.go @@ -3,8 +3,8 @@ package ipfs import ( "context" - routing "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + routing "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // Query returns the closest peers known for peerID diff --git a/ipfs/resolve.go b/ipfs/resolve.go index 1dc55b4dc9..09ef4c1aaf 100644 --- a/ipfs/resolve.go +++ b/ipfs/resolve.go @@ -2,18 +2,24 @@ package ipfs import ( "context" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "time" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ipnspb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/namesys" - nameopts "github.com/ipfs/go-ipfs/namesys/opts" + nameopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" +) + +const ( + persistentCacheDbPrefix = "/ipns/persistentcache/" ) // Resolve an IPNS record. This is a multi-step process. @@ -36,8 +42,10 @@ func Resolve(n *core.IpfsNode, p peer.ID, timeout time.Duration, quorum uint, us if err != nil { return } - if err := putToDatastore(n.Repo.Datastore(), p, pth); err != nil { - log.Error("Error putting IPNS record to datastore: %s", err.Error()) + if n.Identity != p { + if err := putToDatastoreCache(n.Repo.Datastore(), p, pth); err != nil { + log.Error("Error putting IPNS record to datastore: %s", err.Error()) + } } }() return pth.Segments()[1], nil @@ -53,8 +61,10 @@ func Resolve(n *core.IpfsNode, p peer.ID, timeout time.Duration, quorum uint, us return pth.Segments()[1], nil } // Resolving succeeded. Update the cache. - if err := putToDatastore(n.Repo.Datastore(), p, pth); err != nil { - log.Error("Error putting IPNS record to datastore: %s", err.Error()) + if n.Identity != p { + if err := putToDatastoreCache(n.Repo.Datastore(), p, pth); err != nil { + log.Error("Error putting IPNS record to datastore: %s", err.Error()) + } } return pth.Segments()[1], nil } @@ -83,18 +93,36 @@ func ResolveAltRoot(n *core.IpfsNode, p peer.ID, altRoot string, timeout time.Du return pth.Segments()[1], nil } +// getFromDatastore looks in two places in the database for a record. First is +// under the /ipfs/ key which is sometimes used by the DHT. The value +// returned by this location is a serialized protobuf record. The second is +// under /ipfs/persistentcache/ which returns only the value (the path) +// inside the protobuf record. func getFromDatastore(datastore ds.Datastore, p peer.ID) (ipath.Path, error) { - // resolve to what we may already have in the datastore - data, err := datastore.Get(namesys.IpnsDsKey(p)) + ival, err := datastore.Get(namesys.IpnsDsKey(p)) if err != nil { - if err == ds.ErrNotFound { - return "", namesys.ErrResolveFailed + pth, err := datastore.Get(ipnsCacheDsKey(p)) + if err != nil { + if err == ds.ErrNotFound { + return "", namesys.ErrResolveFailed + } + return "", err } + return ipath.ParsePath(string(pth)) + } + + rec := new(ipnspb.IpnsEntry) + err = proto.Unmarshal(ival, rec) + if err != nil { return "", err } - return ipath.ParsePath(string(data)) + return ipath.ParsePath(string(rec.Value)) +} + +func putToDatastoreCache(datastore ds.Datastore, p peer.ID, pth ipath.Path) error { + return datastore.Put(ipnsCacheDsKey(p), []byte(pth.String())) } -func putToDatastore(datastore ds.Datastore, p peer.ID, pth ipath.Path) error { - return datastore.Put(namesys.IpnsDsKey(p), []byte(pth.String())) +func ipnsCacheDsKey(id peer.ID) ds.Key { + return ds.NewKey(persistentCacheDbPrefix + base32.RawStdEncoding.EncodeToString([]byte(id))) } diff --git a/ipfs/resolve_test.go b/ipfs/resolve_test.go new file mode 100644 index 0000000000..3270d8ed2e --- /dev/null +++ b/ipfs/resolve_test.go @@ -0,0 +1,79 @@ +package ipfs + +import ( + "github.com/ipfs/go-ipfs/core/mock" + "github.com/ipfs/go-ipfs/namesys" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ipnspb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + "testing" +) + +// TestDatastoreCaching tests that the data can be inserted and retrieved from the +// database using the IPNS namespace as well as our persistent cache namespace and +// that the two do not conflict with each other. +func TestDatastoreCaching(t *testing.T) { + n, err := coremock.NewMockNode() + if err != nil { + t.Error(err) + } + var ( + pth = "/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h" + rec = &ipnspb.IpnsEntry{Value: []byte(pth), Signature: []byte{}} + peerIDStr = "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB" + ) + + peerID, err := peer.IDB58Decode(peerIDStr) + if err != nil { + t.Fatal(err) + } + + // First put to db using the IPNS namespace. + serializedRecord, err := proto.Marshal(rec) + if err != nil { + t.Fatal(err) + } + + if err := n.Repo.Datastore().Put(namesys.IpnsDsKey(peerID), serializedRecord); err != nil { + t.Fatal(err) + } + + retreivedPath, err := getFromDatastore(n.Repo.Datastore(), peerID) + if err != nil { + t.Error(err) + } + + if retreivedPath.String() != pth { + t.Errorf("Retreived incorrect value. Expected %s, got %s", pth, retreivedPath.String()) + } + + // Next put to the database using the persistent cache namespace. + if err := putToDatastoreCache(n.Repo.Datastore(), peerID, ipath.Path(pth)); err != nil { + t.Fatal(err) + } + + retreivedPath, err = getFromDatastore(n.Repo.Datastore(), peerID) + if err != nil { + t.Error(err) + } + + if retreivedPath.String() != pth { + t.Errorf("Retreived incorrect value. Expected %s, got %s", pth, retreivedPath.String()) + } + + // Test the persistent cache put did not override the IPNS namespace. + ival, err := n.Repo.Datastore().Get(namesys.IpnsDsKey(peerID)) + if err != nil { + t.Fatal(err) + } + + rec2 := new(ipnspb.IpnsEntry) + err = proto.Unmarshal(ival, rec2) + if err != nil { + t.Error(err) + } + if string(rec2.Value) != pth { + t.Errorf("Retreived incorrect value. Expected %s, got %s", pth, string(rec2.Value)) + } +} diff --git a/mobile/cmd/main.go b/mobile/cmd/main.go index 3ce3d60c33..f7e50d2310 100644 --- a/mobile/cmd/main.go +++ b/mobile/cmd/main.go @@ -10,7 +10,8 @@ import ( ) type Options struct { - Datadir string `short:"d" long:"data" description:"location of openbazaar datastore"` + TestnetEnabled bool `short:"t" long:"testnet" description:"use testnet protocol and wallet endpoints"` + Datadir string `short:"d" long:"data" description:"location of openbazaar datastore"` } var ( @@ -26,16 +27,17 @@ func main() { } fmt.Printf("error parsing options: %s\n", err.Error()) os.Exit(1) - } else { - if options.Datadir != "" { - dataPath = options.Datadir - } + } + + if options.Datadir != "" { + dataPath = options.Datadir } var ( wg sync.WaitGroup n, err = mobile.NewNodeWithConfig(&mobile.NodeConfig{ RepoPath: dataPath, + Testnet: options.TestnetEnabled, }, "", "") ) if err != nil { diff --git a/mobile/node.go b/mobile/node.go index 732f3f51be..140f02ea8a 100644 --- a/mobile/node.go +++ b/mobile/node.go @@ -4,17 +4,17 @@ import ( "context" "errors" "fmt" - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - dhtopts "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - routinghelpers "gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + "gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" "io/ioutil" "net/http" "os" @@ -22,9 +22,8 @@ import ( "path/filepath" "time" - bitswap "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - ipfsconfig "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - ipnspb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" + ipfsconfig "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + ipnspb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" wi "github.com/OpenBazaar/wallet-interface" "github.com/btcsuite/btcd/chaincfg" @@ -46,6 +45,7 @@ import ( "github.com/phoreproject/openbazaar-go/repo" "github.com/phoreproject/openbazaar-go/repo/db" "github.com/phoreproject/openbazaar-go/repo/migrations" + "github.com/phoreproject/openbazaar-go/schema" apiSchema "github.com/phoreproject/openbazaar-go/schema" "github.com/phoreproject/openbazaar-go/storage/selfhosted" "github.com/phoreproject/openbazaar-go/wallet" @@ -86,7 +86,6 @@ func NewNode(repoPath string, authenticationToken string, testnet bool, userAgen // NewNodeWithConfig create a new node using the configuration file from NewNode() func NewNodeWithConfig(config *NodeConfig, password string, mnemonic string) (*Node, error) { - ipfscore.DHTOption = constructClientDHTRouting // Lockfile repoLockFile := filepath.Join(config.RepoPath, fsrepo.LockFile) os.Remove(repoLockFile) @@ -160,27 +159,16 @@ func NewNodeWithConfig(config *NodeConfig, password string, mnemonic string) (*N // Setup testnet if config.Testnet { + // set testnet bootstrap addrs testnetBootstrapAddrs, err := apiSchema.GetTestnetBootstrapAddrs(configFile) if err != nil { + log.Error(err) return nil, err } cfg.Bootstrap = testnetBootstrapAddrs - dhtopts.ProtocolDHT = "/openbazaar/kad/testnet/1.0.0" - bitswap.ProtocolBitswap = "/openbazaar/bitswap/testnet/1.1.0" - service.ProtocolOpenBazaar = "/openbazaar/app/testnet/1.0.0" + // don't use pushnodes on testnet dataSharing.PushTo = []string{} - } else { - bitswap.ProtocolBitswap = "/openbazaar/bitswap/1.1.0" - } - - ncfg := &ipfscore.BuildCfg{ - Repo: r, - Online: true, - ExtraOpts: map[string]bool{ - "mplex": true, - "ipnsps": true, - }, } // Mnemonic @@ -253,16 +241,36 @@ func NewNodeWithConfig(config *NodeConfig, password string, mnemonic string) (*N RepoPath: config.RepoPath, UserAgent: core.USERAGENT, IPNSQuorumSize: uint(ipnsExtraConfig.DHTQuorumSize), - IPNSBackupAPI: ipnsExtraConfig.FallbackAPI, } if len(cfg.Addresses.Gateway) <= 0 { return nil, errors.New("no gateway addresses configured") } + // override with mobile routing config + ignoredURI := "" + ncfg := ipfs.PrepareIPFSConfig(r, ignoredURI, config.Testnet, config.Testnet) + ncfg.Routing = constructMobileRouting + return &Node{OpenBazaarNode: core.Node, config: *config, ipfsConfig: ncfg, apiConfig: apiConfig}, nil } +func constructMobileRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { + dhtRouting, err := dht.New( + ctx, host, + dhtopts.Client(true), + dhtopts.Datastore(dstore), + dhtopts.Validator(validator), + ) + if err != nil { + return nil, err + } + apiRouter := ipfs.NewAPIRouter(schema.IPFSCachingRouterDefaultURI, dhtRouting.Validator) + apiRouter.Start(nil) + cachingRouter := ipfs.NewCachingRouter(dhtRouting, &apiRouter) + return cachingRouter, nil +} + // startIPFSNode start the node func (n *Node) startIPFSNode(repoPath string, config *ipfscore.BuildCfg) (*ipfscore.IpfsNode, commands.Context, error) { cctx, cancel := context.WithCancel(context.Background()) @@ -299,8 +307,11 @@ func (n *Node) Start() error { } var dhtRouting *dht.IpfsDHT for _, router := range tiered.Routers { - if _, ok := router.(*dht.IpfsDHT); ok { - dhtRouting = router.(*dht.IpfsDHT) + if r, ok := router.(*ipfs.CachingRouter); ok { + dhtRouting, err = r.DHT() + if err != nil { + return err + } } } if dhtRouting == nil { @@ -473,13 +484,3 @@ func newHTTPGateway(node *core.OpenBazaarNode, ctx commands.Context, authCookie // Create and return an API gateway return api.NewGateway(node, authCookie, manet.NetListener(gwLis), config, logger, opts...) } - -// constructClientDHTRouting create DHT routing -func constructClientDHTRouting(ctx context.Context, host p2phost.Host, dstore ds.Batching, validator record.Validator) (routing.IpfsRouting, error) { - return dht.New( - ctx, host, - dhtopts.Client(true), - dhtopts.Datastore(dstore), - dhtopts.Validator(validator), - ) -} diff --git a/net/ban_manager.go b/net/ban_manager.go index 14d8cc17a4..7e7b7550cb 100644 --- a/net/ban_manager.go +++ b/net/ban_manager.go @@ -1,7 +1,7 @@ package net import ( - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "sync" ) diff --git a/net/encryption.go b/net/encryption.go index 821ca5fce0..f28997ced5 100644 --- a/net/encryption.go +++ b/net/encryption.go @@ -8,9 +8,12 @@ import ( "crypto/sha256" "encoding/binary" "errors" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + "fmt" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "io" + extra "github.com/agl/ed25519/extra25519" + "golang.org/x/crypto/hkdf" "golang.org/x/crypto/nacl/box" ) @@ -77,7 +80,13 @@ func encryptCurve25519(pubKey *libp2p.Ed25519PublicKey, plaintext []byte) ([]byt return nil, err } // Convert recipient's key into curve25519 - pk, err := pubKey.ToCurve25519() + rawBytes, err := pubKey.Raw() + if err != nil { + return nil, err + } + var raw [32]byte + copy(raw[:], rawBytes) + pk, err := pubkeyToCurve25519(raw) if err != nil { return nil, err } @@ -90,9 +99,7 @@ func encryptCurve25519(pubKey *libp2p.Ed25519PublicKey, plaintext []byte) ([]byt if err != nil { return nil, err } - for i := 0; i < 24; i++ { - nonce[i] = n[i] - } + copy(nonce[:], n) ciphertext = box.Seal(ciphertext, plaintext, &nonce, pk, ephemPriv) // Prepend the ephemeral public key @@ -177,7 +184,13 @@ func Decrypt(privKey libp2p.PrivKey, ciphertext []byte) ([]byte, error) { } func decryptCurve25519(privKey *libp2p.Ed25519PrivateKey, ciphertext []byte) ([]byte, error) { - curve25519Privkey := privKey.ToCurve25519() + rawBytes, err := privKey.Raw() + if err != nil { + return nil, err + } + var raw [64]byte + copy(raw[:], rawBytes) + curve25519Privkey := privkeyToCurve25519(raw) var plaintext []byte n := ciphertext[:NonceBytes] @@ -185,14 +198,10 @@ func decryptCurve25519(privKey *libp2p.Ed25519PrivateKey, ciphertext []byte) ([] ct := ciphertext[NonceBytes+EphemeralPublicKeyBytes:] var ephemPubkey [32]byte - for i := 0; i < 32; i++ { - ephemPubkey[i] = ephemPubkeyBytes[i] - } + copy(ephemPubkey[:], ephemPubkeyBytes) var nonce [24]byte - for i := 0; i < 24; i++ { - nonce[i] = n[i] - } + copy(nonce[:], n) plaintext, success := box.Open(plaintext, ct, &nonce, &ephemPubkey, curve25519Privkey) if !success { @@ -255,3 +264,18 @@ func decryptRSA(privKey *libp2p.RsaPrivateKey, ciphertext []byte) ([]byte, error plaintext := ciphertext return plaintext, nil } + +func privkeyToCurve25519(sk [64]byte) *[32]byte { + var skNew [32]byte + extra.PrivateKeyToCurve25519(&skNew, &sk) + return &skNew +} + +func pubkeyToCurve25519(pk [32]byte) (*[32]byte, error) { + var pkNew [32]byte + success := extra.PublicKeyToCurve25519(&pkNew, &pk) + if !success { + return nil, fmt.Errorf("error converting ed25519 pubkey to curve25519 pubkey") + } + return &pkNew, nil +} diff --git a/net/encryption_test.go b/net/encryption_test.go index d950f7af7c..d6f7b158cf 100644 --- a/net/encryption_test.go +++ b/net/encryption_test.go @@ -3,7 +3,7 @@ package net import ( "crypto/rsa" "encoding/hex" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "testing" ) diff --git a/net/networkservice.go b/net/networkservice.go index 433dbd1d7b..452f86baee 100644 --- a/net/networkservice.go +++ b/net/networkservice.go @@ -4,8 +4,8 @@ import ( "context" "errors" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "github.com/phoreproject/openbazaar-go/pb" ) diff --git a/net/repointer/repointer.go b/net/repointer/repointer.go index f9b8cad4ce..5306b2e800 100644 --- a/net/repointer/repointer.go +++ b/net/repointer/repointer.go @@ -1,8 +1,8 @@ package net import ( - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "time" "github.com/op/go-logging" diff --git a/net/retriever/retriever.go b/net/retriever/retriever.go index 180028d544..6ea2d73470 100644 --- a/net/retriever/retriever.go +++ b/net/retriever/retriever.go @@ -4,14 +4,14 @@ import ( "context" "errors" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - routing "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + routing "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "io/ioutil" gonet "net" diff --git a/net/service/handlers.go b/net/service/handlers.go index aaa27a22ae..2dc75698d1 100644 --- a/net/service/handlers.go +++ b/net/service/handlers.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - libp2p "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" "strconv" "time" @@ -1311,10 +1311,6 @@ func (service *OpenBazaarService) handleModeratorAdd(pid peer.ID, pmes *pb.Messa if err != nil { return nil, err } - n := repo.ModeratorAddNotification{repo.NewNotificationID(), "moderatorAdd", id.Pretty()} - service.broadcast <- n - - service.datastore.Notifications().PutRecord(repo.NewNotification(n, time.Now(), false)) log.Debugf("Received MODERATOR_ADD message from %s", id.Pretty()) return nil, nil @@ -1356,10 +1352,6 @@ func (service *OpenBazaarService) handleModeratorRemove(pid peer.ID, pmes *pb.Me if err != nil { return nil, err } - n := repo.ModeratorRemoveNotification{repo.NewNotificationID(), "moderatorRemove", id.Pretty()} - service.broadcast <- n - - service.datastore.Notifications().PutRecord(repo.NewNotification(n, time.Now(), false)) log.Debugf("Received MODERATOR_REMOVE message from %s", id.Pretty()) return nil, nil diff --git a/net/service/messagesender.go b/net/service/messagesender.go index 064cbde5f8..37c2b0a5dd 100644 --- a/net/service/messagesender.go +++ b/net/service/messagesender.go @@ -3,13 +3,14 @@ package service import ( "context" "fmt" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" "math/rand" "sync" "time" + "github.com/phoreproject/openbazaar-go/ipfs" "github.com/phoreproject/openbazaar-go/pb" ) @@ -102,7 +103,7 @@ func (ms *messageSender) prep() error { return nil } - nstr, err := ms.service.host.NewStream(ms.service.ctx, ms.p, ProtocolOpenBazaar) + nstr, err := ms.service.host.NewStream(ms.service.ctx, ms.p, ipfs.IPFSProtocolAppMainnetOne) if err != nil { return err } diff --git a/net/service/service.go b/net/service/service.go index 291dc7d6f4..2bda57cb83 100644 --- a/net/service/service.go +++ b/net/service/service.go @@ -4,12 +4,12 @@ import ( "context" "errors" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" "io" "sync" @@ -18,14 +18,13 @@ import ( ctxio "github.com/jbenet/go-context/io" "github.com/op/go-logging" "github.com/phoreproject/openbazaar-go/core" + "github.com/phoreproject/openbazaar-go/ipfs" "github.com/phoreproject/openbazaar-go/pb" "github.com/phoreproject/openbazaar-go/repo" ) var log = logging.MustGetLogger("service") -var ProtocolOpenBazaar protocol.ID = "/openbazaar/app/1.0.0" - type OpenBazaarService struct { host host.Host self peer.ID @@ -49,8 +48,8 @@ func New(node *core.OpenBazaarNode, datastore repo.Datastore) *OpenBazaarService node: node, sender: make(map[peer.ID]*messageSender), } - node.IpfsNode.PeerHost.SetStreamHandler(ProtocolOpenBazaar, service.HandleNewStream) - log.Infof("OpenBazaar service running at %s", ProtocolOpenBazaar) + node.IpfsNode.PeerHost.SetStreamHandler(protocol.ID(ipfs.IPFSProtocolAppMainnetOne), service.HandleNewStream) + log.Infof("OpenBazaar service running at %s", ipfs.IPFSProtocolAppMainnetOne) return service } diff --git a/openbazaard.go b/openbazaard.go index 3c5996777c..b1c5b308bb 100644 --- a/openbazaard.go +++ b/openbazaard.go @@ -19,13 +19,6 @@ type Opts struct { Version bool `short:"v" long:"version" description:"Print the version number and exit"` } -type Stop struct{} - -type Restart struct{} - -var stopServer Stop -var restartServer Restart - var opts Opts var parser = flags.NewParser(&opts, flags.Default) @@ -75,14 +68,6 @@ func main() { "start the OpenBazaar-Server", "The start command starts the OpenBazaar-Server", &cmd.Start{}) - parser.AddCommand("stop", - "shutdown the server and disconnect", - "The stop command disconnects from peers and shuts down OpenBazaar-Server", - &stopServer) - parser.AddCommand("restart", - "restart the server", - "The restart command shuts down the server and restarts", - &restartServer) parser.AddCommand("encryptdatabase", "encrypt your database", "This command encrypts the database containing your bitcoin private keys, identity key, and contracts", diff --git a/package.json b/package.json index b252611a18..42b40f4f41 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,11 @@ { "name": "openbazaar-go", - "author": "phore ", - "version": "0.13.1", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "author": "Phore Blockchain Company", + "version": "0.13.4", "language": "english", "license": "", "bugs": { - "url": "https://github.com/phoreproject/openbazaar-go" + "url": "https://github.com/phoreproject/openbazaar-go/issues/new" }, "gxVersion": "0.11.0" } diff --git a/qa/smtp_notification.py b/qa/smtp_notification.py index 004d288fb2..d6344f82fd 100644 --- a/qa/smtp_notification.py +++ b/qa/smtp_notification.py @@ -143,7 +143,7 @@ def run_test(self): Order ID: QmNiPgKNq27qQE8fRxMbtDfRcFDEYMH5wDRgdqtqoWBpGg Buyer: Qmd5qDpcYkHCmkj9pMXU9TKBqEDWgEmtoHD5xjdJgumaHg -Thumbnail: QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt +Thumbnail: QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847 Timestamp: 1487699826 ''' expected_lines = [e for e in expected.splitlines() if not e.startswith('Timestamp:') and not e.startswith('Order ID:')] diff --git a/qa/testdata/digital.json b/qa/testdata/digital.json index df26008ef6..8f539ec431 100644 --- a/qa/testdata/digital.json +++ b/qa/testdata/digital.json @@ -18,10 +18,10 @@ ], "images": [ { - "tiny": "QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR", - "small": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "medium": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "large": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", + "tiny": "QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs", + "small": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "medium": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "large": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", "original": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", "filename": "citizenfour.jpg" } diff --git a/qa/testdata/listing.json b/qa/testdata/listing.json index cb7ed32d68..1c022fb912 100644 --- a/qa/testdata/listing.json +++ b/qa/testdata/listing.json @@ -20,10 +20,10 @@ ], "images": [ { - "tiny": "QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR", - "small": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "medium": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "large": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", + "tiny": "QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs", + "small": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "medium": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "large": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", "original": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", "filename": "swanson.jpg" } @@ -41,10 +41,10 @@ { "name": "Small", "image": { - "tiny": "QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR", - "small": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "medium": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "large": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", + "tiny": "QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs", + "small": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "medium": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "large": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", "original": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", "filename": "swanson.jpg" } diff --git a/qa/testdata/listing_crypto.json b/qa/testdata/listing_crypto.json index ba2f8c45ea..d455c62309 100644 --- a/qa/testdata/listing_crypto.json +++ b/qa/testdata/listing_crypto.json @@ -14,10 +14,10 @@ "processingTime": "1 to 2 hours", "price": 0, "images": [{ - "tiny": "QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR", - "small": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "medium": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "large": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", + "tiny": "QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs", + "small": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "medium": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "large": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", "original": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", "filename": "ether.jpg" }], diff --git a/repo/datastore.go b/repo/datastore.go index 01f1151f43..4fa9412b39 100644 --- a/repo/datastore.go +++ b/repo/datastore.go @@ -3,7 +3,7 @@ package repo import ( "database/sql" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "time" "github.com/OpenBazaar/wallet-interface" diff --git a/repo/db/pointers.go b/repo/db/pointers.go index 76ed0b3e2f..9854730a01 100644 --- a/repo/db/pointers.go +++ b/repo/db/pointers.go @@ -3,10 +3,10 @@ package db import ( "database/sql" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" "strconv" "sync" diff --git a/repo/db/pointers_test.go b/repo/db/pointers_test.go index 11404a9503..4d8bf96301 100644 --- a/repo/db/pointers_test.go +++ b/repo/db/pointers_test.go @@ -3,11 +3,11 @@ package db_test import ( "crypto/rand" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - multihash "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ps "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ps "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + multihash "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "sync" "testing" diff --git a/repo/init.go b/repo/init.go index 63fdabbc05..7bd4c3709c 100644 --- a/repo/init.go +++ b/repo/init.go @@ -20,11 +20,15 @@ import ( "github.com/tyler-smith/go-bip39" ) -const RepoVersion = "21" +const RepoVersion = "23" var log = logging.MustGetLogger("repo") var ErrRepoExists = errors.New("IPFS configuration file exists. Reinitializing would overwrite your keys. Use -f to force overwrite.") +func init() { + ipfs.InstallDatabasePlugins() +} + func DoInit(repoRoot string, nBitsForKeypair int, testnet bool, password string, mnemonic string, creationDate time.Time, dbInit func(string, []byte, string, time.Time) error) error { nodeSchema, err := schema.NewCustomSchemaManager(schema.SchemaContext{ DataPath: repoRoot, @@ -139,10 +143,14 @@ func checkWriteable(dir string) error { } func initializeIpnsKeyspace(repoRoot string, privKeyBytes []byte) error { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + r, err := fsrepo.Open(repoRoot) if err != nil { // NB: repo is owned by the node return err } + cfg, err := r.Config() if err != nil { log.Error(err) @@ -154,18 +162,13 @@ func initializeIpnsKeyspace(repoRoot string, privKeyBytes []byte) error { } cfg.Identity = identity - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + nd, err := core.NewNode(ctx, &core.BuildCfg{Repo: r}) if err != nil { return err } defer nd.Close() - err = nd.SetupOfflineRouting() - if err != nil { - return err - } return namesys.InitializeKeyspace(ctx, nd.Namesys, nd.Pinning, nd.PrivateKey) } @@ -187,7 +190,7 @@ func addConfigExtensions(repoRoot string) error { } ie = schema.IpnsExtraConfig{ DHTQuorumSize: 1, - FallbackAPI: "https://gateway.ob1.io", + APIRouter: schema.IPFSCachingRouterDefaultURI, } t = schema.TorConfig{} diff --git a/repo/init_test.go b/repo/init_test.go index 9e1ababd65..03ea0ce4c6 100644 --- a/repo/init_test.go +++ b/repo/init_test.go @@ -57,7 +57,6 @@ func TestDoInit(t *testing.T) { if err = paths.BuildSchemaDirectories(); err != nil { t.Fatal(err) } - // Running DoInit on an empty, writable folder if err = os.Chmod(paths.DataPath(), 0755); err != nil { t.Fatal(err) diff --git a/repo/ipfs_keystore.go b/repo/ipfs_keystore.go index 25f77ad27a..aa60863529 100644 --- a/repo/ipfs_keystore.go +++ b/repo/ipfs_keystore.go @@ -1,7 +1,7 @@ package repo import ( - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "sync" "time" diff --git a/repo/migration.go b/repo/migration.go index 4545ada42a..d11fb8cae0 100644 --- a/repo/migration.go +++ b/repo/migration.go @@ -41,6 +41,8 @@ var ( migrations.Migration018{}, migrations.Migration019{}, migrations.Migration020{}, + migrations.Migration021{}, + migrations.Migration022{}, } ) diff --git a/repo/migrations/Migration008_test.go b/repo/migrations/Migration008_test.go index c20a71a731..5e9287fbd0 100644 --- a/repo/migrations/Migration008_test.go +++ b/repo/migrations/Migration008_test.go @@ -78,62 +78,65 @@ func TestMigration008(t *testing.T) { //nolint _, err = db.Exec(dbSetupSql, - caseID, // dispute case id - migrations.Migration008_OrderState_PENDING, // order state int - 0, // dispute read bool - int(executedAt.Unix()), // dispute timestamp - 0, // dispute buyerOpened bool - "claimtext", // dispute claim text - "", // dispute buyerPayoutAddres - "", // dispute vendorPayoutAddres - 0, // lastNotifiedAt unix timestamp - purchaseID, // purchase order id - "", // purchase contract blob + caseID, // dispute case id + migrations.Migration008_OrderState_PENDING, // order state int + 0, // dispute read bool + int(executedAt.Unix()), // dispute timestamp + 0, // dispute buyerOpened bool + "claimtext", // dispute claim text + "", // dispute buyerPayoutAddres + "", // dispute vendorPayoutAddres + 0, // lastNotifiedAt unix timestamp + + purchaseID, // purchase order id + "", // purchase contract blob migrations.Migration008_OrderState_AWAITING_PAYMENT, // order state int - 0, // purchase read bool - int(executedAt.Unix()), // purchase timestamp - int(0), // purchase total int - "thumbnailHash", // purchase thumbnail text - "QmVendorPeerID", // purchase vendorID text - "vendor handle", // purchase vendor handle text - "An Item Title", // purchase item title - "shipping name", // purchase shippingName text - "shippingAddress", // purchase shippingAddress text - "paymentAddress", // purchase paymentAddr text - 0, // purchase funded bool - 0, // lastNotifiedAt unix timestamp - disputedPurchaseID, // purchase order id - disputedPurchaseContractData, // purchase contract blob - migrations.Migration008_OrderState_DISPUTED, // order state int - 0, // purchase read bool - int(executedAt.Unix()), // purchase timestamp - int(0), // purchase total int - "thumbnailHash", // purchase thumbnail text - "QmVendorPeerID", // purchase vendorID text - "vendor handle", // purchase vendor handle text - "An Item Title", // purchase item title - "shipping name", // purchase shippingName text - "shippingAddress", // purchase shippingAddress text - "paymentAddress", // purchase paymentAddr text - 0, // purchase funded bool - 0, // lastNotifiedAt unix timestamp - saleID, // sale order id - "", // sale contract blob + 0, // purchase read bool + int(executedAt.Unix()), // purchase timestamp + int(0), // purchase total int + "thumbnailHash", // purchase thumbnail text + "QmVendorPeerID", // purchase vendorID text + "vendor handle", // purchase vendor handle text + "An Item Title", // purchase item title + "shipping name", // purchase shippingName text + "shippingAddress", // purchase shippingAddress text + "paymentAddress", // purchase paymentAddr text + 0, // purchase funded bool + 0, // lastNotifiedAt unix timestamp + + disputedPurchaseID, // purchase order id + disputedPurchaseContractData, // purchase contract blob + migrations.Migration008_OrderState_DISPUTED, // order state int + 0, // purchase read bool + int(executedAt.Unix()), // purchase timestamp + int(0), // purchase total int + "thumbnailHash", // purchase thumbnail text + "QmVendorPeerID", // purchase vendorID text + "vendor handle", // purchase vendor handle text + "An Item Title", // purchase item title + "shipping name", // purchase shippingName text + "shippingAddress", // purchase shippingAddress text + "paymentAddress", // purchase paymentAddr text + 0, // purchase funded bool + 0, // lastNotifiedAt unix timestamp + + saleID, // sale order id + "", // sale contract blob migrations.Migration008_OrderState_AWAITING_PAYMENT, // order state int - 0, // purchase read bool - 0, // sale read bool - int(executedAt.Unix()), // sale timestamp - int(0), // sale total int - "thumbnailHash", // sale thumbnail text - "QmBuyerPeerID", // sale buyerID text - "buyer handle", // sale buyer handle text - "An Item Title", // sale item title - "shipping name", // sale shippingName text - "shippingAddress", // sale shippingAddress text - "paymentAddress", // sale paymentAddr text - 0, // sale funded bool - 0, // sale needsSync bool - 0, // lastNotifiedAt unix timestamp + 0, // purchase read bool + 0, // sale read bool + int(executedAt.Unix()), // sale timestamp + int(0), // sale total int + "thumbnailHash", // sale thumbnail text + "QmBuyerPeerID", // sale buyerID text + "buyer handle", // sale buyer handle text + "An Item Title", // sale item title + "shipping name", // sale shippingName text + "shippingAddress", // sale shippingAddress text + "paymentAddress", // sale paymentAddr text + 0, // sale funded bool + 0, // sale needsSync bool + 0, // lastNotifiedAt unix timestamp ) if err != nil { t.Fatal(err) diff --git a/repo/migrations/Migration012.go b/repo/migrations/Migration012.go index 63e2d1e731..b1176a3336 100644 --- a/repo/migrations/Migration012.go +++ b/repo/migrations/Migration012.go @@ -3,7 +3,7 @@ package migrations import ( "context" "encoding/json" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "io/ioutil" "os" "path" diff --git a/repo/migrations/Migration012_test.go b/repo/migrations/Migration012_test.go index 7ebbd12b04..b11c3fbb18 100644 --- a/repo/migrations/Migration012_test.go +++ b/repo/migrations/Migration012_test.go @@ -5,8 +5,8 @@ import ( "encoding/json" "errors" "fmt" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "io/ioutil" "os" "path" diff --git a/repo/migrations/Migration019.go b/repo/migrations/Migration019.go index a97911506e..8b25a11f00 100644 --- a/repo/migrations/Migration019.go +++ b/repo/migrations/Migration019.go @@ -3,16 +3,15 @@ package migrations import ( "encoding/json" "fmt" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" "io/ioutil" "os" "path" - "path/filepath" "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core/coreunix" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" coremock "github.com/ipfs/go-ipfs/core/mock" ) @@ -136,7 +135,7 @@ func getHashOfFile(n *core.IpfsNode, root string) (rootHash string, err error) { return "", err } - f, err := files.NewSerialFile(filepath.Base(root), root, false, stat) + f, err := files.NewSerialFile(root, false, stat) if err != nil { return "", err } diff --git a/repo/migrations/Migration020.go b/repo/migrations/Migration020.go index 770337f78e..8d4d5002cf 100644 --- a/repo/migrations/Migration020.go +++ b/repo/migrations/Migration020.go @@ -8,12 +8,12 @@ import ( "github.com/phoreproject/openbazaar-go/ipfs" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" "github.com/ipfs/go-ipfs/repo" diff --git a/repo/migrations/Migration020_test.go b/repo/migrations/Migration020_test.go index 8f09183495..4ab92a2c0c 100644 --- a/repo/migrations/Migration020_test.go +++ b/repo/migrations/Migration020_test.go @@ -3,16 +3,16 @@ package migrations_test import ( "encoding/hex" "encoding/json" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" "io/ioutil" "os" "testing" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" "github.com/phoreproject/openbazaar-go/ipfs" "github.com/phoreproject/openbazaar-go/repo/migrations" diff --git a/repo/migrations/Migration021.go b/repo/migrations/Migration021.go new file mode 100644 index 0000000000..355f563fe3 --- /dev/null +++ b/repo/migrations/Migration021.go @@ -0,0 +1,97 @@ +package migrations + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path" +) + +// Migration021 migrates the config file to set the Swarm: EnableAutoRelay option +// to true. +type Migration021 struct{} + +func (Migration021) Up(repoPath, dbPassword string, testnet bool) error { + var ( + configMap = map[string]interface{}{} + configBytes, err = ioutil.ReadFile(path.Join(repoPath, "config")) + ) + if err != nil { + return fmt.Errorf("reading config: %s", err.Error()) + } + + if err = json.Unmarshal(configBytes, &configMap); err != nil { + return fmt.Errorf("unmarshal config: %s", err.Error()) + } + + iSwarm, ok := configMap["Swarm"] + if !ok { + return fmt.Errorf("unmarshal config: missing swarm key") + } + + swarm, ok := iSwarm.(map[string]interface{}) + if !ok { + return fmt.Errorf("unmarshal config: error type asserting swarm") + } + + swarm["EnableAutoRelay"] = true + swarm["EnableAutoNATService"] = false + configMap["Swarm"] = swarm + + newConfigBytes, err := json.MarshalIndent(configMap, "", " ") + if err != nil { + return fmt.Errorf("marshal migrated config: %s", err.Error()) + } + + if err := ioutil.WriteFile(path.Join(repoPath, "config"), newConfigBytes, os.ModePerm); err != nil { + return fmt.Errorf("writing migrated config: %s", err.Error()) + } + + if err := writeRepoVer(repoPath, 22); err != nil { + return fmt.Errorf("bumping repover to 18: %s", err.Error()) + } + return nil +} + +func (Migration021) Down(repoPath, dbPassword string, testnet bool) error { + var ( + configMap = map[string]interface{}{} + configBytes, err = ioutil.ReadFile(path.Join(repoPath, "config")) + ) + if err != nil { + return fmt.Errorf("reading config: %s", err.Error()) + } + + if err = json.Unmarshal(configBytes, &configMap); err != nil { + return fmt.Errorf("unmarshal config: %s", err.Error()) + } + + iSwarm, ok := configMap["Swarm"] + if !ok { + return fmt.Errorf("unmarshal config: missing swarm key") + } + + swarm, ok := iSwarm.(map[string]interface{}) + if !ok { + return fmt.Errorf("unmarshal config: error type asserting swarm") + } + + delete(swarm, "EnableAutoRelay") + delete(swarm, "EnableAutoNATService") + configMap["Swarm"] = swarm + + newConfigBytes, err := json.MarshalIndent(configMap, "", " ") + if err != nil { + return fmt.Errorf("marshal migrated config: %s", err.Error()) + } + + if err := ioutil.WriteFile(path.Join(repoPath, "config"), newConfigBytes, os.ModePerm); err != nil { + return fmt.Errorf("writing migrated config: %s", err.Error()) + } + + if err := writeRepoVer(repoPath, 21); err != nil { + return fmt.Errorf("dropping repover to 16: %s", err.Error()) + } + return nil +} diff --git a/repo/migrations/Migration021_test.go b/repo/migrations/Migration021_test.go new file mode 100644 index 0000000000..b80bdbf401 --- /dev/null +++ b/repo/migrations/Migration021_test.go @@ -0,0 +1,107 @@ +package migrations_test + +import ( + "github.com/phoreproject/openbazaar-go/repo/migrations" + "github.com/phoreproject/openbazaar-go/schema" + "io/ioutil" + "os" + "regexp" + "testing" +) + +const preMigration021Config = `{ + "Swarm": { + "AddrFilters": null, + "ConnMgr": { + "GracePeriod": "", + "HighWater": 0, + "LowWater": 0, + "Type": "" + }, + "DisableBandwidthMetrics": false, + "DisableNatPortMap": false, + "DisableRelay": false, + "EnableRelayHop": false + } +}` + +const postMigration021Config = `{ + "Swarm": { + "AddrFilters": null, + "ConnMgr": { + "GracePeriod": "", + "HighWater": 0, + "LowWater": 0, + "Type": "" + }, + "DisableBandwidthMetrics": false, + "DisableNatPortMap": false, + "DisableRelay": false, + "EnableAutoNATService": false, + "EnableAutoRelay": true, + "EnableRelayHop": false + } +}` + +func TestMigration021(t *testing.T) { + var testRepo, err = schema.NewCustomSchemaManager(schema.SchemaContext{ + DataPath: schema.GenerateTempPath(), + TestModeEnabled: true, + }) + if err != nil { + t.Fatal(err) + } + + if err = testRepo.BuildSchemaDirectories(); err != nil { + t.Fatal(err) + } + defer testRepo.DestroySchemaDirectories() + + var ( + configPath = testRepo.DataPathJoin("config") + repoverPath = testRepo.DataPathJoin("repover") + ) + if err = ioutil.WriteFile(configPath, []byte(preMigration021Config), os.ModePerm); err != nil { + t.Fatal(err) + } + + if err = ioutil.WriteFile(repoverPath, []byte("15"), os.ModePerm); err != nil { + t.Fatal(err) + } + + var m migrations.Migration021 + err = m.Up(testRepo.DataPath(), "", true) + if err != nil { + t.Fatal(err) + } + + configBytes, err := ioutil.ReadFile(configPath) + if err != nil { + t.Fatal(err) + } + + var re = regexp.MustCompile(`\s`) + if re.ReplaceAllString(string(configBytes), "") != re.ReplaceAllString(string(postMigration021Config), "") { + t.Logf("actual: %s", re.ReplaceAllString(string(configBytes), "")) + t.Fatal("incorrect post-migration config") + } + + assertCorrectRepoVer(t, repoverPath, "22") + + err = m.Down(testRepo.DataPath(), "", true) + if err != nil { + t.Fatal(err) + } + + configBytes, err = ioutil.ReadFile(configPath) + if err != nil { + t.Fatal(err) + } + + if re.ReplaceAllString(string(configBytes), "") != re.ReplaceAllString(string(preMigration021Config), "") { + t.Logf("actual: %s", re.ReplaceAllString(string(configBytes), "")) + t.Fatal("incorrect post-migration config") + } + + assertCorrectRepoVer(t, repoverPath, "21") +} diff --git a/repo/migrations/Migration022.go b/repo/migrations/Migration022.go new file mode 100644 index 0000000000..21f6c9707d --- /dev/null +++ b/repo/migrations/Migration022.go @@ -0,0 +1,97 @@ +package migrations + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path" +) + +// Migration022 migrates the config file to set the IPNSExtra: APIRouter option +// in the config file. Also deletes IPNSExtra: FallbackAPI if it exists. +type Migration022 struct{} + +func (Migration022) Up(repoPath, dbPassword string, testnet bool) error { + var ( + configMap = map[string]interface{}{} + configBytes, err = ioutil.ReadFile(path.Join(repoPath, "config")) + ) + if err != nil { + return fmt.Errorf("reading config: %s", err.Error()) + } + + if err = json.Unmarshal(configBytes, &configMap); err != nil { + return fmt.Errorf("unmarshal config: %s", err.Error()) + } + + iIPNSExtra, ok := configMap["IpnsExtra"] + if !ok { + return fmt.Errorf("unmarshal config: missing IpnsExtra key") + } + + ipnsExtra, ok := iIPNSExtra.(map[string]interface{}) + if !ok { + return fmt.Errorf("unmarshal config: error type asserting IpnsExtra") + } + + ipnsExtra["APIRouter"] = "https://routing.api.openbazaar.org" + delete(ipnsExtra, "FallbackAPI") + configMap["IpnsExtra"] = ipnsExtra + + newConfigBytes, err := json.MarshalIndent(configMap, "", " ") + if err != nil { + return fmt.Errorf("marshal migrated config: %s", err.Error()) + } + + if err := ioutil.WriteFile(path.Join(repoPath, "config"), newConfigBytes, os.ModePerm); err != nil { + return fmt.Errorf("writing migrated config: %s", err.Error()) + } + + if err := writeRepoVer(repoPath, 23); err != nil { + return fmt.Errorf("bumping repover to 18: %s", err.Error()) + } + return nil +} + +func (Migration022) Down(repoPath, dbPassword string, testnet bool) error { + var ( + configMap = map[string]interface{}{} + configBytes, err = ioutil.ReadFile(path.Join(repoPath, "config")) + ) + if err != nil { + return fmt.Errorf("reading config: %s", err.Error()) + } + + if err = json.Unmarshal(configBytes, &configMap); err != nil { + return fmt.Errorf("unmarshal config: %s", err.Error()) + } + + iIPNSExtra, ok := configMap["IpnsExtra"] + if !ok { + return fmt.Errorf("unmarshal config: missing IpnsExtra key") + } + + ipnsExtra, ok := iIPNSExtra.(map[string]interface{}) + if !ok { + return fmt.Errorf("unmarshal config: error type asserting IpnsExtra") + } + + delete(ipnsExtra, "APIRouter") + ipnsExtra["FallbackAPI"] = "https://gateway.ob1.io" + configMap["IpnsExtra"] = ipnsExtra + + newConfigBytes, err := json.MarshalIndent(configMap, "", " ") + if err != nil { + return fmt.Errorf("marshal migrated config: %s", err.Error()) + } + + if err := ioutil.WriteFile(path.Join(repoPath, "config"), newConfigBytes, os.ModePerm); err != nil { + return fmt.Errorf("writing migrated config: %s", err.Error()) + } + + if err := writeRepoVer(repoPath, 22); err != nil { + return fmt.Errorf("dropping repover to 16: %s", err.Error()) + } + return nil +} diff --git a/repo/migrations/Migration022_test.go b/repo/migrations/Migration022_test.go new file mode 100644 index 0000000000..0f168f6a61 --- /dev/null +++ b/repo/migrations/Migration022_test.go @@ -0,0 +1,88 @@ +package migrations_test + +import ( + "github.com/phoreproject/openbazaar-go/repo/migrations" + "github.com/phoreproject/openbazaar-go/schema" + "io/ioutil" + "os" + "regexp" + "testing" +) + +const preMigration022Config = `{ + "IpnsExtra": { + "DHTQuorumSize": 1, + "FallbackAPI": "https://gateway.ob1.io" + } +}` + +const postMigration022Config = `{ + "IpnsExtra": { + "APIRouter": "https://routing.api.openbazaar.org", + "DHTQuorumSize": 1 + + } +}` + +func TestMigration022(t *testing.T) { + var testRepo, err = schema.NewCustomSchemaManager(schema.SchemaContext{ + DataPath: schema.GenerateTempPath(), + TestModeEnabled: true, + }) + if err != nil { + t.Fatal(err) + } + + if err = testRepo.BuildSchemaDirectories(); err != nil { + t.Fatal(err) + } + defer testRepo.DestroySchemaDirectories() + + var ( + configPath = testRepo.DataPathJoin("config") + repoverPath = testRepo.DataPathJoin("repover") + ) + if err = ioutil.WriteFile(configPath, []byte(preMigration022Config), os.ModePerm); err != nil { + t.Fatal(err) + } + + if err = ioutil.WriteFile(repoverPath, []byte("22"), os.ModePerm); err != nil { + t.Fatal(err) + } + + var m migrations.Migration022 + err = m.Up(testRepo.DataPath(), "", true) + if err != nil { + t.Fatal(err) + } + + configBytes, err := ioutil.ReadFile(configPath) + if err != nil { + t.Fatal(err) + } + + var re = regexp.MustCompile(`\s`) + if re.ReplaceAllString(string(configBytes), "") != re.ReplaceAllString(string(postMigration022Config), "") { + t.Logf("actual: %s", re.ReplaceAllString(string(configBytes), "")) + t.Fatal("incorrect post-migration config") + } + + assertCorrectRepoVer(t, repoverPath, "23") + + err = m.Down(testRepo.DataPath(), "", true) + if err != nil { + t.Fatal(err) + } + + configBytes, err = ioutil.ReadFile(configPath) + if err != nil { + t.Fatal(err) + } + + if re.ReplaceAllString(string(configBytes), "") != re.ReplaceAllString(string(preMigration022Config), "") { + t.Logf("actual: %s", re.ReplaceAllString(string(configBytes), "")) + t.Fatal("incorrect post-migration config") + } + + assertCorrectRepoVer(t, repoverPath, "22") +} diff --git a/repo/migrations/helpers/Migration020/record.pb.go b/repo/migrations/helpers/Migration020/record.pb.go index b0da97b414..c4aa1cdcc5 100644 --- a/repo/migrations/helpers/Migration020/record.pb.go +++ b/repo/migrations/helpers/Migration020/record.pb.go @@ -5,8 +5,9 @@ package record import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/repo/notification.go b/repo/notification.go index 853bec738f..2aff318b44 100644 --- a/repo/notification.go +++ b/repo/notification.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "encoding/json" //"errors" "fmt" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "time" ) diff --git a/schema/configuration.go b/schema/configuration.go index c295df7693..25a36a1b48 100644 --- a/schema/configuration.go +++ b/schema/configuration.go @@ -26,7 +26,7 @@ type TorConfig struct { type IpnsExtraConfig struct { DHTQuorumSize int - FallbackAPI string + APIRouter string } type WalletsConfig struct { @@ -317,16 +317,16 @@ func GetIPNSExtraConfig(cfgBytes []byte) (*IpnsExtraConfig, error) { if !ok { return nil, MalformedConfigError } - fallbackAPI, ok := ieCfg["FallbackAPI"] + apiRouter, ok := ieCfg["APIRouter"] if !ok { return nil, MalformedConfigError } - fallbackAPIStr, ok := fallbackAPI.(string) + apiRouterStr, ok := apiRouter.(string) if !ok { return nil, MalformedConfigError } - return &IpnsExtraConfig{int(qsInt), fallbackAPIStr}, nil + return &IpnsExtraConfig{int(qsInt), apiRouterStr}, nil } func GetDropboxApiToken(cfgBytes []byte) (string, error) { diff --git a/schema/configuration_test.go b/schema/configuration_test.go index 24146669d3..701f6538c5 100644 --- a/schema/configuration_test.go +++ b/schema/configuration_test.go @@ -177,8 +177,8 @@ func TestGetIPNSExtraConfig(t *testing.T) { if ipnsConfig.DHTQuorumSize != 1 { t.Error("GetIPNSExtraConfig returned incorrect DHTQuorumSize") } - if ipnsConfig.FallbackAPI != "https://gateway.ob1.io" { - t.Error("GetIPNSExtraConfig returned incorrect FallbackAPI") + if ipnsConfig.APIRouter != "https://routing.api.openbazaar.org" { + t.Error("GetIPNSExtraConfig returned incorrect APIRouter") } } @@ -294,7 +294,7 @@ func configFixture() []byte { }, "IpnsExtra": { "DHTQuorumSize": 1, - "FallbackAPI": "https://gateway.ob1.io" + "APIRouter": "https://routing.api.openbazaar.org" }, "JSON-API": { "AllowedIPs": [ diff --git a/schema/constants.go b/schema/constants.go index c4a6386c4c..b412ab8fe7 100644 --- a/schema/constants.go +++ b/schema/constants.go @@ -55,6 +55,7 @@ const ( BootstrapNodeDefault_LeMarcheSerpette = "/ip4/159.203.115.78/tcp/5001/ipfs/QmPJuP4Myo8pGL1k56b85Q4rpaoSnmn5L3wLjYHTzbBrk1" BootstrapNodeDefault_BrixtonVillage = "/ip4/104.131.19.44/tcp/5001/ipfs/QmRvbZttqh6CPFiMKWa1jPfRR9JxagYRv4wsvMAG4ADUTj" + IPFSCachingRouterDefaultURI = "https://routing.api.phore.io" // TODO create that service // End Configuration defaults ) diff --git a/schema/manager.go b/schema/manager.go index b1a7a439fb..9fb99974fc 100644 --- a/schema/manager.go +++ b/schema/manager.go @@ -13,7 +13,7 @@ import ( "strings" "time" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" + "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" "github.com/ipfs/go-ipfs/repo/fsrepo" _ "github.com/mutecomm/go-sqlcipher" @@ -499,77 +499,28 @@ func MustDefaultConfig() *config.Config { panic(err) } - conf := &config.Config{ - // Setup the node's default addresses. - // NOTE: two swarm listen addrs, one TCP, one UTP. - Addresses: config.Addresses{ - Swarm: []string{ - "/ip4/0.0.0.0/tcp/5001", - "/ip6/::/tcp/5001", - "/ip4/0.0.0.0/tcp/10005/ws", - "/ip6/::/tcp/10005/ws", - }, - API: []string{""}, - Gateway: []string{"/ip4/127.0.0.1/tcp/5002"}, - }, - - Datastore: config.Datastore{ - StorageMax: "10GB", - StorageGCWatermark: 90, // 90% - GCPeriod: "1h", - BloomFilterSize: 0, - HashOnRead: false, - Spec: map[string]interface{}{ - "type": "mount", - "mounts": []interface{}{ - map[string]interface{}{ - "mountpoint": "/blocks", - "type": "measure", - "prefix": "flatfs.datastore", - "child": map[string]interface{}{ - "type": "flatfs", - "path": "blocks", - "sync": true, - "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2", - }, - }, - map[string]interface{}{ - "mountpoint": "/", - "type": "measure", - "prefix": "leveldb.datastore", - "child": map[string]interface{}{ - "type": "levelds", - "path": "datastore", - "compression": "none", - }, - }, - }, - }, - }, - Bootstrap: config.BootstrapPeerStrings(bootstrapPeers), - Discovery: config.Discovery{config.MDNS{ - Enabled: false, - Interval: 10, - }}, - - // Setup the node mount points - Mounts: config.Mounts{ - IPFS: "/ipfs", - IPNS: "/ipns", - }, - - Ipns: config.Ipns{ - ResolveCacheSize: 128, - RecordLifetime: "168h", - RepublishPeriod: "24h", - }, - - Gateway: config.Gateway{ - RootRedirect: "", - Writable: false, - PathPrefixes: []string{}, + conf, err := config.Init(&dummyWriter{}, 4096) + if err != nil { + panic(err) + } + conf.Ipns.RecordLifetime = "168h" + conf.Ipns.RepublishPeriod = "24h" + conf.Discovery.MDNS.Enabled = false + conf.Addresses = config.Addresses{ + Swarm: []string{ + "/ip4/0.0.0.0/tcp/5001", + "/ip6/::/tcp/5001", + "/ip4/0.0.0.0/tcp/10005/ws", + "/ip6/::/tcp/10005/ws", }, + API: []string{""}, + Gateway: []string{"/ip4/127.0.0.1/tcp/5002"}, } + conf.Bootstrap = config.BootstrapPeerStrings(bootstrapPeers) return conf } + +type dummyWriter struct{} + +func (d *dummyWriter) Write(p []byte) (n int, err error) { return 0, nil } diff --git a/schema/manager_test.go b/schema/manager_test.go index a0adec9011..a99dcf2e26 100644 --- a/schema/manager_test.go +++ b/schema/manager_test.go @@ -17,6 +17,16 @@ import ( "github.com/tyler-smith/go-bip39" ) +func TestMain(m *testing.M) { + // The repo package usually installs the plugins + // on init() but the repo package isn't initialized + // here and it would be a circular import to import + // it. So we will install the plugin for the purposes + // of these tests. + ipfs.InstallDatabasePlugins() + os.Exit(m.Run()) +} + func TestNewSchemaManagerSetsReasonableDefaults(t *testing.T) { subject, err := NewSchemaManager() if err != nil { @@ -401,7 +411,7 @@ func TestOpenbazaarSchemaManager_CleanIdentityFromConfig(t *testing.T) { t.Error(err) } - loadConfig := func() (map[string]interface{}, error) { + loadConfig := func() map[string]interface{} { configPath := path.Join(subject.dataPath, "config") configFile, err := ioutil.ReadFile(configPath) if err != nil { @@ -415,15 +425,12 @@ func TestOpenbazaarSchemaManager_CleanIdentityFromConfig(t *testing.T) { if !ok { t.Error("invalid config file") } - return cfg, nil + return cfg } // First load the config and make sure the identity object is indeed set. - cfg, err := loadConfig() - if err != nil { - t.Error(err) - } + cfg := loadConfig() _, ok := cfg["Identity"] if !ok { t.Error("Identity object does not exist in config but should") @@ -433,10 +440,7 @@ func TestOpenbazaarSchemaManager_CleanIdentityFromConfig(t *testing.T) { if err := subject.CleanIdentityFromConfig(); err != nil { t.Error(err) } - cfg, err = loadConfig() - if err != nil { - t.Error(err) - } + cfg = loadConfig() _, ok = cfg["Identity"] if ok { t.Error("Identity object was not deleted from config") diff --git a/storage/dropbox/dropbox.go b/storage/dropbox/dropbox.go index 686ea70508..ea4b5bd382 100644 --- a/storage/dropbox/dropbox.go +++ b/storage/dropbox/dropbox.go @@ -5,9 +5,9 @@ import ( "crypto/sha256" "encoding/hex" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" "github.com/dropbox/dropbox-sdk-go-unofficial" "github.com/dropbox/dropbox-sdk-go-unofficial/files" diff --git a/storage/selfhosted/selfhostedstorage.go b/storage/selfhosted/selfhostedstorage.go index 5f7faa72be..ac0e9b0267 100644 --- a/storage/selfhosted/selfhostedstorage.go +++ b/storage/selfhosted/selfhostedstorage.go @@ -4,9 +4,9 @@ import ( "crypto/sha256" "encoding/hex" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "os" "path" diff --git a/storage/selfhosted/selfhostedstorage_test.go b/storage/selfhosted/selfhostedstorage_test.go index 346c0cb299..336cd70d34 100644 --- a/storage/selfhosted/selfhostedstorage_test.go +++ b/storage/selfhosted/selfhostedstorage_test.go @@ -1,12 +1,12 @@ package selfhosted import ( - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "os" "testing" - coremock "github.com/ipfs/go-ipfs/core/mock" + "github.com/ipfs/go-ipfs/core/mock" ) func TestSelfHostedStorage_Store(t *testing.T) { diff --git a/storage/storage.go b/storage/storage.go index ab04c46525..86abc00dd9 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -1,8 +1,8 @@ package net import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) type OfflineMessagingStorage interface { diff --git a/test/factory/contract.go b/test/factory/contract.go index c236c87bb0..7f634b1550 100644 --- a/test/factory/contract.go +++ b/test/factory/contract.go @@ -1,7 +1,7 @@ package factory import ( - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" "time" diff --git a/test/node.go b/test/node.go index 4e8451a8ce..c7b0f7fede 100644 --- a/test/node.go +++ b/test/node.go @@ -2,10 +2,10 @@ package test import ( "context" - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" + "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" + "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" wi "github.com/OpenBazaar/wallet-interface" "github.com/btcsuite/btcd/chaincfg" diff --git a/vendor/github.com/OpenBazaar/go-ethwallet/wallet/wallet.go b/vendor/github.com/OpenBazaar/go-ethwallet/wallet/wallet.go index e1d4e779e8..aee34e745f 100644 --- a/vendor/github.com/OpenBazaar/go-ethwallet/wallet/wallet.go +++ b/vendor/github.com/OpenBazaar/go-ethwallet/wallet/wallet.go @@ -410,7 +410,7 @@ func (wallet *EthereumWallet) GetFeePerByte(feeLevel wi.FeeLevel) uint64 { } // Spend - Send ether to an external wallet -func (wallet *EthereumWallet) Spend(amount int64, addr btcutil.Address, feeLevel wi.FeeLevel, referenceID string) (*chainhash.Hash, error) { +func (wallet *EthereumWallet) Spend(amount int64, addr btcutil.Address, feeLevel wi.FeeLevel, referenceID string, spendAll bool) (*chainhash.Hash, error) { var hash common.Hash var h *chainhash.Hash diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/LICENSE b/vendor/github.com/agl/ed25519/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/LICENSE rename to vendor/github.com/agl/ed25519/LICENSE diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519/const.go b/vendor/github.com/agl/ed25519/edwards25519/const.go similarity index 100% rename from vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519/const.go rename to vendor/github.com/agl/ed25519/edwards25519/const.go diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519/edwards25519.go b/vendor/github.com/agl/ed25519/edwards25519/edwards25519.go similarity index 100% rename from vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519/edwards25519.go rename to vendor/github.com/agl/ed25519/edwards25519/edwards25519.go diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/extra25519/extra25519.go b/vendor/github.com/agl/ed25519/extra25519/extra25519.go similarity index 94% rename from vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/extra25519/extra25519.go rename to vendor/github.com/agl/ed25519/extra25519/extra25519.go index 7803dfaa76..b897ba5381 100644 --- a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/extra25519/extra25519.go +++ b/vendor/github.com/agl/ed25519/extra25519/extra25519.go @@ -7,7 +7,7 @@ package extra25519 import ( "crypto/sha512" - "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519" + "github.com/agl/ed25519/edwards25519" ) // PrivateKeyToCurve25519 converts an ed25519 private key into a corresponding @@ -55,9 +55,9 @@ func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool return true } -// sqrtMinusA is sqrt(-486662) -var sqrtMinusA = edwards25519.FieldElement{ - 12222970, 8312128, 11511410, -9067497, 15300785, 241793, -25456130, -14121551, 12187136, -3972024, +// sqrtMinusAPlus2 is sqrt(-(486662+2)) +var sqrtMinusAPlus2 = edwards25519.FieldElement{ + -12222970, -8312128, -11511410, 9067497, -15300785, -241793, 25456130, 14121551, -12187136, 3972024, } // sqrtMinusHalf is sqrt(-1/2) @@ -114,18 +114,18 @@ func ScalarBaseMult(publicKey, representative, privateKey *[32]byte) bool { var v edwards25519.FieldElement edwards25519.FeMul(&v, &t0, &inv1) edwards25519.FeMul(&v, &v, &A.Z) - edwards25519.FeMul(&v, &v, &sqrtMinusA) + edwards25519.FeMul(&v, &v, &sqrtMinusAPlus2) var b edwards25519.FieldElement edwards25519.FeAdd(&b, &u, &edwards25519.A) - var c, b3, b8 edwards25519.FieldElement + var c, b3, b7, b8 edwards25519.FieldElement edwards25519.FeSquare(&b3, &b) // 2 edwards25519.FeMul(&b3, &b3, &b) // 3 edwards25519.FeSquare(&c, &b3) // 6 - edwards25519.FeMul(&c, &c, &b) // 7 - edwards25519.FeMul(&b8, &c, &b) // 8 - edwards25519.FeMul(&c, &c, &u) + edwards25519.FeMul(&b7, &c, &b) // 7 + edwards25519.FeMul(&b8, &b7, &b) // 8 + edwards25519.FeMul(&c, &b7, &u) q58(&c, &c) var chi edwards25519.FieldElement @@ -135,11 +135,7 @@ func ScalarBaseMult(publicKey, representative, privateKey *[32]byte) bool { edwards25519.FeSquare(&t0, &u) edwards25519.FeMul(&chi, &chi, &t0) - edwards25519.FeSquare(&t0, &b) // 2 - edwards25519.FeMul(&t0, &t0, &b) // 3 - edwards25519.FeSquare(&t0, &t0) // 6 - edwards25519.FeMul(&t0, &t0, &b) // 7 - edwards25519.FeSquare(&t0, &t0) // 14 + edwards25519.FeSquare(&t0, &b7) // 14 edwards25519.FeMul(&chi, &chi, &t0) edwards25519.FeNeg(&chi, &chi) diff --git a/vendor/github.com/btcsuite/btcutil/certgen.go b/vendor/github.com/btcsuite/btcutil/certgen.go index bbc45a412f..26d16293a0 100644 --- a/vendor/github.com/btcsuite/btcutil/certgen.go +++ b/vendor/github.com/btcsuite/btcutil/certgen.go @@ -110,7 +110,7 @@ func NewTLSCertPair(organization string, validUntil time.Time, extraHosts []stri KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - IsCA: true, // so can sign self. + IsCA: true, // so can sign self. BasicConstraintsValid: true, DNSNames: dnsNames, diff --git a/vendor/github.com/go-errors/errors/.travis.yml b/vendor/github.com/go-errors/errors/.travis.yml new file mode 100644 index 0000000000..9d00fdd5d6 --- /dev/null +++ b/vendor/github.com/go-errors/errors/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - "1.8.x" + - "1.10.x" diff --git a/vendor/github.com/go-errors/errors/LICENSE.MIT b/vendor/github.com/go-errors/errors/LICENSE.MIT new file mode 100644 index 0000000000..c9a5b2eeb7 --- /dev/null +++ b/vendor/github.com/go-errors/errors/LICENSE.MIT @@ -0,0 +1,7 @@ +Copyright (c) 2015 Conrad Irwin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/go-errors/errors/README.md b/vendor/github.com/go-errors/errors/README.md new file mode 100644 index 0000000000..5d4f1873dd --- /dev/null +++ b/vendor/github.com/go-errors/errors/README.md @@ -0,0 +1,66 @@ +go-errors/errors +================ + +[![Build Status](https://travis-ci.org/go-errors/errors.svg?branch=master)](https://travis-ci.org/go-errors/errors) + +Package errors adds stacktrace support to errors in go. + +This is particularly useful when you want to understand the state of execution +when an error was returned unexpectedly. + +It provides the type \*Error which implements the standard golang error +interface, so you can use this library interchangably with code that is +expecting a normal error return. + +Usage +----- + +Full documentation is available on +[godoc](https://godoc.org/github.com/go-errors/errors), but here's a simple +example: + +```go +package crashy + +import "github.com/go-errors/errors" + +var Crashed = errors.Errorf("oh dear") + +func Crash() error { + return errors.New(Crashed) +} +``` + +This can be called as follows: + +```go +package main + +import ( + "crashy" + "fmt" + "github.com/go-errors/errors" +) + +func main() { + err := crashy.Crash() + if err != nil { + if errors.Is(err, crashy.Crashed) { + fmt.Println(err.(*errors.Error).ErrorStack()) + } else { + panic(err) + } + } +} +``` + +Meta-fu +------- + +This package was original written to allow reporting to +[Bugsnag](https://bugsnag.com/) from +[bugsnag-go](https://github.com/bugsnag/bugsnag-go), but after I found similar +packages by Facebook and Dropbox, it was moved to one canonical location so +everyone can benefit. + +This package is licensed under the MIT license, see LICENSE.MIT for details. diff --git a/vendor/github.com/go-errors/errors/cover.out b/vendor/github.com/go-errors/errors/cover.out new file mode 100644 index 0000000000..ab18b0519f --- /dev/null +++ b/vendor/github.com/go-errors/errors/cover.out @@ -0,0 +1,89 @@ +mode: set +github.com/go-errors/errors/stackframe.go:27.51,30.25 2 1 +github.com/go-errors/errors/stackframe.go:33.2,38.8 3 1 +github.com/go-errors/errors/stackframe.go:30.25,32.3 1 0 +github.com/go-errors/errors/stackframe.go:43.47,44.31 1 1 +github.com/go-errors/errors/stackframe.go:47.2,47.48 1 1 +github.com/go-errors/errors/stackframe.go:44.31,46.3 1 1 +github.com/go-errors/errors/stackframe.go:52.42,56.16 3 1 +github.com/go-errors/errors/stackframe.go:60.2,60.60 1 1 +github.com/go-errors/errors/stackframe.go:56.16,58.3 1 0 +github.com/go-errors/errors/stackframe.go:64.55,67.16 2 1 +github.com/go-errors/errors/stackframe.go:71.2,72.61 2 1 +github.com/go-errors/errors/stackframe.go:76.2,76.66 1 1 +github.com/go-errors/errors/stackframe.go:67.16,69.3 1 0 +github.com/go-errors/errors/stackframe.go:72.61,74.3 1 0 +github.com/go-errors/errors/stackframe.go:79.56,91.63 3 1 +github.com/go-errors/errors/stackframe.go:95.2,95.53 1 1 +github.com/go-errors/errors/stackframe.go:100.2,101.18 2 1 +github.com/go-errors/errors/stackframe.go:91.63,94.3 2 1 +github.com/go-errors/errors/stackframe.go:95.53,98.3 2 1 +github.com/go-errors/errors/error.go:70.32,73.23 2 1 +github.com/go-errors/errors/error.go:80.2,85.3 3 1 +github.com/go-errors/errors/error.go:74.2,75.10 1 1 +github.com/go-errors/errors/error.go:76.2,77.28 1 1 +github.com/go-errors/errors/error.go:92.43,95.23 2 1 +github.com/go-errors/errors/error.go:104.2,109.3 3 1 +github.com/go-errors/errors/error.go:96.2,97.11 1 1 +github.com/go-errors/errors/error.go:98.2,99.10 1 1 +github.com/go-errors/errors/error.go:100.2,101.28 1 1 +github.com/go-errors/errors/error.go:115.39,117.19 1 1 +github.com/go-errors/errors/error.go:121.2,121.29 1 1 +github.com/go-errors/errors/error.go:125.2,125.43 1 1 +github.com/go-errors/errors/error.go:129.2,129.14 1 1 +github.com/go-errors/errors/error.go:117.19,119.3 1 1 +github.com/go-errors/errors/error.go:121.29,123.3 1 1 +github.com/go-errors/errors/error.go:125.43,127.3 1 1 +github.com/go-errors/errors/error.go:135.53,137.2 1 1 +github.com/go-errors/errors/error.go:140.34,142.2 1 1 +github.com/go-errors/errors/error.go:146.34,149.42 2 1 +github.com/go-errors/errors/error.go:153.2,153.20 1 1 +github.com/go-errors/errors/error.go:149.42,151.3 1 1 +github.com/go-errors/errors/error.go:158.39,160.2 1 1 +github.com/go-errors/errors/error.go:164.46,165.23 1 1 +github.com/go-errors/errors/error.go:173.2,173.19 1 1 +github.com/go-errors/errors/error.go:165.23,168.32 2 1 +github.com/go-errors/errors/error.go:168.32,170.4 1 1 +github.com/go-errors/errors/error.go:177.37,178.42 1 1 +github.com/go-errors/errors/error.go:181.2,181.41 1 1 +github.com/go-errors/errors/error.go:178.42,180.3 1 1 +github.com/go-errors/errors/parse_panic.go:10.39,12.2 1 1 +github.com/go-errors/errors/parse_panic.go:16.46,24.34 5 1 +github.com/go-errors/errors/parse_panic.go:70.2,70.43 1 1 +github.com/go-errors/errors/parse_panic.go:73.2,73.55 1 0 +github.com/go-errors/errors/parse_panic.go:24.34,27.23 2 1 +github.com/go-errors/errors/parse_panic.go:27.23,28.42 1 1 +github.com/go-errors/errors/parse_panic.go:28.42,31.5 2 1 +github.com/go-errors/errors/parse_panic.go:31.6,33.5 1 0 +github.com/go-errors/errors/parse_panic.go:35.5,35.29 1 1 +github.com/go-errors/errors/parse_panic.go:35.29,36.86 1 1 +github.com/go-errors/errors/parse_panic.go:36.86,38.5 1 1 +github.com/go-errors/errors/parse_panic.go:40.5,40.32 1 1 +github.com/go-errors/errors/parse_panic.go:40.32,41.18 1 1 +github.com/go-errors/errors/parse_panic.go:45.4,46.46 2 1 +github.com/go-errors/errors/parse_panic.go:51.4,53.23 2 1 +github.com/go-errors/errors/parse_panic.go:57.4,58.18 2 1 +github.com/go-errors/errors/parse_panic.go:62.4,63.17 2 1 +github.com/go-errors/errors/parse_panic.go:41.18,43.10 2 1 +github.com/go-errors/errors/parse_panic.go:46.46,49.5 2 1 +github.com/go-errors/errors/parse_panic.go:53.23,55.5 1 0 +github.com/go-errors/errors/parse_panic.go:58.18,60.5 1 0 +github.com/go-errors/errors/parse_panic.go:63.17,65.10 2 1 +github.com/go-errors/errors/parse_panic.go:70.43,72.3 1 1 +github.com/go-errors/errors/parse_panic.go:80.85,82.29 2 1 +github.com/go-errors/errors/parse_panic.go:85.2,85.15 1 1 +github.com/go-errors/errors/parse_panic.go:88.2,90.63 2 1 +github.com/go-errors/errors/parse_panic.go:94.2,94.53 1 1 +github.com/go-errors/errors/parse_panic.go:99.2,101.36 2 1 +github.com/go-errors/errors/parse_panic.go:105.2,106.15 2 1 +github.com/go-errors/errors/parse_panic.go:109.2,112.49 3 1 +github.com/go-errors/errors/parse_panic.go:116.2,117.16 2 1 +github.com/go-errors/errors/parse_panic.go:121.2,126.8 1 1 +github.com/go-errors/errors/parse_panic.go:82.29,84.3 1 0 +github.com/go-errors/errors/parse_panic.go:85.15,87.3 1 1 +github.com/go-errors/errors/parse_panic.go:90.63,93.3 2 1 +github.com/go-errors/errors/parse_panic.go:94.53,97.3 2 1 +github.com/go-errors/errors/parse_panic.go:101.36,103.3 1 0 +github.com/go-errors/errors/parse_panic.go:106.15,108.3 1 0 +github.com/go-errors/errors/parse_panic.go:112.49,114.3 1 1 +github.com/go-errors/errors/parse_panic.go:117.16,119.3 1 0 diff --git a/vendor/github.com/go-errors/errors/error.go b/vendor/github.com/go-errors/errors/error.go new file mode 100644 index 0000000000..60062a4372 --- /dev/null +++ b/vendor/github.com/go-errors/errors/error.go @@ -0,0 +1,217 @@ +// Package errors provides errors that have stack-traces. +// +// This is particularly useful when you want to understand the +// state of execution when an error was returned unexpectedly. +// +// It provides the type *Error which implements the standard +// golang error interface, so you can use this library interchangably +// with code that is expecting a normal error return. +// +// For example: +// +// package crashy +// +// import "github.com/go-errors/errors" +// +// var Crashed = errors.Errorf("oh dear") +// +// func Crash() error { +// return errors.New(Crashed) +// } +// +// This can be called as follows: +// +// package main +// +// import ( +// "crashy" +// "fmt" +// "github.com/go-errors/errors" +// ) +// +// func main() { +// err := crashy.Crash() +// if err != nil { +// if errors.Is(err, crashy.Crashed) { +// fmt.Println(err.(*errors.Error).ErrorStack()) +// } else { +// panic(err) +// } +// } +// } +// +// This package was original written to allow reporting to Bugsnag, +// but after I found similar packages by Facebook and Dropbox, it +// was moved to one canonical location so everyone can benefit. +package errors + +import ( + "bytes" + "fmt" + "reflect" + "runtime" +) + +// The maximum number of stackframes on any error. +var MaxStackDepth = 50 + +// Error is an error with an attached stacktrace. It can be used +// wherever the builtin error interface is expected. +type Error struct { + Err error + stack []uintptr + frames []StackFrame + prefix string +} + +// New makes an Error from the given value. If that value is already an +// error then it will be used directly, if not, it will be passed to +// fmt.Errorf("%v"). The stacktrace will point to the line of code that +// called New. +func New(e interface{}) *Error { + var err error + + switch e := e.(type) { + case error: + err = e + default: + err = fmt.Errorf("%v", e) + } + + stack := make([]uintptr, MaxStackDepth) + length := runtime.Callers(2, stack[:]) + return &Error{ + Err: err, + stack: stack[:length], + } +} + +// Wrap makes an Error from the given value. If that value is already an +// error then it will be used directly, if not, it will be passed to +// fmt.Errorf("%v"). The skip parameter indicates how far up the stack +// to start the stacktrace. 0 is from the current call, 1 from its caller, etc. +func Wrap(e interface{}, skip int) *Error { + var err error + + switch e := e.(type) { + case *Error: + return e + case error: + err = e + default: + err = fmt.Errorf("%v", e) + } + + stack := make([]uintptr, MaxStackDepth) + length := runtime.Callers(2+skip, stack[:]) + return &Error{ + Err: err, + stack: stack[:length], + } +} + +// WrapPrefix makes an Error from the given value. If that value is already an +// error then it will be used directly, if not, it will be passed to +// fmt.Errorf("%v"). The prefix parameter is used to add a prefix to the +// error message when calling Error(). The skip parameter indicates how far +// up the stack to start the stacktrace. 0 is from the current call, +// 1 from its caller, etc. +func WrapPrefix(e interface{}, prefix string, skip int) *Error { + + err := Wrap(e, 1+skip) + + if err.prefix != "" { + prefix = fmt.Sprintf("%s: %s", prefix, err.prefix) + } + + return &Error{ + Err: err.Err, + stack: err.stack, + prefix: prefix, + } + +} + +// Is detects whether the error is equal to a given error. Errors +// are considered equal by this function if they are the same object, +// or if they both contain the same error inside an errors.Error. +func Is(e error, original error) bool { + + if e == original { + return true + } + + if e, ok := e.(*Error); ok { + return Is(e.Err, original) + } + + if original, ok := original.(*Error); ok { + return Is(e, original.Err) + } + + return false +} + +// Errorf creates a new error with the given message. You can use it +// as a drop-in replacement for fmt.Errorf() to provide descriptive +// errors in return values. +func Errorf(format string, a ...interface{}) *Error { + return Wrap(fmt.Errorf(format, a...), 1) +} + +// Error returns the underlying error's message. +func (err *Error) Error() string { + + msg := err.Err.Error() + if err.prefix != "" { + msg = fmt.Sprintf("%s: %s", err.prefix, msg) + } + + return msg +} + +// Stack returns the callstack formatted the same way that go does +// in runtime/debug.Stack() +func (err *Error) Stack() []byte { + buf := bytes.Buffer{} + + for _, frame := range err.StackFrames() { + buf.WriteString(frame.String()) + } + + return buf.Bytes() +} + +// Callers satisfies the bugsnag ErrorWithCallerS() interface +// so that the stack can be read out. +func (err *Error) Callers() []uintptr { + return err.stack +} + +// ErrorStack returns a string that contains both the +// error message and the callstack. +func (err *Error) ErrorStack() string { + return err.TypeName() + " " + err.Error() + "\n" + string(err.Stack()) +} + +// StackFrames returns an array of frames containing information about the +// stack. +func (err *Error) StackFrames() []StackFrame { + if err.frames == nil { + err.frames = make([]StackFrame, len(err.stack)) + + for i, pc := range err.stack { + err.frames[i] = NewStackFrame(pc) + } + } + + return err.frames +} + +// TypeName returns the type this error. e.g. *errors.stringError. +func (err *Error) TypeName() string { + if _, ok := err.Err.(uncaughtPanic); ok { + return "panic" + } + return reflect.TypeOf(err.Err).String() +} diff --git a/vendor/github.com/go-errors/errors/parse_panic.go b/vendor/github.com/go-errors/errors/parse_panic.go new file mode 100644 index 0000000000..cc37052d78 --- /dev/null +++ b/vendor/github.com/go-errors/errors/parse_panic.go @@ -0,0 +1,127 @@ +package errors + +import ( + "strconv" + "strings" +) + +type uncaughtPanic struct{ message string } + +func (p uncaughtPanic) Error() string { + return p.message +} + +// ParsePanic allows you to get an error object from the output of a go program +// that panicked. This is particularly useful with https://github.com/mitchellh/panicwrap. +func ParsePanic(text string) (*Error, error) { + lines := strings.Split(text, "\n") + + state := "start" + + var message string + var stack []StackFrame + + for i := 0; i < len(lines); i++ { + line := lines[i] + + if state == "start" { + if strings.HasPrefix(line, "panic: ") { + message = strings.TrimPrefix(line, "panic: ") + state = "seek" + } else { + return nil, Errorf("bugsnag.panicParser: Invalid line (no prefix): %s", line) + } + + } else if state == "seek" { + if strings.HasPrefix(line, "goroutine ") && strings.HasSuffix(line, "[running]:") { + state = "parsing" + } + + } else if state == "parsing" { + if line == "" { + state = "done" + break + } + createdBy := false + if strings.HasPrefix(line, "created by ") { + line = strings.TrimPrefix(line, "created by ") + createdBy = true + } + + i++ + + if i >= len(lines) { + return nil, Errorf("bugsnag.panicParser: Invalid line (unpaired): %s", line) + } + + frame, err := parsePanicFrame(line, lines[i], createdBy) + if err != nil { + return nil, err + } + + stack = append(stack, *frame) + if createdBy { + state = "done" + break + } + } + } + + if state == "done" || state == "parsing" { + return &Error{Err: uncaughtPanic{message}, frames: stack}, nil + } + return nil, Errorf("could not parse panic: %v", text) +} + +// The lines we're passing look like this: +// +// main.(*foo).destruct(0xc208067e98) +// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 +func parsePanicFrame(name string, line string, createdBy bool) (*StackFrame, error) { + idx := strings.LastIndex(name, "(") + if idx == -1 && !createdBy { + return nil, Errorf("bugsnag.panicParser: Invalid line (no call): %s", name) + } + if idx != -1 { + name = name[:idx] + } + pkg := "" + + if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { + pkg += name[:lastslash] + "/" + name = name[lastslash+1:] + } + if period := strings.Index(name, "."); period >= 0 { + pkg += name[:period] + name = name[period+1:] + } + + name = strings.Replace(name, "·", ".", -1) + + if !strings.HasPrefix(line, "\t") { + return nil, Errorf("bugsnag.panicParser: Invalid line (no tab): %s", line) + } + + idx = strings.LastIndex(line, ":") + if idx == -1 { + return nil, Errorf("bugsnag.panicParser: Invalid line (no line number): %s", line) + } + file := line[1:idx] + + number := line[idx+1:] + if idx = strings.Index(number, " +"); idx > -1 { + number = number[:idx] + } + + lno, err := strconv.ParseInt(number, 10, 32) + if err != nil { + return nil, Errorf("bugsnag.panicParser: Invalid line (bad line number): %s", line) + } + + return &StackFrame{ + File: file, + LineNumber: int(lno), + Package: pkg, + Name: name, + }, nil +} diff --git a/vendor/github.com/go-errors/errors/stackframe.go b/vendor/github.com/go-errors/errors/stackframe.go new file mode 100644 index 0000000000..750ab9a521 --- /dev/null +++ b/vendor/github.com/go-errors/errors/stackframe.go @@ -0,0 +1,102 @@ +package errors + +import ( + "bytes" + "fmt" + "io/ioutil" + "runtime" + "strings" +) + +// A StackFrame contains all necessary information about to generate a line +// in a callstack. +type StackFrame struct { + // The path to the file containing this ProgramCounter + File string + // The LineNumber in that file + LineNumber int + // The Name of the function that contains this ProgramCounter + Name string + // The Package that contains this function + Package string + // The underlying ProgramCounter + ProgramCounter uintptr +} + +// NewStackFrame popoulates a stack frame object from the program counter. +func NewStackFrame(pc uintptr) (frame StackFrame) { + + frame = StackFrame{ProgramCounter: pc} + if frame.Func() == nil { + return + } + frame.Package, frame.Name = packageAndName(frame.Func()) + + // pc -1 because the program counters we use are usually return addresses, + // and we want to show the line that corresponds to the function call + frame.File, frame.LineNumber = frame.Func().FileLine(pc - 1) + return + +} + +// Func returns the function that contained this frame. +func (frame *StackFrame) Func() *runtime.Func { + if frame.ProgramCounter == 0 { + return nil + } + return runtime.FuncForPC(frame.ProgramCounter) +} + +// String returns the stackframe formatted in the same way as go does +// in runtime/debug.Stack() +func (frame *StackFrame) String() string { + str := fmt.Sprintf("%s:%d (0x%x)\n", frame.File, frame.LineNumber, frame.ProgramCounter) + + source, err := frame.SourceLine() + if err != nil { + return str + } + + return str + fmt.Sprintf("\t%s: %s\n", frame.Name, source) +} + +// SourceLine gets the line of code (from File and Line) of the original source if possible. +func (frame *StackFrame) SourceLine() (string, error) { + data, err := ioutil.ReadFile(frame.File) + + if err != nil { + return "", New(err) + } + + lines := bytes.Split(data, []byte{'\n'}) + if frame.LineNumber <= 0 || frame.LineNumber >= len(lines) { + return "???", nil + } + // -1 because line-numbers are 1 based, but our array is 0 based + return string(bytes.Trim(lines[frame.LineNumber-1], " \t")), nil +} + +func packageAndName(fn *runtime.Func) (string, string) { + name := fn.Name() + pkg := "" + + // The name includes the path name to the package, which is unnecessary + // since the file name is already included. Plus, it has center dots. + // That is, we see + // runtime/debug.*T·ptrmethod + // and want + // *T.ptrmethod + // Since the package path might contains dots (e.g. code.google.com/...), + // we first remove the path prefix if there is one. + if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { + pkg += name[:lastslash] + "/" + name = name[lastslash+1:] + } + if period := strings.Index(name, "."); period >= 0 { + pkg += name[:period] + name = name[period+1:] + } + + name = strings.Replace(name, "·", ".", -1) + return pkg, name +} diff --git a/vendor/github.com/google/uuid/json_test.go b/vendor/github.com/google/uuid/json_test.go new file mode 100644 index 0000000000..245f91edfb --- /dev/null +++ b/vendor/github.com/google/uuid/json_test.go @@ -0,0 +1,62 @@ +// Copyright 2016 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "encoding/json" + "reflect" + "testing" +) + +var testUUID = Must(Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")) + +func TestJSON(t *testing.T) { + type S struct { + ID1 UUID + ID2 UUID + } + s1 := S{ID1: testUUID} + data, err := json.Marshal(&s1) + if err != nil { + t.Fatal(err) + } + var s2 S + if err := json.Unmarshal(data, &s2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(&s1, &s2) { + t.Errorf("got %#v, want %#v", s2, s1) + } +} + +func BenchmarkUUID_MarshalJSON(b *testing.B) { + x := &struct { + UUID UUID `json:"uuid"` + }{} + var err error + x.UUID, err = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if err != nil { + b.Fatal(err) + } + for i := 0; i < b.N; i++ { + js, err := json.Marshal(x) + if err != nil { + b.Fatalf("marshal json: %#v (%v)", js, err) + } + } +} + +func BenchmarkUUID_UnmarshalJSON(b *testing.B) { + js := []byte(`{"uuid":"f47ac10b-58cc-0372-8567-0e02b2c3d479"}`) + var x *struct { + UUID UUID `json:"uuid"` + } + for i := 0; i < b.N; i++ { + err := json.Unmarshal(js, &x) + if err != nil { + b.Fatalf("marshal json: %#v (%v)", js, err) + } + } +} diff --git a/vendor/github.com/google/uuid/seq_test.go b/vendor/github.com/google/uuid/seq_test.go new file mode 100644 index 0000000000..4f6c549125 --- /dev/null +++ b/vendor/github.com/google/uuid/seq_test.go @@ -0,0 +1,66 @@ +// Copyright 2016 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "flag" + "runtime" + "testing" + "time" +) + +// This test is only run when --regressions is passed on the go test line. +var regressions = flag.Bool("regressions", false, "run uuid regression tests") + +// TestClockSeqRace tests for a particular race condition of returning two +// identical Version1 UUIDs. The duration of 1 minute was chosen as the race +// condition, before being fixed, nearly always occurred in under 30 seconds. +func TestClockSeqRace(t *testing.T) { + if !*regressions { + t.Skip("skipping regression tests") + } + duration := time.Minute + + done := make(chan struct{}) + defer close(done) + + ch := make(chan UUID, 10000) + ncpu := runtime.NumCPU() + switch ncpu { + case 0, 1: + // We can't run the test effectively. + t.Skip("skipping race test, only one CPU detected") + return + default: + runtime.GOMAXPROCS(ncpu) + } + for i := 0; i < ncpu; i++ { + go func() { + for { + select { + case <-done: + return + case ch <- Must(NewUUID()): + } + } + }() + } + + uuids := make(map[string]bool) + cnt := 0 + start := time.Now() + for u := range ch { + s := u.String() + if uuids[s] { + t.Errorf("duplicate uuid after %d in %v: %s", cnt, time.Since(start), s) + return + } + uuids[s] = true + if time.Since(start) > duration { + return + } + cnt++ + } +} diff --git a/vendor/github.com/google/uuid/sql_test.go b/vendor/github.com/google/uuid/sql_test.go new file mode 100644 index 0000000000..1803dfd879 --- /dev/null +++ b/vendor/github.com/google/uuid/sql_test.go @@ -0,0 +1,113 @@ +// Copyright 2016 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "strings" + "testing" +) + +func TestScan(t *testing.T) { + stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479" + badTypeTest := 6 + invalidTest := "f47ac10b-58cc-0372-8567-0e02b2c3d4" + + byteTest := make([]byte, 16) + byteTestUUID := Must(Parse(stringTest)) + copy(byteTest, byteTestUUID[:]) + + // sunny day tests + + var uuid UUID + err := (&uuid).Scan(stringTest) + if err != nil { + t.Fatal(err) + } + + err = (&uuid).Scan([]byte(stringTest)) + if err != nil { + t.Fatal(err) + } + + err = (&uuid).Scan(byteTest) + if err != nil { + t.Fatal(err) + } + + // bad type tests + + err = (&uuid).Scan(badTypeTest) + if err == nil { + t.Error("int correctly parsed and shouldn't have") + } + if !strings.Contains(err.Error(), "unable to scan type") { + t.Error("attempting to parse an int returned an incorrect error message") + } + + // invalid/incomplete uuids + + err = (&uuid).Scan(invalidTest) + if err == nil { + t.Error("invalid uuid was parsed without error") + } + if !strings.Contains(err.Error(), "invalid UUID") { + t.Error("attempting to parse an invalid UUID returned an incorrect error message") + } + + err = (&uuid).Scan(byteTest[:len(byteTest)-2]) + if err == nil { + t.Error("invalid byte uuid was parsed without error") + } + if !strings.Contains(err.Error(), "invalid UUID") { + t.Error("attempting to parse an invalid byte UUID returned an incorrect error message") + } + + // empty tests + + uuid = UUID{} + var emptySlice []byte + err = (&uuid).Scan(emptySlice) + if err != nil { + t.Fatal(err) + } + + for _, v := range uuid { + if v != 0 { + t.Error("UUID was not nil after scanning empty byte slice") + } + } + + uuid = UUID{} + var emptyString string + err = (&uuid).Scan(emptyString) + if err != nil { + t.Fatal(err) + } + for _, v := range uuid { + if v != 0 { + t.Error("UUID was not nil after scanning empty byte slice") + } + } + + uuid = UUID{} + err = (&uuid).Scan(nil) + if err != nil { + t.Fatal(err) + } + for _, v := range uuid { + if v != 0 { + t.Error("UUID was not nil after scanning nil") + } + } +} + +func TestValue(t *testing.T) { + stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479" + uuid := Must(Parse(stringTest)) + val, _ := uuid.Value() + if val != stringTest { + t.Error("Value() did not return expected string") + } +} diff --git a/vendor/github.com/google/uuid/uuid_test.go b/vendor/github.com/google/uuid/uuid_test.go new file mode 100644 index 0000000000..e7876f151a --- /dev/null +++ b/vendor/github.com/google/uuid/uuid_test.go @@ -0,0 +1,559 @@ +// Copyright 2016 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "bytes" + "fmt" + "os" + "runtime" + "strings" + "testing" + "time" + "unsafe" +) + +type test struct { + in string + version Version + variant Variant + isuuid bool +} + +var tests = []test{ + {"f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, RFC4122, true}, + {"f47ac10b-58cc-1372-8567-0e02b2c3d479", 1, RFC4122, true}, + {"f47ac10b-58cc-2372-8567-0e02b2c3d479", 2, RFC4122, true}, + {"f47ac10b-58cc-3372-8567-0e02b2c3d479", 3, RFC4122, true}, + {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-5372-8567-0e02b2c3d479", 5, RFC4122, true}, + {"f47ac10b-58cc-6372-8567-0e02b2c3d479", 6, RFC4122, true}, + {"f47ac10b-58cc-7372-8567-0e02b2c3d479", 7, RFC4122, true}, + {"f47ac10b-58cc-8372-8567-0e02b2c3d479", 8, RFC4122, true}, + {"f47ac10b-58cc-9372-8567-0e02b2c3d479", 9, RFC4122, true}, + {"f47ac10b-58cc-a372-8567-0e02b2c3d479", 10, RFC4122, true}, + {"f47ac10b-58cc-b372-8567-0e02b2c3d479", 11, RFC4122, true}, + {"f47ac10b-58cc-c372-8567-0e02b2c3d479", 12, RFC4122, true}, + {"f47ac10b-58cc-d372-8567-0e02b2c3d479", 13, RFC4122, true}, + {"f47ac10b-58cc-e372-8567-0e02b2c3d479", 14, RFC4122, true}, + {"f47ac10b-58cc-f372-8567-0e02b2c3d479", 15, RFC4122, true}, + + {"urn:uuid:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"URN:UUID:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-1567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-2567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-3567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-4567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-5567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-6567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-7567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-9567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-a567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-b567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-c567-0e02b2c3d479", 4, Microsoft, true}, + {"f47ac10b-58cc-4372-d567-0e02b2c3d479", 4, Microsoft, true}, + {"f47ac10b-58cc-4372-e567-0e02b2c3d479", 4, Future, true}, + {"f47ac10b-58cc-4372-f567-0e02b2c3d479", 4, Future, true}, + + + {"f47ac10b158cc-5372-a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc25372-a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-53723a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-5372-a56740e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-5372-a567-0e02-2c3d479", 0, Invalid, false}, + {"g47ac10b-58cc-4372-a567-0e02b2c3d479", 0, Invalid, false}, + + + {"{f47ac10b-58cc-0372-8567-0e02b2c3d479}", 0, RFC4122, true}, + {"{f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-0372-8567-0e02b2c3d479}", 0, Invalid, false}, + + {"f47ac10b58cc037285670e02b2c3d479", 0, RFC4122, true}, + {"f47ac10b58cc037285670e02b2c3d4790", 0, Invalid, false}, + {"f47ac10b58cc037285670e02b2c3d47", 0, Invalid, false}, +} + +var constants = []struct { + c interface{} + name string +}{ + {Person, "Person"}, + {Group, "Group"}, + {Org, "Org"}, + {Invalid, "Invalid"}, + {RFC4122, "RFC4122"}, + {Reserved, "Reserved"}, + {Microsoft, "Microsoft"}, + {Future, "Future"}, + {Domain(17), "Domain17"}, + {Variant(42), "BadVariant42"}, +} + +func testTest(t *testing.T, in string, tt test) { + uuid, err := Parse(in) + if ok := (err == nil); ok != tt.isuuid { + t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid) + } + if err != nil { + return + } + + if v := uuid.Variant(); v != tt.variant { + t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant) + } + if v := uuid.Version(); v != tt.version { + t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version) + } +} + +func testBytes(t *testing.T, in []byte, tt test) { + uuid, err := ParseBytes(in) + if ok := (err == nil); ok != tt.isuuid { + t.Errorf("ParseBytes(%s) got %v expected %v\b", in, ok, tt.isuuid) + } + if err != nil { + return + } + suuid, _ := Parse(string(in)) + if uuid != suuid { + t.Errorf("ParseBytes(%s) got %v expected %v\b", in, uuid, suuid) + } +} + +func TestUUID(t *testing.T) { + for _, tt := range tests { + testTest(t, tt.in, tt) + testTest(t, strings.ToUpper(tt.in), tt) + testBytes(t, []byte(tt.in), tt) + } +} + +func TestFromBytes(t *testing.T) { + b := []byte{ + 0x7d, 0x44, 0x48, 0x40, + 0x9d, 0xc0, + 0x11, 0xd1, + 0xb2, 0x45, + 0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2, + } + uuid, err := FromBytes(b) + if err != nil { + t.Fatalf("%s", err) + } + for i := 0; i < len(uuid); i++ { + if b[i] != uuid[i] { + t.Fatalf("FromBytes() got %v expected %v\b", uuid[:], b) + } + } +} + +func TestConstants(t *testing.T) { + for x, tt := range constants { + v, ok := tt.c.(fmt.Stringer) + if !ok { + t.Errorf("%x: %v: not a stringer", x, v) + } else if s := v.String(); s != tt.name { + v, _ := tt.c.(int) + t.Errorf("%x: Constant %T:%d gives %q, expected %q", x, tt.c, v, s, tt.name) + } + } +} + +func TestRandomUUID(t *testing.T) { + m := make(map[string]bool) + for x := 1; x < 32; x++ { + uuid := New() + s := uuid.String() + if m[s] { + t.Errorf("NewRandom returned duplicated UUID %s", s) + } + m[s] = true + if v := uuid.Version(); v != 4 { + t.Errorf("Random UUID of version %s", v) + } + if uuid.Variant() != RFC4122 { + t.Errorf("Random UUID is variant %d", uuid.Variant()) + } + } +} + +func TestNew(t *testing.T) { + m := make(map[UUID]bool) + for x := 1; x < 32; x++ { + s := New() + if m[s] { + t.Errorf("New returned duplicated UUID %s", s) + } + m[s] = true + uuid, err := Parse(s.String()) + if err != nil { + t.Errorf("New.String() returned %q which does not decode", s) + continue + } + if v := uuid.Version(); v != 4 { + t.Errorf("Random UUID of version %s", v) + } + if uuid.Variant() != RFC4122 { + t.Errorf("Random UUID is variant %d", uuid.Variant()) + } + } +} + +func TestClockSeq(t *testing.T) { + // Fake time.Now for this test to return a monotonically advancing time; restore it at end. + defer func(orig func() time.Time) { timeNow = orig }(timeNow) + monTime := time.Now() + timeNow = func() time.Time { + monTime = monTime.Add(1 * time.Second) + return monTime + } + + SetClockSequence(-1) + uuid1, err := NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + uuid2, err := NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + + if s1, s2 := uuid1.ClockSequence(), uuid2.ClockSequence(); s1 != s2 { + t.Errorf("clock sequence %d != %d", s1, s2) + } + + SetClockSequence(-1) + uuid2, err = NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + + // Just on the very off chance we generated the same sequence + // two times we try again. + if uuid1.ClockSequence() == uuid2.ClockSequence() { + SetClockSequence(-1) + uuid2, err = NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + } + if s1, s2 := uuid1.ClockSequence(), uuid2.ClockSequence(); s1 == s2 { + t.Errorf("Duplicate clock sequence %d", s1) + } + + SetClockSequence(0x1234) + uuid1, err = NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + if seq := uuid1.ClockSequence(); seq != 0x1234 { + t.Errorf("%s: expected seq 0x1234 got 0x%04x", uuid1, seq) + } +} + +func TestCoding(t *testing.T) { + text := "7d444840-9dc0-11d1-b245-5ffdce74fad2" + urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2" + data := UUID{ + 0x7d, 0x44, 0x48, 0x40, + 0x9d, 0xc0, + 0x11, 0xd1, + 0xb2, 0x45, + 0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2, + } + if v := data.String(); v != text { + t.Errorf("%x: encoded to %s, expected %s", data, v, text) + } + if v := data.URN(); v != urn { + t.Errorf("%x: urn is %s, expected %s", data, v, urn) + } + + uuid, err := Parse(text) + if err != nil { + t.Errorf("Parse returned unexpected error %v", err) + } + if data != uuid { + t.Errorf("%s: decoded to %s, expected %s", text, uuid, data) + } +} + +func TestVersion1(t *testing.T) { + uuid1, err := NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + uuid2, err := NewUUID() + if err != nil { + t.Fatalf("could not create UUID: %v", err) + } + + if uuid1 == uuid2 { + t.Errorf("%s:duplicate uuid", uuid1) + } + if v := uuid1.Version(); v != 1 { + t.Errorf("%s: version %s expected 1", uuid1, v) + } + if v := uuid2.Version(); v != 1 { + t.Errorf("%s: version %s expected 1", uuid2, v) + } + n1 := uuid1.NodeID() + n2 := uuid2.NodeID() + if !bytes.Equal(n1, n2) { + t.Errorf("Different nodes %x != %x", n1, n2) + } + t1 := uuid1.Time() + t2 := uuid2.Time() + q1 := uuid1.ClockSequence() + q2 := uuid2.ClockSequence() + + switch { + case t1 == t2 && q1 == q2: + t.Error("time stopped") + case t1 > t2 && q1 == q2: + t.Error("time reversed") + case t1 < t2 && q1 != q2: + t.Error("clock sequence changed unexpectedly") + } +} + +func TestNode(t *testing.T) { + // This test is mostly to make sure we don't leave nodeMu locked. + ifname = "" + if ni := NodeInterface(); ni != "" { + t.Errorf("NodeInterface got %q, want %q", ni, "") + } + if SetNodeInterface("xyzzy") { + t.Error("SetNodeInterface succeeded on a bad interface name") + } + if !SetNodeInterface("") { + t.Error("SetNodeInterface failed") + } + if runtime.GOARCH != "js" { + if ni := NodeInterface(); ni == "" { + t.Error("NodeInterface returned an empty string") + } + } + + ni := NodeID() + if len(ni) != 6 { + t.Errorf("ni got %d bytes, want 6", len(ni)) + } + hasData := false + for _, b := range ni { + if b != 0 { + hasData = true + } + } + if !hasData { + t.Error("nodeid is all zeros") + } + + id := []byte{1, 2, 3, 4, 5, 6, 7, 8} + SetNodeID(id) + ni = NodeID() + if !bytes.Equal(ni, id[:6]) { + t.Errorf("got nodeid %v, want %v", ni, id[:6]) + } + + if ni := NodeInterface(); ni != "user" { + t.Errorf("got interface %q, want %q", ni, "user") + } +} + +func TestNodeAndTime(t *testing.T) { + // Time is February 5, 1998 12:30:23.136364800 AM GMT + + uuid, err := Parse("7d444840-9dc0-11d1-b245-5ffdce74fad2") + if err != nil { + t.Fatalf("Parser returned unexpected error %v", err) + } + node := []byte{0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2} + + ts := uuid.Time() + c := time.Unix(ts.UnixTime()) + want := time.Date(1998, 2, 5, 0, 30, 23, 136364800, time.UTC) + if !c.Equal(want) { + t.Errorf("Got time %v, want %v", c, want) + } + if !bytes.Equal(node, uuid.NodeID()) { + t.Errorf("Expected node %v got %v", node, uuid.NodeID()) + } +} + +func TestMD5(t *testing.T) { + uuid := NewMD5(NameSpaceDNS, []byte("python.org")).String() + want := "6fa459ea-ee8a-3ca4-894e-db77e160355e" + if uuid != want { + t.Errorf("MD5: got %q expected %q", uuid, want) + } +} + +func TestSHA1(t *testing.T) { + uuid := NewSHA1(NameSpaceDNS, []byte("python.org")).String() + want := "886313e1-3b8a-5372-9b90-0c9aee199e5d" + if uuid != want { + t.Errorf("SHA1: got %q expected %q", uuid, want) + } +} + +func TestNodeID(t *testing.T) { + nid := []byte{1, 2, 3, 4, 5, 6} + SetNodeInterface("") + s := NodeInterface() + if runtime.GOARCH != "js" { + if s == "" || s == "user" { + t.Errorf("NodeInterface %q after SetInterface", s) + } + } + node1 := NodeID() + if node1 == nil { + t.Error("NodeID nil after SetNodeInterface", s) + } + SetNodeID(nid) + s = NodeInterface() + if s != "user" { + t.Errorf("Expected NodeInterface %q got %q", "user", s) + } + node2 := NodeID() + if node2 == nil { + t.Error("NodeID nil after SetNodeID", s) + } + if bytes.Equal(node1, node2) { + t.Error("NodeID not changed after SetNodeID", s) + } else if !bytes.Equal(nid, node2) { + t.Errorf("NodeID is %x, expected %x", node2, nid) + } +} + +func testDCE(t *testing.T, name string, uuid UUID, err error, domain Domain, id uint32) { + if err != nil { + t.Errorf("%s failed: %v", name, err) + return + } + if v := uuid.Version(); v != 2 { + t.Errorf("%s: %s: expected version 2, got %s", name, uuid, v) + return + } + if v := uuid.Domain(); v != domain { + t.Errorf("%s: %s: expected domain %d, got %d", name, uuid, domain, v) + } + if v := uuid.ID(); v != id { + t.Errorf("%s: %s: expected id %d, got %d", name, uuid, id, v) + } +} + +func TestDCE(t *testing.T) { + uuid, err := NewDCESecurity(42, 12345678) + testDCE(t, "NewDCESecurity", uuid, err, 42, 12345678) + uuid, err = NewDCEPerson() + testDCE(t, "NewDCEPerson", uuid, err, Person, uint32(os.Getuid())) + uuid, err = NewDCEGroup() + testDCE(t, "NewDCEGroup", uuid, err, Group, uint32(os.Getgid())) +} + +type badRand struct{} + +func (r badRand) Read(buf []byte) (int, error) { + for i := range buf { + buf[i] = byte(i) + } + return len(buf), nil +} + +func TestBadRand(t *testing.T) { + SetRand(badRand{}) + uuid1 := New() + uuid2 := New() + if uuid1 != uuid2 { + t.Errorf("expected duplicates, got %q and %q", uuid1, uuid2) + } + SetRand(nil) + uuid1 = New() + uuid2 = New() + if uuid1 == uuid2 { + t.Errorf("unexpected duplicates, got %q", uuid1) + } +} + +var asString = "f47ac10b-58cc-0372-8567-0e02b2c3d479" +var asBytes = []byte(asString) + +func BenchmarkParse(b *testing.B) { + for i := 0; i < b.N; i++ { + _, err := Parse(asString) + if err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkParseBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + _, err := ParseBytes(asBytes) + if err != nil { + b.Fatal(err) + } + } +} + +// parseBytesUnsafe is to benchmark using unsafe. +func parseBytesUnsafe(b []byte) (UUID, error) { + return Parse(*(*string)(unsafe.Pointer(&b))) +} + +func BenchmarkParseBytesUnsafe(b *testing.B) { + for i := 0; i < b.N; i++ { + _, err := parseBytesUnsafe(asBytes) + if err != nil { + b.Fatal(err) + } + } +} + +// parseBytesCopy is to benchmark not using unsafe. +func parseBytesCopy(b []byte) (UUID, error) { + return Parse(string(b)) +} + +func BenchmarkParseBytesCopy(b *testing.B) { + for i := 0; i < b.N; i++ { + _, err := parseBytesCopy(asBytes) + if err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkNew(b *testing.B) { + for i := 0; i < b.N; i++ { + New() + } +} + +func BenchmarkUUID_String(b *testing.B) { + uuid, err := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if err != nil { + b.Fatal(err) + } + for i := 0; i < b.N; i++ { + if uuid.String() == "" { + b.Fatal("invalid uuid") + } + } +} + +func BenchmarkUUID_URN(b *testing.B) { + uuid, err := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if err != nil { + b.Fatal(err) + } + for i := 0; i < b.N; i++ { + if uuid.URN() == "" { + b.Fatal("invalid uuid") + } + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/CHANGELOG.md b/vendor/github.com/ipfs/go-ipfs/CHANGELOG.md index 4f6459eda8..d1489a83ed 100644 --- a/vendor/github.com/ipfs/go-ipfs/CHANGELOG.md +++ b/vendor/github.com/ipfs/go-ipfs/CHANGELOG.md @@ -1,5 +1,677 @@ # go-ipfs changelog +## 0.4.19 2018-03-01 + +We're happy to announce go 0.4.19. This release contains a bunch of important +fixes and a slew of new and improved features. Get pumped and upgrade ASAP to benefit from all the new goodies! 🎁 + +### Features + +#### 🔌 Initializing With Random Ports + +Go-ipfs can now be configured to listen on a random but _stable_ port (across +restarts) using the new `randomports` configuration profile. This should be +helpful when testing and/or running multiple go-ipfs instances on a single +machine. + +To initialize a go-ipfs instance with a randomly chosen port, run: + +```bash +> ipfs init --profile=randomports +``` + +#### 👂 Gateway Directory Listing + +IPNS (and/or DNSLink) directory listings on the gateway, e.g. +https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/, will now display the _ipfs_ hash of +the current directory. This way users can more easily create permanent links to +otherwise mutable data. + +#### 📡 AutoRelay and AutoNAT + +This release introduces two new experimental features (courtesy of libp2p): +AutoRelay and AutoNAT. + +AutoRelay is a new service that automatically chooses a public relay when it +detects that the go-ipfs node is behind a NAT. While relaying connections +through a third-party node isn't the most efficient way to route around NATs, +it's a reliable fallback. + +To enable AutoRelay, set the `Swarm.EnableAutoRelay` option in the config. + +AutoNAT is the service AutoRelay uses to detect if the node is behind a NAT. You +don't have to set any special config flags to enable it. + +In this same config section, you may also notice options like `EnableRelayHop`, +`EnableAutoNATService`, etc. You _do not_ need to enable these: + +* `EnableRelayHop` -- Allow _other_ nodes to use _your_ node as a relay + (disabled by default). +* `EnableAutoNATService` -- Help _other_ nodes detect if they're behind a NAT + (disabled by default). + +#### 📵 Offline Operation + +There are two new "offline" features in this release: a global `--offline` flag +and an option to configure the gateway to not fetch files. + +Most go-ipfs commands now support the `--offline` flag. This causes IPFS to avoid +network operations when performing the requested operation. If you've ever used +the `--local` flag, the `--offline` flag is the (almost) universally supported +replacement. + +For example: + +* If the daemon is started with `ipfs daemon --offline`, it won't even _connect_ + to the network. (note: this feature isn't new, just an example). +* `ipfs add --offline some_file` won't send out provider records. +* `ipfs cat --offline Qm...` won't fetch any blocks from the network. +* `ipfs block stat --offline Qm...` is a great way to tell if a block is locally + available. + +Note: It doesn't _yet_ work with the `refs`, `urlstore`, or `tar` commands +([#6002](https://github.com/ipfs/go-ipfs/issues/6002)). + +On to the gateway, there's a new `Gateway.NoFetch` option to configure the +gateway to only serve locally present files. This makes it possible to run an +IPFS node as a gateway to serve content of _your_ choosing without acting like a +public proxy. 🤫 + +#### 📍 Adding And Pinning Content + +There's a new `--pin` flag for both `ipfs block put` and `ipfs urlstore add` to +match the `--pin` flag in `ipfs add`. This allows one to atomically add and pin +content with these APIs. + +**NOTE 1:** For `ipfs urlstore add`, `--pin` has been enabled _by default_ to +match the behavior in `ipfs add`. However, `ipfs block put` _does not_ pin by +default to match the _current_ behavior. + +**NOTE 2:** If you had previously used the urlstore and _weren't_ explicitly +pinning content after adding it, it isn't pinned and running the garbage +collector will delete it. While technically documented in the `ipfs urlstore +add` helptext, this behavior was non-obvious and bears mentioning. + +#### 🗂 File Listing + +The `ipfs ls` command has two significant changes this release: it reports +_file_ sizes instead of _dag_ sizes and has gained a new `--stream` flag. + +First up, `ipfs ls` now reports _file_ sizes instead of _dag_ sizes. Previously, +for historical reasons, `ipfs ls` would report the size of a file/directory as +seen by IPFS _including_ all the filesystem datastructures and metadata. +However, this meant that `ls -l` and `ipfs ls` would print _different_ sizes: + +```bash +> ipfs ls /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv + +QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V 1688 about +QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y 200 contact +QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7 322 help +QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y 12 ping +QmXgqKTbzdh83pQtKFb19SpMCpDDcKR2ujqk3pKph9aCNF 1692 quick-start +QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB 1102 readme +QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm 1173 security-notes + +> ipfs get /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv +Saving file(s) to QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv + 6.39 KiB / 6.39 KiB [================================] 100.00% 0s + +> ls -l QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv +total 28 +-rw------- 1 user group 1677 Feb 14 17:03 about +-rw------- 1 user group 189 Feb 14 17:03 contact +-rw------- 1 user group 311 Feb 14 17:03 help +-rw------- 1 user group 4 Feb 14 17:03 ping +-rw------- 1 user group 1681 Feb 14 17:03 quick-start +-rw------- 1 user group 1091 Feb 14 17:03 readme +-rw------- 1 user group 1162 Feb 14 17:03 security-notes +``` + +This is now no longer the case. `ipfs ls` and `ls -l` now return the _same_ +sizes. 🙌 + +Second up, `ipfs ls` now has a new `--stream` flag. In IPFS, very large +directories (e.g., Wikipedia) are split up into multiple chunks (shards) as +there are too many entries to fit in a single block. Unfortunately, `ipfs ls` +buffers the _entire_ file list in memory and then sorts it. This means that +`ipfs ls /ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki` (wikipedia) +will take a _very_ long time to return anything (it'll also use quite a bit of +memory). + +However, the new `--stream` flag makes it possible to stream a directory listing +as new chunks are fetched from the network. To test this, you can run `ipfs ls +--stream --size=false --resolve-type=false +/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki`. You probably won't +want to wait for that command to finish, Wikipedia has a _lot_ of entries. 😉 + +#### 🔁 HTTP Proxy + +This release sees a new (experimental) feature contributed by our friends at +[Peergos](https://peergos.org): HTTP proxy over libp2p. When enabled, the local +gateway can act as an HTTP proxy and forward HTTP requests to libp2p peers. When +combined with the `ipfs p2p` command, users can use this to expose HTTP services +to other go-ipfs nodes via their gateways. For details, check out the +[documentation](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#p2p-http-proxy). + +### Performance And Reliability + +This release introduces quite a few performance/reliability improvements and, as +usual, fixes several memory leaks. Below is a non-exhaustive list of noticeable changes. + +#### 📞 DHT + +This release includes an important DHT fix that should significantly: + +1. Reduce dialing. +2. Speed up DHT queries. +3. Improve performance of the gateways. + +Basically, in the worst case, a DHT query would turn into a random walk of the +entire IPFS network. Yikes! + +Relevant PR: https://github.com/libp2p/go-libp2p-kad-dht/pull/237 + +#### 🕸 Bitswap + +Bitswap sessions have improved and are now used for _all_ requests. Sessions +allow us to group related content and ask peers most likely to _have_ the +content instead of broadcasting the request to all connected peers. This gives +us two significant benefits: + +1. Less wasted upload bandwidth. Instead of broadcasting which blocks we want to + everyone, we can ask fewer peers thus reducing the number of requests we send + out. +2. Less wasted download bandwidth. Because we _know_ which peers likely have + content, we can ask an individual peer for a block and expect to get an + answer. In the past, we'd ask every peer at the same time to optimize for + latency at the expense of bandwidth (getting the same block from multiple + peers). We had to do this because we had to assume that _most_ peers didn't + have the requested block. + +#### ‼️ Pubsub + +This release includes some significant reliability improvements in pubsub +subscription handling. If you've previously had issues with connected pubsub +peers _not_ seeing each-other's messages, please upgrade ASAP. + +#### ♻️ Reuseport + +In this release, we've rewritten our previously error-prone `go-reuseport` +library to _not_ duplicate a significant portion of Go's low-level networking +code. This was made possible by Go's new `Control` +[`net.Dialer`](https://golang.org/pkg/net/#Dialer) option. + +In the past, our first suggestion to anyone experiencing weird resource or +connectivity issues was to disable `REUSEPORT` (set `IPFS_REUSEPORT` to false). +This should no longer be necessary. + +#### 🐺 Badger Datastore + +[Badger has reached 1.0][badger-release]. This release brings an audit and +numerous reliability fixes. We are now reasonably confident that badger will +become the default datastore in a future release. 👍 + +[badger-release]: https://blog.dgraph.io/post/releasing-v1.0/ + +This release also adds a new `Truncate` configuration option for the badger +datastore (enabled by default for new IPFS nodes). When enabled, badger will +_delete_ any un-synced data on start instead of simply refusing to start. This +should be safe on all filesystems where the `sync` operation is safe and removes +the need for manual intervention when restarting an IPFS node after a crash. + +Assuming you initialized your badger repo with `ipfs init --profile=badgerds`, +you can enable truncate on an existing repo by running: `ipfs config --json +"Datastore.Spec.child.truncate" true`. + +### Refactors and Endeavors + +#### 🕹 Commands Library + +The legacy commands library shim has now been completely removed. This won't +mean much for many users but the go-ipfs team is happy to have this behind them. + +#### 🌐 Base32 CIDs + +This release can now encode CIDs in responses in bases other than base58. This +is primarily useful for web-browser integration as it allows us to (a) encode +CIDs in a lower-case base (e.g., base32) and then use them in the _origin_ part +of URLs. The take away is: this release brings us a step closer to better +browser integration. + +Specifically, this release adds two flags: + +1. `--cid-base`: When specified, the IPFS CLI will encode all CIDv1 CIDs using the + requested base. +2. `--upgrade-cidv0-in-output`: When specified, the IPFS CLI will _upgrade_ CIDv0 + CIDs to CIDv1 CIDs when returning them to the user. This upgrade is necessary + because CIDv0 doesn't support multibase however, it's off by default as it + changes the _binary_ representation of the CIDs (which could have unintended + consequences). + +#### 🎛 CoreAPI + +The work on the CoreAPI refactor ([ipfs/go-ipfs#4498][]) has progressed leaps and +bounds this release. The CoreAPI is a comprehensive programmatic interface +designed to allow go-ipfs be used as a daemon or a library interchangeably. + +As of this release, go-ipfs now has: + +* External interface definitions in [ipfs/interface-go-ipfs-core][]. +* A work-in-progress implementation ([ipfs/go-ipfs-http-client][]) of these + interfaces that uses the IPFS HTTP API. This will replace the + ([ipfs/go-ipfs-api][]) library. +* A new plugin type ["Daemon"][daemon-plugin]. Daemon plugins are started and + stopped along with the go-ipfs daemon and are instantiated with a copy of the + CoreAPI. This allows them to control and extend the go-ipfs daemon from within + the daemon itself. + +The next steps are: + +1. Finishing the remaining API surface area. At the moment, the two key missing + parts are: + 1. Config manipulation. + 2. The `ipfs files` API. +1. Finalizing the [ipfs/go-ipfs-http-client][] implementation. +2. Creating a simple way to construct and initialize a go-ipfs node when using + go-ipfs as a library. + +[ipfs/go-ipfs#4498]: https://github.com/ipfs/go-ipfs/issues/4498 +[ipfs/interface-go-ipfs-core]: https://github.com/ipfs/interface-go-ipfs-core +[ipfs/go-ipfs-http-client]: https://github.com/ipfs/go-ipfs-http-client +[ipfs/go-ipfs-api]: https://github.com/ipfs/go-ipfs-http-client +[daemon-plugin]: https://github.com/ipfs/go-ipfs/blob/master/docs/plugins.md#daemon + +### Changelogs + +- github.com/ipfs/go-ipfs: + - fix: show interactive output from install.sh ([ipfs/go-ipfs#6024](https://github.com/ipfs/go-ipfs/pull/6024)) + - fix: return the shortest, completely resolved path in the resolve command ([ipfs/go-ipfs#5704](https://github.com/ipfs/go-ipfs/pull/5704)) + - fix a few interop test issues ([ipfs/go-ipfs#6004](https://github.com/ipfs/go-ipfs/pull/6004)) + - fix HAMT bookmark ln ([ipfs/go-ipfs#6005](https://github.com/ipfs/go-ipfs/pull/6005)) + - docs: document Gateway.NoFetch ([ipfs/go-ipfs#5999](https://github.com/ipfs/go-ipfs/pull/5999)) + - Improve "name publish" ttl option documentation ([ipfs/go-ipfs#5979](https://github.com/ipfs/go-ipfs/pull/5979)) + - fix(cmd/mv): dst filename error ([ipfs/go-ipfs#5964](https://github.com/ipfs/go-ipfs/pull/5964)) + - coreapi: extract interface ([ipfs/go-ipfs#5978](https://github.com/ipfs/go-ipfs/pull/5978)) + - coreapi: cleanup non-gx references ([ipfs/go-ipfs#5976](https://github.com/ipfs/go-ipfs/pull/5976)) + - coreapi: fix seek test on http impl ([ipfs/go-ipfs#5971](https://github.com/ipfs/go-ipfs/pull/5971)) + - block put --pin ([ipfs/go-ipfs#5969](https://github.com/ipfs/go-ipfs/pull/5969)) + - Port `ipfs ls` to CoreAPI ([ipfs/go-ipfs#5962](https://github.com/ipfs/go-ipfs/pull/5962)) + - docs: duplicate default helptext in `name publish` ([ipfs/go-ipfs#5960](https://github.com/ipfs/go-ipfs/pull/5960)) + - plugin: add a daemon plugin with access to the CoreAPI ([ipfs/go-ipfs#5955](https://github.com/ipfs/go-ipfs/pull/5955)) + - coreapi: add some seeker tests ([ipfs/go-ipfs#5934](https://github.com/ipfs/go-ipfs/pull/5934)) + - Refactor ipfs get to use CoreAPI ([ipfs/go-ipfs#5943](https://github.com/ipfs/go-ipfs/pull/5943)) + - refact(cmd/init): change string option to const ([ipfs/go-ipfs#5949](https://github.com/ipfs/go-ipfs/pull/5949)) + - cmds/pin: use coreapi/pin ([ipfs/go-ipfs#5843](https://github.com/ipfs/go-ipfs/pull/5843)) + - Only perform DNSLink lookups on fully qualified domain names (FQDN) ([ipfs/go-ipfs#5950](https://github.com/ipfs/go-ipfs/pull/5950)) + - Fix DontCheckOSXFUSE config command example ([ipfs/go-ipfs#5951](https://github.com/ipfs/go-ipfs/pull/5951)) + - refact(cmd/config): change string option to const ([ipfs/go-ipfs#5948](https://github.com/ipfs/go-ipfs/pull/5948)) + - clarification the document of --resolve flag in name.publish ([ipfs/go-ipfs#5651](https://github.com/ipfs/go-ipfs/pull/5651)) + - Drop some coreunix code ([ipfs/go-ipfs#5938](https://github.com/ipfs/go-ipfs/pull/5938)) + - commands: fix verbose flag ([ipfs/go-ipfs#5940](https://github.com/ipfs/go-ipfs/pull/5940)) + - Fixes #4558 ([ipfs/go-ipfs#5937](https://github.com/ipfs/go-ipfs/pull/5937)) + - Port dag commansds to CoreAPI ([ipfs/go-ipfs#5939](https://github.com/ipfs/go-ipfs/pull/5939)) + - mfs: make sure to flush after mv and chcid ([ipfs/go-ipfs#5936](https://github.com/ipfs/go-ipfs/pull/5936)) + - docs/code-flow : Add code flow documentation for add cmd. ([ipfs/go-ipfs#5864](https://github.com/ipfs/go-ipfs/pull/5864)) + - coreapi: few more error check fixes ([ipfs/go-ipfs#5935](https://github.com/ipfs/go-ipfs/pull/5935)) + - Fixed and cleaned up TestIpfsStressRead ([ipfs/go-ipfs#5920](https://github.com/ipfs/go-ipfs/pull/5920)) + - Clarify that chunker sizes are in bytes ([ipfs/go-ipfs#5923](https://github.com/ipfs/go-ipfs/pull/5923)) + - refact(cmd/patch): change string to const ([ipfs/go-ipfs#5931](https://github.com/ipfs/go-ipfs/pull/5931)) + - refact(cmd/object): change option string to const ([ipfs/go-ipfs#5932](https://github.com/ipfs/go-ipfs/pull/5932)) + - coreapi: replace coreiface.DagAPI with ipld.DAGService ([ipfs/go-ipfs#5922](https://github.com/ipfs/go-ipfs/pull/5922)) + - Add global option to specify the multibase encoding (server side) ([ipfs/go-ipfs#5789](https://github.com/ipfs/go-ipfs/pull/5789)) + - coreapi: Adjust some tests for go-ipfs-http-api ([ipfs/go-ipfs#5926](https://github.com/ipfs/go-ipfs/pull/5926)) + - chore: update to Web UI v2.3.3 ([ipfs/go-ipfs#5928](https://github.com/ipfs/go-ipfs/pull/5928)) + - ls: Report real file size ([ipfs/go-ipfs#5906](https://github.com/ipfs/go-ipfs/pull/5906)) + - Improve the Filestore document ([ipfs/go-ipfs#5927](https://github.com/ipfs/go-ipfs/pull/5927)) + - [CORS] Bubble go-ipfs-cmds 2.0.10 - Updates CORS library ([ipfs/go-ipfs#5919](https://github.com/ipfs/go-ipfs/pull/5919)) + - reduce verbosity of daemon start ([ipfs/go-ipfs#5904](https://github.com/ipfs/go-ipfs/pull/5904)) + - feat: update to Web UI v2.3.2 ([ipfs/go-ipfs#5899](https://github.com/ipfs/go-ipfs/pull/5899)) + - CoreAPI: Don't panic when testing incomplete implementions ([ipfs/go-ipfs#5900](https://github.com/ipfs/go-ipfs/pull/5900)) + - gateway: fix CORs headers ([ipfs/go-ipfs#5893](https://github.com/ipfs/go-ipfs/pull/5893)) + - Local Gateway option ([ipfs/go-ipfs#5649](https://github.com/ipfs/go-ipfs/pull/5649)) + - Show hash on gateway ([ipfs/go-ipfs#5830](https://github.com/ipfs/go-ipfs/pull/5830)) + - fix: ulimit docs mistake ([ipfs/go-ipfs#5894](https://github.com/ipfs/go-ipfs/pull/5894)) + - Move coreapi tests to the interface ([ipfs/go-ipfs#5865](https://github.com/ipfs/go-ipfs/pull/5865)) + - Move checkHelptextRecursive forward a bit ([ipfs/go-ipfs#5889](https://github.com/ipfs/go-ipfs/pull/5889)) + - coreapi/unixfs: Use path instead of raw hash in AddEvent ([ipfs/go-ipfs#5854](https://github.com/ipfs/go-ipfs/pull/5854)) + - Fix name resolve --offline ([ipfs/go-ipfs#5885](https://github.com/ipfs/go-ipfs/pull/5885)) + - testing: slow down republisher sharness test ([ipfs/go-ipfs#5856](https://github.com/ipfs/go-ipfs/pull/5856)) + - docs: flesh out plugin documentation ([ipfs/go-ipfs#5876](https://github.com/ipfs/go-ipfs/pull/5876)) + - main: move InterruptHandler to util ([ipfs/go-ipfs#5872](https://github.com/ipfs/go-ipfs/pull/5872)) + - make: fix building source tarball on macos ([ipfs/go-ipfs#5860](https://github.com/ipfs/go-ipfs/pull/5860)) + - fix config data race ([ipfs/go-ipfs#5634](https://github.com/ipfs/go-ipfs/pull/5634)) + - CoreAPI: Global offline option ([ipfs/go-ipfs#5825](https://github.com/ipfs/go-ipfs/pull/5825)) + - Update for go-ipfs-files refactor ([ipfs/go-ipfs#5661](https://github.com/ipfs/go-ipfs/pull/5661)) + - feat: update Web UI to v2.3.0 ([ipfs/go-ipfs#5855](https://github.com/ipfs/go-ipfs/pull/5855)) + - Stateful plugin loading ([ipfs/go-ipfs#4806](https://github.com/ipfs/go-ipfs/pull/4806)) + - startup: always load the private key ([ipfs/go-ipfs#5844](https://github.com/ipfs/go-ipfs/pull/5844)) + - add --dereference-args parameter ([ipfs/go-ipfs#5801](https://github.com/ipfs/go-ipfs/pull/5801)) + - config: document the connection manager ([ipfs/go-ipfs#5839](https://github.com/ipfs/go-ipfs/pull/5839)) + - add pinning support to the urlstore ([ipfs/go-ipfs#5834](https://github.com/ipfs/go-ipfs/pull/5834)) + - refact(cmd/cat): remove useless code ([ipfs/go-ipfs#5836](https://github.com/ipfs/go-ipfs/pull/5836)) + - Really run as non-root user in docker container ([ipfs/go-ipfs#5048](https://github.com/ipfs/go-ipfs/pull/5048)) + - README: document guix package ([ipfs/go-ipfs#5832](https://github.com/ipfs/go-ipfs/pull/5832)) + - docs: Improve config documentation ([ipfs/go-ipfs#5829](https://github.com/ipfs/go-ipfs/pull/5829)) + - block: rm extra output ([ipfs/go-ipfs#5751](https://github.com/ipfs/go-ipfs/pull/5751)) + - merge github-issue-guide with the issue template ([ipfs/go-ipfs#4636](https://github.com/ipfs/go-ipfs/pull/4636)) + - docs: fix inconsistent capitalization of "API". ([ipfs/go-ipfs#5824](https://github.com/ipfs/go-ipfs/pull/5824)) + - Update README.md ([ipfs/go-ipfs#5818](https://github.com/ipfs/go-ipfs/pull/5818)) + - CONTRIBUTING.md link ([ipfs/go-ipfs#5811](https://github.com/ipfs/go-ipfs/pull/5811)) + - README: Update required Go version ([ipfs/go-ipfs#5813](https://github.com/ipfs/go-ipfs/pull/5813)) + - p2p: report-peer-id option for listen ([ipfs/go-ipfs#5771](https://github.com/ipfs/go-ipfs/pull/5771)) + - really fix netcat race ([ipfs/go-ipfs#5803](https://github.com/ipfs/go-ipfs/pull/5803)) + - [http_proxy_over_p2p] ([ipfs/go-ipfs#5526](https://github.com/ipfs/go-ipfs/pull/5526)) + - coreapi/pin: Use CID's directly in maps instead of converting to string ([ipfs/go-ipfs#5809](https://github.com/ipfs/go-ipfs/pull/5809)) + - Gx update go-merkledag and related deps. ([ipfs/go-ipfs#5802](https://github.com/ipfs/go-ipfs/pull/5802)) + - cmds: rm old lib ([ipfs/go-ipfs#5786](https://github.com/ipfs/go-ipfs/pull/5786)) + - badger: add truncate flag ([ipfs/go-ipfs#5625](https://github.com/ipfs/go-ipfs/pull/5625)) + - docker: allow IPFS_PROFILE to choose the profile for `ipfs init` ([ipfs/go-ipfs#5473](https://github.com/ipfs/go-ipfs/pull/5473)) + - Add --stream option to `ls` command ([ipfs/go-ipfs#5611](https://github.com/ipfs/go-ipfs/pull/5611)) + - Switch to using request.Context() ([ipfs/go-ipfs#5782](https://github.com/ipfs/go-ipfs/pull/5782)) + - Update go-ipfs-delay and assoc deps ([ipfs/go-ipfs#5762](https://github.com/ipfs/go-ipfs/pull/5762)) + - Suppress bootstrap error ([ipfs/go-ipfs#5769](https://github.com/ipfs/go-ipfs/pull/5769)) + - ISSUE_TEMPLATE: move the support question comment to the very top ([ipfs/go-ipfs#5770](https://github.com/ipfs/go-ipfs/pull/5770)) + - cmds: use MakeTypedEncoder ([ipfs/go-ipfs#5760](https://github.com/ipfs/go-ipfs/pull/5760)) + - cmds/bitswap: sort wantlist ([ipfs/go-ipfs#5759](https://github.com/ipfs/go-ipfs/pull/5759)) + - cmds/update: use new cmds lib ([ipfs/go-ipfs#5730](https://github.com/ipfs/go-ipfs/pull/5730)) + - cmds/file: use new cmds lib ([ipfs/go-ipfs#5756](https://github.com/ipfs/go-ipfs/pull/5756)) + - cmds: remove reduntant func ([ipfs/go-ipfs#5750](https://github.com/ipfs/go-ipfs/pull/5750)) + - commands/refs: use new cmds ([ipfs/go-ipfs#5679](https://github.com/ipfs/go-ipfs/pull/5679)) + - commands/pin: use new cmds lib ([ipfs/go-ipfs#5674](https://github.com/ipfs/go-ipfs/pull/5674)) + - commands/boostrap: use new cmds ([ipfs/go-ipfs#5678](https://github.com/ipfs/go-ipfs/pull/5678)) + - fix(cmd/add): progressbar output error when input is read from stdin ([ipfs/go-ipfs#5743](https://github.com/ipfs/go-ipfs/pull/5743)) + - unexport GOFLAGS ([ipfs/go-ipfs#5747](https://github.com/ipfs/go-ipfs/pull/5747)) + - refactor(cmds): use new cmds ([ipfs/go-ipfs#5659](https://github.com/ipfs/go-ipfs/pull/5659)) + - commands/filestore: use new cmds lib ([ipfs/go-ipfs#5673](https://github.com/ipfs/go-ipfs/pull/5673)) + - Fix broken links ([ipfs/go-ipfs#5721](https://github.com/ipfs/go-ipfs/pull/5721)) + - fix `ipfs help` bug #5557 ([ipfs/go-ipfs#5573](https://github.com/ipfs/go-ipfs/pull/5573)) + - commands/bitswap: use new cmds lib ([ipfs/go-ipfs#5676](https://github.com/ipfs/go-ipfs/pull/5676)) + - refact(cmd/repo): repo's sub cmds uses new cmd lib ([ipfs/go-ipfs#5677](https://github.com/ipfs/go-ipfs/pull/5677)) + - fix the maketarball script ([ipfs/go-ipfs#5718](https://github.com/ipfs/go-ipfs/pull/5718)) + - output link to WebUI on daemon startup ([ipfs/go-ipfs#5729](https://github.com/ipfs/go-ipfs/pull/5729)) + - Move persistent datastores to plugins ([ipfs/go-ipfs#5695](https://github.com/ipfs/go-ipfs/pull/5695)) + - Update IPTB test ([ipfs/go-ipfs#5636](https://github.com/ipfs/go-ipfs/pull/5636)) + - enhance(cmd/verify): add goroutine count to improve verify speed ([ipfs/go-ipfs#5710](https://github.com/ipfs/go-ipfs/pull/5710)) + - Update go-mfs and go-unixfs ([ipfs/go-ipfs#5714](https://github.com/ipfs/go-ipfs/pull/5714)) + - fix(flag/version): flag `all` should have a higher priority ([ipfs/go-ipfs#5719](https://github.com/ipfs/go-ipfs/pull/5719)) + - commands/p2p: use new cmds lib ([ipfs/go-ipfs#5672](https://github.com/ipfs/go-ipfs/pull/5672)) + - commands/dht: use new cmds lib ([ipfs/go-ipfs#5671](https://github.com/ipfs/go-ipfs/pull/5671)) + - commands/object: use new cmds ([ipfs/go-ipfs#5666](https://github.com/ipfs/go-ipfs/pull/5666)) + - commands/files: use new cmds ([ipfs/go-ipfs#5665](https://github.com/ipfs/go-ipfs/pull/5665)) + - cmds/env: add a config path helper ([ipfs/go-ipfs#5712](https://github.com/ipfs/go-ipfs/pull/5712)) +- github.com/ipfs/dir-index-html: + - show hash if given ([ipfs/dir-index-html#21](https://github.com/ipfs/dir-index-html/pull/21)) + - Add "jpeg" as an alias to "jpg". ([ipfs/dir-index-html#16](https://github.com/ipfs/dir-index-html/pull/16)) +- github.com/libp2p/go-addr-util: + - Improve test coverage ([libp2p/go-addr-util#14](https://github.com/libp2p/go-addr-util/pull/14)) +- github.com/ipfs/go-bitswap: + - fix(prq): fix a bunch of goroutine leaks and deadlocks ([ipfs/go-bitswap#87](https://github.com/ipfs/go-bitswap/pull/87)) + - remove allocations round two ([ipfs/go-bitswap#84](https://github.com/ipfs/go-bitswap/pull/84)) + - fix(bitswap): remove CancelWants function ([ipfs/go-bitswap#80](https://github.com/ipfs/go-bitswap/pull/80)) + - Avoid allocating for wantlist entries ([ipfs/go-bitswap#79](https://github.com/ipfs/go-bitswap/pull/79)) + - ci(Jenkins): remove Jenkinsfile ([ipfs/go-bitswap#83](https://github.com/ipfs/go-bitswap/pull/83)) + - More specific wantlists ([ipfs/go-bitswap#74](https://github.com/ipfs/go-bitswap/pull/74)) + - fix(wantlist): remove races on setup ([ipfs/go-bitswap#72](https://github.com/ipfs/go-bitswap/pull/72)) + - fix multiple data races ([ipfs/go-bitswap#76](https://github.com/ipfs/go-bitswap/pull/76)) + - ci: add travis ([ipfs/go-bitswap#75](https://github.com/ipfs/go-bitswap/pull/75)) + - providers: don't add every connected node as a provider ([ipfs/go-bitswap#59](https://github.com/ipfs/go-bitswap/pull/59)) + - refactor(GetBlocks): Merge session/non-session ([ipfs/go-bitswap#64](https://github.com/ipfs/go-bitswap/pull/64)) + - Feat: A more robust provider finder for sessions (for now) and soon for all bitswap ([ipfs/go-bitswap#60](https://github.com/ipfs/go-bitswap/pull/60)) + - fix(tests): stabilize session tests ([ipfs/go-bitswap#63](https://github.com/ipfs/go-bitswap/pull/63)) + - contexts: make sure to abort when a context is canceled ([ipfs/go-bitswap#58](https://github.com/ipfs/go-bitswap/pull/58)) + - fix(sessions): explicitly connect found peers ([ipfs/go-bitswap#56](https://github.com/ipfs/go-bitswap/pull/56)) + - Speed up sessions Round #1 ([ipfs/go-bitswap#27](https://github.com/ipfs/go-bitswap/pull/27)) + - Fix debug log formatting issues ([ipfs/go-bitswap#37](https://github.com/ipfs/go-bitswap/pull/37)) + - Feat/bandwidth limited tests ([ipfs/go-bitswap#42](https://github.com/ipfs/go-bitswap/pull/42)) + - fix(tests): stabilize unreliable session tests ([ipfs/go-bitswap#44](https://github.com/ipfs/go-bitswap/pull/44)) + - Bitswap Refactor #4: Extract session peer manager from sessions ([ipfs/go-bitswap#26](https://github.com/ipfs/go-bitswap/pull/26)) + - Bitswap Refactor #3: Extract sessions to package ([ipfs/go-bitswap#30](https://github.com/ipfs/go-bitswap/pull/30)) + - docs(comments): end comment sentences to have full-stop ([ipfs/go-bitswap#33](https://github.com/ipfs/go-bitswap/pull/33)) + - Bitswap Refactor #2: Extract PeerManager From Want Manager + Unit Test ([ipfs/go-bitswap#29](https://github.com/ipfs/go-bitswap/pull/29)) + - Bitswap Refactor #1: Session Manager & Extract Want Manager ([ipfs/go-bitswap#28](https://github.com/ipfs/go-bitswap/pull/28)) + - fix(Receiver): Ignore unwanted blocks ([ipfs/go-bitswap#24](https://github.com/ipfs/go-bitswap/pull/24)) + - feat(Benchmarks): Add real world dup blocks test ([ipfs/go-bitswap#25](https://github.com/ipfs/go-bitswap/pull/25)) + - Feat/bitswap pr improvements ([ipfs/go-bitswap#19](https://github.com/ipfs/go-bitswap/pull/19)) +- github.com/ipfs/go-blockservice: + - Don't return errors on closed exchange ([ipfs/go-blockservice#15](https://github.com/ipfs/go-blockservice/pull/15)) +- github.com/ipfs/go-cid: + - fix inline CIDs generated by Prefix.Sum ([ipfs/go-cid#84](https://github.com/ipfs/go-cid/pull/84)) + - Let Cid implement Binary[Un]Marshaler and Text[Un]Marshaler interfaces. ([ipfs/go-cid#81](https://github.com/ipfs/go-cid/pull/81)) + - fix typo in comment ([ipfs/go-cid#80](https://github.com/ipfs/go-cid/pull/80)) + - add codecs for Dash blocks, tx ([ipfs/go-cid#78](https://github.com/ipfs/go-cid/pull/78)) +- github.com/ipfs/go-cidutil: + - Fix Travis CI to run all tests. ([ipfs/go-cidutil#11](https://github.com/ipfs/go-cidutil/pull/11)) + - Changes needed for `--cid-base` option in go-ipfs (simplified vesion) ([ipfs/go-cidutil#10](https://github.com/ipfs/go-cidutil/pull/10)) + - add a utility method for sorting CID slices ([ipfs/go-cidutil#5](https://github.com/ipfs/go-cidutil/pull/5)) +- github.com/libp2p/go-conn-security: + - fix link to usage example in README ([libp2p/go-conn-security#4](https://github.com/libp2p/go-conn-security/pull/4)) +- github.com/ipfs/go-datastore: + - interfaces: make GetBacked* take a Read instead of a Datastore ([ipfs/go-datastore#115](https://github.com/ipfs/go-datastore/pull/115)) + - remove closer type assertions ([ipfs/go-datastore#112](https://github.com/ipfs/go-datastore/pull/112)) + - remove io.Closer from the transaction interface ([ipfs/go-datastore#113](https://github.com/ipfs/go-datastore/pull/113)) + - feat(datastore): expose datastore Close() ([ipfs/go-datastore#111](https://github.com/ipfs/go-datastore/pull/111)) + - query: make datastore ordering act like a user would expect ([ipfs/go-datastore#110](https://github.com/ipfs/go-datastore/pull/110)) + - delayed: implement io.Closer and export datastore type. ([ipfs/go-datastore#108](https://github.com/ipfs/go-datastore/pull/108)) + - split the datastore into a read and a write interface ([ipfs/go-datastore#107](https://github.com/ipfs/go-datastore/pull/107)) + - Describe behavior of Batching datastores ([ipfs/go-datastore#105](https://github.com/ipfs/go-datastore/pull/105)) + - handle concurrent puts/deletes in BasicBatch ([ipfs/go-datastore#103](https://github.com/ipfs/go-datastore/pull/103)) + - add a GetSize method ([ipfs/go-datastore#99](https://github.com/ipfs/go-datastore/pull/99)) +- github.com/ipfs/go-ds-badger: + - removed additional/wasteful Prefix conversion ([ipfs/go-ds-badger#45](https://github.com/ipfs/go-ds-badger/pull/45)) + - Enable Jenkins ([ipfs/go-ds-badger#35](https://github.com/ipfs/go-ds-badger/pull/35)) + - fix application or ordering for interface change ([ipfs/go-ds-badger#44](https://github.com/ipfs/go-ds-badger/pull/44)) + - Update badger ([ipfs/go-ds-badger#40](https://github.com/ipfs/go-ds-badger/pull/40)) +- github.com/ipfs/go-ds-flatfs: + - fix a goroutine leak killing the gateways ([ipfs/go-ds-flatfs#51](https://github.com/ipfs/go-ds-flatfs/pull/51)) +- github.com/ipfs/go-ds-leveldb: + - Expose Datastore type ([ipfs/go-ds-leveldb#20](https://github.com/ipfs/go-ds-leveldb/pull/20)) + - fix application or ordering for interface change ([ipfs/go-ds-leveldb#23](https://github.com/ipfs/go-ds-leveldb/pull/23)) +- github.com/ipfs/go-ipfs-cmds: + - fix sync error with go1.12 on darwin ([ipfs/go-ipfs-cmds#147](https://github.com/ipfs/go-ipfs-cmds/pull/147)) + - cli: fix ignoring std{out,err} sync errors on windows ([ipfs/go-ipfs-cmds#146](https://github.com/ipfs/go-ipfs-cmds/pull/146)) + - roundup of cleanup fixes ([ipfs/go-ipfs-cmds#144](https://github.com/ipfs/go-ipfs-cmds/pull/144)) + - Update cors library ([ipfs/go-ipfs-cmds#139](https://github.com/ipfs/go-ipfs-cmds/pull/139)) + - expand on the api error ([ipfs/go-ipfs-cmds#138](https://github.com/ipfs/go-ipfs-cmds/pull/138)) + - set the connection close header if we have a body to read ([ipfs/go-ipfs-cmds#116](https://github.com/ipfs/go-ipfs-cmds/pull/116)) + - print a nicer error on timeout/cancel ([ipfs/go-ipfs-cmds#137](https://github.com/ipfs/go-ipfs-cmds/pull/137)) + - Add link traversal option ([ipfs/go-ipfs-cmds#96](https://github.com/ipfs/go-ipfs-cmds/pull/96)) + - Don't skip stdin test on Windows ([ipfs/go-ipfs-cmds#136](https://github.com/ipfs/go-ipfs-cmds/pull/136)) + - MakeTypedEncoder: accept results by pointer or value ([ipfs/go-ipfs-cmds#134](https://github.com/ipfs/go-ipfs-cmds/pull/134)) +- github.com/ipfs/go-ipfs-config: + - Gateway.NoFetch ([ipfs/go-ipfs-config#19](https://github.com/ipfs/go-ipfs-config/pull/19)) + - add a Clone function ([ipfs/go-ipfs-config#16](https://github.com/ipfs/go-ipfs-config/pull/16)) + - randomports: give user ability to init ipfs using random port for swarm. ([ipfs/go-ipfs-config#17](https://github.com/ipfs/go-ipfs-config/pull/17)) + - Allow the use of the User-Agent header ([ipfs/go-ipfs-config#15](https://github.com/ipfs/go-ipfs-config/pull/15)) + - autorelay options ([ipfs/go-ipfs-config#21](https://github.com/ipfs/go-ipfs-config/pull/21)) + - profile: add badger truncate option ([ipfs/go-ipfs-config#20](https://github.com/ipfs/go-ipfs-config/pull/20)) +- github.com/ipfs/go-ipfs-delay: + - Feat/refactor wait time ([ipfs/go-ipfs-delay#1](https://github.com/ipfs/go-ipfs-delay/pull/1)) +- github.com/ipfs/go-ipfs-files: + - multipart: fix handling of common prefixes ([ipfs/go-ipfs-files#7](https://github.com/ipfs/go-ipfs-files/pull/7)) + - create implicit directories from multipart requests ([ipfs/go-ipfs-files#6](https://github.com/ipfs/go-ipfs-files/pull/6)) + - TarWriter ([ipfs/go-ipfs-files#4](https://github.com/ipfs/go-ipfs-files/pull/4)) + - Refactor filename - file relation ([ipfs/go-ipfs-files#2](https://github.com/ipfs/go-ipfs-files/pull/2)) +- github.com/ipfs/go-ipld-cbor: + - cbor: decode undefined as null ([ipfs/go-ipld-cbor#54](https://github.com/ipfs/go-ipld-cbor/pull/54)) + - error when trying to encode an empty link ([ipfs/go-ipld-cbor#52](https://github.com/ipfs/go-ipld-cbor/pull/52)) + - test for struct with both a cid and a bigint ([ipfs/go-ipld-cbor#51](https://github.com/ipfs/go-ipld-cbor/pull/51)) +- github.com/ipfs/go-ipld-format: + - Add a DAG walker with support for IPLD `Node`s ([ipfs/go-ipld-format#39](https://github.com/ipfs/go-ipld-format/pull/39)) + - Add BufferedDAG wrapping Batch as a DAGService. ([ipfs/go-ipld-format#48](https://github.com/ipfs/go-ipld-format/pull/48)) +- github.com/ipfs/go-ipld-git: + - Fix blob marshalling ([ipfs/go-ipld-git#37](https://github.com/ipfs/go-ipld-git/pull/37)) + - Re-enable assertion on commit size -- it is correct after #31 ([ipfs/go-ipld-git#33](https://github.com/ipfs/go-ipld-git/pull/33)) + - Use OS path separator in testing, fixes #30 ([ipfs/go-ipld-git#34](https://github.com/ipfs/go-ipld-git/pull/34)) + - Use rawdata length for size, fixes #7 ([ipfs/go-ipld-git#31](https://github.com/ipfs/go-ipld-git/pull/31)) + - Cache RawData for Commit, Tag, & Tree, fixes #6 ([ipfs/go-ipld-git#28](https://github.com/ipfs/go-ipld-git/pull/28)) + - Precompute Blob CID, fixes #21 ([ipfs/go-ipld-git#27](https://github.com/ipfs/go-ipld-git/pull/27)) + - Enable Jenkins ([ipfs/go-ipld-git#29](https://github.com/ipfs/go-ipld-git/pull/29)) +- github.com/ipfs/go-ipns: + - fix community/CONTRIBUTING.md link in README.md ([ipfs/go-ipns#20](https://github.com/ipfs/go-ipns/pull/20)) + - fix typo in README.md ([ipfs/go-ipns#21](https://github.com/ipfs/go-ipns/pull/21)) + - testing: disable inline peer ID test ([ipfs/go-ipns#19](https://github.com/ipfs/go-ipns/pull/19)) +- github.com/libp2p/go-libp2p: + - Fixed race conditions in mock package mock_stream and mock_conn ([libp2p/go-libp2p#535](https://github.com/libp2p/go-libp2p/pull/535)) + - increase initial relay advertisement delay to 30s ([libp2p/go-libp2p#534](https://github.com/libp2p/go-libp2p/pull/534)) + - Use PeerRouting in autorelay to find relay peer addresses ([libp2p/go-libp2p#531](https://github.com/libp2p/go-libp2p/pull/531)) + - docs: update broken links in NEWS.md ([libp2p/go-libp2p#517](https://github.com/libp2p/go-libp2p/pull/517)) + - don't advertise the raw public address in autorelay ([libp2p/go-libp2p#511](https://github.com/libp2p/go-libp2p/pull/511)) + - mock: export ratelimiter as RateLimiter ([libp2p/go-libp2p#507](https://github.com/libp2p/go-libp2p/pull/507)) + - readme: remove duplicate repo entries in README and package-list.json ([libp2p/go-libp2p#506](https://github.com/libp2p/go-libp2p/pull/506)) + - explicit option to enable autorelay ([libp2p/go-libp2p#500](https://github.com/libp2p/go-libp2p/pull/500)) + - Add delay in initial relay advertisement to allow the dht time to bootstrap ([libp2p/go-libp2p#495](https://github.com/libp2p/go-libp2p/pull/495)) + - suppressing error msg for NoSecurity option ([libp2p/go-libp2p#498](https://github.com/libp2p/go-libp2p/pull/498)) + - pulling updates ([libp2p/go-libp2p#4](https://github.com/libp2p/go-libp2p/pull/4)) + - fix contributing link in README ([libp2p/go-libp2p#494](https://github.com/libp2p/go-libp2p/pull/494)) + - Fix badges and links on README.md ([libp2p/go-libp2p#485](https://github.com/libp2p/go-libp2p/pull/485)) + - mocknet: fix NewStream and self dials ([libp2p/go-libp2p#480](https://github.com/libp2p/go-libp2p/pull/480)) + - deflake identify test ([libp2p/go-libp2p#479](https://github.com/libp2p/go-libp2p/pull/479)) + - mocknet: use peer ID in peer address ([libp2p/go-libp2p#476](https://github.com/libp2p/go-libp2p/pull/476)) + - autorelay ([libp2p/go-libp2p#454](https://github.com/libp2p/go-libp2p/pull/454)) + - Getting updates ([libp2p/go-libp2p#3](https://github.com/libp2p/go-libp2p/pull/3)) +- github.com/libp2p/go-libp2p-autonat: + - track autonat peer addresses ([libp2p/go-libp2p-autonat#7](https://github.com/libp2p/go-libp2p-autonat/pull/7)) +- github.com/libp2p/go-libp2p-circuit: + - Don't log raw binary ([libp2p/go-libp2p-circuit#53](https://github.com/libp2p/go-libp2p-circuit/pull/53)) +- github.com/libp2p/go-libp2p-connmgr: + - Fix concurrency and silence period not being honoured ([libp2p/go-libp2p-connmgr#26](https://github.com/libp2p/go-libp2p-connmgr/pull/26)) +- github.com/libp2p/go-libp2p-crypto: + - Fix: Remove redundant Ed25519 public key (#36). ([libp2p/go-libp2p-crypto#54](https://github.com/libp2p/go-libp2p-crypto/pull/54)) + - libp2p badges, remove IPFS ([libp2p/go-libp2p-crypto#52](https://github.com/libp2p/go-libp2p-crypto/pull/52)) + - Fix broken contribute link in README ([libp2p/go-libp2p-crypto#46](https://github.com/libp2p/go-libp2p-crypto/pull/46)) + - forbid RSA keys smaller than 512 bits ([libp2p/go-libp2p-crypto#43](https://github.com/libp2p/go-libp2p-crypto/pull/43)) + - Added ECDSA; Added RSA tests; Fixed linting errors; Handling all un-handled errors ([libp2p/go-libp2p-crypto#35](https://github.com/libp2p/go-libp2p-crypto/pull/35)) + - switch to the go-crypto ed25519 implementation ([libp2p/go-libp2p-crypto#38](https://github.com/libp2p/go-libp2p-crypto/pull/38)) + - update gogo protobuf ([libp2p/go-libp2p-crypto#37](https://github.com/libp2p/go-libp2p-crypto/pull/37)) +- github.com/libp2p/go-libp2p-discovery: + - add a timeout to Provide in routing.Advertise ([libp2p/go-libp2p-discovery#12](https://github.com/libp2p/go-libp2p-discovery/pull/12)) + - correctly encode ns to CID ([libp2p/go-libp2p-discovery#11](https://github.com/libp2p/go-libp2p-discovery/pull/11)) + - use 6hrs as ttl for routing based advertisements ([libp2p/go-libp2p-discovery#8](https://github.com/libp2p/go-libp2p-discovery/pull/8)) +- github.com/libp2p/go-libp2p-host: + - Helper to get PeerInfo from Host ([libp2p/go-libp2p-host#20](https://github.com/libp2p/go-libp2p-host/pull/20)) +- github.com/libp2p/go-libp2p-kad-dht: + - fix(dialQueue): account for failed dials ([libp2p/go-libp2p-kad-dht#277](https://github.com/libp2p/go-libp2p-kad-dht/pull/277)) + - Fix Bootstrap sub-queries ([libp2p/go-libp2p-kad-dht#264](https://github.com/libp2p/go-libp2p-kad-dht/pull/264)) + - dial queue: fix possible goroutine leak ([libp2p/go-libp2p-kad-dht#262](https://github.com/libp2p/go-libp2p-kad-dht/pull/262)) + - Alter some logging ([libp2p/go-libp2p-kad-dht#269](https://github.com/libp2p/go-libp2p-kad-dht/pull/269)) + - Revert #236: Test go mod in travis and use major versioning in import paths ([libp2p/go-libp2p-kad-dht#259](https://github.com/libp2p/go-libp2p-kad-dht/pull/259)) + - fix tests on freebsd ([libp2p/go-libp2p-kad-dht#255](https://github.com/libp2p/go-libp2p-kad-dht/pull/255)) + - Fix "no protocol with name dnsaddr" error ([libp2p/go-libp2p-kad-dht#247](https://github.com/libp2p/go-libp2p-kad-dht/pull/247)) + - Fix a race in dial queue ([libp2p/go-libp2p-kad-dht#248](https://github.com/libp2p/go-libp2p-kad-dht/pull/248)) + - Fix races with DialQueue variables ([libp2p/go-libp2p-kad-dht#241](https://github.com/libp2p/go-libp2p-kad-dht/pull/241)) + - Fix CircleCI ([libp2p/go-libp2p-kad-dht#238](https://github.com/libp2p/go-libp2p-kad-dht/pull/238)) + - Adaptive queue for staging dials ([libp2p/go-libp2p-kad-dht#237](https://github.com/libp2p/go-libp2p-kad-dht/pull/237)) + - Add the full libp2p default bootstrap peer list ([libp2p/go-libp2p-kad-dht#226](https://github.com/libp2p/go-libp2p-kad-dht/pull/226)) + - Revert "Tidy up bootstrapping" ([libp2p/go-libp2p-kad-dht#232](https://github.com/libp2p/go-libp2p-kad-dht/pull/232)) + - Tidy up bootstrapping ([libp2p/go-libp2p-kad-dht#225](https://github.com/libp2p/go-libp2p-kad-dht/pull/225)) + - Revert "Remove signal bootstrapping" ([libp2p/go-libp2p-kad-dht#227](https://github.com/libp2p/go-libp2p-kad-dht/pull/227)) + - Remove signal bootstrapping ([libp2p/go-libp2p-kad-dht#224](https://github.com/libp2p/go-libp2p-kad-dht/pull/224)) + - fix a potential DHT query hang ([libp2p/go-libp2p-kad-dht#219](https://github.com/libp2p/go-libp2p-kad-dht/pull/219)) + - docs: duplicate pkg documentation ([libp2p/go-libp2p-kad-dht#218](https://github.com/libp2p/go-libp2p-kad-dht/pull/218)) + - tests: skip key inlining test ([libp2p/go-libp2p-kad-dht#212](https://github.com/libp2p/go-libp2p-kad-dht/pull/212)) + - Rephrase "betterPeersToQuery" method comment to be less cryptic ([libp2p/go-libp2p-kad-dht#206](https://github.com/libp2p/go-libp2p-kad-dht/pull/206)) +- github.com/libp2p/go-libp2p-loggables: + - test: add unit tests ([libp2p/go-libp2p-loggables#21](https://github.com/libp2p/go-libp2p-loggables/pull/21)) +- github.com/libp2p/go-libp2p-netutil: + - Add tests ([libp2p/go-libp2p-netutil#28](https://github.com/libp2p/go-libp2p-netutil/pull/28)) +- github.com/libp2p/go-libp2p-peer: + - fix: re-enable peer ID inlining but make it configurable ([libp2p/go-libp2p-peer#42](https://github.com/libp2p/go-libp2p-peer/pull/42)) + - Protobuf and JSON (un-)marshalling methods for peer.ID ([libp2p/go-libp2p-peer#41](https://github.com/libp2p/go-libp2p-peer/pull/41)) + - disable key inlining ([libp2p/go-libp2p-peer#40](https://github.com/libp2p/go-libp2p-peer/pull/40)) +- github.com/libp2p/go-libp2p-peerstore: + - Add unit test to verify AddAddr doesn't shorten TTL ([libp2p/go-libp2p-peerstore#52](https://github.com/libp2p/go-libp2p-peerstore/pull/52)) + - disable inline-peer id test ([libp2p/go-libp2p-peerstore#49](https://github.com/libp2p/go-libp2p-peerstore/pull/49)) + - README: Update contributing guideline linkrot. ([libp2p/go-libp2p-peerstore#48](https://github.com/libp2p/go-libp2p-peerstore/pull/48)) + - Deterministic benchmark order; Keybook interface benchmarks ([libp2p/go-libp2p-peerstore#43](https://github.com/libp2p/go-libp2p-peerstore/pull/43)) + - PeerInfo UnMarshal Error #393 ([libp2p/go-libp2p-peerstore#45](https://github.com/libp2p/go-libp2p-peerstore/pull/45)) + - fix the inline key test ([libp2p/go-libp2p-peerstore#44](https://github.com/libp2p/go-libp2p-peerstore/pull/44)) +- github.com/libp2p/go-libp2p-pubsub: + - move timecache check/update after validation ([libp2p/go-libp2p-pubsub#156](https://github.com/libp2p/go-libp2p-pubsub/pull/156)) + - fix nonsensical check ([libp2p/go-libp2p-pubsub#154](https://github.com/libp2p/go-libp2p-pubsub/pull/154)) + - Extend validator interface to include message source ([libp2p/go-libp2p-pubsub#151](https://github.com/libp2p/go-libp2p-pubsub/pull/151)) + - Implement peer blacklist ([libp2p/go-libp2p-pubsub#149](https://github.com/libp2p/go-libp2p-pubsub/pull/149)) + - make timecache duration configurable ([libp2p/go-libp2p-pubsub#148](https://github.com/libp2p/go-libp2p-pubsub/pull/148)) + - godoc is not html either ([libp2p/go-libp2p-pubsub#147](https://github.com/libp2p/go-libp2p-pubsub/pull/147)) + - godoc documentation is not markdown ([libp2p/go-libp2p-pubsub#146](https://github.com/libp2p/go-libp2p-pubsub/pull/146)) + - Add documentation for subscribe's non-instanteneous semantics ([libp2p/go-libp2p-pubsub#145](https://github.com/libp2p/go-libp2p-pubsub/pull/145)) + - Some documentation ([libp2p/go-libp2p-pubsub#140](https://github.com/libp2p/go-libp2p-pubsub/pull/140)) + - rework peer tracking logic to handle multiple connections ([libp2p/go-libp2p-pubsub#132](https://github.com/libp2p/go-libp2p-pubsub/pull/132)) +- github.com/libp2p/go-libp2p-pubsub-router: + - encode record-store keys in pubsub ([libp2p/go-libp2p-pubsub-router#17](https://github.com/libp2p/go-libp2p-pubsub-router/pull/17)) +- github.com/libp2p/go-libp2p-quic-transport: + - fix badges in README ([libp2p/go-libp2p-quic-transport#39](https://github.com/libp2p/go-libp2p-quic-transport/pull/39)) + - Fix missing transport parameter in dialed connection ([libp2p/go-libp2p-quic-transport#38](https://github.com/libp2p/go-libp2p-quic-transport/pull/38)) +- github.com/libp2p/go-libp2p-routing: + - Update the comment on IpfsRouting.Bootstrap ([libp2p/go-libp2p-routing#36](https://github.com/libp2p/go-libp2p-routing/pull/36)) +- github.com/libp2p/go-libp2p-swarm: + - Make FD limits configurable by environment property ([libp2p/go-libp2p-swarm#102](https://github.com/libp2p/go-libp2p-swarm/pull/102)) + - Fix logging race ([libp2p/go-libp2p-swarm#100](https://github.com/libp2p/go-libp2p-swarm/pull/100)) + - Add CircleCI config ([libp2p/go-libp2p-swarm#99](https://github.com/libp2p/go-libp2p-swarm/pull/99)) + - Enhance debug logging in dial limiter ([libp2p/go-libp2p-swarm#98](https://github.com/libp2p/go-libp2p-swarm/pull/98)) + - dialer: handle dial cancel and/or completion before trying new addresses ([libp2p/go-libp2p-swarm#96](https://github.com/libp2p/go-libp2p-swarm/pull/96)) + - avoid spawning goroutines for canceled dials ([libp2p/go-libp2p-swarm#95](https://github.com/libp2p/go-libp2p-swarm/pull/95)) + - warn when we encounter a useless transport ([libp2p/go-libp2p-swarm#90](https://github.com/libp2p/go-libp2p-swarm/pull/90)) +- github.com/libp2p/go-libp2p-transport: + - fix transport tests for quic ([libp2p/go-libp2p-transport#39](https://github.com/libp2p/go-libp2p-transport/pull/39)) + - fix: fully close streams before returning ([libp2p/go-libp2p-transport#37](https://github.com/libp2p/go-libp2p-transport/pull/37)) + - fix typo in README ([libp2p/go-libp2p-transport#36](https://github.com/libp2p/go-libp2p-transport/pull/36)) +- github.com/libp2p/go-libp2p-transport-upgrader: + - annotate errors ([libp2p/go-libp2p-transport-upgrader#11](https://github.com/libp2p/go-libp2p-transport-upgrader/pull/11)) +- github.com/ipfs/go-log: + - uglify the (event) logs ([ipfs/go-log#53](https://github.com/ipfs/go-log/pull/53)) + - add environment variable for writing tracing information to a file ([ipfs/go-log#52](https://github.com/ipfs/go-log/pull/52)) + - correctly display the line number when FinishWithErr fails ([ipfs/go-log#51](https://github.com/ipfs/go-log/pull/51)) +- github.com/libp2p/go-maddr-filter: + - test: extend test to improve coverage ([libp2p/go-maddr-filter#7](https://github.com/libp2p/go-maddr-filter/pull/7)) +- github.com/ipfs/go-merkledag: + - Increase FetchGraphConcurrency to 32 ([ipfs/go-merkledag#29](https://github.com/ipfs/go-merkledag/pull/29)) + - Enable CI ([ipfs/go-merkledag#9](https://github.com/ipfs/go-merkledag/pull/9)) + - fix a fetch deadlock on error ([ipfs/go-merkledag#21](https://github.com/ipfs/go-merkledag/pull/21)) + - Wait for all go routines to finish before function returns ([ipfs/go-merkledag#19](https://github.com/ipfs/go-merkledag/pull/19)) +- github.com/ipfs/go-metrics-prometheus: + - use prometheus instead of gxed ([ipfs/go-metrics-prometheus#3](https://github.com/ipfs/go-metrics-prometheus/pull/3)) +- github.com/ipfs/go-mfs: + - fix(mv): dst filename error ([ipfs/go-mfs#62](https://github.com/ipfs/go-mfs/pull/62)) + - fix over-wait in WaitPub ([ipfs/go-mfs#53](https://github.com/ipfs/go-mfs/pull/53)) + - Fix/32/pr ports from go-ipfs to go-mfs ([ipfs/go-mfs#49](https://github.com/ipfs/go-mfs/pull/49)) + - remove the `fullSync` option from `updateChildEntry` ([ipfs/go-mfs#45](https://github.com/ipfs/go-mfs/pull/45)) + - Various refactorings ([ipfs/go-mfs#36](https://github.com/ipfs/go-mfs/pull/36)) + - use RW lock for the `File`'s lock ([ipfs/go-mfs#43](https://github.com/ipfs/go-mfs/pull/43)) + - add documentation links in README ([ipfs/go-mfs#41](https://github.com/ipfs/go-mfs/pull/41)) + - [WIP] documentation notes ([ipfs/go-mfs#27](https://github.com/ipfs/go-mfs/pull/27)) + - feat(inode): add inode struct ([ipfs/go-mfs#12](https://github.com/ipfs/go-mfs/pull/12)) +- github.com/libp2p/go-mplex: + - fix deadlock ([libp2p/go-mplex#39](https://github.com/libp2p/go-mplex/pull/39)) + - When a stream is closed, cancel pending writes ([libp2p/go-mplex#35](https://github.com/libp2p/go-mplex/pull/35)) + - make sure to but the buffer back in the pool ([libp2p/go-mplex#34](https://github.com/libp2p/go-mplex/pull/34)) + - reduce the packet count ([libp2p/go-mplex#29](https://github.com/libp2p/go-mplex/pull/29)) +- github.com/ipfs/go-path: + - fix: no components error ([ipfs/go-path#18](https://github.com/ipfs/go-path/pull/18)) + - nit: validate CIDs in IPLD paths ([ipfs/go-path#16](https://github.com/ipfs/go-path/pull/16)) +- github.com/libp2p/go-reuseport: + - Fix build on wasm ([libp2p/go-reuseport#59](https://github.com/libp2p/go-reuseport/pull/59)) + - Use Go Control API ([libp2p/go-reuseport#56](https://github.com/libp2p/go-reuseport/pull/56)) + - Support WASM ([libp2p/go-reuseport#54](https://github.com/libp2p/go-reuseport/pull/54)) +- github.com/libp2p/go-reuseport-transport: + - Update to go-reuseport 0.2.0 ([libp2p/go-reuseport-transport#6](https://github.com/libp2p/go-reuseport-transport/pull/6)) +- github.com/libp2p/go-stream-muxer: + - add standard reset error ([libp2p/go-stream-muxer#23](https://github.com/libp2p/go-stream-muxer/pull/23)) + - ci: fix ([libp2p/go-stream-muxer#24](https://github.com/libp2p/go-stream-muxer/pull/24)) + - Document Reset versus Close ([libp2p/go-stream-muxer#18](https://github.com/libp2p/go-stream-muxer/pull/18)) + - WIP document Conn.Close ([libp2p/go-stream-muxer#19](https://github.com/libp2p/go-stream-muxer/pull/19)) +- github.com/libp2p/go-tcp-transport: + - Deprecate IPFS_REUSEPORT, use LIBP2P_TCP_REUSEPORT ([libp2p/go-tcp-transport#27](https://github.com/libp2p/go-tcp-transport/pull/27)) +- github.com/ipfs/go-unixfs: + - unixfile: precalc dir size ([ipfs/go-unixfs#61](https://github.com/ipfs/go-unixfs/pull/61)) + - Archive refactor ([ipfs/go-unixfs#59](https://github.com/ipfs/go-unixfs/pull/59)) + - decouple the DAG traversal logic from the DAG reader (local branch) ([ipfs/go-unixfs#60](https://github.com/ipfs/go-unixfs/pull/60)) + - Unixfs: enforce refs on files when using nocopy ([ipfs/go-unixfs#56](https://github.com/ipfs/go-unixfs/pull/56)) + - Fix/handle overflow ([ipfs/go-unixfs#53](https://github.com/ipfs/go-unixfs/pull/53)) + - feat(Directory): Add EnumLinksAsync method ([ipfs/go-unixfs#39](https://github.com/ipfs/go-unixfs/pull/39)) + + + ## 0.4.18 2018-10-26 This is probably one of the largest go-ipfs releases in recent history, 3 months @@ -39,7 +711,7 @@ For us, this means (eventually): However, we still have a long way to go. While we encourage users to test this, the IETF QUIC protocol is still being actively developed and *will* change. You can find instructions for enabling it -[here](https://github.com/ipfs/go-ipfs/docs/experimental-features.md#QUIC). +[here](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#QUIC). #### Pubsub @@ -50,13 +722,13 @@ The gossipsub routing algorithm is *significantly* more efficient than the current floodsub routing algorithm. Even better, it's fully backwards compatible so you can enable it and still talk to nodes using the floodsub algorithm. You can find instructions to enable gossipsub in go-ipfs -[here](https://github.com/ipfs/go-ipfs/docs/experimental-features.md#gossipsub). +[here](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#gossipsub). Messages are now signed by their authors. While signing has now been enabled by default, strict signature verification has not been and will not be for at least one release (probably multiple) to avoid breaking existing applications. You can read about how to configure this feature -[here](https://github.com/ipfs/go-ipfs/docs/experimental-features.md#message-signing). +[here](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#message-signing). #### Commands @@ -84,7 +756,7 @@ bafybeicg2rebjoofv4kbyovkw7af3rpiitvnl6i7ckcywaq6xjcxnc2mby The refactored `ipfs p2p` command allows forwarding TCP streams through two IPFS nodes from one host to another. It's `ssh -L` but for IPFS. You can find documentation -[here](https://github.com/ipfs/go-ipfs/docs/experimental-features.md#ipfs-p2p). +[here](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-p2p). It's still experimental but we don't expect too many breaking changes at this point (it will very likely be stabilized in the next release). Quick summary of breaking changes: diff --git a/vendor/github.com/ipfs/go-ipfs/Dockerfile b/vendor/github.com/ipfs/go-ipfs/Dockerfile index 405af06606..07d3904ad0 100644 --- a/vendor/github.com/ipfs/go-ipfs/Dockerfile +++ b/vendor/github.com/ipfs/go-ipfs/Dockerfile @@ -60,12 +60,15 @@ EXPOSE 8080 # Swarm Websockets; must be exposed publicly when the node is listening using the websocket transport (/ipX/.../tcp/8081/ws). EXPOSE 8081 -# Create the fs-repo directory and switch to a non-privileged user. +# Create the fs-repo directory ENV IPFS_PATH /data/ipfs RUN mkdir -p $IPFS_PATH \ && adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \ && chown ipfs:users $IPFS_PATH +# Switch to a non-privileged user +USER ipfs + # Expose the fs-repo as a volume. # start_ipfs initializes an fs-repo if none is mounted. # Important this happens after the USER directive so permission are correct. diff --git a/vendor/github.com/ipfs/go-ipfs/Dockerfile.fast b/vendor/github.com/ipfs/go-ipfs/Dockerfile.fast index 0c03328eb2..4775ee1a2f 100644 --- a/vendor/github.com/ipfs/go-ipfs/Dockerfile.fast +++ b/vendor/github.com/ipfs/go-ipfs/Dockerfile.fast @@ -53,14 +53,18 @@ EXPOSE 5001 EXPOSE 8080 EXPOSE 8081 -# Create the fs-repo directory and switch to a non-privileged user. +# Create the fs-repo directory ENV IPFS_PATH /data/ipfs RUN mkdir -p $IPFS_PATH \ && useradd -s /usr/sbin/nologin -d $IPFS_PATH -u 1000 -G users ipfs \ && chown ipfs:users $IPFS_PATH +# Switch to a non-privileged user +USER ipfs + # Expose the fs-repo as a volume. # start_ipfs initializes an fs-repo if none is mounted. +# Important this happens after the USER directive so permission are correct. VOLUME $IPFS_PATH # The default logging level diff --git a/vendor/github.com/ipfs/go-ipfs/ISSUE_TEMPLATE.md b/vendor/github.com/ipfs/go-ipfs/ISSUE_TEMPLATE.md index 7c6a3bbce4..5f014947e2 100644 --- a/vendor/github.com/ipfs/go-ipfs/ISSUE_TEMPLATE.md +++ b/vendor/github.com/ipfs/go-ipfs/ISSUE_TEMPLATE.md @@ -1,38 +1,39 @@ - #### Version information: - +Please check dist.ipfs.io for a newer version of go-ipfs and update if necessary. Report back if the problem persists. -#### Type: - +If you can't run `ipfs version --all` or that command fails, include as much information as you can: IPFS version, computer architecture (e.g., Intel x86 64bit), operating system, etc. --> -#### Description: +#### Type: + +#### Description: + diff --git a/vendor/github.com/ipfs/go-ipfs/README.md b/vendor/github.com/ipfs/go-ipfs/README.md index 552f5eb4dd..4dfb83806d 100644 --- a/vendor/github.com/ipfs/go-ipfs/README.md +++ b/vendor/github.com/ipfs/go-ipfs/README.md @@ -58,7 +58,7 @@ If the issue is a protocol weakness that cannot be immediately exploited or some ## Install -The canonical download instructions for IPFS are over at: http://ipfs.io/docs/install/. It is **highly suggested** you follow those instructions if you are not interested in working on IPFS development. +The canonical download instructions for IPFS are over at: https://docs.ipfs.io/introduction/install/. It is **highly suggested** you follow those instructions if you are not interested in working on IPFS development. ### System Requirements @@ -101,8 +101,17 @@ For Linux and MacOSX you can use the purely functional package manager [Nix](htt ``` $ nix-env -i ipfs ``` + You can also install the Package by using it's attribute name, which is also `ipfs`. +#### Guix + +GNU's functional package manager, [Guix](https://www.gnu.org/software/guix/), also provides a go-ipfs package: + +``` +$ guix package -i go-ipfs +``` + #### Snap With snap, in any of the [supported Linux distributions](https://snapcraft.io/docs/core/install): @@ -115,7 +124,7 @@ $ sudo snap install ipfs #### Install Go -The build process for ipfs requires Go 1.10 or higher. If you don't have it: [Download Go 1.10+](https://golang.org/dl/). +The build process for ipfs requires Go 1.11 or higher. If you don't have it: [Download Go 1.11+](https://golang.org/dl/). You'll need to add Go's bin directories to your `$PATH` environment variable e.g., by adding these lines to your `/etc/profile` (for a system-wide installation) or `$HOME/.profile`: @@ -317,6 +326,10 @@ Stop the running container: docker stop ipfs_host +When starting a container running ipfs for the first time with an empty data directory, it will call `ipfs init` to initialize configuration files and generate a new keypair. At this time, you can choose which profile to apply using the `IPFS_PROFILE` environment variable: + + docker run -d --name ipfs_host -e IPFS_PROFILE=server -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 4001:4001 -p 127.0.0.1:8080:8080 -p 127.0.0.1:5001:5001 ipfs/go-ipfs:latest + ### Troubleshooting If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning `ipfs init`. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries. @@ -390,6 +403,7 @@ Some places to get you started on the codebase: - libp2p: https://github.com/libp2p/go-libp2p - DHT: https://github.com/libp2p/go-libp2p-kad-dht - PubSub: https://github.com/libp2p/go-libp2p-pubsub +- [IPFS : The `Add` command demystified](https://github.com/ipfs/go-ipfs/tree/master/docs/add-code-flow.md) ### CLI, HTTP-API, Architecture Diagram @@ -415,7 +429,7 @@ Find more documentation for developers on [docs](./docs) ## Contributing -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) We ❤️ all [our contributors](docs/AUTHORS); this project wouldn’t be what it is without you! If you want to help out, please see [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/vendor/github.com/ipfs/go-ipfs/assets/assets.go b/vendor/github.com/ipfs/go-ipfs/assets/assets.go index ce8bbc49a4..3db8e1082f 100644 --- a/vendor/github.com/ipfs/go-ipfs/assets/assets.go +++ b/vendor/github.com/ipfs/go-ipfs/assets/assets.go @@ -1,22 +1,23 @@ -//go:generate go-bindata -pkg=assets -prefix=$GOPATH/src/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1 init-doc $GOPATH/src/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html +//go:generate go-bindata -pkg=assets -prefix=$GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV init-doc $GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html //go:generate gofmt -w bindata.go package assets import ( - "bytes" "fmt" "os" "path/filepath" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - "github.com/ipfs/go-ipfs/core" - "github.com/ipfs/go-ipfs/core/coreunix" + "github.com/ipfs/go-ipfs/core/coreapi" + + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + iface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" // this import keeps gx from thinking the dep isn't used - _ "gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html" + _ "gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html" ) // initDocPaths lists the paths for the docs we want to seed during --init @@ -35,7 +36,7 @@ func SeedInitDocs(nd *core.IpfsNode) (cid.Cid, error) { return addAssetList(nd, initDocPaths) } -var initDirPath = filepath.Join(os.Getenv("GOPATH"), "gx", "ipfs", "QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1", "dir-index-html") +var initDirPath = filepath.Join(os.Getenv("GOPATH"), "gx", "ipfs", "QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV", "dir-index-html") var initDirIndex = []string{ filepath.Join(initDirPath, "knownIcons.txt"), filepath.Join(initDirPath, "dir-index.html"), @@ -46,7 +47,17 @@ func SeedInitDirIndex(nd *core.IpfsNode) (cid.Cid, error) { } func addAssetList(nd *core.IpfsNode, l []string) (cid.Cid, error) { - dirb := uio.NewDirectory(nd.DAG) + api, err := coreapi.NewCoreAPI(nd) + if err != nil { + return cid.Cid{}, err + } + + dirb, err := api.Object().New(nd.Context(), options.Object.Type("unixfs-dir")) + if err != nil { + return cid.Cid{}, err + } + + basePath := iface.IpfsPath(dirb.Cid()) for _, p := range l { d, err := Asset(p) @@ -54,40 +65,22 @@ func addAssetList(nd *core.IpfsNode, l []string) (cid.Cid, error) { return cid.Cid{}, fmt.Errorf("assets: could load Asset '%s': %s", p, err) } - s, err := coreunix.Add(nd, bytes.NewBuffer(d)) + fp, err := api.Unixfs().Add(nd.Context(), files.NewBytesFile(d)) if err != nil { - return cid.Cid{}, fmt.Errorf("assets: could not Add '%s': %s", p, err) + return cid.Cid{}, err } fname := filepath.Base(p) - c, err := cid.Decode(s) + basePath, err = api.Object().AddLink(nd.Context(), basePath, fname, fp) if err != nil { return cid.Cid{}, err } - - node, err := nd.DAG.Get(nd.Context(), c) - if err != nil { - return cid.Cid{}, err - } - - if err := dirb.AddChild(nd.Context(), fname, node); err != nil { - return cid.Cid{}, fmt.Errorf("assets: could not add '%s' as a child: %s", fname, err) - } } - dir, err := dirb.GetNode() - if err != nil { + if err := api.Pin().Add(nd.Context(), basePath); err != nil { return cid.Cid{}, err } - if err := nd.Pinning.Pin(nd.Context(), dir, true); err != nil { - return cid.Cid{}, fmt.Errorf("assets: Pinning on init-docu failed: %s", err) - } - - if err := nd.Pinning.Flush(); err != nil { - return cid.Cid{}, fmt.Errorf("assets: Pinning flush failed: %s", err) - } - - return dir.Cid(), nil + return basePath.Cid(), nil } diff --git a/vendor/github.com/ipfs/go-ipfs/assets/bindata.go b/vendor/github.com/ipfs/go-ipfs/assets/bindata.go index 93d423b6d2..7f4bbea3a4 100644 --- a/vendor/github.com/ipfs/go-ipfs/assets/bindata.go +++ b/vendor/github.com/ipfs/go-ipfs/assets/bindata.go @@ -7,13 +7,13 @@ // init-doc/quick-start // init-doc/readme // init-doc/security-notes -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/LICENSE -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/README.md -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index-uncat.html -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index.html -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/index.go -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/knownIcons.txt -// ../../../../gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/package.json +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/LICENSE +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/README.md +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/index.go +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt +// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json // DO NOT EDIT! package assets @@ -96,7 +96,7 @@ func initDocAbout() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/about", size: 1677, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/about", size: 1677, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -116,7 +116,7 @@ func initDocContact() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/contact", size: 189, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/contact", size: 189, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -136,7 +136,7 @@ func initDocHelp() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/help", size: 311, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/help", size: 311, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -156,7 +156,7 @@ func initDocPing() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -176,7 +176,7 @@ func initDocQuickStart() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(420), modTime: time.Unix(1501991541, 0)} + info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(384), modTime: time.Unix(1544568089, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -196,7 +196,7 @@ func initDocReadme() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -216,7 +216,7 @@ func initDocSecurityNotes() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(420), modTime: time.Unix(1501973561, 0)} + info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -236,7 +236,7 @@ func dirIndexHtmlLicense() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/LICENSE", size: 1071, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/LICENSE", size: 1071, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -256,12 +256,12 @@ func dirIndexHtmlReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/README.md", size: 1257, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/README.md", size: 1257, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _dirIndexHtmlDirIndexUncatHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x55\x4d\x8f\xe3\x36\x0c\xbd\xe7\x57\x70\xbd\x40\x6f\xb6\x32\xb3\xe8\xb6\x48\x9c\x14\x48\x32\xfd\x42\xba\x33\x6d\x06\xe8\xa6\x97\x42\xb6\x18\x5b\xb5\x2d\x19\x12\xf3\x55\x23\xff\xbd\x90\xec\xc4\x49\x31\xd3\x9d\x4b\x2f\x96\x44\x52\x8f\x8f\x8f\x22\x1c\xbf\x5b\x3c\xce\x9f\xd7\x4f\x0f\x90\x53\x55\x4e\x07\xf1\x79\x41\x2e\xa6\x03\x80\xb8\x42\xe2\x90\xe6\xdc\x58\xa4\x49\xb0\xa5\x4d\xf8\x6d\x00\xcc\xbb\xde\x85\x21\x3c\x3f\x2e\x1e\x47\x60\x11\x05\x50\x8e\x16\x21\x84\x8a\x1f\x13\x84\x52\x16\xe8\x4c\x60\x89\x1b\x42\x03\x78\x00\x6d\xbc\x65\x8f\xc9\x56\x7e\x07\x61\xe8\x51\x4a\xa9\x0a\x30\x58\x4e\x02\x4b\xc7\x12\x6d\x8e\x48\x01\xe4\x06\x37\x93\x80\xc9\x7a\x63\xd9\xaf\xd5\xe7\xd9\x37\x4f\xcb\xdf\x7e\xff\xf1\x63\x32\x97\x7b\xf3\x43\x7e\xff\x8b\x99\xcd\xfe\xfa\x54\x2c\x77\x1f\xaa\xf5\x87\x9f\xc5\xfa\xf3\x5c\x16\xeb\x3f\x56\xfb\xe5\xc3\x82\x25\x5a\x93\x25\xc3\xeb\xa8\x92\x2a\x4a\xad\x0d\x7a\xba\x39\x96\x35\x1a\x20\x0d\xa9\x56\x96\xcc\x36\x25\xa0\x5c\x5a\x90\x16\x72\x34\x38\x82\x9c\xa8\xb6\x23\xc6\x32\x49\xf9\x36\x89\x52\x5d\xb1\xd4\x1c\x6b\x92\x07\x86\x87\x9a\x25\xa5\x4e\x58\xc5\x2d\xa1\x61\xb2\xca\xd0\x3e\xeb\xf9\x6a\xb5\xe0\xc4\x59\xaa\xd5\x0e\x0d\x45\x99\xfe\xdf\x4a\x93\x8e\xb5\x2f\xc9\xe3\x7b\x54\xb7\x8b\x14\x37\x46\xef\xa1\xd9\x4b\x41\xf9\x08\x86\xf5\x61\x7c\x72\xf6\x9a\x0b\x21\x55\x06\x0d\x54\xdc\x64\x52\x8d\xe0\x6e\x78\x76\xbe\x77\x3d\x46\x03\xcd\x00\x00\x20\xe1\x69\x91\x19\xbd\x55\x62\x04\xef\x87\xc3\xe1\x78\x00\xe0\xa3\x4a\x9d\xe9\x2e\x26\x47\x99\xe5\x34\x82\xfb\xaf\xeb\xc3\xd8\x5b\x7a\xd4\xd6\xe2\x93\xba\xca\x42\x47\xb5\xbb\xd6\x92\xba\xfb\xd8\x87\xc4\xec\x42\x3d\x26\x49\x25\x4e\x9b\x06\xa2\x27\x4e\x39\x9c\x4e\x31\x6b\x4d\x83\x98\xb5\xaf\x30\x4e\xb4\x38\xfa\x58\x21\x77\x20\xc5\x24\x68\x99\x07\x90\x96\xdc\xda\x49\x60\xf4\xde\x0b\xd2\x45\x74\xd6\x54\x97\xe1\xc1\x86\xf7\x9d\xeb\xea\xba\x2b\xe9\x72\xd9\xb3\xf5\x96\xe9\x57\x2a\xb1\xf5\x38\x66\x42\xee\x3a\xb8\xf3\xb6\xdf\x24\x86\x5d\xa8\xdc\x26\xba\xbb\x7f\x81\x44\xcd\x15\x96\xe0\xbf\xa1\xc0\x0d\xdf\x96\x74\xcb\xe7\x3a\x2e\x74\x75\x49\x95\x5d\x22\x7c\x8f\x8d\x56\xd9\xf4\x27\x25\xdc\x00\x6d\xe0\x46\xa8\xce\x79\xc6\xeb\x89\x3b\x5d\x79\x52\xe2\x19\xbe\x3d\xf8\x6f\x68\xc9\xc8\x1a\xc5\x75\x12\x32\xfd\xc1\x1d\xc5\xf9\x5e\xfb\xae\x82\x6b\xef\x2d\xef\xbe\xd7\x7e\xf7\x67\x52\x72\x55\xbc\xa0\xe4\x99\x21\x89\x57\x32\x75\x2f\xf5\xdf\xa9\x78\x37\x2e\x4d\x13\xcd\x78\x5a\x2c\xa5\x2a\x4e\xa7\x60\x1a\x45\x31\xe3\x5f\x40\x9e\xde\xda\x62\x76\x5d\x65\xd3\x80\xe1\x2a\x43\x88\x96\xd2\x92\x1b\x91\xd3\xe9\x3f\xf4\x78\x8b\x00\x4d\xe3\x96\xef\x8d\xae\x1e\x0e\x04\xd1\x27\x5e\xa1\xa3\xfa\x76\x29\x5e\x2d\xfd\xd2\xf1\xc0\xcf\x89\x43\xf6\xed\xff\xa2\x02\x2e\x7a\x25\xff\x6e\xa3\x5f\x13\xa3\x69\x00\x95\xe8\xeb\x8f\x99\x7f\x27\x2f\x4f\x40\xcc\xda\x61\x8c\x59\xfb\xa3\xf8\x27\x00\x00\xff\xff\x89\xd5\x11\xf8\x40\x06\x00\x00") +var _dirIndexHtmlDirIndexUncatHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x55\x4d\x6f\xe3\x36\x10\xbd\xfb\x57\xcc\x2a\x40\x6f\x12\x9d\x2c\xba\x6d\x1c\xd9\x05\xf2\xd1\x6e\x0b\x77\x93\x36\x01\xba\xe9\xa5\xa0\xc4\xb1\xc8\x9a\x22\x05\x72\x1c\x3b\x15\xfc\xdf\x0b\x52\xf2\xd7\xc6\xc1\xe6\xb2\x17\x89\x1e\xbe\x99\x79\xef\x69\x06\xce\xdf\x5d\xdf\x5e\x3d\x3c\xde\xdd\x80\xa4\x5a\x4f\x06\xf9\xe6\x85\x5c\x4c\x06\x00\x79\x8d\xc4\xa1\x94\xdc\x79\xa4\x71\xb2\xa0\x59\xfa\x63\x02\x2c\x5e\xbd\x4b\x53\x78\xb8\xbd\xbe\x1d\x81\x47\x14\x40\x12\x3d\x42\x0a\x35\x7f\x2e\x10\xb4\x9a\x63\x08\x81\x27\xee\x08\x1d\xe0\x0a\xac\x8b\x91\x25\x16\x0b\xf5\x13\xa4\x69\xac\xa2\x95\x99\x83\x43\x3d\x4e\x3c\x3d\x6b\xf4\x12\x91\x12\x90\x0e\x67\xe3\x84\xa9\x66\xe6\xd9\x1f\xf5\xe7\xcb\x1f\xee\xa6\x7f\xfe\xf5\xf1\x43\x71\xa5\x96\xee\x17\x79\xf6\xbb\xbb\xbc\xfc\xf7\xd3\x7c\xfa\xf4\xbe\x7e\x7c\xff\x9b\x78\xfc\x7c\xa5\xe6\x8f\x7f\xdf\x2f\xa7\x37\xd7\xac\xb0\x96\x3c\x39\xde\x64\xb5\x32\x59\xe9\x7d\xb2\xa3\x2b\x51\x37\xe8\x80\x2c\x94\xd6\x78\x72\x8b\x92\x80\xa4\xf2\xa0\x3c\x48\x74\x38\x02\x49\xd4\xf8\x11\x63\x95\x22\xb9\x28\xb2\xd2\xd6\xac\x74\xcf\x0d\xa9\x15\xc3\x55\xc3\x0a\x6d\x0b\x56\x73\x4f\xe8\x98\xaa\x2b\xf4\x0f\xf6\xea\xfe\xfe\x9a\x13\x67\xa5\x35\x4f\xe8\x28\xab\xec\x37\x93\xa6\x02\xeb\x28\x29\xd6\x8f\x55\xc3\x29\x33\xdc\x39\xbb\x84\x76\xa9\x04\xc9\x11\x0c\x9b\xd5\xc5\x3a\xc4\x1b\x2e\x84\x32\x15\xb4\x50\x73\x57\x29\x33\x82\xd3\xe1\xe6\xf2\x24\x7c\x63\x74\xd0\x0e\x00\x00\x0a\x5e\xce\x2b\x67\x17\x46\x8c\xe0\x64\x38\x1c\x5e\x0c\x00\x22\x4a\xdb\xca\xf6\x18\x89\xaa\x92\x34\x82\xb3\xef\x9b\xd5\x45\x8c\xec\xaa\x76\x91\xd8\x34\x28\x4b\x03\xd5\x3e\xad\x23\x75\xfa\xe1\x4b\x88\xe4\x5e\xf6\x90\xd2\x6a\xeb\x46\x70\x72\x7e\x7e\xbe\xc1\xe4\x6c\x2b\x2f\x27\x45\x1a\x27\x6d\x0b\xd9\x1d\x27\x09\xeb\x75\xce\xba\xd0\x20\x67\xdd\xa4\xe6\x85\x15\xcf\x11\x2b\xd4\x13\x28\x31\x4e\x3a\x75\x09\x94\x9a\x7b\x3f\x4e\x9c\x5d\x46\xd3\x7a\x44\x1f\x2d\xad\x4e\x57\x3e\x3d\xeb\xaf\xf6\xd2\x83\xec\x6d\x72\xa4\x1b\x23\x93\xef\x4c\xe1\x9b\x8b\x9c\x09\xf5\xd4\x97\xdb\x1c\x77\x87\xc2\xb1\x2d\x95\xc3\x46\xa7\x67\x47\x48\x34\xdc\xa0\x86\xf8\x4c\x05\xce\xf8\x42\xd3\x21\x9f\x7d\x5c\x1a\x74\x29\x53\x6d\x11\x71\x0e\x9c\x35\xd5\xe4\x57\x23\xc2\x92\xcd\xe0\xc0\xa8\xfe\x72\x8b\x6e\x5b\x50\x33\xc8\x3e\x06\xf3\xd7\xeb\x5d\x91\xbd\x46\xdb\xaf\xb3\xd7\x24\x26\xbe\xcc\xda\xf9\xd0\x43\xd0\x88\x1d\xe0\xe0\x3a\x27\x5e\x68\xdc\xf4\xe8\x7e\xc4\x67\xea\xc9\xa9\x06\xc5\xbe\x24\x72\xfb\xad\x73\x12\x9b\xbc\x6e\xd2\x0f\x88\x1d\x21\x1f\xa7\x2f\x9e\xfe\x29\x34\x37\xf3\x23\xdf\x6d\xc3\x90\xc4\x2b\x9d\xfa\xdd\xf9\xb2\x15\xef\x17\xb8\x6d\xb3\x4b\x5e\xce\xa7\xca\xcc\xd7\xeb\x64\x92\x65\x39\xe3\x5f\xa9\x3c\x39\x8c\xe5\x6c\x5f\x65\xdb\x82\xe3\xa6\x42\xc8\xa6\xca\x53\x58\xda\x7d\x9f\x5f\xf8\xf1\x16\x03\xda\x36\xbc\x7e\x76\xb6\xbe\x59\x11\x64\x9f\x78\x8d\x81\xea\xdb\xad\x78\x55\xfa\x76\xbe\x92\xb8\x95\xa1\x72\x1c\xb6\xaf\x3a\x10\xd0\xf7\xea\xbf\x0e\xfd\x9a\x19\x2f\xc7\x28\xce\xc9\xf1\x7d\xcb\x59\xb7\xfa\x39\xeb\xfe\xba\xfe\x0f\x00\x00\xff\xff\xdb\x20\xe5\x87\xd2\x06\x00\x00") func dirIndexHtmlDirIndexUncatHtmlBytes() ([]byte, error) { return bindataRead( @@ -276,12 +276,12 @@ func dirIndexHtmlDirIndexUncatHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/dir-index-uncat.html", size: 1600, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/dir-index-uncat.html", size: 1746, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _dirIndexHtmlDirIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\xfc\xf7\xce\xe4\x48\x92\x27\x8a\xfe\xbf\x4f\x91\xd3\x83\x45\x77\x4f\x54\x16\x19\x94\xc1\xac\xdd\xbe\x43\xad\x83\x5a\x5e\x1c\x2c\xa8\xb5\xd6\x2c\xd4\xbb\x1f\x64\x96\xca\x9a\xee\x1e\xcc\x60\x0b\x38\xf5\x11\x1f\x82\xee\x6e\x66\x6e\xee\x6e\xf6\x33\x73\x3a\x23\xfe\xd7\xbf\x30\x1a\x6d\x07\x3a\xfb\xa1\x5c\xbb\xf6\x6f\xff\xe3\x7f\xfd\xfc\x91\x45\xe9\xdf\xfe\xc7\x87\x0f\xff\xab\xcb\xd6\xe8\x43\x52\x46\xf3\x92\xad\xff\xfb\x4f\xdb\x9a\x7f\x7c\xfd\xe9\x03\xf0\xa5\xe9\x5f\x3e\x7e\xfc\x50\x66\xed\x98\xcd\x1f\xd6\xe1\x43\x32\xf4\xcb\x3a\x6f\xc9\xfa\x61\x2d\xab\xe5\x43\xb5\x7c\x28\xb3\x39\xfb\xf4\xa1\x5c\xd7\x71\xf9\x04\x00\x45\xb5\x96\x5b\xfc\x6d\x32\x74\x40\x32\x5f\xe3\x5a\x9d\x40\x76\x8e\x40\xdc\x0e\x31\xd0\x45\xcb\x9a\xcd\x40\xd5\x15\xd9\x62\x0f\xb4\x65\x31\xd1\x1a\x01\xc9\xd0\xef\xd9\xbc\x7e\x5b\x0c\x1f\x3e\x7e\xfc\xd2\xe3\xb2\x5e\x6d\xf6\xf9\xee\xb3\x96\xdf\xe7\x43\xbf\x7e\xcc\xa3\xae\x6a\xaf\x4f\x4b\xd4\x2f\x1f\x97\x6c\xae\xf2\xef\x3e\x1e\x59\xdc\x54\xeb\xc7\x35\x3b\xd7\x8f\x4b\x75\x67\x1f\xa3\xb4\xde\x96\xf5\xd3\x13\x04\xff\xe7\x77\x1f\xbb\xe5\x1f\xb7\xfc\x10\x0f\xe9\xf5\x7d\x17\xcd\x45\xd5\x7f\x02\x7f\x88\xbe\x8f\xa3\xa4\x29\xe6\x61\xeb\xd3\x8f\xc9\xd0\x0e\xf3\xa7\x75\x8e\xfa\x65\x8c\xe6\xac\x5f\x7f\x88\x3e\x45\xc9\x5a\xed\xd9\x37\xd1\xa7\x72\xd8\xb3\xf9\xfb\x61\x5b\xdb\xaa\xcf\x3e\x81\x3f\x2c\xeb\x3c\xf4\xc5\x8f\xda\x1d\x59\x55\x94\xeb\x27\x1c\x04\x7f\x88\xb7\x75\x1d\xfa\x4f\x9f\x3e\x76\xc3\xfd\x31\x1f\x92\x6d\xf9\x58\xf5\x7d\x36\x7f\x53\xf5\xe3\xb6\xfe\x7d\xfd\xf7\x63\x94\xa6\x55\x5f\x7c\x02\xbf\x8b\x87\x39\xcd\xe6\x4f\xe0\x0f\x6b\x14\xb7\xd9\xf7\x3f\x16\x3f\x2e\x63\x94\x7c\xdd\xfe\x59\xcb\x36\x1a\x97\xec\xd3\xcf\x37\x3f\xac\xe9\xaf\x52\x7e\x00\xfe\xed\x5f\x3e\x58\xc3\x36\x27\xff\x78\x51\x4a\x34\x1e\x81\xcf\xf3\x8a\x7e\x8c\x87\xaa\xcd\xe6\xb1\x8d\xd6\xec\x37\xeb\xb3\xcc\x09\x90\x2c\x0b\xd0\x45\x55\xff\x6d\xb2\x2c\x1f\xfe\x0d\xf8\xf7\x2e\x4b\xab\xe8\xc3\x38\x57\xfd\xfa\xfd\xbf\x7d\xf3\x29\xca\xd7\x6c\xfe\xe6\x53\x9c\xe5\xc3\x9c\x7d\xff\xe3\xbc\xfd\x2b\x08\x82\xff\x52\x75\xe3\x30\xaf\x51\xbf\x7e\xf7\xe3\xec\x97\x51\x3a\x1c\x9f\xfa\xa1\xcf\xbe\x6a\xfa\x75\xca\x3f\x81\x1f\xbe\xe6\xf9\x79\x4d\xe3\xe1\xfc\x67\xac\xff\xac\xe5\x87\xe8\x9b\xe8\xd3\x5e\x2d\xd5\x9a\xa5\xdf\x7f\xe9\x3b\xcd\x92\x61\x8e\xd6\x6a\xe8\x3f\x6d\x7d\x9a\xcd\x9f\xd7\xed\x87\xe8\xff\x5f\xce\x59\xfe\xff\xfc\x38\x80\xef\x93\xa1\x5f\xb3\x7e\xfd\xf4\xa7\x0f\x7f\xf9\xd3\x87\x68\x5d\xe7\xbf\x7c\x6e\xfd\xeb\x87\x3f\xfd\xf5\x4f\x3f\xac\x9f\x97\xa6\xc8\x3e\xc6\x73\x16\x35\x1f\xab\x7e\xa9\xd2\xec\x53\xb4\x0f\x55\xfa\xc3\xb7\xbf\x59\xa0\xbf\x5b\x8f\xaf\x94\xfa\x91\xf2\xc3\x9a\xfe\xbd\x99\xfd\x6b\x9e\xe7\x5f\x51\xfe\xf0\xef\x3f\xd9\x79\x92\xfd\xc6\xe2\xff\xcc\xb7\xd7\x58\x56\x9f\xdd\xee\x83\x10\xb5\x79\x5b\xf5\xc5\xf2\xe7\xef\x96\x39\xf9\xb4\xcd\xed\x5f\xbe\xfd\x16\xf8\x4c\xbd\x00\xc5\x2f\x64\x1f\xcb\x9f\xc9\x3e\xce\x59\xb1\xb5\xd1\xfc\x6d\x36\xac\x7f\xfd\xef\xb3\xfc\xff\xfe\xb5\xca\xf2\xea\xfc\xeb\x87\x7c\x98\xbb\x68\xfd\xcb\x9f\xb3\x2e\xce\xd2\x34\x4b\x3f\x0e\x63\xd6\xaf\xd7\x98\xfd\xf9\xaf\xdf\xfc\xd7\x25\x1e\x43\x9e\x43\xbf\x0a\xfb\x52\xfc\x6f\x0b\xf8\x2d\xff\x7f\x8b\x7d\x5d\xbf\xe2\x5e\xe7\x2d\xfb\x6f\x8f\x60\xd9\x8b\x7f\xfd\x95\xe0\xff\xfc\x42\xf0\x53\xfb\xaf\xd2\x97\xbd\xf8\xf3\x5f\x7f\xf8\xb7\xef\x7f\x63\xcf\xd5\xfd\xd9\x41\x7f\x32\x9a\x78\x38\xbf\xfb\x02\x05\xff\xb8\xe9\x1f\xd6\xfe\xf0\x1f\xdc\xee\x77\x96\xfe\x2b\xd8\x7e\xc6\xcc\x4f\x4f\x70\x3c\x7f\x05\xd9\x68\xfc\x58\x56\x45\xd9\x7e\xc6\xb9\x9f\x0c\x78\x2e\xe2\xe8\x2f\xe0\x37\x5f\xae\xbf\xfe\x08\xab\x5f\x1b\xee\x9f\x84\xac\xdd\xb3\xb5\x4a\xa2\x0f\xef\x6c\xcb\xfe\xf4\xcd\x2f\xe5\x6f\xc8\xb9\x8a\xda\x6f\xbe\xc2\xf2\xaf\x7a\x45\xc6\xf3\xbb\xcf\x9e\xfa\xb1\xfc\x11\x53\x9f\xdf\x22\xd0\x0b\xc5\x9f\x08\xfc\xdd\x4f\x7e\x03\xc3\xf0\x77\xff\xd0\x9b\x7e\x88\xbe\xff\x85\x04\x8f\x62\xfc\xbb\xff\x08\x03\x9f\x11\xe3\x87\xe8\xd3\x17\xf4\xfd\x05\xd1\x7f\x62\x81\x60\x14\xc2\x93\xbf\x63\xf9\x0a\x39\x7e\xe4\xfb\x25\x02\xac\x65\xd5\x7f\x48\x87\x75\xcd\xd2\xef\x7e\xae\x43\xc7\xf3\x43\xb4\xad\xc3\x87\x9f\xe7\xed\x47\xa0\x9f\xab\xbe\xf8\x51\xcf\x9f\x29\x3f\x0e\x79\xbe\x64\xeb\xa7\x8f\xd0\x78\xfe\xf0\xed\x3c\x1c\x3f\x45\xa4\x8f\xf3\x97\x41\x7f\x7c\xa2\xe3\xf9\xdd\x4f\x55\x6d\x96\xff\x54\xf3\xc3\xb7\xc9\xd0\x7e\x3c\x97\x8f\x4f\xe8\x9b\x9f\x6f\xa1\xef\xc7\x61\xa9\xbe\xe8\x3a\x67\x6d\xf4\x39\x58\x7d\xd7\x55\xfd\x2f\xd3\x37\x9e\xdf\xfd\x14\x1b\x7e\x92\xfd\x45\xf4\xcf\x55\x5f\x64\xff\x73\xd1\x79\x3b\x44\xeb\xa7\xcf\x44\x5f\xb5\x7f\x7f\x54\xe9\x5a\xfe\x18\x4c\x7f\x25\xfd\xa9\x12\xfb\x16\xfb\xf1\x0f\xff\x9f\x3f\x87\xb1\xff\x2c\xbe\xfe\x84\xa4\xbf\x4a\xfc\xae\x8b\xce\x8f\xbf\x29\x7e\x99\x83\x78\x58\xd7\xa1\xfb\x04\x81\x9f\x35\xfd\xc2\xf3\xb7\xf5\xb3\xc5\xfd\x6d\x9d\xff\xf6\x55\xf4\x7b\xfd\x73\xe3\xf9\x9c\x62\x54\x49\xd4\x7e\x8c\xda\xaa\xe8\x3f\xad\xc3\xf8\x73\x3c\x5d\x87\xf1\xf3\x34\x7d\x58\x86\xb6\x4a\x3f\xfc\x6b\x9a\xfe\x0c\xf0\x1f\x97\x75\xae\xc6\x2c\xfd\xa5\xab\x4f\xfd\x5a\x7e\x1c\xf2\x8f\x9f\x81\xe3\x2f\x43\x9a\xfe\xf5\x1f\xa1\x3a\xf1\xf9\xfa\xe1\xdb\xcf\x50\xf0\xf1\x73\x7c\x99\x87\xf6\xa7\xa8\x3f\xb6\x51\x92\x95\x43\x9b\xfe\x6a\x75\x04\x41\x7c\x37\x7c\x0e\xf0\xeb\xf5\xe9\xf9\x1f\x98\x3e\xa7\x30\x5f\x92\x86\x7f\xc2\xf8\xc3\xb7\x63\xd4\x67\xed\xf7\x7f\x3f\x45\xff\xd8\x3d\x7e\xce\x2f\x7e\x1d\xeb\x57\x2b\xf1\xf3\x64\xcc\x51\x5a\x6d\xcb\x27\xe4\x2b\xdf\xff\x2a\xe4\x82\x1f\x3e\x33\x7f\xfe\xff\xca\xf9\xbf\x05\xd1\xbf\x7e\xf7\x5f\x21\xfa\x49\xe1\x8f\x9f\x93\xce\xaa\x2f\x7e\x59\xb5\xcf\x48\xf3\xe1\x8b\x59\xfe\x82\x46\x5f\x86\xf2\x9f\x2a\xba\x0e\xe3\x17\xeb\xfd\x59\x63\xf8\x57\xf6\xcf\x4d\x5f\x6c\xfd\xab\xb6\x9f\xfa\xfe\xdb\x4f\x06\xf7\xdb\x39\x03\x7f\xdb\xfa\xa9\x8d\x96\xf5\x63\x52\x56\x6d\xfa\xfd\x6f\x34\xfa\x3b\xa9\xbf\x55\xf8\x3f\xea\xf3\x4f\xa5\xfe\x68\x50\xbf\xa9\x98\xff\xbf\xee\xf4\xc3\x9a\x7e\xca\xab\xf9\x9f\xe8\xf0\x3b\x76\xf2\x5f\x1e\xe7\x6f\x3b\xf9\x49\xf2\x57\x2a\x7e\x16\xfd\x55\xf1\x4b\x92\xf5\xab\x47\xff\xbc\xa6\x1f\xd3\x2c\x8f\xb6\x76\xfd\x2a\x5b\xfb\xec\x0f\x5f\xbc\xfc\x37\x04\x7f\xfb\x0f\xd6\xf9\x9f\x47\x1b\xf4\xf3\xf5\xdd\x3f\x90\x39\x0f\xc7\x4f\x61\xfa\xcb\xed\x4f\xa1\x3a\xad\x96\xb1\x8d\xae\x4f\x5f\x86\xf2\xdd\xaf\x69\xe7\x9f\xbe\x62\xf8\x3e\x69\xb3\x68\xfe\x14\x0f\x6b\xf9\xc3\xbf\x7f\x76\xfe\xbd\xca\x8e\xcf\xe9\xe1\x4f\xf0\x98\x66\x7b\x95\x64\x3f\x82\xe3\x0f\xdf\x56\x63\xbe\x7c\xfc\x3f\x71\x1b\xf5\xcd\xd7\x28\x54\x75\x51\x91\x7d\x49\xf3\xfe\x9c\x46\x6b\xf4\xe9\x4b\x19\x18\xfb\xe2\xbb\x38\x5a\x32\x0c\xf9\xa6\x72\x29\xcd\x3c\x40\x99\x2f\x06\x92\x24\xc9\xb7\xe5\x94\xac\x53\x90\x24\x49\x7d\x2e\x92\x06\x4d\x06\x9f\x3f\xf3\x17\x40\x94\x9f\x6f\x78\xdf\xe4\x3c\xc1\xb4\x63\x28\x04\x53\x88\xbb\x42\x83\xa2\x42\x9e\xa8\x42\x8b\x92\x62\x8f\xeb\x43\x57\x6a\x03\xcf\x44\x93\xa4\x6d\xf5\xcf\x0c\x1e\x25\x99\x2c\xe7\x64\xef\x89\x75\xea\xa7\x72\xb2\xa4\xd1\xa7\x4f\xd5\x25\x91\xf6\x12\x59\xef\xc4\x1c\x51\x66\x79\x87\x3d\xf9\x25\xa6\xe1\x55\xc9\x0f\x09\x28\x6d\xa0\xc0\xdd\x96\xee\xb7\x78\x3a\x7d\xea\x28\x00\x03\x29\x0d\x1d\x50\x4a\x59\x41\xfb\x70\xa3\x96\x7d\xe3\x73\x0f\x55\xf9\x6b\xbb\x55\xbc\xbe\xd3\xdd\xdd\x4c\x94\x29\x82\x3e\x7c\xe4\x04\x11\x55\xb8\xbb\xa2\x2b\x21\x13\x5b\xbf\x21\x82\x72\x64\x22\x3c\x79\xc1\x29\x62\x3a\x33\x2c\xe9\x05\xe6\x65\xd2\xaf\xa7\x86\x20\x74\xa2\x51\xb7\x4e\xe2\x5d\xce\x5e\x9b\x70\xe4\x78\xbf\x1a\x0d\x52\x27\xfd\x75\x68\xa7\xd8\xe6\xa7\x46\xbf\x83\x48\x71\x8b\x18\x4b\xfc\xb8\xb1\xd3\x52\xf2\x27\xc8\x12\xdb\xb7\x4a\x83\xa7\x38\x95\x42\x72\x33\x71\xf5\xd2\xdc\x7b\x54\x2c\x27\x02\xbd\x2c\x36\xf3\xae\x2a\x14\x61\xaa\x9f\x6c\xa2\x87\xfd\x91\xe3\x45\xcc\x88\x73\xe0\x9a\x17\x5b\xf5\xdb\x5c\x63\xb5\x4d\x09\x97\x88\x8f\x93\x3b\x73\xc6\xc4\xc6\x2b\x66\xb3\x5d\x48\xec\xcf\xb7\x49\x4a\x6f\xfa\x79\xda\xc1\x29\x1a\x25\xa0\x76\xa6\xd3\x76\x9c\xc1\xc2\x93\xa7\x79\xcf\x7e\xa2\x20\xdb\x6b\x9e\x00\xbc\x16\x92\x0b\x1e\x91\xbb\x37\x9c\xc8\x66\x61\x2c\x4c\x08\xdb\x5e\xf2\x4d\x76\xac\xaf\x9d\x58\xd1\xb3\xae\xb4\x79\xd4\xdd\x35\xa6\x44\x99\x7a\xc0\x87\x14\xb3\xb8\x91\xd6\x8e\x56\xe1\x4a\x2c\x74\xb9\x11\x99\x01\x60\x73\x02\x70\x74\x53\xa6\x06\xba\x4b\xac\x72\x21\x0b\xd3\x8c\x15\xca\x47\x16\xe6\x81\xe8\x16\x0f\x26\xc4\x76\xbc\x24\x78\xc6\xd5\x8e\x50\x3f\x00\x7d\x38\xe5\x0d\xc8\xc9\xe2\x20\x95\x98\x21\xfd\x1c\x67\x52\xa3\xf9\x62\x28\x96\xe3\x6a\xa6\x8c\xd2\x81\x28\xfe\xef\x3f\xff\xf5\x6b\x17\x99\xb3\x31\x8b\xd6\x4f\xfd\xf0\xd3\xdd\xd7\x6d\x5f\x72\xbc\xcf\xe6\x1f\x55\xfd\xcf\x36\xfc\x79\x97\xf5\xc7\x32\xe1\xae\xfc\xc9\x84\xc7\xc5\xb9\xd7\x1d\x7c\x92\x81\x9e\xa7\xa5\x76\x01\xbe\x1d\xbe\x40\xd7\x7d\xba\x03\x3d\xb5\x24\x74\x1b\x93\x53\x1c\x2a\xcb\xce\x1e\x45\x2a\x3b\xc2\x4b\x4c\xce\x32\x9d\xc6\x0a\x0b\x67\x4f\x2e\x6d\xb3\x27\x59\x55\x96\x08\x19\xac\x2c\xc9\xac\xe5\x72\x1c\xe5\x0d\x20\x62\xb3\x96\x79\xe7\x17\x94\xe0\x4a\x00\x34\xca\x9a\x43\xe9\xeb\x81\xa2\xe8\xbd\xab\xc4\x3b\x12\x9f\xc3\x1c\xa1\xcb\x1e\x5f\x84\xd6\xc7\x0e\x4b\x9d\x05\xd3\x8a\x72\xe5\xd5\xbe\x91\x29\xd7\x93\x00\xfc\x27\xbe\xb0\x6b\xa2\x07\xd0\xbc\x0a\x16\x81\x01\xc2\x06\x9a\xbb\xef\x2b\xf7\x23\x71\x6e\xf5\x85\xdf\x56\xb9\x88\x10\xc1\x8c\x02\x1d\xac\x08\x8b\x51\xc3\x89\x88\xe1\x6d\xf7\x31\x73\xe2\x2e\x8e\xf0\x75\xa9\x59\xf9\x51\xb0\xa0\x00\x61\xf0\x4b\x26\x4a\xf0\x45\xc2\x95\xc0\xbb\x71\x6d\x1f\x78\x81\x05\x1d\x79\x1d\x00\x55\x64\x89\xf0\xe6\x79\xa9\xde\x73\xa3\x14\xf3\x2e\x17\x39\x86\xf4\xa5\xb1\xde\xb6\xa2\xc2\xd3\x5a\xe4\x5c\x11\xd1\xc1\xb1\x4d\xd6\x42\x32\xc0\xb3\xe7\x32\x34\xd3\x34\x10\xd2\x0e\x76\x84\xdc\xa6\xb4\xe8\x9e\x7e\x79\x1a\x9d\x4e\xc5\xd1\xdf\xdc\x89\x00\xe2\x35\x8e\x87\xe9\xbe\x1f\x7e\xe0\x2f\x59\x32\x85\xe4\x73\xa4\x90\x57\xd6\x90\xfd\x41\x00\x08\x1f\x9e\xb0\x02\x22\x6f\x80\x1f\xec\x83\xad\x7d\x24\x79\x0b\xe8\xde\xea\x79\xbd\x92\x62\x30\xbe\x12\x6f\x36\xb6\xf5\x9c\x69\x54\x1d\x52\xd8\x5d\x7c\xd7\x56\x39\x6b\x5a\x23\xf6\x51\xb4\x44\x5a\x46\xce\xc9\x42\xab\x1f\x56\x1c\xde\x07\x55\x15\xad\x12\xbc\xa3\xcb\xcb\x04\x9e\x97\x46\xbf\x15\x6d\x3b\xea\x86\x55\x2a\x3b\xee\x68\x22\x95\x84\x51\x8c\x78\xd2\x5a\x98\x66\xe0\x0c\x5e\x32\x0e\xc1\x53\x13\xc1\x93\x02\xad\x73\xea\xa7\x56\xef\xc6\xb0\x6e\xd7\xba\xa2\xbd\xa0\x2a\x2c\xdf\xd0\xd7\x89\x19\x0e\xfc\x42\xea\xa3\x71\xc8\x14\x5a\x4e\x29\xb6\x00\xc3\x2a\xc3\xb5\x00\x5e\xb3\x70\xdf\x86\x76\x5b\x11\x57\x9e\xc6\x4c\x62\x41\x61\xa8\x86\x30\xd4\xb4\xd3\x16\x3d\x4d\x92\xbb\xcc\x51\x83\xef\x47\x42\x4e\xce\x16\x1d\x32\x2c\x58\x5c\x9e\x54\x70\xa2\xdc\xed\x0e\x27\x6b\x88\xea\xbc\xc5\x06\x8a\x90\x47\xa9\x31\x2b\xe3\xb8\x9b\x04\x48\x38\x0c\x91\xb2\x85\x85\xab\xd8\xa5\xf6\x45\x1a\x06\x05\xc7\xe1\xfb\xd5\x12\x2b\x8e\x8a\x5c\x09\x4a\xaa\x93\xba\xf2\x32\x94\x8b\xa3\x4f\x66\xd1\x37\x11\xb8\x06\x45\x51\x04\x23\x2d\x34\x32\x6f\x2f\x82\x88\xbe\x35\x75\xa8\x29\xa4\xb2\x45\x9a\xce\xc6\xdd\x47\x61\x52\x64\x73\x63\x8d\x9e\x95\x43\x77\x83\x5d\x51\x5d\xca\xce\x15\x64\x16\x69\x2a\x73\xe5\x26\x0d\x53\x0c\x44\x39\x70\x1d\x40\x0a\xdf\xf6\x5b\xc5\x9c\x26\xd2\xf2\x6a\xc1\xa0\xc8\x29\xd2\x94\x8c\xfb\xfb\x31\xfb\x9b\x1e\x3c\xdc\xfe\xae\x57\x02\xa0\x6f\x92\x8c\x3b\xa5\xa6\xe7\x9c\xaa\xcc\xe2\xf7\x85\x88\x28\x4a\xfe\x58\x00\xd1\xff\x02\x10\xa0\xd3\x3c\x75\x16\x64\x83\x7c\x9d\x37\xb7\xdd\x49\xa7\x29\x5d\x56\x1f\xa8\x64\x61\x07\xc5\x94\xa8\x00\x7c\xaa\xba\x50\xd3\x0b\x9c\xec\x43\x91\xd8\x00\x32\x49\xd2\x1b\x7d\xef\x42\x39\x0c\x65\xa2\xf5\xfa\x81\x04\x2c\x2f\x36\x74\xf9\x18\x14\x9e\x92\x3b\x38\xc4\xfb\x10\x4e\xbb\x0c\xda\x6b\xad\xb4\x93\xba\x92\xa4\x3d\xbc\xf5\x5d\x53\x5f\x80\xc0\x43\x13\x0c\xa1\xcc\x0c\x37\xca\x88\x07\xcf\x2a\x1e\xc5\xb3\x5e\x10\xb9\x34\xa8\x30\xdf\x5d\x6c\xc1\x65\xd4\x8d\xc1\xb8\xce\x86\x1c\x0d\xdb\x84\xbf\x16\xfd\x19\xa1\xcf\xae\xca\x35\xe6\x8a\xf7\x9b\x7d\x75\x37\x1d\xcf\xe4\x60\x33\xa2\x5d\xaa\x03\xef\x87\x55\x88\x04\x56\xb5\xcd\xf9\x23\x7c\xfa\xd9\x46\x4f\x12\xae\xd5\x8f\x45\x86\x6b\x23\x79\x93\x5d\xf1\x3a\x1b\xde\xc0\x9f\x5d\x90\xd5\x09\x49\x21\xc4\x3e\x76\xd9\x76\x4b\x49\xd2\x82\x8f\xd4\xa9\x31\x59\x24\xf7\x5c\xa0\xf5\x02\x7e\x3f\x36\x72\x47\xf6\x82\xa0\xb4\x33\xa1\xbb\x9c\xbd\x37\x1d\x28\xb2\x7e\xec\xb2\xa9\x64\xd5\x62\x4b\xb3\x27\x28\x1d\xdd\x83\xd9\x1c\xf1\x72\x52\xbb\x9d\x36\x28\xbe\x06\x35\xf7\x81\xd4\xcc\xe6\x8e\xca\xd8\x53\x58\xec\xca\x7b\x57\xf0\xa3\x55\xc7\xdb\x3c\x98\xa6\x7a\xdd\x27\x2d\x92\x76\x77\xc7\xd9\x9e\x77\x74\xbb\x35\x95\x8e\xbe\xb9\x52\x2a\x8e\xa6\xce\x4c\x3b\x53\xac\x32\xd5\x06\x57\x9a\x7a\xb2\x38\x9a\x82\x26\x43\xec\xe1\xa4\x0a\x4d\xac\x47\x6d\x84\xaf\x31\xbd\xab\x81\x6b\x42\x4a\x08\xe0\x09\xa3\xe0\x16\x49\x25\x96\x65\x75\x8d\xce\x18\x24\x09\x5c\x01\xf7\x97\xfc\x89\x72\x0f\x4e\xec\x68\x1c\x47\xc5\x37\x29\x51\x92\xd5\xb8\x83\x37\x80\x46\x40\x04\x53\x51\x99\x48\x18\xde\x66\xc4\x53\x4d\x7a\xc8\x70\xcc\x9d\xbc\x62\x86\x4e\x4e\xc1\x66\x07\x9d\xc8\x49\xd0\xfc\xba\x38\xa7\x40\x18\x41\x23\x8b\x34\xc3\x6d\xca\x29\x93\xc3\xcd\x87\x47\x6a\x4f\x94\xb9\x40\x5c\xac\xb4\x7e\x5c\xe9\x29\x4b\xab\xb4\x10\xa5\x35\x40\x46\x8c\x1f\xbe\xb9\x29\x4b\x69\x71\xef\xcd\xc4\x42\x9c\xd1\x1c\xf0\x47\x49\xa3\xb7\xd3\x1d\x2f\x6d\xcc\x88\xc3\xe1\xaa\x7e\x1f\xbb\x10\x7f\xcb\x2b\x64\xda\x1d\x85\x94\x72\x38\x60\xfd\x6b\xd2\x11\x6d\x7a\x0a\x54\x23\xb7\x6e\x40\x1a\xd4\xec\xb4\x77\x45\x81\xbe\x61\x55\x39\x12\x74\x46\xd9\x2c\xc5\x5b\x94\x1a\xa2\x8a\x94\x52\x8f\x5c\x22\x06\x9c\xee\xb1\x49\x16\x9d\xde\x17\x13\xf3\xa1\x61\x5a\xcd\x5e\x0f\x8f\x1e\x91\xde\xe7\x16\xf3\x8e\xb5\xd0\xf5\x23\xa4\x47\x8d\x09\xea\x86\x57\xc9\x37\x03\x35\x78\x76\x3a\x4b\x5e\x36\x74\xfa\x80\x88\xab\xd8\xa8\xd7\xcb\x6b\x71\xce\x03\x06\x6c\xb5\x71\xa0\x48\xfc\x89\x2c\xf8\x1d\x2f\xcb\xf3\xa9\x78\x54\x35\x67\x82\xdb\xe3\x44\xa0\x63\x74\x69\xc0\x7d\x1d\x03\x19\xd7\xe6\xde\xc4\x4f\x36\x2c\xc0\x61\xcb\x8b\x25\x2f\x42\x15\xe4\x68\x80\x03\x1c\xcd\x41\x92\xdd\x10\xb5\xc9\xd9\xbe\xc9\xe7\x17\xef\x64\x5b\xce\x6e\xac\xcd\xe8\x68\xfa\xff\x0e\x34\xaa\x3f\x16\x66\x34\xe8\xaf\x49\x05\xf8\xdc\xd9\x96\x75\x74\x5b\xbf\xc3\x89\x22\x8d\xc8\xe2\x8c\x4a\x0a\x9c\xae\x95\x83\x72\xb0\x39\xe4\xa9\xc0\x76\xbc\x01\x06\xf0\x20\xf7\xc5\x87\xa9\x11\x28\xf4\x65\xf3\x94\x79\xba\x26\x03\xb7\x9d\x53\x5d\xc9\x9d\x7b\xae\x01\x3f\xf8\xc7\xfb\xc0\x8f\x1d\xbf\x8f\xa0\x58\x65\x1f\x56\x0e\x18\x27\x50\x1c\x1d\xd1\x1b\xc7\x35\xf0\x39\x94\xde\x03\x60\xdc\xf2\x75\xd7\x78\x14\xc8\x65\xde\xf2\x29\x4f\x84\x0b\x7f\x28\xef\x2b\xcd\xf3\xc2\xcd\xe7\x27\x11\x08\xfb\xc2\x46\x8f\x70\x03\xfa\xb3\x4f\x87\x18\xb5\x56\x43\x7e\xa4\xd7\xbd\x87\xf7\x75\x00\x85\xdc\x76\x6a\x8d\x8b\x57\xc1\xa9\x8f\x73\x7f\x27\x51\x3f\x22\xc0\x8a\xa6\xe4\xd0\xf9\x02\x75\x41\x8e\x43\x69\x1a\xa4\x92\x2d\x40\x11\x40\xa2\xc7\x98\xee\x28\xdb\x20\x9c\xa0\xa7\x82\x19\xcc\xef\xa3\xa3\x9d\x0c\x7c\x84\xa4\xe4\x6d\x6b\x38\x05\x4e\xd0\x4d\xa3\x55\xa0\x9a\x5a\x08\x70\x60\x68\xb1\x82\x12\x1e\x08\x6c\x6d\x3b\xce\x97\x09\x0b\x59\xd1\xc8\xec\x54\x79\x94\xc5\xbb\x88\x09\xef\x06\xbe\x88\xa5\x95\xd8\x21\x67\x8f\xc2\x09\x93\xd0\x13\xa5\xd0\xa5\xdd\xdc\x00\xf0\x3c\xb5\xc0\x1f\xa4\x4d\x01\x6d\xa2\x2c\xf2\x68\x0f\xbd\x70\x33\x0f\x4d\xe5\xd8\xcd\xbe\x5f\x55\xd3\xac\x84\x7c\xac\x44\x20\x85\x14\xfc\x4a\x46\x2a\x1d\x0c\x32\x94\x52\x65\xa7\x79\xea\xca\x07\x9d\xc2\xfc\xb4\x21\xc0\x31\xb8\x30\xbf\x80\x13\x80\x89\xbc\x83\x9c\x0b\x90\x60\x22\x1e\x6d\xe9\xc5\xe1\xde\xe0\x98\x34\x21\x39\xd4\x29\xfd\xea\x90\x68\xa3\xa6\x88\x54\x36\xab\xc8\x6e\xdc\xa5\x9e\xe6\xca\x58\x8e\xa7\x19\xbb\x13\x51\x0a\xe7\xdc\x12\xa5\x4a\x10\x73\x74\x7a\x91\x3e\xa5\xa3\x03\xbd\xc1\x2a\xa4\xbc\x66\xf6\xd9\x96\xcf\xf5\x20\xc5\x8b\x6d\x48\xcd\x40\x4b\x07\x00\xc2\xb4\x40\xb7\xe1\x60\x5a\xe7\xad\xf6\x47\xa8\x78\xe0\x62\x6d\xce\x46\xd2\x41\x79\x18\xe6\xc1\xed\xd2\xb9\x8d\x74\xcd\x06\x8e\x93\x24\x5a\x33\x44\x72\x97\x6a\x6d\xd8\x07\x4f\xbb\x29\xc8\xc4\x27\xcb\xb3\xd4\x0e\x65\x61\x16\x61\x78\xc3\x1b\xa2\xa1\x92\xcd\xe4\x2e\x2d\x60\x22\xd1\xe7\xb5\x98\xc2\x85\x58\x58\x0e\x69\x73\x52\x03\x94\x6e\xb6\xf3\xab\xa6\x1e\x16\xe8\x1f\x06\x4c\xde\x14\xc0\xcd\xad\x5c\xbc\x0c\x08\x17\xa1\x3a\xda\xdd\x21\x9c\xb9\xe2\x60\x90\xc9\xad\x46\x92\xbd\xd4\xb6\x8f\x38\x72\xbe\xa3\x1a\x60\x40\xa6\x52\xfd\x56\x22\x39\xe3\x92\xa1\xf9\x95\xf7\xaa\x6a\x86\x23\xd2\x1a\x4f\x35\xb2\x14\x74\x75\x80\x67\x33\x91\x8d\x4a\x97\xd0\x1a\x88\x0f\xfc\xd1\x94\x38\x98\xd4\x7a\x3c\x23\x31\x1b\xa2\xcf\x3a\x9c\x5f\xb6\xd4\x53\x84\x2e\xf9\xe3\x0d\xbb\x08\x49\x91\xba\x66\xb8\x52\x0f\x19\x18\xc8\xff\xce\xbe\x9f\xe7\x7f\x2c\xef\x1f\x7e\xc9\x18\x1a\x87\x58\x27\xf6\xc9\x3a\x7e\xd8\x85\x23\x0b\x47\x36\xa5\xc4\x12\xa7\xdb\x2b\xe7\x98\xab\x45\xaf\xe5\x8c\x3b\xf4\x25\xcb\x9c\x04\x10\x64\x0f\x0f\x05\x46\x16\xc0\xe0\xe7\x83\x53\xe3\x43\x41\x44\x0b\x4d\x05\xb2\x8d\x39\xa2\x2e\x44\xde\x3a\x4e\xf8\xdb\x81\xa2\x50\x46\x6f\xf4\x08\x89\xf3\x54\x47\xf5\x08\x99\x2d\x3b\x6e\x62\x9c\x67\x18\x0a\x2b\x0d\xc0\xe9\x77\xc4\x9c\xb0\xa6\xac\x58\xae\xd5\xd4\xc4\x17\x40\x24\x9b\xb4\x28\xf6\xe3\xeb\x21\xdf\xb9\x2c\xe0\xf9\x96\xf6\x2e\x87\xbe\x7a\xf6\x89\x65\xed\x03\xb8\x1c\xa8\xa3\x38\xcb\x0b\xe5\xd1\x93\x64\x37\x01\xb5\xc2\xa1\x06\x10\x92\x91\x37\xd3\x39\xd8\x80\xa3\xea\xf9\xf0\xd2\x8d\x10\x1d\x9f\xcb\x2a\x8d\x04\xc6\xfe\x79\x0a\x59\x10\x6d\x85\xcb\xa4\xf7\x18\x8f\xc4\x73\xe2\x5b\x52\xe6\xed\xf3\x95\xd2\x4f\x02\xf0\xc6\xb3\xac\xfb\xe5\xac\x01\xd3\x3c\x9a\x17\x5a\xf2\x12\x4d\xa4\x4f\x0d\xcb\xfb\xcc\x23\xb7\xe1\x5e\x99\xc0\xb2\x94\x8c\xd0\x6c\xcc\xda\x7c\x0a\x4a\x92\x13\x87\x43\x62\xdb\x9a\x83\x39\xf2\x76\x79\x16\xe0\x19\x8a\x01\x40\xa6\x00\xdf\x5f\x2b\xe0\xbb\x79\x7c\x05\xb3\xc5\x98\xec\x4b\x67\x4f\x81\xc2\x80\x17\x85\x19\x5b\x74\x8a\x87\x49\x71\xea\x0a\x56\x22\x59\xa9\xe7\x43\xa1\xaf\xe5\x55\xe7\xbc\xc4\x3a\x55\x03\x79\x63\xa8\x31\x90\x65\xe4\xc4\xc0\xac\xee\x64\x1c\xc3\x48\x93\x55\x80\x61\x9c\x05\x0c\x1d\x1c\xe3\x28\xed\x5a\x90\xda\x3a\x38\x29\x41\x5e\x25\x51\x74\x58\x87\x50\x2a\x6d\x66\xc3\x48\x21\x77\x70\xa4\x89\x3b\x34\x55\x47\x70\xfe\xce\xcf\x00\x0a\xd8\x81\x5e\x4d\xba\x26\xb2\x0e\xb6\xc7\x74\xc1\xb8\x51\x5a\x32\x9e\xa6\x4e\x0b\xe4\x8b\x80\xa7\xee\xe9\xc0\xa0\xf1\x85\x14\x7d\xd0\x93\x22\x44\x5b\xb1\x15\xeb\x25\x3b\x72\x64\xc4\x42\xb7\xc6\x44\x0e\xd9\x7a\xde\xc1\x0c\x16\xca\x94\x19\x3f\xc5\xde\xe8\xb2\x00\x48\x77\x13\x1d\x10\x53\xc3\x5e\xe2\x9b\x4a\xb2\x18\xda\x48\xc6\x7c\x1b\xaf\xd8\xf2\x48\xd7\xbd\x45\x4e\x1e\x3a\xda\xa8\xba\x07\xd8\x6e\x16\x72\xc9\x41\xbb\x08\xad\x79\x85\x03\xce\x2e\x16\x4b\x43\xb0\x8c\xee\xe4\xe2\x97\x80\x40\x40\x77\xd8\x6c\xe6\x7e\x66\x94\x85\xf6\xec\x09\x5d\x23\x24\x4f\xe5\xa9\x0f\x2e\x6a\x07\x16\xf0\xa2\xd7\x94\x1c\xaf\x56\x25\x96\xd0\x90\x65\xcb\xb8\xaf\xcc\xb4\x97\xcc\x74\x21\x63\x20\x6f\x31\x08\x5e\x75\x97\xa1\xcc\x9b\xc8\x45\x30\x35\x06\x47\xac\xc9\x37\x7f\xa5\x3a\xe1\xaa\xb8\x1e\x1e\xc4\x08\x90\x15\x35\xbe\x83\x39\x8d\x0f\x60\x05\x2f\x5b\x9a\xcc\x35\x75\x08\x67\xce\x25\xda\x51\x47\x4b\x12\x8b\xd8\xbb\x97\x20\x43\x9f\x54\xe2\x56\xc2\xad\x08\xd9\x44\x9b\x53\x19\x3e\x03\xff\xb9\x72\xc7\x3b\x0f\xa9\xd3\x22\x34\xf8\xed\x35\x64\x22\x4c\x26\x06\x62\x0d\xd0\x03\x70\x32\xc8\xe4\xe0\x02\x01\xbe\x1b\x80\x16\xd0\x61\xb6\xb7\x73\xb7\xc3\x09\xc8\x2f\x5c\x09\x62\x1b\x0c\xe4\x88\xac\x92\xd4\x6e\x79\x39\x23\x74\xb1\x0c\x7d\xd9\x7d\x50\x92\xe9\xa0\xec\xdc\x48\x45\x51\xfc\xef\xff\xcb\xed\xc7\xfe\x07\x4b\x25\xba\xe7\xaf\xa9\xc4\x6b\xdd\x40\x90\x74\x74\x3f\x4c\xde\x60\x7f\xdb\xe3\x04\xc9\x06\x3c\x92\x47\x23\x92\xbd\x27\x4c\xf4\x90\x65\x27\x15\x3f\x48\xe3\x41\x52\xe1\x8b\x84\x96\x07\x29\x36\x69\x07\x61\x98\xe1\x48\x22\xe7\xc9\x54\x23\x14\x4f\x79\x34\x85\x0a\x1d\x3a\x89\x6f\x62\x09\x8e\x79\xa1\x7e\x20\xea\x93\x35\x66\x7b\xb7\x2e\x5e\xd7\xb7\x2c\xcb\x92\xc7\xe3\xc9\x16\x06\x75\x0a\xe3\x03\x20\xba\xf8\xda\xe6\xca\x0c\xd3\xb3\x96\xa2\x4a\xa6\x18\xd8\x7b\x6c\xcf\xc7\x48\x44\x2f\x14\xeb\xa2\xf3\x51\x30\xda\x2b\x8b\xed\x87\x67\x43\x20\x7b\x57\xc4\x3b\xac\x80\x64\x9e\xa2\x74\xef\x21\xd5\xa0\x48\x3e\x1f\x69\x6d\x9c\xde\xf3\x06\x11\x30\xbe\x9f\xba\x38\x06\x98\xd6\xd7\x49\x72\xc2\xf6\x91\x34\x84\x4a\x55\x96\x03\xf6\x49\x2e\x54\xb3\xcf\x75\xa1\x0f\xab\x29\x71\x4c\xb4\x73\x54\xac\xfb\x06\xee\xc8\xc8\x85\x15\xdc\xf3\x98\xca\xd0\xcd\xb8\x36\xdd\x2d\xc6\x16\x0d\xfb\xe7\xf3\x8a\x15\x04\xa8\x80\xb6\x11\x69\xed\x40\xfb\xca\x30\x79\xc3\x2a\x87\x6a\x12\x31\x6a\x40\x60\x0f\xda\xe2\x57\x0f\x97\xe6\xaa\x84\x36\x5e\xd8\x57\xdf\x60\x45\x43\xfb\x44\x41\x6a\xe7\x48\xf6\x67\x29\x84\xcc\x41\x3f\x81\x48\x7c\xb2\x6e\x25\x0d\xed\x06\x18\xa5\x6c\xaa\x42\xf8\x74\x7c\x90\x9f\x9f\x8e\x25\xb2\x3d\xca\xe9\x9e\x70\x3d\x80\xc3\x1e\x9a\x66\x36\xb4\x09\xda\xa9\x48\x08\xa9\x37\x52\x76\x01\x21\x1d\xf9\x8c\x90\x3d\xb0\x66\x15\x4b\x21\x68\x18\x32\x07\x53\xa9\xe5\xc0\x9e\x36\xf8\x7e\x2c\x01\x43\x6f\x4e\xd3\x8c\xad\x22\xb6\xbe\x8e\x00\x3e\xeb\xa7\xc3\xc3\x74\xca\xb4\xa4\x2c\x2b\x77\x8e\xd5\xb5\x1d\xfe\xa5\x8a\x82\x4c\x18\xee\x24\xe2\x0c\xb0\x05\xd8\x3e\x43\xe3\xd1\xd1\xfa\xdc\xdc\x0f\xbb\x21\x8a\x83\x34\x3d\x83\xf0\xce\x71\x8c\xfd\xb0\x7c\xf7\xe3\xf1\xb8\x22\x84\x44\x85\xb0\xc2\x14\xa4\x15\xcd\x97\x77\xd1\x89\x82\x2d\x76\x58\x91\x5e\xed\x15\x64\x37\x9e\x4d\x8f\x3e\x9a\xc9\x8e\x3a\x19\xf3\x1a\xfa\xe8\x58\xb3\x53\x18\x65\xaf\x29\x50\x55\x88\xaa\xf1\x7c\x5d\xe1\xb6\xe1\x0e\xb4\x68\x84\x95\x97\x10\xbc\x31\x46\x48\x63\x0b\x48\x51\x3a\xb3\x5d\xaa\x4f\xa9\xfb\x85\x73\x34\xa5\x04\xcd\xdb\xbe\xc4\x9a\x32\xb2\xae\x17\xd9\xc5\x0a\xd0\x36\x98\xe5\xe7\xc3\x19\xbc\xc4\x1e\x14\xb5\x66\x05\xf2\x12\x0d\x88\xa2\x29\xeb\x04\xde\x6e\xf9\x08\x9d\x72\x9e\x3a\x76\xa2\xb2\xd8\x82\xbd\xab\x4c\x95\x02\xbc\x57\x60\x2b\xc8\x48\x6c\xda\xc5\xe2\x15\x81\x56\x22\xec\x66\x54\xbe\x0c\x21\xa1\xbe\xf8\xa5\x1f\x39\x7d\x7a\x0b\x7d\x00\xe5\x9d\xb0\xc3\x26\x6a\xa9\x57\x17\xc4\xa6\xb6\xdc\x96\x01\x99\x1a\x19\x10\x93\x50\x0d\xf9\xde\x9e\x56\x82\x9e\x8b\x2c\x4f\x53\x1f\xc0\x69\x65\xb2\x44\x89\xf8\x68\x0a\x8c\x77\x81\xb7\xbd\x8a\x54\xfb\x32\x1f\x24\x93\x11\x5e\x01\xd0\x86\x54\x70\xe4\xef\x0c\x14\x71\x37\xfe\xc1\x80\x22\xfc\xf5\x39\xc5\xe3\x39\x3b\x2d\x1b\x00\x4f\x78\x27\x02\x17\xdc\x27\xe8\x58\x57\x11\xa5\xd3\x51\x21\x22\x96\xa7\x42\x87\xd9\xc1\x34\xc7\xb0\x97\x88\xf5\x8f\x61\x06\x1d\x03\x30\xb7\x8d\x01\xd9\xc2\x65\xc8\x70\x5e\x64\x0e\x21\xcd\x67\x84\xd1\x9a\xec\xa1\x93\xbf\xfb\x59\x02\xe1\xfa\xe6\x66\x69\x04\xc7\x45\xc2\x61\xd9\x0b\xb8\x32\x14\x48\xf1\xbe\x52\xc3\xb2\x60\xcf\x5e\x26\xf2\xd8\x9e\x3b\x74\x8c\x29\x5e\x0d\x99\xa6\xa0\xaf\xe9\xe1\x5e\xa5\xed\x44\x36\xc6\x0e\x50\x28\x48\x99\xae\x7b\xbe\xe4\x9b\x65\x76\xc3\xd4\xf3\x3a\x3b\x15\x30\xd2\x64\xf5\x1d\x8b\x2e\x56\x17\xd1\x2f\x84\xde\x03\x38\x69\x2e\x24\x7b\x9e\x28\xd3\x2a\x74\xc4\xc7\xf1\x5d\xfb\x4c\x32\x6c\x0b\x8f\x6a\x46\x86\x0a\xba\x69\xd1\x86\x2e\x23\xfa\xb8\xb0\x2a\xe0\x0b\x88\xb7\x97\x16\xd2\x0f\xd9\x06\x4b\x87\xc0\xf3\x66\xe5\x28\xe5\xa2\x0e\x72\x68\x21\x22\xc8\xaf\xac\x48\x11\x5d\xe1\x28\x12\x4f\x82\x0f\x82\xd1\xa9\x91\xb2\xf1\x25\xcf\xf7\xfc\xe9\x01\x4a\x81\x69\x85\xb4\xe5\xc7\x8b\x06\x69\x93\x67\x7d\x2f\xba\x9d\xa3\xaa\x2e\xce\xa8\xc9\x57\xbc\xd4\xae\x5c\x47\xd2\x3d\xec\x2a\x03\x18\x68\x71\x5e\x52\xc9\x43\xc9\x7e\x65\x7e\x06\x25\xe4\x46\x32\xc6\x9b\xa7\x3a\x6a\x57\x22\x7e\xb3\x39\x33\x62\xf2\x12\x7e\xb6\x94\xed\x55\xc4\xb8\x75\x75\x2c\x83\x14\x22\x19\x5b\x0b\xef\x9a\x31\xaa\x2f\x29\x5d\x1a\x4d\x99\x53\x7a\x67\x12\xa6\x26\x97\x7a\x2d\x50\x5b\x6c\x86\x4a\x56\xa2\xa1\x51\xdf\x26\x94\xf4\x61\x3c\xbd\x49\xf5\x4a\x26\x1e\xf7\x63\x41\x36\xa1\x5c\xbd\x0f\x0d\x48\x97\xd3\x3a\x36\x90\xaa\x28\x69\x79\x2f\x3b\xa4\x1c\xa4\x44\x4a\xb4\x88\x6e\x27\x54\xf8\x41\x3c\xbd\xb3\x35\xb9\x51\x7d\xd0\x4c\xf1\x99\x30\x16\xd8\xbf\xc8\x93\xf7\x70\xf2\x71\xef\x6c\x40\xc9\x21\x14\xb6\xc9\xc2\xae\x92\x12\x67\xa9\x5a\x67\x3a\x15\xd1\xb6\xa1\x16\xe5\x89\xa0\x5b\x7b\x79\xcd\x7d\xaa\xae\x63\x40\xa6\x6a\x94\x4a\xce\x69\x4f\x2c\x20\x27\x7a\xae\x4e\xbd\xef\xb0\x6a\x92\x67\x33\x86\x3c\x08\x66\x73\x0e\x49\x9c\xb7\x35\x0b\x05\x01\x26\x33\x5e\x32\x17\x05\xc3\xaa\xdd\x5b\x9d\x23\x93\x8a\xbb\x20\x9b\xd8\x9a\x5a\x7d\x16\x0f\x72\xd1\x4b\xde\x6d\xe1\x7c\x13\x5b\x68\x15\x35\x0a\x0c\x22\xe2\x59\x34\x5a\x45\x74\x67\x49\x46\x2d\x98\x35\xc3\xdc\x3c\xab\x04\x68\x78\x85\xd2\x4c\xf5\xbc\x20\xf9\x39\x59\x84\xfb\x0c\x8d\xf8\x6d\x97\x62\x0d\xb1\x7c\xf9\x80\xd6\xe5\xd2\x7a\x2b\xaa\x5e\xf3\xd3\x39\xd5\xb7\x48\x51\x0f\xc5\xb4\x6d\x47\x99\x11\x27\x5d\x40\xf9\xb9\x3a\xc0\xa6\x29\xa7\x38\x77\xf1\xfb\x7e\xf9\xbe\x35\xf7\xa4\x65\x8d\x5b\xcc\x13\x79\x2c\x9b\x97\x5b\x3e\x7b\xe0\xb6\x0e\x88\x58\x89\x81\x7e\xc6\x08\xae\xe6\x87\x13\x90\xa4\xb3\x28\x95\x37\x23\x86\x23\xfd\xae\x7b\x92\x3f\xd8\x23\xcc\xe4\xfc\xf5\x98\xae\x79\xce\x5f\x1e\x61\x76\x61\xdf\x14\x83\x44\x47\xfc\x9b\xce\xca\x4d\xb2\xa3\xb6\x94\x42\xcb\x09\x29\x0c\x8b\x40\xe1\xf0\x17\x1d\x30\xfa\x07\xa7\x3e\x88\x47\xb9\x5e\xa0\xf2\x0e\xe8\x19\x12\x71\xc7\x55\x44\x0f\xe4\x12\xb0\x1c\x8d\xd1\xb2\x70\x0d\x57\x67\x8d\x50\x97\x71\xdb\x5d\xf7\x15\xa8\x7d\x03\xf4\x3d\x94\xa1\x27\xe8\x99\x26\xa7\xee\x3a\x70\x60\x9e\x75\xa3\x75\x5c\x01\xc4\xfb\xcc\x75\x8c\x80\xbd\x11\x66\x66\x89\xee\x55\x0f\x4d\xa1\x97\x8e\x47\x0f\x91\x7d\xa2\xed\x96\x9b\xaf\xe1\x19\xb2\xd6\x7a\xe8\x65\xe3\x09\x8b\x17\xcf\xe1\x23\x7b\xb3\xfa\xb9\x6c\x5b\xcc\x72\x58\x07\xda\xd4\x0e\x19\x48\x5b\xe9\x43\xee\x6f\xf7\x9e\x6d\xed\xba\x5a\x93\x07\x39\x87\xf0\xe0\xeb\x89\x06\xcb\x61\x1e\x2d\x05\xea\x6b\xe7\x45\x3c\xb8\x4b\x3d\xea\xd6\x6e\x4f\x4d\x52\xed\x88\x08\x0d\xe1\x66\x0c\xb1\x2e\x8e\x74\xe8\x88\x5b\xb9\x73\x5f\x4f\x70\xb4\x89\x7b\x8d\x5c\x0e\x4a\xb2\x5b\x1a\xf2\xe7\xc9\x30\x55\xe5\x2c\x2b\x04\x81\x98\x82\x42\x1c\x8e\x2a\x0b\x7d\xec\x60\x0a\x1d\x0b\x4a\x78\x3b\xce\x69\xc8\xa4\xb0\xbc\x46\x21\x87\x6d\x76\xe3\xd4\x6c\x55\x09\x51\x9e\x81\x0a\xea\x3c\xf5\xa0\x41\xab\xdf\x2c\xce\xe6\xa1\x40\xbe\xc6\xf1\x90\x03\x37\xe5\x35\xdc\xe6\xca\x9b\x9a\x78\x31\xeb\xdd\x4c\xa1\x9d\x35\x77\xcc\x82\x9d\xb7\xe4\x44\x59\x5a\x36\x59\x99\x72\x90\x14\xa6\xf0\xe7\x4b\x17\x6e\x2c\x11\x69\xde\x06\x9e\xc6\xf2\x9a\x46\x63\xe5\xb5\xf4\x2a\x57\x9e\x25\x4d\x8f\x31\xb8\xc9\x90\xac\x8c\x51\x88\xd7\x86\xb8\xb1\x12\xc9\x07\x21\x9a\xa4\xa4\x1f\xf5\x3a\x48\x7c\xeb\x92\x03\x63\xbc\x40\xf0\x91\x9b\x9c\x6d\x07\x7e\x52\xb7\x89\xff\x86\x8a\xc7\x63\x81\xb1\x11\x55\xee\xbb\xdd\xb3\x67\xc5\x9a\x5a\xf4\xa2\x78\xe1\xc9\xc6\xb3\x45\x66\xd3\x5c\x9f\xec\x54\x25\x82\xb1\xbe\x80\xc0\x62\x04\x75\x8c\xde\x0b\x7e\x48\xe4\x48\xec\x7b\x1e\x43\x2f\xbc\x4a\xe3\x81\x74\x1b\x93\x8c\xd0\x9c\x0a\x7c\x9d\x98\x4f\x0d\x51\x8b\x1c\x3c\x77\x5d\x4f\x85\x82\x64\xc9\x97\x36\xf0\x29\x02\x56\xcf\x1a\xfc\x7d\xcf\x04\x92\xf1\x0f\x16\x6b\x73\xe9\x57\x87\x5a\x08\x9d\x05\x59\x07\xe8\x42\xc8\x2b\xa6\xd1\xf7\x1f\x86\xc8\x70\x69\xd4\xba\x4b\x5b\xbe\xde\x2d\xa9\x19\x91\x26\x73\xe4\x91\xef\xc2\x7e\xd8\x00\xa7\xbe\x32\xc0\x01\x54\xad\xa7\xba\x23\xa9\x5f\x1e\x03\x92\x34\xcb\x17\xa5\xd8\xc4\x0e\x18\x47\x11\xbb\x96\x19\xac\xd9\x12\x18\x7a\x2e\x84\x4d\x30\x2e\x85\x2b\xf6\xca\x32\x20\x26\x70\x18\xbe\x78\xf2\x28\xd4\x58\x79\x42\x40\x7e\x3f\xa2\x3b\xee\x49\x3d\x80\xde\xf3\x8a\x87\xf9\x74\x13\x92\x3a\x07\xe1\x43\x42\x80\x0c\x1a\x35\xae\xae\x92\xca\xdc\xfd\xb6\x18\x51\xfe\x16\x86\xde\x6f\xa0\x01\xb3\x5e\x2e\xd6\x00\x76\x4d\xcd\x2a\x70\xf2\x24\xa2\x2a\x57\xa6\x59\x7a\xf8\xaa\x9b\x13\x67\x1e\xdb\x44\x3b\x30\xd9\x5d\xcf\x4b\x0c\xaa\x9b\x82\x31\xb2\xa5\xad\xe6\xc8\x6b\x8f\x31\x91\x6d\x43\xc0\x4b\x6d\x81\xe5\xe1\x1f\x75\xe6\xd9\xa5\x61\x20\x21\x66\xbc\xad\xde\x6a\x82\xab\x49\x18\x3f\x5a\x74\xa4\xed\xf2\x5d\x0b\x6d\x8b\x23\xa6\x97\xcd\x50\x2c\xa7\xc7\x6f\x34\xd6\x26\xba\x68\x69\x9a\x3e\x65\xd0\xde\xf7\xf0\x12\x5d\x84\x16\xcf\xb8\x18\xe9\x07\x52\x74\x80\xee\x74\x1c\x2d\xb2\xaf\x4a\xd2\x2f\x95\x05\xb2\x97\x32\xf4\x44\x8d\x08\xfb\x25\x04\x4a\x2d\x5b\x87\x49\x5b\xac\x53\xe4\xc4\xe3\x89\x76\x5c\x7c\xbe\x0c\x0b\xa3\x43\x49\xbd\x25\xc2\x6a\x29\xfa\xf0\xe1\x5c\x62\x14\x1e\xd1\x7d\xfc\x6a\x92\xa3\xe9\x8c\x4e\x5a\x47\xb6\xf4\x22\xbc\x78\xa6\xfb\xbb\xb5\x8e\xfa\xc8\xda\x2c\xbe\xf1\x95\xf4\x95\xa1\x2d\xc1\x11\xe0\xce\x8c\xc8\xd9\x59\x86\x3c\x86\xe3\xd9\x42\xae\xcf\xfc\x5d\x67\x85\x0f\xb6\x8c\x9d\x00\x65\xf6\xde\x38\x82\x00\x04\x9e\x5d\xda\x44\xf6\x8f\x6b\x88\x6e\xef\xcd\xa4\x2d\x3d\x63\x0f\x66\x90\x8a\x99\xba\x53\x11\xb4\x89\x39\xd0\xb0\xab\x80\xee\xe5\x56\xdb\x48\x56\x61\x66\x47\x35\xea\x8e\xb7\x2b\xdc\xee\xee\x49\x3d\x31\x07\x79\xdf\x37\x94\xc3\x09\xa7\x9d\x20\x3f\x3d\x21\x8e\x48\xee\x75\x64\xcf\x3e\x59\xa6\x60\x88\x84\xd1\x12\xe5\xf5\x04\x6f\x29\x75\x45\x6e\x14\x0c\x6c\xbc\x20\xa2\xdb\xde\xcd\x73\xb3\xdf\x2f\x88\x18\x00\xcc\x12\xd8\xbe\x7c\x81\x02\x17\xb1\xd8\xbb\xee\x94\xde\x3b\x1d\xe9\x7a\x2a\x97\xdd\xae\x14\xdc\xbc\x28\xaa\xa0\x32\x36\x33\xec\xca\x33\x97\xe6\xf7\x4e\x78\x93\x65\xf9\x63\x39\x61\xf3\xd5\xce\xb8\x59\x77\xa7\x65\x0d\x60\x43\x99\x81\x56\x5a\xc0\x24\x65\x59\x76\x76\xaf\x13\xcf\x3a\xe8\x57\x63\x4d\x36\x58\xd9\xbf\xbc\x7d\xe2\x2b\xeb\x13\x4b\x06\x8e\x86\xf4\x65\xa8\xd9\x48\x95\xc3\x95\x9e\xb8\xc8\x4e\xf9\xae\x8e\x2d\x90\xe6\x61\xea\x7a\xec\x59\x05\x6b\x1a\x65\xf1\xbe\xe5\xe0\xdb\xfd\xbe\x42\xfc\x75\xc3\xb7\xc9\x61\xbb\x89\x05\xbb\x7f\xdf\xfa\xac\x3a\xf4\x95\x63\xaf\x98\x22\x6e\xed\xe1\xe6\xa3\xa9\xf5\x68\xd9\x68\x69\xae\xeb\x3e\x00\xb5\x02\xd0\xe6\x95\x52\xa5\xf7\xea\xa3\xdd\x1b\xaa\x15\x9e\x07\x67\x59\x61\xdf\x22\xfb\x6a\x2b\x6f\x4c\xef\x43\xc7\x85\x7d\x92\xa6\xad\xee\xf6\x2d\xe5\x1c\x24\xe6\x82\x97\xd7\x3c\xb9\x70\xd1\xa8\x55\x1e\xc7\xf4\x15\xd0\xcc\x7b\xc3\x71\x3a\xcc\xf6\x14\x2e\xf2\x36\xb7\x1d\x2e\x71\x4a\x1d\xcc\x74\xa5\x8a\x2b\xd1\x24\xe6\xda\xa2\xc6\xe2\x20\xf3\x0c\x49\xdd\xc4\xc5\xd2\x72\xcd\x46\x44\x17\xd0\x6e\xb9\x5a\x3e\x50\xe6\x3b\xbb\x62\x76\x4e\xec\x17\xca\x05\x95\x00\xd0\x97\x4e\xe6\x38\x52\x68\x31\x0d\xed\x6a\x79\x2f\x95\x59\xea\xe5\x48\x63\x99\xe1\xa8\x0f\x96\x7c\x8e\xd2\x2d\x2a\x6c\x5f\x9b\xd6\x26\x2d\xf5\x86\xab\xd2\xb4\x38\xb4\x65\x66\x15\xc6\x8c\xf0\xe5\x4f\x49\xca\xb7\x42\x08\xcc\x8a\x1e\xdd\x86\xc7\xd3\xfd\xeb\x81\x05\x1e\x32\x92\x0d\xeb\x81\x56\x7d\x3b\x77\xd4\x7b\x2d\x1d\x01\x4a\x91\x98\x60\xfb\xce\x87\xdd\x66\x2b\xac\x4d\xc4\xe6\xce\x96\x5e\x05\xcc\x97\xd9\xbe\x41\xf1\xcd\x8f\x70\x89\x30\xc2\xc0\x2c\x2c\x1a\x98\xbb\x71\x55\x72\x65\x5a\xea\x5d\x35\x26\xa9\x59\x90\x37\x4c\x43\xe8\x6d\xc8\x53\xc6\xcd\xe3\x6e\x35\x8d\x74\x19\x55\x55\x85\x52\xe4\x77\xae\x35\x4f\x89\x9b\xe5\xc0\x03\xb3\x11\x14\x83\x82\x86\x2d\xa6\x44\xe2\x67\x6b\x4b\xf5\x3b\x67\xdf\xcb\x1c\xdd\x1a\xa9\x92\x07\xf6\x02\x3b\x7d\xf3\x1e\xaf\x96\xeb\x87\xa7\x8e\xf8\x4c\x55\x98\xa5\x56\x1d\x06\x79\x49\x32\x6e\xc7\xcb\xdb\x02\xf4\x88\xc4\x8b\x8a\x14\xc9\x32\xb8\xa1\xcb\x2c\x28\x31\x5f\x5c\xf2\x75\x88\xd9\xaa\xf3\x18\x47\x4e\x65\xfa\x9e\x69\x74\x03\xf3\x87\xed\x5c\x42\x71\xa9\x36\xc3\xd8\x03\xbb\x02\xf9\x6a\x2c\xec\xee\x21\xac\xce\xa3\x5a\x98\xcc\xfb\x01\x76\x6d\xd5\x45\xb3\xed\x37\x7a\x3e\xfa\x7a\xf2\x6e\x8d\x81\x5f\x6b\x92\x2e\xc6\xf9\x32\xfc\x45\x7f\xaf\x02\xd0\xef\xa6\x3f\x51\xd2\x38\xc8\x82\x7a\xf3\xef\xe6\x4d\x81\x5a\xda\x2e\xb8\xf2\xbe\xc8\x40\x1e\x9d\xe9\x99\xae\xcf\x6a\xdb\x29\x3c\x37\x99\x91\x68\x66\x82\x79\x9e\x1a\x77\x34\xe3\xd0\x2c\xfe\xb6\x74\x7e\x14\x7a\x5c\x0f\x26\x83\xfb\x22\x66\x20\xc6\x00\xb2\x38\xc8\xc6\x61\xdf\x91\x11\x99\xe7\x72\xfc\xbe\x11\x38\x8d\xd6\x3f\x96\xf3\xe7\xee\xcf\x11\x58\x75\xc0\xa7\xce\x3e\x59\x47\xcf\x80\x77\x04\x6e\xe3\xda\xb5\xa4\x55\xc0\xea\x50\x85\x05\x4d\xc2\xa5\xf1\xd2\x05\xb2\x8e\xa7\x63\xb1\x08\x1a\x7e\xd0\xfa\xcb\x7b\x7a\xc0\x83\xb2\xcc\xec\x0a\x1c\xfd\x10\x11\x83\x74\x1b\xb2\x70\xd8\x42\x8c\x5d\xb1\x78\x72\x61\x0c\x8d\x2d\x1a\xc3\xf7\x0e\x25\x02\x55\x2f\x91\x6d\x6b\xd1\x23\x23\x5e\x84\x96\xe7\x09\x9f\xc9\x98\x52\xda\xd9\xce\xed\x0f\x4d\x1a\x42\x41\x17\xb4\x7c\xbe\x81\xa5\x7d\x61\xf2\xe8\xe5\xe5\xd9\x2b\x19\xde\xfa\xca\x13\x18\xde\x80\x6a\x85\xd3\xd0\x6b\xbe\x03\x34\x20\x49\x62\x6d\xfe\x2e\x59\x4e\x9c\x5b\x72\xd1\x21\x5d\xbd\xf4\x75\x7e\x92\x4b\xa2\x8c\x57\x81\x8e\xf1\x2a\x0a\xec\x5c\x4e\xd9\x8d\x3c\xa2\xa3\x4b\x10\xb4\x17\x5f\x1c\xbb\x1f\xef\xa8\x32\x36\x4a\x98\xec\xc4\x3a\xd5\x5a\x2a\x3b\x1f\x04\xb4\x65\x7c\x9e\xf3\x0b\x7f\x71\xa7\xc7\xde\x87\x5a\xf5\x27\x79\xb3\x24\x72\x72\xe2\xd8\x6b\x75\x96\x0a\xb6\x3c\x06\xf1\xe9\x21\x0e\x44\xeb\x48\xfd\xda\xbc\xb3\x73\xe4\xa5\x28\x55\xba\xe0\x44\xa8\xe3\x32\xc2\x28\x84\xb0\x06\xa9\x08\xb9\x4a\x8e\x7b\xc8\x3b\x2f\xd9\x83\x68\x2a\x9b\x4e\x03\x59\xde\xd7\x0c\xf6\x80\xb0\x83\x7a\x2a\x13\x70\x16\xb1\x45\x53\xbe\x9c\x79\x12\x0f\x68\x76\xda\x5c\xaf\xc4\xb3\x53\x1b\xa6\x09\xb3\xf3\x2c\xbe\x81\x7c\x5a\x69\xbd\x01\x39\xed\x77\x9c\xbf\xd1\xa9\xc4\xf5\xd1\x57\x71\x88\xaf\xc3\x4c\x58\xc1\x62\x9c\x08\x23\xee\x04\xe4\x28\xf9\xf8\xf1\x1e\x1d\x60\xce\x18\x03\x2f\x13\xcf\x75\xfd\x73\xf7\x35\xe1\xbc\x69\x63\x18\x0d\x56\xf6\x65\x36\x56\xb0\xe1\x19\x8a\xc9\xf5\x50\x68\xb4\xc0\x20\x26\x80\xee\x45\xc8\x68\x30\x27\x91\xbb\x4f\xc5\x59\xd0\xea\xbd\x80\xfc\x98\x34\x4c\x2b\x5f\xb6\x8b\xf0\x4f\x1a\x9a\xee\x0a\x10\x50\x0a\x03\xb0\x97\x07\x92\x0b\xdf\x78\xa0\x7c\x49\x3a\xa5\xc4\x8c\x06\xe6\x05\x2c\xf9\x00\xed\xa8\xaf\x67\x05\xc6\x0c\xe6\xc9\x19\x56\x13\x93\xa6\x4b\x30\xab\x26\x1c\xb8\x5a\xef\x85\x23\xb1\x02\x8b\xda\xc9\x7b\xb8\x6b\x48\x39\x0a\xfe\x72\xd7\xe6\xa1\x4d\x7d\x86\x3b\xc4\xbc\xa0\x93\x66\xd0\xb5\x55\x66\x12\x47\x65\x9c\xc8\x69\xb9\xbb\xd5\x96\x13\x6c\xf0\x2c\x26\xc8\x36\x9d\xde\x8e\x63\x09\x49\x1e\xf4\x11\xef\x66\x0c\x5b\x45\x70\x1a\xbf\x73\x14\x4e\xbb\xe2\x8f\xe5\x88\x3d\xf1\xf5\x51\xf7\xfc\xa3\x23\x12\x6d\xd3\x20\xf8\xe5\xd9\xd6\x4a\x77\xeb\xbb\xe4\x2c\xef\x1c\x16\x88\xf5\xdd\xd2\x5a\xcc\x24\x5a\xb6\x33\x70\x41\xd4\x7d\x19\x39\xc2\x14\x0c\x40\xee\xb4\x8c\xb2\xee\x73\xe0\x44\xbc\x72\xa8\xa9\xa3\xdf\x29\xb3\x8f\xe3\x04\x75\x9e\x65\xdd\xec\x7d\xc1\xbb\xae\x8d\x1c\x37\x3d\x36\xe6\x9d\x9b\x00\xdc\xf7\xfb\x96\xf9\x59\xe0\x14\x33\xe5\x09\x4f\x80\x00\xde\x2c\xde\xa0\x94\x6c\xf6\x9b\x99\xe4\x1c\x34\xa5\x7d\x27\x4d\x04\x93\x71\xc4\x6a\x3c\xa0\x6a\xd9\xd4\xe5\xf4\x79\x4f\x28\x81\xe8\xd9\xb1\xee\xa2\x4b\x96\x88\xe6\x96\x03\x6b\x3a\x5b\x43\xc4\x53\x14\xdb\x37\x42\x98\xfe\x0d\xca\xd3\xcd\x1a\xb5\x98\x85\x16\xa0\xa0\x01\x00\x1f\x3a\x5f\x32\xa7\xa8\x02\x15\x40\xe2\x79\xe8\x15\x2e\x0f\xae\x28\x1b\xf1\x60\xe8\x44\xa0\xc4\xab\xaf\x62\xd7\xe7\xb0\x53\x56\xf4\x65\x04\xc7\x4e\x3c\xbb\x9c\x9c\x68\x91\x05\x17\x72\x2a\xb6\x8e\xe2\x44\x9b\x37\xee\xd1\x09\xca\x8d\x03\xe5\xdc\x8c\xf0\x23\x62\x2e\xdf\xf7\x87\x76\x74\xe7\xa5\x04\xc0\xb5\xb0\x14\x66\x46\xc5\xc7\xe1\x84\xc3\xd3\x11\x68\xab\x21\xf3\x2a\xd1\xef\x00\xab\x37\xce\xea\x62\x53\x9f\x69\x20\xba\xeb\xe9\x91\x37\x89\x06\x82\x05\x39\x0d\x0e\x4e\x81\xac\x2d\x37\xb9\x17\x6f\xb4\x5d\xdb\x41\x36\xa1\x03\x6b\x91\xd1\x96\x9d\x89\x6d\x25\xfe\x23\x24\x69\x8f\xeb\xc0\xc0\xb0\x94\x50\x2e\x85\x74\xc6\xf0\x07\x70\x78\x60\x06\xa6\x45\x1d\x0c\xf0\x42\xb3\xbe\x7f\xc5\xc1\x4a\x31\xae\x25\x28\x23\x94\x2d\xb0\x38\x2e\xa2\x62\x41\x48\x82\x40\x6d\x43\x15\x18\x73\x9b\x75\x61\xde\x34\x13\x02\xe7\x0c\xf2\x6f\x53\x3a\x8e\xa0\xf2\x8a\x7b\x7d\x94\x81\x1a\x1d\x6d\xb6\x81\x2e\x7c\xc4\x8d\xfd\x68\x9c\x6a\xd6\x12\x5c\xe4\x25\xf2\xc6\x5e\x26\x60\x44\xcd\x93\x22\xdb\x13\x2e\x27\xd2\xd2\x79\x4a\x32\xfd\xd1\xd7\x76\xf4\x95\x36\x37\x9c\x91\x85\x31\x68\x1d\x52\x5e\x35\x8a\xbf\x8b\xb0\x03\x55\x61\x1f\xa9\x4e\xc6\x8c\xd4\x49\x0b\x80\x21\x0b\x22\x31\x9b\xb2\x4a\x28\x8b\x89\x64\x29\xcd\x86\x67\x9c\x9e\x9d\x09\x31\xab\xc7\x30\xce\xd9\xa2\x4f\x21\x7c\x18\x82\x7d\x2d\x0c\xec\xa7\x86\x46\xa0\x7c\xbe\x83\x58\x94\xf1\x09\x99\x52\x73\x00\xd3\x65\xf5\x6a\x0f\x0d\xc6\xb1\x97\xe1\xf9\xb8\x84\x4e\x4f\xdf\xbb\x5c\xeb\x2c\xa2\xba\xd2\x7c\xe5\xa2\x78\xa8\xbc\xb7\xd9\x94\x5d\xa2\xed\x56\x5c\xb4\xde\x4d\x53\x0f\x98\x50\xbe\xaf\x7a\x90\x1f\x50\xe1\x9b\x8b\xcc\xa2\x78\x28\xb2\xd0\xb0\x3e\xc1\xf0\x99\xdf\xa0\x93\x21\x24\xe5\x1e\xf0\x5b\xad\x7b\xef\x89\xcc\x62\x5f\xbe\x6a\x3b\xb8\x8e\xc1\x2e\x60\x56\xe3\x46\x4d\x45\x3a\xff\x9d\x0b\x84\x6e\x38\x39\xdf\xce\xe4\x41\x69\x0b\x2c\xbe\xda\x3a\x5e\x37\xd5\x2b\x4d\xef\x16\x45\x7d\x6e\xfa\x07\x9f\x04\x49\x21\x7a\xec\x70\xc4\xe1\x03\x9c\x28\x18\x46\x00\x44\x54\x49\x86\xb5\xea\x29\xee\x85\x58\x00\x7f\xef\x03\xae\x74\xf8\x83\x3d\x9c\x1a\xc7\x5f\x01\x04\x27\x74\x8e\xfd\xb2\x97\x86\x89\x3d\xdc\x70\xbc\xc0\x99\xa1\x49\x74\x10\xa1\x28\xcb\xe9\x2a\x56\xa6\x2d\xfa\x5c\x70\xb6\x02\x41\x89\x0c\x34\xe8\xdd\xda\xf2\xa5\xce\xfe\x83\x96\xca\x88\x3f\x86\xd1\x32\xc0\x54\x5d\x39\x76\x89\x19\x93\x2a\xaa\x90\x35\x44\x0e\x11\x85\xa4\x78\x40\x2b\x14\xbe\xb2\x10\x35\x98\xb6\x57\x9f\x5d\x48\x3c\x5e\x04\x0e\xef\x79\xf6\x7a\xb3\x8e\x44\xce\xb9\xf5\x2e\x6f\x9d\x07\x5d\x31\xcf\xc4\x8a\x31\x2d\xa6\x39\x9e\x89\xe7\xae\xf0\xfb\x35\x97\x3c\x66\xa5\x96\x06\xf1\x7b\xff\x4a\xf3\x6d\xcb\xa6\xf0\xd8\xde\xe1\xd4\xc0\xd2\x59\xe0\xd5\x3b\x11\x73\x2a\x2e\x7c\x06\x0b\xe9\xd7\x86\x4e\x79\x7e\xfb\xaf\x6c\x08\xb2\x8b\x39\x69\x1c\xdf\xae\x42\x2e\x93\x61\x1b\xf6\xc2\x75\x8c\xfa\x29\x20\x01\x05\x0d\xfb\x7b\x63\x88\xc7\x6a\xdb\x0e\x78\xab\x2e\xd5\xf1\xc0\x83\x7e\x91\x62\x50\xbe\x38\x18\x7b\x32\x0a\x70\xb1\xa8\xd0\x93\x8c\x1c\xb4\x6e\x5a\x60\x2a\x43\x76\x1e\x9e\x6c\x37\xea\xf1\xdb\xf1\xd0\x17\x8f\x09\x78\x72\x8f\x95\x17\x4b\x73\xce\x8a\xc8\x38\x40\x0a\x29\x20\x12\x09\x4e\x29\xd1\x59\xf5\x0c\xa4\xa4\x68\x38\xe0\x05\xfe\x32\x95\xcd\x2c\x5b\xca\x82\x92\xd1\x8b\xf9\xdc\x5a\xf3\x32\x3f\x68\x76\x94\xc1\xde\xa9\xe9\xd8\xdb\xf8\x45\x49\x2a\x4b\x63\x15\xbd\x6c\x26\x20\x28\xd2\x00\x6e\x31\x61\x51\x72\x33\x51\x82\xfc\x31\x0a\xef\x58\x00\xa5\xaa\x60\xf5\x46\x21\x2f\x75\xa9\x58\x09\x7f\xcf\x93\x71\xab\xcf\x0a\x3f\xae\x72\x50\xc3\x49\x2b\x77\x63\xc1\x42\x70\xd8\xfd\x22\x25\x25\x92\x36\x87\xad\x65\x0b\x54\xd0\x8e\x59\x9b\x07\xb9\x01\x6f\x2d\x80\x28\x66\x75\x47\x9b\x03\x69\x07\x6b\x94\xc6\x90\xfc\xe8\x41\xbd\xd9\x81\x07\x5b\xd5\x5a\x28\x4a\x36\x7c\xef\x6d\x34\x6b\x37\xf0\x49\x14\x64\x56\x64\xd0\xa2\xeb\x69\xbb\x13\x18\x64\xe5\x85\x9c\xb1\x36\x68\x67\xa9\x83\x75\xb3\xa2\xb2\x52\xb3\x9d\xb3\xc9\x5e\xd1\x68\x7c\xb8\x87\xd1\x0d\x25\x81\x1d\x24\x58\x25\x68\x4a\xa1\x78\x5f\x64\x43\x64\x8b\x3a\x9d\xc6\x30\x72\x33\xa2\x1d\xbc\x15\x4d\x13\x33\xd7\x5a\xbc\x47\x6a\xd0\x0f\xfc\xf1\xb6\xbc\x13\xab\x25\x64\x0d\x80\xd9\x7b\xbb\xb8\x9e\x27\xfc\x0e\xae\xd4\xa0\xdb\x2a\xae\x22\x99\x2c\xb9\xc5\x09\x71\x36\x4b\x6c\x88\xa1\x5b\xd8\xf9\x68\x84\x3b\x3f\x80\x4e\x23\xeb\x68\xf6\xa0\x52\xe2\xe1\xf2\x7a\xdd\x62\x92\x1d\xd9\x16\x3c\x74\x73\x35\x59\x35\xbd\xe3\xfa\x4e\x52\xd4\xa3\x26\x9d\xc2\xce\xcc\xe4\x1d\x95\x37\x6f\xa1\xf6\x76\xb5\x3b\x0d\x7c\xad\x34\xee\x29\x51\x6f\x8c\xab\xec\x14\xb3\x2e\xc2\xdc\xb8\x58\x18\x7d\x5c\x55\xd5\x49\x63\xc0\xd7\x4b\xac\x1e\xc3\x88\x6a\x0e\xa9\xe1\xf5\x95\x99\x7c\x4e\x1d\x33\xf7\xa2\x8b\x57\xe7\x6f\x8c\x82\xf4\x99\xea\xdf\x05\x77\x94\x47\x78\x3f\xca\x1c\x8f\x88\x14\xbd\x36\x38\xc4\x18\x5b\xaf\x5d\x43\x0c\x88\x06\xcf\x66\x0d\x0f\x30\x58\xd9\x93\x17\x3b\xb3\xd9\x35\x61\x52\xa4\x62\x59\x5e\x47\x15\xb2\x7f\x06\x19\x4a\x04\x19\x56\x9f\x74\xb9\xa9\x7e\x7f\x90\x59\xcf\x3f\x16\xca\xf4\xe9\xdf\xa7\x29\xb6\x7e\x4b\x0d\x78\x3d\xbc\x52\xb5\x56\x0f\x9a\x52\xd7\x3b\x1d\x97\x35\x1c\x0e\x14\x1f\x08\xab\x18\x15\x8d\xb7\x37\xf2\x26\x6e\xd0\x7e\x94\x3c\x71\xcc\x69\x28\x3b\x85\x32\x6d\x6d\x39\xc7\x56\x54\x3c\x69\x79\xb4\xc1\x02\x37\xc7\xa0\x9e\xc2\x2e\xcf\xdb\x0c\x7d\xb3\x72\xaa\x0a\xed\x9d\xef\xbb\xbf\xeb\x7a\x9e\x27\x1a\x12\x39\x6c\x3f\x10\x39\xec\xae\x48\x6a\x8f\x0f\xca\xd7\xb2\x47\x4e\x81\x1b\xf0\x8e\xdd\x71\xc7\xcb\x17\xf1\x76\x9e\xf5\xd3\xa6\xd5\x97\x80\x3f\xce\x80\x38\xa4\x43\x17\x42\x35\xd6\x6a\x33\x4a\x15\x72\x67\x01\xa8\xb0\x07\xc9\xae\x6c\xfd\x7c\x11\xcd\x43\x6b\xdd\x14\x50\xec\x07\x68\xeb\xa2\x3e\x6a\x80\x75\x5f\x46\x83\x80\x27\xad\x9e\x94\x15\x12\x21\x4c\x0f\xe4\x89\x32\x5a\x9d\x09\x36\x6e\xc5\x2c\xe8\x5b\xe3\x7d\x44\x2f\xcd\xa3\x88\x5a\x7c\xb3\xca\xd0\x1a\xc5\x8b\x34\x41\xb6\x70\xe4\xfe\xa9\x8b\xad\xe8\x8d\x8d\xb3\x22\x89\xfe\x3e\x1b\x5b\x73\x9e\xd0\x3a\x2f\xaf\x91\x40\xcd\x8a\xf4\xc7\x29\xba\xd7\x69\xd8\x5e\x13\x66\xc9\x86\x24\x75\xa1\x35\xf1\xc7\x32\xa4\xdc\x22\x4a\xcd\xb3\x49\x2e\x25\xd8\x71\x31\x8b\xf2\x44\x39\x11\xc1\x79\x37\x1c\x87\xd4\x9c\xcd\x9e\x6a\x08\x52\x04\x33\xe7\x0c\x22\x38\xec\xb6\x04\xa5\xb7\x20\xbc\xce\x4a\x05\x7a\xb4\x17\xb0\x52\x81\x29\x6a\x19\x53\x8e\xec\xd1\x5a\x30\x72\x26\x57\x54\xa7\xc6\x0c\x3b\x87\x66\x43\x6a\x2b\x69\x2c\x65\x6e\xfc\x5b\xf0\x46\x82\x34\x4c\xd7\x67\x72\xa3\xe2\x5c\xc0\x41\x79\xca\xaa\x0c\x74\xc4\xfa\x82\x62\x23\xf4\x86\xf3\x4a\x2c\x69\xac\xc0\x44\x95\xa1\x0e\x2d\x1d\x04\xbd\x09\x7a\x41\x77\xaf\xf2\x0d\xae\x1c\xce\x22\x86\x35\xce\x04\x42\xb3\x9a\xcc\x2a\x79\x3e\x3d\x2e\x82\x9a\x1e\x0c\x2d\xe1\xb3\x47\x0d\x86\x41\xb9\xb1\x6e\x42\x1a\xc6\x23\x5a\xbb\x28\xa4\x25\xa9\x2b\x1d\xe6\xc6\xd4\x81\x6f\x1d\x15\x5d\xaf\x8f\xba\x94\x6c\x9c\x33\xbe\x36\x31\x58\x19\xfc\xf0\xb2\x22\x06\x03\xf2\x26\x5d\xb5\x69\x44\xec\x7d\xe8\x2a\x71\xb2\x87\xd0\x0e\x17\xc3\x93\x5d\x83\x93\xb2\x45\xcc\xa4\x05\x72\xb2\x96\x6e\x45\x1c\x64\xa4\xa0\x6f\xb8\xa6\xb3\xea\x43\x0d\xf0\x09\x2e\x45\x79\xb2\x39\x43\xe8\x68\xd8\x4f\xb4\x77\x02\xe4\x67\x9a\xab\xcc\xdc\x00\xd9\x01\x64\xe9\x7d\x95\xfb\x6e\x77\x14\x99\xa6\x43\xe2\x9a\x93\x00\x73\x73\x54\x46\x1b\x8a\x4d\x63\xc8\x94\x03\xfe\xd0\x7b\xbb\xf0\xf3\xbc\x02\x8a\x58\x08\x3a\x85\xdd\x75\x4b\x34\xa8\x11\x95\x1c\x0c\x5a\x82\xfb\x09\xf3\x18\x48\xdc\x32\xe5\xef\x83\xa6\xa6\x41\x0f\xdd\x45\x87\xfb\x05\xa4\xba\xaa\x02\x20\xec\x06\x6f\x7a\x71\x96\x0d\x54\xf8\xdd\xbb\x7d\xed\x40\x05\x8d\x89\x6f\xeb\xaf\x55\x4e\x6d\x36\x89\x3d\x25\x9c\x18\xc3\x3f\x36\xa0\xc5\xc6\xfc\x88\xd9\xde\xe2\x17\x9b\xe0\x3c\x92\x44\xba\x54\xd8\x21\x80\x08\x24\xe4\x77\x7e\xc8\x70\xfc\xc1\xf6\x36\x03\xf7\x15\x68\xac\x3a\x0b\xb1\x8e\x9e\x6b\x05\x08\x62\x25\x83\xcc\x46\xf9\xf2\x8a\x98\xb6\x8e\x46\x2e\x62\x0e\x1a\x8e\xad\x8e\xe8\xca\x58\xfc\x73\xf4\x1f\x0c\xa6\x76\xf1\xea\xb3\x8b\x40\x2b\x9d\x48\xc6\x2c\xf6\x56\x86\x57\xd0\xf2\xe2\x69\xb2\xe2\x52\x8a\x93\xdb\x3e\x3a\x03\xab\x5f\xc0\xcd\xb9\x74\x8c\x38\xeb\x16\x6e\x11\x4e\xa0\x28\x8e\xcf\x2d\xcc\xd1\x2c\x8b\x52\x2d\x4e\xec\x7a\x8a\x2a\x42\x50\x69\x3a\x9e\x08\x4f\xd2\xf1\xaa\x17\x7a\xad\xdd\xde\x46\xcb\x33\x96\x08\x16\x9d\x2f\xaa\x5f\x05\x98\x1a\x37\x1d\xf0\x89\x0a\x1f\xf6\xa6\xdd\xb6\x8a\x7d\xbd\x09\x8b\xc9\xc6\x48\x19\xe9\xc4\xa4\xe9\x29\x02\x5c\x86\x8e\xd4\x4d\xac\x2d\x4f\x87\x50\x67\x6c\xb1\xfe\x61\x30\x03\x7d\x63\x41\x89\xcb\xf2\x5d\xc2\x8b\x08\x29\x9b\x53\x75\xfa\x6a\x9a\x57\x34\x0d\x69\x0d\xaa\x4c\x3b\x04\x95\x68\x5b\x76\xf5\xe8\x04\x88\xf0\x36\x90\x74\x72\x82\x5e\x42\x5d\x1a\x3c\x34\xb9\xa5\x16\x79\x29\x1d\x9d\xa0\x8d\x28\x0f\x28\xd9\x62\x38\x45\x14\x0e\x1f\x9c\xf3\xd6\x3f\xd0\x77\xaf\xb6\x5c\xf8\xe0\xe5\xca\x20\x99\x1a\x8a\x70\x72\xda\x96\x4c\x11\xf7\x5a\xdd\x51\x59\x8d\x2c\x6a\x43\x16\xcf\xad\xe6\x07\x5c\xbd\x5c\xd1\x95\x03\x2b\xbe\x40\xc7\x4e\x39\xe7\x15\xf6\xdb\x8b\x0c\x28\xc1\x28\x5c\x4d\x62\xdf\xe8\xa6\xf9\x15\xe2\x2c\x69\x74\x1c\x0e\xc8\x59\x39\x66\x47\xd6\x70\x1d\x18\x63\xee\x5b\xa3\x37\x05\xef\x8d\x8c\x7c\x21\xdc\x2b\x82\x6b\xb1\xa3\xe7\x89\x63\xb8\x1e\x9b\x4b\x59\x37\x11\x97\xef\xcb\x5d\xb3\xc9\x00\xf6\x94\xa4\xae\xf2\xc4\x20\x97\xc9\xcc\x4b\x27\x01\xf8\xe9\xa9\xca\xef\x98\x2a\x89\x5e\x24\x55\xa6\x66\xc7\x71\x48\xce\x85\x10\x68\xb5\x59\x73\xde\xa6\x0f\x1d\x18\x34\xaa\x71\xe4\x77\x03\x4c\x1c\x3c\x32\x01\x8d\xc9\x6b\xf3\x32\x73\xef\xbe\xa2\x68\x90\xe7\x29\x65\x22\x8a\x39\xae\xe8\xe5\x3d\x3b\x10\xa0\x75\xda\x84\x1b\xee\xc2\xe9\xa4\xef\x3c\xc3\x74\xa4\x29\x31\x25\xce\x91\x57\xbb\xd7\xe9\xcc\xc4\x9f\xca\x31\x64\x01\x47\x40\x74\x70\xb9\x3d\xcd\x85\x23\x6d\xcf\xe6\x4a\xef\xe8\x3a\x40\xd6\xfa\xb2\xb4\x59\x3e\x2b\x7d\x62\x59\x12\xc9\x9b\xc0\x7e\x74\x22\x38\xa7\x43\xe6\x54\xc2\xd3\x0f\xdd\xcd\xd0\xc7\x45\x94\xa7\x03\x32\xba\xbc\xca\xed\xa5\xd7\x48\xaa\xf2\x2e\xab\x15\x88\xcd\x01\x85\x12\x52\xa7\x7a\x09\x5d\x54\x59\x47\xdd\x1a\xf8\xec\x4d\xcc\x72\x5f\x52\x3e\x9e\x95\x83\x66\x29\xa2\xa8\xe7\x3d\xaf\xbd\x7d\x5e\x55\xbd\x37\x7e\x3a\xb9\xdb\xa6\x01\x13\xd7\x2a\xdc\xcd\x25\x2a\xd0\x4c\x61\x3d\x71\xa6\x14\x0a\xc6\x48\x44\xe7\xe1\xc7\xd4\xd9\x33\x76\xff\x3c\x9f\xce\x66\x24\x12\x51\xed\x78\x8b\x1a\x68\xf6\xbc\x15\x7e\xae\x08\x88\x65\x24\xae\x1f\xc8\x42\x58\x93\x7c\xc6\x8e\x38\x76\x7d\x67\x9a\x9e\x04\xfc\x00\x6f\x02\xef\x61\x47\x5a\x9f\x8f\x14\x7d\xf6\x78\x24\x1c\x2c\x4f\x92\x82\x2f\x0d\xe4\x16\xbe\xdb\xfb\x77\x3d\x76\x4f\xcf\x3f\xda\x9b\xc0\x5f\x7f\x0f\x60\xfd\x9c\x75\x04\x7a\xfe\x56\xbb\x35\x1d\x04\xa8\x61\xde\x9d\x14\x47\x2e\x97\x44\x94\xcb\x8d\xe4\x62\xb2\xc6\xc8\x1d\x01\x18\x6f\xb0\x50\x1b\xbd\x5d\x3f\x3b\x37\x7d\x90\xef\x64\xa3\xe1\xc9\xa8\xce\x6e\xbe\x30\x16\x6c\x3c\xce\x15\x8d\x47\x2c\x5f\xd0\x1a\x73\x52\x07\x67\xdd\xe5\xdb\x5b\xcd\x27\xd1\x03\x61\x9a\x63\xc9\xd2\x5c\xe9\x7b\x58\xd7\x52\x1c\xdf\x2c\x0c\x9f\x8f\xe7\x4e\xe3\x44\xd6\xe0\x79\xc8\xde\xe3\x06\x93\x81\x33\x59\xc4\x2a\x1b\x7c\xa8\x2b\x63\x04\xbb\xbe\x0e\x6e\x1c\xdd\x49\xc0\x6b\x25\x34\x85\x86\x27\x60\x93\xe2\x64\x41\xe3\x46\xbc\xe2\x3d\x15\x06\x75\xb1\x62\x45\x66\xdf\x66\xb7\x3b\x90\x97\xbc\x7b\xbb\x36\x39\x06\x57\x95\xa7\xc7\x5b\xba\x24\x88\xd8\x42\x22\xb2\xe9\xa9\xa4\xe7\x32\xfa\xa9\x04\xd9\x09\x57\x74\x97\x8f\x9b\x58\x3e\x8d\x85\xb3\x2e\xf5\x34\x34\x84\xdf\x7d\x41\x38\x34\x09\xf3\x3d\xeb\x12\x93\xe6\xb5\x63\x82\xb1\xf4\x35\x79\x72\x09\xbe\xdb\x35\xe4\x1e\x54\x81\x44\x3c\xfe\x72\x53\x4a\x30\x38\xba\x79\xa4\xb1\x9b\x9c\x6a\x7a\x64\x3b\x51\xd8\x16\x4b\x23\x28\xba\x88\x94\xb6\x41\xb2\xb2\x0c\x12\x77\x4f\xd1\xa2\x13\x7b\x4d\x67\x0c\xd5\x06\xd3\xdd\x23\xae\xef\x1f\xd1\xcc\xcb\xe1\x1b\xa7\xe7\x14\x35\x72\x85\xb1\x01\x5c\x1e\x29\xf5\x85\x24\x44\xce\x39\x5c\xcd\x8d\xd0\x91\x36\xd8\xd2\xe5\xad\xb9\xc8\xf2\xa4\x46\x38\x5b\xe4\x92\x04\x93\x09\xa4\xc9\x6d\xb5\x42\x23\xdb\x51\xb6\x91\xf7\x45\x3a\xf6\xdb\x38\x38\x38\xe5\xac\x26\x5f\x55\x76\x86\xe7\x7e\x65\x4e\x9d\xfc\x90\x37\xa6\xc7\xec\x71\x0f\x86\xa2\xa3\x4c\x29\x99\xb5\x43\x94\x14\xd1\x3b\x3b\xf5\x91\x6a\xcb\xa5\xc8\xf3\x65\x90\x91\x34\xd6\xd2\x13\x20\xcf\x99\xd7\x60\x6b\x4a\xc3\x15\x6f\xe4\x50\x9a\x6f\xc9\xa3\x0a\x74\xac\x04\xf6\xbd\x05\xaf\xdd\xc5\x32\xd0\xd1\xae\xec\x69\x5f\xf9\xba\xd3\x68\xfb\x28\x42\xea\x65\x09\x92\x7d\x8c\xd6\x89\x4c\x88\x94\xd9\x8e\x1c\x9d\xa5\x3f\x98\x28\x5e\xe2\x66\xff\x80\x2b\x6e\x68\x25\xf8\xdc\xf5\x32\x8a\x31\xa1\x90\x78\x60\x94\xf0\x7a\x79\xeb\xc8\xe2\xf8\x8f\x3a\xac\xe8\x82\x5d\xbc\x14\x60\x6a\x01\x15\x67\x2b\x18\x29\x87\x9c\xc1\x4b\x18\x6f\x6b\xf0\x65\x4d\x87\xd0\x08\xd3\xa8\xb2\x4f\x4b\xf0\x4e\xfc\xe7\x24\x06\x2a\x64\x8a\xf1\x86\x55\xa0\x5c\x09\x0c\x4a\x01\xbc\xad\x0a\x3c\x08\x37\x36\x3f\xb2\x0a\x2e\xbc\xc0\x43\xe0\x34\xef\x28\x27\x26\x7c\x58\x63\x43\x69\x2b\xcd\x04\x12\x53\x86\x2c\x52\x98\x89\xfc\x8e\x83\xab\x27\xa7\x98\x56\x63\x7f\x3c\x46\x57\xe7\x62\xb6\x2f\xc0\x48\x96\xf8\x38\xb8\xe5\xe7\x88\x1c\x62\x56\x28\x6d\xc2\xea\x5d\xba\x3e\x98\xda\x8f\xef\x64\x39\xb9\x96\xbe\x7a\xf3\x38\x5c\xf2\xf0\xb0\xb2\x9e\xb2\x02\x0c\x57\x14\x7a\x5a\x01\xed\xd1\xd2\x1e\x67\xa0\xd3\x43\x84\xc3\x9c\xb8\x50\xcc\x0b\x2c\xb2\xd5\x2a\xf8\xcd\x01\xd7\xda\x0e\xe5\x2d\x01\x31\x2f\x8a\x2a\x48\x29\xbb\x26\xaa\x24\x40\xf6\xfd\x7b\x3f\x71\xcd\xc6\x3f\xd8\xb9\x67\xd7\xfe\xfa\xa2\xdf\xcf\x5f\x2e\xca\x55\x8e\x66\x5d\x72\x4e\x07\x6b\x62\x49\x50\x76\x21\x04\x73\xa4\xd4\x91\x54\x48\x19\x20\x49\x06\x08\xae\xf6\x37\x78\x5b\xa5\xc9\x7e\xdf\x08\x43\x1c\xc3\x3c\x2f\x06\x7b\xc6\xdc\x48\x72\x36\x68\x07\x23\x48\x87\xaf\x51\x24\xab\x4b\xcd\xd5\x9d\xea\xf7\x0e\xe2\x86\x88\xd8\x7c\x58\x39\xf0\x84\x78\x11\x38\x71\xe2\x78\xf9\x56\xc1\xc3\xcc\xf1\x2d\xd7\x97\x09\x0f\x21\xcb\x08\x0e\xc8\x90\xc8\x86\x39\x8d\xa8\x75\xc2\x08\xf6\xc4\x57\x79\xc1\x45\x17\xce\x4f\x34\xde\x1e\xf7\xab\x11\x15\xaa\xa1\x33\x93\x96\x2a\x2c\xde\x72\x59\xad\x2b\xf0\x5d\x1e\x15\x6d\x98\x58\x55\xad\x69\xb4\xda\xbb\x81\x2a\x97\xa6\x28\x6c\xe5\x25\xc1\xd6\x74\x70\x87\x84\x65\x17\x4f\x4f\xca\x7f\xc2\xdc\x35\x9c\x9b\x80\x9f\x64\x1b\xef\xe3\x24\x9b\xf2\x33\xb7\x41\xdd\x8b\xcd\x83\xed\x18\xf6\xaa\xae\xa7\xe1\x16\x80\xfb\xe4\x35\x10\x5a\xb5\xe7\x2a\x2b\x6c\x00\xe9\xe2\x05\xcb\x2c\xd9\x76\x92\xc9\x28\x7e\x0c\xda\x59\xa8\x3c\x7a\xa2\x40\x54\xa1\x55\x24\x54\x10\xa9\x2d\xe8\xad\xdb\x9f\x1e\x4c\x9b\x2c\x86\xd2\x00\x0c\x21\x0c\xe5\xd3\x9b\x45\xa7\x6e\xf5\x64\x5c\x02\xde\xb8\x2d\x58\xf1\x86\x88\x2a\x77\x39\xf3\x3d\xd5\xa0\x19\xf2\xc9\x10\xe3\xfa\xd2\x23\x9f\x35\x9d\xfa\xd0\x6a\x36\x34\xb8\x32\x34\x46\x42\x81\x2e\xd6\xac\xa6\xc0\xa4\x1b\x7d\x05\x6e\xf4\x35\x14\x36\x3f\x09\x86\xc2\x3e\x29\xa5\x70\x3a\x1a\xf3\x79\x06\x25\xdb\x6a\xa4\x44\x4e\x6e\xe2\x32\xea\x65\x81\x0f\x14\x8a\x99\x0c\x24\x64\x19\x50\x23\xe3\x5c\x69\x87\x97\x26\x9e\x07\xbf\x97\x6e\x71\xd9\x42\x4b\xc2\x67\x33\x74\xb5\x00\x14\x59\x41\x15\x8c\x63\xaa\x3b\x96\x47\x4c\x4c\x85\xe3\xfb\x01\xac\x42\xe3\x90\x63\x93\xda\x24\xa0\x1f\x21\xa9\x9f\xfd\x7a\xa4\xce\x55\x07\x24\xf0\x08\xd5\x49\x12\x6a\xa5\x50\x89\x6a\x07\xb0\xdb\x5c\x21\xbe\x50\x23\x91\x85\x9e\x91\x2b\xd6\xbd\xd5\x81\x0c\xaf\xe7\x5d\x79\x5f\x69\x06\x3a\x24\x0b\x31\xf5\x63\xc4\xb7\x59\xa6\xf5\xbd\x09\x9b\x8d\xc8\x24\x51\xd1\x2c\xd5\xe9\x9b\xdd\x2d\xc5\x01\xe7\x03\x91\x82\x4f\x4b\x0e\xd2\x72\x20\x9f\xd9\xec\xf3\xae\xec\x8f\x3b\x77\x86\x47\x4a\x0d\x7d\xcf\x60\x2f\xdd\xc0\x03\xf6\x50\x11\x0d\x39\x0f\x55\x3f\x93\x97\x19\xb0\x2f\xbc\x40\x38\x31\xb9\x1f\xcd\x9e\x77\x3d\x09\x06\xb7\x28\x89\x17\x8e\x03\x1d\xa8\xd1\xd3\x62\x37\x0d\x6d\x5f\x8b\xac\xd7\x12\x0f\xef\x95\x92\x55\x18\xcc\x77\x70\x43\x6b\x98\xe3\x4d\x89\x9a\xd5\xf5\x99\x25\xaa\xde\x9d\xcb\xc0\xc9\x6b\x30\x8c\x98\xf3\xae\xe6\x40\x21\xbc\x35\x41\x35\x61\xba\xef\x5e\xf4\x85\xe9\xd9\x47\xb8\x96\xab\x92\xa9\x25\xf2\x2b\xc2\x34\x5c\xad\x3d\xbc\xcf\xef\x30\x9d\x53\xbc\xbe\x6d\x84\xa4\x48\xba\x84\xdf\xfc\x52\xc2\x7c\x92\xfe\xae\x59\x47\x76\xfe\xc1\x7e\xd2\x60\xf8\xe5\xc5\x08\xb0\x79\xad\x5f\xce\x46\xcf\xf9\x11\xde\xbb\x29\x69\x18\xd4\x3a\xa4\x11\xc9\xa2\x01\x72\xae\xc4\xd5\x14\x95\x0e\x62\x33\x33\x8c\xb0\xf9\x52\x85\xbc\x7b\x61\xf5\x1f\x02\x5d\x7b\x08\xf8\x32\x00\xa3\x13\x6c\x33\xa2\x4d\x73\x28\x45\xa9\xca\x8b\xaa\xa2\x44\xda\x36\x36\x88\xe8\x84\xbc\x4f\x70\x55\x48\x1e\x6a\xcb\xd2\x72\x7a\x86\x37\x4a\xa0\x77\xfe\x48\x70\x18\xef\x19\x2c\x1e\xb4\xe0\x3e\x25\x85\xc6\xde\xe5\x91\xd5\x78\x06\x40\x88\xd0\x68\x38\x4e\x2c\x38\x8f\x75\x6a\x9d\xb0\x47\x2e\x87\xd0\xf3\x01\xa4\x8f\xac\x7b\x98\x71\x54\x44\x5c\xb6\x43\xaf\x89\x1d\xc3\xe3\x96\x0b\x38\x4c\x9a\x89\xd6\x85\x67\x9f\x5b\xaf\xd2\x4a\xc4\xf4\x2a\xa9\x0c\x93\x26\x9b\x87\xf5\xfc\xb2\xed\x4c\x99\x0f\xae\xdc\x63\x39\xbd\x08\xe0\xac\x50\xa3\x68\x7d\x05\xbc\x78\x69\x91\x99\x24\x09\x03\x5c\x61\x44\xf2\xf0\x84\xd1\xca\xb3\xd9\xa3\xca\x87\xf9\x7e\xf5\x15\xe2\x5c\xad\xcb\x9a\x2f\x35\xc0\x74\xa1\x06\x37\x6b\x74\x64\xb0\x3c\xef\xdc\xee\xbc\xc5\x59\xfb\x81\x3d\x34\x78\xce\x66\x0c\xa9\xd9\xeb\xac\x3a\x0c\x10\x2e\x0c\x67\xfc\x48\x60\xcf\x5d\xf2\xe1\xfa\xc0\x69\xff\xe5\xd7\xb9\x66\x3a\x29\xd3\x6a\x43\x59\x3a\x48\x4e\xba\xb5\xa8\xd0\x7a\xdc\x11\xee\xf3\x12\x27\x19\xe2\x8a\x60\x7d\x84\xdd\x12\x26\x3b\xd2\x0a\xaf\x77\x8c\x6e\xa3\xcf\xe0\x8f\xd2\x55\x6b\xd1\x34\xa2\xd7\x94\x31\xc5\xcb\xb1\x03\xdd\x41\x13\x3b\x39\xad\x06\xe9\x2d\x1c\x24\x7c\x9b\x41\xe1\xb0\x1c\x99\x87\x18\xa8\xa4\x5e\x3f\x6c\xea\x26\xe0\x3c\xac\x6e\x74\x10\x5c\x84\xd4\x9f\x39\x9f\xb6\x97\x10\x8a\x8d\x18\x36\xb3\x88\xf3\x57\xd9\xcb\x04\x1d\xfa\xd7\x83\xac\x0a\x6c\x7c\x3e\x04\x83\x0c\x40\x10\x26\x13\xee\x45\xba\x2b\xcf\xe7\x8a\xc7\x13\xbe\xad\x21\xaa\x12\xa2\x89\x02\x7a\x64\x75\x0e\x36\x72\xbb\x9d\x2e\x90\x8c\x55\xa9\x03\x5c\xde\x02\x09\x9c\x45\xc6\x78\x5c\x1d\xbf\x8b\x97\x00\x93\x78\x23\xf7\x3e\xd8\x0c\x6c\xa2\xa7\xf6\x06\x5c\x6d\x61\xf2\x61\xa1\xd5\xef\x1d\x7e\xdd\x83\xe5\xd3\x2f\x2a\x94\x18\x53\xd6\xda\x83\x67\x5d\xd0\x95\x5c\x5e\x05\x2f\xa4\x1e\x48\x5d\x7b\x2e\xa3\x1f\x9f\xd8\xf2\x16\x32\xe6\xb9\x99\x62\xc0\x3b\xf4\xe9\x5a\x66\xcb\xac\xcf\x9c\x7e\xcd\xf9\x9e\x30\xfd\xd2\x49\x8f\x54\x8b\x94\x62\x20\x17\x8c\x74\x95\x50\x97\x24\xdc\x4b\x4b\xb6\x71\x2e\xfb\xc5\x4b\x23\x95\xb7\x16\x95\xb8\x32\x63\xef\x23\x43\x1d\x10\x7f\x1b\x93\x61\x3f\xb5\x22\x0a\x27\x47\x2b\x57\xce\x70\x6c\x47\xee\x5d\xdb\xf5\xde\x63\x71\xa1\xcf\x40\x71\xe5\xb1\xc4\x97\x49\x0e\x1a\x12\x21\x9f\x56\xc2\xe6\x36\x86\xed\x1d\xda\xd0\xf0\x63\xc8\x4b\xcc\xbf\x51\x82\x33\xd0\x78\x6c\x76\x16\x31\x3c\x58\x45\xc9\x71\xb8\x86\xb9\x6c\x09\x92\x12\xe5\x9e\x2b\xde\xa9\xad\x95\xd0\xbb\x91\x78\xcc\xb3\x72\x22\x33\x29\x69\xed\xb8\x43\x61\xa4\x6e\xae\x9c\x3b\x8b\xb4\x26\xd8\xf7\xc4\xff\xbc\x8d\x11\xdd\xb7\x80\x25\x9f\x83\x42\xf3\xbb\x02\x4a\xde\xee\x7f\x2c\x40\xe9\xd6\x5f\xb7\x31\xed\x97\x9f\x40\x70\xf4\x78\x59\x94\xc0\xa1\xfd\x74\x8c\x68\xa2\xf0\x06\xcb\x2e\xc8\x8b\xab\x8a\xca\xe4\x83\x87\x5c\xef\xdb\x66\xcf\x00\x42\x22\x88\xaa\x03\xc5\x09\x14\x6a\x90\x1f\xe2\x12\xf5\xa0\x59\x8b\x35\x5f\x49\x62\x58\x58\x22\xcf\x89\x83\x6f\x31\xe0\x0a\x87\x70\xda\xa7\x38\x78\x8f\xa2\x1d\xdd\x5b\xd8\x49\xb7\xfe\xe5\x8c\xb7\x8b\x54\xd6\x30\xe8\x13\xae\x4f\x8c\xb0\x5c\x38\x82\x65\x4f\x3d\xb3\x75\xb4\x0a\xf9\xd4\xe1\x0e\x42\x20\x66\x40\x60\xcb\xb8\xa0\x06\x08\xcc\x2b\xdd\xd3\x05\xc3\xfb\x57\x84\xc1\xcd\x83\x33\xad\x1e\x6f\x81\x38\x2d\xd0\x35\x5d\xc8\x4d\x85\xcb\x0c\x40\x8f\x8c\xa1\x5f\xbb\x92\x4e\xba\x52\x88\xe2\x18\x47\x50\x5f\x6d\x27\x0a\x75\x05\x00\x30\x53\xbb\x04\x56\x01\x57\xf7\xaa\xe1\x5d\x72\xbf\x61\x46\x82\x1f\xd4\x45\x2b\x05\x4d\x09\x48\xa9\x71\x2c\x87\x27\xcc\x78\xeb\xb4\x79\x69\x63\x94\x29\xbc\x6f\x25\x90\xae\xc0\x42\xdc\x7b\xb0\x1f\x99\x06\xad\xb3\x85\x27\x42\xea\x62\xba\xa4\x3b\xcd\x47\xec\x13\xb1\x70\xc6\xa5\x26\x8f\x95\x04\xc4\xf7\xc8\x68\x33\xd4\x60\x2f\x17\xa2\x56\xf3\x7d\xab\xeb\xc4\xb0\x93\x9e\xd5\x01\x80\xdc\x16\x5f\xc7\x28\x42\xa9\x60\x67\xbc\x1a\xe4\x5c\x98\x41\x54\xa3\xcd\x3f\xfb\x29\xd0\x18\x5c\xef\x0e\x2b\xd1\xe1\x67\x0a\x5a\x16\x90\x91\x5b\xf9\x6c\xe7\xa1\xe5\x46\x91\x32\xde\xc6\x01\x8d\x93\x94\x4e\x0b\xd9\x8a\x49\x46\x3d\x49\x89\x16\x9b\x86\x05\xb8\x70\x69\x7c\xc6\x70\x4d\xff\xc0\xc4\x40\xa8\x58\xb0\xa7\xd8\x24\xd2\x7d\xcb\xda\xa5\x9e\x3f\xbc\xc6\xf0\x49\x16\x89\x12\xb2\x8c\x4f\x5d\x95\x46\x2d\x15\x8e\x6c\x50\xcb\x84\x88\x21\xee\x75\x1f\x72\x75\xc7\x69\x7b\xe9\x8a\x2b\xe0\x86\x52\x3c\x24\x99\x0a\xee\x61\x98\xcf\xbb\xbe\xe1\xc1\xbc\x9d\xc1\x1e\x22\xf6\x20\xe4\x4b\x7b\xf9\x86\x87\x92\x2c\x5a\xcf\x9c\x8d\x91\x31\x19\xb8\xee\xfb\xa4\x43\x50\x8e\x60\x6b\x78\x30\x96\x4d\x0e\x4c\x95\xd5\xe8\x75\xd8\x97\x15\xb7\xcb\x53\x63\x99\x21\x2e\xb9\x56\x4d\xfc\x73\x16\x8e\x07\x19\x8b\x6f\xb6\x7e\xfb\x45\x8c\x5f\x18\xd5\xa7\x4a\xd9\xbc\x12\xb3\x11\x84\x98\xc1\x0b\xa4\x60\xcb\x4a\xe2\xce\x25\x2d\x67\x66\x8a\xa2\x8e\x8a\x18\x59\xce\x66\x9e\xb7\xe4\x43\x17\x89\xc6\xfc\x7f\xd9\x79\xaf\x5d\xd9\x6d\xa5\x5d\xf4\x81\x74\xa1\x9c\x2e\x95\x73\xce\xba\x53\xce\xa9\x5b\xf9\xe9\x0f\xa6\xa7\x3d\xed\xb5\xb0\xfe\x00\x6c\x6f\xc0\x07\xd8\x03\x20\x30\xba\x9b\x2a\x15\x8b\x15\xbe\x8f\xa2\x48\x0b\x29\x97\x99\x0c\x7e\xe4\x02\xc9\xe0\x5f\x4a\x11\xdb\xef\xe7\x76\x86\x46\x6d\xd3\x25\x03\x21\xe2\xe6\xf0\xdb\x7d\x91\x13\x40\x59\xab\x17\xc7\x7c\x2b\xa4\x71\x3b\xee\xef\x32\x97\x3e\x7d\x26\x00\xb2\x32\x6a\x59\xa5\x2e\x51\x2b\x28\x8e\x73\x8d\xc3\x99\x08\x83\x59\xf0\x45\x36\x83\x43\x16\xa5\x1e\x58\x8c\x56\xb6\x21\x71\x88\xde\x89\x0e\x25\x38\x53\x93\x4f\x50\x15\x47\x95\x5a\xa4\xcf\x09\x26\x7e\xeb\x2a\x75\x5a\x72\x0e\xc3\x1d\x02\x19\x27\x61\xbe\x35\xde\x00\xde\x59\xad\x95\xf3\xf7\x2e\x96\x36\xdd\x3f\x6c\xad\x63\x0a\xff\x42\x4b\x7e\xa2\x0e\x70\xff\xac\x23\xb3\x8d\x3a\x34\x66\xdd\x85\x41\x37\xe3\xb1\x8f\xa0\x2a\xa9\x28\x85\xb3\x77\xf6\x70\x0f\x34\xd1\x6d\xc6\xea\x46\x86\x9f\xfc\x73\x89\x64\x0b\x43\x85\x67\xb6\x86\x2b\x2f\xbd\x70\x30\x5c\xc8\x6a\x93\x4c\x78\xaa\xf3\xa8\x55\xec\xde\xef\x7b\xd2\xe5\x93\xda\x1d\xb7\x9b\xf8\x68\x54\x14\x85\xa3\xef\x5c\xd3\x38\x7a\x17\x05\xd6\xbe\x3b\xff\xa6\x30\xc0\x11\xb5\x63\xc8\x4c\x5d\x62\xa0\xc1\x8a\x12\xb0\x12\x2d\x38\x63\x16\x53\x31\x8b\x64\xfa\x4b\x07\x56\xd6\x04\x30\x38\xa4\x6b\x6e\xa6\xb7\x44\x36\x2d\xfb\x83\x9c\xe1\x9a\x96\xcb\x6e\xc6\x45\x61\x08\x1a\xaa\x5f\xe9\x9d\x21\xf9\x97\xf7\xca\x0f\xb3\x55\xf6\x09\x4e\xba\x81\xef\x5e\x69\x5c\x09\x9b\x6c\xcf\x79\xd1\x6f\xd9\x06\x33\xa8\xe3\xb4\x8d\x59\xd2\x2e\x51\xdb\x98\x72\x8b\x8c\xe0\x18\xc8\x97\x5c\xe9\xb0\xdc\xbd\xa5\x07\x70\x34\xdb\x1c\x2d\x11\xfd\xbd\x4c\xbc\x6a\x57\xc4\x5c\xf6\x46\x59\x88\x5c\x72\x22\x69\xcf\x3c\x0a\x38\x1d\x3c\xa4\x33\xe8\xc0\x3d\x00\x6e\x6a\x86\x15\xba\x91\xd9\xca\xa0\x99\x68\x4a\xe6\xaf\xc0\x19\x78\x9f\x52\xe3\xc5\xb6\x37\x80\x5d\x0c\x7c\xe0\x92\x49\xf4\xe9\xfe\xf3\xcc\x30\xd0\x0e\xcc\x4e\xb6\x15\x7b\x53\x65\x9b\x7b\x17\xc3\x4d\x3e\x13\x5c\x7e\x53\x8e\x29\xc8\x85\x9a\x9a\xe9\xb3\x02\x4b\x3c\xe5\x77\x43\xda\xd9\x9e\x4b\x49\x77\x97\x53\x45\x2b\xd3\xf8\x94\xfa\x77\x73\x45\xf2\x25\x93\x40\x23\x1a\xdf\x6b\x2b\x96\x41\x71\xf3\xde\xb0\x10\x99\xe7\xe6\x14\x0e\x4f\xe6\xb3\xf6\xc2\x34\x6b\x69\x41\x01\x45\xaa\xaa\x89\xf4\xd5\xbf\x46\x97\x52\x4c\x73\x09\x5b\x96\x10\x46\x4e\xb8\x8e\x8b\xa2\xaa\xd8\x4a\x02\xf7\x72\xee\x53\x33\x62\x6c\x1e\xf4\x09\xb8\xa1\xe9\xa6\x91\x62\x1c\xbc\x6a\x1e\x89\xc1\x64\xfc\x53\x04\xa2\xd4\x72\x56\xb3\x1f\xcc\x2e\x86\x3c\x43\xa1\x12\xce\x50\xfe\x47\xe4\x2f\x40\xc4\x1d\x83\xb9\x19\x4d\x55\xef\x17\xb9\xe7\x08\x75\x6d\x55\xca\x27\xe0\xc3\x3d\xfd\xb2\xa7\xd5\x2e\x63\xbc\xf4\x66\x9e\x57\xf1\x0c\xda\x62\xe9\x88\xb9\x90\x6a\x09\x69\xe4\xaf\xca\x2b\x62\x33\x38\xd1\x34\x9e\x9b\xe5\x96\x5e\x2c\x31\x41\x8d\x58\xef\x28\x33\x10\xe7\x0b\x68\x49\x74\x89\x5f\x69\xdc\x94\x3b\x56\x76\xa1\xe0\x77\x98\x71\x0d\x61\xd7\xca\xb0\x49\x73\xa0\xbe\x18\x48\x42\x38\xa4\x8d\x0d\x28\xf5\x53\xd3\x2d\xbc\x1a\xca\xe1\x75\x8a\x3b\xf2\x48\xe6\x5e\x01\xf4\x3a\x9b\x27\xbc\x76\x9d\xaf\x46\xb1\xca\xad\x15\x1f\x8d\xec\xc0\x43\x69\x6c\xc0\xbf\x00\x71\x74\x85\x4d\x36\xf1\xfa\x06\xcf\x27\xc0\x0e\x99\x15\x88\xc0\xc2\x1a\x3e\xda\x06\x50\x15\x33\xfd\x30\xee\x22\xae\xc4\x81\xf0\x0f\x95\x86\x42\x48\xb6\x06\xb8\x9b\x49\x95\x62\x98\x7e\x6a\x06\xbb\xee\x03\xa0\xfb\xfe\xbd\xc9\xa1\xfd\x67\xa5\x86\xdc\xfd\x73\xb3\xe6\x00\xeb\x17\xc4\x38\x73\x0d\x5d\x8b\x06\xed\x7b\xb8\xad\x50\x7b\x6d\x21\x37\x02\x01\x2b\xb8\x3e\x8d\x89\xe4\x4d\x52\x5c\x8d\x05\x2f\x4c\xd2\xbc\x0f\x63\x22\x15\xe5\x89\xbc\xbb\x03\x9b\xb8\xba\xb9\xf1\x7b\x99\xd9\xa9\x6e\xe5\x87\xfe\x85\x4d\x69\x8c\x8b\x88\x57\x53\x29\xaf\x1e\xe0\x26\x9d\x40\x70\x1a\x65\xf3\x21\xd2\xd6\xf1\x48\x6b\x65\x1d\x97\x31\x42\x05\x10\x64\x43\x90\xf3\x1b\xad\x79\x74\x95\xb3\x8b\x2d\x2a\x05\xe9\x66\xf7\x22\xc5\x2b\x05\xbd\x60\xb6\x67\x8f\x15\xbb\x22\x60\xd1\xa7\xa7\xe2\xc9\x0e\x46\x4d\xa7\x67\x2e\x29\x2c\xf1\x15\xe8\x1e\xb6\x34\xcf\xe7\xca\xbe\xfc\xec\x9d\x5e\x7e\x48\xad\x0d\x9b\x57\x38\xaf\x88\x18\x3e\x1c\x8d\x08\xc4\x80\x69\x25\x9d\xab\x3b\x4e\xaa\x21\x7e\x8a\x1a\xa2\xd5\xae\xe3\x86\x80\xcb\x18\xc3\x7b\x37\x63\xa2\xc0\x6e\xc6\x3f\x48\x19\xc1\x9f\x35\x72\x7b\x67\xc1\x43\xa9\x2b\x12\x65\xf9\x44\xe1\xb2\x88\xa7\x13\x72\x1c\xd3\x4b\x94\x35\x5d\xb0\xd1\x48\x14\x63\x40\x87\xc7\x06\xbc\x37\x73\xf5\x00\x2a\x12\x27\x5f\x35\xca\x73\x3c\x48\x06\xad\xa5\xb3\x1f\x71\xe0\x8f\x6a\x05\x5b\x3e\xf0\x3c\xee\x84\xbb\x64\xc1\x3e\x4a\xbd\x49\xd7\x14\x78\xa6\xda\xd7\x49\xce\x16\x8e\xd6\xa6\x17\x94\xb1\x06\x83\xb1\x18\xa5\x5f\x6c\xcb\xee\x60\x61\x99\x14\x24\x4f\x06\x6d\x3a\x44\x1d\x37\x60\x34\x0e\x07\xe6\x5f\x93\x19\xf1\x6f\xe6\x6c\xaf\x2c\x01\x90\xed\x69\x4b\x89\x17\x32\x1e\xb6\x88\xdb\x31\x6d\xa2\x15\x14\x3f\x86\x70\x60\x7b\xcf\x21\x1a\xd2\xd3\x84\xa3\xd1\xc0\xa0\x4d\xb0\x1c\xc1\x6f\xb1\xa3\x51\xbd\x99\xf2\x31\x93\x30\x70\x8d\xc0\x21\x8a\x5d\x46\x9c\x88\x59\xf7\x84\x17\xf4\x51\x9f\x57\x6f\xbe\x68\x68\x0c\xb7\xd5\x4b\x7b\x77\x83\x21\x14\x47\x5c\x9b\x42\x85\x82\x74\x60\xf9\x9e\x71\x59\xfb\x25\xe4\xd4\x34\xcc\x1a\xf6\xa7\x7d\xcc\xb7\xd1\x6a\x6b\xba\xb3\xe8\x59\xb7\x8c\x8f\xe5\xdf\x8e\x25\xdc\x39\x9d\x8a\xad\x5a\xc4\xc8\xbf\xf9\xcc\xb1\xf6\x9f\xf6\x7e\x51\xd5\xfe\xf5\x85\xbd\x13\x82\x98\x40\xd6\xc0\x58\xab\xe1\x27\x2d\x05\x2f\x74\xd9\xb8\x77\x3d\x57\xdc\x0c\x27\x64\x19\x5c\x29\x70\x05\xe5\xe7\x4b\x00\x9b\x75\xd6\xe7\x47\x42\xf5\x26\x6e\xc6\x1b\x0b\x78\x5e\x4f\x3d\xc8\x8d\x06\x5e\xef\xdc\xdb\x3b\xbe\x03\x7d\x10\x52\xec\x55\x53\x3e\xe9\x4d\x94\xe6\x31\x09\x20\xf9\x9c\x8e\x34\x32\x35\x50\xb3\x2c\x68\x8e\xd6\xb5\x05\xce\x45\x79\x3e\x75\x2f\x57\x35\xb1\x21\xfc\x78\x7e\x29\x07\x19\xf6\xf7\x03\x13\x80\xa7\x13\x50\xdf\xb6\x29\x41\xe7\x16\x15\x53\xdc\xa8\x73\xe4\x45\xc7\xa5\xa6\x86\x12\x55\x1f\x06\xf4\x81\xa3\x8f\x2a\x61\x4d\xdc\x37\x5b\x00\xf3\x90\x21\x15\xc8\xc0\xfa\xcf\x3e\x02\x64\x46\xc7\x53\x54\x8c\xb0\xc2\x82\x6d\xaa\x09\x6d\x51\x6c\x78\xa6\xaa\x60\x85\xe6\xfe\x41\x46\x0d\xcc\x85\x0b\xf9\x31\xf5\xd1\x6d\x83\x16\x5b\x8c\x39\x5e\xf8\xe5\x69\x17\x59\x7a\xa2\x29\xa8\x00\x27\xc8\x05\x5d\xc9\xc8\x88\xe2\x7a\x46\x1c\x8d\xb7\x7c\xab\x62\xe0\x2e\xd1\x84\x08\xc6\x67\x66\xca\x99\x78\xc3\x30\xa4\xd1\x38\xae\xe8\x28\xd6\x85\x93\xcd\x0a\xeb\xd9\x81\x31\xaa\xb9\x4f\x4e\xd7\xf6\x9f\x0e\x47\xd5\xf3\xb8\x62\x8a\x59\xc7\xb1\x62\x2a\xb6\x70\xc5\x8f\x4c\x7c\x62\xe5\xd6\xbb\x89\x56\xc0\xb5\x43\x1d\x06\x76\x5b\x2d\x4b\xee\xb2\x1f\x4c\x4a\xb9\xb2\x91\x33\x94\x2b\xfa\xd2\x63\x6f\x0c\x2d\x74\xbd\x03\x40\x1b\xe4\x05\x93\x34\x87\xea\xa9\x19\xdf\x67\x85\xb4\x40\x81\xca\x07\x0d\xcb\x95\x36\xf1\x20\xf1\xca\x96\x3e\x5f\x14\xda\x8d\x2c\x0c\x86\x10\x57\x6d\x01\xea\x50\xb0\xce\x81\x16\x06\xe7\x08\xbb\xdf\x88\x89\xa8\xa1\x8d\x7c\x3a\x97\xaa\xfc\xe0\x9e\x3a\xc8\x7f\xd9\xeb\xa3\xa5\xc6\x77\x33\x96\x97\x32\xbe\x7c\x0b\xf2\xd1\x11\xb5\x01\xab\x05\xae\xae\xdd\x8e\x52\x59\x46\xb4\xac\x7b\x62\xcf\x1e\x5c\x00\x8a\x99\xb2\xc3\xa5\x78\xcb\x64\x79\xdf\x89\x4d\x3d\x92\x05\xd0\xc8\x7a\xd3\xf3\xa3\x49\xef\x60\x30\x9d\xb4\x99\x0f\xd9\x00\xfa\xe4\x0e\x6e\x5d\x0d\xec\xcc\x98\x0f\x02\x13\xa8\x9d\xc6\x1f\x2f\xff\x38\xc4\x59\xb4\x30\x1d\xbf\x54\x6d\xf3\xf2\xa3\xa3\xb4\xf3\x0e\x32\xab\x55\x65\xdc\xd7\x07\xf0\xa0\x0c\x23\x05\x28\xa9\x98\xac\xba\x2f\x7f\xef\x99\x5d\xbf\x1d\x41\xff\x8f\x8a\xba\xe9\x2f\xa7\xd9\x0e\xbf\x23\xd8\x29\x21\x20\x3c\x03\xda\x36\xf5\x59\x53\x73\x79\x66\x35\x3f\x91\xe2\x32\xd8\x2c\xb0\x41\x5a\x4e\x5c\xa3\x9b\x1d\x66\x68\x78\x0d\x88\x66\x79\xa0\xb9\x78\xc2\x2a\x2c\xc4\x16\xcf\xb9\xb0\xaa\x7a\x86\x7f\xad\x5b\x60\x13\x66\xc7\xad\x15\x0c\xa5\xfd\x8b\xb6\x3d\x6e\x4c\x68\xe7\x3d\xf9\x88\x92\xfd\x5c\x03\x05\x8e\xf6\x13\x9f\x9b\x6b\x47\x57\x39\x40\x88\x7b\xd1\x7d\xab\x8c\x86\xe8\x3c\x32\x5f\x33\x27\xca\xeb\xf5\x62\x6d\x68\x95\x1d\xfc\xc0\x18\x80\xc3\xf8\xc6\x6e\x13\xcf\x50\xf2\xba\x69\x59\xd3\xe2\x68\x9c\x2d\x6b\x3e\xae\x4a\x5e\x01\xc3\xcc\xaf\x22\xd3\xda\x59\x8e\xf0\x17\xe4\x6b\xa7\xab\x91\xe3\x64\x5a\xfc\x5b\xd9\x6c\x93\x8e\x1a\xbd\x04\x91\xb7\x4e\xa1\x59\xae\x4a\x40\xf9\x40\x9f\x19\xdf\xc7\xc8\x78\xcc\xe0\x8b\x34\xcc\x00\xb3\x55\x0d\x13\x82\x2e\x68\x26\x42\x64\x36\xd1\xc7\x69\x4a\x39\x4a\xb3\x06\xd0\xdf\xc4\xf6\x97\x49\x61\x76\x1f\xf2\xe5\x70\xb7\xa5\x6c\x9e\x72\x90\xcd\xfb\x4b\x17\x87\x73\x46\x94\x7d\x4f\xa4\x64\x1d\xb5\x87\x7f\xbf\x72\x4b\x36\xe5\xf4\x30\x51\xdd\xe2\x6f\xb8\x41\xd2\xd1\x36\x98\xcb\xc8\x62\xd0\x4e\xf5\xb9\xa1\x3d\x8c\x62\x59\xbc\x50\x79\x09\x28\xfe\x6c\x88\x96\xb5\x9c\x01\xde\xe7\x92\xbb\xa4\x97\x79\x8b\x33\x5c\xdc\x07\xa3\x14\x7c\x04\x7e\x53\xbe\x67\xc0\x02\x3b\x00\xd6\xbc\x2d\xf5\xb9\xb7\xac\x9a\x57\x05\x7d\x29\xaa\x31\x6a\x7b\xa6\xe5\x93\xa6\x64\x27\xf5\x08\x37\x7b\x23\x62\xe8\x85\xfb\x14\x3b\xca\x97\x4a\xde\x7b\xc0\x08\x12\xa6\x1a\xd3\x3d\xc2\xa5\xbe\x27\x0c\xb3\x53\xfd\x7a\xd7\x60\x17\x13\x89\xa9\x0b\x2d\x74\x90\x94\x36\xd3\x70\x51\x0e\x67\x65\x0b\x65\xc5\x45\xf6\x82\xf8\xe9\xa5\xb3\x5d\xce\x2b\xca\xac\x1b\xcb\xea\x43\xa4\x0a\x10\xd7\x91\x8c\xf7\xe6\x4a\xcb\xe9\xba\x03\x0b\x50\x67\x0d\x2c\xdf\xd2\xe6\x1a\x34\x5d\x50\xf5\x0b\xb5\x98\x87\x7a\x3d\x33\x94\xd8\x0c\xbb\xcf\x38\x1c\x24\xa2\xd8\x9d\x12\xfa\xb0\x12\x67\xa6\xc3\xc1\xef\x05\x68\x44\x40\xea\x28\xa8\xf5\x49\x56\x36\x63\x5c\x4e\x3b\xea\x01\x65\xf1\x58\xe9\xa2\xa7\xed\x74\xdc\xe2\x57\x0a\x10\x6b\x51\x96\x01\xad\xd3\xbc\x2d\xd2\x02\x9d\xaa\x39\xd0\x7c\x67\x69\xb4\xd9\xe9\x05\x10\xac\x4c\x7b\x6d\xe6\x21\x4e\xe5\x0b\x63\x79\x22\xc8\xdb\xe2\xc3\xd8\x65\x56\xbc\xc8\x4f\xab\x30\x3c\x2c\x7c\xcc\xc0\xcc\xea\x5b\x63\xcd\xea\xcc\xd6\xeb\x20\x70\x73\x15\x1c\x4c\xdc\x62\x85\x01\x5c\xa3\x24\xc2\x8b\xb5\xd1\xc2\xf6\x04\x37\x27\x1a\x5d\x11\x95\x8d\x80\x81\x60\x93\xa2\x4c\x2c\x8b\x4f\xb8\x83\xe3\xc4\x1c\x51\xcf\x74\x48\xd6\x19\xe2\x35\x59\xc9\xa1\xa8\xa0\x49\x18\x08\x75\x5e\x8a\xc1\x18\x8b\xc9\x3f\x0d\xf6\x29\x02\xfa\x6f\xcd\x0a\x5d\xf1\x0f\x7b\xda\xd6\xba\x7f\x49\x0a\xe2\xaf\x57\x7d\xcb\x4f\x46\xe6\xba\xb9\x76\x08\x73\x3b\xa2\x96\x8d\x83\xfa\x59\x5a\x85\xeb\x92\x21\xb6\xb3\x26\xfe\xdc\x24\xc5\xd7\x98\x86\x51\x12\xcf\xbe\x93\x53\xd9\xba\xd1\x06\x16\x6f\xde\x0e\x5e\x74\xc2\xa0\x86\x1b\xbf\xab\xd2\x64\x44\x1f\x8e\xf1\xdd\xbc\x44\xaa\x62\xf1\xf0\x03\xcd\x96\x73\xaa\xde\xef\x79\xd0\xbf\xed\x4e\xb6\x3b\x6d\x6c\x15\x2c\xd6\xc9\x02\xf9\xe0\x89\x4e\xc1\xba\x22\xe8\x42\xd3\xea\x0c\x7a\x80\x47\x79\x4f\xf2\x6c\x4f\xb5\x14\x81\xd1\x71\x02\xfa\x7a\x5d\xe5\x5c\xb9\x09\x7b\x93\x76\x15\x69\xd0\x65\x25\x49\x5b\xc4\xf7\x53\x0c\x52\x08\xd7\x65\x3e\xe7\x87\xf1\x8d\x8b\x61\xdc\x6c\x57\x75\x6e\xd1\xd0\x5e\xcc\xbd\x79\x6e\x0f\x2d\xec\x8b\xde\xa3\xdb\x47\x0b\x0b\x89\x49\x3f\x3a\xb6\x20\xb0\x5d\xc5\xb5\x97\xc6\xb9\x92\x71\xe3\x87\xbe\x67\xda\x17\xb6\xf1\xaa\xa3\x14\x6d\x94\x32\x30\x19\x62\x23\x4e\xf6\xd1\x17\xf8\xf1\x3b\x5f\xe0\x64\xc4\x2d\xab\x16\xdb\xed\x69\xc4\x39\x16\x6b\x86\xd9\xc2\xca\x2d\x4b\xf0\x28\xdb\x17\x37\x88\x56\x82\x17\x84\x0b\xae\x8d\x81\x68\xb8\x10\x8b\x44\xaf\xc1\x6f\xff\x16\x31\x89\x0b\x9d\xa3\x2c\xbd\x42\x93\x24\xcd\xf9\x89\x8b\xf5\x97\xcf\xd6\xc0\x87\x94\x98\xab\x85\x98\x9b\xeb\x74\x42\x35\x7c\x10\xc2\x4e\x87\xa4\x0f\x2a\x53\x10\x0b\x24\xd5\xb7\x21\xe8\x85\x90\x16\xaa\xba\x9e\x22\xc8\xda\x9d\x5d\x19\xbe\x95\x35\x7d\xd6\xc0\x2a\xcc\x07\xa3\xdc\x5d\x2b\x52\x4e\x0a\x32\x1d\xe4\x6b\xb7\x73\xc1\xd0\xf2\x7e\xcd\x00\xdd\xa6\x12\xf4\x49\x08\xfe\x15\x2f\x75\x04\xc8\xb2\xfd\x42\xe9\x77\x0f\x1e\xea\x53\x1e\x97\xed\x81\x57\x09\x56\xed\xd4\xa1\xc3\xb5\x61\xaf\x2f\x77\x51\xd0\xc4\x2b\x20\x1c\x3a\x25\x9e\xe6\x29\x8e\xb8\x3b\x63\x37\xe3\x51\x44\xf7\x28\xc8\x90\xa0\x33\x64\x9c\x18\xc5\x3e\x1f\xcb\x99\xb2\xb9\x28\x3b\x4a\x81\xb4\xa2\x47\x03\xbc\x3b\x18\x84\xbe\x99\x6a\xd4\xb8\x40\xfe\x08\x4a\xf6\xbc\xe3\x9e\x35\x12\x22\x60\xca\x35\x88\x99\xd3\x78\x1c\x31\x26\x0a\x44\x77\x26\x54\x52\xca\x8e\x1f\x66\x88\xcf\x12\xfe\x6d\xd4\x52\x4b\x38\x48\xa2\xa2\xc5\xb7\xd2\x93\x55\x3c\xd1\x14\xd8\x7b\xfe\x1e\x2f\x8f\x4a\x31\x76\xd6\xfc\xf7\xfb\xbe\x1b\x73\x40\xfd\xa0\x3a\x7c\x55\x72\x52\xce\x12\x4c\xd4\xe0\xd8\x9a\xe4\xf6\x02\x98\x52\x68\x97\x7e\xc3\x08\xcc\xe6\x6c\x24\x64\x3f\xbb\xa2\xff\xcd\xef\xe6\x77\xdf\xe5\x9f\x15\xb0\xfd\x9f\x8f\xc7\x87\xef\xfe\x09\x20\x21\xb8\x3f\xe0\x80\x6f\xb9\xfa\x96\x76\xb2\x4a\xc3\xfa\x0d\xd4\x85\x41\x36\x78\xd1\x7b\xbf\xec\xa4\x4e\xe1\xf0\xe2\x88\xe5\xf1\x3e\x69\x56\xb0\x3e\xde\xee\x9f\xec\xec\x9c\xee\xc7\x63\x94\x6f\xd5\x73\x9f\x71\x5b\xbf\x81\xbb\x21\x2d\xa7\x9a\x0e\xe0\x9b\xfa\x84\x1f\x05\x78\xa3\xc6\xf4\xaa\x2d\x8a\x4d\xbc\x39\x9f\xe7\x6c\xbe\x96\x80\x49\x92\x75\xdd\x14\xb0\xd3\xb1\x33\xd4\x33\x14\x0a\x50\x82\x83\x64\x0a\x0c\xf2\x04\x94\xa7\xd5\xee\x25\x6a\xd3\x05\x78\x5f\x66\xda\x92\x73\x94\x19\xc9\x6e\x06\x53\x0c\x8a\xc5\x0e\x9e\xa3\x49\x82\x94\x8a\x67\xae\xdb\x3c\xef\x44\xdd\xef\xea\xf2\xbd\x24\x20\x59\x28\x63\xa1\xbf\x95\xf3\x12\x24\x0d\x18\x0f\x42\x3b\x3d\x00\x77\xa3\x7c\xcb\xe0\xbb\xf1\x96\xe2\x32\x9e\x0d\x6e\xdc\xa8\x78\xd3\xde\x24\x43\xaa\xd2\x90\x74\xba\xa0\x3d\x26\x31\xbc\xa1\x2c\x83\xea\x6b\x7b\x9f\xd7\x8c\x16\x07\x58\x02\x22\xe6\xe9\xd5\x8f\x4c\xe2\xbe\x68\xdd\x19\xcd\x4d\x1f\x28\x9e\x47\xfb\x87\x57\x57\x96\x43\x5c\xa6\xc1\x7f\x17\x31\x26\x18\x61\xdc\x9c\xd1\x0c\x61\xed\x6b\x1d\xe6\xe5\x81\x8c\x24\xf6\x42\xa0\xf0\xed\x34\xe3\x00\xc8\x1b\x06\x4c\x80\x74\xd7\xb0\xcb\xc5\xbc\xa2\xa6\x7c\x2f\x5b\xfd\x10\x46\x3f\xde\xa2\x8d\x7e\x43\x08\x6b\x32\x9b\x74\x5f\xc3\xae\x88\xfb\x8c\x0c\xb8\x31\x03\xd6\x40\x02\x2d\x19\xd9\xec\x40\x9d\xa6\x95\xd6\xb6\x41\x68\x15\x6d\xf8\x51\xd7\xbb\x31\x32\x4b\x1e\x6d\x86\x53\x51\x78\xb7\xe5\xe9\x47\xaa\x90\x89\x0b\xa1\x10\x93\xc5\xf8\xe0\x6e\x1f\xe7\xc7\x93\xe2\x5f\xf4\xab\x0c\xcc\x17\x42\xc5\x6c\xe4\x6f\xd6\x70\xbc\x9d\x66\x5d\xd6\x68\xcd\xb9\x38\x2c\xb2\x7c\x02\x84\x2a\xe8\x7d\xae\x29\x0e\x74\xa0\x74\x77\x31\x49\x99\x2a\xc7\xeb\x29\xc6\xd6\x5d\x99\x24\x11\x36\x2a\x9a\x4e\xb4\xf8\xba\xe6\x4e\x70\xa7\x64\x7a\xb7\xa0\x13\x75\xfb\x90\x0c\xb7\xa1\xaa\x62\x7d\x7c\xf9\xfa\x4c\xfa\x9e\xa2\x8e\xb8\x1d\x31\xf5\x52\xbe\x9f\xe4\x9e\xf4\x04\x34\xe0\x26\x29\x46\xe5\x94\x04\xba\x4f\x6b\xd3\xfe\x78\x1c\x8f\x82\x4e\xa3\x3f\x55\xe4\x33\x7c\x48\x5c\x11\xcd\x7c\x1e\xa5\xe0\x06\x16\x3a\x60\x66\x03\x17\xce\x3e\xa6\xf1\xa8\x17\x91\x44\x4e\xa5\xad\x32\x9d\xff\x60\x17\xa7\x2b\xd6\xf6\x49\xe6\x40\x67\x60\xcc\xf6\x96\x6d\xf5\x54\x81\x09\xba\x31\xfd\xf0\x24\xe9\x9d\xa8\xae\x01\x85\x02\x01\x6c\x45\x15\x4c\x9e\x4f\x8c\xf5\x59\x72\x28\x6b\x76\x1e\xa3\x61\x3d\xa9\x87\x65\x3b\xe7\x27\xd5\xbf\x91\x3b\x30\x60\x33\x5c\x0c\xab\x63\x1e\xaa\x93\x54\x9c\x3c\x7f\x6b\x45\xee\xb3\x33\xfb\x87\x45\xf8\x1f\xc7\xd9\xac\x54\x00\xfd\x64\xc7\xb3\xd9\x59\xc2\x53\xad\xce\xd3\x3a\x4b\xee\xb2\xde\x18\x2a\x8b\xcb\xb1\x82\xed\x33\xbd\xf3\xf5\x84\xb9\x12\x00\x66\xa6\x44\xe3\x47\xa4\xeb\xe6\xe2\x94\x87\xc2\x08\xe8\xb6\xac\x9a\xa9\x32\x8a\xb2\xae\x0c\xd2\x7f\x2c\x97\x46\xb3\x8c\x00\x4d\xea\x49\x8f\xe0\x7e\xee\xe1\x13\x7f\xd0\xba\x9e\xde\xe2\xcd\x7d\xc7\x65\x1b\x99\xa3\xd0\xb9\x47\x8b\x0c\xa1\x4a\x1e\x25\xe6\x9b\xa8\xcf\xf9\xfd\x98\xe6\xa7\x5c\xb1\xa5\xcb\x9f\x60\xaa\x1e\xba\xb6\xd9\xea\x15\x9a\x28\x14\x8f\x44\x2f\x9f\x73\xb4\xa5\xcc\x48\xb0\x7a\x84\x33\xd7\x03\xe8\x75\xb3\x71\x61\x64\x86\xa9\x98\x87\xd9\xbd\x0e\x0b\x30\x9f\x1d\x3f\x40\xc1\x4f\xea\xa7\xa7\xa3\xcf\x9a\xce\xd3\x7a\xcf\x08\x68\x0d\xb0\x77\xcd\xa0\x74\xee\xb3\x8c\x0f\x98\xaf\x1f\x15\x36\x98\xf5\xbd\x88\xcb\xfa\x71\x9d\x13\xf6\x5f\x2b\xa7\x0a\x46\x39\x50\x20\xe5\xc9\x85\x07\xe5\x89\x8c\x8f\xfb\xdd\xdc\xc0\xe4\xf7\x72\x38\xf4\xce\x9f\x22\x7c\x17\xef\xa2\x62\xe3\x71\x8e\x1b\xc7\x67\x2c\xd7\x33\x76\x64\x91\xaa\x37\x50\x55\xf5\xa3\xd1\xa5\x18\x95\x82\x4c\x2a\x03\x56\xb2\x08\xad\x77\x82\x57\x05\x82\x1a\x97\x24\x58\x32\x3e\xaa\x03\x70\x77\x8e\x9c\xfc\xa1\x4c\xe1\x3d\xf6\xd8\x67\xcf\x5c\xb5\x6d\xaf\xb4\x40\x46\xc6\xaf\xe7\xcb\xb5\x97\x01\xc2\xf2\xcb\x49\xe3\xc4\xbc\xd6\x47\xbb\x0f\xa4\xe2\x8e\x92\x48\x11\x75\xa8\x10\xe3\xf2\xdb\x35\x88\x75\xc2\x9c\x91\x94\x09\x45\x7f\x34\x2f\x12\xca\x35\xa8\x73\x67\x89\xd9\xe8\xed\x92\x77\x6b\xf2\xdd\xf5\x7b\xc3\xe6\x57\x7e\x34\x37\x9c\x4d\x7b\x5e\x8c\x45\xa3\x87\x02\x61\xfb\x9c\xc7\xce\x01\x57\xa5\x10\x37\x07\x76\x11\x6c\x03\x13\xc5\x99\xdb\x2b\x55\x8c\x2c\x0f\x9b\x77\x59\xa8\xd7\xd6\x79\xb4\x4c\xf4\x23\x51\xbf\x48\x08\x63\x54\x84\x48\xc5\x1b\x4c\x05\xa1\x43\x93\x27\x81\x2c\x98\x9f\x3e\x98\xa0\xf9\x81\xcc\x50\x6d\x30\x7b\xc4\xb7\x53\x20\x5e\x90\xf5\x64\x69\x80\x1c\xa1\x5c\xce\x3d\xcc\xd8\x05\x3b\x27\x58\xed\x40\x70\x00\x33\x6c\x77\x42\x5f\xca\xb9\xbf\x01\x29\x4e\x1a\xde\x13\xdd\x79\xa3\x49\xa1\x44\xd6\xd8\x1b\xe3\x36\xf0\x2a\xa9\xbd\x93\x02\xff\x6a\xa3\x19\x1b\x38\x2f\xe9\x2e\xe2\x1b\x57\x9d\x86\x36\xa3\x74\xc0\xb2\x4b\x66\xf4\xc0\xb5\x90\x06\x5a\xb5\x60\x5b\x81\x3d\x5f\x05\x10\xa9\x70\xf8\xea\x8a\x5a\x27\x05\x4f\x3b\x49\xc3\x82\xbc\x69\x1b\xeb\x1e\xb1\xe3\x77\x66\x15\x8f\x22\xee\x89\x37\x7c\x76\x01\xed\xa8\x84\x74\x96\x08\xd3\xba\x14\x72\xd5\xff\x79\x8a\x2e\x83\xcb\xca\x3b\x9e\x74\xb9\xff\xbd\x9b\x58\xfa\xf5\x1f\xb6\xf7\xfe\xcf\x5d\x6e\xdf\x80\x1a\x8f\xdf\x8e\xb3\xfb\x62\xe5\x64\xac\x43\x74\xbb\xcb\x2a\xa9\xa6\x99\x77\x57\x3b\xc0\xbb\xb2\xe7\xd2\x1e\xcb\x1f\xa8\x2d\xae\xe9\x6c\xac\x32\x1a\x4b\x82\x3d\xb0\x62\x89\x8f\x69\x77\x05\x01\x4d\xb5\x83\x12\x1b\x6b\xe4\xe0\x41\x59\xe2\x9d\x43\x7b\xbb\x2e\x0b\x90\xb2\x03\x65\x7d\x07\xd6\x20\xaf\x1a\xa8\xc1\xf6\xbb\x7f\x11\x2c\x29\xde\xa3\xfa\x48\x41\x01\x4d\x0b\x3b\x26\x3e\x93\x30\x40\x47\x7d\xf3\x32\xde\x99\xb7\x57\x7c\x77\xdf\x50\x7a\xf8\x90\xe8\x17\x94\x3e\x34\xef\x07\x89\x6d\x55\xd9\x74\x9d\xc9\x2c\x97\x9f\xd2\x85\xbc\x99\xaf\xf2\x83\xcb\xbf\x97\x2a\x6d\x6b\x0c\x04\x35\x8d\xc8\xdb\x44\xb6\xaf\xc8\x48\x20\xe6\x37\xe6\x07\x3e\xb8\x4b\x50\xa1\xfd\x53\xb0\x1c\x15\x40\x5a\x0e\x83\xb6\x33\xc8\x3b\xad\xde\x9e\x3e\xeb\x84\xcf\x02\x09\xf2\x32\x8a\x61\xa9\xac\xa4\xc7\xd3\xfe\xcd\x05\x26\x61\xbf\x37\x25\xcf\x1b\x27\x69\xa1\x57\x30\x31\x75\xc8\x35\x2e\xac\xdb\x24\xc5\x27\x4c\x85\x16\x11\xf2\x42\x05\xd9\xf1\x57\x63\x58\x93\x02\x18\xa6\xe9\xb2\x7c\x4a\x44\xd3\x54\x7d\xde\x41\xdc\x40\x2c\x28\x20\xa5\x25\xc8\xb2\x5d\xcc\xd6\x92\xeb\xd4\xb2\x4f\x07\x19\x4c\xd3\x25\xa0\xe5\x48\x1c\x93\xf5\xad\x61\xba\xd8\xcc\xa7\x46\xa6\xcc\x1f\x8d\x95\x46\x12\xf2\x6c\xc3\x2b\x8a\x01\x36\x1d\x09\x8d\x41\x8e\x89\x74\x01\x05\x4b\x26\x0a\xf1\xd6\x75\x43\x45\xbd\xad\xc8\x1c\xbe\x1f\x1b\xa6\xbf\x62\x63\x6c\x1b\x53\xe5\x81\x94\xc8\x86\x42\xec\xd5\x06\x31\xf4\xe2\x87\x4c\xbb\x1d\xc8\xb7\xce\x93\xa4\xff\xea\xe4\xc8\xa5\x28\x41\xa1\x0d\x43\x42\x3e\xea\x6b\x24\xc8\x62\xac\xb9\x58\x10\x02\x49\x17\x4b\xfb\xeb\x55\x33\x2f\xa5\x37\xc6\x1e\xcd\xa0\x39\x84\x94\x20\x37\x0b\x4b\xc1\x05\x39\x27\x17\xf7\xb0\xe9\x28\x84\x83\x5c\x6c\x86\xaf\x89\xf3\x30\x55\xad\xea\x5b\xf6\x29\xd4\xdc\xac\x75\x50\xcd\x3c\x0c\xaf\x6a\x75\xcc\x81\x2d\x85\xfa\x59\xea\xab\x7d\x96\xe1\x23\x63\xea\xab\x25\x6e\x4c\xbc\x8f\x02\xb3\x7c\x98\xcb\xa2\x0f\xfc\xfb\xf8\x78\x70\xeb\x75\x00\x55\xe8\x02\x8b\xc6\x01\xdf\xd8\x41\x5a\x7c\xb2\x41\x08\xab\x31\x06\x13\x7a\x1f\xcf\xd4\x3f\x1a\x6c\xb4\xba\xdd\x53\x93\x29\x42\xa7\x38\x01\x1c\x9c\x9e\x97\xc6\x5e\x71\x2c\x60\x8c\x34\xc3\x11\xc3\x78\xd9\x2b\x78\x57\x10\xa1\xec\x1b\x78\x46\xa5\x22\x0b\xcc\x6c\xd8\xd7\x3e\x3e\xa7\x93\x78\xae\x7e\x8d\xad\xeb\x12\x93\x97\x25\x4f\x07\x45\xe3\xca\xa8\x1f\xd1\xbd\xd1\xe5\x68\x71\x70\x34\x76\x7c\x3c\x29\x56\xbf\xe2\x15\x32\xb0\xd1\x5b\x13\x1d\x26\x2b\xe4\xd0\xf0\xcb\x26\xc6\x1e\x2c\x90\xd4\x9e\x11\x57\x01\x12\x9f\xaa\xf9\x73\x5b\x9e\xaa\x09\xf5\xa7\x96\xf0\x81\xd5\x32\xc7\xb1\xea\x53\x44\x56\xbd\x00\xba\x9a\x61\xd8\xce\x91\x51\x5b\x28\xe0\x0e\xfc\x7b\x13\xc4\x3f\x8c\x97\x3f\xea\x1a\x8a\x2d\x14\x09\xb0\x61\x4d\xe6\x99\x7b\x78\xfb\xb3\x3f\x8e\xe5\x31\xf3\xf3\x8f\xbf\xc0\x4a\x66\xdb\x04\xd9\xc7\x92\x63\xbb\x34\x2a\xd7\xbc\x87\x3a\x92\x3c\x40\xa5\x63\xd7\x94\x87\xba\xf0\x0d\x4d\x43\x80\x2f\x07\x09\x97\x2c\x68\x89\x62\x0a\xfd\x6a\xc0\x83\x04\x5d\x3f\xc9\x3b\x0e\x4a\x4f\x01\x0a\x7f\x63\xd6\xdc\xee\x85\x04\x8f\xa5\x24\x34\x95\x04\x7f\xf3\xd9\x20\x2a\x1e\xea\x92\xc8\x3d\x93\x29\x20\x7e\x7c\xce\xa3\x10\x4a\x3c\xaa\x53\xe4\x86\xa8\x24\xf8\x2a\xa5\x2f\xad\x0c\xe2\x90\x23\xea\xa8\x88\xad\x19\x70\x2c\x9f\xa3\xea\xa8\xf0\xc1\x61\x3c\x70\x6f\xf0\xc2\xad\xf0\x09\xa2\xf7\x02\x64\xfa\x09\x62\x78\x57\x63\xf4\xcc\x6d\x74\xd4\xf5\xa3\x99\x1d\x74\x9b\xfc\x02\x9b\xfd\xf2\x98\x0f\xd3\x28\xdc\xef\xad\xc7\x1a\x5b\x56\x87\xb4\x5f\x3d\x57\x48\x7e\xe9\x53\x4c\xee\x64\x7b\xea\x52\xca\xee\x65\x75\xd4\x59\xa2\x25\xaa\xcf\xc5\xab\x4f\xf4\x93\x3e\xd4\x6d\xf9\x03\xae\xbf\xcc\xa3\xbf\xca\xa3\xc7\xea\x90\x76\xf0\x5b\x45\x38\x94\xc4\xcd\x9e\xcf\x46\xff\x17\xb9\x42\x1a\x9b\x7d\x31\x8d\x57\x29\x8d\x67\xde\xb1\x4f\x2a\x25\x44\x12\xa9\x67\x19\x3b\xb4\xd2\x29\x7f\xda\x40\x82\xaf\xbf\xde\x33\x9f\x8d\xe3\x77\x9b\x1c\x09\x42\xef\x3a\xda\xb6\x05\x47\xdd\x7a\xcf\x9c\x4a\xc7\x62\x79\x74\x1f\xc5\xbb\x62\x79\xcc\x9a\xbe\x0f\x75\x99\xec\x42\x05\xbf\x9c\x3a\x82\xbf\xfa\xf4\xd3\x56\xfa\x6f\xf3\x49\x63\x49\xcc\x9c\x86\x87\x5d\x3a\x02\xef\xfa\xf3\xe7\x3d\x0b\xd4\xf5\xd2\x28\xa1\x95\xa9\x85\x4a\x99\x21\xf4\x87\x3e\x8a\xe7\xd7\xfc\xf7\x39\x02\x9d\x95\x24\x5e\xfa\x2b\x1c\x06\x47\xbf\xa1\x3c\x5e\xa9\x47\x7b\x69\x6c\x9e\x65\xac\xf6\x3f\x7c\x29\xed\x8c\x4e\x91\xdb\xbd\xe0\x57\xbe\x98\xc2\xb6\x94\xe8\x27\x94\xe8\x33\xe7\xa1\xce\xf9\xa9\x7f\x13\x48\xed\x59\x4a\xf4\x9b\x49\xf4\xa5\x08\xa6\x6f\x76\xcc\x12\x22\xe3\x91\x4a\x34\x5a\x3c\xc3\xcf\xeb\x05\xd8\xb4\x86\xf1\x28\x50\xb7\xcd\x27\x73\xf4\x02\x87\x56\x7e\xf8\x0a\x87\xaf\x59\xe4\x10\x6e\xe0\xe0\x16\x9f\xe0\x0e\x64\x4a\x86\x2f\x60\x86\x2f\x8a\x86\x3f\xf2\x6e\x3f\xf2\x26\x14\xb2\x8e\x9f\xa0\x8e\x3f\x40\x86\x2f\xfc\x45\x9e\x7b\x26\x68\xb8\xa7\x11\x0e\xfd\x45\xde\xf0\xaf\xf2\xdc\xff\x51\x9e\xdd\x31\xd4\x8f\xf9\xf1\x03\x88\x70\xa5\xf0\xc9\xe2\x74\x4c\x85\xf4\xc9\x11\xa8\xf9\xdd\x86\x44\x16\xe1\x6f\x29\x89\x47\x82\x84\xaa\xcb\x43\xdd\x8f\xfe\xfa\x34\xae\x29\xbf\x8a\x2e\x3f\x60\x66\x3f\xf2\x4e\x90\xdc\x86\xdf\xdc\x46\x10\xdc\x56\x60\x4a\x56\x60\xa0\x6e\x20\xb2\x66\x5f\xb2\x96\xef\xdc\x86\xa7\xfc\x92\x97\x4a\x74\x5f\x46\xf0\x98\xcf\xee\x5f\xe4\xb9\xff\x2a\x6f\xf8\x1f\xe5\x9d\x3f\x74\xd7\xd1\xff\xe0\x8b\x3f\x7c\x94\xa3\x7f\xf3\xc7\x60\x70\xa5\x9f\xfd\x7e\xc6\xdb\x6f\xf1\xe7\x63\x8d\xcd\xd3\x58\x21\x89\x7d\x86\x84\x90\x22\x85\xc7\x8f\x38\x2f\x3a\x05\xb4\x17\x9f\x7a\x1d\x8a\x61\x18\xb5\xf4\x02\x97\x0d\xe5\x3e\x2b\x45\x33\xf7\x6f\xd3\x15\x6c\x1c\xd9\x49\x0f\xca\x87\x3d\xd7\x44\xe6\xf4\x83\x30\xbb\x08\x28\xd9\x06\xe1\x0e\x7c\x9e\x58\x78\x12\xdb\x38\xf0\xe1\xc1\x6b\x05\x9b\x96\xa2\xf0\x58\x10\x14\xc8\x65\x9e\xc4\x09\x3a\x63\x55\x58\xc9\x18\x12\x97\x58\x10\x34\xcb\x3b\x80\x44\x2b\xe4\x28\x20\xec\x84\x75\xd7\x32\xf6\x39\xb5\x7d\xbb\xae\x4f\xdb\x94\x0d\xe9\xd1\x79\x96\xfc\xe6\x2a\x52\x74\x81\x37\x76\x68\x80\xe2\xdf\x69\xd0\xe8\x9d\xbc\xe9\x93\x9c\x91\x92\x07\x1b\x4a\x0b\x86\xe0\x8a\xb6\xca\x46\x4f\xed\x45\x50\xf3\x56\xa5\xb7\xb9\xac\x1b\x72\x39\x62\xf2\x1a\x65\x01\x22\xed\x38\x6d\x9c\x30\xaa\xe0\x7d\x90\x59\x15\x06\xca\x8e\xbe\x92\x1a\x86\xfe\xd1\x46\xf9\xda\x4c\xf2\x85\x91\x22\x4b\x96\x34\x15\x35\xd8\x14\x46\x1a\x8e\x2c\xf0\xf7\xb6\x1a\x34\xcc\x50\x7b\x12\x57\xc0\x41\xec\x32\xd8\x8e\x4c\x0c\x0c\x1a\x3c\x2f\xc0\x22\x0a\x1b\xcd\xef\x6b\xc2\x88\xf8\x6a\x61\x46\x77\x51\xf0\xd4\xe1\x0a\x68\xa5\xbe\x28\xe8\x61\xf1\x8a\xe0\xeb\x7b\x1b\x5a\x2c\x21\xef\x7c\x63\x15\xbd\xde\x05\x97\x85\x2f\x5a\x8c\x4d\x6a\x1a\x7e\x58\xde\xb0\x0f\x09\x2b\x59\xcc\x04\x08\x3a\xae\x73\x19\xed\xcb\x10\x47\x2a\xeb\x3c\x5e\x28\xa2\x20\x7a\x9a\x12\x00\x12\xa5\x6b\xc0\x9e\x43\xda\x57\x4a\xb5\xc2\x57\x17\xe1\xb1\x21\x8a\xc9\xd7\x42\x7f\x88\x6f\x6e\x6b\xa5\xf3\xe9\x9a\x92\x91\x32\xfe\x8a\xee\x2f\x2f\xc3\x87\x94\x8f\x1d\x97\x28\x4d\x61\x50\x91\x68\x37\x94\xb1\xe1\x76\xff\x96\xcf\x81\xf5\x49\xce\x09\x18\x26\x54\x6b\x6c\xc8\xc7\x15\x57\x00\x43\xdd\xa8\xa6\x25\x77\xf2\xed\xcf\x3c\x78\xa7\xd1\x96\x56\x76\x4a\xca\x46\x81\x97\xa4\xf7\x8c\x5c\xc7\x98\x05\x4e\x62\x63\x28\x0c\x84\x2f\x91\x7b\xce\x99\x6c\xb2\x1d\x66\x6b\x60\xc9\x72\xf5\xb4\x7c\x8a\x29\xf1\x4b\x75\x13\xb5\x01\xe1\x6d\x17\xad\xa7\x4b\xc1\x5e\x96\xff\x34\xb4\xcb\xf0\xdb\x6d\x33\xb9\xcd\x76\x35\x12\xf9\x1e\x8b\x53\x18\x88\x82\xbe\x54\x35\x82\xd5\xed\x00\xef\x16\xa7\x83\x59\xa9\xda\xc1\x7a\x73\x29\x8e\x16\x72\x0d\xd2\x11\x73\x0e\x2b\xa4\x8c\xb2\x1f\xd4\x89\x36\x9f\x5e\x59\xc6\xa6\x0f\x3e\xc1\xef\xbe\xf4\x0c\xd4\xdd\xee\x6a\x09\x86\x3a\x9c\x05\x2b\xa2\x82\x41\x7f\x06\xc1\xf5\xcd\xb8\x1f\x0c\xb2\x45\x95\x8b\x30\xcd\x53\xbe\x08\xb5\x3f\x5a\xa6\x0d\x3f\x79\x06\x01\x4e\xc5\xe8\xcb\x5b\x28\xf4\xec\xb8\x50\x78\x9a\xb7\x5a\x80\xe9\x74\x73\xa6\x74\x2a\xac\x53\xac\xbc\x44\x1c\x25\x83\x20\xc3\x13\x21\xb4\xcc\x91\xc8\x75\x50\x8f\x84\x93\x74\xba\x74\x5e\x72\xb8\xe0\xf8\x20\xc0\x43\x73\x0c\x66\x16\x55\xa4\x4f\x0b\x09\x93\x3e\xdc\xe1\x81\xbe\xa9\xe6\x9e\xad\x3a\xc5\xf1\x0c\xf7\x1d\x6e\x5b\x4c\xdd\x5b\xbf\xfe\xee\xd7\x6a\x86\xea\xf9\x67\x01\x8a\x31\xfd\x93\x70\xc0\x7f\x6c\x72\x35\xc8\x03\x44\x98\x5d\x0d\xa2\x80\xd8\xba\xce\x4b\x92\x05\x17\xa6\xc9\xe6\x39\x9e\x66\x64\x8c\xf8\xde\x54\x21\xcc\x7d\x06\x02\x1c\x4b\x53\xf4\x0b\x24\x80\xa1\xd9\x8d\xd1\xf1\xdf\xc4\x61\xb8\x22\xcf\x22\x96\x5d\x9a\x84\xa7\x91\x1d\x49\x8f\x92\x4c\x47\x27\xfd\xe6\xaf\x96\xa2\xf9\x88\xbe\x3d\x3a\xa3\xca\xd5\x28\x7b\x9f\x54\xbc\x85\x1a\x63\x34\x55\x50\xde\x07\x7b\x4b\x55\x14\x58\x5b\xc8\x2e\xbf\x37\x1a\x6f\x81\x30\xe0\xd0\x51\xef\x80\x59\xce\x6d\x39\x15\xa8\x37\xd6\xa6\x3d\x84\xa9\x4f\x71\x0f\x01\x41\xfc\xa2\x28\xde\x19\xd6\x5a\xb2\x8f\x67\x1d\xc3\x2b\x41\xc4\xd3\xa2\x24\x5f\x23\x2d\x7b\xd5\x89\x4e\x41\xcc\xf3\x2f\x07\x7a\x78\x83\x38\xad\x37\x68\x81\x46\x7e\x6e\xc2\x7a\xcf\x77\xd3\xd7\xef\x72\x32\x6d\xc6\xdc\x0c\xca\x07\xac\x33\x23\x7e\x20\x7e\x47\x52\xbb\xfc\x7a\xc2\x52\x9a\x5f\x2c\x5c\x8f\xc8\xc3\x8e\x3b\x3a\xba\xd7\x7a\x26\x53\x4d\x84\xe8\xf3\xb1\xef\x18\xe9\xa2\xc2\x74\x07\x4d\x4a\x5f\x68\x72\x22\x6d\x31\xbf\x14\x13\xb2\xc4\x0d\x3f\x6e\x82\xac\xc9\x5c\x20\xba\xbe\xd4\x47\xec\xdf\x46\xc3\x8c\xd3\x18\x2b\xf5\xdc\x70\xb7\x79\x0b\xaf\x01\xf0\xf6\x49\x98\x4e\x86\xb0\x4f\xa3\x37\xe9\x13\x13\xaa\x4f\xa1\x73\x23\xfb\x26\x2e\x31\x3a\x14\x79\x4b\xe0\x0c\x9e\x33\xc7\xc3\xc3\xb6\xe0\x00\x49\x55\xe3\x33\xd9\x58\x1a\x08\xf4\xf5\xb5\xb3\xda\x81\xe7\x69\x95\x94\x59\x05\x2e\x9b\x74\xa8\x0f\xbc\x0a\x5d\x44\xae\xbd\x51\x7f\x59\x0d\xcc\xaf\x04\xc7\x46\x9a\x82\x60\x1b\x49\xb9\x72\x4c\x93\xcc\xd8\x6d\xb9\xc1\x90\xee\xa6\x41\x06\xb5\x7a\x72\xb7\x4b\x0d\x0c\xe7\xa9\x88\x80\x37\x81\x19\x66\x6f\x5a\x65\x6f\x67\xdb\xe7\x3a\xa0\x59\x0c\x8f\xd5\xe3\x7c\xa6\x30\x30\x81\xbb\xb6\x6c\x3d\x01\xd3\x21\x74\x8f\x56\x25\x46\x5f\x0c\x45\x59\xec\x84\xef\xd3\x4e\xd0\xe1\x5b\xde\xf3\xc7\x42\x69\xc6\x09\xf8\x8c\x21\x5d\x98\x91\x11\x94\xf7\x2a\x8f\xc1\xda\x13\x77\x25\x30\x64\xda\x7b\x99\xec\xc4\xa6\xbe\x17\xcd\x60\x7e\xc6\xd1\x9d\x3c\xf4\x41\x34\x7d\x76\xe9\xcc\x1f\x0e\xa6\x58\xbd\x42\x25\x1b\x9a\xd0\x28\xc2\x14\xbc\x15\x58\x61\xb6\x15\x6f\x8f\xdf\xe7\x10\x95\x3b\xc7\x84\xc1\x10\x54\x92\x76\x32\xf0\x96\x73\xed\xe6\x4a\x83\xbc\x2b\xee\x7a\x83\xd4\xea\x1b\xe1\x9a\x8f\x77\x27\x37\xfd\x25\x7c\xb4\x78\xbc\xc9\xb1\x31\xf4\x78\xfb\x4a\xe9\x7c\xd5\x20\xba\x85\x88\x60\x9a\x05\x4d\x9d\xd3\x8c\x50\xe2\xde\x81\x5b\x74\x17\x84\xc6\x4f\x6d\x29\x48\x6d\x3e\x60\x7b\x68\x1c\x2c\xfa\x5f\x0d\xfc\xe4\x92\x59\x19\x2e\x47\x95\xf2\x2a\xb3\x4f\x7d\x00\x27\xc3\x18\x8c\x0e\x42\xfd\xc9\x84\xa9\x33\xfe\xcd\x0f\x10\xc6\xea\x9f\x76\xb0\xe8\xff\xa3\x16\xff\x8f\x5a\xfc\xff\x81\x5a\xf4\xa9\xf0\xa3\x99\xbe\xfa\x27\x15\x08\x94\xcb\x12\x42\xc1\xed\x1d\xdc\xf0\x53\xc1\x18\x42\xd6\x15\x82\xff\x1d\xb5\xf8\x25\xcf\xfc\x1f\xe5\xfd\x1f\x52\x0b\xc9\x1c\x5c\xc9\x1c\x1c\xd8\x10\xfe\xa4\x02\x4e\xcf\x60\x6e\xe0\x4a\x26\x3f\xdc\xe6\xe0\x3c\x6e\x20\x0a\xee\xff\x8e\x5a\xfc\x29\x2f\xf8\x1f\xe5\xfd\xdf\xa1\x16\x23\x7c\xd1\xa4\xf2\x83\x5a\xb4\x7f\x50\x8b\x56\x35\xf5\xfc\x56\x5d\xd1\xa8\xc1\xcb\x66\x14\x43\xb9\x8d\x21\x50\xc8\xdd\x83\xc2\x64\x1b\x25\x5e\x97\xda\xbe\xd4\x86\xed\x49\x11\xac\x50\x45\x93\x46\xf0\xb2\x02\xe2\xc2\x32\xe5\x4c\x76\x7b\x6c\x20\x7d\x93\x27\x3c\x69\x81\xc3\xe8\x9a\x56\x64\xf0\xf4\x76\xdc\x0c\x3e\x77\x28\xb2\x79\xed\xa4\x48\xc8\x01\x93\x9a\x45\x25\xf2\xa9\xbc\x70\x9a\x7a\xcf\xf9\x34\x40\x1a\x5f\x83\x30\x09\xa7\x0c\xf8\x9e\xc5\x72\xde\xd4\x63\xcc\x62\x2a\x33\x86\x6a\xab\xac\x5a\xf3\xef\x86\x9f\x6b\x4c\x00\xe0\xc9\xe3\xdb\x02\xbe\x24\x6f\x19\x6c\xb9\x80\x25\x42\xec\x44\x2f\x1a\x2a\xda\x25\x38\xdc\xb3\x2f\x66\x00\xba\x4d\x5c\xb7\x70\x61\x90\xf4\x20\xe8\x96\xbc\x2c\x2a\x5b\x64\xbd\x4e\x6b\xca\x59\x53\x2d\xd4\x19\x19\xe7\x98\x79\x5b\x1f\x0e\x1b\xcf\xdc\xf6\x97\x0a\x79\x34\x01\xd5\x60\xbb\xb4\x2f\xd3\xda\xe5\xf2\x26\x69\xc1\xab\x37\x6c\xd3\x86\xae\x67\x71\x30\x6e\xaa\x53\x79\xe4\x5b\xe0\x10\x2c\xf0\xa6\xea\xe2\x37\x1e\x61\xd8\xfb\xc8\x33\xdd\x1d\xea\x88\x78\x8d\xad\x8f\xa4\xb1\x25\x41\xf6\x79\x98\xfd\x4e\x66\xcb\x9e\x75\xc8\x41\x80\x46\x92\x26\xcd\xcd\x2e\xea\x0d\x58\x35\xf3\x3b\x0f\x77\x2c\x0b\x16\xd5\xf9\x50\x18\x83\x6a\x8b\x2e\x53\x22\xb9\xe9\x28\xb3\xf0\xcc\x1d\x18\x97\x90\x4f\x28\x95\x8d\x5b\x64\xe9\x55\xc6\x85\xe5\xdc\xf7\x4c\xd1\x08\xd6\x90\xe2\xef\xa2\x6f\xa0\xd9\x4b\xd8\xcf\xce\xde\xa5\x9e\x6f\x0a\xdc\xb5\x15\x17\xb4\x74\x1c\x9b\xd2\xf1\x61\x2e\xae\x14\x86\x9c\x76\x1e\xd6\x13\xb3\x89\xf6\xf9\x7a\xb1\x53\x58\x0f\x1a\x98\x95\x11\x4a\xe9\x2e\x81\x71\xfd\x90\x71\xac\xb7\x10\x35\x37\x93\xd3\x55\x5f\x32\x3a\x3b\x13\x42\x87\xa5\xfa\x0b\x15\x28\xb2\x63\x76\x40\x44\xc8\x18\x7d\x43\x4a\x67\x96\xcf\x05\x71\x5f\x78\x8e\xeb\x3d\x89\x04\x74\x4b\xa5\xed\x8a\xe4\x37\x59\x91\xf7\x1d\x9b\x6a\x3f\x96\x31\x14\xcf\xbd\xe3\xf5\xdc\x75\x35\xd1\x67\x22\xee\xbe\x11\x09\xd4\x46\x63\x8f\xc5\x36\xb2\x37\xeb\xfd\x46\xb2\x7a\xb1\x37\xf9\xb9\xb5\x13\x71\xc9\xe9\x12\x5f\x74\xbc\x68\x10\xe7\x75\x0e\x34\xb0\xe0\x8b\xb8\x57\x08\x35\x68\x80\x53\xb1\x3a\x8b\x64\x79\x7e\xbe\xac\xb5\xc4\x10\x93\xe7\x55\x0f\xf2\xa2\xe6\x1a\x9a\x82\x42\xb5\x1f\x4a\x1c\x8a\x44\x0c\x32\xe1\x32\x5d\x38\xce\xd9\x26\x1d\x74\x0a\x20\x19\x95\x4d\xf1\xce\x04\xe3\x32\xb4\x63\xb3\x1f\xf6\xfb\x16\x2b\x18\x9f\xeb\xb3\xdd\x55\xfe\x3a\x90\x3f\x7e\x37\x62\x1c\x6f\xbd\xad\xe8\x9c\xc7\x0a\xd1\xf8\xd0\x71\xd9\xeb\xf2\xaa\x9f\x80\xa7\x4b\x6c\x22\x33\x49\x17\x1e\xf0\x60\x5a\x2b\x93\xb9\x7e\x94\x73\x55\xdf\x74\x17\xf4\x4a\xad\x28\x79\x1a\x9c\x5d\xc0\x1b\xe7\x67\xad\x81\x2c\xdb\x30\xf6\xc5\xf0\xcc\x17\x97\x56\xe9\x6f\xde\x01\x3f\x2e\xcd\xdf\xb4\x2f\xe1\xb7\x8f\x02\xf3\x3b\xaa\xe8\xc7\xa2\x9c\x7e\xa3\x42\x52\xc9\xfa\x81\xc0\x30\xba\x64\x73\xe0\xdd\xb2\xbf\x11\xa4\xf1\xf2\xc4\xdf\x0e\x35\xd1\x85\x8b\x61\xb8\xdb\x60\x19\x75\x2b\xa4\x1f\xfd\xb9\xf4\x7f\x81\x2a\xfe\x0f\xd0\xc0\xf8\xaf\x28\xc0\xe4\xb0\x4b\xe9\x31\xed\x47\x55\xff\xbf\x54\xd1\xb5\x3f\x50\xc3\xff\xb2\xb2\xff\xea\xff\x47\xfb\x43\x97\x52\x1a\xa7\xb4\xff\x6f\x2b\x36\x94\x45\xe9\xf4\xb3\xea\x52\x1d\xd7\xfd\xab\x9c\x1f\xd5\x2d\x97\xf0\xd7\x9a\x42\x2c\xfb\x1f\xaa\x77\x1a\xb7\x6b\xda\xfd\x8e\x1a\x9a\xe5\x5f\xe5\x70\xbf\x50\xc4\x90\xbc\x7f\xd1\x07\x65\xe1\x62\xba\x8e\x1c\x55\x67\x1d\x71\x7b\x1d\x09\xbf\xe9\xcf\x4a\xf4\xfe\xa6\x93\xf7\xdf\xe8\xf4\x63\x3e\xf9\xff\x25\x1a\x79\x14\xe0\x5f\xe4\xf0\xf7\x6f\xe3\xb6\x46\x75\x2c\x10\xfa\x5b\xc6\xee\x9a\x23\x78\x98\x4f\x23\x64\xf7\x0a\xa5\xa3\xee\x9a\x4e\x09\x11\x4c\xe1\x9b\x23\x37\xfc\x9b\xdd\xc7\xf0\xc8\x62\xe7\x3f\xcb\x19\xcc\x33\x8f\xd9\x27\x8d\xcd\x37\x8b\xe8\xc3\xee\x83\x5f\x32\x1c\x84\xde\x0b\x59\x1d\x0b\xd4\x5c\x73\x04\xfb\x2f\xf4\x68\x7f\x43\x3a\xb9\x1c\x42\x3f\xaf\x2f\x1e\x9b\xa3\xff\xf3\x6f\xff\x6a\x5b\xea\xe7\x1c\xaf\x76\x31\x8d\x3f\xec\xd6\xfe\x5e\x71\xef\x5f\xd7\x0f\xf4\x93\x45\xe1\x51\x4a\xe2\x7f\x77\x7d\xfa\x2f\x63\xed\x31\xd4\xe8\xaf\xf3\xbf\xf8\xed\x5f\xfc\xcd\x96\x7e\xf3\x0d\x22\x90\x46\x2c\x8d\xee\xc4\x95\xc6\x1f\x28\xe8\x77\x3b\x24\x90\xc1\x5f\x3f\x7d\xa3\x5f\x9d\x2c\x6e\xc7\x5c\x6c\x85\xec\xb7\x39\xfe\x8f\xf6\x18\x2b\x69\xfc\x69\x4f\x89\x7e\x02\xf4\x07\x13\x08\x00\xc3\xff\x25\x83\xcf\x91\xfb\x2c\x46\xf3\x4a\x22\x73\xfc\xf7\xb1\xfc\xeb\x7d\xc6\x7f\xb9\x8f\xd1\x07\x88\xcd\xd1\x3f\xe5\x8f\xec\x5a\x49\xe1\x37\x0a\xdc\x35\x8f\xc2\xa3\x40\xfe\xd3\xb8\xdc\xde\x9a\x4d\x38\x99\xd6\x31\x41\xff\x6d\xde\x7f\xea\xfa\x5b\x1c\x3a\x93\x38\xeb\xef\xbf\x5d\xcb\xd1\x43\xf2\xae\x6f\x19\xa9\x5b\x1a\x99\xd0\xbf\xeb\xf9\x23\xb7\x58\x03\x7c\xa6\xd2\x38\x55\xc1\x8f\x39\x0b\x80\x1f\x2c\xc2\xf4\x97\xcb\xe8\x97\xdb\xec\x98\xcb\xe0\x7f\xfb\x1f\xb3\xf8\xeb\xfc\x4f\xfd\xff\xcd\x6e\x3f\x72\x1d\xe1\xa0\xea\x98\xc4\xee\x59\x8c\xee\x99\x23\x17\xf0\xfb\x9c\xec\xbf\x7d\xd7\x31\xaf\xde\x1b\xc7\x0f\x5b\xfe\x94\x67\x3e\x69\x24\x42\x39\xaa\x06\x39\x42\x7f\xff\xa2\xe3\x7f\x85\xe2\xb4\xdf\xc7\xf6\x27\x92\x6b\x96\x7f\x47\x72\xda\xb6\x59\x20\xf2\x83\x2e\x32\xbf\xef\xfa\x66\xe4\x7d\x76\xaa\x22\x16\xe3\x14\x04\xc0\x08\x29\xa7\x92\x0c\x06\x64\xba\x31\x82\xfe\xaa\xb5\xa3\xca\xb1\xa6\x71\x5d\xc7\x20\x81\x30\x02\x9a\xdb\x3d\x0a\x65\x7e\x18\x6a\x51\xc2\x2a\x0c\x1d\x81\x11\xdc\xc0\x71\xdd\x8b\x51\x94\x76\x52\xba\x96\x65\x1a\x58\x6d\xa5\x6a\x9f\x3c\x32\x86\xe7\x14\x29\x11\x90\x04\x6b\x34\x47\xae\x56\x40\x11\x54\x1f\x7d\xf2\xfb\x52\xfc\x0a\xc8\x07\x3e\xe1\x38\x7d\xbf\x27\x58\x5b\xa8\x09\x14\x14\xfe\xce\x4f\x6e\x06\xc5\xaa\x33\x51\x76\x54\xf6\xb6\x7e\x70\x0c\x93\xdd\x4d\x77\x97\xcf\xeb\x42\xa9\x0d\xd4\xdf\x64\x96\xbf\xab\x2a\xf0\xeb\x2a\xb8\x0c\xfb\x5b\x2b\x5a\x96\x99\x07\xbc\x32\x30\xbc\x2e\x56\x1d\xde\x90\x0f\x0a\xa2\x02\x71\x1c\xba\xb7\x28\x75\x27\x64\x12\xd5\x4c\xfd\xc2\x37\x97\xb5\x73\x0f\x4e\x4a\x84\x49\xbe\xc8\x2e\x7e\x63\xbd\xdc\x4a\x08\x63\x21\xaa\x53\x1a\xe6\xb7\xa6\x39\xcc\xe5\x0c\x8c\x6c\x37\xca\x69\x04\x23\x71\x57\x71\xb9\x3d\x69\x79\x8a\x0a\x2d\xb9\x1f\xc0\x09\x71\xb5\x14\x2e\x44\xfc\x94\x92\x2f\xd8\xe7\x41\x81\xf2\xf3\xf9\x6a\xbe\x20\xb5\x93\xe5\x7e\xcd\x52\xf6\x8b\xc3\xb6\x3f\x0a\x48\xce\x6d\xc7\x19\x52\xd1\x78\xa6\x3f\x1a\x82\xfb\xc3\x58\x02\x23\x14\x0b\xc1\xb0\x12\x63\xc5\xb6\x6a\xa3\x36\x62\x0f\xe0\x99\x59\x04\x76\x6a\xdd\xb1\x2f\x20\xcf\xef\x16\x30\xa4\x38\x5c\x47\x52\xa3\x5f\x31\x1b\x87\x60\xbd\x60\x06\x27\x7a\x0f\x85\x81\x64\xe5\x93\x5b\x13\xbb\x01\xf3\x4b\x9e\xb1\x6e\x0c\x2b\xb1\x52\x4c\x92\x74\x09\x12\x05\xfe\x16\x05\x72\xfa\xc1\x36\x7e\xf9\xd1\x0d\xcf\xa6\xe6\x75\xe9\x1e\x2a\x74\x06\x44\x2a\xae\xdf\x0e\xdb\xbe\xd7\xc0\x33\xc4\xb4\x1f\xe8\x78\x11\x67\x45\x06\x07\x04\x92\x80\x6e\x4a\x62\x1e\xf9\x9c\xd2\x31\x3f\x5b\xcb\xb8\x2d\xe7\x30\xc6\xa3\x3c\x80\x77\x0c\x40\x75\xc4\xe1\xe9\x53\x66\xb7\xcd\x77\x16\x8e\x1e\x6a\x3d\xd4\xf7\xd3\x31\x90\x19\x65\x56\xbf\x10\x58\xe6\xf8\xc8\x87\xe1\x14\x07\xa2\x9c\xfe\xcc\x77\x14\x7d\xe9\x13\xca\x65\x10\xac\xbf\x7d\x8f\xdc\x28\x9c\xb4\x88\xd8\xfc\x52\xdd\xa5\xb8\x80\xe5\x02\xb6\x8e\xd7\x1c\xb3\x9a\x00\x3c\x09\x7d\xe2\xc3\x03\x30\x59\x25\x3f\x3f\x5e\xb3\x72\x4e\x20\xdd\x0f\xb4\x98\x60\x97\x21\x0f\x15\xf6\x24\xc5\x5c\x07\xe7\x44\x07\xf6\x41\xa8\x05\x35\x47\x18\x0f\xe4\xd3\x3a\x12\x92\x62\x28\x48\x82\x3e\x50\x29\xb9\xe1\x5f\xef\xe1\xb1\x09\xcb\x15\xec\x30\x04\xf0\x7d\x10\x05\xbd\xdb\x2f\xf6\x39\xe0\xbc\xbe\xad\x65\x53\xaf\xfc\x4e\xba\x9a\x88\xbd\x33\xf3\xab\x32\xab\x24\x16\x5e\x53\x24\xa3\x7d\x02\x6b\xcc\x1a\x34\xdf\x7d\x9d\x23\x78\xbe\x7e\x39\x88\xd2\xe8\x94\xe2\x31\x3c\x41\xa0\x1b\x46\x7e\x11\x6f\x8f\xce\x99\x0c\x5f\xfc\x66\x29\x6e\x4c\x63\xb9\x17\x9c\xae\xf2\x65\x02\xc8\xa7\x82\xec\x03\x40\xd3\x2a\x11\x73\x69\xc5\x28\xfb\x1c\xb1\xb9\x1a\xd2\xbd\xac\xa7\x01\xba\xb2\x45\x09\x03\x3f\x59\xe0\xb8\x82\xc3\xfc\x6c\x17\x5b\x08\x2a\xc3\xd2\x85\x3b\x17\x25\xa0\x19\x61\xf6\xdd\x90\xbd\x3c\x00\x49\x74\x8b\x5a\xf2\x4e\x43\xe7\x94\xfd\xb4\x5f\xc0\x84\x3e\xc8\x70\x4a\x7c\x2e\xd1\x0d\x60\xf0\xdf\x9a\x88\xe0\x0f\x18\xdb\x80\xb5\x50\x04\x49\x67\x5d\x5f\x0d\xef\x27\x7b\xa9\x5f\x76\x10\x14\x19\x12\x56\x86\xf1\x39\x10\x3c\x14\x12\x18\xca\xf3\xb4\x38\xc3\xe3\x47\xba\x8c\xc4\x35\xcb\xeb\x13\xbf\x23\xf5\xde\x2b\x0b\x0e\x66\x9c\x6d\x2a\xa8\x96\xac\x79\x25\x12\x1a\xda\x65\xf0\xc5\x32\x9a\xc6\xab\xb2\x42\x60\x97\xfe\x15\x7b\x2e\xc7\xe2\xac\xe5\x30\xc2\x05\x60\x98\x53\x62\xa1\xf1\x99\xd1\xcf\x3b\x9f\x00\x55\x48\xbb\x9a\x56\x71\xfb\x0d\x9a\x01\x8b\x71\x80\x8a\xb3\x20\xa0\x14\xf1\x2e\x02\x43\x22\x2d\x72\xe3\xbb\x0b\x50\x81\x1a\xa0\xde\xa7\x32\x77\xcf\xfe\xd3\x0c\x4e\x53\x39\xfe\xc0\xb0\x86\x3d\xd9\xb6\x0b\xf6\xd0\xd4\x87\xf0\x01\x17\x34\x5d\x1d\x5e\x60\x35\xfc\x37\x95\xdc\xda\xee\x89\xc3\x21\x3f\xd8\x67\xf0\x83\xd7\x67\xbe\xbc\x8c\x0b\x8a\x98\x98\xfe\x9b\x41\x24\x4f\x52\xd5\x26\x52\x2f\x78\x8f\x18\x4d\xfb\xd2\x3c\xae\x07\x37\xed\x50\xf8\xbb\xe2\x4e\x23\x3b\xce\xc0\x98\x26\x8b\xd6\x5c\x92\x22\x68\x1e\xee\x3a\x05\x71\x66\xad\x3f\xcd\x06\x08\x69\xeb\x55\x4c\x48\x94\x5f\x63\x82\x7a\x3c\x1f\xf0\xec\xa8\x64\xe0\x8a\xda\x33\x01\xac\x93\x7f\xdf\x57\xb8\xeb\xf2\x94\xd9\xd6\xb2\x82\x12\x72\x44\xf1\x97\xf2\x8c\x8f\x78\x01\xc3\x15\x2a\xbd\x40\xe7\x29\xb9\x00\x89\x3d\xd4\xdc\x7e\x0e\xf2\xd3\x51\xa7\x4e\x20\x8a\xdb\xca\x71\xea\x82\x1b\x12\xda\xbe\x27\xef\x30\x3f\xf5\x2d\xd9\xe6\x72\xcb\xa4\x63\xf4\xd9\x18\x2c\x61\x60\xa4\x94\x5d\xb9\xfa\x9c\x60\x0a\xce\xf1\x09\x2e\xf9\x45\x7c\x32\xff\x2f\xbe\xa2\x18\x83\xa0\x32\x9c\xcf\x9b\xed\x4e\x21\x05\x7d\x00\x64\xb3\x76\x45\x75\x90\xc8\xb0\x1e\xb9\xa9\x40\x26\x5f\xf9\x82\x66\x53\xd6\xa5\xb7\x6e\xb1\xe6\x01\xbc\x8f\x1c\x4f\x49\x4a\xc4\x93\x95\x5c\xd3\x31\xd0\x3a\x0d\x27\xa7\x6b\x9a\x5f\xb1\xf6\x10\x28\xfb\x0e\xc4\xa7\x86\x80\xd7\xad\x69\x7e\xa1\xb4\xcb\x70\x39\x6e\x66\x3f\x07\x5a\x22\xd7\xea\xb5\x41\x7d\x7c\xbc\x17\x27\xdf\x5e\x14\x4b\xd2\x73\xfe\x4c\x15\x2b\x03\x31\xad\xc6\x78\x81\xfd\xf9\x1c\xb2\x7d\xd6\x2c\x47\x57\xa9\x2c\x9f\x3b\xbe\xe8\xfa\x46\xdb\x0f\x07\x32\x9a\xa6\x8b\x06\x3b\xc2\xb4\x93\x31\xd1\x0c\x87\xeb\x58\xfa\xf6\x4e\x71\x17\x55\x6c\xde\x09\xdf\xeb\x92\xe5\x92\x54\xcd\x9f\x42\xbf\x33\xb6\xe0\x0e\x8e\x62\xce\xc8\x1f\x2c\x12\x7a\x1e\x0b\xef\x27\x71\xc1\x65\xfa\x2d\xd0\x28\x11\x0f\xd2\x74\x35\xde\xe2\x83\xa5\xdc\x9b\xa4\x33\x38\x37\x93\x9e\xa1\xa2\x6a\x84\x05\x32\x8a\xa8\x23\x1d\x44\x7b\xcf\x8b\x20\x29\xcc\x23\xfd\xaf\x39\x4d\x68\x5a\x85\xe1\x12\x76\x5b\xbf\x13\x4a\x86\xdf\x28\x12\x2f\x04\xc3\x4e\x1c\x1e\xf1\xf1\x51\xd1\x1c\x1e\xbe\xb2\x92\x5d\x46\xf3\x7e\x98\x4d\x8c\x82\x31\xdc\xdb\x28\x37\xbf\xcb\xaa\x79\x4f\x41\xe7\xac\xbf\xf3\x71\x88\x46\x4e\x1f\x26\x43\x20\x5f\x77\x53\xde\x56\x53\xba\xb7\xeb\x96\x88\xae\x26\x50\x13\x7f\xac\x54\x94\x89\xc7\x23\xda\xed\x63\xb1\xde\x03\x98\x1b\xf0\x9c\x3c\xd3\x98\x71\x8c\x48\x9d\x78\xbc\x9b\xe9\x3e\xfd\xfe\xe5\x85\x51\xad\x6e\x7d\x95\x68\x9b\x7a\x28\x0d\x9d\x65\xe8\x2e\xbe\xb1\xee\xab\xfe\x50\x9f\x5b\x27\x62\xf1\x2f\xb7\x72\xc5\xcb\xaf\xb8\x50\xfb\xb2\x70\x19\xc6\x97\x73\x70\x41\xfd\x5c\xf4\x39\xd5\xf1\x67\x07\x82\x50\xac\xcd\xd2\x3d\xa3\x36\x51\xce\x90\xa7\xf4\x64\x43\x89\x30\x52\x8f\x18\x85\xbb\xaa\xef\x33\x82\x73\xfd\xa7\x7d\xc7\x05\x80\x6d\x5a\x47\xb6\x38\x77\xfc\xfb\xe3\x5e\x31\x6c\xf5\x6e\x20\x2e\xd1\xfa\x5c\x46\x0d\x93\xf4\xc7\xb3\xdd\xcd\xac\x6b\xbb\xeb\x38\xdc\x8d\xde\xd6\xab\xe8\xd6\xf8\x15\xef\x2c\xcb\xfd\x88\x77\xc6\xd5\x4b\x73\xb6\xeb\xe2\xde\xe7\x3c\xec\x08\xf0\xcc\x3c\x84\x6e\x21\x27\xd5\x48\x6f\x87\x05\x6a\x2c\x90\x24\x49\x63\x6b\x93\x4f\x11\xd6\xde\xdc\xee\xdc\xa7\x7e\x70\x47\x8a\xfa\x34\x01\xc3\xfe\xd9\x07\x8c\x7d\x65\x9a\x41\x85\x43\x54\x21\xda\x42\xab\x83\x4f\xb3\xa8\x06\x3d\x40\x7f\x70\xdc\x48\x65\x3a\x18\xbf\x9d\xc2\x28\xbf\x37\xcd\x17\x70\x86\x99\xd5\x5b\x0f\x46\x8c\x4e\xa9\x48\xa2\x96\x24\x1e\x47\xda\x8d\xd8\x84\xd8\x09\x6e\x39\x94\x1e\x28\xb5\x14\xa8\x4f\xaf\xd7\xb0\x00\x8c\xa7\xb1\x9c\xc3\x30\x11\x86\x5b\x03\xc9\x0b\x91\x1a\xc8\x8e\x1a\x93\xa4\xc7\x86\xcf\x23\xe4\x78\x97\x43\x0f\x11\x95\xc7\x52\xb9\x8a\xfd\x13\xb4\xcf\x4a\xc1\x28\x82\xa0\x03\x6f\x1c\x6b\x93\xd0\x43\xb7\x66\xff\x48\x76\x76\x2a\x3b\x8c\x7a\xd5\xa8\xe3\xd1\x30\x59\x75\x39\x40\xa6\xc5\xac\x14\xd6\x2b\xdf\x99\xf4\x78\xdb\x7b\x98\x75\xfd\x3a\x37\xc5\x89\x6e\x8c\x94\x12\x75\xef\xeb\xe8\x10\x12\xa8\x64\x91\x70\x38\xbc\xb0\xd3\x0c\x68\xf0\x97\xdf\x04\x74\xf3\x5a\x66\x5f\x51\x9b\x29\x9f\xe8\x7c\xd3\xb0\x10\xbf\xcb\xb2\xfd\x72\xd3\x8e\xe1\x3a\x2f\x69\x98\xb4\x5d\x96\xf9\x80\x4b\x7a\xe5\x1f\x0c\x3c\x50\x5d\x5f\xc5\xed\x3d\xec\x94\xbd\x69\xe5\x99\x3d\x53\xb4\x14\x37\x35\x10\x19\x07\x4c\x3f\x88\xdc\x8b\x79\xb7\x98\x1d\x0c\xec\x76\x4c\xd6\xe3\x62\xa5\xed\xa2\xe9\x05\x1d\xe1\x32\x15\xfa\x35\xe6\x5d\x5c\x48\xd3\xb0\x41\x0a\x88\xc9\x37\xda\x37\x10\x16\xfe\x92\xb7\x0c\x4e\x68\x98\x69\x16\x9f\xb3\x2c\x53\x9f\x20\x4a\x24\x67\x37\xa4\x40\x59\xc2\x37\xad\x86\xed\xb5\x2f\x62\xcf\x7e\xae\x63\xc9\x47\x93\x08\xb7\x8c\xd9\x16\x00\x83\xb3\x27\x02\x97\x1d\x8b\x4d\x6e\x52\xbf\xcb\xea\xb3\x51\xa4\xa6\x7a\xd7\x99\x6a\xae\x6f\xca\xd0\x0a\x8e\xe4\xf4\x4c\x95\x1a\xfb\x00\xdb\x60\xcf\x36\x90\xe6\xe9\x6c\x38\x31\xf4\xa7\x6f\xfb\x94\xfb\x23\xdf\x53\x66\x98\x7c\xe7\x15\x26\x0a\x32\xf4\x61\x3a\x13\xb8\x87\x66\x64\x1c\xb8\x23\xb2\x03\x7c\xb9\x67\x07\xeb\x6a\xad\xcf\xe7\x53\xa8\x74\x2b\x87\x6a\x21\x97\x3e\x3c\x3e\x41\x12\x59\xd9\xf4\x61\x37\x89\x91\x36\x3e\x89\x2e\xe1\xa5\x2e\xab\xf5\x2c\xba\x42\xb3\xaa\xda\x5b\x95\x24\xc1\xe2\x2d\x8a\x22\xf1\xf1\xe2\xb0\x82\x39\x85\x2c\xf5\x4f\xbf\x4a\xdd\x80\xe1\x0c\x45\x8e\x09\xc2\xcb\xf3\x77\xd8\xa5\x05\xae\x7a\xb7\x25\xf6\x38\x4d\xc4\xbb\x5e\x11\x6c\xe5\xf1\xa4\x9f\x5b\xec\xca\xc7\x30\x50\x49\x55\x06\xa7\x49\x35\xae\x0f\x29\xa9\xfd\xee\xec\xd1\x7c\x5a\x9c\xae\x09\x85\x78\xb9\x48\x0d\x3a\xc2\xf9\xee\x37\x41\xd3\xfc\x1e\x4f\x65\x1e\xd6\x7f\x81\x0f\xcc\x46\x4d\x0a\x23\x63\x59\x97\x1d\x31\x3c\x53\x80\x65\xc9\xe6\x8b\xe0\xc0\x40\x27\x4b\x7d\x12\x43\x25\x2e\xb2\x8c\x03\x74\x98\xaa\x7e\x84\x4a\x40\x3d\xe1\x6c\x1f\x56\x49\x71\x81\x5f\x13\xaa\x84\xd8\xff\xc8\x78\x5b\xb7\x3a\x73\x23\x64\x7e\x3e\xdc\x71\xbd\x63\x8f\xec\x19\x45\x8b\x13\x55\x87\x02\xf5\x27\xd6\x5c\x27\x86\xd5\x38\x79\x23\xe9\x01\xa3\xd2\x15\xc1\x13\xa0\xe4\xd0\x87\x9e\x31\x63\xf2\xe3\x87\xa8\xe8\x49\xda\x33\x71\x81\x37\x03\x0f\x2b\xe9\xcb\x91\x94\x75\x17\x7a\xed\x28\x2e\x6f\x6e\x96\x12\xf5\x9b\x4c\xb5\x6b\x52\xaf\x62\xd2\x6e\x29\xb8\x48\x76\xc8\xd2\x0f\x64\x8d\xe8\x8c\xa6\x59\xf2\x90\x0f\xf4\x4e\xfa\x1f\x83\x73\xf4\x4b\x50\x19\xbe\x57\xe4\x1a\xa8\xeb\x42\x8c\xf7\x37\xa4\xf4\x98\x73\x8c\x59\xfc\x72\x2c\x05\x2b\x8f\x28\xc3\xd6\xc5\xa6\x12\xdd\x10\x3b\xf9\xa5\x50\x5b\xbf\x88\xa0\x5c\x83\x1b\xa4\x58\x29\xbb\xd9\xd4\xad\x2e\xa8\x74\x12\x33\x70\x3a\xee\x74\x83\x94\x60\x69\x09\x34\xd8\xfa\x04\xc7\xdd\x85\x6f\x88\x4e\x86\x99\x6f\xc7\x00\xf6\xb0\x5f\xb9\x61\xb0\x8d\x1f\xb8\xa9\x44\x1b\x65\x46\xc1\x6c\x1e\xb0\x94\xa8\x26\x4a\xf9\x91\x13\x7b\x06\x16\xbf\xba\x0a\x23\x7a\x27\x62\x1f\xcd\x09\xc3\x04\x84\x28\xb2\x3e\xd0\xe2\x88\x0f\x53\xfa\xce\xa1\xbc\xae\x21\x1f\x1f\x32\xb0\x4e\xc9\x07\xda\xe9\xb9\x56\x73\xbc\x0d\xc2\xc8\xc9\xb8\x44\xc3\x10\xf2\x02\xe0\x3d\xc6\x44\x10\x53\x50\x69\xcc\xa3\xfe\x57\x90\x5a\xce\xc2\x38\x23\x73\x5d\x27\x48\x54\x05\xaa\x9b\x2f\x4e\xe8\x0a\xd9\xd0\xd6\x7c\xa2\xc3\xd0\x9c\xee\x2e\xca\x84\xb4\xc1\x13\xde\x68\xe2\x17\x1f\xee\x81\x5a\xfb\x43\xdf\xab\x23\x29\x81\x27\xcb\x6b\x37\x62\x9e\xd4\x15\xb7\x1d\x3c\xd2\xe9\xb9\x88\x32\x41\xd5\x87\x67\xbf\xbc\x12\xf5\x24\x0b\x90\xc9\xd7\x0f\xce\x0f\xc0\x05\x35\x8a\xee\xd7\x54\x1a\xdb\xb4\xd4\x7f\xe1\x3e\xe2\x8f\xba\x1b\xc0\x2f\xac\x66\x07\x1a\x4a\x38\x59\x5b\xb3\xdd\x3d\xdf\xcf\xbb\xf8\x8a\x26\x33\x3e\xbc\xc4\xa9\x9e\x28\x4e\xed\xba\xa0\xa8\x08\x1b\xde\xf8\xca\xe4\xa9\x97\x20\xa9\x17\xab\xe9\xce\xca\xb7\x6d\x82\xe8\xfc\x90\xca\x47\x5e\x7e\xeb\x4d\xc3\xc0\xc2\x16\xe8\xf9\x45\xe8\x37\xf3\x0e\xba\x15\x7e\xe5\xfe\x98\x53\x1a\x26\xef\xec\x0d\x45\xd7\x35\xb3\x71\x9f\xf6\x6b\x80\x0b\x3e\x36\x48\x93\x77\x15\x84\x4b\xda\xeb\xb4\x04\x8d\x61\x18\x21\x33\x4c\xbb\x9a\xee\xd9\x0a\xd0\x8e\xc2\xa5\xf3\x75\x0c\x23\xe6\x2a\x5e\x21\x5e\xab\xe4\x99\x00\xa2\x89\x89\x1e\xf7\x45\x61\x33\xc0\x61\xb3\x4e\x2a\x33\xbc\x81\x9a\x26\x9f\x2c\x8a\xf1\x05\x4a\x4c\x82\x29\x7f\xf1\x1c\x8e\xd7\xb9\xa0\x61\xfc\x59\x63\x7d\xf2\xb3\xef\x93\xcd\xc9\x25\x0c\x5e\xaa\xbf\xd7\xca\x35\x1d\xce\xe7\x13\x8c\x6e\x94\x2e\xc1\x85\x7d\x2b\xe6\x3d\xf5\x77\xba\xdc\xc3\xe6\x40\xd7\xbe\x19\x76\xb5\xbf\x97\xd2\xf7\x05\x8a\x80\xc5\x35\xb6\xd9\x11\x69\x9f\x1d\x11\xd1\x08\xa5\x3f\x14\x3a\xda\xb1\x4c\xe2\x71\x91\x85\x7b\x66\xfc\x91\x14\x94\x94\x17\x58\xae\x60\x54\x11\xad\xd5\x63\x8e\xe1\xe9\x47\xec\x88\x67\x4a\x5b\x33\xc8\xfa\x2c\xfe\x9a\xe8\xe7\xf9\x02\x27\x3f\xe3\x00\x04\xc4\xb3\x79\x89\xab\x73\x02\x10\xe8\x98\x39\xe6\x02\xd8\x4d\x84\x20\x26\xf6\x89\xa4\xed\x1f\x84\x4e\x60\x37\x91\xba\x00\x4f\x69\xb0\xfa\xe6\x02\xbd\xdc\xa6\x97\xfc\x72\x23\x29\x48\x19\xa6\x65\xe2\xde\x9a\xf3\x7d\xbb\x8b\x32\x88\x9a\x53\x52\x54\x67\xf9\x06\xb7\xa7\xf2\xf7\x24\x96\x84\x5c\x44\x2e\xcb\xce\xeb\x44\x7d\x34\x6e\x56\xbf\xc6\x51\x4f\x25\x62\xb6\x85\x89\x08\xd6\xcc\xf6\x73\x1a\xc3\xc4\xd4\x58\x12\x2b\xb2\x57\x29\x1d\x73\xfa\x05\x81\x03\x02\x62\xdb\x3e\xcf\xb3\x28\xd0\xef\x3b\x60\x2c\xa1\x3b\x7f\x0c\x51\xaf\x38\xd6\xc5\x36\x9c\xc4\xf7\x04\x04\x01\x3f\xd2\x2b\xb0\x82\xec\xb1\xcd\x2c\x00\x4e\x7a\x3b\x4f\xbb\xf7\x36\x5c\x10\xe2\x44\x37\x8c\xf0\xfa\x12\xe9\x4e\xb3\x63\x06\x9d\x66\x05\x23\x1b\xed\xd6\x05\xe1\xeb\x6a\x75\x71\xd9\x2e\x70\x13\x2a\x85\xa7\x85\x00\x19\x8b\x69\x26\xf0\x82\xe9\xb0\x1b\x83\xf8\x7a\x95\x00\x25\xee\x19\x8d\xfb\xb9\xdf\x52\x69\xac\xa9\xbd\x32\xda\x16\xf4\x8b\x6f\xe7\x8e\xfb\x94\x8d\x7f\x8d\x4c\x51\xd7\x32\x2a\x23\x0b\x8c\x8e\x06\x92\xd4\x5d\x1b\x4f\xbe\xa6\xb7\xc8\xb0\xde\x42\x53\x87\x60\x22\x65\x44\x3d\xfa\xf6\x82\x04\x6f\xb6\xa2\x0b\x90\x86\x57\x9e\x23\xc0\x15\x5e\x04\xe9\x3f\x93\x74\x7b\x76\x65\xcd\x01\xe2\x5e\x25\x29\xf6\x28\x88\x1e\x17\x30\x1f\x07\x45\xcc\xcd\xaf\x04\x3c\x74\x10\x6f\x71\x05\x2f\xbe\x2f\x05\x2e\xa0\xdc\xe2\x7e\x15\xfa\x2b\x78\xd7\xdd\x17\xec\x4f\x77\x87\x90\xca\x58\x23\x80\x8f\xf1\x49\xab\xaf\xd6\xb9\xcc\x7d\xc5\xc3\x35\x27\x55\x01\x18\x70\x82\x1e\xc5\xf4\x48\x65\x0f\x2a\x68\x4b\xdf\x40\x8b\xbb\x53\xba\x28\x6a\x59\x8c\x20\x74\xcb\xda\x3f\xf9\xd6\x23\x39\x9c\xe5\x19\x0c\x56\x95\xf1\x6e\x21\x77\x98\x16\xe1\x98\x96\x75\xcb\x4a\x94\xc3\xbd\xdc\xa9\x23\x12\x55\x05\x4e\xc6\xf6\x78\xfd\x91\x88\x1d\x26\x57\x04\xbd\x81\x9d\xde\x57\x3c\xdd\xf2\x8f\xcc\xca\x2c\x92\x3f\x2e\x06\x13\x13\x5e\xd9\x5f\x5e\x16\xdd\x32\xbf\x2e\x81\xfb\x66\xd4\x11\xd9\xe4\x0b\x24\x37\x08\xbc\x0c\x2c\xcb\x92\x00\xa8\xd2\x0d\x89\x16\x34\xfc\xaa\x33\x27\xd6\x0e\xac\xc1\x51\x32\x1a\x83\xd6\xd2\x7f\x4b\xd9\x25\x6e\x2e\xa8\x9c\x54\xee\xc6\x67\xcc\x31\xab\x8e\xa2\x3e\xca\xb9\xdd\x89\xaa\xa9\xde\x88\xac\xf2\x85\xb1\xd9\xf4\x33\x27\xa6\xfd\xfb\xe5\x34\x45\x41\xda\x6c\x12\x33\x6b\x89\x4c\xe7\x43\x96\x20\x4c\x11\xfa\x4c\xf6\x5b\x4a\x52\xd0\x27\x3b\xe9\x5f\x83\xe5\x38\x9f\x93\x3c\x98\xe1\xdf\x97\xc8\x0a\x3b\x3b\x7b\x74\x41\xab\xe0\x25\x6e\x10\xba\x5a\xea\x8e\x2e\xd0\xa6\x4c\x57\x29\x4f\x3b\x87\xb2\xb2\x2d\xdd\x93\x3a\x6d\x7d\xe5\x77\xc2\x19\xe9\x1d\x84\x38\xa9\x8f\xe6\x34\xb9\x67\x92\x45\x34\x68\x7c\x94\x4b\x26\x0e\xd2\x22\xcb\x03\x71\x09\xd3\xfd\xe2\x18\x68\xaa\x7a\x08\xe1\x4b\x38\x03\xda\xaf\x7a\x63\x24\xfe\x23\x2c\x6c\x65\x91\xd9\xee\xc7\x39\x39\x83\x4d\x88\xc4\x7e\x8a\x5e\xd4\x87\x68\x2e\x14\x46\x89\x7d\xd0\x3e\x25\x93\x7b\xfb\x23\x4d\x32\x16\x31\xde\x91\xf8\x92\x6d\xd8\xb9\x9e\x48\xd1\xda\x46\xfa\xb4\x42\xce\x0f\x7e\x97\xca\x2d\x21\xf5\xf2\xba\x20\xf6\x68\xba\xc1\x5c\x4b\x67\xf7\xe0\x9b\xa1\x6d\xdf\x39\xf8\x23\xe1\xfa\x0c\x7e\x79\x8f\xce\xbc\x46\x66\x12\xe4\x87\xf8\xd0\xd5\xa7\x83\xc9\x0a\x6f\xf2\x0a\xc9\xbf\xfa\x27\xb6\xd4\xf6\x95\x87\x14\x68\x4e\xfe\xdd\xe0\xe7\x62\xec\x91\xfc\xe6\x4b\xac\x41\x6e\xf8\x5d\x0c\xe6\x83\x44\xcd\xd2\xaa\x51\xe2\x4b\x89\x69\x19\x8a\x3f\xce\xd2\x45\xe5\x03\x5e\xd5\xa3\x52\xe4\x3d\x73\xdc\x60\xfd\x85\xdb\x16\xa2\xcf\x48\x9f\xbb\x19\x4f\x61\x24\xf5\xc3\x3d\xf9\x33\x37\x01\xea\xc8\xc0\xcb\xc5\x9c\x07\x1d\x9b\xe4\x85\x5a\xbd\x0f\x4d\xb4\x46\x1c\xfb\x64\xd0\x48\x6a\xd3\xf7\xe6\xa5\xef\x83\x1b\xdd\x7b\x69\xda\x74\x38\x0b\xf2\x75\x22\x15\xa3\x3f\x13\x22\xd1\xb6\x56\x7a\xe2\xd7\x57\x0d\x12\x84\x58\x8b\x7b\x6c\x20\xb1\x80\x63\x0e\x51\x45\x47\xdf\x36\x80\x6b\x9a\xb4\xd2\x42\x21\xea\x57\x74\x7e\xf7\x65\x16\xe3\xa4\x8c\x46\xde\x91\x78\xd3\x83\x44\x56\x07\x04\xac\xd0\x01\x09\xa8\x2d\xc6\xfe\xb6\x68\x7c\x91\x8a\x0e\x5b\xf4\x4f\xde\x03\x9e\x3c\x7f\xa0\x9c\xfa\x1e\x55\x65\xf6\x8b\x6f\x11\x70\x21\x81\x17\x3f\x84\x60\x72\x4e\xa5\x91\x4d\x52\x30\xd9\x85\x41\x12\xa0\xf5\xa6\x7b\xd5\x8a\xf5\xaa\xc2\x69\x55\x1d\xe3\xab\x8e\x11\xdc\xff\x5a\x6b\xe9\xb1\x2e\xe0\x25\xee\xcb\xfa\xe1\x86\x19\x7b\xff\x10\xd4\xb6\x3a\x71\x09\xe1\x9e\x2d\x86\x04\x97\xd2\xd1\x4b\x4c\x2c\x3f\x9b\xde\x0b\x80\xcd\xc0\x33\x3e\x5d\xf2\x75\x30\xdc\x4c\x94\xb8\x49\x44\xb6\x57\x9e\x20\x00\x53\x64\x6d\x13\x73\x4c\x2b\x4d\x63\x72\x88\x2c\x54\x66\x30\x01\x80\xfa\xab\x14\xf1\xf9\x16\x61\x58\xc2\x6b\xde\x7f\xac\xf5\xfa\x65\xdf\x5b\x80\x1a\xe5\x46\x4b\xf4\x8c\xfd\xed\xc5\xf2\x0c\xa1\x6b\xae\x91\xd1\x72\x79\x25\x44\xf9\x52\xbe\x50\xd3\xde\xb6\x6d\x1f\x65\x11\xb9\x07\x12\x9a\x4f\x36\xd3\x96\x32\xad\xd8\x9a\x3a\x09\xef\x1f\x8b\xac\x69\xdb\x81\xc9\x36\xc1\x42\x91\xf4\xc2\x85\xde\x83\x8b\xb4\x4c\x70\x01\x54\x14\xd6\xde\x5e\x30\xc6\x04\x06\xd0\x3a\xcb\x40\xc4\x47\x1e\x91\x40\x14\x55\x44\xf8\x83\xa3\xc2\xad\xad\x6c\xac\xcc\xf0\x20\x79\x94\x50\x25\x1f\xe4\x7a\xf2\x01\xf1\x89\xa8\xa6\x79\x27\x92\x02\x99\x8d\x77\x9c\xd3\xbf\xed\x94\xe3\xaf\xdd\xaf\xbc\xa5\xa3\xb8\x85\x13\xe4\x8c\xe7\x38\xbe\x84\x69\x77\x71\x9d\x42\x8e\xc1\x18\x39\x47\xb2\xc9\x66\x41\x1a\x00\xb2\x3c\x33\x73\x5f\xf4\x71\x7d\x52\x33\x8e\xcf\x39\xae\x2b\xe4\x03\xff\x5a\x13\xf1\x19\xfe\x72\x1e\xa7\x19\xe9\xea\x8b\x64\xc7\x06\xeb\x32\xb9\xed\x1f\x0d\x3f\x04\x47\x83\xf0\x04\xba\x3a\xaa\x5e\x3a\x56\x00\x11\x8a\xb2\x03\x12\x29\xa8\x23\x5c\x7a\x6c\x51\x7c\x21\x62\x3a\xac\xc1\xd4\xe2\x59\x93\xd0\x06\x2f\xfd\xa1\x6a\xee\x5b\x23\x81\xf3\xf5\x39\x13\xcd\x77\x82\x4a\x67\x77\x00\x54\x5f\x3e\x4f\x90\xee\x43\xa3\xf4\x00\xe0\x4f\xdc\xc8\x2f\x0a\x20\x2f\x1a\xa0\x7a\x70\x86\xed\xf3\x2b\x8e\x97\x15\xe4\x74\xde\x01\xeb\xe6\x43\x4a\x80\xba\x78\xcd\xf7\x3c\x87\xd2\x5a\xb8\xbc\x7d\xd8\x7c\xdc\x10\x9b\xd7\x78\x20\x49\x6a\xa7\x36\x65\x62\xb9\xc6\x2e\xb4\x10\x4b\xe4\xc2\xa4\x9a\x18\xe0\x93\x9d\x67\x25\x16\x2c\x6b\xf7\x80\x1c\x03\xbc\xc5\x30\x5c\xd0\x2f\x81\x2d\x91\xbd\xe1\x44\x63\x58\xf6\xe7\x05\xc0\x0a\xa0\x4f\x64\xc6\x8b\x2d\x0a\x91\x97\xa2\x4e\xef\xfb\xfb\x7a\x06\xdb\x31\x1f\x2c\x6c\x2c\x10\x7f\xd2\x70\xe6\x2d\x78\xab\xf8\x06\xca\xe8\x94\x34\xa4\x30\xbf\x54\x21\x81\xe8\xe7\x60\xea\xf6\x0d\xbd\x27\xb1\xef\xdc\x88\x32\x13\xd0\x72\x62\xfc\x1e\xe5\x25\xf3\xc2\xb1\x65\x1b\xd2\x0d\xea\x28\x0e\x55\x79\x94\xec\xb2\x7d\x55\x72\xe4\x69\xcf\xb0\xb5\x22\x7e\xc5\x13\x3d\xbe\xda\xf2\x11\xf4\xec\xa2\x00\xcb\xfc\x60\x38\x6b\xd9\x7e\x18\xc6\x24\x76\xfc\x5a\xab\xd8\x9a\x1e\xcb\x9b\x0f\x86\xf3\x20\x48\xfa\x11\x7d\x90\x79\x25\xa6\x0b\x4e\x90\x8c\x6b\x0f\x8f\x7b\xd0\x25\xd4\x38\xb5\xbf\x63\x41\xf2\x12\x00\x12\x76\x26\xb0\xe5\x1b\x5f\x1c\x0e\xe6\x73\xdf\x38\x9f\x00\x14\x68\x19\x10\x92\xc3\xcc\xaa\xbb\xa2\x9c\xd0\x1c\xda\xfd\x18\x95\x3f\x93\x41\x97\x05\x9d\x51\x85\x93\xe5\xbe\xf8\xc7\x7a\x2c\x2f\xb0\xe8\xd5\x33\x3a\x71\xd7\x31\x79\x4e\x9f\x0f\x48\x1d\xf3\x8b\xa0\xaa\xfd\x1a\xf1\xca\x61\x45\x25\x7f\x86\x61\x6d\x58\x13\xd0\x62\x1d\x19\x3b\x15\xfd\xd0\x1a\x3a\xb9\xbc\x6f\x9f\x82\x87\xc9\x10\xde\x98\x2f\xc7\x50\xcd\x2d\x5b\x96\x2d\x60\x36\xa7\x45\x71\x35\xde\xbd\x28\x4f\x70\x79\x20\x69\x58\xca\xfe\xb0\x4b\x25\x08\xec\x46\xc9\x8e\x11\xdc\xfd\x8a\xf7\x66\x68\x03\x3e\x63\x2b\x66\xad\x41\xfc\x75\xaa\x63\xca\x7d\x6a\xf9\xa4\x27\x80\x17\xba\xf7\x6d\x98\xfa\x2b\x91\xdd\x37\x0d\x83\x90\x3e\x3e\x15\x39\x6b\x21\x14\x08\xc1\x10\x31\x1b\xe6\xe1\x51\xdf\x17\x48\x34\x53\x0e\x16\xdf\xea\x33\x08\x17\x0e\x95\x50\x9d\x99\x12\x02\x20\x57\x63\xd5\x35\xb8\x49\x12\x75\x07\xa9\xb6\x5a\xbe\x51\xb8\x3f\xb9\xa7\xac\x70\x8e\xba\xd2\x8e\x48\xbd\x18\x0d\x82\xb6\xc4\x36\x85\x38\xe2\xb1\x3d\xcd\x13\x3f\x8a\x0f\x97\x7c\xc9\xa9\x8e\x51\x69\x41\xb5\xad\x38\x2f\xbe\xfb\xc0\x44\x5f\xf7\xe3\xbd\x81\x9f\x8f\xca\xcd\x83\xb7\xad\x9f\x8f\xa6\x3d\x46\xf7\x45\x44\x5e\xcc\xf4\xea\xc5\xd8\x3b\x8b\xc6\x23\x8d\xdf\x15\x04\xc5\xfd\x7d\x45\x3a\x29\xbe\x32\x77\x11\xd5\x34\x87\xe0\xfc\x21\x4d\x27\xff\x03\x53\xe7\x5c\xe5\x8c\xad\xcc\xf8\xe0\xdb\xcb\x58\x01\xd9\x35\x50\x5b\xcf\x39\xbf\xf1\x97\x66\xca\xdd\xcf\x42\xeb\xf8\xb6\x0f\x29\x1a\x6f\x21\xa4\x1f\xf5\xcb\xe1\x0a\x4a\x64\xe1\x59\x8e\x40\x8d\xe4\x02\x50\x8a\x61\xe2\xb2\x2b\x5e\x6f\x49\xd8\x10\xa9\x9b\x5c\x1a\xc8\xe8\xeb\xf1\xe5\xbd\x73\x92\xfb\xcf\xd0\xc6\x08\x51\x46\x31\x6a\x9b\xc5\xf9\x15\xc1\xe0\x4f\x7e\x38\x0c\x57\xb3\x3a\xfa\xf5\x91\xaa\xfa\x53\xae\x08\x4a\xab\xf5\x48\x21\x1b\xf8\xb4\x5e\x96\xcf\x0f\x75\xef\x3a\xfa\xe6\xa5\x38\x83\x97\x10\x5c\x8f\xd8\x07\x27\x73\x60\x6a\x2f\x31\xc2\xf4\x68\x4e\xb2\x73\xa6\x74\x99\xb2\x40\x58\xee\x52\x4a\xd6\x1e\xed\xb1\xbb\x54\xb2\x3f\x83\x04\xfe\x82\x35\x51\x93\xcb\xd6\x09\xbf\x70\x2e\xde\xb8\x9e\xd9\x84\xd4\x6b\x97\x20\xa0\xc0\x8a\x4b\xd7\x65\x5a\xc7\x70\x4e\xba\x92\x7b\xda\xc5\xc7\x22\xc6\xf9\x06\xe6\x8a\x9c\x1d\xe5\xa2\x81\x90\x5b\x3a\x4c\x28\xb8\x93\x2f\xf8\x31\x0d\xa2\xeb\xe6\xcc\x5b\x53\xa7\x0d\x0b\x6e\xaa\x47\x34\xcc\x14\x44\xd6\x09\x71\x3c\xb6\xe7\xb7\xfb\x5a\xe3\x0a\xd7\xf6\x4c\xb3\x75\x6d\x6f\x2b\x40\xbe\xd8\x3b\x6d\xfe\xf3\xbb\x7b\xed\x23\xab\x58\x43\xdf\x18\x35\x8d\x52\xb4\xd5\x8f\x53\x7f\x5e\x1f\x73\x1a\x51\x7b\xf3\xd5\x1c\x60\xa7\x67\x41\xa9\xb0\xae\xaf\xa4\x83\xd0\x15\xb9\x9e\x36\xf3\x4b\x50\x50\xb8\x8b\xfb\xff\xe8\x3a\x8b\x3d\x56\x99\xa6\xdb\x5f\x10\x03\xdc\x86\x8d\x13\xdc\x65\x86\x5b\x82\xfb\xd5\x9f\xdf\xde\xaf\x3d\xdf\xe0\xcc\x2b\x81\x2c\x56\x37\xd5\x95\xae\x7f\xe3\x25\x9a\x2c\x92\x3a\xbc\xf1\xdf\x35\xc4\x87\x20\x64\x64\x8d\xda\x8a\x3d\xa3\xf1\xa4\x4b\xa1\x64\x09\x68\x9d\x6b\x78\x5b\x88\x6d\x4c\x82\xff\xd6\x35\x02\x83\xf7\x5c\x0b\x8c\xf0\x8b\x9f\x50\x81\xd9\x39\xbd\xe4\x77\xf8\x12\xd6\x63\x4d\x38\x47\xbd\x82\xe7\x18\x30\xce\x3c\x33\x0f\xf5\xe9\xc0\x98\xd6\x67\xac\xf8\x08\xfd\x3d\xcc\xa7\x50\xdc\xf3\x12\x87\x35\x85\x9a\xfa\x07\x6a\xd8\x31\x4f\x13\x14\x5f\x05\xeb\xab\x03\x63\x29\x7c\x86\x7f\xbe\xce\xde\xd7\x75\x5b\x90\x2d\x4a\xa8\xd7\xfc\xbb\x2e\xcc\x1b\x9f\x8f\x74\x01\xfd\xfb\x63\x8f\xd1\x67\xe1\xe0\x38\x5d\x44\xf8\x21\x2f\xcf\x9b\x64\xce\x5d\x2f\x5f\x29\xd7\x10\xa9\xe9\xad\xb3\x85\xa8\x44\x57\xc4\x0d\xd3\x25\x2e\x03\xa5\x5f\xb2\x23\x1e\x86\xc6\x2a\x94\xc5\x01\x0a\xd9\xef\x1e\x12\x2d\x4e\x57\x63\x33\x73\xcf\x95\x76\xf7\x33\x5c\xbf\x48\x9d\x45\x3d\x4c\x5e\x1d\x86\xef\xe2\x1b\x9d\x5f\xc2\xff\x5b\xb3\x8f\xae\xbe\x11\xc5\x7e\xfd\x63\x28\xaf\x51\xf9\x9f\x82\x80\xca\x8a\x56\xd8\x3c\xc9\x29\xfd\x6a\x3c\x7a\x24\x90\x99\xaf\x9b\xbf\x5e\x17\x3b\xb7\x65\xc3\x77\x36\x16\xb6\x60\x05\x25\x4c\x37\xee\x5d\x45\xa1\xe4\x42\x3a\xda\xe6\x11\x93\x22\x91\x6c\x92\x15\x5c\xe2\x90\x54\xc1\x12\xf5\xcc\x5b\x36\x59\xb6\xd5\x87\x39\xd4\x84\x62\xd1\xf0\xa0\xb1\xe8\x12\x1d\x4b\x51\xfd\x1c\xfc\xd7\xf6\x10\x27\xcd\xa2\xee\xb3\xcb\x6f\x59\x40\xec\x73\xd6\xe3\xaf\xfd\xc1\x6b\x16\x5e\xff\x2a\x30\x79\x00\xf0\x3d\xf4\x39\xac\xe5\xaa\xcc\xb6\xc4\x54\xf9\x8a\x72\x73\x21\xae\x1a\xd6\x97\x89\x0f\xaf\xae\x27\x98\xad\x32\x6b\xd4\x82\x0d\xe9\x14\x5d\xcd\x70\x04\xc3\xa2\x12\x17\xbb\xc2\x6f\x93\xaf\x1c\x86\x49\x45\x22\x95\x13\x76\x85\x4d\x2f\xea\xbf\xfb\x3d\x3a\x57\x04\x1c\x89\x20\xc3\xf7\xfc\xc5\x38\x62\xc4\xd0\x1c\xeb\x5c\x63\x7f\x0b\xf8\x38\x95\x17\x23\x0f\x88\xb3\x84\xca\xb5\xfd\x33\xe7\xd5\xab\x03\x57\x17\x97\x07\x7e\xc7\xa1\xc6\x02\x78\xc8\xce\x1e\xeb\xdd\x8d\x32\x77\xf8\x65\x69\x1b\xb3\x6d\xdb\xb0\x63\x11\x9d\xc5\xe9\x5f\x75\x0d\x59\xe5\x45\x65\x0b\x72\xd8\x6c\x5b\x46\xa8\x8c\x1f\x75\xde\x69\xc2\x6f\xdc\x15\x35\x7c\x44\x07\xbc\x80\x5d\x7c\x63\x95\x8c\x02\x01\x7c\x93\xf7\x36\xc3\xa4\x4c\x73\x9c\x5e\x1a\xf9\xa9\xf4\xec\xb4\xce\x2e\x94\x7e\x43\x23\x62\xa0\xfa\x67\x34\x51\xbe\x90\x50\x4d\x4e\xf2\x0c\x38\x41\x73\x9a\x4f\x6d\x73\x38\x9b\xf4\xd1\x67\x38\xab\xbc\x71\xb0\x2d\x3a\xed\x83\x38\x11\x03\x30\xd3\x8e\x14\x57\xda\x3d\x9f\xe6\x20\xf0\xe9\xbe\x4b\x1e\x4f\x14\xb3\x51\xe4\xf1\xca\x30\xa5\x56\x0f\x5b\xd6\x7c\x00\x51\xca\xdc\x96\xdc\xd8\xf0\xa0\x55\x2c\xb8\x77\xb0\xcb\x5c\x6f\xc2\xb2\x10\x2c\x58\xd4\x99\x0b\xc0\xd9\x33\x81\xd9\xb1\xa0\x4e\x0f\x4c\xd9\x1b\x49\xb9\x0a\x3c\xd8\xe3\xa9\xca\x66\xd9\x2f\x2d\xd3\x23\x32\x9a\x69\x9a\x7d\xc3\x27\x1a\x9f\x37\x39\x6d\xe1\x4f\x75\x49\xb5\x48\x10\xcd\xdc\xa1\x1f\x4f\xe4\x37\x2b\x73\x1c\xd8\x9e\x09\xcc\x4d\x19\x69\xc5\x63\x4e\x7d\x34\xeb\x47\x4a\xd8\x0c\xb8\xcf\x87\xbf\x04\xa1\x81\x72\xca\xf2\x1d\xe5\xf3\xa2\xab\x39\x25\xf5\xdd\xa0\x1a\xb6\xc2\x38\x03\x0b\xab\xd5\xc4\xf8\xe8\x50\x22\x4f\x0e\x69\x50\x38\x1e\x17\xb3\xbe\x4d\x10\x1b\x19\xd6\x04\xcb\x0a\x01\x25\x15\x99\xe2\x7a\x49\xcc\x6f\x2a\x27\x6b\xb5\x2c\x8f\xa2\x69\x71\x18\xc6\xd7\x89\x91\x03\x73\xe3\xc8\xf6\xa1\xba\xab\xe7\xcf\x09\x16\x6e\xfc\x9b\x7d\xb4\x1c\x7a\x8a\xfe\xdd\x50\xe1\x03\x8f\x24\xa6\xda\x2b\xa4\x69\x8a\xd9\xdf\xf1\x9d\xc7\x2d\x6b\xbd\x79\x62\xbf\xc5\x08\x84\x3e\xa5\x8a\x84\x3c\x6a\x5e\xc1\x27\xfd\x86\x50\x31\xb7\x07\x21\xf3\x6b\x8b\xf4\xa5\x4d\x21\x1c\x16\x2c\x34\xf3\xca\x6e\xf8\xb7\xdc\xab\x74\xf1\xa9\x7e\xc4\x4e\x60\x99\xdf\x62\xcd\xd0\x97\xb6\x97\xe3\x98\x06\x66\x00\x60\x96\xa1\xb8\xdf\xd5\xdd\xae\x0e\x75\xcc\x1b\xcc\xd0\x96\x5b\x79\xa7\x53\xa9\xd5\xdc\xd9\x82\xd0\xb9\xcf\xe2\xf2\x8d\xd7\xff\x3a\x96\xfd\xd1\x21\xa9\x4d\xb4\xb6\x16\x64\x2d\xc5\x9d\x0c\x66\x22\xb8\x2d\x7d\x46\x32\x27\x0a\x0e\x07\x9f\x1f\x4b\x4b\xb3\xc7\xb8\x4f\x8a\x2c\x26\x1d\x1a\x8c\x8c\x2e\xe4\x54\xfe\xce\x08\x84\xa7\x94\x59\xe0\x49\x44\x1f\x0a\x09\x55\xde\xa6\x51\x77\x01\x2b\x6f\x0e\xbe\x7c\x74\xba\x6e\x60\x11\x35\xb4\x5c\x10\x51\xb6\x23\x01\x4a\xa1\x38\x87\x6f\x7a\x05\x5b\x6d\x2b\x74\xec\x6e\x18\xce\x41\x3d\xa6\xd3\x21\xdb\x09\x90\x72\x21\x09\x79\xde\x7f\x9e\xa1\xf1\x11\x03\x75\xc5\xd8\x4e\x95\xb1\x37\xd0\x41\xa6\x1d\xd7\xe7\x63\x9f\x23\xe2\x7a\x41\x78\xa4\xbe\xca\x1f\x62\x8d\x9b\x11\x90\x8d\x42\x10\xfa\xab\xc3\x7c\xff\x29\xdd\xba\x2a\x71\x81\x88\x1a\x8c\x54\x35\xfb\x91\xf1\xba\x58\x11\xb8\xfa\x4e\x3e\xbe\xf5\xbd\xa5\xb5\x69\x78\x19\x70\x83\xc2\xf0\x6d\xd8\x07\x92\x6e\x70\x98\x13\x8d\x4a\x8f\xf0\xa9\xe4\x95\xe7\x51\xf6\x33\xd4\xb7\x8b\xc4\xf5\xb4\xdf\xea\x7a\xe3\xc2\x40\x23\x7c\xfd\x1b\xec\x80\xcc\x6b\xcc\x2f\x20\xd9\x9e\xf3\xf3\x65\x39\xb6\xf3\x21\xe5\x1e\x68\x95\x71\xf0\xeb\x0b\x1a\x23\x12\xb6\x3d\xd0\x4a\xbc\x4c\x53\xdf\xfc\x45\x5a\xf0\x52\xc7\x15\x0e\x80\xdf\xd5\x46\x4d\xdd\x82\xb7\x40\xd2\x4a\x0a\x8c\xd2\x03\x6f\x27\xe5\xac\xa8\x8b\x45\x8c\x07\x6d\xdf\xf5\xef\xbb\x3c\x1d\x9c\x86\x4c\xf6\xa4\x07\x70\x3e\x04\x9e\xeb\xe3\x35\x16\xb4\xe2\xae\x71\xef\xac\xc1\x0b\x4d\x09\x66\x8b\x16\xcc\x26\xf8\x03\x04\x13\x73\xeb\x99\x99\xb5\xbc\x39\x0f\x55\xc7\x11\x5a\xb0\x2f\xfa\x13\x42\x22\x2e\x17\x2d\x59\xc1\xbc\xbe\xc5\x66\x27\x10\x86\x90\xf6\x6a\x7d\x41\x19\x9f\xbb\x41\x12\x42\xcd\x4b\x6c\xbb\xd0\x9e\x79\xd5\x5e\xd1\x5a\x6f\x26\x91\xe5\x66\xad\x76\x1e\x73\x0e\xfd\x84\x5a\x8e\xf4\x03\xd5\xb8\x6d\xc2\x5c\xe1\x72\x8f\xd2\xe6\x34\x33\x7e\x41\x7e\x72\x2c\x93\x1d\x87\x88\x8b\x4b\x81\x0d\x93\x40\x4c\xe4\x03\x51\xb0\x41\x29\xb9\xc5\xae\xea\x29\x45\x95\x05\x11\xdc\x21\xdb\x10\x88\x9d\x51\xff\xd4\x22\x2e\x7a\x30\xcb\xf5\x8c\x78\x90\x85\xfc\xe9\x4a\xa3\x16\x0c\x1f\x3e\xb3\x1d\x28\x7e\xf3\x67\xad\xb1\x66\xd4\x1e\x51\xb8\xe5\x7b\x6c\x36\x44\x34\xa5\x53\x87\xda\x28\xcc\xc7\xb0\xd0\x9c\x84\x52\x73\x33\x10\x83\xb0\xde\xba\x5f\xe6\x51\x3d\x78\x0b\xd8\xe8\x6d\x37\x29\x9d\x48\x97\x7a\xee\x61\x59\x56\x58\xa9\x36\x3a\xfb\xf8\x97\xb5\x8e\xc8\x97\x06\x53\x41\x90\xcc\xd5\x0d\x7c\xb8\xd5\x9d\x48\x5f\x91\x5a\x13\x82\x39\x62\xfc\xf9\xdc\xce\x74\xce\x1b\x8f\xb7\x15\x31\xa5\x44\xd5\xc1\x14\xc7\x0b\xaa\x09\x33\x5c\xca\x34\x70\x21\x3d\x1d\x3b\xb6\x09\x5f\x2e\x89\x0d\xd9\x83\x79\x6d\x90\xbd\xf9\x5c\xe8\xf2\x9c\xce\xbb\x7e\x7f\xf2\x8d\xd8\x33\x96\x40\x1f\x75\x12\x4f\xd8\xac\x13\x59\x1a\xd4\xa2\xd2\x64\xce\xc7\x91\xde\xb3\xc1\x79\x0d\x65\x94\x8a\x20\x58\x9f\x0d\x91\x73\xd1\x2a\x82\x19\x87\x92\x16\x20\x88\x62\x91\x41\xa9\x75\x96\xb7\x04\xd1\x3e\x0c\x79\xe7\xf0\xd9\x7a\xc1\xee\x6b\x25\x05\x7d\xbb\xb9\x13\x01\xc5\xd7\xa0\xa2\x4d\xe8\xbd\xf1\x34\x24\xa4\xbc\xd3\x49\x34\x76\x98\xd2\x52\x13\x49\x53\xac\x8d\xde\xb4\x98\x88\x47\x72\xe4\x27\x68\x75\x20\xac\xbe\x2c\x01\xc2\x09\xfa\x8c\xc3\xb7\x2f\x29\xe3\xe7\xc2\xc8\x00\x9f\x99\x5d\x00\xee\x2c\xb0\x89\x51\x89\xf9\xe4\x78\x0e\x72\xdd\x49\xe8\x18\x11\xde\xe4\x3a\xd6\xf7\x53\xd1\xf6\x37\xed\xe2\xf5\xe1\xde\x4c\x9e\x6f\xc4\x77\x7f\x40\xd5\x9b\x1f\x36\xb2\xb0\xa5\xb8\x69\x0c\xcd\x53\x84\x1f\xfb\x41\x8f\xb5\x5f\xae\x51\xcd\x6b\x1e\x07\x04\x83\xc2\x01\xc6\x31\xd2\x2f\x81\xd2\x92\x90\xfb\x25\x53\x89\xd2\x38\x80\x20\x96\x3e\xe2\xd2\x16\x05\x94\xb4\xe9\x05\x1d\x2b\xc8\xdf\x1c\xd4\x9b\xa4\x03\xea\xb7\x51\xe4\x36\x27\x02\xe1\xf0\xa4\xf0\xcb\x1a\xff\x7e\xa3\xe6\xd7\xfa\x64\x34\x78\x58\xbe\xa6\xda\xa2\x75\x87\x98\x55\x72\xb7\x4d\x8f\xd1\x61\xfb\xb3\xec\xab\xe2\x5e\x5e\x07\x2e\x33\x52\x60\x9d\x2c\x16\x51\x39\xdb\xc7\xac\xa0\x44\xb5\xd9\xf4\x0e\x18\x98\x00\xe6\xec\x72\xe6\x47\x98\xc0\xa2\x90\xc1\xaa\x5e\xb8\x54\xd7\x17\x8e\x5b\xb9\xc1\x2f\x9a\x57\x01\x1d\x32\xc4\x7e\x92\x7a\xeb\xfc\x88\x39\x94\x27\xc5\x53\x0d\x19\xcd\x43\xc4\xd0\x67\xaf\x77\xec\x56\x1c\x28\x04\x3e\x46\x97\xd7\xf7\x87\x1c\x85\xcd\xac\xa7\xf0\x43\x9c\x58\xee\xc1\x15\x93\x83\xa0\x77\x6f\xa2\xe8\xdc\x88\x83\xea\x95\x08\x2f\xd6\xcb\x90\xc0\xf0\x4a\xbf\xd1\x64\x55\xb6\x13\x45\xc8\x4a\xed\xd8\xd6\x8d\x58\x78\xbe\x0d\x64\x81\x10\xb5\x66\xf8\x5d\x9f\x78\x16\xac\xe1\x69\x4c\x70\xa8\x48\xff\x49\xbf\x53\x41\x14\x35\xeb\xc7\x70\xf1\xd3\xb3\x1d\x0e\x7c\xf0\xb9\x1c\x02\x1a\x0b\x6e\x05\x42\x8d\xdd\x75\x3b\x7e\x4b\x11\x66\xdd\x5a\x56\x97\xae\x05\x5f\x10\x1b\x45\x8f\x94\x44\x9d\x98\xa6\x5f\xf0\x13\x6b\x19\xa9\x85\x71\x79\xb2\x9f\x32\x5c\x62\xb6\x8e\xaa\xa1\x91\x30\xfd\x5b\x34\x4e\xe3\x12\x5d\x11\x78\xba\x95\x0c\x44\xd0\x70\x97\x94\x8c\xec\xd8\xff\xd8\x31\x31\x0e\xf7\xb9\xa2\x0b\xcb\x01\x25\xdb\x68\x32\xa0\x22\xa1\xc4\x5f\xd8\x68\x67\x2b\x9c\x0f\x48\x4c\x00\xe3\x38\x0b\xa4\x71\xd4\x26\xa9\x20\x68\xce\x07\x57\xaf\x67\x04\x83\x50\x6b\x2f\x55\x58\xde\xec\x87\x7d\xed\x6b\x33\x02\x29\xe5\xf7\xc3\x2f\xd9\x32\x9f\xa5\x94\x88\x13\x2f\x98\x44\x41\xff\x3a\xdc\x85\xb1\x8e\xa8\xf9\x00\x42\xe0\xe2\x72\x25\xf8\xfc\x94\xb3\xd6\x69\x0e\xe9\x38\x89\xf2\x60\x7c\x05\xe3\xeb\x61\xd7\x66\xfd\x84\x5f\x2b\x75\x82\xd1\x25\x24\x42\x06\x5d\x3f\xc5\x6b\x48\xec\xd8\x3a\x85\xae\xc7\x47\x7d\x60\x3c\x7b\xe3\x23\x56\x85\xfb\x4c\x4e\x65\xf7\x74\x73\x46\x65\x28\x64\x21\x79\x4e\xbd\x9c\xe8\x66\x98\x4d\x4e\x48\xf7\xa7\x3e\xda\x4d\xfa\x5d\xae\xde\x9c\xab\x08\xe8\x1f\x06\xd2\xe0\xcf\x84\xcb\xa1\x8b\xa4\x60\x48\x17\x68\x8e\x4a\xa8\xbf\x36\xdb\x6e\x39\x3e\x4c\xa7\x07\x48\x46\x26\xe1\x62\xf9\x5b\xab\x4e\xea\x2d\x56\x60\x4a\x6a\xea\xd7\x2e\xbb\x9a\xdd\xa0\x44\x8d\x1f\xdf\x43\x26\xb4\x0e\xed\x17\x8f\x69\x7a\x03\x69\x51\x3b\x9d\xe8\x40\xc9\x52\x09\x97\xf4\x40\x30\x82\x0d\x05\xef\x8c\x1c\xd2\x8b\x65\xd1\xca\xd6\x03\xdb\x10\x17\x5c\xdf\xdd\x71\x98\x9e\xbe\x79\xdd\x16\x21\xa8\x95\x0d\xb5\x1b\xdd\x36\xff\x8d\x34\x91\xb3\x4a\x9e\x70\x38\x69\x1f\xf5\x57\x51\xb0\xf4\xbc\x09\x98\x4b\x14\x49\x62\x84\x31\xa7\x21\xe5\xfb\xec\x36\x77\x61\x92\x7c\x95\x8c\x5e\x71\x9a\xa9\xf6\x5a\xcd\x70\x45\x79\xbb\x5d\xde\x2f\x29\xfc\x58\x2b\x11\x34\x80\x90\xdc\xab\x7d\x4c\x9d\xbf\x36\x13\x44\x6d\x96\xd8\x01\x3c\x29\xe5\x8f\xce\x4c\x2e\xc1\xd2\x2e\xf7\x9e\x26\x48\x37\x54\x92\x38\xe3\x52\x0b\xcd\x3b\x15\xe6\x73\x6e\x3a\x5e\xa2\x45\x57\xb6\x1f\x26\xc5\xef\x37\xed\x2e\x48\x78\x19\xb1\x6a\xa8\x90\x07\xb6\x9a\x8c\x9c\xde\x03\xf2\x81\x02\xe3\xa5\xad\x0b\xc3\x12\xf3\x22\xb0\x4d\x56\x70\x47\xbc\xba\xcd\x1c\xbe\xdb\x79\x35\x0a\x22\x8f\x44\x11\x3e\xfe\xad\x8e\x32\xfa\x7e\xd5\xdc\x2f\x23\x2f\xf4\xb3\x40\xf9\x20\xf6\x1b\x0d\x24\x07\x48\x18\xc3\xb6\xb6\x62\xd3\xba\xc5\xef\xdb\x3d\x39\x18\xe7\x14\xc6\x99\x73\xac\x51\xee\x3b\xcc\x5a\x0a\x4f\xf3\xb6\xd6\x99\xba\x56\x00\x3a\x28\x87\xdd\x27\x35\x23\x59\x97\xfb\x63\xf6\xef\x7e\x8d\x84\x7d\xbd\xda\x32\x4b\x17\x60\x1a\x29\x8d\x25\xf2\x60\x1c\x69\xfd\xb5\x94\x3e\xe1\xd0\x46\xb2\x09\x2c\x72\x75\x20\xb4\x9b\x4f\x1f\xcb\x13\x30\xd3\xbd\x87\x37\x24\xd6\xa8\x18\x06\x6e\x53\x34\x3a\x42\xbb\xfb\x84\x45\x36\xba\xd3\x6e\xc2\xda\xc3\xab\xe7\x17\x9c\x79\xcf\xcf\x46\xb5\x62\x3f\xed\x86\xf9\x72\x59\x80\xd9\xca\x7e\xf8\x9d\xb8\xdb\x6e\xbe\x54\xd0\xbe\x12\x3f\x43\x15\x68\xb5\x15\x6d\x32\xf1\x8a\x8f\x4e\xf8\x0f\xab\x38\xb9\xd9\xe7\x49\x71\x17\x0c\xa0\x13\x45\xea\x3a\x9e\x2a\xab\x75\x53\xee\x7e\xab\xc9\xfd\xc9\xa8\x22\x81\xf7\xda\xc1\xd1\x2f\x3e\x6f\x17\x06\x87\x50\x15\x0a\xca\x6d\xda\x2a\xb6\x10\xf1\x7a\x1f\x5f\x86\x33\x5c\xc0\x62\x3f\x5a\xdb\xee\x9b\xae\xdb\x12\x93\x20\x46\x60\x78\x3c\xd6\xd2\xd6\x82\x01\x3c\x2b\x75\x83\x5d\x16\x36\xf6\xba\x4a\x8b\xf8\x53\x0b\x90\x34\x90\xa2\x9e\x9d\x5b\xf3\xa2\x25\x84\xaf\x7e\x0e\x41\xe3\x57\xe5\x22\xae\x99\xb6\x62\x1d\x5f\x3d\xd5\x96\xdf\xb1\x69\xc6\xe7\x87\xf1\xc6\xa6\x84\xed\xa7\xab\xc6\x6a\x71\xa6\xc3\x3d\x5f\xa8\x89\xbb\x89\x7d\x03\xac\x17\x11\x3d\x79\xbd\x8b\x03\x6c\x6e\x8f\x6e\xe8\x5a\xe0\x0b\xd6\x0e\x3e\x3e\x9d\x8a\xd0\xb8\x10\x59\xf1\x3a\x1f\xbc\x90\x13\x1b\x8c\x2f\x06\x62\x3e\x11\x50\x10\xab\x8d\x72\x6b\x27\x9a\xc9\x42\x37\x40\x5b\xa1\x7b\xb0\xd5\x5b\xa5\x41\xe4\x04\x85\xbb\x47\x18\x65\x2d\x38\xea\xbb\x1b\x17\xc7\xaf\x47\x84\xd0\xa8\x6f\xb2\x52\xe4\x9b\xca\xde\xc7\xef\x10\x18\xc1\x6a\x39\x44\xf7\x58\x4f\x50\x10\x34\xcd\x09\x97\x95\xeb\xd4\x84\x37\x53\x49\xdd\xa6\x10\x0f\x75\x25\x29\xf3\xf5\xbe\x6e\xfc\x0e\x92\xb0\x22\x2c\x48\xe0\xab\x83\x85\x78\x8b\x30\x61\xdf\x6f\x06\xb8\x4b\xa5\xd4\x63\xd9\xba\x30\xe9\x24\xda\xab\x47\xbf\x8b\xd4\xc6\x46\xce\x39\xd9\xd0\xdb\xd4\x9a\x12\x9e\x7c\xe0\xaf\xf2\xf9\xa1\x3e\x73\xc4\x62\x98\x8f\xdf\x0d\x2b\xf3\x3d\x29\x4a\xee\x14\xa5\x7e\x6c\x1b\x69\xce\x82\xe8\x13\xe8\x02\xcd\x2d\x42\x4f\x8b\xfc\x74\xc1\xb0\xf8\x82\x22\xf6\x24\x1e\x09\x93\x91\x93\xb8\x01\x5f\x8b\x1b\x21\xd6\x1d\x43\x98\x35\x7c\xce\x1c\xa7\x82\x1f\x9e\xd6\xd0\x13\x7d\x1a\x0b\x39\x2e\xdb\xdd\xa3\x37\xa3\xc5\x11\x26\x9a\x55\x60\x43\x73\xd8\xf1\xb9\x3c\x38\x69\x77\xbd\x92\x5f\xe2\xb5\x77\x96\x7e\x44\xb6\x4f\x2d\x2a\xec\x36\xb7\xbc\x30\x64\x64\xfc\x92\xdf\x91\x2c\x94\xdd\x11\x13\x69\x10\x37\xc0\xe2\xc0\xa3\xc5\xa2\x6e\x2e\x08\x17\x36\x2b\xba\x5c\x2e\x97\x39\xfc\xde\xd5\x76\x37\x1c\xe9\xf8\x48\xfa\xf0\xa1\x54\x02\xfe\xb5\x3d\x6c\xc4\x1c\x04\xc6\x55\x88\x59\xae\x6e\x66\x4c\xa9\x9e\xad\xbf\x4b\xb8\x12\x14\x50\xd1\xb9\x90\x33\xf5\xa2\x24\xf6\xd3\xb2\x60\x4b\x66\x82\x4d\xcb\x4d\xad\xb6\x1a\xd6\x36\x9b\xf9\xc2\xce\xd7\xe7\x4c\x88\xfe\x0d\x86\xb5\xd7\x9a\xde\x3d\xa5\x74\x91\xb2\x9d\xf5\x2f\x72\x0d\x5d\x8b\x26\xf5\xa6\x2c\xd9\xaa\x7f\xd0\x39\xf1\x88\xa0\xa8\xb6\x7a\xd1\xdd\x67\x40\x29\x6d\x54\xb6\xdb\x6c\x7d\xd9\x2e\xcb\x6d\xc6\x98\x57\x4e\x42\x0c\x58\xb2\xae\x5a\xf4\x8c\x0f\x3a\x23\xf3\xb3\x60\x6d\x46\x13\x2e\xeb\x48\x07\x67\x43\xa4\x84\xf5\x2e\xdd\x8b\xbb\x45\x47\xbc\x2c\x36\xca\xe6\xaa\x5d\xfa\x47\x55\x39\xfa\xb7\x9b\xaf\x60\xf5\x8c\x8f\x5d\x24\xbf\xb9\xee\x81\xb8\x86\x10\xdb\x03\xa9\xed\x13\x7b\x5f\x45\x02\x2d\xb3\x72\x3c\xdb\xd0\x27\xfc\x68\xcd\x05\x61\x2b\x93\xa4\x40\xf5\x4d\xc7\xd0\x58\x94\x58\x2d\x0d\x25\xc9\x44\xee\x1b\x95\xd3\xa1\x55\x29\x7f\x8a\x7c\xc4\xb1\x55\xce\x18\x18\x81\xac\x1e\x17\x01\xce\x3d\x57\xec\x53\x13\x45\x34\x71\x23\xe7\xca\xd8\x27\xe4\xc2\x2e\x04\x87\x9e\x74\x2f\x77\x32\x6b\x73\x15\xb5\x3e\x09\xbb\xce\xc4\xd4\xfb\x6b\x9a\xd6\x93\xea\x91\x9a\xaf\xf1\x92\xd5\xb7\xe7\xa2\x2a\xc9\x2f\xc3\xca\x6f\xb3\x52\x1f\x29\x8f\xb7\xea\x03\xe3\xe8\x8f\xcb\x35\x56\xfd\x98\xdf\xd3\xd0\x0e\xeb\xc7\x48\x54\xcf\xd4\xc4\x7d\x14\x50\xb1\x8f\xdf\xd3\xf0\x5d\x57\x4e\xdc\x12\xc4\x84\xe1\xc7\x91\xd2\x4f\x64\xe7\x9a\xf2\xbc\x6a\x88\x3a\xab\x0d\xa0\x0f\x44\x15\xc6\xa0\xa4\x0f\x14\x4e\xf0\x6d\xa7\x25\xe4\x5a\xa1\xb8\xcf\x2c\x6e\xc1\x4c\xb3\x92\x51\x9d\x25\x39\x01\xb0\x55\xa2\xbe\x5e\xc1\xee\x03\xc5\xbd\x30\x80\x23\x6f\x84\xd8\x5f\x26\x30\xec\xa3\xa1\x0f\x01\x0e\xca\x5f\x17\x1d\xb3\xc7\xac\x85\x21\x6a\xed\xa1\x20\x96\x18\x4e\x2e\xc0\x0d\x73\xd4\xaa\x38\x32\xda\x31\x49\xad\x39\xa4\x4f\xd2\xf7\xc5\x20\x65\xe6\x8d\xd3\xcb\xb2\x6b\x93\xb8\xe4\x83\x06\x02\xcc\x02\x88\x2f\x9f\xee\x3b\x7d\xad\x6b\xb8\x6c\x89\xab\xa7\xb7\x80\xed\xb7\xd2\x6d\xbe\x89\x00\xbe\x7f\x97\x59\xbe\x1e\x86\xa4\x35\xf2\xb4\xf8\xb3\xde\xab\xf1\x39\xeb\xc6\x1f\x59\xf1\x4c\x28\x97\xb6\xfb\x9a\xf4\x52\xc6\x18\x80\x80\xf1\xbe\xac\xa3\x3b\xf5\xd9\xf5\xb1\xbf\x82\x1f\x29\xa7\x25\x71\x5a\x61\x7c\x45\xee\xf8\x7a\xc5\x09\x36\x38\x0b\x81\xe2\x13\x46\x16\xe6\x6c\x20\x2a\x11\x62\x96\x63\x98\x9c\x0a\x9b\x5e\x9d\x50\xcc\xb5\x20\xf8\x44\x33\xe4\x0e\x53\xc3\x6f\x87\xe6\x83\x94\x1d\xb8\x37\x0b\xd1\x3a\x76\x81\xae\xf5\x9f\x4f\x57\x0c\x75\xfa\x91\x80\x52\x39\xe8\xdb\x5c\x6e\xdc\x42\x52\xd8\xe2\xfc\x25\x29\x2a\x02\x1b\xfb\xa5\xda\x37\x05\x58\x5c\x24\x13\x54\x8a\x42\x77\xab\xfd\xf7\xd0\x1a\x89\x51\x09\x9d\x3e\xaf\x11\x87\xa3\xda\x53\x26\xc4\x28\xee\xda\xf4\xec\xc9\xc3\xce\x89\xc1\x94\x9c\x99\x75\x0c\x9b\xf3\x43\xfd\x18\x26\x7b\x76\x49\xf9\xb3\xdc\x15\xf3\xc3\xbb\x66\x1e\x36\x16\xae\xd2\x47\x0b\xc7\x61\xb4\x00\x94\x22\x65\x0a\x0c\xdd\x31\xcd\x6c\xa0\x91\x46\xe5\x1b\x53\x69\x44\x16\x5e\x4f\x2e\x75\x38\xd3\x70\xce\x87\xe5\x54\xdb\x9f\xf7\xaf\x7f\x91\x2f\x1f\x6e\xdf\x02\xac\xa2\x1a\xce\x1b\x4e\xd3\xca\x39\x85\x8a\x90\x58\x2a\x13\x11\x13\x24\x4f\x7b\x4e\x14\xa5\xe4\x23\xf7\x27\x52\xd7\xa0\x35\x66\x39\x79\xec\x00\x7e\xb5\x00\x08\x84\x50\xbb\xdc\x31\x22\x35\x2e\x10\x3c\x7b\x17\xe6\xfc\x8a\x71\x59\x32\xe6\xc1\xb0\xbc\xbc\x74\x19\x07\x34\xe2\x2c\x0b\x70\x2b\xf3\x09\xf1\x15\x11\x76\xf1\x61\x8b\x92\x59\xe2\x65\xc1\x0f\x82\x40\x00\x39\x5c\x4c\x84\xd0\x19\x44\xb2\xf0\x07\xfb\xd5\xe9\xb1\x10\x5a\x0a\xb5\x31\xd3\x28\x50\xca\x0c\xb6\x8d\x2e\xce\x14\x73\xe0\x6a\x84\xfd\x72\xae\x49\xbf\x30\x5b\xb5\x47\x75\x49\x60\x96\x1e\xcd\xca\x63\xaf\x21\xa8\xe6\x9e\x29\x46\xdd\x6e\xae\x4e\x8d\xf0\x6e\xfb\xb1\xcc\xae\xb3\x31\x7f\x62\xe7\x6f\x4a\x59\xdd\xd6\x21\x9e\xf9\xe3\xed\x54\x70\xb8\x5a\xa9\x30\x62\xb4\x41\xc1\xd3\xf8\x95\xdf\x46\x1f\xf3\x81\xe7\xe8\x4e\x8d\x17\x82\x04\x6f\x97\xa3\x74\x4c\xea\x19\x0b\xde\x92\x67\x5a\x86\xba\x72\x29\x35\x8f\x00\x45\x70\xa1\x49\x72\x3a\x53\xcc\x9e\xfd\x0a\xdd\x6a\xb8\xb1\xf7\x8d\xbf\x67\x8d\x6e\xd0\x65\xd9\xa8\x00\x39\x7c\x93\xd6\x0c\x78\xe5\x30\x85\x37\x85\x3e\xd8\xa6\xda\x98\x98\xb3\x1a\x0a\x31\xeb\x20\x17\x63\xaa\xfa\xe2\x68\xfb\x32\x5e\x26\x53\x92\x72\xc1\xbc\xf2\xf4\x88\xea\x21\x0b\x03\x7f\x98\xd2\x0c\x4b\xda\xbb\x78\xcd\xb3\xc0\xcb\x44\x3d\x24\xbd\x8c\xd2\xd4\x43\x26\xf3\x0c\x19\x74\x48\x90\x1c\x18\x76\x98\xbb\x63\x47\x9e\x73\x00\x33\xd3\x63\xcb\x61\x76\x9c\x98\x67\xac\x5a\xba\x73\xf9\x0d\xdd\x20\x88\x3c\x62\x29\x02\xf7\xbc\x2c\x60\x0c\x55\xb5\x90\x5f\xc6\xb3\x0a\x8c\xb5\x37\x74\x95\x07\xfe\xbb\x74\xc7\x9e\x11\x29\xcd\x22\x6b\xc7\x5d\x74\x28\xc4\xe9\x14\xfa\xdd\xc6\x19\x43\xf9\xe8\x62\x54\x66\x9a\x3d\x4f\xab\x65\x62\xc7\x5a\xa8\x2c\xa2\xaa\xf6\x62\x18\xfa\x42\x74\xe0\xfb\xb5\x1a\x5d\xb1\xed\x46\xea\xb3\x4f\x49\x3c\xfd\x1d\x58\x8d\x8f\x55\xc2\x13\x86\x5e\x39\x73\x12\x7d\x4e\x51\x4c\xa5\x25\xde\x4f\x39\xb5\xcc\xb3\x04\xee\xe6\x0b\xda\x3b\xa8\x0f\x55\xd2\x5a\x15\xe7\x42\x1e\xf5\xcb\x27\xa0\x57\xf7\xb1\x9f\x3b\x1a\xc4\x7a\x52\xfc\x99\xc1\xa4\x8d\x10\xce\x2f\xb1\x50\x5e\x0d\xbe\xe5\x53\x6c\x07\xac\xd4\x11\xf0\xec\xad\x9f\x37\xcf\x66\x20\x19\xd2\xec\xb7\xea\x86\x4c\x2a\xbc\x56\xf1\xda\x6a\x90\xc8\xaa\x1e\x45\x33\xc0\x7e\xd7\xd8\x30\xb4\xea\x8e\xb7\xf4\x73\xa7\x16\x0f\x7d\x10\x0f\x2f\xa0\x3b\xe0\x35\x27\x46\x04\xd0\x58\xcb\x11\x9d\x35\x6a\x6f\xeb\x8b\xec\x34\x4d\x72\x85\x8d\xec\x9b\xdc\x03\x8d\x78\xa2\x3a\xcd\xfd\x92\x72\x74\x9f\x3e\x4e\x66\x47\xd8\x07\x7d\xcb\xc4\xf4\xc4\xc1\xaa\xf2\xb0\xa4\xd5\xd5\xe7\x7a\x54\xf5\x48\x63\x9e\x00\x84\x0e\x40\xd4\x03\xbd\x43\x27\x40\xf8\x35\x31\x33\xa7\x1a\x2a\x69\xdc\xae\xfd\xd0\x58\xc0\xc9\x9c\xc2\xdb\x57\x4a\x5e\x27\xc1\x44\xa6\x55\x2c\x94\x0d\x8f\xf1\x91\x41\x9d\xbc\x0d\x5d\x63\x31\x70\xbc\xd5\xa4\xb2\xcf\x30\x28\xa1\x2f\xee\xd2\xcb\x82\x4d\x19\x1f\x79\x08\x50\x3c\x82\x09\xa4\xe2\x88\x40\xdb\xca\xfc\xae\x3b\x1e\xd9\xed\xd5\x60\x99\x36\x5f\xda\xeb\x88\x0a\x82\xd4\xc8\x23\xe3\x68\xc4\x41\x97\x3f\x12\xb9\x93\x46\xad\x9c\x58\xd8\x80\xe2\xf3\x21\xca\x09\x8d\xe7\xb1\xd2\x59\x2d\x58\x39\x0e\x48\x50\xff\xa8\xb1\x22\x7f\xcf\x60\xe8\xf6\x53\x9e\xeb\xae\xfd\x76\xde\x72\x1c\x50\xe4\x0f\x81\xad\x76\x14\xcb\x15\xc3\x28\xc4\xb8\xc5\x4a\x60\x49\x3c\x71\x78\x31\x25\x4f\x61\xa6\xf0\x58\x8b\x24\x78\x95\x75\xeb\xf2\x1b\x7e\x03\x17\xf0\x88\xac\xa8\x1c\x6e\x98\xc8\x36\x99\x7d\x53\xd3\xa6\x8b\x84\xc5\xe4\x36\xb6\x4d\x71\x65\x4b\xa6\xe4\x07\xec\x4e\xd1\x65\x83\x7d\x09\x63\x70\xb8\x3b\x8f\x9d\x99\xcf\xca\xb0\xf5\xba\x78\xeb\x93\x90\x1b\x74\xa3\x27\x9f\x79\xc8\x71\xd7\x6c\x62\x71\x19\x5e\x77\xcb\x4d\xce\x00\xc7\xd7\xa1\x86\x8d\x60\xba\x5f\x84\x0e\xd2\x4d\x2a\xb7\xcc\xd4\x82\xe6\x17\x4c\x78\x70\x6a\x6c\x91\xc0\x08\xf3\x75\xae\xef\xf0\x75\x78\x64\xbd\xe4\x02\xf2\x07\x4f\xd6\xda\x26\x5a\xbf\x3f\xec\xad\x0d\x94\x87\x8d\xce\x65\x55\xb5\x68\x5d\xa7\xa6\xf2\x89\xf8\xf8\x52\x45\x0a\x88\x3f\x06\x18\x66\xd3\xdc\x9c\xf3\xfa\xf3\xc0\x8b\xdc\x2d\xd9\xb8\xd6\x9c\x23\x55\x0e\x3c\x53\x46\x4b\x0d\x54\x1d\x22\xbf\x89\xa1\x57\x70\xfa\x3b\x24\x65\x46\xeb\x39\x48\xe3\x50\xa6\x1e\x9b\xa9\xa3\x26\x47\x72\xb6\x10\x46\x94\x32\x77\xd5\x1f\xa2\x58\x50\xed\x10\x3d\x47\x90\x79\x5f\xe0\xd0\xaa\x8b\xbd\xe4\xc0\x55\x5d\x83\xbc\x25\xf1\x1e\x81\xe0\x2c\x85\xf8\x42\x06\x38\xc6\x17\x57\x94\x35\x9e\x2f\xa2\x71\xeb\x22\x34\xee\xf0\x61\x92\xc8\x98\x7c\x65\xca\x65\x26\xf7\x9f\x09\xdb\x05\x2d\xb6\x7f\xea\x14\x83\xc5\x22\xca\xe6\x5d\x89\x0e\x65\x7f\xcc\x0f\x2d\xf1\xf5\x93\x45\xea\x61\x1c\x7a\x70\x7e\x53\xc6\x42\x3d\x44\x4a\xe4\x98\x37\x85\xdb\x66\x69\x7e\x57\x00\x22\xc5\x8c\x33\xd9\x9d\x8e\x92\xbf\x74\x7a\x0c\x8f\x39\x29\xa2\x1f\x15\x54\xfd\x6d\xd2\x24\x5a\x82\x00\xf3\x0b\xb8\x28\xa4\xfd\x2d\x23\xe6\xa9\x1d\xf2\xdb\x22\x99\xa1\xf5\x3f\x9f\x55\xf4\x8c\xda\x7f\x18\x0a\x7e\xe8\xce\xee\x5e\x5b\x1b\x59\xb1\x40\xd2\x01\xa1\x3a\x65\x4e\x2e\x5a\x84\xc6\x44\xc8\x4d\x50\x47\x34\x0b\xab\x6b\xeb\x0c\x00\xb6\x29\xe2\x0a\x6f\x91\x13\xd3\x2e\x00\x5a\xc5\x11\x0f\xca\x85\x9a\x37\x43\xaa\x05\xbe\xb7\x04\xf8\x8d\x6b\x6b\xf2\x91\xab\x56\xb4\x9b\xec\x8a\x1b\x40\x04\xf6\x2e\x90\x05\x07\x89\x9a\x65\x07\x86\x18\x65\x5e\x2c\xff\x5a\xff\x67\x46\x6a\xeb\xba\x41\x91\xfc\x76\xff\xfb\x55\x84\xe1\x0e\x49\x1a\x8d\x9a\xd4\x25\xed\xc6\xa3\x92\xc7\x74\xa4\x1f\xbd\xf2\x23\x8d\xee\x79\x1f\xa6\xa8\xf5\xa0\x94\x18\x53\x92\x67\x7f\xc7\x14\x47\x39\x7e\xe0\x4d\xac\x9f\xc5\xdd\x8d\x38\xcf\xf9\x12\x72\x1d\xcc\x8e\xba\xfd\x4b\x13\x90\xa9\x25\xb9\x68\x6c\xea\xac\xa8\x0b\xc7\x46\x46\x56\xa4\x7a\x81\x0f\x87\x40\x98\x35\xfa\x69\x56\x85\xd3\x9f\xf7\x9f\x9a\x7d\xec\xfb\xab\x0c\xed\xd5\xca\x2a\x0b\x13\x80\x13\x3f\xb8\x61\x60\xf0\xb7\x15\xfd\xdd\x82\x7f\x9e\x8f\x53\xa7\x81\x16\xfb\x9a\x1c\x25\x7b\x77\xf3\x6a\x32\x91\x3f\xb2\x30\x42\x45\x26\x54\x9f\x7a\x5e\xaa\x66\x01\x41\xc9\xd1\x38\x72\x61\x9d\xe6\x7d\x77\xf6\xf0\x93\x01\x3d\x93\x04\x6d\xaf\xac\x69\xa9\x6a\xdc\x16\x01\x2d\x64\xef\x25\xbd\x14\x7c\xd9\xe7\x1a\x0f\x24\x24\xea\x5f\x30\xe1\xaf\x15\xdb\x2d\xa9\x46\x97\x51\xdb\x39\xdf\x7e\x2d\x43\x52\xb5\x0a\x06\x46\x7e\x4f\xe4\x37\x25\xc8\x06\xe3\x5a\x23\xa0\x16\x43\xac\x00\x4a\xa9\x55\x1d\x53\x7e\x8d\x57\x02\x7f\x4b\x22\x6c\xe2\x24\x64\x6b\x4b\x79\xfe\xf0\x28\x57\xcf\xd4\x96\x5c\xd1\x01\x9e\xc1\x87\x02\xe3\xe7\x08\x95\x9f\xfa\x2f\x92\xd9\x81\x59\x6b\x24\x6b\x27\xd5\x02\xea\x85\x0f\xc6\xbf\xce\x52\x5e\xa2\xda\x11\x09\xcd\x01\x05\xad\xc0\xf7\xec\x79\xa7\xb2\x09\x8a\xa6\x44\x7b\xdd\xfe\xe4\x5f\x8e\x1b\xed\x35\xa3\xab\x89\x2a\xc4\x51\xc7\x6f\x00\x4f\x58\x4b\x69\x98\xda\x82\x18\x24\x34\x73\xd7\xe7\xfa\xad\x34\x1b\x7c\x75\x49\xb9\x1c\xe2\x37\x1c\x3a\x0a\x8d\xa4\x5f\x13\x84\x50\x07\x9d\xd2\xa8\xa4\xee\x80\x32\x11\xc9\xec\x48\xa4\x68\xe6\x4c\xe1\xc7\xc9\x78\x56\x05\x05\x8c\x08\xfe\x26\x88\x8c\x3e\x54\x4c\xbb\x2e\xf4\x5a\xea\x37\x55\x94\xc5\xf3\x4c\xb7\x38\x8d\xc9\x0a\xea\xec\xd5\xf2\x76\x8c\xce\x2f\x2f\xc0\x10\x46\xe1\x57\x02\x4f\x58\x75\xcf\xd0\xb1\x6b\xb8\xe5\x3f\xa8\x94\x88\x04\x2f\x08\x72\x98\xdf\x50\x72\x6b\xa0\x70\x38\x3b\x69\xa3\x63\xd3\xec\xf0\xc6\x7f\xc6\x8e\x09\xbf\xd9\xc9\xeb\xe7\x46\x6f\xf4\x5b\xa1\x26\xa7\x39\x80\x7b\x94\x97\x76\x9f\x58\x6b\xdd\xe6\xc7\xc3\xfe\x22\xb4\x62\xdd\x0d\x7e\x18\x63\x6c\x03\x0f\xe7\xf3\x35\x7c\x2d\xe9\x7f\xc5\x62\x34\xb3\xd9\x6d\xf2\xfb\x7b\x3f\xb7\xaa\x31\xe5\xab\x1c\xf7\x74\xe3\xce\x89\xac\x45\xaa\x6f\xee\xbd\x4e\x62\x0f\x6f\x7d\xd4\x6a\xac\xaf\xdf\x70\xfc\x3d\xc6\xbc\x52\xd0\xd7\x8f\x1a\x5a\xd0\x9d\xb0\x71\x1c\x8f\x90\x17\xac\x12\x0b\xa0\x52\xdd\xfa\xcd\x8c\xcf\xc9\x35\xd5\x0f\x9a\x05\xd8\xcd\x93\x0c\xfa\x6c\xe4\x25\x04\xd5\x7b\x6e\x78\xdf\xaf\x0b\x3a\x65\x7c\xd0\x00\xba\x89\x6a\xb0\x48\x1d\xdc\x68\x6b\x2b\x4b\xbd\x21\xc4\x9f\xc0\x5f\x7c\x67\x10\xbd\x15\x67\x1a\xf7\x7e\xf7\x5d\xd1\xd5\x34\x7c\x64\xdc\x48\x82\xa9\xfc\x26\x7f\x34\x14\xd5\x65\x7c\x7c\xd5\xbc\x2b\xe3\xfa\xf1\x3d\x83\xab\x34\x55\xd4\x21\xce\x2b\x24\x74\x7b\xe2\x79\x55\x54\x39\xfe\x9a\x15\x74\x2a\x00\x5f\x02\xf2\x3f\xf7\x51\x5a\xf5\xa4\x41\xee\x47\x25\x84\x13\x6d\x45\xe6\x78\xf3\x0e\x58\x90\xc6\x3c\xa0\xe0\x7d\x42\xc9\xcb\x57\xd9\x8f\xcf\xe6\xb0\xb1\xe7\x8a\x80\x2f\x38\xb8\xd1\xdc\xf6\xef\xda\x53\x99\xd1\x57\x24\xbc\x04\x4c\x41\x14\xa2\x13\xa9\xab\xbc\x9a\x73\x34\x2e\x30\x4f\x77\x3b\x5f\x03\x47\xf2\xf6\x26\x45\x58\x30\xf1\xbd\x81\xbb\x35\x86\x93\x0e\x96\xe8\x87\x61\xcd\xee\x87\x56\x02\xea\x6d\x1d\xa1\x22\x80\x61\x6a\x39\x7a\x7a\x48\x03\x9f\x10\x16\xcd\xc6\xcc\xd7\x27\x72\xe0\xb2\x72\xe1\x45\x9f\x54\x96\xd6\x44\x33\x0c\x10\x01\x38\x23\x80\x03\xb1\x7e\xaf\x9e\x73\x0c\xd2\x70\xde\xdc\x41\x7e\xba\xd4\x6e\xe8\x4f\x87\x54\x53\x66\xec\xa3\x10\x97\x64\xc2\xbc\x2f\x72\x77\x15\x27\x4b\x3d\xa1\x1f\x51\x17\x05\xe2\x6a\x74\x9b\x02\xdd\xc6\x75\x20\x04\x09\x35\xaa\x0d\xd3\x39\x9d\xb4\x35\x08\x53\xc2\x60\x5d\x7b\x29\xf4\xdd\x12\x3a\x54\x4a\x24\x51\xa4\xfa\x17\xe1\x81\x34\x89\x09\xb0\x1d\xce\x70\xf6\x78\x44\xbc\x44\x20\x98\x24\x47\x08\xe6\x00\x25\xac\x68\x16\xb7\xd4\x4a\x95\xfb\xe9\xf0\x25\x3c\x3f\x98\x95\x8d\x17\x27\x20\xbf\x5c\x87\xf7\xac\xa5\x8e\x9f\xf5\xeb\x49\x49\xa2\xa2\xbf\x82\x99\xb1\xa5\xe0\x58\x8b\x47\x6d\xa7\x10\x3d\x07\xa6\xb2\xc6\xc8\xbe\xfa\x15\x79\xe3\x26\x5a\x56\x52\x2f\x07\x92\x54\x66\x3d\x2d\x69\x60\xf5\xe3\xcd\xba\xb4\x22\x7c\xcd\x6f\xca\xd4\xb2\x6f\x6d\xfe\xd5\xfa\x14\x58\x88\xd1\xf9\xe2\x5d\xbd\x24\x97\xe3\xff\xaa\xa3\xa5\x0d\x68\xa1\x78\x58\x9f\x89\x88\x5f\xb2\xc1\x6d\x94\x3a\xcd\x04\xfc\x78\x91\x92\xf2\x69\xdc\x09\xe2\x95\x28\x5e\x3a\x39\x89\x75\x27\xb2\xa3\x26\x9f\xf2\x74\x96\x67\xf8\xa9\x40\x99\x40\xdf\x49\x6e\x19\x70\xdc\xc3\xef\xb1\x86\xb1\x81\xec\x4d\x33\x53\x4d\x7b\x67\x88\x47\xb8\x24\xce\xce\xa7\x9f\x3e\x9b\x15\x31\x8c\x7a\x8b\x28\x31\x08\x9f\x11\x5c\xa7\xb6\x9f\x88\x20\x1b\x24\xa9\x64\x11\xd4\x4b\x06\x0d\x0c\x45\x06\x86\xe0\x2a\x1f\x65\x3b\x65\xea\x11\x12\xf0\x71\x73\xdd\xdb\xc9\xd1\x41\x7a\xa2\x13\x05\x86\xab\x05\x9a\xd4\x60\xaf\x81\xa4\xe3\x2a\x0f\xe9\xb5\xcf\xe8\x4c\x2f\x46\x09\xa4\x10\xe7\x14\xc0\x42\xa3\x54\x2a\x88\xba\xeb\x97\xe6\x70\x2f\x62\xa3\x53\x86\xc1\x6d\xb9\x3f\x2d\xe4\xb8\xca\x5d\x7d\x80\xd0\x1f\x22\x08\xe4\xd6\x29\x1b\xb4\x43\x88\x28\x0b\x9e\x5b\x82\x8a\x7a\x50\x9c\x6f\x8b\x9e\x7a\x7b\xdb\x0a\xdd\xe8\xea\x46\xf6\x27\x1a\x58\xa6\x1e\xe3\xec\x63\x84\xca\xae\xe2\x58\x72\x59\xc7\x8a\x8c\x99\x66\xdf\xfd\x7c\xcc\xf8\x91\x9e\x13\xca\xed\xfe\x40\x2d\x8b\x90\x09\x5f\x69\x77\x3d\x7e\xe6\xe4\xac\x61\x1d\x83\x55\x64\x39\x6f\xe9\x65\xf9\xf5\x17\x5f\x23\xb1\x4f\x32\x76\x37\x3a\x29\x56\x9d\xc9\x0e\x4b\xf2\x87\x86\x4d\x9d\xd1\x71\x4b\x2a\x92\xc5\xee\x92\x06\xb8\xfd\x79\x27\xd2\xc4\x7b\x9f\x53\x37\x82\xa6\x2e\x2f\x79\x28\xd4\x0d\xab\x29\x4e\x12\x7f\xc2\x4f\x5a\xbf\x8f\x6c\xa4\xb5\xf9\x4e\x14\x93\x6d\x9f\x2d\x93\xd4\x66\xf7\x1f\xf4\x46\x73\xfb\x1c\xac\x40\x35\x49\xe6\x33\xe7\x5b\xfe\xd9\x58\x3b\x20\x4a\xe8\xd7\x56\xc8\x55\x97\x1b\x08\x8e\x23\x1d\x57\xd8\x2f\xd7\x77\xc6\xa0\x7e\x94\x30\x9f\x71\xed\x95\x3c\xfc\x2f\x4c\x32\x42\xd6\x4d\x40\xbd\xc5\xb3\xe9\xb3\x86\xb0\x58\x5a\x5b\x8c\x22\x9c\x9f\x15\x52\x61\x10\x1c\xa7\x7b\x62\xca\xe6\x23\x42\xa0\x3d\x85\x7d\x9d\xfa\xa4\xaa\x27\x80\xf9\xa8\xb5\x7d\xcf\xfb\x34\xc0\x6b\x5c\x9a\xc3\xa2\x75\x4c\x0b\xea\x6a\x10\x66\x6e\xa9\xd9\x82\xf2\xdb\x5d\x82\x3b\x3e\x36\xbc\x4e\x64\xa1\x86\x9a\x1c\x51\x83\xc2\x0c\xf7\x38\xcd\x8e\x74\xca\x2c\x06\xbe\xcf\x89\x20\x7b\x33\x96\xc6\x8f\x66\xb2\x76\x9a\xc4\x1f\x45\x87\xd4\x1c\x41\xc8\x3d\xf9\xf1\x55\xca\xd4\x2a\xf1\x86\x68\x11\xff\x44\x1d\xa3\xb4\x67\x9b\x7e\xf4\x69\x7f\x4e\x56\x60\x0c\x98\x71\xa0\xde\x5e\xee\xda\x2f\xbf\xc4\xd2\xd5\xbc\x77\x8c\x79\x99\xf6\x88\x4c\x55\x1b\xfc\x32\x0a\xbf\x66\xdd\xc0\x69\x7c\xfa\xa8\x13\x13\xe4\x9c\x3e\xc5\x65\xc8\x1a\x59\xc4\xa2\x06\x6f\xf0\x90\x4c\x99\xc4\x7a\x12\xd5\x71\x33\x0a\x7f\xb9\xef\x91\x2b\x13\x89\x7e\x33\xdb\x86\x37\x1b\x41\xb1\x5f\x75\x65\x6e\x54\x8b\x29\x00\xbe\x09\x24\xb9\x36\x6c\xdb\x04\xd9\x76\x1a\xba\x41\x55\x3b\x56\x75\xb8\xf1\x20\xc5\x17\x67\x9a\xf9\x8b\xd1\x7f\xf3\x9f\xc3\xe4\x37\xbd\x63\x60\x2b\x7a\x9b\x00\xe4\xd4\xf1\xc3\x42\x48\x7a\x6e\x85\x3b\xaf\xba\x7e\xfa\x9f\x09\x33\x35\x92\x08\xde\x8e\x1f\x3e\x2c\xe9\x5a\x45\x5a\xc5\x94\x2c\x5a\xcb\xdc\xae\xbf\x16\x12\x5c\x47\xf6\x84\x5d\x77\xf7\x79\x57\xf1\xc7\xf7\x10\x8e\xd0\xb8\x94\x7a\xe2\x76\x7f\xbe\x5f\x2e\x5b\x96\xd1\xca\x10\xc9\x11\x5d\x8f\x17\x39\xdb\x78\x46\x22\x06\x41\x63\xcb\x11\x9e\xb5\x6a\x00\x8b\x63\x13\x43\x4d\x74\xc1\x3c\x3e\x57\x0d\x7d\x4a\x10\xe4\x2b\x5b\x69\x5e\x74\x88\xd9\x74\xf8\x5e\xc2\x57\x10\x07\x27\x06\x3e\x92\x5c\x62\xc2\xab\x93\xff\xeb\x04\x30\x85\x7c\xae\xf3\xec\x5b\x67\x1f\xe2\x51\xad\x01\xd2\x0c\xb8\xff\xce\xa4\x7b\xb7\x99\xa4\xc7\xca\x8e\x09\x19\xd8\xba\x5c\xbc\x54\x39\x88\x9c\x0f\x63\x2f\x19\x04\xd4\xa4\x7e\x6a\x33\xde\xbe\x39\x5a\xc5\x52\x92\x48\x56\xb5\xc8\x41\x40\x68\x96\x9c\x1c\x49\xb1\x30\x8b\xe3\x7f\x6f\x85\xa4\xff\xe4\x5a\xbc\xf1\x9a\x3a\xff\xe5\x38\x2b\xb7\xbe\x52\xec\x88\x0c\x5b\xd6\xc4\x0e\xa4\x56\x21\x80\x41\x4b\x1d\x0c\xd7\x05\xdc\x1c\xc1\xa7\x71\x46\x96\x70\x0e\x21\x71\x79\x3d\xa8\x27\xe5\x54\xae\x56\x9f\x53\x91\xc2\x1b\x77\x6f\x63\x44\xa1\x6b\x46\xc0\x72\x9a\x43\x2d\x93\x0e\x02\x2c\x4e\x02\x2f\x24\x39\xde\x01\x03\xc3\x47\xce\x14\xde\x14\xf8\x84\x68\x64\xdf\x00\x12\xfb\x14\x3e\x0b\x3f\x16\xb7\x5a\xe8\xb6\xae\x16\x05\x2d\xbd\x8a\xc4\x6f\xa5\x30\x3e\xb3\x5f\xa1\x19\x08\xad\x6e\x9f\xad\xca\x97\x01\x1f\xeb\xa2\x3e\x07\xb0\xed\xb2\x79\xda\x7e\x32\xc6\x2f\x01\x41\x9d\xf1\xf8\xbe\x4a\x23\x7e\xe8\xb8\xc0\x95\x54\xe5\x92\x18\x13\x97\xee\x4b\x2e\x18\x76\xe0\xb9\xa6\x47\x78\x5f\x49\x51\x5b\x31\x23\x42\x9a\xeb\xb6\x32\x8b\x61\x72\x7b\x25\x49\xb0\xf3\x82\x69\xee\x77\x91\xfd\x68\x9c\xfb\x04\x03\xf3\x90\x89\x20\xba\xc3\x60\xb8\x01\xe8\xf9\xcf\xc5\x7f\x8b\xe7\xa8\x0d\x25\xd9\x6a\xfe\x03\xb1\x86\x56\x1a\x6a\xad\xfd\xb4\xd6\xe3\x2b\x78\x53\x82\xb6\xcb\xbe\xa2\xa3\x9d\xc4\xa8\x14\xec\x76\xdc\xde\x61\x92\x88\xfa\xea\x4b\xeb\x1b\x33\x05\xe5\x39\x03\x75\x46\x62\x66\x43\xe1\x8a\xaa\x28\x8a\x76\x73\x61\x7d\x9f\x39\xef\x56\x40\xf1\x59\x38\x38\x1a\xfa\x2e\xc2\xf9\xfb\x56\x01\xc8\x54\x13\x41\xd5\x82\xeb\x0b\x15\xe6\x3b\x69\x70\x50\x8c\xad\xb8\x6e\x12\xf2\x89\x2e\x3b\xd7\x03\x51\xe5\xbb\x61\x12\x27\x30\x37\xe2\xd5\x06\x04\x86\x14\x83\x95\xf8\x47\xdc\x09\xa5\x29\x89\x0c\x81\x14\xc2\xdd\x26\xe8\xe7\x8a\x66\xa3\x4a\x16\xfd\x4a\x60\xb8\x94\x94\x4f\xb7\x8a\x36\x09\xe5\xbf\x76\x1e\x51\x49\xd5\x07\x91\x51\xb8\x5f\x31\x6a\x16\x6f\x44\x34\xa4\x1a\x65\x0d\xb4\x1f\xe7\x81\x81\xa8\x2d\x9e\x86\x41\x15\xdb\xc6\x97\xb2\x52\x76\x03\x96\x87\x4b\x98\xe6\x24\xb3\x29\x37\x5b\xdc\xc1\x97\x72\xe3\x8c\x87\xa1\xd1\x25\x61\x80\x46\xf8\xe2\x8d\x9f\x75\x5b\xe5\x8f\xe5\x00\xdd\x19\x3f\xf1\x68\xbb\x38\xec\xf0\x05\x2b\x6f\xd6\xfd\xe3\xdc\x31\xda\xfb\x5b\x80\x3c\x98\x71\xc4\x7b\x49\x97\xa7\x76\xdf\xf6\xbe\x2c\x4a\x8a\x89\x42\x8b\x63\x1e\xdb\x7a\x5b\xc7\xa2\xd8\x07\x85\x07\x42\x83\xff\x62\x8a\x82\x92\xe7\x71\xaa\x30\x0b\x4f\xfe\xc9\x8b\xf8\x4b\x3b\x96\x85\xa3\xb4\xbc\x97\x8b\x9a\x32\x6f\x4a\x99\x55\xb9\x59\xc3\x4c\x4b\x0c\xda\x9f\xb1\x55\x54\x66\x7b\xc4\x1f\xe6\xba\x5c\x0e\x12\x5e\xe8\x74\x62\x36\x78\xc9\x19\x39\xa5\xe4\x03\x00\x0b\x46\x37\x1f\x1d\x6d\x14\xac\x51\xf3\x96\x65\xa5\x43\xf7\x14\xf8\x74\xdf\x16\x9e\x6f\x36\xc6\x6d\x7e\xb4\xff\xac\xe3\x3e\xb1\x27\xab\xd4\x8a\x62\xef\x1f\x83\x47\x6c\xdb\x50\xdb\x97\x97\x06\x86\x6f\x85\x20\x0a\x02\xd1\x35\xb8\x9a\xb3\x39\x92\x1c\x7a\xa7\x72\x49\x7a\x77\x4e\x14\x86\x7e\xb7\x10\x86\xb6\xe1\x48\xcc\xfa\x42\x3c\x85\x33\xb2\x30\x6e\xfa\x2b\x9e\x50\xfa\x30\x6c\x8a\x75\x3a\xfc\x96\x47\xcc\x70\x98\xa8\x27\x29\x5c\xa9\xaa\x1a\x22\xda\x38\xc5\x6e\x4b\x72\x7c\x50\x04\x5f\xe0\x7c\xc1\x97\x01\xde\xee\x6f\x92\x0f\x45\x7c\x9b\x27\x20\x19\xc9\x16\x61\xdd\x59\x92\x3a\xab\x7e\x38\x85\x13\x51\x16\xdc\x76\x48\xd3\x78\x9e\xb8\x70\xf2\xa1\xab\xbe\x6e\x9e\xe6\xcd\x1f\xb6\x17\x7e\x93\xda\xa8\x1d\x21\x30\x3c\x71\xc1\xf0\x48\x49\x63\x3c\x33\x7e\xcd\x00\xe1\xd8\x25\x38\xa5\x9a\xca\x0f\x02\x80\x42\x28\x87\x83\xaa\xbe\x15\x0a\x6e\x3d\x2c\xc9\x4e\x26\x38\x39\x58\x34\xfc\x26\xf3\xfd\x2d\xbe\x97\xb1\xa5\xab\xbe\x0f\xd8\xf6\x79\xce\x26\xc5\x40\x8e\xfc\x50\xfb\xa3\x7d\x0d\x87\xb1\x57\x6e\x5c\x3e\xe4\xe9\x23\x21\x70\x96\x46\x9e\x3c\x93\x8f\x4b\x04\x5b\x15\xbc\x6d\x6a\xc3\x5d\xf3\x92\x5f\xa8\x19\x6a\x95\x13\xc2\x68\x3a\x48\x9c\xa0\xfc\xd9\xdc\xf2\x8e\xde\x78\xd7\x67\x12\x86\x36\x27\x3a\x8d\xe7\xf8\x97\x61\x85\x2f\x51\x1c\x17\xcd\xc8\x8c\xb0\x61\xf8\xa4\xe2\xf5\x25\x39\xcf\x17\x08\x22\xaa\xe8\x85\xf8\x54\x1d\xc4\xd6\x82\x25\xe0\xeb\x7c\x7f\x40\x7a\x11\xe5\xfe\x5a\x77\x9a\x76\x1a\x77\xba\xb8\x99\xe7\x88\x05\x85\x98\x92\x5d\x21\x89\x89\x90\x9d\x04\xda\x11\x82\x01\x28\xe8\xfd\x2d\x8a\x27\xe6\x9c\x9e\xb1\x55\x80\x6c\xab\xeb\xb2\xdc\x1e\xf5\x61\x3d\x1a\x29\x64\x6d\x0a\x92\x3b\xd7\xf2\xe6\xe0\x28\xd7\x85\x84\xab\x67\xdd\x11\x17\x70\xe6\x47\x00\x00\xb6\x50\x48\x57\x71\x22\x64\x4d\x51\x64\x21\x1e\xa9\x4e\x69\xf3\xd0\x4f\x96\x79\xae\xc1\xc5\x86\x8d\x1e\x42\x69\xdd\x87\x0c\x0b\x98\x41\x4c\x9a\x8a\x94\x51\xb4\x5c\xf4\xa7\xe6\x99\x7c\x27\xd8\x5e\x4e\x94\xbd\x79\x29\x01\x56\x78\x19\x09\xef\xb5\xaf\xcd\xf5\x2a\x19\x22\xe6\x03\x50\xe3\x8e\x1a\xb8\x9d\xbc\x35\x1d\x92\xbe\x4f\xe2\xb9\x53\x62\xe3\xba\x03\x51\x8b\x42\xaf\x07\x2f\xa4\x33\x63\x6f\x78\x13\x3c\x1b\x6c\xdb\x81\x10\x8a\xaa\x18\x88\x86\x80\xbf\xbc\x48\x08\x5a\x1d\xbc\x93\x78\x37\x88\xd1\x3d\x5d\x82\x14\xbf\xa0\x93\x87\xf9\x92\xc9\x91\x9d\xd3\xb9\x91\xb5\xdc\x24\xf2\xa3\x40\xa8\xb9\xbe\x74\xfc\x51\xf5\x04\x6e\x74\x5c\xde\x65\x22\x63\x9f\x13\x6c\x51\x65\x62\x57\x75\xcf\x9e\x30\xf0\xbc\x22\x11\x86\x75\x91\xb9\x60\x5a\x42\x89\xab\xde\xee\x68\xee\xa1\x71\x1a\xb0\xd7\x47\x93\x82\x3d\xe0\x38\xb4\x15\x76\x3f\x54\x8f\x24\x43\x8a\xa1\x63\xbf\xd3\xef\x6b\x09\x5e\x75\x2e\xd8\xa3\xb5\x16\xbd\xbe\x94\xee\x48\x89\x7f\x89\xc6\xd5\x72\x06\xc3\x0f\x49\xad\x13\xf4\xf1\x11\x57\x62\xf2\x7e\x83\xca\x7c\x26\xd1\xa5\x36\x45\xc1\xef\xe8\x19\x72\x1b\xaf\xb4\x06\xb9\x4e\x56\x33\x52\xce\xaa\x82\x36\x18\xb9\xad\x26\xe4\x7a\x82\xdb\x83\xab\x81\xdd\xec\x3a\xa9\x60\x02\x39\x7f\xb2\xca\xc0\xc7\xbe\x3c\x66\xcc\xce\x81\xb2\xd5\x24\xae\x9e\x7b\xed\x77\xf8\x5a\xf6\x3f\xff\x23\x02\xd6\x96\xbf\xc2\x00\x08\x24\x28\xaf\x4d\x45\x67\x32\x9d\x36\x84\x76\x1f\xca\xa7\xbe\x5b\xed\xee\x6c\xd0\x9a\x2d\xec\xee\x11\xef\x75\x7f\xc6\xc4\xa0\x10\x7c\x65\xf4\x37\x51\x54\x8e\xf2\x83\x78\xc5\x29\x68\xe5\x4c\xa8\x48\x50\xa1\x59\xaf\x7a\xdc\x87\x79\x58\x6a\xa1\x26\xa0\x59\xf1\x93\x19\x0c\x42\xa3\x50\xad\x65\x70\xe3\xcb\xb1\xbe\xcd\xda\xcd\x69\xab\xdf\x27\x3b\xce\xd9\xb0\xf3\xcd\xf9\x41\xa6\x04\x93\xbf\x2d\xd6\xd0\xc2\x47\x86\x4a\xf6\x85\x24\xa8\x7c\x6d\x98\xfe\xd5\xf9\x56\x90\x4c\x13\xde\xe8\xb7\xfc\x00\x8e\xad\xc7\x61\x9e\xac\x86\x0e\x09\xb5\xb8\x60\xfc\x12\x22\x8f\x32\xe9\x32\xb5\xc2\x0f\xda\xfd\xec\x19\xc3\x92\x66\xde\x19\x43\xbb\xa1\x1b\x0e\xff\xee\x55\xdd\x66\xd8\x0b\x92\x8d\x13\x7a\x13\x5e\x41\xd8\xec\xb9\x90\x6e\xfa\xf4\x74\xf4\x83\x5d\x26\xa3\x26\x48\x67\xa5\x1a\x2d\x44\x13\x8c\x9d\x04\x90\xb4\x16\xbf\x60\x69\x26\x60\x3d\xdc\x35\x6c\x72\xe2\xf5\x14\x33\xc7\xbe\x10\x7a\x1d\xd6\x2d\x44\xf8\xe9\xe6\x0b\xc0\x9c\xe2\x35\x2b\xc6\xed\x83\xe3\x73\xc8\x13\xa1\xc4\x09\x3e\x99\x2f\x6d\xa8\x98\x46\x6c\x62\xa2\xa6\x45\xd8\x2c\x0b\xd3\x7f\xdf\x9c\x57\x92\x33\x8e\x74\xd3\x7f\x82\xad\x95\x60\x15\xf9\x48\x4d\xc2\x85\x55\xc1\x73\x61\x2b\xff\xea\x30\xfc\x7b\x9f\xa0\x75\x53\x9c\xe1\x85\xd4\x2a\x08\x01\x9e\x52\xa4\xea\x14\x53\x51\xd6\x53\xa7\xf1\xef\x6e\x4d\xef\xef\x64\x2a\x4a\xbb\xf3\xa0\x9e\x98\xb2\x88\x38\x97\x65\x75\xaf\x91\x33\xce\x21\x58\x05\x59\x1a\x56\xbc\xed\x6f\xf4\x05\x57\x4d\xd9\x1c\x95\xf5\xd9\x40\x4d\x2a\xd9\xe3\x8f\x39\xdf\x89\xb0\x9e\x6e\x52\x1e\x40\xc0\xa1\x09\xba\x61\x9f\x37\xf2\x26\x32\x70\xa8\x44\x25\xff\x97\x79\xca\xd8\xa6\xd0\xb9\x13\x70\xce\x1f\x7a\xcf\x1a\x0c\xed\xea\xa2\xab\x3c\xeb\x96\xc3\x97\xf8\x05\x96\x39\x7e\xc9\x2c\x93\xa4\x5e\xe2\xb9\xb3\x37\x2f\x45\xb5\x87\x91\x99\xab\x28\x42\x44\x85\xf5\x08\x60\x0f\x0d\x4c\xec\xf8\xf6\xa1\xd1\xa1\x8e\xbe\x0f\xcf\x41\xf1\xd3\xea\xd5\xc6\xf5\x16\x7f\xe9\xfd\x75\xde\x59\x47\x39\x29\x02\x69\xc8\x85\x9f\xf0\xd9\xfa\xd2\x11\xdf\x7c\x94\x55\x81\x49\xd9\xdc\x99\xb8\xef\x17\xe6\x14\x8b\xbe\xa1\xb4\x6c\x74\x9a\xc2\x18\x0c\x12\x85\x8d\x86\x9f\x87\x59\x11\x57\xa1\x08\x83\xfd\x59\xf5\x76\xea\x1d\x45\xb9\xe2\xf5\x61\x44\xcd\xa6\xa0\x06\xd4\x43\x5c\xd3\xdb\x38\x2e\xa1\xd7\x68\x84\x40\x69\xd7\x07\x13\xea\x2b\x56\x6a\x2b\x22\xe2\x24\xde\xf0\x9c\x2b\x36\x84\x55\xf9\xb3\x31\x59\xb8\xdf\x45\x42\x63\x5b\x06\x96\xf0\xb0\xf5\x4c\x20\xe7\x52\x5a\xba\x9f\xbf\x9b\x61\x45\x21\xe3\xad\x57\x1e\x7c\x48\x68\x61\x04\x46\xd8\x44\x50\xca\x0e\xe7\x14\xae\x76\x4d\x9e\x9c\x99\x7a\xf7\x9a\x66\x82\x96\xa4\x12\x0e\x23\x30\xb2\x32\xc3\xaf\x2c\xe7\x6a\x8b\x56\x0e\x99\xff\x21\xb0\xd0\x6f\x06\x19\xab\xfa\x0b\x75\x36\xf4\x1e\x7d\x57\x42\x20\x15\xc2\xaa\x94\x2e\xf1\x4f\xce\xb2\x7d\x60\x10\xbc\x07\xf4\x56\x5c\x03\xfd\xa0\x78\x5c\x4a\x53\x17\x81\x52\x68\x10\x3a\x65\x5b\x44\x58\x89\xe6\x18\x4e\x30\x73\x2a\x24\x07\x6e\x4f\x45\x2e\x38\x1c\x9b\x85\x84\x5b\x51\xdb\x30\x8a\x89\xf8\x7a\xd0\xbe\x74\x40\xcb\xc5\x86\x69\x68\x0c\x04\x53\x6b\xdd\xdd\x3e\x4e\xf6\xb3\x4d\xa9\x0e\x97\xb8\x04\xe7\x57\xa6\x2f\xc8\xd0\x61\x08\x71\x10\x88\x44\xa7\x5e\xf5\xc9\x30\xdd\x36\x21\x9f\x1e\x6e\x78\x5e\x94\x88\x54\xbc\xdc\x5b\x88\x08\x8c\x81\x29\x37\xc6\xc8\xe8\xb8\x1c\x56\xa9\x8b\xd7\x46\x0d\x08\x8c\x93\xcc\xcf\xc9\xa0\x35\x80\xdf\x0f\x38\xcc\x19\x8c\xaf\x60\x23\xfc\xc0\x7f\xf7\xb7\x09\xbc\x0e\xa6\xb0\x0e\xfb\x51\x4c\x99\x1f\xfa\xd4\xbd\xff\x13\x1d\xc7\xe8\x5f\x3d\x55\x35\x27\xa0\xf5\x59\xef\xaa\x1e\x40\x81\xd3\xd4\x90\x59\x1f\xac\x55\x62\x75\xa1\x7c\x19\x1e\xe1\x91\x5b\x81\xee\x5a\xe2\x17\xbc\xd0\x6d\xf2\x33\x20\x05\xc4\xa8\xd0\x92\x74\x80\x97\x1d\xb4\x71\x10\xe2\x20\x61\x2e\xdf\xcc\xf1\xec\xa1\xf5\x45\x9d\x91\xbc\x37\xfe\x30\xeb\x0c\xf9\x7c\x95\x7b\xc2\xed\xb3\x1a\x89\x0a\x63\x39\x8b\xb3\xce\x39\xd8\x9c\xb3\x3d\x95\xb3\xc1\x59\xa8\xed\x29\x6c\x5a\x60\x83\x4a\x55\x20\xe7\xc6\x1c\x2f\xe4\x44\xc4\xdc\xc4\xa1\x93\x55\x65\x7e\xa4\xf2\x46\x50\x34\xff\xb9\x56\x09\x8a\xa4\x8d\xc1\x8f\xe6\x8b\xac\x39\x94\x2b\x59\x88\x16\x60\x4d\x67\x74\xd4\x0d\x4f\x97\x81\xf0\x9b\x9a\x62\xe2\x15\xb4\x62\xdd\xe0\xd4\x10\xb5\xd2\x3b\xd7\xc0\xa6\xb6\xb6\x67\x09\x62\x25\x7a\xbe\xf1\x1a\xee\x7b\xff\x42\x3a\xf5\xa2\xbc\xe0\x25\x37\x50\xf9\x43\xb5\x71\x72\xdb\x78\x78\x1b\x88\xe9\x8f\xa7\x22\xd1\xec\x64\x03\x1d\xb4\xe3\x3a\x31\x8d\x23\x17\x07\xfd\xbe\xe9\xfe\xc5\xd5\x65\x30\x58\x0b\xa1\xab\xb5\xc1\x23\x16\xcc\xd8\xa8\xaa\x86\x91\x57\x24\xe8\xdb\x0c\x93\x8a\x24\xbe\xb6\x5e\xd5\x2e\x6e\xce\xb7\xab\x11\x92\x2f\xa3\x41\xc3\x71\x09\x9f\x6c\x66\xed\x3c\xf0\x5d\x5f\x97\xe8\xd4\x0d\x50\xb8\x95\x81\xae\x9e\x5a\xa7\x36\xa0\xfd\x9a\xaa\xfa\x56\x39\xa1\xb2\xdc\xba\xd9\x7b\xab\xda\xe8\xef\x2e\x71\x5b\xc4\x47\x93\xfd\x45\xfa\xf2\x13\x14\x65\x6a\xb9\xa8\xba\x88\x45\xdc\xd3\xbc\x15\x2a\xb9\x4a\xf3\xa4\x70\x6f\x70\x34\x0f\xcf\x28\x36\x54\xf1\x98\x51\x9c\x17\x0c\xf0\xc6\xee\x3b\x59\x7e\x9e\xb6\xbc\x7c\x2b\x71\xcf\xbe\x4c\x39\xa4\x1d\x8e\x5b\x03\x5d\xe6\xa5\xd7\x9a\x69\x83\x2b\x0f\x8b\xf6\x1a\xf2\x41\xda\xeb\xb3\x59\x10\xc3\x43\x7f\x41\x13\xb2\x63\x80\x2c\xeb\x28\x42\xda\x9b\x1a\x51\xd8\xbe\xdf\xbc\xb2\xf9\xd9\x7a\xef\x41\x44\xc4\xfb\x8b\xd7\xc0\x60\x1d\xa1\x00\x68\xfd\x62\x0a\xf3\x67\x00\x6b\x6f\x9f\x6c\x85\xf7\x65\x77\x8a\x72\x62\x10\xe7\xc5\x62\xd6\x71\x25\x91\xf6\x11\xb2\x5e\x40\x71\x37\x20\xde\xd9\x20\xcc\x29\x9a\x56\x62\x13\x27\x8d\x39\x5f\x9a\xa0\xbf\x68\xe9\x24\x6a\xf8\x43\xbf\x7b\xf9\x80\xc3\xf8\x61\x78\x6d\x3d\xf9\xad\x94\x6f\x53\xb6\x70\x22\xdd\x81\x2b\xaa\x52\x2c\x66\x02\x8c\xcb\x6c\xa3\x88\xdf\x3e\xff\xd2\x3f\xca\x0a\x2f\xab\x30\x8b\xd0\x50\x26\xcb\xd8\xbe\x70\x7d\x55\xe4\x54\xa9\x77\x37\x6c\x2b\x11\xb4\xd1\xaf\x71\x23\xae\xdc\x24\xec\xc2\x57\xa0\xc8\x83\xc7\x1c\xe4\x22\x10\x18\x61\xdb\x05\x4f\x5a\xb4\xff\xc1\xb7\x61\xb2\xc4\x4d\x60\xcf\xc6\x1a\x6b\x1f\xab\x7e\x39\x2c\xb1\x2b\xdb\x8c\x84\xc9\xf2\x9f\x5c\x6d\xef\x4e\x88\x75\xbb\x7c\x30\x1e\xd2\x5b\x0d\x9c\x2b\xc1\x40\x10\x5b\x4c\xfa\x9a\xf1\x5f\x37\x8c\x2a\xc5\x7a\x4f\xfc\xfc\x69\x2e\x5e\x45\x2f\xe6\xfc\xc9\x8d\x65\xbe\xe6\x64\x5a\x76\x88\x4a\xd7\xac\x87\xe7\x2e\x08\x2e\x9e\x2f\xb0\xa4\x8f\xc3\x1d\xf6\x03\x95\xfa\x7d\xd2\x5f\xb4\xb7\xd8\x5b\xb9\x57\x7c\x46\x90\xa0\xe3\x5c\xfc\x7a\xb9\xd1\x7b\x24\x65\x0b\xea\xb5\xad\x63\xce\x32\x66\x85\x29\x7f\x8a\x3d\x72\xf5\xdf\x12\xb7\x2b\x00\x92\x90\xeb\xdf\x55\xdf\x55\x7c\xa9\x18\x64\xb6\x12\x63\x57\x5c\xb0\x07\x96\xc3\xee\xf0\xa5\x28\x84\xc3\xec\xf8\x9d\x7c\x1c\x93\xad\x7e\xcb\x40\xb7\xf3\xa9\x2f\x73\x43\xbf\xc4\x64\x09\xdf\xd5\x35\x24\x94\x08\xbe\x85\xe6\x21\xeb\x96\xd0\x86\xfd\xd7\x77\xe7\x36\x30\xea\xd2\x8c\x75\xc7\x58\x9a\xf9\x02\xaa\x77\xb7\x82\xcd\xaa\xc1\x10\x5d\x5e\x98\xff\xe6\xf9\xb6\x9f\x82\x9b\x5b\x35\x5a\x60\x6d\xeb\xce\x37\x71\x49\x50\xe6\x13\x3e\x72\x2d\x60\x1f\xf2\xf4\x28\x7d\x3c\x71\x94\x9e\xf6\x31\x33\x9c\xb4\x59\xbf\x0f\x81\x18\xd3\xe9\xed\x28\x6f\x70\x94\x7e\xa3\xfe\x45\x62\x0f\xbb\xe0\x6e\xf5\x6f\x26\x10\xcd\xf1\x40\xe4\x30\x00\x5f\xee\xf7\xb5\xc6\xb6\x6f\x36\x9a\x91\x40\xab\xc7\x14\xe4\x7c\x01\x67\x20\x9f\xd0\x4a\x5f\x5b\xe2\x8d\x4f\x51\x16\x80\xd3\x5c\x99\x93\x14\x86\x91\x26\x68\xfe\x93\xcf\xfc\xbb\x4f\x3d\x75\x1a\xd0\x31\x9c\x5c\xf0\xb4\x49\xaf\xe2\x08\x2c\x17\xe3\xcd\x81\x54\x1d\x61\xff\x64\x88\xca\x1b\xf2\x77\x0a\xd8\xfd\x9a\x34\xdd\x5b\x7a\xba\xb9\x34\xcf\x7a\x46\x45\xec\x99\xba\xd9\xc2\x7f\x30\x93\xcc\x4d\x75\x80\xfb\x70\x36\x87\xc8\x5c\x69\x57\x1e\x12\x0c\x34\xb1\x8b\x13\x0f\x9d\xbe\x7f\x58\x68\x66\x34\xc6\x85\x72\x37\xdb\x71\xc5\xe4\xdb\xef\xaa\x98\xfb\x80\xf5\x94\xd8\xfd\xb7\xaf\x7a\xff\x6a\x80\xd7\x1c\x22\x55\xac\x16\x97\xee\x6f\x5a\x3e\x1f\x2d\xe3\x86\xfb\x8b\x23\xe2\x59\x8b\x2d\x21\xdc\xa8\x39\x86\xe6\x40\x83\x2c\x1d\x16\x22\x75\x16\xb2\xc1\xdf\x67\x9a\xea\x29\x86\xab\xf0\x31\xb7\x0b\xc3\x6e\x3f\x0b\xe9\x0e\x39\x5a\x6d\x1a\xfe\xd3\x0b\x9f\x38\x4e\x03\x4e\xc8\xd2\x4f\xd8\x4a\xe8\x7a\x9c\x6a\x2a\xb7\xf3\xcc\xdd\xad\x29\x03\xc1\x95\x61\xa7\x83\xbe\x7a\xcb\xa4\x71\xf0\xae\xe5\x2a\x08\x74\xa9\xcd\xaf\xb8\xfa\xe3\xf3\x2d\xcd\x09\x39\x2e\x0c\x9b\xc3\x16\x66\x7c\x29\xd0\xff\xc3\xd2\x4a\xae\x6f\x01\x42\x0a\x3f\xb4\x96\xbd\xde\xb2\x54\x3d\x05\x1a\x7e\xbb\xd6\xc8\x49\xa8\xbf\x73\x9e\x3f\xcd\x61\x36\xcb\xe8\x53\xa5\x91\xb0\x45\x49\xb8\x68\xb3\xf4\xba\xf9\xfd\xa7\x6e\x85\x4a\x08\xa3\x6a\x29\x14\x5e\xf5\xef\x69\xe2\xdd\x36\xd2\xfe\x22\x4e\xdc\xc7\x81\x4e\xb8\x3d\xed\x97\x79\xb0\xac\xfb\x5f\x9f\xbd\x7a\x69\x8e\x98\x6f\xd5\xda\x9b\x5b\x9a\xbf\x43\x50\x4f\xc0\xa0\x2d\x8a\x9e\x96\x0a\xa6\x1f\xf2\x93\xf4\x47\x30\x76\xee\xdd\xf9\x88\xb2\xff\x83\x85\x90\x79\xfa\xa5\xa8\x34\xdd\x4c\x65\x5f\xdc\x92\x0a\xeb\x64\xa2\x34\x04\x13\x86\xc1\xe7\xd2\x06\x95\x8a\x91\x7f\x30\xcd\xe4\xe2\xa3\x72\x73\xa2\x65\x66\xc5\xf8\xc2\xe3\x9b\xc7\xaf\x63\xfb\x19\x19\x40\xb5\x76\xcb\xd2\x4d\xff\x60\x54\x09\x28\xf7\xa1\x9f\x42\xcd\x0d\xf2\xc5\x15\x07\xc6\x86\x30\x0d\x80\xcf\xcd\x99\xe9\x5d\xff\x64\x59\x49\x9c\x90\xf7\x8a\xa5\xa3\x80\xf2\xad\xa1\x11\x8c\x66\xde\xc1\xfc\x80\x7f\xc4\x70\x39\x67\xce\xf7\x31\x23\x95\xdf\x8f\xc3\x14\xd1\xde\xf2\x9b\xc4\x3f\x3e\x44\xf3\xff\x82\x65\xd4\x4e\x04\x91\x68\xf5\x9c\x55\x0a\x9d\x9e\xc7\x77\x38\xdc\x3f\xdb\x19\x41\x6a\x7e\x42\xec\xf9\x07\x13\x66\xfe\x5a\x0d\xd8\xb9\xcc\x96\xa3\xac\x96\x22\x5f\x4e\x58\xbe\xe0\x06\xe4\x1b\xe7\xff\x64\x02\xfd\x02\xb2\xe1\xf8\xc2\x61\x70\xe0\xad\x16\x44\xab\x8d\x32\x1d\xc8\xd1\x09\xd3\xef\x7f\x41\xf6\x9f\x21\x13\x78\x08\xbd\x4a\x11\x9c\x8b\xd1\x2b\xa7\xac\xe7\x80\xbf\x5f\x96\x1c\xff\x8b\x93\x1d\xaa\xf1\xb4\x02\xf0\x78\x75\x0d\xc1\x70\x76\x9b\xd7\xe8\x14\xfd\xb1\x96\x7f\x80\xbd\x3a\xd0\x5f\x8d\x88\x7c\xca\x4e\x80\xb1\x8f\x49\x78\x46\x8b\x98\x56\x1c\x06\x7c\x21\xcf\x32\x36\xfc\x8f\x6b\xe8\xf2\x1c\xce\x87\x7e\x83\xea\xe8\xc0\xc0\xfc\xd3\xf4\xed\x8c\xf2\x01\x18\x88\x34\x12\xfe\xef\x75\xb9\xc6\x5b\x0a\x80\x84\x8d\xad\x46\x6b\x8b\xd7\x52\xf0\x2a\x69\xf9\xf7\x1e\xd1\x84\xfe\xbf\xb1\x4f\x53\x8e\x93\xfd\xf7\x3f\xd9\x6f\xb9\x98\x8e\xe7\x33\xe1\x80\x92\x22\xf0\x85\xb4\xdd\x3d\xe6\x9f\xcf\xf7\xf3\x77\x7f\x46\x6d\x1b\xaa\xa9\xb7\x53\x4c\x7b\xcb\x30\x81\x4f\x83\xed\x72\x9b\x70\xff\x63\xa6\x34\x3c\xf8\xc1\x58\x01\xa8\x7d\x31\xcf\xf5\xff\x1f\xd7\x0e\x60\xb1\xfa\x09\x79\x7b\xb6\x49\x6c\x92\x06\xb7\xfe\x30\x27\xb5\x48\x10\xb2\xcc\x1a\xe0\x13\x73\x75\xa7\xe8\x7f\x7c\x2e\x45\x2d\xc0\xe7\x74\x6a\xc6\x66\x14\x60\xf9\xf8\x32\xfd\x58\xef\xef\x18\xb9\xb3\x53\xfe\xbf\xcc\xc6\x1e\x74\x55\x4b\x9f\xd2\x17\xb4\x5f\x01\xb7\x72\xa8\x3a\x2e\xaf\x89\x29\xc8\x80\xba\xe0\x9f\x5e\xc4\xc0\xdc\x43\x63\xf2\x13\x6a\xc6\x15\xb8\xbb\x87\xd2\xdc\xfa\xc7\xf8\xbd\x97\x7f\x00\xc2\x44\x55\x34\x3e\x35\x78\xd9\xf1\x80\x5a\x1a\x81\x39\x98\x81\x62\x8d\xe0\x48\xbf\xd5\x80\xb2\x50\xdb\x32\x2d\xff\xd4\xb6\x06\xc9\x0b\xf9\x45\x99\x8e\x15\x7c\xbf\x36\xfd\xdb\x62\xd2\x5b\x90\x0d\x7c\xda\xe8\x94\xdb\xe2\xbf\xdc\x97\x97\x07\x00\x49\x0d\x65\x78\x88\xe4\x40\xef\xfa\x3e\x52\x47\x40\xcb\xe3\x03\x4d\x10\xf1\x57\x8f\x73\x71\xba\xa2\xdc\x1c\xe2\x7f\x9e\x6e\xbf\x1c\xc1\x09\x08\x73\x30\x4e\x93\xec\x2d\xe9\x8e\x2e\xf1\xb8\x88\x78\xd4\x90\xd2\xfb\x6b\x59\xbb\xa7\x9c\xa5\xf0\x8f\xb4\x9d\x33\x71\x50\xcd\x91\x13\xe3\xe3\x2e\xde\x7f\x7f\x8f\xf3\xfc\x36\x81\x46\xea\xcd\xbe\x46\xc2\xae\x6e\x97\xa7\xc0\x27\x89\x83\xac\x1e\x8a\xd3\x22\xf0\x77\x9c\x8a\x09\x35\x78\x86\xff\x69\x3b\x9c\x13\x39\x79\x0c\x0d\x80\xce\xf5\x59\x14\x8b\xf4\x3a\xc1\x26\x46\x66\xf9\xb7\x8e\x19\x68\x01\x74\xfb\xbd\xe7\x3e\x45\x41\x27\x38\x01\x3d\x6b\x42\xe0\xfd\xc9\xef\x6d\x9e\xd4\xb2\xec\x90\xa3\xb3\x2a\x30\x7c\xdb\x63\x38\xe1\x15\x7e\x35\xf4\x8b\x19\x87\x12\x28\x90\x74\xbf\x99\x17\xf7\xf8\x0c\x7a\x80\x99\xb2\x67\x0a\x80\x19\xe1\xc0\x45\x00\xa7\xa8\x9f\x46\xbb\xa7\x1c\xa0\xe2\xb4\x7f\x91\x67\x9c\x63\xee\x17\xb3\xf7\x00\x00\xf7\xc8\x7f\xa9\xf8\x7f\xd9\x61\xb7\xd9\xa8\xfa\xd9\x89\x3f\xea\xe0\xf8\xb3\x76\x63\x4c\xb3\x9e\x5a\x14\xc7\xf1\xe2\x9a\xea\x93\x6d\xda\x7b\x7c\xc1\x68\xf2\x75\x62\x94\x84\x2d\x48\x50\x11\xc2\x3d\x0a\x5d\xb5\xc8\x40\x7b\x61\xa9\xf0\x70\x2a\x38\x63\xf0\x00\xcd\xc9\xbb\xb9\xa3\xcc\x2a\x0d\x0d\x1d\xa8\x77\x15\x1e\x33\x7b\x3c\x61\x63\x57\x43\x68\xb4\x1e\x89\xa4\x35\x31\x98\x6a\xa1\x21\x14\x4d\xd6\xb9\x45\x4d\x2c\x96\xbc\xb2\x75\xda\xbf\xe7\xc8\x4e\xe4\xc9\xc1\xb1\x17\xd2\x37\x82\xe7\xfd\xd6\xfc\x84\x5e\x63\x1d\x38\xe1\xa7\xa6\x24\xd7\xd3\xc4\xd4\xcf\x4b\xc4\xdf\x92\x7f\x37\x02\x78\xe5\x6d\xb3\x2b\x11\x5e\x7a\xe6\xc5\x93\xef\xb9\x15\xb0\x55\x7b\x22\x34\x21\xdc\x23\x2c\x97\x2a\x7a\xdb\x8d\x75\x7c\xf5\x40\x6b\xe0\x83\xbe\xc9\x0f\xf4\xf6\xcb\x9f\x39\xc8\x73\x34\x6f\xbc\xa1\x35\xdd\x4b\xbb\xeb\x9f\xe4\xaf\x0c\x62\xd0\x84\xc0\x69\x1a\x68\x3d\x4a\xd2\xfa\x10\xbd\x8a\xe2\xf4\xda\xee\x2e\x8e\x59\xc2\x57\x35\x8a\x7d\x13\x1d\xbf\xd3\xd6\x8a\xd1\xa1\x1e\x11\xc6\xfa\xd2\x68\xc5\xba\x02\xa0\x52\xef\xa7\x85\x71\x26\x27\xdd\x5b\x77\xc2\x5d\xcb\x3d\x75\x00\xa5\x41\x74\xb8\x19\x7e\x6d\xf6\xd5\x48\xe6\x4a\xe5\x0b\x45\xf0\x9d\x8b\x38\x45\x2b\x2e\x99\xeb\x27\x36\xf6\x71\xcd\x9d\xf1\xfb\x81\x05\xdc\xa7\xd4\x19\xfc\xc0\x50\xf7\x87\x5a\x2b\x55\x75\x49\x8b\x58\xe6\x82\x7c\xf0\x6b\x22\x5f\x55\xf3\xe6\x52\x0e\x62\x55\xcd\xb3\xcd\x0e\x43\xa7\x66\x12\x02\x62\x10\x59\x8d\xea\x10\x87\xe0\xae\xaa\x31\x91\x7c\xcf\xe2\x36\x6b\xc6\xb6\x6b\xcd\x8d\x00\xc7\xc9\xba\xab\xbd\x07\x5d\x1e\x3b\x52\x76\x6a\xe8\x2f\x02\xf1\xdd\x25\x4e\xd1\x92\xcb\xea\x26\x34\x2f\xe9\x2f\x1b\x29\x59\xc8\x32\x5a\x15\x5c\xfc\x07\xa3\x78\xb5\x05\x72\x33\x5c\x04\x12\x74\x2c\x00\x71\x50\x72\x56\x63\x8b\x7a\x1f\xda\x92\x8e\x09\xb4\xad\xbe\x39\xcc\x00\xc2\xd9\x3b\x33\x0f\x26\x1d\xda\xe4\xf9\x7e\x6b\xee\x67\x2e\x66\xd9\x82\x6d\x88\x82\x54\x5e\x37\x6a\x70\x90\xdf\x41\xa1\x62\xac\x08\x71\xed\x5e\xa5\x9c\xcb\xe3\x31\x02\x3f\x32\x94\x59\xb2\xd4\x45\x9d\x39\x9a\xb3\x1a\x13\x63\x6b\x47\xb5\xe5\xb8\x22\xcb\x2a\x7d\x2e\xfe\xec\x44\x90\x14\xce\xa5\x43\xac\xe9\x4c\x35\x21\xe5\x65\x83\x0b\x04\x82\x8f\x44\xbd\xaf\xfb\xf5\x8a\x78\x92\x4f\xfe\xde\xc8\x48\x8e\xb3\x9a\xbd\x71\x4c\xd4\xf6\xf9\xb5\x03\xd5\xa2\x63\x8b\xcb\x9e\xc8\x98\x90\x2b\xa8\xc3\x37\x29\x3c\xcf\xe0\x51\x8c\xc0\xfa\xd1\x4d\xbd\x2d\xb3\x01\xcc\x92\xe7\xf7\xeb\x8b\x3f\x1d\xf0\x4e\xd9\x6d\xc2\x31\xfa\xc7\xd6\x0c\xfc\x1d\x86\x2f\x47\x51\x4e\x07\xd6\xaf\xa4\x9a\x6f\xc4\x9d\x4a\xbc\x7e\x64\x18\xd7\xd7\xcd\xfa\x6e\x2e\xc3\x1d\x9c\x5b\xf5\x0e\xcc\xb9\x68\x37\x92\xd8\x28\xaf\x55\x45\xcf\xa4\xa8\xb1\xf7\x32\xf7\x11\xe7\x28\x71\x1b\x21\x74\xaf\x69\x0e\xf6\x72\x1b\x2f\xe6\xb5\xf5\x23\x67\x49\xfd\x4a\x1b\xf7\x49\x80\x94\x48\x04\xd1\x78\xe1\xd3\xdb\xad\x2f\x57\xf8\x73\x25\x3d\x39\x1a\xc8\x34\xca\x2f\x11\x13\xd5\x2b\xa7\x1c\xf2\x95\x31\x6c\xf0\x1b\xe1\x49\xb7\x54\x01\x71\x98\x9b\x53\x14\x46\xf5\x4f\xca\x0e\x52\x35\xf6\xdf\xec\x73\x76\xfa\x51\xb9\xc4\x8a\x58\x2c\x81\x5a\x9c\x13\x1e\xf1\x3f\xde\x55\x80\xd3\xec\xfd\xae\x95\xc3\x44\xf6\x34\x1e\x1a\xfe\xc6\x7a\xbb\x29\x3e\x4b\x2c\x88\xf4\xb5\x39\x35\xb3\xbd\x4b\x69\x5a\x31\x69\x54\x1c\x0b\x48\x44\xa7\xb0\xd8\x56\x92\x1e\x15\x1d\xc9\x55\x54\xd9\xd1\x2f\xb6\xda\x77\x4c\x43\x2e\xfd\xfd\xbe\x57\x1c\x75\xea\xc1\xe5\xe0\x7b\x81\x22\xbf\xcf\x0a\xaa\xcf\x7e\x54\x24\x1a\x1d\x9c\x1a\x87\x91\xf2\xad\x71\x3c\x3f\x10\x1e\xe1\xb0\x3c\xe3\xbf\xb7\x43\x84\x1b\xc4\x1e\x54\x8b\xfc\x65\xb2\x0c\x39\x59\x59\x8f\xeb\xb1\xf3\xe3\xbe\x83\xf3\x67\xaa\x16\xf8\x18\x2c\x6c\x32\x18\x74\xbc\x51\x07\x8b\x89\x0d\xc9\x58\x4c\x5c\xc6\x56\x7f\xb6\x6c\xd9\x41\xa2\x0a\x7a\x24\x6b\x50\xec\x93\xbb\x85\xe7\xb1\x71\x53\x87\xef\x23\xf2\x44\x41\x1c\x50\x8d\x7f\x11\x3b\x8e\x96\x64\x01\xf1\xf5\x05\x97\x22\xdc\x57\x53\xb6\x23\xa1\xb2\x04\x5b\x42\xd0\x72\xd7\x82\xa2\xbc\x4e\xce\xe5\xd4\x6a\x42\x47\x45\x59\xfa\xe5\x34\x15\x83\x24\x8d\xeb\xf1\x5a\xa7\x39\xaf\xe3\x12\xfd\xc5\xa2\x08\xcd\xa6\xee\x5f\x5e\xa9\xef\xf9\x17\xc7\xa7\x4d\x8b\xf1\xf8\xfa\xe4\x7b\x3b\x26\x22\xf4\x3b\xd1\x0a\xa2\x81\x18\x8f\xe1\x25\x40\x37\x47\xa4\x49\x98\xb0\x13\x02\x7a\x43\x9d\xed\x5d\xcf\x29\xe6\x58\xd7\x81\xfa\x38\x9a\xaa\x32\x1c\x3d\x9e\x19\xf1\xaf\x1c\x7c\x24\x3a\x20\x29\xbe\x90\x6f\x6e\x9d\xa9\x0e\xcc\xf7\x1b\xfd\xf2\x72\x1a\x8a\x69\x87\xb2\x84\x7c\x76\x85\x40\xd9\x67\x8c\x26\x01\x7e\xb5\x00\x99\x1d\xf0\xaa\x33\xed\x75\xd5\xad\x5c\x1a\x75\xc3\x85\xe0\x62\xd0\xa7\x01\xdd\x30\x3a\x40\xf4\x7b\x78\x5b\x69\x60\x4f\xaf\xad\x5c\x23\x01\xa2\xeb\xd4\xef\x14\x48\x92\x72\xc4\x57\x49\x98\xca\x58\x36\x3f\x34\x96\x42\x5a\x8a\xa7\x9f\x2c\x83\xaf\xea\x36\xd5\xf5\x9d\x94\x8d\xa9\x28\x68\x7f\x87\x4b\xdc\x26\x04\xb8\x00\x1a\xad\x99\xe5\x8e\x4f\xb3\x6e\x02\x92\xb1\x9d\x98\x84\x17\x52\xf3\xb6\x1d\x02\x4e\xa7\x06\xa6\xe7\x2b\xd5\xc5\xaf\x85\xe0\x00\xb1\xd6\x2b\xff\x40\xe2\xc4\x19\xe2\x5b\x64\x1d\xfa\x25\x39\x27\x4c\xf9\x70\x1b\xbf\xe5\x26\x56\x32\xfc\x2a\xdf\x7f\x31\x2a\x9a\xe0\xea\x00\xa7\x04\x0d\x4c\x3e\x48\x61\x7a\x9d\x21\x66\xb9\xc9\x68\x09\xbd\xe0\x2c\x03\xac\xb6\x0b\x68\x4c\x50\xad\x21\xd5\x1e\x25\xa8\x48\xa1\x4e\xe8\x51\xb1\x65\x2e\x4e\x31\xef\x69\x5a\xd0\x83\x73\x7c\x19\x51\x16\x21\x6f\xa9\x19\x46\x32\x5c\xe5\x62\xd0\xef\x0e\x79\xad\x14\x06\x21\x08\x19\x8f\xd0\x31\x53\x7e\x2f\xae\x2e\x8e\xf7\xee\xc9\x57\xae\x51\x57\x4b\x26\x9f\xb3\xce\xfb\x79\xb2\xf0\x53\x52\x10\x33\x6d\xf7\x0f\x29\x3f\xc1\x38\x98\x6c\x4f\x45\x5f\x54\xe4\xe3\xd4\x62\xb3\x7c\x25\x4c\xc2\x71\x67\x24\xa8\x67\x4b\xa4\xfb\x70\x20\x7e\x66\x24\x64\x65\x5e\x71\x99\x71\x8d\x00\xed\x93\x3f\x2f\x2b\xe7\xe6\xb6\xe6\xc5\x42\xb6\x7d\x46\x09\xb6\x38\x3e\xb5\x3a\xc0\x6d\x38\xdd\x42\xbb\x45\x9a\x39\x83\xe4\x72\x91\xa8\xf1\xa0\x56\xc5\xe7\xfb\xe0\x54\x57\xab\x33\x97\x81\xb3\x7d\xb6\x53\xd3\xbb\x05\x61\x5f\x0a\x6b\x87\xf6\x56\xe9\x52\xf4\xcb\xde\xc7\xe0\x78\x48\x42\x36\x76\x7d\xb0\xd5\xb8\xbe\xb7\x17\x95\x84\xe2\x0a\x6a\x08\x2e\x90\x9e\x37\x9a\xfc\x9c\xb5\x21\x58\x6a\xcd\xc3\x49\x6e\x72\x86\xef\x07\x9d\x06\xb6\x96\xfc\xaa\x51\x49\xa2\x10\xb8\xe4\xd6\x40\xd3\x37\x10\xd1\xac\xd8\x4c\x94\x3b\x74\x5e\xb0\x5c\x56\x28\x62\xb6\xf9\x4d\xe1\x26\xc6\xd3\xa2\x94\x98\x3c\x23\x30\x81\xde\x5d\xa9\x7f\x18\x8c\xc3\xd4\xad\x8f\xf1\x0c\xdb\x69\x79\x41\x85\x7f\x04\xde\xc7\x70\xc5\xef\x6c\xfb\xc5\xe9\x48\x26\xaa\xc4\x20\xc5\xf5\xfa\xff\x8f\xb9\xff\xe8\x99\x18\x6b\x96\x83\xc1\x9f\xa3\x19\x70\x34\xf4\xee\x0a\x5a\xd0\x7b\xef\x6b\x47\xef\xbd\xe7\x60\xfe\xfb\x87\x6e\xdd\xdb\xdd\xd2\x56\xef\xe2\x7d\x36\x0f\x0b\x55\x85\xe2\x21\x4e\xc6\xc9\x8c\x4c\x44\x04\xaf\x6c\x81\xe8\x0e\xda\xf8\xa7\x4f\xdb\xcc\xda\x96\xe4\xe8\x0f\x0a\xd8\xb8\x1b\x84\x91\x7d\xdc\x1d\xd2\x15\x27\x61\x76\x0f\x25\x98\x13\x43\x8f\xa3\x6f\x78\x92\x0e\x1f\x80\xf3\x7b\xcd\x06\x0a\x73\x43\x64\x40\x21\xb7\x66\xf7\x6c\x6e\x9d\xc7\x76\x7f\x06\xa6\x8d\x98\xf6\x85\x96\xd5\x9f\x29\x5a\x89\xbc\xf3\xdb\x3e\x5e\xd8\xd7\x0f\xf1\xaf\xc0\x56\x75\x0a\x99\xe2\x38\x49\xa3\xbf\x8d\x29\x99\xa5\xf0\xee\xba\xc3\x8f\x6e\x20\xe3\xc4\x5d\x4b\xca\xc8\x07\x4e\x5e\xb4\x75\xd0\x46\xf3\xcd\xbb\x45\x35\x9b\xfb\x70\x02\x12\xc9\x9c\x85\x6a\xfb\xb2\x44\x3a\x1a\x02\xe1\x6d\xc7\xce\x6a\x9d\x7c\x77\x1c\xf5\xd5\x14\xbb\x30\x19\x72\x4b\x20\xb7\xab\xc9\x6d\xbc\x20\x1e\x68\x4c\x83\x8f\x28\x32\x0a\x20\x41\xb6\x81\x66\xf3\x4c\x80\x49\x3f\xba\x1e\xa7\x91\x2f\xde\x38\x01\x60\xf9\x91\x1b\x56\x12\xe5\xf9\x59\x5d\xba\x4f\xa8\xdb\x9b\x07\x50\x9e\x7b\x7e\x3f\x9e\x8f\xa7\xb6\xdc\xec\xd2\x6c\x59\xd4\xbd\xf2\x4b\x3c\xe9\xdb\x2d\x4c\xdf\x00\x4a\x96\x2c\xf7\xe3\x0e\x3a\x56\xa6\x2e\xad\xd8\xf9\xab\x7b\x60\xd8\x6f\x9b\xc0\x2b\xd4\x5f\xda\xc8\xcd\x2a\x98\xfe\x53\xc7\x6d\x60\x78\x41\x09\x72\xdd\xf2\x55\x45\x08\x5a\xf0\x3e\x96\x07\x43\xf6\xd0\xb0\xe7\x30\x68\x6a\x82\x59\x64\xae\x56\x34\xcf\xdd\x04\xcc\x94\xb0\xbc\x49\xdd\xcf\xac\xec\xf7\xd8\x6d\xe4\xe6\x5b\x93\x00\xbf\xc2\xe2\x70\x83\xfa\xe9\x9a\xcb\x28\xaa\x98\xb0\x7b\x69\x4c\x2b\x9c\xc6\x1b\x09\xd3\x44\x15\x35\x23\x18\x0d\xe2\x2f\x0a\x44\x7a\xd7\x2c\xcf\xf1\xa5\x47\xc0\x0d\x50\x3f\x20\x60\x72\x36\x53\x3a\x11\xd7\x97\x66\x6c\x41\x18\x56\x63\xd1\x66\x1e\xe6\xfa\x07\xf0\xd7\x9e\x48\x29\xc1\x87\xb6\x65\x98\x60\xf5\x61\x56\xce\xc0\xb2\x04\x67\x17\xfa\xc3\x17\x0d\x85\xfb\x17\xcc\xf3\xfe\xd0\x95\x6b\xed\xcc\xfe\x3f\x8b\x0d\x59\xcb\x1c\x43\x11\x67\xc5\xfe\x7a\x10\x04\x68\xfa\x93\x44\xef\xba\xb4\x85\x22\x41\xac\xa3\x40\xfd\xa5\x24\xad\x14\xf9\x0a\xe2\xb9\x5b\x61\xb5\xcf\xfd\x96\x26\xca\xcd\x03\x7e\x8a\xa9\x4c\xe1\x22\xf9\xab\xaf\x7a\xd9\xfb\x5c\x5d\xf7\xfd\x45\x62\x95\x93\x46\x28\x01\x8a\x1d\xce\x16\x07\x15\x39\xd7\x29\x9a\xfd\x08\xc9\x5d\x6e\xc7\x49\x40\xec\x04\x20\x93\x1d\xa3\x65\x61\xa7\x61\x1b\x88\x27\xf9\x57\xdd\x6a\x70\x01\xab\x2a\x23\xa3\x42\x9d\x0e\x6e\x2c\xee\x82\x8a\x7e\x4f\x79\x28\x26\x60\x8a\xfd\x32\x90\xe2\xdb\xc0\xa8\x35\x38\x07\x5e\x66\x08\x72\x2d\xc0\x89\x10\x87\xce\x1f\x1d\x46\x4c\xc7\x16\x03\x6a\x07\xd2\xb9\xad\xc7\xb5\xa6\x52\x37\x72\x3f\xfa\x56\x1f\x0a\xb8\x7e\x40\x69\xa1\x3b\x66\x4a\x24\x89\x80\x06\x84\xc6\x51\x91\x47\xfe\xf9\x97\x9e\x5b\xcd\x09\xec\xb7\x06\xd3\x11\x7d\x20\x0c\x59\x19\x38\x5d\x0b\xe4\x83\x59\x2e\xd0\x97\xae\x01\x35\x65\xb5\x6d\xa0\xd5\x37\xff\x5a\xec\x68\x03\x15\xb5\xb5\xb9\x59\x1f\x68\x31\x74\xee\x1d\x48\x9b\x22\x72\x7b\x5a\x0a\x4b\x9b\xc1\x04\xfb\x29\x79\xa6\x19\x36\xa9\xed\x3a\x58\x3d\x89\xba\xed\x51\xc5\x51\x58\xe6\xae\x09\x80\xc4\x0d\xbc\x5e\x24\x49\x17\x71\x73\x5d\xe4\x66\xe2\xc5\x09\xdc\x4b\x0c\x2a\xa8\x16\x7e\x79\x9f\x00\x2e\x49\x48\xe7\x36\x76\xba\x01\x81\x95\xc8\xd4\x54\x71\xde\x7e\x08\xc2\xe1\x8c\x62\x23\xa5\x7b\xf6\x7f\xd5\x51\xe9\xad\x2c\x72\x98\x90\x04\x3d\x4c\xeb\x97\x55\x25\x48\x5f\xda\x98\xd9\x80\xcf\x08\xb1\x4f\x14\x58\x37\x88\xbf\x41\xc7\x6a\xcd\x05\x13\x71\x2a\x7c\xee\xa8\xc0\x59\x18\x5f\xeb\xa1\x4d\x46\x9d\x3b\x63\xfb\xba\xd6\x70\x4a\x10\x26\xc7\x11\x02\x6d\x0c\x47\xc6\xc7\x27\x80\x58\x0e\xf4\x6f\x0e\xa4\x08\xce\x4e\xe4\x17\x9a\xfc\x73\x23\x9b\x05\x82\x56\x60\xf5\xe4\x96\xba\xf7\x5f\xe2\xb9\xad\xfa\x63\x3d\xa6\x6c\x20\xaa\xb5\x50\x10\x88\xef\xed\x40\x33\x70\x50\x4b\x1b\x3c\x6f\x21\xb9\x05\x64\x14\x3b\x5e\x48\x84\x28\xa3\x9c\xf9\x75\x07\xaa\xa6\xa1\x40\x20\xf0\xc1\xe1\x72\x61\x91\x27\xd9\xbd\xc1\x0b\x25\x31\x20\x08\x0b\xc0\x9e\x7e\x10\x09\x25\x69\x89\xe6\xe7\x36\x2e\x19\x5a\xf9\xd8\x58\x5e\x20\x10\xf3\x53\x77\x76\x6c\xff\xb7\x16\x5e\x2d\xb0\x29\xab\xf1\xfe\x86\x56\x34\xc0\x15\x93\xc8\xfc\xf4\x0a\x16\x88\x2d\xfb\x8d\xaa\xb2\x61\x75\x28\x49\xec\x67\x6c\xbc\x40\x79\x63\x1d\x83\xb7\xb0\x11\x2c\xb1\xed\x2d\xc6\x08\x98\x4e\x2a\xaa\x95\xc1\x73\x44\x62\x80\x1f\x7b\x1f\x06\x36\xcb\xfe\x68\x55\x2b\xb7\x80\x1b\x44\xb9\x24\x2b\x8e\x59\x8d\xfe\x2f\xa7\x73\x00\x82\x43\xbc\x0b\x61\xf1\x1f\x9a\xaf\x6c\xcd\xa5\x6e\xc4\xd8\x4c\x24\x74\xde\x94\x1e\xb6\xcf\xca\xb8\x6f\xac\xfa\xce\x24\x91\xa5\x59\xee\x36\xff\xae\x75\x5f\xf4\x2d\x8d\xdb\xc6\x93\x24\x6f\x56\xd4\x88\xfe\x73\x16\xb5\x87\x7a\xa3\x02\xc6\xf8\x9d\xe3\x52\x71\x48\x0b\x46\x70\x23\xe6\x03\x9d\xd6\x33\x09\x38\x92\x0b\x20\x11\x44\xe0\xab\x7e\x2d\xae\x93\x13\xfd\x1d\xed\x7b\x76\x75\x53\xe1\x3f\xf5\xf0\x3c\xe6\x64\x0f\xe6\x60\x70\xe2\x6e\x58\xad\xa4\x01\x93\x7b\x47\xc8\xfa\x88\x03\xb0\x1f\x4f\x3b\x41\xc6\xf8\x19\xb3\x0d\xd4\x69\xf0\x11\x8d\x2b\x20\xb5\x40\x5c\x4b\xc0\xa0\xcc\xa9\x3c\x28\xf8\xb2\xd4\xc2\xbc\x0f\x99\x7d\x14\x65\x65\x91\xef\x4c\xa7\x3d\x99\x8f\xa6\x77\x53\xba\xc7\x20\x00\xb1\x3e\x00\x3e\x04\x40\xe5\x9b\xc9\x86\x25\xf4\x37\xf7\xd8\xf7\x0d\xc6\xee\x2c\xa1\x7e\x05\x8b\x00\x38\x98\xa0\xf4\xe7\xc0\xa0\xbe\x50\x30\xf0\xf0\x99\x4d\xb3\xb7\xe8\xc5\x9b\x88\xa7\x81\x22\xe3\xf5\x15\x86\x5e\x44\x5c\x58\x5d\x9a\x8c\xea\x70\x85\x45\x5d\xd9\x30\xe1\x00\x56\xfd\x10\xdf\xdc\x91\xa8\x10\x6e\x86\x02\x32\xd1\xc3\x13\xa7\x69\x8c\x15\xb5\x75\xfc\xcc\x00\x7c\x49\xbf\x89\x9c\x10\x11\xa4\xa0\x95\x18\xff\xa1\xf3\xc8\xe2\xac\x7c\x4f\x8c\x0a\xfb\x55\x55\xda\x15\xa9\x61\xbb\xee\x43\xf8\x1b\xfb\xcb\x10\x67\x10\xa5\x2a\x7a\x54\xa4\xcc\x19\x84\xe1\x31\xee\x65\x7b\x38\x4a\x45\x33\x5c\xc0\xfb\x27\x92\x55\xc0\x8d\xc2\x85\x78\xd1\x5d\x80\x46\x81\x04\xda\xd7\x54\xa5\xc4\x03\x91\x95\x7b\x48\xcb\x75\x66\x63\x9d\x35\x38\x58\x15\x0b\x01\xd0\xf8\xa5\xd1\xc5\x21\x80\x7f\x6b\xc0\xb2\x07\x2b\xdf\x1b\x23\x4c\xfd\x26\xc5\xba\x37\x25\x14\x58\x3c\x36\x66\x95\xe8\xc2\xd5\x89\x2e\x69\x49\x97\x4f\x2f\xdc\xe3\x52\x47\x9b\xe7\x2b\xf4\x06\x48\xb1\xc4\xc3\x32\xfb\x18\xbd\xf1\x24\x37\x26\xd3\xf1\xc0\xfb\xdc\x19\xb7\xdb\xf6\x46\xf5\xe9\x63\xb4\x55\x9e\xd5\x6d\x33\xc5\xec\x6a\xd2\x77\x05\xd2\xca\x43\xfc\xcc\xe2\x29\xd2\x3d\xa0\xe8\x62\x0f\x42\xbc\x3d\x04\xec\x04\xce\xf4\x1f\xdc\x89\xe1\x88\x15\x07\xf1\x93\xce\x13\xf4\xaf\x47\x8b\xe1\xba\x40\xc0\x2b\x7a\xe1\xeb\x11\x9d\xa4\xea\xec\xf5\x38\x40\x91\xba\xdf\x25\xf0\x63\x70\x86\x49\x64\x6a\x0b\x05\x2a\x6f\x34\x34\x5c\xc0\x4f\x7a\xa7\x57\xc1\x79\x9b\x87\xfe\x4b\x78\xeb\x68\xa5\xbd\xc6\x75\x0c\xe4\x36\xaa\x4e\xbb\x20\x3a\xbe\x1e\xba\xb6\x39\xc4\x6c\x29\x0e\xc5\xb0\xdc\xcd\x0f\x58\xe9\xc6\xf9\x8b\x8f\x81\x59\x59\xe1\x18\x79\xc6\xe4\x0e\xec\xfc\x12\x48\x88\x76\xa2\xe9\xf4\x3d\xaf\x0d\xaf\x84\x2e\xa3\x1c\xab\x30\x89\x2a\x31\x56\x28\xaf\xa1\xe6\x83\x33\x06\x9e\x6a\xb1\x6b\xdb\xe5\x47\x65\x89\x30\x2b\x97\xde\x8a\x6d\x10\x9b\xb1\x9e\x18\x64\xff\x1b\x56\x6c\x5f\xf2\xee\xeb\x20\xf2\x20\x2b\xd4\xfc\xd2\xfc\x00\xb7\x75\x05\xfe\x4f\x9d\x4f\xa6\x60\x79\x55\x63\xf8\x95\xe9\x36\x94\x6a\x5b\x4a\x58\x89\xf9\xe4\x61\x37\x6c\x80\x67\x49\xdc\x0a\xa8\xbd\x30\x0c\xe3\x2c\x91\x34\xaf\xcf\xf1\x4d\x27\x56\x48\x98\xcd\x69\x90\x93\xac\xde\x29\x8b\x28\xe4\xe8\x17\xe6\x6c\x79\x2c\x54\xe5\x2e\x1d\x9f\x45\x88\x0b\xd7\xe8\x56\x81\xd9\x6e\x66\x00\x86\xe8\xed\x5b\xfc\x63\xad\x26\xab\x2b\x1e\x23\x2a\xf1\x59\xee\x91\x28\x01\x64\x3e\x4e\x5b\x4d\x46\xb0\x8a\xbb\x91\xf8\x78\x92\xb2\x1b\x63\x75\x2c\x4a\x0a\xe5\x14\xfd\xbc\xae\xce\x30\x63\x10\xbd\xe7\x1f\x71\x7e\x81\xeb\xb3\x70\x78\xfd\x9a\xc0\xa7\x56\xbb\x7a\x61\x7d\xfe\x3a\x5d\x56\xec\x4a\x78\xe5\x40\xc8\xd7\x9e\x05\xda\xae\x0c\x22\x73\x51\xd1\x32\xb4\xfd\xad\x37\x8f\xb1\x14\x27\x79\x3b\x23\x27\xee\xb4\xc1\xfd\x57\x80\x17\xcd\xd3\xcf\xcf\x1c\x2f\x04\xa4\xce\xcf\xbd\xec\x1d\x91\x5e\x29\x2d\xc3\xf7\xf6\x69\x87\x39\x38\x3c\x80\x09\xbc\xcb\x2b\xbb\x23\x30\xbe\xe3\x27\x15\x21\x8e\x8f\xc2\xce\xcc\x85\xd2\x76\xf9\x48\xe0\x2a\x29\x1a\xa0\xd6\x88\xf6\xfe\xd6\x89\xa5\x78\x80\xed\xd8\x92\xe1\x4f\xc5\xdf\x36\x14\x01\x8b\x54\x29\x42\xeb\x2e\xae\xcd\x90\x44\x5d\x3b\xab\xc0\xe6\x0d\x24\x9d\x7e\xe1\x82\x7b\x0e\x33\xf9\x57\x8f\x97\x70\x02\x6c\x89\x04\xa3\x38\xc0\x06\x5d\x03\x1f\x55\x00\x99\x16\x9d\x83\xa7\xb8\x12\x00\x41\xac\x69\x1c\xd1\x6e\xf5\x0f\xbe\xfa\xc7\xea\xaa\xc4\xb0\x3a\x79\xe2\xc9\xa1\xbd\x0f\x55\xed\x10\xda\xf6\x0b\x3f\x3c\x5e\xd8\x60\x1a\x52\x21\xcc\xfe\x9b\x5c\x91\xea\x38\x22\x80\x55\x3f\xc1\x4a\xd3\x89\xf1\x76\xfe\xd6\xdf\xae\x1a\x02\x66\x1c\xb1\xe6\xcf\x58\xa2\x14\x30\x17\x17\x50\xc2\x3a\xf6\x8d\xd6\x92\xea\x82\x27\x53\x7f\x9b\x71\xf8\xa1\x58\xa2\xe5\x71\xc5\x52\x7f\x95\x20\x0d\x7e\x43\xfb\xa4\x3f\x96\x08\x20\x4b\xf9\x21\xff\x85\x9d\x82\x22\x06\x02\x55\xaf\x4c\xd9\x31\x16\x5a\x1d\xc8\x32\x1f\xf4\x8b\xd0\x76\xe7\x76\x4f\x5f\x7d\xdc\x81\x0c\x43\x6a\x76\x36\x64\x4b\x83\x19\x0e\x2e\x3c\xe3\x5c\xc0\xeb\x72\x8d\x9e\x28\x65\x43\x99\x87\x46\xad\x25\x71\xf3\xaf\xf2\x0e\x28\x72\xaf\x11\xed\x9e\x26\x62\xdf\x83\x5f\x5e\x12\x04\xe8\x02\xb5\xec\x34\x3d\xfe\x37\x0e\x39\xbd\x83\xda\xc0\x44\x2b\x46\xc3\x75\xb6\xb2\x70\x7d\x29\x01\x99\x06\x74\x67\x18\xe8\x4a\xa1\xdd\x92\x15\x9e\xb6\x35\x23\xc6\xeb\x5d\xfe\xa5\xee\x9e\xdb\x9f\x14\xb0\x1e\x0f\x80\x77\x95\x20\x16\x4e\x54\x79\x35\x23\x1d\xe3\x7c\x9b\xb0\x03\xf7\xb6\x40\x99\x8c\x3f\x3f\xd4\xc1\xf2\x6b\x5d\x49\x14\xbd\x8c\xb2\x2c\xa1\x21\xf9\x8b\xe3\xdd\x67\x91\x09\xeb\x83\xc1\x6f\xad\xc8\x0d\xe4\xb2\x97\x21\x0e\x6c\x5e\x77\xc4\x30\xfc\xf2\xe6\x16\x35\x93\xb9\x29\x3c\x0b\x10\x42\x7f\xa9\xeb\xd8\x79\x89\x7d\xf7\xc7\xd0\xf0\x72\x63\x0e\x1e\xa1\x90\x63\x3d\x38\x8d\xc6\xfb\x1e\xa3\x4e\xb9\x1b\x60\x3a\x48\x19\x04\x39\xae\x1f\x4a\xd2\x1d\x40\x7a\x05\x08\x4c\x74\xec\x4f\x23\x9f\x32\xf9\xdf\xba\xc3\x02\xc3\x59\x9e\xc0\x94\x21\x6a\xa1\xa4\xb3\xec\x16\x79\x02\x24\x96\xad\x1a\x49\xe5\xa3\xa8\xee\x6a\xfd\x93\xbb\x86\xfb\x89\xfa\x2c\x53\xad\xeb\x28\x98\x22\xd6\x29\xaf\x0e\x21\xb5\x43\xc0\xc9\xe5\xfc\x8c\x69\x0c\x8d\xed\xa5\x6b\xc3\x06\x68\x43\x24\x9a\xf7\x31\x46\x09\x2c\xb8\xd9\xb6\xe8\x67\x79\x45\x5f\x98\x6f\x4f\xe8\x37\xf7\x61\x83\xc2\x8f\x50\x04\xce\x5f\xeb\x16\xfa\xbb\xfe\xdd\x5e\x7d\x23\xe8\x43\x51\xa0\x8d\xd8\x28\x73\x93\xd4\xb6\x12\x34\xa8\x63\x4e\x01\xed\x0b\xcb\xb1\x8b\xc5\x7d\x86\xe0\x59\xa3\x61\x1d\xb5\x61\xdd\xed\x0d\x11\x69\x75\x90\x7d\xcb\x58\x53\x66\xd2\xbc\xc7\x1c\x47\x87\xa4\x12\xc3\x73\x98\xd6\xf8\x50\x5c\x5a\x3c\xd1\xa1\xbf\x13\xb5\x3b\x23\x95\x65\x56\x85\x7f\x00\x40\x1f\x19\xaf\x2d\xab\xf8\xfc\xcd\xc1\xa7\x8c\x82\xab\x37\x57\xac\x68\xac\xd9\x55\x49\x6d\xf1\x25\x93\xc7\xa1\xa5\xe3\x6e\x2f\x72\x73\x0b\x5f\x3a\xae\xba\x13\xcc\x98\x0c\x47\x7c\x98\x77\x05\x7b\x03\x01\xe1\x5f\xc7\x33\x9e\x37\xdb\xfb\x67\x73\xb3\xb4\x86\x9a\x7e\xd1\xb0\x12\xc8\x00\xec\x96\x54\x13\x9e\x50\xa6\x1d\xef\xfa\x3e\x40\x47\xf1\x91\xf3\xa2\xeb\x24\x1a\x9f\xba\x8a\x88\x7f\xf5\xa2\x04\x43\xc5\xb9\xef\x0f\x1c\xc8\xda\x22\x2f\x41\xc8\x6b\xec\x15\x9b\xb7\xb6\xdd\x27\xb5\xb7\x24\x8d\xf2\x16\x1f\x66\x9e\x28\x0c\xc7\x2e\xd2\x95\x03\xa8\x27\xec\x40\xbc\x9b\x21\x0a\x30\x86\xe9\x66\xe6\xab\x10\x92\x00\x0b\x85\xc8\x3c\x54\x62\x38\x73\xd1\x13\xfb\xd1\x95\xf5\xc2\x45\x01\xee\xb6\xde\x71\xc7\xe6\xfe\x63\xad\x42\xad\xe0\xfa\xcd\xe2\xf2\xaf\xdc\xb3\xf6\x2b\x40\xa3\x2e\xec\x1b\x0e\x42\x1c\xce\x44\xae\x5e\xf2\x33\xa8\x38\x1b\x78\xa0\x71\xf2\x0d\x4f\x4d\x1a\xd2\x7d\xd5\x8c\x20\xf5\x4c\x75\x19\x23\x95\xee\xa6\x7b\x1c\xb8\x8d\x8f\xe1\xf7\xd9\x10\x29\x7f\x08\x7d\x27\x9a\xbb\xbd\xf4\x8f\x5c\xc7\xa4\x04\xd6\x89\xbc\x50\x77\xec\x00\xea\x1c\xf9\xf9\x6f\x6d\xe9\xb6\xaf\x15\x46\xc0\x98\x4a\xf3\x8a\xf2\x5a\x8f\xf7\xa1\x29\x03\x18\x8a\x2a\xbe\x1c\x49\x4d\x68\x64\x1a\x7a\xf1\xc4\x0a\x7b\x81\xb8\xf7\xb4\x54\xd2\x4b\xd1\x0e\xf8\x3c\x87\xb3\x94\xb5\x43\x1d\xe9\xdc\xa6\xec\x8c\x95\x03\x99\x6f\x03\xb0\xaf\xe5\x54\xf0\xc8\x84\xb3\x62\xa4\xb6\x95\xb9\x49\xc4\xd6\x75\x72\xe8\x6b\xf8\x7f\xf7\x99\x89\x82\x85\x61\x26\xce\xe3\xd0\xeb\xdd\x62\x8a\xc8\x36\xee\xc3\x88\xac\x3e\xa4\xe1\x3b\x53\x9e\x19\x62\xba\x8e\x7e\x7d\x61\xae\x69\xbf\xd6\x6b\xab\x80\x30\xb6\x43\x0a\x93\x2c\xa2\x75\x6a\xbb\x1e\xf9\x77\xba\x95\x32\x00\xf6\xe3\x89\x58\xce\x05\xe5\x80\x8d\xad\xc0\x35\xa7\x02\x8f\xf8\x00\x40\x9b\xb5\x7d\x4d\xd7\x86\xcb\xd7\x1a\xfe\xa3\xaf\xa3\x3b\x3a\x20\xa5\xdb\x2b\x54\xa5\x59\x91\xc3\x47\x00\x1a\x8a\x56\xd7\x27\x57\xa3\x4d\xb7\x1c\x43\xf3\xb2\xf8\x8b\xc2\x5c\x1b\x57\x28\x5a\x9a\x36\x4f\xdb\x0f\x7a\x16\x09\xd9\x44\xce\x67\xfa\xef\x12\x6a\x82\x83\x2a\x8d\x3d\xae\x54\x3d\x21\x2e\xa4\xa4\xd7\xd7\x13\x6d\x3c\x69\x96\xd1\x6c\xb0\x0e\xa6\x6d\x39\x17\x91\xdb\x88\x72\xf2\xcf\xbd\x9a\x6b\x10\x82\x05\x70\x19\xe9\x4e\xb1\x68\xc5\x87\x80\x3e\x05\xad\x51\x7b\x0a\x51\xff\xc8\x66\x38\x01\x1a\xc0\xc2\x80\x0e\x27\xf9\x2f\x5c\x65\x24\x50\x80\x3a\x50\x50\x63\x9b\xf3\xe0\xdf\x95\x86\xef\xfb\xda\x68\x3c\xdb\xe1\xbd\x16\x8d\xa9\x4d\x4c\x17\x53\x75\x13\xb4\x0e\x38\x8b\x8a\x06\xe7\x8e\xa7\x00\xce\x7b\x38\xee\x6d\x76\x8e\xa0\xfd\x08\x1a\xe2\xa8\x63\x54\x10\xb4\xe3\x2a\x8a\x6c\xab\xf8\x73\x3c\xa9\x44\xcb\xfd\x8c\x9a\xf6\x9c\xbe\x6f\xeb\x40\x0f\x28\x21\xe0\xba\xa3\x00\x2c\xfe\xee\x3b\x59\x81\xa0\x32\x8c\xd9\xff\xc0\x0f\x66\x76\x99\x14\x37\x98\x10\x51\x45\x00\x1f\xe9\xc7\xda\x6a\xfb\x49\x59\x2b\x4d\x94\xa3\xdc\x9c\x31\xd7\x90\x88\x9d\x3d\xd2\x51\x37\x74\x7b\x35\x59\xe6\x32\x54\x54\x15\x2a\xdd\x14\xb6\x97\x0b\x5d\xab\x23\xe5\xd5\xfb\xae\x2f\x28\x79\xb4\x91\x89\xab\xe8\xbb\x69\xfa\x05\x6a\x10\x96\xc6\x61\xf6\x0f\xaf\xb6\xfc\x76\x7a\x46\x84\x4b\x6a\x31\x81\x92\x3a\x65\x05\xb2\x1b\x02\xe0\xbb\xf0\x29\xf5\x9b\x07\x1d\x3f\x5c\xf1\x7d\xe1\x44\xc6\x74\x23\xed\x82\x78\x03\x4a\x98\xee\xba\x70\xda\xcf\xe1\xe8\x27\x03\xf6\x69\x6d\xf7\xe5\x1e\x6c\x1e\x8a\x3c\xa3\x17\xf5\xe3\x9e\x31\x8c\x3e\x57\x70\x5c\x86\x46\xec\x72\xf0\xb7\x5f\x94\x7b\x4f\x98\x85\xad\x0f\xff\x82\x9a\x1d\xe5\x17\x78\xec\x0d\x85\x64\xf6\xf3\x6a\xae\xf7\xca\xc0\x3d\xc7\x6c\xd0\xde\xb7\x99\x9b\x4a\x52\x58\xf8\x2f\xb3\xc3\x23\x8e\xf4\x95\xe0\x45\x7b\xf7\x1c\x88\xc3\x9e\x9a\xb7\x7e\xbd\x82\x2c\x00\x67\x7e\x7b\x5f\x28\xa3\xd4\x65\xc0\x16\xc7\x72\x9c\x39\x77\xd3\x7b\xd5\x3d\xd2\xba\xb4\x18\xff\xf5\x9b\xed\x3d\xcc\xac\xc9\xf3\x8f\x0f\x93\x10\x91\x2d\x7c\xb0\x57\xe7\x3a\xf6\xe7\xf9\x13\x74\xcd\x57\x70\xa4\xad\xd3\x18\x6f\xd8\xd6\x1d\x5f\xb5\x7e\x1b\x85\x6c\xd2\x23\xec\x45\x1f\xb0\x19\x59\x67\x7d\x1b\x28\x7f\xdd\x09\x71\xa4\xf5\x8c\xac\xa3\xd9\x18\x49\x24\xc5\x82\x1e\x52\x45\x1e\x6d\xce\xd1\xbe\x69\x55\x25\x97\xe7\x68\xfa\x83\xcd\x00\xf8\x67\xaf\x39\xf9\xe3\xd9\xb2\xe6\xad\xe2\x1f\x4e\xb0\xe6\x95\xc9\x53\x73\x16\xa7\x2b\x9d\xd8\x7d\x20\xd3\x70\x8a\x5a\x02\xce\x62\x9e\x47\x3b\xd1\x9f\xed\xf8\xa2\x58\x50\xb3\xbe\x1a\xab\x83\x61\x93\xd4\x5c\x77\x6b\x36\x2c\x95\x77\x7c\x01\x62\x0e\x75\x37\xe3\x20\x01\xc3\xf9\x05\xaa\xc5\x12\x97\xd0\xf4\x37\x96\xe8\xb7\x51\x0b\xea\xad\x16\xbf\xd2\x26\x37\x86\x04\x00\x22\x7f\x5d\xe8\x27\x56\x7f\x6c\x52\x33\xcc\xf5\x11\xc3\x57\x2a\x67\x0d\xf5\x29\xb9\x0a\xe1\x6a\xe1\x12\x78\x01\xee\x28\xb5\xe6\xe4\xb3\x99\x6c\x1e\xc5\x01\xcf\x32\xc7\xa8\x6b\xd2\x77\x62\x08\xcf\xa4\x10\xc8\x04\x03\x50\x82\x0d\xba\x22\x8d\x43\x23\x11\xe1\xfe\xbb\x55\x5d\xf2\x01\xcb\xe5\x6c\x6c\x80\x32\xf4\x2e\x7a\xb8\x42\x07\x6a\xdb\x72\x50\xdc\x07\x8f\x87\x00\x97\x72\x43\x6b\xb1\xb6\x9f\x46\xb2\x84\xb6\xe7\xb2\x66\x22\x67\x00\xe7\x71\x1f\xaa\xe7\x83\xf0\xad\x5d\x87\xc8\x08\x59\x83\xd3\x55\x8c\x32\x8e\x0b\x7f\xe2\x82\x0a\xd2\x74\x3d\x16\x2a\xb3\xe2\x00\xb0\xf7\xdd\xd9\xe1\x8e\xa2\x1b\x89\xb9\x20\x75\xab\x4a\xd6\x75\x4d\x9b\x58\x0a\x00\x0c\xfb\xdf\x37\x62\x30\x34\xe3\x0c\x0c\x4d\xbd\x46\x3a\x7d\xeb\x59\x16\xa3\x49\xd0\x79\x11\x1c\x6a\x58\x45\x24\xc6\x02\xc9\xef\xce\x1f\xb3\xbe\xb3\xfb\x91\xae\xbd\x19\xe0\xb0\x9d\x5a\x16\x54\x2f\xfd\x8d\x0b\x66\xe1\xba\x99\xb1\x14\x9c\xae\xaa\x7d\x2f\x28\x57\x75\x9b\xd8\xe7\x5b\x16\x12\x28\x64\x33\x37\xfc\x3e\xc4\xa1\x8c\x26\x5b\xee\xca\xf2\x77\x52\xb9\xc8\x16\xff\xf4\x6e\x1b\xee\x41\x61\x74\xd2\x50\xda\x01\x9c\xe2\xad\x62\x00\x70\x46\x32\xf9\xa0\x31\x69\x1d\x6b\x23\xb1\x68\x36\x8c\xba\x71\xcf\xb7\x98\x7f\x46\x36\x80\x8c\x29\xc5\xb2\xd4\x27\x5c\x8d\xf9\x38\x92\x83\x7c\x42\x2a\x22\x31\x12\x4d\xb3\x5d\x10\x90\x57\x66\x10\xc0\xd7\x24\xea\xec\xfb\x88\xaa\xd4\xdc\x40\xb2\xf8\x3f\x9f\xbd\xc1\x19\x35\x13\x75\xd2\x5b\x1e\x65\x59\x02\x24\x95\x95\x95\xf3\x1a\xa0\xd6\x62\x7a\x98\x3c\x42\x33\xbf\x5f\x04\xf2\x0c\xcd\x9c\x7d\xf5\xf2\x34\x6b\x22\x51\xc1\x34\x0c\x70\x55\xee\x87\x81\x40\xb5\xa6\x62\x14\xda\x6f\x1f\x27\x27\x6a\x42\xa1\x7c\x74\x3e\x68\x19\x21\x08\x5e\xc7\x0b\xb3\x28\xac\x7b\xc0\xdf\x7e\x55\x7f\xd2\x14\x93\xc2\x88\xf3\xb7\x6f\xdf\x74\x96\x3b\x22\x72\x00\x00\x4e\xc3\x9f\xe7\xe4\x0f\x29\x06\xbc\xa8\x24\xc5\x70\x4c\x3b\xb1\x1b\x9e\xce\xb5\x30\xd1\x86\x57\xdd\x79\xdb\xce\xc7\xe5\x17\x70\x3b\x3b\x5b\xca\xb7\xc4\xb3\x0b\xdf\xce\x52\x99\x40\x25\x56\x86\xd5\xed\x65\xa3\xc0\xe4\xef\xa0\x29\x8c\x22\x25\xa4\x3a\x4f\x3b\xc0\xc8\xc3\xfc\x20\x90\x6c\x93\xbf\x67\x40\x4e\x2e\xaf\x99\xb2\x2d\xc7\x32\x4f\x71\xf2\xc3\xb0\x5a\x30\x79\x90\xdc\xf8\x37\x82\x21\x8c\xd0\xf8\xa0\x7a\x49\x33\xe6\x9a\x8b\x60\x5f\xa1\xd8\xf1\x27\x39\x9b\xe4\x8f\x32\x6a\xc5\x43\xa6\x61\x2c\x14\xca\x2a\xfb\x4d\xce\xaf\x94\x10\x19\x97\xd8\x18\x07\xe8\x73\x29\x7d\xbb\x42\x48\x73\x7d\x14\xbf\xd9\xf0\x75\x42\xa7\x78\x1a\xa5\xd5\x22\x90\xbe\xff\xe7\xfe\xf2\xff\xd8\x5f\x3e\xd8\x52\x61\x45\x62\x72\x5c\x82\x17\x09\x4c\xd4\x57\x89\x73\xa6\x13\x08\xcb\xf3\x4f\xd3\x6a\xea\xf3\x22\x9c\x76\x0a\x0e\x18\x7d\x9b\xaa\xaf\x69\xfd\x13\xd1\xb1\x90\x9b\xeb\x22\x36\x3b\x31\x89\xb7\x28\xca\xf2\xc2\xc4\x42\xad\x32\x00\xe4\x68\x64\xb6\x2c\xfa\x5e\xf9\x39\x46\xaa\xf3\x1a\x2a\xda\xb6\x37\xd2\xf0\x21\x12\x31\xb7\x4e\xcb\x10\x6b\xca\x98\x3d\x8e\x12\xa9\x98\x42\xd2\xeb\x00\xe8\x02\xcf\xd3\xd9\x0e\xf2\xcb\x57\x1b\xf3\xfe\xe1\x69\xa6\x98\xb3\x48\x6b\x58\xd1\xcb\xf0\x74\x20\xb7\x6f\x45\x5b\xba\x2f\x72\x28\xdf\x20\xcd\xe4\x32\xf2\x29\x22\x93\xe3\xbc\xb7\x12\x95\xb3\x34\x2e\x1d\x49\xe1\xf9\xa7\x1d\x9b\xe3\xd7\x3f\x68\x95\x4e\x7d\x3d\x3e\x8a\xf8\xa9\x6c\xc9\xf6\x00\x09\x42\x52\x1d\xd7\x8e\x53\x64\xa3\x86\x03\x44\x1a\xa9\xd5\xc7\xd2\x11\x4c\x77\xf3\x13\x9f\xc4\xec\x4d\xe8\xba\x8b\xb8\xe1\xd2\x53\x06\x1e\xb4\x84\x24\x57\x83\x95\x12\xfb\x49\xa9\x25\x5d\x62\x83\xc3\x8f\x59\x5c\xf1\xe6\x2b\x36\xab\x41\x10\xce\x21\xff\xc4\xc4\xa9\x6e\x14\x46\xde\xb8\x81\xec\x34\x9f\xbb\x62\xc0\xe6\xc0\xad\xc6\x83\x50\x25\x38\x25\x83\xa9\x66\x86\x1e\x31\xd1\x72\xaf\x46\x23\xb8\xd5\x3a\x4f\x87\x0a\x7b\x8e\xe8\x64\x40\xb4\xeb\xc3\xfa\xcf\xad\x4b\x59\x79\xb7\x19\x8a\x59\xc5\xf0\x87\x4c\xdc\x05\x6b\x18\x34\x84\x03\x76\x48\x0f\x24\x84\x3e\xcd\x9b\xdc\x12\xaa\xba\x1d\x78\x0c\x02\x6f\x13\xa7\x07\xfc\x0d\x47\x44\x03\x10\x3e\x80\x65\x01\x92\xe3\xa9\xaf\x03\xb7\xaa\xff\x18\xb4\xc0\xd4\x96\x61\x09\x76\x68\x92\x66\xc7\x00\x7c\x98\xe2\xc3\xba\x89\x75\xc8\x6a\xda\x5c\x51\xac\x59\x30\xff\x46\x93\xc8\x48\x4c\xbd\x37\x76\xc7\xd0\xf7\x12\xbe\xd2\x5c\x58\x51\xc3\xdb\x17\xa7\x09\xc2\x56\x39\x31\xe7\xed\x33\x77\x4f\x29\xd0\xe6\xe1\xcd\x4f\x92\x10\xd1\x88\xb2\x44\x53\xf8\x50\x7f\xd5\xb4\xd0\x28\x38\x1a\xc4\x61\x10\xc8\x0c\xfe\xef\xfe\x8f\x7f\xfa\xc1\x59\x21\x05\x1c\xd3\xf5\xc9\x36\x4a\xf5\xd0\x71\xa0\x71\x2c\x0e\x78\x72\x27\xd4\x19\x11\x9e\x77\xc8\x20\x89\xaa\xa0\xbd\x52\x85\xb1\x1c\x23\x98\x70\x3c\xe0\xe0\xfc\x56\xc2\xf4\xc8\xa5\x80\x76\x81\xe0\x99\x89\x26\x5a\xe3\xd7\xb9\xfe\xcd\x07\x33\x75\xdf\xcd\x8c\x90\x58\x6a\xa2\x6e\xef\x10\xc0\xe9\xc9\x33\xf8\x89\xda\x4e\xf1\x59\x47\x39\x8a\x74\x20\x69\x8c\x63\xaa\x50\xe4\x4f\xcd\xc4\xb3\x7b\xee\xd1\x74\x94\xfc\x11\x09\xfc\xe6\xc0\x36\x4f\xa6\x79\x5e\x52\x54\x40\xa2\x17\x89\x00\x56\x5a\xf3\x09\xb0\xa0\x7f\xf9\x79\xb8\x7f\x1c\x71\x6e\xcf\xb0\xd0\xf3\xee\x47\x89\x03\x70\x71\xa2\xc6\xd3\x17\x31\xd8\xfe\x92\xa0\x92\x80\xfe\x27\xbb\x95\xe2\x59\x46\x88\x63\x7d\xa6\x58\x09\xed\x3d\x33\xd3\x2d\x08\xa8\xfd\x51\x7b\xa2\x5b\x5b\xe9\x22\x75\x93\xf4\x0f\xf7\x7d\x1a\xf9\xed\xa7\xbd\x39\xdc\x3f\x66\xbb\xf6\x44\x50\x19\xce\x0c\xd2\x10\x7c\x68\xa3\xaa\x2a\xef\x20\xdd\x1d\x41\x9b\x75\xdf\x78\x22\x00\xa7\xe6\x04\x19\xcb\x47\xe2\x8b\x00\x0a\xf9\xda\xe5\xc2\x0e\x20\x13\x98\xae\xb8\xe2\x51\xf2\x69\x6f\x6a\xa2\xd0\x66\x8d\xee\x7f\xfa\x84\xee\x2c\x17\xb0\x17\x28\xaa\x55\x89\x3a\x10\x49\x38\x20\x9a\x0d\xbd\xc9\xbe\xc0\xc5\x31\xc9\xa6\xcc\x4d\x66\x3c\x8a\xae\x66\x44\x75\x72\x8a\x6f\xd2\xd1\xad\x33\xe7\x95\x41\x3c\x43\xc3\x85\x0d\x3f\x00\xf4\x2b\xc0\xd6\x64\xa0\x5f\x27\x36\xd0\xa1\x76\x72\xf8\x77\x0d\xe7\x2a\xcc\x1f\xf9\xdc\x47\xf3\x18\x96\xd0\xd1\xda\xee\x24\x2c\xa1\x80\x70\xc8\xac\x4e\xf5\xd9\xc7\xad\xc6\x09\xed\x0b\x6e\x47\x01\x39\x35\xa0\x7f\x60\xa8\xe4\x4e\x73\x2a\x81\xd8\x0b\xe0\xa8\x3c\xc9\xd7\x16\x04\x15\x5c\x4a\x70\x4c\xff\x95\x43\xb9\x0c\x2b\xaa\xbc\xc3\x28\xb7\xf9\x7b\xfd\x62\xf1\xbe\x69\x80\xd1\xdc\x36\xfc\x0e\x84\xce\x40\x84\x69\x51\x4b\x05\x0a\x78\x82\x4c\x49\xd9\x31\x84\xd1\xf7\xca\x3e\x8d\x54\xfd\xd3\x0e\x60\x52\xc4\xab\xb0\x03\xd1\x1e\x2d\x2b\xf0\x12\xe2\x58\x2f\x3b\xee\x9f\xbe\x6a\x63\x3f\x28\x8c\x94\x84\xd7\xab\x5a\x60\xbb\xd0\x34\x09\xa2\x07\x31\x36\xcd\xa9\x6b\xc4\x35\x3d\xaa\x5e\xcb\x48\x27\x53\x98\x55\xa1\x08\xaf\x4f\x33\xe1\xbe\x36\x8f\xf3\x30\x0c\xdd\x11\xa2\x12\x24\x9c\x0a\xff\xf4\x8d\xe5\xfe\xcc\x11\x02\xa8\x27\xdf\xfd\x97\xee\xf1\x80\x06\x80\x4a\x99\x22\x46\x58\xdd\xf4\x4e\x86\xd8\xa4\x62\x0d\xd9\x65\x8d\x65\x09\x04\xa2\x43\xed\x1d\x58\x46\x96\xaf\xc0\x66\xc8\x4b\x59\x56\x44\xba\xaa\x9f\xe7\x79\xe2\xe2\xd0\xa9\xf4\x13\x69\xa5\xe2\x3f\xce\xc1\x5c\xa0\x19\xe6\x60\x68\x83\x06\x63\x4b\xae\x0e\x64\xd9\xa4\x07\x27\xa9\x5f\x2c\x8a\x80\x37\x76\x7b\xd8\xb0\x9d\x4d\xb0\xfa\x5a\x8a\x52\xd5\xe2\x8c\x8c\x03\xe1\x44\x02\xa9\x05\x9c\xb1\x03\xda\xa0\x4c\x5f\xf6\x89\xd8\xed\x93\xc2\x40\x45\xf6\x70\x20\xfc\x63\x2e\x52\x58\xfe\xf4\xcb\x9a\xfb\x39\x47\x8b\x04\xb4\xbf\x6f\x43\x0e\x1c\x5b\x87\xcc\x6b\xd7\x0d\x85\x1c\x37\x65\x67\xe4\xd7\x3e\x74\x44\xf1\x6b\x8a\x6c\x79\xd4\xbd\x07\x30\x7f\xe4\xf7\x3d\x3e\x51\xec\x2f\xfd\xfd\x9c\xef\x6f\x6f\x90\x3a\x74\xfe\xc8\xb5\x01\x51\xb5\x8f\x12\xb0\x9a\xa2\xfa\x0e\x7a\xd5\x2b\x54\xc4\x62\x36\xd1\xd0\x43\x7e\x5a\xd3\x9f\x56\x2f\x01\xa6\x8c\x39\x7e\x8e\x0f\xd1\xd5\xa1\x81\x68\x3f\xe7\xe7\x65\xf1\xab\x17\x57\x41\xfb\xcf\x99\xc7\x66\x30\xff\xd8\x0b\xf3\x0b\x54\x65\x59\xd8\x51\x96\x20\xa2\x49\xe2\x9f\x5e\xee\xa0\xa6\x5c\xf8\x93\x47\xac\xa6\xf8\xd0\xbe\xfd\xaa\x89\x54\x10\x6c\x0f\x1f\x53\x66\x87\x35\xab\x60\xf2\x83\x2b\xb7\xca\xf7\xb2\x85\xab\x32\x3d\x52\xe8\x9f\x3e\xb7\xa2\xa1\xb4\x0c\x3b\x0a\x43\xac\xdd\x22\x1d\x67\xea\x19\x57\xa8\xf5\x3c\x04\xa8\x85\x6c\x59\x3a\xaa\x90\xf0\x44\xa6\x33\x6d\xd0\xd9\x09\x4c\x4e\xc4\x4b\x9f\x0c\xef\x93\x68\xb7\xa8\x56\x70\xb5\x10\x3b\x99\x91\xf0\x8f\x79\xca\x5f\xcd\x78\xf5\x44\xd0\x96\x70\x1d\x08\xb0\x5a\xb6\xfc\x55\x0e\x2a\xd7\xa8\x38\xf7\xc1\xb3\x6a\x8f\x4f\x3f\x24\x3e\x0e\xa0\x5f\xea\x0d\xfc\xb7\xc1\x96\xd2\x2a\x9c\xcd\xd9\x0f\x48\xeb\xbf\x1f\x14\xfc\x5e\xbd\x75\x98\x3f\xfe\xbc\x20\xb4\x5c\x0d\xe7\x12\x45\xf9\x9f\xff\xed\xff\xfd\x3f\xb2\x34\xef\xeb\x6d\x3e\xa7\xe2\xbf\x6f\xe5\x52\xa6\xc7\x7f\x4c\xf3\x7f\x5e\xfd\xf3\xbd\xbd\xfd\xca\xff\xc8\xe7\xe9\x48\xdb\xe9\xff\xff\xff\x6d\x97\x6a\xff\xef\x63\x5b\xfc\xff\xfe\xf1\x89\x76\x4c\xeb\xf2\x3f\xce\x6d\xf8\x7f\xfd\xb7\x22\x3d\xd2\xff\xf8\xf3\x35\xb8\x4c\xf5\xff\xc8\xd2\xbd\x24\xb0\xff\x4f\x1b\xb2\x96\x7b\x43\x9a\x54\xcf\x7f\xdc\x87\xe9\x05\x8d\x10\xd4\x0c\xc3\xb0\x7f\xde\x97\xc3\x31\xc9\x1f\xff\x2b\x0a\xa4\x9b\x3f\x2e\xa4\xd8\x15\x23\xd9\xf5\x33\xe4\x07\x15\x88\xf8\xfe\x1c\x96\xfd\x49\x74\xfb\xf3\x58\x35\x8b\xc4\xe9\x17\xaa\x43\x12\xb9\x78\x9e\x0f\x83\xfd\xc7\x17\xa6\xe6\x7f\x19\x8b\x9b\xcb\x1e\x40\xb0\x2d\xc0\x42\x60\x17\xd6\x4f\x8b\x82\xf9\xd0\x02\x4d\xd4\x85\xa8\x77\x60\x81\xf1\x24\xe9\x91\xd8\x16\xdb\x95\x70\x3b\x10\x52\x69\x1f\x13\xe4\x26\x80\x7b\xaa\x70\x72\xf6\x58\x6d\x3f\x4a\x61\xe6\xd5\x65\x25\x21\x35\x82\x20\xfa\xe6\x6a\x8a\xfb\x8f\xa4\x60\x0c\x25\x1c\xbe\xef\x34\xff\x8d\xcf\x5f\x49\x13\x38\x8d\x3f\xe8\xf6\xa8\xa2\x50\xfa\x5f\xaa\x45\x44\x31\x16\x4b\xa5\xcc\x4f\x77\xba\xae\x28\x70\xd2\x44\x82\x58\x70\x5c\xe9\xd6\x81\xfb\x1b\xd5\xd5\x10\xe0\x3b\x45\xc3\xeb\x25\xcd\x6a\x69\xab\xe9\x5e\xb1\x75\xe9\x2d\x53\x04\xbc\x82\xa2\x86\x1e\xc6\x0b\xec\x83\x8a\x9f\xe4\x23\x6b\x75\xfd\x81\x8d\x8f\x25\x60\x23\x17\x40\xef\x4b\xc5\x28\xab\x17\x16\xef\x3a\xbe\xfa\xc3\x67\xe3\x4b\x52\x1e\x0a\x4e\xbe\xb4\xbf\x3e\x9b\xa6\x07\x1e\xbb\x90\x06\x07\x63\x01\xda\x8f\xd5\x04\xe5\x76\x0c\xeb\xbb\x26\x55\x9a\x93\xa6\x61\xf9\x5a\xd4\x0e\xa3\x1b\xd9\x81\x8e\x7f\x38\x16\xa5\x8b\xd7\xe9\x53\x3f\x19\x93\xd0\x3b\x49\x5d\x0d\x5c\xd8\x68\xb1\x7e\x00\x60\xe1\x1a\x2f\x52\xe0\x96\x5c\x84\x93\x3d\x3f\xa5\x1c\x1c\x7a\x48\x9d\xc8\x8d\x83\x1e\x49\x05\x1f\xab\xde\xba\xc1\x51\x35\xb3\xcf\xbb\xb2\xbe\x34\x58\xa7\x28\x19\x99\xe3\x55\x6b\xa1\x36\x0a\x7d\x46\xaa\xde\xad\xa0\x8b\x52\xb8\x2b\xdc\xb3\x31\xfb\x53\x99\x40\xeb\x33\xe2\x2e\x30\xba\x52\xbe\x4c\x3d\x9a\x62\x22\x72\xa5\x11\xa0\x38\x88\xb2\xd7\xc6\xf2\x71\x6f\xc6\xe2\xc7\x08\x50\x19\xb0\x3c\x51\x73\x26\xc4\x1f\xbf\xdb\x20\xe3\x1b\x70\x83\x21\x14\x54\xee\x6c\x49\x6e\x7c\xed\xd4\xa3\xb1\x8f\x83\x88\x9f\x51\x16\xae\x20\xb8\x26\x43\x14\x1d\x1b\xc9\xbb\x47\x03\x74\xe5\x7a\xe8\x42\x33\x5b\x6a\xc5\x59\x23\xe8\xc6\x10\x38\xdd\x89\x48\x88\x45\xaa\x8c\x23\x98\x3d\x14\x37\x8b\x2c\xa1\x86\x12\x0e\xc2\xef\x4b\xf9\xac\xb0\x34\x8b\xea\xa2\x17\xf4\xb7\x54\xda\x8d\x51\xc7\x74\x4a\xf3\xeb\x49\xa9\xf2\xea\xc5\x54\x36\x2a\x1d\x73\x81\x3a\x18\x32\x9c\x83\xc5\x04\xd5\xaa\x89\x55\x34\x14\x30\x13\x64\x74\x91\xcc\x43\xc4\x74\x8b\xe9\x64\xe3\xb1\xe0\x42\xba\x22\xac\x8b\x3f\xbe\x25\x95\x9b\x80\x7c\x16\xea\x54\xf7\xb5\xcc\xe6\xc2\x8c\xe2\x9c\x32\x7e\x2a\x0d\x86\x60\x0d\x9b\x67\x88\xd6\x10\x3f\xe1\xc9\x1d\x99\x66\x9e\x3e\x68\xef\xec\x05\x9c\xaf\xbc\x8e\x49\x44\xac\x80\x1a\x58\x1f\x6e\xa9\xca\x4a\x91\xc0\x82\x41\xf1\x2e\x24\x5f\x16\x10\xcf\x97\x0d\x10\xc6\x80\x6b\xb0\xad\x0f\x72\x9f\x36\xd3\xec\x6a\xa2\x19\x39\xfe\xc9\xec\x97\x3c\x14\x41\xfc\x0a\x5f\xeb\xcf\x70\x2a\x1a\xf9\x5c\xcb\xc9\x83\x1b\xf0\xc2\xaa\xea\x7a\xd6\xf7\xca\x82\x93\x39\xec\xf6\xfb\x41\xfc\x42\xc6\x70\xe5\xef\x80\xc8\xd0\xb9\x31\x45\x05\xf6\x93\x68\xc8\xb4\xba\x79\x0c\xc5\xaf\xf4\x73\xfb\x16\x24\x86\xe3\xa5\x32\x29\x8a\x5f\x4c\x11\x7f\x46\xa7\x30\x88\x7e\xef\x9d\xce\xc8\x71\xff\x77\xa0\xb1\xa0\xff\x66\xa0\xf1\xfc\x17\x68\x40\x01\x45\xdb\x02\x24\x04\xe0\x96\x92\x71\xf4\x2c\xde\x2e\x26\x4a\x16\x3a\x15\xed\x0a\x22\x2b\xf7\x09\xeb\x2a\xb6\xda\x60\xf7\x66\xa2\xfc\xfe\xc3\x0c\x5b\xb2\xa9\x0c\xbc\x03\x4e\x91\x85\x1b\x17\x12\xe8\x86\xb0\x99\x56\xf4\xdc\x15\xa4\xf1\x0e\xeb\x34\xce\xb2\xb8\x98\x0a\x24\x8b\xcd\xc7\x4e\x1b\xe9\xcd\xbf\x32\x3b\xbe\xed\x43\xaf\x92\xa6\x49\x0c\x8a\x5c\x57\xee\xa3\x09\xcf\xcb\xec\xc4\x72\x99\xf0\x8c\x84\x2c\xa1\xce\x65\xe4\x8d\xce\xd1\xe8\xd9\xc3\x2b\x2f\xc7\x31\x7b\x77\xfa\xf5\x09\xe0\x94\x55\x6a\x4e\xed\xb2\x7a\x97\xc2\xe6\x79\x3c\x19\x1b\xfc\x46\x88\xdb\xe8\x85\x66\xa6\xd4\x83\x3f\x4e\xc1\xfa\x89\xdc\x76\x99\x20\x76\xaa\x3f\x53\x92\x21\x1f\xa7\x79\x9c\x8a\x41\x0e\x21\x53\xd1\x64\x74\x34\x3e\x9a\x71\xbf\x6f\x5c\xe2\x5e\x13\x03\xce\xef\x04\x2c\xfd\x70\xf6\xc0\x7e\x6c\xe7\x21\x7e\x06\x33\x3b\x1d\xcb\xdc\xa4\x05\x64\x42\xc8\x19\x86\x53\xaf\x6f\xbd\x03\xba\xb8\xc3\x0d\x50\x48\x05\x95\x4d\x29\xe4\x8c\xb1\x45\x5b\x3a\xa1\x26\xf5\xcd\x5c\x96\xf8\xd3\xb4\xf9\x45\x43\x0c\xe3\x6a\xb3\xba\xc8\xe4\xa1\x66\x5d\x06\x86\x40\xa8\xaf\x4f\xa4\x92\xa2\xf9\x80\x09\x83\xf7\x89\x91\x5c\x09\xaf\x03\xe1\xe6\x86\xaf\x91\x8b\xeb\x38\xc4\xa7\x32\xdf\x44\x83\x84\x49\x9d\x3f\x4d\xc3\x4b\x29\xaf\xe0\x55\x9e\x61\xc9\x7a\x8e\xee\x56\x80\xa5\xba\x46\xac\x06\x23\x78\x3d\xd4\xba\xdc\x12\x01\xf1\x62\xd5\x53\x74\x1a\x88\xa0\xae\x87\x46\xce\x6b\x98\x87\x8f\x6b\x47\xab\x33\x33\x7e\x7e\x2b\x8a\x5f\x8e\xc6\xb5\x9a\xd3\x7b\x41\x5c\xe4\x30\x50\xe7\x79\x03\x8b\xb2\x64\x8f\xda\xa9\xd4\x2c\x57\xe4\x04\xb1\xaa\x8e\x6c\x48\x34\x00\x9b\xca\x12\xbc\xc3\xf3\xc8\xc7\x19\x11\xb5\xd0\xfa\xca\x09\x98\xd8\xdb\x15\x51\x7d\xbc\xd0\xeb\x8f\x85\xd9\x89\x5f\x7e\x6b\x5d\x02\x19\x01\x69\xe8\x07\xa0\x74\xb3\x97\x16\x30\x21\xce\xca\x83\x66\x20\x03\xf1\x3f\x52\x4c\xe2\x69\x2f\x16\xa6\x0b\x0c\xde\xea\x14\xfc\xb3\xeb\x6a\x66\x77\x77\x2e\x9a\x46\x6a\x7e\x72\xc5\xb2\x01\x38\x49\x8c\xe4\x1e\x4f\xa4\x58\x35\x3e\xf8\x88\x79\x6c\x0a\x5e\xe8\x90\xc7\xe2\x9a\xfa\xe9\x73\x31\xcc\x6b\x9c\x5a\x42\x7a\xd8\xd2\x77\x68\x2b\x5e\x4b\xa8\x87\xf3\x66\x77\x32\x1a\x6e\x76\x9a\x5a\xd9\x89\xa6\x40\x73\xcf\xf6\x5e\x51\x8e\x5c\xeb\xd5\x1e\xb8\xf5\x8e\xa9\x7b\xa5\x7d\x3c\x6c\x87\xe9\x1e\x77\x57\xe2\x21\x40\xfd\xb6\xae\x31\xf9\x0b\x8d\xe9\xa4\xe3\xc1\x88\x5f\x64\x20\x0d\x01\x2a\x3e\x06\x6d\x19\xd3\x79\x13\xe2\x8a\x1e\x8e\x80\x83\x04\x83\x3f\xff\x35\xf3\xa4\x21\x40\x87\x33\x63\xe7\xfa\x5a\xbc\x70\x51\x7a\x92\xc3\x15\x66\x83\xf7\x34\x24\x86\x71\x77\x91\x38\xb2\xac\xc4\x5a\x8d\x87\x37\xd2\x1a\xf1\x56\x64\x8b\x31\x82\xbd\x9d\xaf\x06\xbd\x3d\x59\x62\x8f\x69\x08\x60\x18\x87\x97\x99\x88\x2c\x22\x28\x99\xbe\x3f\xe2\x94\x61\x55\x37\xc0\x85\xad\x57\xeb\xba\xfe\x9f\xff\x97\x19\xc7\x82\xfd\x9b\x81\x07\xfb\x57\xc6\xd1\xd3\xf4\x06\xc1\x4c\xf0\x90\xf4\xb2\x6f\xfe\x76\x76\xe1\x91\xe5\x65\x9a\x4d\xbf\x1d\xe3\x13\x57\xf6\x66\xa3\x21\xf8\x7a\x25\xc9\x6d\x02\x98\x6a\x66\x40\x40\xa9\x30\x76\xee\x01\x0e\xe2\xaa\x27\x74\x79\xb6\x01\x14\xc4\x5c\x7f\xdf\xb6\x78\x30\x1f\x5e\xd9\x11\xa0\x9e\x6a\xe7\x23\xe5\x79\xc3\xae\x0e\x65\xbe\x4f\x74\xe1\x93\xe8\x64\x51\x78\x08\xb2\xb4\x0c\xc9\x24\x65\xe9\xc5\x01\xea\xfc\xe0\xc0\xa7\x91\xbc\x99\xc2\xd4\x0a\x3d\xd1\xb4\x15\x3d\x73\x49\xa1\x53\xdf\x7e\x74\xc3\xf3\x69\x89\xa2\x90\x7a\x3d\x3a\x46\x59\x38\x1c\x3f\x23\x58\x4e\xe6\xa1\xd9\x59\x78\x33\x0d\x24\xe4\x44\x9f\x2c\x71\x7a\xd0\xf6\x34\x20\x12\xcb\x41\x88\xbc\x75\x06\x9e\x90\x0d\x66\x53\x00\x29\x1e\x8a\x18\xaa\x18\x6d\x6d\x4f\x30\x0d\xe4\x99\x2b\x45\xd5\x5c\x00\xab\xf0\x17\x50\xb1\x79\x47\x2e\xe0\x11\x1b\xf6\xb6\x23\x6e\x1c\xfa\x37\x66\xc5\x48\x30\x89\xfe\x16\x73\x59\x96\x90\xc7\x62\xec\x0c\x8c\x8a\xbc\xc7\x33\x96\x83\xd5\xaa\x20\x05\xaa\xbe\x43\xb6\xdd\xd0\x5c\x2f\x78\xbb\xbd\x8d\xcf\x23\x7c\xc8\xb0\xa5\xe8\x36\x2d\xcc\x81\x4a\x44\x5a\xd4\x85\xd3\xb0\xcb\x58\xea\xbd\x38\x17\xe6\xb8\x77\x8b\x65\xcf\x31\xbb\x39\x3e\x9f\x8f\xa2\x68\x7a\x64\x8b\x1a\x2e\xff\x7d\x36\x77\x83\xd7\x95\x52\x6d\x1f\x00\x9c\xe5\x3c\x23\x8c\xb1\x6c\x73\xa9\xb9\xac\x4b\x8b\x64\xfb\x16\xa3\x3e\x4f\xa9\x67\x9b\x5b\x33\x7d\x72\x76\x6c\x21\x63\x12\x3e\x47\x6a\x14\x07\x11\x4c\x27\x3a\x16\xaf\xe7\xc4\x18\x62\x33\xad\x30\xbb\x46\x49\x9d\x26\xb0\xc1\xc8\x8c\xe7\x58\x6d\x40\x13\x9f\xf6\xf5\x01\x49\x8c\x77\xd9\xa4\xd6\xf5\x10\x0d\x7d\x1a\x17\xa9\x89\x26\xea\xce\x8b\x8e\xcd\x3e\xa3\x60\xb2\xdb\x60\xb7\x37\xa0\x34\xfd\x0c\x29\x00\x41\x49\xe6\xa2\xef\xa6\x7c\x06\xed\x7d\xde\x5a\xab\xea\x34\x6b\x79\x3f\x48\x9b\x0c\x51\x5c\xae\x76\x13\x7b\xe8\x3a\xb7\x7b\x82\x24\x2d\x5e\xa4\x5e\xf2\xc1\x6b\xe6\x2c\xb6\xcb\xb2\xab\xd0\x39\x28\x3b\xcf\x07\x1c\xc7\xf8\xc6\xc0\x3a\xbd\x79\xa6\x8d\xf0\xb6\x3f\x3f\xd7\xf7\x51\x64\xb5\xd4\x79\x52\xab\xc7\x51\x7f\x90\x4b\xad\x37\x48\x88\xe9\x98\x79\xe6\xea\x86\xb5\x7a\x7a\xd7\x0e\xe5\x5a\x0f\x7b\xf5\x30\x91\x4d\xdd\x49\xf5\xdc\x98\x3a\x3a\x84\xb7\x1a\x74\x10\x59\xdc\xb9\x91\x9f\x29\x6a\xb8\xee\xce\xc4\x8d\xed\xda\x81\xd4\x35\xf3\xbd\x77\x5b\x30\x86\x09\xd2\xa7\x62\x7b\xbf\x7a\x60\x75\xde\xc2\x45\x11\x1d\x5d\x1e\xbd\x65\x81\x5e\x43\xf7\x9a\xe5\x2d\x58\xaa\x09\x08\x04\x47\x83\x40\xd2\x6b\x8e\x3b\x9b\x65\x95\xe8\x0a\x99\x72\x7f\x8f\xc7\xe1\x64\xe3\x85\x82\x9f\x91\x25\x0e\x22\x27\x24\x3e\xab\x2d\xab\xf3\x0d\x50\xed\x0f\x1b\x92\x04\x71\xa4\x13\x6d\x8b\x46\x79\x2c\x32\x21\x17\x8a\x61\x6e\x46\xe7\xa4\x9f\x26\xd8\xac\xc4\xfd\xeb\xc1\xa2\xfe\x37\x03\x8b\xe7\x1f\xe5\xc9\xf1\x67\x79\x02\x9e\x99\x5b\x0c\xeb\x38\x05\x6c\x36\xa7\x50\x50\x06\x0e\xdf\x06\x12\xc7\xc1\x80\x3a\x6e\xcd\x33\xc7\x07\x58\xb3\x57\xac\xb6\x24\xa6\x54\x18\x13\x42\x09\xba\x9b\x9a\x08\x25\x41\xaa\x70\xeb\xac\x54\x5d\x1d\x7a\x8d\xd0\x4a\x22\x76\xf0\x56\x61\x81\x95\x55\x5a\xa9\xa7\x1d\x6d\x89\x4b\xbf\x93\x5c\xbe\x0f\x2d\xc1\x9c\xfc\x0e\x4d\x52\x52\x05\xbb\x26\x7a\x01\x40\x1b\x6d\xb0\x12\x4b\x09\xfb\x22\x84\xd9\x61\xf9\xf6\x25\x6d\x7c\xcb\x61\x1b\x8e\x0f\x22\xb6\x29\x03\x2f\xbb\x78\x26\x02\x15\x28\xa2\xec\x2c\xc7\xd2\x97\x8a\xe5\x32\x8b\xd6\x2c\xe9\xe4\x72\xf4\x12\x63\x5b\xcc\x1e\xfd\xc5\x1d\xdf\x95\x1a\x49\x78\x5b\x48\x8c\x7d\x34\x11\x39\x6e\x45\xbe\x98\x19\xa8\xc0\x01\xf6\x91\x64\x81\xbe\xbc\x94\xdb\xaf\xb2\x7e\x29\xf8\xb8\x53\xc5\xba\x8d\x84\x71\xce\xca\x24\xed\xcc\x46\x65\xcc\xbf\x0c\xc5\xb7\x44\xd9\xc2\x79\x19\x73\x70\xcc\xde\x9b\x1f\xcb\xb6\x8c\x5c\x11\x91\xe7\x2c\xcb\x1a\x0a\xc1\xee\x5e\x20\x38\x5f\xda\x4b\x3a\xf1\xb0\xd0\x71\x75\x2f\xfb\xb8\xe6\x53\x70\x47\x8e\xc4\x15\xe5\xd2\xfe\x9b\x46\x3e\x6f\xd5\x88\xdf\x55\x61\x71\x13\xcd\xaa\xcc\x02\xcd\x22\xd2\xd3\x0b\x7c\x34\xe8\x32\xb9\x63\xe5\x71\x94\x48\xef\x2d\xd0\xcc\xbb\xe5\xb7\x39\x37\xa7\x28\x0c\x3a\x4b\xf2\x06\x81\xa3\x66\x8c\x02\x8e\xae\x33\x82\x46\x18\x70\xe3\x1e\xe0\xe0\x73\x33\x67\x74\x8c\x1e\xb5\x5c\x5b\x54\xa0\x3b\x0c\xc7\x91\xb5\xf1\xd0\xa3\xe6\xd8\x28\x24\x44\xc4\x28\xc8\x4b\xd2\x52\x4f\xae\x0a\xc5\x67\x9c\x79\x57\xf5\x5a\xbe\xf9\xd5\xb8\x8e\xad\x98\xb0\x0f\x27\x82\x4a\x01\xd4\xe9\xab\xa9\xf7\xec\x74\x72\xb1\x31\xf8\x85\xc9\x1a\xc9\xad\x18\xa6\x75\x3f\x33\x5a\xd2\x3a\x5d\x17\xd2\x61\xb8\x7e\x87\x64\xfa\x9b\x22\x94\xc0\xdb\x14\xc1\xf8\x6f\x16\xf8\xf9\xb3\xd4\x4c\xa6\xca\xf0\x90\xbc\x26\x96\xfd\xdb\xdc\xd2\x7c\xda\x25\x72\x25\xf4\x6f\x17\xce\x94\x19\x4c\x7b\xa4\x1b\x92\xf7\xbc\xb0\xd3\x5f\xce\xe8\x97\x85\x57\x00\xc9\x43\xbc\xc3\x89\x18\xd8\x1d\xb4\x19\x8a\x71\x62\x42\x62\x80\x70\xe4\x7e\xec\xf9\xb4\x7f\x44\x3a\x32\xc2\x35\x7a\x35\x60\x07\xd9\xed\x68\x92\xea\x8a\x3e\x38\xa8\x81\x2f\xe0\xf3\xce\xb0\x8d\x11\x6a\xd0\xe5\x11\x3a\x71\x4c\x51\x2e\x53\x4e\xee\x2c\xc8\xd9\xc8\x21\x5d\x87\x7f\xf5\x28\x0c\x8b\xa4\x1e\x11\xca\x02\x30\x2e\x2b\x92\xa9\xf8\x9b\x91\x28\x83\x25\x93\x2d\x14\x60\xb0\xb9\x29\x93\x2b\xbc\x43\x92\x9d\x98\x8b\xaf\x4e\xe6\xb0\x29\xd3\xd0\x78\x15\x6a\x3f\x6e\x5a\x1c\x6e\xca\x68\x7e\x8b\x7e\xef\xe6\x0a\xae\x47\x98\x7c\x19\xdc\xc0\x2b\xa7\x71\x43\x6e\x07\xc6\x61\x2c\xf5\x02\xf4\xd5\xdf\x13\xd9\xdf\x9a\xe9\x2e\xfc\x9c\xd2\x69\x2b\x6a\x6c\x32\x89\x80\x9b\xbb\xc2\xea\x20\x25\x3c\xa2\x2e\xc5\xb2\x35\xf3\xd2\xfd\x47\xbf\x3b\x27\x10\xce\xbf\x18\x3c\xe6\xa2\xfa\xf7\x02\x8f\x16\xff\xbb\x4c\xe9\x8f\x2d\xf8\xa3\x4c\x19\xb3\x13\x15\x2b\x01\xd6\x5c\x37\x58\xa2\xa4\x29\x19\xdd\x64\x03\x37\x08\x5f\x32\x7f\xe9\xa0\xb7\x08\x2d\x02\x01\x3d\x3b\x20\xc5\xde\xc5\xb3\xc5\x6a\x9d\xcd\x82\x55\x4c\x83\x33\x16\xfc\x40\xe3\x92\x14\xea\x3c\xfc\xfd\x21\x3f\x0b\xc7\xc9\x0c\x37\x46\x3f\x5e\xea\x91\xb7\xa7\xca\xca\xc9\xee\x9b\x0c\x49\x31\x13\xbb\x85\x8a\x12\x0f\xae\x71\xb1\xdc\x67\xe9\x04\xb0\xcf\xcc\x35\x82\x20\x9c\x0f\x4f\xca\x8f\x6e\x58\x26\x71\xea\x57\xf5\x62\x6d\xd6\xea\x78\xbc\x8f\x67\xbb\x9d\xaa\x74\x90\xe3\x47\xa0\xcb\xb7\x89\x14\x4b\x19\xc9\x0f\x28\x02\x96\xf1\x16\xee\x05\x54\x7b\xdc\x43\x8f\xed\xca\x41\xf3\xcc\x15\x0b\x41\xd7\xb8\x03\x36\x84\xa5\x9b\xd0\xf1\xe2\xef\xa4\xf4\xf7\x67\xdc\xc1\xdd\x20\xe2\x6d\x14\x79\xc6\xb7\xdc\xcf\x89\x87\x7e\x15\xb9\x45\x98\x6d\x1f\xbc\xdb\x06\x4e\x3a\x5d\x99\x18\x33\xe7\x01\x30\x48\xe9\xec\x44\x6f\x75\x90\xae\x8d\xfd\x71\x63\x79\x20\x80\x47\x18\x02\x5e\x63\xb3\x34\xfc\x68\x06\x54\x48\x28\xe6\xf8\xa6\xe1\xcb\xc7\x36\x7d\x71\xdc\x6f\x95\xbd\xf3\xe9\x8c\x7b\x91\x22\x42\xcf\xfc\x3d\xe1\x09\x9d\xbd\xee\x49\x13\x9b\xaf\xc3\x64\x62\xf2\xcc\x39\x4a\xaa\x9c\xca\x45\xea\xc1\x3c\x1b\x56\xed\x90\x2b\x89\xeb\x0c\x93\xe1\x34\x4b\xd7\x1c\x2b\x7b\x5a\xbd\x96\xa3\xbb\xd1\xd8\x68\x68\x23\x8f\x60\x5c\x65\x50\x53\x46\xfa\x72\x22\x39\xa6\xbe\x30\x7d\xd0\xe7\x19\x41\xa8\xaf\xc4\x8a\xa2\x10\xb9\xa1\x8e\x93\xb5\x28\xc8\xf8\xda\x51\xfa\x73\xe7\x29\xb2\x7a\xa8\xf0\x4b\xcf\x7a\xfc\x98\x1b\xc1\x0a\x17\x8c\x9d\xfa\x3e\x76\xce\x63\x3b\x5b\x29\xa2\x2c\x98\x05\x24\x50\x75\x76\x0a\x29\x26\x07\xf3\x36\x92\x77\x8d\x06\xeb\x21\xd2\x27\x9e\xd0\x90\xab\xb6\xf7\x6f\xb7\x0a\xcb\x29\xaa\xd2\x81\x73\xd0\x6f\xb4\xd9\xaf\xf9\x89\x66\x50\x2d\x10\x78\x10\x47\x0a\x0c\x7f\xf2\xe6\xb7\x5f\xf3\xc6\x13\x6c\x05\xfe\x08\x68\x6b\x43\xd4\xa1\x7f\x20\x94\x65\x52\x00\x9f\xf3\x92\x48\x7d\x25\xb8\x9e\x83\x86\xd9\x6e\xdc\x03\xb4\x0e\xeb\xac\x30\xee\xe8\xcd\x76\x12\x47\x2f\x54\xcc\x1b\x49\xeb\x15\x6b\x08\x42\x41\x75\xd2\x0e\x9e\x0e\x9a\x0c\xa4\xad\x8a\xa6\x98\x9d\x42\xdc\x86\xc8\xd6\x72\x15\x45\x55\xf3\x15\x37\x6c\x36\x83\xd7\x6a\xa3\x07\x84\x80\xbf\x64\x54\xc5\xd5\xef\xbf\x04\x26\x20\x69\xa6\x4f\xc1\xc8\x44\x8d\x6a\x5c\xd0\xdc\x8a\xf8\x10\xcf\x20\x1c\xa7\xf1\xf5\x42\xa9\xb6\xb0\x0b\xd3\x0d\x86\xe9\xdc\x7a\xb4\x00\x4f\x55\xdb\x7f\x7d\x50\xef\xff\x5e\x41\x5d\x1e\xff\x19\xd4\xab\x11\x74\xb0\x22\x0b\x42\x00\xb6\xe4\x49\xfe\x10\xb4\xa4\x0e\xa9\x9e\x4a\xc9\xb1\x6f\xb4\xf9\xf1\x7d\xdf\x38\xad\x77\xde\x86\xe3\x0a\x59\x8a\x9d\x41\xbd\x84\x03\xb7\x5d\x82\xd3\x9c\x5b\xcf\xcd\xd1\x9a\x3b\x0e\x34\xfb\x4c\x9a\x68\xe6\xaa\xbe\xb5\x24\xdc\xb5\xcc\x79\x2c\xa1\x4d\x13\x59\xc6\x79\x11\x83\xd2\x58\xc8\xa1\x1d\x25\xa2\x8d\xd6\x37\x49\xc1\x24\x0a\x5e\xe3\x95\xf4\x8e\xb3\x33\xb7\x79\xe5\xfd\x4a\x13\xc1\xf4\x2a\x42\x43\x82\x05\x76\x90\x67\x50\x80\xd4\x0b\x50\xb8\x0d\x64\xb1\x17\x63\xf5\xd6\x37\x0a\x31\xa9\x89\x1d\x91\xfa\x16\x2f\xac\x86\x24\x4f\xeb\xcd\x5e\xd3\x9c\x18\x7b\xae\xb0\x69\xcf\x15\x5f\xae\xc5\xf6\x43\x7f\x58\x3e\x90\x3c\xa6\xa2\xc1\xc1\xe0\xe1\x1b\x32\xc3\xa8\xce\xdb\x49\x33\x15\xf2\x63\x16\x78\xc8\x39\x07\x9d\xd6\xba\x3d\xb5\x31\x4b\xd0\x01\x64\x65\xc0\x98\x64\x83\x96\x42\xdd\x86\xa2\x1b\xd5\x4c\x06\x45\x39\x67\x76\x9c\x49\xa7\x50\x4c\xec\x48\xcc\x0e\xa4\x9e\x31\x05\xa5\xe7\x3c\x6f\x4f\xa9\xda\x59\xeb\xc4\x57\x72\x16\xb2\xc3\x3d\x66\x51\x98\x92\x94\xc9\x6d\xb9\x30\xe2\xfa\xc5\x15\x99\x1d\xe8\xf0\x5a\x1b\x18\xec\x40\x68\xa9\x6e\xb0\x02\x3a\x20\x4c\xd4\x0e\xda\x76\x56\x11\x0b\xc4\xfa\x1c\x3d\x81\xa1\x98\xa5\x4c\x85\xa1\x1d\xa2\x2c\x71\xc3\x17\x1c\xf6\x69\x07\x4d\xd8\x61\xfb\xe7\x10\x4c\x11\xeb\x1e\xfb\xc9\xeb\x9c\x85\xb9\x5f\x68\x6d\x97\x71\x94\xda\xff\x52\xfe\x50\x15\xa9\x01\x00\x3b\x8f\xe9\x36\xb9\xa3\x2e\xd6\x50\x12\xb8\x6c\x28\x2a\x92\x1e\x92\x0f\x9a\xee\x8e\x98\x52\xdf\x3b\x12\x7b\x87\x6b\x6e\xec\xc8\x81\xfc\x97\x5f\x83\x48\x6e\xc6\x57\x02\x67\x96\x3d\x26\x06\x55\x46\x3a\xb8\x06\x6f\x83\xc4\x71\xa7\x6d\x50\x6a\xe4\x3d\xfc\x20\x9f\x87\x52\xbc\xd1\xfd\xe8\x99\xff\x88\x5e\x4d\x5b\xb6\x55\xd6\xd4\x7d\xf0\xf7\x17\x81\xe8\x1d\xb9\x27\x43\x64\xfd\xc4\xfc\x75\x39\x38\xeb\x07\x5d\xdb\x97\x6e\x3d\x40\xf3\x84\xaa\xa2\x79\x48\x12\xe1\x0b\x97\x79\xaf\xea\x4b\x86\x46\x92\xb8\x45\x85\x2f\x7b\xf3\x6a\x81\xe8\x3e\x3f\x80\x31\xde\x52\x17\xea\x91\x66\x78\xd3\x97\x9a\xe1\xf0\xa1\xf8\xbc\x10\xdc\x82\xc4\x98\xdc\x83\x80\x5b\x2c\x08\xa2\xf8\x2f\x25\xfd\xe6\xe2\xf8\x37\x0b\xbc\xe5\xaf\xc0\xeb\x3f\x58\x51\x60\xc1\x79\x40\x80\xe4\x52\x42\xed\xd7\x37\x69\x55\x2a\xd7\x84\x85\x71\x32\xd6\x11\xf9\x11\xda\x43\x6b\x17\x59\x8f\xbe\x0f\x5c\xb3\xfc\x5a\x90\xf0\xe3\x7e\xc2\xe1\x07\xc4\xc2\xa4\x99\xad\x52\x37\x89\xf6\x3c\xf8\x74\x0b\x8b\xa2\xc4\x69\xeb\x31\xb5\x26\x8d\x46\x0b\x15\x08\x7a\x52\x00\xea\x93\x56\xfa\x53\x05\x43\x97\xe8\x71\xb4\x27\x13\xbc\xe1\x8b\x0d\xe6\x45\xb7\x4d\xb3\x71\xa3\x58\xb6\x5e\xbe\x86\xa6\x87\x42\xfc\x56\x3d\x7e\xf6\x60\x87\xb3\xb9\x54\x47\x8e\xe4\xfe\x7c\xe4\xf2\xf1\x3c\x10\xd1\x17\xf1\xe2\x39\x20\x7b\x7d\x9a\xe0\xfd\x3e\x85\x1f\x99\x8f\x78\x01\x73\xee\xac\x6e\xe1\x8d\x5f\xbb\xba\xb6\x52\x9b\xb3\xf8\x46\x06\xc5\x6f\x5a\x10\x92\xe9\x63\x01\x75\xbe\x60\x35\xc9\x7c\xe3\x7a\x32\x45\x68\xae\x56\xad\x23\x1f\xa2\x60\x6d\x01\xb3\xd0\x5d\x97\x6f\x6d\xbd\x07\xb8\xe9\x3a\x9e\x9d\xfa\xcd\x28\x7c\xcd\xd0\x45\x02\xe8\x00\xdf\x9f\xbc\x63\x71\x5b\x6f\xd4\xec\xee\xd6\x43\x6e\x58\x2b\x23\xdd\xca\x7e\x18\x35\xc5\xf4\xd2\x7e\xfe\x0c\x33\x30\x5c\xa3\xd7\x57\x01\x70\xa4\x61\xae\x87\x6b\x60\xc8\x53\xb1\x18\xed\xfa\xa5\x9d\x0b\xad\x6a\x1f\x74\x60\x2c\x97\x10\xeb\x2b\xf9\x10\x6a\xda\xb0\x55\xda\xde\xd1\x2b\x43\xd5\x0c\x71\xaf\x9e\xfa\xd9\x69\x3c\x6c\x64\xff\x82\xe0\x51\xe8\x42\x50\xa5\xf7\xce\x76\xc2\x13\x88\x52\x18\x65\x3e\xc9\x3c\x5e\x8a\x21\x32\xa2\x1b\x95\xc5\x8f\x57\x81\xde\x5a\x46\xba\x8c\xa1\x27\xb7\x41\x4d\xc7\x4e\x3d\x2a\xb8\x08\x25\x09\xa2\xf6\x68\x23\xa5\x74\xa1\x3c\x40\x9f\x7b\x86\xe2\x11\x94\x29\xe6\xcc\x90\xee\xd8\xc5\x9e\xbc\xcb\x50\x85\xff\xc0\x31\xf0\x7e\x90\xb2\x21\xea\xb8\xb3\x07\x4f\x41\x3b\x05\x6e\xd2\xfb\x45\xbb\x2e\xfa\x3c\xfe\x06\x0e\x97\x55\x01\x2b\x0f\x74\x81\x52\xfa\xd5\x17\xbc\x1f\x2b\xa7\x1c\xb2\x33\xd4\x03\x59\x76\x40\xc4\x6a\x01\x2f\x63\x4b\xf1\x5d\x82\x39\x83\xdd\x16\x6d\x9b\x18\xd6\x69\xbc\x44\x42\xd2\x7c\xd6\xca\xd7\x22\x87\x03\x41\xe3\x4e\x82\xe8\xb0\xdc\x13\xcb\xd6\xdd\x0f\x25\xb5\xbe\x80\xbd\xa6\x39\xf0\xf8\x63\x15\x71\x00\xcf\x4a\x3c\xa6\xd6\x07\x07\xb1\x66\x04\x26\x00\xc1\x9a\xe8\xaf\x42\x62\x8d\x7f\x6d\x8b\x6e\x3e\x96\x7f\xaf\xc0\xcb\xd5\xbf\x03\x6f\xdf\x2f\x06\x16\x82\x67\x03\x7e\x5d\x5f\x64\x5b\x25\x6a\x21\x0f\x23\xc2\x96\x78\xae\xa0\x27\x48\xd5\xcb\x00\x6b\xec\x7a\xee\xa4\xde\xbd\x6f\xde\xf7\x6b\x31\x52\xe8\x54\xc1\xe9\x85\x26\xe9\xc5\xa1\x49\xbc\xf0\x10\x97\x62\xb5\xd6\xa5\x27\x61\x72\x40\x3b\xed\x37\xb6\x1c\x80\x8f\xbf\xe1\xbb\xc0\x9d\xa4\xf1\xfb\xe3\xce\x3c\x77\xa6\xfc\x43\x93\xd2\x65\x3b\x4c\x93\x3f\x08\x74\x37\xeb\x57\x22\xe6\xfe\xb3\x6d\x04\x9a\x11\x1c\xff\x1c\x54\x60\x9e\x4f\x60\x38\x80\x38\x3f\xff\x86\x51\x09\xf3\x45\x87\x49\x7b\x06\xe4\xa2\x43\x49\xb2\x04\xd2\x58\x6b\x7b\x48\xe5\xba\x79\x67\x1d\xe4\x10\x9e\xd1\xe4\xd1\x7c\xeb\x7a\x99\xe0\xaa\x1c\xae\x5a\x47\x06\x2d\xb1\xb6\x7f\x3d\xf0\x73\x19\xed\xb2\xe6\x83\x2c\x67\x4f\x16\xea\x9f\x22\x6f\x5c\xe5\x30\x15\xbb\xb2\xa9\xe6\x38\xbc\xe6\xe5\x0e\x23\x3c\x05\x55\x8e\x2c\x63\xd6\x00\x12\x20\xdc\x65\x1a\x7d\x5f\x7b\x2b\x3b\x6e\xdc\x23\xb2\xd4\x78\x76\xe5\xac\xb2\xd1\x2d\xac\x8c\x9b\xef\xbb\xe6\x33\xaa\x20\x6d\x63\x2a\x6d\xdd\xaa\xc1\xdf\x65\xf6\x93\x8c\xb1\xc7\xfb\x68\x03\x12\x06\x8b\xfb\x8c\x1d\x1e\x01\x0f\x89\xae\x34\x23\xa4\xbf\xcd\x05\x4d\x1e\x16\xd4\xe1\x54\x16\x0f\x6d\x69\xd5\x69\x19\x20\x05\x1a\x6f\xa5\xe4\x5b\xed\xfc\x5d\xdf\xdc\x34\x6a\x0f\xdb\xe7\xac\xa1\x11\x7e\x13\x6e\x92\xf8\x6e\xc0\x6b\x5b\x8f\x83\x09\x14\x2c\x7a\x02\x80\x93\xce\x78\x84\xf9\x47\x26\xc4\xb1\xb2\xb7\xfb\x27\xe9\x98\xcd\x40\x50\x7b\xf8\xfb\x49\xc4\x93\x13\xcd\x90\xdf\x19\x3e\xa3\xae\x95\xc1\x3f\xe0\xf6\xb2\x6a\x9e\x86\x9f\x67\x7a\x32\x56\x45\x90\x03\x6c\xbd\x52\xe1\xdb\xde\xb9\x6d\x5b\x90\xef\x6b\x92\xe7\x1c\x7b\xe8\x6f\x82\xca\x5a\x80\xcc\xd6\x72\x19\x93\xce\x1c\x08\x26\x79\x58\xdf\x5a\x92\xd3\x07\x1b\x11\xf8\x0d\x75\x2b\x92\x03\xdb\xe3\x0b\x91\xac\x8a\x19\xb0\xad\x75\x3e\x75\xdb\xa7\x9a\x6a\xb1\xf1\xb8\x79\x96\x91\x27\xb4\xb9\x88\x1d\x6e\x2d\x67\x98\x9b\x8d\xe1\xfd\x64\x88\xa3\x04\xfe\xdc\x98\xff\xd2\xb4\xf1\xf8\x37\x4b\x1b\xab\xdf\xdf\x69\x63\x0f\x6f\x7f\xf6\xb9\x3d\xea\x1b\xd3\x4c\x2d\x78\x8d\x45\xea\x41\xb8\x13\x5a\x78\xd4\xa4\x65\x03\xc1\x59\x42\x04\x5f\xeb\x83\x8d\xab\x3a\x5b\x84\x23\x3e\xcf\x4e\xab\x00\xa6\x12\x34\xb7\x28\xac\xc2\x92\x64\x6e\xc8\x92\x90\xbb\x5e\x2d\x4a\xdb\xce\x47\xc6\xa6\x5b\x9a\x9e\xf4\x0a\xd2\x28\x49\xe2\x67\x99\x0b\x24\xec\x2d\x9b\x44\x99\x75\x55\x25\x45\x01\x04\xdd\xc8\x96\xc5\x08\x74\x85\x7e\x7e\x38\xf1\x9a\x29\x5f\xcd\xb0\x57\xab\x7d\x83\x9b\x01\xcd\xd7\x1b\xed\xae\x58\xc4\xaa\xb0\xf0\xca\xeb\x4e\xde\x10\x7e\x90\xe6\xf5\xe3\x95\x66\xa9\x5a\xc6\x9e\xca\x0a\x4d\xcd\xa8\x9f\xcf\x9b\x6f\x36\x1e\xc1\xe4\xe1\xf6\x58\x83\xc3\x66\x42\xa4\x8c\x9b\x06\x58\xc1\xa8\x38\x1b\xf5\x12\xf3\xde\xd9\xb4\x4a\xab\xa1\x4e\x4b\xe8\xc1\x59\xc7\xa4\xc8\x64\xa9\x6d\xef\xea\x5a\x29\xb2\xac\x71\xde\xb1\xba\x7b\x1c\x8a\xb6\x73\xfe\x6a\x9e\x66\xd9\xa7\x6b\x7b\xaf\x75\x57\x0c\x66\x98\xbe\xe6\x1c\xf6\x0b\x2b\x08\x60\x23\x81\x8d\x49\x89\x1d\xa1\xa7\x96\xe5\x60\xed\xe1\x20\x63\x4f\x21\x57\xde\xe2\x7b\xb9\xdf\x60\x29\x74\x22\x48\x27\xff\xdc\xc5\xc9\x71\xed\xe1\xa1\x71\x83\x5e\x2d\xf7\xc3\xba\x2d\x5f\x31\x5b\x25\x78\x5d\x2e\x08\xf2\xe8\x8e\x93\x61\xe2\x36\xc3\xb1\x82\xb3\x43\xa1\x72\xf0\x58\xc9\xdb\x1e\x84\x40\xa4\xe5\x4b\x2b\xf9\xd0\xbc\xe4\x9e\xad\xdd\x8d\x96\x86\xb0\x17\x8a\x5b\xc3\x11\xab\x9e\x25\x87\x9a\x78\x44\xf9\x16\x1f\x61\x0d\x8c\x10\x4a\xa7\xc0\x64\xf5\x48\x1b\xa9\xa7\x40\x5b\xec\x63\x23\xeb\x1b\x19\xef\x81\x82\xbd\x8d\x28\x14\x1e\x19\x9c\x8e\xbb\x11\x68\x48\x99\xb3\xde\xba\x38\x63\x79\x55\xd3\xe3\x63\x48\x7b\x2e\x5f\xda\x99\xe2\xce\x3f\xe7\x90\x07\x3b\x70\x77\xf3\x91\xb7\x22\xbd\x5e\x27\x9d\xc3\x19\xe4\xbe\x3d\x1f\xb0\x27\xca\x27\x10\x7a\x48\xff\x88\x16\x84\x86\xb3\xfb\xa4\x63\x86\xbc\xf2\x17\x1d\x11\xa0\xf6\xd3\xc0\x85\xb1\xa3\xd9\x7a\x9a\x8d\xd3\x3d\x2b\x5a\xab\xf3\x4a\x74\x1a\xed\xe5\x7e\x77\xe8\xf1\x5a\x50\x5e\x32\xbe\x40\x33\xc5\xe1\x88\xe2\x01\x57\xf4\x97\xb9\x19\xd8\x51\xac\xd0\xa2\xf6\x8c\xe7\xbe\xba\xc8\x0a\xcd\xb1\x26\x2f\xa4\x00\x20\xbd\x3c\x6b\xd2\x20\xcb\xd6\xcc\x5d\xf1\x03\x17\x06\x4e\x6a\x32\xff\xea\xd3\xec\xdf\x2c\x8d\x2c\xc4\xbf\x03\x91\xa2\x37\x08\x61\x92\x6a\x51\xa1\x36\x1c\x49\x61\x6d\x42\xeb\xb9\xc9\x82\x67\x85\x62\x69\x39\x01\x76\x67\xe1\xe7\x16\xc5\x15\xd4\x99\x52\x3e\xa0\xbb\x93\x65\xd9\x2c\xcb\x2b\x62\xba\xf5\x39\x27\x66\x3c\x77\xb2\x40\x72\xed\x35\xca\x79\xdf\x41\xe8\x71\xe1\x31\x40\x3b\x8c\xa6\xd5\x00\x78\xdf\x97\x2f\xef\x2f\x19\x5f\x91\xc4\x4a\x13\xa7\x50\x70\x07\x6c\x0b\xb0\x3d\x41\x51\x4a\xf5\x57\x6c\x87\x13\x2a\x30\xcd\xd5\x63\x0f\xda\x0d\x4a\x67\xcb\x30\xc4\x2b\x85\xd4\xe4\x5e\xeb\x4f\x98\xbf\x9a\xf9\x5b\x94\x87\x0a\x3a\xfc\xc4\x3f\xaf\xcb\x69\x69\xbe\xa8\x5f\xdb\x70\x2e\x47\xf1\x00\x69\x4d\x98\x9a\x7f\xe5\x25\x95\xbe\xe4\x09\x0a\x87\xe5\x87\xa6\x1e\x2c\xcc\xfb\x76\xdc\xc2\x2d\xc7\x09\xbd\x32\xc2\x82\x38\x70\x88\x30\x42\xed\x7d\x44\x55\x3b\xc5\xbd\xf2\x75\xad\x05\x75\x43\x77\xf0\x1c\xee\x1f\xd5\x20\x29\x52\xe0\x18\x2c\x30\x56\x5d\x0a\xce\xf6\x85\xb8\x0f\x6d\x18\xdd\x62\x14\xea\x63\xc5\x6f\xec\xdf\x7d\x7e\x2b\x7d\x79\x57\xab\x03\x3b\x87\x63\xb2\x28\x85\x7f\xb9\x02\x63\xe2\x76\x38\xe5\xb3\x7b\x19\xe1\xb9\xef\xfe\xc3\xc4\xac\x02\x44\xa2\x94\x6f\xc6\xcf\xe9\x5a\x95\x4c\x66\xc4\x5b\xce\xd7\xf1\x09\xd4\xb9\xd0\x95\x18\xde\x9c\xcb\x54\x9a\xe5\xf5\x4d\xe3\x0e\xaf\x57\x67\xf0\x2d\x7e\xbe\xf2\xdb\xec\x71\xa6\x23\xee\x78\x0d\xa9\x92\x9b\x49\x81\x6f\x8c\x79\x12\xe4\x25\x02\x8a\x1f\x47\xd6\x81\x44\x53\x3c\x5a\x97\x33\x79\xf5\x19\x04\x37\x74\xce\x5c\x76\x71\x90\x84\x25\xbd\xf0\x33\x1d\x41\x81\x66\x5d\xf0\x30\x3d\x0a\x0c\xc8\x2e\xab\xa0\x58\x1f\x9b\x0f\x19\x81\x6a\x56\xbc\x37\x42\x59\xe7\x80\x24\x22\x7f\xcf\x33\x03\xa6\x06\x34\x28\x4b\xc6\xae\x69\x61\xc1\x76\xbf\xa3\x73\x18\x4a\x5f\xf8\x6c\x00\x8d\xc0\xce\x5a\xe9\xab\xef\x13\xa5\xa5\x24\x35\x3a\x7c\xf7\x80\x25\x45\xca\xb1\xdd\x67\x30\x10\xec\x95\x8d\x92\x00\x33\xfe\xe0\xca\x06\xf7\xb3\x9f\xd8\x8c\x98\xca\x2a\x74\xe2\x6e\x80\x08\xff\x31\x06\xb5\x8a\x34\x33\xda\x00\xed\xa2\xfc\x84\x61\xfa\xe0\x2c\xcb\x47\x15\x31\xf2\x5f\x4d\x8c\x2c\xff\x6e\x6c\xe7\xd8\xfc\xcd\x76\x42\x7f\xb2\x9d\x89\xed\xdb\x28\xbe\x26\x4f\x1a\x11\xfe\xc0\xa7\x8b\xa9\x45\x52\x56\xcf\x88\xd8\x8b\xd4\xc6\xb8\x2c\xb1\x65\x73\x7c\xee\x15\x24\x82\xcd\xbb\x22\x01\xd6\x6f\xe2\x7a\xd6\xab\xc7\x96\x27\xf3\xea\x98\x27\xb8\xec\x7e\xc8\x29\xd4\xba\xb4\xaa\xfd\x54\x72\xbc\x4e\xc0\x80\x8e\xf5\x27\xf5\x32\xfa\x50\x34\x45\x76\x1f\x3f\x4d\x23\x22\x7a\xde\xda\x60\xd3\x0e\x85\x01\xfc\x66\xe2\xd7\x11\x24\x16\xa5\xe8\x19\xb5\x51\x56\xed\xa2\x93\x01\xdd\x26\x75\x54\x7c\x65\x23\x24\x0f\x57\x12\xba\x4f\xa3\x2e\xdb\x32\xfa\x83\x34\x9e\x23\x60\x19\x23\x7e\x9a\xf6\xcf\xcc\x8e\xae\x47\x07\x0a\x29\x5f\x0a\x00\xa8\x39\xc2\xd4\x0b\x94\xc1\xbb\x60\x30\x9c\xa8\x91\xfe\x92\x69\x5a\x7c\x65\xb3\x3d\x99\x0f\x29\xee\x6a\xc8\x4c\x2a\x89\xa8\xcf\xd0\x70\x69\x06\x39\xa3\x72\x7a\xa6\x59\xa4\xfd\x75\x6a\x97\x3b\x86\x45\xc0\x3a\x25\xd0\x5f\x8e\xae\xe4\xef\x24\x0d\xdb\x16\x06\x10\x6f\x33\x22\xb2\x04\x48\x55\x4d\xb7\x95\xe5\x9a\xe8\x28\x62\x34\xba\x1b\x44\x6a\x09\xcb\xfa\x2c\xc1\xec\x08\x4b\x3a\xa4\x23\xb0\xbd\x67\x70\xd1\x97\x8b\x54\x30\xec\x96\x51\xf7\xef\x80\x77\x0d\x2a\xb0\xfd\x54\xc7\x04\xeb\x21\x40\xe1\x79\xc9\xad\xd6\xb1\x81\x4e\xbc\x2e\x3b\x27\x07\x2a\x89\x2a\x13\x4e\x49\x1b\xd7\xe1\x84\xaa\x76\x26\xe5\x6c\x84\xbe\x3e\x2c\x53\x00\x0a\xe9\x49\x1e\x81\xef\x60\xbe\x69\x85\x37\xff\x01\x70\x12\x17\xc1\x22\x73\xab\x6f\xa8\x4a\xf2\x0a\x82\x87\xa7\x71\xec\xec\x2d\xd2\x27\x83\x24\xb4\x29\x2e\x1d\x72\xa8\x4d\x40\x3a\xda\x6c\xc9\x9d\x87\x5d\x57\x3a\xa3\xdb\x67\x78\x02\x0f\x1f\xda\x37\x22\x38\xaf\x28\x74\x32\x5f\x37\xd9\x92\x98\x23\xfc\x6a\x61\x38\x25\x9d\x6f\x95\x5b\xb9\x4c\x98\x40\xc4\xce\xa8\x4b\x9e\xdd\xdb\xbd\x15\x47\x8c\x6f\x78\x7c\xde\x39\x42\xcf\xa4\xab\x75\x12\x40\x0b\x6e\x79\xce\xe8\x87\xa8\xe3\xa8\xae\xa0\x1b\x64\xae\xf0\x8f\xc7\x40\x23\xfe\xa9\x69\x94\x88\xe5\x06\xd8\x71\xab\xe6\xc4\x8e\x2a\x42\x9d\xa0\xc0\x69\x27\x3f\xd9\x67\x72\x46\x36\x00\xde\x17\xa8\x7a\x32\x60\xce\x7b\x53\xee\x1c\x2e\x40\xda\xdc\x97\x3a\x93\x57\x18\xf2\x13\x8b\xab\x46\x0f\x97\x7e\x31\x8f\x09\xe4\x25\x06\x0f\x4e\x28\xcd\x44\x19\x25\xa2\xe9\xfb\xb8\xf4\x8d\x98\x7e\x4c\xd4\x2b\x2a\xb9\xbe\xca\x68\xef\x4e\x00\x93\xcf\xbc\xd9\x7a\xb0\x2c\x59\x55\x91\xda\x7e\x6b\xe8\xba\x71\x08\xca\xcd\x17\x1d\x81\x37\x46\xf7\x18\x0d\x90\x3b\x9a\xd8\x45\x12\x56\xb0\x4a\x8c\xb7\x8d\x86\xd5\x4f\x87\x27\x8b\x94\x61\xed\x34\x8e\x15\x3e\x44\x45\x08\x46\xdd\x5f\xb2\xab\xbc\x75\x76\x2e\xcb\xa4\xeb\xda\xf6\xfe\xe2\xce\xe0\xba\x16\x10\x58\x5c\x34\x99\xa3\x7a\x7a\xd0\x15\xe3\x24\x0c\xf6\x51\x59\x4c\x4f\xfe\x9e\x51\xff\xda\x93\x77\x69\xfe\xcd\xea\xc8\xc6\xfc\xbb\x8e\x1c\x8e\x4d\x80\x84\xe0\x01\xc1\x5f\xc6\xa7\xb1\xb9\x5d\xbf\xaf\x50\xfa\x2c\xb1\x62\xa9\x7e\x12\x67\xe0\x34\x44\x51\x12\x42\x38\xab\x47\x2a\x58\x8a\xb9\x30\x8c\x29\x5c\x8a\xb1\x31\x4c\xb5\x6c\xd6\x05\x84\x7a\x86\x6c\x6e\x08\x34\xdf\x8f\x1d\x6f\xec\xfd\xe4\xb0\xfa\xf1\xcc\x3c\x75\x73\xe0\x12\x95\x91\x57\xf5\x04\xd5\x54\xf8\x1d\xb5\xff\x94\x7e\xa1\x97\xf7\x97\x17\x23\xc2\xe7\x45\x74\x4d\xa4\xfe\xf5\x8f\x28\x8f\x9c\xb2\xa5\xe4\x34\xd2\xe7\x50\x53\xaf\xfe\x83\xe8\x37\xb6\x4c\x1c\xe7\xeb\xee\x80\x6d\x03\x69\xed\x1d\x02\xd2\x08\xac\xb6\xa2\xa1\xb2\x2f\x44\x40\xef\x72\xd8\x89\xd3\x5b\x61\xcd\xc5\x47\xd7\x3c\x6f\x2e\x86\x2d\xa0\x87\xb2\x95\xec\xb6\x89\x4a\x9b\xed\xeb\x52\xf8\x59\x84\xd7\x70\x48\xc1\x31\x3f\xf3\xac\x08\x86\xcf\x80\xa1\x70\x70\x3b\xb0\x1f\x8c\xe5\xc4\xbc\x8e\xab\xe2\x5e\x31\xbb\x81\xf9\xa3\xc0\xb9\x5f\x8b\x99\x37\xe9\x39\xad\x51\x70\x71\x3f\x10\x6f\xa8\xbc\xa0\xc3\x46\x75\x1e\x00\xef\x03\xc6\xbb\xae\x21\x79\x21\x4f\xc5\x3a\x68\xe0\xf0\x7b\x64\xd0\x5a\x54\x8b\xac\xa6\x3d\x4a\xd0\x0f\x4c\x98\x15\xa8\x21\x7f\x94\x97\x39\x90\x91\x8b\xc5\xed\xb8\xa5\x5c\x9e\x16\x67\x18\x4a\x99\x91\x57\xfd\x3a\x7a\x95\xd3\x3a\x97\x51\x43\xa9\x6d\xb7\x73\xeb\x5a\x55\x0b\x45\xe3\x48\xb8\x6e\x5d\xdd\x47\xed\x91\xdd\x50\xb8\x2b\xd0\xd0\xa2\x01\x7c\x03\xa3\xa2\x46\x65\x98\x23\x93\xda\x6e\x60\xb7\x21\x9e\xb0\x65\x67\x4c\xce\x4f\x32\x6b\xce\x6d\x8d\x5f\xc8\xc0\xa4\xe2\x84\x98\xa5\xa4\xbe\x42\x65\xa7\x0c\x32\xaa\x21\x16\x10\xe2\xf7\x0b\x84\xdb\x16\xd6\x4d\xd1\x95\xe3\xa4\xc0\x33\x8a\x79\x90\x27\x1c\x53\x76\x46\x6b\xb5\x02\xe8\x4f\x76\xa1\xb9\xe8\x52\x4f\xf7\x10\x8c\x03\x64\x80\xff\xec\xe0\xaa\xd3\x5a\x69\x0f\x6d\x83\x70\x06\xcb\xad\x34\xd2\xd4\xc8\xfa\x1d\x30\x33\x87\xa4\x8c\x27\x4f\xd1\x14\x6b\x23\x7f\x6e\x56\xe7\x8b\x58\xae\x45\xb0\x0c\xcb\xe5\x44\x98\xd8\x8c\x4c\xfb\xfc\xc0\xfd\xde\x31\x76\x8e\x38\x03\x5c\xc7\x5d\xc0\xe3\x55\x40\x0b\xde\xe1\xb6\x55\x62\x92\xa8\x28\xbb\xf5\x57\x6b\x84\x14\xf0\x14\xa0\x84\x74\x58\x37\xac\x68\xc2\xee\x4f\xbd\xd0\xdd\xc7\x8b\x96\xbd\x39\x18\xaf\xa7\xbc\xae\x39\x5b\xd5\x44\x28\xe2\x6c\x93\x2a\xce\x09\xc7\x3b\xa7\x08\x97\x0f\x4d\xa6\x81\x1e\x4a\x86\x71\x18\xb5\x69\xa5\xf4\xe0\x69\xc6\xfa\x57\x0f\x3f\x2c\xd3\xbf\xd9\xf0\xc3\x78\xfc\x3d\xfc\x40\x1f\xd6\x1f\x35\x6b\x1c\xdb\x0b\xc4\x31\x41\x34\xaa\x19\x07\x61\x0f\xcb\x98\xa6\x2f\x02\xbd\xd6\x48\x54\xa5\xf0\x44\xba\xea\x60\x6d\x0b\x1d\x2d\x40\x83\x52\x11\x7c\x87\x42\xb2\x0e\xa1\xf7\xe3\x1c\xa1\xc2\x41\x8e\xb6\x45\x8f\x29\xc1\x7c\x4f\xff\x10\xab\x83\xbf\x67\x82\x47\x68\x56\x7e\xfe\xa4\xbc\x3f\x0a\x2c\x4b\x00\x81\xe1\x0f\x97\xf7\x11\xca\x92\x1a\xa1\x2b\x5d\x5a\x9e\x48\x51\x23\x36\x91\x3c\x5c\x61\xa8\x29\xd7\x1a\x9f\x8e\xae\x0a\x4b\xd6\x65\x3b\x4e\xe0\x46\x57\x0a\x8f\xc9\x8a\x76\x9e\xbd\xe4\xc1\x65\xfc\x19\xbf\xfd\x31\xe9\x6a\xca\x71\xd5\xbc\x21\x86\x93\xa4\x8b\x38\x6c\xef\x7a\x2f\x81\xd7\x84\x39\xfa\xe1\x09\x65\xc9\xb2\x95\x69\xcb\x99\xdf\x18\x0b\x1d\x68\x5a\x4f\x03\xc6\xa9\xf6\x8e\x24\xbd\x13\x9e\xd8\x4e\xc0\x96\x9b\xb2\xab\xa1\xe6\x14\xc7\xb3\xff\x0f\x7b\xff\xb1\xab\x31\xae\x64\x0d\xa2\x0f\xa4\x81\xbc\x1b\xca\x7b\xef\x35\x93\xf7\x9f\xbc\x7d\xfa\x8b\x3c\x79\x6e\x9d\x2c\xa0\x1b\xf5\x37\x3a\x1b\xc8\x41\x0d\x34\xd8\x1b\xfc\x96\x08\x92\x11\xb1\x82\x8a\x45\x76\x8a\xdb\xb6\xa1\x41\xe7\x71\x52\x86\x6b\xc2\x14\x32\x65\xa0\x66\xe3\x41\x87\xe3\xec\x62\x51\x97\x9a\x2c\xe4\xd7\xb8\x11\xd1\x9b\xb9\x60\x48\x9c\xb6\x66\xbf\x24\x8b\xf1\x3e\x39\x06\x2b\x66\x04\xdd\x62\x8c\x2a\x62\xd8\x7c\xa0\x1d\x61\xad\xa5\xc8\xef\x07\xe2\xec\x6c\xe6\x83\x65\x3e\x71\x95\x53\x7a\x12\x57\x20\x43\x33\xaa\x6e\x46\xdc\xd3\x94\x6d\xaa\x66\x0d\xaf\xd0\x7c\xda\xd0\xab\x32\x08\xef\xe1\x7a\x43\xb9\xfa\x9e\xe8\x1c\x92\xa2\x7b\x79\x53\x50\x7a\xd8\x19\xc0\x51\x40\xaf\x5d\x9f\xc3\xa7\xbc\x96\x8a\xe2\xf4\x40\x27\x2e\x54\x39\x25\x8b\x68\x13\x9b\x2f\x77\x3c\x1b\x28\x3f\x97\xb0\x37\xf0\xc0\x5e\x2c\x42\xb6\x70\x0a\xce\x97\xcb\xae\xb6\x8a\x5a\xf4\x59\xef\xa4\x59\x53\xf4\x0a\x80\xcf\x7a\x85\x85\x43\xe5\xfc\xde\x2e\x6d\x4a\x45\x46\x62\x82\x55\xc9\xd2\x5b\x1d\xbd\xde\x9a\xa6\xbf\x21\xc6\xb9\x6d\x00\x94\xaa\x86\x53\xe4\x65\x31\x67\x91\x69\x04\xc3\x82\xdd\x54\x9b\x49\xd6\x69\xdc\x0e\x7d\x4d\x08\x2f\x7e\x77\xc9\x40\xac\x63\x30\x8d\x88\x72\xc4\xf2\xcb\x4f\xb3\xa1\x11\x83\x66\x44\x1f\x2e\x3b\x8f\x6b\x89\x21\x07\x44\xe9\x9a\x11\xe3\xf9\xb1\x2c\x3d\x17\xe9\xb3\x60\xc6\x6f\x87\x8b\xb2\x42\x60\x94\xa5\xe0\x8a\x7c\x6e\xa6\x18\xb1\x7e\xc8\x32\x48\x09\xbc\x3e\x28\x75\xf5\x1e\x74\x48\xe8\x89\xd0\xbb\x98\x8d\x3b\xc8\x91\x82\xbb\xe1\x24\xa4\x4d\xfb\x25\x42\x40\xd1\xa1\x3a\x7a\xaa\x3b\xb9\x10\x9f\x3d\x40\xad\xd0\xfb\x99\x3c\xde\x8c\xc9\x63\xa4\xdc\x84\x81\x8a\xec\xf8\xe3\xe9\xa4\xed\xe2\x2c\x7f\xad\xdd\xaa\x94\x55\x22\xfd\x8f\xaf\x94\x64\x26\x04\x5e\x5a\x80\xd4\xce\x91\x41\xd3\x56\x99\x6a\x81\x69\x78\x3a\x05\x07\x79\x18\x84\x69\x15\xcd\xef\xc4\xbe\xec\x28\x5e\x91\x7d\x18\x3a\x35\x7c\xaa\x7d\x3d\xa0\xf8\x6b\xda\x45\x33\xa8\x9f\x1b\x86\x88\x7e\x21\x2b\x5d\xe9\xca\xe5\xd5\x0c\x63\x30\x59\x56\xfc\xc6\xb1\x10\xd9\x29\xf9\x9b\xa3\xfa\xf2\x0f\xcb\xa7\x87\xbf\x08\x38\x60\xf8\x5f\x51\xdd\xf6\x0d\xf2\xf5\xd2\x65\xfa\x7c\x9a\x37\xb3\x29\x62\x0e\xb1\xf6\x3a\xae\x6b\x36\x80\x79\x44\xfa\xd3\x8e\x0b\x6c\xaf\x1a\x64\x86\x0e\x10\x85\x8e\x98\x2f\x4c\x39\x22\xd9\x96\xba\xbb\x63\x03\x6d\x0e\xd6\xd5\x0f\x54\x65\x9a\x5c\xd4\x20\x8d\x0f\x3d\xa0\xc1\xac\xe0\x09\xd3\x95\xbb\x00\x08\x1c\xa7\xf1\x6f\x7c\xc6\x5e\x50\xbf\xd2\xc5\xcf\x1a\xff\xe9\xd3\x7e\xa5\x0f\xd1\x78\xd7\x51\xd2\x11\x9d\xf7\xad\x48\xf6\x0d\x5e\xca\xf4\xcf\x2d\xc0\x7b\xa5\x92\x38\xf3\x3d\x75\x39\x72\xe8\x19\xc6\x87\x54\xd2\x59\x0b\x84\x0f\xfe\x54\x84\x0f\x02\x82\x06\x51\xf2\x12\x93\x8d\x7f\xaa\x46\xa5\x03\x68\xe4\x00\x66\x56\x94\x50\x6a\x68\x4e\x07\x2e\xc5\xca\x6d\x8c\xd2\x78\xe7\x47\x3e\xd0\x1e\x75\xe1\x4f\xdd\x7e\x02\xdf\x90\x9a\x34\x00\x1d\xc8\x14\x58\x17\x18\xa0\x4b\xb2\xfb\xb4\x79\xde\x73\xc4\x46\x9d\xa1\x31\x59\x8d\x14\xa0\xf5\x35\xaa\xd5\x81\x0a\x74\xae\xea\xdc\xd8\x0d\xf9\x05\xc5\xba\x6f\x24\xb9\x4c\x9a\xa0\x1b\xeb\x82\xe1\xc8\x01\xb1\xc0\x23\xd9\xcb\xb7\xe9\x1b\x8f\x10\x0a\xb4\x26\x83\xfa\x8f\xe9\xec\xed\x28\xe9\xcc\x4f\xc0\xb0\x8f\x53\x74\xb8\x99\xe3\xf4\xee\x0c\xf3\x62\xe1\x8e\xf8\x72\x0e\xd2\x4e\x66\x7f\x4c\xc5\x8f\xee\xc6\x34\x12\xbb\xd2\x43\xb5\x13\x05\x8b\x66\xb6\x5e\x66\xba\x6b\x63\x7a\xf3\x63\x37\xac\xc6\xae\x5b\x69\x4a\x89\xc7\x92\x80\xe1\xf6\x94\x13\x28\xe6\x48\xa4\xc8\xc7\x7b\x6e\x97\x9c\x1b\xbf\x85\x44\xfd\x6c\x70\xe9\x71\xf7\x4e\x7c\x06\xce\x21\xb2\x72\xa6\x3a\xa5\x6c\x68\x6f\xca\xcc\x40\xc4\x31\xb9\xa3\xc1\x68\x8c\x65\x24\x4c\x87\xb1\x50\x54\xd2\x0c\xe8\xde\x9d\xa8\x1e\x87\x16\x3e\x57\x29\x9c\xc2\x28\x1f\xf7\x8e\x1f\x9c\x77\x7d\xee\x3a\x6b\x50\xdc\x5b\x8b\xe1\xc8\x84\xc8\x0f\x7c\x39\x31\x1f\xac\x93\x02\x90\x43\x68\x80\xbd\x62\x4c\x5f\x4e\x90\x23\xbf\xa4\x11\xfb\xaa\xf1\x12\x02\x8d\x5e\x6f\x97\xdf\xf8\x5e\x12\x39\x80\xa0\xae\x3a\xa1\x9c\xb1\x4e\x35\x67\x7d\x66\x63\x87\x2e\xd6\xba\x8c\x99\xfc\xaf\xb8\x5c\x35\x08\x69\x81\xda\xac\x66\x65\xef\x75\x4c\x28\xc6\xdb\x41\x26\x2b\x73\x57\xcf\x29\xee\xab\xfc\x3e\xe4\xc6\xb5\x3e\x08\xb1\x64\x61\xf2\xd0\xc9\xb7\xe2\x72\xd1\x65\x93\x59\xdf\x88\xcb\x05\xed\xce\x13\x46\x9c\x4d\xd5\x8c\xe5\x21\xd0\x45\x7e\x83\x95\xae\xb5\x83\xd4\xbb\x76\x00\x90\x27\x38\x80\xa4\x7b\x8a\x10\x5c\xea\x04\x10\x7d\x9e\xb5\x08\xb0\x78\x48\x36\xff\x00\xac\x01\xb3\xba\xc4\xbc\x44\x0d\x4f\x86\xbc\xae\xb8\xe4\x40\x45\x76\x0e\x6f\xf6\x7f\x1a\xf0\xd6\x0c\xa3\x08\x99\x52\xc2\x13\x70\x9d\xe5\xdf\xfa\x2d\x76\xd9\xff\x61\xaa\xad\xf5\xaf\x65\x91\xb0\x21\x40\x42\x52\xe7\x47\xa9\x69\x91\x74\xcc\xca\xe1\x46\x8d\x2a\x33\x0b\xc7\x0a\x88\x02\x25\xe7\xdc\x79\x59\x56\xf1\x6a\x65\xa9\x2d\x06\x27\x26\xea\xd7\x7e\xf7\x14\xee\x6d\xd4\xc2\x40\x55\xbc\x2a\x31\x80\xd0\x40\x89\xef\xbb\xae\xd1\x40\x88\xa6\x89\xf3\xcc\xb1\xb9\x3f\x0e\xaa\xee\x91\x35\x69\x03\x27\xaa\xd1\xf1\x4c\x75\x91\x8f\xa6\x3f\x1c\xdf\x61\x12\x05\x4f\xc9\x80\x20\x3f\x1c\xef\xb4\xfe\xd4\xef\xe0\x69\xa4\xd3\x2c\x7c\x3e\x2f\x47\x72\x6c\xb9\x70\x78\x13\xa5\xa0\x6b\xe4\xed\x8d\xc0\xeb\x52\xef\x31\x2b\xc3\xe0\x8e\xde\xc5\x03\x78\x8f\xc6\x24\x67\xf2\x9e\x25\x6b\x5b\x9b\xeb\x5a\x74\x36\x13\xa9\x2b\xea\x61\x33\x60\x6e\xc9\x0f\x4d\xd7\x40\xa7\x1a\xbf\x02\xf0\xcb\x02\x20\x7e\x3d\xe7\xf4\x57\x45\x8c\x3f\xba\x7d\x26\x49\x1f\x66\x8f\xdc\x80\xe4\xb9\xc2\xdf\xf6\x49\xdf\xd8\xc4\x36\x6f\x7d\x41\x6a\xfb\xd8\x84\xf2\x07\xa8\x8d\xca\x29\xd3\x73\xd0\xc7\x89\x20\xa7\x29\x78\x5b\x8d\xe4\xa4\x1d\xe6\xa7\x85\xa4\xe0\xad\x9e\x03\xa2\x05\x00\xbe\x67\x79\x5a\xa1\x1f\x85\xc1\x40\xa5\x02\x09\xf6\xb6\x60\x80\x7c\xfc\x6a\x09\xdf\x87\x2e\xa8\x0a\x5e\xba\x1d\x01\x31\x7a\xe6\xee\xa4\x68\x14\x43\x93\xff\x80\x43\x79\xb9\x79\x50\x5b\x5b\x4b\xbc\x98\x94\xca\x0f\x51\x20\xb8\xb5\xd4\xf2\x97\xd0\x9b\x0a\x92\xc1\x6d\x4b\xbe\xd0\xad\xfd\x91\x4f\xea\x71\x63\x46\xf2\x90\x94\x07\x62\x51\x86\xb6\x78\x30\x5b\xc9\x6d\x97\x8a\xb5\x20\x71\x07\x1e\x30\xb5\x8d\x62\x53\xf0\x37\x31\x03\x6f\xd9\x45\xa1\x7b\x5b\xec\x8f\x5b\x74\x68\xb6\x18\x63\x32\x85\x56\x4f\x95\xc6\xab\xe6\xe7\x96\xbc\xa8\x10\xdc\xf9\x07\x1a\x34\x3f\xb3\xc3\xcf\x57\x4a\xd3\x31\x19\xe3\x67\x61\xb6\x12\x4a\x8b\x22\xc6\xc5\xfd\x2b\x47\x06\xb1\x0e\xa9\xc0\x0c\xe6\x99\x46\x84\x5c\x30\x46\x39\xc7\xc8\x53\x32\xda\x09\xb3\xb2\x4b\xbc\x59\x7d\xda\x95\x55\xbb\x4b\x6b\x5a\x3c\x2b\xd1\x81\x6e\xb2\x9b\x50\xcb\x91\xcf\xd6\x95\x5c\xf1\x5b\x31\x13\x4c\x44\x10\x39\xd3\x65\x8f\x4f\x9d\x81\x8d\x48\xc4\xa2\x0b\x36\x11\x85\xab\x63\x95\xc0\x75\x64\x32\x23\x0d\x13\x3a\xf9\x6e\x0f\x22\x18\x49\xd3\x22\x93\xc6\xa9\x5c\x31\xfe\xe6\xd6\xca\x9f\xe1\xcf\x3c\xd2\x33\x22\xdb\x60\x95\x94\x9b\x34\xcc\xd5\x0b\x3c\x44\x99\xcc\x5d\x13\x16\xaf\x14\xee\x03\x1f\xa5\xb6\x76\x4a\x66\x70\x58\x61\x3e\x73\xd4\x34\x37\x5e\xad\x19\xa5\x62\x4f\x77\x2b\xb6\x04\x7f\x24\x07\x71\x45\x95\xe9\x47\x08\x52\x28\x9b\x2b\x06\x35\xe0\x58\x7a\x85\x03\x97\xfd\x0d\x28\x15\x0b\xaa\x70\x0e\x18\x7c\x4c\xd2\x9d\x32\x35\x41\xec\x70\x68\xb5\xc8\x50\xad\xf7\x1c\xfc\x92\x45\x7c\x64\x19\xeb\x34\xa5\x7b\x06\x13\x95\xbf\xd0\xd1\x6c\xb4\x73\x5c\x10\x97\x78\xcd\x38\x93\x49\x40\x5b\xa0\x7e\x50\x43\x5e\x5b\x78\x37\xb2\xfa\x3b\x64\xfd\xec\xb8\x06\x12\x99\x01\x3a\xc5\x52\x5f\x8b\x45\x4a\x70\x47\x88\x73\x9f\x03\x7b\x72\x52\xb2\xb0\x2f\x60\x8a\x7f\xce\x3a\x38\x58\x15\xbc\x8a\xa6\xd9\x01\xb4\xeb\xc3\x0f\x84\xbc\x84\x61\x77\x55\xb6\x83\xe3\x04\xad\xe4\xfe\xbb\xd3\x92\xf7\x9f\xe5\x7b\xc6\xf0\x3f\xbe\x67\x38\x2e\x61\xfa\x83\x70\xd8\x9f\x1f\x88\x53\xa3\x6a\x48\xb0\xc6\x8e\x28\xa1\x0b\x43\x58\xac\xbe\x39\x4f\x36\xa9\x45\x96\xdc\xe7\x89\xf2\x0b\x34\xd2\x5d\xac\x5f\xe1\xe1\x9e\xfc\xd2\x1c\xa8\xaa\x24\x99\x1f\x7a\xd9\x73\xb8\xf2\xae\xae\xc8\x23\xa8\xac\xdc\xc4\x53\x57\x57\xb9\xd1\x0a\x5c\xfc\x69\xe9\x54\x01\x55\xf5\x07\xe9\x80\x89\x16\x01\x10\xee\x87\x14\x39\x12\xde\xaf\x3c\xc2\x08\x08\x5e\x36\x02\x7e\x96\x93\x89\xd8\xc9\x93\x52\x64\x12\x74\x05\xea\x73\x53\x9b\x13\x39\x04\xbb\xcd\x8a\x59\x9c\xdc\xb2\x51\x69\x90\x35\x2e\x8e\xa0\x32\x8b\xac\xfa\xe7\x3b\x7c\x1a\x4d\x95\x02\x4d\x59\x50\xae\x1b\x60\x60\x36\x1b\x76\xa1\x08\xdf\xc3\xf5\xed\x39\xee\x41\x97\xde\x5e\x4f\x69\x61\x64\xd0\xa6\x5c\xb4\xc5\x67\x6b\xb2\xd9\xe1\x73\xda\x3f\x1d\xe6\x4e\x38\x13\x72\xf5\x24\xeb\x4b\x49\x03\x65\xc6\xf2\xb5\x0a\x13\xf7\x2b\xde\x0b\xa4\x0a\xd4\xb3\x93\xe5\x16\xb8\x03\x2c\xa7\x13\xb3\x4c\x54\x28\x31\xff\x9d\x14\xa0\x75\x0a\x38\x5d\x67\x01\x10\x81\xd3\xd1\xf9\xfd\x27\x8f\xf7\xa0\x19\x7b\xa1\xfa\xcd\x88\x55\xaa\xd5\xd1\xf5\x93\xea\x95\x6d\xb6\xd2\x43\xa4\x8e\xeb\x8a\xab\x8c\x85\x7d\x9a\x49\xde\x05\x25\x44\xe1\x14\xaa\xbe\x6c\x19\x94\x36\xa7\x12\x55\xcd\xca\x77\x37\x39\x26\x2c\x9b\x86\xc4\xd3\x49\x03\xcd\x3b\xbc\xfe\x69\x78\x2e\xbc\x22\x26\x77\x74\xa8\x1b\xfb\x9c\x28\xa4\x4a\x08\x3b\x6e\xf7\x95\xdc\xff\xac\x11\x3f\xf3\x55\xce\x32\x55\x62\x85\xe1\xcb\x9f\x65\x74\x18\x4d\x69\xf8\x89\x95\xab\x81\xf7\x1b\x05\x58\x35\x6d\xd5\xf4\xcb\x64\x96\x66\x12\x9a\x77\x3d\xf5\x1d\xe6\x66\xf1\x87\x24\x58\xa1\x54\xba\xba\x0c\xfd\xcc\xe9\x43\xf4\x0b\x3c\x45\x44\xd5\x47\xf1\x94\x60\xe7\x7a\x66\x7e\xda\xc8\x54\x75\x56\x51\x77\x34\xa9\xe2\x1e\x84\xa8\x39\x49\x07\x4b\x4b\x08\x5c\x1e\x47\x01\xcc\x07\x63\x4a\x70\x08\x4b\x82\x12\x83\xe4\x60\x45\x54\xcf\x7b\x23\xa2\x0b\xed\x49\xef\x62\x01\x4c\x8d\xc4\xe1\x02\xa0\x8d\x35\xb4\x85\x8f\x79\x2d\x4d\x13\xda\x05\x2b\x7f\xb5\x63\x3d\x78\x87\x18\x62\xfe\x2e\xb2\x92\xf7\x10\x9f\xdd\xde\x05\xfb\xc5\x88\xfc\xc4\xfd\xae\x6a\x44\xce\xff\x52\x85\x49\xab\x89\xf0\x17\x3c\x31\x8c\xa9\x2b\x7e\xb8\xc5\x61\xe3\x77\x98\xd1\x71\xb1\x74\xd1\x00\xad\xc3\xb0\x47\xd4\x6b\x3a\xd2\xcb\xa0\x8f\x4a\x0d\x5b\x24\x7c\x2c\x08\xc4\x54\xf0\x06\xe1\x8d\x99\xca\x48\x46\x34\x74\x97\xce\x72\x38\x96\x36\xbf\x2e\xcd\x78\xd9\x53\xb0\xcd\xf4\xd6\x1f\x09\x1e\xf0\xd5\x0c\x92\x6a\xdf\x69\x5c\xd7\x5e\xc5\xf5\x03\xd2\x05\xd1\x47\x03\x3f\xcf\x77\x4c\xaa\x22\xaa\x9a\x12\x24\x86\x1b\x83\x0e\x5c\xe7\xce\x2a\xd0\xbf\xdb\x0f\xac\xff\xb0\xc4\xe3\xf7\x17\x3f\x40\x1d\x27\x04\x31\x81\x1d\xe0\xfb\x82\xc1\xe6\xf0\xb9\xcf\x52\x7b\xe9\xda\x41\xa1\xa2\x38\xab\x20\xa8\x41\x9a\xc4\x02\x77\xe5\x37\x17\x3d\xc9\x7e\xb2\x3c\xc0\xb0\x81\xb8\xf1\x1b\xf7\x8b\x58\x47\x50\x4b\x25\xea\x1a\xd6\xdb\x88\x65\x75\x55\xb8\xca\xdb\x67\x13\x68\x83\xcc\xd2\xc9\xdb\x1c\x6c\xc6\x21\xbc\x96\x8d\x5f\x6c\xdb\x76\x54\x4a\x5d\xa6\x28\xc9\xf6\x50\xb4\xa4\x2d\x26\x5f\x3e\x53\x3c\x04\x68\x26\xcc\xdc\xee\x03\x1f\x15\xc1\xde\x84\xc0\x40\xcf\x2d\x6a\x71\x38\xfe\x95\x55\x5b\x0f\xf8\x31\x19\xe5\x3f\x15\x80\x8a\xa5\x3e\x63\x6a\x72\x8e\x1f\x25\x35\x2a\xc6\xa4\x87\x22\x26\x88\xfc\xa1\xf5\xcc\x87\x6e\xd1\xbc\x07\x50\xb8\x72\xe1\x41\x0a\xe3\xb6\x00\x0f\x52\x12\x64\x2f\x53\xd8\x91\xfb\x54\x42\xa5\xbe\x03\x8c\xd2\xdf\x7e\x28\x74\x8c\x29\x24\x89\x73\x73\xf2\x28\xa4\xaf\xda\x28\x8e\x56\xcf\x31\x85\x35\xf4\x69\xa7\x50\x21\xa7\x58\x12\x4d\x02\xfd\x3b\xcf\x3a\x80\x6e\x86\xe5\x3c\x4f\x99\x8c\x3d\x12\x9a\xd5\x3b\xe7\x95\x01\x51\x1a\xdc\xef\x54\xf4\x23\xfd\x25\x2f\x67\x26\x4b\xfe\x57\xdb\x57\x14\x39\x19\x25\x9d\x56\x88\x2a\x89\xae\xc6\xd3\xfb\xf1\x9f\x84\x80\x5c\x9b\xa2\xcb\x9d\xcb\xa5\x83\x10\x24\xab\xa9\x73\x72\xf6\xa4\x27\x22\x86\xd3\x76\x22\xa5\x9f\xbc\x06\x4a\x35\xc4\x6b\x3e\xab\x29\xe6\x07\x2b\xb9\x9f\x0b\xc6\x17\xc0\x8c\xc9\x47\xa4\xce\xd4\x82\xe2\x68\x4a\xc3\xee\xac\x38\x32\x0f\xa1\x27\xd6\x47\x18\x4c\x71\xcd\x3c\x77\x30\xa1\x24\xd9\xda\xc8\x74\xca\x09\x8a\x38\x2e\xa2\xa8\xc8\x33\x44\x44\xa3\x82\xc5\x58\x46\x66\x58\x23\x99\x77\x9a\x7d\xbb\x07\x4f\x89\x73\x75\xf4\xf8\x9e\xd8\xb5\xcf\x1f\x4f\x3f\xc2\x35\x1a\xe4\x33\xde\x0f\x4e\x57\x39\x18\xc3\x79\x01\x8f\x74\x02\x16\xf3\x0b\x53\xe6\x41\x17\xd1\x3c\x19\xec\x9d\x49\x47\xe6\x90\x36\x4f\xd6\xdf\x79\x09\xe9\xd2\x77\xa0\x43\xc5\xa8\x76\x50\xc0\x26\xee\x85\x95\x60\xfa\x10\x33\x23\xac\x16\x12\xce\x77\x8f\x69\xe5\xb2\x9e\xc6\x24\x6d\x85\x66\x89\x5c\xa4\xd1\x8f\x1c\x61\xa1\xee\x5f\xfb\x5d\x0a\x8d\xd6\x1d\x29\xa3\x56\xee\x8a\xe8\x9e\x06\x8c\x2b\xcb\x76\xc7\x92\x33\xb7\x95\xa2\xb2\xdd\x4d\xdd\xa5\xda\x7b\x2e\x93\xa8\x26\x58\xec\x48\x7a\xbe\xf7\xac\xf9\x72\xd7\x15\x45\x36\x2f\x59\xc1\xf1\x3d\x6e\x8c\x21\xc9\x19\x0e\x11\xc1\xed\x98\xe3\x4b\xf0\x61\x08\xb6\x6d\x97\x01\xd4\x11\x11\x2d\xa1\x48\x66\xf3\x0f\xe7\x74\x88\x1f\x53\x63\x0f\x21\x72\x21\xcc\x43\x10\x0c\x5c\x49\xb5\xed\xac\x81\x5c\x0c\xf6\xc2\xee\x84\xf0\x24\xe8\x66\x05\xe8\xa7\xca\x8d\x95\x20\x61\x6c\x85\xc4\xd8\x35\xdd\x1e\x26\x34\x75\x6a\x4b\xea\xef\x39\xbf\xd7\x46\x6d\x4e\x65\xd3\x5d\xa8\x16\x9b\xa7\x35\x2a\xe0\x6f\x62\xf1\x26\x55\x1e\xfb\x36\xe8\x8a\x0d\x23\x3a\x73\x3e\x29\x16\xfb\xe4\xfb\xdf\x9a\xb4\x6c\xd9\xf6\x0f\x73\x18\xcb\x5f\x89\xc3\xbf\xb5\x5c\x04\x65\x35\xef\x98\xc6\x1d\xd4\xa6\x0c\xe7\x04\xb0\x2e\x68\x1a\x67\x14\xd9\x41\xf6\xbe\xfb\x73\xf6\xf8\xd9\x9d\xe3\xc2\x04\x10\x33\x48\xcc\x86\xbb\xad\x0b\x32\x93\xbb\x61\xb1\x79\x96\x9e\x53\x1d\x4d\x63\x02\x02\x02\x26\x6a\x52\x7f\xdb\xe4\x8d\x23\x16\x73\x7e\x41\x01\x34\x4e\x7f\x1f\x5a\x51\x94\x64\x15\x05\x95\xad\x74\x75\x71\xad\x25\x8f\xe0\x78\x19\xf3\x99\x5f\x51\x0c\x7e\x18\xc0\xde\xfe\x98\x5f\x37\x99\xc7\x65\x43\xe5\x64\x4b\xe8\x02\xdc\x48\x11\x60\x51\x14\xe7\x1a\x07\x16\xfb\xa3\x4b\x80\x5b\xf2\x14\x15\x1e\x5f\x68\x3f\xca\x32\x4c\xd7\xf6\xc0\x9e\x40\x13\xbd\xf8\x34\x16\x62\x8e\x46\x3f\xf0\x9c\x2a\xcd\x12\x0c\x55\xc4\x39\xf2\xe1\xc4\xfc\x60\xe8\xd2\x8d\x7b\x71\x4e\x34\xa9\xf3\x5d\x66\xb4\xa5\x20\x84\x33\x2d\xa0\x2d\x34\xbc\x4d\x87\xc4\x18\x8a\x77\x18\x25\x7d\x56\xe6\x64\x5a\xd6\x56\x0c\x31\x59\x9c\x90\x09\x59\x8c\xb3\xbd\xb4\x17\xbe\x0b\xbe\x2b\x19\x3f\x72\xde\x31\x01\xd5\x41\x98\xfc\xc4\x28\x6a\xfa\x7d\x4a\xce\x30\x0c\x3a\x83\xa1\x86\xd8\x37\xaf\xce\xe4\x86\x8b\x2f\x99\xba\xe7\xd5\x61\xb6\xe8\x11\xc0\xaa\xc4\x65\x98\xf0\x94\xda\x10\x6c\x50\x9c\x16\x4f\xb1\xf3\xe7\xe9\xa3\x1b\xbd\x5d\xd1\x84\xda\xe0\x1b\x4e\x74\x07\xa3\x28\x42\xd6\x5c\xe1\xa2\x62\x0f\x38\xc9\xf2\xa4\x04\x79\xdd\x7b\xbf\x3d\x4f\xe5\x1c\xff\xca\xbb\x35\x54\x55\xe5\xa2\x5e\xf0\x08\x83\x6b\x4d\x01\xc1\xd6\x4e\x22\xaa\x86\x5c\xb7\x51\x1c\x52\x55\x3d\x04\x5b\x0e\xa3\xa1\x6d\xf8\xfb\x56\xf8\x8e\xf7\x3d\x29\x08\xfc\x20\x29\x64\x08\x41\xca\x3d\xa9\x6c\x24\xfa\x9a\x61\xbc\x6e\x90\x9f\xd8\xe4\x16\x35\x90\x90\xe7\x96\x25\x30\x65\x2d\xef\x53\xf0\x15\x3c\x7e\xea\x8e\x2a\xeb\x1a\x7b\xbf\x52\x34\x07\x09\x31\x77\x79\x35\xe9\x2b\x6c\x0a\xa3\x44\x92\x06\xaa\xd0\x09\xa4\xde\xa8\x48\x69\x42\x30\x9b\x9e\x02\x54\x0e\x4a\xfb\x08\xa4\x56\x38\xbe\x06\x3b\x41\x0f\x14\x37\x23\xbc\x9b\x9d\x02\xca\x5b\x7e\xee\xfc\x66\x2d\x30\xe9\x2f\xd2\xed\x79\xc4\xde\x95\xe0\xa9\xc2\x8f\xa5\x57\x00\x76\x0d\x3a\xc8\x69\xc9\xb1\xa2\x81\x61\x1b\x4a\xee\xdd\x0d\x29\xe9\xa4\x85\x5a\x7f\x64\x47\x77\xaf\x7f\x00\x8f\x5d\x0d\xc4\x5e\x01\x47\x6f\xe9\x2a\x70\x81\x7a\x0e\xa4\xff\x6d\xf0\x97\xb5\x5c\x32\xb2\x84\xac\x32\xae\x60\xdf\x75\x9e\x1b\xec\xa7\xb3\xdf\x9e\x07\x5a\xa8\x40\x2b\xdb\x38\x43\x01\x78\x4f\x13\x05\x49\xa6\x30\xab\xb5\x68\xb7\x16\xab\x44\xde\x48\x63\x96\xf1\x21\x98\x5c\x72\x26\x9a\xdb\xc1\xef\x9a\x5f\x87\xde\xa6\x56\xab\xd2\x80\xb9\x6b\xde\x7d\x31\x8a\x0a\xa3\x57\x36\xba\x67\x6f\xde\x9e\x94\xc7\x61\x21\x2b\xdf\xbf\x96\x8d\x63\x45\x9b\x8b\xc4\x8d\x79\xda\xf9\xd8\x0e\x8b\x9b\xa2\x9d\x86\x92\x06\x74\x80\xf3\x19\xc6\x58\xef\x17\x48\xbf\xf1\x64\x9b\xbf\x77\x8b\x73\xcb\xff\x59\x7e\xa3\xfb\xff\x6f\x76\xac\xc2\xbf\x12\x8e\x51\x08\xc0\x29\x6b\xf0\x1a\x79\xd5\x36\xd6\xef\x47\x39\xa0\xa1\x5b\xf7\x50\x88\xcf\xde\x06\x18\x1a\xc1\x8b\x13\xb6\x8b\x0a\x8d\x8e\x38\x3c\x92\x53\xe5\x44\x52\x3b\xfc\x04\x32\xb7\xd0\x51\x16\x37\xd4\xaa\xd8\x1f\x8c\xc2\xa2\x45\x0a\xa0\xd3\x70\x9e\x55\x15\x1f\x8a\x29\x9f\x6a\xab\x22\x51\xb4\xb6\xe0\x24\xe7\x95\xc8\xa3\x00\xb0\x81\xcb\xb7\x08\x63\x32\x02\x9f\xd7\x42\xaf\x72\x3f\x43\x6d\xbd\x7e\x02\x29\xa7\x08\x0a\x91\x14\xba\x8d\xef\x4c\xe6\x21\xdb\x15\x9e\xf4\xd6\xfd\x1e\xde\xf3\x37\x4f\x61\xae\xd8\x15\x58\x00\xe2\xb4\xdb\x72\x3d\xbb\x9a\x5a\xc2\xb2\x4f\xb6\xb1\xcc\xa6\x7d\x98\x33\x58\xc6\xc0\x98\xf9\xe3\xe9\x9c\x43\x42\x97\x6a\xee\xf3\xb1\x3b\xdc\x7b\x50\x9a\x5b\x00\x03\x8a\x03\x1b\xca\xda\xd6\x86\x7b\xbd\x8d\x48\x59\xe4\xb1\xef\xab\xd0\x9c\x46\x15\xfd\x88\x93\xf7\x0d\xb5\xd1\xa5\x40\xbc\x15\xf3\xdf\x65\xd1\xcd\x31\x6e\x92\xd7\x5b\x22\x60\x2d\xf1\x90\x5c\x5d\xf4\xce\xd4\xc4\x79\x98\x4b\xe4\xab\x85\x2d\x14\x71\x4d\xe8\x85\xd5\x1c\xc6\x6f\x76\x7d\x63\xe7\xaf\x87\x63\x93\x50\x2f\x36\x73\x8e\x9e\x6b\xbf\x20\xd6\x30\x74\x0f\x03\xec\x36\x45\x95\xc1\x50\xff\x02\x59\x12\xad\x4a\xe7\xf6\xa7\x5a\x69\x99\x9e\x0b\x75\x22\x28\x6d\xa6\x87\x95\x50\xf4\xb4\x96\x2b\x99\x82\x51\xe8\xed\xd7\xb3\x1d\xd3\x1f\x6c\x22\x9c\xa8\x24\x54\x2d\xbc\x6b\x2a\x94\xc4\x2e\x41\xed\xa1\x72\xf6\x9f\xd2\x7e\x77\x42\xf1\x02\x2b\xa7\x6b\xa7\xbb\xda\xd0\x15\x0e\x5f\x5f\x0c\xfb\x64\x9d\xe3\x17\x58\x02\x72\x04\xbe\x70\x56\x7c\x17\x7d\x31\x8d\x97\xda\xc8\xc7\x78\x77\x58\xb5\x24\x5d\xdd\x39\x51\x33\xcd\x7a\x7a\xdb\x11\x21\x3b\x12\x44\xea\x4d\x61\x35\x9a\x05\x05\xcd\xc8\x68\x96\x7f\x80\x02\x00\xd1\xf5\xcd\x74\x41\x14\x90\x0e\x23\xd0\x4f\xa0\xa1\x7d\x7e\xcd\xd3\xde\xed\x4b\x1a\xca\x46\x28\xf0\x5e\x5a\xca\x33\xbd\x71\x29\x88\x85\x8a\xa1\x31\x27\x14\x4b\xfd\x12\x90\x25\xe2\x51\xed\x00\x2d\x9c\xa0\xcb\xc2\xb7\xf5\xda\x8f\x73\xac\x44\x9d\x79\x80\x7f\x4e\xd8\x7d\xbb\x3b\x98\x70\x3d\x33\xf8\x99\x36\xc5\x03\x29\x56\x5e\xbf\x12\x6c\x76\xc4\x05\x74\x96\xda\x07\x8d\x6d\x52\x70\x71\x88\xaa\xfc\x00\xcc\x25\x3a\x66\xa8\x47\x9c\xc9\x19\xac\x3e\xa5\xdb\xe5\x6e\xd7\x3e\x4e\x3f\x03\x04\x48\x3d\x00\x8a\x82\x1c\xdd\xad\x8f\x5b\x0a\x1c\x43\xdd\xd5\xf0\xf9\xd2\xa3\xb8\x19\xad\xbd\xb3\x9e\xf2\xa0\x40\xc6\x49\x98\xef\xa2\xd6\x7c\x3a\x89\xab\x11\xfe\x66\x7b\x3e\xfe\x61\x95\x4a\x15\xfe\x1f\x83\x86\x60\xfb\x5f\xbb\x97\xbf\x74\x2a\x71\xd1\xbb\x1a\x3d\x11\xcf\x3b\x3a\x68\xa1\x91\x5f\x21\x9b\x1f\x82\xaa\x78\xb5\xba\xe4\xeb\x56\xc1\xd6\xb7\xe5\x0b\x36\x41\xa7\x49\x11\x93\xc3\x1a\x74\x08\x18\x47\x13\x35\xa9\xed\x43\x6d\x75\xb7\x2b\xff\xb9\xe3\xaf\x3d\x10\x02\x11\xe5\xfa\x05\x5e\x8a\x22\x49\xdb\x36\xa8\x8f\x84\x17\x8e\xd3\x5a\x0c\xfc\x63\xba\x36\xb5\x8e\x85\x0f\x21\xc2\xbe\x46\xa6\xdf\x6e\xe2\x9b\xad\x69\x51\x1e\x2e\x0f\x09\x54\x1a\x1e\x9f\xc8\xf0\x1a\x87\xe9\x97\x78\x49\x19\x65\xdb\xa9\x34\x6b\x59\x64\x76\x88\x0a\x9d\xf5\x2f\x1c\xbc\xcc\xea\xd9\x8a\x6b\xb8\x44\x3a\xcd\x66\xd5\x9a\xb2\x61\xb0\x64\x1d\x83\x41\x74\x09\x9a\x68\xe4\x89\x26\x50\x7c\xed\xfc\x98\xf6\x76\xa7\x49\x1d\xf2\x87\x30\x08\x0f\x07\xa2\x49\x43\x84\xeb\x5c\x90\x82\x7e\x83\x01\xf9\xfd\x34\x06\x8a\xc3\xc2\xeb\xa4\x98\xa9\xe0\x01\xcf\x2b\x1b\xee\x00\xcc\x15\xb9\x78\xfd\xd9\xef\xcd\x82\x8c\x16\x7e\x1a\x8a\xb9\xbd\x6c\x26\x63\x13\x6a\x9c\x8c\x43\x37\x29\xb0\xec\xdc\xe4\x7e\x06\x32\xa1\x81\x7b\x0d\x5b\xfe\xa0\xa6\x40\x18\x83\xef\xed\x3d\x17\xed\x0f\x79\xde\x8a\xce\xf6\xbb\xf2\x88\x1f\x60\xfa\xb9\x44\xb1\x1c\x57\x07\x87\xde\xd7\x35\x12\xcd\xe1\x2f\x5c\x18\x99\xf8\x88\xd6\x08\x0e\x55\x40\x85\x77\x48\xea\x45\xc4\xae\xa0\xd3\x51\xc7\xf4\x48\xd1\xa8\x3c\xc6\x71\x59\x39\x42\x37\x58\x5e\x69\x98\x05\xc2\x99\x75\xdc\xbe\xc3\x00\xe1\x11\xf7\xeb\x23\xe4\x8f\xec\x27\x32\xb9\x71\x4b\xa6\x11\xa6\x50\xb5\x88\x96\x30\x6f\x96\xdb\xaf\x7d\xc1\x31\xce\x59\x9a\x72\xa6\x09\x99\xb9\xd8\xc4\xa3\xec\xde\x43\xc4\x67\x38\x61\x56\xe3\xf5\xf6\x35\x6b\xcf\x51\xf6\x70\x91\xb3\x98\xd2\x87\x31\x17\x9b\xa5\xd4\xa0\x7d\xed\x9f\x1c\xf1\x19\xbf\xd4\x2a\x5c\xa5\x22\xa3\x7f\xaa\x8a\x19\x9a\x85\x1b\xc2\x71\x61\xbe\x17\xb3\x64\x08\xe6\x1b\xd5\x39\xba\xf1\x01\xd9\x38\xb9\x69\x94\x5f\xf3\x8c\xaf\xf4\xea\x8e\xcf\x5d\xdd\x5c\x53\xc5\x79\x85\xae\x5b\x68\xe1\xe9\x10\xf0\x20\xdd\xab\x92\xab\xdb\x99\x35\x11\x9c\xd5\xd1\x88\x1f\xc0\x7c\xfe\x24\x15\x7d\x4e\x2e\x0f\xf1\xdb\x76\xa8\x16\x10\xdf\x8a\xc1\xb0\xd1\x42\xff\x3c\x40\x6c\xb2\xf9\x6f\x65\xe1\x7b\xb6\xff\xc3\x2a\xe1\x5f\x75\x09\xc5\x16\x8a\x04\xd8\xb0\x26\xf3\xca\x3d\xbc\xfd\xb3\x3d\x8e\xe5\xf1\x9f\xd5\xc7\x0c\x7f\x83\x95\xcc\xb6\x09\x72\x8c\x25\xc7\x76\x69\x54\x2e\x79\x0f\x75\x24\x79\x82\x4a\xc7\x2e\x29\x0f\x75\xe1\x17\x9a\x86\x00\xdf\x0e\x12\xce\x59\xd0\x12\xc5\x14\xfa\xd5\x80\x07\x09\xba\x6c\xc9\x37\x0e\x4a\x4f\x01\x0a\xff\x60\xd6\xaf\x3d\x0a\x09\x1e\x4b\x49\x68\x2a\x09\xde\xf3\x9f\x41\x54\x3c\xd4\x25\x91\x7b\x25\x53\x40\xfc\xf1\x77\x1e\x85\x50\xe2\x51\x9d\x22\x37\x44\x25\xc1\x77\x29\xed\xb4\x32\x88\x43\x8e\xa8\xa3\x22\xb6\x66\xc0\xb1\x7c\x8e\xaa\xa3\xc2\x07\xa7\xf1\xc2\xbd\xc1\x0b\x8f\xc2\x27\x88\xde\x0b\x90\xe9\x27\x88\xe1\xdd\x8d\xd1\x33\x8f\xd1\x51\xf7\x1f\x8f\xd9\x41\x8f\xc9\xcf\xb0\xd9\xcf\xaf\xf9\x32\x8d\xc2\xfd\xfb\xe9\xb1\xc6\x96\xd5\x21\xed\x17\xcf\x15\x92\xff\xea\x4f\x31\xb9\x93\xed\xa9\x73\x29\xbb\xb7\xd5\x51\x57\x89\x96\xa8\xfe\x2b\x3e\x7d\xa2\xdf\xf4\xa5\x1e\xcb\x1f\x70\xfd\x63\x5e\xfd\x53\x5e\x3d\x56\x87\xb4\x83\xbf\x2a\xc2\xa1\x24\x6e\x8e\xfc\x67\xf4\x7f\xc1\x15\xd2\xd8\xfc\x23\x94\xdd\xa5\x34\x5e\x79\xc7\xbe\xa9\x94\x10\x49\xa4\x5e\x65\xec\xd0\x4a\xa7\xfc\x67\x0c\x24\xf8\xfe\xeb\x3b\xf3\x9f\x71\xfe\x7b\x4c\xce\x04\xa1\x0f\x1d\x6d\xdb\x82\xa3\x1e\xbd\x67\x2e\xa5\x63\xb1\x3c\x7a\xce\xe2\x5b\xb0\x3c\x66\x4d\xdf\x87\xba\x4c\x76\xa1\x82\x9f\x2f\x1d\xc1\x3f\x7d\xfa\x73\xac\xf4\x7f\xcd\x27\x8d\x25\x31\x73\x19\x1e\x76\xeb\x08\x7c\xe8\xef\x7f\xde\x59\xa0\xae\x97\x46\x09\xad\x4c\x2d\x54\xca\x0c\xa1\xbf\xf4\x59\xbc\xff\x35\xff\x7d\x8e\x40\x57\x25\x89\xb7\xfe\x09\xa7\xc1\xd1\x5f\x28\x8f\x77\xea\xd1\x5e\x1a\x9b\x57\x19\xab\xfd\x1f\x6b\x29\xed\x8c\x4e\x91\xdb\xa3\xe0\x17\xbe\x98\xc2\xb6\x94\xe8\x37\x94\xe8\x2b\xe7\xa1\xce\xf9\xb3\xff\x4d\x20\xb5\x57\x29\xd1\x5f\x26\xd1\xb7\x22\x98\xbe\xd9\x31\x73\x88\x8c\x67\x2a\xd1\x68\xf1\x0e\x7f\xfe\x5e\x80\x4d\x6b\x18\xcf\x02\x75\xdb\x7c\x32\x47\x2f\x70\x68\xe5\x8f\xb5\xc2\xe1\x4b\x16\x39\x84\xc1\x9b\xbc\xe1\xb3\xac\x01\xa9\x92\xe1\x0b\xb8\xe1\x8b\xa2\xe1\x37\xa8\x09\x99\xa2\xe5\x2b\xaf\xe1\x3b\x88\xf3\xb5\xac\x39\x38\x7f\xc1\x73\xaf\x04\x0d\x8f\x34\xc2\xa1\xbf\xe0\x0d\xff\x1d\xcf\xfc\x1f\xf1\xec\x8e\xa1\xfe\x98\x1f\x3f\x80\x08\x57\x0a\xdf\x2c\x4e\xc7\x54\x48\xdf\x1c\x81\x9a\x7f\x8f\x21\x91\x45\xf8\x57\x4a\xe2\x99\x20\xa1\xea\xf2\x50\xf7\x47\x7b\x7d\x1a\x97\x94\x9f\x6f\x03\x32\x1e\x43\x10\x3e\x2b\x48\x1e\xc3\x1f\x1e\x23\x08\x1e\x8b\x2f\x50\x07\x0a\x70\xa3\x57\x1e\x93\x4f\x79\x4b\x10\x10\x97\x53\xfe\x0b\x2f\x95\xe8\xbe\x8c\xe0\x31\xff\xb9\x7f\xc1\x73\xff\x1b\x9e\xf3\x3f\xe3\x5d\x7f\xf4\x5d\x47\xff\x2f\xd6\xe2\x1f\x6b\x94\xa3\xff\xb5\x1e\x83\xc1\x95\xfe\x6c\xf7\xa7\xbd\xfd\xcb\xfe\x7c\xac\xb1\x79\x1a\x2b\x24\xb1\xcf\x90\x10\x52\xa4\xf0\xfc\xc3\xce\x8b\x4e\x01\xed\x99\x44\xe2\xa0\x60\x18\x46\x2d\xfe\x75\x45\xb2\xdc\x67\xad\xa8\x96\xfe\x63\xb2\x22\x0f\xe7\xef\x50\x80\xc7\x71\x95\xc7\x71\x44\x52\xa3\x40\x79\xb2\x05\x0d\x9f\xce\x66\xb2\xba\x2a\x04\x63\x83\xe1\xc6\xf2\x75\xb3\x60\xeb\xf8\x32\x78\x8b\xad\xe1\x0a\x6a\x2d\xb2\xce\xc3\xf6\xad\xe1\x2a\xa2\xe0\x78\x1c\x33\x3a\x8f\x96\x48\x4d\xd3\x05\x68\x85\xca\xf9\xaf\x8e\x91\x5c\x3c\x60\x21\xa0\x07\x7a\xa2\xa7\x7c\xfc\xf0\x05\xfb\xc6\x4f\x34\x85\x27\x99\x96\xb3\x02\xfb\xc9\xf7\xd2\x1b\xb7\x53\x66\x84\x0d\xe6\xe6\x7d\xa8\x20\x2d\x12\xb9\x2f\xbb\x3c\xcb\xca\xcc\x06\xdb\x3c\xac\x14\x3a\x76\x83\x2c\xae\xaf\xb4\x0a\xfc\x35\x71\x9d\x67\x76\x5f\x74\x19\x75\xd8\xc1\x81\x43\xec\x47\x74\xc3\x0a\xa5\xbd\x8e\xa8\xb1\xfc\xad\x3e\x02\x11\x16\x46\x90\xc1\xc6\x34\x61\x4a\xc4\x51\xb7\x03\xad\xe2\xa9\x49\xeb\x28\x75\x63\xd1\x7c\x0c\xd9\xc1\xd4\x6e\xe0\x42\xf1\xd4\x05\xb4\xa1\xa3\x81\x7c\xf6\xd3\xb9\x59\xa3\x78\xb2\x92\x5b\xcc\x1d\x74\x5d\xc5\x0a\xee\x83\x11\xa6\x37\xe2\xbb\xa9\x3e\xea\x6d\xd7\x23\x9c\x51\x33\x5f\x5d\x6d\x2c\x9e\xc2\xd3\x61\xa2\x49\x6f\x15\x71\x5f\x4a\x0b\x0b\x6a\x48\x2d\x48\x2e\x7d\x6d\x0c\xdc\x1f\x40\x49\x84\xcd\x23\x5e\xda\xea\x86\xd3\xd3\x44\xc4\x74\x06\xd3\x22\x6e\x2c\x26\x9a\x42\x52\x63\xa1\x16\x0f\x1d\x25\x2c\xf7\x16\x0a\xf7\x5b\xcc\x7c\xee\x83\x68\xe1\xf1\x04\xe2\xb0\xb4\x45\x78\xe8\x26\xda\xa8\x20\xa1\xd3\x49\x39\x40\x89\x6a\x27\xdd\x62\x11\x52\x76\xf9\x4a\x80\xa9\x62\x4b\x88\x6a\x33\xa6\x9d\x43\xc3\x70\x44\x55\x8b\x44\xd2\x36\x53\x03\x18\xc6\xd6\x7d\xe7\x46\x6a\xf3\xf5\xb1\x94\x98\x31\xac\x43\xb8\x25\x66\xe5\xd7\xb0\x68\xf2\x70\x18\x04\x00\x0f\x76\x81\x89\xb2\xab\x86\xb2\x0f\x39\xa0\x74\xbd\x34\x64\xcd\xf2\x96\x50\x02\xb4\x9f\xbb\x8f\xbf\xfd\xe6\xae\x7a\x58\x2f\xc3\x5a\x8d\x87\x32\xd7\xa8\xe9\x40\x9c\x21\x7b\x2d\x9a\x66\x20\x10\x3a\x36\x07\x23\x14\x78\x0c\x8b\x18\x08\x5c\xa1\xfd\xed\x36\x8a\xbd\xfa\x02\x33\x3c\xfc\x74\x39\x6b\x9c\xbf\x63\xf9\x02\x6a\x52\xdf\x0e\xf5\x0b\xd8\xc2\x80\x91\x0e\x20\xe2\x47\x3e\x94\x03\x52\xb6\xfc\xc1\xfc\xb6\x31\xfa\x41\x1d\xe3\x06\x71\xdb\x90\xab\x86\xec\xcf\x0b\xed\x0d\xf8\xae\x67\x70\x43\xe9\x00\xe3\xaa\xe5\xcf\x6b\x35\x6e\x4c\xd0\xe3\xfc\x99\x04\x7d\xe0\x9d\xa4\x27\xfe\xc8\x1d\xd9\xd0\x8b\x09\xd9\x3c\x26\xc3\x96\x26\xca\xa2\x24\x9b\xad\xeb\x9c\xf8\xd4\xf2\xc6\x50\xf7\xc3\x2c\x37\x77\x07\x85\xc1\x88\x64\xe4\xdd\x3c\xf0\x73\x36\x45\xd4\x1c\xb4\x6f\x6c\xed\x34\xf1\x97\x2d\xc5\x62\xcf\xf4\x52\xe6\x5b\x43\xf1\x3d\x63\xb1\xbb\xd8\x08\xba\x3a\xed\xd2\x4e\x56\xd1\x30\x14\x78\x7e\x82\x0f\xdb\x30\xf2\x10\x71\x44\x60\x33\xbc\x6f\xfd\xbd\x6c\xa2\xf8\x5f\x36\xf1\xbf\x6c\xe2\x7f\xd9\xc4\xff\x63\x36\xe1\x0e\x06\xe6\xf4\xc9\x6b\xf2\xe1\x1f\xd1\x1f\xfb\x33\xfa\x8f\xac\x2b\xa4\x9c\xc9\x9b\x82\x01\x09\x7f\x44\x56\xc8\x08\x94\xff\x23\x36\xf1\x1f\xbc\xf4\x7f\xc4\xfb\x7f\xc7\x26\x16\xc9\xf9\x5a\xce\xec\x15\xc8\x80\xfe\x88\xfe\xcd\x9f\xd1\x3f\x10\x05\x77\xf8\xe3\x7f\xce\xe7\xf8\xc2\x63\xf9\xce\xe3\x74\xff\x27\x6c\xe2\x3f\x78\xa6\xf0\x3f\xe2\xfd\x7f\xc3\x26\x86\x1a\x7e\x2b\xe3\x0f\x36\x91\xff\x87\x4d\x98\xff\x66\x13\xd0\xa1\x07\xfa\xc2\xd2\xf0\x39\x97\x61\x64\x4f\xf3\x16\x28\xcf\x0c\x85\x5e\x67\x7a\xc2\x63\x24\x89\x2c\xa0\xe8\x08\x05\x25\xd8\xfd\x00\x0e\xb0\xbc\x3e\x69\x7a\x57\xe2\x59\x97\xd3\x54\x25\x18\x14\x21\xea\xa0\x48\x1b\xfb\x0c\x3a\x47\x04\x01\x70\x04\xa6\x47\x15\x21\x1a\xbd\xea\xaa\xef\x8c\xaf\x1f\xb9\xfd\x7e\xbf\x6d\xdc\x02\x31\x08\xa7\x1d\x35\xae\x12\xc9\x7b\xe5\xad\x3e\x37\xd4\x59\x06\xfa\x24\xe6\x9b\x89\xbe\xed\x27\xf8\xa8\x00\x52\x08\x50\x72\x13\x2d\xe0\x26\xd5\xd1\xc8\x0f\x09\xa8\x6c\x15\x9f\xac\x2c\x9d\x8a\x0e\xfc\xed\xf6\x48\x58\x26\x7b\xdc\x30\x15\xf1\x4e\x41\x1f\xe9\x0a\xed\x0b\x99\xf4\x7e\xb7\xc7\x21\x68\x8a\x9a\xbb\xb8\xd7\x27\x2f\xf2\x5c\xf2\xeb\x2e\x42\x68\xd9\x7f\xe7\xc5\x37\xc4\x25\xab\x91\xc8\x2c\x9b\x08\x32\xdb\x53\x81\x73\xf7\xdb\x09\x20\xd9\xde\x79\xe5\xba\x80\xbd\x4c\xcb\x02\x48\x71\x8b\x8d\xfe\x17\x15\x50\xf4\x2a\x8c\xe5\xd8\x90\x89\x99\x3f\x4a\x59\x57\xef\xb3\x1f\x64\xbf\xc7\x71\x4f\xd6\x74\x44\xa8\x46\xa3\x78\xfe\x75\xaf\xe2\xd1\x62\xe7\x62\x89\x46\xf1\x92\xa5\xbb\x1b\x19\xe8\x85\xb0\x23\x13\xa6\x8e\xb0\x9f\xb0\x0e\x90\xad\xde\xfc\x5c\x9b\x55\xcf\xc4\xa4\x9d\x55\xc8\x6e\xb7\xad\xec\xcc\x22\x81\x06\xb8\x94\x75\x08\xfb\x83\xab\x65\xb6\xa3\x69\xca\xb4\xf9\x6c\xe0\x80\x9d\x8d\xad\xb9\xe5\x2c\x57\xc2\x90\x7b\x90\xbe\xdc\x34\xf1\x9e\x08\xd2\x4f\x91\x65\x1c\x4b\xdb\x91\x1a\xa4\xd0\x70\xb9\xad\x94\xc0\xc8\xb3\x74\xd5\x42\x5a\xf9\x11\x4d\xc7\x73\x2f\x6a\x98\x49\x2c\x70\x8d\xa6\x20\x8d\xc2\x3d\xb3\xc3\x08\xbb\xa3\x1c\x8b\xc9\xc9\x91\xf6\x6b\x8c\x19\x82\xb3\xcd\x4f\xc0\x5e\x54\xbe\xfc\x3c\xbc\x56\x3d\xe3\x16\x16\x27\x5a\x54\xa6\xa4\x33\xc8\xc3\x3f\x34\xeb\xc8\x2d\xe0\x98\x4d\xda\x2c\x80\xda\xc1\x3d\x29\xb0\x94\x30\x19\x49\xf9\xb3\x15\x19\x49\xdc\x14\x7a\x11\x2d\x05\xf6\xf0\x63\xe5\x1f\x72\xc1\xd3\x62\x48\x0f\xc4\xfb\x99\x8b\xfe\xbe\xfa\xae\x25\x41\x2d\xdf\x5c\x1a\xca\x19\xbc\x85\xae\xe1\xdf\xeb\xd1\xbf\x06\x7b\x3b\xc1\xbb\xe6\x3e\x6d\xeb\x12\xa3\x2d\xa6\xd2\x55\xa4\xac\x9a\xcc\xd3\x15\xdb\xb2\x88\xeb\x6e\xba\x24\xcb\x5c\x61\xf3\x5d\x57\x10\xca\x1f\x65\x54\x6a\xee\x85\x29\x6e\x90\x3f\xbd\x34\x85\x67\x15\xf5\xcc\xb9\x85\x5a\xac\x19\xce\xf9\xc1\x80\xcc\x46\x9a\xa7\xe5\xa8\xe1\x63\x5e\xb3\x1f\x67\x4b\x5f\x21\x9f\x01\xb9\x83\xf1\x96\x2b\x10\x33\xe1\x8e\xfb\xf2\x19\x03\xed\x5b\x76\xbd\x01\x75\xa7\xab\x9c\x2e\x26\x1b\xea\xa7\x9e\x66\x16\x0a\x09\x64\xea\x1d\x39\x93\x6d\x00\xfe\xb0\xba\x0d\x46\x1f\x27\x81\xd7\xa0\x5a\x30\x8c\x71\x1b\xd9\x4e\x44\x81\x56\xfe\xcd\x0a\xa5\x7d\x1d\xff\x59\x64\xa2\xfd\xaf\x03\xdb\xa8\xa1\x38\xfe\x25\xd2\x7f\x36\x20\x7d\x63\x63\x98\x33\xd8\x64\x5d\x2b\xf3\x86\xc5\x67\x05\x04\xb5\xdb\x14\xc1\x8b\x75\x44\x5e\xbc\x3c\x2f\xc6\x0e\x4a\x49\xf4\x60\xf1\x51\x5c\x97\x8d\xd3\x51\x74\x68\x29\x2c\x79\xc1\x54\x5a\x49\x7d\x06\x7e\xbf\x91\xe9\x57\xa5\x3f\x83\x42\xb7\xd3\x4c\x47\x6b\x32\x67\xbe\xfd\xc6\xef\x43\x4b\x90\xfe\x2e\xd4\x9b\xef\x87\xe2\x5a\x70\x1d\x13\x0d\x89\x0d\xb4\x10\xd4\x3d\x97\x21\x60\xed\x43\x70\x2b\x09\xf0\x24\x32\x13\xa6\x72\xd2\x35\x44\x1f\xa0\xb3\x79\xb7\x41\xe1\x01\xa0\xac\x02\x97\xf3\x26\x7b\x94\xb0\x47\x4d\x30\x98\xaf\x38\x34\x15\xcd\x24\x31\x9b\x0c\xb9\x0f\xa1\x12\xb8\x0b\xa9\x3b\x06\x63\x5b\xa2\x68\x21\xda\x50\x29\x3a\x61\x40\x0c\xc6\xba\xf3\x20\xea\xe7\xfd\x81\x82\x4e\x9c\xa3\x55\x5d\x24\xe3\xc1\x79\xf3\xb3\xf8\x15\xcf\x14\x7b\xce\x28\x84\x89\xd8\x06\x1c\x5f\x4d\x37\x64\xd8\x36\x16\x30\xa3\xe3\x4b\x8f\xf5\x4f\x82\x8b\x53\x1c\xd9\x2c\x5a\x3a\xed\xc9\x14\xdb\xd3\x13\x82\xcb\x38\x1a\x6d\x1a\xa7\x7f\x3b\x27\x75\x87\xca\xf1\x3e\xdd\x9d\x2f\x29\xb3\x8b\x2e\xd2\x0f\xbc\xce\xbc\x48\x60\xe7\x96\xd0\xd8\xcb\x6a\xbb\xcc\x6c\x32\x08\x48\xe8\xe5\xce\xc4\xe7\x3a\xc9\xad\x5e\x28\x11\x5f\x22\xfe\x00\x56\xd3\x58\x10\xa5\xeb\x65\xe9\x2e\xcb\x88\xbb\x4c\x00\x45\x41\x6e\x66\x2c\x1b\xff\x85\xa5\x4f\x7b\xe5\xec\xc0\xea\xd0\x34\x9d\x43\x24\xd7\x46\x86\x04\x04\xd0\x1f\x99\x0d\x0c\xd2\xd4\x32\x5d\xb8\x22\xd5\x5a\xb8\x88\x87\x15\x36\x3a\x8c\x48\x9f\xa7\x06\xac\xe2\xfe\x8e\xc3\xb7\x3b\xcf\x56\x64\xce\x04\x61\x6d\x19\x0d\x2e\x85\x1a\x5f\xbd\xd0\x9b\x83\xd6\x8c\xf8\x9d\xb4\xdd\x12\x40\x64\xd4\xfd\x48\x80\x8b\xc4\x96\x39\xd2\xe7\xda\xf4\x50\xce\xe8\xf6\xd1\x8b\x5f\xc3\xdb\x06\x29\x6b\x37\x56\x25\x99\xb2\x49\x33\x39\xaf\x4b\xc1\x47\xc8\x15\xd2\x86\x3d\xaa\x8f\x34\x47\x81\xd5\xb5\x97\x4d\x66\x68\x90\x1c\x52\x79\x31\xf1\x7e\x00\x05\x01\x9b\xc4\x45\x55\xba\x80\xa9\x4b\x3f\x19\x52\xd0\xfe\xe2\x07\xd8\xdd\x5f\x8c\x10\x6d\x8c\x03\x61\xf6\xd8\xca\xdf\xc1\x49\xb2\xd9\x59\xcc\x17\xa5\x8d\xa0\x39\xb8\x73\xe0\xa3\xb2\xea\x73\x9f\x67\xb1\xe7\xf8\x85\xfb\x22\xd6\xed\x63\x5e\xba\x0e\x90\x92\x30\x56\x33\x84\x51\x20\x00\xe3\x13\x83\x5f\x0e\xf1\x8b\x68\x2e\x83\xff\x4d\xe9\x54\x8b\xc7\x57\xdd\xad\x9c\x14\xf5\x1d\x24\x8c\x91\x4e\x61\x96\x3a\xa3\x2e\xca\x7f\x6b\x2a\x70\x34\xd9\x3f\xcb\x78\xff\x6f\x0e\x85\x47\x70\x0d\x41\x14\xdd\x95\xba\x25\x47\x90\xc5\x90\x08\xb5\xf0\x04\xc7\xcf\x03\xe5\xfe\xcd\xdf\xb3\xb0\xc5\x55\x2d\x95\x60\x43\x9a\x3d\x37\x85\x0f\xde\xa3\xe9\xc3\xe4\xa0\x68\xb9\x30\x71\xad\x18\x24\x9a\x14\x1e\x3a\xe4\x22\x8d\x7e\x98\xdc\x88\xa6\x70\x8a\x02\x9f\xc7\x8c\xf3\x6f\xaa\x3e\xab\x02\x2d\x80\x26\xd1\xeb\x4a\x85\xfd\xc5\xd4\xe4\xb7\x96\xb6\x71\x12\xee\xe0\x39\x89\x83\xd0\xaa\x30\xb0\x80\x9d\x16\xdb\x3e\x6e\x87\xdd\x3a\x23\x82\x86\x69\x41\x81\xc7\x46\x2b\xf0\x6b\xc8\x0d\x24\x30\x94\xbc\xb1\x06\x84\x8d\xa1\xc8\xb4\x73\x82\x52\xb5\xe7\xf1\x4e\x68\xa2\x4b\xad\x85\x94\x44\x6a\xc5\x93\xca\x23\x71\xc1\x4f\x3e\xae\x01\x5a\xe9\x05\xba\x20\xa1\x98\xf6\x1b\x01\x34\x4e\x73\xef\xbf\xf6\x93\xfc\x73\x25\xcc\x76\x27\x86\x24\x5d\xe3\xfe\xd6\x21\x49\x6c\x85\x11\x0d\x08\xc8\xaa\x7f\x77\xb4\xc3\x92\x74\x6c\x81\x66\xba\xbb\x36\x2c\x95\xa2\xb0\x8b\xa6\xb8\x87\x02\xab\x64\x11\x93\x6d\xec\xb6\x05\x68\x58\x6d\x7c\xe3\xfc\xc0\xa5\x92\x84\x7c\x31\x93\xf5\x9f\xa8\xcc\xac\x71\xfd\x1a\xf8\x5d\x14\xcd\x5a\x27\x1b\x85\xa4\x08\xb5\x14\xa1\xe8\xa6\xf9\xfa\xc6\xc7\x7d\x71\xb7\x61\xc4\x9b\x17\x18\xc5\xe2\x07\xae\x98\x14\xa3\xec\x1c\x7d\x37\xcb\xe8\x36\xd2\x52\x1d\x1b\x6a\xf9\x84\xe0\x80\x33\xb6\xd5\x56\x34\xee\x7e\x8f\x96\xac\x22\xfd\x3a\xf9\xea\x2a\xeb\x6e\xbc\x00\x24\xbd\x2f\x46\xe6\x5a\x13\x44\xb1\xa7\x1f\xbc\x60\x0a\xf8\x5d\x1e\xe7\xea\x30\xfe\x84\x43\x22\x1c\xfe\xec\xdc\x95\x2a\xe1\xa6\xe4\x38\xcd\xbb\x90\xaa\x77\xfe\x52\xe8\xb1\xec\x4f\xfa\x62\x78\xe6\xed\x5a\x5d\xc8\xb7\x88\x49\x5b\x6b\x0e\x17\xf4\x23\xba\x95\x0d\x3a\x16\x66\xb0\x9f\x50\xdf\x9c\xb0\xe7\x83\x0e\x1a\x98\xdf\x08\xf8\x0f\xef\xf9\x07\x98\x7d\xe1\x5b\xe0\x92\x9a\xe8\x83\xa3\x64\xc2\xc8\x18\x16\xea\xa6\xef\x81\xcc\x00\x8c\xb4\x20\x11\x80\x71\x16\xde\xec\xe6\xd9\x19\x39\x3b\xc2\x97\x6a\x9f\x60\x4c\xe6\xd9\xae\x87\x22\x9b\x84\x93\xb8\x27\x16\xb4\x50\xbd\xb8\x48\xdc\x25\xb4\x6a\xe1\xcb\x04\x55\xcc\xe2\x09\xab\xc4\x02\x8e\x9a\x21\x09\xf5\x63\xd2\x97\x74\xf9\x56\xe8\x4e\x70\xa6\x4b\xa4\x63\x42\x6c\x49\x11\x03\xbb\xe4\x05\xa4\x42\xb7\x0c\x6f\xac\x85\x46\xda\x6d\x68\x2d\x4d\x6b\x8a\x21\xb6\x93\xb4\x25\x1c\x42\x38\xbf\x41\xf8\x17\x21\x39\xd8\x70\x4b\x0d\xdb\x7e\xa1\x00\x09\x59\x35\xc4\xb2\x03\x12\x96\x4b\x98\xed\xd2\xb4\xd7\x33\xe1\x4c\xcb\x02\xb6\x02\xb5\x66\x0a\xd0\x35\xe2\xd9\x7d\x7a\x73\xdb\x57\x5d\x9f\xbb\x55\x1d\xf6\xcc\x11\x34\x82\xe3\x6a\x64\xd2\x76\xb4\xa5\xfd\xc8\x9f\x16\xa5\xcf\x33\x7a\x76\x34\xa2\xce\xdd\xfc\x32\x65\x8b\x28\xc7\x68\x79\x1c\x43\xae\x20\x7f\xc0\x08\xa3\x27\x72\x5f\xb1\x0b\x53\x0c\x86\xb5\xd6\x0e\x15\x7a\x32\x67\xfe\xfc\x20\xf8\x37\xd6\x12\x1e\xcd\xf7\x0f\x73\x1e\x7f\x55\x31\xfd\x4b\x9b\x9c\xd8\xb9\xf1\x79\x7e\x5d\x1e\xca\x4f\x3c\x86\x61\xe9\xb2\x38\x8c\xe6\x13\x11\xdd\x40\xf8\x81\xfb\x4c\xa8\x67\xa3\x83\xb3\x0c\x32\x35\xc0\xc2\x34\x45\x75\x35\x06\xf5\x85\x28\xb8\x4e\xe0\x9a\xac\xe7\x94\x7c\x34\xea\x8e\x89\x8c\xfb\x59\x51\xbf\x2a\xdd\xd3\xab\x20\xc5\xd9\xda\xf8\xfd\x33\x48\xfc\xfb\xd5\xd6\x14\x4e\xd3\x11\x24\xef\xb5\xbd\x00\x80\x12\x6f\x6d\x55\x1e\xbc\xae\x1f\x7f\x5c\x32\x62\x93\x04\xb3\xd8\x63\x84\xf2\x5b\x8e\xec\x72\xf5\x80\x67\x51\xc8\x11\x53\xe6\x69\x8c\x42\x83\x85\x00\x2c\xba\x77\x26\xfa\xb5\xfe\x4f\x3e\x1d\x82\x00\x68\xbc\xc3\x10\xb4\xff\xc4\xcf\x0a\xc7\x9e\x2d\x35\x2b\x35\xe5\xec\xbb\x42\x9f\xac\xf0\x5b\x04\xbc\x94\xed\xe9\x2e\x55\x01\x54\x85\xe1\x29\x8f\x90\xc1\xa5\x7c\x4c\xbf\xc5\xb1\xc3\x3b\xac\x5e\xfd\xe0\xfa\x15\x9f\x1f\x2c\xb4\xab\x1f\x7c\xab\x35\xea\x03\xad\x58\x29\xdc\x11\xf3\x6c\xae\xa0\x29\x9c\x2c\xec\x73\x92\xc4\x46\x7c\x8d\x45\x34\xad\xa7\xde\x4c\x09\x09\xbf\xdc\x20\x81\x05\xc4\x0c\x8c\xdb\xe8\x46\xba\xfc\x0c\xde\x58\x24\xf3\x13\x92\x0a\x2a\xa5\x85\x90\xef\x6b\x92\x97\x5c\xe6\xe0\xa8\xa6\x8d\x9f\xc8\x0d\xb2\x63\xbd\x89\x60\x7f\x9e\x7a\x3b\x08\x4b\xe0\xfe\x84\x9b\xa9\x84\x8a\x7b\xdb\x4d\xc4\x9d\x1b\xa6\xfa\xc3\xf2\x45\x9e\x6f\x43\x3b\x94\x75\x46\x38\xab\x71\x11\xa5\x60\x96\xe3\xee\xaf\xa2\x99\x89\x8e\x24\xbb\xa6\x17\xa6\x90\x5f\xf3\x84\x7a\x1c\x15\x0e\x6f\x37\xd0\xdb\x8e\x55\x08\x40\xa2\xd3\x1a\x2d\x72\xff\xeb\xce\x4f\xe1\x87\x49\xf6\xcc\x55\xe0\x7c\xb1\x71\xbc\x42\x28\x92\xb3\x40\x4c\x86\xf2\x8b\x32\xb9\x63\x1e\x90\x06\x0d\xf4\x93\xd0\x04\x4e\x12\x89\x36\xe5\x2c\x3b\x86\xa7\x66\x62\x66\x5c\xc4\x75\xb9\xc9\x31\xfa\x6e\x47\x39\xe5\x85\x3b\x6f\xb1\x5f\x8f\x8b\x5b\xd1\x8f\xab\x97\x69\x5a\x8c\x75\x01\x35\xbc\xa9\x25\x3b\xf5\x0e\xe2\x16\xec\xe5\x62\x9a\xa1\x21\xd1\x69\x7f\x1e\x9b\x1c\x3f\x11\x1c\x00\x07\x90\x93\x6c\xa2\xbb\xa3\x56\x52\x16\x75\x2e\x9f\xfa\x7a\x2a\xf6\x22\x5c\x68\x4d\x7f\xa7\xbb\x2b\xf7\xf4\xdb\x0e\x3e\x5b\x37\x6d\x95\x55\x0c\x41\xfb\x65\x4e\xd2\x10\x19\x4b\x03\xae\xe4\xfe\x41\x64\x76\xb3\xf9\x99\x5a\x6c\x28\xb0\x59\xaa\x92\x84\x47\xb5\xfc\x89\xa1\xae\x92\x03\x55\x50\x4f\xf0\x6b\x96\x70\x2e\x47\xde\x93\x72\x31\xe9\xa9\x04\x7b\x8d\xc5\x92\x20\x7a\x94\x6b\xf4\x55\x44\xfb\x63\xd0\xfa\x96\x53\x9f\x71\xc2\x23\xc0\xd4\xc0\xaf\x44\x7e\x2b\x1b\xbe\x1c\x15\xea\x66\x3e\xdc\x79\x11\xed\xd9\x6f\xb7\x52\x48\xc7\xe2\xd3\xc2\xda\xa0\x54\x46\x57\xa4\x55\x78\x56\x21\xbf\x15\x26\x8e\x73\x40\x45\xd3\x7e\x18\x05\xbb\x4d\x60\x19\xe6\xa2\x48\x66\x01\x4b\xd4\x00\x17\xca\xe0\x30\x30\x67\x3f\x10\xe2\x42\x08\xfb\x56\x0c\x46\xeb\x51\x1b\x44\x92\x40\x6b\x92\xbf\x97\x71\x74\xf5\x3f\xac\x90\x60\x72\xff\x7a\xc0\xf3\x9f\x15\x85\x6b\xf2\xc9\xd1\x7e\x8c\x5b\xa2\x9a\x45\x14\x08\xe3\x1b\xa8\x7b\x66\x4a\x2d\xcd\x42\x0d\xac\xcf\xd0\x45\x0b\x2f\x49\x09\xf9\x16\x3e\x6c\x1b\x9f\xb2\xd7\x4e\x08\x9e\x48\xac\xea\x3a\x0b\x93\xb0\xbc\x10\x2d\x99\x60\x0b\xed\xb0\x97\xe1\x92\xbf\xfd\x77\x55\x16\x66\xd4\x29\xcf\xf9\x51\x9e\x9d\x55\x5d\x90\x28\x61\x2b\x5f\x67\x31\x24\x69\xd9\x32\xf2\xaa\x5c\xe1\x49\x65\x83\x9c\xc3\xee\x30\xda\x5c\x8b\xf3\x09\x92\xe1\x76\x30\x9e\xbb\x5c\xa1\xf9\xfe\x7a\x18\xad\x89\xd8\x6a\xfb\x86\x92\x99\xd1\xf0\x15\xa7\x7c\x41\xdd\x02\x2e\xf4\x4c\x02\xdb\x1f\x18\x99\xf3\x73\xa0\xd0\x00\x68\x29\x5f\x49\x23\x80\x36\xbf\x4e\x0c\x7c\xba\x57\xce\x7f\x45\xc2\xdc\xb5\x0b\xd3\x69\x93\x4b\x20\x3f\x5b\xb4\xbe\x7b\x4d\xe5\x97\xb4\x1a\xcf\x4f\xfd\x1a\x12\xb2\x5d\x0e\x5f\xb2\xe3\xad\xa4\xd9\xe9\xe0\x67\xdd\xc2\xc8\x71\x77\x73\x80\x09\xc0\x2f\x09\x60\x53\x71\x39\x53\xe1\x77\x80\x3d\x10\x6a\x8a\xbf\x87\x0a\xcd\x33\x25\x69\xa2\xa7\x57\x90\x6f\x98\x7b\x9e\xee\x95\x1b\xbb\x91\x99\x44\x48\x14\xb0\x9b\x53\x7e\xcc\x38\xf4\x16\xf6\x02\x1b\xa4\x36\x66\x8c\xcc\x3b\x11\xdb\x89\x87\xac\x60\xe1\xbc\x4c\xe1\x64\x87\xd8\x33\x10\x6b\xcb\x84\x99\x74\x4b\x51\x30\xb7\x22\x05\x2f\xc2\x85\xaa\x98\x2a\xbf\x41\x1b\x5f\x95\x59\x1f\xd4\xc7\x40\xc5\x90\x26\x75\xa8\x22\x25\xf2\x3e\x5c\x6b\x14\x7c\x29\xdb\x1c\x7d\xf9\xd8\xc3\x79\x8f\x4b\x5a\x6a\xf3\x15\x9e\xda\xa1\xbb\x7a\xaa\x90\x87\xa4\xc3\x28\x29\x5c\x1b\x86\xaa\x16\x9f\xa0\x16\x30\xd2\x80\xcd\x79\xc8\xd5\x81\x7d\x05\x67\x24\x0e\x1d\x98\x4f\x46\x01\x8c\xe0\xce\xc5\xf6\x97\xe4\x99\xaa\x15\xa0\xb7\x36\xd0\x83\xc9\x58\xc5\xbb\x12\xcf\xe0\x44\x1d\x58\x0c\xcb\xd0\xa0\xb4\x73\x4b\xa6\xc8\xf7\x46\x89\x56\xeb\x50\x08\x6a\xe1\x6e\x1d\x11\xc4\x11\x48\x0c\xdf\x9a\x2f\xea\x9a\x2e\xdf\x17\x26\x06\xcb\xfa\x53\x3a\x94\x4a\xf4\x89\xbf\x5b\x8e\x5e\x5b\x2a\xab\x61\x35\xb0\x23\xe0\x39\x67\x47\x3b\x9b\x92\xe6\xc3\xc6\x21\x56\xa1\x9c\x3e\x65\xe4\x0b\x69\x2d\xac\xe0\x6d\x68\x23\xba\x71\xaa\xa5\x7c\x7e\x48\x30\xfc\x8e\xb8\xf8\x39\x26\x3c\x6f\x0e\x49\xbf\x40\x7c\xbb\x89\xc0\xc7\x85\xcd\x70\xa3\x30\x70\xc1\xc1\xd3\x3b\xe9\x60\x86\x90\xc7\xf0\x25\x32\xc3\x86\x72\x16\x74\x33\x25\x00\x38\xe8\x4f\x0e\x81\x81\x38\xcb\x95\x5d\xd2\x0c\xbc\x7e\x55\x30\x6b\x4b\x37\x3e\xf4\x53\xe8\xd1\xd7\x34\xc0\x09\x7e\x55\x58\x9f\xce\x3a\x18\x74\xce\x99\xf0\xbb\x6f\x91\x16\x3f\xe5\x61\x37\x97\x57\xdc\x01\x33\xe1\x54\x9c\xe2\x48\x04\x13\xce\x6b\x1f\x5d\xed\x06\x5f\x87\x53\x94\x94\x0b\x1d\xfc\x1d\xb2\xbd\x5f\x37\xc3\x61\x27\x47\xaf\xed\x6f\x4f\xaf\xbf\x5b\x9e\x70\x3c\xff\x30\x7d\x42\xa5\xfe\xd7\x66\x42\xb0\x1d\x96\x04\x0b\x8e\x5d\xef\x6f\xdc\xbd\x1f\xdb\x9c\x8a\xea\xbd\x5c\x9b\xb2\xac\x20\x72\xda\xa2\xc9\xfa\x4c\x54\xcd\x22\x6c\xe6\x8f\xe2\xe4\x46\xa6\x9a\x21\x55\x3a\xdf\x53\x62\xbd\x55\x99\x88\x6b\x86\xd9\x68\x5c\xc3\xeb\x5c\xd6\xd3\x10\xfa\xc3\x5e\x1a\x50\xe0\x12\x94\xb9\x4d\xcc\x51\xc3\xb7\x7f\xbf\x7e\xf8\xc6\xc5\xf1\xde\x5f\x02\xd4\x36\x09\xd5\x92\x88\x34\xce\xc9\xbe\xdc\x47\x8c\x75\x59\xd2\xc1\xb9\xd5\xd7\xb6\xf5\xd5\x4e\x90\x04\x52\xe5\xe8\xf1\x39\x04\x7d\x8a\xea\x6d\xef\xab\x65\x73\x80\xc1\x0a\xd3\xf3\x2c\x6d\x87\x1d\x63\x80\x5b\xd2\xb4\x5b\x5f\xc6\x46\x7a\x01\x58\xf4\xac\x28\x61\xeb\x15\x5d\x39\xbc\x52\x4a\x5d\x32\x81\xfc\xe4\xc3\xd3\xc6\x4c\xc1\x8a\xbd\x22\xfc\x9e\xa9\xbd\x4c\x64\xd9\xa2\x98\x21\x21\x5a\xdf\xeb\x3b\xf3\x69\x79\x9d\xad\x07\xc5\x78\x20\xf1\xc2\xc9\x3c\xc1\xa8\x8c\x38\xa0\x9e\x77\xb0\x19\x50\xee\x4b\x90\x00\x75\xb7\x78\x7b\x61\x39\x90\x8e\x94\x99\x0a\x63\x10\xbf\xd2\xd3\x48\x0b\x2c\x35\x0b\xf5\xa7\x47\xc8\x9e\x82\x51\x41\x96\x34\x2e\xce\x18\x55\x78\x4e\x10\x63\xad\xb2\x63\x04\x1e\xa2\xb6\xce\xe1\x91\xad\xb3\xb6\xea\x79\xdd\x39\x29\x50\xee\xda\x99\x5c\x97\x18\xa6\x4f\x9b\x8c\xbc\x9a\x54\x42\xd0\xc8\xe0\x4a\xf6\x9a\x1f\x4d\x2d\x50\xc2\x77\xd9\xd1\xe8\xb2\x0c\x51\xd9\xb7\x37\xd7\x95\xa7\xd6\x21\x29\xe0\xa5\xe7\x35\x32\xcb\xab\x17\x00\x93\x76\x8b\xc6\x5a\xdb\xef\x76\xe9\x38\x97\x26\x32\x21\xa0\x67\x1c\x70\x04\xb4\x41\xe6\x2b\x8c\xf8\x09\xf1\x0a\x04\xc9\x59\x67\xa2\xae\x2d\x5c\xf2\xc1\xa3\x37\xa0\x9c\xed\x0d\x16\xac\x28\xcd\x1c\xe8\x15\xe7\xa7\x41\xec\xc2\x15\xe6\x5d\x60\x14\xec\xbc\xd2\x56\x5d\x3e\xd1\xb0\x81\xc2\x8b\xdd\x7c\x05\x20\x0c\x75\x8d\xec\x57\x7d\xc0\x61\x46\x9a\xa1\x10\x92\x09\x35\x50\x0a\x61\xb2\xe8\x02\xe6\x6c\x72\x20\xf4\x3e\x24\x4c\x56\x75\x6a\x79\xf9\x97\xa0\x4c\xe1\x62\xd6\x82\x30\x12\x83\x2f\x60\x84\xc2\x1b\x5d\x41\x97\xd9\x78\x5b\x4b\x5b\x37\xb7\x2d\x15\x37\xac\x57\x7a\xae\xfe\x9b\xff\x16\x77\x7d\xc0\x0d\xe1\xfa\xeb\xba\x19\x9e\x51\x39\x90\x1c\x3f\xe6\x73\xa6\xfb\x6f\x0d\xc5\x77\x76\xfd\xb3\x8c\x6d\x11\xff\xca\xdf\xff\x55\xd2\x67\xc7\xc7\xa2\xe5\x31\x74\xaf\x81\xa3\x85\x8e\x21\x96\x4a\xec\xb0\x26\xe7\xb0\x3b\x44\x68\x36\xc0\x52\x16\x2f\xb5\x80\x51\x63\x39\x88\x29\xbb\x24\xe0\xd8\xf0\xb4\x85\xc1\x6e\xc3\x42\x26\x96\xd3\xb0\xee\xe5\x69\x12\x89\xd6\xd7\xbe\x1d\x94\x75\xcc\xd9\x3e\x40\xcf\x54\x02\x39\xf9\x2d\xcf\x77\x4d\x94\x80\x82\x85\xdb\xdb\xc3\xaf\x7b\xcf\x31\x82\x4c\xf1\x45\xd4\x99\x1f\x04\xa6\x39\xad\x71\x89\x55\x7a\x41\x75\xca\x60\xd7\x70\xc4\x2c\x3a\x91\x9f\xac\xa2\x96\xf8\x74\xc7\x42\xb2\x48\xcd\xd6\xdb\xda\xe7\xc3\x60\xbd\x83\xa6\x6b\x54\xe3\xc5\xa2\x76\x22\x46\x21\x96\xfb\x27\xa9\xd1\xf8\xc7\xbe\xae\x09\x39\x2c\x88\x68\x99\x4c\xe6\x87\x31\x06\xcf\xec\xaa\x4c\xf1\xae\x5a\x5b\x5a\x59\x7b\x90\x00\xaf\x62\xf4\x0f\x40\x8a\xcb\xff\xdd\xef\x2f\x2e\xf6\x1c\x18\xf4\x5b\xc5\xb6\xa6\x9e\x0c\x9e\x97\xa2\xf5\xfa\x55\x31\x97\x7a\xb4\xc9\x93\xd3\x7c\xe1\x2d\x6d\xf2\x14\x6e\xd0\x2f\x45\xf0\xcb\x31\xe3\x5b\x30\x9c\x2a\x66\xbf\x68\xc2\xab\xcb\x4b\x38\x92\x6a\x67\xef\xca\x02\x66\x5f\x03\x18\x1a\xeb\x08\x02\x1d\x50\x71\x5b\xe9\x50\x6f\x66\xbc\xb3\xc1\x9a\x9e\x0d\xcf\x10\x5c\xae\x97\x4c\xc7\xdc\x59\x35\xc0\x69\x40\xeb\x93\x4d\xb9\x2d\xe1\x91\x94\xb4\x4b\x4f\x6f\x2d\xb4\x58\x7e\x9a\x9a\x85\xa9\xd2\xb2\x8d\xc4\x78\x9f\x86\xc0\x37\x78\xe7\xdb\x8f\x1b\xa8\xea\x8c\x01\xc1\x60\xfa\x2c\x4b\x4f\x5b\x2e\xef\xa0\x94\x43\x31\x19\xcf\x53\xb2\x25\xce\x72\xef\x3b\xe9\x1b\x7c\x5b\xad\xbb\x28\xdc\x01\x40\x83\x07\x52\x84\xeb\x77\x4c\xbb\x29\x61\xe9\x14\x64\xaf\x0e\xde\xcc\xad\xc9\x81\x59\xa7\xb5\xaf\x99\x50\xea\x66\x37\xcd\xcd\x35\xb5\xaa\xe0\x62\x30\xaf\xfc\xe2\xda\xc0\x18\xfe\xb0\x7b\x82\x7a\xfc\x8c\xea\x67\x90\x82\x11\x1a\xd9\x9d\x57\xbd\xf1\xa9\x6e\x4b\x90\x79\x2c\x24\x9d\x12\x0b\x4c\xe8\x47\x38\xe4\x09\x4c\xfb\xad\x77\xbd\x6e\x6c\x11\x3f\x58\x68\xb5\xc9\x84\xb9\xbb\xd9\xc8\xf9\xae\x8a\xd6\x9b\xfa\xbb\x03\x1b\x26\xd0\x16\x73\x3b\x07\xe3\x20\x76\x86\x0f\xf8\x8e\xb8\x18\x77\x6c\xf5\xd2\x12\x37\x02\x10\xdf\xd2\x00\x9b\xf8\x22\xaa\x87\x66\x72\xd5\x7a\x36\x89\x74\x2e\x9c\xcb\xe6\x1c\x6f\x2d\x90\xc6\xaa\x05\x16\xce\x36\x5a\xbe\xac\x65\x46\xd4\xf9\x96\x6c\xc3\xca\x81\xdf\xae\x8e\xc6\x0d\xe8\x24\xa4\xa0\x3e\x07\x12\xe0\xb2\xdd\xac\x5a\x64\x98\x6d\xcc\x2d\x30\xbf\xa3\x4f\xec\x2e\x08\x22\x5a\x6e\xb1\x1c\x71\xc9\x81\xee\x69\xaa\x35\x51\xf2\x89\x1e\xaa\x96\x98\x03\xad\x14\xa6\x0c\x0d\xfd\x07\x9c\xc1\x05\xe4\x88\xe6\x56\x1e\x97\xf6\xa9\xda\xb1\x74\x1e\xd2\xbd\xf2\x21\x73\xbd\xc1\xac\x76\x5d\x25\x29\xd1\xa5\xcb\x51\xd0\x98\x55\x90\xfc\x59\x07\x50\x44\xe1\x6f\xf3\x34\x7e\x33\xd4\x77\xe8\xea\xdb\x64\x17\xae\x11\xc0\x80\x19\x47\x21\x3e\xeb\x89\x3f\xa9\x74\xac\xeb\xeb\x9a\xa8\xd8\x73\x68\xe8\x5f\x67\x20\x41\x8b\x48\x16\x10\x35\x63\xf6\xdf\xbd\x31\xf0\x8c\xff\xb0\xfa\x82\xe9\xbf\x5d\x00\xb5\x89\x82\xe0\x80\x53\x36\xa5\x68\x82\x00\xd0\xa7\x70\x88\x31\x29\xbe\x30\x04\x49\x23\xb8\xa2\x23\x6c\x0f\x2e\x50\x9a\xdf\xc1\x39\xd8\x92\x34\x03\x62\x5e\x84\xfe\x38\xb3\x4a\x9a\x86\x4d\xd2\x50\x30\x02\xf0\x45\x4d\x34\x25\x0d\xd2\xf2\x79\x50\x22\xc6\x01\xd9\xce\x1b\x81\x3e\xb7\x0c\xc0\x38\xa4\xe1\x30\x94\xa0\xc9\x73\x34\x10\xfd\xc1\x19\xd8\x0f\x2f\x51\x12\xf1\x8e\x4a\x54\x14\x7b\x80\x7d\xe3\x26\xa1\xc7\xbd\xae\x4b\xe7\x2f\x03\x49\x6a\x4e\xb5\x6a\x93\xf6\x44\x3b\x36\x5e\x80\x89\x53\x95\x74\x58\xa7\x1b\xc1\xb2\x8a\xa4\x44\x4a\x1d\xae\xcd\x7b\xcb\x75\x10\xcc\x62\x93\x54\xe1\xaa\xb6\x8d\x69\x08\x56\x41\x64\x06\x88\x81\xc2\xd4\xcc\x45\x21\x73\x38\x76\x2f\x94\x21\xee\x69\x12\x7f\x51\x53\x5f\xe9\xe7\xad\x28\x9b\x1d\x98\x5f\x27\x5b\xe2\xd2\x02\x3d\x52\x71\xd8\xb6\x97\x33\x8b\xe9\xbb\x78\xe6\xd2\x08\xca\x2b\xe5\x1e\x57\x12\x2d\x8f\xef\x74\x38\x32\xc3\xfd\x15\x75\x52\x92\xb9\xa9\x0e\x81\xd9\xc9\x37\xd6\xc0\x81\x29\xc5\x26\x3a\x62\xaf\x4f\x57\x2e\xb0\x98\x0e\xed\xcc\x3f\x4b\x95\xc5\x0c\x18\xf4\x67\x0f\x62\xf2\x6c\x3d\x9a\xd6\x77\x56\x57\x0d\xa4\x1b\x78\xad\x6b\x3a\x51\x66\x26\xa2\x73\x1a\x59\xbd\x25\xdc\xd3\xdd\xd8\xfc\xa5\x5a\xbd\xe6\x89\x0a\x09\x97\x5b\x8e\x30\xef\xbc\xaf\xbf\x53\x31\x67\xfa\x0c\x11\x08\xba\x71\x5f\xfc\xab\x2f\x69\xa4\xa4\xa6\x39\x9a\xfa\xe8\x58\x1a\xa2\x1b\xaa\xab\x02\x38\x33\x9c\x29\xec\x91\x9c\x28\x7e\xea\x37\xe0\x84\xf4\x0b\x7a\x27\x1a\x93\x61\xe5\x66\x36\x12\xf3\xf9\x27\x84\x49\xa1\xeb\x0c\x56\x9a\x3f\x96\x40\x30\xc9\xd9\x79\x36\x52\x9a\x3a\x55\x85\xe6\x19\x66\xae\xfd\x3c\x31\xba\x7e\x58\xb8\x38\xd5\xc4\x4f\x48\x78\xc7\xce\x1e\xab\xb7\x08\xb7\x44\x01\x34\xcf\xe8\xe0\x7d\xe3\x75\x42\x20\x1c\xd0\x5d\x2a\x15\x79\x18\x82\x07\xfc\x04\x09\xc9\x38\xbd\x53\x0d\x4b\x51\x22\xe5\x8f\x90\xcd\x0b\x82\xce\x18\xc1\x76\xbb\x67\xd1\x86\xcc\xeb\x6b\xdd\x14\xdc\x16\x89\xab\x13\x11\x8a\x28\x7b\x91\xdd\x64\x65\x3d\xf0\x94\x64\x20\x6a\xa1\x07\xb2\xb6\x2a\xc2\x39\x28\x60\x47\xe3\x6f\x02\x46\xab\x04\x64\xe1\x43\x51\xcd\xe6\x3a\xdf\xdd\x79\x26\x5a\x46\x35\xad\x1c\x33\x18\x15\xd0\x86\x8f\x30\x4e\xf3\xba\x97\xef\xb7\x02\x0a\xe5\x4e\x97\x79\x52\x86\xbd\xba\xa1\x9a\xe2\x0c\xf0\x2b\x88\x14\xf2\x81\x71\xc9\x78\xbf\x62\x8d\x78\x04\x2b\xdf\xf7\x66\xdc\x60\x76\xf1\xb9\x8b\x73\xf0\x40\xb6\x70\xe2\x60\x9a\x8c\x32\x53\x0d\x30\x45\xfa\x0a\x79\x6a\x5f\x34\xa7\x1c\x9f\xc3\xc3\x23\x2d\xe4\x47\x62\xf5\x17\x89\x5d\x60\x89\x5a\xb4\x6b\xd8\x3e\xbf\xed\xc2\x2d\x29\x91\x49\xad\xc8\x3b\x90\xb1\x99\xb8\x3b\xad\x6e\xee\x85\x86\x18\xc3\x32\xbc\x27\xb9\x44\xe5\x40\xa0\xe9\xfc\xad\xec\xe3\x19\xf7\xe7\x1f\xe6\x25\xc6\xbf\x6a\x91\x57\x51\x10\x02\x3b\x8c\x4b\x3b\x01\xcf\x2a\x4a\x95\xb9\x4b\xd2\xce\x4b\xb4\xa4\x55\x0b\x42\xc8\xcb\x53\xb6\xda\xa6\xeb\x67\xf4\x00\x6f\x19\xfe\x08\x16\x52\x99\xd6\x7a\x0d\x45\x6f\x9f\x19\x1b\x54\x69\x80\x19\xcf\x67\x9e\x3b\x12\x21\x63\x59\xf0\x52\x2e\xe8\x4b\x0c\xbe\xe4\xee\xca\x6c\x5e\xa7\x15\xa0\x68\x9c\x7e\xbe\xfc\x93\x0e\xb3\x78\x08\xda\xf6\x3d\x84\x10\xfc\xc9\x39\x3c\x7a\xc3\xe4\x17\x7c\x2e\xd2\x88\xc8\x3e\x04\x8e\x16\x7f\xbf\xb0\xc8\x12\x3b\x06\x01\x40\x39\xe8\x13\x33\x99\x0b\xe0\x42\x97\x38\xd8\x20\xf0\x57\x43\xdd\xf9\xc2\xfd\xfa\xd4\x4a\x0d\x2a\xa2\x53\x5d\x7b\x00\x30\xe6\x73\xac\xc2\xc1\x41\xc6\x95\x1f\x34\x2e\x4a\x12\x49\x41\xc6\x41\x89\x9f\xfe\x58\x8e\x11\xb4\x39\x74\x51\x1d\x25\x66\x7e\x26\xcd\x7c\x6f\xc6\xf4\xce\x57\x9e\xe8\x1c\xcd\x8a\x45\xa3\xd0\x82\xb0\x66\x07\x96\x99\x9d\x76\xe4\xf1\xe7\x31\xf8\x05\x94\x37\xef\x42\x57\x58\x6d\x92\x08\xfd\xa0\x07\xd2\xe2\x6f\xe0\x12\x35\x73\xd3\xb1\xdf\x4e\x04\xcd\xe4\xc8\xff\xf4\x2e\x9b\x98\xf7\x3d\x2e\xc8\xa2\x83\xa4\xac\x71\x9b\xd9\xd6\x71\x59\xd8\xda\x08\xea\x13\x9b\x19\x5d\xd8\xd6\x94\xd5\x8a\xe0\x31\x44\x97\x93\x85\x05\xe2\x9b\x08\xd7\x67\xcc\xa4\x4d\xc5\x84\x4b\x11\x8a\xe3\x3d\x14\xad\xe0\xb5\x55\xff\x9b\x81\x88\x65\x4c\xbe\x2b\xfb\x85\x3a\x1a\x59\x92\xd0\x02\xe2\x7f\x2a\x76\x2a\x6e\x8d\x15\x16\xc7\x66\x11\xae\xf5\x09\xf5\x0c\xa9\x4e\x22\xcf\xa2\xd2\x4e\x21\x7e\x78\x1e\xae\x72\xa0\x4a\x72\xaa\x23\xc9\x61\x4e\x5a\x07\x11\x09\xf7\x76\xa1\x98\x63\x3b\x78\x09\x9a\xe1\x33\x35\xbc\x60\x55\x69\x49\xc4\x64\x74\xf0\xe7\x12\xb7\xb0\x94\xc1\x1d\x03\x97\xce\x1f\x03\xf7\xc9\xb3\x46\x2e\x47\x61\x10\xd9\xab\x4f\x52\xd6\x5f\x47\xf5\x60\xf6\xd8\xbd\xb3\x32\x88\x6e\x3f\x05\x02\xe3\x55\x23\x8b\x6c\xb1\xe3\x7a\x75\x1f\x70\x3e\x6d\x8f\xd1\x32\x45\x08\xdc\xf9\xd2\xc7\x31\xaf\x30\x04\xdd\x63\xbb\x6b\xdc\x56\x48\x88\x7d\x5a\xf1\xe5\xe5\xf4\xe6\xcd\xb0\xa8\x50\x21\x59\x27\x43\x24\x88\xe1\x73\xbb\x36\x77\xb8\xbc\x9b\x1a\x69\xa2\x86\x09\x9c\x77\x92\x45\xf9\x93\xd4\xb3\xae\x0f\x5f\xf9\x14\xd5\x4d\x8c\x5b\x12\x65\x69\x3b\x51\xb6\x2c\x4b\xe8\x57\xd7\x0b\x1c\xdc\xaa\x27\x7f\xf4\x75\x0d\x01\x65\xcf\x65\x5e\x38\x49\x92\x78\xf8\xf8\x24\xc3\xe3\x0f\x52\x19\xf2\x4e\x19\xc2\xea\x0e\xaf\x76\x93\xf0\x84\xaa\x9c\x8a\x40\x36\x7b\x1c\x56\xb5\xd2\x2a\xa7\x01\xe1\x03\x59\xde\x46\x5e\x19\x53\x4b\x91\x19\x4c\x9d\xb5\x62\x64\x61\xf2\x2e\xdb\xa6\xea\x4d\x5f\x21\xe6\x06\xc0\xc7\x97\xc4\x8c\xf9\xe3\x7f\x1b\xfa\xb9\xad\xdc\xa3\x64\x78\xbd\xc8\xbd\xc4\xf2\x61\x32\x25\x0e\xde\x4e\xc2\xf0\x44\x64\x9c\x3e\xc2\xdd\x73\xf8\xf7\x7a\x88\xe9\x1f\x56\x59\xd0\x8d\x7f\xb9\x43\xe3\x4f\xc9\xd1\xd3\x02\x0d\x1a\x21\x07\x2c\x41\xbb\xb0\xbe\x8a\xf7\xfe\x02\x51\xdd\x3d\xcb\x6b\xcd\x9b\xcb\xa6\x2e\x49\x05\x1e\xd5\x1b\x65\x28\xce\x67\x36\xc1\x8e\x4b\x2b\x3b\xed\x12\x89\x47\x32\x89\x07\x3a\x48\xc4\x35\x83\x6b\x9f\x31\xcc\xb2\x81\xd1\x90\x77\x28\x98\x03\x88\xbe\x52\x3f\xc9\x6f\x78\x66\x34\x4a\x75\x6c\x39\xa9\x29\xae\xa7\xaa\x4a\x50\x8a\xc2\xcf\x86\x20\xb7\xd9\x16\x5b\xfc\x77\x15\x04\x32\xd1\x6d\x3f\xbb\x00\xae\x1b\x0b\x69\x6c\x43\x52\xa3\x24\xb4\x86\x47\x31\x03\xe1\xc1\x05\xe2\x92\xf7\x40\x2f\xb9\x80\x9a\x47\x3f\x92\xb0\x5e\x87\xaa\xec\x7b\x4f\x19\xdf\xc9\x29\x17\x6c\xb3\x5f\xda\x28\x66\xd3\xd3\xca\x5a\x9d\xac\xc8\xdd\xb0\x76\xd0\x96\xc1\xfe\xcc\x88\xdb\x11\x2c\xbe\x07\x09\x74\xb4\x24\x10\x3a\xa9\x0f\x19\xdb\x99\x6b\x70\x5b\x21\x92\x42\x17\xaf\x15\x7c\x34\xd0\x9d\x99\x7a\x3e\xa8\xf3\x70\x31\x63\xcc\x69\x93\x1d\x19\xe1\xe7\x35\x01\x78\x4f\xf7\x3e\xc2\xfd\xaa\x22\x1a\x7f\x3c\xfd\x4e\x01\x46\xea\x49\x5f\x62\x16\xce\xc6\x2b\xef\x4b\x98\x68\xa0\xe6\xe2\x0b\xc3\x52\xaa\xf8\x76\x43\xcc\x7c\xeb\xae\x91\xb7\x41\xbd\xe0\x54\xe3\x5b\x19\x0f\x06\xf2\x64\x3a\xb6\x42\x24\xd3\xa5\x45\x6e\x0c\x7f\x82\x27\x07\x2a\x38\xb3\x3b\xf2\x9b\xec\x0c\x30\x9a\x1b\x4a\x15\x03\x3d\xd2\x57\x9a\xd5\xfb\x6d\x3e\xc7\x64\x91\xde\x7c\x55\x25\x8d\xc9\x8e\x85\xc6\xc5\x9e\x0d\x12\x0a\xa4\xc9\x8e\xa9\x8f\x0b\x80\x4d\xa2\x4c\x3e\x7c\xe4\xbb\xec\x38\x7c\xd2\x76\x3b\x10\x03\x13\x6c\xae\x43\xd7\x6b\x94\xde\xc5\x2f\x5c\x33\x13\x4d\x36\x8e\xf0\x7b\x36\x3b\xd7\x36\x6e\x4d\x06\xf6\x9d\x79\x1d\xe7\x90\xe4\x33\x60\xe9\xd3\x15\x16\xf7\x38\xe0\xb2\x49\x44\xe8\x9e\xd0\xaf\xa4\xad\xd1\x4e\xf1\xfe\xa0\x93\xe2\x45\xf3\x69\x75\xcd\x67\xeb\x7e\x9f\x5d\x5b\x12\x80\xb6\x0b\x43\x07\x74\xf0\x76\xb3\x35\xfa\x2a\xb9\x88\x95\xcf\x39\x1e\xe1\x4a\x9f\x52\xe5\x6f\x0d\xcc\x1f\xbe\x78\x5f\x74\x4c\x5e\x04\x0b\x16\xbd\xb4\x97\x03\x41\xfb\xc8\xba\x07\x48\xad\x2e\xca\xcf\x51\x19\xe7\x5d\xf1\x05\x9d\xff\x95\x38\xc2\x03\x47\xa9\x4f\xaf\xcf\xc2\xd8\xf4\xc0\x9b\xc1\x68\x61\xe1\x2e\x02\xe3\xf7\xdb\x7e\x0a\x63\x55\x81\x72\x2c\x4d\x3f\xd1\x7d\x59\x4b\xe2\x51\x88\x03\x7f\x02\xdf\x9b\xcd\x4e\x72\xfc\xb2\x27\xd3\x4f\x96\xd0\xc4\xae\x1a\x96\xbb\xe4\x9d\x9e\x93\x7a\xa2\x7e\x12\x5d\xaa\x19\x1e\x63\x1a\xc5\x30\xce\xe7\xc4\x98\xe6\x99\xe8\x5d\xfc\xbd\x65\x42\xef\x3f\xcd\x98\xcb\xe7\x3f\x57\x08\x8c\xff\x3e\xf2\x30\x37\xc8\x09\x4f\xa0\x74\x39\x4e\x04\x66\xee\xe8\x6e\x93\xa5\xf6\x78\xb1\x05\x86\xeb\x72\x4b\xca\x84\xe4\x1a\x53\xc0\x27\x2a\x6b\xd0\x81\x71\x4a\x84\x9c\xd9\x01\xb8\x70\x17\xb5\x4c\xf7\x9c\xe5\x00\xcb\x65\xba\xbe\xc3\xb7\xbe\x6f\x78\x89\xa2\x3a\xac\x25\x2a\xd2\xf4\xca\x2d\xd4\xb0\x70\x1c\xc6\xbc\xe7\x13\x02\x74\xc3\x49\x10\x95\x96\x68\x1c\x0d\xf0\xb0\xb1\x5d\x47\xfd\x6c\x73\xad\xf8\xf4\x66\xd0\x8b\xd4\x2b\x26\xe1\xe0\xa4\x20\xae\x6e\xc7\x0d\xf4\xb1\xa0\x8c\x44\x26\xac\xcb\xdf\xb4\xfb\xc1\x71\x95\x36\x8a\x5b\xc1\xeb\x68\xe1\x4f\x6d\x62\x9e\xf5\x8b\x9e\xee\x0a\x66\xf7\x2b\x3d\x7b\xc8\x1e\x84\x70\x64\x35\x28\x38\xe8\xef\x08\x76\xd4\x58\x68\x0d\x11\x5a\x93\x9f\x49\x43\x75\xf9\xbb\xca\xb9\x49\xa6\x4b\xb5\x03\x08\x0c\x59\x66\xe1\xb1\xb6\xe0\xb7\xc8\x2d\xde\x6e\xa8\x59\x98\xdc\xb7\xaf\x89\xc8\x9c\x76\x5b\xf8\x12\xae\x87\x1f\x15\xec\x08\xdf\x23\x63\x3d\x41\x38\xa6\xa8\x85\x9e\x3d\x30\xee\xe5\xfe\x45\xfd\xca\x8c\xc5\x33\x37\x9d\x5c\xc2\x77\xe7\xbc\xdc\x49\x91\x9d\x02\x02\xbb\x7a\xd4\x04\x60\xc6\x7b\xb3\x94\xa4\x18\x71\x06\x8b\x43\xda\x35\x24\x86\x64\xe4\x7a\x99\x36\xfa\x58\xf7\x80\x46\x6b\x18\x20\xfe\x44\x07\x79\xc8\xe8\x77\x28\x3b\x0e\x31\xf9\xd4\x49\xb7\xae\xe8\x07\x30\x00\xc2\xf5\x5d\x9e\xa9\xc8\x5f\xd9\x35\xa5\x0a\x32\x53\xec\xb8\x6d\x27\x5f\xb8\x6d\x79\x77\x32\x49\x40\xb1\xda\xe1\x0c\xc9\x2b\xff\xf4\xd4\xe9\x6b\xc8\xf5\x83\xe5\x3a\x03\xd4\xa9\x54\x86\xeb\x48\x41\xac\xb6\xec\x38\x40\x23\x9b\x5f\xc4\xca\x8c\xc2\x37\xd0\xb6\x97\xeb\x14\xc9\x30\xb1\x6f\x97\x69\xaa\x79\x27\x94\x53\x0a\xcb\xbf\x7d\x20\x96\xcb\x78\x2b\x1d\x47\x66\xd2\xf9\x10\xa8\x81\xb5\x17\x6f\xb5\x4d\xf9\x60\xad\x0d\xa3\xe4\x60\xd2\xad\x22\x76\x55\x9f\x2e\x23\xd3\x90\x12\x55\xcc\x5f\x1a\x5e\x64\x8b\xb9\xb2\x77\xf0\x32\xc5\x6f\x80\xfc\xfe\xff\x31\x77\x35\xcd\xa9\x2a\x5b\x74\x9e\x5f\xd1\x95\x5b\xf5\x26\x56\x02\x28\x2a\x26\x1e\xab\x10\xe4\x43\x40\x04\x0c\x51\x27\xaf\xf8\x06\x05\x1a\xa1\x51\xc0\x97\xff\xfe\x4a\x34\xc7\xe4\xd5\x39\xef\xde\xc1\x1d\xdc\x09\x76\xef\xbd\x7a\xaf\xd5\x8b\xdd\xe8\x08\x3d\xdf\x0d\x73\xe4\xb1\xfa\x4a\x31\x4e\x75\xce\x31\x81\x48\x51\x33\xbc\x3f\x10\xea\x0e\x49\x87\x5d\x67\xad\x6d\xe5\x9e\x7e\xf9\x4d\x2d\xbf\x79\x43\xff\xb0\x7e\xe7\x16\x83\xbf\xf5\x1b\xb3\x89\xfe\x61\x6f\x0b\x4f\x46\xf7\xbf\x69\xc7\xd1\x11\xc7\xe9\xb7\xd0\xe9\x28\x9b\x81\xab\x26\x81\xc7\xcd\x03\x82\x83\xa6\x99\xbd\xbd\xc7\x1c\x83\x17\x5d\x91\xe3\x88\x5d\x35\xb5\x43\x69\x47\x4e\x8d\x6a\xe3\x16\xce\x72\xe3\xcc\x12\x2d\x11\xd9\x03\x1e\x14\x33\x5d\x34\xa3\x9a\x5c\x65\xec\xd0\xe4\x1a\x8e\x10\x60\x7f\xe7\x75\x2d\x12\x85\xea\x61\x11\xc6\x59\x5f\x69\xc8\xa6\x74\x9b\x26\xc3\x4f\x99\xbe\x62\x28\x7f\x99\xef\x71\x6c\xc5\x0c\x3a\x3e\x8b\x36\x91\x23\x0b\xa3\xe1\x8a\x90\x9c\xee\x51\x63\x9d\xa2\x93\x0b\x3d\xef\x8d\xae\xcc\x26\x4d\x71\x3f\x25\x58\x5d\xa1\x66\x9d\x48\x75\x8f\x7d\x07\xf5\xd6\xc9\x96\x1f\xd4\x66\xbc\xd8\x0d\x0a\x18\xbf\xd9\x81\xb9\x42\xf8\xa1\xcf\xf1\x68\x3d\x38\xae\x0f\xcc\xc0\xdc\xc7\xab\x59\x47\xa2\x55\x4c\x55\x59\xc1\x10\xb5\xa5\xae\x65\xc5\x9a\xe9\xec\xf7\xb3\xa6\x3b\x93\x69\xbc\x2e\xd0\x91\x22\x91\xdc\xd4\xa5\x53\xd8\xef\xd3\x3a\x2a\x68\xde\xef\x68\xb4\xd1\x65\x18\x56\xd7\x65\x65\xae\x24\x15\xd3\x89\x28\x86\xdc\xb9\x32\x93\x60\x8d\x32\x54\x55\x89\xe3\x33\xe4\xa8\x03\x6c\xba\xca\xe6\x78\xed\x69\x53\x7c\xd3\x49\x7c\x49\x2b\xb7\x5b\x1e\xdf\x69\x81\xa7\xdb\xef\xd4\xda\x85\x09\xb4\x8b\x91\xbc\xa0\x0a\xc7\xe9\xbc\x2d\x85\x45\x4d\xb2\xa7\x03\x25\xc6\x3b\x88\x44\x51\x9b\x25\xfd\x11\xa6\x43\xa3\x56\x08\x46\xda\xaf\xa5\xed\x62\x9a\x0c\xf7\xa2\x19\xd4\xca\xe0\x14\xd0\xa9\x11\xe8\xd2\xe8\x78\xd0\x7c\x61\x19\x29\x1c\x2b\x1c\x6a\xce\x2c\x64\x7d\xc4\x24\x38\x24\x37\x0d\xa4\x69\x23\x37\x76\x8c\x17\x6b\xbe\xbe\xb4\x09\xd3\x21\x0f\x29\x3e\xdb\xf4\xe5\xee\xfb\x88\x9f\x59\x53\xd9\xa9\xb4\x80\x13\x32\xde\xde\x2b\x22\x3b\x1f\x8c\xbc\xce\x69\x37\xa7\xcc\xf5\x41\x0f\xa4\xc8\xc5\xf3\xa1\x8f\x34\xb7\xda\xeb\xc5\xc8\x38\xd0\xdd\x7d\x40\x27\x04\x69\x18\xa2\x16\x8e\xca\xb0\x94\xf9\xa5\x92\x4a\xf3\x02\xeb\x4b\x87\x52\x26\x2a\x7c\x81\xeb\x4c\x11\x35\x51\x00\x59\x4b\x3e\x4c\x5d\x01\x2a\x51\x7d\xcc\xe3\x69\x21\x98\x15\x71\xca\x42\x96\x9c\x32\xde\x09\x1e\x2a\x5e\x92\xd8\x13\x1d\x20\xb5\xa6\xe6\xa5\xbf\x29\xf7\x9d\x7e\x00\x63\x9e\xb7\xf8\xed\xc9\x21\x0a\x91\x87\x6c\xd3\xa3\xd5\xe5\xd6\x30\x65\x4b\x08\xcc\x53\xed\xc2\x39\xab\x10\x02\xc9\xda\x9a\xca\x96\x41\x38\xed\x6d\x32\x95\x25\x49\xc1\x87\x42\x90\x96\xa4\x37\x34\x20\x5e\xd2\x11\x5e\x20\x41\x9e\xf7\xe8\xd2\xa5\xa6\x23\x3b\x13\xca\xc1\x71\x09\x8d\x72\xb4\x42\x6c\x3c\x40\x6f\x25\xe4\x22\x71\xa3\x06\x25\xde\x21\xfa\x94\x22\x25\x6a\x05\x13\x54\xb3\x3d\x2d\xc2\x7a\xca\x4a\x1f\x46\x94\x84\xcf\x58\x9e\xe0\x05\xb5\xcf\xce\x7a\x6b\x92\x3d\x2e\xac\x70\x1b\xcf\xd5\xd3\x6c\xaf\xd2\xab\xa3\xbb\x74\xba\x18\x16\x56\xbd\x64\x3d\xef\xc7\xdc\xdc\xe2\x28\x89\xb2\x0d\xe4\xe2\x1b\xde\x4f\xd5\xb9\xad\xf0\x5e\xd5\x25\xaa\x81\xd3\xbe\x8b\x54\x8d\xc5\x25\x3b\x6f\xf2\xa1\x23\xff\x4d\x0f\x8a\x07\x00\x9e\x53\x2b\xcf\xe1\x09\x9c\x4f\x91\x8b\xc2\x17\x80\x67\xd5\x6b\x1b\xcf\x2c\xd7\x8d\xd2\x00\x9c\x41\x62\xe5\x41\x94\xbe\x00\x02\xff\x4c\xfe\x11\x7a\x96\xeb\xe5\xe0\xfc\x00\x00\x00\xf7\xea\x2f\xe0\x0f\x1c\xc7\x5f\x1f\x00\x68\x51\x31\x0c\xe0\x0d\x13\x7a\x51\x10\xa2\x17\xd0\xed\x67\xd5\x6b\x1b\xb9\x57\xbd\x46\x5a\xd2\xf6\xc1\x15\x39\x30\xbd\x2d\xbb\x8a\x22\x06\x77\xc8\x18\x2b\x50\x1d\x7b\x93\xcb\x10\x45\x28\xf6\x26\xe7\x33\x78\x5e\x5a\x28\x04\x1f\x1f\x63\xec\x1a\x7a\x18\x63\x17\x85\x93\x87\xb1\x0d\xdd\xba\xc5\xba\xd1\x11\x44\xee\x8f\xc7\xab\xf2\x47\xe0\xc4\x56\x51\xfc\x78\xcc\xe1\xe9\x71\xd2\x52\xb5\x88\x5b\xd4\x81\xf1\x53\x55\x3c\x75\x6f\xa9\x2f\xcb\x2f\x5b\xfa\xb9\xb8\x55\xdb\x46\x26\xff\x4a\xed\x22\x7b\x1d\x63\x6e\x74\xbc\x95\xfb\x1c\xde\x07\x76\x8e\xfd\x94\xf2\x9d\x88\xe8\xfe\x42\x44\x66\xa5\x5e\x0c\xda\xeb\x93\xeb\xf9\x56\x19\xa3\xef\x7a\xbe\xe2\x9e\x2e\xfb\x8a\xd2\xe0\x27\x02\x80\x71\x81\x72\x98\x06\x13\x31\x75\xbd\x0a\x40\x1f\x7c\x33\xea\x96\xfc\xac\x77\x17\x7e\xf1\xd5\xb2\x63\xef\xb3\xfc\x75\xd2\x5e\x9f\x0a\x94\x47\x99\xe7\x7e\x25\x41\xf9\x7d\x72\x99\xba\x9f\xeb\xae\x7d\xf5\xf8\x35\xfb\x5d\xf7\xfd\x5e\xb7\xa3\x7f\xdb\xb1\x95\xee\x7f\xe1\xe4\xa7\x42\xe4\xfe\x86\xe9\xd6\xa9\xff\x4b\x65\x81\x30\xf7\xfc\x1f\x8f\xe7\xf3\xf3\xd4\x72\xf6\x72\x94\xee\xc1\x7f\x40\x99\xc7\xb3\xc2\xb1\x32\xef\xe3\xe3\x71\xf2\xfc\x3c\xc6\xac\x3f\x61\x99\x7c\x8f\x8d\xb1\xaf\x3b\x3e\x9f\x41\x6e\xa5\x81\x07\x9e\xe5\xa8\x40\x97\xe3\xf2\xf1\xf1\x7f\xbc\xf9\x2b\x66\x9c\xcf\x97\x0f\x2e\x87\xc9\xac\x42\xe0\x79\x61\x25\xad\xd4\xbf\x6e\xcb\x6f\x6d\xb8\xdd\xfd\x2f\x1e\x80\x4b\xe5\x4b\xe2\xc2\xd2\xb6\xc5\x9f\xba\x71\x41\x1b\x51\x73\x45\xff\xce\x98\xf3\x19\x78\xa9\x7b\xf7\x62\x8c\xb5\xfd\xf3\xeb\x93\x31\xc6\xae\x87\x74\x8c\x85\x28\x89\x27\x0f\xff\x0d\x00\x00\xff\xff\xa6\x97\x1f\xa0\xc8\x9d\x01\x00") +var _dirIndexHtmlDirIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\xfc\xf7\xce\xe4\x48\x92\x27\x8a\xfe\xbf\x4f\x91\xd3\x83\x45\x77\x4f\x54\x16\x19\x94\xc1\xac\xdd\xbe\x43\xad\x83\x5a\x5e\x1c\x2c\xa8\xb5\xd6\x2c\xd4\xbb\x1f\x64\x96\xca\x9a\xee\x1e\xcc\x60\x0b\x38\xf5\x11\x1f\x82\xee\x6e\x66\x6e\xee\x6e\xf6\x33\x73\x3a\x23\xfe\xd7\xbf\x30\x1a\x6d\x07\x3a\xfb\xa1\x5c\xbb\xf6\x6f\xff\xe3\x7f\xfd\xfc\x91\x45\xe9\xdf\xfe\xc7\x87\x0f\xff\xab\xcb\xd6\xe8\x43\x52\x46\xf3\x92\xad\xff\xfb\x4f\xdb\x9a\x7f\x7c\xfd\xe9\x03\xf0\xa5\xe9\x5f\x3e\x7e\xfc\x50\x66\xed\x98\xcd\x1f\xd6\xe1\x43\x32\xf4\xcb\x3a\x6f\xc9\xfa\x61\x2d\xab\xe5\x43\xb5\x7c\x28\xb3\x39\xfb\xf4\xa1\x5c\xd7\x71\xf9\x04\x00\x45\xb5\x96\x5b\xfc\x6d\x32\x74\x40\x32\x5f\xe3\x5a\x9d\x40\x76\x8e\x40\xdc\x0e\x31\xd0\x45\xcb\x9a\xcd\x40\xd5\x15\xd9\x62\x0f\xb4\x65\x31\xd1\x1a\x01\xc9\xd0\xef\xd9\xbc\x7e\x5b\x0c\x1f\x3e\x7e\xfc\xd2\xe3\xb2\x5e\x6d\xf6\xf9\xee\xb3\x96\xdf\xe7\x43\xbf\x7e\xcc\xa3\xae\x6a\xaf\x4f\x4b\xd4\x2f\x1f\x97\x6c\xae\xf2\xef\x3e\x1e\x59\xdc\x54\xeb\xc7\x35\x3b\xd7\x8f\x4b\x75\x67\x1f\xa3\xb4\xde\x96\xf5\xd3\x13\x04\xff\xe7\x77\x1f\xbb\xe5\x1f\xb7\xfc\x10\x0f\xe9\xf5\x7d\x17\xcd\x45\xd5\x7f\x02\x7f\x88\xbe\x8f\xa3\xa4\x29\xe6\x61\xeb\xd3\x8f\xc9\xd0\x0e\xf3\xa7\x75\x8e\xfa\x65\x8c\xe6\xac\x5f\x7f\x88\x3e\x45\xc9\x5a\xed\xd9\x37\xd1\xa7\x72\xd8\xb3\xf9\xfb\x61\x5b\xdb\xaa\xcf\x3e\x81\x3f\x2c\xeb\x3c\xf4\xc5\x8f\xda\x1d\x59\x55\x94\xeb\x27\x1c\x04\x7f\x88\xb7\x75\x1d\xfa\x4f\x9f\x3e\x76\xc3\xfd\x31\x1f\x92\x6d\xf9\x58\xf5\x7d\x36\x7f\x53\xf5\xe3\xb6\xfe\x7d\xfd\xf7\x63\x94\xa6\x55\x5f\x7c\x02\xbf\x8b\x87\x39\xcd\xe6\x4f\xe0\x0f\x6b\x14\xb7\xd9\xf7\x3f\x16\x3f\x2e\x63\x94\x7c\xdd\xfe\x59\xcb\x36\x1a\x97\xec\xd3\xcf\x37\x3f\xac\xe9\xaf\x52\x7e\x00\xfe\xed\x5f\x3e\x58\xc3\x36\x27\xff\x78\x51\x4a\x34\x1e\x81\xcf\xf3\x8a\x7e\x8c\x87\xaa\xcd\xe6\xb1\x8d\xd6\xec\x37\xeb\xb3\xcc\x09\x90\x2c\x0b\xd0\x45\x55\xff\x6d\xb2\x2c\x1f\xfe\x0d\xf8\xf7\x2e\x4b\xab\xe8\xc3\x38\x57\xfd\xfa\xfd\xbf\x7d\xf3\x29\xca\xd7\x6c\xfe\xe6\x53\x9c\xe5\xc3\x9c\x7d\xff\xe3\xbc\xfd\x2b\x08\x82\xff\x52\x75\xe3\x30\xaf\x51\xbf\x7e\xf7\xe3\xec\x97\x51\x3a\x1c\x9f\xfa\xa1\xcf\xbe\x6a\xfa\x75\xca\x3f\x81\x1f\xbe\xe6\xf9\x79\x4d\xe3\xe1\xfc\x67\xac\xff\xac\xe5\x87\xe8\x9b\xe8\xd3\x5e\x2d\xd5\x9a\xa5\xdf\x7f\xe9\x3b\xcd\x92\x61\x8e\xd6\x6a\xe8\x3f\x6d\x7d\x9a\xcd\x9f\xd7\xed\x87\xe8\xff\x5f\xce\x59\xfe\xff\xfc\x38\x80\xef\x93\xa1\x5f\xb3\x7e\xfd\xf4\xa7\x0f\x7f\xf9\xd3\x87\x68\x5d\xe7\xbf\x7c\x6e\xfd\xeb\x87\x3f\xfd\xf5\x4f\x3f\xac\x9f\x97\xa6\xc8\x3e\xc6\x73\x16\x35\x1f\xab\x7e\xa9\xd2\xec\x53\xb4\x0f\x55\xfa\xc3\xb7\xbf\x59\xa0\xbf\x5b\x8f\xaf\x94\xfa\x91\xf2\xc3\x9a\xfe\xbd\x99\xfd\x6b\x9e\xe7\x5f\x51\xfe\xf0\xef\x3f\xd9\x79\x92\xfd\xc6\xe2\xff\xcc\xb7\xd7\x58\x56\x9f\xdd\xee\x83\x10\xb5\x79\x5b\xf5\xc5\xf2\xe7\xef\x96\x39\xf9\xb4\xcd\xed\x5f\xbe\xfd\x16\xf8\x4c\xbd\x00\xc5\x2f\x64\x1f\xcb\x9f\xc9\x3e\xce\x59\xb1\xb5\xd1\xfc\x6d\x36\xac\x7f\xfd\xef\xb3\xfc\xff\xfe\xb5\xca\xf2\xea\xfc\xeb\x87\x7c\x98\xbb\x68\xfd\xcb\x9f\xb3\x2e\xce\xd2\x34\x4b\x3f\x0e\x63\xd6\xaf\xd7\x98\xfd\xf9\xaf\xdf\xfc\xd7\x25\x1e\x43\x9e\x43\xbf\x0a\xfb\x52\xfc\x6f\x0b\xf8\x2d\xff\x7f\x8b\x7d\x5d\xbf\xe2\x5e\xe7\x2d\xfb\x6f\x8f\x60\xd9\x8b\x7f\xfd\x95\xe0\xff\xfc\x42\xf0\x53\xfb\xaf\xd2\x97\xbd\xf8\xf3\x5f\x7f\xf8\xb7\xef\x7f\x63\xcf\xd5\xfd\xd9\x41\x7f\x32\x9a\x78\x38\xbf\xfb\x02\x05\xff\xb8\xe9\x1f\xd6\xfe\xf0\x1f\xdc\xee\x77\x96\xfe\x2b\xd8\x7e\xc6\xcc\x4f\x4f\x70\x3c\x7f\x05\xd9\x68\xfc\x58\x56\x45\xd9\x7e\xc6\xb9\x9f\x0c\x78\x2e\xe2\xe8\x2f\xe0\x37\x5f\xae\xbf\xfe\x08\xab\x5f\x1b\xee\x9f\x84\xac\xdd\xb3\xb5\x4a\xa2\x0f\xef\x6c\xcb\xfe\xf4\xcd\x2f\xe5\x6f\xc8\xb9\x8a\xda\x6f\xbe\xc2\xf2\xaf\x7a\x45\xc6\xf3\xbb\xcf\x9e\xfa\xb1\xfc\x11\x53\x9f\xdf\x22\xd0\x0b\xc5\x9f\x08\xfc\xdd\x4f\x7e\x03\xc3\xf0\x77\xff\xd0\x9b\x7e\x88\xbe\xff\x85\x04\x8f\x62\xfc\xbb\xff\x08\x03\x9f\x11\xe3\x87\xe8\xd3\x17\xf4\xfd\x05\xd1\x7f\x62\x81\x60\x14\xc2\x93\xbf\x63\xf9\x0a\x39\x7e\xe4\xfb\x25\x02\xac\x65\xd5\x7f\x48\x87\x75\xcd\xd2\xef\x7e\xae\x43\xc7\xf3\x43\xb4\xad\xc3\x87\x9f\xe7\xed\x47\xa0\x9f\xab\xbe\xf8\x51\xcf\x9f\x29\x3f\x0e\x79\xbe\x64\xeb\xa7\x8f\xd0\x78\xfe\xf0\xed\x3c\x1c\x3f\x45\xa4\x8f\xf3\x97\x41\x7f\x7c\xa2\xe3\xf9\xdd\x4f\x55\x6d\x96\xff\x54\xf3\xc3\xb7\xc9\xd0\x7e\x3c\x97\x8f\x4f\xe8\x9b\x9f\x6f\xa1\xef\xc7\x61\xa9\xbe\xe8\x3a\x67\x6d\xf4\x39\x58\x7d\xd7\x55\xfd\x2f\xd3\x37\x9e\xdf\xfd\x14\x1b\x7e\x92\xfd\x45\xf4\xcf\x55\x5f\x64\xff\x73\xd1\x79\x3b\x44\xeb\xa7\xcf\x44\x5f\xb5\x7f\x7f\x54\xe9\x5a\xfe\x18\x4c\x7f\x25\xfd\xa9\x12\xfb\x16\xfb\xf1\x0f\xff\x9f\x3f\x87\xb1\xff\x2c\xbe\xfe\x84\xa4\xbf\x4a\xfc\xae\x8b\xce\x8f\xbf\x29\x7e\x99\x83\x78\x58\xd7\xa1\xfb\x04\x81\x9f\x35\xfd\xc2\xf3\xb7\xf5\xb3\xc5\xfd\x6d\x9d\xff\xf6\x55\xf4\x7b\xfd\x73\xe3\xf9\x9c\x62\x54\x49\xd4\x7e\x8c\xda\xaa\xe8\x3f\xad\xc3\xf8\x73\x3c\x5d\x87\xf1\xf3\x34\x7d\x58\x86\xb6\x4a\x3f\xfc\x6b\x9a\xfe\x0c\xf0\x1f\x97\x75\xae\xc6\x2c\xfd\xa5\xab\x4f\xfd\x5a\x7e\x1c\xf2\x8f\x9f\x81\xe3\x2f\x43\x9a\xfe\xf5\x1f\xa1\x3a\xf1\xf9\xfa\xe1\xdb\xcf\x50\xf0\xf1\x73\x7c\x99\x87\xf6\xa7\xa8\x3f\xb6\x51\x92\x95\x43\x9b\xfe\x6a\x75\x04\x41\x7c\x37\x7c\x0e\xf0\xeb\xf5\xe9\xf9\x1f\x98\x3e\xa7\x30\x5f\x92\x86\x7f\xc2\xf8\xc3\xb7\x63\xd4\x67\xed\xf7\x7f\x3f\x45\xff\xd8\x3d\x7e\xce\x2f\x7e\x1d\xeb\x57\x2b\xf1\xf3\x64\xcc\x51\x5a\x6d\xcb\x27\xe4\x2b\xdf\xff\x2a\xe4\x82\x1f\x3e\x33\x7f\xfe\xff\xca\xf9\xbf\x05\xd1\xbf\x7e\xf7\x5f\x21\xfa\x49\xe1\x8f\x9f\x93\xce\xaa\x2f\x7e\x59\xb5\xcf\x48\xf3\xe1\x8b\x59\xfe\x82\x46\x5f\x86\xf2\x9f\x2a\xba\x0e\xe3\x17\xeb\xfd\x59\x63\xf8\x57\xf6\xcf\x4d\x5f\x6c\xfd\xab\xb6\x9f\xfa\xfe\xdb\x4f\x06\xf7\xdb\x39\x03\x7f\xdb\xfa\xa9\x8d\x96\xf5\x63\x52\x56\x6d\xfa\xfd\x6f\x34\xfa\x3b\xa9\xbf\x55\xf8\x3f\xea\xf3\x4f\xa5\xfe\x68\x50\xbf\xa9\x98\xff\xbf\xee\xf4\xc3\x9a\x7e\xca\xab\xf9\x9f\xe8\xf0\x3b\x76\xf2\x5f\x1e\xe7\x6f\x3b\xf9\x49\xf2\x57\x2a\x7e\x16\xfd\x55\xf1\x4b\x92\xf5\xab\x47\xff\xbc\xa6\x1f\xd3\x2c\x8f\xb6\x76\xfd\x2a\x5b\xfb\xec\x0f\x5f\xbc\xfc\x37\x04\x7f\xfb\x0f\xd6\xf9\x9f\x47\x1b\xf4\xf3\xf5\xdd\x3f\x90\x39\x0f\xc7\x4f\x61\xfa\xcb\xed\x4f\xa1\x3a\xad\x96\xb1\x8d\xae\x4f\x5f\x86\xf2\xdd\xaf\x69\xe7\x9f\xbe\x62\xf8\x3e\x69\xb3\x68\xfe\x14\x0f\x6b\xf9\xc3\xbf\x7f\x76\xfe\xbd\xca\x8e\xcf\xe9\xe1\x4f\xf0\x98\x66\x7b\x95\x64\x3f\x82\xe3\x0f\xdf\x56\x63\xbe\x7c\xfc\x3f\x71\x1b\xf5\xcd\xd7\x28\x54\x75\x51\x91\x7d\x49\xf3\xfe\x9c\x46\x6b\xf4\xe9\x4b\x19\x18\xfb\xe2\xbb\x38\x5a\x32\x0c\xf9\xa6\x72\x29\xcd\x3c\x40\x99\x2f\x06\x92\x24\xc9\xb7\xe5\x94\xac\x53\x90\x24\x49\x7d\x2e\x92\x06\x4d\x06\x9f\x3f\xf3\x17\x40\x94\x9f\x6f\x78\xdf\xe4\x3c\xc1\xb4\x63\x28\x04\x53\x88\xbb\x42\x83\xa2\x42\x9e\xa8\x42\x8b\x92\x62\x8f\xeb\x43\x57\x6a\x03\xcf\x44\x93\xa4\x6d\xf5\xcf\x0c\x1e\x25\x99\x2c\xe7\x64\xef\x89\x75\xea\xa7\x72\xb2\xa4\xd1\xa7\x4f\xd5\x25\x91\xf6\x12\x59\xef\xc4\x1c\x51\x66\x79\x87\x3d\xf9\x25\xa6\xe1\x55\xc9\x0f\x09\x28\x6d\xa0\xc0\xdd\x96\xee\xb7\x78\x3a\x7d\xea\x28\x00\x03\x29\x0d\x1d\x50\x4a\x59\x41\xfb\x70\xa3\x96\x7d\xe3\x73\x0f\x55\xf9\x6b\xbb\x55\xbc\xbe\xd3\xdd\xdd\x4c\x94\x29\x82\x3e\x7c\xe4\x04\x11\x55\xb8\xbb\xa2\x2b\x21\x13\x5b\xbf\x21\x82\x72\x64\x22\x3c\x79\xc1\x29\x62\x3a\x33\x2c\xe9\x05\xe6\x65\xd2\xaf\xa7\x86\x20\x74\xa2\x51\xb7\x4e\xe2\x5d\xce\x5e\x9b\x70\xe4\x78\xbf\x1a\x0d\x52\x27\xfd\x75\x68\xa7\xd8\xe6\xa7\x46\xbf\x83\x48\x71\x8b\x18\x4b\xfc\xb8\xb1\xd3\x52\xf2\x27\xc8\x12\xdb\xb7\x4a\x83\xa7\x38\x95\x42\x72\x33\x71\xf5\xd2\xdc\x7b\x54\x2c\x27\x02\xbd\x2c\x36\xf3\xae\x2a\x14\x61\xaa\x9f\x6c\xa2\x87\xfd\x91\xe3\x45\xcc\x88\x73\xe0\x9a\x17\x5b\xf5\xdb\x5c\x63\xb5\x4d\x09\x97\x88\x8f\x93\x3b\x73\xc6\xc4\xc6\x2b\x66\xb3\x5d\x48\xec\xcf\xb7\x49\x4a\x6f\xfa\x79\xda\xc1\x29\x1a\x25\xa0\x76\xa6\xd3\x76\x9c\xc1\xc2\x93\xa7\x79\xcf\x7e\xa2\x20\xdb\x6b\x9e\x00\xbc\x16\x92\x0b\x1e\x91\xbb\x37\x9c\xc8\x66\x61\x2c\x4c\x08\xdb\x5e\xf2\x4d\x76\xac\xaf\x9d\x58\xd1\xb3\xae\xb4\x79\xd4\xdd\x35\xa6\x44\x99\x7a\xc0\x87\x14\xb3\xb8\x91\xd6\x8e\x56\xe1\x4a\x2c\x74\xb9\x11\x99\x01\x60\x73\x02\x70\x74\x53\xa6\x06\xba\x4b\xac\x72\x21\x0b\xd3\x8c\x15\xca\x47\x16\xe6\x81\xe8\x16\x0f\x26\xc4\x76\xbc\x24\x78\xc6\xd5\x8e\x50\x3f\x00\x7d\x38\xe5\x0d\xc8\xc9\xe2\x20\x95\x98\x21\xfd\x1c\x67\x52\xa3\xf9\x62\x28\x96\xe3\x6a\xa6\x8c\xd2\x81\x28\xfe\xef\x3f\xff\xf5\x6b\x17\x99\xb3\x31\x8b\xd6\x4f\xfd\xf0\xd3\xdd\xd7\x6d\x5f\x72\xbc\xcf\xe6\x1f\x55\xfd\xcf\x36\xfc\x79\x97\xf5\xc7\x32\xe1\xae\xfc\xc9\x84\xc7\xc5\xb9\xd7\x1d\x7c\x92\x81\x9e\xa7\xa5\x76\x01\xbe\x1d\xbe\x40\xd7\x7d\xba\x03\x3d\xb5\x24\x74\x1b\x93\x53\x1c\x2a\xcb\xce\x1e\x45\x2a\x3b\xc2\x4b\x4c\xce\x32\x9d\xc6\x0a\x0b\x67\x4f\x2e\x6d\xb3\x27\x59\x55\x96\x08\x19\xac\x2c\xc9\xac\xe5\x72\x1c\xe5\x0d\x20\x62\xb3\x96\x79\xe7\x17\x94\xe0\x4a\x00\x34\xca\x9a\x43\xe9\xeb\x81\xa2\xe8\xbd\xab\xc4\x3b\x12\x9f\xc3\x1c\xa1\xcb\x1e\x5f\x84\xd6\xc7\x0e\x4b\x9d\x05\xd3\x8a\x72\xe5\xd5\xbe\x91\x29\xd7\x93\x00\xfc\x27\xbe\xb0\x6b\xa2\x07\xd0\xbc\x0a\x16\x81\x01\xc2\x06\x9a\xbb\xef\x2b\xf7\x23\x71\x6e\xf5\x85\xdf\x56\xb9\x88\x10\xc1\x8c\x02\x1d\xac\x08\x8b\x51\xc3\x89\x88\xe1\x6d\xf7\x31\x73\xe2\x2e\x8e\xf0\x75\xa9\x59\xf9\x51\xb0\xa0\x00\x61\xf0\x4b\x26\x4a\xf0\x45\xc2\x95\xc0\xbb\x71\x6d\x1f\x78\x81\x05\x1d\x79\x1d\x00\x55\x64\x89\xf0\xe6\x79\xa9\xde\x73\xa3\x14\xf3\x2e\x17\x39\x86\xf4\xa5\xb1\xde\xb6\xa2\xc2\xd3\x5a\xe4\x5c\x11\xd1\xc1\xb1\x4d\xd6\x42\x32\xc0\xb3\xe7\x32\x34\xd3\x34\x10\xd2\x0e\x76\x84\xdc\xa6\xb4\xe8\x9e\x7e\x79\x1a\x9d\x4e\xc5\xd1\xdf\xdc\x89\x00\xe2\x35\x8e\x87\xe9\xbe\x1f\x7e\xe0\x2f\x59\x32\x85\xe4\x73\xa4\x90\x57\xd6\x90\xfd\x41\x00\x08\x1f\x9e\xb0\x02\x22\x6f\x80\x1f\xec\x83\xad\x7d\x24\x79\x0b\xe8\xde\xea\x79\xbd\x92\x62\x30\xbe\x12\x6f\x36\xb6\xf5\x9c\x69\x54\x1d\x52\xd8\x5d\x7c\xd7\x56\x39\x6b\x5a\x23\xf6\x51\xb4\x44\x5a\x46\xce\xc9\x42\xab\x1f\x56\x1c\xde\x07\x55\x15\xad\x12\xbc\xa3\xcb\xcb\x04\x9e\x97\x46\xbf\x15\x6d\x3b\xea\x86\x55\x2a\x3b\xee\x68\x22\x95\x84\x51\x8c\x78\xd2\x5a\x98\x66\xe0\x0c\x5e\x32\x0e\xc1\x53\x13\xc1\x93\x02\xad\x73\xea\xa7\x56\xef\xc6\xb0\x6e\xd7\xba\xa2\xbd\xa0\x2a\x2c\xdf\xd0\xd7\x89\x19\x0e\xfc\x42\xea\xa3\x71\xc8\x14\x5a\x4e\x29\xb6\x00\xc3\x2a\xc3\xb5\x00\x5e\xb3\x70\xdf\x86\x76\x5b\x11\x57\x9e\xc6\x4c\x62\x41\x61\xa8\x86\x30\xd4\xb4\xd3\x16\x3d\x4d\x92\xbb\xcc\x51\x83\xef\x47\x42\x4e\xce\x16\x1d\x32\x2c\x58\x5c\x9e\x54\x70\xa2\xdc\xed\x0e\x27\x6b\x88\xea\xbc\xc5\x06\x8a\x90\x47\xa9\x31\x2b\xe3\xb8\x9b\x04\x48\x38\x0c\x91\xb2\x85\x85\xab\xd8\xa5\xf6\x45\x1a\x06\x05\xc7\xe1\xfb\xd5\x12\x2b\x8e\x8a\x5c\x09\x4a\xaa\x93\xba\xf2\x32\x94\x8b\xa3\x4f\x66\xd1\x37\x11\xb8\x06\x45\x51\x04\x23\x2d\x34\x32\x6f\x2f\x82\x88\xbe\x35\x75\xa8\x29\xa4\xb2\x45\x9a\xce\xc6\xdd\x47\x61\x52\x64\x73\x63\x8d\x9e\x95\x43\x77\x83\x5d\x51\x5d\xca\xce\x15\x64\x16\x69\x2a\x73\xe5\x26\x0d\x53\x0c\x44\x39\x70\x1d\x40\x0a\xdf\xf6\x5b\xc5\x9c\x26\xd2\xf2\x6a\xc1\xa0\xc8\x29\xd2\x94\x8c\xfb\xfb\x31\xfb\x9b\x1e\x3c\xdc\xfe\xae\x57\x02\xa0\x6f\x92\x8c\x3b\xa5\xa6\xe7\x9c\xaa\xcc\xe2\xf7\x85\x88\x28\x4a\xfe\x58\x00\xd1\xff\x02\x10\xa0\xd3\x3c\x75\x16\x64\x83\x7c\x9d\x37\xb7\xdd\x49\xa7\x29\x5d\x56\x1f\xa8\x64\x61\x07\xc5\x94\xa8\x00\x7c\xaa\xba\x50\xd3\x0b\x9c\xec\x43\x91\xd8\x00\x32\x49\xd2\x1b\x7d\xef\x42\x39\x0c\x65\xa2\xf5\xfa\x81\x04\x2c\x2f\x36\x74\xf9\x18\x14\x9e\x92\x3b\x38\xc4\xfb\x10\x4e\xbb\x0c\xda\x6b\xad\xb4\x93\xba\x92\xa4\x3d\xbc\xf5\x5d\x53\x5f\x80\xc0\x43\x13\x0c\xa1\xcc\x0c\x37\xca\x88\x07\xcf\x2a\x1e\xc5\xb3\x5e\x10\xb9\x34\xa8\x30\xdf\x5d\x6c\xc1\x65\xd4\x8d\xc1\xb8\xce\x86\x1c\x0d\xdb\x84\xbf\x16\xfd\x19\xa1\xcf\xae\xca\x35\xe6\x8a\xf7\x9b\x7d\x75\x37\x1d\xcf\xe4\x60\x33\xa2\x5d\xaa\x03\xef\x87\x55\x88\x04\x56\xb5\xcd\xf9\x23\x7c\xfa\xd9\x46\x4f\x12\xae\xd5\x8f\x45\x86\x6b\x23\x79\x93\x5d\xf1\x3a\x1b\xde\xc0\x9f\x5d\x90\xd5\x09\x49\x21\xc4\x3e\x76\xd9\x76\x4b\x49\xd2\x82\x8f\xd4\xa9\x31\x59\x24\xf7\x5c\xa0\xf5\x02\x7e\x3f\x36\x72\x47\xf6\x82\xa0\xb4\x33\xa1\xbb\x9c\xbd\x37\x1d\x28\xb2\x7e\xec\xb2\xa9\x64\xd5\x62\x4b\xb3\x27\x28\x1d\xdd\x83\xd9\x1c\xf1\x72\x52\xbb\x9d\x36\x28\xbe\x06\x35\xf7\x81\xd4\xcc\xe6\x8e\xca\xd8\x53\x58\xec\xca\x7b\x57\xf0\xa3\x55\xc7\xdb\x3c\x98\xa6\x7a\xdd\x27\x2d\x92\x76\x77\xc7\xd9\x9e\x77\x74\xbb\x35\x95\x8e\xbe\xb9\x52\x2a\x8e\xa6\xce\x4c\x3b\x53\xac\x32\xd5\x06\x57\x9a\x7a\xb2\x38\x9a\x82\x26\x43\xec\xe1\xa4\x0a\x4d\xac\x47\x6d\x84\xaf\x31\xbd\xab\x81\x6b\x42\x4a\x08\xe0\x09\xa3\xe0\x16\x49\x25\x96\x65\x75\x8d\xce\x18\x24\x09\x5c\x01\xf7\x97\xfc\x89\x72\x0f\x4e\xec\x68\x1c\x47\xc5\x37\x29\x51\x92\xd5\xb8\x83\x37\x80\x46\x40\x04\x53\x51\x99\x48\x18\xde\x66\xc4\x53\x4d\x7a\xc8\x70\xcc\x9d\xbc\x62\x86\x4e\x4e\xc1\x66\x07\x9d\xc8\x49\xd0\xfc\xba\x38\xa7\x40\x18\x41\x23\x8b\x34\xc3\x6d\xca\x29\x93\xc3\xcd\x87\x47\x6a\x4f\x94\xb9\x40\x5c\xac\xb4\x7e\x5c\xe9\x29\x4b\xab\xb4\x10\xa5\x35\x40\x46\x8c\x1f\xbe\xb9\x29\x4b\x69\x71\xef\xcd\xc4\x42\x9c\xd1\x1c\xf0\x47\x49\xa3\xb7\xd3\x1d\x2f\x6d\xcc\x88\xc3\xe1\xaa\x7e\x1f\xbb\x10\x7f\xcb\x2b\x64\xda\x1d\x85\x94\x72\x38\x60\xfd\x6b\xd2\x11\x6d\x7a\x0a\x54\x23\xb7\x6e\x40\x1a\xd4\xec\xb4\x77\x45\x81\xbe\x61\x55\x39\x12\x74\x46\xd9\x2c\xc5\x5b\x94\x1a\xa2\x8a\x94\x52\x8f\x5c\x22\x06\x9c\xee\xb1\x49\x16\x9d\xde\x17\x13\xf3\xa1\x61\x5a\xcd\x5e\x0f\x8f\x1e\x91\xde\xe7\x16\xf3\x8e\xb5\xd0\xf5\x23\xa4\x47\x8d\x09\xea\x86\x57\xc9\x37\x03\x35\x78\x76\x3a\x4b\x5e\x36\x74\xfa\x80\x88\xab\xd8\xa8\xd7\xcb\x6b\x71\xce\x03\x06\x6c\xb5\x71\xa0\x48\xfc\x89\x2c\xf8\x1d\x2f\xcb\xf3\xa9\x78\x54\x35\x67\x82\xdb\xe3\x44\xa0\x63\x74\x69\xc0\x7d\x1d\x03\x19\xd7\xe6\xde\xc4\x4f\x36\x2c\xc0\x61\xcb\x8b\x25\x2f\x42\x15\xe4\x68\x80\x03\x1c\xcd\x41\x92\xdd\x10\xb5\xc9\xd9\xbe\xc9\xe7\x17\xef\x64\x5b\xce\x6e\xac\xcd\xe8\x68\xfa\xff\x0e\x34\xaa\x3f\x16\x66\x34\xe8\xaf\x49\x05\xf8\xdc\xd9\x96\x75\x74\x5b\xbf\xc3\x89\x22\x8d\xc8\xe2\x8c\x4a\x0a\x9c\xae\x95\x83\x72\xb0\x39\xe4\xa9\xc0\x76\xbc\x01\x06\xf0\x20\xf7\xc5\x87\xa9\x11\x28\xf4\x65\xf3\x94\x79\xba\x26\x03\xb7\x9d\x53\x5d\xc9\x9d\x7b\xae\x01\x3f\xf8\xc7\xfb\xc0\x8f\x1d\xbf\x8f\xa0\x58\x65\x1f\x56\x0e\x18\x27\x50\x1c\x1d\xd1\x1b\xc7\x35\xf0\x39\x94\xde\x03\x60\xdc\xf2\x75\xd7\x78\x14\xc8\x65\xde\xf2\x29\x4f\x84\x0b\x7f\x28\xef\x2b\xcd\xf3\xc2\xcd\xe7\x27\x11\x08\xfb\xc2\x46\x8f\x70\x03\xfa\xb3\x4f\x87\x18\xb5\x56\x43\x7e\xa4\xd7\xbd\x87\xf7\x75\x00\x85\xdc\x76\x6a\x8d\x8b\x57\xc1\xa9\x8f\x73\x7f\x27\x51\x3f\x22\xc0\x8a\xa6\xe4\xd0\xf9\x02\x75\x41\x8e\x43\x69\x1a\xa4\x92\x2d\x40\x11\x40\xa2\xc7\x98\xee\x28\xdb\x20\x9c\xa0\xa7\x82\x19\xcc\xef\xa3\xa3\x9d\x0c\x7c\x84\xa4\xe4\x6d\x6b\x38\x05\x4e\xd0\x4d\xa3\x55\xa0\x9a\x5a\x08\x70\x60\x68\xb1\x82\x12\x1e\x08\x6c\x6d\x3b\xce\x97\x09\x0b\x59\xd1\xc8\xec\x54\x79\x94\xc5\xbb\x88\x09\xef\x06\xbe\x88\xa5\x95\xd8\x21\x67\x8f\xc2\x09\x93\xd0\x13\xa5\xd0\xa5\xdd\xdc\x00\xf0\x3c\xb5\xc0\x1f\xa4\x4d\x01\x6d\xa2\x2c\xf2\x68\x0f\xbd\x70\x33\x0f\x4d\xe5\xd8\xcd\xbe\x5f\x55\xd3\xac\x84\x7c\xac\x44\x20\x85\x14\xfc\x4a\x46\x2a\x1d\x0c\x32\x94\x52\x65\xa7\x79\xea\xca\x07\x9d\xc2\xfc\xb4\x21\xc0\x31\xb8\x30\xbf\x80\x13\x80\x89\xbc\x83\x9c\x0b\x90\x60\x22\x1e\x6d\xe9\xc5\xe1\xde\xe0\x98\x34\x21\x39\xd4\x29\xfd\xea\x90\x68\xa3\xa6\x88\x54\x36\xab\xc8\x6e\xdc\xa5\x9e\xe6\xca\x58\x8e\xa7\x19\xbb\x13\x51\x0a\xe7\xdc\x12\xa5\x4a\x10\x73\x74\x7a\x91\x3e\xa5\xa3\x03\xbd\xc1\x2a\xa4\xbc\x66\xf6\xd9\x96\xcf\xf5\x20\xc5\x8b\x6d\x48\xcd\x40\x4b\x07\x00\xc2\xb4\x40\xb7\xe1\x60\x5a\xe7\xad\xf6\x47\xa8\x78\xe0\x62\x6d\xce\x46\xd2\x41\x79\x18\xe6\xc1\xed\xd2\xb9\x8d\x74\xcd\x06\x8e\x93\x24\x5a\x33\x44\x72\x97\x6a\x6d\xd8\x07\x4f\xbb\x29\xc8\xc4\x27\xcb\xb3\xd4\x0e\x65\x61\x16\x61\x78\xc3\x1b\xa2\xa1\x92\xcd\xe4\x2e\x2d\x60\x22\xd1\xe7\xb5\x98\xc2\x85\x58\x58\x0e\x69\x73\x52\x03\x94\x6e\xb6\xf3\xab\xa6\x1e\x16\xe8\x1f\x06\x4c\xde\x14\xc0\xcd\xad\x5c\xbc\x0c\x08\x17\xa1\x3a\xda\xdd\x21\x9c\xb9\xe2\x60\x90\xc9\xad\x46\x92\xbd\xd4\xb6\x8f\x38\x72\xbe\xa3\x1a\x60\x40\xa6\x52\xfd\x56\x22\x39\xe3\x92\xa1\xf9\x95\xf7\xaa\x6a\x86\x23\xd2\x1a\x4f\x35\xb2\x14\x74\x75\x80\x67\x33\x91\x8d\x4a\x97\xd0\x1a\x88\x0f\xfc\xd1\x94\x38\x98\xd4\x7a\x3c\x23\x31\x1b\xa2\xcf\x3a\x9c\x5f\xb6\xd4\x53\x84\x2e\xf9\xe3\x0d\xbb\x08\x49\x91\xba\x66\xb8\x52\x0f\x19\x18\xc8\xff\xce\xbe\x9f\xe7\x7f\x2c\xef\x1f\x7e\xc9\x18\x1a\x87\x58\x27\xf6\xc9\x3a\x7e\xd8\x85\x23\x0b\x47\x36\xa5\xc4\x12\xa7\xdb\x2b\xe7\x98\xab\x45\xaf\xe5\x8c\x3b\xf4\x25\xcb\x9c\x04\x10\x64\x0f\x0f\x05\x46\x16\xc0\xe0\xe7\x83\x53\xe3\x43\x41\x44\x0b\x4d\x05\xb2\x8d\x39\xa2\x2e\x44\xde\x3a\x4e\xf8\xdb\x81\xa2\x50\x46\x6f\xf4\x08\x89\xf3\x54\x47\xf5\x08\x99\x2d\x3b\x6e\x62\x9c\x67\x18\x0a\x2b\x0d\xc0\xe9\x77\xc4\x9c\xb0\xa6\xac\x58\xae\xd5\xd4\xc4\x17\x40\x24\x9b\xb4\x28\xf6\xe3\xeb\x21\xdf\xb9\x2c\xe0\xf9\x96\xf6\x2e\x87\xbe\x7a\xf6\x89\x65\xed\x03\xb8\x1c\xa8\xa3\x38\xcb\x0b\xe5\xd1\x93\x64\x37\x01\xb5\xc2\xa1\x06\x10\x92\x91\x37\xd3\x39\xd8\x80\xa3\xea\xf9\xf0\xd2\x8d\x10\x1d\x9f\xcb\x2a\x8d\x04\xc6\xfe\x79\x0a\x59\x10\x6d\x85\xcb\xa4\xf7\x18\x8f\xc4\x73\xe2\x5b\x52\xe6\xed\xf3\x95\xd2\x4f\x02\xf0\xc6\xb3\xac\xfb\xe5\xac\x01\xd3\x3c\x9a\x17\x5a\xf2\x12\x4d\xa4\x4f\x0d\xcb\xfb\xcc\x23\xb7\xe1\x5e\x99\xc0\xb2\x94\x8c\xd0\x6c\xcc\xda\x7c\x0a\x4a\x92\x13\x87\x43\x62\xdb\x9a\x83\x39\xf2\x76\x79\x16\xe0\x19\x8a\x01\x40\xa6\x00\xdf\x5f\x2b\xe0\xbb\x79\x7c\x05\xb3\xc5\x98\xec\x4b\x67\x4f\x81\xc2\x80\x17\x85\x19\x5b\x74\x8a\x87\x49\x71\xea\x0a\x56\x22\x59\xa9\xe7\x43\xa1\xaf\xe5\x55\xe7\xbc\xc4\x3a\x55\x03\x79\x63\xa8\x31\x90\x65\xe4\xc4\xc0\xac\xee\x64\x1c\xc3\x48\x93\x55\x80\x61\x9c\x05\x0c\x1d\x1c\xe3\x28\xed\x5a\x90\xda\x3a\x38\x29\x41\x5e\x25\x51\x74\x58\x87\x50\x2a\x6d\x66\xc3\x48\x21\x77\x70\xa4\x89\x3b\x34\x55\x47\x70\xfe\xce\xcf\x00\x0a\xd8\x81\x5e\x4d\xba\x26\xb2\x0e\xb6\xc7\x74\xc1\xb8\x51\x5a\x32\x9e\xa6\x4e\x0b\xe4\x8b\x80\xa7\xee\xe9\xc0\xa0\xf1\x85\x14\x7d\xd0\x93\x22\x44\x5b\xb1\x15\xeb\x25\x3b\x72\x64\xc4\x42\xb7\xc6\x44\x0e\xd9\x7a\xde\xc1\x0c\x16\xca\x94\x19\x3f\xc5\xde\xe8\xb2\x00\x48\x77\x13\x1d\x10\x53\xc3\x5e\xe2\x9b\x4a\xb2\x18\xda\x48\xc6\x7c\x1b\xaf\xd8\xf2\x48\xd7\xbd\x45\x4e\x1e\x3a\xda\xa8\xba\x07\xd8\x6e\x16\x72\xc9\x41\xbb\x08\xad\x79\x85\x03\xce\x2e\x16\x4b\x43\xb0\x8c\xee\xe4\xe2\x97\x80\x40\x40\x77\xd8\x6c\xe6\x7e\x66\x94\x85\xf6\xec\x09\x5d\x23\x24\x4f\xe5\xa9\x0f\x2e\x6a\x07\x16\xf0\xa2\xd7\x94\x1c\xaf\x56\x25\x96\xd0\x90\x65\xcb\xb8\xaf\xcc\xb4\x97\xcc\x74\x21\x63\x20\x6f\x31\x08\x5e\x75\x97\xa1\xcc\x9b\xc8\x45\x30\x35\x06\x47\xac\xc9\x37\x7f\xa5\x3a\xe1\xaa\xb8\x1e\x1e\xc4\x08\x90\x15\x35\xbe\x83\x39\x8d\x0f\x60\x05\x2f\x5b\x9a\xcc\x35\x75\x08\x67\xce\x25\xda\x51\x47\x4b\x12\x8b\xd8\xbb\x97\x20\x43\x9f\x54\xe2\x56\xc2\xad\x08\xd9\x44\x9b\x53\x19\x3e\x03\xff\xb9\x72\xc7\x3b\x0f\xa9\xd3\x22\x34\xf8\xed\x35\x64\x22\x4c\x26\x06\x62\x0d\xd0\x03\x70\x32\xc8\xe4\xe0\x02\x01\xbe\x1b\x80\x16\xd0\x61\xb6\xb7\x73\xb7\xc3\x09\xc8\x2f\x5c\x09\x62\x1b\x0c\xe4\x88\xac\x92\xd4\x6e\x79\x39\x23\x74\xb1\x0c\x7d\xd9\x7d\x50\x92\xe9\xa0\xec\xdc\x48\x45\x51\xfc\xef\xff\xcb\xed\xc7\xfe\x07\x4b\x25\xba\xe7\xaf\xa9\xc4\x6b\xdd\x40\x90\x74\x74\x3f\x4c\xde\x60\x7f\xdb\xe3\x04\xc9\x06\x3c\x92\x47\x23\x92\xbd\x27\x4c\xf4\x90\x65\x27\x15\x3f\x48\xe3\x41\x52\xe1\x8b\x84\x96\x07\x29\x36\x69\x07\x61\x98\xe1\x48\x22\xe7\xc9\x54\x23\x14\x4f\x79\x34\x85\x0a\x1d\x3a\x89\x6f\x62\x09\x8e\x79\xa1\x7e\x20\xea\x93\x35\x66\x7b\xb7\x2e\x5e\xd7\xb7\x2c\xcb\x92\xc7\xe3\xc9\x16\x06\x75\x0a\xe3\x03\x20\xba\xf8\xda\xe6\xca\x0c\xd3\xb3\x96\xa2\x4a\xa6\x18\xd8\x7b\x6c\xcf\xc7\x48\x44\x2f\x14\xeb\xa2\xf3\x51\x30\xda\x2b\x8b\xed\x87\x67\x43\x20\x7b\x57\xc4\x3b\xac\x80\x64\x9e\xa2\x74\xef\x21\xd5\xa0\x48\x3e\x1f\x69\x6d\x9c\xde\xf3\x06\x11\x30\xbe\x9f\xba\x38\x06\x98\xd6\xd7\x49\x72\xc2\xf6\x91\x34\x84\x4a\x55\x96\x03\xf6\x49\x2e\x54\xb3\xcf\x75\xa1\x0f\xab\x29\x71\x4c\xb4\x73\x54\xac\xfb\x06\xee\xc8\xc8\x85\x15\xdc\xf3\x98\xca\xd0\xcd\xb8\x36\xdd\x2d\xc6\x16\x0d\xfb\xe7\xf3\x8a\x15\x04\xa8\x80\xb6\x11\x69\xed\x40\xfb\xca\x30\x79\xc3\x2a\x87\x6a\x12\x31\x6a\x40\x60\x0f\xda\xe2\x57\x0f\x97\xe6\xaa\x84\x36\x5e\xd8\x57\xdf\x60\x45\x43\xfb\x44\x41\x6a\xe7\x48\xf6\x67\x29\x84\xcc\x41\x3f\x81\x48\x7c\xb2\x6e\x25\x0d\xed\x06\x18\xa5\x6c\xaa\x42\xf8\x74\x7c\x90\x9f\x9f\x8e\x25\xb2\x3d\xca\xe9\x9e\x70\x3d\x80\xc3\x1e\x9a\x66\x36\xb4\x09\xda\xa9\x48\x08\xa9\x37\x52\x76\x01\x21\x1d\xf9\x8c\x90\x3d\xb0\x66\x15\x4b\x21\x68\x18\x32\x07\x53\xa9\xe5\xc0\x9e\x36\xf8\x7e\x2c\x01\x43\x6f\x4e\xd3\x8c\xad\x22\xb6\xbe\x8e\x00\x3e\xeb\xa7\xc3\xc3\x74\xca\xb4\xa4\x2c\x2b\x77\x8e\xd5\xb5\x1d\xfe\xa5\x8a\x82\x4c\x18\xee\x24\xe2\x0c\xb0\x05\xd8\x3e\x43\xe3\xd1\xd1\xfa\xdc\xdc\x0f\xbb\x21\x8a\x83\x34\x3d\x83\xf0\xce\x71\x8c\xfd\xb0\x7c\xf7\xe3\xf1\xb8\x22\x84\x44\x85\xb0\xc2\x14\xa4\x15\xcd\x97\x77\xd1\x89\x82\x2d\x76\x58\x91\x5e\xed\x15\x64\x37\x9e\x4d\x8f\x3e\x9a\xc9\x8e\x3a\x19\xf3\x1a\xfa\xe8\x58\xb3\x53\x18\x65\xaf\x29\x50\x55\x88\xaa\xf1\x7c\x5d\xe1\xb6\xe1\x0e\xb4\x68\x84\x95\x97\x10\xbc\x31\x46\x48\x63\x0b\x48\x51\x3a\xb3\x5d\xaa\x4f\xa9\xfb\x85\x73\x34\xa5\x04\xcd\xdb\xbe\xc4\x9a\x32\xb2\xae\x17\xd9\xc5\x0a\xd0\x36\x98\xe5\xe7\xc3\x19\xbc\xc4\x1e\x14\xb5\x66\x05\xf2\x12\x0d\x88\xa2\x29\xeb\x04\xde\x6e\xf9\x08\x9d\x72\x9e\x3a\x76\xa2\xb2\xd8\x82\xbd\xab\x4c\x95\x02\xbc\x57\x60\x2b\xc8\x48\x6c\xda\xc5\xe2\x15\x81\x56\x22\xec\x66\x54\xbe\x0c\x21\xa1\xbe\xf8\xa5\x1f\x39\x7d\x7a\x0b\x7d\x00\xe5\x9d\xb0\xc3\x26\x6a\xa9\x57\x17\xc4\xa6\xb6\xdc\x96\x01\x99\x1a\x19\x10\x93\x50\x0d\xf9\xde\x9e\x56\x82\x9e\x8b\x2c\x4f\x53\x1f\xc0\x69\x65\xb2\x44\x89\xf8\x68\x0a\x8c\x77\x81\xb7\xbd\x8a\x54\xfb\x32\x1f\x24\x93\x11\x5e\x01\xd0\x86\x54\x70\xe4\xef\x0c\x14\x71\x37\xfe\xc1\x80\x22\xfc\xf5\x39\xc5\xe3\x39\x3b\x2d\x1b\x00\x4f\x78\x27\x02\x17\xdc\x27\xe8\x58\x57\x11\xa5\xd3\x51\x21\x22\x96\xa7\x42\x87\xd9\xc1\x34\xc7\xb0\x97\x88\xf5\x8f\x61\x06\x1d\x03\x30\xb7\x8d\x01\xd9\xc2\x65\xc8\x70\x5e\x64\x0e\x21\xcd\x67\x84\xd1\x9a\xec\xa1\x93\xbf\xfb\x59\x02\xe1\xfa\xe6\x66\x69\x04\xc7\x45\xc2\x61\xd9\x0b\xb8\x32\x14\x48\xf1\xbe\x52\xc3\xb2\x60\xcf\x5e\x26\xf2\xd8\x9e\x3b\x74\x8c\x29\x5e\x0d\x99\xa6\xa0\xaf\xe9\xe1\x5e\xa5\xed\x44\x36\xc6\x0e\x50\x28\x48\x99\xae\x7b\xbe\xe4\x9b\x65\x76\xc3\xd4\xf3\x3a\x3b\x15\x30\xd2\x64\xf5\x1d\x8b\x2e\x56\x17\xd1\x2f\x84\xde\x03\x38\x69\x2e\x24\x7b\x9e\x28\xd3\x2a\x74\xc4\xc7\xf1\x5d\xfb\x4c\x32\x6c\x0b\x8f\x6a\x46\x86\x0a\xba\x69\xd1\x86\x2e\x23\xfa\xb8\xb0\x2a\xe0\x0b\x88\xb7\x97\x16\xd2\x0f\xd9\x06\x4b\x87\xc0\xf3\x66\xe5\x28\xe5\xa2\x0e\x72\x68\x21\x22\xc8\xaf\xac\x48\x11\x5d\xe1\x28\x12\x4f\x82\x0f\x82\xd1\xa9\x91\xb2\xf1\x25\xcf\xf7\xfc\xe9\x01\x4a\x81\x69\x85\xb4\xe5\xc7\x8b\x06\x69\x93\x67\x7d\x2f\xba\x9d\xa3\xaa\x2e\xce\xa8\xc9\x57\xbc\xd4\xae\x5c\x47\xd2\x3d\xec\x2a\x03\x18\x68\x71\x5e\x52\xc9\x43\xc9\x7e\x65\x7e\x06\x25\xe4\x46\x32\xc6\x9b\xa7\x3a\x6a\x57\x22\x7e\xb3\x39\x33\x62\xf2\x12\x7e\xb6\x94\xed\x55\xc4\xb8\x75\x75\x2c\x83\x14\x22\x19\x5b\x0b\xef\x9a\x31\xaa\x2f\x29\x5d\x1a\x4d\x99\x53\x7a\x67\x12\xa6\x26\x97\x7a\x2d\x50\x5b\x6c\x86\x4a\x56\xa2\xa1\x51\xdf\x26\x94\xf4\x61\x3c\xbd\x49\xf5\x4a\x26\x1e\xf7\x63\x41\x36\xa1\x5c\xbd\x0f\x0d\x48\x97\xd3\x3a\x36\x90\xaa\x28\x69\x79\x2f\x3b\xa4\x1c\xa4\x44\x4a\xb4\x88\x6e\x27\x54\xf8\x41\x3c\xbd\xb3\x35\xb9\x51\x7d\xd0\x4c\xf1\x99\x30\x16\xd8\xbf\xc8\x93\xf7\x70\xf2\x71\xef\x6c\x40\xc9\x21\x14\xb6\xc9\xc2\xae\x92\x12\x67\xa9\x5a\x67\x3a\x15\xd1\xb6\xa1\x16\xe5\x89\xa0\x5b\x7b\x79\xcd\x7d\xaa\xae\x63\x40\xa6\x6a\x94\x4a\xce\x69\x4f\x2c\x20\x27\x7a\xae\x4e\xbd\xef\xb0\x6a\x92\x67\x33\x86\x3c\x08\x66\x73\x0e\x49\x9c\xb7\x35\x0b\x05\x01\x26\x33\x5e\x32\x17\x05\xc3\xaa\xdd\x5b\x9d\x23\x93\x8a\xbb\x20\x9b\xd8\x9a\x5a\x7d\x16\x0f\x72\xd1\x4b\xde\x6d\xe1\x7c\x13\x5b\x68\x15\x35\x0a\x0c\x22\xe2\x59\x34\x5a\x45\x74\x67\x49\x46\x2d\x98\x35\xc3\xdc\x3c\xab\x04\x68\x78\x85\xd2\x4c\xf5\xbc\x20\xf9\x39\x59\x84\xfb\x0c\x8d\xf8\x6d\x97\x62\x0d\xb1\x7c\xf9\x80\xd6\xe5\xd2\x7a\x2b\xaa\x5e\xf3\xd3\x39\xd5\xb7\x48\x51\x0f\xc5\xb4\x6d\x47\x99\x11\x27\x5d\x40\xf9\xb9\x3a\xc0\xa6\x29\xa7\x38\x77\xf1\xfb\x7e\xf9\xbe\x35\xf7\xa4\x65\x8d\x5b\xcc\x13\x79\x2c\x9b\x97\x5b\x3e\x7b\xe0\xb6\x0e\x88\x58\x89\x81\x7e\xc6\x08\xae\xe6\x87\x13\x90\xa4\xb3\x28\x95\x37\x23\x86\x23\xfd\xae\x7b\x92\x3f\xd8\x23\xcc\xe4\xfc\xf5\x98\xae\x79\xce\x5f\x1e\x61\x76\x61\xdf\x14\x83\x44\x47\xfc\x9b\xce\xca\x4d\xb2\xa3\xb6\x94\x42\xcb\x09\x29\x0c\x8b\x40\xe1\xf0\x17\x1d\x30\xfa\x07\xa7\x3e\x88\x47\xb9\x5e\xa0\xf2\x0e\xe8\x19\x12\x71\xc7\x55\x44\x0f\xe4\x12\xb0\x1c\x8d\xd1\xb2\x70\x0d\x57\x67\x8d\x50\x97\x71\xdb\x5d\xf7\x15\xa8\x7d\x03\xf4\x3d\x94\xa1\x27\xe8\x99\x26\xa7\xee\x3a\x70\x60\x9e\x75\xa3\x75\x5c\x01\xc4\xfb\xcc\x75\x8c\x80\xbd\x11\x66\x66\x89\xee\x55\x0f\x4d\xa1\x97\x8e\x47\x0f\x91\x7d\xa2\xed\x96\x9b\xaf\xe1\x19\xb2\xd6\x7a\xe8\x65\xe3\x09\x8b\x17\xcf\xe1\x23\x7b\xb3\xfa\xb9\x6c\x5b\xcc\x72\x58\x07\xda\xd4\x0e\x19\x48\x5b\xe9\x43\xee\x6f\xf7\x9e\x6d\xed\xba\x5a\x93\x07\x39\x87\xf0\xe0\xeb\x89\x06\xcb\x61\x1e\x2d\x05\xea\x6b\xe7\x45\x3c\xb8\x4b\x3d\xea\xd6\x6e\x4f\x4d\x52\xed\x88\x08\x0d\xe1\x66\x0c\xb1\x2e\x8e\x74\xe8\x88\x5b\xb9\x73\x5f\x4f\x70\xb4\x89\x7b\x8d\x5c\x0e\x4a\xb2\x5b\x1a\xf2\xe7\xc9\x30\x55\xe5\x2c\x2b\x04\x81\x98\x82\x42\x1c\x8e\x2a\x0b\x7d\xec\x60\x0a\x1d\x0b\x4a\x78\x3b\xce\x69\xc8\xa4\xb0\xbc\x46\x21\x87\x6d\x76\xe3\xd4\x6c\x55\x09\x51\x9e\x81\x0a\xea\x3c\xf5\xa0\x41\xab\xdf\x2c\xce\xe6\xa1\x40\xbe\xc6\xf1\x90\x03\x37\xe5\x35\xdc\xe6\xca\x9b\x9a\x78\x31\xeb\xdd\x4c\xa1\x9d\x35\x77\xcc\x82\x9d\xb7\xe4\x44\x59\x5a\x36\x59\x99\x72\x90\x14\xa6\xf0\xe7\x4b\x17\x6e\x2c\x11\x69\xde\x06\x9e\xc6\xf2\x9a\x46\x63\xe5\xb5\xf4\x2a\x57\x9e\x25\x4d\x8f\x31\xb8\xc9\x90\xac\x8c\x51\x88\xd7\x86\xb8\xb1\x12\xc9\x07\x21\x9a\xa4\xa4\x1f\xf5\x3a\x48\x7c\xeb\x92\x03\x63\xbc\x40\xf0\x91\x9b\x9c\x6d\x07\x7e\x52\xb7\x89\xff\x86\x8a\xc7\x63\x81\xb1\x11\x55\xee\xbb\xdd\xb3\x67\xc5\x9a\x5a\xf4\xa2\x78\xe1\xc9\xc6\xb3\x45\x66\xd3\x5c\x9f\xec\x54\x25\x82\xb1\xbe\x80\xc0\x62\x04\x75\x8c\xde\x0b\x7e\x48\xe4\x48\xec\x7b\x1e\x43\x2f\xbc\x4a\xe3\x81\x74\x1b\x93\x8c\xd0\x9c\x0a\x7c\x9d\x98\x4f\x0d\x51\x8b\x1c\x3c\x77\x5d\x4f\x85\x82\x64\xc9\x97\x36\xf0\x29\x02\x56\xcf\x1a\xfc\x7d\xcf\x04\x92\xf1\x0f\x16\x6b\x73\xe9\x57\x87\x5a\x08\x9d\x05\x59\x07\xe8\x42\xc8\x2b\xa6\xd1\xf7\x1f\x86\xc8\x70\x69\xd4\xba\x4b\x5b\xbe\xde\x2d\xa9\x19\x91\x26\x73\xe4\x91\xef\xc2\x7e\xd8\x00\xa7\xbe\x32\xc0\x01\x54\xad\xa7\xba\x23\xa9\x5f\x1e\x03\x92\x34\xcb\x17\xa5\xd8\xc4\x0e\x18\x47\x11\xbb\x96\x19\xac\xd9\x12\x18\x7a\x2e\x84\x4d\x30\x2e\x85\x2b\xf6\xca\x32\x20\x26\x70\x18\xbe\x78\xf2\x28\xd4\x58\x79\x42\x40\x7e\x3f\xa2\x3b\xee\x49\x3d\x80\xde\xf3\x8a\x87\xf9\x74\x13\x92\x3a\x07\xe1\x43\x42\x80\x0c\x1a\x35\xae\xae\x92\xca\xdc\xfd\xb6\x18\x51\xfe\x16\x86\xde\x6f\xa0\x01\xb3\x5e\x2e\xd6\x00\x76\x4d\xcd\x2a\x70\xf2\x24\xa2\x2a\x57\xa6\x59\x7a\xf8\xaa\x9b\x13\x67\x1e\xdb\x44\x3b\x30\xd9\x5d\xcf\x4b\x0c\xaa\x9b\x82\x31\xb2\xa5\xad\xe6\xc8\x6b\x8f\x31\x91\x6d\x43\xc0\x4b\x6d\x81\xe5\xe1\x1f\x75\xe6\xd9\xa5\x61\x20\x21\x66\xbc\xad\xde\x6a\x82\xab\x49\x18\x3f\x5a\x74\xa4\xed\xf2\x5d\x0b\x6d\x8b\x23\xa6\x97\xcd\x50\x2c\xa7\xc7\x6f\x34\xd6\x26\xba\x68\x69\x9a\x3e\x65\xd0\xde\xf7\xf0\x12\x5d\x84\x16\xcf\xb8\x18\xe9\x07\x52\x74\x80\xee\x74\x1c\x2d\xb2\xaf\x4a\xd2\x2f\x95\x05\xb2\x97\x32\xf4\x44\x8d\x08\xfb\x25\x04\x4a\x2d\x5b\x87\x49\x5b\xac\x53\xe4\xc4\xe3\x89\x76\x5c\x7c\xbe\x0c\x0b\xa3\x43\x49\xbd\x25\xc2\x6a\x29\xfa\xf0\xe1\x5c\x62\x14\x1e\xd1\x7d\xfc\x6a\x92\xa3\xe9\x8c\x4e\x5a\x47\xb6\xf4\x22\xbc\x78\xa6\xfb\xbb\xb5\x8e\xfa\xc8\xda\x2c\xbe\xf1\x95\xf4\x95\xa1\x2d\xc1\x11\xe0\xce\x8c\xc8\xd9\x59\x86\x3c\x86\xe3\xd9\x42\xae\xcf\xfc\x5d\x67\x85\x0f\xb6\x8c\x9d\x00\x65\xf6\xde\x38\x82\x00\x04\x9e\x5d\xda\x44\xf6\x8f\x6b\x88\x6e\xef\xcd\xa4\x2d\x3d\x63\x0f\x66\x90\x8a\x99\xba\x53\x11\xb4\x89\x39\xd0\xb0\xab\x80\xee\xe5\x56\xdb\x48\x56\x61\x66\x47\x35\xea\x8e\xb7\x2b\xdc\xee\xee\x49\x3d\x31\x07\x79\xdf\x37\x94\xc3\x09\xa7\x9d\x20\x3f\x3d\x21\x8e\x48\xee\x75\x64\xcf\x3e\x59\xa6\x60\x88\x84\xd1\x12\xe5\xf5\x04\x6f\x29\x75\x45\x6e\x14\x0c\x6c\xbc\x20\xa2\xdb\xde\xcd\x73\xb3\xdf\x2f\x88\x18\x00\xcc\x12\xd8\xbe\x7c\x81\x02\x17\xb1\xd8\xbb\xee\x94\xde\x3b\x1d\xe9\x7a\x2a\x97\xdd\xae\x14\xdc\xbc\x28\xaa\xa0\x32\x36\x33\xec\xca\x33\x97\xe6\xf7\x4e\x78\x93\x65\xf9\x63\x39\x61\xf3\xd5\xce\xb8\x59\x77\xa7\x65\x0d\x60\x43\x99\x81\x56\x5a\xc0\x24\x65\x59\x76\x76\xaf\x13\xcf\x3a\xe8\x57\x63\x4d\x36\x58\xd9\xbf\xbc\x7d\xe2\x2b\xeb\x13\x4b\x06\x8e\x86\xf4\x65\xa8\xd9\x48\x95\xc3\x95\x9e\xb8\xc8\x4e\xf9\xae\x8e\x2d\x90\xe6\x61\xea\x7a\xec\x59\x05\x6b\x1a\x65\xf1\xbe\xe5\xe0\xdb\xfd\xbe\x42\xfc\x75\xc3\xb7\xc9\x61\xbb\x89\x05\xbb\x7f\xdf\xfa\xac\x3a\xf4\x95\x63\xaf\x98\x22\x6e\xed\xe1\xe6\xa3\xa9\xf5\x68\xd9\x68\x69\xae\xeb\x3e\x00\xb5\x02\xd0\xe6\x95\x52\xa5\xf7\xea\xa3\xdd\x1b\xaa\x15\x9e\x07\x67\x59\x61\xdf\x22\xfb\x6a\x2b\x6f\x4c\xef\x43\xc7\x85\x7d\x92\xa6\xad\xee\xf6\x2d\xe5\x1c\x24\xe6\x82\x97\xd7\x3c\xb9\x70\xd1\xa8\x55\x1e\xc7\xf4\x15\xd0\xcc\x7b\xc3\x71\x3a\xcc\xf6\x14\x2e\xf2\x36\xb7\x1d\x2e\x71\x4a\x1d\xcc\x74\xa5\x8a\x2b\xd1\x24\xe6\xda\xa2\xc6\xe2\x20\xf3\x0c\x49\xdd\xc4\xc5\xd2\x72\xcd\x46\x44\x17\xd0\x6e\xb9\x5a\x3e\x50\xe6\x3b\xbb\x62\x76\x4e\xec\x17\xca\x05\x95\x00\xd0\x97\x4e\xe6\x38\x52\x68\x31\x0d\xed\x6a\x79\x2f\x95\x59\xea\xe5\x48\x63\x99\xe1\xa8\x0f\x96\x7c\x8e\xd2\x2d\x2a\x6c\x5f\x9b\xd6\x26\x2d\xf5\x86\xab\xd2\xb4\x38\xb4\x65\x66\x15\xc6\x8c\xf0\xe5\x4f\x49\xca\xb7\x42\x08\xcc\x8a\x1e\xdd\x86\xc7\xd3\xfd\xeb\x81\x05\x1e\x32\x92\x0d\xeb\x81\x56\x7d\x3b\x77\xd4\x7b\x2d\x1d\x01\x4a\x91\x98\x60\xfb\xce\x87\xdd\x66\x2b\xac\x4d\xc4\xe6\xce\x96\x5e\x05\xcc\x97\xd9\xbe\x41\xf1\xcd\x8f\x70\x89\x30\xc2\xc0\x2c\x2c\x1a\x98\xbb\x71\x55\x72\x65\x5a\xea\x5d\x35\x26\xa9\x59\x90\x37\x4c\x43\xe8\x6d\xc8\x53\xc6\xcd\xe3\x6e\x35\x8d\x74\x19\x55\x55\x85\x52\xe4\x77\xae\x35\x4f\x89\x9b\xe5\xc0\x03\xb3\x11\x14\x83\x82\x86\x2d\xa6\x44\xe2\x67\x6b\x4b\xf5\x3b\x67\xdf\xcb\x1c\xdd\x1a\xa9\x92\x07\xf6\x02\x3b\x7d\xf3\x1e\xaf\x96\xeb\x87\xa7\x8e\xf8\x4c\x55\x98\xa5\x56\x1d\x06\x79\x49\x32\x6e\xc7\xcb\xdb\x02\xf4\x88\xc4\x8b\x8a\x14\xc9\x32\xb8\xa1\xcb\x2c\x28\x31\x5f\x5c\xf2\x75\x88\xd9\xaa\xf3\x18\x47\x4e\x65\xfa\x9e\x69\x74\x03\xf3\x87\xed\x5c\x42\x71\xa9\x36\xc3\xd8\x03\xbb\x02\xf9\x6a\x2c\xec\xee\x21\xac\xce\xa3\x5a\x98\xcc\xfb\x01\x76\x6d\xd5\x45\xb3\xed\x37\x7a\x3e\xfa\x7a\xf2\x6e\x8d\x81\x5f\x6b\x92\x2e\xc6\xf9\x32\xfc\x45\x7f\xaf\x02\xd0\xef\xa6\x3f\x51\xd2\x38\xc8\x82\x7a\xf3\xef\xe6\x4d\x81\x5a\xda\x2e\xb8\xf2\xbe\xc8\x40\x1e\x9d\xe9\x99\xae\xcf\x6a\xdb\x29\x3c\x37\x99\x91\x68\x66\x82\x79\x9e\x1a\x77\x34\xe3\xd0\x2c\xfe\xb6\x74\x7e\x14\x7a\x5c\x0f\x26\x83\xfb\x22\x66\x20\xc6\x00\xb2\x38\xc8\xc6\x61\xdf\x91\x11\x99\xe7\x72\xfc\xbe\x11\x38\x8d\xd6\x3f\x96\xf3\xe7\xee\xcf\x11\x58\x75\xc0\xa7\xce\x3e\x59\x47\xcf\x80\x77\x04\x6e\xe3\xda\xb5\xa4\x55\xc0\xea\x50\x85\x05\x4d\xc2\xa5\xf1\xd2\x05\xb2\x8e\xa7\x63\xb1\x08\x1a\x7e\xd0\xfa\xcb\x7b\x7a\xc0\x83\xb2\xcc\xec\x0a\x1c\xfd\x10\x11\x83\x74\x1b\xb2\x70\xd8\x42\x8c\x5d\xb1\x78\x72\x61\x0c\x8d\x2d\x1a\xc3\xf7\x0e\x25\x02\x55\x2f\x91\x6d\x6b\xd1\x23\x23\x5e\x84\x96\xe7\x09\x9f\xc9\x98\x52\xda\xd9\xce\xed\x0f\x4d\x1a\x42\x41\x17\xb4\x7c\xbe\x81\xa5\x7d\x61\xf2\xe8\xe5\xe5\xd9\x2b\x19\xde\xfa\xca\x13\x18\xde\x80\x6a\x85\xd3\xd0\x6b\xbe\x03\x34\x20\x49\x62\x6d\xfe\x2e\x59\x4e\x9c\x5b\x72\xd1\x21\x5d\xbd\xf4\x75\x7e\x92\x4b\xa2\x8c\x57\x81\x8e\xf1\x2a\x0a\xec\x5c\x4e\xd9\x8d\x3c\xa2\xa3\x4b\x10\xb4\x17\x5f\x1c\xbb\x1f\xef\xa8\x32\x36\x4a\x98\xec\xc4\x3a\xd5\x5a\x2a\x3b\x1f\x04\xb4\x65\x7c\x9e\xf3\x0b\x7f\x71\xa7\xc7\xde\x87\x5a\xf5\x27\x79\xb3\x24\x72\x72\xe2\xd8\x6b\x75\x96\x0a\xb6\x3c\x06\xf1\xe9\x21\x0e\x44\xeb\x48\xfd\xda\xbc\xb3\x73\xe4\xa5\x28\x55\xba\xe0\x44\xa8\xe3\x32\xc2\x28\x84\xb0\x06\xa9\x08\xb9\x4a\x8e\x7b\xc8\x3b\x2f\xd9\x83\x68\x2a\x9b\x4e\x03\x59\xde\xd7\x0c\xf6\x80\xb0\x83\x7a\x2a\x13\x70\x16\xb1\x45\x53\xbe\x9c\x79\x12\x0f\x68\x76\xda\x5c\xaf\xc4\xb3\x53\x1b\xa6\x09\xb3\xf3\x2c\xbe\x81\x7c\x5a\x69\xbd\x01\x39\xed\x77\x9c\xbf\xd1\xa9\xc4\xf5\xd1\x57\x71\x88\xaf\xc3\x4c\x58\xc1\x62\x9c\x08\x23\xee\x04\xe4\x28\xf9\xf8\xf1\x1e\x1d\x60\xce\x18\x03\x2f\x13\xcf\x75\xfd\x73\xf7\x35\xe1\xbc\x69\x63\x18\x0d\x56\xf6\x65\x36\x56\xb0\xe1\x19\x8a\xc9\xf5\x50\x68\xb4\xc0\x20\x26\x80\xee\x45\xc8\x68\x30\x27\x91\xbb\x4f\xc5\x59\xd0\xea\xbd\x80\xfc\x98\x34\x4c\x2b\x5f\xb6\x8b\xf0\x4f\x1a\x9a\xee\x0a\x10\x50\x0a\x03\xb0\x97\x07\x92\x0b\xdf\x78\xa0\x7c\x49\x3a\xa5\xc4\x8c\x06\xe6\x05\x2c\xf9\x00\xed\xa8\xaf\x67\x05\xc6\x0c\xe6\xc9\x19\x56\x13\x93\xa6\x4b\x30\xab\x26\x1c\xb8\x5a\xef\x85\x23\xb1\x02\x8b\xda\xc9\x7b\xb8\x6b\x48\x39\x0a\xfe\x72\xd7\xe6\xa1\x4d\x7d\x86\x3b\xc4\xbc\xa0\x93\x66\xd0\xb5\x55\x66\x12\x47\x65\x9c\xc8\x69\xb9\xbb\xd5\x96\x13\x6c\xf0\x2c\x26\xc8\x36\x9d\xde\x8e\x63\x09\x49\x1e\xf4\x11\xef\x66\x0c\x5b\x45\x70\x1a\xbf\x73\x14\x4e\xbb\xe2\x8f\xe5\x88\x3d\xf1\xf5\x51\xf7\xfc\xa3\x23\x12\x6d\xd3\x20\xf8\xe5\xd9\xd6\x4a\x77\xeb\xbb\xe4\x2c\xef\x1c\x16\x88\xf5\xdd\xd2\x5a\xcc\x24\x5a\xb6\x33\x70\x41\xd4\x7d\x19\x39\xc2\x14\x0c\x40\xee\xb4\x8c\xb2\xee\x73\xe0\x44\xbc\x72\xa8\xa9\xa3\xdf\x29\xb3\x8f\xe3\x04\x75\x9e\x65\xdd\xec\x7d\xc1\xbb\xae\x8d\x1c\x37\x3d\x36\xe6\x9d\x9b\x00\xdc\xf7\xfb\x96\xf9\x59\xe0\x14\x33\xe5\x09\x4f\x80\x00\xde\x2c\xde\xa0\x94\x6c\xf6\x9b\x99\xe4\x1c\x34\xa5\x7d\x27\x4d\x04\x93\x71\xc4\x6a\x3c\xa0\x6a\xd9\xd4\xe5\xf4\x79\x4f\x28\x81\xe8\xd9\xb1\xee\xa2\x4b\x96\x88\xe6\x96\x03\x6b\x3a\x5b\x43\xc4\x53\x14\xdb\x37\x42\x98\xfe\x0d\xca\xd3\xcd\x1a\xb5\x98\x85\x16\xa0\xa0\x01\x00\x1f\x3a\x5f\x32\xa7\xa8\x02\x15\x40\xe2\x79\xe8\x15\x2e\x0f\xae\x28\x1b\xf1\x60\xe8\x44\xa0\xc4\xab\xaf\x62\xd7\xe7\xb0\x53\x56\xf4\x65\x04\xc7\x4e\x3c\xbb\x9c\x9c\x68\x91\x05\x17\x72\x2a\xb6\x8e\xe2\x44\x9b\x37\xee\xd1\x09\xca\x8d\x03\xe5\xdc\x8c\xf0\x23\x62\x2e\xdf\xf7\x87\x76\x74\xe7\xa5\x04\xc0\xb5\xb0\x14\x66\x46\xc5\xc7\xe1\x84\xc3\xd3\x11\x68\xab\x21\xf3\x2a\xd1\xef\x00\xab\x37\xce\xea\x62\x53\x9f\x69\x20\xba\xeb\xe9\x91\x37\x89\x06\x82\x05\x39\x0d\x0e\x4e\x81\xac\x2d\x37\xb9\x17\x6f\xb4\x5d\xdb\x41\x36\xa1\x03\x6b\x91\xd1\x96\x9d\x89\x6d\x25\xfe\x23\x24\x69\x8f\xeb\xc0\xc0\xb0\x94\x50\x2e\x85\x74\xc6\xf0\x07\x70\x78\x60\x06\xa6\x45\x1d\x0c\xf0\x42\xb3\xbe\x7f\xc5\xc1\x4a\x31\xae\x25\x28\x23\x94\x2d\xb0\x38\x2e\xa2\x62\x41\x48\x82\x40\x6d\x43\x15\x18\x73\x9b\x75\x61\xde\x34\x13\x02\xe7\x0c\xf2\x6f\x53\x3a\x8e\xa0\xf2\x8a\x7b\x7d\x94\x81\x1a\x1d\x6d\xb6\x81\x2e\x7c\xc4\x8d\xfd\x68\x9c\x6a\xd6\x12\x5c\xe4\x25\xf2\xc6\x5e\x26\x60\x44\xcd\x93\x22\xdb\x13\x2e\x27\xd2\xd2\x79\x4a\x32\xfd\xd1\xd7\x76\xf4\x95\x36\x37\x9c\x91\x85\x31\x68\x1d\x52\x5e\x35\x8a\xbf\x8b\xb0\x03\x55\x61\x1f\xa9\x4e\xc6\x8c\xd4\x49\x0b\x80\x21\x0b\x22\x31\x9b\xb2\x4a\x28\x8b\x89\x64\x29\xcd\x86\x67\x9c\x9e\x9d\x09\x31\xab\xc7\x30\xce\xd9\xa2\x4f\x21\x7c\x18\x82\x7d\x2d\x0c\xec\xa7\x86\x46\xa0\x7c\xbe\x83\x58\x94\xf1\x09\x99\x52\x73\x00\xd3\x65\xf5\x6a\x0f\x0d\xc6\xb1\x97\xe1\xf9\xb8\x84\x4e\x4f\xdf\xbb\x5c\xeb\x2c\xa2\xba\xd2\x7c\xe5\xa2\x78\xa8\xbc\xb7\xd9\x94\x5d\xa2\xed\x56\x5c\xb4\xde\x4d\x53\x0f\x98\x50\xbe\xaf\x7a\x90\x1f\x50\xe1\x9b\x8b\xcc\xa2\x78\x28\xb2\xd0\xb0\x3e\xc1\xf0\x99\xdf\xa0\x93\x21\x24\xe5\x1e\xf0\x5b\xad\x7b\xef\x89\xcc\x62\x5f\xbe\x6a\x3b\xb8\x8e\xc1\x2e\x60\x56\xe3\x46\x4d\x45\x3a\xff\x9d\x0b\x84\x6e\x38\x39\xdf\xce\xe4\x41\x69\x0b\x2c\xbe\xda\x3a\x5e\x37\xd5\x2b\x4d\xef\x16\x45\x7d\x6e\xfa\x07\x9f\x04\x49\x21\x7a\xec\x70\xc4\xe1\x03\x9c\x28\x18\x46\x00\x44\x54\x49\x86\xb5\xea\x29\xee\x85\x58\x00\x7f\xef\x03\xae\x74\xf8\x83\x3d\x9c\x1a\xc7\x5f\x01\x04\x27\x74\x8e\xfd\xb2\x97\x86\x89\x3d\xdc\x70\xbc\xc0\x99\xa1\x49\x74\x10\xa1\x28\xcb\xe9\x2a\x56\xa6\x2d\xfa\x5c\x70\xb6\x02\x41\x89\x0c\x34\xe8\xdd\xda\xf2\xa5\xce\xfe\x83\x96\xca\x88\x3f\x86\xd1\x32\xc0\x54\x5d\x39\x76\x89\x19\x93\x2a\xaa\x90\x35\x44\x0e\x11\x85\xa4\x78\x40\x2b\x14\xbe\xb2\x10\x35\x98\xb6\x57\x9f\x5d\x48\x3c\x5e\x04\x0e\xef\x79\xf6\x7a\xb3\x8e\x44\xce\xb9\xf5\x2e\x6f\x9d\x07\x5d\x31\xcf\xc4\x8a\x31\x2d\xa6\x39\x9e\x89\xe7\xae\xf0\xfb\x35\x97\x3c\x66\xa5\x96\x06\xf1\x7b\xff\x4a\xf3\x6d\xcb\xa6\xf0\xd8\xde\xe1\xd4\xc0\xd2\x59\xe0\xd5\x3b\x11\x73\x2a\x2e\x7c\x06\x0b\xe9\xd7\x86\x4e\x79\x7e\xfb\xaf\x6c\x08\xb2\x8b\x39\x69\x1c\xdf\xae\x42\x2e\x93\x61\x1b\xf6\xc2\x75\x8c\xfa\x29\x20\x01\x05\x0d\xfb\x7b\x63\x88\xc7\x6a\xdb\x0e\x78\xab\x2e\xd5\xf1\xc0\x83\x7e\x91\x62\x50\xbe\x38\x18\x7b\x32\x0a\x70\xb1\xa8\xd0\x93\x8c\x1c\xb4\x6e\x5a\x60\x2a\x43\x76\x1e\x9e\x6c\x37\xea\xf1\xdb\xf1\xd0\x17\x8f\x09\x78\x72\x8f\x95\x17\x4b\x73\xce\x8a\xc8\x38\x40\x0a\x29\x20\x12\x09\x4e\x29\xd1\x59\xf5\x0c\xa4\xa4\x68\x38\xe0\x05\xfe\x32\x95\xcd\x2c\x5b\xca\x82\x92\xd1\x8b\xf9\xdc\x5a\xf3\x32\x3f\x68\x76\x94\xc1\xde\xa9\xe9\xd8\xdb\xf8\x45\x49\x2a\x4b\x63\x15\xbd\x6c\x26\x20\x28\xd2\x00\x6e\x31\x61\x51\x72\x33\x51\x82\xfc\x31\x0a\xef\x58\x00\xa5\xaa\x60\xf5\x46\x21\x2f\x75\xa9\x58\x09\x7f\xcf\x93\x71\xab\xcf\x0a\x3f\xae\x72\x50\xc3\x49\x2b\x77\x63\xc1\x42\x70\xd8\xfd\x22\x25\x25\x92\x36\x87\xad\x65\x0b\x54\xd0\x8e\x59\x9b\x07\xb9\x01\x6f\x2d\x80\x28\x66\x75\x47\x9b\x03\x69\x07\x6b\x94\xc6\x90\xfc\xe8\x41\xbd\xd9\x81\x07\x5b\xd5\x5a\x28\x4a\x36\x7c\xef\x6d\x34\x6b\x37\xf0\x49\x14\x64\x56\x64\xd0\xa2\xeb\x69\xbb\x13\x18\x64\xe5\x85\x9c\xb1\x36\x68\x67\xa9\x83\x75\xb3\xa2\xb2\x52\xb3\x9d\xb3\xc9\x5e\xd1\x68\x7c\xb8\x87\xd1\x0d\x25\x81\x1d\x24\x58\x25\x68\x4a\xa1\x78\x5f\x64\x43\x64\x8b\x3a\x9d\xc6\x30\x72\x33\xa2\x1d\xbc\x15\x4d\x13\x33\xd7\x5a\xbc\x47\x6a\xd0\x0f\xfc\xf1\xb6\xbc\x13\xab\x25\x64\x0d\x80\xd9\x7b\xbb\xb8\x9e\x27\xfc\x0e\xae\xd4\xa0\xdb\x2a\xae\x22\x99\x2c\xb9\xc5\x09\x71\x36\x4b\x6c\x88\xa1\x5b\xd8\xf9\x68\x84\x3b\x3f\x80\x4e\x23\xeb\x68\xf6\xa0\x52\xe2\xe1\xf2\x7a\xdd\x62\x92\x1d\xd9\x16\x3c\x74\x73\x35\x59\x35\xbd\xe3\xfa\x4e\x52\xd4\xa3\x26\x9d\xc2\xce\xcc\xe4\x1d\x95\x37\x6f\xa1\xf6\x76\xb5\x3b\x0d\x7c\xad\x34\xee\x29\x51\x6f\x8c\xab\xec\x14\xb3\x2e\xc2\xdc\xb8\x58\x18\x7d\x5c\x55\xd5\x49\x63\xc0\xd7\x4b\xac\x1e\xc3\x88\x6a\x0e\xa9\xe1\xf5\x95\x99\x7c\x4e\x1d\x33\xf7\xa2\x8b\x57\xe7\x6f\x8c\x82\xf4\x99\xea\xdf\x05\x77\x94\x47\x78\x3f\xca\x1c\x8f\x88\x14\xbd\x36\x38\xc4\x18\x5b\xaf\x5d\x43\x0c\x88\x06\xcf\x66\x0d\x0f\x30\x58\xd9\x93\x17\x3b\xb3\xd9\x35\x61\x52\xa4\x62\x59\x5e\x47\x15\xb2\x7f\x06\x19\x4a\x04\x19\x56\x9f\x74\xb9\xa9\x7e\x7f\x90\x59\xcf\x3f\x16\xca\xf4\xe9\xdf\xa7\x29\xb6\x7e\x4b\x0d\x78\x3d\xbc\x52\xb5\x56\x0f\x9a\x52\xd7\x3b\x1d\x97\x35\x1c\x0e\x14\x1f\x08\xab\x18\x15\x8d\xb7\x37\xf2\x26\x6e\xd0\x7e\x94\x3c\x71\xcc\x69\x28\x3b\x85\x32\x6d\x6d\x39\xc7\x56\x54\x3c\x69\x79\xb4\xc1\x02\x37\xc7\xa0\x9e\xc2\x2e\xcf\xdb\x0c\x7d\xb3\x72\xaa\x0a\xed\x9d\xef\xbb\xbf\xeb\x7a\x9e\x27\x1a\x12\x39\x6c\x3f\x10\x39\xec\xae\x48\x6a\x8f\x0f\xca\xd7\xb2\x47\x4e\x81\x1b\xf0\x8e\xdd\x71\xc7\xcb\x17\xf1\x76\x9e\xf5\xd3\xa6\xd5\x97\x80\x3f\xce\x80\x38\xa4\x43\x17\x42\x35\xd6\x6a\x33\x4a\x15\x72\x67\x01\xa8\xb0\x07\xc9\xae\x6c\xfd\x7c\x11\xcd\x43\x6b\xdd\x14\x50\xec\x07\x68\xeb\xa2\x3e\x6a\x80\x75\x5f\x46\x83\x80\x27\xad\x9e\x94\x15\x12\x21\x4c\x0f\xe4\x89\x32\x5a\x9d\x09\x36\x6e\xc5\x2c\xe8\x5b\xe3\x7d\x44\x2f\xcd\xa3\x88\x5a\x7c\xb3\xca\xd0\x1a\xc5\x8b\x34\x41\xb6\x70\xe4\xfe\xa9\x8b\xad\xe8\x8d\x8d\xb3\x22\x89\xfe\x3e\x1b\x5b\x73\x9e\xd0\x3a\x2f\xaf\x91\x40\xcd\x8a\xf4\xc7\x29\xba\xd7\x69\xd8\x5e\x13\x66\xc9\x86\x24\x75\xa1\x35\xf1\xc7\x32\xa4\xdc\x22\x4a\xcd\xb3\x49\x2e\x25\xd8\x71\x31\x8b\xf2\x44\x39\x11\xc1\x79\x37\x1c\x87\xd4\x9c\xcd\x9e\x6a\x08\x52\x04\x33\xe7\x0c\x22\x38\xec\xb6\x04\xa5\xb7\x20\xbc\xce\x4a\x05\x7a\xb4\x17\xb0\x52\x81\x29\x6a\x19\x53\x8e\xec\xd1\x5a\x30\x72\x26\x57\x54\xa7\xc6\x0c\x3b\x87\x66\x43\x6a\x2b\x69\x2c\x65\x6e\xfc\x5b\xf0\x46\x82\x34\x4c\xd7\x67\x72\xa3\xe2\x5c\xc0\x41\x79\xca\xaa\x0c\x74\xc4\xfa\x82\x62\x23\xf4\x86\xf3\x4a\x2c\x69\xac\xc0\x44\x95\xa1\x0e\x2d\x1d\x04\xbd\x09\x7a\x41\x77\xaf\xf2\x0d\xae\x1c\xce\x22\x86\x35\xce\x04\x42\xb3\x9a\xcc\x2a\x79\x3e\x3d\x2e\x82\x9a\x1e\x0c\x2d\xe1\xb3\x47\x0d\x86\x41\xb9\xb1\x6e\x42\x1a\xc6\x23\x5a\xbb\x28\xa4\x25\xa9\x2b\x1d\xe6\xc6\xd4\x81\x6f\x1d\x15\x5d\xaf\x8f\xba\x94\x6c\x9c\x33\xbe\x36\x31\x58\x19\xfc\xf0\xb2\x22\x06\x03\xf2\x26\x5d\xb5\x69\x44\xec\x7d\xe8\x2a\x71\xb2\x87\xd0\x0e\x17\xc3\x93\x5d\x83\x93\xb2\x45\xcc\xa4\x05\x72\xb2\x96\x6e\x45\x1c\x64\xa4\xa0\x6f\xb8\xa6\xb3\xea\x43\x0d\xf0\x09\x2e\x45\x79\xb2\x39\x43\xe8\x68\xd8\x4f\xb4\x77\x02\xe4\x67\x9a\xab\xcc\xdc\x00\xd9\x01\x64\xe9\x7d\x95\xfb\x6e\x77\x14\x99\xa6\x43\xe2\x9a\x93\x00\x73\x73\x54\x46\x1b\x8a\x4d\x63\xc8\x94\x03\xfe\xd0\x7b\xbb\xf0\xf3\xbc\x02\x8a\x58\x08\x3a\x85\xdd\x75\x4b\x34\xa8\x11\x95\x1c\x0c\x5a\x82\xfb\x09\xf3\x18\x48\xdc\x32\xe5\xef\x83\xa6\xa6\x41\x0f\xdd\x45\x87\xfb\x05\xa4\xba\xaa\x02\x20\xec\x06\x6f\x7a\x71\x96\x0d\x54\xf8\xdd\xbb\x7d\xed\x40\x05\x8d\x89\x6f\xeb\xaf\x55\x4e\x6d\x36\x89\x3d\x25\x9c\x18\xc3\x3f\x36\xa0\xc5\xc6\xfc\x88\xd9\xde\xe2\x17\x9b\xe0\x3c\x92\x44\xba\x54\xd8\x21\x80\x08\x24\xe4\x77\x7e\xc8\x70\xfc\xc1\xf6\x36\x03\xf7\x15\x68\xac\x3a\x0b\xb1\x8e\x9e\x6b\x05\x08\x62\x25\x83\xcc\x46\xf9\xf2\x8a\x98\xb6\x8e\x46\x2e\x62\x0e\x1a\x8e\xad\x8e\xe8\xca\x58\xfc\x73\xf4\x1f\x0c\xa6\x76\xf1\xea\xb3\x8b\x40\x2b\x9d\x48\xc6\x2c\xf6\x56\x86\x57\xd0\xf2\xe2\x69\xb2\xe2\x52\x8a\x93\xdb\x3e\x3a\x03\xab\x5f\xc0\xcd\xb9\x74\x8c\x38\xeb\x16\x6e\x11\x4e\xa0\x28\x8e\xcf\x2d\xcc\xd1\x2c\x8b\x52\x2d\x4e\xec\x7a\x8a\x2a\x42\x50\x69\x3a\x9e\x08\x4f\xd2\xf1\xaa\x17\x7a\xad\xdd\xde\x46\xcb\x33\x96\x08\x16\x9d\x2f\xaa\x5f\x05\x98\x1a\x37\x1d\xf0\x89\x0a\x1f\xf6\xa6\xdd\xb6\x8a\x7d\xbd\x09\x8b\xc9\xc6\x48\x19\xe9\xc4\xa4\xe9\x29\x02\x5c\x86\x8e\xd4\x4d\xac\x2d\x4f\x87\x50\x67\x6c\xb1\xfe\x61\x30\x03\x7d\x63\x41\x89\xcb\xf2\x5d\xc2\x8b\x08\x29\x9b\x53\x75\xfa\x6a\x9a\x57\x34\x0d\x69\x0d\xaa\x4c\x3b\x04\x95\x68\x5b\x76\xf5\xe8\x04\x88\xf0\x36\x90\x74\x72\x82\x5e\x42\x5d\x1a\x3c\x34\xb9\xa5\x16\x79\x29\x1d\x9d\xa0\x8d\x28\x0f\x28\xd9\x62\x38\x45\x14\x0e\x1f\x9c\xf3\xd6\x3f\xd0\x77\xaf\xb6\x5c\xf8\xe0\xe5\xca\x20\x99\x1a\x8a\x70\x72\xda\x96\x4c\x11\xf7\x5a\xdd\x51\x59\x8d\x2c\x6a\x43\x16\xcf\xad\xe6\x07\x5c\xbd\x5c\xd1\x95\x03\x2b\xbe\x40\xc7\x4e\x39\xe7\x15\xf6\xdb\x8b\x0c\x28\xc1\x28\x5c\x4d\x62\xdf\xe8\xa6\xf9\x15\xe2\x2c\x69\x74\x1c\x0e\xc8\x59\x39\x66\x47\xd6\x70\x1d\x18\x63\xee\x5b\xa3\x37\x05\xef\x8d\x8c\x7c\x21\xdc\x2b\x82\x6b\xb1\xa3\xe7\x89\x63\xb8\x1e\x9b\x4b\x59\x37\x11\x97\xef\xcb\x5d\xb3\xc9\x00\xf6\x94\xa4\xae\xf2\xc4\x20\x97\xc9\xcc\x4b\x27\x01\xf8\xe9\xa9\xca\xef\x98\x2a\x89\x5e\x24\x55\xa6\x66\xc7\x71\x48\xce\x85\x10\x68\xb5\x59\x73\xde\xa6\x0f\x1d\x18\x34\xaa\x71\xe4\x77\x03\x4c\x1c\x3c\x32\x01\x8d\xc9\x6b\xf3\x32\x73\xef\xbe\xa2\x68\x90\xe7\x29\x65\x22\x8a\x39\xae\xe8\xe5\x3d\x3b\x10\xa0\x75\xda\x84\x1b\xee\xc2\xe9\xa4\xef\x3c\xc3\x74\xa4\x29\x31\x25\xce\x91\x57\xbb\xd7\xe9\xcc\xc4\x9f\xca\x31\x64\x01\x47\x40\x74\x70\xb9\x3d\xcd\x85\x23\x6d\xcf\xe6\x4a\xef\xe8\x3a\x40\xd6\xfa\xb2\xb4\x59\x3e\x2b\x7d\x62\x59\x12\xc9\x9b\xc0\x7e\x74\x22\x38\xa7\x43\xe6\x54\xc2\xd3\x0f\xdd\xcd\xd0\xc7\x45\x94\xa7\x03\x32\xba\xbc\xca\xed\xa5\xd7\x48\xaa\xf2\x2e\xab\x15\x88\xcd\x01\x85\x12\x52\xa7\x7a\x09\x5d\x54\x59\x47\xdd\x1a\xf8\xec\x4d\xcc\x72\x5f\x52\x3e\x9e\x95\x83\x66\x29\xa2\xa8\xe7\x3d\xaf\xbd\x7d\x5e\x55\xbd\x37\x7e\x3a\xb9\xdb\xa6\x01\x13\xd7\x2a\xdc\xcd\x25\x2a\xd0\x4c\x61\x3d\x71\xa6\x14\x0a\xc6\x48\x44\xe7\xe1\xc7\xd4\xd9\x33\x76\xff\x3c\x9f\xce\x66\x24\x12\x51\xed\x78\x8b\x1a\x68\xf6\xbc\x15\x7e\xae\x08\x88\x65\x24\xae\x1f\xc8\x42\x58\x93\x7c\xc6\x8e\x38\x76\x7d\x67\x9a\x9e\x04\xfc\x00\x6f\x02\xef\x61\x47\x5a\x9f\x8f\x14\x7d\xf6\x78\x24\x1c\x2c\x4f\x92\x82\x2f\x0d\xe4\x16\xbe\xdb\xfb\x77\x3d\x76\x4f\xcf\x3f\xda\x9b\xc0\x5f\x7f\x0f\x60\xfd\x9c\x75\x04\x7a\xfe\x56\xbb\x35\x1d\x04\xa8\x61\xde\x9d\x14\x47\x2e\x97\x44\x94\xcb\x8d\xe4\x62\xb2\xc6\xc8\x1d\x01\x18\x6f\xb0\x50\x1b\xbd\x5d\x3f\x3b\x37\x7d\x90\xef\x64\xa3\xe1\xc9\xa8\xce\x6e\xbe\x30\x16\x6c\x3c\xce\x15\x8d\x47\x2c\x5f\xd0\x1a\x73\x52\x07\x67\xdd\xe5\xdb\x5b\xcd\x27\xd1\x03\x61\x9a\x63\xc9\xd2\x5c\xe9\x7b\x58\xd7\x52\x1c\xdf\x2c\x0c\x9f\x8f\xe7\x4e\xe3\x44\xd6\xe0\x79\xc8\xde\xe3\x06\x93\x81\x33\x59\xc4\x2a\x1b\x7c\xa8\x2b\x63\x04\xbb\xbe\x0e\x6e\x1c\xdd\x49\xc0\x6b\x25\x34\x85\x86\x27\x60\x93\xe2\x64\x41\xe3\x46\xbc\xe2\x3d\x15\x06\x75\xb1\x62\x45\x66\xdf\x66\xb7\x3b\x90\x97\xbc\x7b\xbb\x36\x39\x06\x57\x95\xa7\xc7\x5b\xba\x24\x88\xd8\x42\x22\xb2\xe9\xa9\xa4\xe7\x32\xfa\xa9\x04\xd9\x09\x57\x74\x97\x8f\x9b\x58\x3e\x8d\x85\xb3\x2e\xf5\x34\x34\x84\xdf\x7d\x41\x38\x34\x09\xf3\x3d\xeb\x12\x93\xe6\xb5\x63\x82\xb1\xf4\x35\x79\x72\x09\xbe\xdb\x35\xe4\x1e\x54\x81\x44\x3c\xfe\x72\x53\x4a\x30\x38\xba\x79\xa4\xb1\x9b\x9c\x6a\x7a\x64\x3b\x51\xd8\x16\x4b\x23\x28\xba\x88\x94\xb6\x41\xb2\xb2\x0c\x12\x77\x4f\xd1\xa2\x13\x7b\x4d\x67\x0c\xd5\x06\xd3\xdd\x23\xae\xef\x1f\xd1\xcc\xcb\xe1\x1b\xa7\xe7\x14\x35\x72\x85\xb1\x01\x5c\x1e\x29\xf5\x85\x24\x44\xce\x39\x5c\xcd\x8d\xd0\x91\x36\xd8\xd2\xe5\xad\xb9\xc8\xf2\xa4\x46\x38\x5b\xe4\x92\x04\x93\x09\xa4\xc9\x6d\xb5\x42\x23\xdb\x51\xb6\x91\xf7\x45\x3a\xf6\xdb\x38\x38\x38\xe5\xac\x26\x5f\x55\x76\x86\xe7\x7e\x65\x4e\x9d\xfc\x90\x37\xa6\xc7\xec\x71\x0f\x86\xa2\xa3\x4c\x29\x99\xb5\x43\x94\x14\xd1\x3b\x3b\xf5\x91\x6a\xcb\xa5\xc8\xf3\x65\x90\x91\x34\xd6\xd2\x13\x20\xcf\x99\xd7\x60\x6b\x4a\xc3\x15\x6f\xe4\x50\x9a\x6f\xc9\xa3\x0a\x74\xac\x04\xf6\xbd\x05\xaf\xdd\xc5\x32\xd0\xd1\xae\xec\x69\x5f\xf9\xba\xd3\x68\xfb\x28\x42\xea\x65\x09\x92\x7d\x8c\xd6\x89\x4c\x88\x94\xd9\x8e\x1c\x9d\xa5\x3f\x98\x28\x5e\xe2\x66\xff\x80\x2b\x6e\x68\x25\xf8\xdc\xf5\x32\x8a\x31\xa1\x90\x78\x60\x94\xf0\x7a\x79\xeb\xc8\xe2\xf8\x8f\x3a\xac\xe8\x82\x5d\xbc\x14\x60\x6a\x01\x15\x67\x2b\x18\x29\x87\x9c\xc1\x4b\x18\x6f\x6b\xf0\x65\x4d\x87\xd0\x08\xd3\xa8\xb2\x4f\x4b\xf0\x4e\xfc\xe7\x24\x06\x2a\x64\x8a\xf1\x86\x55\xa0\x5c\x09\x0c\x4a\x01\xbc\xad\x0a\x3c\x08\x37\x36\x3f\xb2\x0a\x2e\xbc\xc0\x43\xe0\x34\xef\x28\x27\x26\x7c\x58\x63\x43\x69\x2b\xcd\x04\x12\x53\x86\x2c\x52\x98\x89\xfc\x8e\x83\xab\x27\xa7\x98\x56\x63\x7f\x3c\x46\x57\xe7\x62\xb6\x2f\xc0\x48\x96\xf8\x38\xb8\xe5\xe7\x88\x1c\x62\x56\x28\x6d\xc2\xea\x5d\xba\x3e\x98\xda\x8f\xef\x64\x39\xb9\x96\xbe\x7a\xf3\x38\x5c\xf2\xf0\xb0\xb2\x9e\xb2\x02\x0c\x57\x14\x7a\x5a\x01\xed\xd1\xd2\x1e\x67\xa0\xd3\x43\x84\xc3\x9c\xb8\x50\xcc\x0b\x2c\xb2\xd5\x2a\xf8\xcd\x01\xd7\xda\x0e\xe5\x2d\x01\x31\x2f\x8a\x2a\x48\x29\xbb\x26\xaa\x24\x40\xf6\xfd\x7b\x3f\x71\xcd\xc6\x3f\xd8\xb9\x67\xd7\xfe\xfa\xa2\xdf\xcf\x5f\x2e\xca\x55\x8e\x66\x5d\x72\x4e\x07\x6b\x62\x49\x50\x76\x21\x04\x73\xa4\xd4\x91\x54\x48\x19\x20\x49\x06\x08\xae\xf6\x37\x78\x5b\xa5\xc9\x7e\xdf\x08\x43\x1c\xc3\x3c\x2f\x06\x7b\xc6\xdc\x48\x72\x36\x68\x07\x23\x48\x87\xaf\x51\x24\xab\x4b\xcd\xd5\x9d\xea\xf7\x0e\xe2\x86\x88\xd8\x7c\x58\x39\xf0\x84\x78\x11\x38\x71\xe2\x78\xf9\x56\xc1\xc3\xcc\xf1\x2d\xd7\x97\x09\x0f\x21\xcb\x08\x0e\xc8\x90\xc8\x86\x39\x8d\xa8\x75\xc2\x08\xf6\xc4\x57\x79\xc1\x45\x17\xce\x4f\x34\xde\x1e\xf7\xab\x11\x15\xaa\xa1\x33\x93\x96\x2a\x2c\xde\x72\x59\xad\x2b\xf0\x5d\x1e\x15\x6d\x98\x58\x55\xad\x69\xb4\xda\xbb\x81\x2a\x97\xa6\x28\x6c\xe5\x25\xc1\xd6\x74\x70\x87\x84\x65\x17\x4f\x4f\xca\x7f\xc2\xdc\x35\x9c\x9b\x80\x9f\x64\x1b\xef\xe3\x24\x9b\xf2\x33\xb7\x41\xdd\x8b\xcd\x83\xed\x18\xf6\xaa\xae\xa7\xe1\x16\x80\xfb\xe4\x35\x10\x5a\xb5\xe7\x2a\x2b\x6c\x00\xe9\xe2\x05\xcb\x2c\xd9\x76\x92\xc9\x28\x7e\x0c\xda\x59\xa8\x3c\x7a\xa2\x40\x54\xa1\x55\x24\x54\x10\xa9\x2d\xe8\xad\xdb\x9f\x1e\x4c\x9b\x2c\x86\xd2\x00\x0c\x21\x0c\xe5\xd3\x9b\x45\xa7\x6e\xf5\x64\x5c\x02\xde\xb8\x2d\x58\xf1\x86\x88\x2a\x77\x39\xf3\x3d\xd5\xa0\x19\xf2\xc9\x10\xe3\xfa\xd2\x23\x9f\x35\x9d\xfa\xd0\x6a\x36\x34\xb8\x32\x34\x46\x42\x81\x2e\xd6\xac\xa6\xc0\xa4\x1b\x7d\x05\x6e\xf4\x35\x14\x36\x3f\x09\x86\xc2\x3e\x29\xa5\x70\x3a\x1a\xf3\x79\x06\x25\xdb\x6a\xa4\x44\x4e\x6e\xe2\x32\xea\x65\x81\x0f\x14\x8a\x99\x0c\x24\x64\x19\x50\x23\xe3\x5c\x69\x87\x97\x26\x9e\x07\xbf\x97\x6e\x71\xd9\x42\x4b\xc2\x67\x33\x74\xb5\x00\x14\x59\x41\x15\x8c\x63\xaa\x3b\x96\x47\x4c\x4c\x85\xe3\xfb\x01\xac\x42\xe3\x90\x63\x93\xda\x24\xa0\x1f\x21\xa9\x9f\xfd\x7a\xa4\xce\x55\x07\x24\xf0\x08\xd5\x49\x12\x6a\xa5\x50\x89\x6a\x07\xb0\xdb\x5c\x21\xbe\x50\x23\x91\x85\x9e\x91\x2b\xd6\xbd\xd5\x81\x0c\xaf\xe7\x5d\x79\x5f\x69\x06\x3a\x24\x0b\x31\xf5\x63\xc4\xb7\x59\xa6\xf5\xbd\x09\x9b\x8d\xc8\x24\x51\xd1\x2c\xd5\xe9\x9b\xdd\x2d\xc5\x01\xe7\x03\x91\x82\x4f\x4b\x0e\xd2\x72\x20\x9f\xd9\xec\xf3\xae\xec\x8f\x3b\x77\x86\x47\x4a\x0d\x7d\xcf\x60\x2f\xdd\xc0\x03\xf6\x50\x11\x0d\x39\x0f\x55\x3f\x93\x97\x19\xb0\x2f\xbc\x40\x38\x31\xb9\x1f\xcd\x9e\x77\x3d\x09\x06\xb7\x28\x89\x17\x8e\x03\x1d\xa8\xd1\xd3\x62\x37\x0d\x6d\x5f\x8b\xac\xd7\x12\x0f\xef\x95\x92\x55\x18\xcc\x77\x70\x43\x6b\x98\xe3\x4d\x89\x9a\xd5\xf5\x99\x25\xaa\xde\x9d\xcb\xc0\xc9\x6b\x30\x8c\x98\xf3\xae\xe6\x40\x21\xbc\x35\x41\x35\x61\xba\xef\x5e\xf4\x85\xe9\xd9\x47\xb8\x96\xab\x92\xa9\x25\xf2\x2b\xc2\x34\x5c\xad\x3d\xbc\xcf\xef\x30\x9d\x53\xbc\xbe\x6d\x84\xa4\x48\xba\x84\xdf\xfc\x52\xc2\x7c\x92\xfe\xae\x59\x47\x76\xfe\xc1\x7e\xd2\x60\xf8\xe5\xc5\x08\xb0\x79\xad\x5f\xce\x46\xcf\xf9\x11\xde\xbb\x29\x69\x18\xd4\x3a\xa4\x11\xc9\xa2\x01\x72\xae\xc4\xd5\x14\x95\x0e\x62\x33\x33\x8c\xb0\xf9\x52\x85\xbc\x7b\x61\xf5\x1f\x02\x5d\x7b\x08\xf8\x32\x00\xa3\x13\x6c\x33\xa2\x4d\x73\x28\x45\xa9\xca\x8b\xaa\xa2\x44\xda\x36\x36\x88\xe8\x84\xbc\x4f\x70\x55\x48\x1e\x6a\xcb\xd2\x72\x7a\x86\x37\x4a\xa0\x77\xfe\x48\x70\x18\xef\x19\x2c\x1e\xb4\xe0\x3e\x25\x85\xc6\xde\xe5\x91\xd5\x78\x06\x40\x88\xd0\x68\x38\x4e\x2c\x38\x8f\x75\x6a\x9d\xb0\x47\x2e\x87\xd0\xf3\x01\xa4\x8f\xac\x7b\x98\x71\x54\x44\x5c\xb6\x43\xaf\x89\x1d\xc3\xe3\x96\x0b\x38\x4c\x9a\x89\xd6\x85\x67\x9f\x5b\xaf\xd2\x4a\xc4\xf4\x2a\xa9\x0c\x93\x26\x9b\x87\xf5\xfc\xb2\xed\x4c\x99\x0f\xae\xdc\x63\x39\xbd\x08\xe0\xac\x50\xa3\x68\x7d\x05\xbc\x78\x69\x91\x99\x24\x09\x03\x5c\x61\x44\xf2\xf0\x84\xd1\xca\xb3\xd9\xa3\xca\x87\xf9\x7e\xf5\x15\xe2\x5c\xad\xcb\x9a\x2f\x35\xc0\x74\xa1\x06\x37\x6b\x74\x64\xb0\x3c\xef\xdc\xee\xbc\xc5\x59\xfb\x81\x3d\x34\x78\xce\x66\x0c\xa9\xd9\xeb\xac\x3a\x0c\x10\x2e\x0c\x67\xfc\x48\x60\xcf\x5d\xf2\xe1\xfa\xc0\x69\xff\xe5\xd7\xb9\x66\x3a\x29\xd3\x6a\x43\x59\x3a\x48\x4e\xba\xb5\xa8\xd0\x7a\xdc\x11\xee\xf3\x12\x27\x19\xe2\x8a\x60\x7d\x84\xdd\x12\x26\x3b\xd2\x0a\xaf\x77\x8c\x6e\xa3\xcf\xe0\x8f\xd2\x55\x6b\xd1\x34\xa2\xd7\x94\x31\xc5\xcb\xb1\x03\xdd\x41\x13\x3b\x39\xad\x06\xe9\x2d\x1c\x24\x7c\x9b\x41\xe1\xb0\x1c\x99\x87\x18\xa8\xa4\x5e\x3f\x6c\xea\x26\xe0\x3c\xac\x6e\x74\x10\x5c\x84\xd4\x9f\x39\x9f\xb6\x97\x10\x8a\x8d\x18\x36\xb3\x88\xf3\x57\xd9\xcb\x04\x1d\xfa\xd7\x83\xac\x0a\x6c\x7c\x3e\x04\x83\x0c\x40\x10\x26\x13\xee\x45\xba\x2b\xcf\xe7\x8a\xc7\x13\xbe\xad\x21\xaa\x12\xa2\x89\x02\x7a\x64\x75\x0e\x36\x72\xbb\x9d\x2e\x90\x8c\x55\xa9\x03\x5c\xde\x02\x09\x9c\x45\xc6\x78\x5c\x1d\xbf\x8b\x97\x00\x93\x78\x23\xf7\x3e\xd8\x0c\x6c\xa2\xa7\xf6\x06\x5c\x6d\x61\xf2\x61\xa1\xd5\xef\x1d\x7e\xdd\x83\xe5\xd3\x2f\x2a\x94\x18\x53\xd6\xda\x83\x67\x5d\xd0\x95\x5c\x5e\x05\x2f\xa4\x1e\x48\x5d\x7b\x2e\xa3\x1f\x9f\xd8\xf2\x16\x32\xe6\xb9\x99\x62\xc0\x3b\xf4\xe9\x5a\x66\xcb\xac\xcf\x9c\x7e\xcd\xf9\x9e\x30\xfd\xd2\x49\x8f\x54\x8b\x94\x62\x20\x17\x8c\x74\x95\x50\x97\x24\xdc\x4b\x4b\xb6\x71\x2e\xfb\xc5\x4b\x23\x95\xb7\x16\x95\xb8\x32\x63\xef\x23\x43\x1d\x10\x7f\x1b\x93\x61\x3f\xb5\x22\x0a\x27\x47\x2b\x57\xce\x70\x6c\x47\xee\x5d\xdb\xf5\xde\x63\x71\xa1\xcf\x40\x71\xe5\xb1\xc4\x97\x49\x0e\x1a\x12\x21\x9f\x56\xc2\xe6\x36\x86\xed\x1d\xda\xd0\xf0\x63\xc8\x4b\xcc\xbf\x51\x82\x33\xd0\x78\x6c\x76\x16\x31\x3c\x58\x45\xc9\x71\xb8\x86\xb9\x6c\x09\x92\x12\xe5\x9e\x2b\xde\xa9\xad\x95\xd0\xbb\x91\x78\xcc\xb3\x72\x22\x33\x29\x69\xed\xb8\x43\x61\xa4\x6e\xae\x9c\x3b\x8b\xb4\x26\xd8\xf7\xc4\xff\xbc\x8d\x11\xdd\xb7\x80\x25\x9f\x83\x42\xf3\xbb\x02\x4a\xde\xee\x7f\x2c\x40\xe9\xd6\x5f\xb7\x31\xed\x97\x9f\x40\x70\xf4\x78\x59\x94\xc0\xa1\xfd\x74\x8c\x68\xa2\xf0\x06\xcb\x2e\xc8\x8b\xab\x8a\xca\xe4\x83\x87\x5c\xef\xdb\x66\xcf\x00\x42\x22\x88\xaa\x03\xc5\x09\x14\x6a\x90\x1f\xe2\x12\xf5\xa0\x59\x8b\x35\x5f\x49\x62\x58\x58\x22\xcf\x89\x83\x6f\x31\xe0\x0a\x87\x70\xda\xa7\x38\x78\x8f\xa2\x1d\xdd\x5b\xd8\x49\xb7\xfe\xe5\x8c\xb7\x8b\x54\xd6\x30\xe8\x13\xae\x4f\x8c\xb0\x5c\x38\x82\x65\x4f\x3d\xb3\x75\xb4\x0a\xf9\xd4\xe1\x0e\x42\x20\x66\x40\x60\xcb\xb8\xa0\x06\x08\xcc\x2b\xdd\xd3\x05\xc3\xfb\x57\x84\xc1\xcd\x83\x33\xad\x1e\x6f\x81\x38\x2d\xd0\x35\x5d\xc8\x4d\x85\xcb\x0c\x40\x8f\x8c\xa1\x5f\xbb\x92\x4e\xba\x52\x88\xe2\x18\x47\x50\x5f\x6d\x27\x0a\x75\x05\x00\x30\x53\xbb\x04\x56\x01\x57\xf7\xaa\xe1\x5d\x72\xbf\x61\x46\x82\x1f\xd4\x45\x2b\x05\x4d\x09\x48\xa9\x71\x2c\x87\x27\xcc\x78\xeb\xb4\x79\x69\x63\x94\x29\xbc\x6f\x25\x90\xae\xc0\x42\xdc\x7b\xb0\x1f\x99\x06\xad\xb3\x85\x27\x42\xea\x62\xba\xa4\x3b\xcd\x47\xec\x13\xb1\x70\xc6\xa5\x26\x8f\x95\x04\xc4\xf7\xc8\x68\x33\xd4\x60\x2f\x17\xa2\x56\xf3\x7d\xab\xeb\xc4\xb0\x93\x9e\xd5\x01\x80\xdc\x16\x5f\xc7\x28\x42\xa9\x60\x67\xbc\x1a\xe4\x5c\x98\x41\x54\xa3\xcd\x3f\xfb\x29\xd0\x18\x5c\xef\x0e\x2b\xd1\xe1\x67\x0a\x5a\x16\x90\x91\x5b\xf9\x6c\xe7\xa1\xe5\x46\x91\x32\xde\xc6\x01\x8d\x93\x94\x4e\x0b\xd9\x8a\x49\x46\x3d\x49\x89\x16\x9b\x86\x05\xb8\x70\x69\x7c\xc6\x70\x4d\xff\xc0\xc4\x40\xa8\x58\xb0\xa7\xd8\x24\xd2\x7d\xcb\xda\xa5\x9e\x3f\xbc\xc6\xf0\x49\x16\x89\x12\xb2\x8c\x4f\x5d\x95\x46\x2d\x15\x8e\x6c\x50\xcb\x84\x88\x21\xee\x75\x1f\x72\x75\xc7\x69\x7b\xe9\x8a\x2b\xe0\x86\x52\x3c\x24\x99\x0a\xee\x61\x98\xcf\xbb\xbe\xe1\xc1\xbc\x9d\xc1\x1e\x22\xf6\x20\xe4\x4b\x7b\xf9\x86\x87\x92\x2c\x5a\xcf\x9c\x8d\x91\x31\x19\xb8\xee\xfb\xa4\x43\x50\x8e\x60\x6b\x78\x30\x96\x4d\x0e\x4c\x95\xd5\xe8\x75\xd8\x97\x15\xb7\xcb\x53\x63\x99\x21\x2e\xb9\x56\x4d\xfc\x73\x16\x8e\x07\x19\x8b\x6f\xb6\x7e\xfb\x45\x8c\x5f\x18\xd5\xa7\x4a\xd9\xbc\x12\xb3\x11\x84\x98\xc1\x0b\xa4\x60\xcb\x4a\xe2\xce\x25\x2d\x67\x66\x8a\xa2\x8e\x8a\x18\x59\xce\x66\x9e\xb7\xe4\x43\x17\x89\xc6\xfc\x7f\xd9\x79\xaf\x9d\xd9\x8d\x65\x4d\xf0\x55\xe6\x9e\x03\xd0\xbb\x4b\x7a\xef\x3d\xef\xe8\xbd\xab\xa2\x7f\xfa\xc1\xd2\x92\x96\xb4\x37\x76\x9f\x73\x80\x56\x03\x1a\xa0\x7f\x20\x81\xaa\xbf\x92\xc1\xc8\xc8\x30\xdf\x97\x4c\x26\x2d\xa4\x5c\x66\x32\xf8\x91\x0b\x24\x83\x7f\x29\x45\x6c\xbf\x9f\xdb\x19\x1a\xb5\x4d\x97\x0c\x84\x88\x9b\xc3\x6f\xf7\x45\x4e\x00\x65\xad\x5e\x1c\xf3\xad\x90\xc6\xed\xb8\xbf\xcb\x5c\xfa\xf4\x99\x00\xc8\xca\xa8\x65\x95\xba\x44\xad\xa0\x38\xce\x35\x0e\x67\x22\x0c\x66\xc1\x17\xd9\x0c\x0e\x59\x94\x7a\x60\x31\x5a\xd9\x86\xc4\x21\x7a\x27\x3a\x94\xe0\x4c\x4d\x3e\x41\x55\x1c\x55\x6a\x91\x3e\x27\x98\xf8\xad\xab\xd4\x69\xc9\x39\x0c\x77\x08\x64\x9c\x84\xf9\xd6\x78\x03\x78\x67\xb5\x56\xce\xdf\xbb\x58\xda\x74\xff\xb0\xb5\x8e\x29\xfc\x0b\x2d\xf9\x89\x3a\xc0\xfd\xb3\x8e\xcc\x36\xea\xd0\x98\x75\x17\x06\xdd\x8c\xc7\x3e\x82\xaa\xa4\xa2\x14\xce\xde\xd9\xc3\x3d\xd0\x44\xb7\x19\xab\x1b\x19\x7e\xf2\xcf\x25\x92\x2d\x0c\x15\x9e\xd9\x1a\xae\xbc\xf4\xc2\xc1\x70\x21\xab\x4d\x32\xe1\xa9\xce\xa3\x56\xb1\x7b\xbf\xef\x49\x97\x4f\x6a\x77\xdc\x6e\xe2\xa3\x51\x51\x14\x8e\xbe\x73\x4d\xe3\xe8\x5d\x14\x58\xfb\xee\xfc\x9b\xc2\x00\x47\xd4\x8e\x21\x33\x75\x89\x81\x06\x2b\x4a\xc0\x4a\xb4\xe0\x8c\x59\x4c\xc5\x2c\x92\xe9\x2f\x1d\x58\x59\x13\xc0\xe0\x90\xae\xb9\x99\xde\x12\xd9\xb4\xec\x0f\x72\x86\x6b\x5a\x2e\xbb\x19\x17\x85\x21\x68\xa8\x7e\xa5\x77\x86\xe4\x5f\xde\x2b\x3f\xcc\x56\xd9\x27\x38\xe9\x06\xbe\x7b\xa5\x71\x25\x6c\xb2\x3d\xe7\x45\xbf\x65\x1b\xcc\xa0\x8e\xd3\x36\x66\x49\xbb\x44\x6d\x63\xca\x2d\x32\x82\x63\x20\x5f\x72\xa5\xc3\x72\xf7\x96\x1e\xc0\xd1\x6c\x73\xb4\x44\xf4\xf7\x32\xf1\xaa\x5d\x11\x73\xd9\x1b\x65\x21\x72\xc9\x89\xa4\x3d\xf3\x28\xe0\x74\xf0\x90\xce\xa0\x03\xf7\x00\xb8\xa9\x19\x56\xe8\x46\x66\x2b\x83\x66\xa2\x29\x99\xbf\x02\x67\xe0\x7d\x4a\x8d\x17\xdb\xde\x00\x76\x31\xf0\x81\x4b\x26\xd1\xa7\xfb\xcf\x33\xc3\x40\x3b\x30\x3b\xd9\x56\xec\x4d\x95\x6d\xee\x5d\x0c\x37\xf9\x4c\x70\xf9\x4d\x39\xa6\x20\x17\x6a\x6a\xa6\xcf\x0a\x2c\xf1\x94\xdf\x0d\x69\x67\x7b\x2e\x25\xdd\x5d\x4e\x15\xad\x4c\xe3\x53\xea\xdf\xcd\x15\xc9\x97\x4c\x02\x8d\x68\x7c\xaf\xad\x58\x06\xc5\xcd\x7b\xc3\x42\x64\x9e\x9b\x53\x38\x3c\x99\xcf\xda\x0b\xd3\xac\xa5\x05\x05\x14\xa9\xaa\x26\xd2\x57\xff\x1a\x5d\x4a\x31\xcd\x25\x6c\x59\x42\x18\x39\xe1\x3a\x2e\x8a\xaa\x62\x2b\x09\xdc\xcb\xb9\x4f\xcd\x88\xb1\x79\xd0\x27\xe0\x86\xa6\x9b\x46\x8a\x71\xf0\xaa\x79\x24\x06\x93\xf1\x4f\x11\x88\x52\xcb\x59\xcd\x7e\x30\xbb\x18\xf2\x0c\x85\x4a\x38\x43\xf9\x1f\x91\xbf\x00\x11\x77\x0c\xe6\x66\x34\x55\xbd\x5f\xe4\x9e\x23\xd4\xb5\x55\x29\x9f\x80\x0f\xf7\xf4\xcb\x9e\x56\xbb\x8c\xf1\xd2\x9b\x79\x5e\xc5\x33\x68\x8b\xa5\x23\xe6\x42\xaa\x25\xa4\x91\xbf\x2a\xaf\x88\xcd\xe0\x44\xd3\x78\x6e\x96\x5b\x7a\xb1\xc4\x04\x35\x62\xbd\xa3\xcc\x40\x9c\x2f\xa0\x25\xd1\x25\x7e\xa5\x71\x53\xee\x58\xd9\x85\x82\xdf\x61\xc6\x35\x84\x5d\x2b\xc3\x26\xcd\x81\xfa\x62\x20\x09\xe1\x90\x36\x36\xa0\xd4\x4f\x4d\xb7\xf0\x6a\x28\x87\xd7\x29\xee\xc8\x23\x99\x7b\x05\xd0\xeb\x6c\x9e\xf0\xda\x75\xbe\x1a\xc5\x2a\xb7\x56\x7c\x34\xb2\x03\x0f\xa5\xb1\x01\xff\x02\xc4\xd1\x15\x36\xd9\xc4\xeb\x1b\x3c\x9f\x00\x3b\x64\x56\x20\x02\x0b\x6b\xf8\x68\x1b\x40\x55\xcc\xf4\xc3\xb8\x8b\xb8\x12\x07\xc2\x3f\x54\x1a\x0a\x21\xd9\x1a\xe0\x6e\x26\x55\x8a\x61\xfa\xa9\x19\xec\xba\x0f\x80\xee\xfb\xf7\x26\x87\xf6\x9f\x95\x1a\x72\xf7\xcf\xcd\x9a\x03\xac\x5f\x10\xe3\xcc\x35\x74\x2d\x1a\xb4\xef\xe1\xb6\x42\xed\xb5\x85\xdc\x08\x04\xac\xe0\xfa\x34\x26\x92\x37\x49\x71\x35\x16\xbc\x30\x49\xf3\x3e\x8c\x89\x54\x94\x27\xf2\xee\x0e\x6c\xe2\xea\xe6\xc6\xef\x65\x66\xa7\xba\x95\x1f\xfa\x17\x36\xa5\x31\x2e\x22\x5e\x4d\xa5\xbc\x7a\x80\x9b\x74\x02\xc1\x69\x94\xcd\x87\x48\x5b\xc7\x23\xad\x95\x75\x5c\xc6\x08\x15\x40\x90\x0d\x41\xce\x6f\xb4\xe6\xd1\x55\xce\x2e\xb6\xa8\x14\xa4\x9b\xdd\x8b\x14\xaf\x14\xf4\x82\xd9\x9e\x3d\x56\xec\x8a\x80\x45\x9f\x9e\x8a\x27\x3b\x18\x35\x9d\x9e\xb9\xa4\xb0\xc4\x57\xa0\x7b\xd8\xd2\x3c\x9f\x2b\xfb\xf2\xb3\x77\x7a\xf9\x21\xb5\x36\x6c\x5e\xe1\xbc\x22\x62\xf8\x70\x34\x22\x10\x03\xa6\x95\x74\xae\xee\x38\xa9\x86\xf8\x29\x6a\x88\x56\xbb\x8e\x1b\x02\x2e\x63\x0c\xef\xdd\x8c\x89\x02\xbb\x19\xff\x20\x65\x04\x7f\xd6\xc8\xed\x9d\x05\x0f\xa5\xae\x48\x94\xe5\x13\x85\xcb\x22\x9e\x4e\xc8\x71\x4c\x2f\x51\xd6\x74\xc1\x46\x23\x51\x8c\x01\x1d\x1e\x1b\xf0\xde\xcc\xd5\x03\xa8\x48\x9c\x7c\xd5\x28\xcf\xf1\x20\x19\xb4\x96\xce\x7e\xc4\x81\x3f\xaa\x15\x6c\xf9\xc0\xf3\xb8\x13\xee\x92\x05\xfb\x28\xf5\x26\x5d\x53\xe0\x99\x6a\x5f\x27\x39\x5b\x38\x5a\x9b\x5e\x50\xc6\x1a\x0c\xc6\x62\x94\x7e\xb1\x2d\xbb\x83\x85\x65\x52\x90\x3c\x19\xb4\xe9\x10\x75\xdc\x80\xd1\x38\x1c\x98\x7f\x4d\x66\xc4\xbf\x99\xb3\xbd\xb2\x04\x40\xb6\xa7\x2d\x25\x5e\xc8\x78\xd8\x22\x6e\xc7\xb4\x89\x56\x50\xfc\x18\xc2\x81\xed\x3d\x87\x68\x48\x4f\x13\x8e\x46\x03\x83\x36\xc1\x72\x04\xbf\xc5\x8e\x46\xf5\x66\xca\xc7\x4c\xc2\xc0\x35\x02\x87\x28\x76\x19\x71\x22\x66\xdd\x13\x5e\xd0\x47\x7d\x5e\xbd\xf9\xa2\xa1\x31\xdc\x56\x2f\xed\xdd\x0d\x86\x50\x1c\x71\x6d\x0a\x15\x0a\xd2\x81\xe5\x7b\xc6\x65\xed\x97\x90\x53\xd3\x30\x6b\xd8\x9f\xf6\x31\xdf\x46\xab\xad\xe9\xce\xa2\x67\xdd\x32\x3e\x96\x7f\x3b\x96\x70\xe7\x74\x2a\xb6\x6a\x11\x23\xff\xe6\x33\xc7\xda\x7f\xda\xfb\x45\x55\xfb\xd7\x17\xf6\x4e\x08\x62\x02\x59\x03\x63\xad\x86\x9f\xb4\x14\xbc\xd0\x65\xe3\xde\xf5\x5c\x71\x33\x9c\x90\x65\x70\xa5\xc0\x15\x94\x9f\x2f\x01\x6c\xd6\x59\x9f\x1f\x09\xd5\x9b\xb8\x19\x6f\x2c\xe0\x79\x3d\xf5\x20\x37\x1a\x78\xbd\x73\x6f\xef\xf8\x0e\xf4\x41\x48\xb1\x57\x4d\xf9\xa4\x37\x51\x9a\xc7\x24\x80\xe4\x73\x3a\xd2\xc8\xd4\x40\xcd\xb2\xa0\x39\x5a\xd7\x16\x38\x17\xe5\xf9\xd4\xbd\x5c\xd5\xc4\x86\xf0\xe3\xf9\xa5\x1c\x64\xd8\xdf\x0f\x4c\x00\x9e\x4e\x40\x7d\xdb\xa6\x04\x9d\x5b\x54\x4c\x71\xa3\xce\x91\x17\x1d\x97\x9a\x1a\x4a\x54\x7d\x18\xd0\x07\x8e\x3e\xaa\x84\x35\x71\xdf\x6c\x01\xcc\x43\x86\x54\x20\x03\xeb\x3f\xfb\x08\x90\x19\x1d\x4f\x51\x31\xc2\x0a\x0b\xb6\xa9\x26\xb4\x45\xb1\xe1\x99\xaa\x82\x15\x9a\xfb\x07\x19\x35\x30\x17\x2e\xe4\xc7\xd4\x47\xb7\x0d\x5a\x6c\x31\xe6\x78\xe1\x97\xa7\x5d\x64\xe9\x89\xa6\xa0\x02\x9c\x20\x17\x74\x25\x23\x23\x8a\xeb\x19\x71\x34\xde\xf2\xad\x8a\x81\xbb\x44\x13\x22\x18\x9f\x99\x29\x67\xe2\x0d\xc3\x90\x46\xe3\xb8\xa2\xa3\x58\x17\x4e\x36\x2b\xac\x67\x07\xc6\xa8\xe6\x3e\x39\x5d\xdb\x7f\x3a\x1c\x55\xcf\xe3\x8a\x29\x66\x1d\xc7\x8a\xa9\xd8\xc2\x15\x3f\x32\xf1\x89\x95\x5b\xef\x26\x5a\x01\xd7\x0e\x75\x18\xd8\x6d\xb5\x2c\xb9\xcb\x7e\x30\x29\xe5\xca\x46\xce\x50\xae\xe8\x4b\x8f\xbd\x31\xb4\xd0\xf5\x0e\x00\x6d\x90\x17\x4c\xd2\x1c\xaa\xa7\x66\x7c\x9f\x15\xd2\x02\x05\x2a\x1f\x34\x2c\x57\xda\xc4\x83\xc4\x2b\x5b\xfa\x7c\x51\x68\x37\xb2\x30\x18\x42\x5c\xb5\x05\xa8\x43\xc1\x3a\x07\x5a\x18\x9c\x23\xec\x7e\x23\x26\xa2\x86\x36\xf2\xe9\x5c\xaa\xf2\x83\x7b\xea\x20\xff\x65\xaf\x8f\x96\x1a\xdf\xcd\x58\x5e\xca\xf8\xf2\x2d\xc8\x47\x47\xd4\x06\xac\x16\xb8\xba\x76\x3b\x4a\x65\x19\xd1\xb2\xee\x89\x3d\x7b\x70\x01\x28\x66\xca\x0e\x97\xe2\x2d\x93\xe5\x7d\x27\x36\xf5\x48\x16\x40\x23\xeb\x4d\xcf\x8f\x26\xbd\x83\xc1\x74\xd2\x66\x3e\x64\x03\xe8\x93\x3b\xb8\x75\x35\xb0\x33\x63\x3e\x08\x4c\xa0\x76\x1a\x7f\xbc\xfc\xe3\x10\x67\xd1\xc2\x74\xfc\x52\xb5\xcd\xcb\x8f\x8e\xd2\xce\x3b\xc8\xac\x56\x95\x71\x5f\x1f\xc0\x83\x32\x8c\x14\xa0\xa4\x62\xb2\xea\xbe\xfc\xbd\x67\x76\xfd\x76\x04\xfd\x3f\x2a\xea\xa6\xbf\x9c\x66\x3b\xfc\x8e\x60\xa7\x84\x80\xf0\x0c\x68\xdb\xd4\x67\x4d\xcd\xe5\x99\xd5\xfc\x44\x8a\xcb\x60\xb3\xc0\x06\x69\x39\x71\x8d\x6e\x76\x98\xa1\xe1\x35\x20\x9a\xe5\x81\xe6\xe2\x09\xab\xb0\x10\x5b\x3c\xe7\xc2\xaa\xea\x19\xfe\xb5\x6e\x81\x4d\x98\x1d\xb7\x56\x30\x94\xf6\x2f\xda\xf6\xb8\x31\xa1\x9d\xf7\xe4\x23\x4a\xf6\x73\x0d\x14\x38\xda\x4f\x7c\x6e\xae\x1d\x5d\xe5\x00\x21\xee\x45\xf7\xad\x32\x1a\xa2\xf3\xc8\x7c\xcd\x9c\x28\xaf\xd7\x8b\xb5\xa1\x55\x76\xf0\x03\x63\x00\x0e\xe3\x1b\xbb\x4d\x3c\x43\xc9\xeb\xa6\x65\x4d\x8b\xa3\x71\xb6\xac\xf9\xb8\x2a\x79\x05\x0c\x33\xbf\x8a\x4c\x6b\x67\x39\xc2\x5f\x90\xaf\x9d\xae\x46\x8e\x93\x69\xf1\x6f\x65\xb3\x4d\x3a\x6a\xf4\x12\x44\xde\x3a\x85\x66\xb9\x2a\x01\xe5\x03\x7d\x66\x7c\x1f\x23\xe3\x31\x83\x2f\xd2\x30\x03\xcc\x56\x35\x4c\x08\xba\xa0\x99\x08\x91\xd9\x44\x1f\xa7\x29\xe5\x28\xcd\x1a\x40\x7f\x13\xdb\x5f\x26\x85\xd9\x7d\xc8\x97\xc3\xdd\x96\xb2\x79\xca\x41\x36\xef\x2f\x5d\x1c\xce\x19\x51\xf6\x3d\x91\x92\x75\xd4\x1e\xfe\xfd\xca\x2d\xd9\x94\xd3\xc3\x44\x75\x8b\xbf\xe1\x06\x49\x47\xdb\x60\x2e\x23\x8b\x41\x3b\xd5\xe7\x86\xf6\x30\x8a\x65\xf1\x42\xe5\x25\xa0\xf8\xb3\x21\x5a\xd6\x72\x06\x78\x9f\x4b\xee\x92\x5e\xe6\x2d\xce\x70\x71\x1f\x8c\x52\xf0\x11\xf8\x4d\xf9\x9e\x01\x0b\xec\x00\x58\xf3\xb6\xd4\xe7\xde\xb2\x6a\x5e\x15\xf4\xa5\xa8\xc6\xa8\xed\x99\x96\x4f\x9a\x92\x9d\xd4\x23\xdc\xec\x8d\x88\xa1\x17\xee\x53\xec\x28\x5f\x2a\x79\xef\x01\x23\x48\x98\x6a\x4c\xf7\x08\x97\xfa\x9e\x30\xcc\x4e\xf5\xeb\x5d\x83\x5d\x4c\x24\xa6\x2e\xb4\xd0\x41\x52\xda\x4c\xc3\x45\x39\x9c\x95\x2d\x94\x15\x17\xd9\x0b\xe2\xa7\x97\xce\x76\x39\xaf\x28\xb3\x6e\x2c\xab\x0f\x91\x2a\x40\x5c\x47\x32\xde\x9b\x2b\x2d\xa7\xeb\x0e\x2c\x40\x9d\x35\xb0\x7c\x4b\x9b\x6b\xd0\x74\x41\xd5\x2f\xd4\x62\x1e\xea\xf5\xcc\x50\x62\x33\xec\x3e\xe3\x70\x90\x88\x62\x77\x4a\xe8\xc3\x4a\x9c\x99\x0e\x07\xbf\x17\xa0\x11\x01\xa9\xa3\xa0\xd6\x27\x59\xd9\x8c\x71\x39\xed\xa8\x07\x94\xc5\x63\xa5\x8b\x9e\xb6\xd3\x71\x8b\x5f\x29\x40\xac\x45\x59\x06\xb4\x4e\xf3\xb6\x48\x0b\x74\xaa\xe6\x40\xf3\x9d\xa5\xd1\x66\xa7\x17\x40\xb0\x32\xed\xb5\x99\x87\x38\x95\x2f\x8c\xe5\x89\x20\x6f\x8b\x0f\x63\x97\x59\xf1\x22\x3f\xad\xc2\xf0\xb0\xf0\x31\x03\x33\xab\x6f\x8d\x35\xab\x33\x5b\xaf\x83\xc0\xcd\x55\x70\x30\x71\x8b\x15\x06\x70\x8d\x92\x08\x2f\xd6\x46\x0b\xdb\x13\xdc\x9c\x68\x74\x45\x54\x36\x02\x06\x82\x4d\x8a\x32\xb1\x2c\x3e\xe1\x0e\x8e\x13\x73\x44\x3d\xd3\x21\x59\x67\x88\xd7\x64\x25\x87\xa2\x82\x26\x61\x20\xd4\x79\x29\x06\x63\x2c\x26\xff\x34\xd8\xa7\x08\xe8\xbf\x35\x2b\x74\xc5\x3f\xec\x69\x5b\xeb\xfe\x25\x29\x88\xbf\x5e\xf5\x2d\x3f\x19\x99\xeb\xe6\xda\x21\xcc\xed\x88\x5a\x36\x0e\xea\x67\x69\x15\xae\x4b\x86\xd8\xce\x9a\xf8\x73\x93\x14\x5f\x63\x1a\x46\x49\x3c\xfb\x4e\x4e\x65\xeb\x46\x1b\x58\xbc\x79\x3b\x78\xd1\x09\x83\x1a\x6e\xfc\xae\x4a\x93\x11\x7d\x38\xc6\x77\xf3\x12\xa9\x8a\xc5\xc3\x0f\x34\x5b\xce\xa9\x7a\xbf\xe7\x41\xff\xb6\x3b\xd9\xee\xb4\xb1\x55\xb0\x58\x27\x0b\xe4\x83\x27\x3a\x05\xeb\x8a\xa0\x0b\x4d\xab\x33\xe8\x01\x1e\xe5\x3d\xc9\xb3\x3d\xd5\x52\x04\x46\xc7\x09\xe8\xeb\x75\x95\x73\xe5\x26\xec\x4d\xda\x55\xa4\x41\x97\x95\x24\x6d\x11\xdf\x4f\x31\x48\x21\x5c\x97\xf9\x9c\x1f\xc6\x37\x2e\x86\x71\xb3\x5d\xd5\xb9\x45\x43\x7b\x31\xf7\xe6\xb9\x3d\xb4\xb0\x2f\x7a\x8f\x6e\x1f\x2d\x2c\x24\x26\xfd\xe8\xd8\x82\xc0\x76\x15\xd7\x5e\x1a\xe7\x4a\xc6\x8d\x1f\xfa\x9e\x69\x5f\xd8\xc6\xab\x8e\x52\xb4\x51\xca\xc0\x64\x88\x8d\x38\xd9\x47\x5f\xe0\xc7\xef\x7c\x81\x93\x11\xb7\xac\x5a\x6c\xb7\xa7\x11\xe7\x58\xac\x19\x66\x0b\x2b\xb7\x2c\xc1\xa3\x6c\x5f\xdc\x20\x5a\x09\x5e\x10\x2e\xb8\x36\x06\xa2\xe1\x42\x2c\x12\xbd\x06\xbf\xfd\x5b\xc4\x24\x2e\x74\x8e\xb2\xf4\x0a\x4d\x92\x34\xe7\x27\x2e\xd6\x5f\x3e\x5b\x03\x1f\x52\x62\xae\x16\x62\x6e\xae\xd3\x09\xd5\xf0\x41\x08\x3b\x1d\x92\x3e\xa8\x4c\x41\x2c\x90\x54\xdf\x86\xa0\x17\x42\x5a\xa8\xea\x7a\x8a\x20\x6b\x77\x76\x65\xf8\x56\xd6\xf4\x59\x03\xab\x30\x1f\x8c\x72\x77\xad\x48\x39\x29\xc8\x74\x90\xaf\xdd\xce\x05\x43\xcb\xfb\x35\x03\x74\x9b\x4a\xd0\x27\x21\xf8\x57\xbc\xd4\x11\x20\xcb\xf6\x0b\xa5\xdf\x3d\x78\xa8\x4f\x79\x5c\xb6\x07\x5e\x25\x58\xb5\x53\x87\x0e\xd7\x86\xbd\xbe\xdc\x45\x41\x13\xaf\x80\x70\xe8\x94\x78\x9a\xa7\x38\xe2\xee\x8c\xdd\x8c\x47\x11\xdd\xa3\x20\x43\x82\xce\x90\x71\x62\x14\xfb\x7c\x2c\x67\xca\xe6\xa2\xec\x28\x05\xd2\x8a\x1e\x0d\xf0\xee\x60\x10\xfa\x66\xaa\x51\xe3\x02\xf9\x23\x28\xd9\xf3\x8e\x7b\xd6\x48\x88\x80\x29\xd7\x20\x66\x4e\xe3\x71\xc4\x98\x28\x10\xdd\x99\x50\x49\x29\x3b\x7e\x98\x21\x3e\x4b\xf8\xb7\x51\x4b\x2d\xe1\x20\x89\x8a\x16\xdf\x4a\x4f\x56\xf1\x44\x53\x60\xef\xf9\x7b\xbc\x3c\x2a\xc5\xd8\x59\xf3\xdf\xef\xfb\x6e\xcc\x01\xf5\x83\xea\xf0\x55\xc9\x49\x39\x4b\x30\x51\x83\x63\x6b\x92\xdb\x0b\x60\x4a\xa1\x5d\xfa\x0d\x23\x30\x9b\xb3\x91\x90\xfd\xec\x8a\xfe\x37\xbf\x9b\xdf\x7d\x97\x7f\x56\xc0\xf6\x7f\x3e\x1e\x1f\xbe\xfb\x27\x80\x84\xe0\xfe\x80\x03\xbe\xe5\xea\x5b\xda\xc9\x2a\x0d\xeb\x37\x50\x17\x06\xd9\xe0\x45\xef\xfd\xb2\x93\x3a\x85\xc3\x8b\x23\x96\xc7\xfb\xa4\x59\xc1\xfa\x78\xbb\x7f\xb2\xb3\x73\xba\x1f\x8f\x51\xbe\x55\xcf\x7d\xc6\x6d\xfd\x06\xee\x86\xb4\x9c\x6a\x3a\x80\x6f\xea\x13\x7e\x14\xe0\x8d\x1a\xd3\xab\xb6\x28\x36\xf1\xe6\x7c\x9e\xb3\xf9\x5a\x02\x26\x49\xd6\x75\x53\xc0\x4e\xc7\xce\x50\xcf\x50\x28\x40\x09\x0e\x92\x29\x30\xc8\x13\x50\x9e\x56\xbb\x97\xa8\x4d\x17\xe0\x7d\x99\x69\x4b\xce\x51\x66\x24\xbb\x19\x4c\x31\x28\x16\x3b\x78\x8e\x26\x09\x52\x2a\x9e\xb9\x6e\xf3\xbc\x13\x75\xbf\xab\xcb\xf7\x92\x80\x64\xa1\x8c\x85\xfe\x56\xce\x4b\x90\x34\x60\x3c\x08\xed\xf4\x00\xdc\x8d\xf2\x2d\x83\xef\xc6\x5b\x8a\xcb\x78\x36\xb8\x71\xa3\xe2\x4d\x7b\x93\x0c\xa9\x4a\x43\xd2\xe9\x82\xf6\x98\xc4\xf0\x86\xb2\x0c\xaa\xaf\xed\x7d\x5e\x33\x5a\x1c\x60\x09\x88\x98\xa7\x57\x3f\x32\x89\xfb\xa2\x75\x67\x34\x37\x7d\xa0\x78\x1e\xed\x1f\x5e\x5d\x59\x0e\x71\x99\x06\xff\x5d\xc4\x98\x60\x84\x71\x73\x46\x33\x84\xb5\xaf\x75\x98\x97\x07\x32\x92\xd8\x0b\x81\xc2\xb7\xd3\x8c\x03\x20\x6f\x18\x30\x01\xd2\x5d\xc3\x2e\x17\xf3\x8a\x9a\xf2\xbd\x6c\xf5\x43\x18\xfd\x78\x8b\x36\xfa\x0d\x21\xac\xc9\x6c\xd2\x7d\x0d\xbb\x22\xee\x33\x32\xe0\xc6\x0c\x58\x03\x09\xb4\x64\x64\xb3\x03\x75\x9a\x56\x5a\xdb\x06\xa1\x55\xb4\xe1\x47\x5d\xef\xc6\xc8\x2c\x79\xb4\x19\x4e\x45\xe1\xdd\x96\xa7\x1f\xa9\x42\x26\x2e\x84\x42\x4c\x16\xe3\x83\xbb\x7d\x9c\x1f\x4f\x8a\x7f\xd1\xaf\x32\x30\x5f\x08\x15\xb3\x91\xbf\x59\xc3\xf1\x76\x9a\x75\x59\xa3\x35\xe7\xe2\xb0\xc8\xf2\x09\x10\xaa\xa0\xf7\xb9\xa6\x38\xd0\x81\xd2\xdd\xc5\x24\x65\xaa\x1c\xaf\xa7\x18\x5b\x77\x65\x92\x44\xd8\xa8\x68\x3a\xd1\xe2\xeb\x9a\x3b\xc1\x9d\x92\xe9\xdd\x82\x4e\xd4\xed\x43\x32\xdc\x86\xaa\x8a\xf5\xf1\xe5\xeb\x33\xe9\x7b\x8a\x3a\xe2\x76\xc4\xd4\x4b\xf9\x7e\x92\x7b\xd2\x13\xd0\x80\x9b\xa4\x18\x95\x53\x12\xe8\x3e\xad\x4d\xfb\xe3\x71\x3c\x0a\x3a\x8d\xfe\x54\x91\xcf\xf0\x21\x71\x45\x34\xf3\x79\x94\x82\x1b\x58\xe8\x80\x99\x0d\x5c\x38\xfb\x98\xc6\xa3\x5e\x44\x12\x39\x95\xb6\xca\x74\xfe\x83\x5d\x9c\xae\x58\xdb\x27\x99\x03\x9d\x81\x31\xdb\x5b\xb6\xd5\x53\x05\x26\xe8\xc6\xf4\xc3\x93\xa4\x77\xa2\xba\x06\x14\x0a\x04\xb0\x15\x55\x30\x79\x3e\x31\xd6\x67\xc9\xa1\xac\xd9\x79\x8c\x86\xf5\xa4\x1e\x96\xed\x9c\x9f\x54\xff\x46\xee\xc0\x80\xcd\x70\x31\xac\x8e\x79\xa8\x4e\x52\x71\xf2\xfc\xad\x15\xb9\xcf\xce\xec\x1f\x16\xe1\x7f\x1c\x67\xb3\x52\x01\xf4\x93\x1d\xcf\x66\x67\x09\x4f\xb5\x3a\x4f\xeb\x2c\xb9\xcb\x7a\x63\xa8\x2c\x2e\xc7\x0a\xb6\xcf\xf4\xce\xd7\x13\xe6\x4a\x00\x98\x99\x12\x8d\x1f\x91\xae\x9b\x8b\x53\x1e\x0a\x23\xa0\xdb\xb2\x6a\xa6\xca\x28\xca\xba\x32\x48\xff\xb1\x5c\x1a\xcd\x32\x02\x34\xa9\x27\x3d\x82\xfb\xb9\x87\x4f\xfc\x41\xeb\x7a\x7a\x8b\x37\xf7\x1d\x97\x6d\x64\x8e\x42\xe7\x1e\x2d\x32\x84\x2a\x79\x94\x98\x6f\xa2\x3e\xe7\xf7\x63\x9a\x9f\x72\xc5\x96\x2e\x7f\x82\xa9\x7a\xe8\xda\x66\xab\x57\x68\xa2\x50\x3c\x12\xbd\x7c\xce\xd1\x96\x32\x23\xc1\xea\x11\xce\x5c\x0f\xa0\xd7\xcd\xc6\x85\x91\x19\xa6\x62\x1e\x66\xf7\x3a\x2c\xc0\x7c\x76\xfc\x00\x05\x3f\xa9\x9f\x9e\x8e\x3e\x6b\x3a\x4f\xeb\x3d\x23\xa0\x35\xc0\xde\x35\x83\xd2\xb9\xcf\x32\x3e\x60\xbe\x7e\x54\xd8\x60\xd6\xf7\x22\x2e\xeb\xc7\x75\x4e\xd8\x7f\xad\x9c\x2a\x18\xe5\x40\x81\x94\x27\x17\x1e\x94\x27\x32\x3e\xee\x77\x73\x03\x93\xdf\xcb\xe1\xd0\x3b\x7f\x8a\xf0\x5d\xbc\x8b\x8a\x8d\xc7\x39\x6e\x1c\x9f\xb1\x5c\xcf\xd8\x91\x45\xaa\xde\x40\x55\xd5\x8f\x46\x97\x62\x54\x0a\x32\xa9\x0c\x58\xc9\x22\xb4\xde\x09\x5e\x15\x08\x6a\x5c\x92\x60\xc9\xf8\xa8\x0e\xc0\xdd\x39\x72\xf2\x87\x32\x85\xf7\xd8\x63\x9f\x3d\x73\xd5\xb6\xbd\xd2\x02\x19\x19\xbf\x9e\x2f\xd7\x5e\x06\x08\xcb\x2f\x27\x8d\x13\xf3\x5a\x1f\xed\x3e\x90\x8a\x3b\x4a\x22\x45\xd4\xa1\x42\x8c\xcb\x6f\xd7\x20\xd6\x09\x73\x46\x52\x26\x14\xfd\xd1\xbc\x48\x28\xd7\xa0\xce\x9d\x25\x66\xa3\xb7\x4b\xde\xad\xc9\x77\xd7\xef\x0d\x9b\x5f\xf9\xd1\xdc\x70\x36\xed\x79\x31\x16\x8d\x1e\x0a\x84\xed\x73\x1e\x3b\x07\x5c\x95\x42\xdc\x1c\xd8\x45\xb0\x0d\x4c\x14\x67\x6e\xaf\x54\x31\xb2\x3c\x6c\xde\x65\xa1\x5e\x5b\xe7\xd1\x32\xd1\x8f\x44\xfd\x22\x21\x8c\x51\x11\x22\x15\x6f\x30\x15\x84\x0e\x4d\x9e\x04\xb2\x60\x7e\xfa\x60\x82\xe6\x07\x32\x43\xb5\xc1\xec\x11\xdf\x4e\x81\x78\x41\xd6\x93\xa5\x01\x72\x84\x72\x39\xf7\x30\x63\x17\xec\x9c\x60\xb5\x03\xc1\x01\xcc\xb0\xdd\x09\x7d\x29\xe7\xfe\x06\xa4\x38\x69\x78\x4f\x74\xe7\x8d\x26\x85\x12\x59\x63\x6f\x8c\xdb\xc0\xab\xa4\xf6\x4e\x0a\xfc\xab\x8d\x66\x6c\xe0\xbc\xa4\xbb\x88\x6f\x5c\x75\x1a\xda\x8c\xd2\x01\xcb\x2e\x99\xd1\x03\xd7\x42\x1a\x68\xd5\x82\x6d\x05\xf6\x7c\x15\x40\xa4\xc2\xe1\xab\x2b\x6a\x9d\x14\x3c\xed\x24\x0d\x0b\xf2\xa6\x6d\xac\x7b\xc4\x8e\xdf\x99\x55\x3c\x8a\xb8\x27\xde\xf0\xd9\x05\xb4\xa3\x12\xd2\x59\x22\x4c\xeb\x52\xc8\x55\xff\xe7\x29\xba\x0c\x2e\x2b\xef\x78\xd2\xe5\xfe\xf7\x6e\x62\xe9\xd7\xe6\xff\xfd\x7f\xfe\xf8\x58\xfd\xc3\xf6\xe1\xff\xb9\xe3\xed\x1b\x50\xe3\xf1\xdb\xd1\x76\x5f\xac\x9c\x8c\x75\x88\x6e\x77\x59\x25\xd5\x34\xf3\xee\x6a\x07\x78\x57\xf6\x5c\xda\x63\xf9\x03\xb5\xc5\x35\x9d\x8d\x55\x46\x63\x49\xb0\x07\x56\x2c\xf1\x31\xed\xae\x20\xa0\xa9\x76\x50\x62\x63\x8d\x1c\x3c\x28\x4b\xbc\x73\x68\x6f\xd7\x65\x01\x52\x76\xa0\xac\xef\xc0\x1a\xe4\x55\x03\x35\xd8\x7e\xf7\x2f\x82\x25\xc5\x7b\x54\x1f\x29\x28\xa0\x69\x61\xc7\xc4\x67\x12\x06\xe8\xa8\x6f\x5e\xc6\x3b\xf3\xf6\x8a\xef\xee\x1b\x4a\x0f\x1f\x12\xfd\x82\xd2\x87\xe6\xfd\x20\xb1\xad\x2a\x9b\xae\x33\x99\xe5\xf2\x53\xba\x90\x37\xf3\x55\x7e\x70\xf9\xf7\x52\xa5\x6d\x8d\x81\xa0\xa6\x11\x79\x9b\xc8\xf6\x15\x19\x09\xc4\xfc\xc6\xfc\xc0\x07\x77\x09\x2a\xb4\x7f\x0a\x96\xa3\x02\x48\xcb\x61\xd0\x76\x06\x79\xa7\xd5\xdb\xd3\x67\x9d\xf0\x59\x20\x41\x5e\x46\x31\x2c\x95\x95\xf4\x78\xda\xbf\xb9\xc0\x24\xec\xf7\xa6\xe4\x79\xe3\x24\x2d\xf4\x0a\x26\xa6\x0e\xb9\xc6\x85\x75\x9b\xa4\xf8\x84\xa9\xd0\x22\x42\x5e\xa8\x20\x3b\xfe\x6a\x0c\x6b\x52\x00\xc3\x34\x5d\x96\x4f\x89\x68\x9a\xaa\xcf\x3b\x88\x1b\x88\x05\x05\xa4\xb4\x04\x59\xb6\x8b\xd9\x5a\x72\x9d\x5a\xf6\xe9\x20\x83\x69\xba\x04\xb4\x1c\x89\x63\xb2\xbe\x35\x4c\x17\x9b\xf9\xd4\xc8\x94\xf9\xa3\xb1\xd2\x48\x42\x9e\x6d\x78\x45\x31\xc0\xa6\x23\xa1\x31\xc8\x31\x91\x2e\xa0\x60\xc9\x44\x21\xde\xba\x6e\xa8\xa8\xb7\x15\x99\xc3\xf7\x63\xc3\xf4\x57\x6c\x8c\x6d\x63\xaa\x3c\x90\x12\xd9\x50\x88\xbd\xda\x20\x86\x5e\xfc\x90\x69\xb7\x03\xf9\xd6\x79\x92\xf4\x5f\x9d\x1c\xb9\x14\x25\x28\xb4\x61\x48\xc8\x47\x7d\x8d\x04\x59\x8c\x35\x17\x0b\x42\x20\xe9\x62\x69\x7f\xbd\x6a\xe6\xa5\xf4\xc6\xd8\xa3\x19\x34\x87\x90\x12\xe4\x66\x61\x29\xb8\x20\xe7\xe4\xe2\x1e\x36\x1d\x85\x70\x90\x8b\xcd\xf0\x35\x71\x1e\xa6\xaa\x55\x7d\xcb\x3e\x85\x9a\x9b\xb5\x0e\xaa\x99\x87\xe1\x55\xad\x8e\x39\xb0\xa5\x50\x3f\x4b\x7d\xb5\xcf\x32\x7c\x64\x4c\x7d\xb5\xc4\x8d\x89\xf7\x51\x60\x96\x0f\x73\x59\xf4\x81\x7f\x1f\x1f\x0f\x6e\xbd\x0e\xa0\x0a\x5d\x60\xd1\x38\xe0\x1b\x3b\x48\x8b\x4f\x36\x08\x61\x35\xc6\x60\x42\xef\xe3\x99\xfa\x47\x83\x8d\x56\xb7\x7b\x6a\x32\x45\xe8\x14\x27\x80\x83\xd3\xf3\xd2\xd8\x2b\x8e\x05\x8c\x91\x66\x38\x62\x18\x2f\x7b\x05\xef\x0a\x22\x94\x7d\x03\xcf\xa8\x54\x64\x81\x99\x0d\xfb\xda\xc7\xe7\x74\x12\xcf\xd5\xaf\xb1\x75\x5d\x62\xf2\xb2\xe4\xe9\xa0\x68\x5c\x19\xf5\x23\xba\x37\xba\x1c\x2d\x0e\x8e\xc6\x8e\x8f\x27\xc5\xea\x57\xbc\x42\x06\x36\x7a\x6b\xa2\xc3\x64\x85\x1c\x1a\x7e\xd9\xc4\xd8\x83\x05\x92\xda\x33\xe2\x2a\x40\xe2\x53\x35\x7f\x6e\xcb\x53\x35\xa1\xfe\xd4\x12\x3e\xb0\x5a\xe6\x38\x56\x7d\x8a\xc8\xaa\x17\x40\x57\x33\x0c\xdb\x39\x32\x6a\x0b\x05\xdc\x81\x7f\x6f\xb2\xf8\x87\x71\xf4\x47\x5d\x43\xb1\x85\x22\x01\x36\xac\xc9\x3c\x73\x0f\x6f\x7f\xf6\xc7\xb1\x3c\x66\x7e\xfe\xf1\x17\x58\xc9\x6c\x9b\x20\xfb\x58\x72\x6c\x97\x46\xe5\x9a\xf7\x50\x47\x92\x07\xa8\x74\xec\x9a\xf2\x50\x17\xbe\xa1\x69\x08\xf0\xe5\x20\xe1\x92\x05\x2d\x51\x4c\xa1\x5f\x0d\x78\x90\xa0\xeb\x27\x79\xc7\x41\xe9\x29\x40\xe1\x6f\xcc\x9a\xdb\xbd\x90\xe0\xb1\x94\x84\xa6\x92\xe0\x6f\x3e\x1b\x44\xc5\x43\x5d\x12\xb9\x67\x32\x05\xc4\x8f\xef\x79\x14\x42\x89\x47\x75\x8a\xdc\x10\x95\x04\x5f\xa5\xf4\xa5\x95\x41\x1c\x72\x44\x1d\x15\xb1\x35\x03\x8e\xe5\x73\x54\x1d\x15\x3e\x38\x8c\x07\xee\x0d\x5e\xb8\x15\x3e\x41\xf4\x5e\x80\x4c\x3f\x41\x0c\xef\x6a\x8c\x9e\xb9\x8d\x8e\xba\x7e\x34\xb3\x83\x6e\x93\x5f\x60\xb3\x5f\x1e\xf3\x61\x1a\x85\xfb\xbd\xf5\x58\x63\xcb\xea\x90\xf6\xab\xe7\x0a\xc9\x2f\x7d\x8a\xc9\x9d\x6c\x4f\x5d\x4a\xd9\xbd\xac\x8e\x3a\x4b\xb4\x44\xf5\xb9\x78\xf5\x89\x7e\xd2\x87\xba\x2d\x7f\xc0\xf5\x97\x79\xf4\x57\x79\xf4\x58\x1d\xd2\x0e\x7e\xab\x08\x87\x92\xb8\xd9\xf3\xd9\xe8\xff\x22\x57\x48\x63\xb3\x2f\xa6\xf1\x2a\xa5\xf1\xcc\x3b\xf6\x49\xa5\x84\x48\x22\xf5\x2c\x63\x87\x56\x3a\xe5\x4f\x1b\x48\xf0\xf5\xd7\x7b\xe6\xb3\x71\xfc\x6e\x93\x23\x41\xe8\x5d\x47\xdb\xb6\xe0\xa8\x5b\xef\x99\x53\xe9\x58\x2c\x8f\xee\xa3\x78\x57\x2c\x8f\x59\xd3\xf7\xa1\x2e\x93\x5d\xa8\xe0\x97\x53\x47\xf0\x57\x9f\x7e\xda\x4a\xff\x6d\x3e\x69\x2c\x89\x99\xd3\xf0\xb0\x4b\x47\xe0\x5d\x7f\xfe\xbc\x67\x81\xba\x5e\x1a\x25\xb4\x32\xb5\x50\x29\x33\x84\xfe\xd0\x47\xf1\xfc\x9a\xff\x3e\x47\xa0\xb3\x92\xc4\x4b\x7f\x85\xc3\xe0\xe8\x37\x94\xc7\x2b\xf5\x68\x2f\x8d\xcd\xb3\x8c\xd5\xfe\x87\x2f\xa5\x9d\xd1\x29\x72\xbb\x17\xfc\xca\x17\x53\xd8\x96\x12\xfd\x84\x12\x7d\xe6\x3c\xd4\x39\x3f\xf5\x6f\x02\xa9\x3d\x4b\x89\x7e\x33\x89\xbe\x14\xc1\xf4\xcd\x8e\x59\x42\x64\x3c\x52\x89\x46\x8b\x67\xf8\x79\xbd\x00\x9b\xd6\x30\x1e\x05\xea\xb6\xf9\x64\x8e\x5e\xe0\xd0\xca\x0f\x5f\xe1\xf0\x35\x8b\x1c\xc2\x0d\x1c\xdc\xe2\x13\xdc\x81\x4c\xc9\xf0\x05\xcc\xf0\x45\xd1\xf0\x47\xde\xed\x47\xde\x84\x42\xd6\xf1\x13\xd4\xf1\x07\xc8\xf0\x85\xbf\xc8\x73\xcf\x04\x0d\xf7\x34\xc2\xa1\xbf\xc8\x1b\xfe\x55\x9e\xfb\xdf\xca\xb3\x3b\x86\xfa\x31\x3f\x7e\x00\x11\xae\x14\x3e\x59\x9c\x8e\xa9\x90\x3e\x39\x02\x35\xbf\xdb\x90\xc8\x22\xfc\x2d\x25\xf1\x48\x90\x50\x75\x79\xa8\xfb\xd1\x5f\x9f\xc6\x35\xe5\x57\xd1\xe5\x07\xcc\xec\x47\xde\x09\x92\xdb\xf0\x9b\xdb\x08\x82\xdb\x0a\x4c\xc9\x0a\x0c\xd4\x0d\x44\xd6\xec\x4b\xd6\xf2\x9d\xdb\xf0\x94\x5f\xf2\x52\x89\xee\xcb\x08\x1e\xf3\xd9\xfd\x8b\x3c\xf7\x5f\xe5\x0d\xff\xad\xbc\xf3\x87\xee\x3a\xfa\x1f\x7c\xf1\x87\x8f\x72\xf4\x6f\xfe\x18\x0c\xae\xf4\xb3\xdf\xcf\x78\xfb\x2d\xfe\x7c\xac\xb1\x79\x1a\x2b\x24\xb1\xcf\x90\x10\x52\xa4\xf0\xf8\x11\xe7\x45\xa7\x80\xf6\xe2\x53\xaf\x43\x31\x0c\xa3\x96\x5e\xe0\xb2\xa1\xdc\x67\xa5\x68\xe6\xfe\x6d\xba\x82\x8d\x23\x3b\xe9\x41\xf9\xb0\xe7\x9a\xc8\x9c\x7e\x10\x66\x17\x01\x25\xdb\x20\xdc\x81\xcf\x13\x0b\x4f\x62\x1b\x07\x3e\x3c\x78\xad\x60\xd3\x52\x14\x1e\x0b\x82\x02\xb9\xcc\x93\x38\x41\x67\xac\x0a\x2b\x19\x43\xe2\x12\x0b\x82\x66\x79\x07\x90\x68\x85\x1c\x05\x84\x9d\xb0\xee\x5a\xc6\x3e\xa7\xb6\x6f\xd7\xf5\x69\x9b\xb2\x21\x3d\x3a\xcf\x92\xdf\x5c\x45\x8a\x2e\xf0\xc6\x0e\x0d\x50\xfc\x3b\x0d\x1a\xbd\x93\x37\x7d\x92\x33\x52\xf2\x60\x43\x69\xc1\x10\x5c\xd1\x56\xd9\xe8\xa9\xbd\x08\x6a\xde\xaa\xf4\x36\x97\x75\x43\x2e\x47\x4c\x5e\xa3\x2c\x40\xa4\x1d\xa7\x8d\x13\x46\x15\xbc\x0f\x32\xab\xc2\x40\xd9\xd1\x57\x52\xc3\xd0\x3f\xda\x28\x5f\x9b\x49\xbe\x30\x52\x64\xc9\x92\xa6\xa2\x06\x9b\xc2\x48\xc3\x91\x05\xfe\xde\x56\x83\x86\x19\x6a\x4f\xe2\x0a\x38\x88\x5d\x06\xdb\x91\x89\x81\x41\x83\xe7\x05\x58\x44\x61\xa3\xf9\x7d\x4d\x18\x11\x5f\x2d\xcc\xe8\x2e\x0a\x9e\x3a\x5c\x01\xad\xd4\x17\x05\x3d\x2c\x5e\x11\x7c\x7d\x6f\x43\x8b\x25\xe4\x9d\x6f\xac\xa2\xd7\xbb\xe0\xb2\xf0\x45\x8b\xb1\x49\x4d\xc3\x0f\xcb\x1b\xf6\x21\x61\x25\x8b\x99\x00\x41\xc7\x75\x2e\xa3\x7d\x19\xe2\x48\x65\x9d\xc7\x0b\x45\x14\x44\x4f\x53\x02\x40\xa2\x74\x0d\xd8\x73\x48\xfb\x4a\xa9\x56\xf8\xea\x22\x3c\x36\x44\x31\xf9\x5a\xe8\x0f\xf1\xcd\x6d\xad\x74\x3e\x5d\x53\x32\x52\xc6\x5f\xd1\xfd\xe5\x65\xf8\x90\xf2\xb1\xe3\x12\xa5\x29\x0c\x2a\x12\xed\x86\x32\x36\xdc\xee\xdf\xf2\x39\xb0\x3e\xc9\x39\x01\xc3\x84\x6a\x8d\x0d\xf9\xb8\xe2\x0a\x60\xa8\x1b\xd5\xb4\xe4\x4e\xbe\xfd\x99\x07\xef\x34\xda\xd2\xca\x4e\x49\xd9\x28\xf0\x92\xf4\x9e\x91\xeb\x18\xb3\xc0\x49\x6c\x0c\x85\x81\xf0\x25\x72\xcf\x39\x93\x4d\xb6\xc3\x6c\x0d\x2c\x59\xae\x9e\x96\x4f\x31\x25\x7e\xa9\x6e\xa2\x36\x20\xbc\xed\xa2\xf5\x74\x29\xd8\xcb\xf2\x9f\x86\x76\x19\x7e\xbb\x6d\x26\xb7\xd9\xae\x46\x22\xdf\x63\x71\x0a\x03\x51\xd0\x97\xaa\x46\xb0\xba\x1d\xe0\xdd\xe2\x74\x30\x2b\x55\x3b\x58\x6f\x2e\xc5\xd1\x42\xae\x41\x3a\x62\xce\x61\x85\x94\x51\xf6\x83\x3a\xd1\xe6\xd3\x2b\xcb\xd8\xf4\xc1\x27\xf8\xdd\x97\x9e\x81\xba\xdb\x5d\x2d\xc1\x50\x87\xb3\x60\x45\x54\x30\xe8\xcf\x20\xb8\xbe\x19\xf7\x83\x41\xb6\xa8\x72\x11\xa6\x79\xca\x17\xa1\xf6\x47\xcb\xb4\xe1\x27\xcf\x20\xc0\xa9\x18\x7d\x79\x0b\x85\x9e\x1d\x17\x0a\x4f\xf3\x56\x0b\x30\x9d\x6e\xce\x94\x4e\x85\x75\x8a\x95\x97\x88\xa3\x64\x10\x64\x78\x22\x84\x96\x39\x12\xb9\x0e\xea\x91\x70\x92\x4e\x97\xce\x4b\x0e\x17\x1c\x1f\x04\x78\x68\x8e\xc1\xcc\xa2\x8a\xf4\x69\x21\x61\xd2\x87\x3b\x3c\xd0\x37\xd5\xdc\xb3\x55\xa7\x38\x9e\xe1\xbe\xc3\x6d\x8b\xa9\x7b\xeb\xd7\xdf\xfd\x8a\xcd\x50\x3d\xff\x2c\x40\x31\xa6\x7f\x12\x0e\xf8\x8f\x0d\xaf\x06\x79\x80\x08\xb3\xab\x41\x14\x10\x5b\xd7\x79\x49\xb2\xe0\xc2\x34\xd9\x3c\xc7\xd3\x8c\x8c\x11\xdf\x9b\x2a\x84\xb9\xcf\x40\x80\x63\x69\x8a\x7e\x81\x04\x30\x34\xbb\x31\x3a\xfe\x9b\x38\x0c\x57\xe4\x59\xc4\xb2\x4b\x93\xf0\x34\xb2\x23\xe9\x51\x92\xe9\xe8\xa4\xdf\xfc\xd5\x52\x34\x1f\xd1\xb7\x47\x67\x54\xb9\x1a\x65\xef\x93\x8a\xb7\x50\x63\x8c\xa6\x0a\xca\xfb\x60\x6f\xa9\x8a\x02\x6b\x0b\xd9\xe5\xf7\x46\xe3\x2d\x10\x06\x1c\x3a\xea\x1d\x30\xcb\xb9\x2d\xa7\x02\xf5\xc6\xda\xb4\x87\x30\xf5\x29\xee\x21\x20\x88\x5f\x14\xc5\x3b\xc3\x5a\x4b\xf6\xf1\xac\x63\x78\x25\x88\x78\x5a\x94\xe4\x6b\xa4\x65\xaf\x3a\xd1\x29\x88\x79\xfe\xe5\x40\x0f\x6f\x10\xa7\xf5\x06\x2d\xd0\xc8\xcf\x4d\x58\xef\xf9\x6e\xfa\xfa\x5d\x4e\xa6\xcd\x98\x9b\x41\xf9\x80\x75\x66\xc4\x0f\xc4\xef\x48\x6a\x97\x5f\x4f\x58\x4a\xf3\x8b\x85\xeb\x11\x79\xd8\x71\x47\x47\xf7\x5a\xcf\x64\xaa\x89\x10\x7d\x3e\xf6\x1d\x23\x5d\x54\x98\xee\xa0\x49\xe9\x0b\x4d\x4e\xa4\x2d\xe6\x97\x62\x42\x96\xb8\xe1\xc7\x4d\x90\x35\x99\x0b\x44\xd7\x97\xfa\x88\xfd\xdb\x68\x98\x71\x1a\x63\xa5\x9e\x1b\xee\x36\x6f\xe1\x35\x00\xde\x3e\x09\xd3\xc9\x10\xf6\x69\xf4\x26\x7d\x62\x42\xf5\x29\x74\x6e\x64\xdf\xc4\x25\x46\x87\x22\x6f\x09\x9c\xc1\x73\xe6\x78\x78\xd8\x16\x1c\x20\xa9\x6a\x7c\x26\x1b\x4b\x03\x81\xbe\xbe\x76\x56\x3b\xf0\x3c\xad\x92\x32\xab\xc0\x65\x93\x0e\xf5\x81\x57\xa1\x8b\xc8\xb5\x37\xea\x2f\xab\x81\xf9\x95\xe0\xd8\x48\x53\x10\x6c\x23\x29\x57\x8e\x69\x92\x19\xbb\x2d\x37\x18\xd2\xdd\x34\xc8\xa0\x56\x4f\xee\x76\xa9\x81\xe1\x3c\x15\x11\xf0\x26\x30\xc3\xec\x4d\xab\xec\xed\x6c\xfb\x5c\x07\x34\x8b\xe1\xb1\x7a\x9c\xcf\x14\x06\x26\x70\xd7\x96\xad\x27\x60\x3a\x84\xee\xd1\xaa\xc4\xe8\x8b\xa1\x28\x8b\x9d\xf0\x7d\xda\x09\x3a\x7c\xcb\x7b\xfe\x58\x28\xcd\x38\x01\x9f\x31\xa4\x0b\x33\x32\x82\xf2\x5e\xe5\x31\x58\x7b\xe2\xae\x04\x86\x4c\x7b\x2f\x93\x9d\xd8\xd4\xf7\xa2\x19\xcc\xcf\x38\xba\x93\x87\x3e\x88\xa6\xcf\x2e\x9d\xf9\xc3\xc1\x14\xab\x57\xa8\x64\x43\x13\x1a\x45\x98\x82\xb7\x02\x2b\xcc\xb6\xe2\xed\xf1\xfb\x1c\xa2\x72\xe7\x98\x30\x18\x82\x4a\xd2\x4e\x06\xde\x72\xae\xdd\x5c\x69\x90\x77\xc5\x5d\x6f\x90\x5a\x7d\x23\x5c\xf3\xf1\xee\xe4\xa6\xbf\x84\x8f\x16\x8f\x37\x39\x36\x86\x1e\x6f\x5f\x29\x9d\xaf\x1a\x44\xb7\x10\x11\x4c\xb3\xa0\xa9\x73\x9a\x11\x4a\xdc\x3b\x70\x8b\xee\x82\xd0\xf8\xa9\x2d\x05\xa9\xcd\x07\x6c\x0f\x8d\x83\x45\xff\xab\x81\x9f\x5c\x32\x2b\xc3\xe5\xa8\x52\x5e\x65\xf6\xa9\x0f\xe0\x64\x18\x83\xd1\x41\xa8\x3f\x99\x30\x75\xc6\xbf\xf9\x61\xc2\x58\xfd\xd3\x0e\x19\xfd\xbf\xd4\xe2\xff\x52\x8b\xff\x3f\x50\x8b\x3e\x15\x7e\x34\xd3\x57\xff\xa4\x02\x81\x72\x59\x42\x28\xb8\xbd\x83\x1b\x7e\x2a\x18\x43\xc8\xba\x42\xf0\x3f\xa3\x16\xbf\xe4\x99\xff\xad\xbc\xff\x4d\x6a\x21\x99\x83\x2b\x99\x83\x03\x1b\xc2\x9f\x54\xc0\xe9\x19\xcc\x0d\x5c\xc9\xe4\x87\xdb\x1c\x9c\xc7\x0d\x44\xc1\xfd\x9f\x51\x8b\x3f\xe5\x05\xff\xad\xbc\xff\x33\xd4\x62\x84\x2f\x9a\x54\x7e\x50\x8b\xf6\x0f\x6a\xd1\xaa\xa6\x9e\xdf\xaa\x2b\x1a\x35\x78\xd9\x8c\x62\x28\xb7\x31\x04\x0a\xb9\x7b\x50\x98\x6c\xa3\xc4\xeb\x52\xdb\x97\xda\xb0\x3d\x29\x82\x15\xaa\x68\xd2\x08\x5e\x56\x40\x5c\x58\xa6\x9c\xc9\x6e\x8f\x0d\xa4\x6f\xf2\x84\x27\x2d\x70\x18\x5d\xd3\x8a\x0c\x9e\xde\x8e\x9b\xc1\xe7\x0e\x45\x36\xaf\x9d\x14\x09\x39\x60\x52\xb3\xa8\x44\x3e\x95\x17\x4e\x53\xef\x39\x9f\x06\x48\xe3\x6b\x10\x26\xe1\x94\x01\xdf\xb3\x58\xce\x9b\x7a\x8c\x59\x4c\x65\xc6\x50\x6d\x95\x55\x6b\xfe\xdd\xf0\x73\x8d\x09\x00\x3c\x79\x7c\x5b\xc0\x97\xe4\x2d\x83\x2d\x17\xb0\x44\x88\x9d\xe8\x45\x43\x45\xbb\x04\x87\x7b\xf6\xc5\x0c\x40\xb7\x89\xeb\x16\x2e\x0c\x92\x1e\x04\xdd\x92\x97\x45\x65\x8b\xac\xd7\x69\x4d\x39\x6b\xaa\x85\x3a\x23\xe3\x1c\x33\x6f\xeb\xc3\x61\xe3\x99\xdb\xfe\x52\x21\x8f\x26\xa0\x1a\x6c\x97\xf6\x65\x5a\xbb\x5c\xde\x24\x2d\x78\xf5\x86\x6d\xda\xd0\xf5\x2c\x0e\xc6\x4d\x75\x2a\x8f\x7c\x0b\x1c\x82\x05\xde\x54\x5d\xfc\xc6\x23\x0c\x7b\x1f\x79\xa6\xbb\x43\x1d\x11\xaf\xb1\xf5\x91\x34\xb6\x24\xc8\x3e\x0f\xb3\xdf\xc9\x6c\xd9\xb3\x0e\x39\x08\xd0\x48\xd2\xa4\xb9\xd9\x45\xbd\x01\xab\x66\x7e\xe7\xe1\x8e\x65\xc1\xa2\x3a\x1f\x0a\x63\x50\x6d\xd1\x65\x4a\x24\x37\x1d\x65\x16\x9e\xb9\x03\xe3\x12\xf2\x09\xa5\xb2\x71\x8b\x2c\xbd\xca\xb8\xb0\x9c\xfb\x9e\x29\x1a\xc1\x1a\x52\xfc\x5d\xf4\x0d\x34\x7b\x09\xfb\xd9\xd9\xbb\xd4\xf3\x4d\x81\xbb\xb6\xe2\x82\x96\x8e\x63\x53\x3a\x3e\xcc\xc5\x95\xc2\x90\xd3\xce\xc3\x7a\x62\x36\xd1\x3e\x5f\x2f\x76\x0a\xeb\x41\x03\xb3\x32\x42\x29\xdd\x25\x30\xae\x1f\x32\x8e\xf5\x16\xa2\xe6\x66\x72\xba\xea\x4b\x46\x67\x67\x42\xe8\xb0\x54\x7f\xa1\x02\x45\x76\xcc\x0e\x88\x08\x19\xa3\x6f\x48\xe9\xcc\xf2\xb9\x20\xee\x0b\xcf\x71\xbd\x27\x91\x80\x6e\xa9\xb4\x5d\x91\xfc\x26\x2b\xf2\xbe\x63\x53\xed\xc7\x32\x86\xe2\xb9\x77\xbc\x9e\xbb\xae\x26\xfa\x4c\xc4\xdd\x37\x22\x81\xda\x68\xec\xb1\xd8\x46\xf6\x66\xbd\xdf\x48\x56\x2f\xf6\x26\x3f\xb7\x76\x22\x2e\x39\x5d\xe2\x8b\x8e\x17\x0d\xe2\xbc\xce\x81\x06\x16\x7c\x11\xf7\x0a\xa1\x06\x0d\x70\x2a\x56\x67\x91\x2c\xcf\xcf\x97\xb5\x96\x18\x62\xf2\xbc\xea\x41\x5e\xd4\x5c\x43\x53\x50\xa8\xf6\x43\x89\x43\x91\x88\x41\x26\x5c\xa6\x0b\xc7\x39\xdb\xa4\x83\x4e\x01\x24\xa3\xb2\x29\xde\x99\x60\x5c\x86\x76\x6c\xf6\xc3\x7e\xdf\x62\x05\xe3\x73\x7d\xb6\xbb\xca\x5f\x07\xf2\xc7\xef\x46\x8c\xe3\xad\xb7\x15\x9d\xf3\x58\x21\x1a\x1f\x3a\x2e\x7b\x5d\x5e\xf5\x13\xf0\x74\x89\x4d\x64\x26\xe9\xc2\x03\x1e\x4c\x6b\x65\x32\xd7\x8f\x72\xae\xea\x9b\xee\x82\x5e\xa9\x15\x25\x4f\x83\xb3\x0b\x78\xe3\xfc\xac\x35\x90\x65\x1b\xc6\xbe\x18\x9e\xf9\xe2\xd2\x2a\xfd\xcd\xbb\xe1\xc7\xa5\xf9\x9b\xf6\x28\xfc\xf6\x55\x60\x7e\x47\x15\xfd\x58\x94\xd3\x6f\x54\x48\x2a\x59\x3f\x10\x18\x46\x97\x6c\x0e\xbc\x5b\xf6\x37\x82\x34\x5e\x9e\xf8\xdb\x01\x27\xba\x70\x31\x0c\x77\x1b\x2c\xa3\x6e\x85\xf4\xa3\x3f\x97\xfe\x0f\x50\xc5\xff\x06\x1a\x18\xff\x15\x05\x98\x1c\x76\x29\x3d\xa6\xfd\xa8\xea\xff\x87\x2a\xba\xf6\x07\x6a\xf8\x1f\x56\xf6\x5f\xfd\xff\x68\x7f\xe8\x52\x4a\xe3\x94\xf6\xff\x65\xc5\x86\xb2\x28\x9d\x7e\x56\x5d\xaa\xe3\xba\x7f\x95\xf3\xa3\xba\xe5\x12\xfe\x5a\x53\x88\x65\xff\x4d\xf5\x4e\xe3\x76\x4d\xbb\xdf\x51\x43\xb3\xfc\xab\x1c\xee\x17\x8a\x18\x92\xf7\x2f\xfa\xa0\x2c\x5c\x4c\xd7\x91\xa3\xea\xac\x23\x6e\xaf\x23\xe1\x37\xfd\x59\x89\xde\xdf\x74\xf2\xfe\x0b\x9d\x7e\xcc\x27\xff\x3f\x44\x23\x8f\x02\xfc\x8b\x1c\xfe\xfe\x6d\xdc\xd6\xa8\x8e\x05\x42\x7f\xcb\xd8\x5d\x73\x04\x0f\xf3\x69\x84\xec\x5e\xa1\x74\xd4\x5d\xd3\x29\x21\x82\x29\x7c\x73\xe4\x86\x7f\xb3\xfb\x18\x1e\x59\xec\xfc\x67\x39\x83\x79\xe6\x31\xfb\xa4\xb1\xf9\x66\x11\x7d\xd8\x7d\xf0\x4b\x86\x83\xd0\x7b\x21\xab\x63\x81\x9a\x6b\x8e\x60\xff\x0b\x3d\xda\xdf\x90\x4e\x2e\x87\xd0\xcf\xeb\x8b\xc7\xe6\xe8\xff\xfc\xdb\xbf\xda\x96\xfa\x39\xc7\xab\x5d\x4c\xe3\x0f\xbb\xb5\xbf\x57\xdc\xfb\xd7\xf5\x03\xfd\x64\x51\x78\x94\x92\xf8\x5f\x5d\x9f\xfe\xcb\x58\x7b\x0c\x35\xfa\xeb\xfc\x5f\xfc\xf6\x2f\xfe\x66\x4b\xbf\xf9\x06\x11\x48\x23\x96\x46\x77\xe2\x4a\xe3\x0f\x14\xf4\xbb\x1d\x12\xc8\xe0\xaf\x9f\xbe\xd1\xaf\x4e\x16\xb7\x63\x2e\xb6\x42\xf6\xdb\x1c\xff\x47\x7b\x8c\x95\x34\xfe\xb4\xa7\x44\x3f\x01\xfa\x83\x09\x04\x80\xe1\xff\x92\xc1\xe7\xc8\x7d\x16\xa3\x79\x25\x91\x39\xfe\xfb\x58\xfe\xf5\x3e\xe3\xbf\xdc\xc7\xe8\x03\xc4\xe6\xe8\x9f\xf2\x47\x76\xad\xa4\xf0\x1b\x05\xee\x9a\x47\xe1\x51\x20\xff\x69\x5c\x6e\x6f\xcd\x26\x9c\x4c\xeb\x98\xa0\xff\x36\xef\x3f\x75\xfd\x2d\x0e\x9d\x49\x9c\xf5\xf7\xdf\xae\xe5\xe8\x21\x79\xd7\xb7\x8c\xd4\x2d\x8d\x4c\xe8\xdf\xf5\xfc\x91\x5b\xac\x01\x3e\x53\x69\x9c\xaa\xe0\xc7\x9c\x05\xc0\x0f\x16\x61\xfa\xcb\x65\xf4\xcb\x6d\x76\xcc\x65\xf0\xbf\x7d\xc6\x2c\xfe\x3a\xff\x53\xff\x7f\xb3\xdb\x8f\x5c\x47\x38\xa8\x3a\x26\xb1\x7b\x16\xa3\x7b\xe6\xc8\x05\xfc\x3e\x27\xfb\x6f\xff\xeb\x98\x57\xef\x8d\xe3\x87\x2d\x7f\xca\x33\x9f\x34\x12\xa1\x1c\x55\x83\x1c\xa1\xbf\x7f\xd1\xf1\x7f\x85\xe2\xb4\xdf\xc7\xf6\x27\x92\x6b\x96\x7f\x47\x72\xda\xb6\x59\x20\xf2\x83\x2e\x32\xbf\xef\x00\x67\xe4\x7d\x76\xaa\x22\x16\xe3\x14\x04\xc0\x08\x29\xa7\x92\x0c\x06\x64\xba\x31\x82\xfe\xaa\xb5\xa3\xca\xb1\xa6\x71\x5d\xc7\x20\x81\x30\x02\x9a\xdb\x3d\x0a\x65\x7e\x18\x6a\x51\xc2\x2a\x0c\x1d\x81\x11\xdc\xc0\x71\xdd\x8b\x51\x94\x76\x52\xba\x96\x65\x1a\x58\x6d\xa5\x6a\x9f\x3c\x32\x86\xe7\x14\x29\x11\x90\x04\x6b\x34\x47\xae\x56\x40\x11\x54\x1f\x7d\xf2\xfb\x52\xfc\x0a\xc8\x07\x3e\xe1\x38\x7d\xbf\x27\x58\x5b\xa8\x09\x14\x14\xfe\xce\x4f\x6e\x06\xc5\xaa\x33\x51\x76\x54\xf6\xb6\x7e\x70\x0c\x93\xdd\x4d\x77\x97\xcf\xeb\x42\xa9\x0d\xd4\xdf\x64\x96\xbf\xab\x2a\xf0\xeb\x2a\xb8\x0c\xfb\x5b\x2b\x5a\x96\x99\x07\xbc\x32\x30\xbc\x2e\x56\x1d\xde\x90\x0f\x0a\xa2\x02\x71\x1c\xba\xb7\x28\x75\x27\x64\x12\xd5\x4c\xfd\xc2\x37\x97\xb5\x73\x0f\x4e\x4a\x84\x49\xbe\xc8\x2e\x7e\x63\xbd\xdc\x4a\x08\x63\x21\xaa\x53\x1a\xe6\xb7\xa6\x39\xcc\xe5\x0c\x8c\x6c\x37\xca\x69\x04\x23\x71\x57\x71\xb9\x3d\x69\x79\x8a\x0a\x2d\xb9\x1f\xc0\x09\x71\xb5\x14\x2e\x44\xfc\x94\x92\x2f\xd8\xe7\x41\x81\xf2\xf3\xf9\x6a\xbe\x20\xb5\x93\xe5\x7e\xcd\x52\xf6\x8b\xc3\xb6\x3f\x0a\x48\xce\x6d\xc7\x19\x52\xd1\x78\xa6\x3f\x1a\x82\xfb\xc3\x58\x02\x23\x14\x0b\xc1\xb0\x12\x63\xc5\xb6\x6a\xa3\x36\x62\x0f\xe0\x99\x59\x04\x76\x6a\xdd\xb1\x2f\x20\xcf\xef\x16\x30\xa4\x38\x5c\x47\x52\xa3\x5f\x31\x1b\x87\x60\xbd\x60\x06\x27\x7a\x0f\x85\x81\x64\xe5\x93\x5b\x13\xbb\x01\xf3\x4b\x9e\xb1\x6e\x0c\x2b\xb1\x52\x4c\x92\x74\x09\x12\x05\xfe\x16\x05\x72\xfa\xc1\x36\x7e\xf9\xd1\x0d\xcf\xa6\xe6\x75\xe9\x1e\x2a\x74\x06\x44\x2a\xae\xdf\x0e\xdb\xbe\xd7\xc0\x33\xc4\xb4\x1f\xe8\x78\x11\x67\x45\x06\x07\x04\x92\x80\x6e\x4a\x62\x1e\xf9\x9c\xd2\x31\x3f\x5b\xcb\xb8\x2d\xe7\x30\xc6\xa3\x3c\x80\x77\x0c\x40\x75\xc4\xe1\xe9\x53\x66\xb7\xcd\x77\x16\x8e\x1e\x6a\x3d\xd4\xf7\xd3\x31\x90\x19\x65\x56\xbf\x10\x58\xe6\xf8\xc8\x87\xe1\x14\x07\xa2\x9c\xfe\xcc\x77\x14\x7d\xe9\x13\xca\x65\x10\xac\xbf\x7d\x8f\xdc\x28\x9c\xb4\x88\xd8\xfc\x52\xdd\xa5\xb8\x80\xe5\x02\xb6\x8e\xd7\x1c\xb3\x9a\x00\x3c\x09\x7d\xe2\xc3\x03\x30\x59\x25\x3f\x3f\x5e\xb3\x72\x4e\x20\xdd\x0f\xb4\x98\x60\x97\x21\x0f\x15\xf6\x24\xc5\x5c\x07\xe7\x44\x07\xf6\x41\xa8\x05\x35\x47\x18\x0f\xe4\xd3\x3a\x12\x92\x62\x28\x48\x82\x3e\x50\x29\xb9\xe1\x5f\xef\xe1\xb1\x09\xcb\x15\xec\x30\x04\xf0\x7d\x10\x05\xbd\xdb\x2f\xf6\x39\xe0\xbc\xbe\xad\x65\x53\xaf\xfc\x4e\xba\x9a\x88\xbd\x33\xf3\xab\x32\xab\x24\x16\x5e\x53\x24\xa3\x7d\x02\x6b\xcc\x1a\x34\xdf\x7d\x9d\x23\x78\xbe\x7e\x39\x88\xd2\xe8\x94\xe2\x31\x3c\x41\xa0\x1b\x46\x7e\x11\x6f\x8f\xce\x99\x0c\x5f\xfc\x66\x29\x6e\x4c\x63\xb9\x17\x9c\xae\xf2\x65\x02\xc8\xa7\x82\xec\x03\x40\xd3\x2a\x11\x73\x69\xc5\x28\xfb\x1c\xb1\xb9\x1a\xd2\xbd\xac\xa7\x01\xba\xb2\x45\x09\x03\x3f\x59\xe0\xb8\x82\xc3\xfc\x6c\x17\x5b\x08\x2a\xc3\xd2\x85\x3b\x17\x25\xa0\x19\x61\xf6\xdd\x90\xbd\x3c\x00\x49\x74\x8b\x5a\xf2\x4e\x43\xe7\x94\xfd\xb4\x5f\xc0\x84\x3e\xc8\x70\x4a\x7c\x2e\xd1\x0d\x60\xf0\xdf\x9a\x88\xe0\x0f\x18\xdb\x80\xb5\x50\x04\x49\x67\x5d\x5f\x0d\xef\x27\x7b\xa9\x5f\x76\x10\x14\x19\x12\x56\x86\xf1\x39\x10\x3c\x14\x12\x18\xca\xf3\xb4\x38\xc3\xe3\x47\xba\x8c\xc4\x35\xcb\xeb\x13\xbf\x23\xf5\xde\x2b\x0b\x0e\x66\x9c\x6d\x2a\xa8\x96\xac\x79\x25\x12\x1a\xda\x65\xf0\xc5\x32\x9a\xc6\xab\xb2\x42\x60\x97\xfe\x15\x7b\x2e\xc7\xe2\xac\xe5\x30\xc2\x05\x60\x98\x53\x62\xa1\xf1\x99\xd1\xcf\x3b\x9f\x00\x55\x48\xbb\x9a\x56\x71\xfb\x0d\x9a\x01\x8b\x71\x80\x8a\xb3\x20\xa0\x14\xf1\x2e\x02\x43\x22\x2d\x72\xe3\xbb\x0b\x50\x81\x1a\xa0\xde\xa7\x32\x77\xcf\xfe\xd3\x0c\x4e\x53\x39\xfe\xc0\xb0\x86\x3d\xd9\xb6\x0b\xf6\xd0\xd4\x87\xf0\x01\x17\x34\x5d\x1d\x5e\x60\x35\xfc\x37\x95\xdc\xda\xee\x89\xc3\x21\x3f\xd8\x67\xf0\x83\xd7\x67\xbe\xbc\x8c\x0b\x8a\x98\x98\xfe\x9b\x41\x24\x4f\x52\xd5\x26\x52\x2f\x78\x8f\x18\x4d\xfb\xd2\x3c\xae\x07\x37\xed\x50\xf8\xbb\xe2\x4e\x23\x3b\xce\xc0\x98\x26\x8b\xd6\x5c\x92\x22\x68\x1e\xee\x3a\x05\x71\x66\xad\x3f\xcd\x06\x08\x69\xeb\x55\x4c\x48\x94\x5f\x63\x82\x7a\x3c\x1f\xf0\xec\xa8\x64\xe0\x8a\xda\x33\x01\xac\x93\x7f\xdf\x57\xb8\xeb\xf2\x94\xd9\xd6\xb2\x82\x12\x72\x44\xf1\x97\xf2\x8c\x8f\x78\x01\xc3\x15\x2a\xbd\x40\xe7\x29\xb9\x00\x89\x3d\xd4\xdc\x7e\x0e\xf2\xd3\x51\xa7\x4e\x20\x8a\xdb\xca\x71\xea\x82\x1b\x12\xda\xbe\x27\xef\x30\x3f\xf5\x2d\xd9\xe6\x72\xcb\xa4\x63\xf4\xd9\x18\x2c\x61\x60\xa4\x94\x5d\xb9\xfa\x9c\x60\x0a\xce\xf1\x09\x2e\xf9\x45\x7c\x32\xff\x2f\xbe\xa2\x18\x83\xa0\x32\x9c\xcf\x9b\xed\x4e\x21\x05\x7d\x00\x64\xb3\x76\x45\x75\x90\xc8\xb0\x1e\xb9\xa9\x40\x26\x5f\xf9\x82\x66\x53\xd6\xa5\xb7\x6e\xb1\xe6\x01\xbc\x8f\x1c\x4f\x49\x4a\xc4\x93\x95\x5c\xd3\x31\xd0\x3a\x0d\x27\xa7\x6b\x9a\x5f\xb1\xf6\x10\x28\xfb\x0e\xc4\xa7\x86\x80\xd7\xad\x69\x7e\xa1\xb4\xcb\x70\x39\x6e\x66\x3f\x07\x5a\x22\xd7\xea\xb5\x41\x7d\x7c\xbc\x17\x27\xdf\x5e\x14\x4b\xd2\x73\xfe\x4c\x15\x2b\x03\x31\xad\xc6\x78\x81\xfd\xf9\x1c\xb2\x7d\xd6\x2c\x47\x57\xa9\x2c\x9f\x3b\xbe\xe8\xfa\x46\xdb\x0f\x07\x32\x9a\xa6\x8b\x06\x3b\xc2\xb4\x93\x31\xd1\x0c\x87\xeb\x58\xfa\xf6\x4e\x71\x17\x55\x6c\xde\x09\xdf\xeb\x92\xe5\x92\x54\xcd\x9f\x42\xbf\x33\xb6\xe0\x0e\x8e\x62\xce\xc8\x1f\x2c\x12\x7a\x1e\x0b\xef\x27\x71\xc1\x65\xfa\x2d\xd0\x28\x11\x0f\xd2\x74\x35\xde\xe2\x83\xa5\xdc\x9b\xa4\x33\x38\x37\x93\x9e\xa1\xa2\x6a\x84\x05\x32\x8a\xa8\x23\x1d\x44\x7b\xcf\x8b\x20\x29\xcc\x23\xfd\xaf\x39\x4d\x68\x5a\x85\xe1\x12\x76\x5b\xbf\x13\x4a\x86\xdf\x28\x12\x2f\x04\xc3\x4e\x1c\x1e\xf1\xf1\x51\xd1\x1c\x1e\xbe\xb2\x92\x5d\x46\xf3\x7e\x98\x4d\x8c\x82\x31\xdc\xdb\x28\x37\xbf\xcb\xaa\x79\x4f\x41\xe7\xac\xbf\xf3\x71\x88\x46\x4e\x1f\x26\x43\x20\x5f\x77\x53\xde\x56\x53\xba\xb7\xeb\x96\x88\xae\x26\x50\x13\x7f\xac\x54\x94\x89\xc7\x23\xda\xed\x63\xb1\xde\x03\x98\x1b\xf0\x9c\x3c\xd3\x98\x71\x8c\x48\x9d\x78\xbc\x9b\xe9\x3e\xfd\xfe\xe5\x85\x51\xad\x6e\x7d\x95\x68\x9b\x7a\x28\x0d\x9d\x65\xe8\x2e\xbe\xb1\xee\xab\xfe\x50\x9f\x5b\x27\x62\xf1\x2f\xb7\x72\xc5\xcb\xaf\xb8\x50\xfb\xb2\x70\x19\xc6\x97\x73\x70\x41\xfd\x5c\xf4\x39\xd5\xf1\x67\x07\x82\x50\xac\xcd\xd2\x3d\xa3\x36\x51\xce\x90\xa7\xf4\x64\x43\x89\x30\x52\x8f\x18\x85\xbb\xaa\xef\x33\x82\x73\xfd\xa7\x7d\xc7\x05\x80\x6d\x5a\x47\xb6\x38\x77\xfc\xfb\xe3\x5e\x31\x6c\xf5\x6e\x20\x2e\xd1\xfa\x5c\x46\x0d\x93\xf4\xc7\xb3\xdd\xcd\xac\x6b\xbb\xeb\x38\xdc\x8d\xde\xd6\xab\xe8\xd6\xf8\x15\xef\x2c\xcb\xfd\x88\x77\xc6\xd5\x4b\x73\xb6\xeb\xe2\xde\xe7\x3c\xec\x08\xf0\xcc\x3c\x84\x6e\x21\x27\xd5\x48\x6f\x87\x05\x6a\x2c\x90\x24\x49\x63\x6b\x93\x4f\x11\xd6\xde\xdc\xee\xdc\xa7\x7e\x70\x47\x8a\xfa\x34\x01\xc3\xfe\xd9\x07\x8c\x7d\x65\x9a\x41\x85\x43\x54\x21\xda\x42\xab\x83\x4f\xb3\xa8\x06\x3d\x40\x7f\x70\xdc\x48\x65\x3a\x18\xbf\x9d\xc2\x28\xbf\x37\xcd\x17\x70\x86\x99\xd5\x5b\x0f\x46\x8c\x4e\xa9\x48\xa2\x96\x24\x1e\x47\xda\x8d\xd8\x84\xd8\x09\x6e\x39\x94\x1e\x28\xb5\x14\xa8\x4f\xaf\xd7\xb0\x00\x8c\xa7\xb1\x9c\xc3\x30\x11\x86\x5b\x03\xc9\x0b\x91\x1a\xc8\x8e\x1a\x93\xa4\xc7\x86\xcf\x23\xe4\x78\x97\x43\x0f\x11\x95\xc7\x52\xb9\x8a\xfd\x13\xb4\xcf\x4a\xc1\x28\x82\xa0\x03\x6f\x1c\x6b\x93\xd0\x43\xb7\x66\xff\x48\x76\x76\x2a\x3b\x8c\x7a\xd5\xa8\xe3\xd1\x30\x59\x75\x39\x40\xa6\xc5\xac\x14\xd6\x2b\xdf\x99\xf4\x78\xdb\x7b\x98\x75\xfd\x3a\x37\xc5\x89\x6e\x8c\x94\x12\x75\xef\xeb\xe8\x10\x12\xa8\x64\x91\x70\x38\xbc\xb0\xd3\x0c\x68\xf0\x97\xdf\x04\x74\xf3\x5a\x66\x5f\x51\x9b\x29\x9f\xe8\x7c\xd3\xb0\x10\xbf\xcb\xb2\xfd\x72\xd3\x8e\xe1\x3a\x2f\x69\x98\xb4\x5d\x96\xf9\x80\x4b\x7a\xe5\x1f\x0c\x3c\x50\x5d\x5f\xc5\xed\x3d\xec\x94\xbd\x69\xe5\x99\x3d\x53\xb4\x14\x37\x35\x10\x19\x07\x4c\x3f\x88\xdc\x8b\x79\xb7\x98\x1d\x0c\xec\x76\x4c\xd6\xe3\x62\xa5\xed\xa2\xe9\x05\x1d\xe1\x32\x15\xfa\x35\xe6\x5d\x5c\x48\xd3\xb0\x41\x0a\x88\xc9\x37\xda\x37\x10\x16\xfe\x92\xb7\x0c\x4e\x68\x98\x69\x16\x9f\xb3\x2c\x53\x9f\x20\x4a\x24\x67\x37\xa4\x40\x59\xc2\x37\xad\x86\xed\xb5\x2f\x62\xcf\x7e\xae\x63\xc9\x47\x93\x08\xb7\x8c\xd9\x16\x00\x83\xb3\x27\x02\x97\x1d\x8b\x4d\x6e\x52\xbf\xcb\xea\xb3\x51\xa4\xa6\x7a\xd7\x99\x6a\xae\x6f\xca\xd0\x0a\x8e\xe4\xf4\x4c\x95\x1a\xfb\x00\xdb\x60\xcf\x36\x90\xe6\xe9\x6c\x38\x31\xf4\xa7\x6f\xfb\x94\xfb\x23\xdf\x53\x66\x98\x7c\xe7\x15\x26\x0a\x32\xf4\x61\x3a\x13\xb8\x87\x66\x64\x1c\xb8\x23\xb2\x03\x7c\xb9\x67\x07\xeb\x6a\xad\xcf\xe7\x53\xa8\x74\x2b\x87\x6a\x21\x97\x3e\x3c\x3e\x41\x12\x59\xd9\xf4\x61\x37\x89\x91\x36\x3e\x89\x2e\xe1\xa5\x2e\xab\xf5\x2c\xba\x42\xb3\xaa\xda\x5b\x95\x24\xc1\xe2\x2d\x8a\x22\xf1\xf1\xe2\xb0\x82\x39\x85\x2c\xf5\x4f\xbf\x4a\xdd\x80\xe1\x0c\x45\x8e\x09\xc2\xcb\xf3\x77\xd8\xa5\x05\xae\x7a\xb7\x25\xf6\x38\x4d\xc4\xbb\x5e\x11\x6c\xe5\xf1\xa4\x9f\x5b\xec\xca\xc7\x30\x50\x49\x55\x06\xa7\x49\x35\xae\x0f\x29\xa9\xfd\xee\xec\xd1\x7c\x5a\x9c\xae\x09\x85\x78\xb9\x48\x0d\x3a\xc2\xf9\xee\x37\x41\xd3\xfc\x1e\x4f\x65\x1e\xd6\x7f\x81\x0f\xcc\x46\x4d\x0a\x23\x63\x59\x97\x1d\x31\x3c\x53\x80\x65\xc9\xe6\x8b\xe0\xc0\x40\x27\x4b\x7d\x12\x43\x25\x2e\xb2\x8c\x03\x74\x98\xaa\x7e\x84\x4a\x40\x3d\xe1\x6c\x1f\x56\x49\x71\x81\x5f\x13\xaa\x84\xd8\xff\xc8\x78\x5b\xb7\x3a\x73\x23\x64\x7e\x3e\xdc\x71\xbd\x63\x8f\xec\x19\x45\x8b\x13\x55\x87\x02\xf5\x27\xd6\x5c\x27\x86\xd5\x38\x79\x23\xe9\x01\xa3\xd2\x15\xc1\x13\xa0\xe4\xd0\x87\x9e\x31\x63\xf2\xe3\x87\xa8\xe8\x49\xda\x33\x71\x81\x37\x03\x0f\x2b\xe9\xcb\x91\x94\x75\x17\x7a\xed\x28\x2e\x6f\x6e\x96\x12\xf5\x9b\x4c\xb5\x6b\x52\xaf\x62\xd2\x6e\x29\xb8\x48\x76\xc8\xd2\x0f\x64\x8d\xe8\x8c\xa6\x59\xf2\x90\x0f\xf4\x4e\xfa\x1f\x83\x73\xf4\x4b\x50\x19\xbe\x57\xe4\x1a\xa8\xeb\x42\x8c\xf7\x37\xa4\xf4\x98\x73\x8c\x59\xfc\x72\x2c\x05\x2b\x8f\x28\xc3\xd6\xc5\xa6\x12\xdd\x10\x3b\xf9\xa5\x50\x5b\xbf\x88\xa0\x5c\x83\x1b\xa4\x58\x29\xbb\xd9\xd4\xad\x2e\xa8\x74\x12\x33\x70\x3a\xee\x74\x83\x94\x60\x69\x09\x34\xd8\xfa\x04\xc7\xdd\x85\x6f\x88\x4e\x86\x99\x6f\xc7\x00\xf6\xb0\x5f\xb9\x61\xb0\x8d\x1f\xb8\xa9\x44\x1b\x65\x46\xc1\x6c\x1e\xb0\x94\xa8\x26\x4a\xf9\x91\x13\x7b\x06\x16\xbf\xba\x0a\x23\x7a\x27\x62\x1f\xcd\x09\xc3\x04\x84\x28\xb2\x3e\xd0\xe2\x88\x0f\x53\xfa\xce\xa1\xbc\xae\x21\x1f\x1f\x32\xb0\x4e\xc9\x07\xda\xe9\xb9\x56\x73\xbc\x0d\xc2\xc8\xc9\xb8\x44\xc3\x10\xf2\x02\xe0\x3d\xc6\x44\x10\x53\x50\x69\xcc\xa3\xfe\x57\x90\x5a\xce\xc2\x38\x23\x73\x5d\x27\x48\x54\x05\xaa\x9b\x2f\x4e\xe8\x0a\xd9\xd0\xd6\x7c\xa2\xc3\xd0\x9c\xee\x2e\xca\x84\xb4\xc1\x13\xde\x68\xe2\x17\x1f\xee\x81\x5a\xfb\x43\xdf\xab\x23\x29\x81\x27\xcb\x6b\x37\x62\x9e\xd4\x15\xb7\x1d\x3c\xd2\xe9\xb9\x88\x32\x41\xd5\x87\x67\xbf\xbc\x12\xf5\x24\x0b\x90\xc9\xd7\x0f\xce\x0f\xc0\x05\x35\x8a\xee\xd7\x54\x1a\xdb\xb4\xd4\x7f\xe1\x3e\xe2\x8f\xba\x1b\xc0\x2f\xac\x66\x07\x1a\x4a\x38\x59\x5b\xb3\xdd\x3d\xdf\xcf\xbb\xf8\x8a\x26\x33\x3e\xbc\xc4\xa9\x9e\x28\x4e\xed\xba\xa0\xa8\x08\x1b\xde\xf8\xca\xe4\xa9\x97\x20\xa9\x17\xab\xe9\xce\xca\xb7\x6d\x82\xe8\xfc\x90\xca\x47\x5e\x7e\xeb\x4d\xc3\xc0\xc2\x16\xe8\xf9\x45\xe8\x37\xf3\x0e\xba\x15\x7e\xe5\xfe\x98\x53\x1a\x26\xef\xec\x0d\x45\xd7\x35\xb3\x71\x9f\xf6\x6b\x80\x0b\x3e\x36\x48\x93\x77\x15\x84\x4b\xda\xeb\xb4\x04\x8d\x61\x18\x21\x33\x4c\xbb\x9a\xee\xd9\x0a\xd0\x8e\xc2\xa5\xf3\x75\x0c\x23\xe6\x2a\x5e\x21\x5e\xab\xe4\x99\x00\xa2\x89\x89\x1e\xf7\x45\x61\x33\xc0\x61\xb3\x4e\x2a\x33\xbc\x81\x9a\x26\x9f\x2c\x8a\xf1\x05\x4a\x4c\x82\x29\x7f\xf1\x1c\x8e\xd7\xb9\xa0\x61\xfc\x59\x63\x7d\xf2\xb3\xef\x93\xcd\xc9\x25\x0c\x5e\xaa\xbf\xd7\xca\x35\x1d\xce\xe7\x13\x8c\x6e\x94\x2e\xc1\x85\x7d\x2b\xe6\x3d\xf5\x77\xba\xdc\xc3\xe6\x40\xd7\xbe\x19\x76\xb5\xbf\x97\xd2\xf7\x05\x8a\x80\xc5\x35\xb6\xd9\x11\x69\x9f\x1d\x11\xd1\x08\xa5\x3f\x14\x3a\xda\xb1\x4c\xe2\x71\x91\x85\x7b\x66\xfc\x91\x14\x94\x94\x17\x58\xae\x60\x54\x11\xad\xd5\x63\x8e\xe1\xe9\x47\xec\x88\x67\x4a\x5b\x33\xc8\xfa\x2c\xfe\x9a\xe8\xe7\xf9\x02\x27\x3f\xe3\x00\x04\xc4\xb3\x79\x89\xab\x73\x02\x10\xe8\x98\x39\xe6\x02\xd8\x4d\x84\x20\x26\xf6\x89\xa4\xed\x1f\x84\x4e\x60\x37\x91\xba\x00\x4f\x69\xb0\xfa\xe6\x02\xbd\xdc\xa6\x97\xfc\x72\x23\x29\x48\x19\xa6\x65\xe2\xde\x9a\xf3\x7d\xbb\x8b\x32\x88\x9a\x53\x52\x54\x67\xf9\x06\xb7\xa7\xf2\xf7\x24\x96\x84\x5c\x44\x2e\xcb\xce\xeb\x44\x7d\x34\x6e\x56\xbf\xc6\x51\x4f\x25\x62\xb6\x85\x89\x08\xd6\xcc\xf6\x73\x1a\xc3\xc4\xd4\x58\x12\x2b\xb2\x57\x29\x1d\x73\xfa\x05\x81\x03\x02\x62\xdb\x3e\xcf\xb3\x28\xd0\xef\x3b\x60\x2c\xa1\x3b\x7f\x0c\x51\xaf\x38\xd6\xc5\x36\x9c\xc4\xf7\x04\x04\x01\x3f\xd2\x2b\xb0\x82\xec\xb1\xcd\x2c\x00\x4e\x7a\x3b\x4f\xbb\xf7\x36\x5c\x10\xe2\x44\x37\x8c\xf0\xfa\x12\xe9\x4e\xb3\x63\x06\x9d\x66\x05\x23\x1b\xed\xd6\x05\xe1\xeb\x6a\x75\x71\xd9\x2e\x70\x13\x2a\x85\xa7\x85\x00\x19\x8b\x69\x26\xf0\x82\xe9\xb0\x1b\x83\xf8\x7a\x95\x00\x25\xee\x19\x8d\xfb\xb9\xdf\x52\x69\xac\xa9\xbd\x32\xda\x16\xf4\x8b\x6f\xe7\x8e\xfb\x94\x8d\x7f\x8d\x4c\x51\xd7\x32\x2a\x23\x0b\x8c\x8e\x06\x92\xd4\x5d\x1b\x4f\xbe\xa6\xb7\xc8\xb0\xde\x42\x53\x87\x60\x22\x65\x44\x3d\xfa\xf6\x82\x04\x6f\xb6\xa2\x0b\x90\x86\x57\x9e\x23\xc0\x15\x5e\x04\xe9\x3f\x93\x74\x7b\x76\x65\xcd\x01\xe2\x5e\x25\x29\xf6\x28\x88\x1e\x17\x30\x1f\x07\x45\xcc\xcd\xaf\x04\x3c\x74\x10\x6f\x71\x05\x2f\xbe\x2f\x05\x2e\xa0\xdc\xe2\x7e\x15\xfa\x2b\x78\xd7\xdd\x17\xec\x4f\x77\x87\x90\xca\x58\x23\x80\x8f\xf1\x49\xab\xaf\xd6\xb9\xcc\x7d\xc5\xc3\x35\x27\x55\x01\x18\x70\x82\x1e\xc5\xf4\x48\x65\x0f\x2a\x68\x4b\xdf\x40\x8b\xbb\x53\xba\x28\x6a\x59\x8c\x20\x74\xcb\xda\x3f\xf9\xd6\x23\x39\x9c\xe5\x19\x0c\x56\x95\xf1\x6e\x21\x77\x98\x16\xe1\x98\x96\x75\xcb\x4a\x94\xc3\xbd\xdc\xa9\x23\x12\x55\x05\x4e\xc6\xf6\x78\xfd\x91\x88\x1d\x26\x57\x04\xbd\x81\x9d\xde\x57\x3c\xdd\xf2\x8f\xcc\xca\x2c\x92\x3f\x2e\x06\x13\x13\x5e\xd9\x5f\x5e\x16\xdd\x32\xbf\x2e\x81\xfb\x66\xd4\x11\xd9\xe4\x0b\x24\x37\x08\xbc\x0c\x2c\xcb\x92\x00\xa8\xd2\x0d\x89\x16\x34\xfc\xaa\x33\x27\xd6\x0e\xac\xc1\x51\x32\x1a\x83\xd6\xd2\x7f\x4b\xd9\x25\x6e\x2e\xa8\x9c\x54\xee\xc6\x67\xcc\x31\xab\x8e\xa2\x3e\xca\xb9\xdd\x89\xaa\xa9\xde\x88\xac\xf2\x85\xb1\xd9\xf4\x33\x27\xa6\xfd\xfb\xe5\x34\x45\x41\xda\x6c\x12\x33\x6b\x89\x4c\xe7\x43\x96\x20\x4c\x11\xfa\x4c\xf6\x5b\x4a\x52\xd0\x27\x3b\xe9\x5f\x83\xe5\x38\x9f\x93\x3c\x98\xe1\xdf\x97\xc8\x0a\x3b\x3b\x7b\x74\x41\xab\xe0\x25\x6e\x10\xba\x5a\xea\x8e\x2e\xd0\xa6\x4c\x57\x29\x4f\x3b\x87\xb2\xb2\x2d\xdd\x93\x3a\x6d\x7d\xe5\x77\xc2\x19\xe9\x1d\x84\x38\xa9\x8f\xe6\x34\xb9\x67\x92\x45\x34\x68\x7c\x94\x4b\x26\x0e\xd2\x22\xcb\x03\x71\x09\xd3\xfd\xe2\x18\x68\xaa\x7a\x08\xe1\x4b\x38\x03\xda\xaf\x7a\x63\x24\xfe\x23\x2c\x6c\x65\x91\xd9\xee\xc7\x39\x39\x83\x4d\x88\xc4\x7e\x8a\x5e\xd4\x87\x68\x2e\x14\x46\x89\x7d\xd0\x3e\x25\x93\x7b\xfb\x23\x4d\x32\x16\x31\xde\x91\xf8\x92\x6d\xd8\xb9\x9e\x48\xd1\xda\x46\xfa\xb4\x42\xce\x0f\x7e\x97\xca\x2d\x21\xf5\xf2\xba\x20\xf6\x68\xba\xc1\x5c\x4b\x67\xf7\xe0\x9b\xa1\x6d\xdf\x39\xf8\x23\xe1\xfa\x0c\x7e\x79\x8f\xce\xbc\x46\x66\x12\xe4\x87\xf8\xd0\xd5\xa7\x83\xc9\x0a\x6f\xf2\x0a\xc9\xbf\xfa\x27\xb6\xd4\xf6\x95\x87\x14\x68\x4e\xfe\xdd\xe0\xe7\x62\xec\x91\xfc\xe6\x4b\xac\x41\x6e\xf8\x5d\x0c\xe6\x83\x44\xcd\xd2\xaa\x51\xe2\x4b\x89\x69\x19\x8a\x3f\xce\xd2\x45\xe5\x03\x5e\xd5\xa3\x52\xe4\x3d\x73\xdc\x60\xfd\x85\xdb\x16\xa2\xcf\x48\x9f\xbb\x19\x4f\x61\x24\xf5\xc3\x3d\xf9\x33\x37\x01\xea\xc8\xc0\xcb\xc5\x9c\x07\x1d\x9b\xe4\x85\x5a\xbd\x0f\x4d\xb4\x46\x1c\xfb\x64\xd0\x48\x6a\xd3\xf7\xe6\xa5\xef\x83\x1b\xdd\x7b\x69\xda\x74\x38\x0b\xf2\x75\x22\x15\xa3\x3f\x13\x22\xd1\xb6\x56\x7a\xe2\xd7\x57\x0d\x12\x84\x58\x8b\x7b\x6c\x20\xb1\x80\x63\x0e\x51\x45\x47\xdf\x36\x80\x6b\x9a\xb4\xd2\x42\x21\xea\x57\x74\x7e\xf7\x65\x16\xe3\xa4\x8c\x46\xde\x91\x78\xd3\x83\x44\x56\x07\x04\xac\xd0\x01\x09\xa8\x2d\xc6\xfe\xb6\x68\x7c\x91\x8a\x0e\x5b\xf4\x4f\xde\x03\x9e\x3c\x7f\xa0\x9c\xfa\x1e\x55\x65\xf6\x8b\x6f\x11\x70\x21\x81\x17\x3f\x84\x60\x72\x4e\xa5\x91\x4d\x52\x30\xd9\x85\x41\x12\xa0\xf5\xa6\x7b\xd5\x8a\xf5\xaa\xc2\x69\x55\x1d\xe3\xab\x8e\x11\xdc\xff\x5a\x6b\xe9\xb1\x2e\xe0\x25\xee\xcb\xfa\xe1\x86\x19\x7b\xff\x10\xd4\xb6\x3a\x71\x09\xe1\x9e\x2d\x86\x04\x97\xd2\xd1\x4b\x4c\x2c\x3f\x9b\xde\x0b\x80\xcd\xc0\x33\x3e\x5d\xf2\x75\x30\xdc\x4c\x94\xb8\x49\x44\xb6\x57\x9e\x20\x00\x53\x64\x6d\x13\x73\x4c\x2b\x4d\x63\x72\x88\x2c\x54\x66\x30\x01\x80\xfa\xab\x14\xf1\xf9\x16\x61\x58\xc2\x6b\xde\x7f\xac\xf5\xfa\x65\xdf\x5b\x80\x1a\xe5\x46\x4b\xf4\x8c\xfd\xed\xc5\xf2\x0c\xa1\x6b\xae\x91\xd1\x72\x79\x25\x44\xf9\x52\xbe\x50\xd3\xde\xb6\x6d\x1f\x65\x11\xb9\x07\x12\x9a\x4f\x36\xd3\x96\x32\xad\xd8\x9a\x3a\x09\xef\x1f\x8b\xac\x69\xdb\x81\xc9\x36\xc1\x42\x91\xf4\xc2\x85\xde\x83\x8b\xb4\x4c\x70\x01\x54\x14\xd6\xde\x5e\x30\xc6\x04\x06\xd0\x3a\xcb\x40\xc4\x47\x1e\x91\x40\x14\x55\x44\xf8\x83\xa3\xc2\xad\xad\x6c\xac\xcc\xf0\x20\x79\x94\x50\x25\x1f\xe4\x7a\xf2\x01\xf1\x89\xa8\xa6\x79\x27\x92\x02\x99\x8d\x77\x9c\xd3\xbf\xed\x94\xe3\xaf\xdd\xaf\xbc\xa5\xa3\xb8\x85\x13\xe4\x8c\xe7\x38\xbe\x84\x69\x77\x71\x9d\x42\x8e\xc1\x18\x39\x47\xb2\xc9\x66\x41\x1a\x00\xb2\x3c\x33\x73\x5f\xf4\x71\x7d\x52\x33\x8e\xcf\x39\xae\x2b\xe4\x03\xff\x5a\x13\xf1\x19\xfe\x72\x1e\xa7\x19\xe9\xea\x8b\x64\xc7\x06\xeb\x32\xb9\xed\x1f\x0d\x3f\x04\x47\x83\xf0\x04\xba\x3a\xaa\x5e\x3a\x56\x00\x11\x8a\xb2\x03\x12\x29\xa8\x23\x5c\x7a\x6c\x51\x7c\x21\x62\x3a\xac\xc1\xd4\xe2\x59\x93\xd0\x06\x2f\xfd\xa1\x6a\xee\x5b\x23\x81\xf3\xf5\x39\x13\xcd\x77\x82\x4a\x67\x77\x00\x54\x5f\x3e\x4f\x90\xee\x43\xa3\xf4\x00\xe0\x4f\xdc\xc8\x2f\x0a\x20\x2f\x1a\xa0\x7a\x70\x86\xed\xf3\x2b\x8e\x97\x15\xe4\x74\xde\x01\xeb\xe6\x43\x4a\x80\xba\x78\xcd\xf7\x3c\x87\xd2\x5a\xb8\xbc\x7d\xd8\x7c\xdc\x10\x9b\xd7\x78\x20\x49\x6a\xa7\x36\x65\x62\xb9\xc6\x2e\xb4\x10\x4b\xe4\xc2\xa4\x9a\x18\xe0\x93\x9d\x67\x25\x16\x2c\x6b\xf7\x80\x1c\x03\xbc\xc5\x30\x5c\xd0\x2f\x81\x2d\x91\xbd\xe1\x44\x63\x58\xf6\xe7\x05\xc0\x0a\xa0\x4f\x64\xc6\x8b\x2d\x0a\x91\x97\xa2\x4e\xef\xfb\xfb\x7a\x06\xdb\x31\x1f\x2c\x6c\x2c\x10\x7f\xd2\x70\xe6\x2d\x78\xab\xf8\x06\xca\xe8\x94\x34\xa4\x30\xbf\x54\x21\x81\xe8\xe7\x60\xea\xf6\x0d\xbd\x27\xb1\xef\xdc\x88\x32\x13\xd0\x72\x62\xfc\x1e\xe5\x25\xf3\xc2\xb1\x65\x1b\xd2\x0d\xea\x28\x0e\x55\x79\x94\xec\xb2\x7d\x55\x72\xe4\x69\xcf\xb0\xb5\x22\x7e\xc5\x13\x3d\xbe\xda\xf2\x11\xf4\xec\xa2\x00\xcb\xfc\x60\x38\x6b\xd9\x7e\x18\xc6\x24\x76\xfc\x5a\xab\xd8\x9a\x1e\xcb\x9b\x0f\x86\xf3\x20\x48\xfa\x11\x7d\x90\x79\x25\xa6\x0b\x4e\x90\x8c\x6b\x0f\x8f\x7b\xd0\x25\xd4\x38\xb5\xbf\x63\x41\xf2\x12\x00\x12\x76\x26\xb0\xe5\x1b\x5f\x1c\x0e\xe6\x73\xdf\x38\x9f\x00\x14\x68\x19\x10\x92\xc3\xcc\xaa\xbb\xa2\x9c\xd0\x1c\xda\xfd\x18\x95\x3f\x93\x41\x97\x05\x9d\x51\x85\x93\xe5\xbe\xf8\xc7\x7a\x2c\x2f\xb0\xe8\xd5\x33\x3a\x71\xd7\x31\x79\x4e\x9f\x0f\x48\x1d\xf3\x8b\xa0\xaa\xfd\x1a\xf1\xca\x61\x45\x25\x7f\x86\x61\x6d\x58\x13\xd0\x62\x1d\x19\x3b\x15\xfd\xd0\x1a\x3a\xb9\xbc\x6f\x9f\x82\x87\xc9\x10\xde\x98\x2f\xc7\x50\xcd\x2d\x5b\x96\x2d\x60\x36\xa7\x45\x71\x35\xde\xbd\x28\x4f\x70\x79\x20\x69\x58\xca\xfe\xb0\x4b\x25\x08\xec\x46\xc9\x8e\x11\xdc\xfd\x8a\xf7\x66\x68\x03\x3e\x63\x2b\x66\xad\x41\xfc\x75\xaa\x63\xca\x7d\x6a\xf9\xa4\x27\x80\x17\xba\xf7\x6d\x98\xfa\x2b\x91\xdd\x37\x0d\x83\x90\x3e\x3e\x15\x39\x6b\x21\x14\x08\xc1\x10\x31\x1b\xe6\xe1\x51\xdf\x17\x48\x34\x53\x0e\x16\xdf\xea\x33\x08\x17\x0e\x95\x50\x9d\x99\x12\x02\x20\x57\x63\xd5\x35\xb8\x49\x12\x75\x07\xa9\xb6\x5a\xbe\x51\xb8\x3f\xb9\xa7\xac\x70\x8e\xba\xd2\x8e\x48\xbd\x18\x0d\x82\xb6\xc4\x36\x85\x38\xe2\xb1\x3d\xcd\x13\x3f\x8a\x0f\x97\x7c\xc9\xa9\x8e\x51\x69\x41\xb5\xad\x38\x2f\xbe\xfb\xc0\x44\x5f\xf7\xe3\xbd\x81\x9f\x8f\xca\xcd\x83\xb7\xad\x9f\x8f\xa6\x3d\x46\xf7\x45\x44\x5e\xcc\xf4\xea\xc5\xd8\x3b\x8b\xc6\x23\x8d\xdf\x15\x04\xc5\xfd\x7d\x45\x3a\x29\xbe\x32\x77\x11\xd5\x34\x87\xe0\xfc\x21\x4d\x27\xff\x03\x53\xe7\x5c\xe5\x8c\xad\xcc\xf8\xe0\xdb\xcb\x58\x01\xd9\x35\x50\x5b\xcf\x39\xbf\xf1\x97\x66\xca\xdd\xcf\x42\xeb\xf8\xb6\x0f\x29\x1a\x6f\x21\xa4\x1f\xf5\xcb\xe1\x0a\x4a\x64\xe1\x59\x8e\x40\x8d\xe4\x02\x50\x8a\x61\xe2\xb2\x2b\x5e\x6f\x49\xd8\x10\xa9\x9b\x5c\x1a\xc8\xe8\xeb\xf1\xe5\xbd\x73\x92\xfb\xcf\xd0\xc6\x08\x51\x46\x31\x6a\x9b\xc5\xf9\x15\xc1\xe0\x4f\x7e\x38\x0c\x57\xb3\x3a\xfa\xf5\x91\xaa\xfa\x53\xae\x08\x4a\xab\xf5\x48\x21\x1b\xf8\xb4\x5e\x96\xcf\x0f\x75\xef\x3a\xfa\xe6\xa5\x38\x83\x97\x10\x5c\x8f\xd8\x07\x27\x73\x60\x6a\x2f\x31\xc2\xf4\x68\x4e\xb2\x73\xa6\x74\x99\xb2\x40\x58\xee\x52\x4a\xd6\x1e\xed\xb1\xbb\x54\xb2\x3f\x83\x04\xfe\x82\x35\x51\x93\xcb\xd6\x09\xbf\x70\x2e\xde\xb8\x9e\xd9\x84\xd4\x6b\x97\x20\xa0\xc0\x8a\x4b\xd7\x65\x5a\xc7\x70\x4e\xba\x92\x7b\xda\xc5\xc7\x22\xc6\xf9\x06\xe6\x8a\x9c\x1d\xe5\xa2\x81\x90\x5b\x3a\x4c\x28\xb8\x93\x2f\xf8\x31\x0d\xa2\xeb\xe6\xcc\x5b\x53\xa7\x0d\x0b\x6e\xaa\x47\x34\xcc\x14\x44\xd6\x09\x71\x3c\xb6\xe7\xb7\xfb\x5a\xe3\x0a\xd7\xf6\x4c\xb3\x75\x6d\x6f\x2b\x40\xbe\xd8\x3b\x6d\xfe\xf3\xbb\x7b\xed\x23\xab\x58\x43\xdf\x18\x35\x8d\x52\xb4\xd5\x8f\x53\x7f\x5e\x1f\x73\x1a\x51\x7b\xf3\xd5\x1c\x60\xa7\x67\x41\xa9\xb0\xae\xaf\xa4\x83\xd0\x15\xb9\x9e\x36\xf3\x4b\xf0\xff\xa3\xeb\x2c\xf6\x58\x65\x9a\x6e\x7f\x41\x0c\x70\x1b\x36\x4e\x70\x97\x19\x6e\x09\xee\x57\x7f\x7e\x7b\xbf\xf6\x7c\x83\x33\xaf\x04\xb2\x58\xdd\x54\x57\xba\xfe\x2d\xaa\xfc\xc5\xe3\x25\x9a\x2c\x92\x3a\xbc\xf1\xdf\x35\xc4\x87\x20\x64\x64\x8d\xda\x8a\x3d\xa3\xf1\xa4\x4b\xa1\x64\x09\x68\x9d\x6b\x78\x5b\x88\x6d\x4c\x82\xff\xd6\x35\x02\x83\xf7\x5c\x0b\x8c\xf0\x8b\x9f\x50\x81\xd9\x39\xbd\xe4\x77\xf8\x12\xd6\x63\x4d\x38\x47\xbd\x82\xe7\x18\x30\xce\x3c\x33\x0f\xf5\xe9\xc0\x98\xd6\x67\xac\xf8\x08\xfd\x3d\xcc\xa7\x50\xdc\xf3\x12\x87\x35\x85\x9a\xfa\x07\x6a\xd8\x31\x4f\x13\x14\x5f\x05\xeb\xab\x03\x63\x29\x7c\x86\x7f\xbe\xce\xde\xd7\x75\x5b\x90\x2d\x4a\xa8\xd7\xfc\xbb\x2e\xcc\x1b\x9f\x8f\x74\x01\xfd\xfb\x63\x8f\xd1\x67\xe1\xe0\x38\x5d\x44\xf8\x21\x2f\xcf\x9b\x64\xce\x5d\x2f\x5f\x29\xd7\x10\xa9\xe9\xad\xb3\x85\xa8\x44\x57\xc4\x0d\xd3\x25\x2e\x03\xa5\x5f\xb2\x23\x1e\x86\xc6\x2a\x94\xc5\x01\x0a\xd9\xef\x1e\x12\x2d\x4e\x57\x63\x33\x73\xcf\x95\x76\xf7\x33\x5c\xbf\x48\x9d\x45\x3d\x4c\x5e\x1d\x86\xef\xe2\x1b\x9d\x5f\xc2\xff\x5b\xb3\x8f\xae\xbe\x11\xc5\x7e\xfd\x63\x28\xaf\x51\xf9\x9f\x82\x80\xca\x8a\x56\xd8\x3c\xc9\x29\xfd\x6a\x3c\x7a\x24\x90\x99\xaf\x9b\xbf\x5e\x17\x3b\xb7\x65\xc3\x77\x36\x16\xb6\x60\x05\x25\x4c\x37\xee\x5d\x45\xa1\xe4\x42\x3a\xda\xe6\x11\x93\x22\x91\x6c\x92\x15\x5c\xe2\x90\x54\xc1\x12\xf5\xcc\x5b\x36\x59\xb6\xd5\x87\x39\xd4\x84\x62\xd1\xf0\xa0\xb1\xe8\x12\x1d\x4b\x51\xfd\x1c\xfc\xd7\xf6\x10\x27\xcd\xa2\xee\xb3\xcb\x6f\x59\x40\xec\x73\xd6\xe3\xaf\xfd\xc1\x6b\x16\x5e\xff\x2a\x30\x79\x00\xf0\x3d\xf4\x39\xac\xe5\xaa\xcc\xb6\xc4\x54\xf9\x8a\x72\x73\x21\xae\x1a\xd6\x97\x89\x0f\xaf\xae\x27\x98\xad\x32\x6b\xd4\x82\x0d\xe9\x14\x5d\xcd\x70\x04\xc3\xa2\x12\x17\xbb\xc2\x6f\x93\xaf\x1c\x86\x49\x45\x22\x95\x13\x76\x85\x4d\x2f\xea\xbf\xfb\x3d\x3a\x57\x04\x1c\x89\x20\xc3\xf7\xfc\xc5\x38\x62\xc4\xd0\x1c\xeb\x5c\x63\x7f\x0b\xf8\x38\x95\x17\x23\x0f\x88\xb3\x84\xca\xb5\xfd\x33\xe7\xd5\xab\x03\x57\x17\x97\x07\x7e\xc7\xa1\xc6\x02\x78\xc8\xce\x1e\xeb\xdd\x8d\x32\x77\xf8\x65\x69\x1b\xb3\x6d\xdb\xb0\x63\x11\x9d\xc5\xe9\x5f\x75\x0d\x59\xe5\x45\x65\x0b\x72\xd8\x6c\x5b\x46\xa8\x8c\x1f\x75\xde\x69\xc2\x6f\xdc\x15\x35\x7c\x44\x07\xbc\x80\x5d\x7c\x63\x95\x8c\x02\x01\x7c\x93\xf7\x36\xc3\xa4\x4c\x73\x9c\x5e\x1a\xf9\xa9\xf4\xec\xb4\xce\x2e\x94\x7e\x43\x23\x62\xa0\xfa\x67\x34\x51\xbe\x90\x50\x4d\x4e\xf2\x0c\x38\x41\x73\x9a\x4f\x6d\x73\x38\x9b\xf4\xd1\x67\x38\xab\xbc\x71\xb0\x2d\x3a\xed\x83\x38\x11\x03\x30\xd3\x8e\x14\x57\xda\x3d\x9f\xe6\x20\xf0\xe9\xbe\x4b\x1e\x4f\x14\xb3\x51\xe4\xf1\xca\x30\xa5\x56\x0f\x5b\xd6\x7c\x00\x51\xca\xdc\x96\xdc\xd8\xf0\xa0\x55\x2c\xb8\x77\xb0\xcb\x5c\x6f\xc2\xb2\x10\x2c\x58\xd4\x99\x0b\xc0\xd9\x33\x81\xd9\xb1\xa0\x4e\x0f\x4c\xd9\x1b\x49\xb9\x0a\x3c\xd8\xe3\xa9\xca\x66\xd9\x2f\x2d\xd3\x23\x32\x9a\x69\x9a\x7d\xc3\x27\x1a\x9f\x37\x39\x6d\xe1\x4f\x75\x49\xb5\x48\x10\xcd\xdc\xa1\x1f\x4f\xe4\x37\x2b\x73\x1c\xd8\x9e\x09\xcc\x4d\x19\x69\xc5\x63\x4e\x7d\x34\xeb\x47\x4a\xd8\x0c\xb8\xcf\x87\xbf\x04\xa1\x81\x72\xca\xf2\x1d\xe5\xf3\xa2\xab\x39\x25\xf5\xdd\xa0\x1a\xb6\xc2\x38\x03\x0b\xab\xd5\xc4\xf8\xe8\x50\x22\x4f\x0e\x69\x50\x38\x1e\x17\xb3\xbe\x4d\x10\x1b\x19\xd6\x04\xcb\x0a\x01\x25\x15\x99\xe2\x7a\x49\xcc\x6f\x2a\x27\x6b\xb5\x2c\x8f\xa2\x69\x71\x18\xc6\xd7\x89\x91\x03\x73\xe3\xc8\xf6\xa1\xba\xab\xe7\xcf\x09\x16\x6e\xfc\x9b\x7d\xb4\x1c\x7a\x8a\xfe\xdd\x50\xe1\x03\x8f\x24\xa6\xda\x2b\xa4\x69\x8a\xd9\xdf\xf1\x9d\xc7\x2d\x6b\xbd\x79\x62\xbf\xc5\x08\x84\x3e\xa5\x8a\x84\x3c\x6a\x5e\xc1\x27\xfd\x86\x50\x31\xb7\x07\x21\xf3\x6b\x8b\xf4\xa5\x4d\x21\x1c\x16\x2c\x34\xf3\xca\x6e\xf8\xb7\xdc\xab\x74\xf1\xa9\x7e\xc4\x4e\x60\x99\xdf\x62\xcd\xd0\x97\xb6\x97\xe3\x98\x06\x66\x00\x60\x96\xa1\xb8\xdf\xd5\xdd\xae\x0e\x75\xcc\x1b\xcc\xd0\x96\x5b\x79\xa7\x53\xa9\xd5\xdc\xd9\x82\xd0\xb9\xcf\xe2\xf2\x8d\xd7\xff\x3a\x96\xfd\xd1\x21\xa9\x4d\xb4\xb6\x16\x64\x2d\xc5\x9d\x0c\x66\x22\xb8\x2d\x7d\x46\x32\x27\x0a\x0e\x07\x9f\x1f\x4b\x4b\xb3\xc7\xb8\x4f\x8a\x2c\x26\x1d\x1a\x8c\x8c\x2e\xe4\x54\xfe\xce\x08\x84\xa7\x94\x59\xe0\x49\x44\x1f\x0a\x09\x55\xde\xa6\x51\x77\x01\x2b\x6f\x0e\xbe\x7c\x74\xba\x6e\x60\x11\x35\xb4\x5c\x10\x51\xb6\x23\x01\x4a\xa1\x38\x87\x6f\x7a\x05\x5b\x6d\x2b\x74\xec\x6e\x18\xce\x41\x3d\xa6\xd3\x21\xdb\x09\x90\x72\x21\x09\x79\xde\x7f\x9e\xa1\xf1\x11\x03\x75\xc5\xd8\x4e\x95\xb1\x37\xd0\x41\xa6\x1d\xd7\xe7\x63\x9f\x23\xe2\x7a\x41\x78\xa4\xbe\xca\x1f\x62\x8d\x9b\x11\x90\x8d\x42\x10\xfa\xab\xc3\x7c\xff\x29\xdd\xba\x2a\x71\x81\x88\x1a\x8c\x54\x35\xfb\x91\xf1\xba\x58\x11\xb8\xfa\x4e\x3e\xbe\xf5\xbd\xa5\xb5\x69\x78\x19\x70\x83\xc2\xf0\x6d\xd8\x07\x92\x6e\x70\x98\x13\x8d\x4a\x8f\xf0\xa9\xe4\x95\xe7\x51\xf6\x33\xd4\xb7\x8b\xc4\xf5\xb4\xdf\xea\x7a\xe3\xc2\x40\x23\x7c\xfd\x1b\xec\x80\xcc\x6b\xcc\x2f\x20\xd9\x9e\xf3\xf3\x65\x39\xb6\xf3\x21\xe5\x1e\x68\x95\x71\xf0\xeb\x0b\x1a\x23\x12\xb6\x3d\xd0\x4a\xbc\x4c\x53\xdf\xfc\x45\x5a\xf0\x52\xc7\x15\x0e\x80\xdf\xd5\x46\x4d\xdd\x82\xb7\x40\xd2\x4a\x0a\x8c\xd2\x03\x6f\x27\xe5\xac\xa8\x8b\x45\x8c\x07\x6d\xdf\xf5\xef\xbb\x3c\x1d\x9c\x86\x4c\xf6\xa4\x07\x70\x3e\x04\x9e\xeb\xe3\x35\x16\xb4\xe2\xae\x71\xef\xac\xc1\x0b\x4d\x09\x66\x8b\x16\xcc\x26\xf8\x03\x04\x13\x73\xeb\x99\x99\xb5\xbc\x39\x0f\x55\xc7\x11\x5a\xb0\x2f\xfa\x13\x42\x22\x2e\x17\x2d\x59\xc1\xbc\xbe\xc5\x66\x27\x10\x86\x90\xf6\x6a\x7d\x41\x19\x9f\xbb\x41\x12\x42\xcd\x4b\x6c\xbb\xd0\x9e\x79\xd5\x5e\xd1\x5a\x6f\x26\x91\xe5\x66\xad\x76\x1e\x73\x0e\xfd\x84\x5a\x8e\xf4\x03\xd5\xb8\x6d\xc2\x5c\xe1\x72\x8f\xd2\xe6\x34\x33\x7e\x41\x7e\x72\x2c\x93\x1d\x87\x88\x8b\x4b\x81\x0d\x93\x40\x4c\xe4\x03\x51\xb0\x41\x29\xb9\xc5\xae\xea\x29\x45\x95\x05\x11\xdc\x21\xdb\x10\x88\x9d\x51\xff\xd4\x22\x2e\x7a\x30\xcb\xf5\x8c\x78\x90\x85\xfc\xe9\x4a\xa3\x16\x0c\x1f\x3e\xb3\x1d\x28\x7e\xf3\x67\xad\xb1\x66\xd4\x1e\x51\xb8\xe5\x7b\x6c\x36\x44\x34\xa5\x53\x87\xda\x28\xcc\xc7\xb0\xd0\x9c\x84\x52\x73\x33\x10\x83\xb0\xde\xba\x5f\xe6\x51\x3d\x78\x0b\xd8\xe8\x6d\x37\x29\x9d\x48\x97\x7a\xee\x61\x59\x56\x58\xa9\x36\x3a\xfb\xf8\x97\xb5\x8e\xc8\x97\x06\x53\x41\x90\xcc\xd5\x0d\x7c\xb8\xd5\x9d\x48\x5f\x91\x5a\x13\x82\x39\x62\xfc\xf9\xdc\xce\x74\xce\x1b\x8f\xb7\x15\x31\xa5\x44\xd5\xc1\x14\xc7\x0b\xaa\x09\x33\x5c\xca\x34\x70\x21\x3d\x1d\x3b\xb6\x09\x5f\x2e\x89\x0d\xd9\x83\x79\x6d\x90\xbd\xf9\x5c\xe8\xf2\x9c\xce\xbb\x7e\x7f\xf2\x8d\xd8\x33\x96\x40\x1f\x75\x12\x4f\xd8\xac\x13\x59\x1a\xd4\xa2\xd2\x64\xce\xc7\x91\xde\xb3\xc1\x79\x0d\x65\x94\x8a\x20\x58\x9f\x0d\x91\x73\xd1\x2a\x82\x19\x87\x92\x16\x20\x88\x62\x91\x41\xa9\x75\x96\xb7\x04\xd1\x3e\x0c\x79\xe7\xf0\xd9\x7a\xc1\xee\x6b\x25\x05\x7d\xbb\xb9\x13\x01\xc5\xd7\xa0\xa2\x4d\xe8\xbd\xf1\x34\x24\xa4\xbc\xd3\x49\x34\x76\x98\xd2\x52\x13\x49\x53\xac\x8d\xde\xb4\x98\x88\x47\x72\xe4\x27\x68\x75\x20\xac\xbe\x2c\x01\xc2\x09\xfa\x8c\xc3\xb7\x2f\x29\xe3\xe7\xc2\xc8\x00\x9f\x99\x5d\x00\xee\x2c\xb0\x89\x51\x89\xf9\xe4\x78\x0e\x72\xdd\x49\xe8\x18\x11\xde\xe4\x3a\xd6\xf7\x53\xd1\xf6\x37\xed\xe2\xf5\xe1\xde\x4c\x9e\x6f\xc4\x77\x7f\x40\xd5\x9b\x1f\x36\xb2\xb0\xa5\xb8\x69\x0c\xcd\x53\x84\x1f\xfb\x41\x8f\xb5\x5f\xae\x51\xcd\x6b\x1e\x07\x04\x83\xc2\x01\xc6\x31\xd2\x2f\x81\xd2\x92\x90\xfb\x25\x53\x89\xd2\x38\x80\x20\x96\x3e\xe2\xd2\x16\x05\x94\xb4\xe9\x05\x1d\x2b\xc8\xdf\x1c\xd4\x9b\xa4\x03\xea\xb7\x51\xe4\x36\x27\x02\xe1\xf0\xa4\xf0\xcb\x1a\xff\x7e\xa3\xe6\xd7\xfa\x64\x34\x78\x58\xbe\xa6\xda\xa2\x75\x87\x98\x55\x72\xb7\x4d\x8f\xd1\x61\xfb\xb3\xec\xab\xe2\x5e\x5e\x07\x2e\x33\x52\x60\x9d\x2c\x16\x51\x39\xdb\xc7\xac\xa0\x44\xb5\xd9\xf4\x0e\x18\x98\x00\xe6\xec\x72\xe6\x47\x98\xc0\xa2\x90\xc1\xaa\x5e\xb8\x54\xd7\x17\x8e\x5b\xb9\xc1\x2f\x9a\x57\x01\x1d\x32\xc4\x7e\x92\x7a\xeb\xfc\x88\x39\x94\x27\xc5\x53\x0d\x19\xcd\x43\xc4\xd0\x67\xaf\x77\xec\x56\x1c\x28\x04\x3e\x46\x97\xd7\xf7\x87\x1c\x85\xcd\xac\xa7\xf0\x43\x9c\x58\xee\xc1\x15\x93\x83\xa0\x77\x6f\xa2\xe8\xdc\x88\x83\xea\x95\x08\x2f\xd6\xcb\x90\xc0\xf0\x4a\xbf\xd1\x64\x55\xb6\x13\x45\xc8\x4a\xed\xd8\xd6\x8d\x58\x78\xbe\x0d\x64\x81\x10\xb5\x66\xf8\x5d\x9f\x78\x16\xac\xe1\x69\x4c\x70\xa8\x48\xff\x49\xbf\x53\x41\x14\x35\xeb\xc7\x70\xf1\xd3\xb3\x1d\x0e\x7c\xf0\xb9\x1c\x02\x1a\x0b\x6e\x05\x42\x8d\xdd\x75\x3b\x7e\x4b\x11\x66\xdd\x5a\x56\x97\xae\x05\x5f\x10\x1b\x45\x8f\x94\x44\x9d\x98\xa6\x5f\xf0\x13\x6b\x19\xa9\x85\x71\x79\xb2\x9f\x32\x5c\x62\xb6\x8e\xaa\xa1\x91\x30\xfd\x5b\x34\x4e\xe3\x12\x5d\x11\x78\xba\x95\x0c\x44\xd0\x70\x97\x94\x8c\xec\xd8\xff\xd8\x31\x31\x0e\xf7\xb9\xa2\x0b\xcb\x01\x25\xdb\x68\x32\xa0\x22\xa1\xc4\x5f\xd8\x68\x67\x2b\x9c\x0f\x48\x4c\x00\xe3\x38\x0b\xa4\x71\xd4\x26\xa9\x20\x68\xce\x07\x57\xaf\x67\x04\x83\x50\x6b\x2f\x55\x58\xde\xec\x87\x7d\xed\x6b\x33\x02\x29\xe5\xf7\xc3\x2f\xd9\x32\x9f\xa5\x94\x88\x13\x2f\x98\x44\x41\xff\x3a\xdc\x85\xb1\x8e\xa8\xf9\x00\x42\xe0\xe2\x72\x25\xf8\xfc\x94\xb3\xd6\x69\x0e\xe9\x38\x89\xf2\x60\x7c\x05\xe3\xeb\x61\xd7\x66\xfd\x84\x5f\x2b\x75\x82\xd1\x25\x24\x42\x06\x5d\x3f\xc5\x6b\x48\xec\xd8\x3a\x85\xae\xc7\x47\x7d\x60\x3c\x7b\xe3\x23\x56\x85\xfb\x4c\x4e\x65\xf7\x74\x73\x46\x65\x28\x64\x21\x79\x4e\xbd\x9c\xe8\x66\x98\x4d\x4e\x48\xf7\xa7\x3e\xda\x4d\xfa\x5d\xae\xde\x9c\xab\x08\xe8\x1f\x06\xd2\xe0\xcf\x84\xcb\xa1\x8b\xa4\x60\x48\x17\x68\x8e\x4a\xa8\xbf\x36\xdb\x6e\x39\x3e\x4c\xa7\x07\x48\x46\x26\xe1\x62\xf9\x5b\xab\x4e\xea\x2d\x56\x60\x4a\x6a\xea\xd7\x2e\xbb\x9a\xdd\xa0\x44\x8d\x1f\xdf\x43\x26\xb4\x0e\xed\x17\x8f\x69\x7a\x03\x69\x51\x3b\x9d\xe8\x40\xc9\x52\x09\x97\xf4\x40\x30\x82\x0d\x05\xef\x8c\x1c\xd2\x8b\x65\xd1\xca\xd6\x03\xdb\x10\x17\x5c\xdf\xdd\x71\x98\x9e\xbe\x79\xdd\x16\x21\xa8\x95\x0d\xb5\x1b\xdd\x36\xff\x8d\x34\x91\xb3\x4a\x9e\x70\x38\x69\x1f\xf5\x57\x51\xb0\xf4\xbc\x09\x98\x4b\x14\x49\x62\x84\x31\xa7\x21\xe5\xfb\xec\x36\x77\x61\x92\x7c\x95\x8c\x5e\x71\x9a\xa9\xf6\x5a\xcd\x70\x45\x79\xbb\x5d\xde\x2f\x29\xfc\x58\x2b\x11\x34\x80\x90\xdc\xab\x7d\x4c\x9d\xbf\x36\x13\x44\x6d\x96\xd8\x01\x3c\x29\xe5\x8f\xce\x4c\x2e\xc1\xd2\x2e\xf7\x9e\x26\x48\x37\x54\x92\x38\xe3\x52\x0b\xcd\x3b\x15\xe6\x73\x6e\x3a\x5e\xa2\x45\x57\xb6\x1f\x26\xc5\xef\x37\xed\x2e\x48\x78\x19\xb1\x6a\xa8\x90\x07\xb6\x9a\x8c\x9c\xde\x03\xf2\x81\x02\xe3\xa5\xad\x0b\xc3\x12\xf3\x22\xb0\x4d\x56\x70\x47\xbc\xba\xcd\x1c\xbe\xdb\x79\x35\x0a\x22\x8f\x44\x11\x3e\xfe\xad\x8e\x32\xfa\x7e\xd5\xdc\x2f\x23\x2f\xf4\xb3\x40\xf9\x20\xf6\x1b\x0d\x24\x07\x48\x18\xc3\xb6\xb6\x62\xd3\xba\xc5\xef\xdb\x3d\x39\x18\xe7\x14\xc6\x99\x73\xac\x51\xee\x3b\xcc\x5a\x0a\x4f\xf3\xb6\xd6\x99\xba\x56\x00\x3a\x28\x87\xdd\x27\x35\x23\x59\x97\xfb\x63\xf6\xef\x7e\x8d\x84\x7d\xbd\xda\x32\x4b\x17\x60\x1a\x29\x8d\x25\xf2\x60\x1c\x69\xfd\xb5\x94\x3e\xe1\xd0\x46\xb2\x09\x2c\x72\x75\x20\xb4\x9b\x4f\x1f\xcb\x13\x30\xd3\xbd\x87\x37\x24\xd6\xa8\x18\x06\x6e\x53\x34\x3a\x42\xbb\xfb\x84\x45\x36\xba\xd3\x6e\xc2\xda\xc3\xab\xe7\x17\x9c\x79\xcf\xcf\x46\xb5\x62\x3f\xed\x86\xf9\x72\x59\x80\xd9\xca\x7e\xf8\x9d\xb8\xdb\x6e\xbe\x54\xd0\xbe\x12\x3f\x43\x15\x68\xb5\x15\x6d\x32\xf1\x8a\x8f\x4e\xf8\x0f\xab\x38\xb9\xd9\xe7\x49\x71\x17\x0c\xa0\x13\x45\xea\x3a\x9e\x2a\xab\x75\x53\xee\x7e\xab\xc9\xfd\xc9\xa8\x22\x81\xf7\xda\xc1\xd1\x2f\x3e\x6f\x17\x06\x87\x50\x15\x0a\xca\x6d\xda\x2a\xb6\x10\xf1\x7a\x1f\x5f\x86\x33\x5c\xc0\x62\x3f\x5a\xdb\xee\x9b\xae\xdb\x12\x93\x20\x46\x60\x78\x3c\xd6\xd2\xd6\x82\x01\x3c\x2b\x75\x83\x5d\x16\x36\xf6\xba\x4a\x8b\xf8\x53\x0b\x90\x34\x90\xa2\x9e\x9d\x5b\xf3\xa2\x25\x84\xaf\x7e\x0e\x41\xe3\x57\xe5\x22\xae\x99\xb6\x62\x1d\x5f\x3d\xd5\x96\xdf\xb1\x69\xc6\xe7\x87\xf1\xc6\xa6\x84\xed\xa7\xab\xc6\x6a\x71\xa6\xc3\x3d\x5f\xa8\x89\xbb\x89\x7d\x03\xac\x17\x11\x3d\x79\xbd\x8b\x03\x6c\x6e\x8f\x6e\xe8\x5a\xe0\x0b\xd6\x0e\x3e\x3e\x9d\x8a\xd0\xb8\x10\x59\xf1\x3a\x1f\xbc\x90\x13\x1b\x8c\x2f\x06\x62\x3e\x11\x50\x10\xab\x8d\x72\x6b\x27\x9a\xc9\x42\x37\x40\x5b\xa1\x7b\xb0\xd5\x5b\xa5\x41\xe4\x04\x85\xbb\x47\x18\x65\x2d\x38\xea\xbb\x1b\x17\xc7\xaf\x47\x84\xd0\xa8\x6f\xb2\x52\xe4\x9b\xca\xde\xc7\xef\x10\x18\xc1\x6a\x39\x44\xf7\x58\x4f\x50\x10\x34\xcd\x09\x97\x95\xeb\xd4\x84\x37\x53\x49\xdd\xa6\x10\x0f\x75\x25\x29\xf3\xf5\xbe\x6e\xfc\x0e\x92\xb0\x22\x2c\x48\xe0\xab\x83\x85\x78\x8b\x30\x61\xdf\x6f\x06\xb8\x4b\xa5\xd4\x63\xd9\xba\x30\xe9\x24\xda\xab\x47\xbf\x8b\xd4\xc6\x46\xce\x39\xd9\xd0\xdb\xd4\x9a\x12\x9e\x7c\xe0\xaf\xf2\xf9\xa1\x3e\x73\xc4\x62\x98\x8f\xdf\x0d\x2b\xf3\x3d\x29\x4a\xee\x14\xa5\x7e\x6c\x1b\x69\xce\x82\xe8\x13\xe8\x02\xcd\x2d\x42\x4f\x8b\xfc\x74\xc1\xb0\xf8\x82\x22\xf6\x24\x1e\x09\x93\x91\x93\xb8\x01\x5f\x8b\x1b\x21\xd6\x1d\x43\x98\x35\x7c\xce\x1c\xa7\x82\x1f\x9e\xd6\xd0\x13\x7d\x1a\x0b\x39\x2e\xdb\xdd\xa3\x37\xa3\xc5\x11\x26\x9a\x55\x60\x43\x73\xd8\xf1\xb9\x3c\x38\x69\x77\xbd\x92\x5f\xe2\xb5\x77\x96\x7e\x44\xb6\x4f\x2d\x2a\xec\x36\xb7\xbc\x30\x64\x64\xfc\x92\xdf\x91\x2c\x94\xdd\x11\x13\x69\x10\x37\xc0\xe2\xc0\xa3\xc5\xa2\x6e\x2e\x08\x17\x36\x2b\xba\x5c\x2e\x97\x39\xfc\xde\xd5\x76\x37\x1c\xe9\xf8\x48\xfa\xf0\xa1\x54\x02\xfe\xb5\x3d\x6c\xc4\x1c\x04\xc6\x55\x88\x59\xae\x6e\x66\x4c\xa9\x9e\xad\xbf\x4b\xb8\x12\x14\x50\xd1\xb9\x90\x33\xf5\xa2\x24\xf6\xd3\xb2\x60\x4b\x66\x82\x4d\xcb\x4d\xad\xb6\x1a\xd6\x36\x9b\xf9\xc2\xce\xd7\xe7\x4c\x88\xfe\x0d\x86\xb5\xd7\x9a\xde\x3d\xa5\x74\x91\xb2\x9d\xf5\x2f\x72\x0d\x5d\x8b\x26\xf5\xa6\x2c\xd9\xaa\x7f\xd0\x39\xf1\x88\xa0\xa8\xb6\x7a\xd1\xdd\x67\x40\x29\x6d\x54\xb6\xdb\x6c\x7d\xd9\x2e\xcb\x6d\xc6\x98\x57\x4e\x42\x0c\x58\xb2\xae\x5a\xf4\x8c\x0f\x3a\x23\xf3\xb3\x60\x6d\x46\x13\x2e\xeb\x48\x07\x67\x43\xa4\x84\xf5\x2e\xdd\x8b\xbb\x45\x47\xbc\x2c\x36\xca\xe6\xaa\x5d\xfa\x47\x55\x39\xfa\xb7\x9b\xaf\x60\xf5\x8c\x8f\x5d\x24\xbf\xb9\xee\x81\xb8\x86\x10\xdb\x03\xa9\xed\x13\x7b\x5f\x45\x02\x2d\xb3\x72\x3c\xdb\xd0\x27\xfc\x68\xcd\x05\x61\x2b\x93\xa4\x40\xf5\x4d\xc7\xd0\x58\x94\x58\x2d\x0d\x25\xc9\x44\xee\x1b\x95\xd3\xa1\x55\x29\x7f\x8a\x7c\xc4\xb1\x55\xce\x18\x18\x81\xac\x1e\x17\x01\xce\x3d\x57\xec\x53\x13\x45\x34\x71\x23\xe7\xca\xd8\x27\xe4\xc2\x2e\x04\x87\x9e\x74\x2f\x77\x32\x6b\x73\x15\xb5\x3e\x09\xbb\xce\xc4\xd4\xfb\x6b\x9a\xd6\x93\xea\x91\x9a\xaf\xf1\x92\xd5\xb7\xe7\xa2\x2a\xc9\x2f\xc3\xca\x6f\xb3\x52\x1f\x29\x8f\xb7\xea\x03\xe3\xe8\x8f\xcb\x35\x56\xfd\x98\xdf\xd3\xd0\x0e\xeb\xc7\x48\x54\xcf\xd4\xc4\x7d\x14\x50\xb1\x8f\xdf\xd3\xf0\x5d\x57\x4e\xdc\x12\xc4\x84\xe1\xc7\x91\xd2\x4f\x64\xe7\x9a\xf2\xbc\x6a\x88\x3a\xab\x0d\xa0\x0f\x44\x15\xc6\xa0\xa4\x0f\x14\x4e\xf0\x6d\xa7\x25\xe4\x5a\xa1\xb8\xcf\x2c\x6e\xc1\x4c\xb3\x92\x51\x9d\x25\x39\x01\xb0\x55\xa2\xbe\x5e\xc1\xee\x03\xc5\xbd\x30\x80\x23\x6f\x84\xd8\x5f\x26\x30\xec\xa3\xa1\x0f\x01\x0e\xca\x5f\x17\x1d\xb3\xc7\xac\x85\x21\x6a\xed\xa1\x20\x96\x18\x4e\x2e\xc0\x0d\x73\xd4\xaa\x38\x32\xda\x31\x49\xad\x39\xa4\x4f\xd2\xf7\xc5\x20\x65\xe6\x8d\xd3\xcb\xb2\x6b\x93\xb8\xe4\x83\x06\x02\xcc\x02\x88\x2f\x9f\xee\x3b\x7d\xad\x6b\xb8\x6c\x89\xab\xa7\xb7\x80\xed\xb7\xd2\x6d\xbe\x89\x00\xbe\x7f\x97\x59\xbe\x1e\x86\xa4\x35\xf2\xb4\xf8\xb3\xde\xab\xf1\x39\xeb\xc6\x1f\x59\xf1\x4c\x28\x97\xb6\xfb\x9a\xf4\x52\xc6\x18\x80\x80\xf1\xbe\xac\xa3\x3b\xf5\xd9\xf5\xb1\xbf\x82\x1f\x29\xa7\x25\x71\x5a\x61\x7c\x45\xee\xf8\x7a\xc5\x09\x36\x38\x0b\x81\xe2\x13\x46\x16\xe6\x6c\x20\x2a\x11\x62\x96\x63\x98\x9c\x0a\x9b\x5e\x9d\x50\xcc\xb5\x20\xf8\x44\x33\xe4\x0e\x53\xc3\x6f\x87\xe6\x83\x94\x1d\xb8\x37\x0b\xd1\x3a\x76\x81\xae\xf5\x9f\x4f\x57\x0c\x75\xfa\x91\x80\x52\x39\xe8\xdb\x5c\x6e\xdc\x42\x52\xd8\xe2\xfc\x25\x29\x2a\x02\x1b\xfb\xa5\xda\x37\x05\x58\x5c\x24\x13\x54\x8a\x42\x77\xab\xfd\xf7\xd0\x1a\x89\x51\x09\x9d\x3e\xaf\x11\x87\xa3\xda\x53\x26\xc4\x28\xee\xda\xf4\xec\xc9\xc3\xce\x89\xc1\x94\x9c\x99\x75\x0c\x9b\xf3\x43\xfd\x18\x26\x7b\x76\x49\xf9\xb3\xdc\x15\xf3\xc3\xbb\x66\x1e\x36\x16\xae\xd2\x47\x0b\xc7\x61\xb4\x00\x94\x22\x65\x0a\x0c\xdd\x31\xcd\x6c\xa0\x91\x46\xe5\x1b\x53\x69\x44\x16\x5e\x4f\x2e\x75\x38\xd3\x70\xce\x87\xe5\x54\xdb\x9f\xf7\xaf\x7f\x91\x2f\x1f\x6e\xdf\x02\xac\xa2\x1a\xce\x1b\x4e\xd3\xca\x39\x85\x8a\x90\x58\x2a\x13\x11\x13\x24\x4f\x7b\x4e\x14\xa5\xe4\x23\xf7\x27\x52\xd7\xa0\x35\x66\x39\x79\xec\x00\x7e\xb5\x00\x08\x84\x50\xbb\xdc\x31\x22\x35\x2e\x10\x3c\x7b\x17\xe6\xfc\x8a\x71\x59\x32\xe6\xc1\xb0\xbc\xbc\x74\x19\x07\x34\xe2\x2c\x0b\x70\x2b\xf3\x09\xf1\x15\x11\x76\xf1\x61\x8b\x92\x59\xe2\x65\xc1\x0f\x82\x40\x00\x39\x5c\x4c\x84\xd0\x19\x44\xb2\xf0\x07\xfb\xd5\xe9\xb1\x10\x5a\x0a\xb5\x31\xd3\x28\x50\xca\x0c\xb6\x8d\x2e\xce\x14\x73\xe0\x6a\x84\xfd\x72\xae\x49\xbf\x30\x5b\xb5\x47\x75\x49\x60\x96\x1e\xcd\xca\x63\xaf\x21\xa8\xe6\x9e\x29\x46\xdd\x6e\xae\x4e\x8d\xf0\x6e\xfb\xb1\xcc\xae\xb3\x31\x7f\x62\xe7\x6f\x4a\x59\xdd\xd6\x21\x9e\xf9\xe3\xed\x54\x70\xb8\x5a\xa9\x30\x62\xb4\x41\xc1\xd3\xf8\x95\xdf\x46\x1f\xf3\x81\xe7\xe8\x4e\x8d\x17\x82\x04\x6f\x97\xa3\x74\x4c\xea\x19\x0b\xde\x92\x67\x5a\x86\xba\x72\x29\x35\x8f\x00\x45\x70\xa1\x49\x72\x3a\x53\xcc\x9e\xfd\x0a\xdd\x6a\xb8\xb1\xf7\x8d\xbf\x67\x8d\x6e\xd0\x65\xd9\xa8\x00\x39\x7c\x93\xd6\x0c\x78\xe5\x30\x85\x37\x85\x3e\xd8\xa6\xda\x98\x98\xb3\x1a\x0a\x31\xeb\x20\x17\x63\xaa\xfa\xe2\x68\xfb\x32\x5e\x26\x53\x92\x72\xc1\xbc\xf2\xf4\x88\xea\x21\x0b\x03\x7f\x98\xd2\x0c\x4b\xda\xbb\x78\xcd\xb3\xc0\xcb\x44\x3d\x24\xbd\x8c\xd2\xd4\x43\x26\xf3\x0c\x19\x74\x48\x90\x1c\x18\x76\x98\xbb\x63\x47\x9e\x73\x00\x33\xd3\x63\xcb\x61\x76\x9c\x98\x67\xac\x5a\xba\x73\xf9\x0d\xdd\x20\x88\x3c\x62\x29\x02\xf7\xbc\x2c\x60\x0c\x55\xb5\x90\x5f\xc6\xb3\x0a\x8c\xb5\x37\x74\x95\x07\xfe\xbb\x74\xc7\x9e\x11\x29\xcd\x22\x6b\xc7\x5d\x74\x28\xc4\xe9\x14\xfa\xdd\xc6\x19\x43\xf9\xe8\x62\x54\x66\x9a\x3d\x4f\xab\x65\x62\xc7\x5a\xa8\x2c\xa2\xaa\xf6\x62\x18\xfa\x42\x74\xe0\xfb\xb5\x1a\x5d\xb1\xed\x46\xea\xb3\x4f\x49\x3c\xfd\x1d\x58\x8d\x8f\x55\xc2\x13\x86\x5e\x39\x73\x12\x7d\x4e\x51\x4c\xa5\x25\xde\x4f\x39\xb5\xcc\xb3\x04\xee\xe6\x0b\xda\x3b\xa8\x0f\x55\xd2\x5a\x15\xe7\x42\x1e\xf5\xcb\x27\xa0\x57\xf7\xb1\x9f\x3b\x1a\xc4\x7a\x52\xfc\x99\xc1\xa4\x8d\x10\xce\x2f\xb1\x50\x5e\x0d\xbe\xe5\x53\x6c\x07\xac\xd4\x11\xf0\xec\xad\x9f\x37\xcf\x66\x20\x19\xd2\xec\xb7\xea\x86\x4c\x2a\xbc\x56\xf1\xda\x6a\x90\xc8\xaa\x1e\x45\x33\xc0\x7e\xd7\xd8\x30\xb4\xea\x8e\xb7\xf4\x73\xa7\x16\x0f\x7d\x10\x0f\x2f\xa0\x3b\xe0\x35\x27\x46\x04\xd0\x58\xcb\x11\x9d\x35\x6a\x6f\xeb\x8b\xec\x34\x4d\x72\x85\x8d\xec\x9b\xdc\x03\x8d\x78\xa2\x3a\xcd\xfd\x92\x72\x74\x9f\x3e\x4e\x66\x47\xd8\x07\x7d\xcb\xc4\xf4\xc4\xc1\xaa\xf2\xb0\xa4\xd5\xd5\xe7\x7a\x54\xf5\x48\x63\x9e\x00\x84\x0e\x40\xd4\x03\xbd\x43\x27\x40\xf8\x35\x31\x33\xa7\x1a\x2a\x69\xdc\xae\xfd\xd0\x58\xc0\xc9\x9c\xc2\xdb\x57\x4a\x5e\x27\xc1\x44\xa6\x55\x2c\x94\x0d\x8f\xf1\x91\x41\x9d\xbc\x0d\x5d\x63\x31\x70\xbc\xd5\xa4\xb2\xcf\x30\x28\xa1\x2f\xee\xd2\xcb\x82\x4d\x19\x1f\x79\x08\x50\x3c\x82\x09\xa4\xe2\x88\x40\xdb\xca\xfc\xae\x3b\x1e\xd9\xed\xd5\x60\x99\x36\x5f\xda\xeb\x88\x0a\x82\xd4\xc8\x23\xe3\x68\xc4\x41\x97\x3f\x12\xb9\x93\x46\xad\x9c\x58\xd8\x80\xe2\xf3\x21\xca\x09\x8d\xe7\xb1\xd2\x59\x2d\x58\x39\x0e\x48\x50\xff\xa8\xb1\x22\x7f\xcf\x60\xe8\xf6\x53\x9e\xeb\xae\xfd\x76\xde\x72\x1c\x50\xe4\x0f\x81\xad\x76\x14\xcb\x15\xc3\x28\xc4\xb8\xc5\x4a\x60\x49\x3c\x71\x78\x31\x25\x4f\x61\xa6\xf0\x58\x8b\x24\x78\x95\x75\xeb\xf2\x1b\x7e\x03\x17\xf0\x88\xac\xa8\x1c\x6e\x98\xc8\x36\x99\x7d\x53\xd3\xa6\x8b\x84\xc5\xe4\x36\xb6\x4d\x71\x65\x4b\xa6\xe4\x07\xec\x4e\xd1\x65\x83\x7d\x09\x63\x70\xb8\x3b\x8f\x9d\x99\xcf\xca\xb0\xf5\xba\x78\xeb\x93\x90\x1b\x74\xa3\x27\x9f\x79\xc8\x71\xd7\x6c\x62\x71\x19\x5e\x77\xcb\x4d\xce\x00\xc7\xd7\xa1\x86\x8d\x60\xba\x5f\x84\x0e\xd2\x4d\x2a\xb7\xcc\xd4\x82\xe6\x17\x4c\x78\x70\x6a\x6c\x91\xc0\x08\xf3\x75\xae\xef\xf0\x75\x78\x64\xbd\xe4\x02\xf2\x07\x4f\xd6\xda\x26\x5a\xbf\x3f\xec\xad\x0d\x94\x87\x8d\xce\x65\x55\xb5\x68\x5d\xa7\xa6\xf2\x89\xf8\xf8\x52\x45\x0a\x88\x3f\x06\x18\x66\xd3\xdc\x9c\xf3\xfa\xf3\xc0\x8b\xdc\x2d\xd9\xb8\xd6\x9c\x23\x55\x0e\x3c\x53\x46\x4b\x0d\x54\x1d\x22\xbf\x89\xa1\x57\x70\xfa\x3b\x24\x65\x46\xeb\x39\x48\xe3\x50\xa6\x1e\x9b\xa9\xa3\x26\x47\x72\xb6\x10\x46\x94\x32\x77\xd5\x1f\xa2\x58\x50\xed\x10\x3d\x47\x90\x79\x5f\xe0\xd0\xaa\x8b\xbd\xe4\xc0\x55\x5d\x83\xbc\x25\xf1\x1e\x81\xe0\x2c\x85\xf8\x42\x06\x38\xc6\x17\x57\x94\x35\x9e\x2f\xa2\x71\xeb\x22\x34\xee\xf0\x61\x92\xc8\x98\x7c\x65\xca\x65\x26\xf7\x9f\x09\xdb\x05\x2d\xb6\x7f\xea\x14\x83\xc5\x22\xca\xe6\x5d\x89\x0e\x65\x7f\xcc\x0f\x2d\xf1\xf5\x93\x45\xea\x61\x1c\x7a\x70\x7e\x53\xc6\x42\x3d\x44\x4a\xe4\x98\x37\x85\xdb\x66\x69\x7e\x57\x00\x22\xc5\x8c\x33\xd9\x9d\x8e\x92\xbf\x74\x7a\x0c\x8f\x39\x29\xa2\x1f\x15\x54\xfd\x6d\xd2\x24\x5a\x82\x00\xf3\x0b\xb8\x28\xa4\xfd\x2d\x23\xe6\xa9\x1d\xf2\xdb\x22\x99\xa1\xf5\x3f\x9f\x55\xf4\x8c\xda\x7f\x18\x0a\x7e\xe8\xce\xee\x5e\x5b\x1b\x59\xb1\x40\xd2\x01\xa1\x3a\x65\x4e\x2e\x5a\x84\xc6\x44\xc8\x4d\x50\x47\x34\x0b\xab\x6b\xeb\x0c\x00\xb6\x29\xe2\x0a\x6f\x91\x13\xd3\x2e\x00\x5a\xc5\x11\x0f\xca\x85\x9a\x37\x43\xaa\x05\xbe\xb7\x04\xf8\x8d\x6b\x6b\xf2\x91\xab\x56\xb4\x9b\xec\x8a\x1b\x40\x04\xf6\x2e\x90\x05\x07\x89\x9a\x65\x07\x86\x18\x65\x5e\x2c\xff\x5a\xff\x67\x46\x6a\xeb\xba\x41\x91\xfc\x76\xff\xfb\x55\x84\xe1\x0e\x49\x1a\x8d\x9a\xd4\x25\xed\xc6\xa3\x92\xc7\x74\xa4\x1f\xbd\xf2\x23\x8d\xee\x79\x1f\xa6\xa8\xf5\xa0\x94\x18\x53\x92\x67\x7f\xc7\x14\x47\x39\x7e\xe0\x4d\xac\x9f\xc5\xdd\x8d\x38\xcf\xf9\x12\x72\x1d\xcc\x8e\xba\xfd\x4b\x13\x90\xa9\x25\xb9\x68\x6c\xea\xac\xa8\x0b\xc7\x46\x46\x56\xa4\x7a\x81\x0f\x87\x40\x98\x35\xfa\x69\x56\x85\xd3\x9f\xf7\x9f\x9a\x7d\xec\xfb\xab\x0c\xed\xd5\xca\x2a\x0b\x13\x80\x13\x3f\xb8\x61\x60\xf0\xb7\x15\xfd\xdd\x82\x7f\x9e\x8f\x53\xa7\x81\x16\xfb\x9a\x1c\x25\x7b\x77\xf3\x6a\x32\x91\x3f\xb2\x30\x42\x45\x26\x54\x9f\x7a\x5e\xaa\x66\x01\x41\xc9\xd1\x38\x72\x61\x9d\xe6\x7d\x77\xf6\xf0\x93\x01\x3d\x93\x04\x6d\xaf\xac\x69\xa9\x6a\xdc\x16\x01\x2d\x64\xef\x25\xbd\x14\x7c\xd9\xe7\x1a\x0f\x24\x24\xea\x5f\x30\xe1\xaf\x15\xdb\x2d\xa9\x46\x97\x51\xdb\x39\xdf\x7e\x2d\x43\x52\xb5\x0a\x06\x46\x7e\x4f\xe4\x37\x25\xc8\x06\xe3\x5a\x23\xa0\x16\x43\xac\x00\x4a\xa9\x55\x1d\x53\x7e\x8d\x57\x02\x7f\x4b\x22\x6c\xe2\x24\x64\x6b\x4b\x79\xfe\xf0\x28\x57\xcf\xd4\x96\x5c\xd1\x01\x9e\xc1\x87\x02\xe3\xe7\x08\x95\x9f\xfa\x2f\x92\xd9\x81\x59\x6b\x24\x6b\x27\xd5\x02\xea\x85\x0f\xc6\xbf\xce\x55\x5e\xa2\xda\x11\x09\xcd\x01\x05\xad\xc0\xf7\xec\x79\xa7\xb2\x09\x8a\xa6\x44\x7b\xdd\xfe\xe4\x5f\x8e\x1b\xed\x35\xa3\xab\x89\x2a\xc4\x51\xc7\x6f\x00\x4f\x58\x4b\x69\x98\xda\x82\x18\x24\x34\x73\xd7\xe7\xfa\xad\x34\x1b\x7c\x75\x49\xb9\x1c\xe2\x37\x1c\x3a\x0a\x8d\xa4\x5f\x13\x84\x50\x07\x9d\xd2\xa8\xa4\xee\x80\x32\x11\xc9\xec\x48\xa4\x68\xe6\x4c\xe1\xc7\xc9\x78\x56\x05\x05\x8c\x08\xfe\x26\x88\x8c\x3e\x54\x4c\xbb\x2e\xf4\x5a\xea\x37\x55\x94\xc5\xf3\x4c\xb7\x38\x8d\xc9\x0a\xea\xec\xd5\xf2\x76\x8c\xce\x2f\x2f\xc0\x10\x46\xe1\x57\x02\x4f\x58\x75\xcf\xd0\xb1\x6b\xb8\xe5\x3f\xa8\x94\x88\x04\x2f\x08\x72\x98\xdf\x50\x72\x6b\xa0\x70\x38\x3b\x69\xa3\x63\xd3\xec\xf0\xc6\x7f\xc6\x8e\x09\xbf\xd9\xc9\xeb\xe7\x46\x6f\xf4\x5b\xa1\x26\xa7\x39\x80\x7b\x94\x97\x76\x9f\x58\x6b\xdd\xe6\xc7\xc3\xfe\x22\xb4\x62\xdd\x0d\x7e\x18\x63\x6c\x03\x0f\xe7\xf3\x35\x7c\x2d\xe9\x7f\xc5\x62\x34\xb3\xd9\x6d\xf2\xfb\x7b\x3f\xb7\xaa\x31\xe5\xab\x1c\xf7\x74\xe3\xce\x89\xac\x45\xaa\x6f\xee\xbd\x4e\x62\x0f\x6f\x7d\xd4\x6a\xac\xaf\xdf\x70\xfc\x3d\xc6\xbc\x52\xd0\xd7\x8f\x1a\x5a\xd0\x9d\xb0\x71\x1c\x8f\x90\x17\xac\x12\x0b\xa0\x52\xdd\xfa\xcd\x8c\xcf\xc9\x35\xd5\x0f\x9a\x05\xd8\xcd\x93\x0c\xfa\x6c\xe4\x25\x04\xd5\x7b\x6e\x78\xdf\xaf\x0b\x3a\x65\x7c\xd0\x00\xba\x89\x6a\xb0\x48\x1d\xdc\x68\x6b\x2b\x4b\xbd\x21\xc4\x9f\xc0\x5f\x7c\x67\x10\xbd\x15\x67\x1a\xf7\x7e\xf7\x5d\xd1\xd5\x34\x7c\x64\xdc\x48\x82\xa9\xfc\x26\x7f\x34\x14\xd5\x65\x7c\x7c\xd5\xbc\x2b\xe3\xfa\xf1\x3d\x83\xab\x34\x55\xd4\x21\xce\x2b\x24\x74\x7b\xe2\x79\x55\x54\x39\xfe\x9a\x15\x74\x2a\x00\x5f\x02\xf2\x3f\xf7\x51\x5a\xf5\xa4\x41\xee\x47\x25\x84\x13\x6d\x45\xe6\x78\xf3\x0e\x58\x90\xc6\x3c\xa0\xe0\x7d\x42\xc9\xcb\x57\xd9\x8f\xcf\xe6\xb0\xb1\xe7\x8a\x80\x2f\x38\xb8\xd1\xdc\xf6\xef\xda\x53\x99\xd1\x57\x24\xbc\x04\x4c\x41\x14\xa2\x13\xa9\xab\xbc\x9a\x73\x34\x2e\x30\x4f\x77\x3b\x5f\x03\x47\xf2\xf6\x26\x45\x58\x30\xf1\xbd\x81\xbb\x35\x86\x93\x0e\x96\xe8\x87\x61\xcd\xee\x87\x56\x02\xea\x6d\x1d\xa1\x22\x80\x61\x6a\x39\x7a\x7a\x48\x03\x9f\x10\x16\xcd\xc6\xcc\xd7\x27\x72\xe0\xb2\x72\xe1\x45\x9f\x54\x96\xd6\x44\x33\x0c\x10\x01\x38\x23\x80\x03\xb1\x7e\xaf\x9e\x73\x0c\xd2\x70\xde\xdc\x41\x7e\xba\xd4\x6e\xe8\x4f\x87\x54\x53\x66\xec\xa3\x10\x97\x64\xc2\xbc\x2f\x72\x77\x15\x27\x4b\x3d\xa1\x1f\x51\x17\x05\xe2\x6a\x74\x9b\x02\xdd\xc6\x75\x20\x04\x09\x35\xaa\x0d\xd3\x39\x9d\xb4\x35\x08\x53\xc2\x60\x5d\x7b\x29\xf4\xdd\x12\x3a\x54\x4a\x24\x51\xa4\xfa\x17\xe1\x81\x34\x89\x09\xb0\x1d\xce\x70\xf6\x78\x44\xbc\x44\x20\x98\x24\x47\x08\xe6\x00\x25\xac\x68\x16\xb7\xd4\x4a\x95\xfb\xe9\xf0\x25\x3c\x3f\x98\x95\x8d\x17\x27\x20\xbf\x5c\x87\xf7\xac\xa5\x8e\x9f\xf5\xeb\x49\x49\xa2\xa2\xbf\x82\x99\xb1\xa5\xe0\x58\x8b\x47\x6d\xa7\x10\x3d\x07\xa6\xb2\xc6\xc8\xbe\xfa\x15\x79\xe3\x26\x5a\x56\x52\x2f\x07\x92\x54\x66\x3d\x2d\x69\x60\xf5\xe3\xcd\xba\xb4\x22\x7c\xcd\x6f\xca\xd4\xb2\x6f\x6d\xfe\xd5\xfa\x14\x58\x88\xd1\xf9\xe2\x5d\xbd\x24\x97\xe3\xff\xaa\xa3\xa5\x0d\x68\xa1\x78\x58\x9f\x89\x88\x5f\xb2\xc1\x6d\x94\x3a\xcd\x04\xfc\x78\x91\x92\xf2\x69\xdc\x09\xe2\x95\x28\x5e\x3a\x39\x89\x75\x27\xb2\xa3\x26\x9f\xf2\x74\x96\x67\xf8\xa9\x40\x99\x40\xdf\x49\x6e\x19\x70\xdc\xc3\xef\xb1\x86\xb1\x81\xec\x4d\x33\x53\x4d\x7b\x67\x88\x47\xb8\x24\xce\xce\xa7\x9f\x3e\x9b\x15\x31\x8c\x7a\x8b\x28\x31\x08\x9f\x11\x5c\xa7\xb6\x9f\x88\x20\x1b\x24\xa9\x64\x11\xd4\x4b\x06\x0d\x0c\x45\x06\x86\xe0\x2a\x1f\x65\x3b\x65\xea\x11\x12\xf0\x71\x73\xdd\xdb\xc9\xd1\x41\x7a\xa2\x13\x05\x86\xab\x05\x9a\xd4\x60\xaf\x81\xa4\xe3\x2a\x0f\xe9\xb5\xcf\xe8\x4c\x2f\x46\x09\xa4\x10\xe7\x14\xc0\x42\xa3\x54\x2a\x88\xba\xeb\x97\xe6\x70\x2f\x62\xa3\x53\x86\xc1\x6d\xb9\x3f\x2d\xe4\xb8\xca\x5d\x7d\x80\xd0\x1f\x22\x08\xe4\xd6\x29\x1b\xb4\x43\x88\x28\x0b\x9e\x5b\x82\x8a\x7a\x50\x9c\x6f\x8b\x9e\x7a\x7b\xdb\x0a\xdd\xe8\xea\x46\xf6\x27\x1a\x58\xa6\x1e\xe3\xec\x63\x84\xca\xae\xe2\x58\x72\x59\xc7\x8a\x8c\x99\x66\xdf\xfd\x7c\xcc\xf8\x91\x9e\x13\xca\xed\xfe\x40\x2d\x8b\x90\x09\x5f\x69\x77\x3d\x7e\xe6\xe4\xac\x61\x1d\x83\x55\x64\x39\x6f\xe9\x65\xf9\xf5\x17\x5f\x23\xb1\x4f\x32\x76\x37\x3a\x29\x56\x9d\xc9\x0e\x4b\xf2\x87\x86\x4d\x9d\xd1\x71\x4b\x2a\x92\xc5\xee\x92\x06\xb8\xfd\x79\x27\xd2\xc4\x7b\x9f\x53\x37\x82\xa6\x2e\x2f\x79\x28\xd4\x0d\xab\x29\x4e\x12\x7f\xc2\x4f\x5a\xbf\x8f\x6c\xa4\xb5\xf9\x4e\x14\x93\x6d\x9f\x2d\x93\xd4\x66\xf7\x1f\xf4\x46\x73\xfb\x1c\xac\x40\x35\x49\xe6\x33\xe7\x5b\xfe\xd9\x58\x3b\x20\x4a\xe8\xd7\x56\xc8\x55\x97\x1b\x08\x8e\x23\x1d\x57\xd8\x2f\xd7\x77\xc6\xa0\x7e\x94\x30\x9f\x71\xed\x95\x3c\xfc\x2f\x4c\x32\x42\xd6\x4d\x40\xbd\xc5\xb3\xe9\xb3\x86\xb0\x58\x5a\x5b\x8c\x22\x9c\x9f\x15\x52\x61\x10\x1c\xa7\x7b\x62\xca\xe6\x23\x42\xa0\x3d\x85\x7d\x9d\xfa\xa4\xaa\x27\x80\xf9\xa8\xb5\x7d\xcf\xfb\x34\xc0\x6b\x5c\x9a\xc3\xa2\x75\x4c\x0b\xea\x6a\x10\x66\x6e\xa9\xd9\x82\xf2\xdb\x5d\x82\x3b\x3e\x36\xbc\x4e\x64\xa1\x86\x9a\x1c\x51\x83\xc2\x0c\xf7\x38\xcd\x8e\x74\xca\x2c\x06\xbe\xcf\x89\x20\x7b\x33\x96\xc6\x8f\x66\xb2\x76\x9a\xc4\x1f\x45\x87\xd4\x1c\x41\xc8\x3d\xf9\xf1\x55\xca\xd4\x2a\xf1\x86\x68\x11\xff\x44\x1d\xa3\xb4\x67\x9b\x7e\xf4\x69\x7f\x4e\x56\x60\x0c\x98\x71\xa0\xde\x5e\xee\xda\x2f\xbf\xc4\xd2\xd5\xbc\x77\x8c\x79\x99\xf6\x88\x4c\x55\x1b\xfc\x32\x0a\xbf\x66\xdd\xc0\x69\x7c\xfa\xa8\x13\x13\xe4\x9c\x3e\xc5\x65\xc8\x1a\x59\xc4\xa2\x06\x6f\xf0\x90\x4c\x99\xc4\x7a\x12\xd5\x71\x33\x0a\x7f\xb9\xef\x91\x2b\x13\x89\x7e\x33\xdb\x86\x37\x1b\x41\xb1\x5f\x75\x65\x6e\x54\x8b\x29\x00\xbe\x09\x24\xb9\x36\x6c\xdb\x04\xd9\x76\x1a\xba\x41\x55\x3b\x56\x75\xb8\xf1\x20\xc5\x17\x67\x9a\xf9\x8b\xd1\x7f\xf3\x9f\xc3\xe4\x37\xbd\x63\x60\x2b\x7a\x9b\x00\xe4\xd4\xf1\xc3\x42\x48\x7a\x6e\x85\x3b\xaf\xba\x7e\xfa\x9f\x09\x33\x35\x92\x08\xde\x8e\x1f\x3e\x2c\xe9\x5a\x45\x5a\xc5\x94\x2c\x5a\xcb\xdc\xae\xbf\x16\x12\x5c\x47\xf6\x84\x5d\x77\xf7\x79\x57\xf1\xc7\xf7\x10\x8e\xd0\xb8\x94\x7a\xe2\x76\x7f\xbe\x5f\x2e\x5b\x96\xd1\xca\x10\xc9\x11\x5d\x8f\x17\x39\xdb\x78\x46\x22\x06\x41\x63\xcb\x11\x9e\xb5\x6a\x00\x8b\x63\x13\x43\x4d\x74\xc1\x3c\x3e\x57\x0d\x7d\x4a\x10\xe4\x2b\x5b\x69\x5e\x74\x88\xd9\x74\xf8\x5e\xc2\x57\x10\x07\x27\x06\x3e\x92\x5c\x62\xc2\xab\x93\xff\xeb\x04\x30\x85\x7c\xae\xf3\xec\x5b\x67\x1f\xe2\x51\xad\x01\xd2\x0c\xb8\xff\xce\xa4\x7b\xb7\x99\xa4\xc7\xca\x8e\x09\x19\xd8\xba\x5c\xbc\x54\x39\x88\x9c\x0f\x63\x2f\x19\x04\xd4\xa4\x7e\x6a\x33\xde\xbe\x39\x5a\xc5\x52\x92\x48\x56\xb5\xc8\x41\x40\x68\x96\x9c\x1c\x49\xb1\x30\x8b\xe3\x7f\x6f\x85\xa4\xff\xe4\x5a\xbc\xf1\x9a\x3a\xff\xe5\x38\x2b\xb7\xbe\x52\xec\x88\x0c\x5b\xd6\xc4\x0e\xa4\x56\x21\x80\x41\x4b\x1d\x0c\xd7\x05\xdc\x1c\xc1\xa7\x71\x46\x96\x70\x0e\x21\x71\x79\x3d\xa8\x27\xe5\x54\xae\x56\x9f\x53\x91\xc2\x1b\x77\x6f\x63\x44\xa1\x6b\x46\xc0\x72\x9a\x43\x2d\x93\x0e\x02\x2c\x4e\x02\x2f\x24\x39\xde\x01\x03\xc3\x47\xce\x14\xde\x14\xf8\x84\x68\x64\xdf\x00\x12\xfb\x14\x3e\x0b\x3f\x16\xb7\x5a\xe8\xb6\xae\x16\x05\x2d\xbd\x8a\xc4\x6f\xa5\x30\x3e\xb3\x5f\xa1\x19\x08\xad\x6e\x9f\xad\xca\x97\x01\x1f\xeb\xa2\x3e\x07\xb0\xed\xb2\x79\xda\x7e\x32\xc6\x2f\x01\x41\x9d\xf1\xf8\xbe\x4a\x23\x7e\xe8\xb8\xc0\x95\x54\xe5\x92\x18\x13\x97\xee\x4b\x2e\x18\x76\xe0\xb9\xa6\x47\x78\x5f\x49\x51\x5b\x31\x23\x42\x9a\xeb\xb6\x32\x8b\x61\x72\x7b\x25\x49\xb0\xf3\x82\x69\xee\x77\x91\xfd\x68\x9c\xfb\x04\x03\xf3\x90\x89\x20\xba\xc3\x60\xb8\x01\xe8\xf9\xcf\xc5\x7f\x8b\xe7\xa8\x0d\x25\xd9\x6a\xfe\x03\xb1\x86\x56\x1a\x6a\xad\xfd\xb4\xd6\xe3\x2b\x78\x53\x82\xb6\xcb\xbe\xa2\xa3\x9d\xc4\xa8\x14\xec\x76\xdc\xde\x61\x92\x88\xfa\xea\x4b\xeb\x1b\x33\x05\xe5\x39\x03\x75\x46\x62\x66\x43\xe1\x8a\xaa\x28\x8a\x76\x73\x61\x7d\x9f\x39\xef\x56\x40\xf1\x59\x38\x38\x1a\xfa\x2e\xc2\xf9\xfb\x56\x01\xc8\x54\x13\x41\xd5\x82\xeb\x0b\x15\xe6\x3b\x69\x70\x50\x8c\xad\xb8\x6e\x12\xf2\x89\x2e\x3b\xd7\x03\x51\xe5\xbb\x61\x12\x27\x30\x37\xe2\xd5\x06\x04\x86\x14\x83\x95\xf8\x47\xdc\x09\xa5\x29\x89\x0c\x81\x14\xc2\xdd\x26\xe8\xe7\x8a\x66\xa3\x4a\x16\xfd\x4a\x60\xb8\x94\x94\x4f\xb7\x8a\x36\x09\xe5\xbf\x76\x1e\x51\x49\xd5\x07\x91\x51\xb8\x5f\x31\x6a\x16\x6f\x44\x34\xa4\x1a\x65\x0d\xb4\x1f\xe7\x81\x81\xa8\x2d\x9e\x86\x41\x15\xdb\xc6\x97\xb2\x52\x76\x03\x96\x87\x4b\x98\xe6\x24\xb3\x29\x37\x5b\xdc\xc1\x97\x72\xe3\x8c\x87\xa1\xd1\x25\x61\x80\x46\xf8\xe2\x8d\x9f\x75\x5b\xe5\x8f\xe5\x00\xdd\x19\x3f\xf1\x68\xbb\x38\xec\xf0\x05\x2b\x6f\xd6\xfd\xe3\xdc\x31\xda\xfb\x5b\x80\x3c\x98\x71\xc4\x7b\x49\x97\xa7\x76\xdf\xf6\xbe\x2c\x4a\x8a\x89\x42\x8b\x63\x1e\xdb\x7a\x5b\xc7\xa2\xd8\x07\x85\x07\x42\x83\xff\x62\x8a\x82\x92\xe7\x71\xaa\x30\x0b\x4f\xfe\xc9\x8b\xf8\x4b\x3b\x96\x85\xa3\xb4\xbc\x97\x8b\x9a\x32\x6f\x4a\x99\x55\xb9\x59\xc3\x4c\x4b\x0c\xda\x9f\xb1\x55\x54\x66\x7b\xc4\x1f\xe6\xba\x5c\x0e\x12\x5e\xe8\x74\x62\x36\x78\xc9\x19\x39\xa5\xe4\x03\x00\x0b\x46\x37\x1f\x1d\x6d\x14\xac\x51\xf3\x96\x65\xa5\x43\xf7\x14\xf8\x74\xdf\x16\x9e\x6f\x36\xc6\x6d\x7e\xb4\xff\xac\xe3\x3e\xb1\x27\xab\xd4\x8a\x62\xef\x1f\x83\x47\x6c\xdb\x50\xdb\x97\x97\x06\x86\x6f\x85\x20\x0a\x02\xd1\x35\xb8\x9a\xb3\x39\x92\x1c\x7a\xa7\x72\x49\x7a\x77\x4e\x14\x86\x7e\xb7\x10\x86\xb6\xe1\x48\xcc\xfa\x42\x3c\x85\x33\xb2\x30\x6e\xfa\x2b\x9e\x50\xfa\x30\x6c\x8a\x75\x3a\xfc\x96\x47\xcc\x70\x98\xa8\x27\x29\x5c\xa9\xaa\x1a\x22\xda\x38\xc5\x6e\x4b\x72\x7c\x50\x04\x5f\xe0\x7c\xc1\x97\x01\xde\xee\x6f\x92\x0f\x45\x7c\x9b\x27\x20\x19\xc9\x16\x61\xdd\x59\x92\x3a\xab\x7e\x38\x85\x13\x51\x16\xdc\x76\x48\xd3\x78\x9e\xb8\x70\xf2\xa1\xab\xbe\x6e\x9e\xe6\xcd\x1f\xb6\x17\x7e\x93\xda\xa8\x1d\x21\x30\x3c\x71\xc1\xf0\x48\x49\x63\x3c\x33\x7e\xcd\x00\xe1\xd8\x25\x38\xa5\x9a\xca\x0f\x02\x80\x42\x28\x87\x83\xaa\xbe\x15\x0a\x6e\x3d\x2c\xc9\x4e\x26\x38\x39\x58\x34\xfc\x26\xf3\xfd\x2d\xbe\x97\xb1\xa5\xab\xbe\x0f\xd8\xf6\x79\xce\x26\xc5\x40\x8e\xfc\x50\xfb\xa3\x7d\x0d\x87\xb1\x57\x6e\x5c\x3e\xe4\xe9\x23\x21\x70\x96\x46\x9e\x3c\x93\x8f\x4b\x04\x5b\x15\xbc\x6d\x6a\xc3\x5d\xf3\x92\x5f\xa8\x19\x6a\x95\x13\xc2\x68\x3a\x48\x9c\xa0\xfc\xd9\xdc\xf2\x8e\xde\x78\xd7\x67\x12\x86\x36\x27\x3a\x8d\xe7\xf8\x97\x61\x85\x2f\x51\x1c\x17\xcd\xc8\x8c\xb0\x61\xf8\xa4\xe2\xf5\x25\x39\xcf\x17\x08\x22\xaa\xe8\x85\xf8\x54\x1d\xc4\xd6\x82\x25\xe0\xeb\x7c\x7f\x40\x7a\x11\xe5\xfe\x5a\x77\x9a\x76\x1a\x77\xba\xb8\x99\xe7\x88\x05\x85\x98\x92\x5d\x21\x89\x89\x90\x9d\x04\xda\x11\x82\x01\x28\xe8\xfd\x2d\x8a\x27\xe6\x9c\x9e\xb1\x55\x80\x6c\xab\xeb\xb2\xdc\x1e\xf5\x61\x3d\x1a\x29\x64\x6d\x0a\x92\x3b\xd7\xf2\xe6\xe0\x28\xd7\x85\x84\xab\x67\xdd\x11\x17\x70\xe6\x47\x00\x00\xb6\x50\x48\x57\x71\x22\x64\x4d\x51\x64\x21\x1e\xa9\x4e\x69\xf3\xd0\x4f\x96\x79\xae\xc1\xc5\x86\x8d\x1e\x42\x69\xdd\x87\x0c\x0b\x98\x41\x4c\x9a\x8a\x94\x51\xb4\x5c\xf4\xa7\xe6\x99\x7c\x27\xd8\x5e\x4e\x94\xbd\x79\x29\x01\x56\x78\x19\x09\xef\xb5\xaf\xcd\xf5\x2a\x19\x22\xe6\x03\x50\xe3\x8e\x1a\xb8\x9d\xbc\x35\x1d\x92\xbe\x4f\xe2\xb9\x53\x62\xe3\xba\x03\x51\x8b\x42\xaf\x07\x2f\xa4\x33\x63\x6f\x78\x13\x3c\x1b\x6c\xdb\x81\x10\x8a\xaa\x18\x88\x86\x80\xbf\xbc\x48\x08\x5a\x1d\xbc\x93\x78\x37\x88\xd1\x3d\x5d\x82\x14\xbf\xa0\x93\x87\xf9\x92\xc9\x91\x9d\xd3\xb9\x91\xb5\xdc\x24\xf2\xa3\x40\xa8\xb9\xbe\x74\xfc\x51\xf5\x04\x6e\x74\x5c\xde\x65\x22\x63\x9f\x13\x6c\x51\x65\x62\x57\x75\xcf\x9e\x30\xf0\xbc\x22\x11\x86\x75\x91\xb9\x60\x5a\x42\x89\xab\xde\xee\x68\xee\xa1\x71\x1a\xb0\xd7\x47\x93\x82\x3d\xe0\x38\xb4\x15\x76\x3f\x54\x8f\x24\x43\x8a\xa1\x63\xbf\xd3\xef\x6b\x09\x5e\x75\x2e\xd8\xa3\xb5\x16\xbd\xbe\x94\xee\x48\x89\x7f\x89\xc6\xd5\x72\x06\xc3\x0f\x49\xad\x13\xf4\xf1\x11\x57\x62\xf2\x7e\x83\xca\x7c\x26\xd1\xa5\x36\x45\xc1\xef\xe8\x19\x72\x1b\xaf\xb4\x06\xb9\x4e\x56\x33\x52\xce\xaa\x82\x36\x18\xb9\xad\x26\xe4\x7a\x82\xdb\x83\xab\x81\xdd\xec\x3a\xa9\x60\x02\x39\x7f\xb2\xca\xc0\xc7\xbe\x3c\x66\xcc\xce\x81\xb2\xd5\x24\xae\x9e\x7b\xed\x77\xf8\x5a\xf6\x3f\xff\x23\x02\xd6\x96\xbf\xc2\x00\x08\x24\x28\xaf\x4d\x45\x67\x32\x9d\x36\x84\x76\x1f\xca\xa7\xbe\x5b\xed\xee\x6c\xd0\x9a\x2d\xec\xee\x11\xef\x75\x7f\xc6\xc4\xa0\x10\x7c\x65\xf4\x37\x51\x54\x8e\xf2\x83\x78\xc5\x29\x68\xe5\x4c\xa8\x48\x50\xa1\x59\xaf\x7a\xdc\x87\x79\x58\x6a\xa1\x26\xa0\x59\xf1\x93\x19\x0c\x42\xa3\x50\xad\x65\x70\xe3\xcb\xb1\xbe\xcd\xda\xcd\x69\xab\xdf\x27\x3b\xce\xd9\xb0\xf3\xcd\xf9\x41\xa6\x04\x93\xbf\x2d\xd6\xd0\xc2\x47\x86\x4a\xf6\x85\x24\xa8\x7c\x6d\x98\xfe\xd5\xf9\x56\x90\x4c\x13\xde\xe8\xb7\xfc\x00\x8e\xad\xc7\x61\x9e\xac\x86\x0e\x09\xb5\xb8\x60\xfc\x12\x22\x8f\x32\xe9\x32\xb5\xc2\x0f\xda\xfd\xec\x19\xc3\x92\x66\xde\x19\x43\xbb\xa1\x1b\x0e\xff\xee\x55\xdd\x66\xd8\x0b\x92\x8d\x13\x7a\x13\x5e\x41\xd8\xec\xb9\x90\x6e\xfa\xf4\x74\xf4\x83\x5d\x26\xa3\x26\x48\x67\xa5\x1a\x2d\x44\x13\x8c\x9d\x04\x90\xb4\x16\xbf\x60\x69\x26\x60\x3d\xdc\x35\x6c\x72\xe2\xf5\x14\x33\xc7\xbe\x10\x7a\x1d\xd6\x2d\x44\xf8\xe9\xe6\x0b\xc0\x9c\xe2\x35\x2b\xc6\xed\x83\xe3\x73\xc8\x13\xa1\xc4\x09\x3e\x99\x2f\x6d\xa8\x98\x46\x6c\x62\xa2\xa6\x45\xd8\x2c\x0b\xd3\x7f\xdf\x9c\x57\x92\x33\x8e\x74\xd3\x7f\x82\xad\x95\x60\x15\xf9\x48\x4d\xc2\x85\x55\xc1\x73\x61\x2b\xff\xea\x30\xfc\x7b\x9f\xa0\x75\x53\x9c\xe1\x85\xd4\x2a\x08\x01\x9e\x52\xa4\xea\x14\x53\x51\xd6\x53\xa7\xf1\xef\x6e\x4d\xef\xef\x64\x2a\x4a\xbb\xf3\xa0\x9e\x98\xb2\x88\x38\x97\x65\x75\xaf\x91\x33\xce\x21\x58\x05\x59\x1a\x56\xbc\xed\x6f\xf4\x05\x57\x4d\xd9\x1c\x95\xf5\xd9\x40\x4d\x2a\xd9\xe3\x8f\x39\xdf\x89\xb0\x9e\x6e\x52\x1e\x40\xc0\xa1\x09\xba\x61\x9f\x37\xf2\x26\x32\x70\xa8\x44\x25\xff\x97\x79\xca\xd8\xa6\xd0\xb9\x13\x70\xce\x1f\x7a\xcf\x1a\x0c\xed\xea\xa2\xab\x3c\xeb\x96\xc3\x97\xf8\x05\x96\x39\x7e\xc9\x2c\x93\xa4\x5e\xe2\xb9\xb3\x37\x2f\x45\xb5\x87\x91\x99\xab\x28\x42\x44\x85\xf5\x08\x60\x0f\x0d\x4c\xec\xf8\xf6\xa1\xd1\xa1\x8e\xbe\x0f\xcf\x41\xf1\xd3\xea\xd5\xc6\xf5\x16\x7f\xe9\xfd\x75\xde\x59\x47\x39\x29\x02\x69\xc8\x85\x9f\xf0\xd9\xfa\xd2\x11\xdf\x7c\x94\x55\x81\x49\xd9\xdc\x99\xb8\xef\x17\xe6\x14\x8b\xbe\xa1\xb4\x6c\x74\x9a\xc2\x18\x0c\x12\x85\x8d\x86\x9f\x87\x59\x11\x57\xa1\x08\x83\xfd\x59\xf5\x76\xea\x1d\x45\xb9\xe2\xf5\x61\x44\xcd\xa6\xa0\x06\xd4\x43\x5c\xd3\xdb\x38\x2e\xa1\xd7\x68\x84\x40\x69\xd7\x07\x13\xea\x2b\x56\x6a\x2b\x22\xe2\x24\xde\xf0\x9c\x2b\x36\x84\x55\xf9\xb3\x31\x59\xb8\xdf\x45\x42\x63\x5b\x06\x96\xf0\xb0\xf5\x4c\x20\xe7\x52\x5a\xba\x9f\xbf\x9b\x61\x45\x21\xe3\xad\x57\x1e\x7c\x48\x68\x61\x04\x46\xd8\x44\x50\xca\x0e\xe7\x14\xae\x76\x4d\x9e\x9c\x99\x7a\xf7\x9a\x66\x82\x96\xa4\x12\x0e\x23\x30\xb2\x32\xc3\xaf\x2c\xe7\x6a\x8b\x56\x0e\x99\xff\x21\xb0\xd0\x6f\x06\x19\xab\xfa\x0b\x75\x36\xf4\x1e\x7d\x57\x42\x20\x15\xc2\xaa\x94\x2e\xf1\x4f\xce\xb2\x7d\x60\x10\xbc\x07\xf4\x56\x5c\x03\xfd\xa0\x78\x5c\x4a\x53\x17\x81\x52\x68\x10\x3a\x65\x5b\x44\x58\x89\xe6\x18\x4e\x30\x73\x2a\x24\x07\x6e\x4f\x45\x2e\x38\x1c\x9b\x85\x84\x5b\x51\xdb\x30\x8a\x89\xf8\x7a\xd0\xbe\x74\x40\xcb\xc5\x86\x69\x68\x0c\x04\x53\x6b\xdd\xdd\x3e\x4e\xf6\xb3\x4d\xa9\x0e\x97\xb8\x04\xe7\x57\xa6\x2f\xc8\xd0\x61\x08\x71\x10\x88\x44\xa7\x5e\xf5\xc9\x30\xdd\x36\x21\x9f\x1e\x6e\x78\x5e\x94\x88\x54\xbc\xdc\x5b\x88\x08\x8c\x81\x29\x37\xc6\xc8\xe8\xb8\x1c\x56\xa9\x8b\xd7\x46\x0d\x08\x8c\x93\xcc\xcf\xc9\xa0\x35\x80\xdf\x0f\x38\xcc\x19\x8c\xaf\x60\x23\xfc\xc0\x7f\xf7\xb7\x09\xbc\x0e\xa6\xb0\x0e\xfb\x51\x4c\x99\x1f\xfa\xd4\xbd\xff\x13\x1d\xc7\xe8\x5f\x3d\x55\x35\x27\xa0\xf5\x59\xef\xaa\x1e\x40\x81\xd3\xd4\x90\x59\x1f\xac\x55\x62\x75\xa1\x7c\x19\x1e\xe1\x91\x5b\x81\xee\x5a\xe2\x17\xbc\xd0\x6d\xf2\x33\x20\x05\xc4\xa8\xd0\x92\x74\x80\x97\x1d\xb4\x71\x10\xe2\x20\x61\x2e\xdf\xcc\xf1\xec\xa1\xf5\x45\x9d\x91\xbc\x37\xfe\x30\xeb\x0c\xf9\x7c\x95\x7b\xc2\xed\xb3\x1a\x89\x0a\x63\x39\x8b\xb3\xce\x39\xd8\x9c\xb3\x3d\x95\xb3\xc1\x59\xa8\xed\x29\x6c\x5a\x60\x83\x4a\x55\x20\xe7\xc6\x1c\x2f\xe4\x44\xc4\xdc\xc4\xa1\x93\x55\x65\x7e\xa4\xf2\x46\x50\x34\xff\xb9\x56\x09\x8a\xa4\x8d\xc1\x8f\xe6\x8b\xac\x39\x94\x2b\x59\x88\x16\x60\x4d\x67\x74\xd4\x0d\x4f\x97\x81\xf0\x9b\x9a\x62\xe2\x15\xb4\x62\xdd\xe0\xd4\x10\xb5\xd2\x3b\xd7\xc0\xa6\xb6\xb6\x67\x09\x62\x25\x7a\xbe\xf1\x1a\xee\x7b\xff\x42\x3a\xf5\xa2\xbc\xe0\x25\x37\x50\xf9\x43\xb5\x71\x72\xdb\x78\x78\x1b\x88\xe9\x8f\xa7\x22\xd1\xec\x64\x03\x1d\xb4\xe3\x3a\x31\x8d\x23\x17\x07\xfd\xbe\xe9\xfe\xc5\xd5\x65\x30\x58\x0b\xa1\xab\xb5\xc1\x23\x16\xcc\xd8\xa8\xaa\x86\x91\x57\x24\xe8\xdb\x0c\x93\x8a\x24\xbe\xb6\x5e\xd5\x2e\x6e\xce\xb7\xab\x11\x92\x2f\xa3\x41\xc3\x71\x09\x9f\x6c\x66\xed\x3c\xf0\x5d\x5f\x97\xe8\xd4\x0d\x50\xb8\x95\x81\xae\x9e\x5a\xa7\x36\xa0\xfd\x9a\xaa\xfa\x56\x39\xa1\xb2\xdc\xba\xd9\x7b\xab\xda\xe8\xef\x2e\x71\x5b\xc4\x47\x93\xfd\x45\xfa\xf2\x13\x14\x65\x6a\xb9\xa8\xba\x88\x45\xdc\xd3\xbc\x15\x2a\xb9\x4a\xf3\xa4\x70\x6f\x70\x34\x0f\xcf\x28\x36\x54\xf1\x98\x51\x9c\x17\x0c\xf0\xc6\xee\x3b\x59\x7e\x9e\xb6\xbc\x7c\x2b\x71\xcf\xbe\x4c\x39\xa4\x1d\x8e\x5b\x03\x5d\xe6\xa5\xd7\x9a\x69\x83\x2b\x0f\x8b\xf6\x1a\xf2\x41\xda\xeb\xb3\x59\x10\xc3\x43\x7f\x41\x13\xb2\x63\x80\x2c\xeb\x28\x42\xda\x9b\x1a\x51\xd8\xbe\xdf\xbc\xb2\xf9\xd9\x7a\xef\x41\x44\xc4\xfb\x8b\xd7\xc0\x60\x1d\xa1\x00\x68\xfd\x62\x0a\xf3\x67\x00\x6b\x6f\x9f\x6c\x85\xf7\x65\x77\x8a\x72\x62\x10\xe7\xc5\x62\xd6\x71\x25\x91\xf6\x11\xb2\x5e\x40\x71\x37\x20\xde\xd9\x20\xcc\x29\x9a\x56\x62\x13\x27\x8d\x39\x5f\x9a\xa0\xbf\x68\xe9\x24\x6a\xf8\x43\xbf\x7b\xf9\x80\xc3\xf8\x61\x78\x6d\x3d\xf9\xad\x94\x6f\x53\xb6\x70\x22\xdd\x81\x2b\xaa\x52\x2c\x66\x02\x8c\xcb\x6c\xa3\x88\xdf\x3e\xff\xd2\x3f\xca\x0a\x2f\xab\x30\x8b\xd0\x50\x26\xcb\xd8\xbe\x70\x7d\x55\xe4\x54\xa9\x77\x37\x6c\x2b\x11\xb4\xd1\xaf\x71\x23\xae\xdc\x24\xec\xc2\x57\xa0\xc8\x83\xc7\x1c\xe4\x22\x10\x18\x61\xdb\x05\x4f\x5a\xb4\xff\xc1\xb7\x61\xb2\xc4\x4d\x60\xcf\xc6\x1a\x6b\x1f\xab\x7e\x39\x2c\xb1\x2b\xdb\x8c\x84\xc9\xf2\x9f\x5c\x6d\xef\x4e\x88\x75\xbb\x7c\x30\x1e\xd2\x5b\x0d\x9c\x2b\xc1\x40\x10\x5b\x4c\xfa\x9a\xf1\x5f\x37\x8c\x2a\xc5\x7a\x4f\xfc\xfc\x69\x2e\x5e\x45\x2f\xe6\xfc\xc9\x8d\x65\xbe\xe6\x64\x5a\x76\x88\x4a\xd7\xac\x87\xe7\x2e\x08\x2e\x9e\x2f\xb0\xa4\x8f\xc3\x1d\xf6\x03\x95\xfa\x7d\xd2\x5f\xb4\xb7\xd8\x5b\xb9\x57\x7c\x46\x90\xa0\xe3\x5c\xfc\x7a\xb9\xd1\x7b\x24\x65\x0b\xea\xb5\xad\x63\xce\x32\x66\x85\x29\x7f\x8a\x3d\x72\xf5\xdf\x12\xb7\x2b\x00\x92\x90\xeb\xdf\x55\xdf\x55\x7c\xa9\x18\x64\xb6\x12\x63\x57\x5c\xb0\x07\x96\xc3\xee\xf0\xa5\x28\x84\xc3\xec\xf8\x9d\x7c\x1c\x93\xad\x7e\xcb\x40\xb7\xf3\xa9\x2f\x73\x43\xbf\xc4\x64\x09\xdf\xd5\x35\x24\x94\x08\xbe\x85\xe6\x21\xeb\x96\xd0\x86\xfd\xd7\x77\xe7\x36\x30\xea\xd2\x8c\x75\xc7\x58\x9a\xf9\x02\xaa\x77\xb7\x82\xcd\xaa\xc1\x10\x5d\x5e\x98\xff\xe6\xf9\xb6\x9f\x82\x9b\x5b\x35\x5a\x60\x6d\xeb\xce\x37\x71\x49\x50\xe6\x13\x3e\x72\x2d\x60\x1f\xf2\xf4\x28\x7d\x3c\x71\x94\x9e\xf6\x31\x33\x9c\xb4\x59\xbf\x0f\x81\x18\xd3\xe9\xed\x28\x6f\x70\x94\x7e\xa3\xfe\x45\x62\x0f\xbb\xe0\x6e\xf5\x6f\x26\x10\xcd\xf1\x40\xe4\x30\x00\x5f\xee\xf7\xb5\xc6\xb6\x6f\x36\x9a\x91\x40\xab\xc7\x14\xe4\x7c\x01\x67\x20\x9f\xd0\x4a\x5f\x5b\xe2\x8d\x4f\x51\x16\x80\xd3\x5c\x99\x93\x14\x86\x91\x26\x68\xfe\x93\xcf\xfc\xbb\x4f\x3d\x75\x1a\xd0\x31\x9c\x5c\xf0\xb4\x49\xaf\xe2\x08\x2c\x17\xe3\xcd\x81\x54\x1d\x61\xff\x64\x88\xca\x1b\xf2\x77\x0a\xd8\xfd\x9a\x34\xdd\x5b\x7a\xba\xb9\x34\xcf\x7a\x46\x45\xec\x99\xba\xd9\xc2\x7f\x30\x93\xcc\x4d\x75\x80\xfb\x70\x36\x87\xc8\x5c\x69\x57\x1e\x12\x0c\x34\xb1\x8b\x13\x0f\x9d\xbe\x7f\x58\x68\x66\x34\xc6\x85\x72\x37\xdb\x71\xc5\xe4\xdb\xef\xaa\x98\xfb\x80\xf5\x94\xd8\xfd\xb7\xaf\x7a\xff\x6a\x80\xd7\x1c\x22\x55\xac\x16\x97\xee\x6f\x5a\x3e\x1f\x2d\xe3\x86\xfb\x8b\x23\xe2\x59\x8b\x2d\x21\xdc\xa8\x39\x86\xe6\x40\x83\x2c\x1d\x16\x22\x75\x16\xb2\xc1\xdf\x67\x9a\xea\x29\x86\xab\xf0\x31\xb7\x0b\xc3\x6e\x3f\x0b\xe9\x0e\x39\x5a\x6d\x1a\xfe\xd3\x0b\x9f\x38\x4e\x03\x4e\xc8\xd2\x4f\xd8\x4a\xe8\x7a\x9c\x6a\x2a\xb7\xf3\xcc\xdd\xad\x29\x03\xc1\x95\x61\xa7\x83\xbe\x7a\xcb\xa4\x71\xf0\xae\xe5\x2a\x08\x74\xa9\xcd\xaf\xb8\xfa\xe3\xf3\x2d\xcd\x09\x39\x2e\x0c\x9b\xc3\x16\x66\x7c\x29\xd0\xff\xc3\xd2\x4a\xae\x6f\x01\x42\x0a\x3f\xb4\x96\xbd\xde\xb2\x54\x3d\x05\x1a\x7e\xbb\xd6\xc8\x49\xa8\xbf\x73\x9e\x3f\xcd\x61\x36\xcb\xe8\x53\xa5\x91\xb0\x45\x49\xb8\x68\xb3\xf4\xba\xf9\xfd\xa7\x6e\x85\x4a\x08\xa3\x6a\x29\x14\x5e\xf5\xef\x69\xe2\xdd\x36\xd2\xfe\x22\x4e\xdc\xc7\x81\x4e\xb8\x3d\xed\x97\x79\xb0\xac\xfb\x5f\x9f\xbd\x7a\x69\x8e\x98\x6f\xd5\xda\x9b\x5b\x9a\xbf\x43\x50\x4f\xc0\xa0\x2d\x8a\x9e\x96\x0a\xa6\x1f\xf2\x93\xf4\x47\x30\x76\xee\xdd\xf9\x88\xb2\xff\x83\x85\x90\x79\xfa\xa5\xa8\x34\xdd\x4c\x65\x5f\xdc\x92\x0a\xeb\x64\xa2\x34\x04\x13\x86\xc1\xe7\xd2\x06\x95\x8a\x91\x7f\x30\xcd\xe4\xe2\xa3\x72\x73\xa2\x65\x66\xc5\xf8\xc2\xe3\x9b\xc7\xaf\x63\xfb\x19\x19\x40\xb5\x76\xcb\xd2\x4d\xff\x60\x54\x09\x28\xf7\xa1\x9f\x42\xcd\x0d\xf2\xc5\x15\x07\xc6\x86\x30\x0d\x80\xcf\xcd\x99\xe9\x5d\xff\x64\x59\x49\x9c\x90\xf7\x8a\xa5\xa3\x80\xf2\xad\xa1\x11\x8c\x66\xde\xc1\xfc\x80\x7f\xc4\x70\x39\x67\xce\xf7\x31\x23\x95\xdf\x8f\xc3\x14\xd1\xde\xf2\x9b\xc4\x3f\x3e\x44\xf3\xff\x82\x65\xd4\x4e\x04\x91\x68\xf5\x9c\x55\x0a\x9d\x9e\xc7\x77\x38\xdc\x3f\xdb\x19\x41\x6a\x7e\x42\xec\xf9\x07\x13\x66\xfe\x5a\x0d\xd8\xb9\xcc\x96\xa3\xac\x96\x22\x5f\x4e\x58\xbe\xe0\x06\xe4\x1b\xe7\xff\x64\x02\xfd\x02\xb2\xe1\xf8\xc2\x61\x70\xe0\xad\x16\x44\xab\x8d\x32\x1d\xc8\xd1\x09\xd3\xef\x7f\x41\xf6\x9f\x21\x13\x78\x08\xbd\x4a\x11\x9c\x8b\xd1\x2b\xa7\xac\xe7\x80\xbf\x5f\x96\x1c\xff\x8b\x93\x1d\xaa\xf1\xb4\x02\xf0\x78\x75\x0d\xc1\x70\x76\x9b\xd7\xe8\x14\xfd\xb1\x96\x7f\x80\xbd\x3a\xd0\x5f\x8d\x88\x7c\xca\x4e\x80\xb1\x8f\x49\x78\x46\x8b\x98\x56\x1c\x06\x7c\x21\xcf\x32\x36\xfc\x8f\x6b\xe8\xf2\x1c\xce\x87\x7e\x83\xea\xe8\xc0\xc0\xfc\xd3\xf4\xed\x8c\xf2\x01\x18\x88\x34\x12\xfe\xef\x75\xb9\xc6\x5b\x0a\x80\x84\x8d\xad\x46\x6b\x8b\xd7\x52\xf0\x2a\x69\xf9\xf7\x1e\xd1\x84\xfe\xbf\xb1\x4f\x53\x8e\x93\xfd\xf7\x3f\xd9\x6f\xb9\x98\x8e\xe7\x33\xe1\x80\x92\x22\xf0\x85\xb4\xdd\x3d\xe6\x9f\xcf\xf7\xf3\x77\x7f\x46\x6d\x1b\xaa\xa9\xb7\x53\x4c\x7b\xcb\x30\x81\x4f\x83\xed\x72\x9b\x70\xff\x63\xa6\x34\x3c\xf8\xc1\x58\x01\xa8\x7d\x31\xcf\xf5\xff\x1f\xd7\x0e\x60\xb1\xfa\x09\x79\x7b\xb6\x49\x6c\x92\x06\xb7\xfe\x30\x27\xb5\x48\x10\xb2\xcc\x1a\xe0\x13\x73\x75\xa7\xe8\x7f\x7c\x2e\x45\x2d\xc0\xe7\x74\x6a\xc6\x66\x14\x60\xf9\xf8\x32\xfd\x58\xef\xef\x18\xb9\xb3\x53\xfe\xbf\xcc\xc6\x1e\x74\x55\x4b\x9f\xd2\x17\xb4\x5f\x01\xb7\x72\xa8\x3a\x2e\xaf\x89\x29\xc8\x80\xba\xe0\x9f\x5e\xc4\xc0\xdc\x43\x63\xf2\x13\x6a\xc6\x15\xb8\xbb\x87\xd2\xdc\xfa\xc7\xf8\xbd\x97\x7f\x00\xc2\x44\x55\x34\x3e\x35\x78\xd9\xf1\x80\x5a\x1a\x81\x39\x98\x81\x62\x8d\xe0\x48\xbf\xd5\x80\xb2\x50\xdb\x32\x2d\xff\xd4\xb6\x06\xc9\x0b\xf9\x45\x99\x8e\x15\x7c\xbf\x36\xfd\xdb\x62\xd2\x5b\x90\x0d\x7c\xda\xe8\x94\xdb\xe2\xbf\xdc\x97\x97\x07\x00\x49\x0d\x65\x78\x88\xe4\x40\xef\xfa\x3e\x52\x47\x40\xcb\xe3\x03\x4d\x10\xf1\x57\x8f\x73\x71\xba\xa2\xdc\x1c\xe2\x7f\x9e\x6e\xbf\x1c\xc1\x09\x08\x73\x30\x4e\x93\xec\x2d\xe9\x8e\x2e\xf1\xb8\x88\x78\xd4\x90\xd2\xfb\x6b\x59\xbb\xa7\x9c\xa5\xf0\x8f\xb4\x9d\x33\x71\x50\xcd\x91\x13\xe3\xe3\x2e\xde\x7f\x7f\x8f\xf3\xfc\x36\x81\x46\xea\xcd\xbe\x46\xc2\xae\x6e\x97\xa7\xc0\x27\x89\x83\xac\x1e\x8a\xd3\x22\xf0\x77\x9c\x8a\x09\x35\x78\x86\xff\x69\x3b\x9c\x13\x39\x79\x0c\x0d\x80\xce\xf5\x59\x14\x8b\xf4\x3a\xc1\x26\x46\x66\xf9\xb7\x8e\x19\x68\x01\x74\xfb\xbd\xe7\x3e\x45\x41\x27\x38\x01\x3d\x6b\x42\xe0\xfd\xc9\xef\x6d\x9e\xd4\xb2\xec\x90\xa3\xb3\x2a\x30\x7c\xdb\x63\x38\xe1\x15\x7e\x35\xf4\x8b\x19\x87\x12\x28\x90\x74\xbf\x99\x17\xf7\xf8\x0c\x7a\x80\x99\xb2\x67\x0a\x80\x19\xe1\xc0\x45\x00\xa7\xa8\x9f\x46\xbb\xa7\x1c\xa0\xe2\xb4\x7f\x91\x67\x9c\x63\xee\x17\xb3\xf7\x00\x00\xf7\xc8\x7f\xa9\xf8\x7f\xd9\x61\xb7\xd9\xa8\xfa\xd9\x89\x3f\xea\xe0\xf8\xb3\x76\x63\x4c\xb3\x9e\x5a\x14\xc7\xf1\xe2\x9a\xea\x93\x6d\xda\x7b\x7c\xc1\x68\xf2\x75\x62\x94\x84\x2d\x48\x50\x11\xc2\x3d\x0a\x5d\xb5\xc8\x40\x7b\x61\xa9\xf0\x70\x2a\x38\x63\xf0\x00\xcd\xc9\xbb\xb9\xa3\xcc\x2a\x0d\x0d\x1d\xa8\x77\x15\x1e\x33\x7b\x3c\x61\x63\x57\x43\x68\xb4\x1e\x89\xa4\x35\x31\x98\x6a\xa1\x21\x14\x4d\xd6\xb9\x45\x4d\x2c\x96\xbc\xb2\x75\xda\xbf\x67\xca\x4e\xe4\xc9\xc1\xb1\x17\xd2\x37\x82\xe7\xfd\xd6\xfc\x84\x5e\x63\x1d\x38\xe1\xa7\xa6\x24\xd7\xd3\xc4\xd4\xcf\x4b\xc4\xdf\x92\x7f\x37\x02\x78\xe5\x6d\xb3\x2b\x11\x5e\x7a\xe6\xc5\x93\xef\xb9\x15\xb0\x55\x7b\x22\x34\x21\xdc\x23\x2c\x97\x2a\x7a\xdb\x8d\x75\x7c\xf5\x40\x6b\xe0\x83\xbe\xc9\x0f\xf4\xf6\xcb\x9f\x39\xc8\x73\x34\x6f\xbc\xa1\x35\xdd\x4b\xbb\xeb\x9f\xe4\xaf\x0c\x62\xd0\x84\xc0\x69\x1a\x68\x3d\x4a\xd2\xfa\x10\xbd\x8a\xe2\xf4\xda\xee\x2e\x8e\x59\xc2\x57\x35\x8a\x7d\x13\x1d\xbf\xd3\xd6\x8a\xd1\xa1\x1e\x11\xc6\xfa\xd2\x68\xc5\xba\x02\xa0\x52\xef\xa7\x85\x71\x26\x27\xdd\x5b\x77\xc2\x5d\xcb\x3d\x75\x00\xa5\x41\x74\xb8\x19\x7e\x6d\xf6\xd5\x48\xe6\x4a\xe5\x0b\x45\xf0\x9d\x8b\x38\x45\x2b\x2e\x99\xeb\x27\x36\xf6\x71\xcd\x9d\xf1\xfb\x81\x05\xdc\xa7\xd4\x19\xfc\xc0\x50\xf7\x87\x5a\x2b\x55\x75\x49\x8b\x58\xe6\x82\x7c\xf0\x6b\x22\x5f\x55\xf3\xe6\x52\x0e\x62\x55\xcd\xb3\xcd\x0e\x43\xa7\x66\x12\x02\x62\x10\x59\x8d\xea\x10\x87\xe0\xae\xaa\x31\x91\x7c\xcf\xe2\x36\x6b\xc6\xb6\x6b\xcd\x8d\x00\xc7\xc9\xba\xab\xbd\x07\x5d\x1e\x3b\x52\x76\x6a\xe8\x2f\x02\xf1\xdd\x25\x4e\xd1\x92\xcb\xea\x26\x34\x2f\xe9\x2f\x1b\x29\x59\xc8\x32\x5a\x15\x5c\xfc\x07\xa3\x78\xb5\x05\x72\x33\x5c\x04\x12\x74\x2c\x00\x71\x50\x72\x56\x63\x8b\x7a\x1f\xda\x92\x8e\x09\xb4\xad\xbe\x39\xcc\x00\xc2\xd9\x3b\x33\x0f\x26\x1d\xda\xe4\xf9\x7e\x6b\xee\x67\x2e\x66\xd9\x82\x6d\x88\x82\x54\x5e\x37\x6a\x70\x90\xdf\x41\xa1\x62\xac\x08\x71\xed\x5e\xa5\x9c\xcb\xe3\x31\x02\x3f\x32\x94\x59\xb2\xd4\x45\x9d\x39\x9a\xb3\x1a\x13\x63\x6b\x47\xb5\xe5\xb8\x22\xcb\x2a\x7d\x2e\xfe\xec\x44\x90\x14\xce\xa5\x43\xac\xe9\x4c\x35\x21\xe5\x65\x83\x0b\x04\x82\x8f\x44\xbd\xaf\xfb\xf5\x8a\x78\x92\x4f\xfe\xde\xc8\x48\x8e\xb3\x9a\xbd\x71\x4c\xd4\xf6\xf9\xb5\x03\xd5\xa2\x63\x8b\xcb\x9e\xc8\x98\x90\x2b\xa8\xc3\x37\x29\x3c\xcf\xe0\x51\x8c\xc0\xfa\xd1\x4d\xbd\x2d\xb3\x01\xcc\x92\xe7\xf7\xeb\x8b\x3f\x1d\xf0\x4e\xd9\x6d\xc2\x31\xfa\xc7\xd6\x0c\xfc\x1d\x86\x2f\x47\x51\x4e\x07\xd6\xaf\xa4\x9a\x6f\xc4\x9d\x4a\xbc\x7e\x64\x18\xd7\xd7\xcd\xfa\x6e\x2e\xc3\x1d\x9c\x5b\xf5\x0e\xcc\xb9\x68\x37\x92\xd8\x28\xaf\x55\x45\xcf\xa4\xa8\xb1\xf7\x32\xf7\x11\xe7\x28\x71\x1b\x21\x74\xaf\x69\x0e\xf6\x72\x1b\x2f\xe6\xb5\xf5\x23\x67\x49\xfd\x4a\x1b\xf7\x49\x80\x94\x48\x04\xd1\x78\xe1\xd3\xdb\xad\x2f\x57\xf8\x73\x25\x3d\x39\x1a\xc8\x34\xca\x2f\x11\x13\xd5\x2b\xa7\x1c\xf2\x95\x31\x6c\xf0\x1b\xe1\x49\xb7\x54\x01\x71\x98\x9b\x53\x14\x46\xf5\x4f\xca\x0e\x52\x35\xf6\xdf\xec\x73\x76\xfa\x51\xb9\xc4\x8a\x58\x2c\x81\x5a\x9c\x13\x1e\xf1\x3f\xde\x55\x80\xd3\xec\xfd\xae\x95\xc3\x44\xf6\x34\x1e\x1a\xfe\xc6\x7a\xbb\x29\x3e\x4b\x2c\x88\xf4\xb5\x39\x35\xb3\xbd\x4b\x69\x5a\x31\x69\x54\x1c\x0b\x48\x44\xa7\xb0\xd8\x56\x92\x1e\x15\x1d\xc9\x55\x54\xd9\xd1\x2f\xb6\xda\x77\x4c\x43\x2e\xfd\xfd\xbe\x57\x1c\x75\xea\xc1\xe5\xe0\x7b\x81\x22\xbf\xcf\x0a\xaa\xcf\x7e\x54\x24\x1a\x1d\x9c\x1a\x87\x91\xf2\xad\x71\x3c\x3f\x10\x1e\xe1\xb0\x3c\xe3\xbf\xb7\x43\x84\x1b\xc4\x1e\x54\x8b\xfc\x65\xb2\x0c\x39\x59\x59\x8f\xeb\xb1\xf3\xe3\xbe\x83\xf3\x67\xaa\x16\xf8\x18\x2c\x6c\x32\x18\x74\xbc\x51\x07\x8b\x89\x0d\xc9\x58\x4c\x5c\xc6\x56\x7f\xb6\x6c\xd9\x41\xa2\x0a\x7a\x24\x6b\x50\xec\x93\xbb\x85\xe7\xb1\x71\x53\x87\xef\x23\xf2\x44\x41\x1c\x50\x8d\x7f\x11\x3b\x8e\x96\x64\x01\xf1\xf5\x05\x97\x22\xdc\x57\x53\xb6\x23\xa1\xb2\x04\x5b\x42\xd0\x72\xd7\x82\xa2\xbc\x4e\xce\xe5\xd4\x6a\x42\x47\x45\x59\xfa\xe5\x34\x15\x83\x24\x8d\xeb\xf1\x5a\xa7\x39\xaf\xe3\x12\xfd\xc5\xa2\x08\xcd\xa6\xee\x5f\x5e\xa9\xef\xf9\x17\xc7\xa7\x4d\x8b\xf1\xf8\xfa\xe4\x7b\x3b\x26\x22\xf4\x3b\xd1\x0a\xa2\x81\x18\x8f\xe1\x25\x40\x37\x47\xa4\x49\x98\xb0\x13\x02\x7a\x43\x9d\xed\x5d\xcf\x29\xe6\x58\xd7\x81\xfa\x38\x9a\xaa\x32\x1c\x3d\x9e\x19\xf1\xaf\x1c\x7c\x24\x3a\x20\x29\xbe\x90\x6f\x6e\x9d\xa9\x0e\xcc\xf7\x1b\xfd\xf2\x72\x1a\x8a\x69\x87\xb2\x84\x7c\x76\x85\x40\xd9\x67\x8c\x26\x01\x7e\xb5\x00\x99\x1d\xf0\xaa\x33\xed\x75\xd5\xad\x5c\x1a\x75\xc3\x85\xe0\x62\xd0\xa7\x01\xdd\x30\x3a\x40\xf4\x7b\x78\x5b\x69\x60\x4f\xaf\xad\x5c\x23\x01\xa2\xeb\xd4\xef\x14\x48\x92\x72\xc4\x57\x49\x98\xca\x58\x36\x3f\x34\x96\x42\x5a\x8a\xa7\x9f\x2c\x83\xaf\xea\x36\xd5\xf5\x9d\x94\x8d\xa9\x28\x68\x7f\x87\x4b\xdc\x26\x04\xb8\x00\x1a\xad\x99\xe5\x8e\x4f\xb3\x6e\x02\x92\xb1\x9d\x98\x84\x17\x52\xf3\xb6\x1d\x02\x4e\xa7\x06\xa6\xe7\x2b\xd5\xc5\xaf\x85\xe0\x00\xb1\xd6\x2b\xff\x40\xe2\xc4\x19\xe2\x5b\x64\x1d\xfa\x25\x39\x27\x4c\xf9\x70\x1b\xbf\xe5\x26\x56\x32\xfc\x2a\xdf\x7f\x31\x2a\x9a\xe0\xea\x00\xa7\x04\x0d\x4c\x3e\x48\x61\x7a\x9d\x21\x66\xb9\xc9\x68\x09\xbd\xe0\x2c\x03\xac\xb6\x0b\x68\x4c\x50\xad\x21\xd5\x1e\x25\xa8\x48\xa1\x4e\xe8\x51\xb1\x65\x2e\x4e\x31\xef\x69\x5a\xd0\x83\x73\x7c\x19\x51\x16\x21\x6f\xa9\x19\x46\x32\x5c\xe5\x62\xd0\xef\x0e\x79\xad\x14\x06\x21\x08\x19\x8f\xd0\x31\x53\x7e\x2f\xae\x2e\x8e\xf7\xee\xc9\x57\xae\x51\x57\x4b\x26\x9f\xb3\xce\xfb\x79\xb2\xf0\x53\x52\x10\x33\x6d\xf7\x0f\x29\x3f\xc1\x38\x98\x6c\x4f\x45\x5f\x54\xe4\xe3\xd4\x62\xb3\x7c\x25\x4c\xc2\x71\x67\x24\xa8\x67\x4b\xa4\xfb\x70\x20\x7e\x66\x24\x64\x65\x5e\x71\x99\x71\x8d\x00\xed\x93\x3f\x2f\x2b\xe7\xe6\xb6\xe6\xc5\x42\xb6\x7d\x46\x09\xb6\x38\x3e\xb5\x3a\xc0\x6d\x38\xdd\x42\xbb\x45\x9a\x39\x83\xe4\x72\x91\xa8\xf1\xa0\x56\xc5\xe7\xfb\xe0\x54\x57\xab\x33\x97\x81\xb3\x7d\xb6\x53\xd3\xbb\x05\x61\x5f\x0a\x6b\x87\xf6\x56\xe9\x52\xf4\xcb\xde\xc7\xe0\x78\x48\x42\x36\x76\x7d\xb0\xd5\xb8\xbe\xb7\x17\x95\x84\xe2\x0a\x6a\x08\x2e\x90\x9e\x37\x9a\xfc\x9c\xb5\x21\x58\x6a\xcd\xc3\x49\x6e\x72\x86\xef\x07\x9d\x06\xb6\x96\xfc\xaa\x51\x49\xa2\x10\xb8\xe4\xd6\x40\xd3\x37\x10\xd1\xac\xd8\x4c\x94\x3b\x74\x5e\xb0\x5c\x56\x28\x62\xb6\xf9\x4d\xe1\x26\xc6\xd3\xa2\x94\x98\x3c\x23\x30\x81\xde\x5d\xa9\x7f\x18\x8c\xc3\xd4\xad\x8f\xf1\x0c\xdb\x69\x79\x41\x85\x7f\x04\xde\xc7\x70\xc5\xef\x6c\xfb\xc5\xe9\x48\x26\xaa\xc4\xfc\x3f\xe6\xfe\xa3\x67\x62\xac\x59\x0e\x06\x7f\x8e\x66\xc0\xd1\xd0\xbb\x2b\x68\x41\xef\xbd\xaf\x1d\xbd\xf7\x9e\x83\xf9\xef\x1f\xba\x75\x6f\x77\x4b\x5b\xbd\x8b\xf7\xd9\x3c\x2c\x54\x15\x8a\x87\x38\x19\x27\x33\x32\x11\x01\xe5\xf7\xe7\x07\xaf\x6c\x81\xe8\x0e\xda\xf8\xa7\x4f\xdb\xcc\xda\x96\xe4\xe8\x0f\x0a\xd8\xb8\x1b\x84\x91\x7d\xdc\x1d\xd2\x15\x27\x61\x76\x0f\x25\x98\x13\x43\x8f\xa3\x6f\x78\x92\x0e\x1f\x80\xf3\x7b\xcd\x06\x0a\x73\x43\x64\x40\x21\xb7\x66\xf7\x6c\x6e\x9d\xc7\x76\x7f\x06\xa6\x8d\x98\xf6\x85\x96\xd5\x9f\x29\x5a\x89\xbc\xf3\xdb\x3e\x5e\xd8\xd7\x0f\xf1\xaf\xc0\x56\x75\x0a\x99\xe2\x38\x49\xa3\xbf\x8d\x29\x99\xa5\xf0\xee\xba\xc3\x8f\x6e\x20\xe3\xc4\x5d\x4b\xca\xc8\x07\x4e\x5e\xb4\x75\xd0\x46\xf3\xcd\xbb\x45\x35\x9b\xfb\x70\x02\x12\xc9\x9c\x85\x6a\xfb\xb2\x44\x3a\x1a\x02\xe1\x6d\xc7\xce\x6a\x9d\x7c\x77\x1c\xf5\xd5\x14\xbb\x30\x19\x72\x4b\x20\xb7\xab\xc9\x6d\xbc\x20\x1e\x68\x4c\x83\x8f\x28\x32\x0a\x20\x41\xb6\x81\x66\xf3\x4c\x80\x49\x3f\xba\x1e\xa7\x91\x2f\xde\x38\x01\x60\xf9\x91\x1b\x56\x12\xe5\xf9\x59\x5d\xba\x4f\xa8\xdb\x9b\x07\x50\x9e\x7b\x7e\x3f\x9e\x8f\xa7\xb6\xdc\xec\xd2\x6c\x59\xd4\xbd\xf2\x4b\x3c\xe9\xdb\x2d\x4c\xdf\x00\x4a\x96\x2c\xf7\xe3\x0e\x3a\x56\xa6\x2e\xad\xd8\xf9\xab\x7b\x60\xd8\x6f\x9b\xc0\x2b\xd4\x5f\xda\xc8\xcd\x2a\x98\xfe\x53\xc7\x6d\x60\x78\x41\x09\x72\xdd\xf2\x55\x45\x08\x5a\xf0\x3e\x96\x07\x43\xf6\xd0\xb0\xe7\x30\x68\x6a\x82\x59\x64\xae\x56\x34\xcf\xdd\x04\xcc\x94\xb0\xbc\x49\xdd\xcf\xac\xec\xf7\xd8\x6d\xe4\xe6\x5b\x93\x00\xbf\xc2\xe2\x70\x83\xfa\xe9\x9a\xcb\x28\xaa\x98\xb0\x7b\x69\x4c\x2b\x9c\xc6\x1b\x09\xd3\x44\x15\x35\x23\x18\x0d\xe2\x2f\x0a\x44\x7a\xd7\x2c\xcf\xf1\xa5\x47\xc0\x0d\x50\x3f\x20\x60\x72\x36\x53\x3a\x11\xd7\x97\x66\x6c\x41\x18\x56\x63\xd1\x66\x1e\xe6\xfa\x07\xf0\xd7\x9e\x48\x29\xc1\x87\xb6\x65\x98\x60\xf5\x61\x56\xce\xc0\xb2\x04\x67\x17\xfa\xc3\x17\x0d\x85\xfb\x17\xcc\xf3\xfe\xd0\x95\x6b\xed\xcc\xfe\x3f\x8b\x0d\x59\xcb\x1c\x43\x11\x67\xc5\xfe\x7a\x10\x04\x68\xfa\x93\x44\xef\xba\xb4\x85\x22\x41\xac\xa3\x40\xfd\xa5\x24\xad\x14\xf9\x0a\xe2\xb9\x5b\x61\xb5\xcf\xfd\x96\x26\xca\xcd\x03\x7e\x8a\xa9\x4c\xe1\x22\xf9\xab\xaf\x7a\xd9\xfb\x5c\x5d\xf7\xfd\x45\x62\x95\x93\x46\x28\x01\x8a\x1d\xce\x16\x07\x15\x39\xd7\x29\x9a\xfd\x08\xc9\x5d\x6e\xc7\x49\x40\xec\x04\x20\x93\x1d\xa3\x65\x61\xa7\x61\x1b\x88\x27\xf9\x57\xdd\x6a\x70\x01\xab\x2a\x23\xa3\x42\x9d\x0e\x6e\x2c\xee\x82\x8a\x7e\x4f\x79\x28\x26\x60\x8a\xfd\x32\x90\xe2\xdb\xc0\xa8\x35\x38\x07\x5e\x66\x08\x72\x2d\xc0\x89\x10\x87\xce\x1f\x1d\x46\x4c\xc7\x16\x03\x6a\x07\xd2\xb9\xad\xc7\xb5\xa6\x52\x37\x72\x3f\xfa\x56\x1f\x0a\xb8\x7e\x40\x69\xa1\x3b\x66\x4a\x24\x89\x80\x06\x84\xc6\x51\x91\x47\xfe\xf9\x97\x9e\x5b\xcd\x09\xec\xb7\x06\xd3\x11\x7d\x20\x0c\x59\x19\x38\x5d\x0b\xe4\x83\x59\x2e\xd0\x97\xae\x01\x35\x65\xb5\x6d\xa0\xd5\x37\xff\x5a\xec\x68\x03\x15\xb5\xb5\xb9\x59\x1f\x68\x31\x74\xee\x1d\x48\x9b\x22\x72\x7b\x5a\x0a\x4b\x9b\xc1\x04\xfb\x29\x79\xa6\x19\x36\xa9\xed\x3a\x58\x3d\x89\xba\xed\x51\xc5\x51\x58\xe6\xae\x09\x80\xc4\x0d\xbc\x5e\x24\x49\x17\x71\x73\x5d\xe4\x66\xe2\xc5\x09\xdc\x4b\x0c\x2a\xa8\x16\x7e\x79\x9f\x00\x2e\x49\x48\xe7\x36\x76\xba\x01\x81\x95\xc8\xd4\x54\x71\xde\x7e\x08\xc2\xe1\x8c\x62\x23\xa5\x7b\xf6\x7f\xd5\x51\xe9\xad\x2c\x72\x98\x90\x04\x3d\x4c\xeb\x97\x55\x25\x48\x5f\xda\x98\xd9\x80\xcf\x08\xb1\x4f\x14\x58\x37\x88\xbf\x41\xc7\x6a\xcd\x05\x13\x71\x2a\x7c\xee\xa8\xc0\x59\x18\x5f\xeb\xa1\x4d\x46\x9d\x3b\x63\xfb\xba\xd6\x70\x4a\x10\x26\xc7\x11\x02\x6d\x0c\x47\xc6\xc7\x27\x80\x58\x0e\xf4\x6f\x0e\xa4\x08\xce\x4e\xe4\x17\x9a\xfc\x73\x23\x9b\x05\x82\x56\x60\xf5\xe4\x96\xba\xf7\x5f\xe2\xb9\xad\xfa\x63\x3d\xa6\x6c\x20\xaa\xb5\x50\x10\x88\xef\xed\x40\x33\x70\x50\x4b\x1b\x3c\x6f\x21\xb9\x05\x64\x14\x3b\x5e\x48\x84\x28\xa3\x9c\xf9\x75\x07\xaa\xa6\xa1\x40\x20\xf0\xc1\xe1\x72\x61\x91\x27\xd9\xbd\xc1\x0b\x25\x31\x20\x08\x0b\xc0\x9e\x7e\x10\x09\x25\x69\x89\xe6\xe7\x36\x2e\x19\x5a\xf9\xd8\x58\x5e\x20\x10\xf3\x53\x77\x76\x6c\xff\xb7\x16\x5e\x2d\xb0\x29\xab\xf1\xfe\x86\x56\x34\xc0\x15\x93\xc8\xfc\xf4\x0a\x16\x88\x2d\xfb\x8d\xaa\xb2\x61\x75\x28\x49\xec\x67\x6c\xbc\x40\x79\x63\x1d\x83\xb7\xb0\x11\x2c\xb1\xed\x2d\xc6\x08\x98\x4e\x2a\xaa\x95\xc1\x73\x44\x62\x80\x1f\x7b\x1f\x06\x36\xcb\xfe\x68\x55\x2b\xb7\x80\x1b\x44\xb9\x24\x2b\x8e\x59\x8d\xfe\x2f\xa7\x73\x00\x82\x43\xbc\x0b\x61\xf1\x1f\x9a\xaf\x6c\xcd\xa5\x6e\xc4\xd8\x4c\x24\x74\xde\x94\x1e\xb6\xcf\xca\xb8\x6f\xac\xfa\xce\x24\x91\xa5\x59\xee\x36\xff\xae\x75\x5f\xf4\x2d\x8d\xdb\xc6\x93\x24\x6f\x56\xd4\x88\xfe\x73\x16\xb5\x87\x7a\xa3\x02\xc6\xf8\x9d\xe3\x52\x71\x48\x0b\x46\x70\x23\xe6\x03\x9d\xd6\x33\x09\x38\x92\x0b\x20\x11\x44\xe0\xab\x7e\x2d\xae\x93\x13\xfd\x1d\xed\x7b\x76\x75\x53\xe1\x3f\xf5\xf0\x3c\xe6\x64\x0f\xe6\x60\x70\xe2\x6e\x58\xad\xa4\x01\x93\x7b\x47\xc8\xfa\x88\x03\xb0\x1f\x4f\x3b\x41\xc6\xf8\x19\xb3\x0d\xd4\x69\xf0\x11\x8d\x2b\x20\xb5\x40\x5c\x4b\xc0\xa0\xcc\xa9\x3c\x28\xf8\xb2\xd4\xc2\xbc\x0f\x99\x7d\x14\x65\x65\x91\xef\x4c\xa7\x3d\x99\x8f\xa6\x77\x53\xba\xc7\x20\x00\xb1\x3e\x00\x3e\x04\x40\xe5\x9b\xc9\x86\x25\xf4\x37\xf7\xd8\xf7\x0d\xc6\xee\x2c\xa1\x7e\x05\x8b\x00\x38\x98\xa0\xf4\xe7\xc0\xa0\xbe\x50\x30\xf0\xf0\x99\x4d\xb3\xb7\xe8\xc5\x9b\x88\xa7\x81\x22\xe3\xf5\x15\x86\x5e\x44\x5c\x58\x5d\x9a\x8c\xea\x70\x85\x45\x5d\xd9\x30\xe1\x00\x56\xfd\x10\xdf\xdc\x91\xa8\x10\x6e\x86\x02\x32\xd1\xc3\x13\xa7\x69\x8c\x15\xb5\x75\xfc\xcc\x00\x7c\x49\xbf\x89\x9c\x10\x11\xa4\xa0\x95\x18\xff\xa1\xf3\xc8\xe2\xac\x7c\x4f\x8c\x0a\xfb\x55\x55\xda\x15\xa9\x61\xbb\xee\x43\xf8\x1b\xfb\xcb\x10\x67\x10\xa5\x2a\x7a\x54\xa4\xcc\x19\x84\xe1\x31\xee\x65\x7b\x38\x4a\x45\x33\x5c\xc0\xfb\x27\x92\x55\xc0\x8d\xc2\x85\x78\xd1\x5d\x80\x46\x81\x04\xda\xd7\x54\xa5\xc4\x03\x91\x95\x7b\x48\xcb\x75\x66\x63\x9d\x35\x38\x58\x15\x0b\x01\xd0\xf8\xa5\xd1\xc5\x21\x80\x7f\x6b\xc0\xb2\x07\x2b\xdf\x1b\x23\x4c\xfd\x26\xc5\xba\x37\x25\x14\x58\x3c\x36\x66\x95\xe8\xc2\xd5\x89\x2e\x69\x49\x97\x4f\x2f\xdc\xe3\x52\x47\x9b\xe7\x2b\xf4\x06\x48\xb1\xc4\xc3\x32\xfb\x18\xbd\xf1\x24\x37\x26\xd3\xf1\xc0\xfb\xdc\x19\xb7\xdb\xf6\x46\xf5\xe9\x63\xb4\x55\x9e\xd5\x6d\x33\xc5\xec\x6a\xd2\x77\x05\xd2\xca\x43\xfc\xcc\xe2\x29\xd2\x3d\xa0\xe8\x62\x0f\x42\xbc\x3d\x04\xec\x04\xce\xf4\x1f\xdc\x89\xe1\x88\x15\x07\xf1\x93\xce\x13\xf4\xaf\x47\x8b\xe1\xba\x40\xc0\x2b\x7a\xe1\xeb\x11\x9d\xa4\xea\xec\xf5\x38\x40\x91\xba\xdf\x25\xf0\x63\x70\x86\x49\x64\x6a\x0b\x05\x2a\x6f\x34\x34\x5c\xc0\x4f\x7a\xa7\x57\xc1\x79\x9b\x87\xfe\x4b\x78\xeb\x68\xa5\xbd\xc6\x75\x0c\xe4\x36\xaa\x4e\xbb\x20\x3a\xbe\x1e\xba\xb6\x39\xc4\x6c\x29\x0e\xc5\xb0\xdc\xcd\x0f\x58\xe9\xc6\xf9\x8b\x8f\x81\x59\x59\xe1\x18\x79\xc6\xe4\x0e\xec\xfc\x12\x48\x88\x76\xa2\xe9\xf4\x3d\xaf\x0d\xaf\x84\x2e\xa3\x1c\xab\x30\x89\x2a\x31\x56\x28\xaf\xa1\xe6\x83\x33\x06\x9e\x6a\xb1\x6b\xdb\xe5\x47\x65\x89\x30\x2b\x97\xde\x8a\x6d\x10\x9b\xb1\x9e\x18\x64\xff\x1b\x56\x6c\x5f\xf2\xee\xeb\x20\xf2\x20\x2b\xd4\xfc\xd2\xfc\x00\xb7\x75\x05\xfe\x4f\x9d\x4f\xa6\x60\x79\x55\x63\xf8\x95\xe9\x36\x94\x6a\x5b\x4a\x58\x89\xf9\xe4\x61\x37\x6c\x80\x67\x49\xdc\x0a\xa8\xbd\x30\x0c\xe3\x2c\x91\x34\xaf\xcf\xf1\x4d\x27\x56\x48\x98\xcd\x69\x90\x93\xac\xde\x29\x8b\x28\xe4\xe8\x17\xe6\x6c\x79\x2c\x54\xe5\x2e\x1d\x9f\x45\x88\x0b\xd7\xe8\x56\x81\xd9\x6e\x66\x00\x86\xe8\xed\x5b\xfc\x63\xad\x26\xab\x2b\x1e\x23\x2a\xf1\x59\xee\x91\x28\x01\x64\x3e\x4e\x5b\x4d\x46\xb0\x8a\xbb\x91\xf8\x78\x92\xb2\x1b\x63\x75\x2c\x4a\x0a\xe5\x14\xfd\xbc\xae\xce\x30\x63\x10\xbd\xe7\x1f\x71\x7e\x81\xeb\xb3\x70\x78\xfd\x9a\xc0\xa7\x56\xbb\x7a\x61\x7d\xfe\x3a\x5d\x56\xec\x4a\x78\xe5\x40\xc8\xd7\x9e\x05\xda\xae\x0c\x22\x73\x51\xd1\x32\xb4\xfd\xad\x37\x8f\xb1\x14\x27\x79\x3b\x23\x27\xee\xb4\xc1\xfd\x57\x80\x17\xcd\xd3\xcf\xcf\x1c\x2f\x04\xa4\xce\xcf\xbd\xec\x1d\x91\x5e\x29\x2d\xc3\xf7\xf6\x69\x87\x39\x38\x3c\x80\x09\xbc\xcb\x2b\xbb\x23\x30\xbe\xe3\x27\x15\x21\x8e\x8f\xc2\xce\xcc\x85\xd2\x76\xf9\x48\xe0\x2a\x29\x1a\xa0\xd6\x88\xf6\xfe\xd6\x89\xa5\x78\x80\xed\xd8\x92\xe1\x4f\xc5\xdf\x36\x14\x01\x8b\x54\x29\x42\xeb\x2e\xae\xcd\x90\x44\x5d\x3b\xab\xc0\xe6\x0d\x24\x9d\x7e\xe1\x82\x7b\x0e\x33\xf9\x57\x8f\x97\x70\x02\x6c\x89\x04\xa3\x38\xc0\x06\x5d\x03\x1f\x55\x00\x99\x16\x9d\x83\xa7\xb8\x12\x00\x41\xac\x69\x1c\xd1\x6e\xf5\x0f\xbe\xfa\xc7\xea\xaa\xc4\xb0\x3a\x79\xe2\xc9\xa1\xbd\x0f\x55\xed\x10\xda\xf6\x0b\x3f\x3c\x5e\xd8\x60\x1a\x52\x21\xcc\xfe\x9b\x5c\x91\xea\x38\x22\x80\x55\x3f\xc1\x4a\xd3\x89\xf1\x76\xfe\xd6\xdf\xae\x1a\x02\x66\x1c\xb1\xe6\xcf\x58\xa2\x14\x30\x17\x17\x50\xc2\x3a\xf6\x8d\xd6\x92\xea\x82\x27\x53\x7f\x9b\x71\xf8\xa1\x58\xa2\xe5\x71\xc5\x52\x7f\x95\x20\x0d\x7e\x43\xfb\xa4\x3f\x96\x08\x20\x4b\xf9\x21\xff\x85\x9d\x82\x22\x06\x02\x55\xaf\x4c\xd9\x31\x16\x5a\x1d\xc8\x32\x1f\xf4\x8b\xd0\x76\xe7\x76\x4f\x5f\x7d\xdc\x81\x0c\x43\x6a\x76\x36\x64\x4b\x83\x19\x0e\x2e\x3c\xe3\x5c\xc0\xeb\x72\x8d\x9e\x28\x65\x43\x99\x87\x46\xad\x25\x71\xf3\xaf\xf2\x0e\x28\x72\xaf\x11\xed\x9e\x26\x62\xdf\x83\x5f\x5e\x12\x04\xe8\x02\xb5\xec\x34\x3d\xfe\x37\x0e\x39\xbd\x83\xda\xc0\x44\x2b\x46\xc3\x75\xb6\xb2\x70\x7d\x29\x01\x99\x06\x74\x67\x18\xe8\x4a\xa1\xdd\x92\x15\x9e\xb6\x35\x23\xc6\xeb\x5d\xfe\xa5\xee\x9e\xdb\x9f\x14\xb0\x1e\x0f\x80\x77\x95\x20\x16\x4e\x54\x79\x35\x23\x1d\xe3\x7c\x9b\xb0\x03\xf7\xb6\x40\x99\x8c\x3f\x3f\xd4\xc1\xf2\x6b\x5d\x49\x14\xbd\x8c\xb2\x2c\xa1\x21\xf9\x8b\xe3\xdd\x67\x91\x09\xeb\x83\xc1\x6f\xad\xc8\x0d\xe4\xb2\x97\x21\x0e\x6c\x5e\x77\xc4\x30\xfc\xf2\xe6\x16\x35\x93\xb9\x29\x3c\x0b\x10\x42\x7f\xa9\xeb\xd8\x79\x89\x7d\xf7\xc7\xd0\xf0\x72\x63\x0e\x1e\xa1\x90\x63\x3d\x38\x8d\xc6\xfb\x1e\xa3\x4e\xb9\x1b\x60\x3a\x48\x19\x04\x39\xae\x1f\x4a\xd2\x1d\x40\x7a\x05\x08\x4c\x74\xec\x4f\x23\x9f\x32\xf9\xdf\xba\xc3\x02\xc3\x59\x9e\xc0\x94\x21\x6a\xa1\xa4\xb3\xec\x16\x79\x02\x24\x96\xad\x1a\x49\xe5\xa3\xa8\xee\x6a\xfd\x93\xbb\x86\xfb\x89\xfa\x2c\x53\xad\xeb\x28\x98\x22\xd6\x29\xaf\x0e\x21\xb5\x43\xc0\xc9\xe5\xfc\x8c\x69\x0c\x8d\xed\xa5\x6b\xc3\x06\x68\x43\x24\x9a\xf7\x31\x46\x09\x2c\xb8\xd9\xb6\xe8\x67\x79\x45\x5f\x98\x6f\x4f\xe8\x37\xf7\x61\x83\xc2\x8f\x50\x04\xce\x5f\xeb\x16\xfa\xbb\xfe\xdd\x5e\x7d\x23\xe8\x43\x51\xa0\x8d\xd8\x28\x73\x93\xd4\xb6\x12\x34\xa8\x63\x4e\x01\xed\x0b\xcb\xb1\x8b\xc5\x7d\x86\xe0\x59\xa3\x61\x1d\xb5\x61\xdd\xed\x0d\x11\x69\x75\x90\x7d\xcb\x58\x53\x66\xd2\xbc\xc7\x1c\x47\x87\xa4\x12\xc3\x73\x98\xd6\xf8\x50\x5c\x5a\x3c\xd1\xa1\xbf\x13\xb5\x3b\x23\x95\x65\x56\x85\x7f\x00\x40\x1f\x19\xaf\x2d\xab\xf8\xfc\xcd\xc1\xa7\x8c\x82\xab\x37\x57\xac\x68\xac\xd9\x55\x49\x6d\xf1\x25\x93\xc7\xa1\xa5\xe3\x6e\x2f\x72\x73\x0b\x5f\x3a\xae\xba\x13\xcc\x98\x0c\x47\x7c\x98\x77\x05\x7b\x03\x01\xe1\x5f\xc7\x33\x9e\x37\xdb\xfb\x67\x73\xb3\xb4\x86\x9a\x7e\xd1\xb0\x12\xc8\x00\xec\x96\x54\x13\x9e\x50\xa6\x1d\xef\xfa\x3e\x40\x47\xf1\x91\xf3\xa2\xeb\x24\x1a\x9f\xba\x8a\x88\x7f\xf5\xa2\x04\x43\xc5\xb9\xef\x0f\x1c\xc8\xda\x22\x2f\x41\xc8\x6b\xec\x15\x9b\xb7\xb6\xdd\x27\xb5\xb7\x24\x8d\xf2\x16\x1f\x66\x9e\x28\x0c\xc7\x2e\xd2\x95\x03\xa8\x27\xec\x40\xbc\x9b\x21\x0a\x30\x86\xe9\x66\xe6\xab\x10\x92\x00\x0b\x85\xc8\x3c\x54\x62\x38\x73\xd1\x13\xfb\xd1\x95\xf5\xc2\x45\x01\xee\xb6\xde\x71\xc7\xe6\xfe\x63\xad\x42\xad\xe0\xfa\xcd\xe2\xf2\xaf\xdc\xb3\xf6\x2b\x40\xa3\x2e\xec\x1b\x0e\x42\x1c\xce\x44\xae\x5e\xf2\x33\xa8\x38\x1b\x78\xa0\x71\xf2\x0d\x4f\x4d\x1a\xd2\x7d\xd5\x8c\x20\xf5\x4c\x75\x19\x23\x95\xee\xa6\x7b\x1c\xb8\x8d\x8f\xe1\xf7\xd9\x10\x29\x7f\x08\x7d\x27\x9a\xbb\xbd\xf4\x8f\x5c\xc7\xa4\x04\xd6\x89\xbc\x50\x77\xec\x00\xea\x1c\xf9\xf9\x6f\x6d\xe9\xb6\xaf\x15\x46\xc0\x98\x4a\xf3\x8a\xf2\x5a\x8f\xf7\xa1\x29\x03\x18\x8a\x2a\xbe\x1c\x49\x4d\x68\x64\x1a\x7a\xf1\xc4\x0a\x7b\x81\xb8\xf7\xb4\x54\xd2\x4b\xd1\x0e\xf8\x3c\x87\xb3\x94\xb5\x43\x1d\xe9\xdc\xa6\xec\x8c\x95\x03\x99\x6f\x03\xb0\xaf\xe5\x54\xf0\xc8\x84\xb3\x62\xa4\xb6\x95\xb9\x49\xc4\xd6\x75\x72\xe8\x6b\xf8\x7f\xf7\x99\x89\x82\x85\x61\x26\xce\xe3\xd0\xeb\xdd\x62\x8a\xc8\x36\xee\xc3\x88\xac\x3e\xa4\xe1\x3b\x53\x9e\x19\x62\xba\x8e\x7e\x7d\x61\xae\x69\xbf\xd6\x6b\xab\x80\x30\xb6\x43\x0a\x93\x2c\xa2\x75\x6a\xbb\x1e\xf9\x77\xba\x95\x32\x00\xf6\xe3\x89\x58\xce\x05\xe5\x80\x8d\xad\xc0\x35\xa7\x02\x8f\xf8\x00\x40\x9b\xb5\x7d\x4d\xd7\x86\xcb\xd7\x1a\xfe\xa3\xaf\xa3\x3b\x3a\x20\xa5\xdb\x2b\x54\xa5\x59\x91\xc3\x47\x00\x1a\x8a\x56\xd7\x27\x57\xa3\x4d\xb7\x1c\x43\xf3\xb2\xf8\x8b\xc2\x5c\x1b\x57\x28\x5a\x9a\x36\x4f\xdb\x0f\x7a\x16\x09\xd9\x44\xce\x67\xfa\xef\x12\x6a\x82\x83\x2a\x8d\x3d\xae\x54\x3d\x21\x2e\xa4\xa4\xd7\xd7\x13\x6d\x3c\x69\x96\xd1\x6c\xb0\x0e\xa6\x6d\x39\x17\x91\xdb\x88\x72\xf2\xcf\xbd\x9a\x6b\x10\x82\x05\x70\x19\xe9\x4e\xb1\x68\xc5\x87\x80\x3e\x05\xad\x51\x7b\x0a\x51\xff\xc8\x66\x38\x01\x1a\xc0\xc2\x80\x0e\x27\xf9\x2f\x5c\x65\x24\x50\x80\x3a\x50\x50\x63\x9b\xf3\xe0\xdf\x95\x86\xef\xfb\xda\x68\x3c\xdb\xe1\xbd\x16\x8d\xa9\x4d\x4c\x17\x53\x75\x13\xb4\x0e\x38\x8b\x8a\x06\xe7\x8e\xa7\x00\xce\x7b\x38\xee\x6d\x76\x8e\xa0\xfd\x08\x1a\xe2\xa8\x63\x54\x10\xb4\xe3\x2a\x8a\x6c\xab\xf8\x73\x3c\xa9\x44\xcb\xfd\x8c\x9a\xf6\x9c\xbe\x6f\xeb\x40\x0f\x28\x21\xe0\xba\xa3\x00\x2c\xfe\xee\x3b\x59\x81\xa0\x32\x8c\xd9\xff\xc0\x0f\x66\x76\x99\x14\x37\x98\x10\x51\x45\x00\x1f\xe9\xc7\xda\x6a\xfb\x49\x59\x2b\x4d\x94\xa3\xdc\x9c\x31\xd7\x90\x88\x9d\x3d\xd2\x51\x37\x74\x7b\x35\x59\xe6\x32\x54\x54\x15\x2a\xdd\x14\xb6\x97\x0b\x5d\xab\x23\xe5\xd5\xfb\xae\x2f\x28\x79\xb4\x91\x89\xab\xe8\xbb\x69\xfa\x05\x6a\x10\x96\xc6\x61\xf6\x0f\xaf\xb6\xfc\x76\x7a\x46\x84\x4b\x6a\x31\x81\x92\x3a\x65\x05\xb2\x1b\x02\xe0\xbb\xf0\x29\xf5\x9b\x07\x1d\x3f\x5c\xf1\x7d\xe1\x44\xc6\x74\x23\xed\x82\x78\x03\x4a\x98\xee\xba\x70\xda\xcf\xe1\xe8\x27\x03\xf6\x69\x6d\xf7\xe5\x1e\x6c\x1e\x8a\x3c\xa3\x17\xf5\xe3\x9e\x31\x8c\x3e\x57\x70\x5c\x86\x46\xec\x72\xf0\xb7\x5f\x94\x7b\x4f\x98\x85\xad\x0f\xff\x82\x9a\x1d\xe5\x17\x78\xec\x0d\x85\x64\xf6\xf3\x6a\xae\xf7\xca\xc0\x3d\xc7\x6c\xd0\xde\xb7\x99\x9b\x4a\x52\x58\xf8\x2f\xb3\xc3\x23\x8e\xf4\x95\xe0\x45\x7b\xf7\x1c\x88\xc3\x9e\x9a\xb7\x7e\xbd\x82\x2c\x00\x67\x7e\x7b\x5f\x28\xa3\xd4\x65\xc0\x16\xc7\x72\x9c\x39\x77\xd3\x7b\xd5\x3d\xd2\xba\xb4\x18\xff\xf5\x9b\xed\x3d\xcc\xac\xc9\xf3\x8f\x0f\x93\x10\x91\x2d\x7c\xb0\x57\xe7\x3a\xf6\xe7\xf9\x13\x74\xcd\x57\x70\xa4\xad\xd3\x18\x6f\xd8\xd6\x1d\x5f\xb5\x7e\x1b\x85\x6c\xd2\x23\xec\x45\x1f\xb0\x19\x59\x67\x7d\x1b\x28\x7f\xdd\x09\x71\xa4\xf5\x8c\xac\xa3\xd9\x18\x49\x24\xc5\x82\x1e\x52\x45\x1e\x6d\xce\xd1\xbe\x69\x55\x25\x97\xe7\x68\xfa\x83\xcd\x00\xf8\x67\xaf\x39\xf9\xe3\xd9\xb2\xe6\xad\xe2\x1f\x4e\xb0\xe6\x95\xc9\x53\x73\x16\xa7\x2b\x9d\xd8\x7d\x20\xd3\x70\x8a\x5a\x02\xce\x62\x9e\x47\x3b\xd1\x9f\xed\xf8\xa2\x58\x50\xb3\xbe\x1a\xab\x83\x61\x93\xd4\x5c\x77\x6b\x36\x2c\x95\x77\x7c\x01\x62\x0e\x75\x37\xe3\x20\x01\xc3\xf9\x05\xaa\xc5\x12\x97\xd0\xf4\x37\x96\xe8\xb7\x51\x0b\xea\xad\x16\xbf\xd2\x26\x37\x86\x04\x00\x22\x7f\x5d\xe8\x27\x56\x7f\x6c\x52\x33\xcc\xf5\x11\xc3\x57\x2a\x67\x0d\xf5\x29\xb9\x0a\xe1\x6a\xe1\x12\x78\x01\xee\x28\xb5\xe6\xe4\xb3\x99\x6c\x1e\xc5\x01\xcf\x32\xc7\xa8\x6b\xd2\x77\x62\x08\xcf\xa4\x10\xc8\x04\x03\x50\x82\x0d\xba\x22\x8d\x43\x23\x11\xe1\xfe\xbb\x55\x5d\xf2\x01\xcb\xe5\x6c\x6c\x80\x32\xf4\x2e\x7a\xb8\x42\x07\x6a\xdb\x72\x50\xdc\x07\x8f\x87\x00\x97\x72\x43\x6b\xb1\xb6\x9f\x46\xb2\x84\xb6\xe7\xb2\x66\x22\x67\x00\xe7\x71\x1f\xaa\xe7\x83\xf0\xad\x5d\x87\xc8\x08\x59\x83\xd3\x55\x8c\x32\x8e\x0b\x7f\xe2\x82\x0a\xd2\x74\x3d\x16\x2a\xb3\xe2\x00\xb0\xf7\xdd\xd9\xe1\x8e\xa2\x1b\x89\xb9\x20\x75\xab\x4a\xd6\x75\x4d\x9b\x58\x0a\x00\x0c\xfb\xdf\x37\x62\x30\x34\xe3\x0c\x0c\x4d\xbd\x46\x3a\x7d\xeb\x59\x16\xa3\x49\xd0\x79\x11\x1c\x6a\x58\x45\x24\xc6\x02\xc9\xef\xce\x1f\xb3\xbe\xb3\xfb\x91\xae\xbd\x19\xe0\xb0\x9d\x5a\x16\x54\x2f\xfd\x8d\x0b\x66\xe1\xba\x99\xb1\x14\x9c\xae\xaa\x7d\x2f\x28\x57\x75\x9b\xd8\xe7\x5b\x16\x12\x28\x64\x33\x37\xfc\x3e\xc4\xa1\x8c\x26\x5b\xee\xca\xf2\x77\x52\xb9\xc8\x16\xff\xf4\x6e\x1b\xee\x41\x61\x74\xd2\x50\xda\x01\x9c\xe2\xad\x62\x00\x70\x46\x32\xf9\xa0\x31\x69\x1d\x6b\x23\xb1\x68\x36\x8c\xba\x71\xcf\xb7\x98\x7f\x46\x36\x80\x8c\x29\xc5\xb2\xd4\x27\x5c\x8d\xf9\x38\x92\x83\x7c\x42\x2a\x22\x31\x12\x4d\xb3\x5d\x10\x90\x57\x66\x10\xc0\xd7\x24\xea\xec\xfb\x88\xaa\xd4\xdc\x40\xb2\xf8\x3f\x9f\xbd\xc1\x19\x35\x13\x75\xd2\x5b\x1e\x65\x59\x02\x24\x95\x95\x95\xf3\x1a\xa0\xd6\x62\x7a\x98\x3c\x42\x33\xbf\x5f\x04\xf2\x0c\xcd\x9c\x7d\xf5\xf2\x34\x6b\x22\x51\xc1\x34\x0c\x70\x55\xee\x87\x81\x40\xb5\xa6\x62\x14\xda\x6f\x1f\x27\x27\x6a\x42\xa1\x7c\x74\x3e\x68\x19\x21\x08\x5e\xc7\x0b\xb3\x28\xac\x7b\xc0\xdf\x7e\x55\x7f\xd2\x14\x93\xc2\x88\xf3\xb7\x6f\xdf\x74\x96\x3b\x22\x72\x00\x00\x4e\xc3\x9f\xe7\xe4\x0f\x29\x06\xbc\xa8\x24\xc5\x70\x4c\x3b\xb1\x1b\x9e\xce\xb5\x30\xd1\x86\x57\xdd\x79\xdb\xce\xc7\xe5\x17\x70\x3b\x3b\x5b\xca\xb7\xc4\xb3\x0b\xdf\xce\x52\x99\x40\x25\x56\x86\xd5\xed\x65\xa3\xc0\xe4\xef\xa0\x29\x8c\x22\x25\xa4\x3a\x4f\x3b\xc0\xc8\xc3\xfc\x20\x90\x6c\x93\xbf\x67\x40\x4e\x2e\xaf\x99\xb2\x2d\xc7\x32\x4f\x71\xf2\xc3\xb0\x5a\x30\x79\x90\xdc\xf8\x37\x82\x21\x8c\xd0\xf8\xa0\x7a\x49\x33\xe6\x9a\x8b\x60\x5f\xa1\xd8\xf1\x27\x39\x9b\xe4\x8f\x32\x6a\xc5\x43\xa6\x61\x2c\x14\xca\x2a\xfb\x4d\xce\xaf\x94\x10\x19\x97\xd8\x18\x07\xe8\x73\x29\x7d\xbb\x42\x48\x73\x7d\x14\xbf\xd9\xf0\x75\x42\xa7\x78\x1a\xa5\xd5\x22\x90\xbe\xff\xe7\xfe\xf2\xff\xd8\x5f\x3e\xd8\x52\x61\x45\x62\x72\x5c\x82\x17\x09\x4c\xd4\x57\x89\x73\xa6\x13\x08\xcb\xf3\x4f\xd3\x6a\xea\xf3\x22\x9c\x76\x0a\x0e\x18\x7d\x9b\xaa\xaf\x69\xfd\x13\xd1\xb1\x90\x9b\xeb\x22\x36\x3b\x31\x89\xb7\x28\xca\xf2\xc2\xc4\x42\xad\x32\x00\xe4\x68\x64\xb6\x2c\xfa\x5e\xf9\x39\x46\xaa\xf3\x1a\x2a\xda\xb6\x37\xd2\xf0\x21\x12\x31\xb7\x4e\xcb\x10\x6b\xca\x98\x3d\x8e\x12\xa9\x98\x42\xd2\xeb\x00\xe8\x02\xcf\xd3\xd9\x0e\xf2\xcb\x57\x1b\xf3\xfe\xe1\x69\xa6\x98\xb3\x48\x6b\x58\xd1\xcb\xf0\x74\x20\xb7\x6f\x45\x5b\xba\x2f\x72\x28\xdf\x20\xcd\xe4\x32\xf2\x29\x22\x93\xe3\xbc\xb7\x12\x95\xb3\x34\x2e\x1d\x49\xe1\xf9\xa7\x1d\x9b\xe3\xd7\x3f\x68\x95\x4e\x7d\x3d\x3e\x8a\xf8\xa9\x6c\xc9\xf6\x00\x09\x42\x52\x1d\xd7\x8e\x53\x64\xa3\x86\x03\x44\x1a\xa9\xd5\xc7\xd2\x11\x4c\x77\xf3\x13\x9f\xc4\xec\x4d\xe8\xba\x8b\xb8\xe1\xd2\x53\x06\x1e\xb4\x84\x24\x57\x83\x95\x12\xfb\x49\xa9\x25\x5d\x62\x83\xc3\x8f\x59\x5c\xf1\xe6\x2b\x36\xab\x41\x10\xce\x21\xff\xc4\xc4\xa9\x6e\x14\x46\xde\xb8\x81\xec\x34\x9f\xbb\x62\xc0\xe6\xc0\xad\xc6\x83\x50\x25\x38\x25\x83\xa9\x66\x86\x1e\x31\xd1\x72\xaf\x46\x23\xb8\xd5\x3a\x4f\x87\x0a\x7b\x8e\xe8\x64\x40\xb4\xeb\xc3\xfa\xcf\xad\x4b\x59\x79\xb7\x19\x8a\x59\xc5\xf0\x87\x4c\xdc\x05\x6b\x18\x34\x84\x03\x76\x48\x0f\x24\x84\x3e\xcd\x9b\xdc\x12\xaa\xba\x1d\x78\x0c\x02\x6f\x13\xa7\x07\xfc\x0d\x47\x44\x03\x10\x3e\x80\x65\x01\x92\xe3\xa9\xaf\x03\xb7\xaa\xff\x18\xb4\xc0\xd4\x96\x61\x09\x76\x68\x92\x66\xc7\x00\x7c\x98\xe2\xc3\xba\x89\x75\xc8\x6a\xda\x5c\x51\xac\x59\x30\xff\x46\x93\xc8\x48\x4c\xbd\x37\x76\xc7\xd0\xf7\x12\xbe\xd2\x5c\x58\x51\xc3\xdb\x17\xa7\x09\xc2\x56\x39\x31\xe7\xed\x33\x77\x4f\x29\xd0\xe6\xe1\xcd\x4f\x92\x10\xd1\x88\xb2\x44\x53\xf8\x50\x7f\xd5\xb4\xd0\x28\x38\x1a\xc4\x61\x10\xc8\x0c\xfe\xef\xfe\x8f\x7f\xfa\xc1\x59\x21\x05\x1c\xd3\xf5\xc9\x36\x4a\xf5\xd0\x71\xa0\x71\x2c\x0e\x78\x72\x27\xd4\x19\x11\x9e\x77\xc8\x20\x89\xaa\xa0\xbd\x52\x85\xb1\x1c\x23\x98\x70\x3c\xe0\xe0\xfc\x56\xc2\xf4\xc8\xa5\x80\x76\x81\xe0\x99\x89\x26\x5a\xe3\xd7\xb9\xfe\xcd\x07\x33\x75\xdf\xcd\x8c\x90\x58\x6a\xa2\x6e\xef\x10\xc0\xe9\xc9\x33\xf8\x89\xda\x4e\xf1\x59\x47\x39\x8a\x74\x20\x69\x8c\x63\xaa\x50\xe4\x4f\xcd\xc4\xb3\x7b\xee\xd1\x74\x94\xfc\x11\x09\xfc\xe6\xc0\x36\x4f\xa6\x79\x5e\x52\x54\x40\xa2\x17\x89\x00\x56\x5a\xf3\x09\xb0\xa0\x7f\xf9\x79\xb8\x7f\x1c\x71\x6e\xcf\xb0\xd0\xf3\xee\x47\x89\x03\x70\x71\xa2\xc6\xd3\x17\x31\xd8\xfe\x92\xa0\x92\x80\xfe\x27\xbb\x95\xe2\x59\x46\x88\x63\x7d\xa6\x58\x09\xed\x3d\x33\xd3\x2d\x08\xa8\xfd\x51\x7b\xa2\x5b\x5b\xe9\x22\x75\x93\xf4\x0f\xf7\x7d\x1a\xf9\xed\xa7\xbd\x39\xdc\x3f\x66\xbb\xf6\x44\x50\x19\xce\x0c\xd2\x10\x7c\x68\xa3\xaa\x2a\xef\x20\xdd\x1d\x41\x9b\x75\xdf\x78\x22\x00\xa7\xe6\x04\x19\xcb\x47\xe2\x8b\x00\x0a\xf9\xda\xe5\xc2\x0e\x20\x13\x98\xae\xb8\xe2\x51\xf2\x69\x6f\x6a\xa2\xd0\x66\x8d\xee\x7f\xfa\x84\xee\x2c\x17\xb0\x17\x28\xaa\x55\x89\x3a\x10\x49\x38\x20\x9a\x0d\xbd\xc9\xbe\xc0\xc5\x31\xc9\xa6\xcc\x4d\x66\x3c\x8a\xae\x66\x44\x75\x72\x8a\x6f\xd2\xd1\xad\x33\xe7\x95\x41\x3c\x43\xc3\x85\x0d\x3f\x00\xf4\x2b\xc0\xd6\x64\xa0\x5f\x27\x36\xd0\xa1\x76\x72\xf8\x77\x0d\xe7\x2a\xcc\x1f\xf9\xdc\x47\xf3\x18\x96\xd0\xd1\xda\xee\x24\x2c\xa1\x80\x70\xc8\xac\x4e\xf5\xd9\xc7\xad\xc6\x09\xed\x0b\x6e\x47\x01\x39\x35\xa0\x7f\x60\xa8\xe4\x4e\x73\x2a\x81\xd8\x0b\xe0\xa8\x3c\xc9\xd7\x16\x04\x15\x5c\x4a\x70\x4c\xff\x95\x43\xb9\x0c\x2b\xaa\xbc\xc3\x28\xb7\xf9\x7b\xfd\x62\xf1\xbe\x69\x80\xd1\xdc\x36\xfc\x0e\x84\xce\x40\x84\x69\x51\x4b\x05\x0a\x78\x82\x4c\x49\xd9\x31\x84\xd1\xf7\xca\x3e\x8d\x54\xfd\xd3\x0e\x60\x52\xc4\xab\xb0\x03\xd1\x1e\x2d\x2b\xf0\x12\xe2\x58\x2f\x3b\xee\x9f\xbe\x6a\x63\x3f\x28\x8c\x94\x84\xd7\xab\x5a\x60\xbb\xd0\x34\x09\xa2\x07\x31\x36\xcd\xa9\x6b\xc4\x35\x3d\xaa\x5e\xcb\x48\x27\x53\x98\x55\xa1\x08\xaf\x4f\x33\xe1\xbe\x36\x8f\xf3\x30\x0c\xdd\x11\xa2\x12\x24\x9c\x0a\xff\xf4\x8d\xe5\xfe\xcc\x11\x02\xa8\x27\xdf\xfd\x97\xee\xf1\x80\x06\x80\x4a\x99\x22\x46\x58\xdd\xf4\x4e\x86\xd8\xa4\x62\x0d\xd9\x65\x8d\x65\x09\x04\xa2\x43\xed\x1d\x58\x46\x96\xaf\xc0\x66\xc8\x4b\x59\x56\x44\xba\xaa\x9f\xe7\x79\xe2\xe2\xd0\xa9\xf4\x13\x69\xa5\xe2\x3f\xce\xc1\x5c\xa0\x19\xe6\x60\x68\x83\x06\x63\x4b\xae\x0e\x64\xd9\xa4\x07\x27\xa9\x5f\x2c\x8a\x80\x37\x76\x7b\xd8\xb0\x9d\x4d\xb0\xfa\x5a\x8a\x52\xd5\xe2\x8c\x8c\x03\xe1\x44\x02\xa9\x05\x9c\xb1\x03\xda\xa0\x4c\x5f\xf6\x89\xd8\xed\x93\xc2\x40\x45\xf6\x70\x20\xfc\x63\x2e\x52\x58\xfe\xf4\xcb\x9a\xfb\x39\x47\x8b\x04\xb4\xbf\x6f\x43\x0e\x1c\x5b\x87\xcc\x6b\xd7\x0d\x85\x1c\x37\x65\x67\xe4\xd7\x3e\x74\x44\xf1\x6b\x8a\x6c\x79\xd4\xbd\x07\x30\x7f\xe4\xf7\x3d\x3e\x51\xec\x2f\xfd\xfd\x9c\xef\x6f\x6f\x90\x3a\x74\xfe\xc8\xb5\x01\x51\xb5\x8f\x12\xb0\x9a\xa2\xfa\x0e\x7a\xd5\x2b\x54\xc4\x62\x36\xd1\xd0\x43\x7e\x5a\xd3\x9f\x56\x2f\x01\xa6\x8c\x39\x7e\x8e\x0f\xd1\xd5\xa1\x81\x68\x3f\xe7\xe7\x65\xf1\xab\x17\x57\x41\xfb\xcf\x99\xc7\x66\x30\xff\xd8\x0b\xf3\x0b\x54\x65\x59\xd8\x51\x96\x20\xa2\x49\xe2\x9f\x5e\xee\xa0\xa6\x5c\xf8\x93\x47\xac\xa6\xf8\xd0\xbe\xfd\xaa\x89\x54\x10\x6c\x0f\x1f\x53\x66\x87\x35\xab\x60\xf2\x83\x2b\xb7\xca\xf7\xb2\x85\xab\x32\x3d\x52\xe8\x9f\x3e\xb7\xa2\xa1\xb4\x0c\x3b\x0a\x43\xac\xdd\x22\x1d\x67\xea\x19\x57\xa8\xf5\x3c\x04\xa8\x85\x6c\x59\x3a\xaa\x90\xf0\x44\xa6\x33\x6d\xd0\xd9\x09\x4c\x4e\xc4\x4b\x9f\x0c\xef\x93\x68\xb7\xa8\x56\x70\xb5\x10\x3b\x99\x91\xf0\x8f\x79\xca\x5f\xcd\x78\xf5\x44\xd0\x96\x70\x1d\x08\xb0\x5a\xb6\xfc\x55\x0e\x2a\xd7\xa8\x38\xf7\xc1\xb3\x6a\x8f\x4f\x3f\x24\x3e\x0e\xa0\x5f\xea\x0d\xfc\xb7\xc1\x96\xd2\x2a\x9c\xcd\xd9\x0f\x48\xeb\xbf\x1f\x14\xfc\x5e\xbd\x75\x98\x3f\xfe\xbc\x20\xb4\x5c\x0d\xe7\x12\x45\xf9\x9f\xff\xed\xff\xfd\x3f\xb2\x34\xef\xeb\x6d\x3e\xa7\xe2\xbf\x6f\xe5\x52\xa6\xc7\x7f\x4c\xf3\x7f\x5e\xfd\xf3\xbd\xbd\xfd\xca\xff\xc8\xe7\xe9\x48\xdb\xe9\xff\xff\xff\x6d\x97\x6a\xff\xef\x63\x5b\xfc\xff\xfe\xf1\x89\x76\x4c\xeb\xf2\x3f\xce\x6d\xf8\x7f\xfd\xb7\x22\x3d\xd2\xff\xf8\xf3\x35\xb8\x4c\xf5\xff\xc8\xd2\xbd\x24\xb0\xff\x4f\x1b\xb2\x96\x7b\x43\x9a\x54\xcf\x7f\xdc\x87\xe9\x05\x8d\x10\xd4\x0c\xc3\xb0\x7f\xde\x97\xc3\x31\xc9\x1f\xff\x2b\x0a\xa4\x9b\x3f\x2e\xa4\xd8\x15\x23\xd9\xf5\x33\xe4\x07\x15\x88\xf8\xfe\x1c\x96\xfd\x49\x74\xfb\xf3\x58\x35\x8b\xc4\xe9\x17\xaa\x43\x12\xb9\x78\x9e\x0f\x83\xfd\xc7\x17\xa6\xe6\x7f\x19\x8b\x9b\xcb\x1e\x40\xb0\x2d\xc0\x42\x60\x17\xd6\x4f\x8b\x82\xf9\xd0\x02\x4d\xd4\x85\xa8\x77\x60\x81\xf1\x24\xe9\x91\xd8\x16\xdb\x95\x70\x3b\x10\x52\x69\x1f\x13\xe4\x26\x80\x7b\xaa\x70\x72\xf6\x58\x6d\x3f\x4a\x61\xe6\xd5\x65\x25\x21\x35\x82\x20\xfa\xe6\x6a\x8a\xfb\x8f\xa4\x60\x0c\x25\x1c\xbe\xef\x34\xff\x8d\xcf\x5f\x49\x13\x38\x8d\x3f\xe8\xf6\xa8\xa2\x50\xfa\x5f\xaa\x45\x44\x31\x16\x4b\xa5\xcc\x4f\x77\xba\xae\x28\x70\xd2\x44\x82\x58\x70\x5c\xe9\xd6\x81\xfb\x1b\xd5\xd5\x10\xe0\x3b\x45\xc3\xeb\x25\xcd\x6a\x69\xab\xe9\x5e\xb1\x75\xe9\x2d\x53\x04\xbc\x82\xa2\x86\x1e\xc6\x0b\xec\x83\x8a\x9f\xe4\x23\x6b\x75\xfd\x81\x8d\x8f\x25\x60\x23\x17\x40\xef\x4b\xc5\x28\xab\x17\x16\xef\x3a\xbe\xfa\xc3\x67\xe3\x4b\x52\x1e\x0a\x4e\xbe\xb4\xbf\x3e\x9b\xa6\x07\x1e\xbb\x90\x06\x07\x63\x01\xda\x8f\xd5\x04\xe5\x76\x0c\xeb\xbb\x26\x55\x9a\x93\xa6\x61\xf9\x5a\xd4\x0e\xa3\x1b\xd9\x81\x8e\x7f\x38\x16\xa5\x8b\xd7\xe9\x53\x3f\x19\x93\xd0\x3b\x49\x5d\x0d\x5c\xd8\x68\xb1\x7e\x00\x60\xe1\x1a\x2f\x52\xe0\x96\x5c\x84\x93\x3d\x3f\xa5\x1c\x1c\x7a\x48\x9d\xc8\x8d\x83\x1e\x49\x05\x1f\xab\xde\xba\xc1\x51\x35\xb3\xcf\xbb\xb2\xbe\x34\x58\xa7\x28\x19\x99\xe3\x55\x6b\xa1\x36\x0a\x7d\x46\xaa\xde\xad\xa0\x8b\x52\xb8\x2b\xdc\xb3\x31\xfb\x53\x99\x40\xeb\x33\xe2\x2e\x30\xba\x52\xbe\x4c\x3d\x9a\x62\x22\x72\xa5\x11\xa0\x38\x88\xb2\xd7\xc6\xf2\x71\x6f\xc6\xe2\xc7\x08\x50\x19\xb0\x3c\x51\x73\x26\xc4\x1f\xbf\xdb\x20\xe3\x1b\x70\x83\x21\x14\x54\xee\x6c\x49\x6e\x7c\xed\xd4\xa3\xb1\x8f\x83\x88\x9f\x51\x16\xae\x20\xb8\x26\x43\x14\x1d\x1b\xc9\xbb\x47\x03\x74\xe5\x7a\xe8\x42\x33\x5b\x6a\xc5\x59\x23\xe8\xc6\x10\x38\xdd\x89\x48\x88\x45\xaa\x8c\x23\x98\x3d\x14\x37\x8b\x2c\xa1\x86\x12\x0e\xc2\xef\x4b\xf9\xac\xb0\x34\x8b\xea\xa2\x17\xf4\xb7\x54\xda\x8d\x51\xc7\x74\x4a\xf3\xeb\x49\xa9\xf2\xea\xc5\x54\x36\x2a\x1d\x73\x81\x3a\x18\x32\x9c\x83\xc5\x04\xd5\xaa\x89\x55\x34\x14\x30\x13\x64\x74\x91\xcc\x43\xc4\x74\x8b\xe9\x64\xe3\xb1\xe0\x42\xba\x22\xac\x8b\x3f\xbe\x25\x95\x9b\x80\x7c\x16\xea\x54\xf7\xb5\xcc\xe6\xc2\x8c\xe2\x9c\x32\x7e\x2a\x0d\x86\x60\x0d\x9b\x67\x88\xd6\x10\x3f\xe1\xc9\x1d\x99\x66\x9e\x3e\x68\xef\xec\x05\x9c\xaf\xbc\x8e\x49\x44\xac\x80\x1a\x58\x1f\x6e\xa9\xca\x4a\x91\xc0\x82\x41\xf1\x2e\x24\x5f\x16\x10\xcf\x97\x0d\x10\xc6\x80\x6b\xb0\xad\x0f\x72\x9f\x36\xd3\xec\x6a\xa2\x19\x39\xfe\xc9\xec\x97\x3c\x14\x41\xfc\x0a\x5f\xeb\xcf\x70\x2a\x1a\xf9\x5c\xcb\xc9\x83\x1b\xf0\xc2\xaa\xea\x7a\xd6\xf7\xca\x82\x93\x39\xec\xf6\xfb\x41\xfc\x42\xc6\x70\xe5\xef\x80\xc8\xd0\xb9\x31\x45\x05\xf6\x93\x68\xc8\xb4\xba\x79\x0c\xc5\xaf\xf4\x73\xfb\x16\x24\x86\xe3\xa5\x32\x29\x8a\x5f\x4c\x11\x7f\x46\xa7\x30\x88\x7e\xef\x9d\xce\xc8\x71\xff\x77\xa0\xb1\xa0\xff\x66\xa0\xf1\xfc\x17\x68\x40\x01\x45\xdb\x02\x24\x04\xe0\x96\x92\x71\xf4\x2c\xde\x2e\x26\x4a\x16\x3a\x15\xed\x0a\x22\x2b\xf7\x09\xeb\x2a\xb6\xda\x60\xf7\x66\xa2\xfc\xfe\xc3\x0c\x5b\xb2\xa9\x0c\xbc\x03\x4e\x91\x85\x1b\x17\x12\xe8\x86\xb0\x99\x56\xf4\xdc\x15\xa4\xf1\x0e\xeb\x34\xce\xb2\xb8\x98\x0a\x24\x8b\xcd\xc7\x4e\x1b\xe9\xcd\xbf\x32\x3b\xbe\xed\x43\xaf\x92\xa6\x49\x0c\x8a\x5c\x57\xee\xa3\x09\xcf\xcb\xec\xc4\x72\x99\xf0\x8c\x84\x2c\xa1\xce\x65\xe4\x8d\xce\xd1\xe8\xd9\xc3\x2b\x2f\xc7\x31\x7b\x77\xfa\xf5\x09\xe0\x94\x55\x6a\x4e\xed\xb2\x7a\x97\xc2\xe6\x79\x3c\x19\x1b\xfc\x46\x88\xdb\xe8\x85\x66\xa6\xd4\x83\x3f\x4e\xc1\xfa\x89\xdc\x76\x99\x20\x76\xaa\x3f\x53\x92\x21\x1f\xa7\x79\x9c\x8a\x41\x0e\x21\x53\xd1\x64\x74\x34\x3e\x9a\x71\xbf\x6f\x5c\xe2\x5e\x13\x03\xce\xef\x04\x2c\xfd\x70\xf6\xc0\x7e\x6c\xe7\x21\x7e\x06\x33\x3b\x1d\xcb\xdc\xa4\x05\x64\x42\xc8\x19\x86\x53\xaf\x6f\xbd\x03\xba\xb8\xc3\x0d\x50\x48\x05\x95\x4d\x29\xe4\x8c\xb1\x45\x5b\x3a\xa1\x26\xf5\xcd\x5c\x96\xf8\xd3\xb4\xf9\x45\x43\x0c\xe3\x6a\xb3\xba\xc8\xe4\xa1\x66\x5d\x06\x86\x40\xa8\xaf\x4f\xa4\x92\xa2\xf9\x80\x09\x83\xf7\x89\x91\x5c\x09\xaf\x03\xe1\xe6\x86\xaf\x91\x8b\xeb\x38\xc4\xa7\x32\xdf\x44\x83\x84\x49\x9d\x3f\x4d\xc3\x4b\x29\xaf\xe0\x55\x9e\x61\xc9\x7a\x8e\xee\x56\x80\xa5\xba\x46\xac\x06\x23\x78\x3d\xd4\xba\xdc\x12\x01\xf1\x62\xd5\x53\x74\x1a\x88\xa0\xae\x87\x46\xce\x6b\x98\x87\x8f\x6b\x47\xab\x33\x33\x7e\x7e\x2b\x8a\x5f\x8e\xc6\xb5\x9a\xd3\x7b\x41\x5c\xe4\x30\x50\xe7\x79\x03\x8b\xb2\x64\x8f\xda\xa9\xd4\x2c\x57\xe4\x04\xb1\xaa\x8e\x6c\x48\x34\x00\x9b\xca\x12\xbc\xc3\xf3\xc8\xc7\x19\x11\xb5\xd0\xfa\xca\x09\x98\xd8\xdb\x15\x51\x7d\xbc\xd0\xeb\x8f\x85\xd9\x89\x5f\x7e\x6b\x5d\x02\x19\x01\x69\xe8\x07\xa0\x74\xb3\x97\x16\x30\x21\xce\xca\x83\x66\x20\x03\xf1\x3f\x52\x4c\xe2\x69\x2f\x16\xa6\x0b\x0c\xde\xea\x14\xfc\xb3\xeb\x6a\x66\x77\x77\x2e\x9a\x46\x6a\x7e\x72\xc5\xb2\x01\x38\x49\x8c\xe4\x1e\x4f\xa4\x58\x35\x3e\xf8\x88\x79\x6c\x0a\x5e\xe8\x90\xc7\xe2\x9a\xfa\xe9\x73\x31\xcc\x6b\x9c\x5a\x42\x7a\xd8\xd2\x77\x68\x2b\x5e\x4b\xa8\x87\xf3\x66\x77\x32\x1a\x6e\x76\x9a\x5a\xd9\x89\xa6\x40\x73\xcf\xf6\x5e\x51\x8e\x5c\xeb\xd5\x1e\xb8\xf5\x8e\xa9\x7b\xa5\x7d\x3c\x6c\x87\xe9\x1e\x77\x57\xe2\x21\x40\xfd\xb6\xae\x31\xf9\x0b\x8d\xe9\xa4\xe3\xc1\x88\x5f\x64\x20\x0d\x01\x2a\x3e\x06\x6d\x19\xd3\x79\x13\xe2\x8a\x1e\x8e\x80\x83\x04\x83\x3f\xff\x35\xf3\xa4\x21\x40\x87\x33\x63\xe7\xfa\x5a\xbc\x70\x51\x7a\x92\xc3\x15\x66\x83\xf7\x34\x24\x86\x71\x77\x91\x38\xb2\xac\xc4\x5a\x8d\x87\x37\xd2\x1a\xf1\x56\x64\x8b\x31\x82\xbd\x9d\xaf\x06\xbd\x3d\x59\x62\x8f\x69\x08\x60\x18\x87\x97\x99\x88\x2c\x22\x28\x99\xbe\x3f\xe2\x94\x61\x55\x37\xc0\x85\xad\x57\xeb\xba\xfe\x9f\xff\x97\x19\xc7\x82\xfd\x9b\x81\x07\xfb\x57\xc6\xd1\xd3\xf4\x06\xc1\x4c\xf0\x90\xf4\xb2\x6f\xfe\x76\x76\xe1\x91\xe5\x65\x9a\x4d\xbf\x1d\xe3\x13\x57\xf6\x66\xa3\x21\xf8\x7a\x25\xc9\x6d\x02\x98\x6a\x66\x40\x40\xa9\x30\x76\xee\x01\x0e\xe2\xaa\x27\x74\x79\xb6\x01\x14\xc4\x5c\x7f\xdf\xb6\x78\x30\x1f\x5e\xd9\x11\xa0\x9e\x6a\xe7\x23\xe5\x79\xc3\xae\x0e\x65\xbe\x4f\x74\xe1\x93\xe8\x64\x51\x78\x08\xb2\xb4\x0c\xc9\x24\x65\xe9\xc5\x01\xea\xfc\xe0\xc0\xa7\x91\xbc\x99\xc2\xd4\x0a\x3d\xd1\xb4\x15\x3d\x73\x49\xa1\x53\xdf\x7e\x74\xc3\xf3\x69\x89\xa2\x90\x7a\x3d\x3a\x46\x59\x38\x1c\x3f\x23\x58\x4e\xe6\xa1\xd9\x59\x78\x33\x0d\x24\xe4\x44\x9f\x2c\x71\x7a\xd0\xf6\x34\x20\x12\xcb\x41\x88\xbc\x75\x06\x9e\x90\x0d\x66\x53\x00\x29\x1e\x8a\x18\xaa\x18\x6d\x6d\x4f\x30\x0d\xe4\x99\x2b\x45\xd5\x5c\x00\xab\xf0\x17\x50\xb1\x79\x47\x2e\xe0\x11\x1b\xf6\xb6\x23\x6e\x1c\xfa\x37\x66\xc5\x48\x30\x89\xfe\x16\x73\x59\x96\x90\xc7\x62\xec\x0c\x8c\x8a\xbc\xc7\x33\x96\x83\xd5\xaa\x20\x05\xaa\xbe\x43\xb6\xdd\xd0\x5c\x2f\x78\xbb\xbd\x8d\xcf\x23\x7c\xc8\xb0\xa5\xe8\x36\x2d\xcc\x81\x4a\x44\x5a\xd4\x85\xd3\xb0\xcb\x58\xea\xbd\x38\x17\xe6\xb8\x77\x8b\x65\xcf\x31\xbb\x39\x3e\x9f\x8f\xa2\x68\x7a\x64\x8b\x1a\x2e\xff\x7d\x36\x77\x83\xd7\x95\x52\x6d\x1f\x00\x9c\xe5\x3c\x23\x8c\xb1\x6c\x73\xa9\xb9\xac\x4b\x8b\x64\xfb\x16\xa3\x3e\x4f\xa9\x67\x9b\x5b\x33\x7d\x72\x76\x6c\x21\x63\x12\x3e\x47\x6a\x14\x07\x11\x4c\x27\x3a\x16\xaf\xe7\xc4\x18\x62\x33\xad\x30\xbb\x46\x49\x9d\x26\xb0\xc1\xc8\x8c\xe7\x58\x6d\x40\x13\x9f\xf6\xf5\x01\x49\x8c\x77\xd9\xa4\xd6\xf5\x10\x0d\x7d\x1a\x17\xa9\x89\x26\xea\xce\x8b\x8e\xcd\x3e\xa3\x60\xb2\xdb\x60\xb7\x37\xa0\x34\xfd\x0c\x29\x00\x41\x49\xe6\xa2\xef\xa6\x7c\x06\xed\x7d\xde\x5a\xab\xea\x34\x6b\x79\x3f\x48\x9b\x0c\x51\x5c\xae\x76\x13\x7b\xe8\x3a\xb7\x7b\x82\x24\x2d\x5e\xa4\x5e\xf2\xc1\x6b\xe6\x2c\xb6\xcb\xb2\xab\xd0\x39\x28\x3b\xcf\x07\x1c\xc7\xf8\xc6\xc0\x3a\xbd\x79\xa6\x8d\xf0\xb6\x3f\x3f\xd7\xf7\x51\x64\xb5\xd4\x79\x52\xab\xc7\x51\x7f\x90\x4b\xad\x37\x48\x88\xe9\x98\x79\xe6\xea\x86\xb5\x7a\x7a\xd7\x0e\xe5\x5a\x0f\x7b\xf5\x30\x91\x4d\xdd\x49\xf5\xdc\x98\x3a\x3a\x84\xb7\x1a\x74\x10\x59\xdc\xb9\x91\x9f\x29\x6a\xb8\xee\xce\xc4\x8d\xed\xda\x81\xd4\x35\xf3\xbd\x77\x5b\x30\x86\x09\xd2\xa7\x62\x7b\xbf\x7a\x60\x75\xde\xc2\x45\x11\x1d\x5d\x1e\xbd\x65\x81\x5e\x43\xf7\x9a\xe5\x2d\x58\xaa\x09\x08\x04\x47\x83\x40\xd2\x6b\x8e\x3b\x9b\x65\x95\xe8\x0a\x99\x72\x7f\x8f\xc7\xe1\x64\xe3\x85\x82\x9f\x91\x25\x0e\x22\x27\x24\x3e\xab\x2d\xab\xf3\x0d\x50\xed\x0f\x1b\x92\x04\x71\xa4\x13\x6d\x8b\x46\x79\x2c\x32\x21\x17\x8a\x61\x6e\x46\xe7\xa4\x9f\x26\xd8\xac\xc4\xfd\xeb\xc1\xa2\xfe\x37\x03\x8b\xe7\x1f\xe5\xc9\xf1\x67\x79\x02\x9e\x99\x5b\x0c\xeb\x38\x05\x6c\x36\xa7\x50\x50\x06\x0e\xdf\x06\x12\xc7\xc1\x80\x3a\x6e\xcd\x33\xc7\x07\x58\xb3\x57\xac\xb6\x24\xa6\x54\x18\x13\x42\x09\xba\x9b\x9a\x08\x25\x41\xaa\x70\xeb\xac\x54\x5d\x1d\x7a\x8d\xd0\x4a\x22\x76\xf0\x56\x61\x81\x95\x55\x5a\xa9\xa7\x1d\x6d\x89\x4b\xbf\x93\x5c\xbe\x0f\x2d\xc1\x9c\xfc\x0e\x4d\x52\x52\x05\xbb\x26\x7a\x01\x40\x1b\x6d\xb0\x12\x4b\x09\xfb\x22\x84\xd9\x61\xf9\xf6\x25\x6d\x7c\xcb\x61\x1b\x8e\x0f\x22\xb6\x29\x03\x2f\xbb\x78\x26\x02\x15\x28\xa2\xec\x2c\xc7\xd2\x97\x8a\xe5\x32\x8b\xd6\x2c\xe9\xe4\x72\xf4\x12\x63\x5b\xcc\x1e\xfd\xc5\x1d\xdf\x95\x1a\x49\x78\x5b\x48\x8c\x7d\x34\x11\x39\x6e\x45\xbe\x98\x19\xa8\xc0\x01\xf6\x91\x64\x81\xbe\xbc\x94\xdb\xaf\xb2\x7e\x29\xf8\xb8\x53\xc5\xba\x8d\x84\x71\xce\xca\x24\xed\xcc\x46\x65\xcc\xbf\x0c\xc5\xb7\x44\xd9\xc2\x79\x19\x73\x70\xcc\xde\x9b\x1f\xcb\xb6\x8c\x5c\x11\x91\xe7\x2c\xcb\x1a\x0a\xc1\xee\x5e\x20\x38\x5f\xda\x4b\x3a\xf1\xb0\xd0\x71\x75\x2f\xfb\xb8\xe6\x53\x70\x47\x8e\xc4\x15\xe5\xd2\xfe\x9b\x46\x3e\x6f\xd5\x88\xdf\x55\x61\x71\x13\xcd\xaa\xcc\x02\xcd\x22\xd2\xd3\x0b\x7c\x34\xe8\x32\xb9\x63\xe5\x71\x94\x48\xef\x2d\xd0\xcc\xbb\xe5\xb7\x39\x37\xa7\x28\x0c\x3a\x4b\xf2\x06\x81\xa3\x66\x8c\x02\x8e\xae\x33\x82\x46\x18\x70\xe3\x1e\xe0\xe0\x73\x33\x67\x74\x8c\x1e\xb5\x5c\x5b\x54\xa0\x3b\x0c\xc7\x91\xb5\xf1\xd0\xa3\xe6\xd8\x28\x24\x44\xc4\x28\xc8\x4b\xd2\x52\x4f\xae\x0a\xc5\x67\x9c\x79\x57\xf5\x5a\xbe\xf9\xd5\xb8\x8e\xad\x98\xb0\x0f\x27\x82\x4a\x01\xd4\xe9\xab\xa9\xf7\xec\x74\x72\xb1\x31\xf8\x85\xc9\x1a\xc9\xad\x18\xa6\x75\x3f\x33\x5a\xd2\x3a\x5d\x17\xd2\x61\xb8\x7e\x87\x64\xfa\x9b\x22\x94\xc0\xdb\x14\xc1\xf8\x6f\x16\xf8\xf9\xb3\xd4\x4c\xa6\xca\xf0\x90\xbc\x26\x96\xfd\xdb\xdc\xd2\x7c\xda\x25\x72\x25\xf4\x6f\x17\xce\x94\x19\x4c\x7b\xa4\x1b\x92\xf7\xbc\xb0\xd3\x5f\xce\xe8\x97\x85\x57\x00\xc9\x43\xbc\xc3\x89\x18\xd8\x1d\xb4\x19\x8a\x71\x62\x42\x62\x80\x70\xe4\x7e\xec\xf9\xb4\x7f\x44\x3a\x32\xc2\x35\x7a\x35\x60\x07\xd9\xed\x68\x92\xea\x8a\x3e\x38\xa8\x81\x2f\xe0\xf3\xce\xb0\x8d\x11\x6a\xd0\xe5\x11\x3a\x71\x4c\x51\x2e\x53\x4e\xee\x2c\xc8\xd9\xc8\x21\x5d\x87\x7f\xf5\x28\x0c\x8b\xa4\x1e\x11\xca\x02\x30\x2e\x2b\x92\xa9\xf8\x9b\x91\x28\x83\x25\x93\x2d\x14\x60\xb0\xb9\x29\x93\x2b\xbc\x43\x92\x9d\x98\x8b\xaf\x4e\xe6\xb0\x29\xd3\xd0\x78\x15\x6a\x3f\x6e\x5a\x1c\x6e\xca\x68\x7e\x8b\x7e\xef\xe6\x0a\xae\x47\x98\x7c\x19\xdc\xc0\x2b\xa7\x71\x43\x6e\x07\xc6\x61\x2c\xf5\x02\xf4\xd5\xdf\x13\xd9\xdf\x9a\xe9\x2e\xfc\x9c\xd2\x69\x2b\x6a\x6c\x32\x89\x80\x9b\xbb\xc2\xea\x20\x25\x3c\xa2\x2e\xc5\xb2\x35\xf3\xd2\xfd\x47\xbf\x3b\x27\x10\xce\xbf\x18\x3c\xe6\xa2\xfa\xf7\x02\x8f\x16\xff\xbb\x4c\xe9\x8f\x2d\xf8\xa3\x4c\x19\xb3\x13\x15\x2b\x01\xd6\x5c\x37\x58\xa2\xa4\x29\x19\xdd\x64\x03\x37\x08\x5f\x32\x7f\xe9\xa0\xb7\x08\x2d\x02\x01\x3d\x3b\x20\xc5\xde\xc5\xb3\xc5\x6a\x9d\xcd\x82\x55\x4c\x83\x33\x16\xfc\x40\xe3\x92\x14\xea\x3c\xfc\xfd\x21\x3f\x0b\xc7\xc9\x0c\x37\x46\x3f\x5e\xea\x91\xb7\xa7\xca\xca\xc9\xee\x9b\x0c\x49\x31\x13\xbb\x85\x8a\x12\x0f\xae\x71\xb1\xdc\x67\xe9\x04\xb0\xcf\xcc\x35\x82\x20\x9c\x0f\x4f\xca\x8f\x6e\x58\x26\x71\xea\x57\xf5\x62\x6d\xd6\xea\x78\xbc\x8f\x67\xbb\x9d\xaa\x74\x90\xe3\x47\xa0\xcb\xb7\x89\x14\x4b\x19\xc9\x0f\x28\x02\x96\xf1\x16\xee\x05\x54\x7b\xdc\x43\x8f\xed\xca\x41\xf3\xcc\x15\x0b\x41\xd7\xb8\x03\x36\x84\xa5\x9b\xd0\xf1\xe2\xef\xa4\xf4\xf7\x67\xdc\xc1\xdd\x20\xe2\x6d\x14\x79\xc6\xb7\xdc\xcf\x89\x87\x7e\x15\xb9\x45\x98\x6d\x1f\xbc\xdb\x06\x4e\x3a\x5d\x99\x18\x33\xe7\x01\x30\x48\xe9\xec\x44\x6f\x75\x90\xae\x8d\xfd\x71\x63\x79\x20\x80\x47\x18\x02\x5e\x63\xb3\x34\xfc\x68\x06\x54\x48\x28\xe6\xf8\xa6\xe1\xcb\xc7\x36\x7d\x71\xdc\x6f\x95\xbd\xf3\xe9\x8c\x7b\x91\x22\x42\xcf\xfc\x3d\xe1\x09\x9d\xbd\xee\x49\x13\x9b\xaf\xc3\x64\x62\xf2\xcc\x39\x4a\xaa\x9c\xca\x45\xea\xc1\x3c\x1b\x56\xed\x90\x2b\x89\xeb\x0c\x93\xe1\x34\x4b\xd7\x1c\x2b\x7b\x5a\xbd\x96\xa3\xbb\xd1\xd8\x68\x68\x23\x8f\x60\x5c\x65\x50\x53\x46\xfa\x72\x22\x39\xa6\xbe\x30\x7d\xd0\xe7\x19\x41\xa8\xaf\xc4\x8a\xa2\x10\xb9\xa1\x8e\x93\xb5\x28\xc8\xf8\xda\x51\xfa\x73\xe7\x29\xb2\x7a\xa8\xf0\x4b\xcf\x7a\xfc\x98\x1b\xc1\x0a\x17\x8c\x9d\xfa\x3e\x76\xce\x63\x3b\x5b\x29\xa2\x2c\x98\x05\x24\x50\x75\x76\x0a\x29\x26\x07\xf3\x36\x92\x77\x8d\x06\xeb\x21\xd2\x27\x9e\xd0\x90\xab\xb6\xf7\x6f\xb7\x0a\xcb\x29\xaa\xd2\x81\x73\xd0\x6f\xb4\xd9\xaf\xf9\x89\x66\x50\x2d\x10\x78\x10\x47\x0a\x0c\x7f\xf2\xe6\xb7\x5f\xf3\xc6\x13\x6c\x05\xfe\x08\x68\x6b\x43\xd4\xa1\x7f\x20\x94\x65\x52\x00\x9f\xf3\x92\x48\x7d\x25\xb8\x9e\x83\x86\xd9\x6e\xdc\x03\xb4\x0e\xeb\xac\x30\xee\xe8\xcd\x76\x12\x47\x2f\x54\xcc\x1b\x49\xeb\x15\x6b\x08\x42\x41\x75\xd2\x0e\x9e\x0e\x9a\x0c\xa4\xad\x8a\xa6\x98\x9d\x42\xdc\x86\xc8\xd6\x72\x15\x45\x55\xf3\x15\x37\x6c\x36\x83\xd7\x6a\xa3\x07\x84\x80\xbf\x64\x54\xc5\xd5\xef\xbf\x04\x26\x20\x69\xa6\x4f\xc1\xc8\x44\x8d\x6a\x5c\xd0\xdc\x8a\xf8\x10\xcf\x20\x1c\xa7\xf1\xf5\x42\xa9\xb6\xb0\x0b\xd3\x0d\x86\xe9\xdc\x7a\xb4\x00\x4f\x55\xdb\x7f\x7d\x50\xef\xff\x5e\x41\x5d\x1e\xff\x19\xd4\xab\x11\x74\xb0\x22\x0b\x42\x00\xb6\xe4\x49\xfe\x10\xb4\xa4\x0e\xa9\x9e\x4a\xc9\xb1\x6f\xb4\xf9\xf1\x7d\xdf\x38\xad\x77\xde\x86\xe3\x0a\x59\x8a\x9d\x41\xbd\x84\x03\xb7\x5d\x82\xd3\x9c\x5b\xcf\xcd\xd1\x9a\x3b\x0e\x34\xfb\x4c\x9a\x68\xe6\xaa\xbe\xb5\x24\xdc\xb5\xcc\x79\x2c\xa1\x4d\x13\x59\xc6\x79\x11\x83\xd2\x58\xc8\xa1\x1d\x25\xa2\x8d\xd6\x37\x49\xc1\x24\x0a\x5e\xe3\x95\xf4\x8e\xb3\x33\xb7\x79\xe5\xfd\x4a\x13\xc1\xf4\x2a\x42\x43\x82\x05\x76\x90\x67\x50\x80\xd4\x0b\x50\xb8\x0d\x64\xb1\x17\x63\xf5\xd6\x37\x0a\x31\xa9\x89\x1d\x91\xfa\x16\x2f\xac\x86\x24\x4f\xeb\xcd\x5e\xd3\x9c\x18\x7b\xae\xb0\x69\xcf\x15\x5f\xae\xc5\xf6\x43\x7f\x58\x3e\x90\x3c\xa6\xa2\xc1\xc1\xe0\xe1\x1b\x32\xc3\xa8\xce\xdb\x49\x33\x15\xf2\x63\x16\x78\xc8\x39\x07\x9d\xd6\xba\x3d\xb5\x31\x4b\xd0\x01\x64\x65\xc0\x98\x64\x83\x96\x42\xdd\x86\xa2\x1b\xd5\x4c\x06\x45\x39\x67\x76\x9c\x49\xa7\x50\x4c\xec\x48\xcc\x0e\xa4\x9e\x31\x05\xa5\xe7\x3c\x6f\x4f\xa9\xda\x59\xeb\xc4\x57\x72\x16\xb2\xc3\x3d\x66\x51\x98\x92\x94\xc9\x6d\xb9\x30\xe2\xfa\xc5\x15\x99\x1d\xe8\xf0\x5a\x1b\x18\xec\x40\x68\xa9\x6e\xb0\x02\x3a\x20\x4c\xd4\x0e\xda\x76\x56\x11\x0b\xc4\xfa\x1c\x3d\x81\xa1\x98\xa5\x4c\x85\xa1\x1d\xa2\x2c\x71\xc3\x17\x1c\xf6\x69\x07\x4d\xd8\x61\xfb\xe7\x10\x4c\x11\xeb\x1e\xfb\xc9\xeb\x9c\x85\xb9\x5f\x68\x6d\x97\x71\x94\xda\xff\x52\xfe\x50\x15\xa9\x01\x00\x3b\x8f\xe9\x36\xb9\xa3\x2e\xd6\x50\x12\xb8\x6c\x28\x2a\x92\x1e\x92\x0f\x9a\xee\x8e\x98\x52\xdf\x3b\x12\x7b\x87\x6b\x6e\xec\xc8\x81\xfc\x97\x5f\x83\x48\x6e\xc6\x57\x02\x67\x96\x3d\x26\x06\x55\x46\x3a\xb8\x06\x6f\x83\xc4\x71\xa7\x6d\x50\x6a\xe4\x3d\xfc\x20\x9f\x87\x52\xbc\xd1\xfd\xe8\x99\xff\x88\x5e\x4d\x5b\xb6\x55\xd6\xd4\x7d\xf0\xf7\x17\x81\xe8\x1d\xb9\x27\x43\x64\xfd\xc4\xfc\x75\x39\x38\xeb\x07\x5d\xdb\x97\x6e\x3d\x40\xf3\x84\xaa\xa2\x79\x48\x12\xe1\x0b\x97\x79\xaf\xea\x4b\x86\x46\x92\xb8\x45\x85\x2f\x7b\xf3\x6a\x81\xe8\x3e\x3f\x80\x31\xde\x52\x17\xea\x91\x66\x78\xd3\x97\x9a\xe1\xf0\xa1\xf8\xbc\x10\xdc\x82\xc4\x98\xdc\x83\x80\x5b\x2c\x08\xa2\xf8\x2f\x25\xfd\xe6\xe2\xf8\x37\x0b\xbc\xe5\xaf\xc0\xeb\x3f\x58\x51\x60\xc1\x79\x40\x80\xe4\x52\x42\xed\xd7\x37\x69\x55\x2a\xd7\x84\x85\x71\x32\xd6\x11\xf9\x11\xda\x43\x6b\x17\x59\x8f\xbe\x0f\x5c\xb3\xfc\x5a\x90\xf0\xe3\x7e\xc2\xe1\x07\xc4\xc2\xa4\x99\xad\x52\x37\x89\xf6\x3c\xf8\x74\x0b\x8b\xa2\xc4\x69\xeb\x31\xb5\x26\x8d\x46\x0b\x15\x08\x7a\x52\x00\xea\x93\x56\xfa\x53\x05\x43\x97\xe8\x71\xb4\x27\x13\xbc\xe1\x8b\x0d\xe6\x45\xb7\x4d\xb3\x71\xa3\x58\xb6\x5e\xbe\x86\xa6\x87\x42\xfc\x56\x3d\x7e\xf6\x60\x87\xb3\xb9\x54\x47\x8e\xe4\xfe\x7c\xe4\xf2\xf1\x3c\x10\xd1\x17\xf1\xe2\x39\x20\x7b\x7d\x9a\xe0\xfd\x3e\x85\x1f\x99\x8f\x78\x01\x73\xee\xac\x6e\xe1\x8d\x5f\xbb\xba\xb6\x52\x9b\xb3\xf8\x46\x06\xc5\x6f\x5a\x10\x92\xe9\x63\x01\x75\xbe\x60\x35\xc9\x7c\xe3\x7a\x32\x45\x68\xae\x56\xad\x23\x1f\xa2\x60\x6d\x01\xb3\xd0\x5d\x97\x6f\x6d\xbd\x07\xb8\xe9\x3a\x9e\x9d\xfa\xcd\x28\x7c\xcd\xd0\x45\x02\xe8\x00\xdf\x9f\xbc\x63\x71\x5b\x6f\xd4\xec\xee\xd6\x43\x6e\x58\x2b\x23\xdd\xca\x7e\x18\x35\xc5\xf4\xd2\x7e\xfe\x0c\x33\x30\x5c\xa3\xd7\x57\x01\x70\xa4\x61\xae\x87\x6b\x60\xc8\x53\xb1\x18\xed\xfa\xa5\x9d\x0b\xad\x6a\x1f\x74\x60\x2c\x97\x10\xeb\x2b\xf9\x10\x6a\xda\xb0\x55\xda\xde\xd1\x2b\x43\xd5\x0c\x71\xaf\x9e\xfa\xd9\x69\x3c\x6c\x64\xff\x82\xe0\x51\xe8\x42\x50\xa5\xf7\xce\x76\xc2\x13\x88\x52\x18\x65\x3e\xc9\x3c\x5e\x8a\x21\x32\xa2\x1b\x95\xc5\x8f\x57\x81\xde\x5a\x46\xba\x8c\xa1\x27\xb7\x41\x4d\xc7\x4e\x3d\x2a\xb8\x08\x25\x09\xa2\xf6\x68\x23\xa5\x74\xa1\x3c\x40\x9f\x7b\x86\xe2\x11\x94\x29\xe6\xcc\x90\xee\xd8\xc5\x9e\xbc\xcb\x50\x85\xff\xc0\x31\xf0\x7e\x90\xb2\x21\xea\xb8\xb3\x07\x4f\x41\x3b\x05\x6e\xd2\xfb\x45\xbb\x2e\xfa\x3c\xfe\x06\x0e\x97\x55\x01\x2b\x0f\x74\x81\x52\xfa\xd5\x17\xbc\x1f\x2b\xa7\x1c\xb2\x33\xd4\x03\x59\x76\x40\xc4\x6a\x01\x2f\x63\x4b\xf1\x5d\x82\x39\x83\xdd\x16\x6d\x9b\x18\xd6\x69\xbc\x44\x42\xd2\x7c\xd6\xca\xd7\x22\x87\x03\x41\xe3\x4e\x82\xe8\xb0\xdc\x13\xcb\xd6\xdd\x0f\x25\xb5\xbe\x80\xbd\xa6\x39\xf0\xf8\x63\x15\x71\x00\xcf\x4a\x3c\xa6\xd6\x07\x07\xb1\x66\x04\x26\x00\xc1\x9a\xe8\xaf\x42\x62\x8d\x7f\x6d\x8b\x6e\x3e\x96\x7f\xaf\xc0\xcb\xd5\xbf\x03\x6f\xdf\x2f\x06\x16\x82\x67\x03\x7e\x5d\x5f\x64\x5b\x25\x6a\x21\x0f\x23\xc2\x96\x78\xae\xa0\x27\x48\xd5\xcb\x00\x6b\xec\x7a\xee\xa4\xde\xbd\x6f\xde\xf7\x6b\x31\x52\xe8\x54\xc1\xe9\x85\x26\xe9\xc5\xa1\x49\xbc\xf0\x10\x97\x62\xb5\xd6\xa5\x27\x61\x72\x40\x3b\xed\x37\xb6\x1c\x80\x8f\xbf\xe1\xbb\xc0\x9d\xa4\xf1\xfb\xe3\xce\x3c\x77\xa6\xfc\x43\x93\xd2\x65\x3b\x4c\x93\x3f\x08\x74\x37\xeb\x57\x22\xe6\xfe\xb3\x6d\x04\x9a\x11\x1c\xff\x1c\x54\x60\x9e\x4f\x60\x38\x80\x38\x3f\xff\x86\x51\x09\xf3\x45\x87\x49\x7b\x06\xe4\xa2\x43\x49\xb2\x04\xd2\x58\x6b\x7b\x48\xe5\xba\x79\x67\x1d\xe4\x10\x9e\xd1\xe4\xd1\x7c\xeb\x7a\x99\xe0\xaa\x1c\xae\x5a\x47\x06\x2d\xb1\xb6\x7f\x3d\xf0\x73\x19\xed\xb2\xe6\x83\x2c\x67\x4f\x16\xea\x9f\x22\x6f\x5c\xe5\x30\x15\xbb\xb2\xa9\xe6\x38\xbc\xe6\xe5\x0e\x23\x3c\x05\x55\x8e\x2c\x63\xd6\x00\x12\x20\xdc\x65\x1a\x7d\x5f\x7b\x2b\x3b\x6e\xdc\x23\xb2\xd4\x78\x76\xe5\xac\xb2\xd1\x2d\xac\x8c\x9b\xef\xbb\xe6\x33\xaa\x20\x6d\x63\x2a\x6d\xdd\xaa\xc1\xdf\x65\xf6\x93\x8c\xb1\xc7\xfb\x68\x03\x12\x06\x8b\xfb\x8c\x1d\x1e\x01\x0f\x89\xae\x34\x23\xa4\xbf\xcd\x05\x4d\x1e\x16\xd4\xe1\x54\x16\x0f\x6d\x69\xd5\x69\x19\x20\x05\x1a\x6f\xa5\xe4\x5b\xed\xfc\x5d\xdf\xdc\x34\x6a\x0f\xdb\xe7\xac\xa1\x11\x7e\x13\x6e\x92\xf8\x6e\xc0\x6b\x5b\x8f\x83\x09\x14\x2c\x7a\x02\x80\x93\xce\x78\x84\xf9\x47\x26\xc4\xb1\xb2\xb7\xfb\x27\xe9\x98\xcd\x40\x50\x7b\xf8\xfb\x49\xc4\x93\x13\xcd\x90\xdf\x19\x3e\xa3\xae\x95\xc1\x3f\xe0\xf6\xb2\x6a\x9e\x86\x9f\x67\x7a\x32\x56\x45\x90\x03\x6c\xbd\x52\xe1\xdb\xde\xb9\x6d\x5b\x90\xef\x6b\x92\xe7\x1c\x7b\xe8\x6f\x82\xca\x5a\x80\xcc\xd6\x72\x19\x93\xce\x1c\x08\x26\x79\x58\xdf\x5a\x92\xd3\x07\x1b\x11\xf8\x0d\x75\x2b\x92\x03\xdb\xe3\x0b\x91\xac\x8a\x19\xb0\xad\x75\x3e\x75\xdb\xa7\x9a\x6a\xb1\xf1\xb8\x79\x96\x91\x27\xb4\xb9\x88\x1d\x6e\x2d\x67\x98\x9b\x8d\xe1\xfd\x64\x88\xa3\x04\xfe\xdc\x98\xff\xd2\xb4\xf1\xf8\x37\x4b\x1b\xab\xdf\xdf\x69\x63\x0f\x6f\x7f\xf6\xb9\x3d\xea\x1b\xd3\x4c\x2d\x78\x8d\x45\xea\x41\xb8\x13\x5a\x78\xd4\xa4\x65\x03\xc1\x59\x42\x04\x5f\xeb\x83\x8d\xab\x3a\x5b\x84\x23\x3e\xcf\x4e\xab\x00\xa6\x12\x34\xb7\x28\xac\xc2\x92\x64\x6e\xc8\x92\x90\xbb\x5e\x2d\x4a\xdb\xce\x47\xc6\xa6\x5b\x9a\x9e\xf4\x0a\xd2\x28\x49\xe2\x67\x99\x0b\x24\xec\x2d\x9b\x44\x99\x75\x55\x25\x45\x01\x04\xdd\xc8\x96\xc5\x08\x74\x85\x7e\x7e\x38\xf1\x9a\x29\x5f\xcd\xb0\x57\xab\x7d\x83\x9b\x01\xcd\xd7\x1b\xed\xae\x58\xc4\xaa\xb0\xf0\xca\xeb\x4e\xde\x10\x7e\x90\xe6\xf5\xe3\x95\x66\xa9\x5a\xc6\x9e\xca\x0a\x4d\xcd\xa8\x9f\xcf\x9b\x6f\x36\x1e\xc1\xe4\xe1\xf6\x58\x83\xc3\x66\x42\xa4\x8c\x9b\x06\x58\xc1\xa8\x38\x1b\xf5\x12\xf3\xde\xd9\xb4\x4a\xab\xa1\x4e\x4b\xe8\xc1\x59\xc7\xa4\xc8\x64\xa9\x6d\xef\xea\x5a\x29\xb2\xac\x71\xde\xb1\xba\x7b\x1c\x8a\xb6\x73\xfe\x6a\x9e\x66\xd9\xa7\x6b\x7b\xaf\x75\x57\x0c\x66\x98\xbe\xe6\x1c\xf6\x0b\x2b\x08\x60\x23\x81\x8d\x49\x89\x1d\xa1\xa7\x96\xe5\x60\xed\xe1\x20\x63\x4f\x21\x57\xde\xe2\x7b\xb9\xdf\x60\x29\x74\x22\x48\x27\xff\xdc\xc5\xc9\x71\xed\xe1\xa1\x71\x83\x5e\x2d\xf7\xc3\xba\x2d\x5f\x31\x5b\x25\x78\x5d\x2e\x08\xf2\xe8\x8e\x93\x61\xe2\x36\xc3\xb1\x82\xb3\x43\xa1\x72\xf0\x58\xc9\xdb\x1e\x84\x40\xa4\xe5\x4b\x2b\xf9\xd0\xbc\xe4\x9e\xad\xdd\x8d\x96\x86\xb0\x17\x8a\x5b\xc3\x11\xab\x9e\x25\x87\x9a\x78\x44\xf9\x16\x1f\x61\x0d\x8c\x10\x4a\xa7\xc0\x64\xf5\x48\x1b\xa9\xa7\x40\x5b\xec\x63\x23\xeb\x1b\x19\xef\x81\x82\xbd\x8d\x28\x14\x1e\x19\x9c\x8e\xbb\x11\x68\x48\x99\xb3\xde\xba\x38\x63\x79\x55\xd3\xe3\x63\x48\x7b\x2e\x5f\xda\x99\xe2\xce\x3f\xe7\x90\x07\x3b\x70\x77\xf3\x91\xb7\x22\xbd\x5e\x27\x9d\xc3\x19\xe4\xbe\x3d\x1f\xb0\x27\xca\x27\x10\x7a\x48\xff\x88\x16\x84\x86\xb3\xfb\xa4\x63\x86\xbc\xf2\x17\x1d\x11\xa0\xf6\xd3\xc0\x85\xb1\xa3\xd9\x7a\x9a\x8d\xd3\x3d\x2b\x5a\xab\xf3\x4a\x74\x1a\xed\xe5\x7e\x77\xe8\xf1\x5a\x50\x5e\x32\xbe\x40\x33\xc5\xe1\x88\xe2\x01\x57\xf4\x97\xb9\x19\xd8\x51\xac\xd0\xa2\xf6\x8c\xe7\xbe\xba\xc8\x0a\xcd\xb1\x26\x2f\xa4\x00\x20\xbd\x3c\x6b\xd2\x20\xcb\xd6\xcc\x5d\xf1\x03\x17\x06\x4e\x6a\x32\xff\xea\xd3\xec\xdf\x2c\x8d\x2c\xc4\xbf\x03\x91\xa2\x37\x08\x61\x92\x6a\x51\xa1\x36\x1c\x49\x61\x6d\x42\xeb\xb9\xc9\x82\x67\x85\x62\x69\x39\x01\x76\x67\xe1\xe7\x16\xc5\x15\xd4\x99\x52\x3e\xa0\xbb\x93\x65\xd9\x2c\xcb\x2b\x62\xba\xf5\x39\x27\x66\x3c\x77\xb2\x40\x72\xed\x35\xca\x79\xdf\x41\xe8\x71\xe1\x31\x40\x3b\x8c\xa6\xd5\x00\x78\xdf\x97\x2f\xef\x2f\x19\x5f\x91\xc4\x4a\x13\xa7\x50\x70\x07\x6c\x0b\xb0\x3d\x41\x51\x4a\xf5\x57\x6c\x87\x13\x2a\x30\xcd\xd5\x63\x0f\xda\x0d\x4a\x67\xcb\x30\xc4\x2b\x85\xd4\xe4\x5e\xeb\x4f\x98\xbf\x9a\xf9\x5b\x94\x87\x0a\x3a\xfc\xc4\x3f\xaf\xcb\x69\x69\xbe\xa8\x5f\xdb\x70\x2e\x47\xf1\x00\x69\x4d\x98\x9a\x7f\xe5\x25\x95\xbe\xe4\x09\x0a\x87\xe5\x87\xa6\x1e\x2c\xcc\xfb\x76\xdc\xc2\x2d\xc7\x09\xbd\x32\xc2\x82\x38\x70\x88\x30\x42\xed\x7d\x44\x55\x3b\xc5\xbd\xf2\x75\xad\x05\x75\x43\x77\xf0\x1c\xee\x1f\xd5\x20\x29\x52\xe0\x18\x2c\x30\x56\x5d\x0a\xce\xf6\x85\xb8\x0f\x6d\x18\xdd\x62\x14\xea\x63\xc5\x6f\xec\xdf\x7d\x7e\x2b\x7d\x79\x57\xab\x03\x3b\x87\x63\xb2\x28\x85\x7f\xb9\x02\x63\xe2\x76\x38\xe5\xb3\x7b\x19\xe1\xb9\xef\xfe\xc3\xc4\xac\x02\x44\xa2\x94\x6f\xc6\xcf\xe9\x5a\x95\x4c\x66\xc4\x5b\xce\xd7\xf1\x09\xd4\xb9\xd0\x95\x18\xde\x9c\xcb\x54\x9a\xe5\xf5\x4d\xe3\x0e\xaf\x57\x67\xf0\x2d\x7e\xbe\xf2\xdb\xec\x71\xa6\x23\xee\x78\x0d\xa9\x92\x9b\x49\x81\x6f\x8c\x79\x12\xe4\x25\x02\x8a\x1f\x47\xd6\x81\x44\x53\x3c\x5a\x97\x33\x79\xf5\x19\x04\x37\x74\xce\x5c\x76\x71\x90\x84\x25\xbd\xf0\x33\x1d\x41\x81\x66\x5d\xf0\x30\x3d\x0a\x0c\xc8\x2e\xab\xa0\x58\x1f\x9b\x0f\x19\x81\x6a\x56\xbc\x37\x42\x59\xe7\x80\x24\x22\x7f\xcf\x33\x03\xa6\x06\x34\x28\x4b\xc6\xae\x69\x61\xc1\x76\xbf\xa3\x73\x18\x4a\x5f\xf8\x6c\x00\x8d\xc0\xce\x5a\xe9\xab\xef\x13\xa5\xa5\x24\x35\x3a\x7c\xf7\x80\x25\x45\xca\xb1\xdd\x67\x30\x10\xec\x95\x8d\x92\x00\x33\xfe\xe0\xca\x06\xf7\xb3\x9f\xd8\x8c\x98\xca\x2a\x74\xe2\x6e\x80\x08\xff\x31\x06\xb5\x8a\x34\x33\xda\x00\xed\xa2\xfc\x84\x61\xfa\xe0\x2c\xcb\x47\x15\x31\xf2\x5f\x4d\x8c\x2c\xff\x6e\x6c\xe7\xd8\xfc\xcd\x76\x42\x7f\xb2\x9d\x89\xed\xdb\x28\xbe\x26\x4f\x1a\x11\xfe\xc0\xa7\x8b\xa9\x45\x52\x56\xcf\x88\xd8\x8b\xd4\xc6\xb8\x2c\xb1\x65\x73\x7c\xee\x15\x24\x82\xcd\xbb\x22\x01\xd6\x6f\xe2\x7a\xd6\xab\xc7\x96\x27\xf3\xea\x98\x27\xb8\xec\x7e\xc8\x29\xd4\xba\xb4\xaa\xfd\x54\x72\xbc\x4e\xc0\x80\x8e\xf5\x27\xf5\x32\xfa\x50\x34\x45\x76\x1f\x3f\x4d\x23\x22\x7a\xde\xda\x60\xd3\x0e\x85\x01\xfc\x66\xe2\xd7\x11\x24\x16\xa5\xe8\x19\xb5\x51\x56\xed\xa2\x93\x01\xdd\x26\x75\x54\x7c\x65\x23\x24\x0f\x57\x12\xba\x4f\xa3\x2e\xdb\x32\xfa\x83\x34\x9e\x23\x60\x19\x23\x7e\x9a\xf6\xcf\xcc\x8e\xae\x47\x07\x0a\x29\x5f\x0a\x00\xa8\x39\xc2\xd4\x0b\x94\xc1\xbb\x60\x30\x9c\xa8\x91\xfe\x92\x69\x5a\x7c\x65\xb3\x3d\x99\x0f\x29\xee\x6a\xc8\x4c\x2a\x89\xa8\xcf\xd0\x70\x69\x06\x39\xa3\x72\x7a\xa6\x59\xa4\xfd\x75\x6a\x97\x3b\x86\x45\xc0\x3a\x25\xd0\x5f\x8e\xae\xe4\xef\x24\x0d\xdb\x16\x06\x10\x6f\x33\x22\xb2\x04\x48\x55\x4d\xb7\x95\xe5\x9a\xe8\x28\x62\x34\xba\x1b\x44\x6a\x09\xcb\xfa\x2c\xc1\xec\x08\x4b\x3a\xa4\x23\xb0\xbd\x67\x70\xd1\x97\x8b\x54\x30\xec\x96\x51\xf7\xef\x80\x77\x0d\x2a\xb0\xfd\x54\xc7\x04\xeb\x21\x40\xe1\x79\xc9\xad\xd6\xb1\x81\x4e\xbc\x2e\x3b\x27\x07\x2a\x89\x2a\x13\x4e\x49\x1b\xd7\xe1\x84\xaa\x76\x26\xe5\x6c\x84\xbe\x3e\x2c\x53\x00\x0a\xe9\x49\x1e\x81\xef\x60\xbe\x69\x85\x37\xff\x01\x70\x12\x17\xc1\x22\x73\xab\x6f\xa8\x4a\xf2\x0a\x82\x87\xa7\x71\xec\xec\x2d\xd2\x27\x83\x24\xb4\x29\x2e\x1d\x72\xa8\x4d\x40\x3a\xda\x6c\xc9\x9d\x87\x5d\x57\x3a\xa3\xdb\x67\x78\x02\x0f\x1f\xda\x37\x22\x38\xaf\x28\x74\x32\x5f\x37\xd9\x92\x98\x23\xfc\x6a\x61\x38\x25\x9d\x6f\x95\x5b\xb9\x4c\x98\x40\xc4\xce\xa8\x4b\x9e\xdd\xdb\xbd\x15\x47\x8c\x6f\x78\x7c\xde\x39\x42\xcf\xa4\xab\x75\x12\x40\x0b\x6e\x79\xce\xe8\x87\xa8\xe3\xa8\xae\xa0\x1b\x64\xae\xf0\x8f\xc7\x40\x23\xfe\xa9\x69\x94\x88\xe5\x06\xd8\x71\xab\xe6\xc4\x8e\x2a\x42\x9d\xa0\xc0\x69\x27\x3f\xd9\x67\x72\x46\x36\x00\xde\x17\xa8\x7a\x32\x60\xce\x7b\x53\xee\x1c\x2e\x40\xda\xdc\x97\x3a\x93\x57\x18\xf2\x13\x8b\xab\x46\x0f\x97\x7e\x31\x8f\x09\xe4\x25\x06\x0f\x4e\x28\xcd\x44\x19\x25\xa2\xe9\xfb\xb8\xf4\x8d\x98\x7e\x4c\xd4\x2b\x2a\xb9\xbe\xca\x68\xef\x4e\x00\x93\xcf\xbc\xd9\x7a\xb0\x2c\x59\x55\x91\xda\x7e\x6b\xe8\xba\x71\x08\xca\xcd\x17\x1d\x81\x37\x46\xf7\x18\x0d\x90\x3b\x9a\xd8\x45\x12\x56\xb0\x4a\x8c\xb7\x8d\x86\xd5\x4f\x87\x27\x8b\x94\x61\xed\x34\x8e\x15\x3e\x44\x45\x08\x46\xdd\x5f\xb2\xab\xbc\x75\x76\x2e\xcb\xa4\xeb\xda\xf6\xfe\xe2\xce\xe0\xba\x16\x10\x58\x5c\x34\x99\xa3\x7a\x7a\xd0\x15\xe3\x24\x0c\xf6\x51\x59\x4c\x4f\xfe\x9e\x51\xff\xda\x93\x77\x69\xfe\xcd\xea\xc8\xc6\xfc\xbb\x8e\x1c\x8e\x4d\x80\x84\xe0\x01\xc1\x5f\xc6\xa7\xb1\xb9\x5d\xbf\xaf\x50\xfa\x2c\xb1\x62\xa9\x7e\x12\x67\xe0\x34\x44\x51\x12\x42\x38\xab\x47\x2a\x58\x8a\xb9\x30\x8c\x29\x5c\x8a\xb1\x31\x4c\xb5\x6c\xd6\x05\x84\x7a\x86\x6c\x6e\x08\x34\xdf\x8f\x1d\x6f\xec\xfd\xe4\xb0\xfa\xf1\xcc\x3c\x75\x73\xe0\x12\x95\x91\x57\xf5\x04\xd5\x54\xf8\x1d\xb5\xff\x94\x7e\xa1\x97\xf7\x97\x17\x23\xc2\xe7\x45\x74\x4d\xa4\xfe\xf5\x8f\x28\x8f\x9c\xb2\xa5\xe4\x34\xd2\xe7\x50\x53\xaf\xfe\x83\xe8\x37\xb6\x4c\x1c\xe7\xeb\xee\x80\x6d\x03\x69\xed\x1d\x02\xd2\x08\xac\xb6\xa2\xa1\xb2\x2f\x44\x40\xef\x72\xd8\x89\xd3\x5b\x61\xcd\xc5\x47\xd7\x3c\x6f\x2e\x86\x2d\xa0\x87\xb2\x95\xec\xb6\x89\x4a\x9b\xed\xeb\x52\xf8\x59\x84\xd7\x70\x48\xc1\x31\x3f\xf3\xac\x08\x86\xcf\x80\xa1\x70\x70\x3b\xb0\x1f\x8c\xe5\xc4\xbc\x8e\xab\xe2\x5e\x31\xbb\x81\xf9\xa3\xc0\xb9\x5f\x8b\x99\x37\xe9\x39\xad\x51\x70\x71\x3f\x10\x6f\xa8\xbc\xa0\xc3\x46\x75\x1e\x00\xef\x03\xc6\xbb\xae\x21\x79\x21\x4f\xc5\x3a\x68\xe0\xf0\x7b\x64\xd0\x5a\x54\x8b\xac\xa6\x3d\x4a\xd0\x0f\x4c\x98\x15\xa8\x21\x7f\x94\x97\x39\x90\x91\x8b\xc5\xed\xb8\xa5\x5c\x9e\x16\x67\x18\x4a\x99\x91\x57\xfd\x3a\x7a\x95\xd3\x3a\x97\x51\x43\xa9\x6d\xb7\x73\xeb\x5a\x55\x0b\x45\xe3\x48\xb8\x6e\x5d\xdd\x47\xed\x91\xdd\x50\xb8\x2b\xd0\xd0\xa2\x01\x7c\x03\xa3\xa2\x46\x65\x98\x23\x93\xda\x6e\x60\xb7\x21\x9e\xb0\x65\x67\x4c\xce\x4f\x32\x6b\xce\x6d\x8d\x5f\xc8\xc0\xa4\xe2\x84\x98\xa5\xa4\xbe\x42\x65\xa7\x0c\x32\xaa\x21\x16\x10\xe2\xf7\x0b\x84\xdb\x16\xd6\x4d\xd1\x95\xe3\xa4\xc0\x33\x8a\x79\x90\x27\x1c\x53\x76\x46\x6b\xb5\x02\xe8\x4f\x76\xa1\xb9\xe8\x52\x4f\xf7\x10\x8c\x03\x64\x80\xff\xec\xe0\xaa\xd3\x5a\x69\x0f\x6d\x83\x70\x06\xcb\xad\x34\xd2\xd4\xc8\xfa\x1d\x30\x33\x87\xa4\x8c\x27\x4f\xd1\x14\x6b\x23\x7f\x6e\x56\xe7\x8b\x58\xae\x45\xb0\x0c\xcb\xe5\x44\x98\xd8\x8c\x4c\xfb\xfc\xc0\xfd\xde\x31\x76\x8e\x38\x03\x5c\xc7\x5d\xc0\xe3\x55\x40\x0b\xde\xe1\xb6\x55\x62\x92\xa8\x28\xbb\xf5\x57\x6b\x84\x14\xf0\x14\xa0\x84\x74\x58\x37\xac\x68\xc2\xee\x4f\xbd\xd0\xdd\xc7\x8b\x96\xbd\x39\x18\xaf\xa7\xbc\xae\x39\x5b\xd5\x44\x28\xe2\x6c\x93\x2a\xce\x09\xc7\x3b\xa7\x08\x97\x0f\x4d\xa6\x81\x1e\x4a\x86\x71\x18\xb5\x69\xa5\xf4\xe0\x69\xc6\xfa\x57\x0f\x3f\x2c\xd3\xbf\xd9\xf0\xc3\x78\xfc\x3d\xfc\x40\x1f\xd6\x1f\x35\x6b\x1c\xdb\x0b\xc4\x31\x41\x34\xaa\x19\x07\x61\x0f\xcb\x98\xa6\x2f\x02\xbd\xd6\x48\x54\xa5\xf0\x44\xba\xea\x60\x6d\x0b\x1d\x2d\x40\x83\x52\x11\x7c\x87\x42\xb2\x0e\xa1\xf7\xe3\x1c\xa1\xc2\x41\x8e\xb6\x45\x8f\x29\xc1\x7c\x4f\xff\x10\xab\x83\xbf\x67\x82\x47\x68\x56\x7e\xfe\xa4\xbc\x3f\x0a\x2c\x4b\x00\x81\xe1\x0f\x97\xf7\x11\xca\x92\x1a\xa1\x2b\x5d\x5a\x9e\x48\x51\x23\x36\x91\x3c\x5c\x61\xa8\x29\xd7\x1a\x9f\x8e\xae\x0a\x4b\xd6\x65\x3b\x4e\xe0\x46\x57\x0a\x8f\xc9\x8a\x76\x9e\xbd\xe4\xc1\x65\xfc\x19\xbf\xfd\x31\xe9\x6a\xca\x71\xd5\xbc\x21\x86\x93\xa4\x8b\x38\x6c\xef\x7a\x2f\x81\xd7\x84\x39\xfa\xe1\x09\x65\xc9\xb2\x95\x69\xcb\x99\xdf\x18\x0b\x1d\x68\x5a\x4f\x03\xc6\xa9\xf6\x8e\x24\xbd\x13\x9e\xd8\x4e\xc0\x96\x9b\xb2\xab\xa1\xfe\x3f\xec\xfd\xc7\xae\xc6\xb8\x92\x35\x88\x3e\x90\x06\xf2\x6e\x28\xef\xbd\xd7\x4c\xde\x7f\xf2\xf6\xe9\x2f\xf2\xe4\xb9\x75\xb2\x80\x6e\xd4\xdf\xe8\x6c\x20\x07\x35\xd0\x60\x6f\xf0\x5b\x22\x48\x46\xc4\x0a\x2a\x16\x59\x50\x1c\xcf\x76\x8a\xdb\xb6\xa1\x41\xe7\x71\x52\x86\x6b\xc2\x14\x32\x65\xa0\x66\xe3\x41\x87\xe3\xec\x62\x51\x97\x9a\x2c\xe4\xd7\xb8\x11\xd1\x9b\xb9\x60\x48\x9c\xb6\x66\xbf\x24\x8b\xf1\x3e\x39\x06\x2b\x66\x04\xdd\x62\x8c\x2a\x62\xd8\x7c\xa0\x1d\x61\xad\xa5\xc8\xef\x07\xe2\xec\x6c\xe6\x83\x65\x3e\x71\x95\x53\x7a\x12\x57\x20\x43\x33\xaa\x6e\x46\xdc\xd3\x94\x6d\xaa\x66\x0d\xaf\xd0\x7c\xda\xd0\xab\x32\x08\xef\xe1\x7a\x43\xb9\xfa\x9e\xe8\x1c\x92\xa2\x7b\x79\x53\x50\x7a\xd8\x19\xc0\x51\x40\xaf\x5d\x9f\xc3\xa7\xbc\x96\x8a\xe2\xf4\x40\x27\x2e\x54\x39\x25\x8b\x68\x13\x9b\x2f\x77\x3c\x1b\x28\x3f\x97\xb0\x37\xf0\xc0\x5e\x2c\x42\xb6\x70\x0a\xce\x97\xcb\xae\xb6\x8a\x5a\xf4\x59\xef\xa4\x59\x53\xf4\x0a\x80\xcf\x7a\x85\x85\x43\xe5\xfc\xde\x2e\x6d\x4a\x45\x46\x62\x82\x55\xc9\xd2\x5b\x1d\xbd\xde\x9a\xa6\xbf\x21\xc6\xb9\x6d\x00\x94\xaa\x86\x53\xe4\x65\x31\x67\x91\x69\x04\xc3\x82\xdd\x54\x9b\x49\xd6\x69\xdc\x0e\x7d\x4d\x08\x2f\x7e\x77\xc9\x40\xac\x63\x30\x8d\x88\x72\xc4\xf2\xcb\x4f\xb3\xa1\x11\x83\x66\x44\x1f\x2e\x3b\x8f\x6b\x89\x21\x07\x44\xe9\x9a\x11\xe3\xf9\xb1\x2c\x3d\x17\xe9\xb3\x60\xc6\x6f\x87\x8b\xb2\x42\x60\x94\xa5\xe0\x8a\x7c\x6e\xa6\x18\xb1\x7e\xc8\x32\x48\x09\xbc\x3e\x28\x75\xf5\x1e\x74\x48\xe8\x89\xd0\xbb\x98\x8d\x3b\xc8\x91\x82\xbb\xe1\x24\xa4\x4d\xfb\x25\x42\x40\xd1\xa1\x3a\x7a\xaa\x3b\xb9\x10\x9f\x3d\x40\xad\xd0\xfb\x99\x3c\xde\x8c\xc9\x63\xa4\xdc\x84\x81\x8a\xec\xf8\xe3\xe9\xa4\xed\xe2\x2c\x7f\xad\xdd\xaa\x94\x55\x22\xfd\x8f\xaf\x94\x64\x26\x04\x5e\x5a\x80\xd4\xce\x91\x41\xd3\x56\x99\x6a\x81\x69\x78\x3a\x05\x07\x79\x18\x84\x69\x15\xcd\xef\xc4\xbe\xec\x28\x5e\x91\x7d\x18\x3a\x35\x7c\xaa\x7d\x3d\xa0\xf8\x6b\xda\x45\x33\xa8\x9f\x1b\x86\x88\x7e\x21\x2b\x5d\xe9\xca\xe5\xd5\x0c\x63\x30\x59\x56\xfc\xc6\xb1\x10\xd9\x29\xf9\x9b\xa3\xfa\xf2\x0f\xcb\xa7\x87\xbf\x08\x38\x60\xf8\x5f\x51\xdd\xf6\x0d\xf2\xf5\xd2\x65\xfa\x7c\x9a\x37\xb3\x29\x62\x0e\xb1\xf6\x3a\xae\x6b\x36\x80\x79\x44\xfa\xd3\x8e\x0b\x6c\xaf\x1a\x64\x86\x0e\x10\x85\x8e\x98\x2f\x4c\x39\x22\xd9\x96\xba\xbb\x63\x03\x6d\x0e\xd6\xd5\x0f\x54\x65\x9a\x5c\xd4\x20\x8d\x0f\x3d\xa0\xc1\xac\xe0\x09\xd3\x95\xbb\x00\x08\x1c\xa7\xf1\x6f\x7c\xc6\x5e\x50\xbf\xd2\xc5\xcf\x1a\xff\xe9\xd3\x7e\xa5\x0f\xd1\x78\xd7\x51\xd2\x11\x9d\xf7\xad\x48\xf6\x0d\x5e\xca\xf4\xcf\x2d\xc0\x7b\xa5\x92\x38\xf3\x3d\x75\x39\x72\xe8\x19\xc6\x87\x54\xd2\x59\x0b\x84\x0f\xfe\x54\x84\x0f\x02\x82\x06\x51\xf2\x12\x93\x8d\x7f\xaa\x46\xa5\x03\x68\xe4\x00\x66\x56\x94\x50\x6a\x68\x4e\x07\x2e\xc5\xca\x6d\x8c\xd2\x78\xe7\x47\x3e\xd0\x1e\x75\xe1\x4f\xdd\x7e\x02\xdf\x90\x9a\x34\x00\x1d\xc8\x14\x58\x17\x18\xa0\x4b\xb2\xfb\xb4\x79\xde\x73\xc4\x46\x9d\xa1\x31\x59\x8d\x14\xa0\xf5\x35\xaa\xd5\x81\x0a\x74\xae\xea\xdc\xd8\x0d\xf9\x05\xc5\xba\x6f\x24\xb9\x4c\x9a\xa0\x1b\xeb\x82\xe1\xc8\x01\xb1\xc0\x23\xd9\xcb\xb7\xe9\x1b\x8f\x10\x0a\xb4\x26\x83\xfa\x8f\xe9\xec\xed\x28\xe9\xcc\x4f\xc0\xb0\x8f\x53\x74\xb8\x99\xe3\xf4\xee\x0c\xf3\x62\xe1\x8e\xf8\x72\x0e\xd2\x4e\x66\x7f\x4c\xc5\x8f\xee\xc6\x34\x12\xbb\xd2\x43\xb5\x13\x05\x8b\x66\xb6\x5e\x66\xba\x6b\x63\x7a\xf3\x63\x37\xac\xc6\xae\x5b\x69\x4a\x89\xc7\x92\x80\xe1\xf6\x94\x13\x28\xe6\x48\xa4\xc8\xc7\x7b\x6e\x97\x9c\x1b\xbf\x85\x44\xfd\x6c\x70\xe9\x71\xf7\x4e\x7c\x06\xce\x21\xb2\x72\xa6\x3a\xa5\x6c\x68\x6f\xca\xcc\x40\xc4\x31\xb9\xa3\xc1\x68\x8c\x65\x24\x4c\x87\xb1\x50\x54\xd2\x0c\xe8\xde\x9d\xa8\x1e\x87\x16\x3e\x57\x29\x9c\xc2\x28\x1f\xf7\x8e\x1f\x9c\x77\x7d\xee\x3a\x6b\x50\xdc\x5b\x8b\xe1\xc8\x84\xc8\x0f\x7c\x39\x31\x1f\xac\x93\x02\x90\x43\x68\x80\xbd\x62\x4c\x5f\x4e\x90\x23\xbf\xa4\x11\xfb\xaa\xf1\x12\x02\x8d\x5e\x6f\x97\xdf\xf8\x5e\x12\x39\x80\xa0\xae\x3a\xa1\x9c\xb1\x4e\x35\x67\x7d\x66\x63\x87\x2e\xd6\xba\x8c\x99\xfc\xaf\xb8\x5c\x35\x08\x69\x81\xda\xac\x66\x65\xef\x75\x4c\x28\xc6\xdb\x41\x26\x2b\x73\x57\xcf\x29\xee\xab\xfc\x3e\xe4\xc6\xb5\x3e\x08\xb1\x64\x61\xf2\xd0\xc9\xb7\xe2\x72\xd1\x65\x93\x59\xdf\x88\xcb\x05\xed\xce\x13\x46\x9c\x4d\xd5\x8c\xe5\x21\xd0\x45\x7e\x83\x95\xae\xb5\x83\xd4\xbb\x76\x00\x90\x27\x38\x80\xa4\x7b\x8a\x10\x5c\xea\x04\x10\x7d\x9e\xb5\x08\xb0\x78\x48\x36\xff\x00\xac\x01\xb3\xba\xc4\xbc\x44\x0d\x4f\x86\xbc\xae\xb8\xe4\x40\x45\x76\x0e\x6f\xf6\x7f\x1a\xf0\xd6\x0c\xa3\x08\x99\x52\xc2\x13\x70\x9d\xe5\xdf\xfa\x2d\x76\xd9\xff\x61\xaa\xad\xf5\xaf\x65\x91\xb0\x21\x40\x42\x52\xe7\x47\xa9\x69\x91\x74\xcc\xca\xe1\x46\x8d\x2a\x33\x0b\xc7\x0a\x88\x02\x25\xe7\xdc\x79\x59\x56\xf1\x6a\x65\xa9\x2d\x06\x27\x26\xea\xd7\x7e\xf7\x14\xee\x6d\xd4\xc2\x40\x55\xbc\x2a\x31\x80\xd0\x40\x89\xef\xbb\xae\xd1\x40\x88\xa6\x89\xf3\xcc\xb1\xb9\x3f\x0e\xaa\xee\x91\x35\x69\x03\x27\xaa\xd1\xf1\x4c\x75\x91\x8f\xa6\x3f\x1c\xdf\x61\x12\x05\x4f\xc9\x80\x20\x3f\x1c\xef\xb4\xfe\xd4\xef\xe0\x69\xa4\xd3\x2c\x7c\x3e\x2f\x47\x72\x6c\xb9\x70\x78\x13\xa5\xa0\x6b\xe4\xed\x8d\xc0\xeb\x52\xef\x31\x2b\xc3\xe0\x8e\xde\xc5\x03\x78\x8f\xc6\x24\x67\xf2\x9e\x25\x6b\x5b\x9b\xeb\x5a\x74\x36\x13\xa9\x2b\xea\x61\x33\x60\x6e\xc9\x0f\x4d\xd7\x40\xa7\x1a\xbf\x02\xf0\xcb\x02\x20\x7e\x3d\xe7\xf4\x57\x45\x8c\x3f\xba\x7d\x26\x49\x1f\x66\x8f\xdc\x80\xe4\xb9\xc2\xdf\xf6\x49\xdf\xd8\xc4\x36\x6f\x7d\x41\x6a\xfb\xd8\x84\xf2\x07\xa8\x8d\xca\x29\xd3\x73\xd0\xc7\x89\x20\xa7\x29\x78\x5b\x8d\xe4\xa4\x1d\xe6\xa7\x85\xa4\xe0\xad\x9e\x03\xa2\x05\x00\xbe\x67\x79\x5a\xa1\x1f\x85\xc1\x40\xa5\x02\x09\xf6\xb6\x60\x80\x7c\xfc\x6a\x09\xdf\x87\x2e\xa8\x0a\x5e\xba\x1d\x01\x31\x7a\xe6\xee\xa4\x68\x14\x43\x93\xff\x80\x43\x79\xb9\x79\x50\x5b\x5b\x4b\xbc\x98\x94\xca\x0f\x51\x20\xb8\xb5\xd4\xf2\x97\xd0\x9b\x0a\x92\xc1\x6d\x4b\xbe\xd0\xad\xfd\x91\x4f\xea\x71\x63\x46\xf2\x90\x94\x07\x62\x51\x86\xb6\x78\x30\x5b\xc9\x6d\x97\x8a\xb5\x20\x71\x07\x1e\x30\xb5\x8d\x62\x53\xf0\x37\x31\x03\x6f\xd9\x45\xa1\x7b\x5b\xec\x8f\x5b\x74\x68\xb6\x18\x63\x32\x85\x56\x4f\x95\xc6\xab\xe6\xe7\x96\xbc\xa8\x10\xdc\xf9\x07\x1a\x34\x3f\xb3\xc3\xcf\x57\x4a\xd3\x31\x19\xe3\x67\x61\xb6\x12\x4a\x8b\x22\xc6\xc5\xfd\x2b\x47\x06\xb1\x0e\xa9\xc0\x0c\xe6\x99\x46\x84\x5c\x30\x46\x39\xc7\xc8\x53\x32\xda\x09\xb3\xb2\x4b\xbc\x59\x7d\xda\x95\x55\xbb\x4b\x6b\x5a\x3c\x2b\xd1\x81\x6e\xb2\x9b\x50\xcb\x91\xcf\xd6\x95\x5c\xf1\x5b\x31\x13\x4c\x44\x10\x39\xd3\x65\x8f\x4f\x9d\x81\x8d\x48\xc4\xa2\x0b\x36\x11\x85\xab\x63\x95\xc0\x75\x64\x32\x23\x0d\x13\x3a\xf9\x6e\x0f\x22\x18\x49\xd3\x22\x93\xc6\xa9\x5c\x31\xfe\xe6\xd6\xca\x9f\xe1\xcf\x3c\xd2\x33\x22\xdb\x60\x95\x94\x9b\x34\xcc\xd5\x0b\x3c\x44\x99\xcc\x5d\x13\x16\xaf\x14\xee\x03\x1f\xa5\xb6\x76\x4a\x66\x70\x58\x61\x3e\x73\xd4\x34\x37\x5e\xad\x19\xa5\x62\x4f\x77\x2b\xb6\x04\x7f\x24\x07\x71\x45\x95\xe9\x47\x08\x52\x28\x9b\x2b\x06\x35\xe0\x58\x7a\x85\x03\x97\xfd\x0d\x28\x15\x0b\xaa\x70\x0e\x18\x7c\x4c\xd2\x9d\x32\x35\x41\xec\x70\x68\xb5\xc8\x50\xad\xf7\x1c\xfc\x92\x45\x7c\x64\x19\xeb\x34\xa5\x7b\x06\x13\x95\xbf\xd0\xd1\x6c\xb4\x73\x5c\x10\x97\x78\xcd\x38\x93\x49\x40\x5b\xa0\x7e\x50\x43\x5e\x5b\x78\x37\xb2\xfa\x3b\x64\xfd\xec\xb8\x06\x12\x99\x01\x3a\xc5\x52\x5f\x8b\x45\x4a\x70\x47\x88\x73\x9f\x03\x7b\x72\x52\xb2\xb0\x2f\x60\x8a\x7f\xce\x3a\x38\x58\x15\xbc\x8a\xa6\xd9\x01\xb4\xeb\xc3\x0f\x84\xbc\x84\x61\x77\x55\xb6\x83\xe3\x04\xad\xe4\xfe\xbb\xd3\x92\xf7\x9f\xe5\x7b\xc6\xf0\x3f\xbe\x67\x38\x2e\x61\xfa\x83\x70\xd8\x9f\x1f\x88\x53\xa3\x6a\x48\xb0\xc6\x8e\x28\xa1\x0b\x43\x58\xac\xbe\x39\x4f\x36\xa9\x45\x96\xdc\xe7\x89\xf2\x0b\x34\xd2\x5d\xac\x5f\xe1\xe1\x9e\xfc\xd2\x1c\xa8\xaa\x24\x99\x1f\x7a\xd9\x73\xb8\xf2\xae\xae\xc8\x23\xa8\xac\xdc\xc4\x53\x57\x57\xb9\xd1\x0a\x5c\xfc\x69\xe9\x54\x01\x55\xf5\x07\xe9\x80\x89\x16\x01\x10\xee\x87\x14\x39\x12\xde\xaf\x3c\xc2\x08\x08\x5e\x36\x02\x7e\x96\x93\x89\xd8\xc9\x93\x52\x64\x12\x74\x05\xea\x73\x53\x9b\x13\x39\x04\xbb\xcd\x8a\x59\x9c\xdc\xb2\x51\x69\x90\x35\x2e\x8e\xa0\x32\x8b\xac\xfa\xe7\x3b\x7c\x1a\x4d\x95\x02\x4d\x59\x50\xae\x1b\x60\x60\x36\x1b\x76\xa1\x08\xdf\xc3\xf5\xed\x39\xee\x41\x97\xde\x5e\x4f\x69\x61\x64\xd0\xa6\x5c\xb4\xc5\x67\x6b\xb2\xd9\xe1\x73\xda\x3f\x1d\xe6\x4e\x38\x13\x72\xf5\x24\xeb\x4b\x49\x03\x65\xc6\xf2\xb5\x0a\x13\xf7\x2b\xde\x0b\xa4\x0a\xd4\xb3\x93\xe5\x16\xb8\x03\x2c\xa7\x13\xb3\x4c\x54\x28\x31\xff\x9d\x14\xa0\x75\x0a\x38\x5d\x67\x01\x10\x81\xd3\xd1\xf9\xfd\x27\x8f\xf7\xa0\x19\x7b\xa1\xfa\xcd\x88\x55\xaa\xd5\xd1\xf5\x93\xea\x95\x6d\xb6\xd2\x43\xa4\x8e\xeb\x8a\xab\x8c\x85\x7d\x9a\x49\xde\x05\x25\x44\xe1\x14\xaa\xbe\x6c\x19\x94\x36\xa7\x12\x55\xcd\xca\x77\x37\x39\x26\x2c\x9b\x86\xc4\xd3\x49\x03\xcd\x3b\xbc\xfe\x69\x78\x2e\xbc\x22\x26\x77\x74\xa8\x1b\xfb\x9c\x28\xa4\x4a\x08\x3b\x6e\xf7\x95\xdc\xff\xac\x11\x3f\xf3\x55\xce\x32\x55\x62\x85\xe1\xcb\x9f\x65\x74\x18\x4d\x69\xf8\x89\x95\xab\x81\xf7\x1b\x05\x58\x35\x6d\xd5\xf4\xcb\x64\x96\x66\x12\x9a\x77\x3d\xf5\x1d\xe6\x66\xf1\x87\x24\x58\xa1\x54\xba\xba\x0c\xfd\xcc\xe9\x43\xf4\x0b\x3c\x45\x44\xd5\x47\xf1\x94\x60\xe7\x7a\x66\x7e\xda\xc8\x54\x75\x56\x51\x77\x34\xa9\xe2\x1e\x84\xa8\x39\x49\x07\x4b\x4b\x08\x5c\x1e\x47\x01\xcc\x07\x63\x4a\x70\x08\x4b\x82\x12\x83\xe4\x60\x45\x54\xcf\x7b\x23\xa2\x0b\xed\x49\xef\x62\x01\x4c\x8d\xc4\xe1\x02\xa0\x8d\x35\xb4\x85\x8f\x79\x2d\x4d\x13\xda\x05\x2b\x7f\xb5\x63\x3d\x78\x87\x18\x62\xfe\x2e\xb2\x92\xf7\x10\x9f\xdd\xde\x05\xfb\xc5\x88\xfc\xc4\xfd\xae\x6a\x44\xce\xff\x52\x85\x49\xab\x89\xf0\x17\x3c\x31\x8c\xa9\x2b\x7e\xb8\xc5\x61\xe3\x77\x98\xd1\x71\xb1\x74\xd1\x00\xad\xc3\xb0\x47\xd4\x6b\x3a\xd2\xcb\xa0\x8f\x4a\x0d\x5b\x24\x7c\x2c\x08\xc4\x54\xf0\x06\xe1\x8d\x99\xca\x48\x46\x34\x74\x97\xce\x72\x38\x96\x36\xbf\x2e\xcd\x78\xd9\x53\xb0\xcd\xf4\xd6\x1f\x09\x1e\xf0\xd5\x0c\x92\x6a\xdf\x69\x5c\xd7\x5e\xc5\xf5\x03\xd2\x05\xd1\x47\x03\x3f\xcf\x77\x4c\xaa\x22\xaa\x9a\x12\x24\x86\x1b\x83\x0e\x5c\xe7\xce\x2a\xd0\xbf\xdb\x0f\xac\xff\xb0\xc4\xe3\xf7\x17\x3f\x40\x1d\x27\x04\x31\x81\x1d\xe0\xfb\x82\xc1\xe6\xf0\xb9\xcf\x52\x7b\xe9\xda\x41\xa1\xa2\x38\xab\x20\xa8\x41\x9a\xc4\x02\x77\xe5\x37\x17\x3d\xc9\x7e\xb2\x3c\xc0\xb0\x81\xb8\xf1\x1b\xf7\x8b\x58\x47\x50\x4b\x25\xea\x1a\xd6\xdb\x88\x65\x75\x55\xb8\xca\xdb\x67\x13\x68\x83\xcc\xd2\xc9\xdb\x1c\x6c\xc6\x21\xbc\x96\x8d\x5f\x6c\xdb\x76\x54\x4a\x5d\xa6\x28\xc9\xf6\x50\xb4\xa4\x2d\x26\x5f\x3e\x53\x3c\x04\x68\x26\xcc\xdc\xee\x03\x1f\x15\xc1\xde\x84\xc0\x40\xcf\x2d\x6a\x71\x38\xfe\x95\x55\x5b\x0f\xf8\x31\x19\xe5\x3f\x15\x80\x8a\xa5\x3e\x63\x6a\x72\x8e\x1f\x25\x35\x2a\xc6\xa4\x87\x22\x26\x88\xfc\xa1\xf5\xcc\x87\x6e\xd1\xbc\x07\x50\xb8\x72\xe1\x41\x0a\xe3\xb6\x00\x0f\x52\x12\x64\x2f\x53\xd8\x91\xfb\x54\x42\xa5\xbe\x03\x8c\xd2\xdf\x7e\x28\x74\x8c\x29\x24\x89\x73\x73\xf2\x28\xa4\xaf\xda\x28\x8e\x56\xcf\x31\x85\x35\xf4\x69\xa7\x50\x21\xa7\x58\x12\x4d\x02\xfd\x3b\xcf\x3a\x80\x6e\x86\xe5\x3c\x4f\x99\x8c\x3d\x12\x9a\xd5\x3b\xe7\x95\x01\x51\x1a\xdc\xef\x54\xf4\x23\xfd\x25\x2f\x67\x26\x4b\xfe\x57\xdb\x57\x14\x39\x19\x25\x9d\x56\x88\x2a\x89\xae\xc6\xd3\xfb\xf1\x9f\x84\x80\x5c\x9b\xa2\xcb\x9d\xcb\xa5\x83\x10\x24\xab\xa9\x73\x72\xf6\xa4\x27\x22\x86\xd3\x76\x22\xa5\x9f\xbc\x06\x4a\x35\xc4\x6b\x3e\xab\x29\xe6\x07\x2b\xb9\x9f\x0b\xc6\x17\xc0\x8c\xc9\x47\xa4\xce\xd4\x82\xe2\x68\x4a\xc3\xee\xac\x38\x32\x0f\xa1\x27\xd6\x47\x18\x4c\x71\xcd\x3c\x77\x30\xa1\x24\xd9\xda\xc8\x74\xca\x09\x8a\x38\x2e\xa2\xa8\xc8\x33\x44\x44\xa3\x82\xc5\x58\x46\x66\x58\x23\x99\x77\x9a\x7d\xbb\x07\x4f\x89\x73\x75\xf4\xf8\x9e\xd8\xb5\xcf\x1f\x4f\x3f\xc2\x35\x1a\xe4\x33\xde\x0f\x4e\x57\x39\x18\xc3\x79\x01\x8f\x74\x02\x16\xf3\x0b\x53\xe6\x41\x17\xd1\x3c\x19\xec\x9d\x49\x47\xe6\x90\x36\x4f\xd6\xdf\x79\x09\xe9\xd2\x77\xa0\x43\xc5\xa8\x76\x50\xc0\x26\xee\x85\x95\x60\xfa\x10\x33\x23\xac\x16\x12\xce\x77\x8f\x69\xe5\xb2\x9e\xc6\x24\x6d\x85\x66\x89\x5c\xa4\xd1\x8f\x1c\x61\xa1\xee\x5f\xfb\x5d\x0a\x8d\xd6\x1d\x29\xa3\x56\xee\x8a\xe8\x9e\x06\x8c\x2b\xcb\x76\xc7\x92\x33\xb7\x95\xa2\xb2\xdd\x4d\xdd\xa5\xda\x7b\x2e\x93\xa8\x26\x58\xec\x48\x7a\xbe\xf7\xac\xf9\x72\xd7\x15\x45\x36\x2f\x59\xc1\xf1\x3d\x6e\x8c\x21\xc9\x19\x0e\x11\xc1\xed\x98\xe3\x4b\xf0\x61\x08\xb6\x6d\x97\x01\xd4\x11\x11\x2d\xa1\x48\x66\xf3\x0f\xe7\x74\x88\x1f\x53\x63\x0f\x21\x72\x21\xcc\x43\x10\x0c\x5c\x49\xb5\xed\xac\x81\x5c\x0c\xf6\xc2\xee\x84\xf0\x24\xe8\x66\x05\xe8\xa7\xca\x8d\x95\x20\x61\x6c\x85\xc4\xd8\x35\xdd\x1e\x26\x34\x75\x6a\x4b\xea\xef\x39\xbf\xd7\x46\x6d\x4e\x65\xd3\x5d\xa8\x16\x9b\xa7\x35\x2a\xe0\x6f\x62\xf1\x26\x55\x1e\xfb\x36\xe8\x8a\x0d\x23\x3a\x73\x3e\x29\x16\xfb\xe4\xfb\xdf\x9a\xb4\x6c\xd9\xf6\x0f\x73\x18\xcb\x5f\x89\xc3\xbf\xb5\x5c\x04\x65\x35\xef\x98\xc6\x1d\xd4\xa6\x0c\xe7\x04\xb0\x2e\x68\x1a\x67\x14\xd9\x41\xf6\xbe\xfb\x73\xf6\xf8\xd9\x9d\xe3\xc2\x04\x10\x33\x48\xcc\x86\xbb\xad\x0b\x32\x93\xbb\x61\xb1\x79\x96\x9e\x53\x1d\x4d\x63\x02\x02\x02\x26\x6a\x52\x7f\xdb\xe4\x8d\x23\x16\x73\x7e\x41\x01\x34\x4e\x7f\x1f\x5a\x51\x94\x64\x15\x05\x95\xad\x74\x75\x71\xad\x25\x8f\xe0\x78\x19\xf3\x99\x5f\x51\x0c\x7e\x18\xc0\xde\xfe\x98\x5f\x37\x99\xc7\x65\x43\xe5\x64\x4b\xe8\x02\xdc\x48\x11\x60\x51\x14\xe7\x1a\x07\x16\xfb\xa3\x4b\x80\x5b\xf2\x14\x15\x1e\x5f\x68\x3f\xca\x32\x4c\xd7\xf6\xc0\x9e\x40\x13\xbd\xf8\x34\x16\x62\x8e\x46\x3f\xf0\x9c\x2a\xcd\x12\x0c\x55\xc4\x39\xf2\xe1\xc4\xfc\x60\xe8\xd2\x8d\x7b\x71\x4e\x34\xa9\xf3\x5d\x66\xb4\xa5\x20\x84\x33\x2d\xa0\x2d\x34\xbc\x4d\x87\xc4\x18\x8a\x77\x18\x25\x7d\x56\xe6\x64\x5a\xd6\x56\x0c\x31\x59\x9c\x90\x09\x59\x8c\xb3\xbd\xb4\x17\xbe\x0b\xbe\x2b\x19\x3f\x72\xde\x31\x01\xd5\x41\x98\xfc\xc4\x28\x6a\xfa\x7d\x4a\xce\x30\x0c\x3a\x83\xa1\x86\xd8\x37\xaf\xce\xe4\x86\x8b\x2f\x99\xba\xe7\xd5\x61\xb6\xe8\x11\xc0\xaa\xc4\x65\x98\xf0\x94\xda\x10\x6c\x50\x9c\x16\x4f\xb1\xf3\xe7\xe9\xa3\x1b\xbd\x5d\xd1\x84\xda\xe0\x1b\x4e\x74\x07\xa3\x28\x42\xd6\x5c\xe1\xa2\x62\x0f\x38\xc9\xf2\xa4\x04\x79\xdd\x7b\xbf\x3d\x4f\xe5\x1c\xff\xca\xbb\x35\x54\x55\xe5\xa2\x5e\xf0\x08\x83\x6b\x4d\x01\xc1\xd6\x4e\x22\xaa\x86\x5c\xb7\x51\x1c\x52\x55\x3d\x04\x5b\x0e\xa3\xa1\x6d\xf8\xfb\x56\xf8\x8e\xf7\x3d\x29\x08\xfc\x20\x29\x64\x08\x41\xca\x3d\xa9\x6c\x24\xfa\x9a\x61\xbc\x6e\x90\x9f\xd8\xe4\x16\x35\x90\x90\xe7\x96\x25\x30\x65\x2d\xef\x53\xf0\x15\x3c\x7e\xea\x8e\x2a\xeb\x1a\x7b\xbf\x52\x34\x07\x09\x31\x77\x79\x35\xe9\x2b\x6c\x0a\xa3\x44\x92\x06\xaa\xd0\x09\xa4\xde\xa8\x48\x69\x42\x30\x9b\x9e\x02\x54\x0e\x4a\xfb\x08\xa4\x56\x38\xbe\x06\x3b\x41\x0f\x14\x37\x23\xbc\x9b\x9d\x02\xca\x5b\x7e\xee\xfc\x66\x2d\x30\xe9\x2f\xd2\xed\x79\xc4\xde\x95\xe0\xa9\xc2\x8f\xa5\x57\x00\x76\x0d\x3a\xc8\x69\xc9\xb1\xa2\x81\x61\x1b\x4a\xee\xdd\x0d\x29\xe9\xa4\x85\x5a\x7f\x64\x47\x77\xaf\x7f\x00\x8f\x5d\x0d\xc4\x5e\x01\x47\x6f\xe9\x2a\x70\x81\x7a\x0e\xa4\xff\x6d\xf0\x97\xb5\x5c\x32\xb2\x84\xac\x32\xae\x60\xdf\x75\x9e\x1b\xec\xa7\xb3\xdf\x9e\x07\x5a\xa8\x40\x2b\xdb\x38\x43\x01\x78\x4f\x13\x05\x49\xa6\x30\xab\xb5\x68\xb7\x16\xab\x44\xde\x48\x63\x96\xf1\x21\x98\x5c\x72\x26\x9a\xdb\xc1\xef\x9a\x5f\x87\xde\xa6\x56\xab\xd2\x80\xb9\x6b\xde\x7d\x31\x8a\x0a\xa3\x57\x36\xba\x67\x6f\xde\x9e\x94\xc7\x61\x21\x2b\xdf\xbf\x96\x8d\x63\x45\x9b\x8b\xc4\x8d\x79\xda\xf9\xd8\x0e\x8b\x9b\xa2\x9d\x86\x92\x06\x74\x80\xf3\x19\xc6\x58\xef\x17\x48\xbf\xf1\x64\x9b\xbf\x77\x8b\x73\xcb\xff\x59\x7e\xa3\xfb\xff\x6f\x76\xac\xc2\xbf\x12\x8e\x51\x08\xc0\x29\x6b\xf0\x1a\x79\xd5\x36\xd6\xef\x47\x39\xa0\xa1\x5b\xf7\x50\x88\xcf\xde\x06\x18\x1a\xc1\x8b\x13\xb6\x8b\x0a\x8d\x8e\x38\x3c\x92\x53\xe5\x44\x52\x3b\xfc\x04\x32\xb7\xd0\x51\x16\x37\xd4\xaa\xd8\x1f\x8c\xc2\xa2\x45\x0a\xa0\xd3\x70\x9e\x55\x15\x1f\x8a\x29\x9f\x6a\xab\x22\x51\xb4\xb6\xe0\x24\xe7\x95\xc8\xa3\x00\xb0\x81\xcb\xb7\x08\x63\x32\x02\x9f\xd7\x42\xaf\x72\x3f\x43\x6d\xbd\x7e\x02\x29\xa7\x08\x0a\x91\x14\xba\x8d\xef\x4c\xe6\x21\xdb\x15\x9e\xf4\xd6\xfd\x1e\xde\xf3\x37\x4f\x61\xae\xd8\x15\x58\x00\xe2\xb4\xdb\x72\x3d\xbb\x9a\x5a\xc2\xb2\x4f\xb6\xb1\xcc\xa6\x7d\x98\x33\x58\xc6\xc0\x98\xf9\xe3\xe9\x9c\x43\x42\x97\x6a\xee\xf3\xb1\x3b\xdc\x7b\x50\x9a\x5b\x00\x03\x8a\x03\x1b\xca\xda\xd6\x86\x7b\xbd\x8d\x48\x59\xe4\xb1\xef\xab\xd0\x9c\x46\x15\xfd\x88\x93\xf7\x0d\xb5\xd1\xa5\x40\xbc\x15\xf3\xdf\x65\xd1\xcd\x31\x6e\x92\xd7\x5b\x22\x60\x2d\xf1\x90\x5c\x5d\xf4\xce\xd4\xc4\x79\x98\x4b\xe4\xab\x85\x2d\x14\x71\x4d\xe8\x85\xd5\x1c\xc6\x6f\x76\x7d\x63\xe7\xaf\x87\x63\x93\x50\x2f\x36\x73\x8e\x9e\x6b\xbf\x20\xd6\x30\x74\x0f\x03\xec\x36\x45\x95\xc1\x50\xff\x02\x59\x12\xad\x4a\xe7\xf6\xa7\x5a\x69\x99\x9e\x0b\x75\x22\x28\x6d\xa6\x87\x95\x50\xf4\xb4\x96\x2b\x99\x82\x51\xe8\xed\xd7\xb3\x1d\xd3\x1f\x6c\x22\x9c\xa8\x24\x54\x2d\xbc\x6b\x2a\x94\xc4\x2e\x41\xed\xa1\x72\xf6\x9f\xd2\x7e\x77\x42\xf1\x02\x2b\xa7\x6b\xa7\xbb\xda\xd0\x15\x0e\x5f\x5f\x0c\xfb\x64\x9d\xe3\x17\x58\x02\x72\x04\xbe\x70\x56\x7c\x17\x7d\x31\x8d\x97\xda\xc8\xc7\x78\x77\x58\xb5\x24\x5d\xdd\x39\x51\x33\xcd\x7a\x7a\xdb\x11\x21\x3b\x12\x44\xea\x4d\x61\x35\x9a\x05\x05\xcd\xc8\x68\x96\x7f\x80\x02\x00\xd1\xf5\xcd\x74\x41\x14\x90\x0e\x23\xd0\x4f\xa0\xa1\x7d\x7e\xcd\xd3\xde\xed\x4b\x1a\xca\x46\x28\xf0\x5e\x5a\xca\x33\xbd\x71\x29\x88\x85\x8a\xa1\x31\x27\x14\x4b\xfd\x12\x90\x25\xe2\x51\xed\x00\x2d\x9c\xa0\xcb\xc2\xb7\xf5\xda\x8f\x73\xac\x44\x9d\x79\x80\x7f\x4e\xd8\x7d\xbb\x3b\x98\x70\x3d\x33\xf8\x99\x36\xc5\x03\x29\x56\x5e\xbf\x12\x6c\x76\xc4\x05\x74\x96\xda\x07\x8d\x6d\x52\x70\x71\x88\xaa\xfc\x00\xcc\x25\x3a\x66\xa8\x47\x9c\xc9\x19\xac\x3e\xa5\xdb\xe5\x6e\xd7\x3e\x4e\x3f\x03\x04\x48\x3d\x00\x8a\x82\x1c\xdd\xad\x8f\x5b\x0a\x1c\x43\xdd\xd5\xf0\xf9\xd2\xa3\xb8\x19\xad\xbd\xb3\x9e\xf2\xa0\x40\xc6\x49\x98\xef\xa2\xd6\x7c\x3a\x89\xab\x11\xfe\x66\x7b\x3e\xfe\x61\x95\x4a\x15\xfe\x1f\x83\x86\x60\xfb\x5f\xbb\x97\xbf\x74\x2a\x71\xd1\xbb\x1a\x3d\x11\xcf\x3b\x3a\x68\xa1\x91\x5f\x21\x9b\x1f\x82\xaa\x78\xb5\xba\xe4\xeb\x56\xc1\xd6\xb7\xe5\x0b\x36\x41\xa7\x49\x11\x93\xc3\x1a\x74\x08\x18\x47\x13\x35\xa9\xed\x43\x6d\x75\xb7\x2b\xff\xb9\xe3\xaf\x3d\x10\x02\x11\xe5\xfa\x05\x5e\x8a\x22\x49\xdb\x36\xa8\x8f\x84\x17\x8e\xd3\x5a\x0c\xfc\x63\xba\x36\xb5\x8e\x85\x0f\x21\xc2\xbe\x46\xa6\xdf\x6e\xe2\x9b\xad\x69\x51\x1e\x2e\x0f\x09\x54\x1a\x1e\x9f\xc8\xf0\x1a\x87\xe9\x97\x78\x49\x19\x65\xdb\xa9\x34\x6b\x59\x64\x76\x88\x0a\x9d\xf5\x2f\x1c\xbc\xcc\xea\xd9\x8a\x6b\xb8\x44\x3a\xcd\x66\xd5\x9a\xb2\x61\xb0\x64\x1d\x83\x41\x74\x09\x9a\x68\xe4\x89\x26\x50\x7c\xed\xfc\x98\xf6\x76\xa7\x49\x1d\xf2\x87\x30\x08\x0f\x07\xa2\x49\x43\x84\xeb\x5c\x90\x82\x7e\x83\x01\xf9\xfd\x34\x06\x8a\xc3\xc2\xeb\xa4\x98\xa9\xe0\x01\xcf\x2b\x1b\xee\x00\xcc\x15\xb9\x78\xfd\xd9\xef\xcd\x82\x8c\x16\x7e\x1a\x8a\xb9\xbd\x6c\x26\x63\x13\x6a\x9c\x8c\x43\x37\x29\xb0\xec\xdc\xe4\x7e\x06\x32\xa1\x81\x7b\x0d\x5b\xfe\xa0\xa6\x40\x18\x83\xef\xed\x3d\x17\xed\x0f\x79\xde\x8a\xce\xf6\xbb\xf2\x88\x1f\x60\xfa\xb9\x44\xb1\x1c\x57\x07\x87\xde\xd7\x35\x12\xcd\xe1\x2f\x5c\x18\x99\xf8\x88\xd6\x08\x0e\x55\x40\x85\x77\x48\xea\x45\xc4\xae\xa0\xd3\x51\xc7\xf4\x48\xd1\xa8\x3c\xc6\x71\x59\x39\x42\x37\x58\x5e\x69\x98\x05\xc2\x99\x75\xdc\xbe\xc3\x00\xe1\x11\xf7\xeb\x23\xe4\x8f\xec\x27\x32\xb9\x71\x4b\xa6\x11\xa6\x50\xb5\x88\x96\x30\x6f\x96\xdb\xaf\x7d\xc1\x31\xce\x59\x9a\x72\xa6\x09\x99\xb9\xd8\xc4\xa3\xec\xde\x43\xc4\x67\x38\x61\x56\xe3\xf5\xf6\x35\x6b\xcf\x51\xf6\x70\x91\xb3\x98\xd2\x87\x31\x17\x9b\xa5\xd4\xa0\x7d\xed\x9f\x1c\xf1\x19\xbf\xd4\x2a\x5c\xa5\x22\xa3\x7f\xaa\x8a\x19\x9a\x85\x1b\xc2\x71\x61\xbe\x17\xb3\x64\x08\xe6\x1b\xd5\x39\xba\xf1\x01\xd9\x38\xb9\x69\x94\x5f\xf3\x8c\xaf\xf4\xea\x8e\xcf\x5d\xdd\x5c\x53\xc5\x79\x85\xae\x5b\x68\xe1\xe9\x10\xf0\x20\xdd\xab\x92\xab\xdb\x99\x35\x11\x9c\xd5\xd1\x88\x1f\xc0\x7c\xfe\x24\x15\x7d\x4e\x2e\x0f\xf1\xdb\x76\xa8\x16\x10\xdf\x8a\xc1\xb0\xd1\x42\xff\x3c\x40\x6c\xb2\xf9\x6f\x65\xe1\x7b\xb6\xff\xc3\x2a\xe1\x5f\x75\x09\xc5\x16\x8a\x04\xd8\xb0\x26\xf3\xca\x3d\xbc\xfd\xb3\x3d\x8e\xe5\xf1\x9f\xd5\xc7\x0c\x7f\x83\x95\xcc\xb6\x09\x72\x8c\x25\xc7\x76\x69\x54\x2e\x79\x0f\x75\x24\x79\x82\x4a\xc7\x2e\x29\x0f\x75\xe1\x17\x9a\x86\x00\xdf\x0e\x12\xce\x59\xd0\x12\xc5\x14\xfa\xd5\x80\x07\x09\xba\x6c\xc9\x37\x0e\x4a\x4f\x01\x0a\xff\x60\xd6\xaf\x3d\x0a\x09\x1e\x4b\x49\x68\x2a\x09\xde\xf3\x9f\x41\x54\x3c\xd4\x25\x91\x7b\x25\x53\x40\xfc\xf1\x77\x1e\x85\x50\xe2\x51\x9d\x22\x37\x44\x25\xc1\x77\x29\xed\xb4\x32\x88\x43\x8e\xa8\xa3\x22\xb6\x66\xc0\xb1\x7c\x8e\xaa\xa3\xc2\x07\xa7\xf1\xc2\xbd\xc1\x0b\x8f\xc2\x27\x88\xde\x0b\x90\xe9\x27\x88\xe1\xdd\x8d\xd1\x33\x8f\xd1\x51\xf7\x1f\x8f\xd9\x41\x8f\xc9\xcf\xb0\xd9\xcf\xaf\xf9\x32\x8d\xc2\xfd\xfb\xe9\xb1\xc6\x96\xd5\x21\xed\x17\xcf\x15\x92\xff\xea\x4f\x31\xb9\x93\xed\xa9\x73\x29\xbb\xb7\xd5\x51\x57\x89\x96\xa8\xfe\x2b\x3e\x7d\xa2\xdf\xf4\xa5\x1e\xcb\x1f\x70\xfd\x63\x5e\xfd\x53\x5e\x3d\x56\x87\xb4\x83\xbf\x2a\xc2\xa1\x24\x6e\x8e\xfc\x67\xf4\x7f\xc1\x15\xd2\xd8\xfc\x23\x94\xdd\xa5\x34\x5e\x79\xc7\xbe\xa9\x94\x10\x49\xa4\x5e\x65\xec\xd0\x4a\xa7\xfc\x67\x0c\x24\xf8\xfe\xeb\x3b\xf3\x9f\x71\xfe\x7b\x4c\xce\x04\xa1\x0f\x1d\x6d\xdb\x82\xa3\x1e\xbd\x67\x2e\xa5\x63\xb1\x3c\x7a\xce\xe2\x5b\xb0\x3c\x66\x4d\xdf\x87\xba\x4c\x76\xa1\x82\x9f\x2f\x1d\xc1\x3f\x7d\xfa\x73\xac\xf4\x7f\xcd\x27\x8d\x25\x31\x73\x19\x1e\x76\xeb\x08\x7c\xe8\xef\x7f\xde\x59\xa0\xae\x97\x46\x09\xad\x4c\x2d\x54\xca\x0c\xa1\xbf\xf4\x59\xbc\xff\x35\xff\x7d\x8e\x40\x57\x25\x89\xb7\xfe\x09\xa7\xc1\xd1\x5f\x28\x8f\x77\xea\xd1\x5e\x1a\x9b\x57\x19\xab\xfd\x1f\x6b\x29\xed\x8c\x4e\x91\xdb\xa3\xe0\x17\xbe\x98\xc2\xb6\x94\xe8\x37\x94\xe8\x2b\xe7\xa1\xce\xf9\xb3\xff\x4d\x20\xb5\x57\x29\xd1\x5f\x26\xd1\xb7\x22\x98\xbe\xd9\x31\x73\x88\x8c\x67\x2a\xd1\x68\xf1\x0e\x7f\xfe\x5e\x80\x4d\x6b\x18\xcf\x02\x75\xdb\x7c\x32\x47\x2f\x70\x68\xe5\x8f\xb5\xc2\xe1\x4b\x16\x39\x84\xc1\x9b\xbc\xe1\xb3\xac\x01\xa9\x92\xe1\x0b\xb8\xe1\x8b\xa2\xe1\x37\xa8\x09\x99\xa2\xe5\x2b\xaf\xe1\x3b\x88\xf3\xb5\xac\x39\x38\x7f\xc1\x73\xaf\x04\x0d\x8f\x34\xc2\xa1\xbf\xe0\x0d\xff\x1d\xcf\xfc\x1f\xf1\xec\x8e\xa1\xfe\x98\x1f\x3f\x80\x08\x57\x0a\xdf\x2c\x4e\xc7\x54\x48\xdf\x1c\x81\x9a\x7f\x8f\x21\x91\x45\xf8\x57\x4a\xe2\x99\x20\xa1\xea\xf2\x50\xf7\x47\x7b\x7d\x1a\x97\x94\x9f\x6f\x03\x32\x1e\x43\x10\x3e\x2b\x48\x1e\xc3\x1f\x1e\x23\x08\x1e\x8b\x2f\x50\x07\x0a\x70\xa3\x57\x1e\x93\x4f\x79\x4b\x10\x10\x97\x53\xfe\x0b\x2f\x95\xe8\xbe\x8c\xe0\x31\xff\xb9\x7f\xc1\x73\xff\x1b\x9e\xf3\x3f\xe3\x5d\x7f\xf4\x5d\x47\xff\x2f\xd6\xe2\x1f\x6b\x94\xa3\xff\xb5\x1e\x83\xc1\x95\xfe\x6c\xf7\xa7\xbd\xfd\xcb\xfe\x7c\xac\xb1\x79\x1a\x2b\x24\xb1\xcf\x90\x10\x52\xa4\xf0\xfc\xc3\xce\x8b\x4e\x01\xed\x99\x44\xe2\xa0\x60\x18\x46\x2d\xfe\x75\x45\xb2\xdc\x67\xad\xa8\x96\xfe\x63\xb2\x22\x0f\xe7\xef\x50\x80\xc7\x71\x95\xc7\x71\x44\x52\xa3\x40\x79\xb2\x05\x0d\x9f\xce\x66\xb2\xba\x2a\x04\x63\x83\xe1\xc6\xf2\x75\xb3\x60\xeb\xf8\x32\x78\x8b\xad\xe1\x0a\x6a\x2d\xb2\xce\xc3\xf6\xad\xe1\x2a\xa2\xe0\x78\x1c\x33\x3a\x8f\x96\x48\x4d\xd3\x05\x68\x85\xca\xf9\xaf\x8e\x91\x5c\x3c\x60\x21\xa0\x07\x7a\xa2\xa7\x7c\xfc\xf0\x05\xfb\xc6\x4f\x34\x85\x27\x99\x96\xb3\x02\xfb\xc9\xf7\xd2\x1b\xb7\x53\x66\x84\x0d\xe6\xe6\x7d\xa8\x20\x2d\x12\xb9\x2f\xbb\x3c\xcb\xca\xcc\x06\xdb\x3c\xac\x14\x3a\x76\x83\x2c\xae\xaf\xb4\x0a\xfc\x35\x71\x9d\x67\x76\x5f\x74\x19\x75\xd8\xc1\x81\x43\xec\x47\x74\xc3\x0a\xa5\xbd\x8e\xa8\xb1\xfc\xad\x3e\x02\x11\x16\x46\x90\xc1\xc6\x34\x61\x4a\xc4\x51\xb7\x03\xad\xe2\xa9\x49\xeb\x28\x75\x63\xd1\x7c\x0c\xd9\xc1\xd4\x6e\xe0\x42\xf1\xd4\x05\xb4\xa1\xa3\x81\x7c\xf6\xd3\xb9\x59\xa3\x78\xb2\x92\x5b\xcc\x1d\x74\x5d\xc5\x0a\xee\x83\x11\xa6\x37\xe2\xbb\xa9\x3e\xea\x6d\xd7\x23\x9c\x51\x33\x5f\x5d\x6d\x2c\x9e\xc2\xd3\x61\xa2\x49\x6f\x15\x71\x5f\x4a\x0b\x0b\x6a\x48\x2d\x48\x2e\x7d\x6d\x0c\xdc\x1f\x40\x49\x84\xcd\x23\x5e\xda\xea\x86\xd3\xd3\x44\xc4\x74\x06\xd3\x22\x6e\x2c\x26\x9a\x42\x52\x63\xa1\x16\x0f\x1d\x25\x2c\xf7\x16\x0a\xf7\x5b\xcc\x7c\xee\x83\x68\xe1\xf1\x04\xe2\xb0\xb4\x45\x78\xe8\x26\xda\xa8\x20\xa1\xd3\x49\x39\x40\x89\x6a\x27\xdd\x62\x11\x52\x76\xf9\x4a\x80\xa9\x62\x4b\x88\x6a\x33\xa6\x9d\x43\xc3\x70\x44\x55\x8b\x44\xd2\x36\x53\x03\x18\xc6\xd6\x7d\xe7\x46\x6a\xf3\xf5\xb1\x94\x98\x31\xac\x43\xb8\x25\x66\xe5\xd7\xb0\x68\xf2\x70\x18\x04\x00\x0f\x76\x81\x89\xb2\xab\x86\xb2\x0f\x39\xa0\x74\xbd\x34\x64\xcd\xf2\x96\x50\x02\xb4\x9f\xbb\x8f\xbf\xfd\xe6\xae\x7a\x58\x2f\xc3\x5a\x8d\x87\x32\xd7\xa8\xe9\x40\x9c\x21\x7b\x2d\x9a\x66\x20\x10\x3a\x36\x07\x23\x14\x78\x0c\x8b\x18\x08\x5c\xa1\xfd\xed\x36\x8a\xbd\xfa\x02\x33\x3c\xfc\x74\x39\x6b\x9c\xbf\x63\xf9\x02\x6a\x52\xdf\x0e\xf5\x0b\xd8\xc2\x80\x91\x0e\x20\xe2\x47\x3e\x94\x03\x52\xb6\xfc\xc1\xfc\xb6\x31\xfa\x41\x1d\xe3\x06\x71\xdb\x90\xab\x86\xec\xcf\x0b\xed\x0d\xf8\xae\x67\x70\x43\xe9\x00\xe3\xaa\xe5\xcf\x6b\x35\x6e\x4c\xd0\xe3\xfc\x99\x04\x7d\xe0\x9d\xa4\x27\xfe\xc8\x1d\xd9\xd0\x8b\x09\xd9\x3c\x26\xc3\x96\x26\xca\xa2\x24\x9b\xad\xeb\x9c\xf8\xd4\xf2\xc6\x50\xf7\xc3\x2c\x37\x77\x07\x85\xc1\x88\x64\xe4\xdd\x3c\xf0\x73\x36\x45\xd4\x1c\xb4\x6f\x6c\xed\x34\xf1\x97\x2d\xc5\x62\xcf\xf4\x52\xe6\x5b\x43\xf1\x3d\x63\xb1\xbb\xd8\x08\xba\x3a\xed\xd2\x4e\x56\xd1\x30\x14\x78\x7e\x82\x0f\xdb\x30\xf2\x10\x71\x44\x60\x33\xbc\x6f\xfd\xbd\x6c\xa2\xf8\x5f\x36\xf1\xbf\x6c\xe2\x7f\xd9\xc4\xff\x63\x36\xe1\x0e\x06\xe6\xf4\xc9\x6b\xf2\xe1\x1f\xd1\x1f\xfb\x33\xfa\x8f\xac\x2b\xa4\x9c\xc9\x9b\x82\x01\x09\x7f\x44\x56\xc8\x08\x94\xff\x23\x36\xf1\x1f\xbc\xf4\x7f\xc4\xfb\x7f\xc7\x26\x16\xc9\xf9\x5a\xce\xec\x15\xc8\x80\xfe\x88\xfe\xcd\x9f\xd1\x3f\x10\x05\x77\xf8\xe3\x7f\xce\xe7\xf8\xc2\x63\xf9\xce\xe3\x74\xff\x27\x6c\xe2\x3f\x78\xa6\xf0\x3f\xe2\xfd\x7f\xc3\x26\x86\x1a\x7e\x2b\xe3\x0f\x36\x91\xff\x87\x4d\x98\xff\x66\x13\xd0\xa1\x07\xfa\xc2\xd2\xf0\x39\x97\x61\x64\x4f\xf3\x16\x28\xcf\x0c\x85\x5e\x67\x7a\xc2\x63\x24\x89\x2c\xa0\xe8\x08\x05\x25\xd8\xfd\x00\x0e\xb0\xbc\x3e\x69\x7a\x57\xe2\x59\x97\xd3\x54\x25\x18\x14\x21\xea\xa0\x48\x1b\xfb\x0c\x3a\x47\x04\x01\x70\x04\xa6\x47\x15\x21\x1a\xbd\xea\xaa\xef\x8c\xaf\x1f\xb9\xfd\x7e\xbf\x6d\xdc\x02\x31\x08\xa7\x1d\x35\xae\x12\xc9\x7b\xe5\xad\x3e\x37\xd4\x59\x06\xfa\x24\xe6\x9b\x89\xbe\xed\x27\xf8\xa8\x00\x52\x08\x50\x72\x13\x2d\xe0\x26\xd5\xd1\xc8\x0f\x09\xa8\x6c\x15\x9f\xac\x2c\x9d\x8a\x0e\xfc\xed\xf6\x48\x58\x26\x7b\xdc\x30\x15\xf1\x4e\x41\x1f\xe9\x0a\xed\x0b\x99\xf4\x7e\xb7\xc7\x21\x68\x8a\x9a\xbb\xb8\xd7\x27\x2f\xf2\x5c\xf2\xeb\x2e\x42\x68\xd9\x7f\xe7\xc5\x37\xc4\x25\xab\x91\xc8\x2c\x9b\x08\x32\xdb\x53\x81\x73\xf7\xdb\x09\x20\xd9\xde\x79\xe5\xba\x80\xbd\x4c\xcb\x02\x48\x71\x8b\x8d\xfe\x17\x15\x50\xf4\x2a\x8c\xe5\xd8\x90\x89\x99\x3f\x4a\x59\x57\xef\xb3\x1f\x64\xbf\xc7\x71\x4f\xd6\x74\x44\xa8\x46\xa3\x78\xfe\x75\xaf\xe2\xd1\x62\xe7\x62\x89\x46\xf1\x92\xa5\xbb\x1b\x19\xe8\x85\xb0\x23\x13\xa6\x8e\xb0\x9f\xb0\x0e\x90\xad\xde\xfc\x5c\x9b\x55\xcf\xc4\xa4\x9d\x55\xc8\x6e\xb7\xad\xec\xcc\x22\x81\x06\xb8\x94\x75\x08\xfb\x83\xab\x65\xb6\xa3\x69\xca\xb4\xf9\x6c\xe0\x80\x9d\x8d\xad\xb9\xe5\x2c\x57\xc2\x90\x7b\x90\xbe\xdc\x34\xf1\x9e\x08\xd2\x4f\x91\x65\x1c\x4b\xdb\x91\x1a\xa4\xd0\x70\xb9\xad\x94\xc0\xc8\xb3\x74\xd5\x42\x5a\xf9\x11\x4d\xc7\x73\x2f\x6a\x98\x49\x2c\x70\x8d\xa6\x20\x8d\xc2\x3d\xb3\xc3\x08\xbb\xa3\x1c\x8b\xc9\xc9\x91\xf6\x6b\x8c\x19\x82\xb3\xcd\x4f\xc0\x5e\x54\xbe\xfc\x3c\xbc\x56\x3d\xe3\x16\x16\x27\x5a\x54\xa6\xa4\x33\xc8\xc3\x3f\x34\xeb\xc8\x2d\xe0\x98\x4d\xda\x2c\x80\xda\xc1\x3d\x29\xb0\x94\x30\x19\x49\xf9\xb3\x15\x19\x49\xdc\x14\x7a\x11\x2d\x05\xf6\xf0\x63\xe5\x1f\x72\xc1\xd3\x62\x48\x0f\xc4\xfb\x99\x8b\xfe\xbe\xfa\xae\x25\x41\x2d\xdf\x5c\x1a\xca\x19\xbc\x85\xae\xe1\xdf\xeb\xd1\xbf\x06\x7b\x3b\xc1\xbb\xe6\x3e\x6d\xeb\x12\xa3\x2d\xa6\xd2\x55\xa4\xac\x9a\xcc\xd3\x15\xdb\xb2\x88\xeb\x6e\xba\x24\xcb\x5c\x61\xf3\x5d\x57\x10\xca\x1f\x65\x54\x6a\xee\x85\x29\x6e\x90\x3f\xbd\x34\x85\x67\x15\xf5\xcc\xb9\x85\x5a\xac\x19\xce\xf9\xc1\x80\xcc\x46\x9a\xa7\xe5\xa8\xe1\x63\x5e\xb3\x1f\x67\x4b\x5f\x21\x9f\x01\xb9\x83\xf1\x96\x2b\x10\x33\xe1\x8e\xfb\xf2\x19\x03\xed\x5b\x76\xbd\x01\x75\xa7\xab\x9c\x2e\x26\x1b\xea\xa7\x9e\x66\x16\x0a\x09\x64\xea\x1d\x39\x93\x6d\x00\xfe\xb0\xba\x0d\x46\x1f\x27\x81\xd7\xa0\x5a\x30\x8c\x71\x1b\xd9\x4e\x44\x81\x56\xfe\xcd\x0a\xa5\x7d\x1d\xff\x59\x64\xa2\xfd\xaf\x03\xdb\xa8\xa1\x38\xfe\x25\xd2\x7f\x36\x20\x7d\x63\x63\x98\x33\xd8\x64\x5d\x2b\xf3\x86\xc5\x67\x05\x04\xb5\xdb\x14\xc1\x8b\x75\x44\x5e\xbc\x3c\x2f\xc6\x0e\x4a\x49\xf4\x60\xf1\x51\x5c\x97\x8d\xd3\x51\x74\x68\x29\x2c\x79\xc1\x54\x5a\x49\x7d\x06\x7e\xbf\x91\xe9\x57\xa5\x3f\x83\x42\xb7\xd3\x4c\x47\x6b\x32\x67\xbe\xfd\xc6\xef\x43\x4b\x90\xfe\x2e\xd4\x9b\xef\x87\xe2\x5a\x70\x1d\x13\x0d\x89\x0d\xb4\x10\xd4\x3d\x97\x21\x60\xed\x43\x70\x2b\x09\xf0\x24\x32\x13\xa6\x72\xd2\x35\x44\x1f\xa0\xb3\x79\xb7\x41\xe1\x01\xa0\xac\x02\x97\xf3\x26\x7b\x94\xb0\x47\x4d\x30\x98\xaf\x38\x34\x15\xcd\x24\x31\x9b\x0c\xb9\x0f\xa1\x12\xb8\x0b\xa9\x3b\x06\x63\x5b\xa2\x68\x21\xda\x50\x29\x3a\x61\x40\x0c\xc6\xba\xf3\x20\xea\xe7\xfd\x81\x82\x4e\x9c\xa3\x55\x5d\x24\xe3\xc1\x79\xf3\xb3\xf8\x15\xcf\x14\x7b\xce\x28\x84\x89\xd8\x06\x1c\x5f\x4d\x37\x64\xd8\x36\x16\x30\xa3\xe3\x4b\x8f\xf5\x4f\x82\x8b\x53\x1c\xd9\x2c\x5a\x3a\xed\xc9\x14\xdb\xd3\x13\x82\xcb\x38\x1a\x6d\x1a\xa7\x7f\x3b\x27\x75\x87\xca\xf1\x3e\xdd\x9d\x2f\x29\xb3\x8b\x2e\xd2\x0f\xbc\xce\xbc\x48\x60\xe7\x96\xd0\xd8\xcb\x6a\xbb\xcc\x6c\x32\x08\x48\xe8\xe5\xce\xc4\xe7\x3a\xc9\xad\x5e\x28\x11\x5f\x22\xfe\x00\x56\xd3\x58\x10\xa5\xeb\x65\xe9\x2e\xcb\x88\xbb\x4c\x00\x45\x41\x6e\x66\x2c\x1b\xff\x85\xa5\x4f\x7b\xe5\xec\xc0\xea\xd0\x34\x9d\x43\x24\xd7\x46\x86\x04\x04\xd0\x1f\x99\x0d\x0c\xd2\xd4\x32\x5d\xb8\x22\xd5\x5a\xb8\x88\x87\x15\x36\x3a\x8c\x48\x9f\xa7\x06\xac\xe2\xfe\x8e\xc3\xb7\x3b\xcf\x56\x64\xce\x04\x61\x6d\x19\x0d\x2e\x85\x1a\x5f\xbd\xd0\x9b\x83\xd6\x8c\xf8\x9d\xb4\xdd\x12\x40\x64\xd4\xfd\x48\x80\x8b\xc4\x96\x39\xd2\xe7\xda\xf4\x50\xce\xe8\xf6\xd1\x8b\x5f\xc3\xdb\x06\x29\x6b\x37\x56\x25\x99\xb2\x49\x33\x39\xaf\x4b\xc1\x47\xc8\x15\xd2\x86\x3d\xaa\x8f\x34\x47\x81\xd5\xb5\x97\x4d\x66\x68\x90\x1c\x52\x79\x31\xf1\x7e\x00\x05\x01\x9b\xc4\x45\x55\xba\x80\xa9\x4b\x3f\x19\x52\xd0\xfe\xe2\x07\xd8\xdd\x5f\x8c\x10\x6d\x8c\x03\x61\xf6\xd8\xca\xdf\xc1\x49\xb2\xd9\x59\xcc\x17\xa5\x8d\xa0\x39\xb8\x73\xe0\xa3\xb2\xea\x73\x9f\x67\xb1\xe7\xf8\x85\xfb\x22\xd6\xed\x63\x5e\xba\x0e\x90\x92\x30\x56\x33\x84\x51\x20\x00\xe3\x13\x83\x5f\x0e\xf1\x8b\x68\x2e\x83\xff\x4d\xe9\x54\x8b\xc7\x57\xdd\xad\x9c\x14\xf5\x1d\x24\x8c\x91\x4e\x61\x96\x3a\xa3\x2e\xca\x7f\x6b\x2a\x70\x34\xd9\x3f\xcb\x78\xff\x6f\x0e\x85\x47\x70\x0d\x41\x14\xdd\x95\xba\x25\x47\x90\xc5\x90\x08\xb5\xf0\x04\xc7\xcf\x03\xe5\xfe\xcd\xdf\xb3\xb0\xc5\x55\x2d\x95\x60\x43\x9a\x3d\x37\x85\x0f\xde\xa3\xe9\xc3\xe4\xa0\x68\xb9\x30\x71\xad\x18\x24\x9a\x14\x1e\x3a\xe4\x22\x8d\x7e\x98\xdc\x88\xa6\x70\x8a\x02\x9f\xc7\x8c\xf3\x6f\xaa\x3e\xab\x02\x2d\x80\x26\xd1\xeb\x4a\x85\xfd\xc5\xd4\xe4\xb7\x96\xb6\x71\x12\xee\xe0\x39\x89\x83\xd0\xaa\x30\xb0\x80\x9d\x16\xdb\x3e\x6e\x87\xdd\x3a\x23\x82\x86\x69\x41\x81\xc7\x46\x2b\xf0\x6b\xc8\x0d\x24\x30\x94\xbc\xb1\x06\x84\x8d\xa1\xc8\xb4\x73\x82\x52\xb5\xe7\xf1\x4e\x68\xa2\x4b\xad\x85\x94\x44\x6a\xc5\x93\xca\x23\x71\xc1\x4f\x3e\xae\x01\x5a\xe9\x05\xba\x20\xa1\x98\xf6\x1b\x01\x34\x4e\x73\xef\xbf\xf6\x93\xfc\x73\x25\xcc\x76\x27\x86\x24\x5d\xe3\xfe\xd6\x21\x49\x6c\x85\x11\x0d\x08\xc8\xaa\x7f\x77\xb4\xc3\x92\x74\x6c\x81\x66\xba\xbb\x36\x2c\x95\xa2\xb0\x8b\xa6\xb8\x87\x02\xab\x64\x11\x93\x6d\xec\xb6\x05\x68\x58\x6d\x7c\xe3\xfc\xc0\xa5\x92\x84\x7c\x31\x93\xf5\x9f\xa8\xcc\xac\x71\xfd\x1a\xf8\x5d\x14\xcd\x5a\x27\x1b\x85\xa4\x08\xb5\x14\xa1\xe8\xa6\xf9\xfa\xc6\xc7\x7d\x71\xb7\x61\xc4\x9b\x17\x18\xc5\xe2\x07\xae\x98\x14\xa3\xec\x1c\x7d\x37\xcb\xe8\x36\xd2\x52\x1d\x1b\x6a\xf9\x84\xe0\x80\x33\xb6\xd5\x56\x34\xee\x7e\x8f\x96\xac\x22\xfd\x3a\xf9\xea\x2a\xeb\x6e\xbc\x00\x24\xbd\x2f\x46\xe6\x5a\x13\x44\xb1\xa7\x1f\xbc\x60\x0a\xf8\x5d\x1e\xe7\xea\x30\xfe\x84\x43\x22\x1c\xfe\xec\xdc\x95\x2a\xe1\xa6\xe4\x38\xcd\xbb\x90\xaa\x77\xfe\x52\xe8\xb1\xec\x4f\xfa\x62\x78\xe6\xed\x5a\x5d\xc8\xb7\x88\x49\x5b\x6b\x0e\x17\xf4\x23\xba\x95\x0d\x3a\x16\x66\xb0\x9f\x50\xdf\x9c\xb0\xe7\x83\x0e\x1a\x98\xdf\x08\xf8\x0f\xef\xf9\x07\x98\x7d\xe1\x5b\xe0\x92\x9a\xe8\x83\xa3\x64\xc2\xc8\x18\x16\xea\xa6\xef\x81\xcc\x00\x8c\xb4\x20\x11\x80\x71\x16\xde\xec\xe6\xd9\x19\x39\x3b\xc2\x97\x6a\x9f\x60\x4c\xe6\xd9\xae\x87\x22\x9b\x84\x93\xb8\x27\x16\xb4\x50\xbd\xb8\x48\xdc\x25\xb4\x6a\xe1\xcb\x04\x55\xcc\xe2\x09\xab\xc4\x02\x8e\x9a\x21\x09\xf5\x63\xd2\x97\x74\xf9\x56\xe8\x4e\x70\xa6\x4b\xa4\x63\x42\x6c\x49\x11\x03\xbb\xe4\x05\xa4\x42\xb7\x0c\x6f\xac\x85\x46\xda\x6d\x68\x2d\x4d\x6b\x8a\x21\xb6\x93\xb4\x25\x1c\x42\x38\xbf\x41\xf8\x17\x21\x39\xd8\x70\x4b\x0d\xdb\x7e\xa1\x00\x09\x59\x35\xc4\xb2\x03\x12\x96\x4b\x98\xed\xd2\xb4\xd7\x33\xe1\x4c\xcb\x02\xb6\x02\xb5\x66\x0a\xd0\x35\xe2\xd9\x7d\x7a\x73\xdb\x57\x5d\x9f\xbb\x55\x1d\xf6\xcc\x11\x34\x82\xe3\x6a\x64\xd2\x76\xb4\xa5\xfd\xc8\x9f\x16\xa5\xcf\x33\x7a\x76\x34\xa2\xce\xdd\xfc\x32\x65\x8b\x28\xc7\x68\x79\x1c\x43\xae\x20\x7f\xc0\x08\xa3\x27\x72\x5f\xb1\x0b\x53\x0c\x86\xb5\xd6\x0e\x15\x7a\x32\x67\xfe\xfc\x20\xf8\x37\xd6\x12\x1e\xcd\xf7\x0f\x73\x1e\x7f\x55\x31\xfd\x4b\x9b\x9c\xd8\xb9\xf1\x79\x7e\x5d\x1e\xca\x4f\x3c\x86\x61\xe9\xb2\x38\x8c\xe6\x13\x11\xdd\x40\xf8\x81\xfb\x4c\xa8\x67\xa3\x83\xb3\x0c\x32\x35\xc0\xc2\x34\x45\x75\x35\x06\xf5\x85\x28\xb8\x4e\xe0\x9a\xac\xe7\x94\x7c\x34\xea\x8e\x89\x8c\xfb\x59\x51\xbf\x2a\xdd\xd3\xab\x20\xc5\xd9\xda\xf8\xfd\x33\x48\xfc\xfb\xd5\xd6\x14\x4e\xd3\x11\x24\xef\xb5\xbd\x00\x80\x12\x6f\x6d\x55\x1e\xbc\xae\x1f\x7f\x5c\x32\x62\x93\x04\xb3\xd8\x63\x84\xf2\x5b\x8e\xec\x72\xf5\x80\x67\x51\xc8\x11\x53\xe6\x69\x8c\x42\x83\x85\x00\x2c\xba\x77\x26\xfa\xb5\xfe\x4f\x3e\x1d\x82\x00\x68\xbc\xc3\x10\xb4\xff\xc4\xcf\x0a\xc7\x9e\x2d\x35\x2b\x35\xe5\xec\xbb\x42\x9f\xac\xf0\x5b\x04\xbc\x94\xed\xe9\x2e\x55\x01\x54\x85\xe1\x29\x8f\x90\xc1\xa5\x7c\x4c\xbf\xc5\xb1\xc3\x3b\xac\x5e\xfd\xe0\xfa\x15\x9f\x1f\x2c\xb4\xab\x1f\x7c\xab\x35\xea\x03\xad\x58\x29\xdc\x11\xf3\x6c\xae\xa0\x29\x9c\x2c\xec\x73\x92\xc4\x46\x7c\x8d\x45\x34\xad\xa7\xde\x4c\x09\x09\xbf\xdc\x20\x81\x05\xc4\x0c\x8c\xdb\xe8\x46\xba\xfc\x0c\xde\x58\x24\xf3\x13\x92\x0a\x2a\xa5\x85\x90\xef\x6b\x92\x97\x5c\xe6\xe0\xa8\xa6\x8d\x9f\xc8\x0d\xb2\x63\xbd\x89\x60\x7f\x9e\x7a\x3b\x08\x4b\xe0\xfe\x84\x9b\xa9\x84\x8a\x7b\xdb\x4d\xc4\x9d\x1b\xa6\xfa\xc3\xf2\x45\x9e\x6f\x43\x3b\x94\x75\x46\x38\xab\x71\x11\xa5\x60\x96\xe3\xee\xaf\xa2\x99\x89\x8e\x24\xbb\xa6\x17\xa6\x90\x5f\xf3\x84\x7a\x1c\x15\x0e\x6f\x37\xd0\xdb\x8e\x55\x08\x40\xa2\xd3\x1a\x2d\x72\xff\xeb\xce\x4f\xe1\x87\x49\xf6\xcc\x55\xe0\x7c\xb1\x71\xbc\x42\x28\x92\xb3\x40\x4c\x86\xf2\x8b\x32\xb9\x63\x1e\x90\x06\x0d\xf4\x93\xd0\x04\x4e\x12\x89\x36\xe5\x2c\x3b\x86\xa7\x66\x62\x66\x5c\xc4\x75\xb9\xc9\x31\xfa\x6e\x47\x39\xe5\x85\x3b\x6f\xb1\x5f\x8f\x8b\x5b\xd1\x8f\xab\x97\x69\x5a\x8c\x75\x01\x35\xbc\xa9\x25\x3b\xf5\x0e\xe2\x16\xec\xe5\x62\x9a\xa1\x21\xd1\x69\x7f\x1e\x9b\x1c\x3f\x11\x1c\x00\x07\x90\x93\x6c\xa2\xbb\xa3\x56\x52\x16\x75\x2e\x9f\xfa\x7a\x2a\xf6\x22\x5c\x68\x4d\x7f\xa7\xbb\x2b\xf7\xf4\xdb\x0e\x3e\x5b\x37\x6d\x95\x55\x0c\x41\xfb\x65\x4e\xd2\x10\x19\x4b\x03\xae\xe4\xfe\x41\x64\x76\xb3\xf9\x99\x5a\x6c\x28\xb0\x59\xaa\x92\x84\x47\xb5\xfc\x89\xa1\xae\x92\x03\x55\x50\x4f\xf0\x6b\x96\x70\x2e\x47\xde\x93\x72\x31\xe9\xa9\x04\x7b\x8d\xc5\x92\x20\x7a\x94\x6b\xf4\x55\x44\xfb\x63\xd0\xfa\x96\x53\x9f\x71\xc2\x23\xc0\xd4\xc0\xaf\x44\x7e\x2b\x1b\xbe\x1c\x15\xea\x66\x3e\xdc\x79\x11\xed\xd9\x6f\xb7\x52\x48\xc7\xe2\xd3\xc2\xda\xa0\x54\x46\x57\xa4\x55\x78\x56\x21\xbf\x15\x26\x8e\x73\x40\x45\xd3\x7e\x18\x05\xbb\x4d\x60\x19\xe6\xa2\x48\x66\x01\x4b\xd4\x00\x17\xca\xe0\x30\x30\x67\x3f\x10\xe2\x42\x08\xfb\x56\x0c\x46\xeb\x51\x1b\x44\x92\x40\x6b\x92\xbf\x97\x71\x74\xf5\x3f\xac\x90\x60\x72\xff\x7a\xc0\xf3\x9f\x15\x85\x6b\xf2\xc9\xd1\x7e\x8c\x5b\xa2\x9a\x45\x14\x08\xe3\x1b\xa8\x7b\x66\x4a\x2d\xcd\x42\x0d\xac\xcf\xd0\x45\x0b\x2f\x49\x09\xf9\x16\x3e\x6c\x1b\x9f\xb2\xd7\x4e\x08\x9e\x48\xac\xea\x3a\x0b\x93\xb0\xbc\x10\x2d\x99\x60\x0b\xed\xb0\x97\xe1\x92\xbf\xfd\x77\x55\x16\x66\xd4\x29\xcf\xf9\x51\x9e\x9d\x55\x5d\x90\x28\x61\x2b\x5f\x67\x31\x24\x69\xd9\x32\xf2\xaa\x5c\xe1\x49\x65\x83\x9c\xc3\xee\x30\xda\x5c\x8b\xf3\x09\x92\xe1\x76\x30\x9e\xbb\x5c\xa1\xf9\xfe\x7a\x18\xad\x89\xd8\x6a\xfb\x86\x92\x99\xd1\xf0\x15\xa7\x7c\x41\xdd\x02\x2e\xf4\x4c\x02\xdb\x1f\x18\x99\xf3\x73\xa0\xd0\x00\x68\x29\x5f\x49\x23\x80\x36\xbf\x4e\x0c\x7c\xba\x57\xce\x7f\x45\xc2\xdc\xb5\x0b\xd3\x69\x93\x4b\x20\x3f\x5b\xb4\xbe\x7b\x4d\xe5\x97\xb4\x1a\xcf\x4f\xfd\x1a\x12\xb2\x5d\x0e\x5f\xb2\xe3\xad\xa4\xd9\xe9\xe0\x67\xdd\xc2\xc8\x71\x77\x73\x80\x09\xc0\x2f\x09\x60\x53\x71\x39\x53\xe1\x77\x80\x3d\x10\x6a\x8a\xbf\x87\x0a\xcd\x33\x25\x69\xa2\xa7\x57\x90\x6f\x98\x7b\x9e\xee\x95\x1b\xbb\x91\x99\x44\x48\x14\xb0\x9b\x53\x7e\xcc\x38\xf4\x16\xf6\x02\x1b\xa4\x36\x66\x8c\xcc\x3b\x11\xdb\x89\x87\xac\x60\xe1\xbc\x4c\xe1\x64\x87\xd8\x33\x10\x6b\xcb\x84\x99\x74\x4b\x51\x30\xb7\x22\x05\x2f\xc2\x85\xaa\x98\x2a\xbf\x41\x1b\x5f\x95\x59\x1f\xd4\xc7\x40\xc5\x90\x26\x75\xa8\x22\x25\xf2\x3e\x5c\x6b\x14\x7c\x29\xdb\x1c\x7d\xf9\xd8\xc3\x79\x8f\x4b\x5a\x6a\xf3\x15\x9e\xda\xa1\xbb\x7a\xaa\x90\x87\xa4\xc3\x28\x29\x5c\x1b\x86\xaa\x16\x9f\xa0\x16\x30\xd2\x80\xcd\x79\xc8\xd5\x81\x7d\x05\x67\x24\x0e\x1d\x98\x4f\x46\x01\x8c\xe0\xce\xc5\xf6\x97\xe4\x99\xaa\x15\xa0\xb7\x36\xd0\x83\xc9\x58\xc5\xbb\x12\xcf\xe0\x44\x1d\x58\x0c\xcb\xd0\xa0\xb4\x73\x4b\xa6\xc8\xf7\x46\x89\x56\xeb\x50\x08\x6a\xe1\x6e\x1d\x11\xc4\x11\x48\x0c\xdf\x9a\x2f\xea\x9a\x2e\xdf\x17\x26\x06\xcb\xfa\x53\x3a\x94\x4a\xf4\x89\xbf\x5b\x8e\x5e\x5b\x2a\xab\x61\x35\xb0\x23\xe0\x39\x67\x47\x3b\x9b\x92\xe6\xc3\xc6\x21\x56\xa1\x9c\x3e\x65\xe4\x0b\x69\x2d\xac\xe0\x6d\x68\x23\xba\x71\xaa\xa5\x7c\x7e\x48\x30\xfc\x8e\xb8\xf8\x39\x26\x3c\x6f\x0e\x49\xbf\x40\x7c\xbb\x89\xc0\xc7\x85\xcd\x70\xa3\x30\x70\xc1\xc1\xd3\x3b\xe9\x60\x86\x90\xc7\xf0\x25\x32\xc3\x86\x72\x16\x74\x33\x25\x00\x38\xe8\x4f\x0e\x81\x81\x38\xcb\x95\x5d\xd2\x0c\xbc\x7e\x55\x30\x6b\x4b\x37\x3e\xf4\x53\xe8\xd1\xd7\x34\xc0\x09\x7e\x55\x58\x9f\xce\x3a\x18\x74\xce\x99\xf0\xbb\x6f\x91\x16\x3f\xe5\x61\x37\x97\x57\xdc\x01\x33\xe1\x54\x9c\xe2\x48\x04\x13\xce\x6b\x1f\x5d\xed\x06\x5f\x87\x53\x94\x94\x0b\x1d\xfc\x1d\xb2\xbd\x5f\x37\xc3\x61\x27\x47\xaf\xed\x6f\x4f\xaf\xbf\x5b\x9e\x70\x3c\xff\x30\x7d\x42\xa5\xfe\xd7\x66\x42\xb0\x1d\x96\x04\x0b\x8e\x5d\xef\x6f\xdc\xbd\x1f\xdb\x9c\x8a\xea\xbd\x5c\x9b\xb2\xac\x20\x72\xda\xa2\xc9\xfa\x4c\x54\xcd\x22\x6c\xe6\x8f\xe2\xe4\x46\xa6\x9a\x21\x55\x3a\xdf\x53\x62\xbd\x55\x99\x88\x6b\x86\xd9\x68\x5c\xc3\xeb\x5c\xd6\xd3\x10\xfa\xc3\x5e\x1a\x50\xe0\x12\x94\xb9\x4d\xcc\x51\xc3\xb7\x7f\xbf\x7e\xf8\xc6\xc5\xf1\xde\x5f\x02\xd4\x36\x09\xd5\x92\x88\x34\xce\xc9\xbe\xdc\x47\x8c\x75\x59\xd2\xc1\xb9\xd5\xd7\xb6\xf5\xd5\x4e\x90\x04\x52\xe5\xe8\xf1\x39\x04\x7d\x8a\xea\x6d\xef\xab\x65\x73\x80\xc1\x0a\xd3\xf3\x2c\x6d\x87\x1d\x63\x80\x5b\xd2\xb4\x5b\x5f\xc6\x46\x7a\x01\x58\xf4\xac\x28\x61\xeb\x15\x5d\x39\xbc\x52\x4a\x5d\x32\x81\xfc\xe4\xc3\xd3\xc6\x4c\xc1\x8a\xbd\x22\xfc\x9e\xa9\xbd\x4c\x64\xd9\xa2\x98\x21\x21\x5a\xdf\xeb\x3b\xf3\x69\x79\x9d\xad\x07\xc5\x78\x20\xf1\xc2\xc9\x3c\xc1\xa8\x8c\x38\xa0\x9e\x77\xb0\x19\x50\xee\x4b\x90\x00\x75\xb7\x78\x7b\x61\x39\x90\x8e\x94\x99\x0a\x63\x10\xbf\xd2\xd3\x48\x0b\x2c\x35\x0b\xf5\xa7\x47\xc8\x9e\x82\x51\x41\x96\x34\x2e\xce\x18\x55\x78\x4e\x10\x63\xad\xb2\x63\x04\x1e\xa2\xb6\xce\xe1\x91\xad\xb3\xb6\xea\x79\xdd\x39\x29\x50\xee\xda\x99\x5c\x97\x18\xa6\x4f\x9b\x8c\xbc\x9a\x54\x42\xd0\xc8\xe0\x4a\xf6\x9a\x1f\x4d\x2d\x50\xc2\x77\xd9\xd1\xe8\xb2\x0c\x51\xd9\xb7\x37\xd7\x95\xa7\xd6\x21\x29\xe0\xa5\xe7\x35\x32\xcb\xab\x17\x00\x93\x76\x8b\xc6\x5a\xdb\xef\x76\xe9\x38\x97\x26\x32\x21\xa0\x67\x1c\x70\x04\xb4\x41\xe6\x2b\x8c\xf8\x09\xf1\x0a\x04\xc9\x59\x67\xa2\xae\x2d\x5c\xf2\xc1\xa3\x37\xa0\x9c\xed\x0d\x16\xac\x28\xcd\x1c\xe8\x15\xe7\xa7\x41\xec\xc2\x15\xe6\x5d\x60\x14\xec\xbc\xd2\x56\x5d\x3e\xd1\xb0\x81\xc2\x8b\xdd\x7c\x05\x20\x0c\x75\x8d\xec\x57\x7d\xc0\x61\x46\x9a\xa1\x10\x92\x09\x35\x50\x0a\x61\xb2\xe8\x02\xe6\x6c\x72\x20\xf4\x3e\x24\x4c\x56\x75\x6a\x79\xf9\x97\xa0\x4c\xe1\x62\xd6\x82\x30\x12\x83\x2f\x60\x84\xc2\x1b\x5d\x41\x97\xd9\x78\x5b\x4b\x5b\x37\xb7\x2d\x15\x37\xac\x57\x7a\xae\xfe\x9b\xff\x16\x77\x7d\xc0\x0d\xe1\xfa\xeb\xba\x19\x9e\x51\x39\x90\x1c\x3f\xe6\x73\xa6\xfb\x6f\x0d\xc5\x77\x76\xfd\xb3\x8c\x6d\x11\xff\xca\xdf\xff\x55\xd2\x67\xc7\xc7\xa2\xe5\x31\x74\xaf\x81\xa3\x85\x8e\x21\x96\x4a\xec\xb0\x26\xe7\xb0\x3b\x44\x68\x36\xc0\x52\x16\x2f\xb5\x80\x51\x63\x39\x88\x29\xbb\x24\xe0\xd8\xf0\xb4\x85\xc1\x6e\xc3\x42\x26\x96\xd3\xb0\xee\xe5\x69\x12\x89\xd6\xd7\xbe\x1d\x94\x75\xcc\xd9\x3e\x40\xcf\x54\x02\x39\xf9\x2d\xcf\x77\x4d\x94\x80\x82\x85\xdb\xdb\xc3\xaf\x7b\xcf\x31\x82\x4c\xf1\x45\xd4\x99\x1f\x04\xa6\x39\xad\x71\x89\x55\x7a\x41\x75\xca\x60\xd7\x70\xc4\x2c\x3a\x91\x9f\xac\xa2\x96\xf8\x74\xc7\x42\xb2\x48\xcd\xd6\xdb\xda\xe7\xc3\x60\xbd\x83\xa6\x6b\x54\xe3\xc5\xa2\x76\x22\x46\x21\x96\xfb\x27\xa9\xd1\xf8\xc7\xbe\xae\x09\x39\x2c\x88\x68\x99\x4c\xe6\x87\x31\x06\xcf\xec\xaa\x4c\xf1\xae\x5a\x5b\x5a\x59\x7b\x90\x00\xaf\x62\xf4\x0f\x40\x8a\xcb\xff\xdd\xef\x2f\x2e\xf6\x1c\x18\xf4\x5b\xc5\xb6\xa6\x9e\x0c\x9e\x97\xa2\xf5\xfa\x55\x31\x97\x7a\xb4\xc9\x93\xd3\x7c\xe1\x2d\x6d\xf2\x14\x6e\xd0\x2f\x45\xf0\xcb\x31\xe3\x5b\x30\x9c\x2a\x66\xbf\x68\xc2\xab\xcb\x4b\x38\x92\x6a\x67\xef\xca\x02\x66\x5f\x03\x18\x1a\xeb\x08\x02\x1d\x50\x71\x5b\xe9\x50\x6f\x66\xbc\xb3\xc1\x9a\x9e\x0d\xcf\x10\x5c\xae\x97\x4c\xc7\xdc\x59\x35\xc0\x69\x40\xeb\x93\x4d\xb9\x2d\xe1\x91\x94\xb4\x4b\x4f\x6f\x2d\xb4\x58\x7e\x9a\x9a\x85\xa9\xd2\xb2\x8d\xc4\x78\x9f\x86\xc0\x37\x78\xe7\xdb\x8f\x1b\xa8\xea\x8c\x01\xc1\x60\xfa\x2c\x4b\x4f\x5b\x2e\xef\xa0\x94\x43\x31\x19\xcf\x53\xb2\x25\xce\x72\xef\x3b\xe9\x1b\x7c\x5b\xad\xbb\x28\xdc\x01\x40\x83\x07\x52\x84\xeb\x77\x4c\xbb\x29\x61\xe9\x14\x64\xaf\x0e\xde\xcc\xad\xc9\x81\x59\xa7\xb5\xaf\x99\x50\xea\x66\x37\xcd\xcd\x35\xb5\xaa\xe0\x62\x30\xaf\xfc\xe2\xda\xc0\x18\xfe\xb0\x7b\x82\x7a\xfc\x8c\xea\x67\x90\x82\x11\x1a\xd9\x9d\x57\xbd\xf1\xa9\x6e\x4b\x90\x79\x2c\x24\x9d\x12\x0b\x4c\xe8\x47\x38\xe4\x09\x4c\xfb\xad\x77\xbd\x6e\x6c\x11\x3f\x58\x68\xb5\xc9\x84\xb9\xbb\xd9\xc8\xf9\xae\x8a\xd6\x9b\xfa\xbb\x03\x1b\x26\xd0\x16\x73\x3b\x07\xe3\x20\x76\x86\x0f\xf8\x8e\xb8\x18\x77\x6c\xf5\xd2\x12\x37\x02\x10\xdf\xd2\x00\x9b\xf8\x22\xaa\x87\x66\x72\xd5\x7a\x36\x89\x74\x2e\x9c\xcb\xe6\x1c\x6f\x2d\x90\xc6\xaa\x05\x16\xce\x36\x5a\xbe\xac\x65\x46\xd4\xf9\x96\x6c\xc3\xca\x81\xdf\xae\x8e\xc6\x0d\xe8\x24\xa4\xa0\x3e\x07\x12\xe0\xb2\xdd\xac\x5a\x64\x98\x6d\xcc\x2d\x30\xbf\xa3\x4f\xec\x2e\x08\x22\x5a\x6e\xb1\x1c\x71\xc9\x81\xee\x69\xaa\x35\x51\xf2\x89\x1e\xaa\x96\x98\x03\xad\x14\xa6\x0c\x0d\xfd\x07\x9c\xc1\x05\xe4\x88\xe6\x56\x1e\x97\xf6\xa9\xda\xb1\x74\x1e\xd2\xbd\xf2\x21\x73\xbd\xc1\xac\x76\x5d\x25\x29\xd1\xa5\xcb\x51\xd0\x98\x55\x90\xfc\x59\x07\x50\x44\xe1\x6f\xf3\x34\x7e\x33\xd4\x77\xe8\xea\xdb\x64\x17\xae\x11\xc0\x80\x19\x47\x21\x3e\xeb\x89\x3f\xa9\x74\xac\xeb\xeb\x9a\xa8\xd8\x73\x68\xe8\x5f\x67\x20\x41\x8b\x48\x16\x10\x35\x63\xf6\xdf\xbd\x31\xf0\x8c\xff\xb0\xfa\x82\xe9\xbf\x5d\x00\xb5\x89\x82\xe0\x80\x53\x36\xa5\x68\x82\x00\xd0\xa7\x70\x88\x31\x29\xbe\x30\x04\x49\x23\xb8\xa2\x23\x6c\x0f\x2e\x50\x9a\xdf\xc1\x39\xd8\x92\x34\x03\x62\x5e\x84\xfe\x38\xb3\x4a\x9a\x86\x4d\xd2\x50\x30\x02\xf0\x45\x4d\x34\x25\x0d\xd2\xf2\x79\x50\x22\xc6\x01\xd9\xce\x1b\x81\x3e\xb7\x0c\xc0\x38\xa4\xe1\x30\x94\xa0\xc9\x73\x34\x10\xfd\xc1\x19\xd8\x0f\x2f\x51\x12\xf1\x8e\x4a\x54\x14\x7b\x80\x7d\xe3\x26\xa1\xc7\xbd\xae\x4b\xe7\x2f\x03\x49\x6a\x4e\xb5\x6a\x93\xf6\x44\x3b\x36\x5e\x80\x89\x53\x95\x74\x58\xa7\x1b\xc1\xb2\x8a\xa4\x44\x4a\x1d\xae\xcd\x7b\xcb\x75\x10\xcc\x62\x93\x54\xe1\xaa\xb6\x8d\x69\x08\x56\x41\x64\x06\x88\x81\xc2\xd4\xcc\x45\x21\x73\x38\x76\x2f\x94\x21\xee\x69\x12\x7f\x51\x53\x5f\xe9\xe7\xad\x28\x9b\x1d\x98\x5f\x27\x5b\xe2\xd2\x02\x3d\x52\x71\xd8\xb6\x97\x33\x8b\xe9\xbb\x78\xe6\xd2\x08\xca\x2b\xe5\x1e\x57\x12\x2d\x8f\xef\x74\x38\x32\xc3\xfd\x15\x75\x52\x92\xb9\xa9\x0e\x81\xd9\xc9\x37\xd6\xc0\x81\x29\xc5\x26\x3a\x62\xaf\x4f\x57\x2e\xb0\x98\x0e\xed\xcc\x3f\x4b\x95\xc5\x0c\x18\xf4\x67\x0f\x62\xf2\x6c\x3d\x9a\xd6\x77\x56\x57\x0d\xa4\x1b\x78\xad\x6b\x3a\x51\x66\x26\xa2\x73\x1a\x59\xbd\x25\xdc\xd3\xdd\xd8\xfc\xa5\x5a\xbd\xe6\x89\x0a\x09\x97\x5b\x8e\x30\xef\xbc\xaf\xbf\x53\x31\x67\xfa\x0c\x11\x08\xba\x71\x5f\xfc\xab\x2f\x69\xa4\xa4\xa6\x39\x9a\xfa\xe8\x58\x1a\xa2\x1b\xaa\xab\x02\x38\x33\x9c\x29\xec\x91\x9c\x28\x7e\xea\x37\xe0\x84\xf4\x0b\x7a\x27\x1a\x93\x61\xe5\x66\x36\x12\xf3\xf9\x27\x84\x49\xa1\xeb\x0c\x56\x9a\x3f\x96\x40\x30\xc9\xd9\x79\x36\x52\x9a\x3a\x55\x85\xe6\x19\x66\xae\xfd\x3c\x31\xba\x7e\x58\xb8\x38\xd5\xc4\x4f\x48\x78\xc7\xce\x1e\xab\xb7\x08\xb7\x44\x01\x34\xcf\xe8\xe0\x7d\xe3\x75\x42\x20\x1c\xd0\x5d\x2a\x15\x79\x18\x82\x07\xfc\x04\x09\xc9\x38\xbd\x53\x0d\x4b\x51\x22\xe5\x8f\x90\xcd\x0b\x82\xce\x18\xc1\x76\xbb\x67\xd1\x86\xcc\xeb\x6b\xdd\x14\xdc\x16\x89\xab\x13\x11\x8a\x28\x7b\x91\xdd\x64\x65\x3d\xf0\x94\x64\x20\x6a\xa1\x07\xb2\xb6\x2a\xc2\x39\x28\x60\x47\xe3\x6f\x02\x46\xab\x04\x64\xe1\x43\x51\xcd\xe6\x3a\xdf\xdd\x79\x26\x5a\x46\x35\xad\x1c\x33\x18\x15\xd0\x86\x8f\x30\x4e\xf3\xba\x97\xef\xb7\x02\x0a\xe5\x4e\x97\x79\x52\x86\xbd\xba\xa1\x9a\xe2\x0c\xf0\x2b\x88\x14\xf2\x81\x71\xc9\x78\xbf\x62\x8d\x78\x04\x2b\xdf\xf7\x66\xdc\x60\x76\xf1\xb9\x8b\x73\xf0\x40\xb6\x70\xe2\x60\x9a\x8c\x32\x53\x0d\x30\x45\xfa\x0a\x79\x6a\x5f\x34\xa7\x1c\x9f\xc3\xc3\x23\x2d\xe4\x47\x62\xf5\x17\x89\x5d\x60\x89\x5a\xb4\x6b\xd8\x3e\xbf\xed\xc2\x2d\x29\x91\x49\xad\xc8\x3b\x90\xb1\x99\xb8\x3b\xad\x6e\xee\x85\x86\x18\xc3\x32\xbc\x27\xb9\x44\xe5\x40\xa0\xe9\xfc\xad\xec\xe3\x19\xf7\xe7\x1f\xe6\x25\xc6\xbf\x6a\x91\x57\x51\x10\x02\x3b\x8c\x4b\x3b\x01\xcf\x2a\x4a\x95\xb9\x4b\xd2\xce\x4b\xb4\xa4\x55\x0b\x42\xc8\xcb\x53\xb6\xda\xa6\xeb\x67\xf4\x00\x6f\x19\xfe\x08\x16\x52\x99\xd6\x7a\x0d\x45\x6f\x9f\x19\x1b\x54\x69\x80\x19\xcf\x67\x9e\x3b\x12\x21\x63\x59\xf0\x52\x2e\xe8\x4b\x0c\xbe\xe4\xee\xca\x6c\x5e\xa7\x15\xa0\x68\x9c\x7e\xbe\xfc\x93\x0e\xb3\x78\x08\xda\xf6\x3d\x84\x10\xfc\xc9\x39\x3c\x7a\xc3\xe4\x17\x7c\x2e\xd2\x88\xc8\x3e\x04\x8e\x16\x7f\xbf\xb0\xc8\x12\x3b\x06\x01\x40\x39\xe8\x13\x33\x99\x0b\xe0\x42\x97\x38\xd8\x20\xf0\x57\x43\xdd\xf9\xc2\xfd\xfa\xd4\x4a\x0d\x2a\xa2\x53\x5d\x7b\x00\x30\xe6\x73\xac\xc2\xc1\x41\xc6\x95\x1f\x34\x2e\x4a\x12\x49\x41\xc6\x41\x89\x9f\xfe\x58\x8e\x11\xb4\x39\x74\x51\x1d\x25\x66\x7e\x26\xcd\x7c\x6f\xc6\xf4\xce\x57\x9e\xe8\x1c\xcd\x8a\x45\xa3\xd0\x82\xb0\x66\x07\x96\x99\x9d\x76\xe4\xf1\xe7\x31\xf8\x05\x94\x37\xef\x42\x57\x58\x6d\x92\x08\xfd\xa0\x07\xd2\xe2\x6f\xe0\x12\x35\x73\xd3\xb1\xdf\x4e\x04\xcd\xe4\xc8\xff\xf4\x2e\x9b\x98\xf7\x3d\x2e\xc8\xa2\x83\xa4\xac\x71\x9b\xd9\xd6\x71\x59\xd8\xda\x08\xea\x13\x9b\x19\x5d\xd8\xd6\x94\xd5\x8a\xe0\x31\x44\x97\x93\x85\x05\xe2\x9b\x08\xd7\x67\xcc\xa4\x4d\xc5\x84\x4b\x11\x8a\xe3\x3d\x14\xad\xe0\xb5\x55\xff\x9b\x81\x88\x65\x4c\xbe\x2b\xfb\x85\x3a\x1a\x59\x92\xd0\x02\xe2\x7f\x2a\x76\x2a\x6e\x8d\x15\x16\xc7\x66\x11\xae\xf5\x09\xf5\x0c\xa9\x4e\x22\xcf\xa2\xd2\x4e\x21\x7e\x78\x1e\xae\x72\xa0\x4a\x72\xaa\x23\xc9\x61\x4e\x5a\x07\x11\x09\xf7\x76\xa1\x98\x63\x3b\x78\x09\x9a\xe1\x33\x35\xbc\x60\x55\x69\x49\xc4\x64\x74\xf0\xe7\x12\xb7\xb0\x94\xc1\x1d\x03\x97\xce\x1f\x03\xf7\xc9\xb3\x46\x2e\x47\x61\x10\xd9\xab\x4f\x52\xd6\x5f\x47\xf5\x60\xf6\xd8\xbd\xb3\x32\x88\x6e\x3f\x05\x02\xe3\x55\x23\x8b\x6c\xb1\xe3\x7a\x75\x1f\x70\x3e\x6d\x8f\xd1\x32\x45\x08\xdc\xf9\xd2\xc7\x31\xaf\x30\x04\xdd\x63\xbb\x6b\xdc\x56\x48\x88\x7d\x5a\xf1\xe5\xe5\xf4\xe6\xcd\xb0\xa8\x50\x21\x59\x27\x43\x24\x88\xe1\x73\xbb\x36\x77\xb8\xbc\x9b\x1a\x69\xa2\x86\x09\x9c\x77\x92\x45\xf9\x93\xd4\xb3\xae\x0f\x5f\xf9\x14\xd5\x4d\x8c\x5b\x12\x65\x69\x3b\x51\xb6\x2c\x4b\xe8\x57\xd7\x0b\x1c\xdc\xaa\x27\x7f\xf4\x75\x0d\x01\x65\xcf\x65\x5e\x38\x49\x92\x78\xf8\xf8\x24\xc3\xe3\x0f\x52\x19\xf2\x4e\x19\xc2\xea\x0e\xaf\x76\x93\xf0\x84\xaa\x9c\x8a\x40\x36\x7b\x1c\x56\xb5\xd2\x2a\xa7\x01\xe1\x03\x59\xde\x46\x5e\x19\x53\x4b\x91\x19\x4c\x9d\xb5\x62\x64\x61\xf2\x2e\xdb\xa6\xea\x4d\x5f\x21\xe6\x06\xc0\xc7\x97\xc4\x8c\xf9\xe3\x7f\x1b\xfa\xb9\xad\xdc\xa3\x64\x78\xbd\xc8\xbd\xc4\xf2\x61\x32\x25\x0e\xde\x4e\xc2\xf0\x44\x64\x9c\x3e\xc2\xdd\x73\xf8\xf7\x7a\x88\xe9\x1f\x56\x59\xd0\x8d\x7f\xb9\x43\xe3\x4f\xc9\xd1\xd3\x02\x0d\x1a\x21\x07\x2c\x41\xbb\xb0\xbe\x8a\xf7\xfe\x02\x51\xdd\x3d\xcb\x6b\xcd\x9b\xcb\xa6\x2e\x49\x05\x1e\xd5\x1b\x65\x28\xce\x67\x36\xc1\x8e\x4b\x2b\x3b\xed\x12\x89\x47\x32\x89\x07\x3a\x48\xc4\x35\x83\x6b\x9f\x31\xcc\xb2\x81\xd1\x90\x77\x28\x98\x03\x88\xbe\x52\x3f\xc9\x6f\x78\x66\x34\x4a\x75\x6c\x39\xa9\x29\xae\xa7\xaa\x4a\x50\x8a\xc2\xcf\x86\x20\xb7\xd9\x16\x5b\xfc\x77\x15\x04\x32\xd1\x6d\x3f\xbb\x00\xae\x1b\x0b\x69\x6c\x43\x52\xa3\x24\xb4\x86\x47\x31\x03\xe1\xc1\x05\xe2\x92\xf7\x40\x2f\xb9\x80\x9a\x47\x3f\x92\xb0\x5e\x87\xaa\xec\x7b\x4f\x19\xdf\xc9\x29\x17\x6c\xb3\x5f\xda\x28\x66\xd3\xd3\xca\x5a\x9d\xac\xc8\xdd\xb0\x76\xd0\x96\xc1\xfe\xcc\x88\xdb\x11\x2c\xbe\x07\x09\x74\xb4\x24\x10\x3a\xa9\x0f\x19\xdb\x99\x6b\x70\x5b\x21\x92\x42\x17\xaf\x15\x7c\x34\xd0\x9d\x99\x7a\x3e\xa8\xf3\x70\x31\x63\xcc\x69\x93\x1d\x19\xe1\xe7\x35\x01\x78\x4f\xf7\x3e\xc2\xfd\xaa\x22\x1a\x7f\x3c\xfd\x4e\x01\x46\xea\x49\x5f\x62\x16\xce\xc6\x2b\xef\x4b\x98\x68\xa0\xe6\xe2\x0b\xc3\x52\xaa\xf8\x76\x43\xcc\x7c\xeb\xae\x91\xb7\x41\xbd\xe0\x54\xe3\x5b\x19\x0f\x06\xf2\x64\x3a\xb6\x42\x24\xd3\xa5\x45\x6e\x0c\x7f\x82\x27\x07\x2a\x38\xb3\x3b\xf2\x9b\xec\x0c\x30\x9a\x1b\x4a\x15\x03\x3d\xd2\x57\x9a\xd5\xfb\x6d\x3e\xc7\x64\x91\xde\x7c\x55\x25\x8d\xc9\x8e\x85\xc6\xc5\x9e\x0d\x12\x0a\xa4\xc9\x8e\xa9\x8f\x0b\x80\x4d\xa2\x4c\x3e\x7c\xe4\xbb\xec\x38\x7c\xd2\x76\x3b\x10\x03\x13\x6c\xae\x43\xd7\x6b\x94\xde\xc5\x2f\x5c\x33\x13\x4d\x36\x8e\xf0\x7b\x36\x3b\xd7\x36\x6e\x4d\x06\xf6\x9d\x79\x1d\xe7\x90\xe4\x33\x60\xe9\xd3\x15\x16\xf7\x38\xe0\xb2\x49\x44\xe8\x9e\xd0\xaf\xa4\xad\xd1\x4e\xf1\xfe\xa0\x93\xe2\x45\xf3\x69\x75\xcd\x67\xeb\x7e\x9f\x5d\x5b\x12\x80\xb6\x0b\x43\x07\x74\xf0\x76\xb3\x35\xfa\x2a\xb9\x88\x95\xcf\x39\x1e\xe1\x4a\x9f\x52\xe5\x6f\x0d\xcc\x1f\xbe\x78\x5f\x74\x4c\x5e\x04\x0b\x16\xbd\xb4\x97\x03\x41\xfb\xc8\xba\x07\x48\xad\x2e\xca\xcf\x51\x19\xe7\x5d\xf1\x05\x9d\xff\x95\x38\xc2\x03\x47\xa9\x4f\xaf\xcf\xc2\xd8\xf4\xc0\x9b\xc1\x68\x61\xe1\x2e\x02\xe3\xf7\xdb\x7e\x0a\x63\x55\x81\x72\x2c\x4d\x3f\xd1\x7d\x59\x4b\xe2\x51\x88\x03\x7f\x02\xdf\x9b\xcd\x4e\x72\xfc\xb2\x27\xd3\x4f\x96\xd0\xc4\xae\x1a\x96\xbb\xe4\x9d\x9e\x93\x7a\xa2\x7e\x12\x5d\xaa\x19\x1e\x63\x1a\xc5\x30\xce\xe7\xc4\x98\xe6\x99\xe8\x5d\xfc\xbd\x65\x42\xef\x3f\xcd\x98\xcb\xe7\x3f\x57\x08\x8c\xff\x3e\xf2\x30\x37\xc8\x09\x4f\xa0\x74\x39\x4e\x04\x66\xee\xe8\x6e\x93\xa5\xf6\x78\xb1\x05\x86\xeb\x72\x4b\xca\x84\xe4\x1a\x53\xc0\x27\x2a\x6b\xd0\x81\x71\x4a\x84\x9c\xd9\x01\xb8\x70\x17\xb5\x4c\xf7\x9c\xe5\x00\xcb\x65\xba\xbe\xc3\xb7\xbe\x6f\x78\x89\xa2\x3a\xac\x25\x2a\xd2\xf4\xca\x2d\xd4\xb0\x70\x1c\xc6\xbc\xe7\x13\x02\x74\xc3\x49\x10\x95\x96\x68\x1c\x0d\xf0\xb0\xb1\x5d\x47\xfd\x6c\x73\xad\xf8\xf4\x66\xd0\x8b\xd4\x2b\x26\xe1\xe0\xa4\x20\xae\x6e\xc7\x0d\xf4\xb1\xa0\x8c\x44\x26\xac\xcb\xdf\xb4\xfb\xc1\x71\x95\x36\x8a\x5b\xc1\xeb\x68\xe1\x4f\x6d\x62\x9e\xf5\x8b\x9e\xee\x0a\x66\xf7\x2b\x3d\x7b\xc8\x1e\x84\x70\x64\x35\x28\x38\xe8\xef\x08\x76\xd4\x58\x68\x0d\x11\x5a\x93\x9f\x49\x43\x75\xf9\xbb\xca\xb9\x49\xa6\x4b\xb5\x03\x08\x0c\x59\x66\xe1\xb1\xb6\xe0\xb7\xc8\x2d\xde\x6e\xa8\x59\x98\xdc\xb7\xaf\x89\xc8\x9c\x76\x5b\xf8\x12\xae\x87\x1f\x15\xec\x08\xdf\x23\x63\x3d\x41\x38\xa6\xa8\x85\x9e\x3d\x30\xee\xe5\xfe\x45\xfd\xca\x8c\xc5\x33\x37\x9d\x5c\xc2\x77\xe7\xbc\xdc\x49\x91\x9d\x02\x02\xbb\x7a\xd4\x04\x60\xc6\x7b\xb3\x94\xa4\x18\x71\x06\x8b\x43\xda\x35\x24\x86\x64\xe4\x7a\x99\x36\xfa\x58\xf7\x80\x46\x6b\x18\x20\xfe\x44\x07\x79\xc8\xe8\x77\x28\x3b\x0e\x31\xf9\xd4\x49\xb7\xae\xe8\x07\x30\x00\xc2\xf5\x5d\x9e\xa9\xc8\x5f\xd9\x35\xa5\x0a\x32\x53\xec\xb8\x6d\x27\x5f\xb8\x6d\x79\x77\x32\x49\x40\xb1\xda\xe1\x0c\xc9\x2b\xff\xf4\xd4\xe9\x6b\xc8\xf5\x83\xe5\x3a\x03\xd4\xa9\x54\x86\xeb\x48\x41\xac\xb6\xec\x38\x40\x23\x9b\x5f\xc4\xca\x8c\xc2\x37\xd0\xb6\x97\xeb\x14\xc9\x30\xb1\x6f\x97\x69\xaa\x79\x27\x94\x53\x0a\xcb\xbf\x7d\x20\x96\xcb\x78\x2b\x1d\x47\x66\xd2\xf9\x10\xa8\x81\xb5\x17\x6f\xb5\x4d\xf9\x60\xad\x0d\xa3\xe4\x60\xd2\xad\x22\x76\x55\x9f\x2e\x23\xd3\x90\x12\x55\xcc\x5f\x1a\x5e\x64\x8b\xb9\xb2\x77\xf0\x32\xe5\xff\xc7\xdc\xf5\x34\x27\xca\x3c\xe1\x7b\x3e\xc5\x54\xb6\xea\x77\xb1\x22\xa0\xa8\x98\xb8\x56\x21\x08\x28\x20\x02\xc6\xa8\x97\x5f\xf1\x1f\x14\x18\x84\x41\x01\xdf\x7c\xf7\xb7\x44\x93\x98\xdd\x6c\xed\x1e\xf6\xf0\x5e\x70\xec\x7e\xba\x9f\xee\x87\x9e\xd1\x13\x2c\xbc\x86\x79\x74\x5c\xdb\x4f\x91\xc3\x6a\x0b\x59\x3f\x96\x29\xc7\x78\x13\x8a\x1a\xe3\x9d\xae\x50\x36\x48\xda\x6f\x59\x2b\x75\x23\xb5\xb5\xf3\x7f\x6a\xe9\xd9\xe9\xb9\xfb\xd5\x0b\x37\xeb\xfe\xd5\x5f\xcc\x2a\xf8\x8f\x3d\x2d\x3c\xea\x7f\xbc\xa6\x1d\x47\x07\x1c\xa7\x9f\x7d\xab\x21\xaf\xbb\xb6\x12\x79\x0e\x37\xf5\x08\x0e\x2e\x97\xc9\xf3\x4b\xc8\x31\x78\xd6\x9a\x70\x1c\xb1\x2d\x46\xa6\x2f\x6e\xc9\x91\x5e\xac\xed\xcc\x9a\xaf\xad\x71\xa4\x46\x13\x76\x8f\x7b\xd9\x58\x9b\x2c\x83\x92\x5c\x24\x6c\x6f\xc9\x55\x1c\x21\xc0\xce\xd6\x69\x19\x24\xf2\x95\xfd\xcc\x0f\x93\x8e\x5c\x91\x55\x6e\x57\x55\x82\x1f\x13\x6d\xc1\x50\xee\x3c\xdd\xe1\xd8\x82\xe9\x36\x5c\x16\xad\x03\x4b\x12\xfa\xbd\x05\x21\x5a\xad\x83\xca\x5a\x59\x23\x15\xda\xce\x33\x5d\x2c\xab\x38\xc6\xdd\x98\x60\x35\x99\x1a\x37\x02\xc5\x3e\x74\x2c\xd4\x5e\x45\x1b\xbe\x5b\x2e\xc3\xd9\xb6\x9b\xc1\xf0\xd9\xf4\x96\x0b\x84\xef\x3b\x1c\x8f\x56\xdd\xc3\x6a\xcf\x74\x97\xbb\x70\x31\x6e\x88\xb4\x82\x29\x0a\x2b\xe8\x13\x75\xae\xa9\x49\xb6\x62\x1a\xbb\xdd\xb8\x6a\x8d\x25\x1a\x2f\x33\x74\xa0\x48\x24\x55\x65\x6e\x65\xe6\xcb\xa8\x0c\x32\x9a\x77\x1b\x2a\xad\xb7\x18\x86\xd5\x34\x49\x9e\xca\x51\xc1\x34\x02\x8a\x21\xb7\xb6\xc4\x44\x58\x25\xf7\x14\x45\xe4\xf8\x04\x59\x4a\x17\x1b\x2d\x92\x29\x5e\x3a\xea\x08\x5f\x37\x22\x57\x54\xf3\xcd\x86\xc7\xb7\xaa\xe7\x68\xe6\x0b\xb5\xb2\x61\x04\xcd\xac\x2f\xcd\xa8\xcc\xb2\x1a\xcf\x73\x61\x56\x92\xec\x71\x4f\x4d\xc2\x2d\x44\x93\x89\x3a\x8e\x3a\x7d\x4c\x83\x7a\x29\x13\x8c\xb8\x5b\x89\x9b\xd9\x28\xea\xed\x26\x4b\xaf\x94\xbb\x47\x8f\x8e\x75\x4f\x13\xfb\x87\xbd\xea\x0a\xf3\x40\xe6\x58\x61\x5f\x72\xcb\x4c\xd2\xfa\x4c\x84\x43\x72\x5d\x41\x9a\xd6\x53\x7d\xcb\x38\xa1\xea\x6a\x73\x93\x58\x5a\xe4\x3e\xc6\xc7\xeb\x8e\xd4\x7a\xe9\xf3\x63\x63\x24\x59\x85\xea\x71\x42\xc2\x9b\x3b\x79\xc2\x4e\xbb\x7d\xa7\x71\xdc\x4e\xa9\xe5\x6a\xaf\x79\x62\x60\xe3\x69\xcf\x45\xaa\x5d\xec\xb4\xac\xaf\xef\xe9\xd6\xce\xa3\x23\x82\xd4\xf5\x89\xea\xf7\x73\x3f\x97\xf8\xb9\x1c\x8b\xd3\x0c\xeb\x88\xfb\x5c\x22\x0a\x7c\x86\x6b\x4c\x16\x54\x81\x07\x59\x43\xda\x8f\x6c\x01\xca\x41\x79\x48\xc3\x51\x26\x2c\x0b\xe2\x98\xf8\x2c\x39\x62\x9c\x23\xdc\x17\xbc\x28\xb2\x47\xda\x43\x4a\x49\x4d\x73\x77\x9d\xef\x1a\x1d\x0f\x86\x3c\x6f\xf0\x9b\xa3\x45\x64\x13\x1e\xb2\x55\x9b\x56\xe6\x1b\x7d\x29\x19\x82\xb7\x3c\x96\x36\x9c\xb2\x32\x21\x90\xac\xa9\x2a\x6c\xee\xf9\xa3\xf6\x3a\x51\x58\x92\x14\x5c\x28\x78\x71\x4e\x3a\x3d\x1d\xe2\x39\x1d\xe0\x19\x12\xa4\x69\x9b\xce\x6d\x6a\xd4\x37\x13\x21\xef\x1e\xe6\x50\xcf\xfb\x0b\xc4\x86\x5d\xf4\x9c\x43\x2e\x98\xac\x15\x2f\xc7\x1b\x44\x87\x92\xc5\x48\x29\x60\x84\x4a\xb6\xad\x06\x58\x5b\x5e\x68\xbd\x80\x12\xf1\x31\xcb\x13\xbc\xa0\x74\xd8\x71\x7b\x45\xb2\x87\x99\xe1\x6f\xc2\xa9\x72\x1c\xef\x14\x7a\x71\xb0\xe7\x56\x0b\xc3\xfc\xa2\x1d\xad\xa6\x9d\x90\x9b\x1a\x1c\x25\x52\xa6\x8e\x6c\x7c\xcd\xbb\xb1\x32\x35\x65\xde\x29\x5a\x44\xd1\xb5\xea\x67\x91\x2a\xe1\x64\xce\x4e\xab\xb4\x67\x49\x7f\xe9\xa0\xb8\x03\xa0\x19\x1b\x69\x0a\x8f\xe0\x74\x0c\x6c\xe4\x3f\x02\x3c\x29\x9e\x6a\x7b\x62\xd8\x76\x10\x7b\xe0\x04\x22\x23\xf5\x82\xf8\x11\x10\xf8\x9b\xf3\x9b\xef\x18\xb6\x93\x82\xd3\x1d\x00\x00\x7c\x64\x7f\x04\xdf\x70\x1c\x7f\xba\x03\xa0\x46\x85\xd0\x83\x57\x8c\xef\x04\x9e\x8f\x1e\x41\xab\x93\x14\x4f\xb5\xe5\x23\xeb\xc5\x52\x93\xd6\x07\x57\x60\xc1\xf8\x1a\x76\x29\x8a\xe8\xfe\x08\xf1\x8d\xcc\xbf\x42\x2c\x18\xc2\xf4\x11\x7c\xeb\xf7\xfb\x6f\x98\x01\x96\xa1\x32\x74\x86\xe7\x25\x0a\x50\xe8\x0c\x4f\x27\xd0\x9c\x1b\xc8\x07\xaf\xaf\x03\xec\x62\xba\x1b\x60\xe7\x2e\x86\x77\x03\x13\xda\x65\x8d\xb5\x83\x03\x08\xec\xef\xf7\x97\xee\xee\x81\x15\x1a\x59\xf6\xfd\x3e\x85\xc7\xfb\x61\xcd\x55\x23\xae\x56\x0b\x86\x0f\x45\xf6\xd0\xba\xba\x6e\xc2\xcf\x6d\xbf\x07\xd7\xe5\xd6\x96\xe1\xff\x62\x33\x4b\x9e\x06\x98\x1d\x1c\xae\xe9\xde\x96\x1f\x0b\x33\xc5\xde\x4b\xf9\x4c\x44\xb4\xbe\x28\x22\x31\x62\x27\x04\xf5\xf5\xc1\x76\x5c\x23\x0f\xd1\xe7\x7a\x6e\x71\x0f\xe7\xbe\x82\xd8\x7b\x47\x00\x30\xc8\x50\x0a\x63\x6f\x38\x89\x6d\xa7\x00\xd0\x05\x9f\x84\xba\x3a\xdf\xd1\xa7\x13\x08\x5c\xd0\x14\xce\xe2\xbf\xbe\x7e\x24\xb9\x21\x7a\xbf\x3b\x37\x24\x75\xe0\xcf\x51\x1f\x3a\x5c\x21\x4e\x6c\x7f\x00\x3e\xb9\x07\xc8\x30\x43\xe7\x8d\xe3\xf2\xa5\xbe\x3e\x64\x28\x0d\x12\xc7\xbe\x6d\x09\xa5\xb7\xd4\x03\x64\xbf\xc5\x5d\x26\xfd\x53\x61\x5f\x14\x5f\x4f\x5f\xbd\xfa\xbf\x19\x1a\xf1\xee\x8b\xfb\xf6\x56\x21\xb2\x7f\xc1\x74\xdd\x3b\x3f\x52\x19\xc0\x4f\x1d\xf7\xfb\xfd\xe9\xd4\x1c\x19\xd6\x4e\x0a\xe2\x1d\xf8\x07\xe4\x69\x38\xce\x2c\x23\x71\x5e\x5f\xef\x87\xcd\xe6\x00\x33\x7e\xc3\x32\xfc\x6c\x1b\x60\xb7\x1d\x9f\x4e\x20\x35\x62\xcf\x01\x4d\x29\xc8\xd0\x79\x03\xdf\x6a\xfe\x93\x36\x7f\x22\xc6\xe9\x74\xfe\xe0\x52\x18\x8d\x0b\x04\x9a\x33\x23\xaa\x4b\xfd\x73\x59\x7e\x29\xc3\x75\xd6\x6e\x34\x00\xe7\xcc\x67\xc7\x99\xa5\x1e\xc2\xdf\xaa\x71\x46\xeb\x41\x75\x41\xff\x4a\x98\x9f\xc7\xab\x9e\x9f\xaf\xf7\xe1\x00\xbb\x1c\x09\x03\xcc\x47\x51\x38\xbc\xfb\x37\x00\x00\xff\xff\x2c\x5b\xe8\xd0\x66\x9e\x01\x00") func dirIndexHtmlDirIndexHtmlBytes() ([]byte, error) { return bindataRead( @@ -296,7 +296,7 @@ func dirIndexHtmlDirIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 105928, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 106086, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -316,12 +316,12 @@ func dirIndexHtmlIndexGo() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/index.go", size: 21, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/index.go", size: 21, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _dirIndexHtmlKnowniconsTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x1c\xd0\x4d\x8e\xec\x20\x0c\x04\xe0\x7d\x1d\xa6\x36\xef\x5d\xc8\xcd\x5f\xc8\xc0\xc4\x1d\x5b\x69\xd2\xa7\x1f\x39\x9b\x0f\x15\x08\x15\x98\x22\x09\x94\x5e\x6b\x08\xca\xd5\xc1\xd7\x54\x30\x81\x49\x63\x35\x03\xb3\x38\x98\x67\x03\xf3\x91\x02\x5f\x60\xfe\x44\x5e\x15\x2c\x6a\x60\x59\x05\xac\xe3\x02\x5b\xaf\xe0\x06\x6e\x71\x7f\xf3\x39\xc0\x9e\x0c\xec\x76\x80\xbb\x5c\x02\xee\xda\xc0\xdd\xc0\x9f\x72\x83\xa3\x44\xc9\xec\x19\x9c\xfa\x2f\xf8\x1f\x34\xf0\xc8\x35\xb0\xc0\xc1\xc3\x35\x88\xe8\x0e\x6a\x9c\xea\xa6\xa0\xfe\x36\x50\x35\xf6\x2c\x83\x7a\x83\x6f\x07\x4f\x39\xc1\xf3\x05\x9e\x5e\x41\x93\xa8\xb1\xe7\x47\xf6\x1e\xa0\x37\x09\xbe\xa0\x3f\x13\xf0\xe5\xe0\x47\x2e\x70\x0d\x7b\x58\xe0\x8a\xf7\xdf\xc1\xb7\x2b\xfe\x02\x00\x00\xff\xff\xa9\x82\x1a\xb0\x31\x01\x00\x00") +var _dirIndexHtmlKnowniconsTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x1c\xd0\x5d\x8e\xc3\x20\x0c\x04\xe0\xf7\x39\xcc\xbc\xec\x5e\xc8\xe5\x2f\x74\x61\xe3\xc6\x56\x4a\x7a\xfa\xca\x79\xf9\x90\x41\x68\x34\xa6\x48\x02\xa5\xd7\x1a\x82\x72\x76\xf0\x31\x15\x4c\x60\xd2\x38\xcd\xc0\x2c\x0e\xe6\xd9\xc0\xbc\xa7\xc0\x17\x98\xdf\x31\xaf\x0a\x16\x35\xb0\xac\x02\xd6\x71\x82\xad\x57\x70\x03\xb7\xf8\xbf\xf9\x1c\x60\x4f\x06\x76\xdb\xc1\xa7\x9c\x02\x3e\xb5\x05\x25\x34\xf0\xaf\x5c\xe0\x28\x11\x35\x7b\x06\xa7\xfe\x04\xbf\x41\x03\xf7\x5c\x03\x0b\x1c\xdc\x5d\x83\x18\xdd\x41\x8d\x57\xdd\x14\xd4\xff\x06\xaa\xc6\x9d\x65\x50\x2f\xf0\xe5\xe0\x21\x07\x78\x3c\xc0\xc3\x2b\x68\x12\x31\x76\xf7\xb2\xd7\x00\xbd\x49\xf0\x01\xfd\xde\x83\x2f\x07\xdf\x72\x82\x6b\xd8\xcd\x02\x57\xb4\xb8\x82\x4f\x57\x7c\x03\x00\x00\xff\xff\x93\x43\x2e\x24\x37\x01\x00\x00") func dirIndexHtmlKnowniconsTxtBytes() ([]byte, error) { return bindataRead( @@ -336,12 +336,12 @@ func dirIndexHtmlKnowniconsTxt() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 305, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 311, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _dirIndexHtmlPackageJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x8f\xbd\x4a\x05\x31\x10\x85\xfb\x7d\x8a\x21\xf5\xbd\x89\x5e\xb0\xd9\xda\xc6\xc2\x4e\x6c\xc4\x22\x37\x19\x93\x81\xfc\x91\x9f\x65\x41\xf6\xdd\x25\xd9\x05\x17\x1b\xdb\x8f\x73\xbe\x99\xf3\x3d\x01\x30\xd9\xaa\x8d\x99\xcd\xc0\x9c\x21\xcc\xd5\xb2\x4b\xc7\xf7\x66\x0a\x9b\xa1\x47\x00\x58\xcb\xae\x27\x6c\xad\xa9\xcc\x42\x18\xaa\xb6\xdd\xb9\x8a\x5e\x50\xfa\x2a\x42\x53\xbe\x52\xd0\xb8\x5e\x6d\xf5\x8e\x4d\x00\xdb\x90\x98\xf5\x57\xa1\x17\x55\xc8\xa7\x98\x6b\x37\xfd\x63\xb8\xec\x1d\x13\x17\xcc\x85\x62\xe8\x95\x47\xfe\xc4\x6f\x67\xf7\x33\x26\x0c\x1a\x83\x22\xec\xaf\x7e\x7c\x1e\xfc\xfd\xdc\x79\xe0\xb7\x7d\x90\x93\xc1\x34\x69\x70\x5c\x8f\x07\x23\x85\xa1\x0c\xf4\xfa\xf2\xb6\xb3\x20\xfd\x00\x7f\x37\x6d\xd3\x4f\x00\x00\x00\xff\xff\x5f\x4d\xc1\x64\x2f\x01\x00\x00") +var _dirIndexHtmlPackageJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x8f\x4d\x4b\xf3\x40\x14\x85\xf7\xf9\x15\x97\xcb\xbb\x6c\x26\xed\x4b\xdd\x64\xab\x2e\xba\x50\x41\xa5\x1b\xeb\x62\x92\x5c\x67\x2e\xcc\x47\x98\x8f\x12\x90\xfe\x77\x99\x24\x50\x05\xc1\xed\xc3\x3d\xcf\x3d\xe7\xb3\x02\x40\x99\x93\xf6\x01\x5b\x40\xa3\x98\x42\xd2\xb8\x29\xb8\xcb\x2a\x62\x0b\xe5\x04\x00\x73\x30\xe5\x42\xa7\x34\xc6\xb6\x69\x14\x27\x9d\x3b\xd1\x7b\xdb\xf0\xf8\x11\x9b\x81\x43\xcd\x6e\xa0\xa9\xd6\xc9\x1a\xac\x00\x2e\xb3\x44\x4d\x57\xc5\x70\xee\x23\xdb\xd1\x87\x54\x4c\x7f\x18\x36\x4b\x46\xf9\x33\x85\xc8\xde\x95\xc8\x4e\xdc\x88\xff\xdf\xdd\x77\x34\x92\x1b\xc8\xf5\x4c\xa5\xea\xdb\xfb\xca\x8f\xd7\xcc\x56\xec\xf6\x62\xbb\x2c\x32\xd2\xa9\x2c\x15\xcd\xef\xfd\xca\xb8\x27\x17\x67\xf4\x70\x78\x5d\x98\x93\x76\x06\xbf\x54\xc2\x40\x86\x64\xa4\x5b\x3b\xac\x23\xa0\xf7\xd6\x72\x82\x5a\x42\x6d\xe1\x84\x6a\x82\x31\x77\x86\xa3\x86\x7f\xc7\xfb\xe7\x97\xc3\xd3\xe3\x09\x97\xec\x8f\x29\x5b\xb1\xc7\xea\x52\x55\x5f\x01\x00\x00\xff\xff\x95\xbf\xad\xd5\x83\x01\x00\x00") func dirIndexHtmlPackageJsonBytes() ([]byte, error) { return bindataRead( @@ -356,7 +356,7 @@ func dirIndexHtmlPackageJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/package.json", size: 303, mode: os.FileMode(420), modTime: time.Unix(1501977511, 0)} + info := bindataFileInfo{name: "dir-index-html/package.json", size: 387, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/vendor/github.com/ipfs/go-ipfs/blocks/blockstoreutil/remove.go b/vendor/github.com/ipfs/go-ipfs/blocks/blockstoreutil/remove.go index f4ae8733b3..1fe46b7a04 100644 --- a/vendor/github.com/ipfs/go-ipfs/blocks/blockstoreutil/remove.go +++ b/vendor/github.com/ipfs/go-ipfs/blocks/blockstoreutil/remove.go @@ -7,9 +7,9 @@ import ( "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - bs "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + bs "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" ) // RemovedBlock is used to respresent the result of removing a block. diff --git a/vendor/github.com/ipfs/go-ipfs/commands/command.go b/vendor/github.com/ipfs/go-ipfs/commands/command.go deleted file mode 100644 index 1813ef1258..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/command.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Package commands provides an API for defining and parsing commands. - -Supporting nested commands, options, arguments, etc. The commands -package also supports a collection of marshallers for presenting -output to the user, including text, JSON, and XML marshallers. -*/ - -package commands - -import ( - "io" - - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -var log = logging.Logger("command") - -// Function is the type of function that Commands use. -// It reads from the Request, and writes results to the Response. -type Function func(Request, Response) - -// Marshaler is a function that takes in a Response, and returns an io.Reader -// (or an error on failure) -type Marshaler func(Response) (io.Reader, error) - -// MarshalerMap is a map of Marshaler functions, keyed by EncodingType -// (or an error on failure) -type MarshalerMap map[EncodingType]Marshaler - -// Command is a runnable command, with input arguments and options (flags). -// It can also have Subcommands, to group units of work into sets. -type Command struct { - Options []cmdkit.Option - Arguments []cmdkit.Argument - PreRun func(req Request) error - - // Run is the function that processes the request to generate a response. - // Note that when executing the command over the HTTP API you can only read - // after writing when using multipart requests. The request body will not be - // available for reading after the HTTP connection has been written to. - Run Function - PostRun Function - Marshalers map[EncodingType]Marshaler - Helptext cmdkit.HelpText - - // External denotes that a command is actually an external binary. - // fewer checks and validations will be performed on such commands. - External bool - - // Type describes the type of the output of the Command's Run Function. - // In precise terms, the value of Type is an instance of the return type of - // the Run Function. - // - // ie. If command Run returns &Block{}, then Command.Type == &Block{} - Type interface{} - Subcommands map[string]*Command -} - -// Subcommand returns the subcommand with the given id -func (c *Command) Subcommand(id string) *Command { - return c.Subcommands[id] -} - -func ClientError(msg string) error { - return &cmdkit.Error{Code: cmdkit.ErrClient, Message: msg} -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/context.go b/vendor/github.com/ipfs/go-ipfs/commands/context.go new file mode 100644 index 0000000000..9b8d08f1fa --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/commands/context.go @@ -0,0 +1,130 @@ +package commands + +import ( + "context" + "errors" + "strings" + "time" + + core "github.com/ipfs/go-ipfs/core" + coreapi "github.com/ipfs/go-ipfs/core/coreapi" + loader "github.com/ipfs/go-ipfs/plugin/loader" + + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("command") + +// Context represents request context +type Context struct { + Online bool + ConfigRoot string + ReqLog *ReqLog + + Plugins *loader.PluginLoader + + config *config.Config + LoadConfig func(path string) (*config.Config, error) + + Gateway bool + api coreiface.CoreAPI + node *core.IpfsNode + ConstructNode func() (*core.IpfsNode, error) +} + +// GetConfig returns the config of the current Command execution +// context. It may load it with the provided function. +func (c *Context) GetConfig() (*config.Config, error) { + var err error + if c.config == nil { + if c.LoadConfig == nil { + return nil, errors.New("nil LoadConfig function") + } + c.config, err = c.LoadConfig(c.ConfigRoot) + } + return c.config, err +} + +// GetNode returns the node of the current Command execution +// context. It may construct it with the provided function. +func (c *Context) GetNode() (*core.IpfsNode, error) { + var err error + if c.node == nil { + if c.ConstructNode == nil { + return nil, errors.New("nil ConstructNode function") + } + c.node, err = c.ConstructNode() + } + return c.node, err +} + +// GetAPI returns CoreAPI instance backed by ipfs node. +// It may construct the node with the provided function +func (c *Context) GetAPI() (coreiface.CoreAPI, error) { + if c.api == nil { + n, err := c.GetNode() + if err != nil { + return nil, err + } + fetchBlocks := true + if c.Gateway { + cfg, err := c.GetConfig() + if err != nil { + return nil, err + } + fetchBlocks = !cfg.Gateway.NoFetch + } + + c.api, err = coreapi.NewCoreAPI(n, options.Api.FetchBlocks(fetchBlocks)) + if err != nil { + return nil, err + } + } + return c.api, nil +} + +// Context returns the node's context. +func (c *Context) Context() context.Context { + n, err := c.GetNode() + if err != nil { + log.Debug("error getting node: ", err) + return context.Background() + } + + return n.Context() +} + +// LogRequest adds the passed request to the request log and +// returns a function that should be called when the request +// lifetime is over. +func (c *Context) LogRequest(req *cmds.Request) func() { + rle := &ReqLogEntry{ + StartTime: time.Now(), + Active: true, + Command: strings.Join(req.Path, "/"), + Options: req.Options, + Args: req.Arguments, + ID: c.ReqLog.nextID, + log: c.ReqLog, + } + c.ReqLog.AddEntry(rle) + + return func() { + c.ReqLog.Finish(rle) + } +} + +// Close cleans up the application state. +func (c *Context) Close() { + // let's not forget teardown. If a node was initialized, we must close it. + // Note that this means the underlying req.Context().Node variable is exposed. + // this is gross, and should be changed when we extract out the exec Context. + if c.node != nil { + log.Info("Shutting down node...") + c.node.Close() + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/legacy/command.go b/vendor/github.com/ipfs/go-ipfs/commands/legacy/command.go deleted file mode 100644 index e2611559af..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/legacy/command.go +++ /dev/null @@ -1,68 +0,0 @@ -package legacy - -import ( - "io" - - oldcmds "github.com/ipfs/go-ipfs/commands" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("cmds/lgc") - -// NewCommand returns a Command from an oldcmds.Command -func NewCommand(oldcmd *oldcmds.Command) *cmds.Command { - if oldcmd == nil { - return nil - } - var cmd *cmds.Command - - cmd = &cmds.Command{ - Options: oldcmd.Options, - Arguments: oldcmd.Arguments, - Helptext: oldcmd.Helptext, - External: oldcmd.External, - Type: oldcmd.Type, - - Subcommands: make(map[string]*cmds.Command), - } - - if oldcmd.Run != nil { - cmd.Run = func(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment) error { - oldReq := &requestWrapper{req, OldContext(env)} - res := &fakeResponse{req: oldReq, re: re, wait: make(chan struct{})} - - errCh := make(chan error) - go res.Send(errCh) - - oldcmd.Run(oldReq, res) - return <-errCh - } - } - - if oldcmd.PreRun != nil { - cmd.PreRun = func(req *cmds.Request, env cmds.Environment) error { - oldReq := &requestWrapper{req, OldContext(env)} - return oldcmd.PreRun(oldReq) - } - } - - for name, sub := range oldcmd.Subcommands { - cmd.Subcommands[name] = NewCommand(sub) - } - - cmd.Encoders = make(cmds.EncoderMap) - - for encType, m := range oldcmd.Marshalers { - cmd.Encoders[cmds.EncodingType(encType)] = func(m oldcmds.Marshaler, encType oldcmds.EncodingType) func(req *cmds.Request) func(io.Writer) cmds.Encoder { - return func(req *cmds.Request) func(io.Writer) cmds.Encoder { - return func(w io.Writer) cmds.Encoder { - return NewMarshalerEncoder(req, m, w) - } - } - }(m, encType) - } - - return cmd -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/legacy/legacy.go b/vendor/github.com/ipfs/go-ipfs/commands/legacy/legacy.go deleted file mode 100644 index fd7016f044..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/legacy/legacy.go +++ /dev/null @@ -1,57 +0,0 @@ -package legacy - -import ( - "io" - "runtime/debug" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - - oldcmds "github.com/ipfs/go-ipfs/commands" -) - -// MarshalerEncoder implements Encoder from a Marshaler -type MarshalerEncoder struct { - m oldcmds.Marshaler - w io.Writer - req *cmds.Request -} - -// NewMarshalerEncoder returns a new MarshalerEncoder -func NewMarshalerEncoder(req *cmds.Request, m oldcmds.Marshaler, w io.Writer) *MarshalerEncoder { - me := &MarshalerEncoder{ - m: m, - w: w, - req: req, - } - - return me -} - -// Encode encodes v onto the io.Writer w using Marshaler m, with both m and w passed in NewMarshalerEncoder -func (me *MarshalerEncoder) Encode(v interface{}) error { - re, res := cmds.NewChanResponsePair(me.req) - go re.Emit(v) - - r, err := me.m(&responseWrapper{Response: res}) - if err != nil { - return err - } - if r == nil { - // behave like empty reader - return nil - } - - _, err = io.Copy(me.w, r) - return err -} - -// OldContext tries to cast the environment as a legacy command context, -// returning nil on failure. -func OldContext(env interface{}) *oldcmds.Context { - ctx, ok := env.(*oldcmds.Context) - if !ok { - log.Errorf("OldContext: env passed is not %T but %T\n%s", ctx, env, debug.Stack()) - } - - return ctx -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/legacy/request.go b/vendor/github.com/ipfs/go-ipfs/commands/legacy/request.go deleted file mode 100644 index de271ee55f..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/legacy/request.go +++ /dev/null @@ -1,196 +0,0 @@ -package legacy - -import ( - "context" - "fmt" - "io" - "os" - "reflect" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - - oldcmds "github.com/ipfs/go-ipfs/commands" -) - -// requestWrapper implements a oldcmds.Request from an Request -type requestWrapper struct { - req *cmds.Request - ctx *oldcmds.Context -} - -func (r *requestWrapper) String() string { - return fmt.Sprintf("{%v, %v}", r.req, r.ctx) -} - -func (r *requestWrapper) GoString() string { - return fmt.Sprintf("lgc.Request{%#v, %#v}", r.req, r.ctx) -} - -// InvocContext retuns the invocation context of the oldcmds.Request. -// It is faked using OldContext(). -func (r *requestWrapper) InvocContext() *oldcmds.Context { - return r.ctx -} - -// SetInvocContext sets the invocation context. First the context is converted -// to a Context using NewContext(). -func (r *requestWrapper) SetInvocContext(ctx oldcmds.Context) { - r.ctx = &ctx -} - -// Command is an empty stub. -func (r *requestWrapper) Command() *oldcmds.Command { return nil } - -func (r *requestWrapper) Arguments() []string { - cmdArgs := r.req.Command.Arguments - reqArgs := r.req.Arguments - - // TODO figure out the exaclt policy for when to use these automatically - // TODO once that's done, change the log.Debug below to log.Error - // read arguments from body if we don't have all of them or the command has variadic arguemnts - if len(reqArgs) < len(cmdArgs) || - len(cmdArgs) > 0 && cmdArgs[len(cmdArgs)-1].Variadic { - err := r.req.ParseBodyArgs() - if err != nil { - log.Debug("error reading arguments from stdin: ", err) - } - } - return r.req.Arguments -} - -func (r *requestWrapper) Context() context.Context { - return r.req.Context -} - -func (r *requestWrapper) ConvertOptions() error { - return convertOptions(r.req) -} - -func (r *requestWrapper) Files() files.File { - return r.req.Files -} - -func (r *requestWrapper) Option(name string) *cmdkit.OptionValue { - var option cmdkit.Option - - optDefs, err := r.req.Root.GetOptions(r.req.Path) - if err != nil { - return &cmdkit.OptionValue{} - } - for _, def := range optDefs { - for _, optName := range def.Names() { - if name == optName { - option = def - break - } - } - } - if option == nil { - return nil - } - - // try all the possible names, break if we find a value - for _, n := range option.Names() { - val, found := r.req.Options[n] - if found { - return &cmdkit.OptionValue{ - Value: val, - ValueFound: found, - Def: option, - } - } - } - - return &cmdkit.OptionValue{ - Value: option.Default(), - ValueFound: false, - Def: option, - } -} - -func (r *requestWrapper) Options() cmdkit.OptMap { - return r.req.Options -} - -func (r *requestWrapper) Path() []string { - return r.req.Path -} - -func (r *requestWrapper) SetArguments(args []string) { - r.req.Arguments = args -} - -func (r *requestWrapper) SetFiles(f files.File) { - r.req.Files = f -} - -func (r *requestWrapper) SetOption(name string, v interface{}) { - r.req.SetOption(name, v) -} - -func (r *requestWrapper) SetOptions(om cmdkit.OptMap) error { - r.req.Options = om - return convertOptions(r.req) -} - -func (r *requestWrapper) Stdin() io.Reader { - return os.Stdin -} - -func (r *requestWrapper) StringArguments() []string { - return r.req.Arguments -} - -func (r *requestWrapper) Values() map[string]interface{} { - return nil -} - -// copied from go-ipfs-cmds/request.go -func convertOptions(req *cmds.Request) error { - optDefSlice := req.Command.Options - - optDefs := make(map[string]cmdkit.Option) - for _, def := range optDefSlice { - for _, name := range def.Names() { - optDefs[name] = def - } - } - - for k, v := range req.Options { - opt, ok := optDefs[k] - if !ok { - continue - } - - kind := reflect.TypeOf(v).Kind() - if kind != opt.Type() { - if str, ok := v.(string); ok { - val, err := opt.Parse(str) - if err != nil { - value := fmt.Sprintf("value %q", v) - if len(str) == 0 { - value = "empty value" - } - return fmt.Errorf("could not convert %q to type %q (for option %q)", - value, opt.Type().String(), "-"+k) - } - req.Options[k] = val - - } else { - return fmt.Errorf("option %q should be type %q, but got type %q", - k, opt.Type().String(), kind.String()) - } - } - - for _, name := range opt.Names() { - if _, ok := req.Options[name]; name != k && ok { - return fmt.Errorf("duplicate command options were provided (%q and %q)", - k, name) - } - } - } - - return nil -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/legacy/response.go b/vendor/github.com/ipfs/go-ipfs/commands/legacy/response.go deleted file mode 100644 index cc404b2f2b..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/legacy/response.go +++ /dev/null @@ -1,207 +0,0 @@ -package legacy - -import ( - "context" - "io" - "os" - "reflect" - "sync" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - - oldcmds "github.com/ipfs/go-ipfs/commands" -) - -// responseWrapper wraps Response and implements olcdms.Response. -// It embeds a Response so some methods are taken from that. -type responseWrapper struct { - cmds.Response - - out interface{} -} - -// Request returns a (faked) oldcmds.Request -func (rw *responseWrapper) Request() oldcmds.Request { - return &requestWrapper{rw.Response.Request(), nil} -} - -// Output returns either a <-chan interface{} on which you can receive the -// emitted values, or an emitted io.Reader -func (rw *responseWrapper) Output() interface{} { - //if not called before - if rw.out == nil { - // get first emitted value - x, err := rw.Next() - if err != nil { - ch := make(chan interface{}) - log.Error(err) - close(ch) - return (<-chan interface{})(ch) - } - if e, ok := x.(*cmdkit.Error); ok { - ch := make(chan interface{}) - log.Error(e) - close(ch) - return (<-chan interface{})(ch) - } - - switch v := x.(type) { - case io.Reader: - // if it's a reader, set it - rw.out = v - case cmds.Single: - rw.out = v.Value - default: - // if it is something else, create a channel and copy values from next in there - ch := make(chan interface{}) - rw.out = (<-chan interface{})(ch) - - go func() { - defer close(ch) - ch <- v - - for { - v, err := rw.Next() - - if err == io.EOF || err == context.Canceled { - return - } - if err != nil { - log.Error(err) - return - } - - ch <- v - } - }() - } - } - - // if we have it already, return existing value - return rw.out -} - -// SetError is an empty stub -func (rw *responseWrapper) SetError(error, cmdkit.ErrorType) {} - -// SetOutput is an empty stub -func (rw *responseWrapper) SetOutput(interface{}) {} - -// SetLength is an empty stub -func (rw *responseWrapper) SetLength(uint64) {} - -// SetCloser is an empty stub -func (rw *responseWrapper) SetCloser(io.Closer) {} - -// Close is an empty stub -func (rw *responseWrapper) Close() error { return nil } - -// Marshal is an empty stub -func (rw *responseWrapper) Marshal() (io.Reader, error) { return nil, nil } - -// Reader is an empty stub -func (rw *responseWrapper) Reader() (io.Reader, error) { return nil, nil } - -// Stdout returns os.Stdout -func (rw *responseWrapper) Stdout() io.Writer { return os.Stdout } - -// Stderr returns os.Stderr -func (rw *responseWrapper) Stderr() io.Writer { return os.Stderr } - -// fakeResponse implements oldcmds.Response and takes a ResponseEmitter -type fakeResponse struct { - req oldcmds.Request - re cmds.ResponseEmitter - out interface{} - wait chan struct{} - once sync.Once -} - -// Send emits the value(s) stored in r.out on the ResponseEmitter -func (r *fakeResponse) Send(errCh chan<- error) { - defer close(errCh) - - out := r.Output() - - // don't emit nil or Single{nil} - if out == nil || out == (cmds.Single{Value: nil}) { - return - } - - errCh <- r.re.Emit(out) - return -} - -// Request returns the oldcmds.Request that belongs to this Response -func (r *fakeResponse) Request() oldcmds.Request { - return r.req -} - -// SetError forwards the call to the underlying ResponseEmitter -func (r *fakeResponse) SetError(err error, code cmdkit.ErrorType) { - defer r.once.Do(func() { close(r.wait) }) - r.re.CloseWithError(cmdkit.Errorf(code, err.Error())) -} - -// Error is an empty stub -func (r *fakeResponse) Error() *cmdkit.Error { - return nil -} - -// SetOutput sets the output variable to the passed value -func (r *fakeResponse) SetOutput(v interface{}) { - t := reflect.TypeOf(v) - _, isReader := v.(io.Reader) - - if t != nil && t.Kind() != reflect.Chan && !isReader { - v = cmds.Single{Value: v} - } - - r.out = v - r.once.Do(func() { close(r.wait) }) -} - -// Output returns the output variable -func (r *fakeResponse) Output() interface{} { - <-r.wait - return r.out -} - -// SetLength forwards the call to the underlying ResponseEmitter -func (r *fakeResponse) SetLength(l uint64) { - r.re.SetLength(l) -} - -// Length is an empty stub -func (r *fakeResponse) Length() uint64 { - return 0 -} - -// Close forwards the call to the underlying ResponseEmitter -func (r *fakeResponse) Close() error { - return r.re.Close() -} - -// SetCloser is an empty stub -func (r *fakeResponse) SetCloser(io.Closer) {} - -// Reader is an empty stub -func (r *fakeResponse) Reader() (io.Reader, error) { - return nil, nil -} - -// Marshal is an empty stub -func (r *fakeResponse) Marshal() (io.Reader, error) { - return nil, nil -} - -// Stdout returns os.Stdout -func (r *fakeResponse) Stdout() io.Writer { - return os.Stdout -} - -// Stderr returns os.Stderr -func (r *fakeResponse) Stderr() io.Writer { - return os.Stderr -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/reqlog.go b/vendor/github.com/ipfs/go-ipfs/commands/reqlog.go index f9191d5dd2..bae1ef13cb 100644 --- a/vendor/github.com/ipfs/go-ipfs/commands/reqlog.go +++ b/vendor/github.com/ipfs/go-ipfs/commands/reqlog.go @@ -1,7 +1,6 @@ package commands import ( - "strings" "sync" "time" ) @@ -34,22 +33,6 @@ type ReqLog struct { keep time.Duration } -// Add creates a ReqLogEntry from a request and adds it to the log -func (rl *ReqLog) Add(req Request) *ReqLogEntry { - rle := &ReqLogEntry{ - StartTime: time.Now(), - Active: true, - Command: strings.Join(req.Path(), "/"), - Options: req.Options(), - Args: req.StringArguments(), - ID: rl.nextID, - log: rl, - } - - rl.AddEntry(rle) - return rle -} - // AddEntry adds an entry to the log func (rl *ReqLog) AddEntry(rle *ReqLogEntry) { rl.lock.Lock() diff --git a/vendor/github.com/ipfs/go-ipfs/commands/request.go b/vendor/github.com/ipfs/go-ipfs/commands/request.go deleted file mode 100644 index f21bd01a19..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/request.go +++ /dev/null @@ -1,124 +0,0 @@ -package commands - -import ( - "context" - "errors" - "strings" - "time" - - "github.com/ipfs/go-ipfs/core" - coreapi "github.com/ipfs/go-ipfs/core/coreapi" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -type Context struct { - Online bool - ConfigRoot string - ReqLog *ReqLog - - config *config.Config - LoadConfig func(path string) (*config.Config, error) - - api coreiface.CoreAPI - node *core.IpfsNode - ConstructNode func() (*core.IpfsNode, error) -} - -// GetConfig returns the config of the current Command execution -// context. It may load it with the provided function. -func (c *Context) GetConfig() (*config.Config, error) { - var err error - if c.config == nil { - if c.LoadConfig == nil { - return nil, errors.New("nil LoadConfig function") - } - c.config, err = c.LoadConfig(c.ConfigRoot) - } - return c.config, err -} - -// GetNode returns the node of the current Command execution -// context. It may construct it with the provided function. -func (c *Context) GetNode() (*core.IpfsNode, error) { - var err error - if c.node == nil { - if c.ConstructNode == nil { - return nil, errors.New("nil ConstructNode function") - } - c.node, err = c.ConstructNode() - } - return c.node, err -} - -// GetApi returns CoreAPI instance backed by ipfs node. -// It may construct the node with the provided function -func (c *Context) GetApi() (coreiface.CoreAPI, error) { - if c.api == nil { - n, err := c.GetNode() - if err != nil { - return nil, err - } - c.api = coreapi.NewCoreAPI(n) - } - return c.api, nil -} - -// Context returns the node's context. -func (c *Context) Context() context.Context { - n, err := c.GetNode() - if err != nil { - log.Debug("error getting node: ", err) - return context.Background() - } - - return n.Context() -} - -// LogRequest adds the passed request to the request log and -// returns a function that should be called when the request -// lifetime is over. -func (c *Context) LogRequest(req *cmds.Request) func() { - rle := &ReqLogEntry{ - StartTime: time.Now(), - Active: true, - Command: strings.Join(req.Path, "/"), - Options: req.Options, - Args: req.Arguments, - ID: c.ReqLog.nextID, - log: c.ReqLog, - } - c.ReqLog.AddEntry(rle) - - return func() { - c.ReqLog.Finish(rle) - } -} - -// Close cleans up the application state. -func (c *Context) Close() { - // let's not forget teardown. If a node was initialized, we must close it. - // Note that this means the underlying req.Context().Node variable is exposed. - // this is gross, and should be changed when we extract out the exec Context. - if c.node != nil { - log.Info("Shutting down node...") - c.node.Close() - } -} - -// Request represents a call to a command from a consumer -type Request interface { - Path() []string - Option(name string) *cmdkit.OptionValue - Options() cmdkit.OptMap - Arguments() []string - StringArguments() []string - Files() files.File - Context() context.Context - InvocContext() *Context - Command() *Command -} diff --git a/vendor/github.com/ipfs/go-ipfs/commands/response.go b/vendor/github.com/ipfs/go-ipfs/commands/response.go deleted file mode 100644 index 5e5ecadb2d..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/commands/response.go +++ /dev/null @@ -1,55 +0,0 @@ -package commands - -import ( - "io" - - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -// ErrorType signfies a category of errors -type ErrorType uint - -// EncodingType defines a supported encoding -type EncodingType string - -// Supported EncodingType constants. -const ( - JSON = "json" - XML = "xml" - Protobuf = "protobuf" - Text = "text" - // TODO: support more encoding types -) - -// Response is the result of a command request. Handlers write to the response, -// setting Error or Value. Response is returned to the client. -type Response interface { - Request() Request - - // Set/Return the response Error - SetError(err error, code cmdkit.ErrorType) - Error() *cmdkit.Error - - // Sets/Returns the response value - SetOutput(interface{}) - Output() interface{} - - // Sets/Returns the length of the output - SetLength(uint64) - Length() uint64 - - // underlying http connections need to be cleaned up, this is for that - Close() error - SetCloser(io.Closer) - - // Marshal marshals out the response into a buffer. It uses the EncodingType - // on the Request to chose a Marshaler (Codec). - Marshal() (io.Reader, error) - - // Gets a io.Reader that reads the marshalled output - Reader() (io.Reader, error) - - // Gets Stdout and Stderr, for writing to console without using SetOutput - Stdout() io.Writer - Stderr() io.Writer -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/bootstrap.go b/vendor/github.com/ipfs/go-ipfs/core/bootstrap.go index 10059f1930..bf0a79d1f4 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/bootstrap.go +++ b/vendor/github.com/ipfs/go-ipfs/core/bootstrap.go @@ -9,18 +9,18 @@ import ( "sync" "time" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" math2 "github.com/ipfs/go-ipfs/thirdparty/math2" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) // ErrNotEnoughBootstrapPeers signals that we do not have enough bootstrap @@ -78,6 +78,12 @@ func Bootstrap(n *IpfsNode, cfg BootstrapConfig) (io.Closer, error) { // make a signal to wait for one bootstrap round to complete. doneWithRound := make(chan struct{}) + if len(cfg.BootstrapPeers()) == 0 { + // We *need* to bootstrap but we have no bootstrap peers + // configured *at all*, inform the user. + log.Error("no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network") + } + // the periodic bootstrap function -- the connection supervisor periodic := func(worker goprocess.Process) { ctx := procctx.OnClosingContext(worker) @@ -96,21 +102,24 @@ func Bootstrap(n *IpfsNode, cfg BootstrapConfig) (io.Closer, error) { proc.Go(periodic) // run one right now. // kick off Routing.Bootstrap - go func() { - doneWithRound <- struct{}{} - close(doneWithRound) // it no longer blocks periodic - if n.Routing != nil { - ctx := procctx.OnClosingContext(proc) - if err := n.Routing.Bootstrap(ctx); err != nil { - proc.Close() - log.Error(err) - } + // OpenBazaar: the following two lines were moved from right before the return + // statement to here so that it blocks the dht bootstrap until after the init + // bootstrap peers are connected. + doneWithRound <- struct{}{} + close(doneWithRound) // it no longer blocks periodic + if n.Routing != nil { + ctx := procctx.OnClosingContext(proc) + if err := n.Routing.Bootstrap(ctx); err != nil { + proc.Close() + return nil, err } - }() + } + return proc, nil } func bootstrapRound(ctx context.Context, host host.Host, cfg BootstrapConfig) error { + ctx, cancel := context.WithTimeout(ctx, cfg.ConnectionTimeout) defer cancel() id := host.ID() @@ -139,11 +148,6 @@ func bootstrapRound(ctx context.Context, host host.Host, cfg BootstrapConfig) er // if connected to all bootstrap peer candidates, exit if len(notConnected) < 1 { log.Debugf("%s no more bootstrap peers to create %d connections", id, numToDial) - if len(peers) == 0 { - // We *need* to bootstrap but we have no bootstrap peers - // configured *at all*, inform the user. - log.Error("no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network") - } return ErrNotEnoughBootstrapPeers } @@ -163,6 +167,7 @@ func bootstrapConnect(ctx context.Context, ph host.Host, peers []pstore.PeerInfo errs := make(chan error, len(peers)) var wg sync.WaitGroup for _, p := range peers { + // performed asynchronously because when performed synchronously, if // one `Connect` call hangs, subsequent calls are more likely to // fail/abort due to an expiring context. diff --git a/vendor/github.com/ipfs/go-ipfs/core/builder.go b/vendor/github.com/ipfs/go-ipfs/core/builder.go index 41356a451f..4fff7e4f33 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/builder.go +++ b/vendor/github.com/ipfs/go-ipfs/core/builder.go @@ -9,32 +9,33 @@ import ( "syscall" "time" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - resolver "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - filestore "github.com/ipfs/go-ipfs/filestore" + namesys "github.com/ipfs/go-ipfs/namesys" pin "github.com/ipfs/go-ipfs/pin" repo "github.com/ipfs/go-ipfs/repo" cidv0v1 "github.com/ipfs/go-ipfs/thirdparty/cidv0v1" "github.com/ipfs/go-ipfs/thirdparty/verifbs" - cfg "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + resolver "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver" + libp2p "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - pstoremem "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem" - libp2p "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ipns "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - retry "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/retrystore" - dsync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cfg "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + retry "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/retrystore" + dsync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + ipns "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + offroute "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + pstoremem "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" ) @@ -177,11 +178,16 @@ func isTooManyFDError(err error) bool { } func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error { - // setup local peer ID (private key is loaded in online setup) + // setup local identity if err := n.loadID(); err != nil { return err } + // load the private key (if present) + if err := n.loadPrivateKey(); err != nil { + return err + } + rds := &retry.Datastore{ Batching: n.Repo.Datastore(), Delay: time.Millisecond * 200, @@ -255,6 +261,8 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error { } } else { n.Exchange = offline.Exchange(n.Blockstore) + n.Routing = offroute.NewOfflineRouter(n.Repo.Datastore(), n.RecordValidator) + n.Namesys = namesys.NewNameSystem(n.Routing, n.Repo.Datastore(), 0) } n.Blocks = bserv.New(n.Blockstore, n.Exchange) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/active.go b/vendor/github.com/ipfs/go-ipfs/core/commands/active.go index dd1128ba8d..1606b2a292 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/active.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/active.go @@ -1,21 +1,20 @@ package commands import ( - "bytes" "fmt" "io" "sort" "text/tabwriter" "time" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" + oldcmds "github.com/ipfs/go-ipfs/commands" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) const ( - verboseOptionName = "v" + verboseOptionName = "verbose" ) var ActiveReqsCmd = &cmds.Command{ @@ -25,48 +24,38 @@ var ActiveReqsCmd = &cmds.Command{ Lists running and recently run commands. `, }, - Run: func(req cmds.Request, res cmds.Response) { - res.SetOutput(req.InvocContext().ReqLog.Report()) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + ctx := env.(*oldcmds.Context) + return cmds.EmitOnce(res, ctx.ReqLog.Report()) }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", verboseOptionName, "Print extra information."), + cmdkit.BoolOption(verboseOptionName, "v", "Print extra information."), }, Subcommands: map[string]*cmds.Command{ "clear": clearInactiveCmd, "set-time": setRequestClearCmd, }, - Marshalers: map[cmds.EncodingType]cmds.Marshaler{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*[]*cmds.ReqLogEntry) - if !ok { - return nil, e.TypeErr(out, v) - } - buf := new(bytes.Buffer) - - verbose, _, _ := res.Request().Option(verboseOptionName).Bool() + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *[]*cmds.ReqLogEntry) error { + verbose, _ := req.Options[verboseOptionName].(bool) - w := tabwriter.NewWriter(buf, 4, 4, 2, ' ', 0) + tw := tabwriter.NewWriter(w, 4, 4, 2, ' ', 0) if verbose { - fmt.Fprint(w, "ID\t") + fmt.Fprint(tw, "ID\t") } - fmt.Fprint(w, "Command\t") + fmt.Fprint(tw, "Command\t") if verbose { - fmt.Fprint(w, "Arguments\tOptions\t") + fmt.Fprint(tw, "Arguments\tOptions\t") } - fmt.Fprintln(w, "Active\tStartTime\tRunTime") + fmt.Fprintln(tw, "Active\tStartTime\tRunTime") for _, req := range *out { if verbose { - fmt.Fprintf(w, "%d\t", req.ID) + fmt.Fprintf(tw, "%d\t", req.ID) } - fmt.Fprintf(w, "%s\t", req.Command) + fmt.Fprintf(tw, "%s\t", req.Command) if verbose { - fmt.Fprintf(w, "%v\t[", req.Args) + fmt.Fprintf(tw, "%v\t[", req.Args) var keys []string for k := range req.Options { keys = append(keys, k) @@ -74,9 +63,9 @@ Lists running and recently run commands. sort.Strings(keys) for _, k := range keys { - fmt.Fprintf(w, "%s=%v,", k, req.Options[k]) + fmt.Fprintf(tw, "%s=%v,", k, req.Options[k]) } - fmt.Fprintf(w, "]\t") + fmt.Fprintf(tw, "]\t") } var live time.Duration @@ -86,12 +75,12 @@ Lists running and recently run commands. live = req.EndTime.Sub(req.StartTime) } t := req.StartTime.Format(time.Stamp) - fmt.Fprintf(w, "%t\t%s\t%s\n", req.Active, t, live) + fmt.Fprintf(tw, "%t\t%s\t%s\n", req.Active, t, live) } - w.Flush() + tw.Flush() - return buf, nil - }, + return nil + }), }, Type: []*cmds.ReqLogEntry{}, } @@ -100,8 +89,10 @@ var clearInactiveCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Clear inactive requests from the log.", }, - Run: func(req cmds.Request, res cmds.Response) { - req.InvocContext().ReqLog.ClearInactive() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + ctx := env.(*oldcmds.Context) + ctx.ReqLog.ClearInactive() + return nil }, } @@ -112,13 +103,14 @@ var setRequestClearCmd = &cmds.Command{ Arguments: []cmdkit.Argument{ cmdkit.StringArg("time", true, false, "Time to keep inactive requests in log."), }, - Run: func(req cmds.Request, res cmds.Response) { - tval, err := time.ParseDuration(req.Arguments()[0]) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + tval, err := time.ParseDuration(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } + ctx := env.(*oldcmds.Context) + ctx.ReqLog.SetKeepTime(tval) - req.InvocContext().ReqLog.SetKeepTime(tval) + return nil }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/add.go b/vendor/github.com/ipfs/go-ipfs/core/commands/add.go index ca7c8f7aa2..a211bc3456 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/add.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/add.go @@ -1,25 +1,32 @@ package commands import ( + "errors" "fmt" "io" "os" "strings" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - pb "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + pb "gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // ErrDepthLimitExceeded indicates that the max depth has been exceeded. var ErrDepthLimitExceeded = fmt.Errorf("depth limit exceeded") +type AddEvent struct { + Name string + Hash string `json:",omitempty"` + Bytes int64 `json:",omitempty"` + Size string `json:",omitempty"` +} + const ( quietOptionName = "quiet" quieterOptionName = "quieter" @@ -71,12 +78,16 @@ You can now refer to the added file in a gateway, like so: The chunker option, '-s', specifies the chunking strategy that dictates how to break files into blocks. Blocks with same content can -be deduplicated. The default is a fixed block size of +be deduplicated. Different chunking strategies will produce different +hashes for the same file. The default is a fixed block size of 256 * 1024 bytes, 'size-262144'. Alternatively, you can use the -rabin chunker for content defined chunking by specifying -rabin-[min]-[avg]-[max] (where min/avg/max refer to the resulting -chunk sizes). Using other chunking strategies will produce -different hashes for the same file. +Rabin fingerprint chunker for content defined chunking by specifying +rabin-[min]-[avg]-[max] (where min/avg/max refer to the desired +chunk sizes in bytes), e.g. 'rabin-262144-524288-1048576'. + +The following examples use very small byte sizes to demonstrate the +properties of the different chunkers on a small file. You'll likely +want to use a 1024 times larger chunk sizes for most files. > ipfs add --chunker=size-2048 ipfs-logo.svg added QmafrLBfzRLV4XSH1XcaMMeaXEUhDJjmtDfsYU95TrWG87 ipfs-logo.svg @@ -100,6 +111,7 @@ You can now check what blocks have been created by: }, Options: []cmdkit.Option{ cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive) + cmds.OptionDerefArgs, // a builtin option that resolves passed in filesystem links (--dereference-args) cmdkit.BoolOption(quietOptionName, "q", "Write minimal output."), cmdkit.BoolOption(quieterOptionName, "Q", "Write only final hash."), cmdkit.BoolOption(silentOptionName, "Write no output."), @@ -139,7 +151,7 @@ You can now check what blocks have been created by: return nil }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -160,13 +172,17 @@ You can now check what blocks have been created by: inline, _ := req.Options[inlineOptionName].(bool) inlineLimit, _ := req.Options[inlineLimitOptionName].(int) pathName, _ := req.Options[stdinPathName].(string) - local, _ := req.Options["local"].(bool) hashFunCode, ok := mh.Names[strings.ToLower(hashFunStr)] if !ok { return fmt.Errorf("unrecognized hash function: %s", strings.ToLower(hashFunStr)) } + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err + } + events := make(chan interface{}, adderOutChanSize) opts := []options.UnixfsAddOption{ @@ -179,7 +195,6 @@ You can now check what blocks have been created by: options.Unixfs.Pin(dopin), options.Unixfs.HashOnly(hash), - options.Unixfs.Local(local), options.Unixfs.FsCache(fscache), options.Unixfs.Nocopy(nocopy), @@ -212,9 +227,23 @@ You can now check what blocks have been created by: _, err = api.Unixfs().Add(req.Context, req.Files, opts...) }() - err = res.Emit(events) - if err != nil { - return err + for event := range events { + output, ok := event.(*coreiface.AddEvent) + if !ok { + return errors.New("unknown event type") + } + + h := "" + if output.Path != nil { + h = enc.Encode(output.Path.Cid()) + } + + res.Emit(&AddEvent{ + Name: output.Name, + Hash: h, + Bytes: output.Bytes, + Size: output.Size, + }) } return <-errCh @@ -225,24 +254,17 @@ You can now check what blocks have been created by: outChan := make(chan interface{}) req := res.Request() - sizeFile, ok := req.Files.(files.SizeFile) - if ok { - // Could be slow. - go func() { - size, err := sizeFile.Size() - if err != nil { - log.Warningf("error getting files size: %s", err) - // see comment above - return - } + // Could be slow. + go func() { + size, err := req.Files.Size() + if err != nil { + log.Warningf("error getting files size: %s", err) + // see comment above + return + } - sizeChan <- size - }() - } else { - // we don't need to error, the progress bar just - // won't know how big the files are - log.Warning("cannot determine size of input file") - } + sizeChan <- size + }() progressBar := func(wait chan struct{}) { defer close(wait) @@ -278,7 +300,7 @@ You can now check what blocks have been created by: break LOOP } - output := out.(*coreiface.AddEvent) + output := out.(*AddEvent) if len(output.Hash) > 0 { lastHash = output.Hash if quieter { @@ -327,6 +349,14 @@ You can now check what blocks have been created by: return } } + + if progress && bar.Total == 0 && bar.Get() != 0 { + bar.Total = bar.Get() + bar.ShowPercent = true + bar.ShowBar = true + bar.ShowTimeLeft = true + bar.Update() + } } if e := res.Error(); e != nil { @@ -358,5 +388,5 @@ You can now check what blocks have been created by: } }, }, - Type: coreiface.AddEvent{}, + Type: AddEvent{}, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/bitswap.go b/vendor/github.com/ipfs/go-ipfs/core/commands/bitswap.go index a2ae664a49..d5611d8ca5 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/bitswap.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/bitswap.go @@ -1,22 +1,19 @@ package commands import ( - "bytes" "fmt" "io" - bitswap "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap" - decision "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision" - - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + bitswap "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap" + decision "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cidutil "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil" ) var BitswapCmd = &cmds.Command{ @@ -27,9 +24,9 @@ var BitswapCmd = &cmds.Command{ Subcommands: map[string]*cmds.Command{ "stat": bitswapStatCmd, - "wantlist": lgc.NewCommand(showWantlistCmd), - "ledger": lgc.NewCommand(ledgerCmd), - "reprovide": lgc.NewCommand(reprovideCmd), + "wantlist": showWantlistCmd, + "ledger": ledgerCmd, + "reprovide": reprovideCmd, }, } @@ -37,7 +34,7 @@ const ( peerOptionName = "peer" ) -var showWantlistCmd = &oldcmds.Command{ +var showWantlistCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Show blocks currently on the wantlist.", ShortDescription: ` @@ -47,47 +44,47 @@ Print out all blocks currently on the bitswap wantlist for the local peer.`, cmdkit.StringOption(peerOptionName, "p", "Specify which peer to show wantlist for. Default: self."), }, Type: KeyList{}, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if !nd.OnlineMode() { - res.SetError(ErrNotOnline, cmdkit.ErrClient) - return + return ErrNotOnline } bs, ok := nd.Exchange.(*bitswap.Bitswap) if !ok { - res.SetError(e.TypeErr(bs, nd.Exchange), cmdkit.ErrNormal) - return + return e.TypeErr(bs, nd.Exchange) } - pstr, found, err := req.Option(peerOptionName).String() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + pstr, found := req.Options[peerOptionName].(string) if found { pid, err := peer.IDB58Decode(pstr) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if pid == nd.Identity { - res.SetOutput(&KeyList{bs.GetWantlist()}) - return + if pid != nd.Identity { + return cmds.EmitOnce(res, &KeyList{bs.WantlistForPeer(pid)}) } - - res.SetOutput(&KeyList{bs.WantlistForPeer(pid)}) - } else { - res.SetOutput(&KeyList{bs.GetWantlist()}) } + + return cmds.EmitOnce(res, &KeyList{bs.GetWantlist()}) }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: KeyListTextMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *KeyList) error { + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err + } + // sort the keys first + cidutil.Sort(out.Keys) + for _, key := range out.Keys { + fmt.Fprintln(w, enc.Encode(key)) + } + return nil + }), }, } @@ -120,26 +117,25 @@ var bitswapStatCmd = &cmds.Command{ return cmds.EmitOnce(res, st) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - out, ok := v.(*bitswap.Stat) - if !ok { - return e.TypeErr(out, v) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s *bitswap.Stat) error { + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err } - fmt.Fprintln(w, "bitswap status") - fmt.Fprintf(w, "\tprovides buffer: %d / %d\n", out.ProvideBufLen, bitswap.HasBlockBufferSize) - fmt.Fprintf(w, "\tblocks received: %d\n", out.BlocksReceived) - fmt.Fprintf(w, "\tblocks sent: %d\n", out.BlocksSent) - fmt.Fprintf(w, "\tdata received: %d\n", out.DataReceived) - fmt.Fprintf(w, "\tdata sent: %d\n", out.DataSent) - fmt.Fprintf(w, "\tdup blocks received: %d\n", out.DupBlksReceived) - fmt.Fprintf(w, "\tdup data received: %s\n", humanize.Bytes(out.DupDataReceived)) - fmt.Fprintf(w, "\twantlist [%d keys]\n", len(out.Wantlist)) - for _, k := range out.Wantlist { - fmt.Fprintf(w, "\t\t%s\n", k.String()) + fmt.Fprintf(w, "\tprovides buffer: %d / %d\n", s.ProvideBufLen, bitswap.HasBlockBufferSize) + fmt.Fprintf(w, "\tblocks received: %d\n", s.BlocksReceived) + fmt.Fprintf(w, "\tblocks sent: %d\n", s.BlocksSent) + fmt.Fprintf(w, "\tdata received: %d\n", s.DataReceived) + fmt.Fprintf(w, "\tdata sent: %d\n", s.DataSent) + fmt.Fprintf(w, "\tdup blocks received: %d\n", s.DupBlksReceived) + fmt.Fprintf(w, "\tdup data received: %s\n", humanize.Bytes(s.DupDataReceived)) + fmt.Fprintf(w, "\twantlist [%d keys]\n", len(s.Wantlist)) + for _, k := range s.Wantlist { + fmt.Fprintf(w, "\t\t%s\n", enc.Encode(k)) } - fmt.Fprintf(w, "\tpartners [%d]\n", len(out.Peers)) - for _, p := range out.Peers { + fmt.Fprintf(w, "\tpartners [%d]\n", len(s.Peers)) + for _, p := range s.Peers { fmt.Fprintf(w, "\t\t%s\n", p) } @@ -148,7 +144,7 @@ var bitswapStatCmd = &cmds.Command{ }, } -var ledgerCmd = &oldcmds.Command{ +var ledgerCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Show the current ledger for a peer.", ShortDescription: ` @@ -161,81 +157,64 @@ prints the ledger associated with a given peer. cmdkit.StringArg("peer", true, false, "The PeerID (B58) of the ledger to inspect."), }, Type: decision.Receipt{}, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if !nd.OnlineMode() { - res.SetError(ErrNotOnline, cmdkit.ErrClient) - return + return ErrNotOnline } bs, ok := nd.Exchange.(*bitswap.Bitswap) if !ok { - res.SetError(e.TypeErr(bs, nd.Exchange), cmdkit.ErrNormal) - return + return e.TypeErr(bs, nd.Exchange) } - partner, err := peer.IDB58Decode(req.Arguments()[0]) + partner, err := peer.IDB58Decode(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrClient) - return + return err } - res.SetOutput(bs.LedgerForPeer(partner)) - }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*decision.Receipt) - if !ok { - return nil, e.TypeErr(out, v) - } - buf := new(bytes.Buffer) - fmt.Fprintf(buf, "Ledger for %s\n"+ + return cmds.EmitOnce(res, bs.LedgerForPeer(partner)) + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *decision.Receipt) error { + fmt.Fprintf(w, "Ledger for %s\n"+ "Debt ratio:\t%f\n"+ "Exchanges:\t%d\n"+ "Bytes sent:\t%d\n"+ "Bytes received:\t%d\n\n", out.Peer, out.Value, out.Exchanged, out.Sent, out.Recv) - return buf, nil - }, + return nil + }), }, } -var reprovideCmd = &oldcmds.Command{ +var reprovideCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Trigger reprovider.", ShortDescription: ` Trigger reprovider to announce our data to network. `, }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if !nd.OnlineMode() { - res.SetError(ErrNotOnline, cmdkit.ErrClient) - return + return ErrNotOnline } - err = nd.Reprovider.Trigger(req.Context()) + err = nd.Reprovider.Trigger(req.Context) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(nil) + return nil }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/block.go b/vendor/github.com/ipfs/go-ipfs/core/commands/block.go index f4a95cc8b9..f80b8c3982 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/block.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/block.go @@ -8,13 +8,12 @@ import ( util "github.com/ipfs/go-ipfs/blocks/blockstoreutil" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) type BlockStat struct { @@ -61,7 +60,7 @@ on raw IPFS blocks. It outputs the following to stdout: cmdkit.StringArg("key", true, false, "The base58 multihash of an existing block to stat.").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -83,11 +82,7 @@ on raw IPFS blocks. It outputs the following to stdout: }, Type: BlockStat{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - bs, ok := v.(*BlockStat) - if !ok { - return e.TypeErr(bs, v) - } + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, bs *BlockStat) error { _, err := fmt.Fprintf(w, "%s", bs) return err }), @@ -107,7 +102,7 @@ It outputs to stdout, and is a base58 encoded multihash. cmdkit.StringArg("key", true, false, "The base58 multihash of an existing block to get.").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -151,14 +146,15 @@ than 'sha2-256' or format to anything other than 'v0' will result in CIDv1. cmdkit.StringOption(blockFormatOptionName, "f", "cid format for blocks to be created with."), cmdkit.StringOption(mhtypeOptionName, "multihash hash function").WithDefault("sha2-256"), cmdkit.IntOption(mhlenOptionName, "multihash hash length").WithDefault(-1), + cmdkit.BoolOption(pinOptionName, "pin added blocks recursively").WithDefault(false), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - file, err := req.Files.NextFile() + file, err := cmdenv.GetFileArg(req.Files.Entries()) if err != nil { return err } @@ -183,7 +179,12 @@ than 'sha2-256' or format to anything other than 'v0' will result in CIDv1. } } - p, err := api.Block().Put(req.Context, file, options.Block.Hash(mhtval, mhlen), options.Block.Format(format)) + pin, _ := req.Options[pinOptionName].(bool) + + p, err := api.Block().Put(req.Context, file, + options.Block.Hash(mhtval, mhlen), + options.Block.Format(format), + options.Block.Pin(pin)) if err != nil { return err } @@ -194,11 +195,7 @@ than 'sha2-256' or format to anything other than 'v0' will result in CIDv1. }) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - bs, ok := v.(*BlockStat) - if !ok { - return e.TypeErr(bs, v) - } + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, bs *BlockStat) error { _, err := fmt.Fprintf(w, "%s\n", bs.Key) return err }), @@ -227,7 +224,7 @@ It takes a list of base58 encoded multihashes to remove. cmdkit.BoolOption(blockQuietOptionName, "q", "Write minimal output."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -249,13 +246,13 @@ It takes a list of base58 encoded multihashes to remove. err = api.Block().Rm(req.Context, rp, options.Block.Force(force)) if err != nil { - err := res.Emit(&util.RemovedBlock{ + if err := res.Emit(&util.RemovedBlock{ Hash: rp.Cid().String(), Error: err.Error(), - }) - if err != nil { + }); err != nil { return err } + continue } if !quiet { diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/bootstrap.go b/vendor/github.com/ipfs/go-ipfs/core/commands/bootstrap.go index 6ea0dc2ef6..be57eae0d7 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/bootstrap.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/bootstrap.go @@ -1,18 +1,17 @@ package commands import ( - "bytes" "errors" "io" "sort" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" repo "github.com/ipfs/go-ipfs/repo" - "github.com/ipfs/go-ipfs/repo/fsrepo" + fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) type BootstrapOutput struct { @@ -29,9 +28,9 @@ Running 'ipfs bootstrap' with no arguments will run 'ipfs bootstrap list'. ` + bootstrapSecurityWarning, }, - Run: bootstrapListCmd.Run, - Marshalers: bootstrapListCmd.Marshalers, - Type: bootstrapListCmd.Type, + Run: bootstrapListCmd.Run, + Encoders: bootstrapListCmd.Encoders, + Type: bootstrapListCmd.Type, Subcommands: map[string]*cmds.Command{ "list": bootstrapListCmd, @@ -63,78 +62,62 @@ in the bootstrap list). "default": bootstrapAddDefaultCmd, }, - Run: func(req cmds.Request, res cmds.Response) { - deflt, _, err := req.Option(defaultOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + deflt, _ := req.Options[defaultOptionName].(bool) var inputPeers []config.BootstrapPeer if deflt { // parse separately for meaningful, correct error. defltPeers, err := config.DefaultBootstrapPeers() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } inputPeers = defltPeers } else { - parsedPeers, err := config.ParseBootstrapPeers(req.Arguments()) + if err := req.ParseBodyArgs(); err != nil { + return err + } + + parsedPeers, err := config.ParseBootstrapPeers(req.Arguments) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } inputPeers = parsedPeers } if len(inputPeers) == 0 { - res.SetError(errors.New("no bootstrap peers to add"), cmdkit.ErrClient) - return + return errors.New("no bootstrap peers to add") + } + + cfgRoot, err := cmdenv.GetConfigRoot(env) + if err != nil { + return err } - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + r, err := fsrepo.Open(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer r.Close() cfg, err := r.Config() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } added, err := bootstrapAdd(r, cfg, inputPeers) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&BootstrapOutput{config.BootstrapPeerStrings(added)}) + return cmds.EmitOnce(res, &BootstrapOutput{config.BootstrapPeerStrings(added)}) }, Type: BootstrapOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*BootstrapOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - if err := bootstrapWritePeers(buf, "added ", out.Peers); err != nil { - return nil, err - } - - return buf, nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error { + return bootstrapWritePeers(w, "added ", out.Peers) + }), }, } @@ -144,54 +127,40 @@ var bootstrapAddDefaultCmd = &cmds.Command{ ShortDescription: `Outputs a list of peers that were added (that weren't already in the bootstrap list).`, }, - Run: func(req cmds.Request, res cmds.Response) { + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { defltPeers, err := config.DefaultBootstrapPeers() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + r, err := fsrepo.Open(cfgRoot) + if err != nil { + return err } defer r.Close() cfg, err := r.Config() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } added, err := bootstrapAdd(r, cfg, defltPeers) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&BootstrapOutput{config.BootstrapPeerStrings(added)}) + return cmds.EmitOnce(res, &BootstrapOutput{config.BootstrapPeerStrings(added)}) }, Type: BootstrapOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*BootstrapOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - if err := bootstrapWritePeers(buf, "added ", out.Peers); err != nil { - return nil, err - } - - return buf, nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error { + return bootstrapWritePeers(w, "added ", out.Peers) + }), }, } @@ -215,61 +184,50 @@ var bootstrapRemoveCmd = &cmds.Command{ Subcommands: map[string]*cmds.Command{ "all": bootstrapRemoveAllCmd, }, - Run: func(req cmds.Request, res cmds.Response) { - all, _, err := req.Option(bootstrapAllOptionName).Bool() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + all, _ := req.Options[bootstrapAllOptionName].(bool) + + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + r, err := fsrepo.Open(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer r.Close() cfg, err := r.Config() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } var removed []config.BootstrapPeer if all { removed, err = bootstrapRemoveAll(r, cfg) } else { - input, perr := config.ParseBootstrapPeers(req.Arguments()) + if err := req.ParseBodyArgs(); err != nil { + return err + } + + input, perr := config.ParseBootstrapPeers(req.Arguments) if perr != nil { - res.SetError(perr, cmdkit.ErrNormal) - return + return perr } removed, err = bootstrapRemove(r, cfg, input) } if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&BootstrapOutput{config.BootstrapPeerStrings(removed)}) + return cmds.EmitOnce(res, &BootstrapOutput{config.BootstrapPeerStrings(removed)}) }, Type: BootstrapOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*BootstrapOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - err = bootstrapWritePeers(buf, "removed ", out.Peers) - return buf, err - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error { + return bootstrapWritePeers(w, "removed ", out.Peers) + }), }, } @@ -279,44 +237,34 @@ var bootstrapRemoveAllCmd = &cmds.Command{ ShortDescription: `Outputs the list of peers that were removed.`, }, - Run: func(req cmds.Request, res cmds.Response) { - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + r, err := fsrepo.Open(cfgRoot) + if err != nil { + return err } defer r.Close() cfg, err := r.Config() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } removed, err := bootstrapRemoveAll(r, cfg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&BootstrapOutput{config.BootstrapPeerStrings(removed)}) + return cmds.EmitOnce(res, &BootstrapOutput{config.BootstrapPeerStrings(removed)}) }, Type: BootstrapOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*BootstrapOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - err = bootstrapWritePeers(buf, "removed ", out.Peers) - return buf, err - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error { + return bootstrapWritePeers(w, "removed ", out.Peers) + }), }, } @@ -326,50 +274,38 @@ var bootstrapListCmd = &cmds.Command{ ShortDescription: "Peers are output in the format '/'.", }, - Run: func(req cmds.Request, res cmds.Response) { - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + r, err := fsrepo.Open(cfgRoot) + if err != nil { + return err } defer r.Close() cfg, err := r.Config() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } peers, err := cfg.BootstrapPeers() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&BootstrapOutput{config.BootstrapPeerStrings(peers)}) + + return cmds.EmitOnce(res, &BootstrapOutput{config.BootstrapPeerStrings(peers)}) }, Type: BootstrapOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: bootstrapMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error { + return bootstrapWritePeers(w, "", out.Peers) + }), }, } -func bootstrapMarshaler(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*BootstrapOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - err = bootstrapWritePeers(buf, "", out.Peers) - return buf, err -} - func bootstrapWritePeers(w io.Writer, prefix string, peers []string) error { - sort.Stable(sort.StringSlice(peers)) for _, peer := range peers { _, err := w.Write([]byte(prefix + peer + "\n")) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/cat.go b/vendor/github.com/ipfs/go-ipfs/core/commands/cat.go index 8d28296a74..e2d299e1c7 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/cat.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/cat.go @@ -7,9 +7,10 @@ import ( "os" "github.com/ipfs/go-ipfs/core/commands/cmdenv" - "github.com/ipfs/go-ipfs/core/coreapi/interface" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -33,31 +34,18 @@ var CatCmd = &cmds.Command{ cmdkit.Int64Option(lengthOptionName, "l", "Maximum number of bytes to read."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - node, err := cmdenv.GetNode(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - api, err := cmdenv.GetApi(env) - if err != nil { - return err - } - - if !node.OnlineMode() { - if err := node.SetupOfflineRouting(); err != nil { - return err - } - } - offset, _ := req.Options[offsetOptionName].(int64) if offset < 0 { return fmt.Errorf("cannot specify negative offset") } max, found := req.Options[lengthOptionName].(int64) - if err != nil { - return err - } + if max < 0 { return fmt.Errorf("cannot specify negative length") } @@ -135,13 +123,19 @@ func cat(ctx context.Context, api iface.CoreAPI, paths []string, offset int64, m return nil, 0, err } - file, err := api.Unixfs().Get(ctx, fpath) + f, err := api.Unixfs().Get(ctx, fpath) if err != nil { return nil, 0, err } - if file.IsDirectory() { + var file files.File + switch f := f.(type) { + case files.File: + file = f + case files.Directory: return nil, 0, iface.ErrIsDir + default: + return nil, 0, iface.ErrNotSupported } fsize, err := file.Size() diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/cid.go b/vendor/github.com/ipfs/go-ipfs/core/commands/cid.go index 74864dcdfb..a7685bdb17 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/cid.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/cid.go @@ -7,15 +7,13 @@ import ( "strings" "unicode" - "github.com/ipfs/go-ipfs/core/commands/e" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mhash "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - verifcid "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + verifcid "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" + mhash "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" + cidutil "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil" ) var CidCmd = &cmds.Command{ @@ -245,13 +243,9 @@ var basesCmd = &cmds.Command{ return nil }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, val0 interface{}) error { + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, val []CodeAndName) error { prefixes, _ := req.Options[prefixOptionName].(bool) numeric, _ := req.Options[numericOptionName].(bool) - val, ok := val0.([]CodeAndName) - if !ok { - return e.TypeErr(val, val0) - } sort.Sort(multibaseSorter{val}) for _, v := range val { code := v.Code @@ -297,12 +291,8 @@ var codecsCmd = &cmds.Command{ return nil }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, val0 interface{}) error { + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, val []CodeAndName) error { numeric, _ := req.Options[codecsNumericOptionName].(bool) - val, ok := val0.([]CodeAndName) - if !ok { - return e.TypeErr(val, val0) - } sort.Sort(codeAndNameSorter{val}) for _, v := range val { if numeric { diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/cidbase.go b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/cidbase.go new file mode 100644 index 0000000000..bc242daecd --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/cidbase.go @@ -0,0 +1,107 @@ +package cmdenv + +import ( + "fmt" + "strings" + + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" +) + +var OptionCidBase = cmdkit.StringOption("cid-base", "Multibase encoding used for version 1 CIDs in output.") +var OptionUpgradeCidV0InOutput = cmdkit.BoolOption("upgrade-cidv0-in-output", "Upgrade version 0 to version 1 CIDs in output.") + +// GetCidEncoder processes the `cid-base` and `output-cidv1` options and +// returns a encoder to use based on those parameters. +func GetCidEncoder(req *cmds.Request) (cidenc.Encoder, error) { + return getCidBase(req, true) +} + +// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by +// lower level commands. It differs from GetCidEncoder in that CIDv0 +// are not, by default, auto-upgraded to CIDv1. +func GetLowLevelCidEncoder(req *cmds.Request) (cidenc.Encoder, error) { + return getCidBase(req, false) +} + +func getCidBase(req *cmds.Request, autoUpgrade bool) (cidenc.Encoder, error) { + base, _ := req.Options[OptionCidBase.Name()].(string) + upgrade, upgradeDefined := req.Options[OptionUpgradeCidV0InOutput.Name()].(bool) + + e := cidenc.Default() + + if base != "" { + var err error + e.Base, err = mbase.EncoderByName(base) + if err != nil { + return e, err + } + if autoUpgrade { + e.Upgrade = true + } + } + + if upgradeDefined { + e.Upgrade = upgrade + } + + return e, nil +} + +// CidBaseDefined returns true if the `cid-base` option is specified +// on the command line +func CidBaseDefined(req *cmds.Request) bool { + base, _ := req.Options["cid-base"].(string) + return base != "" +} + +// CidEncoderFromPath creates a new encoder that is influenced from +// the encoded Cid in a Path. For CidV0 the multibase from the base +// encoder is used and automatic upgrades are disabled. For CidV1 the +// multibase from the CID is used and upgrades are enabled. +// +// This logic is intentionally fuzzy and will match anything of the form +// `CidLike`, `CidLike/...`, or `/namespace/CidLike/...`. +// +// For example: +// +// * Qm... +// * Qm.../... +// * /ipfs/Qm... +// * /ipns/bafybeiahnxfi7fpmr5wtxs2imx4abnyn7fdxeiox7xxjem6zuiioqkh6zi/... +// * /bzz/bafybeiahnxfi7fpmr5wtxs2imx4abnyn7fdxeiox7xxjem6zuiioqkh6zi/... +func CidEncoderFromPath(p string) (cidenc.Encoder, error) { + components := strings.SplitN(p, "/", 4) + + var maybeCid string + if components[0] != "" { + // No leading slash, first component is likely CID-like. + maybeCid = components[0] + } else if len(components) < 3 { + // Not enough components to include a CID. + return cidenc.Encoder{}, fmt.Errorf("no cid in path: %s", p) + } else { + maybeCid = components[2] + } + c, err := cid.Decode(maybeCid) + if err != nil { + // Ok, not a CID-like thing. Keep the current encoder. + return cidenc.Encoder{}, fmt.Errorf("no cid in path: %s", p) + } + if c.Version() == 0 { + // Version 0, use the base58 non-upgrading encoder. + return cidenc.Default(), nil + } + + // Version 1+, extract multibase encoding. + encoding, _, err := mbase.Decode(maybeCid) + if err != nil { + // This should be impossible, we've already decoded the cid. + panic(fmt.Sprintf("BUG: failed to get multibase decoder for CID %s", maybeCid)) + } + + return cidenc.Encoder{Base: mbase.MustNewEncoder(encoding), Upgrade: true}, nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/env.go b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/env.go index c3f36fd8c8..00984e9de8 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/env.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/env.go @@ -2,15 +2,20 @@ package cmdenv import ( "fmt" + "strings" "github.com/ipfs/go-ipfs/commands" "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) +var log = logging.Logger("core/commands/cmdenv") + // GetNode extracts the node from the environment. func GetNode(env interface{}) (*core.IpfsNode, error) { ctx, ok := env.(*commands.Context) @@ -22,13 +27,28 @@ func GetNode(env interface{}) (*core.IpfsNode, error) { } // GetApi extracts CoreAPI instance from the environment. -func GetApi(env cmds.Environment) (coreiface.CoreAPI, error) { +func GetApi(env cmds.Environment, req *cmds.Request) (coreiface.CoreAPI, error) { ctx, ok := env.(*commands.Context) if !ok { return nil, fmt.Errorf("expected env to be of type %T, got %T", ctx, env) } - return ctx.GetApi() + offline, _ := req.Options["offline"].(bool) + if !offline { + offline, _ = req.Options["local"].(bool) + if offline { + log.Errorf("Command '%s', --local is deprecated, use --offline instead", strings.Join(req.Path, " ")) + } + } + api, err := ctx.GetAPI() + if err != nil { + return nil, err + } + if offline { + return api.WithOptions(options.Api.Offline(offline)) + } + + return api, nil } // GetConfig extracts the config from the environment. @@ -40,3 +60,13 @@ func GetConfig(env cmds.Environment) (*config.Config, error) { return ctx.GetConfig() } + +// GetConfigRoot extracts the config root from the environment +func GetConfigRoot(env cmds.Environment) (string, error) { + ctx, ok := env.(*commands.Context) + if !ok { + return "", fmt.Errorf("expected env to be of type %T, got %T", ctx, env) + } + + return ctx.ConfigRoot, nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/file.go b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/file.go new file mode 100644 index 0000000000..8436f76959 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/cmdenv/file.go @@ -0,0 +1,23 @@ +package cmdenv + +import ( + "fmt" + + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" +) + +// GetFileArg returns the next file from the directory or an error +func GetFileArg(it files.DirIterator) (files.File, error) { + if !it.Next() { + err := it.Err() + if err == nil { + err = fmt.Errorf("expected a file argument") + } + return nil, err + } + file := files.FileFromEntry(it) + if file == nil { + return nil, fmt.Errorf("file argument was nil") + } + return file, nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/commands.go b/vendor/github.com/ipfs/go-ipfs/core/commands/commands.go index 804f359b7e..fefd095ed7 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/commands.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/commands.go @@ -14,7 +14,7 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/config.go b/vendor/github.com/ipfs/go-ipfs/core/commands/config.go index 73385d7ea9..1a3902066a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/config.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/config.go @@ -1,7 +1,6 @@ package commands import ( - "bytes" "encoding/json" "errors" "fmt" @@ -11,13 +10,13 @@ import ( "os/exec" "strings" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - repo "github.com/ipfs/go-ipfs/repo" - fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" + "github.com/ipfs/go-ipfs/repo" + "github.com/ipfs/go-ipfs/repo/fsrepo" "gx/ipfs/QmP2i47tnU23ijdshrZtuvrSkQPtf9HhsMb9fwGVe8owj2/jsondiff" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -33,8 +32,9 @@ type ConfigField struct { } const ( - configBoolOptionName = "bool" - configJSONOptionName = "json" + configBoolOptionName = "bool" + configJSONOptionName = "json" + configDryRunOptionName = "dry-run" ) var ConfigCmd = &cmds.Command{ @@ -60,7 +60,12 @@ Set the value of the 'Datastore.Path' key: $ ipfs config Datastore.Path ~/.ipfs/datastore `, }, - + Subcommands: map[string]*cmds.Command{ + "show": configShowCmd, + "edit": configEditCmd, + "replace": configReplaceCmd, + "profile": configProfileCmd, + }, Arguments: []cmdkit.Argument{ cmdkit.StringArg("key", true, false, "The key of the config entry (e.g. \"Addresses.API\")."), cmdkit.StringArg("value", false, false, "The value to set the config entry to."), @@ -69,46 +74,40 @@ Set the value of the 'Datastore.Path' key: cmdkit.BoolOption(configBoolOptionName, "Set a boolean value."), cmdkit.BoolOption(configJSONOptionName, "Parse stringified JSON."), }, - Run: func(req cmds.Request, res cmds.Response) { - args := req.Arguments() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + args := req.Arguments key := args[0] var output *ConfigField - defer func() { - if output != nil { - res.SetOutput(output) - } else { - res.SetOutput(nil) - } - }() // This is a temporary fix until we move the private key out of the config file switch strings.ToLower(key) { case "identity", "identity.privkey": - res.SetError(fmt.Errorf("cannot show or change private key through API"), cmdkit.ErrNormal) - return + return errors.New("cannot show or change private key through API") default: } - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + cfgRoot, err := cmdenv.GetConfigRoot(env) + if err != nil { + return err + } + r, err := fsrepo.Open(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer r.Close() if len(args) == 2 { value := args[1] - if parseJSON, _, _ := req.Option(configJSONOptionName).Bool(); parseJSON { + if parseJSON, _ := req.Options[configJSONOptionName].(bool); parseJSON { var jsonVal interface{} if err := json.Unmarshal([]byte(value), &jsonVal); err != nil { err = fmt.Errorf("failed to unmarshal json. %s", err) - res.SetError(err, cmdkit.ErrNormal) - return + return err } output, err = setConfig(r, key, jsonVal) - } else if isbool, _, _ := req.Option(configBoolOptionName).Bool(); isbool { + } else if isbool, _ := req.Options[configBoolOptionName].(bool); isbool { output, err = setConfig(r, key, value == "true") } else { output, err = setConfig(r, key, value) @@ -116,46 +115,30 @@ Set the value of the 'Datastore.Path' key: } else { output, err = getConfig(r, key) } + if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - if len(res.Request().Arguments()) == 2 { - return nil, nil // dont output anything - } - - if res.Error() != nil { - return nil, res.Error() - } - - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - vf, ok := v.(*ConfigField) - if !ok { - return nil, e.TypeErr(vf, v) + return cmds.EmitOnce(res, output) + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *ConfigField) error { + if len(req.Arguments) == 2 { + return nil } - buf, err := config.HumanOutput(vf.Value) + buf, err := config.HumanOutput(out.Value) if err != nil { - return nil, err + return err } buf = append(buf, byte('\n')) - return bytes.NewReader(buf), nil - }, + + w.Write(buf) + return nil + }), }, Type: ConfigField{}, - Subcommands: map[string]*cmds.Command{ - "show": configShowCmd, - "edit": configEditCmd, - "replace": configReplaceCmd, - "profile": configProfileCmd, - }, } var configShowCmd = &cmds.Command{ @@ -166,57 +149,46 @@ NOTE: For security reasons, this command will omit your private key. If you woul `, }, Type: map[string]interface{}{}, - Run: func(req cmds.Request, res cmds.Response) { - cfgPath := req.InvocContext().ConfigRoot - fname, err := config.Filename(cfgPath) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfgRoot, err := cmdenv.GetConfigRoot(env) + if err != nil { + return err + } + + fname, err := config.Filename(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } data, err := ioutil.ReadFile(fname) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } var cfg map[string]interface{} err = json.Unmarshal(data, &cfg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = scrubValue(cfg, []string{config.IdentityTag, config.PrivKeyTag}) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&cfg) - }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - if res.Error() != nil { - return nil, res.Error() - } - - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - cfg, ok := v.(*map[string]interface{}) - if !ok { - return nil, e.TypeErr(cfg, v) - } - buf, err := config.HumanOutput(cfg) + return cmds.EmitOnce(res, &cfg) + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *map[string]interface{}) error { + buf, err := config.HumanOutput(out) if err != nil { - return nil, err + return err } buf = append(buf, byte('\n')) - return bytes.NewReader(buf), nil - }, + w.Write(buf) + + return nil + }), }, } @@ -236,7 +208,7 @@ func scrubValue(m map[string]interface{}, key []string) error { for _, k := range key[:len(key)-1] { foundk, val, ok := find(cur, k) if !ok { - return fmt.Errorf("failed to find specified key") + return errors.New("failed to find specified key") } if foundk != k { @@ -270,17 +242,18 @@ variable set to your preferred text editor. `, }, - Run: func(req cmds.Request, res cmds.Response) { - filename, err := config.Filename(req.InvocContext().ConfigRoot) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - err = editConfig(filename) + filename, err := config.Filename(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) + return err } + + return editConfig(filename) }, } @@ -296,29 +269,25 @@ can't be undone. Arguments: []cmdkit.Argument{ cmdkit.FileArg("file", true, false, "The file to use as the new config."), }, - Run: func(req cmds.Request, res cmds.Response) { - // has to be called - res.SetOutput(nil) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfgRoot, err := cmdenv.GetConfigRoot(env) + if err != nil { + return err + } - r, err := fsrepo.Open(req.InvocContext().ConfigRoot) + r, err := fsrepo.Open(cfgRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer r.Close() - file, err := req.Files().NextFile() + file, err := cmdenv.GetFileArg(req.Files.Entries()) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer file.Close() - err = replaceConfig(r, file) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + return replaceConfig(r, file) }, } @@ -341,63 +310,52 @@ var configProfileApplyCmd = &cmds.Command{ Tagline: "Apply profile to config.", }, Options: []cmdkit.Option{ - cmdkit.BoolOption("dry-run", "print difference between the current config and the config that would be generated"), + cmdkit.BoolOption(configDryRunOptionName, "print difference between the current config and the config that would be generated"), }, Arguments: []cmdkit.Argument{ cmdkit.StringArg("profile", true, false, "The profile to apply to the config."), }, - Run: func(req cmds.Request, res cmds.Response) { - profile, ok := config.Profiles[req.Arguments()[0]] + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + profile, ok := config.Profiles[req.Arguments[0]] if !ok { - res.SetError(fmt.Errorf("%s is not a profile", req.Arguments()[0]), cmdkit.ErrNormal) - return + return fmt.Errorf("%s is not a profile", req.Arguments[0]) } - dryRun, _, _ := req.Option("dry-run").Bool() - oldCfg, newCfg, err := transformConfig(req.InvocContext().ConfigRoot, req.Arguments()[0], profile.Transform, dryRun) + dryRun, _ := req.Options[configDryRunOptionName].(bool) + cfgRoot, err := cmdenv.GetConfigRoot(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + oldCfg, newCfg, err := transformConfig(cfgRoot, req.Arguments[0], profile.Transform, dryRun) + if err != nil { + return err } oldCfgMap, err := scrubPrivKey(oldCfg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } newCfgMap, err := scrubPrivKey(newCfg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&ConfigUpdateOutput{ + return cmds.EmitOnce(res, &ConfigUpdateOutput{ OldCfg: oldCfgMap, NewCfg: newCfgMap, }) }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - if res.Error() != nil { - return nil, res.Error() - } - - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - apply, ok := v.(*ConfigUpdateOutput) - if !ok { - return nil, e.TypeErr(apply, v) - } - - diff := jsondiff.Compare(apply.OldCfg, apply.NewCfg) + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *ConfigUpdateOutput) error { + diff := jsondiff.Compare(out.OldCfg, out.NewCfg) buf := jsondiff.Format(diff) - return strings.NewReader(string(buf)), nil - }, + w.Write(buf) + + return nil + }), }, Type: ConfigUpdateOutput{}, } @@ -444,15 +402,18 @@ func transformConfig(configRoot string, configName string, transformer config.Tr } defer r.Close() - cfg, err := r.Config() + oldCfg, err := r.Config() if err != nil { return nil, nil, err } // make a copy to avoid updating repo's config unintentionally - oldCfg := *cfg - newCfg := oldCfg - err = transformer(&newCfg) + newCfg, err := oldCfg.Clone() + if err != nil { + return nil, nil, err + } + + err = transformer(newCfg) if err != nil { return nil, nil, err } @@ -463,13 +424,13 @@ func transformConfig(configRoot string, configName string, transformer config.Tr return nil, nil, err } - err = r.SetConfig(&newCfg) + err = r.SetConfig(newCfg) if err != nil { return nil, nil, err } } - return &oldCfg, &newCfg, nil + return oldCfg, newCfg, nil } func getConfig(r repo.Repo, key string) (*ConfigField, error) { @@ -513,12 +474,12 @@ func replaceConfig(r repo.Repo, file io.Reader) error { keyF, err := getConfig(r, config.PrivKeySelector) if err != nil { - return fmt.Errorf("failed to get PrivKey") + return errors.New("failed to get PrivKey") } pkstr, ok := keyF.Value.(string) if !ok { - return fmt.Errorf("private key in config was not a string") + return errors.New("private key in config was not a string") } cfg.Identity.PrivKey = pkstr diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/dag/dag.go b/vendor/github.com/ipfs/go-ipfs/core/commands/dag/dag.go index f00050d84a..1b736f241a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/dag/dag.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/dag/dag.go @@ -4,17 +4,20 @@ import ( "fmt" "io" "math" + "strings" "github.com/ipfs/go-ipfs/core/commands/cmdenv" "github.com/ipfs/go-ipfs/core/coredag" - "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + iface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" ) var DagCmd = &cmds.Command{ @@ -63,7 +66,7 @@ into an object of the specified format. cmdkit.StringOption("hash", "Hash function to use").WithDefault(""), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - nd, err := cmdenv.GetNode(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -85,22 +88,18 @@ into an object of the specified format. } } - cids := cid.NewSet() - b := ipld.NewBatch(req.Context, nd.DAG) - + var adder ipld.NodeAdder = api.Dag() if dopin { - defer nd.Blockstore.PinLock().Unlock() + adder = api.Dag().Pinning() } + b := ipld.NewBatch(req.Context, adder) - for { - file, err := req.Files.NextFile() - if err == io.EOF { - // Finished the list of files. - break - } else if err != nil { - return err + it := req.Files.Entries() + for it.Next() { + file := files.FileFromEntry(it) + if file == nil { + return fmt.Errorf("expected a regular file") } - nds, err := coredag.ParseInputs(ienc, format, file, mhType, -1) if err != nil { return err @@ -117,33 +116,28 @@ into an object of the specified format. } cid := nds[0].Cid() - cids.Add(cid) if err := res.Emit(&OutputObject{Cid: cid}); err != nil { return err } } + if it.Err() != nil { + return it.Err() + } if err := b.Commit(); err != nil { return err } - if dopin { - cids.ForEach(func(c cid.Cid) error { - nd.Pinning.PinWithMode(c, pin.Recursive) - return nil - }) - - err := nd.Pinning.Flush() - if err != nil { - return err - } - } return nil }, Type: OutputObject{}, Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *OutputObject) error { - fmt.Fprintln(w, out.Cid.String()) + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err + } + fmt.Fprintln(w, enc.Encode(out.Cid)) return nil }), }, @@ -161,27 +155,29 @@ format. cmdkit.StringArg("ref", true, false, "The object to get").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - nd, err := cmdenv.GetNode(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - p, err := path.ParsePath(req.Arguments[0]) + p, err := iface.ParsePath(req.Arguments[0]) if err != nil { return err } - lastCid, rem, err := nd.Resolver.ResolveToLastNode(req.Context, p) + rp, err := api.ResolvePath(req.Context, p) if err != nil { return err } - obj, err := nd.DAG.Get(req.Context, lastCid) + + obj, err := api.Dag().Get(req.Context, rp.Cid()) if err != nil { return err } var out interface{} = obj - if len(rem) > 0 { + if len(rp.Remainder()) > 0 { + rem := strings.Split(rp.Remainder(), "/") final, _, err := obj.Resolve(rem) if err != nil { return err @@ -204,29 +200,48 @@ var DagResolveCmd = &cmds.Command{ cmdkit.StringArg("ref", true, false, "The path to resolve").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - nd, err := cmdenv.GetNode(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - p, err := path.ParsePath(req.Arguments[0]) + p, err := iface.ParsePath(req.Arguments[0]) if err != nil { return err } - lastCid, rem, err := nd.Resolver.ResolveToLastNode(req.Context, p) + rp, err := api.ResolvePath(req.Context, p) if err != nil { return err } return cmds.EmitOnce(res, &ResolveOutput{ - Cid: lastCid, - RemPath: path.Join(rem), + Cid: rp.Cid(), + RemPath: rp.Remainder(), }) }, Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *ResolveOutput) error { - p := out.Cid.String() + var ( + enc cidenc.Encoder + err error + ) + switch { + case !cmdenv.CidBaseDefined(req): + // Not specified, check the path. + enc, err = cmdenv.CidEncoderFromPath(req.Arguments[0]) + if err == nil { + break + } + // Nope, fallback on the default. + fallthrough + default: + enc, err = cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err + } + } + p := enc.Encode(out.Cid) if out.RemPath != "" { p = path.Join([]string{p, out.RemPath}) } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/dht.go b/vendor/github.com/ipfs/go-ipfs/core/commands/dht.go index 096d4cb211..461ec8cea7 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/dht.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/dht.go @@ -1,27 +1,25 @@ package commands import ( - "bytes" "context" "errors" "fmt" "io" "time" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var ErrNotDHT = errors.New("routing service is not a DHT") @@ -46,7 +44,7 @@ var DhtCmd = &cmds.Command{ } const ( - dhtVerboseOptionName = "v" + dhtVerboseOptionName = "verbose" ) var queryDhtCmd = &cmds.Command{ @@ -59,34 +57,30 @@ var queryDhtCmd = &cmds.Command{ cmdkit.StringArg("peerID", true, true, "The peerID to run the query against."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.DHT == nil { - res.SetError(ErrNotDHT, cmdkit.ErrNormal) - return + if nd.DHT == nil { + return ErrNotDHT } - id, err := peer.IDB58Decode(req.Arguments()[0]) + id, err := peer.IDB58Decode(req.Arguments[0]) if err != nil { - res.SetError(cmds.ClientError("invalid peer ID"), cmdkit.ErrClient) - return + return cmds.ClientError("invalid peer ID") } - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) - closestPeers, err := n.DHT.GetClosestPeers(ctx, string(id)) + closestPeers, err := nd.DHT.GetClosestPeers(ctx, string(id)) if err != nil { cancel() - res.SetError(err, cmdkit.ErrNormal) - return + return err } go func() { @@ -99,22 +93,16 @@ var queryDhtCmd = &cmds.Command{ } }() - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - go func() { - defer close(outChan) - for e := range events { - select { - case outChan <- e: - case <-req.Context().Done(): - return - } + for e := range events { + if err := res.Emit(e); err != nil { + return err } - }() + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() cmds.Marshaler { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.PeerResponse: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { for _, p := range obj.Responses { @@ -122,25 +110,10 @@ var queryDhtCmd = &cmds.Command{ } }, } - - return func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } - - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - - buf := new(bytes.Buffer) - printEvent(obj, buf, verbose, pfm) - return buf, nil - } - }(), + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + printEvent(out, w, verbose, pfm) + return nil + }), }, Type: notif.QueryEvent{}, } @@ -159,55 +132,37 @@ var findProvidersDhtCmd = &cmds.Command{ cmdkit.StringArg("key", true, true, "The key to find providers for."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), cmdkit.IntOption(numProvidersOptionName, "n", "The number of providers to find.").WithDefault(20), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.Routing == nil { - res.SetError(ErrNotOnline, cmdkit.ErrNormal) - return + if !n.OnlineMode() { + return ErrNotOnline } - numProviders, _, err := res.Request().Option(numProvidersOptionName).Int() + numProviders, _ := req.Options[numProvidersOptionName].(int) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if numProviders < 1 { - res.SetError(fmt.Errorf("number of providers must be greater than 0"), cmdkit.ErrNormal) - return + return fmt.Errorf("number of providers must be greater than 0") } - c, err := cid.Parse(req.Arguments()[0]) + c, err := cid.Parse(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) pchan := n.Routing.FindProvidersAsync(ctx, c, numProviders) - go func() { - defer close(outChan) - for e := range events { - select { - case outChan <- e: - case <-req.Context().Done(): - return - } - } - }() go func() { defer cancel() @@ -219,9 +174,16 @@ var findProvidersDhtCmd = &cmds.Command{ }) } }() + for e := range events { + if err := res.Emit(e); err != nil { + return err + } + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() func(cmds.Response) (io.Reader, error) { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.FinalPeer: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { if verbose { @@ -242,23 +204,11 @@ var findProvidersDhtCmd = &cmds.Command{ }, } - return func(res cmds.Response) (io.Reader, error) { - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } - - buf := new(bytes.Buffer) - printEvent(obj, buf, verbose, pfm) - return buf, nil - } - }(), + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + printEvent(out, w, verbose, pfm) + + return nil + }), }, Type: notif.QueryEvent{}, } @@ -276,74 +226,54 @@ var provideRefDhtCmd = &cmds.Command{ cmdkit.StringArg("key", true, true, "The key[s] to send provide records for.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), cmdkit.BoolOption(recursiveOptionName, "r", "Recursively provide entire graph."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.Routing == nil { - res.SetError(ErrNotOnline, cmdkit.ErrNormal) - return + if !nd.OnlineMode() { + return ErrNotOnline } - if len(n.PeerHost.Network().Conns()) == 0 { - res.SetError(errors.New("cannot provide, no connected peers"), cmdkit.ErrNormal) - return + if len(nd.PeerHost.Network().Conns()) == 0 { + return errors.New("cannot provide, no connected peers") } - rec, _, _ := req.Option(recursiveOptionName).Bool() + rec, _ := req.Options[recursiveOptionName].(bool) var cids []cid.Cid - for _, arg := range req.Arguments() { + for _, arg := range req.Arguments { c, err := cid.Decode(arg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - has, err := n.Blockstore.Has(c) + has, err := nd.Blockstore.Has(c) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if !has { - res.SetError(fmt.Errorf("block %s not found locally, cannot provide", c), cmdkit.ErrNormal) - return + return fmt.Errorf("block %s not found locally, cannot provide", c) } cids = append(cids, c) } - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) - go func() { - defer close(outChan) - for e := range events { - select { - case outChan <- e: - case <-req.Context().Done(): - return - } - } - }() - go func() { defer cancel() var err error if rec { - err = provideKeysRec(ctx, n.Routing, n.DAG, cids) + err = provideKeysRec(ctx, nd.Routing, nd.DAG, cids) } else { - err = provideKeys(ctx, n.Routing, cids) + err = provideKeys(ctx, nd.Routing, cids) } if err != nil { notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ @@ -352,9 +282,17 @@ var provideRefDhtCmd = &cmds.Command{ }) } }() + + for e := range events { + if err := res.Emit(e); err != nil { + return err + } + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() func(res cmds.Response) (io.Reader, error) { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.FinalPeer: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { if verbose { @@ -363,22 +301,11 @@ var provideRefDhtCmd = &cmds.Command{ }, } - return func(res cmds.Response) (io.Reader, error) { - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } - - buf := new(bytes.Buffer) - printEvent(obj, buf, verbose, pfm) - return buf, nil - } - }(), + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + printEvent(out, w, verbose, pfm) + + return nil + }), }, Type: notif.QueryEvent{}, } @@ -429,46 +356,29 @@ var findPeerDhtCmd = &cmds.Command{ cmdkit.StringArg("peerID", true, true, "The ID of the peer to search for."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.Routing == nil { - res.SetError(ErrNotOnline, cmdkit.ErrNormal) - return + if !nd.OnlineMode() { + return ErrNotOnline } - pid, err := peer.IDB58Decode(req.Arguments()[0]) + pid, err := peer.IDB58Decode(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) - go func() { - defer close(outChan) - for v := range events { - select { - case outChan <- v: - case <-req.Context().Done(): - } - - } - }() - go func() { defer cancel() - pi, err := n.Routing.FindPeer(ctx, pid) + pi, err := nd.Routing.FindPeer(ctx, pid) if err != nil { notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ Type: notif.QueryError, @@ -482,9 +392,17 @@ var findPeerDhtCmd = &cmds.Command{ Responses: []*pstore.PeerInfo{&pi}, }) }() + + for e := range events { + if err := res.Emit(e); err != nil { + return err + } + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() func(cmds.Response) (io.Reader, error) { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.FinalPeer: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { pi := obj.Responses[0] @@ -494,24 +412,10 @@ var findPeerDhtCmd = &cmds.Command{ }, } - return func(res cmds.Response) (io.Reader, error) { - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } - - buf := new(bytes.Buffer) - printEvent(obj, buf, verbose, pfm) - - return buf, nil - } - }(), + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + printEvent(out, w, verbose, pfm) + return nil + }), }, Type: notif.QueryEvent{}, } @@ -534,45 +438,29 @@ Different key types can specify other 'best' rules. cmdkit.StringArg("key", true, true, "The key to find a value for."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.Routing == nil { - res.SetError(ErrNotOnline, cmdkit.ErrNormal) - return + if !nd.OnlineMode() { + return ErrNotOnline } - dhtkey, err := escapeDhtKey(req.Arguments()[0]) + dhtkey, err := escapeDhtKey(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) - go func() { - defer close(outChan) - for e := range events { - select { - case outChan <- e: - case <-req.Context().Done(): - } - } - }() - go func() { defer cancel() - val, err := n.Routing.GetValue(ctx, dhtkey) + val, err := nd.Routing.GetValue(ctx, dhtkey) if err != nil { notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ Type: notif.QueryError, @@ -585,9 +473,17 @@ Different key types can specify other 'best' rules. }) } }() + + for e := range events { + if err := res.Emit(e); err != nil { + return err + } + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() func(cmds.Response) (io.Reader, error) { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.Value: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { if verbose { @@ -598,25 +494,11 @@ Different key types can specify other 'best' rules. }, } - return func(res cmds.Response) (io.Reader, error) { - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + printEvent(out, w, verbose, pfm) - buf := new(bytes.Buffer) - - printEvent(obj, buf, verbose, pfm) - - return buf, nil - } - }(), + return nil + }), }, Type: notif.QueryEvent{}, } @@ -648,48 +530,31 @@ NOTE: A value may not exceed 2048 bytes. cmdkit.StringArg("value", true, false, "The value to store.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."), + cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - if n.Routing == nil { - res.SetError(ErrNotOnline, cmdkit.ErrNormal) - return + if !nd.OnlineMode() { + return ErrNotOnline } - key, err := escapeDhtKey(req.Arguments()[0]) + key, err := escapeDhtKey(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - outChan := make(chan interface{}) - res.SetOutput((<-chan interface{})(outChan)) - - data := req.Arguments()[1] + data := req.Arguments[1] - ctx, cancel := context.WithCancel(req.Context()) + ctx, cancel := context.WithCancel(req.Context) ctx, events := notif.RegisterForQueryEvents(ctx) - go func() { - defer close(outChan) - for e := range events { - select { - case outChan <- e: - case <-req.Context().Done(): - return - } - } - }() - go func() { defer cancel() - err := n.Routing.PutValue(ctx, key, []byte(data)) + err := nd.Routing.PutValue(ctx, key, []byte(data)) if err != nil { notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ Type: notif.QueryError, @@ -697,9 +562,17 @@ NOTE: A value may not exceed 2048 bytes. }) } }() + + for e := range events { + if err := res.Emit(e); err != nil { + return err + } + } + + return nil }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func() func(cmds.Response) (io.Reader, error) { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *notif.QueryEvent) error { pfm := pfuncMap{ notif.FinalPeer: func(obj *notif.QueryEvent, out io.Writer, verbose bool) { if verbose { @@ -711,23 +584,12 @@ NOTE: A value may not exceed 2048 bytes. }, } - return func(res cmds.Response) (io.Reader, error) { - verbose, _, _ := res.Request().Option(dhtVerboseOptionName).Bool() - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - obj, ok := v.(*notif.QueryEvent) - if !ok { - return nil, e.TypeErr(obj, v) - } - - buf := new(bytes.Buffer) - printEvent(obj, buf, verbose, pfm) - - return buf, nil - } - }(), + verbose, _ := req.Options[dhtVerboseOptionName].(bool) + + printEvent(out, w, verbose, pfm) + + return nil + }), }, Type: notif.QueryEvent{}, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/diag.go b/vendor/github.com/ipfs/go-ipfs/core/commands/diag.go index 4f9c6e48da..be28ff487f 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/diag.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/diag.go @@ -1,9 +1,8 @@ package commands import ( - cmds "github.com/ipfs/go-ipfs/commands" - - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var DiagCmd = &cmds.Command{ diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/dns.go b/vendor/github.com/ipfs/go-ipfs/core/commands/dns.go index ffc2dd159d..8a1408b1f2 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/dns.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/dns.go @@ -4,11 +4,12 @@ import ( "fmt" "io" + nsopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" + ncmd "github.com/ipfs/go-ipfs/core/commands/name" namesys "github.com/ipfs/go-ipfs/namesys" - nsopts "github.com/ipfs/go-ipfs/namesys/opts" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/external.go b/vendor/github.com/ipfs/go-ipfs/core/commands/external.go index ad32678b1e..2217dfa7b5 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/external.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/external.go @@ -8,9 +8,10 @@ import ( "os/exec" "strings" - cmds "github.com/ipfs/go-ipfs/commands" + commands "github.com/ipfs/go-ipfs/commands" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) func ExternalBinary() *cmds.Command { @@ -19,29 +20,27 @@ func ExternalBinary() *cmds.Command { cmdkit.StringArg("args", false, true, "Arguments for subcommand."), }, External: true, - Run: func(req cmds.Request, res cmds.Response) { - binname := strings.Join(append([]string{"ipfs"}, req.Path()...), "-") + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + binname := strings.Join(append([]string{"ipfs"}, req.Path...), "-") _, err := exec.LookPath(binname) if err != nil { // special case for '--help' on uninstalled binaries. - for _, arg := range req.Arguments() { + for _, arg := range req.Arguments { if arg == "--help" || arg == "-h" { buf := new(bytes.Buffer) fmt.Fprintf(buf, "%s is an 'external' command.\n", binname) fmt.Fprintf(buf, "It does not currently appear to be installed.\n") fmt.Fprintf(buf, "Please refer to the ipfs documentation for instructions.\n") - res.SetOutput(buf) - return + return res.Emit(buf) } } - res.SetError(fmt.Errorf("%s not installed", binname), cmdkit.ErrNormal) - return + return fmt.Errorf("%s not installed", binname) } r, w := io.Pipe() - cmd := exec.Command(binname, req.Arguments()...) + cmd := exec.Command(binname, req.Arguments...) // TODO: make commands lib be able to pass stdin through daemon //cmd.Stdin = req.Stdin() @@ -50,39 +49,39 @@ func ExternalBinary() *cmds.Command { cmd.Stderr = w // setup env of child program - env := os.Environ() + osenv := os.Environ() // Get the node iff already defined. - if req.InvocContext().Online { - nd, err := req.InvocContext().GetNode() + if cctx, ok := env.(*commands.Context); ok && cctx.Online { + nd, err := cctx.GetNode() if err != nil { - res.SetError(fmt.Errorf( - "failed to start ipfs node: %s", - err, - ), cmdkit.ErrFatal) - return + return fmt.Errorf("failed to start ipfs node: %s", err) } - env = append(env, fmt.Sprintf("IPFS_ONLINE=%t", nd.OnlineMode())) + osenv = append(osenv, fmt.Sprintf("IPFS_ONLINE=%t", nd.OnlineMode())) } - cmd.Env = env + cmd.Env = osenv err = cmd.Start() if err != nil { - res.SetError(fmt.Errorf("failed to start subcommand: %s", err), cmdkit.ErrNormal) - return + return fmt.Errorf("failed to start subcommand: %s", err) } - res.SetOutput(r) + errC := make(chan error) go func() { + var err error + defer func() { errC <- err }() err = cmd.Wait() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - } - w.Close() }() + + err = res.Emit(r) + if err != nil { + return err + } + + return <-errC }, } } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/files.go b/vendor/github.com/ipfs/go-ipfs/core/commands/files.go index 1662f7f01b..105e54d518 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/files.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/files.go @@ -1,7 +1,6 @@ package commands import ( - "bytes" "context" "errors" "fmt" @@ -11,25 +10,23 @@ import ( "sort" "strings" - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" - core "github.com/ipfs/go-ipfs/core" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - "github.com/ipfs/go-ipfs/core/coreapi/interface" - - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - bservice "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + "github.com/ipfs/go-ipfs/core" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + bservice "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" ) var flog = logging.Logger("cmds/files") @@ -53,19 +50,19 @@ operations. `, }, Options: []cmdkit.Option{ - cmdkit.BoolOption("f", "flush", "Flush target and ancestors after write.").WithDefault(true), + cmdkit.BoolOption(filesFlushOptionName, "f", "Flush target and ancestors after write.").WithDefault(true), }, Subcommands: map[string]*cmds.Command{ - "read": lgc.NewCommand(filesReadCmd), + "read": filesReadCmd, "write": filesWriteCmd, - "mv": lgc.NewCommand(filesMvCmd), - "cp": lgc.NewCommand(filesCpCmd), - "ls": lgc.NewCommand(filesLsCmd), - "mkdir": lgc.NewCommand(filesMkdirCmd), + "mv": filesMvCmd, + "cp": filesCpCmd, + "ls": filesLsCmd, + "mkdir": filesMkdirCmd, "stat": filesStatCmd, - "rm": lgc.NewCommand(filesRmCmd), - "flush": lgc.NewCommand(filesFlushCmd), - "chcid": lgc.NewCommand(filesChcidCmd), + "rm": filesRmCmd, + "flush": filesFlushCmd, + "chcid": filesChcidCmd, }, } @@ -128,7 +125,7 @@ var filesStatCmd = &cmds.Command{ return err } - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -140,6 +137,11 @@ var filesStatCmd = &cmds.Command{ withLocal, _ := req.Options[filesWithLocalOptionName].(bool) + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err + } + var dagserv ipld.DAGService if withLocal { // an offline DAGService will not fetch from the network @@ -156,7 +158,7 @@ var filesStatCmd = &cmds.Command{ return err } - o, err := statNode(nd) + o, err := statNode(nd, enc) if err != nil { return err } @@ -174,12 +176,7 @@ var filesStatCmd = &cmds.Command{ return cmds.EmitOnce(res, o) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - out, ok := v.(*statOutput) - if !ok { - return e.TypeErr(out, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *statOutput) error { s, _ := statGetFormatOptions(req) s = strings.Replace(s, "", out.Hash, -1) s = strings.Replace(s, "", fmt.Sprintf("%d", out.Size), -1) @@ -226,7 +223,7 @@ func statGetFormatOptions(req *cmds.Request) (string, error) { } } -func statNode(nd ipld.Node) (*statOutput, error) { +func statNode(nd ipld.Node, enc cidenc.Encoder) (*statOutput, error) { c := nd.Cid() cumulsize, err := nd.Size() @@ -252,7 +249,7 @@ func statNode(nd ipld.Node) (*statOutput, error) { } return &statOutput{ - Hash: c.String(), + Hash: enc.Encode(c), Blocks: len(nd.Links()), Size: d.FileSize(), CumulativeSize: cumulsize, @@ -260,7 +257,7 @@ func statNode(nd ipld.Node) (*statOutput, error) { }, nil case *dag.RawNode: return &statOutput{ - Hash: c.String(), + Hash: enc.Encode(c), Blocks: 0, Size: cumulsize, CumulativeSize: cumulsize, @@ -303,7 +300,7 @@ func walkBlock(ctx context.Context, dagserv ipld.DAGService, nd ipld.Node) (bool return local, sizeLocal, nil } -var filesCpCmd = &oldcmds.Command{ +var filesCpCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Copy files into mfs.", }, @@ -311,59 +308,52 @@ var filesCpCmd = &oldcmds.Command{ cmdkit.StringArg("source", true, false, "Source object to copy."), cmdkit.StringArg("dest", true, false, "Destination to copy object to."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - node, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - api, err := req.InvocContext().GetApi() + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - flush, _, _ := req.Option("flush").Bool() + flush, _ := req.Options[filesFlushOptionName].(bool) - src, err := checkPath(req.Arguments()[0]) + src, err := checkPath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } src = strings.TrimRight(src, "/") - dst, err := checkPath(req.Arguments()[1]) + dst, err := checkPath(req.Arguments[1]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if dst[len(dst)-1] == '/' { dst += gopath.Base(src) } - nd, err := getNodeFromPath(req.Context(), node, api, src) + node, err := getNodeFromPath(req.Context, nd, api, src) if err != nil { - res.SetError(fmt.Errorf("cp: cannot get node from path %s: %s", src, err), cmdkit.ErrNormal) - return + return fmt.Errorf("cp: cannot get node from path %s: %s", src, err) } - err = mfs.PutNode(node.FilesRoot, dst, nd) + err = mfs.PutNode(nd.FilesRoot, dst, node) if err != nil { - res.SetError(fmt.Errorf("cp: cannot put node in path %s: %s", dst, err), cmdkit.ErrNormal) - return + return fmt.Errorf("cp: cannot put node in path %s: %s", dst, err) } if flush { - err := mfs.FlushPath(node.FilesRoot, dst) + err := mfs.FlushPath(nd.FilesRoot, dst) if err != nil { - res.SetError(fmt.Errorf("cp: cannot flush the created file %s: %s", dst, err), cmdkit.ErrNormal) - return + return fmt.Errorf("cp: cannot flush the created file %s: %s", dst, err) } } - res.SetOutput(nil) + return nil }, } @@ -395,7 +385,7 @@ const ( dontSortOptionName = "U" ) -var filesLsCmd = &oldcmds.Command{ +var filesLsCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "List directories in the local mutable namespace.", ShortDescription: ` @@ -423,43 +413,44 @@ Examples: cmdkit.BoolOption(longOptionName, "Use long listing format."), cmdkit.BoolOption(dontSortOptionName, "Do not sort; list entries in directory order."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { var arg string - if len(req.Arguments()) == 0 { + if len(req.Arguments) == 0 { arg = "/" } else { - arg = req.Arguments()[0] + arg = req.Arguments[0] } path, err := checkPath(arg) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - nd, err := req.InvocContext().GetNode() + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } fsn, err := mfs.Lookup(nd.FilesRoot, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - long, _, _ := req.Option(longOptionName).Bool() + long, _ := req.Options[longOptionName].(bool) + + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err + } switch fsn := fsn.(type) { case *mfs.Directory: if !long { var output []mfs.NodeListing - names, err := fsn.ListNames(req.Context()) + names, err := fsn.ListNames(req.Context) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } for _, name := range names { @@ -467,16 +458,13 @@ Examples: Name: name, }) } - res.SetOutput(&filesLsOutput{output}) - } else { - listing, err := fsn.List(req.Context()) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - res.SetOutput(&filesLsOutput{listing}) + return cmds.EmitOnce(res, &filesLsOutput{output}) } - return + listing, err := fsn.List(req.Context) + if err != nil { + return err + } + return cmds.EmitOnce(res, &filesLsOutput{listing}) case *mfs.File: _, name := gopath.Split(path) out := &filesLsOutput{[]mfs.NodeListing{{Name: name}}} @@ -485,58 +473,44 @@ Examples: size, err := fsn.Size() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } out.Entries[0].Size = size nd, err := fsn.GetNode() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - out.Entries[0].Hash = nd.Cid().String() + out.Entries[0].Hash = enc.Encode(nd.Cid()) } - res.SetOutput(out) - return + return cmds.EmitOnce(res, out) default: - res.SetError(errors.New("unrecognized type"), cmdkit.ErrNormal) + return errors.New("unrecognized type") } }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*filesLsOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - buf := new(bytes.Buffer) - - noSort, _, _ := res.Request().Option(dontSortOptionName).Bool() + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *filesLsOutput) error { + noSort, _ := req.Options[dontSortOptionName].(bool) if !noSort { sort.Slice(out.Entries, func(i, j int) bool { return strings.Compare(out.Entries[i].Name, out.Entries[j].Name) < 0 }) } - long, _, _ := res.Request().Option(longOptionName).Bool() + long, _ := req.Options[longOptionName].(bool) for _, o := range out.Entries { if long { if o.Type == int(mfs.TDir) { o.Name += "/" } - fmt.Fprintf(buf, "%s\t%s\t%d\n", o.Name, o.Hash, o.Size) + fmt.Fprintf(w, "%s\t%s\t%d\n", o.Name, o.Hash, o.Size) } else { - fmt.Fprintf(buf, "%s\n", o.Name) + fmt.Fprintf(w, "%s\n", o.Name) } } - return buf, nil - }, + + return nil + }), }, Type: filesLsOutput{}, } @@ -546,7 +520,7 @@ const ( filesCountOptionName = "count" ) -var filesReadCmd = &oldcmds.Command{ +var filesReadCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Read a file in a given mfs.", ShortDescription: ` @@ -567,81 +541,62 @@ Examples: cmdkit.Int64Option(filesOffsetOptionName, "o", "Byte offset to begin reading from."), cmdkit.Int64Option(filesCountOptionName, "n", "Maximum number of bytes to read."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - path, err := checkPath(req.Arguments()[0]) + path, err := checkPath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - fsn, err := mfs.Lookup(n.FilesRoot, path) + fsn, err := mfs.Lookup(nd.FilesRoot, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } fi, ok := fsn.(*mfs.File) if !ok { - res.SetError(fmt.Errorf("%s was not a file", path), cmdkit.ErrNormal) - return + return fmt.Errorf("%s was not a file", path) } - rfd, err := fi.Open(mfs.OpenReadOnly, false) + rfd, err := fi.Open(mfs.Flags{Read: true}) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } defer rfd.Close() - offset, _, err := req.Option(offsetOptionName).Int64() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + offset, _ := req.Options[offsetOptionName].(int64) if offset < 0 { - res.SetError(fmt.Errorf("cannot specify negative offset"), cmdkit.ErrNormal) - return + return fmt.Errorf("cannot specify negative offset") } filen, err := rfd.Size() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if int64(offset) > filen { - res.SetError(fmt.Errorf("offset was past end of file (%d > %d)", offset, filen), cmdkit.ErrNormal) - return + return fmt.Errorf("offset was past end of file (%d > %d)", offset, filen) } _, err = rfd.Seek(int64(offset), io.SeekStart) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - var r io.Reader = &contextReaderWrapper{R: rfd, ctx: req.Context()} - count, found, err := req.Option(filesCountOptionName).Int64() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + var r io.Reader = &contextReaderWrapper{R: rfd, ctx: req.Context} + count, found := req.Options[filesCountOptionName].(int64) if found { if count < 0 { - res.SetError(fmt.Errorf("cannot specify negative 'count'"), cmdkit.ErrNormal) - return + return fmt.Errorf("cannot specify negative 'count'") } r = io.LimitReader(r, int64(count)) } - - res.SetOutput(r) + return res.Emit(r) }, } @@ -658,7 +613,7 @@ func (crw *contextReaderWrapper) Read(b []byte) (int, error) { return crw.R.CtxReadFull(crw.ctx, b) } -var filesMvCmd = &oldcmds.Command{ +var filesMvCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Move files.", ShortDescription: ` @@ -675,31 +630,28 @@ Example: cmdkit.StringArg("source", true, false, "Source file to move."), cmdkit.StringArg("dest", true, false, "Destination path for file to be moved to."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - src, err := checkPath(req.Arguments()[0]) + flush, _ := req.Options[filesFlushOptionName].(bool) + + src, err := checkPath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dst, err := checkPath(req.Arguments()[1]) + dst, err := checkPath(req.Arguments[1]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - err = mfs.Mv(n.FilesRoot, src, dst) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + err = mfs.Mv(nd.FilesRoot, src, dst) + if err == nil && flush { + err = mfs.FlushPath(nd.FilesRoot, "/") } - - res.SetOutput(nil) + return err }, } @@ -801,7 +753,7 @@ stat' on the file or any of its ancestors. fi.RawLeaves = rawLeaves } - wfd, err := fi.Open(mfs.OpenWriteOnly, flush) + wfd, err := fi.Open(mfs.Flags{Write: true, Sync: flush}) if err != nil { return err } @@ -834,12 +786,11 @@ stat' on the file or any of its ancestors. return err } - input, err := req.Files.NextFile() + var r io.Reader + r, err = cmdenv.GetFileArg(req.Files.Entries()) if err != nil { return err } - - var r io.Reader = input if countfound { r = io.LimitReader(r, int64(count)) } @@ -849,7 +800,7 @@ stat' on the file or any of its ancestors. }, } -var filesMkdirCmd = &oldcmds.Command{ +var filesMkdirCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Make directories.", ShortDescription: ` @@ -875,26 +826,23 @@ Examples: cidVersionOption, hashOption, }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dashp, _, _ := req.Option(filesParentsOptionName).Bool() - dirtomake, err := checkPath(req.Arguments()[0]) + dashp, _ := req.Options[filesParentsOptionName].(bool) + dirtomake, err := checkPath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - flush, _, _ := req.Option(filesFlushOptionName).Bool() + flush, _ := req.Options[filesFlushOptionName].(bool) prefix, err := getPrefix(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } root := n.FilesRoot @@ -903,16 +851,12 @@ Examples: Flush: flush, CidBuilder: prefix, }) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - res.SetOutput(nil) + return err }, } -var filesFlushCmd = &oldcmds.Command{ +var filesFlushCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Flush a given path's data to disk.", ShortDescription: ` @@ -923,29 +867,22 @@ are run with the '--flush=false'. Arguments: []cmdkit.Argument{ cmdkit.StringArg("path", false, false, "Path to flush. Default: '/'."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } path := "/" - if len(req.Arguments()) > 0 { - path = req.Arguments()[0] - } - - err = mfs.FlushPath(nd.FilesRoot, path) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + if len(req.Arguments) > 0 { + path = req.Arguments[0] } - res.SetOutput(nil) + return mfs.FlushPath(nd.FilesRoot, path) }, } -var filesChcidCmd = &oldcmds.Command{ +var filesChcidCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Change the cid version or hash function of the root node of a given path.", ShortDescription: ` @@ -959,37 +896,33 @@ Change the cid version or hash function of the root node of a given path. cidVersionOption, hashOption, }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } path := "/" - if len(req.Arguments()) > 0 { - path = req.Arguments()[0] + if len(req.Arguments) > 0 { + path = req.Arguments[0] } - flush, _, _ := req.Option(filesFlushOptionName).Bool() + flush, _ := req.Options[filesFlushOptionName].(bool) prefix, err := getPrefix(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - err = updatePath(nd.FilesRoot, path, prefix, flush) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + err = updatePath(nd.FilesRoot, path, prefix) + if err == nil && flush { + err = mfs.FlushPath(nd.FilesRoot, path) } - - res.SetOutput(nil) + return err }, } -func updatePath(rt *mfs.Root, pth string, builder cid.Builder, flush bool) error { +func updatePath(rt *mfs.Root, pth string, builder cid.Builder) error { if builder == nil { return nil } @@ -1006,14 +939,10 @@ func updatePath(rt *mfs.Root, pth string, builder cid.Builder, flush bool) error return fmt.Errorf("can only update directories") } - if flush { - nd.Flush() - } - return nil } -var filesRmCmd = &oldcmds.Command{ +var filesRmCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Remove a file.", ShortDescription: ` @@ -1032,27 +961,22 @@ Remove files or directories. cmdkit.StringArg("path", true, true, "File to remove."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("recursive", "r", "Recursively remove directories."), - cmdkit.BoolOption("force", "Forcibly remove target at path; implies -r for directories"), + cmdkit.BoolOption(recursiveOptionName, "r", "Recursively remove directories."), + cmdkit.BoolOption(forceOptionName, "Forcibly remove target at path; implies -r for directories"), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - defer res.SetOutput(nil) - - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - path, err := checkPath(req.Arguments()[0]) + path, err := checkPath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if path == "/" { - res.SetError(fmt.Errorf("cannot delete root"), cmdkit.ErrNormal) - return + return fmt.Errorf("cannot delete root") } // 'rm a/b/c/' will fail unless we trim the slash at the end @@ -1063,66 +987,48 @@ Remove files or directories. dir, name := gopath.Split(path) parent, err := mfs.Lookup(nd.FilesRoot, dir) if err != nil { - res.SetError(fmt.Errorf("parent lookup: %s", err), cmdkit.ErrNormal) - return + return fmt.Errorf("parent lookup: %s", err) } pdir, ok := parent.(*mfs.Directory) if !ok { - res.SetError(fmt.Errorf("no such file or directory: %s", path), cmdkit.ErrNormal) - return + return fmt.Errorf("no such file or directory: %s", path) } - var success bool - defer func() { - if success { - err := pdir.Flush() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - } - }() - // if '--force' specified, it will remove anything else, // including file, directory, corrupted node, etc - force, _, _ := req.Option("force").Bool() + force, _ := req.Options[forceOptionName].(bool) if force { err := pdir.Unlink(name) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - success = true - return + return pdir.Flush() } // get child node by name, when the node is corrupted and nonexistent, // it will return specific error. child, err := pdir.Child(name) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dashr, _, _ := req.Option("r").Bool() + dashr, _ := req.Options[recursiveOptionName].(bool) switch child.(type) { case *mfs.Directory: if !dashr { - res.SetError(fmt.Errorf("%s is a directory, use -r to remove directories", path), cmdkit.ErrNormal) - return + return fmt.Errorf("%s is a directory, use -r to remove directories", path) } } err = pdir.Unlink(name) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - success = true + return pdir.Flush() }, } @@ -1155,9 +1061,9 @@ func getPrefixNew(req *cmds.Request) (cid.Builder, error) { return &prefix, nil } -func getPrefix(req oldcmds.Request) (cid.Builder, error) { - cidVer, cidVerSet, _ := req.Option(filesCidVersionOptionName).Int() - hashFunStr, hashFunSet, _ := req.Option(filesHashOptionName).String() +func getPrefix(req *cmds.Request) (cid.Builder, error) { + cidVer, cidVerSet := req.Options[filesCidVersionOptionName].(int) + hashFunStr, hashFunSet := req.Options[filesHashOptionName].(string) if !cidVerSet && !hashFunSet { return nil, nil diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/filestore.go b/vendor/github.com/ipfs/go-ipfs/core/commands/filestore.go index 577cb8bbaa..71a0637bea 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/filestore.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/filestore.go @@ -1,19 +1,17 @@ package commands import ( - "context" "fmt" "io" + "os" - oldCmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" - "github.com/ipfs/go-ipfs/core" + core "github.com/ipfs/go-ipfs/core" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - "github.com/ipfs/go-ipfs/filestore" + filestore "github.com/ipfs/go-ipfs/filestore" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -23,8 +21,8 @@ var FileStoreCmd = &cmds.Command{ }, Subcommands: map[string]*cmds.Command{ "ls": lsFileStore, - "verify": lgc.NewCommand(verifyFileStore), - "dups": lgc.NewCommand(dupsFileStore), + "verify": verifyFileStore, + "dups": dupsFileStore, }, } @@ -59,11 +57,7 @@ The output is: } args := req.Arguments if len(args) > 0 { - out := perKeyActionToChan(req.Context, args, func(c cid.Cid) *filestore.ListRes { - return filestore.List(fs, c) - }) - - return res.Emit(out) + return listByArgs(res, fs, args) } fileOrder, _ := req.Options[fileOrderOptionName].(bool) @@ -72,23 +66,38 @@ The output is: return err } - out := listResToChan(req.Context, next) - return res.Emit(out) + for { + r := next() + if r == nil { + break + } + if err := res.Emit(r); err != nil { + return err + } + } + + return nil }, PostRun: cmds.PostRunMap{ - cmds.CLI: streamResult(func(v interface{}, out io.Writer) nonFatalError { - r := v.(*filestore.ListRes) - if r.ErrorMsg != "" { - return nonFatalError(r.ErrorMsg) + cmds.CLI: func(res cmds.Response, re cmds.ResponseEmitter) error { + enc, err := cmdenv.GetCidEncoder(res.Request()) + if err != nil { + return err } - fmt.Fprintf(out, "%s\n", r.FormatLong()) - return "" - }), + return streamResult(func(v interface{}, out io.Writer) nonFatalError { + r := v.(*filestore.ListRes) + if r.ErrorMsg != "" { + return nonFatalError(r.ErrorMsg) + } + fmt.Fprintf(out, "%s\n", r.FormatLong(enc.Encode)) + return "" + })(res, re) + }, }, Type: filestore.ListRes{}, } -var verifyFileStore = &oldCmds.Command{ +var verifyFileStore = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Verify objects in filestore.", LongDescription: ` @@ -118,96 +127,104 @@ For ERROR entries the error will also be printed to stderr. Options: []cmdkit.Option{ cmdkit.BoolOption(fileOrderOptionName, "verify the objects based on the order of the backing file"), }, - Run: func(req oldCmds.Request, res oldCmds.Response) { - _, fs, err := getFilestore(req.InvocContext()) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + _, fs, err := getFilestore(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - args := req.Arguments() + args := req.Arguments if len(args) > 0 { - out := perKeyActionToChan(req.Context(), args, func(c cid.Cid) *filestore.ListRes { - return filestore.Verify(fs, c) - }) - res.SetOutput(out) - } else { - fileOrder, _, _ := req.Option(fileOrderOptionName).Bool() - next, err := filestore.VerifyAll(fs, fileOrder) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return listByArgs(res, fs, args) + } + + fileOrder, _ := req.Options[fileOrderOptionName].(bool) + next, err := filestore.VerifyAll(fs, fileOrder) + if err != nil { + return err + } + + for { + r := next() + if r == nil { + break + } + if err := res.Emit(r); err != nil { + return err } - out := listResToChan(req.Context(), next) - res.SetOutput(out) } + + return nil }, - Marshalers: oldCmds.MarshalerMap{ - oldCmds.Text: func(res oldCmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) + PostRun: cmds.PostRunMap{ + cmds.CLI: func(res cmds.Response, re cmds.ResponseEmitter) error { + enc, err := cmdenv.GetCidEncoder(res.Request()) if err != nil { - return nil, err + return err } - r, ok := v.(*filestore.ListRes) - if !ok { - return nil, e.TypeErr(r, v) - } + for { + v, err := res.Next() + if err != nil { + if err == io.EOF { + return nil + } + return err + } - if r.Status == filestore.StatusOtherError { - fmt.Fprintf(res.Stderr(), "%s\n", r.ErrorMsg) + list, ok := v.(*filestore.ListRes) + if !ok { + return e.TypeErr(list, v) + } + + if list.Status == filestore.StatusOtherError { + fmt.Fprintf(os.Stderr, "%s\n", list.ErrorMsg) + } + fmt.Fprintf(os.Stdout, "%s %s\n", list.Status.Format(), list.FormatLong(enc.Encode)) } - fmt.Fprintf(res.Stdout(), "%s %s\n", r.Status.Format(), r.FormatLong()) - return nil, nil }, }, Type: filestore.ListRes{}, } -var dupsFileStore = &oldCmds.Command{ +var dupsFileStore = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "List blocks that are both in the filestore and standard block storage.", }, - Run: func(req oldCmds.Request, res oldCmds.Response) { - _, fs, err := getFilestore(req.InvocContext()) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + _, fs, err := getFilestore(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - ch, err := fs.FileManager().AllKeysChan(req.Context()) + + enc, err := cmdenv.GetCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - out := make(chan interface{}, 128) - res.SetOutput((<-chan interface{})(out)) + ch, err := fs.FileManager().AllKeysChan(req.Context) + if err != nil { + return err + } - go func() { - defer close(out) - for cid := range ch { - have, err := fs.MainBlockstore().Has(cid) - if err != nil { - select { - case out <- &RefWrapper{Err: err.Error()}: - case <-req.Context().Done(): - } - return - } - if have { - select { - case out <- &RefWrapper{Ref: cid.String()}: - case <-req.Context().Done(): - return - } + for cid := range ch { + have, err := fs.MainBlockstore().Has(cid) + if err != nil { + return res.Emit(&RefWrapper{Err: err.Error()}) + } + if have { + if err := res.Emit(&RefWrapper{Ref: enc.Encode(cid)}); err != nil { + return err } } - }() + } + + return nil }, - Marshalers: refsMarshallerMap, - Type: RefWrapper{}, + Encoders: refsEncoderMap, + Type: RefWrapper{}, } -func getFilestore(env interface{}) (*core.IpfsNode, *filestore.Filestore, error) { +func getFilestore(env cmds.Environment) (*core.IpfsNode, *filestore.Filestore, error) { n, err := cmdenv.GetNode(env) if err != nil { return nil, nil, err @@ -219,49 +236,24 @@ func getFilestore(env interface{}) (*core.IpfsNode, *filestore.Filestore, error) return n, fs, err } -func listResToChan(ctx context.Context, next func() *filestore.ListRes) <-chan interface{} { - out := make(chan interface{}, 128) - go func() { - defer close(out) - for { - r := next() - if r == nil { - return +func listByArgs(res cmds.ResponseEmitter, fs *filestore.Filestore, args []string) error { + for _, arg := range args { + c, err := cid.Decode(arg) + if err != nil { + ret := &filestore.ListRes{ + Status: filestore.StatusOtherError, + ErrorMsg: fmt.Sprintf("%s: %v", arg, err), } - select { - case out <- r: - case <-ctx.Done(): - return + if err := res.Emit(ret); err != nil { + return err } + continue } - }() - return out -} - -func perKeyActionToChan(ctx context.Context, args []string, action func(cid.Cid) *filestore.ListRes) <-chan interface{} { - out := make(chan interface{}, 128) - go func() { - defer close(out) - for _, arg := range args { - c, err := cid.Decode(arg) - if err != nil { - select { - case out <- &filestore.ListRes{ - Status: filestore.StatusOtherError, - ErrorMsg: fmt.Sprintf("%s: %v", arg, err), - }: - case <-ctx.Done(): - } - - continue - } - r := action(c) - select { - case out <- r: - case <-ctx.Done(): - return - } + r := filestore.Verify(fs, c) + if err := res.Emit(r); err != nil { + return err } - }() - return out + } + + return nil } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/get.go b/vendor/github.com/ipfs/go-ipfs/core/commands/get.go index 6cf1c79f0a..789c25f739 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/get.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/get.go @@ -1,25 +1,25 @@ package commands import ( + "bufio" "compress/gzip" "errors" "fmt" "io" "os" + "path" "path/filepath" "strings" - core "github.com/ipfs/go-ipfs/core" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" + "github.com/ipfs/go-ipfs/core/commands/e" - "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb" - tar "gx/ipfs/QmQine7gvHncNevKtG9QXxf3nXcwSj6aDDmMm52mHofEEp/tar-utils" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + "gx/ipfs/QmQine7gvHncNevKtG9QXxf3nXcwSj6aDDmMm52mHofEEp/tar-utils" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - uarchive "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive" ) var ErrInvalidCompressionLevel = errors.New("compression level must be between 1 and 9") @@ -66,33 +66,30 @@ may also specify the level of compression by specifying '-l=<1-9>'. return err } - node, err := cmdenv.GetNode(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - p := path.Path(req.Arguments[0]) - ctx := req.Context - dn, err := core.Resolve(ctx, node.Namesys, node.Resolver, p) + + p, err := iface.ParsePath(req.Arguments[0]) if err != nil { return err } - switch dn := dn.(type) { - case *dag.ProtoNode: - size, err := dn.Size() - if err != nil { - return err - } + file, err := api.Unixfs().Get(req.Context, p) + if err != nil { + return err + } - res.SetLength(size) - case *dag.RawNode: - res.SetLength(uint64(len(dn.RawData()))) - default: + size, err := file.Size() + if err != nil { return err } + res.SetLength(uint64(size)) + archive, _ := req.Options[archiveOptionName].(bool) - reader, err := uarchive.DagArchive(ctx, dn, p.String(), node.DAG, archive, cmplvl) + reader, err := fileArchive(file, p.String(), archive, cmplvl) if err != nil { return err } @@ -252,3 +249,94 @@ func getCompressOptions(req *cmds.Request) (int, error) { } return cmplvl, nil } + +// DefaultBufSize is the buffer size for gets. for now, 1MB, which is ~4 blocks. +// TODO: does this need to be configurable? +var DefaultBufSize = 1048576 + +type identityWriteCloser struct { + w io.Writer +} + +func (i *identityWriteCloser) Write(p []byte) (int, error) { + return i.w.Write(p) +} + +func (i *identityWriteCloser) Close() error { + return nil +} + +func fileArchive(f files.Node, name string, archive bool, compression int) (io.Reader, error) { + cleaned := path.Clean(name) + _, filename := path.Split(cleaned) + + // need to connect a writer to a reader + piper, pipew := io.Pipe() + checkErrAndClosePipe := func(err error) bool { + if err != nil { + pipew.CloseWithError(err) + return true + } + return false + } + + // use a buffered writer to parallelize task + bufw := bufio.NewWriterSize(pipew, DefaultBufSize) + + // compression determines whether to use gzip compression. + maybeGzw, err := newMaybeGzWriter(bufw, compression) + if checkErrAndClosePipe(err) { + return nil, err + } + + closeGzwAndPipe := func() { + if err := maybeGzw.Close(); checkErrAndClosePipe(err) { + return + } + if err := bufw.Flush(); checkErrAndClosePipe(err) { + return + } + pipew.Close() // everything seems to be ok. + } + + if !archive && compression != gzip.NoCompression { + // the case when the node is a file + r := files.ToFile(f) + if r == nil { + return nil, errors.New("file is not regular") + } + + go func() { + if _, err := io.Copy(maybeGzw, r); checkErrAndClosePipe(err) { + return + } + closeGzwAndPipe() // everything seems to be ok + }() + } else { + // the case for 1. archive, and 2. not archived and not compressed, in which tar is used anyway as a transport format + + // construct the tar writer + w, err := files.NewTarWriter(maybeGzw) + if checkErrAndClosePipe(err) { + return nil, err + } + + go func() { + // write all the nodes recursively + if err := w.WriteFile(f, filename); checkErrAndClosePipe(err) { + return + } + w.Close() // close tar writer + closeGzwAndPipe() // everything seems to be ok + }() + } + + return piper, nil +} + +func newMaybeGzWriter(w io.Writer, compression int) (io.WriteCloser, error) { + if compression != gzip.NoCompression { + return gzip.NewWriterLevel(w, compression) + } + return &identityWriteCloser{w}, nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/id.go b/vendor/github.com/ipfs/go-ipfs/core/commands/id.go index 671d8dc2ee..89af7f66a1 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/id.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/id.go @@ -11,12 +11,12 @@ import ( core "github.com/ipfs/go-ipfs/core" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - identify "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + identify "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify" + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -176,12 +176,6 @@ func printSelf(node *core.IpfsNode) (interface{}, error) { info := new(IdOutput) info.ID = node.Identity.Pretty() - if node.PrivateKey == nil { - if err := node.LoadPrivateKey(); err != nil { - return nil, err - } - } - pk := node.PrivateKey.GetPublic() pkb, err := ic.MarshalPublicKey(pk) if err != nil { diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/keystore.go b/vendor/github.com/ipfs/go-ipfs/core/commands/keystore.go index fd95e535c0..f6aca2bf53 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/keystore.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/keystore.go @@ -6,11 +6,10 @@ import ( "text/tabwriter" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - "github.com/ipfs/go-ipfs/core/commands/e" - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var KeyCmd = &cmds.Command{ @@ -72,7 +71,7 @@ var keyGenCmd = &cmds.Command{ cmdkit.StringArg("name", true, false, "name of key to create"), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -106,13 +105,8 @@ var keyGenCmd = &cmds.Command{ }) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - k, ok := v.(*KeyOutput) - if !ok { - return e.TypeErr(k, v) - } - - _, err := w.Write([]byte(k.Id + "\n")) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, ko *KeyOutput) error { + _, err := w.Write([]byte(ko.Id + "\n")) return err }), }, @@ -127,7 +121,7 @@ var keyListCmd = &cmds.Command{ cmdkit.BoolOption("l", "Show extra information about keys."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -146,7 +140,7 @@ var keyListCmd = &cmds.Command{ return cmds.EmitOnce(res, &KeyOutputList{list}) }, Encoders: cmds.EncoderMap{ - cmds.Text: keyOutputListMarshaler(), + cmds.Text: keyOutputListEncoders(), }, Type: KeyOutputList{}, } @@ -167,7 +161,7 @@ var keyRenameCmd = &cmds.Command{ cmdkit.BoolOption(keyStoreForceOptionName, "f", "Allow to overwrite an existing key."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -189,16 +183,11 @@ var keyRenameCmd = &cmds.Command{ }) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - k, ok := v.(*KeyRenameOutput) - if !ok { - return fmt.Errorf("expected a KeyRenameOutput as command result") - } - - if k.Overwrite { - fmt.Fprintf(w, "Key %s renamed to %s with overwriting\n", k.Id, k.Now) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, kro *KeyRenameOutput) error { + if kro.Overwrite { + fmt.Fprintf(w, "Key %s renamed to %s with overwriting\n", kro.Id, kro.Now) } else { - fmt.Fprintf(w, "Key %s renamed to %s\n", k.Id, k.Now) + fmt.Fprintf(w, "Key %s renamed to %s\n", kro.Id, kro.Now) } return nil }), @@ -217,7 +206,7 @@ var keyRmCmd = &cmds.Command{ cmdkit.BoolOption("l", "Show extra information about keys."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -237,20 +226,15 @@ var keyRmCmd = &cmds.Command{ return cmds.EmitOnce(res, &KeyOutputList{list}) }, Encoders: cmds.EncoderMap{ - cmds.Text: keyOutputListMarshaler(), + cmds.Text: keyOutputListEncoders(), }, Type: KeyOutputList{}, } -func keyOutputListMarshaler() cmds.EncoderFunc { - return cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { +func keyOutputListEncoders() cmds.EncoderFunc { + return cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, list *KeyOutputList) error { withID, _ := req.Options["l"].(bool) - list, ok := v.(*KeyOutputList) - if !ok { - return e.TypeErr(list, v) - } - tw := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) for _, s := range list.Keys { if withID { diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/log.go b/vendor/github.com/ipfs/go-ipfs/core/commands/log.go index 72101e1664..b3e9763997 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/log.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/log.go @@ -1,17 +1,13 @@ package commands import ( - "bytes" - "encoding/json" "fmt" "io" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - lwriter "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + lwriter "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) // Golang os.Args overrides * and replaces the character argument with @@ -53,9 +49,8 @@ the event log. One of: debug, info, warning, error, critical. `), }, - Run: func(req cmds.Request, res cmds.Response) { - - args := req.Arguments() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + args := req.Arguments subsystem, level := args[0], args[1] if subsystem == logAllKeyword { @@ -63,16 +58,19 @@ the event log. } if err := logging.SetLogLevel(subsystem, level); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } s := fmt.Sprintf("Changed log level of '%s' to '%s'\n", subsystem, level) log.Info(s) - res.SetOutput(&MessageOutput{s}) + + return cmds.EmitOnce(res, &MessageOutput{s}) }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: MessageTextMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *MessageOutput) error { + fmt.Fprint(w, out.Message) + return nil + }), }, Type: MessageOutput{}, } @@ -85,11 +83,16 @@ var logLsCmd = &cmds.Command{ subsystems of a running daemon. `, }, - Run: func(req cmds.Request, res cmds.Response) { - res.SetOutput(&stringList{logging.GetSubsystems()}) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + return cmds.EmitOnce(res, &stringList{logging.GetSubsystems()}) }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: stringListMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, list *stringList) error { + for _, s := range list.Strings { + fmt.Fprintln(w, s) + } + return nil + }), }, Type: stringList{}, } @@ -102,49 +105,14 @@ Outputs event log messages (not other log messages) as they are generated. `, }, - Run: func(req cmds.Request, res cmds.Response) { - ctx := req.Context() - r1, w1 := io.Pipe() - r2, w2 := io.Pipe() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + ctx := req.Context + r, w := io.Pipe() go func() { - defer w1.Close() + defer w.Close() <-ctx.Done() }() - // Reformat the logs as ndjson - // TODO: remove this: #5709 - go func() { - defer w2.Close() - decoder := json.NewDecoder(r1) - encoder := json.NewEncoder(w2) - for { - var obj interface{} - if decoder.Decode(&obj) != nil || encoder.Encode(obj) != nil { - return - } - } - }() - - lwriter.WriterGroup.AddWriter(w1) - res.SetOutput(r2) + lwriter.WriterGroup.AddWriter(w) + return res.Emit(r) }, } - -func stringListMarshaler(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - list, ok := v.(*stringList) - if !ok { - return nil, e.TypeErr(list, v) - } - - buf := new(bytes.Buffer) - for _, s := range list.Strings { - buf.WriteString(s) - buf.WriteString("\n") - } - - return buf, nil -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/ls.go b/vendor/github.com/ipfs/go-ipfs/core/commands/ls.go index 52a6388eb6..667078a772 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/ls.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/ls.go @@ -1,37 +1,36 @@ package commands import ( - "bytes" "fmt" "io" + "os" + "sort" "text/tabwriter" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - merkledag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - blockservice "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - unixfs "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - unixfspb "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" + + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + iface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) +// LsLink contains printable data for a single ipld link in ls output type LsLink struct { Name, Hash string Size uint64 - Type unixfspb.Data_DataType + Type iface.FileType } +// LsObject is an element of LsOutput +// It can represent all or part of a directory type LsObject struct { Hash string Links []LsLink } +// LsOutput is a set of printable data for directories, +// it can be complete or partial type LsOutput struct { Objects []LsObject } @@ -39,6 +38,8 @@ type LsOutput struct { const ( lsHeadersOptionNameTime = "headers" lsResolveTypeOptionName = "resolve-type" + lsSizeOptionName = "size" + lsStreamOptionName = "stream" ) var LsCmd = &cmds.Command{ @@ -60,158 +61,186 @@ The JSON output contains type information. Options: []cmdkit.Option{ cmdkit.BoolOption(lsHeadersOptionNameTime, "v", "Print table headers (Hash, Size, Name)."), cmdkit.BoolOption(lsResolveTypeOptionName, "Resolve linked objects to find out their types.").WithDefault(true), + cmdkit.BoolOption(lsSizeOptionName, "Resolve linked objects to find out their file size.").WithDefault(true), + cmdkit.BoolOption(lsStreamOptionName, "s", "Enable exprimental streaming of directory entries as they are traversed."), }, - Run: func(req cmds.Request, res cmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - api, err := req.InvocContext().GetApi() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + resolveType, _ := req.Options[lsResolveTypeOptionName].(bool) + resolveSize, _ := req.Options[lsSizeOptionName].(bool) + stream, _ := req.Options[lsStreamOptionName].(bool) - // get options early -> exit early in case of error - if _, _, err := req.Option(lsHeadersOptionNameTime).Bool(); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + err = req.ParseBodyArgs() + if err != nil { + return err } + paths := req.Arguments - resolve, _, err := req.Option(lsResolveTypeOptionName).Bool() + enc, err := cmdenv.GetCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dserv := nd.DAG - if !resolve { - offlineexch := offline.Exchange(nd.Blockstore) - bserv := blockservice.New(nd.Blockstore, offlineexch) - dserv = merkledag.NewDAGService(bserv) + var processLink func(path string, link LsLink) error + var dirDone func(i int) + + processDir := func() (func(path string, link LsLink) error, func(i int)) { + return func(path string, link LsLink) error { + output := []LsObject{{ + Hash: path, + Links: []LsLink{link}, + }} + return res.Emit(&LsOutput{output}) + }, func(i int) {} } + done := func() error { return nil } + + if !stream { + output := make([]LsObject, len(req.Arguments)) + + processDir = func() (func(path string, link LsLink) error, func(i int)) { + // for each dir + outputLinks := make([]LsLink, 0) + return func(path string, link LsLink) error { + // for each link + outputLinks = append(outputLinks, link) + return nil + }, func(i int) { + // after each dir + sort.Slice(outputLinks, func(i, j int) bool { + return outputLinks[i].Name < outputLinks[j].Name + }) + + output[i] = LsObject{ + Hash: paths[i], + Links: outputLinks, + } + } + } - paths := req.Arguments() + done = func() error { + return cmds.EmitOnce(res, &LsOutput{output}) + } + } - var dagnodes []ipld.Node - for _, fpath := range paths { + for i, fpath := range paths { p, err := iface.ParsePath(fpath) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dagnode, err := api.ResolveNode(req.Context(), p) + results, err := api.Unixfs().Ls(req.Context, p, + options.Unixfs.ResolveChildren(resolveSize || resolveType)) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dagnodes = append(dagnodes, dagnode) - } - output := make([]LsObject, len(req.Arguments())) - ng := merkledag.NewSession(req.Context(), nd.DAG) - ro := merkledag.NewReadOnlyDagService(ng) + processLink, dirDone = processDir() + for link := range results { + if link.Err != nil { + return link.Err + } + lsLink := LsLink{ + Name: link.Link.Name, + Hash: enc.Encode(link.Link.Cid), - for i, dagnode := range dagnodes { - dir, err := uio.NewDirectoryFromNode(ro, dagnode) - if err != nil && err != uio.ErrNotADir { - res.SetError(fmt.Errorf("the data in %s (at %q) is not a UnixFS directory: %s", dagnode.Cid(), paths[i], err), cmdkit.ErrNormal) - return + Size: link.Size, + Type: link.Type, + } + if err := processLink(paths[i], lsLink); err != nil { + return err + } } + dirDone(i) + } + return done() + }, + PostRun: cmds.PostRunMap{ + cmds.CLI: func(res cmds.Response, re cmds.ResponseEmitter) error { + req := res.Request() + lastObjectHash := "" - var links []*ipld.Link - if dir == nil { - links = dagnode.Links() - } else { - links, err = dir.Links(req.Context()) + for { + v, err := res.Next() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + if err == io.EOF { + return nil + } + return err } + out := v.(*LsOutput) + lastObjectHash = tabularOutput(req, os.Stdout, out, lastObjectHash, false) } + }, + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *LsOutput) error { + // when streaming over HTTP using a text encoder, we cannot render breaks + // between directories because we don't know the hash of the last + // directory encoder + ignoreBreaks, _ := req.Options[lsStreamOptionName].(bool) + tabularOutput(req, w, out, "", ignoreBreaks) + return nil + }), + }, + Type: LsOutput{}, +} - output[i] = LsObject{ - Hash: paths[i], - Links: make([]LsLink, len(links)), - } - - for j, link := range links { - t := unixfspb.Data_DataType(-1) - - switch link.Cid.Type() { - case cid.Raw: - // No need to check with raw leaves - t = unixfs.TFile - case cid.DagProtobuf: - linkNode, err := link.GetNode(req.Context(), dserv) - if err == ipld.ErrNotFound && !resolve { - // not an error - linkNode = nil - } else if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - - if pn, ok := linkNode.(*merkledag.ProtoNode); ok { - d, err := unixfs.FSNodeFromBytes(pn.Data()) - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - t = d.Type() - } +func tabularOutput(req *cmds.Request, w io.Writer, out *LsOutput, lastObjectHash string, ignoreBreaks bool) string { + headers, _ := req.Options[lsHeadersOptionNameTime].(bool) + stream, _ := req.Options[lsStreamOptionName].(bool) + size, _ := req.Options[lsSizeOptionName].(bool) + // in streaming mode we can't automatically align the tabs + // so we take a best guess + var minTabWidth int + if stream { + minTabWidth = 10 + } else { + minTabWidth = 1 + } + + multipleFolders := len(req.Arguments) > 1 + + tw := tabwriter.NewWriter(w, minTabWidth, 2, 1, ' ', 0) + + for _, object := range out.Objects { + + if !ignoreBreaks && object.Hash != lastObjectHash { + if multipleFolders { + if lastObjectHash != "" { + fmt.Fprintln(tw) } - output[i].Links[j] = LsLink{ - Name: link.Name, - Hash: link.Cid.String(), - Size: link.Size, - Type: t, + fmt.Fprintf(tw, "%s:\n", object.Hash) + } + if headers { + s := "Hash\tName" + if size { + s = "Hash\tSize\tName" } + fmt.Fprintln(tw, s) } + lastObjectHash = object.Hash } - res.SetOutput(&LsOutput{output}) - }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - headers, _, _ := res.Request().Option(lsHeadersOptionNameTime).Bool() - output, ok := v.(*LsOutput) - if !ok { - return nil, e.TypeErr(output, v) - } + for _, link := range object.Links { + s := "%[1]s\t%[3]s\n" - buf := new(bytes.Buffer) - w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0) - for _, object := range output.Objects { - if len(output.Objects) > 1 { - fmt.Fprintf(w, "%s:\n", object.Hash) - } - if headers { - fmt.Fprintln(w, "Hash\tSize\tName") - } - for _, link := range object.Links { - if link.Type == unixfs.TDirectory { - link.Name += "/" - } - fmt.Fprintf(w, "%s\t%v\t%s\n", link.Hash, link.Size, link.Name) - } - if len(output.Objects) > 1 { - fmt.Fprintln(w) - } + switch { + case link.Type == iface.TDirectory && size: + s = "%[1]s\t-\t%[3]s/\n" + case link.Type == iface.TDirectory && !size: + s = "%[1]s\t%[3]s/\n" + case size: + s = "%s\t%v\t%s\n" } - w.Flush() - return buf, nil - }, - }, - Type: LsOutput{}, + fmt.Fprintf(tw, s, link.Hash, link.Size, link.Name) + } + } + tw.Flush() + return lastObjectHash } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_nofuse.go b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_nofuse.go index 8e67a7cd1c..9c692327b6 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_nofuse.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_nofuse.go @@ -3,9 +3,8 @@ package commands import ( - cmds "github.com/ipfs/go-ipfs/commands" - - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var MountCmd = &cmds.Command{ diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_unix.go b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_unix.go index 62d8bb8c1f..9cc96b3ea8 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_unix.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_unix.go @@ -5,14 +5,18 @@ package commands import ( "fmt" "io" - "strings" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" nodeMount "github.com/ipfs/go-ipfs/fuse/node" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +const ( + mountIPFSPathOptionName = "ipfs-path" + mountIPNSPathOptionName = "ipns-path" ) var MountCmd = &cmds.Command{ @@ -73,74 +77,53 @@ baz `, }, Options: []cmdkit.Option{ - cmdkit.StringOption("ipfs-path", "f", "The path where IPFS should be mounted."), - cmdkit.StringOption("ipns-path", "n", "The path where IPNS should be mounted."), + cmdkit.StringOption(mountIPFSPathOptionName, "f", "The path where IPFS should be mounted."), + cmdkit.StringOption(mountIPNSPathOptionName, "n", "The path where IPNS should be mounted."), }, - Run: func(req cmds.Request, res cmds.Response) { - cfg, err := req.InvocContext().GetConfig() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cfg, err := cmdenv.GetConfig(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - node, err := req.InvocContext().GetNode() + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } // error if we aren't running node in online mode - if node.LocalMode() { - res.SetError(ErrNotOnline, cmdkit.ErrClient) - return + if nd.LocalMode() { + return ErrNotOnline } - fsdir, found, err := req.Option("f").String() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + fsdir, found := req.Options[mountIPFSPathOptionName].(string) if !found { fsdir = cfg.Mounts.IPFS // use default value } // get default mount points - nsdir, found, err := req.Option("n").String() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + nsdir, found := req.Options[mountIPNSPathOptionName].(string) if !found { nsdir = cfg.Mounts.IPNS // NB: be sure to not redeclare! } - err = nodeMount.Mount(node, fsdir, nsdir) + err = nodeMount.Mount(nd, fsdir, nsdir) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } var output config.Mounts output.IPFS = fsdir output.IPNS = nsdir - res.SetOutput(&output) + return cmds.EmitOnce(res, &output) }, Type: config.Mounts{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - mnts, ok := v.(*config.Mounts) - if !ok { - return nil, e.TypeErr(mnts, v) - } - - s := fmt.Sprintf("IPFS mounted at: %s\n", mnts.IPFS) - s += fmt.Sprintf("IPNS mounted at: %s\n", mnts.IPNS) - return strings.NewReader(s), nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, mounts *config.Mounts) error { + fmt.Fprintf(w, "IPFS mounted at: %s\n", mounts.IPFS) + fmt.Fprintf(w, "IPNS mounted at: %s\n", mounts.IPNS) + + return nil + }), }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_windows.go b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_windows.go index 9114ba9c4b..7a407912e3 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/mount_windows.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/mount_windows.go @@ -3,8 +3,7 @@ package commands import ( "errors" - cmds "github.com/ipfs/go-ipfs/commands" - + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -14,7 +13,7 @@ var MountCmd = &cmds.Command{ ShortDescription: "Not yet implemented on Windows. :(", }, - Run: func(req cmds.Request, res cmds.Response) { - res.SetError(errors.New("Mount isn't compatible with Windows yet"), cmdkit.ErrNormal) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + return errors.New("Mount isn't compatible with Windows yet") }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipns.go b/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipns.go index 73a26dab7e..7e249eec56 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipns.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipns.go @@ -8,14 +8,13 @@ import ( "time" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - nsopts "github.com/ipfs/go-ipfs/namesys/opts" - - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + nsopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var log = logging.Logger("core/commands/ipns") @@ -81,13 +80,12 @@ Resolve the value of a dnslink: cmdkit.BoolOption(streamOptionName, "s", "Stream entries as they are found."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } nocache, _ := req.Options["nocache"].(bool) - local, _ := req.Options["local"].(bool) var name string if len(req.Arguments) == 0 { @@ -106,7 +104,6 @@ Resolve the value of a dnslink: stream, _ := req.Options[streamOptionName].(bool) opts := []options.NameResolveOption{ - options.Name.Local(local), options.Name.Cache(!nocache), } @@ -158,12 +155,8 @@ Resolve the value of a dnslink: return nil }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - output, ok := v.(*ResolvedPath) - if !ok { - return e.TypeErr(output, v) - } - _, err := fmt.Fprintln(w, output.Path) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, rp *ResolvedPath) error { + _, err := fmt.Fprintln(w, rp.Path) return err }), }, diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipnsps.go b/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipnsps.go index e9d117818f..df0ebf70f5 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipnsps.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/name/ipnsps.go @@ -5,13 +5,12 @@ import ( "io" "strings" - "github.com/ipfs/go-ipfs/core/commands/cmdenv" - "github.com/ipfs/go-ipfs/core/commands/e" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + + "github.com/ipfs/go-ipfs/core/commands/cmdenv" ) type ipnsPubsubState struct { @@ -57,14 +56,9 @@ var ipnspsStateCmd = &cmds.Command{ }, Type: ipnsPubsubState{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - output, ok := v.(*ipnsPubsubState) - if !ok { - return e.TypeErr(output, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, ips *ipnsPubsubState) error { var state string - if output.Enabled { + if ips.Enabled { state = "enabled" } else { state = "disabled" @@ -108,7 +102,7 @@ var ipnspsSubsCmd = &cmds.Command{ }, Type: stringList{}, Encoders: cmds.EncoderMap{ - cmds.Text: stringListMarshaler(), + cmds.Text: stringListEncoder(), }, } @@ -144,14 +138,9 @@ var ipnspsCancelCmd = &cmds.Command{ }, Type: ipnsPubsubCancel{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - output, ok := v.(*ipnsPubsubCancel) - if !ok { - return e.TypeErr(output, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, ipc *ipnsPubsubCancel) error { var state string - if output.Canceled { + if ipc.Canceled { state = "canceled" } else { state = "no subscription" @@ -163,13 +152,8 @@ var ipnspsCancelCmd = &cmds.Command{ }, } -func stringListMarshaler() cmds.EncoderFunc { - return cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - list, ok := v.(*stringList) - if !ok { - return e.TypeErr(list, v) - } - +func stringListEncoder() cmds.EncoderFunc { + return cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, list *stringList) error { for _, s := range list.Strings { _, err := fmt.Fprintln(w, s) if err != nil { diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/name/name.go b/vendor/github.com/ipfs/go-ipfs/core/commands/name/name.go index 88a10c911b..470509e152 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/name/name.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/name/name.go @@ -1,7 +1,7 @@ package name import ( - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/name/publish.go b/vendor/github.com/ipfs/go-ipfs/core/commands/name/publish.go index a03ad74497..060a95513a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/name/publish.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/name/publish.go @@ -7,12 +7,11 @@ import ( "time" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + iface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var ( @@ -73,18 +72,18 @@ Alternatively, publish an using a valid PeerID (as listed by cmdkit.StringArg(ipfsPathOptionName, true, false, "ipfs path of the object to be published.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption(resolveOptionName, "Resolve given path before publishing.").WithDefault(true), + cmdkit.BoolOption(resolveOptionName, "Check if the given path can be resolved before publishing.").WithDefault(true), cmdkit.StringOption(lifeTimeOptionName, "t", `Time duration that the record will be valid for. <> This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`).WithDefault("24h"), cmdkit.BoolOption(allowOfflineOptionName, "When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing."), - cmdkit.StringOption(ttlOptionName, "Time duration this record should be cached for (caution: experimental)."), - cmdkit.StringOption(keyOptionName, "k", "Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: <>.").WithDefault("self"), + cmdkit.StringOption(ttlOptionName, "Time duration this record should be cached for. Uses the same syntax as the lifetime option. (caution: experimental)"), + cmdkit.StringOption(keyOptionName, "k", "Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'.").WithDefault("self"), cmdkit.BoolOption(quieterOptionName, "Q", "Write only final hash."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -139,18 +138,13 @@ Alternatively, publish an using a valid PeerID (as listed by }) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - entry, ok := v.(*IpnsEntry) - if !ok { - return e.TypeErr(entry, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, ie *IpnsEntry) error { var err error quieter, _ := req.Options[quieterOptionName].(bool) if quieter { - _, err = fmt.Fprintln(w, entry.Name) + _, err = fmt.Fprintln(w, ie.Name) } else { - _, err = fmt.Fprintf(w, "Published to %s: %s\n", entry.Name, entry.Value) + _, err = fmt.Fprintf(w, "Published to %s: %s\n", ie.Name, ie.Value) } return err }), diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/object/diff.go b/vendor/github.com/ipfs/go-ipfs/core/commands/object/diff.go index f200e10dad..63dde93ad1 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/object/diff.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/object/diff.go @@ -1,18 +1,21 @@ package objectcmd import ( - "bytes" "fmt" "io" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" "github.com/ipfs/go-ipfs/dagutils" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) +const ( + verboseOptionName = "verbose" +) + type Changes struct { Changes []*dagutils.Change } @@ -49,34 +52,30 @@ Example: cmdkit.StringArg("obj_b", true, false, "Object to diff."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information."), + cmdkit.BoolOption(verboseOptionName, "v", "Print extra information."), }, - Run: func(req cmds.Request, res cmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - a := req.Arguments()[0] - b := req.Arguments()[1] + a := req.Arguments[0] + b := req.Arguments[1] pa, err := coreiface.ParsePath(a) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } pb, err := coreiface.ParsePath(b) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - changes, err := api.Object().Diff(req.Context(), pa, pb) + changes, err := api.Object().Diff(req.Context, pa, pb) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } out := make([]*dagutils.Change, len(changes)) @@ -95,45 +94,36 @@ Example: } } - res.SetOutput(&Changes{out}) + return cmds.EmitOnce(res, &Changes{out}) }, Type: Changes{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Changes) error { + verbose, _ := req.Options[verboseOptionName].(bool) - verbose, _, _ := res.Request().Option("v").Bool() - changes, ok := v.(*Changes) - if !ok { - return nil, e.TypeErr(changes, v) - } - - buf := new(bytes.Buffer) - for _, change := range changes.Changes { + for _, change := range out.Changes { if verbose { switch change.Type { case dagutils.Add: - fmt.Fprintf(buf, "Added new link %q pointing to %s.\n", change.Path, change.After) + fmt.Fprintf(w, "Added new link %q pointing to %s.\n", change.Path, change.After) case dagutils.Mod: - fmt.Fprintf(buf, "Changed %q from %s to %s.\n", change.Path, change.Before, change.After) + fmt.Fprintf(w, "Changed %q from %s to %s.\n", change.Path, change.Before, change.After) case dagutils.Remove: - fmt.Fprintf(buf, "Removed link %q (was %s).\n", change.Path, change.Before) + fmt.Fprintf(w, "Removed link %q (was %s).\n", change.Path, change.Before) } } else { switch change.Type { case dagutils.Add: - fmt.Fprintf(buf, "+ %s %q\n", change.After, change.Path) + fmt.Fprintf(w, "+ %s %q\n", change.After, change.Path) case dagutils.Mod: - fmt.Fprintf(buf, "~ %s %s %q\n", change.Before, change.After, change.Path) + fmt.Fprintf(w, "~ %s %s %q\n", change.Before, change.After, change.Path) case dagutils.Remove: - fmt.Fprintf(buf, "- %s %q\n", change.Before, change.Path) + fmt.Fprintf(w, "- %s %q\n", change.Before, change.Path) } } } - return buf, nil - }, + + return nil + }), }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/object/object.go b/vendor/github.com/ipfs/go-ipfs/core/commands/object/object.go index e0e0a3b93a..936afcc34e 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/object/object.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/object/object.go @@ -1,29 +1,23 @@ package objectcmd import ( - "bytes" "encoding/base64" "errors" "fmt" "io" "io/ioutil" - "strings" "text/tabwriter" - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" - e "github.com/ipfs/go-ipfs/core/commands/e" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) + "github.com/ipfs/go-ipfs/core/commands/cmdenv" -const inputLimit = 2 << 20 + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) type Node struct { Links []Link @@ -42,6 +36,15 @@ type Object struct { var ErrDataEncoding = errors.New("unkown data field encoding") +const ( + headersOptionName = "headers" + encodingOptionName = "data-encoding" + inputencOptionName = "inputenc" + datafieldencOptionName = "datafieldenc" + pinOptionName = "pin" + quietOptionName = "quiet" +) + var ObjectCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Interact with IPFS objects.", @@ -51,18 +54,19 @@ directly.`, }, Subcommands: map[string]*cmds.Command{ - "data": lgc.NewCommand(ObjectDataCmd), - "diff": lgc.NewCommand(ObjectDiffCmd), - "get": lgc.NewCommand(ObjectGetCmd), - "links": lgc.NewCommand(ObjectLinksCmd), - "new": lgc.NewCommand(ObjectNewCmd), + "data": ObjectDataCmd, + "diff": ObjectDiffCmd, + "get": ObjectGetCmd, + "links": ObjectLinksCmd, + "new": ObjectNewCmd, "patch": ObjectPatchCmd, - "put": lgc.NewCommand(ObjectPutCmd), - "stat": lgc.NewCommand(ObjectStatCmd), + "put": ObjectPutCmd, + "stat": ObjectStatCmd, }, } -var ObjectDataCmd = &oldcmds.Command{ +// ObjectDataCmd object data command +var ObjectDataCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Output the raw bytes of an IPFS object.", ShortDescription: ` @@ -81,30 +85,28 @@ is the raw data of the object. Arguments: []cmdkit.Argument{ cmdkit.StringArg("key", true, false, "Key of the object to retrieve, in base58-encoded multihash format.").EnableStdin(), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - path, err := coreiface.ParsePath(req.Arguments()[0]) + path, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - data, err := api.Object().Data(req.Context(), path) + data, err := api.Object().Data(req.Context, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(data) + return res.Emit(data) }, } -var ObjectLinksCmd = &oldcmds.Command{ +// ObjectLinksCmd object links command +var ObjectLinksCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Output the links pointed to by the specified object.", ShortDescription: ` @@ -118,84 +120,70 @@ multihash. cmdkit.StringArg("key", true, false, "Key of the object to retrieve, in base58-encoded multihash format.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("headers", "v", "Print table headers (Hash, Size, Name)."), + cmdkit.BoolOption(headersOptionName, "v", "Print table headers (Hash, Size, Name)."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - // get options early -> exit early in case of error - if _, _, err := req.Option("headers").Bool(); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err } - path, err := coreiface.ParsePath(req.Arguments()[0]) + path, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - rp, err := api.ResolvePath(req.Context(), path) + rp, err := api.ResolvePath(req.Context, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - links, err := api.Object().Links(req.Context(), rp) + links, err := api.Object().Links(req.Context, rp) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } outLinks := make([]Link, len(links)) for i, link := range links { outLinks[i] = Link{ - Hash: link.Cid.String(), + Hash: enc.Encode(link.Cid), Name: link.Name, Size: link.Size, } } out := &Object{ - Hash: rp.Cid().String(), + Hash: enc.Encode(rp.Cid()), Links: outLinks, } - res.SetOutput(out) + return cmds.EmitOnce(res, out) }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - object, ok := v.(*Object) - if !ok { - return nil, e.TypeErr(object, v) - } - - buf := new(bytes.Buffer) - w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0) - headers, _, _ := res.Request().Option("headers").Bool() + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + tw := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) + headers, _ := req.Options[headersOptionName].(bool) if headers { - fmt.Fprintln(w, "Hash\tSize\tName") + fmt.Fprintln(tw, "Hash\tSize\tName") } - for _, link := range object.Links { - fmt.Fprintf(w, "%s\t%v\t%s\n", link.Hash, link.Size, link.Name) + for _, link := range out.Links { + fmt.Fprintf(tw, "%s\t%v\t%s\n", link.Hash, link.Size, link.Name) } - w.Flush() - return buf, nil - }, + tw.Flush() + + return nil + }), }, Type: &Object{}, } -var ObjectGetCmd = &oldcmds.Command{ +// ObjectGetCmd object get command +var ObjectGetCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Get and serialize the DAG node named by .", ShortDescription: ` @@ -227,49 +215,47 @@ Supported values are: cmdkit.StringArg("key", true, false, "Key of the object to retrieve, in base58-encoded multihash format.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.StringOption("data-encoding", "Encoding type of the data field, either \"text\" or \"base64\".").WithDefault("text"), + cmdkit.StringOption(encodingOptionName, "Encoding type of the data field, either \"text\" or \"base64\".").WithDefault("text"), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) + if err != nil { + return err + } + + enc, err := cmdenv.GetLowLevelCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - path, err := coreiface.ParsePath(req.Arguments()[0]) + path, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - datafieldenc, _, err := req.Option("data-encoding").String() + datafieldenc, _ := req.Options[encodingOptionName].(string) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - nd, err := api.Object().Get(req.Context(), path) + nd, err := api.Object().Get(req.Context, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - r, err := api.Object().Data(req.Context(), path) + r, err := api.Object().Data(req.Context, path) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } data, err := ioutil.ReadAll(r) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } out, err := encodeData(data, datafieldenc) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } node := &Node{ @@ -279,43 +265,36 @@ Supported values are: for i, link := range nd.Links() { node.Links[i] = Link{ - Hash: link.Cid.String(), + Hash: enc.Encode(link.Cid), Name: link.Name, Size: link.Size, } } - res.SetOutput(node) + return cmds.EmitOnce(res, node) }, Type: Node{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Protobuf: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - node, ok := v.(*Node) - if !ok { - return nil, e.TypeErr(node, v) - } - + Encoders: cmds.EncoderMap{ + cmds.Protobuf: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Node) error { // deserialize the Data field as text as this was the standard behaviour - object, err := deserializeNode(node, "text") + object, err := deserializeNode(out, "text") if err != nil { - return nil, err + return nil } marshaled, err := object.Marshal() if err != nil { - return nil, err + return err } - return bytes.NewReader(marshaled), nil - }, + fmt.Fprint(w, marshaled) + + return nil + }), }, } -var ObjectStatCmd = &oldcmds.Command{ +// ObjectStatCmd object stat command +var ObjectStatCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Get stats for the DAG node named by .", ShortDescription: ` @@ -333,27 +312,29 @@ var ObjectStatCmd = &oldcmds.Command{ Arguments: []cmdkit.Argument{ cmdkit.StringArg("key", true, false, "Key of the object to retrieve, in base58-encoded multihash format.").EnableStdin(), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - path, err := coreiface.ParsePath(req.Arguments()[0]) + enc, err := cmdenv.GetLowLevelCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - ns, err := api.Object().Stat(req.Context(), path) + path, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + ns, err := api.Object().Stat(req.Context, path) + if err != nil { + return err } oldStat := &ipld.NodeStat{ - Hash: ns.Cid.String(), + Hash: enc.Encode(ns.Cid), NumLinks: ns.NumLinks, BlockSize: ns.BlockSize, LinksSize: ns.LinksSize, @@ -361,37 +342,27 @@ var ObjectStatCmd = &oldcmds.Command{ CumulativeSize: ns.CumulativeSize, } - res.SetOutput(oldStat) + return cmds.EmitOnce(res, oldStat) }, Type: ipld.NodeStat{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - ns, ok := v.(*ipld.NodeStat) - if !ok { - return nil, e.TypeErr(ns, v) + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *ipld.NodeStat) error { + fw := func(s string, n int) { + fmt.Fprintf(w, "%s: %d\n", s, n) } - - buf := new(bytes.Buffer) - w := func(s string, n int) { - fmt.Fprintf(buf, "%s: %d\n", s, n) - } - w("NumLinks", ns.NumLinks) - w("BlockSize", ns.BlockSize) - w("LinksSize", ns.LinksSize) - w("DataSize", ns.DataSize) - w("CumulativeSize", ns.CumulativeSize) - - return buf, nil - }, + fw("NumLinks", out.NumLinks) + fw("BlockSize", out.BlockSize) + fw("LinksSize", out.LinksSize) + fw("DataSize", out.DataSize) + fw("CumulativeSize", out.CumulativeSize) + + return nil + }), }, } -var ObjectPutCmd = &oldcmds.Command{ +// ObjectPutCmd object put command +var ObjectPutCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Store input as a DAG object, print its key.", ShortDescription: ` @@ -433,78 +404,71 @@ And then run: cmdkit.FileArg("data", true, false, "Data to be stored as a DAG object.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.StringOption("inputenc", "Encoding type of input data. One of: {\"protobuf\", \"json\"}.").WithDefault("json"), - cmdkit.StringOption("datafieldenc", "Encoding type of the data field, either \"text\" or \"base64\".").WithDefault("text"), - cmdkit.BoolOption("pin", "Pin this object when adding."), - cmdkit.BoolOption("quiet", "q", "Write minimal output."), + cmdkit.StringOption(inputencOptionName, "Encoding type of input data. One of: {\"protobuf\", \"json\"}.").WithDefault("json"), + cmdkit.StringOption(datafieldencOptionName, "Encoding type of the data field, either \"text\" or \"base64\".").WithDefault("text"), + cmdkit.BoolOption(pinOptionName, "Pin this object when adding."), + cmdkit.BoolOption(quietOptionName, "q", "Write minimal output."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - input, err := req.Files().NextFile() - if err != nil && err != io.EOF { - res.SetError(err, cmdkit.ErrNormal) - return + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err + } + + file, err := cmdenv.GetFileArg(req.Files.Entries()) + if err != nil { + return err } - inputenc, _, err := req.Option("inputenc").String() + inputenc, _ := req.Options[inputencOptionName].(string) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - datafieldenc, _, err := req.Option("datafieldenc").String() + datafieldenc, _ := req.Options[datafieldencOptionName].(string) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - dopin, _, err := req.Option("pin").Bool() + dopin, _ := req.Options[pinOptionName].(bool) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - p, err := api.Object().Put(req.Context(), input, + p, err := api.Object().Put(req.Context, file, options.Object.DataType(datafieldenc), options.Object.InputEnc(inputenc), options.Object.Pin(dopin)) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&Object{Hash: p.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: enc.Encode(p.Cid())}) }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - quiet, _, _ := res.Request().Option("quiet").Bool() + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + quiet, _ := req.Options[quietOptionName].(bool) - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - obj, ok := v.(*Object) - if !ok { - return nil, e.TypeErr(obj, v) - } - - out := obj.Hash + "\n" + o := out.Hash if !quiet { - out = "added " + out + o = "added " + o } - return strings.NewReader(out), nil - }, + fmt.Fprintln(w, o) + + return nil + }), }, Type: Object{}, } -var ObjectNewCmd = &oldcmds.Command{ +// ObjectNewCmd object new command +var ObjectNewCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Create a new object from an ipfs template.", ShortDescription: ` @@ -523,40 +487,34 @@ Available templates: Arguments: []cmdkit.Argument{ cmdkit.StringArg("template", false, false, "Template to use. Optional."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err + } + + enc, err := cmdenv.GetLowLevelCidEncoder(req) + if err != nil { + return err } template := "empty" - if len(req.Arguments()) == 1 { - template = req.Arguments()[0] + if len(req.Arguments) == 1 { + template = req.Arguments[0] } - nd, err := api.Object().New(req.Context(), options.Object.Type(template)) + nd, err := api.Object().New(req.Context, options.Object.Type(template)) if err != nil && err != io.EOF { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&Object{Hash: nd.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: enc.Encode(nd.Cid())}) }, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*Object) - if !ok { - return nil, e.TypeErr(obj, v) - } - - return strings.NewReader(obj.Hash + "\n"), nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + fmt.Fprintln(w, out.Hash) + return nil + }), }, Type: Object{}, } @@ -594,20 +552,6 @@ func deserializeNode(nd *Node, dataFieldEncoding string) (*dag.ProtoNode, error) return dagnode, nil } -// copy+pasted from ../commands.go -func unwrapOutput(i interface{}) (interface{}, error) { - var ( - ch <-chan interface{} - ok bool - ) - - if ch, ok = i.(<-chan interface{}); !ok { - return nil, e.TypeErr(ch, i) - } - - return <-ch, nil -} - func encodeData(data []byte, encoding string) (string, error) { switch encoding { case "text": diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/object/patch.go b/vendor/github.com/ipfs/go-ipfs/core/commands/object/patch.go index 0b9db961c6..87efe6fac0 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/object/patch.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/object/patch.go @@ -3,17 +3,13 @@ package objectcmd import ( "fmt" "io" - "strings" - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var ObjectPatchCmd = &cmds.Command{ @@ -28,26 +24,12 @@ result. This is the Merkle-DAG version of modifying an object. Arguments: []cmdkit.Argument{}, Subcommands: map[string]*cmds.Command{ "append-data": patchAppendDataCmd, - "add-link": lgc.NewCommand(patchAddLinkCmd), - "rm-link": lgc.NewCommand(patchRmLinkCmd), - "set-data": lgc.NewCommand(patchSetDataCmd), + "add-link": patchAddLinkCmd, + "rm-link": patchRmLinkCmd, + "set-data": patchSetDataCmd, }, } -func objectMarshaler(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - o, ok := v.(*Object) - if !ok { - return nil, e.TypeErr(o, v) - } - - return strings.NewReader(o.Hash + "\n"), nil -} - var patchAppendDataCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Append data to the data segment of a dag node.", @@ -67,8 +49,8 @@ the limit will not be respected by the network. cmdkit.StringArg("root", true, false, "The hash of the node to modify."), cmdkit.FileArg("data", true, false, "Data to append.").EnableStdin(), }, - Run: func(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -78,17 +60,17 @@ the limit will not be respected by the network. return err } - data, err := req.Files.NextFile() + file, err := cmdenv.GetFileArg(req.Files.Entries()) if err != nil { return err } - p, err := api.Object().AppendData(req.Context, root, data) + p, err := api.Object().AppendData(req.Context, root, file) if err != nil { return err } - return cmds.EmitOnce(re, &Object{Hash: p.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: p.Cid().String()}) }, Type: &Object{}, Encoders: cmds.EncoderMap{ @@ -99,7 +81,7 @@ the limit will not be respected by the network. }, } -var patchSetDataCmd = &oldcmds.Command{ +var patchSetDataCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Set the data field of an IPFS object.", ShortDescription: ` @@ -114,36 +96,39 @@ Example: cmdkit.StringArg("root", true, false, "The hash of the node to modify."), cmdkit.FileArg("data", true, false, "The data to set the object to.").EnableStdin(), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) + if err != nil { + return err + } - root, err := coreiface.ParsePath(req.StringArguments()[0]) + root, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - data, err := req.Files().NextFile() + file, err := cmdenv.GetFileArg(req.Files.Entries()) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - p, err := api.Object().SetData(req.Context(), root, data) + p, err := api.Object().SetData(req.Context, root, file) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&Object{Hash: p.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: p.Cid().String()}) }, Type: Object{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: objectMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + fmt.Fprintln(w, out.Hash) + return nil + }), }, } -var patchRmLinkCmd = &oldcmds.Command{ +var patchRmLinkCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Remove a link from a given object.", ShortDescription: ` @@ -154,35 +139,39 @@ Remove a Merkle-link from the given object and return the hash of the result. cmdkit.StringArg("root", true, false, "The hash of the node to modify."), cmdkit.StringArg("name", true, false, "Name of the link to remove."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - root, err := coreiface.ParsePath(req.Arguments()[0]) + root, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - name := req.Arguments()[1] - p, err := api.Object().RmLink(req.Context(), root, name) + name := req.Arguments[1] + p, err := api.Object().RmLink(req.Context, root, name) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&Object{Hash: p.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: p.Cid().String()}) }, Type: Object{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: objectMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + fmt.Fprintln(w, out.Hash) + return nil + }), }, } -var patchAddLinkCmd = &oldcmds.Command{ +const ( + createOptionName = "create" +) + +var patchAddLinkCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Add a link to a given object.", ShortDescription: ` @@ -204,46 +193,44 @@ to a file containing 'bar', and returns the hash of the new object. cmdkit.StringArg("ref", true, false, "IPFS object to add link to."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("create", "p", "Create intermediary nodes."), + cmdkit.BoolOption(createOptionName, "p", "Create intermediary nodes."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - root, err := coreiface.ParsePath(req.Arguments()[0]) + root, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - name := req.Arguments()[1] + name := req.Arguments[1] - child, err := coreiface.ParsePath(req.Arguments()[2]) + child, err := coreiface.ParsePath(req.Arguments[2]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - create, _, err := req.Option("create").Bool() + create, _ := req.Options[createOptionName].(bool) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - p, err := api.Object().AddLink(req.Context(), root, name, child, + p, err := api.Object().AddLink(req.Context, root, name, child, options.Object.Create(create)) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&Object{Hash: p.Cid().String()}) + return cmds.EmitOnce(res, &Object{Hash: p.Cid().String()}) }, Type: Object{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: objectMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *Object) error { + fmt.Fprintln(w, out.Hash) + return nil + }), }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/p2p.go b/vendor/github.com/ipfs/go-ipfs/core/commands/p2p.go index 9a65de5c48..a24b87bbf9 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/p2p.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/p2p.go @@ -1,7 +1,6 @@ package commands import ( - "bytes" "context" "errors" "fmt" @@ -11,16 +10,17 @@ import ( "text/tabwriter" "time" - cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" p2p "github.com/ipfs/go-ipfs/p2p" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - madns "gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + madns "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + ipfsaddr "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr" ) // P2PProtoPrefix is the default required prefix for protocol names @@ -53,6 +53,7 @@ type P2PStreamsOutput struct { const ( allowCustomProtocolOptionName = "allow-custom-protocol" + reportPeerIDOptionName = "report-peer-id" ) var resolveTimeout = 10 * time.Second @@ -69,8 +70,7 @@ are refined`, }, Subcommands: map[string]*cmds.Command{ - "stream": p2pStreamCmd, - + "stream": p2pStreamCmd, "forward": p2pForwardCmd, "listen": p2pListenCmd, "close": p2pCloseCmd, @@ -101,47 +101,35 @@ Example: Options: []cmdkit.Option{ cmdkit.BoolOption(allowCustomProtocolOptionName, "Don't require /x/ prefix"), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - protoOpt := req.Arguments()[0] - listenOpt := req.Arguments()[1] - targetOpt := req.Arguments()[2] + protoOpt := req.Arguments[0] + listenOpt := req.Arguments[1] + targetOpt := req.Arguments[2] proto := protocol.ID(protoOpt) listen, err := ma.NewMultiaddr(listenOpt) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } targets, err := parseIpfsAddr(targetOpt) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - allowCustom, _, err := req.Option(allowCustomProtocolOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + allowCustom, _ := req.Options[allowCustomProtocolOptionName].(bool) if !allowCustom && !strings.HasPrefix(string(proto), P2PProtoPrefix) { - res.SetError(errors.New("protocol name must be within '"+P2PProtoPrefix+"' namespace"), cmdkit.ErrNormal) - return + return errors.New("protocol name must be within '" + P2PProtoPrefix + "' namespace") } - if err := forwardLocal(n.Context(), n.P2P, n.Peerstore, proto, listen, targets); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - res.SetOutput(nil) + return forwardLocal(n.Context(), n.P2P, n.Peerstore, proto, listen, targets) }, } @@ -196,48 +184,38 @@ Example: }, Options: []cmdkit.Option{ cmdkit.BoolOption(allowCustomProtocolOptionName, "Don't require /x/ prefix"), + cmdkit.BoolOption(reportPeerIDOptionName, "r", "Send remote base58 peerid to target when a new connection is established"), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - protoOpt := req.Arguments()[0] - targetOpt := req.Arguments()[1] + protoOpt := req.Arguments[0] + targetOpt := req.Arguments[1] proto := protocol.ID(protoOpt) target, err := ma.NewMultiaddr(targetOpt) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } // port can't be 0 if err := checkPort(target); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - allowCustom, _, err := req.Option(allowCustomProtocolOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + allowCustom, _ := req.Options[allowCustomProtocolOptionName].(bool) + reportPeerID, _ := req.Options[reportPeerIDOptionName].(bool) if !allowCustom && !strings.HasPrefix(string(proto), P2PProtoPrefix) { - res.SetError(errors.New("protocol name must be within '"+P2PProtoPrefix+"' namespace"), cmdkit.ErrNormal) - return + return errors.New("protocol name must be within '" + P2PProtoPrefix + "' namespace") } - if err := forwardRemote(n.Context(), n.P2P, proto, target); err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - - res.SetOutput(nil) + _, err = n.P2P.ForwardRemote(n.Context(), proto, target, reportPeerID) + return err }, } @@ -275,13 +253,6 @@ func checkPort(target ma.Multiaddr) error { return nil } -// forwardRemote forwards libp2p service connections to a manet address -func forwardRemote(ctx context.Context, p *p2p.P2P, proto protocol.ID, target ma.Multiaddr) error { - // TODO: return some info - _, err := p.ForwardRemote(ctx, proto, target) - return err -} - // forwardLocal forwards local connections to a libp2p service func forwardLocal(ctx context.Context, p *p2p.P2P, ps pstore.Peerstore, proto protocol.ID, bindAddr ma.Multiaddr, addrs []ipfsaddr.IPFSAddr) error { for _, addr := range addrs { @@ -305,11 +276,10 @@ var p2pLsCmd = &cmds.Command{ Options: []cmdkit.Option{ cmdkit.BoolOption(p2pHeadersOptionName, "v", "Print table headers (Protocol, Listen, Target)."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } output := &P2PLsOutput{} @@ -334,31 +304,24 @@ var p2pLsCmd = &cmds.Command{ } n.P2P.ListenersP2P.Unlock() - res.SetOutput(output) + return cmds.EmitOnce(res, output) }, Type: P2PLsOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - headers, _, _ := res.Request().Option(p2pHeadersOptionName).Bool() - list := v.(*P2PLsOutput) - buf := new(bytes.Buffer) - w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0) - for _, listener := range list.Listeners { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *P2PLsOutput) error { + headers, _ := req.Options[p2pHeadersOptionName].(bool) + tw := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) + for _, listener := range out.Listeners { if headers { - fmt.Fprintln(w, "Protocol\tListen Address\tTarget Address") + fmt.Fprintln(tw, "Protocol\tListen Address\tTarget Address") } - fmt.Fprintf(w, "%s\t%s\t%s\n", listener.Protocol, listener.ListenAddress, listener.TargetAddress) + fmt.Fprintf(tw, "%s\t%s\t%s\n", listener.Protocol, listener.ListenAddress, listener.TargetAddress) } - w.Flush() + tw.Flush() - return buf, nil - }, + return nil + }), }, } @@ -379,40 +342,35 @@ var p2pCloseCmd = &cmds.Command{ cmdkit.StringOption(p2pListenAddressOptionName, "l", "Match listen address"), cmdkit.StringOption(p2pTargetAddressOptionName, "t", "Match target address"), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - closeAll, _, _ := req.Option(p2pAllOptionName).Bool() - protoOpt, p, _ := req.Option(p2pProtocolOptionName).String() - listenOpt, l, _ := req.Option(p2pListenAddressOptionName).String() - targetOpt, t, _ := req.Option(p2pTargetAddressOptionName).String() + closeAll, _ := req.Options[p2pAllOptionName].(bool) + protoOpt, p := req.Options[p2pProtocolOptionName].(string) + listenOpt, l := req.Options[p2pListenAddressOptionName].(string) + targetOpt, t := req.Options[p2pTargetAddressOptionName].(string) proto := protocol.ID(protoOpt) listen, err := ma.NewMultiaddr(listenOpt) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } target, err := ma.NewMultiaddr(targetOpt) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } if !(closeAll || p || l || t) { - res.SetError(errors.New("no matching options given"), cmdkit.ErrNormal) - return + return errors.New("no matching options given") } if closeAll && (p || l || t) { - res.SetError(errors.New("can't combine --all with other matching options"), cmdkit.ErrNormal) - return + return errors.New("can't combine --all with other matching options") } match := func(listener p2p.Listener) bool { @@ -434,22 +392,14 @@ var p2pCloseCmd = &cmds.Command{ done := n.P2P.ListenersLocal.Close(match) done += n.P2P.ListenersP2P.Close(match) - res.SetOutput(done) + return cmds.EmitOnce(res, done) }, Type: int(0), - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - closed := v.(int) - buf := new(bytes.Buffer) - fmt.Fprintf(buf, "Closed %d stream(s)\n", closed) - - return buf, nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out int) error { + fmt.Fprintf(w, "Closed %d stream(s)\n", out) + return nil + }), }, } @@ -477,11 +427,10 @@ var p2pStreamLsCmd = &cmds.Command{ Options: []cmdkit.Option{ cmdkit.BoolOption(p2pHeadersOptionName, "v", "Print table headers (ID, Protocol, Local, Remote)."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } output := &P2PStreamsOutput{} @@ -499,31 +448,24 @@ var p2pStreamLsCmd = &cmds.Command{ } n.P2P.Streams.Unlock() - res.SetOutput(output) + return cmds.EmitOnce(res, output) }, Type: P2PStreamsOutput{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - headers, _, _ := res.Request().Option(p2pHeadersOptionName).Bool() - list := v.(*P2PStreamsOutput) - buf := new(bytes.Buffer) - w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0) - for _, stream := range list.Streams { + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *P2PStreamsOutput) error { + headers, _ := req.Options[p2pHeadersOptionName].(bool) + tw := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) + for _, stream := range out.Streams { if headers { - fmt.Fprintln(w, "ID\tProtocol\tOrigin\tTarget") + fmt.Fprintln(tw, "ID\tProtocol\tOrigin\tTarget") } - fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", stream.HandlerID, stream.Protocol, stream.OriginAddress, stream.TargetAddress) + fmt.Fprintf(tw, "%s\t%s\t%s\t%s\n", stream.HandlerID, stream.Protocol, stream.OriginAddress, stream.TargetAddress) } - w.Flush() + tw.Flush() - return buf, nil - }, + return nil + }), }, } @@ -537,28 +479,23 @@ var p2pStreamCloseCmd = &cmds.Command{ Options: []cmdkit.Option{ cmdkit.BoolOption(p2pAllOptionName, "a", "Close all streams."), }, - Run: func(req cmds.Request, res cmds.Response) { - res.SetOutput(nil) - - n, err := p2pGetNode(req) + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := p2pGetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - closeAll, _, _ := req.Option(p2pAllOptionName).Bool() + closeAll, _ := req.Options[p2pAllOptionName].(bool) var handlerID uint64 if !closeAll { - if len(req.Arguments()) == 0 { - res.SetError(errors.New("no id specified"), cmdkit.ErrNormal) - return + if len(req.Arguments) == 0 { + return errors.New("no id specified") } - handlerID, err = strconv.ParseUint(req.Arguments()[0], 10, 64) + handlerID, err = strconv.ParseUint(req.Arguments[0], 10, 64) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } } @@ -578,16 +515,18 @@ var p2pStreamCloseCmd = &cmds.Command{ for _, s := range toClose { n.P2P.Streams.Reset(s) } + + return nil }, } -func p2pGetNode(req cmds.Request) (*core.IpfsNode, error) { - n, err := req.InvocContext().GetNode() +func p2pGetNode(env cmds.Environment) (*core.IpfsNode, error) { + nd, err := cmdenv.GetNode(env) if err != nil { return nil, err } - config, err := n.Repo.Config() + config, err := nd.Repo.Config() if err != nil { return nil, err } @@ -596,9 +535,9 @@ func p2pGetNode(req cmds.Request) (*core.IpfsNode, error) { return nil, errors.New("libp2p stream mounting not enabled") } - if !n.OnlineMode() { + if !nd.OnlineMode() { return nil, ErrNotOnline } - return n, nil + return nd, nil } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/pin.go b/vendor/github.com/ipfs/go-ipfs/core/commands/pin.go index 64984107d1..835ab6cfb9 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/pin.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/pin.go @@ -1,26 +1,27 @@ package commands import ( - "bytes" "context" "fmt" "io" + "os" "time" - cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - corerepo "github.com/ipfs/go-ipfs/core/corerepo" pin "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + verifcid "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" ) var PinCmd = &cmds.Command{ @@ -65,121 +66,142 @@ var addPinCmd = &cmds.Command{ cmdkit.BoolOption(pinProgressOptionName, "Show progress"), }, Type: AddPinOutput{}, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - api, err := req.InvocContext().GetApi() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + // set recursive flag + recursive, _ := req.Options[pinRecursiveOptionName].(bool) + showProgress, _ := req.Options[pinProgressOptionName].(bool) - defer n.Blockstore.PinLock().Unlock() + if err := req.ParseBodyArgs(); err != nil { + return err + } - // set recursive flag - recursive, _, err := req.Option(pinRecursiveOptionName).Bool() + enc, err := cmdenv.GetCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - showProgress, _, _ := req.Option(pinProgressOptionName).Bool() if !showProgress { - added, err := corerepo.Pin(n, api, req.Context(), req.Arguments(), recursive) + added, err := pinAddMany(req.Context, api, enc, req.Arguments, recursive) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&AddPinOutput{Pins: cidsToStrings(added)}) - return + + return cmds.EmitOnce(res, &AddPinOutput{Pins: added}) } - out := make(chan interface{}) - res.SetOutput((<-chan interface{})(out)) v := new(dag.ProgressTracker) - ctx := v.DeriveContext(req.Context()) + ctx := v.DeriveContext(req.Context) type pinResult struct { - pins []cid.Cid + pins []string err error } + ch := make(chan pinResult, 1) go func() { - added, err := corerepo.Pin(n, api, ctx, req.Arguments(), recursive) + added, err := pinAddMany(ctx, api, enc, req.Arguments, recursive) ch <- pinResult{pins: added, err: err} }() ticker := time.NewTicker(500 * time.Millisecond) defer ticker.Stop() - defer close(out) + for { select { case val := <-ch: if val.err != nil { - res.SetError(val.err, cmdkit.ErrNormal) - return + return val.err } if pv := v.Value(); pv != 0 { - out <- &AddPinOutput{Progress: v.Value()} + if err := res.Emit(&AddPinOutput{Progress: v.Value()}); err != nil { + return err + } } - out <- &AddPinOutput{Pins: cidsToStrings(val.pins)} - return + return res.Emit(&AddPinOutput{Pins: val.pins}) case <-ticker.C: - out <- &AddPinOutput{Progress: v.Value()} + if err := res.Emit(&AddPinOutput{Progress: v.Value()}); err != nil { + return err + } case <-ctx.Done(): log.Error(ctx.Err()) - res.SetError(ctx.Err(), cmdkit.ErrNormal) - return + return ctx.Err() } } }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - var added []string - - switch out := v.(type) { - case *AddPinOutput: - if out.Pins != nil { - added = out.Pins - } else { - // this can only happen if the progress option is set - fmt.Fprintf(res.Stderr(), "Fetched/Processed %d nodes\r", out.Progress) - } - - if res.Error() != nil { - return nil, res.Error() - } - default: - return nil, e.TypeErr(out, v) - } - + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *AddPinOutput) error { + rec, found := req.Options["recursive"].(bool) var pintype string - rec, found, _ := res.Request().Option("recursive").Bool() if rec || !found { pintype = "recursively" } else { pintype = "directly" } - buf := new(bytes.Buffer) - for _, k := range added { - fmt.Fprintf(buf, "pinned %s %s\n", k, pintype) + for _, k := range out.Pins { + fmt.Fprintf(w, "pinned %s %s\n", k, pintype) + } + + return nil + }), + }, + PostRun: cmds.PostRunMap{ + cmds.CLI: func(res cmds.Response, re cmds.ResponseEmitter) error { + for { + v, err := res.Next() + if err != nil { + if err == io.EOF { + return nil + } + return err + } + + out, ok := v.(*AddPinOutput) + if !ok { + return e.TypeErr(out, v) + } + if out.Pins == nil { + // this can only happen if the progress option is set + fmt.Fprintf(os.Stderr, "Fetched/Processed %d nodes\r", out.Progress) + } else { + err = re.Emit(out) + if err != nil { + return err + } + } } - return buf, nil }, }, } +func pinAddMany(ctx context.Context, api coreiface.CoreAPI, enc cidenc.Encoder, paths []string, recursive bool) ([]string, error) { + added := make([]string, len(paths)) + for i, b := range paths { + p, err := coreiface.ParsePath(b) + if err != nil { + return nil, err + } + + rp, err := api.ResolvePath(ctx, p) + if err != nil { + return nil, err + } + + if err := api.Pin().Add(ctx, rp, options.Pin.Recursive(recursive)); err != nil { + return nil, err + } + added[i] = enc.Encode(rp.Cid()) + } + + return added, nil +} + var rmPinCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Remove pinned objects from local storage.", @@ -196,52 +218,53 @@ collected if needed. (By default, recursively. Use -r=false for direct pins.) cmdkit.BoolOption(pinRecursiveOptionName, "r", "Recursively unpin the object linked to by the specified object(s).").WithDefault(true), }, Type: PinOutput{}, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } // set recursive flag - recursive, _, err := req.Option(pinRecursiveOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + recursive, _ := req.Options[pinRecursiveOptionName].(bool) + + if err := req.ParseBodyArgs(); err != nil { + return err } - removed, err := corerepo.Unpin(n, api, req.Context(), req.Arguments(), recursive) + enc, err := cmdenv.GetCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&PinOutput{cidsToStrings(removed)}) - }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) + pins := make([]string, 0, len(req.Arguments)) + for _, b := range req.Arguments { + p, err := coreiface.ParsePath(b) if err != nil { - return nil, err + return err } - added, ok := v.(*PinOutput) - if !ok { - return nil, e.TypeErr(added, v) + rp, err := api.ResolvePath(req.Context, p) + if err != nil { + return err } - buf := new(bytes.Buffer) - for _, k := range added.Pins { - fmt.Fprintf(buf, "unpinned %s\n", k) + id := enc.Encode(rp.Cid()) + pins = append(pins, id) + if err := api.Pin().Rm(req.Context, rp, options.Pin.RmRecursive(recursive)); err != nil { + return err } - return buf, nil - }, + } + + return cmds.EmitOnce(res, &PinOutput{pins}) + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *PinOutput) error { + for _, k := range out.Pins { + fmt.Fprintf(w, "unpinned %s\n", k) + } + + return nil + }), }, } @@ -301,74 +324,66 @@ Example: cmdkit.StringOption(pinTypeOptionName, "t", "The type of pinned keys to list. Can be \"direct\", \"indirect\", \"recursive\", or \"all\".").WithDefault("all"), cmdkit.BoolOption(pinQuietOptionName, "q", "Write just hashes of objects."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - api, err := req.InvocContext().GetApi() + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - typeStr, _, err := req.Option(pinTypeOptionName).String() + typeStr, _ := req.Options[pinTypeOptionName].(string) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } switch typeStr { case "all", "direct", "indirect", "recursive": default: err = fmt.Errorf("invalid type '%s', must be one of {direct, indirect, recursive, all}", typeStr) - res.SetError(err, cmdkit.ErrClient) - return + return err } - var keys map[string]RefKeyObject + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err + } - if len(req.Arguments()) > 0 { - keys, err = pinLsKeys(req.Context(), req.Arguments(), typeStr, n, api) + var keys map[cid.Cid]RefKeyObject + if len(req.Arguments) > 0 { + keys, err = pinLsKeys(req.Context, req.Arguments, typeStr, n, api) } else { - keys, err = pinLsAll(req.Context(), typeStr, n) + keys, err = pinLsAll(req.Context, typeStr, n) } - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - } else { - res.SetOutput(&RefKeyList{Keys: keys}) + return err + } + + refKeys := make(map[string]RefKeyObject, len(keys)) + for k, v := range keys { + refKeys[enc.Encode(k)] = v } + + return cmds.EmitOnce(res, &RefKeyList{Keys: refKeys}) }, Type: RefKeyList{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - quiet, _, err := res.Request().Option(pinQuietOptionName).Bool() - if err != nil { - return nil, err - } + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *RefKeyList) error { + quiet, _ := req.Options[pinQuietOptionName].(bool) - keys, ok := v.(*RefKeyList) - if !ok { - return nil, e.TypeErr(keys, v) - } - out := new(bytes.Buffer) - for k, v := range keys.Keys { + for k, v := range out.Keys { if quiet { - fmt.Fprintf(out, "%s\n", k) + fmt.Fprintf(w, "%s\n", k) } else { - fmt.Fprintf(out, "%s %s\n", k, v.Type) + fmt.Fprintf(w, "%s %s\n", k, v.Type) } } - return out, nil - }, + + return nil + }), }, } @@ -394,54 +409,36 @@ new pin and removing the old one. cmdkit.BoolOption(pinUnpinOptionName, "Remove the old pin.").WithDefault(true), }, Type: PinOutput{}, - Run: func(req cmds.Request, res cmds.Response) { - api, err := req.InvocContext().GetApi() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - unpin, _, err := req.Option(pinUnpinOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + unpin, _ := req.Options[pinUnpinOptionName].(bool) - from, err := iface.ParsePath(req.Arguments()[0]) + from, err := coreiface.ParsePath(req.Arguments[0]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - to, err := iface.ParsePath(req.Arguments()[1]) + to, err := coreiface.ParsePath(req.Arguments[1]) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - err = api.Pin().Update(req.Context(), from, to, options.Pin.Unpin(unpin)) + err = api.Pin().Update(req.Context, from, to, options.Pin.Unpin(unpin)) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&PinOutput{Pins: []string{from.String(), to.String()}}) + return cmds.EmitOnce(res, &PinOutput{Pins: []string{from.String(), to.String()}}) }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - added, ok := v.(*PinOutput) - if !ok { - return nil, e.TypeErr(added, v) - } - - buf := new(bytes.Buffer) - fmt.Fprintf(buf, "updated %s to %s\n", added.Pins[0], added.Pins[1]) - return buf, nil - }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *PinOutput) error { + fmt.Fprintf(w, "updated %s to %s\n", out.Pins[0], out.Pins[1]) + return nil + }), }, } @@ -457,51 +454,45 @@ var verifyPinCmd = &cmds.Command{ cmdkit.BoolOption(pinVerboseOptionName, "Also write the hashes of non-broken pins."), cmdkit.BoolOption(pinQuietOptionName, "q", "Write just hashes of broken pins."), }, - Run: func(req cmds.Request, res cmds.Response) { - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - verbose, _, _ := res.Request().Option(pinVerboseOptionName).Bool() - quiet, _, _ := res.Request().Option(pinQuietOptionName).Bool() + verbose, _ := req.Options[pinVerboseOptionName].(bool) + quiet, _ := req.Options[pinQuietOptionName].(bool) if verbose && quiet { - res.SetError(fmt.Errorf("the --verbose and --quiet options can not be used at the same time"), cmdkit.ErrNormal) + return fmt.Errorf("the --verbose and --quiet options can not be used at the same time") + } + + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err } opts := pinVerifyOpts{ explain: !quiet, includeOk: verbose, } - out := pinVerify(req.Context(), n, opts) + out := pinVerify(req.Context, n, opts, enc) - res.SetOutput(out) + return res.Emit(out) }, Type: PinVerifyRes{}, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - quiet, _, _ := res.Request().Option(pinQuietOptionName).Bool() - - out, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - r, ok := out.(*PinVerifyRes) - if !ok { - return nil, e.TypeErr(r, out) - } + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *PinVerifyRes) error { + quiet, _ := req.Options[pinQuietOptionName].(bool) - buf := &bytes.Buffer{} - if quiet && !r.Ok { - fmt.Fprintf(buf, "%s\n", r.Cid) + if quiet && !out.Ok { + fmt.Fprintf(w, "%s\n", out.Cid) } else if !quiet { - r.Format(buf) + out.Format(w) } - return buf, nil - }, + return nil + }), }, } @@ -513,17 +504,17 @@ type RefKeyList struct { Keys map[string]RefKeyObject } -func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsNode, api iface.CoreAPI) (map[string]RefKeyObject, error) { +func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsNode, api coreiface.CoreAPI) (map[cid.Cid]RefKeyObject, error) { mode, ok := pin.StringToMode(typeStr) if !ok { return nil, fmt.Errorf("invalid pin mode '%s'", typeStr) } - keys := make(map[string]RefKeyObject) + keys := make(map[cid.Cid]RefKeyObject) for _, p := range args { - pth, err := iface.ParsePath(p) + pth, err := coreiface.ParsePath(p) if err != nil { return nil, err } @@ -547,7 +538,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN default: pinType = "indirect through " + pinType } - keys[c.Cid().String()] = RefKeyObject{ + keys[c.Cid()] = RefKeyObject{ Type: pinType, } } @@ -555,13 +546,13 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN return keys, nil } -func pinLsAll(ctx context.Context, typeStr string, n *core.IpfsNode) (map[string]RefKeyObject, error) { +func pinLsAll(ctx context.Context, typeStr string, n *core.IpfsNode) (map[cid.Cid]RefKeyObject, error) { - keys := make(map[string]RefKeyObject) + keys := make(map[cid.Cid]RefKeyObject) AddToResultKeys := func(keyList []cid.Cid, typeStr string) { for _, c := range keyList { - keys[c.String()] = RefKeyObject{ + keys[c] = RefKeyObject{ Type: typeStr, } } @@ -610,8 +601,8 @@ type pinVerifyOpts struct { includeOk bool } -func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan interface{} { - visited := make(map[string]PinStatus) +func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts, enc cidenc.Encoder) <-chan interface{} { + visited := make(map[cid.Cid]PinStatus) bs := n.Blocks.Blockstore() DAG := dag.NewDAGService(bserv.New(bs, offline.Exchange(bs))) @@ -620,7 +611,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan var checkPin func(root cid.Cid) PinStatus checkPin = func(root cid.Cid) PinStatus { - key := root.String() + key := root if status, ok := visited[key]; ok { return status } @@ -628,7 +619,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan if err := verifcid.ValidateCid(root); err != nil { status := PinStatus{Ok: false} if opts.explain { - status.BadNodes = []BadNode{{Cid: key, Err: err.Error()}} + status.BadNodes = []BadNode{{Cid: enc.Encode(key), Err: err.Error()}} } visited[key] = status return status @@ -638,7 +629,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan if err != nil { status := PinStatus{Ok: false} if opts.explain { - status.BadNodes = []BadNode{{Cid: key, Err: err.Error()}} + status.BadNodes = []BadNode{{Cid: enc.Encode(key), Err: err.Error()}} } visited[key] = status return status @@ -664,7 +655,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan pinStatus := checkPin(cid) if !pinStatus.Ok || opts.includeOk { select { - case out <- &PinVerifyRes{cid.String(), pinStatus}: + case out <- &PinVerifyRes{enc.Encode(cid), pinStatus}: case <-ctx.Done(): return } @@ -686,11 +677,3 @@ func (r PinVerifyRes) Format(out io.Writer) { } } } - -func cidsToStrings(cs []cid.Cid) []string { - out := make([]string, 0, len(cs)) - for _, c := range cs { - out = append(out, c.String()) - } - return out -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/ping.go b/vendor/github.com/ipfs/go-ipfs/core/commands/ping.go index 34d4b0ef18..1a73fa934a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/ping.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/ping.go @@ -10,13 +10,13 @@ import ( "github.com/ipfs/go-ipfs/core/commands/cmdenv" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - ping "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping" - iaddr "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + ping "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + iaddr "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr" ) const kPingTimeout = 10 * time.Second diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/pubsub.go b/vendor/github.com/ipfs/go-ipfs/core/commands/pubsub.go index 05a28ba61f..9cb7ea92e1 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/pubsub.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/pubsub.go @@ -9,10 +9,9 @@ import ( "sort" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -79,7 +78,7 @@ This command outputs data in the following encodings: cmdkit.BoolOption(pubsubDiscoverOptionName, "try to discover other peers subscribed to the same topic"), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -116,35 +115,20 @@ This command outputs data in the following encodings: } }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - m, ok := v.(*pubsubMessage) - if !ok { - return fmt.Errorf("unexpected type: %T", v) - } - - _, err := w.Write(m.Data) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, psm *pubsubMessage) error { + _, err := w.Write(psm.Data) return err }), - "ndpayload": cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - m, ok := v.(*pubsubMessage) - if !ok { - return fmt.Errorf("unexpected type: %T", v) - } - - m.Data = append(m.Data, '\n') - _, err := w.Write(m.Data) + "ndpayload": cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, psm *pubsubMessage) error { + psm.Data = append(psm.Data, '\n') + _, err := w.Write(psm.Data) return err }), - "lenpayload": cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - m, ok := v.(*pubsubMessage) - if !ok { - return fmt.Errorf("unexpected type: %T", v) - } - - buf := make([]byte, 8, len(m.Data)+8) + "lenpayload": cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, psm *pubsubMessage) error { + buf := make([]byte, 8, len(psm.Data)+8) - n := binary.PutUvarint(buf, uint64(len(m.Data))) - buf = append(buf[:n], m.Data...) + n := binary.PutUvarint(buf, uint64(len(psm.Data))) + buf = append(buf[:n], psm.Data...) _, err := w.Write(buf) return err }), @@ -169,7 +153,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. cmdkit.StringArg("data", true, true, "Payload of message to publish.").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -204,7 +188,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. `, }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -218,15 +202,11 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. }, Type: stringList{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, } -func stringListEncoder(req *cmds.Request, w io.Writer, v interface{}) error { - list, ok := v.(*stringList) - if !ok { - return e.TypeErr(list, v) - } +func stringListEncoder(req *cmds.Request, w io.Writer, list *stringList) error { for _, str := range list.Strings { _, err := fmt.Fprintf(w, "%s\n", str) if err != nil { @@ -254,7 +234,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. cmdkit.StringArg("topic", false, false, "topic to list connected peers of"), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -279,6 +259,6 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. }, Type: stringList{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/refs.go b/vendor/github.com/ipfs/go-ipfs/core/commands/refs.go index c06200e8c7..b6c0428a82 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/refs.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/refs.go @@ -1,22 +1,34 @@ package commands import ( - "bytes" "context" "errors" + "fmt" "io" "strings" - cmds "github.com/ipfs/go-ipfs/commands" - "github.com/ipfs/go-ipfs/core" - e "github.com/ipfs/go-ipfs/core/commands/e" + core "github.com/ipfs/go-ipfs/core" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" ) +var refsEncoderMap = cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *RefWrapper) error { + if out.Err != "" { + return fmt.Errorf(out.Err) + } + fmt.Fprintln(w, out.Ref) + + return nil + }), +} + // KeyList is a general type for outputting lists of keys type KeyList struct { Keys []cid.Cid @@ -30,25 +42,7 @@ const ( refsMaxDepthOptionName = "max-depth" ) -// KeyListTextMarshaler outputs a KeyList as plaintext, one key per line -func KeyListTextMarshaler(res cmds.Response) (io.Reader, error) { - out, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - output, ok := out.(*KeyList) - if !ok { - return nil, e.TypeErr(output, out) - } - - buf := new(bytes.Buffer) - for _, key := range output.Keys { - buf.WriteString(key.String() + "\n") - } - return buf, nil -} - +// RefsCmd is the `ipfs refs` command var RefsCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "List links (references) from an object.", @@ -74,91 +68,67 @@ NOTE: List all references recursively by using the flag '-r'. cmdkit.BoolOption(refsRecursiveOptionName, "r", "Recursively list links of child nodes."), cmdkit.IntOption(refsMaxDepthOptionName, "Only for recursive refs, limits fetch and listing to the given depth").WithDefault(-1), }, - Run: func(req cmds.Request, res cmds.Response) { - ctx := req.Context() - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + err := req.ParseBodyArgs() if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - unique, _, err := req.Option(refsUniqueOptionName).Bool() + ctx := req.Context + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - recursive, _, err := req.Option(refsRecursiveOptionName).Bool() + enc, err := cmdenv.GetCidEncoder(req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - maxDepth, _, err := req.Option(refsMaxDepthOptionName).Int() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } + unique, _ := req.Options[refsUniqueOptionName].(bool) + recursive, _ := req.Options[refsRecursiveOptionName].(bool) + maxDepth, _ := req.Options[refsMaxDepthOptionName].(int) + edges, _ := req.Options[refsEdgesOptionName].(bool) + format, _ := req.Options[refsFormatOptionName].(string) if !recursive { maxDepth = 1 // write only direct refs } - format, _, err := req.Option(refsFormatOptionName).String() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } - - edges, _, err := req.Option(refsEdgesOptionName).Bool() - if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return - } if edges { if format != "" { - res.SetError(errors.New("using format argument with edges is not allowed"), - cmdkit.ErrClient) - return + return errors.New("using format argument with edges is not allowed") } format = " -> " } - objs, err := objectsForPaths(ctx, n, req.Arguments()) + objs, err := objectsForPaths(ctx, n, req.Arguments) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - out := make(chan interface{}) - res.SetOutput((<-chan interface{})(out)) - - go func() { - defer close(out) - - rw := RefWriter{ - out: out, - DAG: n.DAG, - Ctx: ctx, - Unique: unique, - PrintFmt: format, - MaxDepth: maxDepth, - } + rw := RefWriter{ + res: res, + DAG: n.DAG, + Ctx: ctx, + Unique: unique, + PrintFmt: format, + MaxDepth: maxDepth, + } - for _, o := range objs { - if _, err := rw.WriteRefs(o); err != nil { - select { - case out <- &RefWrapper{Err: err.Error()}: - case <-ctx.Done(): - } - return + for _, o := range objs { + if _, err := rw.WriteRefs(o, enc); err != nil { + if err := res.Emit(&RefWrapper{Err: err.Error()}); err != nil { + return err } } - }() + } + + return nil }, - Marshalers: refsMarshallerMap, - Type: RefWrapper{}, + Encoders: refsEncoderMap, + Type: RefWrapper{}, } var RefsLocalCmd = &cmds.Command{ @@ -169,58 +139,30 @@ Displays the hashes of all local objects. `, }, - Run: func(req cmds.Request, res cmds.Response) { - ctx := req.Context() - n, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + ctx := req.Context + n, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } // todo: make async allKeys, err := n.Blockstore.AllKeysChan(ctx) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - out := make(chan interface{}) - res.SetOutput((<-chan interface{})(out)) - - go func() { - defer close(out) - - for k := range allKeys { - select { - case out <- &RefWrapper{Ref: k.String()}: - case <-req.Context().Done(): - return - } + for k := range allKeys { + err := res.Emit(&RefWrapper{Ref: k.String()}) + if err != nil { + return err } - }() - }, - Marshalers: refsMarshallerMap, - Type: RefWrapper{}, -} - -var refsMarshallerMap = cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err } - obj, ok := v.(*RefWrapper) - if !ok { - return nil, e.TypeErr(obj, v) - } - - if obj.Err != "" { - return nil, errors.New(obj.Err) - } - - return strings.NewReader(obj.Ref + "\n"), nil + return nil }, + Encoders: refsEncoderMap, + Type: RefWrapper{}, } func objectsForPaths(ctx context.Context, n *core.IpfsNode, paths []string) ([]ipld.Node, error) { @@ -246,7 +188,7 @@ type RefWrapper struct { } type RefWriter struct { - out chan interface{} + res cmds.ResponseEmitter DAG ipld.DAGService Ctx context.Context @@ -258,12 +200,11 @@ type RefWriter struct { } // WriteRefs writes refs of the given object to the underlying writer. -func (rw *RefWriter) WriteRefs(n ipld.Node) (int, error) { - return rw.writeRefsRecursive(n, 0) - +func (rw *RefWriter) WriteRefs(n ipld.Node, enc cidenc.Encoder) (int, error) { + return rw.writeRefsRecursive(n, 0, enc) } -func (rw *RefWriter) writeRefsRecursive(n ipld.Node, depth int) (int, error) { +func (rw *RefWriter) writeRefsRecursive(n ipld.Node, depth int, enc cidenc.Encoder) (int, error) { nc := n.Cid() var count int @@ -293,7 +234,7 @@ func (rw *RefWriter) writeRefsRecursive(n ipld.Node, depth int) (int, error) { // Write this node if not done before (or !Unique) if shouldWrite { - if err := rw.WriteEdge(nc, lc, n.Links()[i].Name); err != nil { + if err := rw.WriteEdge(nc, lc, n.Links()[i].Name, enc); err != nil { return count, err } count++ @@ -305,7 +246,7 @@ func (rw *RefWriter) writeRefsRecursive(n ipld.Node, depth int) (int, error) { // Note when !Unique, branches are always considered // unexplored and only depth limits apply. if goDeeper { - c, err := rw.writeRefsRecursive(nd, depth+1) + c, err := rw.writeRefsRecursive(nd, depth+1, enc) count += c if err != nil { return count, err @@ -374,7 +315,7 @@ func (rw *RefWriter) visit(c cid.Cid, depth int) (bool, bool) { } // Write one edge -func (rw *RefWriter) WriteEdge(from, to cid.Cid, linkname string) error { +func (rw *RefWriter) WriteEdge(from, to cid.Cid, linkname string, enc cidenc.Encoder) error { if rw.Ctx != nil { select { case <-rw.Ctx.Done(): // just in case. @@ -387,13 +328,12 @@ func (rw *RefWriter) WriteEdge(from, to cid.Cid, linkname string) error { switch { case rw.PrintFmt != "": s = rw.PrintFmt - s = strings.Replace(s, "", from.String(), -1) - s = strings.Replace(s, "", to.String(), -1) + s = strings.Replace(s, "", enc.Encode(from), -1) + s = strings.Replace(s, "", enc.Encode(to), -1) s = strings.Replace(s, "", linkname, -1) default: - s += to.String() + s += enc.Encode(to) } - rw.out <- &RefWrapper{Ref: s} - return nil + return rw.res.Emit(&RefWrapper{Ref: s}) } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/repo.go b/vendor/github.com/ipfs/go-ipfs/core/commands/repo.go index ecca547f25..5f12ec516c 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/repo.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/repo.go @@ -1,26 +1,25 @@ package commands import ( - "bytes" + "context" "errors" "fmt" "io" "os" "path/filepath" + "runtime" "strings" + "sync" "text/tabwriter" - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" corerepo "github.com/ipfs/go-ipfs/core/corerepo" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -39,9 +38,9 @@ var RepoCmd = &cmds.Command{ Subcommands: map[string]*cmds.Command{ "stat": repoStatCmd, "gc": repoGcCmd, - "fsck": lgc.NewCommand(RepoFsckCmd), - "version": lgc.NewCommand(repoVersionCmd), - "verify": lgc.NewCommand(repoVerifyCmd), + "fsck": repoFsckCmd, + "version": repoVersionCmd, + "verify": repoVerifyCmd, }, } @@ -109,16 +108,11 @@ order to reclaim hard disk space. }, Type: GcResult{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, gcr *GcResult) error { quiet, _ := req.Options[repoQuietOptionName].(bool) - obj, ok := v.(*GcResult) - if !ok { - return e.TypeErr(obj, v) - } - - if obj.Error != "" { - _, err := fmt.Fprintf(w, "Error: %s\n", obj.Error) + if gcr.Error != "" { + _, err := fmt.Fprintf(w, "Error: %s\n", gcr.Error) return err } @@ -127,7 +121,7 @@ order to reclaim hard disk space. prefix = "" } - _, err := fmt.Fprintf(w, "%s%s\n", prefix, obj.Key) + _, err := fmt.Fprintf(w, "%s%s\n", prefix, gcr.Key) return err }), }, @@ -183,12 +177,7 @@ Version string The repo version. }, Type: &corerepo.Stat{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - stat, ok := v.(*corerepo.Stat) - if !ok { - return e.TypeErr(stat, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, stat *corerepo.Stat) error { wtr := tabwriter.NewWriter(w, 0, 0, 1, ' ', 0) defer wtr.Flush() @@ -221,7 +210,7 @@ Version string The repo version. }, } -var RepoFsckCmd = &oldcmds.Command{ +var repoFsckCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Remove repo lockfiles.", ShortDescription: ` @@ -230,13 +219,15 @@ lockfiles, as well as the api file. This command can only run when no ipfs daemons are running. `, }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - configRoot := req.InvocContext().ConfigRoot + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + configRoot, err := cmdenv.GetConfigRoot(env) + if err != nil { + return err + } dsPath, err := config.DataStorePath(configRoot) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } dsLockFile := filepath.Join(dsPath, "LOCK") // TODO: get this lockfile programmatically @@ -249,25 +240,25 @@ daemons are running. err = os.Remove(repoLockFile) if err != nil && !os.IsNotExist(err) { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = os.Remove(dsLockFile) if err != nil && !os.IsNotExist(err) { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = os.Remove(apiFile) if err != nil && !os.IsNotExist(err) { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - res.SetOutput(&MessageOutput{"Lockfiles have been removed.\n"}) + return cmds.EmitOnce(res, &MessageOutput{"Lockfiles have been removed.\n"}) }, Type: MessageOutput{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: MessageTextMarshaler, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *MessageOutput) error { + fmt.Fprintf(w, out.Message) + return nil + }), }, } @@ -276,96 +267,113 @@ type VerifyProgress struct { Progress int } -var repoVerifyCmd = &oldcmds.Command{ +func verifyWorkerRun(ctx context.Context, wg *sync.WaitGroup, keys <-chan cid.Cid, results chan<- string, bs bstore.Blockstore) { + defer wg.Done() + + for k := range keys { + _, err := bs.Get(k) + if err != nil { + select { + case results <- fmt.Sprintf("block %s was corrupt (%s)", k, err): + case <-ctx.Done(): + return + } + + continue + } + + select { + case results <- "": + case <-ctx.Done(): + return + } + } +} + +func verifyResultChan(ctx context.Context, keys <-chan cid.Cid, bs bstore.Blockstore) <-chan string { + results := make(chan string) + + go func() { + defer close(results) + + var wg sync.WaitGroup + + for i := 0; i < runtime.NumCPU()*2; i++ { + wg.Add(1) + go verifyWorkerRun(ctx, &wg, keys, results, bs) + } + + wg.Wait() + }() + + return results +} + +var repoVerifyCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Verify all blocks in repo are not corrupted.", }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - nd, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - out := make(chan interface{}) - res.SetOutput((<-chan interface{})(out)) - defer close(out) - bs := bstore.NewBlockstore(nd.Repo.Datastore()) bs.HashOnRead(true) - keys, err := bs.AllKeysChan(req.Context()) + keys, err := bs.AllKeysChan(req.Context) if err != nil { log.Error(err) - return + return err } + results := verifyResultChan(req.Context, keys, bs) + var fails int var i int - for k := range keys { - _, err := bs.Get(k) - if err != nil { - select { - case out <- &VerifyProgress{ - Msg: fmt.Sprintf("block %s was corrupt (%s)", k, err), - }: - case <-req.Context().Done(): - return + for msg := range results { + if msg != "" { + if err := res.Emit(&VerifyProgress{Msg: msg}); err != nil { + return err } fails++ } i++ - select { - case out <- &VerifyProgress{Progress: i}: - case <-req.Context().Done(): - return + if err := res.Emit(&VerifyProgress{Progress: i}); err != nil { + return err } } - if fails == 0 { - select { - case out <- &VerifyProgress{Msg: "verify complete, all blocks validated."}: - case <-req.Context().Done(): - return - } - } else { - res.SetError(fmt.Errorf("verify complete, some blocks were corrupt"), cmdkit.ErrNormal) + if fails != 0 { + return errors.New("verify complete, some blocks were corrupt") } + + return res.Emit(&VerifyProgress{Msg: "verify complete, all blocks validated."}) }, Type: &VerifyProgress{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - obj, ok := v.(*VerifyProgress) - if !ok { - return nil, e.TypeErr(obj, v) - } - - buf := new(bytes.Buffer) + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, obj *VerifyProgress) error { if strings.Contains(obj.Msg, "was corrupt") { fmt.Fprintln(os.Stdout, obj.Msg) - return buf, nil + return nil } if obj.Msg != "" { if len(obj.Msg) < 20 { obj.Msg += " " } - fmt.Fprintln(buf, obj.Msg) - return buf, nil + fmt.Fprintln(w, obj.Msg) + return nil } - fmt.Fprintf(buf, "%d blocks processed.\r", obj.Progress) - return buf, nil - }, + fmt.Fprintf(w, "%d blocks processed.\r", obj.Progress) + return nil + }), }, } -var repoVersionCmd = &oldcmds.Command{ +var repoVersionCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "Show the repo version.", ShortDescription: ` @@ -376,36 +384,22 @@ var repoVersionCmd = &oldcmds.Command{ Options: []cmdkit.Option{ cmdkit.BoolOption(repoQuietOptionName, "q", "Write minimal output."), }, - Run: func(req oldcmds.Request, res oldcmds.Response) { - res.SetOutput(&RepoVersion{ + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + return cmds.EmitOnce(res, &RepoVersion{ Version: fmt.Sprint(fsrepo.RepoVersion), }) }, Type: RepoVersion{}, - Marshalers: oldcmds.MarshalerMap{ - oldcmds.Text: func(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - response, ok := v.(*RepoVersion) - if !ok { - return nil, e.TypeErr(response, v) - } - - quiet, _, err := res.Request().Option("quiet").Bool() - if err != nil { - return nil, err - } + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *RepoVersion) error { + quiet, _ := req.Options[repoQuietOptionName].(bool) - buf := new(bytes.Buffer) if quiet { - buf = bytes.NewBufferString(fmt.Sprintf("fs-repo@%s\n", response.Version)) + fmt.Fprintf(w, fmt.Sprintf("fs-repo@%s\n", out.Version)) } else { - buf = bytes.NewBufferString(fmt.Sprintf("ipfs repo version fs-repo@%s\n", response.Version)) + fmt.Fprintf(w, fmt.Sprintf("ipfs repo version fs-repo@%s\n", out.Version)) } - return buf, nil - - }, + return nil + }), }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/resolve.go b/vendor/github.com/ipfs/go-ipfs/core/commands/resolve.go index 2977d5ed16..23274fb022 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/resolve.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/resolve.go @@ -7,18 +7,17 @@ import ( "strings" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - e "github.com/ipfs/go-ipfs/core/commands/e" ncmd "github.com/ipfs/go-ipfs/core/commands/name" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" ns "github.com/ipfs/go-ipfs/namesys" - nsopts "github.com/ipfs/go-ipfs/namesys/opts" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + nsopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cidenc "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc" ) const ( @@ -76,26 +75,31 @@ Resolve the value of an IPFS DAG path: cmdkit.StringOption(resolveDhtTimeoutOptionName, "dhtt", "Max time to collect values during DHT resolution eg \"30s\". Pass 0 for no timeout."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } - n, err := cmdenv.GetNode(env) - if err != nil { - return err - } + name := req.Arguments[0] + recursive, _ := req.Options[resolveRecursiveOptionName].(bool) - if !n.OnlineMode() { - err := n.SetupOfflineRouting() + var enc cidenc.Encoder + switch { + case !cmdenv.CidBaseDefined(req): + // Not specified, check the path. + enc, err = cmdenv.CidEncoderFromPath(name) + if err == nil { + break + } + // Nope, fallback on the default. + fallthrough + default: + enc, err = cmdenv.GetCidEncoder(req) if err != nil { return err } } - name := req.Arguments[0] - recursive, _ := req.Options[resolveRecursiveOptionName].(bool) - // the case when ipns is resolved step by step if strings.HasPrefix(name, "/ipns/") && !recursive { rc, rcok := req.Options[resolveDhtRecordCountOptionName].(uint) @@ -136,22 +140,16 @@ Resolve the value of an IPFS DAG path: return err } - if rp.Remainder() != "" { - // TODO: js expects this error. Instead of fixing this - // error, we should fix #5703. - return fmt.Errorf("found non-link at given path") + encoded := "/" + rp.Namespace() + "/" + enc.Encode(rp.Cid()) + if remainder := rp.Remainder(); remainder != "" { + encoded += "/" + remainder } - return cmds.EmitOnce(res, &ncmd.ResolvedPath{Path: path.Path("/" + rp.Namespace() + "/" + rp.Cid().String())}) + return cmds.EmitOnce(res, &ncmd.ResolvedPath{Path: path.Path(encoded)}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - output, ok := v.(*ncmd.ResolvedPath) - if !ok { - return e.TypeErr(output, v) - } - - fmt.Fprintln(w, output.Path.String()) + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, rp *ncmd.ResolvedPath) error { + fmt.Fprintln(w, rp.Path.String()) return nil }), }, diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/root.go b/vendor/github.com/ipfs/go-ipfs/core/commands/root.go index da8bd7c836..a0389b10ff 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/root.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/root.go @@ -2,19 +2,15 @@ package commands import ( "errors" - "io" - "strings" - oldcmds "github.com/ipfs/go-ipfs/commands" - lgc "github.com/ipfs/go-ipfs/commands/legacy" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" dag "github.com/ipfs/go-ipfs/core/commands/dag" - e "github.com/ipfs/go-ipfs/core/commands/e" name "github.com/ipfs/go-ipfs/core/commands/name" ocmd "github.com/ipfs/go-ipfs/core/commands/object" unixfs "github.com/ipfs/go-ipfs/core/commands/unixfs" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -23,10 +19,11 @@ var log = logging.Logger("core/commands") var ErrNotOnline = errors.New("this command must be run in online mode. Try running 'ipfs daemon' first") const ( - ConfigOption = "config" - DebugOption = "debug" - LocalOption = "local" - ApiOption = "api" + ConfigOption = "config" + DebugOption = "debug" + LocalOption = "local" // DEPRECATED: use OfflineOption + OfflineOption = "offline" + ApiOption = "api" ) var Root = &cmds.Command{ @@ -97,10 +94,14 @@ The CLI will exit with one of the following values: cmdkit.BoolOption(DebugOption, "D", "Operate in debug mode."), cmdkit.BoolOption(cmds.OptLongHelp, "Show the full command help text."), cmdkit.BoolOption(cmds.OptShortHelp, "Show a short version of the command help text."), - cmdkit.BoolOption(LocalOption, "L", "Run the command locally, instead of using the daemon."), + cmdkit.BoolOption(LocalOption, "L", "Run the command locally, instead of using the daemon. DEPRECATED: use --offline."), + cmdkit.BoolOption(OfflineOption, "Run the command offline."), cmdkit.StringOption(ApiOption, "Use a specific API instance (defaults to /ip4/127.0.0.1/tcp/5001)"), // global options, added to every command + cmdenv.OptionCidBase, + cmdenv.OptionUpgradeCidV0InOutput, + cmds.OptionEncodingType, cmds.OptionStreamChannels, cmds.OptionTimeout, @@ -122,28 +123,28 @@ var rootSubcommands = map[string]*cmds.Command{ "pubsub": PubsubCmd, "repo": RepoCmd, "stats": StatsCmd, - "bootstrap": lgc.NewCommand(BootstrapCmd), - "config": lgc.NewCommand(ConfigCmd), + "bootstrap": BootstrapCmd, + "config": ConfigCmd, "dag": dag.DagCmd, - "dht": lgc.NewCommand(DhtCmd), - "diag": lgc.NewCommand(DiagCmd), + "dht": DhtCmd, + "diag": DiagCmd, "dns": DNSCmd, "id": IDCmd, "key": KeyCmd, - "log": lgc.NewCommand(LogCmd), - "ls": lgc.NewCommand(LsCmd), - "mount": lgc.NewCommand(MountCmd), + "log": LogCmd, + "ls": LsCmd, + "mount": MountCmd, "name": name.NameCmd, "object": ocmd.ObjectCmd, - "pin": lgc.NewCommand(PinCmd), + "pin": PinCmd, "ping": PingCmd, - "p2p": lgc.NewCommand(P2PCmd), - "refs": lgc.NewCommand(RefsCmd), + "p2p": P2PCmd, + "refs": RefsCmd, "resolve": ResolveCmd, "swarm": SwarmCmd, "tar": TarCmd, - "file": lgc.NewCommand(unixfs.UnixFSCmd), - "update": lgc.NewCommand(ExternalBinary()), + "file": unixfs.UnixFSCmd, + "update": ExternalBinary(), "urlstore": urlStoreCmd, "version": VersionCmd, "shutdown": daemonShutdownCmd, @@ -155,7 +156,8 @@ var RootRO = &cmds.Command{} var CommandsDaemonROCmd = CommandsCmd(RootRO) -var RefsROCmd = &oldcmds.Command{} +// RefsROCmd is `ipfs refs` command +var RefsROCmd = &cmds.Command{} var rootROSubcommands = map[string]*cmds.Command{ "commands": CommandsDaemonROCmd, @@ -168,20 +170,20 @@ var rootROSubcommands = map[string]*cmds.Command{ }, "get": GetCmd, "dns": DNSCmd, - "ls": lgc.NewCommand(LsCmd), + "ls": LsCmd, "name": { Subcommands: map[string]*cmds.Command{ "resolve": name.IpnsCmd, }, }, - "object": lgc.NewCommand(&oldcmds.Command{ - Subcommands: map[string]*oldcmds.Command{ + "object": { + Subcommands: map[string]*cmds.Command{ "data": ocmd.ObjectDataCmd, "links": ocmd.ObjectLinksCmd, "get": ocmd.ObjectGetCmd, "stat": ocmd.ObjectStatCmd, }, - }), + }, "dag": { Subcommands: map[string]*cmds.Command{ "get": dag.DagGetCmd, @@ -198,12 +200,12 @@ func init() { // sanitize readonly refs command *RefsROCmd = *RefsCmd - RefsROCmd.Subcommands = map[string]*oldcmds.Command{} + RefsROCmd.Subcommands = map[string]*cmds.Command{} // this was in the big map definition above before, // but if we leave it there lgc.NewCommand will be executed // before the value is updated (:/sanitize readonly refs command/) - rootROSubcommands["refs"] = lgc.NewCommand(RefsROCmd) + rootROSubcommands["refs"] = RefsROCmd Root.Subcommands = rootSubcommands @@ -213,17 +215,3 @@ func init() { type MessageOutput struct { Message string } - -func MessageTextMarshaler(res oldcmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - out, ok := v.(*MessageOutput) - if !ok { - return nil, e.TypeErr(out, v) - } - - return strings.NewReader(out.Message), nil -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/shutdown.go b/vendor/github.com/ipfs/go-ipfs/core/commands/shutdown.go index 8c08d07258..f6fae8ff30 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/shutdown.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/shutdown.go @@ -3,7 +3,7 @@ package commands import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/stat.go b/vendor/github.com/ipfs/go-ipfs/core/commands/stat.go index 574e0c15d3..e699bbfaf3 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/stat.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/stat.go @@ -8,12 +8,12 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + metrics "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - metrics "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics" ) var StatsCmd = &cmds.Command{ diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/swarm.go b/vendor/github.com/ipfs/go-ipfs/core/commands/swarm.go index 86cf11fa10..a105c1c3b6 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/swarm.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/swarm.go @@ -7,22 +7,21 @@ import ( "path" "sort" - "github.com/ipfs/go-ipfs/commands" - "github.com/ipfs/go-ipfs/core/commands/cmdenv" - "github.com/ipfs/go-ipfs/core/commands/e" - "github.com/ipfs/go-ipfs/repo" - "github.com/ipfs/go-ipfs/repo/fsrepo" + commands "github.com/ipfs/go-ipfs/commands" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" + repo "github.com/ipfs/go-ipfs/repo" + fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" mafilter "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - "gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - iaddr "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + swarm "gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + iaddr "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr" ) type stringList struct { @@ -72,7 +71,7 @@ var swarmPeersCmd = &cmds.Command{ cmdkit.BoolOption(swarmDirectionOptionName, "Also list information about the direction of connection"), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -129,12 +128,7 @@ var swarmPeersCmd = &cmds.Command{ return cmds.EmitOnce(res, &out) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - ci, ok := v.(*connInfos) - if !ok { - return e.TypeErr(ci, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, ci *connInfos) error { pipfs := ma.ProtocolWithCode(ma.P_IPFS).Name for _, info := range ci.Peers { fmt.Fprintf(w, "%s/%s/%s", info.Addr, pipfs, info.Peer) @@ -227,7 +221,7 @@ var swarmAddrsCmd = &cmds.Command{ "listen": swarmAddrsListenCmd, }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -248,26 +242,22 @@ var swarmAddrsCmd = &cmds.Command{ return cmds.EmitOnce(res, &addrMap{Addrs: out}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(func(req *cmds.Request, w io.Writer, v interface{}) error { - m, ok := v.(*addrMap) - if !ok { - return e.TypeErr(m, v) - } - + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, am *addrMap) error { // sort the ids first - ids := make([]string, 0, len(m.Addrs)) - for p := range m.Addrs { + ids := make([]string, 0, len(am.Addrs)) + for p := range am.Addrs { ids = append(ids, p) } sort.Sort(sort.StringSlice(ids)) for _, p := range ids { - paddrs := m.Addrs[p] + paddrs := am.Addrs[p] fmt.Fprintf(w, "%s (%d)\n", p, len(paddrs)) for _, addr := range paddrs { fmt.Fprintf(w, "\t"+addr+"\n") } } + return nil }), }, @@ -285,7 +275,7 @@ var swarmAddrsLocalCmd = &cmds.Command{ cmdkit.BoolOption("id", "Show peer ID in addresses."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -314,7 +304,7 @@ var swarmAddrsLocalCmd = &cmds.Command{ }, Type: stringList{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, } @@ -326,7 +316,7 @@ var swarmAddrsListenCmd = &cmds.Command{ `, }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -346,7 +336,7 @@ var swarmAddrsListenCmd = &cmds.Command{ }, Type: stringList{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, } @@ -365,7 +355,7 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3 cmdkit.StringArg("address", true, true, "Address of peer to connect to.").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -391,7 +381,7 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3 return cmds.EmitOnce(res, &stringList{output}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, Type: stringList{}, } @@ -413,7 +403,7 @@ it will reconnect. cmdkit.StringArg("address", true, true, "Address of peer to disconnect from.").EnableStdin(), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - api, err := cmdenv.GetApi(env) + api, err := cmdenv.GetApi(env, req) if err != nil { return err } @@ -436,7 +426,7 @@ it will reconnect. return cmds.EmitOnce(res, &stringList{output}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, Type: stringList{}, } @@ -532,7 +522,7 @@ Filters default to those specified under the "Swarm.AddrFilters" config key. return cmds.EmitOnce(res, &stringList{output}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, Type: stringList{}, } @@ -596,7 +586,7 @@ add your filters to the ipfs config file. return cmds.EmitOnce(res, &stringList{added}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, Type: stringList{}, } @@ -669,7 +659,7 @@ remove your filters from the ipfs config file. return cmds.EmitOnce(res, &stringList{removed}) }, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeEncoder(stringListEncoder), + cmds.Text: cmds.MakeTypedEncoder(stringListEncoder), }, Type: stringList{}, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/sysdiag.go b/vendor/github.com/ipfs/go-ipfs/core/commands/sysdiag.go index 3596bd4ad4..0883908acb 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/sysdiag.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/sysdiag.go @@ -6,11 +6,12 @@ import ( "runtime" version "github.com/ipfs/go-ipfs" - cmds "github.com/ipfs/go-ipfs/commands" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - sysi "gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + sysi "gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var sysDiagCmd = &cmds.Command{ @@ -20,46 +21,40 @@ var sysDiagCmd = &cmds.Command{ Prints out information about your computer to aid in easier debugging. `, }, - Run: func(req cmds.Request, res cmds.Response) { + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { info := make(map[string]interface{}) err := runtimeInfo(info) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = envVarInfo(info) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = diskSpaceInfo(info) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } err = memInfo(info) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - node, err := req.InvocContext().GetNode() + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - err = netInfo(node.OnlineMode(), info) + err = netInfo(nd.OnlineMode(), info) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } info["ipfs_version"] = version.CurrentVersionNumber info["ipfs_commit"] = version.CurrentCommit - res.SetOutput(info) + return cmds.EmitOnce(res, info) }, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/tar.go b/vendor/github.com/ipfs/go-ipfs/core/commands/tar.go index ba05c13605..30933ba3b5 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/tar.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/tar.go @@ -4,15 +4,14 @@ import ( "fmt" "io" - core "github.com/ipfs/go-ipfs/core" - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" + "github.com/ipfs/go-ipfs/core" + "github.com/ipfs/go-ipfs/core/commands/cmdenv" tar "github.com/ipfs/go-ipfs/tar" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var TarCmd = &cmds.Command{ @@ -44,27 +43,32 @@ represent it. return err } - fi, err := req.Files.NextFile() + enc, err := cmdenv.GetCidEncoder(req) if err != nil { return err } - node, err := tar.ImportTar(req.Context, fi, nd.DAG) + it := req.Files.Entries() + file, err := cmdenv.GetFileArg(it) + if err != nil { + return err + } + + node, err := tar.ImportTar(req.Context, file, nd.DAG) if err != nil { return err } c := node.Cid() - fi.FileName() - return cmds.EmitOnce(res, &coreiface.AddEvent{ - Name: fi.FileName(), - Hash: c.String(), + return cmds.EmitOnce(res, &AddEvent{ + Name: it.Name(), + Hash: enc.Encode(c), }) }, - Type: coreiface.AddEvent{}, + Type: AddEvent{}, Encoders: cmds.EncoderMap{ - cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *coreiface.AddEvent) error { + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *AddEvent) error { fmt.Fprintln(w, out.Hash) return nil }), diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/ls.go b/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/ls.go index 588436266b..b0d28a8be8 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/ls.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/ls.go @@ -1,19 +1,18 @@ package unixfs import ( - "bytes" "fmt" "io" "sort" "text/tabwriter" - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - iface "github.com/ipfs/go-ipfs/core/coreapi/interface" + cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" - merkledag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + merkledag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + iface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + unixfs "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - unixfs "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" ) type LsLink struct { @@ -72,20 +71,22 @@ possible, please use 'ipfs ls' instead. Arguments: []cmdkit.Argument{ cmdkit.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to list links from.").EnableStdin(), }, - Run: func(req cmds.Request, res cmds.Response) { - node, err := req.InvocContext().GetNode() + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - api, err := req.InvocContext().GetApi() + api, err := cmdenv.GetApi(env, req) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } - paths := req.Arguments() + if err := req.ParseBodyArgs(); err != nil { + return err + } + + paths := req.Arguments output := LsOutput{ Arguments: map[string]string{}, @@ -93,18 +94,16 @@ possible, please use 'ipfs ls' instead. } for _, p := range paths { - ctx := req.Context() + ctx := req.Context fpath, err := iface.ParsePath(p) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } merkleNode, err := api.ResolveNode(ctx, fpath) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } c := merkleNode.Cid() @@ -119,14 +118,12 @@ possible, please use 'ipfs ls' instead. ndpb, ok := merkleNode.(*merkledag.ProtoNode) if !ok { - res.SetError(merkledag.ErrNotProtobuf, cmdkit.ErrNormal) - return + return merkledag.ErrNotProtobuf } unixFSNode, err := unixfs.FSNodeFromBytes(ndpb.Data()) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } t := unixFSNode.Type() @@ -142,27 +139,23 @@ possible, please use 'ipfs ls' instead. break case unixfs.THAMTShard: // We need a streaming ls API for this. - res.SetError(fmt.Errorf("cannot list large directories yet"), cmdkit.ErrNormal) - return + return fmt.Errorf("cannot list large directories yet") case unixfs.TDirectory: links := make([]LsLink, len(merkleNode.Links())) output.Objects[hash].Links = links for i, link := range merkleNode.Links() { - linkNode, err := link.GetNode(ctx, node.DAG) + linkNode, err := link.GetNode(ctx, nd.DAG) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } lnpb, ok := linkNode.(*merkledag.ProtoNode) if !ok { - res.SetError(merkledag.ErrNotProtobuf, cmdkit.ErrNormal) - return + return merkledag.ErrNotProtobuf } d, err := unixfs.FSNodeFromBytes(lnpb.Data()) if err != nil { - res.SetError(err, cmdkit.ErrNormal) - return + return err } t := d.Type() lsLink := LsLink{ @@ -178,36 +171,24 @@ possible, please use 'ipfs ls' instead. links[i] = lsLink } case unixfs.TSymlink: - res.SetError(fmt.Errorf("cannot list symlinks yet"), cmdkit.ErrNormal) - return + return fmt.Errorf("cannot list symlinks yet") default: - res.SetError(fmt.Errorf("unrecognized type: %s", t), cmdkit.ErrImplementation) - return + return fmt.Errorf("unrecognized type: %s", t) } } - res.SetOutput(&output) + return cmds.EmitOnce(res, &output) }, - Marshalers: cmds.MarshalerMap{ - cmds.Text: func(res cmds.Response) (io.Reader, error) { - v, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - output, ok := v.(*LsOutput) - if !ok { - return nil, e.TypeErr(output, v) - } - buf := new(bytes.Buffer) - w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0) + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *LsOutput) error { + tw := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) nonDirectories := []string{} directories := []string{} - for argument, hash := range output.Arguments { - object, ok := output.Objects[hash] + for argument, hash := range out.Arguments { + object, ok := out.Objects[hash] if !ok { - return nil, fmt.Errorf("unresolved hash: %s", hash) + return fmt.Errorf("unresolved hash: %s", hash) } if object.Type == "Directory" { @@ -220,36 +201,36 @@ possible, please use 'ipfs ls' instead. sort.Strings(directories) for _, argument := range nonDirectories { - fmt.Fprintf(w, "%s\n", argument) + fmt.Fprintf(tw, "%s\n", argument) } seen := map[string]bool{} for i, argument := range directories { - hash := output.Arguments[argument] + hash := out.Arguments[argument] if _, ok := seen[hash]; ok { continue } seen[hash] = true - object := output.Objects[hash] + object := out.Objects[hash] if i > 0 || len(nonDirectories) > 0 { - fmt.Fprintln(w) + fmt.Fprintln(tw) } - if len(output.Arguments) > 1 { + if len(out.Arguments) > 1 { for _, arg := range directories[i:] { - if output.Arguments[arg] == hash { - fmt.Fprintf(w, "%s:\n", arg) + if out.Arguments[arg] == hash { + fmt.Fprintf(tw, "%s:\n", arg) } } } for _, link := range object.Links { - fmt.Fprintf(w, "%s\n", link.Name) + fmt.Fprintf(tw, "%s\n", link.Name) } } - w.Flush() + tw.Flush() - return buf, nil - }, + return nil + }), }, Type: LsOutput{}, } diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/unixfs.go b/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/unixfs.go index ed89ca66f0..90ea6c9ae8 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/unixfs.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/unixfs/unixfs.go @@ -1,10 +1,8 @@ package unixfs import ( - cmds "github.com/ipfs/go-ipfs/commands" - e "github.com/ipfs/go-ipfs/core/commands/e" - - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) var UnixFSCmd = &cmds.Command{ @@ -26,17 +24,3 @@ objects (e.g. fanout and chunking). "ls": LsCmd, }, } - -// copy+pasted from ../commands.go -func unwrapOutput(i interface{}) (interface{}, error) { - var ( - ch <-chan interface{} - ok bool - ) - - if ch, ok = i.(<-chan interface{}); !ok { - return nil, e.TypeErr(ch, i) - } - - return <-ch, nil -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/urlstore.go b/vendor/github.com/ipfs/go-ipfs/core/commands/urlstore.go index 41f02a8e97..b995230680 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/urlstore.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/urlstore.go @@ -7,18 +7,22 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" filestore "github.com/ipfs/go-ipfs/filestore" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - chunk "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" + pin "github.com/ipfs/go-ipfs/pin" + + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + chunk "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + balanced "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/balanced" + ihelper "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers" + trickle "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - balanced "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/balanced" - ihelper "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) var urlStoreCmd = &cmds.Command{ + Helptext: cmdkit.HelpText{ + Tagline: "Interact with urlstore.", + }, Subcommands: map[string]*cmds.Command{ "add": urlAdd, }, @@ -36,9 +40,6 @@ control. The file is added using raw-leaves but otherwise using the default settings for 'ipfs add'. -The file is not pinned, so this command should be followed by an 'ipfs -pin add'. - This command is considered temporary until a better solution can be found. It may disappear or the semantics can change at any time. @@ -46,6 +47,7 @@ time. }, Options: []cmdkit.Option{ cmdkit.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation."), + cmdkit.BoolOption(pinOptionName, "Pin this object when adding.").WithDefault(true), }, Arguments: []cmdkit.Argument{ cmdkit.StringArg("url", true, false, "URL to add to IPFS"), @@ -73,6 +75,12 @@ time. } useTrickledag, _ := req.Options[trickleOptionName].(bool) + dopin, _ := req.Options[pinOptionName].(bool) + + enc, err := cmdenv.GetCidEncoder(req) + if err != nil { + return err + } hreq, err := http.NewRequest("GET", url, nil) if err != nil { @@ -87,6 +95,11 @@ time. return fmt.Errorf("expected code 200, got: %d", hres.StatusCode) } + if dopin { + // Take the pinlock + defer n.Blockstore.PinLock().Unlock() + } + chk := chunk.NewSizeSplitter(hres.Body, chunk.DefaultBlockSize) prefix := cid.NewPrefixV1(cid.DagProtobuf, mh.SHA2_256) dbp := &ihelper.DagBuilderParams{ @@ -102,13 +115,26 @@ time. if useTrickledag { layout = trickle.Layout } - root, err := layout(dbp.New(chk)) + + db, err := dbp.New(chk) + if err != nil { + return err + } + root, err := layout(db) if err != nil { return err } + c := root.Cid() + if dopin { + n.Pinning.PinWithMode(c, pin.Recursive) + if err := n.Pinning.Flush(); err != nil { + return err + } + } + return cmds.EmitOnce(res, &BlockStat{ - Key: root.Cid().String(), + Key: enc.Encode(c), Size: int(hres.ContentLength), }) }, diff --git a/vendor/github.com/ipfs/go-ipfs/core/commands/version.go b/vendor/github.com/ipfs/go-ipfs/core/commands/version.go index 07ff380be9..939e36533c 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/commands/version.go +++ b/vendor/github.com/ipfs/go-ipfs/core/commands/version.go @@ -8,7 +8,7 @@ import ( version "github.com/ipfs/go-ipfs" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -50,24 +50,12 @@ var VersionCmd = &cmds.Command{ }, Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, version *VersionOutput) error { - repo, _ := req.Options[versionRepoOptionName].(bool) - if repo { - fmt.Fprintln(w, version.Repo) - return nil - } - commit, _ := req.Options[versionCommitOptionName].(bool) commitTxt := "" if commit { commitTxt = "-" + version.Commit } - number, _ := req.Options[versionNumberOptionName].(bool) - if number { - fmt.Fprintln(w, version.Version+commitTxt) - return nil - } - all, _ := req.Options[versionAllOptionName].(bool) if all { out := fmt.Sprintf("go-ipfs version: %s-%s\n"+ @@ -77,6 +65,18 @@ var VersionCmd = &cmds.Command{ return nil } + repo, _ := req.Options[versionRepoOptionName].(bool) + if repo { + fmt.Fprintln(w, version.Repo) + return nil + } + + number, _ := req.Options[versionNumberOptionName].(bool) + if number { + fmt.Fprintln(w, version.Version+commitTxt) + return nil + } + fmt.Fprint(w, fmt.Sprintf("ipfs version %s%s\n", version.Version, commitTxt)) return nil }), diff --git a/vendor/github.com/ipfs/go-ipfs/core/core.go b/vendor/github.com/ipfs/go-ipfs/core/core.go index 6bca92739f..c5fbfe4c1c 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/core.go +++ b/vendor/github.com/ipfs/go-ipfs/core/core.go @@ -30,58 +30,59 @@ import ( pin "github.com/ipfs/go-ipfs/pin" repo "github.com/ipfs/go-ipfs/repo" - bitswap "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap" - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - dht "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht" - dhtopts "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts" - exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + merkledag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + quic "gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport" + resolver "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver" + rhelpers "gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers" + psrouter "gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router" + libp2p "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + discovery "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/discovery" + p2pbhost "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + rhost "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed" + identify "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" - merkledag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - resolver "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - connmgr "gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - libp2p "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" - discovery "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/discovery" - p2pbhost "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic" - rhost "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/routed" - identify "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify" - psrouter "gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - quic "gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport" - circuit "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - rhelpers "gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers" - pnet "gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet" - pubsub "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - mplex "gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex" - mafilter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - nilrouting "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/none" - offroute "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - yamux "gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux" - metrics "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + connmgr "gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr" + metrics "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics" + mafilter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + pnet "gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + pubsub "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub" + exchange "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + nilrouting "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/none" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + circuit "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit" + autonat "gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + mplex "gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex" + mfs "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + bitswap "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap" + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + yamux "gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + dht "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht" + dhtopts "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts" ) const IpnsValidatorTag = "ipns" const kReprovideFrequency = time.Hour * 12 const discoveryConnTimeout = time.Second * 30 +const DefaultIpnsCacheSize = 128 var log = logging.Logger("core") @@ -135,6 +136,7 @@ type IpfsNode struct { Reprovider *rp.Reprovider // the value reprovider system IpnsRepub *ipnsrp.Republisher + AutoNAT *autonat.AutoNATService PubSub *pubsub.PubSub PSRouter *psrouter.PubsubValueStore DHT *dht.IpfsDHT @@ -160,9 +162,8 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin return errors.New("node already online") } - // load private key - if err := n.LoadPrivateKey(); err != nil { - return err + if n.PrivateKey == nil { + return fmt.Errorf("private key not available") } // get undialable addrs from config @@ -261,13 +262,27 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport)) } + // enable routing + libp2pOpts = append(libp2pOpts, libp2p.Routing(func(h p2phost.Host) (routing.PeerRouting, error) { + r, err := routingOption(ctx, h, n.Repo.Datastore(), n.RecordValidator) + n.Routing = r + return r, err + })) + + // enable autorelay + if cfg.Swarm.EnableAutoRelay { + libp2pOpts = append(libp2pOpts, libp2p.EnableAutoRelay()) + } + peerhost, err := hostOption(ctx, n.Identity, n.Peerstore, libp2pOpts...) if err != nil { return err } - if err := n.startOnlineServicesWithHost(ctx, peerhost, routingOption, pubsub, ipnsps); err != nil { + n.PeerHost = peerhost + + if err := n.startOnlineServicesWithHost(ctx, routingOption, pubsub, ipnsps); err != nil { return err } @@ -461,13 +476,26 @@ func (n *IpfsNode) HandlePeerFound(p pstore.PeerInfo) { // startOnlineServicesWithHost is the set of services which need to be // initialized with the host and _before_ we start listening. -func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost.Host, routingOption RoutingOption, enablePubsub bool, enableIpnsps bool) error { - if enablePubsub || enableIpnsps { - cfg, err := n.Repo.Config() +func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, routingOption RoutingOption, enablePubsub bool, enableIpnsps bool) error { + cfg, err := n.Repo.Config() + if err != nil { + return err + } + + if cfg.Swarm.EnableAutoNATService { + var opts []libp2p.Option + if cfg.Experimental.QUIC { + opts = append(opts, libp2p.DefaultTransports, libp2p.Transport(quic.NewTransport)) + } + + svc, err := autonat.NewAutoNATService(ctx, n.PeerHost, opts...) if err != nil { return err } + n.AutoNAT = svc + } + if enablePubsub || enableIpnsps { var service *pubsub.PubSub var pubsubOptions []pubsub.Option @@ -483,10 +511,10 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost case "": fallthrough case "floodsub": - service, err = pubsub.NewFloodSub(ctx, host, pubsubOptions...) + service, err = pubsub.NewFloodSub(ctx, n.PeerHost, pubsubOptions...) case "gossipsub": - service, err = pubsub.NewGossipSub(ctx, host, pubsubOptions...) + service, err = pubsub.NewGossipSub(ctx, n.PeerHost, pubsubOptions...) default: err = fmt.Errorf("Unknown pubsub router %s", cfg.Pubsub.Router) @@ -498,12 +526,16 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost n.PubSub = service } - // setup routing service - r, err := routingOption(ctx, host, n.Repo.Datastore(), n.RecordValidator) - if err != nil { - return err + // this code is necessary just for tests: mock network constructions + // ignore the libp2p constructor options that actually construct the routing! + if n.Routing == nil { + r, err := routingOption(ctx, n.PeerHost, n.Repo.Datastore(), n.RecordValidator) + if err != nil { + return err + } + n.Routing = r + n.PeerHost = rhost.Wrap(n.PeerHost, n.Routing) } - n.Routing = r // TODO: I'm not a fan of type assertions like this but the // `RoutingOption` system doesn't currently provide access to the @@ -518,14 +550,14 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost // PSRouter case below. // 3. Introduce some kind of service manager? (my personal favorite but // that requires a fair amount of work). - if dht, ok := r.(*dht.IpfsDHT); ok { + if dht, ok := n.Routing.(*dht.IpfsDHT); ok { n.DHT = dht } if enableIpnsps { n.PSRouter = psrouter.NewPubsubValueStore( ctx, - host, + n.PeerHost, n.Routing, n.PubSub, n.RecordValidator, @@ -545,9 +577,6 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost } } - // Wrap standard peer host with routing system to allow unknown peer lookups - n.PeerHost = rhost.Wrap(host, n.Routing) - // setup exchange service bitswapNetwork := bsnet.NewFromIpfsHost(n.PeerHost, n.Routing) n.Exchange = bitswap.New(ctx, bitswapNetwork, n.Blockstore) @@ -573,7 +602,7 @@ func (n *IpfsNode) getCacheSize() (int, error) { cs := cfg.Ipns.ResolveCacheSize if cs == 0 { - cs = 128 + cs = DefaultIpnsCacheSize } if cs < 0 { return 0, fmt.Errorf("cannot specify negative resolve cache size") @@ -773,13 +802,17 @@ func (n *IpfsNode) loadID() error { // GetKey will return a key from the Keystore with name `name`. func (n *IpfsNode) GetKey(name string) (ic.PrivKey, error) { if name == "self" { + if n.PrivateKey == nil { + return nil, fmt.Errorf("private key not available") + } return n.PrivateKey, nil } else { return n.Repo.Keystore().Get(name) } } -func (n *IpfsNode) LoadPrivateKey() error { +// loadPrivateKey loads the private key *if* available +func (n *IpfsNode) loadPrivateKey() error { if n.Identity == "" || n.Peerstore == nil { return errors.New("loaded private key out of order") } @@ -794,6 +827,10 @@ func (n *IpfsNode) LoadPrivateKey() error { return err } + if cfg.Identity.PrivKey == "" { + return nil + } + sk, err := loadPrivateKey(&cfg.Identity, n.Identity) if err != nil { return err @@ -864,32 +901,6 @@ func (n *IpfsNode) loadFilesRoot() error { return nil } -// SetupOfflineRouting instantiates a routing system in offline mode. This is -// primarily used for offline ipns modifications. -func (n *IpfsNode) SetupOfflineRouting() error { - if n.Routing != nil { - // Routing was already set up - return nil - } - - // TODO: move this somewhere else. - err := n.LoadPrivateKey() - if err != nil { - return err - } - - n.Routing = offroute.NewOfflineRouter(n.Repo.Datastore(), n.RecordValidator) - - size, err := n.getCacheSize() - if err != nil { - return err - } - - n.Namesys = namesys.NewNameSystem(n.Routing, n.Repo.Datastore(), size) - - return nil -} - func loadPrivateKey(cfg *config.Identity, id peer.ID) (ic.PrivKey, error) { sk, err := cfg.DecodePrivateKey("passphrase todo!") if err != nil { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/block.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/block.go index 7657f6520b..29876c8595 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/block.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/block.go @@ -8,11 +8,12 @@ import ( "io/ioutil" util "github.com/ipfs/go-ipfs/blocks/blockstoreutil" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" + pin "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" ) type BlockAPI CoreAPI @@ -23,7 +24,7 @@ type BlockStat struct { } func (api *BlockAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.BlockPutOption) (coreiface.BlockStat, error) { - _, pref, err := caopts.BlockPutOptions(opts...) + settings, pref, err := caopts.BlockPutOptions(opts...) if err != nil { return nil, err } @@ -43,11 +44,19 @@ func (api *BlockAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.Bloc return nil, err } - err = api.node.Blocks.AddBlock(b) + if settings.Pin { + defer api.blockstore.PinLock().Unlock() + } + + err = api.blocks.AddBlock(b) if err != nil { return nil, err } + if settings.Pin { + api.pinning.PinWithMode(b.Cid(), pin.Recursive) + } + return &BlockStat{path: coreiface.IpldPath(b.Cid()), size: len(data)}, nil } @@ -57,7 +66,7 @@ func (api *BlockAPI) Get(ctx context.Context, p coreiface.Path) (io.Reader, erro return nil, err } - b, err := api.node.Blocks.GetBlock(ctx, rp.Cid()) + b, err := api.blocks.GetBlock(ctx, rp.Cid()) if err != nil { return nil, err } @@ -78,7 +87,7 @@ func (api *BlockAPI) Rm(ctx context.Context, p coreiface.Path, opts ...caopts.Bl cids := []cid.Cid{rp.Cid()} o := util.RmBlocksOpts{Force: settings.Force} - out, err := util.RmBlocks(api.node.Blockstore, api.node.Pinning, cids, o) + out, err := util.RmBlocks(api.blockstore, api.pinning, cids, o) if err != nil { return err } @@ -109,7 +118,7 @@ func (api *BlockAPI) Stat(ctx context.Context, p coreiface.Path) (coreiface.Bloc return nil, err } - b, err := api.node.Blocks.GetBlock(ctx, rp.Cid()) + b, err := api.blocks.GetBlock(ctx, rp.Cid()) if err != nil { return nil, err } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/coreapi.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/coreapi.go index 18daffafa9..5b379a11f5 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/coreapi.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/coreapi.go @@ -15,26 +15,75 @@ package coreapi import ( "context" - - core "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + "errors" + "fmt" + + "github.com/ipfs/go-ipfs/core" + "github.com/ipfs/go-ipfs/namesys" + "github.com/ipfs/go-ipfs/pin" + "github.com/ipfs/go-ipfs/repo" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + pubsub "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub" + "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + offlineroute "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + offlinexch "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("core/coreapi") type CoreAPI struct { - node *core.IpfsNode - dag ipld.DAGService + nctx context.Context + + identity peer.ID + privateKey ci.PrivKey + + repo repo.Repo + blockstore blockstore.GCBlockstore + baseBlocks blockstore.Blockstore + pinning pin.Pinner + + blocks bserv.BlockService + dag ipld.DAGService + + peerstore pstore.Peerstore + peerHost p2phost.Host + recordValidator record.Validator + exchange exchange.Interface + + namesys namesys.NameSystem + routing routing.IpfsRouting + + pubSub *pubsub.PubSub + + checkPublishAllowed func() error + checkOnline func(allowOffline bool) error + + // ONLY for re-applying options in WithOptions, DO NOT USE ANYWHERE ELSE + nd *core.IpfsNode + parentOpts options.ApiSettings } // NewCoreAPI creates new instance of IPFS CoreAPI backed by go-ipfs Node. -func NewCoreAPI(n *core.IpfsNode) coreiface.CoreAPI { - api := &CoreAPI{n, n.DAG} - return api +func NewCoreAPI(n *core.IpfsNode, opts ...options.ApiOption) (coreiface.CoreAPI, error) { + parentOpts, err := options.ApiOptions() + if err != nil { + return nil, err + } + + return (&CoreAPI{nd: n, parentOpts: *parentOpts}).WithOptions(opts...) } // Unixfs returns the UnixfsAPI interface implementation backed by the go-ipfs node @@ -48,8 +97,11 @@ func (api *CoreAPI) Block() coreiface.BlockAPI { } // Dag returns the DagAPI interface implementation backed by the go-ipfs node -func (api *CoreAPI) Dag() coreiface.DagAPI { - return (*DagAPI)(api) +func (api *CoreAPI) Dag() coreiface.APIDagService { + return &dagAPI{ + api.dag, + api, + } } // Name returns the NameAPI interface implementation backed by the go-ipfs node @@ -87,8 +139,99 @@ func (api *CoreAPI) PubSub() coreiface.PubSubAPI { return (*PubSubAPI)(api) } +// WithOptions returns api with global options applied +func (api *CoreAPI) WithOptions(opts ...options.ApiOption) (coreiface.CoreAPI, error) { + settings := api.parentOpts // make sure to copy + _, err := options.ApiOptionsTo(&settings, opts...) + if err != nil { + return nil, err + } + + if api.nd == nil { + return nil, errors.New("cannot apply options to api without node") + } + + n := api.nd + + subApi := &CoreAPI{ + nctx: n.Context(), + + identity: n.Identity, + privateKey: n.PrivateKey, + + repo: n.Repo, + blockstore: n.Blockstore, + baseBlocks: n.BaseBlocks, + pinning: n.Pinning, + + blocks: n.Blocks, + dag: n.DAG, + + peerstore: n.Peerstore, + peerHost: n.PeerHost, + namesys: n.Namesys, + recordValidator: n.RecordValidator, + exchange: n.Exchange, + routing: n.Routing, + + pubSub: n.PubSub, + + nd: n, + parentOpts: settings, + } + + subApi.checkOnline = func(allowOffline bool) error { + if !n.OnlineMode() && !allowOffline { + return coreiface.ErrOffline + } + return nil + } + + subApi.checkPublishAllowed = func() error { + if n.Mounts.Ipns != nil && n.Mounts.Ipns.IsActive() { + return errors.New("cannot manually publish while IPNS is mounted") + } + return nil + } + + if settings.Offline { + cfg, err := n.Repo.Config() + if err != nil { + return nil, err + } + + cs := cfg.Ipns.ResolveCacheSize + if cs == 0 { + cs = core.DefaultIpnsCacheSize + } + if cs < 0 { + return nil, fmt.Errorf("cannot specify negative resolve cache size") + } + + subApi.routing = offlineroute.NewOfflineRouter(subApi.repo.Datastore(), subApi.recordValidator) + subApi.namesys = namesys.NewNameSystem(subApi.routing, subApi.repo.Datastore(), cs) + + subApi.peerstore = nil + subApi.peerHost = nil + subApi.recordValidator = nil + } + + if settings.Offline || !settings.FetchBlocks { + subApi.exchange = offlinexch.Exchange(subApi.blockstore) + subApi.blocks = bserv.New(subApi.blockstore, subApi.exchange) + subApi.dag = dag.NewDAGService(subApi.blocks) + } + + return subApi, nil +} + // getSession returns new api backed by the same node with a read-only session DAG func (api *CoreAPI) getSession(ctx context.Context) *CoreAPI { - ng := dag.NewReadOnlyDagService(dag.NewSession(ctx, api.dag)) - return &CoreAPI{api.node, ng} + sesApi := *api + + // TODO: We could also apply this to api.blocks, and compose into writable api, + // but this requires some changes in blockservice/merkledag + sesApi.dag = dag.NewReadOnlyDagService(dag.NewSession(ctx, api.dag)) + + return &sesApi } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/dag.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/dag.go index 9db6847e9c..c89e6b450a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/dag.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/dag.go @@ -2,128 +2,52 @@ package coreapi import ( "context" - "fmt" - "io" - "sync" - gopath "path" + "github.com/ipfs/go-ipfs/pin" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - coredag "github.com/ipfs/go-ipfs/core/coredag" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) -type DagAPI CoreAPI - -type dagBatch struct { - api *DagAPI - toPut []ipld.Node +type dagAPI struct { + ipld.DAGService - lk sync.Mutex + core *CoreAPI } -// Put inserts data using specified format and input encoding. Unless used with -// `WithCodes` or `WithHash`, the defaults "dag-cbor" and "sha256" are used. -// Returns the path of the inserted data. -func (api *DagAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.DagPutOption) (coreiface.ResolvedPath, error) { - nd, err := getNode(src, opts...) - - err = api.dag.Add(ctx, nd) - if err != nil { - return nil, err - } - - return coreiface.IpldPath(nd.Cid()), nil -} +type pinningAdder CoreAPI -// Get resolves `path` using Unixfs resolver, returns the resolved Node. -func (api *DagAPI) Get(ctx context.Context, path coreiface.Path) (ipld.Node, error) { - return api.core().ResolveNode(ctx, path) -} +func (adder *pinningAdder) Add(ctx context.Context, nd ipld.Node) error { + defer adder.blockstore.PinLock().Unlock() -// Tree returns list of paths within a node specified by the path `p`. -func (api *DagAPI) Tree(ctx context.Context, p coreiface.Path, opts ...caopts.DagTreeOption) ([]coreiface.Path, error) { - settings, err := caopts.DagTreeOptions(opts...) - if err != nil { - return nil, err + if err := adder.dag.Add(ctx, nd); err != nil { + return err } - n, err := api.Get(ctx, p) - if err != nil { - return nil, err - } - paths := n.Tree("", settings.Depth) - out := make([]coreiface.Path, len(paths)) - for n, p2 := range paths { - out[n], err = coreiface.ParsePath(gopath.Join(p.String(), p2)) - if err != nil { - return nil, err - } - } + adder.pinning.PinWithMode(nd.Cid(), pin.Recursive) - return out, nil + return adder.pinning.Flush() } -// Batch creates new DagBatch -func (api *DagAPI) Batch(ctx context.Context) coreiface.DagBatch { - return &dagBatch{api: api} -} +func (adder *pinningAdder) AddMany(ctx context.Context, nds []ipld.Node) error { + defer adder.blockstore.PinLock().Unlock() -// Put inserts data using specified format and input encoding. Unless used with -// `WithCodes` or `WithHash`, the defaults "dag-cbor" and "sha256" are used. -// Returns the path of the inserted data. -func (b *dagBatch) Put(ctx context.Context, src io.Reader, opts ...caopts.DagPutOption) (coreiface.ResolvedPath, error) { - nd, err := getNode(src, opts...) - if err != nil { - return nil, err + if err := adder.dag.AddMany(ctx, nds); err != nil { + return err } - b.lk.Lock() - b.toPut = append(b.toPut, nd) - b.lk.Unlock() + cids := cid.NewSet() - return coreiface.IpldPath(nd.Cid()), nil -} - -// Commit commits nodes to the datastore and announces them to the network -func (b *dagBatch) Commit(ctx context.Context) error { - b.lk.Lock() - defer b.lk.Unlock() - defer func() { - b.toPut = nil - }() - - return b.api.dag.AddMany(ctx, b.toPut) -} - -func getNode(src io.Reader, opts ...caopts.DagPutOption) (ipld.Node, error) { - settings, err := caopts.DagPutOptions(opts...) - if err != nil { - return nil, err - } - - codec, ok := cid.CodecToStr[settings.Codec] - if !ok { - return nil, fmt.Errorf("invalid codec %d", settings.Codec) - } - - nds, err := coredag.ParseInputs(settings.InputEnc, codec, src, settings.MhType, settings.MhLength) - if err != nil { - return nil, err - } - if len(nds) == 0 { - return nil, fmt.Errorf("no node returned from ParseInputs") - } - if len(nds) != 1 { - return nil, fmt.Errorf("got more that one node from ParseInputs") + for _, nd := range nds { + c := nd.Cid() + if cids.Visit(c) { + adder.pinning.PinWithMode(c, pin.Recursive) + } } - return nds[0], nil + return adder.pinning.Flush() } -func (api *DagAPI) core() coreiface.CoreAPI { - return (*CoreAPI)(api) +func (api *dagAPI) Pinning() ipld.NodeAdder { + return (*pinningAdder)(api.core) } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/dht.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/dht.go index 9df3907788..d17fd4d2d2 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/dht.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/dht.go @@ -2,27 +2,30 @@ package coreapi import ( "context" - "errors" "fmt" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - blockservice "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blockservice "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + cidutil "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil" ) type DhtAPI CoreAPI func (api *DhtAPI) FindPeer(ctx context.Context, p peer.ID) (pstore.PeerInfo, error) { - pi, err := api.node.Routing.FindPeer(ctx, peer.ID(p)) + err := api.checkOnline(false) + if err != nil { + return pstore.PeerInfo{}, err + } + + pi, err := api.routing.FindPeer(ctx, peer.ID(p)) if err != nil { return pstore.PeerInfo{}, err } @@ -36,6 +39,11 @@ func (api *DhtAPI) FindProviders(ctx context.Context, p coreiface.Path, opts ... return nil, err } + err = api.checkOnline(false) + if err != nil { + return nil, err + } + rp, err := api.core().ResolvePath(ctx, p) if err != nil { return nil, err @@ -46,7 +54,7 @@ func (api *DhtAPI) FindProviders(ctx context.Context, p coreiface.Path, opts ... return nil, fmt.Errorf("number of providers must be greater than 0") } - pchan := api.node.Routing.FindProvidersAsync(ctx, rp.Cid(), numProviders) + pchan := api.routing.FindProvidersAsync(ctx, rp.Cid(), numProviders) return pchan, nil } @@ -56,8 +64,9 @@ func (api *DhtAPI) Provide(ctx context.Context, path coreiface.Path, opts ...cao return err } - if api.node.Routing == nil { - return errors.New("cannot provide in offline mode") + err = api.checkOnline(false) + if err != nil { + return err } rp, err := api.core().ResolvePath(ctx, path) @@ -67,7 +76,7 @@ func (api *DhtAPI) Provide(ctx context.Context, path coreiface.Path, opts ...cao c := rp.Cid() - has, err := api.node.Blockstore.Has(c) + has, err := api.blockstore.Has(c) if err != nil { return err } @@ -77,9 +86,9 @@ func (api *DhtAPI) Provide(ctx context.Context, path coreiface.Path, opts ...cao } if settings.Recursive { - err = provideKeysRec(ctx, api.node.Routing, api.node.Blockstore, []cid.Cid{c}) + err = provideKeysRec(ctx, api.routing, api.blockstore, []cid.Cid{c}) } else { - err = provideKeys(ctx, api.node.Routing, []cid.Cid{c}) + err = provideKeys(ctx, api.routing, []cid.Cid{c}) } if err != nil { return err diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/block.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/block.go deleted file mode 100644 index b99b05fdb7..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/block.go +++ /dev/null @@ -1,36 +0,0 @@ -package iface - -import ( - "context" - "io" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" -) - -// BlockStat contains information about a block -type BlockStat interface { - // Size is the size of a block - Size() int - - // Path returns path to the block - Path() ResolvedPath -} - -// BlockAPI specifies the interface to the block layer -type BlockAPI interface { - // Put imports raw block data, hashing it using specified settings. - Put(context.Context, io.Reader, ...options.BlockPutOption) (BlockStat, error) - - // Get attempts to resolve the path and return a reader for data in the block - Get(context.Context, Path) (io.Reader, error) - - // Rm removes the block specified by the path from local blockstore. - // By default an error will be returned if the block can't be found locally. - // - // NOTE: If the specified block is pinned it won't be removed and no error - // will be returned - Rm(context.Context, Path, ...options.BlockRmOption) error - - // Stat returns information on - Stat(context.Context, Path) (BlockStat, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dag.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dag.go deleted file mode 100644 index 6cca5b9e68..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dag.go +++ /dev/null @@ -1,41 +0,0 @@ -package iface - -import ( - "context" - "io" - - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// DagOps groups operations that can be batched together -type DagOps interface { - // Put inserts data using specified format and input encoding. - // Unless used with WithCodec or WithHash, the defaults "dag-cbor" and - // "sha256" are used. - Put(ctx context.Context, src io.Reader, opts ...options.DagPutOption) (ResolvedPath, error) -} - -// DagBatch is the batching version of DagAPI. All implementations of DagBatch -// should be threadsafe -type DagBatch interface { - DagOps - - // Commit commits nodes to the datastore and announces them to the network - Commit(ctx context.Context) error -} - -// DagAPI specifies the interface to IPLD -type DagAPI interface { - DagOps - - // Get attempts to resolve and get the node specified by the path - Get(ctx context.Context, path Path) (ipld.Node, error) - - // Tree returns list of paths within a node specified by the path. - Tree(ctx context.Context, path Path, opts ...options.DagTreeOption) ([]Path, error) - - // Batch creates new DagBatch - Batch(ctx context.Context) DagBatch -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dht.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dht.go deleted file mode 100644 index 38a0f73488..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/dht.go +++ /dev/null @@ -1,26 +0,0 @@ -package iface - -import ( - "context" - - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" -) - -// DhtAPI specifies the interface to the DHT -// Note: This API will likely get deprecated in near future, see -// https://github.com/ipfs/interface-ipfs-core/issues/249 for more context. -type DhtAPI interface { - // FindPeer queries the DHT for all of the multiaddresses associated with a - // Peer ID - FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) - - // FindProviders finds peers in the DHT who can provide a specific value - // given a key. - FindProviders(context.Context, Path, ...options.DhtFindProvidersOption) (<-chan pstore.PeerInfo, error) - - // Provide announces to the network that you are providing given values - Provide(context.Context, Path, ...options.DhtProvideOption) error -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/errors.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/errors.go deleted file mode 100644 index 4ee3026ffc..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/errors.go +++ /dev/null @@ -1,8 +0,0 @@ -package iface - -import "errors" - -var ( - ErrIsDir = errors.New("this dag node is a directory") - ErrOffline = errors.New("this action must be run in online mode, try running 'ipfs daemon' first") -) diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/key.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/key.go deleted file mode 100644 index 9e7bfee281..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/key.go +++ /dev/null @@ -1,41 +0,0 @@ -package iface - -import ( - "context" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -// Key specifies the interface to Keys in KeyAPI Keystore -type Key interface { - // Key returns key name - Name() string - - // Path returns key path - Path() Path - - // ID returns key PeerID - ID() peer.ID -} - -// KeyAPI specifies the interface to Keystore -type KeyAPI interface { - // Generate generates new key, stores it in the keystore under the specified - // name and returns a base58 encoded multihash of it's public key - Generate(ctx context.Context, name string, opts ...options.KeyGenerateOption) (Key, error) - - // Rename renames oldName key to newName. Returns the key and whether another - // key was overwritten, or an error - Rename(ctx context.Context, oldName string, newName string, opts ...options.KeyRenameOption) (Key, bool, error) - - // List lists keys stored in keystore - List(ctx context.Context) ([]Key, error) - - // Self returns the 'main' node key - Self(ctx context.Context) (Key, error) - - // Remove removes keys from keystore. Returns ipns path of the removed key - Remove(ctx context.Context, name string) (Key, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/name.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/name.go deleted file mode 100644 index a02bc07874..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/name.go +++ /dev/null @@ -1,46 +0,0 @@ -package iface - -import ( - "context" - "errors" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" -) - -var ErrResolveFailed = errors.New("could not resolve name") - -// IpnsEntry specifies the interface to IpnsEntries -type IpnsEntry interface { - // Name returns IpnsEntry name - Name() string - // Value returns IpnsEntry value - Value() Path -} - -type IpnsResult struct { - Path - Err error -} - -// NameAPI specifies the interface to IPNS. -// -// IPNS is a PKI namespace, where names are the hashes of public keys, and the -// private key enables publishing new (signed) values. In both publish and -// resolve, the default name used is the node's own PeerID, which is the hash of -// its public key. -// -// You can use .Key API to list and generate more names and their respective keys. -type NameAPI interface { - // Publish announces new IPNS name - Publish(ctx context.Context, path Path, opts ...options.NamePublishOption) (IpnsEntry, error) - - // Resolve attempts to resolve the newest version of the specified name - Resolve(ctx context.Context, name string, opts ...options.NameResolveOption) (Path, error) - - // Search is a version of Resolve which outputs paths as they are discovered, - // reducing the time to first entry - // - // Note: by default, all paths read from the channel are considered unsafe, - // except the latest (last path in channel read buffer). - Search(ctx context.Context, name string, opts ...options.NameResolveOption) (<-chan IpnsResult, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/block.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/block.go deleted file mode 100644 index 6603136f30..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/block.go +++ /dev/null @@ -1,115 +0,0 @@ -package options - -import ( - "fmt" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -type BlockPutSettings struct { - Codec string - MhType uint64 - MhLength int -} - -type BlockRmSettings struct { - Force bool -} - -type BlockPutOption func(*BlockPutSettings) error -type BlockRmOption func(*BlockRmSettings) error - -func BlockPutOptions(opts ...BlockPutOption) (*BlockPutSettings, cid.Prefix, error) { - options := &BlockPutSettings{ - Codec: "", - MhType: mh.SHA2_256, - MhLength: -1, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, cid.Prefix{}, err - } - } - - var pref cid.Prefix - pref.Version = 1 - - if options.Codec == "" { - if options.MhType != mh.SHA2_256 || (options.MhLength != -1 && options.MhLength != 32) { - options.Codec = "protobuf" - } else { - options.Codec = "v0" - } - } - - if options.Codec == "v0" && options.MhType == mh.SHA2_256 { - pref.Version = 0 - } - - formatval, ok := cid.Codecs[options.Codec] - if !ok { - return nil, cid.Prefix{}, fmt.Errorf("unrecognized format: %s", options.Codec) - } - - if options.Codec == "v0" { - if options.MhType != mh.SHA2_256 || (options.MhLength != -1 && options.MhLength != 32) { - return nil, cid.Prefix{}, fmt.Errorf("only sha2-255-32 is allowed with CIDv0") - } - } - - pref.Codec = formatval - - pref.MhType = options.MhType - pref.MhLength = options.MhLength - - return options, pref, nil -} - -func BlockRmOptions(opts ...BlockRmOption) (*BlockRmSettings, error) { - options := &BlockRmSettings{ - Force: false, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - return options, nil -} - -type blockOpts struct{} - -var Block blockOpts - -// Format is an option for Block.Put which specifies the multicodec to use to -// serialize the object. Default is "v0" -func (blockOpts) Format(codec string) BlockPutOption { - return func(settings *BlockPutSettings) error { - settings.Codec = codec - return nil - } -} - -// Hash is an option for Block.Put which specifies the multihash settings to use -// when hashing the object. Default is mh.SHA2_256 (0x12). -// If mhLen is set to -1, default length for the hash will be used -func (blockOpts) Hash(mhType uint64, mhLen int) BlockPutOption { - return func(settings *BlockPutSettings) error { - settings.MhType = mhType - settings.MhLength = mhLen - return nil - } -} - -// Force is an option for Block.Rm which, when set to true, will ignore -// non-existing blocks -func (blockOpts) Force(force bool) BlockRmOption { - return func(settings *BlockRmSettings) error { - settings.Force = force - return nil - } -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/dag.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/dag.go deleted file mode 100644 index 4fdff0489c..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/dag.go +++ /dev/null @@ -1,95 +0,0 @@ -package options - -import ( - "math" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -type DagPutSettings struct { - InputEnc string - Codec uint64 - MhType uint64 - MhLength int -} - -type DagTreeSettings struct { - Depth int -} - -type DagPutOption func(*DagPutSettings) error -type DagTreeOption func(*DagTreeSettings) error - -func DagPutOptions(opts ...DagPutOption) (*DagPutSettings, error) { - options := &DagPutSettings{ - InputEnc: "json", - Codec: cid.DagCBOR, - MhType: math.MaxUint64, - MhLength: -1, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - return options, nil -} - -func DagTreeOptions(opts ...DagTreeOption) (*DagTreeSettings, error) { - options := &DagTreeSettings{ - Depth: -1, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - return options, nil -} - -type dagOpts struct{} - -var Dag dagOpts - -// InputEnc is an option for Dag.Put which specifies the input encoding of the -// data. Default is "json", most formats/codecs support "raw" -func (dagOpts) InputEnc(enc string) DagPutOption { - return func(settings *DagPutSettings) error { - settings.InputEnc = enc - return nil - } -} - -// Codec is an option for Dag.Put which specifies the multicodec to use to -// serialize the object. Default is cid.DagCBOR (0x71) -func (dagOpts) Codec(codec uint64) DagPutOption { - return func(settings *DagPutSettings) error { - settings.Codec = codec - return nil - } -} - -// Hash is an option for Dag.Put which specifies the multihash settings to use -// when hashing the object. Default is based on the codec used -// (mh.SHA2_256 (0x12) for DagCBOR). If mhLen is set to -1, default length for -// the hash will be used -func (dagOpts) Hash(mhType uint64, mhLen int) DagPutOption { - return func(settings *DagPutSettings) error { - settings.MhType = mhType - settings.MhLength = mhLen - return nil - } -} - -// Depth is an option for Dag.Tree which specifies maximum depth of the -// returned tree. Default is -1 (no depth limit) -func (dagOpts) Depth(depth int) DagTreeOption { - return func(settings *DagTreeSettings) error { - settings.Depth = depth - return nil - } -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/name.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/name.go deleted file mode 100644 index c614db3abc..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/name.go +++ /dev/null @@ -1,133 +0,0 @@ -package options - -import ( - "time" - - ropts "github.com/ipfs/go-ipfs/namesys/opts" -) - -const ( - DefaultNameValidTime = 24 * time.Hour -) - -type NamePublishSettings struct { - ValidTime time.Duration - Key string - - TTL *time.Duration - - AllowOffline bool -} - -type NameResolveSettings struct { - Local bool - Cache bool - - ResolveOpts []ropts.ResolveOpt -} - -type NamePublishOption func(*NamePublishSettings) error -type NameResolveOption func(*NameResolveSettings) error - -func NamePublishOptions(opts ...NamePublishOption) (*NamePublishSettings, error) { - options := &NamePublishSettings{ - ValidTime: DefaultNameValidTime, - Key: "self", - - AllowOffline: false, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - - return options, nil -} - -func NameResolveOptions(opts ...NameResolveOption) (*NameResolveSettings, error) { - options := &NameResolveSettings{ - Local: false, - Cache: true, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - - return options, nil -} - -type nameOpts struct{} - -var Name nameOpts - -// ValidTime is an option for Name.Publish which specifies for how long the -// entry will remain valid. Default value is 24h -func (nameOpts) ValidTime(validTime time.Duration) NamePublishOption { - return func(settings *NamePublishSettings) error { - settings.ValidTime = validTime - return nil - } -} - -// Key is an option for Name.Publish which specifies the key to use for -// publishing. Default value is "self" which is the node's own PeerID. -// The key parameter must be either PeerID or keystore key alias. -// -// You can use KeyAPI to list and generate more names and their respective keys. -func (nameOpts) Key(key string) NamePublishOption { - return func(settings *NamePublishSettings) error { - settings.Key = key - return nil - } -} - -// AllowOffline is an option for Name.Publish which specifies whether to allow -// publishing when the node is offline. Default value is false -func (nameOpts) AllowOffline(allow bool) NamePublishOption { - return func(settings *NamePublishSettings) error { - settings.AllowOffline = allow - return nil - } -} - -// TTL is an option for Name.Publish which specifies the time duration the -// published record should be cached for (caution: experimental). -func (nameOpts) TTL(ttl time.Duration) NamePublishOption { - return func(settings *NamePublishSettings) error { - settings.TTL = &ttl - return nil - } -} - -// Local is an option for Name.Resolve which specifies if the lookup should be -// offline. Default value is false -func (nameOpts) Local(local bool) NameResolveOption { - return func(settings *NameResolveSettings) error { - settings.Local = local - return nil - } -} - -// Cache is an option for Name.Resolve which specifies if cache should be used. -// Default value is true -func (nameOpts) Cache(cache bool) NameResolveOption { - return func(settings *NameResolveSettings) error { - settings.Cache = cache - return nil - } -} - -// -func (nameOpts) ResolveOption(opt ropts.ResolveOpt) NameResolveOption { - return func(settings *NameResolveSettings) error { - settings.ResolveOpts = append(settings.ResolveOpts, opt) - return nil - } -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/pin.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/pin.go deleted file mode 100644 index 9d1107f927..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/pin.go +++ /dev/null @@ -1,128 +0,0 @@ -package options - -type PinAddSettings struct { - Recursive bool -} - -type PinLsSettings struct { - Type string -} - -type PinUpdateSettings struct { - Unpin bool -} - -type PinAddOption func(*PinAddSettings) error -type PinLsOption func(settings *PinLsSettings) error -type PinUpdateOption func(*PinUpdateSettings) error - -func PinAddOptions(opts ...PinAddOption) (*PinAddSettings, error) { - options := &PinAddSettings{ - Recursive: true, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - - return options, nil -} - -func PinLsOptions(opts ...PinLsOption) (*PinLsSettings, error) { - options := &PinLsSettings{ - Type: "all", - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - - return options, nil -} - -func PinUpdateOptions(opts ...PinUpdateOption) (*PinUpdateSettings, error) { - options := &PinUpdateSettings{ - Unpin: true, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, err - } - } - - return options, nil -} - -type pinType struct{} - -type pinOpts struct { - Type pinType -} - -var Pin pinOpts - -// All is an option for Pin.Ls which will make it return all pins. It is -// the default -func (pinType) All() PinLsOption { - return Pin.pinType("all") -} - -// Recursive is an option for Pin.Ls which will make it only return recursive -// pins -func (pinType) Recursive() PinLsOption { - return Pin.pinType("recursive") -} - -// Direct is an option for Pin.Ls which will make it only return direct (non -// recursive) pins -func (pinType) Direct() PinLsOption { - return Pin.pinType("direct") -} - -// Indirect is an option for Pin.Ls which will make it only return indirect pins -// (objects referenced by other recursively pinned objects) -func (pinType) Indirect() PinLsOption { - return Pin.pinType("indirect") -} - -// Recursive is an option for Pin.Add which specifies whether to pin an entire -// object tree or just one object. Default: true -func (pinOpts) Recursive(recursive bool) PinAddOption { - return func(settings *PinAddSettings) error { - settings.Recursive = recursive - return nil - } -} - -// Type is an option for Pin.Ls which allows to specify which pin types should -// be returned -// -// Supported values: -// * "direct" - directly pinned objects -// * "recursive" - roots of recursive pins -// * "indirect" - indirectly pinned objects (referenced by recursively pinned -// objects) -// * "all" - all pinned objects (default) -func (pinOpts) pinType(t string) PinLsOption { - return func(settings *PinLsSettings) error { - settings.Type = t - return nil - } -} - -// Unpin is an option for Pin.Update which specifies whether to remove the old pin. -// Default is true. -func (pinOpts) Unpin(unpin bool) PinUpdateOption { - return func(settings *PinUpdateSettings) error { - settings.Unpin = unpin - return nil - } -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/unixfs.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/unixfs.go deleted file mode 100644 index 8a91378875..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/unixfs.go +++ /dev/null @@ -1,304 +0,0 @@ -package options - -import ( - "errors" - "fmt" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" -) - -type Layout int - -const ( - BalancedLayout Layout = iota - TrickleLayout -) - -type UnixfsAddSettings struct { - CidVersion int - MhType uint64 - - Inline bool - InlineLimit int - RawLeaves bool - RawLeavesSet bool - - Chunker string - Layout Layout - - Pin bool - OnlyHash bool - Local bool - FsCache bool - NoCopy bool - - Wrap bool - Hidden bool - StdinName string - - Events chan<- interface{} - Silent bool - Progress bool -} - -type UnixfsAddOption func(*UnixfsAddSettings) error - -func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix, error) { - options := &UnixfsAddSettings{ - CidVersion: -1, - MhType: mh.SHA2_256, - - Inline: false, - InlineLimit: 32, - RawLeaves: false, - RawLeavesSet: false, - - Chunker: "size-262144", - Layout: BalancedLayout, - - Pin: false, - OnlyHash: false, - Local: false, - FsCache: false, - NoCopy: false, - - Wrap: false, - Hidden: false, - StdinName: "", - - Events: nil, - Silent: false, - Progress: false, - } - - for _, opt := range opts { - err := opt(options) - if err != nil { - return nil, cid.Prefix{}, err - } - } - - // nocopy -> rawblocks - if options.NoCopy && !options.RawLeaves { - // fixed? - if options.RawLeavesSet { - return nil, cid.Prefix{}, fmt.Errorf("nocopy option requires '--raw-leaves' to be enabled as well") - } - - // No, satisfy mandatory constraint. - options.RawLeaves = true - } - - // (hash != "sha2-256") -> CIDv1 - if options.MhType != mh.SHA2_256 { - switch options.CidVersion { - case 0: - return nil, cid.Prefix{}, errors.New("CIDv0 only supports sha2-256") - case 1, -1: - options.CidVersion = 1 - default: - return nil, cid.Prefix{}, fmt.Errorf("unknown CID version: %d", options.CidVersion) - } - } else { - if options.CidVersion < 0 { - // Default to CIDv0 - options.CidVersion = 0 - } - } - - // cidV1 -> raw blocks (by default) - if options.CidVersion > 0 && !options.RawLeavesSet { - options.RawLeaves = true - } - - prefix, err := dag.PrefixForCidVersion(options.CidVersion) - if err != nil { - return nil, cid.Prefix{}, err - } - - prefix.MhType = options.MhType - prefix.MhLength = -1 - - return options, prefix, nil -} - -type unixfsOpts struct{} - -var Unixfs unixfsOpts - -// CidVersion specifies which CID version to use. Defaults to 0 unless an option -// that depends on CIDv1 is passed. -func (unixfsOpts) CidVersion(version int) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.CidVersion = version - return nil - } -} - -// Hash function to use. Implies CIDv1 if not set to sha2-256 (default). -// -// Table of functions is declared in https://github.com/multiformats/go-multihash/blob/master/multihash.go -func (unixfsOpts) Hash(mhtype uint64) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.MhType = mhtype - return nil - } -} - -// RawLeaves specifies whether to use raw blocks for leaves (data nodes with no -// links) instead of wrapping them with unixfs structures. -func (unixfsOpts) RawLeaves(enable bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.RawLeaves = enable - settings.RawLeavesSet = true - return nil - } -} - -// Inline tells the adder to inline small blocks into CIDs -func (unixfsOpts) Inline(enable bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Inline = enable - return nil - } -} - -// InlineLimit sets the amount of bytes below which blocks will be encoded -// directly into CID instead of being stored and addressed by it's hash. -// Specifying this option won't enable block inlining. For that use `Inline` -// option. Default: 32 bytes -// -// Note that while there is no hard limit on the number of bytes, it should be -// kept at a reasonably low value, such as 64; implementations may choose to -// reject anything larger. -func (unixfsOpts) InlineLimit(limit int) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.InlineLimit = limit - return nil - } -} - -// Chunker specifies settings for the chunking algorithm to use. -// -// Default: size-262144, formats: -// size-[bytes] - Simple chunker splitting data into blocks of n bytes -// rabin-[min]-[avg]-[max] - Rabin chunker -func (unixfsOpts) Chunker(chunker string) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Chunker = chunker - return nil - } -} - -// Layout tells the adder how to balance data between leaves. -// options.BalancedLayout is the default, it's optimized for static seekable -// files. -// options.TrickleLayout is optimized for streaming data, -func (unixfsOpts) Layout(layout Layout) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Layout = layout - return nil - } -} - -// Pin tells the adder to pin the file root recursively after adding -func (unixfsOpts) Pin(pin bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Pin = pin - return nil - } -} - -// HashOnly will make the adder calculate data hash without storing it in the -// blockstore or announcing it to the network -func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.OnlyHash = hashOnly - return nil - } -} - -// Local will add the data to blockstore without announcing it to the network -// -// Note that this doesn't prevent other nodes from getting this data -func (unixfsOpts) Local(local bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Local = local - return nil - } -} - -// Wrap tells the adder to wrap the added file structure with an additional -// directory. -func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Wrap = wrap - return nil - } -} - -// Hidden enables adding of hidden files (files prefixed with '.') -func (unixfsOpts) Hidden(hidden bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Hidden = hidden - return nil - } -} - -// StdinName is the name set for files which don specify FilePath as -// os.Stdin.Name() -func (unixfsOpts) StdinName(name string) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.StdinName = name - return nil - } -} - -// Events specifies channel which will be used to report events about ongoing -// Add operation. -// -// Note that if this channel blocks it may slowdown the adder -func (unixfsOpts) Events(sink chan<- interface{}) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Events = sink - return nil - } -} - -// Silent reduces event output -func (unixfsOpts) Silent(silent bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Silent = silent - return nil - } -} - -// Progress tells the adder whether to enable progress events -func (unixfsOpts) Progress(enable bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.Progress = enable - return nil - } -} - -// FsCache tells the adder to check the filestore for pre-existing blocks -// -// Experimental -func (unixfsOpts) FsCache(enable bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.FsCache = enable - return nil - } -} - -// NoCopy tells the adder to add the files using filestore. Implies RawLeaves. -// -// Experimental -func (unixfsOpts) Nocopy(enable bool) UnixfsAddOption { - return func(settings *UnixfsAddSettings) error { - settings.NoCopy = enable - return nil - } -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/path.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/path.go deleted file mode 100644 index 79dac201d1..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/path.go +++ /dev/null @@ -1,176 +0,0 @@ -package iface - -import ( - ipfspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -//TODO: merge with ipfspath so we don't depend on it - -// Path is a generic wrapper for paths used in the API. A path can be resolved -// to a CID using one of Resolve functions in the API. -// -// Paths must be prefixed with a valid prefix: -// -// * /ipfs - Immutable unixfs path (files) -// * /ipld - Immutable ipld path (data) -// * /ipns - Mutable names. Usually resolves to one of the immutable paths -//TODO: /local (MFS) -type Path interface { - // String returns the path as a string. - String() string - - // Namespace returns the first component of the path. - // - // For example path "/ipfs/QmHash", calling Namespace() will return "ipfs" - Namespace() string - - // Mutable returns false if the data pointed to by this path in guaranteed - // to not change. - // - // Note that resolved mutable path can be immutable. - Mutable() bool -} - -// ResolvedPath is a path which was resolved to the last resolvable node -type ResolvedPath interface { - // Cid returns the CID of the node referenced by the path. Remainder of the - // path is guaranteed to be within the node. - // - // Examples: - // If you have 3 linked objects: QmRoot -> A -> B: - // - // cidB := {"foo": {"bar": 42 }} - // cidA := {"B": {"/": cidB }} - // cidRoot := {"A": {"/": cidA }} - // - // And resolve paths: - // * "/ipfs/${cidRoot}" - // * Calling Cid() will return `cidRoot` - // * Calling Root() will return `cidRoot` - // * Calling Remainder() will return `` - // - // * "/ipfs/${cidRoot}/A" - // * Calling Cid() will return `cidA` - // * Calling Root() will return `cidRoot` - // * Calling Remainder() will return `` - // - // * "/ipfs/${cidRoot}/A/B/foo" - // * Calling Cid() will return `cidB` - // * Calling Root() will return `cidRoot` - // * Calling Remainder() will return `foo` - // - // * "/ipfs/${cidRoot}/A/B/foo/bar" - // * Calling Cid() will return `cidB` - // * Calling Root() will return `cidRoot` - // * Calling Remainder() will return `foo/bar` - Cid() cid.Cid - - // Root returns the CID of the root object of the path - // - // Example: - // If you have 3 linked objects: QmRoot -> A -> B, and resolve path - // "/ipfs/QmRoot/A/B", the Root method will return the CID of object QmRoot - // - // For more examples see the documentation of Cid() method - Root() cid.Cid - - // Remainder returns unresolved part of the path - // - // Example: - // If you have 2 linked objects: QmRoot -> A, where A is a CBOR node - // containing the following data: - // - // {"foo": {"bar": 42 }} - // - // When resolving "/ipld/QmRoot/A/foo/bar", Remainder will return "foo/bar" - // - // For more examples see the documentation of Cid() method - Remainder() string - - Path -} - -// path implements coreiface.Path -type path struct { - path ipfspath.Path -} - -// resolvedPath implements coreiface.resolvedPath -type resolvedPath struct { - path - cid cid.Cid - root cid.Cid - remainder string -} - -// IpfsPath creates new /ipfs path from the provided CID -func IpfsPath(c cid.Cid) ResolvedPath { - return &resolvedPath{ - path: path{ipfspath.Path("/ipfs/" + c.String())}, - cid: c, - root: c, - remainder: "", - } -} - -// IpldPath creates new /ipld path from the provided CID -func IpldPath(c cid.Cid) ResolvedPath { - return &resolvedPath{ - path: path{ipfspath.Path("/ipld/" + c.String())}, - cid: c, - root: c, - remainder: "", - } -} - -// ParsePath parses string path to a Path -func ParsePath(p string) (Path, error) { - pp, err := ipfspath.ParsePath(p) - if err != nil { - return nil, err - } - - return &path{path: pp}, nil -} - -// NewResolvedPath creates new ResolvedPath. This function performs no checks -// and is intended to be used by resolver implementations. Incorrect inputs may -// cause panics. Handle with care. -func NewResolvedPath(ipath ipfspath.Path, c cid.Cid, root cid.Cid, remainder string) ResolvedPath { - return &resolvedPath{ - path: path{ipath}, - cid: c, - root: root, - remainder: remainder, - } -} - -func (p *path) String() string { - return p.path.String() -} - -func (p *path) Namespace() string { - if len(p.path.Segments()) < 1 { - panic("path without namespace") //this shouldn't happen under any scenario - } - return p.path.Segments()[0] -} - -func (p *path) Mutable() bool { - //TODO: MFS: check for /local - return p.Namespace() == "ipns" -} - -func (p *resolvedPath) Cid() cid.Cid { - return p.cid -} - -func (p *resolvedPath) Root() cid.Cid { - return p.root -} - -func (p *resolvedPath) Remainder() string { - return p.remainder -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pin.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pin.go deleted file mode 100644 index 2e119cbeae..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pin.go +++ /dev/null @@ -1,54 +0,0 @@ -package iface - -import ( - "context" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" -) - -// Pin holds information about pinned resource -type Pin interface { - // Path to the pinned object - Path() ResolvedPath - - // Type of the pin - Type() string -} - -// PinStatus holds information about pin health -type PinStatus interface { - // Ok indicates whether the pin has been verified to be correct - Ok() bool - - // BadNodes returns any bad (usually missing) nodes from the pin - BadNodes() []BadPinNode -} - -// BadPinNode is a node that has been marked as bad by Pin.Verify -type BadPinNode interface { - // Path is the path of the node - Path() ResolvedPath - - // Err is the reason why the node has been marked as bad - Err() error -} - -// PinAPI specifies the interface to pining -type PinAPI interface { - // Add creates new pin, be default recursive - pinning the whole referenced - // tree - Add(context.Context, Path, ...options.PinAddOption) error - - // Ls returns list of pinned objects on this node - Ls(context.Context, ...options.PinLsOption) ([]Pin, error) - - // Rm removes pin for object specified by the path - Rm(context.Context, Path) error - - // Update changes one pin to another, skipping checks for matching paths in - // the old tree - Update(ctx context.Context, from Path, to Path, opts ...options.PinUpdateOption) error - - // Verify verifies the integrity of pinned objects - Verify(context.Context) (<-chan PinStatus, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pubsub.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pubsub.go deleted file mode 100644 index b3f3f6b762..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/pubsub.go +++ /dev/null @@ -1,48 +0,0 @@ -package iface - -import ( - "context" - "io" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -// PubSubSubscription is an active PubSub subscription -type PubSubSubscription interface { - io.Closer - - // Next return the next incoming message - Next(context.Context) (PubSubMessage, error) -} - -// PubSubMessage is a single PubSub message -type PubSubMessage interface { - // From returns id of a peer from which the message has arrived - From() peer.ID - - // Data returns the message body - Data() []byte - - // Seq returns message identifier - Seq() []byte - - // Topics returns list of topics this message was set to - Topics() []string -} - -// PubSubAPI specifies the interface to PubSub -type PubSubAPI interface { - // Ls lists subscribed topics by name - Ls(context.Context) ([]string, error) - - // Peers list peers we are currently pubsubbing with - Peers(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error) - - // Publish a message to a given pubsub topic - Publish(context.Context, string, []byte) error - - // Subscribe to messages on a given topic - Subscribe(context.Context, string, ...options.PubSubSubscribeOption) (PubSubSubscription, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/swarm.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/swarm.go deleted file mode 100644 index d4b92c017d..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/swarm.go +++ /dev/null @@ -1,57 +0,0 @@ -package iface - -import ( - "context" - "errors" - "time" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" -) - -var ( - ErrNotConnected = errors.New("not connected") - ErrConnNotFound = errors.New("conn not found") -) - -// ConnectionInfo contains information about a peer -type ConnectionInfo interface { - // ID returns PeerID - ID() peer.ID - - // Address returns the multiaddress via which we are connected with the peer - Address() ma.Multiaddr - - // Direction returns which way the connection was established - Direction() net.Direction - - // Latency returns last known round trip time to the peer - Latency() (time.Duration, error) - - // Streams returns list of streams established with the peer - Streams() ([]protocol.ID, error) -} - -// SwarmAPI specifies the interface to libp2p swarm -type SwarmAPI interface { - // Connect to a given peer - Connect(context.Context, pstore.PeerInfo) error - - // Disconnect from a given address - Disconnect(context.Context, ma.Multiaddr) error - - // Peers returns the list of peers we are connected to - Peers(context.Context) ([]ConnectionInfo, error) - - // KnownAddrs returns the list of all addresses this node is aware of - KnownAddrs(context.Context) (map[peer.ID][]ma.Multiaddr, error) - - // LocalAddrs returns the list of announced listening addresses - LocalAddrs(context.Context) ([]ma.Multiaddr, error) - - // ListenAddrs returns the list of all listening addresses - ListenAddrs(context.Context) ([]ma.Multiaddr, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/unixfs.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/unixfs.go deleted file mode 100644 index 6fd33ad2c5..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/unixfs.go +++ /dev/null @@ -1,42 +0,0 @@ -package iface - -import ( - "context" - "io" - - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" -) - -// TODO: ideas on making this more coreapi-ish without breaking the http API? -type AddEvent struct { - Name string - Hash string `json:",omitempty"` - Bytes int64 `json:",omitempty"` - Size string `json:",omitempty"` -} - -type UnixfsFile interface { - files.SizeFile - io.Seeker -} - -// UnixfsAPI is the basic interface to immutable files in IPFS -// NOTE: This API is heavily WIP, things are guaranteed to break frequently -type UnixfsAPI interface { - // Add imports the data from the reader into merkledag file - // - // TODO: a long useful comment on how to use this for many different scenarios - Add(context.Context, files.File, ...options.UnixfsAddOption) (ResolvedPath, error) - - // Get returns a read-only handle to a file tree referenced by a path - // - // Note that some implementations of this API may apply the specified context - // to operations performed on the returned file - Get(context.Context, Path) (UnixfsFile, error) - - // Ls returns the list of links in a directory - Ls(context.Context, Path) ([]*ipld.Link, error) -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/key.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/key.go index 3494a8537e..10e45caff9 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/key.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/key.go @@ -7,12 +7,11 @@ import ( "fmt" "sort" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ipfspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ipfspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) type KeyAPI CoreAPI @@ -54,7 +53,7 @@ func (api *KeyAPI) Generate(ctx context.Context, name string, opts ...caopts.Key return nil, fmt.Errorf("cannot create key with name 'self'") } - _, err = api.node.Repo.Keystore().Get(name) + _, err = api.repo.Keystore().Get(name) if err == nil { return nil, fmt.Errorf("key with name '%s' already exists", name) } @@ -87,7 +86,7 @@ func (api *KeyAPI) Generate(ctx context.Context, name string, opts ...caopts.Key return nil, fmt.Errorf("unrecognized key type: %s", options.Algorithm) } - err = api.node.Repo.Keystore().Put(name, sk) + err = api.repo.Keystore().Put(name, sk) if err != nil { return nil, err } @@ -102,7 +101,7 @@ func (api *KeyAPI) Generate(ctx context.Context, name string, opts ...caopts.Key // List returns a list keys stored in keystore. func (api *KeyAPI) List(ctx context.Context) ([]coreiface.Key, error) { - keys, err := api.node.Repo.Keystore().List() + keys, err := api.repo.Keystore().List() if err != nil { return nil, err } @@ -110,10 +109,10 @@ func (api *KeyAPI) List(ctx context.Context) ([]coreiface.Key, error) { sort.Strings(keys) out := make([]coreiface.Key, len(keys)+1) - out[0] = &key{"self", api.node.Identity} + out[0] = &key{"self", api.identity} for n, k := range keys { - privKey, err := api.node.Repo.Keystore().Get(k) + privKey, err := api.repo.Keystore().Get(k) if err != nil { return nil, err } @@ -138,7 +137,7 @@ func (api *KeyAPI) Rename(ctx context.Context, oldName string, newName string, o return nil, false, err } - ks := api.node.Repo.Keystore() + ks := api.repo.Keystore() if oldName == "self" { return nil, false, fmt.Errorf("cannot rename key with name 'self'") @@ -192,7 +191,7 @@ func (api *KeyAPI) Rename(ctx context.Context, oldName string, newName string, o // Remove removes keys from keystore. Returns ipns path of the removed key. func (api *KeyAPI) Remove(ctx context.Context, name string) (coreiface.Key, error) { - ks := api.node.Repo.Keystore() + ks := api.repo.Keystore() if name == "self" { return nil, fmt.Errorf("cannot remove key with name 'self'") @@ -219,9 +218,9 @@ func (api *KeyAPI) Remove(ctx context.Context, name string) (coreiface.Key, erro } func (api *KeyAPI) Self(ctx context.Context) (coreiface.Key, error) { - if api.node.Identity == "" { + if api.identity == "" { return nil, errors.New("identity not loaded") } - return &key{"self", api.node.Identity}, nil + return &key{"self", api.identity}, nil } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/name.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/name.go index aa129faa96..7ac93f5f28 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/name.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/name.go @@ -2,21 +2,19 @@ package coreapi import ( "context" - "errors" "fmt" "strings" "time" - "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" "github.com/ipfs/go-ipfs/keystore" "github.com/ipfs/go-ipfs/namesys" - "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ipath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline" + ipath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) type NameAPI CoreAPI @@ -38,24 +36,18 @@ func (e *ipnsEntry) Value() coreiface.Path { // Publish announces new IPNS name and returns the new IPNS entry. func (api *NameAPI) Publish(ctx context.Context, p coreiface.Path, opts ...caopts.NamePublishOption) (coreiface.IpnsEntry, error) { - options, err := caopts.NamePublishOptions(opts...) - if err != nil { + if err := api.checkPublishAllowed(); err != nil { return nil, err } - n := api.node - if !n.OnlineMode() { - if !options.AllowOffline { - return nil, coreiface.ErrOffline - } - err := n.SetupOfflineRouting() - if err != nil { - return nil, err - } + options, err := caopts.NamePublishOptions(opts...) + if err != nil { + return nil, err } - if n.Mounts.Ipns != nil && n.Mounts.Ipns.IsActive() { - return nil, errors.New("cannot manually publish while IPNS is mounted") + err = api.checkOnline(options.AllowOffline) + if err != nil { + return nil, err } pth, err := ipath.ParsePath(p.String()) @@ -63,7 +55,7 @@ func (api *NameAPI) Publish(ctx context.Context, p coreiface.Path, opts ...caopt return nil, err } - k, err := keylookup(n, options.Key) + k, err := keylookup(api.privateKey, api.repo.Keystore(), options.Key) if err != nil { return nil, err } @@ -73,7 +65,7 @@ func (api *NameAPI) Publish(ctx context.Context, p coreiface.Path, opts ...caopt } eol := time.Now().Add(options.ValidTime) - err = n.Namesys.PublishWithEOL(ctx, k, pth, eol) + err = api.namesys.PublishWithEOL(ctx, k, pth, eol) if err != nil { return nil, err } @@ -95,28 +87,15 @@ func (api *NameAPI) Search(ctx context.Context, name string, opts ...caopts.Name return nil, err } - n := api.node - - if !n.OnlineMode() { - err := n.SetupOfflineRouting() - if err != nil { - return nil, err - } - } - - var resolver namesys.Resolver = n.Namesys - - if options.Local && !options.Cache { - return nil, errors.New("cannot specify both local and nocache") + err = api.checkOnline(true) + if err != nil { + return nil, err } - if options.Local { - offroute := offline.NewOfflineRouter(n.Repo.Datastore(), n.RecordValidator) - resolver = namesys.NewIpnsResolver(offroute) - } + var resolver namesys.Resolver = api.namesys if !options.Cache { - resolver = namesys.NewNameSystem(n.Routing, n.Repo.Datastore(), 0) + resolver = namesys.NewNameSystem(api.routing, api.repo.Datastore(), 0) } if !strings.HasPrefix(name, "/ipns/") { @@ -161,8 +140,12 @@ func (api *NameAPI) Resolve(ctx context.Context, name string, opts ...caopts.Nam return p, err } -func keylookup(n *core.IpfsNode, k string) (crypto.PrivKey, error) { - res, err := n.GetKey(k) +func keylookup(self ci.PrivKey, kstore keystore.Keystore, k string) (crypto.PrivKey, error) { + if k == "self" { + return self, nil + } + + res, err := kstore.Get(k) if res != nil { return res, nil } @@ -171,13 +154,13 @@ func keylookup(n *core.IpfsNode, k string) (crypto.PrivKey, error) { return nil, err } - keys, err := n.Repo.Keystore().List() + keys, err := kstore.List() if err != nil { return nil, err } for _, key := range keys { - privKey, err := n.Repo.Keystore().Get(key) + privKey, err := kstore.Get(key) if err != nil { return nil, err } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/object.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/object.go index 43b0536d25..3813ca1172 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/object.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/object.go @@ -11,15 +11,15 @@ import ( "io" "io/ioutil" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" "github.com/ipfs/go-ipfs/dagutils" "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" ) const inputLimit = 2 << 20 @@ -118,7 +118,7 @@ func (api *ObjectAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.Obj } if options.Pin { - defer api.node.Blockstore.PinLock().Unlock() + defer api.blockstore.PinLock().Unlock() } err = api.dag.Add(ctx, dagnode) @@ -127,8 +127,8 @@ func (api *ObjectAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.Obj } if options.Pin { - api.node.Pinning.PinWithMode(dagnode.Cid(), pin.Recursive) - err = api.node.Pinning.Flush() + api.pinning.PinWithMode(dagnode.Cid(), pin.Recursive) + err = api.pinning.Flush() if err != nil { return nil, err } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/path.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/path.go index 318156cf9d..741b35a716 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/path.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/path.go @@ -6,13 +6,13 @@ import ( gopath "path" "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - ipfspath "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" + ipfspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" ) // ResolveNode resolves the path `p` using Unixfs resolver, gets and returns the @@ -38,7 +38,7 @@ func (api *CoreAPI) ResolvePath(ctx context.Context, p coreiface.Path) (coreifac } ipath := ipfspath.Path(p.String()) - ipath, err := core.ResolveIPNS(ctx, api.node.Namesys, ipath) + ipath, err := core.ResolveIPNS(ctx, api.namesys, ipath) if err == core.ErrNoNamesys { return nil, coreiface.ErrOffline } else if err != nil { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/pin.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/pin.go index 81d7fc39b5..dc5696262f 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/pin.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/pin.go @@ -4,38 +4,35 @@ import ( "context" "fmt" - merkledag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - corerepo "github.com/ipfs/go-ipfs/core/corerepo" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" + merkledag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" ) type PinAPI CoreAPI func (api *PinAPI) Add(ctx context.Context, p coreiface.Path, opts ...caopts.PinAddOption) error { - settings, err := caopts.PinAddOptions(opts...) + dagNode, err := api.core().ResolveNode(ctx, p) if err != nil { - return err + return fmt.Errorf("pin: %s", err) } - rp, err := api.core().ResolvePath(ctx, p) + settings, err := caopts.PinAddOptions(opts...) if err != nil { return err } - defer api.node.Blockstore.PinLock().Unlock() + defer api.blockstore.PinLock().Unlock() - _, err = corerepo.Pin(api.node, api.core(), ctx, []string{rp.Cid().String()}, settings.Recursive) + err = api.pinning.Pin(ctx, dagNode, settings.Recursive) if err != nil { - return err + return fmt.Errorf("pin: %s", err) } - return api.node.Pinning.Flush() + return api.pinning.Flush() } func (api *PinAPI) Ls(ctx context.Context, opts ...caopts.PinLsOption) ([]coreiface.Pin, error) { @@ -53,13 +50,23 @@ func (api *PinAPI) Ls(ctx context.Context, opts ...caopts.PinLsOption) ([]coreif return api.pinLsAll(settings.Type, ctx) } -func (api *PinAPI) Rm(ctx context.Context, p coreiface.Path) error { - _, err := corerepo.Unpin(api.node, api.core(), ctx, []string{p.String()}, true) +// Rm pin rm api +func (api *PinAPI) Rm(ctx context.Context, p coreiface.Path, opts ...caopts.PinRmOption) error { + rp, err := api.core().ResolvePath(ctx, p) if err != nil { return err } - return api.node.Pinning.Flush() + settings, err := caopts.PinRmOptions(opts...) + if err != nil { + return err + } + + if err = api.pinning.Unpin(ctx, rp.Cid(), settings.Recursive); err != nil { + return err + } + + return api.pinning.Flush() } func (api *PinAPI) Update(ctx context.Context, from coreiface.Path, to coreiface.Path, opts ...caopts.PinUpdateOption) error { @@ -78,14 +85,14 @@ func (api *PinAPI) Update(ctx context.Context, from coreiface.Path, to coreiface return err } - defer api.node.Blockstore.PinLock().Unlock() + defer api.blockstore.PinLock().Unlock() - err = api.node.Pinning.Update(ctx, fp.Cid(), tp.Cid(), settings.Unpin) + err = api.pinning.Update(ctx, fp.Cid(), tp.Cid(), settings.Unpin) if err != nil { return err } - return api.node.Pinning.Flush() + return api.pinning.Flush() } type pinStatus struct { @@ -117,16 +124,15 @@ func (n *badNode) Err() error { } func (api *PinAPI) Verify(ctx context.Context) (<-chan coreiface.PinStatus, error) { - visited := make(map[string]*pinStatus) - bs := api.node.Blocks.Blockstore() + visited := make(map[cid.Cid]*pinStatus) + bs := api.blockstore DAG := merkledag.NewDAGService(bserv.New(bs, offline.Exchange(bs))) getLinks := merkledag.GetLinksWithDAG(DAG) - recPins := api.node.Pinning.RecursiveKeys() + recPins := api.pinning.RecursiveKeys() var checkPin func(root cid.Cid) *pinStatus checkPin = func(root cid.Cid) *pinStatus { - key := root.String() - if status, ok := visited[key]; ok { + if status, ok := visited[root]; ok { return status } @@ -134,7 +140,7 @@ func (api *PinAPI) Verify(ctx context.Context) (<-chan coreiface.PinStatus, erro if err != nil { status := &pinStatus{ok: false, cid: root} status.badNodes = []coreiface.BadPinNode{&badNode{path: coreiface.IpldPath(root), err: err}} - visited[key] = status + visited[root] = status return status } @@ -147,7 +153,7 @@ func (api *PinAPI) Verify(ctx context.Context) (<-chan coreiface.PinStatus, erro } } - visited[key] = status + visited[root] = status return status } @@ -177,11 +183,11 @@ func (p *pinInfo) Type() string { func (api *PinAPI) pinLsAll(typeStr string, ctx context.Context) ([]coreiface.Pin, error) { - keys := make(map[string]*pinInfo) + keys := make(map[cid.Cid]*pinInfo) AddToResultKeys := func(keyList []cid.Cid, typeStr string) { for _, c := range keyList { - keys[c.String()] = &pinInfo{ + keys[c] = &pinInfo{ pinType: typeStr, path: coreiface.IpldPath(c), } @@ -189,11 +195,11 @@ func (api *PinAPI) pinLsAll(typeStr string, ctx context.Context) ([]coreiface.Pi } if typeStr == "direct" || typeStr == "all" { - AddToResultKeys(api.node.Pinning.DirectKeys(), "direct") + AddToResultKeys(api.pinning.DirectKeys(), "direct") } if typeStr == "indirect" || typeStr == "all" { set := cid.NewSet() - for _, k := range api.node.Pinning.RecursiveKeys() { + for _, k := range api.pinning.RecursiveKeys() { err := merkledag.EnumerateChildren(ctx, merkledag.GetLinksWithDAG(api.dag), k, set.Visit) if err != nil { return nil, err @@ -202,7 +208,7 @@ func (api *PinAPI) pinLsAll(typeStr string, ctx context.Context) ([]coreiface.Pi AddToResultKeys(set.Keys(), "indirect") } if typeStr == "recursive" || typeStr == "all" { - AddToResultKeys(api.node.Pinning.RecursiveKeys(), "recursive") + AddToResultKeys(api.pinning.RecursiveKeys(), "recursive") } out := make([]coreiface.Pin, 0, len(keys)) diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/pubsub.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/pubsub.go index efde2cf64c..693e6d801a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/pubsub.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/pubsub.go @@ -7,14 +7,14 @@ import ( "sync" "time" - core "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - pubsub "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + pubsub "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + caopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) type PubSubAPI CoreAPI @@ -29,15 +29,17 @@ type pubSubMessage struct { } func (api *PubSubAPI) Ls(ctx context.Context) ([]string, error) { - if err := api.checkNode(); err != nil { + _, err := api.checkNode() + if err != nil { return nil, err } - return api.node.PubSub.GetTopics(), nil + return api.pubSub.GetTopics(), nil } func (api *PubSubAPI) Peers(ctx context.Context, opts ...caopts.PubSubPeersOption) ([]peer.ID, error) { - if err := api.checkNode(); err != nil { + _, err := api.checkNode() + if err != nil { return nil, err } @@ -46,7 +48,7 @@ func (api *PubSubAPI) Peers(ctx context.Context, opts ...caopts.PubSubPeersOptio return nil, err } - peers := api.node.PubSub.ListPeers(settings.Topic) + peers := api.pubSub.ListPeers(settings.Topic) out := make([]peer.ID, len(peers)) for i, peer := range peers { @@ -57,26 +59,28 @@ func (api *PubSubAPI) Peers(ctx context.Context, opts ...caopts.PubSubPeersOptio } func (api *PubSubAPI) Publish(ctx context.Context, topic string, data []byte) error { - if err := api.checkNode(); err != nil { + _, err := api.checkNode() + if err != nil { return err } - return api.node.PubSub.Publish(topic, data) + return api.pubSub.Publish(topic, data) } func (api *PubSubAPI) Subscribe(ctx context.Context, topic string, opts ...caopts.PubSubSubscribeOption) (coreiface.PubSubSubscription, error) { options, err := caopts.PubSubSubscribeOptions(opts...) - if err := api.checkNode(); err != nil { + r, err := api.checkNode() + if err != nil { return nil, err } - sub, err := api.node.PubSub.Subscribe(topic) + sub, err := api.pubSub.Subscribe(topic) if err != nil { return nil, err } - pubctx, cancel := context.WithCancel(api.node.Context()) + pubctx, cancel := context.WithCancel(api.nctx) if options.Discover { go func() { @@ -86,18 +90,18 @@ func (api *PubSubAPI) Subscribe(ctx context.Context, topic string, opts ...caopt return } - connectToPubSubPeers(pubctx, api.node, blk.Path().Cid()) + connectToPubSubPeers(pubctx, r, api.peerHost, blk.Path().Cid()) }() } return &pubSubSubscription{cancel, sub}, nil } -func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) { +func connectToPubSubPeers(ctx context.Context, r routing.IpfsRouting, ph p2phost.Host, cid cid.Cid) { ctx, cancel := context.WithCancel(ctx) defer cancel() - provs := n.Routing.FindProvidersAsync(ctx, cid, 10) + provs := r.FindProvidersAsync(ctx, cid, 10) var wg sync.WaitGroup for p := range provs { wg.Add(1) @@ -105,7 +109,7 @@ func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) { defer wg.Done() ctx, cancel := context.WithTimeout(ctx, time.Second*10) defer cancel() - err := n.PeerHost.Connect(ctx, pi) + err := ph.Connect(ctx, pi) if err != nil { log.Info("pubsub discover: ", err) return @@ -117,16 +121,17 @@ func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) { wg.Wait() } -func (api *PubSubAPI) checkNode() error { - if !api.node.OnlineMode() { - return coreiface.ErrOffline +func (api *PubSubAPI) checkNode() (routing.IpfsRouting, error) { + if api.pubSub == nil { + return nil, errors.New("experimental pubsub feature not enabled. Run daemon with --enable-pubsub-experiment to use.") } - if api.node.PubSub == nil { - return errors.New("experimental pubsub feature not enabled. Run daemon with --enable-pubsub-experiment to use.") + err := api.checkOnline(false) + if err != nil { + return nil, err } - return nil + return api.routing, nil } func (sub *pubSubSubscription) Close() error { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/swarm.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/swarm.go index a6088df7d7..9243f3cdc1 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/swarm.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/swarm.go @@ -5,25 +5,23 @@ import ( "sort" "time" - core "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - swarm "gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - iaddr "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr" + swarm "gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + iaddr "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr" ) type SwarmAPI CoreAPI type connInfo struct { - node *core.IpfsNode - conn net.Conn - dir net.Direction + peerstore pstore.Peerstore + conn net.Conn + dir net.Direction addr ma.Multiaddr peer peer.ID @@ -31,19 +29,19 @@ type connInfo struct { } func (api *SwarmAPI) Connect(ctx context.Context, pi pstore.PeerInfo) error { - if api.node.PeerHost == nil { + if api.peerHost == nil { return coreiface.ErrOffline } - if swrm, ok := api.node.PeerHost.Network().(*swarm.Swarm); ok { + if swrm, ok := api.peerHost.Network().(*swarm.Swarm); ok { swrm.Backoff().Clear(pi.ID) } - return api.node.PeerHost.Connect(ctx, pi) + return api.peerHost.Connect(ctx, pi) } func (api *SwarmAPI) Disconnect(ctx context.Context, addr ma.Multiaddr) error { - if api.node.PeerHost == nil { + if api.peerHost == nil { return coreiface.ErrOffline } @@ -54,7 +52,7 @@ func (api *SwarmAPI) Disconnect(ctx context.Context, addr ma.Multiaddr) error { taddr := ia.Transport() id := ia.ID() - net := api.node.PeerHost.Network() + net := api.peerHost.Network() if taddr == nil { if net.Connectedness(id) != inet.Connected { @@ -78,12 +76,12 @@ func (api *SwarmAPI) Disconnect(ctx context.Context, addr ma.Multiaddr) error { } func (api *SwarmAPI) KnownAddrs(context.Context) (map[peer.ID][]ma.Multiaddr, error) { - if api.node.PeerHost == nil { + if api.peerHost == nil { return nil, coreiface.ErrOffline } addrs := make(map[peer.ID][]ma.Multiaddr) - ps := api.node.PeerHost.Network().Peerstore() + ps := api.peerHost.Network().Peerstore() for _, p := range ps.Peers() { for _, a := range ps.Addrs(p) { addrs[p] = append(addrs[p], a) @@ -97,27 +95,27 @@ func (api *SwarmAPI) KnownAddrs(context.Context) (map[peer.ID][]ma.Multiaddr, er } func (api *SwarmAPI) LocalAddrs(context.Context) ([]ma.Multiaddr, error) { - if api.node.PeerHost == nil { + if api.peerHost == nil { return nil, coreiface.ErrOffline } - return api.node.PeerHost.Addrs(), nil + return api.peerHost.Addrs(), nil } func (api *SwarmAPI) ListenAddrs(context.Context) ([]ma.Multiaddr, error) { - if api.node.PeerHost == nil { + if api.peerHost == nil { return nil, coreiface.ErrOffline } - return api.node.PeerHost.Network().InterfaceListenAddresses() + return api.peerHost.Network().InterfaceListenAddresses() } func (api *SwarmAPI) Peers(context.Context) ([]coreiface.ConnectionInfo, error) { - if api.node.PeerHost == nil { + if api.peerHost == nil { return nil, coreiface.ErrOffline } - conns := api.node.PeerHost.Network().Conns() + conns := api.peerHost.Network().Conns() var out []coreiface.ConnectionInfo for _, c := range conns { @@ -125,9 +123,9 @@ func (api *SwarmAPI) Peers(context.Context) ([]coreiface.ConnectionInfo, error) addr := c.RemoteMultiaddr() ci := &connInfo{ - node: api.node, - conn: c, - dir: c.Stat().Direction, + peerstore: api.peerstore, + conn: c, + dir: c.Stat().Direction, addr: addr, peer: pid, @@ -160,7 +158,7 @@ func (ci *connInfo) Direction() net.Direction { } func (ci *connInfo) Latency() (time.Duration, error) { - return ci.node.Peerstore.LatencyEWMA(peer.ID(ci.ID())), nil + return ci.peerstore.LatencyEWMA(peer.ID(ci.ID())), nil } func (ci *connInfo) Streams() ([]protocol.ID, error) { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfile.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfile.go deleted file mode 100644 index ce4dbb3579..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfile.go +++ /dev/null @@ -1,200 +0,0 @@ -package coreapi - -import ( - "context" - "errors" - "io" - "os" - gopath "path" - "time" - - "github.com/ipfs/go-ipfs/core/coreapi/interface" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" -) - -// Number to file to prefetch in directories -// TODO: should we allow setting this via context hint? -const prefetchFiles = 4 - -// TODO: this probably belongs in go-unixfs (and could probably replace a chunk of it's interface in the long run) - -type sizeInfo struct { - size int64 - name string - modTime time.Time -} - -func (s *sizeInfo) Name() string { - return s.name -} - -func (s *sizeInfo) Size() int64 { - return s.size -} - -func (s *sizeInfo) Mode() os.FileMode { - return 0444 // all read -} - -func (s *sizeInfo) ModTime() time.Time { - return s.modTime -} - -func (s *sizeInfo) IsDir() bool { - return false -} - -func (s *sizeInfo) Sys() interface{} { - return nil -} - -type ufsDirectory struct { - ctx context.Context - dserv ipld.DAGService - - files chan *ipld.Link - - name string - path string -} - -func (d *ufsDirectory) Close() error { - return files.ErrNotReader -} - -func (d *ufsDirectory) Read(_ []byte) (int, error) { - return 0, files.ErrNotReader -} - -func (d *ufsDirectory) FileName() string { - return d.name -} - -func (d *ufsDirectory) FullPath() string { - return d.path -} - -func (d *ufsDirectory) IsDirectory() bool { - return true -} - -func (d *ufsDirectory) NextFile() (files.File, error) { - l, ok := <-d.files - if !ok { - return nil, io.EOF - } - - nd, err := l.GetNode(d.ctx, d.dserv) - if err != nil { - return nil, err - } - - return newUnixfsFile(d.ctx, d.dserv, nd, l.Name, d) -} - -func (d *ufsDirectory) Size() (int64, error) { - return 0, files.ErrNotReader -} - -func (d *ufsDirectory) Seek(offset int64, whence int) (int64, error) { - return 0, files.ErrNotReader -} - -type ufsFile struct { - uio.DagReader - - name string - path string -} - -func (f *ufsFile) IsDirectory() bool { - return false -} - -func (f *ufsFile) NextFile() (files.File, error) { - return nil, files.ErrNotDirectory -} - -func (f *ufsFile) FileName() string { - return f.name -} - -func (f *ufsFile) FullPath() string { - return f.path -} - -func (f *ufsFile) Size() (int64, error) { - return int64(f.DagReader.Size()), nil -} - -func newUnixfsDir(ctx context.Context, dserv ipld.DAGService, nd ipld.Node, name string, path string) (iface.UnixfsFile, error) { - dir, err := uio.NewDirectoryFromNode(dserv, nd) - if err != nil { - return nil, err - } - - fileCh := make(chan *ipld.Link, prefetchFiles) - go func() { - dir.ForEachLink(ctx, func(link *ipld.Link) error { - select { - case fileCh <- link: - case <-ctx.Done(): - return ctx.Err() - } - return nil - }) - - close(fileCh) - }() - - return &ufsDirectory{ - ctx: ctx, - dserv: dserv, - - files: fileCh, - - name: name, - path: path, - }, nil -} - -func newUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node, name string, parent files.File) (iface.UnixfsFile, error) { - path := name - if parent != nil { - path = gopath.Join(parent.FullPath(), name) - } - - switch dn := nd.(type) { - case *dag.ProtoNode: - fsn, err := ft.FSNodeFromBytes(dn.Data()) - if err != nil { - return nil, err - } - if fsn.IsDir() { - return newUnixfsDir(ctx, dserv, nd, name, path) - } - - case *dag.RawNode: - default: - return nil, errors.New("unknown node type") - } - - dr, err := uio.NewDagReader(ctx, nd, dserv) - if err != nil { - return nil, err - } - - return &ufsFile{ - DagReader: dr, - - name: name, - path: path, - }, nil -} - -var _ os.FileInfo = &sizeInfo{} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfs.go b/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfs.go index 00d2f38b7f..6356aeaa87 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfs.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreapi/unixfs.go @@ -7,36 +7,36 @@ import ( "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/filestore" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - "github.com/ipfs/go-ipfs/core/coreapi/interface/options" "github.com/ipfs/go-ipfs/core/coreunix" - cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - dagtest "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/test" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - blockservice "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + merkledag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + dagtest "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/test" + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blockservice "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mfs "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + unixfile "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/file" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" + cidutil "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil" ) type UnixfsAPI CoreAPI // Add builds a merkledag node from a reader, adds it to the blockstore, // and returns the key representing that node. -func (api *UnixfsAPI) Add(ctx context.Context, files files.File, opts ...options.UnixfsAddOption) (coreiface.ResolvedPath, error) { +func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options.UnixfsAddOption) (coreiface.ResolvedPath, error) { settings, prefix, err := options.UnixfsAddOptions(opts...) if err != nil { return nil, err } - n := api.node - - cfg, err := n.Repo.Config() + cfg, err := api.repo.Config() if err != nil { return nil, err } @@ -53,6 +53,13 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.File, opts ...options return nil, filestore.ErrFilestoreNotEnabled } + addblockstore := api.blockstore + if !(settings.FsCache || settings.NoCopy) { + addblockstore = bstore.NewGCBlockstore(api.baseBlocks, api.blockstore) + } + exch := api.exchange + pinning := api.pinning + if settings.OnlyHash { nilnode, err := core.NewNode(ctx, &core.BuildCfg{ //TODO: need this to be true or all files @@ -62,23 +69,15 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.File, opts ...options if err != nil { return nil, err } - n = nilnode - } - - addblockstore := n.Blockstore - if !(settings.FsCache || settings.NoCopy) { - addblockstore = bstore.NewGCBlockstore(n.BaseBlocks, n.GCLocker) - } - - exch := n.Exchange - if settings.Local { - exch = offline.Exchange(addblockstore) + addblockstore = nilnode.Blockstore + exch = nilnode.Exchange + pinning = nilnode.Pinning } bserv := blockservice.New(addblockstore, exch) // hash security 001 dserv := dag.NewDAGService(bserv) - fileAdder, err := coreunix.NewAdder(ctx, n.Pinning, n.Blockstore, dserv) + fileAdder, err := coreunix.NewAdder(ctx, pinning, addblockstore, dserv) if err != nil { return nil, err } @@ -133,7 +132,7 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.File, opts ...options return coreiface.IpfsPath(nd.Cid()), nil } -func (api *UnixfsAPI) Get(ctx context.Context, p coreiface.Path) (coreiface.UnixfsFile, error) { +func (api *UnixfsAPI) Get(ctx context.Context, p coreiface.Path) (files.Node, error) { ses := api.core().getSession(ctx) nd, err := ses.ResolveNode(ctx, p) @@ -141,36 +140,100 @@ func (api *UnixfsAPI) Get(ctx context.Context, p coreiface.Path) (coreiface.Unix return nil, err } - return newUnixfsFile(ctx, ses.dag, nd, "", nil) + return unixfile.NewUnixfsFile(ctx, ses.dag, nd) } // Ls returns the contents of an IPFS or IPNS object(s) at path p, with the format: // ` ` -func (api *UnixfsAPI) Ls(ctx context.Context, p coreiface.Path) ([]*ipld.Link, error) { - dagnode, err := api.core().ResolveNode(ctx, p) +func (api *UnixfsAPI) Ls(ctx context.Context, p coreiface.Path, opts ...options.UnixfsLsOption) (<-chan coreiface.LsLink, error) { + settings, err := options.UnixfsLsOptions(opts...) + if err != nil { + return nil, err + } + + ses := api.core().getSession(ctx) + uses := (*UnixfsAPI)(ses) + + dagnode, err := ses.ResolveNode(ctx, p) + if err != nil { + return nil, err + } + + dir, err := uio.NewDirectoryFromNode(ses.dag, dagnode) + if err == uio.ErrNotADir { + return uses.lsFromLinks(ctx, dagnode.Links(), settings) + } if err != nil { return nil, err } - var ndlinks []*ipld.Link - dir, err := uio.NewDirectoryFromNode(api.dag, dagnode) - switch err { - case nil: - l, err := dir.Links(ctx) + return uses.lsFromLinksAsync(ctx, dir, settings) +} + +func (api *UnixfsAPI) processLink(ctx context.Context, linkres ft.LinkResult, settings *options.UnixfsLsSettings) coreiface.LsLink { + lnk := coreiface.LsLink{ + Link: linkres.Link, + Err: linkres.Err, + } + if lnk.Err != nil { + return lnk + } + + switch lnk.Link.Cid.Type() { + case cid.Raw: + // No need to check with raw leaves + lnk.Type = coreiface.TFile + lnk.Size = lnk.Link.Size + case cid.DagProtobuf: + if !settings.ResolveChildren { + break + } + + linkNode, err := lnk.Link.GetNode(ctx, api.dag) if err != nil { - return nil, err + lnk.Err = err + break + } + + if pn, ok := linkNode.(*merkledag.ProtoNode); ok { + d, err := ft.FSNodeFromBytes(pn.Data()) + if err != nil { + lnk.Err = err + break + } + lnk.Type = coreiface.FileType(d.Type()) + lnk.Size = d.FileSize() } - ndlinks = l - case uio.ErrNotADir: - ndlinks = dagnode.Links() - default: - return nil, err } - links := make([]*ipld.Link, len(ndlinks)) - for i, l := range ndlinks { - links[i] = &ipld.Link{Name: l.Name, Size: l.Size, Cid: l.Cid} + return lnk +} + +func (api *UnixfsAPI) lsFromLinksAsync(ctx context.Context, dir uio.Directory, settings *options.UnixfsLsSettings) (<-chan coreiface.LsLink, error) { + out := make(chan coreiface.LsLink) + + go func() { + defer close(out) + for l := range dir.EnumLinksAsync(ctx) { + select { + case out <- api.processLink(ctx, l, settings): //TODO: perf: processing can be done in background and in parallel + case <-ctx.Done(): + return + } + } + }() + + return out, nil +} + +func (api *UnixfsAPI) lsFromLinks(ctx context.Context, ndlinks []*ipld.Link, settings *options.UnixfsLsSettings) (<-chan coreiface.LsLink, error) { + links := make(chan coreiface.LsLink, len(ndlinks)) + for _, l := range ndlinks { + lr := ft.LinkResult{Link: &ipld.Link{Name: l.Name, Size: l.Size, Cid: l.Cid}} + + links <- api.processLink(ctx, lr, settings) //TODO: can be parallel if settings.Async } + close(links) return links, nil } diff --git a/vendor/github.com/ipfs/go-ipfs/core/coredag/cbor.go b/vendor/github.com/ipfs/go-ipfs/core/coredag/cbor.go index 041a5345c5..199bd8ffc6 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coredag/cbor.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coredag/cbor.go @@ -4,8 +4,8 @@ import ( "io" "io/ioutil" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - ipldcbor "gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor" + ipldcbor "gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) func cborJSONParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coredag/dagpb.go b/vendor/github.com/ipfs/go-ipfs/core/coredag/dagpb.go index 8f4cc893a9..19a84642d6 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coredag/dagpb.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coredag/dagpb.go @@ -5,11 +5,11 @@ import ( "io/ioutil" "math" - "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) func dagpbJSONParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/vendor/github.com/ipfs/go-ipfs/core/coredag/dagtransl.go b/vendor/github.com/ipfs/go-ipfs/core/coredag/dagtransl.go index 1636236d26..5ea4a9ff9c 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coredag/dagtransl.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coredag/dagtransl.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // DagParser is function used for parsing stream into Node diff --git a/vendor/github.com/ipfs/go-ipfs/core/coredag/raw.go b/vendor/github.com/ipfs/go-ipfs/core/coredag/raw.go index 60973c7689..3f8161f790 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coredag/raw.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coredag/raw.go @@ -5,12 +5,12 @@ import ( "io/ioutil" "math" - "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - block "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + block "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) func rawRawParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/commands.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/commands.go index 017f5bb81b..d05a7bcba3 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/commands.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/commands.go @@ -14,10 +14,10 @@ import ( "github.com/ipfs/go-ipfs/core" corecommands "github.com/ipfs/go-ipfs/core/commands" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - cmdsHttp "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + cmdsHttp "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" ) var ( @@ -67,12 +67,18 @@ func addHeadersFromConfig(c *cmdsHttp.ServerConfig, nc *config.Config) { } } - c.Headers = make(map[string][]string, len(nc.API.HTTPHeaders)) + c.Headers = make(map[string][]string, len(nc.API.HTTPHeaders)+1) // Copy these because the config is shared and this function is called // in multiple places concurrently. Updating these in-place *is* racy. for h, v := range nc.API.HTTPHeaders { - c.Headers[h] = v + h = http.CanonicalHeaderKey(h) + switch h { + case cmdsHttp.ACAOrigin, cmdsHttp.ACAMethods, cmdsHttp.ACACredentials: + // these are handled by the CORs library. + default: + c.Headers[h] = v + } } c.Headers["Server"] = []string{"go-ipfs/" + version.CurrentVersionNumber} } diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/corehttp.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/corehttp.go index 81faa05277..0cb9ab92eb 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/corehttp.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/corehttp.go @@ -13,9 +13,9 @@ import ( "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" core "github.com/ipfs/go-ipfs/core" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway.go index 9da8728f54..88d8bf447f 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway.go @@ -4,12 +4,14 @@ import ( "fmt" "net" "net/http" + "sort" version "github.com/ipfs/go-ipfs" core "github.com/ipfs/go-ipfs/core" coreapi "github.com/ipfs/go-ipfs/core/coreapi" - id "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify" + id "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" ) type GatewayConfig struct { @@ -18,6 +20,26 @@ type GatewayConfig struct { PathPrefixes []string } +// A helper function to clean up a set of headers: +// 1. Canonicalizes. +// 2. Deduplicates. +// 3. Sorts. +func cleanHeaderSet(headers []string) []string { + // Deduplicate and canonicalize. + m := make(map[string]struct{}, len(headers)) + for _, h := range headers { + m[http.CanonicalHeaderKey(h)] = struct{}{} + } + result := make([]string, 0, len(m)) + for k := range m { + result = append(result, k) + } + + // Sort + sort.Strings(result) + return result +} + func GatewayOption(writable bool, paths ...string) ServeOption { return func(n *core.IpfsNode, _ net.Listener, mux *http.ServeMux) (*http.ServeMux, error) { cfg, err := n.Repo.Config() @@ -25,11 +47,51 @@ func GatewayOption(writable bool, paths ...string) ServeOption { return nil, err } + api, err := coreapi.NewCoreAPI(n, options.Api.FetchBlocks(!cfg.Gateway.NoFetch)) + if err != nil { + return nil, err + } + + headers := make(map[string][]string, len(cfg.Gateway.HTTPHeaders)) + for h, v := range cfg.Gateway.HTTPHeaders { + headers[http.CanonicalHeaderKey(h)] = v + } + + // Hard-coded headers. + const ACAHeadersName = "Access-Control-Allow-Headers" + const ACEHeadersName = "Access-Control-Expose-Headers" + const ACAOriginName = "Access-Control-Allow-Origin" + const ACAMethodsName = "Access-Control-Allow-Methods" + + if _, ok := headers[ACAOriginName]; !ok { + // Default to *all* + headers[ACAOriginName] = []string{"*"} + } + if _, ok := headers[ACAMethodsName]; !ok { + // Default to GET + headers[ACAMethodsName] = []string{"GET"} + } + + headers[ACAHeadersName] = cleanHeaderSet( + append([]string{ + "Content-Type", + "User-Agent", + "Range", + "X-Requested-With", + }, headers[ACAHeadersName]...)) + + headers[ACEHeadersName] = cleanHeaderSet( + append([]string{ + "Content-Range", + "X-Chunked-Output", + "X-Stream-Output", + }, headers[ACEHeadersName]...)) + gateway := newGatewayHandler(n, GatewayConfig{ - Headers: cfg.Gateway.HTTPHeaders, + Headers: headers, Writable: writable, PathPrefixes: cfg.Gateway.PathPrefixes, - }, coreapi.NewCoreAPI(n)) + }, api) for _, p := range paths { mux.Handle(p+"/", gateway) diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go index 210058d48f..1c3675e6b8 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go @@ -5,32 +5,29 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net/http" "net/url" - "os" gopath "path" "runtime/debug" "strings" "time" - core "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" + "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/dagutils" - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - resolver "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - multibase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver" + "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer" + "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" ) const ( @@ -64,23 +61,11 @@ func (i *gatewayHandler) newDagFromReader(r io.Reader) (ipld.Node, error) { chunker.DefaultSplitter(r)) } -// TODO(btc): break this apart into separate handlers using a more expressive muxer func (i *gatewayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - ctx, cancel := context.WithTimeout(i.node.Context(), time.Hour) // the hour is a hard fallback, we don't expect it to happen, but just in case + ctx, cancel := context.WithTimeout(r.Context(), time.Hour) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - clientGone := cn.CloseNotify() - go func() { - select { - case <-clientGone: - case <-ctx.Done(): - } - cancel() - }() - } - defer func() { if r := recover(); r != nil { log.Error("A panic occurred in the gateway handler!") @@ -184,10 +169,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr return } - dir := dr.IsDirectory() - if !dir { - defer dr.Close() - } + defer dr.Close() // Check etag send back to us etag := "\"" + resolvedPath.Cid().String() + "\"" @@ -200,19 +182,6 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr w.Header().Set("X-IPFS-Path", urlPath) w.Header().Set("Etag", etag) - // set 'allowed' headers - // & expose those headers - var allowedHeadersArr = []string{ - "Content-Range", - "X-Chunked-Output", - "X-Stream-Output", - } - - var allowedHeaders = strings.Join(allowedHeadersArr, ", ") - - w.Header().Set("Access-Control-Allow-Headers", allowedHeaders) - w.Header().Set("Access-Control-Expose-Headers", allowedHeaders) - // Suborigin header, sandboxes apps from each other in the browser (even // though they are served from the same gateway domain). // @@ -252,14 +221,14 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr // TODO: break this out when we split /ipfs /ipns routes. modtime := time.Now() - if strings.HasPrefix(urlPath, ipfsPathPrefix) && !dir { - w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") + if f, ok := dr.(files.File); ok { + if strings.HasPrefix(urlPath, ipfsPathPrefix) { + w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") - // set modtime to a really long time ago, since files are immutable and should stay cached - modtime = time.Unix(1, 0) - } + // set modtime to a really long time ago, since files are immutable and should stay cached + modtime = time.Unix(1, 0) + } - if !dir { urlFilename := r.URL.Query().Get("filename") var name string if urlFilename != "" { @@ -268,25 +237,18 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr } else { name = getFilename(urlPath) } - i.serveFile(w, r, name, modtime, dr) + i.serveFile(w, r, name, modtime, f) return } - - nd, err := i.api.ResolveNode(ctx, resolvedPath) - if err != nil { - internalWebError(w, err) - return - } - - dirr, err := uio.NewDirectoryFromNode(i.node.DAG, nd) - if err != nil { - internalWebError(w, err) + dir, ok := dr.(files.Directory) + if !ok { + internalWebError(w, fmt.Errorf("unsupported file type")) return } - ixnd, err := dirr.Find(ctx, "index.html") - switch { - case err == nil: + idx, err := i.api.Unixfs().Get(ctx, coreiface.Join(resolvedPath, "index.html")) + switch err.(type) { + case nil: dirwithoutslash := urlPath[len(urlPath)-1] != '/' goget := r.URL.Query().Get("go-get") == "1" if dirwithoutslash && !goget { @@ -295,20 +257,20 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr return } - dr, err := i.api.Unixfs().Get(ctx, coreiface.IpfsPath(ixnd.Cid())) - if err != nil { - internalWebError(w, err) + f, ok := idx.(files.File) + if !ok { + internalWebError(w, files.ErrNotReader) return } - defer dr.Close() // write to request - http.ServeContent(w, r, "index.html", modtime, dr) + http.ServeContent(w, r, "index.html", modtime, f) return + case resolver.ErrNoLink: + // no index.html; noop default: internalWebError(w, err) return - case os.IsNotExist(err): } if r.Method == "HEAD" { @@ -317,12 +279,22 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr // storage for directory listing var dirListing []directoryItem - dirr.ForEachLink(ctx, func(link *ipld.Link) error { + dirit := dir.Entries() + for dirit.Next() { // See comment above where originalUrlPath is declared. - di := directoryItem{humanize.Bytes(link.Size), link.Name, gopath.Join(originalUrlPath, link.Name)} + s, err := dirit.Node().Size() + if err != nil { + internalWebError(w, err) + return + } + + di := directoryItem{humanize.Bytes(uint64(s)), dirit.Name(), gopath.Join(originalUrlPath, dirit.Name())} dirListing = append(dirListing, di) - return nil - }) + } + if dirit.Err() != nil { + internalWebError(w, dirit.Err()) + return + } // construct the correct back link // https://github.com/ipfs/go-ipfs/issues/1365 @@ -356,11 +328,17 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr } } + var hash string + if !strings.HasPrefix(originalUrlPath, ipfsPathPrefix) { + hash = resolvedPath.Cid().String() + } + // See comment above where originalUrlPath is declared. tplData := listingTemplateData{ Listing: dirListing, Path: originalUrlPath, BackLink: backLink, + Hash: hash, } err = listingTemplate.Execute(w, tplData) if err != nil { @@ -398,7 +376,7 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam } func (i *gatewayHandler) postHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) { - p, err := i.api.Unixfs().Add(ctx, files.NewReaderFile("", "", ioutil.NopCloser(r.Body), nil)) + p, err := i.api.Unixfs().Add(ctx, files.NewReaderFile(r.Body)) if err != nil { internalWebError(w, err) return diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_indexPage.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_indexPage.go index dbcdca708f..5575baea45 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_indexPage.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/gateway_indexPage.go @@ -14,6 +14,7 @@ type listingTemplateData struct { Listing []directoryItem Path string BackLink string + Hash string } type directoryItem struct { diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/ipns_hostname.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/ipns_hostname.go index 346acc6c3e..9b706dec81 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/ipns_hostname.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/ipns_hostname.go @@ -8,8 +8,8 @@ import ( core "github.com/ipfs/go-ipfs/core" namesys "github.com/ipfs/go-ipfs/namesys" - nsopts "github.com/ipfs/go-ipfs/namesys/opts" + nsopts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" isd "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/logs.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/logs.go index 37fcecf120..44fa848cc4 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/logs.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/logs.go @@ -5,7 +5,7 @@ import ( "net" "net/http" - lwriter "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" + lwriter "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" core "github.com/ipfs/go-ipfs/core" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/proxy.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/proxy.go new file mode 100644 index 0000000000..63f397cbf3 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/proxy.go @@ -0,0 +1,79 @@ +package corehttp + +import ( + "fmt" + "net" + "net/http" + "net/http/httputil" + "net/url" + "strings" + + core "github.com/ipfs/go-ipfs/core" + + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + p2phttp "gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http" +) + +// ProxyOption is an endpoint for proxying a HTTP request to another ipfs peer +func ProxyOption() ServeOption { + return func(ipfsNode *core.IpfsNode, _ net.Listener, mux *http.ServeMux) (*http.ServeMux, error) { + mux.HandleFunc("/p2p/", func(w http.ResponseWriter, request *http.Request) { + // parse request + parsedRequest, err := parseRequest(request) + if err != nil { + handleError(w, "failed to parse request", err, 400) + return + } + + request.Host = "" // Let URL's Host take precedence. + request.URL.Path = parsedRequest.httpPath + target, err := url.Parse(fmt.Sprintf("libp2p://%s", parsedRequest.target)) + if err != nil { + handleError(w, "failed to parse url", err, 400) + return + } + + rt := p2phttp.NewTransport(ipfsNode.PeerHost, p2phttp.ProtocolOption(parsedRequest.name)) + proxy := httputil.NewSingleHostReverseProxy(target) + proxy.Transport = rt + proxy.ServeHTTP(w, request) + }) + return mux, nil + } +} + +type proxyRequest struct { + target string + name protocol.ID + httpPath string // path to send to the proxy-host +} + +// from the url path parse the peer-ID, name and http path +// /p2p/$peer_id/http/$http_path +// or +// /p2p/$peer_id/x/$protocol/http/$http_path +func parseRequest(request *http.Request) (*proxyRequest, error) { + path := request.URL.Path + + split := strings.SplitN(path, "/", 5) + if len(split) < 5 { + return nil, fmt.Errorf("Invalid request path '%s'", path) + } + + if split[3] == "http" { + return &proxyRequest{split[2], protocol.ID("/http"), split[4]}, nil + } + + split = strings.SplitN(path, "/", 7) + if split[3] != "x" || split[5] != "http" { + return nil, fmt.Errorf("Invalid request path '%s'", path) + } + + return &proxyRequest{split[2], protocol.ID("/x/" + split[4] + "/http"), split[6]}, nil +} + +func handleError(w http.ResponseWriter, msg string, err error, code int) { + w.WriteHeader(code) + fmt.Fprintf(w, "%s: %s\n", msg, err) + log.Warningf("http proxy error: %s: %s", err) +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/corehttp/webui.go b/vendor/github.com/ipfs/go-ipfs/core/corehttp/webui.go index caa63df66a..d76281984b 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corehttp/webui.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corehttp/webui.go @@ -1,11 +1,14 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/QmSDgpiHco5yXdyVTfhKxr3aiJ82ynz8V14QcGKicM3rVh" +const WebUIPath = "/ipfs/QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ" // this is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/QmenEBWcAk3tN94fSKpKFtUMwty1qNwSYw3DMDFV6cPBXA", + "/ipfs/QmUnXcWZC5Ve21gUseouJsH5mLAyz5JPp8aHsg8qVUUK8e", + "/ipfs/QmSDgpiHco5yXdyVTfhKxr3aiJ82ynz8V14QcGKicM3rVh", "/ipfs/QmRuvWJz1Fc8B9cTsAYANHTXqGmKR9DVfY5nvMD1uA2WQ8", "/ipfs/QmQLXHs7K98JNQdWrBB2cQLJahPhmupbDjRuH1b9ibmwVa", "/ipfs/QmXX7YRpU7nNBKfw75VG7Y1c3GwpSAGHRev67XVPgZFv9R", diff --git a/vendor/github.com/ipfs/go-ipfs/core/corerepo/gc.go b/vendor/github.com/ipfs/go-ipfs/core/corerepo/gc.go index 106c0bae83..7df2a586c4 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corerepo/gc.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corerepo/gc.go @@ -10,10 +10,10 @@ import ( gc "github.com/ipfs/go-ipfs/pin/gc" repo "github.com/ipfs/go-ipfs/repo" - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mfs "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("corerepo") diff --git a/vendor/github.com/ipfs/go-ipfs/core/corerepo/pinning.go b/vendor/github.com/ipfs/go-ipfs/core/corerepo/pinning.go deleted file mode 100644 index c943bf3fd6..0000000000 --- a/vendor/github.com/ipfs/go-ipfs/core/corerepo/pinning.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Package corerepo provides pinning and garbage collection for local -IPFS block services. - -IPFS nodes will keep local copies of any object that have either been -added or requested locally. Not all of these objects are worth -preserving forever though, so the node administrator can pin objects -they want to keep and unpin objects that they don't care about. - -Garbage collection sweeps iterate through the local block store -removing objects that aren't pinned, which frees storage space for new -objects. -*/ -package corerepo - -import ( - "context" - "fmt" - - "github.com/ipfs/go-ipfs/core" - "github.com/ipfs/go-ipfs/core/coreapi/interface" - - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -func Pin(n *core.IpfsNode, api iface.CoreAPI, ctx context.Context, paths []string, recursive bool) ([]cid.Cid, error) { - out := make([]cid.Cid, len(paths)) - - for i, fpath := range paths { - p, err := iface.ParsePath(fpath) - if err != nil { - return nil, err - } - - dagnode, err := api.ResolveNode(ctx, p) - if err != nil { - return nil, fmt.Errorf("pin: %s", err) - } - err = n.Pinning.Pin(ctx, dagnode, recursive) - if err != nil { - return nil, fmt.Errorf("pin: %s", err) - } - out[i] = dagnode.Cid() - } - - err := n.Pinning.Flush() - if err != nil { - return nil, err - } - - return out, nil -} - -func Unpin(n *core.IpfsNode, api iface.CoreAPI, ctx context.Context, paths []string, recursive bool) ([]cid.Cid, error) { - unpinned := make([]cid.Cid, len(paths)) - - for i, p := range paths { - p, err := iface.ParsePath(p) - if err != nil { - return nil, err - } - - k, err := api.ResolvePath(ctx, p) - if err != nil { - return nil, err - } - - err = n.Pinning.Unpin(ctx, k.Cid(), recursive) - if err != nil { - return nil, err - } - unpinned[i] = k.Cid() - } - - err := n.Pinning.Flush() - if err != nil { - return nil, err - } - return unpinned, nil -} diff --git a/vendor/github.com/ipfs/go-ipfs/core/corerepo/stat.go b/vendor/github.com/ipfs/go-ipfs/core/corerepo/stat.go index 28cfef76a0..d25ce28e8a 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/corerepo/stat.go +++ b/vendor/github.com/ipfs/go-ipfs/core/corerepo/stat.go @@ -9,7 +9,7 @@ import ( "github.com/ipfs/go-ipfs/core" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" ) // SizeStat wraps information about the repository size and its limit. diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreunix/add.go b/vendor/github.com/ipfs/go-ipfs/core/coreunix/add.go index f706c00da6..e8f4407ce0 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreunix/add.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreunix/add.go @@ -2,31 +2,29 @@ package coreunix import ( "context" + "errors" "fmt" "io" - "io/ioutil" "os" gopath "path" - "path/filepath" "strconv" - core "github.com/ipfs/go-ipfs/core" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - posinfo "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - unixfs "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - balanced "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/balanced" - ihelper "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/balanced" + ihelper "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers" + "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle" + "gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo" ) var log = logging.Logger("coreunix") @@ -41,20 +39,14 @@ type Link struct { Size uint64 } -type Object struct { - Hash string - Links []Link - Size string -} - // NewAdder Returns a new Adder used for a file add operation. -func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCBlockstore, ds ipld.DAGService) (*Adder, error) { +func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCLocker, ds ipld.DAGService) (*Adder, error) { bufferedDS := ipld.NewBufferedDAG(ctx, ds) return &Adder{ ctx: ctx, pinning: p, - blockstore: bs, + gcLocker: bs, dagService: ds, bufferedDS: bufferedDS, Progress: false, @@ -70,7 +62,7 @@ func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCBlockstore, ds ipld type Adder struct { ctx context.Context pinning pin.Pinner - blockstore bstore.GCBlockstore + gcLocker bstore.GCLocker dagService ipld.DAGService bufferedDS *ipld.BufferedDAG Out chan<- interface{} @@ -129,11 +121,15 @@ func (adder *Adder) add(reader io.Reader) (ipld.Node, error) { CidBuilder: adder.CidBuilder, } + db, err := params.New(chnk) + if err != nil { + return nil, err + } if adder.Trickle { - return trickle.Layout(params.New(chnk)) + return trickle.Layout(db) } - return balanced.Layout(params.New(chnk)) + return balanced.Layout(db) } // RootNode returns the root node of the Added. @@ -278,91 +274,6 @@ func (adder *Adder) outputDirs(path string, fsn mfs.FSNode) error { } } -// Add builds a merkledag node from a reader, adds it to the blockstore, -// and returns the key representing that node. -// If you want to pin it, use NewAdder() and Adder.PinRoot(). -func Add(n *core.IpfsNode, r io.Reader) (string, error) { - return AddWithContext(n.Context(), n, r) -} - -// AddWithContext does the same as Add, but with a custom context. -func AddWithContext(ctx context.Context, n *core.IpfsNode, r io.Reader) (string, error) { - defer n.Blockstore.PinLock().Unlock() - - fileAdder, err := NewAdder(ctx, n.Pinning, n.Blockstore, n.DAG) - if err != nil { - return "", err - } - - node, err := fileAdder.add(r) - if err != nil { - return "", err - } - - return node.Cid().String(), nil -} - -// AddR recursively adds files in |path|. -func AddR(n *core.IpfsNode, root string) (key string, err error) { - defer n.Blockstore.PinLock().Unlock() - - stat, err := os.Lstat(root) - if err != nil { - return "", err - } - - f, err := files.NewSerialFile(filepath.Base(root), root, false, stat) - if err != nil { - return "", err - } - defer f.Close() - - fileAdder, err := NewAdder(n.Context(), n.Pinning, n.Blockstore, n.DAG) - if err != nil { - return "", err - } - - err = fileAdder.addFile(f) - if err != nil { - return "", err - } - - nd, err := fileAdder.Finalize() - if err != nil { - return "", err - } - - return nd.String(), nil -} - -// AddWrapped adds data from a reader, and wraps it with a directory object -// to preserve the filename. -// Returns the path of the added file ("/filename"), the DAG node of -// the directory, and and error if any. -func AddWrapped(n *core.IpfsNode, r io.Reader, filename string) (string, ipld.Node, error) { - file := files.NewReaderFile(filename, filename, ioutil.NopCloser(r), nil) - fileAdder, err := NewAdder(n.Context(), n.Pinning, n.Blockstore, n.DAG) - if err != nil { - return "", nil, err - } - fileAdder.Wrap = true - - defer n.Blockstore.PinLock().Unlock() - - err = fileAdder.addFile(file) - if err != nil { - return "", nil, err - } - - dagnode, err := fileAdder.Finalize() - if err != nil { - return "", nil, err - } - - c := dagnode.Cid() - return gopath.Join(c.String(), filename), dagnode, nil -} - func (adder *Adder) addNode(node ipld.Node, path string) error { // patch it into the root if path == "" { @@ -400,9 +311,9 @@ func (adder *Adder) addNode(node ipld.Node, path string) error { } // AddAllAndPin adds the given request's files and pin them. -func (adder *Adder) AddAllAndPin(file files.File) (ipld.Node, error) { +func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error) { if adder.Pin { - adder.unlocker = adder.blockstore.PinLock() + adder.unlocker = adder.gcLocker.PinLock() } defer func() { if adder.unlocker != nil { @@ -410,26 +321,23 @@ func (adder *Adder) AddAllAndPin(file files.File) (ipld.Node, error) { } }() - switch { - case file.IsDirectory(): + switch tf := file.(type) { + case files.Directory: // Iterate over each top-level file and add individually. Otherwise the // single files.File f is treated as a directory, affecting hidden file // semantics. - for { - f, err := file.NextFile() - if err == io.EOF { - // Finished the list of files. - break - } else if err != nil { - return nil, err - } - if err := adder.addFile(f); err != nil { + it := tf.Entries() + for it.Next() { + if err := adder.addFileNode(it.Name(), it.Node()); err != nil { return nil, err } } + if it.Err() != nil { + return nil, it.Err() + } break default: - if err := adder.addFile(file); err != nil { + if err := adder.addFileNode("", file); err != nil { return nil, err } break @@ -447,7 +355,8 @@ func (adder *Adder) AddAllAndPin(file files.File) (ipld.Node, error) { return nd, adder.PinRoot() } -func (adder *Adder) addFile(file files.File) error { +func (adder *Adder) addFileNode(path string, file files.Node) error { + defer file.Close() err := adder.maybePauseForGC() if err != nil { return err @@ -467,33 +376,40 @@ func (adder *Adder) addFile(file files.File) error { } adder.liveNodes++ - if file.IsDirectory() { - return adder.addDir(file) + switch f := file.(type) { + case files.Directory: + return adder.addDir(path, f) + case *files.Symlink: + return adder.addSymlink(path, f) + case files.File: + return adder.addFile(path, f) + default: + return errors.New("unknown file type") } +} - // case for symlink - if s, ok := file.(*files.Symlink); ok { - sdata, err := unixfs.SymlinkData(s.Target) - if err != nil { - return err - } - - dagnode := dag.NodeWithData(sdata) - dagnode.SetCidBuilder(adder.CidBuilder) - err = adder.dagService.Add(adder.ctx, dagnode) - if err != nil { - return err - } +func (adder *Adder) addSymlink(path string, l *files.Symlink) error { + sdata, err := unixfs.SymlinkData(l.Target) + if err != nil { + return err + } - return adder.addNode(dagnode, s.FileName()) + dagnode := dag.NodeWithData(sdata) + dagnode.SetCidBuilder(adder.CidBuilder) + err = adder.dagService.Add(adder.ctx, dagnode) + if err != nil { + return err } - // case for regular file + return adder.addNode(dagnode, path) +} + +func (adder *Adder) addFile(path string, file files.File) error { // if the progress flag was specified, wrap the file so that we can send // progress updates to the client (over the output channel) var reader io.Reader = file if adder.Progress { - rdr := &progressReader{file: file, out: adder.Out} + rdr := &progressReader{file: reader, path: path, out: adder.Out} if fi, ok := file.(files.FileInfo); ok { reader = &progressReader2{rdr, fi} } else { @@ -506,26 +422,25 @@ func (adder *Adder) addFile(file files.File) error { return err } - addFileName := file.FileName() addFileInfo, ok := file.(files.FileInfo) if ok { if addFileInfo.AbsPath() == os.Stdin.Name() && adder.Name != "" { - addFileName = adder.Name + path = adder.Name adder.Name = "" } } // patch it into the root - return adder.addNode(dagnode, addFileName) + return adder.addNode(dagnode, path) } -func (adder *Adder) addDir(dir files.File) error { - log.Infof("adding directory: %s", dir.FileName()) +func (adder *Adder) addDir(path string, dir files.Directory) error { + log.Infof("adding directory: %s", path) mr, err := adder.mfsRoot() if err != nil { return err } - err = mfs.Mkdir(mr, dir.FileName(), mfs.MkdirOpts{ + err = mfs.Mkdir(mr, path, mfs.MkdirOpts{ Mkparents: true, Flush: false, CidBuilder: adder.CidBuilder, @@ -534,38 +449,33 @@ func (adder *Adder) addDir(dir files.File) error { return err } - for { - file, err := dir.NextFile() - if err != nil && err != io.EOF { - return err - } - if file == nil { - break - } + it := dir.Entries() + for it.Next() { + fpath := gopath.Join(path, it.Name()) // Skip hidden files when adding recursively, unless Hidden is enabled. - if files.IsHidden(file) && !adder.Hidden { - log.Infof("%s is hidden, skipping", file.FileName()) + if files.IsHidden(fpath, it.Node()) && !adder.Hidden { + log.Infof("%s is hidden, skipping", fpath) continue } - err = adder.addFile(file) + err = adder.addFileNode(fpath, it.Node()) if err != nil { return err } } - return nil + return it.Err() } func (adder *Adder) maybePauseForGC() error { - if adder.unlocker != nil && adder.blockstore.GCRequested() { + if adder.unlocker != nil && adder.gcLocker.GCRequested() { err := adder.PinRoot() if err != nil { return err } adder.unlocker.Unlock() - adder.unlocker = adder.blockstore.PinLock() + adder.unlocker = adder.gcLocker.PinLock() } return nil } @@ -582,7 +492,7 @@ func outputDagnode(out chan<- interface{}, name string, dn ipld.Node) error { } out <- &coreiface.AddEvent{ - Hash: o.Hash, + Path: o.Path, Name: name, Size: o.Size, } @@ -591,31 +501,24 @@ func outputDagnode(out chan<- interface{}, name string, dn ipld.Node) error { } // from core/commands/object.go -func getOutput(dagnode ipld.Node) (*Object, error) { +func getOutput(dagnode ipld.Node) (*coreiface.AddEvent, error) { c := dagnode.Cid() s, err := dagnode.Size() if err != nil { return nil, err } - output := &Object{ - Hash: c.String(), - Size: strconv.FormatUint(s, 10), - Links: make([]Link, len(dagnode.Links())), - } - - for i, link := range dagnode.Links() { - output.Links[i] = Link{ - Name: link.Name, - Size: link.Size, - } + output := &coreiface.AddEvent{ + Path: coreiface.IpfsPath(c), + Size: strconv.FormatUint(s, 10), } return output, nil } type progressReader struct { - file files.File + file io.Reader + path string out chan<- interface{} bytes int64 lastProgress int64 @@ -628,7 +531,7 @@ func (i *progressReader) Read(p []byte) (int, error) { if i.bytes-i.lastProgress >= progressReaderIncrement || err == io.EOF { i.lastProgress = i.bytes i.out <- &coreiface.AddEvent{ - Name: i.file.FileName(), + Name: i.path, Bytes: i.bytes, } } @@ -640,3 +543,7 @@ type progressReader2 struct { *progressReader files.FileInfo } + +func (i *progressReader2) Read(p []byte) (int, error) { + return i.progressReader.Read(p) +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreunix/metadata.go b/vendor/github.com/ipfs/go-ipfs/core/coreunix/metadata.go index cf918f55e8..907a700640 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreunix/metadata.go +++ b/vendor/github.com/ipfs/go-ipfs/core/coreunix/metadata.go @@ -1,9 +1,9 @@ package coreunix import ( - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" core "github.com/ipfs/go-ipfs/core" ) diff --git a/vendor/github.com/ipfs/go-ipfs/core/mock/mock.go b/vendor/github.com/ipfs/go-ipfs/core/mock/mock.go index f5f838b83b..539d78b757 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/mock/mock.go +++ b/vendor/github.com/ipfs/go-ipfs/core/mock/mock.go @@ -7,15 +7,15 @@ import ( core "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/repo" - config "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - libp2p "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p" - mocknet "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - datastore "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - syncds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + libp2p "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + mocknet "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock" + config "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" + datastore "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + syncds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + testutil "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) // NewMockNode constructs an IpfsNode for use in tests. diff --git a/vendor/github.com/ipfs/go-ipfs/core/pathresolver.go b/vendor/github.com/ipfs/go-ipfs/core/pathresolver.go index 88f1ece2e7..c67bb73cae 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/pathresolver.go +++ b/vendor/github.com/ipfs/go-ipfs/core/pathresolver.go @@ -7,10 +7,10 @@ import ( namesys "github.com/ipfs/go-ipfs/namesys" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - resolver "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + resolver "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) // ErrNoNamesys is an explicit error for when an IPFS node doesn't diff --git a/vendor/github.com/ipfs/go-ipfs/dagutils/diff.go b/vendor/github.com/ipfs/go-ipfs/dagutils/diff.go index 168b8b6a82..bd5d3a600a 100644 --- a/vendor/github.com/ipfs/go-ipfs/dagutils/diff.go +++ b/vendor/github.com/ipfs/go-ipfs/dagutils/diff.go @@ -5,11 +5,10 @@ import ( "fmt" "path" - coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // These constants define the changes that can be applied to a DAG. diff --git a/vendor/github.com/ipfs/go-ipfs/dagutils/diffenum.go b/vendor/github.com/ipfs/go-ipfs/dagutils/diffenum.go index 5dd1f7cfe8..8ebe30f023 100644 --- a/vendor/github.com/ipfs/go-ipfs/dagutils/diffenum.go +++ b/vendor/github.com/ipfs/go-ipfs/dagutils/diffenum.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // DiffEnumerate fetches every object in the graph pointed to by 'to' that is diff --git a/vendor/github.com/ipfs/go-ipfs/dagutils/utils.go b/vendor/github.com/ipfs/go-ipfs/dagutils/utils.go index 4e9934b2b2..ceba2a9794 100644 --- a/vendor/github.com/ipfs/go-ipfs/dagutils/utils.go +++ b/vendor/github.com/ipfs/go-ipfs/dagutils/utils.go @@ -4,15 +4,15 @@ import ( "context" "errors" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - syncds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + syncds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" ) // Editor represents a ProtoNode tree editor and provides methods to diff --git a/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/providers.go b/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/providers.go index 7465b70e70..a784531068 100644 --- a/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/providers.go +++ b/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/providers.go @@ -5,11 +5,11 @@ import ( pin "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - merkledag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - blocks "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + merkledag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + cidutil "gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil" ) // NewBlockstoreProvider returns key provider using bstore.AllKeysChan diff --git a/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/reprovide.go b/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/reprovide.go index 422688adf3..8ebfc9b908 100644 --- a/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/reprovide.go +++ b/vendor/github.com/ipfs/go-ipfs/exchange/reprovide/reprovide.go @@ -6,10 +6,10 @@ import ( "time" backoff "gx/ipfs/QmPJUtEJsm5YLUWhF6imvyCH8KZXRJa9Wup7FDMwTy5Ufz/backoff" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid" ) var log = logging.Logger("reprovider") diff --git a/vendor/github.com/ipfs/go-ipfs/filestore/filestore.go b/vendor/github.com/ipfs/go-ipfs/filestore/filestore.go index 19f5fd2097..69021b7b7f 100644 --- a/vendor/github.com/ipfs/go-ipfs/filestore/filestore.go +++ b/vendor/github.com/ipfs/go-ipfs/filestore/filestore.go @@ -11,12 +11,12 @@ import ( "context" "errors" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - posinfo "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + posinfo "gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo" ) var log = logging.Logger("filestore") diff --git a/vendor/github.com/ipfs/go-ipfs/filestore/fsrefstore.go b/vendor/github.com/ipfs/go-ipfs/filestore/fsrefstore.go index 74b0131b81..190061017f 100644 --- a/vendor/github.com/ipfs/go-ipfs/filestore/fsrefstore.go +++ b/vendor/github.com/ipfs/go-ipfs/filestore/fsrefstore.go @@ -10,15 +10,15 @@ import ( pb "github.com/ipfs/go-ipfs/filestore/pb" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - posinfo "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsns "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsns "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + dshelp "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + posinfo "gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo" ) // FilestorePrefix identifies the key prefix for FileManager blocks. diff --git a/vendor/github.com/ipfs/go-ipfs/filestore/pb/dataobj.pb.go b/vendor/github.com/ipfs/go-ipfs/filestore/pb/dataobj.pb.go index 6046acbd62..cf1da15133 100644 --- a/vendor/github.com/ipfs/go-ipfs/filestore/pb/dataobj.pb.go +++ b/vendor/github.com/ipfs/go-ipfs/filestore/pb/dataobj.pb.go @@ -3,11 +3,12 @@ package datastore_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -21,18 +22,16 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type DataObj struct { - FilePath string `protobuf:"bytes,1,opt,name=FilePath" json:"FilePath"` - Offset uint64 `protobuf:"varint,2,opt,name=Offset" json:"Offset"` - Size_ uint64 `protobuf:"varint,3,opt,name=Size" json:"Size"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + FilePath string `protobuf:"bytes,1,opt,name=FilePath" json:"FilePath"` + Offset uint64 `protobuf:"varint,2,opt,name=Offset" json:"Offset"` + Size_ uint64 `protobuf:"varint,3,opt,name=Size" json:"Size"` } func (m *DataObj) Reset() { *m = DataObj{} } func (m *DataObj) String() string { return proto.CompactTextString(m) } func (*DataObj) ProtoMessage() {} func (*DataObj) Descriptor() ([]byte, []int) { - return fileDescriptor_dataobj_216c555249812eeb, []int{0} + return fileDescriptor_86a3613fbaff9a6c, []int{0} } func (m *DataObj) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -49,8 +48,8 @@ func (m *DataObj) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *DataObj) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataObj.Merge(dst, src) +func (m *DataObj) XXX_Merge(src proto.Message) { + xxx_messageInfo_DataObj.Merge(m, src) } func (m *DataObj) XXX_Size() int { return m.Size() @@ -85,6 +84,23 @@ func (m *DataObj) GetSize_() uint64 { func init() { proto.RegisterType((*DataObj)(nil), "datastore.pb.DataObj") } + +func init() { proto.RegisterFile("filestore/pb/dataobj.proto", fileDescriptor_86a3613fbaff9a6c) } + +var fileDescriptor_86a3613fbaff9a6c = []byte{ + // 160 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcb, 0xcc, 0x49, + 0x2d, 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2f, 0x48, 0xd2, 0x4f, 0x49, 0x2c, 0x49, 0xcc, 0x4f, 0xca, + 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x71, 0xc1, 0x72, 0x7a, 0x05, 0x49, 0x4a, + 0xc9, 0x5c, 0xec, 0x2e, 0x89, 0x25, 0x89, 0xfe, 0x49, 0x59, 0x42, 0x0a, 0x5c, 0x1c, 0x6e, 0x99, + 0x39, 0xa9, 0x01, 0x89, 0x25, 0x19, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x2c, 0x27, 0xee, + 0xc9, 0x33, 0x04, 0xc1, 0x45, 0x85, 0x64, 0xb8, 0xd8, 0xfc, 0xd3, 0xd2, 0x8a, 0x53, 0x4b, 0x24, + 0x98, 0x14, 0x18, 0x35, 0x58, 0xa0, 0xf2, 0x50, 0x31, 0x21, 0x09, 0x2e, 0x96, 0xe0, 0xcc, 0xaa, + 0x54, 0x09, 0x66, 0x24, 0x39, 0xb0, 0x88, 0x93, 0xc4, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, + 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, + 0xcb, 0x31, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x87, 0xf5, 0x88, 0xa9, 0x00, 0x00, 0x00, +} + func (m *DataObj) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -123,6 +139,9 @@ func encodeVarintDataobj(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *DataObj) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.FilePath) @@ -160,7 +179,7 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -188,7 +207,7 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -198,6 +217,9 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDataobj } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDataobj + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -217,7 +239,7 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= (uint64(b) & 0x7F) << shift + m.Offset |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -236,7 +258,7 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size_ |= (uint64(b) & 0x7F) << shift + m.Size_ |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -250,6 +272,9 @@ func (m *DataObj) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDataobj } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDataobj + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -316,10 +341,13 @@ func skipDataobj(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthDataobj } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthDataobj + } return iNdEx, nil case 3: for { @@ -348,6 +376,9 @@ func skipDataobj(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthDataobj + } } return iNdEx, nil case 4: @@ -366,19 +397,3 @@ var ( ErrInvalidLengthDataobj = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDataobj = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("filestore/pb/dataobj.proto", fileDescriptor_dataobj_216c555249812eeb) } - -var fileDescriptor_dataobj_216c555249812eeb = []byte{ - // 151 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcb, 0xcc, 0x49, - 0x2d, 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2f, 0x48, 0xd2, 0x4f, 0x49, 0x2c, 0x49, 0xcc, 0x4f, 0xca, - 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x71, 0xc1, 0x72, 0x7a, 0x05, 0x49, 0x4a, - 0xc9, 0x5c, 0xec, 0x2e, 0x89, 0x25, 0x89, 0xfe, 0x49, 0x59, 0x42, 0x0a, 0x5c, 0x1c, 0x6e, 0x99, - 0x39, 0xa9, 0x01, 0x89, 0x25, 0x19, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x2c, 0x27, 0xee, - 0xc9, 0x33, 0x04, 0xc1, 0x45, 0x85, 0x64, 0xb8, 0xd8, 0xfc, 0xd3, 0xd2, 0x8a, 0x53, 0x4b, 0x24, - 0x98, 0x14, 0x18, 0x35, 0x58, 0xa0, 0xf2, 0x50, 0x31, 0x21, 0x09, 0x2e, 0x96, 0xe0, 0xcc, 0xaa, - 0x54, 0x09, 0x66, 0x24, 0x39, 0xb0, 0x88, 0x93, 0xc0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, - 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8c, - 0xe7, 0x83, 0xa2, 0xa1, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/ipfs/go-ipfs/filestore/util.go b/vendor/github.com/ipfs/go-ipfs/filestore/util.go index 39df78c6f3..45accb3a37 100644 --- a/vendor/github.com/ipfs/go-ipfs/filestore/util.go +++ b/vendor/github.com/ipfs/go-ipfs/filestore/util.go @@ -6,11 +6,11 @@ import ( pb "github.com/ipfs/go-ipfs/filestore/pb" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + dshelp "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" ) // Status is used to identify the state of the block data referenced @@ -66,15 +66,18 @@ type ListRes struct { Size uint64 } -// FormatLong returns a human readable string for a ListRes object. -func (r *ListRes) FormatLong() string { +// FormatLong returns a human readable string for a ListRes object +func (r *ListRes) FormatLong(enc func(cid.Cid) string) string { + if enc == nil { + enc = (cid.Cid).String + } switch { case !r.Key.Defined(): return "" case r.FilePath == "": return r.Key.String() default: - return fmt.Sprintf("%-50s %6d %s %d", r.Key, r.Size, r.FilePath, r.Offset) + return fmt.Sprintf("%-50s %6d %s %d", enc(r.Key), r.Size, r.FilePath, r.Offset) } } diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/ipns/common.go b/vendor/github.com/ipfs/go-ipfs/fuse/ipns/common.go index 2d0b87b7c7..214054c953 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/ipns/common.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/ipns/common.go @@ -3,9 +3,9 @@ package ipns import ( "context" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" "github.com/ipfs/go-ipfs/core" nsys "github.com/ipfs/go-ipfs/namesys" diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/ipns/ipns_unix.go b/vendor/github.com/ipfs/go-ipfs/fuse/ipns/ipns_unix.go index 74d9a3c580..e7eeb14b84 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/ipns/ipns_unix.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/ipns/ipns_unix.go @@ -11,20 +11,20 @@ import ( "io" "os" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" core "github.com/ipfs/go-ipfs/core" namesys "github.com/ipfs/go-ipfs/namesys" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" fuse "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse" fs "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - mfs "gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + mfs "gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) func init() { @@ -403,12 +403,13 @@ func (fi *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus return nil } -// Fsync flushes the content in the file to disk, but does not -// update the dag tree internally +// Fsync flushes the content in the file to disk. func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { + // This needs to perform a *full* flush because, in MFS, a write isn't + // persisted until the root is updated. errs := make(chan error, 1) go func() { - errs <- fi.fi.Sync() + errs <- fi.fi.Flush() }() select { case err := <-errs: @@ -419,7 +420,8 @@ func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { } func (fi *File) Forget() { - err := fi.fi.Sync() + // TODO(steb): this seems like a place where we should be *uncaching*, not flushing. + err := fi.fi.Flush() if err != nil { log.Debug("forget file error: ", err) } @@ -435,19 +437,11 @@ func (dir *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Nod } func (fi *FileNode) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) { - var mfsflag int - switch { - case req.Flags.IsReadOnly(): - mfsflag = mfs.OpenReadOnly - case req.Flags.IsWriteOnly(): - mfsflag = mfs.OpenWriteOnly - case req.Flags.IsReadWrite(): - mfsflag = mfs.OpenReadWrite - default: - return nil, errors.New("unsupported flag type") - } - - fd, err := fi.fi.Open(mfsflag, true) + fd, err := fi.fi.Open(mfs.Flags{ + Read: req.Flags.IsReadOnly() || req.Flags.IsReadWrite(), + Write: req.Flags.IsWriteOnly() || req.Flags.IsReadWrite(), + Sync: true, + }) if err != nil { return nil, err } @@ -503,19 +497,11 @@ func (dir *Directory) Create(ctx context.Context, req *fuse.CreateRequest, resp nodechild := &FileNode{fi: fi} - var openflag int - switch { - case req.Flags.IsReadOnly(): - openflag = mfs.OpenReadOnly - case req.Flags.IsWriteOnly(): - openflag = mfs.OpenWriteOnly - case req.Flags.IsReadWrite(): - openflag = mfs.OpenReadWrite - default: - return nil, nil, errors.New("unsupported open mode") - } - - fd, err := fi.Open(openflag, true) + fd, err := fi.Open(mfs.Flags{ + Read: req.Flags.IsReadOnly() || req.Flags.IsReadWrite(), + Write: req.Flags.IsWriteOnly() || req.Flags.IsReadWrite(), + Sync: true, + }) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/mount/mount.go b/vendor/github.com/ipfs/go-ipfs/fuse/mount/mount.go index dc61613352..bb30412763 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/mount/mount.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/mount/mount.go @@ -9,7 +9,7 @@ import ( "time" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("mount") diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_darwin.go b/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_darwin.go index 612a0c2940..512eb1f129 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_darwin.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_darwin.go @@ -74,7 +74,7 @@ Please install it yourself by running: You can also stop ipfs from running these checks and use whatever OSXFUSE version you have by running: - ipfs config %s true + ipfs --json config %s true [1]: https://github.com/ipfs/go-ipfs/issues/177 [2]: https://github.com/ipfs/go-ipfs/pull/533 diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_unix.go b/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_unix.go index 50a36032a4..4e2f732da3 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_unix.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/node/mount_unix.go @@ -13,7 +13,7 @@ import ( mount "github.com/ipfs/go-ipfs/fuse/mount" rofs "github.com/ipfs/go-ipfs/fuse/readonly" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("node") diff --git a/vendor/github.com/ipfs/go-ipfs/fuse/readonly/readonly_unix.go b/vendor/github.com/ipfs/go-ipfs/fuse/readonly/readonly_unix.go index 78f73c34b3..c4f2a4a3f8 100644 --- a/vendor/github.com/ipfs/go-ipfs/fuse/readonly/readonly_unix.go +++ b/vendor/github.com/ipfs/go-ipfs/fuse/readonly/readonly_unix.go @@ -10,18 +10,18 @@ import ( "os" "syscall" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" core "github.com/ipfs/go-ipfs/core" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" fuse "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse" fs "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("fuse/ipfs") diff --git a/vendor/github.com/ipfs/go-ipfs/keystore/keystore.go b/vendor/github.com/ipfs/go-ipfs/keystore/keystore.go index ba43da47fa..bafc859b9f 100644 --- a/vendor/github.com/ipfs/go-ipfs/keystore/keystore.go +++ b/vendor/github.com/ipfs/go-ipfs/keystore/keystore.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("keystore") diff --git a/vendor/github.com/ipfs/go-ipfs/keystore/memkeystore.go b/vendor/github.com/ipfs/go-ipfs/keystore/memkeystore.go index a89a1ae7f1..6983100f9f 100644 --- a/vendor/github.com/ipfs/go-ipfs/keystore/memkeystore.go +++ b/vendor/github.com/ipfs/go-ipfs/keystore/memkeystore.go @@ -1,6 +1,6 @@ package keystore -import ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" +import ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" // MemKeystore is an in memory keystore implementation that is not persisted to // any backing storage. diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/base.go b/vendor/github.com/ipfs/go-ipfs/namesys/base.go index 7923241ed2..ebeb86c313 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/base.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/base.go @@ -5,9 +5,8 @@ import ( "strings" "time" - opts "github.com/ipfs/go-ipfs/namesys/opts" - - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" ) type onceResult struct { diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/cache.go b/vendor/github.com/ipfs/go-ipfs/namesys/cache.go index c083c35b21..d277756691 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/cache.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/cache.go @@ -3,7 +3,7 @@ package namesys import ( "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" ) func (ns *mpns) cacheGet(name string) (path.Path, bool) { diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/dns.go b/vendor/github.com/ipfs/go-ipfs/namesys/dns.go index fb76a060f9..2c31fcae72 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/dns.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/dns.go @@ -6,9 +6,8 @@ import ( "net" "strings" - opts "github.com/ipfs/go-ipfs/namesys/opts" - - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" isd "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain" ) @@ -45,6 +44,7 @@ type lookupRes struct { // TXT records for a given domain name should contain a b58 // encoded multihash. func (r *DNSResolver) resolveOnceAsync(ctx context.Context, name string, options opts.ResolveOpts) <-chan onceResult { + var fqdn string out := make(chan onceResult, 1) segments := strings.SplitN(name, "/", 2) domain := segments[0] @@ -56,11 +56,17 @@ func (r *DNSResolver) resolveOnceAsync(ctx context.Context, name string, options } log.Debugf("DNSResolver resolving %s", domain) + if strings.HasSuffix(domain, ".") { + fqdn = domain + } else { + fqdn = domain + "." + } + rootChan := make(chan lookupRes, 1) - go workDomain(r, domain, rootChan) + go workDomain(r, fqdn, rootChan) subChan := make(chan lookupRes, 1) - go workDomain(r, "_dnslink."+domain, subChan) + go workDomain(r, "_dnslink."+fqdn, subChan) appendPath := func(p path.Path) (path.Path, error) { if len(segments) > 1 { diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/interface.go b/vendor/github.com/ipfs/go-ipfs/namesys/interface.go index a4f6fb9235..04ca1eeb7a 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/interface.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/interface.go @@ -35,11 +35,9 @@ import ( context "context" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - - opts "github.com/ipfs/go-ipfs/namesys/opts" - - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" ) // ErrResolveFailed signals an error when attempting to resolve. diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/namesys.go b/vendor/github.com/ipfs/go-ipfs/namesys/namesys.go index 4cbaf261ea..b8ccdaafb1 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/namesys.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/namesys.go @@ -5,17 +5,15 @@ import ( "strings" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - - opts "github.com/ipfs/go-ipfs/namesys/opts" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" isd "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // mpns (a multi-protocol NameSystem) implements generic IPFS naming. @@ -173,7 +171,7 @@ func emitOnceResult(ctx context.Context, outCh chan<- onceResult, r onceResult) // Publish implements Publisher func (ns *mpns) Publish(ctx context.Context, name ci.PrivKey, value path.Path) error { - return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordTTL)) + return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordEOL)) } func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.Path, eol time.Time) error { diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/proquint.go b/vendor/github.com/ipfs/go-ipfs/namesys/proquint.go index 8693f55dc8..e36865903a 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/proquint.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/proquint.go @@ -4,10 +4,9 @@ import ( "context" "errors" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" proquint "gx/ipfs/QmYnf27kzqR2cxt6LFZdrAFJuQd6785fTkBvMuEj9EeRxM/proquint" - - opts "github.com/ipfs/go-ipfs/namesys/opts" ) type ProquintResolver struct{} diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/publisher.go b/vendor/github.com/ipfs/go-ipfs/namesys/publisher.go index 42ba4c0e77..126bcd1ce5 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/publisher.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/publisher.go @@ -6,26 +6,25 @@ import ( "sync" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - pin "github.com/ipfs/go-ipfs/pin" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ipns "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns" - pb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsquery "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsquery "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + ipns "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns" + pb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" ) const ipnsPrefix = "/ipns/" const PublishPutValTimeout = time.Minute -const DefaultRecordTTL = 24 * time.Hour +const DefaultRecordEOL = 24 * time.Hour // IpnsPublisher is capable of publishing and resolving names to the IPFS // routing system. @@ -49,7 +48,7 @@ func NewIpnsPublisher(route routing.ValueStore, ds ds.Datastore) *IpnsPublisher // and publishes it out to the routing system func (p *IpnsPublisher) Publish(ctx context.Context, k ci.PrivKey, value path.Path) error { log.Debugf("Publish %s", value) - return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordTTL)) + return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordEOL)) } func IpnsDsKey(id peer.ID) ds.Key { diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/republisher/repub.go b/vendor/github.com/ipfs/go-ipfs/namesys/republisher/repub.go index d81034652d..16b534e8ba 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/republisher/repub.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/republisher/repub.go @@ -5,19 +5,19 @@ import ( "errors" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" keystore "github.com/ipfs/go-ipfs/keystore" namesys "github.com/ipfs/go-ipfs/namesys" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" gpctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - pb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + pb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" ) var errNoEntry = errors.New("no previous entry") diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/routing.go b/vendor/github.com/ipfs/go-ipfs/namesys/routing.go index f27f59280d..e06d6f1b9c 100644 --- a/vendor/github.com/ipfs/go-ipfs/namesys/routing.go +++ b/vendor/github.com/ipfs/go-ipfs/namesys/routing.go @@ -5,19 +5,17 @@ import ( "strings" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" - - opts "github.com/ipfs/go-ipfs/namesys/opts" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - dht "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - ipns "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns" - pb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipns "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns" + pb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + opts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + dht "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht" // OpenBazaar: this is updated to OpenBazaar fork because of go-ipfs issue #5957 + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) var log = logging.Logger("namesys") @@ -88,6 +86,7 @@ func (r *IpnsResolver) resolveOnceAsync(ctx context.Context, name string, option // Note that the DHT will call the ipns validator when retrieving // the value, which in turn verifies the ipns record signature ipnsKey := ipns.RecordKey(pid) + vals, err := r.routing.SearchValue(ctx, ipnsKey, dht.Quorum(int(options.DhtRecordCount))) if err != nil { log.Debugf("RoutingResolver: dht get for name %s failed: %s", name, err) diff --git a/vendor/github.com/ipfs/go-ipfs/p2p/listener.go b/vendor/github.com/ipfs/go-ipfs/p2p/listener.go index 67e153a3e5..c88ef3cf01 100644 --- a/vendor/github.com/ipfs/go-ipfs/p2p/listener.go +++ b/vendor/github.com/ipfs/go-ipfs/p2p/listener.go @@ -4,10 +4,10 @@ import ( "errors" "sync" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" ) // Listener listens for connections and proxies them to a target diff --git a/vendor/github.com/ipfs/go-ipfs/p2p/local.go b/vendor/github.com/ipfs/go-ipfs/p2p/local.go index 8584a3b7d9..119de5af17 100644 --- a/vendor/github.com/ipfs/go-ipfs/p2p/local.go +++ b/vendor/github.com/ipfs/go-ipfs/p2p/local.go @@ -4,12 +4,12 @@ import ( "context" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" tec "gx/ipfs/QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb/go-temp-err-catcher" - "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) // localListener manet streams and proxies them to libp2p services diff --git a/vendor/github.com/ipfs/go-ipfs/p2p/p2p.go b/vendor/github.com/ipfs/go-ipfs/p2p/p2p.go index 625d28f599..088eaa0214 100644 --- a/vendor/github.com/ipfs/go-ipfs/p2p/p2p.go +++ b/vendor/github.com/ipfs/go-ipfs/p2p/p2p.go @@ -1,10 +1,10 @@ package p2p import ( - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("p2p-mount") diff --git a/vendor/github.com/ipfs/go-ipfs/p2p/remote.go b/vendor/github.com/ipfs/go-ipfs/p2p/remote.go index 3f293000cb..884da7b645 100644 --- a/vendor/github.com/ipfs/go-ipfs/p2p/remote.go +++ b/vendor/github.com/ipfs/go-ipfs/p2p/remote.go @@ -2,11 +2,12 @@ package p2p import ( "context" + "fmt" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) var maPrefix = "/" + ma.ProtocolWithCode(ma.P_IPFS).Name + "/" @@ -20,15 +21,21 @@ type remoteListener struct { // Address to proxy the incoming connections to addr ma.Multiaddr + + // reportRemote if set to true makes the handler send '\n' + // to target before any data is forwarded + reportRemote bool } // ForwardRemote creates new p2p listener -func (p2p *P2P) ForwardRemote(ctx context.Context, proto protocol.ID, addr ma.Multiaddr) (Listener, error) { +func (p2p *P2P) ForwardRemote(ctx context.Context, proto protocol.ID, addr ma.Multiaddr, reportRemote bool) (Listener, error) { listener := &remoteListener{ p2p: p2p, proto: proto, addr: addr, + + reportRemote: reportRemote, } if err := p2p.ListenersP2P.Register(listener); err != nil { @@ -47,6 +54,13 @@ func (l *remoteListener) handleStream(remote net.Stream) { peer := remote.Conn().RemotePeer() + if l.reportRemote { + if _, err := fmt.Fprintf(local, "%s\n", peer.Pretty()); err != nil { + remote.Reset() + return + } + } + peerMa, err := ma.NewMultiaddr(maPrefix + peer.Pretty()) if err != nil { remote.Reset() diff --git a/vendor/github.com/ipfs/go-ipfs/p2p/stream.go b/vendor/github.com/ipfs/go-ipfs/p2p/stream.go index 503cb8d2b4..3490a59cda 100644 --- a/vendor/github.com/ipfs/go-ipfs/p2p/stream.go +++ b/vendor/github.com/ipfs/go-ipfs/p2p/stream.go @@ -4,12 +4,12 @@ import ( "io" "sync" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) const cmgrTag = "stream-fwd" diff --git a/vendor/github.com/ipfs/go-ipfs/package.json b/vendor/github.com/ipfs/go-ipfs/package.json index e0fae49dc4..7126c283ef 100644 --- a/vendor/github.com/ipfs/go-ipfs/package.json +++ b/vendor/github.com/ipfs/go-ipfs/package.json @@ -8,27 +8,27 @@ }, "gxDependencies": [ { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", "name": "go-log", - "version": "1.5.7" + "version": "1.5.9" }, { "author": "whyrusleeping", - "hash": "QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc", + "hash": "QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK", "name": "go-libp2p-secio", - "version": "2.0.17" + "version": "2.0.30" }, { "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", "name": "go-libp2p-crypto", - "version": "2.0.1" + "version": "2.0.7" }, { "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", "name": "go-libp2p-peer", - "version": "2.4.0" + "version": "3.1.2" }, { "author": "whyrusleeping", @@ -37,9 +37,9 @@ "version": "1.0.0" }, { - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", "name": "gogo-protobuf", - "version": "0.0.0" + "version": "1.2.1" }, { "hash": "QmTQuFQWHAWy4wMH6ZyPfGiawA5u9T8rs79FENoV8yXaoS", @@ -47,14 +47,14 @@ "version": "0.1.4" }, { - "hash": "QmV1DPm5F46LvQMxCVPhu35zHgZEeMvyVtpxjb5TwfGiua", + "hash": "QmckeQ2zrYLAXoSHYTGn5BDdb22BqbUoHEHm8KZ9YWRxd1", "name": "iptb", - "version": "1.3.19" + "version": "2.0.0" }, { - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", "name": "go-multihash", - "version": "1.0.8" + "version": "1.0.9" }, { "author": "cenk", @@ -70,15 +70,15 @@ }, { "author": "cheggaaa", - "hash": "QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq", + "hash": "QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj", "name": "pb", - "version": "1.0.25" + "version": "1.1.0" }, { "author": "dustin", - "hash": "QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K", + "hash": "QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy", "name": "go-humanize", - "version": "0.0.0" + "version": "1.0.1" }, { "author": "syndtr", @@ -88,15 +88,15 @@ }, { "author": "whyrusleeping", - "hash": "QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM", + "hash": "QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e", "name": "go-sysinfo", - "version": "0.0.0" + "version": "0.0.1" }, { "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", "name": "go-datastore", - "version": "3.4.0" + "version": "3.6.1" }, { "author": "hashicorp", @@ -106,9 +106,9 @@ }, { "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", "name": "go-libp2p-peerstore", - "version": "2.0.6" + "version": "2.0.19" }, { "author": "whyrusleeping", @@ -124,45 +124,45 @@ }, { "author": "whyrusleeping", - "hash": "QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", "name": "go-libp2p", - "version": "6.0.23" + "version": "6.0.39" }, { "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", "name": "go-cid", - "version": "0.9.0" + "version": "0.9.3" }, { "author": "whyrusleeping", - "hash": "QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc", + "hash": "QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg", "name": "go-ds-flatfs", - "version": "1.3.3" + "version": "1.3.7" }, { "author": "whyrusleeping", - "hash": "QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe", + "hash": "QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc", "name": "go-ds-measure", - "version": "1.4.3" + "version": "1.4.5" }, { "author": "whyrusleeping", - "hash": "QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a", + "hash": "QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk", "name": "go-ds-leveldb", - "version": "1.2.1" + "version": "1.3.0" }, { "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", "name": "go-libp2p-loggables", - "version": "1.1.24" + "version": "1.1.33" }, { "author": "ipfs", - "hash": "QmQXBfkuwgMaPx334WuL9NmyrKnbZ5udaWnHTHEsts2x3T", + "hash": "QmfHYMtNSntM6qFhHzLDCyqTX7NNpsfwFgvicJv7L5saAP", "name": "go-metrics-prometheus", - "version": "0.3.10" + "version": "0.3.12" }, { "author": "ipfs", @@ -171,32 +171,33 @@ "version": "0.2.0" }, { - "hash": "QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe", + "hash": "QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq", "name": "go-libp2p-kad-dht", - "version": "4.4.12" + "version": "4.4.31" }, { "author": "whyrusleeping", - "hash": "QmVLLpHJXn62f3LoLFKsJnYJVRRSpRiH36tBzZFumRxnmT", + "hash": "QmZJePENq85jG2s1Lm7SPzjYYKqDAqyaqzfiEJPRawf2iJ", "name": "hang-fds", - "version": "0.0.13" + "version": "0.0.15" }, { "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", "name": "go-ipld-format", - "version": "0.7.1" + "version": "0.8.1" }, { "author": "whyrusleeping", - "hash": "QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf", + "hash": "QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D", "name": "go-ipld-cbor", - "version": "1.5.4" + "version": "1.5.10" }, { "author": "lgierth", - "hash": "QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1", - "name": "dir-index-html" + "hash": "QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV", + "name": "dir-index-html", + "version": "1.0.4" }, { "author": "Kubuxu", @@ -206,9 +207,9 @@ }, { "author": "whyrusleeping", - "hash": "QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc", + "hash": "QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc", "name": "go-smux-multiplex", - "version": "3.0.16" + "version": "3.0.19" }, { "author": "blang", @@ -218,9 +219,9 @@ }, { "author": "libp2p", - "hash": "QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg", + "hash": "QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y", "name": "go-libp2p-pnet", - "version": "3.0.4" + "version": "3.0.5" }, { "author": "kubuxu", @@ -229,15 +230,15 @@ "version": "0.2.3" }, { - "hash": "QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD", + "hash": "QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M", "name": "go-libp2p-kbucket", - "version": "2.2.12" + "version": "2.2.23" }, { "author": "whyrusleeping", - "hash": "Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC", + "hash": "QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb", "name": "go-smux-yamux", - "version": "2.0.8" + "version": "2.0.9" }, { "author": "whyrusleeping", @@ -247,33 +248,33 @@ }, { "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", "name": "go-multiaddr", - "version": "1.3.5" + "version": "1.4.1" }, { "author": "whyrusleeping", - "hash": "QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx", + "hash": "QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR", "name": "go-libp2p-metrics", - "version": "2.1.7" + "version": "2.1.14" }, { "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", "name": "go-stream-muxer", - "version": "3.0.0" + "version": "3.1.0" }, { "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", "name": "go-multiaddr-net", - "version": "1.6.5" + "version": "1.7.2" }, { "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", "name": "go-libp2p-net", - "version": "3.0.15" + "version": "3.0.30" }, { "author": "whyrusleeping", @@ -283,20 +284,20 @@ }, { "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", "name": "go-libp2p-host", - "version": "3.0.15" + "version": "3.0.26" }, { "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", "name": "go-libp2p-swarm", - "version": "3.0.22" + "version": "3.0.34" }, { - "hash": "QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs", + "hash": "QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs", "name": "go-ipfs-cmds", - "version": "2.0.5" + "version": "2.0.18" }, { "hash": "Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg", @@ -305,14 +306,14 @@ }, { "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", "name": "go-ipfs-util", - "version": "1.2.8" + "version": "1.2.9" }, { - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", "name": "go-libp2p-record", - "version": "4.1.8" + "version": "4.1.15" }, { "author": "whyrusleeping", @@ -322,61 +323,61 @@ }, { "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", "name": "go-block-format", - "version": "0.2.0" + "version": "0.2.2" }, { - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", "name": "go-libp2p-routing", - "version": "2.7.1" + "version": "2.7.13" }, { "author": "whyrusleeping", - "hash": "QmRaa1QZPnxsWnSpRgvZzdoD4KjowhDBrUq2HNG7xvWudr", + "hash": "QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu", "name": "go-ipld-git", - "version": "0.3.2" + "version": "0.3.6" }, { - "hash": "QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB", + "hash": "QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd", "name": "go-maddr-filter", - "version": "1.1.10" + "version": "1.1.13" }, { "author": "vyzo", - "hash": "QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA", + "hash": "QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc", "name": "go-libp2p-circuit", - "version": "2.3.2" + "version": "2.3.14" }, { "author": "magik6k", - "hash": "QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui", + "hash": "QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91", "name": "go-ds-badger", - "version": "1.10.0" + "version": "1.12.3" }, { "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", "name": "go-testutil", - "version": "1.2.10" + "version": "1.2.19" }, { "author": "whyrusleeping", - "hash": "QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU", + "hash": "QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT", "name": "go-libp2p-connmgr", - "version": "0.3.23" + "version": "0.3.34" }, { "author": "why", - "hash": "QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ", + "hash": "QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd", "name": "go-libp2p-interface-connmgr", - "version": "0.0.21" + "version": "0.0.32" }, { "author": "why", - "hash": "QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y", + "hash": "Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU", "name": "go-ipfs-addr", - "version": "0.1.25" + "version": "0.1.33" }, { "author": "The Go Authors", @@ -392,15 +393,15 @@ }, { "author": "hector", - "hash": "QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg", + "hash": "QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7", "name": "go-ipfs-posinfo", - "version": "0.1.2" + "version": "0.1.5" }, { "author": "hsanjuan", - "hash": "QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR", + "hash": "QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8", "name": "go-ipfs-chunker", - "version": "0.1.3" + "version": "0.1.6" }, { "author": "jbenet", @@ -410,21 +411,21 @@ }, { "author": "hsanjuan", - "hash": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", + "hash": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", "name": "go-ipfs-ds-help", - "version": "0.1.3" + "version": "0.1.7" }, { "author": "hsanjuan", - "hash": "QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe", + "hash": "QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ", "name": "go-ipfs-routing", - "version": "0.1.7" + "version": "0.1.18" }, { "author": "hsanjuan", - "hash": "QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR", + "hash": "QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA", "name": "go-ipfs-blockstore", - "version": "0.1.4" + "version": "0.1.8" }, { "author": "whyrusleeping", @@ -440,33 +441,33 @@ }, { "author": "dignifiedquire", - "hash": "Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a", + "hash": "QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ", "name": "go-fs-lock", - "version": "0.1.8" + "version": "0.1.11" }, { "author": "hsanjuan", - "hash": "QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM", + "hash": "QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg", "name": "go-ipfs-exchange-interface", - "version": "0.1.0" + "version": "0.1.3" }, { "author": "hsanjuan", - "hash": "QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb", + "hash": "Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS", "name": "go-ipfs-exchange-offline", - "version": "0.1.3" + "version": "0.1.7" }, { "author": "stebalien", - "hash": "QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH", + "hash": "QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw", "name": "go-libp2p-pubsub-router", - "version": "0.5.3" + "version": "0.5.16" }, { "author": "Stebalien", - "hash": "QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK", + "hash": "QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx", "name": "go-libp2p-routing-helpers", - "version": "0.3.8" + "version": "0.3.19" }, { "author": "fsnotify", @@ -476,9 +477,9 @@ }, { "author": "stebalien", - "hash": "QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg", + "hash": "QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc", "name": "go-ipns", - "version": "0.1.13" + "version": "0.1.23" }, { "author": "whyrusleeping", @@ -488,63 +489,63 @@ }, { "author": "why", - "hash": "QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj", + "hash": "QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G", "name": "go-bitswap", - "version": "1.1.13" + "version": "1.1.29" }, { "author": "why", - "hash": "QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8", + "hash": "QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy", "name": "go-blockservice", - "version": "1.1.13" + "version": "1.1.29" }, { "author": "why", - "hash": "QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc", + "hash": "QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri", "name": "go-merkledag", - "version": "1.1.15" + "version": "1.1.37" }, { "author": "why", - "hash": "QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3", + "hash": "QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR", "name": "go-path", - "version": "1.1.16" + "version": "1.1.39" }, { "author": "why", - "hash": "QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8", + "hash": "QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ", "name": "go-unixfs", - "version": "1.1.16" + "version": "1.3.12" }, { "author": "magik6k", - "hash": "QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR", + "hash": "QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs", "name": "go-ipfs-config", - "version": "0.2.16" + "version": "0.2.27" }, { "author": "why", - "hash": "QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT", + "hash": "QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa", "name": "go-verifcid", - "version": "0.1.0" + "version": "0.1.2" }, { "author": "hsanjuan", - "hash": "QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9", + "hash": "Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx", "name": "go-mfs", - "version": "0.1.18" + "version": "0.1.49" }, { "author": "kevina", - "hash": "QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt", + "hash": "Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G", "name": "go-cidutil", - "version": "0.1.1" + "version": "0.2.1" }, { "author": "lgierth", - "hash": "QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9", + "hash": "QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy", "name": "go-multiaddr-dns", - "version": "0.2.5" + "version": "0.3.1" }, { "author": "elgris", @@ -554,9 +555,9 @@ }, { "author": "marten-seemann", - "hash": "QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag", + "hash": "QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD", "name": "go-libp2p-quic-transport", - "version": "0.2.9" + "version": "0.2.19" }, { "author": "mitchellh", @@ -565,33 +566,57 @@ "version": "1.0.0" }, { - "hash": "QmSJ9n2s9NUoA9D849W5jj5SJ94nMcZpj1jCgQJieiNqSt", + "hash": "QmXMnwKWAFBk8kgH8gjoG5P9Pj5aASPvQA2kHdu6gRwyj5", "name": "go-random", - "version": "1.0.0" + "version": "1.0.1" }, { "author": "jbenet", - "hash": "QmbyJLe6SdVR5VLjtcoLdKhUuV4RT9a1FxX28zaWnY34d8", + "hash": "QmTXSRPiyMt3i4jTGY9DiBaGwZqPaiihEUjffnE9tviEqx", "name": "go-random-files", - "version": "1.0.0" + "version": "1.0.1" }, { "author": "magik6k", - "hash": "QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC", + "hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb", "name": "go-ipfs-files", - "version": "1.0.1" + "version": "2.0.6" }, { "author": "whyrusleeping", - "hash": "QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG", + "hash": "QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa", "name": "go-libp2p-pubsub", - "version": "0.11.3" + "version": "0.11.15" + }, + { + "author": "travisperson", + "hash": "QmY3LuhVAkJRqevj3FSh1fSRpGhiDYHjKmgotnQY35zTir", + "name": "iptb-plugins", + "version": "1.0.20" + }, + { + "author": "hsanjuan", + "hash": "QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ", + "name": "go-libp2p-http", + "version": "1.1.17" + }, + { + "author": "vyzo", + "hash": "QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy", + "name": "go-libp2p-autonat-svc", + "version": "1.0.13" + }, + { + "author": "magik6k", + "hash": "QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6", + "name": "interface-go-ipfs-core", + "version": "0.1.11" } ], "gxVersion": "0.10.0", "language": "go", "license": "MIT", "name": "go-ipfs", - "version": "0.4.18" + "version": "0.4.19" } diff --git a/vendor/github.com/ipfs/go-ipfs/pin/gc/gc.go b/vendor/github.com/ipfs/go-ipfs/pin/gc/gc.go index d70cdbd467..d51d9e8155 100644 --- a/vendor/github.com/ipfs/go-ipfs/pin/gc/gc.go +++ b/vendor/github.com/ipfs/go-ipfs/pin/gc/gc.go @@ -7,18 +7,18 @@ import ( "fmt" "strings" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" pin "github.com/ipfs/go-ipfs/pin" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - dstore "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + dstore "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid" ) var log = logging.Logger("gc") diff --git a/vendor/github.com/ipfs/go-ipfs/pin/internal/pb/header.pb.go b/vendor/github.com/ipfs/go-ipfs/pin/internal/pb/header.pb.go index ca4173c3ea..dd215e1263 100644 --- a/vendor/github.com/ipfs/go-ipfs/pin/internal/pb/header.pb.go +++ b/vendor/github.com/ipfs/go-ipfs/pin/internal/pb/header.pb.go @@ -3,13 +3,13 @@ package pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import encoding_binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -28,16 +28,14 @@ type Set struct { // how many of the links are subtrees Fanout uint32 `protobuf:"varint,2,opt,name=fanout" json:"fanout"` // hash seed for subtree selection, a random number - Seed uint32 `protobuf:"fixed32,3,opt,name=seed" json:"seed"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Seed uint32 `protobuf:"fixed32,3,opt,name=seed" json:"seed"` } func (m *Set) Reset() { *m = Set{} } func (m *Set) String() string { return proto.CompactTextString(m) } func (*Set) ProtoMessage() {} func (*Set) Descriptor() ([]byte, []int) { - return fileDescriptor_header_778100e52d428560, []int{0} + return fileDescriptor_cda303a5a3ed87e7, []int{0} } func (m *Set) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -54,8 +52,8 @@ func (m *Set) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Set) XXX_Merge(src proto.Message) { - xxx_messageInfo_Set.Merge(dst, src) +func (m *Set) XXX_Merge(src proto.Message) { + xxx_messageInfo_Set.Merge(m, src) } func (m *Set) XXX_Size() int { return m.Size() @@ -90,6 +88,24 @@ func (m *Set) GetSeed() uint32 { func init() { proto.RegisterType((*Set)(nil), "ipfs.pin.Set") } + +func init() { proto.RegisterFile("pin/internal/pb/header.proto", fileDescriptor_cda303a5a3ed87e7) } + +var fileDescriptor_cda303a5a3ed87e7 = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcc, 0xd3, + 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0xca, 0x4b, 0xcc, 0xd1, 0x2f, 0x48, 0xd2, 0xcf, 0x48, 0x4d, 0x4c, + 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc8, 0x2c, 0x48, 0x2b, 0xd6, 0x2b, + 0xc8, 0xcc, 0x53, 0x8a, 0xe5, 0x62, 0x0e, 0x4e, 0x2d, 0x11, 0x92, 0xe3, 0x62, 0x2f, 0x4b, 0x2d, + 0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, + 0x21, 0x08, 0x26, 0x28, 0x24, 0xc3, 0xc5, 0x96, 0x96, 0x98, 0x97, 0x5f, 0x5a, 0x22, 0xc1, 0x84, + 0x24, 0x0d, 0x15, 0x13, 0x92, 0xe0, 0x62, 0x29, 0x4e, 0x4d, 0x4d, 0x91, 0x60, 0x56, 0x60, 0xd4, + 0x60, 0x87, 0xca, 0x81, 0x45, 0x9c, 0x64, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, + 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, + 0x21, 0x8a, 0xa9, 0x20, 0x09, 0x10, 0x00, 0x00, 0xff, 0xff, 0x20, 0x85, 0x2f, 0x24, 0xa5, 0x00, + 0x00, 0x00, +} + func (m *Set) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -128,6 +144,9 @@ func encodeVarintHeader(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Set) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovHeader(uint64(m.Version)) @@ -164,7 +183,7 @@ func (m *Set) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -192,7 +211,7 @@ func (m *Set) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (uint32(b) & 0x7F) << shift + m.Version |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -211,7 +230,7 @@ func (m *Set) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Fanout |= (uint32(b) & 0x7F) << shift + m.Fanout |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -235,6 +254,9 @@ func (m *Set) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthHeader } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHeader + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -301,10 +323,13 @@ func skipHeader(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthHeader } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthHeader + } return iNdEx, nil case 3: for { @@ -333,6 +358,9 @@ func skipHeader(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthHeader + } } return iNdEx, nil case 4: @@ -351,21 +379,3 @@ var ( ErrInvalidLengthHeader = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHeader = fmt.Errorf("proto: integer overflow") ) - -func init() { - proto.RegisterFile("pin/internal/pb/header.proto", fileDescriptor_header_778100e52d428560) -} - -var fileDescriptor_header_778100e52d428560 = []byte{ - // 154 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcc, 0xd3, - 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0xca, 0x4b, 0xcc, 0xd1, 0x2f, 0x48, 0xd2, 0xcf, 0x48, 0x4d, 0x4c, - 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc8, 0x2c, 0x48, 0x2b, 0xd6, 0x2b, - 0xc8, 0xcc, 0x53, 0x8a, 0xe5, 0x62, 0x0e, 0x4e, 0x2d, 0x11, 0x92, 0xe3, 0x62, 0x2f, 0x4b, 0x2d, - 0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, - 0x21, 0x08, 0x26, 0x28, 0x24, 0xc3, 0xc5, 0x96, 0x96, 0x98, 0x97, 0x5f, 0x5a, 0x22, 0xc1, 0x84, - 0x24, 0x0d, 0x15, 0x13, 0x92, 0xe0, 0x62, 0x29, 0x4e, 0x4d, 0x4d, 0x91, 0x60, 0x56, 0x60, 0xd4, - 0x60, 0x87, 0xca, 0x81, 0x45, 0x9c, 0x44, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, - 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0xa2, 0x98, 0x0a, 0x92, 0x00, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xc3, 0xf9, 0x7f, 0x24, 0x9d, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/ipfs/go-ipfs/pin/pin.go b/vendor/github.com/ipfs/go-ipfs/pin/pin.go index 03cf013a2c..b40d113a7e 100644 --- a/vendor/github.com/ipfs/go-ipfs/pin/pin.go +++ b/vendor/github.com/ipfs/go-ipfs/pin/pin.go @@ -9,14 +9,14 @@ import ( "sync" "time" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" "github.com/ipfs/go-ipfs/dagutils" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("pin") diff --git a/vendor/github.com/ipfs/go-ipfs/pin/set.go b/vendor/github.com/ipfs/go-ipfs/pin/set.go index 54d21d4dce..7dc3166158 100644 --- a/vendor/github.com/ipfs/go-ipfs/pin/set.go +++ b/vendor/github.com/ipfs/go-ipfs/pin/set.go @@ -9,13 +9,13 @@ import ( "hash/fnv" "sort" - "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" + "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" "github.com/ipfs/go-ipfs/pin/internal/pb" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" ) const ( diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/Rules.mk b/vendor/github.com/ipfs/go-ipfs/plugin/Rules.mk new file mode 100644 index 0000000000..1e26d2a3c6 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/Rules.mk @@ -0,0 +1,9 @@ +include mk/header.mk + +dir := $(d)/loader +include $(dir)/Rules.mk + +dir := $(d)/plugins +include $(dir)/Rules.mk + +include mk/footer.mk diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/daemon.go b/vendor/github.com/ipfs/go-ipfs/plugin/daemon.go new file mode 100644 index 0000000000..b08d251ee7 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/daemon.go @@ -0,0 +1,14 @@ +package plugin + +import ( + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" +) + +// PluginDaemon is an interface for daemon plugins. These plugins will be run on +// the daemon and will be given access to an implementation of the CoreAPI. +type PluginDaemon interface { + Plugin + + Start(coreiface.CoreAPI) error + Close() error +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/datastore.go b/vendor/github.com/ipfs/go-ipfs/plugin/datastore.go new file mode 100644 index 0000000000..735eedc9d7 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/datastore.go @@ -0,0 +1,14 @@ +package plugin + +import ( + "github.com/ipfs/go-ipfs/repo/fsrepo" +) + +// PluginDatastore is an interface that can be implemented to add handlers for +// for different datastores +type PluginDatastore interface { + Plugin + + DatastoreTypeName() string + DatastoreConfigParser() fsrepo.ConfigFromMap +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/ipld.go b/vendor/github.com/ipfs/go-ipfs/plugin/ipld.go new file mode 100644 index 0000000000..bc71f54e9b --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/ipld.go @@ -0,0 +1,16 @@ +package plugin + +import ( + "github.com/ipfs/go-ipfs/core/coredag" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// PluginIPLD is an interface that can be implemented to add handlers for +// for different IPLD formats +type PluginIPLD interface { + Plugin + + RegisterBlockDecoders(dec ipld.BlockDecoder) error + RegisterInputEncParsers(iec coredag.InputEncParsers) error +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/loader/Rules.mk b/vendor/github.com/ipfs/go-ipfs/plugin/loader/Rules.mk new file mode 100644 index 0000000000..01f50e277f --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/loader/Rules.mk @@ -0,0 +1,10 @@ +include mk/header.mk + +$(d)/preload.go: d:=$(d) +$(d)/preload.go: $(d)/preload_list $(d)/preload.sh + $(d)/preload.sh > $@ + go fmt $@ >/dev/null + +DEPS_GO += $(d)/preload.go + +include mk/footer.mk diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/loader/load_linux.go b/vendor/github.com/ipfs/go-ipfs/plugin/loader/load_linux.go new file mode 100644 index 0000000000..19c1e994bb --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/loader/load_linux.go @@ -0,0 +1,68 @@ +// +build !noplugin + +package loader + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "plugin" + + iplugin "github.com/ipfs/go-ipfs/plugin" +) + +func init() { + loadPluginsFunc = linuxLoadFunc +} + +func linuxLoadFunc(pluginDir string) ([]iplugin.Plugin, error) { + var plugins []iplugin.Plugin + + err := filepath.Walk(pluginDir, func(fi string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + if fi != pluginDir { + log.Warningf("found directory inside plugins directory: %s", fi) + } + return nil + } + + if info.Mode().Perm()&0111 == 0 { + // file is not executable let's not load it + // this is to prevent loading plugins from for example non-executable + // mounts, some /tmp mounts are marked as such for security + log.Errorf("non-executable file in plugins directory: %s", fi) + return nil + } + + if newPlugins, err := loadPlugin(fi); err == nil { + plugins = append(plugins, newPlugins...) + } else { + return fmt.Errorf("loading plugin %s: %s", fi, err) + } + return nil + }) + + return plugins, err +} + +func loadPlugin(fi string) ([]iplugin.Plugin, error) { + pl, err := plugin.Open(fi) + if err != nil { + return nil, err + } + pls, err := pl.Lookup("Plugins") + if err != nil { + return nil, err + } + + typePls, ok := pls.(*[]iplugin.Plugin) + if !ok { + return nil, errors.New("filed 'Plugins' didn't contain correct type") + } + + return *typePls, nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/loader/loader.go b/vendor/github.com/ipfs/go-ipfs/plugin/loader/loader.go new file mode 100644 index 0000000000..b6c9dd53d1 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/loader/loader.go @@ -0,0 +1,170 @@ +package loader + +import ( + "fmt" + "os" + "strings" + + coredag "github.com/ipfs/go-ipfs/core/coredag" + plugin "github.com/ipfs/go-ipfs/plugin" + fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" + + opentracing "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" + coreiface "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("plugin/loader") + +var loadPluginsFunc = func(string) ([]plugin.Plugin, error) { + return nil, nil +} + +// PluginLoader keeps track of loaded plugins +type PluginLoader struct { + plugins []plugin.Plugin +} + +// NewPluginLoader creates new plugin loader +func NewPluginLoader(pluginDir string) (*PluginLoader, error) { + plMap := make(map[string]plugin.Plugin) + for _, v := range preloadPlugins { + plMap[v.Name()] = v + } + + if pluginDir != "" { + newPls, err := loadDynamicPlugins(pluginDir) + if err != nil { + return nil, err + } + + for _, pl := range newPls { + if ppl, ok := plMap[pl.Name()]; ok { + // plugin is already preloaded + return nil, fmt.Errorf( + "plugin: %s, is duplicated in version: %s, "+ + "while trying to load dynamically: %s", + ppl.Name(), ppl.Version(), pl.Version()) + } + plMap[pl.Name()] = pl + } + } + + loader := &PluginLoader{plugins: make([]plugin.Plugin, 0, len(plMap))} + + for _, v := range plMap { + loader.plugins = append(loader.plugins, v) + } + + return loader, nil +} + +func loadDynamicPlugins(pluginDir string) ([]plugin.Plugin, error) { + _, err := os.Stat(pluginDir) + if os.IsNotExist(err) { + return nil, nil + } + if err != nil { + return nil, err + } + + return loadPluginsFunc(pluginDir) +} + +// Initialize initializes all loaded plugins +func (loader *PluginLoader) Initialize() error { + for _, p := range loader.plugins { + err := p.Init() + if err != nil { + return err + } + } + + return nil +} + +// Inject hooks all the plugins into the appropriate subsystems. +func (loader *PluginLoader) Inject() error { + for _, pl := range loader.plugins { + if pl, ok := pl.(plugin.PluginIPLD); ok { + err := injectIPLDPlugin(pl) + if err != nil { + return err + } + } + if pl, ok := pl.(plugin.PluginTracer); ok { + err := injectTracerPlugin(pl) + if err != nil { + return err + } + } + if pl, ok := pl.(plugin.PluginDatastore); ok { + err := injectDatastorePlugin(pl) + if err != nil { + return err + } + } + } + return nil +} + +// Start starts all long-running plugins. +func (loader *PluginLoader) Start(iface coreiface.CoreAPI) error { + for i, pl := range loader.plugins { + if pl, ok := pl.(plugin.PluginDaemon); ok { + err := pl.Start(iface) + if err != nil { + closePlugins(loader.plugins[i:]) + return err + } + } + } + return nil +} + +// StopDaemon stops all long-running plugins. +func (loader *PluginLoader) Close() error { + return closePlugins(loader.plugins) +} + +func closePlugins(plugins []plugin.Plugin) error { + var errs []string + for _, pl := range plugins { + if pl, ok := pl.(plugin.PluginDaemon); ok { + err := pl.Close() + if err != nil { + errs = append(errs, fmt.Sprintf( + "error closing plugin %s: %s", + pl.Name(), + err.Error(), + )) + } + } + } + if errs != nil { + return fmt.Errorf(strings.Join(errs, "\n")) + } + return nil +} + +func injectDatastorePlugin(pl plugin.PluginDatastore) error { + return fsrepo.AddDatastoreConfigHandler(pl.DatastoreTypeName(), pl.DatastoreConfigParser()) +} + +func injectIPLDPlugin(pl plugin.PluginIPLD) error { + err := pl.RegisterBlockDecoders(ipld.DefaultBlockDecoder) + if err != nil { + return err + } + return pl.RegisterInputEncParsers(coredag.DefaultInputEncParsers) +} + +func injectTracerPlugin(pl plugin.PluginTracer) error { + tracer, err := pl.InitTracer() + if err != nil { + return err + } + opentracing.SetGlobalTracer(tracer) + return nil +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.go b/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.go new file mode 100644 index 0000000000..730f3538e7 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.go @@ -0,0 +1,20 @@ +package loader + +import ( + "github.com/ipfs/go-ipfs/plugin" + pluginbadgerds "github.com/ipfs/go-ipfs/plugin/plugins/badgerds" + pluginflatfs "github.com/ipfs/go-ipfs/plugin/plugins/flatfs" + pluginipldgit "github.com/ipfs/go-ipfs/plugin/plugins/git" + pluginlevelds "github.com/ipfs/go-ipfs/plugin/plugins/levelds" +) + +// DO NOT EDIT THIS FILE +// This file is being generated as part of plugin build process +// To change it, modify the plugin/loader/preload.sh + +var preloadPlugins = []plugin.Plugin{ + pluginipldgit.Plugins[0], + pluginbadgerds.Plugins[0], + pluginflatfs.Plugins[0], + pluginlevelds.Plugins[0], +} diff --git a/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.sh b/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.sh new file mode 100755 index 0000000000..5d000d0a33 --- /dev/null +++ b/vendor/github.com/ipfs/go-ipfs/plugin/loader/preload.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +to_preload() { + awk 'NF' "$DIR/preload_list" | sed '/^#/d' +} + +cat <= 0; i-- { + xh = c[i](xh) + } + return xh +} + +// HandlerCF wraps the provided final handler func with all the middleware appended to +// the chain and returns a HandlerC instance. +// +// HandlerCF is equivalent to: +// c.HandlerC(xhandler.HandlerFuncC(xhc)) +func (c Chain) HandlerCF(xhc HandlerFuncC) HandlerC { + return c.HandlerC(HandlerFuncC(xhc)) +} diff --git a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/middleware.go b/vendor/github.com/rs/xhandler/middleware.go similarity index 88% rename from vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/middleware.go rename to vendor/github.com/rs/xhandler/middleware.go index 9500ef2e8e..106538a0b7 100644 --- a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/middleware.go +++ b/vendor/github.com/rs/xhandler/middleware.go @@ -1,13 +1,14 @@ package xhandler import ( - "context" "net/http" "time" + + "context" ) -// CloseHandler returns a Handler cancelling the context when the client -// connection close unexpectedly. +// CloseHandler returns a Handler, cancelling the context when the client +// connection closes unexpectedly. func CloseHandler(next HandlerC) HandlerC { return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { // Cancel the context if the client closes the connection @@ -32,7 +33,7 @@ func CloseHandler(next HandlerC) HandlerC { // TimeoutHandler returns a Handler which adds a timeout to the context. // -// Child handlers have the responsability to obey the context deadline and to return +// Child handlers have the responsability of obeying the context deadline and to return // an appropriate error (or not) response in case of timeout. func TimeoutHandler(timeout time.Duration) func(next HandlerC) HandlerC { return func(next HandlerC) HandlerC { diff --git a/vendor/github.com/rs/xhandler/new.go b/vendor/github.com/rs/xhandler/new.go new file mode 100644 index 0000000000..efc6083be4 --- /dev/null +++ b/vendor/github.com/rs/xhandler/new.go @@ -0,0 +1,18 @@ +// +build go1.7 + +package xhandler + +import ( + "net/http" + + "context" +) + +// New creates a conventional http.Handler injecting the provided root +// context to sub handlers. This handler is used as a bridge between conventional +// http.Handler and context aware handlers. +func New(ctx context.Context, h HandlerC) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h.ServeHTTPC(ctx, w, r.WithContext(ctx)) + }) +} diff --git a/vendor/github.com/rs/xhandler/new_pre17.go b/vendor/github.com/rs/xhandler/new_pre17.go new file mode 100644 index 0000000000..7c383bcfa0 --- /dev/null +++ b/vendor/github.com/rs/xhandler/new_pre17.go @@ -0,0 +1,18 @@ +// +build !go1.7 + +package xhandler + +import ( + "net/http" + + "golang.org/x/net/context" +) + +// New creates a conventional http.Handler injecting the provided root +// context to sub handlers. This handler is used as a bridge between conventional +// http.Handler and context aware handlers. +func New(ctx context.Context, h HandlerC) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h.ServeHTTPC(ctx, w, r) + }) +} diff --git a/vendor/github.com/rs/xhandler/xhandler.go b/vendor/github.com/rs/xhandler/xhandler.go new file mode 100644 index 0000000000..7b1076e255 --- /dev/null +++ b/vendor/github.com/rs/xhandler/xhandler.go @@ -0,0 +1,33 @@ +// Package xhandler provides a bridge between http.Handler and net/context. +// +// xhandler enforces net/context in your handlers without sacrificing +// compatibility with existing http.Handlers nor imposing a specific router. +// +// Thanks to net/context deadline management, xhandler is able to enforce +// a per request deadline and will cancel the context in when the client close +// the connection unexpectedly. +// +// You may create net/context aware middlewares pretty much the same way as +// you would with http.Handler. +package xhandler + +import ( + "net/http" + + "context" +) + +// HandlerC is a net/context aware http.Handler +type HandlerC interface { + ServeHTTPC(context.Context, http.ResponseWriter, *http.Request) +} + +// HandlerFuncC type is an adapter to allow the use of ordinary functions +// as an xhandler.Handler. If f is a function with the appropriate signature, +// xhandler.HandlerFuncC(f) is a xhandler.Handler object that calls f. +type HandlerFuncC func(context.Context, http.ResponseWriter, *http.Request) + +// ServeHTTPC calls f(ctx, w, r). +func (f HandlerFuncC) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request) { + f(ctx, w, r) +} diff --git a/vendor/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go index b628880a01..a50c04c60e 100644 --- a/vendor/golang.org/x/net/html/entity.go +++ b/vendor/golang.org/x/net/html/entity.go @@ -75,2083 +75,2083 @@ var entity = map[string]rune{ "Copf;": '\U00002102', "Coproduct;": '\U00002210', "CounterClockwiseContourIntegral;": '\U00002233', - "Cross;": '\U00002A2F', - "Cscr;": '\U0001D49E', - "Cup;": '\U000022D3', - "CupCap;": '\U0000224D', - "DD;": '\U00002145', - "DDotrahd;": '\U00002911', - "DJcy;": '\U00000402', - "DScy;": '\U00000405', - "DZcy;": '\U0000040F', - "Dagger;": '\U00002021', - "Darr;": '\U000021A1', - "Dashv;": '\U00002AE4', - "Dcaron;": '\U0000010E', - "Dcy;": '\U00000414', - "Del;": '\U00002207', - "Delta;": '\U00000394', - "Dfr;": '\U0001D507', - "DiacriticalAcute;": '\U000000B4', - "DiacriticalDot;": '\U000002D9', - "DiacriticalDoubleAcute;": '\U000002DD', - "DiacriticalGrave;": '\U00000060', - "DiacriticalTilde;": '\U000002DC', - "Diamond;": '\U000022C4', - "DifferentialD;": '\U00002146', - "Dopf;": '\U0001D53B', - "Dot;": '\U000000A8', - "DotDot;": '\U000020DC', - "DotEqual;": '\U00002250', - "DoubleContourIntegral;": '\U0000222F', - "DoubleDot;": '\U000000A8', - "DoubleDownArrow;": '\U000021D3', - "DoubleLeftArrow;": '\U000021D0', - "DoubleLeftRightArrow;": '\U000021D4', - "DoubleLeftTee;": '\U00002AE4', - "DoubleLongLeftArrow;": '\U000027F8', - "DoubleLongLeftRightArrow;": '\U000027FA', - "DoubleLongRightArrow;": '\U000027F9', - "DoubleRightArrow;": '\U000021D2', - "DoubleRightTee;": '\U000022A8', - "DoubleUpArrow;": '\U000021D1', - "DoubleUpDownArrow;": '\U000021D5', - "DoubleVerticalBar;": '\U00002225', - "DownArrow;": '\U00002193', - "DownArrowBar;": '\U00002913', - "DownArrowUpArrow;": '\U000021F5', - "DownBreve;": '\U00000311', - "DownLeftRightVector;": '\U00002950', - "DownLeftTeeVector;": '\U0000295E', - "DownLeftVector;": '\U000021BD', - "DownLeftVectorBar;": '\U00002956', - "DownRightTeeVector;": '\U0000295F', - "DownRightVector;": '\U000021C1', - "DownRightVectorBar;": '\U00002957', - "DownTee;": '\U000022A4', - "DownTeeArrow;": '\U000021A7', - "Downarrow;": '\U000021D3', - "Dscr;": '\U0001D49F', - "Dstrok;": '\U00000110', - "ENG;": '\U0000014A', - "ETH;": '\U000000D0', - "Eacute;": '\U000000C9', - "Ecaron;": '\U0000011A', - "Ecirc;": '\U000000CA', - "Ecy;": '\U0000042D', - "Edot;": '\U00000116', - "Efr;": '\U0001D508', - "Egrave;": '\U000000C8', - "Element;": '\U00002208', - "Emacr;": '\U00000112', - "EmptySmallSquare;": '\U000025FB', - "EmptyVerySmallSquare;": '\U000025AB', - "Eogon;": '\U00000118', - "Eopf;": '\U0001D53C', - "Epsilon;": '\U00000395', - "Equal;": '\U00002A75', - "EqualTilde;": '\U00002242', - "Equilibrium;": '\U000021CC', - "Escr;": '\U00002130', - "Esim;": '\U00002A73', - "Eta;": '\U00000397', - "Euml;": '\U000000CB', - "Exists;": '\U00002203', - "ExponentialE;": '\U00002147', - "Fcy;": '\U00000424', - "Ffr;": '\U0001D509', - "FilledSmallSquare;": '\U000025FC', - "FilledVerySmallSquare;": '\U000025AA', - "Fopf;": '\U0001D53D', - "ForAll;": '\U00002200', - "Fouriertrf;": '\U00002131', - "Fscr;": '\U00002131', - "GJcy;": '\U00000403', - "GT;": '\U0000003E', - "Gamma;": '\U00000393', - "Gammad;": '\U000003DC', - "Gbreve;": '\U0000011E', - "Gcedil;": '\U00000122', - "Gcirc;": '\U0000011C', - "Gcy;": '\U00000413', - "Gdot;": '\U00000120', - "Gfr;": '\U0001D50A', - "Gg;": '\U000022D9', - "Gopf;": '\U0001D53E', - "GreaterEqual;": '\U00002265', - "GreaterEqualLess;": '\U000022DB', - "GreaterFullEqual;": '\U00002267', - "GreaterGreater;": '\U00002AA2', - "GreaterLess;": '\U00002277', - "GreaterSlantEqual;": '\U00002A7E', - "GreaterTilde;": '\U00002273', - "Gscr;": '\U0001D4A2', - "Gt;": '\U0000226B', - "HARDcy;": '\U0000042A', - "Hacek;": '\U000002C7', - "Hat;": '\U0000005E', - "Hcirc;": '\U00000124', - "Hfr;": '\U0000210C', - "HilbertSpace;": '\U0000210B', - "Hopf;": '\U0000210D', - "HorizontalLine;": '\U00002500', - "Hscr;": '\U0000210B', - "Hstrok;": '\U00000126', - "HumpDownHump;": '\U0000224E', - "HumpEqual;": '\U0000224F', - "IEcy;": '\U00000415', - "IJlig;": '\U00000132', - "IOcy;": '\U00000401', - "Iacute;": '\U000000CD', - "Icirc;": '\U000000CE', - "Icy;": '\U00000418', - "Idot;": '\U00000130', - "Ifr;": '\U00002111', - "Igrave;": '\U000000CC', - "Im;": '\U00002111', - "Imacr;": '\U0000012A', - "ImaginaryI;": '\U00002148', - "Implies;": '\U000021D2', - "Int;": '\U0000222C', - "Integral;": '\U0000222B', - "Intersection;": '\U000022C2', - "InvisibleComma;": '\U00002063', - "InvisibleTimes;": '\U00002062', - "Iogon;": '\U0000012E', - "Iopf;": '\U0001D540', - "Iota;": '\U00000399', - "Iscr;": '\U00002110', - "Itilde;": '\U00000128', - "Iukcy;": '\U00000406', - "Iuml;": '\U000000CF', - "Jcirc;": '\U00000134', - "Jcy;": '\U00000419', - "Jfr;": '\U0001D50D', - "Jopf;": '\U0001D541', - "Jscr;": '\U0001D4A5', - "Jsercy;": '\U00000408', - "Jukcy;": '\U00000404', - "KHcy;": '\U00000425', - "KJcy;": '\U0000040C', - "Kappa;": '\U0000039A', - "Kcedil;": '\U00000136', - "Kcy;": '\U0000041A', - "Kfr;": '\U0001D50E', - "Kopf;": '\U0001D542', - "Kscr;": '\U0001D4A6', - "LJcy;": '\U00000409', - "LT;": '\U0000003C', - "Lacute;": '\U00000139', - "Lambda;": '\U0000039B', - "Lang;": '\U000027EA', - "Laplacetrf;": '\U00002112', - "Larr;": '\U0000219E', - "Lcaron;": '\U0000013D', - "Lcedil;": '\U0000013B', - "Lcy;": '\U0000041B', - "LeftAngleBracket;": '\U000027E8', - "LeftArrow;": '\U00002190', - "LeftArrowBar;": '\U000021E4', - "LeftArrowRightArrow;": '\U000021C6', - "LeftCeiling;": '\U00002308', - "LeftDoubleBracket;": '\U000027E6', - "LeftDownTeeVector;": '\U00002961', - "LeftDownVector;": '\U000021C3', - "LeftDownVectorBar;": '\U00002959', - "LeftFloor;": '\U0000230A', - "LeftRightArrow;": '\U00002194', - "LeftRightVector;": '\U0000294E', - "LeftTee;": '\U000022A3', - "LeftTeeArrow;": '\U000021A4', - "LeftTeeVector;": '\U0000295A', - "LeftTriangle;": '\U000022B2', - "LeftTriangleBar;": '\U000029CF', - "LeftTriangleEqual;": '\U000022B4', - "LeftUpDownVector;": '\U00002951', - "LeftUpTeeVector;": '\U00002960', - "LeftUpVector;": '\U000021BF', - "LeftUpVectorBar;": '\U00002958', - "LeftVector;": '\U000021BC', - "LeftVectorBar;": '\U00002952', - "Leftarrow;": '\U000021D0', - "Leftrightarrow;": '\U000021D4', - "LessEqualGreater;": '\U000022DA', - "LessFullEqual;": '\U00002266', - "LessGreater;": '\U00002276', - "LessLess;": '\U00002AA1', - "LessSlantEqual;": '\U00002A7D', - "LessTilde;": '\U00002272', - "Lfr;": '\U0001D50F', - "Ll;": '\U000022D8', - "Lleftarrow;": '\U000021DA', - "Lmidot;": '\U0000013F', - "LongLeftArrow;": '\U000027F5', - "LongLeftRightArrow;": '\U000027F7', - "LongRightArrow;": '\U000027F6', - "Longleftarrow;": '\U000027F8', - "Longleftrightarrow;": '\U000027FA', - "Longrightarrow;": '\U000027F9', - "Lopf;": '\U0001D543', - "LowerLeftArrow;": '\U00002199', - "LowerRightArrow;": '\U00002198', - "Lscr;": '\U00002112', - "Lsh;": '\U000021B0', - "Lstrok;": '\U00000141', - "Lt;": '\U0000226A', - "Map;": '\U00002905', - "Mcy;": '\U0000041C', - "MediumSpace;": '\U0000205F', - "Mellintrf;": '\U00002133', - "Mfr;": '\U0001D510', - "MinusPlus;": '\U00002213', - "Mopf;": '\U0001D544', - "Mscr;": '\U00002133', - "Mu;": '\U0000039C', - "NJcy;": '\U0000040A', - "Nacute;": '\U00000143', - "Ncaron;": '\U00000147', - "Ncedil;": '\U00000145', - "Ncy;": '\U0000041D', - "NegativeMediumSpace;": '\U0000200B', - "NegativeThickSpace;": '\U0000200B', - "NegativeThinSpace;": '\U0000200B', - "NegativeVeryThinSpace;": '\U0000200B', - "NestedGreaterGreater;": '\U0000226B', - "NestedLessLess;": '\U0000226A', - "NewLine;": '\U0000000A', - "Nfr;": '\U0001D511', - "NoBreak;": '\U00002060', - "NonBreakingSpace;": '\U000000A0', - "Nopf;": '\U00002115', - "Not;": '\U00002AEC', - "NotCongruent;": '\U00002262', - "NotCupCap;": '\U0000226D', - "NotDoubleVerticalBar;": '\U00002226', - "NotElement;": '\U00002209', - "NotEqual;": '\U00002260', - "NotExists;": '\U00002204', - "NotGreater;": '\U0000226F', - "NotGreaterEqual;": '\U00002271', - "NotGreaterLess;": '\U00002279', - "NotGreaterTilde;": '\U00002275', - "NotLeftTriangle;": '\U000022EA', - "NotLeftTriangleEqual;": '\U000022EC', - "NotLess;": '\U0000226E', - "NotLessEqual;": '\U00002270', - "NotLessGreater;": '\U00002278', - "NotLessTilde;": '\U00002274', - "NotPrecedes;": '\U00002280', - "NotPrecedesSlantEqual;": '\U000022E0', - "NotReverseElement;": '\U0000220C', - "NotRightTriangle;": '\U000022EB', - "NotRightTriangleEqual;": '\U000022ED', - "NotSquareSubsetEqual;": '\U000022E2', - "NotSquareSupersetEqual;": '\U000022E3', - "NotSubsetEqual;": '\U00002288', - "NotSucceeds;": '\U00002281', - "NotSucceedsSlantEqual;": '\U000022E1', - "NotSupersetEqual;": '\U00002289', - "NotTilde;": '\U00002241', - "NotTildeEqual;": '\U00002244', - "NotTildeFullEqual;": '\U00002247', - "NotTildeTilde;": '\U00002249', - "NotVerticalBar;": '\U00002224', - "Nscr;": '\U0001D4A9', - "Ntilde;": '\U000000D1', - "Nu;": '\U0000039D', - "OElig;": '\U00000152', - "Oacute;": '\U000000D3', - "Ocirc;": '\U000000D4', - "Ocy;": '\U0000041E', - "Odblac;": '\U00000150', - "Ofr;": '\U0001D512', - "Ograve;": '\U000000D2', - "Omacr;": '\U0000014C', - "Omega;": '\U000003A9', - "Omicron;": '\U0000039F', - "Oopf;": '\U0001D546', - "OpenCurlyDoubleQuote;": '\U0000201C', - "OpenCurlyQuote;": '\U00002018', - "Or;": '\U00002A54', - "Oscr;": '\U0001D4AA', - "Oslash;": '\U000000D8', - "Otilde;": '\U000000D5', - "Otimes;": '\U00002A37', - "Ouml;": '\U000000D6', - "OverBar;": '\U0000203E', - "OverBrace;": '\U000023DE', - "OverBracket;": '\U000023B4', - "OverParenthesis;": '\U000023DC', - "PartialD;": '\U00002202', - "Pcy;": '\U0000041F', - "Pfr;": '\U0001D513', - "Phi;": '\U000003A6', - "Pi;": '\U000003A0', - "PlusMinus;": '\U000000B1', - "Poincareplane;": '\U0000210C', - "Popf;": '\U00002119', - "Pr;": '\U00002ABB', - "Precedes;": '\U0000227A', - "PrecedesEqual;": '\U00002AAF', - "PrecedesSlantEqual;": '\U0000227C', - "PrecedesTilde;": '\U0000227E', - "Prime;": '\U00002033', - "Product;": '\U0000220F', - "Proportion;": '\U00002237', - "Proportional;": '\U0000221D', - "Pscr;": '\U0001D4AB', - "Psi;": '\U000003A8', - "QUOT;": '\U00000022', - "Qfr;": '\U0001D514', - "Qopf;": '\U0000211A', - "Qscr;": '\U0001D4AC', - "RBarr;": '\U00002910', - "REG;": '\U000000AE', - "Racute;": '\U00000154', - "Rang;": '\U000027EB', - "Rarr;": '\U000021A0', - "Rarrtl;": '\U00002916', - "Rcaron;": '\U00000158', - "Rcedil;": '\U00000156', - "Rcy;": '\U00000420', - "Re;": '\U0000211C', - "ReverseElement;": '\U0000220B', - "ReverseEquilibrium;": '\U000021CB', - "ReverseUpEquilibrium;": '\U0000296F', - "Rfr;": '\U0000211C', - "Rho;": '\U000003A1', - "RightAngleBracket;": '\U000027E9', - "RightArrow;": '\U00002192', - "RightArrowBar;": '\U000021E5', - "RightArrowLeftArrow;": '\U000021C4', - "RightCeiling;": '\U00002309', - "RightDoubleBracket;": '\U000027E7', - "RightDownTeeVector;": '\U0000295D', - "RightDownVector;": '\U000021C2', - "RightDownVectorBar;": '\U00002955', - "RightFloor;": '\U0000230B', - "RightTee;": '\U000022A2', - "RightTeeArrow;": '\U000021A6', - "RightTeeVector;": '\U0000295B', - "RightTriangle;": '\U000022B3', - "RightTriangleBar;": '\U000029D0', - "RightTriangleEqual;": '\U000022B5', - "RightUpDownVector;": '\U0000294F', - "RightUpTeeVector;": '\U0000295C', - "RightUpVector;": '\U000021BE', - "RightUpVectorBar;": '\U00002954', - "RightVector;": '\U000021C0', - "RightVectorBar;": '\U00002953', - "Rightarrow;": '\U000021D2', - "Ropf;": '\U0000211D', - "RoundImplies;": '\U00002970', - "Rrightarrow;": '\U000021DB', - "Rscr;": '\U0000211B', - "Rsh;": '\U000021B1', - "RuleDelayed;": '\U000029F4', - "SHCHcy;": '\U00000429', - "SHcy;": '\U00000428', - "SOFTcy;": '\U0000042C', - "Sacute;": '\U0000015A', - "Sc;": '\U00002ABC', - "Scaron;": '\U00000160', - "Scedil;": '\U0000015E', - "Scirc;": '\U0000015C', - "Scy;": '\U00000421', - "Sfr;": '\U0001D516', - "ShortDownArrow;": '\U00002193', - "ShortLeftArrow;": '\U00002190', - "ShortRightArrow;": '\U00002192', - "ShortUpArrow;": '\U00002191', - "Sigma;": '\U000003A3', - "SmallCircle;": '\U00002218', - "Sopf;": '\U0001D54A', - "Sqrt;": '\U0000221A', - "Square;": '\U000025A1', - "SquareIntersection;": '\U00002293', - "SquareSubset;": '\U0000228F', - "SquareSubsetEqual;": '\U00002291', - "SquareSuperset;": '\U00002290', - "SquareSupersetEqual;": '\U00002292', - "SquareUnion;": '\U00002294', - "Sscr;": '\U0001D4AE', - "Star;": '\U000022C6', - "Sub;": '\U000022D0', - "Subset;": '\U000022D0', - "SubsetEqual;": '\U00002286', - "Succeeds;": '\U0000227B', - "SucceedsEqual;": '\U00002AB0', - "SucceedsSlantEqual;": '\U0000227D', - "SucceedsTilde;": '\U0000227F', - "SuchThat;": '\U0000220B', - "Sum;": '\U00002211', - "Sup;": '\U000022D1', - "Superset;": '\U00002283', - "SupersetEqual;": '\U00002287', - "Supset;": '\U000022D1', - "THORN;": '\U000000DE', - "TRADE;": '\U00002122', - "TSHcy;": '\U0000040B', - "TScy;": '\U00000426', - "Tab;": '\U00000009', - "Tau;": '\U000003A4', - "Tcaron;": '\U00000164', - "Tcedil;": '\U00000162', - "Tcy;": '\U00000422', - "Tfr;": '\U0001D517', - "Therefore;": '\U00002234', - "Theta;": '\U00000398', - "ThinSpace;": '\U00002009', - "Tilde;": '\U0000223C', - "TildeEqual;": '\U00002243', - "TildeFullEqual;": '\U00002245', - "TildeTilde;": '\U00002248', - "Topf;": '\U0001D54B', - "TripleDot;": '\U000020DB', - "Tscr;": '\U0001D4AF', - "Tstrok;": '\U00000166', - "Uacute;": '\U000000DA', - "Uarr;": '\U0000219F', - "Uarrocir;": '\U00002949', - "Ubrcy;": '\U0000040E', - "Ubreve;": '\U0000016C', - "Ucirc;": '\U000000DB', - "Ucy;": '\U00000423', - "Udblac;": '\U00000170', - "Ufr;": '\U0001D518', - "Ugrave;": '\U000000D9', - "Umacr;": '\U0000016A', - "UnderBar;": '\U0000005F', - "UnderBrace;": '\U000023DF', - "UnderBracket;": '\U000023B5', - "UnderParenthesis;": '\U000023DD', - "Union;": '\U000022C3', - "UnionPlus;": '\U0000228E', - "Uogon;": '\U00000172', - "Uopf;": '\U0001D54C', - "UpArrow;": '\U00002191', - "UpArrowBar;": '\U00002912', - "UpArrowDownArrow;": '\U000021C5', - "UpDownArrow;": '\U00002195', - "UpEquilibrium;": '\U0000296E', - "UpTee;": '\U000022A5', - "UpTeeArrow;": '\U000021A5', - "Uparrow;": '\U000021D1', - "Updownarrow;": '\U000021D5', - "UpperLeftArrow;": '\U00002196', - "UpperRightArrow;": '\U00002197', - "Upsi;": '\U000003D2', - "Upsilon;": '\U000003A5', - "Uring;": '\U0000016E', - "Uscr;": '\U0001D4B0', - "Utilde;": '\U00000168', - "Uuml;": '\U000000DC', - "VDash;": '\U000022AB', - "Vbar;": '\U00002AEB', - "Vcy;": '\U00000412', - "Vdash;": '\U000022A9', - "Vdashl;": '\U00002AE6', - "Vee;": '\U000022C1', - "Verbar;": '\U00002016', - "Vert;": '\U00002016', - "VerticalBar;": '\U00002223', - "VerticalLine;": '\U0000007C', - "VerticalSeparator;": '\U00002758', - "VerticalTilde;": '\U00002240', - "VeryThinSpace;": '\U0000200A', - "Vfr;": '\U0001D519', - "Vopf;": '\U0001D54D', - "Vscr;": '\U0001D4B1', - "Vvdash;": '\U000022AA', - "Wcirc;": '\U00000174', - "Wedge;": '\U000022C0', - "Wfr;": '\U0001D51A', - "Wopf;": '\U0001D54E', - "Wscr;": '\U0001D4B2', - "Xfr;": '\U0001D51B', - "Xi;": '\U0000039E', - "Xopf;": '\U0001D54F', - "Xscr;": '\U0001D4B3', - "YAcy;": '\U0000042F', - "YIcy;": '\U00000407', - "YUcy;": '\U0000042E', - "Yacute;": '\U000000DD', - "Ycirc;": '\U00000176', - "Ycy;": '\U0000042B', - "Yfr;": '\U0001D51C', - "Yopf;": '\U0001D550', - "Yscr;": '\U0001D4B4', - "Yuml;": '\U00000178', - "ZHcy;": '\U00000416', - "Zacute;": '\U00000179', - "Zcaron;": '\U0000017D', - "Zcy;": '\U00000417', - "Zdot;": '\U0000017B', - "ZeroWidthSpace;": '\U0000200B', - "Zeta;": '\U00000396', - "Zfr;": '\U00002128', - "Zopf;": '\U00002124', - "Zscr;": '\U0001D4B5', - "aacute;": '\U000000E1', - "abreve;": '\U00000103', - "ac;": '\U0000223E', - "acd;": '\U0000223F', - "acirc;": '\U000000E2', - "acute;": '\U000000B4', - "acy;": '\U00000430', - "aelig;": '\U000000E6', - "af;": '\U00002061', - "afr;": '\U0001D51E', - "agrave;": '\U000000E0', - "alefsym;": '\U00002135', - "aleph;": '\U00002135', - "alpha;": '\U000003B1', - "amacr;": '\U00000101', - "amalg;": '\U00002A3F', - "amp;": '\U00000026', - "and;": '\U00002227', - "andand;": '\U00002A55', - "andd;": '\U00002A5C', - "andslope;": '\U00002A58', - "andv;": '\U00002A5A', - "ang;": '\U00002220', - "ange;": '\U000029A4', - "angle;": '\U00002220', - "angmsd;": '\U00002221', - "angmsdaa;": '\U000029A8', - "angmsdab;": '\U000029A9', - "angmsdac;": '\U000029AA', - "angmsdad;": '\U000029AB', - "angmsdae;": '\U000029AC', - "angmsdaf;": '\U000029AD', - "angmsdag;": '\U000029AE', - "angmsdah;": '\U000029AF', - "angrt;": '\U0000221F', - "angrtvb;": '\U000022BE', - "angrtvbd;": '\U0000299D', - "angsph;": '\U00002222', - "angst;": '\U000000C5', - "angzarr;": '\U0000237C', - "aogon;": '\U00000105', - "aopf;": '\U0001D552', - "ap;": '\U00002248', - "apE;": '\U00002A70', - "apacir;": '\U00002A6F', - "ape;": '\U0000224A', - "apid;": '\U0000224B', - "apos;": '\U00000027', - "approx;": '\U00002248', - "approxeq;": '\U0000224A', - "aring;": '\U000000E5', - "ascr;": '\U0001D4B6', - "ast;": '\U0000002A', - "asymp;": '\U00002248', - "asympeq;": '\U0000224D', - "atilde;": '\U000000E3', - "auml;": '\U000000E4', - "awconint;": '\U00002233', - "awint;": '\U00002A11', - "bNot;": '\U00002AED', - "backcong;": '\U0000224C', - "backepsilon;": '\U000003F6', - "backprime;": '\U00002035', - "backsim;": '\U0000223D', - "backsimeq;": '\U000022CD', - "barvee;": '\U000022BD', - "barwed;": '\U00002305', - "barwedge;": '\U00002305', - "bbrk;": '\U000023B5', - "bbrktbrk;": '\U000023B6', - "bcong;": '\U0000224C', - "bcy;": '\U00000431', - "bdquo;": '\U0000201E', - "becaus;": '\U00002235', - "because;": '\U00002235', - "bemptyv;": '\U000029B0', - "bepsi;": '\U000003F6', - "bernou;": '\U0000212C', - "beta;": '\U000003B2', - "beth;": '\U00002136', - "between;": '\U0000226C', - "bfr;": '\U0001D51F', - "bigcap;": '\U000022C2', - "bigcirc;": '\U000025EF', - "bigcup;": '\U000022C3', - "bigodot;": '\U00002A00', - "bigoplus;": '\U00002A01', - "bigotimes;": '\U00002A02', - "bigsqcup;": '\U00002A06', - "bigstar;": '\U00002605', - "bigtriangledown;": '\U000025BD', - "bigtriangleup;": '\U000025B3', - "biguplus;": '\U00002A04', - "bigvee;": '\U000022C1', - "bigwedge;": '\U000022C0', - "bkarow;": '\U0000290D', - "blacklozenge;": '\U000029EB', - "blacksquare;": '\U000025AA', - "blacktriangle;": '\U000025B4', - "blacktriangledown;": '\U000025BE', - "blacktriangleleft;": '\U000025C2', - "blacktriangleright;": '\U000025B8', - "blank;": '\U00002423', - "blk12;": '\U00002592', - "blk14;": '\U00002591', - "blk34;": '\U00002593', - "block;": '\U00002588', - "bnot;": '\U00002310', - "bopf;": '\U0001D553', - "bot;": '\U000022A5', - "bottom;": '\U000022A5', - "bowtie;": '\U000022C8', - "boxDL;": '\U00002557', - "boxDR;": '\U00002554', - "boxDl;": '\U00002556', - "boxDr;": '\U00002553', - "boxH;": '\U00002550', - "boxHD;": '\U00002566', - "boxHU;": '\U00002569', - "boxHd;": '\U00002564', - "boxHu;": '\U00002567', - "boxUL;": '\U0000255D', - "boxUR;": '\U0000255A', - "boxUl;": '\U0000255C', - "boxUr;": '\U00002559', - "boxV;": '\U00002551', - "boxVH;": '\U0000256C', - "boxVL;": '\U00002563', - "boxVR;": '\U00002560', - "boxVh;": '\U0000256B', - "boxVl;": '\U00002562', - "boxVr;": '\U0000255F', - "boxbox;": '\U000029C9', - "boxdL;": '\U00002555', - "boxdR;": '\U00002552', - "boxdl;": '\U00002510', - "boxdr;": '\U0000250C', - "boxh;": '\U00002500', - "boxhD;": '\U00002565', - "boxhU;": '\U00002568', - "boxhd;": '\U0000252C', - "boxhu;": '\U00002534', - "boxminus;": '\U0000229F', - "boxplus;": '\U0000229E', - "boxtimes;": '\U000022A0', - "boxuL;": '\U0000255B', - "boxuR;": '\U00002558', - "boxul;": '\U00002518', - "boxur;": '\U00002514', - "boxv;": '\U00002502', - "boxvH;": '\U0000256A', - "boxvL;": '\U00002561', - "boxvR;": '\U0000255E', - "boxvh;": '\U0000253C', - "boxvl;": '\U00002524', - "boxvr;": '\U0000251C', - "bprime;": '\U00002035', - "breve;": '\U000002D8', - "brvbar;": '\U000000A6', - "bscr;": '\U0001D4B7', - "bsemi;": '\U0000204F', - "bsim;": '\U0000223D', - "bsime;": '\U000022CD', - "bsol;": '\U0000005C', - "bsolb;": '\U000029C5', - "bsolhsub;": '\U000027C8', - "bull;": '\U00002022', - "bullet;": '\U00002022', - "bump;": '\U0000224E', - "bumpE;": '\U00002AAE', - "bumpe;": '\U0000224F', - "bumpeq;": '\U0000224F', - "cacute;": '\U00000107', - "cap;": '\U00002229', - "capand;": '\U00002A44', - "capbrcup;": '\U00002A49', - "capcap;": '\U00002A4B', - "capcup;": '\U00002A47', - "capdot;": '\U00002A40', - "caret;": '\U00002041', - "caron;": '\U000002C7', - "ccaps;": '\U00002A4D', - "ccaron;": '\U0000010D', - "ccedil;": '\U000000E7', - "ccirc;": '\U00000109', - "ccups;": '\U00002A4C', - "ccupssm;": '\U00002A50', - "cdot;": '\U0000010B', - "cedil;": '\U000000B8', - "cemptyv;": '\U000029B2', - "cent;": '\U000000A2', - "centerdot;": '\U000000B7', - "cfr;": '\U0001D520', - "chcy;": '\U00000447', - "check;": '\U00002713', - "checkmark;": '\U00002713', - "chi;": '\U000003C7', - "cir;": '\U000025CB', - "cirE;": '\U000029C3', - "circ;": '\U000002C6', - "circeq;": '\U00002257', - "circlearrowleft;": '\U000021BA', - "circlearrowright;": '\U000021BB', - "circledR;": '\U000000AE', - "circledS;": '\U000024C8', - "circledast;": '\U0000229B', - "circledcirc;": '\U0000229A', - "circleddash;": '\U0000229D', - "cire;": '\U00002257', - "cirfnint;": '\U00002A10', - "cirmid;": '\U00002AEF', - "cirscir;": '\U000029C2', - "clubs;": '\U00002663', - "clubsuit;": '\U00002663', - "colon;": '\U0000003A', - "colone;": '\U00002254', - "coloneq;": '\U00002254', - "comma;": '\U0000002C', - "commat;": '\U00000040', - "comp;": '\U00002201', - "compfn;": '\U00002218', - "complement;": '\U00002201', - "complexes;": '\U00002102', - "cong;": '\U00002245', - "congdot;": '\U00002A6D', - "conint;": '\U0000222E', - "copf;": '\U0001D554', - "coprod;": '\U00002210', - "copy;": '\U000000A9', - "copysr;": '\U00002117', - "crarr;": '\U000021B5', - "cross;": '\U00002717', - "cscr;": '\U0001D4B8', - "csub;": '\U00002ACF', - "csube;": '\U00002AD1', - "csup;": '\U00002AD0', - "csupe;": '\U00002AD2', - "ctdot;": '\U000022EF', - "cudarrl;": '\U00002938', - "cudarrr;": '\U00002935', - "cuepr;": '\U000022DE', - "cuesc;": '\U000022DF', - "cularr;": '\U000021B6', - "cularrp;": '\U0000293D', - "cup;": '\U0000222A', - "cupbrcap;": '\U00002A48', - "cupcap;": '\U00002A46', - "cupcup;": '\U00002A4A', - "cupdot;": '\U0000228D', - "cupor;": '\U00002A45', - "curarr;": '\U000021B7', - "curarrm;": '\U0000293C', - "curlyeqprec;": '\U000022DE', - "curlyeqsucc;": '\U000022DF', - "curlyvee;": '\U000022CE', - "curlywedge;": '\U000022CF', - "curren;": '\U000000A4', - "curvearrowleft;": '\U000021B6', - "curvearrowright;": '\U000021B7', - "cuvee;": '\U000022CE', - "cuwed;": '\U000022CF', - "cwconint;": '\U00002232', - "cwint;": '\U00002231', - "cylcty;": '\U0000232D', - "dArr;": '\U000021D3', - "dHar;": '\U00002965', - "dagger;": '\U00002020', - "daleth;": '\U00002138', - "darr;": '\U00002193', - "dash;": '\U00002010', - "dashv;": '\U000022A3', - "dbkarow;": '\U0000290F', - "dblac;": '\U000002DD', - "dcaron;": '\U0000010F', - "dcy;": '\U00000434', - "dd;": '\U00002146', - "ddagger;": '\U00002021', - "ddarr;": '\U000021CA', - "ddotseq;": '\U00002A77', - "deg;": '\U000000B0', - "delta;": '\U000003B4', - "demptyv;": '\U000029B1', - "dfisht;": '\U0000297F', - "dfr;": '\U0001D521', - "dharl;": '\U000021C3', - "dharr;": '\U000021C2', - "diam;": '\U000022C4', - "diamond;": '\U000022C4', - "diamondsuit;": '\U00002666', - "diams;": '\U00002666', - "die;": '\U000000A8', - "digamma;": '\U000003DD', - "disin;": '\U000022F2', - "div;": '\U000000F7', - "divide;": '\U000000F7', - "divideontimes;": '\U000022C7', - "divonx;": '\U000022C7', - "djcy;": '\U00000452', - "dlcorn;": '\U0000231E', - "dlcrop;": '\U0000230D', - "dollar;": '\U00000024', - "dopf;": '\U0001D555', - "dot;": '\U000002D9', - "doteq;": '\U00002250', - "doteqdot;": '\U00002251', - "dotminus;": '\U00002238', - "dotplus;": '\U00002214', - "dotsquare;": '\U000022A1', - "doublebarwedge;": '\U00002306', - "downarrow;": '\U00002193', - "downdownarrows;": '\U000021CA', - "downharpoonleft;": '\U000021C3', - "downharpoonright;": '\U000021C2', - "drbkarow;": '\U00002910', - "drcorn;": '\U0000231F', - "drcrop;": '\U0000230C', - "dscr;": '\U0001D4B9', - "dscy;": '\U00000455', - "dsol;": '\U000029F6', - "dstrok;": '\U00000111', - "dtdot;": '\U000022F1', - "dtri;": '\U000025BF', - "dtrif;": '\U000025BE', - "duarr;": '\U000021F5', - "duhar;": '\U0000296F', - "dwangle;": '\U000029A6', - "dzcy;": '\U0000045F', - "dzigrarr;": '\U000027FF', - "eDDot;": '\U00002A77', - "eDot;": '\U00002251', - "eacute;": '\U000000E9', - "easter;": '\U00002A6E', - "ecaron;": '\U0000011B', - "ecir;": '\U00002256', - "ecirc;": '\U000000EA', - "ecolon;": '\U00002255', - "ecy;": '\U0000044D', - "edot;": '\U00000117', - "ee;": '\U00002147', - "efDot;": '\U00002252', - "efr;": '\U0001D522', - "eg;": '\U00002A9A', - "egrave;": '\U000000E8', - "egs;": '\U00002A96', - "egsdot;": '\U00002A98', - "el;": '\U00002A99', - "elinters;": '\U000023E7', - "ell;": '\U00002113', - "els;": '\U00002A95', - "elsdot;": '\U00002A97', - "emacr;": '\U00000113', - "empty;": '\U00002205', - "emptyset;": '\U00002205', - "emptyv;": '\U00002205', - "emsp;": '\U00002003', - "emsp13;": '\U00002004', - "emsp14;": '\U00002005', - "eng;": '\U0000014B', - "ensp;": '\U00002002', - "eogon;": '\U00000119', - "eopf;": '\U0001D556', - "epar;": '\U000022D5', - "eparsl;": '\U000029E3', - "eplus;": '\U00002A71', - "epsi;": '\U000003B5', - "epsilon;": '\U000003B5', - "epsiv;": '\U000003F5', - "eqcirc;": '\U00002256', - "eqcolon;": '\U00002255', - "eqsim;": '\U00002242', - "eqslantgtr;": '\U00002A96', - "eqslantless;": '\U00002A95', - "equals;": '\U0000003D', - "equest;": '\U0000225F', - "equiv;": '\U00002261', - "equivDD;": '\U00002A78', - "eqvparsl;": '\U000029E5', - "erDot;": '\U00002253', - "erarr;": '\U00002971', - "escr;": '\U0000212F', - "esdot;": '\U00002250', - "esim;": '\U00002242', - "eta;": '\U000003B7', - "eth;": '\U000000F0', - "euml;": '\U000000EB', - "euro;": '\U000020AC', - "excl;": '\U00000021', - "exist;": '\U00002203', - "expectation;": '\U00002130', - "exponentiale;": '\U00002147', - "fallingdotseq;": '\U00002252', - "fcy;": '\U00000444', - "female;": '\U00002640', - "ffilig;": '\U0000FB03', - "fflig;": '\U0000FB00', - "ffllig;": '\U0000FB04', - "ffr;": '\U0001D523', - "filig;": '\U0000FB01', - "flat;": '\U0000266D', - "fllig;": '\U0000FB02', - "fltns;": '\U000025B1', - "fnof;": '\U00000192', - "fopf;": '\U0001D557', - "forall;": '\U00002200', - "fork;": '\U000022D4', - "forkv;": '\U00002AD9', - "fpartint;": '\U00002A0D', - "frac12;": '\U000000BD', - "frac13;": '\U00002153', - "frac14;": '\U000000BC', - "frac15;": '\U00002155', - "frac16;": '\U00002159', - "frac18;": '\U0000215B', - "frac23;": '\U00002154', - "frac25;": '\U00002156', - "frac34;": '\U000000BE', - "frac35;": '\U00002157', - "frac38;": '\U0000215C', - "frac45;": '\U00002158', - "frac56;": '\U0000215A', - "frac58;": '\U0000215D', - "frac78;": '\U0000215E', - "frasl;": '\U00002044', - "frown;": '\U00002322', - "fscr;": '\U0001D4BB', - "gE;": '\U00002267', - "gEl;": '\U00002A8C', - "gacute;": '\U000001F5', - "gamma;": '\U000003B3', - "gammad;": '\U000003DD', - "gap;": '\U00002A86', - "gbreve;": '\U0000011F', - "gcirc;": '\U0000011D', - "gcy;": '\U00000433', - "gdot;": '\U00000121', - "ge;": '\U00002265', - "gel;": '\U000022DB', - "geq;": '\U00002265', - "geqq;": '\U00002267', - "geqslant;": '\U00002A7E', - "ges;": '\U00002A7E', - "gescc;": '\U00002AA9', - "gesdot;": '\U00002A80', - "gesdoto;": '\U00002A82', - "gesdotol;": '\U00002A84', - "gesles;": '\U00002A94', - "gfr;": '\U0001D524', - "gg;": '\U0000226B', - "ggg;": '\U000022D9', - "gimel;": '\U00002137', - "gjcy;": '\U00000453', - "gl;": '\U00002277', - "glE;": '\U00002A92', - "gla;": '\U00002AA5', - "glj;": '\U00002AA4', - "gnE;": '\U00002269', - "gnap;": '\U00002A8A', - "gnapprox;": '\U00002A8A', - "gne;": '\U00002A88', - "gneq;": '\U00002A88', - "gneqq;": '\U00002269', - "gnsim;": '\U000022E7', - "gopf;": '\U0001D558', - "grave;": '\U00000060', - "gscr;": '\U0000210A', - "gsim;": '\U00002273', - "gsime;": '\U00002A8E', - "gsiml;": '\U00002A90', - "gt;": '\U0000003E', - "gtcc;": '\U00002AA7', - "gtcir;": '\U00002A7A', - "gtdot;": '\U000022D7', - "gtlPar;": '\U00002995', - "gtquest;": '\U00002A7C', - "gtrapprox;": '\U00002A86', - "gtrarr;": '\U00002978', - "gtrdot;": '\U000022D7', - "gtreqless;": '\U000022DB', - "gtreqqless;": '\U00002A8C', - "gtrless;": '\U00002277', - "gtrsim;": '\U00002273', - "hArr;": '\U000021D4', - "hairsp;": '\U0000200A', - "half;": '\U000000BD', - "hamilt;": '\U0000210B', - "hardcy;": '\U0000044A', - "harr;": '\U00002194', - "harrcir;": '\U00002948', - "harrw;": '\U000021AD', - "hbar;": '\U0000210F', - "hcirc;": '\U00000125', - "hearts;": '\U00002665', - "heartsuit;": '\U00002665', - "hellip;": '\U00002026', - "hercon;": '\U000022B9', - "hfr;": '\U0001D525', - "hksearow;": '\U00002925', - "hkswarow;": '\U00002926', - "hoarr;": '\U000021FF', - "homtht;": '\U0000223B', - "hookleftarrow;": '\U000021A9', - "hookrightarrow;": '\U000021AA', - "hopf;": '\U0001D559', - "horbar;": '\U00002015', - "hscr;": '\U0001D4BD', - "hslash;": '\U0000210F', - "hstrok;": '\U00000127', - "hybull;": '\U00002043', - "hyphen;": '\U00002010', - "iacute;": '\U000000ED', - "ic;": '\U00002063', - "icirc;": '\U000000EE', - "icy;": '\U00000438', - "iecy;": '\U00000435', - "iexcl;": '\U000000A1', - "iff;": '\U000021D4', - "ifr;": '\U0001D526', - "igrave;": '\U000000EC', - "ii;": '\U00002148', - "iiiint;": '\U00002A0C', - "iiint;": '\U0000222D', - "iinfin;": '\U000029DC', - "iiota;": '\U00002129', - "ijlig;": '\U00000133', - "imacr;": '\U0000012B', - "image;": '\U00002111', - "imagline;": '\U00002110', - "imagpart;": '\U00002111', - "imath;": '\U00000131', - "imof;": '\U000022B7', - "imped;": '\U000001B5', - "in;": '\U00002208', - "incare;": '\U00002105', - "infin;": '\U0000221E', - "infintie;": '\U000029DD', - "inodot;": '\U00000131', - "int;": '\U0000222B', - "intcal;": '\U000022BA', - "integers;": '\U00002124', - "intercal;": '\U000022BA', - "intlarhk;": '\U00002A17', - "intprod;": '\U00002A3C', - "iocy;": '\U00000451', - "iogon;": '\U0000012F', - "iopf;": '\U0001D55A', - "iota;": '\U000003B9', - "iprod;": '\U00002A3C', - "iquest;": '\U000000BF', - "iscr;": '\U0001D4BE', - "isin;": '\U00002208', - "isinE;": '\U000022F9', - "isindot;": '\U000022F5', - "isins;": '\U000022F4', - "isinsv;": '\U000022F3', - "isinv;": '\U00002208', - "it;": '\U00002062', - "itilde;": '\U00000129', - "iukcy;": '\U00000456', - "iuml;": '\U000000EF', - "jcirc;": '\U00000135', - "jcy;": '\U00000439', - "jfr;": '\U0001D527', - "jmath;": '\U00000237', - "jopf;": '\U0001D55B', - "jscr;": '\U0001D4BF', - "jsercy;": '\U00000458', - "jukcy;": '\U00000454', - "kappa;": '\U000003BA', - "kappav;": '\U000003F0', - "kcedil;": '\U00000137', - "kcy;": '\U0000043A', - "kfr;": '\U0001D528', - "kgreen;": '\U00000138', - "khcy;": '\U00000445', - "kjcy;": '\U0000045C', - "kopf;": '\U0001D55C', - "kscr;": '\U0001D4C0', - "lAarr;": '\U000021DA', - "lArr;": '\U000021D0', - "lAtail;": '\U0000291B', - "lBarr;": '\U0000290E', - "lE;": '\U00002266', - "lEg;": '\U00002A8B', - "lHar;": '\U00002962', - "lacute;": '\U0000013A', - "laemptyv;": '\U000029B4', - "lagran;": '\U00002112', - "lambda;": '\U000003BB', - "lang;": '\U000027E8', - "langd;": '\U00002991', - "langle;": '\U000027E8', - "lap;": '\U00002A85', - "laquo;": '\U000000AB', - "larr;": '\U00002190', - "larrb;": '\U000021E4', - "larrbfs;": '\U0000291F', - "larrfs;": '\U0000291D', - "larrhk;": '\U000021A9', - "larrlp;": '\U000021AB', - "larrpl;": '\U00002939', - "larrsim;": '\U00002973', - "larrtl;": '\U000021A2', - "lat;": '\U00002AAB', - "latail;": '\U00002919', - "late;": '\U00002AAD', - "lbarr;": '\U0000290C', - "lbbrk;": '\U00002772', - "lbrace;": '\U0000007B', - "lbrack;": '\U0000005B', - "lbrke;": '\U0000298B', - "lbrksld;": '\U0000298F', - "lbrkslu;": '\U0000298D', - "lcaron;": '\U0000013E', - "lcedil;": '\U0000013C', - "lceil;": '\U00002308', - "lcub;": '\U0000007B', - "lcy;": '\U0000043B', - "ldca;": '\U00002936', - "ldquo;": '\U0000201C', - "ldquor;": '\U0000201E', - "ldrdhar;": '\U00002967', - "ldrushar;": '\U0000294B', - "ldsh;": '\U000021B2', - "le;": '\U00002264', - "leftarrow;": '\U00002190', - "leftarrowtail;": '\U000021A2', - "leftharpoondown;": '\U000021BD', - "leftharpoonup;": '\U000021BC', - "leftleftarrows;": '\U000021C7', - "leftrightarrow;": '\U00002194', - "leftrightarrows;": '\U000021C6', - "leftrightharpoons;": '\U000021CB', - "leftrightsquigarrow;": '\U000021AD', - "leftthreetimes;": '\U000022CB', - "leg;": '\U000022DA', - "leq;": '\U00002264', - "leqq;": '\U00002266', - "leqslant;": '\U00002A7D', - "les;": '\U00002A7D', - "lescc;": '\U00002AA8', - "lesdot;": '\U00002A7F', - "lesdoto;": '\U00002A81', - "lesdotor;": '\U00002A83', - "lesges;": '\U00002A93', - "lessapprox;": '\U00002A85', - "lessdot;": '\U000022D6', - "lesseqgtr;": '\U000022DA', - "lesseqqgtr;": '\U00002A8B', - "lessgtr;": '\U00002276', - "lesssim;": '\U00002272', - "lfisht;": '\U0000297C', - "lfloor;": '\U0000230A', - "lfr;": '\U0001D529', - "lg;": '\U00002276', - "lgE;": '\U00002A91', - "lhard;": '\U000021BD', - "lharu;": '\U000021BC', - "lharul;": '\U0000296A', - "lhblk;": '\U00002584', - "ljcy;": '\U00000459', - "ll;": '\U0000226A', - "llarr;": '\U000021C7', - "llcorner;": '\U0000231E', - "llhard;": '\U0000296B', - "lltri;": '\U000025FA', - "lmidot;": '\U00000140', - "lmoust;": '\U000023B0', - "lmoustache;": '\U000023B0', - "lnE;": '\U00002268', - "lnap;": '\U00002A89', - "lnapprox;": '\U00002A89', - "lne;": '\U00002A87', - "lneq;": '\U00002A87', - "lneqq;": '\U00002268', - "lnsim;": '\U000022E6', - "loang;": '\U000027EC', - "loarr;": '\U000021FD', - "lobrk;": '\U000027E6', - "longleftarrow;": '\U000027F5', - "longleftrightarrow;": '\U000027F7', - "longmapsto;": '\U000027FC', - "longrightarrow;": '\U000027F6', - "looparrowleft;": '\U000021AB', - "looparrowright;": '\U000021AC', - "lopar;": '\U00002985', - "lopf;": '\U0001D55D', - "loplus;": '\U00002A2D', - "lotimes;": '\U00002A34', - "lowast;": '\U00002217', - "lowbar;": '\U0000005F', - "loz;": '\U000025CA', - "lozenge;": '\U000025CA', - "lozf;": '\U000029EB', - "lpar;": '\U00000028', - "lparlt;": '\U00002993', - "lrarr;": '\U000021C6', - "lrcorner;": '\U0000231F', - "lrhar;": '\U000021CB', - "lrhard;": '\U0000296D', - "lrm;": '\U0000200E', - "lrtri;": '\U000022BF', - "lsaquo;": '\U00002039', - "lscr;": '\U0001D4C1', - "lsh;": '\U000021B0', - "lsim;": '\U00002272', - "lsime;": '\U00002A8D', - "lsimg;": '\U00002A8F', - "lsqb;": '\U0000005B', - "lsquo;": '\U00002018', - "lsquor;": '\U0000201A', - "lstrok;": '\U00000142', - "lt;": '\U0000003C', - "ltcc;": '\U00002AA6', - "ltcir;": '\U00002A79', - "ltdot;": '\U000022D6', - "lthree;": '\U000022CB', - "ltimes;": '\U000022C9', - "ltlarr;": '\U00002976', - "ltquest;": '\U00002A7B', - "ltrPar;": '\U00002996', - "ltri;": '\U000025C3', - "ltrie;": '\U000022B4', - "ltrif;": '\U000025C2', - "lurdshar;": '\U0000294A', - "luruhar;": '\U00002966', - "mDDot;": '\U0000223A', - "macr;": '\U000000AF', - "male;": '\U00002642', - "malt;": '\U00002720', - "maltese;": '\U00002720', - "map;": '\U000021A6', - "mapsto;": '\U000021A6', - "mapstodown;": '\U000021A7', - "mapstoleft;": '\U000021A4', - "mapstoup;": '\U000021A5', - "marker;": '\U000025AE', - "mcomma;": '\U00002A29', - "mcy;": '\U0000043C', - "mdash;": '\U00002014', - "measuredangle;": '\U00002221', - "mfr;": '\U0001D52A', - "mho;": '\U00002127', - "micro;": '\U000000B5', - "mid;": '\U00002223', - "midast;": '\U0000002A', - "midcir;": '\U00002AF0', - "middot;": '\U000000B7', - "minus;": '\U00002212', - "minusb;": '\U0000229F', - "minusd;": '\U00002238', - "minusdu;": '\U00002A2A', - "mlcp;": '\U00002ADB', - "mldr;": '\U00002026', - "mnplus;": '\U00002213', - "models;": '\U000022A7', - "mopf;": '\U0001D55E', - "mp;": '\U00002213', - "mscr;": '\U0001D4C2', - "mstpos;": '\U0000223E', - "mu;": '\U000003BC', - "multimap;": '\U000022B8', - "mumap;": '\U000022B8', - "nLeftarrow;": '\U000021CD', - "nLeftrightarrow;": '\U000021CE', - "nRightarrow;": '\U000021CF', - "nVDash;": '\U000022AF', - "nVdash;": '\U000022AE', - "nabla;": '\U00002207', - "nacute;": '\U00000144', - "nap;": '\U00002249', - "napos;": '\U00000149', - "napprox;": '\U00002249', - "natur;": '\U0000266E', - "natural;": '\U0000266E', - "naturals;": '\U00002115', - "nbsp;": '\U000000A0', - "ncap;": '\U00002A43', - "ncaron;": '\U00000148', - "ncedil;": '\U00000146', - "ncong;": '\U00002247', - "ncup;": '\U00002A42', - "ncy;": '\U0000043D', - "ndash;": '\U00002013', - "ne;": '\U00002260', - "neArr;": '\U000021D7', - "nearhk;": '\U00002924', - "nearr;": '\U00002197', - "nearrow;": '\U00002197', - "nequiv;": '\U00002262', - "nesear;": '\U00002928', - "nexist;": '\U00002204', - "nexists;": '\U00002204', - "nfr;": '\U0001D52B', - "nge;": '\U00002271', - "ngeq;": '\U00002271', - "ngsim;": '\U00002275', - "ngt;": '\U0000226F', - "ngtr;": '\U0000226F', - "nhArr;": '\U000021CE', - "nharr;": '\U000021AE', - "nhpar;": '\U00002AF2', - "ni;": '\U0000220B', - "nis;": '\U000022FC', - "nisd;": '\U000022FA', - "niv;": '\U0000220B', - "njcy;": '\U0000045A', - "nlArr;": '\U000021CD', - "nlarr;": '\U0000219A', - "nldr;": '\U00002025', - "nle;": '\U00002270', - "nleftarrow;": '\U0000219A', - "nleftrightarrow;": '\U000021AE', - "nleq;": '\U00002270', - "nless;": '\U0000226E', - "nlsim;": '\U00002274', - "nlt;": '\U0000226E', - "nltri;": '\U000022EA', - "nltrie;": '\U000022EC', - "nmid;": '\U00002224', - "nopf;": '\U0001D55F', - "not;": '\U000000AC', - "notin;": '\U00002209', - "notinva;": '\U00002209', - "notinvb;": '\U000022F7', - "notinvc;": '\U000022F6', - "notni;": '\U0000220C', - "notniva;": '\U0000220C', - "notnivb;": '\U000022FE', - "notnivc;": '\U000022FD', - "npar;": '\U00002226', - "nparallel;": '\U00002226', - "npolint;": '\U00002A14', - "npr;": '\U00002280', - "nprcue;": '\U000022E0', - "nprec;": '\U00002280', - "nrArr;": '\U000021CF', - "nrarr;": '\U0000219B', - "nrightarrow;": '\U0000219B', - "nrtri;": '\U000022EB', - "nrtrie;": '\U000022ED', - "nsc;": '\U00002281', - "nsccue;": '\U000022E1', - "nscr;": '\U0001D4C3', - "nshortmid;": '\U00002224', - "nshortparallel;": '\U00002226', - "nsim;": '\U00002241', - "nsime;": '\U00002244', - "nsimeq;": '\U00002244', - "nsmid;": '\U00002224', - "nspar;": '\U00002226', - "nsqsube;": '\U000022E2', - "nsqsupe;": '\U000022E3', - "nsub;": '\U00002284', - "nsube;": '\U00002288', - "nsubseteq;": '\U00002288', - "nsucc;": '\U00002281', - "nsup;": '\U00002285', - "nsupe;": '\U00002289', - "nsupseteq;": '\U00002289', - "ntgl;": '\U00002279', - "ntilde;": '\U000000F1', - "ntlg;": '\U00002278', - "ntriangleleft;": '\U000022EA', - "ntrianglelefteq;": '\U000022EC', - "ntriangleright;": '\U000022EB', - "ntrianglerighteq;": '\U000022ED', - "nu;": '\U000003BD', - "num;": '\U00000023', - "numero;": '\U00002116', - "numsp;": '\U00002007', - "nvDash;": '\U000022AD', - "nvHarr;": '\U00002904', - "nvdash;": '\U000022AC', - "nvinfin;": '\U000029DE', - "nvlArr;": '\U00002902', - "nvrArr;": '\U00002903', - "nwArr;": '\U000021D6', - "nwarhk;": '\U00002923', - "nwarr;": '\U00002196', - "nwarrow;": '\U00002196', - "nwnear;": '\U00002927', - "oS;": '\U000024C8', - "oacute;": '\U000000F3', - "oast;": '\U0000229B', - "ocir;": '\U0000229A', - "ocirc;": '\U000000F4', - "ocy;": '\U0000043E', - "odash;": '\U0000229D', - "odblac;": '\U00000151', - "odiv;": '\U00002A38', - "odot;": '\U00002299', - "odsold;": '\U000029BC', - "oelig;": '\U00000153', - "ofcir;": '\U000029BF', - "ofr;": '\U0001D52C', - "ogon;": '\U000002DB', - "ograve;": '\U000000F2', - "ogt;": '\U000029C1', - "ohbar;": '\U000029B5', - "ohm;": '\U000003A9', - "oint;": '\U0000222E', - "olarr;": '\U000021BA', - "olcir;": '\U000029BE', - "olcross;": '\U000029BB', - "oline;": '\U0000203E', - "olt;": '\U000029C0', - "omacr;": '\U0000014D', - "omega;": '\U000003C9', - "omicron;": '\U000003BF', - "omid;": '\U000029B6', - "ominus;": '\U00002296', - "oopf;": '\U0001D560', - "opar;": '\U000029B7', - "operp;": '\U000029B9', - "oplus;": '\U00002295', - "or;": '\U00002228', - "orarr;": '\U000021BB', - "ord;": '\U00002A5D', - "order;": '\U00002134', - "orderof;": '\U00002134', - "ordf;": '\U000000AA', - "ordm;": '\U000000BA', - "origof;": '\U000022B6', - "oror;": '\U00002A56', - "orslope;": '\U00002A57', - "orv;": '\U00002A5B', - "oscr;": '\U00002134', - "oslash;": '\U000000F8', - "osol;": '\U00002298', - "otilde;": '\U000000F5', - "otimes;": '\U00002297', - "otimesas;": '\U00002A36', - "ouml;": '\U000000F6', - "ovbar;": '\U0000233D', - "par;": '\U00002225', - "para;": '\U000000B6', - "parallel;": '\U00002225', - "parsim;": '\U00002AF3', - "parsl;": '\U00002AFD', - "part;": '\U00002202', - "pcy;": '\U0000043F', - "percnt;": '\U00000025', - "period;": '\U0000002E', - "permil;": '\U00002030', - "perp;": '\U000022A5', - "pertenk;": '\U00002031', - "pfr;": '\U0001D52D', - "phi;": '\U000003C6', - "phiv;": '\U000003D5', - "phmmat;": '\U00002133', - "phone;": '\U0000260E', - "pi;": '\U000003C0', - "pitchfork;": '\U000022D4', - "piv;": '\U000003D6', - "planck;": '\U0000210F', - "planckh;": '\U0000210E', - "plankv;": '\U0000210F', - "plus;": '\U0000002B', - "plusacir;": '\U00002A23', - "plusb;": '\U0000229E', - "pluscir;": '\U00002A22', - "plusdo;": '\U00002214', - "plusdu;": '\U00002A25', - "pluse;": '\U00002A72', - "plusmn;": '\U000000B1', - "plussim;": '\U00002A26', - "plustwo;": '\U00002A27', - "pm;": '\U000000B1', - "pointint;": '\U00002A15', - "popf;": '\U0001D561', - "pound;": '\U000000A3', - "pr;": '\U0000227A', - "prE;": '\U00002AB3', - "prap;": '\U00002AB7', - "prcue;": '\U0000227C', - "pre;": '\U00002AAF', - "prec;": '\U0000227A', - "precapprox;": '\U00002AB7', - "preccurlyeq;": '\U0000227C', - "preceq;": '\U00002AAF', - "precnapprox;": '\U00002AB9', - "precneqq;": '\U00002AB5', - "precnsim;": '\U000022E8', - "precsim;": '\U0000227E', - "prime;": '\U00002032', - "primes;": '\U00002119', - "prnE;": '\U00002AB5', - "prnap;": '\U00002AB9', - "prnsim;": '\U000022E8', - "prod;": '\U0000220F', - "profalar;": '\U0000232E', - "profline;": '\U00002312', - "profsurf;": '\U00002313', - "prop;": '\U0000221D', - "propto;": '\U0000221D', - "prsim;": '\U0000227E', - "prurel;": '\U000022B0', - "pscr;": '\U0001D4C5', - "psi;": '\U000003C8', - "puncsp;": '\U00002008', - "qfr;": '\U0001D52E', - "qint;": '\U00002A0C', - "qopf;": '\U0001D562', - "qprime;": '\U00002057', - "qscr;": '\U0001D4C6', - "quaternions;": '\U0000210D', - "quatint;": '\U00002A16', - "quest;": '\U0000003F', - "questeq;": '\U0000225F', - "quot;": '\U00000022', - "rAarr;": '\U000021DB', - "rArr;": '\U000021D2', - "rAtail;": '\U0000291C', - "rBarr;": '\U0000290F', - "rHar;": '\U00002964', - "racute;": '\U00000155', - "radic;": '\U0000221A', - "raemptyv;": '\U000029B3', - "rang;": '\U000027E9', - "rangd;": '\U00002992', - "range;": '\U000029A5', - "rangle;": '\U000027E9', - "raquo;": '\U000000BB', - "rarr;": '\U00002192', - "rarrap;": '\U00002975', - "rarrb;": '\U000021E5', - "rarrbfs;": '\U00002920', - "rarrc;": '\U00002933', - "rarrfs;": '\U0000291E', - "rarrhk;": '\U000021AA', - "rarrlp;": '\U000021AC', - "rarrpl;": '\U00002945', - "rarrsim;": '\U00002974', - "rarrtl;": '\U000021A3', - "rarrw;": '\U0000219D', - "ratail;": '\U0000291A', - "ratio;": '\U00002236', - "rationals;": '\U0000211A', - "rbarr;": '\U0000290D', - "rbbrk;": '\U00002773', - "rbrace;": '\U0000007D', - "rbrack;": '\U0000005D', - "rbrke;": '\U0000298C', - "rbrksld;": '\U0000298E', - "rbrkslu;": '\U00002990', - "rcaron;": '\U00000159', - "rcedil;": '\U00000157', - "rceil;": '\U00002309', - "rcub;": '\U0000007D', - "rcy;": '\U00000440', - "rdca;": '\U00002937', - "rdldhar;": '\U00002969', - "rdquo;": '\U0000201D', - "rdquor;": '\U0000201D', - "rdsh;": '\U000021B3', - "real;": '\U0000211C', - "realine;": '\U0000211B', - "realpart;": '\U0000211C', - "reals;": '\U0000211D', - "rect;": '\U000025AD', - "reg;": '\U000000AE', - "rfisht;": '\U0000297D', - "rfloor;": '\U0000230B', - "rfr;": '\U0001D52F', - "rhard;": '\U000021C1', - "rharu;": '\U000021C0', - "rharul;": '\U0000296C', - "rho;": '\U000003C1', - "rhov;": '\U000003F1', - "rightarrow;": '\U00002192', - "rightarrowtail;": '\U000021A3', - "rightharpoondown;": '\U000021C1', - "rightharpoonup;": '\U000021C0', - "rightleftarrows;": '\U000021C4', - "rightleftharpoons;": '\U000021CC', - "rightrightarrows;": '\U000021C9', - "rightsquigarrow;": '\U0000219D', - "rightthreetimes;": '\U000022CC', - "ring;": '\U000002DA', - "risingdotseq;": '\U00002253', - "rlarr;": '\U000021C4', - "rlhar;": '\U000021CC', - "rlm;": '\U0000200F', - "rmoust;": '\U000023B1', - "rmoustache;": '\U000023B1', - "rnmid;": '\U00002AEE', - "roang;": '\U000027ED', - "roarr;": '\U000021FE', - "robrk;": '\U000027E7', - "ropar;": '\U00002986', - "ropf;": '\U0001D563', - "roplus;": '\U00002A2E', - "rotimes;": '\U00002A35', - "rpar;": '\U00000029', - "rpargt;": '\U00002994', - "rppolint;": '\U00002A12', - "rrarr;": '\U000021C9', - "rsaquo;": '\U0000203A', - "rscr;": '\U0001D4C7', - "rsh;": '\U000021B1', - "rsqb;": '\U0000005D', - "rsquo;": '\U00002019', - "rsquor;": '\U00002019', - "rthree;": '\U000022CC', - "rtimes;": '\U000022CA', - "rtri;": '\U000025B9', - "rtrie;": '\U000022B5', - "rtrif;": '\U000025B8', - "rtriltri;": '\U000029CE', - "ruluhar;": '\U00002968', - "rx;": '\U0000211E', - "sacute;": '\U0000015B', - "sbquo;": '\U0000201A', - "sc;": '\U0000227B', - "scE;": '\U00002AB4', - "scap;": '\U00002AB8', - "scaron;": '\U00000161', - "sccue;": '\U0000227D', - "sce;": '\U00002AB0', - "scedil;": '\U0000015F', - "scirc;": '\U0000015D', - "scnE;": '\U00002AB6', - "scnap;": '\U00002ABA', - "scnsim;": '\U000022E9', - "scpolint;": '\U00002A13', - "scsim;": '\U0000227F', - "scy;": '\U00000441', - "sdot;": '\U000022C5', - "sdotb;": '\U000022A1', - "sdote;": '\U00002A66', - "seArr;": '\U000021D8', - "searhk;": '\U00002925', - "searr;": '\U00002198', - "searrow;": '\U00002198', - "sect;": '\U000000A7', - "semi;": '\U0000003B', - "seswar;": '\U00002929', - "setminus;": '\U00002216', - "setmn;": '\U00002216', - "sext;": '\U00002736', - "sfr;": '\U0001D530', - "sfrown;": '\U00002322', - "sharp;": '\U0000266F', - "shchcy;": '\U00000449', - "shcy;": '\U00000448', - "shortmid;": '\U00002223', - "shortparallel;": '\U00002225', - "shy;": '\U000000AD', - "sigma;": '\U000003C3', - "sigmaf;": '\U000003C2', - "sigmav;": '\U000003C2', - "sim;": '\U0000223C', - "simdot;": '\U00002A6A', - "sime;": '\U00002243', - "simeq;": '\U00002243', - "simg;": '\U00002A9E', - "simgE;": '\U00002AA0', - "siml;": '\U00002A9D', - "simlE;": '\U00002A9F', - "simne;": '\U00002246', - "simplus;": '\U00002A24', - "simrarr;": '\U00002972', - "slarr;": '\U00002190', - "smallsetminus;": '\U00002216', - "smashp;": '\U00002A33', - "smeparsl;": '\U000029E4', - "smid;": '\U00002223', - "smile;": '\U00002323', - "smt;": '\U00002AAA', - "smte;": '\U00002AAC', - "softcy;": '\U0000044C', - "sol;": '\U0000002F', - "solb;": '\U000029C4', - "solbar;": '\U0000233F', - "sopf;": '\U0001D564', - "spades;": '\U00002660', - "spadesuit;": '\U00002660', - "spar;": '\U00002225', - "sqcap;": '\U00002293', - "sqcup;": '\U00002294', - "sqsub;": '\U0000228F', - "sqsube;": '\U00002291', - "sqsubset;": '\U0000228F', - "sqsubseteq;": '\U00002291', - "sqsup;": '\U00002290', - "sqsupe;": '\U00002292', - "sqsupset;": '\U00002290', - "sqsupseteq;": '\U00002292', - "squ;": '\U000025A1', - "square;": '\U000025A1', - "squarf;": '\U000025AA', - "squf;": '\U000025AA', - "srarr;": '\U00002192', - "sscr;": '\U0001D4C8', - "ssetmn;": '\U00002216', - "ssmile;": '\U00002323', - "sstarf;": '\U000022C6', - "star;": '\U00002606', - "starf;": '\U00002605', - "straightepsilon;": '\U000003F5', - "straightphi;": '\U000003D5', - "strns;": '\U000000AF', - "sub;": '\U00002282', - "subE;": '\U00002AC5', - "subdot;": '\U00002ABD', - "sube;": '\U00002286', - "subedot;": '\U00002AC3', - "submult;": '\U00002AC1', - "subnE;": '\U00002ACB', - "subne;": '\U0000228A', - "subplus;": '\U00002ABF', - "subrarr;": '\U00002979', - "subset;": '\U00002282', - "subseteq;": '\U00002286', - "subseteqq;": '\U00002AC5', - "subsetneq;": '\U0000228A', - "subsetneqq;": '\U00002ACB', - "subsim;": '\U00002AC7', - "subsub;": '\U00002AD5', - "subsup;": '\U00002AD3', - "succ;": '\U0000227B', - "succapprox;": '\U00002AB8', - "succcurlyeq;": '\U0000227D', - "succeq;": '\U00002AB0', - "succnapprox;": '\U00002ABA', - "succneqq;": '\U00002AB6', - "succnsim;": '\U000022E9', - "succsim;": '\U0000227F', - "sum;": '\U00002211', - "sung;": '\U0000266A', - "sup;": '\U00002283', - "sup1;": '\U000000B9', - "sup2;": '\U000000B2', - "sup3;": '\U000000B3', - "supE;": '\U00002AC6', - "supdot;": '\U00002ABE', - "supdsub;": '\U00002AD8', - "supe;": '\U00002287', - "supedot;": '\U00002AC4', - "suphsol;": '\U000027C9', - "suphsub;": '\U00002AD7', - "suplarr;": '\U0000297B', - "supmult;": '\U00002AC2', - "supnE;": '\U00002ACC', - "supne;": '\U0000228B', - "supplus;": '\U00002AC0', - "supset;": '\U00002283', - "supseteq;": '\U00002287', - "supseteqq;": '\U00002AC6', - "supsetneq;": '\U0000228B', - "supsetneqq;": '\U00002ACC', - "supsim;": '\U00002AC8', - "supsub;": '\U00002AD4', - "supsup;": '\U00002AD6', - "swArr;": '\U000021D9', - "swarhk;": '\U00002926', - "swarr;": '\U00002199', - "swarrow;": '\U00002199', - "swnwar;": '\U0000292A', - "szlig;": '\U000000DF', - "target;": '\U00002316', - "tau;": '\U000003C4', - "tbrk;": '\U000023B4', - "tcaron;": '\U00000165', - "tcedil;": '\U00000163', - "tcy;": '\U00000442', - "tdot;": '\U000020DB', - "telrec;": '\U00002315', - "tfr;": '\U0001D531', - "there4;": '\U00002234', - "therefore;": '\U00002234', - "theta;": '\U000003B8', - "thetasym;": '\U000003D1', - "thetav;": '\U000003D1', - "thickapprox;": '\U00002248', - "thicksim;": '\U0000223C', - "thinsp;": '\U00002009', - "thkap;": '\U00002248', - "thksim;": '\U0000223C', - "thorn;": '\U000000FE', - "tilde;": '\U000002DC', - "times;": '\U000000D7', - "timesb;": '\U000022A0', - "timesbar;": '\U00002A31', - "timesd;": '\U00002A30', - "tint;": '\U0000222D', - "toea;": '\U00002928', - "top;": '\U000022A4', - "topbot;": '\U00002336', - "topcir;": '\U00002AF1', - "topf;": '\U0001D565', - "topfork;": '\U00002ADA', - "tosa;": '\U00002929', - "tprime;": '\U00002034', - "trade;": '\U00002122', - "triangle;": '\U000025B5', - "triangledown;": '\U000025BF', - "triangleleft;": '\U000025C3', - "trianglelefteq;": '\U000022B4', - "triangleq;": '\U0000225C', - "triangleright;": '\U000025B9', - "trianglerighteq;": '\U000022B5', - "tridot;": '\U000025EC', - "trie;": '\U0000225C', - "triminus;": '\U00002A3A', - "triplus;": '\U00002A39', - "trisb;": '\U000029CD', - "tritime;": '\U00002A3B', - "trpezium;": '\U000023E2', - "tscr;": '\U0001D4C9', - "tscy;": '\U00000446', - "tshcy;": '\U0000045B', - "tstrok;": '\U00000167', - "twixt;": '\U0000226C', - "twoheadleftarrow;": '\U0000219E', - "twoheadrightarrow;": '\U000021A0', - "uArr;": '\U000021D1', - "uHar;": '\U00002963', - "uacute;": '\U000000FA', - "uarr;": '\U00002191', - "ubrcy;": '\U0000045E', - "ubreve;": '\U0000016D', - "ucirc;": '\U000000FB', - "ucy;": '\U00000443', - "udarr;": '\U000021C5', - "udblac;": '\U00000171', - "udhar;": '\U0000296E', - "ufisht;": '\U0000297E', - "ufr;": '\U0001D532', - "ugrave;": '\U000000F9', - "uharl;": '\U000021BF', - "uharr;": '\U000021BE', - "uhblk;": '\U00002580', - "ulcorn;": '\U0000231C', - "ulcorner;": '\U0000231C', - "ulcrop;": '\U0000230F', - "ultri;": '\U000025F8', - "umacr;": '\U0000016B', - "uml;": '\U000000A8', - "uogon;": '\U00000173', - "uopf;": '\U0001D566', - "uparrow;": '\U00002191', - "updownarrow;": '\U00002195', - "upharpoonleft;": '\U000021BF', - "upharpoonright;": '\U000021BE', - "uplus;": '\U0000228E', - "upsi;": '\U000003C5', - "upsih;": '\U000003D2', - "upsilon;": '\U000003C5', - "upuparrows;": '\U000021C8', - "urcorn;": '\U0000231D', - "urcorner;": '\U0000231D', - "urcrop;": '\U0000230E', - "uring;": '\U0000016F', - "urtri;": '\U000025F9', - "uscr;": '\U0001D4CA', - "utdot;": '\U000022F0', - "utilde;": '\U00000169', - "utri;": '\U000025B5', - "utrif;": '\U000025B4', - "uuarr;": '\U000021C8', - "uuml;": '\U000000FC', - "uwangle;": '\U000029A7', - "vArr;": '\U000021D5', - "vBar;": '\U00002AE8', - "vBarv;": '\U00002AE9', - "vDash;": '\U000022A8', - "vangrt;": '\U0000299C', - "varepsilon;": '\U000003F5', - "varkappa;": '\U000003F0', - "varnothing;": '\U00002205', - "varphi;": '\U000003D5', - "varpi;": '\U000003D6', - "varpropto;": '\U0000221D', - "varr;": '\U00002195', - "varrho;": '\U000003F1', - "varsigma;": '\U000003C2', - "vartheta;": '\U000003D1', - "vartriangleleft;": '\U000022B2', - "vartriangleright;": '\U000022B3', - "vcy;": '\U00000432', - "vdash;": '\U000022A2', - "vee;": '\U00002228', - "veebar;": '\U000022BB', - "veeeq;": '\U0000225A', - "vellip;": '\U000022EE', - "verbar;": '\U0000007C', - "vert;": '\U0000007C', - "vfr;": '\U0001D533', - "vltri;": '\U000022B2', - "vopf;": '\U0001D567', - "vprop;": '\U0000221D', - "vrtri;": '\U000022B3', - "vscr;": '\U0001D4CB', - "vzigzag;": '\U0000299A', - "wcirc;": '\U00000175', - "wedbar;": '\U00002A5F', - "wedge;": '\U00002227', - "wedgeq;": '\U00002259', - "weierp;": '\U00002118', - "wfr;": '\U0001D534', - "wopf;": '\U0001D568', - "wp;": '\U00002118', - "wr;": '\U00002240', - "wreath;": '\U00002240', - "wscr;": '\U0001D4CC', - "xcap;": '\U000022C2', - "xcirc;": '\U000025EF', - "xcup;": '\U000022C3', - "xdtri;": '\U000025BD', - "xfr;": '\U0001D535', - "xhArr;": '\U000027FA', - "xharr;": '\U000027F7', - "xi;": '\U000003BE', - "xlArr;": '\U000027F8', - "xlarr;": '\U000027F5', - "xmap;": '\U000027FC', - "xnis;": '\U000022FB', - "xodot;": '\U00002A00', - "xopf;": '\U0001D569', - "xoplus;": '\U00002A01', - "xotime;": '\U00002A02', - "xrArr;": '\U000027F9', - "xrarr;": '\U000027F6', - "xscr;": '\U0001D4CD', - "xsqcup;": '\U00002A06', - "xuplus;": '\U00002A04', - "xutri;": '\U000025B3', - "xvee;": '\U000022C1', - "xwedge;": '\U000022C0', - "yacute;": '\U000000FD', - "yacy;": '\U0000044F', - "ycirc;": '\U00000177', - "ycy;": '\U0000044B', - "yen;": '\U000000A5', - "yfr;": '\U0001D536', - "yicy;": '\U00000457', - "yopf;": '\U0001D56A', - "yscr;": '\U0001D4CE', - "yucy;": '\U0000044E', - "yuml;": '\U000000FF', - "zacute;": '\U0000017A', - "zcaron;": '\U0000017E', - "zcy;": '\U00000437', - "zdot;": '\U0000017C', - "zeetrf;": '\U00002128', - "zeta;": '\U000003B6', - "zfr;": '\U0001D537', - "zhcy;": '\U00000436', - "zigrarr;": '\U000021DD', - "zopf;": '\U0001D56B', - "zscr;": '\U0001D4CF', - "zwj;": '\U0000200D', - "zwnj;": '\U0000200C', - "AElig": '\U000000C6', - "AMP": '\U00000026', - "Aacute": '\U000000C1', - "Acirc": '\U000000C2', - "Agrave": '\U000000C0', - "Aring": '\U000000C5', - "Atilde": '\U000000C3', - "Auml": '\U000000C4', - "COPY": '\U000000A9', - "Ccedil": '\U000000C7', - "ETH": '\U000000D0', - "Eacute": '\U000000C9', - "Ecirc": '\U000000CA', - "Egrave": '\U000000C8', - "Euml": '\U000000CB', - "GT": '\U0000003E', - "Iacute": '\U000000CD', - "Icirc": '\U000000CE', - "Igrave": '\U000000CC', - "Iuml": '\U000000CF', - "LT": '\U0000003C', - "Ntilde": '\U000000D1', - "Oacute": '\U000000D3', - "Ocirc": '\U000000D4', - "Ograve": '\U000000D2', - "Oslash": '\U000000D8', - "Otilde": '\U000000D5', - "Ouml": '\U000000D6', - "QUOT": '\U00000022', - "REG": '\U000000AE', - "THORN": '\U000000DE', - "Uacute": '\U000000DA', - "Ucirc": '\U000000DB', - "Ugrave": '\U000000D9', - "Uuml": '\U000000DC', - "Yacute": '\U000000DD', - "aacute": '\U000000E1', - "acirc": '\U000000E2', - "acute": '\U000000B4', - "aelig": '\U000000E6', - "agrave": '\U000000E0', - "amp": '\U00000026', - "aring": '\U000000E5', - "atilde": '\U000000E3', - "auml": '\U000000E4', - "brvbar": '\U000000A6', - "ccedil": '\U000000E7', - "cedil": '\U000000B8', - "cent": '\U000000A2', - "copy": '\U000000A9', - "curren": '\U000000A4', - "deg": '\U000000B0', - "divide": '\U000000F7', - "eacute": '\U000000E9', - "ecirc": '\U000000EA', - "egrave": '\U000000E8', - "eth": '\U000000F0', - "euml": '\U000000EB', - "frac12": '\U000000BD', - "frac14": '\U000000BC', - "frac34": '\U000000BE', - "gt": '\U0000003E', - "iacute": '\U000000ED', - "icirc": '\U000000EE', - "iexcl": '\U000000A1', - "igrave": '\U000000EC', - "iquest": '\U000000BF', - "iuml": '\U000000EF', - "laquo": '\U000000AB', - "lt": '\U0000003C', - "macr": '\U000000AF', - "micro": '\U000000B5', - "middot": '\U000000B7', - "nbsp": '\U000000A0', - "not": '\U000000AC', - "ntilde": '\U000000F1', - "oacute": '\U000000F3', - "ocirc": '\U000000F4', - "ograve": '\U000000F2', - "ordf": '\U000000AA', - "ordm": '\U000000BA', - "oslash": '\U000000F8', - "otilde": '\U000000F5', - "ouml": '\U000000F6', - "para": '\U000000B6', - "plusmn": '\U000000B1', - "pound": '\U000000A3', - "quot": '\U00000022', - "raquo": '\U000000BB', - "reg": '\U000000AE', - "sect": '\U000000A7', - "shy": '\U000000AD', - "sup1": '\U000000B9', - "sup2": '\U000000B2', - "sup3": '\U000000B3', - "szlig": '\U000000DF', - "thorn": '\U000000FE', - "times": '\U000000D7', - "uacute": '\U000000FA', - "ucirc": '\U000000FB', - "ugrave": '\U000000F9', - "uml": '\U000000A8', - "uuml": '\U000000FC', - "yacute": '\U000000FD', - "yen": '\U000000A5', - "yuml": '\U000000FF', + "Cross;": '\U00002A2F', + "Cscr;": '\U0001D49E', + "Cup;": '\U000022D3', + "CupCap;": '\U0000224D', + "DD;": '\U00002145', + "DDotrahd;": '\U00002911', + "DJcy;": '\U00000402', + "DScy;": '\U00000405', + "DZcy;": '\U0000040F', + "Dagger;": '\U00002021', + "Darr;": '\U000021A1', + "Dashv;": '\U00002AE4', + "Dcaron;": '\U0000010E', + "Dcy;": '\U00000414', + "Del;": '\U00002207', + "Delta;": '\U00000394', + "Dfr;": '\U0001D507', + "DiacriticalAcute;": '\U000000B4', + "DiacriticalDot;": '\U000002D9', + "DiacriticalDoubleAcute;": '\U000002DD', + "DiacriticalGrave;": '\U00000060', + "DiacriticalTilde;": '\U000002DC', + "Diamond;": '\U000022C4', + "DifferentialD;": '\U00002146', + "Dopf;": '\U0001D53B', + "Dot;": '\U000000A8', + "DotDot;": '\U000020DC', + "DotEqual;": '\U00002250', + "DoubleContourIntegral;": '\U0000222F', + "DoubleDot;": '\U000000A8', + "DoubleDownArrow;": '\U000021D3', + "DoubleLeftArrow;": '\U000021D0', + "DoubleLeftRightArrow;": '\U000021D4', + "DoubleLeftTee;": '\U00002AE4', + "DoubleLongLeftArrow;": '\U000027F8', + "DoubleLongLeftRightArrow;": '\U000027FA', + "DoubleLongRightArrow;": '\U000027F9', + "DoubleRightArrow;": '\U000021D2', + "DoubleRightTee;": '\U000022A8', + "DoubleUpArrow;": '\U000021D1', + "DoubleUpDownArrow;": '\U000021D5', + "DoubleVerticalBar;": '\U00002225', + "DownArrow;": '\U00002193', + "DownArrowBar;": '\U00002913', + "DownArrowUpArrow;": '\U000021F5', + "DownBreve;": '\U00000311', + "DownLeftRightVector;": '\U00002950', + "DownLeftTeeVector;": '\U0000295E', + "DownLeftVector;": '\U000021BD', + "DownLeftVectorBar;": '\U00002956', + "DownRightTeeVector;": '\U0000295F', + "DownRightVector;": '\U000021C1', + "DownRightVectorBar;": '\U00002957', + "DownTee;": '\U000022A4', + "DownTeeArrow;": '\U000021A7', + "Downarrow;": '\U000021D3', + "Dscr;": '\U0001D49F', + "Dstrok;": '\U00000110', + "ENG;": '\U0000014A', + "ETH;": '\U000000D0', + "Eacute;": '\U000000C9', + "Ecaron;": '\U0000011A', + "Ecirc;": '\U000000CA', + "Ecy;": '\U0000042D', + "Edot;": '\U00000116', + "Efr;": '\U0001D508', + "Egrave;": '\U000000C8', + "Element;": '\U00002208', + "Emacr;": '\U00000112', + "EmptySmallSquare;": '\U000025FB', + "EmptyVerySmallSquare;": '\U000025AB', + "Eogon;": '\U00000118', + "Eopf;": '\U0001D53C', + "Epsilon;": '\U00000395', + "Equal;": '\U00002A75', + "EqualTilde;": '\U00002242', + "Equilibrium;": '\U000021CC', + "Escr;": '\U00002130', + "Esim;": '\U00002A73', + "Eta;": '\U00000397', + "Euml;": '\U000000CB', + "Exists;": '\U00002203', + "ExponentialE;": '\U00002147', + "Fcy;": '\U00000424', + "Ffr;": '\U0001D509', + "FilledSmallSquare;": '\U000025FC', + "FilledVerySmallSquare;": '\U000025AA', + "Fopf;": '\U0001D53D', + "ForAll;": '\U00002200', + "Fouriertrf;": '\U00002131', + "Fscr;": '\U00002131', + "GJcy;": '\U00000403', + "GT;": '\U0000003E', + "Gamma;": '\U00000393', + "Gammad;": '\U000003DC', + "Gbreve;": '\U0000011E', + "Gcedil;": '\U00000122', + "Gcirc;": '\U0000011C', + "Gcy;": '\U00000413', + "Gdot;": '\U00000120', + "Gfr;": '\U0001D50A', + "Gg;": '\U000022D9', + "Gopf;": '\U0001D53E', + "GreaterEqual;": '\U00002265', + "GreaterEqualLess;": '\U000022DB', + "GreaterFullEqual;": '\U00002267', + "GreaterGreater;": '\U00002AA2', + "GreaterLess;": '\U00002277', + "GreaterSlantEqual;": '\U00002A7E', + "GreaterTilde;": '\U00002273', + "Gscr;": '\U0001D4A2', + "Gt;": '\U0000226B', + "HARDcy;": '\U0000042A', + "Hacek;": '\U000002C7', + "Hat;": '\U0000005E', + "Hcirc;": '\U00000124', + "Hfr;": '\U0000210C', + "HilbertSpace;": '\U0000210B', + "Hopf;": '\U0000210D', + "HorizontalLine;": '\U00002500', + "Hscr;": '\U0000210B', + "Hstrok;": '\U00000126', + "HumpDownHump;": '\U0000224E', + "HumpEqual;": '\U0000224F', + "IEcy;": '\U00000415', + "IJlig;": '\U00000132', + "IOcy;": '\U00000401', + "Iacute;": '\U000000CD', + "Icirc;": '\U000000CE', + "Icy;": '\U00000418', + "Idot;": '\U00000130', + "Ifr;": '\U00002111', + "Igrave;": '\U000000CC', + "Im;": '\U00002111', + "Imacr;": '\U0000012A', + "ImaginaryI;": '\U00002148', + "Implies;": '\U000021D2', + "Int;": '\U0000222C', + "Integral;": '\U0000222B', + "Intersection;": '\U000022C2', + "InvisibleComma;": '\U00002063', + "InvisibleTimes;": '\U00002062', + "Iogon;": '\U0000012E', + "Iopf;": '\U0001D540', + "Iota;": '\U00000399', + "Iscr;": '\U00002110', + "Itilde;": '\U00000128', + "Iukcy;": '\U00000406', + "Iuml;": '\U000000CF', + "Jcirc;": '\U00000134', + "Jcy;": '\U00000419', + "Jfr;": '\U0001D50D', + "Jopf;": '\U0001D541', + "Jscr;": '\U0001D4A5', + "Jsercy;": '\U00000408', + "Jukcy;": '\U00000404', + "KHcy;": '\U00000425', + "KJcy;": '\U0000040C', + "Kappa;": '\U0000039A', + "Kcedil;": '\U00000136', + "Kcy;": '\U0000041A', + "Kfr;": '\U0001D50E', + "Kopf;": '\U0001D542', + "Kscr;": '\U0001D4A6', + "LJcy;": '\U00000409', + "LT;": '\U0000003C', + "Lacute;": '\U00000139', + "Lambda;": '\U0000039B', + "Lang;": '\U000027EA', + "Laplacetrf;": '\U00002112', + "Larr;": '\U0000219E', + "Lcaron;": '\U0000013D', + "Lcedil;": '\U0000013B', + "Lcy;": '\U0000041B', + "LeftAngleBracket;": '\U000027E8', + "LeftArrow;": '\U00002190', + "LeftArrowBar;": '\U000021E4', + "LeftArrowRightArrow;": '\U000021C6', + "LeftCeiling;": '\U00002308', + "LeftDoubleBracket;": '\U000027E6', + "LeftDownTeeVector;": '\U00002961', + "LeftDownVector;": '\U000021C3', + "LeftDownVectorBar;": '\U00002959', + "LeftFloor;": '\U0000230A', + "LeftRightArrow;": '\U00002194', + "LeftRightVector;": '\U0000294E', + "LeftTee;": '\U000022A3', + "LeftTeeArrow;": '\U000021A4', + "LeftTeeVector;": '\U0000295A', + "LeftTriangle;": '\U000022B2', + "LeftTriangleBar;": '\U000029CF', + "LeftTriangleEqual;": '\U000022B4', + "LeftUpDownVector;": '\U00002951', + "LeftUpTeeVector;": '\U00002960', + "LeftUpVector;": '\U000021BF', + "LeftUpVectorBar;": '\U00002958', + "LeftVector;": '\U000021BC', + "LeftVectorBar;": '\U00002952', + "Leftarrow;": '\U000021D0', + "Leftrightarrow;": '\U000021D4', + "LessEqualGreater;": '\U000022DA', + "LessFullEqual;": '\U00002266', + "LessGreater;": '\U00002276', + "LessLess;": '\U00002AA1', + "LessSlantEqual;": '\U00002A7D', + "LessTilde;": '\U00002272', + "Lfr;": '\U0001D50F', + "Ll;": '\U000022D8', + "Lleftarrow;": '\U000021DA', + "Lmidot;": '\U0000013F', + "LongLeftArrow;": '\U000027F5', + "LongLeftRightArrow;": '\U000027F7', + "LongRightArrow;": '\U000027F6', + "Longleftarrow;": '\U000027F8', + "Longleftrightarrow;": '\U000027FA', + "Longrightarrow;": '\U000027F9', + "Lopf;": '\U0001D543', + "LowerLeftArrow;": '\U00002199', + "LowerRightArrow;": '\U00002198', + "Lscr;": '\U00002112', + "Lsh;": '\U000021B0', + "Lstrok;": '\U00000141', + "Lt;": '\U0000226A', + "Map;": '\U00002905', + "Mcy;": '\U0000041C', + "MediumSpace;": '\U0000205F', + "Mellintrf;": '\U00002133', + "Mfr;": '\U0001D510', + "MinusPlus;": '\U00002213', + "Mopf;": '\U0001D544', + "Mscr;": '\U00002133', + "Mu;": '\U0000039C', + "NJcy;": '\U0000040A', + "Nacute;": '\U00000143', + "Ncaron;": '\U00000147', + "Ncedil;": '\U00000145', + "Ncy;": '\U0000041D', + "NegativeMediumSpace;": '\U0000200B', + "NegativeThickSpace;": '\U0000200B', + "NegativeThinSpace;": '\U0000200B', + "NegativeVeryThinSpace;": '\U0000200B', + "NestedGreaterGreater;": '\U0000226B', + "NestedLessLess;": '\U0000226A', + "NewLine;": '\U0000000A', + "Nfr;": '\U0001D511', + "NoBreak;": '\U00002060', + "NonBreakingSpace;": '\U000000A0', + "Nopf;": '\U00002115', + "Not;": '\U00002AEC', + "NotCongruent;": '\U00002262', + "NotCupCap;": '\U0000226D', + "NotDoubleVerticalBar;": '\U00002226', + "NotElement;": '\U00002209', + "NotEqual;": '\U00002260', + "NotExists;": '\U00002204', + "NotGreater;": '\U0000226F', + "NotGreaterEqual;": '\U00002271', + "NotGreaterLess;": '\U00002279', + "NotGreaterTilde;": '\U00002275', + "NotLeftTriangle;": '\U000022EA', + "NotLeftTriangleEqual;": '\U000022EC', + "NotLess;": '\U0000226E', + "NotLessEqual;": '\U00002270', + "NotLessGreater;": '\U00002278', + "NotLessTilde;": '\U00002274', + "NotPrecedes;": '\U00002280', + "NotPrecedesSlantEqual;": '\U000022E0', + "NotReverseElement;": '\U0000220C', + "NotRightTriangle;": '\U000022EB', + "NotRightTriangleEqual;": '\U000022ED', + "NotSquareSubsetEqual;": '\U000022E2', + "NotSquareSupersetEqual;": '\U000022E3', + "NotSubsetEqual;": '\U00002288', + "NotSucceeds;": '\U00002281', + "NotSucceedsSlantEqual;": '\U000022E1', + "NotSupersetEqual;": '\U00002289', + "NotTilde;": '\U00002241', + "NotTildeEqual;": '\U00002244', + "NotTildeFullEqual;": '\U00002247', + "NotTildeTilde;": '\U00002249', + "NotVerticalBar;": '\U00002224', + "Nscr;": '\U0001D4A9', + "Ntilde;": '\U000000D1', + "Nu;": '\U0000039D', + "OElig;": '\U00000152', + "Oacute;": '\U000000D3', + "Ocirc;": '\U000000D4', + "Ocy;": '\U0000041E', + "Odblac;": '\U00000150', + "Ofr;": '\U0001D512', + "Ograve;": '\U000000D2', + "Omacr;": '\U0000014C', + "Omega;": '\U000003A9', + "Omicron;": '\U0000039F', + "Oopf;": '\U0001D546', + "OpenCurlyDoubleQuote;": '\U0000201C', + "OpenCurlyQuote;": '\U00002018', + "Or;": '\U00002A54', + "Oscr;": '\U0001D4AA', + "Oslash;": '\U000000D8', + "Otilde;": '\U000000D5', + "Otimes;": '\U00002A37', + "Ouml;": '\U000000D6', + "OverBar;": '\U0000203E', + "OverBrace;": '\U000023DE', + "OverBracket;": '\U000023B4', + "OverParenthesis;": '\U000023DC', + "PartialD;": '\U00002202', + "Pcy;": '\U0000041F', + "Pfr;": '\U0001D513', + "Phi;": '\U000003A6', + "Pi;": '\U000003A0', + "PlusMinus;": '\U000000B1', + "Poincareplane;": '\U0000210C', + "Popf;": '\U00002119', + "Pr;": '\U00002ABB', + "Precedes;": '\U0000227A', + "PrecedesEqual;": '\U00002AAF', + "PrecedesSlantEqual;": '\U0000227C', + "PrecedesTilde;": '\U0000227E', + "Prime;": '\U00002033', + "Product;": '\U0000220F', + "Proportion;": '\U00002237', + "Proportional;": '\U0000221D', + "Pscr;": '\U0001D4AB', + "Psi;": '\U000003A8', + "QUOT;": '\U00000022', + "Qfr;": '\U0001D514', + "Qopf;": '\U0000211A', + "Qscr;": '\U0001D4AC', + "RBarr;": '\U00002910', + "REG;": '\U000000AE', + "Racute;": '\U00000154', + "Rang;": '\U000027EB', + "Rarr;": '\U000021A0', + "Rarrtl;": '\U00002916', + "Rcaron;": '\U00000158', + "Rcedil;": '\U00000156', + "Rcy;": '\U00000420', + "Re;": '\U0000211C', + "ReverseElement;": '\U0000220B', + "ReverseEquilibrium;": '\U000021CB', + "ReverseUpEquilibrium;": '\U0000296F', + "Rfr;": '\U0000211C', + "Rho;": '\U000003A1', + "RightAngleBracket;": '\U000027E9', + "RightArrow;": '\U00002192', + "RightArrowBar;": '\U000021E5', + "RightArrowLeftArrow;": '\U000021C4', + "RightCeiling;": '\U00002309', + "RightDoubleBracket;": '\U000027E7', + "RightDownTeeVector;": '\U0000295D', + "RightDownVector;": '\U000021C2', + "RightDownVectorBar;": '\U00002955', + "RightFloor;": '\U0000230B', + "RightTee;": '\U000022A2', + "RightTeeArrow;": '\U000021A6', + "RightTeeVector;": '\U0000295B', + "RightTriangle;": '\U000022B3', + "RightTriangleBar;": '\U000029D0', + "RightTriangleEqual;": '\U000022B5', + "RightUpDownVector;": '\U0000294F', + "RightUpTeeVector;": '\U0000295C', + "RightUpVector;": '\U000021BE', + "RightUpVectorBar;": '\U00002954', + "RightVector;": '\U000021C0', + "RightVectorBar;": '\U00002953', + "Rightarrow;": '\U000021D2', + "Ropf;": '\U0000211D', + "RoundImplies;": '\U00002970', + "Rrightarrow;": '\U000021DB', + "Rscr;": '\U0000211B', + "Rsh;": '\U000021B1', + "RuleDelayed;": '\U000029F4', + "SHCHcy;": '\U00000429', + "SHcy;": '\U00000428', + "SOFTcy;": '\U0000042C', + "Sacute;": '\U0000015A', + "Sc;": '\U00002ABC', + "Scaron;": '\U00000160', + "Scedil;": '\U0000015E', + "Scirc;": '\U0000015C', + "Scy;": '\U00000421', + "Sfr;": '\U0001D516', + "ShortDownArrow;": '\U00002193', + "ShortLeftArrow;": '\U00002190', + "ShortRightArrow;": '\U00002192', + "ShortUpArrow;": '\U00002191', + "Sigma;": '\U000003A3', + "SmallCircle;": '\U00002218', + "Sopf;": '\U0001D54A', + "Sqrt;": '\U0000221A', + "Square;": '\U000025A1', + "SquareIntersection;": '\U00002293', + "SquareSubset;": '\U0000228F', + "SquareSubsetEqual;": '\U00002291', + "SquareSuperset;": '\U00002290', + "SquareSupersetEqual;": '\U00002292', + "SquareUnion;": '\U00002294', + "Sscr;": '\U0001D4AE', + "Star;": '\U000022C6', + "Sub;": '\U000022D0', + "Subset;": '\U000022D0', + "SubsetEqual;": '\U00002286', + "Succeeds;": '\U0000227B', + "SucceedsEqual;": '\U00002AB0', + "SucceedsSlantEqual;": '\U0000227D', + "SucceedsTilde;": '\U0000227F', + "SuchThat;": '\U0000220B', + "Sum;": '\U00002211', + "Sup;": '\U000022D1', + "Superset;": '\U00002283', + "SupersetEqual;": '\U00002287', + "Supset;": '\U000022D1', + "THORN;": '\U000000DE', + "TRADE;": '\U00002122', + "TSHcy;": '\U0000040B', + "TScy;": '\U00000426', + "Tab;": '\U00000009', + "Tau;": '\U000003A4', + "Tcaron;": '\U00000164', + "Tcedil;": '\U00000162', + "Tcy;": '\U00000422', + "Tfr;": '\U0001D517', + "Therefore;": '\U00002234', + "Theta;": '\U00000398', + "ThinSpace;": '\U00002009', + "Tilde;": '\U0000223C', + "TildeEqual;": '\U00002243', + "TildeFullEqual;": '\U00002245', + "TildeTilde;": '\U00002248', + "Topf;": '\U0001D54B', + "TripleDot;": '\U000020DB', + "Tscr;": '\U0001D4AF', + "Tstrok;": '\U00000166', + "Uacute;": '\U000000DA', + "Uarr;": '\U0000219F', + "Uarrocir;": '\U00002949', + "Ubrcy;": '\U0000040E', + "Ubreve;": '\U0000016C', + "Ucirc;": '\U000000DB', + "Ucy;": '\U00000423', + "Udblac;": '\U00000170', + "Ufr;": '\U0001D518', + "Ugrave;": '\U000000D9', + "Umacr;": '\U0000016A', + "UnderBar;": '\U0000005F', + "UnderBrace;": '\U000023DF', + "UnderBracket;": '\U000023B5', + "UnderParenthesis;": '\U000023DD', + "Union;": '\U000022C3', + "UnionPlus;": '\U0000228E', + "Uogon;": '\U00000172', + "Uopf;": '\U0001D54C', + "UpArrow;": '\U00002191', + "UpArrowBar;": '\U00002912', + "UpArrowDownArrow;": '\U000021C5', + "UpDownArrow;": '\U00002195', + "UpEquilibrium;": '\U0000296E', + "UpTee;": '\U000022A5', + "UpTeeArrow;": '\U000021A5', + "Uparrow;": '\U000021D1', + "Updownarrow;": '\U000021D5', + "UpperLeftArrow;": '\U00002196', + "UpperRightArrow;": '\U00002197', + "Upsi;": '\U000003D2', + "Upsilon;": '\U000003A5', + "Uring;": '\U0000016E', + "Uscr;": '\U0001D4B0', + "Utilde;": '\U00000168', + "Uuml;": '\U000000DC', + "VDash;": '\U000022AB', + "Vbar;": '\U00002AEB', + "Vcy;": '\U00000412', + "Vdash;": '\U000022A9', + "Vdashl;": '\U00002AE6', + "Vee;": '\U000022C1', + "Verbar;": '\U00002016', + "Vert;": '\U00002016', + "VerticalBar;": '\U00002223', + "VerticalLine;": '\U0000007C', + "VerticalSeparator;": '\U00002758', + "VerticalTilde;": '\U00002240', + "VeryThinSpace;": '\U0000200A', + "Vfr;": '\U0001D519', + "Vopf;": '\U0001D54D', + "Vscr;": '\U0001D4B1', + "Vvdash;": '\U000022AA', + "Wcirc;": '\U00000174', + "Wedge;": '\U000022C0', + "Wfr;": '\U0001D51A', + "Wopf;": '\U0001D54E', + "Wscr;": '\U0001D4B2', + "Xfr;": '\U0001D51B', + "Xi;": '\U0000039E', + "Xopf;": '\U0001D54F', + "Xscr;": '\U0001D4B3', + "YAcy;": '\U0000042F', + "YIcy;": '\U00000407', + "YUcy;": '\U0000042E', + "Yacute;": '\U000000DD', + "Ycirc;": '\U00000176', + "Ycy;": '\U0000042B', + "Yfr;": '\U0001D51C', + "Yopf;": '\U0001D550', + "Yscr;": '\U0001D4B4', + "Yuml;": '\U00000178', + "ZHcy;": '\U00000416', + "Zacute;": '\U00000179', + "Zcaron;": '\U0000017D', + "Zcy;": '\U00000417', + "Zdot;": '\U0000017B', + "ZeroWidthSpace;": '\U0000200B', + "Zeta;": '\U00000396', + "Zfr;": '\U00002128', + "Zopf;": '\U00002124', + "Zscr;": '\U0001D4B5', + "aacute;": '\U000000E1', + "abreve;": '\U00000103', + "ac;": '\U0000223E', + "acd;": '\U0000223F', + "acirc;": '\U000000E2', + "acute;": '\U000000B4', + "acy;": '\U00000430', + "aelig;": '\U000000E6', + "af;": '\U00002061', + "afr;": '\U0001D51E', + "agrave;": '\U000000E0', + "alefsym;": '\U00002135', + "aleph;": '\U00002135', + "alpha;": '\U000003B1', + "amacr;": '\U00000101', + "amalg;": '\U00002A3F', + "amp;": '\U00000026', + "and;": '\U00002227', + "andand;": '\U00002A55', + "andd;": '\U00002A5C', + "andslope;": '\U00002A58', + "andv;": '\U00002A5A', + "ang;": '\U00002220', + "ange;": '\U000029A4', + "angle;": '\U00002220', + "angmsd;": '\U00002221', + "angmsdaa;": '\U000029A8', + "angmsdab;": '\U000029A9', + "angmsdac;": '\U000029AA', + "angmsdad;": '\U000029AB', + "angmsdae;": '\U000029AC', + "angmsdaf;": '\U000029AD', + "angmsdag;": '\U000029AE', + "angmsdah;": '\U000029AF', + "angrt;": '\U0000221F', + "angrtvb;": '\U000022BE', + "angrtvbd;": '\U0000299D', + "angsph;": '\U00002222', + "angst;": '\U000000C5', + "angzarr;": '\U0000237C', + "aogon;": '\U00000105', + "aopf;": '\U0001D552', + "ap;": '\U00002248', + "apE;": '\U00002A70', + "apacir;": '\U00002A6F', + "ape;": '\U0000224A', + "apid;": '\U0000224B', + "apos;": '\U00000027', + "approx;": '\U00002248', + "approxeq;": '\U0000224A', + "aring;": '\U000000E5', + "ascr;": '\U0001D4B6', + "ast;": '\U0000002A', + "asymp;": '\U00002248', + "asympeq;": '\U0000224D', + "atilde;": '\U000000E3', + "auml;": '\U000000E4', + "awconint;": '\U00002233', + "awint;": '\U00002A11', + "bNot;": '\U00002AED', + "backcong;": '\U0000224C', + "backepsilon;": '\U000003F6', + "backprime;": '\U00002035', + "backsim;": '\U0000223D', + "backsimeq;": '\U000022CD', + "barvee;": '\U000022BD', + "barwed;": '\U00002305', + "barwedge;": '\U00002305', + "bbrk;": '\U000023B5', + "bbrktbrk;": '\U000023B6', + "bcong;": '\U0000224C', + "bcy;": '\U00000431', + "bdquo;": '\U0000201E', + "becaus;": '\U00002235', + "because;": '\U00002235', + "bemptyv;": '\U000029B0', + "bepsi;": '\U000003F6', + "bernou;": '\U0000212C', + "beta;": '\U000003B2', + "beth;": '\U00002136', + "between;": '\U0000226C', + "bfr;": '\U0001D51F', + "bigcap;": '\U000022C2', + "bigcirc;": '\U000025EF', + "bigcup;": '\U000022C3', + "bigodot;": '\U00002A00', + "bigoplus;": '\U00002A01', + "bigotimes;": '\U00002A02', + "bigsqcup;": '\U00002A06', + "bigstar;": '\U00002605', + "bigtriangledown;": '\U000025BD', + "bigtriangleup;": '\U000025B3', + "biguplus;": '\U00002A04', + "bigvee;": '\U000022C1', + "bigwedge;": '\U000022C0', + "bkarow;": '\U0000290D', + "blacklozenge;": '\U000029EB', + "blacksquare;": '\U000025AA', + "blacktriangle;": '\U000025B4', + "blacktriangledown;": '\U000025BE', + "blacktriangleleft;": '\U000025C2', + "blacktriangleright;": '\U000025B8', + "blank;": '\U00002423', + "blk12;": '\U00002592', + "blk14;": '\U00002591', + "blk34;": '\U00002593', + "block;": '\U00002588', + "bnot;": '\U00002310', + "bopf;": '\U0001D553', + "bot;": '\U000022A5', + "bottom;": '\U000022A5', + "bowtie;": '\U000022C8', + "boxDL;": '\U00002557', + "boxDR;": '\U00002554', + "boxDl;": '\U00002556', + "boxDr;": '\U00002553', + "boxH;": '\U00002550', + "boxHD;": '\U00002566', + "boxHU;": '\U00002569', + "boxHd;": '\U00002564', + "boxHu;": '\U00002567', + "boxUL;": '\U0000255D', + "boxUR;": '\U0000255A', + "boxUl;": '\U0000255C', + "boxUr;": '\U00002559', + "boxV;": '\U00002551', + "boxVH;": '\U0000256C', + "boxVL;": '\U00002563', + "boxVR;": '\U00002560', + "boxVh;": '\U0000256B', + "boxVl;": '\U00002562', + "boxVr;": '\U0000255F', + "boxbox;": '\U000029C9', + "boxdL;": '\U00002555', + "boxdR;": '\U00002552', + "boxdl;": '\U00002510', + "boxdr;": '\U0000250C', + "boxh;": '\U00002500', + "boxhD;": '\U00002565', + "boxhU;": '\U00002568', + "boxhd;": '\U0000252C', + "boxhu;": '\U00002534', + "boxminus;": '\U0000229F', + "boxplus;": '\U0000229E', + "boxtimes;": '\U000022A0', + "boxuL;": '\U0000255B', + "boxuR;": '\U00002558', + "boxul;": '\U00002518', + "boxur;": '\U00002514', + "boxv;": '\U00002502', + "boxvH;": '\U0000256A', + "boxvL;": '\U00002561', + "boxvR;": '\U0000255E', + "boxvh;": '\U0000253C', + "boxvl;": '\U00002524', + "boxvr;": '\U0000251C', + "bprime;": '\U00002035', + "breve;": '\U000002D8', + "brvbar;": '\U000000A6', + "bscr;": '\U0001D4B7', + "bsemi;": '\U0000204F', + "bsim;": '\U0000223D', + "bsime;": '\U000022CD', + "bsol;": '\U0000005C', + "bsolb;": '\U000029C5', + "bsolhsub;": '\U000027C8', + "bull;": '\U00002022', + "bullet;": '\U00002022', + "bump;": '\U0000224E', + "bumpE;": '\U00002AAE', + "bumpe;": '\U0000224F', + "bumpeq;": '\U0000224F', + "cacute;": '\U00000107', + "cap;": '\U00002229', + "capand;": '\U00002A44', + "capbrcup;": '\U00002A49', + "capcap;": '\U00002A4B', + "capcup;": '\U00002A47', + "capdot;": '\U00002A40', + "caret;": '\U00002041', + "caron;": '\U000002C7', + "ccaps;": '\U00002A4D', + "ccaron;": '\U0000010D', + "ccedil;": '\U000000E7', + "ccirc;": '\U00000109', + "ccups;": '\U00002A4C', + "ccupssm;": '\U00002A50', + "cdot;": '\U0000010B', + "cedil;": '\U000000B8', + "cemptyv;": '\U000029B2', + "cent;": '\U000000A2', + "centerdot;": '\U000000B7', + "cfr;": '\U0001D520', + "chcy;": '\U00000447', + "check;": '\U00002713', + "checkmark;": '\U00002713', + "chi;": '\U000003C7', + "cir;": '\U000025CB', + "cirE;": '\U000029C3', + "circ;": '\U000002C6', + "circeq;": '\U00002257', + "circlearrowleft;": '\U000021BA', + "circlearrowright;": '\U000021BB', + "circledR;": '\U000000AE', + "circledS;": '\U000024C8', + "circledast;": '\U0000229B', + "circledcirc;": '\U0000229A', + "circleddash;": '\U0000229D', + "cire;": '\U00002257', + "cirfnint;": '\U00002A10', + "cirmid;": '\U00002AEF', + "cirscir;": '\U000029C2', + "clubs;": '\U00002663', + "clubsuit;": '\U00002663', + "colon;": '\U0000003A', + "colone;": '\U00002254', + "coloneq;": '\U00002254', + "comma;": '\U0000002C', + "commat;": '\U00000040', + "comp;": '\U00002201', + "compfn;": '\U00002218', + "complement;": '\U00002201', + "complexes;": '\U00002102', + "cong;": '\U00002245', + "congdot;": '\U00002A6D', + "conint;": '\U0000222E', + "copf;": '\U0001D554', + "coprod;": '\U00002210', + "copy;": '\U000000A9', + "copysr;": '\U00002117', + "crarr;": '\U000021B5', + "cross;": '\U00002717', + "cscr;": '\U0001D4B8', + "csub;": '\U00002ACF', + "csube;": '\U00002AD1', + "csup;": '\U00002AD0', + "csupe;": '\U00002AD2', + "ctdot;": '\U000022EF', + "cudarrl;": '\U00002938', + "cudarrr;": '\U00002935', + "cuepr;": '\U000022DE', + "cuesc;": '\U000022DF', + "cularr;": '\U000021B6', + "cularrp;": '\U0000293D', + "cup;": '\U0000222A', + "cupbrcap;": '\U00002A48', + "cupcap;": '\U00002A46', + "cupcup;": '\U00002A4A', + "cupdot;": '\U0000228D', + "cupor;": '\U00002A45', + "curarr;": '\U000021B7', + "curarrm;": '\U0000293C', + "curlyeqprec;": '\U000022DE', + "curlyeqsucc;": '\U000022DF', + "curlyvee;": '\U000022CE', + "curlywedge;": '\U000022CF', + "curren;": '\U000000A4', + "curvearrowleft;": '\U000021B6', + "curvearrowright;": '\U000021B7', + "cuvee;": '\U000022CE', + "cuwed;": '\U000022CF', + "cwconint;": '\U00002232', + "cwint;": '\U00002231', + "cylcty;": '\U0000232D', + "dArr;": '\U000021D3', + "dHar;": '\U00002965', + "dagger;": '\U00002020', + "daleth;": '\U00002138', + "darr;": '\U00002193', + "dash;": '\U00002010', + "dashv;": '\U000022A3', + "dbkarow;": '\U0000290F', + "dblac;": '\U000002DD', + "dcaron;": '\U0000010F', + "dcy;": '\U00000434', + "dd;": '\U00002146', + "ddagger;": '\U00002021', + "ddarr;": '\U000021CA', + "ddotseq;": '\U00002A77', + "deg;": '\U000000B0', + "delta;": '\U000003B4', + "demptyv;": '\U000029B1', + "dfisht;": '\U0000297F', + "dfr;": '\U0001D521', + "dharl;": '\U000021C3', + "dharr;": '\U000021C2', + "diam;": '\U000022C4', + "diamond;": '\U000022C4', + "diamondsuit;": '\U00002666', + "diams;": '\U00002666', + "die;": '\U000000A8', + "digamma;": '\U000003DD', + "disin;": '\U000022F2', + "div;": '\U000000F7', + "divide;": '\U000000F7', + "divideontimes;": '\U000022C7', + "divonx;": '\U000022C7', + "djcy;": '\U00000452', + "dlcorn;": '\U0000231E', + "dlcrop;": '\U0000230D', + "dollar;": '\U00000024', + "dopf;": '\U0001D555', + "dot;": '\U000002D9', + "doteq;": '\U00002250', + "doteqdot;": '\U00002251', + "dotminus;": '\U00002238', + "dotplus;": '\U00002214', + "dotsquare;": '\U000022A1', + "doublebarwedge;": '\U00002306', + "downarrow;": '\U00002193', + "downdownarrows;": '\U000021CA', + "downharpoonleft;": '\U000021C3', + "downharpoonright;": '\U000021C2', + "drbkarow;": '\U00002910', + "drcorn;": '\U0000231F', + "drcrop;": '\U0000230C', + "dscr;": '\U0001D4B9', + "dscy;": '\U00000455', + "dsol;": '\U000029F6', + "dstrok;": '\U00000111', + "dtdot;": '\U000022F1', + "dtri;": '\U000025BF', + "dtrif;": '\U000025BE', + "duarr;": '\U000021F5', + "duhar;": '\U0000296F', + "dwangle;": '\U000029A6', + "dzcy;": '\U0000045F', + "dzigrarr;": '\U000027FF', + "eDDot;": '\U00002A77', + "eDot;": '\U00002251', + "eacute;": '\U000000E9', + "easter;": '\U00002A6E', + "ecaron;": '\U0000011B', + "ecir;": '\U00002256', + "ecirc;": '\U000000EA', + "ecolon;": '\U00002255', + "ecy;": '\U0000044D', + "edot;": '\U00000117', + "ee;": '\U00002147', + "efDot;": '\U00002252', + "efr;": '\U0001D522', + "eg;": '\U00002A9A', + "egrave;": '\U000000E8', + "egs;": '\U00002A96', + "egsdot;": '\U00002A98', + "el;": '\U00002A99', + "elinters;": '\U000023E7', + "ell;": '\U00002113', + "els;": '\U00002A95', + "elsdot;": '\U00002A97', + "emacr;": '\U00000113', + "empty;": '\U00002205', + "emptyset;": '\U00002205', + "emptyv;": '\U00002205', + "emsp;": '\U00002003', + "emsp13;": '\U00002004', + "emsp14;": '\U00002005', + "eng;": '\U0000014B', + "ensp;": '\U00002002', + "eogon;": '\U00000119', + "eopf;": '\U0001D556', + "epar;": '\U000022D5', + "eparsl;": '\U000029E3', + "eplus;": '\U00002A71', + "epsi;": '\U000003B5', + "epsilon;": '\U000003B5', + "epsiv;": '\U000003F5', + "eqcirc;": '\U00002256', + "eqcolon;": '\U00002255', + "eqsim;": '\U00002242', + "eqslantgtr;": '\U00002A96', + "eqslantless;": '\U00002A95', + "equals;": '\U0000003D', + "equest;": '\U0000225F', + "equiv;": '\U00002261', + "equivDD;": '\U00002A78', + "eqvparsl;": '\U000029E5', + "erDot;": '\U00002253', + "erarr;": '\U00002971', + "escr;": '\U0000212F', + "esdot;": '\U00002250', + "esim;": '\U00002242', + "eta;": '\U000003B7', + "eth;": '\U000000F0', + "euml;": '\U000000EB', + "euro;": '\U000020AC', + "excl;": '\U00000021', + "exist;": '\U00002203', + "expectation;": '\U00002130', + "exponentiale;": '\U00002147', + "fallingdotseq;": '\U00002252', + "fcy;": '\U00000444', + "female;": '\U00002640', + "ffilig;": '\U0000FB03', + "fflig;": '\U0000FB00', + "ffllig;": '\U0000FB04', + "ffr;": '\U0001D523', + "filig;": '\U0000FB01', + "flat;": '\U0000266D', + "fllig;": '\U0000FB02', + "fltns;": '\U000025B1', + "fnof;": '\U00000192', + "fopf;": '\U0001D557', + "forall;": '\U00002200', + "fork;": '\U000022D4', + "forkv;": '\U00002AD9', + "fpartint;": '\U00002A0D', + "frac12;": '\U000000BD', + "frac13;": '\U00002153', + "frac14;": '\U000000BC', + "frac15;": '\U00002155', + "frac16;": '\U00002159', + "frac18;": '\U0000215B', + "frac23;": '\U00002154', + "frac25;": '\U00002156', + "frac34;": '\U000000BE', + "frac35;": '\U00002157', + "frac38;": '\U0000215C', + "frac45;": '\U00002158', + "frac56;": '\U0000215A', + "frac58;": '\U0000215D', + "frac78;": '\U0000215E', + "frasl;": '\U00002044', + "frown;": '\U00002322', + "fscr;": '\U0001D4BB', + "gE;": '\U00002267', + "gEl;": '\U00002A8C', + "gacute;": '\U000001F5', + "gamma;": '\U000003B3', + "gammad;": '\U000003DD', + "gap;": '\U00002A86', + "gbreve;": '\U0000011F', + "gcirc;": '\U0000011D', + "gcy;": '\U00000433', + "gdot;": '\U00000121', + "ge;": '\U00002265', + "gel;": '\U000022DB', + "geq;": '\U00002265', + "geqq;": '\U00002267', + "geqslant;": '\U00002A7E', + "ges;": '\U00002A7E', + "gescc;": '\U00002AA9', + "gesdot;": '\U00002A80', + "gesdoto;": '\U00002A82', + "gesdotol;": '\U00002A84', + "gesles;": '\U00002A94', + "gfr;": '\U0001D524', + "gg;": '\U0000226B', + "ggg;": '\U000022D9', + "gimel;": '\U00002137', + "gjcy;": '\U00000453', + "gl;": '\U00002277', + "glE;": '\U00002A92', + "gla;": '\U00002AA5', + "glj;": '\U00002AA4', + "gnE;": '\U00002269', + "gnap;": '\U00002A8A', + "gnapprox;": '\U00002A8A', + "gne;": '\U00002A88', + "gneq;": '\U00002A88', + "gneqq;": '\U00002269', + "gnsim;": '\U000022E7', + "gopf;": '\U0001D558', + "grave;": '\U00000060', + "gscr;": '\U0000210A', + "gsim;": '\U00002273', + "gsime;": '\U00002A8E', + "gsiml;": '\U00002A90', + "gt;": '\U0000003E', + "gtcc;": '\U00002AA7', + "gtcir;": '\U00002A7A', + "gtdot;": '\U000022D7', + "gtlPar;": '\U00002995', + "gtquest;": '\U00002A7C', + "gtrapprox;": '\U00002A86', + "gtrarr;": '\U00002978', + "gtrdot;": '\U000022D7', + "gtreqless;": '\U000022DB', + "gtreqqless;": '\U00002A8C', + "gtrless;": '\U00002277', + "gtrsim;": '\U00002273', + "hArr;": '\U000021D4', + "hairsp;": '\U0000200A', + "half;": '\U000000BD', + "hamilt;": '\U0000210B', + "hardcy;": '\U0000044A', + "harr;": '\U00002194', + "harrcir;": '\U00002948', + "harrw;": '\U000021AD', + "hbar;": '\U0000210F', + "hcirc;": '\U00000125', + "hearts;": '\U00002665', + "heartsuit;": '\U00002665', + "hellip;": '\U00002026', + "hercon;": '\U000022B9', + "hfr;": '\U0001D525', + "hksearow;": '\U00002925', + "hkswarow;": '\U00002926', + "hoarr;": '\U000021FF', + "homtht;": '\U0000223B', + "hookleftarrow;": '\U000021A9', + "hookrightarrow;": '\U000021AA', + "hopf;": '\U0001D559', + "horbar;": '\U00002015', + "hscr;": '\U0001D4BD', + "hslash;": '\U0000210F', + "hstrok;": '\U00000127', + "hybull;": '\U00002043', + "hyphen;": '\U00002010', + "iacute;": '\U000000ED', + "ic;": '\U00002063', + "icirc;": '\U000000EE', + "icy;": '\U00000438', + "iecy;": '\U00000435', + "iexcl;": '\U000000A1', + "iff;": '\U000021D4', + "ifr;": '\U0001D526', + "igrave;": '\U000000EC', + "ii;": '\U00002148', + "iiiint;": '\U00002A0C', + "iiint;": '\U0000222D', + "iinfin;": '\U000029DC', + "iiota;": '\U00002129', + "ijlig;": '\U00000133', + "imacr;": '\U0000012B', + "image;": '\U00002111', + "imagline;": '\U00002110', + "imagpart;": '\U00002111', + "imath;": '\U00000131', + "imof;": '\U000022B7', + "imped;": '\U000001B5', + "in;": '\U00002208', + "incare;": '\U00002105', + "infin;": '\U0000221E', + "infintie;": '\U000029DD', + "inodot;": '\U00000131', + "int;": '\U0000222B', + "intcal;": '\U000022BA', + "integers;": '\U00002124', + "intercal;": '\U000022BA', + "intlarhk;": '\U00002A17', + "intprod;": '\U00002A3C', + "iocy;": '\U00000451', + "iogon;": '\U0000012F', + "iopf;": '\U0001D55A', + "iota;": '\U000003B9', + "iprod;": '\U00002A3C', + "iquest;": '\U000000BF', + "iscr;": '\U0001D4BE', + "isin;": '\U00002208', + "isinE;": '\U000022F9', + "isindot;": '\U000022F5', + "isins;": '\U000022F4', + "isinsv;": '\U000022F3', + "isinv;": '\U00002208', + "it;": '\U00002062', + "itilde;": '\U00000129', + "iukcy;": '\U00000456', + "iuml;": '\U000000EF', + "jcirc;": '\U00000135', + "jcy;": '\U00000439', + "jfr;": '\U0001D527', + "jmath;": '\U00000237', + "jopf;": '\U0001D55B', + "jscr;": '\U0001D4BF', + "jsercy;": '\U00000458', + "jukcy;": '\U00000454', + "kappa;": '\U000003BA', + "kappav;": '\U000003F0', + "kcedil;": '\U00000137', + "kcy;": '\U0000043A', + "kfr;": '\U0001D528', + "kgreen;": '\U00000138', + "khcy;": '\U00000445', + "kjcy;": '\U0000045C', + "kopf;": '\U0001D55C', + "kscr;": '\U0001D4C0', + "lAarr;": '\U000021DA', + "lArr;": '\U000021D0', + "lAtail;": '\U0000291B', + "lBarr;": '\U0000290E', + "lE;": '\U00002266', + "lEg;": '\U00002A8B', + "lHar;": '\U00002962', + "lacute;": '\U0000013A', + "laemptyv;": '\U000029B4', + "lagran;": '\U00002112', + "lambda;": '\U000003BB', + "lang;": '\U000027E8', + "langd;": '\U00002991', + "langle;": '\U000027E8', + "lap;": '\U00002A85', + "laquo;": '\U000000AB', + "larr;": '\U00002190', + "larrb;": '\U000021E4', + "larrbfs;": '\U0000291F', + "larrfs;": '\U0000291D', + "larrhk;": '\U000021A9', + "larrlp;": '\U000021AB', + "larrpl;": '\U00002939', + "larrsim;": '\U00002973', + "larrtl;": '\U000021A2', + "lat;": '\U00002AAB', + "latail;": '\U00002919', + "late;": '\U00002AAD', + "lbarr;": '\U0000290C', + "lbbrk;": '\U00002772', + "lbrace;": '\U0000007B', + "lbrack;": '\U0000005B', + "lbrke;": '\U0000298B', + "lbrksld;": '\U0000298F', + "lbrkslu;": '\U0000298D', + "lcaron;": '\U0000013E', + "lcedil;": '\U0000013C', + "lceil;": '\U00002308', + "lcub;": '\U0000007B', + "lcy;": '\U0000043B', + "ldca;": '\U00002936', + "ldquo;": '\U0000201C', + "ldquor;": '\U0000201E', + "ldrdhar;": '\U00002967', + "ldrushar;": '\U0000294B', + "ldsh;": '\U000021B2', + "le;": '\U00002264', + "leftarrow;": '\U00002190', + "leftarrowtail;": '\U000021A2', + "leftharpoondown;": '\U000021BD', + "leftharpoonup;": '\U000021BC', + "leftleftarrows;": '\U000021C7', + "leftrightarrow;": '\U00002194', + "leftrightarrows;": '\U000021C6', + "leftrightharpoons;": '\U000021CB', + "leftrightsquigarrow;": '\U000021AD', + "leftthreetimes;": '\U000022CB', + "leg;": '\U000022DA', + "leq;": '\U00002264', + "leqq;": '\U00002266', + "leqslant;": '\U00002A7D', + "les;": '\U00002A7D', + "lescc;": '\U00002AA8', + "lesdot;": '\U00002A7F', + "lesdoto;": '\U00002A81', + "lesdotor;": '\U00002A83', + "lesges;": '\U00002A93', + "lessapprox;": '\U00002A85', + "lessdot;": '\U000022D6', + "lesseqgtr;": '\U000022DA', + "lesseqqgtr;": '\U00002A8B', + "lessgtr;": '\U00002276', + "lesssim;": '\U00002272', + "lfisht;": '\U0000297C', + "lfloor;": '\U0000230A', + "lfr;": '\U0001D529', + "lg;": '\U00002276', + "lgE;": '\U00002A91', + "lhard;": '\U000021BD', + "lharu;": '\U000021BC', + "lharul;": '\U0000296A', + "lhblk;": '\U00002584', + "ljcy;": '\U00000459', + "ll;": '\U0000226A', + "llarr;": '\U000021C7', + "llcorner;": '\U0000231E', + "llhard;": '\U0000296B', + "lltri;": '\U000025FA', + "lmidot;": '\U00000140', + "lmoust;": '\U000023B0', + "lmoustache;": '\U000023B0', + "lnE;": '\U00002268', + "lnap;": '\U00002A89', + "lnapprox;": '\U00002A89', + "lne;": '\U00002A87', + "lneq;": '\U00002A87', + "lneqq;": '\U00002268', + "lnsim;": '\U000022E6', + "loang;": '\U000027EC', + "loarr;": '\U000021FD', + "lobrk;": '\U000027E6', + "longleftarrow;": '\U000027F5', + "longleftrightarrow;": '\U000027F7', + "longmapsto;": '\U000027FC', + "longrightarrow;": '\U000027F6', + "looparrowleft;": '\U000021AB', + "looparrowright;": '\U000021AC', + "lopar;": '\U00002985', + "lopf;": '\U0001D55D', + "loplus;": '\U00002A2D', + "lotimes;": '\U00002A34', + "lowast;": '\U00002217', + "lowbar;": '\U0000005F', + "loz;": '\U000025CA', + "lozenge;": '\U000025CA', + "lozf;": '\U000029EB', + "lpar;": '\U00000028', + "lparlt;": '\U00002993', + "lrarr;": '\U000021C6', + "lrcorner;": '\U0000231F', + "lrhar;": '\U000021CB', + "lrhard;": '\U0000296D', + "lrm;": '\U0000200E', + "lrtri;": '\U000022BF', + "lsaquo;": '\U00002039', + "lscr;": '\U0001D4C1', + "lsh;": '\U000021B0', + "lsim;": '\U00002272', + "lsime;": '\U00002A8D', + "lsimg;": '\U00002A8F', + "lsqb;": '\U0000005B', + "lsquo;": '\U00002018', + "lsquor;": '\U0000201A', + "lstrok;": '\U00000142', + "lt;": '\U0000003C', + "ltcc;": '\U00002AA6', + "ltcir;": '\U00002A79', + "ltdot;": '\U000022D6', + "lthree;": '\U000022CB', + "ltimes;": '\U000022C9', + "ltlarr;": '\U00002976', + "ltquest;": '\U00002A7B', + "ltrPar;": '\U00002996', + "ltri;": '\U000025C3', + "ltrie;": '\U000022B4', + "ltrif;": '\U000025C2', + "lurdshar;": '\U0000294A', + "luruhar;": '\U00002966', + "mDDot;": '\U0000223A', + "macr;": '\U000000AF', + "male;": '\U00002642', + "malt;": '\U00002720', + "maltese;": '\U00002720', + "map;": '\U000021A6', + "mapsto;": '\U000021A6', + "mapstodown;": '\U000021A7', + "mapstoleft;": '\U000021A4', + "mapstoup;": '\U000021A5', + "marker;": '\U000025AE', + "mcomma;": '\U00002A29', + "mcy;": '\U0000043C', + "mdash;": '\U00002014', + "measuredangle;": '\U00002221', + "mfr;": '\U0001D52A', + "mho;": '\U00002127', + "micro;": '\U000000B5', + "mid;": '\U00002223', + "midast;": '\U0000002A', + "midcir;": '\U00002AF0', + "middot;": '\U000000B7', + "minus;": '\U00002212', + "minusb;": '\U0000229F', + "minusd;": '\U00002238', + "minusdu;": '\U00002A2A', + "mlcp;": '\U00002ADB', + "mldr;": '\U00002026', + "mnplus;": '\U00002213', + "models;": '\U000022A7', + "mopf;": '\U0001D55E', + "mp;": '\U00002213', + "mscr;": '\U0001D4C2', + "mstpos;": '\U0000223E', + "mu;": '\U000003BC', + "multimap;": '\U000022B8', + "mumap;": '\U000022B8', + "nLeftarrow;": '\U000021CD', + "nLeftrightarrow;": '\U000021CE', + "nRightarrow;": '\U000021CF', + "nVDash;": '\U000022AF', + "nVdash;": '\U000022AE', + "nabla;": '\U00002207', + "nacute;": '\U00000144', + "nap;": '\U00002249', + "napos;": '\U00000149', + "napprox;": '\U00002249', + "natur;": '\U0000266E', + "natural;": '\U0000266E', + "naturals;": '\U00002115', + "nbsp;": '\U000000A0', + "ncap;": '\U00002A43', + "ncaron;": '\U00000148', + "ncedil;": '\U00000146', + "ncong;": '\U00002247', + "ncup;": '\U00002A42', + "ncy;": '\U0000043D', + "ndash;": '\U00002013', + "ne;": '\U00002260', + "neArr;": '\U000021D7', + "nearhk;": '\U00002924', + "nearr;": '\U00002197', + "nearrow;": '\U00002197', + "nequiv;": '\U00002262', + "nesear;": '\U00002928', + "nexist;": '\U00002204', + "nexists;": '\U00002204', + "nfr;": '\U0001D52B', + "nge;": '\U00002271', + "ngeq;": '\U00002271', + "ngsim;": '\U00002275', + "ngt;": '\U0000226F', + "ngtr;": '\U0000226F', + "nhArr;": '\U000021CE', + "nharr;": '\U000021AE', + "nhpar;": '\U00002AF2', + "ni;": '\U0000220B', + "nis;": '\U000022FC', + "nisd;": '\U000022FA', + "niv;": '\U0000220B', + "njcy;": '\U0000045A', + "nlArr;": '\U000021CD', + "nlarr;": '\U0000219A', + "nldr;": '\U00002025', + "nle;": '\U00002270', + "nleftarrow;": '\U0000219A', + "nleftrightarrow;": '\U000021AE', + "nleq;": '\U00002270', + "nless;": '\U0000226E', + "nlsim;": '\U00002274', + "nlt;": '\U0000226E', + "nltri;": '\U000022EA', + "nltrie;": '\U000022EC', + "nmid;": '\U00002224', + "nopf;": '\U0001D55F', + "not;": '\U000000AC', + "notin;": '\U00002209', + "notinva;": '\U00002209', + "notinvb;": '\U000022F7', + "notinvc;": '\U000022F6', + "notni;": '\U0000220C', + "notniva;": '\U0000220C', + "notnivb;": '\U000022FE', + "notnivc;": '\U000022FD', + "npar;": '\U00002226', + "nparallel;": '\U00002226', + "npolint;": '\U00002A14', + "npr;": '\U00002280', + "nprcue;": '\U000022E0', + "nprec;": '\U00002280', + "nrArr;": '\U000021CF', + "nrarr;": '\U0000219B', + "nrightarrow;": '\U0000219B', + "nrtri;": '\U000022EB', + "nrtrie;": '\U000022ED', + "nsc;": '\U00002281', + "nsccue;": '\U000022E1', + "nscr;": '\U0001D4C3', + "nshortmid;": '\U00002224', + "nshortparallel;": '\U00002226', + "nsim;": '\U00002241', + "nsime;": '\U00002244', + "nsimeq;": '\U00002244', + "nsmid;": '\U00002224', + "nspar;": '\U00002226', + "nsqsube;": '\U000022E2', + "nsqsupe;": '\U000022E3', + "nsub;": '\U00002284', + "nsube;": '\U00002288', + "nsubseteq;": '\U00002288', + "nsucc;": '\U00002281', + "nsup;": '\U00002285', + "nsupe;": '\U00002289', + "nsupseteq;": '\U00002289', + "ntgl;": '\U00002279', + "ntilde;": '\U000000F1', + "ntlg;": '\U00002278', + "ntriangleleft;": '\U000022EA', + "ntrianglelefteq;": '\U000022EC', + "ntriangleright;": '\U000022EB', + "ntrianglerighteq;": '\U000022ED', + "nu;": '\U000003BD', + "num;": '\U00000023', + "numero;": '\U00002116', + "numsp;": '\U00002007', + "nvDash;": '\U000022AD', + "nvHarr;": '\U00002904', + "nvdash;": '\U000022AC', + "nvinfin;": '\U000029DE', + "nvlArr;": '\U00002902', + "nvrArr;": '\U00002903', + "nwArr;": '\U000021D6', + "nwarhk;": '\U00002923', + "nwarr;": '\U00002196', + "nwarrow;": '\U00002196', + "nwnear;": '\U00002927', + "oS;": '\U000024C8', + "oacute;": '\U000000F3', + "oast;": '\U0000229B', + "ocir;": '\U0000229A', + "ocirc;": '\U000000F4', + "ocy;": '\U0000043E', + "odash;": '\U0000229D', + "odblac;": '\U00000151', + "odiv;": '\U00002A38', + "odot;": '\U00002299', + "odsold;": '\U000029BC', + "oelig;": '\U00000153', + "ofcir;": '\U000029BF', + "ofr;": '\U0001D52C', + "ogon;": '\U000002DB', + "ograve;": '\U000000F2', + "ogt;": '\U000029C1', + "ohbar;": '\U000029B5', + "ohm;": '\U000003A9', + "oint;": '\U0000222E', + "olarr;": '\U000021BA', + "olcir;": '\U000029BE', + "olcross;": '\U000029BB', + "oline;": '\U0000203E', + "olt;": '\U000029C0', + "omacr;": '\U0000014D', + "omega;": '\U000003C9', + "omicron;": '\U000003BF', + "omid;": '\U000029B6', + "ominus;": '\U00002296', + "oopf;": '\U0001D560', + "opar;": '\U000029B7', + "operp;": '\U000029B9', + "oplus;": '\U00002295', + "or;": '\U00002228', + "orarr;": '\U000021BB', + "ord;": '\U00002A5D', + "order;": '\U00002134', + "orderof;": '\U00002134', + "ordf;": '\U000000AA', + "ordm;": '\U000000BA', + "origof;": '\U000022B6', + "oror;": '\U00002A56', + "orslope;": '\U00002A57', + "orv;": '\U00002A5B', + "oscr;": '\U00002134', + "oslash;": '\U000000F8', + "osol;": '\U00002298', + "otilde;": '\U000000F5', + "otimes;": '\U00002297', + "otimesas;": '\U00002A36', + "ouml;": '\U000000F6', + "ovbar;": '\U0000233D', + "par;": '\U00002225', + "para;": '\U000000B6', + "parallel;": '\U00002225', + "parsim;": '\U00002AF3', + "parsl;": '\U00002AFD', + "part;": '\U00002202', + "pcy;": '\U0000043F', + "percnt;": '\U00000025', + "period;": '\U0000002E', + "permil;": '\U00002030', + "perp;": '\U000022A5', + "pertenk;": '\U00002031', + "pfr;": '\U0001D52D', + "phi;": '\U000003C6', + "phiv;": '\U000003D5', + "phmmat;": '\U00002133', + "phone;": '\U0000260E', + "pi;": '\U000003C0', + "pitchfork;": '\U000022D4', + "piv;": '\U000003D6', + "planck;": '\U0000210F', + "planckh;": '\U0000210E', + "plankv;": '\U0000210F', + "plus;": '\U0000002B', + "plusacir;": '\U00002A23', + "plusb;": '\U0000229E', + "pluscir;": '\U00002A22', + "plusdo;": '\U00002214', + "plusdu;": '\U00002A25', + "pluse;": '\U00002A72', + "plusmn;": '\U000000B1', + "plussim;": '\U00002A26', + "plustwo;": '\U00002A27', + "pm;": '\U000000B1', + "pointint;": '\U00002A15', + "popf;": '\U0001D561', + "pound;": '\U000000A3', + "pr;": '\U0000227A', + "prE;": '\U00002AB3', + "prap;": '\U00002AB7', + "prcue;": '\U0000227C', + "pre;": '\U00002AAF', + "prec;": '\U0000227A', + "precapprox;": '\U00002AB7', + "preccurlyeq;": '\U0000227C', + "preceq;": '\U00002AAF', + "precnapprox;": '\U00002AB9', + "precneqq;": '\U00002AB5', + "precnsim;": '\U000022E8', + "precsim;": '\U0000227E', + "prime;": '\U00002032', + "primes;": '\U00002119', + "prnE;": '\U00002AB5', + "prnap;": '\U00002AB9', + "prnsim;": '\U000022E8', + "prod;": '\U0000220F', + "profalar;": '\U0000232E', + "profline;": '\U00002312', + "profsurf;": '\U00002313', + "prop;": '\U0000221D', + "propto;": '\U0000221D', + "prsim;": '\U0000227E', + "prurel;": '\U000022B0', + "pscr;": '\U0001D4C5', + "psi;": '\U000003C8', + "puncsp;": '\U00002008', + "qfr;": '\U0001D52E', + "qint;": '\U00002A0C', + "qopf;": '\U0001D562', + "qprime;": '\U00002057', + "qscr;": '\U0001D4C6', + "quaternions;": '\U0000210D', + "quatint;": '\U00002A16', + "quest;": '\U0000003F', + "questeq;": '\U0000225F', + "quot;": '\U00000022', + "rAarr;": '\U000021DB', + "rArr;": '\U000021D2', + "rAtail;": '\U0000291C', + "rBarr;": '\U0000290F', + "rHar;": '\U00002964', + "racute;": '\U00000155', + "radic;": '\U0000221A', + "raemptyv;": '\U000029B3', + "rang;": '\U000027E9', + "rangd;": '\U00002992', + "range;": '\U000029A5', + "rangle;": '\U000027E9', + "raquo;": '\U000000BB', + "rarr;": '\U00002192', + "rarrap;": '\U00002975', + "rarrb;": '\U000021E5', + "rarrbfs;": '\U00002920', + "rarrc;": '\U00002933', + "rarrfs;": '\U0000291E', + "rarrhk;": '\U000021AA', + "rarrlp;": '\U000021AC', + "rarrpl;": '\U00002945', + "rarrsim;": '\U00002974', + "rarrtl;": '\U000021A3', + "rarrw;": '\U0000219D', + "ratail;": '\U0000291A', + "ratio;": '\U00002236', + "rationals;": '\U0000211A', + "rbarr;": '\U0000290D', + "rbbrk;": '\U00002773', + "rbrace;": '\U0000007D', + "rbrack;": '\U0000005D', + "rbrke;": '\U0000298C', + "rbrksld;": '\U0000298E', + "rbrkslu;": '\U00002990', + "rcaron;": '\U00000159', + "rcedil;": '\U00000157', + "rceil;": '\U00002309', + "rcub;": '\U0000007D', + "rcy;": '\U00000440', + "rdca;": '\U00002937', + "rdldhar;": '\U00002969', + "rdquo;": '\U0000201D', + "rdquor;": '\U0000201D', + "rdsh;": '\U000021B3', + "real;": '\U0000211C', + "realine;": '\U0000211B', + "realpart;": '\U0000211C', + "reals;": '\U0000211D', + "rect;": '\U000025AD', + "reg;": '\U000000AE', + "rfisht;": '\U0000297D', + "rfloor;": '\U0000230B', + "rfr;": '\U0001D52F', + "rhard;": '\U000021C1', + "rharu;": '\U000021C0', + "rharul;": '\U0000296C', + "rho;": '\U000003C1', + "rhov;": '\U000003F1', + "rightarrow;": '\U00002192', + "rightarrowtail;": '\U000021A3', + "rightharpoondown;": '\U000021C1', + "rightharpoonup;": '\U000021C0', + "rightleftarrows;": '\U000021C4', + "rightleftharpoons;": '\U000021CC', + "rightrightarrows;": '\U000021C9', + "rightsquigarrow;": '\U0000219D', + "rightthreetimes;": '\U000022CC', + "ring;": '\U000002DA', + "risingdotseq;": '\U00002253', + "rlarr;": '\U000021C4', + "rlhar;": '\U000021CC', + "rlm;": '\U0000200F', + "rmoust;": '\U000023B1', + "rmoustache;": '\U000023B1', + "rnmid;": '\U00002AEE', + "roang;": '\U000027ED', + "roarr;": '\U000021FE', + "robrk;": '\U000027E7', + "ropar;": '\U00002986', + "ropf;": '\U0001D563', + "roplus;": '\U00002A2E', + "rotimes;": '\U00002A35', + "rpar;": '\U00000029', + "rpargt;": '\U00002994', + "rppolint;": '\U00002A12', + "rrarr;": '\U000021C9', + "rsaquo;": '\U0000203A', + "rscr;": '\U0001D4C7', + "rsh;": '\U000021B1', + "rsqb;": '\U0000005D', + "rsquo;": '\U00002019', + "rsquor;": '\U00002019', + "rthree;": '\U000022CC', + "rtimes;": '\U000022CA', + "rtri;": '\U000025B9', + "rtrie;": '\U000022B5', + "rtrif;": '\U000025B8', + "rtriltri;": '\U000029CE', + "ruluhar;": '\U00002968', + "rx;": '\U0000211E', + "sacute;": '\U0000015B', + "sbquo;": '\U0000201A', + "sc;": '\U0000227B', + "scE;": '\U00002AB4', + "scap;": '\U00002AB8', + "scaron;": '\U00000161', + "sccue;": '\U0000227D', + "sce;": '\U00002AB0', + "scedil;": '\U0000015F', + "scirc;": '\U0000015D', + "scnE;": '\U00002AB6', + "scnap;": '\U00002ABA', + "scnsim;": '\U000022E9', + "scpolint;": '\U00002A13', + "scsim;": '\U0000227F', + "scy;": '\U00000441', + "sdot;": '\U000022C5', + "sdotb;": '\U000022A1', + "sdote;": '\U00002A66', + "seArr;": '\U000021D8', + "searhk;": '\U00002925', + "searr;": '\U00002198', + "searrow;": '\U00002198', + "sect;": '\U000000A7', + "semi;": '\U0000003B', + "seswar;": '\U00002929', + "setminus;": '\U00002216', + "setmn;": '\U00002216', + "sext;": '\U00002736', + "sfr;": '\U0001D530', + "sfrown;": '\U00002322', + "sharp;": '\U0000266F', + "shchcy;": '\U00000449', + "shcy;": '\U00000448', + "shortmid;": '\U00002223', + "shortparallel;": '\U00002225', + "shy;": '\U000000AD', + "sigma;": '\U000003C3', + "sigmaf;": '\U000003C2', + "sigmav;": '\U000003C2', + "sim;": '\U0000223C', + "simdot;": '\U00002A6A', + "sime;": '\U00002243', + "simeq;": '\U00002243', + "simg;": '\U00002A9E', + "simgE;": '\U00002AA0', + "siml;": '\U00002A9D', + "simlE;": '\U00002A9F', + "simne;": '\U00002246', + "simplus;": '\U00002A24', + "simrarr;": '\U00002972', + "slarr;": '\U00002190', + "smallsetminus;": '\U00002216', + "smashp;": '\U00002A33', + "smeparsl;": '\U000029E4', + "smid;": '\U00002223', + "smile;": '\U00002323', + "smt;": '\U00002AAA', + "smte;": '\U00002AAC', + "softcy;": '\U0000044C', + "sol;": '\U0000002F', + "solb;": '\U000029C4', + "solbar;": '\U0000233F', + "sopf;": '\U0001D564', + "spades;": '\U00002660', + "spadesuit;": '\U00002660', + "spar;": '\U00002225', + "sqcap;": '\U00002293', + "sqcup;": '\U00002294', + "sqsub;": '\U0000228F', + "sqsube;": '\U00002291', + "sqsubset;": '\U0000228F', + "sqsubseteq;": '\U00002291', + "sqsup;": '\U00002290', + "sqsupe;": '\U00002292', + "sqsupset;": '\U00002290', + "sqsupseteq;": '\U00002292', + "squ;": '\U000025A1', + "square;": '\U000025A1', + "squarf;": '\U000025AA', + "squf;": '\U000025AA', + "srarr;": '\U00002192', + "sscr;": '\U0001D4C8', + "ssetmn;": '\U00002216', + "ssmile;": '\U00002323', + "sstarf;": '\U000022C6', + "star;": '\U00002606', + "starf;": '\U00002605', + "straightepsilon;": '\U000003F5', + "straightphi;": '\U000003D5', + "strns;": '\U000000AF', + "sub;": '\U00002282', + "subE;": '\U00002AC5', + "subdot;": '\U00002ABD', + "sube;": '\U00002286', + "subedot;": '\U00002AC3', + "submult;": '\U00002AC1', + "subnE;": '\U00002ACB', + "subne;": '\U0000228A', + "subplus;": '\U00002ABF', + "subrarr;": '\U00002979', + "subset;": '\U00002282', + "subseteq;": '\U00002286', + "subseteqq;": '\U00002AC5', + "subsetneq;": '\U0000228A', + "subsetneqq;": '\U00002ACB', + "subsim;": '\U00002AC7', + "subsub;": '\U00002AD5', + "subsup;": '\U00002AD3', + "succ;": '\U0000227B', + "succapprox;": '\U00002AB8', + "succcurlyeq;": '\U0000227D', + "succeq;": '\U00002AB0', + "succnapprox;": '\U00002ABA', + "succneqq;": '\U00002AB6', + "succnsim;": '\U000022E9', + "succsim;": '\U0000227F', + "sum;": '\U00002211', + "sung;": '\U0000266A', + "sup;": '\U00002283', + "sup1;": '\U000000B9', + "sup2;": '\U000000B2', + "sup3;": '\U000000B3', + "supE;": '\U00002AC6', + "supdot;": '\U00002ABE', + "supdsub;": '\U00002AD8', + "supe;": '\U00002287', + "supedot;": '\U00002AC4', + "suphsol;": '\U000027C9', + "suphsub;": '\U00002AD7', + "suplarr;": '\U0000297B', + "supmult;": '\U00002AC2', + "supnE;": '\U00002ACC', + "supne;": '\U0000228B', + "supplus;": '\U00002AC0', + "supset;": '\U00002283', + "supseteq;": '\U00002287', + "supseteqq;": '\U00002AC6', + "supsetneq;": '\U0000228B', + "supsetneqq;": '\U00002ACC', + "supsim;": '\U00002AC8', + "supsub;": '\U00002AD4', + "supsup;": '\U00002AD6', + "swArr;": '\U000021D9', + "swarhk;": '\U00002926', + "swarr;": '\U00002199', + "swarrow;": '\U00002199', + "swnwar;": '\U0000292A', + "szlig;": '\U000000DF', + "target;": '\U00002316', + "tau;": '\U000003C4', + "tbrk;": '\U000023B4', + "tcaron;": '\U00000165', + "tcedil;": '\U00000163', + "tcy;": '\U00000442', + "tdot;": '\U000020DB', + "telrec;": '\U00002315', + "tfr;": '\U0001D531', + "there4;": '\U00002234', + "therefore;": '\U00002234', + "theta;": '\U000003B8', + "thetasym;": '\U000003D1', + "thetav;": '\U000003D1', + "thickapprox;": '\U00002248', + "thicksim;": '\U0000223C', + "thinsp;": '\U00002009', + "thkap;": '\U00002248', + "thksim;": '\U0000223C', + "thorn;": '\U000000FE', + "tilde;": '\U000002DC', + "times;": '\U000000D7', + "timesb;": '\U000022A0', + "timesbar;": '\U00002A31', + "timesd;": '\U00002A30', + "tint;": '\U0000222D', + "toea;": '\U00002928', + "top;": '\U000022A4', + "topbot;": '\U00002336', + "topcir;": '\U00002AF1', + "topf;": '\U0001D565', + "topfork;": '\U00002ADA', + "tosa;": '\U00002929', + "tprime;": '\U00002034', + "trade;": '\U00002122', + "triangle;": '\U000025B5', + "triangledown;": '\U000025BF', + "triangleleft;": '\U000025C3', + "trianglelefteq;": '\U000022B4', + "triangleq;": '\U0000225C', + "triangleright;": '\U000025B9', + "trianglerighteq;": '\U000022B5', + "tridot;": '\U000025EC', + "trie;": '\U0000225C', + "triminus;": '\U00002A3A', + "triplus;": '\U00002A39', + "trisb;": '\U000029CD', + "tritime;": '\U00002A3B', + "trpezium;": '\U000023E2', + "tscr;": '\U0001D4C9', + "tscy;": '\U00000446', + "tshcy;": '\U0000045B', + "tstrok;": '\U00000167', + "twixt;": '\U0000226C', + "twoheadleftarrow;": '\U0000219E', + "twoheadrightarrow;": '\U000021A0', + "uArr;": '\U000021D1', + "uHar;": '\U00002963', + "uacute;": '\U000000FA', + "uarr;": '\U00002191', + "ubrcy;": '\U0000045E', + "ubreve;": '\U0000016D', + "ucirc;": '\U000000FB', + "ucy;": '\U00000443', + "udarr;": '\U000021C5', + "udblac;": '\U00000171', + "udhar;": '\U0000296E', + "ufisht;": '\U0000297E', + "ufr;": '\U0001D532', + "ugrave;": '\U000000F9', + "uharl;": '\U000021BF', + "uharr;": '\U000021BE', + "uhblk;": '\U00002580', + "ulcorn;": '\U0000231C', + "ulcorner;": '\U0000231C', + "ulcrop;": '\U0000230F', + "ultri;": '\U000025F8', + "umacr;": '\U0000016B', + "uml;": '\U000000A8', + "uogon;": '\U00000173', + "uopf;": '\U0001D566', + "uparrow;": '\U00002191', + "updownarrow;": '\U00002195', + "upharpoonleft;": '\U000021BF', + "upharpoonright;": '\U000021BE', + "uplus;": '\U0000228E', + "upsi;": '\U000003C5', + "upsih;": '\U000003D2', + "upsilon;": '\U000003C5', + "upuparrows;": '\U000021C8', + "urcorn;": '\U0000231D', + "urcorner;": '\U0000231D', + "urcrop;": '\U0000230E', + "uring;": '\U0000016F', + "urtri;": '\U000025F9', + "uscr;": '\U0001D4CA', + "utdot;": '\U000022F0', + "utilde;": '\U00000169', + "utri;": '\U000025B5', + "utrif;": '\U000025B4', + "uuarr;": '\U000021C8', + "uuml;": '\U000000FC', + "uwangle;": '\U000029A7', + "vArr;": '\U000021D5', + "vBar;": '\U00002AE8', + "vBarv;": '\U00002AE9', + "vDash;": '\U000022A8', + "vangrt;": '\U0000299C', + "varepsilon;": '\U000003F5', + "varkappa;": '\U000003F0', + "varnothing;": '\U00002205', + "varphi;": '\U000003D5', + "varpi;": '\U000003D6', + "varpropto;": '\U0000221D', + "varr;": '\U00002195', + "varrho;": '\U000003F1', + "varsigma;": '\U000003C2', + "vartheta;": '\U000003D1', + "vartriangleleft;": '\U000022B2', + "vartriangleright;": '\U000022B3', + "vcy;": '\U00000432', + "vdash;": '\U000022A2', + "vee;": '\U00002228', + "veebar;": '\U000022BB', + "veeeq;": '\U0000225A', + "vellip;": '\U000022EE', + "verbar;": '\U0000007C', + "vert;": '\U0000007C', + "vfr;": '\U0001D533', + "vltri;": '\U000022B2', + "vopf;": '\U0001D567', + "vprop;": '\U0000221D', + "vrtri;": '\U000022B3', + "vscr;": '\U0001D4CB', + "vzigzag;": '\U0000299A', + "wcirc;": '\U00000175', + "wedbar;": '\U00002A5F', + "wedge;": '\U00002227', + "wedgeq;": '\U00002259', + "weierp;": '\U00002118', + "wfr;": '\U0001D534', + "wopf;": '\U0001D568', + "wp;": '\U00002118', + "wr;": '\U00002240', + "wreath;": '\U00002240', + "wscr;": '\U0001D4CC', + "xcap;": '\U000022C2', + "xcirc;": '\U000025EF', + "xcup;": '\U000022C3', + "xdtri;": '\U000025BD', + "xfr;": '\U0001D535', + "xhArr;": '\U000027FA', + "xharr;": '\U000027F7', + "xi;": '\U000003BE', + "xlArr;": '\U000027F8', + "xlarr;": '\U000027F5', + "xmap;": '\U000027FC', + "xnis;": '\U000022FB', + "xodot;": '\U00002A00', + "xopf;": '\U0001D569', + "xoplus;": '\U00002A01', + "xotime;": '\U00002A02', + "xrArr;": '\U000027F9', + "xrarr;": '\U000027F6', + "xscr;": '\U0001D4CD', + "xsqcup;": '\U00002A06', + "xuplus;": '\U00002A04', + "xutri;": '\U000025B3', + "xvee;": '\U000022C1', + "xwedge;": '\U000022C0', + "yacute;": '\U000000FD', + "yacy;": '\U0000044F', + "ycirc;": '\U00000177', + "ycy;": '\U0000044B', + "yen;": '\U000000A5', + "yfr;": '\U0001D536', + "yicy;": '\U00000457', + "yopf;": '\U0001D56A', + "yscr;": '\U0001D4CE', + "yucy;": '\U0000044E', + "yuml;": '\U000000FF', + "zacute;": '\U0000017A', + "zcaron;": '\U0000017E', + "zcy;": '\U00000437', + "zdot;": '\U0000017C', + "zeetrf;": '\U00002128', + "zeta;": '\U000003B6', + "zfr;": '\U0001D537', + "zhcy;": '\U00000436', + "zigrarr;": '\U000021DD', + "zopf;": '\U0001D56B', + "zscr;": '\U0001D4CF', + "zwj;": '\U0000200D', + "zwnj;": '\U0000200C', + "AElig": '\U000000C6', + "AMP": '\U00000026', + "Aacute": '\U000000C1', + "Acirc": '\U000000C2', + "Agrave": '\U000000C0', + "Aring": '\U000000C5', + "Atilde": '\U000000C3', + "Auml": '\U000000C4', + "COPY": '\U000000A9', + "Ccedil": '\U000000C7', + "ETH": '\U000000D0', + "Eacute": '\U000000C9', + "Ecirc": '\U000000CA', + "Egrave": '\U000000C8', + "Euml": '\U000000CB', + "GT": '\U0000003E', + "Iacute": '\U000000CD', + "Icirc": '\U000000CE', + "Igrave": '\U000000CC', + "Iuml": '\U000000CF', + "LT": '\U0000003C', + "Ntilde": '\U000000D1', + "Oacute": '\U000000D3', + "Ocirc": '\U000000D4', + "Ograve": '\U000000D2', + "Oslash": '\U000000D8', + "Otilde": '\U000000D5', + "Ouml": '\U000000D6', + "QUOT": '\U00000022', + "REG": '\U000000AE', + "THORN": '\U000000DE', + "Uacute": '\U000000DA', + "Ucirc": '\U000000DB', + "Ugrave": '\U000000D9', + "Uuml": '\U000000DC', + "Yacute": '\U000000DD', + "aacute": '\U000000E1', + "acirc": '\U000000E2', + "acute": '\U000000B4', + "aelig": '\U000000E6', + "agrave": '\U000000E0', + "amp": '\U00000026', + "aring": '\U000000E5', + "atilde": '\U000000E3', + "auml": '\U000000E4', + "brvbar": '\U000000A6', + "ccedil": '\U000000E7', + "cedil": '\U000000B8', + "cent": '\U000000A2', + "copy": '\U000000A9', + "curren": '\U000000A4', + "deg": '\U000000B0', + "divide": '\U000000F7', + "eacute": '\U000000E9', + "ecirc": '\U000000EA', + "egrave": '\U000000E8', + "eth": '\U000000F0', + "euml": '\U000000EB', + "frac12": '\U000000BD', + "frac14": '\U000000BC', + "frac34": '\U000000BE', + "gt": '\U0000003E', + "iacute": '\U000000ED', + "icirc": '\U000000EE', + "iexcl": '\U000000A1', + "igrave": '\U000000EC', + "iquest": '\U000000BF', + "iuml": '\U000000EF', + "laquo": '\U000000AB', + "lt": '\U0000003C', + "macr": '\U000000AF', + "micro": '\U000000B5', + "middot": '\U000000B7', + "nbsp": '\U000000A0', + "not": '\U000000AC', + "ntilde": '\U000000F1', + "oacute": '\U000000F3', + "ocirc": '\U000000F4', + "ograve": '\U000000F2', + "ordf": '\U000000AA', + "ordm": '\U000000BA', + "oslash": '\U000000F8', + "otilde": '\U000000F5', + "ouml": '\U000000F6', + "para": '\U000000B6', + "plusmn": '\U000000B1', + "pound": '\U000000A3', + "quot": '\U00000022', + "raquo": '\U000000BB', + "reg": '\U000000AE', + "sect": '\U000000A7', + "shy": '\U000000AD', + "sup1": '\U000000B9', + "sup2": '\U000000B2', + "sup3": '\U000000B3', + "szlig": '\U000000DF', + "thorn": '\U000000FE', + "times": '\U000000D7', + "uacute": '\U000000FA', + "ucirc": '\U000000FB', + "ugrave": '\U000000F9', + "uml": '\U000000A8', + "uuml": '\U000000FC', + "yacute": '\U000000FD', + "yen": '\U000000A5', + "yuml": '\U000000FF', } // HTML entities that are two unicode codepoints. diff --git a/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/.travis.yml b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/.travis.yml new file mode 100644 index 0000000000..17e5e50d52 --- /dev/null +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: +- 1.9 +- "1.10" +- tip +matrix: + allow_failures: + - go: tip diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/LICENSE b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/LICENSE rename to vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/LICENSE diff --git a/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/README.md b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/README.md new file mode 100644 index 0000000000..ecc83b2951 --- /dev/null +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/README.md @@ -0,0 +1,115 @@ +# Go CORS handler [![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/cors) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/cors/master/LICENSE) [![build](https://img.shields.io/travis/rs/cors.svg?style=flat)](https://travis-ci.org/rs/cors) [![Coverage](http://gocover.io/_badge/github.com/rs/cors)](http://gocover.io/github.com/rs/cors) + +CORS is a `net/http` handler implementing [Cross Origin Resource Sharing W3 specification](http://www.w3.org/TR/cors/) in Golang. + +## Getting Started + +After installing Go and setting up your [GOPATH](http://golang.org/doc/code.html#GOPATH), create your first `.go` file. We'll call it `server.go`. + +```go +package main + +import ( + "net/http" + + "github.com/rs/cors" +) + +func main() { + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + w.Write([]byte("{\"hello\": \"world\"}")) + }) + + // cors.Default() setup the middleware with default options being + // all origins accepted with simple methods (GET, POST). See + // documentation below for more options. + handler := cors.Default().Handler(mux) + http.ListenAndServe(":8080", handler) +} +``` + +Install `cors`: + + go get github.com/rs/cors + +Then run your server: + + go run server.go + +The server now runs on `localhost:8080`: + + $ curl -D - -H 'Origin: http://foo.com' http://localhost:8080/ + HTTP/1.1 200 OK + Access-Control-Allow-Origin: foo.com + Content-Type: application/json + Date: Sat, 25 Oct 2014 03:43:57 GMT + Content-Length: 18 + + {"hello": "world"} + +### Allow * With Credentials Security Protection + +This library has been modified to avoid a well known security issue when configured with `AllowedOrigins` to `*` and `AllowCredentials` to `true`. Such setup used to make the library reflects the request `Origin` header value, working around a security protection embedded into the standard that makes clients to refuse such configuration. This behavior has been removed with [#55](https://github.com/rs/cors/issues/55) and [#57](https://github.com/rs/cors/issues/57). + +If you depend on this behavior and understand the implications, you can restore it using the `AllowOriginFunc` with `func(origin string) {return true}`. + +Please refer to [#55](https://github.com/rs/cors/issues/55) for more information about the security implications. + +### More Examples + +* `net/http`: [examples/nethttp/server.go](https://github.com/rs/cors/blob/master/examples/nethttp/server.go) +* [Goji](https://goji.io): [examples/goji/server.go](https://github.com/rs/cors/blob/master/examples/goji/server.go) +* [Martini](http://martini.codegangsta.io): [examples/martini/server.go](https://github.com/rs/cors/blob/master/examples/martini/server.go) +* [Negroni](https://github.com/codegangsta/negroni): [examples/negroni/server.go](https://github.com/rs/cors/blob/master/examples/negroni/server.go) +* [Alice](https://github.com/justinas/alice): [examples/alice/server.go](https://github.com/rs/cors/blob/master/examples/alice/server.go) +* [HttpRouter](https://github.com/julienschmidt/httprouter): [examples/httprouter/server.go](https://github.com/rs/cors/blob/master/examples/httprouter/server.go) +* [Gorilla](http://www.gorillatoolkit.org/pkg/mux): [examples/gorilla/server.go](https://github.com/rs/cors/blob/master/examples/gorilla/server.go) +* [Buffalo](https://gobuffalo.io): [examples/buffalo/server.go](https://github.com/rs/cors/blob/master/examples/buffalo/server.go) +* [Gin](https://gin-gonic.github.io/gin): [examples/gin/server.go](https://github.com/rs/cors/blob/master/examples/gin/server.go) +* [Chi](https://github.com/go-chi/chi): [examples/chi/server.go](https://github.com/rs/cors/blob/master/examples/chi/server.go) + +## Parameters + +Parameters are passed to the middleware thru the `cors.New` method as follow: + +```go +c := cors.New(cors.Options{ + AllowedOrigins: []string{"http://foo.com", "http://foo.com:8080"}, + AllowCredentials: true, + // Enable Debugging for testing, consider disabling in production + Debug: true, +}) + +// Insert the middleware +handler = c.Handler(handler) +``` + +* **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. An origin may contain a wildcard (`*`) to replace 0 or more characters (i.e.: `http://*.domain.com`). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. The default value is `*`. +* **AllowOriginFunc** `func (origin string) bool`: A custom function to validate the origin. It takes the origin as an argument and returns true if allowed, or false otherwise. If this option is set, the content of `AllowedOrigins` is ignored. +* **AllowOriginRequestFunc** `func (r *http.Request origin string) bool`: A custom function to validate the origin. It takes the HTTP Request object and the origin as argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` and `AllowOriginFunc` is ignored +* **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`). +* **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests. +* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification +* **AllowCredentials** `bool`: Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. The default is `false`. +* **MaxAge** `int`: Indicates how long (in seconds) the results of a preflight request can be cached. The default is `0` which stands for no max age. +* **OptionsPassthrough** `bool`: Instructs preflight to let other potential next handlers to process the `OPTIONS` method. Turn this on if your application handles `OPTIONS`. +* **Debug** `bool`: Debugging flag adds additional output to debug server side CORS issues. + +See [API documentation](http://godoc.org/github.com/rs/cors) for more info. + +## Benchmarks + + BenchmarkWithout 20000000 64.6 ns/op 8 B/op 1 allocs/op + BenchmarkDefault 3000000 469 ns/op 114 B/op 2 allocs/op + BenchmarkAllowedOrigin 3000000 608 ns/op 114 B/op 2 allocs/op + BenchmarkPreflight 20000000 73.2 ns/op 0 B/op 0 allocs/op + BenchmarkPreflightHeader 20000000 73.6 ns/op 0 B/op 0 allocs/op + BenchmarkParseHeaderList 2000000 847 ns/op 184 B/op 6 allocs/op + BenchmarkParse…Single 5000000 290 ns/op 32 B/op 3 allocs/op + BenchmarkParse…Normalized 2000000 776 ns/op 160 B/op 6 allocs/op + +## Licenses + +All source code is licensed under the [MIT License](https://raw.github.com/rs/cors/master/LICENSE). diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/cors.go b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/cors.go similarity index 81% rename from vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/cors.go rename to vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/cors.go index 5202d82d58..d301ca724e 100644 --- a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/cors.go +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/cors.go @@ -21,14 +21,11 @@ The resulting handler is a standard net/http handler. package cors import ( - "context" "log" "net/http" "os" "strconv" "strings" - - "gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler" ) // Options is a configuration container to setup the CORS middleware. @@ -36,7 +33,7 @@ type Options struct { // AllowedOrigins is a list of origins a cross-domain request can be executed from. // If the special "*" value is present in the list, all origins will be allowed. // An origin may contain a wildcard (*) to replace 0 or more characters - // (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penality. + // (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penalty. // Only one wildcard can be used per origin. // Default value is ["*"] AllowedOrigins []string @@ -44,8 +41,12 @@ type Options struct { // as argument and returns true if allowed or false otherwise. If this option is // set, the content of AllowedOrigins is ignored. AllowOriginFunc func(origin string) bool + // AllowOriginFunc is a custom function to validate the origin. It takes the HTTP Request object and the origin as + // argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` + // and `AllowOriginFunc` is ignored. + AllowOriginRequestFunc func(r *http.Request, origin string) bool // AllowedMethods is a list of methods the client is allowed to use with - // cross-domain requests. Default value is simple methods (GET and POST) + // cross-domain requests. Default value is simple methods (HEAD, GET and POST). AllowedMethods []string // AllowedHeaders is list of non simple headers the client is allowed to use with // cross-domain requests. @@ -55,12 +56,12 @@ type Options struct { // ExposedHeaders indicates which headers are safe to expose to the API of a CORS // API specification ExposedHeaders []string - // AllowCredentials indicates whether the request can include user credentials like - // cookies, HTTP authentication or client side SSL certificates. - AllowCredentials bool // MaxAge indicates how long (in seconds) the results of a preflight request // can be cached MaxAge int + // AllowCredentials indicates whether the request can include user credentials like + // cookies, HTTP authentication or client side SSL certificates. + AllowCredentials bool // OptionsPassthrough instructs preflight to let other potential next handlers to // process the OPTIONS method. Turn this on if your application handles OPTIONS. OptionsPassthrough bool @@ -72,35 +73,38 @@ type Options struct { type Cors struct { // Debug logger Log *log.Logger - // Set to true when allowed origins contains a "*" - allowedOriginsAll bool // Normalized list of plain allowed origins allowedOrigins []string // List of allowed origins containing wildcards allowedWOrigins []wildcard // Optional origin validator function allowOriginFunc func(origin string) bool - // Set to true when allowed headers contains a "*" - allowedHeadersAll bool + // Optional origin validator (with request) function + allowOriginRequestFunc func(r *http.Request, origin string) bool // Normalized list of allowed headers allowedHeaders []string // Normalized list of allowed methods allowedMethods []string // Normalized list of exposed headers - exposedHeaders []string + exposedHeaders []string + maxAge int + // Set to true when allowed origins contains a "*" + allowedOriginsAll bool + // Set to true when allowed headers contains a "*" + allowedHeadersAll bool allowCredentials bool - maxAge int optionPassthrough bool } // New creates a new Cors handler with the provided options. func New(options Options) *Cors { c := &Cors{ - exposedHeaders: convert(options.ExposedHeaders, http.CanonicalHeaderKey), - allowOriginFunc: options.AllowOriginFunc, - allowCredentials: options.AllowCredentials, - maxAge: options.MaxAge, - optionPassthrough: options.OptionsPassthrough, + exposedHeaders: convert(options.ExposedHeaders, http.CanonicalHeaderKey), + allowOriginFunc: options.AllowOriginFunc, + allowOriginRequestFunc: options.AllowOriginRequestFunc, + allowCredentials: options.AllowCredentials, + maxAge: options.MaxAge, + optionPassthrough: options.OptionsPassthrough, } if options.Debug { c.Log = log.New(os.Stdout, "[cors] ", log.LstdFlags) @@ -112,8 +116,10 @@ func New(options Options) *Cors { // Allowed Origins if len(options.AllowedOrigins) == 0 { - // Default is all origins - c.allowedOriginsAll = true + if options.AllowOriginFunc == nil && options.AllowOriginRequestFunc == nil { + // Default is all origins + c.allowedOriginsAll = true + } } else { c.allowedOrigins = []string{} c.allowedWOrigins = []wildcard{} @@ -139,7 +145,7 @@ func New(options Options) *Cors { // Allowed Headers if len(options.AllowedHeaders) == 0 { // Use sensible defaults - c.allowedHeaders = []string{"Origin", "Accept", "Content-Type"} + c.allowedHeaders = []string{"Origin", "Accept", "Content-Type", "X-Requested-With"} } else { // Origin is always appended as some browsers will always request for this header at preflight c.allowedHeaders = convert(append(options.AllowedHeaders, "Origin"), http.CanonicalHeaderKey) @@ -155,7 +161,7 @@ func New(options Options) *Cors { // Allowed Methods if len(options.AllowedMethods) == 0 { // Default is spec's "simple" methods - c.allowedMethods = []string{"GET", "POST"} + c.allowedMethods = []string{"GET", "POST", "HEAD"} } else { c.allowedMethods = convert(options.AllowedMethods, strings.ToUpper) } @@ -163,16 +169,27 @@ func New(options Options) *Cors { return c } -// Default creates a new Cors handler with default options +// Default creates a new Cors handler with default options. func Default() *Cors { return New(Options{}) } +// AllowAll create a new Cors handler with permissive configuration allowing all +// origins with all standard methods with any header and credentials. +func AllowAll() *Cors { + return New(Options{ + AllowedOrigins: []string{"*"}, + AllowedMethods: []string{"HEAD", "GET", "POST", "PUT", "PATCH", "DELETE"}, + AllowedHeaders: []string{"*"}, + AllowCredentials: false, + }) +} + // Handler apply the CORS specification on the request, and add relevant CORS headers // as necessary. func (c *Cors) Handler(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "OPTIONS" { + if r.Method == http.MethodOptions && r.Header.Get("Access-Control-Request-Method") != "" { c.logf("Handler: Preflight request") c.handlePreflight(w, r) // Preflight requests are standalone and should stop the chain as some other @@ -181,6 +198,8 @@ func (c *Cors) Handler(h http.Handler) http.Handler { // headers (see #1) if c.optionPassthrough { h.ServeHTTP(w, r) + } else { + w.WriteHeader(http.StatusOK) } } else { c.logf("Handler: Actual request") @@ -190,30 +209,9 @@ func (c *Cors) Handler(h http.Handler) http.Handler { }) } -// HandlerC is net/context aware handler -func (c *Cors) HandlerC(h xhandler.HandlerC) xhandler.HandlerC { - return xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { - if r.Method == "OPTIONS" { - c.logf("Handler: Preflight request") - c.handlePreflight(w, r) - // Preflight requests are standalone and should stop the chain as some other - // middleware may not handle OPTIONS requests correctly. One typical example - // is authentication middleware ; OPTIONS requests won't carry authentication - // headers (see #1) - if c.optionPassthrough { - h.ServeHTTPC(ctx, w, r) - } - } else { - c.logf("Handler: Actual request") - c.handleActualRequest(w, r) - h.ServeHTTPC(ctx, w, r) - } - }) -} - // HandlerFunc provides Martini compatible handler func (c *Cors) HandlerFunc(w http.ResponseWriter, r *http.Request) { - if r.Method == "OPTIONS" { + if r.Method == http.MethodOptions && r.Header.Get("Access-Control-Request-Method") != "" { c.logf("HandlerFunc: Preflight request") c.handlePreflight(w, r) } else { @@ -224,7 +222,7 @@ func (c *Cors) HandlerFunc(w http.ResponseWriter, r *http.Request) { // Negroni compatible interface func (c *Cors) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { - if r.Method == "OPTIONS" { + if r.Method == http.MethodOptions && r.Header.Get("Access-Control-Request-Method") != "" { c.logf("ServeHTTP: Preflight request") c.handlePreflight(w, r) // Preflight requests are standalone and should stop the chain as some other @@ -233,6 +231,8 @@ func (c *Cors) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.Handl // headers (see #1) if c.optionPassthrough { next(w, r) + } else { + w.WriteHeader(http.StatusOK) } } else { c.logf("ServeHTTP: Actual request") @@ -246,7 +246,7 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) { headers := w.Header() origin := r.Header.Get("Origin") - if r.Method != "OPTIONS" { + if r.Method != http.MethodOptions { c.logf(" Preflight aborted: %s!=OPTIONS", r.Method) return } @@ -261,7 +261,7 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) { c.logf(" Preflight aborted: empty origin") return } - if !c.isOriginAllowed(origin) { + if !c.isOriginAllowed(r, origin) { c.logf(" Preflight aborted: origin '%s' not allowed", origin) return } @@ -276,7 +276,11 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) { c.logf(" Preflight aborted: headers '%v' not allowed", reqHeaders) return } - headers.Set("Access-Control-Allow-Origin", origin) + if c.allowedOriginsAll { + headers.Set("Access-Control-Allow-Origin", "*") + } else { + headers.Set("Access-Control-Allow-Origin", origin) + } // Spec says: Since the list of methods can be unbounded, simply returning the method indicated // by Access-Control-Request-Method (if supported) can be enough headers.Set("Access-Control-Allow-Methods", strings.ToUpper(reqMethod)) @@ -300,7 +304,7 @@ func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) { headers := w.Header() origin := r.Header.Get("Origin") - if r.Method == "OPTIONS" { + if r.Method == http.MethodOptions { c.logf(" Actual request no headers added: method == %s", r.Method) return } @@ -310,7 +314,7 @@ func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) { c.logf(" Actual request no headers added: missing origin") return } - if !c.isOriginAllowed(origin) { + if !c.isOriginAllowed(r, origin) { c.logf(" Actual request no headers added: origin '%s' not allowed", origin) return } @@ -324,7 +328,11 @@ func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) { return } - headers.Set("Access-Control-Allow-Origin", origin) + if c.allowedOriginsAll { + headers.Set("Access-Control-Allow-Origin", "*") + } else { + headers.Set("Access-Control-Allow-Origin", origin) + } if len(c.exposedHeaders) > 0 { headers.Set("Access-Control-Expose-Headers", strings.Join(c.exposedHeaders, ", ")) } @@ -343,7 +351,10 @@ func (c *Cors) logf(format string, a ...interface{}) { // isOriginAllowed checks if a given origin is allowed to perform cross-domain requests // on the endpoint -func (c *Cors) isOriginAllowed(origin string) bool { +func (c *Cors) isOriginAllowed(r *http.Request, origin string) bool { + if c.allowOriginRequestFunc != nil { + return c.allowOriginRequestFunc(r, origin) + } if c.allowOriginFunc != nil { return c.allowOriginFunc(origin) } @@ -372,7 +383,7 @@ func (c *Cors) isMethodAllowed(method string) bool { return false } method = strings.ToUpper(method) - if method == "OPTIONS" { + if method == http.MethodOptions { // Always allow preflight requests return true } diff --git a/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/go.mod b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/go.mod new file mode 100644 index 0000000000..0a4c652105 --- /dev/null +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/go.mod @@ -0,0 +1 @@ +module github.com/rs/cors diff --git a/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/package.json b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/package.json new file mode 100644 index 0000000000..cfb6c64176 --- /dev/null +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/package.json @@ -0,0 +1,16 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/rs/cors" + }, + "gx": { + "dvcsimport": "github.com/rs/cors" + }, + "gxVersion": "0.14.0", + "language": "go", + "license": "MIT", + "name": "cors", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.6.0" +} + diff --git a/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/utils.go b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/utils.go new file mode 100644 index 0000000000..53ad9e9db3 --- /dev/null +++ b/vendor/gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors/utils.go @@ -0,0 +1,71 @@ +package cors + +import "strings" + +const toLower = 'a' - 'A' + +type converter func(string) string + +type wildcard struct { + prefix string + suffix string +} + +func (w wildcard) match(s string) bool { + return len(s) >= len(w.prefix+w.suffix) && strings.HasPrefix(s, w.prefix) && strings.HasSuffix(s, w.suffix) +} + +// convert converts a list of string using the passed converter function +func convert(s []string, c converter) []string { + out := []string{} + for _, i := range s { + out = append(out, c(i)) + } + return out +} + +// parseHeaderList tokenize + normalize a string containing a list of headers +func parseHeaderList(headerList string) []string { + l := len(headerList) + h := make([]byte, 0, l) + upper := true + // Estimate the number headers in order to allocate the right splice size + t := 0 + for i := 0; i < l; i++ { + if headerList[i] == ',' { + t++ + } + } + headers := make([]string, 0, t) + for i := 0; i < l; i++ { + b := headerList[i] + switch { + case b >= 'a' && b <= 'z': + if upper { + h = append(h, b-toLower) + } else { + h = append(h, b) + } + case b >= 'A' && b <= 'Z': + if !upper { + h = append(h, b+toLower) + } else { + h = append(h, b) + } + case b == '-' || b == '_' || (b >= '0' && b <= '9'): + h = append(h, b) + } + + if b == ' ' || b == ',' || i == l-1 { + if len(h) > 0 { + // Flush the found header + headers = append(headers, string(h)) + h = h[:0] + upper = true + } + } else { + upper = b == '-' || b == '_' + } + } + return headers +} diff --git a/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/.travis.yml b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/.travis.yml new file mode 100644 index 0000000000..58f1620cdf --- /dev/null +++ b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +language: go + +sudo: false + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/LICENSE b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/LICENSE rename to vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/LICENSE diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/Makefile b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/Makefile rename to vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/Makefile diff --git a/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/README.md b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/README.md new file mode 100644 index 0000000000..0e9b4ce223 --- /dev/null +++ b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/README.md @@ -0,0 +1,48 @@ +# go-libp2p-transport + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://libp2p.io/) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-transport?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p-transport) +[![Coverage Status](https://img.shields.io/codecov/c/github/libp2p/go-libp2p-transport.svg?style=flat-square&branch=master)](https://codecov.io/github/libp2p/go-libp2p-transport?branch=master) +[![Build Status](https://travis-ci.org/libp2p/go-libp2p-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport) + +> libp2p transport code + +A common interface for network transports. + +This is the 'base' layer for any transport that wants to be used by libp2p and ipfs. If you want to make 'ipfs work over X', the first thing you'll want to do is to implement the `Transport` interface for 'X'. + +Transports are: + +* Encrypted: Connections must be end-to-end encrypted. +* Authenticated: The endpoints, RemotePeer and LocalPeer, must be authenticated. +* Multiplexed: It must be possible to multiplex multiple reliable streams over a single transport connection. + +## Install + +```sh +> gx install --global +> gx-go rewrite +``` + +## Usage + +To actually *use* a transport, you'll likely want to register it with a `transport.Network` (e.g., [go-libp2p-swarm](https://github.com/libp2p/go-libp2p-swarm)). However, you're probably more interested in *implementing* transports. + +Transports construct fully featured, encrypted, multiplexed connections. However, there's a fairly good chance your transport won't meet all of those requirements. To make life easier, we've created a helper library called [go-libp2p-transport-upgrader](https://github.com/libp2p/go-libp2p-transport-upgrader) for upgrading simple stream transports to fully-featured (encrypted, authenticated, multiplexed) transports. Check out that package's [README](https://github.com/libp2p/go-libp2p-transport-upgrader/blob/master/README.md) for an example. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-transport/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +### Want to hack on IPFS? + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) + +## License + +MIT diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/codecov.yml b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/codecov.yml rename to vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/codecov.yml diff --git a/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/package.json b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/package.json new file mode 100644 index 0000000000..e61c5d954a --- /dev/null +++ b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/package.json @@ -0,0 +1,47 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-transport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-transport" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.0.27" +} + diff --git a/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/transport.go b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/transport.go new file mode 100644 index 0000000000..7e14f882dc --- /dev/null +++ b/vendor/gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport/transport.go @@ -0,0 +1,97 @@ +package transport + +import ( + "context" + "net" + "time" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +// DialTimeout is the maximum duration a Dial is allowed to take. +// This includes the time between dialing the raw network connection, +// protocol selection as well the handshake, if applicable. +var DialTimeout = 60 * time.Second + +// AcceptTimeout is the maximum duration an Accept is allowed to take. +// This includes the time between accepting the raw network connection, +// protocol selection as well as the handshake, if applicable. +var AcceptTimeout = 60 * time.Second + +var log = logging.Logger("transport") + +// Conn is an extension of the net.Conn interface that provides multiaddr +// information, and an accessor for the transport used to create the conn +type Conn interface { + smux.Conn + inet.ConnSecurity + inet.ConnMultiaddrs + + // Transport returns the transport to which this connection belongs. + Transport() Transport +} + +// Transport represents any device by which you can connect to and accept +// connections from other peers. The built-in transports provided are TCP and UTP +// but many more can be implemented, sctp, audio signals, sneakernet, UDT, a +// network of drones carrying usb flash drives, and so on. +type Transport interface { + // Dial dials a remote peer. It should try to reuse local listener + // addresses if possible but it may choose not to. + Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (Conn, error) + + // CanDial returns true if this transport knows how to dial the given + // multiaddr. + // + // Returning true does not guarantee that dialing this multiaddr will + // succeed. This function should *only* be used to preemptively filter + // out addresses that we can't dial. + CanDial(addr ma.Multiaddr) bool + + // Listen listens on the passed multiaddr. + Listen(laddr ma.Multiaddr) (Listener, error) + + // Protocol returns the set of protocols handled by this transport. + // + // See the Network interface for an explanation of how this is used. + Protocols() []int + + // Proxy returns true if this is a proxy transport. + // + // See the Network interface for an explanation of how this is used. + // TODO: Make this a part of the go-multiaddr protocol instead? + Proxy() bool +} + +// Listener is an interface closely resembling the net.Listener interface. The +// only real difference is that Accept() returns Conn's of the type in this +// package, and also exposes a Multiaddr method as opposed to a regular Addr +// method +type Listener interface { + Accept() (Conn, error) + Close() error + Addr() net.Addr + Multiaddr() ma.Multiaddr +} + +// Network is an inet.Network with methods for managing transports. +type Network interface { + inet.Network + + // AddTransport adds a transport to this Network. + // + // When dialing, this Network will iterate over the protocols in the + // remote multiaddr and pick the first protocol registered with a proxy + // transport, if any. Otherwise, it'll pick the transport registered to + // handle the last protocol in the multiaddr. + // + // When listening, this Network will iterate over the protocols in the + // local multiaddr and pick the *last* protocol registered with a proxy + // transport, if any. Otherwise, it'll pick the transport registered to + // handle the last protocol in the multiaddr. + AddTransport(t Transport) error +} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/bitswap.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/bitswap.go deleted file mode 100644 index 785c55251b..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/bitswap.go +++ /dev/null @@ -1,466 +0,0 @@ -// package bitswap implements the IPFS exchange interface with the BitSwap -// bilateral exchange protocol. -package bitswap - -import ( - "context" - "errors" - "math" - "sync" - "sync/atomic" - "time" - - decision "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision" - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - notifications "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface" - delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" - flags "gx/ipfs/QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8/go-ipfs-flags" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" -) - -var log = logging.Logger("bitswap") - -const ( - // maxProvidersPerRequest specifies the maximum number of providers desired - // from the network. This value is specified because the network streams - // results. - // TODO: if a 'non-nice' strategy is implemented, consider increasing this value - maxProvidersPerRequest = 3 - findProviderDelay = 1 * time.Second - providerRequestTimeout = time.Second * 10 - provideTimeout = time.Second * 15 - sizeBatchRequestChan = 32 - // kMaxPriority is the max priority as defined by the bitswap protocol - kMaxPriority = math.MaxInt32 -) - -var ( - HasBlockBufferSize = 256 - provideKeysBufferSize = 2048 - provideWorkerMax = 512 - - // the 1<<18+15 is to observe old file chunks that are 1<<18 + 14 in size - metricsBuckets = []float64{1 << 6, 1 << 10, 1 << 14, 1 << 18, 1<<18 + 15, 1 << 22} -) - -func init() { - if flags.LowMemMode { - HasBlockBufferSize = 64 - provideKeysBufferSize = 512 - provideWorkerMax = 16 - } -} - -var rebroadcastDelay = delay.Fixed(time.Minute) - -// New initializes a BitSwap instance that communicates over the provided -// BitSwapNetwork. This function registers the returned instance as the network -// delegate. -// Runs until context is cancelled. -func New(parent context.Context, network bsnet.BitSwapNetwork, - bstore blockstore.Blockstore) exchange.Interface { - - // important to use provided parent context (since it may include important - // loggable data). It's probably not a good idea to allow bitswap to be - // coupled to the concerns of the ipfs daemon in this way. - // - // FIXME(btc) Now that bitswap manages itself using a process, it probably - // shouldn't accept a context anymore. Clients should probably use Close() - // exclusively. We should probably find another way to share logging data - ctx, cancelFunc := context.WithCancel(parent) - ctx = metrics.CtxSubScope(ctx, "bitswap") - dupHist := metrics.NewCtx(ctx, "recv_dup_blocks_bytes", "Summary of duplicate"+ - " data blocks recived").Histogram(metricsBuckets) - allHist := metrics.NewCtx(ctx, "recv_all_blocks_bytes", "Summary of all"+ - " data blocks recived").Histogram(metricsBuckets) - - notif := notifications.New() - px := process.WithTeardown(func() error { - notif.Shutdown() - return nil - }) - - bs := &Bitswap{ - blockstore: bstore, - notifications: notif, - engine: decision.NewEngine(ctx, bstore), // TODO close the engine with Close() method - network: network, - findKeys: make(chan *blockRequest, sizeBatchRequestChan), - process: px, - newBlocks: make(chan cid.Cid, HasBlockBufferSize), - provideKeys: make(chan cid.Cid, provideKeysBufferSize), - wm: NewWantManager(ctx, network), - counters: new(counters), - - dupMetric: dupHist, - allMetric: allHist, - } - go bs.wm.Run() - network.SetDelegate(bs) - - // Start up bitswaps async worker routines - bs.startWorkers(px, ctx) - - // bind the context and process. - // do it over here to avoid closing before all setup is done. - go func() { - <-px.Closing() // process closes first - cancelFunc() - }() - procctx.CloseAfterContext(px, ctx) // parent cancelled first - - return bs -} - -// Bitswap instances implement the bitswap protocol. -type Bitswap struct { - // the peermanager manages sending messages to peers in a way that - // wont block bitswap operation - wm *WantManager - - // the engine is the bit of logic that decides who to send which blocks to - engine *decision.Engine - - // network delivers messages on behalf of the session - network bsnet.BitSwapNetwork - - // blockstore is the local database - // NB: ensure threadsafety - blockstore blockstore.Blockstore - - // notifications engine for receiving new blocks and routing them to the - // appropriate user requests - notifications notifications.PubSub - - // findKeys sends keys to a worker to find and connect to providers for them - findKeys chan *blockRequest - // newBlocks is a channel for newly added blocks to be provided to the - // network. blocks pushed down this channel get buffered and fed to the - // provideKeys channel later on to avoid too much network activity - newBlocks chan cid.Cid - // provideKeys directly feeds provide workers - provideKeys chan cid.Cid - - process process.Process - - // Counters for various statistics - counterLk sync.Mutex - counters *counters - - // Metrics interface metrics - dupMetric metrics.Histogram - allMetric metrics.Histogram - - // Sessions - sessions []*Session - sessLk sync.Mutex - - sessID uint64 - sessIDLk sync.Mutex -} - -type counters struct { - blocksRecvd uint64 - dupBlocksRecvd uint64 - dupDataRecvd uint64 - blocksSent uint64 - dataSent uint64 - dataRecvd uint64 - messagesRecvd uint64 -} - -type blockRequest struct { - Cid cid.Cid - Ctx context.Context -} - -// GetBlock attempts to retrieve a particular block from peers within the -// deadline enforced by the context. -func (bs *Bitswap) GetBlock(parent context.Context, k cid.Cid) (blocks.Block, error) { - return getBlock(parent, k, bs.GetBlocks) -} - -func (bs *Bitswap) WantlistForPeer(p peer.ID) []cid.Cid { - var out []cid.Cid - for _, e := range bs.engine.WantlistForPeer(p) { - out = append(out, e.Cid) - } - return out -} - -func (bs *Bitswap) LedgerForPeer(p peer.ID) *decision.Receipt { - return bs.engine.LedgerForPeer(p) -} - -// GetBlocks returns a channel where the caller may receive blocks that -// correspond to the provided |keys|. Returns an error if BitSwap is unable to -// begin this request within the deadline enforced by the context. -// -// NB: Your request remains open until the context expires. To conserve -// resources, provide a context with a reasonably short deadline (ie. not one -// that lasts throughout the lifetime of the server) -func (bs *Bitswap) GetBlocks(ctx context.Context, keys []cid.Cid) (<-chan blocks.Block, error) { - if len(keys) == 0 { - out := make(chan blocks.Block) - close(out) - return out, nil - } - - select { - case <-bs.process.Closing(): - return nil, errors.New("bitswap is closed") - default: - } - promise := bs.notifications.Subscribe(ctx, keys...) - - for _, k := range keys { - log.Event(ctx, "Bitswap.GetBlockRequest.Start", k) - } - - mses := bs.getNextSessionID() - - bs.wm.WantBlocks(ctx, keys, nil, mses) - - remaining := cid.NewSet() - for _, k := range keys { - remaining.Add(k) - } - - out := make(chan blocks.Block) - go func() { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - defer close(out) - defer func() { - // can't just defer this call on its own, arguments are resolved *when* the defer is created - bs.CancelWants(remaining.Keys(), mses) - }() - findProvsDelay := time.NewTimer(findProviderDelay) - defer findProvsDelay.Stop() - - findProvsDelayCh := findProvsDelay.C - req := &blockRequest{ - Cid: keys[0], - Ctx: ctx, - } - - var findProvsReqCh chan<- *blockRequest - - for { - select { - case <-findProvsDelayCh: - // NB: Optimization. Assumes that providers of key[0] are likely to - // be able to provide for all keys. This currently holds true in most - // every situation. Later, this assumption may not hold as true. - findProvsReqCh = bs.findKeys - findProvsDelayCh = nil - case findProvsReqCh <- req: - findProvsReqCh = nil - case blk, ok := <-promise: - if !ok { - return - } - - // No need to find providers now. - findProvsDelay.Stop() - findProvsDelayCh = nil - findProvsReqCh = nil - - bs.CancelWants([]cid.Cid{blk.Cid()}, mses) - remaining.Remove(blk.Cid()) - select { - case out <- blk: - case <-ctx.Done(): - return - } - case <-ctx.Done(): - return - } - } - }() - - return out, nil -} - -func (bs *Bitswap) getNextSessionID() uint64 { - bs.sessIDLk.Lock() - defer bs.sessIDLk.Unlock() - bs.sessID++ - return bs.sessID -} - -// CancelWant removes a given key from the wantlist -func (bs *Bitswap) CancelWants(cids []cid.Cid, ses uint64) { - if len(cids) == 0 { - return - } - bs.wm.CancelWants(context.Background(), cids, nil, ses) -} - -// HasBlock announces the existence of a block to this bitswap service. The -// service will potentially notify its peers. -func (bs *Bitswap) HasBlock(blk blocks.Block) error { - return bs.receiveBlockFrom(blk, "") -} - -// TODO: Some of this stuff really only needs to be done when adding a block -// from the user, not when receiving it from the network. -// In case you run `git blame` on this comment, I'll save you some time: ask -// @whyrusleeping, I don't know the answers you seek. -func (bs *Bitswap) receiveBlockFrom(blk blocks.Block, from peer.ID) error { - select { - case <-bs.process.Closing(): - return errors.New("bitswap is closed") - default: - } - - err := bs.blockstore.Put(blk) - if err != nil { - log.Errorf("Error writing block to datastore: %s", err) - return err - } - - // NOTE: There exists the possiblity for a race condition here. If a user - // creates a node, then adds it to the dagservice while another goroutine - // is waiting on a GetBlock for that object, they will receive a reference - // to the same node. We should address this soon, but i'm not going to do - // it now as it requires more thought and isnt causing immediate problems. - bs.notifications.Publish(blk) - - k := blk.Cid() - ks := []cid.Cid{k} - for _, s := range bs.SessionsForBlock(k) { - s.receiveBlockFrom(from, blk) - bs.CancelWants(ks, s.id) - } - - bs.engine.AddBlock(blk) - - select { - case bs.newBlocks <- blk.Cid(): - // send block off to be reprovided - case <-bs.process.Closing(): - return bs.process.Close() - } - return nil -} - -// SessionsForBlock returns a slice of all sessions that may be interested in the given cid -func (bs *Bitswap) SessionsForBlock(c cid.Cid) []*Session { - bs.sessLk.Lock() - defer bs.sessLk.Unlock() - - var out []*Session - for _, s := range bs.sessions { - if s.interestedIn(c) { - out = append(out, s) - } - } - return out -} - -func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg.BitSwapMessage) { - atomic.AddUint64(&bs.counters.messagesRecvd, 1) - - // This call records changes to wantlists, blocks received, - // and number of bytes transfered. - bs.engine.MessageReceived(p, incoming) - // TODO: this is bad, and could be easily abused. - // Should only track *useful* messages in ledger - - iblocks := incoming.Blocks() - - if len(iblocks) == 0 { - return - } - - wg := sync.WaitGroup{} - for _, block := range iblocks { - wg.Add(1) - go func(b blocks.Block) { // TODO: this probably doesnt need to be a goroutine... - defer wg.Done() - - bs.updateReceiveCounters(b) - - log.Debugf("got block %s from %s", b, p) - - if err := bs.receiveBlockFrom(b, p); err != nil { - log.Warningf("ReceiveMessage recvBlockFrom error: %s", err) - } - log.Event(ctx, "Bitswap.GetBlockRequest.End", b.Cid()) - }(block) - } - wg.Wait() -} - -var ErrAlreadyHaveBlock = errors.New("already have block") - -func (bs *Bitswap) updateReceiveCounters(b blocks.Block) { - blkLen := len(b.RawData()) - has, err := bs.blockstore.Has(b.Cid()) - if err != nil { - log.Infof("blockstore.Has error: %s", err) - return - } - - bs.allMetric.Observe(float64(blkLen)) - if has { - bs.dupMetric.Observe(float64(blkLen)) - } - - bs.counterLk.Lock() - defer bs.counterLk.Unlock() - c := bs.counters - - c.blocksRecvd++ - c.dataRecvd += uint64(len(b.RawData())) - if has { - c.dupBlocksRecvd++ - c.dupDataRecvd += uint64(blkLen) - } -} - -// Connected/Disconnected warns bitswap about peer connections -func (bs *Bitswap) PeerConnected(p peer.ID) { - bs.wm.Connected(p) - bs.engine.PeerConnected(p) -} - -// Connected/Disconnected warns bitswap about peer connections -func (bs *Bitswap) PeerDisconnected(p peer.ID) { - bs.wm.Disconnected(p) - bs.engine.PeerDisconnected(p) -} - -func (bs *Bitswap) ReceiveError(err error) { - log.Infof("Bitswap ReceiveError: %s", err) - // TODO log the network error - // TODO bubble the network error up to the parent context/error logger -} - -func (bs *Bitswap) Close() error { - return bs.process.Close() -} - -func (bs *Bitswap) GetWantlist() []cid.Cid { - entries := bs.wm.wl.Entries() - out := make([]cid.Cid, 0, len(entries)) - for _, e := range entries { - out = append(out, e.Cid) - } - return out -} - -func (bs *Bitswap) IsOnline() bool { - return true -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/get.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/get.go deleted file mode 100644 index 9819fbd8e0..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/get.go +++ /dev/null @@ -1,100 +0,0 @@ -package bitswap - -import ( - "context" - "errors" - - notifications "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" -) - -type getBlocksFunc func(context.Context, []cid.Cid) (<-chan blocks.Block, error) - -func getBlock(p context.Context, k cid.Cid, gb getBlocksFunc) (blocks.Block, error) { - if !k.Defined() { - log.Error("undefined cid in GetBlock") - return nil, blockstore.ErrNotFound - } - - // Any async work initiated by this function must end when this function - // returns. To ensure this, derive a new context. Note that it is okay to - // listen on parent in this scope, but NOT okay to pass |parent| to - // functions called by this one. Otherwise those functions won't return - // when this context's cancel func is executed. This is difficult to - // enforce. May this comment keep you safe. - ctx, cancel := context.WithCancel(p) - defer cancel() - - promise, err := gb(ctx, []cid.Cid{k}) - if err != nil { - return nil, err - } - - select { - case block, ok := <-promise: - if !ok { - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - return nil, errors.New("promise channel was closed") - } - } - return block, nil - case <-p.Done(): - return nil, p.Err() - } -} - -type wantFunc func(context.Context, []cid.Cid) - -func getBlocksImpl(ctx context.Context, keys []cid.Cid, notif notifications.PubSub, want wantFunc, cwants func([]cid.Cid)) (<-chan blocks.Block, error) { - if len(keys) == 0 { - out := make(chan blocks.Block) - close(out) - return out, nil - } - - remaining := cid.NewSet() - promise := notif.Subscribe(ctx, keys...) - for _, k := range keys { - log.Event(ctx, "Bitswap.GetBlockRequest.Start", k) - remaining.Add(k) - } - - want(ctx, keys) - - out := make(chan blocks.Block) - go handleIncoming(ctx, remaining, promise, out, cwants) - return out, nil -} - -func handleIncoming(ctx context.Context, remaining *cid.Set, in <-chan blocks.Block, out chan blocks.Block, cfun func([]cid.Cid)) { - ctx, cancel := context.WithCancel(ctx) - defer func() { - cancel() - close(out) - // can't just defer this call on its own, arguments are resolved *when* the defer is created - cfun(remaining.Keys()) - }() - for { - select { - case blk, ok := <-in: - if !ok { - return - } - - remaining.Remove(blk.Cid()) - select { - case out <- blk: - case <-ctx.Done(): - return - } - case <-ctx.Done(): - return - } - } -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/message.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/message.go deleted file mode 100644 index 7f37d5fc39..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/message.go +++ /dev/null @@ -1,244 +0,0 @@ -package message - -import ( - "fmt" - "io" - - pb "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb" - wantlist "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" -) - -// TODO move message.go into the bitswap package -// TODO move bs/msg/internal/pb to bs/internal/pb and rename pb package to bitswap_pb - -type BitSwapMessage interface { - // Wantlist returns a slice of unique keys that represent data wanted by - // the sender. - Wantlist() []Entry - - // Blocks returns a slice of unique blocks - Blocks() []blocks.Block - - // AddEntry adds an entry to the Wantlist. - AddEntry(key cid.Cid, priority int) - - Cancel(key cid.Cid) - - Empty() bool - - // A full wantlist is an authoritative copy, a 'non-full' wantlist is a patch-set - Full() bool - - AddBlock(blocks.Block) - Exportable - - Loggable() map[string]interface{} -} - -type Exportable interface { - ToProtoV0() *pb.Message - ToProtoV1() *pb.Message - ToNetV0(w io.Writer) error - ToNetV1(w io.Writer) error -} - -type impl struct { - full bool - wantlist map[cid.Cid]*Entry - blocks map[cid.Cid]blocks.Block -} - -func New(full bool) BitSwapMessage { - return newMsg(full) -} - -func newMsg(full bool) *impl { - return &impl{ - blocks: make(map[cid.Cid]blocks.Block), - wantlist: make(map[cid.Cid]*Entry), - full: full, - } -} - -type Entry struct { - *wantlist.Entry - Cancel bool -} - -func newMessageFromProto(pbm pb.Message) (BitSwapMessage, error) { - m := newMsg(pbm.Wantlist.Full) - for _, e := range pbm.Wantlist.Entries { - c, err := cid.Cast([]byte(e.Block)) - if err != nil { - return nil, fmt.Errorf("incorrectly formatted cid in wantlist: %s", err) - } - m.addEntry(c, int(e.Priority), e.Cancel) - } - - // deprecated - for _, d := range pbm.Blocks { - // CIDv0, sha256, protobuf only - b := blocks.NewBlock(d) - m.AddBlock(b) - } - // - - for _, b := range pbm.GetPayload() { - pref, err := cid.PrefixFromBytes(b.GetPrefix()) - if err != nil { - return nil, err - } - - c, err := pref.Sum(b.GetData()) - if err != nil { - return nil, err - } - - blk, err := blocks.NewBlockWithCid(b.GetData(), c) - if err != nil { - return nil, err - } - - m.AddBlock(blk) - } - - return m, nil -} - -func (m *impl) Full() bool { - return m.full -} - -func (m *impl) Empty() bool { - return len(m.blocks) == 0 && len(m.wantlist) == 0 -} - -func (m *impl) Wantlist() []Entry { - out := make([]Entry, 0, len(m.wantlist)) - for _, e := range m.wantlist { - out = append(out, *e) - } - return out -} - -func (m *impl) Blocks() []blocks.Block { - bs := make([]blocks.Block, 0, len(m.blocks)) - for _, block := range m.blocks { - bs = append(bs, block) - } - return bs -} - -func (m *impl) Cancel(k cid.Cid) { - delete(m.wantlist, k) - m.addEntry(k, 0, true) -} - -func (m *impl) AddEntry(k cid.Cid, priority int) { - m.addEntry(k, priority, false) -} - -func (m *impl) addEntry(c cid.Cid, priority int, cancel bool) { - e, exists := m.wantlist[c] - if exists { - e.Priority = priority - e.Cancel = cancel - } else { - m.wantlist[c] = &Entry{ - Entry: &wantlist.Entry{ - Cid: c, - Priority: priority, - }, - Cancel: cancel, - } - } -} - -func (m *impl) AddBlock(b blocks.Block) { - m.blocks[b.Cid()] = b -} - -func FromNet(r io.Reader) (BitSwapMessage, error) { - pbr := ggio.NewDelimitedReader(r, inet.MessageSizeMax) - return FromPBReader(pbr) -} - -func FromPBReader(pbr ggio.Reader) (BitSwapMessage, error) { - pb := new(pb.Message) - if err := pbr.ReadMsg(pb); err != nil { - return nil, err - } - - return newMessageFromProto(*pb) -} - -func (m *impl) ToProtoV0() *pb.Message { - pbm := new(pb.Message) - pbm.Wantlist.Entries = make([]pb.Message_Wantlist_Entry, 0, len(m.wantlist)) - for _, e := range m.wantlist { - pbm.Wantlist.Entries = append(pbm.Wantlist.Entries, pb.Message_Wantlist_Entry{ - Block: e.Cid.Bytes(), - Priority: int32(e.Priority), - Cancel: e.Cancel, - }) - } - pbm.Wantlist.Full = m.full - - blocks := m.Blocks() - pbm.Blocks = make([][]byte, 0, len(blocks)) - for _, b := range blocks { - pbm.Blocks = append(pbm.Blocks, b.RawData()) - } - return pbm -} - -func (m *impl) ToProtoV1() *pb.Message { - pbm := new(pb.Message) - pbm.Wantlist.Entries = make([]pb.Message_Wantlist_Entry, 0, len(m.wantlist)) - for _, e := range m.wantlist { - pbm.Wantlist.Entries = append(pbm.Wantlist.Entries, pb.Message_Wantlist_Entry{ - Block: e.Cid.Bytes(), - Priority: int32(e.Priority), - Cancel: e.Cancel, - }) - } - pbm.Wantlist.Full = m.full - - blocks := m.Blocks() - pbm.Payload = make([]pb.Message_Block, 0, len(blocks)) - for _, b := range blocks { - pbm.Payload = append(pbm.Payload, pb.Message_Block{ - Data: b.RawData(), - Prefix: b.Cid().Prefix().Bytes(), - }) - } - return pbm -} - -func (m *impl) ToNetV0(w io.Writer) error { - pbw := ggio.NewDelimitedWriter(w) - - return pbw.WriteMsg(m.ToProtoV0()) -} - -func (m *impl) ToNetV1(w io.Writer) error { - pbw := ggio.NewDelimitedWriter(w) - - return pbw.WriteMsg(m.ToProtoV1()) -} - -func (m *impl) Loggable() map[string]interface{} { - blocks := make([]string, 0, len(m.blocks)) - for _, v := range m.blocks { - blocks = append(blocks, v.Cid().String()) - } - return map[string]interface{}{ - "blocks": blocks, - "wants": m.Wantlist(), - } -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/interface.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/interface.go deleted file mode 100644 index e0a6fb8ef3..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/interface.go +++ /dev/null @@ -1,70 +0,0 @@ -package network - -import ( - "context" - - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" -) - -var ( - // These two are equivalent, legacy - ProtocolBitswapOne protocol.ID = "/ipfs/bitswap/1.0.0" - ProtocolBitswapNoVers protocol.ID = "/ipfs/bitswap" - - ProtocolBitswap protocol.ID = "/ipfs/bitswap/1.1.0" -) - -// BitSwapNetwork provides network connectivity for BitSwap sessions -type BitSwapNetwork interface { - - // SendMessage sends a BitSwap message to a peer. - SendMessage( - context.Context, - peer.ID, - bsmsg.BitSwapMessage) error - - // SetDelegate registers the Reciver to handle messages received from the - // network. - SetDelegate(Receiver) - - ConnectTo(context.Context, peer.ID) error - - NewMessageSender(context.Context, peer.ID) (MessageSender, error) - - ConnectionManager() ifconnmgr.ConnManager - - Routing -} - -type MessageSender interface { - SendMsg(context.Context, bsmsg.BitSwapMessage) error - Close() error - Reset() error -} - -// Implement Receiver to receive messages from the BitSwapNetwork -type Receiver interface { - ReceiveMessage( - ctx context.Context, - sender peer.ID, - incoming bsmsg.BitSwapMessage) - - ReceiveError(error) - - // Connected/Disconnected warns bitswap about peer connections - PeerConnected(peer.ID) - PeerDisconnected(peer.ID) -} - -type Routing interface { - // FindProvidersAsync returns a channel of providers for the given key - FindProvidersAsync(context.Context, cid.Cid, int) <-chan peer.ID - - // Provide provides the key to the network - Provide(context.Context, cid.Cid) error -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications/notifications.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications/notifications.go deleted file mode 100644 index e2e0607a8f..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications/notifications.go +++ /dev/null @@ -1,130 +0,0 @@ -package notifications - -import ( - "context" - "sync" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - pubsub "gx/ipfs/QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2/pubsub" -) - -const bufferSize = 16 - -type PubSub interface { - Publish(block blocks.Block) - Subscribe(ctx context.Context, keys ...cid.Cid) <-chan blocks.Block - Shutdown() -} - -func New() PubSub { - return &impl{ - wrapped: *pubsub.New(bufferSize), - cancel: make(chan struct{}), - } -} - -type impl struct { - wrapped pubsub.PubSub - - // These two fields make up a shutdown "lock". - // We need them as calling, e.g., `Unsubscribe` after calling `Shutdown` - // blocks forever and fixing this in pubsub would be rather invasive. - cancel chan struct{} - wg sync.WaitGroup -} - -func (ps *impl) Publish(block blocks.Block) { - ps.wg.Add(1) - defer ps.wg.Done() - - select { - case <-ps.cancel: - // Already shutdown, bail. - return - default: - } - - ps.wrapped.Pub(block, block.Cid().KeyString()) -} - -// Not safe to call more than once. -func (ps *impl) Shutdown() { - // Interrupt in-progress subscriptions. - close(ps.cancel) - // Wait for them to finish. - ps.wg.Wait() - // shutdown the pubsub. - ps.wrapped.Shutdown() -} - -// Subscribe returns a channel of blocks for the given |keys|. |blockChannel| -// is closed if the |ctx| times out or is cancelled, or after sending len(keys) -// blocks. -func (ps *impl) Subscribe(ctx context.Context, keys ...cid.Cid) <-chan blocks.Block { - - blocksCh := make(chan blocks.Block, len(keys)) - valuesCh := make(chan interface{}, len(keys)) // provide our own channel to control buffer, prevent blocking - if len(keys) == 0 { - close(blocksCh) - return blocksCh - } - - // prevent shutdown - ps.wg.Add(1) - - // check if shutdown *after* preventing shutdowns. - select { - case <-ps.cancel: - // abort, allow shutdown to continue. - ps.wg.Done() - close(blocksCh) - return blocksCh - default: - } - - ps.wrapped.AddSubOnceEach(valuesCh, toStrings(keys)...) - go func() { - defer func() { - ps.wrapped.Unsub(valuesCh) - close(blocksCh) - - // Unblock shutdown. - ps.wg.Done() - }() - - for { - select { - case <-ps.cancel: - return - case <-ctx.Done(): - return - case val, ok := <-valuesCh: - if !ok { - return - } - block, ok := val.(blocks.Block) - if !ok { - return - } - select { - case <-ps.cancel: - return - case <-ctx.Done(): - return - case blocksCh <- block: // continue - } - } - } - }() - - return blocksCh -} - -func toStrings(keys []cid.Cid) []string { - strs := make([]string, 0, len(keys)) - for _, key := range keys { - strs = append(strs, key.KeyString()) - } - return strs -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/package.json b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/package.json deleted file mode 100644 index 6450bced1b..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/package.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-bitswap" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-bitswap" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB", - "name": "go-libp2p", - "version": "6.0.23" - }, - { - "author": "hsanjuan", - "hash": "QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe", - "name": "go-ipfs-routing", - "version": "0.1.7" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "ipfs", - "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", - "name": "go-metrics-interface", - "version": "0.2.0" - }, - { - "author": "why", - "hash": "QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2", - "name": "pubsub", - "version": "1.0.0" - }, - { - "author": "hsanjuan", - "hash": "QmZUbTDJ39JpvtFCSubiWeUTQRvMA1tVE5RZCJrY4oeAsC", - "name": "go-ipfs-pq", - "version": "0.0.1" - }, - { - "author": "hsanjuan", - "hash": "QmUf9xAmbHndjh31YNRugNeyNX6mDTUDuWN1bVTmUriwdZ", - "name": "go-ipfs-blocksutil", - "version": "0.1.0" - }, - { - "author": "hsanjuan", - "hash": "QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR", - "name": "go-ipfs-blockstore", - "version": "0.1.4" - }, - { - "author": "hector", - "hash": "QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8", - "name": "go-ipfs-flags", - "version": "0.0.1" - }, - { - "author": "hsanjuan", - "hash": "QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM", - "name": "go-ipfs-exchange-interface", - "version": "0.1.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "hsanjuan", - "hash": "QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL", - "name": "go-ipfs-delay", - "version": "0.0.1" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "hashicorp", - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j", - "name": "go-libp2p-netutil", - "version": "0.4.12" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", - "name": "go-libp2p-loggables", - "version": "1.1.24" - }, - { - "author": "why", - "hash": "QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ", - "name": "go-libp2p-interface-connmgr", - "version": "0.0.21" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", - "name": "go-libp2p-routing", - "version": "2.7.1" - }, - { - "author": "jbenet", - "hash": "Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF", - "name": "go-detect-race", - "version": "1.0.1" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-bitswap", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.13" -} - diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/session.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/session.go deleted file mode 100644 index c572928b11..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/session.go +++ /dev/null @@ -1,361 +0,0 @@ -package bitswap - -import ( - "context" - "fmt" - "time" - - notifications "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/notifications" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - loggables "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -const activeWantsLimit = 16 - -// Session holds state for an individual bitswap transfer operation. -// This allows bitswap to make smarter decisions about who to send wantlist -// info to, and who to request blocks from -type Session struct { - ctx context.Context - tofetch *cidQueue - activePeers map[peer.ID]struct{} - activePeersArr []peer.ID - - bs *Bitswap - incoming chan blkRecv - newReqs chan []cid.Cid - cancelKeys chan []cid.Cid - interestReqs chan interestReq - - interest *lru.Cache - liveWants map[cid.Cid]time.Time - - tick *time.Timer - baseTickDelay time.Duration - - latTotal time.Duration - fetchcnt int - - notif notifications.PubSub - - uuid logging.Loggable - - id uint64 - tag string -} - -// NewSession creates a new bitswap session whose lifetime is bounded by the -// given context -func (bs *Bitswap) NewSession(ctx context.Context) *Session { - s := &Session{ - activePeers: make(map[peer.ID]struct{}), - liveWants: make(map[cid.Cid]time.Time), - newReqs: make(chan []cid.Cid), - cancelKeys: make(chan []cid.Cid), - tofetch: newCidQueue(), - interestReqs: make(chan interestReq), - ctx: ctx, - bs: bs, - incoming: make(chan blkRecv), - notif: notifications.New(), - uuid: loggables.Uuid("GetBlockRequest"), - baseTickDelay: time.Millisecond * 500, - id: bs.getNextSessionID(), - } - - s.tag = fmt.Sprint("bs-ses-", s.id) - - cache, _ := lru.New(2048) - s.interest = cache - - bs.sessLk.Lock() - bs.sessions = append(bs.sessions, s) - bs.sessLk.Unlock() - - go s.run(ctx) - - return s -} - -func (bs *Bitswap) removeSession(s *Session) { - s.notif.Shutdown() - - live := make([]cid.Cid, 0, len(s.liveWants)) - for c := range s.liveWants { - live = append(live, c) - } - bs.CancelWants(live, s.id) - - bs.sessLk.Lock() - defer bs.sessLk.Unlock() - for i := 0; i < len(bs.sessions); i++ { - if bs.sessions[i] == s { - bs.sessions[i] = bs.sessions[len(bs.sessions)-1] - bs.sessions = bs.sessions[:len(bs.sessions)-1] - return - } - } -} - -type blkRecv struct { - from peer.ID - blk blocks.Block -} - -func (s *Session) receiveBlockFrom(from peer.ID, blk blocks.Block) { - select { - case s.incoming <- blkRecv{from: from, blk: blk}: - case <-s.ctx.Done(): - } -} - -type interestReq struct { - c cid.Cid - resp chan bool -} - -// TODO: PERF: this is using a channel to guard a map access against race -// conditions. This is definitely much slower than a mutex, though its unclear -// if it will actually induce any noticeable slowness. This is implemented this -// way to avoid adding a more complex set of mutexes around the liveWants map. -// note that in the average case (where this session *is* interested in the -// block we received) this function will not be called, as the cid will likely -// still be in the interest cache. -func (s *Session) isLiveWant(c cid.Cid) bool { - resp := make(chan bool, 1) - select { - case s.interestReqs <- interestReq{ - c: c, - resp: resp, - }: - case <-s.ctx.Done(): - return false - } - - select { - case want := <-resp: - return want - case <-s.ctx.Done(): - return false - } -} - -func (s *Session) interestedIn(c cid.Cid) bool { - return s.interest.Contains(c) || s.isLiveWant(c) -} - -const provSearchDelay = time.Second * 10 - -func (s *Session) addActivePeer(p peer.ID) { - if _, ok := s.activePeers[p]; !ok { - s.activePeers[p] = struct{}{} - s.activePeersArr = append(s.activePeersArr, p) - - cmgr := s.bs.network.ConnectionManager() - cmgr.TagPeer(p, s.tag, 10) - } -} - -func (s *Session) resetTick() { - if s.latTotal == 0 { - s.tick.Reset(provSearchDelay) - } else { - avLat := s.latTotal / time.Duration(s.fetchcnt) - s.tick.Reset(s.baseTickDelay + (3 * avLat)) - } -} - -func (s *Session) run(ctx context.Context) { - s.tick = time.NewTimer(provSearchDelay) - newpeers := make(chan peer.ID, 16) - for { - select { - case blk := <-s.incoming: - s.tick.Stop() - - if blk.from != "" { - s.addActivePeer(blk.from) - } - - s.receiveBlock(ctx, blk.blk) - - s.resetTick() - case keys := <-s.newReqs: - for _, k := range keys { - s.interest.Add(k, nil) - } - if len(s.liveWants) < activeWantsLimit { - toadd := activeWantsLimit - len(s.liveWants) - if toadd > len(keys) { - toadd = len(keys) - } - - now := keys[:toadd] - keys = keys[toadd:] - - s.wantBlocks(ctx, now) - } - for _, k := range keys { - s.tofetch.Push(k) - } - case keys := <-s.cancelKeys: - s.cancel(keys) - - case <-s.tick.C: - live := make([]cid.Cid, 0, len(s.liveWants)) - now := time.Now() - for c := range s.liveWants { - live = append(live, c) - s.liveWants[c] = now - } - - // Broadcast these keys to everyone we're connected to - s.bs.wm.WantBlocks(ctx, live, nil, s.id) - - if len(live) > 0 { - go func(k cid.Cid) { - // TODO: have a task queue setup for this to: - // - rate limit - // - manage timeouts - // - ensure two 'findprovs' calls for the same block don't run concurrently - // - share peers between sessions based on interest set - for p := range s.bs.network.FindProvidersAsync(ctx, k, 10) { - newpeers <- p - } - }(live[0]) - } - s.resetTick() - case p := <-newpeers: - s.addActivePeer(p) - case lwchk := <-s.interestReqs: - lwchk.resp <- s.cidIsWanted(lwchk.c) - case <-ctx.Done(): - s.tick.Stop() - s.bs.removeSession(s) - - cmgr := s.bs.network.ConnectionManager() - for _, p := range s.activePeersArr { - cmgr.UntagPeer(p, s.tag) - } - return - } - } -} - -func (s *Session) cidIsWanted(c cid.Cid) bool { - _, ok := s.liveWants[c] - if !ok { - ok = s.tofetch.Has(c) - } - - return ok -} - -func (s *Session) receiveBlock(ctx context.Context, blk blocks.Block) { - c := blk.Cid() - if s.cidIsWanted(c) { - tval, ok := s.liveWants[c] - if ok { - s.latTotal += time.Since(tval) - delete(s.liveWants, c) - } else { - s.tofetch.Remove(c) - } - s.fetchcnt++ - s.notif.Publish(blk) - - if next := s.tofetch.Pop(); next.Defined() { - s.wantBlocks(ctx, []cid.Cid{next}) - } - } -} - -func (s *Session) wantBlocks(ctx context.Context, ks []cid.Cid) { - now := time.Now() - for _, c := range ks { - s.liveWants[c] = now - } - s.bs.wm.WantBlocks(ctx, ks, s.activePeersArr, s.id) -} - -func (s *Session) cancel(keys []cid.Cid) { - for _, c := range keys { - s.tofetch.Remove(c) - } -} - -func (s *Session) cancelWants(keys []cid.Cid) { - select { - case s.cancelKeys <- keys: - case <-s.ctx.Done(): - } -} - -func (s *Session) fetch(ctx context.Context, keys []cid.Cid) { - select { - case s.newReqs <- keys: - case <-ctx.Done(): - case <-s.ctx.Done(): - } -} - -// GetBlocks fetches a set of blocks within the context of this session and -// returns a channel that found blocks will be returned on. No order is -// guaranteed on the returned blocks. -func (s *Session) GetBlocks(ctx context.Context, keys []cid.Cid) (<-chan blocks.Block, error) { - ctx = logging.ContextWithLoggable(ctx, s.uuid) - return getBlocksImpl(ctx, keys, s.notif, s.fetch, s.cancelWants) -} - -// GetBlock fetches a single block -func (s *Session) GetBlock(parent context.Context, k cid.Cid) (blocks.Block, error) { - return getBlock(parent, k, s.GetBlocks) -} - -type cidQueue struct { - elems []cid.Cid - eset *cid.Set -} - -func newCidQueue() *cidQueue { - return &cidQueue{eset: cid.NewSet()} -} - -func (cq *cidQueue) Pop() cid.Cid { - for { - if len(cq.elems) == 0 { - return cid.Cid{} - } - - out := cq.elems[0] - cq.elems = cq.elems[1:] - - if cq.eset.Has(out) { - cq.eset.Remove(out) - return out - } - } -} - -func (cq *cidQueue) Push(c cid.Cid) { - if cq.eset.Visit(c) { - cq.elems = append(cq.elems, c) - } -} - -func (cq *cidQueue) Remove(c cid.Cid) { - cq.eset.Remove(c) -} - -func (cq *cidQueue) Has(c cid.Cid) bool { - return cq.eset.Has(c) -} - -func (cq *cidQueue) Len() int { - return cq.eset.Len() -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/stat.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/stat.go deleted file mode 100644 index 9aea1426b9..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/stat.go +++ /dev/null @@ -1,44 +0,0 @@ -package bitswap - -import ( - "sort" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -type Stat struct { - ProvideBufLen int - Wantlist []cid.Cid - Peers []string - BlocksReceived uint64 - DataReceived uint64 - BlocksSent uint64 - DataSent uint64 - DupBlksReceived uint64 - DupDataReceived uint64 -} - -func (bs *Bitswap) Stat() (*Stat, error) { - st := new(Stat) - st.ProvideBufLen = len(bs.newBlocks) - st.Wantlist = bs.GetWantlist() - bs.counterLk.Lock() - c := bs.counters - st.BlocksReceived = c.blocksRecvd - st.DupBlksReceived = c.dupBlocksRecvd - st.DupDataReceived = c.dupDataRecvd - st.BlocksSent = c.blocksSent - st.DataSent = c.dataSent - st.DataReceived = c.dataRecvd - bs.counterLk.Unlock() - - peers := bs.engine.Peers() - st.Peers = make([]string, 0, len(peers)) - - for _, p := range peers { - st.Peers = append(st.Peers, p.Pretty()) - } - sort.Strings(st.Peers) - - return st, nil -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/interface.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/interface.go deleted file mode 100644 index ce7eda08ca..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/interface.go +++ /dev/null @@ -1,13 +0,0 @@ -package bitswap - -import ( - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" -) - -type Network interface { - Adapter(testutil.Identity) bsnet.BitSwapNetwork - - HasPeer(peer.ID) bool -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/peernet.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/peernet.go deleted file mode 100644 index 862812da5f..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/peernet.go +++ /dev/null @@ -1,42 +0,0 @@ -package bitswap - -import ( - "context" - - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - mockpeernet "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - mockrouting "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock" -) - -type peernet struct { - mockpeernet.Mocknet - routingserver mockrouting.Server -} - -func StreamNet(ctx context.Context, net mockpeernet.Mocknet, rs mockrouting.Server) (Network, error) { - return &peernet{net, rs}, nil -} - -func (pn *peernet) Adapter(p testutil.Identity) bsnet.BitSwapNetwork { - client, err := pn.Mocknet.AddPeer(p.PrivateKey(), p.Address()) - if err != nil { - panic(err.Error()) - } - routing := pn.routingserver.ClientWithDatastore(context.TODO(), p, ds.NewMapDatastore()) - return bsnet.NewFromIpfsHost(client, routing) -} - -func (pn *peernet) HasPeer(p peer.ID) bool { - for _, member := range pn.Mocknet.Peers() { - if p == member { - return true - } - } - return false -} - -var _ Network = (*peernet)(nil) diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/virtual.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/virtual.go deleted file mode 100644 index a3c8ae1c87..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet/virtual.go +++ /dev/null @@ -1,253 +0,0 @@ -package bitswap - -import ( - "context" - "errors" - "sync" - "time" - - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - mockrouting "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock" -) - -var log = logging.Logger("bstestnet") - -func VirtualNetwork(rs mockrouting.Server, d delay.D) Network { - return &network{ - clients: make(map[peer.ID]*receiverQueue), - delay: d, - routingserver: rs, - conns: make(map[string]struct{}), - } -} - -type network struct { - mu sync.Mutex - clients map[peer.ID]*receiverQueue - routingserver mockrouting.Server - delay delay.D - conns map[string]struct{} -} - -type message struct { - from peer.ID - msg bsmsg.BitSwapMessage - shouldSend time.Time -} - -// receiverQueue queues up a set of messages to be sent, and sends them *in -// order* with their delays respected as much as sending them in order allows -// for -type receiverQueue struct { - receiver bsnet.Receiver - queue []*message - active bool - lk sync.Mutex -} - -func (n *network) Adapter(p testutil.Identity) bsnet.BitSwapNetwork { - n.mu.Lock() - defer n.mu.Unlock() - - client := &networkClient{ - local: p.ID(), - network: n, - routing: n.routingserver.Client(p), - } - n.clients[p.ID()] = &receiverQueue{receiver: client} - return client -} - -func (n *network) HasPeer(p peer.ID) bool { - n.mu.Lock() - defer n.mu.Unlock() - - _, found := n.clients[p] - return found -} - -// TODO should this be completely asynchronous? -// TODO what does the network layer do with errors received from services? -func (n *network) SendMessage( - ctx context.Context, - from peer.ID, - to peer.ID, - mes bsmsg.BitSwapMessage) error { - - n.mu.Lock() - defer n.mu.Unlock() - - receiver, ok := n.clients[to] - if !ok { - return errors.New("cannot locate peer on network") - } - - // nb: terminate the context since the context wouldn't actually be passed - // over the network in a real scenario - - msg := &message{ - from: from, - msg: mes, - shouldSend: time.Now().Add(n.delay.Get()), - } - receiver.enqueue(msg) - - return nil -} - -func (n *network) deliver( - r bsnet.Receiver, from peer.ID, message bsmsg.BitSwapMessage) error { - if message == nil || from == "" { - return errors.New("invalid input") - } - - n.delay.Wait() - - r.ReceiveMessage(context.TODO(), from, message) - return nil -} - -type networkClient struct { - local peer.ID - bsnet.Receiver - network *network - routing routing.IpfsRouting -} - -func (nc *networkClient) SendMessage( - ctx context.Context, - to peer.ID, - message bsmsg.BitSwapMessage) error { - return nc.network.SendMessage(ctx, nc.local, to, message) -} - -// FindProvidersAsync returns a channel of providers for the given key -func (nc *networkClient) FindProvidersAsync(ctx context.Context, k cid.Cid, max int) <-chan peer.ID { - - // NB: this function duplicates the PeerInfo -> ID transformation in the - // bitswap network adapter. Not to worry. This network client will be - // deprecated once the ipfsnet.Mock is added. The code below is only - // temporary. - - out := make(chan peer.ID) - go func() { - defer close(out) - providers := nc.routing.FindProvidersAsync(ctx, k, max) - for info := range providers { - select { - case <-ctx.Done(): - case out <- info.ID: - } - } - }() - return out -} - -func (nc *networkClient) ConnectionManager() ifconnmgr.ConnManager { - return &ifconnmgr.NullConnMgr{} -} - -type messagePasser struct { - net *network - target peer.ID - local peer.ID - ctx context.Context -} - -func (mp *messagePasser) SendMsg(ctx context.Context, m bsmsg.BitSwapMessage) error { - return mp.net.SendMessage(ctx, mp.local, mp.target, m) -} - -func (mp *messagePasser) Close() error { - return nil -} - -func (mp *messagePasser) Reset() error { - return nil -} - -func (n *networkClient) NewMessageSender(ctx context.Context, p peer.ID) (bsnet.MessageSender, error) { - return &messagePasser{ - net: n.network, - target: p, - local: n.local, - ctx: ctx, - }, nil -} - -// Provide provides the key to the network -func (nc *networkClient) Provide(ctx context.Context, k cid.Cid) error { - return nc.routing.Provide(ctx, k, true) -} - -func (nc *networkClient) SetDelegate(r bsnet.Receiver) { - nc.Receiver = r -} - -func (nc *networkClient) ConnectTo(_ context.Context, p peer.ID) error { - nc.network.mu.Lock() - - otherClient, ok := nc.network.clients[p] - if !ok { - nc.network.mu.Unlock() - return errors.New("no such peer in network") - } - - tag := tagForPeers(nc.local, p) - if _, ok := nc.network.conns[tag]; ok { - nc.network.mu.Unlock() - log.Warning("ALREADY CONNECTED TO PEER (is this a reconnect? test lib needs fixing)") - return nil - } - nc.network.conns[tag] = struct{}{} - nc.network.mu.Unlock() - - // TODO: add handling for disconnects - - otherClient.receiver.PeerConnected(nc.local) - nc.Receiver.PeerConnected(p) - return nil -} - -func (rq *receiverQueue) enqueue(m *message) { - rq.lk.Lock() - defer rq.lk.Unlock() - rq.queue = append(rq.queue, m) - if !rq.active { - rq.active = true - go rq.process() - } -} - -func (rq *receiverQueue) process() { - for { - rq.lk.Lock() - if len(rq.queue) == 0 { - rq.active = false - rq.lk.Unlock() - return - } - m := rq.queue[0] - rq.queue = rq.queue[1:] - rq.lk.Unlock() - - time.Sleep(time.Until(m.shouldSend)) - rq.receiver.ReceiveMessage(context.TODO(), m.from, m.msg) - } -} - -func tagForPeers(a, b peer.ID) string { - if a < b { - return string(a + b) - } - return string(b + a) -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist/wantlist.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist/wantlist.go deleted file mode 100644 index 1d76eb5143..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist/wantlist.go +++ /dev/null @@ -1,199 +0,0 @@ -// package wantlist implements an object for bitswap that contains the keys -// that a given peer wants. -package wantlist - -import ( - "sort" - "sync" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -type ThreadSafe struct { - lk sync.RWMutex - set map[cid.Cid]*Entry -} - -// not threadsafe -type Wantlist struct { - set map[cid.Cid]*Entry -} - -type Entry struct { - Cid cid.Cid - Priority int - - SesTrk map[uint64]struct{} - // Trash in a book-keeping field - Trash bool -} - -// NewRefEntry creates a new reference tracked wantlist entry -func NewRefEntry(c cid.Cid, p int) *Entry { - return &Entry{ - Cid: c, - Priority: p, - SesTrk: make(map[uint64]struct{}), - } -} - -type entrySlice []*Entry - -func (es entrySlice) Len() int { return len(es) } -func (es entrySlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } -func (es entrySlice) Less(i, j int) bool { return es[i].Priority > es[j].Priority } - -func NewThreadSafe() *ThreadSafe { - return &ThreadSafe{ - set: make(map[cid.Cid]*Entry), - } -} - -func New() *Wantlist { - return &Wantlist{ - set: make(map[cid.Cid]*Entry), - } -} - -// Add adds the given cid to the wantlist with the specified priority, governed -// by the session ID 'ses'. if a cid is added under multiple session IDs, then -// it must be removed by each of those sessions before it is no longer 'in the -// wantlist'. Calls to Add are idempotent given the same arguments. Subsequent -// calls with different values for priority will not update the priority -// TODO: think through priority changes here -// Add returns true if the cid did not exist in the wantlist before this call -// (even if it was under a different session) -func (w *ThreadSafe) Add(c cid.Cid, priority int, ses uint64) bool { - w.lk.Lock() - defer w.lk.Unlock() - if e, ok := w.set[c]; ok { - e.SesTrk[ses] = struct{}{} - return false - } - - w.set[c] = &Entry{ - Cid: c, - Priority: priority, - SesTrk: map[uint64]struct{}{ses: {}}, - } - - return true -} - -// AddEntry adds given Entry to the wantlist. For more information see Add method. -func (w *ThreadSafe) AddEntry(e *Entry, ses uint64) bool { - w.lk.Lock() - defer w.lk.Unlock() - if ex, ok := w.set[e.Cid]; ok { - ex.SesTrk[ses] = struct{}{} - return false - } - w.set[e.Cid] = e - e.SesTrk[ses] = struct{}{} - return true -} - -// Remove removes the given cid from being tracked by the given session. -// 'true' is returned if this call to Remove removed the final session ID -// tracking the cid. (meaning true will be returned iff this call caused the -// value of 'Contains(c)' to change from true to false) -func (w *ThreadSafe) Remove(c cid.Cid, ses uint64) bool { - w.lk.Lock() - defer w.lk.Unlock() - e, ok := w.set[c] - if !ok { - return false - } - - delete(e.SesTrk, ses) - if len(e.SesTrk) == 0 { - delete(w.set, c) - return true - } - return false -} - -// Contains returns true if the given cid is in the wantlist tracked by one or -// more sessions -func (w *ThreadSafe) Contains(k cid.Cid) (*Entry, bool) { - w.lk.RLock() - defer w.lk.RUnlock() - e, ok := w.set[k] - return e, ok -} - -func (w *ThreadSafe) Entries() []*Entry { - w.lk.RLock() - defer w.lk.RUnlock() - es := make([]*Entry, 0, len(w.set)) - for _, e := range w.set { - es = append(es, e) - } - return es -} - -func (w *ThreadSafe) SortedEntries() []*Entry { - es := w.Entries() - sort.Sort(entrySlice(es)) - return es -} - -func (w *ThreadSafe) Len() int { - w.lk.RLock() - defer w.lk.RUnlock() - return len(w.set) -} - -func (w *Wantlist) Len() int { - return len(w.set) -} - -func (w *Wantlist) Add(c cid.Cid, priority int) bool { - if _, ok := w.set[c]; ok { - return false - } - - w.set[c] = &Entry{ - Cid: c, - Priority: priority, - } - - return true -} - -func (w *Wantlist) AddEntry(e *Entry) bool { - if _, ok := w.set[e.Cid]; ok { - return false - } - w.set[e.Cid] = e - return true -} - -func (w *Wantlist) Remove(c cid.Cid) bool { - _, ok := w.set[c] - if !ok { - return false - } - - delete(w.set, c) - return true -} - -func (w *Wantlist) Contains(c cid.Cid) (*Entry, bool) { - e, ok := w.set[c] - return e, ok -} - -func (w *Wantlist) Entries() []*Entry { - es := make([]*Entry, 0, len(w.set)) - for _, e := range w.set { - es = append(es, e) - } - return es -} - -func (w *Wantlist) SortedEntries() []*Entry { - es := w.Entries() - sort.Sort(entrySlice(es)) - return es -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantmanager.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantmanager.go deleted file mode 100644 index 032b9af9ea..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantmanager.go +++ /dev/null @@ -1,404 +0,0 @@ -package bitswap - -import ( - "context" - "sync" - "time" - - engine "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision" - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - bsnet "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network" - wantlist "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" -) - -type WantManager struct { - // sync channels for Run loop - incoming chan *wantSet - connectEvent chan peerStatus // notification channel for peers connecting/disconnecting - peerReqs chan chan []peer.ID // channel to request connected peers on - - // synchronized by Run loop, only touch inside there - peers map[peer.ID]*msgQueue - wl *wantlist.ThreadSafe - bcwl *wantlist.ThreadSafe - - network bsnet.BitSwapNetwork - ctx context.Context - cancel func() - - wantlistGauge metrics.Gauge - sentHistogram metrics.Histogram -} - -type peerStatus struct { - connect bool - peer peer.ID -} - -func NewWantManager(ctx context.Context, network bsnet.BitSwapNetwork) *WantManager { - ctx, cancel := context.WithCancel(ctx) - wantlistGauge := metrics.NewCtx(ctx, "wantlist_total", - "Number of items in wantlist.").Gauge() - sentHistogram := metrics.NewCtx(ctx, "sent_all_blocks_bytes", "Histogram of blocks sent by"+ - " this bitswap").Histogram(metricsBuckets) - return &WantManager{ - incoming: make(chan *wantSet, 10), - connectEvent: make(chan peerStatus, 10), - peerReqs: make(chan chan []peer.ID), - peers: make(map[peer.ID]*msgQueue), - wl: wantlist.NewThreadSafe(), - bcwl: wantlist.NewThreadSafe(), - network: network, - ctx: ctx, - cancel: cancel, - wantlistGauge: wantlistGauge, - sentHistogram: sentHistogram, - } -} - -type msgQueue struct { - p peer.ID - - outlk sync.Mutex - out bsmsg.BitSwapMessage - network bsnet.BitSwapNetwork - wl *wantlist.ThreadSafe - - sender bsnet.MessageSender - - refcnt int - - work chan struct{} - done chan struct{} -} - -// WantBlocks adds the given cids to the wantlist, tracked by the given session -func (pm *WantManager) WantBlocks(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) { - log.Infof("want blocks: %s", ks) - pm.addEntries(ctx, ks, peers, false, ses) -} - -// CancelWants removes the given cids from the wantlist, tracked by the given session -func (pm *WantManager) CancelWants(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) { - pm.addEntries(context.Background(), ks, peers, true, ses) -} - -type wantSet struct { - entries []*bsmsg.Entry - targets []peer.ID - from uint64 -} - -func (pm *WantManager) addEntries(ctx context.Context, ks []cid.Cid, targets []peer.ID, cancel bool, ses uint64) { - entries := make([]*bsmsg.Entry, 0, len(ks)) - for i, k := range ks { - entries = append(entries, &bsmsg.Entry{ - Cancel: cancel, - Entry: wantlist.NewRefEntry(k, kMaxPriority-i), - }) - } - select { - case pm.incoming <- &wantSet{entries: entries, targets: targets, from: ses}: - case <-pm.ctx.Done(): - case <-ctx.Done(): - } -} - -func (pm *WantManager) ConnectedPeers() []peer.ID { - resp := make(chan []peer.ID) - pm.peerReqs <- resp - return <-resp -} - -func (pm *WantManager) SendBlocks(ctx context.Context, env *engine.Envelope) { - // Blocks need to be sent synchronously to maintain proper backpressure - // throughout the network stack - defer env.Sent() - - msgSize := 0 - msg := bsmsg.New(false) - for _, block := range env.Message.Blocks() { - msgSize += len(block.RawData()) - msg.AddBlock(block) - log.Infof("Sending block %s to %s", block, env.Peer) - } - - pm.sentHistogram.Observe(float64(msgSize)) - err := pm.network.SendMessage(ctx, env.Peer, msg) - if err != nil { - log.Infof("sendblock error: %s", err) - } -} - -func (pm *WantManager) startPeerHandler(p peer.ID) *msgQueue { - mq, ok := pm.peers[p] - if ok { - mq.refcnt++ - return nil - } - - mq = pm.newMsgQueue(p) - - // new peer, we will want to give them our full wantlist - fullwantlist := bsmsg.New(true) - for _, e := range pm.bcwl.Entries() { - for k := range e.SesTrk { - mq.wl.AddEntry(e, k) - } - fullwantlist.AddEntry(e.Cid, e.Priority) - } - mq.out = fullwantlist - mq.work <- struct{}{} - - pm.peers[p] = mq - go mq.runQueue(pm.ctx) - return mq -} - -func (pm *WantManager) stopPeerHandler(p peer.ID) { - pq, ok := pm.peers[p] - if !ok { - // TODO: log error? - return - } - - pq.refcnt-- - if pq.refcnt > 0 { - return - } - - close(pq.done) - delete(pm.peers, p) -} - -func (mq *msgQueue) runQueue(ctx context.Context) { - for { - select { - case <-mq.work: // there is work to be done - mq.doWork(ctx) - case <-mq.done: - if mq.sender != nil { - mq.sender.Close() - } - return - case <-ctx.Done(): - if mq.sender != nil { - mq.sender.Reset() - } - return - } - } -} - -func (mq *msgQueue) doWork(ctx context.Context) { - // grab outgoing message - mq.outlk.Lock() - wlm := mq.out - if wlm == nil || wlm.Empty() { - mq.outlk.Unlock() - return - } - mq.out = nil - mq.outlk.Unlock() - - // NB: only open a stream if we actually have data to send - if mq.sender == nil { - err := mq.openSender(ctx) - if err != nil { - log.Infof("cant open message sender to peer %s: %s", mq.p, err) - // TODO: cant connect, what now? - return - } - } - - // send wantlist updates - for { // try to send this message until we fail. - err := mq.sender.SendMsg(ctx, wlm) - if err == nil { - return - } - - log.Infof("bitswap send error: %s", err) - mq.sender.Reset() - mq.sender = nil - - select { - case <-mq.done: - return - case <-ctx.Done(): - return - case <-time.After(time.Millisecond * 100): - // wait 100ms in case disconnect notifications are still propogating - log.Warning("SendMsg errored but neither 'done' nor context.Done() were set") - } - - err = mq.openSender(ctx) - if err != nil { - log.Infof("couldnt open sender again after SendMsg(%s) failed: %s", mq.p, err) - // TODO(why): what do we do now? - // I think the *right* answer is to probably put the message we're - // trying to send back, and then return to waiting for new work or - // a disconnect. - return - } - - // TODO: Is this the same instance for the remote peer? - // If its not, we should resend our entire wantlist to them - /* - if mq.sender.InstanceID() != mq.lastSeenInstanceID { - wlm = mq.getFullWantlistMessage() - } - */ - } -} - -func (mq *msgQueue) openSender(ctx context.Context) error { - // allow ten minutes for connections this includes looking them up in the - // dht dialing them, and handshaking - conctx, cancel := context.WithTimeout(ctx, time.Minute*10) - defer cancel() - - err := mq.network.ConnectTo(conctx, mq.p) - if err != nil { - return err - } - - nsender, err := mq.network.NewMessageSender(ctx, mq.p) - if err != nil { - return err - } - - mq.sender = nsender - return nil -} - -func (pm *WantManager) Connected(p peer.ID) { - select { - case pm.connectEvent <- peerStatus{peer: p, connect: true}: - case <-pm.ctx.Done(): - } -} - -func (pm *WantManager) Disconnected(p peer.ID) { - select { - case pm.connectEvent <- peerStatus{peer: p, connect: false}: - case <-pm.ctx.Done(): - } -} - -// TODO: use goprocess here once i trust it -func (pm *WantManager) Run() { - // NOTE: Do not open any streams or connections from anywhere in this - // event loop. Really, just don't do anything likely to block. - for { - select { - case ws := <-pm.incoming: - - // is this a broadcast or not? - brdc := len(ws.targets) == 0 - - // add changes to our wantlist - for _, e := range ws.entries { - if e.Cancel { - if brdc { - pm.bcwl.Remove(e.Cid, ws.from) - } - - if pm.wl.Remove(e.Cid, ws.from) { - pm.wantlistGauge.Dec() - } - } else { - if brdc { - pm.bcwl.AddEntry(e.Entry, ws.from) - } - if pm.wl.AddEntry(e.Entry, ws.from) { - pm.wantlistGauge.Inc() - } - } - } - - // broadcast those wantlist changes - if len(ws.targets) == 0 { - for _, p := range pm.peers { - p.addMessage(ws.entries, ws.from) - } - } else { - for _, t := range ws.targets { - p, ok := pm.peers[t] - if !ok { - log.Infof("tried sending wantlist change to non-partner peer: %s", t) - continue - } - p.addMessage(ws.entries, ws.from) - } - } - - case p := <-pm.connectEvent: - if p.connect { - pm.startPeerHandler(p.peer) - } else { - pm.stopPeerHandler(p.peer) - } - case req := <-pm.peerReqs: - peers := make([]peer.ID, 0, len(pm.peers)) - for p := range pm.peers { - peers = append(peers, p) - } - req <- peers - case <-pm.ctx.Done(): - return - } - } -} - -func (wm *WantManager) newMsgQueue(p peer.ID) *msgQueue { - return &msgQueue{ - done: make(chan struct{}), - work: make(chan struct{}, 1), - wl: wantlist.NewThreadSafe(), - network: wm.network, - p: p, - refcnt: 1, - } -} - -func (mq *msgQueue) addMessage(entries []*bsmsg.Entry, ses uint64) { - var work bool - mq.outlk.Lock() - defer func() { - mq.outlk.Unlock() - if !work { - return - } - select { - case mq.work <- struct{}{}: - default: - } - }() - - // if we have no message held allocate a new one - if mq.out == nil { - mq.out = bsmsg.New(false) - } - - // TODO: add a msg.Combine(...) method - // otherwise, combine the one we are holding with the - // one passed in - for _, e := range entries { - if e.Cancel { - if mq.wl.Remove(e.Cid, ses) { - work = true - mq.out.Cancel(e.Cid) - } - } else { - if mq.wl.Add(e.Cid, e.Priority, ses) { - work = true - mq.out.AddEntry(e.Cid, e.Priority) - } - } - } -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/workers.go b/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/workers.go deleted file mode 100644 index d841078008..0000000000 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/workers.go +++ /dev/null @@ -1,256 +0,0 @@ -package bitswap - -import ( - "context" - "math/rand" - "sync" - "time" - - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var TaskWorkerCount = 8 - -func (bs *Bitswap) startWorkers(px process.Process, ctx context.Context) { - // Start up a worker to handle block requests this node is making - px.Go(func(px process.Process) { - bs.providerQueryManager(ctx) - }) - - // Start up workers to handle requests from other nodes for the data on this node - for i := 0; i < TaskWorkerCount; i++ { - i := i - px.Go(func(px process.Process) { - bs.taskWorker(ctx, i) - }) - } - - // Start up a worker to manage periodically resending our wantlist out to peers - px.Go(func(px process.Process) { - bs.rebroadcastWorker(ctx) - }) - - // Start up a worker to manage sending out provides messages - px.Go(func(px process.Process) { - bs.provideCollector(ctx) - }) - - // Spawn up multiple workers to handle incoming blocks - // consider increasing number if providing blocks bottlenecks - // file transfers - px.Go(bs.provideWorker) -} - -func (bs *Bitswap) taskWorker(ctx context.Context, id int) { - idmap := logging.LoggableMap{"ID": id} - defer log.Debug("bitswap task worker shutting down...") - for { - log.Event(ctx, "Bitswap.TaskWorker.Loop", idmap) - select { - case nextEnvelope := <-bs.engine.Outbox(): - select { - case envelope, ok := <-nextEnvelope: - if !ok { - continue - } - // update the BS ledger to reflect sent message - // TODO: Should only track *useful* messages in ledger - outgoing := bsmsg.New(false) - for _, block := range envelope.Message.Blocks() { - log.Event(ctx, "Bitswap.TaskWorker.Work", logging.LoggableF(func() map[string]interface{} { - return logging.LoggableMap{ - "ID": id, - "Target": envelope.Peer.Pretty(), - "Block": block.Cid().String(), - } - })) - outgoing.AddBlock(block) - } - bs.engine.MessageSent(envelope.Peer, outgoing) - - bs.wm.SendBlocks(ctx, envelope) - bs.counterLk.Lock() - for _, block := range envelope.Message.Blocks() { - bs.counters.blocksSent++ - bs.counters.dataSent += uint64(len(block.RawData())) - } - bs.counterLk.Unlock() - case <-ctx.Done(): - return - } - case <-ctx.Done(): - return - } - } -} - -func (bs *Bitswap) provideWorker(px process.Process) { - - limit := make(chan struct{}, provideWorkerMax) - - limitedGoProvide := func(k cid.Cid, wid int) { - defer func() { - // replace token when done - <-limit - }() - ev := logging.LoggableMap{"ID": wid} - - ctx := procctx.OnClosingContext(px) // derive ctx from px - defer log.EventBegin(ctx, "Bitswap.ProvideWorker.Work", ev, k).Done() - - ctx, cancel := context.WithTimeout(ctx, provideTimeout) // timeout ctx - defer cancel() - - if err := bs.network.Provide(ctx, k); err != nil { - log.Warning(err) - } - } - - // worker spawner, reads from bs.provideKeys until it closes, spawning a - // _ratelimited_ number of workers to handle each key. - for wid := 2; ; wid++ { - ev := logging.LoggableMap{"ID": 1} - log.Event(procctx.OnClosingContext(px), "Bitswap.ProvideWorker.Loop", ev) - - select { - case <-px.Closing(): - return - case k, ok := <-bs.provideKeys: - if !ok { - log.Debug("provideKeys channel closed") - return - } - select { - case <-px.Closing(): - return - case limit <- struct{}{}: - go limitedGoProvide(k, wid) - } - } - } -} - -func (bs *Bitswap) provideCollector(ctx context.Context) { - defer close(bs.provideKeys) - var toProvide []cid.Cid - var nextKey cid.Cid - var keysOut chan cid.Cid - - for { - select { - case blkey, ok := <-bs.newBlocks: - if !ok { - log.Debug("newBlocks channel closed") - return - } - - if keysOut == nil { - nextKey = blkey - keysOut = bs.provideKeys - } else { - toProvide = append(toProvide, blkey) - } - case keysOut <- nextKey: - if len(toProvide) > 0 { - nextKey = toProvide[0] - toProvide = toProvide[1:] - } else { - keysOut = nil - } - case <-ctx.Done(): - return - } - } -} - -func (bs *Bitswap) rebroadcastWorker(parent context.Context) { - ctx, cancel := context.WithCancel(parent) - defer cancel() - - broadcastSignal := time.NewTicker(rebroadcastDelay.Get()) - defer broadcastSignal.Stop() - - tick := time.NewTicker(10 * time.Second) - defer tick.Stop() - - for { - log.Event(ctx, "Bitswap.Rebroadcast.idle") - select { - case <-tick.C: - n := bs.wm.wl.Len() - if n > 0 { - log.Debug(n, " keys in bitswap wantlist") - } - case <-broadcastSignal.C: // resend unfulfilled wantlist keys - log.Event(ctx, "Bitswap.Rebroadcast.active") - entries := bs.wm.wl.Entries() - if len(entries) == 0 { - continue - } - - // TODO: come up with a better strategy for determining when to search - // for new providers for blocks. - i := rand.Intn(len(entries)) - bs.findKeys <- &blockRequest{ - Cid: entries[i].Cid, - Ctx: ctx, - } - case <-parent.Done(): - return - } - } -} - -func (bs *Bitswap) providerQueryManager(ctx context.Context) { - var activeLk sync.Mutex - kset := cid.NewSet() - - for { - select { - case e := <-bs.findKeys: - select { // make sure its not already cancelled - case <-e.Ctx.Done(): - continue - default: - } - - activeLk.Lock() - if kset.Has(e.Cid) { - activeLk.Unlock() - continue - } - kset.Add(e.Cid) - activeLk.Unlock() - - go func(e *blockRequest) { - child, cancel := context.WithTimeout(e.Ctx, providerRequestTimeout) - defer cancel() - providers := bs.network.FindProvidersAsync(child, e.Cid, maxProvidersPerRequest) - wg := &sync.WaitGroup{} - for p := range providers { - wg.Add(1) - go func(p peer.ID) { - defer wg.Done() - err := bs.network.ConnectTo(child, p) - if err != nil { - log.Debug("failed to connect to provider %s: %s", p, err) - } - }(p) - } - wg.Wait() - activeLk.Lock() - kset.Remove(e.Cid) - activeLk.Unlock() - }(e) - - case <-ctx.Done(): - return - } - } -} diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/LICENSE b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/LICENSE rename to vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/LICENSE diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/README.md b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/README.md similarity index 100% rename from vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/README.md rename to vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/README.md diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/file.go b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/file.go similarity index 100% rename from vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/file.go rename to vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/file.go diff --git a/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/package.json b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/package.json new file mode 100644 index 0000000000..3c3ed116bc --- /dev/null +++ b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/package.json @@ -0,0 +1,28 @@ +{ + "author": "whyrusleeping", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-util" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "mr-tron", + "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", + "name": "go-base58-fast", + "version": "0.1.1" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "", + "name": "go-ipfs-util", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.2.9" +} + diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/time.go b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/time.go similarity index 100% rename from vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/time.go rename to vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/time.go diff --git a/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/util.go b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/util.go new file mode 100644 index 0000000000..c11aefffb3 --- /dev/null +++ b/vendor/gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util/util.go @@ -0,0 +1,158 @@ +// Package util implements various utility functions used within ipfs +// that do not currently have a better place to live. +package util + +import ( + "errors" + "io" + "math/rand" + "os" + "path/filepath" + "runtime/debug" + "strings" + "time" + + b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// DefaultIpfsHash is the current default hash function used by IPFS. +const DefaultIpfsHash = mh.SHA2_256 + +// Debug is a global flag for debugging. +var Debug bool + +// ErrNotImplemented signifies a function has not been implemented yet. +var ErrNotImplemented = errors.New("Error: not implemented yet.") + +// ErrTimeout implies that a timeout has been triggered +var ErrTimeout = errors.New("Error: Call timed out.") + +// ErrSearchIncomplete implies that a search type operation didnt +// find the expected node, but did find 'a' node. +var ErrSearchIncomplete = errors.New("Error: Search Incomplete.") + +// ErrCast is returned when a cast fails AND the program should not panic. +func ErrCast() error { + debug.PrintStack() + return errCast +} + +var errCast = errors.New("cast error") + +// ExpandPathnames takes a set of paths and turns them into absolute paths +func ExpandPathnames(paths []string) ([]string, error) { + var out []string + for _, p := range paths { + abspath, err := filepath.Abs(p) + if err != nil { + return nil, err + } + out = append(out, abspath) + } + return out, nil +} + +type randGen struct { + rand.Rand +} + +// NewTimeSeededRand returns a random bytes reader +// which has been initialized with the current time. +func NewTimeSeededRand() io.Reader { + src := rand.NewSource(time.Now().UnixNano()) + return &randGen{ + Rand: *rand.New(src), + } +} + +// NewSeededRand returns a random bytes reader +// initialized with the given seed. +func NewSeededRand(seed int64) io.Reader { + src := rand.NewSource(seed) + return &randGen{ + Rand: *rand.New(src), + } +} + +func (r *randGen) Read(p []byte) (n int, err error) { + for i := 0; i < len(p); i++ { + p[i] = byte(r.Rand.Intn(255)) + } + return len(p), nil +} + +// GetenvBool is the way to check an env var as a boolean +func GetenvBool(name string) bool { + v := strings.ToLower(os.Getenv(name)) + return v == "true" || v == "t" || v == "1" +} + +// MultiErr is a util to return multiple errors +type MultiErr []error + +func (m MultiErr) Error() string { + if len(m) == 0 { + return "no errors" + } + + s := "Multiple errors: " + for i, e := range m { + if i != 0 { + s += ", " + } + s += e.Error() + } + return s +} + +// Partition splits a subject 3 parts: prefix, separator, suffix. +// The first occurrence of the separator will be matched. +// ie. Partition("Ready, steady, go!", ", ") -> ["Ready", ", ", "steady, go!"] +func Partition(subject string, sep string) (string, string, string) { + if i := strings.Index(subject, sep); i != -1 { + return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] + } + return subject, "", "" +} + +// RPartition splits a subject 3 parts: prefix, separator, suffix. +// The last occurrence of the separator will be matched. +// ie. RPartition("Ready, steady, go!", ", ") -> ["Ready, steady", ", ", "go!"] +func RPartition(subject string, sep string) (string, string, string) { + if i := strings.LastIndex(subject, sep); i != -1 { + return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] + } + return subject, "", "" +} + +// Hash is the global IPFS hash function. uses multihash SHA2_256, 256 bits +func Hash(data []byte) mh.Multihash { + h, err := mh.Sum(data, DefaultIpfsHash, -1) + if err != nil { + // this error can be safely ignored (panic) because multihash only fails + // from the selection of hash function. If the fn + length are valid, it + // won't error. + panic("multihash failed to hash using SHA2_256.") + } + return h +} + +// IsValidHash checks whether a given hash is valid (b58 decodable, len > 0) +func IsValidHash(s string) bool { + out, err := b58.Decode(s) + if err != nil { + return false + } + _, err = mh.Cast(out) + return err == nil +} + +// XOR takes two byte slices, XORs them together, returns the resulting slice. +func XOR(a, b []byte) []byte { + c := make([]byte, len(a)) + for i := 0; i < len(a); i++ { + c[i] = a[i] ^ b[i] + } + return c +} diff --git a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net.go b/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net.go deleted file mode 100644 index 8e2c3c03d0..0000000000 --- a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net.go +++ /dev/null @@ -1,350 +0,0 @@ -// package sockaddrnet provides conversions between net.Addr and Sockaddr -package sockaddrnet - -import ( - "net" -) - -// NetAddrAF returns the unix AF_* type for a given net.Addr -// returns AF_UNSPEC if unknown -func NetAddrAF(addr net.Addr) int { - switch addr := addr.(type) { - case *net.IPAddr: - return IPAF(addr.IP) - - case *net.TCPAddr: - return IPAF(addr.IP) - - case *net.UDPAddr: - return IPAF(addr.IP) - - case *net.UnixAddr: - return AF_UNIX - - default: - return AF_UNSPEC - } -} - -// IPAF returns the unix AF_* type for a given IP address -// returns AF_UNSPEC if unknown -func IPAF(ip net.IP) int { - switch { - case ip.To4() != nil: - return AF_INET - - case ip.To16() != nil: - return AF_INET6 - - default: - return AF_UNSPEC - } -} - -// NetAddrIPPROTO returns the unix IPPROTO_* type for a given net.Addr -// returns -1 if protocol unknown -func NetAddrIPPROTO(addr net.Addr) int { - switch addr := addr.(type) { - case *net.IPAddr: - switch { - default: - return IPPROTO_IP - - case addr.IP.To4() != nil: - return IPPROTO_IPV4 - - case addr.IP.To16() != nil: - return IPPROTO_IPV6 - } - - case *net.TCPAddr: - return IPPROTO_TCP - - case *net.UDPAddr: - return IPPROTO_UDP - - default: - return -1 - } -} - -// NetAddrSOCK returns the unix SOCK_* type for a given net.Addr -// returns 0 if type unknown -func NetAddrSOCK(addr net.Addr) int { - switch addr := addr.(type) { - case *net.IPAddr: - return SOCK_DGRAM - case *net.TCPAddr: - return SOCK_STREAM - case *net.UDPAddr: - return SOCK_DGRAM - case *net.UnixAddr: - switch addr.Net { - default: - return 0 - case "unix": - return SOCK_STREAM - case "unixgram": - return SOCK_DGRAM - case "unixpacket": - return SOCK_SEQPACKET - } - default: - return 0 - } -} - -// NetAddrToSockaddr converts a net.Addr to a Sockaddr. -// Returns nil if the input is invalid or conversion is not possible. -func NetAddrToSockaddr(addr net.Addr) Sockaddr { - switch addr := addr.(type) { - case *net.IPAddr: - return IPAddrToSockaddr(addr) - case *net.TCPAddr: - return TCPAddrToSockaddr(addr) - case *net.UDPAddr: - return UDPAddrToSockaddr(addr) - case *net.UnixAddr: - sa, _ := UnixAddrToSockaddr(addr) - return sa - default: - return nil - } -} - -// IPAndZoneToSockaddr converts a net.IP (with optional IPv6 Zone) to a Sockaddr -// Returns nil if conversion fails. -func IPAndZoneToSockaddr(ip net.IP, zone string) Sockaddr { - // Unspecified? - if ip == nil { - if zone != "" { - return &SockaddrInet6{ZoneId: uint32(IP6ZoneToInt(zone))} - } - return new(SockaddrInet4) - } - - // Valid IPv4? - if ip4 := ip.To4(); ip4 != nil && zone == "" { - var buf [4]byte - copy(buf[:], ip4) // last 4 bytes - return &SockaddrInet4{Addr: buf} - } - - // Valid IPv6 address? - if ip6 := ip.To16(); ip6 != nil { - var buf [16]byte - copy(buf[:], ip6) - return &SockaddrInet6{Addr: buf, ZoneId: uint32(IP6ZoneToInt(zone))} - } - - return nil -} - -// IPAddrToSockaddr converts a net.IPAddr to a Sockaddr. -// Returns nil if conversion fails. -func IPAddrToSockaddr(addr *net.IPAddr) Sockaddr { - return IPAndZoneToSockaddr(addr.IP, addr.Zone) -} - -// TCPAddrToSockaddr converts a net.TCPAddr to a Sockaddr. -// Returns nil if conversion fails. -func TCPAddrToSockaddr(addr *net.TCPAddr) Sockaddr { - sa := IPAndZoneToSockaddr(addr.IP, addr.Zone) - switch sa := sa.(type) { - case *SockaddrInet4: - sa.Port = addr.Port - return sa - case *SockaddrInet6: - sa.Port = addr.Port - return sa - default: - return nil - } -} - -// UDPAddrToSockaddr converts a net.UDPAddr to a Sockaddr. -// Returns nil if conversion fails. -func UDPAddrToSockaddr(addr *net.UDPAddr) Sockaddr { - sa := IPAndZoneToSockaddr(addr.IP, addr.Zone) - switch sa := sa.(type) { - case *SockaddrInet4: - sa.Port = addr.Port - return sa - case *SockaddrInet6: - sa.Port = addr.Port - return sa - default: - return nil - } -} - -// UnixAddrToSockaddr converts a net.UnixAddr to a Sockaddr, and returns -// the type (unix.SOCK_STREAM, unix.SOCK_DGRAM, unix.SOCK_SEQPACKET) -// Returns (nil, 0) if conversion fails. -func UnixAddrToSockaddr(addr *net.UnixAddr) (Sockaddr, int) { - t := 0 - switch addr.Net { - case "unix": - t = SOCK_STREAM - case "unixgram": - t = SOCK_DGRAM - case "unixpacket": - t = SOCK_SEQPACKET - default: - return nil, 0 - } - return &SockaddrUnix{Name: addr.Name}, t -} - -// IPAndZoneToSockaddr converts a net.IP (with optional IPv6 Zone) to a Sockaddr -// Returns nil if conversion fails. -func SockaddrToIPAndZone(sa Sockaddr) (net.IP, string) { - switch sa := sa.(type) { - case *SockaddrInet4: - ip := make([]byte, 16) - // V4InV6Prefix - ip[10] = 0xff - ip[11] = 0xff - copy(ip[12:16], sa.Addr[:]) - return ip, "" - - case *SockaddrInet6: - ip := make([]byte, 16) - copy(ip, sa.Addr[:]) - return ip, IP6ZoneToString(int(sa.ZoneId)) - } - return nil, "" -} - -// SockaddrToIPAddr converts a Sockaddr to a net.IPAddr -// Returns nil if conversion fails. -func SockaddrToIPAddr(sa Sockaddr) *net.IPAddr { - ip, zone := SockaddrToIPAndZone(sa) - switch sa.(type) { - case *SockaddrInet4: - return &net.IPAddr{IP: ip} - case *SockaddrInet6: - return &net.IPAddr{IP: ip, Zone: zone} - } - return nil -} - -// SockaddrToTCPAddr converts a Sockaddr to a net.TCPAddr -// Returns nil if conversion fails. -func SockaddrToTCPAddr(sa Sockaddr) *net.TCPAddr { - ip, zone := SockaddrToIPAndZone(sa) - switch sa := sa.(type) { - case *SockaddrInet4: - return &net.TCPAddr{IP: ip, Port: sa.Port} - case *SockaddrInet6: - return &net.TCPAddr{IP: ip, Port: sa.Port, Zone: zone} - } - return nil -} - -// SockaddrToUDPAddr converts a Sockaddr to a net.UDPAddr -// Returns nil if conversion fails. -func SockaddrToUDPAddr(sa Sockaddr) *net.UDPAddr { - ip, zone := SockaddrToIPAndZone(sa) - switch sa := sa.(type) { - case *SockaddrInet4: - return &net.UDPAddr{IP: ip, Port: sa.Port} - case *SockaddrInet6: - return &net.UDPAddr{IP: ip, Port: sa.Port, Zone: zone} - } - return nil -} - -// from: go/src/pkg/net/unixsock_posix.go - -// SockaddrToUnixAddr converts a Sockaddr to a net.UnixAddr -// Returns nil if conversion fails. -func SockaddrToUnixAddr(sa Sockaddr) *net.UnixAddr { - if s, ok := sa.(*SockaddrUnix); ok { - return &net.UnixAddr{Name: s.Name, Net: "unix"} - } - return nil -} - -// SockaddrToUnixgramAddr converts a Sockaddr to a net.UnixAddr -// Returns nil if conversion fails. -func SockaddrToUnixgramAddr(sa Sockaddr) *net.UnixAddr { - if s, ok := sa.(*SockaddrUnix); ok { - return &net.UnixAddr{Name: s.Name, Net: "unixgram"} - } - return nil -} - -// SockaddrToUnixpacketAddr converts a Sockaddr to a net.UnixAddr -// Returns nil if conversion fails. -func SockaddrToUnixpacketAddr(sa Sockaddr) *net.UnixAddr { - if s, ok := sa.(*SockaddrUnix); ok { - return &net.UnixAddr{Name: s.Name, Net: "unixpacket"} - } - return nil -} - -// from: go/src/pkg/net/ipsock.go - -// IP6ZoneToString converts an IP6 Zone unix int to a net string -// returns "" if zone is 0 -func IP6ZoneToString(zone int) string { - if zone == 0 { - return "" - } - if ifi, err := net.InterfaceByIndex(zone); err == nil { - return ifi.Name - } - return itod(uint(zone)) -} - -// IP6ZoneToInt converts an IP6 Zone net string to a unix int -// returns 0 if zone is "" -func IP6ZoneToInt(zone string) int { - if zone == "" { - return 0 - } - if ifi, err := net.InterfaceByName(zone); err == nil { - return ifi.Index - } - n, _, _ := dtoi(zone, 0) - return n -} - -// from: go/src/pkg/net/parse.go - -// Convert i to decimal string. -func itod(i uint) string { - if i == 0 { - return "0" - } - - // Assemble decimal in reverse order. - var b [32]byte - bp := len(b) - for ; i > 0; i /= 10 { - bp-- - b[bp] = byte(i%10) + '0' - } - - return string(b[bp:]) -} - -// Bigger than we need, not too big to worry about overflow -const big = 0xFFFFFF - -// Decimal to integer starting at &s[i0]. -// Returns number, new offset, success. -func dtoi(s string, i0 int) (n int, i int, ok bool) { - n = 0 - for i = i0; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ { - n = n*10 + int(s[i]-'0') - if n >= big { - return 0, i, false - } - } - if i == i0 { - return 0, i, false - } - return n, i, true -} diff --git a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_bsd.go b/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_bsd.go deleted file mode 100644 index 0deeeb2508..0000000000 --- a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_bsd.go +++ /dev/null @@ -1,30 +0,0 @@ -// +build darwin dragonfly freebsd netbsd openbsd - -package sockaddrnet - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -const ( - AF_INET = unix.AF_INET - AF_INET6 = unix.AF_INET6 - AF_UNIX = unix.AF_UNIX - AF_UNSPEC = unix.AF_UNSPEC - - IPPROTO_IP = unix.IPPROTO_IP - IPPROTO_IPV4 = unix.IPPROTO_IPV4 - IPPROTO_IPV6 = unix.IPPROTO_IPV6 - IPPROTO_TCP = unix.IPPROTO_TCP - IPPROTO_UDP = unix.IPPROTO_UDP - - SOCK_DGRAM = unix.SOCK_DGRAM - SOCK_STREAM = unix.SOCK_STREAM - SOCK_SEQPACKET = unix.SOCK_SEQPACKET -) - -type Sockaddr = unix.Sockaddr -type SockaddrInet4 = unix.SockaddrInet4 -type SockaddrInet6 = unix.SockaddrInet6 -type SockaddrUnix = unix.SockaddrUnix -type RawSockaddrAny = unix.RawSockaddrAny diff --git a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_linux.go b/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_linux.go deleted file mode 100644 index b8c4ebcbf0..0000000000 --- a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_linux.go +++ /dev/null @@ -1,28 +0,0 @@ -package sockaddrnet - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -const ( - AF_INET = unix.AF_INET - AF_INET6 = unix.AF_INET6 - AF_UNIX = unix.AF_UNIX - AF_UNSPEC = unix.AF_UNSPEC - - IPPROTO_IP = unix.IPPROTO_IP - IPPROTO_IPV4 = unix.IPPROTO_IPIP - IPPROTO_IPV6 = unix.IPPROTO_IPV6 - IPPROTO_TCP = unix.IPPROTO_TCP - IPPROTO_UDP = unix.IPPROTO_UDP - - SOCK_DGRAM = unix.SOCK_DGRAM - SOCK_STREAM = unix.SOCK_STREAM - SOCK_SEQPACKET = unix.SOCK_SEQPACKET -) - -type Sockaddr = unix.Sockaddr -type SockaddrInet4 = unix.SockaddrInet4 -type SockaddrInet6 = unix.SockaddrInet6 -type SockaddrUnix = unix.SockaddrUnix -type RawSockaddrAny = unix.RawSockaddrAny diff --git a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_windows.go b/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_windows.go deleted file mode 100644 index 34f55ff9bb..0000000000 --- a/vendor/gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net/net_windows.go +++ /dev/null @@ -1,28 +0,0 @@ -package sockaddrnet - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -const ( - AF_INET = windows.AF_INET - AF_INET6 = windows.AF_INET6 - AF_UNIX = windows.AF_UNIX - AF_UNSPEC = windows.AF_UNSPEC - - IPPROTO_IP = windows.IPPROTO_IP - IPPROTO_IPV4 = 0x4 // windows.IPPROTO_IPV4 (missing) - IPPROTO_IPV6 = windows.IPPROTO_IPV6 - IPPROTO_TCP = windows.IPPROTO_TCP - IPPROTO_UDP = windows.IPPROTO_UDP - - SOCK_DGRAM = windows.SOCK_DGRAM - SOCK_STREAM = windows.SOCK_STREAM - SOCK_SEQPACKET = windows.SOCK_SEQPACKET -) - -type Sockaddr = windows.Sockaddr -type SockaddrInet4 = windows.SockaddrInet4 -type SockaddrInet6 = windows.SockaddrInet6 -type SockaddrUnix = windows.SockaddrUnix -type RawSockaddrAny = windows.RawSockaddrAny diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/.travis.yml b/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/.travis.yml deleted file mode 100644 index 5b4ed2ae70..0000000000 --- a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/multiplex.go b/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/multiplex.go deleted file mode 100644 index ed55ba7ee7..0000000000 --- a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/multiplex.go +++ /dev/null @@ -1,417 +0,0 @@ -package multiplex - -import ( - "bufio" - "encoding/binary" - "errors" - "fmt" - "io" - "net" - "sync" - "time" - - pool "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("mplex") - -var MaxMessageSize = 1 << 20 - -// Max time to block waiting for a slow reader to read from a stream before -// resetting it. Preferably, we'd have some form of back-pressure mechanism but -// we don't have that in this protocol. -var ReceiveTimeout = 5 * time.Second - -// ErrShutdown is returned when operating on a shutdown session -var ErrShutdown = errors.New("session shut down") - -// ErrTwoInitiators is returned when both sides think they're the initiator -var ErrTwoInitiators = errors.New("two initiators") - -// ErrInvalidState is returned when the other side does something it shouldn't. -// In this case, we close the connection to be safe. -var ErrInvalidState = errors.New("received an unexpected message from the peer") - -// +1 for initiator -const ( - newStreamTag = 0 - messageTag = 2 - closeTag = 4 - resetTag = 6 -) - -type Multiplex struct { - con net.Conn - buf *bufio.Reader - nextID uint64 - initiator bool - - closed chan struct{} - shutdown chan struct{} - shutdownErr error - shutdownLock sync.Mutex - - wrLock sync.Mutex - - nstreams chan *Stream - hdrBuf []byte - - channels map[streamID]*Stream - chLock sync.Mutex -} - -func NewMultiplex(con net.Conn, initiator bool) *Multiplex { - mp := &Multiplex{ - con: con, - initiator: initiator, - buf: bufio.NewReader(con), - channels: make(map[streamID]*Stream), - closed: make(chan struct{}), - shutdown: make(chan struct{}), - nstreams: make(chan *Stream, 16), - hdrBuf: make([]byte, 20), - } - - go mp.handleIncoming() - - return mp -} - -func (mp *Multiplex) newStream(id streamID, name string) *Stream { - return &Stream{ - id: id, - name: name, - dataIn: make(chan []byte, 8), - reset: make(chan struct{}), - mp: mp, - } -} - -func (m *Multiplex) Accept() (*Stream, error) { - select { - case s, ok := <-m.nstreams: - if !ok { - return nil, errors.New("multiplex closed") - } - return s, nil - case <-m.closed: - return nil, m.shutdownErr - } -} - -func (mp *Multiplex) Close() error { - mp.closeNoWait() - - // Wait for the receive loop to finish. - <-mp.closed - - return nil -} - -func (mp *Multiplex) closeNoWait() { - mp.shutdownLock.Lock() - select { - case <-mp.shutdown: - default: - mp.con.Close() - close(mp.shutdown) - } - mp.shutdownLock.Unlock() -} - -func (mp *Multiplex) IsClosed() bool { - select { - case <-mp.closed: - return true - default: - return false - } -} - -func (mp *Multiplex) sendMsg(header uint64, data []byte, dl time.Time) error { - mp.wrLock.Lock() - defer mp.wrLock.Unlock() - if !dl.IsZero() { - if err := mp.con.SetWriteDeadline(dl); err != nil { - return err - } - } - n := binary.PutUvarint(mp.hdrBuf, header) - n += binary.PutUvarint(mp.hdrBuf[n:], uint64(len(data))) - _, err := mp.con.Write(mp.hdrBuf[:n]) - if err != nil { - return err - } - - if len(data) != 0 { - _, err = mp.con.Write(data) - if err != nil { - return err - } - } - if !dl.IsZero() { - if err := mp.con.SetWriteDeadline(time.Time{}); err != nil { - return err - } - } - - return nil -} - -func (mp *Multiplex) nextChanID() uint64 { - out := mp.nextID - mp.nextID++ - return out -} - -func (mp *Multiplex) NewStream() (*Stream, error) { - return mp.NewNamedStream("") -} - -func (mp *Multiplex) NewNamedStream(name string) (*Stream, error) { - mp.chLock.Lock() - - // We could call IsClosed but this is faster (given that we already have - // the lock). - if mp.channels == nil { - return nil, ErrShutdown - } - - sid := mp.nextChanID() - header := (sid << 3) | newStreamTag - - if name == "" { - name = fmt.Sprint(sid) - } - s := mp.newStream(streamID{ - id: sid, - initiator: true, - }, name) - mp.channels[s.id] = s - mp.chLock.Unlock() - - err := mp.sendMsg(header, []byte(name), time.Time{}) - if err != nil { - return nil, err - } - - return s, nil -} - -func (mp *Multiplex) cleanup() { - mp.closeNoWait() - mp.chLock.Lock() - defer mp.chLock.Unlock() - for _, msch := range mp.channels { - msch.clLock.Lock() - if !msch.closedRemote { - msch.closedRemote = true - // Cancel readers - close(msch.reset) - } - msch.closedLocal = true - msch.clLock.Unlock() - } - // Don't remove this nil assignment. We check if this is nil to check if - // the connection is closed when we already have the lock (faster than - // checking if the stream is closed). - mp.channels = nil - if mp.shutdownErr == nil { - mp.shutdownErr = ErrShutdown - } - close(mp.closed) -} - -func (mp *Multiplex) handleIncoming() { - defer mp.cleanup() - - recvTimeout := time.NewTimer(0) - defer recvTimeout.Stop() - - if !recvTimeout.Stop() { - <-recvTimeout.C - } - - for { - chID, tag, err := mp.readNextHeader() - if err != nil { - mp.shutdownErr = err - return - } - - remoteIsInitiator := tag&1 == 0 - ch := streamID{ - // true if *I'm* the initiator. - initiator: !remoteIsInitiator, - id: chID, - } - // Rounds up the tag: - // 0 -> 0 - // 1 -> 2 - // 2 -> 2 - // 3 -> 4 - // etc... - tag += (tag & 1) - - b, err := mp.readNext() - if err != nil { - mp.shutdownErr = err - return - } - - mp.chLock.Lock() - msch, ok := mp.channels[ch] - mp.chLock.Unlock() - - switch tag { - case newStreamTag: - if ok { - log.Debugf("received NewStream message for existing stream: %d", ch) - mp.shutdownErr = ErrInvalidState - return - } - - name := string(b) - msch = mp.newStream(ch, name) - mp.chLock.Lock() - mp.channels[ch] = msch - mp.chLock.Unlock() - select { - case mp.nstreams <- msch: - case <-mp.shutdown: - return - } - - case resetTag: - if !ok { - // This is *ok*. We forget the stream on reset. - continue - } - msch.clLock.Lock() - - // Honestly, this check should never be true... It means we've leaked. - // However, this is an error on *our* side so we shouldn't just bail. - if msch.closedLocal && msch.closedRemote { - msch.clLock.Unlock() - log.Errorf("leaked a completely closed stream") - continue - } - - if !msch.closedRemote { - close(msch.reset) - } - msch.closedRemote = true - msch.closedLocal = true - msch.clLock.Unlock() - - mp.chLock.Lock() - delete(mp.channels, ch) - mp.chLock.Unlock() - case closeTag: - if !ok { - continue - } - - msch.clLock.Lock() - - if msch.closedRemote { - msch.clLock.Unlock() - // Technically a bug on the other side. We - // should consider killing the connection. - continue - } - - close(msch.dataIn) - msch.closedRemote = true - - cleanup := msch.closedLocal - - msch.clLock.Unlock() - - if cleanup { - mp.chLock.Lock() - delete(mp.channels, ch) - mp.chLock.Unlock() - } - case messageTag: - if !ok { - // This is a perfectly valid case when we reset - // and forget about the stream. - log.Debugf("message for non-existant stream, dropping data: %d", ch) - go mp.sendMsg(ch.header(resetTag), nil, time.Time{}) - continue - } - - msch.clLock.Lock() - remoteClosed := msch.closedRemote - msch.clLock.Unlock() - if remoteClosed { - log.Errorf("Received data from remote after stream was closed by them. (len = %d)", len(b)) - go mp.sendMsg(msch.id.header(resetTag), nil, time.Time{}) - continue - } - - recvTimeout.Reset(ReceiveTimeout) - select { - case msch.dataIn <- b: - case <-msch.reset: - case <-recvTimeout.C: - log.Warningf("timed out receiving message into stream queue.") - // Do not do this asynchronously. Otherwise, we - // could drop a message, then receive a message, - // then reset. - msch.Reset() - continue - case <-mp.shutdown: - return - } - if !recvTimeout.Stop() { - <-recvTimeout.C - } - default: - log.Debugf("message with unknown header on stream %s", ch) - if ok { - msch.Reset() - } - } - } -} - -func (mp *Multiplex) readNextHeader() (uint64, uint64, error) { - h, err := binary.ReadUvarint(mp.buf) - if err != nil { - return 0, 0, err - } - - // get channel ID - ch := h >> 3 - - rem := h & 7 - - return ch, rem, nil -} - -func (mp *Multiplex) readNext() ([]byte, error) { - // get length - l, err := binary.ReadUvarint(mp.buf) - if err != nil { - return nil, err - } - - if l > uint64(MaxMessageSize) { - return nil, fmt.Errorf("message size too large!") - } - - if l == 0 { - return nil, nil - } - - buf := pool.Get(int(l)) - n, err := io.ReadFull(mp.buf, buf) - if err != nil { - return nil, err - } - - return buf[:n], nil -} diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/package.json b/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/package.json deleted file mode 100644 index 27c39baa7f..0000000000 --- a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-mplex" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-mplex" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "Stebalien", - "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", - "name": "go-buffer-pool", - "version": "0.1.3" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "go-mplex", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.30" -} - diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/stream.go b/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/stream.go deleted file mode 100644 index 6d2f90d35f..0000000000 --- a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/stream.go +++ /dev/null @@ -1,220 +0,0 @@ -package multiplex - -import ( - "context" - "fmt" - "io" - "sync" - "time" - - pool "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool" -) - -// streamID is a convenience type for operating on stream IDs -type streamID struct { - id uint64 - initiator bool -} - -// header computes the header for the given tag -func (id *streamID) header(tag uint64) uint64 { - header := id.id<<3 | tag - if !id.initiator { - header-- - } - return header -} - -type Stream struct { - id streamID - name string - dataIn chan []byte - mp *Multiplex - - extra []byte - - // exbuf is for holding the reference to the beginning of the extra slice - // for later memory pool freeing - exbuf []byte - - wDeadline time.Time - rDeadline time.Time - - clLock sync.Mutex - closedLocal bool - closedRemote bool - - // Closed when the connection is reset. - reset chan struct{} -} - -func (s *Stream) Name() string { - return s.name -} - -func (s *Stream) waitForData(ctx context.Context) error { - if !s.rDeadline.IsZero() { - dctx, cancel := context.WithDeadline(ctx, s.rDeadline) - defer cancel() - ctx = dctx - } - - select { - case <-s.reset: - // This is the only place where it's safe to return these. - s.returnBuffers() - return fmt.Errorf("stream reset") - case read, ok := <-s.dataIn: - if !ok { - return io.EOF - } - s.extra = read - s.exbuf = read - return nil - case <-ctx.Done(): - return ctx.Err() - } -} - -func (s *Stream) returnBuffers() { - if s.exbuf != nil { - pool.Put(s.exbuf) - s.exbuf = nil - s.extra = nil - } - for { - select { - case read, ok := <-s.dataIn: - if !ok { - return - } - if read == nil { - continue - } - pool.Put(read) - default: - return - } - } -} - -func (s *Stream) Read(b []byte) (int, error) { - if s.extra == nil { - err := s.waitForData(context.Background()) - if err != nil { - return 0, err - } - } - n := copy(b, s.extra) - if n < len(s.extra) { - s.extra = s.extra[n:] - } else { - if s.exbuf != nil { - pool.Put(s.exbuf) - } - s.extra = nil - s.exbuf = nil - } - return n, nil -} - -func (s *Stream) Write(b []byte) (int, error) { - var written int - for written < len(b) { - wl := len(b) - written - if wl > MaxMessageSize { - wl = MaxMessageSize - } - - n, err := s.write(b[written : written+wl]) - if err != nil { - return written, err - } - - written += n - } - - return written, nil -} - -func (s *Stream) write(b []byte) (int, error) { - if s.isClosed() { - return 0, fmt.Errorf("cannot write to closed stream") - } - - err := s.mp.sendMsg(s.id.header(messageTag), b, s.wDeadline) - if err != nil { - return 0, err - } - - return len(b), nil -} - -func (s *Stream) isClosed() bool { - s.clLock.Lock() - defer s.clLock.Unlock() - return s.closedLocal -} - -func (s *Stream) Close() error { - err := s.mp.sendMsg(s.id.header(closeTag), nil, time.Time{}) - - s.clLock.Lock() - if s.closedLocal { - s.clLock.Unlock() - return nil - } - - remote := s.closedRemote - s.closedLocal = true - s.clLock.Unlock() - - if remote { - s.mp.chLock.Lock() - delete(s.mp.channels, s.id) - s.mp.chLock.Unlock() - } - - return err -} - -func (s *Stream) Reset() error { - s.clLock.Lock() - if s.closedRemote && s.closedLocal { - s.clLock.Unlock() - return nil - } - - if !s.closedRemote { - close(s.reset) - // We generally call this to tell the other side to go away. No point in waiting around. - go s.mp.sendMsg(s.id.header(resetTag), nil, time.Time{}) - } - - s.closedLocal = true - s.closedRemote = true - - s.clLock.Unlock() - - s.mp.chLock.Lock() - delete(s.mp.channels, s.id) - s.mp.chLock.Unlock() - - return nil -} - -func (s *Stream) SetDeadline(t time.Time) error { - s.rDeadline = t - s.wDeadline = t - return nil -} - -func (s *Stream) SetReadDeadline(t time.Time) error { - s.rDeadline = t - return nil -} - -func (s *Stream) SetWriteDeadline(t time.Time) error { - s.wDeadline = t - return nil -} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborHelpers.go b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborHelpers.go deleted file mode 100644 index 20d152eafb..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborHelpers.go +++ /dev/null @@ -1,106 +0,0 @@ -package cbor - -import ( - "bytes" - "io" - - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared" -) - -// All of the methods in this file are exported, -// and their names and type declarations are intended to be -// identical to the naming and types of the golang stdlib -// 'encoding/json' packages, with ONE EXCEPTION: -// what stdlib calls "NewEncoder", we call "NewMarshaller"; -// what stdlib calls "NewDecoder", we call "NewUnmarshaller"; -// and similarly the types and methods are "Marshaller.Marshal" -// and "Unmarshaller.Unmarshal". -// You should be able to migrate with a sed script! -// -// (In refmt, the encoder/decoder systems are for token streams; -// if you're talking about object mapping, we consistently -// refer to that as marshalling/unmarshalling.) -// -// Most methods also have an "Atlased" variant, -// which lets you specify advanced type mapping instructions. - -func Marshal(v interface{}) ([]byte, error) { - var buf bytes.Buffer - if err := NewMarshaller(&buf).Marshal(v); err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -func MarshalAtlased(v interface{}, atl atlas.Atlas) ([]byte, error) { - var buf bytes.Buffer - if err := NewMarshallerAtlased(&buf, atl).Marshal(v); err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -type Marshaller struct { - marshaller *obj.Marshaller - encoder *Encoder - pump shared.TokenPump -} - -func (x *Marshaller) Marshal(v interface{}) error { - x.marshaller.Bind(v) - x.encoder.Reset() - return x.pump.Run() -} - -func NewMarshaller(wr io.Writer) *Marshaller { - return NewMarshallerAtlased(wr, atlas.MustBuild()) -} - -func NewMarshallerAtlased(wr io.Writer, atl atlas.Atlas) *Marshaller { - x := &Marshaller{ - marshaller: obj.NewMarshaller(atl), - encoder: NewEncoder(wr), - } - x.pump = shared.TokenPump{ - x.marshaller, - x.encoder, - } - return x -} - -func Unmarshal(data []byte, v interface{}) error { - return NewUnmarshaller(bytes.NewBuffer(data)).Unmarshal(v) -} - -func UnmarshalAtlased(data []byte, v interface{}, atl atlas.Atlas) error { - return NewUnmarshallerAtlased(bytes.NewBuffer(data), atl).Unmarshal(v) -} - -type Unmarshaller struct { - unmarshaller *obj.Unmarshaller - decoder *Decoder - pump shared.TokenPump -} - -func (x *Unmarshaller) Unmarshal(v interface{}) error { - x.unmarshaller.Bind(v) - x.decoder.Reset() - return x.pump.Run() -} - -func NewUnmarshaller(r io.Reader) *Unmarshaller { - return NewUnmarshallerAtlased(r, atlas.MustBuild()) -} -func NewUnmarshallerAtlased(r io.Reader, atl atlas.Atlas) *Unmarshaller { - x := &Unmarshaller{ - unmarshaller: obj.NewUnmarshaller(atl), - decoder: NewDecoder(r), - } - x.pump = shared.TokenPump{ - x.decoder, - x.unmarshaller, - } - return x -} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/errors.go b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/errors.go deleted file mode 100644 index 4e780b61b4..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -package cbor - -import ( - "fmt" - - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" -) - -// Error raised by Encoder when invalid tokens or invalid ordering, e.g. a MapClose with no matching open. -// Should never be seen by the user in practice unless generating their own token streams. -type ErrInvalidTokenStream struct { - Got Token - Acceptable []TokenType -} - -func (e *ErrInvalidTokenStream) Error() string { - return fmt.Sprintf("ErrInvalidTokenStream: unexpected %v, expected %v", e.Got, e.Acceptable) - // More comprehensible strings might include "start of value", "start of key or end of map", "start of value or end of array". -} - -var tokenTypesForKey = []TokenType{TString, TInt, TUint} -var tokenTypesForValue = []TokenType{TMapOpen, TArrOpen, TNull, TString, TBytes, TInt, TUint, TFloat64} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/errors.go b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/errors.go deleted file mode 100644 index 09448048d4..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/errors.go +++ /dev/null @@ -1,82 +0,0 @@ -package obj - -import ( - "fmt" - "reflect" - - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" -) - -// General note: avoid using reflect.Type here. It doesn't do well with `go-cmp`, -// which in turn makes our tests for error paths a lot jankier. - -// ErrInvalidUnmarshalTarget describes an invalid argument passed to Unmarshaller.Bind. -// (Unmarshalling must target a non-nil pointer so that it can address the value.) -type ErrInvalidUnmarshalTarget struct { - Type reflect.Type -} - -func (e ErrInvalidUnmarshalTarget) Error() string { - if e.Type == nil { - return "unmarshal error: invalid target (nil)" - } - if e.Type.Kind() != reflect.Ptr { - return "unmarshal error: invalid target (non-pointer " + e.Type.String() + ")" - } - return "unmarshal error: invalid target (nil " + e.Type.String() + ")" -} - -// ErrUnmarshalTypeCantFit is the error returned when unmarshalling cannot -// coerce the tokens in the stream into the kind of variables the unmarshal is targetting, -// for example if a map open token comes when an int is expected, -// or an int token comes when a string is expected. -type ErrUnmarshalTypeCantFit struct { - Token Token - Value reflect.Value - LenLim int // Set only if Value.Kind == Array and Token is bytes of a mismatch length. -} - -func (e ErrUnmarshalTypeCantFit) Error() string { - switch e.LenLim { - case 0: - return fmt.Sprintf("unmarshal error: cannot assign %s to %s field", e.Token, e.Value.Kind()) - default: - return fmt.Sprintf("unmarshal error: cannot assign %s to fixed length=%d byte array", e.Token, e.Value.Len()) - } -} - -// ErrMalformedTokenStream is the error returned when unmarshalling recieves ae -// completely invalid transition, such as when a map value is expected, but the -// map suddenly closes, or an array close is recieved with no matching array open. -type ErrMalformedTokenStream struct { - Got TokenType // Token in the stream that triggered the error. - Expected string // Freeform string describing valid token types. Often a summary like "array close or start of value", or "map close or key". -} - -func (e ErrMalformedTokenStream) Error() string { - return fmt.Sprintf("malformed stream: invalid appearance of %s token; expected %s", e.Got, e.Expected) -} - -// ErrNoSuchField is the error returned when unmarshalling into a struct and -// the token stream for the map contains a key which is not defined for the struct. -type ErrNoSuchField struct { - Name string // Field name from the token. - Type string // Type name of the struct we're operating on. -} - -func (e ErrNoSuchField) Error() string { - return fmt.Sprintf("unmarshal error: stream contains key %q, but there's no such field in structs of type %s", e.Name, e.Type) -} - -// ErrNoSuchUnionMember is the error returned when unmarshalling into a union -// interface and the token stream contains a key which does not name any of the -// known members of the union. -type ErrNoSuchUnionMember struct { - Name string // Key name from the token. - Type reflect.Type // The interface type we're trying to fill. - KnownMembers []string // Members we expected isntead. -} - -func (e ErrNoSuchUnionMember) Error() string { - return fmt.Sprintf("unmarshal error: cannot unmarshal into union %s: %q is not one of the known members (expected one of %s)", e.Type, e.Name, e.KnownMembers) -} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshal.go b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshal.go deleted file mode 100644 index d6db31429c..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshal.go +++ /dev/null @@ -1,108 +0,0 @@ -package obj - -import ( - "reflect" - - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" -) - -/* - Allocates the machinery for treating an in-memory object like a `TokenSink`. - This machinery will walk over values, using received tokens to fill in - fields as it visits them. - - Initialization must be finished by calling `Bind` to set the value to visit; - after this, the `Step` function is ready to be pumped. - Subsequent calls to `Bind` do a full reset, leaving `Step` ready to call - again and making all of the machinery reusable without re-allocating. -*/ -func NewUnmarshaller(atl atlas.Atlas) *Unmarshaller { - d := &Unmarshaller{ - unmarshalSlab: unmarshalSlab{ - atlas: atl, - rows: make([]unmarshalSlabRow, 0, 10), - }, - stack: make([]UnmarshalMachine, 0, 10), - } - return d -} - -func (d *Unmarshaller) Bind(v interface{}) error { - d.stack = d.stack[0:0] - d.unmarshalSlab.rows = d.unmarshalSlab.rows[0:0] - rv := reflect.ValueOf(v) - if rv.Kind() != reflect.Ptr || rv.IsNil() { - err := ErrInvalidUnmarshalTarget{reflect.TypeOf(v)} - d.step = &errThunkUnmarshalMachine{err} - return err - } - rv = rv.Elem() // Let's just always be addressible, shall we? - rt := rv.Type() - d.step = d.unmarshalSlab.requisitionMachine(rt) - return d.step.Reset(&d.unmarshalSlab, rv, rt) -} - -type Unmarshaller struct { - unmarshalSlab unmarshalSlab - stack []UnmarshalMachine - step UnmarshalMachine -} - -type UnmarshalMachine interface { - Reset(*unmarshalSlab, reflect.Value, reflect.Type) error - Step(*Unmarshaller, *unmarshalSlab, *Token) (done bool, err error) -} - -type unmarshalMachineStep func(*Unmarshaller, *unmarshalSlab, *Token) (done bool, err error) - -func (d *Unmarshaller) Step(tok *Token) (bool, error) { - done, err := d.step.Step(d, &d.unmarshalSlab, tok) - // If the step errored: out, entirely. - if err != nil { - return true, err - } - // If the step wasn't done, return same status. - if !done { - return false, nil - } - // If it WAS done, pop next, or if stack empty, we're entirely done. - nSteps := len(d.stack) - 1 - if nSteps == -1 { - return true, nil // that's all folks - } - d.step = d.stack[nSteps] - d.stack = d.stack[0:nSteps] - return false, nil -} - -/* - Starts the process of recursing unmarshalling over value `rv`. - - Caller provides the machine to use (this is an optimization for maps and slices, - which already know the machine and keep reusing it for all their entries). - This method pushes the first step with `tok` (the upstream tends to have peeked at - it in order to decide what to do, but if recursing, it belongs to the next obj), - then saves this new machine onto the driver's stack: future calls to step - the driver will then continuing stepping the new machine it returns a done status, - at which point we'll finally "return" by popping back to the last machine on the stack - (which is presumably the same one that just called this Recurse method). - - In other words, your UnmarshalMachine calls this when it wants to deal - with an object, and by the time we call back to your machine again, - that object will be traversed and the stream ready for you to continue. -*/ -func (d *Unmarshaller) Recurse(tok *Token, rv reflect.Value, rt reflect.Type, nextMach UnmarshalMachine) (err error) { - // fmt.Printf(">>> pushing into recursion with %#v\n", nextMach) - // Push the current machine onto the stack (we'll resume it when the new one is done), - d.stack = append(d.stack, d.step) - // Initialize the machine for this new target value. - err = nextMach.Reset(&d.unmarshalSlab, rv, rt) - if err != nil { - return - } - d.step = nextMach - // Immediately make a step (we're still the delegate in charge of someone else's step). - _, err = d.Step(tok) - return -} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/package.json b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/package.json deleted file mode 100644 index e912daeeaf..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/polydawn/refmt" - }, - "gx": { - "dvcsimport": "github.com/polydawn/refmt" - }, - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "refmt", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.1" -} - diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/unmarshalHelpers.go b/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/unmarshalHelpers.go deleted file mode 100644 index 494bd2bd6b..0000000000 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/unmarshalHelpers.go +++ /dev/null @@ -1,61 +0,0 @@ -package refmt - -import ( - "io" - - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" -) - -type DecodeOptions interface { - IsDecodeOptions() // marker method. -} - -func Unmarshal(opts DecodeOptions, data []byte, v interface{}) error { - switch opts.(type) { - case json.DecodeOptions: - return json.Unmarshal(data, v) - case cbor.DecodeOptions: - return cbor.Unmarshal(data, v) - default: - panic("incorrect usage: unknown DecodeOptions type") - } -} - -func UnmarshalAtlased(opts DecodeOptions, data []byte, v interface{}, atl atlas.Atlas) error { - switch opts.(type) { - case json.DecodeOptions: - return json.UnmarshalAtlased(data, v, atl) - case cbor.DecodeOptions: - return cbor.UnmarshalAtlased(data, v, atl) - default: - panic("incorrect usage: unknown DecodeOptions type") - } -} - -type Unmarshaller interface { - Unmarshal(v interface{}) error -} - -func NewUnmarshaller(opts DecodeOptions, r io.Reader) Unmarshaller { - switch opts.(type) { - case json.DecodeOptions: - return json.NewUnmarshaller(r) - case cbor.DecodeOptions: - return cbor.NewUnmarshaller(r) - default: - panic("incorrect usage: unknown DecodeOptions type") - } -} - -func NewUnmarshallerAtlased(opts DecodeOptions, r io.Reader, atl atlas.Atlas) Unmarshaller { - switch opts.(type) { - case json.DecodeOptions: - return json.NewUnmarshallerAtlased(r, atl) - case cbor.DecodeOptions: - return cbor.NewUnmarshallerAtlased(r, atl) - default: - panic("incorrect usage: unknown DecodeOptions type") - } -} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/config.go b/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/config.go deleted file mode 100644 index c6b3eb1a2f..0000000000 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/config.go +++ /dev/null @@ -1,112 +0,0 @@ -// package config implements the ipfs config file datastructures and utilities. -package config - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "path/filepath" - "strings" - - "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir" -) - -// Config is used to load ipfs config files. -type Config struct { - Identity Identity // local node's peer identity - Datastore Datastore // local node's storage - Addresses Addresses // local node's addresses - Mounts Mounts // local node's mount points - Discovery Discovery // local node's discovery mechanisms - Routing Routing // local node's routing settings - Ipns Ipns // Ipns settings - Bootstrap []string // local nodes's bootstrap peer addresses - Gateway Gateway // local node's gateway server options - API API // local node's API settings - Swarm SwarmConfig - Pubsub PubsubConfig - - Reprovider Reprovider - Experimental Experiments -} - -const ( - // DefaultPathName is the default config dir name - DefaultPathName = ".ipfs" - // DefaultPathRoot is the path to the default config dir location. - DefaultPathRoot = "~/" + DefaultPathName - // DefaultConfigFile is the filename of the configuration file - DefaultConfigFile = "config" - // EnvDir is the environment variable used to change the path root. - EnvDir = "IPFS_PATH" -) - -// PathRoot returns the default configuration root directory -func PathRoot() (string, error) { - dir := os.Getenv(EnvDir) - var err error - if len(dir) == 0 { - dir, err = homedir.Expand(DefaultPathRoot) - } - return dir, err -} - -// Path returns the path `extension` relative to the configuration root. If an -// empty string is provided for `configroot`, the default root is used. -func Path(configroot, extension string) (string, error) { - if len(configroot) == 0 { - dir, err := PathRoot() - if err != nil { - return "", err - } - return filepath.Join(dir, extension), nil - - } - return filepath.Join(configroot, extension), nil -} - -// Filename returns the configuration file path given a configuration root -// directory. If the configuration root directory is empty, use the default one -func Filename(configroot string) (string, error) { - return Path(configroot, DefaultConfigFile) -} - -// HumanOutput gets a config value ready for printing -func HumanOutput(value interface{}) ([]byte, error) { - s, ok := value.(string) - if ok { - return []byte(strings.Trim(s, "\n")), nil - } - return Marshal(value) -} - -// Marshal configuration with JSON -func Marshal(value interface{}) ([]byte, error) { - // need to prettyprint, hence MarshalIndent, instead of Encoder - return json.MarshalIndent(value, "", " ") -} - -func FromMap(v map[string]interface{}) (*Config, error) { - buf := new(bytes.Buffer) - if err := json.NewEncoder(buf).Encode(v); err != nil { - return nil, err - } - var conf Config - if err := json.NewDecoder(buf).Decode(&conf); err != nil { - return nil, fmt.Errorf("failure to decode config: %s", err) - } - return &conf, nil -} - -func ToMap(conf *Config) (map[string]interface{}, error) { - buf := new(bytes.Buffer) - if err := json.NewEncoder(buf).Encode(conf); err != nil { - return nil, err - } - var m map[string]interface{} - if err := json.NewDecoder(buf).Decode(&m); err != nil { - return nil, fmt.Errorf("failure to decode config: %s", err) - } - return m, nil -} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/identity.go b/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/identity.go deleted file mode 100644 index 7533e95294..0000000000 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/identity.go +++ /dev/null @@ -1,29 +0,0 @@ -package config - -import ( - "encoding/base64" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" -) - -const IdentityTag = "Identity" -const PrivKeyTag = "PrivKey" -const PrivKeySelector = IdentityTag + "." + PrivKeyTag - -// Identity tracks the configuration of the local node's identity. -type Identity struct { - PeerID string - PrivKey string `json:",omitempty"` -} - -// DecodePrivateKey is a helper to decode the users PrivateKey -func (i *Identity) DecodePrivateKey(passphrase string) (ic.PrivKey, error) { - pkb, err := base64.StdEncoding.DecodeString(i.PrivKey) - if err != nil { - return nil, err - } - - // currently storing key unencrypted. in the future we need to encrypt it. - // TODO(security) - return ic.UnmarshalPrivateKey(pkb) -} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/package.json b/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/package.json deleted file mode 100644 index af0991647a..0000000000 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "author": "magik6k", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-config" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-config" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "facebookgo", - "hash": "QmdYwCmx8pZRkzdcd8MhmLJqYVoVTC1aGsy5Q4reMGLNLg", - "name": "atomicfile", - "version": "0.0.0" - }, - { - "author": "why", - "hash": "QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y", - "name": "go-ipfs-addr", - "version": "0.1.25" - }, - { - "author": "lgierth", - "hash": "QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9", - "name": "go-multiaddr-dns", - "version": "0.2.5" - }, - { - "author": "mitchellh", - "hash": "QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK", - "name": "go-homedir", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-ipfs-config", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.16" -} - diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/swarm.go b/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/swarm.go deleted file mode 100644 index 5b128f38aa..0000000000 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/swarm.go +++ /dev/null @@ -1,19 +0,0 @@ -package config - -type SwarmConfig struct { - AddrFilters []string - DisableBandwidthMetrics bool - DisableNatPortMap bool - DisableRelay bool - EnableRelayHop bool - - ConnMgr ConnMgr -} - -// ConnMgr defines configuration options for the libp2p connection manager -type ConnMgr struct { - Type string - LowWater int - HighWater int - GracePeriod string -} diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/.travis.yml b/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/.travis.yml deleted file mode 100644 index bbb5185a2e..0000000000 --- a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: go -go: -- 1.3 -- 1.4 diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/README.md b/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/README.md deleted file mode 100644 index 4bf56724e6..0000000000 --- a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Go CORS handler [![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/cors) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/cors/master/LICENSE) [![build](https://img.shields.io/travis/rs/cors.svg?style=flat)](https://travis-ci.org/rs/cors) [![Coverage](http://gocover.io/_badge/github.com/rs/cors)](http://gocover.io/github.com/rs/cors) - -CORS is a `net/http` handler implementing [Cross Origin Resource Sharing W3 specification](http://www.w3.org/TR/cors/) in Golang. - -## Getting Started - -After installing Go and setting up your [GOPATH](http://golang.org/doc/code.html#GOPATH), create your first `.go` file. We'll call it `server.go`. - -```go -package main - -import ( - "net/http" - - "github.com/rs/cors" -) - -func main() { - mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - w.Write([]byte("{\"hello\": \"world\"}")) - }) - - // cors.Default() setup the middleware with default options being - // all origins accepted with simple methods (GET, POST). See - // documentation below for more options. - handler := cors.Default().Handler(mux) - http.ListenAndServe(":8080", handler) -} -``` - -Install `cors`: - - go get github.com/rs/cors - -Then run your server: - - go run server.go - -The server now runs on `localhost:8080`: - - $ curl -D - -H 'Origin: http://foo.com' http://localhost:8080/ - HTTP/1.1 200 OK - Access-Control-Allow-Origin: foo.com - Content-Type: application/json - Date: Sat, 25 Oct 2014 03:43:57 GMT - Content-Length: 18 - - {"hello": "world"} - -### More Examples - -* `net/http`: [examples/nethttp/server.go](https://github.com/rs/cors/blob/master/examples/nethttp/server.go) -* [Goji](https://goji.io): [examples/goji/server.go](https://github.com/rs/cors/blob/master/examples/goji/server.go) -* [Martini](http://martini.codegangsta.io): [examples/martini/server.go](https://github.com/rs/cors/blob/master/examples/martini/server.go) -* [Negroni](https://github.com/codegangsta/negroni): [examples/negroni/server.go](https://github.com/rs/cors/blob/master/examples/negroni/server.go) -* [Alice](https://github.com/justinas/alice): [examples/alice/server.go](https://github.com/rs/cors/blob/master/examples/alice/server.go) - -## Parameters - -Parameters are passed to the middleware thru the `cors.New` method as follow: - -```go -c := cors.New(cors.Options{ - AllowedOrigins: []string{"http://foo.com"}, - AllowCredentials: true, -}) - -// Insert the middleware -handler = c.Handler(handler) -``` - -* **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. An origin may contain a wildcard (`*`) to replace 0 or more characters (i.e.: `http://*.domain.com`). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. The default value is `*`. -* **AllowOriginFunc** `func (origin string) bool`: A custom function to validate the origin. It take the origin as argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` is ignored -* **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`). -* **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests. -* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification -* **AllowCredentials** `bool`: Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. The default is `false`. -* **MaxAge** `int`: Indicates how long (in seconds) the results of a preflight request can be cached. The default is `0` which stands for no max age. -* **OptionsPassthrough** `bool`: Instructs preflight to let other potential next handlers to process the `OPTIONS` method. Turn this on if your application handles `OPTIONS`. -* **Debug** `bool`: Debugging flag adds additional output to debug server side CORS issues. - -See [API documentation](http://godoc.org/github.com/rs/cors) for more info. - -## Benchmarks - - BenchmarkWithout 20000000 64.6 ns/op 8 B/op 1 allocs/op - BenchmarkDefault 3000000 469 ns/op 114 B/op 2 allocs/op - BenchmarkAllowedOrigin 3000000 608 ns/op 114 B/op 2 allocs/op - BenchmarkPreflight 20000000 73.2 ns/op 0 B/op 0 allocs/op - BenchmarkPreflightHeader 20000000 73.6 ns/op 0 B/op 0 allocs/op - BenchmarkParseHeaderList 2000000 847 ns/op 184 B/op 6 allocs/op - BenchmarkParse…Single 5000000 290 ns/op 32 B/op 3 allocs/op - BenchmarkParse…Normalized 2000000 776 ns/op 160 B/op 6 allocs/op - -## Licenses - -All source code is licensed under the [MIT License](https://raw.github.com/rs/cors/master/LICENSE). diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/package.json b/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/package.json deleted file mode 100644 index e81e0128de..0000000000 --- a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": "rs", - "bugs": { - "url": "https://github.com/rs/cors/issues" - }, - "gx": { - "dvcsimport": "github.com/rs/cors" - }, - "gxDependencies": [ - { - "author": "rs", - "hash": "QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37", - "name": "xhandler", - "version": "0.0.0" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "cors", - "version": "0.0.0" -} - diff --git a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/utils.go b/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/utils.go deleted file mode 100644 index c7a0aa0601..0000000000 --- a/vendor/gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors/utils.go +++ /dev/null @@ -1,70 +0,0 @@ -package cors - -import "strings" - -const toLower = 'a' - 'A' - -type converter func(string) string - -type wildcard struct { - prefix string - suffix string -} - -func (w wildcard) match(s string) bool { - return len(s) >= len(w.prefix+w.suffix) && strings.HasPrefix(s, w.prefix) && strings.HasSuffix(s, w.suffix) -} - -// convert converts a list of string using the passed converter function -func convert(s []string, c converter) []string { - out := []string{} - for _, i := range s { - out = append(out, c(i)) - } - return out -} - -// parseHeaderList tokenize + normalize a string containing a list of headers -func parseHeaderList(headerList string) []string { - l := len(headerList) - h := make([]byte, 0, l) - upper := true - // Estimate the number headers in order to allocate the right splice size - t := 0 - for i := 0; i < l; i++ { - if headerList[i] == ',' { - t++ - } - } - headers := make([]string, 0, t) - for i := 0; i < l; i++ { - b := headerList[i] - if b >= 'a' && b <= 'z' { - if upper { - h = append(h, b-toLower) - } else { - h = append(h, b) - } - } else if b >= 'A' && b <= 'Z' { - if !upper { - h = append(h, b+toLower) - } else { - h = append(h, b) - } - } else if b == '-' || b == '_' || (b >= '0' && b <= '9') { - h = append(h, b) - } - - if b == ' ' || b == ',' || i == l-1 { - if len(h) > 0 { - // Flush the found header - headers = append(headers, string(h)) - h = h[:0] - upper = true - } - } else { - upper = b == '-' || b == '_' - } - } - return headers -} diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/package.json b/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/package.json deleted file mode 100644 index 29341e11ca..0000000000 --- a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "hector", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-posinfo" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-posinfo" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL", - "name": "go-ipld-format", - "version": "0.6.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-posinfo", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.0" -} - diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/posinfo.go b/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/posinfo.go deleted file mode 100644 index 3e238fa030..0000000000 --- a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/posinfo.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package posinfo wraps offset information used by ipfs filestore nodes -package posinfo - -import ( - "os" - - ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" -) - -// PosInfo stores information about the file offset, its path and -// stat. -type PosInfo struct { - Offset uint64 - FullPath string - Stat os.FileInfo // can be nil -} - -// FilestoreNode is an ipld.Node which arries PosInfo with it -// allowing to map it directly to a filesystem object. -type FilestoreNode struct { - ipld.Node - PosInfo *PosInfo -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/LICENSE b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/LICENSE rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/LICENSE diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/README.md b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/README.md similarity index 100% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/README.md rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/README.md diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/coding.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/coding.go new file mode 100644 index 0000000000..092b538d10 --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/coding.go @@ -0,0 +1,139 @@ +package merkledag + +import ( + "fmt" + "sort" + "strings" + + "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + + pb "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// Make sure the user doesn't upgrade this file. +// We need to check *here* as well as inside the `pb` package *just* in case the +// user replaces *all* go files in that package. +const _ = pb.DoNotUpgradeFileEverItWillChangeYourHashes + +// for now, we use a PBNode intermediate thing. +// because native go objects are nice. + +// unmarshal decodes raw data into a *Node instance. +// The conversion uses an intermediate PBNode. +func (n *ProtoNode) unmarshal(encoded []byte) error { + var pbn pb.PBNode + if err := pbn.Unmarshal(encoded); err != nil { + return fmt.Errorf("unmarshal failed. %v", err) + } + + pbnl := pbn.GetLinks() + n.links = make([]*ipld.Link, len(pbnl)) + for i, l := range pbnl { + n.links[i] = &ipld.Link{Name: l.GetName(), Size: l.GetTsize()} + c, err := cid.Cast(l.GetHash()) + if err != nil { + return fmt.Errorf("link hash #%d is not valid multihash. %v", i, err) + } + n.links[i].Cid = c + } + sort.Stable(LinkSlice(n.links)) // keep links sorted + + n.data = pbn.GetData() + n.encoded = encoded + return nil +} + +// Marshal encodes a *Node instance into a new byte slice. +// The conversion uses an intermediate PBNode. +func (n *ProtoNode) Marshal() ([]byte, error) { + pbn := n.getPBNode() + data, err := pbn.Marshal() + if err != nil { + return data, fmt.Errorf("marshal failed. %v", err) + } + return data, nil +} + +func (n *ProtoNode) getPBNode() *pb.PBNode { + pbn := &pb.PBNode{} + if len(n.links) > 0 { + pbn.Links = make([]*pb.PBLink, len(n.links)) + } + + sort.Stable(LinkSlice(n.links)) // keep links sorted + for i, l := range n.links { + pbn.Links[i] = &pb.PBLink{} + pbn.Links[i].Name = &l.Name + pbn.Links[i].Tsize = &l.Size + if l.Cid.Defined() { + pbn.Links[i].Hash = l.Cid.Bytes() + } + } + + if len(n.data) > 0 { + pbn.Data = n.data + } + return pbn +} + +// EncodeProtobuf returns the encoded raw data version of a Node instance. +// It may use a cached encoded version, unless the force flag is given. +func (n *ProtoNode) EncodeProtobuf(force bool) ([]byte, error) { + sort.Stable(LinkSlice(n.links)) // keep links sorted + if n.encoded == nil || force { + n.cached = cid.Undef + var err error + n.encoded, err = n.Marshal() + if err != nil { + return nil, err + } + } + + if !n.cached.Defined() { + c, err := n.CidBuilder().Sum(n.encoded) + if err != nil { + return nil, err + } + + n.cached = c + } + + return n.encoded, nil +} + +// DecodeProtobuf decodes raw data and returns a new Node instance. +func DecodeProtobuf(encoded []byte) (*ProtoNode, error) { + n := new(ProtoNode) + err := n.unmarshal(encoded) + if err != nil { + return nil, fmt.Errorf("incorrectly formatted merkledag node: %s", err) + } + return n, nil +} + +// DecodeProtobufBlock is a block decoder for protobuf IPLD nodes conforming to +// node.DecodeBlockFunc +func DecodeProtobufBlock(b blocks.Block) (ipld.Node, error) { + c := b.Cid() + if c.Type() != cid.DagProtobuf { + return nil, fmt.Errorf("this function can only decode protobuf nodes") + } + + decnd, err := DecodeProtobuf(b.RawData()) + if err != nil { + if strings.Contains(err.Error(), "Unmarshal failed") { + return nil, fmt.Errorf("the block referred to by '%s' was not a valid merkledag node", c) + } + return nil, fmt.Errorf("failed to decode Protocol Buffers: %v", err) + } + + decnd.cached = c + decnd.SetCidBuilder(c.Prefix()) + return decnd, nil +} + +// Type assertion +var _ ipld.DecodeBlockFunc = DecodeProtobufBlock diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/errservice.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/errservice.go similarity index 89% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/errservice.go rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/errservice.go index a7719bd018..24ef6638fd 100644 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/errservice.go +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/errservice.go @@ -3,8 +3,8 @@ package merkledag import ( "context" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // ErrorService implements ipld.DAGService, returning 'Err' for every call. diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/merkledag.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/merkledag.go new file mode 100644 index 0000000000..5051fcae71 --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/merkledag.go @@ -0,0 +1,478 @@ +// Package merkledag implements the IPFS Merkle DAG data structures. +package merkledag + +import ( + "context" + "fmt" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + bserv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + ipldcbor "gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// TODO: We should move these registrations elsewhere. Really, most of the IPLD +// functionality should go in a `go-ipld` repo but that will take a lot of work +// and design. +func init() { + ipld.Register(cid.DagProtobuf, DecodeProtobufBlock) + ipld.Register(cid.Raw, DecodeRawBlock) + ipld.Register(cid.DagCBOR, ipldcbor.DecodeBlock) +} + +// contextKey is a type to use as value for the ProgressTracker contexts. +type contextKey string + +const progressContextKey contextKey = "progress" + +// NewDAGService constructs a new DAGService (using the default implementation). +// Note that the default implementation is also an ipld.LinkGetter. +func NewDAGService(bs bserv.BlockService) *dagService { + return &dagService{Blocks: bs} +} + +// dagService is an IPFS Merkle DAG service. +// - the root is virtual (like a forest) +// - stores nodes' data in a BlockService +// TODO: should cache Nodes that are in memory, and be +// able to free some of them when vm pressure is high +type dagService struct { + Blocks bserv.BlockService +} + +// Add adds a node to the dagService, storing the block in the BlockService +func (n *dagService) Add(ctx context.Context, nd ipld.Node) error { + if n == nil { // FIXME remove this assertion. protect with constructor invariant + return fmt.Errorf("dagService is nil") + } + + return n.Blocks.AddBlock(nd) +} + +func (n *dagService) AddMany(ctx context.Context, nds []ipld.Node) error { + blks := make([]blocks.Block, len(nds)) + for i, nd := range nds { + blks[i] = nd + } + return n.Blocks.AddBlocks(blks) +} + +// Get retrieves a node from the dagService, fetching the block in the BlockService +func (n *dagService) Get(ctx context.Context, c cid.Cid) (ipld.Node, error) { + if n == nil { + return nil, fmt.Errorf("dagService is nil") + } + + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + b, err := n.Blocks.GetBlock(ctx, c) + if err != nil { + if err == bserv.ErrNotFound { + return nil, ipld.ErrNotFound + } + return nil, fmt.Errorf("failed to get block for %s: %v", c, err) + } + + return ipld.Decode(b) +} + +// GetLinks return the links for the node, the node doesn't necessarily have +// to exist locally. +func (n *dagService) GetLinks(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { + if c.Type() == cid.Raw { + return nil, nil + } + node, err := n.Get(ctx, c) + if err != nil { + return nil, err + } + return node.Links(), nil +} + +func (n *dagService) Remove(ctx context.Context, c cid.Cid) error { + return n.Blocks.DeleteBlock(c) +} + +// RemoveMany removes multiple nodes from the DAG. It will likely be faster than +// removing them individually. +// +// This operation is not atomic. If it returns an error, some nodes may or may +// not have been removed. +func (n *dagService) RemoveMany(ctx context.Context, cids []cid.Cid) error { + // TODO(#4608): make this batch all the way down. + for _, c := range cids { + if err := n.Blocks.DeleteBlock(c); err != nil { + return err + } + } + return nil +} + +// GetLinksDirect creates a function to get the links for a node, from +// the node, bypassing the LinkService. If the node does not exist +// locally (and can not be retrieved) an error will be returned. +func GetLinksDirect(serv ipld.NodeGetter) GetLinks { + return func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { + nd, err := serv.Get(ctx, c) + if err != nil { + if err == bserv.ErrNotFound { + err = ipld.ErrNotFound + } + return nil, err + } + return nd.Links(), nil + } +} + +type sesGetter struct { + bs *bserv.Session +} + +// Get gets a single node from the DAG. +func (sg *sesGetter) Get(ctx context.Context, c cid.Cid) (ipld.Node, error) { + blk, err := sg.bs.GetBlock(ctx, c) + switch err { + case bserv.ErrNotFound: + return nil, ipld.ErrNotFound + default: + return nil, err + case nil: + // noop + } + + return ipld.Decode(blk) +} + +// GetMany gets many nodes at once, batching the request if possible. +func (sg *sesGetter) GetMany(ctx context.Context, keys []cid.Cid) <-chan *ipld.NodeOption { + return getNodesFromBG(ctx, sg.bs, keys) +} + +// Session returns a NodeGetter using a new session for block fetches. +func (n *dagService) Session(ctx context.Context) ipld.NodeGetter { + return &sesGetter{bserv.NewSession(ctx, n.Blocks)} +} + +// FetchGraph fetches all nodes that are children of the given node +func FetchGraph(ctx context.Context, root cid.Cid, serv ipld.DAGService) error { + return FetchGraphWithDepthLimit(ctx, root, -1, serv) +} + +// FetchGraphWithDepthLimit fetches all nodes that are children to the given +// node down to the given depth. maxDetph=0 means "only fetch root", +// maxDepth=1 means "fetch root and its direct children" and so on... +// maxDepth=-1 means unlimited. +func FetchGraphWithDepthLimit(ctx context.Context, root cid.Cid, depthLim int, serv ipld.DAGService) error { + var ng ipld.NodeGetter = serv + ds, ok := serv.(*dagService) + if ok { + ng = &sesGetter{bserv.NewSession(ctx, ds.Blocks)} + } + + set := make(map[string]int) + + // Visit function returns true when: + // * The element is not in the set and we're not over depthLim + // * The element is in the set but recorded depth is deeper + // than currently seen (if we find it higher in the tree we'll need + // to explore deeper than before). + // depthLim = -1 means we only return true if the element is not in the + // set. + visit := func(c cid.Cid, depth int) bool { + key := string(c.Bytes()) + oldDepth, ok := set[key] + + if (ok && depthLim < 0) || (depthLim >= 0 && depth > depthLim) { + return false + } + + if !ok || oldDepth > depth { + set[key] = depth + return true + } + return false + } + + v, _ := ctx.Value(progressContextKey).(*ProgressTracker) + if v == nil { + return EnumerateChildrenAsyncDepth(ctx, GetLinksDirect(ng), root, 0, visit) + } + + visitProgress := func(c cid.Cid, depth int) bool { + if visit(c, depth) { + v.Increment() + return true + } + return false + } + return EnumerateChildrenAsyncDepth(ctx, GetLinksDirect(ng), root, 0, visitProgress) +} + +// GetMany gets many nodes from the DAG at once. +// +// This method may not return all requested nodes (and may or may not return an +// error indicating that it failed to do so. It is up to the caller to verify +// that it received all nodes. +func (n *dagService) GetMany(ctx context.Context, keys []cid.Cid) <-chan *ipld.NodeOption { + return getNodesFromBG(ctx, n.Blocks, keys) +} + +func dedupKeys(keys []cid.Cid) []cid.Cid { + set := cid.NewSet() + for _, c := range keys { + set.Add(c) + } + if set.Len() == len(keys) { + return keys + } + return set.Keys() +} + +func getNodesFromBG(ctx context.Context, bs bserv.BlockGetter, keys []cid.Cid) <-chan *ipld.NodeOption { + keys = dedupKeys(keys) + + out := make(chan *ipld.NodeOption, len(keys)) + blocks := bs.GetBlocks(ctx, keys) + var count int + + go func() { + defer close(out) + for { + select { + case b, ok := <-blocks: + if !ok { + if count != len(keys) { + out <- &ipld.NodeOption{Err: fmt.Errorf("failed to fetch all nodes")} + } + return + } + + nd, err := ipld.Decode(b) + if err != nil { + out <- &ipld.NodeOption{Err: err} + return + } + + out <- &ipld.NodeOption{Node: nd} + count++ + + case <-ctx.Done(): + out <- &ipld.NodeOption{Err: ctx.Err()} + return + } + } + }() + return out +} + +// GetLinks is the type of function passed to the EnumerateChildren function(s) +// for getting the children of an IPLD node. +type GetLinks func(context.Context, cid.Cid) ([]*ipld.Link, error) + +// GetLinksWithDAG returns a GetLinks function that tries to use the given +// NodeGetter as a LinkGetter to get the children of a given IPLD node. This may +// allow us to traverse the DAG without actually loading and parsing the node in +// question (if we already have the links cached). +func GetLinksWithDAG(ng ipld.NodeGetter) GetLinks { + return func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { + return ipld.GetLinks(ctx, ng, c) + } +} + +// EnumerateChildren will walk the dag below the given root node and add all +// unseen children to the passed in set. +// TODO: parallelize to avoid disk latency perf hits? +func EnumerateChildren(ctx context.Context, getLinks GetLinks, root cid.Cid, visit func(cid.Cid) bool) error { + visitDepth := func(c cid.Cid, depth int) bool { + return visit(c) + } + + return EnumerateChildrenDepth(ctx, getLinks, root, 0, visitDepth) +} + +// EnumerateChildrenDepth walks the dag below the given root and passes the +// current depth to a given visit function. The visit function can be used to +// limit DAG exploration. +func EnumerateChildrenDepth(ctx context.Context, getLinks GetLinks, root cid.Cid, depth int, visit func(cid.Cid, int) bool) error { + links, err := getLinks(ctx, root) + if err != nil { + return err + } + + for _, lnk := range links { + c := lnk.Cid + if visit(c, depth+1) { + err = EnumerateChildrenDepth(ctx, getLinks, c, depth+1, visit) + if err != nil { + return err + } + } + } + return nil +} + +// ProgressTracker is used to show progress when fetching nodes. +type ProgressTracker struct { + Total int + lk sync.Mutex +} + +// DeriveContext returns a new context with value "progress" derived from +// the given one. +func (p *ProgressTracker) DeriveContext(ctx context.Context) context.Context { + return context.WithValue(ctx, progressContextKey, p) +} + +// Increment adds one to the total progress. +func (p *ProgressTracker) Increment() { + p.lk.Lock() + defer p.lk.Unlock() + p.Total++ +} + +// Value returns the current progress. +func (p *ProgressTracker) Value() int { + p.lk.Lock() + defer p.lk.Unlock() + return p.Total +} + +// FetchGraphConcurrency is total number of concurrent fetches that +// 'fetchNodes' will start at a time +var FetchGraphConcurrency = 32 + +// EnumerateChildrenAsync is equivalent to EnumerateChildren *except* that it +// fetches children in parallel. +// +// NOTE: It *does not* make multiple concurrent calls to the passed `visit` function. +func EnumerateChildrenAsync(ctx context.Context, getLinks GetLinks, c cid.Cid, visit func(cid.Cid) bool) error { + visitDepth := func(c cid.Cid, depth int) bool { + return visit(c) + } + + return EnumerateChildrenAsyncDepth(ctx, getLinks, c, 0, visitDepth) +} + +// EnumerateChildrenAsyncDepth is equivalent to EnumerateChildrenDepth *except* +// that it fetches children in parallel (down to a maximum depth in the graph). +// +// NOTE: It *does not* make multiple concurrent calls to the passed `visit` function. +func EnumerateChildrenAsyncDepth(ctx context.Context, getLinks GetLinks, c cid.Cid, startDepth int, visit func(cid.Cid, int) bool) error { + type cidDepth struct { + cid cid.Cid + depth int + } + + type linksDepth struct { + links []*ipld.Link + depth int + } + + feed := make(chan *cidDepth) + out := make(chan *linksDepth) + done := make(chan struct{}) + + var setlk sync.Mutex + var wg sync.WaitGroup + + errChan := make(chan error) + fetchersCtx, cancel := context.WithCancel(ctx) + defer wg.Wait() + defer cancel() + for i := 0; i < FetchGraphConcurrency; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for cdepth := range feed { + ci := cdepth.cid + depth := cdepth.depth + + setlk.Lock() + shouldVisit := visit(ci, depth) + setlk.Unlock() + + if shouldVisit { + links, err := getLinks(ctx, ci) + if err != nil { + select { + case errChan <- err: + case <-fetchersCtx.Done(): + } + return + } + + outLinks := &linksDepth{ + links: links, + depth: depth + 1, + } + + select { + case out <- outLinks: + case <-fetchersCtx.Done(): + return + } + } + select { + case done <- struct{}{}: + case <-fetchersCtx.Done(): + } + } + }() + } + defer close(feed) + + send := feed + var todobuffer []*cidDepth + var inProgress int + + next := &cidDepth{ + cid: c, + depth: startDepth, + } + for { + select { + case send <- next: + inProgress++ + if len(todobuffer) > 0 { + next = todobuffer[0] + todobuffer = todobuffer[1:] + } else { + next = nil + send = nil + } + case <-done: + inProgress-- + if inProgress == 0 && next == nil { + return nil + } + case linksDepth := <-out: + for _, lnk := range linksDepth.links { + cd := &cidDepth{ + cid: lnk.Cid, + depth: linksDepth.depth, + } + + if next == nil { + next = cd + send = feed + } else { + todobuffer = append(todobuffer, cd) + } + } + case err := <-errChan: + return err + + case <-ctx.Done(): + return ctx.Err() + } + } + +} + +var _ ipld.LinkGetter = &dagService{} +var _ ipld.NodeGetter = &dagService{} +var _ ipld.NodeGetter = &sesGetter{} +var _ ipld.DAGService = &dagService{} diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/node.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/node.go new file mode 100644 index 0000000000..ffef35821f --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/node.go @@ -0,0 +1,385 @@ +package merkledag + +import ( + "context" + "encoding/json" + "fmt" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// Common errors +var ( + ErrNotProtobuf = fmt.Errorf("expected protobuf dag node") + ErrLinkNotFound = fmt.Errorf("no link by that name") +) + +// ProtoNode represents a node in the IPFS Merkle DAG. +// nodes have opaque data and a set of navigable links. +type ProtoNode struct { + links []*ipld.Link + data []byte + + // cache encoded/marshaled value + encoded []byte + + cached cid.Cid + + // builder specifies cid version and hashing function + builder cid.Builder +} + +var v0CidPrefix = cid.Prefix{ + Codec: cid.DagProtobuf, + MhLength: -1, + MhType: mh.SHA2_256, + Version: 0, +} + +var v1CidPrefix = cid.Prefix{ + Codec: cid.DagProtobuf, + MhLength: -1, + MhType: mh.SHA2_256, + Version: 1, +} + +// V0CidPrefix returns a prefix for CIDv0 +func V0CidPrefix() cid.Prefix { return v0CidPrefix } + +// V1CidPrefix returns a prefix for CIDv1 with the default settings +func V1CidPrefix() cid.Prefix { return v1CidPrefix } + +// PrefixForCidVersion returns the Protobuf prefix for a given CID version +func PrefixForCidVersion(version int) (cid.Prefix, error) { + switch version { + case 0: + return v0CidPrefix, nil + case 1: + return v1CidPrefix, nil + default: + return cid.Prefix{}, fmt.Errorf("unknown CID version: %d", version) + } +} + +// CidBuilder returns the CID Builder for this ProtoNode, it is never nil +func (n *ProtoNode) CidBuilder() cid.Builder { + if n.builder == nil { + n.builder = v0CidPrefix + } + return n.builder +} + +// SetCidBuilder sets the CID builder if it is non nil, if nil then it +// is reset to the default value +func (n *ProtoNode) SetCidBuilder(builder cid.Builder) { + if builder == nil { + n.builder = v0CidPrefix + } else { + n.builder = builder.WithCodec(cid.DagProtobuf) + n.encoded = nil + n.cached = cid.Undef + } +} + +// LinkSlice is a slice of ipld.Links +type LinkSlice []*ipld.Link + +func (ls LinkSlice) Len() int { return len(ls) } +func (ls LinkSlice) Swap(a, b int) { ls[a], ls[b] = ls[b], ls[a] } +func (ls LinkSlice) Less(a, b int) bool { return ls[a].Name < ls[b].Name } + +// NodeWithData builds a new Protonode with the given data. +func NodeWithData(d []byte) *ProtoNode { + return &ProtoNode{data: d} +} + +// AddNodeLink adds a link to another node. +func (n *ProtoNode) AddNodeLink(name string, that ipld.Node) error { + n.encoded = nil + + lnk, err := ipld.MakeLink(that) + if err != nil { + return err + } + + lnk.Name = name + + n.AddRawLink(name, lnk) + + return nil +} + +// AddRawLink adds a copy of a link to this node +func (n *ProtoNode) AddRawLink(name string, l *ipld.Link) error { + n.encoded = nil + n.links = append(n.links, &ipld.Link{ + Name: name, + Size: l.Size, + Cid: l.Cid, + }) + + return nil +} + +// RemoveNodeLink removes a link on this node by the given name. +func (n *ProtoNode) RemoveNodeLink(name string) error { + n.encoded = nil + + ref := n.links[:0] + found := false + + for _, v := range n.links { + if v.Name != name { + ref = append(ref, v) + } else { + found = true + } + } + + if !found { + return ipld.ErrNotFound + } + + n.links = ref + + return nil +} + +// GetNodeLink returns a copy of the link with the given name. +func (n *ProtoNode) GetNodeLink(name string) (*ipld.Link, error) { + for _, l := range n.links { + if l.Name == name { + return &ipld.Link{ + Name: l.Name, + Size: l.Size, + Cid: l.Cid, + }, nil + } + } + return nil, ErrLinkNotFound +} + +// GetLinkedProtoNode returns a copy of the ProtoNode with the given name. +func (n *ProtoNode) GetLinkedProtoNode(ctx context.Context, ds ipld.DAGService, name string) (*ProtoNode, error) { + nd, err := n.GetLinkedNode(ctx, ds, name) + if err != nil { + return nil, err + } + + pbnd, ok := nd.(*ProtoNode) + if !ok { + return nil, ErrNotProtobuf + } + + return pbnd, nil +} + +// GetLinkedNode returns a copy of the IPLD Node with the given name. +func (n *ProtoNode) GetLinkedNode(ctx context.Context, ds ipld.DAGService, name string) (ipld.Node, error) { + lnk, err := n.GetNodeLink(name) + if err != nil { + return nil, err + } + + return lnk.GetNode(ctx, ds) +} + +// Copy returns a copy of the node. +// NOTE: Does not make copies of Node objects in the links. +func (n *ProtoNode) Copy() ipld.Node { + nnode := new(ProtoNode) + if len(n.data) > 0 { + nnode.data = make([]byte, len(n.data)) + copy(nnode.data, n.data) + } + + if len(n.links) > 0 { + nnode.links = make([]*ipld.Link, len(n.links)) + copy(nnode.links, n.links) + } + + nnode.builder = n.builder + + return nnode +} + +// RawData returns the protobuf-encoded version of the node. +func (n *ProtoNode) RawData() []byte { + out, _ := n.EncodeProtobuf(false) + return out +} + +// Data returns the data stored by this node. +func (n *ProtoNode) Data() []byte { + return n.data +} + +// SetData stores data in this nodes. +func (n *ProtoNode) SetData(d []byte) { + n.encoded = nil + n.cached = cid.Undef + n.data = d +} + +// UpdateNodeLink return a copy of the node with the link name set to point to +// that. If a link of the same name existed, it is removed. +func (n *ProtoNode) UpdateNodeLink(name string, that *ProtoNode) (*ProtoNode, error) { + newnode := n.Copy().(*ProtoNode) + _ = newnode.RemoveNodeLink(name) // ignore error + err := newnode.AddNodeLink(name, that) + return newnode, err +} + +// Size returns the total size of the data addressed by node, +// including the total sizes of references. +func (n *ProtoNode) Size() (uint64, error) { + b, err := n.EncodeProtobuf(false) + if err != nil { + return 0, err + } + + s := uint64(len(b)) + for _, l := range n.links { + s += l.Size + } + return s, nil +} + +// Stat returns statistics on the node. +func (n *ProtoNode) Stat() (*ipld.NodeStat, error) { + enc, err := n.EncodeProtobuf(false) + if err != nil { + return nil, err + } + + cumSize, err := n.Size() + if err != nil { + return nil, err + } + + return &ipld.NodeStat{ + Hash: n.Cid().String(), + NumLinks: len(n.links), + BlockSize: len(enc), + LinksSize: len(enc) - len(n.data), // includes framing. + DataSize: len(n.data), + CumulativeSize: int(cumSize), + }, nil +} + +// Loggable implements the ipfs/go-log.Loggable interface. +func (n *ProtoNode) Loggable() map[string]interface{} { + return map[string]interface{}{ + "node": n.String(), + } +} + +// UnmarshalJSON reads the node fields from a JSON-encoded byte slice. +func (n *ProtoNode) UnmarshalJSON(b []byte) error { + s := struct { + Data []byte `json:"data"` + Links []*ipld.Link `json:"links"` + }{} + + err := json.Unmarshal(b, &s) + if err != nil { + return err + } + + n.data = s.Data + n.links = s.Links + return nil +} + +// MarshalJSON returns a JSON representation of the node. +func (n *ProtoNode) MarshalJSON() ([]byte, error) { + out := map[string]interface{}{ + "data": n.data, + "links": n.links, + } + + return json.Marshal(out) +} + +// Cid returns the node's Cid, calculated according to its prefix +// and raw data contents. +func (n *ProtoNode) Cid() cid.Cid { + if n.encoded != nil && n.cached.Defined() { + return n.cached + } + + c, err := n.builder.Sum(n.RawData()) + if err != nil { + // programmer error + err = fmt.Errorf("invalid CID of length %d: %x: %v", len(n.RawData()), n.RawData(), err) + panic(err) + } + + n.cached = c + return c +} + +// String prints the node's Cid. +func (n *ProtoNode) String() string { + return n.Cid().String() +} + +// Multihash hashes the encoded data of this node. +func (n *ProtoNode) Multihash() mh.Multihash { + // NOTE: EncodeProtobuf generates the hash and puts it in n.cached. + _, err := n.EncodeProtobuf(false) + if err != nil { + // Note: no possibility exists for an error to be returned through here + panic(err) + } + + return n.cached.Hash() +} + +// Links returns the node links. +func (n *ProtoNode) Links() []*ipld.Link { + return n.links +} + +// SetLinks replaces the node links with the given ones. +func (n *ProtoNode) SetLinks(links []*ipld.Link) { + n.links = links +} + +// Resolve is an alias for ResolveLink. +func (n *ProtoNode) Resolve(path []string) (interface{}, []string, error) { + return n.ResolveLink(path) +} + +// ResolveLink consumes the first element of the path and obtains the link +// corresponding to it from the node. It returns the link +// and the path without the consumed element. +func (n *ProtoNode) ResolveLink(path []string) (*ipld.Link, []string, error) { + if len(path) == 0 { + return nil, nil, fmt.Errorf("end of path, no more links to resolve") + } + + lnk, err := n.GetNodeLink(path[0]) + if err != nil { + return nil, nil, err + } + + return lnk, path[1:], nil +} + +// Tree returns the link names of the ProtoNode. +// ProtoNodes are only ever one path deep, so anything different than an empty +// string for p results in nothing. The depth parameter is ignored. +func (n *ProtoNode) Tree(p string, depth int) []string { + if p != "" { + return nil + } + + out := make([]string, 0, len(n.links)) + for _, lnk := range n.links { + out = append(out, lnk.Name) + } + return out +} diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/package.json b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/package.json new file mode 100644 index 0000000000..7717d94bf2 --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/package.json @@ -0,0 +1,66 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-merkledag" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-merkledag" + }, + "gxDependencies": [ + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "whyrusleeping", + "hash": "QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D", + "name": "go-ipld-cbor", + "version": "1.5.10" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "hsanjuan", + "hash": "Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS", + "name": "go-ipfs-exchange-offline", + "version": "0.1.7" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "why", + "hash": "QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy", + "name": "go-blockservice", + "version": "1.1.29" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-merkledag", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.37" +} + diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/Rules.mk b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/Rules.mk similarity index 100% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/Rules.mk rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/Rules.mk diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.pb.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.pb.go new file mode 100644 index 0000000000..d127563b2a --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.pb.go @@ -0,0 +1,1072 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: merkledag.proto + +package merkledag_pb + +import ( + bytes "bytes" + fmt "fmt" + io "io" + math "math" + reflect "reflect" + strings "strings" + + _ "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +// DoNotUpgradeFileEverItWillChangeYourHashes warns users about not breaking +// their file hashes. +const DoNotUpgradeFileEverItWillChangeYourHashes = ` +This file does not produce canonical protobufs. Unfortunately, if we change it, +we'll change the hashes of the files we produce. + +Do *not regenerate this file. +` + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// An IPFS MerkleDAG Link +type PBLink struct { + // multihash of the target object + Hash []byte `protobuf:"bytes,1,opt,name=Hash" json:"Hash,omitempty"` + // utf string name. should be unique per object + Name *string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` + // cumulative size of target object + Tsize *uint64 `protobuf:"varint,3,opt,name=Tsize" json:"Tsize,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PBLink) Reset() { *m = PBLink{} } +func (*PBLink) ProtoMessage() {} +func (*PBLink) Descriptor() ([]byte, []int) { + return fileDescriptor_10837cc3557cec00, []int{0} +} +func (m *PBLink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PBLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PBLink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PBLink) XXX_Merge(src proto.Message) { + xxx_messageInfo_PBLink.Merge(m, src) +} +func (m *PBLink) XXX_Size() int { + return m.Size() +} +func (m *PBLink) XXX_DiscardUnknown() { + xxx_messageInfo_PBLink.DiscardUnknown(m) +} + +var xxx_messageInfo_PBLink proto.InternalMessageInfo + +func (m *PBLink) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *PBLink) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *PBLink) GetTsize() uint64 { + if m != nil && m.Tsize != nil { + return *m.Tsize + } + return 0 +} + +// An IPFS MerkleDAG Node +type PBNode struct { + // refs to other objects + Links []*PBLink `protobuf:"bytes,2,rep,name=Links" json:"Links,omitempty"` + // opaque user data + Data []byte `protobuf:"bytes,1,opt,name=Data" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PBNode) Reset() { *m = PBNode{} } +func (*PBNode) ProtoMessage() {} +func (*PBNode) Descriptor() ([]byte, []int) { + return fileDescriptor_10837cc3557cec00, []int{1} +} +func (m *PBNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PBNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PBNode.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PBNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_PBNode.Merge(m, src) +} +func (m *PBNode) XXX_Size() int { + return m.Size() +} +func (m *PBNode) XXX_DiscardUnknown() { + xxx_messageInfo_PBNode.DiscardUnknown(m) +} + +var xxx_messageInfo_PBNode proto.InternalMessageInfo + +func (m *PBNode) GetLinks() []*PBLink { + if m != nil { + return m.Links + } + return nil +} + +func (m *PBNode) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterType((*PBLink)(nil), "merkledag.pb.PBLink") + proto.RegisterType((*PBNode)(nil), "merkledag.pb.PBNode") +} + +func init() { proto.RegisterFile("merkledag.proto", fileDescriptor_10837cc3557cec00) } + +var fileDescriptor_10837cc3557cec00 = []byte{ + // 227 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0x4d, 0x2d, 0xca, + 0xce, 0x49, 0x4d, 0x49, 0x4c, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x41, 0x12, 0x48, + 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, + 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x59, 0xc9, + 0x8d, 0x8b, 0x2d, 0xc0, 0xc9, 0x27, 0x33, 0x2f, 0x5b, 0x48, 0x88, 0x8b, 0xc5, 0x23, 0xb1, 0x38, + 0x43, 0x82, 0x51, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0x06, 0x89, 0xf9, 0x25, 0xe6, 0xa6, 0x4a, + 0x30, 0x29, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x22, 0x5c, 0xac, 0x21, 0xc5, 0x99, 0x55, + 0xa9, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x10, 0x8e, 0x92, 0x07, 0xc8, 0x1c, 0xbf, 0xfc, + 0x94, 0x54, 0x21, 0x2d, 0x2e, 0x56, 0x90, 0x79, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, + 0x22, 0x7a, 0xc8, 0xce, 0xd3, 0x83, 0x58, 0x16, 0x04, 0x51, 0x02, 0x32, 0xdf, 0x25, 0xb1, 0x24, + 0x11, 0x66, 0x27, 0x88, 0xed, 0xa4, 0x73, 0xe3, 0xa1, 0x1c, 0xc3, 0x83, 0x87, 0x72, 0x8c, 0x1f, + 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, + 0x1d, 0x8f, 0xe4, 0x18, 0x0f, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, + 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x56, 0xb5, 0x6e, 0x0e, + 0x01, 0x00, 0x00, +} + +func (this *PBLink) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PBLink) + if !ok { + that2, ok := that.(PBLink) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *PBLink") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *PBLink but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PBLink but is not nil && this == nil") + } + if !bytes.Equal(this.Hash, that1.Hash) { + return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Tsize != nil && that1.Tsize != nil { + if *this.Tsize != *that1.Tsize { + return fmt.Errorf("Tsize this(%v) Not Equal that(%v)", *this.Tsize, *that1.Tsize) + } + } else if this.Tsize != nil { + return fmt.Errorf("this.Tsize == nil && that.Tsize != nil") + } else if that1.Tsize != nil { + return fmt.Errorf("Tsize this(%v) Not Equal that(%v)", this.Tsize, that1.Tsize) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *PBLink) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PBLink) + if !ok { + that2, ok := that.(PBLink) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Hash, that1.Hash) { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Tsize != nil && that1.Tsize != nil { + if *this.Tsize != *that1.Tsize { + return false + } + } else if this.Tsize != nil { + return false + } else if that1.Tsize != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PBNode) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PBNode) + if !ok { + that2, ok := that.(PBNode) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *PBNode") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *PBNode but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PBNode but is not nil && this == nil") + } + if len(this.Links) != len(that1.Links) { + return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) + } + for i := range this.Links { + if !this.Links[i].Equal(that1.Links[i]) { + return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) + } + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *PBNode) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PBNode) + if !ok { + that2, ok := that.(PBNode) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Links) != len(that1.Links) { + return false + } + for i := range this.Links { + if !this.Links[i].Equal(that1.Links[i]) { + return false + } + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PBLink) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&merkledag_pb.PBLink{") + if this.Hash != nil { + s = append(s, "Hash: "+valueToGoStringMerkledag(this.Hash, "byte")+",\n") + } + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMerkledag(this.Name, "string")+",\n") + } + if this.Tsize != nil { + s = append(s, "Tsize: "+valueToGoStringMerkledag(this.Tsize, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PBNode) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&merkledag_pb.PBNode{") + if this.Links != nil { + s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") + } + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMerkledag(this.Data, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMerkledag(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *PBLink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PBLink) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Hash != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMerkledag(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.Name != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMerkledag(dAtA, i, uint64(len(*m.Name))) + i += copy(dAtA[i:], *m.Name) + } + if m.Tsize != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMerkledag(dAtA, i, uint64(*m.Tsize)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PBNode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PBNode) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Links) > 0 { + for _, msg := range m.Links { + dAtA[i] = 0x12 + i++ + i = encodeVarintMerkledag(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Data != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMerkledag(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMerkledag(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedPBLink(r randyMerkledag, easy bool) *PBLink { + this := &PBLink{} + if r.Intn(10) != 0 { + v1 := r.Intn(100) + this.Hash = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Hash[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v2 := string(randStringMerkledag(r)) + this.Name = &v2 + } + if r.Intn(10) != 0 { + v3 := uint64(uint64(r.Uint32())) + this.Tsize = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMerkledag(r, 4) + } + return this +} + +func NewPopulatedPBNode(r randyMerkledag, easy bool) *PBNode { + this := &PBNode{} + if r.Intn(10) != 0 { + v4 := r.Intn(100) + this.Data = make([]byte, v4) + for i := 0; i < v4; i++ { + this.Data[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.Links = make([]*PBLink, v5) + for i := 0; i < v5; i++ { + this.Links[i] = NewPopulatedPBLink(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMerkledag(r, 3) + } + return this +} + +type randyMerkledag interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMerkledag(r randyMerkledag) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMerkledag(r randyMerkledag) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneMerkledag(r) + } + return string(tmps) +} +func randUnrecognizedMerkledag(r randyMerkledag, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMerkledag(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMerkledag(dAtA []byte, r randyMerkledag, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 + } + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(v7)) + case 1: + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMerkledag(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMerkledag(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *PBLink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Hash != nil { + l = len(m.Hash) + n += 1 + l + sovMerkledag(uint64(l)) + } + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMerkledag(uint64(l)) + } + if m.Tsize != nil { + n += 1 + sovMerkledag(uint64(*m.Tsize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PBNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMerkledag(uint64(l)) + } + if len(m.Links) > 0 { + for _, e := range m.Links { + l = e.Size() + n += 1 + l + sovMerkledag(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMerkledag(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMerkledag(x uint64) (n int) { + return sovMerkledag(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *PBLink) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PBLink{`, + `Hash:` + valueToStringMerkledag(this.Hash) + `,`, + `Name:` + valueToStringMerkledag(this.Name) + `,`, + `Tsize:` + valueToStringMerkledag(this.Tsize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PBNode) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PBNode{`, + `Data:` + valueToStringMerkledag(this.Data) + `,`, + `Links:` + strings.Replace(fmt.Sprintf("%v", this.Links), "PBLink", "PBLink", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMerkledag(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *PBLink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PBLink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PBLink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMerkledag + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMerkledag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMerkledag + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMerkledag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tsize", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Tsize = &v + default: + iNdEx = preIndex + skippy, err := skipMerkledag(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMerkledag + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMerkledag + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PBNode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PBNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PBNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMerkledag + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMerkledag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMerkledag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMerkledag + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMerkledag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Links = append(m.Links, &PBLink{}) + if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMerkledag(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMerkledag + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMerkledag + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMerkledag(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMerkledag + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMerkledag + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMerkledag + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMerkledag + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthMerkledag + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMerkledag + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMerkledag(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthMerkledag + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMerkledag = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMerkledag = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.proto b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.proto similarity index 93% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.proto rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.proto index d0d47f5a31..012195901d 100644 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.proto +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/merkledag.proto @@ -1,6 +1,6 @@ package merkledag.pb; -import "code.google.com/p/gogoprotobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/upgrade_check.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/upgrade_check.go similarity index 100% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/upgrade_check.go rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/pb/upgrade_check.go diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/raw.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/raw.go similarity index 90% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/raw.go rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/raw.go index be64a14690..4cf4476053 100644 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/raw.go +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/raw.go @@ -2,11 +2,11 @@ package merkledag import ( "fmt" - "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // RawNode represents a node which only contains data. diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/readonly.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/readonly.go similarity index 88% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/readonly.go rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/readonly.go index 9a51779816..10478d6d81 100644 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/readonly.go +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/readonly.go @@ -3,7 +3,7 @@ package merkledag import ( "fmt" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // ErrReadOnly is used when a read-only datastructure is written to. diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/rwservice.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/rwservice.go similarity index 91% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/rwservice.go rename to vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/rwservice.go index 26e71d1b69..f79cfac429 100644 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/rwservice.go +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/rwservice.go @@ -3,8 +3,8 @@ package merkledag import ( "context" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // ComboService implements ipld.DAGService, using 'Read' for all fetch methods, diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/session.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/session.go new file mode 100644 index 0000000000..8210c2526b --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/session.go @@ -0,0 +1,21 @@ +package merkledag + +import ( + "context" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// SessionMaker is an object that can generate a new fetching session. +type SessionMaker interface { + Session(context.Context) ipld.NodeGetter +} + +// NewSession returns a session backed NodeGetter if the given NodeGetter +// implements SessionMaker. +func NewSession(ctx context.Context, g ipld.NodeGetter) ipld.NodeGetter { + if sm, ok := g.(SessionMaker); ok { + return sm.Session(ctx) + } + return g +} diff --git a/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/test/utils.go b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/test/utils.go new file mode 100644 index 0000000000..9c811186d4 --- /dev/null +++ b/vendor/gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag/test/utils.go @@ -0,0 +1,23 @@ +package mdutils + +import ( + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + + bsrv "gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dssync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + offline "gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline" +) + +// Mock returns a new thread-safe, mock DAGService. +func Mock() ipld.DAGService { + return dag.NewDAGService(Bserv()) +} + +// Bserv returns a new, thread-safe, mock BlockService. +func Bserv() bsrv.BlockService { + bstore := blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore())) + return bsrv.New(bstore, offline.Exchange(bstore)) +} diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/LICENSE b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/LICENSE rename to vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/LICENSE diff --git a/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/README.md b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/README.md new file mode 100644 index 0000000000..f34ab8d877 --- /dev/null +++ b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/README.md @@ -0,0 +1,59 @@ +# go-conn-security + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/libp2p/go-conn-security?status.svg)](https://godoc.org/github.com/libp2p/go-conn-security) +[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-conn-security/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-conn-security?branch=master) +[![Build Status](https://travis-ci.org/libp2p/go-conn-security.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security) + +> Stream security transport interfaces + +This package defines the interfaces that must be fulfilled by libp2p network security transports. Security transports take go `net.Conn` connections and upgrade them to encrypted and authenticated connections. + +Known libp2p security transports include: + +* [go-libp2p-secio](https://github.com/libp2p/go-libp2p-secio) + +## Install + +`go-conn-security` is a standard Go module which can be installed with: + +```sh +go get github.com/libp2p/go-conn-security +``` + +Note that `go-conn-security` is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section). + +## Usage + +This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project it is recommended that you: + +```sh +go get -u github.com/whyrusleeping/gx +go get -u github.com/whyrusleeping/gx-go +cd +gx init +gx import github.com/libp2p/go-conn-security +gx install --global +gx-go --rewrite +``` + +Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information. + +For more information about how `go-conn-security` is used in the libp2p context, you can see the [go-libp2p-transport-upgrader](https://github.com/libp2p/go-libp2p-transport-upgrader) module. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-conn-security/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/libp2p/community/blob/master/code-of-conduct.md). + +### Want to hack on IPFS? + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) + +## License + +MIT diff --git a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/insecure/insecure.go b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/insecure/insecure.go similarity index 90% rename from vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/insecure/insecure.go rename to vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/insecure/insecure.go index f2c34c228a..8f23827ce6 100644 --- a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/insecure/insecure.go +++ b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/insecure/insecure.go @@ -4,10 +4,10 @@ import ( "context" "net" - security "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" + security "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // ID is the multistream-select protocol ID that should be used when identifying diff --git a/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/interface.go b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/interface.go new file mode 100644 index 0000000000..e7870047af --- /dev/null +++ b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/interface.go @@ -0,0 +1,25 @@ +package connsec + +import ( + "context" + "net" + + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// A Transport turns inbound and outbound unauthenticated, +// plain-text connections into authenticated, encrypted connections. +type Transport interface { + // SecureInbound secures an inbound connection. + SecureInbound(ctx context.Context, insecure net.Conn) (Conn, error) + + // SecureOutbound secures an outbound connection. + SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (Conn, error) +} + +// Conn is an authenticated, encrypted connection. +type Conn interface { + net.Conn + inet.ConnSecurity +} diff --git a/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/package.json b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/package.json new file mode 100644 index 0000000000..90bd237363 --- /dev/null +++ b/vendor/gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/package.json @@ -0,0 +1,36 @@ +{ + "author": "Stebalien", + "bugs": { + "url": "https://github.com/libp2p/go-conn-security" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-conn-security" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-conn-security", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.28" +} + diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/.travis.yml b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/.travis.yml deleted file mode 100644 index ffa87400a8..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: false -language: go -go: - - 1.3.3 - - 1.5.4 - - 1.6.2 - - tip -matrix: - allow_failures: - - go: tip - fast_finish: true -install: - - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d -s .) - - go tool vet . - - go test -v -race ./... diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/README.markdown b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/README.markdown deleted file mode 100644 index 23dfee0ac5..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/README.markdown +++ /dev/null @@ -1,92 +0,0 @@ -# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) - -Just a few functions for helping humanize times and sizes. - -`go get` it as `github.com/dustin/go-humanize`, import it as -`"github.com/dustin/go-humanize"`, use it as `humanize` - -See [godoc](https://godoc.org/github.com/dustin/go-humanize) for -complete documentation. - -## Sizes - -This lets you take numbers like `82854982` and convert them to useful -strings like, `83MB` or `79MiB` (whichever you prefer). - -Example: - -```go -fmt.Printf("That file is %s.", humanize.Bytes(82854982)) -``` - -## Times - -This lets you take a `time.Time` and spit it out in relative terms. -For example, `12 seconds ago` or `3 days from now`. - -Example: - -```go -fmt.Printf("This was touched %s", humanize.Time(someTimeInstance)) -``` - -Thanks to Kyle Lemons for the time implementation from an IRC -conversation one day. It's pretty neat. - -## Ordinals - -From a [mailing list discussion][odisc] where a user wanted to be able -to label ordinals. - - 0 -> 0th - 1 -> 1st - 2 -> 2nd - 3 -> 3rd - 4 -> 4th - [...] - -Example: - -```go -fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) -``` - -## Commas - -Want to shove commas into numbers? Be my guest. - - 0 -> 0 - 100 -> 100 - 1000 -> 1,000 - 1000000000 -> 1,000,000,000 - -100000 -> -100,000 - -Example: - -```go -fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) -``` - -## Ftoa - -Nicer float64 formatter that removes trailing zeros. - -```go -fmt.Printf("%f", 2.24) // 2.240000 -fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 -fmt.Printf("%f", 2.0) // 2.000000 -fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 -``` - -## SI notation - -Format numbers with [SI notation][sinotation]. - -Example: - -```go -humanize.SI(0.00000000223, "M") // 2.23nM -``` - -[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion -[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/ftoa.go b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/ftoa.go deleted file mode 100644 index c76190b106..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/ftoa.go +++ /dev/null @@ -1,23 +0,0 @@ -package humanize - -import "strconv" - -func stripTrailingZeros(s string) string { - offset := len(s) - 1 - for offset > 0 { - if s[offset] == '.' { - offset-- - break - } - if s[offset] != '0' { - break - } - offset-- - } - return s[:offset+1] -} - -// Ftoa converts a float to a string with no trailing zeros. -func Ftoa(num float64) string { - return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) -} diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/humanize.go b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/humanize.go deleted file mode 100644 index a69540a06b..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/humanize.go +++ /dev/null @@ -1,8 +0,0 @@ -/* -Package humanize converts boring ugly numbers to human-friendly strings and back. - -Durations can be turned into strings such as "3 days ago", numbers -representing sizes like 82854982 into useful strings like, "83MB" or -"79MiB" (whichever you prefer). -*/ -package humanize diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/package.json b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/package.json deleted file mode 100644 index 7bbed24cda..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "author": "dustin", - "bugs": { - "url": "https://github.com/dustin/go-humanize/issues" - }, - "gx": { - "dvcsimport": "github.com/dustin/go-humanize" - }, - "gxVersion": "0.7.0", - "language": "go", - "license": "", - "name": "go-humanize", - "version": "0.0.0" -} diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/times.go b/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/times.go deleted file mode 100644 index 49906b3725..0000000000 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/times.go +++ /dev/null @@ -1,90 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "sort" - "time" -) - -// Seconds-based time units -const ( - Minute = 60 - Hour = 60 * Minute - Day = 24 * Hour - Week = 7 * Day - Month = 30 * Day - Year = 12 * Month - LongTime = 37 * Year -) - -// Time formats a time into a relative string. -// -// Time(someT) -> "3 weeks ago" -func Time(then time.Time) string { - return RelTime(then, time.Now(), "ago", "from now") -} - -var magnitudes = []struct { - d int64 - format string - divby int64 -}{ - {1, "now", 1}, - {2, "1 second %s", 1}, - {Minute, "%d seconds %s", 1}, - {2 * Minute, "1 minute %s", 1}, - {Hour, "%d minutes %s", Minute}, - {2 * Hour, "1 hour %s", 1}, - {Day, "%d hours %s", Hour}, - {2 * Day, "1 day %s", 1}, - {Week, "%d days %s", Day}, - {2 * Week, "1 week %s", 1}, - {Month, "%d weeks %s", Week}, - {2 * Month, "1 month %s", 1}, - {Year, "%d months %s", Month}, - {18 * Month, "1 year %s", 1}, - {2 * Year, "2 years %s", 1}, - {LongTime, "%d years %s", Year}, - {math.MaxInt64, "a long while %s", 1}, -} - -// RelTime formats a time into a relative string. -// -// It takes two times and two labels. In addition to the generic time -// delta string (e.g. 5 minutes), the labels are used applied so that -// the label corresponding to the smaller time is applied. -// -// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" -func RelTime(a, b time.Time, albl, blbl string) string { - lbl := albl - diff := b.Unix() - a.Unix() - - after := a.After(b) - if after { - lbl = blbl - diff = a.Unix() - b.Unix() - } - - n := sort.Search(len(magnitudes), func(i int) bool { - return magnitudes[i].d > diff - }) - - mag := magnitudes[n] - args := []interface{}{} - escaped := false - for _, ch := range mag.format { - if escaped { - switch ch { - case 's': - args = append(args, lbl) - case 'd': - args = append(args, diff/mag.divby) - } - escaped = false - } else { - escaped = ch == '%' - } - } - return fmt.Sprintf(mag.format, args...) -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/.gx-update-state.json b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/.gx-update-state.json deleted file mode 100644 index 3219ecfae0..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/.gx-update-state.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Todo": [ - { - "Name": "go-multihash", - "Path": "github.com/multiformats/go-multihash", - "Level": 0, - "OrigHash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "Published": false, - "Ready": false - }, - { - "Name": "go-cid", - "Path": "github.com/ipfs/go-cid", - "Level": 1, - "Deps": [ - "go-multihash" - ], - "Published": false, - "Ready": false - } - ] -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/README.md b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/README.md deleted file mode 100644 index f45a3bf61d..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/README.md +++ /dev/null @@ -1,168 +0,0 @@ -What golang Kinds work best to implement CIDs? -============================================== - -There are many possible ways to implement CIDs. This package explores them. - -### criteria - -There's a couple different criteria to consider: - -- We want the best performance when operating on the type (getters, mostly); -- We want to minimize the number of memory allocations we need; -- We want types which can be used as map keys, because this is common. - -The priority of these criteria is open to argument, but it's probably -mapkeys > minalloc > anythingelse. -(Mapkeys and minalloc are also quite entangled, since if we don't pick a -representation that can work natively as a map key, we'll end up needing -a `KeyRepr()` method which gives us something that does work as a map key, -an that will almost certainly involve a malloc itself.) - -### options - -There are quite a few different ways to go: - -- Option A: CIDs as a struct; multihash as bytes. -- Option B: CIDs as a string. -- Option C: CIDs as an interface with multiple implementors. -- Option D: CIDs as a struct; multihash also as a struct or string. -- Option E: CIDs as a struct; content as strings plus offsets. -- Option F: CIDs as a struct wrapping only a string. - -The current approach on the master branch is Option A. - -Option D is distinctive from Option A because multihash as bytes transitively -causes the CID struct to be non-comparible and thus not suitable for map keys -as per https://golang.org/ref/spec#KeyType . (It's also a bit more work to -pursue Option D because it's just a bigger splash radius of change; but also, -something we might also want to do soon, because we *do* also have these same -map-key-usability concerns with multihash alone.) - -Option E is distinctive from Option D because Option E would always maintain -the binary format of the cid internally, and so could yield it again without -malloc, while still potentially having faster access to components than -Option B since it wouldn't need to re-parse varints to access later fields. - -Option F is actually a varation of Option B; it's distinctive from the other -struct options because it is proposing *literally* `struct{ x string }` as -the type, with no additional fields for components nor offsets. - -Option C is the avoid-choices choice, but note that interfaces are not free; -since "minimize mallocs" is one of our major goals, we cannot use interfaces -whimsically. - -Note there is no proposal for migrating to `type Cid []bytes`, because that -is generally considered to be strictly inferior to `type Cid string`. - - -Discoveries ------------ - -### using interfaces as map keys forgoes a lot of safety checks - -Using interfaces as map keys pushes a bunch of type checking to runtime. -E.g., it's totally valid at compile time to push a type which is non-comparable -into a map key; it will panic at *runtime* instead of failing at compile-time. - -There's also no way to define equality checks between implementors of the -interface: golang will always use its innate concept of comparison for the -concrete types. This means its effectively *never safe* to use two different -concrete implementations of an interface in the same map; you may add elements -which are semantically "equal" in your mind, and end up very confused later -when both impls of the same "equal" object have been stored. - -### sentinel values are possible in any impl, but some are clearer than others - -When using `*Cid`, the nil value is a clear sentinel for 'invalid'; -when using `type Cid string`, the zero value is a clear sentinel; -when using `type Cid struct` per Option A or D... the only valid check is -for a nil multihash field, since version=0 and codec=0 are both valid values. -When using `type Cid struct{string}` per Option F, zero is a clear sentinel. - -### usability as a map key is important - -We already covered this in the criteria section, but for clarity: - -- Option A: ❌ -- Option B: ✔ -- Option C: ~ (caveats, and depends on concrete impl) -- Option D: ✔ -- Option E: ✔ -- Option F: ✔ - -### living without offsets requires parsing - -Since CID (and multihash!) are defined using varints, they require parsing; -we can't just jump into the string at a known offset in order to yield e.g. -the multicodec number. - -In order to get to the 'meat' of the CID (the multihash content), we first -must parse: - -- the CID version varint; -- the multicodec varint; -- the multihash type enum varint; -- and the multihash length varint. - -Since there are many applications where we want to jump straight to the -multihash content (for example, when doing CAS sharding -- see the -[disclaimer](https://github.com/multiformats/multihash#disclaimers) about -bias in leading bytes), this overhead may be interesting. - -How much this overhead is significant is hard to say from microbenchmarking; -it depends largely on usage patterns. If these traversals are a significant -timesink, it would be an argument for Option D/E. -If these traversals are *not* a significant timesink, we might be wiser -to keep to Option B/F, because keeping a struct full of offsets will add several -words of memory usage per CID, and we keep a *lot* of CIDs. - -### interfaces cause boxing which is a significant performance cost - -See `BenchmarkCidMap_CidStr` and friends. - -Long story short: using interfaces *anywhere* will cause the compiler to -implicitly generate boxing and unboxing code (e.g. `runtime.convT2E`); -this is both another function call, and more concerningly, results in -large numbers of unbatchable memory allocations. - -Numbers without context are dangerous, but if you need one: 33%. -It's a big deal. - -This means attempts to "use interfaces, but switch to concrete impls when -performance is important" are a red herring: it doesn't work that way. - -This is not a general inditement against using interfaces -- but -if a situation is at the scale where it's become important to mind whether -or not pointers are a performance impact, then that situation also -is one where you have to think twice before using interfaces. - -### struct wrappers can be used in place of typedefs with zero overhead - -See `TestSizeOf`. - -Using the `unsafe.Sizeof` feature to inspect what the Go runtime thinks, -we can see that `type Foo string` and `type Foo struct{x string}` consume -precisely the same amount of memory. - -This is interesting because it means we can choose between either -type definition with no significant overhead anywhere we use it: -thus, we can choose freely between Option B and Option F based on which -we feel is more pleasant to work with. - -Option F (a struct wrapper) means we can prevent casting into our Cid type. -Option B (typedef string) can be declared a `const`. -Are there any other concerns that would separate the two choices? - -### one way or another: let's get rid of that star - -We should switch completely to handling `Cid` and remove `*Cid` completely. -Regardless of whether we do this by migrating to interface, or string -implementations, or simply structs with no pointers... once we get there, -refactoring to any of the *others* can become a no-op from the perspective -of any downstream code that uses CIDs. - -(This means all access via functions, never references to fields -- even if -we were to use a struct implementation. *Pretend* there's a interface, -in other words.) - -There are probably `gofix` incantations which can help us with this migration. diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cid.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cid.go deleted file mode 100644 index 29874956ed..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cid.go +++ /dev/null @@ -1,48 +0,0 @@ -package cid - -import ( - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -// Cid represents a self-describing content adressed identifier. -// -// A CID is composed of: -// -// - a Version of the CID itself, -// - a Multicodec (indicates the encoding of the referenced content), -// - and a Multihash (which identifies the referenced content). -// -// (Note that the Multihash further contains its own version and hash type -// indicators.) -type Cid interface { - // n.b. 'yields' means "without copy", 'produces' means a malloc. - - Version() uint64 // Yields the version prefix as a uint. - Multicodec() uint64 // Yields the multicodec as a uint. - Multihash() mh.Multihash // Yields the multihash segment. - - String() string // Produces the CID formatted as b58 string. - Bytes() []byte // Produces the CID formatted as raw binary. - - Prefix() Prefix // Produces a tuple of non-content metadata. - - // some change notes: - // - `KeyString() CidString` is gone because we're natively a map key now, you're welcome. - // - `StringOfBase(mbase.Encoding) (string, error)` is skipped, maybe it can come back but maybe it should be a formatter's job. - // - `Equals(o Cid) bool` is gone because it's now `==`, you're welcome. - - // TODO: make a multi-return method for {v,mc,mh} decomposition. CidStr will be able to implement this more efficiently than if one makes a series of the individual getter calls. -} - -// Prefix represents all the metadata of a Cid, -// that is, the Version, the Codec, the Multihash type -// and the Multihash length. It does not contains -// any actual content information. -// NOTE: The use -1 in MhLength to mean default length is deprecated, -// use the V0Builder or V1Builder structures instead -type Prefix struct { - Version uint64 - Codec uint64 - MhType uint64 - MhLength int -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidBoxingBench_test.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidBoxingBench_test.go deleted file mode 100644 index 920ce1f9f5..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidBoxingBench_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package cid - -import ( - "testing" -) - -// BenchmarkCidMap_CidStr estimates how fast it is to insert primitives into a map -// keyed by CidStr (concretely). -// -// We do 100 insertions per benchmark run to make sure the map initialization -// doesn't dominate the results. -// -// Sample results on linux amd64 go1.11beta: -// -// BenchmarkCidMap_CidStr-8 100000 16317 ns/op -// BenchmarkCidMap_CidIface-8 100000 20516 ns/op -// -// With benchmem on: -// -// BenchmarkCidMap_CidStr-8 100000 15579 ns/op 11223 B/op 207 allocs/op -// BenchmarkCidMap_CidIface-8 100000 19500 ns/op 12824 B/op 307 allocs/op -// BenchmarkCidMap_StrPlusHax-8 200000 10451 ns/op 7589 B/op 202 allocs/op -// -// We can see here that the impact of interface boxing is significant: -// it increases the time taken to do the inserts to 133%, largely because -// the implied `runtime.convT2E` calls cause another malloc each. -// -// There are also significant allocations in both cases because -// A) we cannot create a multihash without allocations since they are []byte; -// B) the map has to be grown several times; -// C) something I haven't quite put my finger on yet. -// Ideally we'd drive those down further as well. -// -// Pre-allocating the map reduces allocs by a very small percentage by *count*, -// but reduces the time taken by 66% overall (presumably because when a map -// re-arranges itself, it involves more or less an O(n) copy of the content -// in addition to the alloc itself). This isn't topical to the question of -// whether or not interfaces are a good idea; just for contextualizing. -// -func BenchmarkCidMap_CidStr(b *testing.B) { - for i := 0; i < b.N; i++ { - mp := map[CidStr]int{} - for x := 0; x < 100; x++ { - mp[NewCidStr(0, uint64(x), []byte{})] = x - } - } -} - -// BenchmarkCidMap_CidIface is in the family of BenchmarkCidMap_CidStr: -// it is identical except the map key type is declared as an interface -// (which forces all insertions to be boxed, changing performance). -func BenchmarkCidMap_CidIface(b *testing.B) { - for i := 0; i < b.N; i++ { - mp := map[Cid]int{} - for x := 0; x < 100; x++ { - mp[NewCidStr(0, uint64(x), []byte{})] = x - } - } -} - -// BenchmarkCidMap_CidStrAvoidMapGrowth is in the family of BenchmarkCidMap_CidStr: -// it is identical except the map is created with a size hint that removes -// some allocations (5, in practice, apparently). -func BenchmarkCidMap_CidStrAvoidMapGrowth(b *testing.B) { - for i := 0; i < b.N; i++ { - mp := make(map[CidStr]int, 100) - for x := 0; x < 100; x++ { - mp[NewCidStr(0, uint64(x), []byte{})] = x - } - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidString.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidString.go deleted file mode 100644 index 5c6b39342f..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidString.go +++ /dev/null @@ -1,161 +0,0 @@ -package cid - -import ( - "encoding/binary" - "fmt" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -//================= -// def & accessors -//================= - -var _ Cid = CidStr("") -var _ map[CidStr]struct{} = nil - -// CidStr is a representation of a Cid as a string type containing binary. -// -// Using golang's string type is preferable over byte slices even for binary -// data because golang strings are immutable, usable as map keys, -// trivially comparable with built-in equals operators, etc. -// -// Please do not cast strings or bytes into the CidStr type directly; -// use a parse method which validates the data and yields a CidStr. -type CidStr string - -// EmptyCidStr is a constant for a zero/uninitialized/sentinelvalue cid; -// it is declared mainly for readability in checks for sentinel values. -const EmptyCidStr = CidStr("") - -func (c CidStr) Version() uint64 { - bytes := []byte(c) - v, _ := binary.Uvarint(bytes) - return v -} - -func (c CidStr) Multicodec() uint64 { - bytes := []byte(c) - _, n := binary.Uvarint(bytes) // skip version length - codec, _ := binary.Uvarint(bytes[n:]) - return codec -} - -func (c CidStr) Multihash() mh.Multihash { - bytes := []byte(c) - _, n1 := binary.Uvarint(bytes) // skip version length - _, n2 := binary.Uvarint(bytes[n1:]) // skip codec length - return mh.Multihash(bytes[n1+n2:]) // return slice of remainder -} - -// String returns the default string representation of a Cid. -// Currently, Base58 is used as the encoding for the multibase string. -func (c CidStr) String() string { - switch c.Version() { - case 0: - return c.Multihash().B58String() - case 1: - mbstr, err := mbase.Encode(mbase.Base58BTC, []byte(c)) - if err != nil { - panic("should not error with hardcoded mbase: " + err.Error()) - } - return mbstr - default: - panic("not possible to reach this point") - } -} - -// Bytes produces a raw binary format of the CID. -// -// (For CidStr, this method is only distinct from casting because of -// compatibility with v0 CIDs.) -func (c CidStr) Bytes() []byte { - switch c.Version() { - case 0: - return c.Multihash() - case 1: - return []byte(c) - default: - panic("not possible to reach this point") - } -} - -// Prefix builds and returns a Prefix out of a Cid. -func (c CidStr) Prefix() Prefix { - dec, _ := mh.Decode(c.Multihash()) // assuming we got a valid multiaddr, this will not error - return Prefix{ - MhType: dec.Code, - MhLength: dec.Length, - Version: c.Version(), - Codec: c.Multicodec(), - } -} - -//================================== -// parsers & validators & factories -//================================== - -func NewCidStr(version uint64, codecType uint64, mhash mh.Multihash) CidStr { - hashlen := len(mhash) - // two 8 bytes (max) numbers plus hash - buf := make([]byte, 2*binary.MaxVarintLen64+hashlen) - n := binary.PutUvarint(buf, version) - n += binary.PutUvarint(buf[n:], codecType) - cn := copy(buf[n:], mhash) - if cn != hashlen { - panic("copy hash length is inconsistent") - } - return CidStr(buf[:n+hashlen]) -} - -// CidStrParse takes a binary byte slice, parses it, and returns either -// a valid CidStr, or the zero CidStr and an error. -// -// For CidV1, the data buffer is in the form: -// -// -// -// CidV0 are also supported. In particular, data buffers starting -// with length 34 bytes, which starts with bytes [18,32...] are considered -// binary multihashes. -// -// The multicodec bytes are not parsed to verify they're a valid varint; -// no further reification is performed. -// -// Multibase encoding should already have been unwrapped before parsing; -// if you have a multibase-enveloped string, use CidStrDecode instead. -// -// CidStrParse is the inverse of Cid.Bytes(). -func CidStrParse(data []byte) (CidStr, error) { - if len(data) == 34 && data[0] == 18 && data[1] == 32 { - h, err := mh.Cast(data) - if err != nil { - return EmptyCidStr, err - } - return NewCidStr(0, DagProtobuf, h), nil - } - - vers, n := binary.Uvarint(data) - if err := uvError(n); err != nil { - return EmptyCidStr, err - } - - if vers != 0 && vers != 1 { - return EmptyCidStr, fmt.Errorf("invalid cid version number: %d", vers) - } - - _, cn := binary.Uvarint(data[n:]) - if err := uvError(cn); err != nil { - return EmptyCidStr, err - } - - rest := data[n+cn:] - h, err := mh.Cast(rest) - if err != nil { - return EmptyCidStr, err - } - - // REVIEW: if the data is longer than the mh.len expects, we silently ignore it? should we? - return CidStr(data[0 : n+cn+len(h)]), nil -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidStruct.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidStruct.go deleted file mode 100644 index da612c60f8..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/cidStruct.go +++ /dev/null @@ -1,164 +0,0 @@ -package cid - -import ( - "encoding/binary" - "fmt" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -//================= -// def & accessors -//================= - -var _ Cid = CidStruct{} - -//var _ map[CidStruct]struct{} = nil // Will not compile! See struct def docs. -//var _ map[Cid]struct{} = map[Cid]struct{}{CidStruct{}: struct{}{}} // Legal to compile... -// but you'll get panics: "runtime error: hash of unhashable type cid.CidStruct" - -// CidStruct represents a CID in a struct format. -// -// This format complies with the exact same Cid interface as the CidStr -// implementation, but completely pre-parses the Cid metadata. -// CidStruct is a tad quicker in case of repeatedly accessed fields, -// but requires more reshuffling to parse and to serialize. -// CidStruct is not usable as a map key, because it contains a Multihash -// reference, which is a slice, and thus not "comparable" as a primitive. -// -// Beware of zero-valued CidStruct: it is difficult to distinguish an -// incorrectly-initialized "invalid" CidStruct from one representing a v0 cid. -type CidStruct struct { - version uint64 - codec uint64 - hash mh.Multihash -} - -// EmptyCidStruct is a constant for a zero/uninitialized/sentinelvalue cid; -// it is declared mainly for readability in checks for sentinel values. -// -// Note: it's not actually a const; the compiler does not allow const structs. -var EmptyCidStruct = CidStruct{} - -func (c CidStruct) Version() uint64 { - return c.version -} - -func (c CidStruct) Multicodec() uint64 { - return c.codec -} - -func (c CidStruct) Multihash() mh.Multihash { - return c.hash -} - -// String returns the default string representation of a Cid. -// Currently, Base58 is used as the encoding for the multibase string. -func (c CidStruct) String() string { - switch c.Version() { - case 0: - return c.Multihash().B58String() - case 1: - mbstr, err := mbase.Encode(mbase.Base58BTC, c.Bytes()) - if err != nil { - panic("should not error with hardcoded mbase: " + err.Error()) - } - return mbstr - default: - panic("not possible to reach this point") - } -} - -// Bytes produces a raw binary format of the CID. -func (c CidStruct) Bytes() []byte { - switch c.version { - case 0: - return []byte(c.hash) - case 1: - // two 8 bytes (max) numbers plus hash - buf := make([]byte, 2*binary.MaxVarintLen64+len(c.hash)) - n := binary.PutUvarint(buf, c.version) - n += binary.PutUvarint(buf[n:], c.codec) - cn := copy(buf[n:], c.hash) - if cn != len(c.hash) { - panic("copy hash length is inconsistent") - } - return buf[:n+len(c.hash)] - default: - panic("not possible to reach this point") - } -} - -// Prefix builds and returns a Prefix out of a Cid. -func (c CidStruct) Prefix() Prefix { - dec, _ := mh.Decode(c.hash) // assuming we got a valid multiaddr, this will not error - return Prefix{ - MhType: dec.Code, - MhLength: dec.Length, - Version: c.version, - Codec: c.codec, - } -} - -//================================== -// parsers & validators & factories -//================================== - -// CidStructParse takes a binary byte slice, parses it, and returns either -// a valid CidStruct, or the zero CidStruct and an error. -// -// For CidV1, the data buffer is in the form: -// -// -// -// CidV0 are also supported. In particular, data buffers starting -// with length 34 bytes, which starts with bytes [18,32...] are considered -// binary multihashes. -// -// The multicodec bytes are not parsed to verify they're a valid varint; -// no further reification is performed. -// -// Multibase encoding should already have been unwrapped before parsing; -// if you have a multibase-enveloped string, use CidStructDecode instead. -// -// CidStructParse is the inverse of Cid.Bytes(). -func CidStructParse(data []byte) (CidStruct, error) { - if len(data) == 34 && data[0] == 18 && data[1] == 32 { - h, err := mh.Cast(data) - if err != nil { - return EmptyCidStruct, err - } - return CidStruct{ - codec: DagProtobuf, - version: 0, - hash: h, - }, nil - } - - vers, n := binary.Uvarint(data) - if err := uvError(n); err != nil { - return EmptyCidStruct, err - } - - if vers != 0 && vers != 1 { - return EmptyCidStruct, fmt.Errorf("invalid cid version number: %d", vers) - } - - codec, cn := binary.Uvarint(data[n:]) - if err := uvError(cn); err != nil { - return EmptyCidStruct, err - } - - rest := data[n+cn:] - h, err := mh.Cast(rest) - if err != nil { - return EmptyCidStruct, err - } - - return CidStruct{ - version: vers, - codec: codec, - hash: h, - }, nil -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/enums.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/enums.go deleted file mode 100644 index 53e3d47fff..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/enums.go +++ /dev/null @@ -1,76 +0,0 @@ -package cid - -// These are multicodec-packed content types. The should match -// the codes described in the authoritative document: -// https://github.com/multiformats/multicodec/blob/master/table.csv -const ( - Raw = 0x55 - - DagProtobuf = 0x70 - DagCBOR = 0x71 - - GitRaw = 0x78 - - EthBlock = 0x90 - EthBlockList = 0x91 - EthTxTrie = 0x92 - EthTx = 0x93 - EthTxReceiptTrie = 0x94 - EthTxReceipt = 0x95 - EthStateTrie = 0x96 - EthAccountSnapshot = 0x97 - EthStorageTrie = 0x98 - BitcoinBlock = 0xb0 - BitcoinTx = 0xb1 - ZcashBlock = 0xc0 - ZcashTx = 0xc1 - DecredBlock = 0xe0 - DecredTx = 0xe1 -) - -// Codecs maps the name of a codec to its type -var Codecs = map[string]uint64{ - "v0": DagProtobuf, - "raw": Raw, - "protobuf": DagProtobuf, - "cbor": DagCBOR, - "git-raw": GitRaw, - "eth-block": EthBlock, - "eth-block-list": EthBlockList, - "eth-tx-trie": EthTxTrie, - "eth-tx": EthTx, - "eth-tx-receipt-trie": EthTxReceiptTrie, - "eth-tx-receipt": EthTxReceipt, - "eth-state-trie": EthStateTrie, - "eth-account-snapshot": EthAccountSnapshot, - "eth-storage-trie": EthStorageTrie, - "bitcoin-block": BitcoinBlock, - "bitcoin-tx": BitcoinTx, - "zcash-block": ZcashBlock, - "zcash-tx": ZcashTx, - "decred-block": DecredBlock, - "decred-tx": DecredTx, -} - -// CodecToStr maps the numeric codec to its name -var CodecToStr = map[uint64]string{ - Raw: "raw", - DagProtobuf: "protobuf", - DagCBOR: "cbor", - GitRaw: "git-raw", - EthBlock: "eth-block", - EthBlockList: "eth-block-list", - EthTxTrie: "eth-tx-trie", - EthTx: "eth-tx", - EthTxReceiptTrie: "eth-tx-receipt-trie", - EthTxReceipt: "eth-tx-receipt", - EthStateTrie: "eth-state-trie", - EthAccountSnapshot: "eth-account-snapshot", - EthStorageTrie: "eth-storage-trie", - BitcoinBlock: "bitcoin-block", - BitcoinTx: "bitcoin-tx", - ZcashBlock: "zcash-block", - ZcashTx: "zcash-tx", - DecredBlock: "decred-block", - DecredTx: "decred-tx", -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/errors.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/errors.go deleted file mode 100644 index 588c62e088..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/errors.go +++ /dev/null @@ -1,24 +0,0 @@ -package cid - -import ( - "errors" -) - -var ( - // ErrVarintBuffSmall means that a buffer passed to the cid parser was not - // long enough, or did not contain an invalid cid - ErrVarintBuffSmall = errors.New("reading varint: buffer too small") - - // ErrVarintTooBig means that the varint in the given cid was above the - // limit of 2^64 - ErrVarintTooBig = errors.New("reading varint: varint bigger than 64bits" + - " and not supported") - - // ErrCidTooShort means that the cid passed to decode was not long - // enough to be a valid Cid - ErrCidTooShort = errors.New("cid too short") - - // ErrInvalidEncoding means that selected encoding is not supported - // by this Cid version - ErrInvalidEncoding = errors.New("invalid base encoding") -) diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/misc.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/misc.go deleted file mode 100644 index 9a4486ad80..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/_rsrch/cidiface/misc.go +++ /dev/null @@ -1,12 +0,0 @@ -package cid - -func uvError(read int) error { - switch { - case read == 0: - return ErrVarintBuffSmall - case read < 0: - return ErrVarintTooBig - default: - return nil - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder.go deleted file mode 100644 index e0839a7a81..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder.go +++ /dev/null @@ -1,74 +0,0 @@ -package cid - -import ( - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -type Builder interface { - Sum(data []byte) (Cid, error) - GetCodec() uint64 - WithCodec(uint64) Builder -} - -type V0Builder struct{} - -type V1Builder struct { - Codec uint64 - MhType uint64 - MhLength int // MhLength <= 0 means the default length -} - -func (p Prefix) GetCodec() uint64 { - return p.Codec -} - -func (p Prefix) WithCodec(c uint64) Builder { - if c == p.Codec { - return p - } - p.Codec = c - if c != DagProtobuf { - p.Version = 1 - } - return p -} - -func (p V0Builder) Sum(data []byte) (Cid, error) { - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - return Undef, err - } - return NewCidV0(hash), nil -} - -func (p V0Builder) GetCodec() uint64 { - return DagProtobuf -} - -func (p V0Builder) WithCodec(c uint64) Builder { - if c == DagProtobuf { - return p - } - return V1Builder{Codec: c, MhType: mh.SHA2_256} -} - -func (p V1Builder) Sum(data []byte) (Cid, error) { - mhLen := p.MhLength - if mhLen <= 0 { - mhLen = -1 - } - hash, err := mh.Sum(data, p.MhType, mhLen) - if err != nil { - return Undef, err - } - return NewCidV1(p.Codec, hash), nil -} - -func (p V1Builder) GetCodec() uint64 { - return p.Codec -} - -func (p V1Builder) WithCodec(c uint64) Builder { - p.Codec = c - return p -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder_test.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder_test.go deleted file mode 100644 index 3210ae8274..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/builder_test.go +++ /dev/null @@ -1,92 +0,0 @@ -package cid - -import ( - "testing" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -func TestV0Builder(t *testing.T) { - data := []byte("this is some test content") - - // Construct c1 - format := V0Builder{} - c1, err := format.Sum(data) - if err != nil { - t.Fatal(err) - } - - // Construct c2 - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - c2 := NewCidV0(hash) - - if !c1.Equals(c2) { - t.Fatal("cids mismatch") - } - if c1.Prefix() != c2.Prefix() { - t.Fatal("prefixes mismatch") - } -} - -func TestV1Builder(t *testing.T) { - data := []byte("this is some test content") - - // Construct c1 - format := V1Builder{Codec: DagCBOR, MhType: mh.SHA2_256} - c1, err := format.Sum(data) - if err != nil { - t.Fatal(err) - } - - // Construct c2 - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - c2 := NewCidV1(DagCBOR, hash) - - if !c1.Equals(c2) { - t.Fatal("cids mismatch") - } - if c1.Prefix() != c2.Prefix() { - t.Fatal("prefixes mismatch") - } -} - -func TestCodecChange(t *testing.T) { - t.Run("Prefix-CidV0", func(t *testing.T) { - p := Prefix{Version: 0, Codec: DagProtobuf, MhType: mh.SHA2_256, MhLength: mh.DefaultLengths[mh.SHA2_256]} - testCodecChange(t, p) - }) - t.Run("Prefix-CidV1", func(t *testing.T) { - p := Prefix{Version: 1, Codec: DagProtobuf, MhType: mh.SHA2_256, MhLength: mh.DefaultLengths[mh.SHA2_256]} - testCodecChange(t, p) - }) - t.Run("V0Builder", func(t *testing.T) { - testCodecChange(t, V0Builder{}) - }) - t.Run("V1Builder", func(t *testing.T) { - testCodecChange(t, V1Builder{Codec: DagProtobuf, MhType: mh.SHA2_256}) - }) -} - -func testCodecChange(t *testing.T, b Builder) { - data := []byte("this is some test content") - - if b.GetCodec() != DagProtobuf { - t.Fatal("original builder not using Protobuf codec") - } - - b = b.WithCodec(Raw) - c, err := b.Sum(data) - if err != nil { - t.Fatal(err) - } - - if c.Type() != Raw { - t.Fatal("new cid codec did not change to Raw") - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid.go deleted file mode 100644 index 79edc4a23a..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid.go +++ /dev/null @@ -1,550 +0,0 @@ -// Package cid implements the Content-IDentifiers specification -// (https://github.com/ipld/cid) in Go. CIDs are -// self-describing content-addressed identifiers useful for -// distributed information systems. CIDs are used in the IPFS -// (https://ipfs.io) project ecosystem. -// -// CIDs have two major versions. A CIDv0 corresponds to a multihash of type -// DagProtobuf, is deprecated and exists for compatibility reasons. Usually, -// CIDv1 should be used. -// -// A CIDv1 has four parts: -// -// ::= -// -// As shown above, the CID implementation relies heavily on Multiformats, -// particularly Multibase -// (https://github.com/multiformats/go-multibase), Multicodec -// (https://github.com/multiformats/multicodec) and Multihash -// implementations (https://github.com/multiformats/go-multihash). -package cid - -import ( - "bytes" - "encoding/binary" - "encoding/json" - "errors" - "fmt" - "strings" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -// UnsupportedVersionString just holds an error message -const UnsupportedVersionString = "" - -var ( - // ErrVarintBuffSmall means that a buffer passed to the cid parser was not - // long enough, or did not contain an invalid cid - ErrVarintBuffSmall = errors.New("reading varint: buffer too small") - - // ErrVarintTooBig means that the varint in the given cid was above the - // limit of 2^64 - ErrVarintTooBig = errors.New("reading varint: varint bigger than 64bits" + - " and not supported") - - // ErrCidTooShort means that the cid passed to decode was not long - // enough to be a valid Cid - ErrCidTooShort = errors.New("cid too short") - - // ErrInvalidEncoding means that selected encoding is not supported - // by this Cid version - ErrInvalidEncoding = errors.New("invalid base encoding") -) - -// These are multicodec-packed content types. The should match -// the codes described in the authoritative document: -// https://github.com/multiformats/multicodec/blob/master/table.csv -const ( - Raw = 0x55 - - DagProtobuf = 0x70 - DagCBOR = 0x71 - - GitRaw = 0x78 - - EthBlock = 0x90 - EthBlockList = 0x91 - EthTxTrie = 0x92 - EthTx = 0x93 - EthTxReceiptTrie = 0x94 - EthTxReceipt = 0x95 - EthStateTrie = 0x96 - EthAccountSnapshot = 0x97 - EthStorageTrie = 0x98 - BitcoinBlock = 0xb0 - BitcoinTx = 0xb1 - ZcashBlock = 0xc0 - ZcashTx = 0xc1 - DecredBlock = 0xe0 - DecredTx = 0xe1 -) - -// Codecs maps the name of a codec to its type -var Codecs = map[string]uint64{ - "v0": DagProtobuf, - "raw": Raw, - "protobuf": DagProtobuf, - "cbor": DagCBOR, - "git-raw": GitRaw, - "eth-block": EthBlock, - "eth-block-list": EthBlockList, - "eth-tx-trie": EthTxTrie, - "eth-tx": EthTx, - "eth-tx-receipt-trie": EthTxReceiptTrie, - "eth-tx-receipt": EthTxReceipt, - "eth-state-trie": EthStateTrie, - "eth-account-snapshot": EthAccountSnapshot, - "eth-storage-trie": EthStorageTrie, - "bitcoin-block": BitcoinBlock, - "bitcoin-tx": BitcoinTx, - "zcash-block": ZcashBlock, - "zcash-tx": ZcashTx, - "decred-block": DecredBlock, - "decred-tx": DecredTx, -} - -// CodecToStr maps the numeric codec to its name -var CodecToStr = map[uint64]string{ - Raw: "raw", - DagProtobuf: "protobuf", - DagCBOR: "cbor", - GitRaw: "git-raw", - EthBlock: "eth-block", - EthBlockList: "eth-block-list", - EthTxTrie: "eth-tx-trie", - EthTx: "eth-tx", - EthTxReceiptTrie: "eth-tx-receipt-trie", - EthTxReceipt: "eth-tx-receipt", - EthStateTrie: "eth-state-trie", - EthAccountSnapshot: "eth-account-snapshot", - EthStorageTrie: "eth-storage-trie", - BitcoinBlock: "bitcoin-block", - BitcoinTx: "bitcoin-tx", - ZcashBlock: "zcash-block", - ZcashTx: "zcash-tx", - DecredBlock: "decred-block", - DecredTx: "decred-tx", -} - -// NewCidV0 returns a Cid-wrapped multihash. -// They exist to allow IPFS to work with Cids while keeping -// compatibility with the plain-multihash format used used in IPFS. -// NewCidV1 should be used preferentially. -func NewCidV0(mhash mh.Multihash) Cid { - // Need to make sure hash is valid for CidV0 otherwise we will - // incorrectly detect it as CidV1 in the Version() method - dec, err := mh.Decode(mhash) - if err != nil { - panic(err) - } - if dec.Code != mh.SHA2_256 || dec.Length != 32 { - panic("invalid hash for cidv0") - } - return Cid{string(mhash)} -} - -// NewCidV1 returns a new Cid using the given multicodec-packed -// content type. -func NewCidV1(codecType uint64, mhash mh.Multihash) Cid { - hashlen := len(mhash) - // two 8 bytes (max) numbers plus hash - buf := make([]byte, 2*binary.MaxVarintLen64+hashlen) - n := binary.PutUvarint(buf, 1) - n += binary.PutUvarint(buf[n:], codecType) - cn := copy(buf[n:], mhash) - if cn != hashlen { - panic("copy hash length is inconsistent") - } - - return Cid{string(buf[:n+hashlen])} -} - -// Cid represents a self-describing content adressed -// identifier. It is formed by a Version, a Codec (which indicates -// a multicodec-packed content type) and a Multihash. -type Cid struct{ str string } - -// Undef can be used to represent a nil or undefined Cid, using Cid{} -// directly is also acceptable. -var Undef = Cid{} - -// Defined returns true if a Cid is defined -// Calling any other methods on an undefined Cid will result in -// undefined behavior. -func (c Cid) Defined() bool { - return c.str != "" -} - -// Parse is a short-hand function to perform Decode, Cast etc... on -// a generic interface{} type. -func Parse(v interface{}) (Cid, error) { - switch v2 := v.(type) { - case string: - if strings.Contains(v2, "/ipfs/") { - return Decode(strings.Split(v2, "/ipfs/")[1]) - } - return Decode(v2) - case []byte: - return Cast(v2) - case mh.Multihash: - return NewCidV0(v2), nil - case Cid: - return v2, nil - default: - return Undef, fmt.Errorf("can't parse %+v as Cid", v2) - } -} - -// Decode parses a Cid-encoded string and returns a Cid object. -// For CidV1, a Cid-encoded string is primarily a multibase string: -// -// -// -// The base-encoded string represents a: -// -// -// -// Decode will also detect and parse CidV0 strings. Strings -// starting with "Qm" are considered CidV0 and treated directly -// as B58-encoded multihashes. -func Decode(v string) (Cid, error) { - if len(v) < 2 { - return Undef, ErrCidTooShort - } - - if len(v) == 46 && v[:2] == "Qm" { - hash, err := mh.FromB58String(v) - if err != nil { - return Undef, err - } - - return NewCidV0(hash), nil - } - - _, data, err := mbase.Decode(v) - if err != nil { - return Undef, err - } - - return Cast(data) -} - -// Extract the encoding from a Cid. If Decode on the same string did -// not return an error neither will this function. -func ExtractEncoding(v string) (mbase.Encoding, error) { - if len(v) < 2 { - return -1, ErrCidTooShort - } - - if len(v) == 46 && v[:2] == "Qm" { - return mbase.Base58BTC, nil - } - - encoding := mbase.Encoding(v[0]) - - // check encoding is valid - _, err := mbase.NewEncoder(encoding) - if err != nil { - return -1, err - } - - return encoding, nil -} - -func uvError(read int) error { - switch { - case read == 0: - return ErrVarintBuffSmall - case read < 0: - return ErrVarintTooBig - default: - return nil - } -} - -// Cast takes a Cid data slice, parses it and returns a Cid. -// For CidV1, the data buffer is in the form: -// -// -// -// CidV0 are also supported. In particular, data buffers starting -// with length 34 bytes, which starts with bytes [18,32...] are considered -// binary multihashes. -// -// Please use decode when parsing a regular Cid string, as Cast does not -// expect multibase-encoded data. Cast accepts the output of Cid.Bytes(). -func Cast(data []byte) (Cid, error) { - if len(data) == 34 && data[0] == 18 && data[1] == 32 { - h, err := mh.Cast(data) - if err != nil { - return Undef, err - } - - return NewCidV0(h), nil - } - - vers, n := binary.Uvarint(data) - if err := uvError(n); err != nil { - return Undef, err - } - - if vers != 1 { - return Undef, fmt.Errorf("expected 1 as the cid version number, got: %d", vers) - } - - _, cn := binary.Uvarint(data[n:]) - if err := uvError(cn); err != nil { - return Undef, err - } - - rest := data[n+cn:] - h, err := mh.Cast(rest) - if err != nil { - return Undef, err - } - - return Cid{string(data[0 : n+cn+len(h)])}, nil -} - -// Version returns the Cid version. -func (c Cid) Version() uint64 { - if len(c.str) == 34 && c.str[0] == 18 && c.str[1] == 32 { - return 0 - } - return 1 -} - -// Type returns the multicodec-packed content type of a Cid. -func (c Cid) Type() uint64 { - if c.Version() == 0 { - return DagProtobuf - } - _, n := uvarint(c.str) - codec, _ := uvarint(c.str[n:]) - return codec -} - -// String returns the default string representation of a -// Cid. Currently, Base58 is used as the encoding for the -// multibase string. -func (c Cid) String() string { - switch c.Version() { - case 0: - return c.Hash().B58String() - case 1: - mbstr, err := mbase.Encode(mbase.Base58BTC, c.Bytes()) - if err != nil { - panic("should not error with hardcoded mbase: " + err.Error()) - } - - return mbstr - default: - panic("not possible to reach this point") - } -} - -// String returns the string representation of a Cid -// encoded is selected base -func (c Cid) StringOfBase(base mbase.Encoding) (string, error) { - switch c.Version() { - case 0: - if base != mbase.Base58BTC { - return "", ErrInvalidEncoding - } - return c.Hash().B58String(), nil - case 1: - return mbase.Encode(base, c.Bytes()) - default: - panic("not possible to reach this point") - } -} - -// Encode return the string representation of a Cid in a given base -// when applicable. Version 0 Cid's are always in Base58 as they do -// not take a multibase prefix. -func (c Cid) Encode(base mbase.Encoder) string { - switch c.Version() { - case 0: - return c.Hash().B58String() - case 1: - return base.Encode(c.Bytes()) - default: - panic("not possible to reach this point") - } -} - -// Hash returns the multihash contained by a Cid. -func (c Cid) Hash() mh.Multihash { - bytes := c.Bytes() - - if c.Version() == 0 { - return mh.Multihash(bytes) - } - - // skip version length - _, n1 := binary.Uvarint(bytes) - // skip codec length - _, n2 := binary.Uvarint(bytes[n1:]) - - return mh.Multihash(bytes[n1+n2:]) -} - -// Bytes returns the byte representation of a Cid. -// The output of bytes can be parsed back into a Cid -// with Cast(). -func (c Cid) Bytes() []byte { - return []byte(c.str) -} - -// Equals checks that two Cids are the same. -// In order for two Cids to be considered equal, the -// Version, the Codec and the Multihash must match. -func (c Cid) Equals(o Cid) bool { - return c == o -} - -// UnmarshalJSON parses the JSON representation of a Cid. -func (c *Cid) UnmarshalJSON(b []byte) error { - if len(b) < 2 { - return fmt.Errorf("invalid cid json blob") - } - obj := struct { - CidTarget string `json:"/"` - }{} - objptr := &obj - err := json.Unmarshal(b, &objptr) - if err != nil { - return err - } - if objptr == nil { - *c = Cid{} - return nil - } - - if obj.CidTarget == "" { - return fmt.Errorf("cid was incorrectly formatted") - } - - out, err := Decode(obj.CidTarget) - if err != nil { - return err - } - - *c = out - - return nil -} - -// MarshalJSON procudes a JSON representation of a Cid, which looks as follows: -// -// { "/": "" } -// -// Note that this formatting comes from the IPLD specification -// (https://github.com/ipld/specs/tree/master/ipld) -func (c Cid) MarshalJSON() ([]byte, error) { - if !c.Defined() { - return []byte("null"), nil - } - return []byte(fmt.Sprintf("{\"/\":\"%s\"}", c.String())), nil -} - -// KeyString returns the binary representation of the Cid as a string -func (c Cid) KeyString() string { - return c.str -} - -// Loggable returns a Loggable (as defined by -// https://godoc.org/github.com/ipfs/go-log). -func (c Cid) Loggable() map[string]interface{} { - return map[string]interface{}{ - "cid": c, - } -} - -// Prefix builds and returns a Prefix out of a Cid. -func (c Cid) Prefix() Prefix { - dec, _ := mh.Decode(c.Hash()) // assuming we got a valid multiaddr, this will not error - return Prefix{ - MhType: dec.Code, - MhLength: dec.Length, - Version: c.Version(), - Codec: c.Type(), - } -} - -// Prefix represents all the metadata of a Cid, -// that is, the Version, the Codec, the Multihash type -// and the Multihash length. It does not contains -// any actual content information. -// NOTE: The use -1 in MhLength to mean default length is deprecated, -// use the V0Builder or V1Builder structures instead -type Prefix struct { - Version uint64 - Codec uint64 - MhType uint64 - MhLength int -} - -// Sum uses the information in a prefix to perform a multihash.Sum() -// and return a newly constructed Cid with the resulting multihash. -func (p Prefix) Sum(data []byte) (Cid, error) { - hash, err := mh.Sum(data, p.MhType, p.MhLength) - if err != nil { - return Undef, err - } - - switch p.Version { - case 0: - return NewCidV0(hash), nil - case 1: - return NewCidV1(p.Codec, hash), nil - default: - return Undef, fmt.Errorf("invalid cid version") - } -} - -// Bytes returns a byte representation of a Prefix. It looks like: -// -// -func (p Prefix) Bytes() []byte { - buf := make([]byte, 4*binary.MaxVarintLen64) - n := binary.PutUvarint(buf, p.Version) - n += binary.PutUvarint(buf[n:], p.Codec) - n += binary.PutUvarint(buf[n:], uint64(p.MhType)) - n += binary.PutUvarint(buf[n:], uint64(p.MhLength)) - return buf[:n] -} - -// PrefixFromBytes parses a Prefix-byte representation onto a -// Prefix. -func PrefixFromBytes(buf []byte) (Prefix, error) { - r := bytes.NewReader(buf) - vers, err := binary.ReadUvarint(r) - if err != nil { - return Prefix{}, err - } - - codec, err := binary.ReadUvarint(r) - if err != nil { - return Prefix{}, err - } - - mhtype, err := binary.ReadUvarint(r) - if err != nil { - return Prefix{}, err - } - - mhlen, err := binary.ReadUvarint(r) - if err != nil { - return Prefix{}, err - } - - return Prefix{ - Version: vers, - Codec: codec, - MhType: mhtype, - MhLength: int(mhlen), - }, nil -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid_test.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid_test.go deleted file mode 100644 index a6fa62bd9a..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid_test.go +++ /dev/null @@ -1,448 +0,0 @@ -package cid - -import ( - "bytes" - "encoding/json" - "fmt" - "math/rand" - "strings" - "testing" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -// Copying the "silly test" idea from -// https://github.com/multiformats/go-multihash/blob/7aa9f26a231c6f34f4e9fad52bf580fd36627285/multihash_test.go#L13 -// Makes it so changing the table accidentally has to happen twice. -var tCodecs = map[uint64]string{ - Raw: "raw", - DagProtobuf: "protobuf", - DagCBOR: "cbor", - GitRaw: "git-raw", - EthBlock: "eth-block", - EthBlockList: "eth-block-list", - EthTxTrie: "eth-tx-trie", - EthTx: "eth-tx", - EthTxReceiptTrie: "eth-tx-receipt-trie", - EthTxReceipt: "eth-tx-receipt", - EthStateTrie: "eth-state-trie", - EthAccountSnapshot: "eth-account-snapshot", - EthStorageTrie: "eth-storage-trie", - BitcoinBlock: "bitcoin-block", - BitcoinTx: "bitcoin-tx", - ZcashBlock: "zcash-block", - ZcashTx: "zcash-tx", - DecredBlock: "decred-block", - DecredTx: "decred-tx", -} - -func assertEqual(t *testing.T, a, b Cid) { - if a.Type() != b.Type() { - t.Fatal("mismatch on type") - } - - if a.Version() != b.Version() { - t.Fatal("mismatch on version") - } - - if !bytes.Equal(a.Hash(), b.Hash()) { - t.Fatal("multihash mismatch") - } -} - -func TestTable(t *testing.T) { - if len(tCodecs) != len(Codecs)-1 { - t.Errorf("Item count mismatch in the Table of Codec. Should be %d, got %d", len(tCodecs)+1, len(Codecs)) - } - - for k, v := range tCodecs { - if Codecs[v] != k { - t.Errorf("Table mismatch: 0x%x %s", k, v) - } - } -} - -// The table returns cid.DagProtobuf for "v0" -// so we test it apart -func TestTableForV0(t *testing.T) { - if Codecs["v0"] != DagProtobuf { - t.Error("Table mismatch: Codecs[\"v0\"] should resolve to DagProtobuf (0x70)") - } -} - -func TestBasicMarshaling(t *testing.T) { - h, err := mh.Sum([]byte("TEST"), mh.SHA3, 4) - if err != nil { - t.Fatal(err) - } - - cid := NewCidV1(7, h) - - data := cid.Bytes() - - out, err := Cast(data) - if err != nil { - t.Fatal(err) - } - - assertEqual(t, cid, out) - - s := cid.String() - out2, err := Decode(s) - if err != nil { - t.Fatal(err) - } - - assertEqual(t, cid, out2) -} - -func TestBasesMarshaling(t *testing.T) { - h, err := mh.Sum([]byte("TEST"), mh.SHA3, 4) - if err != nil { - t.Fatal(err) - } - - cid := NewCidV1(7, h) - - data := cid.Bytes() - - out, err := Cast(data) - if err != nil { - t.Fatal(err) - } - - assertEqual(t, cid, out) - - testBases := []mbase.Encoding{ - mbase.Base16, - mbase.Base32, - mbase.Base32hex, - mbase.Base32pad, - mbase.Base32hexPad, - mbase.Base58BTC, - mbase.Base58Flickr, - mbase.Base64pad, - mbase.Base64urlPad, - mbase.Base64url, - mbase.Base64, - } - - for _, b := range testBases { - s, err := cid.StringOfBase(b) - if err != nil { - t.Fatal(err) - } - - if s[0] != byte(b) { - t.Fatal("Invalid multibase header") - } - - out2, err := Decode(s) - if err != nil { - t.Fatal(err) - } - - assertEqual(t, cid, out2) - - encoder, err := mbase.NewEncoder(b) - if err != nil { - t.Fatal(err) - } - s2 := cid.Encode(encoder) - if s != s2 { - t.Fatalf("'%s' != '%s'", s, s2) - } - } -} - -func TestEmptyString(t *testing.T) { - _, err := Decode("") - if err == nil { - t.Fatal("shouldnt be able to parse an empty cid") - } -} - -func TestV0Handling(t *testing.T) { - old := "QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n" - - cid, err := Decode(old) - if err != nil { - t.Fatal(err) - } - - if cid.Version() != 0 { - t.Fatal("should have gotten version 0 cid") - } - - if cid.Hash().B58String() != old { - t.Fatalf("marshaling roundtrip failed: %s != %s", cid.Hash().B58String(), old) - } - - if cid.String() != old { - t.Fatal("marshaling roundtrip failed") - } - - new, err := cid.StringOfBase(mbase.Base58BTC) - if err != nil { - t.Fatal(err) - } - if new != old { - t.Fatal("StringOfBase roundtrip failed") - } - - encoder, err := mbase.NewEncoder(mbase.Base58BTC) - if err != nil { - t.Fatal(err) - } - if cid.Encode(encoder) != old { - t.Fatal("Encode roundtrip failed") - } -} - -func TestV0ErrorCases(t *testing.T) { - badb58 := "QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zIII" - _, err := Decode(badb58) - if err == nil { - t.Fatal("should have failed to decode that ref") - } -} - -func TestNewPrefixV1(t *testing.T) { - data := []byte("this is some test content") - - // Construct c1 - prefix := NewPrefixV1(DagCBOR, mh.SHA2_256) - c1, err := prefix.Sum(data) - if err != nil { - t.Fatal(err) - } - - if c1.Prefix() != prefix { - t.Fatal("prefix not preserved") - } - - // Construct c2 - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - c2 := NewCidV1(DagCBOR, hash) - - if !c1.Equals(c2) { - t.Fatal("cids mismatch") - } - if c1.Prefix() != c2.Prefix() { - t.Fatal("prefixes mismatch") - } -} - -func TestNewPrefixV0(t *testing.T) { - data := []byte("this is some test content") - - // Construct c1 - prefix := NewPrefixV0(mh.SHA2_256) - c1, err := prefix.Sum(data) - if err != nil { - t.Fatal(err) - } - - if c1.Prefix() != prefix { - t.Fatal("prefix not preserved") - } - - // Construct c2 - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - c2 := NewCidV0(hash) - - if !c1.Equals(c2) { - t.Fatal("cids mismatch") - } - if c1.Prefix() != c2.Prefix() { - t.Fatal("prefixes mismatch") - } -} - -func TestPrefixRoundtrip(t *testing.T) { - data := []byte("this is some test content") - hash, _ := mh.Sum(data, mh.SHA2_256, -1) - c := NewCidV1(DagCBOR, hash) - - pref := c.Prefix() - - c2, err := pref.Sum(data) - if err != nil { - t.Fatal(err) - } - - if !c.Equals(c2) { - t.Fatal("output didnt match original") - } - - pb := pref.Bytes() - - pref2, err := PrefixFromBytes(pb) - if err != nil { - t.Fatal(err) - } - - if pref.Version != pref2.Version || pref.Codec != pref2.Codec || - pref.MhType != pref2.MhType || pref.MhLength != pref2.MhLength { - t.Fatal("input prefix didnt match output") - } -} - -func Test16BytesVarint(t *testing.T) { - data := []byte("this is some test content") - hash, _ := mh.Sum(data, mh.SHA2_256, -1) - c := NewCidV1(1<<63, hash) - _ = c.Bytes() -} - -func TestFuzzCid(t *testing.T) { - buf := make([]byte, 128) - for i := 0; i < 200; i++ { - s := rand.Intn(128) - rand.Read(buf[:s]) - _, _ = Cast(buf[:s]) - } -} - -func TestParse(t *testing.T) { - cid, err := Parse(123) - if err == nil { - t.Fatalf("expected error from Parse()") - } - if !strings.Contains(err.Error(), "can't parse 123 as Cid") { - t.Fatalf("expected int error, got %s", err.Error()) - } - - theHash := "QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n" - h, err := mh.FromB58String(theHash) - if err != nil { - t.Fatal(err) - } - - assertions := [][]interface{}{ - []interface{}{NewCidV0(h), theHash}, - []interface{}{NewCidV0(h).Bytes(), theHash}, - []interface{}{h, theHash}, - []interface{}{theHash, theHash}, - []interface{}{"/ipfs/" + theHash, theHash}, - []interface{}{"https://ipfs.io/ipfs/" + theHash, theHash}, - []interface{}{"http://localhost:8080/ipfs/" + theHash, theHash}, - } - - assert := func(arg interface{}, expected string) error { - cid, err = Parse(arg) - if err != nil { - return err - } - if cid.Version() != 0 { - return fmt.Errorf("expected version 0, got %s", string(cid.Version())) - } - actual := cid.Hash().B58String() - if actual != expected { - return fmt.Errorf("expected hash %s, got %s", expected, actual) - } - actual = cid.String() - if actual != expected { - return fmt.Errorf("expected string %s, got %s", expected, actual) - } - return nil - } - - for _, args := range assertions { - err := assert(args[0], args[1].(string)) - if err != nil { - t.Fatal(err) - } - } -} - -func TestHexDecode(t *testing.T) { - hexcid := "f015512209d8453505bdc6f269678e16b3e56c2a2948a41f2c792617cc9611ed363c95b63" - c, err := Decode(hexcid) - if err != nil { - t.Fatal(err) - } - - if c.String() != "zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG" { - t.Fatal("hash value failed to round trip decoding from hex") - } -} - -func ExampleDecode() { - encoded := "zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG" - c, err := Decode(encoded) - if err != nil { - fmt.Printf("Error: %s", err) - return - } - - fmt.Println(c) - // Output: zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG -} - -func TestFromJson(t *testing.T) { - cval := "zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG" - jsoncid := []byte(`{"/":"` + cval + `"}`) - var c Cid - err := json.Unmarshal(jsoncid, &c) - if err != nil { - t.Fatal(err) - } - - if c.String() != cval { - t.Fatal("json parsing failed") - } -} - -func TestJsonRoundTrip(t *testing.T) { - exp, err := Decode("zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG") - if err != nil { - t.Fatal(err) - } - - // Verify it works for a *Cid. - enc, err := json.Marshal(exp) - if err != nil { - t.Fatal(err) - } - var actual Cid - err = json.Unmarshal(enc, &actual) - if !exp.Equals(actual) { - t.Fatal("cids not equal for *Cid") - } - - // Verify it works for a Cid. - enc, err = json.Marshal(exp) - if err != nil { - t.Fatal(err) - } - var actual2 Cid - err = json.Unmarshal(enc, &actual2) - if !exp.Equals(actual2) { - t.Fatal("cids not equal for Cid") - } -} - -func BenchmarkStringV1(b *testing.B) { - data := []byte("this is some test content") - hash, _ := mh.Sum(data, mh.SHA2_256, -1) - cid := NewCidV1(Raw, hash) - - b.ReportAllocs() - b.ResetTimer() - - count := 0 - for i := 0; i < b.N; i++ { - count += len(cid.String()) - } - if count != 49*b.N { - b.FailNow() - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/deprecated.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/deprecated.go deleted file mode 100644 index 5a0ba4c01f..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/deprecated.go +++ /dev/null @@ -1,28 +0,0 @@ -package cid - -import ( - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -// NewPrefixV0 returns a CIDv0 prefix with the specified multihash type. -// DEPRECATED: Use V0Builder -func NewPrefixV0(mhType uint64) Prefix { - return Prefix{ - MhType: mhType, - MhLength: mh.DefaultLengths[mhType], - Version: 0, - Codec: DagProtobuf, - } -} - -// NewPrefixV1 returns a CIDv1 prefix with the specified codec and multihash -// type. -// DEPRECATED: Use V1Builder -func NewPrefixV1(codecType uint64, mhType uint64) Prefix { - return Prefix{ - MhType: mhType, - MhLength: mh.DefaultLengths[mhType], - Version: 1, - Codec: codecType, - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid0 b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid0 deleted file mode 100644 index 56fd786c0a..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid0 +++ /dev/null @@ -1 +0,0 @@ - gD1e-D/q3~(7`8n \ No newline at end of file diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid1 b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid1 deleted file mode 100644 index e0420b6016..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/fuzz-data/corpus/cid1 +++ /dev/null @@ -1 +0,0 @@ -q -[ïh[ (ΰ[)D \ No newline at end of file diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/package.json b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/package.json deleted file mode 100644 index 7d9a6c47c3..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-cid" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-cid" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd", - "name": "go-multibase", - "version": "0.3.0" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "MIT", - "name": "go-cid", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.9.0" -} - diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/set_test.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/set_test.go deleted file mode 100644 index 7f84cda27c..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/set_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package cid - -import ( - "crypto/rand" - "errors" - "testing" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -func makeRandomCid(t *testing.T) Cid { - p := make([]byte, 256) - _, err := rand.Read(p) - if err != nil { - t.Fatal(err) - } - - h, err := mh.Sum(p, mh.SHA3, 4) - if err != nil { - t.Fatal(err) - } - - cid := NewCidV1(7, h) - - return cid -} - -func TestSet(t *testing.T) { - cid := makeRandomCid(t) - cid2 := makeRandomCid(t) - s := NewSet() - - s.Add(cid) - - if !s.Has(cid) { - t.Error("should have the CID") - } - - if s.Len() != 1 { - t.Error("should report 1 element") - } - - keys := s.Keys() - - if len(keys) != 1 || !keys[0].Equals(cid) { - t.Error("key should correspond to Cid") - } - - if s.Visit(cid) { - t.Error("visit should return false") - } - - foreach := []Cid{} - foreachF := func(c Cid) error { - foreach = append(foreach, c) - return nil - } - - if err := s.ForEach(foreachF); err != nil { - t.Error(err) - } - - if len(foreach) != 1 { - t.Error("ForEach should have visited 1 element") - } - - foreachErr := func(c Cid) error { - return errors.New("test") - } - - if err := s.ForEach(foreachErr); err == nil { - t.Error("Should have returned an error") - } - - if !s.Visit(cid2) { - t.Error("should have visited a new Cid") - } - - if s.Len() != 2 { - t.Error("len should be 2 now") - } - - s.Remove(cid2) - - if s.Len() != 1 { - t.Error("len should be 1 now") - } -} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/varint_test.go b/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/varint_test.go deleted file mode 100644 index 47bb061bf0..0000000000 --- a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/varint_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package cid - -import ( - "encoding/binary" - "testing" -) - -func TestUvarintRoundTrip(t *testing.T) { - testCases := []uint64{0, 1, 2, 127, 128, 129, 255, 256, 257, 1<<63 - 1} - for _, tc := range testCases { - buf := make([]byte, 16) - binary.PutUvarint(buf, tc) - v, l1 := uvarint(string(buf)) - _, l2 := binary.Uvarint(buf) - if tc != v { - t.Errorf("roundtrip failed expected %d but got %d", tc, v) - } - if l1 != l2 { - t.Errorf("length incorrect expected %d but got %d", l2, l1) - } - } -} diff --git a/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.pb.go b/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.pb.go deleted file mode 100644 index 0d91a49e8c..0000000000 --- a/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.pb.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: record.proto -// DO NOT EDIT! - -/* -Package record_pb is a generated protocol buffer package. - -It is generated from these files: - record.proto - -It has these top-level messages: - Record -*/ -package record_pb - -import proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Record represents a dht record that contains a value -// for a key value pair -type Record struct { - // The key that references this record - Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - // The actual value this record is storing - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - // Time the record was received, set by receiver - TimeReceived *string `protobuf:"bytes,5,opt,name=timeReceived" json:"timeReceived,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Record) Reset() { *m = Record{} } -func (m *Record) String() string { return proto.CompactTextString(m) } -func (*Record) ProtoMessage() {} - -func (m *Record) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *Record) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *Record) GetTimeReceived() string { - if m != nil && m.TimeReceived != nil { - return *m.TimeReceived - } - return "" -} - -func init() { - proto.RegisterType((*Record)(nil), "record.pb.Record") -} diff --git a/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.proto b/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.proto deleted file mode 100644 index 1e2357739d..0000000000 --- a/vendor/gx/ipfs/QmPWjVzxHeJdrjp4Jr2R2sPxBrMbBgGPWQtKwCKHHCBF7x/go-libp2p-record/pb/record.proto +++ /dev/null @@ -1,27 +0,0 @@ -// In order to re-generate the golang packages for `Record` you will need... -// 1. Protobuf binary (tested with protoc 3.0.0). - https://github.com/gogo/protobuf/releases -// 2. Gogo Protobuf (tested with gogo 0.3). - https://github.com/gogo/protobuf -// Now from `libp2p/go-libp2p-record/pb` you can run... -// `protoc --gogo_out=. record.proto` - -syntax = "proto2"; -package record.pb; - -// Record represents a dht record that contains a value -// for a key value pair -message Record { - // The key that references this record - optional string key = 1; - - // The actual value this record is storing - optional bytes value = 2; - - // Note: These fields were removed from the Record message - // hash of the authors public key - //optional string author = 3; - // A PKI signature for the key+value+author - //optional bytes signature = 4; - - // Time the record was received, set by receiver - optional string timeReceived = 5; -} diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/file_test.go b/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/file_test.go deleted file mode 100644 index 040b229270..0000000000 --- a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/file_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package util - -import "testing" - -func TestFileDoesNotExist(t *testing.T) { - t.Parallel() - if FileExists("i would be surprised to discover that this file exists") { - t.Fail() - } -} diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/package.json b/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/package.json deleted file mode 100644 index 23c31ed31f..0000000000 --- a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": {}, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-util" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "", - "name": "go-ipfs-util", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.2.8" -} - diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/time_test.go b/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/time_test.go deleted file mode 100644 index b5a98caa62..0000000000 --- a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/time_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package util - -import ( - "testing" - "time" -) - -func TestTimeFormatParseInversion(t *testing.T) { - v, err := ParseRFC3339(FormatRFC3339(time.Now())) - if err != nil { - t.Fatal(err) - } - if v.Location() != time.UTC { - t.Fatal("Time should be UTC") - } -} diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util.go b/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util.go deleted file mode 100644 index 3cb36f8497..0000000000 --- a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util.go +++ /dev/null @@ -1,158 +0,0 @@ -// Package util implements various utility functions used within ipfs -// that do not currently have a better place to live. -package util - -import ( - "errors" - "io" - "math/rand" - "os" - "path/filepath" - "runtime/debug" - "strings" - "time" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" -) - -// DefaultIpfsHash is the current default hash function used by IPFS. -const DefaultIpfsHash = mh.SHA2_256 - -// Debug is a global flag for debugging. -var Debug bool - -// ErrNotImplemented signifies a function has not been implemented yet. -var ErrNotImplemented = errors.New("Error: not implemented yet.") - -// ErrTimeout implies that a timeout has been triggered -var ErrTimeout = errors.New("Error: Call timed out.") - -// ErrSearchIncomplete implies that a search type operation didnt -// find the expected node, but did find 'a' node. -var ErrSearchIncomplete = errors.New("Error: Search Incomplete.") - -// ErrCast is returned when a cast fails AND the program should not panic. -func ErrCast() error { - debug.PrintStack() - return errCast -} - -var errCast = errors.New("cast error") - -// ExpandPathnames takes a set of paths and turns them into absolute paths -func ExpandPathnames(paths []string) ([]string, error) { - var out []string - for _, p := range paths { - abspath, err := filepath.Abs(p) - if err != nil { - return nil, err - } - out = append(out, abspath) - } - return out, nil -} - -type randGen struct { - rand.Rand -} - -// NewTimeSeededRand returns a random bytes reader -// which has been initialized with the current time. -func NewTimeSeededRand() io.Reader { - src := rand.NewSource(time.Now().UnixNano()) - return &randGen{ - Rand: *rand.New(src), - } -} - -// NewSeededRand returns a random bytes reader -// initialized with the given seed. -func NewSeededRand(seed int64) io.Reader { - src := rand.NewSource(seed) - return &randGen{ - Rand: *rand.New(src), - } -} - -func (r *randGen) Read(p []byte) (n int, err error) { - for i := 0; i < len(p); i++ { - p[i] = byte(r.Rand.Intn(255)) - } - return len(p), nil -} - -// GetenvBool is the way to check an env var as a boolean -func GetenvBool(name string) bool { - v := strings.ToLower(os.Getenv(name)) - return v == "true" || v == "t" || v == "1" -} - -// MultiErr is a util to return multiple errors -type MultiErr []error - -func (m MultiErr) Error() string { - if len(m) == 0 { - return "no errors" - } - - s := "Multiple errors: " - for i, e := range m { - if i != 0 { - s += ", " - } - s += e.Error() - } - return s -} - -// Partition splits a subject 3 parts: prefix, separator, suffix. -// The first occurrence of the separator will be matched. -// ie. Partition("Ready, steady, go!", ", ") -> ["Ready", ", ", "steady, go!"] -func Partition(subject string, sep string) (string, string, string) { - if i := strings.Index(subject, sep); i != -1 { - return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] - } - return subject, "", "" -} - -// RPartition splits a subject 3 parts: prefix, separator, suffix. -// The last occurrence of the separator will be matched. -// ie. RPartition("Ready, steady, go!", ", ") -> ["Ready, steady", ", ", "go!"] -func RPartition(subject string, sep string) (string, string, string) { - if i := strings.LastIndex(subject, sep); i != -1 { - return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] - } - return subject, "", "" -} - -// Hash is the global IPFS hash function. uses multihash SHA2_256, 256 bits -func Hash(data []byte) mh.Multihash { - h, err := mh.Sum(data, DefaultIpfsHash, -1) - if err != nil { - // this error can be safely ignored (panic) because multihash only fails - // from the selection of hash function. If the fn + length are valid, it - // won't error. - panic("multihash failed to hash using SHA2_256.") - } - return h -} - -// IsValidHash checks whether a given hash is valid (b58 decodable, len > 0) -func IsValidHash(s string) bool { - out, err := b58.Decode(s) - if err != nil { - return false - } - _, err = mh.Cast(out) - return err == nil -} - -// XOR takes two byte slices, XORs them together, returns the resulting slice. -func XOR(a, b []byte) []byte { - c := make([]byte, len(a)) - for i := 0; i < len(a); i++ { - c[i] = a[i] ^ b[i] - } - return c -} diff --git a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util_test.go b/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util_test.go deleted file mode 100644 index 70747ad902..0000000000 --- a/vendor/gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util/util_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package util - -import ( - "bytes" - "testing" -) - -func TestXOR(t *testing.T) { - cases := [][3][]byte{ - { - {0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF}, - {0x00, 0x00, 0x00}, - }, - { - {0x00, 0xFF, 0x00}, - {0xFF, 0xFF, 0xFF}, - {0xFF, 0x00, 0xFF}, - }, - { - {0x55, 0x55, 0x55}, - {0x55, 0xFF, 0xAA}, - {0x00, 0xAA, 0xFF}, - }, - } - - for _, c := range cases { - r := XOR(c[0], c[1]) - if !bytes.Equal(r, c[2]) { - t.Error("XOR failed") - } - } -} - -func BenchmarkHash256K(b *testing.B) { - buf := make([]byte, 256*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(256 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -} - -func BenchmarkHash512K(b *testing.B) { - buf := make([]byte, 512*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(512 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -} - -func BenchmarkHash1M(b *testing.B) { - buf := make([]byte, 1024*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(1024 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/io_test.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/io_test.go deleted file mode 100644 index d9ac4e5168..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/io_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package multihash - -import ( - "bytes" - "io" - "testing" -) - -type evilReader struct { - buffer []byte -} - -func (er *evilReader) Read(buf []byte) (int, error) { - n := copy(buf, er.buffer) - er.buffer = er.buffer[n:] - var err error - if len(er.buffer) == 0 { - err = io.EOF - } - return n, err -} - -func TestEvilReader(t *testing.T) { - emptyHash, err := Sum(nil, ID, 0) - if err != nil { - t.Fatal(err) - } - r := NewReader(&evilReader{emptyHash}) - h, err := r.ReadMultihash() - if err != nil { - t.Fatal(err) - } - if !bytes.Equal(h, []byte(emptyHash)) { - t.Fatal(err) - } - h, err = r.ReadMultihash() - if len([]byte(h)) > 0 || err != io.EOF { - t.Fatal("expected end of file") - } -} - -func TestReader(t *testing.T) { - - var buf bytes.Buffer - - for _, tc := range testCases { - m, err := tc.Multihash() - if err != nil { - t.Fatal(err) - } - - buf.Write([]byte(m)) - } - - r := NewReader(&buf) - - for _, tc := range testCases { - h, err := tc.Multihash() - if err != nil { - t.Fatal(err) - } - - h2, err := r.ReadMultihash() - if err != nil { - t.Error(err) - continue - } - - if !bytes.Equal(h, h2) { - t.Error("h and h2 should be equal") - } - } -} - -func TestWriter(t *testing.T) { - - var buf bytes.Buffer - w := NewWriter(&buf) - - for _, tc := range testCases { - m, err := tc.Multihash() - if err != nil { - t.Error(err) - continue - } - - if err := w.WriteMultihash(m); err != nil { - t.Error(err) - continue - } - - buf2 := make([]byte, len(m)) - if _, err := io.ReadFull(&buf, buf2); err != nil { - t.Error(err) - continue - } - - if !bytes.Equal(m, buf2) { - t.Error("m and buf2 should be equal") - } - } -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gitignore b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gitignore deleted file mode 100644 index 2826f1799c..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gitignore +++ /dev/null @@ -1 +0,0 @@ -multihash diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gobuilder.yml b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gobuilder.yml deleted file mode 100644 index d775798e97..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/.gobuilder.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -artifacts: - - LICENSE - - README.md - - install.dist.sh diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/README.md b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/README.md deleted file mode 100644 index 674eba1860..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# multihash tool - -The `multihash` tool uses `go-multihash` to hash things much like `shasum`. - -Warning: this is a **multihash** tool! Its digests follow the [multihash](https://github.com/multiformats/multihash) format. - -### Install - -- From Source: - ``` - go get github.com/multiformats/go-multihash/multihash - ``` -- Precompiled Binaries: https://gobuilder.me/github.com/multiformats/go-multihash/multihash - -### Usage - -```sh -> multihash -h -usage: ./multihash [options] [FILE] -Print or check multihash checksums. -With no FILE, or when FILE is -, read standard input. - -Options: - -a="sha2-256": one of: sha1, sha2-256, sha2-512, sha3 (shorthand) - -algorithm="sha2-256": one of: sha1, sha2-256, sha2-512, sha3 - -c="": check checksum matches (shorthand) - -check="": check checksum matches - -e="base58": one of: raw, hex, base58, base64 (shorthand) - -encoding="base58": one of: raw, hex, base58, base64 - -l=-1: checksums length in bits (truncate). -1 is default (shorthand) - -length=-1: checksums length in bits (truncate). -1 is default -``` - -### Examples - -#### Input - -```sh -# from stdin -> multihash < main.go -QmRZxt2b1FVZPNqd8hsiykDL3TdBDeTSPX9Kv46HmX4Gx8 - -# from file -> ./multihash main.go -QmRZxt2b1FVZPNqd8hsiykDL3TdBDeTSPX9Kv46HmX4Gx8 - -# from stdin "filename" -> multihash - < main.go -QmRZxt2b1FVZPNqd8hsiykDL3TdBDeTSPX9Kv46HmX4Gx8 -``` - -#### Algorithms - -```sh -> multihash -a ? -error: algorithm '?' not one of: sha1, sha2-256, sha2-512, sha3 - -> multihash -a sha1 < main.go -5drkbcqJUo6fZVvcZJeVEVWAgndvLm - -> multihash -a sha2-256 < main.go -QmcK3s36goo9v2HYcfTrDKKwxaxmJJ59etodQQFYsL5T5N - -> multihash -a sha2-512 < main.go -8VuDcW4CooyPQA8Cc4eYpwjhyDJZqu5m5ZMDFzWULYsVS8d119JaGeNWsZbZ2ZG2kPtbrMx31MidokCigaD65yUPAs - -> multihash -a sha3 < main.go -8tWDCTfAX24DYmzNixTj2ARJkqwRG736VHx5aJppmqRjhW9QT1EuTgKUmu9Pmunzq292jzPKxb2VxSsTXmjFY1HD3B -``` - -#### Encodings - -```sh -> multihash -e raw < main.go - Ϛ�����I�5 S��WG>���_��]g�����u - -> multihash -e hex < main.go -1220cf9aa2b8a38b9b49d135095390059a57473e97aceb5fcae25d67a8b6feb58275 - -> multihash -e base64 < main.go -EiDPmqK4o4ubSdE1CVOQBZpXRz6XrOtfyuJdZ6i2/rWCdQ== - -> multihash -e base58 < main.go -Qmf1QjEXDmqBm7RqHKqFGNUyhzUjnX7cmgKMrGzzPceZDQ -``` - -#### Digest Length - -```sh -# we're outputing hex (good byte alignment) to show the codes changing -# notice the multihash code (first 2 chars) differs! -> multihash -e hex -a sha2-256 -l 256 < main.go -1220cf9aa2b8a38b9b49d135095390059a57473e97aceb5fcae25d67a8b6feb58275 -> multihash -e hex -a sha2-512 -l 256 < main.go -132047a4b6c629f5545f529b0ff461dc09119969f3593186277a1cc7a8ea3560a6f1 -> multihash -e hex -a sha3 -l 256 < main.go -14206b9222a1a47939e665261bd2b5573e55e7988675223adde73c1011066ad66335 - -# notice the multihash length (next 2 chars) differs! -> multihash -e hex -a sha2-256 -l 256 < main.go -1220cf9aa2b8a38b9b49d135095390059a57473e97aceb5fcae25d67a8b6feb58275 -> multihash -e hex -a sha2-256 -l 200 < main.go -1219cf9aa2b8a38b9b49d135095390059a57473e97aceb5fcae25d -``` - -#### Verify Checksum - -```sh -> multihash -c QmRZxt2b1FVZPNqd8hsiykDL3TdBDeTSPX9Kv46HmX4Gx8 < main.go -OK checksums match (-q for no output) - -> multihash -c QmcKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa < main.go -error: computed checksum did not match (-q for no output) - -# works with other arguments too -> multihash -e hex -l 128 -c "12102ffc284a1e82bf51e567c75b2ae6edb9" < main.go -OK checksums match (-q for no output) -``` diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/install.dist.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/install.dist.sh deleted file mode 100644 index f90274f685..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/install.dist.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -bin=multihash - -# this script is currently brain dead. -# it merely tries two locations. -# in the future maybe use value of $PATH. - -binpath=/usr/local/bin -if [ -d "$binpath" ]; then - mv "$bin" "$binpath/$bin" - echo "installed $binpath/$bin" - exit 0 -fi - -binpath=/usr/bin -if [ -d "$binpath" ]; then - mv "$bin" "$binpath/$bin" - echo "installed $binpath/$bin" - exit 0 -fi diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/main.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/main.go deleted file mode 100644 index 7549c02395..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/main.go +++ /dev/null @@ -1,142 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "io" - "os" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mhopts "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts" -) - -var usage = `usage: %s [options] [FILE] -Print or check multihash checksums. -With no FILE, or when FILE is -, read standard input. - -Options: -` - -// flags -var opts *mhopts.Options -var checkRaw string -var checkMh mh.Multihash -var inputFilename string -var quiet bool -var help bool - -func init() { - flag.Usage = func() { - fmt.Fprintf(os.Stderr, usage, os.Args[0]) - flag.PrintDefaults() - } - - opts = mhopts.SetupFlags(flag.CommandLine) - - checkStr := "check checksum matches" - flag.StringVar(&checkRaw, "check", "", checkStr) - flag.StringVar(&checkRaw, "c", "", checkStr+" (shorthand)") - - helpStr := "display help message" - flag.BoolVar(&help, "help", false, helpStr) - flag.BoolVar(&help, "h", false, helpStr+" (shorthand)") - - quietStr := "quiet output (no newline on checksum, no error text)" - flag.BoolVar(&quiet, "quiet", false, quietStr) - flag.BoolVar(&quiet, "q", false, quietStr+" (shorthand)") -} - -func parseFlags(o *mhopts.Options) error { - flag.Parse() - if err := o.ParseError(); err != nil { - return err - } - - if checkRaw != "" { - var err error - checkMh, err = mhopts.Decode(o.Encoding, checkRaw) - if err != nil { - return fmt.Errorf("fail to decode check '%s': %s", checkRaw, err) - } - } - - return nil -} - -func getInput() (io.ReadCloser, error) { - args := flag.Args() - - switch { - case len(args) < 1: - inputFilename = "-" - return os.Stdin, nil - case args[0] == "-": - inputFilename = "-" - return os.Stdin, nil - default: - inputFilename = args[0] - f, err := os.Open(args[0]) - if err != nil { - return nil, fmt.Errorf("failed to open '%s': %s", args[0], err) - } - return f, nil - } -} -func printHash(o *mhopts.Options, r io.Reader) error { - h, err := o.Multihash(r) - if err != nil { - return err - } - - s, err := mhopts.Encode(o.Encoding, h) - if err != nil { - return err - } - - if quiet { - fmt.Print(s) - } else { - fmt.Println(s) - } - return nil -} - -func main() { - checkErr := func(err error) { - if err != nil { - die("error: ", err) - } - } - - err := parseFlags(opts) - checkErr(err) - - if help { - flag.Usage() - os.Exit(0) - } - - inp, err := getInput() - checkErr(err) - - if checkMh != nil { - err = opts.Check(inp, checkMh) - checkErr(err) - if !quiet { - fmt.Println("OK checksums match (-q for no output)") - } - } else { - err = printHash(opts, inp) - checkErr(err) - } - inp.Close() -} - -func die(v ...interface{}) { - if !quiet { - fmt.Fprint(os.Stderr, v...) - fmt.Fprint(os.Stderr, "\n") - } - // flag.Usage() - os.Exit(1) -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash_test.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash_test.go deleted file mode 100644 index 9305e1a479..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash_test.go +++ /dev/null @@ -1,320 +0,0 @@ -package multihash - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "fmt" - "testing" -) - -// maybe silly, but makes it so changing -// the table accidentally has to happen twice. -var tCodes = map[uint64]string{ - 0x00: "id", - 0x11: "sha1", - 0x12: "sha2-256", - 0x13: "sha2-512", - 0x14: "sha3-512", - 0x15: "sha3-384", - 0x16: "sha3-256", - 0x17: "sha3-224", - 0x56: "dbl-sha2-256", - 0x22: "murmur3", - 0x1A: "keccak-224", - 0x1B: "keccak-256", - 0x1C: "keccak-384", - 0x1D: "keccak-512", - 0x18: "shake-128", - 0x19: "shake-256", -} - -type TestCase struct { - hex string - code uint64 - name string -} - -var testCases = []TestCase{ - TestCase{"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", 0x00, "id"}, - TestCase{"", 0x00, "id"}, - TestCase{"0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33", 0x11, "sha1"}, - TestCase{"0beec7b5", 0x11, "sha1"}, - TestCase{"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", 0x12, "sha2-256"}, - TestCase{"2c26b46b", 0x12, "sha2-256"}, - TestCase{"2c26b46b68ffc68ff99b453c1d30413413", 0xb240, "blake2b-512"}, - TestCase{"243ddb9e", 0x22, "murmur3"}, - TestCase{"f00ba4", 0x1b, "keccak-256"}, - TestCase{"f84e95cb5fbd2038863ab27d3cdeac295ad2d4ab96ad1f4b070c0bf36078ef08", 0x18, "shake-128"}, - TestCase{"1af97f7818a28edfdfce5ec66dbdc7e871813816d7d585fe1f12475ded5b6502b7723b74e2ee36f2651a10a8eaca72aa9148c3c761aaceac8f6d6cc64381ed39", 0x19, "shake-256"}, - TestCase{"4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b70a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7", 0x14, "sha3-512"}, -} - -func (tc TestCase) Multihash() (Multihash, error) { - ob, err := hex.DecodeString(tc.hex) - if err != nil { - return nil, err - } - - pre := make([]byte, 2*binary.MaxVarintLen64) - spot := pre - n := binary.PutUvarint(spot, tc.code) - spot = pre[n:] - n += binary.PutUvarint(spot, uint64(len(ob))) - - nb := append(pre[:n], ob...) - return Cast(nb) -} - -func TestEncode(t *testing.T) { - for _, tc := range testCases { - ob, err := hex.DecodeString(tc.hex) - if err != nil { - t.Error(err) - continue - } - - pre := make([]byte, 2*binary.MaxVarintLen64) - spot := pre - n := binary.PutUvarint(spot, tc.code) - spot = pre[n:] - n += binary.PutUvarint(spot, uint64(len(ob))) - - nb := append(pre[:n], ob...) - - encC, err := Encode(ob, tc.code) - if err != nil { - t.Error(err) - continue - } - - if !bytes.Equal(encC, nb) { - t.Error("encoded byte mismatch: ", encC, nb) - t.Error(hex.Dump(nb)) - } - - encN, err := EncodeName(ob, tc.name) - if err != nil { - t.Error(err) - continue - } - - if !bytes.Equal(encN, nb) { - t.Error("encoded byte mismatch: ", encN, nb) - } - - h, err := tc.Multihash() - if err != nil { - t.Error(err) - } - if !bytes.Equal(h, nb) { - t.Error("Multihash func mismatch.") - } - } -} - -func ExampleEncodeName() { - // ignores errors for simplicity - don't do that at home. - buf, _ := hex.DecodeString("0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33") - mhbuf, _ := EncodeName(buf, "sha1") - mhhex := hex.EncodeToString(mhbuf) - fmt.Printf("hex: %v\n", mhhex) - - // Output: - // hex: 11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 -} - -func TestDecode(t *testing.T) { - for _, tc := range testCases { - ob, err := hex.DecodeString(tc.hex) - if err != nil { - t.Error(err) - continue - } - pre := make([]byte, 2*binary.MaxVarintLen64) - spot := pre - n := binary.PutUvarint(spot, tc.code) - spot = pre[n:] - n += binary.PutUvarint(spot, uint64(len(ob))) - - nb := append(pre[:n], ob...) - - dec, err := Decode(nb) - if err != nil { - t.Error(err) - continue - } - - if dec.Code != tc.code { - t.Error("decoded code mismatch: ", dec.Code, tc.code) - } - - if dec.Name != tc.name { - t.Error("decoded name mismatch: ", dec.Name, tc.name) - } - - if dec.Length != len(ob) { - t.Error("decoded length mismatch: ", dec.Length, len(ob)) - } - - if !bytes.Equal(dec.Digest, ob) { - t.Error("decoded byte mismatch: ", dec.Digest, ob) - } - } -} - -func TestTable(t *testing.T) { - for k, v := range tCodes { - if Codes[k] != v { - t.Error("Table mismatch: ", Codes[k], v) - } - if Names[v] != k { - t.Error("Table mismatch: ", Names[v], k) - } - } -} - -func ExampleDecode() { - // ignores errors for simplicity - don't do that at home. - buf, _ := hex.DecodeString("0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33") - mhbuf, _ := EncodeName(buf, "sha1") - o, _ := Decode(mhbuf) - mhhex := hex.EncodeToString(o.Digest) - fmt.Printf("obj: %v 0x%x %d %s\n", o.Name, o.Code, o.Length, mhhex) - - // Output: - // obj: sha1 0x11 20 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 -} - -func TestValidCode(t *testing.T) { - for i := uint64(0); i < 0xff; i++ { - _, ok := tCodes[i] - b := AppCode(i) || ok - - if ValidCode(i) != b { - t.Error("ValidCode incorrect for: ", i) - } - } -} - -func TestAppCode(t *testing.T) { - for i := uint64(0); i < 0xff; i++ { - b := i >= 0 && i < 0x10 - if AppCode(i) != b { - t.Error("AppCode incorrect for: ", i) - } - } -} - -func TestCast(t *testing.T) { - for _, tc := range testCases { - ob, err := hex.DecodeString(tc.hex) - if err != nil { - t.Error(err) - continue - } - - pre := make([]byte, 2*binary.MaxVarintLen64) - spot := pre - n := binary.PutUvarint(spot, tc.code) - spot = pre[n:] - n += binary.PutUvarint(spot, uint64(len(ob))) - - nb := append(pre[:n], ob...) - - if _, err := Cast(nb); err != nil { - t.Error(err) - continue - } - - if _, err = Cast(ob); err == nil { - t.Error("cast failed to detect non-multihash") - continue - } - } -} - -func TestHex(t *testing.T) { - for _, tc := range testCases { - ob, err := hex.DecodeString(tc.hex) - if err != nil { - t.Error(err) - continue - } - - pre := make([]byte, 2*binary.MaxVarintLen64) - spot := pre - n := binary.PutUvarint(spot, tc.code) - spot = pre[n:] - n += binary.PutUvarint(spot, uint64(len(ob))) - - nb := append(pre[:n], ob...) - - hs := hex.EncodeToString(nb) - mh, err := FromHexString(hs) - if err != nil { - t.Error(err) - continue - } - - if !bytes.Equal(mh, nb) { - t.Error("FromHexString failed", nb, mh) - continue - } - - if mh.HexString() != hs { - t.Error("Multihash.HexString failed", hs, mh.HexString()) - continue - } - } -} -func TestDecodeErrorInvalid(t *testing.T) { - _, err := FromB58String("/ipfs/QmQTw94j68Dgakgtfd45bG3TZG6CAfc427UVRH4mugg4q4") - if err != ErrInvalidMultihash { - t.Fatalf("expected: %s, got %s\n", ErrInvalidMultihash, err) - } -} - -func TestBadVarint(t *testing.T) { - _, err := Cast([]byte{129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 1}) - if err != ErrVarintTooLong { - t.Error("expected error from varint longer than 64bits, got: ", err) - } - _, err = Cast([]byte{128, 128, 128}) - if err != ErrVarintBufferShort { - t.Error("expected error from cut-off varint, got: ", err) - } -} - -func BenchmarkEncode(b *testing.B) { - tc := testCases[0] - ob, err := hex.DecodeString(tc.hex) - if err != nil { - b.Error(err) - return - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - Encode(ob, tc.code) - } -} - -func BenchmarkDecode(b *testing.B) { - tc := testCases[0] - ob, err := hex.DecodeString(tc.hex) - if err != nil { - b.Error(err) - return - } - - pre := make([]byte, 2) - pre[0] = byte(uint8(tc.code)) - pre[1] = byte(uint8(len(ob))) - nb := append(pre, ob...) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - Decode(nb) - } -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/README.md b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/README.md deleted file mode 100644 index ada8023b8b..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# mhopts - multihash options for writing commands - -`mhopts` is a small package that helps to write commands which -may take multihash options. Check it out in action: - -- [multihash](../multihash) -- [hashpipe](https://github.com/jbenet/go-hashpipe) - -Godoc: [https://godoc.org/github.com/multiformats/go-multihash/opts](https://godoc.org/github.com/multiformats/go-multihash/opts) diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/coding.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/coding.go deleted file mode 100644 index 5b5496fbf8..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/coding.go +++ /dev/null @@ -1,40 +0,0 @@ -package opts - -import ( - "encoding/base64" - "encoding/hex" - "fmt" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - base58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" -) - -func Decode(encoding, digest string) (mh.Multihash, error) { - switch encoding { - case "raw": - return mh.Cast([]byte(digest)) - case "hex": - return hex.DecodeString(digest) - case "base58": - return base58.Decode(digest) - case "base64": - return base64.StdEncoding.DecodeString(digest) - default: - return nil, fmt.Errorf("unknown encoding: %s", encoding) - } -} - -func Encode(encoding string, hash mh.Multihash) (string, error) { - switch encoding { - case "raw": - return string(hash), nil - case "hex": - return hex.EncodeToString(hash), nil - case "base58": - return base58.Encode(hash), nil - case "base64": - return base64.StdEncoding.EncodeToString(hash), nil - default: - return "", fmt.Errorf("unknown encoding: %s", encoding) - } -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/opts.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/opts.go deleted file mode 100644 index 740d9e861b..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/opts/opts.go +++ /dev/null @@ -1,131 +0,0 @@ -// Package opts helps to write commands which may take multihash -// options. -package opts - -import ( - "bytes" - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "strings" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -// package errors -var ( - ErrMatch = errors.New("multihash checksums did not match") -) - -// Options is a struct used to parse cli flags. -type Options struct { - Encoding string - Algorithm string - AlgorithmCode uint64 - Length int - - fs *flag.FlagSet -} - -// FlagValues are the values the various option flags can take. -var FlagValues = struct { - Encodings []string - Algorithms []string -}{ - Encodings: []string{"raw", "hex", "base58", "base64"}, - Algorithms: []string{"sha1", "sha2-256", "sha2-512", "sha3"}, -} - -// SetupFlags adds multihash related options to given flagset. -func SetupFlags(f *flag.FlagSet) *Options { - // TODO: add arg for adding opt prefix and/or overriding opts - - o := new(Options) - algoStr := "one of: " + strings.Join(FlagValues.Algorithms, ", ") - f.StringVar(&o.Algorithm, "algorithm", "sha2-256", algoStr) - f.StringVar(&o.Algorithm, "a", "sha2-256", algoStr+" (shorthand)") - - encStr := "one of: " + strings.Join(FlagValues.Encodings, ", ") - f.StringVar(&o.Encoding, "encoding", "base58", encStr) - f.StringVar(&o.Encoding, "e", "base58", encStr+" (shorthand)") - - lengthStr := "checksums length in bits (truncate). -1 is default" - f.IntVar(&o.Length, "length", -1, lengthStr) - f.IntVar(&o.Length, "l", -1, lengthStr+" (shorthand)") - return o -} - -// Parse parses the values of flags from given argument slice. -// It is equivalent to flags.Parse(args) -func (o *Options) Parse(args []string) error { - if err := o.fs.Parse(args); err != nil { - return err - } - return o.ParseError() -} - -// ParseError checks the parsed options for errors. -func (o *Options) ParseError() error { - if !strIn(o.Encoding, FlagValues.Encodings) { - return fmt.Errorf("encoding '%s' not %s", o.Encoding, FlagValues.Encodings) - } - - if !strIn(o.Algorithm, FlagValues.Algorithms) { - return fmt.Errorf("algorithm '%s' not %s", o.Algorithm, FlagValues.Algorithms) - } - - var found bool - o.AlgorithmCode, found = mh.Names[o.Algorithm] - if !found { - return fmt.Errorf("algorithm '%s' not found (lib error, pls report).", o.Algorithm) - } - - if o.Length >= 0 { - if o.Length%8 != 0 { - return fmt.Errorf("length must be multiple of 8") - } - o.Length = o.Length / 8 - - if o.Length > mh.DefaultLengths[o.AlgorithmCode] { - o.Length = mh.DefaultLengths[o.AlgorithmCode] - } - } - return nil -} - -// strIn checks wither string a is in set. -func strIn(a string, set []string) bool { - for _, s := range set { - if s == a { - return true - } - } - return false -} - -// Check reads all the data in r, calculates its multihash, -// and checks it matches h1 -func (o *Options) Check(r io.Reader, h1 mh.Multihash) error { - h2, err := o.Multihash(r) - if err != nil { - return err - } - - if !bytes.Equal(h1, h2) { - return fmt.Errorf("computed checksum did not match") - } - - return nil -} - -// Multihash reads all the data in r and calculates its multihash. -func (o *Options) Multihash(r io.Reader) (mh.Multihash, error) { - b, err := ioutil.ReadAll(r) - if err != nil { - return nil, err - } - - return mh.Sum(b, o.AlgorithmCode, o.Length) -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/package.json b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/package.json deleted file mode 100644 index 279ecd4c61..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "author": "multiformats", - "bugs": { - "url": "https://github.com/multiformats/go-multihash/issues" - }, - "gx": { - "dvcsimport": "github.com/multiformats/go-multihash" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N", - "name": "go-crypto", - "version": "0.2.1" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - }, - { - "author": "whyrusleeping", - "hash": "QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi", - "name": "keccakpg", - "version": "0.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx", - "name": "murmur3", - "version": "0.0.0" - }, - { - "author": "minio", - "hash": "QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU", - "name": "sha256-simd", - "version": "0.1.1" - }, - { - "author": "minio", - "hash": "QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx", - "name": "blake2b-simd", - "version": "0.1.1" - } - ], - "gxVersion": "0.9.0", - "language": "go", - "license": "MIT", - "name": "go-multihash", - "releaseCmd": "git commit -a -m \"gx release $VERSION\"", - "version": "1.0.8" -} - diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum_test.go b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum_test.go deleted file mode 100644 index 9260626e01..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum_test.go +++ /dev/null @@ -1,152 +0,0 @@ -package multihash - -import ( - "bytes" - "encoding/hex" - "fmt" - "runtime" - "testing" -) - -type SumTestCase struct { - code uint64 - length int - input string - hex string -} - -var sumTestCases = []SumTestCase{ - SumTestCase{ID, 3, "foo", "0003666f6f"}, - SumTestCase{ID, -1, "foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo", "0030666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f666f6f"}, - SumTestCase{SHA1, -1, "foo", "11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33"}, - SumTestCase{SHA1, 10, "foo", "110a0beec7b5ea3f0fdbc95d"}, - SumTestCase{SHA2_256, -1, "foo", "12202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"}, - SumTestCase{SHA2_256, 16, "foo", "12102c26b46b68ffc68ff99b453c1d304134"}, - SumTestCase{SHA2_512, -1, "foo", "1340f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7"}, - SumTestCase{SHA2_512, 32, "foo", "1320f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc663832"}, - SumTestCase{SHA3, 32, "foo", "14204bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c"}, - SumTestCase{SHA3_512, 16, "foo", "14104bca2b137edc580fe50a88983ef860eb"}, - SumTestCase{SHA3_512, -1, "foo", "14404bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b70a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7"}, - SumTestCase{SHA3_224, -1, "beep boop", "171c0da73a89549018df311c0a63250e008f7be357f93ba4e582aaea32b8"}, - SumTestCase{SHA3_224, 16, "beep boop", "17100da73a89549018df311c0a63250e008f"}, - SumTestCase{SHA3_256, -1, "beep boop", "1620828705da60284b39de02e3599d1f39e6c1df001f5dbf63c9ec2d2c91a95a427f"}, - SumTestCase{SHA3_256, 16, "beep boop", "1610828705da60284b39de02e3599d1f39e6"}, - SumTestCase{SHA3_384, -1, "beep boop", "153075a9cff1bcfbe8a7025aa225dd558fb002769d4bf3b67d2aaf180459172208bea989804aefccf060b583e629e5f41e8d"}, - SumTestCase{SHA3_384, 16, "beep boop", "151075a9cff1bcfbe8a7025aa225dd558fb0"}, - SumTestCase{DBL_SHA2_256, 32, "foo", "5620c7ade88fc7a21498a6a5e5c385e1f68bed822b72aa63c4a9a48a02c2466ee29e"}, - SumTestCase{BLAKE2B_MAX, -1, "foo", "c0e40240ca002330e69d3e6b84a46a56a6533fd79d51d97a3bb7cad6c2ff43b354185d6dc1e723fb3db4ae0737e120378424c714bb982d9dc5bbd7a0ab318240ddd18f8d"}, - SumTestCase{BLAKE2B_MAX, 64, "foo", "c0e40240ca002330e69d3e6b84a46a56a6533fd79d51d97a3bb7cad6c2ff43b354185d6dc1e723fb3db4ae0737e120378424c714bb982d9dc5bbd7a0ab318240ddd18f8d"}, - SumTestCase{BLAKE2B_MAX - 32, -1, "foo", "a0e40220b8fe9f7f6255a6fa08f668ab632a8d081ad87983c77cd274e48ce450f0b349fd"}, - SumTestCase{BLAKE2B_MAX - 32, 32, "foo", "a0e40220b8fe9f7f6255a6fa08f668ab632a8d081ad87983c77cd274e48ce450f0b349fd"}, - SumTestCase{BLAKE2B_MAX - 19, -1, "foo", "ade4022dca82ab956d5885e3f5db10cca94182f01a6ca2c47f9f4228497dcc9f4a0121c725468b852a71ec21fcbeb725df"}, - SumTestCase{BLAKE2B_MAX - 19, 45, "foo", "ade4022dca82ab956d5885e3f5db10cca94182f01a6ca2c47f9f4228497dcc9f4a0121c725468b852a71ec21fcbeb725df"}, - SumTestCase{BLAKE2B_MAX - 16, -1, "foo", "b0e40230e629ee880953d32c8877e479e3b4cb0a4c9d5805e2b34c675b5a5863c4ad7d64bb2a9b8257fac9d82d289b3d39eb9cc2"}, - SumTestCase{BLAKE2B_MAX - 16, 48, "foo", "b0e40230e629ee880953d32c8877e479e3b4cb0a4c9d5805e2b34c675b5a5863c4ad7d64bb2a9b8257fac9d82d289b3d39eb9cc2"}, - SumTestCase{BLAKE2B_MIN + 19, -1, "foo", "94e40214983ceba2afea8694cc933336b27b907f90c53a88"}, - SumTestCase{BLAKE2B_MIN + 19, 20, "foo", "94e40214983ceba2afea8694cc933336b27b907f90c53a88"}, - SumTestCase{BLAKE2B_MIN, -1, "foo", "81e4020152"}, - SumTestCase{BLAKE2B_MIN, 1, "foo", "81e4020152"}, - SumTestCase{BLAKE2S_MAX, 32, "foo", "e0e4022008d6cad88075de8f192db097573d0e829411cd91eb6ec65e8fc16c017edfdb74"}, - SumTestCase{MURMUR3, 4, "beep boop", "2204243ddb9e"}, - SumTestCase{KECCAK_224, -1, "beep boop", "1a1c2bd72cde2f75e523512999eb7639f17b699efe29bec342f5a0270896"}, - SumTestCase{KECCAK_256, 32, "foo", "1b2041b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d"}, - SumTestCase{KECCAK_384, -1, "beep boop", "1c300e2fcca40e861fc425a2503a65f4a4befab7be7f193e57654ca3713e85262b035e54d5ade93f9632b810ab88b04f7d84"}, - SumTestCase{KECCAK_512, -1, "beep boop", "1d40e161c54798f78eba3404ac5e7e12d27555b7b810e7fd0db3f25ffa0c785c438331b0fbb6156215f69edf403c642e5280f4521da9bd767296ec81f05100852e78"}, - SumTestCase{SHAKE_128, 32, "foo", "1820f84e95cb5fbd2038863ab27d3cdeac295ad2d4ab96ad1f4b070c0bf36078ef08"}, - SumTestCase{SHAKE_256, 64, "foo", "19401af97f7818a28edfdfce5ec66dbdc7e871813816d7d585fe1f12475ded5b6502b7723b74e2ee36f2651a10a8eaca72aa9148c3c761aaceac8f6d6cc64381ed39"}, -} - -func TestSum(t *testing.T) { - - for _, tc := range sumTestCases { - - m1, err := FromHexString(tc.hex) - if err != nil { - t.Error(err) - continue - } - - m2, err := Sum([]byte(tc.input), tc.code, tc.length) - if err != nil { - t.Error(tc.code, "sum failed.", err) - continue - } - - if !bytes.Equal(m1, m2) { - t.Error(tc.code, Codes[tc.code], "sum failed.", m1, m2) - t.Error(hex.EncodeToString(m2)) - } - - s1 := m1.HexString() - if s1 != tc.hex { - t.Error("hex strings not the same") - } - - s2 := m1.B58String() - m3, err := FromB58String(s2) - if err != nil { - t.Error("failed to decode b58") - } else if !bytes.Equal(m3, m1) { - t.Error("b58 failing bytes") - } else if s2 != m3.B58String() { - t.Error("b58 failing string") - } - } -} - -func BenchmarkSum(b *testing.B) { - tc := sumTestCases[0] - for i := 0; i < b.N; i++ { - Sum([]byte(tc.input), tc.code, tc.length) - } -} - -func BenchmarkBlake2B(b *testing.B) { - sizes := []uint64{128, 129, 130, 255, 256, 257, 386, 512} - for _, s := range sizes { - func(si uint64) { - b.Run(fmt.Sprintf("blake2b-%d", s), func(b *testing.B) { - arr := []byte("test data for some hashing, this is broken") - b.ResetTimer() - b.ReportAllocs() - for i := 0; i < b.N; i++ { - m, err := Sum(arr, BLAKE2B_MIN+si/8-1, -1) - if err != nil { - b.Fatal(err) - } - runtime.KeepAlive(m) - } - }) - }(s) - } -} - -// Test that the identity hash function checks -// its `length` arguemnt for values that are -// different to its `data` length. -func TestSmallerLengthHashID(t *testing.T) { - - data := []byte("Identity hash input data.") - dataLength := len(data) - - // Normal case: `length == len(data)`. - _, err := sumID(data, dataLength) - if err != nil { - t.Fatal(err) - } - - // Unconstrained length (-1): also allowed. - _, err = sumID(data, -1) - if err != nil { - t.Fatal(err) - } - - // Any other variation of those two scenarios should fail. - for l := (dataLength - 1); l >= 0; l-- { - _, err = sumID(data, l) - if err == nil { - t.Fatal(fmt.Sprintf("identity hash of length %d smaller than data length %d didn't fail", - l, dataLength)) - } - } -} diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/.gitignore b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/.gitignore deleted file mode 100644 index 27f75ed665..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bin/multihash diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/Makefile b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/Makefile deleted file mode 100644 index e9660d0cab..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -BINS = bin/multihash -MULTIHASH_ROOT = ../ -MULTIHASH_CMD = ../multihash - -all: deps - -deps: bins - -clean: - rm $(BINS) - -bins: $(BINS) - -bin/multihash: $(MULTIHASH_ROOT)/**/*.go - go build -o bin/multihash $(MULTIHASH_CMD) - -test: test_expensive - -test_expensive: - cd sharness && make TEST_EXPENSIVE=1 - -test_cheap: - cd sharness && make - -.PHONY: all clean diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/.gitignore b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/.gitignore deleted file mode 100644 index 5e59048ac5..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -lib/sharness/ -test-results/ -trash directory.*.sh/ diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/Makefile b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/Makefile deleted file mode 100644 index ad806a07d0..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Run tests -# -# Copyright (c) 2014 Christian Couder -# MIT Licensed; see the LICENSE file in this repository. -# - -# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests. - -T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) -BINS = bin/multihash -SHARNESS = lib/sharness/sharness.sh - -all: clean deps $(T) aggregate - -clean: - @echo "*** $@ ***" - -rm -rf test-results - -$(T): - @echo "*** $@ ***" - ./$@ - -aggregate: - @echo "*** $@ ***" - lib/test-aggregate-results.sh - -deps: $(SHARNESS) $(BINS) - -$(SHARNESS): - @echo "*** installing $@ ***" - lib/install-sharness.sh - -bin/%: - @echo "*** installing $@ ***" - cd .. && make $@ - -.PHONY: all clean $(T) aggregate diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/bin b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/bin deleted file mode 120000 index 19f285ac7c..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/bin +++ /dev/null @@ -1 +0,0 @@ -../bin \ No newline at end of file diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/install-sharness.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/install-sharness.sh deleted file mode 100644 index d573c4069d..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/install-sharness.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# install sharness.sh -# -# Copyright (c) 2014 Juan Batiz-Benet -# MIT Licensed; see the LICENSE file in this repository. -# - -# settings -version=50229a79ba22b2f13ccd82451d86570fecbd194c -urlprefix=https://github.com/mlafeldt/sharness.git -clonedir=lib -sharnessdir=sharness - -die() { - echo >&2 "$@" - exit 1 -} - -mkdir -p "$clonedir" || die "Could not create '$clonedir' directory" -cd "$clonedir" || die "Could not cd into '$clonedir' directory" - -git clone "$urlprefix" || die "Could not clone '$urlprefix'" -cd "$sharnessdir" || die "Could not cd into '$sharnessdir' directory" -git checkout "$version" || die "Could not checkout '$version'" - -exit 0 diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-aggregate-results.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-aggregate-results.sh deleted file mode 100644 index c2ff76ca1d..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-aggregate-results.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Script to aggregate results using Sharness -# -# Copyright (c) 2014 Christian Couder -# MIT Licensed; see the LICENSE file in this repository. -# - -SHARNESS_AGGREGATE="lib/sharness/aggregate-results.sh" - -test -f "$SHARNESS_AGGREGATE" || { - echo >&2 "Cannot find: $SHARNESS_AGGREGATE" - echo >&2 "Please check Sharness installation." - exit 1 -} - -ls test-results/t*-*.sh.*.counts | "$SHARNESS_AGGREGATE" diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-lib.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-lib.sh deleted file mode 100644 index 988164ab27..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/lib/test-lib.sh +++ /dev/null @@ -1,43 +0,0 @@ -# Test framework for go-ipfs -# -# Copyright (c) 2014 Christian Couder -# MIT Licensed; see the LICENSE file in this repository. -# -# We are using sharness (https://github.com/mlafeldt/sharness) -# which was extracted from the Git test framework. - -# Use the multihash tool to test against - -# Add current directory to path, for multihash tool. -PATH=$(pwd)/bin:${PATH} - -# Set sharness verbosity. we set the env var directly as -# it's too late to pass in --verbose, and --verbose is harder -# to pass through in some cases. -test "$TEST_VERBOSE" = 1 && verbose=t - -# assert the `multihash` we're using is the right one. -if test `which multihash` != $(pwd)/bin/multihash; then - echo >&2 "Cannot find the tests' local multihash tool." - echo >&2 "Please check test and multihash tool installation." - exit 1 -fi - -SHARNESS_LIB="lib/sharness/sharness.sh" - -. "$SHARNESS_LIB" || { - echo >&2 "Cannot source: $SHARNESS_LIB" - echo >&2 "Please check Sharness installation." - exit 1 -} - -# Please put go-multihash specific shell functions below - -for hashbin in sha1sum shasum; do - if type "$hashbin"; then - export SHASUMBIN="$hashbin" && - test_set_prereq SHASUM && - break - fi -done - diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0010-basics.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0010-basics.sh deleted file mode 100644 index 7fc4681327..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0010-basics.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2015 Christian Couder -# MIT Licensed; see the LICENSE file in this repository. -# - -test_description="Basic tests" - -. lib/test-lib.sh - -test_expect_success "current dir is writable" ' - echo "It works!" >test.txt -' - -test_expect_success "multihash is available" ' - type multihash -' - -test_expect_success "multihash help output looks good" ' - multihash -h 2>help.txt && - egrep -i "^usage:" help.txt >/dev/null && - egrep -i "multihash .*options.*file" help.txt >/dev/null -' - -test_done diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0020-sha1.sh b/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0020-sha1.sh deleted file mode 100644 index a5be58ba5f..0000000000 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/test/sharness/t0020-sha1.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2015 Christian Couder -# MIT Licensed; see the LICENSE file in this repository. -# - -test_description="sha1 tests" - -. lib/test-lib.sh - -test_expect_success "setup sha1 tests" ' - echo "Hash me!" >hash_me.txt && - SHA1=bc6f2c3cd945bc754789e50b2f68deee2f421810 && - echo "1114$SHA1" >actual -' - -test_expect_success "'multihash -a=sha1 -e=hex' works" ' - multihash -a=sha1 -e=hex hash_me.txt >expected -' - -test_expect_success "'multihash -a=sha1 -e=hex' output looks good" ' - test_cmp expected actual -' - -test_expect_success SHASUM "check hash using shasum" ' - echo "$SHA1 hash_me.txt" >actual && - $SHASUMBIN hash_me.txt >expected && - test_cmp expected actual -' - -test_done diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/.travis.yml b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/.travis.yml deleted file mode 100644 index 1985a1da72..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -env: - - IPFS_REUSEPORT=false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/Makefile b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/Makefile deleted file mode 100644 index d6680bd022..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -export IPFS_API ?= v04x.ipfs.io - -gx: - go get -u github.com/whyrusleeping/gx - go get -u github.com/whyrusleeping/gx-go - -deps: gx - gx --verbose install --global - gx-go rewrite - -publish: - gx-go rewrite --undo diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht.go deleted file mode 100644 index 9c38e60d26..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht.go +++ /dev/null @@ -1,394 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after kademlia with S/Kademlia modifications. -package dht - -import ( - "bytes" - "context" - "errors" - "fmt" - "sync" - "time" - - opts "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts" - pb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - providers "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/providers" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - recpb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var log = logging.Logger("dht") - -// NumBootstrapQueries defines the number of random dht queries to do to -// collect members of the routing table. -const NumBootstrapQueries = 5 - -// IpfsDHT is an implementation of Kademlia with S/Kademlia modifications. -// It is used to implement the base IpfsRouting module. -type IpfsDHT struct { - host host.Host // the network services we need - self peer.ID // Local peer (yourself) - peerstore pstore.Peerstore // Peer Registry - - datastore ds.Datastore // Local data - - routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes - providers *providers.ProviderManager - - birth time.Time // When this peer started up - - Validator record.Validator - - ctx context.Context - proc goprocess.Process - - strmap map[peer.ID]*messageSender - smlk sync.Mutex - - plk sync.Mutex - - protocols []protocol.ID // DHT protocols - - // OpenBazaar: this chan is added which is closed when the bootstrap finished - // this is used to flag ob-go that the DHT is ready for use. - BootstrapChan chan struct{} -} - -// New creates a new DHT with the specified host and options. -func New(ctx context.Context, h host.Host, options ...opts.Option) (*IpfsDHT, error) { - var cfg opts.Options - if err := cfg.Apply(append([]opts.Option{opts.Defaults}, options...)...); err != nil { - return nil, err - } - dht := makeDHT(ctx, h, cfg.Datastore, cfg.Protocols) - - // register for network notifs. - dht.host.Network().Notify((*netNotifiee)(dht)) - - dht.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { - // remove ourselves from network notifs. - dht.host.Network().StopNotify((*netNotifiee)(dht)) - return nil - }) - - dht.proc.AddChild(dht.providers.Process()) - dht.Validator = cfg.Validator - - if !cfg.Client { - for _, p := range cfg.Protocols { - h.SetStreamHandler(p, dht.handleNewStream) - } - } - dht.BootstrapChan = make(chan struct{}) - return dht, nil -} - -// NewDHT creates a new DHT object with the given peer as the 'local' host. -// IpfsDHT's initialized with this function will respond to DHT requests, -// whereas IpfsDHT's initialized with NewDHTClient will not. -func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht, err := New(ctx, h, opts.Datastore(dstore)) - if err != nil { - panic(err) - } - return dht -} - -// NewDHTClient creates a new DHT object with the given peer as the 'local' -// host. IpfsDHT clients initialized with this function will not respond to DHT -// requests. If you need a peer to respond to DHT requests, use NewDHT instead. -// NewDHTClient creates a new DHT object with the given peer as the 'local' host -func NewDHTClient(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht, err := New(ctx, h, opts.Datastore(dstore), opts.Client(true)) - if err != nil { - panic(err) - } - return dht -} - -func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching, protocols []protocol.ID) *IpfsDHT { - rt := kb.NewRoutingTable(KValue, kb.ConvertPeerID(h.ID()), time.Minute, h.Peerstore()) - - cmgr := h.ConnManager() - rt.PeerAdded = func(p peer.ID) { - cmgr.TagPeer(p, "kbucket", 5) - } - rt.PeerRemoved = func(p peer.ID) { - cmgr.UntagPeer(p, "kbucket") - } - - return &IpfsDHT{ - datastore: dstore, - self: h.ID(), - peerstore: h.Peerstore(), - host: h, - strmap: make(map[peer.ID]*messageSender), - ctx: ctx, - providers: providers.NewProviderManager(ctx, h.ID(), dstore), - birth: time.Now(), - routingTable: rt, - protocols: protocols, - } -} - -// putValueToPeer stores the given key/value pair at the peer 'p' -func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, rec *recpb.Record) error { - - pmes := pb.NewMessage(pb.Message_PUT_VALUE, rec.Key, 0) - pmes.Record = rec - rpmes, err := dht.sendRequest(ctx, p, pmes) - if err != nil { - log.Debugf("putValueToPeer: %v. (peer: %s, key: %s)", err, p.Pretty(), loggableKey(string(rec.Key))) - return err - } - - if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { - log.Warningf("putValueToPeer: value not put correctly. (%v != %v)", pmes, rpmes) - return errors.New("value not put correctly") - } - - return nil -} - -var errInvalidRecord = errors.New("received invalid record") - -// getValueOrPeers queries a particular peer p for the value for -// key. It returns either the value or a list of closer peers. -// NOTE: It will update the dht's peerstore with any new addresses -// it finds for the given peer. -func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID, key string) (*recpb.Record, []*pstore.PeerInfo, error) { - - pmes, err := dht.getValueSingle(ctx, p, key) - if err != nil { - return nil, nil, err - } - - // Perhaps we were given closer peers - peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) - - if record := pmes.GetRecord(); record != nil { - // Success! We were given the value - log.Debug("getValueOrPeers: got value") - - // make sure record is valid. - err = dht.Validator.Validate(string(record.GetKey()), record.GetValue()) - if err != nil { - log.Info("Received invalid record! (discarded)") - // return a sentinal to signify an invalid record was received - err = errInvalidRecord - record = new(recpb.Record) - } - return record, peers, err - } - - if len(peers) > 0 { - log.Debug("getValueOrPeers: peers") - return nil, peers, nil - } - - log.Warning("getValueOrPeers: routing.ErrNotFound") - return nil, nil, routing.ErrNotFound -} - -// getValueSingle simply performs the get value RPC with the given parameters -func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, key string) (*pb.Message, error) { - meta := logging.LoggableMap{ - "key": key, - "peer": p, - } - - eip := log.EventBegin(ctx, "getValueSingle", meta) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_VALUE, []byte(key), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("getValueSingle: read timeout %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// getLocal attempts to retrieve the value from the datastore -func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) { - log.Debugf("getLocal %s", key) - rec, err := dht.getRecordFromDatastore(mkDsKey(key)) - if err != nil { - log.Warningf("getLocal: %s", err) - return nil, err - } - - // Double check the key. Can't hurt. - if rec != nil && string(rec.GetKey()) != key { - log.Errorf("BUG getLocal: found a DHT record that didn't match it's key: %s != %s", rec.GetKey(), key) - return nil, nil - - } - return rec, nil -} - -// getOwnPrivateKey attempts to load the local peers private -// key from the peerstore. -func (dht *IpfsDHT) getOwnPrivateKey() (ci.PrivKey, error) { - sk := dht.peerstore.PrivKey(dht.self) - if sk == nil { - log.Warningf("%s dht cannot get own private key!", dht.self) - return nil, fmt.Errorf("cannot get private key to sign record!") - } - return sk, nil -} - -// putLocal stores the key value pair in the datastore -func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error { - log.Debugf("putLocal: %v %v", key, rec) - data, err := proto.Marshal(rec) - if err != nil { - log.Warningf("putLocal: %s", err) - return err - } - - return dht.datastore.Put(mkDsKey(key), data) -} - -// Update signals the routingTable to Update its last-seen status -// on the given peer. -func (dht *IpfsDHT) Update(ctx context.Context, p peer.ID) { - log.Event(ctx, "updatePeer", p) - dht.routingTable.Update(p) -} - -// FindLocal looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in. -func (dht *IpfsDHT) FindLocal(id peer.ID) pstore.PeerInfo { - switch dht.host.Network().Connectedness(id) { - case inet.Connected, inet.CanConnect: - return dht.peerstore.PeerInfo(id) - default: - return pstore.PeerInfo{} - } -} - -// findPeerSingle asks peer 'p' if they know where the peer with id 'id' is -func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findPeerSingle", - logging.LoggableMap{ - "peer": p, - "target": id, - }) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_FIND_NODE, []byte(id), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), id) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key cid.Cid) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findProvidersSingle", p, key) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_PROVIDERS, key.Bytes(), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// nearestPeersToQuery returns the routing tables closest peers. -func (dht *IpfsDHT) nearestPeersToQuery(pmes *pb.Message, count int) []peer.ID { - closer := dht.routingTable.NearestPeers(kb.ConvertKey(string(pmes.GetKey())), count) - return closer -} - -// betterPeerToQuery returns nearestPeersToQuery, but iff closer than self. -func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) []peer.ID { - closer := dht.nearestPeersToQuery(pmes, count) - - // no node? nil - if closer == nil { - log.Warning("betterPeersToQuery: no closer peers to send:", p) - return nil - } - - filtered := make([]peer.ID, 0, len(closer)) - for _, clp := range closer { - - // == to self? thats bad - if clp == dht.self { - log.Error("BUG betterPeersToQuery: attempted to return self! this shouldn't happen...") - return nil - } - // Dont send a peer back themselves - if clp == p { - continue - } - - filtered = append(filtered, clp) - } - - // ok seems like closer nodes - return filtered -} - -// Context return dht's context -func (dht *IpfsDHT) Context() context.Context { - return dht.ctx -} - -// Process return dht's process -func (dht *IpfsDHT) Process() goprocess.Process { - return dht.proc -} - -// Close calls Process Close -func (dht *IpfsDHT) Close() error { - return dht.proc.Close() -} - -func (dht *IpfsDHT) protocolStrs() []string { - pstrs := make([]string, len(dht.protocols)) - for idx, proto := range dht.protocols { - pstrs[idx] = string(proto) - } - - return pstrs -} - -func mkDsKey(s string) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_bootstrap.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_bootstrap.go deleted file mode 100644 index b9be966f82..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_bootstrap.go +++ /dev/null @@ -1,189 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after Kademlia with S/Kademlia modifications. -package dht - -import ( - "context" - "crypto/rand" - "fmt" - "sync" - "time" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" -) - -// BootstrapConfig specifies parameters used bootstrapping the DHT. -// -// Note there is a tradeoff between the bootstrap period and the -// number of queries. We could support a higher period with less -// queries. -type BootstrapConfig struct { - Queries int // how many queries to run per period - Period time.Duration // how often to run periodi cbootstrap. - Timeout time.Duration // how long to wait for a bootstrao query to run -} - -var DefaultBootstrapConfig = BootstrapConfig{ - // For now, this is set to 1 query. - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. Once we are more certain - // of our implementation's robustness, we should lower this down to 8 or 4. - Queries: 1, - - // For now, this is set to 5 minutes, which is a medium period. We are - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. - Period: time.Duration(5 * time.Minute), - - Timeout: time.Duration(10 * time.Second), -} - -// Bootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// As opposed to BootstrapWithConfig, Bootstrap satisfies the routing interface -func (dht *IpfsDHT) Bootstrap(ctx context.Context) error { - proc, err := dht.BootstrapWithConfig(DefaultBootstrapConfig) - if err != nil { - return err - } - - // wait till ctx or dht.Context exits. - // we have to do it this way to satisfy the Routing interface (contexts) - go func() { - defer proc.Close() - select { - case <-ctx.Done(): - case <-dht.Context().Done(): - } - }() - - return nil -} - -// BootstrapWithConfig ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// BootstrapWithConfig returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapWithConfig(cfg BootstrapConfig) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - proc := dht.Process().Go(func(p goprocess.Process) { - <-p.Go(dht.bootstrapWorker(cfg)).Closed() - for { - select { - case <-time.After(cfg.Period): - <-p.Go(dht.bootstrapWorker(cfg)).Closed() - case <-p.Closing(): - return - } - } - }) - - return proc, nil -} - -// SignalBootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// SignalBootstrap returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapOnSignal(cfg BootstrapConfig, signal <-chan time.Time) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - - if signal == nil { - return nil, fmt.Errorf("invalid signal: %v", signal) - } - - proc := periodicproc.Ticker(signal, dht.bootstrapWorker(cfg)) - - return proc, nil -} - -func (dht *IpfsDHT) bootstrapWorker(cfg BootstrapConfig) func(worker goprocess.Process) { - return func(worker goprocess.Process) { - // it would be useful to be able to send out signals of when we bootstrap, too... - // maybe this is a good case for whole module event pub/sub? - - ctx := dht.Context() - if err := dht.runBootstrap(ctx, cfg); err != nil { - log.Warning(err) - // A bootstrapping error is important to notice but not fatal. - } - } -} - -var bootstrapOnce sync.Once - -// runBootstrap builds up list of peers by requesting random peer IDs -func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error { - bslog := func(msg string) { - log.Debugf("DHT %s dhtRunBootstrap %s -- routing table size: %d", dht.self, msg, dht.routingTable.Size()) - } - bslog("start") - defer bslog("end") - defer log.EventBegin(ctx, "dhtRunBootstrap").Done() - - var merr u.MultiErr - - randomID := func() peer.ID { - // 16 random bytes is not a valid peer id. it may be fine becuase - // the dht will rehash to its own keyspace anyway. - id := make([]byte, 16) - rand.Read(id) - id = u.Hash(id) - return peer.ID(id) - } - - // bootstrap sequentially, as results will compound - runQuery := func(ctx context.Context, id peer.ID) { - ctx, cancel := context.WithTimeout(ctx, cfg.Timeout) - defer cancel() - - p, err := dht.FindPeer(ctx, id) - if err == routing.ErrNotFound { - // this isn't an error. this is precisely what we expect. - } else if err != nil { - merr = append(merr, err) - } else { - // woah, actually found a peer with that ID? this shouldn't happen normally - // (as the ID we use is not a real ID). this is an odd error worth logging. - err := fmt.Errorf("Bootstrap peer error: Actually FOUND peer. (%s, %s)", id, p) - log.Warningf("%s", err) - merr = append(merr, err) - } - } - - // these should be parallel normally. but can make them sequential for debugging. - // note that the core/bootstrap context deadline should be extended too for that. - for i := 0; i < cfg.Queries; i++ { - id := randomID() - log.Debugf("Bootstrapping query (%d/%d) to random ID: %s", i+1, cfg.Queries, id) - runQuery(ctx, id) - } - - // Find self to distribute peer info to our neighbors. - // Do this after bootstrapping. - log.Debugf("Bootstrapping query to self: %s", dht.self) - runQuery(ctx, dht.self) - - if len(merr) > 0 { - return merr - } - bootstrapOnce.Do(func() { - close(dht.BootstrapChan) - }) - return nil -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_net.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_net.go deleted file mode 100644 index 2244160016..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/dht_net.go +++ /dev/null @@ -1,369 +0,0 @@ -package dht - -import ( - "bufio" - "context" - "fmt" - "io" - "sync" - "time" - - pb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - ctxio "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" -) - -var dhtReadMessageTimeout = time.Minute -var ErrReadTimeout = fmt.Errorf("timed out reading response") - -type bufferedWriteCloser interface { - ggio.WriteCloser - Flush() error -} - -// The Protobuf writer performs multiple small writes when writing a message. -// We need to buffer those writes, to make sure that we're not sending a new -// packet for every single write. -type bufferedDelimitedWriter struct { - *bufio.Writer - ggio.WriteCloser -} - -func newBufferedDelimitedWriter(str io.Writer) bufferedWriteCloser { - w := bufio.NewWriter(str) - return &bufferedDelimitedWriter{ - Writer: w, - WriteCloser: ggio.NewDelimitedWriter(w), - } -} - -func (w *bufferedDelimitedWriter) Flush() error { - return w.Writer.Flush() -} - -// handleNewStream implements the inet.StreamHandler -func (dht *IpfsDHT) handleNewStream(s inet.Stream) { - go dht.handleNewMessage(s) -} - -func (dht *IpfsDHT) handleNewMessage(s inet.Stream) { - ctx := dht.Context() - cr := ctxio.NewReader(ctx, s) // ok to use. we defer close stream in this func - cw := ctxio.NewWriter(ctx, s) // ok to use. we defer close stream in this func - r := ggio.NewDelimitedReader(cr, inet.MessageSizeMax) - w := newBufferedDelimitedWriter(cw) - mPeer := s.Conn().RemotePeer() - - for { - // receive msg - pmes := new(pb.Message) - switch err := r.ReadMsg(pmes); err { - case io.EOF: - s.Close() - return - case nil: - default: - s.Reset() - log.Debugf("Error unmarshaling data: %s", err) - return - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, mPeer, pmes) - - // get handler for this msg type. - handler := dht.handlerForMsgType(pmes.GetType()) - if handler == nil { - s.Reset() - log.Debug("got back nil handler from handlerForMsgType") - return - } - - // dispatch handler. - rpmes, err := handler(ctx, mPeer, pmes) - if err != nil { - s.Reset() - log.Debugf("handle message error: %s", err) - return - } - - // if nil response, return it before serializing - if rpmes == nil { - log.Debug("got back nil response from request") - continue - } - - // send out response msg - err = w.WriteMsg(rpmes) - if err == nil { - err = w.Flush() - } - if err != nil { - s.Reset() - log.Debugf("send response error: %s", err) - return - } - } -} - -// OpenBazaar: Added an exported version of sendRequest. -func (dht *IpfsDHT) SendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - return dht.sendRequest(ctx, p, pmes) -} - -// sendRequest sends out a request, but also makes sure to -// measure the RTT for latency measurements. -func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return nil, err - } - - start := time.Now() - - rpmes, err := ms.SendRequest(ctx, pmes) - if err != nil { - return nil, err - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, p, rpmes) - - dht.peerstore.RecordLatency(p, time.Since(start)) - log.Event(ctx, "dhtReceivedMessage", dht.self, p, rpmes) - return rpmes, nil -} - -// OpenBazaar: Added an exported version of sendMessage. -func (dht *IpfsDHT) SendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { - return dht.sendMessage(ctx, p, pmes) -} - -// sendMessage sends out a message -func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return err - } - - if err := ms.SendMessage(ctx, pmes); err != nil { - return err - } - log.Event(ctx, "dhtSentMessage", dht.self, p, pmes) - return nil -} - -func (dht *IpfsDHT) updateFromMessage(ctx context.Context, p peer.ID, mes *pb.Message) error { - // Make sure that this node is actually a DHT server, not just a client. - protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) - if err == nil && len(protos) > 0 { - dht.Update(ctx, p) - } - return nil -} - -func (dht *IpfsDHT) messageSenderForPeer(p peer.ID) (*messageSender, error) { - dht.smlk.Lock() - ms, ok := dht.strmap[p] - if ok { - dht.smlk.Unlock() - return ms, nil - } - ms = &messageSender{p: p, dht: dht} - dht.strmap[p] = ms - dht.smlk.Unlock() - - if err := ms.prepOrInvalidate(); err != nil { - dht.smlk.Lock() - defer dht.smlk.Unlock() - - if msCur, ok := dht.strmap[p]; ok { - // Changed. Use the new one, old one is invalid and - // not in the map so we can just throw it away. - if ms != msCur { - return msCur, nil - } - // Not changed, remove the now invalid stream from the - // map. - delete(dht.strmap, p) - } - // Invalid but not in map. Must have been removed by a disconnect. - return nil, err - } - // All ready to go. - return ms, nil -} - -type messageSender struct { - s inet.Stream - r ggio.ReadCloser - w bufferedWriteCloser - lk sync.Mutex - p peer.ID - dht *IpfsDHT - - invalid bool - singleMes int -} - -// invalidate is called before this messageSender is removed from the strmap. -// It prevents the messageSender from being reused/reinitialized and then -// forgotten (leaving the stream open). -func (ms *messageSender) invalidate() { - ms.invalid = true - if ms.s != nil { - ms.s.Reset() - ms.s = nil - } -} - -func (ms *messageSender) prepOrInvalidate() error { - ms.lk.Lock() - defer ms.lk.Unlock() - if err := ms.prep(); err != nil { - ms.invalidate() - return err - } - return nil -} - -func (ms *messageSender) prep() error { - if ms.invalid { - return fmt.Errorf("message sender has been invalidated") - } - if ms.s != nil { - return nil - } - - nstr, err := ms.dht.host.NewStream(ms.dht.ctx, ms.p, ms.dht.protocols...) - if err != nil { - return err - } - - ms.r = ggio.NewDelimitedReader(nstr, inet.MessageSizeMax) - ms.w = newBufferedDelimitedWriter(nstr) - ms.s = nstr - - return nil -} - -// streamReuseTries is the number of times we will try to reuse a stream to a -// given peer before giving up and reverting to the old one-message-per-stream -// behaviour. -const streamReuseTries = 3 - -func (ms *messageSender) SendMessage(ctx context.Context, pmes *pb.Message) error { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return err - } - - if err := ms.writeMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - go inet.FullClose(ms.s) - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return nil - } -} - -func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb.Message, error) { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return nil, err - } - - if err := ms.writeMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return nil, err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - mes := new(pb.Message) - if err := ms.ctxReadMsg(ctx, mes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error reading message, bailing: ", err) - return nil, err - } else { - log.Info("error reading message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - go inet.FullClose(ms.s) - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return mes, nil - } -} - -func (ms *messageSender) writeMsg(pmes *pb.Message) error { - if err := ms.w.WriteMsg(pmes); err != nil { - return err - } - return ms.w.Flush() -} - -func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { - errc := make(chan error, 1) - go func(r ggio.ReadCloser) { - errc <- r.ReadMsg(mes) - }(ms.r) - - t := time.NewTimer(dhtReadMessageTimeout) - defer t.Stop() - - select { - case err := <-errc: - return err - case <-ctx.Done(): - return ctx.Err() - case <-t.C: - return ErrReadTimeout - } -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/handlers.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/handlers.go deleted file mode 100644 index c74b4cefe5..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/handlers.go +++ /dev/null @@ -1,391 +0,0 @@ -package dht - -import ( - "bytes" - "context" - "errors" - "fmt" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - ob "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob" - pb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - recpb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -// The number of closer peers to send on requests. -var CloserPeerCount = KValue - -// dhthandler specifies the signature of functions that handle DHT messages. -type dhtHandler func(context.Context, peer.ID, *pb.Message) (*pb.Message, error) - -func (dht *IpfsDHT) handlerForMsgType(t pb.Message_MessageType) dhtHandler { - switch t { - case pb.Message_GET_VALUE: - return dht.handleGetValue - case pb.Message_PUT_VALUE: - return dht.handlePutValue - case pb.Message_FIND_NODE: - return dht.handleFindPeer - case pb.Message_ADD_PROVIDER: - return dht.handleAddProvider - case pb.Message_GET_PROVIDERS: - return dht.handleGetProviders - case pb.Message_PING: - return dht.handlePing - default: - return nil - } -} - -func (dht *IpfsDHT) handleGetValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - ctx = log.Start(ctx, "handleGetValue") - log.SetTag(ctx, "peer", p) - defer func() { log.FinishWithErr(ctx, err) }() - log.Debugf("%s handleGetValue for key: %s", dht.self, pmes.GetKey()) - - // setup response - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - - // first, is there even a key? - k := pmes.GetKey() - if len(k) == 0 { - return nil, errors.New("handleGetValue but no key was provided") - // TODO: send back an error response? could be bad, but the other node's hanging. - } - - rec, err := dht.checkLocalDatastore(k) - if err != nil { - return nil, err - } - resp.Record = rec - - // Find closest peer on given cluster to desired key and reply with that info - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if len(closer) > 0 { - closerinfos := pstore.PeerInfos(dht.peerstore, closer) - for _, pi := range closerinfos { - log.Debugf("handleGetValue returning closer peer: '%s'", pi.ID) - if len(pi.Addrs) < 1 { - log.Warningf(`no addresses on peer being sent! - [local:%s] - [sending:%s] - [remote:%s]`, dht.self, pi.ID, p) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), closerinfos) - } - - return resp, nil -} - -func (dht *IpfsDHT) checkLocalDatastore(k []byte) (*recpb.Record, error) { - log.Debugf("%s handleGetValue looking into ds", dht.self) - dskey := convertToDsKey(k) - buf, err := dht.datastore.Get(dskey) - log.Debugf("%s handleGetValue looking into ds GOT %v", dht.self, buf) - - if err == ds.ErrNotFound { - return nil, nil - } - - // if we got an unexpected error, bail. - if err != nil { - return nil, err - } - - // if we have the value, send it back - log.Debugf("%s handleGetValue success!", dht.self) - - rec := new(recpb.Record) - err = proto.Unmarshal(buf, rec) - if err != nil { - log.Debug("failed to unmarshal DHT record from datastore") - return nil, err - } - - var recordIsBad bool - recvtime, err := u.ParseRFC3339(rec.GetTimeReceived()) - if err != nil { - log.Info("either no receive time set on record, or it was invalid: ", err) - recordIsBad = true - } - - if time.Now().Sub(recvtime) > MaxRecordAge { - log.Debug("old record found, tossing.") - recordIsBad = true - } - - // NOTE: We do not verify the record here beyond checking these timestamps. - // we put the burden of checking the records on the requester as checking a record - // may be computationally expensive - - if recordIsBad { - err := dht.datastore.Delete(dskey) - if err != nil { - log.Error("Failed to delete bad record from datastore: ", err) - } - - return nil, nil // can treat this as not having the record at all - } - - return rec, nil -} - -// Cleans the record (to avoid storing arbitrary data). -func cleanRecord(rec *recpb.Record) { - rec.TimeReceived = "" -} - -// Store a value in this peer local storage -func (dht *IpfsDHT) handlePutValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - ctx = log.Start(ctx, "handlePutValue") - log.SetTag(ctx, "peer", p) - defer func() { log.FinishWithErr(ctx, err) }() - - rec := pmes.GetRecord() - if rec == nil { - log.Infof("Got nil record from: %s", p.Pretty()) - return nil, errors.New("nil record") - } - - if !bytes.Equal(pmes.GetKey(), rec.GetKey()) { - return nil, errors.New("put key doesn't match record key") - } - - cleanRecord(rec) - - // Make sure the record is valid (not expired, valid signature etc) - if err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()); err != nil { - log.Warningf("Bad dht record in PUT from: %s. %s", p.Pretty(), err) - return nil, err - } - - dskey := convertToDsKey(rec.GetKey()) - - // Make sure the new record is "better" than the record we have locally. - // This prevents a record with for example a lower sequence number from - // overwriting a record with a higher sequence number. - existing, err := dht.getRecordFromDatastore(dskey) - if err != nil { - return nil, err - } - - if existing != nil { - recs := [][]byte{rec.GetValue(), existing.GetValue()} - i, err := dht.Validator.Select(string(rec.GetKey()), recs) - if err != nil { - log.Warningf("Bad dht record in PUT from %s: %s", p.Pretty(), err) - return nil, err - } - if i != 0 { - log.Infof("DHT record in PUT from %s is older than existing record. Ignoring", p.Pretty()) - return nil, errors.New("old record") - } - } - - // record the time we receive every record - rec.TimeReceived = u.FormatRFC3339(time.Now()) - - data, err := proto.Marshal(rec) - if err != nil { - return nil, err - } - - err = dht.datastore.Put(dskey, data) - log.Debugf("%s handlePutValue %v", dht.self, dskey) - return pmes, err -} - -// returns nil, nil when either nothing is found or the value found doesn't properly validate. -// returns nil, some_error when there's a *datastore* error (i.e., something goes very wrong) -func (dht *IpfsDHT) getRecordFromDatastore(dskey ds.Key) (*recpb.Record, error) { - buf, err := dht.datastore.Get(dskey) - if err == ds.ErrNotFound { - return nil, nil - } - if err != nil { - log.Errorf("Got error retrieving record with key %s from datastore: %s", dskey, err) - return nil, err - } - rec := new(recpb.Record) - err = proto.Unmarshal(buf, rec) - if err != nil { - // Bad data in datastore, log it but don't return an error, we'll just overwrite it - log.Errorf("Bad record data stored in datastore with key %s: could not unmarshal record", dskey) - return nil, nil - } - - err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()) - if err != nil { - // Invalid record in datastore, probably expired but don't return an error, - // we'll just overwrite it - log.Debugf("Local record verify failed: %s (discarded)", err) - return nil, nil - } - - return rec, nil -} - -func (dht *IpfsDHT) handlePing(_ context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - log.Debugf("%s Responding to ping from %s!\n", dht.self, p) - return pmes, nil -} - -func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleFindPeer") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - resp := pb.NewMessage(pmes.GetType(), nil, pmes.GetClusterLevel()) - var closest []peer.ID - - // if looking for self... special case where we send it on CloserPeers. - targetPid := peer.ID(pmes.GetKey()) - if targetPid == dht.self { - closest = []peer.ID{dht.self} - } else { - closest = dht.betterPeersToQuery(pmes, p, CloserPeerCount) - - // Never tell a peer about itself. - if targetPid != p { - // If we're connected to the target peer, report their - // peer info. This makes FindPeer work even if the - // target peer isn't in our routing table. - // - // Alternatively, we could just check our peerstore. - // However, we don't want to return out of date - // information. We can change this in the future when we - // add a progressive, asynchronous `SearchPeer` function - // and improve peer routing in the host. - switch dht.host.Network().Connectedness(targetPid) { - case inet.Connected, inet.CanConnect: - closest = append(closest, targetPid) - } - } - } - - if closest == nil { - log.Infof("%s handleFindPeer %s: could not find anything.", dht.self, p) - return resp, nil - } - - closestinfos := pstore.PeerInfos(dht.peerstore, closest) - // possibly an over-allocation but this array is temporary anyways. - withAddresses := make([]pstore.PeerInfo, 0, len(closestinfos)) - for _, pi := range closestinfos { - if len(pi.Addrs) > 0 { - withAddresses = append(withAddresses, pi) - log.Debugf("handleFindPeer: sending back '%s'", pi.ID) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), withAddresses) - return resp, nil -} - -func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleGetProviders") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - return nil, err - } - log.SetTag(ctx, "key", c) - - // debug logging niceness. - reqDesc := fmt.Sprintf("%s handleGetProviders(%s, %s): ", dht.self, p, c) - log.Debugf("%s begin", reqDesc) - defer log.Debugf("%s end", reqDesc) - - // check if we have this value, to add ourselves as provider. - has, err := dht.datastore.Has(convertToDsKey(c.Bytes())) - if err != nil && err != ds.ErrNotFound { - log.Debugf("unexpected datastore error: %v\n", err) - has = false - } - - // setup providers - providers := dht.providers.GetProviders(ctx, c) - if has { - providers = append(providers, dht.self) - log.Debugf("%s have the value. added self as provider", reqDesc) - } - - if providers != nil && len(providers) > 0 { - infos := pstore.PeerInfos(dht.peerstore, providers) - resp.ProviderPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d providers: %s", reqDesc, len(providers), infos) - } - - // Also send closer peers. - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if closer != nil { - infos := pstore.PeerInfos(dht.peerstore, closer) - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d closer peers: %s", reqDesc, len(closer), infos) - } - - return resp, nil -} - -func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleAddProvider") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - return nil, err - } - log.SetTag(ctx, "key", c) - - log.Debugf("%s adding %s as a provider for '%s'\n", dht.self, p, c) - - // add provider should use the address given in the message - pinfos := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - for _, pi := range pinfos { - // OpenBazaar: there was a line here that checks to make sure the peerID equals the provider ID and - // returns an error if it does not. This line has been removed since we want to be able to store - // our `pointers` in the DHT as a provider which does not have an ID matching the peerID. - - if len(pi.Addrs) < 1 { - log.Debugf("%s got no valid addresses for provider %s. Ignore.", dht.self, p) - continue - } - - // OpenBazaar: if this is a pointer we want to use the PointerAddrTTL instead of the normal - // ProviderAddrTTL. - ttl := pstore.ProviderAddrTTL - if ob.IsPointer(pi.ID) { - ttl = ob.PointerAddrTTL - } - - log.Infof("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) - if pi.ID != dht.self { // don't add own addrs. - // add the received addresses to our peerstore. - // OpenBazaar: make sure to use `ttl` as a parameter here. - dht.peerstore.AddAddrs(pi.ID, pi.Addrs, ttl) - } - // OpenBazaar: the line below originally used p instead of pi.ID as the peerID. For normal providers - // this would be the same value and it doesn't matter which one is used. But for our `pointers` p is - // not the value we want to add, but rather pi.ID. So we substitute pi.ID here. - dht.providers.AddProvider(ctx, c, pi.ID) - } - - return nil, nil -} - -func convertToDsKey(s []byte) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString(s)) -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/lookup.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/lookup.go deleted file mode 100644 index 236e3b0278..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/lookup.go +++ /dev/null @@ -1,114 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "strings" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - pb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" -) - -func tryFormatLoggableKey(k string) (string, error) { - if len(k) == 0 { - return "", fmt.Errorf("loggableKey is empty") - } - var proto, cstr string - if k[0] == '/' { - // it's a path (probably) - protoEnd := strings.IndexByte(k[1:], '/') - if protoEnd < 0 { - return k, fmt.Errorf("loggableKey starts with '/' but is not a path: %x", k) - } - proto = k[1 : protoEnd+1] - cstr = k[protoEnd+2:] - } else { - proto = "provider" - cstr = k - } - - c, err := cid.Cast([]byte(cstr)) - if err != nil { - return "", fmt.Errorf("loggableKey could not cast key to a CID: %x %v", k, err) - } - return fmt.Sprintf("/%s/%s", proto, c.String()), nil -} - -func loggableKey(k string) logging.LoggableMap { - newKey, err := tryFormatLoggableKey(k) - if err != nil { - log.Debug(err) - } else { - k = newKey - } - - return logging.LoggableMap{ - "key": k, - } -} - -// Kademlia 'node lookup' operation. Returns a channel of the K closest peers -// to the given key -func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error) { - e := log.EventBegin(ctx, "getClosestPeers", loggableKey(key)) - tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - if len(tablepeers) == 0 { - return nil, kb.ErrLookupFailure - } - - out := make(chan peer.ID, KValue) - - // since the query doesnt actually pass our context down - // we have to hack this here. whyrusleeping isnt a huge fan of goprocess - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - pmes, err := dht.findPeerSingle(ctx, p, peer.ID(key)) - if err != nil { - log.Debugf("error getting closer peers: %s", err) - return nil, err - } - peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) - - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peers, - }) - - return &dhtQueryResult{closerPeers: peers}, nil - }) - - go func() { - defer close(out) - defer e.Done() - // run it! - res, err := query.Run(ctx, tablepeers) - if err != nil { - log.Debugf("closestPeers query run error: %s", err) - } - - if res != nil && res.queriedSet != nil { - sorted := kb.SortClosestPeers(res.queriedSet.Peers(), kb.ConvertKey(key)) - if len(sorted) > KValue { - sorted = sorted[:KValue] - } - - for _, p := range sorted { - out <- p - } - } - }() - - return out, nil -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/notif.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/notif.go deleted file mode 100644 index f534649f14..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/notif.go +++ /dev/null @@ -1,116 +0,0 @@ -package dht - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - mstream "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" -) - -// netNotifiee defines methods to be used with the IpfsDHT -type netNotifiee IpfsDHT - -func (nn *netNotifiee) DHT() *IpfsDHT { - return (*IpfsDHT)(nn) -} - -func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) - if err == nil && len(protos) != 0 { - // We lock here for consistency with the lock in testConnection. - // This probably isn't necessary because (dis)connect - // notifications are serialized but it's nice to be consistent. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } - return - } - - // Note: Unfortunately, the peerstore may not yet know that this peer is - // a DHT server. So, if it didn't return a positive response above, test - // manually. - go nn.testConnection(v) -} - -func (nn *netNotifiee) testConnection(v inet.Conn) { - dht := nn.DHT() - p := v.RemotePeer() - - // Forcibly use *this* connection. Otherwise, if we have two connections, we could: - // 1. Test it twice. - // 2. Have it closed from under us leaving the second (open) connection untested. - s, err := v.NewStream() - if err != nil { - // Connection error - return - } - defer inet.FullClose(s) - - selected, err := mstream.SelectOneOf(dht.protocolStrs(), s) - if err != nil { - // Doesn't support the protocol - return - } - // Remember this choice (makes subsequent negotiations faster) - dht.peerstore.AddProtocols(p, selected) - - // We lock here as we race with disconnect. If we didn't lock, we could - // finish processing a connect after handling the associated disconnect - // event and add the peer to the routing table after removing it. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } -} - -func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - - // Lock and check to see if we're still connected. We lock to make sure - // we don't concurrently process a connect event. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - // We're still connected. - return - } - - dht.routingTable.Remove(p) - - dht.smlk.Lock() - defer dht.smlk.Unlock() - ms, ok := dht.strmap[p] - if !ok { - return - } - delete(dht.strmap, p) - - // Do this asynchronously as ms.lk can block for a while. - go func() { - ms.lk.Lock() - defer ms.lk.Unlock() - ms.invalidate() - }() -} - -func (nn *netNotifiee) OpenedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) ClosedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) Listen(n inet.Network, a ma.Multiaddr) {} -func (nn *netNotifiee) ListenClose(n inet.Network, a ma.Multiaddr) {} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob/common.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob/common.go deleted file mode 100644 index d9db6f45c5..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob/common.go +++ /dev/null @@ -1,31 +0,0 @@ -package ob - -import ( - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "time" -) - -/* -This package is a few small utilities used by OpenBazaar to modify the DHT. -DHT modifications are recorded in the comments here. -*/ - -// OpenBazaar: PointerAddrTTL is used by handlers.handleAddProvider to specify the time -// to hold on to the pointer addr -var PointerAddrTTL = time.Hour * 24 * 7 - -// OpenBazaar: Normal IPFS providers should drop out of the DHT after 24 hours as -// defined by ProvideValidity above. However, `pointers`, which are special providers -// used by the offline message system, should stick around for one week. -var PointerValidity = time.Hour * 24 * 7 - -// OpenBazaar: `Pointers`, which are special providers used by the OpenBazaar messaging system, -// are prefixed with this string. -const MagicProviderID string = "000000000000000000000000" - -// OpenBazaar: IsPointer is used to check if a peer ID inside a provider object should be interpreted as a pointer -// This is used in handlers.handleAddProvider and ProviderManager.run() -func IsPointer(id peer.ID) bool { - hexID := peer.IDHexEncode(id) - return hexID[4:28] == MagicProviderID -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts/options.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts/options.go deleted file mode 100644 index a803f954b2..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/opts/options.go +++ /dev/null @@ -1,105 +0,0 @@ -package dhtopts - -import ( - "fmt" - - "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dssync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" -) - -// OpenBazaar: the protocol IDs are changed here to segrate the DHT from the IPFS DHT. -var ProtocolDHT protocol.ID = "/openbazaar/kad/1.0.0" -var ProtocolDHTOld protocol.ID = "/openbazaar/dht" -var DefaultProtocols = []protocol.ID{ProtocolDHT, ProtocolDHTOld} - -// Options is a structure containing all the options that can be used when constructing a DHT. -type Options struct { - Datastore ds.Batching - Validator record.Validator - Client bool - Protocols []protocol.ID -} - -// Apply applies the given options to this Option -func (o *Options) Apply(opts ...Option) error { - for i, opt := range opts { - if err := opt(o); err != nil { - return fmt.Errorf("dht option %d failed: %s", i, err) - } - } - return nil -} - -// Option DHT option type. -type Option func(*Options) error - -// Defaults are the default DHT options. This option will be automatically -// prepended to any options you pass to the DHT constructor. -var Defaults = func(o *Options) error { - o.Validator = record.NamespacedValidator{ - "pk": record.PublicKeyValidator{}, - } - o.Datastore = dssync.MutexWrap(ds.NewMapDatastore()) - o.Protocols = DefaultProtocols - return nil -} - -// Datastore configures the DHT to use the specified datastore. -// -// Defaults to an in-memory (temporary) map. -func Datastore(ds ds.Batching) Option { - return func(o *Options) error { - o.Datastore = ds - return nil - } -} - -// Client configures whether or not the DHT operates in client-only mode. -// -// Defaults to false. -func Client(only bool) Option { - return func(o *Options) error { - o.Client = only - return nil - } -} - -// Validator configures the DHT to use the specified validator. -// -// Defaults to a namespaced validator that can only validate public keys. -func Validator(v record.Validator) Option { - return func(o *Options) error { - o.Validator = v - return nil - } -} - -// NamespacedValidator adds a validator namespaced under `ns`. This option fails -// if the DHT is not using a `record.NamespacedValidator` as it's validator (it -// uses one by default but this can be overridden with the `Validator` option). -// -// Example: Given a validator registered as `NamespacedValidator("ipns", -// myValidator)`, all records with keys starting with `/ipns/` will be validated -// with `myValidator`. -func NamespacedValidator(ns string, v record.Validator) Option { - return func(o *Options) error { - nsval, ok := o.Validator.(record.NamespacedValidator) - if !ok { - return fmt.Errorf("can only add namespaced validators to a NamespacedValidator") - } - nsval[ns] = v - return nil - } -} - -// Protocols sets the protocols for the DHT -// -// Defaults to dht.DefaultProtocols -func Protocols(protocols ...protocol.ID) Option { - return func(o *Options) error { - o.Protocols = protocols - return nil - } -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/package.json b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/package.json deleted file mode 100644 index dd123b21b2..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/package.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-kad-dht" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-kad-dht", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "jbenet", - "hash": "QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W", - "name": "go-context", - "version": "1.0.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "hashicorp", - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", - "name": "base32", - "version": "0.0.2" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", - "name": "go-libp2p-record", - "version": "4.1.8" - }, - { - "author": "whyrusleeping", - "hash": "QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD", - "name": "go-libp2p-kbucket", - "version": "2.2.12" - }, - { - "author": "whyrusleeping", - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", - "name": "go-libp2p-routing", - "version": "2.7.1" - }, - { - "author": "whyrusleeping", - "hash": "QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq", - "name": "go-todocounter", - "version": "1.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", - "name": "go-libp2p-loggables", - "version": "1.1.24" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB", - "name": "go-libp2p", - "version": "6.0.23" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-kad-dht", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "4.4.12" -} - diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/dht.pb.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/dht.pb.go deleted file mode 100644 index c28e724175..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/dht.pb.go +++ /dev/null @@ -1,933 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dht.proto - -package dht_pb - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" -import pb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type Message_MessageType int32 - -const ( - Message_PUT_VALUE Message_MessageType = 0 - Message_GET_VALUE Message_MessageType = 1 - Message_ADD_PROVIDER Message_MessageType = 2 - Message_GET_PROVIDERS Message_MessageType = 3 - Message_FIND_NODE Message_MessageType = 4 - Message_PING Message_MessageType = 5 -) - -var Message_MessageType_name = map[int32]string{ - 0: "PUT_VALUE", - 1: "GET_VALUE", - 2: "ADD_PROVIDER", - 3: "GET_PROVIDERS", - 4: "FIND_NODE", - 5: "PING", -} -var Message_MessageType_value = map[string]int32{ - "PUT_VALUE": 0, - "GET_VALUE": 1, - "ADD_PROVIDER": 2, - "GET_PROVIDERS": 3, - "FIND_NODE": 4, - "PING": 5, -} - -func (x Message_MessageType) String() string { - return proto.EnumName(Message_MessageType_name, int32(x)) -} -func (Message_MessageType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 0} -} - -type Message_ConnectionType int32 - -const ( - // sender does not have a connection to peer, and no extra information (default) - Message_NOT_CONNECTED Message_ConnectionType = 0 - // sender has a live connection to peer - Message_CONNECTED Message_ConnectionType = 1 - // sender recently connected to peer - Message_CAN_CONNECT Message_ConnectionType = 2 - // sender recently tried to connect to peer repeatedly but failed to connect - // ("try" here is loose, but this should signal "made strong effort, failed") - Message_CANNOT_CONNECT Message_ConnectionType = 3 -) - -var Message_ConnectionType_name = map[int32]string{ - 0: "NOT_CONNECTED", - 1: "CONNECTED", - 2: "CAN_CONNECT", - 3: "CANNOT_CONNECT", -} -var Message_ConnectionType_value = map[string]int32{ - "NOT_CONNECTED": 0, - "CONNECTED": 1, - "CAN_CONNECT": 2, - "CANNOT_CONNECT": 3, -} - -func (x Message_ConnectionType) String() string { - return proto.EnumName(Message_ConnectionType_name, int32(x)) -} -func (Message_ConnectionType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 1} -} - -type Message struct { - // defines what type of message it is. - Type Message_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=dht.pb.Message_MessageType" json:"type,omitempty"` - // defines what coral cluster level this query/response belongs to. - // in case we want to implement coral's cluster rings in the future. - ClusterLevelRaw int32 `protobuf:"varint,10,opt,name=clusterLevelRaw,proto3" json:"clusterLevelRaw,omitempty"` - // Used to specify the key associated with this message. - // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // Used to return a value - // PUT_VALUE, GET_VALUE - Record *pb.Record `protobuf:"bytes,3,opt,name=record" json:"record,omitempty"` - // Used to return peers closer to a key in a query - // GET_VALUE, GET_PROVIDERS, FIND_NODE - CloserPeers []*Message_Peer `protobuf:"bytes,8,rep,name=closerPeers" json:"closerPeers,omitempty"` - // Used to return Providers - // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - ProviderPeers []*Message_Peer `protobuf:"bytes,9,rep,name=providerPeers" json:"providerPeers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(dst, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -func (m *Message) GetType() Message_MessageType { - if m != nil { - return m.Type - } - return Message_PUT_VALUE -} - -func (m *Message) GetClusterLevelRaw() int32 { - if m != nil { - return m.ClusterLevelRaw - } - return 0 -} - -func (m *Message) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *Message) GetRecord() *pb.Record { - if m != nil { - return m.Record - } - return nil -} - -func (m *Message) GetCloserPeers() []*Message_Peer { - if m != nil { - return m.CloserPeers - } - return nil -} - -func (m *Message) GetProviderPeers() []*Message_Peer { - if m != nil { - return m.ProviderPeers - } - return nil -} - -type Message_Peer struct { - // ID of a given peer. - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // multiaddrs for a given peer - Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"` - // used to signal the sender's connection capabilities to the peer - Connection Message_ConnectionType `protobuf:"varint,3,opt,name=connection,proto3,enum=dht.pb.Message_ConnectionType" json:"connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Message_Peer) Reset() { *m = Message_Peer{} } -func (m *Message_Peer) String() string { return proto.CompactTextString(m) } -func (*Message_Peer) ProtoMessage() {} -func (*Message_Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 0} -} -func (m *Message_Peer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message_Peer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Message_Peer) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message_Peer.Merge(dst, src) -} -func (m *Message_Peer) XXX_Size() int { - return m.Size() -} -func (m *Message_Peer) XXX_DiscardUnknown() { - xxx_messageInfo_Message_Peer.DiscardUnknown(m) -} - -var xxx_messageInfo_Message_Peer proto.InternalMessageInfo - -func (m *Message_Peer) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -func (m *Message_Peer) GetAddrs() [][]byte { - if m != nil { - return m.Addrs - } - return nil -} - -func (m *Message_Peer) GetConnection() Message_ConnectionType { - if m != nil { - return m.Connection - } - return Message_NOT_CONNECTED -} - -func init() { - // OpenBazaar: removed the RegisterEnums that were here because they get registered - // when the default dht package that is part of go-ipfs/core gets registered. Thus if - // we don't remove these here we will get a duplicate enum registration panic. -} -func (m *Message) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Message) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Type)) - } - if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDht(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if m.Record != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Record.Size())) - n1, err := m.Record.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.CloserPeers) > 0 { - for _, msg := range m.CloserPeers { - dAtA[i] = 0x42 - i++ - i = encodeVarintDht(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ProviderPeers) > 0 { - for _, msg := range m.ProviderPeers { - dAtA[i] = 0x4a - i++ - i = encodeVarintDht(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ClusterLevelRaw != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.ClusterLevelRaw)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Message_Peer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Message_Peer) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDht(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Addrs) > 0 { - for _, b := range m.Addrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintDht(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.Connection != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Connection)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintDht(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Message) Size() (n int) { - var l int - _ = l - if m.Type != 0 { - n += 1 + sovDht(uint64(m.Type)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovDht(uint64(l)) - } - if m.Record != nil { - l = m.Record.Size() - n += 1 + l + sovDht(uint64(l)) - } - if len(m.CloserPeers) > 0 { - for _, e := range m.CloserPeers { - l = e.Size() - n += 1 + l + sovDht(uint64(l)) - } - } - if len(m.ProviderPeers) > 0 { - for _, e := range m.ProviderPeers { - l = e.Size() - n += 1 + l + sovDht(uint64(l)) - } - } - if m.ClusterLevelRaw != 0 { - n += 1 + sovDht(uint64(m.ClusterLevelRaw)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Message_Peer) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovDht(uint64(l)) - } - if len(m.Addrs) > 0 { - for _, b := range m.Addrs { - l = len(b) - n += 1 + l + sovDht(uint64(l)) - } - } - if m.Connection != 0 { - n += 1 + sovDht(uint64(m.Connection)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDht(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozDht(x uint64) (n int) { - return sovDht(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Message) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= (Message_MessageType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Record == nil { - m.Record = &pb.Record{} - } - if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CloserPeers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CloserPeers = append(m.CloserPeers, &Message_Peer{}) - if err := m.CloserPeers[len(m.CloserPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderPeers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderPeers = append(m.ProviderPeers, &Message_Peer{}) - if err := m.ProviderPeers[len(m.ProviderPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterLevelRaw", wireType) - } - m.ClusterLevelRaw = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClusterLevelRaw |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDht(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDht - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Message_Peer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Peer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) - if m.Id == nil { - m.Id = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx)) - copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) - } - m.Connection = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Connection |= (Message_ConnectionType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDht(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDht - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDht(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthDht - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDht(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthDht = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDht = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("dht.proto", fileDescriptor_dht_9c5cb71036aaefb8) } - -var fileDescriptor_dht_9c5cb71036aaefb8 = []byte{ - // 429 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x6e, 0x9b, 0x40, - 0x10, 0x86, 0xbb, 0x80, 0xdd, 0x78, 0xc0, 0x64, 0x33, 0xca, 0x01, 0xa5, 0x92, 0x85, 0x7c, 0xa2, - 0x87, 0x80, 0x44, 0xa5, 0x1e, 0x7a, 0xa8, 0xe4, 0x02, 0x8d, 0x2c, 0xa5, 0xd8, 0xda, 0x3a, 0xe9, - 0xd1, 0x32, 0xb0, 0x72, 0x50, 0xa9, 0x17, 0x01, 0x49, 0xe5, 0x27, 0x6c, 0x8f, 0x7d, 0x84, 0xca, - 0x4f, 0x52, 0x01, 0xa1, 0xc5, 0x3e, 0xf4, 0xc4, 0xff, 0xef, 0xfe, 0xdf, 0xcc, 0x30, 0x5a, 0x18, - 0x25, 0x0f, 0x95, 0x9d, 0x17, 0xa2, 0x12, 0x38, 0x6c, 0x64, 0x74, 0xe5, 0x6e, 0xd3, 0xea, 0xe1, - 0x31, 0xb2, 0x63, 0xf1, 0xcd, 0xc9, 0xd2, 0x28, 0x77, 0x73, 0x67, 0x2b, 0xae, 0x5b, 0x75, 0x5d, - 0xf0, 0x58, 0x14, 0x89, 0x93, 0x47, 0x4e, 0xab, 0x5a, 0x76, 0xfa, 0x43, 0x81, 0x97, 0x9f, 0x78, - 0x59, 0x6e, 0xb6, 0x1c, 0x1d, 0x50, 0xaa, 0x7d, 0xce, 0x0d, 0x62, 0x12, 0x4b, 0x77, 0x5f, 0xd9, - 0x6d, 0x59, 0xfb, 0xf9, 0xba, 0xfb, 0xae, 0xf6, 0x39, 0x67, 0x4d, 0x10, 0x29, 0xc8, 0x5f, 0xf9, - 0xde, 0x90, 0x4c, 0x62, 0x69, 0xac, 0x96, 0xf8, 0x1a, 0x86, 0x6d, 0x79, 0x43, 0x36, 0x89, 0xa5, - 0xba, 0x17, 0x76, 0xd7, 0x2d, 0xb2, 0x59, 0xa3, 0xd8, 0x73, 0x00, 0xdf, 0x82, 0x1a, 0x67, 0xa2, - 0xe4, 0xc5, 0x92, 0xf3, 0xa2, 0x34, 0xce, 0x4c, 0xd9, 0x52, 0xdd, 0xcb, 0xd3, 0xa6, 0xf5, 0x25, - 0xeb, 0x07, 0xf1, 0x1d, 0x8c, 0xf3, 0x42, 0x3c, 0xa5, 0x49, 0x47, 0x8e, 0xfe, 0x43, 0x1e, 0x47, - 0xd1, 0x82, 0xf3, 0x38, 0x7b, 0x2c, 0x2b, 0x5e, 0xdc, 0xf2, 0x27, 0x9e, 0xb1, 0xcd, 0x77, 0x03, - 0x4c, 0x62, 0x0d, 0xd8, 0xe9, 0xf1, 0x55, 0x06, 0x4a, 0x8d, 0xa0, 0x0e, 0x52, 0x9a, 0x34, 0x1b, - 0xd1, 0x98, 0x94, 0x26, 0x78, 0x09, 0x83, 0x4d, 0x92, 0x14, 0xa5, 0x21, 0x99, 0xb2, 0xa5, 0xb1, - 0xd6, 0xe0, 0x7b, 0x80, 0x58, 0xec, 0x76, 0x3c, 0xae, 0x52, 0xb1, 0x6b, 0x7e, 0x5d, 0x77, 0x27, - 0xa7, 0x03, 0x79, 0x7f, 0x13, 0xcd, 0x0a, 0x7b, 0xc4, 0x34, 0x05, 0xb5, 0xb7, 0x5d, 0x1c, 0xc3, - 0x68, 0x79, 0xb7, 0x5a, 0xdf, 0xcf, 0x6e, 0xef, 0x02, 0xfa, 0xa2, 0xb6, 0x37, 0x41, 0x67, 0x09, - 0x52, 0xd0, 0x66, 0xbe, 0xbf, 0x5e, 0xb2, 0xc5, 0xfd, 0xdc, 0x0f, 0x18, 0x95, 0xf0, 0x02, 0xc6, - 0x75, 0xa0, 0x3b, 0xf9, 0x4c, 0xe5, 0x9a, 0xf9, 0x38, 0x0f, 0xfd, 0x75, 0xb8, 0xf0, 0x03, 0xaa, - 0xe0, 0x19, 0x28, 0xcb, 0x79, 0x78, 0x43, 0x07, 0xd3, 0x2f, 0xa0, 0x1f, 0x0f, 0x52, 0xd3, 0xe1, - 0x62, 0xb5, 0xf6, 0x16, 0x61, 0x18, 0x78, 0xab, 0xc0, 0x6f, 0x3b, 0xfe, 0xb3, 0x04, 0xcf, 0x41, - 0xf5, 0x66, 0x61, 0x97, 0xa0, 0x12, 0x22, 0xe8, 0xde, 0x2c, 0xec, 0x51, 0x54, 0xfe, 0xa0, 0xfd, - 0x3c, 0x4c, 0xc8, 0xaf, 0xc3, 0x84, 0xfc, 0x3e, 0x4c, 0x48, 0x34, 0x6c, 0x9e, 0xd7, 0x9b, 0x3f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xb2, 0x05, 0xeb, 0xa7, 0x02, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/message.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/message.go deleted file mode 100644 index 2c17ce93af..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/message.go +++ /dev/null @@ -1,183 +0,0 @@ -package dht_pb - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("dht.pb") - -type PeerRoutingInfo struct { - pstore.PeerInfo - inet.Connectedness -} - -// NewMessage constructs a new dht message with given type, key, and level -func NewMessage(typ Message_MessageType, key []byte, level int) *Message { - m := &Message{ - Type: typ, - Key: key, - } - m.SetClusterLevel(level) - return m -} - -func peerRoutingInfoToPBPeer(p PeerRoutingInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - s := string(p.ID) - pbp.Id = []byte(s) - c := ConnectionType(p.Connectedness) - pbp.Connection = c - return pbp -} - -func peerInfoToPBPeer(p pstore.PeerInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - pbp.Id = []byte(p.ID) - return pbp -} - -// PBPeerToPeer turns a *Message_Peer into its pstore.PeerInfo counterpart -func PBPeerToPeerInfo(pbp *Message_Peer) *pstore.PeerInfo { - return &pstore.PeerInfo{ - ID: peer.ID(pbp.GetId()), - Addrs: pbp.Addresses(), - } -} - -// RawPeerInfosToPBPeers converts a slice of Peers into a slice of *Message_Peers, -// ready to go out on the wire. -func RawPeerInfosToPBPeers(peers []pstore.PeerInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerInfoToPBPeer(p) - } - return pbpeers -} - -// PeersToPBPeers converts given []peer.Peer into a set of []*Message_Peer, -// which can be written to a message and sent out. the key thing this function -// does (in addition to PeersToPBPeers) is set the ConnectionType with -// information from the given inet.Network. -func PeerInfosToPBPeers(n inet.Network, peers []pstore.PeerInfo) []*Message_Peer { - pbps := RawPeerInfosToPBPeers(peers) - for i, pbp := range pbps { - c := ConnectionType(n.Connectedness(peers[i].ID)) - pbp.Connection = c - } - return pbps -} - -func PeerRoutingInfosToPBPeers(peers []PeerRoutingInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerRoutingInfoToPBPeer(p) - } - return pbpeers -} - -// PBPeersToPeerInfos converts given []*Message_Peer into []pstore.PeerInfo -// Invalid addresses will be silently omitted. -func PBPeersToPeerInfos(pbps []*Message_Peer) []*pstore.PeerInfo { - peers := make([]*pstore.PeerInfo, 0, len(pbps)) - for _, pbp := range pbps { - peers = append(peers, PBPeerToPeerInfo(pbp)) - } - return peers -} - -// Addresses returns a multiaddr associated with the Message_Peer entry -func (m *Message_Peer) Addresses() []ma.Multiaddr { - if m == nil { - return nil - } - - maddrs := make([]ma.Multiaddr, 0, len(m.Addrs)) - for _, addr := range m.Addrs { - maddr, err := ma.NewMultiaddrBytes(addr) - if err != nil { - log.Warningf("error decoding Multiaddr for peer: %s", m.GetId()) - continue - } - - maddrs = append(maddrs, maddr) - } - return maddrs -} - -// GetClusterLevel gets and adjusts the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) GetClusterLevel() int { - level := m.GetClusterLevelRaw() - 1 - if level < 0 { - return 0 - } - return int(level) -} - -// SetClusterLevel adjusts and sets the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) SetClusterLevel(level int) { - lvl := int32(level) - m.ClusterLevelRaw = lvl -} - -// Loggable turns a Message into machine-readable log output -func (m *Message) Loggable() map[string]interface{} { - return map[string]interface{}{ - "message": map[string]string{ - "type": m.Type.String(), - "key": b58.Encode([]byte(m.GetKey())), - }, - } -} - -// ConnectionType returns a Message_ConnectionType associated with the -// inet.Connectedness. -func ConnectionType(c inet.Connectedness) Message_ConnectionType { - switch c { - default: - return Message_NOT_CONNECTED - case inet.NotConnected: - return Message_NOT_CONNECTED - case inet.Connected: - return Message_CONNECTED - case inet.CanConnect: - return Message_CAN_CONNECT - case inet.CannotConnect: - return Message_CANNOT_CONNECT - } -} - -// Connectedness returns an inet.Connectedness associated with the -// Message_ConnectionType. -func Connectedness(c Message_ConnectionType) inet.Connectedness { - switch c { - default: - return inet.NotConnected - case Message_NOT_CONNECTED: - return inet.NotConnected - case Message_CONNECTED: - return inet.Connected - case Message_CAN_CONNECT: - return inet.CanConnect - case Message_CANNOT_CONNECT: - return inet.CannotConnect - } -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/providers/providers.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/providers/providers.go deleted file mode 100644 index b23f17b25f..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/providers/providers.go +++ /dev/null @@ -1,362 +0,0 @@ -package providers - -import ( - "context" - "encoding/binary" - "fmt" - "strings" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ob "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/ob" - lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - autobatch "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var batchBufferSize = 256 - -var log = logging.Logger("providers") - -var lruCacheSize = 256 -var ProvideValidity = time.Hour * 24 -var defaultCleanupInterval = time.Hour - -type ProviderManager struct { - // all non channel fields are meant to be accessed only within - // the run method - providers *lru.Cache - lpeer peer.ID - dstore ds.Datastore - - newprovs chan *addProv - getprovs chan *getProv - period time.Duration - proc goprocess.Process - - cleanupInterval time.Duration -} - -type providerSet struct { - providers []peer.ID - set map[peer.ID]time.Time -} - -type addProv struct { - k cid.Cid - val peer.ID -} - -type getProv struct { - k cid.Cid - resp chan []peer.ID -} - -func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager { - pm := new(ProviderManager) - pm.getprovs = make(chan *getProv) - pm.newprovs = make(chan *addProv) - pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) - cache, err := lru.New(lruCacheSize) - if err != nil { - panic(err) //only happens if negative value is passed to lru constructor - } - pm.providers = cache - - pm.proc = goprocessctx.WithContext(ctx) - pm.cleanupInterval = defaultCleanupInterval - pm.proc.Go(func(p goprocess.Process) { pm.run() }) - - return pm -} - -const providersKeyPrefix = "/providers/" - -func mkProvKey(k cid.Cid) string { - return providersKeyPrefix + base32.RawStdEncoding.EncodeToString(k.Bytes()) -} - -func (pm *ProviderManager) Process() goprocess.Process { - return pm.proc -} - -func (pm *ProviderManager) providersForKey(k cid.Cid) ([]peer.ID, error) { - pset, err := pm.getProvSet(k) - if err != nil { - return nil, err - } - return pset.providers, nil -} - -func (pm *ProviderManager) getProvSet(k cid.Cid) (*providerSet, error) { - cached, ok := pm.providers.Get(k.KeyString()) - if ok { - return cached.(*providerSet), nil - } - - pset, err := loadProvSet(pm.dstore, k) - if err != nil { - return nil, err - } - - if len(pset.providers) > 0 { - pm.providers.Add(k.KeyString(), pset) - } - - return pset, nil -} - -func loadProvSet(dstore ds.Datastore, k cid.Cid) (*providerSet, error) { - res, err := dstore.Query(dsq.Query{Prefix: mkProvKey(k)}) - if err != nil { - return nil, err - } - - out := newProviderSet() - for { - e, ok := res.NextSync() - if !ok { - break - } - if e.Error != nil { - log.Error("got an error: ", e.Error) - continue - } - - lix := strings.LastIndex(e.Key, "/") - - decstr, err := base32.RawStdEncoding.DecodeString(e.Key[lix+1:]) - if err != nil { - log.Error("base32 decoding error: ", err) - continue - } - - pid := peer.ID(decstr) - - t, err := readTimeValue(e.Value) - if err != nil { - log.Warning("parsing providers record from disk: ", err) - continue - } - - out.setVal(pid, t) - } - - return out, nil -} - -func readTimeValue(i interface{}) (time.Time, error) { - data, ok := i.([]byte) - if !ok { - return time.Time{}, fmt.Errorf("data was not a []byte") - } - - nsec, _ := binary.Varint(data) - - return time.Unix(0, nsec), nil -} - -func (pm *ProviderManager) addProv(k cid.Cid, p peer.ID) error { - iprovs, ok := pm.providers.Get(k.KeyString()) - if !ok { - stored, err := loadProvSet(pm.dstore, k) - if err != nil { - return err - } - iprovs = stored - pm.providers.Add(k.KeyString(), iprovs) - } - provs := iprovs.(*providerSet) - now := time.Now() - provs.setVal(p, now) - - return writeProviderEntry(pm.dstore, k, p, now) -} - -func writeProviderEntry(dstore ds.Datastore, k cid.Cid, p peer.ID, t time.Time) error { - dsk := mkProvKey(k) + "/" + base32.RawStdEncoding.EncodeToString([]byte(p)) - - buf := make([]byte, 16) - n := binary.PutVarint(buf, t.UnixNano()) - - return dstore.Put(ds.NewKey(dsk), buf[:n]) -} - -func (pm *ProviderManager) deleteProvSet(k cid.Cid) error { - pm.providers.Remove(k.KeyString()) - - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: true, - Prefix: mkProvKey(k), - }) - if err != nil { - return err - } - - entries, err := res.Rest() - if err != nil { - return err - } - - for _, e := range entries { - err := pm.dstore.Delete(ds.NewKey(e.Key)) - if err != nil { - log.Error("deleting provider set: ", err) - } - } - return nil -} - -func (pm *ProviderManager) getProvKeys() (func() (cid.Cid, bool), error) { - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: true, - Prefix: providersKeyPrefix, - }) - if err != nil { - return nil, err - } - - iter := func() (cid.Cid, bool) { - for e := range res.Next() { - parts := strings.Split(e.Key, "/") - if len(parts) != 4 { - log.Warningf("incorrectly formatted provider entry in datastore: %s", e.Key) - continue - } - decoded, err := base32.RawStdEncoding.DecodeString(parts[2]) - if err != nil { - log.Warning("error decoding base32 provider key: %s: %s", parts[2], err) - continue - } - - c, err := cid.Cast(decoded) - if err != nil { - log.Warning("error casting key to cid from datastore key: %s", err) - continue - } - - return c, true - } - return cid.Cid{}, false - } - - return iter, nil -} - -func (pm *ProviderManager) run() { - tick := time.NewTicker(pm.cleanupInterval) - for { - select { - case np := <-pm.newprovs: - err := pm.addProv(np.k, np.val) - if err != nil { - log.Error("error adding new providers: ", err) - } - case gp := <-pm.getprovs: - provs, err := pm.providersForKey(gp.k) - if err != nil && err != ds.ErrNotFound { - log.Error("error reading providers: ", err) - } - - gp.resp <- provs - case <-tick.C: - keys, err := pm.getProvKeys() - if err != nil { - log.Error("Error loading provider keys: ", err) - continue - } - now := time.Now() - for { - k, ok := keys() - if !ok { - break - } - - provs, err := pm.getProvSet(k) - if err != nil { - log.Error("error loading known provset: ", err) - continue - } - for p, t := range provs.set { - // OpenBazaar: the provider is usually deleted after it reaches ProvideValidity. However, since - // we use a different validity setting for our `pointers` used by the messaging system, we only - // want to delete the pointer after it reaches PointerValidity. - if (now.Sub(t) > ProvideValidity && !ob.IsPointer(p)) || (now.Sub(t) > ob.PointerValidity && ob.IsPointer(p)) { - delete(provs.set, p) - } - } - // have we run out of providers? - if len(provs.set) == 0 { - provs.providers = nil - err := pm.deleteProvSet(k) - if err != nil { - log.Error("error deleting provider set: ", err) - } - } else if len(provs.set) < len(provs.providers) { - // We must have modified the providers set, recompute. - provs.providers = make([]peer.ID, 0, len(provs.set)) - for p := range provs.set { - provs.providers = append(provs.providers, p) - } - } - } - case <-pm.proc.Closing(): - tick.Stop() - return - } - } -} - -func (pm *ProviderManager) AddProvider(ctx context.Context, k cid.Cid, val peer.ID) { - prov := &addProv{ - k: k, - val: val, - } - select { - case pm.newprovs <- prov: - case <-ctx.Done(): - } -} - -func (pm *ProviderManager) GetProviders(ctx context.Context, k cid.Cid) []peer.ID { - gp := &getProv{ - k: k, - resp: make(chan []peer.ID, 1), // buffered to prevent sender from blocking - } - select { - case <-ctx.Done(): - return nil - case pm.getprovs <- gp: - } - select { - case <-ctx.Done(): - return nil - case peers := <-gp.resp: - return peers - } -} - -func newProviderSet() *providerSet { - return &providerSet{ - set: make(map[peer.ID]time.Time), - } -} - -func (ps *providerSet) Add(p peer.ID) { - ps.setVal(p, time.Now()) -} - -func (ps *providerSet) setVal(p peer.ID, t time.Time) { - _, found := ps.set[p] - if !found { - ps.providers = append(ps.providers, p) - } - - ps.set[p] = t -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/query.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/query.go deleted file mode 100644 index 1c1a419479..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/query.go +++ /dev/null @@ -1,313 +0,0 @@ -// package query implement a query manager to drive concurrent workers -// to query the DHT. A query is setup with a target key, a queryFunc tasked -// to communicate with a peer, and a set of initial peers. As the query -// progress, queryFunc can return closer peers that will be used to navigate -// closer to the target key in the DHT until an answer is reached. -package dht - -import ( - "context" - "sync" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - todoctr "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter" - process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ctxproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pset "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - queue "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" -) - -var maxQueryConcurrency = AlphaValue - -type dhtQuery struct { - dht *IpfsDHT - key string // the key we're querying for - qfunc queryFunc // the function to execute per peer - concurrency int // the concurrency parameter -} - -type dhtQueryResult struct { - value []byte // GetValue - peer *pstore.PeerInfo // FindPeer - providerPeers []pstore.PeerInfo // GetProviders - closerPeers []*pstore.PeerInfo // * - success bool - - finalSet *pset.PeerSet - queriedSet *pset.PeerSet -} - -// constructs query -func (dht *IpfsDHT) newQuery(k string, f queryFunc) *dhtQuery { - return &dhtQuery{ - key: k, - dht: dht, - qfunc: f, - concurrency: maxQueryConcurrency, - } -} - -// QueryFunc is a function that runs a particular query with a given peer. -// It returns either: -// - the value -// - a list of peers potentially better able to serve the query -// - an error -type queryFunc func(context.Context, peer.ID) (*dhtQueryResult, error) - -// Run runs the query at hand. pass in a list of peers to use first. -func (q *dhtQuery) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - runner := newQueryRunner(q) - return runner.Run(ctx, peers) -} - -type dhtQueryRunner struct { - query *dhtQuery // query to run - peersSeen *pset.PeerSet // all peers queried. prevent querying same peer 2x - peersQueried *pset.PeerSet // peers successfully connected to and queried - peersToQuery *queue.ChanQueue // peers remaining to be queried - peersRemaining todoctr.Counter // peersToQuery + currently processing - - result *dhtQueryResult // query result - errs u.MultiErr // result errors. maybe should be a map[peer.ID]error - - rateLimit chan struct{} // processing semaphore - log logging.EventLogger - - runCtx context.Context - - proc process.Process - sync.RWMutex -} - -func newQueryRunner(q *dhtQuery) *dhtQueryRunner { - proc := process.WithParent(process.Background()) - ctx := ctxproc.OnClosingContext(proc) - return &dhtQueryRunner{ - query: q, - peersToQuery: queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))), - peersRemaining: todoctr.NewSyncCounter(), - peersSeen: pset.New(), - peersQueried: pset.New(), - rateLimit: make(chan struct{}, q.concurrency), - proc: proc, - } -} - -func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - r.log = log - r.runCtx = ctx - - if len(peers) == 0 { - log.Warning("Running query with no peers!") - return nil, nil - } - - // setup concurrency rate limiting - for i := 0; i < r.query.concurrency; i++ { - r.rateLimit <- struct{}{} - } - - // add all the peers we got first. - for _, p := range peers { - r.addPeerToQuery(p) - } - - // go do this thing. - // do it as a child proc to make sure Run exits - // ONLY AFTER spawn workers has exited. - r.proc.Go(r.spawnWorkers) - - // so workers are working. - - // wait until they're done. - err := routing.ErrNotFound - - // now, if the context finishes, close the proc. - // we have to do it here because the logic before is setup, which - // should run without closing the proc. - ctxproc.CloseAfterContext(r.proc, ctx) - - select { - case <-r.peersRemaining.Done(): - r.proc.Close() - r.RLock() - defer r.RUnlock() - - err = routing.ErrNotFound - - // if every query to every peer failed, something must be very wrong. - if len(r.errs) > 0 && len(r.errs) == r.peersSeen.Size() { - log.Debugf("query errs: %s", r.errs) - err = r.errs[0] - } - - case <-r.proc.Closed(): - r.RLock() - defer r.RUnlock() - err = context.DeadlineExceeded - } - - if r.result != nil && r.result.success { - return r.result, nil - } - - return &dhtQueryResult{ - finalSet: r.peersSeen, - queriedSet: r.peersQueried, - }, err -} - -func (r *dhtQueryRunner) addPeerToQuery(next peer.ID) { - // if new peer is ourselves... - if next == r.query.dht.self { - r.log.Debug("addPeerToQuery skip self") - return - } - - if !r.peersSeen.TryAdd(next) { - return - } - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.AddingPeer, - ID: next, - }) - - r.peersRemaining.Increment(1) - select { - case r.peersToQuery.EnqChan <- next: - case <-r.proc.Closing(): - } -} - -func (r *dhtQueryRunner) spawnWorkers(proc process.Process) { - for { - - select { - case <-r.peersRemaining.Done(): - return - - case <-r.proc.Closing(): - return - - case <-r.rateLimit: - select { - case p, more := <-r.peersToQuery.DeqChan: - if !more { - return // channel closed. - } - - // do it as a child func to make sure Run exits - // ONLY AFTER spawn workers has exited. - proc.Go(func(proc process.Process) { - r.queryPeer(proc, p) - }) - case <-r.proc.Closing(): - return - case <-r.peersRemaining.Done(): - return - } - } - } -} - -func (r *dhtQueryRunner) queryPeer(proc process.Process, p peer.ID) { - // ok let's do this! - - // create a context from our proc. - ctx := ctxproc.OnClosingContext(proc) - - // make sure we do this when we exit - defer func() { - // signal we're done processing peer p - r.peersRemaining.Decrement(1) - r.rateLimit <- struct{}{} - }() - - // make sure we're connected to the peer. - // FIXME abstract away into the network layer - // Note: Failure to connect in this block will cause the function to - // short circuit. - if r.query.dht.host.Network().Connectedness(p) == inet.NotConnected { - log.Debug("not connected. dialing.") - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.DialingPeer, - ID: p, - }) - // while we dial, we do not take up a rate limit. this is to allow - // forward progress during potentially very high latency dials. - r.rateLimit <- struct{}{} - - pi := pstore.PeerInfo{ID: p} - - if err := r.query.dht.host.Connect(ctx, pi); err != nil { - log.Debugf("Error connecting: %s", err) - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - ID: p, - }) - - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - <-r.rateLimit // need to grab it again, as we deferred. - return - } - <-r.rateLimit // need to grab it again, as we deferred. - log.Debugf("connected. dial success.") - } - - // finally, run the query against this peer - res, err := r.query.qfunc(ctx, p) - - r.peersQueried.Add(p) - - if err != nil { - log.Debugf("ERROR worker for: %v %v", p, err) - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - - } else if res.success { - log.Debugf("SUCCESS worker for: %v %s", p, res) - r.Lock() - r.result = res - r.Unlock() - go r.proc.Close() // signal to everyone that we're done. - // must be async, as we're one of the children, and Close blocks. - - } else if len(res.closerPeers) > 0 { - log.Debugf("PEERS CLOSER -- worker for: %v (%d closer peers)", p, len(res.closerPeers)) - for _, next := range res.closerPeers { - if next.ID == r.query.dht.self { // don't add self. - log.Debugf("PEERS CLOSER -- worker for: %v found self", p) - continue - } - - // add their addresses to the dialer's peerstore - r.query.dht.peerstore.AddAddrs(next.ID, next.Addrs, pstore.TempAddrTTL) - r.addPeerToQuery(next.ID) - log.Debugf("PEERS CLOSER -- worker for: %v added %v (%v)", p, next.ID, next.Addrs) - } - } else { - log.Debugf("QUERY worker for: %v - not found, and no closer peers.", p) - } -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/records.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/records.go deleted file mode 100644 index 33c9140472..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/records.go +++ /dev/null @@ -1,138 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "time" - - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" -) - -// MaxRecordAge specifies the maximum time that any node will hold onto a record -// from the time its received. This does not apply to any other forms of validity that -// the record may contain. -// For example, a record may contain an ipns entry with an EOL saying its valid -// until the year 2020 (a great time in the future). For that record to stick around -// it must be rebroadcasted more frequently than once every 'MaxRecordAge' - -// OpenBazaar: MaxRecordAge has been increased to one week to support longer caching. -const MaxRecordAge = time.Hour * 24 * 7 - -type pubkrs struct { - pubk ci.PubKey - err error -} - -func (dht *IpfsDHT) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { - log.Debugf("getPublicKey for: %s", p) - - // Check locally. Will also try to extract the public key from the peer - // ID itself if possible (if inlined). - pk := dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - // Try getting the public key both directly from the node it identifies - // and from the DHT, in parallel - ctx, cancel := context.WithCancel(ctx) - defer cancel() - resp := make(chan pubkrs, 2) - go func() { - pubk, err := dht.getPublicKeyFromNode(ctx, p) - resp <- pubkrs{pubk, err} - }() - - // Note that the number of open connections is capped by the dial - // limiter, so there is a chance that getPublicKeyFromDHT(), which - // potentially opens a lot of connections, will block - // getPublicKeyFromNode() from getting a connection. - // Currently this doesn't seem to cause an issue so leaving as is - // for now. - go func() { - pubk, err := dht.getPublicKeyFromDHT(ctx, p) - resp <- pubkrs{pubk, err} - }() - - // Wait for one of the two go routines to return - // a public key (or for both to error out) - var err error - for i := 0; i < 2; i++ { - r := <-resp - if r.err == nil { - // Found the public key - err := dht.peerstore.AddPubKey(p, r.pubk) - if err != nil { - log.Warningf("Failed to add public key to peerstore for %v", p) - } - return r.pubk, nil - } - err = r.err - } - - // Both go routines failed to find a public key - return nil, err -} - -func (dht *IpfsDHT) getPublicKeyFromDHT(ctx context.Context, p peer.ID) (ci.PubKey, error) { - // Only retrieve one value, because the public key is immutable - // so there's no need to retrieve multiple versions - pkkey := routing.KeyForPublicKey(p) - val, err := dht.GetValue(ctx, pkkey, Quorum(1)) - if err != nil { - return nil, err - } - - pubk, err := ci.UnmarshalPublicKey(val) - if err != nil { - log.Errorf("Could not unmarshall public key retrieved from DHT for %v", p) - return nil, err - } - - // Note: No need to check that public key hash matches peer ID - // because this is done by GetValues() - log.Debugf("Got public key for %s from DHT", p) - return pubk, nil -} - -func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.PubKey, error) { - // check locally, just in case... - pk := dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - // Get the key from the node itself - pkkey := routing.KeyForPublicKey(p) - pmes, err := dht.getValueSingle(ctx, p, pkkey) - if err != nil { - return nil, err - } - - // node doesn't have key :( - record := pmes.GetRecord() - if record == nil { - return nil, fmt.Errorf("node %v not responding with its public key", p) - } - - pubk, err := ci.UnmarshalPublicKey(record.GetValue()) - if err != nil { - log.Errorf("Could not unmarshall public key for %v", p) - return nil, err - } - - // Make sure the public key matches the peer ID - id, err := peer.IDFromPublicKey(pubk) - if err != nil { - log.Errorf("Could not extract peer id from public key for %v", p) - return nil, err - } - if id != p { - return nil, fmt.Errorf("public key %v does not match peer %v", id, p) - } - - log.Debugf("Got public key from node %v itself", p) - return pubk, nil -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing.go deleted file mode 100644 index 35cc2c8826..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing.go +++ /dev/null @@ -1,712 +0,0 @@ -package dht - -import ( - "bytes" - "context" - "fmt" - "runtime" - "sync" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - pb "gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pset "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" - - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" -) - -// asyncQueryBuffer is the size of buffered channels in async queries. This -// buffer allows multiple queries to execute simultaneously, return their -// results and continue querying closer peers. Note that different query -// results will wait for the channel to drain. -var asyncQueryBuffer = 10 - -// This file implements the Routing interface for the IpfsDHT struct. - -// Basic Put/Get - -// PutValue adds value corresponding to given Key. -// This is the top level "Store" operation of the DHT -func (dht *IpfsDHT) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) (err error) { - eip := log.EventBegin(ctx, "PutValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - log.Debugf("PutValue %s", key) - - // don't even allow local users to put bad values. - if err := dht.Validator.Validate(key, value); err != nil { - return err - } - - old, err := dht.getLocal(key) - if err != nil { - // Means something is wrong with the datastore. - return err - } - - // Check if we have an old value that's not the same as the new one. - if old != nil && !bytes.Equal(old.GetValue(), value) { - // Check to see if the new one is better. - i, err := dht.Validator.Select(key, [][]byte{value, old.GetValue()}) - if err != nil { - return err - } - if i != 0 { - return fmt.Errorf("can't replace a newer value with an older value") - } - } - - rec := record.MakePutRecord(key, value) - rec.TimeReceived = u.FormatRFC3339(time.Now()) - err = dht.putLocal(key, rec) - if err != nil { - return err - } - - pchan, err := dht.GetClosestPeers(ctx, key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range pchan { - wg.Add(1) - go func(p peer.ID) { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - defer wg.Done() - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.Value, - ID: p, - }) - - err := dht.putValueToPeer(ctx, p, rec) - if err != nil { - log.Debugf("failed putting value to peer: %s", err) - } - }(p) - } - wg.Wait() - return nil -} - -// RecvdVal stores a value and the peer from which we got the value. -type RecvdVal struct { - Val []byte - From peer.ID -} - -// GetValue searches for the value corresponding to given Key. -func (dht *IpfsDHT) GetValue(ctx context.Context, key string, opts ...ropts.Option) (_ []byte, err error) { - eip := log.EventBegin(ctx, "GetValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // apply defaultQuorum if relevant - var cfg ropts.Options - if err := cfg.Apply(opts...); err != nil { - return nil, err - } - opts = append(opts, Quorum(getQuorum(&cfg, defaultQuorum))) - - responses, err := dht.SearchValue(ctx, key, opts...) - if err != nil { - return nil, err - } - var best []byte - - for r := range responses { - best = r - } - - if ctx.Err() != nil { - return best, ctx.Err() - } - - if best == nil { - return nil, routing.ErrNotFound - } - log.Debugf("GetValue %v %v", key, best) - return best, nil -} - -func (dht *IpfsDHT) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { - var cfg ropts.Options - if err := cfg.Apply(opts...); err != nil { - return nil, err - } - - responsesNeeded := 0 - if !cfg.Offline { - responsesNeeded = getQuorum(&cfg, -1) - } - - valCh, err := dht.getValues(ctx, key, responsesNeeded) - if err != nil { - return nil, err - } - - out := make(chan []byte) - go func() { - defer close(out) - - maxVals := responsesNeeded - if maxVals < 0 { - maxVals = defaultQuorum * 4 // we want some upper bound on how - // much correctional entries we will send - } - - // vals is used collect entries we got so far and send corrections to peers - // when we exit this function - vals := make([]RecvdVal, 0, maxVals) - var best *RecvdVal - - defer func() { - if len(vals) <= 1 || best == nil { - return - } - fixupRec := record.MakePutRecord(key, best.Val) - for _, v := range vals { - // if someone sent us a different 'less-valid' record, lets correct them - if !bytes.Equal(v.Val, best.Val) { - go func(v RecvdVal) { - if v.From == dht.self { - err := dht.putLocal(key, fixupRec) - if err != nil { - log.Error("Error correcting local dht entry:", err) - } - return - } - ctx, cancel := context.WithTimeout(dht.Context(), time.Second*30) - defer cancel() - err := dht.putValueToPeer(ctx, v.From, fixupRec) - if err != nil { - log.Debug("Error correcting DHT entry: ", err) - } - }(v) - } - } - }() - - for { - select { - case v, ok := <-valCh: - if !ok { - return - } - - if len(vals) < maxVals { - vals = append(vals, v) - } - - if v.Val == nil { - continue - } - // Select best value - if best != nil { - if bytes.Equal(best.Val, v.Val) { - continue - } - sel, err := dht.Validator.Select(key, [][]byte{best.Val, v.Val}) - if err != nil { - log.Warning("Failed to select dht key: ", err) - continue - } - if sel != 1 { - continue - } - } - best = &v - select { - case out <- v.Val: - case <-ctx.Done(): - return - } - case <-ctx.Done(): - return - } - } - }() - - return out, nil -} - -// GetValues gets nvals values corresponding to the given key. -func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) { - eip := log.EventBegin(ctx, "GetValues") - - eip.Append(loggableKey(key)) - defer eip.Done() - - valCh, err := dht.getValues(ctx, key, nvals) - if err != nil { - eip.SetError(err) - return nil, err - } - - out := make([]RecvdVal, 0, nvals) - for val := range valCh { - out = append(out, val) - } - - return out, ctx.Err() -} - -func (dht *IpfsDHT) getValues(ctx context.Context, key string, nvals int) (<-chan RecvdVal, error) { - vals := make(chan RecvdVal, 1) - - done := func(err error) (<-chan RecvdVal, error) { - defer close(vals) - return vals, err - } - - // If we have it local, don't bother doing an RPC! - lrec, err := dht.getLocal(key) - if err != nil { - // something is wrong with the datastore. - return done(err) - } - if lrec != nil { - // TODO: this is tricky, we don't always want to trust our own value - // what if the authoritative source updated it? - log.Debug("have it locally") - vals <- RecvdVal{ - Val: lrec.GetValue(), - From: dht.self, - } - - if nvals == 0 || nvals == 1 { - return done(nil) - } - - nvals-- - } else if nvals == 0 { - return done(routing.ErrNotFound) - } - - // get closest peers in the routing table - rtp := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - log.Debugf("peers in rt: %d %s", len(rtp), rtp) - if len(rtp) == 0 { - log.Warning("No peers from routing table!") - return done(kb.ErrLookupFailure) - } - - var valslock sync.Mutex - var got int - - // setup the Query - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - rec, peers, err := dht.getValueOrPeers(ctx, p, key) - switch err { - case routing.ErrNotFound: - // in this case, they responded with nothing, - // still send a notification so listeners can know the - // request has completed 'successfully' - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - }) - return nil, err - default: - return nil, err - - case nil, errInvalidRecord: - // in either of these cases, we want to keep going - } - - res := &dhtQueryResult{closerPeers: peers} - - if rec.GetValue() != nil || err == errInvalidRecord { - rv := RecvdVal{ - Val: rec.GetValue(), - From: p, - } - valslock.Lock() - select { - case vals <- rv: - case <-ctx.Done(): - valslock.Unlock() - return nil, ctx.Err() - } - got++ - - // If we have collected enough records, we're done - if nvals == got { - res.success = true - } - valslock.Unlock() - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peers, - }) - - return res, nil - }) - - go func() { - reqCtx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - _, err = query.Run(reqCtx, rtp) - - // We do have some values but we either ran out of peers to query or - // searched for a whole minute. - // - // We'll just call this a success. - if got > 0 && (err == routing.ErrNotFound || reqCtx.Err() == context.DeadlineExceeded) { - err = nil - } - done(err) - }() - - return vals, nil -} - -// Provider abstraction for indirect stores. -// Some DHTs store values directly, while an indirect store stores pointers to -// locations of the value, similarly to Coral and Mainline DHT. - -// Provide makes this node announce that it can provide a value for the given key -func (dht *IpfsDHT) Provide(ctx context.Context, key cid.Cid, brdcst bool) (err error) { - eip := log.EventBegin(ctx, "Provide", key, logging.LoggableMap{"broadcast": brdcst}) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // add self locally - dht.providers.AddProvider(ctx, key, dht.self) - if !brdcst { - return nil - } - - peers, err := dht.GetClosestPeers(ctx, key.KeyString()) - if err != nil { - return err - } - - mes, err := dht.makeProvRecord(key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range peers { - wg.Add(1) - go func(p peer.ID) { - defer wg.Done() - log.Debugf("putProvider(%s, %s)", key, p) - err := dht.sendMessage(ctx, p, mes) - if err != nil { - log.Debug(err) - } - }(p) - } - wg.Wait() - return nil -} -func (dht *IpfsDHT) makeProvRecord(skey cid.Cid) (*pb.Message, error) { - pi := pstore.PeerInfo{ - ID: dht.self, - Addrs: dht.host.Addrs(), - } - - // // only share WAN-friendly addresses ?? - // pi.Addrs = addrutil.WANShareableAddrs(pi.Addrs) - if len(pi.Addrs) < 1 { - return nil, fmt.Errorf("no known addresses for self. cannot put provider.") - } - - pmes := pb.NewMessage(pb.Message_ADD_PROVIDER, skey.Bytes(), 0) - pmes.ProviderPeers = pb.RawPeerInfosToPBPeers([]pstore.PeerInfo{pi}) - return pmes, nil -} - -// FindProviders searches until the context expires. -func (dht *IpfsDHT) FindProviders(ctx context.Context, c cid.Cid) ([]pstore.PeerInfo, error) { - var providers []pstore.PeerInfo - for p := range dht.FindProvidersAsync(ctx, c, KValue) { - providers = append(providers, p) - } - return providers, nil -} - -// FindProvidersAsync is the same thing as FindProviders, but returns a channel. -// Peers will be returned on the channel as soon as they are found, even before -// the search query completes. -func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan pstore.PeerInfo { - log.Event(ctx, "findProviders", key) - peerOut := make(chan pstore.PeerInfo, count) - go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) - return peerOut -} - -func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key cid.Cid, count int, peerOut chan pstore.PeerInfo) { - defer log.EventBegin(ctx, "findProvidersAsync", key).Done() - defer close(peerOut) - - ps := pset.NewLimited(count) - provs := dht.providers.GetProviders(ctx, key) - for _, p := range provs { - // NOTE: Assuming that this list of peers is unique - if ps.TryAdd(p) { - pi := dht.peerstore.PeerInfo(p) - select { - case peerOut <- pi: - case <-ctx.Done(): - return - } - } - - // If we have enough peers locally, don't bother with remote RPC - // TODO: is this a DOS vector? - if ps.Size() >= count { - return - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(key.KeyString(), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - pmes, err := dht.findProvidersSingle(ctx, p, key) - if err != nil { - return nil, err - } - - log.Debugf("%d provider entries", len(pmes.GetProviderPeers())) - provs := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - log.Debugf("%d provider entries decoded", len(provs)) - - // Add unique providers from request, up to 'count' - for _, prov := range provs { - if prov.ID != dht.self { - dht.peerstore.AddAddrs(prov.ID, prov.Addrs, pstore.TempAddrTTL) - } - log.Debugf("got provider: %s", prov) - if ps.TryAdd(prov.ID) { - log.Debugf("using provider: %s", prov) - select { - case peerOut <- *prov: - case <-ctx.Done(): - log.Debug("context timed out sending more providers") - return nil, ctx.Err() - } - } - if ps.Size() >= count { - log.Debugf("got enough providers (%d/%d)", ps.Size(), count) - return &dhtQueryResult{success: true}, nil - } - } - - // Give closer peers back to the query to be queried - closer := pmes.GetCloserPeers() - clpeers := pb.PBPeersToPeerInfos(closer) - log.Debugf("got closer peers: %d %s", len(clpeers), clpeers) - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeers, - }) - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - peers := dht.routingTable.NearestPeers(kb.ConvertKey(key.KeyString()), AlphaValue) - _, err := query.Run(ctx, peers) - if err != nil { - log.Debugf("Query error: %s", err) - // Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032 - if fmt.Sprint(err) == "" { - log.Error("reproduced bug 3032:") - log.Errorf("Errors type information: %#v", err) - log.Errorf("go version: %s", runtime.Version()) - log.Error("please report this information to: https://github.com/ipfs/go-ipfs/issues/3032") - - // replace problematic error with something that won't crash the daemon - err = fmt.Errorf("") - } - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - }) - } -} - -// FindPeer searches for a peer with given ID. -func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (_ pstore.PeerInfo, err error) { - eip := log.EventBegin(ctx, "FindPeer", id) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // Check if were already connected to them - if pi := dht.FindLocal(id); pi.ID != "" { - return pi, nil - } - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return pstore.PeerInfo{}, kb.ErrLookupFailure - } - - // Sanity... - for _, p := range peers { - if p == id { - log.Debug("found target peer in list of closest peers...") - return dht.peerstore.PeerInfo(p), nil - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - closer := pmes.GetCloserPeers() - clpeerInfos := pb.PBPeersToPeerInfos(closer) - - // see if we got the peer here - for _, npi := range clpeerInfos { - if npi.ID == id { - return &dhtQueryResult{ - peer: npi, - success: true, - }, nil - } - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeerInfos, - }) - - return &dhtQueryResult{closerPeers: clpeerInfos}, nil - }) - - // run it! - result, err := query.Run(ctx, peers) - if err != nil { - return pstore.PeerInfo{}, err - } - - log.Debugf("FindPeer %v %v", id, result.success) - if result.peer.ID == "" { - return pstore.PeerInfo{}, routing.ErrNotFound - } - - return *result.peer, nil -} - -// FindPeersConnectedToPeer searches for peers directly connected to a given peer. -func (dht *IpfsDHT) FindPeersConnectedToPeer(ctx context.Context, id peer.ID) (<-chan *pstore.PeerInfo, error) { - - peerchan := make(chan *pstore.PeerInfo, asyncQueryBuffer) - peersSeen := make(map[peer.ID]struct{}) - var peersSeenMx sync.Mutex - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return nil, kb.ErrLookupFailure - } - - // setup the Query - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - var clpeers []*pstore.PeerInfo - closer := pmes.GetCloserPeers() - for _, pbp := range closer { - pi := pb.PBPeerToPeerInfo(pbp) - - // skip peers already seen - peersSeenMx.Lock() - if _, found := peersSeen[pi.ID]; found { - peersSeenMx.Unlock() - continue - } - peersSeen[pi.ID] = struct{}{} - peersSeenMx.Unlock() - - // if peer is connected, send it to our client. - if pb.Connectedness(pbp.Connection) == inet.Connected { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case peerchan <- pi: - } - } - - // if peer is the peer we're looking for, don't bother querying it. - // TODO maybe query it? - if pb.Connectedness(pbp.Connection) != inet.Connected { - clpeers = append(clpeers, pi) - } - } - - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - // run it! run it asynchronously to gen peers as results are found. - // this does no error checking - go func() { - if _, err := query.Run(ctx, peers); err != nil { - log.Debug(err) - } - - // close the peerchan channel when done. - close(peerchan) - }() - - return peerchan, nil -} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing_options.go b/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing_options.go deleted file mode 100644 index 3a2513fd43..0000000000 --- a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/routing_options.go +++ /dev/null @@ -1,31 +0,0 @@ -package dht - -import ( - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" -) - -type quorumOptionKey struct{} - -const defaultQuorum = 16 - -// Quorum is a DHT option that tells the DHT how many peers it needs to get -// values from before returning the best one. -// -// Default: 16 -func Quorum(n int) ropts.Option { - return func(opts *ropts.Options) error { - if opts.Other == nil { - opts.Other = make(map[interface{}]interface{}, 1) - } - opts.Other[quorumOptionKey{}] = n - return nil - } -} - -func getQuorum(opts *ropts.Options, ndefault int) int { - responsesNeeded, ok := opts.Other[quorumOptionKey{}].(int) - if !ok { - responsesNeeded = ndefault - } - return responsesNeeded -} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/.travis.yml b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/.travis.yml deleted file mode 100644 index 6a8c2aa7f3..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: required - -os: - - linux - - osx - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/dial.go b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/dial.go deleted file mode 100644 index 65ee547884..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/dial.go +++ /dev/null @@ -1,113 +0,0 @@ -package tcpreuse - -import ( - "context" - "net" - - reuseport "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -type dialer interface { - Dial(network, addr string) (net.Conn, error) - DialContext(ctx context.Context, network, addr string) (net.Conn, error) -} - -// Dial dials the given multiaddr, reusing ports we're currently listening on if -// possible. -// -// Dial attempts to be smart about choosing the source port. For example, If -// we're dialing a loopback address and we're listening on one or more loopback -// ports, Dial will randomly choose one of the loopback ports and addresses and -// reuse it. -func (t *Transport) Dial(raddr ma.Multiaddr) (manet.Conn, error) { - return t.DialContext(context.Background(), raddr) -} - -// DialContext is like Dial but takes a context. -func (t *Transport) DialContext(ctx context.Context, raddr ma.Multiaddr) (manet.Conn, error) { - network, addr, err := manet.DialArgs(raddr) - if err != nil { - return nil, err - } - var d dialer - switch network { - case "tcp4": - d = t.v4.getDialer(network) - case "tcp6": - d = t.v6.getDialer(network) - default: - return nil, ErrWrongProto - } - conn, err := d.DialContext(ctx, network, addr) - if err != nil { - return nil, err - } - maconn, err := manet.WrapNetConn(conn) - if err != nil { - conn.Close() - return nil, err - } - return maconn, nil -} - -func (n *network) getDialer(network string) dialer { - n.mu.RLock() - d := n.dialer - n.mu.RUnlock() - if d == nil { - n.mu.Lock() - defer n.mu.Unlock() - - if n.dialer == nil { - n.dialer = n.makeDialer(network) - } - d = n.dialer - } - return d -} - -func (n *network) makeDialer(network string) dialer { - if !reuseport.Available() { - log.Debug("reuseport not available") - return &net.Dialer{} - } - - var unspec net.IP - switch network { - case "tcp4": - unspec = net.IPv4zero - case "tcp6": - unspec = net.IPv6unspecified - default: - panic("invalid network: must be either tcp4 or tcp6") - } - - // How many ports are we listening on. - var port = 0 - for l := range n.listeners { - newPort := l.Addr().(*net.TCPAddr).Port - switch { - case newPort == 0: // Any port, ignore (really, we shouldn't get this case...). - case port == 0: // Haven't selected a port yet, choose this one. - port = newPort - case newPort == port: // Same as the selected port, continue... - default: // Multiple ports, use the multi dialer - return newMultiDialer(unspec, n.listeners) - } - } - - // None. - if port == 0 { - return &net.Dialer{} - } - - // One. Always dial from the single port we're listening on. - laddr := &net.TCPAddr{ - IP: unspec, - Port: port, - } - - return (*singleDialer)(laddr) -} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/listen.go b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/listen.go deleted file mode 100644 index 95105b29ad..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/listen.go +++ /dev/null @@ -1,80 +0,0 @@ -package tcpreuse - -import ( - "net" - - reuseport "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -type listener struct { - manet.Listener - network *network -} - -func (l *listener) Close() error { - l.network.mu.Lock() - delete(l.network.listeners, l) - l.network.dialer = nil - l.network.mu.Unlock() - return l.Listener.Close() -} - -// Listen listens on the given multiaddr. -// -// If reuseport is supported, it will be enabled for this listener and future -// dials from this transport may reuse the port. -// -// Note: You can listen on the same multiaddr as many times as you want -// (although only *one* listener will end up handling the inbound connection). -func (t *Transport) Listen(laddr ma.Multiaddr) (manet.Listener, error) { - nw, naddr, err := manet.DialArgs(laddr) - if err != nil { - return nil, err - } - var n *network - switch nw { - case "tcp4": - n = &t.v4 - case "tcp6": - n = &t.v6 - default: - return nil, ErrWrongProto - } - - if !reuseport.Available() { - return manet.Listen(laddr) - } - nl, err := reuseport.Listen(nw, naddr) - if err != nil { - return manet.Listen(laddr) - } - - if _, ok := nl.Addr().(*net.TCPAddr); !ok { - nl.Close() - return nil, ErrWrongProto - } - - malist, err := manet.WrapNetListener(nl) - if err != nil { - nl.Close() - return nil, err - } - - list := &listener{ - Listener: malist, - network: n, - } - - n.mu.Lock() - defer n.mu.Unlock() - - if n.listeners == nil { - n.listeners = make(map[*listener]struct{}) - } - n.listeners[list] = struct{}{} - n.dialer = nil - - return list, nil -} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/package.json b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/package.json deleted file mode 100644 index 59619ae230..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": "stebalien", - "bugs": { - "url": "https://github.com/libp2p/go-reuseport-transport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-reuseport-transport" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni", - "name": "go-reuseport", - "version": "0.1.18" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-reuseport-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.11" -} - diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/reuseport.go b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/reuseport.go deleted file mode 100644 index 4537ade0c2..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/reuseport.go +++ /dev/null @@ -1,63 +0,0 @@ -package tcpreuse - -import ( - "context" - "net" - "syscall" - - reuseport "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport" -) - -var fallbackDialer net.Dialer - -// reuseErrShouldRetry diagnoses whether to retry after a reuse error. -// if we failed to bind, we should retry. if bind worked and this is a -// real dial error (remote end didnt answer) then we should not retry. -func reuseErrShouldRetry(err error) bool { - if err == nil { - return false // hey, it worked! no need to retry. - } - - // if it's a network timeout error, it's a legitimate failure. - if nerr, ok := err.(net.Error); ok && nerr.Timeout() { - return false - } - - errno, ok := err.(syscall.Errno) - if !ok { // not an errno? who knows what this is. retry. - return true - } - - switch errno { - case syscall.EADDRINUSE, syscall.EADDRNOTAVAIL: - return true // failure to bind. retry. - case syscall.ECONNREFUSED: - return false // real dial error - default: - return true // optimistically default to retry. - } -} - -// Dials using reusport and then redials normally if that fails. -func reuseDial(ctx context.Context, laddr *net.TCPAddr, network, raddr string) (net.Conn, error) { - if laddr == nil { - return fallbackDialer.DialContext(ctx, network, raddr) - } - - d := reuseport.Dialer{ - D: net.Dialer{ - LocalAddr: laddr, - }, - } - - con, err := d.DialContext(ctx, network, raddr) - if err == nil { - return con, nil - } - - if reuseErrShouldRetry(err) && ctx.Err() == nil { - log.Debugf("failed to reuse port, dialing with a random port: %s", err) - con, err = fallbackDialer.DialContext(ctx, network, raddr) - } - return con, err -} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/transport.go b/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/transport.go deleted file mode 100644 index cfdbc2f990..0000000000 --- a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/transport.go +++ /dev/null @@ -1,25 +0,0 @@ -package tcpreuse - -import ( - "errors" - "sync" - - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("reuseport-transport") - -// ErrWrongProto is returned when dialing a protocol other than tcp. -var ErrWrongProto = errors.New("can only dial TCP over IPv4 or IPv6") - -// Transport is a TCP reuse transport that reuses listener ports. -type Transport struct { - v4 network - v6 network -} - -type network struct { - mu sync.RWMutex - listeners map[*listener]struct{} - dialer dialer -} diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/README.md b/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/README.md deleted file mode 100644 index cdc6c9a498..0000000000 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Terminal progress bar for Go - -[![Join the chat at https://gitter.im/cheggaaa/pb](https://badges.gitter.im/cheggaaa/pb.svg)](https://gitter.im/cheggaaa/pb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -Simple progress bar for console programs. - -Please check the new version https://github.com/cheggaaa/pb/tree/v2 (currently, it's beta) - -## Installation - -``` -go get gopkg.in/cheggaaa/pb.v1 -``` - -## Usage - -```Go -package main - -import ( - "gopkg.in/cheggaaa/pb.v1" - "time" -) - -func main() { - count := 100000 - bar := pb.StartNew(count) - for i := 0; i < count; i++ { - bar.Increment() - time.Sleep(time.Millisecond) - } - bar.FinishPrint("The End!") -} - -``` - -Result will be like this: - -``` -> go run test.go -37158 / 100000 [================>_______________________________] 37.16% 1m11s -``` - -## Customization - -```Go -// create bar -bar := pb.New(count) - -// refresh info every second (default 200ms) -bar.SetRefreshRate(time.Second) - -// show percents (by default already true) -bar.ShowPercent = true - -// show bar (by default already true) -bar.ShowBar = true - -// no counters -bar.ShowCounters = false - -// show "time left" -bar.ShowTimeLeft = true - -// show average speed -bar.ShowSpeed = true - -// sets the width of the progress bar -bar.SetWidth(80) - -// sets the width of the progress bar, but if terminal size smaller will be ignored -bar.SetMaxWidth(80) - -// convert output to readable format (like KB, MB) -bar.SetUnits(pb.U_BYTES) - -// and start -bar.Start() -``` - -## Progress bar for IO Operations - -```go -// create and start bar -bar := pb.New(myDataLen).SetUnits(pb.U_BYTES) -bar.Start() - -// my io.Reader -r := myReader - -// my io.Writer -w := myWriter - -// create proxy reader -reader := bar.NewProxyReader(r) - -// and copy from pb reader -io.Copy(w, reader) - -``` - -```go -// create and start bar -bar := pb.New(myDataLen).SetUnits(pb.U_BYTES) -bar.Start() - -// my io.Reader -r := myReader - -// my io.Writer -w := myWriter - -// create multi writer -writer := io.MultiWriter(w, bar) - -// and copy -io.Copy(writer, r) - -bar.Finish() -``` - -## Custom Progress Bar Look-and-feel - -```go -bar.Format("<.- >") -``` - -## Multiple Progress Bars (experimental and unstable) - -Do not print to terminal while pool is active. - -```go -package main - -import ( - "math/rand" - "sync" - "time" - - "gopkg.in/cheggaaa/pb.v1" -) - -func main() { - // create bars - first := pb.New(200).Prefix("First ") - second := pb.New(200).Prefix("Second ") - third := pb.New(200).Prefix("Third ") - // start pool - pool, err := pb.StartPool(first, second, third) - if err != nil { - panic(err) - } - // update bars - wg := new(sync.WaitGroup) - for _, bar := range []*pb.ProgressBar{first, second, third} { - wg.Add(1) - go func(cb *pb.ProgressBar) { - for n := 0; n < 200; n++ { - cb.Increment() - time.Sleep(time.Millisecond * time.Duration(rand.Intn(100))) - } - cb.Finish() - wg.Done() - }(bar) - } - wg.Wait() - // close pool - pool.Stop() -} -``` - -The result will be as follows: - -``` -$ go run example/multiple.go -First 34 / 200 [=========>---------------------------------------------] 17.00% 00m08s -Second 42 / 200 [===========>------------------------------------------] 21.00% 00m06s -Third 36 / 200 [=========>---------------------------------------------] 18.00% 00m08s -``` diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/package.json b/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/package.json deleted file mode 100644 index c69a9612f5..0000000000 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "cheggaaa", - "bugs": { - "url": "https://github.com/cheggaaa/pb/issues" - }, - "gx": { - "dvcsimport": "github.com/cheggaaa/pb" - }, - "gxDependencies": [ - { - "author": "mattn", - "hash": "QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq", - "name": "go-colorable", - "version": "0.2.0" - }, - { - "author": "mattn", - "hash": "QmNu2sEu7LuoBQbnSoy8u6wk6oWwFX8L5nVVUZoK7J67oQ", - "name": "go-runewidth", - "version": "0.0.1" - }, - { - "author": "fatih", - "hash": "QmWsJXti4Nft4vXR8brjG2fJCUDWeJpwNVngyU42pByJxN", - "name": "color", - "version": "0.0.2" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "BSD-3-Clause", - "name": "pb", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.0.25" -} - diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_x.go b/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_x.go deleted file mode 100644 index 689f0fea5a..0000000000 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_x.go +++ /dev/null @@ -1,108 +0,0 @@ -// +build linux darwin freebsd netbsd openbsd solaris dragonfly -// +build !appengine - -package pb - -import ( - "errors" - "fmt" - "os" - "os/signal" - "sync" - "syscall" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -var ErrPoolWasStarted = errors.New("Bar pool was started") - -var ( - echoLockMutex sync.Mutex - origTermStatePtr *unix.Termios - tty *os.File -) - -func init() { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - - var err error - tty, err = os.Open("/dev/tty") - if err != nil { - tty = os.Stdin - } -} - -// terminalWidth returns width of the terminal. -func terminalWidth() (int, error) { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - - fd := int(tty.Fd()) - - ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) - if err != nil { - return 0, err - } - - return int(ws.Col), nil -} - -func lockEcho() (shutdownCh chan struct{}, err error) { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - if origTermStatePtr != nil { - return shutdownCh, ErrPoolWasStarted - } - - fd := int(tty.Fd()) - - origTermStatePtr, err = unix.IoctlGetTermios(fd, ioctlReadTermios) - if err != nil { - return nil, fmt.Errorf("Can't get terminal settings: %v", err) - } - - oldTermios := *origTermStatePtr - newTermios := oldTermios - newTermios.Lflag &^= syscall.ECHO - newTermios.Lflag |= syscall.ICANON | syscall.ISIG - newTermios.Iflag |= syscall.ICRNL - if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newTermios); err != nil { - return nil, fmt.Errorf("Can't set terminal settings: %v", err) - } - - shutdownCh = make(chan struct{}) - go catchTerminate(shutdownCh) - return -} - -func unlockEcho() error { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - if origTermStatePtr == nil { - return nil - } - - fd := int(tty.Fd()) - - if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, origTermStatePtr); err != nil { - return fmt.Errorf("Can't set terminal settings: %v", err) - } - - origTermStatePtr = nil - - return nil -} - -// listen exit signals and restore terminal state -func catchTerminate(shutdownCh chan struct{}) { - sig := make(chan os.Signal, 1) - signal.Notify(sig, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGKILL) - defer signal.Stop(sig) - select { - case <-shutdownCh: - unlockEcho() - case <-sig: - unlockEcho() - } -} diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/.travis.yml b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/.travis.yml deleted file mode 100644 index 0f82522299..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go -sudo: true - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/README.md b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/README.md deleted file mode 100644 index ce38d68c40..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# go-libp2p-crypto - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://github.com/libp2p/libp2p) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-crypto?status.svg)](https://godoc.org/github.com/ipfs/go-libp2p-crypto) -[![Coverage Status](https://coveralls.io/repos/github/ipfs/go-libp2p-crypto/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-libp2p-crypto?branch=master) -[![Build Status](https://travis-ci.org/libp2p/go-libp2p-crypto.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-crypto) - -> Various cryptographic utilities used by ipfs - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contribute](#contribute) - - [Want to hack on IPFS?](#want-to-hack-on-ipfs) -- [License](#license) - -## Install - -```sh -go get github.com/libp2p/go-libp2p-crypto -``` - -## Usage - -Go to https://godoc.org/github.com/libp2p/go-libp2p-crypto. - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-crypto/issues)! - -Check out our [contributing document](https://github.com/libp2p/community/blob/master/CONTRIBUTE.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License - -[MIT](LICENSE) © 2016 Jeromy Johnson diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/ed25519.go b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/ed25519.go deleted file mode 100644 index c8881d02a8..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/ed25519.go +++ /dev/null @@ -1,140 +0,0 @@ -package crypto - -import ( - "bytes" - "fmt" - "io" - - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519" - extra "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/extra25519" -) - -type Ed25519PrivateKey struct { - sk *[64]byte - pk *[32]byte -} - -type Ed25519PublicKey struct { - k *[32]byte -} - -func GenerateEd25519Key(src io.Reader) (PrivKey, PubKey, error) { - pub, priv, err := ed25519.GenerateKey(src) - if err != nil { - return nil, nil, err - } - - return &Ed25519PrivateKey{ - sk: priv, - pk: pub, - }, - &Ed25519PublicKey{ - k: pub, - }, - nil -} - -func (k *Ed25519PrivateKey) Type() pb.KeyType { - return pb.KeyType_Ed25519 -} - -func (k *Ed25519PrivateKey) Bytes() ([]byte, error) { - return MarshalPrivateKey(k) -} - -func (k *Ed25519PrivateKey) Raw() ([]byte, error) { - buf := make([]byte, 96) - copy(buf, k.sk[:]) - copy(buf[64:], k.pk[:]) - - return buf, nil -} - -func (k *Ed25519PrivateKey) Equals(o Key) bool { - edk, ok := o.(*Ed25519PrivateKey) - if !ok { - return false - } - - return bytes.Equal((*k.sk)[:], (*edk.sk)[:]) && bytes.Equal((*k.pk)[:], (*edk.pk)[:]) -} - -func (k *Ed25519PrivateKey) GetPublic() PubKey { - return &Ed25519PublicKey{k.pk} -} - -func (k *Ed25519PrivateKey) Sign(msg []byte) ([]byte, error) { - out := ed25519.Sign(k.sk, msg) - return (*out)[:], nil -} - -func (k *Ed25519PrivateKey) ToCurve25519() *[32]byte { - var sk [32]byte - extra.PrivateKeyToCurve25519(&sk, k.sk) - return &sk -} - -func (k *Ed25519PublicKey) Type() pb.KeyType { - return pb.KeyType_Ed25519 -} - -func (k *Ed25519PublicKey) Bytes() ([]byte, error) { - return MarshalPublicKey(k) -} - -func (k *Ed25519PublicKey) Raw() ([]byte, error) { - return (*k.k)[:], nil -} - -func (k *Ed25519PublicKey) Equals(o Key) bool { - edk, ok := o.(*Ed25519PublicKey) - if !ok { - return false - } - - return bytes.Equal((*k.k)[:], (*edk.k)[:]) -} - -func (k *Ed25519PublicKey) Verify(data []byte, sig []byte) (bool, error) { - var asig [64]byte - copy(asig[:], sig) - return ed25519.Verify(k.k, data, &asig), nil -} - -func (k *Ed25519PublicKey) ToCurve25519() (*[32]byte, error) { - var pk [32]byte - success := extra.PublicKeyToCurve25519(&pk, k.k) - if !success { - return nil, fmt.Errorf("Error converting ed25519 pubkey to curve25519 pubkey") - } - return &pk, nil -} - -func UnmarshalEd25519PublicKey(data []byte) (PubKey, error) { - if len(data) != 32 { - return nil, fmt.Errorf("expect ed25519 public key data size to be 32") - } - - var pub [32]byte - copy(pub[:], data) - - return &Ed25519PublicKey{ - k: &pub, - }, nil -} - -func UnmarshalEd25519PrivateKey(data []byte) (PrivKey, error) { - if len(data) != 96 { - return nil, fmt.Errorf("expected ed25519 data size to be 96") - } - var priv [64]byte - var pub [32]byte - copy(priv[:], data) - copy(pub[:], data[64:]) - - return &Ed25519PrivateKey{ - sk: &priv, - pk: &pub, - }, nil -} diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/key.go b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/key.go deleted file mode 100644 index c14e852199..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/key.go +++ /dev/null @@ -1,334 +0,0 @@ -// Package crypto implements various cryptographic utilities used by ipfs. -// This includes a Public and Private key interface and an RSA key implementation -// that satisfies it. -package crypto - -import ( - "bytes" - "encoding/base64" - "errors" - "fmt" - "io" - - "crypto/elliptic" - "crypto/hmac" - "crypto/rand" - "crypto/rsa" - "crypto/sha1" - "crypto/sha512" - "hash" - - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - - sha256 "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -var ErrBadKeyType = errors.New("invalid or unsupported key type") - -const ( - RSA = iota - Ed25519 - Secp256k1 -) - -var KeyTypes = []int{ - RSA, - Ed25519, - Secp256k1, -} - -// PubKeyUnmarshaller is a func that creates a PubKey from a given slice of bytes -type PubKeyUnmarshaller func(data []byte) (PubKey, error) - -// PrivKeyUnmarshaller is a func that creates a PrivKey from a given slice of bytes -type PrivKeyUnmarshaller func(data []byte) (PrivKey, error) - -var PubKeyUnmarshallers = map[pb.KeyType]PubKeyUnmarshaller{ - pb.KeyType_RSA: UnmarshalRsaPublicKey, - pb.KeyType_Ed25519: UnmarshalEd25519PublicKey, - pb.KeyType_Secp256k1: UnmarshalSecp256k1PublicKey, -} - -var PrivKeyUnmarshallers = map[pb.KeyType]PrivKeyUnmarshaller{ - pb.KeyType_RSA: UnmarshalRsaPrivateKey, - pb.KeyType_Ed25519: UnmarshalEd25519PrivateKey, - pb.KeyType_Secp256k1: UnmarshalSecp256k1PrivateKey, -} - -// Key represents a crypto key that can be compared to another key -type Key interface { - // Bytes returns a serialized, storeable representation of this key - // DEPRECATED in favor of Marshal / Unmarshal - Bytes() ([]byte, error) - - // Equals checks whether two PubKeys are the same - Equals(Key) bool - - // Raw returns the raw bytes of the key (not wrapped in the - // libp2p-crypto protobuf). - // - // This function is the inverse of {Priv,Pub}KeyUnmarshaler. - Raw() ([]byte, error) - - // Type returns the protobof key type. - Type() pb.KeyType -} - -// PrivKey represents a private key that can be used to generate a public key, -// sign data, and decrypt data that was encrypted with a public key -type PrivKey interface { - Key - - // Cryptographically sign the given bytes - Sign([]byte) ([]byte, error) - - // Return a public key paired with this private key - GetPublic() PubKey -} - -type PubKey interface { - Key - - // Verify that 'sig' is the signed hash of 'data' - Verify(data []byte, sig []byte) (bool, error) -} - -// Given a public key, generates the shared key. -type GenSharedKey func([]byte) ([]byte, error) - -func GenerateKeyPair(typ, bits int) (PrivKey, PubKey, error) { - return GenerateKeyPairWithReader(typ, bits, rand.Reader) -} - -// Generates a keypair of the given type and bitsize -func GenerateKeyPairWithReader(typ, bits int, src io.Reader) (PrivKey, PubKey, error) { - switch typ { - case RSA: - priv, err := rsa.GenerateKey(src, bits) - if err != nil { - return nil, nil, err - } - pk := &priv.PublicKey - return &RsaPrivateKey{sk: priv}, &RsaPublicKey{pk}, nil - case Ed25519: - return GenerateEd25519Key(src) - case Secp256k1: - return GenerateSecp256k1Key(src) - default: - return nil, nil, ErrBadKeyType - } -} - -// Generates an ephemeral public key and returns a function that will compute -// the shared secret key. Used in the identify module. -// -// Focuses only on ECDH now, but can be made more general in the future. -func GenerateEKeyPair(curveName string) ([]byte, GenSharedKey, error) { - var curve elliptic.Curve - - switch curveName { - case "P-256": - curve = elliptic.P256() - case "P-384": - curve = elliptic.P384() - case "P-521": - curve = elliptic.P521() - } - - priv, x, y, err := elliptic.GenerateKey(curve, rand.Reader) - if err != nil { - return nil, nil, err - } - - pubKey := elliptic.Marshal(curve, x, y) - - done := func(theirPub []byte) ([]byte, error) { - // Verify and unpack node's public key. - x, y := elliptic.Unmarshal(curve, theirPub) - if x == nil { - return nil, fmt.Errorf("Malformed public key: %d %v", len(theirPub), theirPub) - } - - if !curve.IsOnCurve(x, y) { - return nil, errors.New("Invalid public key.") - } - - // Generate shared secret. - secret, _ := curve.ScalarMult(x, y, priv) - - return secret.Bytes(), nil - } - - return pubKey, done, nil -} - -type StretchedKeys struct { - IV []byte - MacKey []byte - CipherKey []byte -} - -// Generates a set of keys for each party by stretching the shared key. -// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey) -func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedKeys, StretchedKeys) { - var cipherKeySize int - var ivSize int - switch cipherType { - case "AES-128": - ivSize = 16 - cipherKeySize = 16 - case "AES-256": - ivSize = 16 - cipherKeySize = 32 - case "Blowfish": - ivSize = 8 - // Note: 24 arbitrarily selected, needs more thought - cipherKeySize = 32 - } - - hmacKeySize := 20 - - seed := []byte("key expansion") - - result := make([]byte, 2*(ivSize+cipherKeySize+hmacKeySize)) - - var h func() hash.Hash - - switch hashType { - case "SHA1": - h = sha1.New - case "SHA256": - h = sha256.New - case "SHA512": - h = sha512.New - default: - panic("Unrecognized hash function, programmer error?") - } - - m := hmac.New(h, secret) - m.Write(seed) - - a := m.Sum(nil) - - j := 0 - for j < len(result) { - m.Reset() - m.Write(a) - m.Write(seed) - b := m.Sum(nil) - - todo := len(b) - - if j+todo > len(result) { - todo = len(result) - j - } - - copy(result[j:j+todo], b) - - j += todo - - m.Reset() - m.Write(a) - a = m.Sum(nil) - } - - half := len(result) / 2 - r1 := result[:half] - r2 := result[half:] - - var k1 StretchedKeys - var k2 StretchedKeys - - k1.IV = r1[0:ivSize] - k1.CipherKey = r1[ivSize : ivSize+cipherKeySize] - k1.MacKey = r1[ivSize+cipherKeySize:] - - k2.IV = r2[0:ivSize] - k2.CipherKey = r2[ivSize : ivSize+cipherKeySize] - k2.MacKey = r2[ivSize+cipherKeySize:] - - return k1, k2 -} - -// UnmarshalPublicKey converts a protobuf serialized public key into its -// representative object -func UnmarshalPublicKey(data []byte) (PubKey, error) { - pmes := new(pb.PublicKey) - err := proto.Unmarshal(data, pmes) - if err != nil { - return nil, err - } - - um, ok := PubKeyUnmarshallers[pmes.GetType()] - if !ok { - return nil, ErrBadKeyType - } - - return um(pmes.GetData()) -} - -// MarshalPublicKey converts a public key object into a protobuf serialized -// public key -func MarshalPublicKey(k PubKey) ([]byte, error) { - pbmes := new(pb.PublicKey) - pbmes.Type = k.Type() - data, err := k.Raw() - if err != nil { - return nil, err - } - pbmes.Data = data - - return proto.Marshal(pbmes) -} - -// UnmarshalPrivateKey converts a protobuf serialized private key into its -// representative object -func UnmarshalPrivateKey(data []byte) (PrivKey, error) { - pmes := new(pb.PrivateKey) - err := proto.Unmarshal(data, pmes) - if err != nil { - return nil, err - } - - um, ok := PrivKeyUnmarshallers[pmes.GetType()] - if !ok { - return nil, ErrBadKeyType - } - - return um(pmes.GetData()) -} - -// MarshalPrivateKey converts a key object into its protobuf serialized form. -func MarshalPrivateKey(k PrivKey) ([]byte, error) { - pbmes := new(pb.PrivateKey) - pbmes.Type = k.Type() - data, err := k.Raw() - if err != nil { - return nil, err - } - - pbmes.Data = data - return proto.Marshal(pbmes) -} - -// ConfigDecodeKey decodes from b64 (for config file), and unmarshals. -func ConfigDecodeKey(b string) ([]byte, error) { - return base64.StdEncoding.DecodeString(b) -} - -// ConfigEncodeKey encodes to b64 (for config file), and marshals. -func ConfigEncodeKey(b []byte) string { - return base64.StdEncoding.EncodeToString(b) -} - -// KeyEqual checks whether two -func KeyEqual(k1, k2 Key) bool { - if k1 == k2 { - return true - } - - b1, err1 := k1.Bytes() - b2, err2 := k2.Bytes() - return bytes.Equal(b1, b2) && err1 == err2 -} diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/package.json b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/package.json deleted file mode 100644 index 3e9a2292a3..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-transport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-crypto" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb", - "name": "ed25519", - "version": "0.0.0" - }, - { - "author": "btcsuite", - "hash": "QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd", - "name": "btcec", - "version": "0.0.1" - }, - { - "author": "minio", - "hash": "QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU", - "name": "sha256-simd", - "version": "0.1.1" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-crypto", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.1" -} - diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/rsa.go b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/rsa.go deleted file mode 100644 index 8d123b6ea5..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/rsa.go +++ /dev/null @@ -1,114 +0,0 @@ -package crypto - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "errors" - - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - - sha256 "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd" -) - -type RsaPrivateKey struct { - sk *rsa.PrivateKey - pk *rsa.PublicKey -} - -type RsaPublicKey struct { - k *rsa.PublicKey -} - -func (pk *RsaPublicKey) Verify(data, sig []byte) (bool, error) { - hashed := sha256.Sum256(data) - err := rsa.VerifyPKCS1v15(pk.k, crypto.SHA256, hashed[:], sig) - if err != nil { - return false, err - } - return true, nil -} - -func (pk *RsaPublicKey) Type() pb.KeyType { - return pb.KeyType_RSA -} - -func (pk *RsaPublicKey) Bytes() ([]byte, error) { - return MarshalPublicKey(pk) -} - -func (pk *RsaPublicKey) Raw() ([]byte, error) { - return x509.MarshalPKIXPublicKey(pk.k) -} - -func (pk *RsaPublicKey) Encrypt(b []byte) ([]byte, error) { - return rsa.EncryptPKCS1v15(rand.Reader, pk.k, b) -} - -// Equals checks whether this key is equal to another -func (pk *RsaPublicKey) Equals(k Key) bool { - return KeyEqual(pk, k) -} - -func (sk *RsaPrivateKey) Sign(message []byte) ([]byte, error) { - hashed := sha256.Sum256(message) - return rsa.SignPKCS1v15(rand.Reader, sk.sk, crypto.SHA256, hashed[:]) -} - -func (sk *RsaPrivateKey) GetPublic() PubKey { - if sk.pk == nil { - sk.pk = &sk.sk.PublicKey - } - return &RsaPublicKey{sk.pk} -} - -func (sk *RsaPrivateKey) Decrypt(b []byte) ([]byte, error) { - return rsa.DecryptPKCS1v15(rand.Reader, sk.sk, b) -} - -func (sk *RsaPrivateKey) Type() pb.KeyType { - return pb.KeyType_RSA -} - -func (sk *RsaPrivateKey) Bytes() ([]byte, error) { - return MarshalPrivateKey(sk) -} - -func (sk *RsaPrivateKey) Raw() ([]byte, error) { - b := x509.MarshalPKCS1PrivateKey(sk.sk) - return b, nil -} - -// Equals checks whether this key is equal to another -func (sk *RsaPrivateKey) Equals(k Key) bool { - return KeyEqual(sk, k) -} - -func UnmarshalRsaPrivateKey(b []byte) (PrivKey, error) { - sk, err := x509.ParsePKCS1PrivateKey(b) - if err != nil { - return nil, err - } - return &RsaPrivateKey{sk: sk}, nil -} - -func MarshalRsaPrivateKey(k *RsaPrivateKey) []byte { - return x509.MarshalPKCS1PrivateKey(k.sk) -} - -func UnmarshalRsaPublicKey(b []byte) (PubKey, error) { - pub, err := x509.ParsePKIXPublicKey(b) - if err != nil { - return nil, err - } - pk, ok := pub.(*rsa.PublicKey) - if !ok { - return nil, errors.New("Not actually an rsa public key.") - } - return &RsaPublicKey{pk}, nil -} - -func MarshalRsaPublicKey(k *RsaPublicKey) ([]byte, error) { - return x509.MarshalPKIXPublicKey(k.k) -} diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/secp256k1.go b/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/secp256k1.go deleted file mode 100644 index fa19e5a743..0000000000 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/secp256k1.go +++ /dev/null @@ -1,107 +0,0 @@ -package crypto - -import ( - "fmt" - "io" - - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - btcec "gx/ipfs/QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd/btcec" - sha256 "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd" -) - -type Secp256k1PrivateKey btcec.PrivateKey -type Secp256k1PublicKey btcec.PublicKey - -func GenerateSecp256k1Key(src io.Reader) (PrivKey, PubKey, error) { - privk, err := btcec.NewPrivateKey(btcec.S256()) - if err != nil { - return nil, nil, err - } - - k := (*Secp256k1PrivateKey)(privk) - return k, k.GetPublic(), nil -} - -func UnmarshalSecp256k1PrivateKey(data []byte) (PrivKey, error) { - if len(data) != btcec.PrivKeyBytesLen { - return nil, fmt.Errorf("expected secp256k1 data size to be %d", btcec.PrivKeyBytesLen) - } - - privk, _ := btcec.PrivKeyFromBytes(btcec.S256(), data) - return (*Secp256k1PrivateKey)(privk), nil -} - -func UnmarshalSecp256k1PublicKey(data []byte) (PubKey, error) { - k, err := btcec.ParsePubKey(data, btcec.S256()) - if err != nil { - return nil, err - } - - return (*Secp256k1PublicKey)(k), nil -} - -func (sk *Secp256k1PrivateKey) Type() pb.KeyType { - return pb.KeyType_Secp256k1 -} - -func (sk *Secp256k1PrivateKey) Bytes() ([]byte, error) { - return MarshalPrivateKey(sk) -} - -func (k *Secp256k1PrivateKey) Raw() ([]byte, error) { - return (*btcec.PrivateKey)(k).Serialize(), nil -} - -func (k *Secp256k1PrivateKey) Equals(o Key) bool { - sk, ok := o.(*Secp256k1PrivateKey) - if !ok { - return false - } - - return k.D.Cmp(sk.D) == 0 -} - -func (k *Secp256k1PrivateKey) Sign(data []byte) ([]byte, error) { - hash := sha256.Sum256(data) - sig, err := (*btcec.PrivateKey)(k).Sign(hash[:]) - if err != nil { - return nil, err - } - - return sig.Serialize(), nil -} - -func (k *Secp256k1PrivateKey) GetPublic() PubKey { - return (*Secp256k1PublicKey)((*btcec.PrivateKey)(k).PubKey()) -} - -func (sk *Secp256k1PublicKey) Type() pb.KeyType { - return pb.KeyType_Secp256k1 -} - -func (sk *Secp256k1PublicKey) Bytes() ([]byte, error) { - return MarshalPublicKey(sk) -} - -func (k *Secp256k1PublicKey) Raw() ([]byte, error) { - return (*btcec.PublicKey)(k).SerializeCompressed(), nil -} - -func (k *Secp256k1PublicKey) Equals(o Key) bool { - sk, ok := o.(*Secp256k1PublicKey) - if !ok { - return false - } - - return (*btcec.PublicKey)(k).IsEqual((*btcec.PublicKey)(sk)) -} - -func (k *Secp256k1PublicKey) Verify(data []byte, sigStr []byte) (bool, error) { - sig, err := btcec.ParseDERSignature(sigStr, btcec.S256()) - if err != nil { - return false, err - } - - hash := sha256.Sum256(data) - return sig.Verify(hash[:], (*btcec.PublicKey)(k)), nil -} diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/.travis.yml b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/.travis.yml rename to vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/.travis.yml diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/Makefile b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/Makefile similarity index 100% rename from vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/Makefile rename to vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/Makefile diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/README.md b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/README.md new file mode 100644 index 0000000000..21f6379cf1 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/README.md @@ -0,0 +1,11 @@ +# go-quic-transport + +[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/libp2p/go-libp2p-quic-transport) +[![Linux Build Status](https://img.shields.io/travis/libp2p/go-libp2p-quic-transport/master.svg?style=flat-square&label=linux+build)](https://travis-ci.org/libp2p/go-libp2p-quic-transport) +[![Code Coverage](https://img.shields.io/codecov/c/github/libp2p/go-libp2p-quic-transport/master.svg?style=flat-square)](https://codecov.io/gh/libp2p/go-libp2p-quic-transport/) + +This is an implementation of the [libp2p transport](https://github.com/libp2p/go-libp2p-transport/blob/master/transport.go) and the [libp2p stream muxer](https://github.com/libp2p/go-stream-muxer) using QUIC. + +## Known limitations + +* currently only works with RSA host keys diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/codecov.yml b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/codecov.yml rename to vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/codecov.yml diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/conn.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/conn.go new file mode 100644 index 0000000000..e2bbbba7f1 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/conn.go @@ -0,0 +1,80 @@ +package libp2pquic + +import ( + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +type conn struct { + sess quic.Session + transport tpt.Transport + + localPeer peer.ID + privKey ic.PrivKey + localMultiaddr ma.Multiaddr + + remotePeerID peer.ID + remotePubKey ic.PubKey + remoteMultiaddr ma.Multiaddr +} + +var _ tpt.Conn = &conn{} + +func (c *conn) Close() error { + return c.sess.Close() +} + +// IsClosed returns whether a connection is fully closed. +func (c *conn) IsClosed() bool { + return c.sess.Context().Err() != nil +} + +// OpenStream creates a new stream. +func (c *conn) OpenStream() (smux.Stream, error) { + qstr, err := c.sess.OpenStreamSync() + return &stream{Stream: qstr}, err +} + +// AcceptStream accepts a stream opened by the other side. +func (c *conn) AcceptStream() (smux.Stream, error) { + qstr, err := c.sess.AcceptStream() + return &stream{Stream: qstr}, err +} + +// LocalPeer returns our peer ID +func (c *conn) LocalPeer() peer.ID { + return c.localPeer +} + +// LocalPrivateKey returns our private key +func (c *conn) LocalPrivateKey() ic.PrivKey { + return c.privKey +} + +// RemotePeer returns the peer ID of the remote peer. +func (c *conn) RemotePeer() peer.ID { + return c.remotePeerID +} + +// RemotePublicKey returns the public key of the remote peer. +func (c *conn) RemotePublicKey() ic.PubKey { + return c.remotePubKey +} + +// LocalMultiaddr returns the local Multiaddr associated +func (c *conn) LocalMultiaddr() ma.Multiaddr { + return c.localMultiaddr +} + +// RemoteMultiaddr returns the remote Multiaddr associated +func (c *conn) RemoteMultiaddr() ma.Multiaddr { + return c.remoteMultiaddr +} + +func (c *conn) Transport() tpt.Transport { + return c.transport +} diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/crypto.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/crypto.go new file mode 100644 index 0000000000..d821cf2ab1 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/crypto.go @@ -0,0 +1,120 @@ +package libp2pquic + +import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/tls" + "crypto/x509" + "errors" + "math/big" + "time" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +// mint certificate selection is broken. +const hostname = "quic.ipfs" + +const certValidityPeriod = 180 * 24 * time.Hour + +func generateConfig(privKey ic.PrivKey) (*tls.Config, error) { + key, hostCert, err := keyToCertificate(privKey) + if err != nil { + return nil, err + } + // The ephemeral key used just for a couple of connections (or a limited time). + ephemeralKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + return nil, err + } + // Sign the ephemeral key using the host key. + // This is the only time that the host's private key of the peer is needed. + // Note that this step could be done asynchronously, such that a running node doesn't need access its private key at all. + certTemplate := &x509.Certificate{ + DNSNames: []string{hostname}, + SerialNumber: big.NewInt(1), + NotBefore: time.Now().Add(-24 * time.Hour), + NotAfter: time.Now().Add(certValidityPeriod), + } + certDER, err := x509.CreateCertificate(rand.Reader, certTemplate, hostCert, ephemeralKey.Public(), key) + if err != nil { + return nil, err + } + cert, err := x509.ParseCertificate(certDER) + if err != nil { + return nil, err + } + return &tls.Config{ + ServerName: hostname, + InsecureSkipVerify: true, // This is not insecure here. We will verify the cert chain ourselves. + ClientAuth: tls.RequireAnyClientCert, + Certificates: []tls.Certificate{{ + Certificate: [][]byte{cert.Raw, hostCert.Raw}, + PrivateKey: ephemeralKey, + }}, + }, nil +} + +func getRemotePubKey(chain []*x509.Certificate) (ic.PubKey, error) { + if len(chain) != 2 { + return nil, errors.New("expected 2 certificates in the chain") + } + pool := x509.NewCertPool() + pool.AddCert(chain[1]) + if _, err := chain[0].Verify(x509.VerifyOptions{Roots: pool}); err != nil { + return nil, err + } + remotePubKey, err := x509.MarshalPKIXPublicKey(chain[1].PublicKey) + if err != nil { + return nil, err + } + return ic.UnmarshalRsaPublicKey(remotePubKey) +} + +func keyToCertificate(sk ic.PrivKey) (interface{}, *x509.Certificate, error) { + sn, err := rand.Int(rand.Reader, big.NewInt(1<<62)) + if err != nil { + return nil, nil, err + } + tmpl := &x509.Certificate{ + SerialNumber: sn, + NotBefore: time.Now().Add(-24 * time.Hour), + NotAfter: time.Now().Add(certValidityPeriod), + IsCA: true, + BasicConstraintsValid: true, + } + + var publicKey, privateKey interface{} + keyBytes, err := sk.Bytes() + if err != nil { + return nil, nil, err + } + pbmes := new(pb.PrivateKey) + if err := proto.Unmarshal(keyBytes, pbmes); err != nil { + return nil, nil, err + } + switch pbmes.GetType() { + case pb.KeyType_RSA: + k, err := x509.ParsePKCS1PrivateKey(pbmes.GetData()) + if err != nil { + return nil, nil, err + } + publicKey = &k.PublicKey + privateKey = k + // TODO: add support for ECDSA + default: + return nil, nil, errors.New("unsupported key type for TLS") + } + certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, publicKey, privateKey) + if err != nil { + return nil, nil, err + } + cert, err := x509.ParseCertificate(certDER) + if err != nil { + return nil, nil, err + } + return privateKey, cert, nil +} diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/listener.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/listener.go new file mode 100644 index 0000000000..2027ef3290 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/listener.go @@ -0,0 +1,113 @@ +package libp2pquic + +import ( + "crypto/tls" + "net" + + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +var quicListenAddr = quic.ListenAddr + +// A listener listens for QUIC connections. +type listener struct { + quicListener quic.Listener + transport tpt.Transport + + privKey ic.PrivKey + localPeer peer.ID + localMultiaddr ma.Multiaddr +} + +var _ tpt.Listener = &listener{} + +func newListener(addr ma.Multiaddr, transport tpt.Transport, localPeer peer.ID, key ic.PrivKey, tlsConf *tls.Config) (tpt.Listener, error) { + lnet, host, err := manet.DialArgs(addr) + if err != nil { + return nil, err + } + laddr, err := net.ResolveUDPAddr(lnet, host) + if err != nil { + return nil, err + } + conn, err := net.ListenUDP(lnet, laddr) + if err != nil { + return nil, err + } + ln, err := quic.Listen(conn, tlsConf, quicConfig) + if err != nil { + return nil, err + } + localMultiaddr, err := toQuicMultiaddr(ln.Addr()) + if err != nil { + return nil, err + } + return &listener{ + quicListener: ln, + transport: transport, + privKey: key, + localPeer: localPeer, + localMultiaddr: localMultiaddr, + }, nil +} + +// Accept accepts new connections. +func (l *listener) Accept() (tpt.Conn, error) { + for { + sess, err := l.quicListener.Accept() + if err != nil { + return nil, err + } + conn, err := l.setupConn(sess) + if err != nil { + sess.CloseWithError(0, err) + continue + } + return conn, nil + } +} + +func (l *listener) setupConn(sess quic.Session) (tpt.Conn, error) { + remotePubKey, err := getRemotePubKey(sess.ConnectionState().PeerCertificates) + if err != nil { + return nil, err + } + remotePeerID, err := peer.IDFromPublicKey(remotePubKey) + if err != nil { + return nil, err + } + remoteMultiaddr, err := toQuicMultiaddr(sess.RemoteAddr()) + if err != nil { + return nil, err + } + return &conn{ + sess: sess, + transport: l.transport, + localPeer: l.localPeer, + localMultiaddr: l.localMultiaddr, + privKey: l.privKey, + remoteMultiaddr: remoteMultiaddr, + remotePeerID: remotePeerID, + remotePubKey: remotePubKey, + }, nil +} + +// Close closes the listener. +func (l *listener) Close() error { + return l.quicListener.Close() +} + +// Addr returns the address of this listener. +func (l *listener) Addr() net.Addr { + return l.quicListener.Addr() +} + +// Multiaddr returns the multiaddress of this listener. +func (l *listener) Multiaddr() ma.Multiaddr { + return l.localMultiaddr +} diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/package.json b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/package.json new file mode 100644 index 0000000000..380c4ac006 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/package.json @@ -0,0 +1,30 @@ +{ + "author": "marten-seemann", + "bugs": { + "url": "github.com/libp2p/go-libp2p-quic-transport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-quic-transport" + }, + "gxDependencies": [ + { + "author": "marten-seemann", + "hash": "QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ", + "name": "quic-go", + "version": "0.10.0" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "", + "name": "go-libp2p-quic-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.19" +} + diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/quic_multiaddr.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/quic_multiaddr.go similarity index 79% rename from vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/quic_multiaddr.go rename to vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/quic_multiaddr.go index 56da1616e3..d406aefc9b 100644 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/quic_multiaddr.go +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/quic_multiaddr.go @@ -3,8 +3,8 @@ package libp2pquic import ( "net" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) var quicMA ma.Multiaddr diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/stream.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/stream.go new file mode 100644 index 0000000000..af13efebb0 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/stream.go @@ -0,0 +1,19 @@ +package libp2pquic + +import ( + quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" +) + +type stream struct { + quic.Stream +} + +var _ smux.Stream = &stream{} + +func (s *stream) Reset() error { + if err := s.Stream.CancelRead(0); err != nil { + return err + } + return s.Stream.CancelWrite(0) +} diff --git a/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/transport.go b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/transport.go new file mode 100644 index 0000000000..bbaa5f2fb6 --- /dev/null +++ b/vendor/gx/ipfs/QmQ4hhhYzrEoyPxcVQyBqhf3sshsATKX3D3VJUAGuHzaSD/go-libp2p-quic-transport/transport.go @@ -0,0 +1,178 @@ +package libp2pquic + +import ( + "context" + "crypto/tls" + "crypto/x509" + "errors" + "fmt" + "net" + "sync" + + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" + "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +var quicConfig = &quic.Config{ + Versions: []quic.VersionNumber{quic.VersionMilestone0_10_0}, + MaxIncomingStreams: 1000, + MaxIncomingUniStreams: -1, // disable unidirectional streams + MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB + MaxReceiveConnectionFlowControlWindow: 4.5 * (1 << 20), // 4.5 MB + AcceptCookie: func(clientAddr net.Addr, cookie *quic.Cookie) bool { + // TODO(#6): require source address validation when under load + return true + }, + KeepAlive: true, +} + +type connManager struct { + connIPv4Once sync.Once + connIPv4 net.PacketConn + + connIPv6Once sync.Once + connIPv6 net.PacketConn +} + +func (c *connManager) GetConnForAddr(network string) (net.PacketConn, error) { + switch network { + case "udp4": + var err error + c.connIPv4Once.Do(func() { + c.connIPv4, err = c.createConn(network, "0.0.0.0:0") + }) + return c.connIPv4, err + case "udp6": + var err error + c.connIPv6Once.Do(func() { + c.connIPv6, err = c.createConn(network, ":0") + }) + return c.connIPv6, err + default: + return nil, fmt.Errorf("unsupported network: %s", network) + } +} + +func (c *connManager) createConn(network, host string) (net.PacketConn, error) { + addr, err := net.ResolveUDPAddr(network, host) + if err != nil { + return nil, err + } + return net.ListenUDP(network, addr) +} + +// The Transport implements the tpt.Transport interface for QUIC connections. +type transport struct { + privKey ic.PrivKey + localPeer peer.ID + tlsConf *tls.Config + connManager *connManager +} + +var _ tpt.Transport = &transport{} + +// NewTransport creates a new QUIC transport +func NewTransport(key ic.PrivKey) (tpt.Transport, error) { + localPeer, err := peer.IDFromPrivateKey(key) + if err != nil { + return nil, err + } + tlsConf, err := generateConfig(key) + if err != nil { + return nil, err + } + + return &transport{ + privKey: key, + localPeer: localPeer, + tlsConf: tlsConf, + connManager: &connManager{}, + }, nil +} + +// Dial dials a new QUIC connection +func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tpt.Conn, error) { + network, host, err := manet.DialArgs(raddr) + if err != nil { + return nil, err + } + pconn, err := t.connManager.GetConnForAddr(network) + if err != nil { + return nil, err + } + addr, err := fromQuicMultiaddr(raddr) + if err != nil { + return nil, err + } + var remotePubKey ic.PubKey + tlsConf := t.tlsConf.Clone() + // We need to check the peer ID in the VerifyPeerCertificate callback. + // The tls.Config it is also used for listening, and we might also have concurrent dials. + // Clone it so we can check for the specific peer ID we're dialing here. + tlsConf.VerifyPeerCertificate = func(rawCerts [][]byte, _ [][]*x509.Certificate) error { + chain := make([]*x509.Certificate, len(rawCerts)) + for i := 0; i < len(rawCerts); i++ { + cert, err := x509.ParseCertificate(rawCerts[i]) + if err != nil { + return err + } + chain[i] = cert + } + var err error + remotePubKey, err = getRemotePubKey(chain) + if err != nil { + return err + } + if !p.MatchesPublicKey(remotePubKey) { + return errors.New("peer IDs don't match") + } + return nil + } + sess, err := quic.DialContext(ctx, pconn, addr, host, tlsConf, quicConfig) + if err != nil { + return nil, err + } + localMultiaddr, err := toQuicMultiaddr(sess.LocalAddr()) + if err != nil { + return nil, err + } + return &conn{ + sess: sess, + transport: t, + privKey: t.privKey, + localPeer: t.localPeer, + localMultiaddr: localMultiaddr, + remotePubKey: remotePubKey, + remotePeerID: p, + remoteMultiaddr: raddr, + }, nil +} + +// CanDial determines if we can dial to an address +func (t *transport) CanDial(addr ma.Multiaddr) bool { + return mafmt.QUIC.Matches(addr) +} + +// Listen listens for new QUIC connections on the passed multiaddr. +func (t *transport) Listen(addr ma.Multiaddr) (tpt.Listener, error) { + return newListener(addr, t, t.localPeer, t.privKey, t.tlsConf) +} + +// Proxy returns true if this transport proxies. +func (t *transport) Proxy() bool { + return false +} + +// Protocols returns the set of protocols handled by this transport. +func (t *transport) Protocols() []int { + return []int{ma.P_QUIC} +} + +func (t *transport) String() string { + return "QUIC" +} diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/ed25519.go b/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/ed25519.go deleted file mode 100644 index 4845cef7b7..0000000000 --- a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/ed25519.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2013 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 ed25519 implements the Ed25519 signature algorithm. See -// http://ed25519.cr.yp.to/. -package ed25519 - -// This code is a port of the public domain, "ref10" implementation of ed25519 -// from SUPERCOP. - -import ( - "crypto/sha512" - "crypto/subtle" - "io" - - "gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/edwards25519" -) - -const ( - PublicKeySize = 32 - PrivateKeySize = 64 - SignatureSize = 64 -) - -// GenerateKey generates a public/private key pair using randomness from rand. -func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error) { - privateKey = new([64]byte) - publicKey = new([32]byte) - _, err = io.ReadFull(rand, privateKey[:32]) - if err != nil { - return nil, nil, err - } - - h := sha512.New() - h.Write(privateKey[:32]) - digest := h.Sum(nil) - - digest[0] &= 248 - digest[31] &= 127 - digest[31] |= 64 - - var A edwards25519.ExtendedGroupElement - var hBytes [32]byte - copy(hBytes[:], digest) - edwards25519.GeScalarMultBase(&A, &hBytes) - A.ToBytes(publicKey) - - copy(privateKey[32:], publicKey[:]) - return -} - -// Sign signs the message with privateKey and returns a signature. -func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte { - h := sha512.New() - h.Write(privateKey[:32]) - - var digest1, messageDigest, hramDigest [64]byte - var expandedSecretKey [32]byte - h.Sum(digest1[:0]) - copy(expandedSecretKey[:], digest1[:]) - expandedSecretKey[0] &= 248 - expandedSecretKey[31] &= 63 - expandedSecretKey[31] |= 64 - - h.Reset() - h.Write(digest1[32:]) - h.Write(message) - h.Sum(messageDigest[:0]) - - var messageDigestReduced [32]byte - edwards25519.ScReduce(&messageDigestReduced, &messageDigest) - var R edwards25519.ExtendedGroupElement - edwards25519.GeScalarMultBase(&R, &messageDigestReduced) - - var encodedR [32]byte - R.ToBytes(&encodedR) - - h.Reset() - h.Write(encodedR[:]) - h.Write(privateKey[32:]) - h.Write(message) - h.Sum(hramDigest[:0]) - var hramDigestReduced [32]byte - edwards25519.ScReduce(&hramDigestReduced, &hramDigest) - - var s [32]byte - edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced) - - signature := new([64]byte) - copy(signature[:], encodedR[:]) - copy(signature[32:], s[:]) - return signature -} - -// Verify returns true iff sig is a valid signature of message by publicKey. -func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool { - if sig[63]&224 != 0 { - return false - } - - var A edwards25519.ExtendedGroupElement - if !A.FromBytes(publicKey) { - return false - } - edwards25519.FeNeg(&A.X, &A.X) - edwards25519.FeNeg(&A.T, &A.T) - - h := sha512.New() - h.Write(sig[:32]) - h.Write(publicKey[:]) - h.Write(message) - var digest [64]byte - h.Sum(digest[:0]) - - var hReduced [32]byte - edwards25519.ScReduce(&hReduced, &digest) - - var R edwards25519.ProjectiveGroupElement - var b [32]byte - copy(b[:], sig[32:]) - edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b) - - var checkR [32]byte - R.ToBytes(&checkR) - return subtle.ConstantTimeCompare(sig[:32], checkR[:]) == 1 -} diff --git a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/package.json b/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/package.json deleted file mode 100644 index 72954bfa40..0000000000 --- a/vendor/gx/ipfs/QmQ51pHe6u7CWodkUGDLqaCEMchkbMt7VEZnECF5mp6tVb/ed25519/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/agl/ed25519" - }, - "gx": { - "dvcsimport": "github.com/agl/ed25519" - }, - "gxVersion": "0.7.0", - "language": "go", - "license": "", - "name": "ed25519", - "version": "0.0.0" -} diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/.travis.yml b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/.travis.yml rename to vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/.travis.yml diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/LICENSE b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/LICENSE rename to vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/LICENSE diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/Makefile b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/Makefile similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/Makefile rename to vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/Makefile diff --git a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/README.md b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/README.md similarity index 100% rename from vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/README.md rename to vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/README.md diff --git a/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/package.json b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/package.json new file mode 100644 index 0000000000..128e763343 --- /dev/null +++ b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/package.json @@ -0,0 +1,41 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-path" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-path" + }, + "gxDependencies": [ + { + "author": "why", + "hash": "QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri", + "name": "go-merkledag", + "version": "1.1.37" + }, + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-path", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.39" +} + diff --git a/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/path.go b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/path.go new file mode 100644 index 0000000000..4918f164b7 --- /dev/null +++ b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/path.go @@ -0,0 +1,192 @@ +// Package path contains utilities to work with ipfs paths. +package path + +import ( + "errors" + "path" + "strings" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +var ( + // ErrBadPath is returned when a given path is incorrectly formatted + ErrBadPath = errors.New("invalid 'ipfs ref' path") + + // ErrNoComponents is used when Paths after a protocol + // do not contain at least one component + ErrNoComponents = errors.New( + "path must contain at least one component") +) + +// A Path represents an ipfs content path: +// * //path/to/file +// * /ipfs/ +// * /ipns//path/to/folder +// * etc +type Path string + +// ^^^ +// TODO: debate making this a private struct wrapped in a public interface +// would allow us to control creation, and cache segments. + +// FromString safely converts a string type to a Path type. +func FromString(s string) Path { + return Path(s) +} + +// FromCid safely converts a cid.Cid type to a Path type. +func FromCid(c cid.Cid) Path { + return Path("/ipfs/" + c.String()) +} + +// Segments returns the different elements of a path +// (elements are delimited by a /). +func (p Path) Segments() []string { + cleaned := path.Clean(string(p)) + segments := strings.Split(cleaned, "/") + + // Ignore leading slash + if len(segments[0]) == 0 { + segments = segments[1:] + } + + return segments +} + +// String converts a path to string. +func (p Path) String() string { + return string(p) +} + +// IsJustAKey returns true if the path is of the form or /ipfs/, or +// /ipld/ +func (p Path) IsJustAKey() bool { + parts := p.Segments() + return len(parts) == 2 && (parts[0] == "ipfs" || parts[0] == "ipld") +} + +// PopLastSegment returns a new Path without its final segment, and the final +// segment, separately. If there is no more to pop (the path is just a key), +// the original path is returned. +func (p Path) PopLastSegment() (Path, string, error) { + + if p.IsJustAKey() { + return p, "", nil + } + + segs := p.Segments() + newPath, err := ParsePath("/" + strings.Join(segs[:len(segs)-1], "/")) + if err != nil { + return "", "", err + } + + return newPath, segs[len(segs)-1], nil +} + +// FromSegments returns a path given its different segments. +func FromSegments(prefix string, seg ...string) (Path, error) { + return ParsePath(prefix + strings.Join(seg, "/")) +} + +// ParsePath returns a well-formed ipfs Path. +// The returned path will always be prefixed with /ipfs/ or /ipns/. +// The prefix will be added if not present in the given string. +// This function will return an error when the given string is +// not a valid ipfs path. +func ParsePath(txt string) (Path, error) { + parts := strings.Split(txt, "/") + if len(parts) == 1 { + kp, err := ParseCidToPath(txt) + if err == nil { + return kp, nil + } + } + + // if the path doesnt begin with a '/' + // we expect this to start with a hash, and be an 'ipfs' path + if parts[0] != "" { + if _, err := cid.Decode(parts[0]); err != nil { + return "", ErrBadPath + } + // The case when the path starts with hash without a protocol prefix + return Path("/ipfs/" + txt), nil + } + + if len(parts) < 3 { + return "", ErrBadPath + } + + //TODO: make this smarter + switch parts[1] { + case "ipfs", "ipld": + if parts[2] == "" { + return "", ErrNoComponents + } + // Validate Cid. + _, err := cid.Decode(parts[2]) + if err != nil { + return "", err + } + case "ipns": + if parts[2] == "" { + return "", ErrNoComponents + } + default: + return "", ErrBadPath + } + + return Path(txt), nil +} + +// ParseCidToPath takes a CID in string form and returns a valid ipfs Path. +func ParseCidToPath(txt string) (Path, error) { + if txt == "" { + return "", ErrNoComponents + } + + c, err := cid.Decode(txt) + if err != nil { + return "", err + } + + return FromCid(c), nil +} + +// IsValid checks if a path is a valid ipfs Path. +func (p *Path) IsValid() error { + _, err := ParsePath(p.String()) + return err +} + +// Join joins strings slices using / +func Join(pths []string) string { + return strings.Join(pths, "/") +} + +// SplitList splits strings usings / +func SplitList(pth string) []string { + return strings.Split(pth, "/") +} + +// SplitAbsPath clean up and split fpath. It extracts the first component (which +// must be a Multihash) and return it separately. +func SplitAbsPath(fpath Path) (cid.Cid, []string, error) { + parts := fpath.Segments() + if parts[0] == "ipfs" || parts[0] == "ipld" { + parts = parts[1:] + } + + // if nothing, bail. + if len(parts) == 0 { + return cid.Cid{}, nil, ErrNoComponents + } + + c, err := cid.Decode(parts[0]) + // first element in the path is a cid + if err != nil { + return cid.Cid{}, nil, err + } + + return c, parts[1:], nil +} diff --git a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver/resolver.go b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver/resolver.go similarity index 94% rename from vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver/resolver.go rename to vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver/resolver.go index 01cfb0e8a8..e4447e9265 100644 --- a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/resolver/resolver.go +++ b/vendor/gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path/resolver/resolver.go @@ -7,12 +7,12 @@ import ( "fmt" "time" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("pathresolv") diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/.travis.yml b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/.travis.yml rename to vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/.travis.yml diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/README.md b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/README.md new file mode 100644 index 0000000000..09a72e6d10 --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/README.md @@ -0,0 +1,99 @@ +Git ipld format +================== + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![Coverage Status](https://codecov.io/gh/ipfs/go-ipld-git/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/go-ipld-git/branch/master) +[![Travis CI](https://travis-ci.org/ipfs/go-ipld-git.svg?branch=master)](https://travis-ci.org/ipfs/go-ipld-git) + +> An ipld codec for git objects allowing path traversals across the git graph! + +Note: This is WIP and may not be an entirely correct parser. + +## Table of Contents + +- [Install](#install) +- [About](#about) +- [Contribute](#contribute) +- [License](#license) + +## Install + +```sh +go get github.com/ipfs/go-ipld-git +``` + +## About +This is an IPLD codec which handles git objects. Objects are transformed +into IPLD graph in the following way: + +* Commit: +```json +{ + "author": { + "date": "1503667703 +0200", + "email": "author@mail", + "name": "Author Name" + }, + "committer": { + "date": "1503667703 +0200", + "email": "author@mail", + "name": "Author Name" + }, + "message": "Commit Message\n", + "parents": [ + , , ... + ], + "tree": +} + +``` + +* Tag: +```json +{ + "message": "message\n", + "object": { + "/": "z8mWaJGuvHyZf5uwV8TSYbvSbXP6xS9gR" + }, + "tag": "tagname", + "tagger": { + "date": "1503667703 +0200", + "email": "author@mail", + "name": "Author Name" + }, + "type": "commit" +} + +``` + +* Tree: +```json +{ + "file.name": { + "mode": "100664", + "hash": + }, + "directoryname": { + "mode": "40000", + "hash": + }, + ... +} +``` + + +* Blob: +```json +"\0'>" +``` +## Contribute + +PRs are welcome! + +Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +MIT © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/blob.go b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/blob.go new file mode 100644 index 0000000000..033c7c446d --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/blob.go @@ -0,0 +1,71 @@ +package ipldgit + +import ( + "encoding/json" + "errors" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +type Blob struct { + rawData []byte + cid cid.Cid +} + +func (b *Blob) Cid() cid.Cid { + return b.cid +} + +func (b *Blob) Copy() node.Node { + nb := *b + return &nb +} + +func (b *Blob) Links() []*node.Link { + return nil +} + +func (b *Blob) Resolve(_ []string) (interface{}, []string, error) { + return nil, nil, errors.New("no such link") +} + +func (b *Blob) ResolveLink(_ []string) (*node.Link, []string, error) { + return nil, nil, errors.New("no such link") +} + +func (b *Blob) Loggable() map[string]interface{} { + return map[string]interface{}{ + "type": "git_blob", + } +} + +func (b *Blob) MarshalJSON() ([]byte, error) { + return json.Marshal(b.rawData) +} + +func (b *Blob) RawData() []byte { + return []byte(b.rawData) +} + +func (b *Blob) Size() (uint64, error) { + return uint64(len(b.rawData)), nil +} + +func (b *Blob) Stat() (*node.NodeStat, error) { + return &node.NodeStat{}, nil +} + +func (b *Blob) String() string { + return "[git blob]" +} + +func (b *Blob) Tree(p string, depth int) []string { + return nil +} + +func (b *Blob) GitSha() []byte { + return cidToSha(b.Cid()) +} + +var _ node.Node = (*Blob)(nil) diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/codecov.yml b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/codecov.yml rename to vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/codecov.yml diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/commit.go b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/commit.go new file mode 100644 index 0000000000..c028834ced --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/commit.go @@ -0,0 +1,286 @@ +package ipldgit + +import ( + "bytes" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "strconv" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +type Commit struct { + DataSize string `json:"-"` + GitTree cid.Cid `json:"tree"` + Parents []cid.Cid `json:"parents"` + Message string `json:"message"` + Author *PersonInfo `json:"author"` + Committer *PersonInfo `json:"committer"` + Encoding string `json:"encoding,omitempty"` + Sig *GpgSig `json:"signature,omitempty"` + MergeTag []*MergeTag `json:"mergetag,omitempty"` + + // Other contains all the non-standard headers, such as 'HG:extra' + Other []string `json:"other,omitempty"` + + cid cid.Cid + + rawData []byte + rawDataOnce sync.Once +} + +type PersonInfo struct { + Name string + Email string + Date string + Timezone string +} + +func (pi *PersonInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(map[string]string{ + "name": pi.Name, + "email": pi.Email, + "date": pi.Date + " " + pi.Timezone, + }) +} + +func (pi *PersonInfo) String() string { + f := "%s <%s>" + arg := []interface{}{pi.Name, pi.Email} + if pi.Date != "" { + f = f + " %s" + arg = append(arg, pi.Date) + } + + if pi.Timezone != "" { + f = f + " %s" + arg = append(arg, pi.Timezone) + } + return fmt.Sprintf(f, arg...) +} + +func (pi *PersonInfo) tree(name string, depth int) []string { + if depth == 1 { + return []string{name} + } + return []string{name + "/name", name + "/email", name + "/date"} +} + +func (pi *PersonInfo) resolve(p []string) (interface{}, []string, error) { + switch p[0] { + case "name": + return pi.Name, p[1:], nil + case "email": + return pi.Email, p[1:], nil + case "date": + return pi.Date + " " + pi.Timezone, p[1:], nil + default: + return nil, nil, errors.New("no such link") + } +} + +type MergeTag struct { + Object cid.Cid `json:"object"` + Type string `json:"type"` + Tag string `json:"tag"` + Tagger *PersonInfo `json:"tagger"` + Text string `json:"text"` +} + +type GpgSig struct { + Text string +} + +func (c *Commit) Cid() cid.Cid { + return c.cid +} + +func (c *Commit) Copy() node.Node { + nc := *c + return &nc +} + +func (c *Commit) Links() []*node.Link { + out := []*node.Link{ + {Cid: c.GitTree}, + } + + for _, p := range c.Parents { + out = append(out, &node.Link{Cid: p}) + } + return out +} + +func (c *Commit) Loggable() map[string]interface{} { + return map[string]interface{}{ + "type": "git_commit", + } +} + +func (c *Commit) RawData() []byte { + c.rawDataOnce.Do(func() { + buf := new(bytes.Buffer) + fmt.Fprintf(buf, "commit %s\x00", c.DataSize) + fmt.Fprintf(buf, "tree %s\n", hex.EncodeToString(cidToSha(c.GitTree))) + for _, p := range c.Parents { + fmt.Fprintf(buf, "parent %s\n", hex.EncodeToString(cidToSha(p))) + } + fmt.Fprintf(buf, "author %s\n", c.Author.String()) + fmt.Fprintf(buf, "committer %s\n", c.Committer.String()) + if len(c.Encoding) > 0 { + fmt.Fprintf(buf, "encoding %s\n", c.Encoding) + } + for _, mtag := range c.MergeTag { + fmt.Fprintf(buf, "mergetag object %s\n", hex.EncodeToString(cidToSha(mtag.Object))) + fmt.Fprintf(buf, " type %s\n", mtag.Type) + fmt.Fprintf(buf, " tag %s\n", mtag.Tag) + fmt.Fprintf(buf, " tagger %s\n \n", mtag.Tagger.String()) + fmt.Fprintf(buf, "%s", mtag.Text) + } + if c.Sig != nil { + fmt.Fprintln(buf, "gpgsig -----BEGIN PGP SIGNATURE-----") + fmt.Fprint(buf, c.Sig.Text) + fmt.Fprintln(buf, " -----END PGP SIGNATURE-----") + } + for _, line := range c.Other { + fmt.Fprintln(buf, line) + } + fmt.Fprintf(buf, "\n%s", c.Message) + c.rawData = buf.Bytes() + }) + + return c.rawData +} + +func (c *Commit) Resolve(path []string) (interface{}, []string, error) { + if len(path) == 0 { + return nil, nil, fmt.Errorf("zero length path") + } + + switch path[0] { + case "parents": + if len(path) == 1 { + return c.Parents, nil, nil + } + + i, err := strconv.Atoi(path[1]) + if err != nil { + return nil, nil, err + } + + if i < 0 || i >= len(c.Parents) { + return nil, nil, fmt.Errorf("index out of range") + } + + return &node.Link{Cid: c.Parents[i]}, path[2:], nil + case "author": + if len(path) == 1 { + return c.Author, nil, nil + } + return c.Author.resolve(path[1:]) + case "committer": + if len(path) == 1 { + return c.Committer, nil, nil + } + return c.Committer.resolve(path[1:]) + case "signature": + return c.Sig.Text, path[1:], nil + case "message": + return c.Message, path[1:], nil + case "tree": + return &node.Link{Cid: c.GitTree}, path[1:], nil + case "mergetag": + if len(path) == 1 { + return c.MergeTag, nil, nil + } + + i, err := strconv.Atoi(path[1]) + if err != nil { + return nil, nil, err + } + + if i < 0 || i >= len(c.MergeTag) { + return nil, nil, fmt.Errorf("index out of range") + } + + if len(path) == 2 { + return c.MergeTag[i], nil, nil + } + return c.MergeTag[i].resolve(path[2:]) + default: + return nil, nil, errors.New("no such link") + } +} + +func (c *Commit) ResolveLink(path []string) (*node.Link, []string, error) { + out, rest, err := c.Resolve(path) + if err != nil { + return nil, nil, err + } + + lnk, ok := out.(*node.Link) + if !ok { + return nil, nil, errors.New("not a link") + } + + return lnk, rest, nil +} + +func (c *Commit) Size() (uint64, error) { + return uint64(len(c.RawData())), nil +} + +func (c *Commit) Stat() (*node.NodeStat, error) { + return &node.NodeStat{}, nil +} + +func (c *Commit) String() string { + return "[git commit object]" +} + +func (c *Commit) Tree(p string, depth int) []string { + if depth != -1 { + panic("proper tree not yet implemented") + } + tree := []string{"tree", "parents", "message", "gpgsig"} + tree = append(tree, c.Author.tree("author", depth)...) + tree = append(tree, c.Committer.tree("committer", depth)...) + for i := range c.Parents { + tree = append(tree, fmt.Sprintf("parents/%d", i)) + } + return tree +} + +func (c *Commit) GitSha() []byte { + return cidToSha(c.Cid()) +} + +func (t *MergeTag) resolve(path []string) (interface{}, []string, error) { + if len(path) == 0 { + return nil, nil, fmt.Errorf("zero length path") + } + + switch path[0] { + case "object": + return &node.Link{Cid: t.Object}, path[1:], nil + case "tag": + return t.Tag, path[1:], nil + case "tagger": + if len(path) == 1 { + return t.Tagger, nil, nil + } + return t.Tagger.resolve(path[1:]) + case "text": + return t.Text, path[1:], nil + case "type": + return t.Type, path[1:], nil + default: + return nil, nil, errors.New("no such link") + } +} + +var _ node.Node = (*Commit)(nil) diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/git.go b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/git.go new file mode 100644 index 0000000000..e3e6542599 --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/git.go @@ -0,0 +1,478 @@ +package ipldgit + +import ( + "bufio" + "bytes" + "compress/zlib" + "encoding/hex" + "errors" + "fmt" + "io" + "io/ioutil" + "strconv" + "strings" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +func DecodeBlock(block blocks.Block) (node.Node, error) { + prefix := block.Cid().Prefix() + + if prefix.Codec != cid.GitRaw || prefix.MhType != mh.SHA1 || prefix.MhLength != mh.DefaultLengths[mh.SHA1] { + return nil, errors.New("invalid CID prefix") + } + + return ParseObjectFromBuffer(block.RawData()) +} + +var _ node.DecodeBlockFunc = DecodeBlock + +func ParseObjectFromBuffer(b []byte) (node.Node, error) { + return ParseObject(bytes.NewReader(b)) +} + +func ParseCompressedObject(r io.Reader) (node.Node, error) { + rc, err := zlib.NewReader(r) + if err != nil { + return nil, err + } + defer rc.Close() + + return ParseObject(rc) +} + +func ParseObject(r io.Reader) (node.Node, error) { + rd := bufio.NewReader(r) + + typ, err := rd.ReadString(' ') + if err != nil { + return nil, err + } + typ = typ[:len(typ)-1] + + switch typ { + case "tree": + return ReadTree(rd) + case "commit": + return ReadCommit(rd) + case "blob": + return ReadBlob(rd) + case "tag": + return ReadTag(rd) + default: + return nil, fmt.Errorf("unrecognized object type: %s", typ) + } +} + +func ReadBlob(rd *bufio.Reader) (*Blob, error) { + size, err := rd.ReadString(0) + if err != nil { + return nil, err + } + + sizen, err := strconv.Atoi(size[:len(size)-1]) + if err != nil { + return nil, err + } + + buf := new(bytes.Buffer) + fmt.Fprintf(buf, "blob %d\x00", sizen) + + n, err := io.Copy(buf, rd) + if err != nil { + return nil, err + } + + if n != int64(sizen) { + return nil, fmt.Errorf("blob size was not accurate") + } + + out := &Blob{} + out.rawData = buf.Bytes() + out.cid = hashObject(out.RawData()) + + return out, nil +} + +func ReadCommit(rd *bufio.Reader) (*Commit, error) { + size, err := rd.ReadString(0) + if err != nil { + return nil, err + } + + out := &Commit{ + DataSize: size[:len(size)-1], + } + + for { + line, _, err := rd.ReadLine() + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + + err = parseCommitLine(out, line, rd) + if err != nil { + return nil, err + } + } + + out.cid = hashObject(out.RawData()) + + return out, nil +} + +func parseCommitLine(out *Commit, line []byte, rd *bufio.Reader) error { + switch { + case bytes.HasPrefix(line, []byte("tree ")): + sha, err := hex.DecodeString(string(line[5:])) + if err != nil { + return err + } + + out.GitTree = shaToCid(sha) + case bytes.HasPrefix(line, []byte("parent ")): + psha, err := hex.DecodeString(string(line[7:])) + if err != nil { + return err + } + + out.Parents = append(out.Parents, shaToCid(psha)) + case bytes.HasPrefix(line, []byte("author ")): + a, err := parsePersonInfo(line) + if err != nil { + return err + } + + out.Author = a + case bytes.HasPrefix(line, []byte("committer ")): + c, err := parsePersonInfo(line) + if err != nil { + return err + } + + out.Committer = c + case bytes.HasPrefix(line, []byte("encoding ")): + out.Encoding = string(line[9:]) + case bytes.HasPrefix(line, []byte("mergetag object ")): + sha, err := hex.DecodeString(string(line)[16:]) + if err != nil { + return err + } + + mt, rest, err := ReadMergeTag(sha, rd) + if err != nil { + return err + } + + out.MergeTag = append(out.MergeTag, mt) + + if rest != nil { + err = parseCommitLine(out, rest, rd) + if err != nil { + return err + } + } + case bytes.HasPrefix(line, []byte("gpgsig ")): + sig, err := ReadGpgSig(rd) + if err != nil { + return err + } + out.Sig = sig + case len(line) == 0: + rest, err := ioutil.ReadAll(rd) + if err != nil { + return err + } + + out.Message = string(rest) + default: + out.Other = append(out.Other, string(line)) + } + return nil +} + +func ReadTag(rd *bufio.Reader) (*Tag, error) { + size, err := rd.ReadString(0) + if err != nil { + return nil, err + } + + out := &Tag{ + dataSize: size[:len(size)-1], + } + + for { + line, _, err := rd.ReadLine() + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + + switch { + case bytes.HasPrefix(line, []byte("object ")): + sha, err := hex.DecodeString(string(line[7:])) + if err != nil { + return nil, err + } + + out.Object = shaToCid(sha) + case bytes.HasPrefix(line, []byte("tag ")): + out.Tag = string(line[4:]) + case bytes.HasPrefix(line, []byte("tagger ")): + c, err := parsePersonInfo(line) + if err != nil { + return nil, err + } + + out.Tagger = c + case bytes.HasPrefix(line, []byte("type ")): + out.Type = string(line[5:]) + case len(line) == 0: + rest, err := ioutil.ReadAll(rd) + if err != nil { + return nil, err + } + + out.Message = string(rest) + default: + fmt.Println("unhandled line: ", string(line)) + } + } + + out.cid = hashObject(out.RawData()) + + return out, nil +} + +func hashObject(data []byte) cid.Cid { + c, err := cid.Prefix{ + MhType: mh.SHA1, + MhLength: -1, + Codec: cid.GitRaw, + Version: 1, + }.Sum(data) + if err != nil { + panic(err) + } + return c +} + +func ReadMergeTag(hash []byte, rd *bufio.Reader) (*MergeTag, []byte, error) { + out := new(MergeTag) + + out.Object = shaToCid(hash) + for { + line, _, err := rd.ReadLine() + if err != nil { + if err == io.EOF { + break + } + return nil, nil, err + } + + switch { + case bytes.HasPrefix(line, []byte(" type ")): + out.Type = string(line[6:]) + case bytes.HasPrefix(line, []byte(" tag ")): + out.Tag = string(line[5:]) + case bytes.HasPrefix(line, []byte(" tagger ")): + tagger, err := parsePersonInfo(line[1:]) + if err != nil { + return nil, nil, err + } + out.Tagger = tagger + case string(line) == " ": + for { + line, _, err := rd.ReadLine() + if err != nil { + return nil, nil, err + } + + if !bytes.HasPrefix(line, []byte(" ")) { + return out, line, nil + } + + out.Text += string(line) + "\n" + } + } + } + return out, nil, nil +} + +func ReadGpgSig(rd *bufio.Reader) (*GpgSig, error) { + line, _, err := rd.ReadLine() + if err != nil { + return nil, err + } + + out := new(GpgSig) + + if string(line) != " " { + if strings.HasPrefix(string(line), " Version: ") || strings.HasPrefix(string(line), " Comment: ") { + out.Text += string(line) + "\n" + } else { + return nil, fmt.Errorf("expected first line of sig to be a single space or version") + } + } else { + out.Text += " \n" + } + + for { + line, _, err := rd.ReadLine() + if err != nil { + return nil, err + } + + if bytes.Equal(line, []byte(" -----END PGP SIGNATURE-----")) { + break + } + + out.Text += string(line) + "\n" + } + + return out, nil +} + +func parsePersonInfo(line []byte) (*PersonInfo, error) { + parts := bytes.Split(line, []byte{' '}) + if len(parts) < 3 { + fmt.Println(string(line)) + return nil, fmt.Errorf("incorrectly formatted person info line") + } + + //TODO: just use regex? + //skip prefix + at := 1 + + var pi PersonInfo + var name string + + for { + if at == len(parts) { + return nil, fmt.Errorf("invalid personInfo: %s\n", line) + } + part := parts[at] + if len(part) != 0 { + if part[0] == '<' { + break + } + name += string(part) + " " + } else if len(name) > 0 { + name += " " + } + at++ + } + if len(name) != 0 { + pi.Name = name[:len(name)-1] + } + + var email string + for { + if at == len(parts) { + return nil, fmt.Errorf("invalid personInfo: %s\n", line) + } + part := parts[at] + if part[0] == '<' { + part = part[1:] + } + + at++ + if part[len(part)-1] == '>' { + email += string(part[:len(part)-1]) + break + } + email += string(part) + " " + } + pi.Email = email + + if at == len(parts) { + return &pi, nil + } + pi.Date = string(parts[at]) + + at++ + if at == len(parts) { + return &pi, nil + } + pi.Timezone = string(parts[at]) + return &pi, nil +} + +func ReadTree(rd *bufio.Reader) (*Tree, error) { + lstr, err := rd.ReadString(0) + if err != nil { + return nil, err + } + lstr = lstr[:len(lstr)-1] + + n, err := strconv.Atoi(lstr) + if err != nil { + return nil, err + } + + t := &Tree{ + entries: make(map[string]*TreeEntry), + size: n, + } + var order []string + for { + e, err := ReadEntry(rd) + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + + order = append(order, e.name) + t.entries[e.name] = e + } + t.order = order + t.cid = hashObject(t.RawData()) + + return t, nil +} + +func cidToSha(c cid.Cid) []byte { + h := c.Hash() + return h[len(h)-20:] +} + +func shaToCid(sha []byte) cid.Cid { + h, _ := mh.Encode(sha, mh.SHA1) + return cid.NewCidV1(cid.GitRaw, h) +} + +func ReadEntry(r *bufio.Reader) (*TreeEntry, error) { + data, err := r.ReadString(' ') + if err != nil { + return nil, err + } + data = data[:len(data)-1] + + name, err := r.ReadString(0) + if err != nil { + return nil, err + } + name = name[:len(name)-1] + + sha := make([]byte, 20) + _, err = io.ReadFull(r, sha) + if err != nil { + return nil, err + } + + return &TreeEntry{ + name: name, + Mode: data, + Hash: shaToCid(sha), + }, nil +} diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/make-test-repo.sh b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/make-test-repo.sh new file mode 100644 index 0000000000..dbb3f230f6 --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/make-test-repo.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +set -x +CUR_DIR=$(pwd) +TEST_DIR=$(mktemp -d) +cd ${TEST_DIR} + +git init + +# Test generic commit/blob + +git config user.name "John Doe" +git config user.email johndoe@example.com + +echo "Hello world" > file +git add file + +git commit -m "Init" + +# Test generic commit/tree/blob, weird person info + +mkdir dir +mkdir dir/subdir +mkdir dir2 + +echo "qwerty" > dir/f1 +echo "123456" > dir/subdir/f2 +echo "',.pyf" > dir2/f3 + +git add . + +git config user.name "John Doe & John Other" +git config user.email "johndoe@example.com, johnother@example.com" +git commit -m "Commit 2" + +# Test merge-tag +git config user.name "John Doe" +git config user.email johndoe@example.com + +git branch dev +git checkout dev + +echo ";qjkxb" > dir/f4 + +git add dir/f4 +git commit -m "Release" +git tag -a v1 -m "Some version" +git checkout master + +## defer eyes.Open() +## eyes.Close() + +git cat-file tag $(cat .git/refs/tags/v1) | head -n4 | sed 's/v1/v1sig/g' > sigobj +cat >>sigobj < sigtag +FILE=.git/objects/$(sha1sum sigtag | cut -d' ' -f1 | sed 's/../\0\//') +mkdir -p $(dirname ${FILE}) +cat sigtag | zlib-flate -compress > ${FILE} +echo $(sha1sum sigtag | cut -d' ' -f1) > .git/refs/tags/v1sig + +git merge v1sig --no-ff -m "Merge tag v1" + +# Test encoding +git config i18n.commitencoding "ISO-8859-1" +echo "fgcrl" > f6 +git add f6 +git commit -m "Encoded" + +# Test iplBlob/tree tags +git tag -a v1-file -m "Some file" 933b7583b7767b07ea4cf242c1be29162eb8bb85 +git tag -a v1-tree -m "Some tree" 672ef117424f54b71e5e058d1184de6a07450d0e + +# Create test 'signed' objects + +git cat-file commit $(cat .git/refs/heads/master) | head -n4 > sigobj +echo "gpgsig -----BEGIN PGP SIGNATURE-----" >> sigobj +echo " " >> sigobj +echo " NotReallyABase64Signature" >> sigobj +echo " ButItsGoodEnough" >> sigobj +echo " -----END PGP SIGNATURE-----" >> sigobj +echo "" >> sigobj +echo "Encoded" >> sigobj + +cat <(printf "commit %d\0" $(wc -c sigobj | cut -d' ' -f1); cat sigobj) > sigcommit +FILE=.git/objects/$(sha1sum sigcommit | cut -d' ' -f1 | sed 's/../\0\//') +mkdir -p $(dirname ${FILE}) +cat sigcommit | zlib-flate -compress > ${FILE} + +git cat-file commit $(cat .git/refs/heads/master) | head -n4 > sigobj +echo "gpgsig -----BEGIN PGP SIGNATURE-----" >> sigobj +echo " Version: 0.1.2" >> sigobj +echo " " >> sigobj +echo " NotReallyABase64Signature" >> sigobj +echo " ButItsGoodEnough" >> sigobj +echo " -----END PGP SIGNATURE-----" >> sigobj +echo " " >> sigobj +echo "" >> sigobj +echo "Encoded" >> sigobj + +cat <(printf "commit %d\0" $(wc -c sigobj | cut -d' ' -f1); cat sigobj) > sigcommit +FILE=.git/objects/$(sha1sum sigcommit | cut -d' ' -f1 | sed 's/../\0\//') +mkdir -p $(dirname ${FILE}) +cat sigcommit | zlib-flate -compress >> ${FILE} +rm sigobj sigcommit + +# Create test archive, clean up + +tar czf git.tar.gz .git +mv git.tar.gz ${CUR_DIR}/testdata.tar.gz +cd ${CUR_DIR} +rm -rf ${TEST_DIR} diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/package.json b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/package.json new file mode 100644 index 0000000000..cff29bcfe2 --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/package.json @@ -0,0 +1,42 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ipld-git" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipld-git" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "", + "name": "go-ipld-git", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.3.6" +} + diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tag.go b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tag.go new file mode 100644 index 0000000000..6f65816b3a --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tag.go @@ -0,0 +1,136 @@ +package ipldgit + +import ( + "bytes" + "encoding/hex" + "errors" + "fmt" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +type Tag struct { + Object cid.Cid `json:"object"` + Type string `json:"type"` + Tag string `json:"tag"` + Tagger *PersonInfo `json:"tagger"` + Message string `json:"message"` + dataSize string + + cid cid.Cid + + rawData []byte + rawDataOnce sync.Once +} + +func (t *Tag) Cid() cid.Cid { + return t.cid +} + +func (t *Tag) Copy() node.Node { + nt := *t + return &nt +} + +func (t *Tag) Links() []*node.Link { + return []*node.Link{{Cid: t.Object}} +} + +func (t *Tag) Loggable() map[string]interface{} { + return map[string]interface{}{ + "type": "git_tag", + } +} + +func (t *Tag) RawData() []byte { + t.rawDataOnce.Do(func() { + buf := new(bytes.Buffer) + fmt.Fprintf(buf, "tag %s\x00", t.dataSize) + fmt.Fprintf(buf, "object %s\n", hex.EncodeToString(cidToSha(t.Object))) + fmt.Fprintf(buf, "type %s\n", t.Type) + fmt.Fprintf(buf, "tag %s\n", t.Tag) + if t.Tagger != nil { + fmt.Fprintf(buf, "tagger %s\n", t.Tagger.String()) + } + if t.Message != "" { + fmt.Fprintf(buf, "\n%s", t.Message) + } + t.rawData = buf.Bytes() + }) + + return t.rawData +} + +func (t *Tag) Resolve(path []string) (interface{}, []string, error) { + if len(path) == 0 { + return nil, nil, fmt.Errorf("zero length path") + } + + switch path[0] { + case "object": + return &node.Link{Cid: t.Object}, path[1:], nil + case "type": + return t.Type, path[1:], nil + case "tagger": + if len(path) == 1 { + return t.Tagger, nil, nil + } + return t.Tagger.resolve(path[1:]) + case "message": + return t.Message, path[1:], nil + case "tag": + return t.Tag, path[1:], nil + default: + return nil, nil, errors.New("no such link") + } +} + +func (t *Tag) ResolveLink(path []string) (*node.Link, []string, error) { + out, rest, err := t.Resolve(path) + if err != nil { + return nil, nil, err + } + + lnk, ok := out.(*node.Link) + if !ok { + return nil, nil, errors.New("not a link") + } + + return lnk, rest, nil +} + +func (t *Tag) Size() (uint64, error) { + return uint64(len(t.RawData())), nil +} + +func (t *Tag) Stat() (*node.NodeStat, error) { + return &node.NodeStat{}, nil +} + +func (t *Tag) String() string { + return "[git tag object]" +} + +func (t *Tag) Tree(p string, depth int) []string { + if p != "" { + if p == "tagger" { + return []string{"name", "email", "date"} + } + return nil + } + if depth == 0 { + return nil + } + + tree := []string{"object", "type", "tag", "message"} + tree = append(tree, t.Tagger.tree("tagger", depth)...) + return tree +} + +func (t *Tag) GitSha() []byte { + return cidToSha(t.Cid()) +} + +var _ node.Node = (*Tag)(nil) diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/testdata.tar.gz b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/testdata.tar.gz new file mode 100644 index 0000000000..658dfe843f Binary files /dev/null and b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/testdata.tar.gz differ diff --git a/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tree.go b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tree.go new file mode 100644 index 0000000000..7fad2151c6 --- /dev/null +++ b/vendor/gx/ipfs/QmQFmr7d1V38H5E8T6pBLoZvZNH1bVvtJSaCkRVHgRpFXu/go-ipld-git/tree.go @@ -0,0 +1,170 @@ +package ipldgit + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +type Tree struct { + entries map[string]*TreeEntry + size int + order []string + cid cid.Cid + rawData []byte + rawDataOnce sync.Once +} + +type TreeEntry struct { + name string + Mode string `json:"mode"` + Hash cid.Cid `json:"hash"` +} + +func (t *Tree) Cid() cid.Cid { + return t.cid +} + +func (t *Tree) String() string { + return "[git tree object]" +} + +func (t *Tree) GitSha() []byte { + return cidToSha(t.cid) +} + +func (t *Tree) Copy() node.Node { + out := &Tree{ + entries: make(map[string]*TreeEntry), + cid: t.cid, + size: t.size, + order: t.order, // TODO: make a deep copy of this + } + + for k, v := range t.entries { + nv := *v + out.entries[k] = &nv + } + return out +} + +func (t *Tree) MarshalJSON() ([]byte, error) { + return json.Marshal(t.entries) +} + +func (t *Tree) Tree(p string, depth int) []string { + if p != "" { + _, ok := t.entries[p] + if !ok { + return nil + } + + return []string{"mode", "type", "hash"} + } + + if depth == 0 { + return nil + } + + if depth == 1 { + return t.order + } + + var out []string + for k := range t.entries { + out = append(out, k, k+"/mode", k+"/type", k+"/hash") + } + return out +} + +func (t *Tree) Links() []*node.Link { + var out []*node.Link + for _, v := range t.entries { + out = append(out, &node.Link{Cid: v.Hash}) + } + return out +} + +func (t *Tree) Loggable() map[string]interface{} { + return map[string]interface{}{ + "type": "git tree object", + } +} + +func (t *Tree) RawData() []byte { + t.rawDataOnce.Do(func() { + buf := new(bytes.Buffer) + + fmt.Fprintf(buf, "tree %d\x00", t.size) + for _, s := range t.order { + t.entries[s].WriteTo(buf) + } + t.rawData = buf.Bytes() + }) + + return t.rawData +} + +func (t *Tree) Resolve(p []string) (interface{}, []string, error) { + e, ok := t.entries[p[0]] + if !ok { + return nil, nil, errors.New("no such link") + } + + if len(p) == 1 { + return e, nil, nil + } + + switch p[1] { + case "hash": + return &node.Link{Cid: e.Hash}, p[2:], nil + case "mode": + return e.Mode, p[2:], nil + default: + return nil, nil, errors.New("no such link") + } +} + +func (t Tree) ResolveLink(path []string) (*node.Link, []string, error) { + out, rest, err := t.Resolve(path) + if err != nil { + return nil, nil, err + } + + lnk, ok := out.(*node.Link) + if !ok { + return nil, nil, errors.New("not a link") + } + + return lnk, rest, nil +} + +func (t *Tree) Size() (uint64, error) { + return uint64(len(t.RawData())), nil +} + +func (t *Tree) Stat() (*node.NodeStat, error) { + return &node.NodeStat{}, nil +} + +func (te *TreeEntry) WriteTo(w io.Writer) (int, error) { + n, err := fmt.Fprintf(w, "%s %s\x00", te.Mode, te.name) + if err != nil { + return 0, err + } + + nn, err := w.Write(cidToSha(te.Hash)) + if err != nil { + return n, err + } + + return n + nn, nil +} + +var _ node.Node = (*Tree)(nil) diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/.travis.yml b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/.travis.yml deleted file mode 100644 index 1985a1da72..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -env: - - IPFS_REUSEPORT=false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/Makefile b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/Makefile deleted file mode 100644 index d6680bd022..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -export IPFS_API ?= v04x.ipfs.io - -gx: - go get -u github.com/whyrusleeping/gx - go get -u github.com/whyrusleeping/gx-go - -deps: gx - gx --verbose install --global - gx-go rewrite - -publish: - gx-go rewrite --undo diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht.go deleted file mode 100644 index 6d9f03ed24..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht.go +++ /dev/null @@ -1,389 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after kademlia with S/Kademlia modifications. -package dht - -import ( - "bytes" - "context" - "errors" - "fmt" - "sync" - "time" - - opts "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts" - pb "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb" - providers "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/providers" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - recpb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var log = logging.Logger("dht") - -// NumBootstrapQueries defines the number of random dht queries to do to -// collect members of the routing table. -const NumBootstrapQueries = 5 - -// IpfsDHT is an implementation of Kademlia with S/Kademlia modifications. -// It is used to implement the base IpfsRouting module. -type IpfsDHT struct { - host host.Host // the network services we need - self peer.ID // Local peer (yourself) - peerstore pstore.Peerstore // Peer Registry - - datastore ds.Datastore // Local data - - routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes - providers *providers.ProviderManager - - birth time.Time // When this peer started up - - Validator record.Validator - - ctx context.Context - proc goprocess.Process - - strmap map[peer.ID]*messageSender - smlk sync.Mutex - - plk sync.Mutex - - protocols []protocol.ID // DHT protocols -} - -// New creates a new DHT with the specified host and options. -func New(ctx context.Context, h host.Host, options ...opts.Option) (*IpfsDHT, error) { - var cfg opts.Options - if err := cfg.Apply(append([]opts.Option{opts.Defaults}, options...)...); err != nil { - return nil, err - } - dht := makeDHT(ctx, h, cfg.Datastore, cfg.Protocols) - - // register for network notifs. - dht.host.Network().Notify((*netNotifiee)(dht)) - - dht.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { - // remove ourselves from network notifs. - dht.host.Network().StopNotify((*netNotifiee)(dht)) - return nil - }) - - dht.proc.AddChild(dht.providers.Process()) - dht.Validator = cfg.Validator - - if !cfg.Client { - for _, p := range cfg.Protocols { - h.SetStreamHandler(p, dht.handleNewStream) - } - } - return dht, nil -} - -// NewDHT creates a new DHT object with the given peer as the 'local' host. -// IpfsDHT's initialized with this function will respond to DHT requests, -// whereas IpfsDHT's initialized with NewDHTClient will not. -func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht, err := New(ctx, h, opts.Datastore(dstore)) - if err != nil { - panic(err) - } - return dht -} - -// NewDHTClient creates a new DHT object with the given peer as the 'local' -// host. IpfsDHT clients initialized with this function will not respond to DHT -// requests. If you need a peer to respond to DHT requests, use NewDHT instead. -// NewDHTClient creates a new DHT object with the given peer as the 'local' host -func NewDHTClient(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht, err := New(ctx, h, opts.Datastore(dstore), opts.Client(true)) - if err != nil { - panic(err) - } - return dht -} - -func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching, protocols []protocol.ID) *IpfsDHT { - rt := kb.NewRoutingTable(KValue, kb.ConvertPeerID(h.ID()), time.Minute, h.Peerstore()) - - cmgr := h.ConnManager() - rt.PeerAdded = func(p peer.ID) { - cmgr.TagPeer(p, "kbucket", 5) - } - rt.PeerRemoved = func(p peer.ID) { - cmgr.UntagPeer(p, "kbucket") - } - - return &IpfsDHT{ - datastore: dstore, - self: h.ID(), - peerstore: h.Peerstore(), - host: h, - strmap: make(map[peer.ID]*messageSender), - ctx: ctx, - providers: providers.NewProviderManager(ctx, h.ID(), dstore), - birth: time.Now(), - routingTable: rt, - protocols: protocols, - } -} - -// putValueToPeer stores the given key/value pair at the peer 'p' -func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, rec *recpb.Record) error { - - pmes := pb.NewMessage(pb.Message_PUT_VALUE, rec.Key, 0) - pmes.Record = rec - rpmes, err := dht.sendRequest(ctx, p, pmes) - if err != nil { - log.Debugf("putValueToPeer: %v. (peer: %s, key: %s)", err, p.Pretty(), loggableKey(string(rec.Key))) - return err - } - - if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { - log.Warningf("putValueToPeer: value not put correctly. (%v != %v)", pmes, rpmes) - return errors.New("value not put correctly") - } - - return nil -} - -var errInvalidRecord = errors.New("received invalid record") - -// getValueOrPeers queries a particular peer p for the value for -// key. It returns either the value or a list of closer peers. -// NOTE: It will update the dht's peerstore with any new addresses -// it finds for the given peer. -func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID, key string) (*recpb.Record, []*pstore.PeerInfo, error) { - - pmes, err := dht.getValueSingle(ctx, p, key) - if err != nil { - return nil, nil, err - } - - // Perhaps we were given closer peers - peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) - - if record := pmes.GetRecord(); record != nil { - // Success! We were given the value - log.Debug("getValueOrPeers: got value") - - // make sure record is valid. - err = dht.Validator.Validate(string(record.GetKey()), record.GetValue()) - if err != nil { - log.Info("Received invalid record! (discarded)") - // return a sentinal to signify an invalid record was received - err = errInvalidRecord - record = new(recpb.Record) - } - return record, peers, err - } - - if len(peers) > 0 { - log.Debug("getValueOrPeers: peers") - return nil, peers, nil - } - - log.Warning("getValueOrPeers: routing.ErrNotFound") - return nil, nil, routing.ErrNotFound -} - -// getValueSingle simply performs the get value RPC with the given parameters -func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, key string) (*pb.Message, error) { - meta := logging.LoggableMap{ - "key": key, - "peer": p, - } - - eip := log.EventBegin(ctx, "getValueSingle", meta) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_VALUE, []byte(key), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("getValueSingle: read timeout %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// getLocal attempts to retrieve the value from the datastore -func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) { - log.Debugf("getLocal %s", key) - rec, err := dht.getRecordFromDatastore(mkDsKey(key)) - if err != nil { - log.Warningf("getLocal: %s", err) - return nil, err - } - - // Double check the key. Can't hurt. - if rec != nil && string(rec.GetKey()) != key { - log.Errorf("BUG getLocal: found a DHT record that didn't match it's key: %s != %s", rec.GetKey(), key) - return nil, nil - - } - return rec, nil -} - -// getOwnPrivateKey attempts to load the local peers private -// key from the peerstore. -func (dht *IpfsDHT) getOwnPrivateKey() (ci.PrivKey, error) { - sk := dht.peerstore.PrivKey(dht.self) - if sk == nil { - log.Warningf("%s dht cannot get own private key!", dht.self) - return nil, fmt.Errorf("cannot get private key to sign record!") - } - return sk, nil -} - -// putLocal stores the key value pair in the datastore -func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error { - log.Debugf("putLocal: %v %v", key, rec) - data, err := proto.Marshal(rec) - if err != nil { - log.Warningf("putLocal: %s", err) - return err - } - - return dht.datastore.Put(mkDsKey(key), data) -} - -// Update signals the routingTable to Update its last-seen status -// on the given peer. -func (dht *IpfsDHT) Update(ctx context.Context, p peer.ID) { - log.Event(ctx, "updatePeer", p) - dht.routingTable.Update(p) -} - -// FindLocal looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in. -func (dht *IpfsDHT) FindLocal(id peer.ID) pstore.PeerInfo { - switch dht.host.Network().Connectedness(id) { - case inet.Connected, inet.CanConnect: - return dht.peerstore.PeerInfo(id) - default: - return pstore.PeerInfo{} - } -} - -// findPeerSingle asks peer 'p' if they know where the peer with id 'id' is -func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findPeerSingle", - logging.LoggableMap{ - "peer": p, - "target": id, - }) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_FIND_NODE, []byte(id), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), id) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key cid.Cid) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findProvidersSingle", p, key) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_PROVIDERS, key.Bytes(), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// nearestPeersToQuery returns the routing tables closest peers. -func (dht *IpfsDHT) nearestPeersToQuery(pmes *pb.Message, count int) []peer.ID { - closer := dht.routingTable.NearestPeers(kb.ConvertKey(string(pmes.GetKey())), count) - return closer -} - -// betterPeerToQuery returns nearestPeersToQuery, but iff closer than self. -func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) []peer.ID { - closer := dht.nearestPeersToQuery(pmes, count) - - // no node? nil - if closer == nil { - log.Warning("betterPeersToQuery: no closer peers to send:", p) - return nil - } - - filtered := make([]peer.ID, 0, len(closer)) - for _, clp := range closer { - - // == to self? thats bad - if clp == dht.self { - log.Error("BUG betterPeersToQuery: attempted to return self! this shouldn't happen...") - return nil - } - // Dont send a peer back themselves - if clp == p { - continue - } - - filtered = append(filtered, clp) - } - - // ok seems like closer nodes - return filtered -} - -// Context return dht's context -func (dht *IpfsDHT) Context() context.Context { - return dht.ctx -} - -// Process return dht's process -func (dht *IpfsDHT) Process() goprocess.Process { - return dht.proc -} - -// Close calls Process Close -func (dht *IpfsDHT) Close() error { - return dht.proc.Close() -} - -func (dht *IpfsDHT) protocolStrs() []string { - pstrs := make([]string, len(dht.protocols)) - for idx, proto := range dht.protocols { - pstrs[idx] = string(proto) - } - - return pstrs -} - -func mkDsKey(s string) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_bootstrap.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_bootstrap.go deleted file mode 100644 index 13372bc35a..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_bootstrap.go +++ /dev/null @@ -1,184 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after Kademlia with S/Kademlia modifications. -package dht - -import ( - "context" - "crypto/rand" - "fmt" - "time" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" -) - -// BootstrapConfig specifies parameters used bootstrapping the DHT. -// -// Note there is a tradeoff between the bootstrap period and the -// number of queries. We could support a higher period with less -// queries. -type BootstrapConfig struct { - Queries int // how many queries to run per period - Period time.Duration // how often to run periodic bootstrap. - Timeout time.Duration // how long to wait for a bootstrap query to run -} - -var DefaultBootstrapConfig = BootstrapConfig{ - // For now, this is set to 1 query. - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. Once we are more certain - // of our implementation's robustness, we should lower this down to 8 or 4. - Queries: 1, - - // For now, this is set to 5 minutes, which is a medium period. We are - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. - Period: time.Duration(5 * time.Minute), - - Timeout: time.Duration(10 * time.Second), -} - -// Bootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// As opposed to BootstrapWithConfig, Bootstrap satisfies the routing interface -func (dht *IpfsDHT) Bootstrap(ctx context.Context) error { - proc, err := dht.BootstrapWithConfig(DefaultBootstrapConfig) - if err != nil { - return err - } - - // wait till ctx or dht.Context exits. - // we have to do it this way to satisfy the Routing interface (contexts) - go func() { - defer proc.Close() - select { - case <-ctx.Done(): - case <-dht.Context().Done(): - } - }() - - return nil -} - -// BootstrapWithConfig ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// BootstrapWithConfig returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapWithConfig(cfg BootstrapConfig) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - - proc := dht.Process().Go(func(p goprocess.Process) { - <-p.Go(dht.bootstrapWorker(cfg)).Closed() - for { - select { - case <-time.After(cfg.Period): - <-p.Go(dht.bootstrapWorker(cfg)).Closed() - case <-p.Closing(): - return - } - } - }) - - return proc, nil -} - -// SignalBootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// SignalBootstrap returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapOnSignal(cfg BootstrapConfig, signal <-chan time.Time) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - - if signal == nil { - return nil, fmt.Errorf("invalid signal: %v", signal) - } - - proc := periodicproc.Ticker(signal, dht.bootstrapWorker(cfg)) - - return proc, nil -} - -func (dht *IpfsDHT) bootstrapWorker(cfg BootstrapConfig) func(worker goprocess.Process) { - return func(worker goprocess.Process) { - // it would be useful to be able to send out signals of when we bootstrap, too... - // maybe this is a good case for whole module event pub/sub? - - ctx := dht.Context() - if err := dht.runBootstrap(ctx, cfg); err != nil { - log.Warning(err) - // A bootstrapping error is important to notice but not fatal. - } - } -} - -// runBootstrap builds up list of peers by requesting random peer IDs -func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error { - bslog := func(msg string) { - log.Debugf("DHT %s dhtRunBootstrap %s -- routing table size: %d", dht.self, msg, dht.routingTable.Size()) - } - bslog("start") - defer bslog("end") - defer log.EventBegin(ctx, "dhtRunBootstrap").Done() - - var merr u.MultiErr - - randomID := func() peer.ID { - // 16 random bytes is not a valid peer id. it may be fine becuase - // the dht will rehash to its own keyspace anyway. - id := make([]byte, 16) - rand.Read(id) - id = u.Hash(id) - return peer.ID(id) - } - - // bootstrap sequentially, as results will compound - runQuery := func(ctx context.Context, id peer.ID) { - ctx, cancel := context.WithTimeout(ctx, cfg.Timeout) - defer cancel() - - p, err := dht.FindPeer(ctx, id) - if err == routing.ErrNotFound { - // this isn't an error. this is precisely what we expect. - } else if err != nil { - merr = append(merr, err) - } else { - // woah, actually found a peer with that ID? this shouldn't happen normally - // (as the ID we use is not a real ID). this is an odd error worth logging. - err := fmt.Errorf("Bootstrap peer error: Actually FOUND peer. (%s, %s)", id, p) - log.Warningf("%s", err) - merr = append(merr, err) - } - } - - // these should be parallel normally. but can make them sequential for debugging. - // note that the core/bootstrap context deadline should be extended too for that. - for i := 0; i < cfg.Queries; i++ { - id := randomID() - log.Debugf("Bootstrapping query (%d/%d) to random ID: %s", i+1, cfg.Queries, id) - runQuery(ctx, id) - } - - // Find self to distribute peer info to our neighbors. - // Do this after bootstrapping. - log.Debugf("Bootstrapping query to self: %s", dht.self) - runQuery(ctx, dht.self) - - if len(merr) > 0 { - return merr - } - return nil -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_net.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_net.go deleted file mode 100644 index 10a9844a48..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/dht_net.go +++ /dev/null @@ -1,359 +0,0 @@ -package dht - -import ( - "bufio" - "context" - "fmt" - "io" - "sync" - "time" - - pb "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb" - ctxio "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" -) - -var dhtReadMessageTimeout = time.Minute -var ErrReadTimeout = fmt.Errorf("timed out reading response") - -type bufferedWriteCloser interface { - ggio.WriteCloser - Flush() error -} - -// The Protobuf writer performs multiple small writes when writing a message. -// We need to buffer those writes, to make sure that we're not sending a new -// packet for every single write. -type bufferedDelimitedWriter struct { - *bufio.Writer - ggio.WriteCloser -} - -func newBufferedDelimitedWriter(str io.Writer) bufferedWriteCloser { - w := bufio.NewWriter(str) - return &bufferedDelimitedWriter{ - Writer: w, - WriteCloser: ggio.NewDelimitedWriter(w), - } -} - -func (w *bufferedDelimitedWriter) Flush() error { - return w.Writer.Flush() -} - -// handleNewStream implements the inet.StreamHandler -func (dht *IpfsDHT) handleNewStream(s inet.Stream) { - go dht.handleNewMessage(s) -} - -func (dht *IpfsDHT) handleNewMessage(s inet.Stream) { - ctx := dht.Context() - cr := ctxio.NewReader(ctx, s) // ok to use. we defer close stream in this func - cw := ctxio.NewWriter(ctx, s) // ok to use. we defer close stream in this func - r := ggio.NewDelimitedReader(cr, inet.MessageSizeMax) - w := newBufferedDelimitedWriter(cw) - mPeer := s.Conn().RemotePeer() - - for { - // receive msg - pmes := new(pb.Message) - switch err := r.ReadMsg(pmes); err { - case io.EOF: - s.Close() - return - case nil: - default: - s.Reset() - log.Debugf("Error unmarshaling data: %s", err) - return - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, mPeer, pmes) - - // get handler for this msg type. - handler := dht.handlerForMsgType(pmes.GetType()) - if handler == nil { - s.Reset() - log.Debug("got back nil handler from handlerForMsgType") - return - } - - // dispatch handler. - rpmes, err := handler(ctx, mPeer, pmes) - if err != nil { - s.Reset() - log.Debugf("handle message error: %s", err) - return - } - - // if nil response, return it before serializing - if rpmes == nil { - log.Debug("got back nil response from request") - continue - } - - // send out response msg - err = w.WriteMsg(rpmes) - if err == nil { - err = w.Flush() - } - if err != nil { - s.Reset() - log.Debugf("send response error: %s", err) - return - } - } -} - -// sendRequest sends out a request, but also makes sure to -// measure the RTT for latency measurements. -func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return nil, err - } - - start := time.Now() - - rpmes, err := ms.SendRequest(ctx, pmes) - if err != nil { - return nil, err - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, p, rpmes) - - dht.peerstore.RecordLatency(p, time.Since(start)) - log.Event(ctx, "dhtReceivedMessage", dht.self, p, rpmes) - return rpmes, nil -} - -// sendMessage sends out a message -func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return err - } - - if err := ms.SendMessage(ctx, pmes); err != nil { - return err - } - log.Event(ctx, "dhtSentMessage", dht.self, p, pmes) - return nil -} - -func (dht *IpfsDHT) updateFromMessage(ctx context.Context, p peer.ID, mes *pb.Message) error { - // Make sure that this node is actually a DHT server, not just a client. - protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) - if err == nil && len(protos) > 0 { - dht.Update(ctx, p) - } - return nil -} - -func (dht *IpfsDHT) messageSenderForPeer(p peer.ID) (*messageSender, error) { - dht.smlk.Lock() - ms, ok := dht.strmap[p] - if ok { - dht.smlk.Unlock() - return ms, nil - } - ms = &messageSender{p: p, dht: dht} - dht.strmap[p] = ms - dht.smlk.Unlock() - - if err := ms.prepOrInvalidate(); err != nil { - dht.smlk.Lock() - defer dht.smlk.Unlock() - - if msCur, ok := dht.strmap[p]; ok { - // Changed. Use the new one, old one is invalid and - // not in the map so we can just throw it away. - if ms != msCur { - return msCur, nil - } - // Not changed, remove the now invalid stream from the - // map. - delete(dht.strmap, p) - } - // Invalid but not in map. Must have been removed by a disconnect. - return nil, err - } - // All ready to go. - return ms, nil -} - -type messageSender struct { - s inet.Stream - r ggio.ReadCloser - w bufferedWriteCloser - lk sync.Mutex - p peer.ID - dht *IpfsDHT - - invalid bool - singleMes int -} - -// invalidate is called before this messageSender is removed from the strmap. -// It prevents the messageSender from being reused/reinitialized and then -// forgotten (leaving the stream open). -func (ms *messageSender) invalidate() { - ms.invalid = true - if ms.s != nil { - ms.s.Reset() - ms.s = nil - } -} - -func (ms *messageSender) prepOrInvalidate() error { - ms.lk.Lock() - defer ms.lk.Unlock() - if err := ms.prep(); err != nil { - ms.invalidate() - return err - } - return nil -} - -func (ms *messageSender) prep() error { - if ms.invalid { - return fmt.Errorf("message sender has been invalidated") - } - if ms.s != nil { - return nil - } - - nstr, err := ms.dht.host.NewStream(ms.dht.ctx, ms.p, ms.dht.protocols...) - if err != nil { - return err - } - - ms.r = ggio.NewDelimitedReader(nstr, inet.MessageSizeMax) - ms.w = newBufferedDelimitedWriter(nstr) - ms.s = nstr - - return nil -} - -// streamReuseTries is the number of times we will try to reuse a stream to a -// given peer before giving up and reverting to the old one-message-per-stream -// behaviour. -const streamReuseTries = 3 - -func (ms *messageSender) SendMessage(ctx context.Context, pmes *pb.Message) error { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return err - } - - if err := ms.writeMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - go inet.FullClose(ms.s) - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return nil - } -} - -func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb.Message, error) { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return nil, err - } - - if err := ms.writeMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return nil, err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - mes := new(pb.Message) - if err := ms.ctxReadMsg(ctx, mes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error reading message, bailing: ", err) - return nil, err - } else { - log.Info("error reading message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - go inet.FullClose(ms.s) - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return mes, nil - } -} - -func (ms *messageSender) writeMsg(pmes *pb.Message) error { - if err := ms.w.WriteMsg(pmes); err != nil { - return err - } - return ms.w.Flush() -} - -func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { - errc := make(chan error, 1) - go func(r ggio.ReadCloser) { - errc <- r.ReadMsg(mes) - }(ms.r) - - t := time.NewTimer(dhtReadMessageTimeout) - defer t.Stop() - - select { - case err := <-errc: - return err - case <-ctx.Done(): - return ctx.Err() - case <-t.C: - return ErrReadTimeout - } -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/handlers.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/handlers.go deleted file mode 100644 index 5b7ab53ca7..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/handlers.go +++ /dev/null @@ -1,382 +0,0 @@ -package dht - -import ( - "bytes" - "context" - "errors" - "fmt" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - pb "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - recpb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -// The number of closer peers to send on requests. -var CloserPeerCount = KValue - -// dhthandler specifies the signature of functions that handle DHT messages. -type dhtHandler func(context.Context, peer.ID, *pb.Message) (*pb.Message, error) - -func (dht *IpfsDHT) handlerForMsgType(t pb.Message_MessageType) dhtHandler { - switch t { - case pb.Message_GET_VALUE: - return dht.handleGetValue - case pb.Message_PUT_VALUE: - return dht.handlePutValue - case pb.Message_FIND_NODE: - return dht.handleFindPeer - case pb.Message_ADD_PROVIDER: - return dht.handleAddProvider - case pb.Message_GET_PROVIDERS: - return dht.handleGetProviders - case pb.Message_PING: - return dht.handlePing - default: - return nil - } -} - -func (dht *IpfsDHT) handleGetValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - ctx = log.Start(ctx, "handleGetValue") - log.SetTag(ctx, "peer", p) - defer func() { log.FinishWithErr(ctx, err) }() - log.Debugf("%s handleGetValue for key: %s", dht.self, pmes.GetKey()) - - // setup response - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - - // first, is there even a key? - k := pmes.GetKey() - if len(k) == 0 { - return nil, errors.New("handleGetValue but no key was provided") - // TODO: send back an error response? could be bad, but the other node's hanging. - } - - rec, err := dht.checkLocalDatastore(k) - if err != nil { - return nil, err - } - resp.Record = rec - - // Find closest peer on given cluster to desired key and reply with that info - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if len(closer) > 0 { - closerinfos := pstore.PeerInfos(dht.peerstore, closer) - for _, pi := range closerinfos { - log.Debugf("handleGetValue returning closer peer: '%s'", pi.ID) - if len(pi.Addrs) < 1 { - log.Warningf(`no addresses on peer being sent! - [local:%s] - [sending:%s] - [remote:%s]`, dht.self, pi.ID, p) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), closerinfos) - } - - return resp, nil -} - -func (dht *IpfsDHT) checkLocalDatastore(k []byte) (*recpb.Record, error) { - log.Debugf("%s handleGetValue looking into ds", dht.self) - dskey := convertToDsKey(k) - buf, err := dht.datastore.Get(dskey) - log.Debugf("%s handleGetValue looking into ds GOT %v", dht.self, buf) - - if err == ds.ErrNotFound { - return nil, nil - } - - // if we got an unexpected error, bail. - if err != nil { - return nil, err - } - - // if we have the value, send it back - log.Debugf("%s handleGetValue success!", dht.self) - - rec := new(recpb.Record) - err = proto.Unmarshal(buf, rec) - if err != nil { - log.Debug("failed to unmarshal DHT record from datastore") - return nil, err - } - - var recordIsBad bool - recvtime, err := u.ParseRFC3339(rec.GetTimeReceived()) - if err != nil { - log.Info("either no receive time set on record, or it was invalid: ", err) - recordIsBad = true - } - - if time.Now().Sub(recvtime) > MaxRecordAge { - log.Debug("old record found, tossing.") - recordIsBad = true - } - - // NOTE: We do not verify the record here beyond checking these timestamps. - // we put the burden of checking the records on the requester as checking a record - // may be computationally expensive - - if recordIsBad { - err := dht.datastore.Delete(dskey) - if err != nil { - log.Error("Failed to delete bad record from datastore: ", err) - } - - return nil, nil // can treat this as not having the record at all - } - - return rec, nil -} - -// Cleans the record (to avoid storing arbitrary data). -func cleanRecord(rec *recpb.Record) { - rec.TimeReceived = "" -} - -// Store a value in this peer local storage -func (dht *IpfsDHT) handlePutValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - ctx = log.Start(ctx, "handlePutValue") - log.SetTag(ctx, "peer", p) - defer func() { log.FinishWithErr(ctx, err) }() - - rec := pmes.GetRecord() - if rec == nil { - log.Infof("Got nil record from: %s", p.Pretty()) - return nil, errors.New("nil record") - } - - if !bytes.Equal(pmes.GetKey(), rec.GetKey()) { - return nil, errors.New("put key doesn't match record key") - } - - cleanRecord(rec) - - // Make sure the record is valid (not expired, valid signature etc) - if err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()); err != nil { - log.Warningf("Bad dht record in PUT from: %s. %s", p.Pretty(), err) - return nil, err - } - - dskey := convertToDsKey(rec.GetKey()) - - // Make sure the new record is "better" than the record we have locally. - // This prevents a record with for example a lower sequence number from - // overwriting a record with a higher sequence number. - existing, err := dht.getRecordFromDatastore(dskey) - if err != nil { - return nil, err - } - - if existing != nil { - recs := [][]byte{rec.GetValue(), existing.GetValue()} - i, err := dht.Validator.Select(string(rec.GetKey()), recs) - if err != nil { - log.Warningf("Bad dht record in PUT from %s: %s", p.Pretty(), err) - return nil, err - } - if i != 0 { - log.Infof("DHT record in PUT from %s is older than existing record. Ignoring", p.Pretty()) - return nil, errors.New("old record") - } - } - - // record the time we receive every record - rec.TimeReceived = u.FormatRFC3339(time.Now()) - - data, err := proto.Marshal(rec) - if err != nil { - return nil, err - } - - err = dht.datastore.Put(dskey, data) - log.Debugf("%s handlePutValue %v", dht.self, dskey) - return pmes, err -} - -// returns nil, nil when either nothing is found or the value found doesn't properly validate. -// returns nil, some_error when there's a *datastore* error (i.e., something goes very wrong) -func (dht *IpfsDHT) getRecordFromDatastore(dskey ds.Key) (*recpb.Record, error) { - buf, err := dht.datastore.Get(dskey) - if err == ds.ErrNotFound { - return nil, nil - } - if err != nil { - log.Errorf("Got error retrieving record with key %s from datastore: %s", dskey, err) - return nil, err - } - rec := new(recpb.Record) - err = proto.Unmarshal(buf, rec) - if err != nil { - // Bad data in datastore, log it but don't return an error, we'll just overwrite it - log.Errorf("Bad record data stored in datastore with key %s: could not unmarshal record", dskey) - return nil, nil - } - - err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()) - if err != nil { - // Invalid record in datastore, probably expired but don't return an error, - // we'll just overwrite it - log.Debugf("Local record verify failed: %s (discarded)", err) - return nil, nil - } - - return rec, nil -} - -func (dht *IpfsDHT) handlePing(_ context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - log.Debugf("%s Responding to ping from %s!\n", dht.self, p) - return pmes, nil -} - -func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleFindPeer") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - resp := pb.NewMessage(pmes.GetType(), nil, pmes.GetClusterLevel()) - var closest []peer.ID - - // if looking for self... special case where we send it on CloserPeers. - targetPid := peer.ID(pmes.GetKey()) - if targetPid == dht.self { - closest = []peer.ID{dht.self} - } else { - closest = dht.betterPeersToQuery(pmes, p, CloserPeerCount) - - // Never tell a peer about itself. - if targetPid != p { - // If we're connected to the target peer, report their - // peer info. This makes FindPeer work even if the - // target peer isn't in our routing table. - // - // Alternatively, we could just check our peerstore. - // However, we don't want to return out of date - // information. We can change this in the future when we - // add a progressive, asynchronous `SearchPeer` function - // and improve peer routing in the host. - switch dht.host.Network().Connectedness(targetPid) { - case inet.Connected, inet.CanConnect: - closest = append(closest, targetPid) - } - } - } - - if closest == nil { - log.Infof("%s handleFindPeer %s: could not find anything.", dht.self, p) - return resp, nil - } - - closestinfos := pstore.PeerInfos(dht.peerstore, closest) - // possibly an over-allocation but this array is temporary anyways. - withAddresses := make([]pstore.PeerInfo, 0, len(closestinfos)) - for _, pi := range closestinfos { - if len(pi.Addrs) > 0 { - withAddresses = append(withAddresses, pi) - log.Debugf("handleFindPeer: sending back '%s'", pi.ID) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), withAddresses) - return resp, nil -} - -func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleGetProviders") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - return nil, err - } - log.SetTag(ctx, "key", c) - - // debug logging niceness. - reqDesc := fmt.Sprintf("%s handleGetProviders(%s, %s): ", dht.self, p, c) - log.Debugf("%s begin", reqDesc) - defer log.Debugf("%s end", reqDesc) - - // check if we have this value, to add ourselves as provider. - has, err := dht.datastore.Has(convertToDsKey(c.Bytes())) - if err != nil && err != ds.ErrNotFound { - log.Debugf("unexpected datastore error: %v\n", err) - has = false - } - - // setup providers - providers := dht.providers.GetProviders(ctx, c) - if has { - providers = append(providers, dht.self) - log.Debugf("%s have the value. added self as provider", reqDesc) - } - - if providers != nil && len(providers) > 0 { - infos := pstore.PeerInfos(dht.peerstore, providers) - resp.ProviderPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d providers: %s", reqDesc, len(providers), infos) - } - - // Also send closer peers. - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if closer != nil { - infos := pstore.PeerInfos(dht.peerstore, closer) - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d closer peers: %s", reqDesc, len(closer), infos) - } - - return resp, nil -} - -func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { - ctx = log.Start(ctx, "handleAddProvider") - defer func() { log.FinishWithErr(ctx, _err) }() - log.SetTag(ctx, "peer", p) - - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - return nil, err - } - log.SetTag(ctx, "key", c) - - log.Debugf("%s adding %s as a provider for '%s'\n", dht.self, p, c) - - // add provider should use the address given in the message - pinfos := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - for _, pi := range pinfos { - if pi.ID != p { - // we should ignore this provider record! not from originator. - // (we should sign them and check signature later...) - log.Debugf("handleAddProvider received provider %s from %s. Ignore.", pi.ID, p) - continue - } - - if len(pi.Addrs) < 1 { - log.Debugf("%s got no valid addresses for provider %s. Ignore.", dht.self, p) - continue - } - - log.Infof("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) - if pi.ID != dht.self { // don't add own addrs. - // add the received addresses to our peerstore. - dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL) - } - dht.providers.AddProvider(ctx, c, p) - } - - return nil, nil -} - -func convertToDsKey(s []byte) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString(s)) -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/lookup.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/lookup.go deleted file mode 100644 index 79dd0a511b..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/lookup.go +++ /dev/null @@ -1,114 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "strings" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - pb "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" -) - -func tryFormatLoggableKey(k string) (string, error) { - if len(k) == 0 { - return "", fmt.Errorf("loggableKey is empty") - } - var proto, cstr string - if k[0] == '/' { - // it's a path (probably) - protoEnd := strings.IndexByte(k[1:], '/') - if protoEnd < 0 { - return k, fmt.Errorf("loggableKey starts with '/' but is not a path: %x", k) - } - proto = k[1 : protoEnd+1] - cstr = k[protoEnd+2:] - } else { - proto = "provider" - cstr = k - } - - c, err := cid.Cast([]byte(cstr)) - if err != nil { - return "", fmt.Errorf("loggableKey could not cast key to a CID: %x %v", k, err) - } - return fmt.Sprintf("/%s/%s", proto, c.String()), nil -} - -func loggableKey(k string) logging.LoggableMap { - newKey, err := tryFormatLoggableKey(k) - if err != nil { - log.Debug(err) - } else { - k = newKey - } - - return logging.LoggableMap{ - "key": k, - } -} - -// Kademlia 'node lookup' operation. Returns a channel of the K closest peers -// to the given key -func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error) { - e := log.EventBegin(ctx, "getClosestPeers", loggableKey(key)) - tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - if len(tablepeers) == 0 { - return nil, kb.ErrLookupFailure - } - - out := make(chan peer.ID, KValue) - - // since the query doesnt actually pass our context down - // we have to hack this here. whyrusleeping isnt a huge fan of goprocess - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - pmes, err := dht.findPeerSingle(ctx, p, peer.ID(key)) - if err != nil { - log.Debugf("error getting closer peers: %s", err) - return nil, err - } - peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) - - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peers, - }) - - return &dhtQueryResult{closerPeers: peers}, nil - }) - - go func() { - defer close(out) - defer e.Done() - // run it! - res, err := query.Run(ctx, tablepeers) - if err != nil { - log.Debugf("closestPeers query run error: %s", err) - } - - if res != nil && res.queriedSet != nil { - sorted := kb.SortClosestPeers(res.queriedSet.Peers(), kb.ConvertKey(key)) - if len(sorted) > KValue { - sorted = sorted[:KValue] - } - - for _, p := range sorted { - out <- p - } - } - }() - - return out, nil -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/notif.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/notif.go deleted file mode 100644 index f534649f14..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/notif.go +++ /dev/null @@ -1,116 +0,0 @@ -package dht - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - mstream "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" -) - -// netNotifiee defines methods to be used with the IpfsDHT -type netNotifiee IpfsDHT - -func (nn *netNotifiee) DHT() *IpfsDHT { - return (*IpfsDHT)(nn) -} - -func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) - if err == nil && len(protos) != 0 { - // We lock here for consistency with the lock in testConnection. - // This probably isn't necessary because (dis)connect - // notifications are serialized but it's nice to be consistent. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } - return - } - - // Note: Unfortunately, the peerstore may not yet know that this peer is - // a DHT server. So, if it didn't return a positive response above, test - // manually. - go nn.testConnection(v) -} - -func (nn *netNotifiee) testConnection(v inet.Conn) { - dht := nn.DHT() - p := v.RemotePeer() - - // Forcibly use *this* connection. Otherwise, if we have two connections, we could: - // 1. Test it twice. - // 2. Have it closed from under us leaving the second (open) connection untested. - s, err := v.NewStream() - if err != nil { - // Connection error - return - } - defer inet.FullClose(s) - - selected, err := mstream.SelectOneOf(dht.protocolStrs(), s) - if err != nil { - // Doesn't support the protocol - return - } - // Remember this choice (makes subsequent negotiations faster) - dht.peerstore.AddProtocols(p, selected) - - // We lock here as we race with disconnect. If we didn't lock, we could - // finish processing a connect after handling the associated disconnect - // event and add the peer to the routing table after removing it. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } -} - -func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - - // Lock and check to see if we're still connected. We lock to make sure - // we don't concurrently process a connect event. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - // We're still connected. - return - } - - dht.routingTable.Remove(p) - - dht.smlk.Lock() - defer dht.smlk.Unlock() - ms, ok := dht.strmap[p] - if !ok { - return - } - delete(dht.strmap, p) - - // Do this asynchronously as ms.lk can block for a while. - go func() { - ms.lk.Lock() - defer ms.lk.Unlock() - ms.invalidate() - }() -} - -func (nn *netNotifiee) OpenedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) ClosedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) Listen(n inet.Network, a ma.Multiaddr) {} -func (nn *netNotifiee) ListenClose(n inet.Network, a ma.Multiaddr) {} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts/options.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts/options.go deleted file mode 100644 index 8db681100a..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/opts/options.go +++ /dev/null @@ -1,104 +0,0 @@ -package dhtopts - -import ( - "fmt" - - "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dssync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" -) - -var ProtocolDHT protocol.ID = "/ipfs/kad/1.0.0" -var ProtocolDHTOld protocol.ID = "/ipfs/dht" -var DefaultProtocols = []protocol.ID{ProtocolDHT, ProtocolDHTOld} - -// Options is a structure containing all the options that can be used when constructing a DHT. -type Options struct { - Datastore ds.Batching - Validator record.Validator - Client bool - Protocols []protocol.ID -} - -// Apply applies the given options to this Option -func (o *Options) Apply(opts ...Option) error { - for i, opt := range opts { - if err := opt(o); err != nil { - return fmt.Errorf("dht option %d failed: %s", i, err) - } - } - return nil -} - -// Option DHT option type. -type Option func(*Options) error - -// Defaults are the default DHT options. This option will be automatically -// prepended to any options you pass to the DHT constructor. -var Defaults = func(o *Options) error { - o.Validator = record.NamespacedValidator{ - "pk": record.PublicKeyValidator{}, - } - o.Datastore = dssync.MutexWrap(ds.NewMapDatastore()) - o.Protocols = DefaultProtocols - return nil -} - -// Datastore configures the DHT to use the specified datastore. -// -// Defaults to an in-memory (temporary) map. -func Datastore(ds ds.Batching) Option { - return func(o *Options) error { - o.Datastore = ds - return nil - } -} - -// Client configures whether or not the DHT operates in client-only mode. -// -// Defaults to false. -func Client(only bool) Option { - return func(o *Options) error { - o.Client = only - return nil - } -} - -// Validator configures the DHT to use the specified validator. -// -// Defaults to a namespaced validator that can only validate public keys. -func Validator(v record.Validator) Option { - return func(o *Options) error { - o.Validator = v - return nil - } -} - -// NamespacedValidator adds a validator namespaced under `ns`. This option fails -// if the DHT is not using a `record.NamespacedValidator` as it's validator (it -// uses one by default but this can be overridden with the `Validator` option). -// -// Example: Given a validator registered as `NamespacedValidator("ipns", -// myValidator)`, all records with keys starting with `/ipns/` will be validated -// with `myValidator`. -func NamespacedValidator(ns string, v record.Validator) Option { - return func(o *Options) error { - nsval, ok := o.Validator.(record.NamespacedValidator) - if !ok { - return fmt.Errorf("can only add namespaced validators to a NamespacedValidator") - } - nsval[ns] = v - return nil - } -} - -// Protocols sets the protocols for the DHT -// -// Defaults to dht.DefaultProtocols -func Protocols(protocols ...protocol.ID) Option { - return func(o *Options) error { - o.Protocols = protocols - return nil - } -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/package.json b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/package.json deleted file mode 100644 index dd123b21b2..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/package.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-kad-dht" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-kad-dht", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "jbenet", - "hash": "QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W", - "name": "go-context", - "version": "1.0.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "hashicorp", - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", - "name": "base32", - "version": "0.0.2" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", - "name": "go-libp2p-record", - "version": "4.1.8" - }, - { - "author": "whyrusleeping", - "hash": "QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD", - "name": "go-libp2p-kbucket", - "version": "2.2.12" - }, - { - "author": "whyrusleeping", - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", - "name": "go-libp2p-routing", - "version": "2.7.1" - }, - { - "author": "whyrusleeping", - "hash": "QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq", - "name": "go-todocounter", - "version": "1.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", - "name": "go-libp2p-loggables", - "version": "1.1.24" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB", - "name": "go-libp2p", - "version": "6.0.23" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-kad-dht", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "4.4.12" -} - diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/dht.pb.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/dht.pb.go deleted file mode 100644 index b34460b7ba..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/dht.pb.go +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dht.proto - -package dht_pb - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" -import pb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type Message_MessageType int32 - -const ( - Message_PUT_VALUE Message_MessageType = 0 - Message_GET_VALUE Message_MessageType = 1 - Message_ADD_PROVIDER Message_MessageType = 2 - Message_GET_PROVIDERS Message_MessageType = 3 - Message_FIND_NODE Message_MessageType = 4 - Message_PING Message_MessageType = 5 -) - -var Message_MessageType_name = map[int32]string{ - 0: "PUT_VALUE", - 1: "GET_VALUE", - 2: "ADD_PROVIDER", - 3: "GET_PROVIDERS", - 4: "FIND_NODE", - 5: "PING", -} -var Message_MessageType_value = map[string]int32{ - "PUT_VALUE": 0, - "GET_VALUE": 1, - "ADD_PROVIDER": 2, - "GET_PROVIDERS": 3, - "FIND_NODE": 4, - "PING": 5, -} - -func (x Message_MessageType) String() string { - return proto.EnumName(Message_MessageType_name, int32(x)) -} -func (Message_MessageType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 0} -} - -type Message_ConnectionType int32 - -const ( - // sender does not have a connection to peer, and no extra information (default) - Message_NOT_CONNECTED Message_ConnectionType = 0 - // sender has a live connection to peer - Message_CONNECTED Message_ConnectionType = 1 - // sender recently connected to peer - Message_CAN_CONNECT Message_ConnectionType = 2 - // sender recently tried to connect to peer repeatedly but failed to connect - // ("try" here is loose, but this should signal "made strong effort, failed") - Message_CANNOT_CONNECT Message_ConnectionType = 3 -) - -var Message_ConnectionType_name = map[int32]string{ - 0: "NOT_CONNECTED", - 1: "CONNECTED", - 2: "CAN_CONNECT", - 3: "CANNOT_CONNECT", -} -var Message_ConnectionType_value = map[string]int32{ - "NOT_CONNECTED": 0, - "CONNECTED": 1, - "CAN_CONNECT": 2, - "CANNOT_CONNECT": 3, -} - -func (x Message_ConnectionType) String() string { - return proto.EnumName(Message_ConnectionType_name, int32(x)) -} -func (Message_ConnectionType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 1} -} - -type Message struct { - // defines what type of message it is. - Type Message_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=dht.pb.Message_MessageType" json:"type,omitempty"` - // defines what coral cluster level this query/response belongs to. - // in case we want to implement coral's cluster rings in the future. - ClusterLevelRaw int32 `protobuf:"varint,10,opt,name=clusterLevelRaw,proto3" json:"clusterLevelRaw,omitempty"` - // Used to specify the key associated with this message. - // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // Used to return a value - // PUT_VALUE, GET_VALUE - Record *pb.Record `protobuf:"bytes,3,opt,name=record" json:"record,omitempty"` - // Used to return peers closer to a key in a query - // GET_VALUE, GET_PROVIDERS, FIND_NODE - CloserPeers []*Message_Peer `protobuf:"bytes,8,rep,name=closerPeers" json:"closerPeers,omitempty"` - // Used to return Providers - // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - ProviderPeers []*Message_Peer `protobuf:"bytes,9,rep,name=providerPeers" json:"providerPeers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(dst, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -func (m *Message) GetType() Message_MessageType { - if m != nil { - return m.Type - } - return Message_PUT_VALUE -} - -func (m *Message) GetClusterLevelRaw() int32 { - if m != nil { - return m.ClusterLevelRaw - } - return 0 -} - -func (m *Message) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *Message) GetRecord() *pb.Record { - if m != nil { - return m.Record - } - return nil -} - -func (m *Message) GetCloserPeers() []*Message_Peer { - if m != nil { - return m.CloserPeers - } - return nil -} - -func (m *Message) GetProviderPeers() []*Message_Peer { - if m != nil { - return m.ProviderPeers - } - return nil -} - -type Message_Peer struct { - // ID of a given peer. - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // multiaddrs for a given peer - Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"` - // used to signal the sender's connection capabilities to the peer - Connection Message_ConnectionType `protobuf:"varint,3,opt,name=connection,proto3,enum=dht.pb.Message_ConnectionType" json:"connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Message_Peer) Reset() { *m = Message_Peer{} } -func (m *Message_Peer) String() string { return proto.CompactTextString(m) } -func (*Message_Peer) ProtoMessage() {} -func (*Message_Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_dht_9c5cb71036aaefb8, []int{0, 0} -} -func (m *Message_Peer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message_Peer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Message_Peer) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message_Peer.Merge(dst, src) -} -func (m *Message_Peer) XXX_Size() int { - return m.Size() -} -func (m *Message_Peer) XXX_DiscardUnknown() { - xxx_messageInfo_Message_Peer.DiscardUnknown(m) -} - -var xxx_messageInfo_Message_Peer proto.InternalMessageInfo - -func (m *Message_Peer) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -func (m *Message_Peer) GetAddrs() [][]byte { - if m != nil { - return m.Addrs - } - return nil -} - -func (m *Message_Peer) GetConnection() Message_ConnectionType { - if m != nil { - return m.Connection - } - return Message_NOT_CONNECTED -} - -func init() { - proto.RegisterType((*Message)(nil), "dht.pb.Message") - proto.RegisterType((*Message_Peer)(nil), "dht.pb.Message.Peer") - proto.RegisterEnum("dht.pb.Message_MessageType", Message_MessageType_name, Message_MessageType_value) - proto.RegisterEnum("dht.pb.Message_ConnectionType", Message_ConnectionType_name, Message_ConnectionType_value) -} -func (m *Message) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Message) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Type)) - } - if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDht(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if m.Record != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Record.Size())) - n1, err := m.Record.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.CloserPeers) > 0 { - for _, msg := range m.CloserPeers { - dAtA[i] = 0x42 - i++ - i = encodeVarintDht(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ProviderPeers) > 0 { - for _, msg := range m.ProviderPeers { - dAtA[i] = 0x4a - i++ - i = encodeVarintDht(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ClusterLevelRaw != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.ClusterLevelRaw)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Message_Peer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Message_Peer) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDht(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Addrs) > 0 { - for _, b := range m.Addrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintDht(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.Connection != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintDht(dAtA, i, uint64(m.Connection)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintDht(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Message) Size() (n int) { - var l int - _ = l - if m.Type != 0 { - n += 1 + sovDht(uint64(m.Type)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovDht(uint64(l)) - } - if m.Record != nil { - l = m.Record.Size() - n += 1 + l + sovDht(uint64(l)) - } - if len(m.CloserPeers) > 0 { - for _, e := range m.CloserPeers { - l = e.Size() - n += 1 + l + sovDht(uint64(l)) - } - } - if len(m.ProviderPeers) > 0 { - for _, e := range m.ProviderPeers { - l = e.Size() - n += 1 + l + sovDht(uint64(l)) - } - } - if m.ClusterLevelRaw != 0 { - n += 1 + sovDht(uint64(m.ClusterLevelRaw)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Message_Peer) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovDht(uint64(l)) - } - if len(m.Addrs) > 0 { - for _, b := range m.Addrs { - l = len(b) - n += 1 + l + sovDht(uint64(l)) - } - } - if m.Connection != 0 { - n += 1 + sovDht(uint64(m.Connection)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDht(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozDht(x uint64) (n int) { - return sovDht(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Message) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= (Message_MessageType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Record == nil { - m.Record = &pb.Record{} - } - if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CloserPeers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CloserPeers = append(m.CloserPeers, &Message_Peer{}) - if err := m.CloserPeers[len(m.CloserPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderPeers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderPeers = append(m.ProviderPeers, &Message_Peer{}) - if err := m.ProviderPeers[len(m.ProviderPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterLevelRaw", wireType) - } - m.ClusterLevelRaw = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClusterLevelRaw |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDht(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDht - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Message_Peer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Peer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) - if m.Id == nil { - m.Id = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDht - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx)) - copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) - } - m.Connection = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDht - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Connection |= (Message_ConnectionType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDht(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDht - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDht(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthDht - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDht - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDht(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthDht = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDht = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("dht.proto", fileDescriptor_dht_9c5cb71036aaefb8) } - -var fileDescriptor_dht_9c5cb71036aaefb8 = []byte{ - // 429 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x6e, 0x9b, 0x40, - 0x10, 0x86, 0xbb, 0x80, 0xdd, 0x78, 0xc0, 0x64, 0x33, 0xca, 0x01, 0xa5, 0x92, 0x85, 0x7c, 0xa2, - 0x87, 0x80, 0x44, 0xa5, 0x1e, 0x7a, 0xa8, 0xe4, 0x02, 0x8d, 0x2c, 0xa5, 0xd8, 0xda, 0x3a, 0xe9, - 0xd1, 0x32, 0xb0, 0x72, 0x50, 0xa9, 0x17, 0x01, 0x49, 0xe5, 0x27, 0x6c, 0x8f, 0x7d, 0x84, 0xca, - 0x4f, 0x52, 0x01, 0xa1, 0xc5, 0x3e, 0xf4, 0xc4, 0xff, 0xef, 0xfe, 0xdf, 0xcc, 0x30, 0x5a, 0x18, - 0x25, 0x0f, 0x95, 0x9d, 0x17, 0xa2, 0x12, 0x38, 0x6c, 0x64, 0x74, 0xe5, 0x6e, 0xd3, 0xea, 0xe1, - 0x31, 0xb2, 0x63, 0xf1, 0xcd, 0xc9, 0xd2, 0x28, 0x77, 0x73, 0x67, 0x2b, 0xae, 0x5b, 0x75, 0x5d, - 0xf0, 0x58, 0x14, 0x89, 0x93, 0x47, 0x4e, 0xab, 0x5a, 0x76, 0xfa, 0x43, 0x81, 0x97, 0x9f, 0x78, - 0x59, 0x6e, 0xb6, 0x1c, 0x1d, 0x50, 0xaa, 0x7d, 0xce, 0x0d, 0x62, 0x12, 0x4b, 0x77, 0x5f, 0xd9, - 0x6d, 0x59, 0xfb, 0xf9, 0xba, 0xfb, 0xae, 0xf6, 0x39, 0x67, 0x4d, 0x10, 0x29, 0xc8, 0x5f, 0xf9, - 0xde, 0x90, 0x4c, 0x62, 0x69, 0xac, 0x96, 0xf8, 0x1a, 0x86, 0x6d, 0x79, 0x43, 0x36, 0x89, 0xa5, - 0xba, 0x17, 0x76, 0xd7, 0x2d, 0xb2, 0x59, 0xa3, 0xd8, 0x73, 0x00, 0xdf, 0x82, 0x1a, 0x67, 0xa2, - 0xe4, 0xc5, 0x92, 0xf3, 0xa2, 0x34, 0xce, 0x4c, 0xd9, 0x52, 0xdd, 0xcb, 0xd3, 0xa6, 0xf5, 0x25, - 0xeb, 0x07, 0xf1, 0x1d, 0x8c, 0xf3, 0x42, 0x3c, 0xa5, 0x49, 0x47, 0x8e, 0xfe, 0x43, 0x1e, 0x47, - 0xd1, 0x82, 0xf3, 0x38, 0x7b, 0x2c, 0x2b, 0x5e, 0xdc, 0xf2, 0x27, 0x9e, 0xb1, 0xcd, 0x77, 0x03, - 0x4c, 0x62, 0x0d, 0xd8, 0xe9, 0xf1, 0x55, 0x06, 0x4a, 0x8d, 0xa0, 0x0e, 0x52, 0x9a, 0x34, 0x1b, - 0xd1, 0x98, 0x94, 0x26, 0x78, 0x09, 0x83, 0x4d, 0x92, 0x14, 0xa5, 0x21, 0x99, 0xb2, 0xa5, 0xb1, - 0xd6, 0xe0, 0x7b, 0x80, 0x58, 0xec, 0x76, 0x3c, 0xae, 0x52, 0xb1, 0x6b, 0x7e, 0x5d, 0x77, 0x27, - 0xa7, 0x03, 0x79, 0x7f, 0x13, 0xcd, 0x0a, 0x7b, 0xc4, 0x34, 0x05, 0xb5, 0xb7, 0x5d, 0x1c, 0xc3, - 0x68, 0x79, 0xb7, 0x5a, 0xdf, 0xcf, 0x6e, 0xef, 0x02, 0xfa, 0xa2, 0xb6, 0x37, 0x41, 0x67, 0x09, - 0x52, 0xd0, 0x66, 0xbe, 0xbf, 0x5e, 0xb2, 0xc5, 0xfd, 0xdc, 0x0f, 0x18, 0x95, 0xf0, 0x02, 0xc6, - 0x75, 0xa0, 0x3b, 0xf9, 0x4c, 0xe5, 0x9a, 0xf9, 0x38, 0x0f, 0xfd, 0x75, 0xb8, 0xf0, 0x03, 0xaa, - 0xe0, 0x19, 0x28, 0xcb, 0x79, 0x78, 0x43, 0x07, 0xd3, 0x2f, 0xa0, 0x1f, 0x0f, 0x52, 0xd3, 0xe1, - 0x62, 0xb5, 0xf6, 0x16, 0x61, 0x18, 0x78, 0xab, 0xc0, 0x6f, 0x3b, 0xfe, 0xb3, 0x04, 0xcf, 0x41, - 0xf5, 0x66, 0x61, 0x97, 0xa0, 0x12, 0x22, 0xe8, 0xde, 0x2c, 0xec, 0x51, 0x54, 0xfe, 0xa0, 0xfd, - 0x3c, 0x4c, 0xc8, 0xaf, 0xc3, 0x84, 0xfc, 0x3e, 0x4c, 0x48, 0x34, 0x6c, 0x9e, 0xd7, 0x9b, 0x3f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xb2, 0x05, 0xeb, 0xa7, 0x02, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/message.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/message.go deleted file mode 100644 index 2c17ce93af..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/message.go +++ /dev/null @@ -1,183 +0,0 @@ -package dht_pb - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("dht.pb") - -type PeerRoutingInfo struct { - pstore.PeerInfo - inet.Connectedness -} - -// NewMessage constructs a new dht message with given type, key, and level -func NewMessage(typ Message_MessageType, key []byte, level int) *Message { - m := &Message{ - Type: typ, - Key: key, - } - m.SetClusterLevel(level) - return m -} - -func peerRoutingInfoToPBPeer(p PeerRoutingInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - s := string(p.ID) - pbp.Id = []byte(s) - c := ConnectionType(p.Connectedness) - pbp.Connection = c - return pbp -} - -func peerInfoToPBPeer(p pstore.PeerInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - pbp.Id = []byte(p.ID) - return pbp -} - -// PBPeerToPeer turns a *Message_Peer into its pstore.PeerInfo counterpart -func PBPeerToPeerInfo(pbp *Message_Peer) *pstore.PeerInfo { - return &pstore.PeerInfo{ - ID: peer.ID(pbp.GetId()), - Addrs: pbp.Addresses(), - } -} - -// RawPeerInfosToPBPeers converts a slice of Peers into a slice of *Message_Peers, -// ready to go out on the wire. -func RawPeerInfosToPBPeers(peers []pstore.PeerInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerInfoToPBPeer(p) - } - return pbpeers -} - -// PeersToPBPeers converts given []peer.Peer into a set of []*Message_Peer, -// which can be written to a message and sent out. the key thing this function -// does (in addition to PeersToPBPeers) is set the ConnectionType with -// information from the given inet.Network. -func PeerInfosToPBPeers(n inet.Network, peers []pstore.PeerInfo) []*Message_Peer { - pbps := RawPeerInfosToPBPeers(peers) - for i, pbp := range pbps { - c := ConnectionType(n.Connectedness(peers[i].ID)) - pbp.Connection = c - } - return pbps -} - -func PeerRoutingInfosToPBPeers(peers []PeerRoutingInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerRoutingInfoToPBPeer(p) - } - return pbpeers -} - -// PBPeersToPeerInfos converts given []*Message_Peer into []pstore.PeerInfo -// Invalid addresses will be silently omitted. -func PBPeersToPeerInfos(pbps []*Message_Peer) []*pstore.PeerInfo { - peers := make([]*pstore.PeerInfo, 0, len(pbps)) - for _, pbp := range pbps { - peers = append(peers, PBPeerToPeerInfo(pbp)) - } - return peers -} - -// Addresses returns a multiaddr associated with the Message_Peer entry -func (m *Message_Peer) Addresses() []ma.Multiaddr { - if m == nil { - return nil - } - - maddrs := make([]ma.Multiaddr, 0, len(m.Addrs)) - for _, addr := range m.Addrs { - maddr, err := ma.NewMultiaddrBytes(addr) - if err != nil { - log.Warningf("error decoding Multiaddr for peer: %s", m.GetId()) - continue - } - - maddrs = append(maddrs, maddr) - } - return maddrs -} - -// GetClusterLevel gets and adjusts the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) GetClusterLevel() int { - level := m.GetClusterLevelRaw() - 1 - if level < 0 { - return 0 - } - return int(level) -} - -// SetClusterLevel adjusts and sets the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) SetClusterLevel(level int) { - lvl := int32(level) - m.ClusterLevelRaw = lvl -} - -// Loggable turns a Message into machine-readable log output -func (m *Message) Loggable() map[string]interface{} { - return map[string]interface{}{ - "message": map[string]string{ - "type": m.Type.String(), - "key": b58.Encode([]byte(m.GetKey())), - }, - } -} - -// ConnectionType returns a Message_ConnectionType associated with the -// inet.Connectedness. -func ConnectionType(c inet.Connectedness) Message_ConnectionType { - switch c { - default: - return Message_NOT_CONNECTED - case inet.NotConnected: - return Message_NOT_CONNECTED - case inet.Connected: - return Message_CONNECTED - case inet.CanConnect: - return Message_CAN_CONNECT - case inet.CannotConnect: - return Message_CANNOT_CONNECT - } -} - -// Connectedness returns an inet.Connectedness associated with the -// Message_ConnectionType. -func Connectedness(c Message_ConnectionType) inet.Connectedness { - switch c { - default: - return inet.NotConnected - case Message_NOT_CONNECTED: - return inet.NotConnected - case Message_CONNECTED: - return inet.Connected - case Message_CAN_CONNECT: - return inet.CanConnect - case Message_CANNOT_CONNECT: - return inet.CannotConnect - } -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/providers/providers.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/providers/providers.go deleted file mode 100644 index a48081c620..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/providers/providers.go +++ /dev/null @@ -1,358 +0,0 @@ -package providers - -import ( - "context" - "encoding/binary" - "fmt" - "strings" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - autobatch "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var batchBufferSize = 256 - -var log = logging.Logger("providers") - -var lruCacheSize = 256 -var ProvideValidity = time.Hour * 24 -var defaultCleanupInterval = time.Hour - -type ProviderManager struct { - // all non channel fields are meant to be accessed only within - // the run method - providers *lru.Cache - lpeer peer.ID - dstore ds.Datastore - - newprovs chan *addProv - getprovs chan *getProv - period time.Duration - proc goprocess.Process - - cleanupInterval time.Duration -} - -type providerSet struct { - providers []peer.ID - set map[peer.ID]time.Time -} - -type addProv struct { - k cid.Cid - val peer.ID -} - -type getProv struct { - k cid.Cid - resp chan []peer.ID -} - -func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager { - pm := new(ProviderManager) - pm.getprovs = make(chan *getProv) - pm.newprovs = make(chan *addProv) - pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) - cache, err := lru.New(lruCacheSize) - if err != nil { - panic(err) //only happens if negative value is passed to lru constructor - } - pm.providers = cache - - pm.proc = goprocessctx.WithContext(ctx) - pm.cleanupInterval = defaultCleanupInterval - pm.proc.Go(func(p goprocess.Process) { pm.run() }) - - return pm -} - -const providersKeyPrefix = "/providers/" - -func mkProvKey(k cid.Cid) string { - return providersKeyPrefix + base32.RawStdEncoding.EncodeToString(k.Bytes()) -} - -func (pm *ProviderManager) Process() goprocess.Process { - return pm.proc -} - -func (pm *ProviderManager) providersForKey(k cid.Cid) ([]peer.ID, error) { - pset, err := pm.getProvSet(k) - if err != nil { - return nil, err - } - return pset.providers, nil -} - -func (pm *ProviderManager) getProvSet(k cid.Cid) (*providerSet, error) { - cached, ok := pm.providers.Get(k.KeyString()) - if ok { - return cached.(*providerSet), nil - } - - pset, err := loadProvSet(pm.dstore, k) - if err != nil { - return nil, err - } - - if len(pset.providers) > 0 { - pm.providers.Add(k.KeyString(), pset) - } - - return pset, nil -} - -func loadProvSet(dstore ds.Datastore, k cid.Cid) (*providerSet, error) { - res, err := dstore.Query(dsq.Query{Prefix: mkProvKey(k)}) - if err != nil { - return nil, err - } - - out := newProviderSet() - for { - e, ok := res.NextSync() - if !ok { - break - } - if e.Error != nil { - log.Error("got an error: ", e.Error) - continue - } - - lix := strings.LastIndex(e.Key, "/") - - decstr, err := base32.RawStdEncoding.DecodeString(e.Key[lix+1:]) - if err != nil { - log.Error("base32 decoding error: ", err) - continue - } - - pid := peer.ID(decstr) - - t, err := readTimeValue(e.Value) - if err != nil { - log.Warning("parsing providers record from disk: ", err) - continue - } - - out.setVal(pid, t) - } - - return out, nil -} - -func readTimeValue(i interface{}) (time.Time, error) { - data, ok := i.([]byte) - if !ok { - return time.Time{}, fmt.Errorf("data was not a []byte") - } - - nsec, _ := binary.Varint(data) - - return time.Unix(0, nsec), nil -} - -func (pm *ProviderManager) addProv(k cid.Cid, p peer.ID) error { - iprovs, ok := pm.providers.Get(k.KeyString()) - if !ok { - stored, err := loadProvSet(pm.dstore, k) - if err != nil { - return err - } - iprovs = stored - pm.providers.Add(k.KeyString(), iprovs) - } - provs := iprovs.(*providerSet) - now := time.Now() - provs.setVal(p, now) - - return writeProviderEntry(pm.dstore, k, p, now) -} - -func writeProviderEntry(dstore ds.Datastore, k cid.Cid, p peer.ID, t time.Time) error { - dsk := mkProvKey(k) + "/" + base32.RawStdEncoding.EncodeToString([]byte(p)) - - buf := make([]byte, 16) - n := binary.PutVarint(buf, t.UnixNano()) - - return dstore.Put(ds.NewKey(dsk), buf[:n]) -} - -func (pm *ProviderManager) deleteProvSet(k cid.Cid) error { - pm.providers.Remove(k.KeyString()) - - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: true, - Prefix: mkProvKey(k), - }) - if err != nil { - return err - } - - entries, err := res.Rest() - if err != nil { - return err - } - - for _, e := range entries { - err := pm.dstore.Delete(ds.NewKey(e.Key)) - if err != nil { - log.Error("deleting provider set: ", err) - } - } - return nil -} - -func (pm *ProviderManager) getProvKeys() (func() (cid.Cid, bool), error) { - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: true, - Prefix: providersKeyPrefix, - }) - if err != nil { - return nil, err - } - - iter := func() (cid.Cid, bool) { - for e := range res.Next() { - parts := strings.Split(e.Key, "/") - if len(parts) != 4 { - log.Warningf("incorrectly formatted provider entry in datastore: %s", e.Key) - continue - } - decoded, err := base32.RawStdEncoding.DecodeString(parts[2]) - if err != nil { - log.Warning("error decoding base32 provider key: %s: %s", parts[2], err) - continue - } - - c, err := cid.Cast(decoded) - if err != nil { - log.Warning("error casting key to cid from datastore key: %s", err) - continue - } - - return c, true - } - return cid.Cid{}, false - } - - return iter, nil -} - -func (pm *ProviderManager) run() { - tick := time.NewTicker(pm.cleanupInterval) - for { - select { - case np := <-pm.newprovs: - err := pm.addProv(np.k, np.val) - if err != nil { - log.Error("error adding new providers: ", err) - } - case gp := <-pm.getprovs: - provs, err := pm.providersForKey(gp.k) - if err != nil && err != ds.ErrNotFound { - log.Error("error reading providers: ", err) - } - - gp.resp <- provs - case <-tick.C: - keys, err := pm.getProvKeys() - if err != nil { - log.Error("Error loading provider keys: ", err) - continue - } - now := time.Now() - for { - k, ok := keys() - if !ok { - break - } - - provs, err := pm.getProvSet(k) - if err != nil { - log.Error("error loading known provset: ", err) - continue - } - for p, t := range provs.set { - if now.Sub(t) > ProvideValidity { - delete(provs.set, p) - } - } - // have we run out of providers? - if len(provs.set) == 0 { - provs.providers = nil - err := pm.deleteProvSet(k) - if err != nil { - log.Error("error deleting provider set: ", err) - } - } else if len(provs.set) < len(provs.providers) { - // We must have modified the providers set, recompute. - provs.providers = make([]peer.ID, 0, len(provs.set)) - for p := range provs.set { - provs.providers = append(provs.providers, p) - } - } - } - case <-pm.proc.Closing(): - tick.Stop() - return - } - } -} - -func (pm *ProviderManager) AddProvider(ctx context.Context, k cid.Cid, val peer.ID) { - prov := &addProv{ - k: k, - val: val, - } - select { - case pm.newprovs <- prov: - case <-ctx.Done(): - } -} - -func (pm *ProviderManager) GetProviders(ctx context.Context, k cid.Cid) []peer.ID { - gp := &getProv{ - k: k, - resp: make(chan []peer.ID, 1), // buffered to prevent sender from blocking - } - select { - case <-ctx.Done(): - return nil - case pm.getprovs <- gp: - } - select { - case <-ctx.Done(): - return nil - case peers := <-gp.resp: - return peers - } -} - -func newProviderSet() *providerSet { - return &providerSet{ - set: make(map[peer.ID]time.Time), - } -} - -func (ps *providerSet) Add(p peer.ID) { - ps.setVal(p, time.Now()) -} - -func (ps *providerSet) setVal(p peer.ID, t time.Time) { - _, found := ps.set[p] - if !found { - ps.providers = append(ps.providers, p) - } - - ps.set[p] = t -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/query.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/query.go deleted file mode 100644 index 1c1a419479..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/query.go +++ /dev/null @@ -1,313 +0,0 @@ -// package query implement a query manager to drive concurrent workers -// to query the DHT. A query is setup with a target key, a queryFunc tasked -// to communicate with a peer, and a set of initial peers. As the query -// progress, queryFunc can return closer peers that will be used to navigate -// closer to the target key in the DHT until an answer is reached. -package dht - -import ( - "context" - "sync" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - todoctr "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter" - process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ctxproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pset "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - queue "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" -) - -var maxQueryConcurrency = AlphaValue - -type dhtQuery struct { - dht *IpfsDHT - key string // the key we're querying for - qfunc queryFunc // the function to execute per peer - concurrency int // the concurrency parameter -} - -type dhtQueryResult struct { - value []byte // GetValue - peer *pstore.PeerInfo // FindPeer - providerPeers []pstore.PeerInfo // GetProviders - closerPeers []*pstore.PeerInfo // * - success bool - - finalSet *pset.PeerSet - queriedSet *pset.PeerSet -} - -// constructs query -func (dht *IpfsDHT) newQuery(k string, f queryFunc) *dhtQuery { - return &dhtQuery{ - key: k, - dht: dht, - qfunc: f, - concurrency: maxQueryConcurrency, - } -} - -// QueryFunc is a function that runs a particular query with a given peer. -// It returns either: -// - the value -// - a list of peers potentially better able to serve the query -// - an error -type queryFunc func(context.Context, peer.ID) (*dhtQueryResult, error) - -// Run runs the query at hand. pass in a list of peers to use first. -func (q *dhtQuery) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - runner := newQueryRunner(q) - return runner.Run(ctx, peers) -} - -type dhtQueryRunner struct { - query *dhtQuery // query to run - peersSeen *pset.PeerSet // all peers queried. prevent querying same peer 2x - peersQueried *pset.PeerSet // peers successfully connected to and queried - peersToQuery *queue.ChanQueue // peers remaining to be queried - peersRemaining todoctr.Counter // peersToQuery + currently processing - - result *dhtQueryResult // query result - errs u.MultiErr // result errors. maybe should be a map[peer.ID]error - - rateLimit chan struct{} // processing semaphore - log logging.EventLogger - - runCtx context.Context - - proc process.Process - sync.RWMutex -} - -func newQueryRunner(q *dhtQuery) *dhtQueryRunner { - proc := process.WithParent(process.Background()) - ctx := ctxproc.OnClosingContext(proc) - return &dhtQueryRunner{ - query: q, - peersToQuery: queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))), - peersRemaining: todoctr.NewSyncCounter(), - peersSeen: pset.New(), - peersQueried: pset.New(), - rateLimit: make(chan struct{}, q.concurrency), - proc: proc, - } -} - -func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - r.log = log - r.runCtx = ctx - - if len(peers) == 0 { - log.Warning("Running query with no peers!") - return nil, nil - } - - // setup concurrency rate limiting - for i := 0; i < r.query.concurrency; i++ { - r.rateLimit <- struct{}{} - } - - // add all the peers we got first. - for _, p := range peers { - r.addPeerToQuery(p) - } - - // go do this thing. - // do it as a child proc to make sure Run exits - // ONLY AFTER spawn workers has exited. - r.proc.Go(r.spawnWorkers) - - // so workers are working. - - // wait until they're done. - err := routing.ErrNotFound - - // now, if the context finishes, close the proc. - // we have to do it here because the logic before is setup, which - // should run without closing the proc. - ctxproc.CloseAfterContext(r.proc, ctx) - - select { - case <-r.peersRemaining.Done(): - r.proc.Close() - r.RLock() - defer r.RUnlock() - - err = routing.ErrNotFound - - // if every query to every peer failed, something must be very wrong. - if len(r.errs) > 0 && len(r.errs) == r.peersSeen.Size() { - log.Debugf("query errs: %s", r.errs) - err = r.errs[0] - } - - case <-r.proc.Closed(): - r.RLock() - defer r.RUnlock() - err = context.DeadlineExceeded - } - - if r.result != nil && r.result.success { - return r.result, nil - } - - return &dhtQueryResult{ - finalSet: r.peersSeen, - queriedSet: r.peersQueried, - }, err -} - -func (r *dhtQueryRunner) addPeerToQuery(next peer.ID) { - // if new peer is ourselves... - if next == r.query.dht.self { - r.log.Debug("addPeerToQuery skip self") - return - } - - if !r.peersSeen.TryAdd(next) { - return - } - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.AddingPeer, - ID: next, - }) - - r.peersRemaining.Increment(1) - select { - case r.peersToQuery.EnqChan <- next: - case <-r.proc.Closing(): - } -} - -func (r *dhtQueryRunner) spawnWorkers(proc process.Process) { - for { - - select { - case <-r.peersRemaining.Done(): - return - - case <-r.proc.Closing(): - return - - case <-r.rateLimit: - select { - case p, more := <-r.peersToQuery.DeqChan: - if !more { - return // channel closed. - } - - // do it as a child func to make sure Run exits - // ONLY AFTER spawn workers has exited. - proc.Go(func(proc process.Process) { - r.queryPeer(proc, p) - }) - case <-r.proc.Closing(): - return - case <-r.peersRemaining.Done(): - return - } - } - } -} - -func (r *dhtQueryRunner) queryPeer(proc process.Process, p peer.ID) { - // ok let's do this! - - // create a context from our proc. - ctx := ctxproc.OnClosingContext(proc) - - // make sure we do this when we exit - defer func() { - // signal we're done processing peer p - r.peersRemaining.Decrement(1) - r.rateLimit <- struct{}{} - }() - - // make sure we're connected to the peer. - // FIXME abstract away into the network layer - // Note: Failure to connect in this block will cause the function to - // short circuit. - if r.query.dht.host.Network().Connectedness(p) == inet.NotConnected { - log.Debug("not connected. dialing.") - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.DialingPeer, - ID: p, - }) - // while we dial, we do not take up a rate limit. this is to allow - // forward progress during potentially very high latency dials. - r.rateLimit <- struct{}{} - - pi := pstore.PeerInfo{ID: p} - - if err := r.query.dht.host.Connect(ctx, pi); err != nil { - log.Debugf("Error connecting: %s", err) - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - ID: p, - }) - - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - <-r.rateLimit // need to grab it again, as we deferred. - return - } - <-r.rateLimit // need to grab it again, as we deferred. - log.Debugf("connected. dial success.") - } - - // finally, run the query against this peer - res, err := r.query.qfunc(ctx, p) - - r.peersQueried.Add(p) - - if err != nil { - log.Debugf("ERROR worker for: %v %v", p, err) - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - - } else if res.success { - log.Debugf("SUCCESS worker for: %v %s", p, res) - r.Lock() - r.result = res - r.Unlock() - go r.proc.Close() // signal to everyone that we're done. - // must be async, as we're one of the children, and Close blocks. - - } else if len(res.closerPeers) > 0 { - log.Debugf("PEERS CLOSER -- worker for: %v (%d closer peers)", p, len(res.closerPeers)) - for _, next := range res.closerPeers { - if next.ID == r.query.dht.self { // don't add self. - log.Debugf("PEERS CLOSER -- worker for: %v found self", p) - continue - } - - // add their addresses to the dialer's peerstore - r.query.dht.peerstore.AddAddrs(next.ID, next.Addrs, pstore.TempAddrTTL) - r.addPeerToQuery(next.ID) - log.Debugf("PEERS CLOSER -- worker for: %v added %v (%v)", p, next.ID, next.Addrs) - } - } else { - log.Debugf("QUERY worker for: %v - not found, and no closer peers.", p) - } -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/records.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/records.go deleted file mode 100644 index 5b934b0f43..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/records.go +++ /dev/null @@ -1,136 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "time" - - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" -) - -// MaxRecordAge specifies the maximum time that any node will hold onto a record -// from the time its received. This does not apply to any other forms of validity that -// the record may contain. -// For example, a record may contain an ipns entry with an EOL saying its valid -// until the year 2020 (a great time in the future). For that record to stick around -// it must be rebroadcasted more frequently than once every 'MaxRecordAge' -const MaxRecordAge = time.Hour * 36 - -type pubkrs struct { - pubk ci.PubKey - err error -} - -func (dht *IpfsDHT) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { - log.Debugf("getPublicKey for: %s", p) - - // Check locally. Will also try to extract the public key from the peer - // ID itself if possible (if inlined). - pk := dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - // Try getting the public key both directly from the node it identifies - // and from the DHT, in parallel - ctx, cancel := context.WithCancel(ctx) - defer cancel() - resp := make(chan pubkrs, 2) - go func() { - pubk, err := dht.getPublicKeyFromNode(ctx, p) - resp <- pubkrs{pubk, err} - }() - - // Note that the number of open connections is capped by the dial - // limiter, so there is a chance that getPublicKeyFromDHT(), which - // potentially opens a lot of connections, will block - // getPublicKeyFromNode() from getting a connection. - // Currently this doesn't seem to cause an issue so leaving as is - // for now. - go func() { - pubk, err := dht.getPublicKeyFromDHT(ctx, p) - resp <- pubkrs{pubk, err} - }() - - // Wait for one of the two go routines to return - // a public key (or for both to error out) - var err error - for i := 0; i < 2; i++ { - r := <-resp - if r.err == nil { - // Found the public key - err := dht.peerstore.AddPubKey(p, r.pubk) - if err != nil { - log.Warningf("Failed to add public key to peerstore for %v", p) - } - return r.pubk, nil - } - err = r.err - } - - // Both go routines failed to find a public key - return nil, err -} - -func (dht *IpfsDHT) getPublicKeyFromDHT(ctx context.Context, p peer.ID) (ci.PubKey, error) { - // Only retrieve one value, because the public key is immutable - // so there's no need to retrieve multiple versions - pkkey := routing.KeyForPublicKey(p) - val, err := dht.GetValue(ctx, pkkey, Quorum(1)) - if err != nil { - return nil, err - } - - pubk, err := ci.UnmarshalPublicKey(val) - if err != nil { - log.Errorf("Could not unmarshall public key retrieved from DHT for %v", p) - return nil, err - } - - // Note: No need to check that public key hash matches peer ID - // because this is done by GetValues() - log.Debugf("Got public key for %s from DHT", p) - return pubk, nil -} - -func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.PubKey, error) { - // check locally, just in case... - pk := dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - // Get the key from the node itself - pkkey := routing.KeyForPublicKey(p) - pmes, err := dht.getValueSingle(ctx, p, pkkey) - if err != nil { - return nil, err - } - - // node doesn't have key :( - record := pmes.GetRecord() - if record == nil { - return nil, fmt.Errorf("node %v not responding with its public key", p) - } - - pubk, err := ci.UnmarshalPublicKey(record.GetValue()) - if err != nil { - log.Errorf("Could not unmarshall public key for %v", p) - return nil, err - } - - // Make sure the public key matches the peer ID - id, err := peer.IDFromPublicKey(pubk) - if err != nil { - log.Errorf("Could not extract peer id from public key for %v", p) - return nil, err - } - if id != p { - return nil, fmt.Errorf("public key %v does not match peer %v", id, p) - } - - log.Debugf("Got public key from node %v itself", p) - return pubk, nil -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing.go deleted file mode 100644 index 917ccbbd17..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing.go +++ /dev/null @@ -1,711 +0,0 @@ -package dht - -import ( - "bytes" - "context" - "fmt" - "runtime" - "sync" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - pb "gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pset "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - kb "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - notif "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" -) - -// asyncQueryBuffer is the size of buffered channels in async queries. This -// buffer allows multiple queries to execute simultaneously, return their -// results and continue querying closer peers. Note that different query -// results will wait for the channel to drain. -var asyncQueryBuffer = 10 - -// This file implements the Routing interface for the IpfsDHT struct. - -// Basic Put/Get - -// PutValue adds value corresponding to given Key. -// This is the top level "Store" operation of the DHT -func (dht *IpfsDHT) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) (err error) { - eip := log.EventBegin(ctx, "PutValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - log.Debugf("PutValue %s", key) - - // don't even allow local users to put bad values. - if err := dht.Validator.Validate(key, value); err != nil { - return err - } - - old, err := dht.getLocal(key) - if err != nil { - // Means something is wrong with the datastore. - return err - } - - // Check if we have an old value that's not the same as the new one. - if old != nil && !bytes.Equal(old.GetValue(), value) { - // Check to see if the new one is better. - i, err := dht.Validator.Select(key, [][]byte{value, old.GetValue()}) - if err != nil { - return err - } - if i != 0 { - return fmt.Errorf("can't replace a newer value with an older value") - } - } - - rec := record.MakePutRecord(key, value) - rec.TimeReceived = u.FormatRFC3339(time.Now()) - err = dht.putLocal(key, rec) - if err != nil { - return err - } - - pchan, err := dht.GetClosestPeers(ctx, key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range pchan { - wg.Add(1) - go func(p peer.ID) { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - defer wg.Done() - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.Value, - ID: p, - }) - - err := dht.putValueToPeer(ctx, p, rec) - if err != nil { - log.Debugf("failed putting value to peer: %s", err) - } - }(p) - } - wg.Wait() - return nil -} - -// RecvdVal stores a value and the peer from which we got the value. -type RecvdVal struct { - Val []byte - From peer.ID -} - -// GetValue searches for the value corresponding to given Key. -func (dht *IpfsDHT) GetValue(ctx context.Context, key string, opts ...ropts.Option) (_ []byte, err error) { - eip := log.EventBegin(ctx, "GetValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // apply defaultQuorum if relevant - var cfg ropts.Options - if err := cfg.Apply(opts...); err != nil { - return nil, err - } - opts = append(opts, Quorum(getQuorum(&cfg, defaultQuorum))) - - responses, err := dht.SearchValue(ctx, key, opts...) - if err != nil { - return nil, err - } - var best []byte - - for r := range responses { - best = r - } - - if ctx.Err() != nil { - return best, ctx.Err() - } - - if best == nil { - return nil, routing.ErrNotFound - } - log.Debugf("GetValue %v %v", key, best) - return best, nil -} - -func (dht *IpfsDHT) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { - var cfg ropts.Options - if err := cfg.Apply(opts...); err != nil { - return nil, err - } - - responsesNeeded := 0 - if !cfg.Offline { - responsesNeeded = getQuorum(&cfg, -1) - } - - valCh, err := dht.getValues(ctx, key, responsesNeeded) - if err != nil { - return nil, err - } - - out := make(chan []byte) - go func() { - defer close(out) - - maxVals := responsesNeeded - if maxVals < 0 { - maxVals = defaultQuorum * 4 // we want some upper bound on how - // much correctional entries we will send - } - - // vals is used collect entries we got so far and send corrections to peers - // when we exit this function - vals := make([]RecvdVal, 0, maxVals) - var best *RecvdVal - - defer func() { - if len(vals) <= 1 || best == nil { - return - } - fixupRec := record.MakePutRecord(key, best.Val) - for _, v := range vals { - // if someone sent us a different 'less-valid' record, lets correct them - if !bytes.Equal(v.Val, best.Val) { - go func(v RecvdVal) { - if v.From == dht.self { - err := dht.putLocal(key, fixupRec) - if err != nil { - log.Error("Error correcting local dht entry:", err) - } - return - } - ctx, cancel := context.WithTimeout(dht.Context(), time.Second*30) - defer cancel() - err := dht.putValueToPeer(ctx, v.From, fixupRec) - if err != nil { - log.Debug("Error correcting DHT entry: ", err) - } - }(v) - } - } - }() - - for { - select { - case v, ok := <-valCh: - if !ok { - return - } - - if len(vals) < maxVals { - vals = append(vals, v) - } - - if v.Val == nil { - continue - } - // Select best value - if best != nil { - if bytes.Equal(best.Val, v.Val) { - continue - } - sel, err := dht.Validator.Select(key, [][]byte{best.Val, v.Val}) - if err != nil { - log.Warning("Failed to select dht key: ", err) - continue - } - if sel != 1 { - continue - } - } - best = &v - select { - case out <- v.Val: - case <-ctx.Done(): - return - } - case <-ctx.Done(): - return - } - } - }() - - return out, nil -} - -// GetValues gets nvals values corresponding to the given key. -func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) { - eip := log.EventBegin(ctx, "GetValues") - - eip.Append(loggableKey(key)) - defer eip.Done() - - valCh, err := dht.getValues(ctx, key, nvals) - if err != nil { - eip.SetError(err) - return nil, err - } - - out := make([]RecvdVal, 0, nvals) - for val := range valCh { - out = append(out, val) - } - - return out, ctx.Err() -} - -func (dht *IpfsDHT) getValues(ctx context.Context, key string, nvals int) (<-chan RecvdVal, error) { - vals := make(chan RecvdVal, 1) - - done := func(err error) (<-chan RecvdVal, error) { - defer close(vals) - return vals, err - } - - // If we have it local, don't bother doing an RPC! - lrec, err := dht.getLocal(key) - if err != nil { - // something is wrong with the datastore. - return done(err) - } - if lrec != nil { - // TODO: this is tricky, we don't always want to trust our own value - // what if the authoritative source updated it? - log.Debug("have it locally") - vals <- RecvdVal{ - Val: lrec.GetValue(), - From: dht.self, - } - - if nvals == 0 || nvals == 1 { - return done(nil) - } - - nvals-- - } else if nvals == 0 { - return done(routing.ErrNotFound) - } - - // get closest peers in the routing table - rtp := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - log.Debugf("peers in rt: %d %s", len(rtp), rtp) - if len(rtp) == 0 { - log.Warning("No peers from routing table!") - return done(kb.ErrLookupFailure) - } - - var valslock sync.Mutex - var got int - - // setup the Query - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - rec, peers, err := dht.getValueOrPeers(ctx, p, key) - switch err { - case routing.ErrNotFound: - // in this case, they responded with nothing, - // still send a notification so listeners can know the - // request has completed 'successfully' - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - }) - return nil, err - default: - return nil, err - - case nil, errInvalidRecord: - // in either of these cases, we want to keep going - } - - res := &dhtQueryResult{closerPeers: peers} - - if rec.GetValue() != nil || err == errInvalidRecord { - rv := RecvdVal{ - Val: rec.GetValue(), - From: p, - } - valslock.Lock() - select { - case vals <- rv: - case <-ctx.Done(): - valslock.Unlock() - return nil, ctx.Err() - } - got++ - - // If we have collected enough records, we're done - if nvals == got { - res.success = true - } - valslock.Unlock() - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peers, - }) - - return res, nil - }) - - go func() { - reqCtx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - _, err = query.Run(reqCtx, rtp) - - // We do have some values but we either ran out of peers to query or - // searched for a whole minute. - // - // We'll just call this a success. - if got > 0 && (err == routing.ErrNotFound || reqCtx.Err() == context.DeadlineExceeded) { - err = nil - } - done(err) - }() - - return vals, nil -} - -// Provider abstraction for indirect stores. -// Some DHTs store values directly, while an indirect store stores pointers to -// locations of the value, similarly to Coral and Mainline DHT. - -// Provide makes this node announce that it can provide a value for the given key -func (dht *IpfsDHT) Provide(ctx context.Context, key cid.Cid, brdcst bool) (err error) { - eip := log.EventBegin(ctx, "Provide", key, logging.LoggableMap{"broadcast": brdcst}) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // add self locally - dht.providers.AddProvider(ctx, key, dht.self) - if !brdcst { - return nil - } - - peers, err := dht.GetClosestPeers(ctx, key.KeyString()) - if err != nil { - return err - } - - mes, err := dht.makeProvRecord(key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range peers { - wg.Add(1) - go func(p peer.ID) { - defer wg.Done() - log.Debugf("putProvider(%s, %s)", key, p) - err := dht.sendMessage(ctx, p, mes) - if err != nil { - log.Debug(err) - } - }(p) - } - wg.Wait() - return nil -} -func (dht *IpfsDHT) makeProvRecord(skey cid.Cid) (*pb.Message, error) { - pi := pstore.PeerInfo{ - ID: dht.self, - Addrs: dht.host.Addrs(), - } - - // // only share WAN-friendly addresses ?? - // pi.Addrs = addrutil.WANShareableAddrs(pi.Addrs) - if len(pi.Addrs) < 1 { - return nil, fmt.Errorf("no known addresses for self. cannot put provider.") - } - - pmes := pb.NewMessage(pb.Message_ADD_PROVIDER, skey.Bytes(), 0) - pmes.ProviderPeers = pb.RawPeerInfosToPBPeers([]pstore.PeerInfo{pi}) - return pmes, nil -} - -// FindProviders searches until the context expires. -func (dht *IpfsDHT) FindProviders(ctx context.Context, c cid.Cid) ([]pstore.PeerInfo, error) { - var providers []pstore.PeerInfo - for p := range dht.FindProvidersAsync(ctx, c, KValue) { - providers = append(providers, p) - } - return providers, nil -} - -// FindProvidersAsync is the same thing as FindProviders, but returns a channel. -// Peers will be returned on the channel as soon as they are found, even before -// the search query completes. -func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan pstore.PeerInfo { - log.Event(ctx, "findProviders", key) - peerOut := make(chan pstore.PeerInfo, count) - go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) - return peerOut -} - -func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key cid.Cid, count int, peerOut chan pstore.PeerInfo) { - defer log.EventBegin(ctx, "findProvidersAsync", key).Done() - defer close(peerOut) - - ps := pset.NewLimited(count) - provs := dht.providers.GetProviders(ctx, key) - for _, p := range provs { - // NOTE: Assuming that this list of peers is unique - if ps.TryAdd(p) { - pi := dht.peerstore.PeerInfo(p) - select { - case peerOut <- pi: - case <-ctx.Done(): - return - } - } - - // If we have enough peers locally, don't bother with remote RPC - // TODO: is this a DOS vector? - if ps.Size() >= count { - return - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(key.KeyString(), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - pmes, err := dht.findProvidersSingle(ctx, p, key) - if err != nil { - return nil, err - } - - log.Debugf("%d provider entries", len(pmes.GetProviderPeers())) - provs := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - log.Debugf("%d provider entries decoded", len(provs)) - - // Add unique providers from request, up to 'count' - for _, prov := range provs { - if prov.ID != dht.self { - dht.peerstore.AddAddrs(prov.ID, prov.Addrs, pstore.TempAddrTTL) - } - log.Debugf("got provider: %s", prov) - if ps.TryAdd(prov.ID) { - log.Debugf("using provider: %s", prov) - select { - case peerOut <- *prov: - case <-ctx.Done(): - log.Debug("context timed out sending more providers") - return nil, ctx.Err() - } - } - if ps.Size() >= count { - log.Debugf("got enough providers (%d/%d)", ps.Size(), count) - return &dhtQueryResult{success: true}, nil - } - } - - // Give closer peers back to the query to be queried - closer := pmes.GetCloserPeers() - clpeers := pb.PBPeersToPeerInfos(closer) - log.Debugf("got closer peers: %d %s", len(clpeers), clpeers) - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeers, - }) - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - peers := dht.routingTable.NearestPeers(kb.ConvertKey(key.KeyString()), AlphaValue) - _, err := query.Run(ctx, peers) - if err != nil { - log.Debugf("Query error: %s", err) - // Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032 - if fmt.Sprint(err) == "" { - log.Error("reproduced bug 3032:") - log.Errorf("Errors type information: %#v", err) - log.Errorf("go version: %s", runtime.Version()) - log.Error("please report this information to: https://github.com/ipfs/go-ipfs/issues/3032") - - // replace problematic error with something that won't crash the daemon - err = fmt.Errorf("") - } - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - }) - } -} - -// FindPeer searches for a peer with given ID. -func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (_ pstore.PeerInfo, err error) { - eip := log.EventBegin(ctx, "FindPeer", id) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // Check if were already connected to them - if pi := dht.FindLocal(id); pi.ID != "" { - return pi, nil - } - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return pstore.PeerInfo{}, kb.ErrLookupFailure - } - - // Sanity... - for _, p := range peers { - if p == id { - log.Debug("found target peer in list of closest peers...") - return dht.peerstore.PeerInfo(p), nil - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - closer := pmes.GetCloserPeers() - clpeerInfos := pb.PBPeersToPeerInfos(closer) - - // see if we got the peer here - for _, npi := range clpeerInfos { - if npi.ID == id { - return &dhtQueryResult{ - peer: npi, - success: true, - }, nil - } - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeerInfos, - }) - - return &dhtQueryResult{closerPeers: clpeerInfos}, nil - }) - - // run it! - result, err := query.Run(ctx, peers) - if err != nil { - return pstore.PeerInfo{}, err - } - - log.Debugf("FindPeer %v %v", id, result.success) - if result.peer.ID == "" { - return pstore.PeerInfo{}, routing.ErrNotFound - } - - return *result.peer, nil -} - -// FindPeersConnectedToPeer searches for peers directly connected to a given peer. -func (dht *IpfsDHT) FindPeersConnectedToPeer(ctx context.Context, id peer.ID) (<-chan *pstore.PeerInfo, error) { - - peerchan := make(chan *pstore.PeerInfo, asyncQueryBuffer) - peersSeen := make(map[peer.ID]struct{}) - var peersSeenMx sync.Mutex - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return nil, kb.ErrLookupFailure - } - - // setup the Query - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - var clpeers []*pstore.PeerInfo - closer := pmes.GetCloserPeers() - for _, pbp := range closer { - pi := pb.PBPeerToPeerInfo(pbp) - - // skip peers already seen - peersSeenMx.Lock() - if _, found := peersSeen[pi.ID]; found { - peersSeenMx.Unlock() - continue - } - peersSeen[pi.ID] = struct{}{} - peersSeenMx.Unlock() - - // if peer is connected, send it to our client. - if pb.Connectedness(pbp.Connection) == inet.Connected { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case peerchan <- pi: - } - } - - // if peer is the peer we're looking for, don't bother querying it. - // TODO maybe query it? - if pb.Connectedness(pbp.Connection) != inet.Connected { - clpeers = append(clpeers, pi) - } - } - - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - // run it! run it asynchronously to gen peers as results are found. - // this does no error checking - go func() { - if _, err := query.Run(ctx, peers); err != nil { - log.Debug(err) - } - - // close the peerchan channel when done. - close(peerchan) - }() - - return peerchan, nil -} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing_options.go b/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing_options.go deleted file mode 100644 index 3a2513fd43..0000000000 --- a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/routing_options.go +++ /dev/null @@ -1,31 +0,0 @@ -package dht - -import ( - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" -) - -type quorumOptionKey struct{} - -const defaultQuorum = 16 - -// Quorum is a DHT option that tells the DHT how many peers it needs to get -// values from before returning the best one. -// -// Default: 16 -func Quorum(n int) ropts.Option { - return func(opts *ropts.Options) error { - if opts.Other == nil { - opts.Other = make(map[interface{}]interface{}, 1) - } - opts.Other[quorumOptionKey{}] = n - return nil - } -} - -func getQuorum(opts *ropts.Options, ndefault int) int { - responsesNeeded, ok := opts.Other[quorumOptionKey{}].(int) - if !ok { - responsesNeeded = ndefault - } - return responsesNeeded -} diff --git a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/format.go b/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/format.go deleted file mode 100644 index 11ee029363..0000000000 --- a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/format.go +++ /dev/null @@ -1,152 +0,0 @@ -package cidutil - -import ( - "bytes" - "fmt" - - c "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - mb "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -// FormatRef is a string documenting the format string for the Format function -const FormatRef = ` - %% literal % - %b multibase name - %B multibase code - %v version string - %V version number - %c codec name - %C codec code - %h multihash name - %H multihash code - %L hash digest length - %m multihash encoded in base %b (with multibase prefix) - %M multihash encoded in base %b without multibase prefix - %d hash digest encoded in base %b (with multibase prefix) - %D hash digest encoded in base %b without multibase prefix - %s cid string encoded in base %b (1) - %S cid string encoded in base %b without multibase prefix - %P cid prefix: %v-%c-%h-%L - -(1) For CID version 0 the multibase must be base58btc and no prefix is -used. For Cid version 1 the multibase prefix is included. -` - -// Format formats a cid according to the format specificer as -// documented in the FormatRef constant -func Format(fmtStr string, base mb.Encoding, cid c.Cid) (string, error) { - p := cid.Prefix() - var out bytes.Buffer - var err error - encoder, err := mb.NewEncoder(base) - if err != nil { - return "", err - } - for i := 0; i < len(fmtStr); i++ { - if fmtStr[i] != '%' { - out.WriteByte(fmtStr[i]) - continue - } - i++ - if i >= len(fmtStr) { - return "", FormatStringError{"premature end of format string", ""} - } - switch fmtStr[i] { - case '%': - out.WriteByte('%') - case 'b': // base name - out.WriteString(baseToString(base)) - case 'B': // base code - out.WriteByte(byte(base)) - case 'v': // version string - fmt.Fprintf(&out, "cidv%d", p.Version) - case 'V': // version num - fmt.Fprintf(&out, "%d", p.Version) - case 'c': // codec name - out.WriteString(codecToString(p.Codec)) - case 'C': // codec code - fmt.Fprintf(&out, "%d", p.Codec) - case 'h': // hash fun name - out.WriteString(hashToString(p.MhType)) - case 'H': // hash fun code - fmt.Fprintf(&out, "%d", p.MhType) - case 'L': // hash length - fmt.Fprintf(&out, "%d", p.MhLength) - case 'm', 'M': // multihash encoded in base %b - out.WriteString(encode(encoder, cid.Hash(), fmtStr[i] == 'M')) - case 'd', 'D': // hash digest encoded in base %b - dec, err := mh.Decode(cid.Hash()) - if err != nil { - return "", err - } - out.WriteString(encode(encoder, dec.Digest, fmtStr[i] == 'D')) - case 's': // cid string encoded in base %b - str, err := cid.StringOfBase(base) - if err != nil { - return "", err - } - out.WriteString(str) - case 'S': // cid string without base prefix - out.WriteString(encode(encoder, cid.Bytes(), true)) - case 'P': // prefix - fmt.Fprintf(&out, "cidv%d-%s-%s-%d", - p.Version, - codecToString(p.Codec), - hashToString(p.MhType), - p.MhLength, - ) - default: - return "", FormatStringError{"unrecognized specifier in format string", fmtStr[i-1 : i+1]} - } - - } - return out.String(), err -} - -// FormatStringError is the error return from Format when the format -// string is ill formed -type FormatStringError struct { - Message string - Specifier string -} - -func (e FormatStringError) Error() string { - if e.Specifier == "" { - return e.Message - } else { - return fmt.Sprintf("%s: %s", e.Message, e.Specifier) - } -} - -func baseToString(base mb.Encoding) string { - baseStr, ok := mb.EncodingToStr[base] - if !ok { - return fmt.Sprintf("base?%c", base) - } - return baseStr -} - -func codecToString(num uint64) string { - name, ok := c.CodecToStr[num] - if !ok { - return fmt.Sprintf("codec?%d", num) - } - return name -} - -func hashToString(num uint64) string { - name, ok := mh.Codes[num] - if !ok { - return fmt.Sprintf("hash?%d", num) - } - return name -} - -func encode(base mb.Encoder, data []byte, strip bool) string { - str := base.Encode(data) - if strip { - return str[1:] - } - return str -} diff --git a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/package.json b/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/package.json deleted file mode 100644 index f5a360767a..0000000000 --- a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "author": "kevina", - "bugs": {}, - "gx": { - "dvcsimport": "github.com/ipfs/go-cidutil" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd", - "name": "go-multibase", - "version": "0.3.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-cidutil", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.1" -} - diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/.travis.yml b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/.travis.yml new file mode 100644 index 0000000000..ba95cdd15c --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/.travis.yml @@ -0,0 +1,21 @@ +sudo: false +language: go +go: + - 1.3.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - master +matrix: + allow_failures: + - go: master + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/LICENSE b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/LICENSE rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/LICENSE diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/README.markdown b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/README.markdown new file mode 100644 index 0000000000..91b4ae5646 --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/README.markdown @@ -0,0 +1,124 @@ +# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) + +Just a few functions for helping humanize times and sizes. + +`go get` it as `github.com/dustin/go-humanize`, import it as +`"github.com/dustin/go-humanize"`, use it as `humanize`. + +See [godoc](https://godoc.org/github.com/dustin/go-humanize) for +complete documentation. + +## Sizes + +This lets you take numbers like `82854982` and convert them to useful +strings like, `83 MB` or `79 MiB` (whichever you prefer). + +Example: + +```go +fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB. +``` + +## Times + +This lets you take a `time.Time` and spit it out in relative terms. +For example, `12 seconds ago` or `3 days from now`. + +Example: + +```go +fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago. +``` + +Thanks to Kyle Lemons for the time implementation from an IRC +conversation one day. It's pretty neat. + +## Ordinals + +From a [mailing list discussion][odisc] where a user wanted to be able +to label ordinals. + + 0 -> 0th + 1 -> 1st + 2 -> 2nd + 3 -> 3rd + 4 -> 4th + [...] + +Example: + +```go +fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend. +``` + +## Commas + +Want to shove commas into numbers? Be my guest. + + 0 -> 0 + 100 -> 100 + 1000 -> 1,000 + 1000000000 -> 1,000,000,000 + -100000 -> -100,000 + +Example: + +```go +fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491. +``` + +## Ftoa + +Nicer float64 formatter that removes trailing zeros. + +```go +fmt.Printf("%f", 2.24) // 2.240000 +fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 +fmt.Printf("%f", 2.0) // 2.000000 +fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 +``` + +## SI notation + +Format numbers with [SI notation][sinotation]. + +Example: + +```go +humanize.SI(0.00000000223, "M") // 2.23 nM +``` + +## English-specific functions + +The following functions are in the `humanize/english` subpackage. + +### Plurals + +Simple English pluralization + +```go +english.PluralWord(1, "object", "") // object +english.PluralWord(42, "object", "") // objects +english.PluralWord(2, "bus", "") // buses +english.PluralWord(99, "locus", "loci") // loci + +english.Plural(1, "object", "") // 1 object +english.Plural(42, "object", "") // 42 objects +english.Plural(2, "bus", "") // 2 buses +english.Plural(99, "locus", "loci") // 99 loci +``` + +### Word series + +Format comma-separated words lists with conjuctions: + +```go +english.WordSeries([]string{"foo"}, "and") // foo +english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar +english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz + +english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz +``` + +[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion +[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/big.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/big.go similarity index 100% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/big.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/big.go diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bigbytes.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bigbytes.go similarity index 91% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bigbytes.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bigbytes.go index 67ea5c823d..1a2bf61723 100644 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bigbytes.go +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bigbytes.go @@ -113,7 +113,7 @@ func humanateBigBytes(s, base *big.Int, sizes []string) string { // // See also: ParseBigBytes. // -// BigBytes(82854982) -> 83MB +// BigBytes(82854982) -> 83 MB func BigBytes(s *big.Int) string { sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} return humanateBigBytes(s, bigSIExp, sizes) @@ -123,7 +123,7 @@ func BigBytes(s *big.Int) string { // // See also: ParseBigBytes. // -// BigIBytes(82854982) -> 79MiB +// BigIBytes(82854982) -> 79 MiB func BigIBytes(s *big.Int) string { sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"} return humanateBigBytes(s, bigIECExp, sizes) @@ -134,19 +134,28 @@ func BigIBytes(s *big.Int) string { // // See also: BigBytes, BigIBytes. // -// ParseBigBytes("42MB") -> 42000000, nil -// ParseBigBytes("42mib") -> 44040192, nil +// ParseBigBytes("42 MB") -> 42000000, nil +// ParseBigBytes("42 mib") -> 44040192, nil func ParseBigBytes(s string) (*big.Int, error) { lastDigit := 0 + hasComma := false for _, r := range s { - if !(unicode.IsDigit(r) || r == '.') { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { break } + if r == ',' { + hasComma = true + } lastDigit++ } + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + val := &big.Rat{} - _, err := fmt.Sscanf(s[:lastDigit], "%f", val) + _, err := fmt.Sscanf(num, "%f", val) if err != nil { return nil, err } diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bytes.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bytes.go similarity index 85% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bytes.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bytes.go index dacbb9c1e4..0b498f4885 100644 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/bytes.go +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/bytes.go @@ -84,7 +84,7 @@ func humanateBytes(s uint64, base float64, sizes []string) string { // // See also: ParseBytes. // -// Bytes(82854982) -> 83MB +// Bytes(82854982) -> 83 MB func Bytes(s uint64) string { sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} return humanateBytes(s, 1000, sizes) @@ -94,7 +94,7 @@ func Bytes(s uint64) string { // // See also: ParseBytes. // -// IBytes(82854982) -> 79MiB +// IBytes(82854982) -> 79 MiB func IBytes(s uint64) string { sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} return humanateBytes(s, 1024, sizes) @@ -105,18 +105,27 @@ func IBytes(s uint64) string { // // See Also: Bytes, IBytes. // -// ParseBytes("42MB") -> 42000000, nil -// ParseBytes("42mib") -> 44040192, nil +// ParseBytes("42 MB") -> 42000000, nil +// ParseBytes("42 mib") -> 44040192, nil func ParseBytes(s string) (uint64, error) { lastDigit := 0 + hasComma := false for _, r := range s { - if !(unicode.IsDigit(r) || r == '.') { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { break } + if r == ',' { + hasComma = true + } lastDigit++ } - f, err := strconv.ParseFloat(s[:lastDigit], 64) + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + + f, err := strconv.ParseFloat(num, 64) if err != nil { return 0, err } diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/comma.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/comma.go similarity index 80% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/comma.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/comma.go index b65ea6fa78..520ae3e57d 100644 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/comma.go +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/comma.go @@ -2,6 +2,7 @@ package humanize import ( "bytes" + "math" "math/big" "strconv" "strings" @@ -13,6 +14,12 @@ import ( // e.g. Comma(834142) -> 834,142 func Comma(v int64) string { sign := "" + + // Min int64 can't be negated to a usable value, so it has to be special cased. + if v == math.MinInt64 { + return "-9,223,372,036,854,775,808" + } + if v < 0 { sign = "-" v = 0 - v @@ -39,7 +46,7 @@ func Comma(v int64) string { // Commaf produces a string form of the given number in base 10 with // commas after every three orders of magnitude. // -// e.g. Comma(834142.32) -> 834,142.32 +// e.g. Commaf(834142.32) -> 834,142.32 func Commaf(v float64) string { buf := &bytes.Buffer{} if v < 0 { @@ -69,6 +76,14 @@ func Commaf(v float64) string { return buf.String() } +// CommafWithDigits works like the Commaf but limits the resulting +// string to the given number of decimal places. +// +// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 +func CommafWithDigits(f float64, decimals int) string { + return stripTrailingDigits(Commaf(f), decimals) +} + // BigComma produces a string form of the given big.Int in base 10 // with commas after every three orders of magnitude. func BigComma(b *big.Int) string { diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/commaf.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/commaf.go similarity index 100% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/commaf.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/commaf.go diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/ftoa.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/ftoa.go new file mode 100644 index 0000000000..1c62b640d4 --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/ftoa.go @@ -0,0 +1,46 @@ +package humanize + +import ( + "strconv" + "strings" +) + +func stripTrailingZeros(s string) string { + offset := len(s) - 1 + for offset > 0 { + if s[offset] == '.' { + offset-- + break + } + if s[offset] != '0' { + break + } + offset-- + } + return s[:offset+1] +} + +func stripTrailingDigits(s string, digits int) string { + if i := strings.Index(s, "."); i >= 0 { + if digits <= 0 { + return s[:i] + } + i++ + if i+digits >= len(s) { + return s + } + return s[:i+digits] + } + return s +} + +// Ftoa converts a float to a string with no trailing zeros. +func Ftoa(num float64) string { + return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) +} + +// FtoaWithDigits converts a float to a string but limits the resulting string +// to the given number of decimal places, and no trailing zeros. +func FtoaWithDigits(num float64, digits int) string { + return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) +} diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/humanize.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/humanize.go new file mode 100644 index 0000000000..a2c2da31ef --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/humanize.go @@ -0,0 +1,8 @@ +/* +Package humanize converts boring ugly numbers to human-friendly strings and back. + +Durations can be turned into strings such as "3 days ago", numbers +representing sizes like 82854982 into useful strings like, "83 MB" or +"79 MiB" (whichever you prefer). +*/ +package humanize diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/number.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/number.go similarity index 98% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/number.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/number.go index 32141348c8..dec6186599 100644 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/number.go +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/number.go @@ -160,7 +160,7 @@ func FormatFloat(format string, n float64) string { intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) // generate integer part string - intStr := strconv.Itoa(int(intf)) + intStr := strconv.FormatInt(int64(intf), 10) // add thousand separator if required if len(thousandStr) > 0 { diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/ordinals.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/ordinals.go similarity index 100% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/ordinals.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/ordinals.go diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/package.json b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/package.json new file mode 100644 index 0000000000..1e4097f51b --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/package.json @@ -0,0 +1,16 @@ +{ + "author": "magik6k", + "bugs": { + "url": "https://github.com/gxed/go-humanize" + }, + "gx": { + "dvcsimport": "github.com/dustin/go-humanize" + }, + "gxVersion": "0.14.0", + "language": "go", + "license": "", + "name": "go-humanize", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.0.1" +} + diff --git a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/si.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/si.go similarity index 80% rename from vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/si.go rename to vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/si.go index 9cce4e8d39..ae659e0e49 100644 --- a/vendor/gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize/si.go +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/si.go @@ -68,7 +68,7 @@ func ComputeSI(input float64) (float64, string) { value := mag / math.Pow(10, exponent) // Handle special case where value is exactly 1000.0 - // Should return 1M instead of 1000k + // Should return 1 M instead of 1000 k if value == 1000.0 { exponent += 3 value = mag / math.Pow(10, exponent) @@ -86,20 +86,30 @@ func ComputeSI(input float64) (float64, string) { // // See also: ComputeSI, ParseSI. // -// e.g. SI(1000000, B) -> 1MB -// e.g. SI(2.2345e-12, "F") -> 2.2345pF +// e.g. SI(1000000, "B") -> 1 MB +// e.g. SI(2.2345e-12, "F") -> 2.2345 pF func SI(input float64, unit string) string { value, prefix := ComputeSI(input) return Ftoa(value) + " " + prefix + unit } +// SIWithDigits works like SI but limits the resulting string to the +// given number of decimal places. +// +// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB +// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF +func SIWithDigits(input float64, decimals int, unit string) string { + value, prefix := ComputeSI(input) + return FtoaWithDigits(value, decimals) + " " + prefix + unit +} + var errInvalid = errors.New("invalid input") // ParseSI parses an SI string back into the number and unit. // // See also: SI, ComputeSI. // -// e.g. ParseSI(2.2345pF) -> (2.2345e-12, "F", nil) +// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil) func ParseSI(input string) (float64, string, error) { found := riParseRegex.FindStringSubmatch(input) if len(found) != 4 { diff --git a/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/times.go b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/times.go new file mode 100644 index 0000000000..dd3fbf5efc --- /dev/null +++ b/vendor/gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize/times.go @@ -0,0 +1,117 @@ +package humanize + +import ( + "fmt" + "math" + "sort" + "time" +) + +// Seconds-based time units +const ( + Day = 24 * time.Hour + Week = 7 * Day + Month = 30 * Day + Year = 12 * Month + LongTime = 37 * Year +) + +// Time formats a time into a relative string. +// +// Time(someT) -> "3 weeks ago" +func Time(then time.Time) string { + return RelTime(then, time.Now(), "ago", "from now") +} + +// A RelTimeMagnitude struct contains a relative time point at which +// the relative format of time will switch to a new format string. A +// slice of these in ascending order by their "D" field is passed to +// CustomRelTime to format durations. +// +// The Format field is a string that may contain a "%s" which will be +// replaced with the appropriate signed label (e.g. "ago" or "from +// now") and a "%d" that will be replaced by the quantity. +// +// The DivBy field is the amount of time the time difference must be +// divided by in order to display correctly. +// +// e.g. if D is 2*time.Minute and you want to display "%d minutes %s" +// DivBy should be time.Minute so whatever the duration is will be +// expressed in minutes. +type RelTimeMagnitude struct { + D time.Duration + Format string + DivBy time.Duration +} + +var defaultMagnitudes = []RelTimeMagnitude{ + {time.Second, "now", time.Second}, + {2 * time.Second, "1 second %s", 1}, + {time.Minute, "%d seconds %s", time.Second}, + {2 * time.Minute, "1 minute %s", 1}, + {time.Hour, "%d minutes %s", time.Minute}, + {2 * time.Hour, "1 hour %s", 1}, + {Day, "%d hours %s", time.Hour}, + {2 * Day, "1 day %s", 1}, + {Week, "%d days %s", Day}, + {2 * Week, "1 week %s", 1}, + {Month, "%d weeks %s", Week}, + {2 * Month, "1 month %s", 1}, + {Year, "%d months %s", Month}, + {18 * Month, "1 year %s", 1}, + {2 * Year, "2 years %s", 1}, + {LongTime, "%d years %s", Year}, + {math.MaxInt64, "a long while %s", 1}, +} + +// RelTime formats a time into a relative string. +// +// It takes two times and two labels. In addition to the generic time +// delta string (e.g. 5 minutes), the labels are used applied so that +// the label corresponding to the smaller time is applied. +// +// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" +func RelTime(a, b time.Time, albl, blbl string) string { + return CustomRelTime(a, b, albl, blbl, defaultMagnitudes) +} + +// CustomRelTime formats a time into a relative string. +// +// It takes two times two labels and a table of relative time formats. +// In addition to the generic time delta string (e.g. 5 minutes), the +// labels are used applied so that the label corresponding to the +// smaller time is applied. +func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string { + lbl := albl + diff := b.Sub(a) + + if a.After(b) { + lbl = blbl + diff = a.Sub(b) + } + + n := sort.Search(len(magnitudes), func(i int) bool { + return magnitudes[i].D > diff + }) + + if n >= len(magnitudes) { + n = len(magnitudes) - 1 + } + mag := magnitudes[n] + args := []interface{}{} + escaped := false + for _, ch := range mag.Format { + if escaped { + switch ch { + case 's': + args = append(args, lbl) + case 'd': + args = append(args, diff/mag.DivBy) + } + escaped = false + } else { + escaped = ch == '%' + } + } + return fmt.Sprintf(mag.Format, args...) +} diff --git a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/.travis.yml b/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/.travis.yml deleted file mode 100644 index 19b893ed7a..0000000000 --- a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/package.json b/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/package.json deleted file mode 100644 index 3e0ee9c8cd..0000000000 --- a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-ds-measure" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ds-measure" - }, - "gxDependencies": [ - { - "author": "ipfs", - "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", - "name": "go-metrics-interface", - "version": "0.2.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "", - "name": "go-ds-measure", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.4.3" -} - diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/.codeclimate.yml b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/.codeclimate.yml similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/.codeclimate.yml rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/.codeclimate.yml diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/.travis.yml b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/.travis.yml rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/.travis.yml diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/CHANGELOG.md b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/CHANGELOG.md similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/CHANGELOG.md rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/CHANGELOG.md diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/CODEOWNERS b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/CODEOWNERS similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/CODEOWNERS rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/CODEOWNERS diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/LICENSE b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/LICENSE rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/LICENSE diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/Makefile b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/Makefile similarity index 100% rename from vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/Makefile rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/Makefile diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/README.md b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/README.md similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/README.md rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/README.md diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/arguments.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/arguments.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/arguments.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/arguments.go diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/chan.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/chan.go similarity index 91% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/chan.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/chan.go index 603e5ac128..58ee77dc83 100644 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/chan.go +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/chan.go @@ -5,7 +5,6 @@ import ( "io" "sync" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -130,12 +129,6 @@ func (re *chanResponseEmitter) Emit(v interface{}) error { re.wl.Lock() defer re.wl.Unlock() - // Initially this library allowed commands to return errors by sending an - // error value along a stream. We removed that in favour of CloseWithError, - // so we want to make sure we catch situations where some code still uses the - // old error emitting semantics and _panic_ in those situations. - debug.AssertNotError(v) - // unblock Length() select { case <-re.waitLen: diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/channelmarshaler.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/channelmarshaler.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/channelmarshaler.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/channelmarshaler.go diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/circle.yml b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/circle.yml similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/circle.yml rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/circle.yml diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/command.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/command.go new file mode 100644 index 0000000000..9b649f9b9b --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/command.go @@ -0,0 +1,305 @@ +/* +Package commands provides an API for defining and parsing commands. + +Supporting nested commands, options, arguments, etc. The commands +package also supports a collection of marshallers for presenting +output to the user, including text, JSON, and XML marshallers. +*/ + +package cmds + +import ( + "errors" + "fmt" + "strings" + + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +const DefaultOutputEncoding = JSON + +var log = logging.Logger("cmds") + +// Function is the type of function that Commands use. +// It reads from the Request, and writes results to the ResponseEmitter. +type Function func(*Request, ResponseEmitter, Environment) error + +// PostRunMap is the map used in Command.PostRun. +type PostRunMap map[PostRunType]func(Response, ResponseEmitter) error + +// Command is a runnable command, with input arguments and options (flags). +// It can also have Subcommands, to group units of work into sets. +type Command struct { + Options []cmdkit.Option + Arguments []cmdkit.Argument + PreRun func(req *Request, env Environment) error + + // Run is the function that processes the request to generate a response. + // Note that when executing the command over the HTTP API you can only read + // after writing when using multipart requests. The request body will not be + // available for reading after the HTTP connection has been written to. + Run Function + PostRun PostRunMap + Encoders EncoderMap + Helptext cmdkit.HelpText + + // External denotes that a command is actually an external binary. + // fewer checks and validations will be performed on such commands. + External bool + + // Type describes the type of the output of the Command's Run Function. + // In precise terms, the value of Type is an instance of the return type of + // the Run Function. + // + // ie. If command Run returns &Block{}, then Command.Type == &Block{} + Type interface{} + Subcommands map[string]*Command +} + +var ( + // ErrNotCallable signals a command that cannot be called. + ErrNotCallable = ClientError("This command can't be called directly. Try one of its subcommands.") + + // ErrNoFormatter signals that the command can not be formatted. + ErrNoFormatter = ClientError("This command cannot be formatted to plain text") + + // ErrIncorrectType signales that the commands returned a value with unexpected type. + ErrIncorrectType = errors.New("The command returned a value with a different type than expected") +) + +// Call invokes the command for the given Request +func (c *Command) Call(req *Request, re ResponseEmitter, env Environment) { + var closeErr error + + err := c.call(req, re, env) + if err != nil { + log.Debugf("error occured in call, closing with error: %s", err) + } + + closeErr = re.CloseWithError(err) + // ignore double close errors + if closeErr != nil && closeErr != ErrClosingClosedEmitter { + log.Errorf("error closing ResponseEmitter: %s", closeErr) + } +} + +func (c *Command) call(req *Request, re ResponseEmitter, env Environment) error { + cmd, err := c.Get(req.Path) + if err != nil { + log.Errorf("could not get cmd from path %q: %q", req.Path, err) + return err + } + + if cmd.Run == nil { + log.Errorf("returned command has nil Run function") + return err + } + + err = cmd.CheckArguments(req) + if err != nil { + log.Errorf("CheckArguments returned an error for path %q: %q", req.Path, err) + return err + } + + return cmd.Run(req, re, env) +} + +// Resolve returns the subcommands at the given path +func (c *Command) Resolve(pth []string) ([]*Command, error) { + cmds := make([]*Command, len(pth)+1) + cmds[0] = c + + cmd := c + for i, name := range pth { + cmd = cmd.Subcommands[name] + + if cmd == nil { + pathS := strings.Join(pth[:i], "/") + return nil, fmt.Errorf("undefined command: %q", pathS) + } + + cmds[i+1] = cmd + } + + return cmds, nil +} + +// Get resolves and returns the Command addressed by path +func (c *Command) Get(path []string) (*Command, error) { + cmds, err := c.Resolve(path) + if err != nil { + return nil, err + } + return cmds[len(cmds)-1], nil +} + +// GetOptions returns the options in the given path of commands +func (c *Command) GetOptions(path []string) (map[string]cmdkit.Option, error) { + options := make([]cmdkit.Option, 0, len(c.Options)) + + cmds, err := c.Resolve(path) + if err != nil { + return nil, err + } + + for _, cmd := range cmds { + options = append(options, cmd.Options...) + } + + optionsMap := make(map[string]cmdkit.Option) + for _, opt := range options { + for _, name := range opt.Names() { + if _, found := optionsMap[name]; found { + return nil, fmt.Errorf("option name %q used multiple times", name) + } + + optionsMap[name] = opt + } + } + + return optionsMap, nil +} + +// DebugValidate checks if the command tree is well-formed. +// +// This operation is slow and should be called from tests only. +func (c *Command) DebugValidate() map[string][]error { + errs := make(map[string][]error) + var visit func(path string, cm *Command) + + liveOptions := make(map[string]struct{}) + visit = func(path string, cm *Command) { + expectOptional := false + for i, argDef := range cm.Arguments { + // No required arguments after optional arguments. + if argDef.Required { + if expectOptional { + errs[path] = append(errs[path], fmt.Errorf("required argument %s after optional arguments", argDef.Name)) + return + } + } else { + expectOptional = true + } + + // variadic arguments and those supporting stdin must be last + if (argDef.Variadic || argDef.SupportsStdin) && i != len(cm.Arguments)-1 { + errs[path] = append(errs[path], fmt.Errorf("variadic and/or optional argument %s must be last", argDef.Name)) + } + } + + var goodOptions []string + for _, option := range cm.Options { + for _, name := range option.Names() { + if _, ok := liveOptions[name]; ok { + errs[path] = append(errs[path], fmt.Errorf("duplicate option name %s", name)) + } else { + goodOptions = append(goodOptions, name) + liveOptions[name] = struct{}{} + } + } + } + for scName, sc := range cm.Subcommands { + visit(fmt.Sprintf("%s/%s", path, scName), sc) + } + + for _, name := range goodOptions { + delete(liveOptions, name) + } + } + visit("", c) + if len(errs) == 0 { + errs = nil + } + return errs +} + +// CheckArguments checks that we have all the required string arguments, loading +// any from stdin if necessary. +func (c *Command) CheckArguments(req *Request) error { + if len(c.Arguments) == 0 { + return nil + } + + lastArg := c.Arguments[len(c.Arguments)-1] + if req.bodyArgs == nil && // check this as we can end up calling CheckArguments multiple times. See #80. + lastArg.SupportsStdin && + lastArg.Type == cmdkit.ArgString && + req.Files != nil { + + it := req.Files.Entries() + if it.Next() { + req.bodyArgs = newArguments(files.FileFromEntry(it)) + // Can't pass files and stdin arguments. + req.Files = nil + } else { + if it.Err() != nil { + return it.Err() + } + } + } + + // iterate over the arg definitions + requiredStringArgs := 0 // number of required string arguments + for _, argDef := range req.Command.Arguments { + // Is this a string? + if argDef.Type != cmdkit.ArgString { + // No, skip it. + continue + } + + // No more required arguments? + if !argDef.Required { + // Yes, we're all done. + break + } + requiredStringArgs++ + + // Do we have enough string arguments? + if requiredStringArgs <= len(req.Arguments) { + // all good + continue + } + + // Can we get it from stdin? + if argDef.SupportsStdin && req.bodyArgs != nil { + if req.bodyArgs.Scan() { + // Found it! + req.Arguments = append(req.Arguments, req.bodyArgs.Argument()) + continue + } + if err := req.bodyArgs.Err(); err != nil { + return err + } + // No, just missing. + } + return fmt.Errorf("argument %q is required", argDef.Name) + } + + return nil +} + +type CommandVisitor func(*Command) + +// Walks tree of all subcommands (including this one) +func (c *Command) Walk(visitor CommandVisitor) { + visitor(c) + for _, sub := range c.Subcommands { + sub.Walk(visitor) + } +} + +func (c *Command) ProcessHelp() { + c.Walk(func(cm *Command) { + ht := &cm.Helptext + if len(ht.LongDescription) == 0 { + ht.LongDescription = ht.ShortDescription + } + }) +} + +func ClientError(msg string) error { + return &cmdkit.Error{Code: cmdkit.ErrClient, Message: msg} +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/doc.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/doc.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/doc.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/doc.go diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/encoding.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/encoding.go similarity index 95% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/encoding.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/encoding.go index d2687ef954..a2dbf6147d 100644 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/encoding.go +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/encoding.go @@ -92,16 +92,23 @@ func MakeTypedEncoder(f interface{}) func(*Request) func(io.Writer) Encoder { } valType := t.In(2) + valTypePtr := reflect.PtrTo(valType) return MakeEncoder(func(req *Request, w io.Writer, i interface{}) error { - if reflect.TypeOf(i) != valType { + iType := reflect.TypeOf(i) + iValue := reflect.ValueOf(i) + switch iType { + case valType: + case valTypePtr: + iValue = iValue.Elem() + default: return fmt.Errorf("unexpected type %T, expected %v", i, valType) } out := val.Call([]reflect.Value{ reflect.ValueOf(req), reflect.ValueOf(w), - reflect.ValueOf(i), + iValue, }) err, ok := out[0].Interface().(error) diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/executor.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/executor.go new file mode 100644 index 0000000000..05c4397313 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/executor.go @@ -0,0 +1,94 @@ +package cmds + +import ( + "context" +) + +type Executor interface { + Execute(req *Request, re ResponseEmitter, env Environment) error +} + +// Environment is the environment passed to commands. The only required method +// is Context. +type Environment interface { + // Context returns the environment's context. + Context() context.Context +} + +// MakeEnvironment takes a context and the request to construct the environment +// that is passed to the command's Run function. +// The user can define a function like this to pass it to cli.Run. +type MakeEnvironment func(context.Context, *Request) (Environment, error) + +// MakeExecutor takes the request and environment variable to construct the +// executor that determines how to call the command - i.e. by calling Run or +// making an API request to a daemon. +// The user can define a function like this to pass it to cli.Run. +type MakeExecutor func(*Request, interface{}) (Executor, error) + +func NewExecutor(root *Command) Executor { + return &executor{ + root: root, + } +} + +type executor struct { + root *Command +} + +func (x *executor) Execute(req *Request, re ResponseEmitter, env Environment) error { + cmd := req.Command + + if cmd.Run == nil { + return ErrNotCallable + } + + err := cmd.CheckArguments(req) + if err != nil { + return err + } + + if cmd.PreRun != nil { + err = cmd.PreRun(req, env) + if err != nil { + return err + } + } + + // contains the error returned by PostRun + errCh := make(chan error, 1) + if cmd.PostRun != nil { + if typer, ok := re.(interface { + Type() PostRunType + }); ok && cmd.PostRun[typer.Type()] != nil { + var ( + res Response + lower = re + ) + + re, res = NewChanResponsePair(req) + + go func() { + defer close(errCh) + errCh <- lower.CloseWithError(cmd.PostRun[typer.Type()](res, lower)) + }() + } + } else { + // not using this channel today + close(errCh) + } + + runCloseErr := re.CloseWithError(cmd.Run(req, re, env)) + postCloseErr := <-errCh + switch runCloseErr { + case ErrClosingClosedEmitter, nil: + default: + return runCloseErr + } + switch postCloseErr { + case ErrClosingClosedEmitter, nil: + default: + return postCloseErr + } + return nil +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/flushfwd.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/flushfwd.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/flushfwd.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/flushfwd.go diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/apiprefix.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/apiprefix.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/apiprefix.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/apiprefix.go diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/body.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/body.go new file mode 100644 index 0000000000..d276935320 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/body.go @@ -0,0 +1,19 @@ +package http + +import "io" + +// bodyWrapper wraps an io.Reader and calls onEOF whenever the Read function returns io.EOF. +// This was designed for wrapping the request body, so we can know whether it was closed. +type bodyWrapper struct { + io.ReadCloser + onEOF func() +} + +func (bw bodyWrapper) Read(data []byte) (int, error) { + n, err := bw.ReadCloser.Read(data) + if err == io.EOF { + bw.onEOF() + } + + return n, err +} diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/client.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/client.go new file mode 100644 index 0000000000..073410fcfc --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/client.go @@ -0,0 +1,240 @@ +package http + +import ( + "context" + "fmt" + "io" + "net" + "net/http" + "net/url" + "strings" + + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +const ( + ApiUrlFormat = "%s%s/%s?%s" +) + +var OptionSkipMap = map[string]bool{ + "api": true, +} + +// Client is the commands HTTP client interface. +type Client interface { + Send(req *cmds.Request) (cmds.Response, error) +} + +type client struct { + serverAddress string + httpClient *http.Client + ua string + apiPrefix string +} + +type ClientOpt func(*client) + +func ClientWithUserAgent(ua string) ClientOpt { + return func(c *client) { + c.ua = ua + } +} + +func ClientWithAPIPrefix(apiPrefix string) ClientOpt { + return func(c *client) { + c.apiPrefix = apiPrefix + } +} + +func NewClient(address string, opts ...ClientOpt) Client { + if !strings.HasPrefix(address, "http://") { + address = "http://" + address + } + + c := &client{ + serverAddress: address, + httpClient: http.DefaultClient, + ua: "go-ipfs-cmds/http", + } + + for _, opt := range opts { + opt(c) + } + + return c +} + +func (c *client) Execute(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment) error { + cmd := req.Command + + if cmd.PreRun != nil { + err := cmd.PreRun(req, env) + if err != nil { + return err + } + } + + res, err := c.Send(req) + if err != nil { + if isConnRefused(err) { + err = fmt.Errorf("cannot connect to the api. Is the deamon running? To run as a standalone CLI command remove the api file in `$IPFS_PATH/api`") + } + return err + } + + if cmd.PostRun != nil { + if typer, ok := re.(interface { + Type() cmds.PostRunType + }); ok && cmd.PostRun[typer.Type()] != nil { + err := cmd.PostRun[typer.Type()](res, re) + closeErr := re.CloseWithError(err) + if closeErr == cmds.ErrClosingClosedEmitter { + // ignore double close errors + return nil + } + + return err + } + } + + return cmds.Copy(re, res) +} + +func (c *client) toHTTPRequest(req *cmds.Request) (*http.Request, error) { + query, err := getQuery(req) + if err != nil { + return nil, err + } + + var fileReader *files.MultiFileReader + var reader io.Reader // in case we have no body to send we need to provide + // untyped nil to http.NewRequest + + if bodyArgs := req.BodyArgs(); bodyArgs != nil { + // In the end, this wraps a file reader in a file reader. + // However, such is life. + fileReader = files.NewMultiFileReader(files.NewMapDirectory(map[string]files.Node{ + "stdin": files.NewReaderFile(bodyArgs), + }), true) + reader = fileReader + } else if req.Files != nil { + fileReader = files.NewMultiFileReader(req.Files, true) + reader = fileReader + } + + path := strings.Join(req.Path, "/") + url := fmt.Sprintf(ApiUrlFormat, c.serverAddress, c.apiPrefix, path, query) + + httpReq, err := http.NewRequest("POST", url, reader) + if err != nil { + return nil, err + } + + // TODO extract string consts? + if fileReader != nil { + httpReq.Header.Set(contentTypeHeader, "multipart/form-data; boundary="+fileReader.Boundary()) + } else { + httpReq.Header.Set(contentTypeHeader, applicationOctetStream) + } + httpReq.Header.Set(uaHeader, c.ua) + + httpReq = httpReq.WithContext(req.Context) + httpReq.Close = true + + return httpReq, nil +} + +func (c *client) Send(req *cmds.Request) (cmds.Response, error) { + if req.Context == nil { + log.Warningf("no context set in request") + req.Context = context.Background() + } + + // save user-provided encoding + previousUserProvidedEncoding, found := req.Options[cmds.EncLong].(string) + + // override with json to send to server + req.SetOption(cmds.EncLong, cmds.JSON) + + // stream channel output + req.SetOption(cmds.ChanOpt, true) + + // build http request + httpReq, err := c.toHTTPRequest(req) + if err != nil { + return nil, err + } + + // send http request + httpRes, err := c.httpClient.Do(httpReq) + if err != nil { + return nil, err + } + + // parse using the overridden JSON encoding in request + res, err := parseResponse(httpRes, req) + if err != nil { + return nil, err + } + + // reset request encoding to what it was before + if found && len(previousUserProvidedEncoding) > 0 { + // reset to user provided encoding after sending request + // NB: if user has provided an encoding but it is the empty string, + // still leave it as JSON. + req.SetOption(cmds.EncLong, previousUserProvidedEncoding) + } + + return res, nil +} + +func getQuery(req *cmds.Request) (string, error) { + query := url.Values{} + + for k, v := range req.Options { + if OptionSkipMap[k] { + continue + } + str := fmt.Sprintf("%v", v) + query.Set(k, str) + } + + args := req.Arguments + argDefs := req.Command.Arguments + + argDefIndex := 0 + + for _, arg := range args { + argDef := argDefs[argDefIndex] + // skip ArgFiles + for argDef.Type == cmdkit.ArgFile { + argDefIndex++ + argDef = argDefs[argDefIndex] + } + + query.Add("arg", arg) + + if len(argDefs) > argDefIndex+1 { + argDefIndex++ + } + } + + return query.Encode(), nil +} + +func isConnRefused(err error) bool { + // unwrap url errors from http calls + if urlerr, ok := err.(*url.Error); ok { + err = urlerr.Err + } + + netoperr, ok := err.(*net.OpError) + if !ok { + return false + } + + return netoperr.Op == "dial" +} diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/config.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/config.go new file mode 100644 index 0000000000..c947fce7e9 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/config.go @@ -0,0 +1,144 @@ +package http + +import ( + "net/http" + "net/url" + "sync" + + cors "gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors" +) + +const ( + ACAOrigin = "Access-Control-Allow-Origin" + ACAMethods = "Access-Control-Allow-Methods" + ACACredentials = "Access-Control-Allow-Credentials" +) + +type ServerConfig struct { + // APIPath is the prefix of all request paths. + // Example: host:port/api/v0/add. Here the APIPath is /api/v0 + APIPath string + + // Headers is an optional map of headers that is written out. + Headers map[string][]string + + // corsOpts is a set of options for CORS headers. + corsOpts *cors.Options + + // corsOptsRWMutex is a RWMutex for read/write CORSOpts + corsOptsRWMutex sync.RWMutex +} + +func NewServerConfig() *ServerConfig { + cfg := new(ServerConfig) + cfg.corsOpts = new(cors.Options) + return cfg +} + +func (cfg *ServerConfig) AllowedOrigins() []string { + cfg.corsOptsRWMutex.RLock() + defer cfg.corsOptsRWMutex.RUnlock() + return cfg.corsOpts.AllowedOrigins +} + +func (cfg *ServerConfig) SetAllowedOrigins(origins ...string) { + cfg.corsOptsRWMutex.Lock() + defer cfg.corsOptsRWMutex.Unlock() + o := make([]string, len(origins)) + copy(o, origins) + cfg.corsOpts.AllowedOrigins = o +} + +func (cfg *ServerConfig) AppendAllowedOrigins(origins ...string) { + cfg.corsOptsRWMutex.Lock() + defer cfg.corsOptsRWMutex.Unlock() + cfg.corsOpts.AllowedOrigins = append(cfg.corsOpts.AllowedOrigins, origins...) +} + +func (cfg *ServerConfig) AllowedMethods() []string { + cfg.corsOptsRWMutex.RLock() + defer cfg.corsOptsRWMutex.RUnlock() + return []string(cfg.corsOpts.AllowedMethods) +} + +func (cfg *ServerConfig) SetAllowedMethods(methods ...string) { + cfg.corsOptsRWMutex.Lock() + defer cfg.corsOptsRWMutex.Unlock() + if cfg.corsOpts == nil { + cfg.corsOpts = new(cors.Options) + } + cfg.corsOpts.AllowedMethods = methods +} + +func (cfg *ServerConfig) SetAllowCredentials(flag bool) { + cfg.corsOptsRWMutex.Lock() + defer cfg.corsOptsRWMutex.Unlock() + cfg.corsOpts.AllowCredentials = flag +} + +// allowOrigin just stops the request if the origin is not allowed. +// the CORS middleware apparently does not do this for us... +func allowOrigin(r *http.Request, cfg *ServerConfig) bool { + origin := r.Header.Get("Origin") + + // curl, or ipfs shell, typing it in manually, or clicking link + // NOT in a browser. this opens up a hole. we should close it, + // but right now it would break things. TODO + if origin == "" { + return true + } + origins := cfg.AllowedOrigins() + for _, o := range origins { + if o == "*" { // ok! you asked for it! + return true + } + + if o == origin { // allowed explicitly + return true + } + } + + return false +} + +// allowReferer this is here to prevent some CSRF attacks that +// the API would be vulnerable to. We check that the Referer +// is allowed by CORS Origin (origins and referrers here will +// work similarly in the normal uses of the API). +// See discussion at https://github.com/ipfs/go-ipfs/issues/1532 +func allowReferer(r *http.Request, cfg *ServerConfig) bool { + referer := r.Referer() + + // curl, or ipfs shell, typing it in manually, or clicking link + // NOT in a browser. this opens up a hole. we should close it, + // but right now it would break things. TODO + if referer == "" { + return true + } + + u, err := url.Parse(referer) + if err != nil { + // bad referer. but there _is_ something, so bail. + // debug because referer comes straight from the client. dont want to + // let people DOS by putting a huge referer that gets stored in log files. + return false + } + origin := u.Scheme + "://" + u.Host + + // check CORS ACAOs and pretend Referer works like an origin. + // this is valid for many (most?) sane uses of the API in + // other applications, and will have the desired effect. + origins := cfg.AllowedOrigins() + for _, o := range origins { + if o == "*" { // ok! you asked for it! + return true + } + + // referer is allowed explicitly + if o == origin { + return true + } + } + + return false +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/flushfwd.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/flushfwd.go similarity index 79% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/flushfwd.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/flushfwd.go index 4e959b5ab2..5dec45ecd0 100644 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/flushfwd.go +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/flushfwd.go @@ -1,7 +1,7 @@ package http import ( - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" "net/http" ) diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/handler.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/handler.go similarity index 83% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/handler.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/handler.go index 78b666a21f..2494616316 100644 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/handler.go +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/handler.go @@ -8,11 +8,12 @@ import ( "net/http" "runtime/debug" "strings" + "sync" "time" - cors "gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + cors "gx/ipfs/QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM/cors" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("cmds/http") @@ -109,6 +110,24 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + // If we have a request body, make sure the preamble + // knows that it should close the body if it wants to + // write before completing reading. + // FIXME: https://github.com/ipfs/go-ipfs/issues/5168 + // FIXME: https://github.com/golang/go/issues/15527 + var bodyEOFChan chan struct{} + if r.Body != http.NoBody { + bodyEOFChan = make(chan struct{}) + var once sync.Once + bw := bodyWrapper{ + ReadCloser: r.Body, + onEOF: func() { + once.Do(func() { close(bodyEOFChan) }) + }, + } + r.Body = bw + } + req, err := parseRequest(ctx, r, h.root) if err != nil { if err == ErrNotFound { @@ -145,7 +164,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { }() } - re, err := NewResponseEmitter(w, r.Method, req) + re, err := NewResponseEmitter(w, r.Method, req, withRequestBodyEOFChan(bodyEOFChan)) if err != nil { w.WriteHeader(http.StatusBadRequest) w.Write([]byte(err.Error())) diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/parse.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/parse.go similarity index 95% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/parse.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/parse.go index 2414c07780..51ce9ab28e 100644 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/parse.go +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/parse.go @@ -9,9 +9,9 @@ import ( "strconv" "strings" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" - "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -117,16 +117,16 @@ func parseRequest(ctx context.Context, r *http.Request, root *cmds.Command) (*cm contentType := r.Header.Get(contentTypeHeader) mediatype, _, _ := mime.ParseMediaType(contentType) - var f files.File + var f files.Directory if mediatype == "multipart/form-data" { reader, err := r.MultipartReader() if err != nil { return nil, err } - f = &files.MultipartFile{ - Mediatype: mediatype, - Reader: reader, + f, err = files.NewFileFromPartReader(reader, mediatype) + if err != nil { + return nil, err } } diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/response.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/response.go new file mode 100644 index 0000000000..7308da31ad --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/response.go @@ -0,0 +1,155 @@ +package http + +import ( + "errors" + "io" + "net/http" + "reflect" + "strings" + + "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +var ( + MIMEEncodings = map[string]cmds.EncodingType{ + "application/json": cmds.JSON, + "application/xml": cmds.XML, + "text/plain": cmds.Text, + } +) + +type Response struct { + length uint64 + err error + + res *http.Response + req *cmds.Request + + rr *responseReader + dec cmds.Decoder + + initErr *cmdkit.Error +} + +func (res *Response) Request() *cmds.Request { + return res.req +} + +func (res *Response) Error() *cmdkit.Error { + if res.err == io.EOF || res.err == nil { + return nil + } + + switch err := res.err.(type) { + case *cmdkit.Error: + return err + case cmdkit.Error: + return &err + default: + // i.e. is a regular error + return &cmdkit.Error{Message: res.err.Error()} + } +} + +func (res *Response) Length() uint64 { + return res.length +} + +func (res *Response) Next() (interface{}, error) { + if res.initErr != nil { + return nil, res.initErr + } + + if res.err != nil { + return nil, res.err + } + + // nil decoder means stream not chunks + // but only do that once + if res.dec == nil { + if res.rr == nil { + return nil, io.EOF + } + rr := res.rr + res.rr = nil + return rr, nil + } + + var value interface{} + if valueType := reflect.TypeOf(res.req.Command.Type); valueType != nil { + if valueType.Kind() == reflect.Ptr { + valueType = valueType.Elem() + } + value = reflect.New(valueType).Interface() + } + + m := &cmds.MaybeError{Value: value} + err := res.dec.Decode(m) + if err != nil { + if err == io.EOF { + // handle errors from headers + errStr := res.res.Header.Get(StreamErrHeader) + if errStr != "" { + err = &cmdkit.Error{Message: errStr} + } + + res.err = err + return nil, err + } else { + // wrap all other errors + res.err = err + return nil, res.err + } + } + + v, err := m.Get() + if err != nil { + if e, ok := err.(*cmdkit.Error); ok { + res.err = e + } else { + res.err = &cmdkit.Error{Message: err.Error()} + } + } + + return v, err +} + +// responseReader reads from the response body, and checks for an error +// in the http trailer upon EOF, this error if present is returned instead +// of the EOF. +type responseReader struct { + resp *http.Response +} + +func (r *responseReader) Read(b []byte) (int, error) { + if r == nil || r.resp == nil { + return 0, io.EOF + } + + n, err := r.resp.Body.Read(b) + + // reading on a closed response body is as good as an io.EOF here + if err != nil && strings.Contains(err.Error(), "read on closed response body") { + err = io.EOF + } + if err == io.EOF { + _ = r.resp.Body.Close() + trailerErr := r.checkError() + if trailerErr != nil { + return n, trailerErr + } + } + return n, err +} + +func (r *responseReader) checkError() error { + if e := r.resp.Trailer.Get(StreamErrHeader); e != "" { + return errors.New(e) + } + return nil +} + +func (r *responseReader) Close() error { + return r.resp.Body.Close() +} diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/responseemitter.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/responseemitter.go new file mode 100644 index 0000000000..861a90c396 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/http/responseemitter.go @@ -0,0 +1,356 @@ +package http + +import ( + "fmt" + "io" + "net/http" + "strconv" + "strings" + "sync" + + cmds "gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +var ( + HeadRequest = fmt.Errorf("HEAD request") + + AllowedExposedHeadersArr = []string{streamHeader, channelHeader, extraContentLengthHeader} + AllowedExposedHeaders = strings.Join(AllowedExposedHeadersArr, ", ") + + mimeTypes = map[cmds.EncodingType]string{ + cmds.Protobuf: "application/protobuf", + cmds.JSON: "application/json", + cmds.XML: "application/xml", + cmds.Text: "text/plain", + } +) + +// NewResponeEmitter returns a new ResponseEmitter. +func NewResponseEmitter(w http.ResponseWriter, method string, req *cmds.Request, opts ...ResponseEmitterOption) (ResponseEmitter, error) { + encType, enc, err := cmds.GetEncoder(req, w, cmds.JSON) + if err != nil { + return nil, err + } + re := &responseEmitter{ + w: w, + encType: encType, + enc: enc, + method: method, + req: req, + } + + // apply functional options + for _, opt := range opts { + opt(re) + } + + return re, nil +} + +// ResponseEmitterOption is the type describing options to the NewResponseEmitter function. +type ResponseEmitterOption func(*responseEmitter) + +// withRequestBodyEOFChan return a ResponseEmitterOption needed to gracefully handle +// the case where the handler wants to send data and the request data has not been read +// completely yet. +func withRequestBodyEOFChan(ch <-chan struct{}) ResponseEmitterOption { + return func(re *responseEmitter) { + if ch != nil { + re.bodyEOFChan = ch + } + } +} + +type ResponseEmitter interface { + cmds.ResponseEmitter + http.Flusher +} + +type responseEmitter struct { + w http.ResponseWriter + + enc cmds.Encoder + encType cmds.EncodingType + req *cmds.Request + + l sync.Mutex + length uint64 + err *cmdkit.Error + + bodyEOFChan <-chan struct{} + + streaming bool + closed bool + once sync.Once + method string +} + +func (re *responseEmitter) Emit(value interface{}) error { + // if we got a channel, instead emit values received on there. + if ch, ok := value.(chan interface{}); ok { + value = (<-chan interface{})(ch) + } + if ch, isChan := value.(<-chan interface{}); isChan { + return cmds.EmitChan(re, ch) + } + + re.once.Do(func() { re.preamble(value) }) + + re.l.Lock() + defer re.l.Unlock() + + if re.closed { + return cmds.ErrClosedEmitter + } + + var err error + + // return immediately if this is a head request + if re.method == "HEAD" { + return nil + } + + // ignore those + if value == nil { + return nil + } + + var isSingle bool + if single, ok := value.(cmds.Single); ok { + value = single.Value + isSingle = true + } + + if f, ok := re.w.(http.Flusher); ok { + defer f.Flush() + } + + switch v := value.(type) { + case error: + return re.closeWithError(v) + case io.Reader: + err = flushCopy(re.w, v) + default: + err = re.enc.Encode(value) + } + + if isSingle && err == nil { + // only close when there were no encoding errors + err = re.closeWithError(nil) + } + + return err +} + +func (re *responseEmitter) SetLength(l uint64) { + re.l.Lock() + defer re.l.Unlock() + + h := re.w.Header() + h.Set("X-Content-Length", strconv.FormatUint(l, 10)) + + re.length = l +} + +func (re *responseEmitter) Close() error { + return re.CloseWithError(nil) +} + +func (re *responseEmitter) CloseWithError(err error) error { + re.l.Lock() + defer re.l.Unlock() + + return re.closeWithError(err) +} + +func (re *responseEmitter) closeWithError(err error) error { + if re.closed { + return cmds.ErrClosingClosedEmitter + } + + switch err { + case nil: + // no error + case io.EOF: + // not a real error + err = nil + default: + // make sure this is *always* of type *cmdkit.Error + switch e := err.(type) { + case cmdkit.Error: + err = &e + case *cmdkit.Error: + case nil: + default: + err = &cmdkit.Error{Message: err.Error(), Code: cmdkit.ErrNormal} + } + } + + setErrTrailer := true + + // use preamble directly, we're already in critical section + // preamble needs to be before branch below, because the headers need to be written before writing the response + re.once.Do(func() { + re.doPreamble(err) + + // do not set error trailer if we send the error as value in preamble + setErrTrailer = false + }) + + if setErrTrailer && err != nil { + re.w.Header().Set(StreamErrHeader, err.Error()) + } + + re.closed = true + + return nil +} + +// Flush the http connection +func (re *responseEmitter) Flush() { + re.once.Do(func() { re.preamble(nil) }) + + if flusher, ok := re.w.(http.Flusher); ok { + flusher.Flush() + } +} + +func (re *responseEmitter) preamble(value interface{}) { + re.l.Lock() + defer re.l.Unlock() + + re.doPreamble(value) +} + +func (re *responseEmitter) sendErr(err *cmdkit.Error) { + // Handle error encoding. *Try* to obey the requested encoding, fallback + // on json. + encType := re.encType + enc, ok := cmds.Encoders[encType] + if !ok { + encType = cmds.JSON + enc = cmds.Encoders[encType] + } + + // Set the appropriate MIME Type + re.w.Header().Set(contentTypeHeader, mimeTypes[encType]) + + // Set the status from the error code. + status := http.StatusInternalServerError + if err.Code == cmdkit.ErrClient { + status = http.StatusBadRequest + } + re.w.WriteHeader(status) + + // Finally, send the errr + if err := enc(re.req)(re.w).Encode(err); err != nil { + log.Error("error sending error value after non-200 response", err) + } + + re.closed = true +} + +func (re *responseEmitter) doPreamble(value interface{}) { + var ( + h = re.w.Header() + mime string + ) + + // Common Headers + + // set 'allowed' headers + h.Set("Access-Control-Allow-Headers", AllowedExposedHeaders) + // expose those headers + h.Set("Access-Control-Expose-Headers", AllowedExposedHeaders) + + // Set up our potential trailer + h.Set("Trailer", StreamErrHeader) + + // If we have a request body, make sure we close the body + // if we want to write before completing reading. + // FIXME: https://github.com/ipfs/go-ipfs/issues/5168 + // FIXME: https://github.com/golang/go/issues/15527 + if re.bodyEOFChan != nil { + select { + case <-re.bodyEOFChan: + // all good, we received an EOF, so the body is read completely. + // we handle the error where it occurs, here we just want to know that we're done + default: + // set connection close header, because we want to write + // even though the body is not yet read completely. + h.Set("Connection", "close") + } + } + + switch v := value.(type) { + case *cmdkit.Error: + re.sendErr(v) + return + case io.Reader: + // set streams output type to text to avoid issues with browsers rendering + // html pages on priveleged api ports + h.Set(streamHeader, "1") + re.streaming = true + + mime = "text/plain" + case cmds.Single: + // don't set stream/channel header + default: + h.Set(channelHeader, "1") + } + + if mime == "" { + var ok bool + + // lookup mime type from map + mime, ok = mimeTypes[re.encType] + if !ok { + // catch-all, set to text as default + mime = "text/plain" + } + } + + h.Set(contentTypeHeader, mime) + + re.w.WriteHeader(http.StatusOK) +} + +type responseWriterer interface { + Lower() http.ResponseWriter +} + +func flushCopy(w io.Writer, r io.Reader) error { + buf := make([]byte, 4096) + f, ok := w.(http.Flusher) + if !ok { + _, err := io.Copy(w, r) + return err + } + for { + n, err := r.Read(buf) + switch err { + case io.EOF: + if n <= 0 { + return nil + } + // if data was returned alongside the EOF, pretend we didnt + // get an EOF. The next read call should also EOF. + case nil: + // continue + default: + return err + } + + nw, err := w.Write(buf[:n]) + if err != nil { + return err + } + + if nw != n { + return fmt.Errorf("http write failed to write full amount: %d != %d", nw, n) + } + + f.Flush() + } +} diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/opts.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/opts.go new file mode 100644 index 0000000000..fa5ac76ea9 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/opts.go @@ -0,0 +1,25 @@ +package cmds + +import ( + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +// Flag names +const ( + EncShort = "enc" + EncLong = "encoding" + RecShort = "r" + RecLong = "recursive" + ChanOpt = "stream-channels" + TimeoutOpt = "timeout" + OptShortHelp = "h" + OptLongHelp = "help" + DerefLong = "dereference-args" +) + +// options that are used by this package +var OptionEncodingType = cmdkit.StringOption(EncLong, EncShort, "The encoding type the output should be encoded with (json, xml, or text)").WithDefault("text") +var OptionRecursivePath = cmdkit.BoolOption(RecLong, RecShort, "Add directory paths recursively") +var OptionStreamChannels = cmdkit.BoolOption(ChanOpt, "Stream channel output") +var OptionTimeout = cmdkit.StringOption(TimeoutOpt, "Set a global timeout on the command") +var OptionDerefArgs = cmdkit.BoolOption(DerefLong, "Symlinks supplied in arguments are dereferenced") diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/package.json b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/package.json new file mode 100644 index 0000000000..df3e7b2d9e --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/package.json @@ -0,0 +1,58 @@ +{ + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-cmds" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-cmds", + "goversion": "1.7" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "rs", + "hash": "QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM", + "name": "cors", + "version": "1.6.0" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg", + "name": "go-ipfs-cmdkit", + "version": "1.2.0" + }, + { + "author": "texttheater", + "hash": "QmTVvctiHWZzSDZdyU5wdnXh7VF3kprHSyQFwVChos5qKu", + "name": "golang-levenshtein", + "version": "1.0.0" + }, + { + "author": "Kubuxu", + "hash": "QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93", + "name": "go-os-helper", + "version": "0.0.0" + }, + { + "author": "magik6k", + "hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb", + "name": "go-ipfs-files", + "version": "2.0.6" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-ipfs-cmds", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.18" +} + diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/reqlog.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/reqlog.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/reqlog.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/reqlog.go diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/request.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/request.go new file mode 100644 index 0000000000..80e9441b19 --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/request.go @@ -0,0 +1,189 @@ +package cmds + +import ( + "context" + "fmt" + "reflect" + + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +// Request represents a call to a command from a consumer +type Request struct { + Context context.Context + Root, Command *Command + + Path []string + Arguments []string + Options cmdkit.OptMap + + Files files.Directory + + bodyArgs *arguments +} + +// NewRequest returns a request initialized with given arguments +// An non-nil error will be returned if the provided option values are invalid +func NewRequest(ctx context.Context, path []string, opts cmdkit.OptMap, args []string, file files.Directory, root *Command) (*Request, error) { + if opts == nil { + opts = make(cmdkit.OptMap) + } + + cmd, err := root.Get(path) + if err != nil { + return nil, err + } + + req := &Request{ + Path: path, + Options: opts, + Arguments: args, + Files: file, + Root: root, + Command: cmd, + Context: ctx, + } + + return req, req.convertOptions(root) +} + +// BodyArgs returns a scanner that returns arguments passed in the body as tokens. +// +// Returns nil if there are no arguments to be consumed via stdin. +func (req *Request) BodyArgs() StdinArguments { + // dance to make sure we return an *untyped* nil. + // DO NOT just return `req.bodyArgs`. + // If you'd like to complain, go to + // https://github.com/golang/go/issues/. + if req.bodyArgs != nil { + return req.bodyArgs + } + return nil +} + +func (req *Request) ParseBodyArgs() error { + s := req.BodyArgs() + if s == nil { + return nil + } + + for s.Scan() { + req.Arguments = append(req.Arguments, s.Argument()) + } + return s.Err() +} + +func (req *Request) SetOption(name string, value interface{}) { + optDefs, err := req.Root.GetOptions(req.Path) + optDef, found := optDefs[name] + + if req.Options == nil { + req.Options = map[string]interface{}{} + } + + // unknown option, simply set the value and return + // TODO we might error out here instead + if err != nil || !found { + req.Options[name] = value + return + } + + name = optDef.Name() + req.Options[name] = value + + return +} + +func (req *Request) convertOptions(root *Command) error { + optDefs, err := root.GetOptions(req.Path) + if err != nil { + return err + } + + for k, v := range req.Options { + opt, ok := optDefs[k] + if !ok { + continue + } + + kind := reflect.TypeOf(v).Kind() + if kind != opt.Type() { + if str, ok := v.(string); ok { + val, err := opt.Parse(str) + if err != nil { + value := fmt.Sprintf("value %q", v) + if len(str) == 0 { + value = "empty value" + } + return fmt.Errorf("Could not convert %s to type %q (for option %q)", + value, opt.Type().String(), "-"+k) + } + req.Options[k] = val + + } else { + return fmt.Errorf("Option %q should be type %q, but got type %q", + k, opt.Type().String(), kind.String()) + } + } + + for _, name := range opt.Names() { + if _, ok := req.Options[name]; name != k && ok { + return fmt.Errorf("Duplicate command options were provided (%q and %q)", + k, name) + } + } + } + + return nil +} + +// GetEncoding returns the EncodingType set in a request, falling back to JSON +func GetEncoding(req *Request, def EncodingType) EncodingType { + switch enc := req.Options[EncLong].(type) { + case string: + return EncodingType(enc) + case EncodingType: + return enc + default: + if def == "" { + return DefaultOutputEncoding + } + return def + } +} + +// fillDefault fills in default values if option has not been set +func (req *Request) FillDefaults() error { + optDefMap, err := req.Root.GetOptions(req.Path) + if err != nil { + return err + } + + optDefs := map[cmdkit.Option]struct{}{} + + for _, optDef := range optDefMap { + optDefs[optDef] = struct{}{} + } + +Outer: + for optDef := range optDefs { + dflt := optDef.Default() + if dflt == nil { + // option has no dflt, continue + continue + } + + names := optDef.Names() + for _, name := range names { + if _, ok := req.Options[name]; ok { + // option has been set, continue with next option + continue Outer + } + } + + req.Options[optDef.Name()] = dflt + } + + return nil +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/response.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/response.go similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/response.go rename to vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/response.go diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/responseemitter.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/responseemitter.go new file mode 100644 index 0000000000..571c30226e --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/responseemitter.go @@ -0,0 +1,83 @@ +package cmds + +import ( + "errors" + "fmt" + "io" +) + +var ( + ErrClosedEmitter = errors.New("cmds: emit on closed emitter") + ErrClosingClosedEmitter = errors.New("cmds: closing closed emitter") +) + +// Single can be used to signal to any ResponseEmitter that only one value will be emitted. +// This is important e.g. for the http.ResponseEmitter so it can set the HTTP headers appropriately. +type Single struct { + Value interface{} +} + +func (s Single) String() string { + return fmt.Sprintf("Single{%v}", s.Value) +} + +func (s Single) GoString() string { + return fmt.Sprintf("Single{%#v}", s.Value) +} + +// EmitOnce is a helper that emits a value wrapped in Single, to signal that this will be the only value sent. +func EmitOnce(re ResponseEmitter, v interface{}) error { + return re.Emit(Single{v}) +} + +// ResponseEmitter encodes and sends the command code's output to the client. +// It is all a command can write to. +type ResponseEmitter interface { + // Close closes the underlying transport. + Close() error + + // CloseWithError closes the underlying transport and makes subsequent read + // calls return the passed error. + CloseWithError(error) error + + // SetLength sets the length of the output + // err is an interface{} so we don't have to manually convert to error. + SetLength(length uint64) + + // Emit sends a value. + // If value is io.Reader we just copy that to the connection + // other values are marshalled. + Emit(value interface{}) error +} + +// Copy sends all values received on res to re. If res is closed, it closes re. +func Copy(re ResponseEmitter, res Response) error { + re.SetLength(res.Length()) + + for { + v, err := res.Next() + if err != nil { + if err == io.EOF { + return re.Close() + } + + return re.CloseWithError(err) + } + + err = re.Emit(v) + if err != nil { + return err + } + } +} + +func EmitChan(re ResponseEmitter, ch <-chan interface{}) error { + for v := range ch { + err := re.Emit(v) + if err != nil { + return err + } + } + + return nil +} diff --git a/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/writer.go b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/writer.go new file mode 100644 index 0000000000..d42c8a4dcd --- /dev/null +++ b/vendor/gx/ipfs/QmQkW9fnCsg9SLHdViiAh6qfBppodsPZVpU92dZLqYtEfs/go-ipfs-cmds/writer.go @@ -0,0 +1,217 @@ +package cmds + +import ( + "encoding/json" + "errors" + "io" + "reflect" + "sync" + + "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" +) + +func NewWriterResponseEmitter(w io.WriteCloser, req *Request) (ResponseEmitter, error) { + _, valEnc, err := GetEncoder(req, w, Undefined) + if err != nil { + return nil, err + } + + re := &writerResponseEmitter{ + w: w, + c: w, + req: req, + enc: valEnc, + } + + return re, nil +} + +func NewReaderResponse(r io.Reader, req *Request) (Response, error) { + encType := GetEncoding(req, Undefined) + dec, ok := Decoders[encType] + if !ok { + return nil, cmdkit.Errorf(cmdkit.ErrClient, "unknown encoding: %s", encType) + } + return &readerResponse{ + req: req, + r: r, + encType: encType, + dec: dec(r), + emitted: make(chan struct{}), + }, nil +} + +type readerResponse struct { + r io.Reader + encType EncodingType + dec Decoder + + req *Request + + length uint64 + err error + + emitted chan struct{} + once sync.Once +} + +func (r *readerResponse) Request() *Request { + return r.req +} + +func (r *readerResponse) Error() *cmdkit.Error { + <-r.emitted + + if err, ok := r.err.(*cmdkit.Error); ok { + return err + } + + return &cmdkit.Error{Message: r.err.Error()} +} + +func (r *readerResponse) Length() uint64 { + <-r.emitted + + return r.length +} + +func (r *readerResponse) Next() (interface{}, error) { + m := &MaybeError{Value: r.req.Command.Type} + err := r.dec.Decode(m) + if err != nil { + return nil, err + } + + r.once.Do(func() { close(r.emitted) }) + + v, err := m.Get() + + // because working with pointers to arrays is annoying + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice { + v = reflect.ValueOf(v).Elem().Interface() + } + return v, err +} + +type writerResponseEmitter struct { + // TODO maybe make those public? + w io.Writer + c io.Closer + enc Encoder + req *Request + + length *uint64 + err *cmdkit.Error + + emitted bool + closed bool +} + +func (re *writerResponseEmitter) CloseWithError(err error) error { + if re.closed { + return ErrClosingClosedEmitter + } + + if err == nil || err == io.EOF { + return re.Close() + } + + cwe, ok := re.c.(interface { + CloseWithError(error) error + }) + if ok { + re.closed = true + return cwe.CloseWithError(err) + } + + return errors.New("provided closer does not support CloseWithError") +} + +func (re *writerResponseEmitter) SetLength(length uint64) { + if re.emitted { + return + } + + *re.length = length +} + +func (re *writerResponseEmitter) Close() error { + if re.closed { + return ErrClosingClosedEmitter + } + + re.closed = true + return re.c.Close() +} + +func (re *writerResponseEmitter) Emit(v interface{}) error { + // channel emission iteration + if ch, ok := v.(chan interface{}); ok { + v = (<-chan interface{})(ch) + } + if ch, isChan := v.(<-chan interface{}); isChan { + return EmitChan(re, ch) + } + + if re.closed { + return ErrClosedEmitter + } + + re.emitted = true + + var isSingle bool + if s, ok := v.(Single); ok { + v = s.Value + isSingle = true + } + + err := re.enc.Encode(v) + if err != nil { + return err + } + + if isSingle { + return re.Close() + } + + return nil +} + +type MaybeError struct { + Value interface{} // needs to be a pointer + Error *cmdkit.Error + + isError bool +} + +func (m *MaybeError) Get() (interface{}, error) { + if m.isError { + return nil, m.Error + } + return m.Value, nil +} + +func (m *MaybeError) UnmarshalJSON(data []byte) error { + var e cmdkit.Error + err := json.Unmarshal(data, &e) + if err == nil { + m.isError = true + m.Error = &e + return nil + } + + if m.Value != nil { + // make sure we are working with a pointer here + v := reflect.ValueOf(m.Value) + if v.Kind() != reflect.Ptr { + m.Value = reflect.New(v.Type()).Interface() + } + + err = json.Unmarshal(data, m.Value) + } else { + // let the json decoder decode into whatever it finds appropriate + err = json.Unmarshal(data, &m.Value) + } + + return err +} diff --git a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/LICENSE b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/LICENSE rename to vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/LICENSE diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/README.md b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/README.md similarity index 100% rename from vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/README.md rename to vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/README.md diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/file.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/file.go new file mode 100644 index 0000000000..4d7ef1132f --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/file.go @@ -0,0 +1,94 @@ +package files + +import ( + "errors" + "io" + "os" +) + +var ( + ErrNotDirectory = errors.New("file isn't a directory") + ErrNotReader = errors.New("file isn't a regular file") + + ErrNotSupported = errors.New("operation not supported") +) + +// Node is a common interface for files, directories and other special files +type Node interface { + io.Closer + + // Size returns size of this file (if this file is a directory, total size of + // all files stored in the tree should be returned). Some implementations may + // choose not to implement this + Size() (int64, error) +} + +// Node represents a regular Unix file +type File interface { + Node + + io.Reader + io.Seeker +} + +// DirEntry exposes information about a directory entry +type DirEntry interface { + // Name returns base name of this entry, which is the base name of referenced + // file + Name() string + + // Node returns the file referenced by this DirEntry + Node() Node +} + +// DirIterator is a iterator over directory entries. +// See Directory.Entries for more +type DirIterator interface { + // DirEntry holds information about current directory entry. + // Note that after creating new iterator you MUST call Next() at least once + // before accessing these methods. Calling these methods without prior calls + // to Next() and after Next() returned false may result in undefined behavior + DirEntry + + // Next advances iterator to the next file. + Next() bool + + // Err may return an error after previous call to Next() returned `false`. + // If previous call to Next() returned `true`, Err() is guaranteed to + // return nil + Err() error +} + +// Directory is a special file which can link to any number of files. +type Directory interface { + Node + + // Entries returns a stateful iterator over directory entries. + // + // Example usage: + // + // it := dir.Entries() + // for it.Next() { + // name := it.Name() + // file := it.Node() + // [...] + // } + // if it.Err() != nil { + // return err + // } + // + // Note that you can't store the result of it.Node() and use it after + // advancing the iterator + Entries() DirIterator +} + +// FileInfo exposes information on files in local filesystem +type FileInfo interface { + Node + + // AbsPath returns full real file path. + AbsPath() string + + // Stat returns os.Stat of this file, may be nil for some files + Stat() os.FileInfo +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden.go new file mode 100644 index 0000000000..4ebca6008d --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden.go @@ -0,0 +1,18 @@ +// +build !windows + +package files + +import ( + "path/filepath" + "strings" +) + +func IsHidden(name string, f Node) bool { + fName := filepath.Base(name) + + if strings.HasPrefix(fName, ".") && len(fName) > 1 { + return true + } + + return false +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden_windows.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden_windows.go new file mode 100644 index 0000000000..28a5127378 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/is_hidden_windows.go @@ -0,0 +1,35 @@ +// +build windows + +package files + +import ( + "path/filepath" + "strings" + + windows "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" +) + +func IsHidden(name string, f Node) bool { + + fName := filepath.Base(name) + + if strings.HasPrefix(fName, ".") && len(fName) > 1 { + return true + } + + fi, ok := f.(FileInfo) + if !ok { + return false + } + + p, e := windows.UTF16PtrFromString(fi.AbsPath()) + if e != nil { + return false + } + + attrs, e := windows.GetFileAttributes(p) + if e != nil { + return false + } + return attrs&windows.FILE_ATTRIBUTE_HIDDEN != 0 +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/linkfile.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/linkfile.go new file mode 100644 index 0000000000..409309bca6 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/linkfile.go @@ -0,0 +1,53 @@ +package files + +import ( + "io" + "os" + "strings" +) + +type Symlink struct { + Target string + stat os.FileInfo + + reader io.Reader +} + +func NewLinkFile(target string, stat os.FileInfo) File { + return &Symlink{ + Target: target, + stat: stat, + reader: strings.NewReader(target), + } +} + +func (lf *Symlink) Close() error { + if c, ok := lf.reader.(io.Closer); ok { + return c.Close() + } + + return nil +} + +func (lf *Symlink) Read(b []byte) (int, error) { + return lf.reader.Read(b) +} + +func (lf *Symlink) Seek(offset int64, whence int) (int64, error) { + if s, ok := lf.reader.(io.Seeker); ok { + return s.Seek(offset, whence) + } + + return 0, ErrNotSupported +} + +func (lf *Symlink) Size() (int64, error) { + return 0, ErrNotSupported +} + +func ToSymlink(n Node) *Symlink { + l, _ := n.(*Symlink) + return l +} + +var _ File = &Symlink{} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multifilereader.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multifilereader.go new file mode 100644 index 0000000000..cf3d14c735 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multifilereader.go @@ -0,0 +1,147 @@ +package files + +import ( + "bytes" + "fmt" + "io" + "mime/multipart" + "net/textproto" + "net/url" + "path" + "sync" +) + +// MultiFileReader reads from a `commands.Node` (which can be a directory of files +// or a regular file) as HTTP multipart encoded data. +type MultiFileReader struct { + io.Reader + + // directory stack for NextFile + files []DirIterator + path []string + + currentFile Node + buf bytes.Buffer + mpWriter *multipart.Writer + closed bool + mutex *sync.Mutex + + // if true, the data will be type 'multipart/form-data' + // if false, the data will be type 'multipart/mixed' + form bool +} + +// NewMultiFileReader constructs a MultiFileReader. `file` can be any `commands.Directory`. +// If `form` is set to true, the multipart data will have a Content-Type of 'multipart/form-data', +// if `form` is false, the Content-Type will be 'multipart/mixed'. +func NewMultiFileReader(file Directory, form bool) *MultiFileReader { + it := file.Entries() + + mfr := &MultiFileReader{ + files: []DirIterator{it}, + path: []string{""}, + form: form, + mutex: &sync.Mutex{}, + } + mfr.mpWriter = multipart.NewWriter(&mfr.buf) + + return mfr +} + +func (mfr *MultiFileReader) Read(buf []byte) (written int, err error) { + mfr.mutex.Lock() + defer mfr.mutex.Unlock() + + // if we are closed and the buffer is flushed, end reading + if mfr.closed && mfr.buf.Len() == 0 { + return 0, io.EOF + } + + // if the current file isn't set, advance to the next file + if mfr.currentFile == nil { + var entry DirEntry + + for entry == nil { + if len(mfr.files) == 0 { + mfr.mpWriter.Close() + mfr.closed = true + return mfr.buf.Read(buf) + } + + if !mfr.files[len(mfr.files)-1].Next() { + if mfr.files[len(mfr.files)-1].Err() != nil { + return 0, mfr.files[len(mfr.files)-1].Err() + } + mfr.files = mfr.files[:len(mfr.files)-1] + mfr.path = mfr.path[:len(mfr.path)-1] + continue + } + + entry = mfr.files[len(mfr.files)-1] + } + + // handle starting a new file part + if !mfr.closed { + + mfr.currentFile = entry.Node() + + // write the boundary and headers + header := make(textproto.MIMEHeader) + filename := url.QueryEscape(path.Join(path.Join(mfr.path...), entry.Name())) + header.Set("Content-Disposition", fmt.Sprintf("file; filename=\"%s\"", filename)) + + var contentType string + + switch f := entry.Node().(type) { + case *Symlink: + contentType = "application/symlink" + case Directory: + newIt := f.Entries() + mfr.files = append(mfr.files, newIt) + mfr.path = append(mfr.path, entry.Name()) + contentType = "application/x-directory" + case File: + // otherwise, use the file as a reader to read its contents + contentType = "application/octet-stream" + default: + return 0, ErrNotSupported + } + + header.Set("Content-Type", contentType) + if rf, ok := entry.Node().(FileInfo); ok { + header.Set("abspath", rf.AbsPath()) + } + + _, err := mfr.mpWriter.CreatePart(header) + if err != nil { + return 0, err + } + } + } + + // if the buffer has something in it, read from it + if mfr.buf.Len() > 0 { + return mfr.buf.Read(buf) + } + + // otherwise, read from file data + switch f := mfr.currentFile.(type) { + case File: + written, err = f.Read(buf) + if err != io.EOF { + return written, err + } + } + + if err := mfr.currentFile.Close(); err != nil { + return written, err + } + + mfr.currentFile = nil + return written, nil +} + +// Boundary returns the boundary string to be used to separate files in the multipart data +func (mfr *MultiFileReader) Boundary() string { + return mfr.mpWriter.Boundary() +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multipartfile.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multipartfile.go new file mode 100644 index 0000000000..17681653f4 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/multipartfile.go @@ -0,0 +1,236 @@ +package files + +import ( + "io" + "io/ioutil" + "mime" + "mime/multipart" + "net/url" + "path" + "strings" +) + +const ( + multipartFormdataType = "multipart/form-data" + multipartMixedType = "multipart/mixed" + + applicationDirectory = "application/x-directory" + applicationSymlink = "application/symlink" + applicationFile = "application/octet-stream" + + contentTypeHeader = "Content-Type" +) + +type multipartDirectory struct { + path string + walker *multipartWalker + + // part is the part describing the directory. It's nil when implicit. + part *multipart.Part +} + +type multipartWalker struct { + part *multipart.Part + reader *multipart.Reader +} + +func (m *multipartWalker) consumePart() { + m.part = nil +} + +func (m *multipartWalker) getPart() (*multipart.Part, error) { + if m.part != nil { + return m.part, nil + } + if m.reader == nil { + return nil, io.EOF + } + + var err error + m.part, err = m.reader.NextPart() + if err == io.EOF { + m.reader = nil + } + return m.part, err +} + +func NewFileFromPartReader(reader *multipart.Reader, mediatype string) (Directory, error) { + if !isDirectory(mediatype) { + return nil, ErrNotDirectory + } + + return &multipartDirectory{ + path: "/", + walker: &multipartWalker{ + reader: reader, + }, + }, nil +} + +func (w *multipartWalker) nextFile() (Node, error) { + part, err := w.getPart() + if err != nil { + return nil, err + } + w.consumePart() + + contentType := part.Header.Get(contentTypeHeader) + switch contentType { + case applicationSymlink: + out, err := ioutil.ReadAll(part) + if err != nil { + return nil, err + } + + return NewLinkFile(string(out), nil), nil + case "": // default to application/octet-stream + fallthrough + case applicationFile: + return &ReaderFile{ + reader: part, + abspath: part.Header.Get("abspath"), + }, nil + } + + mediatype, _, err := mime.ParseMediaType(contentType) + if err != nil { + return nil, err + } + + if !isDirectory(mediatype) { + return &ReaderFile{ + reader: part, + abspath: part.Header.Get("abspath"), + }, nil + } + + return &multipartDirectory{ + part: part, + path: fileName(part), + walker: w, + }, nil +} + +// fileName returns a normalized filename from a part. +func fileName(part *multipart.Part) string { + filename := part.FileName() + if escaped, err := url.QueryUnescape(filename); err == nil { + filename = escaped + } // if there is a unescape error, just treat the name as unescaped + + return path.Clean("/" + filename) +} + +// dirName appends a slash to the end of the filename, if not present. +// expects a _cleaned_ path. +func dirName(filename string) string { + if !strings.HasSuffix(filename, "/") { + filename += "/" + } + return filename +} + +// isDirectory checks if the media type is a valid directory media type. +func isDirectory(mediatype string) bool { + return mediatype == multipartFormdataType || mediatype == applicationDirectory +} + +// isChild checks if child is a child of parent directory. +// expects a _cleaned_ path. +func isChild(child, parent string) bool { + return strings.HasPrefix(child, dirName(parent)) +} + +// makeRelative makes the child path relative to the parent path. +// expects a _cleaned_ path. +func makeRelative(child, parent string) string { + return strings.TrimPrefix(child, dirName(parent)) +} + +type multipartIterator struct { + f *multipartDirectory + + curFile Node + curName string + err error +} + +func (it *multipartIterator) Name() string { + return it.curName +} + +func (it *multipartIterator) Node() Node { + return it.curFile +} + +func (it *multipartIterator) Next() bool { + if it.f.walker.reader == nil || it.err != nil { + return false + } + var part *multipart.Part + for { + part, it.err = it.f.walker.getPart() + if it.err != nil { + return false + } + + name := fileName(part) + + // Is the file in a different directory? + if !isChild(name, it.f.path) { + return false + } + + // Have we already entered this directory? + if it.curName != "" && isChild(name, path.Join(it.f.path, it.curName)) { + it.f.walker.consumePart() + continue + } + + // Make the path relative to the current directory. + name = makeRelative(name, it.f.path) + + // Check if we need to create a fake directory (more than one + // path component). + if idx := strings.IndexByte(name, '/'); idx >= 0 { + it.curName = name[:idx] + it.curFile = &multipartDirectory{ + path: path.Join(it.f.path, it.curName), + walker: it.f.walker, + } + return true + } + it.curName = name + + // Finally, advance to the next file. + it.curFile, it.err = it.f.walker.nextFile() + + return it.err == nil + } +} + +func (it *multipartIterator) Err() error { + // We use EOF to signal that this iterator is done. That way, we don't + // need to check every time `Next` is called. + if it.err == io.EOF { + return nil + } + return it.err +} + +func (f *multipartDirectory) Entries() DirIterator { + return &multipartIterator{f: f} +} + +func (f *multipartDirectory) Close() error { + if f.part != nil { + return f.part.Close() + } + return nil +} + +func (f *multipartDirectory) Size() (int64, error) { + return 0, ErrNotSupported +} + +var _ Directory = &multipartDirectory{} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/package.json b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/package.json new file mode 100644 index 0000000000..07fdc7a654 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/package.json @@ -0,0 +1,24 @@ +{ + "author": "magik6k", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-files" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-files" + }, + "gxDependencies": [ + { + "author": "The Go Authors", + "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", + "name": "sys", + "version": "0.2.0" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "", + "name": "go-ipfs-files", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.6" +} + diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/readerfile.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/readerfile.go new file mode 100644 index 0000000000..f98fec4814 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/readerfile.go @@ -0,0 +1,82 @@ +package files + +import ( + "bytes" + "io" + "io/ioutil" + "os" + "path/filepath" +) + +// ReaderFile is a implementation of File created from an `io.Reader`. +// ReaderFiles are never directories, and can be read from and closed. +type ReaderFile struct { + abspath string + reader io.ReadCloser + stat os.FileInfo + + fsize int64 +} + +func NewBytesFile(b []byte) File { + return &ReaderFile{"", NewReaderFile(bytes.NewReader(b)), nil, int64(len(b))} +} + +func NewReaderFile(reader io.Reader) File { + return NewReaderStatFile(reader, nil) +} + +func NewReaderStatFile(reader io.Reader, stat os.FileInfo) File { + rc, ok := reader.(io.ReadCloser) + if !ok { + rc = ioutil.NopCloser(reader) + } + + return &ReaderFile{"", rc, stat, -1} +} + +func NewReaderPathFile(path string, reader io.ReadCloser, stat os.FileInfo) (*ReaderFile, error) { + abspath, err := filepath.Abs(path) + if err != nil { + return nil, err + } + + return &ReaderFile{abspath, reader, stat, -1}, nil +} + +func (f *ReaderFile) AbsPath() string { + return f.abspath +} + +func (f *ReaderFile) Read(p []byte) (int, error) { + return f.reader.Read(p) +} + +func (f *ReaderFile) Close() error { + return f.reader.Close() +} + +func (f *ReaderFile) Stat() os.FileInfo { + return f.stat +} + +func (f *ReaderFile) Size() (int64, error) { + if f.stat == nil { + if f.fsize >= 0 { + return f.fsize, nil + } + return 0, ErrNotSupported + } + return f.stat.Size(), nil +} + +func (f *ReaderFile) Seek(offset int64, whence int) (int64, error) { + if s, ok := f.reader.(io.Seeker); ok { + return s.Seek(offset, whence) + } + + return 0, ErrNotSupported +} + +var _ File = &ReaderFile{} +var _ FileInfo = &ReaderFile{} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/serialfile.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/serialfile.go new file mode 100644 index 0000000000..e29752d662 --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/serialfile.go @@ -0,0 +1,178 @@ +package files + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" +) + +// serialFile implements Node, and reads from a path on the OS filesystem. +// No more than one file will be opened at a time (directories will advance +// to the next file when NextFile() is called). +type serialFile struct { + path string + files []os.FileInfo + stat os.FileInfo + handleHiddenFiles bool +} + +type serialIterator struct { + files []os.FileInfo + handleHiddenFiles bool + path string + + curName string + curFile Node + + err error +} + +// TODO: test/document limitations +func NewSerialFile(path string, hidden bool, stat os.FileInfo) (Node, error) { + switch mode := stat.Mode(); { + case mode.IsRegular(): + file, err := os.Open(path) + if err != nil { + return nil, err + } + return NewReaderPathFile(path, file, stat) + case mode.IsDir(): + // for directories, stat all of the contents first, so we know what files to + // open when NextFile() is called + contents, err := ioutil.ReadDir(path) + if err != nil { + return nil, err + } + return &serialFile{path, contents, stat, hidden}, nil + case mode&os.ModeSymlink != 0: + target, err := os.Readlink(path) + if err != nil { + return nil, err + } + return NewLinkFile(target, stat), nil + default: + return nil, fmt.Errorf("unrecognized file type for %s: %s", path, mode.String()) + } +} + +func (it *serialIterator) Name() string { + return it.curName +} + +func (it *serialIterator) Node() Node { + return it.curFile +} + +func (it *serialIterator) Next() bool { + // if there aren't any files left in the root directory, we're done + if len(it.files) == 0 { + return false + } + + stat := it.files[0] + it.files = it.files[1:] + for !it.handleHiddenFiles && strings.HasPrefix(stat.Name(), ".") { + if len(it.files) == 0 { + return false + } + + stat = it.files[0] + it.files = it.files[1:] + } + + // open the next file + filePath := filepath.ToSlash(filepath.Join(it.path, stat.Name())) + + // recursively call the constructor on the next file + // if it's a regular file, we will open it as a ReaderFile + // if it's a directory, files in it will be opened serially + sf, err := NewSerialFile(filePath, it.handleHiddenFiles, stat) + if err != nil { + it.err = err + return false + } + + it.curName = stat.Name() + it.curFile = sf + return true +} + +func (it *serialIterator) Err() error { + return it.err +} + +func (f *serialFile) Entries() DirIterator { + return &serialIterator{ + path: f.path, + files: f.files, + handleHiddenFiles: f.handleHiddenFiles, + } +} + +func (f *serialFile) NextFile() (string, Node, error) { + // if there aren't any files left in the root directory, we're done + if len(f.files) == 0 { + return "", nil, io.EOF + } + + stat := f.files[0] + f.files = f.files[1:] + + for !f.handleHiddenFiles && strings.HasPrefix(stat.Name(), ".") { + if len(f.files) == 0 { + return "", nil, io.EOF + } + + stat = f.files[0] + f.files = f.files[1:] + } + + // open the next file + filePath := filepath.ToSlash(filepath.Join(f.path, stat.Name())) + + // recursively call the constructor on the next file + // if it's a regular file, we will open it as a ReaderFile + // if it's a directory, files in it will be opened serially + sf, err := NewSerialFile(filePath, f.handleHiddenFiles, stat) + if err != nil { + return "", nil, err + } + + return stat.Name(), sf, nil +} + +func (f *serialFile) Close() error { + return nil +} + +func (f *serialFile) Stat() os.FileInfo { + return f.stat +} + +func (f *serialFile) Size() (int64, error) { + if !f.stat.IsDir() { + //something went terribly, terribly wrong + return 0, errors.New("serialFile is not a directory") + } + + var du int64 + err := filepath.Walk(f.path, func(p string, fi os.FileInfo, err error) error { + if err != nil { + return err + } + + if fi != nil && fi.Mode().IsRegular() { + du += fi.Size() + } + return nil + }) + + return du, err +} + +var _ Directory = &serialFile{} +var _ DirIterator = &serialIterator{} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/slicedirectory.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/slicedirectory.go new file mode 100644 index 0000000000..d11656261d --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/slicedirectory.go @@ -0,0 +1,97 @@ +package files + +import "sort" + +type fileEntry struct { + name string + file Node +} + +func (e fileEntry) Name() string { + return e.name +} + +func (e fileEntry) Node() Node { + return e.file +} + +func FileEntry(name string, file Node) DirEntry { + return fileEntry{ + name: name, + file: file, + } +} + +type sliceIterator struct { + files []DirEntry + n int +} + +func (it *sliceIterator) Name() string { + return it.files[it.n].Name() +} + +func (it *sliceIterator) Node() Node { + return it.files[it.n].Node() +} + +func (it *sliceIterator) Next() bool { + it.n++ + return it.n < len(it.files) +} + +func (it *sliceIterator) Err() error { + return nil +} + +// SliceFile implements Node, and provides simple directory handling. +// It contains children files, and is created from a `[]Node`. +// SliceFiles are always directories, and can't be read from or closed. +type SliceFile struct { + files []DirEntry +} + +func NewMapDirectory(f map[string]Node) Directory { + ents := make([]DirEntry, 0, len(f)) + for name, nd := range f { + ents = append(ents, FileEntry(name, nd)) + } + sort.Slice(ents, func(i, j int) bool { + return ents[i].Name() < ents[j].Name() + }) + + return NewSliceDirectory(ents) +} + +func NewSliceDirectory(files []DirEntry) Directory { + return &SliceFile{files} +} + +func (f *SliceFile) Entries() DirIterator { + return &sliceIterator{files: f.files, n: -1} +} + +func (f *SliceFile) Close() error { + return nil +} + +func (f *SliceFile) Length() int { + return len(f.files) +} + +func (f *SliceFile) Size() (int64, error) { + var size int64 + + for _, file := range f.files { + s, err := file.Node().Size() + if err != nil { + return 0, err + } + size += s + } + + return size, nil +} + +var _ Directory = &SliceFile{} +var _ DirEntry = fileEntry{} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/tarwriter.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/tarwriter.go new file mode 100644 index 0000000000..6d062726af --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/tarwriter.go @@ -0,0 +1,100 @@ +package files + +import ( + "archive/tar" + "fmt" + "io" + "path" + "time" +) + +type TarWriter struct { + TarW *tar.Writer +} + +// NewTarWriter wraps given io.Writer into a new tar writer +func NewTarWriter(w io.Writer) (*TarWriter, error) { + return &TarWriter{ + TarW: tar.NewWriter(w), + }, nil +} + +func (w *TarWriter) writeDir(f Directory, fpath string) error { + if err := writeDirHeader(w.TarW, fpath); err != nil { + return err + } + + it := f.Entries() + for it.Next() { + if err := w.WriteFile(it.Node(), path.Join(fpath, it.Name())); err != nil { + return err + } + } + return it.Err() +} + +func (w *TarWriter) writeFile(f File, fpath string) error { + size, err := f.Size() + if err != nil { + return err + } + + if err := writeFileHeader(w.TarW, fpath, uint64(size)); err != nil { + return err + } + + if _, err := io.Copy(w.TarW, f); err != nil { + return err + } + w.TarW.Flush() + return nil +} + +// WriteNode adds a node to the archive. +func (w *TarWriter) WriteFile(nd Node, fpath string) error { + switch nd := nd.(type) { + case *Symlink: + return writeSymlinkHeader(w.TarW, nd.Target, fpath) + case File: + return w.writeFile(nd, fpath) + case Directory: + return w.writeDir(nd, fpath) + default: + return fmt.Errorf("file type %T is not supported", nd) + } +} + +// Close closes the tar writer. +func (w *TarWriter) Close() error { + return w.TarW.Close() +} + +func writeDirHeader(w *tar.Writer, fpath string) error { + return w.WriteHeader(&tar.Header{ + Name: fpath, + Typeflag: tar.TypeDir, + Mode: 0777, + ModTime: time.Now(), + // TODO: set mode, dates, etc. when added to unixFS + }) +} + +func writeFileHeader(w *tar.Writer, fpath string, size uint64) error { + return w.WriteHeader(&tar.Header{ + Name: fpath, + Size: int64(size), + Typeflag: tar.TypeReg, + Mode: 0644, + ModTime: time.Now(), + // TODO: set mode, dates, etc. when added to unixFS + }) +} + +func writeSymlinkHeader(w *tar.Writer, target, fpath string) error { + return w.WriteHeader(&tar.Header{ + Name: fpath, + Linkname: target, + Mode: 0777, + Typeflag: tar.TypeSymlink, + }) +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/util.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/util.go new file mode 100644 index 0000000000..e727e7ae6e --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/util.go @@ -0,0 +1,25 @@ +package files + +// ToFile is an alias for n.(File). If the file isn't a regular file, nil value +// will be returned +func ToFile(n Node) File { + f, _ := n.(File) + return f +} + +// ToDir is an alias for n.(Directory). If the file isn't directory, a nil value +// will be returned +func ToDir(n Node) Directory { + d, _ := n.(Directory) + return d +} + +// FileFromEntry calls ToFile on Node in the given entry +func FileFromEntry(e DirEntry) File { + return ToFile(e.Node()) +} + +// DirFromEntry calls ToDir on Node in the given entry +func DirFromEntry(e DirEntry) Directory { + return ToDir(e.Node()) +} diff --git a/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/webfile.go b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/webfile.go new file mode 100644 index 0000000000..dbc813bd6e --- /dev/null +++ b/vendor/gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files/webfile.go @@ -0,0 +1,64 @@ +package files + +import ( + "errors" + "io" + "net/http" + "net/url" +) + +// WebFile is an implementation of File which reads it +// from a Web URL (http). A GET request will be performed +// against the source when calling Read(). +type WebFile struct { + body io.ReadCloser + url *url.URL + contentLength int64 +} + +// NewWebFile creates a WebFile with the given URL, which +// will be used to perform the GET request on Read(). +func NewWebFile(url *url.URL) *WebFile { + return &WebFile{ + url: url, + } +} + +// Read reads the File from it's web location. On the first +// call to Read, a GET request will be performed against the +// WebFile's URL, using Go's default HTTP client. Any further +// reads will keep reading from the HTTP Request body. +func (wf *WebFile) Read(b []byte) (int, error) { + if wf.body == nil { + resp, err := http.Get(wf.url.String()) + if err != nil { + return 0, err + } + wf.body = resp.Body + wf.contentLength = resp.ContentLength + } + return wf.body.Read(b) +} + +// Close closes the WebFile (or the request body). +func (wf *WebFile) Close() error { + if wf.body == nil { + return nil + } + return wf.body.Close() +} + +// TODO: implement +func (wf *WebFile) Seek(offset int64, whence int) (int64, error) { + return 0, ErrNotSupported +} + +func (wf *WebFile) Size() (int64, error) { + if wf.contentLength < 0 { + return -1, errors.New("Content-Length hearer was not set") + } + + return wf.contentLength, nil +} + +var _ File = &WebFile{} diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/.travis.yml b/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/.travis.yml deleted file mode 100644 index e83dc84947..0000000000 --- a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go -go: -- tip -install: -- go get golang.org/x/tools/cmd/cover -- go get github.com/mattn/goveralls -- make all -script: -- make test - diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/Makefile b/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/Makefile deleted file mode 100644 index 24d71558e7..0000000000 --- a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -all: deps -gx: - go get github.com/whyrusleeping/gx - go get github.com/whyrusleeping/gx-go -deps: gx - gx --verbose install --global - gx-go rewrite -test: deps - go test -v -covermode count -coverprofile=coverage.out . -rw: - gx-go rewrite -rwundo: - gx-go rewrite --undo -publish: rwundo - gx publish -.PHONY: all gx deps test rw rwundo publish - - diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/README.md b/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/README.md deleted file mode 100644 index bd509c17e0..0000000000 --- a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# go-ipfs-posinfo - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/ipfs/go-ipfs-posinfo?status.svg)](https://godoc.org/github.com/ipfs/go-ipfs-posinfo) -[![Build Status](https://travis-ci.org/ipfs/go-ipfs-posinfo.svg?branch=master)](https://travis-ci.org/ipfs/go-ipfs-posinfo) - -> Posinfo wraps offset information for ipfs filestore nodes - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contribute](#contribute) -- [License](#license) - -## Install - -``` -go get github.com/ipfs/go-ipfs-posinfo -``` - -## Usage - -See the [GoDoc documentation](https://godoc.org/github.com/ipfs/go-ipfs-posinfo) - - -## Contribute - -PRs accepted. - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -MIT © Protocol Labs, Inc. diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/package.json b/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/package.json deleted file mode 100644 index 3d7cfca1f5..0000000000 --- a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "hector", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-posinfo" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-posinfo" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-posinfo", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.2" -} - diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/posinfo.go b/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/posinfo.go deleted file mode 100644 index 4003f47e3d..0000000000 --- a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/posinfo.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package posinfo wraps offset information used by ipfs filestore nodes -package posinfo - -import ( - "os" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// PosInfo stores information about the file offset, its path and -// stat. -type PosInfo struct { - Offset uint64 - FullPath string - Stat os.FileInfo // can be nil -} - -// FilestoreNode is an ipld.Node which arries PosInfo with it -// allowing to map it directly to a filesystem object. -type FilestoreNode struct { - ipld.Node - PosInfo *PosInfo -} diff --git a/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/.travis.yml b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/.travis.yml new file mode 100644 index 0000000000..6391a51157 --- /dev/null +++ b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + - osx + +language: go +sudo: false + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/LICENSE b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/LICENSE rename to vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/LICENSE diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/Makefile b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/Makefile similarity index 100% rename from vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/Makefile rename to vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/Makefile diff --git a/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/README.md b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/README.md new file mode 100644 index 0000000000..6a212fb1b5 --- /dev/null +++ b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/README.md @@ -0,0 +1,10 @@ +go-libp2p-netutil +================== + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) +[![codecov](https://codecov.io/gh/libp2p/go-libp2p-netutil/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-netutil) +[![Travis CI](https://travis-ci.org/libp2p/go-libp2p-netutil.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-netutil) + +> Utility methods for creating public and private keys for use in tests. \ No newline at end of file diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/codecov.yml b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/codecov.yml rename to vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/codecov.yml diff --git a/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/key.go b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/key.go new file mode 100644 index 0000000000..94de61bbfd --- /dev/null +++ b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/key.go @@ -0,0 +1,178 @@ +package testutil + +import ( + "bytes" + "crypto/rand" + "io" + "testing" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + testutil "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" +) + +var log = logging.Logger("boguskey") + +// TestBogusPrivateKey is a key used for testing (to avoid expensive keygen) +type TestBogusPrivateKey []byte + +// TestBogusPublicKey is a key used for testing (to avoid expensive keygen) +type TestBogusPublicKey []byte + +func (pk TestBogusPublicKey) Verify(data, sig []byte) (bool, error) { + log.Errorf("TestBogusPublicKey.Verify -- this better be a test!") + return bytes.Equal(data, reverse(sig)), nil +} + +func (pk TestBogusPublicKey) Bytes() ([]byte, error) { + return []byte(pk), nil +} + +func (pk TestBogusPublicKey) Encrypt(b []byte) ([]byte, error) { + log.Errorf("TestBogusPublicKey.Encrypt -- this better be a test!") + return reverse(b), nil +} + +// Equals checks whether this key is equal to another +func (pk TestBogusPublicKey) Equals(k ic.Key) bool { + return ic.KeyEqual(pk, k) +} + +// Raw returns the raw bytes of the key (not wrapped in the +// libp2p-crypto protobuf). +func (pk TestBogusPublicKey) Raw() ([]byte, error) { + return pk, nil +} + +// Type returns the protobof key type. +func (pk TestBogusPublicKey) Type() pb.KeyType { + return pb.KeyType_RSA +} + +func (sk TestBogusPrivateKey) GenSecret() []byte { + return []byte(sk) +} + +func (sk TestBogusPrivateKey) Sign(message []byte) ([]byte, error) { + log.Errorf("TestBogusPrivateKey.Sign -- this better be a test!") + return reverse(message), nil +} + +func (sk TestBogusPrivateKey) GetPublic() ic.PubKey { + return TestBogusPublicKey(sk) +} + +func (sk TestBogusPrivateKey) Decrypt(b []byte) ([]byte, error) { + log.Errorf("TestBogusPrivateKey.Decrypt -- this better be a test!") + return reverse(b), nil +} + +func (sk TestBogusPrivateKey) Bytes() ([]byte, error) { + return []byte(sk), nil +} + +// Equals checks whether this key is equal to another +func (sk TestBogusPrivateKey) Equals(k ic.Key) bool { + return ic.KeyEqual(sk, k) +} + +// Raw returns the raw bytes of the key (not wrapped in the +// libp2p-crypto protobuf). +func (sk TestBogusPrivateKey) Raw() ([]byte, error) { + return sk, nil +} + +// Type returns the protobof key type. +func (pk TestBogusPrivateKey) Type() pb.KeyType { + return pb.KeyType_RSA +} + +func RandTestBogusPrivateKey() (TestBogusPrivateKey, error) { + k := make([]byte, 5) + if _, err := io.ReadFull(rand.Reader, k); err != nil { + return nil, err + } + return TestBogusPrivateKey(k), nil +} + +func RandTestBogusPublicKey() (TestBogusPublicKey, error) { + k, err := RandTestBogusPrivateKey() + return TestBogusPublicKey(k), err +} + +func RandTestBogusPrivateKeyOrFatal(t *testing.T) TestBogusPrivateKey { + k, err := RandTestBogusPrivateKey() + if err != nil { + t.Fatal(err) + } + return k +} + +func RandTestBogusPublicKeyOrFatal(t *testing.T) TestBogusPublicKey { + k, err := RandTestBogusPublicKey() + if err != nil { + t.Fatal(err) + } + return k +} + +func RandTestBogusIdentity() (testutil.Identity, error) { + k, err := RandTestBogusPrivateKey() + if err != nil { + return nil, err + } + + id, err := peer.IDFromPrivateKey(k) + if err != nil { + return nil, err + } + + return &identity{ + k: k, + id: id, + a: testutil.RandLocalTCPAddress(), + }, nil +} + +func RandTestBogusIdentityOrFatal(t *testing.T) testutil.Identity { + k, err := RandTestBogusIdentity() + if err != nil { + t.Fatal(err) + } + return k +} + +// identity is a temporary shim to delay binding of PeerNetParams. +type identity struct { + k TestBogusPrivateKey + id peer.ID + a ma.Multiaddr +} + +func (p *identity) ID() peer.ID { + return p.id +} + +func (p *identity) Address() ma.Multiaddr { + return p.a +} + +func (p *identity) PrivateKey() ic.PrivKey { + return p.k +} + +func (p *identity) PublicKey() ic.PubKey { + return p.k.GetPublic() +} + +func reverse(a []byte) []byte { + b := make([]byte, len(a)) + for i := 0; i < len(a); i++ { + b[i] = a[len(a)-1-i] + } + return b +} diff --git a/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/package.json b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/package.json new file mode 100644 index 0000000000..de55ff649c --- /dev/null +++ b/vendor/gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil/package.json @@ -0,0 +1,53 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-netutil" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-netutil" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "", + "name": "go-libp2p-netutil", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.4.23" +} + diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/interface.go b/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/interface.go deleted file mode 100644 index c04970c981..0000000000 --- a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/interface.go +++ /dev/null @@ -1,37 +0,0 @@ -// Package exchange defines the IPFS exchange interface -package exchange - -import ( - "context" - "io" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" -) - -// Interface defines the functionality of the IPFS block exchange protocol. -type Interface interface { // type Exchanger interface - Fetcher - - // TODO Should callers be concerned with whether the block was made - // available on the network? - HasBlock(blocks.Block) error - - IsOnline() bool - - io.Closer -} - -// Fetcher is an object that can be used to retrieve blocks -type Fetcher interface { - // GetBlock returns the block associated with a given key. - GetBlock(context.Context, cid.Cid) (blocks.Block, error) - GetBlocks(context.Context, []cid.Cid) (<-chan blocks.Block, error) -} - -// SessionExchange is an exchange.Interface which supports -// sessions. -type SessionExchange interface { - Interface - NewSession(context.Context) Interface -} diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/package.json b/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/package.json deleted file mode 100644 index 7ffb9f577f..0000000000 --- a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-exchange-interface" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-exchange-interface" - }, - "gxDependencies": [ - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-exchange-interface", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.0" -} - diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/batch.go b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/batch.go deleted file mode 100644 index 5c4f796068..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/batch.go +++ /dev/null @@ -1,295 +0,0 @@ -package format - -import ( - "context" - "errors" - "runtime" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -// ParallelBatchCommits is the number of batch commits that can be in-flight before blocking. -// TODO(ipfs/go-ipfs#4299): Experiment with multiple datastores, storage -// devices, and CPUs to find the right value/formula. -var ParallelBatchCommits = runtime.NumCPU() * 2 - -// ErrNotCommited is returned when closing a batch that hasn't been successfully -// committed. -var ErrNotCommited = errors.New("error: batch not commited") - -// ErrClosed is returned when operating on a batch that has already been closed. -var ErrClosed = errors.New("error: batch closed") - -// NewBatch returns a node buffer (Batch) that buffers nodes internally and -// commits them to the underlying DAGService in batches. Use this if you intend -// to add or remove a lot of nodes all at once. -// -// If the passed context is canceled, any in-progress commits are aborted. -// -func NewBatch(ctx context.Context, na NodeAdder, opts ...BatchOption) *Batch { - ctx, cancel := context.WithCancel(ctx) - bopts := defaultBatchOptions - for _, o := range opts { - o(&bopts) - } - return &Batch{ - na: na, - ctx: ctx, - cancel: cancel, - commitResults: make(chan error, ParallelBatchCommits), - opts: bopts, - } -} - -// Batch is a buffer for batching adds to a dag. -type Batch struct { - na NodeAdder - - ctx context.Context - cancel func() - - activeCommits int - err error - commitResults chan error - - nodes []Node - size int - - opts batchOptions -} - -func (t *Batch) processResults() { - for t.activeCommits > 0 { - select { - case err := <-t.commitResults: - t.activeCommits-- - if err != nil { - t.setError(err) - return - } - default: - return - } - } -} - -func (t *Batch) asyncCommit() { - numBlocks := len(t.nodes) - if numBlocks == 0 { - return - } - if t.activeCommits >= ParallelBatchCommits { - select { - case err := <-t.commitResults: - t.activeCommits-- - - if err != nil { - t.setError(err) - return - } - case <-t.ctx.Done(): - t.setError(t.ctx.Err()) - return - } - } - go func(ctx context.Context, b []Node, result chan error, na NodeAdder) { - select { - case result <- na.AddMany(ctx, b): - case <-ctx.Done(): - } - }(t.ctx, t.nodes, t.commitResults, t.na) - - t.activeCommits++ - t.nodes = make([]Node, 0, numBlocks) - t.size = 0 - - return -} - -// Add adds a node to the batch and commits the batch if necessary. -func (t *Batch) Add(ctx context.Context, nd Node) error { - return t.AddMany(ctx, []Node{nd}) -} - -// AddMany many calls Add for every given Node, thus batching and -// commiting them as needed. -func (t *Batch) AddMany(ctx context.Context, nodes []Node) error { - if t.err != nil { - return t.err - } - // Not strictly necessary but allows us to catch errors early. - t.processResults() - - if t.err != nil { - return t.err - } - - t.nodes = append(t.nodes, nodes...) - for _, nd := range nodes { - t.size += len(nd.RawData()) - } - - if t.size > t.opts.maxSize || len(t.nodes) > t.opts.maxNodes { - t.asyncCommit() - } - return t.err -} - -// Commit commits batched nodes. -func (t *Batch) Commit() error { - if t.err != nil { - return t.err - } - - t.asyncCommit() - -loop: - for t.activeCommits > 0 { - select { - case err := <-t.commitResults: - t.activeCommits-- - if err != nil { - t.setError(err) - break loop - } - case <-t.ctx.Done(): - t.setError(t.ctx.Err()) - break loop - } - } - - return t.err -} - -func (t *Batch) setError(err error) { - t.err = err - - t.cancel() - - // Drain as much as we can without blocking. -loop: - for { - select { - case <-t.commitResults: - default: - break loop - } - } - - // Be nice and cleanup. These can take a *lot* of memory. - t.commitResults = nil - t.na = nil - t.ctx = nil - t.nodes = nil - t.size = 0 - t.activeCommits = 0 -} - -// BatchOption provides a way of setting internal options of -// a Batch. -// -// See this post about the "functional options" pattern: -// http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis -type BatchOption func(o *batchOptions) - -type batchOptions struct { - maxSize int - maxNodes int -} - -var defaultBatchOptions = batchOptions{ - maxSize: 8 << 20, - - // By default, only batch up to 128 nodes at a time. - // The current implementation of flatfs opens this many file - // descriptors at the same time for the optimized batch write. - maxNodes: 128, -} - -// MaxSizeBatchOption sets the maximum size of a Batch. -func MaxSizeBatchOption(size int) BatchOption { - return func(o *batchOptions) { - o.maxSize = size - } -} - -// MaxNodesBatchOption sets the maximum number of nodes in a Batch. -func MaxNodesBatchOption(num int) BatchOption { - return func(o *batchOptions) { - o.maxNodes = num - } -} - -// BufferedDAG implements DAGService using a Batch NodeAdder to wrap add -// operations in the given DAGService. It will trigger Commit() before any -// non-Add operations, but otherwise calling Commit() is left to the user. -type BufferedDAG struct { - ds DAGService - b *Batch -} - -// NewBufferedDAG creates a BufferedDAG using the given DAGService and the -// given options for the Batch NodeAdder. -func NewBufferedDAG(ctx context.Context, ds DAGService, opts ...BatchOption) *BufferedDAG { - return &BufferedDAG{ - ds: ds, - b: NewBatch(ctx, ds, opts...), - } -} - -// Commit calls commit on the Batch. -func (bd *BufferedDAG) Commit() error { - return bd.b.Commit() -} - -// Add adds a new node using Batch. -func (bd *BufferedDAG) Add(ctx context.Context, n Node) error { - return bd.b.Add(ctx, n) -} - -// AddMany adds many nodes using Batch. -func (bd *BufferedDAG) AddMany(ctx context.Context, nds []Node) error { - return bd.b.AddMany(ctx, nds) -} - -// Get commits and gets a node from the DAGService. -func (bd *BufferedDAG) Get(ctx context.Context, c cid.Cid) (Node, error) { - err := bd.b.Commit() - if err != nil { - return nil, err - } - return bd.ds.Get(ctx, c) -} - -// GetMany commits and gets nodes from the DAGService. -func (bd *BufferedDAG) GetMany(ctx context.Context, cs []cid.Cid) <-chan *NodeOption { - err := bd.b.Commit() - if err != nil { - ch := make(chan *NodeOption, 1) - defer close(ch) - ch <- &NodeOption{ - Node: nil, - Err: err, - } - return ch - } - return bd.ds.GetMany(ctx, cs) -} - -// Remove commits and removes a node from the DAGService. -func (bd *BufferedDAG) Remove(ctx context.Context, c cid.Cid) error { - err := bd.b.Commit() - if err != nil { - return err - } - return bd.ds.Remove(ctx, c) -} - -// RemoveMany commits and removes nodes from the DAGService. -func (bd *BufferedDAG) RemoveMany(ctx context.Context, cs []cid.Cid) error { - err := bd.b.Commit() - if err != nil { - return err - } - return bd.ds.RemoveMany(ctx, cs) -} diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/coding.go b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/coding.go deleted file mode 100644 index a330ad1ffe..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/coding.go +++ /dev/null @@ -1,62 +0,0 @@ -package format - -import ( - "fmt" - "sync" - - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" -) - -// DecodeBlockFunc functions decode blocks into nodes. -type DecodeBlockFunc func(block blocks.Block) (Node, error) - -type BlockDecoder interface { - Register(codec uint64, decoder DecodeBlockFunc) - Decode(blocks.Block) (Node, error) -} -type safeBlockDecoder struct { - // Can be replaced with an RCU if necessary. - lock sync.RWMutex - decoders map[uint64]DecodeBlockFunc -} - -// Register registers decoder for all blocks with the passed codec. -// -// This will silently replace any existing registered block decoders. -func (d *safeBlockDecoder) Register(codec uint64, decoder DecodeBlockFunc) { - d.lock.Lock() - defer d.lock.Unlock() - d.decoders[codec] = decoder -} - -func (d *safeBlockDecoder) Decode(block blocks.Block) (Node, error) { - // Short-circuit by cast if we already have a Node. - if node, ok := block.(Node); ok { - return node, nil - } - - ty := block.Cid().Type() - - d.lock.RLock() - decoder, ok := d.decoders[ty] - d.lock.RUnlock() - - if ok { - return decoder(block) - } else { - // TODO: get the *long* name for this format - return nil, fmt.Errorf("unrecognized object type: %d", ty) - } -} - -var DefaultBlockDecoder BlockDecoder = &safeBlockDecoder{decoders: make(map[uint64]DecodeBlockFunc)} - -// Decode decodes the given block using the default BlockDecoder. -func Decode(block blocks.Block) (Node, error) { - return DefaultBlockDecoder.Decode(block) -} - -// Register registers block decoders with the default BlockDecoder. -func Register(codec uint64, decoder DecodeBlockFunc) { - DefaultBlockDecoder.Register(codec, decoder) -} diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/daghelpers.go b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/daghelpers.go deleted file mode 100644 index 0ab9c64008..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/daghelpers.go +++ /dev/null @@ -1,118 +0,0 @@ -package format - -import ( - "context" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -// GetLinks returns the CIDs of the children of the given node. Prefer this -// method over looking up the node itself and calling `Links()` on it as this -// method may be able to use a link cache. -func GetLinks(ctx context.Context, ng NodeGetter, c cid.Cid) ([]*Link, error) { - if c.Type() == cid.Raw { - return nil, nil - } - if gl, ok := ng.(LinkGetter); ok { - return gl.GetLinks(ctx, c) - } - node, err := ng.Get(ctx, c) - if err != nil { - return nil, err - } - return node.Links(), nil -} - -// GetDAG will fill out all of the links of the given Node. -// It returns an array of NodePromise with the linked nodes all in the proper -// order. -func GetDAG(ctx context.Context, ds NodeGetter, root Node) []*NodePromise { - var cids []cid.Cid - for _, lnk := range root.Links() { - cids = append(cids, lnk.Cid) - } - - return GetNodes(ctx, ds, cids) -} - -// GetNodes returns an array of 'FutureNode' promises, with each corresponding -// to the key with the same index as the passed in keys -func GetNodes(ctx context.Context, ds NodeGetter, keys []cid.Cid) []*NodePromise { - - // Early out if no work to do - if len(keys) == 0 { - return nil - } - - promises := make([]*NodePromise, len(keys)) - for i := range keys { - promises[i] = NewNodePromise(ctx) - } - - dedupedKeys := dedupeKeys(keys) - go func() { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - nodechan := ds.GetMany(ctx, dedupedKeys) - - for count := 0; count < len(keys); { - select { - case opt, ok := <-nodechan: - if !ok { - for _, p := range promises { - p.Fail(ErrNotFound) - } - return - } - - if opt.Err != nil { - for _, p := range promises { - p.Fail(opt.Err) - } - return - } - - nd := opt.Node - c := nd.Cid() - for i, lnk_c := range keys { - if c.Equals(lnk_c) { - count++ - promises[i].Send(nd) - } - } - case <-ctx.Done(): - return - } - } - }() - return promises -} - -func Copy(ctx context.Context, from, to DAGService, root cid.Cid) error { - node, err := from.Get(ctx, root) - if err != nil { - return err - } - links := node.Links() - for _, link := range links { - err := Copy(ctx, from, to, link.Cid) - if err != nil { - return err - } - } - err = to.Add(ctx, node) - if err != nil { - return err - } - return nil -} - -// Remove duplicates from a list of keys -func dedupeKeys(cids []cid.Cid) []cid.Cid { - set := cid.NewSet() - for _, c := range cids { - set.Add(c) - } - return set.Keys() -} diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/format.go b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/format.go deleted file mode 100644 index 1843e052cc..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/format.go +++ /dev/null @@ -1,90 +0,0 @@ -package format - -import ( - "context" - "fmt" - - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -type Resolver interface { - // Resolve resolves a path through this node, stopping at any link boundary - // and returning the object found as well as the remaining path to traverse - Resolve(path []string) (interface{}, []string, error) - - // Tree lists all paths within the object under 'path', and up to the given depth. - // To list the entire object (similar to `find .`) pass "" and -1 - Tree(path string, depth int) []string -} - -// Node is the base interface all IPLD nodes must implement. -// -// Nodes are **Immutable** and all methods defined on the interface are -// **Thread Safe**. -type Node interface { - blocks.Block - Resolver - - // ResolveLink is a helper function that calls resolve and asserts the - // output is a link - ResolveLink(path []string) (*Link, []string, error) - - // Copy returns a deep copy of this node - Copy() Node - - // Links is a helper function that returns all links within this object - Links() []*Link - - // TODO: not sure if stat deserves to stay - Stat() (*NodeStat, error) - - // Size returns the size in bytes of the serialized object - Size() (uint64, error) -} - -// Link represents an IPFS Merkle DAG Link between Nodes. -type Link struct { - // utf string name. should be unique per object - Name string // utf8 - - // cumulative size of target object - Size uint64 - - // multihash of the target object - Cid cid.Cid -} - -// NodeStat is a statistics object for a Node. Mostly sizes. -type NodeStat struct { - Hash string - NumLinks int // number of links in link table - BlockSize int // size of the raw, encoded data - LinksSize int // size of the links segment - DataSize int // size of the data segment - CumulativeSize int // cumulative size of object and its references -} - -func (ns NodeStat) String() string { - f := "NodeStat{NumLinks: %d, BlockSize: %d, LinksSize: %d, DataSize: %d, CumulativeSize: %d}" - return fmt.Sprintf(f, ns.NumLinks, ns.BlockSize, ns.LinksSize, ns.DataSize, ns.CumulativeSize) -} - -// MakeLink creates a link to the given node -func MakeLink(n Node) (*Link, error) { - s, err := n.Size() - if err != nil { - return nil, err - } - - return &Link{ - Size: s, - Cid: n.Cid(), - }, nil -} - -// GetNode returns the MDAG Node that this link points to -func (l *Link) GetNode(ctx context.Context, serv NodeGetter) (Node, error) { - return serv.Get(ctx, l.Cid) -} diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/merkledag.go b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/merkledag.go deleted file mode 100644 index 17f1fa1ab5..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/merkledag.go +++ /dev/null @@ -1,67 +0,0 @@ -package format - -import ( - "context" - "fmt" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -var ErrNotFound = fmt.Errorf("merkledag: not found") - -// Either a node or an error. -type NodeOption struct { - Node Node - Err error -} - -// The basic Node resolution service. -type NodeGetter interface { - // Get retrieves nodes by CID. Depending on the NodeGetter - // implementation, this may involve fetching the Node from a remote - // machine; consider setting a deadline in the context. - Get(context.Context, cid.Cid) (Node, error) - - // GetMany returns a channel of NodeOptions given a set of CIDs. - GetMany(context.Context, []cid.Cid) <-chan *NodeOption -} - -// NodeAdder adds nodes to a DAG. -type NodeAdder interface { - // Add adds a node to this DAG. - Add(context.Context, Node) error - - // AddMany adds many nodes to this DAG. - // - // Consider using the Batch NodeAdder (`NewBatch`) if you make - // extensive use of this function. - AddMany(context.Context, []Node) error -} - -// NodeGetters can optionally implement this interface to make finding linked -// objects faster. -type LinkGetter interface { - NodeGetter - - // TODO(ipfs/go-ipld-format#9): This should return []cid.Cid - - // GetLinks returns the children of the node refered to by the given - // CID. - GetLinks(ctx context.Context, nd cid.Cid) ([]*Link, error) -} - -// DAGService is an IPFS Merkle DAG service. -type DAGService interface { - NodeGetter - NodeAdder - - // Remove removes a node from this DAG. - // - // Remove returns no error if the requested node is not present in this DAG. - Remove(context.Context, cid.Cid) error - - // RemoveMany removes many nodes from this DAG. - // - // It returns success even if the nodes were not present in the DAG. - RemoveMany(context.Context, []cid.Cid) error -} diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/package.json b/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/package.json deleted file mode 100644 index f59af36d02..0000000000 --- a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-ipld-format" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipld-format" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "", - "name": "go-ipld-format", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.7.1" -} - diff --git a/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/.travis.yml b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/.travis.yml new file mode 100644 index 0000000000..59b6093d98 --- /dev/null +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/.travis.yml @@ -0,0 +1,21 @@ +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/LICENSE b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/LICENSE rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/LICENSE diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/Makefile b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/Makefile similarity index 100% rename from vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/Makefile rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/Makefile diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/README.md b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/README.md similarity index 100% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/README.md rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/README.md diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/bootstrap.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/bootstrap.go similarity index 100% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/bootstrap.go rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/bootstrap.go diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/composed.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/composed.go similarity index 90% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/composed.go rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/composed.go index 9771b75fb7..a3ae41105e 100644 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/composed.go +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/composed.go @@ -3,12 +3,12 @@ package routinghelpers import ( "context" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" multierror "gx/ipfs/QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3/go-multierror" ) diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/limited.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/limited.go similarity index 89% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/limited.go rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/limited.go index 89e6579826..5ef9789c50 100644 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/limited.go +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/limited.go @@ -4,11 +4,11 @@ import ( "context" "strings" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // LimitedValueStore limits the internal value store to the given namespaces. diff --git a/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/null.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/null.go new file mode 100644 index 0000000000..67cc7fb99a --- /dev/null +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/null.go @@ -0,0 +1,54 @@ +package routinghelpers + +import ( + "context" + + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// Null is a router that doesn't do anything. +type Null struct{} + +// PutValue always returns ErrNotSupported +func (nr Null) PutValue(context.Context, string, []byte, ...ropts.Option) error { + return routing.ErrNotSupported +} + +// GetValue always returns ErrNotFound +func (nr Null) GetValue(context.Context, string, ...ropts.Option) ([]byte, error) { + return nil, routing.ErrNotFound +} + +// SearchValue always returns ErrNotFound +func (nr Null) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + return nil, routing.ErrNotFound +} + +// Provide always returns ErrNotSupported +func (nr Null) Provide(context.Context, cid.Cid, bool) error { + return routing.ErrNotSupported +} + +// FindProvidersAsync always returns a closed channel +func (nr Null) FindProvidersAsync(context.Context, cid.Cid, int) <-chan pstore.PeerInfo { + ch := make(chan pstore.PeerInfo) + close(ch) + return ch +} + +// FindPeer always returns ErrNotFound +func (nr Null) FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) { + return pstore.PeerInfo{}, routing.ErrNotFound +} + +// Bootstrap always succeeds instantly +func (nr Null) Bootstrap(context.Context) error { + return nil +} + +var _ routing.IpfsRouting = Null{} diff --git a/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/package.json b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/package.json new file mode 100644 index 0000000000..e1fdabd3c6 --- /dev/null +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/package.json @@ -0,0 +1,70 @@ +{ + "author": "Stebalien", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-routing-helpers" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-routing-helpers" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "hashicorp", + "hash": "Qmbg4PQLEvf2XW8vrai9STFDerV7kttkfKcVdkoRf9Z7Xu", + "name": "go-errwrap", + "version": "0.1.0" + }, + { + "author": "hashicorp", + "hash": "QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3", + "name": "go-multierror", + "version": "0.1.0" + }, + { + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", + "name": "go-libp2p-record", + "version": "4.1.15" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-libp2p-routing-helpers", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.3.19" +} + diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/parallel.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/parallel.go similarity index 95% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/parallel.go rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/parallel.go index 89d115994e..d59ffaccbd 100644 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/parallel.go +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/parallel.go @@ -6,13 +6,13 @@ import ( "reflect" "sync" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" multierror "gx/ipfs/QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3/go-multierror" ) diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/tiered.go b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/tiered.go similarity index 85% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/tiered.go rename to vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/tiered.go index 722118baae..6033a86724 100644 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/tiered.go +++ b/vendor/gx/ipfs/QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx/go-libp2p-routing-helpers/tiered.go @@ -3,14 +3,14 @@ package routinghelpers import ( "context" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" multierror "gx/ipfs/QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3/go-multierror" ) diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/.travis.yml b/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/.travis.yml deleted file mode 100644 index 2bf34b5c43..0000000000 --- a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go -go: - - 1.9 - -install: - - go get github.com/whyrusleeping/gx - - go get github.com/whyrusleeping/gx-go -script: - - make test - -after_success: - - bash <(curl -s https://codecov.io/bash) - -cache: - directories: - - $GOPATH/src/gx - -notifications: -email: false diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/delay.go b/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/delay.go deleted file mode 100644 index bec6558007..0000000000 --- a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/delay.go +++ /dev/null @@ -1,105 +0,0 @@ -package delay - -import ( - "math/rand" - "sync" - "time" -) - -var sharedRNG = rand.New(rand.NewSource(time.Now().UnixNano())) - -// D (Delay) makes it easy to add (threadsafe) configurable delays to other -// objects. -type D interface { - Set(time.Duration) time.Duration - Wait() - Get() time.Duration -} - -// Fixed returns a delay with fixed latency -func Fixed(t time.Duration) D { - return &delay{t: t} -} - -type delay struct { - l sync.RWMutex - t time.Duration -} - -func (d *delay) Set(t time.Duration) time.Duration { - d.l.Lock() - defer d.l.Unlock() - prev := d.t - d.t = t - return prev -} - -func (d *delay) Wait() { - d.l.RLock() - defer d.l.RUnlock() - time.Sleep(d.t) -} - -func (d *delay) Get() time.Duration { - d.l.Lock() - defer d.l.Unlock() - return d.t -} - -// VariableNormal is a delay following a normal distribution -// Notice that to implement the D interface Set can only change the mean delay -// the standard deviation is set only at initialization -func VariableNormal(t, std time.Duration, rng *rand.Rand) D { - if rng == nil { - rng = sharedRNG - } - - v := &variableNormal{ - std: std, - rng: rng, - } - v.t = t - return v -} - -type variableNormal struct { - delay - std time.Duration - rng *rand.Rand -} - -func (d *variableNormal) Wait() { - d.l.RLock() - defer d.l.RUnlock() - randomDelay := time.Duration(d.rng.NormFloat64() * float64(d.std)) - time.Sleep(randomDelay + d.t) -} - -// VariableUniform is a delay following a uniform distribution -// Notice that to implement the D interface Set can only change the minimum delay -// the delta is set only at initialization -func VariableUniform(t, d time.Duration, rng *rand.Rand) D { - if rng == nil { - rng = sharedRNG - } - - v := &variableUniform{ - d: d, - rng: rng, - } - v.t = t - return v -} - -type variableUniform struct { - delay - d time.Duration // max delta - rng *rand.Rand -} - -func (d *variableUniform) Wait() { - d.l.RLock() - defer d.l.RUnlock() - randomDelay := time.Duration(d.rng.Float64() * float64(d.d)) - time.Sleep(randomDelay + d.t) -} diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/package.json b/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/package.json deleted file mode 100644 index b85e54aa33..0000000000 --- a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-delay" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-delay" - }, - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-ipfs-delay", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.0.1" -} - diff --git a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/package.json b/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/package.json deleted file mode 100644 index f3949413cf..0000000000 --- a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/whyrusleeping/go-smux-multistream" - }, - "gx": { - "dvcsimport": "github.com/whyrusleeping/go-smux-multistream" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "", - "name": "go-smux-multistream", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.2" -} - diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks_test.go b/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks_test.go deleted file mode 100644 index bf5126bb9e..0000000000 --- a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package blocks - -import ( - "bytes" - "testing" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -func TestBlocksBasic(t *testing.T) { - - // Test empty data - empty := []byte{} - NewBlock(empty) - - // Test nil case - NewBlock(nil) - - // Test some data - NewBlock([]byte("Hello world!")) -} - -func TestData(t *testing.T) { - data := []byte("some data") - block := NewBlock(data) - - if !bytes.Equal(block.RawData(), data) { - t.Error("data is wrong") - } -} - -func TestHash(t *testing.T) { - data := []byte("some other data") - block := NewBlock(data) - - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(block.Multihash(), hash) { - t.Error("wrong multihash") - } -} - -func TestCid(t *testing.T) { - data := []byte("yet another data") - block := NewBlock(data) - c := block.Cid() - - if !bytes.Equal(block.Multihash(), c.Hash()) { - t.Error("key contains wrong data") - } -} - -func TestManualHash(t *testing.T) { - oldDebugState := u.Debug - defer (func() { - u.Debug = oldDebugState - })() - - data := []byte("I can't figure out more names .. data") - hash, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - t.Fatal(err) - } - - c := cid.NewCidV0(hash) - - u.Debug = false - block, err := NewBlockWithCid(data, c) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(block.Multihash(), hash) { - t.Error("wrong multihash") - } - - data[5] = byte((uint32(data[5]) + 5) % 256) // Transfrom hash to be different - block, err = NewBlockWithCid(data, c) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(block.Multihash(), hash) { - t.Error("wrong multihash") - } - - u.Debug = true - - _, err = NewBlockWithCid(data, c) - if err != ErrWrongHash { - t.Fatal(err) - } -} diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/package.json b/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/package.json deleted file mode 100644 index 83a6a61fe5..0000000000 --- a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "stebalien", - "bugs": { - "url": "https://github.com/ipfs/go-block-format" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-block-format" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "", - "name": "go-block-format", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.0" -} - diff --git a/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/.travis.yml b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/.travis.yml new file mode 100644 index 0000000000..59b6093d98 --- /dev/null +++ b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/.travis.yml @@ -0,0 +1,21 @@ +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/LICENSE b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/LICENSE rename to vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/LICENSE diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/Makefile b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/Makefile similarity index 100% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/Makefile rename to vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/Makefile diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/README.md b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/README.md similarity index 100% rename from vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/README.md rename to vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/README.md diff --git a/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/package.json b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/package.json new file mode 100644 index 0000000000..d308c01d68 --- /dev/null +++ b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/package.json @@ -0,0 +1,97 @@ +{ + "author": "stebalien", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-pubsub-router" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "hsanjuan", + "hash": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "name": "go-ipfs-ds-help", + "version": "0.1.7" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", + "name": "go-libp2p-record", + "version": "4.1.15" + }, + { + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "Stebalien", + "hash": "QmRCrPXk2oUwpK1Cj2FXrUotRpddUxz56setkny2gz13Cx", + "name": "go-libp2p-routing-helpers", + "version": "0.3.19" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "whyrusleeping", + "hash": "QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa", + "name": "go-libp2p-pubsub", + "version": "0.11.15" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-libp2p-pubsub-router", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.5.16" +} + diff --git a/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/pubsub.go b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/pubsub.go new file mode 100644 index 0000000000..66ed00c3d4 --- /dev/null +++ b/vendor/gx/ipfs/QmRj3VMHa484MktgWaWr4KYys9AtxBBiFUhhEFKs9EvPiw/go-libp2p-pubsub-router/pubsub.go @@ -0,0 +1,393 @@ +package namesys + +import ( + "bytes" + "context" + "encoding/base64" + "errors" + "sync" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dssync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + pubsub "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub" + dshelp "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("pubsub-valuestore") + +type watchGroup struct { + // Note: this chan must be buffered, see notifyWatchers + listeners map[chan []byte]struct{} +} + +type PubsubValueStore struct { + ctx context.Context + ds ds.Datastore + host p2phost.Host + cr routing.ContentRouting + ps *pubsub.PubSub + + // Map of keys to subscriptions. + // + // If a key is present but the subscription is nil, we've bootstrapped + // but haven't subscribed. + mx sync.Mutex + subs map[string]*pubsub.Subscription + + watchLk sync.Mutex + watching map[string]*watchGroup + + Validator record.Validator +} + +// KeyToTopic converts a binary record key to a pubsub topic key. +func KeyToTopic(key string) string { + // Record-store keys are arbitrary binary. However, pubsub requires UTF-8 string topic IDs. + // Encodes to "/record/base64url(key)" + return "/record/" + base64.RawURLEncoding.EncodeToString([]byte(key)) +} + +// NewPubsubPublisher constructs a new Publisher that publishes IPNS records through pubsub. +// The constructor interface is complicated by the need to bootstrap the pubsub topic. +// This could be greatly simplified if the pubsub implementation handled bootstrap itself +func NewPubsubValueStore(ctx context.Context, host p2phost.Host, cr routing.ContentRouting, ps *pubsub.PubSub, validator record.Validator) *PubsubValueStore { + return &PubsubValueStore{ + ctx: ctx, + + ds: dssync.MutexWrap(ds.NewMapDatastore()), + host: host, // needed for pubsub bootstrap + cr: cr, // needed for pubsub bootstrap + ps: ps, + + subs: make(map[string]*pubsub.Subscription), + watching: make(map[string]*watchGroup), + + Validator: validator, + } +} + +// Publish publishes an IPNS record through pubsub with default TTL +func (p *PubsubValueStore) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) error { + // Record-store keys are arbitrary binary. However, pubsub requires UTF-8 string topic IDs. + // Encode to "/record/base64url(key)" + topic := KeyToTopic(key) + + p.mx.Lock() + _, bootstraped := p.subs[key] + + if !bootstraped { + p.subs[key] = nil + p.mx.Unlock() + + bootstrapPubsub(p.ctx, p.cr, p.host, topic) + } else { + p.mx.Unlock() + } + + log.Debugf("PubsubPublish: publish value for key", key) + return p.ps.Publish(topic, value) +} + +func (p *PubsubValueStore) isBetter(key string, val []byte) bool { + if p.Validator.Validate(key, val) != nil { + return false + } + + old, err := p.getLocal(key) + if err != nil { + // If the old one is invalid, the new one is *always* better. + return true + } + + // Same record. Possible DoS vector, should consider failing? + if bytes.Equal(old, val) { + return true + } + + i, err := p.Validator.Select(key, [][]byte{val, old}) + return err == nil && i == 0 +} + +func (p *PubsubValueStore) Subscribe(key string) error { + p.mx.Lock() + // see if we already have a pubsub subscription; if not, subscribe + sub := p.subs[key] + p.mx.Unlock() + + if sub != nil { + return nil + } + + topic := KeyToTopic(key) + + // Ignore the error. We have to check again anyways to make sure the + // record hasn't expired. + // + // Also, make sure to do this *before* subscribing. + p.ps.RegisterTopicValidator(topic, func(ctx context.Context, _ peer.ID, msg *pubsub.Message) bool { + return p.isBetter(key, msg.GetData()) + }) + + sub, err := p.ps.Subscribe(topic) + if err != nil { + p.mx.Unlock() + return err + } + + p.mx.Lock() + existingSub, bootstraped := p.subs[key] + if existingSub != nil { + p.mx.Unlock() + sub.Cancel() + return nil + } + + p.subs[key] = sub + ctx, cancel := context.WithCancel(p.ctx) + go p.handleSubscription(sub, key, cancel) + p.mx.Unlock() + + log.Debugf("PubsubResolve: subscribed to %s", key) + + if !bootstraped { + // TODO: Deal with publish then resolve case? Cancel behaviour changes. + go bootstrapPubsub(ctx, p.cr, p.host, topic) + } + return nil +} + +func (p *PubsubValueStore) getLocal(key string) ([]byte, error) { + val, err := p.ds.Get(dshelp.NewKeyFromBinary([]byte(key))) + if err != nil { + // Don't invalidate due to ds errors. + if err == ds.ErrNotFound { + err = routing.ErrNotFound + } + return nil, err + } + + // If the old one is invalid, the new one is *always* better. + if err := p.Validator.Validate(key, val); err != nil { + return nil, err + } + return val, nil +} + +func (p *PubsubValueStore) GetValue(ctx context.Context, key string, opts ...ropts.Option) ([]byte, error) { + if err := p.Subscribe(key); err != nil { + return nil, err + } + + return p.getLocal(key) +} + +func (p *PubsubValueStore) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + if err := p.Subscribe(key); err != nil { + return nil, err + } + + p.watchLk.Lock() + defer p.watchLk.Unlock() + + out := make(chan []byte, 1) + lv, err := p.getLocal(key) + if err == nil { + out <- lv + close(out) + return out, nil + } + + wg, ok := p.watching[key] + if !ok { + wg = &watchGroup{ + listeners: map[chan []byte]struct{}{}, + } + p.watching[key] = wg + } + + proxy := make(chan []byte, 1) + + ctx, cancel := context.WithCancel(ctx) + wg.listeners[proxy] = struct{}{} + + go func() { + defer func() { + cancel() + + p.watchLk.Lock() + delete(wg.listeners, proxy) + + if _, ok := p.watching[key]; len(wg.listeners) == 0 && ok { + delete(p.watching, key) + } + p.watchLk.Unlock() + + close(out) + }() + + for { + select { + case val, ok := <-proxy: + if !ok { + return + } + + // outCh is buffered, so we just put the value or swap it for the newer one + select { + case out <- val: + case <-out: + out <- val + } + + // 1 is good enough + return + case <-ctx.Done(): + return + } + } + }() + + return out, nil +} + +// GetSubscriptions retrieves a list of active topic subscriptions +func (p *PubsubValueStore) GetSubscriptions() []string { + p.mx.Lock() + defer p.mx.Unlock() + + var res []string + for sub := range p.subs { + res = append(res, sub) + } + + return res +} + +// Cancel cancels a topic subscription; returns true if an active +// subscription was canceled +func (p *PubsubValueStore) Cancel(name string) (bool, error) { + p.mx.Lock() + defer p.mx.Unlock() + + p.watchLk.Lock() + if _, wok := p.watching[name]; wok { + p.watchLk.Unlock() + return false, errors.New("key has active subscriptions") + } + p.watchLk.Unlock() + + sub, ok := p.subs[name] + if ok { + sub.Cancel() + delete(p.subs, name) + } + + return ok, nil +} + +func (p *PubsubValueStore) handleSubscription(sub *pubsub.Subscription, key string, cancel func()) { + defer sub.Cancel() + defer cancel() + + for { + msg, err := sub.Next(p.ctx) + if err != nil { + if err != context.Canceled { + log.Warningf("PubsubResolve: subscription error in %s: %s", key, err.Error()) + } + return + } + if p.isBetter(key, msg.GetData()) { + err := p.ds.Put(dshelp.NewKeyFromBinary([]byte(key)), msg.GetData()) + if err != nil { + log.Warningf("PubsubResolve: error writing update for %s: %s", key, err) + } + p.notifyWatchers(key, msg.GetData()) + } + } +} + +func (p *PubsubValueStore) notifyWatchers(key string, data []byte) { + p.watchLk.Lock() + defer p.watchLk.Unlock() + sg, ok := p.watching[key] + if !ok { + return + } + + for watcher := range sg.listeners { + select { + case <-watcher: + watcher <- data + case watcher <- data: + } + } +} + +// rendezvous with peers in the name topic through provider records +// Note: rendezvous/boostrap should really be handled by the pubsub implementation itself! +func bootstrapPubsub(ctx context.Context, cr routing.ContentRouting, host p2phost.Host, name string) { + // TODO: consider changing this to `pubsub:...` + topic := "floodsub:" + name + hash := u.Hash([]byte(topic)) + rz := cid.NewCidV1(cid.Raw, hash) + + err := cr.Provide(ctx, rz, true) + if err != nil { + log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error()) + } + + go func() { + for { + select { + case <-time.After(8 * time.Hour): + err := cr.Provide(ctx, rz, true) + if err != nil { + log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error()) + } + case <-ctx.Done(): + return + } + } + }() + + rzctx, cancel := context.WithTimeout(ctx, time.Second*10) + defer cancel() + + wg := &sync.WaitGroup{} + for pi := range cr.FindProvidersAsync(rzctx, rz, 10) { + if pi.ID == host.ID() { + continue + } + wg.Add(1) + go func(pi pstore.PeerInfo) { + defer wg.Done() + + ctx, cancel := context.WithTimeout(ctx, time.Second*10) + defer cancel() + + err := host.Connect(ctx, pi) + if err != nil { + log.Debugf("Error connecting to pubsub peer %s: %s", pi.ID, err.Error()) + return + } + + // delay to let pubsub perform its handshake + time.Sleep(time.Millisecond * 250) + + log.Debugf("Connected to pubsub peer %s", pi.ID) + }(pi) + } + + wg.Wait() +} diff --git a/vendor/gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/entity.go b/vendor/gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/entity.go index b628880a01..a50c04c60e 100644 --- a/vendor/gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/entity.go +++ b/vendor/gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/html/entity.go @@ -75,2083 +75,2083 @@ var entity = map[string]rune{ "Copf;": '\U00002102', "Coproduct;": '\U00002210', "CounterClockwiseContourIntegral;": '\U00002233', - "Cross;": '\U00002A2F', - "Cscr;": '\U0001D49E', - "Cup;": '\U000022D3', - "CupCap;": '\U0000224D', - "DD;": '\U00002145', - "DDotrahd;": '\U00002911', - "DJcy;": '\U00000402', - "DScy;": '\U00000405', - "DZcy;": '\U0000040F', - "Dagger;": '\U00002021', - "Darr;": '\U000021A1', - "Dashv;": '\U00002AE4', - "Dcaron;": '\U0000010E', - "Dcy;": '\U00000414', - "Del;": '\U00002207', - "Delta;": '\U00000394', - "Dfr;": '\U0001D507', - "DiacriticalAcute;": '\U000000B4', - "DiacriticalDot;": '\U000002D9', - "DiacriticalDoubleAcute;": '\U000002DD', - "DiacriticalGrave;": '\U00000060', - "DiacriticalTilde;": '\U000002DC', - "Diamond;": '\U000022C4', - "DifferentialD;": '\U00002146', - "Dopf;": '\U0001D53B', - "Dot;": '\U000000A8', - "DotDot;": '\U000020DC', - "DotEqual;": '\U00002250', - "DoubleContourIntegral;": '\U0000222F', - "DoubleDot;": '\U000000A8', - "DoubleDownArrow;": '\U000021D3', - "DoubleLeftArrow;": '\U000021D0', - "DoubleLeftRightArrow;": '\U000021D4', - "DoubleLeftTee;": '\U00002AE4', - "DoubleLongLeftArrow;": '\U000027F8', - "DoubleLongLeftRightArrow;": '\U000027FA', - "DoubleLongRightArrow;": '\U000027F9', - "DoubleRightArrow;": '\U000021D2', - "DoubleRightTee;": '\U000022A8', - "DoubleUpArrow;": '\U000021D1', - "DoubleUpDownArrow;": '\U000021D5', - "DoubleVerticalBar;": '\U00002225', - "DownArrow;": '\U00002193', - "DownArrowBar;": '\U00002913', - "DownArrowUpArrow;": '\U000021F5', - "DownBreve;": '\U00000311', - "DownLeftRightVector;": '\U00002950', - "DownLeftTeeVector;": '\U0000295E', - "DownLeftVector;": '\U000021BD', - "DownLeftVectorBar;": '\U00002956', - "DownRightTeeVector;": '\U0000295F', - "DownRightVector;": '\U000021C1', - "DownRightVectorBar;": '\U00002957', - "DownTee;": '\U000022A4', - "DownTeeArrow;": '\U000021A7', - "Downarrow;": '\U000021D3', - "Dscr;": '\U0001D49F', - "Dstrok;": '\U00000110', - "ENG;": '\U0000014A', - "ETH;": '\U000000D0', - "Eacute;": '\U000000C9', - "Ecaron;": '\U0000011A', - "Ecirc;": '\U000000CA', - "Ecy;": '\U0000042D', - "Edot;": '\U00000116', - "Efr;": '\U0001D508', - "Egrave;": '\U000000C8', - "Element;": '\U00002208', - "Emacr;": '\U00000112', - "EmptySmallSquare;": '\U000025FB', - "EmptyVerySmallSquare;": '\U000025AB', - "Eogon;": '\U00000118', - "Eopf;": '\U0001D53C', - "Epsilon;": '\U00000395', - "Equal;": '\U00002A75', - "EqualTilde;": '\U00002242', - "Equilibrium;": '\U000021CC', - "Escr;": '\U00002130', - "Esim;": '\U00002A73', - "Eta;": '\U00000397', - "Euml;": '\U000000CB', - "Exists;": '\U00002203', - "ExponentialE;": '\U00002147', - "Fcy;": '\U00000424', - "Ffr;": '\U0001D509', - "FilledSmallSquare;": '\U000025FC', - "FilledVerySmallSquare;": '\U000025AA', - "Fopf;": '\U0001D53D', - "ForAll;": '\U00002200', - "Fouriertrf;": '\U00002131', - "Fscr;": '\U00002131', - "GJcy;": '\U00000403', - "GT;": '\U0000003E', - "Gamma;": '\U00000393', - "Gammad;": '\U000003DC', - "Gbreve;": '\U0000011E', - "Gcedil;": '\U00000122', - "Gcirc;": '\U0000011C', - "Gcy;": '\U00000413', - "Gdot;": '\U00000120', - "Gfr;": '\U0001D50A', - "Gg;": '\U000022D9', - "Gopf;": '\U0001D53E', - "GreaterEqual;": '\U00002265', - "GreaterEqualLess;": '\U000022DB', - "GreaterFullEqual;": '\U00002267', - "GreaterGreater;": '\U00002AA2', - "GreaterLess;": '\U00002277', - "GreaterSlantEqual;": '\U00002A7E', - "GreaterTilde;": '\U00002273', - "Gscr;": '\U0001D4A2', - "Gt;": '\U0000226B', - "HARDcy;": '\U0000042A', - "Hacek;": '\U000002C7', - "Hat;": '\U0000005E', - "Hcirc;": '\U00000124', - "Hfr;": '\U0000210C', - "HilbertSpace;": '\U0000210B', - "Hopf;": '\U0000210D', - "HorizontalLine;": '\U00002500', - "Hscr;": '\U0000210B', - "Hstrok;": '\U00000126', - "HumpDownHump;": '\U0000224E', - "HumpEqual;": '\U0000224F', - "IEcy;": '\U00000415', - "IJlig;": '\U00000132', - "IOcy;": '\U00000401', - "Iacute;": '\U000000CD', - "Icirc;": '\U000000CE', - "Icy;": '\U00000418', - "Idot;": '\U00000130', - "Ifr;": '\U00002111', - "Igrave;": '\U000000CC', - "Im;": '\U00002111', - "Imacr;": '\U0000012A', - "ImaginaryI;": '\U00002148', - "Implies;": '\U000021D2', - "Int;": '\U0000222C', - "Integral;": '\U0000222B', - "Intersection;": '\U000022C2', - "InvisibleComma;": '\U00002063', - "InvisibleTimes;": '\U00002062', - "Iogon;": '\U0000012E', - "Iopf;": '\U0001D540', - "Iota;": '\U00000399', - "Iscr;": '\U00002110', - "Itilde;": '\U00000128', - "Iukcy;": '\U00000406', - "Iuml;": '\U000000CF', - "Jcirc;": '\U00000134', - "Jcy;": '\U00000419', - "Jfr;": '\U0001D50D', - "Jopf;": '\U0001D541', - "Jscr;": '\U0001D4A5', - "Jsercy;": '\U00000408', - "Jukcy;": '\U00000404', - "KHcy;": '\U00000425', - "KJcy;": '\U0000040C', - "Kappa;": '\U0000039A', - "Kcedil;": '\U00000136', - "Kcy;": '\U0000041A', - "Kfr;": '\U0001D50E', - "Kopf;": '\U0001D542', - "Kscr;": '\U0001D4A6', - "LJcy;": '\U00000409', - "LT;": '\U0000003C', - "Lacute;": '\U00000139', - "Lambda;": '\U0000039B', - "Lang;": '\U000027EA', - "Laplacetrf;": '\U00002112', - "Larr;": '\U0000219E', - "Lcaron;": '\U0000013D', - "Lcedil;": '\U0000013B', - "Lcy;": '\U0000041B', - "LeftAngleBracket;": '\U000027E8', - "LeftArrow;": '\U00002190', - "LeftArrowBar;": '\U000021E4', - "LeftArrowRightArrow;": '\U000021C6', - "LeftCeiling;": '\U00002308', - "LeftDoubleBracket;": '\U000027E6', - "LeftDownTeeVector;": '\U00002961', - "LeftDownVector;": '\U000021C3', - "LeftDownVectorBar;": '\U00002959', - "LeftFloor;": '\U0000230A', - "LeftRightArrow;": '\U00002194', - "LeftRightVector;": '\U0000294E', - "LeftTee;": '\U000022A3', - "LeftTeeArrow;": '\U000021A4', - "LeftTeeVector;": '\U0000295A', - "LeftTriangle;": '\U000022B2', - "LeftTriangleBar;": '\U000029CF', - "LeftTriangleEqual;": '\U000022B4', - "LeftUpDownVector;": '\U00002951', - "LeftUpTeeVector;": '\U00002960', - "LeftUpVector;": '\U000021BF', - "LeftUpVectorBar;": '\U00002958', - "LeftVector;": '\U000021BC', - "LeftVectorBar;": '\U00002952', - "Leftarrow;": '\U000021D0', - "Leftrightarrow;": '\U000021D4', - "LessEqualGreater;": '\U000022DA', - "LessFullEqual;": '\U00002266', - "LessGreater;": '\U00002276', - "LessLess;": '\U00002AA1', - "LessSlantEqual;": '\U00002A7D', - "LessTilde;": '\U00002272', - "Lfr;": '\U0001D50F', - "Ll;": '\U000022D8', - "Lleftarrow;": '\U000021DA', - "Lmidot;": '\U0000013F', - "LongLeftArrow;": '\U000027F5', - "LongLeftRightArrow;": '\U000027F7', - "LongRightArrow;": '\U000027F6', - "Longleftarrow;": '\U000027F8', - "Longleftrightarrow;": '\U000027FA', - "Longrightarrow;": '\U000027F9', - "Lopf;": '\U0001D543', - "LowerLeftArrow;": '\U00002199', - "LowerRightArrow;": '\U00002198', - "Lscr;": '\U00002112', - "Lsh;": '\U000021B0', - "Lstrok;": '\U00000141', - "Lt;": '\U0000226A', - "Map;": '\U00002905', - "Mcy;": '\U0000041C', - "MediumSpace;": '\U0000205F', - "Mellintrf;": '\U00002133', - "Mfr;": '\U0001D510', - "MinusPlus;": '\U00002213', - "Mopf;": '\U0001D544', - "Mscr;": '\U00002133', - "Mu;": '\U0000039C', - "NJcy;": '\U0000040A', - "Nacute;": '\U00000143', - "Ncaron;": '\U00000147', - "Ncedil;": '\U00000145', - "Ncy;": '\U0000041D', - "NegativeMediumSpace;": '\U0000200B', - "NegativeThickSpace;": '\U0000200B', - "NegativeThinSpace;": '\U0000200B', - "NegativeVeryThinSpace;": '\U0000200B', - "NestedGreaterGreater;": '\U0000226B', - "NestedLessLess;": '\U0000226A', - "NewLine;": '\U0000000A', - "Nfr;": '\U0001D511', - "NoBreak;": '\U00002060', - "NonBreakingSpace;": '\U000000A0', - "Nopf;": '\U00002115', - "Not;": '\U00002AEC', - "NotCongruent;": '\U00002262', - "NotCupCap;": '\U0000226D', - "NotDoubleVerticalBar;": '\U00002226', - "NotElement;": '\U00002209', - "NotEqual;": '\U00002260', - "NotExists;": '\U00002204', - "NotGreater;": '\U0000226F', - "NotGreaterEqual;": '\U00002271', - "NotGreaterLess;": '\U00002279', - "NotGreaterTilde;": '\U00002275', - "NotLeftTriangle;": '\U000022EA', - "NotLeftTriangleEqual;": '\U000022EC', - "NotLess;": '\U0000226E', - "NotLessEqual;": '\U00002270', - "NotLessGreater;": '\U00002278', - "NotLessTilde;": '\U00002274', - "NotPrecedes;": '\U00002280', - "NotPrecedesSlantEqual;": '\U000022E0', - "NotReverseElement;": '\U0000220C', - "NotRightTriangle;": '\U000022EB', - "NotRightTriangleEqual;": '\U000022ED', - "NotSquareSubsetEqual;": '\U000022E2', - "NotSquareSupersetEqual;": '\U000022E3', - "NotSubsetEqual;": '\U00002288', - "NotSucceeds;": '\U00002281', - "NotSucceedsSlantEqual;": '\U000022E1', - "NotSupersetEqual;": '\U00002289', - "NotTilde;": '\U00002241', - "NotTildeEqual;": '\U00002244', - "NotTildeFullEqual;": '\U00002247', - "NotTildeTilde;": '\U00002249', - "NotVerticalBar;": '\U00002224', - "Nscr;": '\U0001D4A9', - "Ntilde;": '\U000000D1', - "Nu;": '\U0000039D', - "OElig;": '\U00000152', - "Oacute;": '\U000000D3', - "Ocirc;": '\U000000D4', - "Ocy;": '\U0000041E', - "Odblac;": '\U00000150', - "Ofr;": '\U0001D512', - "Ograve;": '\U000000D2', - "Omacr;": '\U0000014C', - "Omega;": '\U000003A9', - "Omicron;": '\U0000039F', - "Oopf;": '\U0001D546', - "OpenCurlyDoubleQuote;": '\U0000201C', - "OpenCurlyQuote;": '\U00002018', - "Or;": '\U00002A54', - "Oscr;": '\U0001D4AA', - "Oslash;": '\U000000D8', - "Otilde;": '\U000000D5', - "Otimes;": '\U00002A37', - "Ouml;": '\U000000D6', - "OverBar;": '\U0000203E', - "OverBrace;": '\U000023DE', - "OverBracket;": '\U000023B4', - "OverParenthesis;": '\U000023DC', - "PartialD;": '\U00002202', - "Pcy;": '\U0000041F', - "Pfr;": '\U0001D513', - "Phi;": '\U000003A6', - "Pi;": '\U000003A0', - "PlusMinus;": '\U000000B1', - "Poincareplane;": '\U0000210C', - "Popf;": '\U00002119', - "Pr;": '\U00002ABB', - "Precedes;": '\U0000227A', - "PrecedesEqual;": '\U00002AAF', - "PrecedesSlantEqual;": '\U0000227C', - "PrecedesTilde;": '\U0000227E', - "Prime;": '\U00002033', - "Product;": '\U0000220F', - "Proportion;": '\U00002237', - "Proportional;": '\U0000221D', - "Pscr;": '\U0001D4AB', - "Psi;": '\U000003A8', - "QUOT;": '\U00000022', - "Qfr;": '\U0001D514', - "Qopf;": '\U0000211A', - "Qscr;": '\U0001D4AC', - "RBarr;": '\U00002910', - "REG;": '\U000000AE', - "Racute;": '\U00000154', - "Rang;": '\U000027EB', - "Rarr;": '\U000021A0', - "Rarrtl;": '\U00002916', - "Rcaron;": '\U00000158', - "Rcedil;": '\U00000156', - "Rcy;": '\U00000420', - "Re;": '\U0000211C', - "ReverseElement;": '\U0000220B', - "ReverseEquilibrium;": '\U000021CB', - "ReverseUpEquilibrium;": '\U0000296F', - "Rfr;": '\U0000211C', - "Rho;": '\U000003A1', - "RightAngleBracket;": '\U000027E9', - "RightArrow;": '\U00002192', - "RightArrowBar;": '\U000021E5', - "RightArrowLeftArrow;": '\U000021C4', - "RightCeiling;": '\U00002309', - "RightDoubleBracket;": '\U000027E7', - "RightDownTeeVector;": '\U0000295D', - "RightDownVector;": '\U000021C2', - "RightDownVectorBar;": '\U00002955', - "RightFloor;": '\U0000230B', - "RightTee;": '\U000022A2', - "RightTeeArrow;": '\U000021A6', - "RightTeeVector;": '\U0000295B', - "RightTriangle;": '\U000022B3', - "RightTriangleBar;": '\U000029D0', - "RightTriangleEqual;": '\U000022B5', - "RightUpDownVector;": '\U0000294F', - "RightUpTeeVector;": '\U0000295C', - "RightUpVector;": '\U000021BE', - "RightUpVectorBar;": '\U00002954', - "RightVector;": '\U000021C0', - "RightVectorBar;": '\U00002953', - "Rightarrow;": '\U000021D2', - "Ropf;": '\U0000211D', - "RoundImplies;": '\U00002970', - "Rrightarrow;": '\U000021DB', - "Rscr;": '\U0000211B', - "Rsh;": '\U000021B1', - "RuleDelayed;": '\U000029F4', - "SHCHcy;": '\U00000429', - "SHcy;": '\U00000428', - "SOFTcy;": '\U0000042C', - "Sacute;": '\U0000015A', - "Sc;": '\U00002ABC', - "Scaron;": '\U00000160', - "Scedil;": '\U0000015E', - "Scirc;": '\U0000015C', - "Scy;": '\U00000421', - "Sfr;": '\U0001D516', - "ShortDownArrow;": '\U00002193', - "ShortLeftArrow;": '\U00002190', - "ShortRightArrow;": '\U00002192', - "ShortUpArrow;": '\U00002191', - "Sigma;": '\U000003A3', - "SmallCircle;": '\U00002218', - "Sopf;": '\U0001D54A', - "Sqrt;": '\U0000221A', - "Square;": '\U000025A1', - "SquareIntersection;": '\U00002293', - "SquareSubset;": '\U0000228F', - "SquareSubsetEqual;": '\U00002291', - "SquareSuperset;": '\U00002290', - "SquareSupersetEqual;": '\U00002292', - "SquareUnion;": '\U00002294', - "Sscr;": '\U0001D4AE', - "Star;": '\U000022C6', - "Sub;": '\U000022D0', - "Subset;": '\U000022D0', - "SubsetEqual;": '\U00002286', - "Succeeds;": '\U0000227B', - "SucceedsEqual;": '\U00002AB0', - "SucceedsSlantEqual;": '\U0000227D', - "SucceedsTilde;": '\U0000227F', - "SuchThat;": '\U0000220B', - "Sum;": '\U00002211', - "Sup;": '\U000022D1', - "Superset;": '\U00002283', - "SupersetEqual;": '\U00002287', - "Supset;": '\U000022D1', - "THORN;": '\U000000DE', - "TRADE;": '\U00002122', - "TSHcy;": '\U0000040B', - "TScy;": '\U00000426', - "Tab;": '\U00000009', - "Tau;": '\U000003A4', - "Tcaron;": '\U00000164', - "Tcedil;": '\U00000162', - "Tcy;": '\U00000422', - "Tfr;": '\U0001D517', - "Therefore;": '\U00002234', - "Theta;": '\U00000398', - "ThinSpace;": '\U00002009', - "Tilde;": '\U0000223C', - "TildeEqual;": '\U00002243', - "TildeFullEqual;": '\U00002245', - "TildeTilde;": '\U00002248', - "Topf;": '\U0001D54B', - "TripleDot;": '\U000020DB', - "Tscr;": '\U0001D4AF', - "Tstrok;": '\U00000166', - "Uacute;": '\U000000DA', - "Uarr;": '\U0000219F', - "Uarrocir;": '\U00002949', - "Ubrcy;": '\U0000040E', - "Ubreve;": '\U0000016C', - "Ucirc;": '\U000000DB', - "Ucy;": '\U00000423', - "Udblac;": '\U00000170', - "Ufr;": '\U0001D518', - "Ugrave;": '\U000000D9', - "Umacr;": '\U0000016A', - "UnderBar;": '\U0000005F', - "UnderBrace;": '\U000023DF', - "UnderBracket;": '\U000023B5', - "UnderParenthesis;": '\U000023DD', - "Union;": '\U000022C3', - "UnionPlus;": '\U0000228E', - "Uogon;": '\U00000172', - "Uopf;": '\U0001D54C', - "UpArrow;": '\U00002191', - "UpArrowBar;": '\U00002912', - "UpArrowDownArrow;": '\U000021C5', - "UpDownArrow;": '\U00002195', - "UpEquilibrium;": '\U0000296E', - "UpTee;": '\U000022A5', - "UpTeeArrow;": '\U000021A5', - "Uparrow;": '\U000021D1', - "Updownarrow;": '\U000021D5', - "UpperLeftArrow;": '\U00002196', - "UpperRightArrow;": '\U00002197', - "Upsi;": '\U000003D2', - "Upsilon;": '\U000003A5', - "Uring;": '\U0000016E', - "Uscr;": '\U0001D4B0', - "Utilde;": '\U00000168', - "Uuml;": '\U000000DC', - "VDash;": '\U000022AB', - "Vbar;": '\U00002AEB', - "Vcy;": '\U00000412', - "Vdash;": '\U000022A9', - "Vdashl;": '\U00002AE6', - "Vee;": '\U000022C1', - "Verbar;": '\U00002016', - "Vert;": '\U00002016', - "VerticalBar;": '\U00002223', - "VerticalLine;": '\U0000007C', - "VerticalSeparator;": '\U00002758', - "VerticalTilde;": '\U00002240', - "VeryThinSpace;": '\U0000200A', - "Vfr;": '\U0001D519', - "Vopf;": '\U0001D54D', - "Vscr;": '\U0001D4B1', - "Vvdash;": '\U000022AA', - "Wcirc;": '\U00000174', - "Wedge;": '\U000022C0', - "Wfr;": '\U0001D51A', - "Wopf;": '\U0001D54E', - "Wscr;": '\U0001D4B2', - "Xfr;": '\U0001D51B', - "Xi;": '\U0000039E', - "Xopf;": '\U0001D54F', - "Xscr;": '\U0001D4B3', - "YAcy;": '\U0000042F', - "YIcy;": '\U00000407', - "YUcy;": '\U0000042E', - "Yacute;": '\U000000DD', - "Ycirc;": '\U00000176', - "Ycy;": '\U0000042B', - "Yfr;": '\U0001D51C', - "Yopf;": '\U0001D550', - "Yscr;": '\U0001D4B4', - "Yuml;": '\U00000178', - "ZHcy;": '\U00000416', - "Zacute;": '\U00000179', - "Zcaron;": '\U0000017D', - "Zcy;": '\U00000417', - "Zdot;": '\U0000017B', - "ZeroWidthSpace;": '\U0000200B', - "Zeta;": '\U00000396', - "Zfr;": '\U00002128', - "Zopf;": '\U00002124', - "Zscr;": '\U0001D4B5', - "aacute;": '\U000000E1', - "abreve;": '\U00000103', - "ac;": '\U0000223E', - "acd;": '\U0000223F', - "acirc;": '\U000000E2', - "acute;": '\U000000B4', - "acy;": '\U00000430', - "aelig;": '\U000000E6', - "af;": '\U00002061', - "afr;": '\U0001D51E', - "agrave;": '\U000000E0', - "alefsym;": '\U00002135', - "aleph;": '\U00002135', - "alpha;": '\U000003B1', - "amacr;": '\U00000101', - "amalg;": '\U00002A3F', - "amp;": '\U00000026', - "and;": '\U00002227', - "andand;": '\U00002A55', - "andd;": '\U00002A5C', - "andslope;": '\U00002A58', - "andv;": '\U00002A5A', - "ang;": '\U00002220', - "ange;": '\U000029A4', - "angle;": '\U00002220', - "angmsd;": '\U00002221', - "angmsdaa;": '\U000029A8', - "angmsdab;": '\U000029A9', - "angmsdac;": '\U000029AA', - "angmsdad;": '\U000029AB', - "angmsdae;": '\U000029AC', - "angmsdaf;": '\U000029AD', - "angmsdag;": '\U000029AE', - "angmsdah;": '\U000029AF', - "angrt;": '\U0000221F', - "angrtvb;": '\U000022BE', - "angrtvbd;": '\U0000299D', - "angsph;": '\U00002222', - "angst;": '\U000000C5', - "angzarr;": '\U0000237C', - "aogon;": '\U00000105', - "aopf;": '\U0001D552', - "ap;": '\U00002248', - "apE;": '\U00002A70', - "apacir;": '\U00002A6F', - "ape;": '\U0000224A', - "apid;": '\U0000224B', - "apos;": '\U00000027', - "approx;": '\U00002248', - "approxeq;": '\U0000224A', - "aring;": '\U000000E5', - "ascr;": '\U0001D4B6', - "ast;": '\U0000002A', - "asymp;": '\U00002248', - "asympeq;": '\U0000224D', - "atilde;": '\U000000E3', - "auml;": '\U000000E4', - "awconint;": '\U00002233', - "awint;": '\U00002A11', - "bNot;": '\U00002AED', - "backcong;": '\U0000224C', - "backepsilon;": '\U000003F6', - "backprime;": '\U00002035', - "backsim;": '\U0000223D', - "backsimeq;": '\U000022CD', - "barvee;": '\U000022BD', - "barwed;": '\U00002305', - "barwedge;": '\U00002305', - "bbrk;": '\U000023B5', - "bbrktbrk;": '\U000023B6', - "bcong;": '\U0000224C', - "bcy;": '\U00000431', - "bdquo;": '\U0000201E', - "becaus;": '\U00002235', - "because;": '\U00002235', - "bemptyv;": '\U000029B0', - "bepsi;": '\U000003F6', - "bernou;": '\U0000212C', - "beta;": '\U000003B2', - "beth;": '\U00002136', - "between;": '\U0000226C', - "bfr;": '\U0001D51F', - "bigcap;": '\U000022C2', - "bigcirc;": '\U000025EF', - "bigcup;": '\U000022C3', - "bigodot;": '\U00002A00', - "bigoplus;": '\U00002A01', - "bigotimes;": '\U00002A02', - "bigsqcup;": '\U00002A06', - "bigstar;": '\U00002605', - "bigtriangledown;": '\U000025BD', - "bigtriangleup;": '\U000025B3', - "biguplus;": '\U00002A04', - "bigvee;": '\U000022C1', - "bigwedge;": '\U000022C0', - "bkarow;": '\U0000290D', - "blacklozenge;": '\U000029EB', - "blacksquare;": '\U000025AA', - "blacktriangle;": '\U000025B4', - "blacktriangledown;": '\U000025BE', - "blacktriangleleft;": '\U000025C2', - "blacktriangleright;": '\U000025B8', - "blank;": '\U00002423', - "blk12;": '\U00002592', - "blk14;": '\U00002591', - "blk34;": '\U00002593', - "block;": '\U00002588', - "bnot;": '\U00002310', - "bopf;": '\U0001D553', - "bot;": '\U000022A5', - "bottom;": '\U000022A5', - "bowtie;": '\U000022C8', - "boxDL;": '\U00002557', - "boxDR;": '\U00002554', - "boxDl;": '\U00002556', - "boxDr;": '\U00002553', - "boxH;": '\U00002550', - "boxHD;": '\U00002566', - "boxHU;": '\U00002569', - "boxHd;": '\U00002564', - "boxHu;": '\U00002567', - "boxUL;": '\U0000255D', - "boxUR;": '\U0000255A', - "boxUl;": '\U0000255C', - "boxUr;": '\U00002559', - "boxV;": '\U00002551', - "boxVH;": '\U0000256C', - "boxVL;": '\U00002563', - "boxVR;": '\U00002560', - "boxVh;": '\U0000256B', - "boxVl;": '\U00002562', - "boxVr;": '\U0000255F', - "boxbox;": '\U000029C9', - "boxdL;": '\U00002555', - "boxdR;": '\U00002552', - "boxdl;": '\U00002510', - "boxdr;": '\U0000250C', - "boxh;": '\U00002500', - "boxhD;": '\U00002565', - "boxhU;": '\U00002568', - "boxhd;": '\U0000252C', - "boxhu;": '\U00002534', - "boxminus;": '\U0000229F', - "boxplus;": '\U0000229E', - "boxtimes;": '\U000022A0', - "boxuL;": '\U0000255B', - "boxuR;": '\U00002558', - "boxul;": '\U00002518', - "boxur;": '\U00002514', - "boxv;": '\U00002502', - "boxvH;": '\U0000256A', - "boxvL;": '\U00002561', - "boxvR;": '\U0000255E', - "boxvh;": '\U0000253C', - "boxvl;": '\U00002524', - "boxvr;": '\U0000251C', - "bprime;": '\U00002035', - "breve;": '\U000002D8', - "brvbar;": '\U000000A6', - "bscr;": '\U0001D4B7', - "bsemi;": '\U0000204F', - "bsim;": '\U0000223D', - "bsime;": '\U000022CD', - "bsol;": '\U0000005C', - "bsolb;": '\U000029C5', - "bsolhsub;": '\U000027C8', - "bull;": '\U00002022', - "bullet;": '\U00002022', - "bump;": '\U0000224E', - "bumpE;": '\U00002AAE', - "bumpe;": '\U0000224F', - "bumpeq;": '\U0000224F', - "cacute;": '\U00000107', - "cap;": '\U00002229', - "capand;": '\U00002A44', - "capbrcup;": '\U00002A49', - "capcap;": '\U00002A4B', - "capcup;": '\U00002A47', - "capdot;": '\U00002A40', - "caret;": '\U00002041', - "caron;": '\U000002C7', - "ccaps;": '\U00002A4D', - "ccaron;": '\U0000010D', - "ccedil;": '\U000000E7', - "ccirc;": '\U00000109', - "ccups;": '\U00002A4C', - "ccupssm;": '\U00002A50', - "cdot;": '\U0000010B', - "cedil;": '\U000000B8', - "cemptyv;": '\U000029B2', - "cent;": '\U000000A2', - "centerdot;": '\U000000B7', - "cfr;": '\U0001D520', - "chcy;": '\U00000447', - "check;": '\U00002713', - "checkmark;": '\U00002713', - "chi;": '\U000003C7', - "cir;": '\U000025CB', - "cirE;": '\U000029C3', - "circ;": '\U000002C6', - "circeq;": '\U00002257', - "circlearrowleft;": '\U000021BA', - "circlearrowright;": '\U000021BB', - "circledR;": '\U000000AE', - "circledS;": '\U000024C8', - "circledast;": '\U0000229B', - "circledcirc;": '\U0000229A', - "circleddash;": '\U0000229D', - "cire;": '\U00002257', - "cirfnint;": '\U00002A10', - "cirmid;": '\U00002AEF', - "cirscir;": '\U000029C2', - "clubs;": '\U00002663', - "clubsuit;": '\U00002663', - "colon;": '\U0000003A', - "colone;": '\U00002254', - "coloneq;": '\U00002254', - "comma;": '\U0000002C', - "commat;": '\U00000040', - "comp;": '\U00002201', - "compfn;": '\U00002218', - "complement;": '\U00002201', - "complexes;": '\U00002102', - "cong;": '\U00002245', - "congdot;": '\U00002A6D', - "conint;": '\U0000222E', - "copf;": '\U0001D554', - "coprod;": '\U00002210', - "copy;": '\U000000A9', - "copysr;": '\U00002117', - "crarr;": '\U000021B5', - "cross;": '\U00002717', - "cscr;": '\U0001D4B8', - "csub;": '\U00002ACF', - "csube;": '\U00002AD1', - "csup;": '\U00002AD0', - "csupe;": '\U00002AD2', - "ctdot;": '\U000022EF', - "cudarrl;": '\U00002938', - "cudarrr;": '\U00002935', - "cuepr;": '\U000022DE', - "cuesc;": '\U000022DF', - "cularr;": '\U000021B6', - "cularrp;": '\U0000293D', - "cup;": '\U0000222A', - "cupbrcap;": '\U00002A48', - "cupcap;": '\U00002A46', - "cupcup;": '\U00002A4A', - "cupdot;": '\U0000228D', - "cupor;": '\U00002A45', - "curarr;": '\U000021B7', - "curarrm;": '\U0000293C', - "curlyeqprec;": '\U000022DE', - "curlyeqsucc;": '\U000022DF', - "curlyvee;": '\U000022CE', - "curlywedge;": '\U000022CF', - "curren;": '\U000000A4', - "curvearrowleft;": '\U000021B6', - "curvearrowright;": '\U000021B7', - "cuvee;": '\U000022CE', - "cuwed;": '\U000022CF', - "cwconint;": '\U00002232', - "cwint;": '\U00002231', - "cylcty;": '\U0000232D', - "dArr;": '\U000021D3', - "dHar;": '\U00002965', - "dagger;": '\U00002020', - "daleth;": '\U00002138', - "darr;": '\U00002193', - "dash;": '\U00002010', - "dashv;": '\U000022A3', - "dbkarow;": '\U0000290F', - "dblac;": '\U000002DD', - "dcaron;": '\U0000010F', - "dcy;": '\U00000434', - "dd;": '\U00002146', - "ddagger;": '\U00002021', - "ddarr;": '\U000021CA', - "ddotseq;": '\U00002A77', - "deg;": '\U000000B0', - "delta;": '\U000003B4', - "demptyv;": '\U000029B1', - "dfisht;": '\U0000297F', - "dfr;": '\U0001D521', - "dharl;": '\U000021C3', - "dharr;": '\U000021C2', - "diam;": '\U000022C4', - "diamond;": '\U000022C4', - "diamondsuit;": '\U00002666', - "diams;": '\U00002666', - "die;": '\U000000A8', - "digamma;": '\U000003DD', - "disin;": '\U000022F2', - "div;": '\U000000F7', - "divide;": '\U000000F7', - "divideontimes;": '\U000022C7', - "divonx;": '\U000022C7', - "djcy;": '\U00000452', - "dlcorn;": '\U0000231E', - "dlcrop;": '\U0000230D', - "dollar;": '\U00000024', - "dopf;": '\U0001D555', - "dot;": '\U000002D9', - "doteq;": '\U00002250', - "doteqdot;": '\U00002251', - "dotminus;": '\U00002238', - "dotplus;": '\U00002214', - "dotsquare;": '\U000022A1', - "doublebarwedge;": '\U00002306', - "downarrow;": '\U00002193', - "downdownarrows;": '\U000021CA', - "downharpoonleft;": '\U000021C3', - "downharpoonright;": '\U000021C2', - "drbkarow;": '\U00002910', - "drcorn;": '\U0000231F', - "drcrop;": '\U0000230C', - "dscr;": '\U0001D4B9', - "dscy;": '\U00000455', - "dsol;": '\U000029F6', - "dstrok;": '\U00000111', - "dtdot;": '\U000022F1', - "dtri;": '\U000025BF', - "dtrif;": '\U000025BE', - "duarr;": '\U000021F5', - "duhar;": '\U0000296F', - "dwangle;": '\U000029A6', - "dzcy;": '\U0000045F', - "dzigrarr;": '\U000027FF', - "eDDot;": '\U00002A77', - "eDot;": '\U00002251', - "eacute;": '\U000000E9', - "easter;": '\U00002A6E', - "ecaron;": '\U0000011B', - "ecir;": '\U00002256', - "ecirc;": '\U000000EA', - "ecolon;": '\U00002255', - "ecy;": '\U0000044D', - "edot;": '\U00000117', - "ee;": '\U00002147', - "efDot;": '\U00002252', - "efr;": '\U0001D522', - "eg;": '\U00002A9A', - "egrave;": '\U000000E8', - "egs;": '\U00002A96', - "egsdot;": '\U00002A98', - "el;": '\U00002A99', - "elinters;": '\U000023E7', - "ell;": '\U00002113', - "els;": '\U00002A95', - "elsdot;": '\U00002A97', - "emacr;": '\U00000113', - "empty;": '\U00002205', - "emptyset;": '\U00002205', - "emptyv;": '\U00002205', - "emsp;": '\U00002003', - "emsp13;": '\U00002004', - "emsp14;": '\U00002005', - "eng;": '\U0000014B', - "ensp;": '\U00002002', - "eogon;": '\U00000119', - "eopf;": '\U0001D556', - "epar;": '\U000022D5', - "eparsl;": '\U000029E3', - "eplus;": '\U00002A71', - "epsi;": '\U000003B5', - "epsilon;": '\U000003B5', - "epsiv;": '\U000003F5', - "eqcirc;": '\U00002256', - "eqcolon;": '\U00002255', - "eqsim;": '\U00002242', - "eqslantgtr;": '\U00002A96', - "eqslantless;": '\U00002A95', - "equals;": '\U0000003D', - "equest;": '\U0000225F', - "equiv;": '\U00002261', - "equivDD;": '\U00002A78', - "eqvparsl;": '\U000029E5', - "erDot;": '\U00002253', - "erarr;": '\U00002971', - "escr;": '\U0000212F', - "esdot;": '\U00002250', - "esim;": '\U00002242', - "eta;": '\U000003B7', - "eth;": '\U000000F0', - "euml;": '\U000000EB', - "euro;": '\U000020AC', - "excl;": '\U00000021', - "exist;": '\U00002203', - "expectation;": '\U00002130', - "exponentiale;": '\U00002147', - "fallingdotseq;": '\U00002252', - "fcy;": '\U00000444', - "female;": '\U00002640', - "ffilig;": '\U0000FB03', - "fflig;": '\U0000FB00', - "ffllig;": '\U0000FB04', - "ffr;": '\U0001D523', - "filig;": '\U0000FB01', - "flat;": '\U0000266D', - "fllig;": '\U0000FB02', - "fltns;": '\U000025B1', - "fnof;": '\U00000192', - "fopf;": '\U0001D557', - "forall;": '\U00002200', - "fork;": '\U000022D4', - "forkv;": '\U00002AD9', - "fpartint;": '\U00002A0D', - "frac12;": '\U000000BD', - "frac13;": '\U00002153', - "frac14;": '\U000000BC', - "frac15;": '\U00002155', - "frac16;": '\U00002159', - "frac18;": '\U0000215B', - "frac23;": '\U00002154', - "frac25;": '\U00002156', - "frac34;": '\U000000BE', - "frac35;": '\U00002157', - "frac38;": '\U0000215C', - "frac45;": '\U00002158', - "frac56;": '\U0000215A', - "frac58;": '\U0000215D', - "frac78;": '\U0000215E', - "frasl;": '\U00002044', - "frown;": '\U00002322', - "fscr;": '\U0001D4BB', - "gE;": '\U00002267', - "gEl;": '\U00002A8C', - "gacute;": '\U000001F5', - "gamma;": '\U000003B3', - "gammad;": '\U000003DD', - "gap;": '\U00002A86', - "gbreve;": '\U0000011F', - "gcirc;": '\U0000011D', - "gcy;": '\U00000433', - "gdot;": '\U00000121', - "ge;": '\U00002265', - "gel;": '\U000022DB', - "geq;": '\U00002265', - "geqq;": '\U00002267', - "geqslant;": '\U00002A7E', - "ges;": '\U00002A7E', - "gescc;": '\U00002AA9', - "gesdot;": '\U00002A80', - "gesdoto;": '\U00002A82', - "gesdotol;": '\U00002A84', - "gesles;": '\U00002A94', - "gfr;": '\U0001D524', - "gg;": '\U0000226B', - "ggg;": '\U000022D9', - "gimel;": '\U00002137', - "gjcy;": '\U00000453', - "gl;": '\U00002277', - "glE;": '\U00002A92', - "gla;": '\U00002AA5', - "glj;": '\U00002AA4', - "gnE;": '\U00002269', - "gnap;": '\U00002A8A', - "gnapprox;": '\U00002A8A', - "gne;": '\U00002A88', - "gneq;": '\U00002A88', - "gneqq;": '\U00002269', - "gnsim;": '\U000022E7', - "gopf;": '\U0001D558', - "grave;": '\U00000060', - "gscr;": '\U0000210A', - "gsim;": '\U00002273', - "gsime;": '\U00002A8E', - "gsiml;": '\U00002A90', - "gt;": '\U0000003E', - "gtcc;": '\U00002AA7', - "gtcir;": '\U00002A7A', - "gtdot;": '\U000022D7', - "gtlPar;": '\U00002995', - "gtquest;": '\U00002A7C', - "gtrapprox;": '\U00002A86', - "gtrarr;": '\U00002978', - "gtrdot;": '\U000022D7', - "gtreqless;": '\U000022DB', - "gtreqqless;": '\U00002A8C', - "gtrless;": '\U00002277', - "gtrsim;": '\U00002273', - "hArr;": '\U000021D4', - "hairsp;": '\U0000200A', - "half;": '\U000000BD', - "hamilt;": '\U0000210B', - "hardcy;": '\U0000044A', - "harr;": '\U00002194', - "harrcir;": '\U00002948', - "harrw;": '\U000021AD', - "hbar;": '\U0000210F', - "hcirc;": '\U00000125', - "hearts;": '\U00002665', - "heartsuit;": '\U00002665', - "hellip;": '\U00002026', - "hercon;": '\U000022B9', - "hfr;": '\U0001D525', - "hksearow;": '\U00002925', - "hkswarow;": '\U00002926', - "hoarr;": '\U000021FF', - "homtht;": '\U0000223B', - "hookleftarrow;": '\U000021A9', - "hookrightarrow;": '\U000021AA', - "hopf;": '\U0001D559', - "horbar;": '\U00002015', - "hscr;": '\U0001D4BD', - "hslash;": '\U0000210F', - "hstrok;": '\U00000127', - "hybull;": '\U00002043', - "hyphen;": '\U00002010', - "iacute;": '\U000000ED', - "ic;": '\U00002063', - "icirc;": '\U000000EE', - "icy;": '\U00000438', - "iecy;": '\U00000435', - "iexcl;": '\U000000A1', - "iff;": '\U000021D4', - "ifr;": '\U0001D526', - "igrave;": '\U000000EC', - "ii;": '\U00002148', - "iiiint;": '\U00002A0C', - "iiint;": '\U0000222D', - "iinfin;": '\U000029DC', - "iiota;": '\U00002129', - "ijlig;": '\U00000133', - "imacr;": '\U0000012B', - "image;": '\U00002111', - "imagline;": '\U00002110', - "imagpart;": '\U00002111', - "imath;": '\U00000131', - "imof;": '\U000022B7', - "imped;": '\U000001B5', - "in;": '\U00002208', - "incare;": '\U00002105', - "infin;": '\U0000221E', - "infintie;": '\U000029DD', - "inodot;": '\U00000131', - "int;": '\U0000222B', - "intcal;": '\U000022BA', - "integers;": '\U00002124', - "intercal;": '\U000022BA', - "intlarhk;": '\U00002A17', - "intprod;": '\U00002A3C', - "iocy;": '\U00000451', - "iogon;": '\U0000012F', - "iopf;": '\U0001D55A', - "iota;": '\U000003B9', - "iprod;": '\U00002A3C', - "iquest;": '\U000000BF', - "iscr;": '\U0001D4BE', - "isin;": '\U00002208', - "isinE;": '\U000022F9', - "isindot;": '\U000022F5', - "isins;": '\U000022F4', - "isinsv;": '\U000022F3', - "isinv;": '\U00002208', - "it;": '\U00002062', - "itilde;": '\U00000129', - "iukcy;": '\U00000456', - "iuml;": '\U000000EF', - "jcirc;": '\U00000135', - "jcy;": '\U00000439', - "jfr;": '\U0001D527', - "jmath;": '\U00000237', - "jopf;": '\U0001D55B', - "jscr;": '\U0001D4BF', - "jsercy;": '\U00000458', - "jukcy;": '\U00000454', - "kappa;": '\U000003BA', - "kappav;": '\U000003F0', - "kcedil;": '\U00000137', - "kcy;": '\U0000043A', - "kfr;": '\U0001D528', - "kgreen;": '\U00000138', - "khcy;": '\U00000445', - "kjcy;": '\U0000045C', - "kopf;": '\U0001D55C', - "kscr;": '\U0001D4C0', - "lAarr;": '\U000021DA', - "lArr;": '\U000021D0', - "lAtail;": '\U0000291B', - "lBarr;": '\U0000290E', - "lE;": '\U00002266', - "lEg;": '\U00002A8B', - "lHar;": '\U00002962', - "lacute;": '\U0000013A', - "laemptyv;": '\U000029B4', - "lagran;": '\U00002112', - "lambda;": '\U000003BB', - "lang;": '\U000027E8', - "langd;": '\U00002991', - "langle;": '\U000027E8', - "lap;": '\U00002A85', - "laquo;": '\U000000AB', - "larr;": '\U00002190', - "larrb;": '\U000021E4', - "larrbfs;": '\U0000291F', - "larrfs;": '\U0000291D', - "larrhk;": '\U000021A9', - "larrlp;": '\U000021AB', - "larrpl;": '\U00002939', - "larrsim;": '\U00002973', - "larrtl;": '\U000021A2', - "lat;": '\U00002AAB', - "latail;": '\U00002919', - "late;": '\U00002AAD', - "lbarr;": '\U0000290C', - "lbbrk;": '\U00002772', - "lbrace;": '\U0000007B', - "lbrack;": '\U0000005B', - "lbrke;": '\U0000298B', - "lbrksld;": '\U0000298F', - "lbrkslu;": '\U0000298D', - "lcaron;": '\U0000013E', - "lcedil;": '\U0000013C', - "lceil;": '\U00002308', - "lcub;": '\U0000007B', - "lcy;": '\U0000043B', - "ldca;": '\U00002936', - "ldquo;": '\U0000201C', - "ldquor;": '\U0000201E', - "ldrdhar;": '\U00002967', - "ldrushar;": '\U0000294B', - "ldsh;": '\U000021B2', - "le;": '\U00002264', - "leftarrow;": '\U00002190', - "leftarrowtail;": '\U000021A2', - "leftharpoondown;": '\U000021BD', - "leftharpoonup;": '\U000021BC', - "leftleftarrows;": '\U000021C7', - "leftrightarrow;": '\U00002194', - "leftrightarrows;": '\U000021C6', - "leftrightharpoons;": '\U000021CB', - "leftrightsquigarrow;": '\U000021AD', - "leftthreetimes;": '\U000022CB', - "leg;": '\U000022DA', - "leq;": '\U00002264', - "leqq;": '\U00002266', - "leqslant;": '\U00002A7D', - "les;": '\U00002A7D', - "lescc;": '\U00002AA8', - "lesdot;": '\U00002A7F', - "lesdoto;": '\U00002A81', - "lesdotor;": '\U00002A83', - "lesges;": '\U00002A93', - "lessapprox;": '\U00002A85', - "lessdot;": '\U000022D6', - "lesseqgtr;": '\U000022DA', - "lesseqqgtr;": '\U00002A8B', - "lessgtr;": '\U00002276', - "lesssim;": '\U00002272', - "lfisht;": '\U0000297C', - "lfloor;": '\U0000230A', - "lfr;": '\U0001D529', - "lg;": '\U00002276', - "lgE;": '\U00002A91', - "lhard;": '\U000021BD', - "lharu;": '\U000021BC', - "lharul;": '\U0000296A', - "lhblk;": '\U00002584', - "ljcy;": '\U00000459', - "ll;": '\U0000226A', - "llarr;": '\U000021C7', - "llcorner;": '\U0000231E', - "llhard;": '\U0000296B', - "lltri;": '\U000025FA', - "lmidot;": '\U00000140', - "lmoust;": '\U000023B0', - "lmoustache;": '\U000023B0', - "lnE;": '\U00002268', - "lnap;": '\U00002A89', - "lnapprox;": '\U00002A89', - "lne;": '\U00002A87', - "lneq;": '\U00002A87', - "lneqq;": '\U00002268', - "lnsim;": '\U000022E6', - "loang;": '\U000027EC', - "loarr;": '\U000021FD', - "lobrk;": '\U000027E6', - "longleftarrow;": '\U000027F5', - "longleftrightarrow;": '\U000027F7', - "longmapsto;": '\U000027FC', - "longrightarrow;": '\U000027F6', - "looparrowleft;": '\U000021AB', - "looparrowright;": '\U000021AC', - "lopar;": '\U00002985', - "lopf;": '\U0001D55D', - "loplus;": '\U00002A2D', - "lotimes;": '\U00002A34', - "lowast;": '\U00002217', - "lowbar;": '\U0000005F', - "loz;": '\U000025CA', - "lozenge;": '\U000025CA', - "lozf;": '\U000029EB', - "lpar;": '\U00000028', - "lparlt;": '\U00002993', - "lrarr;": '\U000021C6', - "lrcorner;": '\U0000231F', - "lrhar;": '\U000021CB', - "lrhard;": '\U0000296D', - "lrm;": '\U0000200E', - "lrtri;": '\U000022BF', - "lsaquo;": '\U00002039', - "lscr;": '\U0001D4C1', - "lsh;": '\U000021B0', - "lsim;": '\U00002272', - "lsime;": '\U00002A8D', - "lsimg;": '\U00002A8F', - "lsqb;": '\U0000005B', - "lsquo;": '\U00002018', - "lsquor;": '\U0000201A', - "lstrok;": '\U00000142', - "lt;": '\U0000003C', - "ltcc;": '\U00002AA6', - "ltcir;": '\U00002A79', - "ltdot;": '\U000022D6', - "lthree;": '\U000022CB', - "ltimes;": '\U000022C9', - "ltlarr;": '\U00002976', - "ltquest;": '\U00002A7B', - "ltrPar;": '\U00002996', - "ltri;": '\U000025C3', - "ltrie;": '\U000022B4', - "ltrif;": '\U000025C2', - "lurdshar;": '\U0000294A', - "luruhar;": '\U00002966', - "mDDot;": '\U0000223A', - "macr;": '\U000000AF', - "male;": '\U00002642', - "malt;": '\U00002720', - "maltese;": '\U00002720', - "map;": '\U000021A6', - "mapsto;": '\U000021A6', - "mapstodown;": '\U000021A7', - "mapstoleft;": '\U000021A4', - "mapstoup;": '\U000021A5', - "marker;": '\U000025AE', - "mcomma;": '\U00002A29', - "mcy;": '\U0000043C', - "mdash;": '\U00002014', - "measuredangle;": '\U00002221', - "mfr;": '\U0001D52A', - "mho;": '\U00002127', - "micro;": '\U000000B5', - "mid;": '\U00002223', - "midast;": '\U0000002A', - "midcir;": '\U00002AF0', - "middot;": '\U000000B7', - "minus;": '\U00002212', - "minusb;": '\U0000229F', - "minusd;": '\U00002238', - "minusdu;": '\U00002A2A', - "mlcp;": '\U00002ADB', - "mldr;": '\U00002026', - "mnplus;": '\U00002213', - "models;": '\U000022A7', - "mopf;": '\U0001D55E', - "mp;": '\U00002213', - "mscr;": '\U0001D4C2', - "mstpos;": '\U0000223E', - "mu;": '\U000003BC', - "multimap;": '\U000022B8', - "mumap;": '\U000022B8', - "nLeftarrow;": '\U000021CD', - "nLeftrightarrow;": '\U000021CE', - "nRightarrow;": '\U000021CF', - "nVDash;": '\U000022AF', - "nVdash;": '\U000022AE', - "nabla;": '\U00002207', - "nacute;": '\U00000144', - "nap;": '\U00002249', - "napos;": '\U00000149', - "napprox;": '\U00002249', - "natur;": '\U0000266E', - "natural;": '\U0000266E', - "naturals;": '\U00002115', - "nbsp;": '\U000000A0', - "ncap;": '\U00002A43', - "ncaron;": '\U00000148', - "ncedil;": '\U00000146', - "ncong;": '\U00002247', - "ncup;": '\U00002A42', - "ncy;": '\U0000043D', - "ndash;": '\U00002013', - "ne;": '\U00002260', - "neArr;": '\U000021D7', - "nearhk;": '\U00002924', - "nearr;": '\U00002197', - "nearrow;": '\U00002197', - "nequiv;": '\U00002262', - "nesear;": '\U00002928', - "nexist;": '\U00002204', - "nexists;": '\U00002204', - "nfr;": '\U0001D52B', - "nge;": '\U00002271', - "ngeq;": '\U00002271', - "ngsim;": '\U00002275', - "ngt;": '\U0000226F', - "ngtr;": '\U0000226F', - "nhArr;": '\U000021CE', - "nharr;": '\U000021AE', - "nhpar;": '\U00002AF2', - "ni;": '\U0000220B', - "nis;": '\U000022FC', - "nisd;": '\U000022FA', - "niv;": '\U0000220B', - "njcy;": '\U0000045A', - "nlArr;": '\U000021CD', - "nlarr;": '\U0000219A', - "nldr;": '\U00002025', - "nle;": '\U00002270', - "nleftarrow;": '\U0000219A', - "nleftrightarrow;": '\U000021AE', - "nleq;": '\U00002270', - "nless;": '\U0000226E', - "nlsim;": '\U00002274', - "nlt;": '\U0000226E', - "nltri;": '\U000022EA', - "nltrie;": '\U000022EC', - "nmid;": '\U00002224', - "nopf;": '\U0001D55F', - "not;": '\U000000AC', - "notin;": '\U00002209', - "notinva;": '\U00002209', - "notinvb;": '\U000022F7', - "notinvc;": '\U000022F6', - "notni;": '\U0000220C', - "notniva;": '\U0000220C', - "notnivb;": '\U000022FE', - "notnivc;": '\U000022FD', - "npar;": '\U00002226', - "nparallel;": '\U00002226', - "npolint;": '\U00002A14', - "npr;": '\U00002280', - "nprcue;": '\U000022E0', - "nprec;": '\U00002280', - "nrArr;": '\U000021CF', - "nrarr;": '\U0000219B', - "nrightarrow;": '\U0000219B', - "nrtri;": '\U000022EB', - "nrtrie;": '\U000022ED', - "nsc;": '\U00002281', - "nsccue;": '\U000022E1', - "nscr;": '\U0001D4C3', - "nshortmid;": '\U00002224', - "nshortparallel;": '\U00002226', - "nsim;": '\U00002241', - "nsime;": '\U00002244', - "nsimeq;": '\U00002244', - "nsmid;": '\U00002224', - "nspar;": '\U00002226', - "nsqsube;": '\U000022E2', - "nsqsupe;": '\U000022E3', - "nsub;": '\U00002284', - "nsube;": '\U00002288', - "nsubseteq;": '\U00002288', - "nsucc;": '\U00002281', - "nsup;": '\U00002285', - "nsupe;": '\U00002289', - "nsupseteq;": '\U00002289', - "ntgl;": '\U00002279', - "ntilde;": '\U000000F1', - "ntlg;": '\U00002278', - "ntriangleleft;": '\U000022EA', - "ntrianglelefteq;": '\U000022EC', - "ntriangleright;": '\U000022EB', - "ntrianglerighteq;": '\U000022ED', - "nu;": '\U000003BD', - "num;": '\U00000023', - "numero;": '\U00002116', - "numsp;": '\U00002007', - "nvDash;": '\U000022AD', - "nvHarr;": '\U00002904', - "nvdash;": '\U000022AC', - "nvinfin;": '\U000029DE', - "nvlArr;": '\U00002902', - "nvrArr;": '\U00002903', - "nwArr;": '\U000021D6', - "nwarhk;": '\U00002923', - "nwarr;": '\U00002196', - "nwarrow;": '\U00002196', - "nwnear;": '\U00002927', - "oS;": '\U000024C8', - "oacute;": '\U000000F3', - "oast;": '\U0000229B', - "ocir;": '\U0000229A', - "ocirc;": '\U000000F4', - "ocy;": '\U0000043E', - "odash;": '\U0000229D', - "odblac;": '\U00000151', - "odiv;": '\U00002A38', - "odot;": '\U00002299', - "odsold;": '\U000029BC', - "oelig;": '\U00000153', - "ofcir;": '\U000029BF', - "ofr;": '\U0001D52C', - "ogon;": '\U000002DB', - "ograve;": '\U000000F2', - "ogt;": '\U000029C1', - "ohbar;": '\U000029B5', - "ohm;": '\U000003A9', - "oint;": '\U0000222E', - "olarr;": '\U000021BA', - "olcir;": '\U000029BE', - "olcross;": '\U000029BB', - "oline;": '\U0000203E', - "olt;": '\U000029C0', - "omacr;": '\U0000014D', - "omega;": '\U000003C9', - "omicron;": '\U000003BF', - "omid;": '\U000029B6', - "ominus;": '\U00002296', - "oopf;": '\U0001D560', - "opar;": '\U000029B7', - "operp;": '\U000029B9', - "oplus;": '\U00002295', - "or;": '\U00002228', - "orarr;": '\U000021BB', - "ord;": '\U00002A5D', - "order;": '\U00002134', - "orderof;": '\U00002134', - "ordf;": '\U000000AA', - "ordm;": '\U000000BA', - "origof;": '\U000022B6', - "oror;": '\U00002A56', - "orslope;": '\U00002A57', - "orv;": '\U00002A5B', - "oscr;": '\U00002134', - "oslash;": '\U000000F8', - "osol;": '\U00002298', - "otilde;": '\U000000F5', - "otimes;": '\U00002297', - "otimesas;": '\U00002A36', - "ouml;": '\U000000F6', - "ovbar;": '\U0000233D', - "par;": '\U00002225', - "para;": '\U000000B6', - "parallel;": '\U00002225', - "parsim;": '\U00002AF3', - "parsl;": '\U00002AFD', - "part;": '\U00002202', - "pcy;": '\U0000043F', - "percnt;": '\U00000025', - "period;": '\U0000002E', - "permil;": '\U00002030', - "perp;": '\U000022A5', - "pertenk;": '\U00002031', - "pfr;": '\U0001D52D', - "phi;": '\U000003C6', - "phiv;": '\U000003D5', - "phmmat;": '\U00002133', - "phone;": '\U0000260E', - "pi;": '\U000003C0', - "pitchfork;": '\U000022D4', - "piv;": '\U000003D6', - "planck;": '\U0000210F', - "planckh;": '\U0000210E', - "plankv;": '\U0000210F', - "plus;": '\U0000002B', - "plusacir;": '\U00002A23', - "plusb;": '\U0000229E', - "pluscir;": '\U00002A22', - "plusdo;": '\U00002214', - "plusdu;": '\U00002A25', - "pluse;": '\U00002A72', - "plusmn;": '\U000000B1', - "plussim;": '\U00002A26', - "plustwo;": '\U00002A27', - "pm;": '\U000000B1', - "pointint;": '\U00002A15', - "popf;": '\U0001D561', - "pound;": '\U000000A3', - "pr;": '\U0000227A', - "prE;": '\U00002AB3', - "prap;": '\U00002AB7', - "prcue;": '\U0000227C', - "pre;": '\U00002AAF', - "prec;": '\U0000227A', - "precapprox;": '\U00002AB7', - "preccurlyeq;": '\U0000227C', - "preceq;": '\U00002AAF', - "precnapprox;": '\U00002AB9', - "precneqq;": '\U00002AB5', - "precnsim;": '\U000022E8', - "precsim;": '\U0000227E', - "prime;": '\U00002032', - "primes;": '\U00002119', - "prnE;": '\U00002AB5', - "prnap;": '\U00002AB9', - "prnsim;": '\U000022E8', - "prod;": '\U0000220F', - "profalar;": '\U0000232E', - "profline;": '\U00002312', - "profsurf;": '\U00002313', - "prop;": '\U0000221D', - "propto;": '\U0000221D', - "prsim;": '\U0000227E', - "prurel;": '\U000022B0', - "pscr;": '\U0001D4C5', - "psi;": '\U000003C8', - "puncsp;": '\U00002008', - "qfr;": '\U0001D52E', - "qint;": '\U00002A0C', - "qopf;": '\U0001D562', - "qprime;": '\U00002057', - "qscr;": '\U0001D4C6', - "quaternions;": '\U0000210D', - "quatint;": '\U00002A16', - "quest;": '\U0000003F', - "questeq;": '\U0000225F', - "quot;": '\U00000022', - "rAarr;": '\U000021DB', - "rArr;": '\U000021D2', - "rAtail;": '\U0000291C', - "rBarr;": '\U0000290F', - "rHar;": '\U00002964', - "racute;": '\U00000155', - "radic;": '\U0000221A', - "raemptyv;": '\U000029B3', - "rang;": '\U000027E9', - "rangd;": '\U00002992', - "range;": '\U000029A5', - "rangle;": '\U000027E9', - "raquo;": '\U000000BB', - "rarr;": '\U00002192', - "rarrap;": '\U00002975', - "rarrb;": '\U000021E5', - "rarrbfs;": '\U00002920', - "rarrc;": '\U00002933', - "rarrfs;": '\U0000291E', - "rarrhk;": '\U000021AA', - "rarrlp;": '\U000021AC', - "rarrpl;": '\U00002945', - "rarrsim;": '\U00002974', - "rarrtl;": '\U000021A3', - "rarrw;": '\U0000219D', - "ratail;": '\U0000291A', - "ratio;": '\U00002236', - "rationals;": '\U0000211A', - "rbarr;": '\U0000290D', - "rbbrk;": '\U00002773', - "rbrace;": '\U0000007D', - "rbrack;": '\U0000005D', - "rbrke;": '\U0000298C', - "rbrksld;": '\U0000298E', - "rbrkslu;": '\U00002990', - "rcaron;": '\U00000159', - "rcedil;": '\U00000157', - "rceil;": '\U00002309', - "rcub;": '\U0000007D', - "rcy;": '\U00000440', - "rdca;": '\U00002937', - "rdldhar;": '\U00002969', - "rdquo;": '\U0000201D', - "rdquor;": '\U0000201D', - "rdsh;": '\U000021B3', - "real;": '\U0000211C', - "realine;": '\U0000211B', - "realpart;": '\U0000211C', - "reals;": '\U0000211D', - "rect;": '\U000025AD', - "reg;": '\U000000AE', - "rfisht;": '\U0000297D', - "rfloor;": '\U0000230B', - "rfr;": '\U0001D52F', - "rhard;": '\U000021C1', - "rharu;": '\U000021C0', - "rharul;": '\U0000296C', - "rho;": '\U000003C1', - "rhov;": '\U000003F1', - "rightarrow;": '\U00002192', - "rightarrowtail;": '\U000021A3', - "rightharpoondown;": '\U000021C1', - "rightharpoonup;": '\U000021C0', - "rightleftarrows;": '\U000021C4', - "rightleftharpoons;": '\U000021CC', - "rightrightarrows;": '\U000021C9', - "rightsquigarrow;": '\U0000219D', - "rightthreetimes;": '\U000022CC', - "ring;": '\U000002DA', - "risingdotseq;": '\U00002253', - "rlarr;": '\U000021C4', - "rlhar;": '\U000021CC', - "rlm;": '\U0000200F', - "rmoust;": '\U000023B1', - "rmoustache;": '\U000023B1', - "rnmid;": '\U00002AEE', - "roang;": '\U000027ED', - "roarr;": '\U000021FE', - "robrk;": '\U000027E7', - "ropar;": '\U00002986', - "ropf;": '\U0001D563', - "roplus;": '\U00002A2E', - "rotimes;": '\U00002A35', - "rpar;": '\U00000029', - "rpargt;": '\U00002994', - "rppolint;": '\U00002A12', - "rrarr;": '\U000021C9', - "rsaquo;": '\U0000203A', - "rscr;": '\U0001D4C7', - "rsh;": '\U000021B1', - "rsqb;": '\U0000005D', - "rsquo;": '\U00002019', - "rsquor;": '\U00002019', - "rthree;": '\U000022CC', - "rtimes;": '\U000022CA', - "rtri;": '\U000025B9', - "rtrie;": '\U000022B5', - "rtrif;": '\U000025B8', - "rtriltri;": '\U000029CE', - "ruluhar;": '\U00002968', - "rx;": '\U0000211E', - "sacute;": '\U0000015B', - "sbquo;": '\U0000201A', - "sc;": '\U0000227B', - "scE;": '\U00002AB4', - "scap;": '\U00002AB8', - "scaron;": '\U00000161', - "sccue;": '\U0000227D', - "sce;": '\U00002AB0', - "scedil;": '\U0000015F', - "scirc;": '\U0000015D', - "scnE;": '\U00002AB6', - "scnap;": '\U00002ABA', - "scnsim;": '\U000022E9', - "scpolint;": '\U00002A13', - "scsim;": '\U0000227F', - "scy;": '\U00000441', - "sdot;": '\U000022C5', - "sdotb;": '\U000022A1', - "sdote;": '\U00002A66', - "seArr;": '\U000021D8', - "searhk;": '\U00002925', - "searr;": '\U00002198', - "searrow;": '\U00002198', - "sect;": '\U000000A7', - "semi;": '\U0000003B', - "seswar;": '\U00002929', - "setminus;": '\U00002216', - "setmn;": '\U00002216', - "sext;": '\U00002736', - "sfr;": '\U0001D530', - "sfrown;": '\U00002322', - "sharp;": '\U0000266F', - "shchcy;": '\U00000449', - "shcy;": '\U00000448', - "shortmid;": '\U00002223', - "shortparallel;": '\U00002225', - "shy;": '\U000000AD', - "sigma;": '\U000003C3', - "sigmaf;": '\U000003C2', - "sigmav;": '\U000003C2', - "sim;": '\U0000223C', - "simdot;": '\U00002A6A', - "sime;": '\U00002243', - "simeq;": '\U00002243', - "simg;": '\U00002A9E', - "simgE;": '\U00002AA0', - "siml;": '\U00002A9D', - "simlE;": '\U00002A9F', - "simne;": '\U00002246', - "simplus;": '\U00002A24', - "simrarr;": '\U00002972', - "slarr;": '\U00002190', - "smallsetminus;": '\U00002216', - "smashp;": '\U00002A33', - "smeparsl;": '\U000029E4', - "smid;": '\U00002223', - "smile;": '\U00002323', - "smt;": '\U00002AAA', - "smte;": '\U00002AAC', - "softcy;": '\U0000044C', - "sol;": '\U0000002F', - "solb;": '\U000029C4', - "solbar;": '\U0000233F', - "sopf;": '\U0001D564', - "spades;": '\U00002660', - "spadesuit;": '\U00002660', - "spar;": '\U00002225', - "sqcap;": '\U00002293', - "sqcup;": '\U00002294', - "sqsub;": '\U0000228F', - "sqsube;": '\U00002291', - "sqsubset;": '\U0000228F', - "sqsubseteq;": '\U00002291', - "sqsup;": '\U00002290', - "sqsupe;": '\U00002292', - "sqsupset;": '\U00002290', - "sqsupseteq;": '\U00002292', - "squ;": '\U000025A1', - "square;": '\U000025A1', - "squarf;": '\U000025AA', - "squf;": '\U000025AA', - "srarr;": '\U00002192', - "sscr;": '\U0001D4C8', - "ssetmn;": '\U00002216', - "ssmile;": '\U00002323', - "sstarf;": '\U000022C6', - "star;": '\U00002606', - "starf;": '\U00002605', - "straightepsilon;": '\U000003F5', - "straightphi;": '\U000003D5', - "strns;": '\U000000AF', - "sub;": '\U00002282', - "subE;": '\U00002AC5', - "subdot;": '\U00002ABD', - "sube;": '\U00002286', - "subedot;": '\U00002AC3', - "submult;": '\U00002AC1', - "subnE;": '\U00002ACB', - "subne;": '\U0000228A', - "subplus;": '\U00002ABF', - "subrarr;": '\U00002979', - "subset;": '\U00002282', - "subseteq;": '\U00002286', - "subseteqq;": '\U00002AC5', - "subsetneq;": '\U0000228A', - "subsetneqq;": '\U00002ACB', - "subsim;": '\U00002AC7', - "subsub;": '\U00002AD5', - "subsup;": '\U00002AD3', - "succ;": '\U0000227B', - "succapprox;": '\U00002AB8', - "succcurlyeq;": '\U0000227D', - "succeq;": '\U00002AB0', - "succnapprox;": '\U00002ABA', - "succneqq;": '\U00002AB6', - "succnsim;": '\U000022E9', - "succsim;": '\U0000227F', - "sum;": '\U00002211', - "sung;": '\U0000266A', - "sup;": '\U00002283', - "sup1;": '\U000000B9', - "sup2;": '\U000000B2', - "sup3;": '\U000000B3', - "supE;": '\U00002AC6', - "supdot;": '\U00002ABE', - "supdsub;": '\U00002AD8', - "supe;": '\U00002287', - "supedot;": '\U00002AC4', - "suphsol;": '\U000027C9', - "suphsub;": '\U00002AD7', - "suplarr;": '\U0000297B', - "supmult;": '\U00002AC2', - "supnE;": '\U00002ACC', - "supne;": '\U0000228B', - "supplus;": '\U00002AC0', - "supset;": '\U00002283', - "supseteq;": '\U00002287', - "supseteqq;": '\U00002AC6', - "supsetneq;": '\U0000228B', - "supsetneqq;": '\U00002ACC', - "supsim;": '\U00002AC8', - "supsub;": '\U00002AD4', - "supsup;": '\U00002AD6', - "swArr;": '\U000021D9', - "swarhk;": '\U00002926', - "swarr;": '\U00002199', - "swarrow;": '\U00002199', - "swnwar;": '\U0000292A', - "szlig;": '\U000000DF', - "target;": '\U00002316', - "tau;": '\U000003C4', - "tbrk;": '\U000023B4', - "tcaron;": '\U00000165', - "tcedil;": '\U00000163', - "tcy;": '\U00000442', - "tdot;": '\U000020DB', - "telrec;": '\U00002315', - "tfr;": '\U0001D531', - "there4;": '\U00002234', - "therefore;": '\U00002234', - "theta;": '\U000003B8', - "thetasym;": '\U000003D1', - "thetav;": '\U000003D1', - "thickapprox;": '\U00002248', - "thicksim;": '\U0000223C', - "thinsp;": '\U00002009', - "thkap;": '\U00002248', - "thksim;": '\U0000223C', - "thorn;": '\U000000FE', - "tilde;": '\U000002DC', - "times;": '\U000000D7', - "timesb;": '\U000022A0', - "timesbar;": '\U00002A31', - "timesd;": '\U00002A30', - "tint;": '\U0000222D', - "toea;": '\U00002928', - "top;": '\U000022A4', - "topbot;": '\U00002336', - "topcir;": '\U00002AF1', - "topf;": '\U0001D565', - "topfork;": '\U00002ADA', - "tosa;": '\U00002929', - "tprime;": '\U00002034', - "trade;": '\U00002122', - "triangle;": '\U000025B5', - "triangledown;": '\U000025BF', - "triangleleft;": '\U000025C3', - "trianglelefteq;": '\U000022B4', - "triangleq;": '\U0000225C', - "triangleright;": '\U000025B9', - "trianglerighteq;": '\U000022B5', - "tridot;": '\U000025EC', - "trie;": '\U0000225C', - "triminus;": '\U00002A3A', - "triplus;": '\U00002A39', - "trisb;": '\U000029CD', - "tritime;": '\U00002A3B', - "trpezium;": '\U000023E2', - "tscr;": '\U0001D4C9', - "tscy;": '\U00000446', - "tshcy;": '\U0000045B', - "tstrok;": '\U00000167', - "twixt;": '\U0000226C', - "twoheadleftarrow;": '\U0000219E', - "twoheadrightarrow;": '\U000021A0', - "uArr;": '\U000021D1', - "uHar;": '\U00002963', - "uacute;": '\U000000FA', - "uarr;": '\U00002191', - "ubrcy;": '\U0000045E', - "ubreve;": '\U0000016D', - "ucirc;": '\U000000FB', - "ucy;": '\U00000443', - "udarr;": '\U000021C5', - "udblac;": '\U00000171', - "udhar;": '\U0000296E', - "ufisht;": '\U0000297E', - "ufr;": '\U0001D532', - "ugrave;": '\U000000F9', - "uharl;": '\U000021BF', - "uharr;": '\U000021BE', - "uhblk;": '\U00002580', - "ulcorn;": '\U0000231C', - "ulcorner;": '\U0000231C', - "ulcrop;": '\U0000230F', - "ultri;": '\U000025F8', - "umacr;": '\U0000016B', - "uml;": '\U000000A8', - "uogon;": '\U00000173', - "uopf;": '\U0001D566', - "uparrow;": '\U00002191', - "updownarrow;": '\U00002195', - "upharpoonleft;": '\U000021BF', - "upharpoonright;": '\U000021BE', - "uplus;": '\U0000228E', - "upsi;": '\U000003C5', - "upsih;": '\U000003D2', - "upsilon;": '\U000003C5', - "upuparrows;": '\U000021C8', - "urcorn;": '\U0000231D', - "urcorner;": '\U0000231D', - "urcrop;": '\U0000230E', - "uring;": '\U0000016F', - "urtri;": '\U000025F9', - "uscr;": '\U0001D4CA', - "utdot;": '\U000022F0', - "utilde;": '\U00000169', - "utri;": '\U000025B5', - "utrif;": '\U000025B4', - "uuarr;": '\U000021C8', - "uuml;": '\U000000FC', - "uwangle;": '\U000029A7', - "vArr;": '\U000021D5', - "vBar;": '\U00002AE8', - "vBarv;": '\U00002AE9', - "vDash;": '\U000022A8', - "vangrt;": '\U0000299C', - "varepsilon;": '\U000003F5', - "varkappa;": '\U000003F0', - "varnothing;": '\U00002205', - "varphi;": '\U000003D5', - "varpi;": '\U000003D6', - "varpropto;": '\U0000221D', - "varr;": '\U00002195', - "varrho;": '\U000003F1', - "varsigma;": '\U000003C2', - "vartheta;": '\U000003D1', - "vartriangleleft;": '\U000022B2', - "vartriangleright;": '\U000022B3', - "vcy;": '\U00000432', - "vdash;": '\U000022A2', - "vee;": '\U00002228', - "veebar;": '\U000022BB', - "veeeq;": '\U0000225A', - "vellip;": '\U000022EE', - "verbar;": '\U0000007C', - "vert;": '\U0000007C', - "vfr;": '\U0001D533', - "vltri;": '\U000022B2', - "vopf;": '\U0001D567', - "vprop;": '\U0000221D', - "vrtri;": '\U000022B3', - "vscr;": '\U0001D4CB', - "vzigzag;": '\U0000299A', - "wcirc;": '\U00000175', - "wedbar;": '\U00002A5F', - "wedge;": '\U00002227', - "wedgeq;": '\U00002259', - "weierp;": '\U00002118', - "wfr;": '\U0001D534', - "wopf;": '\U0001D568', - "wp;": '\U00002118', - "wr;": '\U00002240', - "wreath;": '\U00002240', - "wscr;": '\U0001D4CC', - "xcap;": '\U000022C2', - "xcirc;": '\U000025EF', - "xcup;": '\U000022C3', - "xdtri;": '\U000025BD', - "xfr;": '\U0001D535', - "xhArr;": '\U000027FA', - "xharr;": '\U000027F7', - "xi;": '\U000003BE', - "xlArr;": '\U000027F8', - "xlarr;": '\U000027F5', - "xmap;": '\U000027FC', - "xnis;": '\U000022FB', - "xodot;": '\U00002A00', - "xopf;": '\U0001D569', - "xoplus;": '\U00002A01', - "xotime;": '\U00002A02', - "xrArr;": '\U000027F9', - "xrarr;": '\U000027F6', - "xscr;": '\U0001D4CD', - "xsqcup;": '\U00002A06', - "xuplus;": '\U00002A04', - "xutri;": '\U000025B3', - "xvee;": '\U000022C1', - "xwedge;": '\U000022C0', - "yacute;": '\U000000FD', - "yacy;": '\U0000044F', - "ycirc;": '\U00000177', - "ycy;": '\U0000044B', - "yen;": '\U000000A5', - "yfr;": '\U0001D536', - "yicy;": '\U00000457', - "yopf;": '\U0001D56A', - "yscr;": '\U0001D4CE', - "yucy;": '\U0000044E', - "yuml;": '\U000000FF', - "zacute;": '\U0000017A', - "zcaron;": '\U0000017E', - "zcy;": '\U00000437', - "zdot;": '\U0000017C', - "zeetrf;": '\U00002128', - "zeta;": '\U000003B6', - "zfr;": '\U0001D537', - "zhcy;": '\U00000436', - "zigrarr;": '\U000021DD', - "zopf;": '\U0001D56B', - "zscr;": '\U0001D4CF', - "zwj;": '\U0000200D', - "zwnj;": '\U0000200C', - "AElig": '\U000000C6', - "AMP": '\U00000026', - "Aacute": '\U000000C1', - "Acirc": '\U000000C2', - "Agrave": '\U000000C0', - "Aring": '\U000000C5', - "Atilde": '\U000000C3', - "Auml": '\U000000C4', - "COPY": '\U000000A9', - "Ccedil": '\U000000C7', - "ETH": '\U000000D0', - "Eacute": '\U000000C9', - "Ecirc": '\U000000CA', - "Egrave": '\U000000C8', - "Euml": '\U000000CB', - "GT": '\U0000003E', - "Iacute": '\U000000CD', - "Icirc": '\U000000CE', - "Igrave": '\U000000CC', - "Iuml": '\U000000CF', - "LT": '\U0000003C', - "Ntilde": '\U000000D1', - "Oacute": '\U000000D3', - "Ocirc": '\U000000D4', - "Ograve": '\U000000D2', - "Oslash": '\U000000D8', - "Otilde": '\U000000D5', - "Ouml": '\U000000D6', - "QUOT": '\U00000022', - "REG": '\U000000AE', - "THORN": '\U000000DE', - "Uacute": '\U000000DA', - "Ucirc": '\U000000DB', - "Ugrave": '\U000000D9', - "Uuml": '\U000000DC', - "Yacute": '\U000000DD', - "aacute": '\U000000E1', - "acirc": '\U000000E2', - "acute": '\U000000B4', - "aelig": '\U000000E6', - "agrave": '\U000000E0', - "amp": '\U00000026', - "aring": '\U000000E5', - "atilde": '\U000000E3', - "auml": '\U000000E4', - "brvbar": '\U000000A6', - "ccedil": '\U000000E7', - "cedil": '\U000000B8', - "cent": '\U000000A2', - "copy": '\U000000A9', - "curren": '\U000000A4', - "deg": '\U000000B0', - "divide": '\U000000F7', - "eacute": '\U000000E9', - "ecirc": '\U000000EA', - "egrave": '\U000000E8', - "eth": '\U000000F0', - "euml": '\U000000EB', - "frac12": '\U000000BD', - "frac14": '\U000000BC', - "frac34": '\U000000BE', - "gt": '\U0000003E', - "iacute": '\U000000ED', - "icirc": '\U000000EE', - "iexcl": '\U000000A1', - "igrave": '\U000000EC', - "iquest": '\U000000BF', - "iuml": '\U000000EF', - "laquo": '\U000000AB', - "lt": '\U0000003C', - "macr": '\U000000AF', - "micro": '\U000000B5', - "middot": '\U000000B7', - "nbsp": '\U000000A0', - "not": '\U000000AC', - "ntilde": '\U000000F1', - "oacute": '\U000000F3', - "ocirc": '\U000000F4', - "ograve": '\U000000F2', - "ordf": '\U000000AA', - "ordm": '\U000000BA', - "oslash": '\U000000F8', - "otilde": '\U000000F5', - "ouml": '\U000000F6', - "para": '\U000000B6', - "plusmn": '\U000000B1', - "pound": '\U000000A3', - "quot": '\U00000022', - "raquo": '\U000000BB', - "reg": '\U000000AE', - "sect": '\U000000A7', - "shy": '\U000000AD', - "sup1": '\U000000B9', - "sup2": '\U000000B2', - "sup3": '\U000000B3', - "szlig": '\U000000DF', - "thorn": '\U000000FE', - "times": '\U000000D7', - "uacute": '\U000000FA', - "ucirc": '\U000000FB', - "ugrave": '\U000000F9', - "uml": '\U000000A8', - "uuml": '\U000000FC', - "yacute": '\U000000FD', - "yen": '\U000000A5', - "yuml": '\U000000FF', + "Cross;": '\U00002A2F', + "Cscr;": '\U0001D49E', + "Cup;": '\U000022D3', + "CupCap;": '\U0000224D', + "DD;": '\U00002145', + "DDotrahd;": '\U00002911', + "DJcy;": '\U00000402', + "DScy;": '\U00000405', + "DZcy;": '\U0000040F', + "Dagger;": '\U00002021', + "Darr;": '\U000021A1', + "Dashv;": '\U00002AE4', + "Dcaron;": '\U0000010E', + "Dcy;": '\U00000414', + "Del;": '\U00002207', + "Delta;": '\U00000394', + "Dfr;": '\U0001D507', + "DiacriticalAcute;": '\U000000B4', + "DiacriticalDot;": '\U000002D9', + "DiacriticalDoubleAcute;": '\U000002DD', + "DiacriticalGrave;": '\U00000060', + "DiacriticalTilde;": '\U000002DC', + "Diamond;": '\U000022C4', + "DifferentialD;": '\U00002146', + "Dopf;": '\U0001D53B', + "Dot;": '\U000000A8', + "DotDot;": '\U000020DC', + "DotEqual;": '\U00002250', + "DoubleContourIntegral;": '\U0000222F', + "DoubleDot;": '\U000000A8', + "DoubleDownArrow;": '\U000021D3', + "DoubleLeftArrow;": '\U000021D0', + "DoubleLeftRightArrow;": '\U000021D4', + "DoubleLeftTee;": '\U00002AE4', + "DoubleLongLeftArrow;": '\U000027F8', + "DoubleLongLeftRightArrow;": '\U000027FA', + "DoubleLongRightArrow;": '\U000027F9', + "DoubleRightArrow;": '\U000021D2', + "DoubleRightTee;": '\U000022A8', + "DoubleUpArrow;": '\U000021D1', + "DoubleUpDownArrow;": '\U000021D5', + "DoubleVerticalBar;": '\U00002225', + "DownArrow;": '\U00002193', + "DownArrowBar;": '\U00002913', + "DownArrowUpArrow;": '\U000021F5', + "DownBreve;": '\U00000311', + "DownLeftRightVector;": '\U00002950', + "DownLeftTeeVector;": '\U0000295E', + "DownLeftVector;": '\U000021BD', + "DownLeftVectorBar;": '\U00002956', + "DownRightTeeVector;": '\U0000295F', + "DownRightVector;": '\U000021C1', + "DownRightVectorBar;": '\U00002957', + "DownTee;": '\U000022A4', + "DownTeeArrow;": '\U000021A7', + "Downarrow;": '\U000021D3', + "Dscr;": '\U0001D49F', + "Dstrok;": '\U00000110', + "ENG;": '\U0000014A', + "ETH;": '\U000000D0', + "Eacute;": '\U000000C9', + "Ecaron;": '\U0000011A', + "Ecirc;": '\U000000CA', + "Ecy;": '\U0000042D', + "Edot;": '\U00000116', + "Efr;": '\U0001D508', + "Egrave;": '\U000000C8', + "Element;": '\U00002208', + "Emacr;": '\U00000112', + "EmptySmallSquare;": '\U000025FB', + "EmptyVerySmallSquare;": '\U000025AB', + "Eogon;": '\U00000118', + "Eopf;": '\U0001D53C', + "Epsilon;": '\U00000395', + "Equal;": '\U00002A75', + "EqualTilde;": '\U00002242', + "Equilibrium;": '\U000021CC', + "Escr;": '\U00002130', + "Esim;": '\U00002A73', + "Eta;": '\U00000397', + "Euml;": '\U000000CB', + "Exists;": '\U00002203', + "ExponentialE;": '\U00002147', + "Fcy;": '\U00000424', + "Ffr;": '\U0001D509', + "FilledSmallSquare;": '\U000025FC', + "FilledVerySmallSquare;": '\U000025AA', + "Fopf;": '\U0001D53D', + "ForAll;": '\U00002200', + "Fouriertrf;": '\U00002131', + "Fscr;": '\U00002131', + "GJcy;": '\U00000403', + "GT;": '\U0000003E', + "Gamma;": '\U00000393', + "Gammad;": '\U000003DC', + "Gbreve;": '\U0000011E', + "Gcedil;": '\U00000122', + "Gcirc;": '\U0000011C', + "Gcy;": '\U00000413', + "Gdot;": '\U00000120', + "Gfr;": '\U0001D50A', + "Gg;": '\U000022D9', + "Gopf;": '\U0001D53E', + "GreaterEqual;": '\U00002265', + "GreaterEqualLess;": '\U000022DB', + "GreaterFullEqual;": '\U00002267', + "GreaterGreater;": '\U00002AA2', + "GreaterLess;": '\U00002277', + "GreaterSlantEqual;": '\U00002A7E', + "GreaterTilde;": '\U00002273', + "Gscr;": '\U0001D4A2', + "Gt;": '\U0000226B', + "HARDcy;": '\U0000042A', + "Hacek;": '\U000002C7', + "Hat;": '\U0000005E', + "Hcirc;": '\U00000124', + "Hfr;": '\U0000210C', + "HilbertSpace;": '\U0000210B', + "Hopf;": '\U0000210D', + "HorizontalLine;": '\U00002500', + "Hscr;": '\U0000210B', + "Hstrok;": '\U00000126', + "HumpDownHump;": '\U0000224E', + "HumpEqual;": '\U0000224F', + "IEcy;": '\U00000415', + "IJlig;": '\U00000132', + "IOcy;": '\U00000401', + "Iacute;": '\U000000CD', + "Icirc;": '\U000000CE', + "Icy;": '\U00000418', + "Idot;": '\U00000130', + "Ifr;": '\U00002111', + "Igrave;": '\U000000CC', + "Im;": '\U00002111', + "Imacr;": '\U0000012A', + "ImaginaryI;": '\U00002148', + "Implies;": '\U000021D2', + "Int;": '\U0000222C', + "Integral;": '\U0000222B', + "Intersection;": '\U000022C2', + "InvisibleComma;": '\U00002063', + "InvisibleTimes;": '\U00002062', + "Iogon;": '\U0000012E', + "Iopf;": '\U0001D540', + "Iota;": '\U00000399', + "Iscr;": '\U00002110', + "Itilde;": '\U00000128', + "Iukcy;": '\U00000406', + "Iuml;": '\U000000CF', + "Jcirc;": '\U00000134', + "Jcy;": '\U00000419', + "Jfr;": '\U0001D50D', + "Jopf;": '\U0001D541', + "Jscr;": '\U0001D4A5', + "Jsercy;": '\U00000408', + "Jukcy;": '\U00000404', + "KHcy;": '\U00000425', + "KJcy;": '\U0000040C', + "Kappa;": '\U0000039A', + "Kcedil;": '\U00000136', + "Kcy;": '\U0000041A', + "Kfr;": '\U0001D50E', + "Kopf;": '\U0001D542', + "Kscr;": '\U0001D4A6', + "LJcy;": '\U00000409', + "LT;": '\U0000003C', + "Lacute;": '\U00000139', + "Lambda;": '\U0000039B', + "Lang;": '\U000027EA', + "Laplacetrf;": '\U00002112', + "Larr;": '\U0000219E', + "Lcaron;": '\U0000013D', + "Lcedil;": '\U0000013B', + "Lcy;": '\U0000041B', + "LeftAngleBracket;": '\U000027E8', + "LeftArrow;": '\U00002190', + "LeftArrowBar;": '\U000021E4', + "LeftArrowRightArrow;": '\U000021C6', + "LeftCeiling;": '\U00002308', + "LeftDoubleBracket;": '\U000027E6', + "LeftDownTeeVector;": '\U00002961', + "LeftDownVector;": '\U000021C3', + "LeftDownVectorBar;": '\U00002959', + "LeftFloor;": '\U0000230A', + "LeftRightArrow;": '\U00002194', + "LeftRightVector;": '\U0000294E', + "LeftTee;": '\U000022A3', + "LeftTeeArrow;": '\U000021A4', + "LeftTeeVector;": '\U0000295A', + "LeftTriangle;": '\U000022B2', + "LeftTriangleBar;": '\U000029CF', + "LeftTriangleEqual;": '\U000022B4', + "LeftUpDownVector;": '\U00002951', + "LeftUpTeeVector;": '\U00002960', + "LeftUpVector;": '\U000021BF', + "LeftUpVectorBar;": '\U00002958', + "LeftVector;": '\U000021BC', + "LeftVectorBar;": '\U00002952', + "Leftarrow;": '\U000021D0', + "Leftrightarrow;": '\U000021D4', + "LessEqualGreater;": '\U000022DA', + "LessFullEqual;": '\U00002266', + "LessGreater;": '\U00002276', + "LessLess;": '\U00002AA1', + "LessSlantEqual;": '\U00002A7D', + "LessTilde;": '\U00002272', + "Lfr;": '\U0001D50F', + "Ll;": '\U000022D8', + "Lleftarrow;": '\U000021DA', + "Lmidot;": '\U0000013F', + "LongLeftArrow;": '\U000027F5', + "LongLeftRightArrow;": '\U000027F7', + "LongRightArrow;": '\U000027F6', + "Longleftarrow;": '\U000027F8', + "Longleftrightarrow;": '\U000027FA', + "Longrightarrow;": '\U000027F9', + "Lopf;": '\U0001D543', + "LowerLeftArrow;": '\U00002199', + "LowerRightArrow;": '\U00002198', + "Lscr;": '\U00002112', + "Lsh;": '\U000021B0', + "Lstrok;": '\U00000141', + "Lt;": '\U0000226A', + "Map;": '\U00002905', + "Mcy;": '\U0000041C', + "MediumSpace;": '\U0000205F', + "Mellintrf;": '\U00002133', + "Mfr;": '\U0001D510', + "MinusPlus;": '\U00002213', + "Mopf;": '\U0001D544', + "Mscr;": '\U00002133', + "Mu;": '\U0000039C', + "NJcy;": '\U0000040A', + "Nacute;": '\U00000143', + "Ncaron;": '\U00000147', + "Ncedil;": '\U00000145', + "Ncy;": '\U0000041D', + "NegativeMediumSpace;": '\U0000200B', + "NegativeThickSpace;": '\U0000200B', + "NegativeThinSpace;": '\U0000200B', + "NegativeVeryThinSpace;": '\U0000200B', + "NestedGreaterGreater;": '\U0000226B', + "NestedLessLess;": '\U0000226A', + "NewLine;": '\U0000000A', + "Nfr;": '\U0001D511', + "NoBreak;": '\U00002060', + "NonBreakingSpace;": '\U000000A0', + "Nopf;": '\U00002115', + "Not;": '\U00002AEC', + "NotCongruent;": '\U00002262', + "NotCupCap;": '\U0000226D', + "NotDoubleVerticalBar;": '\U00002226', + "NotElement;": '\U00002209', + "NotEqual;": '\U00002260', + "NotExists;": '\U00002204', + "NotGreater;": '\U0000226F', + "NotGreaterEqual;": '\U00002271', + "NotGreaterLess;": '\U00002279', + "NotGreaterTilde;": '\U00002275', + "NotLeftTriangle;": '\U000022EA', + "NotLeftTriangleEqual;": '\U000022EC', + "NotLess;": '\U0000226E', + "NotLessEqual;": '\U00002270', + "NotLessGreater;": '\U00002278', + "NotLessTilde;": '\U00002274', + "NotPrecedes;": '\U00002280', + "NotPrecedesSlantEqual;": '\U000022E0', + "NotReverseElement;": '\U0000220C', + "NotRightTriangle;": '\U000022EB', + "NotRightTriangleEqual;": '\U000022ED', + "NotSquareSubsetEqual;": '\U000022E2', + "NotSquareSupersetEqual;": '\U000022E3', + "NotSubsetEqual;": '\U00002288', + "NotSucceeds;": '\U00002281', + "NotSucceedsSlantEqual;": '\U000022E1', + "NotSupersetEqual;": '\U00002289', + "NotTilde;": '\U00002241', + "NotTildeEqual;": '\U00002244', + "NotTildeFullEqual;": '\U00002247', + "NotTildeTilde;": '\U00002249', + "NotVerticalBar;": '\U00002224', + "Nscr;": '\U0001D4A9', + "Ntilde;": '\U000000D1', + "Nu;": '\U0000039D', + "OElig;": '\U00000152', + "Oacute;": '\U000000D3', + "Ocirc;": '\U000000D4', + "Ocy;": '\U0000041E', + "Odblac;": '\U00000150', + "Ofr;": '\U0001D512', + "Ograve;": '\U000000D2', + "Omacr;": '\U0000014C', + "Omega;": '\U000003A9', + "Omicron;": '\U0000039F', + "Oopf;": '\U0001D546', + "OpenCurlyDoubleQuote;": '\U0000201C', + "OpenCurlyQuote;": '\U00002018', + "Or;": '\U00002A54', + "Oscr;": '\U0001D4AA', + "Oslash;": '\U000000D8', + "Otilde;": '\U000000D5', + "Otimes;": '\U00002A37', + "Ouml;": '\U000000D6', + "OverBar;": '\U0000203E', + "OverBrace;": '\U000023DE', + "OverBracket;": '\U000023B4', + "OverParenthesis;": '\U000023DC', + "PartialD;": '\U00002202', + "Pcy;": '\U0000041F', + "Pfr;": '\U0001D513', + "Phi;": '\U000003A6', + "Pi;": '\U000003A0', + "PlusMinus;": '\U000000B1', + "Poincareplane;": '\U0000210C', + "Popf;": '\U00002119', + "Pr;": '\U00002ABB', + "Precedes;": '\U0000227A', + "PrecedesEqual;": '\U00002AAF', + "PrecedesSlantEqual;": '\U0000227C', + "PrecedesTilde;": '\U0000227E', + "Prime;": '\U00002033', + "Product;": '\U0000220F', + "Proportion;": '\U00002237', + "Proportional;": '\U0000221D', + "Pscr;": '\U0001D4AB', + "Psi;": '\U000003A8', + "QUOT;": '\U00000022', + "Qfr;": '\U0001D514', + "Qopf;": '\U0000211A', + "Qscr;": '\U0001D4AC', + "RBarr;": '\U00002910', + "REG;": '\U000000AE', + "Racute;": '\U00000154', + "Rang;": '\U000027EB', + "Rarr;": '\U000021A0', + "Rarrtl;": '\U00002916', + "Rcaron;": '\U00000158', + "Rcedil;": '\U00000156', + "Rcy;": '\U00000420', + "Re;": '\U0000211C', + "ReverseElement;": '\U0000220B', + "ReverseEquilibrium;": '\U000021CB', + "ReverseUpEquilibrium;": '\U0000296F', + "Rfr;": '\U0000211C', + "Rho;": '\U000003A1', + "RightAngleBracket;": '\U000027E9', + "RightArrow;": '\U00002192', + "RightArrowBar;": '\U000021E5', + "RightArrowLeftArrow;": '\U000021C4', + "RightCeiling;": '\U00002309', + "RightDoubleBracket;": '\U000027E7', + "RightDownTeeVector;": '\U0000295D', + "RightDownVector;": '\U000021C2', + "RightDownVectorBar;": '\U00002955', + "RightFloor;": '\U0000230B', + "RightTee;": '\U000022A2', + "RightTeeArrow;": '\U000021A6', + "RightTeeVector;": '\U0000295B', + "RightTriangle;": '\U000022B3', + "RightTriangleBar;": '\U000029D0', + "RightTriangleEqual;": '\U000022B5', + "RightUpDownVector;": '\U0000294F', + "RightUpTeeVector;": '\U0000295C', + "RightUpVector;": '\U000021BE', + "RightUpVectorBar;": '\U00002954', + "RightVector;": '\U000021C0', + "RightVectorBar;": '\U00002953', + "Rightarrow;": '\U000021D2', + "Ropf;": '\U0000211D', + "RoundImplies;": '\U00002970', + "Rrightarrow;": '\U000021DB', + "Rscr;": '\U0000211B', + "Rsh;": '\U000021B1', + "RuleDelayed;": '\U000029F4', + "SHCHcy;": '\U00000429', + "SHcy;": '\U00000428', + "SOFTcy;": '\U0000042C', + "Sacute;": '\U0000015A', + "Sc;": '\U00002ABC', + "Scaron;": '\U00000160', + "Scedil;": '\U0000015E', + "Scirc;": '\U0000015C', + "Scy;": '\U00000421', + "Sfr;": '\U0001D516', + "ShortDownArrow;": '\U00002193', + "ShortLeftArrow;": '\U00002190', + "ShortRightArrow;": '\U00002192', + "ShortUpArrow;": '\U00002191', + "Sigma;": '\U000003A3', + "SmallCircle;": '\U00002218', + "Sopf;": '\U0001D54A', + "Sqrt;": '\U0000221A', + "Square;": '\U000025A1', + "SquareIntersection;": '\U00002293', + "SquareSubset;": '\U0000228F', + "SquareSubsetEqual;": '\U00002291', + "SquareSuperset;": '\U00002290', + "SquareSupersetEqual;": '\U00002292', + "SquareUnion;": '\U00002294', + "Sscr;": '\U0001D4AE', + "Star;": '\U000022C6', + "Sub;": '\U000022D0', + "Subset;": '\U000022D0', + "SubsetEqual;": '\U00002286', + "Succeeds;": '\U0000227B', + "SucceedsEqual;": '\U00002AB0', + "SucceedsSlantEqual;": '\U0000227D', + "SucceedsTilde;": '\U0000227F', + "SuchThat;": '\U0000220B', + "Sum;": '\U00002211', + "Sup;": '\U000022D1', + "Superset;": '\U00002283', + "SupersetEqual;": '\U00002287', + "Supset;": '\U000022D1', + "THORN;": '\U000000DE', + "TRADE;": '\U00002122', + "TSHcy;": '\U0000040B', + "TScy;": '\U00000426', + "Tab;": '\U00000009', + "Tau;": '\U000003A4', + "Tcaron;": '\U00000164', + "Tcedil;": '\U00000162', + "Tcy;": '\U00000422', + "Tfr;": '\U0001D517', + "Therefore;": '\U00002234', + "Theta;": '\U00000398', + "ThinSpace;": '\U00002009', + "Tilde;": '\U0000223C', + "TildeEqual;": '\U00002243', + "TildeFullEqual;": '\U00002245', + "TildeTilde;": '\U00002248', + "Topf;": '\U0001D54B', + "TripleDot;": '\U000020DB', + "Tscr;": '\U0001D4AF', + "Tstrok;": '\U00000166', + "Uacute;": '\U000000DA', + "Uarr;": '\U0000219F', + "Uarrocir;": '\U00002949', + "Ubrcy;": '\U0000040E', + "Ubreve;": '\U0000016C', + "Ucirc;": '\U000000DB', + "Ucy;": '\U00000423', + "Udblac;": '\U00000170', + "Ufr;": '\U0001D518', + "Ugrave;": '\U000000D9', + "Umacr;": '\U0000016A', + "UnderBar;": '\U0000005F', + "UnderBrace;": '\U000023DF', + "UnderBracket;": '\U000023B5', + "UnderParenthesis;": '\U000023DD', + "Union;": '\U000022C3', + "UnionPlus;": '\U0000228E', + "Uogon;": '\U00000172', + "Uopf;": '\U0001D54C', + "UpArrow;": '\U00002191', + "UpArrowBar;": '\U00002912', + "UpArrowDownArrow;": '\U000021C5', + "UpDownArrow;": '\U00002195', + "UpEquilibrium;": '\U0000296E', + "UpTee;": '\U000022A5', + "UpTeeArrow;": '\U000021A5', + "Uparrow;": '\U000021D1', + "Updownarrow;": '\U000021D5', + "UpperLeftArrow;": '\U00002196', + "UpperRightArrow;": '\U00002197', + "Upsi;": '\U000003D2', + "Upsilon;": '\U000003A5', + "Uring;": '\U0000016E', + "Uscr;": '\U0001D4B0', + "Utilde;": '\U00000168', + "Uuml;": '\U000000DC', + "VDash;": '\U000022AB', + "Vbar;": '\U00002AEB', + "Vcy;": '\U00000412', + "Vdash;": '\U000022A9', + "Vdashl;": '\U00002AE6', + "Vee;": '\U000022C1', + "Verbar;": '\U00002016', + "Vert;": '\U00002016', + "VerticalBar;": '\U00002223', + "VerticalLine;": '\U0000007C', + "VerticalSeparator;": '\U00002758', + "VerticalTilde;": '\U00002240', + "VeryThinSpace;": '\U0000200A', + "Vfr;": '\U0001D519', + "Vopf;": '\U0001D54D', + "Vscr;": '\U0001D4B1', + "Vvdash;": '\U000022AA', + "Wcirc;": '\U00000174', + "Wedge;": '\U000022C0', + "Wfr;": '\U0001D51A', + "Wopf;": '\U0001D54E', + "Wscr;": '\U0001D4B2', + "Xfr;": '\U0001D51B', + "Xi;": '\U0000039E', + "Xopf;": '\U0001D54F', + "Xscr;": '\U0001D4B3', + "YAcy;": '\U0000042F', + "YIcy;": '\U00000407', + "YUcy;": '\U0000042E', + "Yacute;": '\U000000DD', + "Ycirc;": '\U00000176', + "Ycy;": '\U0000042B', + "Yfr;": '\U0001D51C', + "Yopf;": '\U0001D550', + "Yscr;": '\U0001D4B4', + "Yuml;": '\U00000178', + "ZHcy;": '\U00000416', + "Zacute;": '\U00000179', + "Zcaron;": '\U0000017D', + "Zcy;": '\U00000417', + "Zdot;": '\U0000017B', + "ZeroWidthSpace;": '\U0000200B', + "Zeta;": '\U00000396', + "Zfr;": '\U00002128', + "Zopf;": '\U00002124', + "Zscr;": '\U0001D4B5', + "aacute;": '\U000000E1', + "abreve;": '\U00000103', + "ac;": '\U0000223E', + "acd;": '\U0000223F', + "acirc;": '\U000000E2', + "acute;": '\U000000B4', + "acy;": '\U00000430', + "aelig;": '\U000000E6', + "af;": '\U00002061', + "afr;": '\U0001D51E', + "agrave;": '\U000000E0', + "alefsym;": '\U00002135', + "aleph;": '\U00002135', + "alpha;": '\U000003B1', + "amacr;": '\U00000101', + "amalg;": '\U00002A3F', + "amp;": '\U00000026', + "and;": '\U00002227', + "andand;": '\U00002A55', + "andd;": '\U00002A5C', + "andslope;": '\U00002A58', + "andv;": '\U00002A5A', + "ang;": '\U00002220', + "ange;": '\U000029A4', + "angle;": '\U00002220', + "angmsd;": '\U00002221', + "angmsdaa;": '\U000029A8', + "angmsdab;": '\U000029A9', + "angmsdac;": '\U000029AA', + "angmsdad;": '\U000029AB', + "angmsdae;": '\U000029AC', + "angmsdaf;": '\U000029AD', + "angmsdag;": '\U000029AE', + "angmsdah;": '\U000029AF', + "angrt;": '\U0000221F', + "angrtvb;": '\U000022BE', + "angrtvbd;": '\U0000299D', + "angsph;": '\U00002222', + "angst;": '\U000000C5', + "angzarr;": '\U0000237C', + "aogon;": '\U00000105', + "aopf;": '\U0001D552', + "ap;": '\U00002248', + "apE;": '\U00002A70', + "apacir;": '\U00002A6F', + "ape;": '\U0000224A', + "apid;": '\U0000224B', + "apos;": '\U00000027', + "approx;": '\U00002248', + "approxeq;": '\U0000224A', + "aring;": '\U000000E5', + "ascr;": '\U0001D4B6', + "ast;": '\U0000002A', + "asymp;": '\U00002248', + "asympeq;": '\U0000224D', + "atilde;": '\U000000E3', + "auml;": '\U000000E4', + "awconint;": '\U00002233', + "awint;": '\U00002A11', + "bNot;": '\U00002AED', + "backcong;": '\U0000224C', + "backepsilon;": '\U000003F6', + "backprime;": '\U00002035', + "backsim;": '\U0000223D', + "backsimeq;": '\U000022CD', + "barvee;": '\U000022BD', + "barwed;": '\U00002305', + "barwedge;": '\U00002305', + "bbrk;": '\U000023B5', + "bbrktbrk;": '\U000023B6', + "bcong;": '\U0000224C', + "bcy;": '\U00000431', + "bdquo;": '\U0000201E', + "becaus;": '\U00002235', + "because;": '\U00002235', + "bemptyv;": '\U000029B0', + "bepsi;": '\U000003F6', + "bernou;": '\U0000212C', + "beta;": '\U000003B2', + "beth;": '\U00002136', + "between;": '\U0000226C', + "bfr;": '\U0001D51F', + "bigcap;": '\U000022C2', + "bigcirc;": '\U000025EF', + "bigcup;": '\U000022C3', + "bigodot;": '\U00002A00', + "bigoplus;": '\U00002A01', + "bigotimes;": '\U00002A02', + "bigsqcup;": '\U00002A06', + "bigstar;": '\U00002605', + "bigtriangledown;": '\U000025BD', + "bigtriangleup;": '\U000025B3', + "biguplus;": '\U00002A04', + "bigvee;": '\U000022C1', + "bigwedge;": '\U000022C0', + "bkarow;": '\U0000290D', + "blacklozenge;": '\U000029EB', + "blacksquare;": '\U000025AA', + "blacktriangle;": '\U000025B4', + "blacktriangledown;": '\U000025BE', + "blacktriangleleft;": '\U000025C2', + "blacktriangleright;": '\U000025B8', + "blank;": '\U00002423', + "blk12;": '\U00002592', + "blk14;": '\U00002591', + "blk34;": '\U00002593', + "block;": '\U00002588', + "bnot;": '\U00002310', + "bopf;": '\U0001D553', + "bot;": '\U000022A5', + "bottom;": '\U000022A5', + "bowtie;": '\U000022C8', + "boxDL;": '\U00002557', + "boxDR;": '\U00002554', + "boxDl;": '\U00002556', + "boxDr;": '\U00002553', + "boxH;": '\U00002550', + "boxHD;": '\U00002566', + "boxHU;": '\U00002569', + "boxHd;": '\U00002564', + "boxHu;": '\U00002567', + "boxUL;": '\U0000255D', + "boxUR;": '\U0000255A', + "boxUl;": '\U0000255C', + "boxUr;": '\U00002559', + "boxV;": '\U00002551', + "boxVH;": '\U0000256C', + "boxVL;": '\U00002563', + "boxVR;": '\U00002560', + "boxVh;": '\U0000256B', + "boxVl;": '\U00002562', + "boxVr;": '\U0000255F', + "boxbox;": '\U000029C9', + "boxdL;": '\U00002555', + "boxdR;": '\U00002552', + "boxdl;": '\U00002510', + "boxdr;": '\U0000250C', + "boxh;": '\U00002500', + "boxhD;": '\U00002565', + "boxhU;": '\U00002568', + "boxhd;": '\U0000252C', + "boxhu;": '\U00002534', + "boxminus;": '\U0000229F', + "boxplus;": '\U0000229E', + "boxtimes;": '\U000022A0', + "boxuL;": '\U0000255B', + "boxuR;": '\U00002558', + "boxul;": '\U00002518', + "boxur;": '\U00002514', + "boxv;": '\U00002502', + "boxvH;": '\U0000256A', + "boxvL;": '\U00002561', + "boxvR;": '\U0000255E', + "boxvh;": '\U0000253C', + "boxvl;": '\U00002524', + "boxvr;": '\U0000251C', + "bprime;": '\U00002035', + "breve;": '\U000002D8', + "brvbar;": '\U000000A6', + "bscr;": '\U0001D4B7', + "bsemi;": '\U0000204F', + "bsim;": '\U0000223D', + "bsime;": '\U000022CD', + "bsol;": '\U0000005C', + "bsolb;": '\U000029C5', + "bsolhsub;": '\U000027C8', + "bull;": '\U00002022', + "bullet;": '\U00002022', + "bump;": '\U0000224E', + "bumpE;": '\U00002AAE', + "bumpe;": '\U0000224F', + "bumpeq;": '\U0000224F', + "cacute;": '\U00000107', + "cap;": '\U00002229', + "capand;": '\U00002A44', + "capbrcup;": '\U00002A49', + "capcap;": '\U00002A4B', + "capcup;": '\U00002A47', + "capdot;": '\U00002A40', + "caret;": '\U00002041', + "caron;": '\U000002C7', + "ccaps;": '\U00002A4D', + "ccaron;": '\U0000010D', + "ccedil;": '\U000000E7', + "ccirc;": '\U00000109', + "ccups;": '\U00002A4C', + "ccupssm;": '\U00002A50', + "cdot;": '\U0000010B', + "cedil;": '\U000000B8', + "cemptyv;": '\U000029B2', + "cent;": '\U000000A2', + "centerdot;": '\U000000B7', + "cfr;": '\U0001D520', + "chcy;": '\U00000447', + "check;": '\U00002713', + "checkmark;": '\U00002713', + "chi;": '\U000003C7', + "cir;": '\U000025CB', + "cirE;": '\U000029C3', + "circ;": '\U000002C6', + "circeq;": '\U00002257', + "circlearrowleft;": '\U000021BA', + "circlearrowright;": '\U000021BB', + "circledR;": '\U000000AE', + "circledS;": '\U000024C8', + "circledast;": '\U0000229B', + "circledcirc;": '\U0000229A', + "circleddash;": '\U0000229D', + "cire;": '\U00002257', + "cirfnint;": '\U00002A10', + "cirmid;": '\U00002AEF', + "cirscir;": '\U000029C2', + "clubs;": '\U00002663', + "clubsuit;": '\U00002663', + "colon;": '\U0000003A', + "colone;": '\U00002254', + "coloneq;": '\U00002254', + "comma;": '\U0000002C', + "commat;": '\U00000040', + "comp;": '\U00002201', + "compfn;": '\U00002218', + "complement;": '\U00002201', + "complexes;": '\U00002102', + "cong;": '\U00002245', + "congdot;": '\U00002A6D', + "conint;": '\U0000222E', + "copf;": '\U0001D554', + "coprod;": '\U00002210', + "copy;": '\U000000A9', + "copysr;": '\U00002117', + "crarr;": '\U000021B5', + "cross;": '\U00002717', + "cscr;": '\U0001D4B8', + "csub;": '\U00002ACF', + "csube;": '\U00002AD1', + "csup;": '\U00002AD0', + "csupe;": '\U00002AD2', + "ctdot;": '\U000022EF', + "cudarrl;": '\U00002938', + "cudarrr;": '\U00002935', + "cuepr;": '\U000022DE', + "cuesc;": '\U000022DF', + "cularr;": '\U000021B6', + "cularrp;": '\U0000293D', + "cup;": '\U0000222A', + "cupbrcap;": '\U00002A48', + "cupcap;": '\U00002A46', + "cupcup;": '\U00002A4A', + "cupdot;": '\U0000228D', + "cupor;": '\U00002A45', + "curarr;": '\U000021B7', + "curarrm;": '\U0000293C', + "curlyeqprec;": '\U000022DE', + "curlyeqsucc;": '\U000022DF', + "curlyvee;": '\U000022CE', + "curlywedge;": '\U000022CF', + "curren;": '\U000000A4', + "curvearrowleft;": '\U000021B6', + "curvearrowright;": '\U000021B7', + "cuvee;": '\U000022CE', + "cuwed;": '\U000022CF', + "cwconint;": '\U00002232', + "cwint;": '\U00002231', + "cylcty;": '\U0000232D', + "dArr;": '\U000021D3', + "dHar;": '\U00002965', + "dagger;": '\U00002020', + "daleth;": '\U00002138', + "darr;": '\U00002193', + "dash;": '\U00002010', + "dashv;": '\U000022A3', + "dbkarow;": '\U0000290F', + "dblac;": '\U000002DD', + "dcaron;": '\U0000010F', + "dcy;": '\U00000434', + "dd;": '\U00002146', + "ddagger;": '\U00002021', + "ddarr;": '\U000021CA', + "ddotseq;": '\U00002A77', + "deg;": '\U000000B0', + "delta;": '\U000003B4', + "demptyv;": '\U000029B1', + "dfisht;": '\U0000297F', + "dfr;": '\U0001D521', + "dharl;": '\U000021C3', + "dharr;": '\U000021C2', + "diam;": '\U000022C4', + "diamond;": '\U000022C4', + "diamondsuit;": '\U00002666', + "diams;": '\U00002666', + "die;": '\U000000A8', + "digamma;": '\U000003DD', + "disin;": '\U000022F2', + "div;": '\U000000F7', + "divide;": '\U000000F7', + "divideontimes;": '\U000022C7', + "divonx;": '\U000022C7', + "djcy;": '\U00000452', + "dlcorn;": '\U0000231E', + "dlcrop;": '\U0000230D', + "dollar;": '\U00000024', + "dopf;": '\U0001D555', + "dot;": '\U000002D9', + "doteq;": '\U00002250', + "doteqdot;": '\U00002251', + "dotminus;": '\U00002238', + "dotplus;": '\U00002214', + "dotsquare;": '\U000022A1', + "doublebarwedge;": '\U00002306', + "downarrow;": '\U00002193', + "downdownarrows;": '\U000021CA', + "downharpoonleft;": '\U000021C3', + "downharpoonright;": '\U000021C2', + "drbkarow;": '\U00002910', + "drcorn;": '\U0000231F', + "drcrop;": '\U0000230C', + "dscr;": '\U0001D4B9', + "dscy;": '\U00000455', + "dsol;": '\U000029F6', + "dstrok;": '\U00000111', + "dtdot;": '\U000022F1', + "dtri;": '\U000025BF', + "dtrif;": '\U000025BE', + "duarr;": '\U000021F5', + "duhar;": '\U0000296F', + "dwangle;": '\U000029A6', + "dzcy;": '\U0000045F', + "dzigrarr;": '\U000027FF', + "eDDot;": '\U00002A77', + "eDot;": '\U00002251', + "eacute;": '\U000000E9', + "easter;": '\U00002A6E', + "ecaron;": '\U0000011B', + "ecir;": '\U00002256', + "ecirc;": '\U000000EA', + "ecolon;": '\U00002255', + "ecy;": '\U0000044D', + "edot;": '\U00000117', + "ee;": '\U00002147', + "efDot;": '\U00002252', + "efr;": '\U0001D522', + "eg;": '\U00002A9A', + "egrave;": '\U000000E8', + "egs;": '\U00002A96', + "egsdot;": '\U00002A98', + "el;": '\U00002A99', + "elinters;": '\U000023E7', + "ell;": '\U00002113', + "els;": '\U00002A95', + "elsdot;": '\U00002A97', + "emacr;": '\U00000113', + "empty;": '\U00002205', + "emptyset;": '\U00002205', + "emptyv;": '\U00002205', + "emsp;": '\U00002003', + "emsp13;": '\U00002004', + "emsp14;": '\U00002005', + "eng;": '\U0000014B', + "ensp;": '\U00002002', + "eogon;": '\U00000119', + "eopf;": '\U0001D556', + "epar;": '\U000022D5', + "eparsl;": '\U000029E3', + "eplus;": '\U00002A71', + "epsi;": '\U000003B5', + "epsilon;": '\U000003B5', + "epsiv;": '\U000003F5', + "eqcirc;": '\U00002256', + "eqcolon;": '\U00002255', + "eqsim;": '\U00002242', + "eqslantgtr;": '\U00002A96', + "eqslantless;": '\U00002A95', + "equals;": '\U0000003D', + "equest;": '\U0000225F', + "equiv;": '\U00002261', + "equivDD;": '\U00002A78', + "eqvparsl;": '\U000029E5', + "erDot;": '\U00002253', + "erarr;": '\U00002971', + "escr;": '\U0000212F', + "esdot;": '\U00002250', + "esim;": '\U00002242', + "eta;": '\U000003B7', + "eth;": '\U000000F0', + "euml;": '\U000000EB', + "euro;": '\U000020AC', + "excl;": '\U00000021', + "exist;": '\U00002203', + "expectation;": '\U00002130', + "exponentiale;": '\U00002147', + "fallingdotseq;": '\U00002252', + "fcy;": '\U00000444', + "female;": '\U00002640', + "ffilig;": '\U0000FB03', + "fflig;": '\U0000FB00', + "ffllig;": '\U0000FB04', + "ffr;": '\U0001D523', + "filig;": '\U0000FB01', + "flat;": '\U0000266D', + "fllig;": '\U0000FB02', + "fltns;": '\U000025B1', + "fnof;": '\U00000192', + "fopf;": '\U0001D557', + "forall;": '\U00002200', + "fork;": '\U000022D4', + "forkv;": '\U00002AD9', + "fpartint;": '\U00002A0D', + "frac12;": '\U000000BD', + "frac13;": '\U00002153', + "frac14;": '\U000000BC', + "frac15;": '\U00002155', + "frac16;": '\U00002159', + "frac18;": '\U0000215B', + "frac23;": '\U00002154', + "frac25;": '\U00002156', + "frac34;": '\U000000BE', + "frac35;": '\U00002157', + "frac38;": '\U0000215C', + "frac45;": '\U00002158', + "frac56;": '\U0000215A', + "frac58;": '\U0000215D', + "frac78;": '\U0000215E', + "frasl;": '\U00002044', + "frown;": '\U00002322', + "fscr;": '\U0001D4BB', + "gE;": '\U00002267', + "gEl;": '\U00002A8C', + "gacute;": '\U000001F5', + "gamma;": '\U000003B3', + "gammad;": '\U000003DD', + "gap;": '\U00002A86', + "gbreve;": '\U0000011F', + "gcirc;": '\U0000011D', + "gcy;": '\U00000433', + "gdot;": '\U00000121', + "ge;": '\U00002265', + "gel;": '\U000022DB', + "geq;": '\U00002265', + "geqq;": '\U00002267', + "geqslant;": '\U00002A7E', + "ges;": '\U00002A7E', + "gescc;": '\U00002AA9', + "gesdot;": '\U00002A80', + "gesdoto;": '\U00002A82', + "gesdotol;": '\U00002A84', + "gesles;": '\U00002A94', + "gfr;": '\U0001D524', + "gg;": '\U0000226B', + "ggg;": '\U000022D9', + "gimel;": '\U00002137', + "gjcy;": '\U00000453', + "gl;": '\U00002277', + "glE;": '\U00002A92', + "gla;": '\U00002AA5', + "glj;": '\U00002AA4', + "gnE;": '\U00002269', + "gnap;": '\U00002A8A', + "gnapprox;": '\U00002A8A', + "gne;": '\U00002A88', + "gneq;": '\U00002A88', + "gneqq;": '\U00002269', + "gnsim;": '\U000022E7', + "gopf;": '\U0001D558', + "grave;": '\U00000060', + "gscr;": '\U0000210A', + "gsim;": '\U00002273', + "gsime;": '\U00002A8E', + "gsiml;": '\U00002A90', + "gt;": '\U0000003E', + "gtcc;": '\U00002AA7', + "gtcir;": '\U00002A7A', + "gtdot;": '\U000022D7', + "gtlPar;": '\U00002995', + "gtquest;": '\U00002A7C', + "gtrapprox;": '\U00002A86', + "gtrarr;": '\U00002978', + "gtrdot;": '\U000022D7', + "gtreqless;": '\U000022DB', + "gtreqqless;": '\U00002A8C', + "gtrless;": '\U00002277', + "gtrsim;": '\U00002273', + "hArr;": '\U000021D4', + "hairsp;": '\U0000200A', + "half;": '\U000000BD', + "hamilt;": '\U0000210B', + "hardcy;": '\U0000044A', + "harr;": '\U00002194', + "harrcir;": '\U00002948', + "harrw;": '\U000021AD', + "hbar;": '\U0000210F', + "hcirc;": '\U00000125', + "hearts;": '\U00002665', + "heartsuit;": '\U00002665', + "hellip;": '\U00002026', + "hercon;": '\U000022B9', + "hfr;": '\U0001D525', + "hksearow;": '\U00002925', + "hkswarow;": '\U00002926', + "hoarr;": '\U000021FF', + "homtht;": '\U0000223B', + "hookleftarrow;": '\U000021A9', + "hookrightarrow;": '\U000021AA', + "hopf;": '\U0001D559', + "horbar;": '\U00002015', + "hscr;": '\U0001D4BD', + "hslash;": '\U0000210F', + "hstrok;": '\U00000127', + "hybull;": '\U00002043', + "hyphen;": '\U00002010', + "iacute;": '\U000000ED', + "ic;": '\U00002063', + "icirc;": '\U000000EE', + "icy;": '\U00000438', + "iecy;": '\U00000435', + "iexcl;": '\U000000A1', + "iff;": '\U000021D4', + "ifr;": '\U0001D526', + "igrave;": '\U000000EC', + "ii;": '\U00002148', + "iiiint;": '\U00002A0C', + "iiint;": '\U0000222D', + "iinfin;": '\U000029DC', + "iiota;": '\U00002129', + "ijlig;": '\U00000133', + "imacr;": '\U0000012B', + "image;": '\U00002111', + "imagline;": '\U00002110', + "imagpart;": '\U00002111', + "imath;": '\U00000131', + "imof;": '\U000022B7', + "imped;": '\U000001B5', + "in;": '\U00002208', + "incare;": '\U00002105', + "infin;": '\U0000221E', + "infintie;": '\U000029DD', + "inodot;": '\U00000131', + "int;": '\U0000222B', + "intcal;": '\U000022BA', + "integers;": '\U00002124', + "intercal;": '\U000022BA', + "intlarhk;": '\U00002A17', + "intprod;": '\U00002A3C', + "iocy;": '\U00000451', + "iogon;": '\U0000012F', + "iopf;": '\U0001D55A', + "iota;": '\U000003B9', + "iprod;": '\U00002A3C', + "iquest;": '\U000000BF', + "iscr;": '\U0001D4BE', + "isin;": '\U00002208', + "isinE;": '\U000022F9', + "isindot;": '\U000022F5', + "isins;": '\U000022F4', + "isinsv;": '\U000022F3', + "isinv;": '\U00002208', + "it;": '\U00002062', + "itilde;": '\U00000129', + "iukcy;": '\U00000456', + "iuml;": '\U000000EF', + "jcirc;": '\U00000135', + "jcy;": '\U00000439', + "jfr;": '\U0001D527', + "jmath;": '\U00000237', + "jopf;": '\U0001D55B', + "jscr;": '\U0001D4BF', + "jsercy;": '\U00000458', + "jukcy;": '\U00000454', + "kappa;": '\U000003BA', + "kappav;": '\U000003F0', + "kcedil;": '\U00000137', + "kcy;": '\U0000043A', + "kfr;": '\U0001D528', + "kgreen;": '\U00000138', + "khcy;": '\U00000445', + "kjcy;": '\U0000045C', + "kopf;": '\U0001D55C', + "kscr;": '\U0001D4C0', + "lAarr;": '\U000021DA', + "lArr;": '\U000021D0', + "lAtail;": '\U0000291B', + "lBarr;": '\U0000290E', + "lE;": '\U00002266', + "lEg;": '\U00002A8B', + "lHar;": '\U00002962', + "lacute;": '\U0000013A', + "laemptyv;": '\U000029B4', + "lagran;": '\U00002112', + "lambda;": '\U000003BB', + "lang;": '\U000027E8', + "langd;": '\U00002991', + "langle;": '\U000027E8', + "lap;": '\U00002A85', + "laquo;": '\U000000AB', + "larr;": '\U00002190', + "larrb;": '\U000021E4', + "larrbfs;": '\U0000291F', + "larrfs;": '\U0000291D', + "larrhk;": '\U000021A9', + "larrlp;": '\U000021AB', + "larrpl;": '\U00002939', + "larrsim;": '\U00002973', + "larrtl;": '\U000021A2', + "lat;": '\U00002AAB', + "latail;": '\U00002919', + "late;": '\U00002AAD', + "lbarr;": '\U0000290C', + "lbbrk;": '\U00002772', + "lbrace;": '\U0000007B', + "lbrack;": '\U0000005B', + "lbrke;": '\U0000298B', + "lbrksld;": '\U0000298F', + "lbrkslu;": '\U0000298D', + "lcaron;": '\U0000013E', + "lcedil;": '\U0000013C', + "lceil;": '\U00002308', + "lcub;": '\U0000007B', + "lcy;": '\U0000043B', + "ldca;": '\U00002936', + "ldquo;": '\U0000201C', + "ldquor;": '\U0000201E', + "ldrdhar;": '\U00002967', + "ldrushar;": '\U0000294B', + "ldsh;": '\U000021B2', + "le;": '\U00002264', + "leftarrow;": '\U00002190', + "leftarrowtail;": '\U000021A2', + "leftharpoondown;": '\U000021BD', + "leftharpoonup;": '\U000021BC', + "leftleftarrows;": '\U000021C7', + "leftrightarrow;": '\U00002194', + "leftrightarrows;": '\U000021C6', + "leftrightharpoons;": '\U000021CB', + "leftrightsquigarrow;": '\U000021AD', + "leftthreetimes;": '\U000022CB', + "leg;": '\U000022DA', + "leq;": '\U00002264', + "leqq;": '\U00002266', + "leqslant;": '\U00002A7D', + "les;": '\U00002A7D', + "lescc;": '\U00002AA8', + "lesdot;": '\U00002A7F', + "lesdoto;": '\U00002A81', + "lesdotor;": '\U00002A83', + "lesges;": '\U00002A93', + "lessapprox;": '\U00002A85', + "lessdot;": '\U000022D6', + "lesseqgtr;": '\U000022DA', + "lesseqqgtr;": '\U00002A8B', + "lessgtr;": '\U00002276', + "lesssim;": '\U00002272', + "lfisht;": '\U0000297C', + "lfloor;": '\U0000230A', + "lfr;": '\U0001D529', + "lg;": '\U00002276', + "lgE;": '\U00002A91', + "lhard;": '\U000021BD', + "lharu;": '\U000021BC', + "lharul;": '\U0000296A', + "lhblk;": '\U00002584', + "ljcy;": '\U00000459', + "ll;": '\U0000226A', + "llarr;": '\U000021C7', + "llcorner;": '\U0000231E', + "llhard;": '\U0000296B', + "lltri;": '\U000025FA', + "lmidot;": '\U00000140', + "lmoust;": '\U000023B0', + "lmoustache;": '\U000023B0', + "lnE;": '\U00002268', + "lnap;": '\U00002A89', + "lnapprox;": '\U00002A89', + "lne;": '\U00002A87', + "lneq;": '\U00002A87', + "lneqq;": '\U00002268', + "lnsim;": '\U000022E6', + "loang;": '\U000027EC', + "loarr;": '\U000021FD', + "lobrk;": '\U000027E6', + "longleftarrow;": '\U000027F5', + "longleftrightarrow;": '\U000027F7', + "longmapsto;": '\U000027FC', + "longrightarrow;": '\U000027F6', + "looparrowleft;": '\U000021AB', + "looparrowright;": '\U000021AC', + "lopar;": '\U00002985', + "lopf;": '\U0001D55D', + "loplus;": '\U00002A2D', + "lotimes;": '\U00002A34', + "lowast;": '\U00002217', + "lowbar;": '\U0000005F', + "loz;": '\U000025CA', + "lozenge;": '\U000025CA', + "lozf;": '\U000029EB', + "lpar;": '\U00000028', + "lparlt;": '\U00002993', + "lrarr;": '\U000021C6', + "lrcorner;": '\U0000231F', + "lrhar;": '\U000021CB', + "lrhard;": '\U0000296D', + "lrm;": '\U0000200E', + "lrtri;": '\U000022BF', + "lsaquo;": '\U00002039', + "lscr;": '\U0001D4C1', + "lsh;": '\U000021B0', + "lsim;": '\U00002272', + "lsime;": '\U00002A8D', + "lsimg;": '\U00002A8F', + "lsqb;": '\U0000005B', + "lsquo;": '\U00002018', + "lsquor;": '\U0000201A', + "lstrok;": '\U00000142', + "lt;": '\U0000003C', + "ltcc;": '\U00002AA6', + "ltcir;": '\U00002A79', + "ltdot;": '\U000022D6', + "lthree;": '\U000022CB', + "ltimes;": '\U000022C9', + "ltlarr;": '\U00002976', + "ltquest;": '\U00002A7B', + "ltrPar;": '\U00002996', + "ltri;": '\U000025C3', + "ltrie;": '\U000022B4', + "ltrif;": '\U000025C2', + "lurdshar;": '\U0000294A', + "luruhar;": '\U00002966', + "mDDot;": '\U0000223A', + "macr;": '\U000000AF', + "male;": '\U00002642', + "malt;": '\U00002720', + "maltese;": '\U00002720', + "map;": '\U000021A6', + "mapsto;": '\U000021A6', + "mapstodown;": '\U000021A7', + "mapstoleft;": '\U000021A4', + "mapstoup;": '\U000021A5', + "marker;": '\U000025AE', + "mcomma;": '\U00002A29', + "mcy;": '\U0000043C', + "mdash;": '\U00002014', + "measuredangle;": '\U00002221', + "mfr;": '\U0001D52A', + "mho;": '\U00002127', + "micro;": '\U000000B5', + "mid;": '\U00002223', + "midast;": '\U0000002A', + "midcir;": '\U00002AF0', + "middot;": '\U000000B7', + "minus;": '\U00002212', + "minusb;": '\U0000229F', + "minusd;": '\U00002238', + "minusdu;": '\U00002A2A', + "mlcp;": '\U00002ADB', + "mldr;": '\U00002026', + "mnplus;": '\U00002213', + "models;": '\U000022A7', + "mopf;": '\U0001D55E', + "mp;": '\U00002213', + "mscr;": '\U0001D4C2', + "mstpos;": '\U0000223E', + "mu;": '\U000003BC', + "multimap;": '\U000022B8', + "mumap;": '\U000022B8', + "nLeftarrow;": '\U000021CD', + "nLeftrightarrow;": '\U000021CE', + "nRightarrow;": '\U000021CF', + "nVDash;": '\U000022AF', + "nVdash;": '\U000022AE', + "nabla;": '\U00002207', + "nacute;": '\U00000144', + "nap;": '\U00002249', + "napos;": '\U00000149', + "napprox;": '\U00002249', + "natur;": '\U0000266E', + "natural;": '\U0000266E', + "naturals;": '\U00002115', + "nbsp;": '\U000000A0', + "ncap;": '\U00002A43', + "ncaron;": '\U00000148', + "ncedil;": '\U00000146', + "ncong;": '\U00002247', + "ncup;": '\U00002A42', + "ncy;": '\U0000043D', + "ndash;": '\U00002013', + "ne;": '\U00002260', + "neArr;": '\U000021D7', + "nearhk;": '\U00002924', + "nearr;": '\U00002197', + "nearrow;": '\U00002197', + "nequiv;": '\U00002262', + "nesear;": '\U00002928', + "nexist;": '\U00002204', + "nexists;": '\U00002204', + "nfr;": '\U0001D52B', + "nge;": '\U00002271', + "ngeq;": '\U00002271', + "ngsim;": '\U00002275', + "ngt;": '\U0000226F', + "ngtr;": '\U0000226F', + "nhArr;": '\U000021CE', + "nharr;": '\U000021AE', + "nhpar;": '\U00002AF2', + "ni;": '\U0000220B', + "nis;": '\U000022FC', + "nisd;": '\U000022FA', + "niv;": '\U0000220B', + "njcy;": '\U0000045A', + "nlArr;": '\U000021CD', + "nlarr;": '\U0000219A', + "nldr;": '\U00002025', + "nle;": '\U00002270', + "nleftarrow;": '\U0000219A', + "nleftrightarrow;": '\U000021AE', + "nleq;": '\U00002270', + "nless;": '\U0000226E', + "nlsim;": '\U00002274', + "nlt;": '\U0000226E', + "nltri;": '\U000022EA', + "nltrie;": '\U000022EC', + "nmid;": '\U00002224', + "nopf;": '\U0001D55F', + "not;": '\U000000AC', + "notin;": '\U00002209', + "notinva;": '\U00002209', + "notinvb;": '\U000022F7', + "notinvc;": '\U000022F6', + "notni;": '\U0000220C', + "notniva;": '\U0000220C', + "notnivb;": '\U000022FE', + "notnivc;": '\U000022FD', + "npar;": '\U00002226', + "nparallel;": '\U00002226', + "npolint;": '\U00002A14', + "npr;": '\U00002280', + "nprcue;": '\U000022E0', + "nprec;": '\U00002280', + "nrArr;": '\U000021CF', + "nrarr;": '\U0000219B', + "nrightarrow;": '\U0000219B', + "nrtri;": '\U000022EB', + "nrtrie;": '\U000022ED', + "nsc;": '\U00002281', + "nsccue;": '\U000022E1', + "nscr;": '\U0001D4C3', + "nshortmid;": '\U00002224', + "nshortparallel;": '\U00002226', + "nsim;": '\U00002241', + "nsime;": '\U00002244', + "nsimeq;": '\U00002244', + "nsmid;": '\U00002224', + "nspar;": '\U00002226', + "nsqsube;": '\U000022E2', + "nsqsupe;": '\U000022E3', + "nsub;": '\U00002284', + "nsube;": '\U00002288', + "nsubseteq;": '\U00002288', + "nsucc;": '\U00002281', + "nsup;": '\U00002285', + "nsupe;": '\U00002289', + "nsupseteq;": '\U00002289', + "ntgl;": '\U00002279', + "ntilde;": '\U000000F1', + "ntlg;": '\U00002278', + "ntriangleleft;": '\U000022EA', + "ntrianglelefteq;": '\U000022EC', + "ntriangleright;": '\U000022EB', + "ntrianglerighteq;": '\U000022ED', + "nu;": '\U000003BD', + "num;": '\U00000023', + "numero;": '\U00002116', + "numsp;": '\U00002007', + "nvDash;": '\U000022AD', + "nvHarr;": '\U00002904', + "nvdash;": '\U000022AC', + "nvinfin;": '\U000029DE', + "nvlArr;": '\U00002902', + "nvrArr;": '\U00002903', + "nwArr;": '\U000021D6', + "nwarhk;": '\U00002923', + "nwarr;": '\U00002196', + "nwarrow;": '\U00002196', + "nwnear;": '\U00002927', + "oS;": '\U000024C8', + "oacute;": '\U000000F3', + "oast;": '\U0000229B', + "ocir;": '\U0000229A', + "ocirc;": '\U000000F4', + "ocy;": '\U0000043E', + "odash;": '\U0000229D', + "odblac;": '\U00000151', + "odiv;": '\U00002A38', + "odot;": '\U00002299', + "odsold;": '\U000029BC', + "oelig;": '\U00000153', + "ofcir;": '\U000029BF', + "ofr;": '\U0001D52C', + "ogon;": '\U000002DB', + "ograve;": '\U000000F2', + "ogt;": '\U000029C1', + "ohbar;": '\U000029B5', + "ohm;": '\U000003A9', + "oint;": '\U0000222E', + "olarr;": '\U000021BA', + "olcir;": '\U000029BE', + "olcross;": '\U000029BB', + "oline;": '\U0000203E', + "olt;": '\U000029C0', + "omacr;": '\U0000014D', + "omega;": '\U000003C9', + "omicron;": '\U000003BF', + "omid;": '\U000029B6', + "ominus;": '\U00002296', + "oopf;": '\U0001D560', + "opar;": '\U000029B7', + "operp;": '\U000029B9', + "oplus;": '\U00002295', + "or;": '\U00002228', + "orarr;": '\U000021BB', + "ord;": '\U00002A5D', + "order;": '\U00002134', + "orderof;": '\U00002134', + "ordf;": '\U000000AA', + "ordm;": '\U000000BA', + "origof;": '\U000022B6', + "oror;": '\U00002A56', + "orslope;": '\U00002A57', + "orv;": '\U00002A5B', + "oscr;": '\U00002134', + "oslash;": '\U000000F8', + "osol;": '\U00002298', + "otilde;": '\U000000F5', + "otimes;": '\U00002297', + "otimesas;": '\U00002A36', + "ouml;": '\U000000F6', + "ovbar;": '\U0000233D', + "par;": '\U00002225', + "para;": '\U000000B6', + "parallel;": '\U00002225', + "parsim;": '\U00002AF3', + "parsl;": '\U00002AFD', + "part;": '\U00002202', + "pcy;": '\U0000043F', + "percnt;": '\U00000025', + "period;": '\U0000002E', + "permil;": '\U00002030', + "perp;": '\U000022A5', + "pertenk;": '\U00002031', + "pfr;": '\U0001D52D', + "phi;": '\U000003C6', + "phiv;": '\U000003D5', + "phmmat;": '\U00002133', + "phone;": '\U0000260E', + "pi;": '\U000003C0', + "pitchfork;": '\U000022D4', + "piv;": '\U000003D6', + "planck;": '\U0000210F', + "planckh;": '\U0000210E', + "plankv;": '\U0000210F', + "plus;": '\U0000002B', + "plusacir;": '\U00002A23', + "plusb;": '\U0000229E', + "pluscir;": '\U00002A22', + "plusdo;": '\U00002214', + "plusdu;": '\U00002A25', + "pluse;": '\U00002A72', + "plusmn;": '\U000000B1', + "plussim;": '\U00002A26', + "plustwo;": '\U00002A27', + "pm;": '\U000000B1', + "pointint;": '\U00002A15', + "popf;": '\U0001D561', + "pound;": '\U000000A3', + "pr;": '\U0000227A', + "prE;": '\U00002AB3', + "prap;": '\U00002AB7', + "prcue;": '\U0000227C', + "pre;": '\U00002AAF', + "prec;": '\U0000227A', + "precapprox;": '\U00002AB7', + "preccurlyeq;": '\U0000227C', + "preceq;": '\U00002AAF', + "precnapprox;": '\U00002AB9', + "precneqq;": '\U00002AB5', + "precnsim;": '\U000022E8', + "precsim;": '\U0000227E', + "prime;": '\U00002032', + "primes;": '\U00002119', + "prnE;": '\U00002AB5', + "prnap;": '\U00002AB9', + "prnsim;": '\U000022E8', + "prod;": '\U0000220F', + "profalar;": '\U0000232E', + "profline;": '\U00002312', + "profsurf;": '\U00002313', + "prop;": '\U0000221D', + "propto;": '\U0000221D', + "prsim;": '\U0000227E', + "prurel;": '\U000022B0', + "pscr;": '\U0001D4C5', + "psi;": '\U000003C8', + "puncsp;": '\U00002008', + "qfr;": '\U0001D52E', + "qint;": '\U00002A0C', + "qopf;": '\U0001D562', + "qprime;": '\U00002057', + "qscr;": '\U0001D4C6', + "quaternions;": '\U0000210D', + "quatint;": '\U00002A16', + "quest;": '\U0000003F', + "questeq;": '\U0000225F', + "quot;": '\U00000022', + "rAarr;": '\U000021DB', + "rArr;": '\U000021D2', + "rAtail;": '\U0000291C', + "rBarr;": '\U0000290F', + "rHar;": '\U00002964', + "racute;": '\U00000155', + "radic;": '\U0000221A', + "raemptyv;": '\U000029B3', + "rang;": '\U000027E9', + "rangd;": '\U00002992', + "range;": '\U000029A5', + "rangle;": '\U000027E9', + "raquo;": '\U000000BB', + "rarr;": '\U00002192', + "rarrap;": '\U00002975', + "rarrb;": '\U000021E5', + "rarrbfs;": '\U00002920', + "rarrc;": '\U00002933', + "rarrfs;": '\U0000291E', + "rarrhk;": '\U000021AA', + "rarrlp;": '\U000021AC', + "rarrpl;": '\U00002945', + "rarrsim;": '\U00002974', + "rarrtl;": '\U000021A3', + "rarrw;": '\U0000219D', + "ratail;": '\U0000291A', + "ratio;": '\U00002236', + "rationals;": '\U0000211A', + "rbarr;": '\U0000290D', + "rbbrk;": '\U00002773', + "rbrace;": '\U0000007D', + "rbrack;": '\U0000005D', + "rbrke;": '\U0000298C', + "rbrksld;": '\U0000298E', + "rbrkslu;": '\U00002990', + "rcaron;": '\U00000159', + "rcedil;": '\U00000157', + "rceil;": '\U00002309', + "rcub;": '\U0000007D', + "rcy;": '\U00000440', + "rdca;": '\U00002937', + "rdldhar;": '\U00002969', + "rdquo;": '\U0000201D', + "rdquor;": '\U0000201D', + "rdsh;": '\U000021B3', + "real;": '\U0000211C', + "realine;": '\U0000211B', + "realpart;": '\U0000211C', + "reals;": '\U0000211D', + "rect;": '\U000025AD', + "reg;": '\U000000AE', + "rfisht;": '\U0000297D', + "rfloor;": '\U0000230B', + "rfr;": '\U0001D52F', + "rhard;": '\U000021C1', + "rharu;": '\U000021C0', + "rharul;": '\U0000296C', + "rho;": '\U000003C1', + "rhov;": '\U000003F1', + "rightarrow;": '\U00002192', + "rightarrowtail;": '\U000021A3', + "rightharpoondown;": '\U000021C1', + "rightharpoonup;": '\U000021C0', + "rightleftarrows;": '\U000021C4', + "rightleftharpoons;": '\U000021CC', + "rightrightarrows;": '\U000021C9', + "rightsquigarrow;": '\U0000219D', + "rightthreetimes;": '\U000022CC', + "ring;": '\U000002DA', + "risingdotseq;": '\U00002253', + "rlarr;": '\U000021C4', + "rlhar;": '\U000021CC', + "rlm;": '\U0000200F', + "rmoust;": '\U000023B1', + "rmoustache;": '\U000023B1', + "rnmid;": '\U00002AEE', + "roang;": '\U000027ED', + "roarr;": '\U000021FE', + "robrk;": '\U000027E7', + "ropar;": '\U00002986', + "ropf;": '\U0001D563', + "roplus;": '\U00002A2E', + "rotimes;": '\U00002A35', + "rpar;": '\U00000029', + "rpargt;": '\U00002994', + "rppolint;": '\U00002A12', + "rrarr;": '\U000021C9', + "rsaquo;": '\U0000203A', + "rscr;": '\U0001D4C7', + "rsh;": '\U000021B1', + "rsqb;": '\U0000005D', + "rsquo;": '\U00002019', + "rsquor;": '\U00002019', + "rthree;": '\U000022CC', + "rtimes;": '\U000022CA', + "rtri;": '\U000025B9', + "rtrie;": '\U000022B5', + "rtrif;": '\U000025B8', + "rtriltri;": '\U000029CE', + "ruluhar;": '\U00002968', + "rx;": '\U0000211E', + "sacute;": '\U0000015B', + "sbquo;": '\U0000201A', + "sc;": '\U0000227B', + "scE;": '\U00002AB4', + "scap;": '\U00002AB8', + "scaron;": '\U00000161', + "sccue;": '\U0000227D', + "sce;": '\U00002AB0', + "scedil;": '\U0000015F', + "scirc;": '\U0000015D', + "scnE;": '\U00002AB6', + "scnap;": '\U00002ABA', + "scnsim;": '\U000022E9', + "scpolint;": '\U00002A13', + "scsim;": '\U0000227F', + "scy;": '\U00000441', + "sdot;": '\U000022C5', + "sdotb;": '\U000022A1', + "sdote;": '\U00002A66', + "seArr;": '\U000021D8', + "searhk;": '\U00002925', + "searr;": '\U00002198', + "searrow;": '\U00002198', + "sect;": '\U000000A7', + "semi;": '\U0000003B', + "seswar;": '\U00002929', + "setminus;": '\U00002216', + "setmn;": '\U00002216', + "sext;": '\U00002736', + "sfr;": '\U0001D530', + "sfrown;": '\U00002322', + "sharp;": '\U0000266F', + "shchcy;": '\U00000449', + "shcy;": '\U00000448', + "shortmid;": '\U00002223', + "shortparallel;": '\U00002225', + "shy;": '\U000000AD', + "sigma;": '\U000003C3', + "sigmaf;": '\U000003C2', + "sigmav;": '\U000003C2', + "sim;": '\U0000223C', + "simdot;": '\U00002A6A', + "sime;": '\U00002243', + "simeq;": '\U00002243', + "simg;": '\U00002A9E', + "simgE;": '\U00002AA0', + "siml;": '\U00002A9D', + "simlE;": '\U00002A9F', + "simne;": '\U00002246', + "simplus;": '\U00002A24', + "simrarr;": '\U00002972', + "slarr;": '\U00002190', + "smallsetminus;": '\U00002216', + "smashp;": '\U00002A33', + "smeparsl;": '\U000029E4', + "smid;": '\U00002223', + "smile;": '\U00002323', + "smt;": '\U00002AAA', + "smte;": '\U00002AAC', + "softcy;": '\U0000044C', + "sol;": '\U0000002F', + "solb;": '\U000029C4', + "solbar;": '\U0000233F', + "sopf;": '\U0001D564', + "spades;": '\U00002660', + "spadesuit;": '\U00002660', + "spar;": '\U00002225', + "sqcap;": '\U00002293', + "sqcup;": '\U00002294', + "sqsub;": '\U0000228F', + "sqsube;": '\U00002291', + "sqsubset;": '\U0000228F', + "sqsubseteq;": '\U00002291', + "sqsup;": '\U00002290', + "sqsupe;": '\U00002292', + "sqsupset;": '\U00002290', + "sqsupseteq;": '\U00002292', + "squ;": '\U000025A1', + "square;": '\U000025A1', + "squarf;": '\U000025AA', + "squf;": '\U000025AA', + "srarr;": '\U00002192', + "sscr;": '\U0001D4C8', + "ssetmn;": '\U00002216', + "ssmile;": '\U00002323', + "sstarf;": '\U000022C6', + "star;": '\U00002606', + "starf;": '\U00002605', + "straightepsilon;": '\U000003F5', + "straightphi;": '\U000003D5', + "strns;": '\U000000AF', + "sub;": '\U00002282', + "subE;": '\U00002AC5', + "subdot;": '\U00002ABD', + "sube;": '\U00002286', + "subedot;": '\U00002AC3', + "submult;": '\U00002AC1', + "subnE;": '\U00002ACB', + "subne;": '\U0000228A', + "subplus;": '\U00002ABF', + "subrarr;": '\U00002979', + "subset;": '\U00002282', + "subseteq;": '\U00002286', + "subseteqq;": '\U00002AC5', + "subsetneq;": '\U0000228A', + "subsetneqq;": '\U00002ACB', + "subsim;": '\U00002AC7', + "subsub;": '\U00002AD5', + "subsup;": '\U00002AD3', + "succ;": '\U0000227B', + "succapprox;": '\U00002AB8', + "succcurlyeq;": '\U0000227D', + "succeq;": '\U00002AB0', + "succnapprox;": '\U00002ABA', + "succneqq;": '\U00002AB6', + "succnsim;": '\U000022E9', + "succsim;": '\U0000227F', + "sum;": '\U00002211', + "sung;": '\U0000266A', + "sup;": '\U00002283', + "sup1;": '\U000000B9', + "sup2;": '\U000000B2', + "sup3;": '\U000000B3', + "supE;": '\U00002AC6', + "supdot;": '\U00002ABE', + "supdsub;": '\U00002AD8', + "supe;": '\U00002287', + "supedot;": '\U00002AC4', + "suphsol;": '\U000027C9', + "suphsub;": '\U00002AD7', + "suplarr;": '\U0000297B', + "supmult;": '\U00002AC2', + "supnE;": '\U00002ACC', + "supne;": '\U0000228B', + "supplus;": '\U00002AC0', + "supset;": '\U00002283', + "supseteq;": '\U00002287', + "supseteqq;": '\U00002AC6', + "supsetneq;": '\U0000228B', + "supsetneqq;": '\U00002ACC', + "supsim;": '\U00002AC8', + "supsub;": '\U00002AD4', + "supsup;": '\U00002AD6', + "swArr;": '\U000021D9', + "swarhk;": '\U00002926', + "swarr;": '\U00002199', + "swarrow;": '\U00002199', + "swnwar;": '\U0000292A', + "szlig;": '\U000000DF', + "target;": '\U00002316', + "tau;": '\U000003C4', + "tbrk;": '\U000023B4', + "tcaron;": '\U00000165', + "tcedil;": '\U00000163', + "tcy;": '\U00000442', + "tdot;": '\U000020DB', + "telrec;": '\U00002315', + "tfr;": '\U0001D531', + "there4;": '\U00002234', + "therefore;": '\U00002234', + "theta;": '\U000003B8', + "thetasym;": '\U000003D1', + "thetav;": '\U000003D1', + "thickapprox;": '\U00002248', + "thicksim;": '\U0000223C', + "thinsp;": '\U00002009', + "thkap;": '\U00002248', + "thksim;": '\U0000223C', + "thorn;": '\U000000FE', + "tilde;": '\U000002DC', + "times;": '\U000000D7', + "timesb;": '\U000022A0', + "timesbar;": '\U00002A31', + "timesd;": '\U00002A30', + "tint;": '\U0000222D', + "toea;": '\U00002928', + "top;": '\U000022A4', + "topbot;": '\U00002336', + "topcir;": '\U00002AF1', + "topf;": '\U0001D565', + "topfork;": '\U00002ADA', + "tosa;": '\U00002929', + "tprime;": '\U00002034', + "trade;": '\U00002122', + "triangle;": '\U000025B5', + "triangledown;": '\U000025BF', + "triangleleft;": '\U000025C3', + "trianglelefteq;": '\U000022B4', + "triangleq;": '\U0000225C', + "triangleright;": '\U000025B9', + "trianglerighteq;": '\U000022B5', + "tridot;": '\U000025EC', + "trie;": '\U0000225C', + "triminus;": '\U00002A3A', + "triplus;": '\U00002A39', + "trisb;": '\U000029CD', + "tritime;": '\U00002A3B', + "trpezium;": '\U000023E2', + "tscr;": '\U0001D4C9', + "tscy;": '\U00000446', + "tshcy;": '\U0000045B', + "tstrok;": '\U00000167', + "twixt;": '\U0000226C', + "twoheadleftarrow;": '\U0000219E', + "twoheadrightarrow;": '\U000021A0', + "uArr;": '\U000021D1', + "uHar;": '\U00002963', + "uacute;": '\U000000FA', + "uarr;": '\U00002191', + "ubrcy;": '\U0000045E', + "ubreve;": '\U0000016D', + "ucirc;": '\U000000FB', + "ucy;": '\U00000443', + "udarr;": '\U000021C5', + "udblac;": '\U00000171', + "udhar;": '\U0000296E', + "ufisht;": '\U0000297E', + "ufr;": '\U0001D532', + "ugrave;": '\U000000F9', + "uharl;": '\U000021BF', + "uharr;": '\U000021BE', + "uhblk;": '\U00002580', + "ulcorn;": '\U0000231C', + "ulcorner;": '\U0000231C', + "ulcrop;": '\U0000230F', + "ultri;": '\U000025F8', + "umacr;": '\U0000016B', + "uml;": '\U000000A8', + "uogon;": '\U00000173', + "uopf;": '\U0001D566', + "uparrow;": '\U00002191', + "updownarrow;": '\U00002195', + "upharpoonleft;": '\U000021BF', + "upharpoonright;": '\U000021BE', + "uplus;": '\U0000228E', + "upsi;": '\U000003C5', + "upsih;": '\U000003D2', + "upsilon;": '\U000003C5', + "upuparrows;": '\U000021C8', + "urcorn;": '\U0000231D', + "urcorner;": '\U0000231D', + "urcrop;": '\U0000230E', + "uring;": '\U0000016F', + "urtri;": '\U000025F9', + "uscr;": '\U0001D4CA', + "utdot;": '\U000022F0', + "utilde;": '\U00000169', + "utri;": '\U000025B5', + "utrif;": '\U000025B4', + "uuarr;": '\U000021C8', + "uuml;": '\U000000FC', + "uwangle;": '\U000029A7', + "vArr;": '\U000021D5', + "vBar;": '\U00002AE8', + "vBarv;": '\U00002AE9', + "vDash;": '\U000022A8', + "vangrt;": '\U0000299C', + "varepsilon;": '\U000003F5', + "varkappa;": '\U000003F0', + "varnothing;": '\U00002205', + "varphi;": '\U000003D5', + "varpi;": '\U000003D6', + "varpropto;": '\U0000221D', + "varr;": '\U00002195', + "varrho;": '\U000003F1', + "varsigma;": '\U000003C2', + "vartheta;": '\U000003D1', + "vartriangleleft;": '\U000022B2', + "vartriangleright;": '\U000022B3', + "vcy;": '\U00000432', + "vdash;": '\U000022A2', + "vee;": '\U00002228', + "veebar;": '\U000022BB', + "veeeq;": '\U0000225A', + "vellip;": '\U000022EE', + "verbar;": '\U0000007C', + "vert;": '\U0000007C', + "vfr;": '\U0001D533', + "vltri;": '\U000022B2', + "vopf;": '\U0001D567', + "vprop;": '\U0000221D', + "vrtri;": '\U000022B3', + "vscr;": '\U0001D4CB', + "vzigzag;": '\U0000299A', + "wcirc;": '\U00000175', + "wedbar;": '\U00002A5F', + "wedge;": '\U00002227', + "wedgeq;": '\U00002259', + "weierp;": '\U00002118', + "wfr;": '\U0001D534', + "wopf;": '\U0001D568', + "wp;": '\U00002118', + "wr;": '\U00002240', + "wreath;": '\U00002240', + "wscr;": '\U0001D4CC', + "xcap;": '\U000022C2', + "xcirc;": '\U000025EF', + "xcup;": '\U000022C3', + "xdtri;": '\U000025BD', + "xfr;": '\U0001D535', + "xhArr;": '\U000027FA', + "xharr;": '\U000027F7', + "xi;": '\U000003BE', + "xlArr;": '\U000027F8', + "xlarr;": '\U000027F5', + "xmap;": '\U000027FC', + "xnis;": '\U000022FB', + "xodot;": '\U00002A00', + "xopf;": '\U0001D569', + "xoplus;": '\U00002A01', + "xotime;": '\U00002A02', + "xrArr;": '\U000027F9', + "xrarr;": '\U000027F6', + "xscr;": '\U0001D4CD', + "xsqcup;": '\U00002A06', + "xuplus;": '\U00002A04', + "xutri;": '\U000025B3', + "xvee;": '\U000022C1', + "xwedge;": '\U000022C0', + "yacute;": '\U000000FD', + "yacy;": '\U0000044F', + "ycirc;": '\U00000177', + "ycy;": '\U0000044B', + "yen;": '\U000000A5', + "yfr;": '\U0001D536', + "yicy;": '\U00000457', + "yopf;": '\U0001D56A', + "yscr;": '\U0001D4CE', + "yucy;": '\U0000044E', + "yuml;": '\U000000FF', + "zacute;": '\U0000017A', + "zcaron;": '\U0000017E', + "zcy;": '\U00000437', + "zdot;": '\U0000017C', + "zeetrf;": '\U00002128', + "zeta;": '\U000003B6', + "zfr;": '\U0001D537', + "zhcy;": '\U00000436', + "zigrarr;": '\U000021DD', + "zopf;": '\U0001D56B', + "zscr;": '\U0001D4CF', + "zwj;": '\U0000200D', + "zwnj;": '\U0000200C', + "AElig": '\U000000C6', + "AMP": '\U00000026', + "Aacute": '\U000000C1', + "Acirc": '\U000000C2', + "Agrave": '\U000000C0', + "Aring": '\U000000C5', + "Atilde": '\U000000C3', + "Auml": '\U000000C4', + "COPY": '\U000000A9', + "Ccedil": '\U000000C7', + "ETH": '\U000000D0', + "Eacute": '\U000000C9', + "Ecirc": '\U000000CA', + "Egrave": '\U000000C8', + "Euml": '\U000000CB', + "GT": '\U0000003E', + "Iacute": '\U000000CD', + "Icirc": '\U000000CE', + "Igrave": '\U000000CC', + "Iuml": '\U000000CF', + "LT": '\U0000003C', + "Ntilde": '\U000000D1', + "Oacute": '\U000000D3', + "Ocirc": '\U000000D4', + "Ograve": '\U000000D2', + "Oslash": '\U000000D8', + "Otilde": '\U000000D5', + "Ouml": '\U000000D6', + "QUOT": '\U00000022', + "REG": '\U000000AE', + "THORN": '\U000000DE', + "Uacute": '\U000000DA', + "Ucirc": '\U000000DB', + "Ugrave": '\U000000D9', + "Uuml": '\U000000DC', + "Yacute": '\U000000DD', + "aacute": '\U000000E1', + "acirc": '\U000000E2', + "acute": '\U000000B4', + "aelig": '\U000000E6', + "agrave": '\U000000E0', + "amp": '\U00000026', + "aring": '\U000000E5', + "atilde": '\U000000E3', + "auml": '\U000000E4', + "brvbar": '\U000000A6', + "ccedil": '\U000000E7', + "cedil": '\U000000B8', + "cent": '\U000000A2', + "copy": '\U000000A9', + "curren": '\U000000A4', + "deg": '\U000000B0', + "divide": '\U000000F7', + "eacute": '\U000000E9', + "ecirc": '\U000000EA', + "egrave": '\U000000E8', + "eth": '\U000000F0', + "euml": '\U000000EB', + "frac12": '\U000000BD', + "frac14": '\U000000BC', + "frac34": '\U000000BE', + "gt": '\U0000003E', + "iacute": '\U000000ED', + "icirc": '\U000000EE', + "iexcl": '\U000000A1', + "igrave": '\U000000EC', + "iquest": '\U000000BF', + "iuml": '\U000000EF', + "laquo": '\U000000AB', + "lt": '\U0000003C', + "macr": '\U000000AF', + "micro": '\U000000B5', + "middot": '\U000000B7', + "nbsp": '\U000000A0', + "not": '\U000000AC', + "ntilde": '\U000000F1', + "oacute": '\U000000F3', + "ocirc": '\U000000F4', + "ograve": '\U000000F2', + "ordf": '\U000000AA', + "ordm": '\U000000BA', + "oslash": '\U000000F8', + "otilde": '\U000000F5', + "ouml": '\U000000F6', + "para": '\U000000B6', + "plusmn": '\U000000B1', + "pound": '\U000000A3', + "quot": '\U00000022', + "raquo": '\U000000BB', + "reg": '\U000000AE', + "sect": '\U000000A7', + "shy": '\U000000AD', + "sup1": '\U000000B9', + "sup2": '\U000000B2', + "sup3": '\U000000B3', + "szlig": '\U000000DF', + "thorn": '\U000000FE', + "times": '\U000000D7', + "uacute": '\U000000FA', + "ucirc": '\U000000FB', + "ugrave": '\U000000F9', + "uml": '\U000000A8', + "uuml": '\U000000FC', + "yacute": '\U000000FD', + "yen": '\U000000A5', + "yuml": '\U000000FF', } // HTML entities that are two unicode codepoints. diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/.travis.yml b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/.travis.yml rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/.travis.yml diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/LICENSE b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash/LICENSE rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/LICENSE diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/Makefile b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/Makefile similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/Makefile rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/Makefile diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/NEWS.md b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/NEWS.md similarity index 97% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/NEWS.md rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/NEWS.md index 7b7e27af2d..ff497d72bc 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/NEWS.md +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/NEWS.md @@ -289,16 +289,16 @@ new security framework is now as simple as: [go-libp2p-conn]: https://github.com/libp2p/go-libp2p-conn [go-libp2p-interface-conn]: https://github.com/libp2p/go-libp2p-interface-conn [go-libp2p-net]: https://github.com/libp2p/go-libp2p-net -[go-libp2p-netutil]: https://github.com/libp2p/go-libp2p/go-libp2p-netutil -[go-libp2p-swarm]: https://github.com/libp2p/go-libp2p/go-libp2p-swarm -[go-libp2p-swarm/testing]: https://github.com/libp2p/go-libp2p/go-libp2p-swarm/testing +[go-libp2p-netutil]: https://github.com/libp2p/go-libp2p-netutil +[go-libp2p-swarm]: https://github.com/libp2p/go-libp2p-swarm +[go-libp2p-swarm/testing]: https://github.com/libp2p/go-libp2p-swarm/tree/master/testing [go-libp2p-transport]: https://github.com/libp2p/go-libp2p-transport -[go-libp2p-transport/test]: https://github.com/libp2p/go-libp2p-transport/test +[go-libp2p-transport/test]: https://github.com/libp2p/go-libp2p-transport/tree/master/test [go-libp2p-transport-upgrader]: https://github.com/libp2p/go-libp2p-transport-upgrader [go-peerstream]: https://github.com/libp2p/go-peerstream [go-tcp-transport]: https://github.com/libp2p/go-tcp-transport [go-ws-transport]: https://github.com/libp2p/go-ws-transport -[example:echo]: https://github.com/libp2p/go-libp2p/tree/master/examples/echo +[example:echo]: https://github.com/libp2p/go-libp2p-examples/tree/master/echo [doc:go-libp2p-transport]: https://godoc.org/github.com/libp2p/go-libp2p-transport diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/README.md b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/README.md new file mode 100644 index 0000000000..a405e78535 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/README.md @@ -0,0 +1,263 @@ + +

+ libp2p hex logo +

+ +

The Go implementation of the libp2p Networking Stack.

+ +

+ + + + +

+ +

+ +
+ + + +
+

+ +# Project status + +[![Throughput Graph](https://graphs.waffle.io/libp2p/go-libp2p/throughput.svg)](https://waffle.io/libp2p/go-libp2p/metrics/throughput) + +[**`Weekly Core Dev Calls`**](https://github.com/ipfs/pm/issues/674) + +# Table of Contents + +- [Background](#background) +- [Bundles](#bundles) +- [Usage](#usage) + - [Install](#install) + - [API](#api) + - [Examples](#examples) +- [Development](#development) + - [Tests](#tests) + - [Packages](#packages) +- [Contribute](#contribute) +- [License](#license) + +## Background + +[libp2p](https://github.com/libp2p/specs) is a networking stack and library modularized out of [The IPFS Project](https://github.com/ipfs/ipfs), and bundled separately for other tools to use. +> +libp2p is the product of a long, and arduous quest of understanding -- a deep dive into the internet's network stack, and plentiful peer-to-peer protocols from the past. Building large scale peer-to-peer systems has been complex and difficult in the last 15 years, and libp2p is a way to fix that. It is a "network stack" -- a protocol suite -- that cleanly separates concerns, and enables sophisticated applications to only use the protocols they absolutely need, without giving up interoperability and upgradeability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects. +> +> We will be writing a set of docs, posts, tutorials, and talks to explain what p2p is, why it is tremendously useful, and how it can help your existing and new projects. But in the meantime, check out +> +> - [**The libp2p Specification**](https://github.com/libp2p/specs) +> - [**go-libp2p implementation**](https://github.com/libp2p/go-libp2p) +> - [**js-libp2p implementation**](https://github.com/libp2p/js-libp2p) + + +## Bundles + +There is currently only one bundle of `go-libp2p`, this package. This bundle is used by [`go-ipfs`](https://github.com/ipfs/go-ipfs). + +## Usage + +`go-libp2p` repo is a place holder for the list of Go modules that compose Go libp2p, as well as its entry point. + +### Install + +```bash +> go get -u -d github.com/libp2p/go-libp2p/... +> cd $GOPATH/src/github.com/libp2p/go-libp2p +> make +> make deps +``` + +### API + +[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p) + +### Examples + +Examples can be found in the [examples repo](https://github.com/libp2p/go-libp2p-examples). + +## Development + +### Dependencies + +While developing, you need to use [gx to install and link your dependencies](https://github.com/whyrusleeping/gx#dependencies), to do that, run: + +```sh +> make deps +``` + +Before commiting and pushing to Github, make sure to rewind the gx'ify of dependencies. You can do that with: + +```sh +> make publish +``` + +### Tests + +Running of individual tests is done through `gx test ` + +```bash +$ cd $GOPATH/src/github.com/libp2p/go-libp2p +$ make deps +$ gx test ./p2p/ +``` + +### Packages + +> This table is generated using the module [`package-table`](https://github.com/ipfs-shipyard/package-table) with `package-table --data=package-list.json`. + +List of packages currently in existence for libp2p: + +| Name | CI/Travis | CI/Jenkins | Coverage | Description | +| ---------|---------|---------|---------|--------- | +| **Libp2p** | +| [`go-libp2p`](//github.com/libp2p/go-libp2p) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p) | go-libp2p entry point | +| [`go-libp2p-host`](//github.com/libp2p/go-libp2p-host) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-host.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-host) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-host/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-host) | libp2p "host" interface | +| [`go-libp2p-blankhost`](//github.com/libp2p/go-libp2p-blankhost) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-blankhost.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-blankhost) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-blankhost/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-blankhost) | minimal implementation of the "host" interface | +| **Network** | +| [`go-libp2p-net`](//github.com/libp2p/go-libp2p-net) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-net.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-net) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-net/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-net) | libp2p connection and "network" interfaces | +| [`go-libp2p-swarm`](//github.com/libp2p/go-libp2p-swarm) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-swarm.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-swarm) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-swarm/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-swarm/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-swarm/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-swarm) | reference implementation | +| **Transport** | +| [`go-libp2p-transport`](//github.com/libp2p/go-libp2p-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-transport) | interfaces | +| [`go-ws-transport`](//github.com/libp2p/go-ws-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-ws-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-ws-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-ws-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-ws-transport) | WebSocket transport | +| [`go-tcp-transport`](//github.com/libp2p/go-tcp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-tcp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-tcp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-tcp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-tcp-transport) | TCP transport | +| [`go-libp2p-quic-transport`](//github.com/libp2p/go-libp2p-quic-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-quic-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-quic-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-quic-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-quic-transport) | QUIC transport | +| [`go-udp-transport`](//github.com/libp2p/go-udp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-udp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-udp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-udp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-udp-transport) | UDP transport | +| [`go-utp-transport`](//github.com/libp2p/go-utp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-utp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-utp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-utp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-utp-transport) | uTorrent transport (UTP) | +| [`go-libp2p-circuit`](//github.com/libp2p/go-libp2p-circuit) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-circuit/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-circuit/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-circuit/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-circuit) | relay transport | +| [`go-libp2p-transport-upgrader`](//github.com/libp2p/go-libp2p-transport-upgrader) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-transport-upgrader.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport-upgrader) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-transport-upgrader/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-transport-upgrader) | upgrades multiaddr-net connections into full libp2p transports | +| [`go-libp2p-reuseport-transport`](//github.com/libp2p/go-libp2p-reuseport-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-reuseport-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-reuseport-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-reuseport-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-reuseport-transport) | partial transport for building transports that reuse ports | +| **Encrypted Channels** | +| [`go-conn-security`](//github.com/libp2p/go-conn-security) | [![Travis CI](https://travis-ci.org/libp2p/go-conn-security.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-conn-security/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-conn-security) | interfaces | +| [`go-libp2p-secio`](//github.com/libp2p/go-libp2p-secio) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-secio.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-secio) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-secio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-secio) | SecIO crypto channel | +| [`go-conn-security-multistream`](//github.com/libp2p/go-conn-security-multistream) | [![Travis CI](https://travis-ci.org/libp2p/go-conn-security-multistream.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security-multistream) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-conn-security-multistream/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-conn-security-multistream) | multistream multiplexed meta crypto channel | +| **Private Network** | +| [`go-libp2p-interface-pnet`](//github.com/libp2p/go-libp2p-interface-pnet) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-interface-pnet.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-interface-pnet) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-interface-pnet/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-interface-pnet) | interfaces | +| [`go-libp2p-pnet`](//github.com/libp2p/go-libp2p-pnet) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pnet.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pnet) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pnet/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pnet) | reference implementation | +| **Stream Muxers** | +| [`go-stream-muxer`](//github.com/libp2p/go-stream-muxer) | [![Travis CI](https://travis-ci.org/libp2p/go-stream-muxer.svg?branch=master)](https://travis-ci.org/libp2p/go-stream-muxer) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-stream-muxer/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-stream-muxer) | interfaces | +| [`go-smux-yamux`](//github.com/whyrusleeping/go-smux-yamux) | [![Travis CI](https://travis-ci.org/whyrusleeping/go-smux-yamux.svg?branch=master)](https://travis-ci.org/whyrusleeping/go-smux-yamux) | N/A | [![codecov](https://codecov.io/gh/whyrusleeping/go-smux-yamux/branch/master/graph/badge.svg)](https://codecov.io/gh/whyrusleeping/go-smux-yamux) | YAMUX stream multiplexer | +| [`go-smux-mplex`](//github.com/whyrusleeping/go-smux-mplex) | [![Travis CI](https://travis-ci.org/whyrusleeping/go-smux-mplex.svg?branch=master)](https://travis-ci.org/whyrusleeping/go-smux-mplex) | N/A | [![codecov](https://codecov.io/gh/whyrusleeping/go-smux-mplex/branch/master/graph/badge.svg)](https://codecov.io/gh/whyrusleeping/go-smux-mplex) | MPLEX stream multiplexer | +| **NAT Traversal** | +| [`go-libp2p-nat`](//github.com/libp2p/go-libp2p-nat) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-nat.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-nat) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-nat/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-nat) | | +| [`go-libp2p-autonat`](//github.com/libp2p/go-libp2p-autonat) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-autonat.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-autonat) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-autonat/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-autonat) | NAT autodetection (client) | +| [`go-libp2p-autonat-svc`](//github.com/libp2p/go-libp2p-autonat-svc) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-autonat-svc.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-autonat-svc) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-autonat-svc/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-autonat-svc) | NAT autodetection (service) | +| **Peerstore** | +| [`go-libp2p-peerstore`](//github.com/libp2p/go-libp2p-peerstore) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-peerstore.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peerstore) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-peerstore/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-peerstore) | interfaces and reference implementation | +| **Connection Manager** | +| [`go-libp2p-interface-connmgr`](//github.com/libp2p/go-libp2p-interface-connmgr) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-interface-connmgr.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-interface-connmgr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-interface-connmgr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-interface-connmgr) | interface | +| [`go-libp2p-connmgr`](//github.com/libp2p/go-libp2p-connmgr) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-connmgr.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-connmgr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-connmgr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-connmgr) | reference implementation | +| **Routing** | +| [`go-libp2p-routing`](//github.com/libp2p/go-libp2p-routing) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing) | routing interfaces | +| [`go-libp2p-record`](//github.com/libp2p/go-libp2p-record) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-record.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-record) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-record/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-record) | record type and validator logic | +| [`go-libp2p-routing-helpers`](//github.com/libp2p/go-libp2p-routing-helpers) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing-helpers.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing-helpers) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-routing-helpers/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-routing-helpers/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers) | helpers for composing routers | +| [`go-libp2p-kad-dht`](//github.com/libp2p/go-libp2p-kad-dht) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-kad-dht.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-kad-dht) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-kad-dht/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-kad-dht/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-kad-dht/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-kad-dht) | Kademlia-like router | +| [`go-libp2p-pubsub-router`](//github.com/libp2p/go-libp2p-pubsub-router) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pubsub-router.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pubsub-router) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-pubsub-router/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-pubsub-router/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pubsub-router/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pubsub-router) | record-store over pubsub adapter | +| **Discovery** | +| [`go-libp2p-discovery`](//github.com/libp2p/go-libp2p-discovery) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-discovery.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-discovery) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-discovery/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-discovery) | active peer disovery interface | +| **Consensus** | +| [`go-libp2p-consensus`](//github.com/libp2p/go-libp2p-consensus) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-consensus.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-consensus) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-consensus/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-consensus) | consensus protocols interfaces | +| [`go-libp2p-raft`](//github.com/libp2p/go-libp2p-raft) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-raft.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-raft) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-raft/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-raft/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-raft/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-raft) | consensus implementation over raft | +| **Pubsub** | +| [`go-libp2p-pubsub`](//github.com/libp2p/go-libp2p-pubsub) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pubsub.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pubsub) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-pubsub/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-pubsub/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pubsub/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pubsub) | multiple pubsub over libp2p implementations | +| **RPC** | +| [`go-libp2p-gorpc`](//github.com/libp2p/go-libp2p-gorpc) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-gorpc.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-gorpc) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-gorpc/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-gorpc) | a simple RPC library for libp2p | +| **Metrics** | +| [`go-libp2p-metrics`](//github.com/libp2p/go-libp2p-metrics) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-metrics.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-metrics) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-metrics) | libp2p metrics interfaces/collectors | +| **Data Types** | +| [`go-libp2p-peer`](//github.com/libp2p/go-libp2p-peer) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-peer.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peer) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-peer/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-peer) | libp2p peer-ID datatype | +| [`go-libp2p-crypto`](//github.com/libp2p/go-libp2p-crypto) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-crypto.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-crypto) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-crypto) | libp2p key types | +| [`go-libp2p-protocol`](//github.com/libp2p/go-libp2p-protocol) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-protocol.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-protocol) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-protocol/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-protocol) | libp2p protocol datatype | +| [`go-libp2p-kbucket`](//github.com/libp2p/go-libp2p-kbucket) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-kbucket.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-kbucket) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-kbucket/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-kbucket) | Kademlia routing table helper types | +| **Utilities/miscellaneous** | +| [`go-libp2p-loggables`](//github.com/libp2p/go-libp2p-loggables) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-loggables.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-loggables) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-loggables/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-loggables) | logging helpers | +| [`go-maddr-filter`](//github.com/libp2p/go-maddr-filter) | [![Travis CI](https://travis-ci.org/libp2p/go-maddr-filter.svg?branch=master)](https://travis-ci.org/libp2p/go-maddr-filter) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-maddr-filter/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-maddr-filter) | multiaddr filtering helpers | +| [`go-libp2p-netutil`](//github.com/libp2p/go-libp2p-netutil) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-netutil.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-netutil) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-netutil/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-netutil) | misc utilities | +| [`go-msgio`](//github.com/libp2p/go-msgio) | [![Travis CI](https://travis-ci.org/libp2p/go-msgio.svg?branch=master)](https://travis-ci.org/libp2p/go-msgio) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-msgio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-msgio) | length prefixed data channel | +| [`go-addr-util`](//github.com/libp2p/go-addr-util) | [![Travis CI](https://travis-ci.org/libp2p/go-addr-util.svg?branch=master)](https://travis-ci.org/libp2p/go-addr-util) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-addr-util/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-addr-util) | address utilities for libp2p swarm | +| [`go-buffer-pool`](//github.com/libp2p/go-buffer-pool) | [![Travis CI](https://travis-ci.org/libp2p/go-buffer-pool.svg?branch=master)](https://travis-ci.org/libp2p/go-buffer-pool) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-buffer-pool/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-buffer-pool) | a variable size buffer pool for go | +| [`go-libp2p-routing-helpers`](//github.com/libp2p/go-libp2p-routing-helpers) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing-helpers.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing-helpers) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-routing-helpers/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-routing-helpers/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers) | routing helpers | +| [`go-reuseport`](//github.com/libp2p/go-reuseport) | [![Travis CI](https://travis-ci.org/libp2p/go-reuseport.svg?branch=master)](https://travis-ci.org/libp2p/go-reuseport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-reuseport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-reuseport) | enables reuse of addresses | +| [`go-sockaddr`](//github.com/libp2p/go-sockaddr) | [![Travis CI](https://travis-ci.org/libp2p/go-sockaddr.svg?branch=master)](https://travis-ci.org/libp2p/go-sockaddr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-sockaddr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-sockaddr) | utils for sockaddr conversions | +| [`go-flow-metrics`](//github.com/libp2p/go-flow-metrics) | [![Travis CI](https://travis-ci.org/libp2p/go-flow-metrics.svg?branch=master)](https://travis-ci.org/libp2p/go-flow-metrics) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-flow-metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-flow-metrics) | metrics library | +| **Testing and examples** | +| [`go-testutil`](//github.com/libp2p/go-testutil) | [![Travis CI](https://travis-ci.org/libp2p/go-testutil.svg?branch=master)](https://travis-ci.org/libp2p/go-testutil) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-testutil/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-testutil) | a collection of testing utilities for ipfs and libp2p | +| [`go-libp2p-examples`](//github.com/libp2p/go-libp2p-examples) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-examples.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-examples) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-examples/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-examples/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-examples/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-examples) | go-libp2p examples and tutorials | +| [`go-libp2p-circuit-progs`](//github.com/libp2p/go-libp2p-circuit-progs) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit-progs.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit-progs) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-circuit-progs/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-circuit-progs) | testing programs for go-libp2p-circuit | + + +# Contribute + +go-libp2p is part of [The IPFS Project](https://github.com/ipfs/ipfs), and is MIT licensed open source software. We welcome contributions big and small! Take a look at the [community contributing notes](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md). Please make sure to check the [issues](https://github.com/ipfs/go-libp2p/issues). Search the closed ones before reporting things, and help us with the open ones. + +Guidelines: + +- read the [libp2p spec](https://github.com/libp2p/specs) +- please make branches + pull-request, even if working on the main repository +- ask questions or talk about things in [Issues](https://github.com/libp2p/go-libp2p/issues) or #ipfs on freenode. +- ensure you are able to contribute (no legal issues please-- we use the DCO) +- run `go fmt` before pushing any code +- run `golint` and `go vet` too -- some things (like protobuf files) are expected to fail. +- get in touch with @jbenet and @diasdavid about how best to contribute +- have fun! + +There's a few things you can do right now to help out: + - Go through the modules below and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrasture behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically. + - **Perform code reviews**. + - **Add tests**. There can never be enough tests. + +## Modularizing go-libp2p + +We have currently a work in progress of modularizing go-libp2p from a repo monolith to several packages in different repos that can be reused for other projects of swapped for custom libp2p builds. + +We want to maintain history, so we'll use git-subtree for extracting packages. Find instructions below: + +```sh +# 1) create the extracted tree (has the directory specified as -P as its root) +> cd go-libp2p/ +> git subtree split -P p2p/crypto/secio/ -b libp2p-secio +62b0a5c21574bcbe06c422785cd5feff378ae5bd +# important to delete the tree now, so that outdated imports fail in step 5 +> git rm -r p2p/crypto/secio/ +> git commit +> cd ../ + +# 2) make the new repo +> mkdir go-libp2p-secio +> cd go-libp2p-secio/ +> git init && git commit --allow-empty + +# 3) fetch the extracted tree from the previous repo +> git remote add libp2p ../go-libp2p +> git fetch libp2p +> git reset --hard libp2p/libp2p-secio + +# 4) update self import paths +> sed -someflagsidontknow 'go-libp2p/p2p/crypto/secio' 'golibp2p-secio' +> git commit + +# 5) create package.json and check all imports are correct +> vim package.json +> gx --verbose install --global +> gx-go rewrite +> go test ./... +> gx-go rewrite --undo +> git commit + +# 4) make the package ready +> vim README.md LICENSE +> git commit + +# 5) bump the version separately +> vim package.json +> gx publish +> git add package.json .gx/ +> git commit -m 'Publish 1.2.3' + +# 6) clean up and push +> git remote rm libp2p +> git push origin master +``` diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/codecov.yml b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/codecov.yml rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/codecov.yml diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/config.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/config.go new file mode 100644 index 0000000000..620b0a0e37 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/config.go @@ -0,0 +1,237 @@ +package config + +import ( + "context" + "fmt" + + bhost "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + relay "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay" + routed "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed" + + metrics "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics" + filter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" + discovery "gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + circuit "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit" + swarm "gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" +) + +var log = logging.Logger("p2p-config") + +// AddrsFactory is a function that takes a set of multiaddrs we're listening on and +// returns the set of multiaddrs we should advertise to the network. +type AddrsFactory = bhost.AddrsFactory + +// NATManagerC is a NATManager constructor. +type NATManagerC func(inet.Network) bhost.NATManager + +type RoutingC func(host.Host) (routing.PeerRouting, error) + +// Config describes a set of settings for a libp2p node +// +// This is *not* a stable interface. Use the options defined in the root +// package. +type Config struct { + PeerKey crypto.PrivKey + + Transports []TptC + Muxers []MsMuxC + SecurityTransports []MsSecC + Insecure bool + Protector pnet.Protector + + RelayCustom bool + Relay bool + RelayOpts []circuit.RelayOpt + + ListenAddrs []ma.Multiaddr + AddrsFactory bhost.AddrsFactory + Filters *filter.Filters + + ConnManager ifconnmgr.ConnManager + NATManager NATManagerC + Peerstore pstore.Peerstore + Reporter metrics.Reporter + + DisablePing bool + + Routing RoutingC + + EnableAutoRelay bool +} + +// NewNode constructs a new libp2p Host from the Config. +// +// This function consumes the config. Do not reuse it (really!). +func (cfg *Config) NewNode(ctx context.Context) (host.Host, error) { + // Check this early. Prevents us from even *starting* without verifying this. + if pnet.ForcePrivateNetwork && cfg.Protector == nil { + log.Error("tried to create a libp2p node with no Private" + + " Network Protector but usage of Private Networks" + + " is forced by the enviroment") + // Note: This is *also* checked the upgrader itself so it'll be + // enforced even *if* you don't use the libp2p constructor. + return nil, pnet.ErrNotInPrivateNetwork + } + + if cfg.PeerKey == nil { + return nil, fmt.Errorf("no peer key specified") + } + + // Obtain Peer ID from public key + pid, err := peer.IDFromPublicKey(cfg.PeerKey.GetPublic()) + if err != nil { + return nil, err + } + + if cfg.Peerstore == nil { + return nil, fmt.Errorf("no peerstore specified") + } + + if !cfg.Insecure { + cfg.Peerstore.AddPrivKey(pid, cfg.PeerKey) + cfg.Peerstore.AddPubKey(pid, cfg.PeerKey.GetPublic()) + } + + // TODO: Make the swarm implementation configurable. + swrm := swarm.NewSwarm(ctx, pid, cfg.Peerstore, cfg.Reporter) + if cfg.Filters != nil { + swrm.Filters = cfg.Filters + } + + var h host.Host + h, err = bhost.NewHost(ctx, swrm, &bhost.HostOpts{ + ConnManager: cfg.ConnManager, + AddrsFactory: cfg.AddrsFactory, + NATManager: cfg.NATManager, + EnablePing: !cfg.DisablePing, + }) + if err != nil { + swrm.Close() + return nil, err + } + + upgrader := new(tptu.Upgrader) + upgrader.Protector = cfg.Protector + upgrader.Filters = swrm.Filters + if cfg.Insecure { + upgrader.Secure = makeInsecureTransport(pid) + } else { + upgrader.Secure, err = makeSecurityTransport(h, cfg.SecurityTransports) + if err != nil { + h.Close() + return nil, err + } + } + + upgrader.Muxer, err = makeMuxer(h, cfg.Muxers) + if err != nil { + h.Close() + return nil, err + } + + tpts, err := makeTransports(h, upgrader, cfg.Transports) + if err != nil { + h.Close() + return nil, err + } + for _, t := range tpts { + err = swrm.AddTransport(t) + if err != nil { + h.Close() + return nil, err + } + } + + if cfg.Relay { + err := circuit.AddRelayTransport(swrm.Context(), h, upgrader, cfg.RelayOpts...) + if err != nil { + h.Close() + return nil, err + } + } + + // TODO: This method succeeds if listening on one address succeeds. We + // should probably fail if listening on *any* addr fails. + if err := h.Network().Listen(cfg.ListenAddrs...); err != nil { + h.Close() + return nil, err + } + + // Configure routing and autorelay + var router routing.PeerRouting + if cfg.Routing != nil { + router, err = cfg.Routing(h) + if err != nil { + h.Close() + return nil, err + } + } + + if cfg.EnableAutoRelay { + if !cfg.Relay { + h.Close() + return nil, fmt.Errorf("cannot enable autorelay; relay is not enabled") + } + + if router == nil { + h.Close() + return nil, fmt.Errorf("cannot enable autorelay; no routing for discovery") + } + + crouter, ok := router.(routing.ContentRouting) + if !ok { + h.Close() + return nil, fmt.Errorf("cannot enable autorelay; no suitable routing for discovery") + } + + discovery := discovery.NewRoutingDiscovery(crouter) + + hop := false + for _, opt := range cfg.RelayOpts { + if opt == circuit.OptHop { + hop = true + break + } + } + + if hop { + h = relay.NewRelayHost(swrm.Context(), h.(*bhost.BasicHost), discovery) + } else { + h = relay.NewAutoRelayHost(swrm.Context(), h.(*bhost.BasicHost), discovery, router) + } + } + + if router != nil { + h = routed.Wrap(h, router) + } + + // TODO: Bootstrapping. + + return h, nil +} + +// Option is a libp2p config option that can be given to the libp2p constructor +// (`libp2p.New`). +type Option func(cfg *Config) error + +// Apply applies the given options to the config, returning the first error +// encountered (if any). +func (cfg *Config) Apply(opts ...Option) error { + for _, opt := range opts { + if err := opt(cfg); err != nil { + return err + } + } + return nil +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/constructor_types.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/constructor_types.go similarity index 77% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/constructor_types.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/constructor_types.go index fde938466c..01f735c081 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/constructor_types.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/constructor_types.go @@ -4,17 +4,17 @@ import ( "fmt" "reflect" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + security "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + filter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + mux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - mux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - security "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - filter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" ) var ( diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/muxer.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/muxer.go new file mode 100644 index 0000000000..6709dbb35e --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/muxer.go @@ -0,0 +1,63 @@ +package config + +import ( + "fmt" + + msmux "gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream" + mux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" +) + +// MuxC is a stream multiplex transport constructor +type MuxC func(h host.Host) (mux.Transport, error) + +// MsMuxC is a tuple containing a multiplex transport constructor and a protocol +// ID. +type MsMuxC struct { + MuxC + ID string +} + +var muxArgTypes = newArgTypeSet(hostType, networkType, peerIDType, pstoreType) + +// MuxerConstructor creates a multiplex constructor from the passed parameter +// using reflection. +func MuxerConstructor(m interface{}) (MuxC, error) { + // Already constructed? + if t, ok := m.(mux.Transport); ok { + return func(_ host.Host) (mux.Transport, error) { + return t, nil + }, nil + } + + ctor, err := makeConstructor(m, muxType, muxArgTypes) + if err != nil { + return nil, err + } + return func(h host.Host) (mux.Transport, error) { + t, err := ctor(h, nil) + if err != nil { + return nil, err + } + return t.(mux.Transport), nil + }, nil +} + +func makeMuxer(h host.Host, tpts []MsMuxC) (mux.Transport, error) { + muxMuxer := msmux.NewBlankTransport() + transportSet := make(map[string]struct{}, len(tpts)) + for _, tptC := range tpts { + if _, ok := transportSet[tptC.ID]; ok { + return nil, fmt.Errorf("duplicate muxer transport: %s", tptC.ID) + } + transportSet[tptC.ID] = struct{}{} + } + for _, tptC := range tpts { + tpt, err := tptC.MuxC(h) + if err != nil { + return nil, err + } + muxMuxer.AddTransport(tptC.ID, tpt) + } + return muxMuxer, nil +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/reflection_magic.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/reflection_magic.go similarity index 96% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/reflection_magic.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/reflection_magic.go index 07f750a4e4..e1230c5260 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/reflection_magic.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/reflection_magic.go @@ -5,8 +5,8 @@ import ( "reflect" "runtime" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" ) var errorType = reflect.TypeOf((*error)(nil)).Elem() diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/security.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/security.go new file mode 100644 index 0000000000..4040fd36a4 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/security.go @@ -0,0 +1,77 @@ +package config + +import ( + "fmt" + + security "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + insecure "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security/insecure" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + csms "gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream" +) + +// SecC is a security transport constructor +type SecC func(h host.Host) (security.Transport, error) + +// MsSecC is a tuple containing a security transport constructor and a protocol +// ID. +type MsSecC struct { + SecC + ID string +} + +var securityArgTypes = newArgTypeSet( + hostType, networkType, peerIDType, + privKeyType, pubKeyType, pstoreType, +) + +// SecurityConstructor creates a security constructor from the passed parameter +// using reflection. +func SecurityConstructor(sec interface{}) (SecC, error) { + // Already constructed? + if t, ok := sec.(security.Transport); ok { + return func(_ host.Host) (security.Transport, error) { + return t, nil + }, nil + } + + ctor, err := makeConstructor(sec, securityType, securityArgTypes) + if err != nil { + return nil, err + } + return func(h host.Host) (security.Transport, error) { + t, err := ctor(h, nil) + if err != nil { + return nil, err + } + return t.(security.Transport), nil + }, nil +} + +func makeInsecureTransport(id peer.ID) security.Transport { + secMuxer := new(csms.SSMuxer) + secMuxer.AddTransport(insecure.ID, insecure.New(id)) + return secMuxer +} + +func makeSecurityTransport(h host.Host, tpts []MsSecC) (security.Transport, error) { + secMuxer := new(csms.SSMuxer) + transportSet := make(map[string]struct{}, len(tpts)) + for _, tptC := range tpts { + if _, ok := transportSet[tptC.ID]; ok { + return nil, fmt.Errorf("duplicate security transport: %s", tptC.ID) + } + transportSet[tptC.ID] = struct{}{} + } + for _, tptC := range tpts { + tpt, err := tptC.SecC(h) + if err != nil { + return nil, err + } + if _, ok := tpt.(*insecure.Transport); ok { + return nil, fmt.Errorf("cannot construct libp2p with an insecure transport, set the Insecure config option instead") + } + secMuxer.AddTransport(tptC.ID, tpt) + } + return secMuxer, nil +} diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/transport.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/transport.go new file mode 100644 index 0000000000..b7d9d93bf0 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config/transport.go @@ -0,0 +1,66 @@ +package config + +import ( + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" +) + +// TptC is the type for libp2p transport constructors. You probably won't ever +// implement this function interface directly. Instead, pass your transport +// constructor to TransportConstructor. +type TptC func(h host.Host, u *tptu.Upgrader) (transport.Transport, error) + +var transportArgTypes = argTypes + +// TransportConstructor uses reflection to turn a function that constructs a +// transport into a TptC. +// +// You can pass either a constructed transport (something that implements +// `transport.Transport`) or a function that takes any of: +// +// * The local peer ID. +// * A transport connection upgrader. +// * A private key. +// * A public key. +// * A Host. +// * A Network. +// * A Peerstore. +// * An address filter. +// * A security transport. +// * A stream multiplexer transport. +// * A private network protector. +// +// And returns a type implementing transport.Transport and, optionally, an error +// (as the second argument). +func TransportConstructor(tpt interface{}) (TptC, error) { + // Already constructed? + if t, ok := tpt.(transport.Transport); ok { + return func(_ host.Host, _ *tptu.Upgrader) (transport.Transport, error) { + return t, nil + }, nil + } + ctor, err := makeConstructor(tpt, transportType, transportArgTypes) + if err != nil { + return nil, err + } + return func(h host.Host, u *tptu.Upgrader) (transport.Transport, error) { + t, err := ctor(h, u) + if err != nil { + return nil, err + } + return t.(transport.Transport), nil + }, nil +} + +func makeTransports(h host.Host, u *tptu.Upgrader, tpts []TptC) ([]transport.Transport, error) { + transports := make([]transport.Transport, len(tpts)) + for i, tC := range tpts { + t, err := tC(h, u) + if err != nil { + return nil, err + } + transports[i] = t + } + return transports, nil +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/defaults.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/defaults.go similarity index 86% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/defaults.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/defaults.go index d04a43e4a3..9bddd3bf87 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/defaults.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/defaults.go @@ -5,14 +5,14 @@ package libp2p import ( "crypto/rand" - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - multiaddr "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - pstoremem "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem" - tcp "gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport" - secio "gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio" - ws "gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport" - mplex "gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex" - yamux "gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux" + secio "gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio" + tcp "gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + multiaddr "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + pstoremem "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem" + mplex "gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex" + ws "gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport" + yamux "gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux" ) // DefaultSecurity is the default security option. diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/error_util.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/error_util.go similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/error_util.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/error_util.go diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/libp2p.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/libp2p.go similarity index 94% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/libp2p.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/libp2p.go index 76cbf5b84f..ca05b0965b 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/libp2p.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/libp2p.go @@ -3,9 +3,9 @@ package libp2p import ( "context" - config "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config" + config "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" ) // Config describes a set of settings for a libp2p node diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/options.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/options.go new file mode 100644 index 0000000000..623ca06531 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/options.go @@ -0,0 +1,305 @@ +package libp2p + +// This file contains all libp2p configuration options (except the defaults, +// those are in defaults.go) + +import ( + "fmt" + "net" + + config "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/config" + bhost "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + + metrics "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics" + filter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + circuit "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// ListenAddrStrings configures libp2p to listen on the given (unparsed) +// addresses. +func ListenAddrStrings(s ...string) Option { + return func(cfg *Config) error { + for _, addrstr := range s { + a, err := ma.NewMultiaddr(addrstr) + if err != nil { + return err + } + cfg.ListenAddrs = append(cfg.ListenAddrs, a) + } + return nil + } +} + +// ListenAddrs configures libp2p to listen on the given addresses. +func ListenAddrs(addrs ...ma.Multiaddr) Option { + return func(cfg *Config) error { + cfg.ListenAddrs = append(cfg.ListenAddrs, addrs...) + return nil + } +} + +// Security configures libp2p to use the given security transport (or transport +// constructor). +// +// Name is the protocol name. +// +// The transport can be a constructed security.Transport or a function taking +// any subset of this libp2p node's: +// * Public key +// * Private key +// * Peer ID +// * Host +// * Network +// * Peerstore +func Security(name string, tpt interface{}) Option { + stpt, err := config.SecurityConstructor(tpt) + err = traceError(err, 1) + return func(cfg *Config) error { + if err != nil { + return err + } + if cfg.Insecure { + return fmt.Errorf("cannot use security transports with an insecure libp2p configuration") + } + cfg.SecurityTransports = append(cfg.SecurityTransports, config.MsSecC{SecC: stpt, ID: name}) + return nil + } +} + +// NoSecurity is an option that completely disables all transport security. +// It's incompatible with all other transport security protocols. +var NoSecurity Option = func(cfg *Config) error { + if len(cfg.SecurityTransports) > 0 { + return fmt.Errorf("cannot use security transports with an insecure libp2p configuration") + } + cfg.Insecure = true + return nil +} + +// Muxer configures libp2p to use the given stream multiplexer (or stream +// multiplexer constructor). +// +// Name is the protocol name. +// +// The transport can be a constructed mux.Transport or a function taking any +// subset of this libp2p node's: +// * Peer ID +// * Host +// * Network +// * Peerstore +func Muxer(name string, tpt interface{}) Option { + mtpt, err := config.MuxerConstructor(tpt) + err = traceError(err, 1) + return func(cfg *Config) error { + if err != nil { + return err + } + cfg.Muxers = append(cfg.Muxers, config.MsMuxC{MuxC: mtpt, ID: name}) + return nil + } +} + +// Transport configures libp2p to use the given transport (or transport +// constructor). +// +// The transport can be a constructed transport.Transport or a function taking +// any subset of this libp2p node's: +// * Transport Upgrader (*tptu.Upgrader) +// * Host +// * Stream muxer (muxer.Transport) +// * Security transport (security.Transport) +// * Private network protector (pnet.Protector) +// * Peer ID +// * Private Key +// * Public Key +// * Address filter (filter.Filter) +// * Peerstore +func Transport(tpt interface{}) Option { + tptc, err := config.TransportConstructor(tpt) + err = traceError(err, 1) + return func(cfg *Config) error { + if err != nil { + return err + } + cfg.Transports = append(cfg.Transports, tptc) + return nil + } +} + +// Peerstore configures libp2p to use the given peerstore. +func Peerstore(ps pstore.Peerstore) Option { + return func(cfg *Config) error { + if cfg.Peerstore != nil { + return fmt.Errorf("cannot specify multiple peerstore options") + } + + cfg.Peerstore = ps + return nil + } +} + +// PrivateNetwork configures libp2p to use the given private network protector. +func PrivateNetwork(prot pnet.Protector) Option { + return func(cfg *Config) error { + if cfg.Protector != nil { + return fmt.Errorf("cannot specify multiple private network options") + } + + cfg.Protector = prot + return nil + } +} + +// BandwidthReporter configures libp2p to use the given bandwidth reporter. +func BandwidthReporter(rep metrics.Reporter) Option { + return func(cfg *Config) error { + if cfg.Reporter != nil { + return fmt.Errorf("cannot specify multiple bandwidth reporter options") + } + + cfg.Reporter = rep + return nil + } +} + +// Identity configures libp2p to use the given private key to identify itself. +func Identity(sk crypto.PrivKey) Option { + return func(cfg *Config) error { + if cfg.PeerKey != nil { + return fmt.Errorf("cannot specify multiple identities") + } + + cfg.PeerKey = sk + return nil + } +} + +// ConnectionManager configures libp2p to use the given connection manager. +func ConnectionManager(connman ifconnmgr.ConnManager) Option { + return func(cfg *Config) error { + if cfg.ConnManager != nil { + return fmt.Errorf("cannot specify multiple connection managers") + } + cfg.ConnManager = connman + return nil + } +} + +// AddrsFactory configures libp2p to use the given address factory. +func AddrsFactory(factory config.AddrsFactory) Option { + return func(cfg *Config) error { + if cfg.AddrsFactory != nil { + return fmt.Errorf("cannot specify multiple address factories") + } + cfg.AddrsFactory = factory + return nil + } +} + +// EnableRelay configures libp2p to enable the relay transport with configuration options. +func EnableRelay(options ...circuit.RelayOpt) Option { + return func(cfg *Config) error { + cfg.RelayCustom = true + cfg.Relay = true + cfg.RelayOpts = options + return nil + } +} + +// DisableRelay configures libp2p to disable the relay transport +func DisableRelay() Option { + return func(cfg *Config) error { + cfg.RelayCustom = true + cfg.Relay = false + return nil + } +} + +// EnableAutoRelay configures libp2p to enable autorelay advertising; requires relay to +// be enabled and the Routing option to provide an instance of ContentRouting. +func EnableAutoRelay() Option { + return func(cfg *Config) error { + cfg.EnableAutoRelay = true + return nil + } +} + +// FilterAddresses configures libp2p to never dial nor accept connections from +// the given addresses. +func FilterAddresses(addrs ...*net.IPNet) Option { + return func(cfg *Config) error { + if cfg.Filters == nil { + cfg.Filters = filter.NewFilters() + } + for _, addr := range addrs { + cfg.Filters.AddDialFilter(addr) + } + return nil + } +} + +// NATPortMap configures libp2p to use the default NATManager. The default +// NATManager will attempt to open a port in your network's firewall using UPnP. +func NATPortMap() Option { + return NATManager(bhost.NewNATManager) +} + +// NATManager will configure libp2p to use the requested NATManager. This +// function should be passed a NATManager *constructor* that takes a libp2p Network. +func NATManager(nm config.NATManagerC) Option { + return func(cfg *Config) error { + if cfg.NATManager != nil { + return fmt.Errorf("cannot specify multiple NATManagers") + } + cfg.NATManager = nm + return nil + } +} + +// Ping will configure libp2p to support the ping service; enable by default. +func Ping(enable bool) Option { + return func(cfg *Config) error { + cfg.DisablePing = !enable + return nil + } +} + +// Routing will configure libp2p to use routing. +func Routing(rt config.RoutingC) Option { + return func(cfg *Config) error { + if cfg.Routing != nil { + return fmt.Errorf("cannot specify multiple routing options") + } + cfg.Routing = rt + return nil + } +} + +// NoListenAddrs will configure libp2p to not listen by default. +// +// This will both clear any configured listen addrs and prevent libp2p from +// applying the default listen address option. It also disables relay, unless the +// user explicitly specifies with an option, as the transport creates an implicit +// listen address that would make the node dialable through any relay it was connected to. +var NoListenAddrs = func(cfg *Config) error { + cfg.ListenAddrs = []ma.Multiaddr{} + if !cfg.RelayCustom { + cfg.RelayCustom = true + cfg.Relay = false + } + return nil +} + +// NoTransports will configure libp2p to not enable any transports. +// +// This will both clear any configured transports (specified in prior libp2p +// options) and prevent libp2p from applying the default transports. +var NoTransports = func(cfg *Config) error { + cfg.Transports = []config.TptC{} + return nil +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/discovery/mdns.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/discovery/mdns.go similarity index 91% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/discovery/mdns.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/discovery/mdns.go index 2429d4c7a5..08bfbc2aca 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/discovery/mdns.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/discovery/mdns.go @@ -8,12 +8,12 @@ import ( "sync" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" "gx/ipfs/QmekaTKpWkYGcn4ZEC5PwJDRCQHapwugmmG86g2Xpz5GBH/mdns" ) diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/basic_host.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/basic_host.go similarity index 92% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/basic_host.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/basic_host.go index a55c8b7699..9b3a043774 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/basic_host.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/basic_host.go @@ -5,19 +5,19 @@ import ( "io" "time" + identify "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify" + ping "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - identify "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify" - ping "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + madns "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" msmux "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" - madns "gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("basichost") @@ -59,10 +59,11 @@ type BasicHost struct { ids *identify.IDService pings *ping.PingService natmgr NATManager - addrs AddrsFactory maResolver *madns.Resolver cmgr ifconnmgr.ConnManager + AddrsFactory AddrsFactory + negtimeout time.Duration proc goprocess.Process @@ -106,11 +107,11 @@ type HostOpts struct { // NewHost constructs a new *BasicHost and activates it by attaching its stream and connection handlers to the given inet.Network. func NewHost(ctx context.Context, net inet.Network, opts *HostOpts) (*BasicHost, error) { h := &BasicHost{ - network: net, - mux: msmux.NewMultistreamMuxer(), - negtimeout: DefaultNegotiationTimeout, - addrs: DefaultAddrsFactory, - maResolver: madns.DefaultResolver, + network: net, + mux: msmux.NewMultistreamMuxer(), + negtimeout: DefaultNegotiationTimeout, + AddrsFactory: DefaultAddrsFactory, + maResolver: madns.DefaultResolver, } h.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { @@ -136,7 +137,7 @@ func NewHost(ctx context.Context, net inet.Network, opts *HostOpts) (*BasicHost, } if opts.AddrsFactory != nil { - h.addrs = opts.AddrsFactory + h.AddrsFactory = opts.AddrsFactory } if opts.NATManager != nil { @@ -256,6 +257,12 @@ func (h *BasicHost) newStreamHandler(s inet.Stream) { go handle(protoID, s) } +// PushIdentify pushes an identify update through the identify push protocol +// Warning: this interface is unstable and may disappear in the future. +func (h *BasicHost) PushIdentify() { + h.ids.Push() +} + // ID returns the (local) peer.ID associated with this Host func (h *BasicHost) ID() peer.ID { return h.Network().LocalPeer() @@ -406,7 +413,7 @@ func (h *BasicHost) Connect(ctx context.Context, pi pstore.PeerInfo) error { } func (h *BasicHost) resolveAddrs(ctx context.Context, pi pstore.PeerInfo) ([]ma.Multiaddr, error) { - proto := ma.ProtocolWithCode(ma.P_IPFS).Name + proto := ma.ProtocolWithCode(ma.P_P2P).Name p2paddr, err := ma.NewMultiaddr("/" + proto + "/" + pi.ID.Pretty()) if err != nil { return nil, err @@ -474,7 +481,7 @@ func (h *BasicHost) ConnManager() ifconnmgr.ConnManager { // Addrs returns listening addresses that are safe to announce to the network. // The output is the same as AllAddrs, but processed by AddrsFactory. func (h *BasicHost) Addrs() []ma.Multiaddr { - return h.addrs(h.AllAddrs()) + return h.AddrsFactory(h.AllAddrs()) } // mergeAddrs merges input address lists, leave only unique addresses diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/natmgr.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/natmgr.go similarity index 96% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/natmgr.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/natmgr.go index 06c8fbf30e..bb334a11ea 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic/natmgr.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic/natmgr.go @@ -5,10 +5,10 @@ import ( "sync" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - inat "gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + inat "gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat" ) // A simple interface to manage NAT devices. diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/autorelay.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/autorelay.go new file mode 100644 index 0000000000..64f6b17ead --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/autorelay.go @@ -0,0 +1,293 @@ +package relay + +import ( + "context" + "fmt" + "math/rand" + "sync" + "time" + + basic "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + discovery "gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + _ "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit" + autonat "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +const ( + RelayRendezvous = "/libp2p/relay" +) + +var ( + DesiredRelays = 3 + + BootDelay = 60 * time.Second + + unspecificRelay ma.Multiaddr +) + +func init() { + var err error + unspecificRelay, err = ma.NewMultiaddr("/p2p-circuit") + if err != nil { + panic(err) + } +} + +// AutoRelayHost is a Host that uses relays for connectivity when a NAT is detected. +type AutoRelayHost struct { + *basic.BasicHost + discover discovery.Discoverer + router routing.PeerRouting + autonat autonat.AutoNAT + addrsF basic.AddrsFactory + + disconnect chan struct{} + + mx sync.Mutex + relays map[peer.ID]pstore.PeerInfo + addrs []ma.Multiaddr +} + +func NewAutoRelayHost(ctx context.Context, bhost *basic.BasicHost, discover discovery.Discoverer, router routing.PeerRouting) *AutoRelayHost { + h := &AutoRelayHost{ + BasicHost: bhost, + discover: discover, + router: router, + addrsF: bhost.AddrsFactory, + relays: make(map[peer.ID]pstore.PeerInfo), + disconnect: make(chan struct{}, 1), + } + h.autonat = autonat.NewAutoNAT(ctx, bhost, h.baseAddrs) + bhost.AddrsFactory = h.hostAddrs + bhost.Network().Notify(h) + go h.background(ctx) + return h +} + +func (h *AutoRelayHost) hostAddrs(addrs []ma.Multiaddr) []ma.Multiaddr { + h.mx.Lock() + defer h.mx.Unlock() + if h.addrs != nil && h.autonat.Status() == autonat.NATStatusPrivate { + return h.addrs + } else { + return filterUnspecificRelay(h.addrsF(addrs)) + } +} + +func (h *AutoRelayHost) baseAddrs() []ma.Multiaddr { + return filterUnspecificRelay(h.addrsF(h.AllAddrs())) +} + +func (h *AutoRelayHost) background(ctx context.Context) { + select { + case <-time.After(autonat.AutoNATBootDelay + BootDelay): + case <-ctx.Done(): + return + } + + for { + wait := autonat.AutoNATRefreshInterval + switch h.autonat.Status() { + case autonat.NATStatusUnknown: + wait = autonat.AutoNATRetryInterval + case autonat.NATStatusPublic: + case autonat.NATStatusPrivate: + h.findRelays(ctx) + } + + select { + case <-h.disconnect: + // invalidate addrs + h.mx.Lock() + h.addrs = nil + h.mx.Unlock() + case <-time.After(wait): + case <-ctx.Done(): + return + } + } +} + +func (h *AutoRelayHost) findRelays(ctx context.Context) { + h.mx.Lock() + if len(h.relays) >= DesiredRelays { + h.mx.Unlock() + return + } + need := DesiredRelays - len(h.relays) + h.mx.Unlock() + + limit := 20 + if need > limit/2 { + limit = 2 * need + } + + dctx, cancel := context.WithTimeout(ctx, 60*time.Second) + pis, err := discovery.FindPeers(dctx, h.discover, RelayRendezvous, limit) + cancel() + if err != nil { + log.Debugf("error discovering relays: %s", err.Error()) + return + } + + pis = h.selectRelays(pis) + + update := 0 + + for _, pi := range pis { + h.mx.Lock() + if _, ok := h.relays[pi.ID]; ok { + h.mx.Unlock() + continue + } + h.mx.Unlock() + + cctx, cancel := context.WithTimeout(ctx, 60*time.Second) + + if len(pi.Addrs) == 0 { + pi, err = h.router.FindPeer(cctx, pi.ID) + if err != nil { + log.Debugf("error finding relay peer %s: %s", pi.ID, err.Error()) + cancel() + continue + } + } + + err = h.Connect(cctx, pi) + cancel() + if err != nil { + log.Debugf("error connecting to relay %s: %s", pi.ID, err.Error()) + continue + } + + log.Debugf("connected to relay %s", pi.ID) + h.mx.Lock() + h.relays[pi.ID] = pi + h.mx.Unlock() + + // tag the connection as very important + h.ConnManager().TagPeer(pi.ID, "relay", 42) + + update++ + need-- + if need == 0 { + break + } + } + + if update > 0 || h.addrs == nil { + h.updateAddrs() + } +} + +func (h *AutoRelayHost) selectRelays(pis []pstore.PeerInfo) []pstore.PeerInfo { + // TODO better relay selection strategy; this just selects random relays + // but we should probably use ping latency as the selection metric + shuffleRelays(pis) + return pis +} + +func (h *AutoRelayHost) updateAddrs() { + h.doUpdateAddrs() + h.PushIdentify() +} + +// This function updates our NATed advertised addrs (h.addrs) +// The public addrs are rewritten so that they only retain the public IP part; they +// become undialable but are useful as a hint to the dialer to determine whether or not +// to dial private addrs. +// The non-public addrs are included verbatim so that peers behind the same NAT/firewall +// can still dial us directly. +// On top of those, we add the relay-specific addrs for the relays to which we are +// connected. For each non-private relay addr, we encapsulate the p2p-circuit addr +// through which we can be dialed. +func (h *AutoRelayHost) doUpdateAddrs() { + h.mx.Lock() + defer h.mx.Unlock() + + addrs := h.baseAddrs() + raddrs := make([]ma.Multiaddr, 0, len(addrs)+len(h.relays)) + + // remove our public addresses from the list + for _, addr := range addrs { + if manet.IsPublicAddr(addr) { + continue + } + raddrs = append(raddrs, addr) + } + + // add relay specific addrs to the list + for _, pi := range h.relays { + circuit, err := ma.NewMultiaddr(fmt.Sprintf("/p2p/%s/p2p-circuit", pi.ID.Pretty())) + if err != nil { + panic(err) + } + + for _, addr := range pi.Addrs { + if !manet.IsPrivateAddr(addr) { + pub := addr.Encapsulate(circuit) + raddrs = append(raddrs, pub) + } + } + } + + h.addrs = raddrs +} + +func filterUnspecificRelay(addrs []ma.Multiaddr) []ma.Multiaddr { + res := make([]ma.Multiaddr, 0, len(addrs)) + for _, addr := range addrs { + if addr.Equal(unspecificRelay) { + continue + } + res = append(res, addr) + } + return res +} + +func shuffleRelays(pis []pstore.PeerInfo) { + for i := range pis { + j := rand.Intn(i + 1) + pis[i], pis[j] = pis[j], pis[i] + } +} + +func containsAddr(lst []ma.Multiaddr, addr ma.Multiaddr) bool { + for _, xaddr := range lst { + if xaddr.Equal(addr) { + return true + } + } + return false +} + +// notify +func (h *AutoRelayHost) Listen(inet.Network, ma.Multiaddr) {} +func (h *AutoRelayHost) ListenClose(inet.Network, ma.Multiaddr) {} +func (h *AutoRelayHost) Connected(inet.Network, inet.Conn) {} + +func (h *AutoRelayHost) Disconnected(_ inet.Network, c inet.Conn) { + p := c.RemotePeer() + h.mx.Lock() + defer h.mx.Unlock() + if _, ok := h.relays[p]; ok { + delete(h.relays, p) + select { + case h.disconnect <- struct{}{}: + default: + } + } +} + +func (h *AutoRelayHost) OpenedStream(inet.Network, inet.Stream) {} +func (h *AutoRelayHost) ClosedStream(inet.Network, inet.Stream) {} + +var _ host.Host = (*AutoRelayHost)(nil) diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/doc.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/doc.go new file mode 100644 index 0000000000..c0a5878113 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/doc.go @@ -0,0 +1,30 @@ +/* +The relay package contains host implementations that automatically +advertise relay addresses when the presence of NAT is detected. This +feature is dubbed `autorelay`. + +Warning: the internal interfaces are unstable. + +System Components: +- AutoNATService instances -- see https://github.com/libp2p/go-libp2p-autonat-svc +- One or more relays, instances of `RelayHost` +- The autorelayed hosts, instances of `AutoRelayHost`. + +How it works: +- `AutoNATService` instances are instantiated in the + bootstrappers (or other well known publicly reachable hosts) + +- `RelayHost`s are constructed with + `libp2p.New(libp2p.EnableRelay(circuit.OptHop), libp2p.Routing(makeDHT))`. + They provide Relay Hop services, and advertise through the DHT + in the `/libp2p/relay` namespace + +- `AutoRelayHost`s are constructed with `libp2p.New(libp2p.Routing(makeDHT))` + They passively discover autonat service instances and test dialability of + their listen address set through them. When the presence of NAT is detected, + they discover relays through the DHT, connect to some of them and begin + advertising relay addresses. The new set of addresses is propagated to + connected peers through the `identify/push` protocol. + +*/ +package relay diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/log.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/log.go new file mode 100644 index 0000000000..da3f28fe95 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/log.go @@ -0,0 +1,7 @@ +package relay + +import ( + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("autorelay") diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/relay.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/relay.go new file mode 100644 index 0000000000..33154b0ef9 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/relay/relay.go @@ -0,0 +1,47 @@ +package relay + +import ( + "context" + "time" + + basic "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + discovery "gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" +) + +var ( + AdvertiseBootDelay = 30 * time.Second +) + +// RelayHost is a Host that provides Relay services. +type RelayHost struct { + *basic.BasicHost + advertise discovery.Advertiser + addrsF basic.AddrsFactory +} + +// New constructs a new RelayHost +func NewRelayHost(ctx context.Context, bhost *basic.BasicHost, advertise discovery.Advertiser) *RelayHost { + h := &RelayHost{ + BasicHost: bhost, + addrsF: bhost.AddrsFactory, + advertise: advertise, + } + bhost.AddrsFactory = h.hostAddrs + go func() { + select { + case <-time.After(AdvertiseBootDelay): + discovery.Advertise(ctx, advertise, RelayRendezvous) + case <-ctx.Done(): + } + }() + return h +} + +func (h *RelayHost) hostAddrs(addrs []ma.Multiaddr) []ma.Multiaddr { + return filterUnspecificRelay(h.addrsF(addrs)) +} + +var _ host.Host = (*RelayHost)(nil) diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/routed/routed.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed/routed.go similarity index 89% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/routed/routed.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed/routed.go index 5c44c9eea4..8987c37cea 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/routed/routed.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/routed/routed.go @@ -5,18 +5,18 @@ import ( "fmt" "time" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - circuit "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + circuit "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" msmux "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("routedhost") diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/interface.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/interface.go new file mode 100644 index 0000000000..cccef9e424 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/interface.go @@ -0,0 +1,105 @@ +// Package mocknet provides a mock net.Network to test with. +// +// - a Mocknet has many inet.Networks +// - a Mocknet has many Links +// - a Link joins two inet.Networks +// - inet.Conns and inet.Streams are created by inet.Networks +package mocknet + +import ( + "io" + "time" + + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +type Mocknet interface { + + // GenPeer generates a peer and its inet.Network in the Mocknet + GenPeer() (host.Host, error) + + // AddPeer adds an existing peer. we need both a privkey and addr. + // ID is derived from PrivKey + AddPeer(ic.PrivKey, ma.Multiaddr) (host.Host, error) + AddPeerWithPeerstore(peer.ID, pstore.Peerstore) (host.Host, error) + + // retrieve things (with randomized iteration order) + Peers() []peer.ID + Net(peer.ID) inet.Network + Nets() []inet.Network + Host(peer.ID) host.Host + Hosts() []host.Host + Links() LinkMap + LinksBetweenPeers(a, b peer.ID) []Link + LinksBetweenNets(a, b inet.Network) []Link + + // Links are the **ability to connect**. + // think of Links as the physical medium. + // For p1 and p2 to connect, a link must exist between them. + // (this makes it possible to test dial failures, and + // things like relaying traffic) + LinkPeers(peer.ID, peer.ID) (Link, error) + LinkNets(inet.Network, inet.Network) (Link, error) + Unlink(Link) error + UnlinkPeers(peer.ID, peer.ID) error + UnlinkNets(inet.Network, inet.Network) error + + // LinkDefaults are the default options that govern links + // if they do not have thier own option set. + SetLinkDefaults(LinkOptions) + LinkDefaults() LinkOptions + + // Connections are the usual. Connecting means Dialing. + // **to succeed, peers must be linked beforehand** + ConnectPeers(peer.ID, peer.ID) (inet.Conn, error) + ConnectNets(inet.Network, inet.Network) (inet.Conn, error) + DisconnectPeers(peer.ID, peer.ID) error + DisconnectNets(inet.Network, inet.Network) error + LinkAll() error + ConnectAllButSelf() error +} + +// LinkOptions are used to change aspects of the links. +// Sorry but they dont work yet :( +type LinkOptions struct { + Latency time.Duration + Bandwidth float64 // in bytes-per-second + // we can make these values distributions down the road. +} + +// Link represents the **possibility** of a connection between +// two peers. Think of it like physical network links. Without +// them, the peers can try and try but they won't be able to +// connect. This allows constructing topologies where specific +// nodes cannot talk to each other directly. :) +type Link interface { + Networks() []inet.Network + Peers() []peer.ID + + SetOptions(LinkOptions) + Options() LinkOptions + + // Metrics() Metrics +} + +// LinkMap is a 3D map to give us an easy way to track links. +// (wow, much map. so data structure. how compose. ahhh pointer) +type LinkMap map[string]map[string]map[Link]struct{} + +// Printer lets you inspect things :) +type Printer interface { + // MocknetLinks shows the entire Mocknet's link table :) + MocknetLinks(mn Mocknet) + NetworkConns(ni inet.Network) +} + +// PrinterTo returns a Printer ready to write to w. +func PrinterTo(w io.Writer) Printer { + return &printer{w} +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock.go similarity index 82% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock.go index 01930c362a..9e460dfab2 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock.go @@ -3,7 +3,7 @@ package mocknet import ( "context" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("mocknet") @@ -44,14 +44,9 @@ func FullMeshConnected(ctx context.Context, n int) (Mocknet, error) { return nil, err } - nets := m.Nets() - for _, n1 := range nets { - for _, n2 := range nets { - if _, err := m.ConnectNets(n1, n2); err != nil { - return nil, err - } - } + err = m.ConnectAllButSelf() + if err != nil { + return nil, err } - return m, nil } diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_conn.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_conn.go similarity index 89% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_conn.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_conn.go index d7d849dcde..0929f74685 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_conn.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_conn.go @@ -4,11 +4,11 @@ import ( "container/list" "sync" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // conn represents one side's perspective of a @@ -121,11 +121,7 @@ func (c *conn) NewStream() (inet.Stream, error) { } func (c *conn) GetStreams() []inet.Stream { - var out []inet.Stream - for e := c.streams.Front(); e != nil; e = e.Next() { - out = append(out, e.Value.(*stream)) - } - return out + return c.allStreams() } // LocalMultiaddr is the Multiaddr on this side diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_link.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_link.go similarity index 88% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_link.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_link.go index 9861752667..af1d23fae1 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_link.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_link.go @@ -6,8 +6,8 @@ import ( "sync" "time" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // link implements mocknet.Link @@ -16,7 +16,7 @@ type link struct { mock *mocknet nets []*peernet opts LinkOptions - ratelimiter *ratelimiter + ratelimiter *RateLimiter // this could have addresses on both sides. sync.RWMutex @@ -25,7 +25,7 @@ type link struct { func newLink(mn *mocknet, opts LinkOptions) *link { l := &link{mock: mn, opts: opts, - ratelimiter: NewRatelimiter(opts.Bandwidth)} + ratelimiter: NewRateLimiter(opts.Bandwidth)} return l } diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_net.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_net.go similarity index 87% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_net.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_net.go index d9e349734d..a2841276fc 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_net.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_net.go @@ -3,24 +3,28 @@ package mocknet import ( "context" "fmt" + "net" "sort" "sync" - bhost "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + bhost "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/host/basic" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + p2putil "gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil" "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - pstoremem "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - p2putil "gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + pstoremem "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem" ) +// IP6 range that gets blackholed (in case our traffic ever makes it out onto +// the internet). +var blackholeIP6 = net.ParseIP("100::") + // mocknet implements mocknet.Mocknet type mocknet struct { nets map[peer.ID]*peernet @@ -54,8 +58,20 @@ func (mn *mocknet) GenPeer() (host.Host, error) { if err != nil { return nil, err } - - a := testutil.RandLocalTCPAddress() + id, err := peer.IDFromPrivateKey(sk) + if err != nil { + return nil, err + } + suffix := id + if len(id) > 8 { + suffix = id[len(id)-8:] + } + ip := append(net.IP{}, blackholeIP6...) + copy(ip[net.IPv6len-len(suffix):], suffix) + a, err := ma.NewMultiaddr(fmt.Sprintf("/ip6/%s/tcp/4242", ip)) + if err != nil { + return nil, fmt.Errorf("failed to create test multiaddr: %s", err) + } h, err := mn.AddPeer(sk, a) if err != nil { diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_peernet.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_peernet.go similarity index 92% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_peernet.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_peernet.go index 080bd17b3e..8f3e6c2a3f 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_peernet.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_peernet.go @@ -8,10 +8,10 @@ import ( "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) // peernet implements inet.Network @@ -118,6 +118,10 @@ func (pn *peernet) DialPeer(ctx context.Context, p peer.ID) (inet.Conn, error) { } func (pn *peernet) connect(p peer.ID) (*conn, error) { + if p == pn.peer { + return nil, fmt.Errorf("attempted to dial self %s", p) + } + // first, check if we already have live connections pn.RLock() cs, found := pn.connsByPeer[p] @@ -326,26 +330,10 @@ func (pn *peernet) Connectedness(p peer.ID) inet.Connectedness { // NewStream returns a new stream to given peer p. // If there is no connection to p, attempts to create one. func (pn *peernet) NewStream(ctx context.Context, p peer.ID) (inet.Stream, error) { - pn.Lock() - cs, found := pn.connsByPeer[p] - if !found || len(cs) < 1 { - pn.Unlock() - return nil, fmt.Errorf("no connection to peer") + c, err := pn.DialPeer(ctx, p) + if err != nil { + return nil, err } - - // if many conns are found, how do we select? for now, randomly... - // this would be an interesting place to test logic that can measure - // links (network interfaces) and select properly - n := rand.Intn(len(cs)) - var c *conn - for c = range cs { - if n == 0 { - break - } - n-- - } - pn.Unlock() - return c.NewStream() } diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_printer.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_printer.go similarity index 84% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_printer.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_printer.go index e157fd417f..2241e1d5c9 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_printer.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_printer.go @@ -4,8 +4,8 @@ import ( "fmt" "io" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // separate object so our interfaces are separate :) diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_stream.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_stream.go similarity index 95% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_stream.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_stream.go index d0e05a473f..a1e98279c9 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/mock_stream.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/mock_stream.go @@ -5,9 +5,10 @@ import ( "errors" "io" "net" + "sync/atomic" "time" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" ) @@ -24,7 +25,7 @@ type stream struct { writeErr error - protocol protocol.ID + protocol atomic.Value stat inet.Stat } @@ -70,7 +71,9 @@ func (s *stream) Write(p []byte) (n int, err error) { } func (s *stream) Protocol() protocol.ID { - return s.protocol + // Ignore type error. It means that the protocol is unset. + p, _ := s.protocol.Load().(protocol.ID) + return p } func (s *stream) Stat() inet.Stat { @@ -78,7 +81,7 @@ func (s *stream) Stat() inet.Stat { } func (s *stream) SetProtocol(proto protocol.ID) { - s.protocol = proto + s.protocol.Store(proto) } func (s *stream) Close() error { diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/ratelimiter.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/ratelimiter.go similarity index 80% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/ratelimiter.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/ratelimiter.go index 0b21c9a4d9..d4e5797b65 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/ratelimiter.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock/ratelimiter.go @@ -5,9 +5,9 @@ import ( "time" ) -// A ratelimiter is used by a link to determine how long to wait before sending +// A RateLimiter is used by a link to determine how long to wait before sending // data given a bandwidth cap. -type ratelimiter struct { +type RateLimiter struct { lock sync.Mutex bandwidth float64 // bytes per nanosecond allowance float64 // in bytes @@ -17,11 +17,11 @@ type ratelimiter struct { duration time.Duration // total delay introduced due to rate limiting } -// Creates a new ratelimiter with bandwidth (in bytes/sec) -func NewRatelimiter(bandwidth float64) *ratelimiter { +// Creates a new RateLimiter with bandwidth (in bytes/sec) +func NewRateLimiter(bandwidth float64) *RateLimiter { // convert bandwidth to bytes per nanosecond b := bandwidth / float64(time.Second) - return &ratelimiter{ + return &RateLimiter{ bandwidth: b, allowance: 0, maxAllowance: bandwidth, @@ -29,8 +29,8 @@ func NewRatelimiter(bandwidth float64) *ratelimiter { } } -// Changes bandwidth of a ratelimiter and resets its allowance -func (r *ratelimiter) UpdateBandwidth(bandwidth float64) { +// Changes bandwidth of a RateLimiter and resets its allowance +func (r *RateLimiter) UpdateBandwidth(bandwidth float64) { r.lock.Lock() defer r.lock.Unlock() // Convert bandwidth from bytes/second to bytes/nanosecond @@ -43,7 +43,7 @@ func (r *ratelimiter) UpdateBandwidth(bandwidth float64) { } // Returns how long to wait before sending data with length 'dataSize' bytes -func (r *ratelimiter) Limit(dataSize int) time.Duration { +func (r *RateLimiter) Limit(dataSize int) time.Duration { r.lock.Lock() defer r.lock.Unlock() // update time diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/id.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/id.go similarity index 87% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/id.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/id.go index 7d859e7421..85e1fc4b78 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/id.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/id.go @@ -3,19 +3,20 @@ package identify import ( "context" "sync" + "time" - pb "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb" + pb "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" msmux "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" ) var log = logging.Logger("net/identify") @@ -23,6 +24,9 @@ var log = logging.Logger("net/identify") // ID is the protocol.ID of the Identify Service. const ID = "/ipfs/id/1.0.0" +// IDPush is the protocol.ID of the Identify push protocol +const IDPush = "/ipfs/id/push/1.0.0" + // LibP2PVersion holds the current protocol version for a client running this code // TODO(jbenet): fix the versioning mess. const LibP2PVersion = "ipfs/0.1.0" @@ -60,6 +64,7 @@ func NewIDService(h host.Host) *IDService { currid: make(map[inet.Conn]chan struct{}), } h.SetStreamHandler(ID, s.requestHandler) + h.SetStreamHandler(IDPush, s.pushHandler) h.Network().Notify((*netNotifiee)(s)) return s } @@ -138,6 +143,26 @@ func (ids *IDService) responseHandler(s inet.Stream) { go inet.FullClose(s) } +func (ids *IDService) pushHandler(s inet.Stream) { + ids.responseHandler(s) +} + +func (ids *IDService) Push() { + for _, p := range ids.Host.Network().Peers() { + go func(p peer.ID) { + ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) + defer cancel() + s, err := ids.Host.NewStream(ctx, p, IDPush) + if err != nil { + log.Debugf("error opening push stream: %s", err.Error()) + return + } + + ids.requestHandler(s) + }(p) + } +} + func (ids *IDService) populateMessage(mes *pb.Identify, c inet.Conn) { // set protocols this node is currently handling @@ -161,9 +186,18 @@ func (ids *IDService) populateMessage(mes *pb.Identify, c inet.Conn) { // set our public key ownKey := ids.Host.Peerstore().PubKey(ids.Host.ID()) + + // check if we even have a public key. if ownKey == nil { - log.Errorf("did not have own public key in Peerstore") + // public key is nil. We are either using insecure transport or something erratic happened. + // check if we're even operating in "secure mode" + if ids.Host.Peerstore().PrivKey(ids.Host.ID()) != nil { + // private key is present. But NO public key. Something bad happened. + log.Errorf("did not have own public key in Peerstore") + } + // if neither of the key is present it is safe to assume that we are using an insecure transport. } else { + // public key is present. Safe to proceed. if kb, err := ownKey.Bytes(); err != nil { log.Errorf("failed to convert key to bytes") } else { diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/obsaddr.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/obsaddr.go similarity index 95% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/obsaddr.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/obsaddr.go index c9bd5413ba..13cee12d89 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/obsaddr.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/obsaddr.go @@ -4,9 +4,9 @@ import ( "sync" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - net "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) const ActivationThresh = 4 diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/Makefile b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/Makefile rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/Makefile diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/identify.pb.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/identify.pb.go similarity index 87% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/identify.pb.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/identify.pb.go index f976c767ed..5204d3da7b 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/identify.pb.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/identify.pb.go @@ -3,11 +3,12 @@ package identify_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,7 +48,7 @@ func (m *Identify) Reset() { *m = Identify{} } func (m *Identify) String() string { return proto.CompactTextString(m) } func (*Identify) ProtoMessage() {} func (*Identify) Descriptor() ([]byte, []int) { - return fileDescriptor_identify_daaec8baf46eae80, []int{0} + return fileDescriptor_83f1e7e6b485409f, []int{0} } func (m *Identify) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -64,8 +65,8 @@ func (m *Identify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Identify) XXX_Merge(src proto.Message) { - xxx_messageInfo_Identify.Merge(dst, src) +func (m *Identify) XXX_Merge(src proto.Message) { + xxx_messageInfo_Identify.Merge(m, src) } func (m *Identify) XXX_Size() int { return m.Size() @@ -121,6 +122,25 @@ func (m *Identify) GetProtocols() []string { func init() { proto.RegisterType((*Identify)(nil), "identify.pb.Identify") } + +func init() { proto.RegisterFile("identify.proto", fileDescriptor_83f1e7e6b485409f) } + +var fileDescriptor_83f1e7e6b485409f = []byte{ + // 187 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x4c, 0x49, 0xcd, + 0x2b, 0xc9, 0x4c, 0xab, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, 0xf0, 0x93, 0x94, + 0x6e, 0x31, 0x72, 0x71, 0x78, 0x42, 0xf9, 0x42, 0x1a, 0x5c, 0xfc, 0x60, 0x25, 0xc9, 0xf9, 0x39, + 0x61, 0xa9, 0x45, 0xc5, 0x99, 0xf9, 0x79, 0x12, 0xac, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0xe8, 0xc2, + 0x42, 0x4a, 0x5c, 0x3c, 0x89, 0xe9, 0xa9, 0x79, 0x25, 0x30, 0x65, 0x6c, 0x60, 0x65, 0x28, 0x62, + 0x42, 0x32, 0x5c, 0x9c, 0x05, 0xa5, 0x49, 0x39, 0x99, 0xc9, 0xde, 0xa9, 0x95, 0x12, 0x8c, 0x0a, + 0x8c, 0x1a, 0x3c, 0x41, 0x08, 0x01, 0x21, 0x05, 0x2e, 0xee, 0x9c, 0xcc, 0xe2, 0x92, 0xd4, 0x3c, + 0xc7, 0x94, 0x94, 0xa2, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x9e, 0x20, 0x64, 0x21, 0x90, 0x1d, + 0xf9, 0x49, 0xc5, 0xa9, 0x45, 0x65, 0xa9, 0x29, 0x20, 0x01, 0x09, 0x16, 0xb0, 0x11, 0x28, 0x62, + 0x60, 0x3b, 0xa0, 0x4e, 0x2b, 0x96, 0x60, 0x56, 0x60, 0xd6, 0xe0, 0x0c, 0x42, 0x08, 0x38, 0xf1, + 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xc2, 0x2c, 0x19, 0x46, 0x08, 0x01, 0x00, 0x00, +} + func (m *Identify) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -199,6 +219,9 @@ func encodeVarintIdentify(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Identify) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.PublicKey != nil { @@ -263,7 +286,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -291,7 +314,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -300,6 +323,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -322,7 +348,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -331,6 +357,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -351,7 +380,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -361,6 +390,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -380,7 +412,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -389,6 +421,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -411,7 +446,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -421,6 +456,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -441,7 +479,7 @@ func (m *Identify) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -451,6 +489,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIdentify } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIdentify + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -466,6 +507,9 @@ func (m *Identify) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthIdentify } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthIdentify + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -533,10 +577,13 @@ func skipIdentify(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthIdentify } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthIdentify + } return iNdEx, nil case 3: for { @@ -565,6 +612,9 @@ func skipIdentify(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthIdentify + } } return iNdEx, nil case 4: @@ -583,21 +633,3 @@ var ( ErrInvalidLengthIdentify = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIdentify = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("identify.proto", fileDescriptor_identify_daaec8baf46eae80) } - -var fileDescriptor_identify_daaec8baf46eae80 = []byte{ - // 187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x4c, 0x49, 0xcd, - 0x2b, 0xc9, 0x4c, 0xab, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, 0xf0, 0x93, 0x94, - 0x6e, 0x31, 0x72, 0x71, 0x78, 0x42, 0xf9, 0x42, 0x32, 0x5c, 0x9c, 0x05, 0xa5, 0x49, 0x39, 0x99, - 0xc9, 0xde, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x08, 0x01, 0x21, 0x05, 0x2e, - 0xee, 0x9c, 0xcc, 0xe2, 0x92, 0xd4, 0x3c, 0xc7, 0x94, 0x94, 0xa2, 0x62, 0x09, 0x26, 0x05, 0x66, - 0x0d, 0x9e, 0x20, 0x64, 0x21, 0xb0, 0x7e, 0x90, 0x15, 0xc9, 0xf9, 0x39, 0xc5, 0x12, 0xcc, 0x0a, - 0xcc, 0x1a, 0x9c, 0x41, 0x08, 0x01, 0x21, 0x25, 0x2e, 0x9e, 0xfc, 0xa4, 0xe2, 0xd4, 0xa2, 0xb2, - 0xd4, 0x14, 0x90, 0x72, 0x09, 0x16, 0xb0, 0x05, 0x28, 0x62, 0x42, 0x1a, 0x5c, 0xfc, 0x30, 0x0d, - 0x61, 0xa9, 0x45, 0xc5, 0x99, 0xf9, 0x79, 0x12, 0xac, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0xe8, 0xc2, - 0x20, 0xd3, 0x12, 0xd3, 0x53, 0xf3, 0x4a, 0x60, 0xca, 0xd8, 0xc0, 0xca, 0x50, 0xc4, 0x9c, 0x78, - 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0x46, 0x40, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x4b, 0x9c, 0x90, 0x7a, 0x08, 0x01, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/identify.proto b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/identify.proto similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/identify.proto rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/identify/pb/identify.proto diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping/ping.go b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping/ping.go similarity index 86% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping/ping.go rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping/ping.go index 179f0d8162..f185172256 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/ping/ping.go +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/protocol/ping/ping.go @@ -7,11 +7,11 @@ import ( "io" "time" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("ping") diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package-list.json b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package-list.json similarity index 96% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package-list.json rename to vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package-list.json index 7e1f62c3c7..142eda0a23 100644 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package-list.json +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package-list.json @@ -84,9 +84,7 @@ ["libp2p/go-msgio", "go-msgio", "length prefixed data channel"], ["libp2p/go-addr-util", "go-addr-util", "address utilities for libp2p swarm"], ["libp2p/go-buffer-pool", "go-buffer-pool", "a variable size buffer pool for go"], - ["libp2p/go-libp2p-loggables", "go-libp2p-loggables", "logging helpers"], ["libp2p/go-libp2p-routing-helpers", "go-libp2p-routing-helpers", "routing helpers"], - ["libp2p/go-maddr-filter", "go-maddr-filter", "a library to perform filtering of multiaddrs."], ["libp2p/go-reuseport", "go-reuseport", "enables reuse of addresses"], ["libp2p/go-sockaddr", "go-sockaddr", "utils for sockaddr conversions"], ["libp2p/go-flow-metrics", "go-flow-metrics", "metrics library"], diff --git a/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package.json b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package.json new file mode 100644 index 0000000000..4ef9c074d9 --- /dev/null +++ b/vendor/gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/package.json @@ -0,0 +1,255 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "hash": "QmekaTKpWkYGcn4ZEC5PwJDRCQHapwugmmG86g2Xpz5GBH", + "name": "mdns", + "version": "0.2.0" + }, + { + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "hash": "Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF", + "name": "go-detect-race", + "version": "1.0.1" + }, + { + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", + "name": "go-libp2p-loggables", + "version": "1.1.33" + }, + { + "author": "whyrusleeping", + "hash": "QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK", + "name": "go-libp2p-secio", + "version": "2.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "whyrusleeping", + "hash": "QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M", + "name": "go-tcp-transport", + "version": "2.0.28" + }, + { + "author": "whyrusleeping", + "hash": "QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd", + "name": "go-maddr-filter", + "version": "1.1.13" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR", + "name": "go-libp2p-metrics", + "version": "2.1.14" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "whyrusleeping", + "hash": "QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL", + "name": "go-libp2p-nat", + "version": "0.8.12" + }, + { + "author": "whyrusleeping", + "hash": "QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j", + "name": "go-libp2p-netutil", + "version": "0.4.23" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb", + "name": "go-smux-yamux", + "version": "2.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks", + "name": "go-smux-multistream", + "version": "2.0.3" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "vyzo", + "hash": "QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc", + "name": "go-libp2p-circuit", + "version": "2.3.14" + }, + { + "author": "lgierth", + "hash": "QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy", + "name": "go-multiaddr-dns", + "version": "0.3.1" + }, + { + "author": "why", + "hash": "QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd", + "name": "go-libp2p-interface-connmgr", + "version": "0.0.32" + }, + { + "author": "whyrusleeping", + "hash": "QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc", + "name": "go-smux-multiplex", + "version": "3.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5", + "name": "go-ws-transport", + "version": "2.0.27" + }, + { + "author": "stebalien", + "hash": "QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z", + "name": "go-conn-security-multistream", + "version": "0.1.26" + }, + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "libp2p", + "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", + "name": "go-libp2p-interface-pnet", + "version": "3.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + }, + { + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "vyzo", + "hash": "QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui", + "name": "go-libp2p-discovery", + "version": "1.0.14" + }, + { + "author": "vyzo", + "hash": "QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu", + "name": "go-libp2p-autonat", + "version": "1.0.12" + }, + { + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "6.0.39" +} + diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/.travis.yml b/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/.travis.yml deleted file mode 100644 index 2bf34b5c43..0000000000 --- a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go -go: - - 1.9 - -install: - - go get github.com/whyrusleeping/gx - - go get github.com/whyrusleeping/gx-go -script: - - make test - -after_success: - - bash <(curl -s https://codecov.io/bash) - -cache: - directories: - - $GOPATH/src/gx - -notifications: -email: false diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/key.go b/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/key.go deleted file mode 100644 index 63ce615a86..0000000000 --- a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/key.go +++ /dev/null @@ -1,36 +0,0 @@ -// Package dshelp provides utilities for parsing and creating -// datastore keys used by go-ipfs -package dshelp - -import ( - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -// NewKeyFromBinary creates a new key from a byte slice. -func NewKeyFromBinary(rawKey []byte) datastore.Key { - buf := make([]byte, 1+base32.RawStdEncoding.EncodedLen(len(rawKey))) - buf[0] = '/' - base32.RawStdEncoding.Encode(buf[1:], rawKey) - return datastore.RawKey(string(buf)) -} - -// BinaryFromDsKey returns the byte slice corresponding to the given Key. -func BinaryFromDsKey(k datastore.Key) ([]byte, error) { - return base32.RawStdEncoding.DecodeString(k.String()[1:]) -} - -// CidToDsKey creates a Key from the given Cid. -func CidToDsKey(k cid.Cid) datastore.Key { - return NewKeyFromBinary(k.Bytes()) -} - -// DsKeyToCid converts the given Key to its corresponding Cid. -func DsKeyToCid(dsKey datastore.Key) (cid.Cid, error) { - kb, err := BinaryFromDsKey(dsKey) - if err != nil { - return cid.Cid{}, err - } - return cid.Cast(kb) -} diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/package.json b/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/package.json deleted file mode 100644 index a91b7b6812..0000000000 --- a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-ds-help" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-ds-help" - }, - "gxDependencies": [ - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", - "name": "base32", - "version": "0.0.2" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-ipfs-ds-help", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.3" -} - diff --git a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/LICENSE b/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/LICENSE deleted file mode 100644 index d2688ec77e..0000000000 --- a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014, Daniel Walter -All rights resevered. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/README.md b/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/README.md deleted file mode 100644 index a3e145a7a8..0000000000 --- a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Eventfd -A wrapper around [eventfd()](http://linux.die.net/man/2/eventfd). - -## Installation -Download and install eventfd -~~~ -go get github.com/sahne/eventfd -~~~ - -## Usage -~~~ go -package main - -import ( - "log" - "github.com/sahne/eventfd" -) - -func main() { - efd, err := eventfd.New() - if err != nil { - log.Fatalf("Could not create EventFD: %v", err) - } - /* TODO: register fd at kernel interface (for example cgroups memory watcher) */ - /* listen for new events */ - for { - val, err := efd.ReadEvents() - if err != nil { - log.Printf("Error while reading from eventfd: %v", err) - break - } - } -} -~~~ diff --git a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/eventfd.go b/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/eventfd.go deleted file mode 100644 index 226a952ec4..0000000000 --- a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/eventfd.go +++ /dev/null @@ -1,108 +0,0 @@ -package eventfd - -/* - * eventfd wrapper for go - * Provides a ReadWriteCloser interface for handling eventfd()'s - * Eventfd provides a simple filedescriptor with very low overhead. - * It stores a bitfield of 64 bits which are added when written to - * the fd. - * - * For more information on eventfd() see `man eventfd`. - */ - -import ( - "fmt" - "syscall" - - "gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian" -) - -type EventFD struct { - fd int - valid bool -} - -/* Create a new EventFD. */ -func New() (*EventFD, error) { - fd, _, err := syscall.Syscall(syscall.SYS_EVENTFD2, 0, uintptr(syscall.O_CLOEXEC), 0) - if err != 0 { - return nil, err - } - - e := &EventFD{ - fd: int(fd), - valid: true, - } - return e, nil -} - -/* Read events from Eventfd. p should be at max 8 bytes. - * Returns the number of read bytes or 0 and error is set. - */ -func (e *EventFD) Read(p []byte) (int, error) { - n, err := syscall.Read(e.fd, p[:]) - if err != nil { - return 0, err - } - return n, nil -} - -/* Read events into a uint64 and return it. Returns 0 and error - * if an error occured - */ -func (e *EventFD) ReadEvents() (uint64, error) { - buf := make([]byte, 8) - n, err := syscall.Read(e.fd, buf[:]) - if err != nil { - return 0, err - } - if n != 8 { - return 0, fmt.Errorf("could not read for eventfd") - } - - val := endian.Endian.Uint64(buf) - return val, nil -} - -/* Write bytes to eventfd. Will be added to the current - * value of the internal uint64 of the eventfd(). - */ -func (e *EventFD) Write(p []byte) (int, error) { - n, err := syscall.Write(e.fd, p[:]) - if err != nil { - return 0, err - } - return n, nil -} - -/* Write a uint64 to eventfd. Value will be added to current value - * of the eventfd - */ -func (e *EventFD) WriteEvents(val uint64) error { - buf := make([]byte, 8) - endian.Endian.PutUint64(buf, val) - - n, err := syscall.Write(e.fd, buf[:]) - if err != nil { - return err - } - if n != 8 { - return fmt.Errorf("could not write to eventfd") - } - - return nil -} - -/* Returns the filedescriptor which is internally used */ -func (e *EventFD) Fd() int { - return e.fd -} - -/* Close the eventfd */ -func (e *EventFD) Close() error { - if e.valid == false { - return nil - } - e.valid = false - return syscall.Close(e.fd) -} diff --git a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/package.json b/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/package.json deleted file mode 100644 index 6fe5fc3465..0000000000 --- a/vendor/gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/gxed/eventfd" - }, - "gx": { - "dvcsimport": "github.com/gxed/eventfd" - }, - "gxDependencies": [ - { - "author": "gxed", - "hash": "QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw", - "name": "GoEndian", - "version": "1.0.0" - } - ], - "gxVersion": "0.9.0", - "language": "go", - "license": "", - "name": "eventfd", - "version": "0.1.0" -} diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/.travis.yml b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/.travis.yml new file mode 100644 index 0000000000..ab3654e7e0 --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/.travis.yml @@ -0,0 +1,25 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +env: + - GOTFLAGS="-race" + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/LICENSE b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/LICENSE rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/LICENSE diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/Makefile b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/Makefile similarity index 100% rename from vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/Makefile rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/Makefile diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/README.md b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/README.md similarity index 100% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/README.md rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/README.md diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/bucket.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/bucket.go similarity index 96% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/bucket.go rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/bucket.go index b83e39f0cb..64ec91b7c4 100644 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/bucket.go +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/bucket.go @@ -4,7 +4,7 @@ import ( "container/list" "sync" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // Bucket holds a list of peers. diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/codecov.yml b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/codecov.yml rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/codecov.yml diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace/keyspace.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace/keyspace.go similarity index 100% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace/keyspace.go rename to vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace/keyspace.go diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace/xor.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace/xor.go new file mode 100644 index 0000000000..cf7801d444 --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace/xor.go @@ -0,0 +1,59 @@ +package keyspace + +import ( + "bytes" + "crypto/sha256" + "math/big" + "math/bits" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" +) + +// XORKeySpace is a KeySpace which: +// - normalizes identifiers using a cryptographic hash (sha256) +// - measures distance by XORing keys together +var XORKeySpace = &xorKeySpace{} +var _ KeySpace = XORKeySpace // ensure it conforms + +type xorKeySpace struct{} + +// Key converts an identifier into a Key in this space. +func (s *xorKeySpace) Key(id []byte) Key { + hash := sha256.Sum256(id) + key := hash[:] + return Key{ + Space: s, + Original: id, + Bytes: key, + } +} + +// Equal returns whether keys are equal in this key space +func (s *xorKeySpace) Equal(k1, k2 Key) bool { + return bytes.Equal(k1.Bytes, k2.Bytes) +} + +// Distance returns the distance metric in this key space +func (s *xorKeySpace) Distance(k1, k2 Key) *big.Int { + // XOR the keys + k3 := u.XOR(k1.Bytes, k2.Bytes) + + // interpret it as an integer + dist := big.NewInt(0).SetBytes(k3) + return dist +} + +// Less returns whether the first key is smaller than the second. +func (s *xorKeySpace) Less(k1, k2 Key) bool { + return bytes.Compare(k1.Bytes, k2.Bytes) < 0 +} + +// ZeroPrefixLen returns the number of consecutive zeroes in a byte slice. +func ZeroPrefixLen(id []byte) int { + for i, b := range id { + if b != 0 { + return i*8 + bits.LeadingZeros8(uint8(b)) + } + } + return len(id) * 8 +} diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/package.json b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/package.json new file mode 100644 index 0000000000..33e6cfd053 --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/package.json @@ -0,0 +1,46 @@ +{ + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-kbucket" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-kbucket", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-kbucket", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.2.23" +} + diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/sorting.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/sorting.go new file mode 100644 index 0000000000..b59ff5aa9b --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/sorting.go @@ -0,0 +1,61 @@ +package kbucket + +import ( + "container/list" + "sort" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// A helper struct to sort peers by their distance to the local node +type peerDistance struct { + p peer.ID + distance ID +} + +// peerSorterArr implements sort.Interface to sort peers by xor distance +type peerSorterArr []*peerDistance + +func (p peerSorterArr) Len() int { return len(p) } +func (p peerSorterArr) Swap(a, b int) { p[a], p[b] = p[b], p[a] } +func (p peerSorterArr) Less(a, b int) bool { + return p[a].distance.less(p[b].distance) +} + +// + +func copyPeersFromList(target ID, peerArr peerSorterArr, peerList *list.List) peerSorterArr { + if cap(peerArr) < len(peerArr)+peerList.Len() { + newArr := make(peerSorterArr, 0, len(peerArr)+peerList.Len()) + copy(newArr, peerArr) + peerArr = newArr + } + for e := peerList.Front(); e != nil; e = e.Next() { + p := e.Value.(peer.ID) + pID := ConvertPeerID(p) + pd := peerDistance{ + p: p, + distance: xor(target, pID), + } + peerArr = append(peerArr, &pd) + } + return peerArr +} + +func SortClosestPeers(peers []peer.ID, target ID) []peer.ID { + psarr := make(peerSorterArr, 0, len(peers)) + for _, p := range peers { + pID := ConvertPeerID(p) + pd := &peerDistance{ + p: p, + distance: xor(target, pID), + } + psarr = append(psarr, pd) + } + sort.Sort(psarr) + out := make([]peer.ID, 0, len(psarr)) + for _, p := range psarr { + out = append(out, p.p) + } + return out +} diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/table.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/table.go new file mode 100644 index 0000000000..e441efd365 --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/table.go @@ -0,0 +1,250 @@ +// package kbucket implements a kademlia 'k-bucket' routing table. +package kbucket + +import ( + "errors" + "fmt" + "sort" + "sync" + "time" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("table") + +var ErrPeerRejectedHighLatency = errors.New("peer rejected; latency too high") +var ErrPeerRejectedNoCapacity = errors.New("peer rejected; insufficient capacity") + +// RoutingTable defines the routing table. +type RoutingTable struct { + + // ID of the local peer + local ID + + // Blanket lock, refine later for better performance + tabLock sync.RWMutex + + // latency metrics + metrics pstore.Metrics + + // Maximum acceptable latency for peers in this cluster + maxLatency time.Duration + + // kBuckets define all the fingers to other nodes. + Buckets []*Bucket + bucketsize int + + // notification functions + PeerRemoved func(peer.ID) + PeerAdded func(peer.ID) +} + +// NewRoutingTable creates a new routing table with a given bucketsize, local ID, and latency tolerance. +func NewRoutingTable(bucketsize int, localID ID, latency time.Duration, m pstore.Metrics) *RoutingTable { + rt := &RoutingTable{ + Buckets: []*Bucket{newBucket()}, + bucketsize: bucketsize, + local: localID, + maxLatency: latency, + metrics: m, + PeerRemoved: func(peer.ID) {}, + PeerAdded: func(peer.ID) {}, + } + + return rt +} + +// Update adds or moves the given peer to the front of its respective bucket +func (rt *RoutingTable) Update(p peer.ID) (evicted peer.ID, err error) { + peerID := ConvertPeerID(p) + cpl := commonPrefixLen(peerID, rt.local) + + rt.tabLock.Lock() + defer rt.tabLock.Unlock() + bucketID := cpl + if bucketID >= len(rt.Buckets) { + bucketID = len(rt.Buckets) - 1 + } + + bucket := rt.Buckets[bucketID] + if bucket.Has(p) { + // If the peer is already in the table, move it to the front. + // This signifies that it it "more active" and the less active nodes + // Will as a result tend towards the back of the list + bucket.MoveToFront(p) + return "", nil + } + + if rt.metrics.LatencyEWMA(p) > rt.maxLatency { + // Connection doesnt meet requirements, skip! + return "", ErrPeerRejectedHighLatency + } + + // We have enough space in the bucket (whether spawned or grouped). + if bucket.Len() < rt.bucketsize { + bucket.PushFront(p) + rt.PeerAdded(p) + return "", nil + } + + if bucketID == len(rt.Buckets)-1 { + // if the bucket is too large and this is the last bucket (i.e. wildcard), unfold it. + rt.nextBucket() + // the structure of the table has changed, so let's recheck if the peer now has a dedicated bucket. + bucketID = cpl + if bucketID >= len(rt.Buckets) { + bucketID = len(rt.Buckets) - 1 + } + bucket = rt.Buckets[bucketID] + if bucket.Len() >= rt.bucketsize { + // if after all the unfolding, we're unable to find room for this peer, scrap it. + return "", ErrPeerRejectedNoCapacity + } + bucket.PushFront(p) + rt.PeerAdded(p) + return "", nil + } + + return "", ErrPeerRejectedNoCapacity +} + +// Remove deletes a peer from the routing table. This is to be used +// when we are sure a node has disconnected completely. +func (rt *RoutingTable) Remove(p peer.ID) { + rt.tabLock.Lock() + defer rt.tabLock.Unlock() + peerID := ConvertPeerID(p) + cpl := commonPrefixLen(peerID, rt.local) + + bucketID := cpl + if bucketID >= len(rt.Buckets) { + bucketID = len(rt.Buckets) - 1 + } + + bucket := rt.Buckets[bucketID] + bucket.Remove(p) + rt.PeerRemoved(p) +} + +func (rt *RoutingTable) nextBucket() { + // This is the last bucket, which allegedly is a mixed bag containing peers not belonging in dedicated (unfolded) buckets. + // _allegedly_ is used here to denote that *all* peers in the last bucket might feasibly belong to another bucket. + // This could happen if e.g. we've unfolded 4 buckets, and all peers in folded bucket 5 really belong in bucket 8. + bucket := rt.Buckets[len(rt.Buckets)-1] + newBucket := bucket.Split(len(rt.Buckets)-1, rt.local) + rt.Buckets = append(rt.Buckets, newBucket) + + // The newly formed bucket still contains too many peers. We probably just unfolded a empty bucket. + if newBucket.Len() >= rt.bucketsize { + // Keep unfolding the table until the last bucket is not overflowing. + rt.nextBucket() + } +} + +// Find a specific peer by ID or return nil +func (rt *RoutingTable) Find(id peer.ID) peer.ID { + srch := rt.NearestPeers(ConvertPeerID(id), 1) + if len(srch) == 0 || srch[0] != id { + return "" + } + return srch[0] +} + +// NearestPeer returns a single peer that is nearest to the given ID +func (rt *RoutingTable) NearestPeer(id ID) peer.ID { + peers := rt.NearestPeers(id, 1) + if len(peers) > 0 { + return peers[0] + } + + log.Debugf("NearestPeer: Returning nil, table size = %d", rt.Size()) + return "" +} + +// NearestPeers returns a list of the 'count' closest peers to the given ID +func (rt *RoutingTable) NearestPeers(id ID, count int) []peer.ID { + cpl := commonPrefixLen(id, rt.local) + + rt.tabLock.RLock() + + // Get bucket at cpl index or last bucket + var bucket *Bucket + if cpl >= len(rt.Buckets) { + cpl = len(rt.Buckets) - 1 + } + bucket = rt.Buckets[cpl] + + peerArr := make(peerSorterArr, 0, count) + peerArr = copyPeersFromList(id, peerArr, bucket.list) + if len(peerArr) < count { + // In the case of an unusual split, one bucket may be short or empty. + // if this happens, search both surrounding buckets for nearby peers + if cpl > 0 { + plist := rt.Buckets[cpl-1].list + peerArr = copyPeersFromList(id, peerArr, plist) + } + + if cpl < len(rt.Buckets)-1 { + plist := rt.Buckets[cpl+1].list + peerArr = copyPeersFromList(id, peerArr, plist) + } + } + rt.tabLock.RUnlock() + + // Sort by distance to local peer + sort.Sort(peerArr) + + if count < len(peerArr) { + peerArr = peerArr[:count] + } + + out := make([]peer.ID, 0, len(peerArr)) + for _, p := range peerArr { + out = append(out, p.p) + } + + return out +} + +// Size returns the total number of peers in the routing table +func (rt *RoutingTable) Size() int { + var tot int + rt.tabLock.RLock() + for _, buck := range rt.Buckets { + tot += buck.Len() + } + rt.tabLock.RUnlock() + return tot +} + +// ListPeers takes a RoutingTable and returns a list of all peers from all buckets in the table. +func (rt *RoutingTable) ListPeers() []peer.ID { + var peers []peer.ID + rt.tabLock.RLock() + for _, buck := range rt.Buckets { + peers = append(peers, buck.Peers()...) + } + rt.tabLock.RUnlock() + return peers +} + +// Print prints a descriptive statement about the provided RoutingTable +func (rt *RoutingTable) Print() { + fmt.Printf("Routing Table, bs = %d, Max latency = %d\n", rt.bucketsize, rt.maxLatency) + rt.tabLock.RLock() + + for i, b := range rt.Buckets { + fmt.Printf("\tbucket: %d\n", i) + + b.lk.RLock() + for e := b.list.Front(); e != nil; e = e.Next() { + p := e.Value.(peer.ID) + fmt.Printf("\t\t- %s %s\n", p.Pretty(), rt.metrics.LatencyEWMA(p).String()) + } + b.lk.RUnlock() + } + rt.tabLock.RUnlock() +} diff --git a/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/util.go b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/util.go new file mode 100644 index 0000000000..dc30e95f67 --- /dev/null +++ b/vendor/gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/util.go @@ -0,0 +1,62 @@ +package kbucket + +import ( + "bytes" + "crypto/sha256" + "errors" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + ks "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket/keyspace" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// Returned if a routing table query returns no results. This is NOT expected +// behaviour +var ErrLookupFailure = errors.New("failed to find any peer in table") + +// ID for IpfsDHT is in the XORKeySpace +// +// The type dht.ID signifies that its contents have been hashed from either a +// peer.ID or a util.Key. This unifies the keyspace +type ID []byte + +func (id ID) equal(other ID) bool { + return bytes.Equal(id, other) +} + +func (id ID) less(other ID) bool { + a := ks.Key{Space: ks.XORKeySpace, Bytes: id} + b := ks.Key{Space: ks.XORKeySpace, Bytes: other} + return a.Less(b) +} + +func xor(a, b ID) ID { + return ID(u.XOR(a, b)) +} + +func commonPrefixLen(a, b ID) int { + return ks.ZeroPrefixLen(u.XOR(a, b)) +} + +// ConvertPeerID creates a DHT ID by hashing a Peer ID (Multihash) +func ConvertPeerID(id peer.ID) ID { + hash := sha256.Sum256([]byte(id)) + return hash[:] +} + +// ConvertKey creates a DHT ID by hashing a local key (String) +func ConvertKey(id string) ID { + hash := sha256.Sum256([]byte(id)) + return hash[:] +} + +// Closer returns true if a is closer to key than b is +func Closer(a, b peer.ID, key string) bool { + aid := ConvertPeerID(a) + bid := ConvertPeerID(b) + tgt := ConvertKey(key) + adist := xor(aid, tgt) + bdist := xor(bid, tgt) + + return adist.less(bdist) +} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/.travis.yml b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/.travis.yml rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/.travis.yml diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/LICENSE b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/LICENSE rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/LICENSE diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/Makefile b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/Makefile similarity index 100% rename from vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/Makefile rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/Makefile diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/README.md b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/README.md similarity index 100% rename from vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/README.md rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/README.md diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/codecov.yml b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/codecov.yml rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/codecov.yml diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/connmgr.go b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/connmgr.go similarity index 86% rename from vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/connmgr.go rename to vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/connmgr.go index 6417e083f1..b6cea4dd7f 100644 --- a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/connmgr.go +++ b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/connmgr.go @@ -6,13 +6,15 @@ import ( "sync" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) +const silencePeriod = 10 * time.Second + var log = logging.Logger("connmgr") // BasicConnMgr is a ConnManager that trims connections whenever the count exceeds the @@ -23,17 +25,16 @@ var log = logging.Logger("connmgr") // // See configuration parameters in NewConnManager. type BasicConnMgr struct { - highWater int - lowWater int - + lk sync.Mutex + highWater int + lowWater int + connCount int gracePeriod time.Duration + peers map[peer.ID]*peerInfo - peers map[peer.ID]*peerInfo - connCount int - - lk sync.Mutex - - lastTrim time.Time + // channel-based semaphore that enforces only a single trim is in progress + trimRunningCh chan struct{} + lastTrim time.Time } var _ ifconnmgr.ConnManager = (*BasicConnMgr)(nil) @@ -46,10 +47,11 @@ var _ ifconnmgr.ConnManager = (*BasicConnMgr)(nil) // subject to pruning. func NewConnManager(low, hi int, grace time.Duration) *BasicConnMgr { return &BasicConnMgr{ - highWater: hi, - lowWater: low, - gracePeriod: grace, - peers: make(map[peer.ID]*peerInfo), + highWater: hi, + lowWater: low, + gracePeriod: grace, + peers: make(map[peer.ID]*peerInfo), + trimRunningCh: make(chan struct{}, 1), } } @@ -67,13 +69,27 @@ type peerInfo struct { // equal the low watermark. Peers are sorted in ascending order based on their total value, // pruning those peers with the lowest scores first, as long as they are not within their // grace period. +// +// TODO: error return value so we can cleanly signal we are aborting because: +// (a) there's another trim in progress, or (b) the silence period is in effect. func (cm *BasicConnMgr) TrimOpenConns(ctx context.Context) { + select { + case cm.trimRunningCh <- struct{}{}: + default: + return + } + defer func() { <-cm.trimRunningCh }() + if time.Since(cm.lastTrim) < silencePeriod { + // skip this attempt to trim as the last one just took place. + return + } defer log.EventBegin(ctx, "connCleanup").Done() for _, c := range cm.getConnsToClose(ctx) { log.Info("closing conn: ", c.RemotePeer()) log.Event(ctx, "closeConn", c.RemotePeer()) c.Close() } + cm.lastTrim = time.Now() } // getConnsToClose runs the heuristics described in TrimOpenConns and returns the @@ -87,8 +103,6 @@ func (cm *BasicConnMgr) getConnsToClose(ctx context.Context) []inet.Conn { return nil } now := time.Now() - cm.lastTrim = now - if len(cm.peers) < cm.lowWater { log.Info("open connection count below limit") return nil @@ -263,9 +277,7 @@ func (nn *cmNotifee) Connected(n inet.Network, c inet.Conn) { cm.connCount++ if cm.connCount > nn.highWater { - if cm.lastTrim.IsZero() || time.Since(cm.lastTrim) > time.Second*10 { - go cm.TrimOpenConns(context.Background()) - } + go cm.TrimOpenConns(context.Background()) } } diff --git a/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/package.json b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/package.json new file mode 100644 index 0000000000..560d653307 --- /dev/null +++ b/vendor/gx/ipfs/QmSTKY2v62v9RjcfTMCFKMVAWvVjWGixkYWEi68iG7e1TT/go-libp2p-connmgr/package.json @@ -0,0 +1,53 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-connmgr" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-connmgr" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "why", + "hash": "QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd", + "name": "go-libp2p-interface-connmgr", + "version": "0.0.32" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-connmgr", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.3.34" +} + diff --git a/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/.travis.yml b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/.travis.yml new file mode 100644 index 0000000000..65ed4f8a1b --- /dev/null +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/.travis.yml @@ -0,0 +1,14 @@ +language: go +sudo: false + +go: + - 1.11.x + - tip + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/LICENSE b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/LICENSE rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/LICENSE diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/Makefile b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/Makefile rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/Makefile diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/README.md b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/README.md similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/README.md rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/README.md diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/al.go b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/al.go similarity index 95% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/al.go rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/al.go index 59334f44ec..d97e441c90 100644 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/al.go +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/al.go @@ -12,9 +12,9 @@ import ( "crypto/sha512" "hash" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" bfish "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish" - sha256 "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd" + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" ) // SupportedExchanges is the list of supported ECDH curves diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/codecov.yml b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/codecov.yml rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/codecov.yml diff --git a/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/package.json b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/package.json new file mode 100644 index 0000000000..1f99c54010 --- /dev/null +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/package.json @@ -0,0 +1,78 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-secio" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-secio" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf", + "name": "go-msgio", + "version": "0.0.6" + }, + { + "author": "whyrusleeping", + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N", + "name": "go-crypto", + "version": "0.2.1" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "minio", + "hash": "QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU", + "name": "sha256-simd", + "version": "0.1.2" + }, + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "Stebalien", + "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", + "name": "go-buffer-pool", + "version": "0.1.3" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-secio", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.30" +} + diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/Makefile b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/Makefile rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/Makefile diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/spipe.pb.go b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/spipe.pb.go similarity index 86% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/spipe.pb.go rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/spipe.pb.go index 1bfde86657..434826ab5f 100644 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/spipe.pb.go +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/spipe.pb.go @@ -3,11 +3,12 @@ package spipe_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -21,20 +22,18 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Propose struct { - Rand []byte `protobuf:"bytes,1,opt,name=rand" json:"rand"` - Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey" json:"pubkey"` - Exchanges string `protobuf:"bytes,3,opt,name=exchanges" json:"exchanges"` - Ciphers string `protobuf:"bytes,4,opt,name=ciphers" json:"ciphers"` - Hashes string `protobuf:"bytes,5,opt,name=hashes" json:"hashes"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Rand []byte `protobuf:"bytes,1,opt,name=rand" json:"rand"` + Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey" json:"pubkey"` + Exchanges string `protobuf:"bytes,3,opt,name=exchanges" json:"exchanges"` + Ciphers string `protobuf:"bytes,4,opt,name=ciphers" json:"ciphers"` + Hashes string `protobuf:"bytes,5,opt,name=hashes" json:"hashes"` } func (m *Propose) Reset() { *m = Propose{} } func (m *Propose) String() string { return proto.CompactTextString(m) } func (*Propose) ProtoMessage() {} func (*Propose) Descriptor() ([]byte, []int) { - return fileDescriptor_spipe_561635d041369c0d, []int{0} + return fileDescriptor_c474ec75f0379e64, []int{0} } func (m *Propose) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -51,8 +50,8 @@ func (m *Propose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Propose) XXX_Merge(src proto.Message) { - xxx_messageInfo_Propose.Merge(dst, src) +func (m *Propose) XXX_Merge(src proto.Message) { + xxx_messageInfo_Propose.Merge(m, src) } func (m *Propose) XXX_Size() int { return m.Size() @@ -99,17 +98,15 @@ func (m *Propose) GetHashes() string { } type Exchange struct { - Epubkey []byte `protobuf:"bytes,1,opt,name=epubkey" json:"epubkey"` - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Epubkey []byte `protobuf:"bytes,1,opt,name=epubkey" json:"epubkey"` + Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature"` } func (m *Exchange) Reset() { *m = Exchange{} } func (m *Exchange) String() string { return proto.CompactTextString(m) } func (*Exchange) ProtoMessage() {} func (*Exchange) Descriptor() ([]byte, []int) { - return fileDescriptor_spipe_561635d041369c0d, []int{1} + return fileDescriptor_c474ec75f0379e64, []int{1} } func (m *Exchange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -126,8 +123,8 @@ func (m *Exchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Exchange) XXX_Merge(src proto.Message) { - xxx_messageInfo_Exchange.Merge(dst, src) +func (m *Exchange) XXX_Merge(src proto.Message) { + xxx_messageInfo_Exchange.Merge(m, src) } func (m *Exchange) XXX_Size() int { return m.Size() @@ -156,6 +153,26 @@ func init() { proto.RegisterType((*Propose)(nil), "spipe.pb.Propose") proto.RegisterType((*Exchange)(nil), "spipe.pb.Exchange") } + +func init() { proto.RegisterFile("spipe.proto", fileDescriptor_c474ec75f0379e64) } + +var fileDescriptor_c474ec75f0379e64 = []byte{ + // 207 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x2e, 0xc8, 0x2c, + 0x48, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0x72, 0x92, 0x94, 0x16, 0x33, 0x72, + 0xb1, 0x07, 0x14, 0xe5, 0x17, 0xe4, 0x17, 0xa7, 0x0a, 0x49, 0x70, 0xb1, 0x14, 0x25, 0xe6, 0xa5, + 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x16, 0x11, + 0x92, 0xe1, 0x62, 0x2b, 0x28, 0x4d, 0xca, 0x4e, 0xad, 0x94, 0x60, 0x42, 0x92, 0x83, 0x8a, 0x09, + 0x29, 0x71, 0x71, 0xa6, 0x56, 0x24, 0x67, 0x24, 0xe6, 0xa5, 0xa7, 0x16, 0x4b, 0x30, 0x2b, 0x30, + 0x6a, 0x70, 0x42, 0x15, 0x20, 0x84, 0x85, 0xe4, 0xb8, 0xd8, 0x93, 0x33, 0x0b, 0x32, 0x52, 0x8b, + 0x8a, 0x25, 0x58, 0x90, 0x54, 0xc0, 0x04, 0x41, 0x36, 0x64, 0x24, 0x16, 0x67, 0xa4, 0x16, 0x4b, + 0xb0, 0x22, 0x49, 0x43, 0xc5, 0x94, 0xfc, 0xb8, 0x38, 0x5c, 0xa1, 0x46, 0x81, 0x4c, 0x4a, 0x85, + 0x3a, 0x06, 0xd9, 0xa1, 0x30, 0x41, 0x90, 0x6b, 0x8a, 0x33, 0xd3, 0xf3, 0x12, 0x4b, 0x4a, 0x8b, + 0x52, 0x51, 0x9c, 0x8b, 0x10, 0x76, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, + 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, + 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x0d, 0xc4, 0xcb, 0x27, 0x01, 0x00, 0x00, +} + func (m *Propose) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -238,6 +255,9 @@ func encodeVarintSpipe(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Propose) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Rand != nil { @@ -258,6 +278,9 @@ func (m *Propose) Size() (n int) { } func (m *Exchange) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Epubkey != nil { @@ -299,7 +322,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -327,7 +350,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -336,6 +359,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -358,7 +384,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -367,6 +393,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -389,7 +418,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -399,6 +428,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -418,7 +450,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -428,6 +460,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -447,7 +482,7 @@ func (m *Propose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -457,6 +492,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -471,6 +509,9 @@ func (m *Propose) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSpipe } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSpipe + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -498,7 +539,7 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -526,7 +567,7 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -535,6 +576,9 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -557,7 +601,7 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -566,6 +610,9 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSpipe } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpipe + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -583,6 +630,9 @@ func (m *Exchange) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSpipe } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSpipe + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -649,10 +699,13 @@ func skipSpipe(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthSpipe } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthSpipe + } return iNdEx, nil case 3: for { @@ -681,6 +734,9 @@ func skipSpipe(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthSpipe + } } return iNdEx, nil case 4: @@ -699,22 +755,3 @@ var ( ErrInvalidLengthSpipe = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSpipe = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("spipe.proto", fileDescriptor_spipe_561635d041369c0d) } - -var fileDescriptor_spipe_561635d041369c0d = []byte{ - // 198 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x2e, 0xc8, 0x2c, - 0x48, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0x72, 0x92, 0x94, 0x16, 0x33, 0x72, - 0xb1, 0x07, 0x14, 0xe5, 0x17, 0xe4, 0x17, 0xa7, 0x0a, 0x49, 0x70, 0xb1, 0x14, 0x25, 0xe6, 0xa5, - 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x16, 0x11, - 0x92, 0xe1, 0x62, 0x2b, 0x28, 0x4d, 0xca, 0x4e, 0xad, 0x94, 0x60, 0x42, 0x92, 0x83, 0x8a, 0x09, - 0x29, 0x71, 0x71, 0xa6, 0x56, 0x24, 0x67, 0x24, 0xe6, 0xa5, 0xa7, 0x16, 0x4b, 0x30, 0x2b, 0x30, - 0x6a, 0x70, 0x42, 0x15, 0x20, 0x84, 0x85, 0xe4, 0xb8, 0xd8, 0x93, 0x33, 0x0b, 0x32, 0x52, 0x8b, - 0x8a, 0x25, 0x58, 0x90, 0x54, 0xc0, 0x04, 0x41, 0x36, 0x64, 0x24, 0x16, 0x67, 0xa4, 0x16, 0x4b, - 0xb0, 0x22, 0x49, 0x43, 0xc5, 0x94, 0xfc, 0xb8, 0x38, 0x5c, 0xa1, 0x46, 0x81, 0x4c, 0x4a, 0x85, - 0x3a, 0x06, 0xd9, 0xa1, 0x30, 0x41, 0x90, 0x6b, 0x8a, 0x33, 0xd3, 0xf3, 0x12, 0x4b, 0x4a, 0x8b, - 0x52, 0x51, 0x9c, 0x8b, 0x10, 0x76, 0x12, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, - 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x29, 0x6d, - 0x11, 0x46, 0x1f, 0x01, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/spipe.proto b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/spipe.proto similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/spipe.proto rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb/spipe.proto diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/protocol.go b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/protocol.go similarity index 91% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/protocol.go rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/protocol.go index 68c136cda8..e6136ce6dd 100644 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/protocol.go +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/protocol.go @@ -9,14 +9,14 @@ import ( "net" "time" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pb "gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb" - cs "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + cs "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + pb "gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/pb" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" msgio "gx/ipfs/QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf/go-msgio" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) var log = logging.Logger("secio") @@ -198,7 +198,6 @@ func (s *secureSession) runHandshakeSync() error { if err != nil { return err } - switch s.remotePeer { case actualRemotePeer: // All good. @@ -206,26 +205,18 @@ func (s *secureSession) runHandshakeSync() error { // No peer set. We're accepting a remote connection. s.remotePeer = actualRemotePeer default: - // OpenBazaar: check that this peerID isn't the old style - // If it is then we're good. If not then we error. - // This code will be removed after enough OpenBazaar nodes - // upgrade to inline pubkeys. - pubkeyBytes, err := s.remote.permanentPubKey.Bytes() - if err != nil { - return err - } - oldMultihash, err := mh.Sum(pubkeyBytes, mh.SHA2_256, 32) - if err != nil { - return err - } - oldStylePeer, err := peer.IDB58Decode(oldMultihash.B58String()) + // OpenBazaar: we are transitioning from hashed IDs to inline IDs, as a last + // resort, we should check that the peer isn't using the other variety. Both ID methods + // change their behavior based on peer.AdvancedEnableInlining but are written to + // operate opposite of each other. This will allow old nodes to successfully connect to + // new nodes, and vice versa. + altID, err := peer.AlternativeIDFromPublicKey(s.remote.permanentPubKey) if err != nil { return err } - if s.remotePeer != oldStylePeer { - // Peer mismatch. Bail. + if s.remotePeer != altID { s.insecure.Close() - log.Debugf("expected peer %s, got peer %s", s.remotePeer, actualRemotePeer) + log.Debugf("expected peer %s, but ID produced from pubkey doesn't match", s.remotePeer) return ErrWrongPeer } } diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/rw.go b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/rw.go similarity index 97% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/rw.go rename to vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/rw.go index a649a74f7a..2a1f3f3859 100644 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/rw.go +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/rw.go @@ -167,7 +167,9 @@ func (r *etmReader) Read(buf []byte) (int, error) { // If the destination buffer is too short, fill an internal buffer and then // drain as much of that into the output buffer as will fit. - if cap(buf) < fullLen { + // Applies patch from v0.0.3 release, see + // https://github.com/libp2p/go-libp2p-secio/commit/98b8bd9f149802621eeca00d5a606f6788973038 + if len(buf) < fullLen { err := r.fill() if err != nil { return 0, err diff --git a/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/transport.go b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/transport.go new file mode 100644 index 0000000000..1c4901cae6 --- /dev/null +++ b/vendor/gx/ipfs/QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK/go-libp2p-secio/transport.go @@ -0,0 +1,81 @@ +// Package secio is used to encrypt `go-libp2p-conn` connections. Connections wrapped by secio use secure sessions provided by this package to encrypt all traffic. A TLS-like handshake is used to setup the communication channel. +package secio + +import ( + "context" + "net" + "time" + + cs "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// ID is secio's protocol ID (used when negotiating with multistream) +const ID = "/secio/1.0.0" + +// SessionGenerator constructs secure communication sessions for a peer. +type Transport struct { + LocalID peer.ID + PrivateKey ci.PrivKey +} + +func New(sk ci.PrivKey) (*Transport, error) { + id, err := peer.IDFromPrivateKey(sk) + if err != nil { + return nil, err + } + return &Transport{ + LocalID: id, + PrivateKey: sk, + }, nil +} + +var _ cs.Transport = (*Transport)(nil) + +func (sg *Transport) SecureInbound(ctx context.Context, insecure net.Conn) (cs.Conn, error) { + return newSecureSession(ctx, sg.LocalID, sg.PrivateKey, insecure, "") +} +func (sg *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (cs.Conn, error) { + return newSecureSession(ctx, sg.LocalID, sg.PrivateKey, insecure, p) +} + +func (s *secureSession) SetReadDeadline(t time.Time) error { + return s.insecure.SetReadDeadline(t) +} + +func (s *secureSession) SetWriteDeadline(t time.Time) error { + return s.insecure.SetWriteDeadline(t) +} + +func (s *secureSession) SetDeadline(t time.Time) error { + return s.insecure.SetDeadline(t) +} + +func (s *secureSession) RemoteAddr() net.Addr { + return s.insecure.RemoteAddr() +} + +func (s *secureSession) LocalAddr() net.Addr { + return s.insecure.LocalAddr() +} + +// LocalPeer retrieves the local peer. +func (s *secureSession) LocalPeer() peer.ID { + return s.localPeer +} + +// LocalPrivateKey retrieves the local peer's PrivateKey +func (s *secureSession) LocalPrivateKey() ci.PrivKey { + return s.localKey +} + +// RemotePeer retrieves the remote peer. +func (s *secureSession) RemotePeer() peer.ID { + return s.remotePeer +} + +// RemotePublicKey retrieves the remote public key. +func (s *secureSession) RemotePublicKey() ci.PubKey { + return s.remote.permanentPubKey +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/command.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/command.go deleted file mode 100644 index cf26e38ad1..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/command.go +++ /dev/null @@ -1,306 +0,0 @@ -/* -Package commands provides an API for defining and parsing commands. - -Supporting nested commands, options, arguments, etc. The commands -package also supports a collection of marshallers for presenting -output to the user, including text, JSON, and XML marshallers. -*/ - -package cmds - -import ( - "errors" - "fmt" - "io" - "strings" - - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" - - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -const DefaultOutputEncoding = JSON - -var log = logging.Logger("cmds") - -// Function is the type of function that Commands use. -// It reads from the Request, and writes results to the ResponseEmitter. -type Function func(*Request, ResponseEmitter, Environment) error - -// PostRunMap is the map used in Command.PostRun. -type PostRunMap map[PostRunType]func(Response, ResponseEmitter) error - -// Command is a runnable command, with input arguments and options (flags). -// It can also have Subcommands, to group units of work into sets. -type Command struct { - Options []cmdkit.Option - Arguments []cmdkit.Argument - PreRun func(req *Request, env Environment) error - - // Run is the function that processes the request to generate a response. - // Note that when executing the command over the HTTP API you can only read - // after writing when using multipart requests. The request body will not be - // available for reading after the HTTP connection has been written to. - Run Function - PostRun PostRunMap - Encoders EncoderMap - Helptext cmdkit.HelpText - - // External denotes that a command is actually an external binary. - // fewer checks and validations will be performed on such commands. - External bool - - // Type describes the type of the output of the Command's Run Function. - // In precise terms, the value of Type is an instance of the return type of - // the Run Function. - // - // ie. If command Run returns &Block{}, then Command.Type == &Block{} - Type interface{} - Subcommands map[string]*Command -} - -var ( - // ErrNotCallable signals a command that cannot be called. - ErrNotCallable = ClientError("This command can't be called directly. Try one of its subcommands.") - - // ErrNoFormatter signals that the command can not be formatted. - ErrNoFormatter = ClientError("This command cannot be formatted to plain text") - - // ErrIncorrectType signales that the commands returned a value with unexpected type. - ErrIncorrectType = errors.New("The command returned a value with a different type than expected") -) - -// Call invokes the command for the given Request -func (c *Command) Call(req *Request, re ResponseEmitter, env Environment) { - var closeErr error - - err := c.call(req, re, env) - if err != nil { - log.Debugf("error occured in call, closing with error: %s", err) - } - - closeErr = re.CloseWithError(err) - // ignore double close errors - if closeErr != nil && closeErr != ErrClosingClosedEmitter { - log.Errorf("error closing ResponseEmitter: %s", closeErr) - } -} - -func (c *Command) call(req *Request, re ResponseEmitter, env Environment) error { - cmd, err := c.Get(req.Path) - if err != nil { - log.Errorf("could not get cmd from path %q: %q", req.Path, err) - return err - } - - if cmd.Run == nil { - log.Errorf("returned command has nil Run function") - return err - } - - err = cmd.CheckArguments(req) - if err != nil { - log.Errorf("CheckArguments returned an error for path %q: %q", req.Path, err) - return err - } - - return cmd.Run(req, re, env) -} - -// Resolve returns the subcommands at the given path -func (c *Command) Resolve(pth []string) ([]*Command, error) { - cmds := make([]*Command, len(pth)+1) - cmds[0] = c - - cmd := c - for i, name := range pth { - cmd = cmd.Subcommands[name] - - if cmd == nil { - pathS := strings.Join(pth[:i], "/") - return nil, fmt.Errorf("undefined command: %q", pathS) - } - - cmds[i+1] = cmd - } - - return cmds, nil -} - -// Get resolves and returns the Command addressed by path -func (c *Command) Get(path []string) (*Command, error) { - cmds, err := c.Resolve(path) - if err != nil { - return nil, err - } - return cmds[len(cmds)-1], nil -} - -// GetOptions returns the options in the given path of commands -func (c *Command) GetOptions(path []string) (map[string]cmdkit.Option, error) { - options := make([]cmdkit.Option, 0, len(c.Options)) - - cmds, err := c.Resolve(path) - if err != nil { - return nil, err - } - - for _, cmd := range cmds { - options = append(options, cmd.Options...) - } - - optionsMap := make(map[string]cmdkit.Option) - for _, opt := range options { - for _, name := range opt.Names() { - if _, found := optionsMap[name]; found { - return nil, fmt.Errorf("option name %q used multiple times", name) - } - - optionsMap[name] = opt - } - } - - return optionsMap, nil -} - -// DebugValidate checks if the command tree is well-formed. -// -// This operation is slow and should be called from tests only. -func (c *Command) DebugValidate() map[string][]error { - errs := make(map[string][]error) - var visit func(path string, cm *Command) - - liveOptions := make(map[string]struct{}) - visit = func(path string, cm *Command) { - expectOptional := false - for i, argDef := range cm.Arguments { - // No required arguments after optional arguments. - if argDef.Required { - if expectOptional { - errs[path] = append(errs[path], fmt.Errorf("required argument %s after optional arguments", argDef.Name)) - return - } - } else { - expectOptional = true - } - - // variadic arguments and those supporting stdin must be last - if (argDef.Variadic || argDef.SupportsStdin) && i != len(cm.Arguments)-1 { - errs[path] = append(errs[path], fmt.Errorf("variadic and/or optional argument %s must be last", argDef.Name)) - } - } - - var goodOptions []string - for _, option := range cm.Options { - for _, name := range option.Names() { - if _, ok := liveOptions[name]; ok { - errs[path] = append(errs[path], fmt.Errorf("duplicate option name %s", name)) - } else { - goodOptions = append(goodOptions, name) - liveOptions[name] = struct{}{} - } - } - } - for scName, sc := range cm.Subcommands { - visit(fmt.Sprintf("%s/%s", path, scName), sc) - } - - for _, name := range goodOptions { - delete(liveOptions, name) - } - } - visit("", c) - if len(errs) == 0 { - errs = nil - } - return errs -} - -// CheckArguments checks that we have all the required string arguments, loading -// any from stdin if necessary. -func (c *Command) CheckArguments(req *Request) error { - if len(c.Arguments) == 0 { - return nil - } - - lastArg := c.Arguments[len(c.Arguments)-1] - if req.bodyArgs == nil && // check this as we can end up calling CheckArguments multiple times. See #80. - lastArg.SupportsStdin && - lastArg.Type == cmdkit.ArgString && - req.Files != nil { - - fi, err := req.Files.NextFile() - switch err { - case io.EOF: - case nil: - req.bodyArgs = newArguments(fi) - // Can't pass files and stdin arguments. - req.Files = nil - default: - // io error. - return err - } - } - - // iterate over the arg definitions - requiredStringArgs := 0 // number of required string arguments - for _, argDef := range req.Command.Arguments { - // Is this a string? - if argDef.Type != cmdkit.ArgString { - // No, skip it. - continue - } - - // No more required arguments? - if !argDef.Required { - // Yes, we're all done. - break - } - requiredStringArgs++ - - // Do we have enough string arguments? - if requiredStringArgs <= len(req.Arguments) { - // all good - continue - } - - // Can we get it from stdin? - if argDef.SupportsStdin && req.bodyArgs != nil { - if req.bodyArgs.Scan() { - // Found it! - req.Arguments = append(req.Arguments, req.bodyArgs.Argument()) - continue - } - if err := req.bodyArgs.Err(); err != nil { - return err - } - // No, just missing. - } - return fmt.Errorf("argument %q is required", argDef.Name) - } - - return nil -} - -type CommandVisitor func(*Command) - -// Walks tree of all subcommands (including this one) -func (c *Command) Walk(visitor CommandVisitor) { - visitor(c) - for _, sub := range c.Subcommands { - sub.Walk(visitor) - } -} - -func (c *Command) ProcessHelp() { - c.Walk(func(cm *Command) { - ht := &cm.Helptext - if len(ht.LongDescription) == 0 { - ht.LongDescription = ht.ShortDescription - } - }) -} - -func ClientError(msg string) error { - return &cmdkit.Error{Code: cmdkit.ErrClient, Message: msg} -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug/checkerr.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug/checkerr.go deleted file mode 100644 index 1ae15e71f8..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug/checkerr.go +++ /dev/null @@ -1,28 +0,0 @@ -package debug - -import ( - "fmt" - "runtime/debug" - - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -// UnexpectedError wraps a *cmdkit.Error that is being emitted. That type (and its non-pointer version) used to be emitted to indicate an error. That was deprecated in favour of CloseWithError. -type UnexpectedError struct { - Err *cmdkit.Error -} - -// Error returns the error string -func (err UnexpectedError) Error() string { - return fmt.Sprintf("unexpected error value emitted: %q at\n%s", err.Err.Error(), debug.Stack()) -} - -// AssertNotError verifies that v is not a cmdkit.Error or *cmdkit.Error. Otherwise it panics. -func AssertNotError(v interface{}) { - if e, ok := v.(cmdkit.Error); ok { - v = &e - } - if e, ok := v.(*cmdkit.Error); ok { - panic(UnexpectedError{e}) - } -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/executor.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/executor.go deleted file mode 100644 index d9df781985..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/executor.go +++ /dev/null @@ -1,135 +0,0 @@ -package cmds - -import ( - "context" - "runtime/debug" -) - -type Executor interface { - Execute(req *Request, re ResponseEmitter, env Environment) error -} - -// Environment is the environment passed to commands. The only required method -// is Context. -type Environment interface { - // Context returns the environment's context. - Context() context.Context -} - -// MakeEnvironment takes a context and the request to construct the environment -// that is passed to the command's Run function. -// The user can define a function like this to pass it to cli.Run. -type MakeEnvironment func(context.Context, *Request) (Environment, error) - -// MakeExecutor takes the request and environment variable to construct the -// executor that determines how to call the command - i.e. by calling Run or -// making an API request to a daemon. -// The user can define a function like this to pass it to cli.Run. -type MakeExecutor func(*Request, interface{}) (Executor, error) - -func NewExecutor(root *Command) Executor { - return &executor{ - root: root, - } -} - -type executor struct { - root *Command -} - -func (x *executor) Execute(req *Request, re ResponseEmitter, env Environment) (err error) { - cmd := req.Command - - if cmd.Run == nil { - return ErrNotCallable - } - - err = cmd.CheckArguments(req) - if err != nil { - return err - } - - if cmd.PreRun != nil { - err = cmd.PreRun(req, env) - if err != nil { - return err - } - } - - // contains the error returned by PostRun - errCh := make(chan error, 1) - - if cmd.PostRun != nil { - if typer, ok := re.(interface { - Type() PostRunType - }); ok && cmd.PostRun[typer.Type()] != nil { - var ( - res Response - lower = re - ) - - re, res = NewChanResponsePair(req) - - go func() { - var closeErr error - - defer close(errCh) - - err := cmd.PostRun[typer.Type()](res, lower) - closeErr = lower.CloseWithError(err) - if closeErr == ErrClosingClosedEmitter { - // ignore double close errors - closeErr = nil - } - errCh <- closeErr - - if closeErr != nil && err != nil { - log.Errorf("error closing connection: %s", closeErr) - log.Errorf("close caused by error: %s", err) - } - }() - } - } else { - // not using this channel today - close(errCh) - } - - defer func() { - // catch panics in Run (esp. from re.SetError) - if v := recover(); v != nil { - log.Errorf("panic in command handler at %s", debug.Stack()) - - // if they are errors - if err, ok := v.(error); ok { - // use them as return error - closeErr := re.CloseWithError(err) - if closeErr == ErrClosingClosedEmitter { - // ignore double close errors - closeErr = nil - } else if closeErr != nil { - log.Errorf("error closing connection: %s", closeErr) - if err != nil { - log.Errorf("close caused by error: %s", err) - } - } - } else { - // otherwise keep panicking. - panic(v) - } - - // wait for PostRun to finish - <-errCh - } - }() - err = cmd.Run(req, re, env) - err = re.CloseWithError(err) - if err == ErrClosingClosedEmitter { - // ignore double close errors - return nil - } else if err != nil { - return err - } - - // return error from the PostRun Close - return <-errCh -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/client.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/client.go deleted file mode 100644 index 4f877b2e9f..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/client.go +++ /dev/null @@ -1,243 +0,0 @@ -package http - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "net/http" - "net/url" - "strings" - - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - - "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -const ( - ApiUrlFormat = "%s%s/%s?%s" -) - -var ( - ErrAPINotRunning = errors.New("api not running") -) - -var OptionSkipMap = map[string]bool{ - "api": true, -} - -// Client is the commands HTTP client interface. -type Client interface { - Send(req *cmds.Request) (cmds.Response, error) -} - -type client struct { - serverAddress string - httpClient *http.Client - ua string - apiPrefix string -} - -type ClientOpt func(*client) - -func ClientWithUserAgent(ua string) ClientOpt { - return func(c *client) { - c.ua = ua - } -} - -func ClientWithAPIPrefix(apiPrefix string) ClientOpt { - return func(c *client) { - c.apiPrefix = apiPrefix - } -} - -func NewClient(address string, opts ...ClientOpt) Client { - if !strings.HasPrefix(address, "http://") { - address = "http://" + address - } - - c := &client{ - serverAddress: address, - httpClient: http.DefaultClient, - ua: "go-ipfs-cmds/http", - } - - for _, opt := range opts { - opt(c) - } - - return c -} - -func (c *client) Execute(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment) error { - cmd := req.Command - - if cmd.PreRun != nil { - err := cmd.PreRun(req, env) - if err != nil { - return err - } - } - - res, err := c.Send(req) - if err != nil { - if isConnRefused(err) { - err = ErrAPINotRunning - } - return err - } - - if cmd.PostRun != nil { - if typer, ok := re.(interface { - Type() cmds.PostRunType - }); ok && cmd.PostRun[typer.Type()] != nil { - err := cmd.PostRun[typer.Type()](res, re) - closeErr := re.CloseWithError(err) - if closeErr == cmds.ErrClosingClosedEmitter { - // ignore double close errors - return nil - } - - return err - } - } - - return cmds.Copy(re, res) -} - -func (c *client) toHTTPRequest(req *cmds.Request) (*http.Request, error) { - query, err := getQuery(req) - if err != nil { - return nil, err - } - - var fileReader *files.MultiFileReader - var reader io.Reader - if bodyArgs := req.BodyArgs(); bodyArgs != nil { - // In the end, this wraps a file reader in a file reader. - // However, such is life. - fileReader = files.NewMultiFileReader(files.NewSliceFile("", "", []files.File{ - files.NewReaderFile("stdin", "", bodyArgs, nil), - }), true) - reader = fileReader - } else if req.Files != nil { - fileReader = files.NewMultiFileReader(req.Files, true) - reader = fileReader - } - - path := strings.Join(req.Path, "/") - url := fmt.Sprintf(ApiUrlFormat, c.serverAddress, c.apiPrefix, path, query) - - httpReq, err := http.NewRequest("POST", url, reader) - if err != nil { - return nil, err - } - - // TODO extract string consts? - if fileReader != nil { - httpReq.Header.Set(contentTypeHeader, "multipart/form-data; boundary="+fileReader.Boundary()) - } else { - httpReq.Header.Set(contentTypeHeader, applicationOctetStream) - } - httpReq.Header.Set(uaHeader, c.ua) - - httpReq = httpReq.WithContext(req.Context) - httpReq.Close = true - - return httpReq, nil -} - -func (c *client) Send(req *cmds.Request) (cmds.Response, error) { - if req.Context == nil { - log.Warningf("no context set in request") - req.Context = context.Background() - } - - // save user-provided encoding - previousUserProvidedEncoding, found := req.Options[cmds.EncLong].(string) - - // override with json to send to server - req.SetOption(cmds.EncLong, cmds.JSON) - - // stream channel output - req.SetOption(cmds.ChanOpt, true) - - // build http request - httpReq, err := c.toHTTPRequest(req) - if err != nil { - return nil, err - } - - // send http request - httpRes, err := c.httpClient.Do(httpReq) - if err != nil { - return nil, err - } - - // parse using the overridden JSON encoding in request - res, err := parseResponse(httpRes, req) - if err != nil { - return nil, err - } - - // reset request encoding to what it was before - if found && len(previousUserProvidedEncoding) > 0 { - // reset to user provided encoding after sending request - // NB: if user has provided an encoding but it is the empty string, - // still leave it as JSON. - req.SetOption(cmds.EncLong, previousUserProvidedEncoding) - } - - return res, nil -} - -func getQuery(req *cmds.Request) (string, error) { - query := url.Values{} - - for k, v := range req.Options { - if OptionSkipMap[k] { - continue - } - str := fmt.Sprintf("%v", v) - query.Set(k, str) - } - - args := req.Arguments - argDefs := req.Command.Arguments - - argDefIndex := 0 - - for _, arg := range args { - argDef := argDefs[argDefIndex] - // skip ArgFiles - for argDef.Type == cmdkit.ArgFile { - argDefIndex++ - argDef = argDefs[argDefIndex] - } - - query.Add("arg", arg) - - if len(argDefs) > argDefIndex+1 { - argDefIndex++ - } - } - - return query.Encode(), nil -} - -func isConnRefused(err error) bool { - // unwrap url errors from http calls - if urlerr, ok := err.(*url.Error); ok { - err = urlerr.Err - } - - netoperr, ok := err.(*net.OpError) - if !ok { - return false - } - - return netoperr.Op == "dial" -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/config.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/config.go deleted file mode 100644 index c8810bb4c1..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/config.go +++ /dev/null @@ -1,144 +0,0 @@ -package http - -import ( - "net/http" - "net/url" - "sync" - - cors "gx/ipfs/QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB/cors" -) - -const ( - ACAOrigin = "Access-Control-Allow-Origin" - ACAMethods = "Access-Control-Allow-Methods" - ACACredentials = "Access-Control-Allow-Credentials" -) - -type ServerConfig struct { - // APIPath is the prefix of all request paths. - // Example: host:port/api/v0/add. Here the APIPath is /api/v0 - APIPath string - - // Headers is an optional map of headers that is written out. - Headers map[string][]string - - // corsOpts is a set of options for CORS headers. - corsOpts *cors.Options - - // corsOptsRWMutex is a RWMutex for read/write CORSOpts - corsOptsRWMutex sync.RWMutex -} - -func NewServerConfig() *ServerConfig { - cfg := new(ServerConfig) - cfg.corsOpts = new(cors.Options) - return cfg -} - -func (cfg *ServerConfig) AllowedOrigins() []string { - cfg.corsOptsRWMutex.RLock() - defer cfg.corsOptsRWMutex.RUnlock() - return cfg.corsOpts.AllowedOrigins -} - -func (cfg *ServerConfig) SetAllowedOrigins(origins ...string) { - cfg.corsOptsRWMutex.Lock() - defer cfg.corsOptsRWMutex.Unlock() - o := make([]string, len(origins)) - copy(o, origins) - cfg.corsOpts.AllowedOrigins = o -} - -func (cfg *ServerConfig) AppendAllowedOrigins(origins ...string) { - cfg.corsOptsRWMutex.Lock() - defer cfg.corsOptsRWMutex.Unlock() - cfg.corsOpts.AllowedOrigins = append(cfg.corsOpts.AllowedOrigins, origins...) -} - -func (cfg *ServerConfig) AllowedMethods() []string { - cfg.corsOptsRWMutex.RLock() - defer cfg.corsOptsRWMutex.RUnlock() - return []string(cfg.corsOpts.AllowedMethods) -} - -func (cfg *ServerConfig) SetAllowedMethods(methods ...string) { - cfg.corsOptsRWMutex.Lock() - defer cfg.corsOptsRWMutex.Unlock() - if cfg.corsOpts == nil { - cfg.corsOpts = new(cors.Options) - } - cfg.corsOpts.AllowedMethods = methods -} - -func (cfg *ServerConfig) SetAllowCredentials(flag bool) { - cfg.corsOptsRWMutex.Lock() - defer cfg.corsOptsRWMutex.Unlock() - cfg.corsOpts.AllowCredentials = flag -} - -// allowOrigin just stops the request if the origin is not allowed. -// the CORS middleware apparently does not do this for us... -func allowOrigin(r *http.Request, cfg *ServerConfig) bool { - origin := r.Header.Get("Origin") - - // curl, or ipfs shell, typing it in manually, or clicking link - // NOT in a browser. this opens up a hole. we should close it, - // but right now it would break things. TODO - if origin == "" { - return true - } - origins := cfg.AllowedOrigins() - for _, o := range origins { - if o == "*" { // ok! you asked for it! - return true - } - - if o == origin { // allowed explicitly - return true - } - } - - return false -} - -// allowReferer this is here to prevent some CSRF attacks that -// the API would be vulnerable to. We check that the Referer -// is allowed by CORS Origin (origins and referrers here will -// work similarly in the normal uses of the API). -// See discussion at https://github.com/ipfs/go-ipfs/issues/1532 -func allowReferer(r *http.Request, cfg *ServerConfig) bool { - referer := r.Referer() - - // curl, or ipfs shell, typing it in manually, or clicking link - // NOT in a browser. this opens up a hole. we should close it, - // but right now it would break things. TODO - if referer == "" { - return true - } - - u, err := url.Parse(referer) - if err != nil { - // bad referer. but there _is_ something, so bail. - // debug because referer comes straight from the client. dont want to - // let people DOS by putting a huge referer that gets stored in log files. - return false - } - origin := u.Scheme + "://" + u.Host - - // check CORS ACAOs and pretend Referer works like an origin. - // this is valid for many (most?) sane uses of the API in - // other applications, and will have the desired effect. - origins := cfg.AllowedOrigins() - for _, o := range origins { - if o == "*" { // ok! you asked for it! - return true - } - - // referer is allowed explicitly - if o == origin { - return true - } - } - - return false -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/response.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/response.go deleted file mode 100644 index a08c5c8c0c..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/response.go +++ /dev/null @@ -1,155 +0,0 @@ -package http - -import ( - "errors" - "io" - "net/http" - "reflect" - "strings" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -var ( - MIMEEncodings = map[string]cmds.EncodingType{ - "application/json": cmds.JSON, - "application/xml": cmds.XML, - "text/plain": cmds.Text, - } -) - -type Response struct { - length uint64 - err error - - res *http.Response - req *cmds.Request - - rr *responseReader - dec cmds.Decoder - - initErr *cmdkit.Error -} - -func (res *Response) Request() *cmds.Request { - return res.req -} - -func (res *Response) Error() *cmdkit.Error { - if res.err == io.EOF || res.err == nil { - return nil - } - - switch err := res.err.(type) { - case *cmdkit.Error: - return err - case cmdkit.Error: - return &err - default: - // i.e. is a regular error - return &cmdkit.Error{Message: res.err.Error()} - } -} - -func (res *Response) Length() uint64 { - return res.length -} - -func (res *Response) Next() (interface{}, error) { - if res.initErr != nil { - return nil, res.initErr - } - - if res.err != nil { - return nil, res.err - } - - // nil decoder means stream not chunks - // but only do that once - if res.dec == nil { - if res.rr == nil { - return nil, io.EOF - } - rr := res.rr - res.rr = nil - return rr, nil - } - - var value interface{} - if valueType := reflect.TypeOf(res.req.Command.Type); valueType != nil { - if valueType.Kind() == reflect.Ptr { - valueType = valueType.Elem() - } - value = reflect.New(valueType).Interface() - } - - m := &cmds.MaybeError{Value: value} - err := res.dec.Decode(m) - if err != nil { - if err == io.EOF { - // handle errors from headers - errStr := res.res.Header.Get(StreamErrHeader) - if errStr != "" { - err = &cmdkit.Error{Message: errStr} - } - - res.err = err - return nil, err - } else { - // wrap all other errors - res.err = err - return nil, res.err - } - } - - v, err := m.Get() - if err != nil { - if e, ok := err.(*cmdkit.Error); ok { - res.err = e - } else { - res.err = &cmdkit.Error{Message: err.Error()} - } - } - - return v, err -} - -// responseReader reads from the response body, and checks for an error -// in the http trailer upon EOF, this error if present is returned instead -// of the EOF. -type responseReader struct { - resp *http.Response -} - -func (r *responseReader) Read(b []byte) (int, error) { - if r == nil || r.resp == nil { - return 0, io.EOF - } - - n, err := r.resp.Body.Read(b) - - // reading on a closed response body is as good as an io.EOF here - if err != nil && strings.Contains(err.Error(), "read on closed response body") { - err = io.EOF - } - if err == io.EOF { - _ = r.resp.Body.Close() - trailerErr := r.checkError() - if trailerErr != nil { - return n, trailerErr - } - } - return n, err -} - -func (r *responseReader) checkError() error { - if e := r.resp.Trailer.Get(StreamErrHeader); e != "" { - return errors.New(e) - } - return nil -} - -func (r *responseReader) Close() error { - return r.resp.Body.Close() -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/responseemitter.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/responseemitter.go deleted file mode 100644 index 7f521e3f1f..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/http/responseemitter.go +++ /dev/null @@ -1,325 +0,0 @@ -package http - -import ( - "fmt" - "io" - "net/http" - "strconv" - "strings" - "sync" - - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -var ( - HeadRequest = fmt.Errorf("HEAD request") - - AllowedExposedHeadersArr = []string{streamHeader, channelHeader, extraContentLengthHeader} - AllowedExposedHeaders = strings.Join(AllowedExposedHeadersArr, ", ") - - mimeTypes = map[cmds.EncodingType]string{ - cmds.Protobuf: "application/protobuf", - cmds.JSON: "application/json", - cmds.XML: "application/xml", - cmds.Text: "text/plain", - } -) - -// NewResponeEmitter returns a new ResponseEmitter. -func NewResponseEmitter(w http.ResponseWriter, method string, req *cmds.Request) (ResponseEmitter, error) { - encType, enc, err := cmds.GetEncoder(req, w, cmds.JSON) - if err != nil { - return nil, err - } - re := &responseEmitter{ - w: w, - encType: encType, - enc: enc, - method: method, - req: req, - } - return re, nil -} - -type ResponseEmitter interface { - cmds.ResponseEmitter - http.Flusher -} - -type responseEmitter struct { - w http.ResponseWriter - - enc cmds.Encoder - encType cmds.EncodingType - req *cmds.Request - - l sync.Mutex - length uint64 - err *cmdkit.Error - - streaming bool - closed bool - once sync.Once - method string -} - -func (re *responseEmitter) Emit(value interface{}) error { - // Initially this library allowed commands to return errors by sending an - // error value along a stream. We removed that in favour of CloseWithError, - // so we want to make sure we catch situations where some code still uses the - // old error emitting semantics and _panic_ in those situations. - debug.AssertNotError(value) - - // if we got a channel, instead emit values received on there. - if ch, ok := value.(chan interface{}); ok { - value = (<-chan interface{})(ch) - } - if ch, isChan := value.(<-chan interface{}); isChan { - return cmds.EmitChan(re, ch) - } - - re.once.Do(func() { re.preamble(value) }) - - re.l.Lock() - defer re.l.Unlock() - - if re.closed { - return cmds.ErrClosedEmitter - } - - var err error - - // return immediately if this is a head request - if re.method == "HEAD" { - return nil - } - - // ignore those - if value == nil { - return nil - } - - var isSingle bool - if single, ok := value.(cmds.Single); ok { - value = single.Value - isSingle = true - } - - if f, ok := re.w.(http.Flusher); ok { - defer f.Flush() - } - - switch v := value.(type) { - case error: - return re.closeWithError(v) - case io.Reader: - err = flushCopy(re.w, v) - default: - err = re.enc.Encode(value) - } - - if isSingle && err == nil { - // only close when there were no encoding errors - err = re.closeWithError(nil) - } - - return err -} - -func (re *responseEmitter) SetLength(l uint64) { - re.l.Lock() - defer re.l.Unlock() - - h := re.w.Header() - h.Set("X-Content-Length", strconv.FormatUint(l, 10)) - - re.length = l -} - -func (re *responseEmitter) Close() error { - return re.CloseWithError(nil) -} - -func (re *responseEmitter) CloseWithError(err error) error { - re.l.Lock() - defer re.l.Unlock() - - return re.closeWithError(err) -} - -func (re *responseEmitter) closeWithError(err error) error { - if re.closed { - return cmds.ErrClosingClosedEmitter - } - - switch err { - case nil: - // no error - case io.EOF: - // not a real error - err = nil - default: - // make sure this is *always* of type *cmdkit.Error - switch e := err.(type) { - case cmdkit.Error: - err = &e - case *cmdkit.Error: - case nil: - default: - err = &cmdkit.Error{Message: err.Error(), Code: cmdkit.ErrNormal} - } - } - - setErrTrailer := true - - // use preamble directly, we're already in critical section - // preamble needs to be before branch below, because the headers need to be written before writing the response - re.once.Do(func() { - re.doPreamble(err) - - // do not set error trailer if we send the error as value in preamble - setErrTrailer = false - }) - - if setErrTrailer && err != nil { - re.w.Header().Set(StreamErrHeader, err.Error()) - } - - re.closed = true - - return nil -} - -// Flush the http connection -func (re *responseEmitter) Flush() { - re.once.Do(func() { re.preamble(nil) }) - - if flusher, ok := re.w.(http.Flusher); ok { - flusher.Flush() - } -} - -func (re *responseEmitter) preamble(value interface{}) { - re.l.Lock() - defer re.l.Unlock() - - re.doPreamble(value) -} - -func (re *responseEmitter) sendErr(err *cmdkit.Error) { - // Handle error encoding. *Try* to obey the requested encoding, fallback - // on json. - encType := re.encType - enc, ok := cmds.Encoders[encType] - if !ok { - encType = cmds.JSON - enc = cmds.Encoders[encType] - } - - // Set the appropriate MIME Type - re.w.Header().Set(contentTypeHeader, mimeTypes[encType]) - - // Set the status from the error code. - status := http.StatusInternalServerError - if err.Code == cmdkit.ErrClient { - status = http.StatusBadRequest - } - re.w.WriteHeader(status) - - // Finally, send the errr - if err := enc(re.req)(re.w).Encode(err); err != nil { - log.Error("error sending error value after non-200 response", err) - } - - re.closed = true -} - -func (re *responseEmitter) doPreamble(value interface{}) { - var ( - h = re.w.Header() - mime string - ) - - // Common Headers - - // set 'allowed' headers - h.Set("Access-Control-Allow-Headers", AllowedExposedHeaders) - // expose those headers - h.Set("Access-Control-Expose-Headers", AllowedExposedHeaders) - - // Set up our potential trailer - h.Set("Trailer", StreamErrHeader) - - switch v := value.(type) { - case *cmdkit.Error: - re.sendErr(v) - return - case io.Reader: - // set streams output type to text to avoid issues with browsers rendering - // html pages on priveleged api ports - h.Set(streamHeader, "1") - re.streaming = true - - mime = "text/plain" - case cmds.Single: - // don't set stream/channel header - default: - h.Set(channelHeader, "1") - } - - if mime == "" { - var ok bool - - // lookup mime type from map - mime, ok = mimeTypes[re.encType] - if !ok { - // catch-all, set to text as default - mime = "text/plain" - } - } - - h.Set(contentTypeHeader, mime) - - re.w.WriteHeader(http.StatusOK) -} - -type responseWriterer interface { - Lower() http.ResponseWriter -} - -func flushCopy(w io.Writer, r io.Reader) error { - buf := make([]byte, 4096) - f, ok := w.(http.Flusher) - if !ok { - _, err := io.Copy(w, r) - return err - } - for { - n, err := r.Read(buf) - switch err { - case io.EOF: - if n <= 0 { - return nil - } - // if data was returned alongside the EOF, pretend we didnt - // get an EOF. The next read call should also EOF. - case nil: - // continue - default: - return err - } - - nw, err := w.Write(buf[:n]) - if err != nil { - return err - } - - if nw != n { - return fmt.Errorf("http write failed to write full amount: %d != %d", nw, n) - } - - f.Flush() - } -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/opts.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/opts.go deleted file mode 100644 index ea718edfca..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/opts.go +++ /dev/null @@ -1,23 +0,0 @@ -package cmds - -import ( - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -// Flag names -const ( - EncShort = "enc" - EncLong = "encoding" - RecShort = "r" - RecLong = "recursive" - ChanOpt = "stream-channels" - TimeoutOpt = "timeout" - OptShortHelp = "h" - OptLongHelp = "help" -) - -// options that are used by this package -var OptionEncodingType = cmdkit.StringOption(EncLong, EncShort, "The encoding type the output should be encoded with (json, xml, or text)").WithDefault("text") -var OptionRecursivePath = cmdkit.BoolOption(RecLong, RecShort, "Add directory paths recursively").WithDefault(false) -var OptionStreamChannels = cmdkit.BoolOption(ChanOpt, "Stream channel output") -var OptionTimeout = cmdkit.StringOption(TimeoutOpt, "set a global timeout on the command") diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/package.json b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/package.json deleted file mode 100644 index da0841bf8d..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-cmds" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-cmds", - "goversion": "1.7" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "rs", - "hash": "QmPG2kW5t27LuHgHnvhUwbHCNHAt2eUcb4gPHqofrESUdB", - "name": "cors", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg", - "name": "go-ipfs-cmdkit", - "version": "1.2.0" - }, - { - "author": "texttheater", - "hash": "QmTVvctiHWZzSDZdyU5wdnXh7VF3kprHSyQFwVChos5qKu", - "name": "golang-levenshtein", - "version": "1.0.0" - }, - { - "author": "Kubuxu", - "hash": "QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93", - "name": "go-os-helper", - "version": "0.0.0" - }, - { - "author": "magik6k", - "hash": "QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC", - "name": "go-ipfs-files", - "version": "1.0.1" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "MIT", - "name": "go-ipfs-cmds", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.5" -} - diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/request.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/request.go deleted file mode 100644 index 065a2d8383..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/request.go +++ /dev/null @@ -1,189 +0,0 @@ -package cmds - -import ( - "context" - "fmt" - "reflect" - - "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -// Request represents a call to a command from a consumer -type Request struct { - Context context.Context - Root, Command *Command - - Path []string - Arguments []string - Options cmdkit.OptMap - - Files files.File - - bodyArgs *arguments -} - -// NewRequest returns a request initialized with given arguments -// An non-nil error will be returned if the provided option values are invalid -func NewRequest(ctx context.Context, path []string, opts cmdkit.OptMap, args []string, file files.File, root *Command) (*Request, error) { - if opts == nil { - opts = make(cmdkit.OptMap) - } - - cmd, err := root.Get(path) - if err != nil { - return nil, err - } - - req := &Request{ - Path: path, - Options: opts, - Arguments: args, - Files: file, - Root: root, - Command: cmd, - Context: ctx, - } - - return req, req.convertOptions(root) -} - -// BodyArgs returns a scanner that returns arguments passed in the body as tokens. -// -// Returns nil if there are no arguments to be consumed via stdin. -func (req *Request) BodyArgs() StdinArguments { - // dance to make sure we return an *untyped* nil. - // DO NOT just return `req.bodyArgs`. - // If you'd like to complain, go to - // https://github.com/golang/go/issues/. - if req.bodyArgs != nil { - return req.bodyArgs - } - return nil -} - -func (req *Request) ParseBodyArgs() error { - s := req.BodyArgs() - if s == nil { - return nil - } - - for s.Scan() { - req.Arguments = append(req.Arguments, s.Argument()) - } - return s.Err() -} - -func (req *Request) SetOption(name string, value interface{}) { - optDefs, err := req.Root.GetOptions(req.Path) - optDef, found := optDefs[name] - - if req.Options == nil { - req.Options = map[string]interface{}{} - } - - // unknown option, simply set the value and return - // TODO we might error out here instead - if err != nil || !found { - req.Options[name] = value - return - } - - name = optDef.Name() - req.Options[name] = value - - return -} - -func (req *Request) convertOptions(root *Command) error { - optDefs, err := root.GetOptions(req.Path) - if err != nil { - return err - } - - for k, v := range req.Options { - opt, ok := optDefs[k] - if !ok { - continue - } - - kind := reflect.TypeOf(v).Kind() - if kind != opt.Type() { - if str, ok := v.(string); ok { - val, err := opt.Parse(str) - if err != nil { - value := fmt.Sprintf("value %q", v) - if len(str) == 0 { - value = "empty value" - } - return fmt.Errorf("Could not convert %s to type %q (for option %q)", - value, opt.Type().String(), "-"+k) - } - req.Options[k] = val - - } else { - return fmt.Errorf("Option %q should be type %q, but got type %q", - k, opt.Type().String(), kind.String()) - } - } - - for _, name := range opt.Names() { - if _, ok := req.Options[name]; name != k && ok { - return fmt.Errorf("Duplicate command options were provided (%q and %q)", - k, name) - } - } - } - - return nil -} - -// GetEncoding returns the EncodingType set in a request, falling back to JSON -func GetEncoding(req *Request, def EncodingType) EncodingType { - switch enc := req.Options[EncLong].(type) { - case string: - return EncodingType(enc) - case EncodingType: - return enc - default: - if def == "" { - return DefaultOutputEncoding - } - return def - } -} - -// fillDefault fills in default values if option has not been set -func (req *Request) FillDefaults() error { - optDefMap, err := req.Root.GetOptions(req.Path) - if err != nil { - return err - } - - optDefs := map[cmdkit.Option]struct{}{} - - for _, optDef := range optDefMap { - optDefs[optDef] = struct{}{} - } - -Outer: - for optDef := range optDefs { - dflt := optDef.Default() - if dflt == nil { - // option has no dflt, continue - continue - } - - names := optDef.Names() - for _, name := range names { - if _, ok := req.Options[name]; ok { - // option has been set, continue with next option - continue Outer - } - } - - req.Options[optDef.Name()] = dflt - } - - return nil -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/responseemitter.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/responseemitter.go deleted file mode 100644 index 65fb6c5369..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/responseemitter.go +++ /dev/null @@ -1,88 +0,0 @@ -package cmds - -import ( - "errors" - "fmt" - "io" -) - -var ( - ErrClosedEmitter = errors.New("cmds: emit on closed emitter") - ErrClosingClosedEmitter = errors.New("cmds: closing closed emitter") -) - -// Single can be used to signal to any ResponseEmitter that only one value will be emitted. -// This is important e.g. for the http.ResponseEmitter so it can set the HTTP headers appropriately. -type Single struct { - Value interface{} -} - -func (s Single) String() string { - return fmt.Sprintf("Single{%v}", s.Value) -} - -func (s Single) GoString() string { - return fmt.Sprintf("Single{%#v}", s.Value) -} - -// EmitOnce is a helper that emits a value wrapped in Single, to signal that this will be the only value sent. -func EmitOnce(re ResponseEmitter, v interface{}) error { - return re.Emit(Single{v}) -} - -// ResponseEmitter encodes and sends the command code's output to the client. -// It is all a command can write to. -type ResponseEmitter interface { - // Close closes the underlying transport. - Close() error - - // CloseWithError closes the underlying transport and makes subsequent read - // calls return the passed error. - CloseWithError(error) error - - // SetLength sets the length of the output - // err is an interface{} so we don't have to manually convert to error. - SetLength(length uint64) - - // Emit sends a value. - // If value is io.Reader we just copy that to the connection - // other values are marshalled. - Emit(value interface{}) error -} - -// Copy sends all values received on res to re. If res is closed, it closes re. -func Copy(re ResponseEmitter, res Response) error { - re.SetLength(res.Length()) - - for { - v, err := res.Next() - if err != nil { - if err == io.EOF { - return re.Close() - } - - closeErr := re.CloseWithError(err) - if closeErr != nil { - log.Errorf("error closing emitter with error %q: %s", err, closeErr) - } - - return err - } - - err = re.Emit(v) - if err != nil { - return err - } - } -} - -func EmitChan(re ResponseEmitter, ch <-chan interface{}) error { - for v := range ch { - err := re.Emit(v) - if err != nil { - return err - } - } - - return nil -} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/writer.go b/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/writer.go deleted file mode 100644 index 947114aad7..0000000000 --- a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/writer.go +++ /dev/null @@ -1,226 +0,0 @@ -package cmds - -import ( - "encoding/json" - "errors" - "io" - "reflect" - "sync" - - "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/debug" - "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" -) - -func NewWriterResponseEmitter(w io.WriteCloser, req *Request) (ResponseEmitter, error) { - _, valEnc, err := GetEncoder(req, w, Undefined) - if err != nil { - return nil, err - } - - re := &writerResponseEmitter{ - w: w, - c: w, - req: req, - enc: valEnc, - } - - return re, nil -} - -func NewReaderResponse(r io.Reader, req *Request) (Response, error) { - encType := GetEncoding(req, Undefined) - dec, ok := Decoders[encType] - if !ok { - return nil, cmdkit.Errorf(cmdkit.ErrClient, "unknown encoding: %s", encType) - } - return &readerResponse{ - req: req, - r: r, - encType: encType, - dec: dec(r), - emitted: make(chan struct{}), - }, nil -} - -type readerResponse struct { - r io.Reader - encType EncodingType - dec Decoder - - req *Request - - length uint64 - err error - - emitted chan struct{} - once sync.Once -} - -func (r *readerResponse) Request() *Request { - return r.req -} - -func (r *readerResponse) Error() *cmdkit.Error { - <-r.emitted - - if err, ok := r.err.(*cmdkit.Error); ok { - return err - } - - return &cmdkit.Error{Message: r.err.Error()} -} - -func (r *readerResponse) Length() uint64 { - <-r.emitted - - return r.length -} - -func (r *readerResponse) Next() (interface{}, error) { - m := &MaybeError{Value: r.req.Command.Type} - err := r.dec.Decode(m) - if err != nil { - return nil, err - } - - r.once.Do(func() { close(r.emitted) }) - - v, err := m.Get() - - // because working with pointers to arrays is annoying - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice { - v = reflect.ValueOf(v).Elem().Interface() - } - return v, err -} - -type writerResponseEmitter struct { - // TODO maybe make those public? - w io.Writer - c io.Closer - enc Encoder - req *Request - - length *uint64 - err *cmdkit.Error - - emitted bool - closed bool -} - -func (re *writerResponseEmitter) CloseWithError(err error) error { - if re.closed { - return ErrClosingClosedEmitter - } - - if err == nil || err == io.EOF { - return re.Close() - } - - cwe, ok := re.c.(interface { - CloseWithError(error) error - }) - if ok { - re.closed = true - return cwe.CloseWithError(err) - } - - return errors.New("provided closer does not support CloseWithError") -} - -func (re *writerResponseEmitter) SetLength(length uint64) { - if re.emitted { - return - } - - *re.length = length -} - -func (re *writerResponseEmitter) Close() error { - if re.closed { - return ErrClosingClosedEmitter - } - - re.closed = true - return re.c.Close() -} - -func (re *writerResponseEmitter) Emit(v interface{}) error { - // channel emission iteration - if ch, ok := v.(chan interface{}); ok { - v = (<-chan interface{})(ch) - } - if ch, isChan := v.(<-chan interface{}); isChan { - return EmitChan(re, ch) - } - - // Initially this library allowed commands to return errors by sending an - // error value along a stream. We removed that in favour of CloseWithError, - // so we want to make sure we catch situations where some code still uses the - // old error emitting semantics. - // Also errors may occur both as pointers and as plain values, so we need to - // check both. - debug.AssertNotError(v) - - if re.closed { - return ErrClosedEmitter - } - - re.emitted = true - - var isSingle bool - if s, ok := v.(Single); ok { - v = s.Value - isSingle = true - } - - err := re.enc.Encode(v) - if err != nil { - return err - } - - if isSingle { - return re.Close() - } - - return nil -} - -type MaybeError struct { - Value interface{} // needs to be a pointer - Error *cmdkit.Error - - isError bool -} - -func (m *MaybeError) Get() (interface{}, error) { - if m.isError { - return nil, m.Error - } - return m.Value, nil -} - -func (m *MaybeError) UnmarshalJSON(data []byte) error { - var e cmdkit.Error - err := json.Unmarshal(data, &e) - if err == nil { - m.isError = true - m.Error = &e - return nil - } - - if m.Value != nil { - // make sure we are working with a pointer here - v := reflect.ValueOf(m.Value) - if v.Kind() != reflect.Ptr { - m.Value = reflect.New(v.Type()).Interface() - } - - err = json.Unmarshal(data, m.Value) - } else { - // let the json decoder decode into whatever it finds appropriate - err = json.Unmarshal(data, &m.Value) - } - - return err -} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/.travis.yml b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/.travis.yml new file mode 100644 index 0000000000..e4b6347376 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/.travis.yml @@ -0,0 +1,33 @@ +os: + - linux + +language: go + +go: + - 1.11.x + +env: + global: + - GOTFLAGS="-race" + - IPFS_REUSEPORT=false + matrix: + - BUILD_DEPTYPE=gx + - BUILD_DEPTYPE=gomod + + +# disable travis install +install: + - true + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + + +cache: + directories: + - $GOPATH/src/gx + - $GOPATH/pkg/mod + - /home/travis/.cache/go-build + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/LICENSE b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/LICENSE rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/LICENSE diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/Makefile b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/Makefile new file mode 100644 index 0000000000..b1b62d7cd3 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/Makefile @@ -0,0 +1,15 @@ +export IPFS_API ?= v04x.ipfs.io + +gx: + go get -u github.com/whyrusleeping/gx + go get -u github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + +mod_deps: + env GO111MODULE=on go mod download diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/README.md b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/README.md similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/README.md rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/README.md diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/codecov.yml b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/codecov.yml rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/codecov.yml diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht.go new file mode 100644 index 0000000000..4c1569251d --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht.go @@ -0,0 +1,407 @@ +package dht + +import ( + "bytes" + "context" + "errors" + "fmt" + "sync" + "time" + + opts "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts" + pb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + providers "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/providers" + + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + recpb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +var logger = logging.Logger("dht") + +// NumBootstrapQueries defines the number of random dht queries to do to +// collect members of the routing table. +const NumBootstrapQueries = 5 + +// IpfsDHT is an implementation of Kademlia with S/Kademlia modifications. +// It is used to implement the base IpfsRouting module. +type IpfsDHT struct { + host host.Host // the network services we need + self peer.ID // Local peer (yourself) + peerstore pstore.Peerstore // Peer Registry + + datastore ds.Datastore // Local data + + routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes + providers *providers.ProviderManager + + birth time.Time // When this peer started up + + Validator record.Validator + + ctx context.Context + proc goprocess.Process + + strmap map[peer.ID]*messageSender + smlk sync.Mutex + + plk sync.Mutex + + protocols []protocol.ID // DHT protocols + + // OpenBazaar: this chan is added which is closed when the bootstrap finished + // this is used to flag ob-go that the DHT is ready for use. + BootstrapChan chan struct{} +} + +// Assert that IPFS assumptions about interfaces aren't broken. These aren't a +// guarantee, but we can use them to aid refactoring. +var ( + _ routing.ContentRouting = (*IpfsDHT)(nil) + _ routing.IpfsRouting = (*IpfsDHT)(nil) + _ routing.PeerRouting = (*IpfsDHT)(nil) + _ routing.PubKeyFetcher = (*IpfsDHT)(nil) + _ routing.ValueStore = (*IpfsDHT)(nil) +) + +// New creates a new DHT with the specified host and options. +func New(ctx context.Context, h host.Host, options ...opts.Option) (*IpfsDHT, error) { + var cfg opts.Options + if err := cfg.Apply(append([]opts.Option{opts.Defaults}, options...)...); err != nil { + return nil, err + } + dht := makeDHT(ctx, h, cfg.Datastore, cfg.Protocols) + + // register for network notifs. + dht.host.Network().Notify((*netNotifiee)(dht)) + + dht.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { + // remove ourselves from network notifs. + dht.host.Network().StopNotify((*netNotifiee)(dht)) + return nil + }) + + dht.proc.AddChild(dht.providers.Process()) + dht.Validator = cfg.Validator + dht.BootstrapChan = make(chan struct{}) + + if !cfg.Client { + for _, p := range cfg.Protocols { + h.SetStreamHandler(p, dht.handleNewStream) + } + } + return dht, nil +} + +// NewDHT creates a new DHT object with the given peer as the 'local' host. +// IpfsDHT's initialized with this function will respond to DHT requests, +// whereas IpfsDHT's initialized with NewDHTClient will not. +func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { + dht, err := New(ctx, h, opts.Datastore(dstore)) + if err != nil { + panic(err) + } + return dht +} + +// NewDHTClient creates a new DHT object with the given peer as the 'local' +// host. IpfsDHT clients initialized with this function will not respond to DHT +// requests. If you need a peer to respond to DHT requests, use NewDHT instead. +// NewDHTClient creates a new DHT object with the given peer as the 'local' host +func NewDHTClient(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { + dht, err := New(ctx, h, opts.Datastore(dstore), opts.Client(true)) + if err != nil { + panic(err) + } + return dht +} + +func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching, protocols []protocol.ID) *IpfsDHT { + rt := kb.NewRoutingTable(KValue, kb.ConvertPeerID(h.ID()), time.Minute, h.Peerstore()) + + cmgr := h.ConnManager() + rt.PeerAdded = func(p peer.ID) { + cmgr.TagPeer(p, "kbucket", 5) + } + rt.PeerRemoved = func(p peer.ID) { + cmgr.UntagPeer(p, "kbucket") + } + + return &IpfsDHT{ + datastore: dstore, + self: h.ID(), + peerstore: h.Peerstore(), + host: h, + strmap: make(map[peer.ID]*messageSender), + ctx: ctx, + providers: providers.NewProviderManager(ctx, h.ID(), dstore), + birth: time.Now(), + routingTable: rt, + protocols: protocols, + } +} + +// putValueToPeer stores the given key/value pair at the peer 'p' +func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, rec *recpb.Record) error { + + pmes := pb.NewMessage(pb.Message_PUT_VALUE, rec.Key, 0) + pmes.Record = rec + rpmes, err := dht.sendRequest(ctx, p, pmes) + if err != nil { + logger.Debugf("putValueToPeer: %v. (peer: %s, key: %s)", err, p.Pretty(), loggableKey(string(rec.Key))) + return err + } + + if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { + logger.Warningf("putValueToPeer: value not put correctly. (%v != %v)", pmes, rpmes) + return errors.New("value not put correctly") + } + + return nil +} + +var errInvalidRecord = errors.New("received invalid record") + +// getValueOrPeers queries a particular peer p for the value for +// key. It returns either the value or a list of closer peers. +// NOTE: It will update the dht's peerstore with any new addresses +// it finds for the given peer. +func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID, key string) (*recpb.Record, []*pstore.PeerInfo, error) { + + pmes, err := dht.getValueSingle(ctx, p, key) + if err != nil { + return nil, nil, err + } + + // Perhaps we were given closer peers + peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) + + if record := pmes.GetRecord(); record != nil { + // Success! We were given the value + logger.Debug("getValueOrPeers: got value") + + // make sure record is valid. + err = dht.Validator.Validate(string(record.GetKey()), record.GetValue()) + if err != nil { + logger.Info("Received invalid record! (discarded)") + // return a sentinal to signify an invalid record was received + err = errInvalidRecord + record = new(recpb.Record) + } + return record, peers, err + } + + if len(peers) > 0 { + logger.Debug("getValueOrPeers: peers") + return nil, peers, nil + } + + logger.Warning("getValueOrPeers: routing.ErrNotFound") + return nil, nil, routing.ErrNotFound +} + +// getValueSingle simply performs the get value RPC with the given parameters +func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, key string) (*pb.Message, error) { + meta := logging.LoggableMap{ + "key": key, + "peer": p, + } + + eip := logger.EventBegin(ctx, "getValueSingle", meta) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_GET_VALUE, []byte(key), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("getValueSingle: read timeout %s %s", p.Pretty(), key) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +// getLocal attempts to retrieve the value from the datastore +func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) { + logger.Debugf("getLocal %s", key) + rec, err := dht.getRecordFromDatastore(mkDsKey(key)) + if err != nil { + logger.Warningf("getLocal: %s", err) + return nil, err + } + + // Double check the key. Can't hurt. + if rec != nil && string(rec.GetKey()) != key { + logger.Errorf("BUG getLocal: found a DHT record that didn't match it's key: %s != %s", rec.GetKey(), key) + return nil, nil + + } + return rec, nil +} + +// getOwnPrivateKey attempts to load the local peers private +// key from the peerstore. +func (dht *IpfsDHT) getOwnPrivateKey() (ci.PrivKey, error) { + sk := dht.peerstore.PrivKey(dht.self) + if sk == nil { + logger.Warningf("%s dht cannot get own private key!", dht.self) + return nil, fmt.Errorf("cannot get private key to sign record!") + } + return sk, nil +} + +// putLocal stores the key value pair in the datastore +func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error { + logger.Debugf("putLocal: %v %v", key, rec) + data, err := proto.Marshal(rec) + if err != nil { + logger.Warningf("putLocal: %s", err) + return err + } + + return dht.datastore.Put(mkDsKey(key), data) +} + +// Update signals the routingTable to Update its last-seen status +// on the given peer. +func (dht *IpfsDHT) Update(ctx context.Context, p peer.ID) { + logger.Event(ctx, "updatePeer", p) + dht.routingTable.Update(p) +} + +// FindLocal looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in. +func (dht *IpfsDHT) FindLocal(id peer.ID) pstore.PeerInfo { + switch dht.host.Network().Connectedness(id) { + case inet.Connected, inet.CanConnect: + return dht.peerstore.PeerInfo(id) + default: + return pstore.PeerInfo{} + } +} + +// findPeerSingle asks peer 'p' if they know where the peer with id 'id' is +func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (*pb.Message, error) { + eip := logger.EventBegin(ctx, "findPeerSingle", + logging.LoggableMap{ + "peer": p, + "target": id, + }) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_FIND_NODE, []byte(id), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("read timeout: %s %s", p.Pretty(), id) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key cid.Cid) (*pb.Message, error) { + eip := logger.EventBegin(ctx, "findProvidersSingle", p, key) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_GET_PROVIDERS, key.Bytes(), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("read timeout: %s %s", p.Pretty(), key) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +// nearestPeersToQuery returns the routing tables closest peers. +func (dht *IpfsDHT) nearestPeersToQuery(pmes *pb.Message, count int) []peer.ID { + closer := dht.routingTable.NearestPeers(kb.ConvertKey(string(pmes.GetKey())), count) + return closer +} + +// betterPeersToQuery returns nearestPeersToQuery, but if and only if closer than self. +func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) []peer.ID { + closer := dht.nearestPeersToQuery(pmes, count) + + // no node? nil + if closer == nil { + logger.Warning("betterPeersToQuery: no closer peers to send:", p) + return nil + } + + filtered := make([]peer.ID, 0, len(closer)) + for _, clp := range closer { + + // == to self? thats bad + if clp == dht.self { + logger.Error("BUG betterPeersToQuery: attempted to return self! this shouldn't happen...") + return nil + } + // Dont send a peer back themselves + if clp == p { + continue + } + + filtered = append(filtered, clp) + } + + // ok seems like closer nodes + return filtered +} + +// Context return dht's context +func (dht *IpfsDHT) Context() context.Context { + return dht.ctx +} + +// Process return dht's process +func (dht *IpfsDHT) Process() goprocess.Process { + return dht.proc +} + +// RoutingTable return dht's routingTable +func (dht *IpfsDHT) RoutingTable() *kb.RoutingTable { + return dht.routingTable +} + +// Close calls Process Close +func (dht *IpfsDHT) Close() error { + return dht.proc.Close() +} + +func (dht *IpfsDHT) protocolStrs() []string { + pstrs := make([]string, len(dht.protocols)) + for idx, proto := range dht.protocols { + pstrs[idx] = string(proto) + } + + return pstrs +} + +func mkDsKey(s string) ds.Key { + return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_bootstrap.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_bootstrap.go new file mode 100644 index 0000000000..8047edda92 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_bootstrap.go @@ -0,0 +1,185 @@ +package dht + +import ( + "context" + "crypto/rand" + "fmt" + "sync" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + multiaddr "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + _ "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +var DefaultBootstrapPeers []multiaddr.Multiaddr + +func init() { + for _, s := range []string{ + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", + "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", // mars.i.ipfs.io + "/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", // pluto.i.ipfs.io + "/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu", // saturn.i.ipfs.io + "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", // venus.i.ipfs.io + "/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", // earth.i.ipfs.io + "/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", // pluto.i.ipfs.io + "/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu", // saturn.i.ipfs.io + "/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", // venus.i.ipfs.io + "/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", // earth.i.ipfs.io + } { + ma, err := multiaddr.NewMultiaddr(s) + if err != nil { + panic(err) + } + DefaultBootstrapPeers = append(DefaultBootstrapPeers, ma) + } +} + +// BootstrapConfig specifies parameters used bootstrapping the DHT. +// +// Note there is a tradeoff between the bootstrap period and the +// number of queries. We could support a higher period with less +// queries. +type BootstrapConfig struct { + Queries int // how many queries to run per period + Period time.Duration // how often to run periodi cbootstrap. + Timeout time.Duration // how long to wait for a bootstrao query to run +} + +var DefaultBootstrapConfig = BootstrapConfig{ + // For now, this is set to 1 query. + // We are currently more interested in ensuring we have a properly formed + // DHT than making sure our dht minimizes traffic. Once we are more certain + // of our implementation's robustness, we should lower this down to 8 or 4. + Queries: 1, + + // For now, this is set to 5 minutes, which is a medium period. We are + // We are currently more interested in ensuring we have a properly formed + // DHT than making sure our dht minimizes traffic. + Period: time.Duration(5 * time.Minute), + + Timeout: time.Duration(10 * time.Second), +} + +// A method in the IpfsRouting interface. It calls BootstrapWithConfig with +// the default bootstrap config. +func (dht *IpfsDHT) Bootstrap(ctx context.Context) error { + return dht.BootstrapWithConfig(ctx, DefaultBootstrapConfig) +} + +// Runs cfg.Queries bootstrap queries every cfg.Period. +func (dht *IpfsDHT) BootstrapWithConfig(ctx context.Context, cfg BootstrapConfig) error { + // Because this method is not synchronous, we have to duplicate sanity + // checks on the config so that callers aren't oblivious. + if cfg.Queries <= 0 { + return fmt.Errorf("invalid number of queries: %d", cfg.Queries) + } + go func() { + for { + err := dht.runBootstrap(ctx, cfg) + if err != nil { + logger.Warningf("error bootstrapping: %s", err) + } + select { + case <-time.After(cfg.Period): + case <-ctx.Done(): + return + } + } + }() + return nil +} + +// This is a synchronous bootstrap. cfg.Queries queries will run each with a +// timeout of cfg.Timeout. cfg.Period is not used. +func (dht *IpfsDHT) BootstrapOnce(ctx context.Context, cfg BootstrapConfig) error { + if cfg.Queries <= 0 { + return fmt.Errorf("invalid number of queries: %d", cfg.Queries) + } + return dht.runBootstrap(ctx, cfg) +} + +func newRandomPeerId() peer.ID { + id := make([]byte, 32) // SHA256 is the default. TODO: Use a more canonical way to generate random IDs. + rand.Read(id) + id = u.Hash(id) // TODO: Feed this directly into the multihash instead of hashing it. + return peer.ID(id) +} + +// Traverse the DHT toward the given ID. +func (dht *IpfsDHT) walk(ctx context.Context, target peer.ID) (pstore.PeerInfo, error) { + // TODO: Extract the query action (traversal logic?) inside FindPeer, + // don't actually call through the FindPeer machinery, which can return + // things out of the peer store etc. + return dht.FindPeer(ctx, target) +} + +// Traverse the DHT toward a random ID. +func (dht *IpfsDHT) randomWalk(ctx context.Context) error { + id := newRandomPeerId() + p, err := dht.walk(ctx, id) + switch err { + case routing.ErrNotFound: + return nil + case nil: + // We found a peer from a randomly generated ID. This should be very + // unlikely. + logger.Warningf("random walk toward %s actually found peer: %s", id, p) + return nil + default: + return err + } +} + +// OpenBazaar: this once is used to guard the closing of the bootstrap chan so that +// it is only closed after the first bootstrap round completes. +var bootstrapOnce sync.Once + +// runBootstrap builds up list of peers by requesting random peer IDs +func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error { + // OpenBazaar: close bootstrap chan + defer bootstrapOnce.Do(func() { + close(dht.BootstrapChan) + }) + + bslog := func(msg string) { + logger.Debugf("DHT %s dhtRunBootstrap %s -- routing table size: %d", dht.self, msg, dht.routingTable.Size()) + } + bslog("start") + defer bslog("end") + defer logger.EventBegin(ctx, "dhtRunBootstrap").Done() + + doQuery := func(n int, target string, f func(context.Context) error) error { + logger.Infof("Bootstrapping query (%d/%d) to %s", n, cfg.Queries, target) + queryCtx, cancel := context.WithTimeout(ctx, cfg.Timeout) + defer cancel() + err := f(queryCtx) + if err == context.DeadlineExceeded && queryCtx.Err() == context.DeadlineExceeded && ctx.Err() == nil { + return nil + } + return err + } + + // Do all but one of the bootstrap queries as random walks. + for i := 0; i < cfg.Queries; i++ { + err := doQuery(i, "random ID", dht.randomWalk) + if err != nil { + return err + } + } + + // Find self to distribute peer info to our neighbors. + err := doQuery(cfg.Queries, fmt.Sprintf("self: %s", dht.self), func(ctx context.Context) error { + _, err := dht.walk(ctx, dht.self) + return err + }) + + + return err +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_net.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_net.go new file mode 100644 index 0000000000..39865357cb --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dht_net.go @@ -0,0 +1,368 @@ +package dht + +import ( + "bufio" + "context" + "fmt" + "io" + "sync" + "time" + + pb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + ctxio "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" +) + +var dhtReadMessageTimeout = time.Minute +var ErrReadTimeout = fmt.Errorf("timed out reading response") + +type bufferedWriteCloser interface { + ggio.WriteCloser + Flush() error +} + +// The Protobuf writer performs multiple small writes when writing a message. +// We need to buffer those writes, to make sure that we're not sending a new +// packet for every single write. +type bufferedDelimitedWriter struct { + *bufio.Writer + ggio.WriteCloser +} + +func newBufferedDelimitedWriter(str io.Writer) bufferedWriteCloser { + w := bufio.NewWriter(str) + return &bufferedDelimitedWriter{ + Writer: w, + WriteCloser: ggio.NewDelimitedWriter(w), + } +} + +func (w *bufferedDelimitedWriter) Flush() error { + return w.Writer.Flush() +} + +// handleNewStream implements the inet.StreamHandler +func (dht *IpfsDHT) handleNewStream(s inet.Stream) { + defer s.Reset() + if dht.handleNewMessage(s) { + // Gracefully close the stream for writes. + s.Close() + } +} + +// Returns true on orderly completion of writes (so we can Close the stream). +func (dht *IpfsDHT) handleNewMessage(s inet.Stream) bool { + ctx := dht.Context() + cr := ctxio.NewReader(ctx, s) // ok to use. we defer close stream in this func + cw := ctxio.NewWriter(ctx, s) // ok to use. we defer close stream in this func + r := ggio.NewDelimitedReader(cr, inet.MessageSizeMax) + w := newBufferedDelimitedWriter(cw) + mPeer := s.Conn().RemotePeer() + + for { + var req pb.Message + switch err := r.ReadMsg(&req); err { + case io.EOF: + return true + default: + // This string test is necessary because there isn't a single stream reset error + // instance in use. + if err.Error() != "stream reset" { + logger.Debugf("error reading message: %#v", err) + } + return false + case nil: + } + + handler := dht.handlerForMsgType(req.GetType()) + if handler == nil { + logger.Warningf("can't handle received message of type %v", req.GetType()) + return false + } + + resp, err := handler(ctx, mPeer, &req) + if err != nil { + logger.Debugf("error handling message: %v", err) + return false + } + + dht.updateFromMessage(ctx, mPeer, &req) + + if resp == nil { + continue + } + + // send out response msg + err = w.WriteMsg(resp) + if err == nil { + err = w.Flush() + } + if err != nil { + logger.Debugf("error writing response: %v", err) + return false + } + + } +} + +// OpenBazaar: Added an exported version of sendRequest. +func (dht *IpfsDHT) SendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { + return dht.sendRequest(ctx, p, pmes) +} + +// sendRequest sends out a request, but also makes sure to +// measure the RTT for latency measurements. +func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { + + ms, err := dht.messageSenderForPeer(p) + if err != nil { + return nil, err + } + + start := time.Now() + + rpmes, err := ms.SendRequest(ctx, pmes) + if err != nil { + return nil, err + } + + // update the peer (on valid msgs only) + dht.updateFromMessage(ctx, p, rpmes) + + dht.peerstore.RecordLatency(p, time.Since(start)) + logger.Event(ctx, "dhtReceivedMessage", dht.self, p, rpmes) + return rpmes, nil +} + +// OpenBazaar: Added an exported version of sendMessage. +func (dht *IpfsDHT) SendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { + return dht.sendMessage(ctx, p, pmes) +} + +// sendMessage sends out a message +func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { + ms, err := dht.messageSenderForPeer(p) + if err != nil { + return err + } + + if err := ms.SendMessage(ctx, pmes); err != nil { + return err + } + logger.Event(ctx, "dhtSentMessage", dht.self, p, pmes) + return nil +} + +func (dht *IpfsDHT) updateFromMessage(ctx context.Context, p peer.ID, mes *pb.Message) error { + // Make sure that this node is actually a DHT server, not just a client. + protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) + if err == nil && len(protos) > 0 { + dht.Update(ctx, p) + } + return nil +} + +func (dht *IpfsDHT) messageSenderForPeer(p peer.ID) (*messageSender, error) { + dht.smlk.Lock() + ms, ok := dht.strmap[p] + if ok { + dht.smlk.Unlock() + return ms, nil + } + ms = &messageSender{p: p, dht: dht} + dht.strmap[p] = ms + dht.smlk.Unlock() + + if err := ms.prepOrInvalidate(); err != nil { + dht.smlk.Lock() + defer dht.smlk.Unlock() + + if msCur, ok := dht.strmap[p]; ok { + // Changed. Use the new one, old one is invalid and + // not in the map so we can just throw it away. + if ms != msCur { + return msCur, nil + } + // Not changed, remove the now invalid stream from the + // map. + delete(dht.strmap, p) + } + // Invalid but not in map. Must have been removed by a disconnect. + return nil, err + } + // All ready to go. + return ms, nil +} + +type messageSender struct { + s inet.Stream + r ggio.ReadCloser + w bufferedWriteCloser + lk sync.Mutex + p peer.ID + dht *IpfsDHT + + invalid bool + singleMes int +} + +// invalidate is called before this messageSender is removed from the strmap. +// It prevents the messageSender from being reused/reinitialized and then +// forgotten (leaving the stream open). +func (ms *messageSender) invalidate() { + ms.invalid = true + if ms.s != nil { + ms.s.Reset() + ms.s = nil + } +} + +func (ms *messageSender) prepOrInvalidate() error { + ms.lk.Lock() + defer ms.lk.Unlock() + if err := ms.prep(); err != nil { + ms.invalidate() + return err + } + return nil +} + +func (ms *messageSender) prep() error { + if ms.invalid { + return fmt.Errorf("message sender has been invalidated") + } + if ms.s != nil { + return nil + } + + nstr, err := ms.dht.host.NewStream(ms.dht.ctx, ms.p, ms.dht.protocols...) + if err != nil { + return err + } + + ms.r = ggio.NewDelimitedReader(nstr, inet.MessageSizeMax) + ms.w = newBufferedDelimitedWriter(nstr) + ms.s = nstr + + return nil +} + +// streamReuseTries is the number of times we will try to reuse a stream to a +// given peer before giving up and reverting to the old one-message-per-stream +// behaviour. +const streamReuseTries = 3 + +func (ms *messageSender) SendMessage(ctx context.Context, pmes *pb.Message) error { + ms.lk.Lock() + defer ms.lk.Unlock() + retry := false + for { + if err := ms.prep(); err != nil { + return err + } + + if err := ms.writeMsg(pmes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error writing message, bailing: ", err) + return err + } else { + logger.Info("error writing message, trying again: ", err) + retry = true + continue + } + } + + logger.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) + + if ms.singleMes > streamReuseTries { + go inet.FullClose(ms.s) + ms.s = nil + } else if retry { + ms.singleMes++ + } + + return nil + } +} + +func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb.Message, error) { + ms.lk.Lock() + defer ms.lk.Unlock() + retry := false + for { + if err := ms.prep(); err != nil { + return nil, err + } + + if err := ms.writeMsg(pmes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error writing message, bailing: ", err) + return nil, err + } else { + logger.Info("error writing message, trying again: ", err) + retry = true + continue + } + } + + mes := new(pb.Message) + if err := ms.ctxReadMsg(ctx, mes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error reading message, bailing: ", err) + return nil, err + } else { + logger.Info("error reading message, trying again: ", err) + retry = true + continue + } + } + + logger.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) + + if ms.singleMes > streamReuseTries { + go inet.FullClose(ms.s) + ms.s = nil + } else if retry { + ms.singleMes++ + } + + return mes, nil + } +} + +func (ms *messageSender) writeMsg(pmes *pb.Message) error { + if err := ms.w.WriteMsg(pmes); err != nil { + return err + } + return ms.w.Flush() +} + +func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { + errc := make(chan error, 1) + go func(r ggio.ReadCloser) { + errc <- r.ReadMsg(mes) + }(ms.r) + + t := time.NewTimer(dhtReadMessageTimeout) + defer t.Stop() + + select { + case err := <-errc: + return err + case <-ctx.Done(): + return ctx.Err() + case <-t.C: + return ErrReadTimeout + } +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dial_queue.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dial_queue.go new file mode 100644 index 0000000000..153e60b7b7 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/dial_queue.go @@ -0,0 +1,351 @@ +package dht + +import ( + "context" + "fmt" + "math" + "time" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + queue "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue" +) + +const ( + // DefaultDialQueueMinParallelism is the default value for the minimum number of worker dial goroutines that will + // be alive at any time. + DefaultDialQueueMinParallelism = 6 + // DefaultDialQueueMaxParallelism is the default value for the maximum number of worker dial goroutines that can + // be alive at any time. + DefaultDialQueueMaxParallelism = 20 + // DefaultDialQueueMaxIdle is the default value for the period that a worker dial goroutine waits before signalling + // a worker pool downscaling. + DefaultDialQueueMaxIdle = 5 * time.Second + // DefaultDialQueueScalingMutePeriod is the default value for the amount of time to ignore further worker pool + // scaling events, after one is processed. Its role is to reduce jitter. + DefaultDialQueueScalingMutePeriod = 1 * time.Second + // DefaultDialQueueScalingFactor is the default factor by which the current number of workers will be multiplied + // or divided when upscaling and downscaling events occur, respectively. + DefaultDialQueueScalingFactor = 1.5 +) + +type dialQueue struct { + *dqParams + + nWorkers uint + out *queue.ChanQueue + + waitingCh chan waitingCh + dieCh chan struct{} + growCh chan struct{} + shrinkCh chan struct{} +} + +type dqParams struct { + ctx context.Context + target string + dialFn func(context.Context, peer.ID) error + in *queue.ChanQueue + config dqConfig +} + +type dqConfig struct { + // minParallelism is the minimum number of worker dial goroutines that will be alive at any time. + minParallelism uint + // maxParallelism is the maximum number of worker dial goroutines that can be alive at any time. + maxParallelism uint + // scalingFactor is the factor by which the current number of workers will be multiplied or divided when upscaling + // and downscaling events occur, respectively. + scalingFactor float64 + // mutePeriod is the amount of time to ignore further worker pool scaling events, after one is processed. + // Its role is to reduce jitter. + mutePeriod time.Duration + // maxIdle is the period that a worker dial goroutine waits before signalling a worker pool downscaling. + maxIdle time.Duration +} + +// dqDefaultConfig returns the default configuration for dial queues. See const documentation to learn the default values. +func dqDefaultConfig() dqConfig { + return dqConfig{ + minParallelism: DefaultDialQueueMinParallelism, + maxParallelism: DefaultDialQueueMaxParallelism, + scalingFactor: DefaultDialQueueScalingFactor, + maxIdle: DefaultDialQueueMaxIdle, + mutePeriod: DefaultDialQueueScalingMutePeriod, + } +} + +func (dqc *dqConfig) validate() error { + if dqc.minParallelism > dqc.maxParallelism { + return fmt.Errorf("minParallelism must be below maxParallelism; actual values: min=%d, max=%d", + dqc.minParallelism, dqc.maxParallelism) + } + if dqc.scalingFactor < 1 { + return fmt.Errorf("scalingFactor must be >= 1; actual value: %f", dqc.scalingFactor) + } + return nil +} + +type waitingCh struct { + ch chan<- peer.ID + ts time.Time +} + +// newDialQueue returns an adaptive dial queue that spawns a dynamically sized set of goroutines to preemptively +// stage dials for later handoff to the DHT protocol for RPC. It identifies backpressure on both ends (dial consumers +// and dial producers), and takes compensating action by adjusting the worker pool. +// +// Why? Dialing is expensive. It's orders of magnitude slower than running an RPC on an already-established +// connection, as it requires establishing a TCP connection, multistream handshake, crypto handshake, mux handshake, +// and protocol negotiation. +// +// We start with config.minParallelism number of workers, and scale up and down based on demand and supply of +// dialled peers. +// +// The following events trigger scaling: +// - we scale up when we can't immediately return a successful dial to a new consumer. +// - we scale down when we've been idle for a while waiting for new dial attempts. +// - we scale down when we complete a dial and realise nobody was waiting for it. +// +// Dialler throttling (e.g. FD limit exceeded) is a concern, as we can easily spin up more workers to compensate, and +// end up adding fuel to the fire. Since we have no deterministic way to detect this for now, we hard-limit concurrency +// to config.maxParallelism. +func newDialQueue(params *dqParams) (*dialQueue, error) { + dq := &dialQueue{ + dqParams: params, + nWorkers: params.config.minParallelism, + out: queue.NewChanQueue(params.ctx, queue.NewXORDistancePQ(params.target)), + growCh: make(chan struct{}, 1), + shrinkCh: make(chan struct{}, 1), + waitingCh: make(chan waitingCh), + dieCh: make(chan struct{}, params.config.maxParallelism), + } + + for i := 0; i < int(params.config.minParallelism); i++ { + go dq.worker() + } + go dq.control() + return dq, nil +} + +func (dq *dialQueue) control() { + var ( + dialled <-chan peer.ID + waiting []waitingCh + lastScalingEvt = time.Now() + ) + + defer func() { + for _, w := range waiting { + close(w.ch) + } + waiting = nil + }() + + for { + // First process any backlog of dial jobs and waiters -- making progress is the priority. + // This block is copied below; couldn't find a more concise way of doing this. + select { + case <-dq.ctx.Done(): + return + case w := <-dq.waitingCh: + waiting = append(waiting, w) + dialled = dq.out.DeqChan + continue // onto the top. + case p, ok := <-dialled: + if !ok { + return // we're done if the ChanQueue is closed, which happens when the context is closed. + } + w := waiting[0] + logger.Debugf("delivering dialled peer to DHT; took %dms.", time.Since(w.ts)/time.Millisecond) + w.ch <- p + close(w.ch) + waiting = waiting[1:] + if len(waiting) == 0 { + // no more waiters, so stop consuming dialled jobs. + dialled = nil + } + continue // onto the top. + default: + // there's nothing to process, so proceed onto the main select block. + } + + select { + case <-dq.ctx.Done(): + return + case w := <-dq.waitingCh: + waiting = append(waiting, w) + dialled = dq.out.DeqChan + case p, ok := <-dialled: + if !ok { + return // we're done if the ChanQueue is closed, which happens when the context is closed. + } + w := waiting[0] + logger.Debugf("delivering dialled peer to DHT; took %dms.", time.Since(w.ts)/time.Millisecond) + w.ch <- p + close(w.ch) + waiting = waiting[1:] + if len(waiting) == 0 { + // no more waiters, so stop consuming dialled jobs. + dialled = nil + } + case <-dq.growCh: + if time.Since(lastScalingEvt) < dq.config.mutePeriod { + continue + } + dq.grow() + lastScalingEvt = time.Now() + case <-dq.shrinkCh: + if time.Since(lastScalingEvt) < dq.config.mutePeriod { + continue + } + dq.shrink() + lastScalingEvt = time.Now() + } + } +} + +func (dq *dialQueue) Consume() <-chan peer.ID { + ch := make(chan peer.ID, 1) + + select { + case p, ok := <-dq.out.DeqChan: + // short circuit and return a dialled peer if it's immediately available, or abort if DeqChan is closed. + if ok { + ch <- p + } + close(ch) + return ch + case <-dq.ctx.Done(): + // return a closed channel with no value if we're done. + close(ch) + return ch + default: + } + + // we have no finished dials to return, trigger a scale up. + select { + case dq.growCh <- struct{}{}: + default: + } + + // park the channel until a dialled peer becomes available. + select { + case dq.waitingCh <- waitingCh{ch, time.Now()}: + // all good + case <-dq.ctx.Done(): + // return a closed channel with no value if we're done. + close(ch) + } + return ch +} + +func (dq *dialQueue) grow() { + // no mutex needed as this is only called from the (single-threaded) control loop. + defer func(prev uint) { + if prev == dq.nWorkers { + return + } + logger.Debugf("grew dial worker pool: %d => %d", prev, dq.nWorkers) + }(dq.nWorkers) + + if dq.nWorkers == dq.config.maxParallelism { + return + } + // choosing not to worry about uint wrapping beyond max value. + target := uint(math.Floor(float64(dq.nWorkers) * dq.config.scalingFactor)) + if target > dq.config.maxParallelism { + target = dq.config.maxParallelism + } + for ; dq.nWorkers < target; dq.nWorkers++ { + go dq.worker() + } +} + +func (dq *dialQueue) shrink() { + // no mutex needed as this is only called from the (single-threaded) control loop. + defer func(prev uint) { + if prev == dq.nWorkers { + return + } + logger.Debugf("shrunk dial worker pool: %d => %d", prev, dq.nWorkers) + }(dq.nWorkers) + + if dq.nWorkers == dq.config.minParallelism { + return + } + target := uint(math.Floor(float64(dq.nWorkers) / dq.config.scalingFactor)) + if target < dq.config.minParallelism { + target = dq.config.minParallelism + } + // send as many die signals as workers we have to prune. + for ; dq.nWorkers > target; dq.nWorkers-- { + select { + case dq.dieCh <- struct{}{}: + default: + logger.Debugf("too many die signals queued up.") + } + } +} + +func (dq *dialQueue) worker() { + // This idle timer tracks if the environment is slow. If we're waiting to long to acquire a peer to dial, + // it means that the DHT query is progressing slow and we should shrink the worker pool. + idleTimer := time.NewTimer(24 * time.Hour) // placeholder init value which will be overridden immediately. + for { + // trap exit signals first. + select { + case <-dq.ctx.Done(): + return + case <-dq.dieCh: + return + default: + } + + idleTimer.Stop() + select { + case <-idleTimer.C: + default: + } + idleTimer.Reset(dq.config.maxIdle) + + select { + case <-dq.dieCh: + return + case <-dq.ctx.Done(): + return + case <-idleTimer.C: + // no new dial requests during our idle period; time to scale down. + case p, ok := <-dq.in.DeqChan: + if !ok { + return + } + + t := time.Now() + if err := dq.dialFn(dq.ctx, p); err != nil { + logger.Debugf("discarding dialled peer because of error: %v", err) + continue + } + logger.Debugf("dialling %v took %dms (as observed by the dht subsystem).", p, time.Since(t)/time.Millisecond) + waiting := len(dq.waitingCh) + + // by the time we're done dialling, it's possible that the context is closed, in which case there will + // be nobody listening on dq.out.EnqChan and we could block forever. + select { + case dq.out.EnqChan <- p: + case <-dq.ctx.Done(): + return + } + if waiting > 0 { + // we have somebody to deliver this value to, so no need to shrink. + continue + } + } + + // scaling down; control only arrives here if the idle timer fires, or if there are no goroutines + // waiting for the value we just produced. + select { + case dq.shrinkCh <- struct{}{}: + default: + } + } +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/doc.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/doc.go new file mode 100644 index 0000000000..acbb181499 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/doc.go @@ -0,0 +1,3 @@ +// Package dht implements a distributed hash table that satisfies the ipfs routing +// interface. This DHT is modeled after kademlia with S/Kademlia modifications. +package dht diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.mod b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.mod new file mode 100644 index 0000000000..7273b5ae62 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.mod @@ -0,0 +1,68 @@ +module github.com/libp2p/go-libp2p-kad-dht + +require ( + github.com/coreos/go-semver v0.2.0 // indirect + github.com/fd/go-nat v1.0.0 // indirect + github.com/go-check/check v0.0.0-20180628173108-788fd7840127 // indirect + github.com/gogo/protobuf v1.2.1 + github.com/google/uuid v1.1.1 // indirect + github.com/hashicorp/golang-lru v0.5.1 + github.com/ipfs/go-cid v0.0.0-20190221041225-29a66d1820a3 + github.com/ipfs/go-datastore v0.0.0-20190207190025-057884927798 + github.com/ipfs/go-detect-race v0.0.0-20180212113132-5ea9f55c8a66 // indirect + github.com/ipfs/go-ipfs-util v0.0.0-20181102233336-05b6094b6fa9 + github.com/ipfs/go-log v0.0.0-20190218133459-8924f37936b0 + github.com/ipfs/go-todocounter v0.0.0-20161011214330-1e832b829506 + github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 + github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2 // indirect + github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 + github.com/kr/pretty v0.1.0 // indirect + github.com/libp2p/go-addr-util v0.0.0-20190226202102-c4f139148873 // indirect + github.com/libp2p/go-conn-security v0.0.0-20190226201940-b2fb4ac68c41 // indirect + github.com/libp2p/go-conn-security-multistream v0.0.0-20190226202109-104c8a4422af // indirect + github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853 // indirect + github.com/libp2p/go-libp2p v0.0.0-20190227195236-c4577c770392 + github.com/libp2p/go-libp2p-blankhost v0.0.0-20190226202150-19c1feb93864 // indirect + github.com/libp2p/go-libp2p-crypto v0.0.1 + github.com/libp2p/go-libp2p-host v0.0.0-20190226202054-2aa838333967 + github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190226202048-6a96ea29ac65 // indirect + github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6 // indirect + github.com/libp2p/go-libp2p-kbucket v0.0.0-20190226223454-719fa0d0a853 + github.com/libp2p/go-libp2p-loggables v0.0.0-20190226201908-4c6f06110532 // indirect + github.com/libp2p/go-libp2p-metrics v0.0.0-20190226174147-1f0f4db04727 // indirect + github.com/libp2p/go-libp2p-nat v0.0.0-20190226202135-df5e02c31d7d // indirect + github.com/libp2p/go-libp2p-net v0.0.0-20190226201932-e71fff5ba6e9 + github.com/libp2p/go-libp2p-netutil v0.0.0-20190226202143-009c7e418419 // indirect + github.com/libp2p/go-libp2p-peer v0.0.1 + github.com/libp2p/go-libp2p-peerstore v0.0.0-20190226201924-e2df3e49eabf + github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2 + github.com/libp2p/go-libp2p-record v0.0.0-20190226223446-0f29df9dd657 + github.com/libp2p/go-libp2p-routing v0.0.0-20190226202213-efb912a4c564 + github.com/libp2p/go-libp2p-secio v0.0.0-20190226201947-aa2813e066f6 // indirect + github.com/libp2p/go-libp2p-swarm v0.0.0-20190228072411-22f358a2d09a + github.com/libp2p/go-libp2p-transport v0.0.0-20190226201958-e8580c8a519d // indirect + github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190227195104-83703858bb46 // indirect + github.com/libp2p/go-maddr-filter v0.0.0-20190226202016-f2e84f9bcf48 // indirect + github.com/libp2p/go-mplex v0.0.0-20190227194811-070b6c36acd4 // indirect + github.com/libp2p/go-msgio v0.0.1 // indirect + github.com/libp2p/go-reuseport-transport v0.0.0-20190228145407-8a125a1f2dbb // indirect + github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad // indirect + github.com/libp2p/go-tcp-transport v0.0.0-20190227195113-80ec1b10b24c // indirect + github.com/libp2p/go-testutil v0.0.0-20190226202041-873eaa1a26ba + github.com/mr-tron/base58 v1.1.0 + github.com/multiformats/go-multiaddr v0.0.1 + github.com/multiformats/go-multiaddr-dns v0.0.2 + github.com/multiformats/go-multibase v0.0.1 // indirect + github.com/multiformats/go-multistream v0.0.1 + github.com/stretchr/testify v1.3.0 + github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f // indirect + github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible // indirect + github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible // indirect + github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible // indirect + github.com/whyrusleeping/mafmt v1.2.8 // indirect + github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect + github.com/whyrusleeping/yamux v1.1.5 // indirect +) diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.sum b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.sum new file mode 100644 index 0000000000..f28ff4ff09 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/go.sum @@ -0,0 +1,233 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32 h1:qkOC5Gd33k54tobS36cXdAzJbeHaduLtnLQQwNoIi78= +github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fd/go-nat v1.0.0 h1:DPyQ97sxA9ThrWYRPcWUz/z9TnpTIGRYODIQc/dy64M= +github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJu4ZbSc= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324 h1:PV190X5/DzQ/tbFFG5YpT5mH6q+cHlfgqI5JuRnH9oE= +github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= +github.com/ipfs/go-cid v0.0.0-20190221041225-29a66d1820a3 h1:hNrsKBFc5mAY2EdWkEWu0hNVBTjC3HOy2nZBl8sw6L0= +github.com/ipfs/go-cid v0.0.0-20190221041225-29a66d1820a3/go.mod h1:DEZAg7ik3SR8PY77P+hNaWtHtBirqeEgHbfmePL8WJA= +github.com/ipfs/go-datastore v0.0.0-20190207190025-057884927798 h1:kTn0HIWa7fIl2g8ybRcamXsG9nOCVPjmHvqjkL24Fs0= +github.com/ipfs/go-datastore v0.0.0-20190207190025-057884927798/go.mod h1:bYmHO9fuKO1Ca7dpdDBWQl0mndy5b0HFqSJjGlNYtzs= +github.com/ipfs/go-detect-race v0.0.0-20180212113132-5ea9f55c8a66 h1:XGZjkXaaHH0UvKHEz9BFeIe9zgxE5xTkcVuJT+jWh+o= +github.com/ipfs/go-detect-race v0.0.0-20180212113132-5ea9f55c8a66/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +github.com/ipfs/go-ipfs-util v0.0.0-20181102233336-05b6094b6fa9 h1:AaIcBcsosRFWsXnQjhjHXcN+rNiJZELZu1COxYpBr6A= +github.com/ipfs/go-ipfs-util v0.0.0-20181102233336-05b6094b6fa9/go.mod h1:bmXd4M1Sn0MFKptfxu9KuWvtHySyFMzkSd2rcT8Hw80= +github.com/ipfs/go-log v0.0.0-20190218133459-8924f37936b0 h1:30E08LxTUXMS5EZkxAFctBo2Zy3R+R4PO4agirw7Q/U= +github.com/ipfs/go-log v0.0.0-20190218133459-8924f37936b0/go.mod h1:AKYS9u+ECLT8t30brTaoVwu3f1FpGx6C0352oI1zQ0Q= +github.com/ipfs/go-todocounter v0.0.0-20161011214330-1e832b829506 h1:CMTP+27nBrAvFJtH5D/jXc9/c2ZDVaoBAyLYgY4aw8U= +github.com/ipfs/go-todocounter v0.0.0-20161011214330-1e832b829506/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= +github.com/jackpal/gateway v1.0.4 h1:LS5EHkLuQ6jzaHwULi0vL+JO0mU/n4yUtK8oUjHHOlM= +github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= +github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA= +github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec h1:DQqZhhDvrTrEQ3Qod5yfavcA064e53xlQ+xajiorXgM= +github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2 h1:vhC1OXXiT9R2pczegwz6moDvuRpggaroAXhPIseh57A= +github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/libp2p/go-addr-util v0.0.0-20190226202102-c4f139148873 h1:4wwPGbuccerKO4WZ0uZHHakdUB7ISY105DnXDb1oQDA= +github.com/libp2p/go-addr-util v0.0.0-20190226202102-c4f139148873/go.mod h1:doh2auL/Rkfq1xHxDrWJGHZ8yDojPerOZoPu9XVwRB8= +github.com/libp2p/go-buffer-pool v0.0.1 h1:9Rrn/H46cXjaA2HQ5Y8lyhOS1NhTkZ4yuEs2r3Eechg= +github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-conn-security v0.0.0-20190226201940-b2fb4ac68c41 h1:9mAB66HuUt8oS9GWLTAmV2o3Qvd9lZJMPUCsieuNPp0= +github.com/libp2p/go-conn-security v0.0.0-20190226201940-b2fb4ac68c41/go.mod h1:lIqm8x2wrAxlG+6CzJ3z4Nk5/F73zdjkS6RKbHSbaJ4= +github.com/libp2p/go-conn-security-multistream v0.0.0-20190226202109-104c8a4422af h1:xY38sddayxZAA6CWOFSrhK/syLiCd0u9ZzNCRM4jFi4= +github.com/libp2p/go-conn-security-multistream v0.0.0-20190226202109-104c8a4422af/go.mod h1:hBY3HYjGnK86P3pX3wgr9IAfe3A/vZB830LJAMi1g88= +github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853 h1:i/j3E8Pyf/qIMJ7vnQ/NYcb8fvrj/uZ6m13G1gP2e8A= +github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= +github.com/libp2p/go-libp2p v0.0.0-20190227195236-c4577c770392 h1:Mh44DwtlIbu1qOxFJhpZDhTmFPqjVHvAziOq1210Us8= +github.com/libp2p/go-libp2p v0.0.0-20190227195236-c4577c770392/go.mod h1:CyUlFa6Mw04PkmMg8gBIlHUl8j3TrEiA6oFiF4SgD8w= +github.com/libp2p/go-libp2p-blankhost v0.0.0-20190226202150-19c1feb93864 h1:Wb0eUXsHVSKpp/wlYZgf93jGe3zNOeHm8aH8IdOvfeU= +github.com/libp2p/go-libp2p-blankhost v0.0.0-20190226202150-19c1feb93864/go.mod h1:v1Lnlzn2DFfVeAk2O19BnVm/OaoRlFZwSyq015ZT11I= +github.com/libp2p/go-libp2p-crypto v0.0.1 h1:JNQd8CmoGTohO/akqrH16ewsqZpci2CbgYH/LmYl8gw= +github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= +github.com/libp2p/go-libp2p-host v0.0.0-20190226202054-2aa838333967 h1:arERhb/u8bUN55fZ7YrG7EzJoQbfSRccbZMATNOXF2E= +github.com/libp2p/go-libp2p-host v0.0.0-20190226202054-2aa838333967/go.mod h1:iAthoepYpyqzb89f4RmqzF9+ebsWPFBTvSedSlcWupg= +github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190226202048-6a96ea29ac65 h1:Z2k4gQ2S+iVqLNKHIsVrY1v7I2b16YwoH5zCOFcVKvM= +github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190226202048-6a96ea29ac65/go.mod h1:2LbTwxMveREcmkOWo/s6MM7xDvSZbW8J8kYDF4Mj648= +github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6 h1:TiljmHO1c0NEBUZ/gEjxRKBhMl2dLy9+WL8iKdbax00= +github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= +github.com/libp2p/go-libp2p-kbucket v0.0.0-20190226223454-719fa0d0a853 h1:CgQnm3CTtISw5KdfCixS3JYChw2vk9YP40ZKaumMqrs= +github.com/libp2p/go-libp2p-kbucket v0.0.0-20190226223454-719fa0d0a853/go.mod h1:MTtm31eal94QTxVOWYTDZ6G1YOJRN2G3ESQHbaPytLk= +github.com/libp2p/go-libp2p-loggables v0.0.0-20190226201908-4c6f06110532 h1:iLtlCD+2ZsJrtosh5CM0h2nqtgU5upMVR/KM/PyBGzs= +github.com/libp2p/go-libp2p-loggables v0.0.0-20190226201908-4c6f06110532/go.mod h1:jcP5HmpEBcQ2w5u9xhLkCv73GBPKz3weC/s6ZWhXn+k= +github.com/libp2p/go-libp2p-metrics v0.0.0-20190226174147-1f0f4db04727 h1:d+QubbWRbDzYvAf5B/xxXkQMJY8nojml2oQlVFkLPf4= +github.com/libp2p/go-libp2p-metrics v0.0.0-20190226174147-1f0f4db04727/go.mod h1:ko4lRyuvbgwwxD2TJvt2RHONahjJlkn6l7L/iEbJBf0= +github.com/libp2p/go-libp2p-nat v0.0.0-20190226202135-df5e02c31d7d h1:RZM2sdd4ckbauje1ZqQvCfEWK6onojLC9gU7tF+bgoM= +github.com/libp2p/go-libp2p-nat v0.0.0-20190226202135-df5e02c31d7d/go.mod h1:cA6+rN+EcOAzmSL3vQ53VxX/FfOL1WGeJUvZgqjm2eQ= +github.com/libp2p/go-libp2p-net v0.0.0-20190226201932-e71fff5ba6e9 h1:Rx1GOAyaeba8cISnhBpvU5Zlz9mzgFuqJdVXTTsQoA4= +github.com/libp2p/go-libp2p-net v0.0.0-20190226201932-e71fff5ba6e9/go.mod h1:8W6Wx3AZbTRTe8zSMLoAmT3mGyau+w6kGIRk+Z+MZ7Q= +github.com/libp2p/go-libp2p-netutil v0.0.0-20190226202143-009c7e418419 h1:4QsarZ1PrHKrb0V0J+qs+SuGmvGQAbwB2hr4eGJa6xs= +github.com/libp2p/go-libp2p-netutil v0.0.0-20190226202143-009c7e418419/go.mod h1:lpxjq1x/eUtPYAZAtnC7dKWjQeTuYIYz2ZIPNDDBj3g= +github.com/libp2p/go-libp2p-peer v0.0.1 h1:0qwAOljzYewINrU+Kndoc+1jAL7vzY/oY2Go4DCGfyY= +github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= +github.com/libp2p/go-libp2p-peerstore v0.0.0-20190226201924-e2df3e49eabf h1:wRYF6Rz+R2r1KHTcOfQG9Zc9qiVKtQ3v7LzbAlGwmZM= +github.com/libp2p/go-libp2p-peerstore v0.0.0-20190226201924-e2df3e49eabf/go.mod h1:lLfgn0N3z2t+ER57a88K7NTZjMO27ez5TyWSURd428E= +github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2 h1:ftsFA3rhuSWX7hNR1CalvmnCKhmncZG7Nyd79Ll6lh0= +github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= +github.com/libp2p/go-libp2p-record v0.0.0-20190226223446-0f29df9dd657 h1:lUWO9EUEmyMW8jV5ZchZfy/nZvv0EuJLGrotlbwsVxo= +github.com/libp2p/go-libp2p-record v0.0.0-20190226223446-0f29df9dd657/go.mod h1:fsxr7H89UzzL4pG23Aq2n/5aNAXxdGEbyBVepo8oXy8= +github.com/libp2p/go-libp2p-routing v0.0.0-20190226202213-efb912a4c564 h1:J/JUNkEXrVPAyJlEmMcIJcLEC2BX7Q8Uwm1vGSwnQw8= +github.com/libp2p/go-libp2p-routing v0.0.0-20190226202213-efb912a4c564/go.mod h1:Alff8O712wWiftX462zvknNmi5RmXtLq/gATcxJ/Hq8= +github.com/libp2p/go-libp2p-secio v0.0.0-20190226201947-aa2813e066f6 h1:a1vMNW2Z8bELA4Ul2DWX/vya/vIy6D6xRLqNNjK001k= +github.com/libp2p/go-libp2p-secio v0.0.0-20190226201947-aa2813e066f6/go.mod h1:U7wBlYK2sZbUiTaGe6xJd/fyNq40gwn+jBk/iEUbUrA= +github.com/libp2p/go-libp2p-swarm v0.0.0-20190228072411-22f358a2d09a h1:67vd6CrsT6GNBurNs/Ksg0CW/2Zzl/hqDVcTm2jeXXI= +github.com/libp2p/go-libp2p-swarm v0.0.0-20190228072411-22f358a2d09a/go.mod h1:NHa7cA4/y8OKFw3BHQjLL9pwPDFXkgECO/k+2gqSFuk= +github.com/libp2p/go-libp2p-transport v0.0.0-20190226201958-e8580c8a519d h1:ErBx9a936Bg6OXLfYn/XA4BzA0SnSZ/SKsFq9QPsj2M= +github.com/libp2p/go-libp2p-transport v0.0.0-20190226201958-e8580c8a519d/go.mod h1:lcwgOszllbhvQXul37Kv5YbSYXPoUhRB2Z+Nr3jaBmo= +github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190227195104-83703858bb46 h1:5p4nwJmknUU0eEyz9Ke4/khwnJ6XHJMTp8Q+W4tWlU0= +github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190227195104-83703858bb46/go.mod h1:5r+arPlxwtCEF1aVi/fTQF/ZWGSPHLxBov1DlXDevDA= +github.com/libp2p/go-maddr-filter v0.0.0-20190226202016-f2e84f9bcf48 h1:guJ19aIUZDkepcs6jaNvhsRDw/qDoc8I11kZ6NBPWyw= +github.com/libp2p/go-maddr-filter v0.0.0-20190226202016-f2e84f9bcf48/go.mod h1:9uHkmfw086BVLQyQFAbe/peEO9Iley6dafqm3cKHIAk= +github.com/libp2p/go-mplex v0.0.0-20190227194811-070b6c36acd4 h1:g2YzDqAPCdMmhOxOp9Ge2e7O+6g+m51O+yrmoW7Zr3k= +github.com/libp2p/go-mplex v0.0.0-20190227194811-070b6c36acd4/go.mod h1:00WmJEYVKH/Kz6wCom3VmxX7re6B/jgSZmkydBYAZ1w= +github.com/libp2p/go-msgio v0.0.1 h1:znj97n5FtXGCLDwe9x8jpHmY770SW4WStBGcCDh6GJw= +github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5 h1:EbC40Vr+0RQ/w+m1Oic9tgOd1DA7E+sbdzbkg5wLZ5I= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5/go.mod h1:ViUXkfLbcaqzYb7Yyi7ZP/n8nAezADhH9oLvj6TA83E= +github.com/libp2p/go-reuseport-transport v0.0.0-20190228145407-8a125a1f2dbb h1:PNAFb/l1NXCA1eCS4+ffWzS4t3Mlz4g7jQFIYjy/N3Y= +github.com/libp2p/go-reuseport-transport v0.0.0-20190228145407-8a125a1f2dbb/go.mod h1:mw+zSzEB6taNDI4zi7wFlXgzdxtQWEir6ZcomJ3VdoE= +github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad h1:xa7wIqxmSF1a7q1drCXFrFeaL0Gd1TG2bJUj6Vlmh1M= +github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= +github.com/libp2p/go-tcp-transport v0.0.0-20190227195113-80ec1b10b24c h1:wKGxYkqxocYXdl8R/CM4rrv9UMOY1U/V1O9hWg13LWQ= +github.com/libp2p/go-tcp-transport v0.0.0-20190227195113-80ec1b10b24c/go.mod h1:K6Zi9TkPvn5m/m0bktlJ6Fv9Vna2wvr/jiCtTRC7T8o= +github.com/libp2p/go-testutil v0.0.0-20190226202041-873eaa1a26ba h1:IxUJRyKDh3qEm3qwBQ8IA30EG4ChyR2Sgek2ZcaIqMs= +github.com/libp2p/go-testutil v0.0.0-20190226202041-873eaa1a26ba/go.mod h1:8FHCRBHdt9BibhKebrOqVTJyW4cOZc52bfrGmw7ja+4= +github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XCFOweFD3BNESdnO8ewyYTFT2R+/b8FQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= +github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-multiaddr v0.0.1 h1:/QUV3VBMDI6pi6xfiw7lr6xhDWWvQKn9udPn68kLSdY= +github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= +github.com/multiformats/go-multiaddr-dns v0.0.2 h1:/Bbsgsy3R6e3jf2qBahzNHzww6usYaZ0NhNH3sqdFS8= +github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= +github.com/multiformats/go-multiaddr-net v0.0.1 h1:76O59E3FavvHqNg7jvzWzsPSW5JSi/ek0E4eiDVbg9g= +github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= +github.com/multiformats/go-multibase v0.0.1 h1:PN9/v21eLywrFWdFNsFKaU04kLJzuYzmrJR+ubhT9qA= +github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +github.com/multiformats/go-multistream v0.0.1 h1:JV4VfSdY9n7ECTtY59/TlSyFCzRILvYx4T4Ws8ZgihU= +github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f h1:M/lL30eFZTKnomXY6huvM6G0+gVquFNf6mxghaWlFUg= +github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= +github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible h1:iqksILj8STw03EJQe7Laj4ubnw+ojOyik18cd5vPL1o= +github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDbeKFZInPUrAG+bjuJmUXONGdEFW7XL0SpTY1y4= +github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible h1:BdYHctE9HJZLquG9tpTdwWcbG4FaX6tVKPGjCGgiVxo= +github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ= +github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible h1:IGm/UP/JpEFS6D787sZnZg7RA6fZIR9c/Ms9DeAVNuk= +github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= +github.com/whyrusleeping/mafmt v1.2.8 h1:TCghSl5kkwEE0j+sU/gudyhVMRlpBin8fMBBHg59EbA= +github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= +github.com/whyrusleeping/yamux v1.1.5 h1:4CK3aUUJQu0qpKZv5gEWJjNOQtdbdDhVVS6PJ+HimdE= +github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4to18W7R7imwAI/sWS9S8Q= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b h1:+/WWzjwW6gidDJnMKWLKLX1gxn7irUTF1fLpQovfQ5M= +golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190227160552-c95aed5357e7 h1:C2F/nMkR/9sfUTpvR3QrjBuTdvMUC/cFajkphs1YLQo= +golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d h1:Z0Ahzd7HltpJtjAHHxX8QFP3j1yYgiuvjbjRzDj/KH0= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/handlers.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/handlers.go new file mode 100644 index 0000000000..d5592c7449 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/handlers.go @@ -0,0 +1,391 @@ +package dht + +import ( + "bytes" + "context" + "errors" + "fmt" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + ob "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob" + pb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + recpb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +// The number of closer peers to send on requests. +var CloserPeerCount = KValue + +// dhthandler specifies the signature of functions that handle DHT messages. +type dhtHandler func(context.Context, peer.ID, *pb.Message) (*pb.Message, error) + +func (dht *IpfsDHT) handlerForMsgType(t pb.Message_MessageType) dhtHandler { + switch t { + case pb.Message_GET_VALUE: + return dht.handleGetValue + case pb.Message_PUT_VALUE: + return dht.handlePutValue + case pb.Message_FIND_NODE: + return dht.handleFindPeer + case pb.Message_ADD_PROVIDER: + return dht.handleAddProvider + case pb.Message_GET_PROVIDERS: + return dht.handleGetProviders + case pb.Message_PING: + return dht.handlePing + default: + return nil + } +} + +func (dht *IpfsDHT) handleGetValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { + ctx = logger.Start(ctx, "handleGetValue") + logger.SetTag(ctx, "peer", p) + defer func() { logger.FinishWithErr(ctx, err) }() + logger.Debugf("%s handleGetValue for key: %s", dht.self, pmes.GetKey()) + + // setup response + resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) + + // first, is there even a key? + k := pmes.GetKey() + if len(k) == 0 { + return nil, errors.New("handleGetValue but no key was provided") + // TODO: send back an error response? could be bad, but the other node's hanging. + } + + rec, err := dht.checkLocalDatastore(k) + if err != nil { + return nil, err + } + resp.Record = rec + + // Find closest peer on given cluster to desired key and reply with that info + closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) + if len(closer) > 0 { + closerinfos := pstore.PeerInfos(dht.peerstore, closer) + for _, pi := range closerinfos { + logger.Debugf("handleGetValue returning closer peer: '%s'", pi.ID) + if len(pi.Addrs) < 1 { + logger.Warningf(`no addresses on peer being sent! + [local:%s] + [sending:%s] + [remote:%s]`, dht.self, pi.ID, p) + } + } + + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), closerinfos) + } + + return resp, nil +} + +func (dht *IpfsDHT) checkLocalDatastore(k []byte) (*recpb.Record, error) { + logger.Debugf("%s handleGetValue looking into ds", dht.self) + dskey := convertToDsKey(k) + buf, err := dht.datastore.Get(dskey) + logger.Debugf("%s handleGetValue looking into ds GOT %v", dht.self, buf) + + if err == ds.ErrNotFound { + return nil, nil + } + + // if we got an unexpected error, bail. + if err != nil { + return nil, err + } + + // if we have the value, send it back + logger.Debugf("%s handleGetValue success!", dht.self) + + rec := new(recpb.Record) + err = proto.Unmarshal(buf, rec) + if err != nil { + logger.Debug("failed to unmarshal DHT record from datastore") + return nil, err + } + + var recordIsBad bool + recvtime, err := u.ParseRFC3339(rec.GetTimeReceived()) + if err != nil { + logger.Info("either no receive time set on record, or it was invalid: ", err) + recordIsBad = true + } + + if time.Now().Sub(recvtime) > MaxRecordAge { + logger.Debug("old record found, tossing.") + recordIsBad = true + } + + // NOTE: We do not verify the record here beyond checking these timestamps. + // we put the burden of checking the records on the requester as checking a record + // may be computationally expensive + + if recordIsBad { + err := dht.datastore.Delete(dskey) + if err != nil { + logger.Error("Failed to delete bad record from datastore: ", err) + } + + return nil, nil // can treat this as not having the record at all + } + + return rec, nil +} + +// Cleans the record (to avoid storing arbitrary data). +func cleanRecord(rec *recpb.Record) { + rec.TimeReceived = "" +} + +// Store a value in this peer local storage +func (dht *IpfsDHT) handlePutValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { + ctx = logger.Start(ctx, "handlePutValue") + logger.SetTag(ctx, "peer", p) + defer func() { logger.FinishWithErr(ctx, err) }() + + rec := pmes.GetRecord() + if rec == nil { + logger.Infof("Got nil record from: %s", p.Pretty()) + return nil, errors.New("nil record") + } + + if !bytes.Equal(pmes.GetKey(), rec.GetKey()) { + return nil, errors.New("put key doesn't match record key") + } + + cleanRecord(rec) + + // Make sure the record is valid (not expired, valid signature etc) + if err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()); err != nil { + logger.Warningf("Bad dht record in PUT from: %s. %s", p.Pretty(), err) + return nil, err + } + + dskey := convertToDsKey(rec.GetKey()) + + // Make sure the new record is "better" than the record we have locally. + // This prevents a record with for example a lower sequence number from + // overwriting a record with a higher sequence number. + existing, err := dht.getRecordFromDatastore(dskey) + if err != nil { + return nil, err + } + + if existing != nil { + recs := [][]byte{rec.GetValue(), existing.GetValue()} + i, err := dht.Validator.Select(string(rec.GetKey()), recs) + if err != nil { + logger.Warningf("Bad dht record in PUT from %s: %s", p.Pretty(), err) + return nil, err + } + if i != 0 { + logger.Infof("DHT record in PUT from %s is older than existing record. Ignoring", p.Pretty()) + return nil, errors.New("old record") + } + } + + // record the time we receive every record + rec.TimeReceived = u.FormatRFC3339(time.Now()) + + data, err := proto.Marshal(rec) + if err != nil { + return nil, err + } + + err = dht.datastore.Put(dskey, data) + logger.Debugf("%s handlePutValue %v", dht.self, dskey) + return pmes, err +} + +// returns nil, nil when either nothing is found or the value found doesn't properly validate. +// returns nil, some_error when there's a *datastore* error (i.e., something goes very wrong) +func (dht *IpfsDHT) getRecordFromDatastore(dskey ds.Key) (*recpb.Record, error) { + buf, err := dht.datastore.Get(dskey) + if err == ds.ErrNotFound { + return nil, nil + } + if err != nil { + logger.Errorf("Got error retrieving record with key %s from datastore: %s", dskey, err) + return nil, err + } + rec := new(recpb.Record) + err = proto.Unmarshal(buf, rec) + if err != nil { + // Bad data in datastore, log it but don't return an error, we'll just overwrite it + logger.Errorf("Bad record data stored in datastore with key %s: could not unmarshal record", dskey) + return nil, nil + } + + err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()) + if err != nil { + // Invalid record in datastore, probably expired but don't return an error, + // we'll just overwrite it + logger.Debugf("Local record verify failed: %s (discarded)", err) + return nil, nil + } + + return rec, nil +} + +func (dht *IpfsDHT) handlePing(_ context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { + logger.Debugf("%s Responding to ping from %s!\n", dht.self, p) + return pmes, nil +} + +func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleFindPeer") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + resp := pb.NewMessage(pmes.GetType(), nil, pmes.GetClusterLevel()) + var closest []peer.ID + + // if looking for self... special case where we send it on CloserPeers. + targetPid := peer.ID(pmes.GetKey()) + if targetPid == dht.self { + closest = []peer.ID{dht.self} + } else { + closest = dht.betterPeersToQuery(pmes, p, CloserPeerCount) + + // Never tell a peer about itself. + if targetPid != p { + // If we're connected to the target peer, report their + // peer info. This makes FindPeer work even if the + // target peer isn't in our routing table. + // + // Alternatively, we could just check our peerstore. + // However, we don't want to return out of date + // information. We can change this in the future when we + // add a progressive, asynchronous `SearchPeer` function + // and improve peer routing in the host. + switch dht.host.Network().Connectedness(targetPid) { + case inet.Connected, inet.CanConnect: + closest = append(closest, targetPid) + } + } + } + + if closest == nil { + logger.Infof("%s handleFindPeer %s: could not find anything.", dht.self, p) + return resp, nil + } + + closestinfos := pstore.PeerInfos(dht.peerstore, closest) + // possibly an over-allocation but this array is temporary anyways. + withAddresses := make([]pstore.PeerInfo, 0, len(closestinfos)) + for _, pi := range closestinfos { + if len(pi.Addrs) > 0 { + withAddresses = append(withAddresses, pi) + } + } + + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), withAddresses) + return resp, nil +} + +func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleGetProviders") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + + resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) + c, err := cid.Cast([]byte(pmes.GetKey())) + if err != nil { + return nil, err + } + logger.SetTag(ctx, "key", c) + + // debug logging niceness. + reqDesc := fmt.Sprintf("%s handleGetProviders(%s, %s): ", dht.self, p, c) + logger.Debugf("%s begin", reqDesc) + defer logger.Debugf("%s end", reqDesc) + + // check if we have this value, to add ourselves as provider. + has, err := dht.datastore.Has(convertToDsKey(c.Bytes())) + if err != nil && err != ds.ErrNotFound { + logger.Debugf("unexpected datastore error: %v\n", err) + has = false + } + + // setup providers + providers := dht.providers.GetProviders(ctx, c) + if has { + providers = append(providers, dht.self) + logger.Debugf("%s have the value. added self as provider", reqDesc) + } + + if providers != nil && len(providers) > 0 { + infos := pstore.PeerInfos(dht.peerstore, providers) + resp.ProviderPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) + logger.Debugf("%s have %d providers: %s", reqDesc, len(providers), infos) + } + + // Also send closer peers. + closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) + if closer != nil { + infos := pstore.PeerInfos(dht.peerstore, closer) + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) + logger.Debugf("%s have %d closer peers: %s", reqDesc, len(closer), infos) + } + + return resp, nil +} + +func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleAddProvider") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + + c, err := cid.Cast([]byte(pmes.GetKey())) + if err != nil { + return nil, err + } + logger.SetTag(ctx, "key", c) + + logger.Debugf("%s adding %s as a provider for '%s'\n", dht.self, p, c) + + // add provider should use the address given in the message + pinfos := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) + for _, pi := range pinfos { + // OpenBazaar: there was a line here that checks to make sure the peerID equals the provider ID and + // returns an error if it does not. This line has been removed since we want to be able to store + // our `pointers` in the DHT as a provider which does not have an ID matching the peerID. + + if len(pi.Addrs) < 1 { + logger.Debugf("%s got no valid addresses for provider %s. Ignore.", dht.self, p) + continue + } + + // OpenBazaar: if this is a pointer we want to use the PointerAddrTTL instead of the normal + // ProviderAddrTTL. + ttl := pstore.ProviderAddrTTL + if ob.IsPointer(pi.ID) { + ttl = ob.PointerAddrTTL + } + + logger.Debugf("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) + + if pi.ID != dht.self { // don't add own addrs. + // add the received addresses to our peerstore. + // OpenBazaar: make sure to use `ttl` as a parameter here. + dht.peerstore.AddAddrs(pi.ID, pi.Addrs, ttl) + } + // OpenBazaar: the line below originally used p instead of pi.ID as the peerID. For normal providers + // this would be the same value and it doesn't matter which one is used. But for our `pointers` p is + // not the value we want to add, but rather pi.ID. So we substitute pi.ID here. + dht.providers.AddProvider(ctx, c, pi.ID) + } + + return nil, nil +} + +func convertToDsKey(s []byte) ds.Key { + return ds.NewKey(base32.RawStdEncoding.EncodeToString(s)) +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/lookup.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/lookup.go new file mode 100644 index 0000000000..bc02a43aed --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/lookup.go @@ -0,0 +1,114 @@ +package dht + +import ( + "context" + "fmt" + "strings" + + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + pb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +func tryFormatLoggableKey(k string) (string, error) { + if len(k) == 0 { + return "", fmt.Errorf("loggableKey is empty") + } + var proto, cstr string + if k[0] == '/' { + // it's a path (probably) + protoEnd := strings.IndexByte(k[1:], '/') + if protoEnd < 0 { + return k, fmt.Errorf("loggableKey starts with '/' but is not a path: %x", k) + } + proto = k[1 : protoEnd+1] + cstr = k[protoEnd+2:] + } else { + proto = "provider" + cstr = k + } + + c, err := cid.Cast([]byte(cstr)) + if err != nil { + return "", fmt.Errorf("loggableKey could not cast key to a CID: %x %v", k, err) + } + return fmt.Sprintf("/%s/%s", proto, c.String()), nil +} + +func loggableKey(k string) logging.LoggableMap { + newKey, err := tryFormatLoggableKey(k) + if err != nil { + logger.Debug(err) + } else { + k = newKey + } + + return logging.LoggableMap{ + "key": k, + } +} + +// Kademlia 'node lookup' operation. Returns a channel of the K closest peers +// to the given key +func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error) { + e := logger.EventBegin(ctx, "getClosestPeers", loggableKey(key)) + tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) + if len(tablepeers) == 0 { + return nil, kb.ErrLookupFailure + } + + out := make(chan peer.ID, KValue) + + // since the query doesnt actually pass our context down + // we have to hack this here. whyrusleeping isnt a huge fan of goprocess + parent := ctx + query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + // For DHT query command + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + pmes, err := dht.findPeerSingle(ctx, p, peer.ID(key)) + if err != nil { + logger.Debugf("error getting closer peers: %s", err) + return nil, err + } + peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) + + // For DHT query command + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: peers, + }) + + return &dhtQueryResult{closerPeers: peers}, nil + }) + + go func() { + defer close(out) + defer e.Done() + // run it! + res, err := query.Run(ctx, tablepeers) + if err != nil { + logger.Debugf("closestPeers query run error: %s", err) + } + + if res != nil && res.queriedSet != nil { + sorted := kb.SortClosestPeers(res.queriedSet.Peers(), kb.ConvertKey(key)) + if len(sorted) > KValue { + sorted = sorted[:KValue] + } + + for _, p := range sorted { + out <- p + } + } + }() + + return out, nil +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_posix.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_posix.go new file mode 100644 index 0000000000..11ad5583f3 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_posix.go @@ -0,0 +1,12 @@ +// +build !windows + +package dht + +import "syscall" + +func curFileLimit() uint64 { + var n syscall.Rlimit + syscall.Getrlimit(syscall.RLIMIT_NOFILE, &n) + // cast because some platforms use int64 (e.g., freebsd) + return uint64(n.Cur) +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_windows.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_windows.go new file mode 100644 index 0000000000..888aec0c75 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/nofile_test_windows.go @@ -0,0 +1,5 @@ +package dht + +func curFileLimit() uint64 { + return 16 * 1024 * 1024 +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/notif.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/notif.go new file mode 100644 index 0000000000..5791333453 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/notif.go @@ -0,0 +1,116 @@ +package dht + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + mstream "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" +) + +// netNotifiee defines methods to be used with the IpfsDHT +type netNotifiee IpfsDHT + +func (nn *netNotifiee) DHT() *IpfsDHT { + return (*IpfsDHT)(nn) +} + +func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) { + dht := nn.DHT() + select { + case <-dht.Process().Closing(): + return + default: + } + + p := v.RemotePeer() + protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) + if err == nil && len(protos) != 0 { + // We lock here for consistency with the lock in testConnection. + // This probably isn't necessary because (dis)connect + // notifications are serialized but it's nice to be consistent. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + dht.Update(dht.Context(), p) + } + return + } + + // Note: Unfortunately, the peerstore may not yet know that this peer is + // a DHT server. So, if it didn't return a positive response above, test + // manually. + go nn.testConnection(v) +} + +func (nn *netNotifiee) testConnection(v inet.Conn) { + dht := nn.DHT() + p := v.RemotePeer() + + // Forcibly use *this* connection. Otherwise, if we have two connections, we could: + // 1. Test it twice. + // 2. Have it closed from under us leaving the second (open) connection untested. + s, err := v.NewStream() + if err != nil { + // Connection error + return + } + defer inet.FullClose(s) + + selected, err := mstream.SelectOneOf(dht.protocolStrs(), s) + if err != nil { + // Doesn't support the protocol + return + } + // Remember this choice (makes subsequent negotiations faster) + dht.peerstore.AddProtocols(p, selected) + + // We lock here as we race with disconnect. If we didn't lock, we could + // finish processing a connect after handling the associated disconnect + // event and add the peer to the routing table after removing it. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + dht.Update(dht.Context(), p) + } +} + +func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) { + dht := nn.DHT() + select { + case <-dht.Process().Closing(): + return + default: + } + + p := v.RemotePeer() + + // Lock and check to see if we're still connected. We lock to make sure + // we don't concurrently process a connect event. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + // We're still connected. + return + } + + dht.routingTable.Remove(p) + + dht.smlk.Lock() + defer dht.smlk.Unlock() + ms, ok := dht.strmap[p] + if !ok { + return + } + delete(dht.strmap, p) + + // Do this asynchronously as ms.lk can block for a while. + go func() { + ms.lk.Lock() + defer ms.lk.Unlock() + ms.invalidate() + }() +} + +func (nn *netNotifiee) OpenedStream(n inet.Network, v inet.Stream) {} +func (nn *netNotifiee) ClosedStream(n inet.Network, v inet.Stream) {} +func (nn *netNotifiee) Listen(n inet.Network, a ma.Multiaddr) {} +func (nn *netNotifiee) ListenClose(n inet.Network, a ma.Multiaddr) {} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob/common.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob/common.go new file mode 100644 index 0000000000..2d53c10a71 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob/common.go @@ -0,0 +1,31 @@ +package ob + +import ( + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "time" +) + +/* +This package is a few small utilities used by OpenBazaar to modify the DHT. +DHT modifications are recorded in the comments here. +*/ + +// OpenBazaar: PointerAddrTTL is used by handlers.handleAddProvider to specify the time +// to hold on to the pointer addr +var PointerAddrTTL = time.Hour * 24 * 7 + +// OpenBazaar: Normal IPFS providers should drop out of the DHT after 24 hours as +// defined by ProvideValidity above. However, `pointers`, which are special providers +// used by the offline message system, should stick around for one week. +var PointerValidity = time.Hour * 24 * 7 + +// OpenBazaar: `Pointers`, which are special providers used by the OpenBazaar messaging system, +// are prefixed with this string. +const MagicProviderID string = "000000000000000000000000" + +// OpenBazaar: IsPointer is used to check if a peer ID inside a provider object should be interpreted as a pointer +// This is used in handlers.handleAddProvider and ProviderManager.run() +func IsPointer(id peer.ID) bool { + hexID := peer.IDHexEncode(id) + return hexID[4:28] == MagicProviderID +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts/options.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts/options.go new file mode 100644 index 0000000000..7032c89df2 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/opts/options.go @@ -0,0 +1,105 @@ +package dhtopts + +import ( + "fmt" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dssync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" +) + +// OpenBazaar: the protocol IDs are changed here to segrate the DHT from the IPFS DHT. +var ProtocolDHT protocol.ID = "/openbazaar/kad/1.0.0" +var ProtocolDHTOld protocol.ID = "/openbazaar/dht" +var DefaultProtocols = []protocol.ID{ProtocolDHT, ProtocolDHTOld} + +// Options is a structure containing all the options that can be used when constructing a DHT. +type Options struct { + Datastore ds.Batching + Validator record.Validator + Client bool + Protocols []protocol.ID +} + +// Apply applies the given options to this Option +func (o *Options) Apply(opts ...Option) error { + for i, opt := range opts { + if err := opt(o); err != nil { + return fmt.Errorf("dht option %d failed: %s", i, err) + } + } + return nil +} + +// Option DHT option type. +type Option func(*Options) error + +// Defaults are the default DHT options. This option will be automatically +// prepended to any options you pass to the DHT constructor. +var Defaults = func(o *Options) error { + o.Validator = record.NamespacedValidator{ + "pk": record.PublicKeyValidator{}, + } + o.Datastore = dssync.MutexWrap(ds.NewMapDatastore()) + o.Protocols = DefaultProtocols + return nil +} + +// Datastore configures the DHT to use the specified datastore. +// +// Defaults to an in-memory (temporary) map. +func Datastore(ds ds.Batching) Option { + return func(o *Options) error { + o.Datastore = ds + return nil + } +} + +// Client configures whether or not the DHT operates in client-only mode. +// +// Defaults to false. +func Client(only bool) Option { + return func(o *Options) error { + o.Client = only + return nil + } +} + +// Validator configures the DHT to use the specified validator. +// +// Defaults to a namespaced validator that can only validate public keys. +func Validator(v record.Validator) Option { + return func(o *Options) error { + o.Validator = v + return nil + } +} + +// NamespacedValidator adds a validator namespaced under `ns`. This option fails +// if the DHT is not using a `record.NamespacedValidator` as it's validator (it +// uses one by default but this can be overridden with the `Validator` option). +// +// Example: Given a validator registered as `NamespacedValidator("ipns", +// myValidator)`, all records with keys starting with `/ipns/` will be validated +// with `myValidator`. +func NamespacedValidator(ns string, v record.Validator) Option { + return func(o *Options) error { + nsval, ok := o.Validator.(record.NamespacedValidator) + if !ok { + return fmt.Errorf("can only add namespaced validators to a NamespacedValidator") + } + nsval[ns] = v + return nil + } +} + +// Protocols sets the protocols for the DHT +// +// Defaults to dht.DefaultProtocols +func Protocols(protocols ...protocol.ID) Option { + return func(o *Options) error { + o.Protocols = protocols + return nil + } +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/package.json b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/package.json new file mode 100644 index 0000000000..7afa4e1938 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/package.json @@ -0,0 +1,177 @@ +{ + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-kad-dht" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-kad-dht", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "jbenet", + "hash": "QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W", + "name": "go-context", + "version": "1.0.0" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "hashicorp", + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", + "name": "base32", + "version": "0.0.2" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", + "name": "go-libp2p-record", + "version": "4.1.15" + }, + { + "author": "whyrusleeping", + "hash": "QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M", + "name": "go-libp2p-kbucket", + "version": "2.2.23" + }, + { + "author": "whyrusleeping", + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "whyrusleeping", + "hash": "QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq", + "name": "go-todocounter", + "version": "1.0.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", + "name": "go-libp2p-loggables", + "version": "1.1.33" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "mr-tron", + "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", + "name": "go-base58-fast", + "version": "0.1.1" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "magik6k", + "hash": "QmPVkJMTeRC6iBByPWdrRkD3BE5UXsj5HPzb4kPqL186mS", + "name": "testify", + "version": "1.0.0" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-kad-dht", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.0.2" +} + diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/Makefile b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/Makefile rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/Makefile diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/dht.pb.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/dht.pb.go new file mode 100644 index 0000000000..2f9c0491e0 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/dht.pb.go @@ -0,0 +1,975 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: dht.proto + +package dht_pb + +import ( + fmt "fmt" + pb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Message_MessageType int32 + +const ( + Message_PUT_VALUE Message_MessageType = 0 + Message_GET_VALUE Message_MessageType = 1 + Message_ADD_PROVIDER Message_MessageType = 2 + Message_GET_PROVIDERS Message_MessageType = 3 + Message_FIND_NODE Message_MessageType = 4 + Message_PING Message_MessageType = 5 +) + +var Message_MessageType_name = map[int32]string{ + 0: "PUT_VALUE", + 1: "GET_VALUE", + 2: "ADD_PROVIDER", + 3: "GET_PROVIDERS", + 4: "FIND_NODE", + 5: "PING", +} + +var Message_MessageType_value = map[string]int32{ + "PUT_VALUE": 0, + "GET_VALUE": 1, + "ADD_PROVIDER": 2, + "GET_PROVIDERS": 3, + "FIND_NODE": 4, + "PING": 5, +} + +func (x Message_MessageType) String() string { + return proto.EnumName(Message_MessageType_name, int32(x)) +} + +func (Message_MessageType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 0} +} + +type Message_ConnectionType int32 + +const ( + // sender does not have a connection to peer, and no extra information (default) + Message_NOT_CONNECTED Message_ConnectionType = 0 + // sender has a live connection to peer + Message_CONNECTED Message_ConnectionType = 1 + // sender recently connected to peer + Message_CAN_CONNECT Message_ConnectionType = 2 + // sender recently tried to connect to peer repeatedly but failed to connect + // ("try" here is loose, but this should signal "made strong effort, failed") + Message_CANNOT_CONNECT Message_ConnectionType = 3 +) + +var Message_ConnectionType_name = map[int32]string{ + 0: "NOT_CONNECTED", + 1: "CONNECTED", + 2: "CAN_CONNECT", + 3: "CANNOT_CONNECT", +} + +var Message_ConnectionType_value = map[string]int32{ + "NOT_CONNECTED": 0, + "CONNECTED": 1, + "CAN_CONNECT": 2, + "CANNOT_CONNECT": 3, +} + +func (x Message_ConnectionType) String() string { + return proto.EnumName(Message_ConnectionType_name, int32(x)) +} + +func (Message_ConnectionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 1} +} + +type Message struct { + // defines what type of message it is. + Type Message_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=dht.pb.Message_MessageType" json:"type,omitempty"` + // defines what coral cluster level this query/response belongs to. + // in case we want to implement coral's cluster rings in the future. + ClusterLevelRaw int32 `protobuf:"varint,10,opt,name=clusterLevelRaw,proto3" json:"clusterLevelRaw,omitempty"` + // Used to specify the key associated with this message. + // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Used to return a value + // PUT_VALUE, GET_VALUE + Record *pb.Record `protobuf:"bytes,3,opt,name=record,proto3" json:"record,omitempty"` + // Used to return peers closer to a key in a query + // GET_VALUE, GET_PROVIDERS, FIND_NODE + CloserPeers []*Message_Peer `protobuf:"bytes,8,rep,name=closerPeers,proto3" json:"closerPeers,omitempty"` + // Used to return Providers + // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS + ProviderPeers []*Message_Peer `protobuf:"bytes,9,rep,name=providerPeers,proto3" json:"providerPeers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetType() Message_MessageType { + if m != nil { + return m.Type + } + return Message_PUT_VALUE +} + +func (m *Message) GetClusterLevelRaw() int32 { + if m != nil { + return m.ClusterLevelRaw + } + return 0 +} + +func (m *Message) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *Message) GetRecord() *pb.Record { + if m != nil { + return m.Record + } + return nil +} + +func (m *Message) GetCloserPeers() []*Message_Peer { + if m != nil { + return m.CloserPeers + } + return nil +} + +func (m *Message) GetProviderPeers() []*Message_Peer { + if m != nil { + return m.ProviderPeers + } + return nil +} + +type Message_Peer struct { + // ID of a given peer. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // multiaddrs for a given peer + Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"` + // used to signal the sender's connection capabilities to the peer + Connection Message_ConnectionType `protobuf:"varint,3,opt,name=connection,proto3,enum=dht.pb.Message_ConnectionType" json:"connection,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message_Peer) Reset() { *m = Message_Peer{} } +func (m *Message_Peer) String() string { return proto.CompactTextString(m) } +func (*Message_Peer) ProtoMessage() {} +func (*Message_Peer) Descriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 0} +} +func (m *Message_Peer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message_Peer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message_Peer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Peer.Merge(m, src) +} +func (m *Message_Peer) XXX_Size() int { + return m.Size() +} +func (m *Message_Peer) XXX_DiscardUnknown() { + xxx_messageInfo_Message_Peer.DiscardUnknown(m) +} + +var xxx_messageInfo_Message_Peer proto.InternalMessageInfo + +func (m *Message_Peer) GetId() []byte { + if m != nil { + return m.Id + } + return nil +} + +func (m *Message_Peer) GetAddrs() [][]byte { + if m != nil { + return m.Addrs + } + return nil +} + +func (m *Message_Peer) GetConnection() Message_ConnectionType { + if m != nil { + return m.Connection + } + return Message_NOT_CONNECTED +} + +func init() { + // OpenBazaar: removed the RegisterEnums that were here because they get registered + // when the default dht package that is part of go-ipfs/core gets registered. Thus if + // we don't remove these here we will get a duplicate enum registration panic. +} + +func init() { proto.RegisterFile("dht.proto", fileDescriptor_616a434b24c97ff4) } + +var fileDescriptor_616a434b24c97ff4 = []byte{ + // 428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xc1, 0x6e, 0x9b, 0x40, + 0x10, 0xed, 0x02, 0x76, 0xe3, 0x01, 0x93, 0xcd, 0x28, 0x07, 0x94, 0x4a, 0x16, 0xf2, 0x89, 0x1e, + 0x02, 0x12, 0x95, 0x7a, 0xe8, 0xa1, 0x92, 0x0b, 0x34, 0xb2, 0x94, 0x62, 0x6b, 0xeb, 0xa4, 0x47, + 0xcb, 0xc0, 0xca, 0x41, 0xa5, 0x5e, 0x04, 0x24, 0x95, 0xbf, 0xb0, 0x3d, 0xf6, 0x13, 0x2a, 0x7f, + 0x49, 0x05, 0x84, 0x16, 0xfb, 0xd0, 0xd3, 0xbe, 0x37, 0xf3, 0xde, 0xce, 0xdb, 0xd1, 0xc2, 0x28, + 0x79, 0xa8, 0xec, 0xbc, 0x10, 0x95, 0xc0, 0x61, 0x03, 0xa3, 0x2b, 0x77, 0x9b, 0x56, 0x0f, 0x8f, + 0x91, 0x1d, 0x8b, 0x6f, 0x4e, 0x96, 0x46, 0xb9, 0x9b, 0x3b, 0x5b, 0x71, 0xdd, 0xa2, 0xeb, 0x82, + 0xc7, 0xa2, 0x48, 0x9c, 0x3c, 0x72, 0x5a, 0xd4, 0x7a, 0xa7, 0x3f, 0x14, 0x78, 0xf9, 0x89, 0x97, + 0xe5, 0x66, 0xcb, 0xd1, 0x01, 0xa5, 0xda, 0xe7, 0xdc, 0x20, 0x26, 0xb1, 0x74, 0xf7, 0x95, 0xdd, + 0x5e, 0x6b, 0x3f, 0xb7, 0xbb, 0x73, 0xb5, 0xcf, 0x39, 0x6b, 0x84, 0x68, 0xc1, 0x79, 0x9c, 0x3d, + 0x96, 0x15, 0x2f, 0x6e, 0xf9, 0x13, 0xcf, 0xd8, 0xe6, 0xbb, 0x01, 0x26, 0xb1, 0x06, 0xec, 0xb4, + 0x8c, 0x14, 0xe4, 0xaf, 0x7c, 0x6f, 0x48, 0x26, 0xb1, 0x34, 0x56, 0x43, 0x7c, 0x0d, 0xc3, 0x36, + 0x88, 0x21, 0x9b, 0xc4, 0x52, 0xdd, 0x0b, 0xbb, 0xcb, 0x15, 0xd9, 0xac, 0x41, 0xec, 0x59, 0x80, + 0x6f, 0x41, 0x8d, 0x33, 0x51, 0xf2, 0x62, 0xc9, 0x79, 0x51, 0x1a, 0x67, 0xa6, 0x6c, 0xa9, 0xee, + 0xe5, 0x69, 0xbc, 0xba, 0xc9, 0xfa, 0x42, 0x7c, 0x07, 0xe3, 0xbc, 0x10, 0x4f, 0x69, 0xd2, 0x39, + 0x47, 0xff, 0x71, 0x1e, 0x4b, 0xaf, 0x32, 0x50, 0x6a, 0x80, 0x3a, 0x48, 0x69, 0xd2, 0x6c, 0x44, + 0x63, 0x52, 0x9a, 0xe0, 0x25, 0x0c, 0x36, 0x49, 0x52, 0x94, 0x86, 0x64, 0xca, 0x96, 0xc6, 0x5a, + 0x82, 0xef, 0x01, 0x62, 0xb1, 0xdb, 0xf1, 0xb8, 0x4a, 0xc5, 0xae, 0x79, 0x90, 0xee, 0x4e, 0x4e, + 0xc7, 0x78, 0x7f, 0x15, 0xcd, 0x0a, 0x7b, 0x8e, 0x69, 0x0a, 0x6a, 0x6f, 0xbb, 0x38, 0x86, 0xd1, + 0xf2, 0x6e, 0xb5, 0xbe, 0x9f, 0xdd, 0xde, 0x05, 0xf4, 0x45, 0x4d, 0x6f, 0x82, 0x8e, 0x12, 0xa4, + 0xa0, 0xcd, 0x7c, 0x7f, 0xbd, 0x64, 0x8b, 0xfb, 0xb9, 0x1f, 0x30, 0x2a, 0xe1, 0x05, 0x8c, 0x6b, + 0x41, 0x57, 0xf9, 0x4c, 0xe5, 0xda, 0xf3, 0x71, 0x1e, 0xfa, 0xeb, 0x70, 0xe1, 0x07, 0x54, 0xc1, + 0x33, 0x50, 0x96, 0xf3, 0xf0, 0x86, 0x0e, 0xa6, 0x5f, 0x40, 0x3f, 0x0e, 0x52, 0xbb, 0xc3, 0xc5, + 0x6a, 0xed, 0x2d, 0xc2, 0x30, 0xf0, 0x56, 0x81, 0xdf, 0x4e, 0xfc, 0x47, 0x09, 0x9e, 0x83, 0xea, + 0xcd, 0xc2, 0x4e, 0x41, 0x25, 0x44, 0xd0, 0xbd, 0x59, 0xd8, 0x73, 0x51, 0xf9, 0x83, 0xf6, 0xf3, + 0x30, 0x21, 0xbf, 0x0e, 0x13, 0xf2, 0xfb, 0x30, 0x21, 0xd1, 0xb0, 0xf9, 0x5e, 0x6f, 0xfe, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xf4, 0x3c, 0x3f, 0x3f, 0xa7, 0x02, 0x00, 0x00, +} + +func (m *Message) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Type)) + } + if len(m.Key) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDht(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if m.Record != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Record.Size())) + n1, err := m.Record.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.CloserPeers) > 0 { + for _, msg := range m.CloserPeers { + dAtA[i] = 0x42 + i++ + i = encodeVarintDht(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ProviderPeers) > 0 { + for _, msg := range m.ProviderPeers { + dAtA[i] = 0x4a + i++ + i = encodeVarintDht(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.ClusterLevelRaw != 0 { + dAtA[i] = 0x50 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.ClusterLevelRaw)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Message_Peer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message_Peer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDht(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + dAtA[i] = 0x12 + i++ + i = encodeVarintDht(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.Connection != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Connection)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDht(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovDht(uint64(m.Type)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovDht(uint64(l)) + } + if m.Record != nil { + l = m.Record.Size() + n += 1 + l + sovDht(uint64(l)) + } + if len(m.CloserPeers) > 0 { + for _, e := range m.CloserPeers { + l = e.Size() + n += 1 + l + sovDht(uint64(l)) + } + } + if len(m.ProviderPeers) > 0 { + for _, e := range m.ProviderPeers { + l = e.Size() + n += 1 + l + sovDht(uint64(l)) + } + } + if m.ClusterLevelRaw != 0 { + n += 1 + sovDht(uint64(m.ClusterLevelRaw)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message_Peer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovDht(uint64(l)) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + l = len(b) + n += 1 + l + sovDht(uint64(l)) + } + } + if m.Connection != 0 { + n += 1 + sovDht(uint64(m.Connection)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDht(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDht(x uint64) (n int) { + return sovDht(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= Message_MessageType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Record == nil { + m.Record = &pb.Record{} + } + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CloserPeers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CloserPeers = append(m.CloserPeers, &Message_Peer{}) + if err := m.CloserPeers[len(m.CloserPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderPeers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderPeers = append(m.ProviderPeers, &Message_Peer{}) + if err := m.ProviderPeers[len(m.ProviderPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterLevelRaw", wireType) + } + m.ClusterLevelRaw = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClusterLevelRaw |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDht(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Message_Peer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Peer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx)) + copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) + } + m.Connection = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Connection |= Message_ConnectionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDht(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDht(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDht + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthDht + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipDht(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthDht + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthDht = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDht = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/dht.proto b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/dht.proto similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/pb/dht.proto rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/dht.proto diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/message.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/message.go new file mode 100644 index 0000000000..6486c06716 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb/message.go @@ -0,0 +1,183 @@ +package dht_pb + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("dht.pb") + +type PeerRoutingInfo struct { + pstore.PeerInfo + inet.Connectedness +} + +// NewMessage constructs a new dht message with given type, key, and level +func NewMessage(typ Message_MessageType, key []byte, level int) *Message { + m := &Message{ + Type: typ, + Key: key, + } + m.SetClusterLevel(level) + return m +} + +func peerRoutingInfoToPBPeer(p PeerRoutingInfo) *Message_Peer { + pbp := new(Message_Peer) + + pbp.Addrs = make([][]byte, len(p.Addrs)) + for i, maddr := range p.Addrs { + pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. + } + s := string(p.ID) + pbp.Id = []byte(s) + c := ConnectionType(p.Connectedness) + pbp.Connection = c + return pbp +} + +func peerInfoToPBPeer(p pstore.PeerInfo) *Message_Peer { + pbp := new(Message_Peer) + + pbp.Addrs = make([][]byte, len(p.Addrs)) + for i, maddr := range p.Addrs { + pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. + } + pbp.Id = []byte(p.ID) + return pbp +} + +// PBPeerToPeer turns a *Message_Peer into its pstore.PeerInfo counterpart +func PBPeerToPeerInfo(pbp *Message_Peer) *pstore.PeerInfo { + return &pstore.PeerInfo{ + ID: peer.ID(pbp.GetId()), + Addrs: pbp.Addresses(), + } +} + +// RawPeerInfosToPBPeers converts a slice of Peers into a slice of *Message_Peers, +// ready to go out on the wire. +func RawPeerInfosToPBPeers(peers []pstore.PeerInfo) []*Message_Peer { + pbpeers := make([]*Message_Peer, len(peers)) + for i, p := range peers { + pbpeers[i] = peerInfoToPBPeer(p) + } + return pbpeers +} + +// PeersToPBPeers converts given []peer.Peer into a set of []*Message_Peer, +// which can be written to a message and sent out. the key thing this function +// does (in addition to PeersToPBPeers) is set the ConnectionType with +// information from the given inet.Network. +func PeerInfosToPBPeers(n inet.Network, peers []pstore.PeerInfo) []*Message_Peer { + pbps := RawPeerInfosToPBPeers(peers) + for i, pbp := range pbps { + c := ConnectionType(n.Connectedness(peers[i].ID)) + pbp.Connection = c + } + return pbps +} + +func PeerRoutingInfosToPBPeers(peers []PeerRoutingInfo) []*Message_Peer { + pbpeers := make([]*Message_Peer, len(peers)) + for i, p := range peers { + pbpeers[i] = peerRoutingInfoToPBPeer(p) + } + return pbpeers +} + +// PBPeersToPeerInfos converts given []*Message_Peer into []pstore.PeerInfo +// Invalid addresses will be silently omitted. +func PBPeersToPeerInfos(pbps []*Message_Peer) []*pstore.PeerInfo { + peers := make([]*pstore.PeerInfo, 0, len(pbps)) + for _, pbp := range pbps { + peers = append(peers, PBPeerToPeerInfo(pbp)) + } + return peers +} + +// Addresses returns a multiaddr associated with the Message_Peer entry +func (m *Message_Peer) Addresses() []ma.Multiaddr { + if m == nil { + return nil + } + + maddrs := make([]ma.Multiaddr, 0, len(m.Addrs)) + for _, addr := range m.Addrs { + maddr, err := ma.NewMultiaddrBytes(addr) + if err != nil { + log.Warningf("error decoding Multiaddr for peer: %s", m.GetId()) + continue + } + + maddrs = append(maddrs, maddr) + } + return maddrs +} + +// GetClusterLevel gets and adjusts the cluster level on the message. +// a +/- 1 adjustment is needed to distinguish a valid first level (1) and +// default "no value" protobuf behavior (0) +func (m *Message) GetClusterLevel() int { + level := m.GetClusterLevelRaw() - 1 + if level < 0 { + return 0 + } + return int(level) +} + +// SetClusterLevel adjusts and sets the cluster level on the message. +// a +/- 1 adjustment is needed to distinguish a valid first level (1) and +// default "no value" protobuf behavior (0) +func (m *Message) SetClusterLevel(level int) { + lvl := int32(level) + m.ClusterLevelRaw = lvl +} + +// Loggable turns a Message into machine-readable log output +func (m *Message) Loggable() map[string]interface{} { + return map[string]interface{}{ + "message": map[string]string{ + "type": m.Type.String(), + "key": b58.Encode([]byte(m.GetKey())), + }, + } +} + +// ConnectionType returns a Message_ConnectionType associated with the +// inet.Connectedness. +func ConnectionType(c inet.Connectedness) Message_ConnectionType { + switch c { + default: + return Message_NOT_CONNECTED + case inet.NotConnected: + return Message_NOT_CONNECTED + case inet.Connected: + return Message_CONNECTED + case inet.CanConnect: + return Message_CAN_CONNECT + case inet.CannotConnect: + return Message_CANNOT_CONNECT + } +} + +// Connectedness returns an inet.Connectedness associated with the +// Message_ConnectionType. +func Connectedness(c Message_ConnectionType) inet.Connectedness { + switch c { + default: + return inet.NotConnected + case Message_NOT_CONNECTED: + return inet.NotConnected + case Message_CONNECTED: + return inet.Connected + case Message_CAN_CONNECT: + return inet.CanConnect + case Message_CANNOT_CONNECT: + return inet.CannotConnect + } +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/providers/providers.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/providers/providers.go new file mode 100644 index 0000000000..badae4442e --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/providers/providers.go @@ -0,0 +1,362 @@ +package providers + +import ( + "context" + "encoding/binary" + "fmt" + "strings" + "time" + + lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + ob "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/ob" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + autobatch "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +var batchBufferSize = 256 + +var log = logging.Logger("providers") + +var lruCacheSize = 256 +var ProvideValidity = time.Hour * 24 +var defaultCleanupInterval = time.Hour + +type ProviderManager struct { + // all non channel fields are meant to be accessed only within + // the run method + providers *lru.Cache + lpeer peer.ID + dstore ds.Datastore + + newprovs chan *addProv + getprovs chan *getProv + period time.Duration + proc goprocess.Process + + cleanupInterval time.Duration +} + +type providerSet struct { + providers []peer.ID + set map[peer.ID]time.Time +} + +type addProv struct { + k cid.Cid + val peer.ID +} + +type getProv struct { + k cid.Cid + resp chan []peer.ID +} + +func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager { + pm := new(ProviderManager) + pm.getprovs = make(chan *getProv) + pm.newprovs = make(chan *addProv) + pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) + cache, err := lru.New(lruCacheSize) + if err != nil { + panic(err) //only happens if negative value is passed to lru constructor + } + pm.providers = cache + + pm.proc = goprocessctx.WithContext(ctx) + pm.cleanupInterval = defaultCleanupInterval + pm.proc.Go(func(p goprocess.Process) { pm.run() }) + + return pm +} + +const providersKeyPrefix = "/providers/" + +func mkProvKey(k cid.Cid) string { + return providersKeyPrefix + base32.RawStdEncoding.EncodeToString(k.Bytes()) +} + +func (pm *ProviderManager) Process() goprocess.Process { + return pm.proc +} + +func (pm *ProviderManager) providersForKey(k cid.Cid) ([]peer.ID, error) { + pset, err := pm.getProvSet(k) + if err != nil { + return nil, err + } + return pset.providers, nil +} + +func (pm *ProviderManager) getProvSet(k cid.Cid) (*providerSet, error) { + cached, ok := pm.providers.Get(k.KeyString()) + if ok { + return cached.(*providerSet), nil + } + + pset, err := loadProvSet(pm.dstore, k) + if err != nil { + return nil, err + } + + if len(pset.providers) > 0 { + pm.providers.Add(k.KeyString(), pset) + } + + return pset, nil +} + +func loadProvSet(dstore ds.Datastore, k cid.Cid) (*providerSet, error) { + res, err := dstore.Query(dsq.Query{Prefix: mkProvKey(k)}) + if err != nil { + return nil, err + } + + out := newProviderSet() + for { + e, ok := res.NextSync() + if !ok { + break + } + if e.Error != nil { + log.Error("got an error: ", e.Error) + continue + } + + lix := strings.LastIndex(e.Key, "/") + + decstr, err := base32.RawStdEncoding.DecodeString(e.Key[lix+1:]) + if err != nil { + log.Error("base32 decoding error: ", err) + continue + } + + pid := peer.ID(decstr) + + t, err := readTimeValue(e.Value) + if err != nil { + log.Warning("parsing providers record from disk: ", err) + continue + } + + out.setVal(pid, t) + } + + return out, nil +} + +func readTimeValue(i interface{}) (time.Time, error) { + data, ok := i.([]byte) + if !ok { + return time.Time{}, fmt.Errorf("data was not a []byte") + } + + nsec, _ := binary.Varint(data) + + return time.Unix(0, nsec), nil +} + +func (pm *ProviderManager) addProv(k cid.Cid, p peer.ID) error { + iprovs, ok := pm.providers.Get(k.KeyString()) + if !ok { + stored, err := loadProvSet(pm.dstore, k) + if err != nil { + return err + } + iprovs = stored + pm.providers.Add(k.KeyString(), iprovs) + } + provs := iprovs.(*providerSet) + now := time.Now() + provs.setVal(p, now) + + return writeProviderEntry(pm.dstore, k, p, now) +} + +func writeProviderEntry(dstore ds.Datastore, k cid.Cid, p peer.ID, t time.Time) error { + dsk := mkProvKey(k) + "/" + base32.RawStdEncoding.EncodeToString([]byte(p)) + + buf := make([]byte, 16) + n := binary.PutVarint(buf, t.UnixNano()) + + return dstore.Put(ds.NewKey(dsk), buf[:n]) +} + +func (pm *ProviderManager) deleteProvSet(k cid.Cid) error { + pm.providers.Remove(k.KeyString()) + + res, err := pm.dstore.Query(dsq.Query{ + KeysOnly: true, + Prefix: mkProvKey(k), + }) + if err != nil { + return err + } + + entries, err := res.Rest() + if err != nil { + return err + } + + for _, e := range entries { + err := pm.dstore.Delete(ds.NewKey(e.Key)) + if err != nil { + log.Error("deleting provider set: ", err) + } + } + return nil +} + +func (pm *ProviderManager) getProvKeys() (func() (cid.Cid, bool), error) { + res, err := pm.dstore.Query(dsq.Query{ + KeysOnly: true, + Prefix: providersKeyPrefix, + }) + if err != nil { + return nil, err + } + + iter := func() (cid.Cid, bool) { + for e := range res.Next() { + parts := strings.Split(e.Key, "/") + if len(parts) != 4 { + log.Warningf("incorrectly formatted provider entry in datastore: %s", e.Key) + continue + } + decoded, err := base32.RawStdEncoding.DecodeString(parts[2]) + if err != nil { + log.Warning("error decoding base32 provider key: %s: %s", parts[2], err) + continue + } + + c, err := cid.Cast(decoded) + if err != nil { + log.Warning("error casting key to cid from datastore key: %s", err) + continue + } + + return c, true + } + return cid.Cid{}, false + } + + return iter, nil +} + +func (pm *ProviderManager) run() { + tick := time.NewTicker(pm.cleanupInterval) + for { + select { + case np := <-pm.newprovs: + err := pm.addProv(np.k, np.val) + if err != nil { + log.Error("error adding new providers: ", err) + } + case gp := <-pm.getprovs: + provs, err := pm.providersForKey(gp.k) + if err != nil && err != ds.ErrNotFound { + log.Error("error reading providers: ", err) + } + + gp.resp <- provs + case <-tick.C: + keys, err := pm.getProvKeys() + if err != nil { + log.Error("Error loading provider keys: ", err) + continue + } + now := time.Now() + for { + k, ok := keys() + if !ok { + break + } + + provs, err := pm.getProvSet(k) + if err != nil { + log.Error("error loading known provset: ", err) + continue + } + for p, t := range provs.set { + // OpenBazaar: the provider is usually deleted after it reaches ProvideValidity. However, since + // we use a different validity setting for our `pointers` used by the messaging system, we only + // want to delete the pointer after it reaches PointerValidity. + if (now.Sub(t) > ProvideValidity && !ob.IsPointer(p)) || (now.Sub(t) > ob.PointerValidity && ob.IsPointer(p)) { + delete(provs.set, p) + } + } + // have we run out of providers? + if len(provs.set) == 0 { + provs.providers = nil + err := pm.deleteProvSet(k) + if err != nil { + log.Error("error deleting provider set: ", err) + } + } else if len(provs.set) < len(provs.providers) { + // We must have modified the providers set, recompute. + provs.providers = make([]peer.ID, 0, len(provs.set)) + for p := range provs.set { + provs.providers = append(provs.providers, p) + } + } + } + case <-pm.proc.Closing(): + tick.Stop() + return + } + } +} + +func (pm *ProviderManager) AddProvider(ctx context.Context, k cid.Cid, val peer.ID) { + prov := &addProv{ + k: k, + val: val, + } + select { + case pm.newprovs <- prov: + case <-ctx.Done(): + } +} + +func (pm *ProviderManager) GetProviders(ctx context.Context, k cid.Cid) []peer.ID { + gp := &getProv{ + k: k, + resp: make(chan []peer.ID, 1), // buffered to prevent sender from blocking + } + select { + case <-ctx.Done(): + return nil + case pm.getprovs <- gp: + } + select { + case <-ctx.Done(): + return nil + case peers := <-gp.resp: + return peers + } +} + +func newProviderSet() *providerSet { + return &providerSet{ + set: make(map[peer.ID]time.Time), + } +} + +func (ps *providerSet) Add(p peer.ID) { + ps.setVal(p, time.Now()) +} + +func (ps *providerSet) setVal(p peer.ID, t time.Time) { + _, found := ps.set[p] + if !found { + ps.providers = append(ps.providers, p) + } + + ps.set[p] = t +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/query.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/query.go new file mode 100644 index 0000000000..6e140d3d5c --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/query.go @@ -0,0 +1,319 @@ +package dht + +import ( + "context" + "sync" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + todoctr "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter" + process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + ctxproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pset "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + queue "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var maxQueryConcurrency = AlphaValue + +type dhtQuery struct { + dht *IpfsDHT + key string // the key we're querying for + qfunc queryFunc // the function to execute per peer + concurrency int // the concurrency parameter +} + +type dhtQueryResult struct { + value []byte // GetValue + peer *pstore.PeerInfo // FindPeer + providerPeers []pstore.PeerInfo // GetProviders + closerPeers []*pstore.PeerInfo // * + success bool + + finalSet *pset.PeerSet + queriedSet *pset.PeerSet +} + +// constructs query +func (dht *IpfsDHT) newQuery(k string, f queryFunc) *dhtQuery { + return &dhtQuery{ + key: k, + dht: dht, + qfunc: f, + concurrency: maxQueryConcurrency, + } +} + +// QueryFunc is a function that runs a particular query with a given peer. +// It returns either: +// - the value +// - a list of peers potentially better able to serve the query +// - an error +type queryFunc func(context.Context, peer.ID) (*dhtQueryResult, error) + +// Run runs the query at hand. pass in a list of peers to use first. +func (q *dhtQuery) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + runner := newQueryRunner(q) + return runner.Run(ctx, peers) +} + +type dhtQueryRunner struct { + query *dhtQuery // query to run + peersSeen *pset.PeerSet // all peers queried. prevent querying same peer 2x + peersQueried *pset.PeerSet // peers successfully connected to and queried + peersDialed *dialQueue // peers we have dialed to + peersToQuery *queue.ChanQueue // peers remaining to be queried + peersRemaining todoctr.Counter // peersToQuery + currently processing + + result *dhtQueryResult // query result + errs u.MultiErr // result errors. maybe should be a map[peer.ID]error + + rateLimit chan struct{} // processing semaphore + log logging.EventLogger + + runCtx context.Context + + proc process.Process + sync.RWMutex +} + +func newQueryRunner(q *dhtQuery) *dhtQueryRunner { + proc := process.WithParent(process.Background()) + ctx := ctxproc.OnClosingContext(proc) + peersToQuery := queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))) + r := &dhtQueryRunner{ + query: q, + peersRemaining: todoctr.NewSyncCounter(), + peersSeen: pset.New(), + peersQueried: pset.New(), + rateLimit: make(chan struct{}, q.concurrency), + peersToQuery: peersToQuery, + proc: proc, + } + dq, err := newDialQueue(&dqParams{ + ctx: ctx, + target: q.key, + in: peersToQuery, + dialFn: r.dialPeer, + config: dqDefaultConfig(), + }) + if err != nil { + panic(err) + } + r.peersDialed = dq + return r +} + +func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { + r.log = logger + r.runCtx = ctx + + if len(peers) == 0 { + logger.Warning("Running query with no peers!") + return nil, nil + } + + // setup concurrency rate limiting + for i := 0; i < r.query.concurrency; i++ { + r.rateLimit <- struct{}{} + } + + // add all the peers we got first. + for _, p := range peers { + r.addPeerToQuery(p) + } + + // go do this thing. + // do it as a child proc to make sure Run exits + // ONLY AFTER spawn workers has exited. + r.proc.Go(r.spawnWorkers) + + // so workers are working. + + // wait until they're done. + err := routing.ErrNotFound + + // now, if the context finishes, close the proc. + // we have to do it here because the logic before is setup, which + // should run without closing the proc. + ctxproc.CloseAfterContext(r.proc, ctx) + + select { + case <-r.peersRemaining.Done(): + r.proc.Close() + r.RLock() + defer r.RUnlock() + + err = routing.ErrNotFound + + // if every query to every peer failed, something must be very wrong. + if len(r.errs) > 0 && len(r.errs) == r.peersSeen.Size() { + logger.Debugf("query errs: %s", r.errs) + err = r.errs[0] + } + + case <-r.proc.Closed(): + r.RLock() + defer r.RUnlock() + err = r.runCtx.Err() + } + + if r.result != nil && r.result.success { + return r.result, nil + } + + return &dhtQueryResult{ + finalSet: r.peersSeen, + queriedSet: r.peersQueried, + }, err +} + +func (r *dhtQueryRunner) addPeerToQuery(next peer.ID) { + // if new peer is ourselves... + if next == r.query.dht.self { + r.log.Debug("addPeerToQuery skip self") + return + } + + if !r.peersSeen.TryAdd(next) { + return + } + + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.AddingPeer, + ID: next, + }) + + r.peersRemaining.Increment(1) + select { + case r.peersToQuery.EnqChan <- next: + case <-r.proc.Closing(): + } +} + +func (r *dhtQueryRunner) spawnWorkers(proc process.Process) { + for { + select { + case <-r.peersRemaining.Done(): + return + + case <-r.proc.Closing(): + return + + case <-r.rateLimit: + ch := r.peersDialed.Consume() + select { + case p, ok := <-ch: + if !ok { + // this signals context cancellation. + return + } + // do it as a child func to make sure Run exits + // ONLY AFTER spawn workers has exited. + proc.Go(func(proc process.Process) { + r.queryPeer(proc, p) + }) + case <-r.proc.Closing(): + return + case <-r.peersRemaining.Done(): + return + } + } + } +} + +func (r *dhtQueryRunner) dialPeer(ctx context.Context, p peer.ID) error { + // short-circuit if we're already connected. + if r.query.dht.host.Network().Connectedness(p) == inet.Connected { + return nil + } + + logger.Debug("not connected. dialing.") + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.DialingPeer, + ID: p, + }) + + pi := pstore.PeerInfo{ID: p} + if err := r.query.dht.host.Connect(ctx, pi); err != nil { + logger.Debugf("error connecting: %s", err) + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.QueryError, + Extra: err.Error(), + ID: p, + }) + + r.Lock() + r.errs = append(r.errs, err) + r.Unlock() + + // This peer is dropping out of the race. + r.peersRemaining.Decrement(1) + return err + } + logger.Debugf("connected. dial success.") + return nil +} + +func (r *dhtQueryRunner) queryPeer(proc process.Process, p peer.ID) { + // ok let's do this! + + // create a context from our proc. + ctx := ctxproc.OnClosingContext(proc) + + // make sure we do this when we exit + defer func() { + // signal we're done processing peer p + r.peersRemaining.Decrement(1) + r.rateLimit <- struct{}{} + }() + + // finally, run the query against this peer + res, err := r.query.qfunc(ctx, p) + + r.peersQueried.Add(p) + + if err != nil { + logger.Debugf("ERROR worker for: %v %v", p, err) + r.Lock() + r.errs = append(r.errs, err) + r.Unlock() + + } else if res.success { + logger.Debugf("SUCCESS worker for: %v %s", p, res) + r.Lock() + r.result = res + r.Unlock() + go r.proc.Close() // signal to everyone that we're done. + // must be async, as we're one of the children, and Close blocks. + + } else if len(res.closerPeers) > 0 { + logger.Debugf("PEERS CLOSER -- worker for: %v (%d closer peers)", p, len(res.closerPeers)) + for _, next := range res.closerPeers { + if next.ID == r.query.dht.self { // don't add self. + logger.Debugf("PEERS CLOSER -- worker for: %v found self", p) + continue + } + + // add their addresses to the dialer's peerstore + r.query.dht.peerstore.AddAddrs(next.ID, next.Addrs, pstore.TempAddrTTL) + r.addPeerToQuery(next.ID) + logger.Debugf("PEERS CLOSER -- worker for: %v added %v (%v)", p, next.ID, next.Addrs) + } + } else { + logger.Debugf("QUERY worker for: %v - not found, and no closer peers.", p) + } +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/records.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/records.go new file mode 100644 index 0000000000..779d8dc3af --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/records.go @@ -0,0 +1,138 @@ +package dht + +import ( + "context" + "fmt" + "time" + + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" +) + +// MaxRecordAge specifies the maximum time that any node will hold onto a record +// from the time its received. This does not apply to any other forms of validity that +// the record may contain. +// For example, a record may contain an ipns entry with an EOL saying its valid +// until the year 2020 (a great time in the future). For that record to stick around +// it must be rebroadcasted more frequently than once every 'MaxRecordAge' + +// OpenBazaar: MaxRecordAge has been increased to one week to support longer caching. +const MaxRecordAge = time.Hour * 24 * 7 + +type pubkrs struct { + pubk ci.PubKey + err error +} + +func (dht *IpfsDHT) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { + logger.Debugf("getPublicKey for: %s", p) + + // Check locally. Will also try to extract the public key from the peer + // ID itself if possible (if inlined). + pk := dht.peerstore.PubKey(p) + if pk != nil { + return pk, nil + } + + // Try getting the public key both directly from the node it identifies + // and from the DHT, in parallel + ctx, cancel := context.WithCancel(ctx) + defer cancel() + resp := make(chan pubkrs, 2) + go func() { + pubk, err := dht.getPublicKeyFromNode(ctx, p) + resp <- pubkrs{pubk, err} + }() + + // Note that the number of open connections is capped by the dial + // limiter, so there is a chance that getPublicKeyFromDHT(), which + // potentially opens a lot of connections, will block + // getPublicKeyFromNode() from getting a connection. + // Currently this doesn't seem to cause an issue so leaving as is + // for now. + go func() { + pubk, err := dht.getPublicKeyFromDHT(ctx, p) + resp <- pubkrs{pubk, err} + }() + + // Wait for one of the two go routines to return + // a public key (or for both to error out) + var err error + for i := 0; i < 2; i++ { + r := <-resp + if r.err == nil { + // Found the public key + err := dht.peerstore.AddPubKey(p, r.pubk) + if err != nil { + logger.Warningf("Failed to add public key to peerstore for %v", p) + } + return r.pubk, nil + } + err = r.err + } + + // Both go routines failed to find a public key + return nil, err +} + +func (dht *IpfsDHT) getPublicKeyFromDHT(ctx context.Context, p peer.ID) (ci.PubKey, error) { + // Only retrieve one value, because the public key is immutable + // so there's no need to retrieve multiple versions + pkkey := routing.KeyForPublicKey(p) + val, err := dht.GetValue(ctx, pkkey, Quorum(1)) + if err != nil { + return nil, err + } + + pubk, err := ci.UnmarshalPublicKey(val) + if err != nil { + logger.Errorf("Could not unmarshall public key retrieved from DHT for %v", p) + return nil, err + } + + // Note: No need to check that public key hash matches peer ID + // because this is done by GetValues() + logger.Debugf("Got public key for %s from DHT", p) + return pubk, nil +} + +func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.PubKey, error) { + // check locally, just in case... + pk := dht.peerstore.PubKey(p) + if pk != nil { + return pk, nil + } + + // Get the key from the node itself + pkkey := routing.KeyForPublicKey(p) + pmes, err := dht.getValueSingle(ctx, p, pkkey) + if err != nil { + return nil, err + } + + // node doesn't have key :( + record := pmes.GetRecord() + if record == nil { + return nil, fmt.Errorf("node %v not responding with its public key", p) + } + + pubk, err := ci.UnmarshalPublicKey(record.GetValue()) + if err != nil { + logger.Errorf("Could not unmarshall public key for %v", p) + return nil, err + } + + // Make sure the public key matches the peer ID + id, err := peer.IDFromPublicKey(pubk) + if err != nil { + logger.Errorf("Could not extract peer id from public key for %v", p) + return nil, err + } + if id != p { + return nil, fmt.Errorf("public key %v does not match peer %v", id, p) + } + + logger.Debugf("Got public key from node %v itself", p) + return pubk, nil +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing.go new file mode 100644 index 0000000000..8af7161426 --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing.go @@ -0,0 +1,712 @@ +package dht + +import ( + "bytes" + "context" + "fmt" + "runtime" + "sync" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + pb "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/pb" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pset "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" +) + +// asyncQueryBuffer is the size of buffered channels in async queries. This +// buffer allows multiple queries to execute simultaneously, return their +// results and continue querying closer peers. Note that different query +// results will wait for the channel to drain. +var asyncQueryBuffer = 10 + +// This file implements the Routing interface for the IpfsDHT struct. + +// Basic Put/Get + +// PutValue adds value corresponding to given Key. +// This is the top level "Store" operation of the DHT +func (dht *IpfsDHT) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) (err error) { + eip := logger.EventBegin(ctx, "PutValue") + defer func() { + eip.Append(loggableKey(key)) + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + logger.Debugf("PutValue %s", key) + + // don't even allow local users to put bad values. + if err := dht.Validator.Validate(key, value); err != nil { + return err + } + + old, err := dht.getLocal(key) + if err != nil { + // Means something is wrong with the datastore. + return err + } + + // Check if we have an old value that's not the same as the new one. + if old != nil && !bytes.Equal(old.GetValue(), value) { + // Check to see if the new one is better. + i, err := dht.Validator.Select(key, [][]byte{value, old.GetValue()}) + if err != nil { + return err + } + if i != 0 { + return fmt.Errorf("can't replace a newer value with an older value") + } + } + + rec := record.MakePutRecord(key, value) + rec.TimeReceived = u.FormatRFC3339(time.Now()) + err = dht.putLocal(key, rec) + if err != nil { + return err + } + + pchan, err := dht.GetClosestPeers(ctx, key) + if err != nil { + return err + } + + wg := sync.WaitGroup{} + for p := range pchan { + wg.Add(1) + go func(p peer.ID) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + defer wg.Done() + notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ + Type: notif.Value, + ID: p, + }) + + err := dht.putValueToPeer(ctx, p, rec) + if err != nil { + logger.Debugf("failed putting value to peer: %s", err) + } + }(p) + } + wg.Wait() + return nil +} + +// RecvdVal stores a value and the peer from which we got the value. +type RecvdVal struct { + Val []byte + From peer.ID +} + +// GetValue searches for the value corresponding to given Key. +func (dht *IpfsDHT) GetValue(ctx context.Context, key string, opts ...ropts.Option) (_ []byte, err error) { + eip := logger.EventBegin(ctx, "GetValue") + defer func() { + eip.Append(loggableKey(key)) + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // apply defaultQuorum if relevant + var cfg ropts.Options + if err := cfg.Apply(opts...); err != nil { + return nil, err + } + opts = append(opts, Quorum(getQuorum(&cfg, defaultQuorum))) + + responses, err := dht.SearchValue(ctx, key, opts...) + if err != nil { + return nil, err + } + var best []byte + + for r := range responses { + best = r + } + + if ctx.Err() != nil { + return best, ctx.Err() + } + + if best == nil { + return nil, routing.ErrNotFound + } + logger.Debugf("GetValue %v %v", key, best) + return best, nil +} + +func (dht *IpfsDHT) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + var cfg ropts.Options + if err := cfg.Apply(opts...); err != nil { + return nil, err + } + + responsesNeeded := 0 + if !cfg.Offline { + responsesNeeded = getQuorum(&cfg, -1) + } + + valCh, err := dht.getValues(ctx, key, responsesNeeded) + if err != nil { + return nil, err + } + + out := make(chan []byte) + go func() { + defer close(out) + + maxVals := responsesNeeded + if maxVals < 0 { + maxVals = defaultQuorum * 4 // we want some upper bound on how + // much correctional entries we will send + } + + // vals is used collect entries we got so far and send corrections to peers + // when we exit this function + vals := make([]RecvdVal, 0, maxVals) + var best *RecvdVal + + defer func() { + if len(vals) <= 1 || best == nil { + return + } + fixupRec := record.MakePutRecord(key, best.Val) + for _, v := range vals { + // if someone sent us a different 'less-valid' record, lets correct them + if !bytes.Equal(v.Val, best.Val) { + go func(v RecvdVal) { + if v.From == dht.self { + err := dht.putLocal(key, fixupRec) + if err != nil { + logger.Error("Error correcting local dht entry:", err) + } + return + } + ctx, cancel := context.WithTimeout(dht.Context(), time.Second*30) + defer cancel() + err := dht.putValueToPeer(ctx, v.From, fixupRec) + if err != nil { + logger.Debug("Error correcting DHT entry: ", err) + } + }(v) + } + } + }() + + for { + select { + case v, ok := <-valCh: + if !ok { + return + } + + if len(vals) < maxVals { + vals = append(vals, v) + } + + if v.Val == nil { + continue + } + // Select best value + if best != nil { + if bytes.Equal(best.Val, v.Val) { + continue + } + sel, err := dht.Validator.Select(key, [][]byte{best.Val, v.Val}) + if err != nil { + logger.Warning("Failed to select dht key: ", err) + continue + } + if sel != 1 { + continue + } + } + best = &v + select { + case out <- v.Val: + case <-ctx.Done(): + return + } + case <-ctx.Done(): + return + } + } + }() + + return out, nil +} + +// GetValues gets nvals values corresponding to the given key. +func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) { + eip := logger.EventBegin(ctx, "GetValues") + + eip.Append(loggableKey(key)) + defer eip.Done() + + valCh, err := dht.getValues(ctx, key, nvals) + if err != nil { + eip.SetError(err) + return nil, err + } + + out := make([]RecvdVal, 0, nvals) + for val := range valCh { + out = append(out, val) + } + + return out, ctx.Err() +} + +func (dht *IpfsDHT) getValues(ctx context.Context, key string, nvals int) (<-chan RecvdVal, error) { + vals := make(chan RecvdVal, 1) + + done := func(err error) (<-chan RecvdVal, error) { + defer close(vals) + return vals, err + } + + // If we have it local, don't bother doing an RPC! + lrec, err := dht.getLocal(key) + if err != nil { + // something is wrong with the datastore. + return done(err) + } + if lrec != nil { + // TODO: this is tricky, we don't always want to trust our own value + // what if the authoritative source updated it? + logger.Debug("have it locally") + vals <- RecvdVal{ + Val: lrec.GetValue(), + From: dht.self, + } + + if nvals == 0 || nvals == 1 { + return done(nil) + } + + nvals-- + } else if nvals == 0 { + return done(routing.ErrNotFound) + } + + // get closest peers in the routing table + rtp := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) + logger.Debugf("peers in rt: %d %s", len(rtp), rtp) + if len(rtp) == 0 { + logger.Warning("No peers from routing table!") + return done(kb.ErrLookupFailure) + } + + var valslock sync.Mutex + var got int + + // setup the Query + parent := ctx + query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + rec, peers, err := dht.getValueOrPeers(ctx, p, key) + switch err { + case routing.ErrNotFound: + // in this case, they responded with nothing, + // still send a notification so listeners can know the + // request has completed 'successfully' + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + }) + return nil, err + default: + return nil, err + + case nil, errInvalidRecord: + // in either of these cases, we want to keep going + } + + res := &dhtQueryResult{closerPeers: peers} + + if rec.GetValue() != nil || err == errInvalidRecord { + rv := RecvdVal{ + Val: rec.GetValue(), + From: p, + } + valslock.Lock() + select { + case vals <- rv: + case <-ctx.Done(): + valslock.Unlock() + return nil, ctx.Err() + } + got++ + + // If we have collected enough records, we're done + if nvals == got { + res.success = true + } + valslock.Unlock() + } + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: peers, + }) + + return res, nil + }) + + go func() { + reqCtx, cancel := context.WithTimeout(ctx, time.Minute) + defer cancel() + + _, err = query.Run(reqCtx, rtp) + + // We do have some values but we either ran out of peers to query or + // searched for a whole minute. + // + // We'll just call this a success. + if got > 0 && (err == routing.ErrNotFound || reqCtx.Err() == context.DeadlineExceeded) { + err = nil + } + done(err) + }() + + return vals, nil +} + +// Provider abstraction for indirect stores. +// Some DHTs store values directly, while an indirect store stores pointers to +// locations of the value, similarly to Coral and Mainline DHT. + +// Provide makes this node announce that it can provide a value for the given key +func (dht *IpfsDHT) Provide(ctx context.Context, key cid.Cid, brdcst bool) (err error) { + eip := logger.EventBegin(ctx, "Provide", key, logging.LoggableMap{"broadcast": brdcst}) + defer func() { + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // add self locally + dht.providers.AddProvider(ctx, key, dht.self) + if !brdcst { + return nil + } + + peers, err := dht.GetClosestPeers(ctx, key.KeyString()) + if err != nil { + return err + } + + mes, err := dht.makeProvRecord(key) + if err != nil { + return err + } + + wg := sync.WaitGroup{} + for p := range peers { + wg.Add(1) + go func(p peer.ID) { + defer wg.Done() + logger.Debugf("putProvider(%s, %s)", key, p) + err := dht.sendMessage(ctx, p, mes) + if err != nil { + logger.Debug(err) + } + }(p) + } + wg.Wait() + return nil +} +func (dht *IpfsDHT) makeProvRecord(skey cid.Cid) (*pb.Message, error) { + pi := pstore.PeerInfo{ + ID: dht.self, + Addrs: dht.host.Addrs(), + } + + // // only share WAN-friendly addresses ?? + // pi.Addrs = addrutil.WANShareableAddrs(pi.Addrs) + if len(pi.Addrs) < 1 { + return nil, fmt.Errorf("no known addresses for self. cannot put provider.") + } + + pmes := pb.NewMessage(pb.Message_ADD_PROVIDER, skey.Bytes(), 0) + pmes.ProviderPeers = pb.RawPeerInfosToPBPeers([]pstore.PeerInfo{pi}) + return pmes, nil +} + +// FindProviders searches until the context expires. +func (dht *IpfsDHT) FindProviders(ctx context.Context, c cid.Cid) ([]pstore.PeerInfo, error) { + var providers []pstore.PeerInfo + for p := range dht.FindProvidersAsync(ctx, c, KValue) { + providers = append(providers, p) + } + return providers, nil +} + +// FindProvidersAsync is the same thing as FindProviders, but returns a channel. +// Peers will be returned on the channel as soon as they are found, even before +// the search query completes. +func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan pstore.PeerInfo { + logger.Event(ctx, "findProviders", key) + peerOut := make(chan pstore.PeerInfo, count) + go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) + return peerOut +} + +func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key cid.Cid, count int, peerOut chan pstore.PeerInfo) { + defer logger.EventBegin(ctx, "findProvidersAsync", key).Done() + defer close(peerOut) + + ps := pset.NewLimited(count) + provs := dht.providers.GetProviders(ctx, key) + for _, p := range provs { + // NOTE: Assuming that this list of peers is unique + if ps.TryAdd(p) { + pi := dht.peerstore.PeerInfo(p) + select { + case peerOut <- pi: + case <-ctx.Done(): + return + } + } + + // If we have enough peers locally, don't bother with remote RPC + // TODO: is this a DOS vector? + if ps.Size() >= count { + return + } + } + + // setup the Query + parent := ctx + query := dht.newQuery(key.KeyString(), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + pmes, err := dht.findProvidersSingle(ctx, p, key) + if err != nil { + return nil, err + } + + logger.Debugf("%d provider entries", len(pmes.GetProviderPeers())) + provs := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) + logger.Debugf("%d provider entries decoded", len(provs)) + + // Add unique providers from request, up to 'count' + for _, prov := range provs { + if prov.ID != dht.self { + dht.peerstore.AddAddrs(prov.ID, prov.Addrs, pstore.TempAddrTTL) + } + logger.Debugf("got provider: %s", prov) + if ps.TryAdd(prov.ID) { + logger.Debugf("using provider: %s", prov) + select { + case peerOut <- *prov: + case <-ctx.Done(): + logger.Debug("context timed out sending more providers") + return nil, ctx.Err() + } + } + if ps.Size() >= count { + logger.Debugf("got enough providers (%d/%d)", ps.Size(), count) + return &dhtQueryResult{success: true}, nil + } + } + + // Give closer peers back to the query to be queried + closer := pmes.GetCloserPeers() + clpeers := pb.PBPeersToPeerInfos(closer) + logger.Debugf("got closer peers: %d %s", len(clpeers), clpeers) + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: clpeers, + }) + return &dhtQueryResult{closerPeers: clpeers}, nil + }) + + peers := dht.routingTable.NearestPeers(kb.ConvertKey(key.KeyString()), AlphaValue) + _, err := query.Run(ctx, peers) + if err != nil { + logger.Debugf("Query error: %s", err) + // Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032 + if fmt.Sprint(err) == "" { + logger.Error("reproduced bug 3032:") + logger.Errorf("Errors type information: %#v", err) + logger.Errorf("go version: %s", runtime.Version()) + logger.Error("please report this information to: https://github.com/ipfs/go-ipfs/issues/3032") + + // replace problematic error with something that won't crash the daemon + err = fmt.Errorf("") + } + notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ + Type: notif.QueryError, + Extra: err.Error(), + }) + } +} + +// FindPeer searches for a peer with given ID. +func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (_ pstore.PeerInfo, err error) { + eip := logger.EventBegin(ctx, "FindPeer", id) + defer func() { + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // Check if were already connected to them + if pi := dht.FindLocal(id); pi.ID != "" { + return pi, nil + } + + peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) + if len(peers) == 0 { + return pstore.PeerInfo{}, kb.ErrLookupFailure + } + + // Sanity... + for _, p := range peers { + if p == id { + logger.Debug("found target peer in list of closest peers...") + return dht.peerstore.PeerInfo(p), nil + } + } + + // setup the Query + parent := ctx + query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + pmes, err := dht.findPeerSingle(ctx, p, id) + if err != nil { + return nil, err + } + + closer := pmes.GetCloserPeers() + clpeerInfos := pb.PBPeersToPeerInfos(closer) + + // see if we got the peer here + for _, npi := range clpeerInfos { + if npi.ID == id { + return &dhtQueryResult{ + peer: npi, + success: true, + }, nil + } + } + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: clpeerInfos, + }) + + return &dhtQueryResult{closerPeers: clpeerInfos}, nil + }) + + // run it! + result, err := query.Run(ctx, peers) + if err != nil { + return pstore.PeerInfo{}, err + } + + logger.Debugf("FindPeer %v %v", id, result.success) + if result.peer.ID == "" { + return pstore.PeerInfo{}, routing.ErrNotFound + } + + return *result.peer, nil +} + +// FindPeersConnectedToPeer searches for peers directly connected to a given peer. +func (dht *IpfsDHT) FindPeersConnectedToPeer(ctx context.Context, id peer.ID) (<-chan *pstore.PeerInfo, error) { + + peerchan := make(chan *pstore.PeerInfo, asyncQueryBuffer) + peersSeen := make(map[peer.ID]struct{}) + var peersSeenMx sync.Mutex + + peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) + if len(peers) == 0 { + return nil, kb.ErrLookupFailure + } + + // setup the Query + query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + + pmes, err := dht.findPeerSingle(ctx, p, id) + if err != nil { + return nil, err + } + + var clpeers []*pstore.PeerInfo + closer := pmes.GetCloserPeers() + for _, pbp := range closer { + pi := pb.PBPeerToPeerInfo(pbp) + + // skip peers already seen + peersSeenMx.Lock() + if _, found := peersSeen[pi.ID]; found { + peersSeenMx.Unlock() + continue + } + peersSeen[pi.ID] = struct{}{} + peersSeenMx.Unlock() + + // if peer is connected, send it to our client. + if pb.Connectedness(pbp.Connection) == inet.Connected { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case peerchan <- pi: + } + } + + // if peer is the peer we're looking for, don't bother querying it. + // TODO maybe query it? + if pb.Connectedness(pbp.Connection) != inet.Connected { + clpeers = append(clpeers, pi) + } + } + + return &dhtQueryResult{closerPeers: clpeers}, nil + }) + + // run it! run it asynchronously to gen peers as results are found. + // this does no error checking + go func() { + if _, err := query.Run(ctx, peers); err != nil { + logger.Debug(err) + } + + // close the peerchan channel when done. + close(peerchan) + }() + + return peerchan, nil +} diff --git a/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing_options.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing_options.go new file mode 100644 index 0000000000..b52db74e6a --- /dev/null +++ b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/routing_options.go @@ -0,0 +1,31 @@ +package dht + +import ( + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" +) + +type quorumOptionKey struct{} + +const defaultQuorum = 16 + +// Quorum is a DHT option that tells the DHT how many peers it needs to get +// values from before returning the best one. +// +// Default: 16 +func Quorum(n int) ropts.Option { + return func(opts *ropts.Options) error { + if opts.Other == nil { + opts.Other = make(map[interface{}]interface{}, 1) + } + opts.Other[quorumOptionKey{}] = n + return nil + } +} + +func getQuorum(opts *ropts.Options, ndefault int) int { + responsesNeeded, ok := opts.Other[quorumOptionKey{}].(int) + if !ok { + responsesNeeded = ndefault + } + return responsesNeeded +} diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/util.go b/vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/util.go similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/util.go rename to vendor/gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht/util.go diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/node.go b/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/node.go deleted file mode 100644 index 00d15065f9..0000000000 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/node.go +++ /dev/null @@ -1,538 +0,0 @@ -package cbornode - -import ( - "encoding/json" - "errors" - "io" - "math" - "strconv" - "strings" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - node "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" -) - -// CBORTagLink is the integer used to represent tags in CBOR. -const CBORTagLink = 42 - -// Node represents an IPLD node. -type Node struct { - obj interface{} - tree []string - links []*node.Link - raw []byte - cid cid.Cid -} - -// Compile time check to make sure Node implements the node.Node interface -var _ node.Node = (*Node)(nil) - -var ( - // ErrNoSuchLink is returned when no link with the given name was found. - ErrNoSuchLink = errors.New("no such link found") - ErrNonLink = errors.New("non-link found at given path") - ErrInvalidLink = errors.New("link value should have been bytes") - ErrInvalidKeys = errors.New("map keys must be strings") - ErrArrayOutOfRange = errors.New("array index out of range") - ErrNoLinks = errors.New("tried to resolve through object that had no links") - ErrEmptyLink = errors.New("link value was empty") - ErrInvalidMultibase = errors.New("invalid multibase on IPLD link") - ErrNonStringLink = errors.New("link should have been a string") -) - -// DecodeBlock decodes a CBOR encoded Block into an IPLD Node. -// -// This method *does not* canonicalize and *will* preserve the CID. As a matter -// of fact, it will assume that `block.Cid()` returns the correct CID and will -// make no effort to validate this assumption. -// -// In general, you should not be calling this method directly. Instead, you -// should be calling the `Decode` method from the `go-ipld-format` package. That -// method will pick the right decoder based on the Block's CID. -// -// Note: This function keeps a reference to `block` and assumes that it is -// immutable. -func DecodeBlock(block blocks.Block) (node.Node, error) { - return decodeBlock(block) -} - -func decodeBlock(block blocks.Block) (*Node, error) { - var m interface{} - if err := DecodeInto(block.RawData(), &m); err != nil { - return nil, err - } - return newObject(block, m) -} - -func newObject(block blocks.Block, m interface{}) (*Node, error) { - tree, links, err := compute(m) - if err != nil { - return nil, err - } - - return &Node{ - obj: m, - tree: tree, - links: links, - raw: block.RawData(), - cid: block.Cid(), - }, nil -} - -var _ node.DecodeBlockFunc = DecodeBlock - -// Decode decodes a CBOR object into an IPLD Node. -// -// If passed a non-canonical CBOR node, this function will canonicalize it. -// Therefore, `bytes.Equal(b, Decode(b).RawData())` may not hold. If you already -// have a CID for this data and want to ensure that it doesn't change, you -// should use `DecodeBlock`. -// mhType is multihash code to use for hashing, for example mh.SHA2_256 -// -// Note: This function does not hold onto `b`. You may reuse it. -func Decode(b []byte, mhType uint64, mhLen int) (*Node, error) { - var m interface{} - if err := DecodeInto(b, &m); err != nil { - return nil, err - } - - // We throw away `b` here to ensure that we canonicalize the encoded - // CBOR object. - return WrapObject(m, mhType, mhLen) -} - -// DecodeInto decodes a serialized IPLD cbor object into the given object. -func DecodeInto(b []byte, v interface{}) error { - return unmarshaller.Unmarshal(b, v) -} - -// WrapObject converts an arbitrary object into a Node. -func WrapObject(m interface{}, mhType uint64, mhLen int) (*Node, error) { - data, err := marshaller.Marshal(m) - if err != nil { - return nil, err - } - - var obj interface{} - err = cloner.Clone(m, &obj) - if err != nil { - return nil, err - } - - if mhType == math.MaxUint64 { - mhType = mh.SHA2_256 - } - - hash, err := mh.Sum(data, mhType, mhLen) - if err != nil { - return nil, err - } - c := cid.NewCidV1(cid.DagCBOR, hash) - - block, err := blocks.NewBlockWithCid(data, c) - if err != nil { - // TODO: Shouldn't this just panic? - return nil, err - } - // No need to deserialize. We can just deep copy. - return newObject(block, obj) -} - -// Resolve resolves a given path, and returns the object found at the end, as well -// as the possible tail of the path that was not resolved. -func (n *Node) Resolve(path []string) (interface{}, []string, error) { - var cur interface{} = n.obj - for i, val := range path { - switch curv := cur.(type) { - case map[string]interface{}: - next, ok := curv[val] - if !ok { - return nil, nil, ErrNoSuchLink - } - - cur = next - case map[interface{}]interface{}: - next, ok := curv[val] - if !ok { - return nil, nil, ErrNoSuchLink - } - - cur = next - case []interface{}: - n, err := strconv.Atoi(val) - if err != nil { - return nil, nil, err - } - - if n < 0 || n >= len(curv) { - return nil, nil, ErrArrayOutOfRange - } - - cur = curv[n] - case cid.Cid: - return &node.Link{Cid: curv}, path[i:], nil - default: - return nil, nil, ErrNoLinks - } - } - - lnk, ok := cur.(cid.Cid) - if ok { - return &node.Link{Cid: lnk}, nil, nil - } - - jsonish, err := convertToJSONIsh(cur) - if err != nil { - return nil, nil, err - } - - return jsonish, nil, nil -} - -// Copy creates a copy of the Node. -func (n *Node) Copy() node.Node { - links := make([]*node.Link, len(n.links)) - copy(links, n.links) - - raw := make([]byte, len(n.raw)) - copy(raw, n.raw) - - tree := make([]string, len(n.tree)) - copy(tree, n.tree) - - return &Node{ - obj: copyObj(n.obj), - links: links, - raw: raw, - tree: tree, - cid: n.cid, - } -} - -func copyObj(i interface{}) interface{} { - switch i := i.(type) { - case map[string]interface{}: - out := make(map[string]interface{}) - for k, v := range i { - out[k] = copyObj(v) - } - return out - case map[interface{}]interface{}: - out := make(map[interface{}]interface{}) - for k, v := range i { - out[k] = copyObj(v) - } - return out - case []interface{}: - var out []interface{} - for _, v := range i { - out = append(out, copyObj(v)) - } - return out - default: - // TODO: do not be lazy - // being lazy for now - // use caution - return i - } -} - -// ResolveLink resolves a path and returns the raw Link at the end, as well as -// the possible tail of the path that was not resolved. -func (n *Node) ResolveLink(path []string) (*node.Link, []string, error) { - obj, rest, err := n.Resolve(path) - if err != nil { - return nil, nil, err - } - - lnk, ok := obj.(*node.Link) - if !ok { - return nil, rest, ErrNonLink - } - - return lnk, rest, nil -} - -// Tree returns a flattend array of paths at the given path for the given depth. -func (n *Node) Tree(path string, depth int) []string { - if path == "" && depth == -1 { - return n.tree - } - - var out []string - for _, t := range n.tree { - if !strings.HasPrefix(t, path) { - continue - } - - sub := strings.TrimLeft(t[len(path):], "/") - if sub == "" { - continue - } - - if depth < 0 { - out = append(out, sub) - continue - } - - parts := strings.Split(sub, "/") - if len(parts) <= depth { - out = append(out, sub) - } - } - return out -} - -func compute(obj interface{}) (tree []string, links []*node.Link, err error) { - err = traverse(obj, "", func(name string, val interface{}) error { - if name != "" { - tree = append(tree, name[1:]) - } - if lnk, ok := val.(cid.Cid); ok { - links = append(links, &node.Link{Cid: lnk}) - } - return nil - }) - if err != nil { - return nil, nil, err - } - - return tree, links, nil -} - -// Links lists all known links of the Node. -func (n *Node) Links() []*node.Link { - return n.links -} - -func traverse(obj interface{}, cur string, cb func(string, interface{}) error) error { - if err := cb(cur, obj); err != nil { - return err - } - - switch obj := obj.(type) { - case map[string]interface{}: - for k, v := range obj { - this := cur + "/" + k - if err := traverse(v, this, cb); err != nil { - return err - } - } - return nil - case map[interface{}]interface{}: - for k, v := range obj { - ks, ok := k.(string) - if !ok { - return errors.New("map key was not a string") - } - this := cur + "/" + ks - if err := traverse(v, this, cb); err != nil { - return err - } - } - return nil - case []interface{}: - for i, v := range obj { - this := cur + "/" + strconv.Itoa(i) - if err := traverse(v, this, cb); err != nil { - return err - } - } - return nil - default: - return nil - } -} - -// RawData returns the raw bytes that represent the Node as serialized CBOR. -func (n *Node) RawData() []byte { - return n.raw -} - -// Cid returns the canonical Cid of the NOde. -func (n *Node) Cid() cid.Cid { - return n.cid -} - -// Loggable returns a loggable representation of the Node. -func (n *Node) Loggable() map[string]interface{} { - return map[string]interface{}{ - "node_type": "cbor", - "cid": n.Cid(), - } -} - -// Size returns the size of the binary representation of the Node. -func (n *Node) Size() (uint64, error) { - return uint64(len(n.RawData())), nil -} - -// Stat returns stats about the Node. -// TODO: implement? -func (n *Node) Stat() (*node.NodeStat, error) { - return &node.NodeStat{}, nil -} - -// String returns the string representation of the CID of the Node. -func (n *Node) String() string { - return n.Cid().String() -} - -// MarshalJSON converts the Node into its JSON representation. -func (n *Node) MarshalJSON() ([]byte, error) { - out, err := convertToJSONIsh(n.obj) - if err != nil { - return nil, err - } - - return json.Marshal(out) -} - -// DumpObject marshals any object into its CBOR serialized byte representation -// TODO: rename -func DumpObject(obj interface{}) (out []byte, err error) { - return marshaller.Marshal(obj) -} - -func toSaneMap(n map[interface{}]interface{}) (interface{}, error) { - if lnk, ok := n["/"]; ok && len(n) == 1 { - lnkb, ok := lnk.([]byte) - if !ok { - return nil, ErrInvalidLink - } - - c, err := cid.Cast(lnkb) - if err != nil { - return nil, err - } - - return map[string]interface{}{"/": c}, nil - } - out := make(map[string]interface{}) - for k, v := range n { - ks, ok := k.(string) - if !ok { - return nil, ErrInvalidKeys - } - - obj, err := convertToJSONIsh(v) - if err != nil { - return nil, err - } - - out[ks] = obj - } - - return out, nil -} - -func convertToJSONIsh(v interface{}) (interface{}, error) { - switch v := v.(type) { - case map[interface{}]interface{}: - return toSaneMap(v) - case []interface{}: - var out []interface{} - if len(v) == 0 && v != nil { - return []interface{}{}, nil - } - for _, i := range v { - obj, err := convertToJSONIsh(i) - if err != nil { - return nil, err - } - - out = append(out, obj) - } - return out, nil - default: - return v, nil - } -} - -// FromJSON converts incoming JSON into a Node. -func FromJSON(r io.Reader, mhType uint64, mhLen int) (*Node, error) { - var m interface{} - err := json.NewDecoder(r).Decode(&m) - if err != nil { - return nil, err - } - - obj, err := convertToCborIshObj(m) - if err != nil { - return nil, err - } - - return WrapObject(obj, mhType, mhLen) -} - -func convertToCborIshObj(i interface{}) (interface{}, error) { - switch v := i.(type) { - case map[string]interface{}: - if len(v) == 0 && v != nil { - return v, nil - } - - if lnk, ok := v["/"]; ok && len(v) == 1 { - // special case for links - vstr, ok := lnk.(string) - if !ok { - return nil, ErrNonStringLink - } - - return cid.Decode(vstr) - } - - for a, b := range v { - val, err := convertToCborIshObj(b) - if err != nil { - return nil, err - } - - v[a] = val - } - return v, nil - case []interface{}: - if len(v) == 0 && v != nil { - return v, nil - } - - var out []interface{} - for _, o := range v { - obj, err := convertToCborIshObj(o) - if err != nil { - return nil, err - } - - out = append(out, obj) - } - - return out, nil - default: - return v, nil - } -} - -func castBytesToCid(x []byte) (cid.Cid, error) { - if len(x) == 0 { - return cid.Cid{}, ErrEmptyLink - } - - // TODO: manually doing multibase checking here since our deps don't - // support binary multibase yet - if x[0] != 0 { - return cid.Cid{}, ErrInvalidMultibase - } - - c, err := cid.Cast(x[1:]) - if err != nil { - return cid.Cid{}, ErrInvalidLink - } - - return c, nil -} - -func castCidToBytes(link cid.Cid) ([]byte, error) { - return append([]byte{0}, link.Bytes()...), nil -} diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/package.json b/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/package.json deleted file mode 100644 index 8468ab4545..0000000000 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-cbor-node" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipld-cbor" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd", - "name": "cbor", - "version": "0.2.3" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.7" - }, - { - "author": "why", - "hash": "QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML", - "name": "refmt", - "version": "1.1.1" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "", - "name": "go-ipld-cbor", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.5.4" -} - diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/coding.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/coding.go deleted file mode 100644 index 33dd578207..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/coding.go +++ /dev/null @@ -1,139 +0,0 @@ -package merkledag - -import ( - "fmt" - "sort" - "strings" - - "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - - pb "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// Make sure the user doesn't upgrade this file. -// We need to check *here* as well as inside the `pb` package *just* in case the -// user replaces *all* go files in that package. -const _ = pb.DoNotUpgradeFileEverItWillChangeYourHashes - -// for now, we use a PBNode intermediate thing. -// because native go objects are nice. - -// unmarshal decodes raw data into a *Node instance. -// The conversion uses an intermediate PBNode. -func (n *ProtoNode) unmarshal(encoded []byte) error { - var pbn pb.PBNode - if err := pbn.Unmarshal(encoded); err != nil { - return fmt.Errorf("unmarshal failed. %v", err) - } - - pbnl := pbn.GetLinks() - n.links = make([]*ipld.Link, len(pbnl)) - for i, l := range pbnl { - n.links[i] = &ipld.Link{Name: l.GetName(), Size: l.GetTsize()} - c, err := cid.Cast(l.GetHash()) - if err != nil { - return fmt.Errorf("link hash #%d is not valid multihash. %v", i, err) - } - n.links[i].Cid = c - } - sort.Stable(LinkSlice(n.links)) // keep links sorted - - n.data = pbn.GetData() - n.encoded = encoded - return nil -} - -// Marshal encodes a *Node instance into a new byte slice. -// The conversion uses an intermediate PBNode. -func (n *ProtoNode) Marshal() ([]byte, error) { - pbn := n.getPBNode() - data, err := pbn.Marshal() - if err != nil { - return data, fmt.Errorf("marshal failed. %v", err) - } - return data, nil -} - -func (n *ProtoNode) getPBNode() *pb.PBNode { - pbn := &pb.PBNode{} - if len(n.links) > 0 { - pbn.Links = make([]*pb.PBLink, len(n.links)) - } - - sort.Stable(LinkSlice(n.links)) // keep links sorted - for i, l := range n.links { - pbn.Links[i] = &pb.PBLink{} - pbn.Links[i].Name = &l.Name - pbn.Links[i].Tsize = &l.Size - if l.Cid.Defined() { - pbn.Links[i].Hash = l.Cid.Bytes() - } - } - - if len(n.data) > 0 { - pbn.Data = n.data - } - return pbn -} - -// EncodeProtobuf returns the encoded raw data version of a Node instance. -// It may use a cached encoded version, unless the force flag is given. -func (n *ProtoNode) EncodeProtobuf(force bool) ([]byte, error) { - sort.Stable(LinkSlice(n.links)) // keep links sorted - if n.encoded == nil || force { - n.cached = cid.Undef - var err error - n.encoded, err = n.Marshal() - if err != nil { - return nil, err - } - } - - if !n.cached.Defined() { - c, err := n.CidBuilder().Sum(n.encoded) - if err != nil { - return nil, err - } - - n.cached = c - } - - return n.encoded, nil -} - -// DecodeProtobuf decodes raw data and returns a new Node instance. -func DecodeProtobuf(encoded []byte) (*ProtoNode, error) { - n := new(ProtoNode) - err := n.unmarshal(encoded) - if err != nil { - return nil, fmt.Errorf("incorrectly formatted merkledag node: %s", err) - } - return n, nil -} - -// DecodeProtobufBlock is a block decoder for protobuf IPLD nodes conforming to -// node.DecodeBlockFunc -func DecodeProtobufBlock(b blocks.Block) (ipld.Node, error) { - c := b.Cid() - if c.Type() != cid.DagProtobuf { - return nil, fmt.Errorf("this function can only decode protobuf nodes") - } - - decnd, err := DecodeProtobuf(b.RawData()) - if err != nil { - if strings.Contains(err.Error(), "Unmarshal failed") { - return nil, fmt.Errorf("the block referred to by '%s' was not a valid merkledag node", c) - } - return nil, fmt.Errorf("failed to decode Protocol Buffers: %v", err) - } - - decnd.cached = c - decnd.SetCidBuilder(c.Prefix()) - return decnd, nil -} - -// Type assertion -var _ ipld.DecodeBlockFunc = DecodeProtobufBlock diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/merkledag.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/merkledag.go deleted file mode 100644 index be76e19905..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/merkledag.go +++ /dev/null @@ -1,473 +0,0 @@ -// Package merkledag implements the IPFS Merkle DAG data structures. -package merkledag - -import ( - "context" - "fmt" - "sync" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - ipldcbor "gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor" - bserv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" -) - -// TODO: We should move these registrations elsewhere. Really, most of the IPLD -// functionality should go in a `go-ipld` repo but that will take a lot of work -// and design. -func init() { - ipld.Register(cid.DagProtobuf, DecodeProtobufBlock) - ipld.Register(cid.Raw, DecodeRawBlock) - ipld.Register(cid.DagCBOR, ipldcbor.DecodeBlock) -} - -// contextKey is a type to use as value for the ProgressTracker contexts. -type contextKey string - -const progressContextKey contextKey = "progress" - -// NewDAGService constructs a new DAGService (using the default implementation). -// Note that the default implementation is also an ipld.LinkGetter. -func NewDAGService(bs bserv.BlockService) *dagService { - return &dagService{Blocks: bs} -} - -// dagService is an IPFS Merkle DAG service. -// - the root is virtual (like a forest) -// - stores nodes' data in a BlockService -// TODO: should cache Nodes that are in memory, and be -// able to free some of them when vm pressure is high -type dagService struct { - Blocks bserv.BlockService -} - -// Add adds a node to the dagService, storing the block in the BlockService -func (n *dagService) Add(ctx context.Context, nd ipld.Node) error { - if n == nil { // FIXME remove this assertion. protect with constructor invariant - return fmt.Errorf("dagService is nil") - } - - return n.Blocks.AddBlock(nd) -} - -func (n *dagService) AddMany(ctx context.Context, nds []ipld.Node) error { - blks := make([]blocks.Block, len(nds)) - for i, nd := range nds { - blks[i] = nd - } - return n.Blocks.AddBlocks(blks) -} - -// Get retrieves a node from the dagService, fetching the block in the BlockService -func (n *dagService) Get(ctx context.Context, c cid.Cid) (ipld.Node, error) { - if n == nil { - return nil, fmt.Errorf("dagService is nil") - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - b, err := n.Blocks.GetBlock(ctx, c) - if err != nil { - if err == bserv.ErrNotFound { - return nil, ipld.ErrNotFound - } - return nil, fmt.Errorf("failed to get block for %s: %v", c, err) - } - - return ipld.Decode(b) -} - -// GetLinks return the links for the node, the node doesn't necessarily have -// to exist locally. -func (n *dagService) GetLinks(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { - if c.Type() == cid.Raw { - return nil, nil - } - node, err := n.Get(ctx, c) - if err != nil { - return nil, err - } - return node.Links(), nil -} - -func (n *dagService) Remove(ctx context.Context, c cid.Cid) error { - return n.Blocks.DeleteBlock(c) -} - -// RemoveMany removes multiple nodes from the DAG. It will likely be faster than -// removing them individually. -// -// This operation is not atomic. If it returns an error, some nodes may or may -// not have been removed. -func (n *dagService) RemoveMany(ctx context.Context, cids []cid.Cid) error { - // TODO(#4608): make this batch all the way down. - for _, c := range cids { - if err := n.Blocks.DeleteBlock(c); err != nil { - return err - } - } - return nil -} - -// GetLinksDirect creates a function to get the links for a node, from -// the node, bypassing the LinkService. If the node does not exist -// locally (and can not be retrieved) an error will be returned. -func GetLinksDirect(serv ipld.NodeGetter) GetLinks { - return func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { - nd, err := serv.Get(ctx, c) - if err != nil { - if err == bserv.ErrNotFound { - err = ipld.ErrNotFound - } - return nil, err - } - return nd.Links(), nil - } -} - -type sesGetter struct { - bs *bserv.Session -} - -// Get gets a single node from the DAG. -func (sg *sesGetter) Get(ctx context.Context, c cid.Cid) (ipld.Node, error) { - blk, err := sg.bs.GetBlock(ctx, c) - switch err { - case bserv.ErrNotFound: - return nil, ipld.ErrNotFound - default: - return nil, err - case nil: - // noop - } - - return ipld.Decode(blk) -} - -// GetMany gets many nodes at once, batching the request if possible. -func (sg *sesGetter) GetMany(ctx context.Context, keys []cid.Cid) <-chan *ipld.NodeOption { - return getNodesFromBG(ctx, sg.bs, keys) -} - -// Session returns a NodeGetter using a new session for block fetches. -func (n *dagService) Session(ctx context.Context) ipld.NodeGetter { - return &sesGetter{bserv.NewSession(ctx, n.Blocks)} -} - -// FetchGraph fetches all nodes that are children of the given node -func FetchGraph(ctx context.Context, root cid.Cid, serv ipld.DAGService) error { - return FetchGraphWithDepthLimit(ctx, root, -1, serv) -} - -// FetchGraphWithDepthLimit fetches all nodes that are children to the given -// node down to the given depth. maxDetph=0 means "only fetch root", -// maxDepth=1 means "fetch root and its direct children" and so on... -// maxDepth=-1 means unlimited. -func FetchGraphWithDepthLimit(ctx context.Context, root cid.Cid, depthLim int, serv ipld.DAGService) error { - var ng ipld.NodeGetter = serv - ds, ok := serv.(*dagService) - if ok { - ng = &sesGetter{bserv.NewSession(ctx, ds.Blocks)} - } - - set := make(map[string]int) - - // Visit function returns true when: - // * The element is not in the set and we're not over depthLim - // * The element is in the set but recorded depth is deeper - // than currently seen (if we find it higher in the tree we'll need - // to explore deeper than before). - // depthLim = -1 means we only return true if the element is not in the - // set. - visit := func(c cid.Cid, depth int) bool { - key := string(c.Bytes()) - oldDepth, ok := set[key] - - if (ok && depthLim < 0) || (depthLim >= 0 && depth > depthLim) { - return false - } - - if !ok || oldDepth > depth { - set[key] = depth - return true - } - return false - } - - v, _ := ctx.Value(progressContextKey).(*ProgressTracker) - if v == nil { - return EnumerateChildrenAsyncDepth(ctx, GetLinksDirect(ng), root, 0, visit) - } - - visitProgress := func(c cid.Cid, depth int) bool { - if visit(c, depth) { - v.Increment() - return true - } - return false - } - return EnumerateChildrenAsyncDepth(ctx, GetLinksDirect(ng), root, 0, visitProgress) -} - -// GetMany gets many nodes from the DAG at once. -// -// This method may not return all requested nodes (and may or may not return an -// error indicating that it failed to do so. It is up to the caller to verify -// that it received all nodes. -func (n *dagService) GetMany(ctx context.Context, keys []cid.Cid) <-chan *ipld.NodeOption { - return getNodesFromBG(ctx, n.Blocks, keys) -} - -func dedupKeys(keys []cid.Cid) []cid.Cid { - set := cid.NewSet() - for _, c := range keys { - set.Add(c) - } - if set.Len() == len(keys) { - return keys - } - return set.Keys() -} - -func getNodesFromBG(ctx context.Context, bs bserv.BlockGetter, keys []cid.Cid) <-chan *ipld.NodeOption { - keys = dedupKeys(keys) - - out := make(chan *ipld.NodeOption, len(keys)) - blocks := bs.GetBlocks(ctx, keys) - var count int - - go func() { - defer close(out) - for { - select { - case b, ok := <-blocks: - if !ok { - if count != len(keys) { - out <- &ipld.NodeOption{Err: fmt.Errorf("failed to fetch all nodes")} - } - return - } - - nd, err := ipld.Decode(b) - if err != nil { - out <- &ipld.NodeOption{Err: err} - return - } - - out <- &ipld.NodeOption{Node: nd} - count++ - - case <-ctx.Done(): - out <- &ipld.NodeOption{Err: ctx.Err()} - return - } - } - }() - return out -} - -// GetLinks is the type of function passed to the EnumerateChildren function(s) -// for getting the children of an IPLD node. -type GetLinks func(context.Context, cid.Cid) ([]*ipld.Link, error) - -// GetLinksWithDAG returns a GetLinks function that tries to use the given -// NodeGetter as a LinkGetter to get the children of a given IPLD node. This may -// allow us to traverse the DAG without actually loading and parsing the node in -// question (if we already have the links cached). -func GetLinksWithDAG(ng ipld.NodeGetter) GetLinks { - return func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { - return ipld.GetLinks(ctx, ng, c) - } -} - -// EnumerateChildren will walk the dag below the given root node and add all -// unseen children to the passed in set. -// TODO: parallelize to avoid disk latency perf hits? -func EnumerateChildren(ctx context.Context, getLinks GetLinks, root cid.Cid, visit func(cid.Cid) bool) error { - visitDepth := func(c cid.Cid, depth int) bool { - return visit(c) - } - - return EnumerateChildrenDepth(ctx, getLinks, root, 0, visitDepth) -} - -// EnumerateChildrenDepth walks the dag below the given root and passes the -// current depth to a given visit function. The visit function can be used to -// limit DAG exploration. -func EnumerateChildrenDepth(ctx context.Context, getLinks GetLinks, root cid.Cid, depth int, visit func(cid.Cid, int) bool) error { - links, err := getLinks(ctx, root) - if err != nil { - return err - } - - for _, lnk := range links { - c := lnk.Cid - if visit(c, depth+1) { - err = EnumerateChildrenDepth(ctx, getLinks, c, depth+1, visit) - if err != nil { - return err - } - } - } - return nil -} - -// ProgressTracker is used to show progress when fetching nodes. -type ProgressTracker struct { - Total int - lk sync.Mutex -} - -// DeriveContext returns a new context with value "progress" derived from -// the given one. -func (p *ProgressTracker) DeriveContext(ctx context.Context) context.Context { - return context.WithValue(ctx, progressContextKey, p) -} - -// Increment adds one to the total progress. -func (p *ProgressTracker) Increment() { - p.lk.Lock() - defer p.lk.Unlock() - p.Total++ -} - -// Value returns the current progress. -func (p *ProgressTracker) Value() int { - p.lk.Lock() - defer p.lk.Unlock() - return p.Total -} - -// FetchGraphConcurrency is total number of concurrent fetches that -// 'fetchNodes' will start at a time -var FetchGraphConcurrency = 8 - -// EnumerateChildrenAsync is equivalent to EnumerateChildren *except* that it -// fetches children in parallel. -// -// NOTE: It *does not* make multiple concurrent calls to the passed `visit` function. -func EnumerateChildrenAsync(ctx context.Context, getLinks GetLinks, c cid.Cid, visit func(cid.Cid) bool) error { - visitDepth := func(c cid.Cid, depth int) bool { - return visit(c) - } - - return EnumerateChildrenAsyncDepth(ctx, getLinks, c, 0, visitDepth) -} - -// EnumerateChildrenAsyncDepth is equivalent to EnumerateChildrenDepth *except* -// that it fetches children in parallel (down to a maximum depth in the graph). -// -// NOTE: It *does not* make multiple concurrent calls to the passed `visit` function. -func EnumerateChildrenAsyncDepth(ctx context.Context, getLinks GetLinks, c cid.Cid, startDepth int, visit func(cid.Cid, int) bool) error { - type cidDepth struct { - cid cid.Cid - depth int - } - - type linksDepth struct { - links []*ipld.Link - depth int - } - - feed := make(chan *cidDepth) - out := make(chan *linksDepth) - done := make(chan struct{}) - - var setlk sync.Mutex - - errChan := make(chan error) - fetchersCtx, cancel := context.WithCancel(ctx) - - defer cancel() - - for i := 0; i < FetchGraphConcurrency; i++ { - go func() { - for cdepth := range feed { - ci := cdepth.cid - depth := cdepth.depth - - setlk.Lock() - shouldVisit := visit(ci, depth) - setlk.Unlock() - - if shouldVisit { - links, err := getLinks(ctx, ci) - if err != nil { - errChan <- err - return - } - - outLinks := &linksDepth{ - links: links, - depth: depth + 1, - } - - select { - case out <- outLinks: - case <-fetchersCtx.Done(): - return - } - } - select { - case done <- struct{}{}: - case <-fetchersCtx.Done(): - } - } - }() - } - defer close(feed) - - send := feed - var todobuffer []*cidDepth - var inProgress int - - next := &cidDepth{ - cid: c, - depth: startDepth, - } - for { - select { - case send <- next: - inProgress++ - if len(todobuffer) > 0 { - next = todobuffer[0] - todobuffer = todobuffer[1:] - } else { - next = nil - send = nil - } - case <-done: - inProgress-- - if inProgress == 0 && next == nil { - return nil - } - case linksDepth := <-out: - for _, lnk := range linksDepth.links { - cd := &cidDepth{ - cid: lnk.Cid, - depth: linksDepth.depth, - } - - if next == nil { - next = cd - send = feed - } else { - todobuffer = append(todobuffer, cd) - } - } - case err := <-errChan: - return err - - case <-ctx.Done(): - return ctx.Err() - } - } - -} - -var _ ipld.LinkGetter = &dagService{} -var _ ipld.NodeGetter = &dagService{} -var _ ipld.NodeGetter = &sesGetter{} -var _ ipld.DAGService = &dagService{} diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/node.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/node.go deleted file mode 100644 index 62cd354c0d..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/node.go +++ /dev/null @@ -1,385 +0,0 @@ -package merkledag - -import ( - "context" - "encoding/json" - "fmt" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// Common errors -var ( - ErrNotProtobuf = fmt.Errorf("expected protobuf dag node") - ErrLinkNotFound = fmt.Errorf("no link by that name") -) - -// ProtoNode represents a node in the IPFS Merkle DAG. -// nodes have opaque data and a set of navigable links. -type ProtoNode struct { - links []*ipld.Link - data []byte - - // cache encoded/marshaled value - encoded []byte - - cached cid.Cid - - // builder specifies cid version and hashing function - builder cid.Builder -} - -var v0CidPrefix = cid.Prefix{ - Codec: cid.DagProtobuf, - MhLength: -1, - MhType: mh.SHA2_256, - Version: 0, -} - -var v1CidPrefix = cid.Prefix{ - Codec: cid.DagProtobuf, - MhLength: -1, - MhType: mh.SHA2_256, - Version: 1, -} - -// V0CidPrefix returns a prefix for CIDv0 -func V0CidPrefix() cid.Prefix { return v0CidPrefix } - -// V1CidPrefix returns a prefix for CIDv1 with the default settings -func V1CidPrefix() cid.Prefix { return v1CidPrefix } - -// PrefixForCidVersion returns the Protobuf prefix for a given CID version -func PrefixForCidVersion(version int) (cid.Prefix, error) { - switch version { - case 0: - return v0CidPrefix, nil - case 1: - return v1CidPrefix, nil - default: - return cid.Prefix{}, fmt.Errorf("unknown CID version: %d", version) - } -} - -// CidBuilder returns the CID Builder for this ProtoNode, it is never nil -func (n *ProtoNode) CidBuilder() cid.Builder { - if n.builder == nil { - n.builder = v0CidPrefix - } - return n.builder -} - -// SetCidBuilder sets the CID builder if it is non nil, if nil then it -// is reset to the default value -func (n *ProtoNode) SetCidBuilder(builder cid.Builder) { - if builder == nil { - n.builder = v0CidPrefix - } else { - n.builder = builder.WithCodec(cid.DagProtobuf) - n.encoded = nil - n.cached = cid.Undef - } -} - -// LinkSlice is a slice of ipld.Links -type LinkSlice []*ipld.Link - -func (ls LinkSlice) Len() int { return len(ls) } -func (ls LinkSlice) Swap(a, b int) { ls[a], ls[b] = ls[b], ls[a] } -func (ls LinkSlice) Less(a, b int) bool { return ls[a].Name < ls[b].Name } - -// NodeWithData builds a new Protonode with the given data. -func NodeWithData(d []byte) *ProtoNode { - return &ProtoNode{data: d} -} - -// AddNodeLink adds a link to another node. -func (n *ProtoNode) AddNodeLink(name string, that ipld.Node) error { - n.encoded = nil - - lnk, err := ipld.MakeLink(that) - if err != nil { - return err - } - - lnk.Name = name - - n.AddRawLink(name, lnk) - - return nil -} - -// AddRawLink adds a copy of a link to this node -func (n *ProtoNode) AddRawLink(name string, l *ipld.Link) error { - n.encoded = nil - n.links = append(n.links, &ipld.Link{ - Name: name, - Size: l.Size, - Cid: l.Cid, - }) - - return nil -} - -// RemoveNodeLink removes a link on this node by the given name. -func (n *ProtoNode) RemoveNodeLink(name string) error { - n.encoded = nil - - ref := n.links[:0] - found := false - - for _, v := range n.links { - if v.Name != name { - ref = append(ref, v) - } else { - found = true - } - } - - if !found { - return ipld.ErrNotFound - } - - n.links = ref - - return nil -} - -// GetNodeLink returns a copy of the link with the given name. -func (n *ProtoNode) GetNodeLink(name string) (*ipld.Link, error) { - for _, l := range n.links { - if l.Name == name { - return &ipld.Link{ - Name: l.Name, - Size: l.Size, - Cid: l.Cid, - }, nil - } - } - return nil, ErrLinkNotFound -} - -// GetLinkedProtoNode returns a copy of the ProtoNode with the given name. -func (n *ProtoNode) GetLinkedProtoNode(ctx context.Context, ds ipld.DAGService, name string) (*ProtoNode, error) { - nd, err := n.GetLinkedNode(ctx, ds, name) - if err != nil { - return nil, err - } - - pbnd, ok := nd.(*ProtoNode) - if !ok { - return nil, ErrNotProtobuf - } - - return pbnd, nil -} - -// GetLinkedNode returns a copy of the IPLD Node with the given name. -func (n *ProtoNode) GetLinkedNode(ctx context.Context, ds ipld.DAGService, name string) (ipld.Node, error) { - lnk, err := n.GetNodeLink(name) - if err != nil { - return nil, err - } - - return lnk.GetNode(ctx, ds) -} - -// Copy returns a copy of the node. -// NOTE: Does not make copies of Node objects in the links. -func (n *ProtoNode) Copy() ipld.Node { - nnode := new(ProtoNode) - if len(n.data) > 0 { - nnode.data = make([]byte, len(n.data)) - copy(nnode.data, n.data) - } - - if len(n.links) > 0 { - nnode.links = make([]*ipld.Link, len(n.links)) - copy(nnode.links, n.links) - } - - nnode.builder = n.builder - - return nnode -} - -// RawData returns the protobuf-encoded version of the node. -func (n *ProtoNode) RawData() []byte { - out, _ := n.EncodeProtobuf(false) - return out -} - -// Data returns the data stored by this node. -func (n *ProtoNode) Data() []byte { - return n.data -} - -// SetData stores data in this nodes. -func (n *ProtoNode) SetData(d []byte) { - n.encoded = nil - n.cached = cid.Undef - n.data = d -} - -// UpdateNodeLink return a copy of the node with the link name set to point to -// that. If a link of the same name existed, it is removed. -func (n *ProtoNode) UpdateNodeLink(name string, that *ProtoNode) (*ProtoNode, error) { - newnode := n.Copy().(*ProtoNode) - _ = newnode.RemoveNodeLink(name) // ignore error - err := newnode.AddNodeLink(name, that) - return newnode, err -} - -// Size returns the total size of the data addressed by node, -// including the total sizes of references. -func (n *ProtoNode) Size() (uint64, error) { - b, err := n.EncodeProtobuf(false) - if err != nil { - return 0, err - } - - s := uint64(len(b)) - for _, l := range n.links { - s += l.Size - } - return s, nil -} - -// Stat returns statistics on the node. -func (n *ProtoNode) Stat() (*ipld.NodeStat, error) { - enc, err := n.EncodeProtobuf(false) - if err != nil { - return nil, err - } - - cumSize, err := n.Size() - if err != nil { - return nil, err - } - - return &ipld.NodeStat{ - Hash: n.Cid().String(), - NumLinks: len(n.links), - BlockSize: len(enc), - LinksSize: len(enc) - len(n.data), // includes framing. - DataSize: len(n.data), - CumulativeSize: int(cumSize), - }, nil -} - -// Loggable implements the ipfs/go-log.Loggable interface. -func (n *ProtoNode) Loggable() map[string]interface{} { - return map[string]interface{}{ - "node": n.String(), - } -} - -// UnmarshalJSON reads the node fields from a JSON-encoded byte slice. -func (n *ProtoNode) UnmarshalJSON(b []byte) error { - s := struct { - Data []byte `json:"data"` - Links []*ipld.Link `json:"links"` - }{} - - err := json.Unmarshal(b, &s) - if err != nil { - return err - } - - n.data = s.Data - n.links = s.Links - return nil -} - -// MarshalJSON returns a JSON representation of the node. -func (n *ProtoNode) MarshalJSON() ([]byte, error) { - out := map[string]interface{}{ - "data": n.data, - "links": n.links, - } - - return json.Marshal(out) -} - -// Cid returns the node's Cid, calculated according to its prefix -// and raw data contents. -func (n *ProtoNode) Cid() cid.Cid { - if n.encoded != nil && n.cached.Defined() { - return n.cached - } - - c, err := n.builder.Sum(n.RawData()) - if err != nil { - // programmer error - err = fmt.Errorf("invalid CID of length %d: %x: %v", len(n.RawData()), n.RawData(), err) - panic(err) - } - - n.cached = c - return c -} - -// String prints the node's Cid. -func (n *ProtoNode) String() string { - return n.Cid().String() -} - -// Multihash hashes the encoded data of this node. -func (n *ProtoNode) Multihash() mh.Multihash { - // NOTE: EncodeProtobuf generates the hash and puts it in n.cached. - _, err := n.EncodeProtobuf(false) - if err != nil { - // Note: no possibility exists for an error to be returned through here - panic(err) - } - - return n.cached.Hash() -} - -// Links returns the node links. -func (n *ProtoNode) Links() []*ipld.Link { - return n.links -} - -// SetLinks replaces the node links with the given ones. -func (n *ProtoNode) SetLinks(links []*ipld.Link) { - n.links = links -} - -// Resolve is an alias for ResolveLink. -func (n *ProtoNode) Resolve(path []string) (interface{}, []string, error) { - return n.ResolveLink(path) -} - -// ResolveLink consumes the first element of the path and obtains the link -// corresponding to it from the node. It returns the link -// and the path without the consumed element. -func (n *ProtoNode) ResolveLink(path []string) (*ipld.Link, []string, error) { - if len(path) == 0 { - return nil, nil, fmt.Errorf("end of path, no more links to resolve") - } - - lnk, err := n.GetNodeLink(path[0]) - if err != nil { - return nil, nil, err - } - - return lnk, path[1:], nil -} - -// Tree returns the link names of the ProtoNode. -// ProtoNodes are only ever one path deep, so anything different than an empty -// string for p results in nothing. The depth parameter is ignored. -func (n *ProtoNode) Tree(p string, depth int) []string { - if p != "" { - return nil - } - - out := make([]string, 0, len(n.links)) - for _, lnk := range n.links { - out = append(out, lnk.Name) - } - return out -} diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/package.json b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/package.json deleted file mode 100644 index 736c620c75..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-merkledag" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-merkledag" - }, - "gxDependencies": [ - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "whyrusleeping", - "hash": "QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf", - "name": "go-ipld-cbor", - "version": "1.5.4" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "hsanjuan", - "hash": "QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb", - "name": "go-ipfs-exchange-offline", - "version": "0.1.3" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "why", - "hash": "QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8", - "name": "go-blockservice", - "version": "1.1.13" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-merkledag", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.15" -} - diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.pb.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.pb.go deleted file mode 100644 index b3042cc31e..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/pb/merkledag.pb.go +++ /dev/null @@ -1,810 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: merkledag.proto -// DO NOT EDIT! - -/* - Package merkledag_pb is a generated protocol buffer package. - - It is generated from these files: - merkledag.proto - - It has these top-level messages: - PBLink - PBNode -*/ -package merkledag_pb - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import math "math" - -// discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.pb" - -import io "io" -import fmt "fmt" -import github_com_gogo_protobuf_proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - -import strings "strings" -import reflect "reflect" - -import sort "sort" -import strconv "strconv" - -import bytes "bytes" - -// DoNotUpgradeFileEverItWillChangeYourHashes warns users about not breaking -// their file hashes. -const DoNotUpgradeFileEverItWillChangeYourHashes = ` -This file does not produce canonical protobufs. Unfortunately, if we change it, -we'll change the hashes of the files we produce. - -Do *not regenerate this file. -` - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = math.Inf - -// An IPFS MerkleDAG Link -type PBLink struct { - // multihash of the target object - Hash []byte `protobuf:"bytes,1,opt" json:"Hash,omitempty"` - // utf string name. should be unique per object - Name *string `protobuf:"bytes,2,opt" json:"Name,omitempty"` - // cumulative size of target object - Tsize *uint64 `protobuf:"varint,3,opt" json:"Tsize,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PBLink) Reset() { *m = PBLink{} } -func (*PBLink) ProtoMessage() {} - -func (m *PBLink) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *PBLink) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *PBLink) GetTsize() uint64 { - if m != nil && m.Tsize != nil { - return *m.Tsize - } - return 0 -} - -// An IPFS MerkleDAG Node -type PBNode struct { - // refs to other objects - Links []*PBLink `protobuf:"bytes,2,rep" json:"Links,omitempty"` - // opaque user data - Data []byte `protobuf:"bytes,1,opt" json:"Data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PBNode) Reset() { *m = PBNode{} } -func (*PBNode) ProtoMessage() {} - -func (m *PBNode) GetLinks() []*PBLink { - if m != nil { - return m.Links - } - return nil -} - -func (m *PBNode) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func init() { -} -func (m *PBLink) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append([]byte{}, data[index:postIndex]...) - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Tsize", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Tsize = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } - } - return nil -} -func (m *PBNode) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &PBLink{}) - m.Links[len(m.Links)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[index:postIndex]...) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } - } - return nil -} -func (this *PBLink) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PBLink{`, - `Hash:` + valueToStringMerkledag(this.Hash) + `,`, - `Name:` + valueToStringMerkledag(this.Name) + `,`, - `Tsize:` + valueToStringMerkledag(this.Tsize) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PBNode) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PBNode{`, - `Links:` + strings.Replace(fmt.Sprintf("%v", this.Links), "PBLink", "PBLink", 1) + `,`, - `Data:` + valueToStringMerkledag(this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMerkledag(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *PBLink) Size() (n int) { - var l int - _ = l - if m.Hash != nil { - l = len(m.Hash) - n += 1 + l + sovMerkledag(uint64(l)) - } - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMerkledag(uint64(l)) - } - if m.Tsize != nil { - n += 1 + sovMerkledag(uint64(*m.Tsize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PBNode) Size() (n int) { - var l int - _ = l - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovMerkledag(uint64(l)) - } - } - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovMerkledag(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMerkledag(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMerkledag(x uint64) (n int) { - return sovMerkledag(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func NewPopulatedPBLink(r randyMerkledag, easy bool) *PBLink { - this := &PBLink{} - if r.Intn(10) != 0 { - v1 := r.Intn(100) - this.Hash = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Hash[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v2 := randStringMerkledag(r) - this.Name = &v2 - } - if r.Intn(10) != 0 { - v3 := uint64(r.Uint32()) - this.Tsize = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMerkledag(r, 4) - } - return this -} - -func NewPopulatedPBNode(r randyMerkledag, easy bool) *PBNode { - this := &PBNode{} - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Links = make([]*PBLink, v4) - for i := 0; i < v4; i++ { - this.Links[i] = NewPopulatedPBLink(r, easy) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.Data = make([]byte, v5) - for i := 0; i < v5; i++ { - this.Data[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMerkledag(r, 3) - } - return this -} - -type randyMerkledag interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMerkledag(r randyMerkledag) rune { - return rune(r.Intn(126-43) + 43) -} -func randStringMerkledag(r randyMerkledag) string { - v6 := r.Intn(100) - tmps := make([]rune, v6) - for i := 0; i < v6; i++ { - tmps[i] = randUTF8RuneMerkledag(r) - } - return string(tmps) -} -func randUnrecognizedMerkledag(r randyMerkledag, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMerkledag(data, r, fieldNumber, wire) - } - return data -} -func randFieldMerkledag(data []byte, r randyMerkledag, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMerkledag(data, uint64(key)) - v7 := r.Int63() - if r.Intn(2) == 0 { - v7 *= -1 - } - data = encodeVarintPopulateMerkledag(data, uint64(v7)) - case 1: - data = encodeVarintPopulateMerkledag(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMerkledag(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMerkledag(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMerkledag(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMerkledag(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *PBLink) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *PBLink) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Hash != nil { - data[i] = 0xa - i++ - i = encodeVarintMerkledag(data, i, uint64(len(m.Hash))) - i += copy(data[i:], m.Hash) - } - if m.Name != nil { - data[i] = 0x12 - i++ - i = encodeVarintMerkledag(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.Tsize != nil { - data[i] = 0x18 - i++ - i = encodeVarintMerkledag(data, i, uint64(*m.Tsize)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *PBNode) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *PBNode) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if len(m.Links) > 0 { - for _, msg := range m.Links { - data[i] = 0x12 - i++ - i = encodeVarintMerkledag(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Data != nil { - data[i] = 0xa - i++ - i = encodeVarintMerkledag(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Merkledag(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Merkledag(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMerkledag(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (this *PBLink) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&merkledag_pb.PBLink{` + - `Hash:` + valueToGoStringMerkledag(this.Hash, "byte"), - `Name:` + valueToGoStringMerkledag(this.Name, "string"), - `Tsize:` + valueToGoStringMerkledag(this.Tsize, "uint64"), - `XXX_unrecognized:` + fmt.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *PBNode) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&merkledag_pb.PBNode{` + - `Links:` + fmt.Sprintf("%#v", this.Links), - `Data:` + valueToGoStringMerkledag(this.Data, "byte"), - `XXX_unrecognized:` + fmt.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func valueToGoStringMerkledag(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMerkledag(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (this *PBLink) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PBLink) - if !ok { - return fmt.Errorf("that is not of type *PBLink") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PBLink but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PBLinkbut is not nil && this == nil") - } - if !bytes.Equal(this.Hash, that1.Hash) { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Tsize != nil && that1.Tsize != nil { - if *this.Tsize != *that1.Tsize { - return fmt.Errorf("Tsize this(%v) Not Equal that(%v)", *this.Tsize, *that1.Tsize) - } - } else if this.Tsize != nil { - return fmt.Errorf("this.Tsize == nil && that.Tsize != nil") - } else if that1.Tsize != nil { - return fmt.Errorf("Tsize this(%v) Not Equal that(%v)", this.Tsize, that1.Tsize) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *PBLink) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PBLink) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Hash, that1.Hash) { - return false - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false - } - if this.Tsize != nil && that1.Tsize != nil { - if *this.Tsize != *that1.Tsize { - return false - } - } else if this.Tsize != nil { - return false - } else if that1.Tsize != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PBNode) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PBNode) - if !ok { - return fmt.Errorf("that is not of type *PBNode") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PBNode but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PBNodebut is not nil && this == nil") - } - if len(this.Links) != len(that1.Links) { - return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) - } - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *PBNode) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PBNode) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return false - } - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/session.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/session.go deleted file mode 100644 index 9c76284f76..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/session.go +++ /dev/null @@ -1,21 +0,0 @@ -package merkledag - -import ( - "context" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// SessionMaker is an object that can generate a new fetching session. -type SessionMaker interface { - Session(context.Context) ipld.NodeGetter -} - -// NewSession returns a session backed NodeGetter if the given NodeGetter -// implements SessionMaker. -func NewSession(ctx context.Context, g ipld.NodeGetter) ipld.NodeGetter { - if sm, ok := g.(SessionMaker); ok { - return sm.Session(ctx) - } - return g -} diff --git a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/test/utils.go b/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/test/utils.go deleted file mode 100644 index 8c86c747b9..0000000000 --- a/vendor/gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag/test/utils.go +++ /dev/null @@ -1,23 +0,0 @@ -package mdutils - -import ( - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - offline "gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline" - bsrv "gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dssync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" -) - -// Mock returns a new thread-safe, mock DAGService. -func Mock() ipld.DAGService { - return dag.NewDAGService(Bserv()) -} - -// Bserv returns a new, thread-safe, mock BlockService. -func Bserv() bsrv.BlockService { - bstore := blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore())) - return bsrv.New(bstore, offline.Exchange(bstore)) -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/.travis.yml b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/.travis.yml deleted file mode 100644 index 0ae8956bd7..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: required - -os: - - linux - - osx - -language: go -go: - - 1.10.x - -install: - - make deps - -script: - - make test-xbuild - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/README.md b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/README.md deleted file mode 100644 index a313b97e6e..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# go-reuseport - -[![travisbadge](https://travis-ci.org/libp2p/go-reuseport.svg)](https://travis-ci.org/libp2p/go-reuseport) - -This package enables listening and dialing from _the same_ TCP or UDP port. -This means that the following sockopts are set: - -``` -SO_REUSEADDR -SO_REUSEPORT -``` - -- godoc: https://godoc.org/github.com/libp2p/go-reuseport - -This is a simple package to get around the problem of reusing addresses. -The go `net` package (to my knowledge) does not allow setting socket options. -This is particularly problematic when attempting to do TCP NAT holepunching, -which requires a process to both Listen and Dial on the same TCP port. -This package makes this possible for me. It is a pretty narrow use case, but -perhaps this package can grow to be more general over time. - -## Examples - - -```Go -// listen on the same port. oh yeah. -l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") -l2, _ := reuse.Listen("tcp", "127.0.0.1:1234") -``` - -```Go -// dial from the same port. oh yeah. -l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") -l2, _ := reuse.Listen("tcp", "127.0.0.1:1235") -c, _ := reuse.Dial("tcp", "127.0.0.1:1234", "127.0.0.1:1235") -``` - -**Note: cant dial self because tcp/ip stacks use 4-tuples to identify connections, and doing so would clash.** - -## Tested - -Tested on `darwin` and `linux`. diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/available_unix.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/available_unix.go deleted file mode 100644 index 85447a114f..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/available_unix.go +++ /dev/null @@ -1,47 +0,0 @@ -// +build darwin freebsd dragonfly netbsd openbsd linux - -package reuseport - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "sync" - "syscall" - "time" - - sockaddrnet "gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net" -) - -var ( - hasReusePort bool - didReusePort sync.Once -) - -// Available returns whether or not SO_REUSEPORT is available in the OS. -// It does so by attepting to open a tcp socket, setting the option, and -// checking ENOPROTOOPT on error. After checking, the decision is cached -// for the rest of the process run. -func available() bool { - didReusePort.Do(checkReusePort) - return hasReusePort -} - -func checkReusePort() { - // there may be fluke reasons to fail to open a socket. - // so we give it 5 shots. if not, give up and call it not avail. - for i := 0; i < 5; i++ { - // try to setup a TCP socket. - fd, err := socket(sockaddrnet.AF_INET, sockaddrnet.SOCK_STREAM, sockaddrnet.IPPROTO_TCP) - if err == nil { - unix.Close(fd) - hasReusePort = true - return - } - - if errno, ok := err.(syscall.Errno); ok && errno == unix.ENOPROTOOPT { - return // :( that's all folks. - } - - // not an errno? or not ENOPROTOOPT? retry. - time.Sleep(20 * time.Millisecond) // wait a bit - } -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_unix.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_unix.go deleted file mode 100644 index 62fe13410f..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_unix.go +++ /dev/null @@ -1,399 +0,0 @@ -// +build darwin freebsd dragonfly netbsd openbsd linux - -package reuseport - -import ( - "context" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "net" - "os" - "strconv" - "syscall" - "time" - - sockaddrnet "gx/ipfs/QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze/go-sockaddr/net" - "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll" -) - -const ( - filePrefix = "port." -) - -// Wrapper around the socket system call that marks the returned file -// descriptor as nonblocking and close-on-exec. -func socket(family, socktype, protocol int) (fd int, err error) { - syscall.ForkLock.RLock() - fd, err = unix.Socket(family, socktype, protocol) - if err == nil { - unix.CloseOnExec(fd) - } - syscall.ForkLock.RUnlock() - - if err != nil { - return -1, err - } - - // cant set it until after connect - // if err = unix.SetNonblock(fd, true); err != nil { - // unix.Close(fd) - // return -1, err - // } - - if err = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEADDR, 1); err != nil { - unix.Close(fd) - return -1, err - } - - if err = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEPORT, 1); err != nil { - unix.Close(fd) - return -1, err - } - - // set setLinger to 5 as reusing exact same (srcip:srcport, dstip:dstport) - // will otherwise fail on connect. - if err = setLinger(fd, 5); err != nil { - unix.Close(fd) - return -1, err - } - - return fd, nil -} - -func dial(ctx context.Context, dialer net.Dialer, netw, addr string) (c net.Conn, err error) { - var ( - fd int - lfamily int - rfamily int - socktype int - lprotocol int - rprotocol int - file *os.File - deadline time.Time - remoteSockaddr unix.Sockaddr - localSockaddr unix.Sockaddr - ) - - netAddr, err := ResolveAddr(netw, addr) - if err != nil { - return nil, err - } - - switch netAddr.(type) { - case *net.TCPAddr, *net.UDPAddr: - default: - return nil, ErrUnsupportedProtocol - } - - switch { - case !dialer.Deadline.IsZero(): - deadline = dialer.Deadline - case dialer.Timeout != 0: - deadline = time.Now().Add(dialer.Timeout) - } - - ctxdeadline, ok := ctx.Deadline() - if ok && ctxdeadline.Before(deadline) { - deadline = ctxdeadline - } - - localSockaddr = sockaddrnet.NetAddrToSockaddr(dialer.LocalAddr) - remoteSockaddr = sockaddrnet.NetAddrToSockaddr(netAddr) - - rfamily = sockaddrnet.NetAddrAF(netAddr) - rprotocol = sockaddrnet.NetAddrIPPROTO(netAddr) - socktype = sockaddrnet.NetAddrSOCK(netAddr) - - if dialer.LocalAddr != nil { - switch dialer.LocalAddr.(type) { - case *net.TCPAddr, *net.UDPAddr: - default: - return nil, ErrUnsupportedProtocol - } - - // check family and protocols match. - lfamily = sockaddrnet.NetAddrAF(dialer.LocalAddr) - lprotocol = sockaddrnet.NetAddrIPPROTO(dialer.LocalAddr) - if lfamily != rfamily || lprotocol != rprotocol { - return nil, &net.AddrError{Err: "unexpected address type", Addr: netAddr.String()} - } - } - - // look at dialTCP in http://golang.org/src/net/tcpsock_posix.go .... ! - // here we just try again 3 times. - for i := 0; i < 3; i++ { - if !deadline.IsZero() && deadline.Before(time.Now()) { - err = errTimeout - break - } - - if fd, err = socket(rfamily, socktype, rprotocol); err != nil { - return nil, err - } - - if localSockaddr != nil { - if err = unix.Bind(fd, localSockaddr); err != nil { - unix.Close(fd) - return nil, err - } - } - - if err = unix.SetNonblock(fd, true); err != nil { - unix.Close(fd) - return nil, err - } - - if err = connect(ctx, fd, remoteSockaddr, deadline); err != nil { - unix.Close(fd) - if ctx.Err() != nil { - return nil, ctx.Err() - } - continue // try again. - } - - break - } - if err != nil { - return nil, err - } - - if rprotocol == unix.IPPROTO_TCP { - sa, err := unix.Getsockname(fd) - if err != nil { - unix.Close(fd) - return nil, err - } - ra, err := unix.Getpeername(fd) - if err != nil { - unix.Close(fd) - return nil, err - } - - // Need to call setLinger 0. Otherwise, the close will block for the linger period. Linux bug? - switch s := sa.(type) { - case *unix.SockaddrInet4: - if r, ok := ra.(*unix.SockaddrInet4); ok && r.Addr == s.Addr && r.Port == s.Port { - setLinger(fd, 0) - unix.Close(fd) - return nil, ErrDialSelf - } - case *unix.SockaddrInet6: - if r, ok := ra.(*unix.SockaddrInet6); ok && r.Addr == s.Addr && r.Port == s.Port && r.ZoneId == s.ZoneId { - setLinger(fd, 0) - unix.Close(fd) - return nil, ErrDialSelf - } - } - - // by default golang/net sets TCP no delay to true. - if err = setNoDelay(fd, true); err != nil { - unix.Close(fd) - return nil, err - } - } - - // NOTE:XXX: never call unix.Close on fd after os.NewFile - file = os.NewFile(uintptr(fd), filePrefix+strconv.Itoa(os.Getpid())) - fd = -1 // so we don't touch it, we handled the control to Golang with NewFile - if c, err = net.FileConn(file); err != nil { - _ = file.Close() // shouldn't error either way - return nil, err - } - - if err = file.Close(); err != nil { - c.Close() - return nil, err - } - - // c = wrapConnWithRemoteAddr(c, netAddr) - return c, err -} - -func listen(netw, addr string) (fd int, err error) { - var ( - family int - socktype int - protocol int - sockaddr unix.Sockaddr - ) - - netAddr, err := ResolveAddr(netw, addr) - if err != nil { - return -1, err - } - - switch netAddr.(type) { - case *net.TCPAddr, *net.UDPAddr: - default: - return -1, ErrUnsupportedProtocol - } - - family = sockaddrnet.NetAddrAF(netAddr) - protocol = sockaddrnet.NetAddrIPPROTO(netAddr) - sockaddr = sockaddrnet.NetAddrToSockaddr(netAddr) - socktype = sockaddrnet.NetAddrSOCK(netAddr) - - if fd, err = socket(family, socktype, protocol); err != nil { - return -1, err - } - - if err = unix.Bind(fd, sockaddr); err != nil { - unix.Close(fd) - return -1, err - } - - if protocol == unix.IPPROTO_TCP { - // by default golang/net sets TCP no delay to true. - if err = setNoDelay(fd, true); err != nil { - unix.Close(fd) - return -1, err - } - } - - if err = unix.SetNonblock(fd, true); err != nil { - unix.Close(fd) - return -1, err - } - - return fd, nil -} - -func listenStream(netw, addr string) (l net.Listener, err error) { - var ( - file *os.File - ) - - fd, err := listen(netw, addr) - if err != nil { - return nil, err - } - - // Set backlog size to the maximum - if err = unix.Listen(fd, unix.SOMAXCONN); err != nil { - unix.Close(fd) - return nil, err - } - - file = os.NewFile(uintptr(fd), filePrefix+strconv.Itoa(os.Getpid())) - if l, err = net.FileListener(file); err != nil { - unix.Close(fd) - return nil, err - } - - if err = file.Close(); err != nil { - unix.Close(fd) - l.Close() - return nil, err - } - - return l, err -} - -func listenPacket(netw, addr string) (p net.PacketConn, err error) { - var ( - file *os.File - ) - - fd, err := listen(netw, addr) - if err != nil { - return nil, err - } - - file = os.NewFile(uintptr(fd), filePrefix+strconv.Itoa(os.Getpid())) - if p, err = net.FilePacketConn(file); err != nil { - unix.Close(fd) - return nil, err - } - - if err = file.Close(); err != nil { - unix.Close(fd) - p.Close() - return nil, err - } - - return p, err -} - -func listenUDP(netw, addr string) (c net.Conn, err error) { - var ( - file *os.File - ) - - fd, err := listen(netw, addr) - if err != nil { - return nil, err - } - - file = os.NewFile(uintptr(fd), filePrefix+strconv.Itoa(os.Getpid())) - if c, err = net.FileConn(file); err != nil { - unix.Close(fd) - return nil, err - } - - if err = file.Close(); err != nil { - unix.Close(fd) - return nil, err - } - - return c, err -} - -// this is close to the connect() function inside stdlib/net -func connect(ctx context.Context, fd int, ra unix.Sockaddr, deadline time.Time) error { - if !deadline.IsZero() { - var cancel context.CancelFunc - ctx, cancel = context.WithDeadline(ctx, deadline) - defer cancel() - } - - switch err := unix.Connect(fd, ra); err { - case unix.EINPROGRESS, unix.EALREADY, unix.EINTR: - case nil, unix.EISCONN: - if !deadline.IsZero() && deadline.Before(time.Now()) { - return errTimeout - } - if ctx.Err() != nil { - return ctx.Err() - } - return nil - default: - return err - } - - for { - if err := singlepoll.PollPark(ctx, fd, "w"); err != nil { - return err - } - - // if err := fd.pd.WaitWrite(); err != nil { - // return err - // } - // i'd use the above fd.pd.WaitWrite to poll io correctly, just like net sockets... - // but of course, it uses the damn runtime_* functions that _cannot_ be used by - // non-go-stdlib source... seriously guys, this is not nice. - // we're relegated to using unix.Select (what nightmare that is) or using - // a simple but totally bogus time-based wait. such garbage. - nerr, err := unix.GetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_ERROR) - if err != nil { - return err - } - switch err = syscall.Errno(nerr); err { - case unix.EINPROGRESS, unix.EALREADY, unix.EINTR: - continue - case syscall.Errno(0), unix.EISCONN: - if !deadline.IsZero() && deadline.Before(time.Now()) { - return errTimeout - } - return nil - default: - return err - } - } -} - -var errTimeout = &timeoutError{} - -type timeoutError struct{} - -func (e *timeoutError) Error() string { return "i/o timeout" } -func (e *timeoutError) Timeout() bool { return true } -func (e *timeoutError) Temporary() bool { return true } diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_windows.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_windows.go deleted file mode 100644 index cd6fde3a29..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/impl_windows.go +++ /dev/null @@ -1,31 +0,0 @@ -package reuseport - -import ( - "context" - "net" -) - -// TODO. for now, just pass it over to net.Listen/net.Dial - -func listen(network, address string) (net.Listener, error) { - return net.Listen(network, address) -} - -func listenPacket(netw, laddr string) (net.PacketConn, error) { - return net.ListenPacket(netw, laddr) -} - -func listenStream(netw, addr string) (net.Listener, error) { - return listen(netw, addr) -} - -func dial(ctx context.Context, dialer net.Dialer, network, address string) (net.Conn, error) { - return dialer.DialContext(ctx, network, address) -} - -// on windows, we just use the regular functions. sources -// vary on this-- some claim port reuse behavior is on by default -// on some windows systems. So we try. may the force be with you. -func available() bool { - return true -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/interface.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/interface.go deleted file mode 100644 index 9980d6635a..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/interface.go +++ /dev/null @@ -1,118 +0,0 @@ -// Package reuseport provides Listen and Dial functions that set socket options -// in order to be able to reuse ports. You should only use this package if you -// know what SO_REUSEADDR and SO_REUSEPORT are. -// -// For example: -// -// // listen on the same port. oh yeah. -// l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") -// l2, _ := reuse.Listen("tcp", "127.0.0.1:1234") -// -// // dial from the same port. oh yeah. -// l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") -// l2, _ := reuse.Listen("tcp", "127.0.0.1:1235") -// c, _ := reuse.Dial("tcp", "127.0.0.1:1234", "127.0.0.1:1235") -// -// Note: cant dial self because tcp/ip stacks use 4-tuples to identify connections, -// and doing so would clash. -package reuseport - -import ( - "context" - "errors" - "net" - "syscall" - "time" -) - -// Available returns whether or not SO_REUSEPORT is available in the OS. -// It does so by attepting to open a tcp listener, setting the option, and -// checking ENOPROTOOPT on error. After checking, the decision is cached -// for the rest of the process run. -func Available() bool { - return available() -} - -// ErrUnsuportedProtocol signals that the protocol is not currently -// supported by this package. This package currently only supports TCP. -var ErrUnsupportedProtocol = errors.New("protocol not yet supported") - -// ErrReuseFailed is returned if a reuse attempt was unsuccessful. -var ErrReuseFailed = errors.New("reuse failed") - -// ErrDialSelf is returned if we connect to our own source address. -var ErrDialSelf = errors.New("dialed our own socket") - -// Listen listens at the given network and address. see net.Listen -// Returns a net.Listener created from a file discriptor for a socket -// with SO_REUSEPORT and SO_REUSEADDR option set. -func Listen(network, address string) (net.Listener, error) { - if !available() { - return nil, syscall.ENOPROTOOPT - } - - return listenStream(network, address) -} - -// ListenPacket listens at the given network and address. see net.ListenPacket -// Returns a net.Listener created from a file discriptor for a socket -// with SO_REUSEPORT and SO_REUSEADDR option set. -func ListenPacket(network, address string) (net.PacketConn, error) { - if !available() { - return nil, syscall.ENOPROTOOPT - } - - return listenPacket(network, address) -} - -// Dial dials the given network and address. see net.Dialer.Dial -// Returns a net.Conn created from a file discriptor for a socket -// with SO_REUSEPORT and SO_REUSEADDR option set. -func Dial(network, laddr, raddr string) (net.Conn, error) { - if !available() { - return nil, syscall.ENOPROTOOPT - } - - var d Dialer - if laddr != "" { - netladdr, err := ResolveAddr(network, laddr) - if err != nil { - return nil, err - } - d.D.LocalAddr = netladdr - } - - return d.Dial(network, raddr) -} - -// Dialer is used to specify the Dial options, much like net.Dialer. -// We simply wrap a net.Dialer. -type Dialer struct { - D net.Dialer -} - -// Dial dials the given network and address. see net.Dialer.Dial -// Returns a net.Conn created from a file discriptor for a socket -// with SO_REUSEPORT and SO_REUSEADDR option set. -func (d *Dialer) Dial(network, address string) (net.Conn, error) { - return d.DialContext(context.Background(), network, address) -} - -func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { - if !available() { - return nil, syscall.ENOPROTOOPT - } - - return dial(ctx, d.D, network, address) -} - -func (d *Dialer) deadline(def time.Duration) time.Time { - switch { - case !d.D.Deadline.IsZero(): - return d.D.Deadline - case d.D.Timeout != 0: - return time.Now().Add(d.D.Timeout) - default: - return time.Now().Add(def) - } -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/opts_posix.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/opts_posix.go deleted file mode 100644 index 02f1a3c30b..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/opts_posix.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package reuseport - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "os" -) - -func boolint(b bool) int { - if b { - return 1 - } - return 0 -} - -func setNoDelay(fd int, noDelay bool) error { - return os.NewSyscallError("setsockopt", unix.SetsockoptInt(fd, unix.IPPROTO_TCP, unix.TCP_NODELAY, boolint(noDelay))) -} - -func setLinger(fd int, sec int) error { - var l unix.Linger - if sec >= 0 { - l.Onoff = 1 - l.Linger = int32(sec) - } else { - l.Onoff = 0 - l.Linger = 0 - } - return os.NewSyscallError("setsockopt", unix.SetsockoptLinger(fd, unix.SOL_SOCKET, unix.SO_LINGER, &l)) -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/package.json b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/package.json deleted file mode 100644 index caefb17001..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-reuseport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-reuseport" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmNzEyX7vjWiqinyLeavcAF1oegav6dZ1aQpAkYvG9m5Ze", - "name": "go-sockaddr", - "version": "1.0.3" - }, - { - "author": "whyrusleeping", - "hash": "QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3", - "name": "eventfd", - "version": "0.1.0" - }, - { - "author": "The Go Authors", - "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", - "name": "sys", - "version": "0.2.0" - } - ], - "gxVersion": "0.9.0", - "language": "go", - "license": "", - "name": "go-reuseport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.18" -} - diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/error.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/error.go deleted file mode 100644 index c13fb81327..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/error.go +++ /dev/null @@ -1,9 +0,0 @@ -package poll - -var errTimeout = &timeoutError{} - -type timeoutError struct{} - -func (e *timeoutError) Error() string { return "i/o timeout" } -func (e *timeoutError) Timeout() bool { return true } -func (e *timeoutError) Temporary() bool { return true } diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint32.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint32.go deleted file mode 100644 index cc80212018..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint32.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build amd64p32 386 arm - -package poll - -type uintp = uint32 diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint64.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint64.go deleted file mode 100644 index a444d85c64..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/platform_uint64.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build amd64 arm64 ppc64 ppc64le - -package poll - -type uintp = uint64 diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_bsd.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_bsd.go deleted file mode 100644 index 052a331e28..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_bsd.go +++ /dev/null @@ -1,58 +0,0 @@ -// +build darwin freebsd dragonfly netbsd openbsd - -package poll - -import ( - "context" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "time" -) - -type Poller struct { - kqfd int - event unix.Kevent_t -} - -func New(fd int) (p *Poller, err error) { - p = &Poller{} - - p.kqfd, err = unix.Kqueue() - if p.kqfd == -1 || err != nil { - return nil, err - } - - p.event = unix.Kevent_t{ - Ident: uintp(fd), - Filter: unix.EVFILT_WRITE, - Flags: unix.EV_ADD | unix.EV_ENABLE | unix.EV_ONESHOT, - } - return p, nil -} - -func (p *Poller) Close() error { - return unix.Close(p.kqfd) -} - -func (p *Poller) WaitWriteCtx(ctx context.Context) error { - deadline, _ := ctx.Deadline() - - // setup timeout - var timeout *unix.Timespec - if !deadline.IsZero() { - d := deadline.Sub(time.Now()) - t := unix.NsecToTimespec(d.Nanoseconds()) - timeout = &t - } - - // wait on kevent - events := make([]unix.Kevent_t, 1) - n, err := unix.Kevent(p.kqfd, []unix.Kevent_t{p.event}, events, timeout) - if err != nil { - return err - } - - if n < 1 { - return errTimeout - } - return nil -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_linux.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_linux.go deleted file mode 100644 index 0abeb1c9a3..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_linux.go +++ /dev/null @@ -1,131 +0,0 @@ -// +build linux - -package poll - -import ( - "context" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "sync" - - "gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd" -) - -type Poller struct { - epfd int - - eventMain unix.EpollEvent - eventWait unix.EpollEvent - events []unix.EpollEvent - - wake *eventfd.EventFD // Use eventfd to wakeup epoll - wakeMutex sync.Mutex -} - -func New(fd int) (p *Poller, err error) { - p = &Poller{ - events: make([]unix.EpollEvent, 32), - } - if p.epfd, err = unix.EpollCreate1(0); err != nil { - return nil, err - } - wake, err := eventfd.New() - if err != nil { - unix.Close(p.epfd) - return nil, err - } - p.wake = wake - - p.eventMain.Events = unix.EPOLLOUT - p.eventMain.Fd = int32(fd) - if err = unix.EpollCtl(p.epfd, unix.EPOLL_CTL_ADD, fd, &p.eventMain); err != nil { - p.Close() - return nil, err - } - - // poll that eventfd can be read - p.eventWait.Events = unix.EPOLLIN - p.eventWait.Fd = int32(wake.Fd()) - if err = unix.EpollCtl(p.epfd, unix.EPOLL_CTL_ADD, wake.Fd(), &p.eventWait); err != nil { - p.wake.Close() - p.Close() - return nil, err - } - - return p, nil -} - -func (p *Poller) Close() error { - p.wakeMutex.Lock() - err1 := p.wake.Close() - // set wake to nil to be sure that we won't call write on closed wake - // it should never happen but if someone changes something this might show a bug - p.wake = nil - p.wakeMutex.Unlock() - - err2 := unix.Close(p.epfd) - if err1 != nil { - return err1 - } else { - return err2 - } -} - -func (p *Poller) WaitWriteCtx(ctx context.Context) error { - doneChan := make(chan struct{}) - defer close(doneChan) - - go func() { - select { - case <-doneChan: - return - case <-ctx.Done(): - select { - case <-doneChan: - // if we re done with this function do not write to p.wake - // it might be already closed and the fd could be reopened for - // different purpose - return - default: - } - p.wakeMutex.Lock() - if p.wake != nil { - p.wake.WriteEvents(1) // send event to wake up epoll - } - // if it is nil then we already closed - p.wakeMutex.Unlock() - return - } - - }() - - n, err := unix.EpollWait(p.epfd, p.events, -1) - if err != nil { - return err - } - good := false - for i := 0; i < n; i++ { - ev := p.events[i] - switch ev.Fd { - case p.eventMain.Fd: - good = true - case p.eventWait.Fd: - p.wakeMutex.Lock() - p.wake.ReadEvents() // clear eventfd - p.wakeMutex.Unlock() - default: - // shouldn't happen as epoll should onlt return events we registered - } - } - if good { - // in case both eventMain and eventWait are lit, we got with eventMain - // as it is the success condition here and if both of them are returned - // at the same time it means that socket connected right as context timed out - return nil - } - if ctx.Err() == nil { - // notification is sent by other goroutine when context deadline was reached - // if we are here it means that we got notification but the deadline wasn't reached - panic("notification but no deadline, this should be impossible") - } - return ctx.Err() -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_unsupported.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_unsupported.go deleted file mode 100644 index bc0e5ed83f..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll/poll_unsupported.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build windows plan9 - -package poll - -import ( - "errors" -) - -func WaitWrite(fd int) error { - return errors.New("platform not supported") -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/ctx.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/ctx.go deleted file mode 100644 index 58e854526f..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/ctx.go +++ /dev/null @@ -1,9 +0,0 @@ -package singlepoll - -import "context" - -var backgroundctx, backgroundcancel = context.WithCancel(context.Background()) - -func CloseBackgroundProcesses() { - backgroundcancel() -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/default.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/default.go deleted file mode 100644 index 2cc746e17b..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/default.go +++ /dev/null @@ -1,28 +0,0 @@ -// +build !linux - -package singlepoll - -import ( - "context" - "errors" - - "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/poll" -) - -var ( - ErrUnsupportedMode error = errors.New("only 'w' mode is supported on this arch") -) - -func PollPark(ctx context.Context, fd int, mode string) error { - if mode != "w" { - return ErrUnsupportedMode - } - - p, err := poll.New(fd) - if err != nil { - return err - } - defer p.Close() - - return p.WaitWriteCtx(ctx) -} diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/linux.go b/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/linux.go deleted file mode 100644 index d5af773de8..0000000000 --- a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/singlepoll/linux.go +++ /dev/null @@ -1,202 +0,0 @@ -// +build linux - -package singlepoll - -import ( - "context" - "errors" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "sync" - - "gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var ( - ErrUnsupportedMode error = errors.New("only 'w' and 'r' modes are supported on this arch") -) - -var ( - initOnce sync.Once - workChan chan interface{} - log logging.EventLogger = logging.Logger("reuseport-poll") -) - -type addPoll struct { - fd int - events uint32 - ctx context.Context - wakeUp chan<- error -} - -type ctxDone struct { - fd int -} - -func PollPark(reqctx context.Context, fd int, mode string) error { - initOnce.Do(func() { - workChan = make(chan interface{}, 128) - go worker() - }) - - events := uint32(0) - for _, c := range mode { - switch c { - case 'w': - events |= unix.EPOLLOUT - case 'r': - events |= unix.EPOLLIN - default: - return ErrUnsupportedMode - } - } - - wakeUp := make(chan error) - workChan <- addPoll{ - fd: fd, - events: events, - ctx: reqctx, - wakeUp: wakeUp, - } - - return <-wakeUp -} - -func criticalError(msg string, err error) { - log.Errorf("%s: %s.", msg, err.Error()) - log.Errorf("This is critical error, please report it at https://github.com/libp2p/go-reuseport/issues/new") - log.Errorf("Bailing out. You are on your own. Good luck.") - - for { - select { - case <-backgroundctx.Done(): - return - case unit := <-workChan: - switch u := unit.(type) { - case addPoll: - u.wakeUp <- err - default: - } - } - } -} - -func worker() { - epfd, err := unix.EpollCreate1(0) - if err != nil { - criticalError("EpollCreate1(0) failed", err) - } - evfd, err := eventfd.New() - if err != nil { - criticalError("eventfd.New() failed", err) - } - - pool := make(map[int]addPoll) - - { - event := unix.EpollEvent{ - Events: unix.EPOLLIN, - Fd: int32(evfd.Fd()), - } - unix.EpollCtl(epfd, unix.EPOLL_CTL_ADD, evfd.Fd(), &event) - } - go poller(epfd, evfd) - - remove := func(fd int) *addPoll { - unit, ok := pool[fd] - if ok { - unix.EpollCtl(epfd, unix.EPOLL_CTL_DEL, unit.fd, nil) - delete(pool, fd) - close(unit.wakeUp) - } - return &unit - } - for { - select { - case <-backgroundctx.Done(): - evfd.WriteEvents(1) - return - case unit := <-workChan: - switch u := unit.(type) { - case addPoll: - event := unix.EpollEvent{ - Events: u.events | unix.EPOLLONESHOT, - Fd: int32(u.fd), - } - - // Make copies for *I* before we add it to Epoll group - wrapWakeUp := make(chan error) - wakeUp := u.wakeUp - u.wakeUp = wrapWakeUp - - if _, ok := pool[u.fd]; ok { - panic("duplicate fd") // safe guard against bad close calls - } - pool[u.fd] = u - - err := unix.EpollCtl(epfd, unix.EPOLL_CTL_ADD, u.fd, &event) - if err != nil { - delete(pool, u.fd) - u.wakeUp <- err - } - - // *I* - reqCtx := u.ctx - fd := u.fd - - go func() { - select { - case err := <-wrapWakeUp: - wakeUp <- err - case <-reqCtx.Done(): - workChan <- ctxDone{ - fd: fd, - } - <-wrapWakeUp - wakeUp <- reqCtx.Err() - } - }() - - case []unix.EpollEvent: - for _, event := range u { - remove(int(event.Fd)) - } - case ctxDone: - remove(u.fd) - } - } - } - -} - -func poller(epfd int, evfd *eventfd.EventFD) { - for { - // do not reuse the array as we will be passing it over channel - // 128 is quite arbitrary - // to small and number of EpollWait calls would increase - // to big and GC overhead increases - events := make([]unix.EpollEvent, 128) - n, err := unix.EpollWait(epfd, events, -1) - - switch err { - case nil: - // everything is great - case unix.EINTR: - // ignore - continue - default: - // log - log.Errorf("EpollWait returned error: %s. Continuing.", err.Error()) - continue - } - - for i := 0; i < n; i++ { - if int(events[i].Fd) == evfd.Fd() { - unix.Close(epfd) - evfd.Close() - return - } - } - workChan <- events[:n] - } -} diff --git a/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/.travis.yml b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/.travis.yml new file mode 100644 index 0000000000..81e30e037b --- /dev/null +++ b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/LICENSE b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/LICENSE rename to vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/LICENSE diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/Makefile b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/Makefile similarity index 100% rename from vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/Makefile rename to vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/Makefile diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/README.md b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/README.md similarity index 100% rename from vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/README.md rename to vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/README.md diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/bw_stats.go b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/bw_stats.go similarity index 97% rename from vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/bw_stats.go rename to vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/bw_stats.go index cf0d9935f1..e85cfe18a7 100644 --- a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/bw_stats.go +++ b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/bw_stats.go @@ -2,7 +2,7 @@ package metrics import ( flow "gx/ipfs/QmQFXpvKpF34dK9HcE7k8Ksk8V4BwWYZtdEcjzu5aUgRVr/go-flow-metrics" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" ) diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/codecov.yml b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/codecov.yml rename to vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/codecov.yml diff --git a/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/interface.go b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/interface.go new file mode 100644 index 0000000000..04ebd14d71 --- /dev/null +++ b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/interface.go @@ -0,0 +1,16 @@ +package metrics + +import ( + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" +) + +type Reporter interface { + LogSentMessage(int64) + LogRecvMessage(int64) + LogSentMessageStream(int64, protocol.ID, peer.ID) + LogRecvMessageStream(int64, protocol.ID, peer.ID) + GetBandwidthForPeer(peer.ID) Stats + GetBandwidthForProtocol(protocol.ID) Stats + GetBandwidthTotals() Stats +} diff --git a/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/package.json b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/package.json new file mode 100644 index 0000000000..e4ac0ee4ce --- /dev/null +++ b/vendor/gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics/package.json @@ -0,0 +1,36 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-metrics" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-metrics" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "Stebalien", + "hash": "QmQFXpvKpF34dK9HcE7k8Ksk8V4BwWYZtdEcjzu5aUgRVr", + "name": "go-flow-metrics", + "version": "0.2.0" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "", + "name": "go-libp2p-metrics", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.1.14" +} + diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/LICENSE b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/LICENSE rename to vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/LICENSE diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/README.md b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/README.md similarity index 100% rename from vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/README.md rename to vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/README.md diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index-uncat.html b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html similarity index 91% rename from vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index-uncat.html rename to vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html index 0f233a11df..2baa1ff714 100644 --- a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index-uncat.html +++ b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html @@ -19,6 +19,9 @@ .ipfs-icon { width:16px; } + .ipfs-hash { + color: #999; + } {{ .Path }} @@ -33,6 +36,11 @@
Index of {{ .Path }} + {{ if .Hash }} +
+ {{ .Hash }} +
+ {{ end }}
diff --git a/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html new file mode 100644 index 0000000000..ec52e84d7f --- /dev/null +++ b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html @@ -0,0 +1,68 @@ + + + + + + + {{ .Path }} + + + +
+
+
+
+ Index of {{ .Path }} + {{ if .Hash }} +
+ {{ .Hash }} +
+ {{ end }} +
+
+ + + + + + {{ range .Listing }} + + + + + + {{ end }} +
+
 
+
+ .. +
+
 
+
+ {{ .Name }} + {{ .Size }}
+
+ + + diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/index.go b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/index.go similarity index 100% rename from vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/index.go rename to vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/index.go diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/knownIcons.txt b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt similarity index 98% rename from vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/knownIcons.txt rename to vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt index 6615f9c396..b151fc02af 100644 --- a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/knownIcons.txt +++ b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt @@ -23,6 +23,7 @@ .iso .java .jpg +.jpeg .js .key .less diff --git a/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json new file mode 100644 index 0000000000..52ae83190c --- /dev/null +++ b/vendor/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json @@ -0,0 +1,18 @@ +{ + "author": "lgierth", + "bugs": { + "url": "https://github.com/ipfs/dir-index-html" + }, + "gx": { + "dvcsimport": "github.com/ipfs/dir-index-html", + "goversion": "1.5.2" + }, + "gxDependencies": [], + "gxVersion": "0.14.0", + "language": "go", + "license": "MIT", + "name": "dir-index-html", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.0.4" +} + diff --git a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/package.json b/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/package.json deleted file mode 100644 index d16b09fcfa..0000000000 --- a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-path" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-path" - }, - "gxDependencies": [ - { - "author": "why", - "hash": "QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc", - "name": "go-merkledag", - "version": "1.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-path", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.16" -} - diff --git a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/path.go b/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/path.go deleted file mode 100644 index f9868cf480..0000000000 --- a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/path.go +++ /dev/null @@ -1,181 +0,0 @@ -// Package path contains utilities to work with ipfs paths. -package path - -import ( - "errors" - "path" - "strings" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -var ( - // ErrBadPath is returned when a given path is incorrectly formatted - ErrBadPath = errors.New("invalid 'ipfs ref' path") - - // ErrNoComponents is used when Paths after a protocol - // do not contain at least one component - ErrNoComponents = errors.New( - "path must contain at least one component") -) - -// A Path represents an ipfs content path: -// * //path/to/file -// * /ipfs/ -// * /ipns//path/to/folder -// * etc -type Path string - -// ^^^ -// TODO: debate making this a private struct wrapped in a public interface -// would allow us to control creation, and cache segments. - -// FromString safely converts a string type to a Path type. -func FromString(s string) Path { - return Path(s) -} - -// FromCid safely converts a cid.Cid type to a Path type. -func FromCid(c cid.Cid) Path { - return Path("/ipfs/" + c.String()) -} - -// Segments returns the different elements of a path -// (elements are delimited by a /). -func (p Path) Segments() []string { - cleaned := path.Clean(string(p)) - segments := strings.Split(cleaned, "/") - - // Ignore leading slash - if len(segments[0]) == 0 { - segments = segments[1:] - } - - return segments -} - -// String converts a path to string. -func (p Path) String() string { - return string(p) -} - -// IsJustAKey returns true if the path is of the form or /ipfs/, or -// /ipld/ -func (p Path) IsJustAKey() bool { - parts := p.Segments() - return len(parts) == 2 && (parts[0] == "ipfs" || parts[0] == "ipld") -} - -// PopLastSegment returns a new Path without its final segment, and the final -// segment, separately. If there is no more to pop (the path is just a key), -// the original path is returned. -func (p Path) PopLastSegment() (Path, string, error) { - - if p.IsJustAKey() { - return p, "", nil - } - - segs := p.Segments() - newPath, err := ParsePath("/" + strings.Join(segs[:len(segs)-1], "/")) - if err != nil { - return "", "", err - } - - return newPath, segs[len(segs)-1], nil -} - -// FromSegments returns a path given its different segments. -func FromSegments(prefix string, seg ...string) (Path, error) { - return ParsePath(prefix + strings.Join(seg, "/")) -} - -// ParsePath returns a well-formed ipfs Path. -// The returned path will always be prefixed with /ipfs/ or /ipns/. -// The prefix will be added if not present in the given string. -// This function will return an error when the given string is -// not a valid ipfs path. -func ParsePath(txt string) (Path, error) { - parts := strings.Split(txt, "/") - if len(parts) == 1 { - kp, err := ParseCidToPath(txt) - if err == nil { - return kp, nil - } - } - - // if the path doesnt begin with a '/' - // we expect this to start with a hash, and be an 'ipfs' path - if parts[0] != "" { - if _, err := ParseCidToPath(parts[0]); err != nil { - return "", ErrBadPath - } - // The case when the path starts with hash without a protocol prefix - return Path("/ipfs/" + txt), nil - } - - if len(parts) < 3 { - return "", ErrBadPath - } - - if parts[1] == "ipfs" { - if _, err := ParseCidToPath(parts[2]); err != nil { - return "", err - } - } else if parts[1] != "ipns" && parts[1] != "ipld" { //TODO: make this smarter - return "", ErrBadPath - } - - return Path(txt), nil -} - -// ParseCidToPath takes a CID in string form and returns a valid ipfs Path. -func ParseCidToPath(txt string) (Path, error) { - if txt == "" { - return "", ErrNoComponents - } - - c, err := cid.Decode(txt) - if err != nil { - return "", err - } - - return FromCid(c), nil -} - -// IsValid checks if a path is a valid ipfs Path. -func (p *Path) IsValid() error { - _, err := ParsePath(p.String()) - return err -} - -// Join joins strings slices using / -func Join(pths []string) string { - return strings.Join(pths, "/") -} - -// SplitList splits strings usings / -func SplitList(pth string) []string { - return strings.Split(pth, "/") -} - -// SplitAbsPath clean up and split fpath. It extracts the first component (which -// must be a Multihash) and return it separately. -func SplitAbsPath(fpath Path) (cid.Cid, []string, error) { - parts := fpath.Segments() - if parts[0] == "ipfs" || parts[0] == "ipld" { - parts = parts[1:] - } - - // if nothing, bail. - if len(parts) == 0 { - return cid.Cid{}, nil, ErrNoComponents - } - - c, err := cid.Decode(parts[0]) - // first element in the path is a cid - if err != nil { - return cid.Cid{}, nil, err - } - - return c, parts[1:], nil -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/README.md b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/README.md deleted file mode 100644 index 51575aa1e0..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# go-multiaddr - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) -[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![Travis CI](https://img.shields.io/travis/multiformats/go-multiaddr.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multiaddr) -[![codecov.io](https://img.shields.io/codecov/c/github/multiformats/go-multiaddr.svg?style=flat-square&branch=master)](https://codecov.io/github/multiformats/go-multiaddr?branch=master) - -> [multiaddr](https://github.com/multiformats/multiaddr) implementation in go - -Multiaddr is a standard way to represent addresses that: - -- Support any standard network protocols. -- Self-describe (include protocols). -- Have a binary packed format. -- Have a nice string representation. -- Encapsulate well. - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) - - [Example](#example) - - [Simple](#simple) - - [Protocols](#protocols) - - [En/decapsulate](#endecapsulate) - - [Tunneling](#tunneling) -- [Maintainers](#maintainers) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -go get github.com/multiformats/go-multiaddr -``` - -## Usage - -### Example - -#### Simple - -```go -import ma "github.com/multiformats/go-multiaddr" - -// construct from a string (err signals parse failure) -m1, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") - -// construct from bytes (err signals parse failure) -m2, err := ma.NewMultiaddrBytes(m1.Bytes()) - -// true -strings.Equal(m1.String(), "/ip4/127.0.0.1/udp/1234") -strings.Equal(m1.String(), m2.String()) -bytes.Equal(m1.Bytes(), m2.Bytes()) -m1.Equal(m2) -m2.Equal(m1) -``` - -#### Protocols - -```go -// get the multiaddr protocol description objects -m1.Protocols() -// []Protocol{ -// Protocol{ Code: 4, Name: 'ip4', Size: 32}, -// Protocol{ Code: 17, Name: 'udp', Size: 16}, -// } -``` - -#### En/decapsulate - -```go -import ma "github.com/multiformats/go-multiaddr" - -m, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") -// - -sctpMA, err := ma.NewMultiaddr("/sctp/5678") - -m.Encapsulate(sctpMA) -// - -udpMA, err := ma.NewMultiaddr("/udp/1234") - -m.Decapsulate(udpMA) // up to + inc last occurrence of subaddr -// -``` - -#### Tunneling - -Multiaddr allows expressing tunnels very nicely. - -```js -printer, _ := ma.NewMultiaddr("/ip4/192.168.0.13/tcp/80") -proxy, _ := ma.NewMultiaddr("/ip4/10.20.30.40/tcp/443") -printerOverProxy := proxy.Encapsulate(printer) -// /ip4/10.20.30.40/tcp/443/ip4/192.168.0.13/tcp/80 - -proxyAgain := printerOverProxy.Decapsulate(printer) -// /ip4/10.20.30.40/tcp/443 -``` - -## Maintainers - -Captain: [@whyrusleeping](https://github.com/whyrusleeping). - -## Contribute - -Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multiaddr/issues). - -Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/codec.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/codec.go deleted file mode 100644 index 194dc688db..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/codec.go +++ /dev/null @@ -1,208 +0,0 @@ -package multiaddr - -import ( - "bytes" - "fmt" - "strings" -) - -func stringToBytes(s string) ([]byte, error) { - - // consume trailing slashes - s = strings.TrimRight(s, "/") - - var b bytes.Buffer - sp := strings.Split(s, "/") - - if sp[0] != "" { - return nil, fmt.Errorf("invalid multiaddr, must begin with /") - } - - // consume first empty elem - sp = sp[1:] - - for len(sp) > 0 { - p := ProtocolWithName(sp[0]) - if p.Code == 0 { - return nil, fmt.Errorf("no protocol with name %s", sp[0]) - } - _, _ = b.Write(CodeToVarint(p.Code)) - sp = sp[1:] - - if p.Size == 0 { // no length. - continue - } - - if len(sp) < 1 { - return nil, fmt.Errorf("protocol requires address, none given: %s", p.Name) - } - - if p.Path { - // it's a path protocol (terminal). - // consume the rest of the address as the next component. - sp = []string{"/" + strings.Join(sp, "/")} - } - - a, err := p.Transcoder.StringToBytes(sp[0]) - if err != nil { - return nil, fmt.Errorf("failed to parse %s: %s %s", p.Name, sp[0], err) - } - if p.Size < 0 { // varint size. - if p.Code != P_P2P { // OpenBazaar: for backwards compatibility we will avoid writing len here until more nodes upgrade - _, _ = b.Write(CodeToVarint(len(a))) - } - } - b.Write(a) - sp = sp[1:] - } - - return b.Bytes(), nil -} - -func validateBytes(b []byte) (err error) { - for len(b) > 0 { - code, n, err := ReadVarintCode(b) - if err != nil { - return err - } - - b = b[n:] - p := ProtocolWithCode(code) - if p.Code == 0 { - return fmt.Errorf("no protocol with code %d", code) - } - - if p.Size == 0 { - continue - } - - n, size, err := sizeForAddr(p, b) - if err != nil { - return err - } - - b = b[n:] - - if len(b) < size || size < 0 { - return fmt.Errorf("invalid value for size") - } - - err = p.Transcoder.ValidateBytes(b[:size]) - if err != nil { - return err - } - - b = b[size:] - } - - return nil -} - -func readComponent(b []byte) (int, Component, error) { - var offset int - code, n, err := ReadVarintCode(b) - if err != nil { - return 0, Component{}, err - } - offset += n - - p := ProtocolWithCode(code) - if p.Code == 0 { - return 0, Component{}, fmt.Errorf("no protocol with code %d", code) - } - - if p.Size == 0 { - return offset, Component{ - bytes: b[:offset], - offset: offset, - protocol: p, - }, nil - } - - n, size, err := sizeForAddr(p, b[offset:]) - if err != nil { - return 0, Component{}, err - } - - offset += n - - if len(b[offset:]) < size || size < 0 { - return 0, Component{}, fmt.Errorf("invalid value for size") - } - - return offset + size, Component{ - bytes: b[:offset+size], - protocol: p, - offset: offset, - }, nil -} - -func bytesToString(b []byte) (ret string, err error) { - var buf strings.Builder - - for len(b) > 0 { - n, c, err := readComponent(b) - if err != nil { - return "", err - } - b = b[n:] - c.writeTo(&buf) - } - - return buf.String(), nil -} - -func sizeForAddr(p Protocol, b []byte) (skip, size int, err error) { - switch { - case p.Size > 0: - return 0, (p.Size / 8), nil - case p.Size == 0: - return 0, 0, nil - case p.Code == P_P2P: - // OpenBazaar: this has to be patched to handle cids and multiaddrs - // serialized in both the new and old format until enough nodes - // upgrade that this isn't needed any more. - if b[0] == 0x01 { - return 0, len(b), nil - } else if len(b) == 37 { - return 3, 34, nil - } else if len(b) == 35 { - return 1, 34, nil - } else { - return 2, 34, nil - } - - default: - size, n, err := ReadVarintCode(b) - if err != nil { - return 0, 0, err - } - return n, size, nil - } -} - -func bytesSplit(b []byte) ([][]byte, error) { - var ret [][]byte - for len(b) > 0 { - code, n, err := ReadVarintCode(b) - if err != nil { - return nil, err - } - - p := ProtocolWithCode(code) - if p.Code == 0 { - return nil, fmt.Errorf("no protocol with code %d", b[0]) - } - - n2, size, err := sizeForAddr(p, b[n:]) - if err != nil { - return nil, err - } - - length := n + n2 + size - ret = append(ret, b[:length]) - b = b[length:] - } - - return ret, nil -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/component.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/component.go deleted file mode 100644 index e31fe5dc86..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/component.go +++ /dev/null @@ -1,132 +0,0 @@ -package multiaddr - -import ( - "bytes" - "encoding/binary" - "fmt" - "strings" -) - -// Component is a single multiaddr Component. -type Component struct { - bytes []byte - protocol Protocol - offset int -} - -func (c *Component) Bytes() []byte { - return c.bytes -} - -func (c *Component) Equal(o Multiaddr) bool { - return bytes.Equal(c.bytes, o.Bytes()) -} - -func (c *Component) Protocols() []Protocol { - return []Protocol{c.protocol} -} - -func (c *Component) Decapsulate(o Multiaddr) Multiaddr { - if c.Equal(o) { - return nil - } - return c -} - -func (c *Component) Encapsulate(o Multiaddr) Multiaddr { - m := multiaddr{bytes: c.bytes} - return m.Encapsulate(o) -} - -func (c *Component) ValueForProtocol(code int) (string, error) { - if c.protocol.Code != code { - return "", ErrProtocolNotFound - } - return c.Value(), nil -} - -func (c *Component) Protocol() Protocol { - return c.protocol -} - -func (c *Component) RawValue() []byte { - return c.bytes[c.offset:] -} - -func (c *Component) Value() string { - if c.protocol.Transcoder == nil { - return "" - } - value, err := c.protocol.Transcoder.BytesToString(c.bytes[c.offset:]) - if err != nil { - // This Component must have been checked. - panic(err) - } - return value -} - -func (c *Component) String() string { - var b strings.Builder - c.writeTo(&b) - return b.String() -} - -// writeTo is an efficient, private function for string-formatting a multiaddr. -// Trust me, we tend to allocate a lot when doing this. -func (c *Component) writeTo(b *strings.Builder) { - b.WriteByte('/') - b.WriteString(c.protocol.Name) - value := c.Value() - if len(value) == 0 { - return - } - if !(c.protocol.Path && value[0] == '/') { - b.WriteByte('/') - } - b.WriteString(value) -} - -// NewComponent constructs a new multiaddr component -func NewComponent(protocol, value string) (*Component, error) { - p := ProtocolWithName(protocol) - if p.Code == 0 { - return nil, fmt.Errorf("unsupported protocol: %s", protocol) - } - if p.Transcoder != nil { - bts, err := p.Transcoder.StringToBytes(value) - if err != nil { - return nil, err - } - return newComponent(p, bts), nil - } else if value != "" { - return nil, fmt.Errorf("protocol %s doesn't take a value", p.Name) - } - return newComponent(p, nil), nil - // TODO: handle path /? -} - -func newComponent(protocol Protocol, bvalue []byte) *Component { - size := len(bvalue) - size += len(protocol.VCode) - if protocol.Size < 0 { - size += VarintSize(len(bvalue)) - } - maddr := make([]byte, size) - var offset int - offset += copy(maddr[offset:], protocol.VCode) - if protocol.Size < 0 { - offset += binary.PutUvarint(maddr[offset:], uint64(len(bvalue))) - } - copy(maddr[offset:], bvalue) - - // For debugging - if len(maddr) != offset+len(bvalue) { - panic("incorrect length") - } - - return &Component{ - bytes: maddr, - protocol: protocol, - offset: offset, - } -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/interface.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/interface.go deleted file mode 100644 index 34bffd956b..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/interface.go +++ /dev/null @@ -1,50 +0,0 @@ -package multiaddr - -/* -Multiaddr is a cross-protocol, cross-platform format for representing -internet addresses. It emphasizes explicitness and self-description. -Learn more here: https://github.com/multiformats/multiaddr - -Multiaddrs have both a binary and string representation. - - import ma "github.com/multiformats/go-multiaddr" - - addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80") - // err non-nil when parsing failed. - -*/ -type Multiaddr interface { - // Equal returns whether two Multiaddrs are exactly equal - Equal(Multiaddr) bool - - // Bytes returns the []byte representation of this Multiaddr - // - // This function may expose immutable, internal state. Do not modify. - Bytes() []byte - - // String returns the string representation of this Multiaddr - // (may panic if internal state is corrupted) - String() string - - // Protocols returns the list of Protocols this Multiaddr includes - // will panic if protocol code incorrect (and bytes accessed incorrectly) - Protocols() []Protocol - - // Encapsulate wraps this Multiaddr around another. For example: - // - // /ip4/1.2.3.4 encapsulate /tcp/80 = /ip4/1.2.3.4/tcp/80 - // - Encapsulate(Multiaddr) Multiaddr - - // Decapsultate removes a Multiaddr wrapping. For example: - // - // /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80 - // - Decapsulate(Multiaddr) Multiaddr - - // ValueForProtocol returns the value (if any) following the specified protocol - // - // Note: protocols can appear multiple times in a single multiaddr. - // Consider using `ForEach` to walk over the addr manually. - ValueForProtocol(code int) (string, error) -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/multiaddr.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/multiaddr.go deleted file mode 100644 index 2c07dd3afc..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/multiaddr.go +++ /dev/null @@ -1,141 +0,0 @@ -package multiaddr - -import ( - "bytes" - "fmt" - "log" - "strings" -) - -// multiaddr is the data structure representing a Multiaddr -type multiaddr struct { - bytes []byte -} - -// NewMultiaddr parses and validates an input string, returning a *Multiaddr -func NewMultiaddr(s string) (a Multiaddr, err error) { - defer func() { - if e := recover(); e != nil { - log.Printf("Panic in NewMultiaddr on input %q: %s", s, e) - err = fmt.Errorf("%v", e) - } - }() - b, err := stringToBytes(s) - if err != nil { - return nil, err - } - return multiaddr{bytes: b}, nil -} - -// NewMultiaddrBytes initializes a Multiaddr from a byte representation. -// It validates it as an input string. -func NewMultiaddrBytes(b []byte) (a Multiaddr, err error) { - defer func() { - if e := recover(); e != nil { - log.Printf("Panic in NewMultiaddrBytes on input %q: %s", b, e) - err = fmt.Errorf("%v", e) - } - }() - - if err := validateBytes(b); err != nil { - return nil, err - } - - return multiaddr{bytes: b}, nil -} - -// Equal tests whether two multiaddrs are equal -func (m multiaddr) Equal(m2 Multiaddr) bool { - return bytes.Equal(m.bytes, m2.Bytes()) -} - -// Bytes returns the []byte representation of this Multiaddr -// -// Do not modify the returned buffer, it may be shared. -func (m multiaddr) Bytes() []byte { - return m.bytes -} - -// String returns the string representation of a Multiaddr -func (m multiaddr) String() string { - s, err := bytesToString(m.bytes) - if err != nil { - panic(fmt.Errorf("multiaddr failed to convert back to string. corrupted? %s", err)) - } - return s -} - -// Protocols returns the list of protocols this Multiaddr has. -// will panic in case we access bytes incorrectly. -func (m multiaddr) Protocols() []Protocol { - ps := make([]Protocol, 0, 8) - b := m.bytes - for len(b) > 0 { - code, n, err := ReadVarintCode(b) - if err != nil { - panic(err) - } - - p := ProtocolWithCode(code) - if p.Code == 0 { - // this is a panic (and not returning err) because this should've been - // caught on constructing the Multiaddr - panic(fmt.Errorf("no protocol with code %d", b[0])) - } - ps = append(ps, p) - b = b[n:] - - n, size, err := sizeForAddr(p, b) - if err != nil { - panic(err) - } - - b = b[n+size:] - } - return ps -} - -// Encapsulate wraps a given Multiaddr, returning the resulting joined Multiaddr -func (m multiaddr) Encapsulate(o Multiaddr) Multiaddr { - mb := m.bytes - ob := o.Bytes() - - b := make([]byte, len(mb)+len(ob)) - copy(b, mb) - copy(b[len(mb):], ob) - return multiaddr{bytes: b} -} - -// Decapsulate unwraps Multiaddr up until the given Multiaddr is found. -func (m multiaddr) Decapsulate(o Multiaddr) Multiaddr { - s1 := m.String() - s2 := o.String() - i := strings.LastIndex(s1, s2) - if i < 0 { - // if multiaddr not contained, returns a copy. - cpy := make([]byte, len(m.bytes)) - copy(cpy, m.bytes) - return multiaddr{bytes: cpy} - } - - ma, err := NewMultiaddr(s1[:i]) - if err != nil { - panic("Multiaddr.Decapsulate incorrect byte boundaries.") - } - return ma -} - -var ErrProtocolNotFound = fmt.Errorf("protocol not found in multiaddr") - -func (m multiaddr) ValueForProtocol(code int) (value string, err error) { - err = ErrProtocolNotFound - ForEach(m, func(c Component) bool { - if c.Protocol().Code == code { - value = c.Value() - err = nil - return false - } - return true - }) - return -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/package.json b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/package.json deleted file mode 100644 index 228656d17e..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": "multiformats", - "bugs": { - "url": "https://github.com/multiformats/go-multiaddr/issues" - }, - "gx": { - "dvcsimport": "github.com/multiformats/go-multiaddr" - }, - "gxDependencies": [ - { - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - } - ], - "gxVersion": "0.9.0", - "language": "go", - "license": "MIT", - "name": "go-multiaddr", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.3.5" -} - diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/protocols.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/protocols.go deleted file mode 100644 index d4665982c5..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/protocols.go +++ /dev/null @@ -1,158 +0,0 @@ -package multiaddr - -// You **MUST** register your multicodecs with -// https://github.com/multiformats/multicodec before adding them here. -// -// TODO: Use a single source of truth for all multicodecs instead of -// distributing them like this... -const ( - P_IP4 = 0x0004 - P_TCP = 0x0006 - P_UDP = 0x0111 - P_DCCP = 0x0021 - P_IP6 = 0x0029 - P_IP6ZONE = 0x002A - P_QUIC = 0x01CC - P_SCTP = 0x0084 - P_UDT = 0x012D - P_UTP = 0x012E - P_UNIX = 0x0190 - P_P2P = 0x01A5 - P_IPFS = 0x01A5 // alias for backwards compatability - P_HTTP = 0x01E0 - P_HTTPS = 0x01BB - P_ONION = 0x01BC -) - -var ( - protoIP4 = Protocol{ - Name: "ip4", - Code: P_IP4, - VCode: CodeToVarint(P_IP4), - Size: 32, - Path: false, - Transcoder: TranscoderIP4, - } - protoTCP = Protocol{ - Name: "tcp", - Code: P_TCP, - VCode: CodeToVarint(P_TCP), - Size: 16, - Path: false, - Transcoder: TranscoderPort, - } - protoUDP = Protocol{ - Name: "udp", - Code: P_UDP, - VCode: CodeToVarint(P_UDP), - Size: 16, - Path: false, - Transcoder: TranscoderPort, - } - protoDCCP = Protocol{ - Name: "dccp", - Code: P_DCCP, - VCode: CodeToVarint(P_DCCP), - Size: 16, - Path: false, - Transcoder: TranscoderPort, - } - protoIP6 = Protocol{ - Name: "ip6", - Code: P_IP6, - VCode: CodeToVarint(P_IP6), - Size: 128, - Transcoder: TranscoderIP6, - } - // these require varint - protoIP6ZONE = Protocol{ - Name: "ip6zone", - Code: P_IP6ZONE, - VCode: CodeToVarint(P_IP6ZONE), - Size: LengthPrefixedVarSize, - Path: false, - Transcoder: TranscoderIP6Zone, - } - protoSCTP = Protocol{ - Name: "sctp", - Code: P_SCTP, - VCode: CodeToVarint(P_SCTP), - Size: 16, - Transcoder: TranscoderPort, - } - protoONION = Protocol{ - Name: "onion", - Code: P_ONION, - VCode: CodeToVarint(P_ONION), - Size: 96, - Transcoder: TranscoderOnion, - } - protoUTP = Protocol{ - Name: "utp", - Code: P_UTP, - VCode: CodeToVarint(P_UTP), - } - protoUDT = Protocol{ - Name: "udt", - Code: P_UDT, - VCode: CodeToVarint(P_UDT), - } - protoQUIC = Protocol{ - Name: "quic", - Code: P_QUIC, - VCode: CodeToVarint(P_QUIC), - } - protoHTTP = Protocol{ - Name: "http", - Code: P_HTTP, - VCode: CodeToVarint(P_HTTP), - } - protoHTTPS = Protocol{ - Name: "https", - Code: P_HTTPS, - VCode: CodeToVarint(P_HTTPS), - } - protoP2P = Protocol{ - Name: "ipfs", - Code: P_P2P, - VCode: CodeToVarint(P_P2P), - Size: LengthPrefixedVarSize, - Transcoder: TranscoderP2P, - } - protoUNIX = Protocol{ - Name: "unix", - Code: P_UNIX, - VCode: CodeToVarint(P_UNIX), - Size: LengthPrefixedVarSize, - Path: true, - Transcoder: TranscoderUnix, - } -) - -func init() { - for _, p := range []Protocol{ - protoIP4, - protoTCP, - protoUDP, - protoDCCP, - protoIP6, - protoIP6ZONE, - protoSCTP, - protoONION, - protoUTP, - protoUDT, - protoQUIC, - protoHTTP, - protoHTTPS, - protoP2P, - protoUNIX, - } { - if err := AddProtocol(p); err != nil { - panic(err) - } - } - - // explicitly set both of these - protocolsByName["p2p"] = protoP2P - protocolsByName["ipfs"] = protoP2P -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/transcoders.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/transcoders.go deleted file mode 100644 index 09aef155eb..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/transcoders.go +++ /dev/null @@ -1,231 +0,0 @@ -package multiaddr - -import ( - "bytes" - "encoding/base32" - "encoding/binary" - "fmt" - "net" - "strconv" - "strings" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -type Transcoder interface { - StringToBytes(string) ([]byte, error) - BytesToString([]byte) (string, error) - ValidateBytes([]byte) error -} - -func NewTranscoderFromFunctions( - s2b func(string) ([]byte, error), - b2s func([]byte) (string, error), - val func([]byte) error, -) Transcoder { - return twrp{s2b, b2s, val} -} - -type twrp struct { - strtobyte func(string) ([]byte, error) - bytetostr func([]byte) (string, error) - validbyte func([]byte) error -} - -func (t twrp) StringToBytes(s string) ([]byte, error) { - return t.strtobyte(s) -} -func (t twrp) BytesToString(b []byte) (string, error) { - return t.bytetostr(b) -} - -func (t twrp) ValidateBytes(b []byte) error { - if t.validbyte == nil { - return nil - } - return t.validbyte(b) -} - -var TranscoderIP4 = NewTranscoderFromFunctions(ip4StB, ip4BtS, nil) -var TranscoderIP6 = NewTranscoderFromFunctions(ip6StB, ip6BtS, nil) -var TranscoderIP6Zone = NewTranscoderFromFunctions(ip6zoneStB, ip6zoneBtS, ip6zoneVal) - -func ip4StB(s string) ([]byte, error) { - i := net.ParseIP(s).To4() - if i == nil { - return nil, fmt.Errorf("failed to parse ip4 addr: %s", s) - } - return i, nil -} - -func ip6zoneStB(s string) ([]byte, error) { - if len(s) == 0 { - return nil, fmt.Errorf("empty ip6zone") - } - return []byte(s), nil -} - -func ip6zoneBtS(b []byte) (string, error) { - if len(b) == 0 { - return "", fmt.Errorf("invalid length (should be > 0)") - } - return string(b), nil -} - -func ip6zoneVal(b []byte) error { - if len(b) == 0 { - return fmt.Errorf("invalid length (should be > 0)") - } - // Not supported as this would break multiaddrs. - if bytes.IndexByte(b, '/') >= 0 { - return fmt.Errorf("IPv6 zone ID contains '/': %s", string(b)) - } - return nil -} - -func ip6StB(s string) ([]byte, error) { - i := net.ParseIP(s).To16() - if i == nil { - return nil, fmt.Errorf("failed to parse ip6 addr: %s", s) - } - return i, nil -} - -func ip6BtS(b []byte) (string, error) { - ip := net.IP(b) - if ip4 := ip.To4(); ip4 != nil { - // Go fails to prepend the `::ffff:` part. - return "::ffff:" + ip4.String(), nil - } - return ip.String(), nil -} - -func ip4BtS(b []byte) (string, error) { - return net.IP(b).String(), nil -} - -var TranscoderPort = NewTranscoderFromFunctions(portStB, portBtS, nil) - -func portStB(s string) ([]byte, error) { - i, err := strconv.Atoi(s) - if err != nil { - return nil, fmt.Errorf("failed to parse port addr: %s", err) - } - if i >= 65536 { - return nil, fmt.Errorf("failed to parse port addr: %s", "greater than 65536") - } - b := make([]byte, 2) - binary.BigEndian.PutUint16(b, uint16(i)) - return b, nil -} - -func portBtS(b []byte) (string, error) { - i := binary.BigEndian.Uint16(b) - return strconv.Itoa(int(i)), nil -} - -var TranscoderOnion = NewTranscoderFromFunctions(onionStB, onionBtS, nil) - -func onionStB(s string) ([]byte, error) { - addr := strings.Split(s, ":") - if len(addr) != 2 { - return nil, fmt.Errorf("failed to parse onion addr: %s does not contain a port number.", s) - } - - // onion address without the ".onion" substring - if len(addr[0]) != 16 { - return nil, fmt.Errorf("failed to parse onion addr: %s not a Tor onion address.", s) - } - onionHostBytes, err := base32.StdEncoding.DecodeString(strings.ToUpper(addr[0])) - if err != nil { - return nil, fmt.Errorf("failed to decode base32 onion addr: %s %s", s, err) - } - - // onion port number - i, err := strconv.Atoi(addr[1]) - if err != nil { - return nil, fmt.Errorf("failed to parse onion addr: %s", err) - } - if i >= 65536 { - return nil, fmt.Errorf("failed to parse onion addr: %s", "port greater than 65536") - } - if i < 1 { - return nil, fmt.Errorf("failed to parse onion addr: %s", "port less than 1") - } - - onionPortBytes := make([]byte, 2) - binary.BigEndian.PutUint16(onionPortBytes, uint16(i)) - bytes := []byte{} - bytes = append(bytes, onionHostBytes...) - bytes = append(bytes, onionPortBytes...) - return bytes, nil -} - -func onionBtS(b []byte) (string, error) { - addr := strings.ToLower(base32.StdEncoding.EncodeToString(b[0:10])) - port := binary.BigEndian.Uint16(b[10:12]) - return addr + ":" + strconv.Itoa(int(port)), nil -} - -var TranscoderP2P = NewTranscoderFromFunctions(p2pStB, p2pBtS, p2pVal) - -// OpenBazaar: this function has been updated to parse CIDs as well as PeerIDs -func p2pStB(s string) ([]byte, error) { - if len(s) == 46 && (s[:2] == "Qm" || s[:4] == "12D3") { - m, err := mh.FromB58String(s) - if err != nil { - return nil, fmt.Errorf("failed to parse ipfs addr: %s %s", s, err) - } - size := CodeToVarint(len(m)) - b := append(size, m...) - return b, nil - } else { - id, err := cid.Decode(s) - if err != nil { - return nil, fmt.Errorf("failed to parse ipfs addr: %s %s", s, err) - } - return id.Bytes(), nil - } -} - -// OpenBazaar: this has been patched to parse CIDs as well as multihashes -func p2pVal(b []byte) error { - _, err := cid.Cast(b) - if err != nil { - _, err = mh.Cast(b) - } - return err -} - -// OpenBazaar: this function has been updated to also parse a CID -func p2pBtS(b []byte) (string, error) { - id, err := cid.Parse(b) - if err != nil { - size, n, err := ReadVarintCode(b) - if err != nil { - return "", err - } - - b = b[n:] - if len(b) != size { - return "", fmt.Errorf("inconsistent lengths") - } - m, err := mh.Cast(b) - if err != nil { - return "", err - } - return m.B58String(), nil - } - return id.String(), nil -} - -var TranscoderUnix = NewTranscoderFromFunctions(unixStB, unixBtS, nil) - -func unixStB(s string) ([]byte, error) { - return []byte(s), nil -} - -func unixBtS(b []byte) (string, error) { - return string(b), nil -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/util.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/util.go deleted file mode 100644 index d1044da16c..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/util.go +++ /dev/null @@ -1,180 +0,0 @@ -package multiaddr - -import "fmt" - -// Split returns the sub-address portions of a multiaddr. -func Split(m Multiaddr) []Multiaddr { - if _, ok := m.(*Component); ok { - return []Multiaddr{m} - } - var addrs []Multiaddr - ForEach(m, func(c Component) bool { - addrs = append(addrs, &c) - return true - }) - return addrs -} - -// Join returns a combination of addresses. -func Join(ms ...Multiaddr) Multiaddr { - switch len(ms) { - case 0: - // empty multiaddr, unfortunately, we have callers that rely on - // this contract. - return multiaddr{} - case 1: - return ms[0] - } - - length := 0 - bs := make([][]byte, len(ms)) - for i, m := range ms { - bs[i] = m.Bytes() - length += len(bs[i]) - } - - bidx := 0 - b := make([]byte, length) - for _, mb := range bs { - bidx += copy(b[bidx:], mb) - } - return multiaddr{bytes: b} -} - -// Cast re-casts a byte slice as a multiaddr. will panic if it fails to parse. -func Cast(b []byte) Multiaddr { - m, err := NewMultiaddrBytes(b) - if err != nil { - panic(fmt.Errorf("multiaddr failed to parse: %s", err)) - } - return m -} - -// StringCast like Cast, but parses a string. Will also panic if it fails to parse. -func StringCast(s string) Multiaddr { - m, err := NewMultiaddr(s) - if err != nil { - panic(fmt.Errorf("multiaddr failed to parse: %s", err)) - } - return m -} - -// SplitFirst returns the first component and the rest of the multiaddr. -func SplitFirst(m Multiaddr) (*Component, Multiaddr) { - // Shortcut if we already have a component - if c, ok := m.(*Component); ok { - return c, nil - } - - b := m.Bytes() - if len(b) == 0 { - return nil, nil - } - n, c, err := readComponent(b) - if err != nil { - panic(err) - } - if len(b) == n { - return &c, nil - } - return &c, multiaddr{b[n:]} -} - -// SplitLast returns the rest of the multiaddr and the last component. -func SplitLast(m Multiaddr) (Multiaddr, *Component) { - // Shortcut if we already have a component - if c, ok := m.(*Component); ok { - return nil, c - } - - b := m.Bytes() - if len(b) == 0 { - return nil, nil - } - - var ( - c Component - err error - offset int - ) - for { - var n int - n, c, err = readComponent(b[offset:]) - if err != nil { - panic(err) - } - if len(b) == n+offset { - // Reached end - if offset == 0 { - // Only one component - return nil, &c - } - return multiaddr{b[:offset]}, &c - } - offset += n - } -} - -// SplitFunc splits the multiaddr when the callback first returns true. The -// component on which the callback first returns will be included in the -// *second* multiaddr. -func SplitFunc(m Multiaddr, cb func(Component) bool) (Multiaddr, Multiaddr) { - // Shortcut if we already have a component - if c, ok := m.(*Component); ok { - if cb(*c) { - return nil, m - } - return m, nil - } - b := m.Bytes() - if len(b) == 0 { - return nil, nil - } - var ( - c Component - err error - offset int - ) - for offset < len(b) { - var n int - n, c, err = readComponent(b[offset:]) - if err != nil { - panic(err) - } - if cb(c) { - break - } - offset += n - } - switch offset { - case 0: - return nil, m - case len(b): - return m, nil - default: - return multiaddr{b[:offset]}, multiaddr{b[offset:]} - } -} - -// ForEach walks over the multiaddr, component by component. -// -// This function iterates over components *by value* to avoid allocating. -func ForEach(m Multiaddr, cb func(c Component) bool) { - // Shortcut if we already have a component - if c, ok := m.(*Component); ok { - cb(*c) - return - } - - b := m.Bytes() - for len(b) > 0 { - n, c, err := readComponent(b) - if err != nil { - panic(err) - } - if !cb(c) { - return - } - b = b[n:] - } -} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/varint.go b/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/varint.go deleted file mode 100644 index 79ebe2ff2c..0000000000 --- a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/varint.go +++ /dev/null @@ -1,38 +0,0 @@ -package multiaddr - -import ( - "encoding/binary" - "fmt" - "math/bits" -) - -// VarintSize returns the size (in bytes) of `num` encoded as a varint. -func VarintSize(num int) int { - return bits.Len(uint(num))/7 + 1 -} - -// CodeToVarint converts an integer to a varint-encoded []byte -func CodeToVarint(num int) []byte { - buf := make([]byte, bits.Len(uint(num))/7+1) - n := binary.PutUvarint(buf, uint64(num)) - return buf[:n] -} - -// VarintToCode converts a varint-encoded []byte to an integer protocol code -func VarintToCode(buf []byte) int { - num, _, err := ReadVarintCode(buf) - if err != nil { - panic(err) - } - return num -} - -// ReadVarintCode reads a varint code from the beginning of buf. -// returns the code, and the number of bytes read. -func ReadVarintCode(buf []byte) (int, int, error) { - num, n := binary.Uvarint(buf) - if n < 0 { - return 0, 0, fmt.Errorf("varints larger than uint64 not yet supported") - } - return int(num), n, nil -} diff --git a/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/.travis.yml b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/.travis.yml new file mode 100644 index 0000000000..2650fe6e65 --- /dev/null +++ b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/LICENSE b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/LICENSE rename to vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/LICENSE diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/Makefile b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/Makefile similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/Makefile rename to vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/Makefile diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/README.md b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/README.md similarity index 100% rename from vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/README.md rename to vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/README.md diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/codecov.yml b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/codecov.yml rename to vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/codecov.yml diff --git a/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/filter.go b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/filter.go new file mode 100644 index 0000000000..482ab29d69 --- /dev/null +++ b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/filter.go @@ -0,0 +1,67 @@ +package filter + +import ( + "net" + "sync" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +type Filters struct { + mu sync.RWMutex + filters map[string]*net.IPNet +} + +func NewFilters() *Filters { + return &Filters{ + filters: make(map[string]*net.IPNet), + } +} + +func (fs *Filters) AddDialFilter(f *net.IPNet) { + fs.mu.Lock() + defer fs.mu.Unlock() + fs.filters[f.String()] = f +} + +func (f *Filters) AddrBlocked(a ma.Multiaddr) bool { + maddr := ma.Split(a) + if len(maddr) == 0 { + return false + } + netaddr, err := manet.ToNetAddr(maddr[0]) + if err != nil { + // if we can't parse it, it's probably not blocked + return false + } + netip := net.ParseIP(netaddr.String()) + if netip == nil { + return false + } + + f.mu.RLock() + defer f.mu.RUnlock() + for _, ft := range f.filters { + if ft.Contains(netip) { + return true + } + } + return false +} + +func (f *Filters) Filters() []*net.IPNet { + var out []*net.IPNet + f.mu.RLock() + defer f.mu.RUnlock() + for _, ff := range f.filters { + out = append(out, ff) + } + return out +} + +func (f *Filters) Remove(ff *net.IPNet) { + f.mu.Lock() + defer f.mu.Unlock() + delete(f.filters, ff.String()) +} diff --git a/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/package.json b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/package.json new file mode 100644 index 0000000000..bfb12114c4 --- /dev/null +++ b/vendor/gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-maddr-filter" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-maddr-filter" + }, + "gxDependencies": [ + { + "author": "jbenet", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "", + "name": "go-maddr-filter", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.13" +} + diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/offline.go b/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/offline.go deleted file mode 100644 index 975ab97309..0000000000 --- a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/offline.go +++ /dev/null @@ -1,73 +0,0 @@ -// package offline implements an object that implements the exchange -// interface but returns nil values to every request. -package offline - -import ( - "context" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" -) - -func Exchange(bs blockstore.Blockstore) exchange.Interface { - return &offlineExchange{bs: bs} -} - -// offlineExchange implements the Exchange interface but doesn't return blocks. -// For use in offline mode. -type offlineExchange struct { - bs blockstore.Blockstore -} - -// GetBlock returns nil to signal that a block could not be retrieved for the -// given key. -// NB: This function may return before the timeout expires. -func (e *offlineExchange) GetBlock(_ context.Context, k cid.Cid) (blocks.Block, error) { - return e.bs.Get(k) -} - -// HasBlock always returns nil. -func (e *offlineExchange) HasBlock(b blocks.Block) error { - return e.bs.Put(b) -} - -// Close always returns nil. -func (_ *offlineExchange) Close() error { - // NB: exchange doesn't own the blockstore's underlying datastore, so it is - // not responsible for closing it. - return nil -} - -func (e *offlineExchange) GetBlocks(ctx context.Context, ks []cid.Cid) (<-chan blocks.Block, error) { - out := make(chan blocks.Block) - go func() { - defer close(out) - var misses []cid.Cid - for _, k := range ks { - hit, err := e.bs.Get(k) - if err != nil { - misses = append(misses, k) - // a long line of misses should abort when context is cancelled. - select { - // TODO case send misses down channel - case <-ctx.Done(): - return - default: - continue - } - } - select { - case out <- hit: - case <-ctx.Done(): - return - } - } - }() - return out, nil -} - -func (e *offlineExchange) IsOnline() bool { - return false -} diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/package.json b/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/package.json deleted file mode 100644 index 3f81d042a8..0000000000 --- a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-exchange-offline" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-exchange-offline" - }, - "gxDependencies": [ - { - "author": "hsanjuan", - "hash": "QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR", - "name": "go-ipfs-blockstore", - "version": "0.1.4" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "hsanjuan", - "hash": "QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM", - "name": "go-ipfs-exchange-interface", - "version": "0.1.0" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "hsanjuan", - "hash": "QmUf9xAmbHndjh31YNRugNeyNX6mDTUDuWN1bVTmUriwdZ", - "name": "go-ipfs-blocksutil", - "version": "0.1.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-exchange-offline", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.3" -} - diff --git a/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/.travis.yml b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/.travis.yml new file mode 100644 index 0000000000..2650fe6e65 --- /dev/null +++ b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/LICENSE b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/LICENSE rename to vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/LICENSE diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/Makefile b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/Makefile similarity index 100% rename from vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/Makefile rename to vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/Makefile diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/README.md b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/README.md similarity index 100% rename from vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/README.md rename to vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/README.md diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/codecov.yml b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/codecov.yml rename to vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/codecov.yml diff --git a/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/package.json b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/package.json new file mode 100644 index 0000000000..7ac42a9fb0 --- /dev/null +++ b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/package.json @@ -0,0 +1,83 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-tcp-transport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-tcp-transport" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9", + "name": "go-reuseport", + "version": "0.2.2" + }, + { + "author": "whyrusleeping", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "stebalien", + "hash": "QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT", + "name": "go-reuseport-transport", + "version": "0.2.3" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc", + "name": "go-smux-multiplex", + "version": "3.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-tcp-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.28" +} + diff --git a/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/reuseport.go b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/reuseport.go new file mode 100644 index 0000000000..b8ac343274 --- /dev/null +++ b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/reuseport.go @@ -0,0 +1,44 @@ +package tcp + +import ( + "os" + "strings" + + reuseport "gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport" +) + +// envReuseport is the env variable name used to turn off reuse port. +// It default to true. +const envReuseport = "LIBP2P_TCP_REUSEPORT" +const deprecatedEnvReuseport = "IPFS_REUSEPORT" + +// envReuseportVal stores the value of envReuseport. defaults to true. +var envReuseportVal = true + +func init() { + v := strings.ToLower(os.Getenv(envReuseport)) + if v == "false" || v == "f" || v == "0" { + envReuseportVal = false + log.Infof("REUSEPORT disabled (LIBP2P_TCP_REUSEPORT=%s)", v) + } + v, exist := os.LookupEnv(deprecatedEnvReuseport) + if exist { + log.Warning("IPFS_REUSEPORT is deprecated, use LIBP2P_TCP_REUSEPORT instead") + if v == "false" || v == "f" || v == "0" { + envReuseportVal = false + log.Infof("REUSEPORT disabled (IPFS_REUSEPORT=%s)", v) + } + } +} + +// reuseportIsAvailable returns whether reuseport is available to be used. This +// is here because we want to be able to turn reuseport on and off selectively. +// For now we use an ENV variable, as this handles our pressing need: +// +// LIBP2P_TCP_REUSEPORT=false ipfs daemon +// +// If this becomes a sought after feature, we could add this to the config. +// In the end, reuseport is a stop-gap. +func ReuseportIsAvailable() bool { + return envReuseportVal && reuseport.Available() +} diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/tcp.go b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/tcp.go similarity index 85% rename from vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/tcp.go rename to vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/tcp.go index 979c009c5b..00b6b0bb97 100644 --- a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/tcp.go +++ b/vendor/gx/ipfs/QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M/go-tcp-transport/tcp.go @@ -4,14 +4,14 @@ import ( "context" "time" - rtpt "gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - mafmt "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + rtpt "gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport" + mafmt "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" ) // DefaultConnectTimeout is the (default) maximum amount of time the TCP diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/.travis.yml b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/.travis.yml rename to vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/.travis.yml diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/LICENSE b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/LICENSE rename to vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/LICENSE diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/Makefile b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/Makefile similarity index 100% rename from vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/Makefile rename to vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/Makefile diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/README.md b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/README.md similarity index 100% rename from vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/README.md rename to vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/README.md diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/codecov.yml b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/codecov.yml rename to vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/codecov.yml diff --git a/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/datastore.go b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/datastore.go new file mode 100644 index 0000000000..7e896a0bee --- /dev/null +++ b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/datastore.go @@ -0,0 +1,376 @@ +package badger + +import ( + "fmt" + "strings" + "time" + + badger "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger" + osh "gx/ipfs/QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93/go-os-helper" + + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" +) + +type Datastore struct { + DB *badger.DB + + gcDiscardRatio float64 +} + +// Implements the datastore.Txn interface, enabling transaction support for +// the badger Datastore. +type txn struct { + txn *badger.Txn + + // Whether this transaction has been implicitly created as a result of a direct Datastore + // method invocation. + implicit bool +} + +// Options are the badger datastore options, reexported here for convenience. +type Options struct { + gcDiscardRatio float64 + + badger.Options +} + +var DefaultOptions = Options{ + gcDiscardRatio: 0.1, + + Options: badger.DefaultOptions, +} + +var _ ds.Datastore = (*Datastore)(nil) +var _ ds.TxnDatastore = (*Datastore)(nil) +var _ ds.TTLDatastore = (*Datastore)(nil) + +// NewDatastore creates a new badger datastore. +// +// DO NOT set the Dir and/or ValuePath fields of opt, they will be set for you. +func NewDatastore(path string, options *Options) (*Datastore, error) { + // Copy the options because we modify them. + var opt badger.Options + var gcDiscardRatio float64 + if options == nil { + opt = badger.DefaultOptions + gcDiscardRatio = DefaultOptions.gcDiscardRatio + } else { + opt = options.Options + gcDiscardRatio = options.gcDiscardRatio + } + + if osh.IsWindows() && opt.SyncWrites { + opt.Truncate = true + } + + opt.Dir = path + opt.ValueDir = path + + kv, err := badger.Open(opt) + if err != nil { + if strings.HasPrefix(err.Error(), "manifest has unsupported version:") { + err = fmt.Errorf("unsupported badger version, use github.com/ipfs/badgerds-upgrade to upgrade: %s", err.Error()) + } + return nil, err + } + + return &Datastore{ + DB: kv, + gcDiscardRatio: gcDiscardRatio, + }, nil +} + +// NewTransaction starts a new transaction. The resulting transaction object +// can be mutated without incurring changes to the underlying Datastore until +// the transaction is Committed. +func (d *Datastore) NewTransaction(readOnly bool) (ds.Txn, error) { + return &txn{d.DB.NewTransaction(!readOnly), false}, nil +} + +// newImplicitTransaction creates a transaction marked as 'implicit'. +// Implicit transactions are created by Datastore methods performing single operations. +func (d *Datastore) newImplicitTransaction(readOnly bool) ds.Txn { + return &txn{d.DB.NewTransaction(!readOnly), true} +} + +func (d *Datastore) Put(key ds.Key, value []byte) error { + txn := d.newImplicitTransaction(false) + defer txn.Discard() + + if err := txn.Put(key, value); err != nil { + return err + } + + return txn.Commit() +} + +func (d *Datastore) PutWithTTL(key ds.Key, value []byte, ttl time.Duration) error { + txn := d.newImplicitTransaction(false).(*txn) + defer txn.Discard() + + if err := txn.PutWithTTL(key, value, ttl); err != nil { + return err + } + + return txn.Commit() +} + +func (d *Datastore) SetTTL(key ds.Key, ttl time.Duration) error { + txn := d.newImplicitTransaction(false).(*txn) + defer txn.Discard() + + if err := txn.SetTTL(key, ttl); err != nil { + return err + } + + return txn.Commit() +} + +func (d *Datastore) GetExpiration(key ds.Key) (time.Time, error) { + txn := d.newImplicitTransaction(false).(*txn) + defer txn.Discard() + + return txn.GetExpiration(key) +} + +func (d *Datastore) Get(key ds.Key) (value []byte, err error) { + txn := d.newImplicitTransaction(true) + defer txn.Discard() + + return txn.Get(key) +} + +func (d *Datastore) Has(key ds.Key) (bool, error) { + txn := d.newImplicitTransaction(true) + defer txn.Discard() + + return txn.Has(key) +} + +func (d *Datastore) GetSize(key ds.Key) (size int, err error) { + txn := d.newImplicitTransaction(true) + defer txn.Discard() + + return txn.GetSize(key) +} + +func (d *Datastore) Delete(key ds.Key) error { + txn := d.newImplicitTransaction(false) + defer txn.Discard() + + err := txn.Delete(key) + if err != nil { + return err + } + + return txn.Commit() +} + +func (d *Datastore) Query(q dsq.Query) (dsq.Results, error) { + txn := d.newImplicitTransaction(true) + // We cannot defer txn.Discard() here, as the txn must remain active while the iterator is open. + // https://github.com/dgraph-io/badger/commit/b1ad1e93e483bbfef123793ceedc9a7e34b09f79 + // The closing logic in the query goprocess takes care of discarding the implicit transaction. + return txn.Query(q) +} + +// DiskUsage implements the PersistentDatastore interface. +// It returns the sum of lsm and value log files sizes in bytes. +func (d *Datastore) DiskUsage() (uint64, error) { + lsm, vlog := d.DB.Size() + return uint64(lsm + vlog), nil +} + +func (d *Datastore) Close() error { + return d.DB.Close() +} + +func (d *Datastore) IsThreadSafe() {} + +func (d *Datastore) Batch() (ds.Batch, error) { + tx, _ := d.NewTransaction(false) + return tx, nil +} + +func (d *Datastore) CollectGarbage() error { + err := d.DB.RunValueLogGC(d.gcDiscardRatio) + if err == badger.ErrNoRewrite { + err = nil + } + return err +} + +var _ ds.Datastore = (*txn)(nil) +var _ ds.TTLDatastore = (*txn)(nil) + +func (t *txn) Put(key ds.Key, value []byte) error { + return t.txn.Set(key.Bytes(), value) +} + +func (t *txn) PutWithTTL(key ds.Key, value []byte, ttl time.Duration) error { + return t.txn.SetWithTTL(key.Bytes(), value, ttl) +} + +func (t *txn) GetExpiration(key ds.Key) (time.Time, error) { + item, err := t.txn.Get(key.Bytes()) + if err == badger.ErrKeyNotFound { + return time.Time{}, ds.ErrNotFound + } else if err != nil { + return time.Time{}, err + } + return time.Unix(int64(item.ExpiresAt()), 0), nil +} + +func (t *txn) SetTTL(key ds.Key, ttl time.Duration) error { + data, err := t.Get(key) + if err != nil { + return err + } + + return t.PutWithTTL(key, data, ttl) +} + +func (t *txn) Get(key ds.Key) ([]byte, error) { + item, err := t.txn.Get(key.Bytes()) + if err == badger.ErrKeyNotFound { + err = ds.ErrNotFound + } + if err != nil { + return nil, err + } + + return item.ValueCopy(nil) +} + +func (t *txn) Has(key ds.Key) (bool, error) { + _, err := t.txn.Get(key.Bytes()) + switch err { + case badger.ErrKeyNotFound: + return false, nil + case nil: + return true, nil + default: + return false, err + } +} + +func (t *txn) GetSize(key ds.Key) (int, error) { + item, err := t.txn.Get(key.Bytes()) + switch err { + case nil: + return int(item.ValueSize()), nil + case badger.ErrKeyNotFound: + return -1, ds.ErrNotFound + default: + return -1, err + } +} + +func (t *txn) Delete(key ds.Key) error { + return t.txn.Delete(key.Bytes()) +} + +func (t *txn) Query(q dsq.Query) (dsq.Results, error) { + prefix := []byte(q.Prefix) + opt := badger.DefaultIteratorOptions + opt.PrefetchValues = !q.KeysOnly + + // Special case order by key. + orders := q.Orders + if len(orders) > 0 { + switch q.Orders[0].(type) { + case dsq.OrderByKey, *dsq.OrderByKey: + // Already ordered by key. + orders = nil + case dsq.OrderByKeyDescending, *dsq.OrderByKeyDescending: + orders = nil + opt.Reverse = true + } + } + + txn := t.txn + + it := txn.NewIterator(opt) + it.Seek(prefix) + if q.Offset > 0 { + for j := 0; j < q.Offset; j++ { + it.Next() + } + } + + qrb := dsq.NewResultBuilder(q) + + qrb.Process.Go(func(worker goprocess.Process) { + if t.implicit { + // this iterator is part of an implicit transaction, so when we're done we must discard + // the transaction. It's safe to discard the txn it because it contains the iterator only. + defer t.Discard() + } + defer it.Close() + + for sent := 0; it.ValidForPrefix(prefix); sent++ { + if qrb.Query.Limit > 0 && sent >= qrb.Query.Limit { + break + } + + item := it.Item() + + k := string(item.Key()) + e := dsq.Entry{Key: k} + + var result dsq.Result + if !q.KeysOnly { + b, err := item.ValueCopy(nil) + if err != nil { + result = dsq.Result{Error: err} + } else { + e.Value = b + result = dsq.Result{Entry: e} + } + } else { + result = dsq.Result{Entry: e} + } + + if q.ReturnExpirations { + result.Expiration = time.Unix(int64(item.ExpiresAt()), 0) + } + + select { + case qrb.Output <- result: + case <-worker.Closing(): // client told us to close early + return + } + it.Next() + } + + return + }) + + go qrb.Process.CloseAfterChildren() + + // Now, apply remaining things (filters, order) + qr := qrb.Results() + for _, f := range q.Filters { + qr = dsq.NaiveFilter(qr, f) + } + if len(orders) > 0 { + qr = dsq.NaiveOrder(qr, orders...) + } + + return qr, nil +} + +func (t *txn) Commit() error { + return t.txn.Commit() +} + +// Alias to commit +func (t *txn) Close() error { + return t.txn.Commit() +} + +func (t *txn) Discard() { + t.txn.Discard() +} diff --git a/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/package.json b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/package.json new file mode 100644 index 0000000000..dd4ae8e9af --- /dev/null +++ b/vendor/gx/ipfs/QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91/go-ds-badger/package.json @@ -0,0 +1,42 @@ +{ + "author": "magik6k", + "bugs": { + "url": "https://github.com/ipfs/go-ds-badger" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ds-badger" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "dgraph-io", + "hash": "QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd", + "name": "badger", + "version": "2.11.4" + }, + { + "author": "Kubuxu", + "hash": "QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93", + "name": "go-os-helper", + "version": "0.0.0" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "", + "name": "go-ds-badger", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.12.3" +} + diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/.travis.yml b/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/.travis.yml deleted file mode 100644 index 00c7e88dc2..0000000000 --- a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -os: - - linux - - osx - -language: go - -sudo: false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/package.json b/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/package.json deleted file mode 100644 index ab69461525..0000000000 --- a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-peer" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-peer" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-peer", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.4.0" -} - diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peer.go b/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peer.go deleted file mode 100644 index 089314c977..0000000000 --- a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peer.go +++ /dev/null @@ -1,189 +0,0 @@ -// Package peer implements an object used to represent peers in the ipfs network. -package peer - -import ( - "encoding/hex" - "errors" - "fmt" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" -) - -// MaxInlineKeyLength is the maximum length a key can be for it to be inlined in -// the peer ID. -// -// * When `len(pubKey.Bytes()) <= MaxInlineKeyLength`, the peer ID is the -// identity multihash hash of the public key. -// * When `len(pubKey.Bytes()) > MaxInlineKeyLength`, the peer ID is the -// sha2-256 multihash of the public key. -const MaxInlineKeyLength = 42 - -var ( - // ErrEmptyPeerID is an error for empty peer ID. - ErrEmptyPeerID = errors.New("empty peer ID") - // ErrNoPublickKey is an error for peer IDs that don't embed public keys - ErrNoPublicKey = errors.New("public key is not embedded in peer ID") -) - -// ID is a libp2p peer identity. -type ID string - -// Pretty returns a b58-encoded string of the ID -func (id ID) Pretty() string { - return IDB58Encode(id) -} - -// Loggable returns a pretty peerID string in loggable JSON format -func (id ID) Loggable() map[string]interface{} { - return map[string]interface{}{ - "peerID": id.Pretty(), - } -} - -// String prints out the peer. -// -// TODO(brian): ensure correctness at ID generation and -// enforce this by only exposing functions that generate -// IDs safely. Then any peer.ID type found in the -// codebase is known to be correct. -func (id ID) String() string { - pid := id.Pretty() - if len(pid) <= 10 { - return fmt.Sprintf("", pid) - } - return fmt.Sprintf("", pid[:2], pid[len(pid)-6:]) -} - -// MatchesPrivateKey tests whether this ID was derived from sk -func (id ID) MatchesPrivateKey(sk ic.PrivKey) bool { - return id.MatchesPublicKey(sk.GetPublic()) -} - -// MatchesPublicKey tests whether this ID was derived from pk -// OpenBazaar: test both inline and and hashes pubkeys. -func (id ID) MatchesPublicKey(pk ic.PubKey) bool { - oid, err := IDFromPublicKey(pk) - if err != nil { - return false - } - iid, err := InlineIDFromPublicKey(pk) - if err != nil { - return false - } - return oid == id || iid == id -} - -// ExtractPublicKey attempts to extract the public key from an ID -// -// This method returns ErrNoPublicKey if the peer ID looks valid but it can't extract -// the public key. -func (id ID) ExtractPublicKey() (ic.PubKey, error) { - decoded, err := mh.Decode([]byte(id)) - if err != nil { - return nil, err - } - if decoded.Code != mh.ID { - return nil, ErrNoPublicKey - } - pk, err := ic.UnmarshalPublicKey(decoded.Digest) - if err != nil { - return nil, err - } - return pk, nil -} - -// Validate check if ID is empty or not -func (id ID) Validate() error { - if id == ID("") { - return ErrEmptyPeerID - } - - return nil -} - -// IDFromString cast a string to ID type, and validate -// the id to make sure it is a multihash. -func IDFromString(s string) (ID, error) { - if _, err := mh.Cast([]byte(s)); err != nil { - return ID(""), err - } - return ID(s), nil -} - -// IDFromBytes cast a string to ID type, and validate -// the id to make sure it is a multihash. -func IDFromBytes(b []byte) (ID, error) { - if _, err := mh.Cast(b); err != nil { - return ID(""), err - } - return ID(b), nil -} - -// IDB58Decode returns a b58-decoded Peer -func IDB58Decode(s string) (ID, error) { - m, err := mh.FromB58String(s) - if err != nil { - return "", err - } - return ID(m), err -} - -// IDB58Encode returns b58-encoded string -func IDB58Encode(id ID) string { - return b58.Encode([]byte(id)) -} - -// IDHexDecode returns a hex-decoded Peer -func IDHexDecode(s string) (ID, error) { - m, err := mh.FromHexString(s) - if err != nil { - return "", err - } - return ID(m), err -} - -// IDHexEncode returns hex-encoded string -func IDHexEncode(id ID) string { - return hex.EncodeToString([]byte(id)) -} - -// OpenBazaar: temporary helper function to remain forward compatible with -// inline keys -func InlineIDFromPublicKey(pk ic.PubKey) (ID, error) { - b, err := pk.Bytes() - if err != nil { - return "", err - } - hash, _ := mh.Sum(b, mh.ID, -1) - return ID(hash), nil -} - -// IDFromPublicKey returns the Peer ID corresponding to pk -func IDFromPublicKey(pk ic.PubKey) (ID, error) { - b, err := pk.Bytes() - if err != nil { - return "", err - } - var alg uint64 = mh.SHA2_256 - if len(b) <= MaxInlineKeyLength { - // OpenBazaar: in the next version once enough people have upgraded we will - // uncomment this line and generate inline keys. - //alg = mh.ID - } - hash, _ := mh.Sum(b, alg, -1) - return ID(hash), nil -} - -// IDFromPrivateKey returns the Peer ID corresponding to sk -func IDFromPrivateKey(sk ic.PrivKey) (ID, error) { - return IDFromPublicKey(sk.GetPublic()) -} - -// IDSlice for sorting peers -type IDSlice []ID - -func (es IDSlice) Len() int { return len(es) } -func (es IDSlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } -func (es IDSlice) Less(i, j int) bool { return string(es[i]) < string(es[j]) } diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/test/utils.go b/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/test/utils.go deleted file mode 100644 index 6d14c8b219..0000000000 --- a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/test/utils.go +++ /dev/null @@ -1,39 +0,0 @@ -package testutil - -import ( - "io" - "math/rand" - "sync/atomic" - "time" - - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -var generatedPairs int64 = 0 - -func RandPeerID() (peer.ID, error) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - buf := make([]byte, 16) - if _, err := io.ReadFull(r, buf); err != nil { - return "", err - } - h, _ := mh.Sum(buf, mh.SHA2_256, -1) - return peer.ID(h), nil -} - -func RandTestKeyPair(bits int) (ci.PrivKey, ci.PubKey, error) { - seed := time.Now().UnixNano() - - // workaround for low time resolution - seed += atomic.AddInt64(&generatedPairs, 1) << 32 - - r := rand.New(rand.NewSource(seed)) - return ci.GenerateKeyPairWithReader(ci.RSA, bits, r) -} - -func SeededTestKeyPair(seed int64) (ci.PrivKey, ci.PubKey, error) { - r := rand.New(rand.NewSource(seed)) - return ci.GenerateKeyPairWithReader(ci.RSA, 512, r) -} diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/.travis.yml b/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/.travis.yml deleted file mode 100644 index f6045685f6..0000000000 --- a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/package.json b/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/package.json deleted file mode 100644 index c9b0bbeb40..0000000000 --- a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-connmgr" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-connmgr" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "why", - "hash": "QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ", - "name": "go-libp2p-interface-connmgr", - "version": "0.0.21" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-connmgr", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.3.23" -} - diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/.travis.yml b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/.travis.yml deleted file mode 100644 index e31ed20cfb..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/README.md b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/README.md deleted file mode 100644 index fac964f4e8..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# go-libp2p-peerstore -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-peerstore?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p-peerstore) -[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-libp2p-peerstore/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-libp2p-peerstore?branch=master) -[![Build Status](https://travis-ci.org/libp2p/go-libp2p-peerstore.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peerstore) - -> An object to manage peers, their addresses, and other metadata about them. - -## Install - -```sh -go get github.com/libp2p/go-libp2p-peerstore -``` - -## Usage - -Check out the [GoDocs](https://godoc.org/github.com/libp2p/go-libp2p-peerstore). - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-libp2p-peerstore/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License -MIT diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/sorting.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/sorting.go deleted file mode 100644 index 62b079a75b..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/sorting.go +++ /dev/null @@ -1,62 +0,0 @@ -package addr - -import ( - "bytes" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - mafmt "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" -) - -func isFDCostlyTransport(a ma.Multiaddr) bool { - return mafmt.TCP.Matches(a) -} - -type AddrList []ma.Multiaddr - -func (al AddrList) Len() int { - return len(al) -} - -func (al AddrList) Swap(i, j int) { - al[i], al[j] = al[j], al[i] -} - -func (al AddrList) Less(i, j int) bool { - a := al[i] - b := al[j] - - // dial localhost addresses next, they should fail immediately - lba := manet.IsIPLoopback(a) - lbb := manet.IsIPLoopback(b) - if lba { - if !lbb { - return true - } - } - - // dial utp and similar 'non-fd-consuming' addresses first - fda := isFDCostlyTransport(a) - fdb := isFDCostlyTransport(b) - if !fda { - if fdb { - return true - } - - // if neither consume fd's, assume equal ordering - return false - } - - // if 'b' doesnt take a file descriptor - if !fdb { - return false - } - - // if 'b' is loopback and both take file descriptors - if lbb { - return false - } - - // for the rest, just sort by bytes - return bytes.Compare(a.Bytes(), b.Bytes()) > 0 -} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/interface.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/interface.go deleted file mode 100644 index 329a23c010..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/interface.go +++ /dev/null @@ -1,140 +0,0 @@ -package peerstore - -import ( - "context" - "errors" - "math" - "time" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -var ErrNotFound = errors.New("item not found") - -var ( - // AddressTTL is the expiration time of addresses. - AddressTTL = time.Hour - - // TempAddrTTL is the ttl used for a short lived address - TempAddrTTL = time.Second * 10 - - // ProviderAddrTTL is the TTL of an address we've received from a provider. - // This is also a temporary address, but lasts longer. After this expires, - // the records we return will require an extra lookup. - ProviderAddrTTL = time.Minute * 10 - - // RecentlyConnectedAddrTTL is used when we recently connected to a peer. - // It means that we are reasonably certain of the peer's address. - RecentlyConnectedAddrTTL = time.Minute * 10 - - // OwnObservedAddrTTL is used for our own external addresses observed by peers. - OwnObservedAddrTTL = time.Minute * 10 -) - -// Permanent TTLs (distinct so we can distinguish between them, constant as they -// are, in fact, permanent) -const ( - - // PermanentAddrTTL is the ttl for a "permanent address" (e.g. bootstrap nodes). - PermanentAddrTTL = math.MaxInt64 - iota - - // ConnectedAddrTTL is the ttl used for the addresses of a peer to whom - // we're connected directly. This is basically permanent, as we will - // clear them + re-add under a TempAddrTTL after disconnecting. - ConnectedAddrTTL -) - -// Peerstore provides a threadsafe store of Peer related -// information. -type Peerstore interface { - AddrBook - KeyBook - PeerMetadata - Metrics - - // PeerInfo returns a peer.PeerInfo struct for given peer.ID. - // This is a small slice of the information Peerstore has on - // that peer, useful to other services. - PeerInfo(peer.ID) PeerInfo - - GetProtocols(peer.ID) ([]string, error) - AddProtocols(peer.ID, ...string) error - SetProtocols(peer.ID, ...string) error - SupportsProtocols(peer.ID, ...string) ([]string, error) - - // Peers returns all of the peer IDs stored across all inner stores. - Peers() peer.IDSlice -} - -// PeerMetadata can handle values of any type. Serializing values is -// up to the implementation. Dynamic type introspection may not be -// supported, in which case explicitly enlisting types in the -// serializer may be required. -// -// Refer to the docs of the underlying implementation for more -// information. -type PeerMetadata interface { - // Get/Put is a simple registry for other peer-related key/value pairs. - // if we find something we use often, it should become its own set of - // methods. this is a last resort. - Get(p peer.ID, key string) (interface{}, error) - Put(p peer.ID, key string, val interface{}) error -} - -// AddrBook holds the multiaddrs of peers. -type AddrBook interface { - - // AddAddr calls AddAddrs(p, []ma.Multiaddr{addr}, ttl) - AddAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration) - - // AddAddrs gives this AddrBook addresses to use, with a given ttl - // (time-to-live), after which the address is no longer valid. - // If the manager has a longer TTL, the operation is a no-op for that address - AddAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) - - // SetAddr calls mgr.SetAddrs(p, addr, ttl) - SetAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration) - - // SetAddrs sets the ttl on addresses. This clears any TTL there previously. - // This is used when we receive the best estimate of the validity of an address. - SetAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) - - // UpdateAddrs updates the addresses associated with the given peer that have - // the given oldTTL to have the given newTTL. - UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL time.Duration) - - // Addresses returns all known (and valid) addresses for a given peer - Addrs(p peer.ID) []ma.Multiaddr - - // AddrStream returns a channel that gets all addresses for a given - // peer sent on it. If new addresses are added after the call is made - // they will be sent along through the channel as well. - AddrStream(context.Context, peer.ID) <-chan ma.Multiaddr - - // ClearAddresses removes all previously stored addresses - ClearAddrs(p peer.ID) - - // PeersWithAddrs returns all of the peer IDs stored in the AddrBook - PeersWithAddrs() peer.IDSlice -} - -// KeyBook tracks the keys of Peers. -type KeyBook interface { - - // PubKey stores the public key of a peer. - PubKey(peer.ID) ic.PubKey - - // AddPubKey stores the public key of a peer. - AddPubKey(peer.ID, ic.PubKey) error - - // PrivKey returns the private key of a peer. - PrivKey(peer.ID) ic.PrivKey - - // AddPrivKey stores the private key of a peer. - AddPrivKey(peer.ID, ic.PrivKey) error - - // PeersWithKeys returns all the peer IDs stored in the KeyBook - PeersWithKeys() peer.IDSlice -} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/package.json b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/package.json deleted file mode 100644 index 6d9b8f9dd4..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-peerstore" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-peerstore" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc", - "name": "go-keyspace", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "jbenet", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "magik6k", - "hash": "QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui", - "name": "go-ds-badger", - "version": "1.10.0" - }, - { - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "Stebalien", - "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", - "name": "go-buffer-pool", - "version": "0.1.3" - }, - { - "author": "whyrusleeping", - "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", - "name": "base32", - "version": "0.0.2" - }, - { - "author": "whyrusleeping", - "hash": "QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a", - "name": "go-ds-leveldb", - "version": "1.2.1" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-peerstore", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.6" -} - diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerstore.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerstore.go deleted file mode 100644 index a79b899b31..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerstore.go +++ /dev/null @@ -1,149 +0,0 @@ -package peerstore - -import ( - "fmt" - "sync" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -var _ Peerstore = (*peerstore)(nil) - -type peerstore struct { - Metrics - - KeyBook - AddrBook - PeerMetadata - - // lock for protocol information, separate from datastore lock - protolock sync.Mutex -} - -// NewPeerstore creates a data structure that stores peer data, backed by the -// supplied implementations of KeyBook, AddrBook and PeerMetadata. -func NewPeerstore(kb KeyBook, ab AddrBook, md PeerMetadata) Peerstore { - return &peerstore{ - KeyBook: kb, - AddrBook: ab, - PeerMetadata: md, - Metrics: NewMetrics(), - } -} - -func (ps *peerstore) Peers() peer.IDSlice { - set := map[peer.ID]struct{}{} - for _, p := range ps.PeersWithKeys() { - set[p] = struct{}{} - } - for _, p := range ps.PeersWithAddrs() { - set[p] = struct{}{} - } - - pps := make(peer.IDSlice, 0, len(set)) - for p := range set { - pps = append(pps, p) - } - return pps -} - -func (ps *peerstore) PeerInfo(p peer.ID) PeerInfo { - return PeerInfo{ - ID: p, - Addrs: ps.AddrBook.Addrs(p), - } -} - -func (ps *peerstore) SetProtocols(p peer.ID, protos ...string) error { - ps.protolock.Lock() - defer ps.protolock.Unlock() - - protomap := make(map[string]struct{}) - for _, proto := range protos { - protomap[proto] = struct{}{} - } - - return ps.Put(p, "protocols", protomap) -} - -func (ps *peerstore) AddProtocols(p peer.ID, protos ...string) error { - ps.protolock.Lock() - defer ps.protolock.Unlock() - protomap, err := ps.getProtocolMap(p) - if err != nil { - return err - } - - for _, proto := range protos { - protomap[proto] = struct{}{} - } - - return ps.Put(p, "protocols", protomap) -} - -func (ps *peerstore) getProtocolMap(p peer.ID) (map[string]struct{}, error) { - iprotomap, err := ps.Get(p, "protocols") - switch err { - default: - return nil, err - case ErrNotFound: - return make(map[string]struct{}), nil - case nil: - cast, ok := iprotomap.(map[string]struct{}) - if !ok { - return nil, fmt.Errorf("stored protocol set was not a map") - } - - return cast, nil - } -} - -func (ps *peerstore) GetProtocols(p peer.ID) ([]string, error) { - ps.protolock.Lock() - defer ps.protolock.Unlock() - pmap, err := ps.getProtocolMap(p) - if err != nil { - return nil, err - } - - var out []string - for k := range pmap { - out = append(out, k) - } - - return out, nil -} - -func (ps *peerstore) SupportsProtocols(p peer.ID, protos ...string) ([]string, error) { - ps.protolock.Lock() - defer ps.protolock.Unlock() - pmap, err := ps.getProtocolMap(p) - if err != nil { - return nil, err - } - - var out []string - for _, proto := range protos { - if _, ok := pmap[proto]; ok { - out = append(out, proto) - } - } - - return out, nil -} - -func PeerInfos(ps Peerstore, peers peer.IDSlice) []PeerInfo { - pi := make([]PeerInfo, len(peers)) - for i, p := range peers { - pi[i] = ps.PeerInfo(p) - } - return pi -} - -func PeerInfoIDs(pis []PeerInfo) peer.IDSlice { - ps := make(peer.IDSlice, len(pis)) - for i, pi := range pis { - ps[i] = pi.ID - } - return ps -} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/peerstore.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/peerstore.go deleted file mode 100644 index 6ce46cd689..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/peerstore.go +++ /dev/null @@ -1,11 +0,0 @@ -package pstoremem - -import pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - -// NewPeerstore creates an in-memory threadsafe collection of peers. -func NewPeerstore() pstore.Peerstore { - return pstore.NewPeerstore( - NewKeyBook(), - NewAddrBook(), - NewPeerMetadata()) -} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/interface.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/interface.go deleted file mode 100644 index 5153039117..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/interface.go +++ /dev/null @@ -1,18 +0,0 @@ -package queue - -import "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - -// PeerQueue maintains a set of peers ordered according to a metric. -// Implementations of PeerQueue could order peers based on distances along -// a KeySpace, latency measurements, trustworthiness, reputation, etc. -type PeerQueue interface { - - // Len returns the number of items in PeerQueue - Len() int - - // Enqueue adds this node to the queue. - Enqueue(peer.ID) - - // Dequeue retrieves the highest (smallest int) priority node - Dequeue() peer.ID -} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/sync.go b/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/sync.go deleted file mode 100644 index f0c82fbbfc..0000000000 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/sync.go +++ /dev/null @@ -1,85 +0,0 @@ -package queue - -import ( - "context" - - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("peerqueue") - -// ChanQueue makes any PeerQueue synchronizable through channels. -type ChanQueue struct { - Queue PeerQueue - EnqChan chan<- peer.ID - DeqChan <-chan peer.ID -} - -// NewChanQueue creates a ChanQueue by wrapping pq. -func NewChanQueue(ctx context.Context, pq PeerQueue) *ChanQueue { - cq := &ChanQueue{Queue: pq} - cq.process(ctx) - return cq -} - -func (cq *ChanQueue) process(ctx context.Context) { - // construct the channels here to be able to use them bidirectionally - enqChan := make(chan peer.ID) - deqChan := make(chan peer.ID) - - cq.EnqChan = enqChan - cq.DeqChan = deqChan - - go func() { - log.Debug("processing") - defer log.Debug("closed") - defer close(deqChan) - - var next peer.ID - var item peer.ID - var more bool - - for { - if cq.Queue.Len() == 0 { - // log.Debug("wait for enqueue") - select { - case next, more = <-enqChan: - if !more { - return - } - // log.Debug("got", next) - - case <-ctx.Done(): - return - } - - } else { - next = cq.Queue.Dequeue() - // log.Debug("peek", next) - } - - select { - case item, more = <-enqChan: - if !more { - if cq.Queue.Len() > 0 { - return // we're done done. - } - enqChan = nil // closed, so no use. - } - // log.Debug("got", item) - cq.Queue.Enqueue(item) - cq.Queue.Enqueue(next) // order may have changed. - next = "" - - case deqChan <- next: - // log.Debug("dequeued", next) - next = "" - - case <-ctx.Done(): - return - } - } - - }() -} diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/package.json b/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/package.json deleted file mode 100644 index 21a7cf4e8d..0000000000 --- a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-chunker" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-chunker" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmZooytqEoUwQjv7KzH4d3xyJnyvD3AWJaCDMYt5pbCtua", - "name": "chunker", - "version": "0.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "Stebalien", - "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", - "name": "go-buffer-pool", - "version": "0.1.3" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-chunker", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.3" -} - diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/.travis.yml b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/.travis.yml new file mode 100644 index 0000000000..9a7e494f54 --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/.travis.yml @@ -0,0 +1,20 @@ +language: go +sudo: true + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/LICENSE b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/LICENSE rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/LICENSE diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/Makefile b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/Makefile similarity index 100% rename from vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/Makefile rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/Makefile diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/README.md b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/README.md new file mode 100644 index 0000000000..ac1b554aa3 --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/README.md @@ -0,0 +1,40 @@ +# go-libp2p-crypto +[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/pm-waffle-yellow.svg?style=flat-square)](http://github.com/libp2p/libp2p) +[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-crypto?status.svg)](https://godoc.org/github.com/ipfs/go-libp2p-crypto) +[![Coverage Status](https://coveralls.io/repos/github/ipfs/go-libp2p-crypto/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-libp2p-crypto?branch=master) +[![Build Status](https://travis-ci.org/libp2p/go-libp2p-crypto.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-crypto) + +> Various cryptographic utilities used by ipfs + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Contribute](#contribute) + - [Want to hack on IPFS?](#want-to-hack-on-ipfs) +- [License](#license) + +## Install + +```sh +go get github.com/libp2p/go-libp2p-crypto +``` + +## Usage + +Go to https://godoc.org/github.com/libp2p/go-libp2p-crypto. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-crypto/issues)! + +Check out our [contributing document](https://github.com/libp2p/community/blob/master/CONTRIBUTE.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © 2016 Jeromy Johnson diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/codecov.yml b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/codecov.yml rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/codecov.yml diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ecdsa.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ecdsa.go new file mode 100644 index 0000000000..3e0a9b585f --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ecdsa.go @@ -0,0 +1,186 @@ +package crypto + +import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/x509" + "encoding/asn1" + "errors" + "io" + "math/big" + + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" +) + +// ECDSAPrivateKey is an implementation of an ECDSA private key +type ECDSAPrivateKey struct { + priv *ecdsa.PrivateKey +} + +// ECDSAPublicKey is an implementation of an ECDSA public key +type ECDSAPublicKey struct { + pub *ecdsa.PublicKey +} + +// ECDSASig holds the r and s values of an ECDSA signature +type ECDSASig struct { + R, S *big.Int +} + +var ( + // ErrNotECDSAPubKey is returned when the public key passed is not an ecdsa public key + ErrNotECDSAPubKey = errors.New("not an ecdsa public key") + // ErrNilSig is returned when the signature is nil + ErrNilSig = errors.New("sig is nil") + // ErrNilPrivateKey is returned when a nil private key is provided + ErrNilPrivateKey = errors.New("private key is nil") + // ECDSACurve is the default ecdsa curve used + ECDSACurve = elliptic.P256() +) + +// GenerateECDSAKeyPair generates a new ecdsa private and public key +func GenerateECDSAKeyPair(src io.Reader) (PrivKey, PubKey, error) { + return GenerateECDSAKeyPairWithCurve(ECDSACurve, src) +} + +// GenerateECDSAKeyPairWithCurve generates a new ecdsa private and public key with a speicified curve +func GenerateECDSAKeyPairWithCurve(curve elliptic.Curve, src io.Reader) (PrivKey, PubKey, error) { + priv, err := ecdsa.GenerateKey(curve, src) + if err != nil { + return nil, nil, err + } + + return &ECDSAPrivateKey{priv}, &ECDSAPublicKey{&priv.PublicKey}, nil +} + +// ECDSAKeyPairFromKey generates a new ecdsa private and public key from an input private key +func ECDSAKeyPairFromKey(priv *ecdsa.PrivateKey) (PrivKey, PubKey, error) { + if priv == nil { + return nil, nil, ErrNilPrivateKey + } + + return &ECDSAPrivateKey{priv}, &ECDSAPublicKey{&priv.PublicKey}, nil +} + +// MarshalECDSAPrivateKey returns x509 bytes from a private key +func MarshalECDSAPrivateKey(ePriv ECDSAPrivateKey) ([]byte, error) { + return x509.MarshalECPrivateKey(ePriv.priv) +} + +// MarshalECDSAPublicKey returns x509 bytes from a public key +func MarshalECDSAPublicKey(ePub ECDSAPublicKey) ([]byte, error) { + return x509.MarshalPKIXPublicKey(ePub.pub) +} + +// UnmarshalECDSAPrivateKey returns a private key from x509 bytes +func UnmarshalECDSAPrivateKey(data []byte) (PrivKey, error) { + priv, err := x509.ParseECPrivateKey(data) + if err != nil { + return nil, err + } + + return &ECDSAPrivateKey{priv}, nil +} + +// UnmarshalECDSAPublicKey returns the public key from x509 bytes +func UnmarshalECDSAPublicKey(data []byte) (PubKey, error) { + pubIfc, err := x509.ParsePKIXPublicKey(data) + if err != nil { + return nil, err + } + + pub, ok := pubIfc.(*ecdsa.PublicKey) + if !ok { + return nil, ErrNotECDSAPubKey + } + + return &ECDSAPublicKey{pub}, nil +} + +// Bytes returns the private key as protobuf bytes +func (ePriv *ECDSAPrivateKey) Bytes() ([]byte, error) { + return MarshalPrivateKey(ePriv) +} + +// Type returns the key type +func (ePriv *ECDSAPrivateKey) Type() pb.KeyType { + return pb.KeyType_ECDSA +} + +// Raw returns x509 bytes from a private key +func (ePriv *ECDSAPrivateKey) Raw() ([]byte, error) { + return x509.MarshalECPrivateKey(ePriv.priv) +} + +// Equals compares to private keys +func (ePriv *ECDSAPrivateKey) Equals(o Key) bool { + oPriv, ok := o.(*ECDSAPrivateKey) + if !ok { + return false + } + + return ePriv.priv.D.Cmp(oPriv.priv.D) == 0 +} + +// Sign returns the signature of the input data +func (ePriv *ECDSAPrivateKey) Sign(data []byte) ([]byte, error) { + hash := sha256.Sum256(data) + r, s, err := ecdsa.Sign(rand.Reader, ePriv.priv, hash[:]) + if err != nil { + return nil, err + } + + return asn1.Marshal(ECDSASig{ + R: r, + S: s, + }) +} + +// GetPublic returns a public key +func (ePriv *ECDSAPrivateKey) GetPublic() PubKey { + return &ECDSAPublicKey{&ePriv.priv.PublicKey} +} + +// Bytes returns the public key as protobuf bytes +func (ePub *ECDSAPublicKey) Bytes() ([]byte, error) { + return MarshalPublicKey(ePub) +} + +// Type returns the key type +func (ePub *ECDSAPublicKey) Type() pb.KeyType { + return pb.KeyType_ECDSA +} + +// Raw returns x509 bytes from a public key +func (ePub ECDSAPublicKey) Raw() ([]byte, error) { + return x509.MarshalPKIXPublicKey(ePub.pub) +} + +// Equals compares to public keys +func (ePub *ECDSAPublicKey) Equals(o Key) bool { + oPub, ok := o.(*ECDSAPublicKey) + if !ok { + return false + } + + return ePub.pub.X != nil && ePub.pub.Y != nil && oPub.pub.X != nil && oPub.pub.Y != nil && + 0 == ePub.pub.X.Cmp(oPub.pub.X) && 0 == ePub.pub.Y.Cmp(oPub.pub.Y) +} + +// Verify compares data to a signature +func (ePub *ECDSAPublicKey) Verify(data, sigBytes []byte) (bool, error) { + sig := new(ECDSASig) + if _, err := asn1.Unmarshal(sigBytes, sig); err != nil { + return false, err + } + if sig == nil { + return false, ErrNilSig + } + + hash := sha256.Sum256(data) + + return ecdsa.Verify(ePub.pub, hash[:], sig.R, sig.S), nil +} diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ed25519.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ed25519.go new file mode 100644 index 0000000000..0d431bf0cb --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/ed25519.go @@ -0,0 +1,155 @@ +package crypto + +import ( + "bytes" + "errors" + "fmt" + "io" + + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + + "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" +) + +// Ed25519PrivateKey is an ed25519 private key. +type Ed25519PrivateKey struct { + k ed25519.PrivateKey +} + +// Ed25519PublicKey is an ed25519 public key. +type Ed25519PublicKey struct { + k ed25519.PublicKey +} + +// GenerateEd25519Key generate a new ed25519 private and public key pair. +func GenerateEd25519Key(src io.Reader) (PrivKey, PubKey, error) { + pub, priv, err := ed25519.GenerateKey(src) + if err != nil { + return nil, nil, err + } + + return &Ed25519PrivateKey{ + k: priv, + }, + &Ed25519PublicKey{ + k: pub, + }, + nil +} + +// Type of the private key (Ed25519). +func (k *Ed25519PrivateKey) Type() pb.KeyType { + return pb.KeyType_Ed25519 +} + +// Bytes marshals an ed25519 private key to protobuf bytes. +func (k *Ed25519PrivateKey) Bytes() ([]byte, error) { + return MarshalPrivateKey(k) +} + +// Raw private key bytes. +func (k *Ed25519PrivateKey) Raw() ([]byte, error) { + // The Ed25519 private key contains two 32-bytes curve points, the private + // key and the public key. + // It makes it more efficient to get the public key without re-computing an + // elliptic curve multiplication. + buf := make([]byte, len(k.k)) + copy(buf, k.k) + + return buf, nil +} + +func (k *Ed25519PrivateKey) pubKeyBytes() []byte { + return k.k[ed25519.PrivateKeySize-ed25519.PublicKeySize:] +} + +// Equals compares two ed25519 private keys. +func (k *Ed25519PrivateKey) Equals(o Key) bool { + edk, ok := o.(*Ed25519PrivateKey) + if !ok { + return false + } + + return bytes.Equal(k.k, edk.k) +} + +// GetPublic returns an ed25519 public key from a private key. +func (k *Ed25519PrivateKey) GetPublic() PubKey { + return &Ed25519PublicKey{k: k.pubKeyBytes()} +} + +// Sign returns a signature from an input message. +func (k *Ed25519PrivateKey) Sign(msg []byte) ([]byte, error) { + return ed25519.Sign(k.k, msg), nil +} + +// Type of the public key (Ed25519). +func (k *Ed25519PublicKey) Type() pb.KeyType { + return pb.KeyType_Ed25519 +} + +// Bytes returns a ed25519 public key as protobuf bytes. +func (k *Ed25519PublicKey) Bytes() ([]byte, error) { + return MarshalPublicKey(k) +} + +// Raw public key bytes. +func (k *Ed25519PublicKey) Raw() ([]byte, error) { + return k.k, nil +} + +// Equals compares two ed25519 public keys. +func (k *Ed25519PublicKey) Equals(o Key) bool { + edk, ok := o.(*Ed25519PublicKey) + if !ok { + return false + } + + return bytes.Equal(k.k, edk.k) +} + +// Verify checks a signature agains the input data. +func (k *Ed25519PublicKey) Verify(data []byte, sig []byte) (bool, error) { + return ed25519.Verify(k.k, data, sig), nil +} + +// UnmarshalEd25519PublicKey returns a public key from input bytes. +func UnmarshalEd25519PublicKey(data []byte) (PubKey, error) { + if len(data) != 32 { + return nil, errors.New("expect ed25519 public key data size to be 32") + } + + return &Ed25519PublicKey{ + k: ed25519.PublicKey(data), + }, nil +} + +// UnmarshalEd25519PrivateKey returns a private key from input bytes. +func UnmarshalEd25519PrivateKey(data []byte) (PrivKey, error) { + switch len(data) { + case ed25519.PrivateKeySize + ed25519.PublicKeySize: + // Remove the redundant public key. See issue #36. + redundantPk := data[ed25519.PrivateKeySize:] + pk := data[ed25519.PrivateKeySize-ed25519.PublicKeySize : ed25519.PrivateKeySize] + if !bytes.Equal(pk, redundantPk) { + return nil, errors.New("expected redundant ed25519 public key to be redundant") + } + + // No point in storing the extra data. + newKey := make([]byte, ed25519.PrivateKeySize) + copy(newKey, data[:ed25519.PrivateKeySize]) + data = newKey + case ed25519.PrivateKeySize: + default: + return nil, fmt.Errorf( + "expected ed25519 data size to be %d or %d, got %d", + ed25519.PrivateKeySize, + ed25519.PrivateKeySize+ed25519.PublicKeySize, + len(data), + ) + } + + return &Ed25519PrivateKey{ + k: ed25519.PrivateKey(data), + }, nil +} diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/key.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/key.go new file mode 100644 index 0000000000..52648c0dbd --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/key.go @@ -0,0 +1,352 @@ +// Package crypto implements various cryptographic utilities used by ipfs. +// This includes a Public and Private key interface and an RSA key implementation +// that satisfies it. +package crypto + +import ( + "bytes" + "crypto/elliptic" + "crypto/hmac" + "crypto/rand" + "crypto/sha1" + "crypto/sha512" + "encoding/base64" + "errors" + "fmt" + "hash" + "io" + + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +const ( + // RSA is an enum for the supported RSA key type + RSA = iota + // Ed25519 is an enum for the supported Ed25519 key type + Ed25519 + // Secp256k1 is an enum for the supported Secp256k1 key type + Secp256k1 + // ECDSA is an enum for the supported ECDSA key type + ECDSA +) + +var ( + // ErrBadKeyType is returned when a key is not supported + ErrBadKeyType = errors.New("invalid or unsupported key type") + // KeyTypes is a list of supported keys + KeyTypes = []int{ + RSA, + Ed25519, + Secp256k1, + ECDSA, + } +) + +// PubKeyUnmarshaller is a func that creates a PubKey from a given slice of bytes +type PubKeyUnmarshaller func(data []byte) (PubKey, error) + +// PrivKeyUnmarshaller is a func that creates a PrivKey from a given slice of bytes +type PrivKeyUnmarshaller func(data []byte) (PrivKey, error) + +// PubKeyUnmarshallers is a map of unmarshallers by key type +var PubKeyUnmarshallers = map[pb.KeyType]PubKeyUnmarshaller{ + pb.KeyType_RSA: UnmarshalRsaPublicKey, + pb.KeyType_Ed25519: UnmarshalEd25519PublicKey, + pb.KeyType_Secp256k1: UnmarshalSecp256k1PublicKey, + pb.KeyType_ECDSA: UnmarshalECDSAPublicKey, +} + +// PrivKeyUnmarshallers is a map of unmarshallers by key type +var PrivKeyUnmarshallers = map[pb.KeyType]PrivKeyUnmarshaller{ + pb.KeyType_RSA: UnmarshalRsaPrivateKey, + pb.KeyType_Ed25519: UnmarshalEd25519PrivateKey, + pb.KeyType_Secp256k1: UnmarshalSecp256k1PrivateKey, + pb.KeyType_ECDSA: UnmarshalECDSAPrivateKey, +} + +// Key represents a crypto key that can be compared to another key +type Key interface { + // Bytes returns a serialized, storeable representation of this key + // DEPRECATED in favor of Marshal / Unmarshal + Bytes() ([]byte, error) + + // Equals checks whether two PubKeys are the same + Equals(Key) bool + + // Raw returns the raw bytes of the key (not wrapped in the + // libp2p-crypto protobuf). + // + // This function is the inverse of {Priv,Pub}KeyUnmarshaler. + Raw() ([]byte, error) + + // Type returns the protobof key type. + Type() pb.KeyType +} + +// PrivKey represents a private key that can be used to generate a public key, +// sign data, and decrypt data that was encrypted with a public key +type PrivKey interface { + Key + + // Cryptographically sign the given bytes + Sign([]byte) ([]byte, error) + + // Return a public key paired with this private key + GetPublic() PubKey +} + +// PubKey is a public key +type PubKey interface { + Key + + // Verify that 'sig' is the signed hash of 'data' + Verify(data []byte, sig []byte) (bool, error) +} + +// GenSharedKey generates the shared key from a given private key +type GenSharedKey func([]byte) ([]byte, error) + +// GenerateKeyPair generates a private and public key +func GenerateKeyPair(typ, bits int) (PrivKey, PubKey, error) { + return GenerateKeyPairWithReader(typ, bits, rand.Reader) +} + +// GenerateKeyPairWithReader returns a keypair of the given type and bitsize +func GenerateKeyPairWithReader(typ, bits int, src io.Reader) (PrivKey, PubKey, error) { + switch typ { + case RSA: + return GenerateRSAKeyPair(bits, src) + case Ed25519: + return GenerateEd25519Key(src) + case Secp256k1: + return GenerateSecp256k1Key(src) + case ECDSA: + return GenerateECDSAKeyPair(src) + default: + return nil, nil, ErrBadKeyType + } +} + +// GenerateEKeyPair returns an ephemeral public key and returns a function that will compute +// the shared secret key. Used in the identify module. +// +// Focuses only on ECDH now, but can be made more general in the future. +func GenerateEKeyPair(curveName string) ([]byte, GenSharedKey, error) { + var curve elliptic.Curve + + switch curveName { + case "P-256": + curve = elliptic.P256() + case "P-384": + curve = elliptic.P384() + case "P-521": + curve = elliptic.P521() + } + + priv, x, y, err := elliptic.GenerateKey(curve, rand.Reader) + if err != nil { + return nil, nil, err + } + + pubKey := elliptic.Marshal(curve, x, y) + + done := func(theirPub []byte) ([]byte, error) { + // Verify and unpack node's public key. + x, y := elliptic.Unmarshal(curve, theirPub) + if x == nil { + return nil, fmt.Errorf("malformed public key: %d %v", len(theirPub), theirPub) + } + + if !curve.IsOnCurve(x, y) { + return nil, errors.New("invalid public key") + } + + // Generate shared secret. + secret, _ := curve.ScalarMult(x, y, priv) + + return secret.Bytes(), nil + } + + return pubKey, done, nil +} + +// StretchedKeys ... +type StretchedKeys struct { + IV []byte + MacKey []byte + CipherKey []byte +} + +// KeyStretcher returns a set of keys for each party by stretching the shared key. +// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey) +func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedKeys, StretchedKeys) { + var cipherKeySize int + var ivSize int + switch cipherType { + case "AES-128": + ivSize = 16 + cipherKeySize = 16 + case "AES-256": + ivSize = 16 + cipherKeySize = 32 + case "Blowfish": + ivSize = 8 + // Note: 24 arbitrarily selected, needs more thought + cipherKeySize = 32 + } + + hmacKeySize := 20 + + seed := []byte("key expansion") + + result := make([]byte, 2*(ivSize+cipherKeySize+hmacKeySize)) + + var h func() hash.Hash + + switch hashType { + case "SHA1": + h = sha1.New + case "SHA256": + h = sha256.New + case "SHA512": + h = sha512.New + default: + panic("Unrecognized hash function, programmer error?") + } + + m := hmac.New(h, secret) + // note: guaranteed to never return an error + m.Write(seed) + + a := m.Sum(nil) + + j := 0 + for j < len(result) { + m.Reset() + + // note: guaranteed to never return an error. + m.Write(a) + m.Write(seed) + + b := m.Sum(nil) + + todo := len(b) + + if j+todo > len(result) { + todo = len(result) - j + } + + copy(result[j:j+todo], b) + + j += todo + + m.Reset() + + // note: guaranteed to never return an error. + m.Write(a) + + a = m.Sum(nil) + } + + half := len(result) / 2 + r1 := result[:half] + r2 := result[half:] + + var k1 StretchedKeys + var k2 StretchedKeys + + k1.IV = r1[0:ivSize] + k1.CipherKey = r1[ivSize : ivSize+cipherKeySize] + k1.MacKey = r1[ivSize+cipherKeySize:] + + k2.IV = r2[0:ivSize] + k2.CipherKey = r2[ivSize : ivSize+cipherKeySize] + k2.MacKey = r2[ivSize+cipherKeySize:] + + return k1, k2 +} + +// UnmarshalPublicKey converts a protobuf serialized public key into its +// representative object +func UnmarshalPublicKey(data []byte) (PubKey, error) { + pmes := new(pb.PublicKey) + err := proto.Unmarshal(data, pmes) + if err != nil { + return nil, err + } + + um, ok := PubKeyUnmarshallers[pmes.GetType()] + if !ok { + return nil, ErrBadKeyType + } + + return um(pmes.GetData()) +} + +// MarshalPublicKey converts a public key object into a protobuf serialized +// public key +func MarshalPublicKey(k PubKey) ([]byte, error) { + pbmes := new(pb.PublicKey) + pbmes.Type = k.Type() + data, err := k.Raw() + if err != nil { + return nil, err + } + pbmes.Data = data + + return proto.Marshal(pbmes) +} + +// UnmarshalPrivateKey converts a protobuf serialized private key into its +// representative object +func UnmarshalPrivateKey(data []byte) (PrivKey, error) { + pmes := new(pb.PrivateKey) + err := proto.Unmarshal(data, pmes) + if err != nil { + return nil, err + } + + um, ok := PrivKeyUnmarshallers[pmes.GetType()] + if !ok { + return nil, ErrBadKeyType + } + + return um(pmes.GetData()) +} + +// MarshalPrivateKey converts a key object into its protobuf serialized form. +func MarshalPrivateKey(k PrivKey) ([]byte, error) { + pbmes := new(pb.PrivateKey) + pbmes.Type = k.Type() + data, err := k.Raw() + if err != nil { + return nil, err + } + + pbmes.Data = data + return proto.Marshal(pbmes) +} + +// ConfigDecodeKey decodes from b64 (for config file), and unmarshals. +func ConfigDecodeKey(b string) ([]byte, error) { + return base64.StdEncoding.DecodeString(b) +} + +// ConfigEncodeKey encodes to b64 (for config file), and marshals. +func ConfigEncodeKey(b []byte) string { + return base64.StdEncoding.EncodeToString(b) +} + +// KeyEqual checks whether two +func KeyEqual(k1, k2 Key) bool { + if k1 == k2 { + return true + } + + b1, err1 := k1.Bytes() + b2, err2 := k2.Bytes() + return bytes.Equal(b1, b2) && err1 == err2 +} diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/package.json b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/package.json new file mode 100644 index 0000000000..f44acbf94c --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/package.json @@ -0,0 +1,42 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-transport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-crypto" + }, + "gxDependencies": [ + { + "author": "btcsuite", + "hash": "QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd", + "name": "btcec", + "version": "0.0.1" + }, + { + "author": "minio", + "hash": "QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU", + "name": "sha256-simd", + "version": "0.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "golang", + "hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N", + "name": "go-crypto", + "version": "0.2.1" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-crypto", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.7" +} + diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/Makefile b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/Makefile rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/Makefile diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.pb.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.pb.go similarity index 85% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.pb.go rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.pb.go index 923b238839..384ba060fa 100644 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.pb.go +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.pb.go @@ -3,12 +3,13 @@ package crypto_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" -import github_com_gogo_protobuf_proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" +import ( + fmt "fmt" + github_com_gogo_protobuf_proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -27,17 +28,21 @@ const ( KeyType_RSA KeyType = 0 KeyType_Ed25519 KeyType = 1 KeyType_Secp256k1 KeyType = 2 + KeyType_ECDSA KeyType = 3 ) var KeyType_name = map[int32]string{ 0: "RSA", 1: "Ed25519", 2: "Secp256k1", + 3: "ECDSA", } + var KeyType_value = map[string]int32{ "RSA": 0, "Ed25519": 1, "Secp256k1": 2, + "ECDSA": 3, } func (x KeyType) Enum() *KeyType { @@ -45,9 +50,11 @@ func (x KeyType) Enum() *KeyType { *p = x return p } + func (x KeyType) String() string { return proto.EnumName(KeyType_name, int32(x)) } + func (x *KeyType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(KeyType_value, data, "KeyType") if err != nil { @@ -56,22 +63,21 @@ func (x *KeyType) UnmarshalJSON(data []byte) error { *x = KeyType(value) return nil } + func (KeyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_crypto_1dd381b574a62cc7, []int{0} + return fileDescriptor_527278fb02d03321, []int{0} } type PublicKey struct { - Type KeyType `protobuf:"varint,1,req,name=Type,enum=crypto.pb.KeyType" json:"Type"` - Data []byte `protobuf:"bytes,2,req,name=Data" json:"Data"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Type KeyType `protobuf:"varint,1,req,name=Type,enum=crypto.pb.KeyType" json:"Type"` + Data []byte `protobuf:"bytes,2,req,name=Data" json:"Data"` } func (m *PublicKey) Reset() { *m = PublicKey{} } func (m *PublicKey) String() string { return proto.CompactTextString(m) } func (*PublicKey) ProtoMessage() {} func (*PublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_crypto_1dd381b574a62cc7, []int{0} + return fileDescriptor_527278fb02d03321, []int{0} } func (m *PublicKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -88,8 +94,8 @@ func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *PublicKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicKey.Merge(dst, src) +func (m *PublicKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicKey.Merge(m, src) } func (m *PublicKey) XXX_Size() int { return m.Size() @@ -115,17 +121,15 @@ func (m *PublicKey) GetData() []byte { } type PrivateKey struct { - Type KeyType `protobuf:"varint,1,req,name=Type,enum=crypto.pb.KeyType" json:"Type"` - Data []byte `protobuf:"bytes,2,req,name=Data" json:"Data"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Type KeyType `protobuf:"varint,1,req,name=Type,enum=crypto.pb.KeyType" json:"Type"` + Data []byte `protobuf:"bytes,2,req,name=Data" json:"Data"` } func (m *PrivateKey) Reset() { *m = PrivateKey{} } func (m *PrivateKey) String() string { return proto.CompactTextString(m) } func (*PrivateKey) ProtoMessage() {} func (*PrivateKey) Descriptor() ([]byte, []int) { - return fileDescriptor_crypto_1dd381b574a62cc7, []int{1} + return fileDescriptor_527278fb02d03321, []int{1} } func (m *PrivateKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -142,8 +146,8 @@ func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *PrivateKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateKey.Merge(dst, src) +func (m *PrivateKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrivateKey.Merge(m, src) } func (m *PrivateKey) XXX_Size() int { return m.Size() @@ -169,10 +173,30 @@ func (m *PrivateKey) GetData() []byte { } func init() { + proto.RegisterEnum("crypto.pb.KeyType", KeyType_name, KeyType_value) proto.RegisterType((*PublicKey)(nil), "crypto.pb.PublicKey") proto.RegisterType((*PrivateKey)(nil), "crypto.pb.PrivateKey") - proto.RegisterEnum("crypto.pb.KeyType", KeyType_name, KeyType_value) } + +func init() { proto.RegisterFile("crypto.proto", fileDescriptor_527278fb02d03321) } + +var fileDescriptor_527278fb02d03321 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2e, 0xaa, 0x2c, + 0x28, 0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0xf1, 0x92, 0x94, 0x82, 0xb9, + 0x38, 0x03, 0x4a, 0x93, 0x72, 0x32, 0x93, 0xbd, 0x53, 0x2b, 0x85, 0x74, 0xb8, 0x58, 0x42, 0x2a, + 0x0b, 0x52, 0x25, 0x18, 0x15, 0x98, 0x34, 0xf8, 0x8c, 0x84, 0xf4, 0xe0, 0xca, 0xf4, 0xbc, 0x53, + 0x2b, 0x41, 0x32, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x81, 0x55, 0x09, 0x49, 0x70, 0xb1, + 0xb8, 0x24, 0x96, 0x24, 0x4a, 0x30, 0x29, 0x30, 0x69, 0xf0, 0xc0, 0x64, 0x40, 0x22, 0x4a, 0x21, + 0x5c, 0x5c, 0x01, 0x45, 0x99, 0x65, 0x89, 0x25, 0xa9, 0x54, 0x34, 0x55, 0xcb, 0x92, 0x8b, 0x1d, + 0xaa, 0x41, 0x88, 0x9d, 0x8b, 0x39, 0x28, 0xd8, 0x51, 0x80, 0x41, 0x88, 0x9b, 0x8b, 0xdd, 0x35, + 0xc5, 0xc8, 0xd4, 0xd4, 0xd0, 0x52, 0x80, 0x51, 0x88, 0x97, 0x8b, 0x33, 0x38, 0x35, 0xb9, 0xc0, + 0xc8, 0xd4, 0x2c, 0xdb, 0x50, 0x80, 0x49, 0x88, 0x93, 0x8b, 0xd5, 0xd5, 0xd9, 0x25, 0xd8, 0x51, + 0x80, 0xd9, 0x49, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x00, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x13, 0xbe, 0xd4, 0xff, 0x19, 0x01, 0x00, 0x00, +} + func (m *PublicKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -237,6 +261,9 @@ func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *PublicKey) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovCrypto(uint64(m.Type)) @@ -248,6 +275,9 @@ func (m *PublicKey) Size() (n int) { } func (m *PrivateKey) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovCrypto(uint64(m.Type)) @@ -287,7 +317,7 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -315,7 +345,7 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (KeyType(b) & 0x7F) << shift + m.Type |= KeyType(b&0x7F) << shift if b < 0x80 { break } @@ -335,7 +365,7 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -344,6 +374,9 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { return ErrInvalidLengthCrypto } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCrypto + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -362,6 +395,9 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthCrypto } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCrypto + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -396,7 +432,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -424,7 +460,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (KeyType(b) & 0x7F) << shift + m.Type |= KeyType(b&0x7F) << shift if b < 0x80 { break } @@ -444,7 +480,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -453,6 +489,9 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { return ErrInvalidLengthCrypto } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCrypto + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -471,6 +510,9 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthCrypto } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCrypto + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -543,10 +585,13 @@ func skipCrypto(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthCrypto } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthCrypto + } return iNdEx, nil case 3: for { @@ -575,6 +620,9 @@ func skipCrypto(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthCrypto + } } return iNdEx, nil case 4: @@ -593,21 +641,3 @@ var ( ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("crypto.proto", fileDescriptor_crypto_1dd381b574a62cc7) } - -var fileDescriptor_crypto_1dd381b574a62cc7 = []byte{ - // 183 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2e, 0xaa, 0x2c, - 0x28, 0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0xf1, 0x92, 0x94, 0x82, 0xb9, - 0x38, 0x03, 0x4a, 0x93, 0x72, 0x32, 0x93, 0xbd, 0x53, 0x2b, 0x85, 0x74, 0xb8, 0x58, 0x42, 0x2a, - 0x0b, 0x52, 0x25, 0x18, 0x15, 0x98, 0x34, 0xf8, 0x8c, 0x84, 0xf4, 0xe0, 0xca, 0xf4, 0xbc, 0x53, - 0x2b, 0x41, 0x32, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x81, 0x55, 0x09, 0x49, 0x70, 0xb1, - 0xb8, 0x24, 0x96, 0x24, 0x4a, 0x30, 0x29, 0x30, 0x69, 0xf0, 0xc0, 0x64, 0x40, 0x22, 0x4a, 0x21, - 0x5c, 0x5c, 0x01, 0x45, 0x99, 0x65, 0x89, 0x25, 0xa9, 0x54, 0x34, 0x55, 0x4b, 0x8f, 0x8b, 0x1d, - 0xaa, 0x41, 0x88, 0x9d, 0x8b, 0x39, 0x28, 0xd8, 0x51, 0x80, 0x41, 0x88, 0x9b, 0x8b, 0xdd, 0x35, - 0xc5, 0xc8, 0xd4, 0xd4, 0xd0, 0x52, 0x80, 0x51, 0x88, 0x97, 0x8b, 0x33, 0x38, 0x35, 0xb9, 0xc0, - 0xc8, 0xd4, 0x2c, 0xdb, 0x50, 0x80, 0xc9, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, - 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0x01, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb9, - 0x28, 0x49, 0x72, 0x06, 0x01, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.proto b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.proto similarity index 95% rename from vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.proto rename to vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.proto index 72778f9728..cb5cee8a22 100644 --- a/vendor/gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb/crypto.proto +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb/crypto.proto @@ -6,6 +6,7 @@ enum KeyType { RSA = 0; Ed25519 = 1; Secp256k1 = 2; + ECDSA = 3; } message PublicKey { diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/rsa.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/rsa.go new file mode 100644 index 0000000000..cc34aed2ec --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/rsa.go @@ -0,0 +1,152 @@ +package crypto + +import ( + "crypto" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "errors" + "io" + + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" +) + +// ErrRsaKeyTooSmall is returned when trying to generate or parse an RSA key +// that's smaller than 512 bits. Keys need to be larger enough to sign a 256bit +// hash so this is a reasonable absolute minimum. +var ErrRsaKeyTooSmall = errors.New("rsa keys must be >= 512 bits to be useful") + +// RsaPrivateKey is an rsa private key +type RsaPrivateKey struct { + sk *rsa.PrivateKey + pk *rsa.PublicKey +} + +// RsaPublicKey is an rsa public key +type RsaPublicKey struct { + k *rsa.PublicKey +} + +// GenerateRSAKeyPair generates a new rsa private and public key +func GenerateRSAKeyPair(bits int, src io.Reader) (PrivKey, PubKey, error) { + if bits < 512 { + return nil, nil, ErrRsaKeyTooSmall + } + priv, err := rsa.GenerateKey(src, bits) + if err != nil { + return nil, nil, err + } + pk := &priv.PublicKey + return &RsaPrivateKey{sk: priv}, &RsaPublicKey{pk}, nil +} + +// Verify compares a signature against input data +func (pk *RsaPublicKey) Verify(data, sig []byte) (bool, error) { + hashed := sha256.Sum256(data) + err := rsa.VerifyPKCS1v15(pk.k, crypto.SHA256, hashed[:], sig) + if err != nil { + return false, err + } + return true, nil +} + +func (pk *RsaPublicKey) Type() pb.KeyType { + return pb.KeyType_RSA +} + +// Bytes returns protobuf bytes of a public key +func (pk *RsaPublicKey) Bytes() ([]byte, error) { + return MarshalPublicKey(pk) +} + +func (pk *RsaPublicKey) Raw() ([]byte, error) { + return x509.MarshalPKIXPublicKey(pk.k) +} + +// Encrypt returns encrypted bytes from the inpu data +func (pk *RsaPublicKey) Encrypt(b []byte) ([]byte, error) { + return rsa.EncryptPKCS1v15(rand.Reader, pk.k, b) +} + +// Equals checks whether this key is equal to another +func (pk *RsaPublicKey) Equals(k Key) bool { + return KeyEqual(pk, k) +} + +// Sign returns a signature of the input data +func (sk *RsaPrivateKey) Sign(message []byte) ([]byte, error) { + hashed := sha256.Sum256(message) + return rsa.SignPKCS1v15(rand.Reader, sk.sk, crypto.SHA256, hashed[:]) +} + +// GetPublic returns a public key +func (sk *RsaPrivateKey) GetPublic() PubKey { + if sk.pk == nil { + sk.pk = &sk.sk.PublicKey + } + return &RsaPublicKey{sk.pk} +} + +// Decrypt returns decrypted bytes of the input encrypted bytes +func (sk *RsaPrivateKey) Decrypt(b []byte) ([]byte, error) { + return rsa.DecryptPKCS1v15(rand.Reader, sk.sk, b) +} + +func (sk *RsaPrivateKey) Type() pb.KeyType { + return pb.KeyType_RSA +} + +// Bytes returns protobuf bytes from a private key +func (sk *RsaPrivateKey) Bytes() ([]byte, error) { + return MarshalPrivateKey(sk) +} + +func (sk *RsaPrivateKey) Raw() ([]byte, error) { + b := x509.MarshalPKCS1PrivateKey(sk.sk) + return b, nil +} + +// Equals checks whether this key is equal to another +func (sk *RsaPrivateKey) Equals(k Key) bool { + return KeyEqual(sk, k) +} + +// UnmarshalRsaPrivateKey returns a private key from the input x509 bytes +func UnmarshalRsaPrivateKey(b []byte) (PrivKey, error) { + sk, err := x509.ParsePKCS1PrivateKey(b) + if err != nil { + return nil, err + } + if sk.N.BitLen() < 512 { + return nil, ErrRsaKeyTooSmall + } + return &RsaPrivateKey{sk: sk}, nil +} + +// MarshalRsaPrivateKey returns the x509 bytes of the private key +func MarshalRsaPrivateKey(k *RsaPrivateKey) []byte { + return x509.MarshalPKCS1PrivateKey(k.sk) +} + +// UnmarshalRsaPublicKey returns a public key from the input x509 bytes +func UnmarshalRsaPublicKey(b []byte) (PubKey, error) { + pub, err := x509.ParsePKIXPublicKey(b) + if err != nil { + return nil, err + } + pk, ok := pub.(*rsa.PublicKey) + if !ok { + return nil, errors.New("not actually an rsa public key") + } + if pk.N.BitLen() < 512 { + return nil, ErrRsaKeyTooSmall + } + return &RsaPublicKey{pk}, nil +} + +// MarshalRsaPublicKey returns the x509 bytes from the public key +func MarshalRsaPublicKey(k *RsaPublicKey) ([]byte, error) { + return x509.MarshalPKIXPublicKey(k.k) +} diff --git a/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/secp256k1.go b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/secp256k1.go new file mode 100644 index 0000000000..317fcb8ea1 --- /dev/null +++ b/vendor/gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/secp256k1.go @@ -0,0 +1,125 @@ +package crypto + +import ( + "fmt" + "io" + + pb "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto/pb" + + btcec "gx/ipfs/QmWq5PJgAQKDWQerAijYUVKW8mN5MDatK5j7VMp8rizKQd/btcec" + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" +) + +// Secp256k1PrivateKey is an Secp256k1 private key +type Secp256k1PrivateKey btcec.PrivateKey + +// Secp256k1PublicKey is an Secp256k1 public key +type Secp256k1PublicKey btcec.PublicKey + +// GenerateSecp256k1Key generates a new Secp256k1 private and public key pair +func GenerateSecp256k1Key(src io.Reader) (PrivKey, PubKey, error) { + privk, err := btcec.NewPrivateKey(btcec.S256()) + if err != nil { + return nil, nil, err + } + + k := (*Secp256k1PrivateKey)(privk) + return k, k.GetPublic(), nil +} + +// UnmarshalSecp256k1PrivateKey returns a private key from bytes +func UnmarshalSecp256k1PrivateKey(data []byte) (PrivKey, error) { + if len(data) != btcec.PrivKeyBytesLen { + return nil, fmt.Errorf("expected secp256k1 data size to be %d", btcec.PrivKeyBytesLen) + } + + privk, _ := btcec.PrivKeyFromBytes(btcec.S256(), data) + return (*Secp256k1PrivateKey)(privk), nil +} + +// UnmarshalSecp256k1PublicKey returns a public key from bytes +func UnmarshalSecp256k1PublicKey(data []byte) (PubKey, error) { + k, err := btcec.ParsePubKey(data, btcec.S256()) + if err != nil { + return nil, err + } + + return (*Secp256k1PublicKey)(k), nil +} + +// Bytes returns protobuf bytes from a private key +func (k *Secp256k1PrivateKey) Bytes() ([]byte, error) { + return MarshalPrivateKey(k) +} + +// Type returns the private key type +func (k *Secp256k1PrivateKey) Type() pb.KeyType { + return pb.KeyType_Secp256k1 +} + +// Raw returns the bytes of the key +func (k *Secp256k1PrivateKey) Raw() ([]byte, error) { + return (*btcec.PrivateKey)(k).Serialize(), nil +} + +// Equals compares two private keys +func (k *Secp256k1PrivateKey) Equals(o Key) bool { + sk, ok := o.(*Secp256k1PrivateKey) + if !ok { + return false + } + + return k.D.Cmp(sk.D) == 0 +} + +// Sign returns a signature from input data +func (k *Secp256k1PrivateKey) Sign(data []byte) ([]byte, error) { + hash := sha256.Sum256(data) + sig, err := (*btcec.PrivateKey)(k).Sign(hash[:]) + if err != nil { + return nil, err + } + + return sig.Serialize(), nil +} + +// GetPublic returns a public key +func (k *Secp256k1PrivateKey) GetPublic() PubKey { + return (*Secp256k1PublicKey)((*btcec.PrivateKey)(k).PubKey()) +} + +// Bytes returns protobuf bytes from a public key +func (k *Secp256k1PublicKey) Bytes() ([]byte, error) { + return MarshalPublicKey(k) +} + +// Type returns the public key type +func (k *Secp256k1PublicKey) Type() pb.KeyType { + return pb.KeyType_Secp256k1 +} + +// Raw returns the bytes of the key +func (k *Secp256k1PublicKey) Raw() ([]byte, error) { + return (*btcec.PublicKey)(k).SerializeCompressed(), nil +} + +// Equals compares two public keys +func (k *Secp256k1PublicKey) Equals(o Key) bool { + sk, ok := o.(*Secp256k1PublicKey) + if !ok { + return false + } + + return (*btcec.PublicKey)(k).IsEqual((*btcec.PublicKey)(sk)) +} + +// Verify compares a signature against the input data +func (k *Secp256k1PublicKey) Verify(data []byte, sigStr []byte) (bool, error) { + sig, err := btcec.ParseDERSignature(sigStr, btcec.S256()) + if err != nil { + return false, err + } + + hash := sha256.Sum256(data) + return sig.Verify(hash[:], (*btcec.PublicKey)(k)), nil +} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/.travis.yml b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/.travis.yml rename to vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/.travis.yml diff --git a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/LICENSE b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/LICENSE rename to vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/LICENSE diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/Makefile b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/Makefile similarity index 100% rename from vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/Makefile rename to vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/Makefile diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/README.md b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/README.md new file mode 100644 index 0000000000..df2766aa18 --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/README.md @@ -0,0 +1,117 @@ +# go-multiaddr + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) +[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/multiformats/go-multiaddr?status.svg)](https://godoc.org/github.com/multiformats/go-multiaddr) +[![Travis CI](https://img.shields.io/travis/multiformats/go-multiaddr.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multiaddr) +[![codecov.io](https://img.shields.io/codecov/c/github/multiformats/go-multiaddr.svg?style=flat-square&branch=master)](https://codecov.io/github/multiformats/go-multiaddr?branch=master) + +> [multiaddr](https://github.com/multiformats/multiaddr) implementation in go + +Multiaddr is a standard way to represent addresses that: + +- Support any standard network protocols. +- Self-describe (include protocols). +- Have a binary packed format. +- Have a nice string representation. +- Encapsulate well. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) + - [Example](#example) + - [Simple](#simple) + - [Protocols](#protocols) + - [En/decapsulate](#endecapsulate) + - [Tunneling](#tunneling) +- [Maintainers](#maintainers) +- [Contribute](#contribute) +- [License](#license) + +## Install + +```sh +go get github.com/multiformats/go-multiaddr +``` + +## Usage + +### Example + +#### Simple + +```go +import ma "github.com/multiformats/go-multiaddr" + +// construct from a string (err signals parse failure) +m1, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") + +// construct from bytes (err signals parse failure) +m2, err := ma.NewMultiaddrBytes(m1.Bytes()) + +// true +strings.Equal(m1.String(), "/ip4/127.0.0.1/udp/1234") +strings.Equal(m1.String(), m2.String()) +bytes.Equal(m1.Bytes(), m2.Bytes()) +m1.Equal(m2) +m2.Equal(m1) +``` + +#### Protocols + +```go +// get the multiaddr protocol description objects +m1.Protocols() +// []Protocol{ +// Protocol{ Code: 4, Name: 'ip4', Size: 32}, +// Protocol{ Code: 17, Name: 'udp', Size: 16}, +// } +``` + +#### En/decapsulate + +```go +import ma "github.com/multiformats/go-multiaddr" + +m, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") +// + +sctpMA, err := ma.NewMultiaddr("/sctp/5678") + +m.Encapsulate(sctpMA) +// + +udpMA, err := ma.NewMultiaddr("/udp/1234") + +m.Decapsulate(udpMA) // up to + inc last occurrence of subaddr +// +``` + +#### Tunneling + +Multiaddr allows expressing tunnels very nicely. + +```js +printer, _ := ma.NewMultiaddr("/ip4/192.168.0.13/tcp/80") +proxy, _ := ma.NewMultiaddr("/ip4/10.20.30.40/tcp/443") +printerOverProxy := proxy.Encapsulate(printer) +// /ip4/10.20.30.40/tcp/443/ip4/192.168.0.13/tcp/80 + +proxyAgain := printerOverProxy.Decapsulate(printer) +// /ip4/10.20.30.40/tcp/443 +``` + +## Contribute + +Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multiaddr/issues). + +Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/codec.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/codec.go new file mode 100644 index 0000000000..0084fd3f3d --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/codec.go @@ -0,0 +1,208 @@ +package multiaddr + +import ( + "bytes" + "fmt" + "strings" +) + +func stringToBytes(s string) ([]byte, error) { + + // consume trailing slashes + s = strings.TrimRight(s, "/") + + var b bytes.Buffer + sp := strings.Split(s, "/") + + if sp[0] != "" { + return nil, fmt.Errorf("invalid multiaddr, must begin with /") + } + + // consume first empty elem + sp = sp[1:] + + for len(sp) > 0 { + name := sp[0] + p := ProtocolWithName(name) + if p.Code == 0 { + return nil, fmt.Errorf("no protocol with name %s", sp[0]) + } + _, _ = b.Write(CodeToVarint(p.Code)) + sp = sp[1:] + + if p.Size == 0 { // no length. + continue + } + + if len(sp) < 1 { + return nil, fmt.Errorf("protocol requires address, none given: %s", name) + } + + if p.Path { + // it's a path protocol (terminal). + // consume the rest of the address as the next component. + sp = []string{"/" + strings.Join(sp, "/")} + } + + a, err := p.Transcoder.StringToBytes(sp[0]) + if err != nil { + return nil, fmt.Errorf("failed to parse %s: %s %s", p.Name, sp[0], err) + } + if p.Size < 0 { // varint size. + if p.Code != P_P2P { // OpenBazaar: for backwards compatibility we will avoid writing len here until more nodes upgrade + _, _ = b.Write(CodeToVarint(len(a))) + } + } + b.Write(a) + sp = sp[1:] + } + + return b.Bytes(), nil +} + +func validateBytes(b []byte) (err error) { + for len(b) > 0 { + code, n, err := ReadVarintCode(b) + if err != nil { + return err + } + + b = b[n:] + p := ProtocolWithCode(code) + if p.Code == 0 { + return fmt.Errorf("no protocol with code %d", code) + } + + if p.Size == 0 { + continue + } + + n, size, err := sizeForAddr(p, b) + if err != nil { + return err + } + + b = b[n:] + + if len(b) < size || size < 0 { + return fmt.Errorf("invalid value for size %d", len(b)) + } + + err = p.Transcoder.ValidateBytes(b[:size]) + if err != nil { + return err + } + + b = b[size:] + } + + return nil +} + +func readComponent(b []byte) (int, Component, error) { + var offset int + code, n, err := ReadVarintCode(b) + if err != nil { + return 0, Component{}, err + } + offset += n + + p := ProtocolWithCode(code) + if p.Code == 0 { + return 0, Component{}, fmt.Errorf("no protocol with code %d", code) + } + + if p.Size == 0 { + return offset, Component{ + bytes: b[:offset], + offset: offset, + protocol: p, + }, nil + } + + n, size, err := sizeForAddr(p, b[offset:]) + if err != nil { + return 0, Component{}, err + } + + offset += n + + if len(b[offset:]) < size || size < 0 { + return 0, Component{}, fmt.Errorf("invalid value for size %d", len(b[offset:])) + } + + return offset + size, Component{ + bytes: b[:offset+size], + protocol: p, + offset: offset, + }, nil +} + +func bytesToString(b []byte) (ret string, err error) { + var buf strings.Builder + + for len(b) > 0 { + n, c, err := readComponent(b) + if err != nil { + return "", err + } + b = b[n:] + c.writeTo(&buf) + } + + return buf.String(), nil +} + +func sizeForAddr(p Protocol, b []byte) (skip, size int, err error) { + switch { + case p.Size > 0: + return 0, (p.Size / 8), nil + case p.Size == 0: + return 0, 0, nil + case p.Code == P_P2P: + // OpenBazaar: this has to be patched to handle cids and multiaddrs + // serialized in both the new and old format until enough nodes + // upgrade that this isn't needed any more. + if b[0] == 0x01 { + return 0, len(b), nil + } else if len(b) == 37 { + return 3, 34, nil + } else if len(b) == 35 { + return 1, 34, nil + } else { + return 2, 34, nil + } + default: + size, n, err := ReadVarintCode(b) + if err != nil { + return 0, 0, err + } + return n, size, nil + } +} + +func bytesSplit(b []byte) ([][]byte, error) { + var ret [][]byte + for len(b) > 0 { + code, n, err := ReadVarintCode(b) + if err != nil { + return nil, err + } + + p := ProtocolWithCode(code) + if p.Code == 0 { + return nil, fmt.Errorf("no protocol with code %d", b[0]) + } + + n2, size, err := sizeForAddr(p, b[n:]) + if err != nil { + return nil, err + } + + length := n + n2 + size + ret = append(ret, b[:length]) + b = b[length:] + } + + return ret, nil +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/component.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/component.go new file mode 100644 index 0000000000..69baf7a1bd --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/component.go @@ -0,0 +1,181 @@ +package multiaddr + +import ( + "bytes" + "encoding/binary" + "encoding/json" + "fmt" + "strings" +) + +// Component is a single multiaddr Component. +type Component struct { + bytes []byte + protocol Protocol + offset int +} + +func (c *Component) Bytes() []byte { + return c.bytes +} + +func (c *Component) MarshalBinary() ([]byte, error) { + return c.Bytes(), nil +} + +func (c *Component) UnmarshalBinary(data []byte) error { + _, comp, err := readComponent(data) + if err != nil { + return err + } + *c = comp + return nil +} + +func (c *Component) MarshalText() ([]byte, error) { + return []byte(c.String()), nil +} + +func (c *Component) UnmarshalText(data []byte) error { + bytes, err := stringToBytes(string(data)) + if err != nil { + return err + } + _, comp, err := readComponent(bytes) + if err != nil { + return err + } + *c = comp + return nil +} + +func (c *Component) MarshalJSON() ([]byte, error) { + txt, err := c.MarshalText() + if err != nil { + return nil, err + } + + return json.Marshal(string(txt)) +} + +func (m *Component) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + + return m.UnmarshalText([]byte(v)) +} + +func (c *Component) Equal(o Multiaddr) bool { + return bytes.Equal(c.bytes, o.Bytes()) +} + +func (c *Component) Protocols() []Protocol { + return []Protocol{c.protocol} +} + +func (c *Component) Decapsulate(o Multiaddr) Multiaddr { + if c.Equal(o) { + return nil + } + return c +} + +func (c *Component) Encapsulate(o Multiaddr) Multiaddr { + m := &multiaddr{bytes: c.bytes} + return m.Encapsulate(o) +} + +func (c *Component) ValueForProtocol(code int) (string, error) { + if c.protocol.Code != code { + return "", ErrProtocolNotFound + } + return c.Value(), nil +} + +func (c *Component) Protocol() Protocol { + return c.protocol +} + +func (c *Component) RawValue() []byte { + return c.bytes[c.offset:] +} + +func (c *Component) Value() string { + if c.protocol.Transcoder == nil { + return "" + } + value, err := c.protocol.Transcoder.BytesToString(c.bytes[c.offset:]) + if err != nil { + // This Component must have been checked. + panic(err) + } + return value +} + +func (c *Component) String() string { + var b strings.Builder + c.writeTo(&b) + return b.String() +} + +// writeTo is an efficient, private function for string-formatting a multiaddr. +// Trust me, we tend to allocate a lot when doing this. +func (c *Component) writeTo(b *strings.Builder) { + b.WriteByte('/') + b.WriteString(c.protocol.Name) + value := c.Value() + if len(value) == 0 { + return + } + if !(c.protocol.Path && value[0] == '/') { + b.WriteByte('/') + } + b.WriteString(value) +} + +// NewComponent constructs a new multiaddr component +func NewComponent(protocol, value string) (*Component, error) { + p := ProtocolWithName(protocol) + if p.Code == 0 { + return nil, fmt.Errorf("unsupported protocol: %s", protocol) + } + if p.Transcoder != nil { + bts, err := p.Transcoder.StringToBytes(value) + if err != nil { + return nil, err + } + return newComponent(p, bts), nil + } else if value != "" { + return nil, fmt.Errorf("protocol %s doesn't take a value", p.Name) + } + return newComponent(p, nil), nil + // TODO: handle path /? +} + +func newComponent(protocol Protocol, bvalue []byte) *Component { + size := len(bvalue) + size += len(protocol.VCode) + if protocol.Size < 0 { + size += VarintSize(len(bvalue)) + } + maddr := make([]byte, size) + var offset int + offset += copy(maddr[offset:], protocol.VCode) + if protocol.Size < 0 { + offset += binary.PutUvarint(maddr[offset:], uint64(len(bvalue))) + } + copy(maddr[offset:], bvalue) + + // For debugging + if len(maddr) != offset+len(bvalue) { + panic("incorrect length") + } + + return &Component{ + bytes: maddr, + protocol: protocol, + offset: offset, + } +} diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/doc.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/doc.go similarity index 100% rename from vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/doc.go rename to vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/doc.go diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.mod b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.mod new file mode 100644 index 0000000000..debcf3c5d6 --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.mod @@ -0,0 +1,3 @@ +module github.com/multiformats/go-multiaddr + +require github.com/multiformats/go-multihash v0.0.1 diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.sum b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.sum new file mode 100644 index 0000000000..faa395abec --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/go.sum @@ -0,0 +1,18 @@ +github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJu4ZbSc= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XCFOweFD3BNESdnO8ewyYTFT2R+/b8FQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +github.com/multiformats/go-multihash v1.0.10 h1:KUnC6rT8Vyw0gx4qXUS6VN1QHKrgmvdDCaURVQ7+miM= +github.com/multiformats/go-multihash v1.0.10/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d h1:Z0Ahzd7HltpJtjAHHxX8QFP3j1yYgiuvjbjRzDj/KH0= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/interface.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/interface.go new file mode 100644 index 0000000000..82cc764010 --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/interface.go @@ -0,0 +1,62 @@ +package multiaddr + +import ( + "encoding" + "encoding/json" +) + +/* +Multiaddr is a cross-protocol, cross-platform format for representing +internet addresses. It emphasizes explicitness and self-description. +Learn more here: https://github.com/multiformats/multiaddr + +Multiaddrs have both a binary and string representation. + + import ma "github.com/multiformats/go-multiaddr" + + addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80") + // err non-nil when parsing failed. + +*/ +type Multiaddr interface { + json.Marshaler + json.Unmarshaler + encoding.TextMarshaler + encoding.TextUnmarshaler + encoding.BinaryMarshaler + encoding.BinaryUnmarshaler + + // Equal returns whether two Multiaddrs are exactly equal + Equal(Multiaddr) bool + + // Bytes returns the []byte representation of this Multiaddr + // + // This function may expose immutable, internal state. Do not modify. + Bytes() []byte + + // String returns the string representation of this Multiaddr + // (may panic if internal state is corrupted) + String() string + + // Protocols returns the list of Protocols this Multiaddr includes + // will panic if protocol code incorrect (and bytes accessed incorrectly) + Protocols() []Protocol + + // Encapsulate wraps this Multiaddr around another. For example: + // + // /ip4/1.2.3.4 encapsulate /tcp/80 = /ip4/1.2.3.4/tcp/80 + // + Encapsulate(Multiaddr) Multiaddr + + // Decapsultate removes a Multiaddr wrapping. For example: + // + // /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80 + // + Decapsulate(Multiaddr) Multiaddr + + // ValueForProtocol returns the value (if any) following the specified protocol + // + // Note: protocols can appear multiple times in a single multiaddr. + // Consider using `ForEach` to walk over the addr manually. + ValueForProtocol(code int) (string, error) +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/multiaddr.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/multiaddr.go new file mode 100644 index 0000000000..6794b92e9b --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/multiaddr.go @@ -0,0 +1,182 @@ +package multiaddr + +import ( + "bytes" + "encoding/json" + "fmt" + "log" + "strings" +) + +// multiaddr is the data structure representing a Multiaddr +type multiaddr struct { + bytes []byte +} + +// NewMultiaddr parses and validates an input string, returning a *Multiaddr +func NewMultiaddr(s string) (a Multiaddr, err error) { + defer func() { + if e := recover(); e != nil { + log.Printf("Panic in NewMultiaddr on input %q: %s", s, e) + err = fmt.Errorf("%v", e) + } + }() + b, err := stringToBytes(s) + if err != nil { + return nil, err + } + return &multiaddr{bytes: b}, nil +} + +// NewMultiaddrBytes initializes a Multiaddr from a byte representation. +// It validates it as an input string. +func NewMultiaddrBytes(b []byte) (a Multiaddr, err error) { + defer func() { + if e := recover(); e != nil { + log.Printf("Panic in NewMultiaddrBytes on input %q: %s", b, e) + err = fmt.Errorf("%v", e) + } + }() + + if err := validateBytes(b); err != nil { + return nil, err + } + + return &multiaddr{bytes: b}, nil +} + +// Equal tests whether two multiaddrs are equal +func (m *multiaddr) Equal(m2 Multiaddr) bool { + return bytes.Equal(m.bytes, m2.Bytes()) +} + +// Bytes returns the []byte representation of this Multiaddr +// +// Do not modify the returned buffer, it may be shared. +func (m *multiaddr) Bytes() []byte { + return m.bytes +} + +// String returns the string representation of a Multiaddr +func (m *multiaddr) String() string { + s, err := bytesToString(m.bytes) + if err != nil { + panic(fmt.Errorf("multiaddr failed to convert back to string. corrupted? %s", err)) + } + return s +} + +func (m *multiaddr) MarshalBinary() ([]byte, error) { + return m.Bytes(), nil +} + +func (m *multiaddr) UnmarshalBinary(data []byte) error { + new, err := NewMultiaddrBytes(data) + if err != nil { + return err + } + *m = *(new.(*multiaddr)) + return nil +} + +func (m *multiaddr) MarshalText() ([]byte, error) { + return []byte(m.String()), nil +} + +func (m *multiaddr) UnmarshalText(data []byte) error { + new, err := NewMultiaddr(string(data)) + if err != nil { + return err + } + *m = *(new.(*multiaddr)) + return nil +} + +func (m *multiaddr) MarshalJSON() ([]byte, error) { + return json.Marshal(m.String()) +} + +func (m *multiaddr) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + new, err := NewMultiaddr(v) + *m = *(new.(*multiaddr)) + return err +} + +// Protocols returns the list of protocols this Multiaddr has. +// will panic in case we access bytes incorrectly. +func (m *multiaddr) Protocols() []Protocol { + ps := make([]Protocol, 0, 8) + b := m.bytes + for len(b) > 0 { + code, n, err := ReadVarintCode(b) + if err != nil { + panic(err) + } + + p := ProtocolWithCode(code) + if p.Code == 0 { + // this is a panic (and not returning err) because this should've been + // caught on constructing the Multiaddr + panic(fmt.Errorf("no protocol with code %d", b[0])) + } + ps = append(ps, p) + b = b[n:] + + n, size, err := sizeForAddr(p, b) + if err != nil { + panic(err) + } + + b = b[n+size:] + } + return ps +} + +// Encapsulate wraps a given Multiaddr, returning the resulting joined Multiaddr +func (m *multiaddr) Encapsulate(o Multiaddr) Multiaddr { + mb := m.bytes + ob := o.Bytes() + + b := make([]byte, len(mb)+len(ob)) + copy(b, mb) + copy(b[len(mb):], ob) + return &multiaddr{bytes: b} +} + +// Decapsulate unwraps Multiaddr up until the given Multiaddr is found. +func (m *multiaddr) Decapsulate(o Multiaddr) Multiaddr { + s1 := m.String() + s2 := o.String() + i := strings.LastIndex(s1, s2) + if i < 0 { + // if multiaddr not contained, returns a copy. + cpy := make([]byte, len(m.bytes)) + copy(cpy, m.bytes) + return &multiaddr{bytes: cpy} + } + + ma, err := NewMultiaddr(s1[:i]) + if err != nil { + panic("Multiaddr.Decapsulate incorrect byte boundaries.") + } + return ma +} + +var ErrProtocolNotFound = fmt.Errorf("protocol not found in multiaddr") + +func (m *multiaddr) ValueForProtocol(code int) (value string, err error) { + err = ErrProtocolNotFound + ForEach(m, func(c Component) bool { + if c.Protocol().Code == code { + value = c.Value() + err = nil + return false + } + return true + }) + return +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/package.json b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/package.json new file mode 100644 index 0000000000..c493b27e54 --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/package.json @@ -0,0 +1,23 @@ +{ + "author": "multiformats", + "bugs": { + "url": "https://github.com/multiformats/go-multiaddr/issues" + }, + "gx": { + "dvcsimport": "github.com/multiformats/go-multiaddr" + }, + "gxDependencies": [ + { + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + } + ], + "gxVersion": "0.9.0", + "language": "go", + "license": "MIT", + "name": "go-multiaddr", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.4.1" +} + diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/protocol.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/protocol.go similarity index 100% rename from vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/protocol.go rename to vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/protocol.go diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/protocols.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/protocols.go new file mode 100644 index 0000000000..c8220304c5 --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/protocols.go @@ -0,0 +1,183 @@ +package multiaddr + +// You **MUST** register your multicodecs with +// https://github.com/multiformats/multicodec before adding them here. +// +// TODO: Use a single source of truth for all multicodecs instead of +// distributing them like this... +const ( + P_IP4 = 0x0004 + P_TCP = 0x0006 + P_UDP = 0x0111 + P_DCCP = 0x0021 + P_IP6 = 0x0029 + P_IP6ZONE = 0x002A + P_QUIC = 0x01CC + P_SCTP = 0x0084 + P_UDT = 0x012D + P_UTP = 0x012E + P_UNIX = 0x0190 + P_P2P = 0x01A5 + P_IPFS = 0x01A5 // alias for backwards compatability + P_HTTP = 0x01E0 + P_HTTPS = 0x01BB + P_ONION = 0x01BC // also for backwards compatibility + P_ONION3 = 0x01BD + P_GARLIC64 = 0x01CA + P_P2P_WEBRTC_DIRECT = 0x0114 +) + +var ( + protoIP4 = Protocol{ + Name: "ip4", + Code: P_IP4, + VCode: CodeToVarint(P_IP4), + Size: 32, + Path: false, + Transcoder: TranscoderIP4, + } + protoTCP = Protocol{ + Name: "tcp", + Code: P_TCP, + VCode: CodeToVarint(P_TCP), + Size: 16, + Path: false, + Transcoder: TranscoderPort, + } + protoUDP = Protocol{ + Name: "udp", + Code: P_UDP, + VCode: CodeToVarint(P_UDP), + Size: 16, + Path: false, + Transcoder: TranscoderPort, + } + protoDCCP = Protocol{ + Name: "dccp", + Code: P_DCCP, + VCode: CodeToVarint(P_DCCP), + Size: 16, + Path: false, + Transcoder: TranscoderPort, + } + protoIP6 = Protocol{ + Name: "ip6", + Code: P_IP6, + VCode: CodeToVarint(P_IP6), + Size: 128, + Transcoder: TranscoderIP6, + } + // these require varint + protoIP6ZONE = Protocol{ + Name: "ip6zone", + Code: P_IP6ZONE, + VCode: CodeToVarint(P_IP6ZONE), + Size: LengthPrefixedVarSize, + Path: false, + Transcoder: TranscoderIP6Zone, + } + protoSCTP = Protocol{ + Name: "sctp", + Code: P_SCTP, + VCode: CodeToVarint(P_SCTP), + Size: 16, + Transcoder: TranscoderPort, + } + protoONION2 = Protocol{ + Name: "onion", + Code: P_ONION, + VCode: CodeToVarint(P_ONION), + Size: 96, + Transcoder: TranscoderOnion, + } + protoONION3 = Protocol{ + Name: "onion3", + Code: P_ONION3, + VCode: CodeToVarint(P_ONION3), + Size: 296, + Transcoder: TranscoderOnion3, + } + protoGARLIC64 = Protocol{ + Name: "garlic64", + Code: P_GARLIC64, + VCode: CodeToVarint(P_GARLIC64), + Size: LengthPrefixedVarSize, + Transcoder: TranscoderGarlic64, + } + protoUTP = Protocol{ + Name: "utp", + Code: P_UTP, + VCode: CodeToVarint(P_UTP), + } + protoUDT = Protocol{ + Name: "udt", + Code: P_UDT, + VCode: CodeToVarint(P_UDT), + } + protoQUIC = Protocol{ + Name: "quic", + Code: P_QUIC, + VCode: CodeToVarint(P_QUIC), + } + protoHTTP = Protocol{ + Name: "http", + Code: P_HTTP, + VCode: CodeToVarint(P_HTTP), + } + protoHTTPS = Protocol{ + Name: "https", + Code: P_HTTPS, + VCode: CodeToVarint(P_HTTPS), + } + protoP2P = Protocol{ + Name: "ipfs", + Code: P_P2P, + VCode: CodeToVarint(P_P2P), + Size: LengthPrefixedVarSize, + Transcoder: TranscoderP2P, + } + protoUNIX = Protocol{ + Name: "unix", + Code: P_UNIX, + VCode: CodeToVarint(P_UNIX), + Size: LengthPrefixedVarSize, + Path: true, + Transcoder: TranscoderUnix, + } + protoP2P_WEBRTC_DIRECT = Protocol{ + Name: "p2p-webrtc-direct", + Code: P_P2P_WEBRTC_DIRECT, + VCode: CodeToVarint(P_P2P_WEBRTC_DIRECT), + } +) + +func init() { + for _, p := range []Protocol{ + protoIP4, + protoTCP, + protoUDP, + protoDCCP, + protoIP6, + protoIP6ZONE, + protoSCTP, + protoONION2, + protoONION3, + protoGARLIC64, + protoUTP, + protoUDT, + protoQUIC, + protoHTTP, + protoHTTPS, + protoP2P, + protoUNIX, + protoP2P_WEBRTC_DIRECT, + } { + if err := AddProtocol(p); err != nil { + panic(err) + } + } + + // explicitly set both of these + protocolsByName["p2p"] = protoP2P + protocolsByName["ipfs"] = protoP2P +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/transcoders.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/transcoders.go new file mode 100644 index 0000000000..28a722d53e --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/transcoders.go @@ -0,0 +1,309 @@ +package multiaddr + +import ( + "bytes" + "encoding/base32" + "encoding/base64" + "encoding/binary" + "fmt" + "net" + "strconv" + "strings" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +type Transcoder interface { + StringToBytes(string) ([]byte, error) + BytesToString([]byte) (string, error) + ValidateBytes([]byte) error +} + +func NewTranscoderFromFunctions( + s2b func(string) ([]byte, error), + b2s func([]byte) (string, error), + val func([]byte) error, +) Transcoder { + return twrp{s2b, b2s, val} +} + +type twrp struct { + strtobyte func(string) ([]byte, error) + bytetostr func([]byte) (string, error) + validbyte func([]byte) error +} + +func (t twrp) StringToBytes(s string) ([]byte, error) { + return t.strtobyte(s) +} +func (t twrp) BytesToString(b []byte) (string, error) { + return t.bytetostr(b) +} + +func (t twrp) ValidateBytes(b []byte) error { + if t.validbyte == nil { + return nil + } + return t.validbyte(b) +} + +var TranscoderIP4 = NewTranscoderFromFunctions(ip4StB, ip4BtS, nil) +var TranscoderIP6 = NewTranscoderFromFunctions(ip6StB, ip6BtS, nil) +var TranscoderIP6Zone = NewTranscoderFromFunctions(ip6zoneStB, ip6zoneBtS, ip6zoneVal) + +func ip4StB(s string) ([]byte, error) { + i := net.ParseIP(s).To4() + if i == nil { + return nil, fmt.Errorf("failed to parse ip4 addr: %s", s) + } + return i, nil +} + +func ip6zoneStB(s string) ([]byte, error) { + if len(s) == 0 { + return nil, fmt.Errorf("empty ip6zone") + } + return []byte(s), nil +} + +func ip6zoneBtS(b []byte) (string, error) { + if len(b) == 0 { + return "", fmt.Errorf("invalid length (should be > 0)") + } + return string(b), nil +} + +func ip6zoneVal(b []byte) error { + if len(b) == 0 { + return fmt.Errorf("invalid length (should be > 0)") + } + // Not supported as this would break multiaddrs. + if bytes.IndexByte(b, '/') >= 0 { + return fmt.Errorf("IPv6 zone ID contains '/': %s", string(b)) + } + return nil +} + +func ip6StB(s string) ([]byte, error) { + i := net.ParseIP(s).To16() + if i == nil { + return nil, fmt.Errorf("failed to parse ip6 addr: %s", s) + } + return i, nil +} + +func ip6BtS(b []byte) (string, error) { + ip := net.IP(b) + if ip4 := ip.To4(); ip4 != nil { + // Go fails to prepend the `::ffff:` part. + return "::ffff:" + ip4.String(), nil + } + return ip.String(), nil +} + +func ip4BtS(b []byte) (string, error) { + return net.IP(b).String(), nil +} + +var TranscoderPort = NewTranscoderFromFunctions(portStB, portBtS, nil) + +func portStB(s string) ([]byte, error) { + i, err := strconv.Atoi(s) + if err != nil { + return nil, fmt.Errorf("failed to parse port addr: %s", err) + } + if i >= 65536 { + return nil, fmt.Errorf("failed to parse port addr: %s", "greater than 65536") + } + b := make([]byte, 2) + binary.BigEndian.PutUint16(b, uint16(i)) + return b, nil +} + +func portBtS(b []byte) (string, error) { + i := binary.BigEndian.Uint16(b) + return strconv.Itoa(int(i)), nil +} + +var TranscoderOnion = NewTranscoderFromFunctions(onionStB, onionBtS, nil) + +func onionStB(s string) ([]byte, error) { + addr := strings.Split(s, ":") + if len(addr) != 2 { + return nil, fmt.Errorf("failed to parse onion addr: %s does not contain a port number.", s) + } + + // onion address without the ".onion" substring + if len(addr[0]) != 16 { + return nil, fmt.Errorf("failed to parse onion addr: %s not a Tor onion address.", s) + } + onionHostBytes, err := base32.StdEncoding.DecodeString(strings.ToUpper(addr[0])) + if err != nil { + return nil, fmt.Errorf("failed to decode base32 onion addr: %s %s", s, err) + } + + // onion port number + i, err := strconv.Atoi(addr[1]) + if err != nil { + return nil, fmt.Errorf("failed to parse onion addr: %s", err) + } + if i >= 65536 { + return nil, fmt.Errorf("failed to parse onion addr: %s", "port greater than 65536") + } + if i < 1 { + return nil, fmt.Errorf("failed to parse onion addr: %s", "port less than 1") + } + + onionPortBytes := make([]byte, 2) + binary.BigEndian.PutUint16(onionPortBytes, uint16(i)) + bytes := []byte{} + bytes = append(bytes, onionHostBytes...) + bytes = append(bytes, onionPortBytes...) + return bytes, nil +} + +func onionBtS(b []byte) (string, error) { + addr := strings.ToLower(base32.StdEncoding.EncodeToString(b[0:10])) + port := binary.BigEndian.Uint16(b[10:12]) + return addr + ":" + strconv.Itoa(int(port)), nil +} + +var TranscoderOnion3 = NewTranscoderFromFunctions(onion3StB, onion3BtS, nil) + +func onion3StB(s string) ([]byte, error) { + addr := strings.Split(s, ":") + if len(addr) != 2 { + return nil, fmt.Errorf("failed to parse onion addr: %s does not contain a port number.", s) + } + + // onion address without the ".onion" substring + if len(addr[0]) != 56 { + return nil, fmt.Errorf("failed to parse onion addr: %s not a Tor onionv3 address. len == %d", s, len(addr[0])) + } + onionHostBytes, err := base32.StdEncoding.DecodeString(strings.ToUpper(addr[0])) + if err != nil { + return nil, fmt.Errorf("failed to decode base32 onion addr: %s %s", s, err) + } + + // onion port number + i, err := strconv.Atoi(addr[1]) + if err != nil { + return nil, fmt.Errorf("failed to parse onion addr: %s", err) + } + if i >= 65536 { + return nil, fmt.Errorf("failed to parse onion addr: %s", "port greater than 65536") + } + if i < 1 { + return nil, fmt.Errorf("failed to parse onion addr: %s", "port less than 1") + } + + onionPortBytes := make([]byte, 2) + binary.BigEndian.PutUint16(onionPortBytes, uint16(i)) + bytes := []byte{} + bytes = append(bytes, onionHostBytes[0:35]...) + bytes = append(bytes, onionPortBytes...) + return bytes, nil +} + +func onion3BtS(b []byte) (string, error) { + addr := strings.ToLower(base32.StdEncoding.EncodeToString(b[0:35])) + port := binary.BigEndian.Uint16(b[35:37]) + str := addr + ":" + strconv.Itoa(int(port)) + return str, nil +} + +var TranscoderGarlic64 = NewTranscoderFromFunctions(garlic64StB, garlic64BtS, garlicValidate) + +// i2p uses an alternate character set for base64 addresses. This returns an appropriate encoder. +var garlicBase64Encoding = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-~") + +func garlic64StB(s string) ([]byte, error) { + // i2p base64 address + if len(s) < 516 || len(s) > 616 { + return nil, fmt.Errorf("failed to parse garlic addr: %s not an i2p base64 address. len: %d\n", s, len(s)) + } + garlicHostBytes, err := garlicBase64Encoding.DecodeString(s) + if err != nil { + return nil, fmt.Errorf("failed to decode base64 i2p addr: %s %s", s, err) + } + + return garlicHostBytes, nil +} + +func garlic64BtS(b []byte) (string, error) { + if len(b) < 386 { + return "", fmt.Errorf("failed to validate garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b)) + } + addr := garlicBase64Encoding.EncodeToString(b) + return addr, nil +} + +func garlicValidate(b []byte) error { + if len(b) < 386 { + return fmt.Errorf("failed to validate garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b)) + } + return nil +} + +var TranscoderP2P = NewTranscoderFromFunctions(p2pStB, p2pBtS, p2pVal) + +// OpenBazaar: this function has been updated to parse CIDs as well as PeerIDs +func p2pStB(s string) ([]byte, error) { + if len(s) == 46 && (s[:2] == "Qm" || s[:4] == "12D3") { + m, err := mh.FromB58String(s) + if err != nil { + return nil, fmt.Errorf("failed to parse ipfs addr: %s %s", s, err) + } + size := CodeToVarint(len(m)) + b := append(size, m...) + return b, nil + } else { + id, err := cid.Decode(s) + if err != nil { + return nil, fmt.Errorf("failed to parse ipfs addr: %s %s", s, err) + } + return id.Bytes(), nil + } +} + +// OpenBazaar: this has been patched to parse CIDs as well as multihashes +func p2pVal(b []byte) error { + _, err := cid.Cast(b) + if err != nil { + _, err = mh.Cast(b) + } + return err +} + +// OpenBazaar: this function has been updated to also parse a CID +func p2pBtS(b []byte) (string, error) { + id, err := cid.Parse(b) + if err != nil { + size, n, err := ReadVarintCode(b) + if err != nil { + return "", err + } + + b = b[n:] + if len(b) != size { + return "", fmt.Errorf("inconsistent lengths") + } + m, err := mh.Cast(b) + if err != nil { + return "", err + } + return m.B58String(), nil + } + return id.String(), nil +} + +var TranscoderUnix = NewTranscoderFromFunctions(unixStB, unixBtS, nil) + +func unixStB(s string) ([]byte, error) { + return []byte(s), nil +} + +func unixBtS(b []byte) (string, error) { + return string(b), nil +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/util.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/util.go new file mode 100644 index 0000000000..cf4469affa --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/util.go @@ -0,0 +1,180 @@ +package multiaddr + +import "fmt" + +// Split returns the sub-address portions of a multiaddr. +func Split(m Multiaddr) []Multiaddr { + if _, ok := m.(*Component); ok { + return []Multiaddr{m} + } + var addrs []Multiaddr + ForEach(m, func(c Component) bool { + addrs = append(addrs, &c) + return true + }) + return addrs +} + +// Join returns a combination of addresses. +func Join(ms ...Multiaddr) Multiaddr { + switch len(ms) { + case 0: + // empty multiaddr, unfortunately, we have callers that rely on + // this contract. + return &multiaddr{} + case 1: + return ms[0] + } + + length := 0 + bs := make([][]byte, len(ms)) + for i, m := range ms { + bs[i] = m.Bytes() + length += len(bs[i]) + } + + bidx := 0 + b := make([]byte, length) + for _, mb := range bs { + bidx += copy(b[bidx:], mb) + } + return &multiaddr{bytes: b} +} + +// Cast re-casts a byte slice as a multiaddr. will panic if it fails to parse. +func Cast(b []byte) Multiaddr { + m, err := NewMultiaddrBytes(b) + if err != nil { + panic(fmt.Errorf("multiaddr failed to parse: %s", err)) + } + return m +} + +// StringCast like Cast, but parses a string. Will also panic if it fails to parse. +func StringCast(s string) Multiaddr { + m, err := NewMultiaddr(s) + if err != nil { + panic(fmt.Errorf("multiaddr failed to parse: %s", err)) + } + return m +} + +// SplitFirst returns the first component and the rest of the multiaddr. +func SplitFirst(m Multiaddr) (*Component, Multiaddr) { + // Shortcut if we already have a component + if c, ok := m.(*Component); ok { + return c, nil + } + + b := m.Bytes() + if len(b) == 0 { + return nil, nil + } + n, c, err := readComponent(b) + if err != nil { + panic(err) + } + if len(b) == n { + return &c, nil + } + return &c, &multiaddr{b[n:]} +} + +// SplitLast returns the rest of the multiaddr and the last component. +func SplitLast(m Multiaddr) (Multiaddr, *Component) { + // Shortcut if we already have a component + if c, ok := m.(*Component); ok { + return nil, c + } + + b := m.Bytes() + if len(b) == 0 { + return nil, nil + } + + var ( + c Component + err error + offset int + ) + for { + var n int + n, c, err = readComponent(b[offset:]) + if err != nil { + panic(err) + } + if len(b) == n+offset { + // Reached end + if offset == 0 { + // Only one component + return nil, &c + } + return &multiaddr{b[:offset]}, &c + } + offset += n + } +} + +// SplitFunc splits the multiaddr when the callback first returns true. The +// component on which the callback first returns will be included in the +// *second* multiaddr. +func SplitFunc(m Multiaddr, cb func(Component) bool) (Multiaddr, Multiaddr) { + // Shortcut if we already have a component + if c, ok := m.(*Component); ok { + if cb(*c) { + return nil, m + } + return m, nil + } + b := m.Bytes() + if len(b) == 0 { + return nil, nil + } + var ( + c Component + err error + offset int + ) + for offset < len(b) { + var n int + n, c, err = readComponent(b[offset:]) + if err != nil { + panic(err) + } + if cb(c) { + break + } + offset += n + } + switch offset { + case 0: + return nil, m + case len(b): + return m, nil + default: + return &multiaddr{b[:offset]}, &multiaddr{b[offset:]} + } +} + +// ForEach walks over the multiaddr, component by component. +// +// This function iterates over components *by value* to avoid allocating. +func ForEach(m Multiaddr, cb func(c Component) bool) { + // Shortcut if we already have a component + if c, ok := m.(*Component); ok { + cb(*c) + return + } + + b := m.Bytes() + for len(b) > 0 { + n, c, err := readComponent(b) + if err != nil { + panic(err) + } + if !cb(c) { + return + } + b = b[n:] + } +} diff --git a/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/varint.go b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/varint.go new file mode 100644 index 0000000000..b8b1507bbc --- /dev/null +++ b/vendor/gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr/varint.go @@ -0,0 +1,44 @@ +package multiaddr + +import ( + "encoding/binary" + "fmt" + "math/bits" +) + +// VarintSize returns the size (in bytes) of `num` encoded as a varint. +func VarintSize(num int) int { + bits := bits.Len(uint(num)) + q, r := bits/7, bits%7 + size := q + if r > 0 || size == 0 { + size++ + } + return size +} + +// CodeToVarint converts an integer to a varint-encoded []byte +func CodeToVarint(num int) []byte { + buf := make([]byte, VarintSize(num)) + n := binary.PutUvarint(buf, uint64(num)) + return buf[:n] +} + +// VarintToCode converts a varint-encoded []byte to an integer protocol code +func VarintToCode(buf []byte) int { + num, _, err := ReadVarintCode(buf) + if err != nil { + panic(err) + } + return num +} + +// ReadVarintCode reads a varint code from the beginning of buf. +// returns the code, and the number of bytes read. +func ReadVarintCode(buf []byte) (int, int, error) { + num, n := binary.Uvarint(buf) + if n < 0 { + return 0, 0, fmt.Errorf("varints larger than uint64 not yet supported") + } + return int(num), n, nil +} diff --git a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/package.json b/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/package.json deleted file mode 100644 index 098ce1d5e8..0000000000 --- a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "Stebalien", - "bugs": { - "url": "https://github.com/Stebalien/go-bitfield" - }, - "gx": { - "dvcsimport": "github.com/Stebalien/go-bitfield" - }, - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-bitfield", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.1" -} - diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/.travis.yml b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/.travis.yml rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/.travis.yml diff --git a/vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/LICENSE b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht/LICENSE rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/LICENSE diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/Makefile b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/Makefile rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/Makefile diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/README.md b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/README.md similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/README.md rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/README.md diff --git a/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/builder.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/builder.go new file mode 100644 index 0000000000..cb08d98454 --- /dev/null +++ b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/builder.go @@ -0,0 +1,74 @@ +package cid + +import ( + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +type Builder interface { + Sum(data []byte) (Cid, error) + GetCodec() uint64 + WithCodec(uint64) Builder +} + +type V0Builder struct{} + +type V1Builder struct { + Codec uint64 + MhType uint64 + MhLength int // MhLength <= 0 means the default length +} + +func (p Prefix) GetCodec() uint64 { + return p.Codec +} + +func (p Prefix) WithCodec(c uint64) Builder { + if c == p.Codec { + return p + } + p.Codec = c + if c != DagProtobuf { + p.Version = 1 + } + return p +} + +func (p V0Builder) Sum(data []byte) (Cid, error) { + hash, err := mh.Sum(data, mh.SHA2_256, -1) + if err != nil { + return Undef, err + } + return NewCidV0(hash), nil +} + +func (p V0Builder) GetCodec() uint64 { + return DagProtobuf +} + +func (p V0Builder) WithCodec(c uint64) Builder { + if c == DagProtobuf { + return p + } + return V1Builder{Codec: c, MhType: mh.SHA2_256} +} + +func (p V1Builder) Sum(data []byte) (Cid, error) { + mhLen := p.MhLength + if mhLen <= 0 { + mhLen = -1 + } + hash, err := mh.Sum(data, p.MhType, mhLen) + if err != nil { + return Undef, err + } + return NewCidV1(p.Codec, hash), nil +} + +func (p V1Builder) GetCodec() uint64 { + return p.Codec +} + +func (p V1Builder) WithCodec(c uint64) Builder { + p.Codec = c + return p +} diff --git a/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/cid.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/cid.go new file mode 100644 index 0000000000..f7103fc8df --- /dev/null +++ b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/cid.go @@ -0,0 +1,601 @@ +// Package cid implements the Content-IDentifiers specification +// (https://github.com/ipld/cid) in Go. CIDs are +// self-describing content-addressed identifiers useful for +// distributed information systems. CIDs are used in the IPFS +// (https://ipfs.io) project ecosystem. +// +// CIDs have two major versions. A CIDv0 corresponds to a multihash of type +// DagProtobuf, is deprecated and exists for compatibility reasons. Usually, +// CIDv1 should be used. +// +// A CIDv1 has four parts: +// +// ::= +// +// As shown above, the CID implementation relies heavily on Multiformats, +// particularly Multibase +// (https://github.com/multiformats/go-multibase), Multicodec +// (https://github.com/multiformats/multicodec) and Multihash +// implementations (https://github.com/multiformats/go-multihash). +package cid + +import ( + "bytes" + "encoding" + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "strings" + + mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// UnsupportedVersionString just holds an error message +const UnsupportedVersionString = "" + +var ( + // ErrVarintBuffSmall means that a buffer passed to the cid parser was not + // long enough, or did not contain an invalid cid + ErrVarintBuffSmall = errors.New("reading varint: buffer too small") + + // ErrVarintTooBig means that the varint in the given cid was above the + // limit of 2^64 + ErrVarintTooBig = errors.New("reading varint: varint bigger than 64bits" + + " and not supported") + + // ErrCidTooShort means that the cid passed to decode was not long + // enough to be a valid Cid + ErrCidTooShort = errors.New("cid too short") + + // ErrInvalidEncoding means that selected encoding is not supported + // by this Cid version + ErrInvalidEncoding = errors.New("invalid base encoding") +) + +// These are multicodec-packed content types. The should match +// the codes described in the authoritative document: +// https://github.com/multiformats/multicodec/blob/master/table.csv +const ( + Raw = 0x55 + + DagProtobuf = 0x70 + DagCBOR = 0x71 + + GitRaw = 0x78 + + EthBlock = 0x90 + EthBlockList = 0x91 + EthTxTrie = 0x92 + EthTx = 0x93 + EthTxReceiptTrie = 0x94 + EthTxReceipt = 0x95 + EthStateTrie = 0x96 + EthAccountSnapshot = 0x97 + EthStorageTrie = 0x98 + BitcoinBlock = 0xb0 + BitcoinTx = 0xb1 + ZcashBlock = 0xc0 + ZcashTx = 0xc1 + DecredBlock = 0xe0 + DecredTx = 0xe1 + DashBlock = 0xf0 + DashTx = 0xf1 +) + +// Codecs maps the name of a codec to its type +var Codecs = map[string]uint64{ + "v0": DagProtobuf, + "raw": Raw, + "protobuf": DagProtobuf, + "cbor": DagCBOR, + "git-raw": GitRaw, + "eth-block": EthBlock, + "eth-block-list": EthBlockList, + "eth-tx-trie": EthTxTrie, + "eth-tx": EthTx, + "eth-tx-receipt-trie": EthTxReceiptTrie, + "eth-tx-receipt": EthTxReceipt, + "eth-state-trie": EthStateTrie, + "eth-account-snapshot": EthAccountSnapshot, + "eth-storage-trie": EthStorageTrie, + "bitcoin-block": BitcoinBlock, + "bitcoin-tx": BitcoinTx, + "zcash-block": ZcashBlock, + "zcash-tx": ZcashTx, + "decred-block": DecredBlock, + "decred-tx": DecredTx, + "dash-block": DashBlock, + "dash-tx": DashTx, +} + +// CodecToStr maps the numeric codec to its name +var CodecToStr = map[uint64]string{ + Raw: "raw", + DagProtobuf: "protobuf", + DagCBOR: "cbor", + GitRaw: "git-raw", + EthBlock: "eth-block", + EthBlockList: "eth-block-list", + EthTxTrie: "eth-tx-trie", + EthTx: "eth-tx", + EthTxReceiptTrie: "eth-tx-receipt-trie", + EthTxReceipt: "eth-tx-receipt", + EthStateTrie: "eth-state-trie", + EthAccountSnapshot: "eth-account-snapshot", + EthStorageTrie: "eth-storage-trie", + BitcoinBlock: "bitcoin-block", + BitcoinTx: "bitcoin-tx", + ZcashBlock: "zcash-block", + ZcashTx: "zcash-tx", + DecredBlock: "decred-block", + DecredTx: "decred-tx", + DashBlock: "dash-block", + DashTx: "dash-tx", +} + +// NewCidV0 returns a Cid-wrapped multihash. +// They exist to allow IPFS to work with Cids while keeping +// compatibility with the plain-multihash format used used in IPFS. +// NewCidV1 should be used preferentially. +func NewCidV0(mhash mh.Multihash) Cid { + // Need to make sure hash is valid for CidV0 otherwise we will + // incorrectly detect it as CidV1 in the Version() method + dec, err := mh.Decode(mhash) + if err != nil { + panic(err) + } + if dec.Code != mh.SHA2_256 || dec.Length != 32 { + panic("invalid hash for cidv0") + } + return Cid{string(mhash)} +} + +// NewCidV1 returns a new Cid using the given multicodec-packed +// content type. +func NewCidV1(codecType uint64, mhash mh.Multihash) Cid { + hashlen := len(mhash) + // two 8 bytes (max) numbers plus hash + buf := make([]byte, 2*binary.MaxVarintLen64+hashlen) + n := binary.PutUvarint(buf, 1) + n += binary.PutUvarint(buf[n:], codecType) + cn := copy(buf[n:], mhash) + if cn != hashlen { + panic("copy hash length is inconsistent") + } + + return Cid{string(buf[:n+hashlen])} +} + +var _ encoding.BinaryMarshaler = Cid{} +var _ encoding.BinaryUnmarshaler = (*Cid)(nil) +var _ encoding.TextMarshaler = Cid{} +var _ encoding.TextUnmarshaler = (*Cid)(nil) + +// Cid represents a self-describing content addressed +// identifier. It is formed by a Version, a Codec (which indicates +// a multicodec-packed content type) and a Multihash. +type Cid struct{ str string } + +// Undef can be used to represent a nil or undefined Cid, using Cid{} +// directly is also acceptable. +var Undef = Cid{} + +// Defined returns true if a Cid is defined +// Calling any other methods on an undefined Cid will result in +// undefined behavior. +func (c Cid) Defined() bool { + return c.str != "" +} + +// Parse is a short-hand function to perform Decode, Cast etc... on +// a generic interface{} type. +func Parse(v interface{}) (Cid, error) { + switch v2 := v.(type) { + case string: + if strings.Contains(v2, "/ipfs/") { + return Decode(strings.Split(v2, "/ipfs/")[1]) + } + return Decode(v2) + case []byte: + return Cast(v2) + case mh.Multihash: + return NewCidV0(v2), nil + case Cid: + return v2, nil + default: + return Undef, fmt.Errorf("can't parse %+v as Cid", v2) + } +} + +// Decode parses a Cid-encoded string and returns a Cid object. +// For CidV1, a Cid-encoded string is primarily a multibase string: +// +// +// +// The base-encoded string represents a: +// +// +// +// Decode will also detect and parse CidV0 strings. Strings +// starting with "Qm" are considered CidV0 and treated directly +// as B58-encoded multihashes. +func Decode(v string) (Cid, error) { + if len(v) < 2 { + return Undef, ErrCidTooShort + } + + if len(v) == 46 && v[:2] == "Qm" { + hash, err := mh.FromB58String(v) + if err != nil { + return Undef, err + } + + return NewCidV0(hash), nil + } + + _, data, err := mbase.Decode(v) + if err != nil { + return Undef, err + } + + return Cast(data) +} + +// Extract the encoding from a Cid. If Decode on the same string did +// not return an error neither will this function. +func ExtractEncoding(v string) (mbase.Encoding, error) { + if len(v) < 2 { + return -1, ErrCidTooShort + } + + if len(v) == 46 && v[:2] == "Qm" { + return mbase.Base58BTC, nil + } + + encoding := mbase.Encoding(v[0]) + + // check encoding is valid + _, err := mbase.NewEncoder(encoding) + if err != nil { + return -1, err + } + + return encoding, nil +} + +func uvError(read int) error { + switch { + case read == 0: + return ErrVarintBuffSmall + case read < 0: + return ErrVarintTooBig + default: + return nil + } +} + +// Cast takes a Cid data slice, parses it and returns a Cid. +// For CidV1, the data buffer is in the form: +// +// +// +// CidV0 are also supported. In particular, data buffers starting +// with length 34 bytes, which starts with bytes [18,32...] are considered +// binary multihashes. +// +// Please use decode when parsing a regular Cid string, as Cast does not +// expect multibase-encoded data. Cast accepts the output of Cid.Bytes(). +func Cast(data []byte) (Cid, error) { + if len(data) == 34 && data[0] == 18 && data[1] == 32 { + h, err := mh.Cast(data) + if err != nil { + return Undef, err + } + + return NewCidV0(h), nil + } + + vers, n := binary.Uvarint(data) + if err := uvError(n); err != nil { + return Undef, err + } + + if vers != 1 { + return Undef, fmt.Errorf("expected 1 as the cid version number, got: %d", vers) + } + + _, cn := binary.Uvarint(data[n:]) + if err := uvError(cn); err != nil { + return Undef, err + } + + rest := data[n+cn:] + h, err := mh.Cast(rest) + if err != nil { + return Undef, err + } + + return Cid{string(data[0 : n+cn+len(h)])}, nil +} + +// UnmarshalBinary is equivalent to Cast(). It implements the +// encoding.BinaryUnmarshaler interface. +func (c *Cid) UnmarshalBinary(data []byte) error { + casted, err := Cast(data) + if err != nil { + return err + } + c.str = casted.str + return nil +} + +// UnmarshalText is equivalent to Decode(). It implements the +// encoding.TextUnmarshaler interface. +func (c *Cid) UnmarshalText(text []byte) error { + decodedCid, err := Decode(string(text)) + if err != nil { + return err + } + c.str = decodedCid.str + return nil +} + +// Version returns the Cid version. +func (c Cid) Version() uint64 { + if len(c.str) == 34 && c.str[0] == 18 && c.str[1] == 32 { + return 0 + } + return 1 +} + +// Type returns the multicodec-packed content type of a Cid. +func (c Cid) Type() uint64 { + if c.Version() == 0 { + return DagProtobuf + } + _, n := uvarint(c.str) + codec, _ := uvarint(c.str[n:]) + return codec +} + +// String returns the default string representation of a +// Cid. Currently, Base58 is used as the encoding for the +// multibase string. +func (c Cid) String() string { + switch c.Version() { + case 0: + return c.Hash().B58String() + case 1: + mbstr, err := mbase.Encode(mbase.Base58BTC, c.Bytes()) + if err != nil { + panic("should not error with hardcoded mbase: " + err.Error()) + } + + return mbstr + default: + panic("not possible to reach this point") + } +} + +// String returns the string representation of a Cid +// encoded is selected base +func (c Cid) StringOfBase(base mbase.Encoding) (string, error) { + switch c.Version() { + case 0: + if base != mbase.Base58BTC { + return "", ErrInvalidEncoding + } + return c.Hash().B58String(), nil + case 1: + return mbase.Encode(base, c.Bytes()) + default: + panic("not possible to reach this point") + } +} + +// Encode return the string representation of a Cid in a given base +// when applicable. Version 0 Cid's are always in Base58 as they do +// not take a multibase prefix. +func (c Cid) Encode(base mbase.Encoder) string { + switch c.Version() { + case 0: + return c.Hash().B58String() + case 1: + return base.Encode(c.Bytes()) + default: + panic("not possible to reach this point") + } +} + +// Hash returns the multihash contained by a Cid. +func (c Cid) Hash() mh.Multihash { + bytes := c.Bytes() + + if c.Version() == 0 { + return mh.Multihash(bytes) + } + + // skip version length + _, n1 := binary.Uvarint(bytes) + // skip codec length + _, n2 := binary.Uvarint(bytes[n1:]) + + return mh.Multihash(bytes[n1+n2:]) +} + +// Bytes returns the byte representation of a Cid. +// The output of bytes can be parsed back into a Cid +// with Cast(). +func (c Cid) Bytes() []byte { + return []byte(c.str) +} + +// MarshalBinary is equivalent to Bytes(). It implements the +// encoding.BinaryMarshaler interface. +func (c Cid) MarshalBinary() ([]byte, error) { + return c.Bytes(), nil +} + +// MarshalText is equivalent to String(). It implements the +// encoding.TextMarshaler interface. +func (c Cid) MarshalText() ([]byte, error) { + return []byte(c.String()), nil +} + +// Equals checks that two Cids are the same. +// In order for two Cids to be considered equal, the +// Version, the Codec and the Multihash must match. +func (c Cid) Equals(o Cid) bool { + return c == o +} + +// UnmarshalJSON parses the JSON representation of a Cid. +func (c *Cid) UnmarshalJSON(b []byte) error { + if len(b) < 2 { + return fmt.Errorf("invalid cid json blob") + } + obj := struct { + CidTarget string `json:"/"` + }{} + objptr := &obj + err := json.Unmarshal(b, &objptr) + if err != nil { + return err + } + if objptr == nil { + *c = Cid{} + return nil + } + + if obj.CidTarget == "" { + return fmt.Errorf("cid was incorrectly formatted") + } + + out, err := Decode(obj.CidTarget) + if err != nil { + return err + } + + *c = out + + return nil +} + +// MarshalJSON procudes a JSON representation of a Cid, which looks as follows: +// +// { "/": "" } +// +// Note that this formatting comes from the IPLD specification +// (https://github.com/ipld/specs/tree/master/ipld) +func (c Cid) MarshalJSON() ([]byte, error) { + if !c.Defined() { + return []byte("null"), nil + } + return []byte(fmt.Sprintf("{\"/\":\"%s\"}", c.String())), nil +} + +// KeyString returns the binary representation of the Cid as a string +func (c Cid) KeyString() string { + return c.str +} + +// Loggable returns a Loggable (as defined by +// https://godoc.org/github.com/ipfs/go-log). +func (c Cid) Loggable() map[string]interface{} { + return map[string]interface{}{ + "cid": c, + } +} + +// Prefix builds and returns a Prefix out of a Cid. +func (c Cid) Prefix() Prefix { + dec, _ := mh.Decode(c.Hash()) // assuming we got a valid multiaddr, this will not error + return Prefix{ + MhType: dec.Code, + MhLength: dec.Length, + Version: c.Version(), + Codec: c.Type(), + } +} + +// Prefix represents all the metadata of a Cid, +// that is, the Version, the Codec, the Multihash type +// and the Multihash length. It does not contains +// any actual content information. +// NOTE: The use -1 in MhLength to mean default length is deprecated, +// use the V0Builder or V1Builder structures instead +type Prefix struct { + Version uint64 + Codec uint64 + MhType uint64 + MhLength int +} + +// Sum uses the information in a prefix to perform a multihash.Sum() +// and return a newly constructed Cid with the resulting multihash. +func (p Prefix) Sum(data []byte) (Cid, error) { + length := p.MhLength + if p.MhType == mh.ID { + length = -1 + } + + hash, err := mh.Sum(data, p.MhType, length) + if err != nil { + return Undef, err + } + + switch p.Version { + case 0: + return NewCidV0(hash), nil + case 1: + return NewCidV1(p.Codec, hash), nil + default: + return Undef, fmt.Errorf("invalid cid version") + } +} + +// Bytes returns a byte representation of a Prefix. It looks like: +// +// +func (p Prefix) Bytes() []byte { + buf := make([]byte, 4*binary.MaxVarintLen64) + n := binary.PutUvarint(buf, p.Version) + n += binary.PutUvarint(buf[n:], p.Codec) + n += binary.PutUvarint(buf[n:], uint64(p.MhType)) + n += binary.PutUvarint(buf[n:], uint64(p.MhLength)) + return buf[:n] +} + +// PrefixFromBytes parses a Prefix-byte representation onto a +// Prefix. +func PrefixFromBytes(buf []byte) (Prefix, error) { + r := bytes.NewReader(buf) + vers, err := binary.ReadUvarint(r) + if err != nil { + return Prefix{}, err + } + + codec, err := binary.ReadUvarint(r) + if err != nil { + return Prefix{}, err + } + + mhtype, err := binary.ReadUvarint(r) + if err != nil { + return Prefix{}, err + } + + mhlen, err := binary.ReadUvarint(r) + if err != nil { + return Prefix{}, err + } + + return Prefix{ + Version: vers, + Codec: codec, + MhType: mhtype, + MhLength: int(mhlen), + }, nil +} diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid_fuzz.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/cid_fuzz.go similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/cid_fuzz.go rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/cid_fuzz.go diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/codecov.yml b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/codecov.yml rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/codecov.yml diff --git a/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/deprecated.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/deprecated.go new file mode 100644 index 0000000000..5da52560d5 --- /dev/null +++ b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/deprecated.go @@ -0,0 +1,28 @@ +package cid + +import ( + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// NewPrefixV0 returns a CIDv0 prefix with the specified multihash type. +// DEPRECATED: Use V0Builder +func NewPrefixV0(mhType uint64) Prefix { + return Prefix{ + MhType: mhType, + MhLength: mh.DefaultLengths[mhType], + Version: 0, + Codec: DagProtobuf, + } +} + +// NewPrefixV1 returns a CIDv1 prefix with the specified codec and multihash +// type. +// DEPRECATED: Use V1Builder +func NewPrefixV1(codecType uint64, mhType uint64) Prefix { + return Prefix{ + MhType: mhType, + MhLength: mh.DefaultLengths[mhType], + Version: 1, + Codec: codecType, + } +} diff --git a/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/package.json b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/package.json new file mode 100644 index 0000000000..c98a77ee2d --- /dev/null +++ b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-cid" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-cid" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd", + "name": "go-multibase", + "version": "0.3.0" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "MIT", + "name": "go-cid", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.9.3" +} + diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/set.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/set.go similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/set.go rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/set.go diff --git a/vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/varint.go b/vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/varint.go similarity index 100% rename from vendor/gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid/varint.go rename to vendor/gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid/varint.go diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/.travis.yml b/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/.travis.yml deleted file mode 100644 index e1be0bfa30..0000000000 --- a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/package.json b/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/package.json deleted file mode 100644 index 206e34470e..0000000000 --- a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-tcp-transport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-tcp-transport" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni", - "name": "go-reuseport", - "version": "0.1.18" - }, - { - "author": "whyrusleeping", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "stebalien", - "hash": "QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs", - "name": "go-reuseport-transport", - "version": "0.1.11" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - }, - { - "author": "whyrusleeping", - "hash": "QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc", - "name": "go-smux-multiplex", - "version": "3.0.16" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-tcp-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.16" -} - diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/reuseport.go b/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/reuseport.go deleted file mode 100644 index 4504fe4764..0000000000 --- a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/reuseport.go +++ /dev/null @@ -1,35 +0,0 @@ -package tcp - -import ( - "os" - "strings" - - reuseport "gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport" -) - -// envReuseport is the env variable name used to turn off reuse port. -// It default to true. -const envReuseport = "IPFS_REUSEPORT" - -// envReuseportVal stores the value of envReuseport. defaults to true. -var envReuseportVal = true - -func init() { - v := strings.ToLower(os.Getenv(envReuseport)) - if v == "false" || v == "f" || v == "0" { - envReuseportVal = false - log.Infof("REUSEPORT disabled (IPFS_REUSEPORT=%s)", v) - } -} - -// reuseportIsAvailable returns whether reuseport is available to be used. This -// is here because we want to be able to turn reuseport on and off selectively. -// For now we use an ENV variable, as this handles our pressing need: -// -// IPFS_REUSEPORT=false ipfs daemon -// -// If this becomes a sought after feature, we could add this to the config. -// In the end, reuseport is a stop-gap. -func ReuseportIsAvailable() bool { - return envReuseportVal && reuseport.Available() -} diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/.travis.yml b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/.travis.yml new file mode 100644 index 0000000000..95058d817a --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/.travis.yml @@ -0,0 +1,25 @@ +sudo: required + +os: + - linux + - osx + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/LICENSE b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/LICENSE rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/LICENSE diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/Makefile b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/Makefile rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/Makefile diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/README.md b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/README.md similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/README.md rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/README.md diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/codecov.yml b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/codecov.yml rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/codecov.yml diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/dial.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/dial.go new file mode 100644 index 0000000000..ca5f48dcaf --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/dial.go @@ -0,0 +1,113 @@ +package tcpreuse + +import ( + "context" + "net" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + reuseport "gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport" +) + +type dialer interface { + Dial(network, addr string) (net.Conn, error) + DialContext(ctx context.Context, network, addr string) (net.Conn, error) +} + +// Dial dials the given multiaddr, reusing ports we're currently listening on if +// possible. +// +// Dial attempts to be smart about choosing the source port. For example, If +// we're dialing a loopback address and we're listening on one or more loopback +// ports, Dial will randomly choose one of the loopback ports and addresses and +// reuse it. +func (t *Transport) Dial(raddr ma.Multiaddr) (manet.Conn, error) { + return t.DialContext(context.Background(), raddr) +} + +// DialContext is like Dial but takes a context. +func (t *Transport) DialContext(ctx context.Context, raddr ma.Multiaddr) (manet.Conn, error) { + network, addr, err := manet.DialArgs(raddr) + if err != nil { + return nil, err + } + var d dialer + switch network { + case "tcp4": + d = t.v4.getDialer(network) + case "tcp6": + d = t.v6.getDialer(network) + default: + return nil, ErrWrongProto + } + conn, err := d.DialContext(ctx, network, addr) + if err != nil { + return nil, err + } + maconn, err := manet.WrapNetConn(conn) + if err != nil { + conn.Close() + return nil, err + } + return maconn, nil +} + +func (n *network) getDialer(network string) dialer { + n.mu.RLock() + d := n.dialer + n.mu.RUnlock() + if d == nil { + n.mu.Lock() + defer n.mu.Unlock() + + if n.dialer == nil { + n.dialer = n.makeDialer(network) + } + d = n.dialer + } + return d +} + +func (n *network) makeDialer(network string) dialer { + if !reuseport.Available() { + log.Debug("reuseport not available") + return &net.Dialer{} + } + + var unspec net.IP + switch network { + case "tcp4": + unspec = net.IPv4zero + case "tcp6": + unspec = net.IPv6unspecified + default: + panic("invalid network: must be either tcp4 or tcp6") + } + + // How many ports are we listening on. + var port = 0 + for l := range n.listeners { + newPort := l.Addr().(*net.TCPAddr).Port + switch { + case newPort == 0: // Any port, ignore (really, we shouldn't get this case...). + case port == 0: // Haven't selected a port yet, choose this one. + port = newPort + case newPort == port: // Same as the selected port, continue... + default: // Multiple ports, use the multi dialer + return newMultiDialer(unspec, n.listeners) + } + } + + // None. + if port == 0 { + return &net.Dialer{} + } + + // One. Always dial from the single port we're listening on. + laddr := &net.TCPAddr{ + IP: unspec, + Port: port, + } + + return (*singleDialer)(laddr) +} diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.mod b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.mod new file mode 100644 index 0000000000..eda8b571ea --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.mod @@ -0,0 +1,15 @@ +module github.com/libp2p/go-reuseport-transport + +require ( + github.com/gogo/protobuf v1.2.0 // indirect + github.com/ipfs/go-log v1.5.7 + github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5 + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.4 // indirect + github.com/multiformats/go-multiaddr v0.0.1 + github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777 // indirect + github.com/multiformats/go-multiaddr-net v0.0.0-20190225134306-c8d587e921c0 + github.com/opentracing/opentracing-go v1.0.2 // indirect + github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc // indirect + golang.org/x/net v0.0.0-20181220203305-927f97764cc3 // indirect +) diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.sum b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.sum new file mode 100644 index 0000000000..50cfafb6b7 --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/go.sum @@ -0,0 +1,47 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJu4ZbSc= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/ipfs/go-log v1.5.7 h1:8ef7XW41hzAnvVNkK5009/bOA9/MFr7fhdzkfAqvolI= +github.com/ipfs/go-log v1.5.7/go.mod h1:AKYS9u+ECLT8t30brTaoVwu3f1FpGx6C0352oI1zQ0Q= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5 h1:EbC40Vr+0RQ/w+m1Oic9tgOd1DA7E+sbdzbkg5wLZ5I= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5/go.mod h1:ViUXkfLbcaqzYb7Yyi7ZP/n8nAezADhH9oLvj6TA83E= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XCFOweFD3BNESdnO8ewyYTFT2R+/b8FQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/multiformats/go-multiaddr v0.0.1 h1:/QUV3VBMDI6pi6xfiw7lr6xhDWWvQKn9udPn68kLSdY= +github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777 h1:j35rQ/T6NiLfsBUcX4acVlJsjWYmiH689H4D77O+o5I= +github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777/go.mod h1:IGZKFM4G96cYgdMcUmHx5gtJxiHmvZLTQ9rdWXMKJyo= +github.com/multiformats/go-multiaddr-net v0.0.0-20190225134306-c8d587e921c0 h1:N1bRpQ94YQMy6mXhbMk6iqTyTg/cTtnhJgKVkpSPfXM= +github.com/multiformats/go-multiaddr-net v0.0.0-20190225134306-c8d587e921c0/go.mod h1:AO4WqKzxLt+paJ0N0kufj6teQ2R6fZbnItDvGTwilmk= +github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d h1:Z0Ahzd7HltpJtjAHHxX8QFP3j1yYgiuvjbjRzDj/KH0= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/listen.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/listen.go new file mode 100644 index 0000000000..57271ecf1f --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/listen.go @@ -0,0 +1,80 @@ +package tcpreuse + +import ( + "net" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + reuseport "gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport" +) + +type listener struct { + manet.Listener + network *network +} + +func (l *listener) Close() error { + l.network.mu.Lock() + delete(l.network.listeners, l) + l.network.dialer = nil + l.network.mu.Unlock() + return l.Listener.Close() +} + +// Listen listens on the given multiaddr. +// +// If reuseport is supported, it will be enabled for this listener and future +// dials from this transport may reuse the port. +// +// Note: You can listen on the same multiaddr as many times as you want +// (although only *one* listener will end up handling the inbound connection). +func (t *Transport) Listen(laddr ma.Multiaddr) (manet.Listener, error) { + nw, naddr, err := manet.DialArgs(laddr) + if err != nil { + return nil, err + } + var n *network + switch nw { + case "tcp4": + n = &t.v4 + case "tcp6": + n = &t.v6 + default: + return nil, ErrWrongProto + } + + if !reuseport.Available() { + return manet.Listen(laddr) + } + nl, err := reuseport.Listen(nw, naddr) + if err != nil { + return manet.Listen(laddr) + } + + if _, ok := nl.Addr().(*net.TCPAddr); !ok { + nl.Close() + return nil, ErrWrongProto + } + + malist, err := manet.WrapNetListener(nl) + if err != nil { + nl.Close() + return nil, err + } + + list := &listener{ + Listener: malist, + network: n, + } + + n.mu.Lock() + defer n.mu.Unlock() + + if n.listeners == nil { + n.listeners = make(map[*listener]struct{}) + } + n.listeners[list] = struct{}{} + n.dialer = nil + + return list, nil +} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/multidialer.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/multidialer.go similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/multidialer.go rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/multidialer.go diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/package.json b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/package.json new file mode 100644 index 0000000000..a0b9189df9 --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/package.json @@ -0,0 +1,41 @@ +{ + "author": "stebalien", + "bugs": { + "url": "https://github.com/libp2p/go-reuseport-transport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-reuseport-transport" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9", + "name": "go-reuseport", + "version": "0.2.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-reuseport-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.3" +} + diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/reuseport.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/reuseport.go new file mode 100644 index 0000000000..e476f8e8fa --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/reuseport.go @@ -0,0 +1,72 @@ +package tcpreuse + +import ( + "context" + "net" + "syscall" + + reuseport "gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport" +) + +var fallbackDialer net.Dialer + +// reuseErrShouldRetry diagnoses whether to retry after a reuse error. +// if we failed to bind, we should retry. if bind worked and this is a +// real dial error (remote end didnt answer) then we should not retry. +func reuseErrShouldRetry(err error) bool { + if err == nil { + return false // hey, it worked! no need to retry. + } + + // if it's a network timeout error, it's a legitimate failure. + if nerr, ok := err.(net.Error); ok && nerr.Timeout() { + return false + } + + errno, ok := err.(syscall.Errno) + if !ok { // not an errno? who knows what this is. retry. + return true + } + + switch errno { + case syscall.EADDRINUSE, syscall.EADDRNOTAVAIL: + return true // failure to bind. retry. + case syscall.ECONNREFUSED: + return false // real dial error + default: + return true // optimistically default to retry. + } +} + +// Dials using reuseport and then redials normally if that fails. +// TODO(anacrolix): This shouldn't fail anymore: Remove fallback. +func reuseDial(ctx context.Context, laddr *net.TCPAddr, network, raddr string) (con net.Conn, err error) { + if laddr == nil { + return fallbackDialer.DialContext(ctx, network, raddr) + } + + d := net.Dialer{ + LocalAddr: laddr, + Control: reuseport.Control, + } + defer func() { + if err != nil { + return + } + // This is transplanted from go-reuseport, which once set no linger on + // dialing and may be a requirement for desired behaviour in this + // package. + con.(*net.TCPConn).SetLinger(0) + }() + + con, err = d.DialContext(ctx, network, raddr) + if err == nil { + return con, nil + } + + if reuseErrShouldRetry(err) && ctx.Err() == nil { + log.Debugf("failed to reuse port, dialing with a random port: %s", err) + con, err = fallbackDialer.DialContext(ctx, network, raddr) + } + return con, err +} diff --git a/vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/singledialer.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/singledialer.go similarity index 100% rename from vendor/gx/ipfs/QmPrXbjDqfuthJ1Ddesmz7gw1VWkhnWMkfJxxSXgxUsGqs/go-reuseport-transport/singledialer.go rename to vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/singledialer.go diff --git a/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/transport.go b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/transport.go new file mode 100644 index 0000000000..6e1152abf6 --- /dev/null +++ b/vendor/gx/ipfs/QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT/go-reuseport-transport/transport.go @@ -0,0 +1,25 @@ +package tcpreuse + +import ( + "errors" + "sync" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("reuseport-transport") + +// ErrWrongProto is returned when dialing a protocol other than tcp. +var ErrWrongProto = errors.New("can only dial TCP over IPv4 or IPv6") + +// Transport is a TCP reuse transport that reuses listener ports. +type Transport struct { + v4 network + v6 network +} + +type network struct { + mu sync.RWMutex + listeners map[*listener]struct{} + dialer dialer +} diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/.travis.yml b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/.travis.yml rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/.travis.yml diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/LICENSE b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/LICENSE rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/LICENSE diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/Makefile b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/Makefile similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/Makefile rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/Makefile diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/README.md b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/README.md similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/README.md rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/README.md diff --git a/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/codec.go b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/codec.go new file mode 100644 index 0000000000..ac3f562f42 --- /dev/null +++ b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/codec.go @@ -0,0 +1,35 @@ +package pnet + +import ( + "fmt" + "io" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + bmux "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/mux" +) + +var ( + pathPSKv1 = []byte("/key/swarm/psk/1.0.0/") + headerPSKv1 = mc.Header(pathPSKv1) +) + +func decodeV1PSK(in io.Reader) (*[32]byte, error) { + var err error + in, err = mc.WrapTransformPathToHeader(in) + if err != nil { + return nil, err + } + err = mc.ConsumeHeader(in, headerPSKv1) + if err != nil { + return nil, fmt.Errorf("psk header error: %s", err.Error()) + } + + in, err = mc.WrapTransformPathToHeader(in) + if err != nil { + return nil, fmt.Errorf("wrapping error: %s", err.Error()) + } + out := [32]byte{} + + err = bmux.AllBasesMux().Decoder(in).Decode(out[:]) + return &out, err +} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/codecov.yml b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/codecov.yml rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/codecov.yml diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/fingerprint.go b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/fingerprint.go similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/fingerprint.go rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/fingerprint.go diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/generate.go b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/generate.go similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/generate.go rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/generate.go diff --git a/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/package.json b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/package.json new file mode 100644 index 0000000000..e30162b697 --- /dev/null +++ b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/package.json @@ -0,0 +1,43 @@ +{ + "author": "libp2p", + "bugs": { + "URL": "https://github.com/libp2p/go-libp2p-pnet/issues", + "url": "https://github.com/libp2p/go-libp2p-pnet/issues" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-pnet" + }, + "gxDependencies": [ + { + "author": "libp2p", + "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", + "name": "go-libp2p-interface-pnet", + "version": "3.0.0" + }, + { + "author": "multiformats", + "hash": "QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP", + "name": "go-multicodec", + "version": "0.1.8" + }, + { + "author": "davidlazar", + "hash": "QmNi5J1mEQKAKWbPRBEMKKYVNok9EN4MsGM4YUqPvraPEX", + "name": "go-crypto-dav", + "version": "0.2.2" + }, + { + "author": "Stebalien", + "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", + "name": "go-buffer-pool", + "version": "0.1.3" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "MIT", + "name": "go-libp2p-pnet", + "releaseCmd": "git commit -a -m \"gx release $VERSION\"", + "version": "3.0.5" +} + diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/protector.go b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/protector.go similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/protector.go rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/protector.go diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/psk_conn.go b/vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/psk_conn.go similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/psk_conn.go rename to vendor/gx/ipfs/QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y/go-libp2p-pnet/psk_conn.go diff --git a/vendor/gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/packet_handler_map.go b/vendor/gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/packet_handler_map.go index 0a07f94314..3786d723b4 100644 --- a/vendor/gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/packet_handler_map.go +++ b/vendor/gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go/packet_handler_map.go @@ -39,7 +39,7 @@ func newPacketHandlerMap(conn net.PacketConn, connIDLen int, logger utils.Logger connIDLen: connIDLen, handlers: make(map[string]packetHandler), deleteClosedSessionsAfter: protocol.ClosedSessionDeleteTimeout, - logger: logger, + logger: logger, } go m.listen() return m diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/.travis.yml b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/.travis.yml new file mode 100644 index 0000000000..43bf4cdc9a --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/.travis.yml @@ -0,0 +1,25 @@ +language: go + +go: + - "1.9" + - "1.10" + - "1.11" + +matrix: + include: + - os: osx +notifications: + email: false + slack: + secure: X7uBLWYbuUhf8QFE16CoS5z7WvFR8EN9j6cEectMW6mKZ3vwXGwVXRIPsgUq/606DsQdCCx34MR8MRWYGlu6TBolbSe9y0EP0i46yipPz22YtuT7umcVUbGEyx8MZKgG0v1u/zA0O4aCsOBpGAA3gxz8h3JlEHDt+hv6U8xRsSllVLzLSNb5lwxDtcfEDxVVqP47GMEgjLPM28Pyt5qwjk7o5a4YSVzkfdxBXxd3gWzFUWzJ5E3cTacli50dK4GVfiLcQY2aQYoYO7AAvDnvP+TPfjDkBlUEE4MUz5CDIN51Xb+WW33sX7g+r3Bj7V5IRcF973RiYkpEh+3eoiPnyWyxhDZBYilty3b+Hysp6d4Ov/3I3ll7Bcny5+cYjakjkMH3l9w3gs6Y82GlpSLSJshKWS8vPRsxFe0Pstj6QSJXTd9EBaFr+l1ScXjJv/Sya9j8N9FfTuOTESWuaL1auX4Y7zEEVHlA8SCNOO8K0eTfxGZnC/YcIHsR8rePEAcFxfOYQppkyLF/XvAtnb/LMUuu0g4y2qNdme6Oelvyar1tFEMRtbl4mRCdu/krXBFtkrsfUaVY6WTPdvXAGotsFJ0wuA53zGVhlcd3+xAlSlR3c1QX95HIMeivJKb5L4nTjP+xnrmQNtnVk+tG4LSH2ltuwcZSSczModtcBmRefrk= + +env: + global: + - secure: CRkV2+/jlO0gXzzS50XGxfMS117FNwiVjxNY/LeWq06RKD+dDCPxTJl3JCNe3l0cYEPAglV2uMMYukDiTqJ7e+HI4nh4N4mv6lwx39N8dAvJe1x5ITS2T4qk4kTjuQb1Q1vw/ZOxoQqmvNKj2uRmBdJ/HHmysbRJ1OzCWML3OXdUwJf0AYlJzTjpMfkOKr7sTtE4rwyyQtd4tKH1fGdurgI9ZuFd9qvYxK2qcJhsQ6CNqMXt+7FkVkN1rIPmofjjBTNryzUr4COFXuWH95aDAif19DeBW4lbNgo1+FpDsrgmqtuhl6NAuptI8q/imow2KXBYJ8JPXsxW8DVFj0IIp0RCd3GjaEnwBEbxAyiIHLfW7AudyTS/dJOvZffPqXnuJ8xj3OPIdNe4xY0hWl8Ju2HhKfLOAHq7VadHZWd3IHLil70EiL4/JLD1rNbMImUZisFaA8pyrcIvYYebjOnk4TscwKFLedClRSX1XsMjWWd0oykQtrdkHM2IxknnBpaLu7mFnfE07f6dkG0nlpyu4SCLey7hr5FdcEmljA0nIxTSYDg6035fQkBEAbe7hlESOekkVNT9IZPwG+lmt3vU4ofi6NqNbJecOuSB+h36IiZ9s4YQtxYNnLgW14zjuFGGyT5smc3IjBT7qngDjKIgyrSVoRkY/8udy9qbUgvBeW8= + +before_script: +- go get github.com/mattn/goveralls +script: +- bash contrib/cover.sh $HOME/build coverage.out || travis_terminate 1 +- goveralls -service=travis-ci -coverprofile=coverage.out || true +- goveralls -coverprofile=coverage.out -service=travis-ci diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/CHANGELOG.md b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/CHANGELOG.md similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/CHANGELOG.md rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/CHANGELOG.md diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/CODE_OF_CONDUCT.md b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..bf7bbc29dc --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/CODE_OF_CONDUCT.md @@ -0,0 +1,5 @@ +# Code of Conduct + +Our Code of Conduct can be found here: + +https://dgraph.io/conduct diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/LICENSE b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/LICENSE rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/LICENSE diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/README.md b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/README.md new file mode 100644 index 0000000000..4133210f2f --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/README.md @@ -0,0 +1,773 @@ +# BadgerDB [![GoDoc](https://godoc.org/github.com/dgraph-io/badger?status.svg)](https://godoc.org/github.com/dgraph-io/badger) [![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger)](https://goreportcard.com/report/github.com/dgraph-io/badger) [![Sourcegraph](https://sourcegraph.com/github.com/dgraph-io/badger/-/badge.svg)](https://sourcegraph.com/github.com/dgraph-io/badger?badge) [![Build Status](https://teamcity.dgraph.io/guestAuth/app/rest/builds/buildType:(id:Badger_UnitTests)/statusIcon.svg)](https://teamcity.dgraph.io/viewLog.html?buildTypeId=Badger_UnitTests&buildId=lastFinished&guest=1) ![Appveyor](https://ci.appveyor.com/api/projects/status/github/dgraph-io/badger?branch=master&svg=true) [![Coverage Status](https://coveralls.io/repos/github/dgraph-io/badger/badge.svg?branch=master)](https://coveralls.io/github/dgraph-io/badger?branch=master) + +![Badger mascot](images/diggy-shadow.png) + +BadgerDB is an embeddable, persistent and fast key-value (KV) database +written in pure Go. It's meant to be a performant alternative to non-Go-based +key-value stores like [RocksDB](https://github.com/facebook/rocksdb). + +## Project Status [Oct 27, 2018] + +Badger is stable and is being used to serve data sets worth hundreds of +terabytes. Badger supports concurrent ACID transactions with serializable +snapshot isolation (SSI) guarantees. A Jepsen-style bank test runs nightly for +8h, with `--race` flag and ensures maintainance of transactional guarantees. +Badger has also been tested to work with filesystem level anomalies, to ensure +persistence and consistency. + +Badger v1.0 was released in Nov 2017, with a Badger v2.0 release coming up in a +few months. The [Changelog] is kept fairly up-to-date. + +[Changelog]:https://github.com/dgraph-io/badger/blob/master/CHANGELOG.md + +## Table of Contents + * [Getting Started](#getting-started) + + [Installing](#installing) + + [Opening a database](#opening-a-database) + + [Transactions](#transactions) + - [Read-only transactions](#read-only-transactions) + - [Read-write transactions](#read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + + [Using key/value pairs](#using-keyvalue-pairs) + + [Monotonically increasing integers](#monotonically-increasing-integers) + * [Merge Operations](#merge-operations) + + [Setting Time To Live(TTL) and User Metadata on Keys](#setting-time-to-livettl-and-user-metadata-on-keys) + + [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Key-only iteration](#key-only-iteration) + + [Stream](#stream) + + [Garbage Collection](#garbage-collection) + + [Database backup](#database-backup) + + [Memory usage](#memory-usage) + + [Statistics](#statistics) + * [Resources](#resources) + + [Blog Posts](#blog-posts) + * [Contact](#contact) + * [Design](#design) + + [Comparisons](#comparisons) + + [Benchmarks](#benchmarks) + * [Other Projects Using Badger](#other-projects-using-badger) + * [Frequently Asked Questions](#frequently-asked-questions) + +## Getting Started + +### Installing +To start using Badger, install Go 1.8 or above and run `go get`: + +```sh +$ go get github.com/dgraph-io/badger/... +``` + +This will retrieve the library and install the `badger_info` command line +utility into your `$GOBIN` path. + + +### Opening a database +The top-level object in Badger is a `DB`. It represents multiple files on disk +in specific directories, which contain the data for a single database. + +To open your database, use the `badger.Open()` function, with the appropriate +options. The `Dir` and `ValueDir` options are mandatory and must be +specified by the client. They can be set to the same value to simplify things. + +```go +package main + +import ( + "log" + + "github.com/dgraph-io/badger" +) + +func main() { + // Open the Badger database located in the /tmp/badger directory. + // It will be created if it doesn't exist. + opts := badger.DefaultOptions + opts.Dir = "/tmp/badger" + opts.ValueDir = "/tmp/badger" + db, err := badger.Open(opts) + if err != nil { + log.Fatal(err) + } + defer db.Close() +  // Your code here… +} +``` + +Please note that Badger obtains a lock on the directories so multiple processes +cannot open the same database at the same time. + +### Transactions + +#### Read-only transactions +To start a read-only transaction, you can use the `DB.View()` method: + +```go +err := db.View(func(txn *badger.Txn) error { +  // Your code here… +  return nil +}) +``` + +You cannot perform any writes or deletes within this transaction. Badger +ensures that you get a consistent view of the database within this closure. Any +writes that happen elsewhere after the transaction has started, will not be +seen by calls made within the closure. + +#### Read-write transactions +To start a read-write transaction, you can use the `DB.Update()` method: + +```go +err := db.Update(func(txn *badger.Txn) error { +  // Your code here… +  return nil +}) +``` + +All database operations are allowed inside a read-write transaction. + +Always check the returned error value. If you return an error +within your closure it will be passed through. + +An `ErrConflict` error will be reported in case of a conflict. Depending on the state +of your application, you have the option to retry the operation if you receive +this error. + +An `ErrTxnTooBig` will be reported in case the number of pending writes/deletes in +the transaction exceed a certain limit. In that case, it is best to commit the +transaction and start a new transaction immediately. Here is an example (we are +not checking for errors in some places for simplicity): + +```go +updates := make(map[string]string) +txn := db.NewTransaction(true) +for k,v := range updates { + if err := txn.Set([]byte(k),[]byte(v)); err == ErrTxnTooBig { + _ = txn.Commit() + txn = db.NewTransaction(..) + _ = txn.Set([]byte(k),[]byte(v)) + } +} +_ = txn.Commit() +``` + +#### Managing transactions manually +The `DB.View()` and `DB.Update()` methods are wrappers around the +`DB.NewTransaction()` and `Txn.Commit()` methods (or `Txn.Discard()` in case of +read-only transactions). These helper methods will start the transaction, +execute a function, and then safely discard your transaction if an error is +returned. This is the recommended way to use Badger transactions. + +However, sometimes you may want to manually create and commit your +transactions. You can use the `DB.NewTransaction()` function directly, which +takes in a boolean argument to specify whether a read-write transaction is +required. For read-write transactions, it is necessary to call `Txn.Commit()` +to ensure the transaction is committed. For read-only transactions, calling +`Txn.Discard()` is sufficient. `Txn.Commit()` also calls `Txn.Discard()` +internally to cleanup the transaction, so just calling `Txn.Commit()` is +sufficient for read-write transaction. However, if your code doesn’t call +`Txn.Commit()` for some reason (for e.g it returns prematurely with an error), +then please make sure you call `Txn.Discard()` in a `defer` block. Refer to the +code below. + +```go +// Start a writable transaction. +txn := db.NewTransaction(true) +defer txn.Discard() + +// Use the transaction... +err := txn.Set([]byte("answer"), []byte("42")) +if err != nil { + return err +} + +// Commit the transaction and check for error. +if err := txn.Commit(); err != nil { + return err +} +``` + +The first argument to `DB.NewTransaction()` is a boolean stating if the transaction +should be writable. + +Badger allows an optional callback to the `Txn.Commit()` method. Normally, the +callback can be set to `nil`, and the method will return after all the writes +have succeeded. However, if this callback is provided, the `Txn.Commit()` +method returns as soon as it has checked for any conflicts. The actual writing +to the disk happens asynchronously, and the callback is invoked once the +writing has finished, or an error has occurred. This can improve the throughput +of the application in some cases. But it also means that a transaction is not +durable until the callback has been invoked with a `nil` error value. + +### Using key/value pairs +To save a key/value pair, use the `Txn.Set()` method: + +```go +err := db.Update(func(txn *badger.Txn) error { + err := txn.Set([]byte("answer"), []byte("42")) + return err +}) +``` + +This will set the value of the `"answer"` key to `"42"`. To retrieve this +value, we can use the `Txn.Get()` method: + +```go +err := db.View(func(txn *badger.Txn) error { + item, err := txn.Get([]byte("answer")) + handle(err) + + var valNot, valCopy []byte + err := item.Value(func(val []byte) error { + // This func with val would only be called if item.Value encounters no error. + + // Accessing val here is valid. + fmt.Printf("The answer is: %s\n", val) + + // Copying or parsing val is valid. + valCopy = append([]byte{}, val...) + + // Assigning val slice to another variable is NOT OK. + valNot = val // Do not do this. + return nil + }) + handle(err) + + // DO NOT access val here. It is the most common cause of bugs. + fmt.Printf("NEVER do this. %s\n", valNot) + + // You must copy it to use it outside item.Value(...). + fmt.Printf("The answer is: %s\n", valCopy) + + // Alternatively, you could also use item.ValueCopy(). + valCopy, err = item.ValueCopy(nil) + handle(err) + fmt.Printf("The answer is: %s\n", valCopy) + + return nil +}) +``` + +`Txn.Get()` returns `ErrKeyNotFound` if the value is not found. + +Please note that values returned from `Get()` are only valid while the +transaction is open. If you need to use a value outside of the transaction +then you must use `copy()` to copy it to another byte slice. + +Use the `Txn.Delete()` method to delete a key. + +### Monotonically increasing integers + +To get unique monotonically increasing integers with strong durability, you can +use the `DB.GetSequence` method. This method returns a `Sequence` object, which +is thread-safe and can be used concurrently via various goroutines. + +Badger would lease a range of integers to hand out from memory, with the +bandwidth provided to `DB.GetSequence`. The frequency at which disk writes are +done is determined by this lease bandwidth and the frequency of `Next` +invocations. Setting a bandwith too low would do more disk writes, setting it +too high would result in wasted integers if Badger is closed or crashes. +To avoid wasted integers, call `Release` before closing Badger. + +```go +seq, err := db.GetSequence(key, 1000) +defer seq.Release() +for { + num, err := seq.Next() +} +``` + +### Merge Operations +Badger provides support for unordered merge operations. You can define a func +of type `MergeFunc` which takes in an existing value, and a value to be +_merged_ with it. It returns a new value which is the result of the _merge_ +operation. All values are specified in byte arrays. For e.g., here is a merge +function (`add`) which adds a `uint64` value to an existing `uint64` value. + +```Go +func uint64ToBytes(i uint64) []byte { + var buf [8]byte + binary.BigEndian.PutUint64(buf[:], i) + return buf[:] +} + +func bytesToUint64(b []byte) uint64 { + return binary.BigEndian.Uint64(b) +} + +// Merge function to add two uint64 numbers +func add(existing, new []byte) []byte { + return uint64ToBytes(bytesToUint64(existing) + bytesToUint64(new)) +} +``` + +This function can then be passed to the `DB.GetMergeOperator()` method, along +with a key, and a duration value. The duration specifies how often the merge +function is run on values that have been added using the `MergeOperator.Add()` +method. + +`MergeOperator.Get()` method can be used to retrieve the cumulative value of the key +associated with the merge operation. + +```Go +key := []byte("merge") +m := db.GetMergeOperator(key, add, 200*time.Millisecond) +defer m.Stop() + +m.Add(uint64ToBytes(1)) +m.Add(uint64ToBytes(2)) +m.Add(uint64ToBytes(3)) + +res, err := m.Get() // res should have value 6 encoded +fmt.Println(bytesToUint64(res)) +``` + +### Setting Time To Live(TTL) and User Metadata on Keys +Badger allows setting an optional Time to Live (TTL) value on keys. Once the TTL has +elapsed, the key will no longer be retrievable and will be eligible for garbage +collection. A TTL can be set as a `time.Duration` value using the `Txn.SetWithTTL()` +API method. + +An optional user metadata value can be set on each key. A user metadata value +is represented by a single byte. It can be used to set certain bits along +with the key to aid in interpreting or decoding the key-value pair. User +metadata can be set using the `Txn.SetWithMeta()` API method. + +`Txn.SetEntry()` can be used to set the key, value, user metatadata and TTL, +all at once. + +### Iterating over keys +To iterate over keys, we can use an `Iterator`, which can be obtained using the +`Txn.NewIterator()` method. Iteration happens in byte-wise lexicographical sorting +order. + + +```go +err := db.View(func(txn *badger.Txn) error { + opts := badger.DefaultIteratorOptions + opts.PrefetchSize = 10 + it := txn.NewIterator(opts) + defer it.Close() + for it.Rewind(); it.Valid(); it.Next() { + item := it.Item() + k := item.Key() + err := item.Value(func(v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + if err != nil { + return err + } + } + return nil +}) +``` + +The iterator allows you to move to a specific point in the list of keys and move +forward or backward through the keys one at a time. + +By default, Badger prefetches the values of the next 100 items. You can adjust +that with the `IteratorOptions.PrefetchSize` field. However, setting it to +a value higher than GOMAXPROCS (which we recommend to be 128 or higher) +shouldn’t give any additional benefits. You can also turn off the fetching of +values altogether. See section below on key-only iteration. + +#### Prefix scans +To iterate over a key prefix, you can combine `Seek()` and `ValidForPrefix()`: + +```go +db.View(func(txn *badger.Txn) error { + it := txn.NewIterator(badger.DefaultIteratorOptions) + defer it.Close() + prefix := []byte("1234") + for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { + item := it.Item() + k := item.Key() + err := item.Value(func(v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + if err != nil { + return err + } + } + return nil +}) +``` + +#### Key-only iteration +Badger supports a unique mode of iteration called _key-only_ iteration. It is +several order of magnitudes faster than regular iteration, because it involves +access to the LSM-tree only, which is usually resident entirely in RAM. To +enable key-only iteration, you need to set the `IteratorOptions.PrefetchValues` +field to `false`. This can also be used to do sparse reads for selected keys +during an iteration, by calling `item.Value()` only when required. + +```go +err := db.View(func(txn *badger.Txn) error { + opts := badger.DefaultIteratorOptions + opts.PrefetchValues = false + it := txn.NewIterator(opts) + defer it.Close() + for it.Rewind(); it.Valid(); it.Next() { + item := it.Item() + k := item.Key() + fmt.Printf("key=%s\n", k) + } + return nil +}) +``` + +### Stream +Badger provides a Stream framework, which concurrently iterates over all or a +portion of the DB, converting data into custom key-values, and streams it out +serially to be sent over network, written to disk, or even written back to +Badger. This is a lot faster way to iterate over Badger than using a single +Iterator. Stream supports Badger in both managed and normal mode. + +Stream uses the natural boundaries created by SSTables within the LSM tree, to +quickly generate key ranges. Each goroutine then picks a range and runs an +iterator to iterate over it. Each iterator iterates over all versions of values +and is created from the same transaction, thus working over a snapshot of the +DB. Every time a new key is encountered, it calls `ChooseKey(item)`, followed +by `KeyToList(key, itr)`. This allows a user to select or reject that key, and +if selected, convert the value versions into custom key-values. The goroutine +batches up 4MB worth of key-values, before sending it over to a channel. +Another goroutine further batches up data from this channel using *smart +batching* algorithm and calls `Send` serially. + +This framework is designed for high throughput key-value iteration, spreading +the work of iteration across many goroutines. `DB.Backup` uses this framework to +provide full and incremental backups quickly. Dgraph is a heavy user of this +framework. In fact, this framework was developed and used within Dgraph, before +getting ported over to Badger. + +```go +stream := db.NewStream() +// db.NewStreamAt(readTs) for managed mode. + +// -- Optional settings +stream.NumGo = 16 // Set number of goroutines to use for iteration. +stream.Prefix = []byte("some-prefix") // Leave nil for iteration over the whole DB. +stream.LogPrefix = "Badger.Streaming" // For identifying stream logs. Outputs to Logger. + +// ChooseKey is called concurrently for every key. If left nil, assumes true by default. +stream.ChooseKey = func(item *badger.Item) bool { + return bytes.HasSuffix(item.Key(), []byte("er")) +} + +// KeyToList is called concurrently for chosen keys. This can be used to convert +// Badger data into custom key-values. If nil, uses stream.ToList, a default +// implementation, which picks all valid key-values. +stream.KeyToList = nil + +// -- End of optional settings. + +// Send is called serially, while Stream.Orchestrate is running. +stream.Send = func(list *pb.KVList) error { + return proto.MarshalText(w, list) // Write to w. +} + +// Run the stream +if err := stream.Orchestrate(context.Background()); err != nil { + return err +} +// Done. +``` + +### Garbage Collection +Badger values need to be garbage collected, because of two reasons: + +* Badger keeps values separately from the LSM tree. This means that the compaction operations +that clean up the LSM tree do not touch the values at all. Values need to be cleaned up +separately. + +* Concurrent read/write transactions could leave behind multiple values for a single key, because they +are stored with different versions. These could accumulate, and take up unneeded space beyond the +time these older versions are needed. + +Badger relies on the client to perform garbage collection at a time of their choosing. It provides +the following method, which can be invoked at an appropriate time: + +* `DB.RunValueLogGC()`: This method is designed to do garbage collection while + Badger is online. Along with randomly picking a file, it uses statistics generated by the + LSM-tree compactions to pick files that are likely to lead to maximum space + reclamation. It is recommended to be called during periods of low activity in + your system, or periodically. One call would only result in removal of at max + one log file. As an optimization, you could also immediately re-run it whenever + it returns nil error (indicating a successful value log GC), as shown below. + + ```go + ticker := time.NewTicker(5 * time.Minute) + defer ticker.Stop() + for range ticker.C { + again: + err := db.RunValueLogGC(0.7) + if err == nil { + goto again + } + } + ``` + +* `DB.PurgeOlderVersions()`: This method is **DEPRECATED** since v1.5.0. Now, Badger's LSM tree automatically discards older/invalid versions of keys. + +**Note: The RunValueLogGC method would not garbage collect the latest value log.** + +### Database backup +There are two public API methods `DB.Backup()` and `DB.Load()` which can be +used to do online backups and restores. Badger v0.9 provides a CLI tool +`badger`, which can do offline backup/restore. Make sure you have `$GOPATH/bin` +in your PATH to use this tool. + +The command below will create a version-agnostic backup of the database, to a +file `badger.bak` in the current working directory + +``` +badger backup --dir +``` + +To restore `badger.bak` in the current working directory to a new database: + +``` +badger restore --dir +``` + +See `badger --help` for more details. + +If you have a Badger database that was created using v0.8 (or below), you can +use the `badger_backup` tool provided in v0.8.1, and then restore it using the +command above to upgrade your database to work with the latest version. + +``` +badger_backup --dir --backup-file badger.bak +``` + +We recommend all users to use the `Backup` and `Restore` APIs and tools. However, +Badger is also rsync-friendly because all files are immutable, barring the +latest value log which is append-only. So, rsync can be used as rudimentary way +to perform a backup. In the following script, we repeat rsync to ensure that the +LSM tree remains consistent with the MANIFEST file while doing a full backup. + +``` +#!/bin/bash +set -o history +set -o histexpand +# Makes a complete copy of a Badger database directory. +# Repeat rsync if the MANIFEST and SSTables are updated. +rsync -avz --delete db/ dst +while !! | grep -q "(MANIFEST\|\.sst)$"; do :; done +``` + +### Memory usage +Badger's memory usage can be managed by tweaking several options available in +the `Options` struct that is passed in when opening the database using +`DB.Open`. + +- `Options.ValueLogLoadingMode` can be set to `options.FileIO` (instead of the + default `options.MemoryMap`) to avoid memory-mapping log files. This can be + useful in environments with low RAM. +- Number of memtables (`Options.NumMemtables`) + - If you modify `Options.NumMemtables`, also adjust `Options.NumLevelZeroTables` and + `Options.NumLevelZeroTablesStall` accordingly. +- Number of concurrent compactions (`Options.NumCompactors`) +- Mode in which LSM tree is loaded (`Options.TableLoadingMode`) +- Size of table (`Options.MaxTableSize`) +- Size of value log file (`Options.ValueLogFileSize`) + +If you want to decrease the memory usage of Badger instance, tweak these +options (ideally one at a time) until you achieve the desired +memory usage. + +### Statistics +Badger records metrics using the [expvar] package, which is included in the Go +standard library. All the metrics are documented in [y/metrics.go][metrics] +file. + +`expvar` package adds a handler in to the default HTTP server (which has to be +started explicitly), and serves up the metrics at the `/debug/vars` endpoint. +These metrics can then be collected by a system like [Prometheus], to get +better visibility into what Badger is doing. + +[expvar]: https://golang.org/pkg/expvar/ +[metrics]: https://github.com/dgraph-io/badger/blob/master/y/metrics.go +[Prometheus]: https://prometheus.io/ + +## Resources + +### Blog Posts +1. [Introducing Badger: A fast key-value store written natively in +Go](https://open.dgraph.io/post/badger/) +2. [Make Badger crash resilient with ALICE](https://blog.dgraph.io/post/alice/) +3. [Badger vs LMDB vs BoltDB: Benchmarking key-value databases in Go](https://blog.dgraph.io/post/badger-lmdb-boltdb/) +4. [Concurrent ACID Transactions in Badger](https://blog.dgraph.io/post/badger-txn/) + +## Design +Badger was written with these design goals in mind: + +- Write a key-value database in pure Go. +- Use latest research to build the fastest KV database for data sets spanning terabytes. +- Optimize for SSDs. + +Badger’s design is based on a paper titled _[WiscKey: Separating Keys from +Values in SSD-conscious Storage][wisckey]_. + +[wisckey]: https://www.usenix.org/system/files/conference/fast16/fast16-papers-lu.pdf + +### Comparisons +| Feature | Badger | RocksDB | BoltDB | +| ------- | ------ | ------- | ------ | +| Design | LSM tree with value log | LSM tree only | B+ tree | +| High Read throughput | Yes | No | Yes | +| High Write throughput | Yes | Yes | No | +| Designed for SSDs | Yes (with latest research 1) | Not specifically 2 | No | +| Embeddable | Yes | Yes | Yes | +| Sorted KV access | Yes | Yes | Yes | +| Pure Go (no Cgo) | Yes | No | Yes | +| Transactions | Yes, ACID, concurrent with SSI3 | Yes (but non-ACID) | Yes, ACID | +| Snapshots | Yes | Yes | Yes | +| TTL support | Yes | Yes | No | +| 3D access (key-value-version) | Yes4 | No | No | + +1 The [WISCKEY paper][wisckey] (on which Badger is based) saw big +wins with separating values from keys, significantly reducing the write +amplification compared to a typical LSM tree. + +2 RocksDB is an SSD optimized version of LevelDB, which was designed specifically for rotating disks. +As such RocksDB's design isn't aimed at SSDs. + +3 SSI: Serializable Snapshot Isolation. For more details, see the blog post [Concurrent ACID Transactions in Badger](https://blog.dgraph.io/post/badger-txn/) + +4 Badger provides direct access to value versions via its Iterator API. +Users can also specify how many versions to keep per key via Options. + +### Benchmarks +We have run comprehensive benchmarks against RocksDB, Bolt and LMDB. The +benchmarking code, and the detailed logs for the benchmarks can be found in the +[badger-bench] repo. More explanation, including graphs can be found the blog posts (linked +above). + +[badger-bench]: https://github.com/dgraph-io/badger-bench + +## Other Projects Using Badger +Below is a list of known projects that use Badger: + +* [0-stor](https://github.com/zero-os/0-stor) - Single device object store. +* [Dgraph](https://github.com/dgraph-io/dgraph) - Distributed graph database. +* [Dispatch Protocol](https://github.com/dispatchlabs/disgo) - Blockchain protocol for distributed application data analytics. +* [Sandglass](https://github.com/celrenheit/sandglass) - distributed, horizontally scalable, persistent, time sorted message queue. +* [Usenet Express](https://usenetexpress.com/) - Serving over 300TB of data with Badger. +* [go-ipfs](https://github.com/ipfs/go-ipfs) - Go client for the InterPlanetary File System (IPFS), a new hypermedia distribution protocol. +* [gorush](https://github.com/appleboy/gorush) - A push notification server written in Go. +* [emitter](https://github.com/emitter-io/emitter) - Scalable, low latency, distributed pub/sub broker with message storage, uses MQTT, gossip and badger. +* [GarageMQ](https://github.com/valinurovam/garagemq) - AMQP server written in Go. +* [RedixDB](https://alash3al.github.io/redix/) - A real-time persistent key-value store with the same redis protocol. +* [BBVA](https://github.com/BBVA/raft-badger) - Raft backend implementation using BadgerDB for Hashicorp raft. +* [Riot](https://github.com/go-ego/riot) - An open-source, distributed search engine. +* [Fantom](https://github.com/Fantom-foundation/go-lachesis) - aBFT Consensus platform for distributed applications. +* [decred](https://github.com/decred/dcrdata) - An open, progressive, and self-funding cryptocurrency with a system of community-based governance integrated into its blockchain. +* [OpenNetSys](https://github.com/opennetsys/c3-go) - Create useful dApps in any software language. +* [HoneyTrap](https://github.com/honeytrap/honeytrap) - An extensible and opensource system for running, monitoring and managing honeypots. +* [Insolar](https://github.com/insolar/insolar) - Enterprise-ready blockchain platform. +* [IoTeX](https://github.com/iotexproject/iotex-core) - The next generation of the decentralized network for IoT powered by scalability- and privacy-centric blockchains. +* [go-sessions](https://github.com/kataras/go-sessions) - The sessions manager for Go net/http and fasthttp. +* [Babble](https://github.com/mosaicnetworks/babble) - BFT Consensus platform for distributed applications. +* [Tormenta](https://github.com/jpincas/tormenta) - Embedded object-persistence layer / simple JSON database for Go projects. +* [BadgerHold](https://github.com/timshannon/badgerhold) - An embeddable NoSQL store for querying Go types built on Badger + +If you are using Badger in a project please send a pull request to add it to the list. + +## Frequently Asked Questions +- **My writes are getting stuck. Why?** + +**Update: With the new `Value(func(v []byte))` API, this deadlock can no longer +happen.** + +The following is true for users on Badger v1.x. + +This can happen if a long running iteration with `Prefetch` is set to false, but +a `Item::Value` call is made internally in the loop. That causes Badger to +acquire read locks over the value log files to avoid value log GC removing the +file from underneath. As a side effect, this also blocks a new value log GC +file from being created, when the value log file boundary is hit. + +Please see Github issues [#293](https://github.com/dgraph-io/badger/issues/293) +and [#315](https://github.com/dgraph-io/badger/issues/315). + +There are multiple workarounds during iteration: + +1. Use `Item::ValueCopy` instead of `Item::Value` when retrieving value. +1. Set `Prefetch` to true. Badger would then copy over the value and release the + file lock immediately. +1. When `Prefetch` is false, don't call `Item::Value` and do a pure key-only + iteration. This might be useful if you just want to delete a lot of keys. +1. Do the writes in a separate transaction after the reads. + +- **My writes are really slow. Why?** + +Are you creating a new transaction for every single key update, and waiting for +it to `Commit` fully before creating a new one? This will lead to very low +throughput. + +We have created `WriteBatch` API which provides a way to batch up +many updates into a single transaction and `Commit` that transaction using +callbacks to avoid blocking. This amortizes the cost of a transaction really +well, and provides the most efficient way to do bulk writes. + +```go +wb := db.NewWriteBatch() +defer wb.Cancel() + +for i := 0; i < N; i++ { + err := wb.Set(key(i), value(i), 0) // Will create txns as needed. + handle(err) +} +handle(wb.Flush()) // Wait for all txns to finish. +``` + +Note that `WriteBatch` API does not allow any reads. For read-modify-write +workloads, you should be using the `Transaction` API. + +- **I don't see any disk write. Why?** + +If you're using Badger with `SyncWrites=false`, then your writes might not be written to value log +and won't get synced to disk immediately. Writes to LSM tree are done inmemory first, before they +get compacted to disk. The compaction would only happen once `MaxTableSize` has been reached. So, if +you're doing a few writes and then checking, you might not see anything on disk. Once you `Close` +the database, you'll see these writes on disk. + +- **Reverse iteration doesn't give me the right results.** + +Just like forward iteration goes to the first key which is equal or greater than the SEEK key, reverse iteration goes to the first key which is equal or lesser than the SEEK key. Therefore, SEEK key would not be part of the results. You can typically add a `0xff` byte as a suffix to the SEEK key to include it in the results. See the following issues: [#436](https://github.com/dgraph-io/badger/issues/436) and [#347](https://github.com/dgraph-io/badger/issues/347). + +- **Which instances should I use for Badger?** + +We recommend using instances which provide local SSD storage, without any limit +on the maximum IOPS. In AWS, these are storage optimized instances like i3. They +provide local SSDs which clock 100K IOPS over 4KB blocks easily. + +- **I'm getting a closed channel error. Why?** + +``` +panic: close of closed channel +panic: send on closed channel +``` + +If you're seeing panics like above, this would be because you're operating on a closed DB. This can happen, if you call `Close()` before sending a write, or multiple times. You should ensure that you only call `Close()` once, and all your read/write operations finish before closing. + +- **Are there any Go specific settings that I should use?** + +We *highly* recommend setting a high number for GOMAXPROCS, which allows Go to +observe the full IOPS throughput provided by modern SSDs. In Dgraph, we have set +it to 128. For more details, [see this +thread](https://groups.google.com/d/topic/golang-nuts/jPb_h3TvlKE/discussion). + +- **Are there any linux specific settings that I should use?** + +We recommend setting max file descriptors to a high number depending upon the expected size of you data. + +## Contact +- Please use [discuss.dgraph.io](https://discuss.dgraph.io) for questions, feature requests and discussions. +- Please use [Github issue tracker](https://github.com/dgraph-io/badger/issues) for filing bugs or feature requests. +- Join [![Slack Status](http://slack.dgraph.io/badge.svg)](http://slack.dgraph.io). +- Follow us on Twitter [@dgraphlabs](https://twitter.com/dgraphlabs). + diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/appveyor.yml b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/appveyor.yml similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/appveyor.yml rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/appveyor.yml diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/backup.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/backup.go new file mode 100644 index 0000000000..170d4c3706 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/backup.go @@ -0,0 +1,226 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "bufio" + "bytes" + "context" + "encoding/binary" + "io" + "sync" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" +) + +// Backup is a wrapper function over Stream.Backup to generate full and incremental backups of the +// DB. For more control over how many goroutines are used to generate the backup, or if you wish to +// backup only a certain range of keys, use Stream.Backup directly. +func (db *DB) Backup(w io.Writer, since uint64) (uint64, error) { + stream := db.NewStream() + stream.LogPrefix = "DB.Backup" + return stream.Backup(w, since) +} + +// Backup dumps a protobuf-encoded list of all entries in the database into the +// given writer, that are newer than the specified version. It returns a +// timestamp indicating when the entries were dumped which can be passed into a +// later invocation to generate an incremental dump, of entries that have been +// added/modified since the last invocation of Stream.Backup(). +// +// This can be used to backup the data in a database at a given point in time. +func (stream *Stream) Backup(w io.Writer, since uint64) (uint64, error) { + stream.KeyToList = func(key []byte, itr *Iterator) (*pb.KVList, error) { + list := &pb.KVList{} + for ; itr.Valid(); itr.Next() { + item := itr.Item() + if !bytes.Equal(item.Key(), key) { + return list, nil + } + if item.Version() < since { + // Ignore versions less than given timestamp, or skip older + // versions of the given key. + return list, nil + } + + var valCopy []byte + if !item.IsDeletedOrExpired() { + // No need to copy value, if item is deleted or expired. + var err error + valCopy, err = item.ValueCopy(nil) + if err != nil { + stream.db.opt.Errorf("Key [%x, %d]. Error while fetching value [%v]\n", + item.Key(), item.Version(), err) + return nil, err + } + } + + // clear txn bits + meta := item.meta &^ (bitTxn | bitFinTxn) + kv := &pb.KV{ + Key: item.KeyCopy(nil), + Value: valCopy, + UserMeta: []byte{item.UserMeta()}, + Version: item.Version(), + ExpiresAt: item.ExpiresAt(), + Meta: []byte{meta}, + } + list.Kv = append(list.Kv, kv) + + switch { + case item.DiscardEarlierVersions(): + // If we need to discard earlier versions of this item, add a delete + // marker just below the current version. + list.Kv = append(list.Kv, &pb.KV{ + Key: item.KeyCopy(nil), + Version: item.Version() - 1, + Meta: []byte{bitDelete}, + }) + return list, nil + + case item.IsDeletedOrExpired(): + return list, nil + } + } + return list, nil + } + + var maxVersion uint64 + stream.Send = func(list *pb.KVList) error { + for _, kv := range list.Kv { + if maxVersion < kv.Version { + maxVersion = kv.Version + } + if err := writeTo(kv, w); err != nil { + return err + } + } + return nil + } + + if err := stream.Orchestrate(context.Background()); err != nil { + return 0, err + } + return maxVersion, nil +} + +func writeTo(entry *pb.KV, w io.Writer) error { + if err := binary.Write(w, binary.LittleEndian, uint64(entry.Size())); err != nil { + return err + } + buf, err := entry.Marshal() + if err != nil { + return err + } + _, err = w.Write(buf) + return err +} + +// Load reads a protobuf-encoded list of all entries from a reader and writes +// them to the database. This can be used to restore the database from a backup +// made by calling DB.Backup(). +// +// DB.Load() should be called on a database that is not running any other +// concurrent transactions while it is running. +func (db *DB) Load(r io.Reader) error { + br := bufio.NewReaderSize(r, 16<<10) + unmarshalBuf := make([]byte, 1<<10) + var entries []*Entry + var wg sync.WaitGroup + errChan := make(chan error, 1) + + // func to check for pending error before sending off a batch for writing + batchSetAsyncIfNoErr := func(entries []*Entry) error { + select { + case err := <-errChan: + return err + default: + wg.Add(1) + return db.batchSetAsync(entries, func(err error) { + defer wg.Done() + if err != nil { + select { + case errChan <- err: + default: + } + } + }) + } + } + + for { + var sz uint64 + err := binary.Read(br, binary.LittleEndian, &sz) + if err == io.EOF { + break + } else if err != nil { + return err + } + + if cap(unmarshalBuf) < int(sz) { + unmarshalBuf = make([]byte, sz) + } + + e := &pb.KV{} + if _, err = io.ReadFull(br, unmarshalBuf[:sz]); err != nil { + return err + } + if err = e.Unmarshal(unmarshalBuf[:sz]); err != nil { + return err + } + var userMeta byte + if len(e.UserMeta) > 0 { + userMeta = e.UserMeta[0] + } + entries = append(entries, &Entry{ + Key: y.KeyWithTs(e.Key, e.Version), + Value: e.Value, + UserMeta: userMeta, + ExpiresAt: e.ExpiresAt, + meta: e.Meta[0], + }) + // Update nextTxnTs, memtable stores this timestamp in badger head + // when flushed. + if e.Version >= db.orc.nextTxnTs { + db.orc.nextTxnTs = e.Version + 1 + } + + if len(entries) == 1000 { + if err := batchSetAsyncIfNoErr(entries); err != nil { + return err + } + entries = make([]*Entry, 0, 1000) + } + } + + if len(entries) > 0 { + if err := batchSetAsyncIfNoErr(entries); err != nil { + return err + } + } + wg.Wait() + + select { + case err := <-errChan: + return err + default: + // Mark all versions done up until nextTxnTs. + db.orc.txnMark.Done(db.orc.nextTxnTs - 1) + return nil + } +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/batch.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/batch.go new file mode 100644 index 0000000000..2c26d4b073 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/batch.go @@ -0,0 +1,153 @@ +/* + * Copyright 2018 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "sync" + "time" +) + +// WriteBatch holds the necessary info to perform batched writes. +type WriteBatch struct { + sync.Mutex + txn *Txn + db *DB + wg sync.WaitGroup + err error +} + +// NewWriteBatch creates a new WriteBatch. This provides a way to conveniently do a lot of writes, +// batching them up as tightly as possible in a single transaction and using callbacks to avoid +// waiting for them to commit, thus achieving good performance. This API hides away the logic of +// creating and committing transactions. Due to the nature of SSI guaratees provided by Badger, +// blind writes can never encounter transaction conflicts (ErrConflict). +func (db *DB) NewWriteBatch() *WriteBatch { + return &WriteBatch{db: db, txn: db.newTransaction(true, true)} +} + +// Cancel function must be called if there's a chance that Flush might not get +// called. If neither Flush or Cancel is called, the transaction oracle would +// never get a chance to clear out the row commit timestamp map, thus causing an +// unbounded memory consumption. Typically, you can call Cancel as a defer +// statement right after NewWriteBatch is called. +// +// Note that any committed writes would still go through despite calling Cancel. +func (wb *WriteBatch) Cancel() { + wb.wg.Wait() + wb.txn.Discard() +} + +func (wb *WriteBatch) callback(err error) { + // sync.WaitGroup is thread-safe, so it doesn't need to be run inside wb.Lock. + defer wb.wg.Done() + if err == nil { + return + } + + wb.Lock() + defer wb.Unlock() + if wb.err != nil { + return + } + wb.err = err +} + +// SetEntry is the equivalent of Txn.SetEntry. +func (wb *WriteBatch) SetEntry(e *Entry) error { + wb.Lock() + defer wb.Unlock() + + if err := wb.txn.SetEntry(e); err != ErrTxnTooBig { + return err + } + // Txn has reached it's zenith. Commit now. + if cerr := wb.commit(); cerr != nil { + return cerr + } + // This time the error must not be ErrTxnTooBig, otherwise, we make the + // error permanent. + if err := wb.txn.SetEntry(e); err != nil { + wb.err = err + return err + } + return nil +} + +// Set is equivalent of Txn.SetWithMeta. +func (wb *WriteBatch) Set(k, v []byte, meta byte) error { + e := &Entry{Key: k, Value: v, UserMeta: meta} + return wb.SetEntry(e) +} + +// SetWithTTL is equivalent of Txn.SetWithTTL. +func (wb *WriteBatch) SetWithTTL(key, val []byte, dur time.Duration) error { + expire := time.Now().Add(dur).Unix() + e := &Entry{Key: key, Value: val, ExpiresAt: uint64(expire)} + return wb.SetEntry(e) +} + +// Delete is equivalent of Txn.Delete. +func (wb *WriteBatch) Delete(k []byte) error { + wb.Lock() + defer wb.Unlock() + + if err := wb.txn.Delete(k); err != ErrTxnTooBig { + return err + } + if err := wb.commit(); err != nil { + return err + } + if err := wb.txn.Delete(k); err != nil { + wb.err = err + return err + } + return nil +} + +// Caller to commit must hold a write lock. +func (wb *WriteBatch) commit() error { + if wb.err != nil { + return wb.err + } + // Get a new txn before we commit this one. So, the new txn doesn't need + // to wait for this one to commit. + wb.wg.Add(1) + wb.txn.CommitWith(wb.callback) + wb.txn = wb.db.newTransaction(true, true) + wb.txn.readTs = 0 // We're not reading anything. + return wb.err +} + +// Flush must be called at the end to ensure that any pending writes get committed to Badger. Flush +// returns any error stored by WriteBatch. +func (wb *WriteBatch) Flush() error { + wb.Lock() + _ = wb.commit() + wb.txn.Discard() + wb.Unlock() + + wb.wg.Wait() + // Safe to access error without any synchronization here. + return wb.err +} + +// Error returns any errors encountered so far. No commits would be run once an error is detected. +func (wb *WriteBatch) Error() error { + wb.Lock() + defer wb.Unlock() + return wb.err +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/compaction.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/compaction.go similarity index 93% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/compaction.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/compaction.go index daed9b985c..7fd1b1741e 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/compaction.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/compaction.go @@ -25,8 +25,8 @@ import ( "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" ) type keyRange struct { @@ -172,16 +172,12 @@ func (cs *compactStatus) compareAndAdd(_ thisAndNextLevelRLocked, cd compactDef) } // Check whether this level really needs compaction or not. Otherwise, we'll end up // running parallel compactions for the same level. - // NOTE: We can directly call thisLevel.totalSize, because we already have acquire a read lock - // over this and the next level. - if cd.thisLevel.totalSize-thisLevel.delSize < cd.thisLevel.maxTotalSize { - return false - } + // Update: We should not be checking size here. Compaction priority already did the size checks. + // Here we should just be executing the wish of others. thisLevel.ranges = append(thisLevel.ranges, cd.thisRange) nextLevel.ranges = append(nextLevel.ranges, cd.nextRange) thisLevel.delSize += cd.thisSize - return true } diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/db.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/db.go similarity index 80% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/db.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/db.go index c17bd3eb76..8c374bdc39 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/db.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/db.go @@ -20,23 +20,22 @@ import ( "bytes" "encoding/binary" "expvar" - "log" "math" "os" "path/filepath" + "sort" "strconv" "sync" "sync/atomic" "time" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options" - + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace" - + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" ) var ( @@ -71,7 +70,7 @@ type DB struct { manifest *manifestFile lc *levelsController vlog valueLog - vptr valuePointer // less than or equal to a pointer to the last vlog value put into mt + vhead valuePointer // less than or equal to a pointer to the last vlog value put into mt writeCh chan *request flushChan chan flushTask // For flushing memtables. @@ -84,7 +83,7 @@ const ( kvWriteChCapacity = 1000 ) -func replayFunction(out *DB) func(Entry, valuePointer) error { +func (db *DB) replayFunction() func(Entry, valuePointer) error { type txnEntry struct { nk []byte v y.ValueStruct @@ -94,29 +93,29 @@ func replayFunction(out *DB) func(Entry, valuePointer) error { var lastCommit uint64 toLSM := func(nk []byte, vs y.ValueStruct) { - for err := out.ensureRoomForWrite(); err != nil; err = out.ensureRoomForWrite() { - out.elog.Printf("Replay: Making room for writes") + for err := db.ensureRoomForWrite(); err != nil; err = db.ensureRoomForWrite() { + db.elog.Printf("Replay: Making room for writes") time.Sleep(10 * time.Millisecond) } - out.mt.Put(nk, vs) + db.mt.Put(nk, vs) } first := true return func(e Entry, vp valuePointer) error { // Function for replaying. if first { - out.elog.Printf("First key=%q\n", e.Key) + db.elog.Printf("First key=%q\n", e.Key) } first = false - if out.orc.nextTxnTs < y.ParseTs(e.Key) { - out.orc.nextTxnTs = y.ParseTs(e.Key) + if db.orc.nextTxnTs < y.ParseTs(e.Key) { + db.orc.nextTxnTs = y.ParseTs(e.Key) } nk := make([]byte, len(e.Key)) copy(nk, e.Key) var nv []byte meta := e.meta - if out.shouldWriteValueToLSM(e) { + if db.shouldWriteValueToLSM(e) { nv = make([]byte, len(e.Value)) copy(nv, e.Value) } else { @@ -145,22 +144,27 @@ func replayFunction(out *DB) func(Entry, valuePointer) error { txn = txn[:0] lastCommit = 0 - } else if e.meta&bitTxn == 0 { - // This entry is from a rewrite. - toLSM(nk, v) - - // We shouldn't get this entry in the middle of a transaction. - y.AssertTrue(lastCommit == 0) - y.AssertTrue(len(txn) == 0) - - } else { + } else if e.meta&bitTxn > 0 { txnTs := y.ParseTs(nk) if lastCommit == 0 { lastCommit = txnTs } - y.AssertTrue(lastCommit == txnTs) + if lastCommit != txnTs { + db.opt.Warningf("Found an incomplete txn at timestamp %d. Discarding it.\n", + lastCommit) + txn = txn[:0] + lastCommit = txnTs + } te := txnEntry{nk: nk, v: v} txn = append(txn, te) + + } else { + // This entry is from a rewrite. + toLSM(nk, v) + + // We shouldn't get this entry in the middle of a transaction. + y.AssertTrue(lastCommit == 0) + y.AssertTrue(len(txn) == 0) } return nil } @@ -219,12 +223,12 @@ func Open(opt Options) (db *DB, err error) { if err != nil { return nil, err } + defer func() { + if valueDirLockGuard != nil { + _ = valueDirLockGuard.release() + } + }() } - defer func() { - if valueDirLockGuard != nil { - _ = valueDirLockGuard.release() - } - }() if !(opt.ValueLogFileSize <= 2<<30 && opt.ValueLogFileSize >= 1<<20) { return nil, ErrValueLogSize } @@ -273,10 +277,6 @@ func Open(opt Options) (db *DB, err error) { go db.flushMemtable(db.closers.memtable) // Need levels controller to be up. } - if err = db.vlog.Open(db, opt); err != nil { - return nil, err - } - headKey := y.KeyWithTs(head, math.MaxUint64) // Need to pass with timestamp, lsm get removes the last 8 bytes and compares key vs, err := db.get(headKey) @@ -292,10 +292,9 @@ func Open(opt Options) (db *DB, err error) { replayCloser := y.NewCloser(1) go db.doWrites(replayCloser) - if err = db.vlog.Replay(vptr, replayFunction(db)); err != nil { + if err = db.vlog.open(db, vptr, db.replayFunction()); err != nil { return db, err } - replayCloser.SignalAndWait() // Wait for replay to be applied first. // Let's advance nextTxnTs to one more than whatever we observed via @@ -303,12 +302,6 @@ func Open(opt Options) (db *DB, err error) { db.orc.txnMark.Done(db.orc.nextTxnTs) db.orc.nextTxnTs++ - // Mmap writable log - lf := db.vlog.filesMap[db.vlog.maxFid] - if err = lf.mmap(2 * db.vlog.opt.ValueLogFileSize); err != nil { - return db, errors.Wrapf(err, "Unable to mmap RDWR log file") - } - db.writeCh = make(chan *request, kvWriteChCapacity) db.closers.writes = y.NewCloser(1) go db.doWrites(db.closers.writes) @@ -327,6 +320,8 @@ func Open(opt Options) (db *DB, err error) { // cause panic. func (db *DB) Close() (err error) { db.elog.Printf("Closing database") + atomic.StoreInt32(&db.blockWrites, 1) + // Stop value GC first. db.closers.valueGC.SignalAndWait() @@ -351,7 +346,7 @@ func (db *DB) Close() (err error) { defer db.Unlock() y.AssertTrue(db.mt != nil) select { - case db.flushChan <- flushTask{db.mt, db.vptr}: + case db.flushChan <- flushTask{db.mt, db.vhead}: db.imm = append(db.imm, db.mt) // Flusher will attempt to remove this from s.imm. db.mt = nil // Will segfault if we try writing! db.elog.Printf("pushed to flush chan\n") @@ -369,32 +364,16 @@ func (db *DB) Close() (err error) { time.Sleep(10 * time.Millisecond) } } - db.flushChan <- flushTask{nil, valuePointer{}} // Tell flusher to quit. - - if db.closers.memtable != nil { - db.closers.memtable.Wait() - db.elog.Printf("Memtable flushed") - } - if db.closers.compactors != nil { - db.closers.compactors.SignalAndWait() - db.elog.Printf("Compaction finished") - } + db.stopCompactions() // Force Compact L0 // We don't need to care about cstatus since no parallel compaction is running. - cd := compactDef{ - elog: trace.New("Badger", "Compact"), - thisLevel: db.lc.levels[0], - nextLevel: db.lc.levels[1], - } - cd.elog.SetMaxEvents(100) - defer cd.elog.Finish() - if db.lc.fillTablesL0(&cd) { - if err := db.lc.runCompactDef(0, cd); err != nil { - cd.elog.LazyPrintf("\tLOG Compact FAILED with error: %+v: %+v", err, cd) + if db.opt.CompactL0OnClose { + if err := db.lc.doCompact(compactionPriority{level: 0, score: 1.73}); err != nil { + db.opt.Warningf("While forcing compaction on level 0: %v", err) + } else { + db.opt.Infof("Force compaction on level 0 done") } - } else { - cd.elog.LazyPrintf("fillTables failed for level zero. No compaction required") } if lcErr := db.lc.close(); err == nil { @@ -402,6 +381,7 @@ func (db *DB) Close() (err error) { } db.elog.Printf("Waiting for closer") db.closers.updateSize.SignalAndWait() + db.orc.Stop() db.elog.Finish() @@ -525,7 +505,7 @@ func (db *DB) get(key []byte) (y.ValueStruct, error) { return db.lc.get(key, maxVs) } -func (db *DB) updateOffset(ptrs []valuePointer) { +func (db *DB) updateHead(ptrs []valuePointer) { var ptr valuePointer for i := len(ptrs) - 1; i >= 0; i-- { p := ptrs[i] @@ -540,8 +520,8 @@ func (db *DB) updateOffset(ptrs []valuePointer) { db.Lock() defer db.Unlock() - y.AssertTrue(!ptr.Less(db.vptr)) - db.vptr = ptr + y.AssertTrue(!ptr.Less(db.vhead)) + db.vhead = ptr } var requestPool = sync.Pool{ @@ -597,7 +577,6 @@ func (db *DB) writeRequests(reqs []*request) error { r.Wg.Done() } } - db.elog.Printf("writeRequests called. Writing to value log") err := db.vlog.write(reqs) @@ -632,7 +611,7 @@ func (db *DB) writeRequests(reqs []*request) error { done(err) return errors.Wrap(err, "writeRequests") } - db.updateOffset(b.Ptrs) + db.updateHead(b.Ptrs) } done(nil) db.elog.Printf("%d entries written", count) @@ -670,7 +649,7 @@ func (db *DB) doWrites(lc *y.Closer) { writeRequests := func(reqs []*request) { if err := db.writeRequests(reqs); err != nil { - log.Printf("ERROR in Badger::writeRequests: %v", err) + db.opt.Errorf("writeRequests: %v", err) } <-pendingCh } @@ -768,7 +747,7 @@ func (db *DB) ensureRoomForWrite() error { y.AssertTrue(db.mt != nil) // A nil mt indicates that DB is being closed. select { - case db.flushChan <- flushTask{db.mt, db.vptr}: + case db.flushChan <- flushTask{db.mt, db.vhead}: db.elog.Printf("Flushing value log to disk if async mode.") // Ensure value log is synced to disk so this memtable's contents wouldn't be lost. err = db.vlog.sync() @@ -817,6 +796,7 @@ type flushTask struct { func (db *DB) handleFlushTask(ft flushTask) error { if !ft.mt.Empty() { // Store badger head even if vptr is zero, need it for readTs + db.opt.Infof("Storing value log head: %+v\n", ft.vptr) db.elog.Printf("Storing offset: %+v\n", ft.vptr) offset := make([]byte, vptrSize) ft.vptr.Encode(offset) @@ -849,7 +829,7 @@ func (db *DB) handleFlushTask(ft flushTask) error { db.elog.Errorf("ERROR while syncing level directory: %v", dirSyncErr) } - tbl, err := table.OpenTable(fd, db.opt.TableLoadingMode) + tbl, err := table.OpenTable(fd, db.opt.TableLoadingMode, nil) if err != nil { db.elog.Printf("ERROR while opening table: %v", err) return err @@ -882,15 +862,16 @@ func (db *DB) flushMemtable(lc *y.Closer) error { for ft := range db.flushChan { if ft.mt == nil { - return nil // Stop this goroutine. + // We close db.flushChan now, instead of sending a nil ft.mt. + continue } for { err := db.handleFlushTask(ft) if err == nil { break } - // Encounterd error. Retry indefinitely. - log.Printf("Error while flushing memtable to disk: %v. Retrying...\n", err) + // Encountered error. Retry indefinitely. + db.opt.Errorf("Failure while flushing memtable to disk: %v. Retrying...\n", err) time.Sleep(time.Second) } } @@ -1123,167 +1104,193 @@ func (db *DB) GetSequence(key []byte, bandwidth uint64) (*Sequence, error) { return seq, err } +// Tables gets the TableInfo objects from the level controller. func (db *DB) Tables() []TableInfo { return db.lc.getTableInfo() } +// KeySplits can be used to get rough key ranges to divide up iteration over +// the DB. +func (db *DB) KeySplits(prefix []byte) []string { + var splits []string + for _, ti := range db.Tables() { + // We don't use ti.Left, because that has a tendency to store !badger + // keys. + if bytes.HasPrefix(ti.Right, prefix) { + splits = append(splits, string(ti.Right)) + } + } + sort.Strings(splits) + return splits +} + // MaxBatchCount returns max possible entries in batch func (db *DB) MaxBatchCount() int64 { return db.opt.maxBatchCount } -// MaxBatchCount returns max possible batch size +// MaxBatchSize returns max possible batch size func (db *DB) MaxBatchSize() int64 { return db.opt.maxBatchSize } -// MergeOperator represents a Badger merge operator. -type MergeOperator struct { - sync.RWMutex - f MergeFunc - db *DB - key []byte - closer *y.Closer -} - -// MergeFunc accepts two byte slices, one representing an existing value, and -// another representing a new value that needs to be ‘merged’ into it. MergeFunc -// contains the logic to perform the ‘merge’ and return an updated value. -// MergeFunc could perform operations like integer addition, list appends etc. -// Note that the ordering of the operands is unspecified, so the merge func -// should either be agnostic to ordering or do additional handling if ordering -// is required. -type MergeFunc func(existing, val []byte) []byte - -// GetMergeOperator creates a new MergeOperator for a given key and returns a -// pointer to it. It also fires off a goroutine that performs a compaction using -// the merge function that runs periodically, as specified by dur. -func (db *DB) GetMergeOperator(key []byte, - f MergeFunc, dur time.Duration) *MergeOperator { - op := &MergeOperator{ - f: f, - db: db, - key: key, - closer: y.NewCloser(1), - } - - go op.runCompactions(dur) - return op +func (db *DB) stopCompactions() { + // Stop memtable flushes. + if db.closers.memtable != nil { + close(db.flushChan) + db.closers.memtable.SignalAndWait() + } + // Stop compactions. + if db.closers.compactors != nil { + db.closers.compactors.SignalAndWait() + } } -var errNoMerge = errors.New("No need for merge") - -func (op *MergeOperator) iterateAndMerge(txn *Txn) (val []byte, err error) { - opt := DefaultIteratorOptions - opt.AllVersions = true - it := txn.NewIterator(opt) - defer it.Close() - - var numVersions int - for it.Rewind(); it.ValidForPrefix(op.key); it.Next() { - item := it.Item() - numVersions++ - if numVersions == 1 { - val, err = item.ValueCopy(val) - if err != nil { - return nil, err - } - } else { - if err := item.Value(func(newVal []byte) error { - val = op.f(val, newVal) - return nil - }); err != nil { - return nil, err - } - } - if item.DiscardEarlierVersions() { - break - } +func (db *DB) startCompactions() { + // Resume compactions. + if db.closers.compactors != nil { + db.closers.compactors = y.NewCloser(1) + db.lc.startCompact(db.closers.compactors) } - if numVersions == 0 { - return nil, ErrKeyNotFound - } else if numVersions == 1 { - return val, errNoMerge + if db.closers.memtable != nil { + db.flushChan = make(chan flushTask, db.opt.NumMemtables) + db.closers.memtable = y.NewCloser(1) + go db.flushMemtable(db.closers.memtable) } - return val, nil } -func (op *MergeOperator) compact() error { - op.Lock() - defer op.Unlock() - err := op.db.Update(func(txn *Txn) error { - var ( - val []byte - err error - ) - val, err = op.iterateAndMerge(txn) - if err != nil { - return err +// Flatten can be used to force compactions on the LSM tree so all the tables fall on the same +// level. This ensures that all the versions of keys are colocated and not split across multiple +// levels, which is necessary after a restore from backup. During Flatten, live compactions are +// stopped. Ideally, no writes are going on during Flatten. Otherwise, it would create competition +// between flattening the tree and new tables being created at level zero. +func (db *DB) Flatten(workers int) error { + db.stopCompactions() + defer db.startCompactions() + + compactAway := func(cp compactionPriority) error { + db.opt.Infof("Attempting to compact with %+v\n", cp) + errCh := make(chan error, 1) + for i := 0; i < workers; i++ { + go func() { + errCh <- db.lc.doCompact(cp) + }() } - - // Write value back to db - if err := txn.SetWithDiscard(op.key, val, 0); err != nil { - return err + var success int + var rerr error + for i := 0; i < workers; i++ { + err := <-errCh + if err != nil { + rerr = err + db.opt.Warningf("While running doCompact with %+v. Error: %v\n", cp, err) + } else { + success++ + } + } + if success == 0 { + return rerr } + // We could do at least one successful compaction. So, we'll consider this a success. + db.opt.Infof("%d compactor(s) succeeded. One or more tables from level %d compacted.\n", + success, cp.level) return nil - }) + } - if err == ErrKeyNotFound || err == errNoMerge { - // pass. - } else if err != nil { - return err + hbytes := func(sz int64) string { + return humanize.Bytes(uint64(sz)) } - return nil -} -func (op *MergeOperator) runCompactions(dur time.Duration) { - ticker := time.NewTicker(dur) - defer op.closer.Done() - var stop bool for { - select { - case <-op.closer.HasBeenClosed(): - stop = true - case <-ticker.C: // wait for tick + db.opt.Infof("\n") + var levels []int + for i, l := range db.lc.levels { + sz := l.getTotalSize() + db.opt.Infof("Level: %d. %8s Size. %8s Max.\n", + i, hbytes(l.getTotalSize()), hbytes(l.maxTotalSize)) + if sz > 0 { + levels = append(levels, i) + } } - if err := op.compact(); err != nil { - log.Printf("Error while running merge operation: %s", err) + if len(levels) <= 1 { + prios := db.lc.pickCompactLevels() + if len(prios) == 0 || prios[0].score <= 1.0 { + db.opt.Infof("All tables consolidated into one level. Flattening done.\n") + return nil + } + if err := compactAway(prios[0]); err != nil { + return err + } + continue } - if stop { - ticker.Stop() - break + // Create an artificial compaction priority, to ensure that we compact the level. + cp := compactionPriority{level: levels[0], score: 1.71} + if err := compactAway(cp); err != nil { + return err } } } -// Add records a value in Badger which will eventually be merged by a background -// routine into the values that were recorded by previous invocations to Add(). -func (op *MergeOperator) Add(val []byte) error { - return op.db.Update(func(txn *Txn) error { - return txn.Set(op.key, val) - }) -} - -// Get returns the latest value for the merge operator, which is derived by -// applying the merge function to all the values added so far. +// DropAll would drop all the data stored in Badger. It does this in the following way. +// - Stop accepting new writes. +// - Pause memtable flushes and compactions. +// - Pick all tables from all levels, create a changeset to delete all these +// tables and apply it to manifest. +// - Pick all log files from value log, and delete all of them. Restart value log files from zero. +// - Resume memtable flushes and compactions. // -// If Add has not been called even once, Get will return ErrKeyNotFound. -func (op *MergeOperator) Get() ([]byte, error) { - op.RLock() - defer op.RUnlock() - var existing []byte - err := op.db.View(func(txn *Txn) (err error) { - existing, err = op.iterateAndMerge(txn) +// NOTE: DropAll is resilient to concurrent writes, but not to reads. It is up to the user to not do +// any reads while DropAll is going on, otherwise they may result in panics. Ideally, both reads and +// writes are paused before running DropAll, and resumed after it is finished. +func (db *DB) DropAll() error { + if db.opt.ReadOnly { + panic("Attempting to drop data in read-only mode.") + } + db.opt.Infof("DropAll called. Blocking writes...") + // Stop accepting new writes. + atomic.StoreInt32(&db.blockWrites, 1) + + // Make all pending writes finish. The following will also close writeCh. + db.closers.writes.SignalAndWait() + db.opt.Infof("Writes flushed. Stopping compactions now...") + + // Stop all compactions. + db.stopCompactions() + defer func() { + db.opt.Infof("Resuming writes") + db.startCompactions() + + db.writeCh = make(chan *request, kvWriteChCapacity) + db.closers.writes = y.NewCloser(1) + go db.doWrites(db.closers.writes) + + // Resume writes. + atomic.StoreInt32(&db.blockWrites, 0) + }() + db.opt.Infof("Compactions stopped. Dropping all SSTables...") + + // Block all foreign interactions with memory tables. + db.Lock() + defer db.Unlock() + + // Remove inmemory tables. Calling DecrRef for safety. Not sure if they're absolutely needed. + db.mt.DecrRef() + db.mt = skl.NewSkiplist(arenaSize(db.opt)) // Set it up for future writes. + for _, mt := range db.imm { + mt.DecrRef() + } + db.imm = db.imm[:0] + + num, err := db.lc.deleteLSMTree() + if err != nil { return err - }) - if err == errNoMerge { - return existing, nil } - return existing, err -} + db.opt.Infof("Deleted %d SSTables. Now deleting value logs...\n", num) -// Stop waits for any pending merge to complete and then stops the background -// goroutine. -func (op *MergeOperator) Stop() { - op.closer.SignalAndWait() + num, err = db.vlog.dropAll() + if err != nil { + return err + } + db.vhead = valuePointer{} // Zero it out. + db.opt.Infof("Deleted %d value log files. DropAll done.\n", num) + return nil } diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/dir_unix.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/dir_unix.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/dir_unix.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/dir_unix.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/dir_windows.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/dir_windows.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/dir_windows.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/dir_windows.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/doc.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/doc.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/doc.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/doc.go diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/errors.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/errors.go new file mode 100644 index 0000000000..00836109cd --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/errors.go @@ -0,0 +1,105 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +var ( + // ErrValueLogSize is returned when opt.ValueLogFileSize option is not within the valid + // range. + ErrValueLogSize = errors.New("Invalid ValueLogFileSize, must be between 1MB and 2GB") + + // ErrValueThreshold is returned when ValueThreshold is set to a value close to or greater than + // uint16. + ErrValueThreshold = errors.New("Invalid ValueThreshold, must be lower than uint16") + + // ErrKeyNotFound is returned when key isn't found on a txn.Get. + ErrKeyNotFound = errors.New("Key not found") + + // ErrTxnTooBig is returned if too many writes are fit into a single transaction. + ErrTxnTooBig = errors.New("Txn is too big to fit into one request") + + // ErrConflict is returned when a transaction conflicts with another transaction. This can happen if + // the read rows had been updated concurrently by another transaction. + ErrConflict = errors.New("Transaction Conflict. Please retry") + + // ErrReadOnlyTxn is returned if an update function is called on a read-only transaction. + ErrReadOnlyTxn = errors.New("No sets or deletes are allowed in a read-only transaction") + + // ErrDiscardedTxn is returned if a previously discarded transaction is re-used. + ErrDiscardedTxn = errors.New("This transaction has been discarded. Create a new one") + + // ErrEmptyKey is returned if an empty key is passed on an update function. + ErrEmptyKey = errors.New("Key cannot be empty") + + // ErrInvalidKey is returned if the key has a special !badger! prefix, + // reserved for internal usage. + ErrInvalidKey = errors.New("Key is using a reserved !badger! prefix") + + // ErrRetry is returned when a log file containing the value is not found. + // This usually indicates that it may have been garbage collected, and the + // operation needs to be retried. + ErrRetry = errors.New("Unable to find log file. Please retry") + + // ErrThresholdZero is returned if threshold is set to zero, and value log GC is called. + // In such a case, GC can't be run. + ErrThresholdZero = errors.New( + "Value log GC can't run because threshold is set to zero") + + // ErrNoRewrite is returned if a call for value log GC doesn't result in a log file rewrite. + ErrNoRewrite = errors.New( + "Value log GC attempt didn't result in any cleanup") + + // ErrRejected is returned if a value log GC is called either while another GC is running, or + // after DB::Close has been called. + ErrRejected = errors.New("Value log GC request rejected") + + // ErrInvalidRequest is returned if the user request is invalid. + ErrInvalidRequest = errors.New("Invalid request") + + // ErrManagedTxn is returned if the user tries to use an API which isn't + // allowed due to external management of transactions, when using ManagedDB. + ErrManagedTxn = errors.New( + "Invalid API request. Not allowed to perform this action using ManagedDB") + + // ErrInvalidDump if a data dump made previously cannot be loaded into the database. + ErrInvalidDump = errors.New("Data dump cannot be read") + + // ErrZeroBandwidth is returned if the user passes in zero bandwidth for sequence. + ErrZeroBandwidth = errors.New("Bandwidth must be greater than zero") + + // ErrInvalidLoadingMode is returned when opt.ValueLogLoadingMode option is not + // within the valid range + ErrInvalidLoadingMode = errors.New("Invalid ValueLogLoadingMode, must be FileIO or MemoryMap") + + // ErrReplayNeeded is returned when opt.ReadOnly is set but the + // database requires a value log replay. + ErrReplayNeeded = errors.New("Database was not properly closed, cannot open read-only") + + // ErrWindowsNotSupported is returned when opt.ReadOnly is used on Windows + ErrWindowsNotSupported = errors.New("Read-only mode is not supported on Windows") + + // ErrTruncateNeeded is returned when the value log gets corrupt, and requires truncation of + // corrupt data to allow Badger to run properly. + ErrTruncateNeeded = errors.New("Value log truncate required to run DB. This might result in data loss") + + // ErrBlockedWrites is returned if the user called DropAll. During the process of dropping all + // data from Badger, we stop accepting new writes, by returning this error. + ErrBlockedWrites = errors.New("Writes are blocked, possibly due to DropAll or Close") +) diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/iterator.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/iterator.go new file mode 100644 index 0000000000..1584a94f62 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/iterator.go @@ -0,0 +1,678 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "bytes" + "fmt" + "hash/crc32" + "sync" + "sync/atomic" + "time" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" +) + +type prefetchStatus uint8 + +const ( + prefetched prefetchStatus = iota + 1 +) + +// Item is returned during iteration. Both the Key() and Value() output is only valid until +// iterator.Next() is called. +type Item struct { + status prefetchStatus + err error + wg sync.WaitGroup + db *DB + key []byte + vptr []byte + meta byte // We need to store meta to know about bitValuePointer. + userMeta byte + expiresAt uint64 + val []byte + slice *y.Slice // Used only during prefetching. + next *Item + version uint64 + txn *Txn +} + +// String returns a string representation of Item +func (item *Item) String() string { + return fmt.Sprintf("key=%q, version=%d, meta=%x", item.Key(), item.Version(), item.meta) +} + +// Key returns the key. +// +// Key is only valid as long as item is valid, or transaction is valid. If you need to use it +// outside its validity, please use KeyCopy. +func (item *Item) Key() []byte { + return item.key +} + +// KeyCopy returns a copy of the key of the item, writing it to dst slice. +// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and +// returned. +func (item *Item) KeyCopy(dst []byte) []byte { + return y.SafeCopy(dst, item.key) +} + +// Version returns the commit timestamp of the item. +func (item *Item) Version() uint64 { + return item.version +} + +// Value retrieves the value of the item from the value log. +// +// This method must be called within a transaction. Calling it outside a +// transaction is considered undefined behavior. If an iterator is being used, +// then Item.Value() is defined in the current iteration only, because items are +// reused. +// +// If you need to use a value outside a transaction, please use Item.ValueCopy +// instead, or copy it yourself. Value might change once discard or commit is called. +// Use ValueCopy if you want to do a Set after Get. +func (item *Item) Value(fn func(val []byte) error) error { + item.wg.Wait() + if item.status == prefetched { + if item.err == nil && fn != nil { + if err := fn(item.val); err != nil { + return err + } + } + return item.err + } + buf, cb, err := item.yieldItemValue() + defer runCallback(cb) + if err != nil { + return err + } + if fn != nil { + return fn(buf) + } + return nil +} + +// ValueCopy returns a copy of the value of the item from the value log, writing it to dst slice. +// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and +// returned. Tip: It might make sense to reuse the returned slice as dst argument for the next call. +// +// This function is useful in long running iterate/update transactions to avoid a write deadlock. +// See Github issue: https://github.com/dgraph-io/badger/issues/315 +func (item *Item) ValueCopy(dst []byte) ([]byte, error) { + item.wg.Wait() + if item.status == prefetched { + return y.SafeCopy(dst, item.val), item.err + } + buf, cb, err := item.yieldItemValue() + defer runCallback(cb) + return y.SafeCopy(dst, buf), err +} + +func (item *Item) hasValue() bool { + if item.meta == 0 && item.vptr == nil { + // key not found + return false + } + return true +} + +// IsDeletedOrExpired returns true if item contains deleted or expired value. +func (item *Item) IsDeletedOrExpired() bool { + return isDeletedOrExpired(item.meta, item.expiresAt) +} + +// DiscardEarlierVersions returns whether the iterator was created with the +// option to discard earlier versions of a key when multiple are available. +func (item *Item) DiscardEarlierVersions() bool { + return item.meta&bitDiscardEarlierVersions > 0 +} + +func (item *Item) yieldItemValue() ([]byte, func(), error) { + key := item.Key() // No need to copy. + for { + if !item.hasValue() { + return nil, nil, nil + } + + if item.slice == nil { + item.slice = new(y.Slice) + } + + if (item.meta & bitValuePointer) == 0 { + val := item.slice.Resize(len(item.vptr)) + copy(val, item.vptr) + return val, nil, nil + } + + var vp valuePointer + vp.Decode(item.vptr) + result, cb, err := item.db.vlog.Read(vp, item.slice) + if err != ErrRetry { + return result, cb, err + } + if bytes.HasPrefix(key, badgerMove) { + // err == ErrRetry + // Error is retry even after checking the move keyspace. So, let's + // just assume that value is not present. + return nil, cb, nil + } + + // The value pointer is pointing to a deleted value log. Look for the + // move key and read that instead. + runCallback(cb) + // Do not put badgerMove on the left in append. It seems to cause some sort of manipulation. + keyTs := y.KeyWithTs(item.Key(), item.Version()) + key = make([]byte, len(badgerMove)+len(keyTs)) + n := copy(key, badgerMove) + copy(key[n:], keyTs) + // Note that we can't set item.key to move key, because that would + // change the key user sees before and after this call. Also, this move + // logic is internal logic and should not impact the external behavior + // of the retrieval. + vs, err := item.db.get(key) + if err != nil { + return nil, nil, err + } + if vs.Version != item.Version() { + return nil, nil, nil + } + // Bug fix: Always copy the vs.Value into vptr here. Otherwise, when item is reused this + // slice gets overwritten. + item.vptr = y.SafeCopy(item.vptr, vs.Value) + item.meta &^= bitValuePointer // Clear the value pointer bit. + if vs.Meta&bitValuePointer > 0 { + item.meta |= bitValuePointer // This meta would only be about value pointer. + } + } +} + +func runCallback(cb func()) { + if cb != nil { + cb() + } +} + +func (item *Item) prefetchValue() { + val, cb, err := item.yieldItemValue() + defer runCallback(cb) + + item.err = err + item.status = prefetched + if val == nil { + return + } + if item.db.opt.ValueLogLoadingMode == options.MemoryMap { + buf := item.slice.Resize(len(val)) + copy(buf, val) + item.val = buf + } else { + item.val = val + } +} + +// EstimatedSize returns the approximate size of the key-value pair. +// +// This can be called while iterating through a store to quickly estimate the +// size of a range of key-value pairs (without fetching the corresponding +// values). +func (item *Item) EstimatedSize() int64 { + if !item.hasValue() { + return 0 + } + if (item.meta & bitValuePointer) == 0 { + return int64(len(item.key) + len(item.vptr)) + } + var vp valuePointer + vp.Decode(item.vptr) + return int64(vp.Len) // includes key length. +} + +// ValueSize returns the exact size of the value. +// +// This can be called to quickly estimate the size of a value without fetching +// it. +func (item *Item) ValueSize() int64 { + if !item.hasValue() { + return 0 + } + if (item.meta & bitValuePointer) == 0 { + return int64(len(item.vptr)) + } + var vp valuePointer + vp.Decode(item.vptr) + + klen := int64(len(item.key) + 8) // 8 bytes for timestamp. + return int64(vp.Len) - klen - headerBufSize - crc32.Size +} + +// UserMeta returns the userMeta set by the user. Typically, this byte, optionally set by the user +// is used to interpret the value. +func (item *Item) UserMeta() byte { + return item.userMeta +} + +// ExpiresAt returns a Unix time value indicating when the item will be +// considered expired. 0 indicates that the item will never expire. +func (item *Item) ExpiresAt() uint64 { + return item.expiresAt +} + +// TODO: Switch this to use linked list container in Go. +type list struct { + head *Item + tail *Item +} + +func (l *list) push(i *Item) { + i.next = nil + if l.tail == nil { + l.head = i + l.tail = i + return + } + l.tail.next = i + l.tail = i +} + +func (l *list) pop() *Item { + if l.head == nil { + return nil + } + i := l.head + if l.head == l.tail { + l.tail = nil + l.head = nil + } else { + l.head = i.next + } + i.next = nil + return i +} + +// IteratorOptions is used to set options when iterating over Badger key-value +// stores. +// +// This package provides DefaultIteratorOptions which contains options that +// should work for most applications. Consider using that as a starting point +// before customizing it for your own needs. +type IteratorOptions struct { + // Indicates whether we should prefetch values during iteration and store them. + PrefetchValues bool + // How many KV pairs to prefetch while iterating. Valid only if PrefetchValues is true. + PrefetchSize int + Reverse bool // Direction of iteration. False is forward, true is backward. + AllVersions bool // Fetch all valid versions of the same key. + + // The following option is used to narrow down the SSTables that iterator picks up. If + // Prefix is specified, only tables which could have this prefix are picked based on their range + // of keys. + Prefix []byte // Only iterate over this given prefix. + prefixIsKey bool // If set, use the prefix for bloom filter lookup. + + internalAccess bool // Used to allow internal access to badger keys. +} + +func (opt *IteratorOptions) pickTable(t table.TableInterface) bool { + if len(opt.Prefix) == 0 { + return true + } + trim := func(key []byte) []byte { + if len(key) > len(opt.Prefix) { + return key[:len(opt.Prefix)] + } + return key + } + if bytes.Compare(trim(t.Smallest()), opt.Prefix) > 0 { + return false + } + if bytes.Compare(trim(t.Biggest()), opt.Prefix) < 0 { + return false + } + // Bloom filter lookup would only work if opt.Prefix does NOT have the read + // timestamp as part of the key. + if opt.prefixIsKey && t.DoesNotHave(opt.Prefix) { + return false + } + return true +} + +// DefaultIteratorOptions contains default options when iterating over Badger key-value stores. +var DefaultIteratorOptions = IteratorOptions{ + PrefetchValues: true, + PrefetchSize: 100, + Reverse: false, + AllVersions: false, +} + +// Iterator helps iterating over the KV pairs in a lexicographically sorted order. +type Iterator struct { + iitr *y.MergeIterator + txn *Txn + readTs uint64 + + opt IteratorOptions + item *Item + data list + waste list + + lastKey []byte // Used to skip over multiple versions of the same key. + + closed bool +} + +// NewIterator returns a new iterator. Depending upon the options, either only keys, or both +// key-value pairs would be fetched. The keys are returned in lexicographically sorted order. +// Using prefetch is recommended if you're doing a long running iteration, for performance. +// +// Multiple Iterators: +// For a read-only txn, multiple iterators can be running simultaneously. However, for a read-write +// txn, only one can be running at one time to avoid race conditions, because Txn is thread-unsafe. +func (txn *Txn) NewIterator(opt IteratorOptions) *Iterator { + if txn.discarded { + panic("Transaction has already been discarded") + } + // Do not change the order of the next if. We must track the number of running iterators. + if atomic.AddInt32(&txn.numIterators, 1) > 1 && txn.update { + atomic.AddInt32(&txn.numIterators, -1) + panic("Only one iterator can be active at one time, for a RW txn.") + } + + // TODO: If Prefix is set, only pick those memtables which have keys with + // the prefix. + tables, decr := txn.db.getMemTables() + defer decr() + txn.db.vlog.incrIteratorCount() + var iters []y.Iterator + if itr := txn.newPendingWritesIterator(opt.Reverse); itr != nil { + iters = append(iters, itr) + } + for i := 0; i < len(tables); i++ { + iters = append(iters, tables[i].NewUniIterator(opt.Reverse)) + } + iters = txn.db.lc.appendIterators(iters, &opt) // This will increment references. + res := &Iterator{ + txn: txn, + iitr: y.NewMergeIterator(iters, opt.Reverse), + opt: opt, + readTs: txn.readTs, + } + return res +} + +// NewKeyIterator is just like NewIterator, but allows the user to iterate over all versions of a +// single key. Internally, it sets the Prefix option in provided opt, and uses that prefix to +// additionally run bloom filter lookups before picking tables from the LSM tree. +func (txn *Txn) NewKeyIterator(key []byte, opt IteratorOptions) *Iterator { + if len(opt.Prefix) > 0 { + panic("opt.Prefix should be nil for NewKeyIterator.") + } + opt.Prefix = key // This key must be without the timestamp. + opt.prefixIsKey = true + return txn.NewIterator(opt) +} + +func (it *Iterator) newItem() *Item { + item := it.waste.pop() + if item == nil { + item = &Item{slice: new(y.Slice), db: it.txn.db, txn: it.txn} + } + return item +} + +// Item returns pointer to the current key-value pair. +// This item is only valid until it.Next() gets called. +func (it *Iterator) Item() *Item { + tx := it.txn + tx.addReadKey(it.item.Key()) + return it.item +} + +// Valid returns false when iteration is done. +func (it *Iterator) Valid() bool { + if it.item == nil { + return false + } + return bytes.HasPrefix(it.item.key, it.opt.Prefix) +} + +// ValidForPrefix returns false when iteration is done +// or when the current key is not prefixed by the specified prefix. +func (it *Iterator) ValidForPrefix(prefix []byte) bool { + return it.Valid() && bytes.HasPrefix(it.item.key, prefix) +} + +// Close would close the iterator. It is important to call this when you're done with iteration. +func (it *Iterator) Close() { + if it.closed { + return + } + it.closed = true + + it.iitr.Close() + // It is important to wait for the fill goroutines to finish. Otherwise, we might leave zombie + // goroutines behind, which are waiting to acquire file read locks after DB has been closed. + waitFor := func(l list) { + item := l.pop() + for item != nil { + item.wg.Wait() + item = l.pop() + } + } + waitFor(it.waste) + waitFor(it.data) + + // TODO: We could handle this error. + _ = it.txn.db.vlog.decrIteratorCount() + atomic.AddInt32(&it.txn.numIterators, -1) +} + +// Next would advance the iterator by one. Always check it.Valid() after a Next() +// to ensure you have access to a valid it.Item(). +func (it *Iterator) Next() { + // Reuse current item + it.item.wg.Wait() // Just cleaner to wait before pushing to avoid doing ref counting. + it.waste.push(it.item) + + // Set next item to current + it.item = it.data.pop() + + for it.iitr.Valid() { + if it.parseItem() { + // parseItem calls one extra next. + // This is used to deal with the complexity of reverse iteration. + break + } + } +} + +func isDeletedOrExpired(meta byte, expiresAt uint64) bool { + if meta&bitDelete > 0 { + return true + } + if expiresAt == 0 { + return false + } + return expiresAt <= uint64(time.Now().Unix()) +} + +// parseItem is a complex function because it needs to handle both forward and reverse iteration +// implementation. We store keys such that their versions are sorted in descending order. This makes +// forward iteration efficient, but revese iteration complicated. This tradeoff is better because +// forward iteration is more common than reverse. +// +// This function advances the iterator. +func (it *Iterator) parseItem() bool { + mi := it.iitr + key := mi.Key() + + setItem := func(item *Item) { + if it.item == nil { + it.item = item + } else { + it.data.push(item) + } + } + + // Skip badger keys. + if !it.opt.internalAccess && bytes.HasPrefix(key, badgerPrefix) { + mi.Next() + return false + } + + // Skip any versions which are beyond the readTs. + version := y.ParseTs(key) + if version > it.readTs { + mi.Next() + return false + } + + if it.opt.AllVersions { + // Return deleted or expired values also, otherwise user can't figure out + // whether the key was deleted. + item := it.newItem() + it.fill(item) + setItem(item) + mi.Next() + return true + } + + // If iterating in forward direction, then just checking the last key against current key would + // be sufficient. + if !it.opt.Reverse { + if y.SameKey(it.lastKey, key) { + mi.Next() + return false + } + // Only track in forward direction. + // We should update lastKey as soon as we find a different key in our snapshot. + // Consider keys: a 5, b 7 (del), b 5. When iterating, lastKey = a. + // Then we see b 7, which is deleted. If we don't store lastKey = b, we'll then return b 5, + // which is wrong. Therefore, update lastKey here. + it.lastKey = y.SafeCopy(it.lastKey, mi.Key()) + } + +FILL: + // If deleted, advance and return. + vs := mi.Value() + if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { + mi.Next() + return false + } + + item := it.newItem() + it.fill(item) + // fill item based on current cursor position. All Next calls have returned, so reaching here + // means no Next was called. + + mi.Next() // Advance but no fill item yet. + if !it.opt.Reverse || !mi.Valid() { // Forward direction, or invalid. + setItem(item) + return true + } + + // Reverse direction. + nextTs := y.ParseTs(mi.Key()) + mik := y.ParseKey(mi.Key()) + if nextTs <= it.readTs && bytes.Equal(mik, item.key) { + // This is a valid potential candidate. + goto FILL + } + // Ignore the next candidate. Return the current one. + setItem(item) + return true +} + +func (it *Iterator) fill(item *Item) { + vs := it.iitr.Value() + item.meta = vs.Meta + item.userMeta = vs.UserMeta + item.expiresAt = vs.ExpiresAt + + item.version = y.ParseTs(it.iitr.Key()) + item.key = y.SafeCopy(item.key, y.ParseKey(it.iitr.Key())) + + item.vptr = y.SafeCopy(item.vptr, vs.Value) + item.val = nil + if it.opt.PrefetchValues { + item.wg.Add(1) + go func() { + // FIXME we are not handling errors here. + item.prefetchValue() + item.wg.Done() + }() + } +} + +func (it *Iterator) prefetch() { + prefetchSize := 2 + if it.opt.PrefetchValues && it.opt.PrefetchSize > 1 { + prefetchSize = it.opt.PrefetchSize + } + + i := it.iitr + var count int + it.item = nil + for i.Valid() { + if !it.parseItem() { + continue + } + count++ + if count == prefetchSize { + break + } + } +} + +// Seek would seek to the provided key if present. If absent, it would seek to the next smallest key +// greater than the provided key if iterating in the forward direction. Behavior would be reversed if +// iterating backwards. +func (it *Iterator) Seek(key []byte) { + for i := it.data.pop(); i != nil; i = it.data.pop() { + i.wg.Wait() + it.waste.push(i) + } + + it.lastKey = it.lastKey[:0] + if len(key) == 0 { + key = it.opt.Prefix + } + if len(key) == 0 { + it.iitr.Rewind() + it.prefetch() + return + } + + if !it.opt.Reverse { + key = y.KeyWithTs(key, it.txn.readTs) + } else { + key = y.KeyWithTs(key, 0) + } + it.iitr.Seek(key) + it.prefetch() +} + +// Rewind would rewind the iterator cursor all the way to zero-th position, which would be the +// smallest key if iterating forward, and largest if iterating backward. It does not keep track of +// whether the cursor started with a Seek(). +func (it *Iterator) Rewind() { + it.Seek(nil) +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/level_handler.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/level_handler.go similarity index 93% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/level_handler.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/level_handler.go index 3ee32ffe12..a33124d82b 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/level_handler.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/level_handler.go @@ -21,9 +21,9 @@ import ( "sort" "sync" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" ) type levelHandler struct { @@ -266,16 +266,26 @@ func (s *levelHandler) get(key []byte) (y.ValueStruct, error) { // appendIterators appends iterators to an array of iterators, for merging. // Note: This obtains references for the table handlers. Remember to close these iterators. -func (s *levelHandler) appendIterators(iters []y.Iterator, reversed bool) []y.Iterator { +func (s *levelHandler) appendIterators(iters []y.Iterator, opt *IteratorOptions) []y.Iterator { s.RLock() defer s.RUnlock() + tables := make([]*table.Table, 0, len(s.tables)) + for _, t := range s.tables { + if opt.pickTable(t) { + tables = append(tables, t) + } + } + if len(tables) == 0 { + return iters + } + if s.level == 0 { // Remember to add in reverse order! // The newer table at the end of s.tables should be added first as it takes precedence. - return appendIteratorsReversed(iters, s.tables, reversed) + return appendIteratorsReversed(iters, tables, opt.Reverse) } - return append(iters, table.NewConcatIterator(s.tables, reversed)) + return append(iters, table.NewConcatIterator(tables, opt.Reverse)) } type levelHandlerRLocked struct{} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/levels.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/levels.go similarity index 83% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/levels.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/levels.go index b31ad5af7b..8b8ad3c71a 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/levels.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/levels.go @@ -22,14 +22,17 @@ import ( "math/rand" "os" "sort" + "strings" + "sync" + "sync/atomic" "time" "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" ) type levelsController struct { @@ -73,61 +76,103 @@ func revertToManifest(kv *DB, mf *Manifest, idMap map[uint64]struct{}) error { return nil } -func newLevelsController(kv *DB, mf *Manifest) (*levelsController, error) { - y.AssertTrue(kv.opt.NumLevelZeroTablesStall > kv.opt.NumLevelZeroTables) +func newLevelsController(db *DB, mf *Manifest) (*levelsController, error) { + y.AssertTrue(db.opt.NumLevelZeroTablesStall > db.opt.NumLevelZeroTables) s := &levelsController{ - kv: kv, - elog: kv.elog, - levels: make([]*levelHandler, kv.opt.MaxLevels), + kv: db, + elog: db.elog, + levels: make([]*levelHandler, db.opt.MaxLevels), } - s.cstatus.levels = make([]*levelCompactStatus, kv.opt.MaxLevels) + s.cstatus.levels = make([]*levelCompactStatus, db.opt.MaxLevels) - for i := 0; i < kv.opt.MaxLevels; i++ { - s.levels[i] = newLevelHandler(kv, i) + for i := 0; i < db.opt.MaxLevels; i++ { + s.levels[i] = newLevelHandler(db, i) if i == 0 { // Do nothing. } else if i == 1 { // Level 1 probably shouldn't be too much bigger than level 0. - s.levels[i].maxTotalSize = kv.opt.LevelOneSize + s.levels[i].maxTotalSize = db.opt.LevelOneSize } else { - s.levels[i].maxTotalSize = s.levels[i-1].maxTotalSize * int64(kv.opt.LevelSizeMultiplier) + s.levels[i].maxTotalSize = s.levels[i-1].maxTotalSize * int64(db.opt.LevelSizeMultiplier) } s.cstatus.levels[i] = new(levelCompactStatus) } // Compare manifest against directory, check for existent/non-existent files, and remove. - if err := revertToManifest(kv, mf, getIDMap(kv.opt.Dir)); err != nil { + if err := revertToManifest(db, mf, getIDMap(db.opt.Dir)); err != nil { return nil, err } // Some files may be deleted. Let's reload. - tables := make([][]*table.Table, kv.opt.MaxLevels) + var flags uint32 = y.Sync + if db.opt.ReadOnly { + flags |= y.ReadOnly + } + + var mu sync.Mutex + tables := make([][]*table.Table, db.opt.MaxLevels) var maxFileID uint64 - for fileID, tableManifest := range mf.Tables { - fname := table.NewFilename(fileID, kv.opt.Dir) - var flags uint32 = y.Sync - if kv.opt.ReadOnly { - flags |= y.ReadOnly - } - fd, err := y.OpenExistingFile(fname, flags) - if err != nil { - closeAllTables(tables) - return nil, errors.Wrapf(err, "Opening file: %q", fname) - } - t, err := table.OpenTable(fd, kv.opt.TableLoadingMode) - if err != nil { - closeAllTables(tables) - return nil, errors.Wrapf(err, "Opening table: %q", fname) - } + // We found that using 3 goroutines allows disk throughput to be utilized to its max. + // Disk utilization is the main thing we should focus on, while trying to read the data. That's + // the one factor that remains constant between HDD and SSD. + throttle := y.NewThrottle(3) - level := tableManifest.Level - tables[level] = append(tables[level], t) + start := time.Now() + var numOpened int32 + tick := time.NewTicker(3 * time.Second) + defer tick.Stop() + for fileID, tf := range mf.Tables { + fname := table.NewFilename(fileID, db.opt.Dir) + select { + case <-tick.C: + db.opt.Infof("%d tables out of %d opened in %s\n", atomic.LoadInt32(&numOpened), + len(mf.Tables), time.Since(start).Round(time.Millisecond)) + default: + } + if err := throttle.Do(); err != nil { + closeAllTables(tables) + return nil, err + } if fileID > maxFileID { maxFileID = fileID } + go func(fname string, tf TableManifest) { + var rerr error + defer func() { + throttle.Done(rerr) + atomic.AddInt32(&numOpened, 1) + }() + fd, err := y.OpenExistingFile(fname, flags) + if err != nil { + rerr = errors.Wrapf(err, "Opening file: %q", fname) + return + } + + t, err := table.OpenTable(fd, db.opt.TableLoadingMode, tf.Checksum) + if err != nil { + if strings.HasPrefix(err.Error(), "CHECKSUM_MISMATCH:") { + db.opt.Errorf(err.Error()) + db.opt.Errorf("Ignoring table %s", fd.Name()) + // Do not set rerr. We will continue without this table. + } else { + rerr = errors.Wrapf(err, "Opening table: %q", fname) + } + return + } + + mu.Lock() + tables[tf.Level] = append(tables[tf.Level], t) + mu.Unlock() + }(fname, tf) + } + if err := throttle.Finish(); err != nil { + closeAllTables(tables) + return nil, err } + db.opt.Infof("All %d tables opened in %s\n", atomic.LoadInt32(&numOpened), + time.Since(start).Round(time.Millisecond)) s.nextFileID = maxFileID + 1 for i, tbls := range tables { s.levels[i].initTables(tbls) @@ -141,7 +186,7 @@ func newLevelsController(kv *DB, mf *Manifest) (*levelsController, error) { // Sync directory (because we have at least removed some files, or previously created the // manifest file). - if err := syncDir(kv.opt.Dir); err != nil { + if err := syncDir(db.opt.Dir); err != nil { _ = s.close() return nil, err } @@ -172,24 +217,13 @@ func (s *levelsController) cleanupLevels() error { // This function picks all tables from all levels, creates a manifest changeset, // applies it, and then decrements the refs of these tables, which would result -// in their deletion. It spares one table from L0, to keep the badgerHead key -// persisted, so we don't lose where we are w.r.t. value log. -// NOTE: This function in itself isn't sufficient to completely delete all the -// data. After this, one would still need to iterate over the KV pairs and mark -// them as deleted. +// in their deletion. func (s *levelsController) deleteLSMTree() (int, error) { + // First pick all tables, so we can create a manifest changelog. var all []*table.Table - var keepOne *table.Table for _, l := range s.levels { l.RLock() - if l.level == 0 && len(l.tables) > 1 { - // Skip the last table. We do this to keep the badgerMove key persisted. - lastIdx := len(l.tables) - 1 - keepOne = l.tables[lastIdx] - all = append(all, l.tables[:lastIdx]...) - } else { - all = append(all, l.tables...) - } + all = append(all, l.tables...) l.RUnlock() } if len(all) == 0 { @@ -197,27 +231,22 @@ func (s *levelsController) deleteLSMTree() (int, error) { } // Generate the manifest changes. - changes := []*protos.ManifestChange{} + changes := []*pb.ManifestChange{} for _, table := range all { - changes = append(changes, makeTableDeleteChange(table.ID())) + changes = append(changes, newDeleteChange(table.ID())) } - changeSet := protos.ManifestChangeSet{Changes: changes} + changeSet := pb.ManifestChangeSet{Changes: changes} if err := s.kv.manifest.addChanges(changeSet.Changes); err != nil { return 0, err } + // Now that manifest has been successfully written, we can delete the tables. for _, l := range s.levels { l.Lock() l.totalSize = 0 - if l.level == 0 && len(l.tables) > 1 { - l.tables = []*table.Table{keepOne} - l.totalSize += keepOne.Size() - } else { - l.tables = l.tables[:0] - } + l.tables = l.tables[:0] l.Unlock() } - // Now allow deletion of tables. for _, table := range all { if err := table.DecrRef(); err != nil { return 0, err @@ -236,11 +265,15 @@ func (s *levelsController) startCompact(lc *y.Closer) { func (s *levelsController) runWorker(lc *y.Closer) { defer lc.Done() - if s.kv.opt.DoNotCompact { + + randomDelay := time.NewTimer(time.Duration(rand.Int31n(1000)) * time.Millisecond) + select { + case <-randomDelay.C: + case <-lc.HasBeenClosed(): + randomDelay.Stop() return } - time.Sleep(time.Duration(rand.Int31n(1000)) * time.Millisecond) ticker := time.NewTicker(time.Second) defer ticker.Stop() @@ -250,10 +283,12 @@ func (s *levelsController) runWorker(lc *y.Closer) { case <-ticker.C: prios := s.pickCompactLevels() for _, p := range prios { - // TODO: Handle error. - didCompact, _ := s.doCompact(p) - if didCompact { + if err := s.doCompact(p); err == nil { break + } else if err == errFillTables { + // pass + } else { + s.kv.opt.Warningf("While running doCompact: %v\n", err) } } case <-lc.HasBeenClosed(): @@ -458,7 +493,7 @@ func (s *levelsController) compactBuildTables( return } - tbl, err := table.OpenTable(fd, s.kv.opt.TableLoadingMode) + tbl, err := table.OpenTable(fd, s.kv.opt.TableLoadingMode, nil) // decrRef is added below. resultCh <- newTableResult{tbl, errors.Wrapf(err, "Unable to open table: %q", fd.Name())} }(builder) @@ -503,18 +538,19 @@ func (s *levelsController) compactBuildTables( return newTables, func() error { return decrRefs(newTables) }, nil } -func buildChangeSet(cd *compactDef, newTables []*table.Table) protos.ManifestChangeSet { - changes := []*protos.ManifestChange{} +func buildChangeSet(cd *compactDef, newTables []*table.Table) pb.ManifestChangeSet { + changes := []*pb.ManifestChange{} for _, table := range newTables { - changes = append(changes, makeTableCreateChange(table.ID(), cd.nextLevel.level)) + changes = append(changes, + newCreateChange(table.ID(), cd.nextLevel.level, table.Checksum)) } for _, table := range cd.top { - changes = append(changes, makeTableDeleteChange(table.ID())) + changes = append(changes, newDeleteChange(table.ID())) } for _, table := range cd.bot { - changes = append(changes, makeTableDeleteChange(table.ID())) + changes = append(changes, newDeleteChange(table.ID())) } - return protos.ManifestChangeSet{Changes: changes} + return pb.ManifestChangeSet{Changes: changes} } type compactDef struct { @@ -617,7 +653,6 @@ func (s *levelsController) fillTables(cd *compactDef) bool { if s.cstatus.overlapsWith(cd.nextLevel.level, cd.nextRange) { continue } - if !s.cstatus.compareAndAdd(thisAndNextLevelRLocked{}, *cd) { continue } @@ -669,8 +704,10 @@ func (s *levelsController) runCompactDef(l int, cd compactDef) (err error) { return nil } +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(p compactionPriority) (bool, error) { +func (s *levelsController) doCompact(p compactionPriority) error { l := p.level y.AssertTrue(l+1 < s.kv.opt.MaxLevels) // Sanity check. @@ -689,13 +726,13 @@ func (s *levelsController) doCompact(p compactionPriority) (bool, error) { if l == 0 { if !s.fillTablesL0(&cd) { cd.elog.LazyPrintf("fillTables failed for level: %d\n", l) - return false, nil + return errFillTables } } else { if !s.fillTables(&cd) { cd.elog.LazyPrintf("fillTables failed for level: %d\n", l) - return false, nil + return errFillTables } } defer s.cstatus.delete(cd) // Remove the ranges from compaction status. @@ -705,12 +742,12 @@ func (s *levelsController) doCompact(p compactionPriority) (bool, error) { if err := s.runCompactDef(l, cd); err != nil { // This compaction couldn't be done successfully. cd.elog.LazyPrintf("\tLOG Compact FAILED with error: %+v: %+v", err, cd) - return false, err + return err } s.cstatus.toLog(cd.elog) cd.elog.LazyPrintf("Compaction for level: %d DONE", cd.thisLevel.level) - return true, nil + return nil } func (s *levelsController) addLevel0Table(t *table.Table) error { @@ -718,8 +755,8 @@ func (s *levelsController) addLevel0Table(t *table.Table) error { // point it could get used in some compaction. This ensures the manifest file gets updated in // the proper order. (That means this update happens before that of some compaction which // deletes the table.) - err := s.kv.manifest.addChanges([]*protos.ManifestChange{ - makeTableCreateChange(t.ID(), 0), + err := s.kv.manifest.addChanges([]*pb.ManifestChange{ + newCreateChange(t.ID(), 0, t.Checksum), }) if err != nil { return err @@ -810,15 +847,16 @@ func appendIteratorsReversed(out []y.Iterator, th []*table.Table, reversed bool) // appendIterators appends iterators to an array of iterators, for merging. // Note: This obtains references for the table handlers. Remember to close these iterators. func (s *levelsController) appendIterators( - iters []y.Iterator, reversed bool) []y.Iterator { + iters []y.Iterator, opt *IteratorOptions) []y.Iterator { // Just like with get, it's important we iterate the levels from 0 on upward, to avoid missing // data when there's a compaction. for _, level := range s.levels { - iters = level.appendIterators(iters, reversed) + iters = level.appendIterators(iters, opt) } return iters } +// TableInfo represents the information about a table. type TableInfo struct { ID uint64 Level int diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/logger.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/logger.go new file mode 100644 index 0000000000..c8e64c216c --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/logger.go @@ -0,0 +1,72 @@ +/* + * Copyright 2018 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "log" + "os" +) + +// Logger is implemented by any logging system that is used for standard logs. +type Logger interface { + Errorf(string, ...interface{}) + Infof(string, ...interface{}) + Warningf(string, ...interface{}) +} + +// Errorf logs an ERROR log message to the logger specified in opts or to the +// global logger if no logger is specified in opts. +func (opt *Options) Errorf(format string, v ...interface{}) { + if opt.Logger == nil { + return + } + opt.Logger.Errorf(format, v...) +} + +// Infof logs an INFO message to the logger specified in opts. +func (opt *Options) Infof(format string, v ...interface{}) { + if opt.Logger == nil { + return + } + opt.Logger.Infof(format, v...) +} + +// Warningf logs a WARNING message to the logger specified in opts. +func (opt *Options) Warningf(format string, v ...interface{}) { + if opt.Logger == nil { + return + } + opt.Logger.Warningf(format, v...) +} + +type defaultLog struct { + *log.Logger +} + +var defaultLogger = &defaultLog{Logger: log.New(os.Stderr, "badger ", log.LstdFlags)} + +func (l *defaultLog) Errorf(f string, v ...interface{}) { + l.Printf("ERROR: "+f, v...) +} + +func (l *defaultLog) Infof(f string, v ...interface{}) { + l.Printf("INFO: "+f, v...) +} + +func (l *defaultLog) Warningf(f string, v ...interface{}) { + l.Printf("WARNING: "+f, v...) +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/managed_db.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/managed_db.go new file mode 100644 index 0000000000..4de226ae25 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/managed_db.go @@ -0,0 +1,68 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +// OpenManaged returns a new DB, which allows more control over setting +// transaction timestamps, aka managed mode. +// +// This is only useful for databases built on top of Badger (like Dgraph), and +// can be ignored by most users. +func OpenManaged(opts Options) (*DB, error) { + opts.managedTxns = true + return Open(opts) +} + +// NewTransactionAt follows the same logic as DB.NewTransaction(), but uses the +// provided read timestamp. +// +// This is only useful for databases built on top of Badger (like Dgraph), and +// can be ignored by most users. +func (db *DB) NewTransactionAt(readTs uint64, update bool) *Txn { + if !db.opt.managedTxns { + panic("Cannot use NewTransactionAt with managedDB=false. Use NewTransaction instead.") + } + txn := db.newTransaction(update, true) + txn.readTs = readTs + return txn +} + +// CommitAt commits the transaction, following the same logic as Commit(), but +// at the given commit timestamp. This will panic if not used with managed transactions. +// +// This is only useful for databases built on top of Badger (like Dgraph), and +// can be ignored by most users. +func (txn *Txn) CommitAt(commitTs uint64, callback func(error)) error { + if !txn.db.opt.managedTxns { + panic("Cannot use CommitAt with managedDB=false. Use Commit instead.") + } + txn.commitTs = commitTs + if callback == nil { + return txn.Commit() + } + txn.CommitWith(callback) + return nil +} + +// SetDiscardTs sets a timestamp at or below which, any invalid or deleted +// versions can be discarded from the LSM tree, and thence from the value log to +// reclaim disk space. Can only be used with managed transactions. +func (db *DB) SetDiscardTs(ts uint64) { + if !db.opt.managedTxns { + panic("Cannot use SetDiscardTs with managedDB=false.") + } + db.orc.setDiscardTs(ts) +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/manifest.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/manifest.go similarity index 88% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/manifest.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/manifest.go index 55d36d7060..06a5b96be0 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/manifest.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/manifest.go @@ -27,9 +27,9 @@ import ( "path/filepath" "sync" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" ) // Manifest represents the contents of the MANIFEST file in a Badger store. @@ -42,7 +42,7 @@ import ( // reconstruct the manifest at startup. type Manifest struct { Levels []levelManifest - Tables map[uint64]tableManifest + Tables map[uint64]TableManifest // Contains total number of creation and deletion changes in the manifest -- used to compute // whether it'd be useful to rewrite the manifest. @@ -54,7 +54,7 @@ func createManifest() Manifest { levels := make([]levelManifest, 0) return Manifest{ Levels: levels, - Tables: make(map[uint64]tableManifest), + Tables: make(map[uint64]TableManifest), } } @@ -64,10 +64,11 @@ type levelManifest struct { Tables map[uint64]struct{} // Set of table id's } -// tableManifest contains information about a specific level +// TableManifest contains information about a specific level // in the LSM tree. -type tableManifest struct { - Level uint8 +type TableManifest struct { + Level uint8 + Checksum []byte } // manifestFile holds the file pointer (and other info) about the manifest file, which is a log @@ -95,16 +96,16 @@ const ( // asChanges returns a sequence of changes that could be used to recreate the Manifest in its // present state. -func (m *Manifest) asChanges() []*protos.ManifestChange { - changes := make([]*protos.ManifestChange, 0, len(m.Tables)) +func (m *Manifest) asChanges() []*pb.ManifestChange { + changes := make([]*pb.ManifestChange, 0, len(m.Tables)) for id, tm := range m.Tables { - changes = append(changes, makeTableCreateChange(id, int(tm.Level))) + changes = append(changes, newCreateChange(id, int(tm.Level), tm.Checksum)) } return changes } func (m *Manifest) clone() Manifest { - changeSet := protos.ManifestChangeSet{Changes: m.asChanges()} + changeSet := pb.ManifestChangeSet{Changes: m.asChanges()} ret := createManifest() y.Check(applyChangeSet(&ret, &changeSet)) return ret @@ -180,8 +181,8 @@ func (mf *manifestFile) close() error { // we replay the MANIFEST file, we'll either replay all the changes or none of them. (The truth of // this depends on the filesystem -- some might append garbage data if a system crash happens at // the wrong time.) -func (mf *manifestFile) addChanges(changesParam []*protos.ManifestChange) error { - changes := protos.ManifestChangeSet{Changes: changesParam} +func (mf *manifestFile) addChanges(changesParam []*pb.ManifestChange) error { + changes := pb.ManifestChangeSet{Changes: changesParam} buf, err := changes.Marshal() if err != nil { return err @@ -235,7 +236,7 @@ func helpRewrite(dir string, m *Manifest) (*os.File, int, error) { netCreations := len(m.Tables) changes := m.asChanges() - set := protos.ManifestChangeSet{Changes: changes} + set := pb.ManifestChangeSet{Changes: changes} changeBuf, err := set.Marshal() if err != nil { @@ -365,7 +366,7 @@ func ReplayManifestFile(fp *os.File) (ret Manifest, truncOffset int64, err error break } - var changeSet protos.ManifestChangeSet + var changeSet pb.ManifestChangeSet if err := changeSet.Unmarshal(buf); err != nil { return Manifest{}, 0, err } @@ -378,21 +379,22 @@ func ReplayManifestFile(fp *os.File) (ret Manifest, truncOffset int64, err error return build, offset, err } -func applyManifestChange(build *Manifest, tc *protos.ManifestChange) error { +func applyManifestChange(build *Manifest, tc *pb.ManifestChange) error { switch tc.Op { - case protos.ManifestChange_CREATE: + case pb.ManifestChange_CREATE: if _, ok := build.Tables[tc.Id]; ok { return fmt.Errorf("MANIFEST invalid, table %d exists", tc.Id) } - build.Tables[tc.Id] = tableManifest{ - Level: uint8(tc.Level), + build.Tables[tc.Id] = TableManifest{ + Level: uint8(tc.Level), + Checksum: append([]byte{}, tc.Checksum...), } for len(build.Levels) <= int(tc.Level) { build.Levels = append(build.Levels, levelManifest{make(map[uint64]struct{})}) } build.Levels[tc.Level].Tables[tc.Id] = struct{}{} build.Creations++ - case protos.ManifestChange_DELETE: + case pb.ManifestChange_DELETE: tm, ok := build.Tables[tc.Id] if !ok { return fmt.Errorf("MANIFEST removes non-existing table %d", tc.Id) @@ -408,7 +410,7 @@ func applyManifestChange(build *Manifest, tc *protos.ManifestChange) error { // This is not a "recoverable" error -- opening the KV store fails because the MANIFEST file is // just plain broken. -func applyChangeSet(build *Manifest, changeSet *protos.ManifestChangeSet) error { +func applyChangeSet(build *Manifest, changeSet *pb.ManifestChangeSet) error { for _, change := range changeSet.Changes { if err := applyManifestChange(build, change); err != nil { return err @@ -417,17 +419,18 @@ func applyChangeSet(build *Manifest, changeSet *protos.ManifestChangeSet) error return nil } -func makeTableCreateChange(id uint64, level int) *protos.ManifestChange { - return &protos.ManifestChange{ - Id: id, - Op: protos.ManifestChange_CREATE, - Level: uint32(level), +func newCreateChange(id uint64, level int, checksum []byte) *pb.ManifestChange { + return &pb.ManifestChange{ + Id: id, + Op: pb.ManifestChange_CREATE, + Level: uint32(level), + Checksum: checksum, } } -func makeTableDeleteChange(id uint64) *protos.ManifestChange { - return &protos.ManifestChange{ +func newDeleteChange(id uint64) *pb.ManifestChange { + return &pb.ManifestChange{ Id: id, - Op: protos.ManifestChange_DELETE, + Op: pb.ManifestChange_DELETE, } } diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/merge.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/merge.go new file mode 100644 index 0000000000..af35e1f4ca --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/merge.go @@ -0,0 +1,173 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "sync" + "time" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +// MergeOperator represents a Badger merge operator. +type MergeOperator struct { + sync.RWMutex + f MergeFunc + db *DB + key []byte + closer *y.Closer +} + +// MergeFunc accepts two byte slices, one representing an existing value, and +// another representing a new value that needs to be ‘merged’ into it. MergeFunc +// contains the logic to perform the ‘merge’ and return an updated value. +// MergeFunc could perform operations like integer addition, list appends etc. +// Note that the ordering of the operands is unspecified, so the merge func +// should either be agnostic to ordering or do additional handling if ordering +// is required. +type MergeFunc func(existing, val []byte) []byte + +// GetMergeOperator creates a new MergeOperator for a given key and returns a +// pointer to it. It also fires off a goroutine that performs a compaction using +// the merge function that runs periodically, as specified by dur. +func (db *DB) GetMergeOperator(key []byte, + f MergeFunc, dur time.Duration) *MergeOperator { + op := &MergeOperator{ + f: f, + db: db, + key: key, + closer: y.NewCloser(1), + } + + go op.runCompactions(dur) + return op +} + +var errNoMerge = errors.New("No need for merge") + +func (op *MergeOperator) iterateAndMerge(txn *Txn) (val []byte, err error) { + opt := DefaultIteratorOptions + opt.AllVersions = true + it := txn.NewIterator(opt) + defer it.Close() + + var numVersions int + for it.Rewind(); it.ValidForPrefix(op.key); it.Next() { + item := it.Item() + numVersions++ + if numVersions == 1 { + val, err = item.ValueCopy(val) + if err != nil { + return nil, err + } + } else { + if err := item.Value(func(newVal []byte) error { + val = op.f(val, newVal) + return nil + }); err != nil { + return nil, err + } + } + if item.DiscardEarlierVersions() { + break + } + } + if numVersions == 0 { + return nil, ErrKeyNotFound + } else if numVersions == 1 { + return val, errNoMerge + } + return val, nil +} + +func (op *MergeOperator) compact() error { + op.Lock() + defer op.Unlock() + err := op.db.Update(func(txn *Txn) error { + var ( + val []byte + err error + ) + val, err = op.iterateAndMerge(txn) + if err != nil { + return err + } + + // Write value back to db + return txn.SetWithDiscard(op.key, val, 0) + }) + + if err == ErrKeyNotFound || err == errNoMerge { + // pass. + } else if err != nil { + return err + } + return nil +} + +func (op *MergeOperator) runCompactions(dur time.Duration) { + ticker := time.NewTicker(dur) + defer op.closer.Done() + var stop bool + for { + select { + case <-op.closer.HasBeenClosed(): + stop = true + case <-ticker.C: // wait for tick + } + if err := op.compact(); err != nil { + op.db.opt.Errorf("failure while running merge operation: %s", err) + } + if stop { + ticker.Stop() + break + } + } +} + +// Add records a value in Badger which will eventually be merged by a background +// routine into the values that were recorded by previous invocations to Add(). +func (op *MergeOperator) Add(val []byte) error { + return op.db.Update(func(txn *Txn) error { + return txn.Set(op.key, val) + }) +} + +// Get returns the latest value for the merge operator, which is derived by +// applying the merge function to all the values added so far. +// +// If Add has not been called even once, Get will return ErrKeyNotFound. +func (op *MergeOperator) Get() ([]byte, error) { + op.RLock() + defer op.RUnlock() + var existing []byte + err := op.db.View(func(txn *Txn) (err error) { + existing, err = op.iterateAndMerge(txn) + return err + }) + if err == errNoMerge { + return existing, nil + } + return existing, err +} + +// Stop waits for any pending merge to complete and then stops the background +// goroutine. +func (op *MergeOperator) Stop() { + op.closer.SignalAndWait() +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options.go new file mode 100644 index 0000000000..cdfddbe741 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options.go @@ -0,0 +1,165 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options" +) + +// NOTE: Keep the comments in the following to 75 chars width, so they +// format nicely in godoc. + +// Options are params for creating DB object. +// +// This package provides DefaultOptions which contains options that should +// work for most applications. Consider using that as a starting point before +// customizing it for your own needs. +type Options struct { + // 1. Mandatory flags + // ------------------- + // Directory to store the data in. If it doesn't exist, Badger will + // try to create it for you. + Dir string + // Directory to store the value log in. Can be the same as Dir. If it + // doesn't exist, Badger will try to create it for you. + ValueDir string + + // 2. Frequently modified flags + // ----------------------------- + // Sync all writes to disk. Setting this to false would achieve better + // performance, but may cause data to be lost. + SyncWrites bool + + // How should LSM tree be accessed. + TableLoadingMode options.FileLoadingMode + + // How should value log be accessed. + ValueLogLoadingMode options.FileLoadingMode + + // How many versions to keep per key. + NumVersionsToKeep int + + // 3. Flags that user might want to review + // ---------------------------------------- + // The following affect all levels of LSM tree. + MaxTableSize int64 // Each table (or file) is at most this size. + LevelSizeMultiplier int // Equals SizeOf(Li+1)/SizeOf(Li). + MaxLevels int // Maximum number of levels of compaction. + // If value size >= this threshold, only store value offsets in tree. + ValueThreshold int + // Maximum number of tables to keep in memory, before stalling. + NumMemtables int + // The following affect how we handle LSM tree L0. + // Maximum number of Level 0 tables before we start compacting. + NumLevelZeroTables int + + // If we hit this number of Level 0 tables, we will stall until L0 is + // compacted away. + NumLevelZeroTablesStall int + + // Maximum total size for L1. + LevelOneSize int64 + + // Size of single value log file. + ValueLogFileSize int64 + + // Max number of entries a value log file can hold (approximately). A value log file would be + // determined by the smaller of its file size and max entries. + ValueLogMaxEntries uint32 + + // Number of compaction workers to run concurrently. Setting this to zero would stop compactions + // to happen within LSM tree. If set to zero, writes could block forever. + NumCompactors int + + // When closing the DB, force compact Level 0. This ensures that both reads and writes are + // efficient when the DB is opened later. + CompactL0OnClose bool + + // Transaction start and commit timestamps are managed by end-user. + // This is only useful for databases built on top of Badger (like Dgraph). + // Not recommended for most users. + managedTxns bool + + // 4. Flags for testing purposes + // ------------------------------ + maxBatchCount int64 // max entries in batch + maxBatchSize int64 // max batch size in bytes + + // Open the DB as read-only. With this set, multiple processes can + // open the same Badger DB. Note: if the DB being opened had crashed + // before and has vlog data to be replayed, ReadOnly will cause Open + // to fail with an appropriate message. + ReadOnly bool + + // Truncate value log to delete corrupt data, if any. Would not truncate if ReadOnly is set. + Truncate bool + + // DB-specific logger which will override the global logger. + Logger Logger +} + +// DefaultOptions sets a list of recommended options for good performance. +// Feel free to modify these to suit your needs. +var DefaultOptions = Options{ + LevelOneSize: 256 << 20, + LevelSizeMultiplier: 10, + TableLoadingMode: options.LoadToRAM, + ValueLogLoadingMode: options.MemoryMap, + // table.MemoryMap to mmap() the tables. + // table.Nothing to not preload the tables. + MaxLevels: 7, + MaxTableSize: 64 << 20, + NumCompactors: 2, // Compactions can be expensive. Only run 2. + NumLevelZeroTables: 5, + NumLevelZeroTablesStall: 10, + NumMemtables: 5, + SyncWrites: true, + NumVersionsToKeep: 1, + CompactL0OnClose: true, + // Nothing to read/write value log using standard File I/O + // MemoryMap to mmap() the value log files + // (2^30 - 1)*2 when mmapping < 2^31 - 1, max int32. + // -1 so 2*ValueLogFileSize won't overflow on 32-bit systems. + ValueLogFileSize: 1<<30 - 1, + + ValueLogMaxEntries: 1000000, + ValueThreshold: 32, + Truncate: false, + Logger: defaultLogger, +} + +// LSMOnlyOptions follows from DefaultOptions, but sets a higher ValueThreshold +// so values would be colocated with the LSM tree, with value log largely acting +// as a write-ahead log only. These options would reduce the disk usage of value +// log, and make Badger act more like a typical LSM tree. +var LSMOnlyOptions = Options{} + +func init() { + LSMOnlyOptions = DefaultOptions + + LSMOnlyOptions.ValueThreshold = 65500 // Max value length which fits in uint16. + // Let's not set any other options, because they can cause issues with the + // size of key-value a user can pass to Badger. For e.g., if we set + // ValueLogFileSize to 64MB, a user can't pass a value more than that. + // Setting it to ValueLogMaxEntries to 1000, can generate too many files. + // These options are better configured on a usage basis, than broadly here. + // The ValueThreshold is the most important setting a user needs to do to + // achieve a heavier usage of LSM tree. + // NOTE: If a user does not want to set 64KB as the ValueThreshold because + // of performance reasons, 1KB would be a good option too, allowing + // values smaller than 1KB to be colocated with the keys in the LSM tree. +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options/options.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options/options.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options/options.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options/options.go diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/package.json b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/package.json new file mode 100644 index 0000000000..86883fbb04 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/package.json @@ -0,0 +1,72 @@ +{ + "author": "dgraph-io", + "bugs": { + "url": "https://github.com/dgraph-io/badger" + }, + "gx": { + "dvcsimport": "github.com/dgraph-io/badger" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy", + "name": "errors", + "version": "0.0.1" + }, + { + "author": "magik6k", + "hash": "Qmbvv2urkn5Wtwws4yzjE85qRjB293EodchZofJsrTRuvN", + "name": "go-lz4", + "version": "1.0.0" + }, + { + "author": "kubuxu", + "hash": "QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf", + "name": "bbloom", + "version": "0.1.2" + }, + { + "author": "kubuxu", + "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", + "name": "sys", + "version": "0.2.0" + }, + { + "author": "whyrusleeping", + "hash": "QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn", + "name": "go-net", + "version": "0.2.0" + }, + { + "author": "magik6k", + "hash": "QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP", + "name": "go-farm", + "version": "1.0.0" + }, + { + "author": "magik6k", + "hash": "QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy", + "name": "go-humanize", + "version": "1.0.1" + }, + { + "author": "GoGo", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "magik6k", + "hash": "QmXj63M2w2Pq7mnBpcrs7Va8prmfhvfMUNqVhJ9TgjiMbT", + "name": "cobra", + "version": "0.0.1" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "Apache 2.0", + "name": "badger", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.11.4" +} + diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/gen.sh b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/gen.sh new file mode 100644 index 0000000000..bb446f26c9 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/gen.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# You might need to go get -v github.com/gogo/protobuf/... + +protos=${GOPATH-$HOME/go}/src/github.com/dgraph-io/badger/pb +pushd $protos > /dev/null +protoc --gogofaster_out=. -I=. pb.proto diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.pb.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.pb.go new file mode 100644 index 0000000000..147c581cea --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.pb.go @@ -0,0 +1,1236 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pb.proto + +package pb + +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type ManifestChange_Operation int32 + +const ( + ManifestChange_CREATE ManifestChange_Operation = 0 + ManifestChange_DELETE ManifestChange_Operation = 1 +) + +var ManifestChange_Operation_name = map[int32]string{ + 0: "CREATE", + 1: "DELETE", +} + +var ManifestChange_Operation_value = map[string]int32{ + "CREATE": 0, + "DELETE": 1, +} + +func (x ManifestChange_Operation) String() string { + return proto.EnumName(ManifestChange_Operation_name, int32(x)) +} + +func (ManifestChange_Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{3, 0} +} + +type KV struct { + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + UserMeta []byte `protobuf:"bytes,3,opt,name=user_meta,json=userMeta,proto3" json:"user_meta,omitempty"` + Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + ExpiresAt uint64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + Meta []byte `protobuf:"bytes,6,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (m *KV) Reset() { *m = KV{} } +func (m *KV) String() string { return proto.CompactTextString(m) } +func (*KV) ProtoMessage() {} +func (*KV) Descriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{0} +} +func (m *KV) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KV.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KV) XXX_Merge(src proto.Message) { + xxx_messageInfo_KV.Merge(m, src) +} +func (m *KV) XXX_Size() int { + return m.Size() +} +func (m *KV) XXX_DiscardUnknown() { + xxx_messageInfo_KV.DiscardUnknown(m) +} + +var xxx_messageInfo_KV proto.InternalMessageInfo + +func (m *KV) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *KV) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *KV) GetUserMeta() []byte { + if m != nil { + return m.UserMeta + } + return nil +} + +func (m *KV) GetVersion() uint64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *KV) GetExpiresAt() uint64 { + if m != nil { + return m.ExpiresAt + } + return 0 +} + +func (m *KV) GetMeta() []byte { + if m != nil { + return m.Meta + } + return nil +} + +type KVList struct { + Kv []*KV `protobuf:"bytes,1,rep,name=kv,proto3" json:"kv,omitempty"` +} + +func (m *KVList) Reset() { *m = KVList{} } +func (m *KVList) String() string { return proto.CompactTextString(m) } +func (*KVList) ProtoMessage() {} +func (*KVList) Descriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{1} +} +func (m *KVList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KVList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KVList.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KVList) XXX_Merge(src proto.Message) { + xxx_messageInfo_KVList.Merge(m, src) +} +func (m *KVList) XXX_Size() int { + return m.Size() +} +func (m *KVList) XXX_DiscardUnknown() { + xxx_messageInfo_KVList.DiscardUnknown(m) +} + +var xxx_messageInfo_KVList proto.InternalMessageInfo + +func (m *KVList) GetKv() []*KV { + if m != nil { + return m.Kv + } + return nil +} + +type ManifestChangeSet struct { + // A set of changes that are applied atomically. + Changes []*ManifestChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` +} + +func (m *ManifestChangeSet) Reset() { *m = ManifestChangeSet{} } +func (m *ManifestChangeSet) String() string { return proto.CompactTextString(m) } +func (*ManifestChangeSet) ProtoMessage() {} +func (*ManifestChangeSet) Descriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{2} +} +func (m *ManifestChangeSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManifestChangeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ManifestChangeSet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ManifestChangeSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManifestChangeSet.Merge(m, src) +} +func (m *ManifestChangeSet) XXX_Size() int { + return m.Size() +} +func (m *ManifestChangeSet) XXX_DiscardUnknown() { + xxx_messageInfo_ManifestChangeSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ManifestChangeSet proto.InternalMessageInfo + +func (m *ManifestChangeSet) GetChanges() []*ManifestChange { + if m != nil { + return m.Changes + } + return nil +} + +type ManifestChange struct { + Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` + Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=pb.ManifestChange_Operation" json:"Op,omitempty"` + Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"` + Checksum []byte `protobuf:"bytes,4,opt,name=Checksum,proto3" json:"Checksum,omitempty"` +} + +func (m *ManifestChange) Reset() { *m = ManifestChange{} } +func (m *ManifestChange) String() string { return proto.CompactTextString(m) } +func (*ManifestChange) ProtoMessage() {} +func (*ManifestChange) Descriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{3} +} +func (m *ManifestChange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManifestChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ManifestChange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ManifestChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManifestChange.Merge(m, src) +} +func (m *ManifestChange) XXX_Size() int { + return m.Size() +} +func (m *ManifestChange) XXX_DiscardUnknown() { + xxx_messageInfo_ManifestChange.DiscardUnknown(m) +} + +var xxx_messageInfo_ManifestChange proto.InternalMessageInfo + +func (m *ManifestChange) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *ManifestChange) GetOp() ManifestChange_Operation { + if m != nil { + return m.Op + } + return ManifestChange_CREATE +} + +func (m *ManifestChange) GetLevel() uint32 { + if m != nil { + return m.Level + } + return 0 +} + +func (m *ManifestChange) GetChecksum() []byte { + if m != nil { + return m.Checksum + } + return nil +} + +func init() { + proto.RegisterEnum("pb.ManifestChange_Operation", ManifestChange_Operation_name, ManifestChange_Operation_value) + proto.RegisterType((*KV)(nil), "pb.KV") + proto.RegisterType((*KVList)(nil), "pb.KVList") + proto.RegisterType((*ManifestChangeSet)(nil), "pb.ManifestChangeSet") + proto.RegisterType((*ManifestChange)(nil), "pb.ManifestChange") +} + +func init() { proto.RegisterFile("pb.proto", fileDescriptor_f80abaa17e25ccc8) } + +var fileDescriptor_f80abaa17e25ccc8 = []byte{ + // 349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x4b, 0x4e, 0xc2, 0x40, + 0x18, 0xc7, 0x3b, 0x43, 0x29, 0xf0, 0x89, 0x04, 0x27, 0xc6, 0x4c, 0x7c, 0x34, 0x4d, 0xdd, 0xb0, + 0x20, 0x5d, 0xe0, 0x09, 0x10, 0xbb, 0x20, 0x40, 0x48, 0x46, 0xc2, 0x96, 0xb4, 0x30, 0x4a, 0x53, + 0x68, 0x27, 0xed, 0xd0, 0xe8, 0x2d, 0x5c, 0x79, 0x03, 0xef, 0xe2, 0x92, 0xa5, 0x4b, 0x03, 0x17, + 0x31, 0x1d, 0x1e, 0x09, 0x71, 0xf7, 0x7f, 0xcc, 0xf7, 0x5f, 0xfc, 0x06, 0xca, 0xc2, 0x77, 0x44, + 0x12, 0xcb, 0x98, 0x60, 0xe1, 0xdb, 0x9f, 0x08, 0x70, 0x6f, 0x4c, 0xea, 0x50, 0x08, 0xf9, 0x3b, + 0x45, 0x16, 0x6a, 0x54, 0x59, 0x2e, 0xc9, 0x25, 0x14, 0x33, 0x6f, 0xb1, 0xe2, 0x14, 0xab, 0x6c, + 0x67, 0xc8, 0x0d, 0x54, 0x56, 0x29, 0x4f, 0x26, 0x4b, 0x2e, 0x3d, 0x5a, 0x50, 0x4d, 0x39, 0x0f, + 0x06, 0x5c, 0x7a, 0x84, 0x42, 0x29, 0xe3, 0x49, 0x1a, 0xc4, 0x11, 0xd5, 0x2d, 0xd4, 0xd0, 0xd9, + 0xc1, 0x92, 0x3b, 0x00, 0xfe, 0x26, 0x82, 0x84, 0xa7, 0x13, 0x4f, 0xd2, 0xa2, 0x2a, 0x2b, 0xfb, + 0xa4, 0x2d, 0x09, 0x01, 0x5d, 0x0d, 0x1a, 0x6a, 0x50, 0x69, 0xdb, 0x02, 0xa3, 0x37, 0xee, 0x07, + 0xa9, 0x24, 0x57, 0x80, 0xc3, 0x8c, 0x22, 0xab, 0xd0, 0x38, 0x6b, 0x19, 0x8e, 0xf0, 0x9d, 0xde, + 0x98, 0xe1, 0x30, 0xb3, 0xdb, 0x70, 0x31, 0xf0, 0xa2, 0xe0, 0x85, 0xa7, 0xb2, 0x33, 0xf7, 0xa2, + 0x57, 0xfe, 0xcc, 0x25, 0x69, 0x42, 0x69, 0xaa, 0x4c, 0xba, 0xbf, 0x20, 0xf9, 0xc5, 0xe9, 0x3b, + 0x76, 0x78, 0x62, 0x7f, 0x21, 0xa8, 0x9d, 0x76, 0xa4, 0x06, 0xb8, 0x3b, 0x53, 0x20, 0x74, 0x86, + 0xbb, 0x33, 0xd2, 0x04, 0x3c, 0x14, 0x0a, 0x42, 0xad, 0x75, 0xfb, 0x7f, 0xcb, 0x19, 0x0a, 0x9e, + 0x78, 0x32, 0x88, 0x23, 0x86, 0x87, 0x22, 0xa7, 0xd6, 0xe7, 0x19, 0x5f, 0x28, 0x36, 0xe7, 0x6c, + 0x67, 0xc8, 0x35, 0x94, 0x3b, 0x73, 0x3e, 0x0d, 0xd3, 0xd5, 0x52, 0x91, 0xa9, 0xb2, 0xa3, 0xb7, + 0xef, 0xa1, 0x72, 0x9c, 0x20, 0x00, 0x46, 0x87, 0xb9, 0xed, 0x91, 0x5b, 0xd7, 0x72, 0xfd, 0xe4, + 0xf6, 0xdd, 0x91, 0x5b, 0x47, 0x8f, 0xf4, 0x7b, 0x63, 0xa2, 0xf5, 0xc6, 0x44, 0xbf, 0x1b, 0x13, + 0x7d, 0x6c, 0x4d, 0x6d, 0xbd, 0x35, 0xb5, 0x9f, 0xad, 0xa9, 0xf9, 0x86, 0xfa, 0xca, 0x87, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xf9, 0xca, 0x14, 0xd6, 0x01, 0x00, 0x00, +} + +func (m *KV) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KV) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPb(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPb(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.UserMeta) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPb(dAtA, i, uint64(len(m.UserMeta))) + i += copy(dAtA[i:], m.UserMeta) + } + if m.Version != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintPb(dAtA, i, uint64(m.Version)) + } + if m.ExpiresAt != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintPb(dAtA, i, uint64(m.ExpiresAt)) + } + if len(m.Meta) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintPb(dAtA, i, uint64(len(m.Meta))) + i += copy(dAtA[i:], m.Meta) + } + return i, nil +} + +func (m *KVList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KVList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Kv) > 0 { + for _, msg := range m.Kv { + dAtA[i] = 0xa + i++ + i = encodeVarintPb(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ManifestChangeSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManifestChangeSet) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Changes) > 0 { + for _, msg := range m.Changes { + dAtA[i] = 0xa + i++ + i = encodeVarintPb(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ManifestChange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManifestChange) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPb(dAtA, i, uint64(m.Id)) + } + if m.Op != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintPb(dAtA, i, uint64(m.Op)) + } + if m.Level != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPb(dAtA, i, uint64(m.Level)) + } + if len(m.Checksum) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintPb(dAtA, i, uint64(len(m.Checksum))) + i += copy(dAtA[i:], m.Checksum) + } + return i, nil +} + +func encodeVarintPb(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *KV) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovPb(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovPb(uint64(l)) + } + l = len(m.UserMeta) + if l > 0 { + n += 1 + l + sovPb(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovPb(uint64(m.Version)) + } + if m.ExpiresAt != 0 { + n += 1 + sovPb(uint64(m.ExpiresAt)) + } + l = len(m.Meta) + if l > 0 { + n += 1 + l + sovPb(uint64(l)) + } + return n +} + +func (m *KVList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Kv) > 0 { + for _, e := range m.Kv { + l = e.Size() + n += 1 + l + sovPb(uint64(l)) + } + } + return n +} + +func (m *ManifestChangeSet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.Size() + n += 1 + l + sovPb(uint64(l)) + } + } + return n +} + +func (m *ManifestChange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPb(uint64(m.Id)) + } + if m.Op != 0 { + n += 1 + sovPb(uint64(m.Op)) + } + if m.Level != 0 { + n += 1 + sovPb(uint64(m.Level)) + } + l = len(m.Checksum) + if l > 0 { + n += 1 + l + sovPb(uint64(l)) + } + return n +} + +func sovPb(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozPb(x uint64) (n int) { + return sovPb(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KV) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KV: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KV: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserMeta", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserMeta = append(m.UserMeta[:0], dAtA[iNdEx:postIndex]...) + if m.UserMeta == nil { + m.UserMeta = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + } + m.ExpiresAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiresAt |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Meta = append(m.Meta[:0], dAtA[iNdEx:postIndex]...) + if m.Meta == nil { + m.Meta = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPb(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KVList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KVList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KVList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kv = append(m.Kv, &KV{}) + if err := m.Kv[len(m.Kv)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPb(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManifestChangeSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManifestChangeSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManifestChangeSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &ManifestChange{}) + if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPb(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManifestChange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManifestChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManifestChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + } + m.Op = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Op |= ManifestChange_Operation(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPb + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPb + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) + if m.Checksum == nil { + m.Checksum = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPb(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPb + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPb(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPb + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPb + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPb + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPb + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthPb + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPb + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipPb(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthPb + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthPb = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPb = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.proto b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.proto new file mode 100644 index 0000000000..b790cf69bd --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb/pb.proto @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2017 Dgraph Labs, Inc. and Contributors + * + * 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. + */ + +// Use protos/gen.sh to generate .pb.go files. +syntax = "proto3"; + +package pb; + +message KV { + bytes key = 1; + bytes value = 2; + bytes user_meta = 3; + uint64 version = 4; + uint64 expires_at = 5; + bytes meta = 6; +} + +message KVList { + repeated KV kv = 1; +} + +message ManifestChangeSet { + // A set of changes that are applied atomically. + repeated ManifestChange changes = 1; +} + +message ManifestChange { + uint64 Id = 1; + enum Operation { + CREATE = 0; + DELETE = 1; + } + Operation Op = 2; + uint32 Level = 3; // Only used for CREATE + bytes Checksum = 4; // Only used for CREATE +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/README.md b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/README.md similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/README.md rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/README.md diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/arena.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/arena.go similarity index 98% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/arena.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/arena.go index de716a4609..2decb75c6e 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/arena.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/arena.go @@ -20,7 +20,7 @@ import ( "sync/atomic" "unsafe" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" ) const ( diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/skl.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/skl.go similarity index 99% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/skl.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/skl.go index 352ab51acb..81a0506e9a 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/skl/skl.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/skl/skl.go @@ -38,7 +38,7 @@ import ( "sync/atomic" "unsafe" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" ) const ( diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/stream.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/stream.go new file mode 100644 index 0000000000..f40e5a2e7b --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/stream.go @@ -0,0 +1,347 @@ +/* + * Copyright 2018 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "bytes" + "context" + "sync" + "time" + + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/pb" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" +) + +const pageSize = 4 << 20 // 4MB + +// Stream provides a framework to concurrently iterate over a snapshot of Badger, pick up +// key-values, batch them up and call Send. Stream does concurrent iteration over many smaller key +// ranges. It does NOT send keys in lexicographical sorted order. To get keys in sorted +// order, use Iterator. +type Stream struct { + // Prefix to only iterate over certain range of keys. If set to nil (default), Stream would + // iterate over the entire DB. + Prefix []byte + + // Number of goroutines to use for iterating over key ranges. Defaults to 16. + NumGo int + + // Badger would produce log entries in Infof to indicate the progress of Stream. LogPrefix can + // be used to help differentiate them from other activities. Default is "Badger.Stream". + LogPrefix string + + // ChooseKey is invoked each time a new key is encountered. Note that this is not called + // on every version of the value, only the first encountered version (i.e. the highest version + // of the value a key has). ChooseKey can be left nil to select all keys. + // + // Note: Calls to ChooseKey are concurrent. + ChooseKey func(item *Item) bool + + // KeyToList, similar to ChooseKey, is only invoked on the highest version of the value. It + // is upto the caller to iterate over the versions and generate zero, one or more KVs. It + // is expected that the user would advance the iterator to go through the versions of the + // values. However, the user MUST immediately return from this function on the first encounter + // with a mismatching key. See example usage in ToList function. Can be left nil to use ToList + // function by default. + // + // Note: Calls to KeyToList are concurrent. + KeyToList func(key []byte, itr *Iterator) (*pb.KVList, error) + + // This is the method where Stream sends the final output. All calls to Send are done by a + // single goroutine, i.e. logic within Send method can expect single threaded execution. + Send func(*pb.KVList) error + + readTs uint64 + db *DB + rangeCh chan keyRange + kvChan chan *pb.KVList +} + +// ToList is a default implementation of KeyToList. It picks up all valid versions of the key, +// skipping over deleted or expired keys. +func (st *Stream) ToList(key []byte, itr *Iterator) (*pb.KVList, error) { + list := &pb.KVList{} + for ; itr.Valid(); itr.Next() { + item := itr.Item() + if item.IsDeletedOrExpired() { + break + } + if !bytes.Equal(key, item.Key()) { + // Break out on the first encounter with another key. + break + } + + valCopy, err := item.ValueCopy(nil) + if err != nil { + return nil, err + } + kv := &pb.KV{ + Key: item.KeyCopy(nil), + Value: valCopy, + UserMeta: []byte{item.UserMeta()}, + Version: item.Version(), + ExpiresAt: item.ExpiresAt(), + } + list.Kv = append(list.Kv, kv) + if st.db.opt.NumVersionsToKeep == 1 { + break + } + + if item.DiscardEarlierVersions() { + break + } + } + return list, nil +} + +// keyRange is [start, end), including start, excluding end. Do ensure that the start, +// end byte slices are owned by keyRange struct. +func (st *Stream) produceRanges(ctx context.Context) { + splits := st.db.KeySplits(st.Prefix) + start := y.SafeCopy(nil, st.Prefix) + for _, key := range splits { + st.rangeCh <- keyRange{left: start, right: y.SafeCopy(nil, []byte(key))} + start = y.SafeCopy(nil, []byte(key)) + } + // Edge case: prefix is empty and no splits exist. In that case, we should have at least one + // keyRange output. + st.rangeCh <- keyRange{left: start} + close(st.rangeCh) +} + +// produceKVs picks up ranges from rangeCh, generates KV lists and sends them to kvChan. +func (st *Stream) produceKVs(ctx context.Context) error { + var size int + var txn *Txn + if st.readTs > 0 { + txn = st.db.NewTransactionAt(st.readTs, false) + } else { + txn = st.db.NewTransaction(false) + } + defer txn.Discard() + + iterate := func(kr keyRange) error { + iterOpts := DefaultIteratorOptions + iterOpts.AllVersions = true + iterOpts.Prefix = st.Prefix + iterOpts.PrefetchValues = false + itr := txn.NewIterator(iterOpts) + defer itr.Close() + + outList := new(pb.KVList) + var prevKey []byte + for itr.Seek(kr.left); itr.Valid(); { + // it.Valid would only return true for keys with the provided Prefix in iterOpts. + item := itr.Item() + if bytes.Equal(item.Key(), prevKey) { + itr.Next() + continue + } + prevKey = append(prevKey[:0], item.Key()...) + + // Check if we reached the end of the key range. + if len(kr.right) > 0 && bytes.Compare(item.Key(), kr.right) >= 0 { + break + } + // Check if we should pick this key. + if st.ChooseKey != nil && !st.ChooseKey(item) { + continue + } + + // Now convert to key value. + list, err := st.KeyToList(item.KeyCopy(nil), itr) + if err != nil { + return err + } + if list == nil || len(list.Kv) == 0 { + continue + } + outList.Kv = append(outList.Kv, list.Kv...) + size += list.Size() + if size >= pageSize { + st.kvChan <- outList + outList = new(pb.KVList) + size = 0 + } + } + if len(outList.Kv) > 0 { + st.kvChan <- outList + } + return nil + } + + for { + select { + case kr, ok := <-st.rangeCh: + if !ok { + // Done with the keys. + return nil + } + if err := iterate(kr); err != nil { + return err + } + case <-ctx.Done(): + return ctx.Err() + } + } +} + +func (st *Stream) streamKVs(ctx context.Context) error { + var count int + var bytesSent uint64 + t := time.NewTicker(time.Second) + defer t.Stop() + now := time.Now() + + slurp := func(batch *pb.KVList) error { + loop: + for { + select { + case kvs, ok := <-st.kvChan: + if !ok { + break loop + } + y.AssertTrue(kvs != nil) + batch.Kv = append(batch.Kv, kvs.Kv...) + default: + break loop + } + } + sz := uint64(batch.Size()) + bytesSent += sz + count += len(batch.Kv) + t := time.Now() + if err := st.Send(batch); err != nil { + return err + } + st.db.opt.Infof("%s Created batch of size: %s in %s.\n", + st.LogPrefix, humanize.Bytes(sz), time.Since(t)) + return nil + } + +outer: + for { + var batch *pb.KVList + select { + case <-ctx.Done(): + return ctx.Err() + + case <-t.C: + dur := time.Since(now) + durSec := uint64(dur.Seconds()) + if durSec == 0 { + continue + } + speed := bytesSent / durSec + st.db.opt.Infof("%s Time elapsed: %s, bytes sent: %s, speed: %s/sec\n", st.LogPrefix, + y.FixedDuration(dur), humanize.Bytes(bytesSent), humanize.Bytes(speed)) + + case kvs, ok := <-st.kvChan: + if !ok { + break outer + } + y.AssertTrue(kvs != nil) + batch = kvs + if err := slurp(batch); err != nil { + return err + } + } + } + + st.db.opt.Infof("%s Sent %d keys\n", st.LogPrefix, count) + return nil +} + +// Orchestrate runs Stream. It picks up ranges from the SSTables, then runs NumGo number of +// goroutines to iterate over these ranges and batch up KVs in lists. It concurrently runs a single +// goroutine to pick these lists, batch them up further and send to Output.Send. Orchestrate also +// spits logs out to Infof, using provided LogPrefix. Note that all calls to Output.Send +// are serial. In case any of these steps encounter an error, Orchestrate would stop execution and +// return that error. Orchestrate can be called multiple times, but in serial order. +func (st *Stream) Orchestrate(ctx context.Context) error { + st.rangeCh = make(chan keyRange, 3) // Contains keys for posting lists. + + // kvChan should only have a small capacity to ensure that we don't buffer up too much data if + // sending is slow. Page size is set to 4MB, which is used to lazily cap the size of each + // KVList. To get around 64MB buffer, we can set the channel size to 16. + st.kvChan = make(chan *pb.KVList, 16) + + if st.KeyToList == nil { + st.KeyToList = st.ToList + } + + // Picks up ranges from Badger, and sends them to rangeCh. + go st.produceRanges(ctx) + + errCh := make(chan error, 1) // Stores error by consumeKeys. + var wg sync.WaitGroup + for i := 0; i < st.NumGo; i++ { + wg.Add(1) + go func() { + defer wg.Done() + // Picks up ranges from rangeCh, generates KV lists, and sends them to kvChan. + if err := st.produceKVs(ctx); err != nil { + select { + case errCh <- err: + default: + } + } + }() + } + + // Pick up key-values from kvChan and send to stream. + kvErr := make(chan error, 1) + go func() { + // Picks up KV lists from kvChan, and sends them to Output. + kvErr <- st.streamKVs(ctx) + }() + wg.Wait() // Wait for produceKVs to be over. + close(st.kvChan) // Now we can close kvChan. + + select { + case err := <-errCh: // Check error from produceKVs. + return err + default: + } + + // Wait for key streaming to be over. + err := <-kvErr + return err +} + +func (db *DB) newStream() *Stream { + return &Stream{db: db, NumGo: 16, LogPrefix: "Badger.Stream"} +} + +// NewStream creates a new Stream. +func (db *DB) NewStream() *Stream { + if db.opt.managedTxns { + panic("This API can not be called in managed mode.") + } + return db.newStream() +} + +// NewStreamAt creates a new Stream at a particular timestamp. Should only be used with managed DB. +func (db *DB) NewStreamAt(readTs uint64) *Stream { + if !db.opt.managedTxns { + panic("This API can only be called in managed mode.") + } + stream := db.newStream() + stream.readTs = readTs + return stream +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/structs.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/structs.go similarity index 97% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/structs.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/structs.go index 09be20b8d5..eaeeb1d42c 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/structs.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/structs.go @@ -6,7 +6,7 @@ import ( "fmt" "hash/crc32" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" ) type valuePointer struct { diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/README.md b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/README.md similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/README.md rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/README.md diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/builder.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/builder.go new file mode 100644 index 0000000000..a19c6589ea --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/builder.go @@ -0,0 +1,235 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 table + +import ( + "bytes" + "encoding/binary" + "io" + "math" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom" +) + +var ( + restartInterval = 100 // Might want to change this to be based on total size instead of numKeys. +) + +func newBuffer(sz int) *bytes.Buffer { + b := new(bytes.Buffer) + b.Grow(sz) + return b +} + +type header struct { + plen uint16 // Overlap with base key. + klen uint16 // Length of the diff. + vlen uint16 // Length of value. + prev uint32 // Offset for the previous key-value pair. The offset is relative to block base offset. +} + +// Encode encodes the header. +func (h header) Encode(b []byte) { + binary.BigEndian.PutUint16(b[0:2], h.plen) + binary.BigEndian.PutUint16(b[2:4], h.klen) + binary.BigEndian.PutUint16(b[4:6], h.vlen) + binary.BigEndian.PutUint32(b[6:10], h.prev) +} + +// Decode decodes the header. +func (h *header) Decode(buf []byte) int { + h.plen = binary.BigEndian.Uint16(buf[0:2]) + h.klen = binary.BigEndian.Uint16(buf[2:4]) + h.vlen = binary.BigEndian.Uint16(buf[4:6]) + h.prev = binary.BigEndian.Uint32(buf[6:10]) + return h.Size() +} + +// Size returns size of the header. Currently it's just a constant. +func (h header) Size() int { return 10 } + +// Builder is used in building a table. +type Builder struct { + counter int // Number of keys written for the current block. + + // Typically tens or hundreds of meg. This is for one single file. + buf *bytes.Buffer + + baseKey []byte // Base key for the current block. + baseOffset uint32 // Offset for the current block. + + restarts []uint32 // Base offsets of every block. + + // Tracks offset for the previous key-value pair. Offset is relative to block base offset. + prevOffset uint32 + + keyBuf *bytes.Buffer + keyCount int +} + +// NewTableBuilder makes a new TableBuilder. +func NewTableBuilder() *Builder { + return &Builder{ + keyBuf: newBuffer(1 << 20), + buf: newBuffer(1 << 20), + prevOffset: math.MaxUint32, // Used for the first element! + } +} + +// Close closes the TableBuilder. +func (b *Builder) Close() {} + +// Empty returns whether it's empty. +func (b *Builder) Empty() bool { return b.buf.Len() == 0 } + +// keyDiff returns a suffix of newKey that is different from b.baseKey. +func (b Builder) keyDiff(newKey []byte) []byte { + var i int + for i = 0; i < len(newKey) && i < len(b.baseKey); i++ { + if newKey[i] != b.baseKey[i] { + break + } + } + return newKey[i:] +} + +func (b *Builder) addHelper(key []byte, v y.ValueStruct) { + // Add key to bloom filter. + if len(key) > 0 { + var klen [2]byte + keyNoTs := y.ParseKey(key) + binary.BigEndian.PutUint16(klen[:], uint16(len(keyNoTs))) + b.keyBuf.Write(klen[:]) + b.keyBuf.Write(keyNoTs) + b.keyCount++ + } + + // diffKey stores the difference of key with baseKey. + var diffKey []byte + if len(b.baseKey) == 0 { + // Make a copy. Builder should not keep references. Otherwise, caller has to be very careful + // and will have to make copies of keys every time they add to builder, which is even worse. + b.baseKey = append(b.baseKey[:0], key...) + diffKey = key + } else { + diffKey = b.keyDiff(key) + } + + h := header{ + plen: uint16(len(key) - len(diffKey)), + klen: uint16(len(diffKey)), + vlen: uint16(v.EncodedSize()), + prev: b.prevOffset, // prevOffset is the location of the last key-value added. + } + b.prevOffset = uint32(b.buf.Len()) - b.baseOffset // Remember current offset for the next Add call. + + // Layout: header, diffKey, value. + var hbuf [10]byte + h.Encode(hbuf[:]) + b.buf.Write(hbuf[:]) + b.buf.Write(diffKey) // We only need to store the key difference. + + v.EncodeTo(b.buf) + b.counter++ // Increment number of keys added for this current block. +} + +func (b *Builder) finishBlock() { + // When we are at the end of the block and Valid=false, and the user wants to do a Prev, + // we need a dummy header to tell us the offset of the previous key-value pair. + b.addHelper([]byte{}, y.ValueStruct{}) +} + +// Add adds a key-value pair to the block. +// If doNotRestart is true, we will not restart even if b.counter >= restartInterval. +func (b *Builder) Add(key []byte, value y.ValueStruct) error { + if b.counter >= restartInterval { + b.finishBlock() + // Start a new block. Initialize the block. + b.restarts = append(b.restarts, uint32(b.buf.Len())) + b.counter = 0 + b.baseKey = []byte{} + b.baseOffset = uint32(b.buf.Len()) + b.prevOffset = math.MaxUint32 // First key-value pair of block has header.prev=MaxInt. + } + b.addHelper(key, value) + return nil // Currently, there is no meaningful error. +} + +// TODO: vvv this was the comment on ReachedCapacity. +// FinalSize returns the *rough* final size of the array, counting the header which is not yet written. +// TODO: Look into why there is a discrepancy. I suspect it is because of Write(empty, empty) +// at the end. The diff can vary. + +// ReachedCapacity returns true if we... roughly (?) reached capacity? +func (b *Builder) ReachedCapacity(cap int64) bool { + estimateSz := b.buf.Len() + 8 /* empty header */ + 4*len(b.restarts) + 8 // 8 = end of buf offset + len(restarts). + return int64(estimateSz) > cap +} + +// blockIndex generates the block index for the table. +// It is mainly a list of all the block base offsets. +func (b *Builder) blockIndex() []byte { + // Store the end offset, so we know the length of the final block. + b.restarts = append(b.restarts, uint32(b.buf.Len())) + + // Add 4 because we want to write out number of restarts at the end. + sz := 4*len(b.restarts) + 4 + out := make([]byte, sz) + buf := out + for _, r := range b.restarts { + binary.BigEndian.PutUint32(buf[:4], r) + buf = buf[4:] + } + binary.BigEndian.PutUint32(buf[:4], uint32(len(b.restarts))) + return out +} + +// Finish finishes the table by appending the index. +func (b *Builder) Finish() []byte { + bf, _ := bbloom.New(float64(b.keyCount), 0.01) + var klen [2]byte + key := make([]byte, 1024) + for { + if _, err := b.keyBuf.Read(klen[:]); err == io.EOF { + break + } else if err != nil { + y.Check(err) + } + kl := int(binary.BigEndian.Uint16(klen[:])) + if cap(key) < kl { + key = make([]byte, 2*int(kl)) // 2 * uint16 will overflow + } + key = key[:kl] + y.Check2(b.keyBuf.Read(key)) + bf.Add(key) + } + + b.finishBlock() // This will never start a new block. + index := b.blockIndex() + b.buf.Write(index) + + // Write bloom filter. + bdata, _ := bf.JSONMarshal() + n, err := b.buf.Write(bdata) + y.Check(err) + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], uint32(n)) + b.buf.Write(buf[:]) + + return b.buf.Bytes() +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/iterator.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/iterator.go new file mode 100644 index 0000000000..28feb99e95 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/iterator.go @@ -0,0 +1,539 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 table + +import ( + "bytes" + "io" + "math" + "sort" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +type blockIterator struct { + data []byte + pos uint32 + err error + baseKey []byte + + key []byte + val []byte + init bool + + last header // The last header we saw. +} + +func (itr *blockIterator) Reset() { + itr.pos = 0 + itr.err = nil + itr.baseKey = []byte{} + itr.key = []byte{} + itr.val = []byte{} + itr.init = false + itr.last = header{} +} + +func (itr *blockIterator) Init() { + if !itr.init { + itr.Next() + } +} + +func (itr *blockIterator) Valid() bool { + return itr != nil && itr.err == nil +} + +func (itr *blockIterator) Error() error { + return itr.err +} + +func (itr *blockIterator) Close() {} + +var ( + origin = 0 + current = 1 +) + +// Seek brings us to the first block element that is >= input key. +func (itr *blockIterator) Seek(key []byte, whence int) { + itr.err = nil + + switch whence { + case origin: + itr.Reset() + case current: + } + + var done bool + for itr.Init(); itr.Valid(); itr.Next() { + k := itr.Key() + if y.CompareKeys(k, key) >= 0 { + // We are done as k is >= key. + done = true + break + } + } + if !done { + itr.err = io.EOF + } +} + +func (itr *blockIterator) SeekToFirst() { + itr.err = nil + itr.Init() +} + +// SeekToLast brings us to the last element. Valid should return true. +func (itr *blockIterator) SeekToLast() { + itr.err = nil + for itr.Init(); itr.Valid(); itr.Next() { + } + itr.Prev() +} + +// parseKV would allocate a new byte slice for key and for value. +func (itr *blockIterator) parseKV(h header) { + if cap(itr.key) < int(h.plen+h.klen) { + sz := int(h.plen) + int(h.klen) // Convert to int before adding to avoid uint16 overflow. + itr.key = make([]byte, 2*sz) + } + itr.key = itr.key[:h.plen+h.klen] + copy(itr.key, itr.baseKey[:h.plen]) + copy(itr.key[h.plen:], itr.data[itr.pos:itr.pos+uint32(h.klen)]) + itr.pos += uint32(h.klen) + + if itr.pos+uint32(h.vlen) > uint32(len(itr.data)) { + itr.err = errors.Errorf("Value exceeded size of block: %d %d %d %d %v", + itr.pos, h.klen, h.vlen, len(itr.data), h) + return + } + itr.val = y.SafeCopy(itr.val, itr.data[itr.pos:itr.pos+uint32(h.vlen)]) + itr.pos += uint32(h.vlen) +} + +func (itr *blockIterator) Next() { + itr.init = true + itr.err = nil + if itr.pos >= uint32(len(itr.data)) { + itr.err = io.EOF + return + } + + var h header + itr.pos += uint32(h.Decode(itr.data[itr.pos:])) + itr.last = h // Store the last header. + + if h.klen == 0 && h.plen == 0 { + // Last entry in the table. + itr.err = io.EOF + return + } + + // Populate baseKey if it isn't set yet. This would only happen for the first Next. + if len(itr.baseKey) == 0 { + // This should be the first Next() for this block. Hence, prefix length should be zero. + y.AssertTrue(h.plen == 0) + itr.baseKey = itr.data[itr.pos : itr.pos+uint32(h.klen)] + } + itr.parseKV(h) +} + +func (itr *blockIterator) Prev() { + if !itr.init { + return + } + itr.err = nil + if itr.last.prev == math.MaxUint32 { + // This is the first element of the block! + itr.err = io.EOF + itr.pos = 0 + return + } + + // Move back using current header's prev. + itr.pos = itr.last.prev + + var h header + y.AssertTruef(itr.pos < uint32(len(itr.data)), "%d %d", itr.pos, len(itr.data)) + itr.pos += uint32(h.Decode(itr.data[itr.pos:])) + itr.parseKV(h) + itr.last = h +} + +func (itr *blockIterator) Key() []byte { + if itr.err != nil { + return nil + } + return itr.key +} + +func (itr *blockIterator) Value() []byte { + if itr.err != nil { + return nil + } + return itr.val +} + +// Iterator is an iterator for a Table. +type Iterator struct { + t *Table + bpos int + bi *blockIterator + err error + + // Internally, Iterator is bidirectional. However, we only expose the + // unidirectional functionality for now. + reversed bool +} + +// NewIterator returns a new iterator of the Table +func (t *Table) NewIterator(reversed bool) *Iterator { + t.IncrRef() // Important. + ti := &Iterator{t: t, reversed: reversed} + ti.next() + return ti +} + +// Close closes the iterator (and it must be called). +func (itr *Iterator) Close() error { + return itr.t.DecrRef() +} + +func (itr *Iterator) reset() { + itr.bpos = 0 + itr.err = nil +} + +// Valid follows the y.Iterator interface +func (itr *Iterator) Valid() bool { + return itr.err == nil +} + +func (itr *Iterator) seekToFirst() { + numBlocks := len(itr.t.blockIndex) + if numBlocks == 0 { + itr.err = io.EOF + return + } + itr.bpos = 0 + block, err := itr.t.block(itr.bpos) + if err != nil { + itr.err = err + return + } + itr.bi = block.NewIterator() + itr.bi.SeekToFirst() + itr.err = itr.bi.Error() +} + +func (itr *Iterator) seekToLast() { + numBlocks := len(itr.t.blockIndex) + if numBlocks == 0 { + itr.err = io.EOF + return + } + itr.bpos = numBlocks - 1 + block, err := itr.t.block(itr.bpos) + if err != nil { + itr.err = err + return + } + itr.bi = block.NewIterator() + itr.bi.SeekToLast() + itr.err = itr.bi.Error() +} + +func (itr *Iterator) seekHelper(blockIdx int, key []byte) { + itr.bpos = blockIdx + block, err := itr.t.block(blockIdx) + if err != nil { + itr.err = err + return + } + itr.bi = block.NewIterator() + itr.bi.Seek(key, origin) + itr.err = itr.bi.Error() +} + +// seekFrom brings us to a key that is >= input key. +func (itr *Iterator) seekFrom(key []byte, whence int) { + itr.err = nil + switch whence { + case origin: + itr.reset() + case current: + } + + idx := sort.Search(len(itr.t.blockIndex), func(idx int) bool { + ko := itr.t.blockIndex[idx] + return y.CompareKeys(ko.key, key) > 0 + }) + if idx == 0 { + // The smallest key in our table is already strictly > key. We can return that. + // This is like a SeekToFirst. + itr.seekHelper(0, key) + return + } + + // block[idx].smallest is > key. + // Since idx>0, we know block[idx-1].smallest is <= key. + // There are two cases. + // 1) Everything in block[idx-1] is strictly < key. In this case, we should go to the first + // element of block[idx]. + // 2) Some element in block[idx-1] is >= key. We should go to that element. + itr.seekHelper(idx-1, key) + if itr.err == io.EOF { + // Case 1. Need to visit block[idx]. + if idx == len(itr.t.blockIndex) { + // If idx == len(itr.t.blockIndex), then input key is greater than ANY element of table. + // There's nothing we can do. Valid() should return false as we seek to end of table. + return + } + // Since block[idx].smallest is > key. This is essentially a block[idx].SeekToFirst. + itr.seekHelper(idx, key) + } + // Case 2: No need to do anything. We already did the seek in block[idx-1]. +} + +// seek will reset iterator and seek to >= key. +func (itr *Iterator) seek(key []byte) { + itr.seekFrom(key, origin) +} + +// seekForPrev will reset iterator and seek to <= key. +func (itr *Iterator) seekForPrev(key []byte) { + // TODO: Optimize this. We shouldn't have to take a Prev step. + itr.seekFrom(key, origin) + if !bytes.Equal(itr.Key(), key) { + itr.prev() + } +} + +func (itr *Iterator) next() { + itr.err = nil + + if itr.bpos >= len(itr.t.blockIndex) { + itr.err = io.EOF + return + } + + if itr.bi == nil { + block, err := itr.t.block(itr.bpos) + if err != nil { + itr.err = err + return + } + itr.bi = block.NewIterator() + itr.bi.SeekToFirst() + itr.err = itr.bi.Error() + return + } + + itr.bi.Next() + if !itr.bi.Valid() { + itr.bpos++ + itr.bi = nil + itr.next() + return + } +} + +func (itr *Iterator) prev() { + itr.err = nil + if itr.bpos < 0 { + itr.err = io.EOF + return + } + + if itr.bi == nil { + block, err := itr.t.block(itr.bpos) + if err != nil { + itr.err = err + return + } + itr.bi = block.NewIterator() + itr.bi.SeekToLast() + itr.err = itr.bi.Error() + return + } + + itr.bi.Prev() + if !itr.bi.Valid() { + itr.bpos-- + itr.bi = nil + itr.prev() + return + } +} + +// Key follows the y.Iterator interface +func (itr *Iterator) Key() []byte { + return itr.bi.Key() +} + +// Value follows the y.Iterator interface +func (itr *Iterator) Value() (ret y.ValueStruct) { + ret.Decode(itr.bi.Value()) + return +} + +// Next follows the y.Iterator interface +func (itr *Iterator) Next() { + if !itr.reversed { + itr.next() + } else { + itr.prev() + } +} + +// Rewind follows the y.Iterator interface +func (itr *Iterator) Rewind() { + if !itr.reversed { + itr.seekToFirst() + } else { + itr.seekToLast() + } +} + +// Seek follows the y.Iterator interface +func (itr *Iterator) Seek(key []byte) { + if !itr.reversed { + itr.seek(key) + } else { + itr.seekForPrev(key) + } +} + +// ConcatIterator concatenates the sequences defined by several iterators. (It only works with +// TableIterators, probably just because it's faster to not be so generic.) +type ConcatIterator struct { + idx int // Which iterator is active now. + cur *Iterator + iters []*Iterator // Corresponds to tables. + tables []*Table // Disregarding reversed, this is in ascending order. + reversed bool +} + +// NewConcatIterator creates a new concatenated iterator +func NewConcatIterator(tbls []*Table, reversed bool) *ConcatIterator { + iters := make([]*Iterator, len(tbls)) + for i := 0; i < len(tbls); i++ { + iters[i] = tbls[i].NewIterator(reversed) + } + return &ConcatIterator{ + reversed: reversed, + iters: iters, + tables: tbls, + idx: -1, // Not really necessary because s.it.Valid()=false, but good to have. + } +} + +func (s *ConcatIterator) setIdx(idx int) { + s.idx = idx + if idx < 0 || idx >= len(s.iters) { + s.cur = nil + } else { + s.cur = s.iters[s.idx] + } +} + +// Rewind implements y.Interface +func (s *ConcatIterator) Rewind() { + if len(s.iters) == 0 { + return + } + if !s.reversed { + s.setIdx(0) + } else { + s.setIdx(len(s.iters) - 1) + } + s.cur.Rewind() +} + +// Valid implements y.Interface +func (s *ConcatIterator) Valid() bool { + return s.cur != nil && s.cur.Valid() +} + +// Key implements y.Interface +func (s *ConcatIterator) Key() []byte { + return s.cur.Key() +} + +// Value implements y.Interface +func (s *ConcatIterator) Value() y.ValueStruct { + return s.cur.Value() +} + +// Seek brings us to element >= key if reversed is false. Otherwise, <= key. +func (s *ConcatIterator) Seek(key []byte) { + var idx int + if !s.reversed { + idx = sort.Search(len(s.tables), func(i int) bool { + return y.CompareKeys(s.tables[i].Biggest(), key) >= 0 + }) + } else { + n := len(s.tables) + idx = n - 1 - sort.Search(n, func(i int) bool { + return y.CompareKeys(s.tables[n-1-i].Smallest(), key) <= 0 + }) + } + if idx >= len(s.tables) || idx < 0 { + s.setIdx(-1) + return + } + // For reversed=false, we know s.tables[i-1].Biggest() < key. Thus, the + // previous table cannot possibly contain key. + s.setIdx(idx) + s.cur.Seek(key) +} + +// Next advances our concat iterator. +func (s *ConcatIterator) Next() { + s.cur.Next() + if s.cur.Valid() { + // Nothing to do. Just stay with the current table. + return + } + for { // In case there are empty tables. + if !s.reversed { + s.setIdx(s.idx + 1) + } else { + s.setIdx(s.idx - 1) + } + if s.cur == nil { + // End of list. Valid will become false. + return + } + s.cur.Rewind() + if s.cur.Valid() { + break + } + } +} + +// Close implements y.Interface. +func (s *ConcatIterator) Close() error { + for _, it := range s.iters { + if err := it.Close(); err != nil { + return errors.Wrap(err, "ConcatIterator") + } + } + return nil +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/table.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/table.go new file mode 100644 index 0000000000..f81193467c --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table/table.go @@ -0,0 +1,356 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 table + +import ( + "bytes" + "crypto/sha256" + "encoding/binary" + "fmt" + "io" + "os" + "path" + "path/filepath" + "strconv" + "strings" + "sync" + "sync/atomic" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" + "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom" +) + +const fileSuffix = ".sst" + +type keyOffset struct { + key []byte + offset int + len int +} + +// TableInterface is useful for testing. +type TableInterface interface { + Smallest() []byte + Biggest() []byte + DoesNotHave(key []byte) bool +} + +// Table represents a loaded table file with the info we have about it +type Table struct { + sync.Mutex + + fd *os.File // Own fd. + tableSize int // Initialized in OpenTable, using fd.Stat(). + + blockIndex []keyOffset + ref int32 // For file garbage collection. Atomic. + + loadingMode options.FileLoadingMode + mmap []byte // Memory mapped. + + // The following are initialized once and const. + smallest, biggest []byte // Smallest and largest keys. + id uint64 // file id, part of filename + + bf bbloom.Bloom + + Checksum []byte +} + +// IncrRef increments the refcount (having to do with whether the file should be deleted) +func (t *Table) IncrRef() { + atomic.AddInt32(&t.ref, 1) +} + +// DecrRef decrements the refcount and possibly deletes the table +func (t *Table) DecrRef() error { + newRef := atomic.AddInt32(&t.ref, -1) + if newRef == 0 { + // We can safely delete this file, because for all the current files, we always have + // at least one reference pointing to them. + + // It's necessary to delete windows files + if t.loadingMode == options.MemoryMap { + y.Munmap(t.mmap) + } + if err := t.fd.Truncate(0); err != nil { + // This is very important to let the FS know that the file is deleted. + return err + } + filename := t.fd.Name() + if err := t.fd.Close(); err != nil { + return err + } + if err := os.Remove(filename); err != nil { + return err + } + } + return nil +} + +type block struct { + offset int + data []byte +} + +func (b block) NewIterator() *blockIterator { + return &blockIterator{data: b.data} +} + +// OpenTable assumes file has only one table and opens it. Takes ownership of fd upon function +// entry. Returns a table with one reference count on it (decrementing which may delete the file! +// -- consider t.Close() instead). The fd has to writeable because we call Truncate on it before +// deleting. +func OpenTable(fd *os.File, mode options.FileLoadingMode, cksum []byte) (*Table, error) { + fileInfo, err := fd.Stat() + if err != nil { + // It's OK to ignore fd.Close() errs in this function because we have only read + // from the file. + _ = fd.Close() + return nil, y.Wrap(err) + } + + filename := fileInfo.Name() + id, ok := ParseFileID(filename) + if !ok { + _ = fd.Close() + return nil, errors.Errorf("Invalid filename: %s", filename) + } + t := &Table{ + fd: fd, + ref: 1, // Caller is given one reference. + id: id, + loadingMode: mode, + } + + t.tableSize = int(fileInfo.Size()) + + // We first load to RAM, so we can read the index and do checksum. + if err := t.loadToRAM(); err != nil { + return nil, err + } + // Enforce checksum before we read index. Otherwise, if the file was + // truncated, we'd end up with panics in readIndex. + if len(cksum) > 0 && !bytes.Equal(t.Checksum, cksum) { + return nil, fmt.Errorf( + "CHECKSUM_MISMATCH: Table checksum does not match checksum in MANIFEST."+ + " NOT including table %s. This would lead to missing data."+ + "\n sha256 %x Expected\n sha256 %x Found\n", filename, cksum, t.Checksum) + } + if err := t.readIndex(); err != nil { + return nil, y.Wrap(err) + } + + it := t.NewIterator(false) + defer it.Close() + it.Rewind() + if it.Valid() { + t.smallest = it.Key() + } + + it2 := t.NewIterator(true) + defer it2.Close() + it2.Rewind() + if it2.Valid() { + t.biggest = it2.Key() + } + + switch mode { + case options.LoadToRAM: + // No need to do anything. t.mmap is already filled. + case options.MemoryMap: + t.mmap, err = y.Mmap(fd, false, fileInfo.Size()) + if err != nil { + _ = fd.Close() + return nil, y.Wrapf(err, "Unable to map file") + } + case options.FileIO: + t.mmap = nil + default: + panic(fmt.Sprintf("Invalid loading mode: %v", mode)) + } + return t, nil +} + +// Close closes the open table. (Releases resources back to the OS.) +func (t *Table) Close() error { + if t.loadingMode == options.MemoryMap { + y.Munmap(t.mmap) + } + + return t.fd.Close() +} + +func (t *Table) read(off int, sz int) ([]byte, error) { + if len(t.mmap) > 0 { + if len(t.mmap[off:]) < sz { + return nil, y.ErrEOF + } + return t.mmap[off : off+sz], nil + } + + res := make([]byte, sz) + nbr, err := t.fd.ReadAt(res, int64(off)) + y.NumReads.Add(1) + y.NumBytesRead.Add(int64(nbr)) + return res, err +} + +func (t *Table) readNoFail(off int, sz int) []byte { + res, err := t.read(off, sz) + y.Check(err) + return res +} + +func (t *Table) readIndex() error { + if len(t.mmap) != t.tableSize { + panic("Table size does not match the read bytes") + } + readPos := t.tableSize + + // Read bloom filter. + readPos -= 4 + buf := t.readNoFail(readPos, 4) + bloomLen := int(binary.BigEndian.Uint32(buf)) + readPos -= bloomLen + data := t.readNoFail(readPos, bloomLen) + t.bf = *bbloom.JSONUnmarshal(data) + + readPos -= 4 + buf = t.readNoFail(readPos, 4) + restartsLen := int(binary.BigEndian.Uint32(buf)) + + readPos -= 4 * restartsLen + buf = t.readNoFail(readPos, 4*restartsLen) + + offsets := make([]int, restartsLen) + for i := 0; i < restartsLen; i++ { + offsets[i] = int(binary.BigEndian.Uint32(buf[:4])) + buf = buf[4:] + } + + // The last offset stores the end of the last block. + for i := 0; i < len(offsets); i++ { + var o int + if i == 0 { + o = 0 + } else { + o = offsets[i-1] + } + + ko := keyOffset{ + offset: o, + len: offsets[i] - o, + } + t.blockIndex = append(t.blockIndex, ko) + } + + // Execute this index read serially, because we already have table data in memory. + var h header + for idx := range t.blockIndex { + ko := &t.blockIndex[idx] + + hbuf := t.readNoFail(ko.offset, h.Size()) + h.Decode(hbuf) + y.AssertTrue(h.plen == 0) + + key := t.readNoFail(ko.offset+len(hbuf), int(h.klen)) + ko.key = append([]byte{}, key...) + } + + return nil +} + +func (t *Table) block(idx int) (block, error) { + y.AssertTruef(idx >= 0, "idx=%d", idx) + if idx >= len(t.blockIndex) { + return block{}, errors.New("block out of index") + } + + ko := t.blockIndex[idx] + blk := block{ + offset: ko.offset, + } + var err error + blk.data, err = t.read(blk.offset, ko.len) + return blk, err +} + +// Size is its file size in bytes +func (t *Table) Size() int64 { return int64(t.tableSize) } + +// Smallest is its smallest key, or nil if there are none +func (t *Table) Smallest() []byte { return t.smallest } + +// Biggest is its biggest key, or nil if there are none +func (t *Table) Biggest() []byte { return t.biggest } + +// Filename is NOT the file name. Just kidding, it is. +func (t *Table) Filename() string { return t.fd.Name() } + +// ID is the table's ID number (used to make the file name). +func (t *Table) ID() uint64 { return t.id } + +// DoesNotHave returns true if (but not "only if") the table does not have the key. It does a +// bloom filter lookup. +func (t *Table) DoesNotHave(key []byte) bool { return !t.bf.Has(key) } + +// ParseFileID reads the file id out of a filename. +func ParseFileID(name string) (uint64, bool) { + name = path.Base(name) + if !strings.HasSuffix(name, fileSuffix) { + return 0, false + } + // suffix := name[len(fileSuffix):] + name = strings.TrimSuffix(name, fileSuffix) + id, err := strconv.Atoi(name) + if err != nil { + return 0, false + } + y.AssertTrue(id >= 0) + return uint64(id), true +} + +// IDToFilename does the inverse of ParseFileID +func IDToFilename(id uint64) string { + return fmt.Sprintf("%06d", id) + fileSuffix +} + +// NewFilename should be named TableFilepath -- it combines the dir with the ID to make a table +// filepath. +func NewFilename(id uint64, dir string) string { + return filepath.Join(dir, IDToFilename(id)) +} + +func (t *Table) loadToRAM() error { + if _, err := t.fd.Seek(0, io.SeekStart); err != nil { + return err + } + t.mmap = make([]byte, t.tableSize) + sum := sha256.New() + tee := io.TeeReader(t.fd, sum) + read, err := tee.Read(t.mmap) + if err != nil || read != t.tableSize { + return y.Wrapf(err, "Unable to load file in memory. Table file: %s", t.Filename()) + } + t.Checksum = sum.Sum(nil) + y.NumReads.Add(1) + y.NumBytesRead.Add(int64(read)) + return nil +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/test.sh b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/test.sh similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/test.sh rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/test.sh diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/txn.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/txn.go new file mode 100644 index 0000000000..1164108a6b --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/txn.go @@ -0,0 +1,753 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "bytes" + "context" + "encoding/hex" + "math" + "sort" + "strconv" + "sync" + "sync/atomic" + "time" + + farm "gx/ipfs/QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP/go-farm" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +type oracle struct { + // A 64-bit integer must be at the top for memory alignment. See issue #311. + refCount int64 + isManaged bool // Does not change value, so no locking required. + + sync.Mutex // For nextTxnTs and commits. + // writeChLock lock is for ensuring that transactions go to the write + // channel in the same order as their commit timestamps. + writeChLock sync.Mutex + nextTxnTs uint64 + + // Used to block NewTransaction, so all previous commits are visible to a new read. + txnMark *y.WaterMark + + // Either of these is used to determine which versions can be permanently + // discarded during compaction. + discardTs uint64 // Used by ManagedDB. + readMark *y.WaterMark // Used by DB. + + // commits stores a key fingerprint and latest commit counter for it. + // refCount is used to clear out commits map to avoid a memory blowup. + commits map[uint64]uint64 + + // closer is used to stop watermarks. + closer *y.Closer +} + +func newOracle(opt Options) *oracle { + orc := &oracle{ + isManaged: opt.managedTxns, + commits: make(map[uint64]uint64), + // We're not initializing nextTxnTs and readOnlyTs. It would be done after replay in Open. + // + // WaterMarks must be 64-bit aligned for atomic package, hence we must use pointers here. + // See https://golang.org/pkg/sync/atomic/#pkg-note-BUG. + readMark: &y.WaterMark{Name: "badger.PendingReads"}, + txnMark: &y.WaterMark{Name: "badger.TxnTimestamp"}, + closer: y.NewCloser(2), + } + orc.readMark.Init(orc.closer) + orc.txnMark.Init(orc.closer) + return orc +} + +func (o *oracle) Stop() { + o.closer.SignalAndWait() +} + +func (o *oracle) addRef() { + atomic.AddInt64(&o.refCount, 1) +} + +func (o *oracle) decrRef() { + if atomic.AddInt64(&o.refCount, -1) != 0 { + return + } + + // Clear out commits maps to release memory. + o.Lock() + defer o.Unlock() + // Avoids the race where something new is added to commitsMap + // after we check refCount and before we take Lock. + if atomic.LoadInt64(&o.refCount) != 0 { + return + } + if len(o.commits) >= 1000 { // If the map is still small, let it slide. + o.commits = make(map[uint64]uint64) + } +} + +func (o *oracle) readTs() uint64 { + if o.isManaged { + panic("ReadTs should not be retrieved for managed DB") + } + + var readTs uint64 + o.Lock() + readTs = o.nextTxnTs - 1 + o.readMark.Begin(readTs) + o.Unlock() + + // Wait for all txns which have no conflicts, have been assigned a commit + // timestamp and are going through the write to value log and LSM tree + // process. Not waiting here could mean that some txns which have been + // committed would not be read. + y.Check(o.txnMark.WaitForMark(context.Background(), readTs)) + return readTs +} + +func (o *oracle) nextTs() uint64 { + o.Lock() + defer o.Unlock() + return o.nextTxnTs +} + +// Any deleted or invalid versions at or below ts would be discarded during +// compaction to reclaim disk space in LSM tree and thence value log. +func (o *oracle) setDiscardTs(ts uint64) { + o.Lock() + defer o.Unlock() + o.discardTs = ts +} + +func (o *oracle) discardAtOrBelow() uint64 { + if o.isManaged { + o.Lock() + defer o.Unlock() + return o.discardTs + } + return o.readMark.DoneUntil() +} + +// hasConflict must be called while having a lock. +func (o *oracle) hasConflict(txn *Txn) bool { + if len(txn.reads) == 0 { + return false + } + for _, ro := range txn.reads { + // A commit at the read timestamp is expected. + // But, any commit after the read timestamp should cause a conflict. + if ts, has := o.commits[ro]; has && ts > txn.readTs { + return true + } + } + return false +} + +func (o *oracle) newCommitTs(txn *Txn) uint64 { + o.Lock() + defer o.Unlock() + + if o.hasConflict(txn) { + return 0 + } + + var ts uint64 + if !o.isManaged { + // This is the general case, when user doesn't specify the read and commit ts. + ts = o.nextTxnTs + o.nextTxnTs++ + o.txnMark.Begin(ts) + + } else { + // If commitTs is set, use it instead. + ts = txn.commitTs + } + + for _, w := range txn.writes { + o.commits[w] = ts // Update the commitTs. + } + return ts +} + +func (o *oracle) doneCommit(cts uint64) { + if o.isManaged { + // No need to update anything. + return + } + o.txnMark.Done(cts) +} + +// Txn represents a Badger transaction. +type Txn struct { + readTs uint64 + commitTs uint64 + + update bool // update is used to conditionally keep track of reads. + reads []uint64 // contains fingerprints of keys read. + writes []uint64 // contains fingerprints of keys written. + + pendingWrites map[string]*Entry // cache stores any writes done by txn. + + db *DB + discarded bool + + size int64 + count int64 + numIterators int32 +} + +type pendingWritesIterator struct { + entries []*Entry + nextIdx int + readTs uint64 + reversed bool +} + +func (pi *pendingWritesIterator) Next() { + pi.nextIdx++ +} + +func (pi *pendingWritesIterator) Rewind() { + pi.nextIdx = 0 +} + +func (pi *pendingWritesIterator) Seek(key []byte) { + key = y.ParseKey(key) + pi.nextIdx = sort.Search(len(pi.entries), func(idx int) bool { + cmp := bytes.Compare(pi.entries[idx].Key, key) + if !pi.reversed { + return cmp >= 0 + } + return cmp <= 0 + }) +} + +func (pi *pendingWritesIterator) Key() []byte { + y.AssertTrue(pi.Valid()) + entry := pi.entries[pi.nextIdx] + return y.KeyWithTs(entry.Key, pi.readTs) +} + +func (pi *pendingWritesIterator) Value() y.ValueStruct { + y.AssertTrue(pi.Valid()) + entry := pi.entries[pi.nextIdx] + return y.ValueStruct{ + Value: entry.Value, + Meta: entry.meta, + UserMeta: entry.UserMeta, + ExpiresAt: entry.ExpiresAt, + Version: pi.readTs, + } +} + +func (pi *pendingWritesIterator) Valid() bool { + return pi.nextIdx < len(pi.entries) +} + +func (pi *pendingWritesIterator) Close() error { + return nil +} + +func (txn *Txn) newPendingWritesIterator(reversed bool) *pendingWritesIterator { + if !txn.update || len(txn.pendingWrites) == 0 { + return nil + } + entries := make([]*Entry, 0, len(txn.pendingWrites)) + for _, e := range txn.pendingWrites { + entries = append(entries, e) + } + // Number of pending writes per transaction shouldn't be too big in general. + sort.Slice(entries, func(i, j int) bool { + cmp := bytes.Compare(entries[i].Key, entries[j].Key) + if !reversed { + return cmp < 0 + } + return cmp > 0 + }) + return &pendingWritesIterator{ + readTs: txn.readTs, + entries: entries, + reversed: reversed, + } +} + +func (txn *Txn) checkSize(e *Entry) error { + count := txn.count + 1 + // Extra bytes for version in key. + size := txn.size + int64(e.estimateSize(txn.db.opt.ValueThreshold)) + 10 + if count >= txn.db.opt.maxBatchCount || size >= txn.db.opt.maxBatchSize { + return ErrTxnTooBig + } + txn.count, txn.size = count, size + return nil +} + +// Set adds a key-value pair to the database. +// +// It will return ErrReadOnlyTxn if update flag was set to false when creating the +// transaction. +// +// The current transaction keeps a reference to the key and val byte slice +// arguments. Users must not modify key and val until the end of the transaction. +func (txn *Txn) Set(key, val []byte) error { + e := &Entry{ + Key: key, + Value: val, + } + return txn.SetEntry(e) +} + +// SetWithMeta adds a key-value pair to the database, along with a metadata +// byte. +// +// This byte is stored alongside the key, and can be used as an aid to +// interpret the value or store other contextual bits corresponding to the +// key-value pair. +// +// The current transaction keeps a reference to the key and val byte slice +// arguments. Users must not modify key and val until the end of the transaction. +func (txn *Txn) SetWithMeta(key, val []byte, meta byte) error { + e := &Entry{Key: key, Value: val, UserMeta: meta} + return txn.SetEntry(e) +} + +// SetWithDiscard acts like SetWithMeta, but adds a marker to discard earlier +// versions of the key. +// +// This method is only useful if you have set a higher limit for +// options.NumVersionsToKeep. The default setting is 1, in which case, this +// function doesn't add any more benefit than just calling the normal +// SetWithMeta (or Set) function. If however, you have a higher setting for +// NumVersionsToKeep (in Dgraph, we set it to infinity), you can use this method +// to indicate that all the older versions can be discarded and removed during +// compactions. +// +// The current transaction keeps a reference to the key and val byte slice +// arguments. Users must not modify key and val until the end of the +// transaction. +func (txn *Txn) SetWithDiscard(key, val []byte, meta byte) error { + e := &Entry{ + Key: key, + Value: val, + UserMeta: meta, + meta: bitDiscardEarlierVersions, + } + return txn.SetEntry(e) +} + +// SetWithTTL adds a key-value pair to the database, along with a time-to-live +// (TTL) setting. A key stored with a TTL would automatically expire after the +// time has elapsed , and be eligible for garbage collection. +// +// The current transaction keeps a reference to the key and val byte slice +// arguments. Users must not modify key and val until the end of the +// transaction. +func (txn *Txn) SetWithTTL(key, val []byte, dur time.Duration) error { + expire := time.Now().Add(dur).Unix() + e := &Entry{Key: key, Value: val, ExpiresAt: uint64(expire)} + return txn.SetEntry(e) +} + +func exceedsSize(prefix string, max int64, key []byte) error { + return errors.Errorf("%s with size %d exceeded %d limit. %s:\n%s", + prefix, len(key), max, prefix, hex.Dump(key[:1<<10])) +} + +func (txn *Txn) modify(e *Entry) error { + const maxKeySize = 65000 + + switch { + case !txn.update: + return ErrReadOnlyTxn + case txn.discarded: + return ErrDiscardedTxn + case len(e.Key) == 0: + return ErrEmptyKey + case bytes.HasPrefix(e.Key, badgerPrefix): + return ErrInvalidKey + case len(e.Key) > maxKeySize: + // Key length can't be more than uint16, as determined by table::header. To + // keep things safe and allow badger move prefix and a timestamp suffix, let's + // cut it down to 65000, instead of using 65536. + return exceedsSize("Key", maxKeySize, e.Key) + case int64(len(e.Value)) > txn.db.opt.ValueLogFileSize: + return exceedsSize("Value", txn.db.opt.ValueLogFileSize, e.Value) + } + + if err := txn.checkSize(e); err != nil { + return err + } + fp := farm.Fingerprint64(e.Key) // Avoid dealing with byte arrays. + txn.writes = append(txn.writes, fp) + txn.pendingWrites[string(e.Key)] = e + return nil +} + +// SetEntry takes an Entry struct and adds the key-value pair in the struct, +// along with other metadata to the database. +// +// The current transaction keeps a reference to the entry passed in argument. +// Users must not modify the entry until the end of the transaction. +func (txn *Txn) SetEntry(e *Entry) error { + return txn.modify(e) +} + +// Delete deletes a key. +// +// This is done by adding a delete marker for the key at commit timestamp. Any +// reads happening before this timestamp would be unaffected. Any reads after +// this commit would see the deletion. +// +// The current transaction keeps a reference to the key byte slice argument. +// Users must not modify the key until the end of the transaction. +func (txn *Txn) Delete(key []byte) error { + e := &Entry{ + Key: key, + meta: bitDelete, + } + return txn.modify(e) +} + +// Get looks for key and returns corresponding Item. +// If key is not found, ErrKeyNotFound is returned. +func (txn *Txn) Get(key []byte) (item *Item, rerr error) { + if len(key) == 0 { + return nil, ErrEmptyKey + } else if txn.discarded { + return nil, ErrDiscardedTxn + } + + item = new(Item) + if txn.update { + if e, has := txn.pendingWrites[string(key)]; has && bytes.Equal(key, e.Key) { + if isDeletedOrExpired(e.meta, e.ExpiresAt) { + return nil, ErrKeyNotFound + } + // Fulfill from cache. + item.meta = e.meta + item.val = e.Value + item.userMeta = e.UserMeta + item.key = key + item.status = prefetched + item.version = txn.readTs + item.expiresAt = e.ExpiresAt + // We probably don't need to set db on item here. + return item, nil + } + // Only track reads if this is update txn. No need to track read if txn serviced it + // internally. + txn.addReadKey(key) + } + + seek := y.KeyWithTs(key, txn.readTs) + vs, err := txn.db.get(seek) + if err != nil { + return nil, errors.Wrapf(err, "DB::Get key: %q", key) + } + if vs.Value == nil && vs.Meta == 0 { + return nil, ErrKeyNotFound + } + if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { + return nil, ErrKeyNotFound + } + + item.key = key + item.version = vs.Version + item.meta = vs.Meta + item.userMeta = vs.UserMeta + item.db = txn.db + item.vptr = vs.Value // TODO: Do we need to copy this over? + item.txn = txn + item.expiresAt = vs.ExpiresAt + return item, nil +} + +func (txn *Txn) addReadKey(key []byte) { + if txn.update { + fp := farm.Fingerprint64(key) + txn.reads = append(txn.reads, fp) + } +} + +// Discard discards a created transaction. This method is very important and must be called. Commit +// method calls this internally, however, calling this multiple times doesn't cause any issues. So, +// this can safely be called via a defer right when transaction is created. +// +// NOTE: If any operations are run on a discarded transaction, ErrDiscardedTxn is returned. +func (txn *Txn) Discard() { + if txn.discarded { // Avoid a re-run. + return + } + if atomic.LoadInt32(&txn.numIterators) > 0 { + panic("Unclosed iterator at time of Txn.Discard.") + } + txn.discarded = true + if !txn.db.orc.isManaged { + txn.db.orc.readMark.Done(txn.readTs) + } + if txn.update { + txn.db.orc.decrRef() + } +} + +func (txn *Txn) commitAndSend() (func() error, error) { + orc := txn.db.orc + // Ensure that the order in which we get the commit timestamp is the same as + // the order in which we push these updates to the write channel. So, we + // acquire a writeChLock before getting a commit timestamp, and only release + // it after pushing the entries to it. + orc.writeChLock.Lock() + defer orc.writeChLock.Unlock() + + commitTs := orc.newCommitTs(txn) + if commitTs == 0 { + return nil, ErrConflict + } + + // The following debug information is what led to determining the cause of + // bank txn violation bug, and it took a whole bunch of effort to narrow it + // down to here. So, keep this around for at least a couple of months. + // var b strings.Builder + // fmt.Fprintf(&b, "Read: %d. Commit: %d. reads: %v. writes: %v. Keys: ", + // txn.readTs, commitTs, txn.reads, txn.writes) + entries := make([]*Entry, 0, len(txn.pendingWrites)+1) + for _, e := range txn.pendingWrites { + // fmt.Fprintf(&b, "[%q : %q], ", e.Key, e.Value) + + // Suffix the keys with commit ts, so the key versions are sorted in + // descending order of commit timestamp. + e.Key = y.KeyWithTs(e.Key, commitTs) + e.meta |= bitTxn + entries = append(entries, e) + } + // log.Printf("%s\n", b.String()) + e := &Entry{ + Key: y.KeyWithTs(txnKey, commitTs), + Value: []byte(strconv.FormatUint(commitTs, 10)), + meta: bitFinTxn, + } + entries = append(entries, e) + + req, err := txn.db.sendToWriteCh(entries) + if err != nil { + orc.doneCommit(commitTs) + return nil, err + } + ret := func() error { + err := req.Wait() + // Wait before marking commitTs as done. + // We can't defer doneCommit above, because it is being called from a + // callback here. + orc.doneCommit(commitTs) + return err + } + return ret, nil +} + +func (txn *Txn) commitPrecheck() { + if txn.commitTs == 0 && txn.db.opt.managedTxns { + panic("Commit cannot be called with managedDB=true. Use CommitAt.") + } + if txn.discarded { + panic("Trying to commit a discarded txn") + } +} + +// Commit commits the transaction, following these steps: +// +// 1. If there are no writes, return immediately. +// +// 2. Check if read rows were updated since txn started. If so, return ErrConflict. +// +// 3. If no conflict, generate a commit timestamp and update written rows' commit ts. +// +// 4. Batch up all writes, write them to value log and LSM tree. +// +// 5. If callback is provided, Badger will return immediately after checking +// for conflicts. Writes to the database will happen in the background. If +// there is a conflict, an error will be returned and the callback will not +// run. If there are no conflicts, the callback will be called in the +// background upon successful completion of writes or any error during write. +// +// If error is nil, the transaction is successfully committed. In case of a non-nil error, the LSM +// tree won't be updated, so there's no need for any rollback. +func (txn *Txn) Commit() error { + txn.commitPrecheck() // Precheck before discarding txn. + defer txn.Discard() + + if len(txn.writes) == 0 { + return nil // Nothing to do. + } + + txnCb, err := txn.commitAndSend() + if err != nil { + return err + } + // If batchSet failed, LSM would not have been updated. So, no need to rollback anything. + + // TODO: What if some of the txns successfully make it to value log, but others fail. + // Nothing gets updated to LSM, until a restart happens. + return txnCb() +} + +type txnCb struct { + commit func() error + user func(error) + err error +} + +func runTxnCallback(cb *txnCb) { + switch { + case cb == nil: + panic("txn callback is nil") + case cb.user == nil: + panic("Must have caught a nil callback for txn.CommitWith") + case cb.err != nil: + cb.user(cb.err) + case cb.commit != nil: + err := cb.commit() + cb.user(err) + default: + cb.user(nil) + } +} + +// CommitWith acts like Commit, but takes a callback, which gets run via a +// goroutine to avoid blocking this function. The callback is guaranteed to run, +// so it is safe to increment sync.WaitGroup before calling CommitWith, and +// decrementing it in the callback; to block until all callbacks are run. +func (txn *Txn) CommitWith(cb func(error)) { + txn.commitPrecheck() // Precheck before discarding txn. + defer txn.Discard() + + if cb == nil { + panic("Nil callback provided to CommitWith") + } + + if len(txn.writes) == 0 { + // Do not run these callbacks from here, because the CommitWith and the + // callback might be acquiring the same locks. Instead run the callback + // from another goroutine. + go runTxnCallback(&txnCb{user: cb, err: nil}) + return + } + + commitCb, err := txn.commitAndSend() + if err != nil { + go runTxnCallback(&txnCb{user: cb, err: err}) + return + } + + go runTxnCallback(&txnCb{user: cb, commit: commitCb}) +} + +// ReadTs returns the read timestamp of the transaction. +func (txn *Txn) ReadTs() uint64 { + return txn.readTs +} + +// NewTransaction creates a new transaction. Badger supports concurrent execution of transactions, +// providing serializable snapshot isolation, avoiding write skews. Badger achieves this by tracking +// the keys read and at Commit time, ensuring that these read keys weren't concurrently modified by +// another transaction. +// +// For read-only transactions, set update to false. In this mode, we don't track the rows read for +// any changes. Thus, any long running iterations done in this mode wouldn't pay this overhead. +// +// Running transactions concurrently is OK. However, a transaction itself isn't thread safe, and +// should only be run serially. It doesn't matter if a transaction is created by one goroutine and +// passed down to other, as long as the Txn APIs are called serially. +// +// When you create a new transaction, it is absolutely essential to call +// Discard(). This should be done irrespective of what the update param is set +// to. Commit API internally runs Discard, but running it twice wouldn't cause +// any issues. +// +// txn := db.NewTransaction(false) +// defer txn.Discard() +// // Call various APIs. +func (db *DB) NewTransaction(update bool) *Txn { + return db.newTransaction(update, false) +} + +func (db *DB) newTransaction(update, isManaged bool) *Txn { + if db.opt.ReadOnly && update { + // DB is read-only, force read-only transaction. + update = false + } + + txn := &Txn{ + update: update, + db: db, + count: 1, // One extra entry for BitFin. + size: int64(len(txnKey) + 10), // Some buffer for the extra entry. + } + if update { + txn.pendingWrites = make(map[string]*Entry) + txn.db.orc.addRef() + } + // It is important that the oracle addRef happens BEFORE we retrieve a read + // timestamp. Otherwise, it is possible that the oracle commit map would + // become nil after we get the read timestamp. + // The sequence of events can be: + // 1. This txn gets a read timestamp. + // 2. Another txn working on the same keyset commits them, and decrements + // the reference to oracle. + // 3. Oracle ref reaches zero, resetting commit map. + // 4. This txn increments the oracle reference. + // 5. Now this txn would go on to commit the keyset, and no conflicts + // would be detected. + // See issue: https://github.com/dgraph-io/badger/issues/574 + if !isManaged { + txn.readTs = db.orc.readTs() + } + return txn +} + +// View executes a function creating and managing a read-only transaction for the user. Error +// returned by the function is relayed by the View method. +// If View is used with managed transactions, it would assume a read timestamp of MaxUint64. +func (db *DB) View(fn func(txn *Txn) error) error { + var txn *Txn + if db.opt.managedTxns { + txn = db.NewTransactionAt(math.MaxUint64, false) + } else { + txn = db.NewTransaction(false) + } + defer txn.Discard() + + return fn(txn) +} + +// Update executes a function, creating and managing a read-write transaction +// for the user. Error returned by the function is relayed by the Update method. +// Update cannot be used with managed transactions. +func (db *DB) Update(fn func(txn *Txn) error) error { + if db.opt.managedTxns { + panic("Update can only be used with managedDB=false.") + } + txn := db.NewTransaction(true) + defer txn.Discard() + + if err := fn(txn); err != nil { + return err + } + + return txn.Commit() +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/util.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/util.go new file mode 100644 index 0000000000..e74fc87ff5 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/util.go @@ -0,0 +1,141 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "encoding/hex" + "io/ioutil" + "math/rand" + "sync/atomic" + "time" + + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/table" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +// summary is produced when DB is closed. Currently it is used only for testing. +type summary struct { + fileIDs map[uint64]bool +} + +func (s *levelsController) getSummary() *summary { + out := &summary{ + fileIDs: make(map[uint64]bool), + } + for _, l := range s.levels { + l.getSummary(out) + } + return out +} + +func (s *levelHandler) getSummary(sum *summary) { + s.RLock() + defer s.RUnlock() + for _, t := range s.tables { + sum.fileIDs[t.ID()] = true + } +} + +func (s *DB) validate() error { return s.lc.validate() } + +func (s *levelsController) validate() error { + for _, l := range s.levels { + if err := l.validate(); err != nil { + return errors.Wrap(err, "Levels Controller") + } + } + return nil +} + +// Check does some sanity check on one level of data or in-memory index. +func (s *levelHandler) validate() error { + if s.level == 0 { + return nil + } + + s.RLock() + defer s.RUnlock() + 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) + } + + if y.CompareKeys(s.tables[j-1].Biggest(), s.tables[j].Smallest()) >= 0 { + return errors.Errorf( + "Inter: Biggest(j-1) \n%s\n vs Smallest(j): \n%s\n: level=%d j=%d numTables=%d", + hex.Dump(s.tables[j-1].Biggest()), hex.Dump(s.tables[j].Smallest()), + s.level, j, numTables) + } + + if y.CompareKeys(s.tables[j].Smallest(), s.tables[j].Biggest()) > 0 { + return errors.Errorf( + "Intra: %q vs %q: level=%d j=%d numTables=%d", + s.tables[j].Smallest(), s.tables[j].Biggest(), s.level, j, numTables) + } + } + return nil +} + +// func (s *KV) debugPrintMore() { s.lc.debugPrintMore() } + +// // debugPrintMore shows key ranges of each level. +// func (s *levelsController) debugPrintMore() { +// s.Lock() +// defer s.Unlock() +// for i := 0; i < s.kv.opt.MaxLevels; i++ { +// s.levels[i].debugPrintMore() +// } +// } + +// func (s *levelHandler) debugPrintMore() { +// s.RLock() +// defer s.RUnlock() +// s.elog.Printf("Level %d:", s.level) +// for _, t := range s.tables { +// y.Printf(" [%s, %s]", t.Smallest(), t.Biggest()) +// } +// y.Printf("\n") +// } + +// reserveFileID reserves a unique file id. +func (s *levelsController) reserveFileID() uint64 { + id := atomic.AddUint64(&s.nextFileID, 1) + return id - 1 +} + +func getIDMap(dir string) map[uint64]struct{} { + fileInfos, err := ioutil.ReadDir(dir) + y.Check(err) + idMap := make(map[uint64]struct{}) + for _, info := range fileInfos { + if info.IsDir() { + continue + } + fileID, ok := table.ParseFileID(info.Name()) + if !ok { + continue + } + idMap[fileID] = struct{}{} + } + return idMap +} + +func init() { + rand.Seed(time.Now().UnixNano()) +} diff --git a/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/value.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/value.go new file mode 100644 index 0000000000..3c7511b237 --- /dev/null +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/value.go @@ -0,0 +1,1314 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and Contributors + * + * 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 badger + +import ( + "bufio" + "bytes" + "encoding/binary" + "fmt" + "hash/crc32" + "io" + "io/ioutil" + "math" + "math/rand" + "os" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/options" + "gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y" + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +// Values have their first byte being byteData or byteDelete. This helps us distinguish between +// a key that has never been seen and a key that has been explicitly deleted. +const ( + bitDelete byte = 1 << 0 // Set if the key has been deleted. + bitValuePointer byte = 1 << 1 // Set if the value is NOT stored directly next to key. + bitDiscardEarlierVersions byte = 1 << 2 // Set if earlier versions can be discarded. + + // The MSB 2 bits are for transactions. + bitTxn byte = 1 << 6 // Set if the entry is part of a txn. + bitFinTxn byte = 1 << 7 // Set if the entry is to indicate end of txn in value log. + + mi int64 = 1 << 20 +) + +type logFile struct { + path string + // This is a lock on the log file. It guards the fd’s value, the file’s + // existence and the file’s memory map. + // + // Use shared ownership when reading/writing the file or memory map, use + // exclusive ownership to open/close the descriptor, unmap or remove the file. + lock sync.RWMutex + fd *os.File + fid uint32 + fmap []byte + size uint32 + loadingMode options.FileLoadingMode +} + +// openReadOnly assumes that we have a write lock on logFile. +func (lf *logFile) openReadOnly() error { + var err error + lf.fd, err = os.OpenFile(lf.path, os.O_RDONLY, 0666) + if err != nil { + return errors.Wrapf(err, "Unable to open %q as RDONLY.", lf.path) + } + + fi, err := lf.fd.Stat() + if err != nil { + return errors.Wrapf(err, "Unable to check stat for %q", lf.path) + } + y.AssertTrue(fi.Size() <= math.MaxUint32) + lf.size = uint32(fi.Size()) + + if err = lf.mmap(fi.Size()); err != nil { + _ = lf.fd.Close() + return y.Wrapf(err, "Unable to map file") + } + + return nil +} + +func (lf *logFile) mmap(size int64) (err error) { + if lf.loadingMode != options.MemoryMap { + // Nothing to do + return nil + } + lf.fmap, err = y.Mmap(lf.fd, false, size) + if err == nil { + err = y.Madvise(lf.fmap, false) // Disable readahead + } + return err +} + +func (lf *logFile) munmap() (err error) { + if lf.loadingMode != options.MemoryMap { + // Nothing to do + return nil + } + if err := y.Munmap(lf.fmap); err != nil { + return errors.Wrapf(err, "Unable to munmap value log: %q", lf.path) + } + return nil +} + +// Acquire lock on mmap/file if you are calling this +func (lf *logFile) read(p valuePointer, s *y.Slice) (buf []byte, err error) { + var nbr int64 + offset := p.Offset + if lf.loadingMode == options.FileIO { + buf = s.Resize(int(p.Len)) + var n int + n, err = lf.fd.ReadAt(buf, int64(offset)) + nbr = int64(n) + } else { + // Do not convert size to uint32, because the lf.fmap can be of size + // 4GB, which overflows the uint32 during conversion to make the size 0, + // causing the read to fail with ErrEOF. See issue #585. + size := int64(len(lf.fmap)) + valsz := p.Len + if int64(offset) >= size || int64(offset+valsz) > size { + err = y.ErrEOF + } else { + buf = lf.fmap[offset : offset+valsz] + nbr = int64(valsz) + } + } + y.NumReads.Add(1) + y.NumBytesRead.Add(nbr) + return buf, err +} + +func (lf *logFile) doneWriting(offset uint32) error { + // Sync before acquiring lock. (We call this from write() and thus know we have shared access + // to the fd.) + if err := lf.fd.Sync(); err != nil { + return errors.Wrapf(err, "Unable to sync value log: %q", lf.path) + } + // Close and reopen the file read-only. Acquire lock because fd will become invalid for a bit. + // Acquiring the lock is bad because, while we don't hold the lock for a long time, it forces + // one batch of readers wait for the preceding batch of readers to finish. + // + // If there's a benefit to reopening the file read-only, it might be on Windows. I don't know + // what the benefit is. Consider keeping the file read-write, or use fcntl to change + // permissions. + lf.lock.Lock() + defer lf.lock.Unlock() + if err := lf.munmap(); err != nil { + return err + } + // TODO: Confirm if we need to run a file sync after truncation. + // Truncation must run after unmapping, otherwise Windows would crap itself. + if err := lf.fd.Truncate(int64(offset)); err != nil { + return errors.Wrapf(err, "Unable to truncate file: %q", lf.path) + } + if err := lf.fd.Close(); err != nil { + return errors.Wrapf(err, "Unable to close value log: %q", lf.path) + } + + return lf.openReadOnly() +} + +// You must hold lf.lock to sync() +func (lf *logFile) sync() error { + return lf.fd.Sync() +} + +var errStop = errors.New("Stop iteration") +var errTruncate = errors.New("Do truncate") + +type logEntry func(e Entry, vp valuePointer) error + +type safeRead struct { + k []byte + v []byte + + recordOffset uint32 +} + +func (r *safeRead) Entry(reader *bufio.Reader) (*Entry, error) { + var hbuf [headerBufSize]byte + var err error + + hash := crc32.New(y.CastagnoliCrcTable) + tee := io.TeeReader(reader, hash) + if _, err = io.ReadFull(tee, hbuf[:]); err != nil { + return nil, err + } + + var h header + h.Decode(hbuf[:]) + if h.klen > uint32(1<<16) { // Key length must be below uint16. + return nil, errTruncate + } + kl := int(h.klen) + if cap(r.k) < kl { + r.k = make([]byte, 2*kl) + } + vl := int(h.vlen) + if cap(r.v) < vl { + r.v = make([]byte, 2*vl) + } + + e := &Entry{} + e.offset = r.recordOffset + e.Key = r.k[:kl] + e.Value = r.v[:vl] + + if _, err = io.ReadFull(tee, e.Key); err != nil { + if err == io.EOF { + err = errTruncate + } + return nil, err + } + if _, err = io.ReadFull(tee, e.Value); err != nil { + if err == io.EOF { + err = errTruncate + } + return nil, err + } + var crcBuf [4]byte + if _, err = io.ReadFull(reader, crcBuf[:]); err != nil { + if err == io.EOF { + err = errTruncate + } + return nil, err + } + crc := binary.BigEndian.Uint32(crcBuf[:]) + if crc != hash.Sum32() { + return nil, errTruncate + } + e.meta = h.meta + e.UserMeta = h.userMeta + e.ExpiresAt = h.expiresAt + return e, nil +} + +// iterate iterates over log file. It doesn't not allocate new memory for every kv pair. +// Therefore, the kv pair is only valid for the duration of fn call. +func (vlog *valueLog) iterate(lf *logFile, offset uint32, fn logEntry) (uint32, error) { + fi, err := lf.fd.Stat() + if err != nil { + return 0, err + } + if int64(offset) == fi.Size() { + // We're at the end of the file already. No need to do anything. + return offset, nil + } + if vlog.opt.ReadOnly { + // We're not at the end of the file. We'd need to replay the entries, or + // possibly truncate the file. + return 0, ErrReplayNeeded + } + + // We're not at the end of the file. Let's Seek to the offset and start reading. + if _, err := lf.fd.Seek(int64(offset), io.SeekStart); err != nil { + return 0, errFile(err, lf.path, "Unable to seek") + } + + reader := bufio.NewReader(lf.fd) + read := &safeRead{ + k: make([]byte, 10), + v: make([]byte, 10), + recordOffset: offset, + } + + var lastCommit uint64 + var validEndOffset uint32 + for { + e, err := read.Entry(reader) + if err == io.EOF { + break + } else if err == io.ErrUnexpectedEOF || err == errTruncate { + break + } else if err != nil { + return 0, err + } else if e == nil { + continue + } + + var vp valuePointer + vp.Len = uint32(headerBufSize + len(e.Key) + len(e.Value) + crc32.Size) + read.recordOffset += vp.Len + + vp.Offset = e.offset + vp.Fid = lf.fid + + if e.meta&bitTxn > 0 { + txnTs := y.ParseTs(e.Key) + if lastCommit == 0 { + lastCommit = txnTs + } + if lastCommit != txnTs { + break + } + + } else if e.meta&bitFinTxn > 0 { + txnTs, err := strconv.ParseUint(string(e.Value), 10, 64) + if err != nil || lastCommit != txnTs { + break + } + // Got the end of txn. Now we can store them. + lastCommit = 0 + validEndOffset = read.recordOffset + + } else { + if lastCommit != 0 { + // This is most likely an entry which was moved as part of GC. + // We shouldn't get this entry in the middle of a transaction. + break + } + validEndOffset = read.recordOffset + } + + if err := fn(*e, vp); err != nil { + if err == errStop { + break + } + return 0, errFile(err, lf.path, "Iteration function") + } + } + return validEndOffset, nil +} + +func (vlog *valueLog) rewrite(f *logFile, tr trace.Trace) error { + maxFid := atomic.LoadUint32(&vlog.maxFid) + y.AssertTruef(uint32(f.fid) < maxFid, "fid to move: %d. Current max fid: %d", f.fid, maxFid) + tr.LazyPrintf("Rewriting fid: %d", f.fid) + + wb := make([]*Entry, 0, 1000) + var size int64 + + y.AssertTrue(vlog.db != nil) + var count, moved int + fe := func(e Entry) error { + count++ + if count%100000 == 0 { + tr.LazyPrintf("Processing entry %d", count) + } + + vs, err := vlog.db.get(e.Key) + if err != nil { + return err + } + if discardEntry(e, vs) { + return nil + } + + // Value is still present in value log. + if len(vs.Value) == 0 { + return errors.Errorf("Empty value: %+v", vs) + } + var vp valuePointer + vp.Decode(vs.Value) + + if vp.Fid > f.fid { + return nil + } + if vp.Offset > e.offset { + return nil + } + if vp.Fid == f.fid && vp.Offset == e.offset { + moved++ + // This new entry only contains the key, and a pointer to the value. + ne := new(Entry) + ne.meta = 0 // Remove all bits. Different keyspace doesn't need these bits. + ne.UserMeta = e.UserMeta + + // Create a new key in a separate keyspace, prefixed by moveKey. We are not + // allowed to rewrite an older version of key in the LSM tree, because then this older + // version would be at the top of the LSM tree. To work correctly, reads expect the + // latest versions to be at the top, and the older versions at the bottom. + if bytes.HasPrefix(e.Key, badgerMove) { + ne.Key = append([]byte{}, e.Key...) + } else { + ne.Key = make([]byte, len(badgerMove)+len(e.Key)) + n := copy(ne.Key, badgerMove) + copy(ne.Key[n:], e.Key) + } + + ne.Value = append([]byte{}, e.Value...) + wb = append(wb, ne) + size += int64(e.estimateSize(vlog.opt.ValueThreshold)) + if size >= 64*mi { + tr.LazyPrintf("request has %d entries, size %d", len(wb), size) + if err := vlog.db.batchSet(wb); err != nil { + return err + } + size = 0 + wb = wb[:0] + } + } else { + vlog.db.opt.Warningf("This entry should have been caught. %+v\n", e) + } + return nil + } + + _, err := vlog.iterate(f, 0, func(e Entry, vp valuePointer) error { + return fe(e) + }) + if err != nil { + return err + } + + tr.LazyPrintf("request has %d entries, size %d", len(wb), size) + batchSize := 1024 + var loops int + for i := 0; i < len(wb); { + loops++ + if batchSize == 0 { + vlog.db.opt.Warningf("We shouldn't reach batch size of zero.") + return ErrNoRewrite + } + end := i + batchSize + if end > len(wb) { + end = len(wb) + } + if err := vlog.db.batchSet(wb[i:end]); err != nil { + if err == ErrTxnTooBig { + // Decrease the batch size to half. + batchSize = batchSize / 2 + tr.LazyPrintf("Dropped batch size to %d", batchSize) + continue + } + return err + } + i += batchSize + } + tr.LazyPrintf("Processed %d entries in %d loops", len(wb), loops) + tr.LazyPrintf("Total entries: %d. Moved: %d", count, moved) + tr.LazyPrintf("Removing fid: %d", f.fid) + var deleteFileNow bool + // Entries written to LSM. Remove the older file now. + { + vlog.filesLock.Lock() + // Just a sanity-check. + if _, ok := vlog.filesMap[f.fid]; !ok { + vlog.filesLock.Unlock() + return errors.Errorf("Unable to find fid: %d", f.fid) + } + if vlog.iteratorCount() == 0 { + delete(vlog.filesMap, f.fid) + deleteFileNow = true + } else { + vlog.filesToBeDeleted = append(vlog.filesToBeDeleted, f.fid) + } + vlog.filesLock.Unlock() + } + + if deleteFileNow { + vlog.deleteLogFile(f) + } + + return nil +} + +func (vlog *valueLog) deleteMoveKeysFor(fid uint32, tr trace.Trace) error { + db := vlog.db + var result []*Entry + var count, pointers uint64 + tr.LazyPrintf("Iterating over move keys to find invalids for fid: %d", fid) + err := db.View(func(txn *Txn) error { + opt := DefaultIteratorOptions + opt.internalAccess = true + opt.PrefetchValues = false + itr := txn.NewIterator(opt) + defer itr.Close() + + for itr.Seek(badgerMove); itr.ValidForPrefix(badgerMove); itr.Next() { + count++ + item := itr.Item() + if item.meta&bitValuePointer == 0 { + continue + } + pointers++ + var vp valuePointer + vp.Decode(item.vptr) + if vp.Fid == fid { + e := &Entry{Key: y.KeyWithTs(item.Key(), item.Version()), meta: bitDelete} + result = append(result, e) + } + } + return nil + }) + if err != nil { + tr.LazyPrintf("Got error while iterating move keys: %v", err) + tr.SetError() + return err + } + tr.LazyPrintf("Num total move keys: %d. Num pointers: %d", count, pointers) + tr.LazyPrintf("Number of invalid move keys found: %d", len(result)) + batchSize := 10240 + for i := 0; i < len(result); { + end := i + batchSize + if end > len(result) { + end = len(result) + } + if err := db.batchSet(result[i:end]); err != nil { + if err == ErrTxnTooBig { + batchSize /= 2 + tr.LazyPrintf("Dropped batch size to %d", batchSize) + continue + } + tr.LazyPrintf("Error while doing batchSet: %v", err) + tr.SetError() + return err + } + i += batchSize + } + tr.LazyPrintf("Move keys deletion done.") + return nil +} + +func (vlog *valueLog) incrIteratorCount() { + atomic.AddInt32(&vlog.numActiveIterators, 1) +} + +func (vlog *valueLog) iteratorCount() int { + return int(atomic.LoadInt32(&vlog.numActiveIterators)) +} + +func (vlog *valueLog) decrIteratorCount() error { + num := atomic.AddInt32(&vlog.numActiveIterators, -1) + if num != 0 { + return nil + } + + vlog.filesLock.Lock() + lfs := make([]*logFile, 0, len(vlog.filesToBeDeleted)) + for _, id := range vlog.filesToBeDeleted { + lfs = append(lfs, vlog.filesMap[id]) + delete(vlog.filesMap, id) + } + vlog.filesToBeDeleted = nil + vlog.filesLock.Unlock() + + for _, lf := range lfs { + if err := vlog.deleteLogFile(lf); err != nil { + return err + } + } + return nil +} + +func (vlog *valueLog) deleteLogFile(lf *logFile) error { + path := vlog.fpath(lf.fid) + if err := lf.munmap(); err != nil { + _ = lf.fd.Close() + return err + } + if err := lf.fd.Close(); err != nil { + return err + } + return os.Remove(path) +} + +func (vlog *valueLog) dropAll() (int, error) { + // We don't want to block dropAll on any pending transactions. So, don't worry about iterator + // count. + var count int + deleteAll := func() error { + vlog.filesLock.Lock() + defer vlog.filesLock.Unlock() + for _, lf := range vlog.filesMap { + if err := vlog.deleteLogFile(lf); err != nil { + return err + } + count++ + } + vlog.filesMap = make(map[uint32]*logFile) + return nil + } + if err := deleteAll(); err != nil { + return count, err + } + + vlog.db.opt.Infof("Value logs deleted. Creating value log file: 0") + if _, err := vlog.createVlogFile(0); err != nil { + return count, err + } + atomic.StoreUint32(&vlog.maxFid, 0) + return count, nil +} + +// lfDiscardStats keeps track of the amount of data that could be discarded for +// a given logfile. +type lfDiscardStats struct { + sync.Mutex + m map[uint32]int64 +} + +type valueLog struct { + dirPath string + elog trace.EventLog + + // guards our view of which files exist, which to be deleted, how many active iterators + filesLock sync.RWMutex + filesMap map[uint32]*logFile + filesToBeDeleted []uint32 + // A refcount of iterators -- when this hits zero, we can delete the filesToBeDeleted. + numActiveIterators int32 + + db *DB + maxFid uint32 // accessed via atomics. + writableLogOffset uint32 // read by read, written by write. Must access via atomics. + numEntriesWritten uint32 + opt Options + + garbageCh chan struct{} + lfDiscardStats *lfDiscardStats +} + +func vlogFilePath(dirPath string, fid uint32) string { + return fmt.Sprintf("%s%s%06d.vlog", dirPath, string(os.PathSeparator), fid) +} + +func (vlog *valueLog) fpath(fid uint32) string { + return vlogFilePath(vlog.dirPath, fid) +} + +func (vlog *valueLog) populateFilesMap() error { + vlog.filesMap = make(map[uint32]*logFile) + + files, err := ioutil.ReadDir(vlog.dirPath) + if err != nil { + return errFile(err, vlog.dirPath, "Unable to open log dir.") + } + + found := make(map[uint64]struct{}) + for _, file := range files { + if !strings.HasSuffix(file.Name(), ".vlog") { + continue + } + fsz := len(file.Name()) + fid, err := strconv.ParseUint(file.Name()[:fsz-5], 10, 32) + if err != nil { + return errFile(err, file.Name(), "Unable to parse log id.") + } + if _, ok := found[fid]; ok { + return errFile(err, file.Name(), "Duplicate file found. Please delete one.") + } + found[fid] = struct{}{} + + lf := &logFile{ + fid: uint32(fid), + path: vlog.fpath(uint32(fid)), + loadingMode: vlog.opt.ValueLogLoadingMode, + } + vlog.filesMap[uint32(fid)] = lf + if vlog.maxFid < uint32(fid) { + vlog.maxFid = uint32(fid) + } + } + return nil +} + +func (vlog *valueLog) createVlogFile(fid uint32) (*logFile, error) { + path := vlog.fpath(fid) + lf := &logFile{ + fid: fid, + path: path, + loadingMode: vlog.opt.ValueLogLoadingMode, + } + // writableLogOffset is only written by write func, by read by Read func. + // To avoid a race condition, all reads and updates to this variable must be + // done via atomics. + atomic.StoreUint32(&vlog.writableLogOffset, 0) + vlog.numEntriesWritten = 0 + + var err error + if lf.fd, err = y.CreateSyncedFile(path, vlog.opt.SyncWrites); err != nil { + return nil, errFile(err, lf.path, "Create value log file") + } + if err = syncDir(vlog.dirPath); err != nil { + return nil, errFile(err, vlog.dirPath, "Sync value log dir") + } + if err = lf.mmap(2 * vlog.opt.ValueLogFileSize); err != nil { + return nil, errFile(err, lf.path, "Mmap value log file") + } + + vlog.filesLock.Lock() + vlog.filesMap[fid] = lf + vlog.filesLock.Unlock() + + return lf, nil +} + +func errFile(err error, path string, msg string) error { + return fmt.Errorf("%s. Path=%s. Error=%v", msg, path, err) +} + +func (vlog *valueLog) replayLog(lf *logFile, offset uint32, replayFn logEntry) error { + // We should open the file in RW mode, so it can be truncated. + var err error + lf.fd, err = os.OpenFile(lf.path, os.O_RDWR, 0) + if err != nil { + return errFile(err, lf.path, "Open file in RW mode") + } + defer lf.fd.Close() + + fi, err := lf.fd.Stat() + if err != nil { + return errFile(err, lf.path, "Unable to run file.Stat") + } + + // Alright, let's iterate now. + endOffset, err := vlog.iterate(lf, offset, replayFn) + if err != nil { + return errFile(err, lf.path, "Unable to replay logfile") + } + if int64(endOffset) == fi.Size() { + return nil + } + + // End offset is different from file size. So, we should truncate the file + // to that size. + y.AssertTrue(int64(endOffset) <= fi.Size()) + if !vlog.opt.Truncate { + return ErrTruncateNeeded + } + + if err := lf.fd.Truncate(int64(endOffset)); err != nil { + return errFile(err, lf.path, fmt.Sprintf( + "Truncation needed at offset %d. Can be done manually as well.", endOffset)) + } + return nil +} + +func (vlog *valueLog) open(db *DB, ptr valuePointer, replayFn logEntry) error { + opt := db.opt + vlog.opt = opt + vlog.dirPath = opt.ValueDir + vlog.db = db + vlog.elog = trace.NewEventLog("Badger", "Valuelog") + vlog.garbageCh = make(chan struct{}, 1) // Only allow one GC at a time. + vlog.lfDiscardStats = &lfDiscardStats{m: make(map[uint32]int64)} + + if err := vlog.populateFilesMap(); err != nil { + return err + } + // If no files are found, then create a new file. + if len(vlog.filesMap) == 0 { + _, err := vlog.createVlogFile(0) + return err + } + + fids := vlog.sortedFids() + for _, fid := range fids { + lf, ok := vlog.filesMap[fid] + y.AssertTrue(ok) + + // This file is before the value head pointer. So, we don't need to + // replay it, and can just open it in readonly mode. + if fid < ptr.Fid { + if err := lf.openReadOnly(); err != nil { + return err + } + continue + } + + var offset uint32 + if fid == ptr.Fid { + offset = ptr.Offset + ptr.Len + } + vlog.db.opt.Infof("Replaying file id: %d at offset: %d\n", fid, offset) + now := time.Now() + // Replay and possible truncation done. Now we can open the file as per + // user specified options. + if err := vlog.replayLog(lf, offset, replayFn); err != nil { + return err + } + vlog.db.opt.Infof("Replay took: %s\n", time.Since(now)) + + if fid < vlog.maxFid { + if err := lf.openReadOnly(); err != nil { + return err + } + } else { + var flags uint32 + switch { + case vlog.opt.ReadOnly: + // If we have read only, we don't need SyncWrites. + flags |= y.ReadOnly + case vlog.opt.SyncWrites: + flags |= y.Sync + } + var err error + if lf.fd, err = y.OpenExistingFile(vlog.fpath(fid), flags); err != nil { + return errFile(err, lf.path, "Open existing file") + } + } + } + + // Seek to the end to start writing. + last, ok := vlog.filesMap[vlog.maxFid] + y.AssertTrue(ok) + lastOffset, err := last.fd.Seek(0, io.SeekEnd) + if err != nil { + return errFile(err, last.path, "file.Seek to end") + } + vlog.writableLogOffset = uint32(lastOffset) + + // Update the head to point to the updated tail. Otherwise, even after doing a successful + // replay and closing the DB, the value log head does not get updated, which causes the replay + // to happen repeatedly. + vlog.db.vhead = valuePointer{Fid: vlog.maxFid, Offset: uint32(lastOffset)} + + // Map the file if needed. When we create a file, it is automatically mapped. + if err = last.mmap(2 * opt.ValueLogFileSize); err != nil { + return errFile(err, last.path, "Map log file") + } + return nil +} + +func (vlog *valueLog) Close() error { + vlog.elog.Printf("Stopping garbage collection of values.") + defer vlog.elog.Finish() + + var err error + for id, f := range vlog.filesMap { + f.lock.Lock() // We won’t release the lock. + if munmapErr := f.munmap(); munmapErr != nil && err == nil { + err = munmapErr + } + + maxFid := atomic.LoadUint32(&vlog.maxFid) + if !vlog.opt.ReadOnly && id == maxFid { + // truncate writable log file to correct offset. + if truncErr := f.fd.Truncate( + int64(vlog.woffset())); truncErr != nil && err == nil { + err = truncErr + } + } + + if closeErr := f.fd.Close(); closeErr != nil && err == nil { + err = closeErr + } + } + return err +} + +// sortedFids returns the file id's not pending deletion, sorted. Assumes we have shared access to +// filesMap. +func (vlog *valueLog) sortedFids() []uint32 { + toBeDeleted := make(map[uint32]struct{}) + for _, fid := range vlog.filesToBeDeleted { + toBeDeleted[fid] = struct{}{} + } + ret := make([]uint32, 0, len(vlog.filesMap)) + for fid := range vlog.filesMap { + if _, ok := toBeDeleted[fid]; !ok { + ret = append(ret, fid) + } + } + sort.Slice(ret, func(i, j int) bool { + return ret[i] < ret[j] + }) + return ret +} + +type request struct { + // Input values + Entries []*Entry + // Output values and wait group stuff below + Ptrs []valuePointer + Wg sync.WaitGroup + Err error +} + +func (req *request) Wait() error { + req.Wg.Wait() + req.Entries = nil + err := req.Err + requestPool.Put(req) + return err +} + +// sync is thread-unsafe and should not be called concurrently with write. +func (vlog *valueLog) sync() error { + if vlog.opt.SyncWrites { + return nil + } + + vlog.filesLock.RLock() + if len(vlog.filesMap) == 0 { + vlog.filesLock.RUnlock() + return nil + } + maxFid := atomic.LoadUint32(&vlog.maxFid) + curlf := vlog.filesMap[maxFid] + curlf.lock.RLock() + vlog.filesLock.RUnlock() + + dirSyncCh := make(chan error) + go func() { dirSyncCh <- syncDir(vlog.opt.ValueDir) }() + err := curlf.sync() + curlf.lock.RUnlock() + dirSyncErr := <-dirSyncCh + if err != nil { + err = dirSyncErr + } + return err +} + +func (vlog *valueLog) woffset() uint32 { + return atomic.LoadUint32(&vlog.writableLogOffset) +} + +// write is thread-unsafe by design and should not be called concurrently. +func (vlog *valueLog) write(reqs []*request) error { + vlog.filesLock.RLock() + maxFid := atomic.LoadUint32(&vlog.maxFid) + curlf := vlog.filesMap[maxFid] + vlog.filesLock.RUnlock() + + var buf bytes.Buffer + toDisk := func() error { + if buf.Len() == 0 { + return nil + } + vlog.elog.Printf("Flushing %d blocks of total size: %d", len(reqs), buf.Len()) + n, err := curlf.fd.Write(buf.Bytes()) + if err != nil { + return errors.Wrapf(err, "Unable to write to value log file: %q", curlf.path) + } + buf.Reset() + y.NumWrites.Add(1) + y.NumBytesWritten.Add(int64(n)) + vlog.elog.Printf("Done") + atomic.AddUint32(&vlog.writableLogOffset, uint32(n)) + + if vlog.woffset() > uint32(vlog.opt.ValueLogFileSize) || + vlog.numEntriesWritten > vlog.opt.ValueLogMaxEntries { + var err error + if err = curlf.doneWriting(vlog.woffset()); err != nil { + return err + } + + newid := atomic.AddUint32(&vlog.maxFid, 1) + y.AssertTruef(newid > 0, "newid has overflown uint32: %v", newid) + newlf, err := vlog.createVlogFile(newid) + if err != nil { + return err + } + curlf = newlf + } + return nil + } + + for i := range reqs { + b := reqs[i] + b.Ptrs = b.Ptrs[:0] + for j := range b.Entries { + e := b.Entries[j] + var p valuePointer + + p.Fid = curlf.fid + // Use the offset including buffer length so far. + p.Offset = vlog.woffset() + uint32(buf.Len()) + plen, err := encodeEntry(e, &buf) // Now encode the entry into buffer. + if err != nil { + return err + } + p.Len = uint32(plen) + b.Ptrs = append(b.Ptrs, p) + } + vlog.numEntriesWritten += uint32(len(b.Entries)) + // We write to disk here so that all entries that are part of the same transaction are + // written to the same vlog file. + writeNow := + vlog.woffset()+uint32(buf.Len()) > uint32(vlog.opt.ValueLogFileSize) || + vlog.numEntriesWritten > uint32(vlog.opt.ValueLogMaxEntries) + if writeNow { + if err := toDisk(); err != nil { + return err + } + } + } + return toDisk() +} + +// Gets the logFile and acquires and RLock() for the mmap. You must call RUnlock on the file +// (if non-nil) +func (vlog *valueLog) getFileRLocked(fid uint32) (*logFile, error) { + vlog.filesLock.RLock() + defer vlog.filesLock.RUnlock() + ret, ok := vlog.filesMap[fid] + if !ok { + // log file has gone away, will need to retry the operation. + return nil, ErrRetry + } + ret.lock.RLock() + return ret, nil +} + +// Read reads the value log at a given location. +// TODO: Make this read private. +func (vlog *valueLog) Read(vp valuePointer, s *y.Slice) ([]byte, func(), error) { + // Check for valid offset if we are reading to writable log. + maxFid := atomic.LoadUint32(&vlog.maxFid) + if vp.Fid == maxFid && vp.Offset >= vlog.woffset() { + return nil, nil, errors.Errorf( + "Invalid value pointer offset: %d greater than current offset: %d", + vp.Offset, vlog.woffset()) + } + + buf, cb, err := vlog.readValueBytes(vp, s) + if err != nil { + return nil, cb, err + } + var h header + h.Decode(buf) + n := uint32(headerBufSize) + h.klen + return buf[n : n+h.vlen], cb, nil +} + +func (vlog *valueLog) readValueBytes(vp valuePointer, s *y.Slice) ([]byte, func(), error) { + lf, err := vlog.getFileRLocked(vp.Fid) + if err != nil { + return nil, nil, err + } + + buf, err := lf.read(vp, s) + if vlog.opt.ValueLogLoadingMode == options.MemoryMap { + return buf, lf.lock.RUnlock, err + } + // If we are using File I/O we unlock the file immediately + // and return an empty function as callback. + lf.lock.RUnlock() + return buf, nil, err +} + +// Test helper +func valueBytesToEntry(buf []byte) (e Entry) { + var h header + h.Decode(buf) + n := uint32(headerBufSize) + + e.Key = buf[n : n+h.klen] + n += h.klen + e.meta = h.meta + e.UserMeta = h.userMeta + e.Value = buf[n : n+h.vlen] + return +} + +func (vlog *valueLog) pickLog(head valuePointer, tr trace.Trace) (files []*logFile) { + vlog.filesLock.RLock() + defer vlog.filesLock.RUnlock() + fids := vlog.sortedFids() + if len(fids) <= 1 { + tr.LazyPrintf("Only one or less value log file.") + return nil + } else if head.Fid == 0 { + tr.LazyPrintf("Head pointer is at zero.") + return nil + } + + // Pick a candidate that contains the largest amount of discardable data + candidate := struct { + fid uint32 + discard int64 + }{math.MaxUint32, 0} + vlog.lfDiscardStats.Lock() + for _, fid := range fids { + if fid >= head.Fid { + break + } + if vlog.lfDiscardStats.m[fid] > candidate.discard { + candidate.fid = fid + candidate.discard = vlog.lfDiscardStats.m[fid] + } + } + vlog.lfDiscardStats.Unlock() + + if candidate.fid != math.MaxUint32 { // Found a candidate + tr.LazyPrintf("Found candidate via discard stats: %v", candidate) + files = append(files, vlog.filesMap[candidate.fid]) + } else { + tr.LazyPrintf("Could not find candidate via discard stats. Randomly picking one.") + } + + // Fallback to randomly picking a log file + var idxHead int + for i, fid := range fids { + if fid == head.Fid { + idxHead = i + break + } + } + if idxHead == 0 { // Not found or first file + tr.LazyPrintf("Could not find any file.") + return nil + } + idx := rand.Intn(idxHead) // Don’t include head.Fid. We pick a random file before it. + if idx > 0 { + idx = rand.Intn(idx + 1) // Another level of rand to favor smaller fids. + } + tr.LazyPrintf("Randomly chose fid: %d", fids[idx]) + files = append(files, vlog.filesMap[fids[idx]]) + return files +} + +func discardEntry(e Entry, vs y.ValueStruct) bool { + if vs.Version != y.ParseTs(e.Key) { + // Version not found. Discard. + return true + } + if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { + return true + } + if (vs.Meta & bitValuePointer) == 0 { + // Key also stores the value in LSM. Discard. + return true + } + if (vs.Meta & bitFinTxn) > 0 { + // Just a txn finish entry. Discard. + return true + } + return false +} + +func (vlog *valueLog) doRunGC(lf *logFile, discardRatio float64, tr trace.Trace) (err error) { + // Update stats before exiting + defer func() { + if err == nil { + vlog.lfDiscardStats.Lock() + delete(vlog.lfDiscardStats.m, lf.fid) + vlog.lfDiscardStats.Unlock() + } + }() + + type reason struct { + total float64 + discard float64 + count int + } + + fi, err := lf.fd.Stat() + if err != nil { + tr.LazyPrintf("Error while finding file size: %v", err) + tr.SetError() + return err + } + + // Set up the sampling window sizes. + sizeWindow := float64(fi.Size()) * 0.1 // 10% of the file as window. + countWindow := int(float64(vlog.opt.ValueLogMaxEntries) * 0.01) // 1% of num entries. + tr.LazyPrintf("Size window: %5.2f. Count window: %d.", sizeWindow, countWindow) + + // Pick a random start point for the log. + skipFirstM := float64(rand.Int63n(fi.Size())) // Pick a random starting location. + skipFirstM -= sizeWindow // Avoid hitting EOF by moving back by window. + skipFirstM /= float64(mi) // Convert to MBs. + tr.LazyPrintf("Skip first %5.2f MB of file of size: %d MB", skipFirstM, fi.Size()/mi) + var skipped float64 + + var r reason + start := time.Now() + y.AssertTrue(vlog.db != nil) + s := new(y.Slice) + var numIterations int + _, err = vlog.iterate(lf, 0, func(e Entry, vp valuePointer) error { + numIterations++ + esz := float64(vp.Len) / (1 << 20) // in MBs. + if skipped < skipFirstM { + skipped += esz + return nil + } + + // Sample until we reach the window sizes or exceed 10 seconds. + if r.count > countWindow { + tr.LazyPrintf("Stopping sampling after %d entries.", countWindow) + return errStop + } + if r.total > sizeWindow { + tr.LazyPrintf("Stopping sampling after reaching window size.") + return errStop + } + if time.Since(start) > 10*time.Second { + tr.LazyPrintf("Stopping sampling after 10 seconds.") + return errStop + } + r.total += esz + r.count++ + + vs, err := vlog.db.get(e.Key) + if err != nil { + return err + } + if discardEntry(e, vs) { + r.discard += esz + return nil + } + + // Value is still present in value log. + y.AssertTrue(len(vs.Value) > 0) + vp.Decode(vs.Value) + + if vp.Fid > lf.fid { + // Value is present in a later log. Discard. + r.discard += esz + return nil + } + if vp.Offset > e.offset { + // Value is present in a later offset, but in the same log. + r.discard += esz + return nil + } + if vp.Fid == lf.fid && vp.Offset == e.offset { + // This is still the active entry. This would need to be rewritten. + + } else { + vlog.elog.Printf("Reason=%+v\n", r) + + buf, cb, err := vlog.readValueBytes(vp, s) + if err != nil { + return errStop + } + ne := valueBytesToEntry(buf) + ne.offset = vp.Offset + ne.print("Latest Entry Header in LSM") + e.print("Latest Entry in Log") + runCallback(cb) + return errors.Errorf("This shouldn't happen. Latest Pointer:%+v. Meta:%v.", + vp, vs.Meta) + } + return nil + }) + + if err != nil { + tr.LazyPrintf("Error while iterating for RunGC: %v", err) + tr.SetError() + return err + } + tr.LazyPrintf("Fid: %d. Skipped: %5.2fMB Num iterations: %d. Data status=%+v\n", + lf.fid, skipped, numIterations, r) + + // If we couldn't sample at least a 1000 KV pairs or at least 75% of the window size, + // and what we can discard is below the threshold, we should skip the rewrite. + if (r.count < countWindow && r.total < sizeWindow*0.75) || r.discard < discardRatio*r.total { + tr.LazyPrintf("Skipping GC on fid: %d", lf.fid) + return ErrNoRewrite + } + if err = vlog.rewrite(lf, tr); err != nil { + return err + } + tr.LazyPrintf("Done rewriting.") + return nil +} + +func (vlog *valueLog) waitOnGC(lc *y.Closer) { + defer lc.Done() + + <-lc.HasBeenClosed() // Wait for lc to be closed. + + // Block any GC in progress to finish, and don't allow any more writes to runGC by filling up + // the channel of size 1. + vlog.garbageCh <- struct{}{} +} + +func (vlog *valueLog) runGC(discardRatio float64, head valuePointer) error { + select { + case vlog.garbageCh <- struct{}{}: + // Pick a log file for GC. + tr := trace.New("Badger.ValueLog", "GC") + tr.SetMaxEvents(100) + defer func() { + tr.Finish() + <-vlog.garbageCh + }() + + var err error + files := vlog.pickLog(head, tr) + if len(files) == 0 { + tr.LazyPrintf("PickLog returned zero results.") + return ErrNoRewrite + } + tried := make(map[uint32]bool) + for _, lf := range files { + if _, done := tried[lf.fid]; done { + continue + } + tried[lf.fid] = true + err = vlog.doRunGC(lf, discardRatio, tr) + if err == nil { + return vlog.deleteMoveKeysFor(lf.fid, tr) + } + } + return err + default: + return ErrRejected + } +} + +func (vlog *valueLog) updateGCStats(stats map[uint32]int64) { + vlog.lfDiscardStats.Lock() + for fid, sz := range stats { + vlog.lfDiscardStats.m[fid] += sz + } + vlog.lfDiscardStats.Unlock() +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/error.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/error.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/error.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/error.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/file_dsync.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/file_dsync.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/file_dsync.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/file_dsync.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/file_nodsync.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/file_nodsync.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/file_nodsync.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/file_nodsync.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/iterator.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/iterator.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/iterator.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/iterator.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/metrics.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/metrics.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/metrics.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/metrics.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/mmap_unix.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/mmap_unix.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/mmap_unix.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/mmap_unix.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/mmap_windows.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/mmap_windows.go similarity index 100% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/mmap_windows.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/mmap_windows.go diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/watermark.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/watermark.go similarity index 76% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/watermark.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/watermark.go index 3b6a43b988..6d17c3cbe4 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/watermark.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/watermark.go @@ -38,14 +38,15 @@ func (u *uint64Heap) Pop() interface{} { return x } -// mark contains raft proposal id and a done boolean. It is used to -// update the WaterMark struct about the status of a proposal. +// mark contains one of more indices, along with a done boolean to indicate the +// status of the index: begin or done. It also contains waiters, who could be +// waiting for the watermark to reach >= a certain index. type mark struct { // Either this is an (index, waiter) pair or (index, done) or (indices, done). index uint64 waiter chan struct{} indices []uint64 - done bool // Set to true if the pending mutation is done. + done bool // Set to true if the index is done. } // WaterMark is used to keep track of the minimum un-finished index. Typically, an index k becomes @@ -55,50 +56,64 @@ type mark struct { // // An index may also become "done" by calling SetDoneUntil at a time such that it is not // inter-mingled with Begin/Done calls. +// +// Since doneUntil and lastIndex addresses are passed to sync/atomic packages, we ensure that they +// are 64-bit aligned by putting them at the beginning of the structure. type WaterMark struct { - Name string - markCh chan mark doneUntil uint64 lastIndex uint64 + Name string + markCh chan mark elog trace.EventLog } // Init initializes a WaterMark struct. MUST be called before using it. -func (w *WaterMark) Init() { +func (w *WaterMark) Init(closer *Closer) { w.markCh = make(chan mark, 100) w.elog = trace.NewEventLog("Watermark", w.Name) - go w.process() + go w.process(closer) } +// Begin sets the last index to the given value. func (w *WaterMark) Begin(index uint64) { atomic.StoreUint64(&w.lastIndex, index) w.markCh <- mark{index: index, done: false} } + +// BeginMany works like Begin but accepts multiple indices. func (w *WaterMark) BeginMany(indices []uint64) { atomic.StoreUint64(&w.lastIndex, indices[len(indices)-1]) w.markCh <- mark{index: 0, indices: indices, done: false} } +// Done sets a single index as done. func (w *WaterMark) Done(index uint64) { w.markCh <- mark{index: index, done: true} } + +// DoneMany works like Done but accepts multiple indices. func (w *WaterMark) DoneMany(indices []uint64) { w.markCh <- mark{index: 0, indices: indices, done: true} } -// DoneUntil returns the maximum index until which all tasks are done. +// DoneUntil returns the maximum index that has the property that all indices +// less than or equal to it are done. func (w *WaterMark) DoneUntil() uint64 { return atomic.LoadUint64(&w.doneUntil) } +// SetDoneUntil sets the maximum index that has the property that all indices +// less than or equal to it are done. func (w *WaterMark) SetDoneUntil(val uint64) { atomic.StoreUint64(&w.doneUntil, val) } +// LastIndex returns the last index for which Begin has been called. func (w *WaterMark) LastIndex() uint64 { return atomic.LoadUint64(&w.lastIndex) } +// WaitForMark waits until the given index is marked as done. func (w *WaterMark) WaitForMark(ctx context.Context, index uint64) error { if w.DoneUntil() >= index { return nil @@ -122,7 +137,9 @@ func (w *WaterMark) WaitForMark(ctx context.Context, index uint64) error { // if no watermark is emitted at index 101 then waiter would get stuck indefinitely as it // can't decide whether the task at 101 has decided not to emit watermark or it didn't get // scheduled yet. -func (w *WaterMark) process() { +func (w *WaterMark) process(closer *Closer) { + defer closer.Done() + var indices uint64Heap // pending maps raft proposal index to the number of pending mutations for this proposal. pending := make(map[uint64]int) @@ -186,25 +203,30 @@ func (w *WaterMark) process() { } } - for mark := range w.markCh { - if mark.waiter != nil { - doneUntil := atomic.LoadUint64(&w.doneUntil) - if doneUntil >= mark.index { - close(mark.waiter) - } else { - ws, ok := waiters[mark.index] - if !ok { - waiters[mark.index] = []chan struct{}{mark.waiter} + for { + select { + case <-closer.HasBeenClosed(): + return + case mark := <-w.markCh: + if mark.waiter != nil { + doneUntil := atomic.LoadUint64(&w.doneUntil) + if doneUntil >= mark.index { + close(mark.waiter) } else { - waiters[mark.index] = append(ws, mark.waiter) + ws, ok := waiters[mark.index] + if !ok { + waiters[mark.index] = []chan struct{}{mark.waiter} + } else { + waiters[mark.index] = append(ws, mark.waiter) + } + } + } else { + if mark.index > 0 { + processOne(mark.index, mark.done) + } + for _, index := range mark.indices { + processOne(index, mark.done) } - } - } else { - if mark.index > 0 { - processOne(mark.index, mark.done) - } - for _, index := range mark.indices { - processOne(index, mark.done) } } } diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/y.go b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/y.go similarity index 76% rename from vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/y.go rename to vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/y.go index 325a8c8eef..47cb29228a 100644 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y/y.go +++ b/vendor/gx/ipfs/QmU4emVTYFKnoJ5yK3pPEN9joyEx6U7y892PDx26ZtNxQd/badger/y/y.go @@ -19,10 +19,12 @@ package y import ( "bytes" "encoding/binary" + "fmt" "hash/crc32" "math" "os" "sync" + "time" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" ) @@ -161,6 +163,19 @@ func (s *Slice) Resize(sz int) []byte { return s.buf[0:sz] } +// FixedDuration returns a string representation of the given duration with the +// hours, minutes, and seconds. +func FixedDuration(d time.Duration) string { + str := fmt.Sprintf("%02ds", int(d.Seconds())%60) + if d >= time.Minute { + str = fmt.Sprintf("%02dm", int(d.Minutes())%60) + str + } + if d >= time.Hour { + str = fmt.Sprintf("%02dh", int(d.Hours())) + str + } + return str +} + // Closer holds the two things we need to close a goroutine and wait for it to finish: a chan // to tell the goroutine to shut down, and a WaitGroup with which to wait for it to finish shutting // down. @@ -207,3 +222,65 @@ func (lc *Closer) SignalAndWait() { lc.Signal() lc.Wait() } + +// Throttle allows a limited number of workers to run at a time. It also +// provides a mechanism to check for errors encountered by workers and wait for +// them to finish. +type Throttle struct { + wg sync.WaitGroup + ch chan struct{} + errCh chan error +} + +// NewThrottle creates a new throttle with a max number of workers. +func NewThrottle(max int) *Throttle { + return &Throttle{ + ch: make(chan struct{}, max), + errCh: make(chan error, max), + } +} + +// Do should be called by workers before they start working. It blocks if there +// are already maximum number of workers working. If it detects an error from +// previously Done workers, it would return it. +func (t *Throttle) Do() error { + for { + select { + case t.ch <- struct{}{}: + t.wg.Add(1) + return nil + case err := <-t.errCh: + if err != nil { + return err + } + } + } +} + +// Done should be called by workers when they finish working. They can also +// pass the error status of work done. +func (t *Throttle) Done(err error) { + if err != nil { + t.errCh <- err + } + select { + case <-t.ch: + default: + panic("Throttle Do Done mismatch") + } + t.wg.Done() +} + +// Finish waits until all workers have finished working. It would return any +// error passed by Done. +func (t *Throttle) Finish() error { + t.wg.Wait() + close(t.ch) + close(t.errCh) + for err := range t.errCh { + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/.travis.yml b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/.travis.yml new file mode 100644 index 0000000000..18f4287d76 --- /dev/null +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/.travis.yml @@ -0,0 +1,32 @@ +os: + - linux + +language: go + +go: + - 1.11.x + +env: + global: + - GOTFLAGS="-race" + matrix: + - BUILD_DEPTYPE=gx + - BUILD_DEPTYPE=gomod + + +# disable travis install +install: + - true + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + + +cache: + directories: + - $GOPATH/src/gx + - $GOPATH/pkg/mod + - /home/travis/.cache/go-build + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/LICENSE b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr/LICENSE rename to vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/LICENSE diff --git a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/README.md b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/README.md similarity index 100% rename from vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/README.md rename to vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/README.md diff --git a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/dns.go b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/dns.go similarity index 95% rename from vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/dns.go rename to vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/dns.go index d51e1d7e7c..1d8608e6f6 100644 --- a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/dns.go +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/dns.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) var Dns4Protocol = ma.Protocol{ diff --git a/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.mod b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.mod new file mode 100644 index 0000000000..fb228c603f --- /dev/null +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.mod @@ -0,0 +1,3 @@ +module github.com/multiformats/go-multiaddr-dns + +require github.com/multiformats/go-multiaddr v0.0.1 diff --git a/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.sum b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.sum new file mode 100644 index 0000000000..cbf49eb4e8 --- /dev/null +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/go.sum @@ -0,0 +1,18 @@ +github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJu4ZbSc= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XCFOweFD3BNESdnO8ewyYTFT2R+/b8FQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/multiformats/go-multiaddr v0.0.1 h1:/QUV3VBMDI6pi6xfiw7lr6xhDWWvQKn9udPn68kLSdY= +github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d h1:Z0Ahzd7HltpJtjAHHxX8QFP3j1yYgiuvjbjRzDj/KH0= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/package.json b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/package.json new file mode 100644 index 0000000000..b5cdca5674 --- /dev/null +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/package.json @@ -0,0 +1,24 @@ +{ + "author": "lgierth", + "bugs": { + "url": "https://github.com/multiformats/go-multiaddr-dns/issues" + }, + "gx": { + "dvcsimport": "github.com/multiformats/go-multiaddr-dns" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-multiaddr-dns", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.3.1" +} + diff --git a/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/resolve.go b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/resolve.go new file mode 100644 index 0000000000..56b386e213 --- /dev/null +++ b/vendor/gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns/resolve.go @@ -0,0 +1,181 @@ +package madns + +import ( + "context" + "fmt" + "net" + "strings" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" +) + +var ResolvableProtocols = []ma.Protocol{DnsaddrProtocol, Dns4Protocol, Dns6Protocol} +var DefaultResolver = &Resolver{Backend: net.DefaultResolver} + +type backend interface { + LookupIPAddr(context.Context, string) ([]net.IPAddr, error) + LookupTXT(context.Context, string) ([]string, error) +} + +type Resolver struct { + Backend backend +} + +type MockBackend struct { + IP map[string][]net.IPAddr + TXT map[string][]string +} + +func (r *MockBackend) LookupIPAddr(ctx context.Context, name string) ([]net.IPAddr, error) { + results, ok := r.IP[name] + if ok { + return results, nil + } else { + return []net.IPAddr{}, nil + } +} + +func (r *MockBackend) LookupTXT(ctx context.Context, name string) ([]string, error) { + results, ok := r.TXT[name] + if ok { + return results, nil + } else { + return []string{}, nil + } +} + +func Matches(maddr ma.Multiaddr) bool { + protos := maddr.Protocols() + if len(protos) == 0 { + return false + } + + for _, p := range ResolvableProtocols { + if protos[0].Code == p.Code { + return true + } + } + + return false +} + +func Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { + return DefaultResolver.Resolve(ctx, maddr) +} + +func (r *Resolver) Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { + if !Matches(maddr) { + return []ma.Multiaddr{maddr}, nil + } + + protos := maddr.Protocols() + if protos[0].Code == Dns4Protocol.Code { + return r.resolveDns4(ctx, maddr) + } + if protos[0].Code == Dns6Protocol.Code { + return r.resolveDns6(ctx, maddr) + } + if protos[0].Code == DnsaddrProtocol.Code { + return r.resolveDnsaddr(ctx, maddr) + } + + panic("unreachable") +} + +func (r *Resolver) resolveDns4(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { + value, err := maddr.ValueForProtocol(Dns4Protocol.Code) + if err != nil { + return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) + } + + encap := ma.Split(maddr)[1:] + + result := []ma.Multiaddr{} + records, err := r.Backend.LookupIPAddr(ctx, value) + if err != nil { + return result, err + } + + for _, r := range records { + ip4 := r.IP.To4() + if ip4 == nil { + continue + } + ip4maddr, err := ma.NewMultiaddr("/ip4/" + ip4.String()) + if err != nil { + return result, err + } + parts := append([]ma.Multiaddr{ip4maddr}, encap...) + result = append(result, ma.Join(parts...)) + } + return result, nil +} + +func (r *Resolver) resolveDns6(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { + value, err := maddr.ValueForProtocol(Dns6Protocol.Code) + if err != nil { + return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) + } + + encap := ma.Split(maddr)[1:] + + result := []ma.Multiaddr{} + records, err := r.Backend.LookupIPAddr(ctx, value) + if err != nil { + return result, err + } + + for _, r := range records { + if r.IP.To4() != nil { + continue + } + ip6maddr, err := ma.NewMultiaddr("/ip6/" + r.IP.To16().String()) + if err != nil { + return result, err + } + parts := append([]ma.Multiaddr{ip6maddr}, encap...) + result = append(result, ma.Join(parts...)) + } + return result, nil +} + +func (r *Resolver) resolveDnsaddr(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { + value, err := maddr.ValueForProtocol(DnsaddrProtocol.Code) + if err != nil { + return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) + } + + trailer := ma.Split(maddr)[1:] + + result := []ma.Multiaddr{} + records, err := r.Backend.LookupTXT(ctx, "_dnsaddr."+value) + if err != nil { + return result, err + } + + for _, r := range records { + rv := strings.Split(r, "dnsaddr=") + if len(rv) != 2 { + continue + } + + rmaddr, err := ma.NewMultiaddr(rv[1]) + if err != nil { + return result, err + } + + if matchDnsaddr(rmaddr, trailer) { + result = append(result, rmaddr) + } + } + return result, nil +} + +// XXX probably insecure +func matchDnsaddr(maddr ma.Multiaddr, trailer []ma.Multiaddr) bool { + parts := ma.Split(maddr) + if ma.Join(parts[len(parts)-len(trailer):]...).Equal(ma.Join(trailer...)) { + return true + } + return false +} diff --git a/vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/LICENSE b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds/LICENSE rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/LICENSE diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/addresses.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/addresses.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/addresses.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/addresses.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/api.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/api.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/api.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/api.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/bootstrap_peers.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/bootstrap_peers.go similarity index 96% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/bootstrap_peers.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/bootstrap_peers.go index 7995f175ee..454e22776c 100644 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/bootstrap_peers.go +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/bootstrap_peers.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" - iaddr "gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr" + iaddr "gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr" // Needs to be imported so that users can import this package directly // and still parse the bootstrap addresses. - _ "gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns" + _ "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" ) // DefaultBootstrapAddresses are the hardcoded bootstrap addresses diff --git a/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/config.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/config.go new file mode 100644 index 0000000000..02aa120239 --- /dev/null +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/config.go @@ -0,0 +1,128 @@ +// package config implements the ipfs config file datastructures and utilities. +package config + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + + "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir" +) + +// Config is used to load ipfs config files. +type Config struct { + Identity Identity // local node's peer identity + Datastore Datastore // local node's storage + Addresses Addresses // local node's addresses + Mounts Mounts // local node's mount points + Discovery Discovery // local node's discovery mechanisms + Routing Routing // local node's routing settings + Ipns Ipns // Ipns settings + Bootstrap []string // local nodes's bootstrap peer addresses + Gateway Gateway // local node's gateway server options + API API // local node's API settings + Swarm SwarmConfig + Pubsub PubsubConfig + + Reprovider Reprovider + Experimental Experiments +} + +const ( + // DefaultPathName is the default config dir name + DefaultPathName = ".ipfs" + // DefaultPathRoot is the path to the default config dir location. + DefaultPathRoot = "~/" + DefaultPathName + // DefaultConfigFile is the filename of the configuration file + DefaultConfigFile = "config" + // EnvDir is the environment variable used to change the path root. + EnvDir = "IPFS_PATH" +) + +// PathRoot returns the default configuration root directory +func PathRoot() (string, error) { + dir := os.Getenv(EnvDir) + var err error + if len(dir) == 0 { + dir, err = homedir.Expand(DefaultPathRoot) + } + return dir, err +} + +// Path returns the path `extension` relative to the configuration root. If an +// empty string is provided for `configroot`, the default root is used. +func Path(configroot, extension string) (string, error) { + if len(configroot) == 0 { + dir, err := PathRoot() + if err != nil { + return "", err + } + return filepath.Join(dir, extension), nil + + } + return filepath.Join(configroot, extension), nil +} + +// Filename returns the configuration file path given a configuration root +// directory. If the configuration root directory is empty, use the default one +func Filename(configroot string) (string, error) { + return Path(configroot, DefaultConfigFile) +} + +// HumanOutput gets a config value ready for printing +func HumanOutput(value interface{}) ([]byte, error) { + s, ok := value.(string) + if ok { + return []byte(strings.Trim(s, "\n")), nil + } + return Marshal(value) +} + +// Marshal configuration with JSON +func Marshal(value interface{}) ([]byte, error) { + // need to prettyprint, hence MarshalIndent, instead of Encoder + return json.MarshalIndent(value, "", " ") +} + +func FromMap(v map[string]interface{}) (*Config, error) { + buf := new(bytes.Buffer) + if err := json.NewEncoder(buf).Encode(v); err != nil { + return nil, err + } + var conf Config + if err := json.NewDecoder(buf).Decode(&conf); err != nil { + return nil, fmt.Errorf("failure to decode config: %s", err) + } + return &conf, nil +} + +func ToMap(conf *Config) (map[string]interface{}, error) { + buf := new(bytes.Buffer) + if err := json.NewEncoder(buf).Encode(conf); err != nil { + return nil, err + } + var m map[string]interface{} + if err := json.NewDecoder(buf).Decode(&m); err != nil { + return nil, fmt.Errorf("failure to decode config: %s", err) + } + return m, nil +} + +// Clone copies the config. Use when updating. +func (c *Config) Clone() (*Config, error) { + var newConfig Config + var buf bytes.Buffer + + if err := json.NewEncoder(&buf).Encode(c); err != nil { + return nil, fmt.Errorf("failure to encode config: %s", err) + } + + if err := json.NewDecoder(&buf).Decode(&newConfig); err != nil { + return nil, fmt.Errorf("failure to decode config: %s", err) + } + + return &newConfig, nil +} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/datastore.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/datastore.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/datastore.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/datastore.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/discovery.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/discovery.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/discovery.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/discovery.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/experiments.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/experiments.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/experiments.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/experiments.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/gateway.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/gateway.go similarity index 93% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/gateway.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/gateway.go index 7e64b566fb..017be9b285 100644 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/gateway.go +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/gateway.go @@ -7,4 +7,5 @@ type Gateway struct { Writable bool PathPrefixes []string APICommands []string + NoFetch bool } diff --git a/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/identity.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/identity.go new file mode 100644 index 0000000000..5d61ef83c3 --- /dev/null +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/identity.go @@ -0,0 +1,29 @@ +package config + +import ( + "encoding/base64" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" +) + +const IdentityTag = "Identity" +const PrivKeyTag = "PrivKey" +const PrivKeySelector = IdentityTag + "." + PrivKeyTag + +// Identity tracks the configuration of the local node's identity. +type Identity struct { + PeerID string + PrivKey string `json:",omitempty"` +} + +// DecodePrivateKey is a helper to decode the users PrivateKey +func (i *Identity) DecodePrivateKey(passphrase string) (ic.PrivKey, error) { + pkb, err := base64.StdEncoding.DecodeString(i.PrivKey) + if err != nil { + return nil, err + } + + // currently storing key unencrypted. in the future we need to encrypt it. + // TODO(security) + return ic.UnmarshalPrivateKey(pkb) +} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/init.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/init.go similarity index 96% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/init.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/init.go index f0ff36af32..bf42fc0ed2 100644 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/init.go +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/init.go @@ -7,8 +7,8 @@ import ( "io" "time" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) func Init(out io.Writer, nBitsForKeypair int) (*Config, error) { @@ -60,11 +60,12 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) { Gateway: Gateway{ RootRedirect: "", Writable: false, + NoFetch: false, PathPrefixes: []string{}, HTTPHeaders: map[string][]string{ "Access-Control-Allow-Origin": {"*"}, "Access-Control-Allow-Methods": {"GET"}, - "Access-Control-Allow-Headers": {"X-Requested-With", "Range"}, + "Access-Control-Allow-Headers": {"X-Requested-With", "Range", "User-Agent"}, }, APICommands: []string{}, }, diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/ipns.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/ipns.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/ipns.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/ipns.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/mounts.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/mounts.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/mounts.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/mounts.go diff --git a/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/package.json b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/package.json new file mode 100644 index 0000000000..ddd61bf547 --- /dev/null +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/package.json @@ -0,0 +1,60 @@ +{ + "author": "magik6k", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-config" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-config" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "facebookgo", + "hash": "QmdYwCmx8pZRkzdcd8MhmLJqYVoVTC1aGsy5Q4reMGLNLg", + "name": "atomicfile", + "version": "0.0.0" + }, + { + "author": "why", + "hash": "Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU", + "name": "go-ipfs-addr", + "version": "0.1.33" + }, + { + "author": "lgierth", + "hash": "QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy", + "name": "go-multiaddr-dns", + "version": "0.3.1" + }, + { + "author": "mitchellh", + "hash": "QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK", + "name": "go-homedir", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-ipfs-config", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.27" +} + diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/profile.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/profile.go similarity index 89% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/profile.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/profile.go index d23cadc6d9..f293202eac 100644 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/profile.go +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/profile.go @@ -1,6 +1,10 @@ package config -import "time" +import ( + "fmt" + "net" + "time" +) // Transformer is a function which takes configuration and applies some filter to it type Transformer func(c *Config) error @@ -121,6 +125,7 @@ Make sure to backup your data frequently.`, "type": "badgerds", "path": "badgerds", "syncWrites": true, + "truncate": true, }, } return nil @@ -159,6 +164,31 @@ fetching may be degraded. return nil }, }, + "randomports": { + Description: `Use a random port number for swarm.`, + + Transform: func(c *Config) error { + port, err := getAvailablePort() + if err != nil { + return err + } + c.Addresses.Swarm = []string{ + fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", port), + fmt.Sprintf("/ip6/::/tcp/%d", port), + } + return nil + }, + }, +} + +func getAvailablePort() (port int, err error) { + ln, err := net.Listen("tcp", "[::]:0") + if err != nil { + return 0, err + } + defer ln.Close() + port = ln.Addr().(*net.TCPAddr).Port + return port, nil } func appendSingle(a []string, b []string) []string { diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/pubsub.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/pubsub.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/pubsub.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/pubsub.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/reprovider.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/reprovider.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/reprovider.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/reprovider.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/routing.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/routing.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/routing.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/routing.go diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/serialize/serialize.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/serialize/serialize.go similarity index 92% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/serialize/serialize.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/serialize/serialize.go index 9bdf75c2d6..87dbbc8502 100644 --- a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/serialize/serialize.go +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/serialize/serialize.go @@ -8,9 +8,9 @@ import ( "os" "path/filepath" - "gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config" + "gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config" - "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" + "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" "gx/ipfs/QmdYwCmx8pZRkzdcd8MhmLJqYVoVTC1aGsy5Q4reMGLNLg/atomicfile" ) diff --git a/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/swarm.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/swarm.go new file mode 100644 index 0000000000..16dc54d9cb --- /dev/null +++ b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/swarm.go @@ -0,0 +1,25 @@ +package config + +type SwarmConfig struct { + AddrFilters []string + DisableBandwidthMetrics bool + DisableNatPortMap bool + DisableRelay bool + EnableRelayHop bool + + // autorelay functionality + // if true, then the libp2p host will be constructed with autorelay functionality. + EnableAutoRelay bool + // if true, then an AutoNATService will be instantiated to facilitate autorelay + EnableAutoNATService bool + + ConnMgr ConnMgr +} + +// ConnMgr defines configuration options for the libp2p connection manager +type ConnMgr struct { + Type string + LowWater int + HighWater int + GracePeriod string +} diff --git a/vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/types.go b/vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/types.go similarity index 100% rename from vendor/gx/ipfs/QmPEpj17FDRpc7K1aArKZp3RsHtzRMKykeK9GVgn4WQGPR/go-ipfs-config/types.go rename to vendor/gx/ipfs/QmUAuYuiafnJRZxDDX7MuruMNsicYNuyub5vUeAcupUBNs/go-ipfs-config/types.go diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/README.md b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/README.md deleted file mode 100644 index 2b76e680d9..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/README.md +++ /dev/null @@ -1,265 +0,0 @@ - -

- libp2p hex logo -

- -

The Go implementation of the libp2p Networking Stack.

- -

- - - - -

- -

- -
- - - -
-

- -# Project status - -[![Throughput Graph](https://graphs.waffle.io/libp2p/go-libp2p/throughput.svg)](https://waffle.io/libp2p/go-libp2p/metrics/throughput) - -[**`Weekly Core Dev Calls`**](https://github.com/ipfs/pm/issues/674) - -# Table of Contents - -- [Background](#background) -- [Bundles](#bundles) -- [Usage](#usage) - - [Install](#install) - - [API](#api) - - [Examples](#examples) -- [Development](#development) - - [Tests](#tests) - - [Packages](#packages) -- [Contribute](#contribute) -- [License](#license) - -## Background - -[libp2p](https://github.com/libp2p/specs) is a networking stack and library modularized out of [The IPFS Project](https://github.com/ipfs/ipfs), and bundled separately for other tools to use. -> -libp2p is the product of a long, and arduous quest of understanding -- a deep dive into the internet's network stack, and plentiful peer-to-peer protocols from the past. Building large scale peer-to-peer systems has been complex and difficult in the last 15 years, and libp2p is a way to fix that. It is a "network stack" -- a protocol suite -- that cleanly separates concerns, and enables sophisticated applications to only use the protocols they absolutely need, without giving up interoperability and upgradeability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects. -> -> We will be writing a set of docs, posts, tutorials, and talks to explain what p2p is, why it is tremendously useful, and how it can help your existing and new projects. But in the meantime, check out -> -> - [**The libp2p Specification**](https://github.com/libp2p/specs) -> - [**go-libp2p implementation**](https://github.com/libp2p/go-libp2p) -> - [**js-libp2p implementation**](https://github.com/libp2p/js-libp2p) - - -## Bundles - -There is currently only one bundle of `go-libp2p`, this package. This bundle is used by [`go-ipfs`](https://github.com/ipfs/go-ipfs). - -## Usage - -`go-libp2p` repo is a place holder for the list of Go modules that compose Go libp2p, as well as its entry point. - -### Install - -```bash -> go get -u -d github.com/libp2p/go-libp2p/... -> cd $GOPATH/src/github.com/libp2p/go-libp2p -> make -> make deps -``` - -### API - -[![GoDoc](https://godoc.org/github.com/ipfs/go-libp2p?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p) - -### Examples - -Examples can be found in the [examples repo](https://github.com/libp2p/go-libp2p-examples). - -## Development - -### Dependencies - -While developing, you need to use [gx to install and link your dependencies](https://github.com/whyrusleeping/gx#dependencies), to do that, run: - -```sh -> make deps -``` - -Before commiting and pushing to Github, make sure to rewind the gx'ify of dependencies. You can do that with: - -```sh -> make publish -``` - -### Tests - -Running of individual tests is done through `gx test ` - -```bash -$ cd $GOPATH/src/github.com/libp2p/go-libp2p -$ make deps -$ gx test ./p2p/ -``` - -### Packages - -> This table is generated using the module [`package-table`](https://github.com/ipfs-shipyard/package-table) with `package-table --data=package-list.json`. - -List of packages currently in existence for libp2p: - -| Name | CI/Travis | CI/Jenkins | Coverage | Description | -| ---------|---------|---------|---------|--------- | -| **Libp2p** | -| [`go-libp2p`](//github.com/libp2p/go-libp2p) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p) | go-libp2p entry point | -| [`go-libp2p-host`](//github.com/libp2p/go-libp2p-host) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-host.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-host) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-host/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-host) | libp2p "host" interface | -| [`go-libp2p-blankhost`](//github.com/libp2p/go-libp2p-blankhost) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-blankhost.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-blankhost) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-blankhost/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-blankhost) | minimal implementation of the "host" interface | -| **Network** | -| [`go-libp2p-net`](//github.com/libp2p/go-libp2p-net) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-net.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-net) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-net/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-net) | libp2p connection and "network" interfaces | -| [`go-libp2p-swarm`](//github.com/libp2p/go-libp2p-swarm) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-swarm.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-swarm) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-swarm/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-swarm/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-swarm/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-swarm) | reference implementation | -| **Transport** | -| [`go-libp2p-transport`](//github.com/libp2p/go-libp2p-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-transport) | interfaces | -| [`go-ws-transport`](//github.com/libp2p/go-ws-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-ws-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-ws-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-ws-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-ws-transport) | WebSocket transport | -| [`go-tcp-transport`](//github.com/libp2p/go-tcp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-tcp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-tcp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-tcp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-tcp-transport) | TCP transport | -| [`go-libp2p-quic-transport`](//github.com/libp2p/go-libp2p-quic-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-quic-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-quic-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-quic-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-quic-transport) | QUIC transport | -| [`go-udp-transport`](//github.com/libp2p/go-udp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-udp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-udp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-udp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-udp-transport) | UDP transport | -| [`go-utp-transport`](//github.com/libp2p/go-utp-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-utp-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-utp-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-utp-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-utp-transport) | uTorrent transport (UTP) | -| [`go-libp2p-circuit`](//github.com/libp2p/go-libp2p-circuit) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-circuit/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-circuit/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-circuit/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-circuit) | relay transport | -| [`go-libp2p-transport-upgrader`](//github.com/libp2p/go-libp2p-transport-upgrader) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-transport-upgrader.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport-upgrader) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-transport-upgrader/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-transport-upgrader) | upgrades multiaddr-net connections into full libp2p transports | -| [`go-libp2p-reuseport-transport`](//github.com/libp2p/go-libp2p-reuseport-transport) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-reuseport-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-reuseport-transport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-reuseport-transport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-reuseport-transport) | partial transport for building transports that reuse ports | -| **Encrypted Channels** | -| [`go-conn-security`](//github.com/libp2p/go-conn-security) | [![Travis CI](https://travis-ci.org/libp2p/go-conn-security.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-conn-security/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-conn-security) | interfaces | -| [`go-libp2p-secio`](//github.com/libp2p/go-libp2p-secio) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-secio.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-secio) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-secio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-secio) | SecIO crypto channel | -| [`go-conn-security-multistream`](//github.com/libp2p/go-conn-security-multistream) | [![Travis CI](https://travis-ci.org/libp2p/go-conn-security-multistream.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security-multistream) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-conn-security-multistream/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-conn-security-multistream) | multistream multiplexed meta crypto channel | -| **Private Network** | -| [`go-libp2p-interface-pnet`](//github.com/libp2p/go-libp2p-interface-pnet) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-interface-pnet.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-interface-pnet) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-interface-pnet/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-interface-pnet) | interfaces | -| [`go-libp2p-pnet`](//github.com/libp2p/go-libp2p-pnet) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pnet.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pnet) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pnet/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pnet) | reference implementation | -| **Stream Muxers** | -| [`go-stream-muxer`](//github.com/libp2p/go-stream-muxer) | [![Travis CI](https://travis-ci.org/libp2p/go-stream-muxer.svg?branch=master)](https://travis-ci.org/libp2p/go-stream-muxer) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-stream-muxer/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-stream-muxer) | interfaces | -| [`go-smux-yamux`](//github.com/whyrusleeping/go-smux-yamux) | [![Travis CI](https://travis-ci.org/whyrusleeping/go-smux-yamux.svg?branch=master)](https://travis-ci.org/whyrusleeping/go-smux-yamux) | N/A | [![codecov](https://codecov.io/gh/whyrusleeping/go-smux-yamux/branch/master/graph/badge.svg)](https://codecov.io/gh/whyrusleeping/go-smux-yamux) | YAMUX stream multiplexer | -| [`go-smux-mplex`](//github.com/whyrusleeping/go-smux-mplex) | [![Travis CI](https://travis-ci.org/whyrusleeping/go-smux-mplex.svg?branch=master)](https://travis-ci.org/whyrusleeping/go-smux-mplex) | N/A | [![codecov](https://codecov.io/gh/whyrusleeping/go-smux-mplex/branch/master/graph/badge.svg)](https://codecov.io/gh/whyrusleeping/go-smux-mplex) | MPLEX stream multiplexer | -| **NAT Traversal** | -| [`go-libp2p-nat`](//github.com/libp2p/go-libp2p-nat) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-nat.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-nat) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-nat/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-nat) | | -| [`go-libp2p-autonat`](//github.com/libp2p/go-libp2p-autonat) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-autonat.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-autonat) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-autonat/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-autonat) | NAT autodetection (client) | -| [`go-libp2p-autonat-svc`](//github.com/libp2p/go-libp2p-autonat-svc) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-autonat-svc.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-autonat-svc) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-autonat-svc/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-autonat-svc) | NAT autodetection (service) | -| **Peerstore** | -| [`go-libp2p-peerstore`](//github.com/libp2p/go-libp2p-peerstore) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-peerstore.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peerstore) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-peerstore/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-peerstore) | interfaces and reference implementation | -| **Connection Manager** | -| [`go-libp2p-interface-connmgr`](//github.com/libp2p/go-libp2p-interface-connmgr) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-interface-connmgr.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-interface-connmgr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-interface-connmgr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-interface-connmgr) | interface | -| [`go-libp2p-connmgr`](//github.com/libp2p/go-libp2p-connmgr) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-connmgr.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-connmgr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-connmgr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-connmgr) | reference implementation | -| **Routing** | -| [`go-libp2p-routing`](//github.com/libp2p/go-libp2p-routing) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing) | routing interfaces | -| [`go-libp2p-record`](//github.com/libp2p/go-libp2p-record) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-record.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-record) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-record/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-record) | record type and validator logic | -| [`go-libp2p-routing-helpers`](//github.com/libp2p/go-libp2p-routing-helpers) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing-helpers.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing-helpers) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-routing-helpers/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-routing-helpers/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers) | helpers for composing routers | -| [`go-libp2p-kad-dht`](//github.com/libp2p/go-libp2p-kad-dht) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-kad-dht.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-kad-dht) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-kad-dht/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-kad-dht/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-kad-dht/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-kad-dht) | Kademlia-like router | -| [`go-libp2p-pubsub-router`](//github.com/libp2p/go-libp2p-pubsub-router) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pubsub-router.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pubsub-router) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-pubsub-router/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-pubsub-router/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pubsub-router/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pubsub-router) | record-store over pubsub adapter | -| **Discovery** | -| [`go-libp2p-discovery`](//github.com/libp2p/go-libp2p-discovery) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-discovery.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-discovery) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-discovery/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-discovery) | active peer disovery interface | -| **Consensus** | -| [`go-libp2p-consensus`](//github.com/libp2p/go-libp2p-consensus) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-consensus.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-consensus) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-consensus/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-consensus) | consensus protocols interfaces | -| [`go-libp2p-raft`](//github.com/libp2p/go-libp2p-raft) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-raft.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-raft) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-raft/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-raft/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-raft/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-raft) | consensus implementation over raft | -| **Pubsub** | -| [`go-libp2p-pubsub`](//github.com/libp2p/go-libp2p-pubsub) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-pubsub.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-pubsub) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-pubsub/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-pubsub/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-pubsub/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-pubsub) | multiple pubsub over libp2p implementations | -| **RPC** | -| [`go-libp2p-gorpc`](//github.com/libp2p/go-libp2p-gorpc) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-gorpc.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-gorpc) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-gorpc/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-gorpc) | a simple RPC library for libp2p | -| **Metrics** | -| [`go-libp2p-metrics`](//github.com/libp2p/go-libp2p-metrics) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-metrics.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-metrics) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-metrics) | libp2p metrics interfaces/collectors | -| **Data Types** | -| [`go-libp2p-peer`](//github.com/libp2p/go-libp2p-peer) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-peer.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peer) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-peer/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-peer) | libp2p peer-ID datatype | -| [`go-libp2p-crypto`](//github.com/libp2p/go-libp2p-crypto) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-crypto.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-crypto) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-crypto) | libp2p key types | -| [`go-libp2p-protocol`](//github.com/libp2p/go-libp2p-protocol) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-protocol.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-protocol) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-protocol/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-protocol) | libp2p protocol datatype | -| [`go-libp2p-kbucket`](//github.com/libp2p/go-libp2p-kbucket) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-kbucket.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-kbucket) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-kbucket/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-kbucket) | Kademlia routing table helper types | -| **Utilities/miscellaneous** | -| [`go-libp2p-loggables`](//github.com/libp2p/go-libp2p-loggables) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-loggables.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-loggables) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-loggables/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-loggables) | logging helpers | -| [`go-maddr-filter`](//github.com/libp2p/go-maddr-filter) | [![Travis CI](https://travis-ci.org/libp2p/go-maddr-filter.svg?branch=master)](https://travis-ci.org/libp2p/go-maddr-filter) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-maddr-filter/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-maddr-filter) | multiaddr filtering helpers | -| [`go-libp2p-netutil`](//github.com/libp2p/go-libp2p-netutil) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-netutil.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-netutil) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-netutil/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-netutil) | misc utilities | -| [`go-msgio`](//github.com/libp2p/go-msgio) | [![Travis CI](https://travis-ci.org/libp2p/go-msgio.svg?branch=master)](https://travis-ci.org/libp2p/go-msgio) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-msgio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-msgio) | length prefixed data channel | -| [`go-addr-util`](//github.com/libp2p/go-addr-util) | [![Travis CI](https://travis-ci.org/libp2p/go-addr-util.svg?branch=master)](https://travis-ci.org/libp2p/go-addr-util) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-addr-util/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-addr-util) | address utilities for libp2p swarm | -| [`go-buffer-pool`](//github.com/libp2p/go-buffer-pool) | [![Travis CI](https://travis-ci.org/libp2p/go-buffer-pool.svg?branch=master)](https://travis-ci.org/libp2p/go-buffer-pool) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-buffer-pool/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-buffer-pool) | a variable size buffer pool for go | -| [`go-libp2p-loggables`](//github.com/libp2p/go-libp2p-loggables) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-loggables.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-loggables) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-loggables/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-loggables) | logging helpers | -| [`go-libp2p-routing-helpers`](//github.com/libp2p/go-libp2p-routing-helpers) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-routing-helpers.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-routing-helpers) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-routing-helpers/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-routing-helpers/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-routing-helpers) | routing helpers | -| [`go-maddr-filter`](//github.com/libp2p/go-maddr-filter) | [![Travis CI](https://travis-ci.org/libp2p/go-maddr-filter.svg?branch=master)](https://travis-ci.org/libp2p/go-maddr-filter) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-maddr-filter/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-maddr-filter) | a library to perform filtering of multiaddrs. | -| [`go-reuseport`](//github.com/libp2p/go-reuseport) | [![Travis CI](https://travis-ci.org/libp2p/go-reuseport.svg?branch=master)](https://travis-ci.org/libp2p/go-reuseport) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-reuseport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-reuseport) | enables reuse of addresses | -| [`go-sockaddr`](//github.com/libp2p/go-sockaddr) | [![Travis CI](https://travis-ci.org/libp2p/go-sockaddr.svg?branch=master)](https://travis-ci.org/libp2p/go-sockaddr) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-sockaddr/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-sockaddr) | utils for sockaddr conversions | -| [`go-flow-metrics`](//github.com/libp2p/go-flow-metrics) | [![Travis CI](https://travis-ci.org/libp2p/go-flow-metrics.svg?branch=master)](https://travis-ci.org/libp2p/go-flow-metrics) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-flow-metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-flow-metrics) | metrics library | -| **Testing and examples** | -| [`go-testutil`](//github.com/libp2p/go-testutil) | [![Travis CI](https://travis-ci.org/libp2p/go-testutil.svg?branch=master)](https://travis-ci.org/libp2p/go-testutil) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-testutil/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-testutil) | a collection of testing utilities for ipfs and libp2p | -| [`go-libp2p-examples`](//github.com/libp2p/go-libp2p-examples) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-examples.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-examples) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/go-libp2p-examples/master)](https://ci.ipfs.team/job/libp2p/job/go-libp2p-examples/job/master/) | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-examples/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-examples) | go-libp2p examples and tutorials | -| [`go-libp2p-circuit-progs`](//github.com/libp2p/go-libp2p-circuit-progs) | [![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit-progs.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit-progs) | N/A | [![codecov](https://codecov.io/gh/libp2p/go-libp2p-circuit-progs/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-libp2p-circuit-progs) | testing programs for go-libp2p-circuit | - - -# Contribute - -go-libp2p is part of [The IPFS Project](https://github.com/ipfs/ipfs), and is MIT licensed open source software. We welcome contributions big and small! Take a look at the [community contributing notes](https://github.com/ipfs/community/blob/master/contributing.md). Please make sure to check the [issues](https://github.com/ipfs/go-libp2p/issues). Search the closed ones before reporting things, and help us with the open ones. - -Guidelines: - -- read the [libp2p spec](https://github.com/libp2p/specs) -- please make branches + pull-request, even if working on the main repository -- ask questions or talk about things in [Issues](https://github.com/libp2p/go-libp2p/issues) or #ipfs on freenode. -- ensure you are able to contribute (no legal issues please-- we use the DCO) -- run `go fmt` before pushing any code -- run `golint` and `go vet` too -- some things (like protobuf files) are expected to fail. -- get in touch with @jbenet and @diasdavid about how best to contribute -- have fun! - -There's a few things you can do right now to help out: - - Go through the modules below and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrasture behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically. - - **Perform code reviews**. - - **Add tests**. There can never be enough tests. - -## Modularizing go-libp2p - -We have currently a work in progress of modularizing go-libp2p from a repo monolith to several packages in different repos that can be reused for other projects of swapped for custom libp2p builds. - -We want to maintain history, so we'll use git-subtree for extracting packages. Find instructions below: - -```sh -# 1) create the extracted tree (has the directory specified as -P as its root) -> cd go-libp2p/ -> git subtree split -P p2p/crypto/secio/ -b libp2p-secio -62b0a5c21574bcbe06c422785cd5feff378ae5bd -# important to delete the tree now, so that outdated imports fail in step 5 -> git rm -r p2p/crypto/secio/ -> git commit -> cd ../ - -# 2) make the new repo -> mkdir go-libp2p-secio -> cd go-libp2p-secio/ -> git init && git commit --allow-empty - -# 3) fetch the extracted tree from the previous repo -> git remote add libp2p ../go-libp2p -> git fetch libp2p -> git reset --hard libp2p/libp2p-secio - -# 4) update self import paths -> sed -someflagsidontknow 'go-libp2p/p2p/crypto/secio' 'golibp2p-secio' -> git commit - -# 5) create package.json and check all imports are correct -> vim package.json -> gx --verbose install --global -> gx-go rewrite -> go test ./... -> gx-go rewrite --undo -> git commit - -# 4) make the package ready -> vim README.md LICENSE -> git commit - -# 5) bump the version separately -> vim package.json -> gx publish -> git add package.json .gx/ -> git commit -m 'Publish 1.2.3' - -# 6) clean up and push -> git remote rm libp2p -> git push origin master -``` diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/config.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/config.go deleted file mode 100644 index a8260ad4c1..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/config.go +++ /dev/null @@ -1,180 +0,0 @@ -package config - -import ( - "context" - "fmt" - - bhost "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic" - - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - swarm "gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm" - circuit "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit" - pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - filter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" - metrics "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics" -) - -var log = logging.Logger("p2p-config") - -// AddrsFactory is a function that takes a set of multiaddrs we're listening on and -// returns the set of multiaddrs we should advertise to the network. -type AddrsFactory = bhost.AddrsFactory - -// NATManagerC is a NATManager constructor. -type NATManagerC func(inet.Network) bhost.NATManager - -// Config describes a set of settings for a libp2p node -// -// This is *not* a stable interface. Use the options defined in the root -// package. -type Config struct { - PeerKey crypto.PrivKey - - Transports []TptC - Muxers []MsMuxC - SecurityTransports []MsSecC - Insecure bool - Protector pnet.Protector - - RelayCustom bool - Relay bool - RelayOpts []circuit.RelayOpt - - ListenAddrs []ma.Multiaddr - AddrsFactory bhost.AddrsFactory - Filters *filter.Filters - - ConnManager ifconnmgr.ConnManager - NATManager NATManagerC - Peerstore pstore.Peerstore - Reporter metrics.Reporter - - DisablePing bool -} - -// NewNode constructs a new libp2p Host from the Config. -// -// This function consumes the config. Do not reuse it (really!). -func (cfg *Config) NewNode(ctx context.Context) (host.Host, error) { - // Check this early. Prevents us from even *starting* without verifying this. - if pnet.ForcePrivateNetwork && cfg.Protector == nil { - log.Error("tried to create a libp2p node with no Private" + - " Network Protector but usage of Private Networks" + - " is forced by the enviroment") - // Note: This is *also* checked the upgrader itself so it'll be - // enforced even *if* you don't use the libp2p constructor. - return nil, pnet.ErrNotInPrivateNetwork - } - - if cfg.PeerKey == nil { - return nil, fmt.Errorf("no peer key specified") - } - - // Obtain Peer ID from public key - pid, err := peer.IDFromPublicKey(cfg.PeerKey.GetPublic()) - if err != nil { - return nil, err - } - - if cfg.Peerstore == nil { - return nil, fmt.Errorf("no peerstore specified") - } - - if !cfg.Insecure { - cfg.Peerstore.AddPrivKey(pid, cfg.PeerKey) - cfg.Peerstore.AddPubKey(pid, cfg.PeerKey.GetPublic()) - } - - // TODO: Make the swarm implementation configurable. - swrm := swarm.NewSwarm(ctx, pid, cfg.Peerstore, cfg.Reporter) - if cfg.Filters != nil { - swrm.Filters = cfg.Filters - } - - // TODO: make host implementation configurable. - h, err := bhost.NewHost(ctx, swrm, &bhost.HostOpts{ - ConnManager: cfg.ConnManager, - AddrsFactory: cfg.AddrsFactory, - NATManager: cfg.NATManager, - EnablePing: !cfg.DisablePing, - }) - if err != nil { - swrm.Close() - return nil, err - } - - upgrader := new(tptu.Upgrader) - upgrader.Protector = cfg.Protector - upgrader.Filters = swrm.Filters - if cfg.Insecure { - upgrader.Secure = makeInsecureTransport(pid) - } else { - upgrader.Secure, err = makeSecurityTransport(h, cfg.SecurityTransports) - if err != nil { - h.Close() - return nil, err - } - } - - upgrader.Muxer, err = makeMuxer(h, cfg.Muxers) - if err != nil { - h.Close() - return nil, err - } - - tpts, err := makeTransports(h, upgrader, cfg.Transports) - if err != nil { - h.Close() - return nil, err - } - for _, t := range tpts { - err = swrm.AddTransport(t) - if err != nil { - h.Close() - return nil, err - } - } - - if cfg.Relay { - err := circuit.AddRelayTransport(swrm.Context(), h, upgrader, cfg.RelayOpts...) - if err != nil { - h.Close() - return nil, err - } - } - - // TODO: This method succeeds if listening on one address succeeds. We - // should probably fail if listening on *any* addr fails. - if err := h.Network().Listen(cfg.ListenAddrs...); err != nil { - h.Close() - return nil, err - } - - // TODO: Configure routing (it's a pain to setup). - // TODO: Bootstrapping. - - return h, nil -} - -// Option is a libp2p config option that can be given to the libp2p constructor -// (`libp2p.New`). -type Option func(cfg *Config) error - -// Apply applies the given options to the config, returning the first error -// encountered (if any). -func (cfg *Config) Apply(opts ...Option) error { - for _, opt := range opts { - if err := opt(cfg); err != nil { - return err - } - } - return nil -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/muxer.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/muxer.go deleted file mode 100644 index 1d14df1527..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/muxer.go +++ /dev/null @@ -1,63 +0,0 @@ -package config - -import ( - "fmt" - - msmux "gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream" - mux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" -) - -// MuxC is a stream multiplex transport constructor -type MuxC func(h host.Host) (mux.Transport, error) - -// MsMuxC is a tuple containing a multiplex transport constructor and a protocol -// ID. -type MsMuxC struct { - MuxC - ID string -} - -var muxArgTypes = newArgTypeSet(hostType, networkType, peerIDType, pstoreType) - -// MuxerConstructor creates a multiplex constructor from the passed parameter -// using reflection. -func MuxerConstructor(m interface{}) (MuxC, error) { - // Already constructed? - if t, ok := m.(mux.Transport); ok { - return func(_ host.Host) (mux.Transport, error) { - return t, nil - }, nil - } - - ctor, err := makeConstructor(m, muxType, muxArgTypes) - if err != nil { - return nil, err - } - return func(h host.Host) (mux.Transport, error) { - t, err := ctor(h, nil) - if err != nil { - return nil, err - } - return t.(mux.Transport), nil - }, nil -} - -func makeMuxer(h host.Host, tpts []MsMuxC) (mux.Transport, error) { - muxMuxer := msmux.NewBlankTransport() - transportSet := make(map[string]struct{}, len(tpts)) - for _, tptC := range tpts { - if _, ok := transportSet[tptC.ID]; ok { - return nil, fmt.Errorf("duplicate muxer transport: %s", tptC.ID) - } - transportSet[tptC.ID] = struct{}{} - } - for _, tptC := range tpts { - tpt, err := tptC.MuxC(h) - if err != nil { - return nil, err - } - muxMuxer.AddTransport(tptC.ID, tpt) - } - return muxMuxer, nil -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/security.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/security.go deleted file mode 100644 index 26b4bee057..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/security.go +++ /dev/null @@ -1,77 +0,0 @@ -package config - -import ( - "fmt" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - csms "gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream" - security "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" - insecure "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/insecure" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" -) - -// SecC is a security transport constructor -type SecC func(h host.Host) (security.Transport, error) - -// MsSecC is a tuple containing a security transport constructor and a protocol -// ID. -type MsSecC struct { - SecC - ID string -} - -var securityArgTypes = newArgTypeSet( - hostType, networkType, peerIDType, - privKeyType, pubKeyType, pstoreType, -) - -// SecurityConstructor creates a security constructor from the passed parameter -// using reflection. -func SecurityConstructor(sec interface{}) (SecC, error) { - // Already constructed? - if t, ok := sec.(security.Transport); ok { - return func(_ host.Host) (security.Transport, error) { - return t, nil - }, nil - } - - ctor, err := makeConstructor(sec, securityType, securityArgTypes) - if err != nil { - return nil, err - } - return func(h host.Host) (security.Transport, error) { - t, err := ctor(h, nil) - if err != nil { - return nil, err - } - return t.(security.Transport), nil - }, nil -} - -func makeInsecureTransport(id peer.ID) security.Transport { - secMuxer := new(csms.SSMuxer) - secMuxer.AddTransport(insecure.ID, insecure.New(id)) - return secMuxer -} - -func makeSecurityTransport(h host.Host, tpts []MsSecC) (security.Transport, error) { - secMuxer := new(csms.SSMuxer) - transportSet := make(map[string]struct{}, len(tpts)) - for _, tptC := range tpts { - if _, ok := transportSet[tptC.ID]; ok { - return nil, fmt.Errorf("duplicate security transport: %s", tptC.ID) - } - transportSet[tptC.ID] = struct{}{} - } - for _, tptC := range tpts { - tpt, err := tptC.SecC(h) - if err != nil { - return nil, err - } - if _, ok := tpt.(*insecure.Transport); ok { - return nil, fmt.Errorf("cannot construct libp2p with an insecure transport, set the Insecure config option instead") - } - secMuxer.AddTransport(tptC.ID, tpt) - } - return secMuxer, nil -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/transport.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/transport.go deleted file mode 100644 index 350717b5ca..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config/transport.go +++ /dev/null @@ -1,66 +0,0 @@ -package config - -import ( - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" -) - -// TptC is the type for libp2p transport constructors. You probably won't ever -// implement this function interface directly. Instead, pass your transport -// constructor to TransportConstructor. -type TptC func(h host.Host, u *tptu.Upgrader) (transport.Transport, error) - -var transportArgTypes = argTypes - -// TransportConstructor uses reflection to turn a function that constructs a -// transport into a TptC. -// -// You can pass either a constructed transport (something that implements -// `transport.Transport`) or a function that takes any of: -// -// * The local peer ID. -// * A transport connection upgrader. -// * A private key. -// * A public key. -// * A Host. -// * A Network. -// * A Peerstore. -// * An address filter. -// * A security transport. -// * A stream multiplexer transport. -// * A private network protector. -// -// And returns a type implementing transport.Transport and, optionally, an error -// (as the second argument). -func TransportConstructor(tpt interface{}) (TptC, error) { - // Already constructed? - if t, ok := tpt.(transport.Transport); ok { - return func(_ host.Host, _ *tptu.Upgrader) (transport.Transport, error) { - return t, nil - }, nil - } - ctor, err := makeConstructor(tpt, transportType, transportArgTypes) - if err != nil { - return nil, err - } - return func(h host.Host, u *tptu.Upgrader) (transport.Transport, error) { - t, err := ctor(h, u) - if err != nil { - return nil, err - } - return t.(transport.Transport), nil - }, nil -} - -func makeTransports(h host.Host, u *tptu.Upgrader, tpts []TptC) ([]transport.Transport, error) { - transports := make([]transport.Transport, len(tpts)) - for i, tC := range tpts { - t, err := tC(h, u) - if err != nil { - return nil, err - } - transports[i] = t - } - return transports, nil -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/options.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/options.go deleted file mode 100644 index 41c49ce5fa..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/options.go +++ /dev/null @@ -1,285 +0,0 @@ -package libp2p - -// This file contains all libp2p configuration options (except the defaults, -// those are in defaults.go) - -import ( - "fmt" - "net" - - config "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/config" - bhost "gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/host/basic" - - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - circuit "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit" - pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - filter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" - metrics "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics" -) - -// ListenAddrStrings configures libp2p to listen on the given (unparsed) -// addresses. -func ListenAddrStrings(s ...string) Option { - return func(cfg *Config) error { - for _, addrstr := range s { - a, err := ma.NewMultiaddr(addrstr) - if err != nil { - return err - } - cfg.ListenAddrs = append(cfg.ListenAddrs, a) - } - return nil - } -} - -// ListenAddrs configures libp2p to listen on the given addresses. -func ListenAddrs(addrs ...ma.Multiaddr) Option { - return func(cfg *Config) error { - cfg.ListenAddrs = append(cfg.ListenAddrs, addrs...) - return nil - } -} - -// Security configures libp2p to use the given security transport (or transport -// constructor). -// -// Name is the protocol name. -// -// The transport can be a constructed security.Transport or a function taking -// any subset of this libp2p node's: -// * Public key -// * Private key -// * Peer ID -// * Host -// * Network -// * Peerstore -func Security(name string, tpt interface{}) Option { - stpt, err := config.SecurityConstructor(tpt) - err = traceError(err, 1) - return func(cfg *Config) error { - if err != nil { - return err - } - if cfg.Insecure { - return fmt.Errorf("cannot use security transports with an insecure libp2p configuration") - } - cfg.SecurityTransports = append(cfg.SecurityTransports, config.MsSecC{SecC: stpt, ID: name}) - return nil - } -} - -// NoSecurity is an option that completely disables all transport security. -// It's incompatible with all other transport security protocols. -var NoSecurity Option = func(cfg *Config) error { - if len(cfg.SecurityTransports) > 0 { - return fmt.Errorf("cannot use security transports with an insecure libp2p configuration") - } - cfg.Insecure = true - return nil -} - -// Muxer configures libp2p to use the given stream multiplexer (or stream -// multiplexer constructor). -// -// Name is the protocol name. -// -// The transport can be a constructed mux.Transport or a function taking any -// subset of this libp2p node's: -// * Peer ID -// * Host -// * Network -// * Peerstore -func Muxer(name string, tpt interface{}) Option { - mtpt, err := config.MuxerConstructor(tpt) - err = traceError(err, 1) - return func(cfg *Config) error { - if err != nil { - return err - } - cfg.Muxers = append(cfg.Muxers, config.MsMuxC{MuxC: mtpt, ID: name}) - return nil - } -} - -// Transport configures libp2p to use the given transport (or transport -// constructor). -// -// The transport can be a constructed transport.Transport or a function taking -// any subset of this libp2p node's: -// * Transport Upgrader (*tptu.Upgrader) -// * Host -// * Stream muxer (muxer.Transport) -// * Security transport (security.Transport) -// * Private network protector (pnet.Protector) -// * Peer ID -// * Private Key -// * Public Key -// * Address filter (filter.Filter) -// * Peerstore -func Transport(tpt interface{}) Option { - tptc, err := config.TransportConstructor(tpt) - err = traceError(err, 1) - return func(cfg *Config) error { - if err != nil { - return err - } - cfg.Transports = append(cfg.Transports, tptc) - return nil - } -} - -// Peerstore configures libp2p to use the given peerstore. -func Peerstore(ps pstore.Peerstore) Option { - return func(cfg *Config) error { - if cfg.Peerstore != nil { - return fmt.Errorf("cannot specify multiple peerstore options") - } - - cfg.Peerstore = ps - return nil - } -} - -// PrivateNetwork configures libp2p to use the given private network protector. -func PrivateNetwork(prot pnet.Protector) Option { - return func(cfg *Config) error { - if cfg.Protector != nil { - return fmt.Errorf("cannot specify multiple private network options") - } - - cfg.Protector = prot - return nil - } -} - -// BandwidthReporter configures libp2p to use the given bandwidth reporter. -func BandwidthReporter(rep metrics.Reporter) Option { - return func(cfg *Config) error { - if cfg.Reporter != nil { - return fmt.Errorf("cannot specify multiple bandwidth reporter options") - } - - cfg.Reporter = rep - return nil - } -} - -// Identity configures libp2p to use the given private key to identify itself. -func Identity(sk crypto.PrivKey) Option { - return func(cfg *Config) error { - if cfg.PeerKey != nil { - return fmt.Errorf("cannot specify multiple identities") - } - - cfg.PeerKey = sk - return nil - } -} - -// ConnectionManager configures libp2p to use the given connection manager. -func ConnectionManager(connman ifconnmgr.ConnManager) Option { - return func(cfg *Config) error { - if cfg.ConnManager != nil { - return fmt.Errorf("cannot specify multiple connection managers") - } - cfg.ConnManager = connman - return nil - } -} - -// AddrsFactory configures libp2p to use the given address factory. -func AddrsFactory(factory config.AddrsFactory) Option { - return func(cfg *Config) error { - if cfg.AddrsFactory != nil { - return fmt.Errorf("cannot specify multiple address factories") - } - cfg.AddrsFactory = factory - return nil - } -} - -// EnableRelay configures libp2p to enable the relay transport with configuration options. -func EnableRelay(options ...circuit.RelayOpt) Option { - return func(cfg *Config) error { - cfg.RelayCustom = true - cfg.Relay = true - cfg.RelayOpts = options - return nil - } -} - -// DisableRelay configures libp2p to disable the relay transport -func DisableRelay() Option { - return func(cfg *Config) error { - cfg.RelayCustom = true - cfg.Relay = false - return nil - } -} - -// FilterAddresses configures libp2p to never dial nor accept connections from -// the given addresses. -func FilterAddresses(addrs ...*net.IPNet) Option { - return func(cfg *Config) error { - if cfg.Filters == nil { - cfg.Filters = filter.NewFilters() - } - for _, addr := range addrs { - cfg.Filters.AddDialFilter(addr) - } - return nil - } -} - -// NATPortMap configures libp2p to use the default NATManager. The default -// NATManager will attempt to open a port in your network's firewall using UPnP. -func NATPortMap() Option { - return NATManager(bhost.NewNATManager) -} - -// NATManager will configure libp2p to use the requested NATManager. This -// function should be passed a NATManager *constructor* that takes a libp2p Network. -func NATManager(nm config.NATManagerC) Option { - return func(cfg *Config) error { - if cfg.NATManager != nil { - return fmt.Errorf("cannot specify multiple NATManagers") - } - cfg.NATManager = nm - return nil - } -} - -// Ping will configure libp2p to support the ping service; enable by default. -func Ping(enable bool) Option { - return func(cfg *Config) error { - cfg.DisablePing = !enable - return nil - } -} - -// NoListenAddrs will configure libp2p to not listen by default. -// -// This will both clear any configured listen addrs and prevent libp2p from -// applying the default listen address option. It also disables relay, unless the -// user explicitly specifies with an option, as the transport creates an implicit -// listen address that would make the node dialable through any relay it was connected to. -var NoListenAddrs = func(cfg *Config) error { - cfg.ListenAddrs = []ma.Multiaddr{} - if !cfg.RelayCustom { - cfg.RelayCustom = true - cfg.Relay = false - } - return nil -} - -// NoTransports will configure libp2p to not enable any transports. -// -// This will both clear any configured transports (specified in prior libp2p -// options) and prevent libp2p from applying the default transports. -var NoTransports = func(cfg *Config) error { - cfg.Transports = []config.TptC{} - return nil -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/interface.go b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/interface.go deleted file mode 100644 index 6b4c39822e..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/net/mock/interface.go +++ /dev/null @@ -1,105 +0,0 @@ -// Package mocknet provides a mock net.Network to test with. -// -// - a Mocknet has many inet.Networks -// - a Mocknet has many Links -// - a Link joins two inet.Networks -// - inet.Conns and inet.Streams are created by inet.Networks -package mocknet - -import ( - "io" - "time" - - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -type Mocknet interface { - - // GenPeer generates a peer and its inet.Network in the Mocknet - GenPeer() (host.Host, error) - - // AddPeer adds an existing peer. we need both a privkey and addr. - // ID is derived from PrivKey - AddPeer(ic.PrivKey, ma.Multiaddr) (host.Host, error) - AddPeerWithPeerstore(peer.ID, pstore.Peerstore) (host.Host, error) - - // retrieve things (with randomized iteration order) - Peers() []peer.ID - Net(peer.ID) inet.Network - Nets() []inet.Network - Host(peer.ID) host.Host - Hosts() []host.Host - Links() LinkMap - LinksBetweenPeers(a, b peer.ID) []Link - LinksBetweenNets(a, b inet.Network) []Link - - // Links are the **ability to connect**. - // think of Links as the physical medium. - // For p1 and p2 to connect, a link must exist between them. - // (this makes it possible to test dial failures, and - // things like relaying traffic) - LinkPeers(peer.ID, peer.ID) (Link, error) - LinkNets(inet.Network, inet.Network) (Link, error) - Unlink(Link) error - UnlinkPeers(peer.ID, peer.ID) error - UnlinkNets(inet.Network, inet.Network) error - - // LinkDefaults are the default options that govern links - // if they do not have thier own option set. - SetLinkDefaults(LinkOptions) - LinkDefaults() LinkOptions - - // Connections are the usual. Connecting means Dialing. - // **to succeed, peers must be linked beforehand** - ConnectPeers(peer.ID, peer.ID) (inet.Conn, error) - ConnectNets(inet.Network, inet.Network) (inet.Conn, error) - DisconnectPeers(peer.ID, peer.ID) error - DisconnectNets(inet.Network, inet.Network) error - LinkAll() error - ConnectAllButSelf() error -} - -// LinkOptions are used to change aspects of the links. -// Sorry but they dont work yet :( -type LinkOptions struct { - Latency time.Duration - Bandwidth float64 // in bytes-per-second - // we can make these values distributions down the road. -} - -// Link represents the **possibility** of a connection between -// two peers. Think of it like physical network links. Without -// them, the peers can try and try but they won't be able to -// connect. This allows constructing topologies where specific -// nodes cannot talk to each other directly. :) -type Link interface { - Networks() []inet.Network - Peers() []peer.ID - - SetOptions(LinkOptions) - Options() LinkOptions - - // Metrics() Metrics -} - -// LinkMap is a 3D map to give us an easy way to track links. -// (wow, much map. so data structure. how compose. ahhh pointer) -type LinkMap map[string]map[string]map[Link]struct{} - -// Printer lets you inspect things :) -type Printer interface { - // MocknetLinks shows the entire Mocknet's link table :) - MocknetLinks(mn Mocknet) - NetworkConns(ni inet.Network) -} - -// PrinterTo returns a Printer ready to write to w. -func PrinterTo(w io.Writer) Printer { - return &printer{w} -} diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package.json b/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package.json deleted file mode 100644 index e27a8272ad..0000000000 --- a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/package.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmekaTKpWkYGcn4ZEC5PwJDRCQHapwugmmG86g2Xpz5GBH", - "name": "mdns", - "version": "0.2.0" - }, - { - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - }, - { - "hash": "Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF", - "name": "go-detect-race", - "version": "1.0.1" - }, - { - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", - "name": "go-libp2p-loggables", - "version": "1.1.24" - }, - { - "author": "whyrusleeping", - "hash": "QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc", - "name": "go-libp2p-secio", - "version": "2.0.17" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB", - "name": "go-tcp-transport", - "version": "2.0.16" - }, - { - "author": "whyrusleeping", - "hash": "QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB", - "name": "go-maddr-filter", - "version": "1.1.10" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx", - "name": "go-libp2p-metrics", - "version": "2.1.7" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - }, - { - "author": "whyrusleeping", - "hash": "QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg", - "name": "go-libp2p-nat", - "version": "0.8.8" - }, - { - "author": "whyrusleeping", - "hash": "QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j", - "name": "go-libp2p-netutil", - "version": "0.4.12" - }, - { - "author": "whyrusleeping", - "hash": "Qmcwep23T9AwwbuQRRhVyjk9PBRbMFCyGKCKGZfTPteiFU", - "name": "go-libp2p-blankhost", - "version": "0.3.15" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC", - "name": "go-smux-yamux", - "version": "2.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK", - "name": "go-smux-multistream", - "version": "2.0.2" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "vyzo", - "hash": "QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA", - "name": "go-libp2p-circuit", - "version": "2.3.2" - }, - { - "author": "lgierth", - "hash": "QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9", - "name": "go-multiaddr-dns", - "version": "0.2.5" - }, - { - "author": "why", - "hash": "QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ", - "name": "go-libp2p-interface-connmgr", - "version": "0.0.21" - }, - { - "author": "whyrusleeping", - "hash": "QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc", - "name": "go-smux-multiplex", - "version": "3.0.16" - }, - { - "author": "whyrusleeping", - "hash": "QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9", - "name": "go-ws-transport", - "version": "2.0.15" - }, - { - "author": "stebalien", - "hash": "QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM", - "name": "go-conn-security-multistream", - "version": "0.1.15" - }, - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "libp2p", - "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", - "name": "go-libp2p-interface-pnet", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - }, - { - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "6.0.23" -} - diff --git a/vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/LICENSE b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path/LICENSE rename to vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/LICENSE diff --git a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/README.md b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/README.md similarity index 100% rename from vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/README.md rename to vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/README.md diff --git a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/blockservice.go b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/blockservice.go similarity index 93% rename from vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/blockservice.go rename to vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/blockservice.go index 2ba315d77f..705dd68dca 100644 --- a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/blockservice.go +++ b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/blockservice.go @@ -6,16 +6,15 @@ package blockservice import ( "context" "errors" - "fmt" "io" "sync" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + exchange "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + "gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid" ) var log = logging.Logger("blockservice") @@ -150,8 +149,7 @@ func (s *blockService) AddBlock(o blocks.Block) error { log.Event(context.TODO(), "BlockService.BlockAdded", c) if err := s.exchange.HasBlock(o); err != nil { - // TODO(#4623): really an error? - return errors.New("blockservice is closed") + log.Errorf("HasBlock: %s", err.Error()) } return nil @@ -189,8 +187,7 @@ func (s *blockService) AddBlocks(bs []blocks.Block) error { for _, o := range toput { log.Event(context.TODO(), "BlockService.BlockAdded", o.Cid()) if err := s.exchange.HasBlock(o); err != nil { - // TODO(#4623): Should this really *return*? - return fmt.Errorf("blockservice is closed (%s)", err) + log.Errorf("HasBlock: %s", err.Error()) } } return nil diff --git a/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/package.json b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/package.json new file mode 100644 index 0000000000..9992b78329 --- /dev/null +++ b/vendor/gx/ipfs/QmUEXNytX2q9g9xtdfHRVYfsvjw5V9FQ32vE9ZRYFAxFoy/go-blockservice/package.json @@ -0,0 +1,54 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-blockservice" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-blockservice" + }, + "gxDependencies": [ + { + "author": "why", + "hash": "QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G", + "name": "go-bitswap", + "version": "1.1.29" + }, + { + "author": "hsanjuan", + "hash": "Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS", + "name": "go-ipfs-exchange-offline", + "version": "0.1.7" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "hsanjuan", + "hash": "QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA", + "name": "go-ipfs-blockstore", + "version": "0.1.8" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "why", + "hash": "QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa", + "name": "go-verifcid", + "version": "0.1.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-blockservice", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.29" +} + diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/LICENSE b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/LICENSE rename to vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/LICENSE diff --git a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/Makefile b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/Makefile similarity index 100% rename from vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/Makefile rename to vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/Makefile diff --git a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/README.md b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/README.md similarity index 100% rename from vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/README.md rename to vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/README.md diff --git a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/multistream.go b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/multistream.go similarity index 96% rename from vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/multistream.go rename to vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/multistream.go index b3f66040f9..fb5accc953 100644 --- a/vendor/gx/ipfs/QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK/go-smux-multistream/multistream.go +++ b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/multistream.go @@ -7,7 +7,7 @@ import ( "net" "time" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" mss "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" ) diff --git a/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/package.json b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/package.json new file mode 100644 index 0000000000..0a2d532d6d --- /dev/null +++ b/vendor/gx/ipfs/QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks/go-smux-multistream/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/whyrusleeping/go-smux-multistream" + }, + "gx": { + "dvcsimport": "github.com/whyrusleeping/go-smux-multistream" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "", + "name": "go-smux-multistream", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.3" +} + diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/.travis.yml b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/.travis.yml new file mode 100644 index 0000000000..1a3fd48a75 --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/LICENSE b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/LICENSE rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/LICENSE diff --git a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/Makefile b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/Makefile similarity index 100% rename from vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/Makefile rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/Makefile diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/README.md b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/README.md similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/README.md rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/README.md diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch/README.md b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch/README.md similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch/README.md rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch/README.md diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch/autobatch.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch/autobatch.go similarity index 92% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch/autobatch.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch/autobatch.go index 4426c39dd0..87ce4ec05b 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/autobatch/autobatch.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch/autobatch.go @@ -4,8 +4,8 @@ package autobatch import ( - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" ) // Datastore implements a go-datatsore. @@ -112,3 +112,7 @@ func (d *Datastore) Query(q dsq.Query) (dsq.Results, error) { func (d *Datastore) DiskUsage() (uint64, error) { return ds.DiskUsage(d.child) } + +func (d *Datastore) Close() error { + return d.child.Close() +} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/basic_ds.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/basic_ds.go similarity index 97% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/basic_ds.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/basic_ds.go index f3664761fb..d759b99e3f 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/basic_ds.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/basic_ds.go @@ -1,10 +1,9 @@ package datastore import ( - "io" "log" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" ) // Here are some basic datastore implementations. @@ -244,10 +243,7 @@ func (d *LogBatch) Commit() (err error) { func (d *LogDatastore) Close() error { log.Printf("%s: Close\n", d.Name) - if cds, ok := d.child.(io.Closer); ok { - return cds.Close() - } - return nil + return d.child.Close() } func (d *LogDatastore) Check() error { diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/batch.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/batch.go new file mode 100644 index 0000000000..2917b2785b --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/batch.go @@ -0,0 +1,54 @@ +package datastore + +type verb int + +type op struct { + delete bool + value []byte +} + +// basicBatch implements the transaction interface for datastores who do +// not have any sort of underlying transactional support +type basicBatch struct { + ops map[Key]op + + target Datastore +} + +func NewBasicBatch(ds Datastore) Batch { + return &basicBatch{ + ops: make(map[Key]op), + target: ds, + } +} + +func (bt *basicBatch) Put(key Key, val []byte) error { + bt.ops[key] = op{value: val} + return nil +} + +func (bt *basicBatch) Delete(key Key) error { + bt.ops[key] = op{delete: true} + return nil +} + +func (bt *basicBatch) Commit() error { + var err error + for k, op := range bt.ops { + if op.delete { + err = bt.target.Delete(k) + // We could try to do something smarter but I really + // don't care. Delete should be idempotent anyways. + if err == ErrNotFound { + err = nil + } + } else { + err = bt.target.Put(k, op.value) + } + if err != nil { + break + } + } + + return err +} diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/datastore.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/datastore.go new file mode 100644 index 0000000000..8a0d40659a --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/datastore.go @@ -0,0 +1,247 @@ +package datastore + +import ( + "errors" + "io" + "time" + + query "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" +) + +/* +Datastore represents storage for any key-value pair. + +Datastores are general enough to be backed by all kinds of different storage: +in-memory caches, databases, a remote datastore, flat files on disk, etc. + +The general idea is to wrap a more complicated storage facility in a simple, +uniform interface, keeping the freedom of using the right tools for the job. +In particular, a Datastore can aggregate other datastores in interesting ways, +like sharded (to distribute load) or tiered access (caches before databases). + +While Datastores should be written general enough to accept all sorts of +values, some implementations will undoubtedly have to be specific (e.g. SQL +databases where fields should be decomposed into columns), particularly to +support queries efficiently. Moreover, certain datastores may enforce certain +types of values (e.g. requiring an io.Reader, a specific struct, etc) or +serialization formats (JSON, Protobufs, etc). + +IMPORTANT: No Datastore should ever Panic! This is a cross-module interface, +and thus it should behave predictably and handle exceptional conditions with +proper error reporting. Thus, all Datastore calls may return errors, which +should be checked by callers. +*/ +type Datastore interface { + Read + Write + io.Closer +} + +// Write is the write-side of the Datastore interface. +type Write interface { + // Put stores the object `value` named by `key`. + // + // The generalized Datastore interface does not impose a value type, + // allowing various datastore middleware implementations (which do not + // handle the values directly) to be composed together. + // + // Ultimately, the lowest-level datastore will need to do some value checking + // or risk getting incorrect values. It may also be useful to expose a more + // type-safe interface to your application, and do the checking up-front. + Put(key Key, value []byte) error + + // Delete removes the value for given `key`. + Delete(key Key) error +} + +// Read is the read-side of the Datastore interface. +type Read interface { + // Get retrieves the object `value` named by `key`. + // Get will return ErrNotFound if the key is not mapped to a value. + Get(key Key) (value []byte, err error) + + // Has returns whether the `key` is mapped to a `value`. + // In some contexts, it may be much cheaper only to check for existence of + // a value, rather than retrieving the value itself. (e.g. HTTP HEAD). + // The default implementation is found in `GetBackedHas`. + Has(key Key) (exists bool, err error) + + // GetSize returns the size of the `value` named by `key`. + // In some contexts, it may be much cheaper to only get the size of the + // value rather than retrieving the value itself. + GetSize(key Key) (size int, err error) + + // Query searches the datastore and returns a query result. This function + // may return before the query actually runs. To wait for the query: + // + // result, _ := ds.Query(q) + // + // // use the channel interface; result may come in at different times + // for entry := range result.Next() { ... } + // + // // or wait for the query to be completely done + // entries, _ := result.Rest() + // for entry := range entries { ... } + // + Query(q query.Query) (query.Results, error) +} + +// Batching datastores support deferred, grouped updates to the database. +// `Batch`es do NOT have transactional semantics: updates to the underlying +// datastore are not guaranteed to occur in the same iota of time. Similarly, +// batched updates will not be flushed to the underlying datastore until +// `Commit` has been called. `Txn`s from a `TxnDatastore` have all the +// capabilities of a `Batch`, but the reverse is NOT true. +type Batching interface { + Datastore + + Batch() (Batch, error) +} + +// ErrBatchUnsupported is returned if the by Batch if the Datastore doesn't +// actually support batching. +var ErrBatchUnsupported = errors.New("this datastore does not support batching") + +// ThreadSafeDatastore is an interface that all threadsafe datastore should +// implement to leverage type safety checks. +type ThreadSafeDatastore interface { + Datastore + + IsThreadSafe() +} + +// CheckedDatastore is an interface that should be implemented by datastores +// which may need checking on-disk data integrity. +type CheckedDatastore interface { + Datastore + + Check() error +} + +// CheckedDatastore is an interface that should be implemented by datastores +// which want to provide a mechanism to check data integrity and/or +// error correction. +type ScrubbedDatastore interface { + Datastore + + Scrub() error +} + +// GCDatastore is an interface that should be implemented by datastores which +// don't free disk space by just removing data from them. +type GCDatastore interface { + Datastore + + CollectGarbage() error +} + +// PersistentDatastore is an interface that should be implemented by datastores +// which can report disk usage. +type PersistentDatastore interface { + Datastore + + // DiskUsage returns the space used by a datastore, in bytes. + DiskUsage() (uint64, error) +} + +// DiskUsage checks if a Datastore is a +// PersistentDatastore and returns its DiskUsage(), +// otherwise returns 0. +func DiskUsage(d Datastore) (uint64, error) { + persDs, ok := d.(PersistentDatastore) + if !ok { + return 0, nil + } + return persDs.DiskUsage() +} + +// TTLDatastore is an interface that should be implemented by datastores that +// support expiring entries. +type TTLDatastore interface { + Datastore + TTL +} + +// TTL encapulates the methods that deal with entries with time-to-live. +type TTL interface { + PutWithTTL(key Key, value []byte, ttl time.Duration) error + SetTTL(key Key, ttl time.Duration) error + GetExpiration(key Key) (time.Time, error) +} + +// Txn extends the Datastore type. Txns allow users to batch queries and +// mutations to the Datastore into atomic groups, or transactions. Actions +// performed on a transaction will not take hold until a successful call to +// Commit has been made. Likewise, transactions can be aborted by calling +// Discard before a successful Commit has been made. +type Txn interface { + Read + Write + + // Commit finalizes a transaction, attempting to commit it to the Datastore. + // May return an error if the transaction has gone stale. The presence of an + // error is an indication that the data was not committed to the Datastore. + Commit() error + // Discard throws away changes recorded in a transaction without committing + // them to the underlying Datastore. Any calls made to Discard after Commit + // has been successfully called will have no effect on the transaction and + // state of the Datastore, making it safe to defer. + Discard() +} + +// TxnDatastore is an interface that should be implemented by datastores that +// support transactions. +type TxnDatastore interface { + Datastore + + NewTransaction(readOnly bool) (Txn, error) +} + +// Errors + +// ErrNotFound is returned by Get, Has, and Delete when a datastore does not +// map the given key to a value. +var ErrNotFound = errors.New("datastore: key not found") + +// ErrInvalidType is returned by Put when a given value is incopatible with +// the type the datastore supports. This means a conversion (or serialization) +// is needed beforehand. +var ErrInvalidType = errors.New("datastore: invalid type error") + +// GetBackedHas provides a default Datastore.Has implementation. +// It exists so Datastore.Has implementations can use it, like so: +// +// func (*d SomeDatastore) Has(key Key) (exists bool, err error) { +// return GetBackedHas(d, key) +// } +func GetBackedHas(ds Read, key Key) (bool, error) { + _, err := ds.Get(key) + switch err { + case nil: + return true, nil + case ErrNotFound: + return false, nil + default: + return false, err + } +} + +// GetBackedSize provides a default Datastore.GetSize implementation. +// It exists so Datastore.GetSize implementations can use it, like so: +// +// func (*d SomeDatastore) GetSize(key Key) (size int, err error) { +// return GetBackedSize(d, key) +// } +func GetBackedSize(ds Read, key Key) (int, error) { + value, err := ds.Get(key) + if err == nil { + return len(value), nil + } + return -1, err +} + +type Batch interface { + Write + + Commit() error +} diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/delayed/delayed.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/delayed/delayed.go new file mode 100644 index 0000000000..68841f5498 --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/delayed/delayed.go @@ -0,0 +1,80 @@ +// Package delayed wraps a datastore allowing to artificially +// delay all operations. +package delayed + +import ( + "io" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + delay "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" +) + +// New returns a new delayed datastore. +func New(ds ds.Datastore, delay delay.D) *Delayed { + return &Delayed{ds: ds, delay: delay} +} + +// Delayed is an adapter that delays operations on the inner datastore. +type Delayed struct { + ds ds.Datastore + delay delay.D +} + +var _ ds.Batching = (*Delayed)(nil) +var _ io.Closer = (*Delayed)(nil) + +// Put implements the ds.Datastore interface. +func (dds *Delayed) Put(key ds.Key, value []byte) (err error) { + dds.delay.Wait() + return dds.ds.Put(key, value) +} + +// Get implements the ds.Datastore interface. +func (dds *Delayed) Get(key ds.Key) (value []byte, err error) { + dds.delay.Wait() + return dds.ds.Get(key) +} + +// Has implements the ds.Datastore interface. +func (dds *Delayed) Has(key ds.Key) (exists bool, err error) { + dds.delay.Wait() + return dds.ds.Has(key) +} + +// GetSize implements the ds.Datastore interface. +func (dds *Delayed) GetSize(key ds.Key) (size int, err error) { + dds.delay.Wait() + return dds.ds.GetSize(key) +} + +// Delete implements the ds.Datastore interface. +func (dds *Delayed) Delete(key ds.Key) (err error) { + dds.delay.Wait() + return dds.ds.Delete(key) +} + +// Query implements the ds.Datastore interface. +func (dds *Delayed) Query(q dsq.Query) (dsq.Results, error) { + dds.delay.Wait() + return dds.ds.Query(q) +} + +// Batch implements the ds.Batching interface. +func (dds *Delayed) Batch() (ds.Batch, error) { + return ds.NewBasicBatch(dds), nil +} + +// DiskUsage implements the ds.PersistentDatastore interface. +func (dds *Delayed) DiskUsage() (uint64, error) { + dds.delay.Wait() + return ds.DiskUsage(dds.ds) +} + +// Close closes the inner datastore (if it implements the io.Closer interface). +func (dds *Delayed) Close() error { + if closer, ok := dds.ds.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/key.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/key.go new file mode 100644 index 0000000000..0646b03adf --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/key.go @@ -0,0 +1,302 @@ +package datastore + +import ( + "encoding/json" + "path" + "strings" + + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + + "gx/ipfs/QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W/uuid" +) + +/* +A Key represents the unique identifier of an object. +Our Key scheme is inspired by file systems and Google App Engine key model. + +Keys are meant to be unique across a system. Keys are hierarchical, +incorporating more and more specific namespaces. Thus keys can be deemed +'children' or 'ancestors' of other keys:: + + Key("/Comedy") + Key("/Comedy/MontyPython") + +Also, every namespace can be parametrized to embed relevant object +information. For example, the Key `name` (most specific namespace) could +include the object type:: + + Key("/Comedy/MontyPython/Actor:JohnCleese") + Key("/Comedy/MontyPython/Sketch:CheeseShop") + Key("/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender") + +*/ +type Key struct { + string +} + +// NewKey constructs a key from string. it will clean the value. +func NewKey(s string) Key { + k := Key{s} + k.Clean() + return k +} + +// RawKey creates a new Key without safety checking the input. Use with care. +func RawKey(s string) Key { + // accept an empty string and fix it to avoid special cases + // elsewhere + if len(s) == 0 { + return Key{"/"} + } + + // perform a quick sanity check that the key is in the correct + // format, if it is not then it is a programmer error and it is + // okay to panic + if len(s) == 0 || s[0] != '/' || (len(s) > 1 && s[len(s)-1] == '/') { + panic("invalid datastore key: " + s) + } + + return Key{s} +} + +// KeyWithNamespaces constructs a key out of a namespace slice. +func KeyWithNamespaces(ns []string) Key { + return NewKey(strings.Join(ns, "/")) +} + +// Clean up a Key, using path.Clean. +func (k *Key) Clean() { + switch { + case len(k.string) == 0: + k.string = "/" + case k.string[0] == '/': + k.string = path.Clean(k.string) + default: + k.string = path.Clean("/" + k.string) + } +} + +// Strings is the string value of Key +func (k Key) String() string { + return k.string +} + +// Bytes returns the string value of Key as a []byte +func (k Key) Bytes() []byte { + return []byte(k.string) +} + +// Equal checks equality of two keys +func (k Key) Equal(k2 Key) bool { + return k.string == k2.string +} + +// Less checks whether this key is sorted lower than another. +func (k Key) Less(k2 Key) bool { + list1 := k.List() + list2 := k2.List() + for i, c1 := range list1 { + if len(list2) < (i + 1) { + return false + } + + c2 := list2[i] + if c1 < c2 { + return true + } else if c1 > c2 { + return false + } + // c1 == c2, continue + } + + // list1 is shorter or exactly the same. + return len(list1) < len(list2) +} + +// List returns the `list` representation of this Key. +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").List() +// ["Comedy", "MontyPythong", "Actor:JohnCleese"] +func (k Key) List() []string { + return strings.Split(k.string, "/")[1:] +} + +// Reverse returns the reverse of this Key. +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Reverse() +// NewKey("/Actor:JohnCleese/MontyPython/Comedy") +func (k Key) Reverse() Key { + l := k.List() + r := make([]string, len(l), len(l)) + for i, e := range l { + r[len(l)-i-1] = e + } + return KeyWithNamespaces(r) +} + +// Namespaces returns the `namespaces` making up this Key. +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Namespaces() +// ["Comedy", "MontyPython", "Actor:JohnCleese"] +func (k Key) Namespaces() []string { + return k.List() +} + +// BaseNamespace returns the "base" namespace of this key (path.Base(filename)) +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").BaseNamespace() +// "Actor:JohnCleese" +func (k Key) BaseNamespace() string { + n := k.Namespaces() + return n[len(n)-1] +} + +// Type returns the "type" of this key (value of last namespace). +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Type() +// "Actor" +func (k Key) Type() string { + return NamespaceType(k.BaseNamespace()) +} + +// Name returns the "name" of this key (field of last namespace). +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Name() +// "JohnCleese" +func (k Key) Name() string { + return NamespaceValue(k.BaseNamespace()) +} + +// Instance returns an "instance" of this type key (appends value to namespace). +// NewKey("/Comedy/MontyPython/Actor").Instance("JohnClesse") +// NewKey("/Comedy/MontyPython/Actor:JohnCleese") +func (k Key) Instance(s string) Key { + return NewKey(k.string + ":" + s) +} + +// Path returns the "path" of this key (parent + type). +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Path() +// NewKey("/Comedy/MontyPython/Actor") +func (k Key) Path() Key { + s := k.Parent().string + "/" + NamespaceType(k.BaseNamespace()) + return NewKey(s) +} + +// Parent returns the `parent` Key of this Key. +// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Parent() +// NewKey("/Comedy/MontyPython") +func (k Key) Parent() Key { + n := k.List() + if len(n) == 1 { + return RawKey("/") + } + return NewKey(strings.Join(n[:len(n)-1], "/")) +} + +// Child returns the `child` Key of this Key. +// NewKey("/Comedy/MontyPython").Child(NewKey("Actor:JohnCleese")) +// NewKey("/Comedy/MontyPython/Actor:JohnCleese") +func (k Key) Child(k2 Key) Key { + switch { + case k.string == "/": + return k2 + case k2.string == "/": + return k + default: + return RawKey(k.string + k2.string) + } +} + +// ChildString returns the `child` Key of this Key -- string helper. +// NewKey("/Comedy/MontyPython").ChildString("Actor:JohnCleese") +// NewKey("/Comedy/MontyPython/Actor:JohnCleese") +func (k Key) ChildString(s string) Key { + return NewKey(k.string + "/" + s) +} + +// IsAncestorOf returns whether this key is a prefix of `other` +// NewKey("/Comedy").IsAncestorOf("/Comedy/MontyPython") +// true +func (k Key) IsAncestorOf(other Key) bool { + if other.string == k.string { + return false + } + return strings.HasPrefix(other.string, k.string) +} + +// IsDescendantOf returns whether this key contains another as a prefix. +// NewKey("/Comedy/MontyPython").IsDescendantOf("/Comedy") +// true +func (k Key) IsDescendantOf(other Key) bool { + if other.string == k.string { + return false + } + return strings.HasPrefix(k.string, other.string) +} + +// IsTopLevel returns whether this key has only one namespace. +func (k Key) IsTopLevel() bool { + return len(k.List()) == 1 +} + +// MarshalJSON implements the json.Marshaler interface, +// keys are represented as JSON strings +func (k Key) MarshalJSON() ([]byte, error) { + return json.Marshal(k.String()) +} + +// MarshalJSON implements the json.Unmarshaler interface, +// keys will parse any value specified as a key to a string +func (k *Key) UnmarshalJSON(data []byte) error { + var key string + if err := json.Unmarshal(data, &key); err != nil { + return err + } + *k = NewKey(key) + return nil +} + +// RandomKey returns a randomly (uuid) generated key. +// RandomKey() +// NewKey("/f98719ea086343f7b71f32ea9d9d521d") +func RandomKey() Key { + return NewKey(strings.Replace(uuid.New().String(), "-", "", -1)) +} + +/* +A Key Namespace is like a path element. +A namespace can optionally include a type (delimited by ':') + + > NamespaceValue("Song:PhilosopherSong") + PhilosopherSong + > NamespaceType("Song:PhilosopherSong") + Song + > NamespaceType("Music:Song:PhilosopherSong") + Music:Song +*/ + +// NamespaceType is the first component of a namespace. `foo` in `foo:bar` +func NamespaceType(namespace string) string { + parts := strings.Split(namespace, ":") + if len(parts) < 2 { + return "" + } + return strings.Join(parts[0:len(parts)-1], ":") +} + +// NamespaceValue returns the last component of a namespace. `baz` in `f:b:baz` +func NamespaceValue(namespace string) string { + parts := strings.Split(namespace, ":") + return parts[len(parts)-1] +} + +// KeySlice attaches the methods of sort.Interface to []Key, +// sorting in increasing order. +type KeySlice []Key + +func (p KeySlice) Len() int { return len(p) } +func (p KeySlice) Less(i, j int) bool { return p[i].Less(p[j]) } +func (p KeySlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// EntryKeys +func EntryKeys(e []dsq.Entry) []Key { + ks := make([]Key, len(e)) + for i, e := range e { + ks[i] = NewKey(e.Key) + } + return ks +} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/doc.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/doc.go similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/doc.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/doc.go diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/interface.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/interface.go new file mode 100644 index 0000000000..943326a160 --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/interface.go @@ -0,0 +1,34 @@ +package keytransform + +import ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + +// KeyMapping is a function that maps one key to annother +type KeyMapping func(ds.Key) ds.Key + +// KeyTransform is an object with a pair of functions for (invertibly) +// transforming keys +type KeyTransform interface { + ConvertKey(ds.Key) ds.Key + InvertKey(ds.Key) ds.Key +} + +// Datastore is a keytransform.Datastore +type Datastore interface { + ds.Shim + KeyTransform +} + +// Wrap wraps a given datastore with a KeyTransform function. +// The resulting wrapped datastore will use the transform on all Datastore +// operations. +func Wrap(child ds.Datastore, t KeyTransform) *ktds { + if t == nil { + panic("t (KeyTransform) is nil") + } + + if child == nil { + panic("child (ds.Datastore) is nil") + } + + return &ktds{child: child, KeyTransform: t} +} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/keytransform.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/keytransform.go similarity index 93% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/keytransform.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/keytransform.go index 1e5d928935..486915b878 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/keytransform.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform/keytransform.go @@ -1,10 +1,8 @@ package keytransform import ( - "io" - - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" ) type Pair struct { @@ -84,10 +82,7 @@ func (d *ktds) Query(q dsq.Query) (dsq.Results, error) { } func (d *ktds) Close() error { - if c, ok := d.child.(io.Closer); ok { - return c.Close() - } - return nil + return d.child.Close() } // DiskUsage implements the PersistentDatastore interface. diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/mount/mount.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/mount/mount.go similarity index 96% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/mount/mount.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/mount/mount.go index e79df3491d..4643dc53d3 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/mount/mount.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/mount/mount.go @@ -5,13 +5,12 @@ package mount import ( "errors" "fmt" - "io" "sort" "strings" "sync" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" ) var ( @@ -195,11 +194,9 @@ func (d *Datastore) IsThreadSafe() {} func (d *Datastore) Close() error { for _, d := range d.mounts { - if c, ok := d.Datastore.(io.Closer); ok { - err := c.Close() - if err != nil { - return err - } + err := d.Datastore.Close() + if err != nil { + return err } } return nil diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace/doc.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace/doc.go similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace/doc.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace/doc.go diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace/namespace.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace/namespace.go similarity index 92% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace/namespace.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace/namespace.go index 2f985bc11c..af81f7b42c 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace/namespace.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace/namespace.go @@ -1,9 +1,9 @@ package namespace import ( - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - ktds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + ktds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/keytransform" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" ) // PrefixTransform constructs a KeyTransform with a pair of functions that diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/package.json b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/package.json new file mode 100644 index 0000000000..d1d52e6acc --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/package.json @@ -0,0 +1,42 @@ +{ + "author": "jbenet", + "bugs": { + "url": "https://github.com/jbenet/go-datastore" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-datastore" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "gustavo", + "hash": "QmYBJ8BXPDTMnzLFdv4rS5kbR1fUFASDVDpK7ZbeWMx6hq", + "name": "go-check", + "version": "1.0.0" + }, + { + "author": "hsanjuan", + "hash": "QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq", + "name": "go-ipfs-delay", + "version": "0.1.0" + }, + { + "author": "google", + "hash": "QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W", + "name": "uuid", + "version": "0.1.0" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "MIT", + "name": "go-datastore", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.6.1" +} + diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/filter.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/filter.go similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/filter.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/filter.go diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/order.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/order.go new file mode 100644 index 0000000000..2ad1c9906d --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/order.go @@ -0,0 +1,48 @@ +package query + +import ( + "bytes" + "strings" +) + +// Order is an object used to order objects +type Order interface { + Compare(a, b Entry) int +} + +// OrderByFunction orders the results based on the result of the given function. +type OrderByFunction func(a, b Entry) int + +func (o OrderByFunction) Compare(a, b Entry) int { + return o(a, b) +} + +// OrderByValue is used to signal to datastores they should apply internal +// orderings. +type OrderByValue struct{} + +func (o OrderByValue) Compare(a, b Entry) int { + return bytes.Compare(a.Value, b.Value) +} + +// OrderByValueDescending is used to signal to datastores they +// should apply internal orderings. +type OrderByValueDescending struct{} + +func (o OrderByValueDescending) Compare(a, b Entry) int { + return -bytes.Compare(a.Value, b.Value) +} + +// OrderByKey +type OrderByKey struct{} + +func (o OrderByKey) Compare(a, b Entry) int { + return strings.Compare(a.Key, b.Key) +} + +// OrderByKeyDescending +type OrderByKeyDescending struct{} + +func (o OrderByKeyDescending) Compare(a, b Entry) int { + return -strings.Compare(a.Key, b.Key) +} diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query.go new file mode 100644 index 0000000000..844109173f --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query.go @@ -0,0 +1,379 @@ +package query + +import ( + "time" + + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" +) + +/* +Query represents storage for any key-value pair. + +tl;dr: + + queries are supported across datastores. + Cheap on top of relational dbs, and expensive otherwise. + Pick the right tool for the job! + +In addition to the key-value store get and set semantics, datastore +provides an interface to retrieve multiple records at a time through +the use of queries. The datastore Query model gleans a common set of +operations performed when querying. To avoid pasting here years of +database research, let’s summarize the operations datastore supports. + +Query Operations: + + * namespace - scope the query, usually by object type + * filters - select a subset of values by applying constraints + * orders - sort the results by applying sort conditions + * limit - impose a numeric limit on the number of results + * offset - skip a number of results (for efficient pagination) + +datastore combines these operations into a simple Query class that allows +applications to define their constraints in a simple, generic, way without +introducing datastore specific calls, languages, etc. + +Of course, different datastores provide relational query support across a +wide spectrum, from full support in traditional databases to none at all in +most key-value stores. Datastore aims to provide a common, simple interface +for the sake of application evolution over time and keeping large code bases +free of tool-specific code. It would be ridiculous to claim to support high- +performance queries on architectures that obviously do not. Instead, datastore +provides the interface, ideally translating queries to their native form +(e.g. into SQL for MySQL). + +However, on the wrong datastore, queries can potentially incur the high cost +of performing the aforemantioned query operations on the data set directly in +Go. It is the client’s responsibility to select the right tool for the job: +pick a data storage solution that fits the application’s needs now, and wrap +it with a datastore implementation. As the needs change, swap out datastore +implementations to support your new use cases. Some applications, particularly +in early development stages, can afford to incurr the cost of queries on non- +relational databases (e.g. using a FSDatastore and not worry about a database +at all). When it comes time to switch the tool for performance, updating the +application code can be as simple as swapping the datastore in one place, not +all over the application code base. This gain in engineering time, both at +initial development and during later iterations, can significantly offset the +cost of the layer of abstraction. + +*/ +type Query struct { + Prefix string // namespaces the query to results whose keys have Prefix + Filters []Filter // filter results. apply sequentially + Orders []Order // order results. apply hierarchically + Limit int // maximum number of results + Offset int // skip given number of results + KeysOnly bool // return only keys. + ReturnExpirations bool // return expirations (see TTLDatastore) +} + +// Entry is a query result entry. +type Entry struct { + Key string // cant be ds.Key because circular imports ...!!! + Value []byte // Will be nil if KeysOnly has been passed. + Expiration time.Time // Entry expiration timestamp if requested and supported (see TTLDatastore). +} + +// Result is a special entry that includes an error, so that the client +// may be warned about internal errors. +type Result struct { + Entry + + Error error +} + +// Results is a set of Query results. This is the interface for clients. +// Example: +// +// qr, _ := myds.Query(q) +// for r := range qr.Next() { +// if r.Error != nil { +// // handle. +// break +// } +// +// fmt.Println(r.Entry.Key, r.Entry.Value) +// } +// +// or, wait on all results at once: +// +// qr, _ := myds.Query(q) +// es, _ := qr.Rest() +// for _, e := range es { +// fmt.Println(e.Key, e.Value) +// } +// +type Results interface { + Query() Query // the query these Results correspond to + Next() <-chan Result // returns a channel to wait for the next result + NextSync() (Result, bool) // blocks and waits to return the next result, second paramter returns false when results are exhausted + Rest() ([]Entry, error) // waits till processing finishes, returns all entries at once. + Close() error // client may call Close to signal early exit + + // Process returns a goprocess.Process associated with these results. + // most users will not need this function (Close is all they want), + // but it's here in case you want to connect the results to other + // goprocess-friendly things. + Process() goprocess.Process +} + +// results implements Results +type results struct { + query Query + proc goprocess.Process + res <-chan Result +} + +func (r *results) Next() <-chan Result { + return r.res +} + +func (r *results) NextSync() (Result, bool) { + val, ok := <-r.res + return val, ok +} + +func (r *results) Rest() ([]Entry, error) { + var es []Entry + for e := range r.res { + if e.Error != nil { + return es, e.Error + } + es = append(es, e.Entry) + } + <-r.proc.Closed() // wait till the processing finishes. + return es, nil +} + +func (r *results) Process() goprocess.Process { + return r.proc +} + +func (r *results) Close() error { + return r.proc.Close() +} + +func (r *results) Query() Query { + return r.query +} + +// ResultBuilder is what implementors use to construct results +// Implementors of datastores and their clients must respect the +// Process of the Request: +// +// * clients must call r.Process().Close() on an early exit, so +// implementations can reclaim resources. +// * if the Entries are read to completion (channel closed), Process +// should be closed automatically. +// * datastores must respect <-Process.Closing(), which intermediates +// an early close signal from the client. +// +type ResultBuilder struct { + Query Query + Process goprocess.Process + Output chan Result +} + +// Results returns a Results to to this builder. +func (rb *ResultBuilder) Results() Results { + return &results{ + query: rb.Query, + proc: rb.Process, + res: rb.Output, + } +} + +const NormalBufSize = 1 +const KeysOnlyBufSize = 128 + +func NewResultBuilder(q Query) *ResultBuilder { + bufSize := NormalBufSize + if q.KeysOnly { + bufSize = KeysOnlyBufSize + } + b := &ResultBuilder{ + Query: q, + Output: make(chan Result, bufSize), + } + b.Process = goprocess.WithTeardown(func() error { + close(b.Output) + return nil + }) + return b +} + +// ResultsWithChan returns a Results object from a channel +// of Result entries. Respects its own Close() +func ResultsWithChan(q Query, res <-chan Result) Results { + b := NewResultBuilder(q) + + // go consume all the entries and add them to the results. + b.Process.Go(func(worker goprocess.Process) { + for { + select { + case <-worker.Closing(): // client told us to close early + return + case e, more := <-res: + if !more { + return + } + + select { + case b.Output <- e: + case <-worker.Closing(): // client told us to close early + return + } + } + } + }) + + go b.Process.CloseAfterChildren() + return b.Results() +} + +// ResultsWithEntries returns a Results object from a list of entries +func ResultsWithEntries(q Query, res []Entry) Results { + b := NewResultBuilder(q) + + // go consume all the entries and add them to the results. + b.Process.Go(func(worker goprocess.Process) { + for _, e := range res { + select { + case b.Output <- Result{Entry: e}: + case <-worker.Closing(): // client told us to close early + return + } + } + return + }) + + go b.Process.CloseAfterChildren() + return b.Results() +} + +func ResultsReplaceQuery(r Results, q Query) Results { + switch r := r.(type) { + case *results: + // note: not using field names to make sure all fields are copied + return &results{q, r.proc, r.res} + case *resultsIter: + // note: not using field names to make sure all fields are copied + lr := r.legacyResults + if lr != nil { + lr = &results{q, lr.proc, lr.res} + } + return &resultsIter{q, r.next, r.close, lr} + default: + panic("unknown results type") + } +} + +// +// ResultFromIterator provides an alternative way to to construct +// results without the use of channels. +// + +func ResultsFromIterator(q Query, iter Iterator) Results { + if iter.Close == nil { + iter.Close = noopClose + } + return &resultsIter{ + query: q, + next: iter.Next, + close: iter.Close, + } +} + +func noopClose() error { + return nil +} + +type Iterator struct { + Next func() (Result, bool) + Close func() error // note: might be called more than once +} + +type resultsIter struct { + query Query + next func() (Result, bool) + close func() error + legacyResults *results +} + +func (r *resultsIter) Next() <-chan Result { + r.useLegacyResults() + return r.legacyResults.Next() +} + +func (r *resultsIter) NextSync() (Result, bool) { + if r.legacyResults != nil { + return r.legacyResults.NextSync() + } else { + res, ok := r.next() + if !ok { + r.close() + } + return res, ok + } +} + +func (r *resultsIter) Rest() ([]Entry, error) { + var es []Entry + for { + e, ok := r.NextSync() + if !ok { + break + } + if e.Error != nil { + return es, e.Error + } + es = append(es, e.Entry) + } + return es, nil +} + +func (r *resultsIter) Process() goprocess.Process { + r.useLegacyResults() + return r.legacyResults.Process() +} + +func (r *resultsIter) Close() error { + if r.legacyResults != nil { + return r.legacyResults.Close() + } else { + return r.close() + } +} + +func (r *resultsIter) Query() Query { + return r.query +} + +func (r *resultsIter) useLegacyResults() { + if r.legacyResults != nil { + return + } + + b := NewResultBuilder(r.query) + + // go consume all the entries and add them to the results. + b.Process.Go(func(worker goprocess.Process) { + defer r.close() + for { + e, ok := r.next() + if !ok { + break + } + select { + case b.Output <- e: + case <-worker.Closing(): // client told us to close early + return + } + } + return + }) + + go b.Process.CloseAfterChildren() + + r.legacyResults = b.Results().(*results) +} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query_impl.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query_impl.go similarity index 76% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query_impl.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query_impl.go index 9218e441ea..d29b0e32f9 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query_impl.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query/query_impl.go @@ -1,5 +1,7 @@ package query +import "sort" + func DerivedResults(qr Results, ch <-chan Result) Results { return &results{ query: qr.Query(), @@ -73,9 +75,14 @@ func NaiveOffset(qr Results, offset int) Results { return DerivedResults(qr, ch) } -// NaiveOrder reorders results according to given Order. +// NaiveOrder reorders results according to given orders. // WARNING: this is the only non-stream friendly operation! -func NaiveOrder(qr Results, o Order) Results { +func NaiveOrder(qr Results, orders ...Order) Results { + // Short circuit. + if len(orders) == 0 { + return qr + } + ch := make(chan Result) var entries []Entry go func() { @@ -89,8 +96,25 @@ func NaiveOrder(qr Results, o Order) Results { entries = append(entries, e.Entry) } + sort.Slice(entries, func(i int, j int) bool { + a, b := entries[i], entries[j] + + for _, cmp := range orders { + switch cmp.Compare(a, b) { + case 0: + case -1: + return true + case 1: + return false + } + } + + // This gives us a *stable* sort for free. We don't care + // preserving the order from the underlying datastore + // because it's undefined. + return a.Key < b.Key + }) - o.Sort(entries) for _, e := range entries { ch <- Result{Entry: e} } @@ -106,8 +130,8 @@ func NaiveQueryApply(q Query, qr Results) Results { for _, f := range q.Filters { qr = NaiveFilter(qr, f) } - for _, o := range q.Orders { - qr = NaiveOrder(qr, o) + if len(q.Orders) > 0 { + qr = NaiveOrder(qr, q.Orders...) } if q.Offset != 0 { qr = NaiveOffset(qr, q.Offset) diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/retrystore/retrystore.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/retrystore/retrystore.go similarity index 97% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/retrystore/retrystore.go rename to vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/retrystore/retrystore.go index 6d35b5e36b..69a3c8f4d9 100644 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/retrystore/retrystore.go +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/retrystore/retrystore.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" ) // Datastore wraps a Batching datastore with a diff --git a/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync/sync.go b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync/sync.go new file mode 100644 index 0000000000..0337f25986 --- /dev/null +++ b/vendor/gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync/sync.go @@ -0,0 +1,153 @@ +package sync + +import ( + "sync" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" +) + +// MutexDatastore contains a child datastire and a mutex. +// used for coarse sync +type MutexDatastore struct { + sync.RWMutex + + child ds.Datastore +} + +// MutexWrap constructs a datastore with a coarse lock around +// the entire datastore, for every single operation +func MutexWrap(d ds.Datastore) *MutexDatastore { + return &MutexDatastore{child: d} +} + +// Children implements Shim +func (d *MutexDatastore) Children() []ds.Datastore { + return []ds.Datastore{d.child} +} + +// IsThreadSafe implements ThreadSafeDatastore +func (d *MutexDatastore) IsThreadSafe() {} + +// Put implements Datastore.Put +func (d *MutexDatastore) Put(key ds.Key, value []byte) (err error) { + d.Lock() + defer d.Unlock() + return d.child.Put(key, value) +} + +// Get implements Datastore.Get +func (d *MutexDatastore) Get(key ds.Key) (value []byte, err error) { + d.RLock() + defer d.RUnlock() + return d.child.Get(key) +} + +// Has implements Datastore.Has +func (d *MutexDatastore) Has(key ds.Key) (exists bool, err error) { + d.RLock() + defer d.RUnlock() + return d.child.Has(key) +} + +// GetSize implements Datastore.GetSize +func (d *MutexDatastore) GetSize(key ds.Key) (size int, err error) { + d.RLock() + defer d.RUnlock() + return d.child.GetSize(key) +} + +// Delete implements Datastore.Delete +func (d *MutexDatastore) Delete(key ds.Key) (err error) { + d.Lock() + defer d.Unlock() + return d.child.Delete(key) +} + +// KeyList implements Datastore.KeyList +func (d *MutexDatastore) Query(q dsq.Query) (dsq.Results, error) { + d.RLock() + defer d.RUnlock() + return d.child.Query(q) +} + +func (d *MutexDatastore) Batch() (ds.Batch, error) { + d.RLock() + defer d.RUnlock() + bds, ok := d.child.(ds.Batching) + if !ok { + return nil, ds.ErrBatchUnsupported + } + + b, err := bds.Batch() + if err != nil { + return nil, err + } + return &syncBatch{ + batch: b, + mds: d, + }, nil +} + +func (d *MutexDatastore) Close() error { + d.RWMutex.Lock() + defer d.RWMutex.Unlock() + return d.child.Close() +} + +// DiskUsage implements the PersistentDatastore interface. +func (d *MutexDatastore) DiskUsage() (uint64, error) { + d.RLock() + defer d.RUnlock() + return ds.DiskUsage(d.child) +} + +type syncBatch struct { + batch ds.Batch + mds *MutexDatastore +} + +func (b *syncBatch) Put(key ds.Key, val []byte) error { + b.mds.Lock() + defer b.mds.Unlock() + return b.batch.Put(key, val) +} + +func (b *syncBatch) Delete(key ds.Key) error { + b.mds.Lock() + defer b.mds.Unlock() + return b.batch.Delete(key) +} + +func (b *syncBatch) Commit() error { + b.mds.Lock() + defer b.mds.Unlock() + return b.batch.Commit() +} + +func (d *MutexDatastore) Check() error { + if c, ok := d.child.(ds.CheckedDatastore); ok { + d.RWMutex.Lock() + defer d.RWMutex.Unlock() + return c.Check() + } + return nil +} + +func (d *MutexDatastore) Scrub() error { + if c, ok := d.child.(ds.ScrubbedDatastore); ok { + d.RWMutex.Lock() + defer d.RWMutex.Unlock() + return c.Scrub() + } + return nil +} + +func (d *MutexDatastore) CollectGarbage() error { + if c, ok := d.child.(ds.GCDatastore); ok { + d.RWMutex.Lock() + defer d.RWMutex.Unlock() + return c.CollectGarbage() + } + return nil +} diff --git a/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/.travis.yml b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/.travis.yml new file mode 100644 index 0000000000..bcaa2f6866 --- /dev/null +++ b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/.travis.yml @@ -0,0 +1,20 @@ +language: go +sudo: false + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/LICENSE b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB/go-tcp-transport/LICENSE rename to vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/LICENSE diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/Makefile b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/Makefile similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/Makefile rename to vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/Makefile diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/README.md b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/README.md similarity index 100% rename from vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/README.md rename to vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/README.md diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/codecov.yml b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/codecov.yml rename to vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/codecov.yml diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/loggables.go b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/loggables.go similarity index 91% rename from vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/loggables.go rename to vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/loggables.go index 2b54161626..941acf7be6 100644 --- a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/loggables.go +++ b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/loggables.go @@ -10,9 +10,9 @@ import ( "net" uuid "gx/ipfs/QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W/uuid" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) // NetConn returns an eventlog.Metadata with the conn addresses diff --git a/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/package.json b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/package.json new file mode 100644 index 0000000000..d93bef5539 --- /dev/null +++ b/vendor/gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables/package.json @@ -0,0 +1,42 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-loggables" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-loggables" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "google", + "hash": "QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W", + "name": "uuid", + "version": "0.1.0" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-loggables", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.33" +} + diff --git a/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/.travis.yml b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/.travis.yml new file mode 100644 index 0000000000..90a67c7500 --- /dev/null +++ b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/.travis.yml @@ -0,0 +1,21 @@ +sudo: false + +language: go +go: + - 1.11 + +install: + - go get github.com/whyrusleeping/gx + - go get github.com/whyrusleeping/gx-go +script: + - make test + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: +email: false diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/LICENSE b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/LICENSE rename to vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/LICENSE diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/Makefile b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/Makefile similarity index 100% rename from vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/Makefile rename to vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/Makefile diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/README.md b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/README.md similarity index 100% rename from vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/README.md rename to vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/README.md diff --git a/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/delay.go b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/delay.go new file mode 100644 index 0000000000..afc0858750 --- /dev/null +++ b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/delay.go @@ -0,0 +1,75 @@ +package delay + +import ( + "math/rand" + "sync" + "time" +) + +// D (Delay) makes it easy to add (threadsafe) configurable delays to other +// objects. +type D interface { + Set(time.Duration) time.Duration + Wait() + NextWaitTime() time.Duration + Get() time.Duration +} + +type delay struct { + l sync.RWMutex + t time.Duration + generator Generator +} + +func (d *delay) Set(t time.Duration) time.Duration { + d.l.Lock() + defer d.l.Unlock() + prev := d.t + d.t = t + return prev +} + +func (d *delay) Wait() { + d.l.RLock() + defer d.l.RUnlock() + time.Sleep(d.generator.NextWaitTime(d.t)) +} + +func (d *delay) NextWaitTime() time.Duration { + d.l.Lock() + defer d.l.Unlock() + return d.generator.NextWaitTime(d.t) +} + +func (d *delay) Get() time.Duration { + d.l.Lock() + defer d.l.Unlock() + return d.t +} + +// Delay generates a generic delay form a t, a sleeper, and a generator +func Delay(t time.Duration, generator Generator) D { + return &delay{ + t: t, + generator: generator, + } +} + +// Fixed returns a delay with fixed latency +func Fixed(t time.Duration) D { + return Delay(t, FixedGenerator()) +} + +// VariableUniform is a delay following a uniform distribution +// Notice that to implement the D interface Set can only change the minimum delay +// the delta is set only at initialization +func VariableUniform(t, d time.Duration, rng *rand.Rand) D { + return Delay(t, VariableUniformGenerator(d, rng)) +} + +// VariableNormal is a delay following a normal distribution +// Notice that to implement the D interface Set can only change the mean delay +// the standard deviation is set only at initialization +func VariableNormal(t, std time.Duration, rng *rand.Rand) D { + return Delay(t, VariableNormalGenerator(std, rng)) +} diff --git a/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/generator.go b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/generator.go new file mode 100644 index 0000000000..122d7c0b56 --- /dev/null +++ b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/generator.go @@ -0,0 +1,66 @@ +package delay + +import ( + "math/rand" + "time" +) + +// Generator provides an interface for generating wait times +type Generator interface { + NextWaitTime(time.Duration) time.Duration +} + +var sharedRNG = rand.New(rand.NewSource(time.Now().UnixNano())) + +// VariableNormalGenerator makes delays that following a normal distribution +func VariableNormalGenerator(std time.Duration, rng *rand.Rand) Generator { + if rng == nil { + rng = sharedRNG + } + + return &variableNormal{ + std: std, + rng: rng, + } +} + +type variableNormal struct { + std time.Duration + rng *rand.Rand +} + +func (d *variableNormal) NextWaitTime(t time.Duration) time.Duration { + return time.Duration(d.rng.NormFloat64()*float64(d.std)) + t +} + +// VariableUniformGenerator generates delays following a uniform distribution +func VariableUniformGenerator(d time.Duration, rng *rand.Rand) Generator { + if rng == nil { + rng = sharedRNG + } + + return &variableUniform{ + d: d, + rng: rng, + } +} + +type variableUniform struct { + d time.Duration // max delta + rng *rand.Rand +} + +func (d *variableUniform) NextWaitTime(t time.Duration) time.Duration { + return time.Duration(d.rng.Float64()*float64(d.d)) + t +} + +type fixed struct{} + +// FixedGenerator returns a delay with fixed latency +func FixedGenerator() Generator { + return &fixed{} +} + +func (d *fixed) NextWaitTime(t time.Duration) time.Duration { + return t +} diff --git a/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/package.json b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/package.json new file mode 100644 index 0000000000..124b8915c4 --- /dev/null +++ b/vendor/gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay/package.json @@ -0,0 +1,16 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-delay" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-delay" + }, + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-ipfs-delay", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.0" +} + diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/.travis.yml b/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/.travis.yml deleted file mode 100644 index 752dd5fe3a..0000000000 --- a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/package.json b/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/package.json deleted file mode 100644 index f7dde7fdf6..0000000000 --- a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "author": "stebalien", - "bugs": {}, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-pubsub-router" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "hsanjuan", - "hash": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "name": "go-ipfs-ds-help", - "version": "0.1.3" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "Qmcwep23T9AwwbuQRRhVyjk9PBRbMFCyGKCKGZfTPteiFU", - "name": "go-libp2p-blankhost", - "version": "0.3.15" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", - "name": "go-libp2p-record", - "version": "4.1.8" - }, - { - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", - "name": "go-libp2p-routing", - "version": "2.7.1" - }, - { - "author": "Stebalien", - "hash": "QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK", - "name": "go-libp2p-routing-helpers", - "version": "0.3.8" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - }, - { - "author": "whyrusleeping", - "hash": "QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG", - "name": "go-libp2p-pubsub", - "version": "0.11.3" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-libp2p-pubsub-router", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.5.3" -} - diff --git a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/pubsub.go b/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/pubsub.go deleted file mode 100644 index 0ea4c6cae2..0000000000 --- a/vendor/gx/ipfs/QmUhJjacEW7gDGsvxzn8NqyfCWRksgTtYeaGvQmgYvrmWH/go-libp2p-pubsub-router/pubsub.go +++ /dev/null @@ -1,378 +0,0 @@ -package namesys - -import ( - "bytes" - "context" - "errors" - "sync" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - pubsub "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dssync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" -) - -var log = logging.Logger("pubsub-valuestore") - -type watchGroup struct { - // Note: this chan must be buffered, see notifyWatchers - listeners map[chan []byte]struct{} -} - -type PubsubValueStore struct { - ctx context.Context - ds ds.Datastore - host p2phost.Host - cr routing.ContentRouting - ps *pubsub.PubSub - - // Map of keys to subscriptions. - // - // If a key is present but the subscription is nil, we've bootstrapped - // but haven't subscribed. - mx sync.Mutex - subs map[string]*pubsub.Subscription - - watchLk sync.Mutex - watching map[string]*watchGroup - - Validator record.Validator -} - -// NewPubsubPublisher constructs a new Publisher that publishes IPNS records through pubsub. -// The constructor interface is complicated by the need to bootstrap the pubsub topic. -// This could be greatly simplified if the pubsub implementation handled bootstrap itself -func NewPubsubValueStore(ctx context.Context, host p2phost.Host, cr routing.ContentRouting, ps *pubsub.PubSub, validator record.Validator) *PubsubValueStore { - return &PubsubValueStore{ - ctx: ctx, - - ds: dssync.MutexWrap(ds.NewMapDatastore()), - host: host, // needed for pubsub bootstrap - cr: cr, // needed for pubsub bootstrap - ps: ps, - - subs: make(map[string]*pubsub.Subscription), - watching: make(map[string]*watchGroup), - - Validator: validator, - } -} - -// Publish publishes an IPNS record through pubsub with default TTL -func (p *PubsubValueStore) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) error { - p.mx.Lock() - _, bootstraped := p.subs[key] - - if !bootstraped { - p.subs[key] = nil - p.mx.Unlock() - - bootstrapPubsub(p.ctx, p.cr, p.host, key) - } else { - p.mx.Unlock() - } - - log.Debugf("PubsubPublish: publish value for key", key) - return p.ps.Publish(key, value) -} - -func (p *PubsubValueStore) isBetter(key string, val []byte) bool { - if p.Validator.Validate(key, val) != nil { - return false - } - - old, err := p.getLocal(key) - if err != nil { - // If the old one is invalid, the new one is *always* better. - return true - } - - // Same record. Possible DoS vector, should consider failing? - if bytes.Equal(old, val) { - return true - } - - i, err := p.Validator.Select(key, [][]byte{val, old}) - return err == nil && i == 0 -} - -func (p *PubsubValueStore) Subscribe(key string) error { - p.mx.Lock() - // see if we already have a pubsub subscription; if not, subscribe - sub := p.subs[key] - p.mx.Unlock() - - if sub != nil { - return nil - } - - // Ignore the error. We have to check again anyways to make sure the - // record hasn't expired. - // - // Also, make sure to do this *before* subscribing. - p.ps.RegisterTopicValidator(key, func(ctx context.Context, msg *pubsub.Message) bool { - return p.isBetter(key, msg.GetData()) - }) - - sub, err := p.ps.Subscribe(key) - if err != nil { - p.mx.Unlock() - return err - } - - p.mx.Lock() - existingSub, bootstraped := p.subs[key] - if existingSub != nil { - p.mx.Unlock() - sub.Cancel() - return nil - } - - p.subs[key] = sub - ctx, cancel := context.WithCancel(p.ctx) - go p.handleSubscription(sub, key, cancel) - p.mx.Unlock() - - log.Debugf("PubsubResolve: subscribed to %s", key) - - if !bootstraped { - // TODO: Deal with publish then resolve case? Cancel behaviour changes. - go bootstrapPubsub(ctx, p.cr, p.host, key) - } - return nil -} - -func (p *PubsubValueStore) getLocal(key string) ([]byte, error) { - val, err := p.ds.Get(dshelp.NewKeyFromBinary([]byte(key))) - if err != nil { - // Don't invalidate due to ds errors. - if err == ds.ErrNotFound { - err = routing.ErrNotFound - } - return nil, err - } - - // If the old one is invalid, the new one is *always* better. - if err := p.Validator.Validate(key, val); err != nil { - return nil, err - } - return val, nil -} - -func (p *PubsubValueStore) GetValue(ctx context.Context, key string, opts ...ropts.Option) ([]byte, error) { - if err := p.Subscribe(key); err != nil { - return nil, err - } - - return p.getLocal(key) -} - -func (p *PubsubValueStore) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { - if err := p.Subscribe(key); err != nil { - return nil, err - } - - p.watchLk.Lock() - defer p.watchLk.Unlock() - - out := make(chan []byte, 1) - lv, err := p.getLocal(key) - if err == nil { - out <- lv - close(out) - return out, nil - } - - wg, ok := p.watching[key] - if !ok { - wg = &watchGroup{ - listeners: map[chan []byte]struct{}{}, - } - p.watching[key] = wg - } - - proxy := make(chan []byte, 1) - - ctx, cancel := context.WithCancel(ctx) - wg.listeners[proxy] = struct{}{} - - go func() { - defer func() { - cancel() - - p.watchLk.Lock() - delete(wg.listeners, proxy) - - if _, ok := p.watching[key]; len(wg.listeners) == 0 && ok { - delete(p.watching, key) - } - p.watchLk.Unlock() - - close(out) - }() - - for { - select { - case val, ok := <-proxy: - if !ok { - return - } - - // outCh is buffered, so we just put the value or swap it for the newer one - select { - case out <- val: - case <-out: - out <- val - } - - // 1 is good enough - return - case <-ctx.Done(): - return - } - } - }() - - return out, nil -} - -// GetSubscriptions retrieves a list of active topic subscriptions -func (p *PubsubValueStore) GetSubscriptions() []string { - p.mx.Lock() - defer p.mx.Unlock() - - var res []string - for sub := range p.subs { - res = append(res, sub) - } - - return res -} - -// Cancel cancels a topic subscription; returns true if an active -// subscription was canceled -func (p *PubsubValueStore) Cancel(name string) (bool, error) { - p.mx.Lock() - defer p.mx.Unlock() - - p.watchLk.Lock() - if _, wok := p.watching[name]; wok { - p.watchLk.Unlock() - return false, errors.New("key has active subscriptions") - } - p.watchLk.Unlock() - - sub, ok := p.subs[name] - if ok { - sub.Cancel() - delete(p.subs, name) - } - - return ok, nil -} - -func (p *PubsubValueStore) handleSubscription(sub *pubsub.Subscription, key string, cancel func()) { - defer sub.Cancel() - defer cancel() - - for { - msg, err := sub.Next(p.ctx) - if err != nil { - if err != context.Canceled { - log.Warningf("PubsubResolve: subscription error in %s: %s", key, err.Error()) - } - return - } - if p.isBetter(key, msg.GetData()) { - err := p.ds.Put(dshelp.NewKeyFromBinary([]byte(key)), msg.GetData()) - if err != nil { - log.Warningf("PubsubResolve: error writing update for %s: %s", key, err) - } - p.notifyWatchers(key, msg.GetData()) - } - } -} - -func (p *PubsubValueStore) notifyWatchers(key string, data []byte) { - p.watchLk.Lock() - defer p.watchLk.Unlock() - sg, ok := p.watching[key] - if !ok { - return - } - - for watcher := range sg.listeners { - select { - case <-watcher: - watcher <- data - case watcher <- data: - } - } -} - -// rendezvous with peers in the name topic through provider records -// Note: rendezvous/boostrap should really be handled by the pubsub implementation itself! -func bootstrapPubsub(ctx context.Context, cr routing.ContentRouting, host p2phost.Host, name string) { - // TODO: consider changing this to `pubsub:...` - topic := "floodsub:" + name - hash := u.Hash([]byte(topic)) - rz := cid.NewCidV1(cid.Raw, hash) - - err := cr.Provide(ctx, rz, true) - if err != nil { - log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error()) - } - - go func() { - for { - select { - case <-time.After(8 * time.Hour): - err := cr.Provide(ctx, rz, true) - if err != nil { - log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error()) - } - case <-ctx.Done(): - return - } - } - }() - - rzctx, cancel := context.WithTimeout(ctx, time.Second*10) - defer cancel() - - wg := &sync.WaitGroup{} - for pi := range cr.FindProvidersAsync(rzctx, rz, 10) { - if pi.ID == host.ID() { - continue - } - wg.Add(1) - go func(pi pstore.PeerInfo) { - defer wg.Done() - - ctx, cancel := context.WithTimeout(ctx, time.Second*10) - defer cancel() - - err := host.Connect(ctx, pi) - if err != nil { - log.Debugf("Error connecting to pubsub peer %s: %s", pi.ID, err.Error()) - return - } - - // delay to let pubsub perform its handshake - time.Sleep(time.Millisecond * 250) - - log.Debugf("Connected to pubsub peer %s", pi.ID) - }(pi) - } - - wg.Wait() -} diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/.travis.yml b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/.travis.yml deleted file mode 100644 index a88cde653d..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -env: - - GOTFLAGS="-race" - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace/xor.go b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace/xor.go deleted file mode 100644 index 6570df7320..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace/xor.go +++ /dev/null @@ -1,59 +0,0 @@ -package keyspace - -import ( - "bytes" - "crypto/sha256" - "math/big" - "math/bits" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" -) - -// XORKeySpace is a KeySpace which: -// - normalizes identifiers using a cryptographic hash (sha256) -// - measures distance by XORing keys together -var XORKeySpace = &xorKeySpace{} -var _ KeySpace = XORKeySpace // ensure it conforms - -type xorKeySpace struct{} - -// Key converts an identifier into a Key in this space. -func (s *xorKeySpace) Key(id []byte) Key { - hash := sha256.Sum256(id) - key := hash[:] - return Key{ - Space: s, - Original: id, - Bytes: key, - } -} - -// Equal returns whether keys are equal in this key space -func (s *xorKeySpace) Equal(k1, k2 Key) bool { - return bytes.Equal(k1.Bytes, k2.Bytes) -} - -// Distance returns the distance metric in this key space -func (s *xorKeySpace) Distance(k1, k2 Key) *big.Int { - // XOR the keys - k3 := u.XOR(k1.Bytes, k2.Bytes) - - // interpret it as an integer - dist := big.NewInt(0).SetBytes(k3) - return dist -} - -// Less returns whether the first key is smaller than the second. -func (s *xorKeySpace) Less(k1, k2 Key) bool { - return bytes.Compare(k1.Bytes, k2.Bytes) < 0 -} - -// ZeroPrefixLen returns the number of consecutive zeroes in a byte slice. -func ZeroPrefixLen(id []byte) int { - for i, b := range id { - if b != 0 { - return i*8 + bits.LeadingZeros8(uint8(b)) - } - } - return len(id) * 8 -} diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/package.json b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/package.json deleted file mode 100644 index e397c9c58e..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-kbucket" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-kbucket", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-kbucket", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.2.12" -} - diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/sorting.go b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/sorting.go deleted file mode 100644 index 6e62e34f36..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/sorting.go +++ /dev/null @@ -1,61 +0,0 @@ -package kbucket - -import ( - "container/list" - "sort" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -// A helper struct to sort peers by their distance to the local node -type peerDistance struct { - p peer.ID - distance ID -} - -// peerSorterArr implements sort.Interface to sort peers by xor distance -type peerSorterArr []*peerDistance - -func (p peerSorterArr) Len() int { return len(p) } -func (p peerSorterArr) Swap(a, b int) { p[a], p[b] = p[b], p[a] } -func (p peerSorterArr) Less(a, b int) bool { - return p[a].distance.less(p[b].distance) -} - -// - -func copyPeersFromList(target ID, peerArr peerSorterArr, peerList *list.List) peerSorterArr { - if cap(peerArr) < len(peerArr)+peerList.Len() { - newArr := make(peerSorterArr, 0, len(peerArr)+peerList.Len()) - copy(newArr, peerArr) - peerArr = newArr - } - for e := peerList.Front(); e != nil; e = e.Next() { - p := e.Value.(peer.ID) - pID := ConvertPeerID(p) - pd := peerDistance{ - p: p, - distance: xor(target, pID), - } - peerArr = append(peerArr, &pd) - } - return peerArr -} - -func SortClosestPeers(peers []peer.ID, target ID) []peer.ID { - psarr := make(peerSorterArr, 0, len(peers)) - for _, p := range peers { - pID := ConvertPeerID(p) - pd := &peerDistance{ - p: p, - distance: xor(target, pID), - } - psarr = append(psarr, pd) - } - sort.Sort(psarr) - out := make([]peer.ID, 0, len(psarr)) - for _, p := range psarr { - out = append(out, p.p) - } - return out -} diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/table.go b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/table.go deleted file mode 100644 index d25bb770e4..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/table.go +++ /dev/null @@ -1,235 +0,0 @@ -// package kbucket implements a kademlia 'k-bucket' routing table. -package kbucket - -import ( - "fmt" - "sort" - "sync" - "time" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("table") - -// RoutingTable defines the routing table. -type RoutingTable struct { - - // ID of the local peer - local ID - - // Blanket lock, refine later for better performance - tabLock sync.RWMutex - - // latency metrics - metrics pstore.Metrics - - // Maximum acceptable latency for peers in this cluster - maxLatency time.Duration - - // kBuckets define all the fingers to other nodes. - Buckets []*Bucket - bucketsize int - - // notification functions - PeerRemoved func(peer.ID) - PeerAdded func(peer.ID) -} - -// NewRoutingTable creates a new routing table with a given bucketsize, local ID, and latency tolerance. -func NewRoutingTable(bucketsize int, localID ID, latency time.Duration, m pstore.Metrics) *RoutingTable { - rt := &RoutingTable{ - Buckets: []*Bucket{newBucket()}, - bucketsize: bucketsize, - local: localID, - maxLatency: latency, - metrics: m, - PeerRemoved: func(peer.ID) {}, - PeerAdded: func(peer.ID) {}, - } - - return rt -} - -// Update adds or moves the given peer to the front of its respective bucket -// If a peer gets removed from a bucket, it is returned -func (rt *RoutingTable) Update(p peer.ID) { - peerID := ConvertPeerID(p) - cpl := commonPrefixLen(peerID, rt.local) - - rt.tabLock.Lock() - defer rt.tabLock.Unlock() - bucketID := cpl - if bucketID >= len(rt.Buckets) { - bucketID = len(rt.Buckets) - 1 - } - - bucket := rt.Buckets[bucketID] - if bucket.Has(p) { - // If the peer is already in the table, move it to the front. - // This signifies that it it "more active" and the less active nodes - // Will as a result tend towards the back of the list - bucket.MoveToFront(p) - return - } - - if rt.metrics.LatencyEWMA(p) > rt.maxLatency { - // Connection doesnt meet requirements, skip! - return - } - - // New peer, add to bucket - bucket.PushFront(p) - rt.PeerAdded(p) - - // Are we past the max bucket size? - if bucket.Len() > rt.bucketsize { - // If this bucket is the rightmost bucket, and its full - // we need to split it and create a new bucket - if bucketID == len(rt.Buckets)-1 { - rt.nextBucket() - } else { - // If the bucket cant split kick out least active node - rt.PeerRemoved(bucket.PopBack()) - } - } -} - -// Remove deletes a peer from the routing table. This is to be used -// when we are sure a node has disconnected completely. -func (rt *RoutingTable) Remove(p peer.ID) { - rt.tabLock.Lock() - defer rt.tabLock.Unlock() - peerID := ConvertPeerID(p) - cpl := commonPrefixLen(peerID, rt.local) - - bucketID := cpl - if bucketID >= len(rt.Buckets) { - bucketID = len(rt.Buckets) - 1 - } - - bucket := rt.Buckets[bucketID] - bucket.Remove(p) - rt.PeerRemoved(p) -} - -func (rt *RoutingTable) nextBucket() { - bucket := rt.Buckets[len(rt.Buckets)-1] - newBucket := bucket.Split(len(rt.Buckets)-1, rt.local) - rt.Buckets = append(rt.Buckets, newBucket) - if newBucket.Len() > rt.bucketsize { - rt.nextBucket() - } - - // If all elements were on left side of split... - if bucket.Len() > rt.bucketsize { - rt.PeerRemoved(bucket.PopBack()) - } -} - -// Find a specific peer by ID or return nil -func (rt *RoutingTable) Find(id peer.ID) peer.ID { - srch := rt.NearestPeers(ConvertPeerID(id), 1) - if len(srch) == 0 || srch[0] != id { - return "" - } - return srch[0] -} - -// NearestPeer returns a single peer that is nearest to the given ID -func (rt *RoutingTable) NearestPeer(id ID) peer.ID { - peers := rt.NearestPeers(id, 1) - if len(peers) > 0 { - return peers[0] - } - - log.Debugf("NearestPeer: Returning nil, table size = %d", rt.Size()) - return "" -} - -// NearestPeers returns a list of the 'count' closest peers to the given ID -func (rt *RoutingTable) NearestPeers(id ID, count int) []peer.ID { - cpl := commonPrefixLen(id, rt.local) - - rt.tabLock.RLock() - - // Get bucket at cpl index or last bucket - var bucket *Bucket - if cpl >= len(rt.Buckets) { - cpl = len(rt.Buckets) - 1 - } - bucket = rt.Buckets[cpl] - - peerArr := make(peerSorterArr, 0, count) - peerArr = copyPeersFromList(id, peerArr, bucket.list) - if len(peerArr) < count { - // In the case of an unusual split, one bucket may be short or empty. - // if this happens, search both surrounding buckets for nearby peers - if cpl > 0 { - plist := rt.Buckets[cpl-1].list - peerArr = copyPeersFromList(id, peerArr, plist) - } - - if cpl < len(rt.Buckets)-1 { - plist := rt.Buckets[cpl+1].list - peerArr = copyPeersFromList(id, peerArr, plist) - } - } - rt.tabLock.RUnlock() - - // Sort by distance to local peer - sort.Sort(peerArr) - - if count < len(peerArr) { - peerArr = peerArr[:count] - } - - out := make([]peer.ID, 0, len(peerArr)) - for _, p := range peerArr { - out = append(out, p.p) - } - - return out -} - -// Size returns the total number of peers in the routing table -func (rt *RoutingTable) Size() int { - var tot int - rt.tabLock.RLock() - for _, buck := range rt.Buckets { - tot += buck.Len() - } - rt.tabLock.RUnlock() - return tot -} - -// ListPeers takes a RoutingTable and returns a list of all peers from all buckets in the table. -func (rt *RoutingTable) ListPeers() []peer.ID { - var peers []peer.ID - rt.tabLock.RLock() - for _, buck := range rt.Buckets { - peers = append(peers, buck.Peers()...) - } - rt.tabLock.RUnlock() - return peers -} - -// Print prints a descriptive statement about the provided RoutingTable -func (rt *RoutingTable) Print() { - fmt.Printf("Routing Table, bs = %d, Max latency = %d\n", rt.bucketsize, rt.maxLatency) - rt.tabLock.RLock() - - for i, b := range rt.Buckets { - fmt.Printf("\tbucket: %d\n", i) - - b.lk.RLock() - for e := b.list.Front(); e != nil; e = e.Next() { - p := e.Value.(peer.ID) - fmt.Printf("\t\t- %s %s\n", p.Pretty(), rt.metrics.LatencyEWMA(p).String()) - } - b.lk.RUnlock() - } - rt.tabLock.RUnlock() -} diff --git a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/util.go b/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/util.go deleted file mode 100644 index fa664b59de..0000000000 --- a/vendor/gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/util.go +++ /dev/null @@ -1,62 +0,0 @@ -package kbucket - -import ( - "bytes" - "crypto/sha256" - "errors" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ks "gx/ipfs/QmUmemULEGWabBBZxczWCS3AF9g5jDFcxfMXw9iQkZ3EdD/go-libp2p-kbucket/keyspace" -) - -// Returned if a routing table query returns no results. This is NOT expected -// behaviour -var ErrLookupFailure = errors.New("failed to find any peer in table") - -// ID for IpfsDHT is in the XORKeySpace -// -// The type dht.ID signifies that its contents have been hashed from either a -// peer.ID or a util.Key. This unifies the keyspace -type ID []byte - -func (id ID) equal(other ID) bool { - return bytes.Equal(id, other) -} - -func (id ID) less(other ID) bool { - a := ks.Key{Space: ks.XORKeySpace, Bytes: id} - b := ks.Key{Space: ks.XORKeySpace, Bytes: other} - return a.Less(b) -} - -func xor(a, b ID) ID { - return ID(u.XOR(a, b)) -} - -func commonPrefixLen(a, b ID) int { - return ks.ZeroPrefixLen(u.XOR(a, b)) -} - -// ConvertPeerID creates a DHT ID by hashing a Peer ID (Multihash) -func ConvertPeerID(id peer.ID) ID { - hash := sha256.Sum256([]byte(id)) - return hash[:] -} - -// ConvertKey creates a DHT ID by hashing a local key (String) -func ConvertKey(id string) ID { - hash := sha256.Sum256([]byte(id)) - return hash[:] -} - -// Closer returns true if a is closer to key than b is -func Closer(a, b peer.ID, key string) bool { - aid := ConvertPeerID(a) - bid := ConvertPeerID(b) - tgt := ConvertKey(key) - adist := xor(aid, tgt) - bdist := xor(bid, tgt) - - return adist.less(bdist) -} diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/LICENSE b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/LICENSE rename to vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/LICENSE diff --git a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/README.md b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/README.md similarity index 100% rename from vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/README.md rename to vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/README.md diff --git a/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/package.json b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/package.json new file mode 100644 index 0000000000..986fb21c28 --- /dev/null +++ b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/package.json @@ -0,0 +1,24 @@ +{ + "author": "whyrusleeping", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/whyrusleeping/mafmt" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.6.0", + "gx_version": "0.4.0", + "issues_url": "https://github.com/whyrusleeping/mafmt", + "language": "go", + "license": "", + "name": "mafmt", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.2.11" +} + diff --git a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/patterns.go b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/patterns.go similarity index 97% rename from vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/patterns.go rename to vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/patterns.go index ec739a2e18..eed6a247ba 100644 --- a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/patterns.go +++ b/vendor/gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt/patterns.go @@ -3,7 +3,7 @@ package mafmt import ( "strings" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // Define IP as either ipv4 or ipv6 diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/.travis.yml b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/.travis.yml rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/.travis.yml diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/LICENSE b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/LICENSE rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/LICENSE diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/Makefile b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/Makefile similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/Makefile rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/Makefile diff --git a/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/README.md b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/README.md new file mode 100644 index 0000000000..2ae0846a19 --- /dev/null +++ b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/README.md @@ -0,0 +1,61 @@ +# go-ipns + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/ipfs/go-datastore?status.svg)](https://godoc.org/github.com/ipfs/go-ipns) + +> ipns record definitions + +This package contains all of the components necessary to create, understand, and validate IPNS records. It does *not* publish or resolve those records. [`go-ipfs`](https://github.com/ipfs/go-ipfs) uses this package internally to manipulate records. + +## Usage + +To create a new IPNS record: + +```go +import ( + "time" + + ipns "github.com/ipfs/go-ipns" + crypto "github.com/libp2p/go-libp2p-crypto" +) + +// Generate a private key to sign the IPNS record with. Most of the time, +// however, you'll want to retrieve an already-existing key from IPFS using the +// go-ipfs/core/coreapi CoreAPI.KeyAPI() interface. +privateKey, publicKey, err := crypto.GenerateKeyPair(crypto.RSA, 2048) +if err != nil { + panic(err) +} + +// Create an IPNS record that expires in one hour and points to the IPFS address +// /ipfs/Qme1knMqwt1hKZbc1BmQFmnm9f36nyQGwXxPGVpVJ9rMK5 +ipnsRecord, err := ipns.Create(privateKey, []byte("/ipfs/Qme1knMqwt1hKZbc1BmQFmnm9f36nyQGwXxPGVpVJ9rMK5"), 0, time.Now().Add(1*time.Hour)) +if err != nil { + panic(err) +} +``` + +Once you have the record, you’ll need to use IPFS to *publish* it. + +There are several other major operations you can do with `go-ipns`. Check out the [API docs](https://godoc.org/github.com/ipfs/go-ipns) or look at the tests in this repo for examples. + +## Documentation + +https://godoc.org/github.com/ipfs/go-ipns + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-ipns/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +### Want to hack on IPFS? + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) + +## License + +Copyright (c) Protocol Labs, Inc. under the **MIT license**. See [LICENSE file](./LICENSE) for details. diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/codecov.yml b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/codecov.yml rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/codecov.yml diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/errors.go b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/errors.go similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/errors.go rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/errors.go diff --git a/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/ipns.go b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/ipns.go new file mode 100644 index 0000000000..fff43beaff --- /dev/null +++ b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/ipns.go @@ -0,0 +1,168 @@ +package ipns + +import ( + "bytes" + "fmt" + "time" + + pb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// Create creates a new IPNS entry and signs it with the given private key. +// +// This function does not embed the public key. If you want to do that, use +// `EmbedPublicKey`. +func Create(sk ic.PrivKey, val []byte, seq uint64, eol time.Time) (*pb.IpnsEntry, error) { + entry := new(pb.IpnsEntry) + + entry.Value = val + typ := pb.IpnsEntry_EOL + entry.ValidityType = &typ + entry.Sequence = &seq + entry.Validity = []byte(u.FormatRFC3339(eol)) + + sig, err := sk.Sign(ipnsEntryDataForSig(entry)) + if err != nil { + return nil, err + } + entry.Signature = sig + + return entry, nil +} + +// Validates validates the given IPNS entry against the given public key. +func Validate(pk ic.PubKey, entry *pb.IpnsEntry) error { + // Check the ipns record signature with the public key + if ok, err := pk.Verify(ipnsEntryDataForSig(entry), entry.GetSignature()); err != nil || !ok { + return ErrSignature + } + + eol, err := GetEOL(entry) + if err != nil { + return err + } + if time.Now().After(eol) { + return ErrExpiredRecord + } + return nil +} + +// GetEOL returns the EOL of this IPNS entry +// +// This function returns ErrUnrecognizedValidity if the validity type of the +// record isn't EOL. Otherwise, it returns an error if it can't parse the EOL. +func GetEOL(entry *pb.IpnsEntry) (time.Time, error) { + if entry.GetValidityType() != pb.IpnsEntry_EOL { + return time.Time{}, ErrUnrecognizedValidity + } + return u.ParseRFC3339(string(entry.GetValidity())) +} + +// EmbedPublicKey embeds the given public key in the given ipns entry. While not +// strictly required, some nodes (e.g., DHT servers) may reject IPNS entries +// that don't embed their public keys as they may not be able to validate them +// efficiently. +func EmbedPublicKey(pk ic.PubKey, entry *pb.IpnsEntry) error { + // Try extracting the public key from the ID. If we can, *don't* embed + // it. + id, err := peer.IDFromPublicKey(pk) + if err != nil { + return err + } + if _, err := id.ExtractPublicKey(); err != peer.ErrNoPublicKey { + // Either a *real* error or nil. + return err + } + + // We failed to extract the public key from the peer ID, embed it in the + // record. + pkBytes, err := pk.Bytes() + if err != nil { + return err + } + entry.PubKey = pkBytes + return nil +} + +// ExtractPublicKey extracts a public key matching `pid` from the IPNS record, +// if possible. +// +// This function returns (nil, nil) when no public key can be extracted and +// nothing is malformed. +func ExtractPublicKey(pid peer.ID, entry *pb.IpnsEntry) (ic.PubKey, error) { + if entry.PubKey != nil { + pk, err := ic.UnmarshalPublicKey(entry.PubKey) + if err != nil { + return nil, fmt.Errorf("unmarshaling pubkey in record: %s", err) + } + + expPid, err := peer.IDFromPublicKey(pk) + if err != nil { + return nil, fmt.Errorf("could not regenerate peerID from pubkey: %s", err) + } + + if pid != expPid { + return nil, ErrPublicKeyMismatch + } + return pk, nil + } + + return pid.ExtractPublicKey() +} + +// Compare compares two IPNS entries. It returns: +// +// * -1 if a is older than b +// * 0 if a and b cannot be ordered (this doesn't mean that they are equal) +// * +1 if a is newer than b +// +// It returns an error when either a or b are malformed. +// +// NOTE: It *does not* validate the records, the caller is responsible for calling +// `Validate` first. +// +// NOTE: If a and b cannot be ordered by this function, you can determine their +// order by comparing their serialized byte representations (using +// `bytes.Compare`). You must do this if you are implementing a libp2p record +// validator (or you can just use the one provided for you by this package). +func Compare(a, b *pb.IpnsEntry) (int, error) { + as := a.GetSequence() + bs := b.GetSequence() + + if as > bs { + return 1, nil + } else if as < bs { + return -1, nil + } + + at, err := u.ParseRFC3339(string(a.GetValidity())) + if err != nil { + return 0, err + } + + bt, err := u.ParseRFC3339(string(b.GetValidity())) + if err != nil { + return 0, err + } + + if at.After(bt) { + return 1, nil + } else if bt.After(at) { + return -1, nil + } + + return 0, nil +} + +func ipnsEntryDataForSig(e *pb.IpnsEntry) []byte { + return bytes.Join([][]byte{ + e.Value, + e.Validity, + []byte(fmt.Sprint(e.GetValidityType())), + }, + []byte{}) +} diff --git a/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/package.json b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/package.json new file mode 100644 index 0000000000..e728289cd1 --- /dev/null +++ b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/package.json @@ -0,0 +1,58 @@ +{ + "author": "stebalien", + "bugs": { + "url": "https://github.com/ipfs/go-ipns/issues" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipns" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", + "name": "go-libp2p-record", + "version": "4.1.15" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipns", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.23" +} + diff --git a/vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/Makefile b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmUDTcnDp2WssbmiDLC6aYurUeyt7QeRakHUQMxA2mZ5iB/go-libp2p/p2p/protocol/identify/pb/Makefile rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/Makefile diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/ipns.pb.go b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/ipns.pb.go similarity index 92% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/ipns.pb.go rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/ipns.pb.go index 5440c11382..703c3bf094 100644 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/ipns.pb.go +++ b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/ipns.pb.go @@ -3,13 +3,13 @@ package ipns_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import github_com_gogo_protobuf_proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - -import io "io" +import ( + fmt "fmt" + github_com_gogo_protobuf_proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -32,6 +32,7 @@ const ( var IpnsEntry_ValidityType_name = map[int32]string{ 0: "EOL", } + var IpnsEntry_ValidityType_value = map[string]int32{ "EOL": 0, } @@ -41,9 +42,11 @@ func (x IpnsEntry_ValidityType) Enum() *IpnsEntry_ValidityType { *p = x return p } + func (x IpnsEntry_ValidityType) String() string { return proto.EnumName(IpnsEntry_ValidityType_name, int32(x)) } + func (x *IpnsEntry_ValidityType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(IpnsEntry_ValidityType_value, data, "IpnsEntry_ValidityType") if err != nil { @@ -52,8 +55,9 @@ func (x *IpnsEntry_ValidityType) UnmarshalJSON(data []byte) error { *x = IpnsEntry_ValidityType(value) return nil } + func (IpnsEntry_ValidityType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ipns_02f6be73595bcc54, []int{0, 0} + return fileDescriptor_4d5b16fb32bfe8ea, []int{0, 0} } type IpnsEntry struct { @@ -77,7 +81,7 @@ func (m *IpnsEntry) Reset() { *m = IpnsEntry{} } func (m *IpnsEntry) String() string { return proto.CompactTextString(m) } func (*IpnsEntry) ProtoMessage() {} func (*IpnsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_ipns_02f6be73595bcc54, []int{0} + return fileDescriptor_4d5b16fb32bfe8ea, []int{0} } func (m *IpnsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -94,8 +98,8 @@ func (m *IpnsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *IpnsEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_IpnsEntry.Merge(dst, src) +func (m *IpnsEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_IpnsEntry.Merge(m, src) } func (m *IpnsEntry) XXX_Size() int { return m.Size() @@ -156,9 +160,30 @@ func (m *IpnsEntry) GetPubKey() []byte { } func init() { - proto.RegisterType((*IpnsEntry)(nil), "ipns.pb.IpnsEntry") proto.RegisterEnum("ipns.pb.IpnsEntry_ValidityType", IpnsEntry_ValidityType_name, IpnsEntry_ValidityType_value) + proto.RegisterType((*IpnsEntry)(nil), "ipns.pb.IpnsEntry") +} + +func init() { proto.RegisterFile("ipns.proto", fileDescriptor_4d5b16fb32bfe8ea) } + +var fileDescriptor_4d5b16fb32bfe8ea = []byte{ + // 221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0x2c, 0xc8, 0x2b, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0xb0, 0x93, 0x94, 0xfe, 0x33, 0x72, 0x71, + 0x7a, 0x16, 0xe4, 0x15, 0xbb, 0xe6, 0x95, 0x14, 0x55, 0x0a, 0x89, 0x70, 0xb1, 0x96, 0x25, 0xe6, + 0x94, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x04, 0x41, 0x38, 0x42, 0x32, 0x5c, 0x9c, 0xc5, + 0x99, 0xe9, 0x79, 0x89, 0x25, 0xa5, 0x45, 0xa9, 0x12, 0x4c, 0x60, 0x19, 0x84, 0x80, 0x90, 0x33, + 0x17, 0x4f, 0x59, 0x62, 0x4e, 0x66, 0x4a, 0x66, 0x49, 0x65, 0x48, 0x65, 0x41, 0xaa, 0x04, 0xb3, + 0x02, 0xa3, 0x06, 0x9f, 0x91, 0xbc, 0x1e, 0xd4, 0x06, 0x3d, 0xb8, 0xe9, 0x7a, 0x61, 0x48, 0xca, + 0x82, 0x50, 0x34, 0x09, 0x49, 0x71, 0x71, 0xc0, 0xf8, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, + 0x70, 0x3e, 0x48, 0xae, 0x38, 0xb5, 0xb0, 0x34, 0x35, 0x2f, 0x39, 0x55, 0x82, 0x55, 0x81, 0x51, + 0x83, 0x25, 0x08, 0xce, 0x17, 0x12, 0xe0, 0x62, 0x2e, 0x29, 0xc9, 0x91, 0x60, 0x03, 0x0b, 0x83, + 0x98, 0x42, 0x62, 0x5c, 0x6c, 0x05, 0xa5, 0x49, 0xde, 0xa9, 0x95, 0x12, 0xec, 0x60, 0x73, 0xa0, + 0x3c, 0x25, 0x71, 0x2e, 0x1e, 0x64, 0xfb, 0x85, 0xd8, 0xb9, 0x98, 0x5d, 0xfd, 0x7d, 0x04, 0x18, + 0x9c, 0x78, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0x46, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x35, 0xc7, 0xf2, 0x25, 0x01, 0x00, 0x00, } + func (m *IpnsEntry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -233,6 +258,9 @@ func encodeVarintIpns(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *IpnsEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -295,7 +323,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -323,7 +351,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -332,6 +360,9 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIpns } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIpns + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -355,7 +386,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -364,6 +395,9 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIpns } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIpns + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -387,7 +421,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (IpnsEntry_ValidityType(b) & 0x7F) << shift + v |= IpnsEntry_ValidityType(b&0x7F) << shift if b < 0x80 { break } @@ -407,7 +441,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -416,6 +450,9 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIpns } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIpns + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -438,7 +475,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -458,7 +495,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -478,7 +515,7 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -487,6 +524,9 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIpns } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIpns + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -504,6 +544,9 @@ func (m *IpnsEntry) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthIpns } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthIpns + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -577,10 +620,13 @@ func skipIpns(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthIpns } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthIpns + } return iNdEx, nil case 3: for { @@ -609,6 +655,9 @@ func skipIpns(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthIpns + } } return iNdEx, nil case 4: @@ -627,23 +676,3 @@ var ( ErrInvalidLengthIpns = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIpns = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("ipns.proto", fileDescriptor_ipns_02f6be73595bcc54) } - -var fileDescriptor_ipns_02f6be73595bcc54 = []byte{ - // 221 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0x2c, 0xc8, 0x2b, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0xb0, 0x93, 0x94, 0xfe, 0x33, 0x72, 0x71, - 0x7a, 0x16, 0xe4, 0x15, 0xbb, 0xe6, 0x95, 0x14, 0x55, 0x0a, 0x89, 0x70, 0xb1, 0x96, 0x25, 0xe6, - 0x94, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x04, 0x41, 0x38, 0x42, 0x32, 0x5c, 0x9c, 0xc5, - 0x99, 0xe9, 0x79, 0x89, 0x25, 0xa5, 0x45, 0xa9, 0x12, 0x4c, 0x60, 0x19, 0x84, 0x80, 0x90, 0x33, - 0x17, 0x4f, 0x59, 0x62, 0x4e, 0x66, 0x4a, 0x66, 0x49, 0x65, 0x48, 0x65, 0x41, 0xaa, 0x04, 0xb3, - 0x02, 0xa3, 0x06, 0x9f, 0x91, 0xbc, 0x1e, 0xd4, 0x06, 0x3d, 0xb8, 0xe9, 0x7a, 0x61, 0x48, 0xca, - 0x82, 0x50, 0x34, 0x09, 0x49, 0x71, 0x71, 0xc0, 0xf8, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, - 0x70, 0x3e, 0x48, 0xae, 0x38, 0xb5, 0xb0, 0x34, 0x35, 0x2f, 0x39, 0x55, 0x82, 0x55, 0x81, 0x51, - 0x83, 0x25, 0x08, 0xce, 0x17, 0x12, 0xe0, 0x62, 0x2e, 0x29, 0xc9, 0x91, 0x60, 0x03, 0x0b, 0x83, - 0x98, 0x42, 0x62, 0x5c, 0x6c, 0x05, 0xa5, 0x49, 0xde, 0xa9, 0x95, 0x12, 0xec, 0x60, 0x73, 0xa0, - 0x3c, 0x25, 0x71, 0x2e, 0x1e, 0x64, 0xfb, 0x85, 0xd8, 0xb9, 0x98, 0x5d, 0xfd, 0x7d, 0x04, 0x18, - 0x9c, 0x78, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0x46, 0x40, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x35, 0xc7, 0xf2, 0x25, 0x01, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/ipns.proto b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/ipns.proto similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/ipns.proto rename to vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb/ipns.proto diff --git a/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/record.go b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/record.go new file mode 100644 index 0000000000..2627f0c4d6 --- /dev/null +++ b/vendor/gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/record.go @@ -0,0 +1,126 @@ +package ipns + +import ( + "bytes" + "errors" + + pb "gx/ipfs/QmUwMnKKjH3JwGKNVZ3TcP37W93xzqNA4ECFFiMo6sXkkc/go-ipns/pb" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +var log = logging.Logger("ipns") + +var _ record.Validator = Validator{} + +// RecordKey returns the libp2p record key for a given peer ID. +func RecordKey(pid peer.ID) string { + return "/ipns/" + string(pid) +} + +// Validator is an IPNS record validator that satisfies the libp2p record +// validator interface. +type Validator struct { + // KeyBook, if non-nil, will be used to lookup keys for validating IPNS + // records. + KeyBook pstore.KeyBook +} + +// Validate validates an IPNS record. +func (v Validator) Validate(key string, value []byte) error { + ns, pidString, err := record.SplitKey(key) + if err != nil || ns != "ipns" { + return ErrInvalidPath + } + + // Parse the value into an IpnsEntry + entry := new(pb.IpnsEntry) + err = proto.Unmarshal(value, entry) + if err != nil { + return ErrBadRecord + } + + // Get the public key defined by the ipns path + pid, err := peer.IDFromString(pidString) + if err != nil { + log.Debugf("failed to parse ipns record key %s into peer ID", pidString) + return ErrKeyFormat + } + + pubk, err := v.getPublicKey(pid, entry) + if err != nil { + return err + } + + return Validate(pubk, entry) +} + +func (v Validator) getPublicKey(pid peer.ID, entry *pb.IpnsEntry) (ic.PubKey, error) { + switch pk, err := ExtractPublicKey(pid, entry); err { + case peer.ErrNoPublicKey: + case nil: + return pk, nil + default: + return nil, err + } + + if v.KeyBook == nil { + log.Debugf("public key with hash %s not found in IPNS record and no peer store provided", pid) + return nil, ErrPublicKeyNotFound + } + + pubk := v.KeyBook.PubKey(pid) + if pubk == nil { + log.Debugf("public key with hash %s not found in peer store", pid) + return nil, ErrPublicKeyNotFound + } + return pubk, nil +} + +// Select selects the best record by checking which has the highest sequence +// number and latest EOL. +// +// This function returns an error if any of the records fail to parse. Validate +// your records first! +func (v Validator) Select(k string, vals [][]byte) (int, error) { + var recs []*pb.IpnsEntry + for _, v := range vals { + e := new(pb.IpnsEntry) + if err := proto.Unmarshal(v, e); err != nil { + return -1, err + } + recs = append(recs, e) + } + + return selectRecord(recs, vals) +} + +func selectRecord(recs []*pb.IpnsEntry, vals [][]byte) (int, error) { + switch len(recs) { + case 0: + return -1, errors.New("no usable records in given set") + case 1: + return 0, nil + } + + var i int + for j := 1; j < len(recs); j++ { + cmp, err := Compare(recs[i], recs[j]) + if err != nil { + return -1, err + } + if cmp == 0 { + cmp = bytes.Compare(vals[i], vals[j]) + } + if cmp < 0 { + i = j + } + } + + return i, nil +} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/README.md b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/README.md deleted file mode 100644 index d8247a5b6e..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# go-mfs - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/ipfs/go-mfs?status.svg)](https://godoc.org/github.com/ipfs/go-mfs) -[![Build Status](https://travis-ci.org/ipfs/go-mfs.svg?branch=master)](https://travis-ci.org/ipfs/go-mfs) - -> go-mfs implements an in-memory model of a mutable IPFS filesystem. - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contribute](#contribute) -- [License](#license) - -## Install - -`go-mfs` works like a regular Go module: - -``` -> go get github.com/ipfs/go-mfs -``` - -It uses [Gx](https://github.com/whyrusleeping/gx) to manage dependencies. You can use `make all` to build it with the `gx` dependencies. - -## Usage - -``` -import "github.com/ipfs/go-mfs" -``` - -Check the [GoDoc documentation](https://godoc.org/github.com/ipfs/go-mfs) - -## Contribute - -PRs accepted. - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -MIT © Protocol Labs, Inc. diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/dir.go b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/dir.go deleted file mode 100644 index 5a92613795..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/dir.go +++ /dev/null @@ -1,461 +0,0 @@ -package mfs - -import ( - "context" - "errors" - "fmt" - "os" - "path" - "sync" - "time" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -var ErrNotYetImplemented = errors.New("not yet implemented") -var ErrInvalidChild = errors.New("invalid child node") -var ErrDirExists = errors.New("directory already has entry by that name") - -type Directory struct { - dserv ipld.DAGService - parent childCloser - - childDirs map[string]*Directory - files map[string]*File - - lock sync.Mutex - ctx context.Context - - // UnixFS directory implementation used for creating, - // reading and editing directories. - unixfsDir uio.Directory - - modTime time.Time - - name string -} - -// NewDirectory constructs a new MFS directory. -// -// You probably don't want to call this directly. Instead, construct a new root -// using NewRoot. -func NewDirectory(ctx context.Context, name string, node ipld.Node, parent childCloser, dserv ipld.DAGService) (*Directory, error) { - db, err := uio.NewDirectoryFromNode(dserv, node) - if err != nil { - return nil, err - } - - return &Directory{ - dserv: dserv, - ctx: ctx, - name: name, - unixfsDir: db, - parent: parent, - childDirs: make(map[string]*Directory), - files: make(map[string]*File), - modTime: time.Now(), - }, nil -} - -// GetCidBuilder gets the CID builder of the root node -func (d *Directory) GetCidBuilder() cid.Builder { - return d.unixfsDir.GetCidBuilder() -} - -// SetCidBuilder sets the CID builder -func (d *Directory) SetCidBuilder(b cid.Builder) { - d.unixfsDir.SetCidBuilder(b) -} - -// closeChild updates the child by the given name to the dag node 'nd' -// and changes its own dag node -func (d *Directory) closeChild(name string, nd ipld.Node, sync bool) error { - mynd, err := d.closeChildUpdate(name, nd, sync) - if err != nil { - return err - } - - if sync { - return d.parent.closeChild(d.name, mynd, true) - } - return nil -} - -// closeChildUpdate is the portion of closeChild that needs to be locked around -func (d *Directory) closeChildUpdate(name string, nd ipld.Node, sync bool) (*dag.ProtoNode, error) { - d.lock.Lock() - defer d.lock.Unlock() - - err := d.updateChild(name, nd) - if err != nil { - return nil, err - } - - if sync { - return d.flushCurrentNode() - } - return nil, nil -} - -func (d *Directory) flushCurrentNode() (*dag.ProtoNode, error) { - nd, err := d.unixfsDir.GetNode() - if err != nil { - return nil, err - } - - err = d.dserv.Add(d.ctx, nd) - if err != nil { - return nil, err - } - - pbnd, ok := nd.(*dag.ProtoNode) - if !ok { - return nil, dag.ErrNotProtobuf - } - - return pbnd.Copy().(*dag.ProtoNode), nil -} - -func (d *Directory) updateChild(name string, nd ipld.Node) error { - err := d.AddUnixFSChild(name, nd) - if err != nil { - return err - } - - d.modTime = time.Now() - - return nil -} - -func (d *Directory) Type() NodeType { - return TDir -} - -// childNode returns a FSNode under this directory by the given name if it exists. -// it does *not* check the cached dirs and files -func (d *Directory) childNode(name string) (FSNode, error) { - nd, err := d.childFromDag(name) - if err != nil { - return nil, err - } - - return d.cacheNode(name, nd) -} - -// cacheNode caches a node into d.childDirs or d.files and returns the FSNode. -func (d *Directory) cacheNode(name string, nd ipld.Node) (FSNode, error) { - switch nd := nd.(type) { - case *dag.ProtoNode: - fsn, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return nil, err - } - - switch fsn.Type() { - case ft.TDirectory, ft.THAMTShard: - ndir, err := NewDirectory(d.ctx, name, nd, d, d.dserv) - if err != nil { - return nil, err - } - - d.childDirs[name] = ndir - return ndir, nil - case ft.TFile, ft.TRaw, ft.TSymlink: - nfi, err := NewFile(name, nd, d, d.dserv) - if err != nil { - return nil, err - } - d.files[name] = nfi - return nfi, nil - case ft.TMetadata: - return nil, ErrNotYetImplemented - default: - return nil, ErrInvalidChild - } - case *dag.RawNode: - nfi, err := NewFile(name, nd, d, d.dserv) - if err != nil { - return nil, err - } - d.files[name] = nfi - return nfi, nil - default: - return nil, fmt.Errorf("unrecognized node type in cache node") - } -} - -// Child returns the child of this directory by the given name -func (d *Directory) Child(name string) (FSNode, error) { - d.lock.Lock() - defer d.lock.Unlock() - return d.childUnsync(name) -} - -func (d *Directory) Uncache(name string) { - d.lock.Lock() - defer d.lock.Unlock() - delete(d.files, name) - delete(d.childDirs, name) -} - -// childFromDag searches through this directories dag node for a child link -// with the given name -func (d *Directory) childFromDag(name string) (ipld.Node, error) { - return d.unixfsDir.Find(d.ctx, name) -} - -// childUnsync returns the child under this directory by the given name -// without locking, useful for operations which already hold a lock -func (d *Directory) childUnsync(name string) (FSNode, error) { - cdir, ok := d.childDirs[name] - if ok { - return cdir, nil - } - - cfile, ok := d.files[name] - if ok { - return cfile, nil - } - - return d.childNode(name) -} - -type NodeListing struct { - Name string - Type int - Size int64 - Hash string -} - -func (d *Directory) ListNames(ctx context.Context) ([]string, error) { - d.lock.Lock() - defer d.lock.Unlock() - - var out []string - err := d.unixfsDir.ForEachLink(ctx, func(l *ipld.Link) error { - out = append(out, l.Name) - return nil - }) - if err != nil { - return nil, err - } - - return out, nil -} - -func (d *Directory) List(ctx context.Context) ([]NodeListing, error) { - var out []NodeListing - err := d.ForEachEntry(ctx, func(nl NodeListing) error { - out = append(out, nl) - return nil - }) - return out, err -} - -func (d *Directory) ForEachEntry(ctx context.Context, f func(NodeListing) error) error { - d.lock.Lock() - defer d.lock.Unlock() - return d.unixfsDir.ForEachLink(ctx, func(l *ipld.Link) error { - c, err := d.childUnsync(l.Name) - if err != nil { - return err - } - - nd, err := c.GetNode() - if err != nil { - return err - } - - child := NodeListing{ - Name: l.Name, - Type: int(c.Type()), - Hash: nd.Cid().String(), - } - - if c, ok := c.(*File); ok { - size, err := c.Size() - if err != nil { - return err - } - child.Size = size - } - - return f(child) - }) -} - -func (d *Directory) Mkdir(name string) (*Directory, error) { - d.lock.Lock() - defer d.lock.Unlock() - - fsn, err := d.childUnsync(name) - if err == nil { - switch fsn := fsn.(type) { - case *Directory: - return fsn, os.ErrExist - case *File: - return nil, os.ErrExist - default: - return nil, fmt.Errorf("unrecognized type: %#v", fsn) - } - } - - ndir := ft.EmptyDirNode() - ndir.SetCidBuilder(d.GetCidBuilder()) - - err = d.dserv.Add(d.ctx, ndir) - if err != nil { - return nil, err - } - - err = d.AddUnixFSChild(name, ndir) - if err != nil { - return nil, err - } - - dirobj, err := NewDirectory(d.ctx, name, ndir, d, d.dserv) - if err != nil { - return nil, err - } - - d.childDirs[name] = dirobj - return dirobj, nil -} - -func (d *Directory) Unlink(name string) error { - d.lock.Lock() - defer d.lock.Unlock() - - delete(d.childDirs, name) - delete(d.files, name) - - return d.unixfsDir.RemoveChild(d.ctx, name) -} - -func (d *Directory) Flush() error { - nd, err := d.GetNode() - if err != nil { - return err - } - - return d.parent.closeChild(d.name, nd, true) -} - -// AddChild adds the node 'nd' under this directory giving it the name 'name' -func (d *Directory) AddChild(name string, nd ipld.Node) error { - d.lock.Lock() - defer d.lock.Unlock() - - _, err := d.childUnsync(name) - if err == nil { - return ErrDirExists - } - - err = d.dserv.Add(d.ctx, nd) - if err != nil { - return err - } - - err = d.AddUnixFSChild(name, nd) - if err != nil { - return err - } - - d.modTime = time.Now() - return nil -} - -// AddUnixFSChild adds a child to the inner UnixFS directory -// and transitions to a HAMT implementation if needed. -func (d *Directory) AddUnixFSChild(name string, node ipld.Node) error { - if uio.UseHAMTSharding { - // If the directory HAMT implementation is being used and this - // directory is actually a basic implementation switch it to HAMT. - if basicDir, ok := d.unixfsDir.(*uio.BasicDirectory); ok { - hamtDir, err := basicDir.SwitchToSharding(d.ctx) - if err != nil { - return err - } - d.unixfsDir = hamtDir - } - } - - err := d.unixfsDir.AddChild(d.ctx, name, node) - if err != nil { - return err - } - - return nil -} - -func (d *Directory) sync() error { - for name, dir := range d.childDirs { - nd, err := dir.GetNode() - if err != nil { - return err - } - - err = d.updateChild(name, nd) - if err != nil { - return err - } - } - - for name, file := range d.files { - nd, err := file.GetNode() - if err != nil { - return err - } - - err = d.updateChild(name, nd) - if err != nil { - return err - } - } - - return nil -} - -func (d *Directory) Path() string { - cur := d - var out string - for cur != nil { - switch parent := cur.parent.(type) { - case *Directory: - out = path.Join(cur.name, out) - cur = parent - case *Root: - return "/" + out - default: - panic("directory parent neither a directory nor a root") - } - } - return out -} - -func (d *Directory) GetNode() (ipld.Node, error) { - d.lock.Lock() - defer d.lock.Unlock() - - err := d.sync() - if err != nil { - return nil, err - } - - nd, err := d.unixfsDir.GetNode() - if err != nil { - return nil, err - } - - err = d.dserv.Add(d.ctx, nd) - if err != nil { - return nil, err - } - - return nd.Copy(), err -} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/fd.go b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/fd.go deleted file mode 100644 index 246b8cf2a4..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/fd.go +++ /dev/null @@ -1,151 +0,0 @@ -package mfs - -import ( - "fmt" - "io" - - mod "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod" - - context "context" -) - -type FileDescriptor interface { - io.Reader - CtxReadFull(context.Context, []byte) (int, error) - - io.Writer - io.WriterAt - - io.Closer - io.Seeker - - Truncate(int64) error - Size() (int64, error) - Sync() error - Flush() error -} - -type fileDescriptor struct { - inode *File - mod *mod.DagModifier - perms int - sync bool - hasChanges bool - - closed bool -} - -// Size returns the size of the file referred to by this descriptor -func (fi *fileDescriptor) Size() (int64, error) { - return fi.mod.Size() -} - -// Truncate truncates the file to size -func (fi *fileDescriptor) Truncate(size int64) error { - if fi.perms == OpenReadOnly { - return fmt.Errorf("cannot call truncate on readonly file descriptor") - } - fi.hasChanges = true - return fi.mod.Truncate(size) -} - -// Write writes the given data to the file at its current offset -func (fi *fileDescriptor) Write(b []byte) (int, error) { - if fi.perms == OpenReadOnly { - return 0, fmt.Errorf("cannot write on not writeable descriptor") - } - fi.hasChanges = true - return fi.mod.Write(b) -} - -// Read reads into the given buffer from the current offset -func (fi *fileDescriptor) Read(b []byte) (int, error) { - if fi.perms == OpenWriteOnly { - return 0, fmt.Errorf("cannot read on write-only descriptor") - } - return fi.mod.Read(b) -} - -// Read reads into the given buffer from the current offset -func (fi *fileDescriptor) CtxReadFull(ctx context.Context, b []byte) (int, error) { - if fi.perms == OpenWriteOnly { - return 0, fmt.Errorf("cannot read on write-only descriptor") - } - return fi.mod.CtxReadFull(ctx, b) -} - -// Close flushes, then propogates the modified dag node up the directory structure -// and signals a republish to occur -func (fi *fileDescriptor) Close() error { - defer func() { - switch fi.perms { - case OpenReadOnly: - fi.inode.desclock.RUnlock() - case OpenWriteOnly, OpenReadWrite: - fi.inode.desclock.Unlock() - } - }() - - if fi.closed { - panic("attempted to close file descriptor twice!") - } - - if fi.hasChanges { - err := fi.mod.Sync() - if err != nil { - return err - } - - fi.hasChanges = false - - // explicitly stay locked for flushUp call, - // it will manage the lock for us - return fi.flushUp(fi.sync) - } - - return nil -} - -func (fi *fileDescriptor) Sync() error { - return fi.flushUp(false) -} - -func (fi *fileDescriptor) Flush() error { - return fi.flushUp(true) -} - -// flushUp syncs the file and adds it to the dagservice -// it *must* be called with the File's lock taken -func (fi *fileDescriptor) flushUp(fullsync bool) error { - nd, err := fi.mod.GetNode() - if err != nil { - return err - } - - err = fi.inode.dserv.Add(context.TODO(), nd) - if err != nil { - return err - } - - fi.inode.nodelk.Lock() - fi.inode.node = nd - name := fi.inode.name - parent := fi.inode.parent - fi.inode.nodelk.Unlock() - - return parent.closeChild(name, nd, fullsync) -} - -// Seek implements io.Seeker -func (fi *fileDescriptor) Seek(offset int64, whence int) (int64, error) { - return fi.mod.Seek(offset, whence) -} - -// Write At writes the given bytes at the offset 'at' -func (fi *fileDescriptor) WriteAt(b []byte, at int64) (int, error) { - if fi.perms == OpenReadOnly { - return 0, fmt.Errorf("cannot write on not writeable descriptor") - } - fi.hasChanges = true - return fi.mod.WriteAt(b, at) -} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/file.go b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/file.go deleted file mode 100644 index afa20d9e87..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/file.go +++ /dev/null @@ -1,146 +0,0 @@ -package mfs - -import ( - "context" - "fmt" - "sync" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - mod "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" -) - -type File struct { - parent childCloser - - name string - - desclock sync.RWMutex - - dserv ipld.DAGService - node ipld.Node - nodelk sync.Mutex - - RawLeaves bool -} - -// NewFile returns a NewFile object with the given parameters. If the -// Cid version is non-zero RawLeaves will be enabled. -func NewFile(name string, node ipld.Node, parent childCloser, dserv ipld.DAGService) (*File, error) { - fi := &File{ - dserv: dserv, - parent: parent, - name: name, - node: node, - } - if node.Cid().Prefix().Version > 0 { - fi.RawLeaves = true - } - return fi, nil -} - -const ( - OpenReadOnly = iota - OpenWriteOnly - OpenReadWrite -) - -func (fi *File) Open(flags int, sync bool) (FileDescriptor, error) { - fi.nodelk.Lock() - node := fi.node - fi.nodelk.Unlock() - - switch node := node.(type) { - case *dag.ProtoNode: - fsn, err := ft.FSNodeFromBytes(node.Data()) - if err != nil { - return nil, err - } - - switch fsn.Type() { - default: - return nil, fmt.Errorf("unsupported fsnode type for 'file'") - case ft.TSymlink: - return nil, fmt.Errorf("symlinks not yet supported") - case ft.TFile, ft.TRaw: - // OK case - } - case *dag.RawNode: - // Ok as well. - } - - switch flags { - case OpenReadOnly: - fi.desclock.RLock() - case OpenWriteOnly, OpenReadWrite: - fi.desclock.Lock() - default: - // TODO: support other modes - return nil, fmt.Errorf("mode not supported") - } - - dmod, err := mod.NewDagModifier(context.TODO(), node, fi.dserv, chunker.DefaultSplitter) - if err != nil { - return nil, err - } - dmod.RawLeaves = fi.RawLeaves - - return &fileDescriptor{ - inode: fi, - perms: flags, - sync: sync, - mod: dmod, - }, nil -} - -// Size returns the size of this file -func (fi *File) Size() (int64, error) { - fi.nodelk.Lock() - defer fi.nodelk.Unlock() - switch nd := fi.node.(type) { - case *dag.ProtoNode: - fsn, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return 0, err - } - return int64(fsn.FileSize()), nil - case *dag.RawNode: - return int64(len(nd.RawData())), nil - default: - return 0, fmt.Errorf("unrecognized node type in mfs/file.Size()") - } -} - -// GetNode returns the dag node associated with this file -func (fi *File) GetNode() (ipld.Node, error) { - fi.nodelk.Lock() - defer fi.nodelk.Unlock() - return fi.node, nil -} - -func (fi *File) Flush() error { - // open the file in fullsync mode - fd, err := fi.Open(OpenWriteOnly, true) - if err != nil { - return err - } - - defer fd.Close() - - return fd.Flush() -} - -func (fi *File) Sync() error { - // just being able to take the writelock means the descriptor is synced - fi.desclock.Lock() - fi.desclock.Unlock() - return nil -} - -// Type returns the type FSNode this is -func (fi *File) Type() NodeType { - return TFile -} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/package.json b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/package.json deleted file mode 100644 index 3cdad6c769..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-mfs" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-mfs" - }, - "gxDependencies": [ - { - "author": "why", - "hash": "QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc", - "name": "go-merkledag", - "version": "1.1.15" - }, - { - "author": "why", - "hash": "QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8", - "name": "go-unixfs", - "version": "1.1.16" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - }, - { - "author": "why", - "hash": "QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3", - "name": "go-path", - "version": "1.1.16" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-mfs", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.18" -} - diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/system.go b/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/system.go deleted file mode 100644 index c4c039edd7..0000000000 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/system.go +++ /dev/null @@ -1,302 +0,0 @@ -// package mfs implements an in memory model of a mutable IPFS filesystem. -// -// It consists of four main structs: -// 1) The Filesystem -// The filesystem serves as a container and entry point for various mfs filesystems -// 2) Root -// Root represents an individual filesystem mounted within the mfs system as a whole -// 3) Directories -// 4) Files -package mfs - -import ( - "context" - "errors" - "fmt" - "sync" - "time" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var ErrNotExist = errors.New("no such rootfs") - -var log = logging.Logger("mfs") - -var ErrIsDirectory = errors.New("error: is a directory") - -type childCloser interface { - closeChild(string, ipld.Node, bool) error -} - -type NodeType int - -const ( - TFile NodeType = iota - TDir -) - -// FSNode represents any node (directory, root, or file) in the mfs filesystem. -type FSNode interface { - GetNode() (ipld.Node, error) - Flush() error - Type() NodeType -} - -// IsDir checks whether the FSNode is dir type -func IsDir(fsn FSNode) bool { - return fsn.Type() == TDir -} - -// IsFile checks whether the FSNode is file type -func IsFile(fsn FSNode) bool { - return fsn.Type() == TFile -} - -// Root represents the root of a filesystem tree. -type Root struct { - - // Root directory of the MFS layout. - dir *Directory - - repub *Republisher -} - -// PubFunc is the function used by the `publish()` method. -type PubFunc func(context.Context, cid.Cid) error - -// NewRoot creates a new Root and starts up a republisher routine for it. -func NewRoot(parent context.Context, ds ipld.DAGService, node *dag.ProtoNode, pf PubFunc) (*Root, error) { - - var repub *Republisher - if pf != nil { - repub = NewRepublisher(parent, pf, time.Millisecond*300, time.Second*3) - repub.setVal(node.Cid()) - go repub.Run() - } - - root := &Root{ - repub: repub, - } - - fsn, err := ft.FSNodeFromBytes(node.Data()) - if err != nil { - log.Error("IPNS pointer was not unixfs node") - return nil, err - } - - switch fsn.Type() { - case ft.TDirectory, ft.THAMTShard: - newDir, err := NewDirectory(parent, node.String(), node, root, ds) - if err != nil { - return nil, err - } - - root.dir = newDir - case ft.TFile, ft.TMetadata, ft.TRaw: - return nil, fmt.Errorf("root can't be a file (unixfs type: %s)", fsn.Type()) - default: - return nil, fmt.Errorf("unrecognized unixfs type: %s", fsn.Type()) - } - return root, nil -} - -// GetDirectory returns the root directory. -func (kr *Root) GetDirectory() *Directory { - return kr.dir -} - -// Flush signals that an update has occurred since the last publish, -// and updates the Root republisher. -func (kr *Root) Flush() error { - nd, err := kr.GetDirectory().GetNode() - if err != nil { - return err - } - - if kr.repub != nil { - kr.repub.Update(nd.Cid()) - } - return nil -} - -// FlushMemFree flushes the root directory and then uncaches all of its links. -// This has the effect of clearing out potentially stale references and allows -// them to be garbage collected. -// CAUTION: Take care not to ever call this while holding a reference to any -// child directories. Those directories will be bad references and using them -// may have unintended racy side effects. -// A better implemented mfs system (one that does smarter internal caching and -// refcounting) shouldnt need this method. -func (kr *Root) FlushMemFree(ctx context.Context) error { - dir := kr.GetDirectory() - - if err := dir.Flush(); err != nil { - return err - } - - dir.lock.Lock() - defer dir.lock.Unlock() - for name := range dir.files { - delete(dir.files, name) - } - for name := range dir.childDirs { - delete(dir.childDirs, name) - } - - return nil -} - -// closeChild implements the childCloser interface, and signals to the publisher that -// there are changes ready to be published. -func (kr *Root) closeChild(name string, nd ipld.Node, sync bool) error { - err := kr.GetDirectory().dserv.Add(context.TODO(), nd) - if err != nil { - return err - } - - if kr.repub != nil { - kr.repub.Update(nd.Cid()) - } - return nil -} - -func (kr *Root) Close() error { - nd, err := kr.GetDirectory().GetNode() - if err != nil { - return err - } - - if kr.repub != nil { - kr.repub.Update(nd.Cid()) - return kr.repub.Close() - } - - return nil -} - -// Republisher manages when to publish a given entry. -type Republisher struct { - TimeoutLong time.Duration - TimeoutShort time.Duration - Publish chan struct{} - pubfunc PubFunc - pubnowch chan chan struct{} - - ctx context.Context - cancel func() - - lk sync.Mutex - val cid.Cid - lastpub cid.Cid -} - -// NewRepublisher creates a new Republisher object to republish the given root -// using the given short and long time intervals. -func NewRepublisher(ctx context.Context, pf PubFunc, tshort, tlong time.Duration) *Republisher { - ctx, cancel := context.WithCancel(ctx) - return &Republisher{ - TimeoutShort: tshort, - TimeoutLong: tlong, - Publish: make(chan struct{}, 1), - pubfunc: pf, - pubnowch: make(chan chan struct{}), - ctx: ctx, - cancel: cancel, - } -} - -func (p *Republisher) setVal(c cid.Cid) { - p.lk.Lock() - defer p.lk.Unlock() - p.val = c -} - -// WaitPub Returns immediately if `lastpub` value is consistent with the -// current value `val`, else will block until `val` has been published. -func (p *Republisher) WaitPub() { - p.lk.Lock() - consistent := p.lastpub == p.val - p.lk.Unlock() - if consistent { - return - } - - wait := make(chan struct{}) - p.pubnowch <- wait - <-wait -} - -func (p *Republisher) Close() error { - err := p.publish(p.ctx) - p.cancel() - return err -} - -// Touch signals that an update has occurred since the last publish. -// Multiple consecutive touches may extend the time period before -// the next Publish occurs in order to more efficiently batch updates. -func (np *Republisher) Update(c cid.Cid) { - np.setVal(c) - select { - case np.Publish <- struct{}{}: - default: - } -} - -// Run is the main republisher loop. -func (np *Republisher) Run() { - for { - select { - case <-np.Publish: - quick := time.After(np.TimeoutShort) - longer := time.After(np.TimeoutLong) - - wait: - var pubnowresp chan struct{} - - select { - case <-np.ctx.Done(): - return - case <-np.Publish: - quick = time.After(np.TimeoutShort) - goto wait - case <-quick: - case <-longer: - case pubnowresp = <-np.pubnowch: - } - - err := np.publish(np.ctx) - if pubnowresp != nil { - pubnowresp <- struct{}{} - } - if err != nil { - log.Errorf("republishRoot error: %s", err) - } - - case <-np.ctx.Done(): - return - } - } -} - -// publish calls the `PubFunc`. -func (np *Republisher) publish(ctx context.Context) error { - np.lk.Lock() - topub := np.val - np.lk.Unlock() - - err := np.pubfunc(ctx, topub) - if err != nil { - return err - } - np.lk.Lock() - np.lastpub = topub - np.lk.Unlock() - return nil -} diff --git a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/LICENSE b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/LICENSE rename to vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/LICENSE diff --git a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/README.md b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/README.md similarity index 100% rename from vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/README.md rename to vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/README.md diff --git a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/bitfield.go b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/bitfield.go similarity index 88% rename from vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/bitfield.go rename to vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/bitfield.go index 0e14aa80e7..d6f12b06f9 100644 --- a/vendor/gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield/bitfield.go +++ b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/bitfield.go @@ -16,6 +16,17 @@ func NewBitfield(size int) Bitfield { return make([]byte, size/8) } +// FromBytes constructs a new bitfield from a serialized bitfield. +func FromBytes(size int, bits []byte) Bitfield { + bf := NewBitfield(size) + start := len(bf) - len(bits) + if start < 0 { + panic("bitfield too small") + } + copy(bf[start:], bits) + return bf +} + func (bf Bitfield) offset(i int) (uint, uint8) { return uint(len(bf)) - (uint(i) / 8) - 1, uint8(i) % 8 } @@ -65,7 +76,7 @@ func (bf Bitfield) UnsetBit(i int) { func (bf Bitfield) SetBytes(b []byte) { start := len(bf) - len(b) if start < 0 { - panic("Bitfield too small") + panic("bitfield too small") } for i := range bf[:start] { bf[i] = 0 diff --git a/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/package.json b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/package.json new file mode 100644 index 0000000000..a8045cb2ba --- /dev/null +++ b/vendor/gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield/package.json @@ -0,0 +1,16 @@ +{ + "author": "Stebalien", + "bugs": { + "url": "https://github.com/Stebalien/go-bitfield" + }, + "gx": { + "dvcsimport": "github.com/Stebalien/go-bitfield" + }, + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-bitfield", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.3" +} + diff --git a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/package.json b/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/package.json deleted file mode 100644 index 551790b697..0000000000 --- a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "stebalien", - "bugs": { - "url": "https://github.com/libp2p/go-conn-security" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-conn-security-multistream" - }, - "gxDependencies": [ - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-conn-security-multistream", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.15" -} - diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/AUTHORS b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/AUTHORS deleted file mode 100644 index 15167cd746..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTING.md b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTING.md deleted file mode 100644 index d0485e887a..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -Go is an open source project. - -It is the work of hundreds of contributors. We appreciate your help! - -## Filing issues - -When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: - -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? - -General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. -The gophers there will answer or ask you to file an issue if you've tripped over a bug. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTORS b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTORS deleted file mode 100644 index 1c4577e968..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/LICENSE b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/LICENSE deleted file mode 100644 index 6a66aea5ea..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/PATENTS b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/PATENTS deleted file mode 100644 index 733099041f..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/README.md b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/README.md deleted file mode 100644 index ef6c9e59c2..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# sys - -This repository holds supplemental Go packages for low-level interactions with -the operating system. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/sys`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the sys repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the -subject line, so it is easy to find. diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/codereview.cfg b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/codereview.cfg deleted file mode 100644 index 3f8b14b64e..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu/cpu_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu/cpu_test.go deleted file mode 100644 index 0e2d808dd4..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu/cpu_test.go +++ /dev/null @@ -1,28 +0,0 @@ -// 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 cpu_test - -import ( - "runtime" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu" -) - -func TestAMD64minimalFeatures(t *testing.T) { - if runtime.GOARCH == "amd64" { - if !cpu.X86.HasSSE2 { - t.Fatal("HasSSE2 expected true, got false") - } - } -} - -func TestAVX2hasAVX(t *testing.T) { - if runtime.GOARCH == "amd64" { - if cpu.X86.HasAVX2 && !cpu.X86.HasAVX { - t.Fatal("HasAVX expected true, got false") - } - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/package.json b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/package.json deleted file mode 100644 index 4c6075fb30..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "author": "The Go Authors", - "bugs": {}, - "gx": { - "dvcsimport": "golang.org/x/sys" - }, - "gxVersion": "0.11.0", - "language": "go", - "license": "BSD-3-Clause", - "name": "sys", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.0" -} - diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm.s deleted file mode 100644 index 06449ebfa9..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm.s +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2014 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. - -#include "textflag.h" - -TEXT ·use(SB),NOSPLIT,$0 - RET diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_386.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_386.s deleted file mode 100644 index bc5cab1f34..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_386.s +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 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. - -#include "textflag.h" - -// -// System call support for 386, Plan 9 -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-32 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-44 - JMP syscall·Syscall6(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - JMP syscall·RawSyscall6(SB) - -TEXT ·seek(SB),NOSPLIT,$0-36 - JMP syscall·seek(SB) - -TEXT ·exit(SB),NOSPLIT,$4-4 - JMP syscall·exit(SB) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_amd64.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_amd64.s deleted file mode 100644 index d3448e6750..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_amd64.s +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 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. - -#include "textflag.h" - -// -// System call support for amd64, Plan 9 -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-64 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-88 - JMP syscall·Syscall6(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) - -TEXT ·seek(SB),NOSPLIT,$0-56 - JMP syscall·seek(SB) - -TEXT ·exit(SB),NOSPLIT,$8-8 - JMP syscall·exit(SB) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_arm.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_arm.s deleted file mode 100644 index afb7c0a9b9..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/asm_plan9_arm.s +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2009 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. - -#include "textflag.h" - -// System call support for plan9 on arm - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-32 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-44 - JMP syscall·Syscall6(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - JMP syscall·RawSyscall6(SB) - -TEXT ·seek(SB),NOSPLIT,$0-36 - JMP syscall·exit(SB) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/const_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/const_plan9.go deleted file mode 100644 index b4e85a3a9d..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/const_plan9.go +++ /dev/null @@ -1,70 +0,0 @@ -package plan9 - -// Plan 9 Constants - -// Open modes -const ( - O_RDONLY = 0 - O_WRONLY = 1 - O_RDWR = 2 - O_TRUNC = 16 - O_CLOEXEC = 32 - O_EXCL = 0x1000 -) - -// Rfork flags -const ( - RFNAMEG = 1 << 0 - RFENVG = 1 << 1 - RFFDG = 1 << 2 - RFNOTEG = 1 << 3 - RFPROC = 1 << 4 - RFMEM = 1 << 5 - RFNOWAIT = 1 << 6 - RFCNAMEG = 1 << 10 - RFCENVG = 1 << 11 - RFCFDG = 1 << 12 - RFREND = 1 << 13 - RFNOMNT = 1 << 14 -) - -// Qid.Type bits -const ( - QTDIR = 0x80 - QTAPPEND = 0x40 - QTEXCL = 0x20 - QTMOUNT = 0x10 - QTAUTH = 0x08 - QTTMP = 0x04 - QTFILE = 0x00 -) - -// Dir.Mode bits -const ( - DMDIR = 0x80000000 - DMAPPEND = 0x40000000 - DMEXCL = 0x20000000 - DMMOUNT = 0x10000000 - DMAUTH = 0x08000000 - DMTMP = 0x04000000 - DMREAD = 0x4 - DMWRITE = 0x2 - DMEXEC = 0x1 -) - -const ( - STATMAX = 65535 - ERRMAX = 128 - STATFIXLEN = 49 -) - -// Mount and bind flags -const ( - MREPL = 0x0000 - MBEFORE = 0x0001 - MAFTER = 0x0002 - MORDER = 0x0003 - MCREATE = 0x0004 - MCACHE = 0x0010 - MMASK = 0x0017 -) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/dir_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/dir_plan9.go deleted file mode 100644 index 0955e0c53e..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/dir_plan9.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2012 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. - -// Plan 9 directory marshalling. See intro(5). - -package plan9 - -import "errors" - -var ( - ErrShortStat = errors.New("stat buffer too short") - ErrBadStat = errors.New("malformed stat buffer") - ErrBadName = errors.New("bad character in file name") -) - -// A Qid represents a 9P server's unique identification for a file. -type Qid struct { - Path uint64 // the file server's unique identification for the file - Vers uint32 // version number for given Path - Type uint8 // the type of the file (plan9.QTDIR for example) -} - -// A Dir contains the metadata for a file. -type Dir struct { - // system-modified data - Type uint16 // server type - Dev uint32 // server subtype - - // file data - Qid Qid // unique id from server - Mode uint32 // permissions - Atime uint32 // last read time - Mtime uint32 // last write time - Length int64 // file length - Name string // last element of path - Uid string // owner name - Gid string // group name - Muid string // last modifier name -} - -var nullDir = Dir{ - Type: ^uint16(0), - Dev: ^uint32(0), - Qid: Qid{ - Path: ^uint64(0), - Vers: ^uint32(0), - Type: ^uint8(0), - }, - Mode: ^uint32(0), - Atime: ^uint32(0), - Mtime: ^uint32(0), - Length: ^int64(0), -} - -// Null assigns special "don't touch" values to members of d to -// avoid modifying them during plan9.Wstat. -func (d *Dir) Null() { *d = nullDir } - -// Marshal encodes a 9P stat message corresponding to d into b -// -// If there isn't enough space in b for a stat message, ErrShortStat is returned. -func (d *Dir) Marshal(b []byte) (n int, err error) { - n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid) - if n > len(b) { - return n, ErrShortStat - } - - for _, c := range d.Name { - if c == '/' { - return n, ErrBadName - } - } - - b = pbit16(b, uint16(n)-2) - b = pbit16(b, d.Type) - b = pbit32(b, d.Dev) - b = pbit8(b, d.Qid.Type) - b = pbit32(b, d.Qid.Vers) - b = pbit64(b, d.Qid.Path) - b = pbit32(b, d.Mode) - b = pbit32(b, d.Atime) - b = pbit32(b, d.Mtime) - b = pbit64(b, uint64(d.Length)) - b = pstring(b, d.Name) - b = pstring(b, d.Uid) - b = pstring(b, d.Gid) - b = pstring(b, d.Muid) - - return n, nil -} - -// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir. -// -// If b is too small to hold a valid stat message, ErrShortStat is returned. -// -// If the stat message itself is invalid, ErrBadStat is returned. -func UnmarshalDir(b []byte) (*Dir, error) { - if len(b) < STATFIXLEN { - return nil, ErrShortStat - } - size, buf := gbit16(b) - if len(b) != int(size)+2 { - return nil, ErrBadStat - } - b = buf - - var d Dir - d.Type, b = gbit16(b) - d.Dev, b = gbit32(b) - d.Qid.Type, b = gbit8(b) - d.Qid.Vers, b = gbit32(b) - d.Qid.Path, b = gbit64(b) - d.Mode, b = gbit32(b) - d.Atime, b = gbit32(b) - d.Mtime, b = gbit32(b) - - n, b := gbit64(b) - d.Length = int64(n) - - var ok bool - if d.Name, b, ok = gstring(b); !ok { - return nil, ErrBadStat - } - if d.Uid, b, ok = gstring(b); !ok { - return nil, ErrBadStat - } - if d.Gid, b, ok = gstring(b); !ok { - return nil, ErrBadStat - } - if d.Muid, b, ok = gstring(b); !ok { - return nil, ErrBadStat - } - - return &d, nil -} - -// pbit8 copies the 8-bit number v to b and returns the remaining slice of b. -func pbit8(b []byte, v uint8) []byte { - b[0] = byte(v) - return b[1:] -} - -// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b. -func pbit16(b []byte, v uint16) []byte { - b[0] = byte(v) - b[1] = byte(v >> 8) - return b[2:] -} - -// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b. -func pbit32(b []byte, v uint32) []byte { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) - return b[4:] -} - -// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b. -func pbit64(b []byte, v uint64) []byte { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) - b[4] = byte(v >> 32) - b[5] = byte(v >> 40) - b[6] = byte(v >> 48) - b[7] = byte(v >> 56) - return b[8:] -} - -// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and -// returning the remaining slice of b.. -func pstring(b []byte, s string) []byte { - b = pbit16(b, uint16(len(s))) - n := copy(b, s) - return b[n:] -} - -// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b. -func gbit8(b []byte) (uint8, []byte) { - return uint8(b[0]), b[1:] -} - -// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b. -func gbit16(b []byte) (uint16, []byte) { - return uint16(b[0]) | uint16(b[1])<<8, b[2:] -} - -// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b. -func gbit32(b []byte) (uint32, []byte) { - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:] -} - -// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b. -func gbit64(b []byte) (uint64, []byte) { - lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 - hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24 - return uint64(lo) | uint64(hi)<<32, b[8:] -} - -// gstring reads a string from b, prefixed with a 16-bit length in little-endian order. -// It returns the string with the remaining slice of b and a boolean. If the length is -// greater than the number of bytes in b, the boolean will be false. -func gstring(b []byte) (string, []byte, bool) { - n, b := gbit16(b) - if int(n) > len(b) { - return "", b, false - } - return string(b[:n]), b[n:], true -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/env_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/env_plan9.go deleted file mode 100644 index 8f1918004f..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/env_plan9.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2011 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. - -// Plan 9 environment variables. - -package plan9 - -import ( - "syscall" -) - -func Getenv(key string) (value string, found bool) { - return syscall.Getenv(key) -} - -func Setenv(key, value string) error { - return syscall.Setenv(key, value) -} - -func Clearenv() { - syscall.Clearenv() -} - -func Environ() []string { - return syscall.Environ() -} - -func Unsetenv(key string) error { - return syscall.Unsetenv(key) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/errors_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/errors_plan9.go deleted file mode 100644 index 65fe74d3ef..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/errors_plan9.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2011 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 plan9 - -import "syscall" - -// Constants -const ( - // Invented values to support what package os expects. - O_CREAT = 0x02000 - O_APPEND = 0x00400 - O_NOCTTY = 0x00000 - O_NONBLOCK = 0x00000 - O_SYNC = 0x00000 - O_ASYNC = 0x00000 - - S_IFMT = 0x1f000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 -) - -// Errors -var ( - EINVAL = syscall.NewError("bad arg in system call") - ENOTDIR = syscall.NewError("not a directory") - EISDIR = syscall.NewError("file is a directory") - ENOENT = syscall.NewError("file does not exist") - EEXIST = syscall.NewError("file already exists") - EMFILE = syscall.NewError("no free file descriptors") - EIO = syscall.NewError("i/o error") - ENAMETOOLONG = syscall.NewError("file name too long") - EINTR = syscall.NewError("interrupted") - EPERM = syscall.NewError("permission denied") - EBUSY = syscall.NewError("no free devices") - ETIMEDOUT = syscall.NewError("connection timed out") - EPLAN9 = syscall.NewError("not supported by plan 9") - - // The following errors do not correspond to any - // Plan 9 system messages. Invented to support - // what package os and others expect. - EACCES = syscall.NewError("access permission denied") - EAFNOSUPPORT = syscall.NewError("address family not supported by protocol") -) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkall.sh b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkall.sh deleted file mode 100644 index 9f73c60660..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkall.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2009 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. - -# The plan9 package provides access to the raw system call -# interface of the underlying operating system. Porting Go to -# a new architecture/operating system combination requires -# some manual effort, though there are tools that automate -# much of the process. The auto-generated files have names -# beginning with z. -# -# This script runs or (given -n) prints suggested commands to generate z files -# for the current system. Running those commands is not automatic. -# This script is documentation more than anything else. -# -# * asm_${GOOS}_${GOARCH}.s -# -# This hand-written assembly file implements system call dispatch. -# There are three entry points: -# -# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); -# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); -# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); -# -# The first and second are the standard ones; they differ only in -# how many arguments can be passed to the kernel. -# The third is for low-level use by the ForkExec wrapper; -# unlike the first two, it does not call into the scheduler to -# let it know that a system call is running. -# -# * syscall_${GOOS}.go -# -# This hand-written Go file implements system calls that need -# special handling and lists "//sys" comments giving prototypes -# for ones that can be auto-generated. Mksyscall reads those -# comments to generate the stubs. -# -# * syscall_${GOOS}_${GOARCH}.go -# -# Same as syscall_${GOOS}.go except that it contains code specific -# to ${GOOS} on one particular architecture. -# -# * types_${GOOS}.c -# -# This hand-written C file includes standard C headers and then -# creates typedef or enum names beginning with a dollar sign -# (use of $ in variable names is a gcc extension). The hardest -# part about preparing this file is figuring out which headers to -# include and which symbols need to be #defined to get the -# actual data structures that pass through to the kernel system calls. -# Some C libraries present alternate versions for binary compatibility -# and translate them on the way in and out of system calls, but -# there is almost always a #define that can get the real ones. -# See types_darwin.c and types_linux.c for examples. -# -# * zerror_${GOOS}_${GOARCH}.go -# -# This machine-generated file defines the system's error numbers, -# error strings, and signal numbers. The generator is "mkerrors.sh". -# Usually no arguments are needed, but mkerrors.sh will pass its -# arguments on to godefs. -# -# * zsyscall_${GOOS}_${GOARCH}.go -# -# Generated by mksyscall.pl; see syscall_${GOOS}.go above. -# -# * zsysnum_${GOOS}_${GOARCH}.go -# -# Generated by mksysnum_${GOOS}. -# -# * ztypes_${GOOS}_${GOARCH}.go -# -# Generated by godefs; see types_${GOOS}.c above. - -GOOSARCH="${GOOS}_${GOARCH}" - -# defaults -mksyscall="./mksyscall.pl" -mkerrors="./mkerrors.sh" -zerrors="zerrors_$GOOSARCH.go" -mksysctl="" -zsysctl="zsysctl_$GOOSARCH.go" -mksysnum= -mktypes= -run="sh" - -case "$1" in --syscalls) - for i in zsyscall*go - do - sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i - rm _$i - done - exit 0 - ;; --n) - run="cat" - shift -esac - -case "$#" in -0) - ;; -*) - echo 'usage: mkall.sh [-n]' 1>&2 - exit 2 -esac - -case "$GOOSARCH" in -_* | *_ | _) - echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 - exit 1 - ;; -plan9_386) - mkerrors= - mksyscall="./mksyscall.pl -l32 -plan9" - mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" - mktypes="XXX" - ;; -*) - echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 - exit 1 - ;; -esac - -( - if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi - case "$GOOS" in - plan9) - syscall_goos="syscall_$GOOS.go" - if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi - ;; - esac - if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi - if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi - if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi -) | $run diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkerrors.sh b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkerrors.sh deleted file mode 100644 index 052c86d947..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mkerrors.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2009 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. - -# Generate Go code listing errors and other #defined constant -# values (ENAMETOOLONG etc.), by asking the preprocessor -# about the definitions. - -unset LANG -export LC_ALL=C -export LC_CTYPE=C - -CC=${CC:-gcc} - -uname=$(uname) - -includes=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - -ccflags="$@" - -# Write go tool cgo -godefs input. -( - echo package plan9 - echo - echo '/*' - indirect="includes_$(uname)" - echo "${!indirect} $includes" - echo '*/' - echo 'import "C"' - echo - echo 'const (' - - # The gcc command line prints all the #defines - # it encounters while processing the input - echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | - awk ' - $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} - - $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers - $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} - $2 ~ /^(SCM_SRCRT)$/ {next} - $2 ~ /^(MAP_FAILED)$/ {next} - - $2 !~ /^ETH_/ && - $2 !~ /^EPROC_/ && - $2 !~ /^EQUIV_/ && - $2 !~ /^EXPR_/ && - $2 ~ /^E[A-Z0-9_]+$/ || - $2 ~ /^B[0-9_]+$/ || - $2 ~ /^V[A-Z0-9]+$/ || - $2 ~ /^CS[A-Z0-9]/ || - $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ || - $2 ~ /^IGN/ || - $2 ~ /^IX(ON|ANY|OFF)$/ || - $2 ~ /^IN(LCR|PCK)$/ || - $2 ~ /(^FLU?SH)|(FLU?SH$)/ || - $2 ~ /^C(LOCAL|READ)$/ || - $2 == "BRKINT" || - $2 == "HUPCL" || - $2 == "PENDIN" || - $2 == "TOSTOP" || - $2 ~ /^PAR/ || - $2 ~ /^SIG[^_]/ || - $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ || - $2 ~ /^IN_/ || - $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || - $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || - $2 == "ICMPV6_FILTER" || - $2 == "SOMAXCONN" || - $2 == "NAME_MAX" || - $2 == "IFNAMSIZ" || - $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || - $2 ~ /^SYSCTL_VERS/ || - $2 ~ /^(MS|MNT)_/ || - $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || - $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ || - $2 ~ /^LINUX_REBOOT_CMD_/ || - $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || - $2 !~ "NLA_TYPE_MASK" && - $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || - $2 ~ /^SIOC/ || - $2 ~ /^TIOC/ || - $2 !~ "RTF_BITS" && - $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || - $2 ~ /^BIOC/ || - $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || - $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ || - $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || - $2 ~ /^CLONE_[A-Z_]+/ || - $2 !~ /^(BPF_TIMEVAL)$/ && - $2 ~ /^(BPF|DLT)_/ || - $2 !~ "WMESGLEN" && - $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)} - $2 ~ /^__WCOREFLAG$/ {next} - $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} - - {next} - ' | sort - - echo ')' -) >_const.go - -# Pull out the error names for later. -errors=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | - sort -) - -# Pull out the signal names for later. -signals=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort -) - -# Again, writing regexps to a file. -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | - sort >_error.grep -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort >_signal.grep - -echo '// mkerrors.sh' "$@" -echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT' -echo -go tool cgo -godefs -- "$@" _const.go >_error.out -cat _error.out | grep -vf _error.grep | grep -vf _signal.grep -echo -echo '// Errors' -echo 'const (' -cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/' -echo ')' - -echo -echo '// Signals' -echo 'const (' -cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/' -echo ')' - -# Run C program to print error and syscall strings. -( - echo -E " -#include -#include -#include -#include -#include -#include - -#define nelem(x) (sizeof(x)/sizeof((x)[0])) - -enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below - -int errors[] = { -" - for i in $errors - do - echo -E ' '$i, - done - - echo -E " -}; - -int signals[] = { -" - for i in $signals - do - echo -E ' '$i, - done - - # Use -E because on some systems bash builtin interprets \n itself. - echo -E ' -}; - -static int -intcmp(const void *a, const void *b) -{ - return *(int*)a - *(int*)b; -} - -int -main(void) -{ - int i, j, e; - char buf[1024], *p; - - printf("\n\n// Error table\n"); - printf("var errors = [...]string {\n"); - qsort(errors, nelem(errors), sizeof errors[0], intcmp); - for(i=0; i 0 && errors[i-1] == e) - continue; - strcpy(buf, strerror(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - printf("\t%d: \"%s\",\n", e, buf); - } - printf("}\n\n"); - - printf("\n\n// Signal table\n"); - printf("var signals = [...]string {\n"); - qsort(signals, nelem(signals), sizeof signals[0], intcmp); - for(i=0; i 0 && signals[i-1] == e) - continue; - strcpy(buf, strsignal(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - // cut trailing : number. - p = strrchr(buf, ":"[0]); - if(p) - *p = '\0'; - printf("\t%d: \"%s\",\n", e, buf); - } - printf("}\n\n"); - - return 0; -} - -' -) >_errors.c - -$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mksyscall.pl b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mksyscall.pl deleted file mode 100644 index ce8e1e4f33..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/mksyscall.pl +++ /dev/null @@ -1,319 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2009 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. - -# This program reads a file containing function prototypes -# (like syscall_plan9.go) and generates system call bodies. -# The prototypes are marked by lines beginning with "//sys" -# and read like func declarations if //sys is replaced by func, but: -# * The parameter lists must give a name for each argument. -# This includes return parameters. -# * The parameter lists must give a type for each argument: -# the (x, y, z int) shorthand is not allowed. -# * If the return parameter is an error number, it must be named errno. - -# A line beginning with //sysnb is like //sys, except that the -# goroutine will not be suspended during the execution of the system -# call. This must only be used for system calls which can never -# block, as otherwise the system call could cause all goroutines to -# hang. - -use strict; - -my $cmdline = "mksyscall.pl " . join(' ', @ARGV); -my $errors = 0; -my $_32bit = ""; -my $plan9 = 0; -my $openbsd = 0; -my $netbsd = 0; -my $dragonfly = 0; -my $nacl = 0; -my $arm = 0; # 64-bit value should use (even, odd)-pair - -if($ARGV[0] eq "-b32") { - $_32bit = "big-endian"; - shift; -} elsif($ARGV[0] eq "-l32") { - $_32bit = "little-endian"; - shift; -} -if($ARGV[0] eq "-plan9") { - $plan9 = 1; - shift; -} -if($ARGV[0] eq "-openbsd") { - $openbsd = 1; - shift; -} -if($ARGV[0] eq "-netbsd") { - $netbsd = 1; - shift; -} -if($ARGV[0] eq "-dragonfly") { - $dragonfly = 1; - shift; -} -if($ARGV[0] eq "-nacl") { - $nacl = 1; - shift; -} -if($ARGV[0] eq "-arm") { - $arm = 1; - shift; -} - -if($ARGV[0] =~ /^-/) { - print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n"; - exit 1; -} - -sub parseparamlist($) { - my ($list) = @_; - $list =~ s/^\s*//; - $list =~ s/\s*$//; - if($list eq "") { - return (); - } - return split(/\s*,\s*/, $list); -} - -sub parseparam($) { - my ($p) = @_; - if($p !~ /^(\S*) (\S*)$/) { - print STDERR "$ARGV:$.: malformed parameter: $p\n"; - $errors = 1; - return ("xx", "int"); - } - return ($1, $2); -} - -my $text = ""; -while(<>) { - chomp; - s/\s+/ /g; - s/^\s+//; - s/\s+$//; - my $nonblock = /^\/\/sysnb /; - next if !/^\/\/sys / && !$nonblock; - - # Line must be of the form - # func Open(path string, mode int, perm int) (fd int, errno error) - # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { - print STDERR "$ARGV:$.: malformed //sys declaration\n"; - $errors = 1; - next; - } - my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); - - # Split argument lists on comma. - my @in = parseparamlist($in); - my @out = parseparamlist($out); - - # Try in vain to keep people from editing this file. - # The theory is that they jump into the middle of the file - # without reading the header. - $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; - - # Go function header. - my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; - $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; - - # Check if err return available - my $errvar = ""; - foreach my $p (@out) { - my ($name, $type) = parseparam($p); - if($type eq "error") { - $errvar = $name; - last; - } - } - - # Prepare arguments to Syscall. - my @args = (); - my @uses = (); - my $n = 0; - foreach my $p (@in) { - my ($name, $type) = parseparam($p); - if($type =~ /^\*/) { - push @args, "uintptr(unsafe.Pointer($name))"; - } elsif($type eq "string" && $errvar ne "") { - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; - $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - push @uses, "use(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type eq "string") { - print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - push @uses, "use(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type =~ /^\[\](.*)/) { - # Convert slice into pointer, length. - # Have to be careful not to take address of &a[0] if len == 0: - # pass dummy pointer in that case. - # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). - $text .= "\tvar _p$n unsafe.Pointer\n"; - $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; - $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; - $text .= "\n"; - push @args, "uintptr(_p$n)", "uintptr(len($name))"; - $n++; - } elsif($type eq "int64" && ($openbsd || $netbsd)) { - push @args, "0"; - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $dragonfly) { - if ($func !~ /^extp(read|write)/i) { - push @args, "0"; - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $_32bit ne "") { - if(@args % 2 && $arm) { - # arm abi specifies 64-bit argument uses - # (even, odd) pair - push @args, "0" - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } else { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } - } else { - push @args, "uintptr($name)"; - } - } - - # Determine which form to use; pad args with zeros. - my $asm = "Syscall"; - if ($nonblock) { - $asm = "RawSyscall"; - } - if(@args <= 3) { - while(@args < 3) { - push @args, "0"; - } - } elsif(@args <= 6) { - $asm .= "6"; - while(@args < 6) { - push @args, "0"; - } - } elsif(@args <= 9) { - $asm .= "9"; - while(@args < 9) { - push @args, "0"; - } - } else { - print STDERR "$ARGV:$.: too many arguments to system call\n"; - } - - # System call number. - if($sysname eq "") { - $sysname = "SYS_$func"; - $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar - $sysname =~ y/a-z/A-Z/; - if($nacl) { - $sysname =~ y/A-Z/a-z/; - } - } - - # Actual call. - my $args = join(', ', @args); - my $call = "$asm($sysname, $args)"; - - # Assign return values. - my $body = ""; - my @ret = ("_", "_", "_"); - my $do_errno = 0; - for(my $i=0; $i<@out; $i++) { - my $p = $out[$i]; - my ($name, $type) = parseparam($p); - my $reg = ""; - if($name eq "err" && !$plan9) { - $reg = "e1"; - $ret[2] = $reg; - $do_errno = 1; - } elsif($name eq "err" && $plan9) { - $ret[0] = "r0"; - $ret[2] = "e1"; - next; - } else { - $reg = sprintf("r%d", $i); - $ret[$i] = $reg; - } - if($type eq "bool") { - $reg = "$reg != 0"; - } - if($type eq "int64" && $_32bit ne "") { - # 64-bit number in r1:r0 or r0:r1. - if($i+2 > @out) { - print STDERR "$ARGV:$.: not enough registers for int64 return\n"; - } - if($_32bit eq "big-endian") { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); - } else { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); - } - $ret[$i] = sprintf("r%d", $i); - $ret[$i+1] = sprintf("r%d", $i+1); - } - if($reg ne "e1" || $plan9) { - $body .= "\t$name = $type($reg)\n"; - } - } - if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { - $text .= "\t$call\n"; - } else { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; - } - foreach my $use (@uses) { - $text .= "\t$use\n"; - } - $text .= $body; - - if ($plan9 && $ret[2] eq "e1") { - $text .= "\tif int32(r0) == -1 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } elsif ($do_errno) { - $text .= "\tif e1 != 0 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } - $text .= "\treturn\n"; - $text .= "}\n\n"; -} - -chomp $text; -chomp $text; - -if($errors) { - exit 1; -} - -print <= 10 { - buf[i] = byte(val%10 + '0') - i-- - val /= 10 - } - buf[i] = byte(val + '0') - return string(buf[i:]) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall.go deleted file mode 100644 index 8171b42bcd..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2009 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. - -// +build plan9 - -// Package plan9 contains an interface to the low-level operating system -// primitives. OS details vary depending on the underlying system, and -// by default, godoc will display the OS-specific documentation for the current -// system. If you want godoc to display documentation for another -// system, set $GOOS and $GOARCH to the desired system. For example, if -// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS -// to freebsd and $GOARCH to arm. -// -// The primary use of this package is inside other packages that provide a more -// portable interface to the system, such as "os", "time" and "net". Use -// those packages rather than this one if you can. -// -// For details of the functions and data types in this package consult -// the manuals for the appropriate operating system. -// -// These calls return err == nil to indicate success; otherwise -// err represents an operating system error describing the failure and -// holds a value of type syscall.ErrorString. -package plan9 - -import "unsafe" - -// ByteSliceFromString returns a NUL-terminated slice of bytes -// containing the text of s. If s contains a NUL byte at any -// location, it returns (nil, EINVAL). -func ByteSliceFromString(s string) ([]byte, error) { - for i := 0; i < len(s); i++ { - if s[i] == 0 { - return nil, EINVAL - } - } - a := make([]byte, len(s)+1) - copy(a, s) - return a, nil -} - -// BytePtrFromString returns a pointer to a NUL-terminated array of -// bytes containing the text of s. If s contains a NUL byte at any -// location, it returns (nil, EINVAL). -func BytePtrFromString(s string) (*byte, error) { - a, err := ByteSliceFromString(s) - if err != nil { - return nil, err - } - return &a[0], nil -} - -// Single-word zero for use when we need a valid pointer to 0 bytes. -// See mksyscall.pl. -var _zero uintptr - -func (ts *Timespec) Unix() (sec int64, nsec int64) { - return int64(ts.Sec), int64(ts.Nsec) -} - -func (tv *Timeval) Unix() (sec int64, nsec int64) { - return int64(tv.Sec), int64(tv.Usec) * 1000 -} - -func (ts *Timespec) Nano() int64 { - return int64(ts.Sec)*1e9 + int64(ts.Nsec) -} - -func (tv *Timeval) Nano() int64 { - return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 -} - -// use is a no-op, but the compiler cannot see that it is. -// Calling use(p) ensures that p is kept live until that point. -//go:noescape -func use(p unsafe.Pointer) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_plan9.go deleted file mode 100644 index 84e1471481..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_plan9.go +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2011 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. - -// Plan 9 system calls. -// This file is compiled as ordinary Go code, -// but it is also input to mksyscall, -// which parses the //sys lines and generates system call stubs. -// Note that sometimes we use a lowercase //sys name and -// wrap it in our own nicer implementation. - -package plan9 - -import ( - "bytes" - "syscall" - "unsafe" -) - -// A Note is a string describing a process note. -// It implements the os.Signal interface. -type Note string - -func (n Note) Signal() {} - -func (n Note) String() string { - return string(n) -} - -var ( - Stdin = 0 - Stdout = 1 - Stderr = 2 -) - -// For testing: clients can set this flag to force -// creation of IPv6 sockets to return EAFNOSUPPORT. -var SocketDisableIPv6 bool - -func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString) -func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString) -func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) -func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) - -func atoi(b []byte) (n uint) { - n = 0 - for i := 0; i < len(b); i++ { - n = n*10 + uint(b[i]-'0') - } - return -} - -func cstring(s []byte) string { - i := bytes.IndexByte(s, 0) - if i == -1 { - i = len(s) - } - return string(s[:i]) -} - -func errstr() string { - var buf [ERRMAX]byte - - RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0) - - buf[len(buf)-1] = 0 - return cstring(buf[:]) -} - -// Implemented in assembly to import from runtime. -func exit(code int) - -func Exit(code int) { exit(code) } - -func readnum(path string) (uint, error) { - var b [12]byte - - fd, e := Open(path, O_RDONLY) - if e != nil { - return 0, e - } - defer Close(fd) - - n, e := Pread(fd, b[:], 0) - - if e != nil { - return 0, e - } - - m := 0 - for ; m < n && b[m] == ' '; m++ { - } - - return atoi(b[m : n-1]), nil -} - -func Getpid() (pid int) { - n, _ := readnum("#c/pid") - return int(n) -} - -func Getppid() (ppid int) { - n, _ := readnum("#c/ppid") - return int(n) -} - -func Read(fd int, p []byte) (n int, err error) { - return Pread(fd, p, -1) -} - -func Write(fd int, p []byte) (n int, err error) { - return Pwrite(fd, p, -1) -} - -var ioSync int64 - -//sys fd2path(fd int, buf []byte) (err error) -func Fd2path(fd int) (path string, err error) { - var buf [512]byte - - e := fd2path(fd, buf[:]) - if e != nil { - return "", e - } - return cstring(buf[:]), nil -} - -//sys pipe(p *[2]int32) (err error) -func Pipe(p []int) (err error) { - if len(p) != 2 { - return syscall.ErrorString("bad arg in system call") - } - var pp [2]int32 - err = pipe(&pp) - p[0] = int(pp[0]) - p[1] = int(pp[1]) - return -} - -// Underlying system call writes to newoffset via pointer. -// Implemented in assembly to avoid allocation. -func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) - -func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { - newoffset, e := seek(0, fd, offset, whence) - - if newoffset == -1 { - err = syscall.ErrorString(e) - } - return -} - -func Mkdir(path string, mode uint32) (err error) { - fd, err := Create(path, O_RDONLY, DMDIR|mode) - - if fd != -1 { - Close(fd) - } - - return -} - -type Waitmsg struct { - Pid int - Time [3]uint32 - Msg string -} - -func (w Waitmsg) Exited() bool { return true } -func (w Waitmsg) Signaled() bool { return false } - -func (w Waitmsg) ExitStatus() int { - if len(w.Msg) == 0 { - // a normal exit returns no message - return 0 - } - return 1 -} - -//sys await(s []byte) (n int, err error) -func Await(w *Waitmsg) (err error) { - var buf [512]byte - var f [5][]byte - - n, err := await(buf[:]) - - if err != nil || w == nil { - return - } - - nf := 0 - p := 0 - for i := 0; i < n && nf < len(f)-1; i++ { - if buf[i] == ' ' { - f[nf] = buf[p:i] - p = i + 1 - nf++ - } - } - f[nf] = buf[p:] - nf++ - - if nf != len(f) { - return syscall.ErrorString("invalid wait message") - } - w.Pid = int(atoi(f[0])) - w.Time[0] = uint32(atoi(f[1])) - w.Time[1] = uint32(atoi(f[2])) - w.Time[2] = uint32(atoi(f[3])) - w.Msg = cstring(f[4]) - if w.Msg == "''" { - // await() returns '' for no error - w.Msg = "" - } - return -} - -func Unmount(name, old string) (err error) { - fixwd() - oldp, err := BytePtrFromString(old) - if err != nil { - return err - } - oldptr := uintptr(unsafe.Pointer(oldp)) - - var r0 uintptr - var e syscall.ErrorString - - // bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted. - if name == "" { - r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0) - } else { - namep, err := BytePtrFromString(name) - if err != nil { - return err - } - r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0) - } - - if int32(r0) == -1 { - err = e - } - return -} - -func Fchdir(fd int) (err error) { - path, err := Fd2path(fd) - - if err != nil { - return - } - - return Chdir(path) -} - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -func NsecToTimeval(nsec int64) (tv Timeval) { - nsec += 999 // round up to microsecond - tv.Usec = int32(nsec % 1e9 / 1e3) - tv.Sec = int32(nsec / 1e9) - return -} - -func nsec() int64 { - var scratch int64 - - r0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0) - // TODO(aram): remove hack after I fix _nsec in the pc64 kernel. - if r0 == 0 { - return scratch - } - return int64(r0) -} - -func Gettimeofday(tv *Timeval) error { - nsec := nsec() - *tv = NsecToTimeval(nsec) - return nil -} - -func Getpagesize() int { return 0x1000 } - -func Getegid() (egid int) { return -1 } -func Geteuid() (euid int) { return -1 } -func Getgid() (gid int) { return -1 } -func Getuid() (uid int) { return -1 } - -func Getgroups() (gids []int, err error) { - return make([]int, 0), nil -} - -//sys open(path string, mode int) (fd int, err error) -func Open(path string, mode int) (fd int, err error) { - fixwd() - return open(path, mode) -} - -//sys create(path string, mode int, perm uint32) (fd int, err error) -func Create(path string, mode int, perm uint32) (fd int, err error) { - fixwd() - return create(path, mode, perm) -} - -//sys remove(path string) (err error) -func Remove(path string) error { - fixwd() - return remove(path) -} - -//sys stat(path string, edir []byte) (n int, err error) -func Stat(path string, edir []byte) (n int, err error) { - fixwd() - return stat(path, edir) -} - -//sys bind(name string, old string, flag int) (err error) -func Bind(name string, old string, flag int) (err error) { - fixwd() - return bind(name, old, flag) -} - -//sys mount(fd int, afd int, old string, flag int, aname string) (err error) -func Mount(fd int, afd int, old string, flag int, aname string) (err error) { - fixwd() - return mount(fd, afd, old, flag, aname) -} - -//sys wstat(path string, edir []byte) (err error) -func Wstat(path string, edir []byte) (err error) { - fixwd() - return wstat(path, edir) -} - -//sys chdir(path string) (err error) -//sys Dup(oldfd int, newfd int) (fd int, err error) -//sys Pread(fd int, p []byte, offset int64) (n int, err error) -//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) -//sys Close(fd int) (err error) -//sys Fstat(fd int, edir []byte) (n int, err error) -//sys Fwstat(fd int, edir []byte) (err error) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_test.go deleted file mode 100644 index 7a39322bdc..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/syscall_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2013 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. - -// +build plan9 - -package plan9_test - -import ( - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9" -) - -func testSetGetenv(t *testing.T, key, value string) { - err := plan9.Setenv(key, value) - if err != nil { - t.Fatalf("Setenv failed to set %q: %v", value, err) - } - newvalue, found := plan9.Getenv(key) - if !found { - t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) - } - if newvalue != value { - t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) - } -} - -func TestEnv(t *testing.T) { - testSetGetenv(t, "TESTENV", "AVALUE") - // make sure TESTENV gets set to "", not deleted - testSetGetenv(t, "TESTENV", "") -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_386.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_386.go deleted file mode 100644 index b35598ad94..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_386.go +++ /dev/null @@ -1,292 +0,0 @@ -// mksyscall.pl -l32 -plan9 syscall_plan9.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT - -package plan9 - -import "unsafe" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fd2path(fd int, buf []byte) (err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]int32) (err error) { - r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func await(s []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(s) > 0 { - _p0 = unsafe.Pointer(&s[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func open(path string, mode int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - use(unsafe.Pointer(_p0)) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func create(path string, mode int, perm uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) - use(unsafe.Pointer(_p0)) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func remove(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func stat(path string, edir []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - use(unsafe.Pointer(_p0)) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func bind(name string, old string, flag int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(old) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) - use(unsafe.Pointer(_p0)) - use(unsafe.Pointer(_p1)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(fd int, afd int, old string, flag int, aname string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(old) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(aname) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) - use(unsafe.Pointer(_p0)) - use(unsafe.Pointer(_p1)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wstat(path string, edir []byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int, newfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pread(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pwrite(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fstat(fd int, edir []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fwstat(fd int, edir []byte) (err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - if int32(r0) == -1 { - err = e1 - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_amd64.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_amd64.go deleted file mode 100644 index b35598ad94..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_amd64.go +++ /dev/null @@ -1,292 +0,0 @@ -// mksyscall.pl -l32 -plan9 syscall_plan9.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT - -package plan9 - -import "unsafe" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fd2path(fd int, buf []byte) (err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]int32) (err error) { - r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func await(s []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(s) > 0 { - _p0 = unsafe.Pointer(&s[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func open(path string, mode int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - use(unsafe.Pointer(_p0)) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func create(path string, mode int, perm uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) - use(unsafe.Pointer(_p0)) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func remove(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func stat(path string, edir []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - use(unsafe.Pointer(_p0)) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func bind(name string, old string, flag int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(old) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) - use(unsafe.Pointer(_p0)) - use(unsafe.Pointer(_p1)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(fd int, afd int, old string, flag int, aname string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(old) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(aname) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) - use(unsafe.Pointer(_p0)) - use(unsafe.Pointer(_p1)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wstat(path string, edir []byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - use(unsafe.Pointer(_p0)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int, newfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pread(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pwrite(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fstat(fd int, edir []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fwstat(fd int, edir []byte) (err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - if int32(r0) == -1 { - err = e1 - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_arm.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_arm.go deleted file mode 100644 index 8dd87239a2..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsyscall_plan9_arm.go +++ /dev/null @@ -1,284 +0,0 @@ -// mksyscall.pl -l32 -plan9 -tags plan9,arm syscall_plan9.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT - -// +build plan9,arm - -package plan9 - -import "unsafe" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fd2path(fd int, buf []byte) (err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]int32) (err error) { - r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func await(s []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(s) > 0 { - _p0 = unsafe.Pointer(&s[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func open(path string, mode int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func create(path string, mode int, perm uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func remove(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func stat(path string, edir []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func bind(name string, old string, flag int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(old) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(fd int, afd int, old string, flag int, aname string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(old) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(aname) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wstat(path string, edir []byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(edir) > 0 { - _p1 = unsafe.Pointer(&edir[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int, newfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) - fd = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pread(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pwrite(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fstat(fd int, edir []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - n = int(r0) - if int32(r0) == -1 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fwstat(fd int, edir []byte) (err error) { - var _p0 unsafe.Pointer - if len(edir) > 0 { - _p0 = unsafe.Pointer(&edir[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) - if int32(r0) == -1 { - err = e1 - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsysnum_plan9.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsysnum_plan9.go deleted file mode 100644 index 22e8abd43d..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/plan9/zsysnum_plan9.go +++ /dev/null @@ -1,49 +0,0 @@ -// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT - -package plan9 - -const ( - SYS_SYSR1 = 0 - SYS_BIND = 2 - SYS_CHDIR = 3 - SYS_CLOSE = 4 - SYS_DUP = 5 - SYS_ALARM = 6 - SYS_EXEC = 7 - SYS_EXITS = 8 - SYS_FAUTH = 10 - SYS_SEGBRK = 12 - SYS_OPEN = 14 - SYS_OSEEK = 16 - SYS_SLEEP = 17 - SYS_RFORK = 19 - SYS_PIPE = 21 - SYS_CREATE = 22 - SYS_FD2PATH = 23 - SYS_BRK_ = 24 - SYS_REMOVE = 25 - SYS_NOTIFY = 28 - SYS_NOTED = 29 - SYS_SEGATTACH = 30 - SYS_SEGDETACH = 31 - SYS_SEGFREE = 32 - SYS_SEGFLUSH = 33 - SYS_RENDEZVOUS = 34 - SYS_UNMOUNT = 35 - SYS_SEMACQUIRE = 37 - SYS_SEMRELEASE = 38 - SYS_SEEK = 39 - SYS_FVERSION = 40 - SYS_ERRSTR = 41 - SYS_STAT = 42 - SYS_FSTAT = 43 - SYS_WSTAT = 44 - SYS_FWSTAT = 45 - SYS_MOUNT = 46 - SYS_AWAIT = 47 - SYS_PREAD = 50 - SYS_PWRITE = 51 - SYS_TSEMACQUIRE = 52 - SYS_NSEC = 53 -) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/creds_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/creds_test.go deleted file mode 100644 index b13d18b170..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/creds_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2012 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. - -// +build linux - -package unix_test - -import ( - "bytes" - "go/build" - "net" - "os" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -// TestSCMCredentials tests the sending and receiving of credentials -// (PID, UID, GID) in an ancillary message between two UNIX -// sockets. The SO_PASSCRED socket option is enabled on the sending -// socket for this to work. -func TestSCMCredentials(t *testing.T) { - socketTypeTests := []struct { - socketType int - dataLen int - }{ - { - unix.SOCK_STREAM, - 1, - }, { - unix.SOCK_DGRAM, - 0, - }, - } - - for _, tt := range socketTypeTests { - if tt.socketType == unix.SOCK_DGRAM && !atLeast1p10() { - t.Log("skipping DGRAM test on pre-1.10") - continue - } - - fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0) - if err != nil { - t.Fatalf("Socketpair: %v", err) - } - defer unix.Close(fds[0]) - defer unix.Close(fds[1]) - - err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) - if err != nil { - t.Fatalf("SetsockoptInt: %v", err) - } - - srvFile := os.NewFile(uintptr(fds[0]), "server") - defer srvFile.Close() - srv, err := net.FileConn(srvFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer srv.Close() - - cliFile := os.NewFile(uintptr(fds[1]), "client") - defer cliFile.Close() - cli, err := net.FileConn(cliFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer cli.Close() - - var ucred unix.Ucred - ucred.Pid = int32(os.Getpid()) - ucred.Uid = uint32(os.Getuid()) - ucred.Gid = uint32(os.Getgid()) - oob := unix.UnixCredentials(&ucred) - - // On SOCK_STREAM, this is internally going to send a dummy byte - n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) - if err != nil { - t.Fatalf("WriteMsgUnix: %v", err) - } - if n != 0 { - t.Fatalf("WriteMsgUnix n = %d, want 0", n) - } - if oobn != len(oob) { - t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) - } - - oob2 := make([]byte, 10*len(oob)) - n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) - if err != nil { - t.Fatalf("ReadMsgUnix: %v", err) - } - if flags != 0 { - t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) - } - if n != tt.dataLen { - t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen) - } - if oobn2 != oobn { - // without SO_PASSCRED set on the socket, ReadMsgUnix will - // return zero oob bytes - t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) - } - oob2 = oob2[:oobn2] - if !bytes.Equal(oob, oob2) { - t.Fatal("ReadMsgUnix oob bytes don't match") - } - - scm, err := unix.ParseSocketControlMessage(oob2) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - newUcred, err := unix.ParseUnixCredentials(&scm[0]) - if err != nil { - t.Fatalf("ParseUnixCredentials: %v", err) - } - if *newUcred != ucred { - t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) - } - } -} - -// atLeast1p10 reports whether we are running on Go 1.10 or later. -func atLeast1p10() bool { - for _, ver := range build.Default.ReleaseTags { - if ver == "go1.10" { - return true - } - } - return false -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/dev_linux_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/dev_linux_test.go deleted file mode 100644 index 6486cabf6b..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/dev_linux_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2017 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. - -// +build go1.7 - -package unix_test - -import ( - "fmt" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestDevices(t *testing.T) { - testCases := []struct { - path string - major uint32 - minor uint32 - }{ - // well known major/minor numbers according to - // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt - {"/dev/null", 1, 3}, - {"/dev/zero", 1, 5}, - {"/dev/random", 1, 8}, - {"/dev/full", 1, 7}, - {"/dev/urandom", 1, 9}, - {"/dev/tty", 5, 0}, - } - for _, tc := range testCases { - t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { - var stat unix.Stat_t - err := unix.Stat(tc.path, &stat) - if err != nil { - if err == unix.EACCES { - t.Skip("no permission to stat device, skipping test") - } - t.Errorf("failed to stat device: %v", err) - return - } - - dev := uint64(stat.Rdev) - if unix.Major(dev) != tc.major { - t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) - } - if unix.Minor(dev) != tc.minor { - t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) - } - if unix.Mkdev(tc.major, tc.minor) != dev { - t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) - } - }) - - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/example_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/example_test.go deleted file mode 100644 index 2cd835867c..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/example_test.go +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "log" - "os" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func ExampleExec() { - err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) - log.Fatal(err) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/export_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/export_test.go deleted file mode 100644 index e8024690df..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/export_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2015 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix - -var Itoa = itoa diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/Dockerfile b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/Dockerfile deleted file mode 100644 index 5381034e56..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM ubuntu:17.10 - -# Dependencies to get the git sources and go binaries -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Get the git sources. If not cached, this takes O(5 minutes). -WORKDIR /git -RUN git config --global advice.detachedHead false -# Linux Kernel: Released 01 Apr 2018 -RUN git clone --branch v4.16 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux -# GNU C library: Released 01 Feb 2018 (we should try to get a secure way to clone this) -RUN git clone --branch glibc-2.27 --depth 1 git://sourceware.org/git/glibc.git - -# Get Go -ENV GOLANG_VERSION 1.10.1 -ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 72d820dec546752e5a8303b33b009079c15c2390ce76d67cf514991646c6127b - -RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ - && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ - && tar -C /usr/local -xzf golang.tar.gz \ - && rm golang.tar.gz - -ENV PATH /usr/local/go/bin:$PATH - -# Linux and Glibc build dependencies and emulator -RUN apt-get update && apt-get install -y --no-install-recommends \ - bison gawk make python \ - gcc gcc-multilib \ - gettext texinfo \ - qemu \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -# Cross compilers (install recommended packages to get cross libc-dev) -RUN apt-get update && apt-get install -y \ - gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \ - gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \ - gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \ - gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \ - gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Let the scripts know they are in the docker environment -ENV GOLANG_SYS_BUILD docker -WORKDIR /build -ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"] diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mkall.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mkall.go deleted file mode 100644 index 40b5cf4eff..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mkall.go +++ /dev/null @@ -1,750 +0,0 @@ -// Copyright 2017 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. - -// linux/mkall.go - Generates all Linux zsysnum, zsyscall, zerror, and ztype -// files for all 11 linux architectures supported by the go compiler. See -// README.md for more information about the build system. - -// To run it you must have a git checkout of the Linux kernel and glibc. Once -// the appropriate sources are ready, the program is run as: -// go run linux/mkall.go - -// +build ignore - -package main - -import ( - "bufio" - "bytes" - "debug/elf" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" - "unicode" -) - -// These will be paths to the appropriate source directories. -var LinuxDir string -var GlibcDir string - -const TempDir = "/tmp" -const IncludeDir = TempDir + "/include" // To hold our C headers -const BuildDir = TempDir + "/build" // To hold intermediate build files - -const GOOS = "linux" // Only for Linux targets -const BuildArch = "amd64" // Must be built on this architecture -const MinKernel = "2.6.23" // https://golang.org/doc/install#requirements - -type target struct { - GoArch string // Architecture name according to Go - LinuxArch string // Architecture name according to the Linux Kernel - GNUArch string // Architecture name according to GNU tools (https://wiki.debian.org/Multiarch/Tuples) - BigEndian bool // Default Little Endian - SignedChar bool // Is -fsigned-char needed (default no) - Bits int -} - -// List of the 11 Linux targets supported by the go compiler. sparc64 is not -// currently supported, though a port is in progress. -var targets = []target{ - { - GoArch: "386", - LinuxArch: "x86", - GNUArch: "i686-linux-gnu", // Note "i686" not "i386" - Bits: 32, - }, - { - GoArch: "amd64", - LinuxArch: "x86", - GNUArch: "x86_64-linux-gnu", - Bits: 64, - }, - { - GoArch: "arm64", - LinuxArch: "arm64", - GNUArch: "aarch64-linux-gnu", - SignedChar: true, - Bits: 64, - }, - { - GoArch: "arm", - LinuxArch: "arm", - GNUArch: "arm-linux-gnueabi", - Bits: 32, - }, - { - GoArch: "mips", - LinuxArch: "mips", - GNUArch: "mips-linux-gnu", - BigEndian: true, - Bits: 32, - }, - { - GoArch: "mipsle", - LinuxArch: "mips", - GNUArch: "mipsel-linux-gnu", - Bits: 32, - }, - { - GoArch: "mips64", - LinuxArch: "mips", - GNUArch: "mips64-linux-gnuabi64", - BigEndian: true, - Bits: 64, - }, - { - GoArch: "mips64le", - LinuxArch: "mips", - GNUArch: "mips64el-linux-gnuabi64", - Bits: 64, - }, - { - GoArch: "ppc64", - LinuxArch: "powerpc", - GNUArch: "powerpc64-linux-gnu", - BigEndian: true, - Bits: 64, - }, - { - GoArch: "ppc64le", - LinuxArch: "powerpc", - GNUArch: "powerpc64le-linux-gnu", - Bits: 64, - }, - { - GoArch: "s390x", - LinuxArch: "s390", - GNUArch: "s390x-linux-gnu", - BigEndian: true, - SignedChar: true, - Bits: 64, - }, - // { - // GoArch: "sparc64", - // LinuxArch: "sparc", - // GNUArch: "sparc64-linux-gnu", - // BigEndian: true, - // Bits: 64, - // }, -} - -// ptracePairs is a list of pairs of targets that can, in some cases, -// run each other's binaries. -var ptracePairs = []struct{ a1, a2 string }{ - {"386", "amd64"}, - {"arm", "arm64"}, - {"mips", "mips64"}, - {"mipsle", "mips64le"}, -} - -func main() { - if runtime.GOOS != GOOS || runtime.GOARCH != BuildArch { - fmt.Printf("Build system has GOOS_GOARCH = %s_%s, need %s_%s\n", - runtime.GOOS, runtime.GOARCH, GOOS, BuildArch) - return - } - - // Check that we are using the new build system if we should - if os.Getenv("GOLANG_SYS_BUILD") != "docker" { - fmt.Println("In the new build system, mkall.go should not be called directly.") - fmt.Println("See README.md") - return - } - - // Parse the command line options - if len(os.Args) != 3 { - fmt.Println("USAGE: go run linux/mkall.go ") - return - } - LinuxDir = os.Args[1] - GlibcDir = os.Args[2] - - for _, t := range targets { - fmt.Printf("----- GENERATING: %s -----\n", t.GoArch) - if err := t.generateFiles(); err != nil { - fmt.Printf("%v\n***** FAILURE: %s *****\n\n", err, t.GoArch) - } else { - fmt.Printf("----- SUCCESS: %s -----\n\n", t.GoArch) - } - } - - fmt.Printf("----- GENERATING ptrace pairs -----\n") - ok := true - for _, p := range ptracePairs { - if err := generatePtracePair(p.a1, p.a2); err != nil { - fmt.Printf("%v\n***** FAILURE: %s/%s *****\n\n", err, p.a1, p.a2) - ok = false - } - } - if ok { - fmt.Printf("----- SUCCESS ptrace pairs -----\n\n") - } -} - -// Makes an exec.Cmd with Stderr attached to os.Stderr -func makeCommand(name string, args ...string) *exec.Cmd { - cmd := exec.Command(name, args...) - cmd.Stderr = os.Stderr - return cmd -} - -// Runs the command, pipes output to a formatter, pipes that to an output file. -func (t *target) commandFormatOutput(formatter string, outputFile string, - name string, args ...string) (err error) { - mainCmd := makeCommand(name, args...) - - fmtCmd := makeCommand(formatter) - if formatter == "mkpost" { - fmtCmd = makeCommand("go", "run", "mkpost.go") - // Set GOARCH_TARGET so mkpost knows what GOARCH is.. - fmtCmd.Env = append(os.Environ(), "GOARCH_TARGET="+t.GoArch) - // Set GOARCH to host arch for mkpost, so it can run natively. - for i, s := range fmtCmd.Env { - if strings.HasPrefix(s, "GOARCH=") { - fmtCmd.Env[i] = "GOARCH=" + BuildArch - } - } - } - - // mainCmd | fmtCmd > outputFile - if fmtCmd.Stdin, err = mainCmd.StdoutPipe(); err != nil { - return - } - if fmtCmd.Stdout, err = os.Create(outputFile); err != nil { - return - } - - // Make sure the formatter eventually closes - if err = fmtCmd.Start(); err != nil { - return - } - defer func() { - fmtErr := fmtCmd.Wait() - if err == nil { - err = fmtErr - } - }() - - return mainCmd.Run() -} - -// Generates all the files for a Linux target -func (t *target) generateFiles() error { - // Setup environment variables - os.Setenv("GOOS", GOOS) - os.Setenv("GOARCH", t.GoArch) - - // Get appropriate compiler and emulator (unless on x86) - if t.LinuxArch != "x86" { - // Check/Setup cross compiler - compiler := t.GNUArch + "-gcc" - if _, err := exec.LookPath(compiler); err != nil { - return err - } - os.Setenv("CC", compiler) - - // Check/Setup emulator (usually first component of GNUArch) - qemuArchName := t.GNUArch[:strings.Index(t.GNUArch, "-")] - if t.LinuxArch == "powerpc" { - qemuArchName = t.GoArch - } - os.Setenv("GORUN", "qemu-"+qemuArchName) - } else { - os.Setenv("CC", "gcc") - } - - // Make the include directory and fill it with headers - if err := os.MkdirAll(IncludeDir, os.ModePerm); err != nil { - return err - } - defer os.RemoveAll(IncludeDir) - if err := t.makeHeaders(); err != nil { - return fmt.Errorf("could not make header files: %v", err) - } - fmt.Println("header files generated") - - // Make each of the four files - if err := t.makeZSysnumFile(); err != nil { - return fmt.Errorf("could not make zsysnum file: %v", err) - } - fmt.Println("zsysnum file generated") - - if err := t.makeZSyscallFile(); err != nil { - return fmt.Errorf("could not make zsyscall file: %v", err) - } - fmt.Println("zsyscall file generated") - - if err := t.makeZTypesFile(); err != nil { - return fmt.Errorf("could not make ztypes file: %v", err) - } - fmt.Println("ztypes file generated") - - if err := t.makeZErrorsFile(); err != nil { - return fmt.Errorf("could not make zerrors file: %v", err) - } - fmt.Println("zerrors file generated") - - return nil -} - -// Create the Linux, glibc and ABI (C compiler convention) headers in the include directory. -func (t *target) makeHeaders() error { - // Make the Linux headers we need for this architecture - linuxMake := makeCommand("make", "headers_install", "ARCH="+t.LinuxArch, "INSTALL_HDR_PATH="+TempDir) - linuxMake.Dir = LinuxDir - if err := linuxMake.Run(); err != nil { - return err - } - - // A Temporary build directory for glibc - if err := os.MkdirAll(BuildDir, os.ModePerm); err != nil { - return err - } - defer os.RemoveAll(BuildDir) - - // Make the glibc headers we need for this architecture - confScript := filepath.Join(GlibcDir, "configure") - glibcConf := makeCommand(confScript, "--prefix="+TempDir, "--host="+t.GNUArch, "--enable-kernel="+MinKernel) - glibcConf.Dir = BuildDir - if err := glibcConf.Run(); err != nil { - return err - } - glibcMake := makeCommand("make", "install-headers") - glibcMake.Dir = BuildDir - if err := glibcMake.Run(); err != nil { - return err - } - // We only need an empty stubs file - stubsFile := filepath.Join(IncludeDir, "gnu/stubs.h") - if file, err := os.Create(stubsFile); err != nil { - return err - } else { - file.Close() - } - - // ABI headers will specify C compiler behavior for the target platform. - return t.makeABIHeaders() -} - -// makeABIHeaders generates C header files based on the platform's calling convention. -// While many platforms have formal Application Binary Interfaces, in practice, whatever the -// dominant C compilers generate is the de-facto calling convention. -// -// We generate C headers instead of a Go file, so as to enable references to the ABI from Cgo. -func (t *target) makeABIHeaders() (err error) { - abiDir := filepath.Join(IncludeDir, "abi") - if err = os.Mkdir(abiDir, os.ModePerm); err != nil { - return err - } - - cc := os.Getenv("CC") - if cc == "" { - return errors.New("CC (compiler) env var not set") - } - - // Build a sacrificial ELF file, to mine for C compiler behavior. - binPath := filepath.Join(TempDir, "tmp_abi.o") - bin, err := t.buildELF(cc, cCode, binPath) - if err != nil { - return fmt.Errorf("cannot build ELF to analyze: %v", err) - } - defer bin.Close() - defer os.Remove(binPath) - - // Right now, we put everything in abi.h, but we may change this later. - abiFile, err := os.Create(filepath.Join(abiDir, "abi.h")) - if err != nil { - return err - } - defer func() { - if cerr := abiFile.Close(); cerr != nil && err == nil { - err = cerr - } - }() - - if err = t.writeBitFieldMasks(bin, abiFile); err != nil { - return fmt.Errorf("cannot write bitfield masks: %v", err) - } - - return nil -} - -func (t *target) buildELF(cc, src, path string) (*elf.File, error) { - // Compile the cCode source using the set compiler - we will need its .data section. - // Do not link the binary, so that we can find .data section offsets from the symbol values. - ccCmd := makeCommand(cc, "-o", path, "-gdwarf", "-x", "c", "-c", "-") - ccCmd.Stdin = strings.NewReader(src) - ccCmd.Stdout = os.Stdout - if err := ccCmd.Run(); err != nil { - return nil, fmt.Errorf("compiler error: %v", err) - } - - bin, err := elf.Open(path) - if err != nil { - return nil, fmt.Errorf("cannot read ELF file %s: %v", path, err) - } - - return bin, nil -} - -func (t *target) writeBitFieldMasks(bin *elf.File, out io.Writer) error { - symbols, err := bin.Symbols() - if err != nil { - return fmt.Errorf("getting ELF symbols: %v", err) - } - var masksSym *elf.Symbol - - for _, sym := range symbols { - if sym.Name == "masks" { - masksSym = &sym - } - } - - if masksSym == nil { - return errors.New("could not find the 'masks' symbol in ELF symtab") - } - - dataSection := bin.Section(".data") - if dataSection == nil { - return errors.New("ELF file has no .data section") - } - - data, err := dataSection.Data() - if err != nil { - return fmt.Errorf("could not read .data section: %v\n", err) - } - - var bo binary.ByteOrder - if t.BigEndian { - bo = binary.BigEndian - } else { - bo = binary.LittleEndian - } - - // 64 bit masks of type uint64 are stored in the data section starting at masks.Value. - // Here we are running on AMD64, but these values may be big endian or little endian, - // depending on target architecture. - for i := uint64(0); i < 64; i++ { - off := masksSym.Value + i*8 - // Define each mask in native by order, so as to match target endian. - fmt.Fprintf(out, "#define BITFIELD_MASK_%d %dULL\n", i, bo.Uint64(data[off:off+8])) - } - - return nil -} - -// makes the zsysnum_linux_$GOARCH.go file -func (t *target) makeZSysnumFile() error { - zsysnumFile := fmt.Sprintf("zsysnum_linux_%s.go", t.GoArch) - unistdFile := filepath.Join(IncludeDir, "asm/unistd.h") - - args := append(t.cFlags(), unistdFile) - return t.commandFormatOutput("gofmt", zsysnumFile, "linux/mksysnum.pl", args...) -} - -// makes the zsyscall_linux_$GOARCH.go file -func (t *target) makeZSyscallFile() error { - zsyscallFile := fmt.Sprintf("zsyscall_linux_%s.go", t.GoArch) - // Find the correct architecture syscall file (might end with x.go) - archSyscallFile := fmt.Sprintf("syscall_linux_%s.go", t.GoArch) - if _, err := os.Stat(archSyscallFile); os.IsNotExist(err) { - shortArch := strings.TrimSuffix(t.GoArch, "le") - archSyscallFile = fmt.Sprintf("syscall_linux_%sx.go", shortArch) - } - - args := append(t.mksyscallFlags(), "-tags", "linux,"+t.GoArch, - "syscall_linux.go", archSyscallFile) - return t.commandFormatOutput("gofmt", zsyscallFile, "./mksyscall.pl", args...) -} - -// makes the zerrors_linux_$GOARCH.go file -func (t *target) makeZErrorsFile() error { - zerrorsFile := fmt.Sprintf("zerrors_linux_%s.go", t.GoArch) - - return t.commandFormatOutput("gofmt", zerrorsFile, "./mkerrors.sh", t.cFlags()...) -} - -// makes the ztypes_linux_$GOARCH.go file -func (t *target) makeZTypesFile() error { - ztypesFile := fmt.Sprintf("ztypes_linux_%s.go", t.GoArch) - - args := []string{"tool", "cgo", "-godefs", "--"} - args = append(args, t.cFlags()...) - args = append(args, "linux/types.go") - return t.commandFormatOutput("mkpost", ztypesFile, "go", args...) -} - -// Flags that should be given to gcc and cgo for this target -func (t *target) cFlags() []string { - // Compile statically to avoid cross-architecture dynamic linking. - flags := []string{"-Wall", "-Werror", "-static", "-I" + IncludeDir} - - // Architecture-specific flags - if t.SignedChar { - flags = append(flags, "-fsigned-char") - } - if t.LinuxArch == "x86" { - flags = append(flags, fmt.Sprintf("-m%d", t.Bits)) - } - - return flags -} - -// Flags that should be given to mksyscall for this target -func (t *target) mksyscallFlags() (flags []string) { - if t.Bits == 32 { - if t.BigEndian { - flags = append(flags, "-b32") - } else { - flags = append(flags, "-l32") - } - } - - // This flag menas a 64-bit value should use (even, odd)-pair. - if t.GoArch == "arm" || (t.LinuxArch == "mips" && t.Bits == 32) { - flags = append(flags, "-arm") - } - return -} - -// generatePtracePair takes a pair of GOARCH values that can run each -// other's binaries, such as 386 and amd64. It extracts the PtraceRegs -// type for each one. It writes a new file defining the types -// PtraceRegsArch1 and PtraceRegsArch2 and the corresponding functions -// Ptrace{Get,Set}Regs{arch1,arch2}. This permits debugging the other -// binary on a native system. -func generatePtracePair(arch1, arch2 string) error { - def1, err := ptraceDef(arch1) - if err != nil { - return err - } - def2, err := ptraceDef(arch2) - if err != nil { - return err - } - f, err := os.Create(fmt.Sprintf("zptrace%s_linux.go", arch1)) - if err != nil { - return err - } - buf := bufio.NewWriter(f) - fmt.Fprintf(buf, "// Code generated by linux/mkall.go generatePtracePair(%s, %s). DO NOT EDIT.\n", arch1, arch2) - fmt.Fprintf(buf, "\n") - fmt.Fprintf(buf, "// +build linux\n") - fmt.Fprintf(buf, "// +build %s %s\n", arch1, arch2) - fmt.Fprintf(buf, "\n") - fmt.Fprintf(buf, "package unix\n") - fmt.Fprintf(buf, "\n") - fmt.Fprintf(buf, "%s\n", `import "unsafe"`) - fmt.Fprintf(buf, "\n") - writeOnePtrace(buf, arch1, def1) - fmt.Fprintf(buf, "\n") - writeOnePtrace(buf, arch2, def2) - if err := buf.Flush(); err != nil { - return err - } - if err := f.Close(); err != nil { - return err - } - return nil -} - -// ptraceDef returns the definition of PtraceRegs for arch. -func ptraceDef(arch string) (string, error) { - filename := fmt.Sprintf("ztypes_linux_%s.go", arch) - data, err := ioutil.ReadFile(filename) - if err != nil { - return "", fmt.Errorf("reading %s: %v", filename, err) - } - start := bytes.Index(data, []byte("type PtraceRegs struct")) - if start < 0 { - return "", fmt.Errorf("%s: no definition of PtraceRegs", filename) - } - data = data[start:] - end := bytes.Index(data, []byte("\n}\n")) - if end < 0 { - return "", fmt.Errorf("%s: can't find end of PtraceRegs definition", filename) - } - return string(data[:end+2]), nil -} - -// writeOnePtrace writes out the ptrace definitions for arch. -func writeOnePtrace(w io.Writer, arch, def string) { - uarch := string(unicode.ToUpper(rune(arch[0]))) + arch[1:] - fmt.Fprintf(w, "// PtraceRegs%s is the registers used by %s binaries.\n", uarch, arch) - fmt.Fprintf(w, "%s\n", strings.Replace(def, "PtraceRegs", "PtraceRegs"+uarch, 1)) - fmt.Fprintf(w, "\n") - fmt.Fprintf(w, "// PtraceGetRegs%s fetches the registers used by %s binaries.\n", uarch, arch) - fmt.Fprintf(w, "func PtraceGetRegs%s(pid int, regsout *PtraceRegs%s) error {\n", uarch, uarch) - fmt.Fprintf(w, "\treturn ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))\n") - fmt.Fprintf(w, "}\n") - fmt.Fprintf(w, "\n") - fmt.Fprintf(w, "// PtraceSetRegs%s sets the registers used by %s binaries.\n", uarch, arch) - fmt.Fprintf(w, "func PtraceSetRegs%s(pid int, regs *PtraceRegs%s) error {\n", uarch, uarch) - fmt.Fprintf(w, "\treturn ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))\n") - fmt.Fprintf(w, "}\n") -} - -// cCode is compiled for the target architecture, and the resulting data section is carved for -// the statically initialized bit masks. -const cCode = ` -// Bit fields are used in some system calls and other ABIs, but their memory layout is -// implementation-defined [1]. Even with formal ABIs, bit fields are a source of subtle bugs [2]. -// Here we generate the offsets for all 64 bits in an uint64. -// 1: http://en.cppreference.com/w/c/language/bit_field -// 2: https://lwn.net/Articles/478657/ - -#include - -struct bitfield { - union { - uint64_t val; - struct { - uint64_t u64_bit_0 : 1; - uint64_t u64_bit_1 : 1; - uint64_t u64_bit_2 : 1; - uint64_t u64_bit_3 : 1; - uint64_t u64_bit_4 : 1; - uint64_t u64_bit_5 : 1; - uint64_t u64_bit_6 : 1; - uint64_t u64_bit_7 : 1; - uint64_t u64_bit_8 : 1; - uint64_t u64_bit_9 : 1; - uint64_t u64_bit_10 : 1; - uint64_t u64_bit_11 : 1; - uint64_t u64_bit_12 : 1; - uint64_t u64_bit_13 : 1; - uint64_t u64_bit_14 : 1; - uint64_t u64_bit_15 : 1; - uint64_t u64_bit_16 : 1; - uint64_t u64_bit_17 : 1; - uint64_t u64_bit_18 : 1; - uint64_t u64_bit_19 : 1; - uint64_t u64_bit_20 : 1; - uint64_t u64_bit_21 : 1; - uint64_t u64_bit_22 : 1; - uint64_t u64_bit_23 : 1; - uint64_t u64_bit_24 : 1; - uint64_t u64_bit_25 : 1; - uint64_t u64_bit_26 : 1; - uint64_t u64_bit_27 : 1; - uint64_t u64_bit_28 : 1; - uint64_t u64_bit_29 : 1; - uint64_t u64_bit_30 : 1; - uint64_t u64_bit_31 : 1; - uint64_t u64_bit_32 : 1; - uint64_t u64_bit_33 : 1; - uint64_t u64_bit_34 : 1; - uint64_t u64_bit_35 : 1; - uint64_t u64_bit_36 : 1; - uint64_t u64_bit_37 : 1; - uint64_t u64_bit_38 : 1; - uint64_t u64_bit_39 : 1; - uint64_t u64_bit_40 : 1; - uint64_t u64_bit_41 : 1; - uint64_t u64_bit_42 : 1; - uint64_t u64_bit_43 : 1; - uint64_t u64_bit_44 : 1; - uint64_t u64_bit_45 : 1; - uint64_t u64_bit_46 : 1; - uint64_t u64_bit_47 : 1; - uint64_t u64_bit_48 : 1; - uint64_t u64_bit_49 : 1; - uint64_t u64_bit_50 : 1; - uint64_t u64_bit_51 : 1; - uint64_t u64_bit_52 : 1; - uint64_t u64_bit_53 : 1; - uint64_t u64_bit_54 : 1; - uint64_t u64_bit_55 : 1; - uint64_t u64_bit_56 : 1; - uint64_t u64_bit_57 : 1; - uint64_t u64_bit_58 : 1; - uint64_t u64_bit_59 : 1; - uint64_t u64_bit_60 : 1; - uint64_t u64_bit_61 : 1; - uint64_t u64_bit_62 : 1; - uint64_t u64_bit_63 : 1; - }; - }; -}; - -struct bitfield masks[] = { - {.u64_bit_0 = 1}, - {.u64_bit_1 = 1}, - {.u64_bit_2 = 1}, - {.u64_bit_3 = 1}, - {.u64_bit_4 = 1}, - {.u64_bit_5 = 1}, - {.u64_bit_6 = 1}, - {.u64_bit_7 = 1}, - {.u64_bit_8 = 1}, - {.u64_bit_9 = 1}, - {.u64_bit_10 = 1}, - {.u64_bit_11 = 1}, - {.u64_bit_12 = 1}, - {.u64_bit_13 = 1}, - {.u64_bit_14 = 1}, - {.u64_bit_15 = 1}, - {.u64_bit_16 = 1}, - {.u64_bit_17 = 1}, - {.u64_bit_18 = 1}, - {.u64_bit_19 = 1}, - {.u64_bit_20 = 1}, - {.u64_bit_21 = 1}, - {.u64_bit_22 = 1}, - {.u64_bit_23 = 1}, - {.u64_bit_24 = 1}, - {.u64_bit_25 = 1}, - {.u64_bit_26 = 1}, - {.u64_bit_27 = 1}, - {.u64_bit_28 = 1}, - {.u64_bit_29 = 1}, - {.u64_bit_30 = 1}, - {.u64_bit_31 = 1}, - {.u64_bit_32 = 1}, - {.u64_bit_33 = 1}, - {.u64_bit_34 = 1}, - {.u64_bit_35 = 1}, - {.u64_bit_36 = 1}, - {.u64_bit_37 = 1}, - {.u64_bit_38 = 1}, - {.u64_bit_39 = 1}, - {.u64_bit_40 = 1}, - {.u64_bit_41 = 1}, - {.u64_bit_42 = 1}, - {.u64_bit_43 = 1}, - {.u64_bit_44 = 1}, - {.u64_bit_45 = 1}, - {.u64_bit_46 = 1}, - {.u64_bit_47 = 1}, - {.u64_bit_48 = 1}, - {.u64_bit_49 = 1}, - {.u64_bit_50 = 1}, - {.u64_bit_51 = 1}, - {.u64_bit_52 = 1}, - {.u64_bit_53 = 1}, - {.u64_bit_54 = 1}, - {.u64_bit_55 = 1}, - {.u64_bit_56 = 1}, - {.u64_bit_57 = 1}, - {.u64_bit_58 = 1}, - {.u64_bit_59 = 1}, - {.u64_bit_60 = 1}, - {.u64_bit_61 = 1}, - {.u64_bit_62 = 1}, - {.u64_bit_63 = 1} -}; - -int main(int argc, char **argv) { - struct bitfield *mask_ptr = &masks[0]; - return mask_ptr->val; -} - -` diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mksysnum.pl b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mksysnum.pl deleted file mode 100644 index 63fd800bcb..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/linux/mksysnum.pl +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2009 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. - -use strict; - -if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { - print STDERR "GOARCH or GOOS not defined in environment\n"; - exit 1; -} - -# Check that we are using the new build system if we should -if($ENV{'GOLANG_SYS_BUILD'} ne "docker") { - print STDERR "In the new build system, mksysnum should not be called directly.\n"; - print STDERR "See README.md\n"; - exit 1; -} - -my $command = "$0 ". join(' ', @ARGV); - -print < 999){ - # ignore deprecated syscalls that are no longer implemented - # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 - return; - } - $name =~ y/a-z/A-Z/; - $num = $num + $offset; - print " SYS_$name = $num;\n"; -} - -my $prev; -open(CC, "$ENV{'CC'} -E -dD @ARGV |") || die "can't run $ENV{'CC'}"; -while(){ - if(/^#define __NR_Linux\s+([0-9]+)/){ - # mips/mips64: extract offset - $offset = $1; - } - elsif(/^#define __NR(\w*)_SYSCALL_BASE\s+([0-9]+)/){ - # arm: extract offset - $offset = $1; - } - elsif(/^#define __NR_syscalls\s+/) { - # ignore redefinitions of __NR_syscalls - } - elsif(/^#define __NR_(\w*)Linux_syscalls\s+/) { - # mips/mips64: ignore definitions about the number of syscalls - } - elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ - $prev = $2; - fmt($1, $2); - } - elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ - $prev = $2; - fmt($1, $2); - } - elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ - fmt($1, $prev+$2) - } - elsif(/^#define __NR_(\w+)\s+\(__NR_Linux \+ ([0-9]+)/){ - fmt($1, $2); - } - elsif(/^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE \+ ([0-9]+)/){ - fmt($1, $2); - } -} - -print < -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// abi/abi.h generated by mkall.go. -#include "abi/abi.h" - -// On mips64, the glibc stat and kernel stat do not agree -#if (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) - -// Use the stat defined by the kernel with a few modifications. These are: -// * The time fields (like st_atime and st_atimensec) use the timespec -// struct (like st_atim) for consistency with the glibc fields. -// * The padding fields get different names to not break compatibility. -// * st_blocks is signed, again for compatibility. -struct stat { - unsigned int st_dev; - unsigned int st_pad1[3]; // Reserved for st_dev expansion - - unsigned long st_ino; - - mode_t st_mode; - __u32 st_nlink; - - uid_t st_uid; - gid_t st_gid; - - unsigned int st_rdev; - unsigned int st_pad2[3]; // Reserved for st_rdev expansion - - off_t st_size; - - // These are declared as separate fields in the kernel. Here we use - // the timespec struct for consistency with the other stat structs. - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - - unsigned int st_blksize; - unsigned int st_pad4; - - long st_blocks; -}; - -// These are needed because we do not include fcntl.h or sys/types.h -#include -#include - -#else - -// Use the stat defined by glibc -#include -#include - -#endif - -// These are defined in linux/fcntl.h, but including it globally causes -// conflicts with fcntl.h -#ifndef AT_STATX_SYNC_TYPE -# define AT_STATX_SYNC_TYPE 0x6000 // Type of synchronisation required from statx() -#endif -#ifndef AT_STATX_SYNC_AS_STAT -# define AT_STATX_SYNC_AS_STAT 0x0000 // - Do whatever stat() does -#endif -#ifndef AT_STATX_FORCE_SYNC -# define AT_STATX_FORCE_SYNC 0x2000 // - Force the attributes to be sync'd with the server -#endif -#ifndef AT_STATX_DONT_SYNC -# define AT_STATX_DONT_SYNC 0x4000 // - Don't sync attributes with the server -#endif - -#ifdef TCSETS2 -// On systems that have "struct termios2" use this as type Termios. -typedef struct termios2 termios_t; -#else -typedef struct termios termios_t; -#endif - -enum { - sizeofPtr = sizeof(void*), -}; - -union sockaddr_all { - struct sockaddr s1; // this one gets used for fields - struct sockaddr_in s2; // these pad it out - struct sockaddr_in6 s3; - struct sockaddr_un s4; - struct sockaddr_ll s5; - struct sockaddr_nl s6; -}; - -struct sockaddr_any { - struct sockaddr addr; - char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; -}; - -// copied from /usr/include/bluetooth/hci.h -struct sockaddr_hci { - sa_family_t hci_family; - unsigned short hci_dev; - unsigned short hci_channel; -}; - -// copied from /usr/include/bluetooth/bluetooth.h -#define BDADDR_BREDR 0x00 -#define BDADDR_LE_PUBLIC 0x01 -#define BDADDR_LE_RANDOM 0x02 - -// copied from /usr/include/bluetooth/l2cap.h -struct sockaddr_l2 { - sa_family_t l2_family; - unsigned short l2_psm; - uint8_t l2_bdaddr[6]; - unsigned short l2_cid; - uint8_t l2_bdaddr_type; -}; - -// copied from /usr/include/linux/un.h -struct my_sockaddr_un { - sa_family_t sun_family; -#if defined(__ARM_EABI__) || defined(__powerpc64__) - // on ARM char is by default unsigned - signed char sun_path[108]; -#else - char sun_path[108]; -#endif -}; - -#ifdef __ARM_EABI__ -typedef struct user_regs PtraceRegs; -#elif defined(__aarch64__) -typedef struct user_pt_regs PtraceRegs; -#elif defined(__mips__) || defined(__powerpc64__) -typedef struct pt_regs PtraceRegs; -#elif defined(__s390x__) -typedef struct _user_regs_struct PtraceRegs; -#elif defined(__sparc__) -#include -typedef struct pt_regs PtraceRegs; -#else -typedef struct user_regs_struct PtraceRegs; -#endif - -#if defined(__s390x__) -typedef struct _user_psw_struct ptracePsw; -typedef struct _user_fpregs_struct ptraceFpregs; -typedef struct _user_per_struct ptracePer; -#else -typedef struct {} ptracePsw; -typedef struct {} ptraceFpregs; -typedef struct {} ptracePer; -#endif - -// The real epoll_event is a union, and godefs doesn't handle it well. -struct my_epoll_event { - uint32_t events; -#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32) - // padding is not specified in linux/eventpoll.h but added to conform to the - // alignment requirements of EABI - int32_t padFd; -#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) - int32_t _padFd; -#endif - int32_t fd; - int32_t pad; -}; - -// Copied from with the following modifications: -// 1) bit field after read_format redeclared as '__u64 bits' to make it -// accessible from Go -// 2) collapsed the unions, to avoid confusing godoc for the generated output -// (e.g. having to use BpAddr as an extension of Config) -struct perf_event_attr_go { - __u32 type; - - __u32 size; - __u64 config; - - // union { - // __u64 sample_period; - // __u64 sample_freq; - // }; - __u64 sample; - - __u64 sample_type; - __u64 read_format; - - // Replaces the bit field. Flags are defined as constants. - __u64 bits; - - // union { - // __u32 wakeup_events; - // __u32 wakeup_watermark; - // }; - __u32 wakeup; - - __u32 bp_type; - - // union { - // __u64 bp_addr; - // __u64 config1; - // }; - __u64 ext1; - - // union { - // __u64 bp_len; - // __u64 config2; - // }; - __u64 ext2; - - __u64 branch_sample_type; - - __u64 sample_regs_user; - - __u32 sample_stack_user; - - __s32 clockid; - __u64 sample_regs_intr; - __u32 aux_watermark; - __u32 __reserved_2; -}; - -*/ -import "C" - -// Machine characteristics; for internal use. - -const ( - sizeofPtr = C.sizeofPtr - sizeofShort = C.sizeof_short - sizeofInt = C.sizeof_int - sizeofLong = C.sizeof_long - sizeofLongLong = C.sizeof_longlong - PathMax = C.PATH_MAX -) - -// Basic types - -type ( - _C_short C.short - _C_int C.int - _C_long C.long - _C_long_long C.longlong -) - -// Time - -type Timespec C.struct_timespec - -type Timeval C.struct_timeval - -type Timex C.struct_timex - -type Time_t C.time_t - -type Tms C.struct_tms - -type Utimbuf C.struct_utimbuf - -// Processes - -type Rusage C.struct_rusage - -type Rlimit C.struct_rlimit - -type _Gid_t C.gid_t - -// Files - -type Stat_t C.struct_stat - -type StatxTimestamp C.struct_statx_timestamp - -type Statx_t C.struct_statx - -type Dirent C.struct_dirent - -type Fsid C.fsid_t - -type Flock_t C.struct_flock - -// Filesystem Encryption - -type FscryptPolicy C.struct_fscrypt_policy - -type FscryptKey C.struct_fscrypt_key - -// Structure for Keyctl - -type KeyctlDHParams C.struct_keyctl_dh_params - -// Advice to Fadvise - -const ( - FADV_NORMAL = C.POSIX_FADV_NORMAL - FADV_RANDOM = C.POSIX_FADV_RANDOM - FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL - FADV_WILLNEED = C.POSIX_FADV_WILLNEED - FADV_DONTNEED = C.POSIX_FADV_DONTNEED - FADV_NOREUSE = C.POSIX_FADV_NOREUSE -) - -// Sockets - -type RawSockaddrInet4 C.struct_sockaddr_in - -type RawSockaddrInet6 C.struct_sockaddr_in6 - -type RawSockaddrUnix C.struct_my_sockaddr_un - -type RawSockaddrLinklayer C.struct_sockaddr_ll - -type RawSockaddrNetlink C.struct_sockaddr_nl - -type RawSockaddrHCI C.struct_sockaddr_hci - -type RawSockaddrL2 C.struct_sockaddr_l2 - -type RawSockaddrCAN C.struct_sockaddr_can - -type RawSockaddrALG C.struct_sockaddr_alg - -type RawSockaddrVM C.struct_sockaddr_vm - -type RawSockaddr C.struct_sockaddr - -type RawSockaddrAny C.struct_sockaddr_any - -type _Socklen C.socklen_t - -type Linger C.struct_linger - -type Iovec C.struct_iovec - -type IPMreq C.struct_ip_mreq - -type IPMreqn C.struct_ip_mreqn - -type IPv6Mreq C.struct_ipv6_mreq - -type PacketMreq C.struct_packet_mreq - -type Msghdr C.struct_msghdr - -type Cmsghdr C.struct_cmsghdr - -type Inet4Pktinfo C.struct_in_pktinfo - -type Inet6Pktinfo C.struct_in6_pktinfo - -type IPv6MTUInfo C.struct_ip6_mtuinfo - -type ICMPv6Filter C.struct_icmp6_filter - -type Ucred C.struct_ucred - -type TCPInfo C.struct_tcp_info - -const ( - SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in - SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - SizeofSockaddrAny = C.sizeof_struct_sockaddr_any - SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un - SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll - SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl - SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci - SizeofSockaddrL2 = C.sizeof_struct_sockaddr_l2 - SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can - SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg - SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm - SizeofLinger = C.sizeof_struct_linger - SizeofIovec = C.sizeof_struct_iovec - SizeofIPMreq = C.sizeof_struct_ip_mreq - SizeofIPMreqn = C.sizeof_struct_ip_mreqn - SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - SizeofPacketMreq = C.sizeof_struct_packet_mreq - SizeofMsghdr = C.sizeof_struct_msghdr - SizeofCmsghdr = C.sizeof_struct_cmsghdr - SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo - SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo - SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter - SizeofUcred = C.sizeof_struct_ucred - SizeofTCPInfo = C.sizeof_struct_tcp_info -) - -// Netlink routing and interface messages - -const ( - IFA_UNSPEC = C.IFA_UNSPEC - IFA_ADDRESS = C.IFA_ADDRESS - IFA_LOCAL = C.IFA_LOCAL - IFA_LABEL = C.IFA_LABEL - IFA_BROADCAST = C.IFA_BROADCAST - IFA_ANYCAST = C.IFA_ANYCAST - IFA_CACHEINFO = C.IFA_CACHEINFO - IFA_MULTICAST = C.IFA_MULTICAST - IFLA_UNSPEC = C.IFLA_UNSPEC - IFLA_ADDRESS = C.IFLA_ADDRESS - IFLA_BROADCAST = C.IFLA_BROADCAST - IFLA_IFNAME = C.IFLA_IFNAME - IFLA_MTU = C.IFLA_MTU - IFLA_LINK = C.IFLA_LINK - IFLA_QDISC = C.IFLA_QDISC - IFLA_STATS = C.IFLA_STATS - IFLA_COST = C.IFLA_COST - IFLA_PRIORITY = C.IFLA_PRIORITY - IFLA_MASTER = C.IFLA_MASTER - IFLA_WIRELESS = C.IFLA_WIRELESS - IFLA_PROTINFO = C.IFLA_PROTINFO - IFLA_TXQLEN = C.IFLA_TXQLEN - IFLA_MAP = C.IFLA_MAP - IFLA_WEIGHT = C.IFLA_WEIGHT - IFLA_OPERSTATE = C.IFLA_OPERSTATE - IFLA_LINKMODE = C.IFLA_LINKMODE - IFLA_LINKINFO = C.IFLA_LINKINFO - IFLA_NET_NS_PID = C.IFLA_NET_NS_PID - IFLA_IFALIAS = C.IFLA_IFALIAS - IFLA_NUM_VF = C.IFLA_NUM_VF - IFLA_VFINFO_LIST = C.IFLA_VFINFO_LIST - IFLA_STATS64 = C.IFLA_STATS64 - IFLA_VF_PORTS = C.IFLA_VF_PORTS - IFLA_PORT_SELF = C.IFLA_PORT_SELF - IFLA_AF_SPEC = C.IFLA_AF_SPEC - IFLA_GROUP = C.IFLA_GROUP - IFLA_NET_NS_FD = C.IFLA_NET_NS_FD - IFLA_EXT_MASK = C.IFLA_EXT_MASK - IFLA_PROMISCUITY = C.IFLA_PROMISCUITY - IFLA_NUM_TX_QUEUES = C.IFLA_NUM_TX_QUEUES - IFLA_NUM_RX_QUEUES = C.IFLA_NUM_RX_QUEUES - IFLA_CARRIER = C.IFLA_CARRIER - IFLA_PHYS_PORT_ID = C.IFLA_PHYS_PORT_ID - IFLA_CARRIER_CHANGES = C.IFLA_CARRIER_CHANGES - IFLA_PHYS_SWITCH_ID = C.IFLA_PHYS_SWITCH_ID - IFLA_LINK_NETNSID = C.IFLA_LINK_NETNSID - IFLA_PHYS_PORT_NAME = C.IFLA_PHYS_PORT_NAME - IFLA_PROTO_DOWN = C.IFLA_PROTO_DOWN - IFLA_GSO_MAX_SEGS = C.IFLA_GSO_MAX_SEGS - IFLA_GSO_MAX_SIZE = C.IFLA_GSO_MAX_SIZE - IFLA_PAD = C.IFLA_PAD - IFLA_XDP = C.IFLA_XDP - IFLA_EVENT = C.IFLA_EVENT - IFLA_NEW_NETNSID = C.IFLA_NEW_NETNSID - IFLA_IF_NETNSID = C.IFLA_IF_NETNSID - IFLA_MAX = C.IFLA_MAX - RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE - RT_SCOPE_SITE = C.RT_SCOPE_SITE - RT_SCOPE_LINK = C.RT_SCOPE_LINK - RT_SCOPE_HOST = C.RT_SCOPE_HOST - RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE - RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC - RT_TABLE_COMPAT = C.RT_TABLE_COMPAT - RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT - RT_TABLE_MAIN = C.RT_TABLE_MAIN - RT_TABLE_LOCAL = C.RT_TABLE_LOCAL - RT_TABLE_MAX = C.RT_TABLE_MAX - RTA_UNSPEC = C.RTA_UNSPEC - RTA_DST = C.RTA_DST - RTA_SRC = C.RTA_SRC - RTA_IIF = C.RTA_IIF - RTA_OIF = C.RTA_OIF - RTA_GATEWAY = C.RTA_GATEWAY - RTA_PRIORITY = C.RTA_PRIORITY - RTA_PREFSRC = C.RTA_PREFSRC - RTA_METRICS = C.RTA_METRICS - RTA_MULTIPATH = C.RTA_MULTIPATH - RTA_FLOW = C.RTA_FLOW - RTA_CACHEINFO = C.RTA_CACHEINFO - RTA_TABLE = C.RTA_TABLE - RTN_UNSPEC = C.RTN_UNSPEC - RTN_UNICAST = C.RTN_UNICAST - RTN_LOCAL = C.RTN_LOCAL - RTN_BROADCAST = C.RTN_BROADCAST - RTN_ANYCAST = C.RTN_ANYCAST - RTN_MULTICAST = C.RTN_MULTICAST - RTN_BLACKHOLE = C.RTN_BLACKHOLE - RTN_UNREACHABLE = C.RTN_UNREACHABLE - RTN_PROHIBIT = C.RTN_PROHIBIT - RTN_THROW = C.RTN_THROW - RTN_NAT = C.RTN_NAT - RTN_XRESOLVE = C.RTN_XRESOLVE - RTNLGRP_NONE = C.RTNLGRP_NONE - RTNLGRP_LINK = C.RTNLGRP_LINK - RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY - RTNLGRP_NEIGH = C.RTNLGRP_NEIGH - RTNLGRP_TC = C.RTNLGRP_TC - RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR - RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE - RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE - RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE - RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR - RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE - RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE - RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO - RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX - RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE - RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT - SizeofNlMsghdr = C.sizeof_struct_nlmsghdr - SizeofNlMsgerr = C.sizeof_struct_nlmsgerr - SizeofRtGenmsg = C.sizeof_struct_rtgenmsg - SizeofNlAttr = C.sizeof_struct_nlattr - SizeofRtAttr = C.sizeof_struct_rtattr - SizeofIfInfomsg = C.sizeof_struct_ifinfomsg - SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg - SizeofRtMsg = C.sizeof_struct_rtmsg - SizeofRtNexthop = C.sizeof_struct_rtnexthop -) - -type NlMsghdr C.struct_nlmsghdr - -type NlMsgerr C.struct_nlmsgerr - -type RtGenmsg C.struct_rtgenmsg - -type NlAttr C.struct_nlattr - -type RtAttr C.struct_rtattr - -type IfInfomsg C.struct_ifinfomsg - -type IfAddrmsg C.struct_ifaddrmsg - -type RtMsg C.struct_rtmsg - -type RtNexthop C.struct_rtnexthop - -// Linux socket filter - -const ( - SizeofSockFilter = C.sizeof_struct_sock_filter - SizeofSockFprog = C.sizeof_struct_sock_fprog -) - -type SockFilter C.struct_sock_filter - -type SockFprog C.struct_sock_fprog - -// Inotify - -type InotifyEvent C.struct_inotify_event - -const SizeofInotifyEvent = C.sizeof_struct_inotify_event - -// Ptrace - -// Register structures -type PtraceRegs C.PtraceRegs - -// Structures contained in PtraceRegs on s390x (exported by mkpost.go) -type PtracePsw C.ptracePsw - -type PtraceFpregs C.ptraceFpregs - -type PtracePer C.ptracePer - -// Misc - -type FdSet C.fd_set - -type Sysinfo_t C.struct_sysinfo - -type Utsname C.struct_utsname - -type Ustat_t C.struct_ustat - -type EpollEvent C.struct_my_epoll_event - -const ( - AT_EMPTY_PATH = C.AT_EMPTY_PATH - AT_FDCWD = C.AT_FDCWD - AT_NO_AUTOMOUNT = C.AT_NO_AUTOMOUNT - AT_REMOVEDIR = C.AT_REMOVEDIR - - AT_STATX_SYNC_AS_STAT = C.AT_STATX_SYNC_AS_STAT - AT_STATX_FORCE_SYNC = C.AT_STATX_FORCE_SYNC - AT_STATX_DONT_SYNC = C.AT_STATX_DONT_SYNC - - AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW - AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW -) - -type PollFd C.struct_pollfd - -const ( - POLLIN = C.POLLIN - POLLPRI = C.POLLPRI - POLLOUT = C.POLLOUT - POLLRDHUP = C.POLLRDHUP - POLLERR = C.POLLERR - POLLHUP = C.POLLHUP - POLLNVAL = C.POLLNVAL -) - -type Sigset_t C.sigset_t - -const RNDGETENTCNT = C.RNDGETENTCNT - -const PERF_IOC_FLAG_GROUP = C.PERF_IOC_FLAG_GROUP - -// Terminal handling - -type Termios C.termios_t - -type Winsize C.struct_winsize - -// Taskstats and cgroup stats. - -type Taskstats C.struct_taskstats - -const ( - TASKSTATS_CMD_UNSPEC = C.TASKSTATS_CMD_UNSPEC - TASKSTATS_CMD_GET = C.TASKSTATS_CMD_GET - TASKSTATS_CMD_NEW = C.TASKSTATS_CMD_NEW - TASKSTATS_TYPE_UNSPEC = C.TASKSTATS_TYPE_UNSPEC - TASKSTATS_TYPE_PID = C.TASKSTATS_TYPE_PID - TASKSTATS_TYPE_TGID = C.TASKSTATS_TYPE_TGID - TASKSTATS_TYPE_STATS = C.TASKSTATS_TYPE_STATS - TASKSTATS_TYPE_AGGR_PID = C.TASKSTATS_TYPE_AGGR_PID - TASKSTATS_TYPE_AGGR_TGID = C.TASKSTATS_TYPE_AGGR_TGID - TASKSTATS_TYPE_NULL = C.TASKSTATS_TYPE_NULL - TASKSTATS_CMD_ATTR_UNSPEC = C.TASKSTATS_CMD_ATTR_UNSPEC - TASKSTATS_CMD_ATTR_PID = C.TASKSTATS_CMD_ATTR_PID - TASKSTATS_CMD_ATTR_TGID = C.TASKSTATS_CMD_ATTR_TGID - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_REGISTER_CPUMASK - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK -) - -type CGroupStats C.struct_cgroupstats - -const ( - CGROUPSTATS_CMD_UNSPEC = C.__TASKSTATS_CMD_MAX - CGROUPSTATS_CMD_GET = C.CGROUPSTATS_CMD_GET - CGROUPSTATS_CMD_NEW = C.CGROUPSTATS_CMD_NEW - CGROUPSTATS_TYPE_UNSPEC = C.CGROUPSTATS_TYPE_UNSPEC - CGROUPSTATS_TYPE_CGROUP_STATS = C.CGROUPSTATS_TYPE_CGROUP_STATS - CGROUPSTATS_CMD_ATTR_UNSPEC = C.CGROUPSTATS_CMD_ATTR_UNSPEC - CGROUPSTATS_CMD_ATTR_FD = C.CGROUPSTATS_CMD_ATTR_FD -) - -// Generic netlink - -type Genlmsghdr C.struct_genlmsghdr - -const ( - CTRL_CMD_UNSPEC = C.CTRL_CMD_UNSPEC - CTRL_CMD_NEWFAMILY = C.CTRL_CMD_NEWFAMILY - CTRL_CMD_DELFAMILY = C.CTRL_CMD_DELFAMILY - CTRL_CMD_GETFAMILY = C.CTRL_CMD_GETFAMILY - CTRL_CMD_NEWOPS = C.CTRL_CMD_NEWOPS - CTRL_CMD_DELOPS = C.CTRL_CMD_DELOPS - CTRL_CMD_GETOPS = C.CTRL_CMD_GETOPS - CTRL_CMD_NEWMCAST_GRP = C.CTRL_CMD_NEWMCAST_GRP - CTRL_CMD_DELMCAST_GRP = C.CTRL_CMD_DELMCAST_GRP - CTRL_CMD_GETMCAST_GRP = C.CTRL_CMD_GETMCAST_GRP - CTRL_ATTR_UNSPEC = C.CTRL_ATTR_UNSPEC - CTRL_ATTR_FAMILY_ID = C.CTRL_ATTR_FAMILY_ID - CTRL_ATTR_FAMILY_NAME = C.CTRL_ATTR_FAMILY_NAME - CTRL_ATTR_VERSION = C.CTRL_ATTR_VERSION - CTRL_ATTR_HDRSIZE = C.CTRL_ATTR_HDRSIZE - CTRL_ATTR_MAXATTR = C.CTRL_ATTR_MAXATTR - CTRL_ATTR_OPS = C.CTRL_ATTR_OPS - CTRL_ATTR_MCAST_GROUPS = C.CTRL_ATTR_MCAST_GROUPS - CTRL_ATTR_OP_UNSPEC = C.CTRL_ATTR_OP_UNSPEC - CTRL_ATTR_OP_ID = C.CTRL_ATTR_OP_ID - CTRL_ATTR_OP_FLAGS = C.CTRL_ATTR_OP_FLAGS - CTRL_ATTR_MCAST_GRP_UNSPEC = C.CTRL_ATTR_MCAST_GRP_UNSPEC - CTRL_ATTR_MCAST_GRP_NAME = C.CTRL_ATTR_MCAST_GRP_NAME - CTRL_ATTR_MCAST_GRP_ID = C.CTRL_ATTR_MCAST_GRP_ID -) - -// CPU affinity - -type cpuMask C.__cpu_mask - -const ( - _CPU_SETSIZE = C.__CPU_SETSIZE - _NCPUBITS = C.__NCPUBITS -) - -// Bluetooth - -const ( - BDADDR_BREDR = C.BDADDR_BREDR - BDADDR_LE_PUBLIC = C.BDADDR_LE_PUBLIC - BDADDR_LE_RANDOM = C.BDADDR_LE_RANDOM -) - -// Perf subsystem - -type PerfEventAttr C.struct_perf_event_attr_go - -type PerfEventMmapPage C.struct_perf_event_mmap_page - -// Bit field in struct perf_event_attr expanded as flags. -// Set these on PerfEventAttr.Bits by ORing them together. -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = C.PERF_TYPE_HARDWARE - PERF_TYPE_SOFTWARE = C.PERF_TYPE_SOFTWARE - PERF_TYPE_TRACEPOINT = C.PERF_TYPE_TRACEPOINT - PERF_TYPE_HW_CACHE = C.PERF_TYPE_HW_CACHE - PERF_TYPE_RAW = C.PERF_TYPE_RAW - PERF_TYPE_BREAKPOINT = C.PERF_TYPE_BREAKPOINT - - PERF_COUNT_HW_CPU_CYCLES = C.PERF_COUNT_HW_CPU_CYCLES - PERF_COUNT_HW_INSTRUCTIONS = C.PERF_COUNT_HW_INSTRUCTIONS - PERF_COUNT_HW_CACHE_REFERENCES = C.PERF_COUNT_HW_CACHE_REFERENCES - PERF_COUNT_HW_CACHE_MISSES = C.PERF_COUNT_HW_CACHE_MISSES - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = C.PERF_COUNT_HW_BRANCH_INSTRUCTIONS - PERF_COUNT_HW_BRANCH_MISSES = C.PERF_COUNT_HW_BRANCH_MISSES - PERF_COUNT_HW_BUS_CYCLES = C.PERF_COUNT_HW_BUS_CYCLES - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = C.PERF_COUNT_HW_STALLED_CYCLES_FRONTEND - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = C.PERF_COUNT_HW_STALLED_CYCLES_BACKEND - PERF_COUNT_HW_REF_CPU_CYCLES = C.PERF_COUNT_HW_REF_CPU_CYCLES - - PERF_COUNT_HW_CACHE_L1D = C.PERF_COUNT_HW_CACHE_L1D - PERF_COUNT_HW_CACHE_L1I = C.PERF_COUNT_HW_CACHE_L1I - PERF_COUNT_HW_CACHE_LL = C.PERF_COUNT_HW_CACHE_LL - PERF_COUNT_HW_CACHE_DTLB = C.PERF_COUNT_HW_CACHE_DTLB - PERF_COUNT_HW_CACHE_ITLB = C.PERF_COUNT_HW_CACHE_ITLB - PERF_COUNT_HW_CACHE_BPU = C.PERF_COUNT_HW_CACHE_BPU - PERF_COUNT_HW_CACHE_NODE = C.PERF_COUNT_HW_CACHE_NODE - - PERF_COUNT_HW_CACHE_OP_READ = C.PERF_COUNT_HW_CACHE_OP_READ - PERF_COUNT_HW_CACHE_OP_WRITE = C.PERF_COUNT_HW_CACHE_OP_WRITE - PERF_COUNT_HW_CACHE_OP_PREFETCH = C.PERF_COUNT_HW_CACHE_OP_PREFETCH - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = C.PERF_COUNT_HW_CACHE_RESULT_ACCESS - PERF_COUNT_HW_CACHE_RESULT_MISS = C.PERF_COUNT_HW_CACHE_RESULT_MISS - - PERF_COUNT_SW_CPU_CLOCK = C.PERF_COUNT_SW_CPU_CLOCK - PERF_COUNT_SW_TASK_CLOCK = C.PERF_COUNT_SW_TASK_CLOCK - PERF_COUNT_SW_PAGE_FAULTS = C.PERF_COUNT_SW_PAGE_FAULTS - PERF_COUNT_SW_CONTEXT_SWITCHES = C.PERF_COUNT_SW_CONTEXT_SWITCHES - PERF_COUNT_SW_CPU_MIGRATIONS = C.PERF_COUNT_SW_CPU_MIGRATIONS - PERF_COUNT_SW_PAGE_FAULTS_MIN = C.PERF_COUNT_SW_PAGE_FAULTS_MIN - PERF_COUNT_SW_PAGE_FAULTS_MAJ = C.PERF_COUNT_SW_PAGE_FAULTS_MAJ - PERF_COUNT_SW_ALIGNMENT_FAULTS = C.PERF_COUNT_SW_ALIGNMENT_FAULTS - PERF_COUNT_SW_EMULATION_FAULTS = C.PERF_COUNT_SW_EMULATION_FAULTS - PERF_COUNT_SW_DUMMY = C.PERF_COUNT_SW_DUMMY - - PERF_SAMPLE_IP = C.PERF_SAMPLE_IP - PERF_SAMPLE_TID = C.PERF_SAMPLE_TID - PERF_SAMPLE_TIME = C.PERF_SAMPLE_TIME - PERF_SAMPLE_ADDR = C.PERF_SAMPLE_ADDR - PERF_SAMPLE_READ = C.PERF_SAMPLE_READ - PERF_SAMPLE_CALLCHAIN = C.PERF_SAMPLE_CALLCHAIN - PERF_SAMPLE_ID = C.PERF_SAMPLE_ID - PERF_SAMPLE_CPU = C.PERF_SAMPLE_CPU - PERF_SAMPLE_PERIOD = C.PERF_SAMPLE_PERIOD - PERF_SAMPLE_STREAM_ID = C.PERF_SAMPLE_STREAM_ID - PERF_SAMPLE_RAW = C.PERF_SAMPLE_RAW - PERF_SAMPLE_BRANCH_STACK = C.PERF_SAMPLE_BRANCH_STACK - - PERF_SAMPLE_BRANCH_USER = C.PERF_SAMPLE_BRANCH_USER - PERF_SAMPLE_BRANCH_KERNEL = C.PERF_SAMPLE_BRANCH_KERNEL - PERF_SAMPLE_BRANCH_HV = C.PERF_SAMPLE_BRANCH_HV - PERF_SAMPLE_BRANCH_ANY = C.PERF_SAMPLE_BRANCH_ANY - PERF_SAMPLE_BRANCH_ANY_CALL = C.PERF_SAMPLE_BRANCH_ANY_CALL - PERF_SAMPLE_BRANCH_ANY_RETURN = C.PERF_SAMPLE_BRANCH_ANY_RETURN - PERF_SAMPLE_BRANCH_IND_CALL = C.PERF_SAMPLE_BRANCH_IND_CALL - - PERF_FORMAT_TOTAL_TIME_ENABLED = C.PERF_FORMAT_TOTAL_TIME_ENABLED - PERF_FORMAT_TOTAL_TIME_RUNNING = C.PERF_FORMAT_TOTAL_TIME_RUNNING - PERF_FORMAT_ID = C.PERF_FORMAT_ID - PERF_FORMAT_GROUP = C.PERF_FORMAT_GROUP - - PERF_RECORD_MMAP = C.PERF_RECORD_MMAP - PERF_RECORD_LOST = C.PERF_RECORD_LOST - PERF_RECORD_COMM = C.PERF_RECORD_COMM - PERF_RECORD_EXIT = C.PERF_RECORD_EXIT - PERF_RECORD_THROTTLE = C.PERF_RECORD_THROTTLE - PERF_RECORD_UNTHROTTLE = C.PERF_RECORD_UNTHROTTLE - PERF_RECORD_FORK = C.PERF_RECORD_FORK - PERF_RECORD_READ = C.PERF_RECORD_READ - PERF_RECORD_SAMPLE = C.PERF_RECORD_SAMPLE - - PERF_CONTEXT_HV = C.PERF_CONTEXT_HV - PERF_CONTEXT_KERNEL = C.PERF_CONTEXT_KERNEL - PERF_CONTEXT_USER = C.PERF_CONTEXT_USER - - PERF_CONTEXT_GUEST = C.PERF_CONTEXT_GUEST - PERF_CONTEXT_GUEST_KERNEL = C.PERF_CONTEXT_GUEST_KERNEL - PERF_CONTEXT_GUEST_USER = C.PERF_CONTEXT_GUEST_USER - - PERF_FLAG_FD_NO_GROUP = C.PERF_FLAG_FD_NO_GROUP - PERF_FLAG_FD_OUTPUT = C.PERF_FLAG_FD_OUTPUT - PERF_FLAG_PID_CGROUP = C.PERF_FLAG_PID_CGROUP -) - -// Platform ABI and calling convention - -// Bit field masks for interoperability with C code that uses bit fields. -// Each mask corresponds to a single bit set - bit field behavior can be replicated by combining -// the masks with bitwise OR. -const ( - CBitFieldMaskBit0 = C.BITFIELD_MASK_0 - CBitFieldMaskBit1 = C.BITFIELD_MASK_1 - CBitFieldMaskBit2 = C.BITFIELD_MASK_2 - CBitFieldMaskBit3 = C.BITFIELD_MASK_3 - CBitFieldMaskBit4 = C.BITFIELD_MASK_4 - CBitFieldMaskBit5 = C.BITFIELD_MASK_5 - CBitFieldMaskBit6 = C.BITFIELD_MASK_6 - CBitFieldMaskBit7 = C.BITFIELD_MASK_7 - CBitFieldMaskBit8 = C.BITFIELD_MASK_8 - CBitFieldMaskBit9 = C.BITFIELD_MASK_9 - CBitFieldMaskBit10 = C.BITFIELD_MASK_10 - CBitFieldMaskBit11 = C.BITFIELD_MASK_11 - CBitFieldMaskBit12 = C.BITFIELD_MASK_12 - CBitFieldMaskBit13 = C.BITFIELD_MASK_13 - CBitFieldMaskBit14 = C.BITFIELD_MASK_14 - CBitFieldMaskBit15 = C.BITFIELD_MASK_15 - CBitFieldMaskBit16 = C.BITFIELD_MASK_16 - CBitFieldMaskBit17 = C.BITFIELD_MASK_17 - CBitFieldMaskBit18 = C.BITFIELD_MASK_18 - CBitFieldMaskBit19 = C.BITFIELD_MASK_19 - CBitFieldMaskBit20 = C.BITFIELD_MASK_20 - CBitFieldMaskBit21 = C.BITFIELD_MASK_21 - CBitFieldMaskBit22 = C.BITFIELD_MASK_22 - CBitFieldMaskBit23 = C.BITFIELD_MASK_23 - CBitFieldMaskBit24 = C.BITFIELD_MASK_24 - CBitFieldMaskBit25 = C.BITFIELD_MASK_25 - CBitFieldMaskBit26 = C.BITFIELD_MASK_26 - CBitFieldMaskBit27 = C.BITFIELD_MASK_27 - CBitFieldMaskBit28 = C.BITFIELD_MASK_28 - CBitFieldMaskBit29 = C.BITFIELD_MASK_29 - CBitFieldMaskBit30 = C.BITFIELD_MASK_30 - CBitFieldMaskBit31 = C.BITFIELD_MASK_31 - CBitFieldMaskBit32 = C.BITFIELD_MASK_32 - CBitFieldMaskBit33 = C.BITFIELD_MASK_33 - CBitFieldMaskBit34 = C.BITFIELD_MASK_34 - CBitFieldMaskBit35 = C.BITFIELD_MASK_35 - CBitFieldMaskBit36 = C.BITFIELD_MASK_36 - CBitFieldMaskBit37 = C.BITFIELD_MASK_37 - CBitFieldMaskBit38 = C.BITFIELD_MASK_38 - CBitFieldMaskBit39 = C.BITFIELD_MASK_39 - CBitFieldMaskBit40 = C.BITFIELD_MASK_40 - CBitFieldMaskBit41 = C.BITFIELD_MASK_41 - CBitFieldMaskBit42 = C.BITFIELD_MASK_42 - CBitFieldMaskBit43 = C.BITFIELD_MASK_43 - CBitFieldMaskBit44 = C.BITFIELD_MASK_44 - CBitFieldMaskBit45 = C.BITFIELD_MASK_45 - CBitFieldMaskBit46 = C.BITFIELD_MASK_46 - CBitFieldMaskBit47 = C.BITFIELD_MASK_47 - CBitFieldMaskBit48 = C.BITFIELD_MASK_48 - CBitFieldMaskBit49 = C.BITFIELD_MASK_49 - CBitFieldMaskBit50 = C.BITFIELD_MASK_50 - CBitFieldMaskBit51 = C.BITFIELD_MASK_51 - CBitFieldMaskBit52 = C.BITFIELD_MASK_52 - CBitFieldMaskBit53 = C.BITFIELD_MASK_53 - CBitFieldMaskBit54 = C.BITFIELD_MASK_54 - CBitFieldMaskBit55 = C.BITFIELD_MASK_55 - CBitFieldMaskBit56 = C.BITFIELD_MASK_56 - CBitFieldMaskBit57 = C.BITFIELD_MASK_57 - CBitFieldMaskBit58 = C.BITFIELD_MASK_58 - CBitFieldMaskBit59 = C.BITFIELD_MASK_59 - CBitFieldMaskBit60 = C.BITFIELD_MASK_60 - CBitFieldMaskBit61 = C.BITFIELD_MASK_61 - CBitFieldMaskBit62 = C.BITFIELD_MASK_62 - CBitFieldMaskBit63 = C.BITFIELD_MASK_63 -) - -// TCP-MD5 signature. - -type SockaddrStorage C.struct_sockaddr_storage - -type TCPMD5Sig C.struct_tcp_md5sig - -// Disk drive operations. - -type HDDriveCmdHdr C.struct_hd_drive_cmd_hdr - -type HDGeometry C.struct_hd_geometry - -type HDDriveID C.struct_hd_driveid - -// Statfs - -type Statfs_t C.struct_statfs - -const ( - ST_MANDLOCK = C.ST_MANDLOCK - ST_NOATIME = C.ST_NOATIME - ST_NODEV = C.ST_NODEV - ST_NODIRATIME = C.ST_NODIRATIME - ST_NOEXEC = C.ST_NOEXEC - ST_NOSUID = C.ST_NOSUID - ST_RDONLY = C.ST_RDONLY - ST_RELATIME = C.ST_RELATIME - ST_SYNCHRONOUS = C.ST_SYNCHRONOUS -) - -// TPacket - -type TpacketHdr C.struct_tpacket_hdr - -type Tpacket2Hdr C.struct_tpacket2_hdr - -type Tpacket3Hdr C.struct_tpacket3_hdr - -type TpacketHdrVariant1 C.struct_tpacket_hdr_variant1 - -type TpacketBlockDesc C.struct_tpacket_block_desc - -type TpacketReq C.struct_tpacket_req - -type TpacketReq3 C.struct_tpacket_req3 - -type TpacketStats C.struct_tpacket_stats - -type TpacketStatsV3 C.struct_tpacket_stats_v3 - -type TpacketAuxdata C.struct_tpacket_auxdata - -const ( - TPACKET_V1 = C.TPACKET_V1 - TPACKET_V2 = C.TPACKET_V2 - TPACKET_V3 = C.TPACKET_V3 -) - -const ( - SizeofTpacketHdr = C.sizeof_struct_tpacket_hdr - SizeofTpacket2Hdr = C.sizeof_struct_tpacket2_hdr - SizeofTpacket3Hdr = C.sizeof_struct_tpacket3_hdr -) - -// netfilter -// generated using: -// perl -nlE '/^\s*(NF\w+)/ && say "$1 = C.$1"' /usr/include/linux/netfilter.h -const ( - NF_INET_PRE_ROUTING = C.NF_INET_PRE_ROUTING - NF_INET_LOCAL_IN = C.NF_INET_LOCAL_IN - NF_INET_FORWARD = C.NF_INET_FORWARD - NF_INET_LOCAL_OUT = C.NF_INET_LOCAL_OUT - NF_INET_POST_ROUTING = C.NF_INET_POST_ROUTING - NF_INET_NUMHOOKS = C.NF_INET_NUMHOOKS -) - -const ( - NF_NETDEV_INGRESS = C.NF_NETDEV_INGRESS - NF_NETDEV_NUMHOOKS = C.NF_NETDEV_NUMHOOKS -) - -const ( - NFPROTO_UNSPEC = C.NFPROTO_UNSPEC - NFPROTO_INET = C.NFPROTO_INET - NFPROTO_IPV4 = C.NFPROTO_IPV4 - NFPROTO_ARP = C.NFPROTO_ARP - NFPROTO_NETDEV = C.NFPROTO_NETDEV - NFPROTO_BRIDGE = C.NFPROTO_BRIDGE - NFPROTO_IPV6 = C.NFPROTO_IPV6 - NFPROTO_DECNET = C.NFPROTO_DECNET - NFPROTO_NUMPROTO = C.NFPROTO_NUMPROTO -) - -// netfilter nfnetlink -type Nfgenmsg C.struct_nfgenmsg - -const ( - NFNL_BATCH_UNSPEC = C.NFNL_BATCH_UNSPEC - NFNL_BATCH_GENID = C.NFNL_BATCH_GENID -) - -// netfilter nf_tables -// generated using: -// perl -nlE '/^\s*(NFT\w+)/ && say "$1 = C.$1"' /usr/include/linux/netfilter/nf_tables.h -const ( - NFT_REG_VERDICT = C.NFT_REG_VERDICT - NFT_REG_1 = C.NFT_REG_1 - NFT_REG_2 = C.NFT_REG_2 - NFT_REG_3 = C.NFT_REG_3 - NFT_REG_4 = C.NFT_REG_4 - NFT_REG32_00 = C.NFT_REG32_00 - NFT_REG32_01 = C.NFT_REG32_01 - NFT_REG32_02 = C.NFT_REG32_02 - NFT_REG32_03 = C.NFT_REG32_03 - NFT_REG32_04 = C.NFT_REG32_04 - NFT_REG32_05 = C.NFT_REG32_05 - NFT_REG32_06 = C.NFT_REG32_06 - NFT_REG32_07 = C.NFT_REG32_07 - NFT_REG32_08 = C.NFT_REG32_08 - NFT_REG32_09 = C.NFT_REG32_09 - NFT_REG32_10 = C.NFT_REG32_10 - NFT_REG32_11 = C.NFT_REG32_11 - NFT_REG32_12 = C.NFT_REG32_12 - NFT_REG32_13 = C.NFT_REG32_13 - NFT_REG32_14 = C.NFT_REG32_14 - NFT_REG32_15 = C.NFT_REG32_15 - NFT_CONTINUE = C.NFT_CONTINUE - NFT_BREAK = C.NFT_BREAK - NFT_JUMP = C.NFT_JUMP - NFT_GOTO = C.NFT_GOTO - NFT_RETURN = C.NFT_RETURN - NFT_MSG_NEWTABLE = C.NFT_MSG_NEWTABLE - NFT_MSG_GETTABLE = C.NFT_MSG_GETTABLE - NFT_MSG_DELTABLE = C.NFT_MSG_DELTABLE - NFT_MSG_NEWCHAIN = C.NFT_MSG_NEWCHAIN - NFT_MSG_GETCHAIN = C.NFT_MSG_GETCHAIN - NFT_MSG_DELCHAIN = C.NFT_MSG_DELCHAIN - NFT_MSG_NEWRULE = C.NFT_MSG_NEWRULE - NFT_MSG_GETRULE = C.NFT_MSG_GETRULE - NFT_MSG_DELRULE = C.NFT_MSG_DELRULE - NFT_MSG_NEWSET = C.NFT_MSG_NEWSET - NFT_MSG_GETSET = C.NFT_MSG_GETSET - NFT_MSG_DELSET = C.NFT_MSG_DELSET - NFT_MSG_NEWSETELEM = C.NFT_MSG_NEWSETELEM - NFT_MSG_GETSETELEM = C.NFT_MSG_GETSETELEM - NFT_MSG_DELSETELEM = C.NFT_MSG_DELSETELEM - NFT_MSG_NEWGEN = C.NFT_MSG_NEWGEN - NFT_MSG_GETGEN = C.NFT_MSG_GETGEN - NFT_MSG_TRACE = C.NFT_MSG_TRACE - NFT_MSG_NEWOBJ = C.NFT_MSG_NEWOBJ - NFT_MSG_GETOBJ = C.NFT_MSG_GETOBJ - NFT_MSG_DELOBJ = C.NFT_MSG_DELOBJ - NFT_MSG_GETOBJ_RESET = C.NFT_MSG_GETOBJ_RESET - NFT_MSG_MAX = C.NFT_MSG_MAX - NFTA_LIST_UNPEC = C.NFTA_LIST_UNPEC - NFTA_LIST_ELEM = C.NFTA_LIST_ELEM - NFTA_HOOK_UNSPEC = C.NFTA_HOOK_UNSPEC - NFTA_HOOK_HOOKNUM = C.NFTA_HOOK_HOOKNUM - NFTA_HOOK_PRIORITY = C.NFTA_HOOK_PRIORITY - NFTA_HOOK_DEV = C.NFTA_HOOK_DEV - NFT_TABLE_F_DORMANT = C.NFT_TABLE_F_DORMANT - NFTA_TABLE_UNSPEC = C.NFTA_TABLE_UNSPEC - NFTA_TABLE_NAME = C.NFTA_TABLE_NAME - NFTA_TABLE_FLAGS = C.NFTA_TABLE_FLAGS - NFTA_TABLE_USE = C.NFTA_TABLE_USE - NFTA_CHAIN_UNSPEC = C.NFTA_CHAIN_UNSPEC - NFTA_CHAIN_TABLE = C.NFTA_CHAIN_TABLE - NFTA_CHAIN_HANDLE = C.NFTA_CHAIN_HANDLE - NFTA_CHAIN_NAME = C.NFTA_CHAIN_NAME - NFTA_CHAIN_HOOK = C.NFTA_CHAIN_HOOK - NFTA_CHAIN_POLICY = C.NFTA_CHAIN_POLICY - NFTA_CHAIN_USE = C.NFTA_CHAIN_USE - NFTA_CHAIN_TYPE = C.NFTA_CHAIN_TYPE - NFTA_CHAIN_COUNTERS = C.NFTA_CHAIN_COUNTERS - NFTA_CHAIN_PAD = C.NFTA_CHAIN_PAD - NFTA_RULE_UNSPEC = C.NFTA_RULE_UNSPEC - NFTA_RULE_TABLE = C.NFTA_RULE_TABLE - NFTA_RULE_CHAIN = C.NFTA_RULE_CHAIN - NFTA_RULE_HANDLE = C.NFTA_RULE_HANDLE - NFTA_RULE_EXPRESSIONS = C.NFTA_RULE_EXPRESSIONS - NFTA_RULE_COMPAT = C.NFTA_RULE_COMPAT - NFTA_RULE_POSITION = C.NFTA_RULE_POSITION - NFTA_RULE_USERDATA = C.NFTA_RULE_USERDATA - NFTA_RULE_PAD = C.NFTA_RULE_PAD - NFTA_RULE_ID = C.NFTA_RULE_ID - NFT_RULE_COMPAT_F_INV = C.NFT_RULE_COMPAT_F_INV - NFT_RULE_COMPAT_F_MASK = C.NFT_RULE_COMPAT_F_MASK - NFTA_RULE_COMPAT_UNSPEC = C.NFTA_RULE_COMPAT_UNSPEC - NFTA_RULE_COMPAT_PROTO = C.NFTA_RULE_COMPAT_PROTO - NFTA_RULE_COMPAT_FLAGS = C.NFTA_RULE_COMPAT_FLAGS - NFT_SET_ANONYMOUS = C.NFT_SET_ANONYMOUS - NFT_SET_CONSTANT = C.NFT_SET_CONSTANT - NFT_SET_INTERVAL = C.NFT_SET_INTERVAL - NFT_SET_MAP = C.NFT_SET_MAP - NFT_SET_TIMEOUT = C.NFT_SET_TIMEOUT - NFT_SET_EVAL = C.NFT_SET_EVAL - NFT_SET_OBJECT = C.NFT_SET_OBJECT - NFT_SET_POL_PERFORMANCE = C.NFT_SET_POL_PERFORMANCE - NFT_SET_POL_MEMORY = C.NFT_SET_POL_MEMORY - NFTA_SET_DESC_UNSPEC = C.NFTA_SET_DESC_UNSPEC - NFTA_SET_DESC_SIZE = C.NFTA_SET_DESC_SIZE - NFTA_SET_UNSPEC = C.NFTA_SET_UNSPEC - NFTA_SET_TABLE = C.NFTA_SET_TABLE - NFTA_SET_NAME = C.NFTA_SET_NAME - NFTA_SET_FLAGS = C.NFTA_SET_FLAGS - NFTA_SET_KEY_TYPE = C.NFTA_SET_KEY_TYPE - NFTA_SET_KEY_LEN = C.NFTA_SET_KEY_LEN - NFTA_SET_DATA_TYPE = C.NFTA_SET_DATA_TYPE - NFTA_SET_DATA_LEN = C.NFTA_SET_DATA_LEN - NFTA_SET_POLICY = C.NFTA_SET_POLICY - NFTA_SET_DESC = C.NFTA_SET_DESC - NFTA_SET_ID = C.NFTA_SET_ID - NFTA_SET_TIMEOUT = C.NFTA_SET_TIMEOUT - NFTA_SET_GC_INTERVAL = C.NFTA_SET_GC_INTERVAL - NFTA_SET_USERDATA = C.NFTA_SET_USERDATA - NFTA_SET_PAD = C.NFTA_SET_PAD - NFTA_SET_OBJ_TYPE = C.NFTA_SET_OBJ_TYPE - NFT_SET_ELEM_INTERVAL_END = C.NFT_SET_ELEM_INTERVAL_END - NFTA_SET_ELEM_UNSPEC = C.NFTA_SET_ELEM_UNSPEC - NFTA_SET_ELEM_KEY = C.NFTA_SET_ELEM_KEY - NFTA_SET_ELEM_DATA = C.NFTA_SET_ELEM_DATA - NFTA_SET_ELEM_FLAGS = C.NFTA_SET_ELEM_FLAGS - NFTA_SET_ELEM_TIMEOUT = C.NFTA_SET_ELEM_TIMEOUT - NFTA_SET_ELEM_EXPIRATION = C.NFTA_SET_ELEM_EXPIRATION - NFTA_SET_ELEM_USERDATA = C.NFTA_SET_ELEM_USERDATA - NFTA_SET_ELEM_EXPR = C.NFTA_SET_ELEM_EXPR - NFTA_SET_ELEM_PAD = C.NFTA_SET_ELEM_PAD - NFTA_SET_ELEM_OBJREF = C.NFTA_SET_ELEM_OBJREF - NFTA_SET_ELEM_LIST_UNSPEC = C.NFTA_SET_ELEM_LIST_UNSPEC - NFTA_SET_ELEM_LIST_TABLE = C.NFTA_SET_ELEM_LIST_TABLE - NFTA_SET_ELEM_LIST_SET = C.NFTA_SET_ELEM_LIST_SET - NFTA_SET_ELEM_LIST_ELEMENTS = C.NFTA_SET_ELEM_LIST_ELEMENTS - NFTA_SET_ELEM_LIST_SET_ID = C.NFTA_SET_ELEM_LIST_SET_ID - NFT_DATA_VALUE = C.NFT_DATA_VALUE - NFT_DATA_VERDICT = C.NFT_DATA_VERDICT - NFTA_DATA_UNSPEC = C.NFTA_DATA_UNSPEC - NFTA_DATA_VALUE = C.NFTA_DATA_VALUE - NFTA_DATA_VERDICT = C.NFTA_DATA_VERDICT - NFTA_VERDICT_UNSPEC = C.NFTA_VERDICT_UNSPEC - NFTA_VERDICT_CODE = C.NFTA_VERDICT_CODE - NFTA_VERDICT_CHAIN = C.NFTA_VERDICT_CHAIN - NFTA_EXPR_UNSPEC = C.NFTA_EXPR_UNSPEC - NFTA_EXPR_NAME = C.NFTA_EXPR_NAME - NFTA_EXPR_DATA = C.NFTA_EXPR_DATA - NFTA_IMMEDIATE_UNSPEC = C.NFTA_IMMEDIATE_UNSPEC - NFTA_IMMEDIATE_DREG = C.NFTA_IMMEDIATE_DREG - NFTA_IMMEDIATE_DATA = C.NFTA_IMMEDIATE_DATA - NFTA_BITWISE_UNSPEC = C.NFTA_BITWISE_UNSPEC - NFTA_BITWISE_SREG = C.NFTA_BITWISE_SREG - NFTA_BITWISE_DREG = C.NFTA_BITWISE_DREG - NFTA_BITWISE_LEN = C.NFTA_BITWISE_LEN - NFTA_BITWISE_MASK = C.NFTA_BITWISE_MASK - NFTA_BITWISE_XOR = C.NFTA_BITWISE_XOR - NFT_BYTEORDER_NTOH = C.NFT_BYTEORDER_NTOH - NFT_BYTEORDER_HTON = C.NFT_BYTEORDER_HTON - NFTA_BYTEORDER_UNSPEC = C.NFTA_BYTEORDER_UNSPEC - NFTA_BYTEORDER_SREG = C.NFTA_BYTEORDER_SREG - NFTA_BYTEORDER_DREG = C.NFTA_BYTEORDER_DREG - NFTA_BYTEORDER_OP = C.NFTA_BYTEORDER_OP - NFTA_BYTEORDER_LEN = C.NFTA_BYTEORDER_LEN - NFTA_BYTEORDER_SIZE = C.NFTA_BYTEORDER_SIZE - NFT_CMP_EQ = C.NFT_CMP_EQ - NFT_CMP_NEQ = C.NFT_CMP_NEQ - NFT_CMP_LT = C.NFT_CMP_LT - NFT_CMP_LTE = C.NFT_CMP_LTE - NFT_CMP_GT = C.NFT_CMP_GT - NFT_CMP_GTE = C.NFT_CMP_GTE - NFTA_CMP_UNSPEC = C.NFTA_CMP_UNSPEC - NFTA_CMP_SREG = C.NFTA_CMP_SREG - NFTA_CMP_OP = C.NFTA_CMP_OP - NFTA_CMP_DATA = C.NFTA_CMP_DATA - NFT_RANGE_EQ = C.NFT_RANGE_EQ - NFT_RANGE_NEQ = C.NFT_RANGE_NEQ - NFTA_RANGE_UNSPEC = C.NFTA_RANGE_UNSPEC - NFTA_RANGE_SREG = C.NFTA_RANGE_SREG - NFTA_RANGE_OP = C.NFTA_RANGE_OP - NFTA_RANGE_FROM_DATA = C.NFTA_RANGE_FROM_DATA - NFTA_RANGE_TO_DATA = C.NFTA_RANGE_TO_DATA - NFT_LOOKUP_F_INV = C.NFT_LOOKUP_F_INV - NFTA_LOOKUP_UNSPEC = C.NFTA_LOOKUP_UNSPEC - NFTA_LOOKUP_SET = C.NFTA_LOOKUP_SET - NFTA_LOOKUP_SREG = C.NFTA_LOOKUP_SREG - NFTA_LOOKUP_DREG = C.NFTA_LOOKUP_DREG - NFTA_LOOKUP_SET_ID = C.NFTA_LOOKUP_SET_ID - NFTA_LOOKUP_FLAGS = C.NFTA_LOOKUP_FLAGS - NFT_DYNSET_OP_ADD = C.NFT_DYNSET_OP_ADD - NFT_DYNSET_OP_UPDATE = C.NFT_DYNSET_OP_UPDATE - NFT_DYNSET_F_INV = C.NFT_DYNSET_F_INV - NFTA_DYNSET_UNSPEC = C.NFTA_DYNSET_UNSPEC - NFTA_DYNSET_SET_NAME = C.NFTA_DYNSET_SET_NAME - NFTA_DYNSET_SET_ID = C.NFTA_DYNSET_SET_ID - NFTA_DYNSET_OP = C.NFTA_DYNSET_OP - NFTA_DYNSET_SREG_KEY = C.NFTA_DYNSET_SREG_KEY - NFTA_DYNSET_SREG_DATA = C.NFTA_DYNSET_SREG_DATA - NFTA_DYNSET_TIMEOUT = C.NFTA_DYNSET_TIMEOUT - NFTA_DYNSET_EXPR = C.NFTA_DYNSET_EXPR - NFTA_DYNSET_PAD = C.NFTA_DYNSET_PAD - NFTA_DYNSET_FLAGS = C.NFTA_DYNSET_FLAGS - NFT_PAYLOAD_LL_HEADER = C.NFT_PAYLOAD_LL_HEADER - NFT_PAYLOAD_NETWORK_HEADER = C.NFT_PAYLOAD_NETWORK_HEADER - NFT_PAYLOAD_TRANSPORT_HEADER = C.NFT_PAYLOAD_TRANSPORT_HEADER - NFT_PAYLOAD_CSUM_NONE = C.NFT_PAYLOAD_CSUM_NONE - NFT_PAYLOAD_CSUM_INET = C.NFT_PAYLOAD_CSUM_INET - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = C.NFT_PAYLOAD_L4CSUM_PSEUDOHDR - NFTA_PAYLOAD_UNSPEC = C.NFTA_PAYLOAD_UNSPEC - NFTA_PAYLOAD_DREG = C.NFTA_PAYLOAD_DREG - NFTA_PAYLOAD_BASE = C.NFTA_PAYLOAD_BASE - NFTA_PAYLOAD_OFFSET = C.NFTA_PAYLOAD_OFFSET - NFTA_PAYLOAD_LEN = C.NFTA_PAYLOAD_LEN - NFTA_PAYLOAD_SREG = C.NFTA_PAYLOAD_SREG - NFTA_PAYLOAD_CSUM_TYPE = C.NFTA_PAYLOAD_CSUM_TYPE - NFTA_PAYLOAD_CSUM_OFFSET = C.NFTA_PAYLOAD_CSUM_OFFSET - NFTA_PAYLOAD_CSUM_FLAGS = C.NFTA_PAYLOAD_CSUM_FLAGS - NFT_EXTHDR_F_PRESENT = C.NFT_EXTHDR_F_PRESENT - NFT_EXTHDR_OP_IPV6 = C.NFT_EXTHDR_OP_IPV6 - NFT_EXTHDR_OP_TCPOPT = C.NFT_EXTHDR_OP_TCPOPT - NFTA_EXTHDR_UNSPEC = C.NFTA_EXTHDR_UNSPEC - NFTA_EXTHDR_DREG = C.NFTA_EXTHDR_DREG - NFTA_EXTHDR_TYPE = C.NFTA_EXTHDR_TYPE - NFTA_EXTHDR_OFFSET = C.NFTA_EXTHDR_OFFSET - NFTA_EXTHDR_LEN = C.NFTA_EXTHDR_LEN - NFTA_EXTHDR_FLAGS = C.NFTA_EXTHDR_FLAGS - NFTA_EXTHDR_OP = C.NFTA_EXTHDR_OP - NFTA_EXTHDR_SREG = C.NFTA_EXTHDR_SREG - NFT_META_LEN = C.NFT_META_LEN - NFT_META_PROTOCOL = C.NFT_META_PROTOCOL - NFT_META_PRIORITY = C.NFT_META_PRIORITY - NFT_META_MARK = C.NFT_META_MARK - NFT_META_IIF = C.NFT_META_IIF - NFT_META_OIF = C.NFT_META_OIF - NFT_META_IIFNAME = C.NFT_META_IIFNAME - NFT_META_OIFNAME = C.NFT_META_OIFNAME - NFT_META_IIFTYPE = C.NFT_META_IIFTYPE - NFT_META_OIFTYPE = C.NFT_META_OIFTYPE - NFT_META_SKUID = C.NFT_META_SKUID - NFT_META_SKGID = C.NFT_META_SKGID - NFT_META_NFTRACE = C.NFT_META_NFTRACE - NFT_META_RTCLASSID = C.NFT_META_RTCLASSID - NFT_META_SECMARK = C.NFT_META_SECMARK - NFT_META_NFPROTO = C.NFT_META_NFPROTO - NFT_META_L4PROTO = C.NFT_META_L4PROTO - NFT_META_BRI_IIFNAME = C.NFT_META_BRI_IIFNAME - NFT_META_BRI_OIFNAME = C.NFT_META_BRI_OIFNAME - NFT_META_PKTTYPE = C.NFT_META_PKTTYPE - NFT_META_CPU = C.NFT_META_CPU - NFT_META_IIFGROUP = C.NFT_META_IIFGROUP - NFT_META_OIFGROUP = C.NFT_META_OIFGROUP - NFT_META_CGROUP = C.NFT_META_CGROUP - NFT_META_PRANDOM = C.NFT_META_PRANDOM - NFT_RT_CLASSID = C.NFT_RT_CLASSID - NFT_RT_NEXTHOP4 = C.NFT_RT_NEXTHOP4 - NFT_RT_NEXTHOP6 = C.NFT_RT_NEXTHOP6 - NFT_RT_TCPMSS = C.NFT_RT_TCPMSS - NFT_HASH_JENKINS = C.NFT_HASH_JENKINS - NFT_HASH_SYM = C.NFT_HASH_SYM - NFTA_HASH_UNSPEC = C.NFTA_HASH_UNSPEC - NFTA_HASH_SREG = C.NFTA_HASH_SREG - NFTA_HASH_DREG = C.NFTA_HASH_DREG - NFTA_HASH_LEN = C.NFTA_HASH_LEN - NFTA_HASH_MODULUS = C.NFTA_HASH_MODULUS - NFTA_HASH_SEED = C.NFTA_HASH_SEED - NFTA_HASH_OFFSET = C.NFTA_HASH_OFFSET - NFTA_HASH_TYPE = C.NFTA_HASH_TYPE - NFTA_META_UNSPEC = C.NFTA_META_UNSPEC - NFTA_META_DREG = C.NFTA_META_DREG - NFTA_META_KEY = C.NFTA_META_KEY - NFTA_META_SREG = C.NFTA_META_SREG - NFTA_RT_UNSPEC = C.NFTA_RT_UNSPEC - NFTA_RT_DREG = C.NFTA_RT_DREG - NFTA_RT_KEY = C.NFTA_RT_KEY - NFT_CT_STATE = C.NFT_CT_STATE - NFT_CT_DIRECTION = C.NFT_CT_DIRECTION - NFT_CT_STATUS = C.NFT_CT_STATUS - NFT_CT_MARK = C.NFT_CT_MARK - NFT_CT_SECMARK = C.NFT_CT_SECMARK - NFT_CT_EXPIRATION = C.NFT_CT_EXPIRATION - NFT_CT_HELPER = C.NFT_CT_HELPER - NFT_CT_L3PROTOCOL = C.NFT_CT_L3PROTOCOL - NFT_CT_SRC = C.NFT_CT_SRC - NFT_CT_DST = C.NFT_CT_DST - NFT_CT_PROTOCOL = C.NFT_CT_PROTOCOL - NFT_CT_PROTO_SRC = C.NFT_CT_PROTO_SRC - NFT_CT_PROTO_DST = C.NFT_CT_PROTO_DST - NFT_CT_LABELS = C.NFT_CT_LABELS - NFT_CT_PKTS = C.NFT_CT_PKTS - NFT_CT_BYTES = C.NFT_CT_BYTES - NFT_CT_AVGPKT = C.NFT_CT_AVGPKT - NFT_CT_ZONE = C.NFT_CT_ZONE - NFT_CT_EVENTMASK = C.NFT_CT_EVENTMASK - NFTA_CT_UNSPEC = C.NFTA_CT_UNSPEC - NFTA_CT_DREG = C.NFTA_CT_DREG - NFTA_CT_KEY = C.NFTA_CT_KEY - NFTA_CT_DIRECTION = C.NFTA_CT_DIRECTION - NFTA_CT_SREG = C.NFTA_CT_SREG - NFT_LIMIT_PKTS = C.NFT_LIMIT_PKTS - NFT_LIMIT_PKT_BYTES = C.NFT_LIMIT_PKT_BYTES - NFT_LIMIT_F_INV = C.NFT_LIMIT_F_INV - NFTA_LIMIT_UNSPEC = C.NFTA_LIMIT_UNSPEC - NFTA_LIMIT_RATE = C.NFTA_LIMIT_RATE - NFTA_LIMIT_UNIT = C.NFTA_LIMIT_UNIT - NFTA_LIMIT_BURST = C.NFTA_LIMIT_BURST - NFTA_LIMIT_TYPE = C.NFTA_LIMIT_TYPE - NFTA_LIMIT_FLAGS = C.NFTA_LIMIT_FLAGS - NFTA_LIMIT_PAD = C.NFTA_LIMIT_PAD - NFTA_COUNTER_UNSPEC = C.NFTA_COUNTER_UNSPEC - NFTA_COUNTER_BYTES = C.NFTA_COUNTER_BYTES - NFTA_COUNTER_PACKETS = C.NFTA_COUNTER_PACKETS - NFTA_COUNTER_PAD = C.NFTA_COUNTER_PAD - NFTA_LOG_UNSPEC = C.NFTA_LOG_UNSPEC - NFTA_LOG_GROUP = C.NFTA_LOG_GROUP - NFTA_LOG_PREFIX = C.NFTA_LOG_PREFIX - NFTA_LOG_SNAPLEN = C.NFTA_LOG_SNAPLEN - NFTA_LOG_QTHRESHOLD = C.NFTA_LOG_QTHRESHOLD - NFTA_LOG_LEVEL = C.NFTA_LOG_LEVEL - NFTA_LOG_FLAGS = C.NFTA_LOG_FLAGS - NFTA_QUEUE_UNSPEC = C.NFTA_QUEUE_UNSPEC - NFTA_QUEUE_NUM = C.NFTA_QUEUE_NUM - NFTA_QUEUE_TOTAL = C.NFTA_QUEUE_TOTAL - NFTA_QUEUE_FLAGS = C.NFTA_QUEUE_FLAGS - NFTA_QUEUE_SREG_QNUM = C.NFTA_QUEUE_SREG_QNUM - NFT_QUOTA_F_INV = C.NFT_QUOTA_F_INV - NFT_QUOTA_F_DEPLETED = C.NFT_QUOTA_F_DEPLETED - NFTA_QUOTA_UNSPEC = C.NFTA_QUOTA_UNSPEC - NFTA_QUOTA_BYTES = C.NFTA_QUOTA_BYTES - NFTA_QUOTA_FLAGS = C.NFTA_QUOTA_FLAGS - NFTA_QUOTA_PAD = C.NFTA_QUOTA_PAD - NFTA_QUOTA_CONSUMED = C.NFTA_QUOTA_CONSUMED - NFT_REJECT_ICMP_UNREACH = C.NFT_REJECT_ICMP_UNREACH - NFT_REJECT_TCP_RST = C.NFT_REJECT_TCP_RST - NFT_REJECT_ICMPX_UNREACH = C.NFT_REJECT_ICMPX_UNREACH - NFT_REJECT_ICMPX_NO_ROUTE = C.NFT_REJECT_ICMPX_NO_ROUTE - NFT_REJECT_ICMPX_PORT_UNREACH = C.NFT_REJECT_ICMPX_PORT_UNREACH - NFT_REJECT_ICMPX_HOST_UNREACH = C.NFT_REJECT_ICMPX_HOST_UNREACH - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = C.NFT_REJECT_ICMPX_ADMIN_PROHIBITED - NFTA_REJECT_UNSPEC = C.NFTA_REJECT_UNSPEC - NFTA_REJECT_TYPE = C.NFTA_REJECT_TYPE - NFTA_REJECT_ICMP_CODE = C.NFTA_REJECT_ICMP_CODE - NFT_NAT_SNAT = C.NFT_NAT_SNAT - NFT_NAT_DNAT = C.NFT_NAT_DNAT - NFTA_NAT_UNSPEC = C.NFTA_NAT_UNSPEC - NFTA_NAT_TYPE = C.NFTA_NAT_TYPE - NFTA_NAT_FAMILY = C.NFTA_NAT_FAMILY - NFTA_NAT_REG_ADDR_MIN = C.NFTA_NAT_REG_ADDR_MIN - NFTA_NAT_REG_ADDR_MAX = C.NFTA_NAT_REG_ADDR_MAX - NFTA_NAT_REG_PROTO_MIN = C.NFTA_NAT_REG_PROTO_MIN - NFTA_NAT_REG_PROTO_MAX = C.NFTA_NAT_REG_PROTO_MAX - NFTA_NAT_FLAGS = C.NFTA_NAT_FLAGS - NFTA_MASQ_UNSPEC = C.NFTA_MASQ_UNSPEC - NFTA_MASQ_FLAGS = C.NFTA_MASQ_FLAGS - NFTA_MASQ_REG_PROTO_MIN = C.NFTA_MASQ_REG_PROTO_MIN - NFTA_MASQ_REG_PROTO_MAX = C.NFTA_MASQ_REG_PROTO_MAX - NFTA_REDIR_UNSPEC = C.NFTA_REDIR_UNSPEC - NFTA_REDIR_REG_PROTO_MIN = C.NFTA_REDIR_REG_PROTO_MIN - NFTA_REDIR_REG_PROTO_MAX = C.NFTA_REDIR_REG_PROTO_MAX - NFTA_REDIR_FLAGS = C.NFTA_REDIR_FLAGS - NFTA_DUP_UNSPEC = C.NFTA_DUP_UNSPEC - NFTA_DUP_SREG_ADDR = C.NFTA_DUP_SREG_ADDR - NFTA_DUP_SREG_DEV = C.NFTA_DUP_SREG_DEV - NFTA_FWD_UNSPEC = C.NFTA_FWD_UNSPEC - NFTA_FWD_SREG_DEV = C.NFTA_FWD_SREG_DEV - NFTA_OBJREF_UNSPEC = C.NFTA_OBJREF_UNSPEC - NFTA_OBJREF_IMM_TYPE = C.NFTA_OBJREF_IMM_TYPE - NFTA_OBJREF_IMM_NAME = C.NFTA_OBJREF_IMM_NAME - NFTA_OBJREF_SET_SREG = C.NFTA_OBJREF_SET_SREG - NFTA_OBJREF_SET_NAME = C.NFTA_OBJREF_SET_NAME - NFTA_OBJREF_SET_ID = C.NFTA_OBJREF_SET_ID - NFTA_GEN_UNSPEC = C.NFTA_GEN_UNSPEC - NFTA_GEN_ID = C.NFTA_GEN_ID - NFTA_GEN_PROC_PID = C.NFTA_GEN_PROC_PID - NFTA_GEN_PROC_NAME = C.NFTA_GEN_PROC_NAME - NFTA_FIB_UNSPEC = C.NFTA_FIB_UNSPEC - NFTA_FIB_DREG = C.NFTA_FIB_DREG - NFTA_FIB_RESULT = C.NFTA_FIB_RESULT - NFTA_FIB_FLAGS = C.NFTA_FIB_FLAGS - NFT_FIB_RESULT_UNSPEC = C.NFT_FIB_RESULT_UNSPEC - NFT_FIB_RESULT_OIF = C.NFT_FIB_RESULT_OIF - NFT_FIB_RESULT_OIFNAME = C.NFT_FIB_RESULT_OIFNAME - NFT_FIB_RESULT_ADDRTYPE = C.NFT_FIB_RESULT_ADDRTYPE - NFTA_FIB_F_SADDR = C.NFTA_FIB_F_SADDR - NFTA_FIB_F_DADDR = C.NFTA_FIB_F_DADDR - NFTA_FIB_F_MARK = C.NFTA_FIB_F_MARK - NFTA_FIB_F_IIF = C.NFTA_FIB_F_IIF - NFTA_FIB_F_OIF = C.NFTA_FIB_F_OIF - NFTA_FIB_F_PRESENT = C.NFTA_FIB_F_PRESENT - NFTA_CT_HELPER_UNSPEC = C.NFTA_CT_HELPER_UNSPEC - NFTA_CT_HELPER_NAME = C.NFTA_CT_HELPER_NAME - NFTA_CT_HELPER_L3PROTO = C.NFTA_CT_HELPER_L3PROTO - NFTA_CT_HELPER_L4PROTO = C.NFTA_CT_HELPER_L4PROTO - NFTA_OBJ_UNSPEC = C.NFTA_OBJ_UNSPEC - NFTA_OBJ_TABLE = C.NFTA_OBJ_TABLE - NFTA_OBJ_NAME = C.NFTA_OBJ_NAME - NFTA_OBJ_TYPE = C.NFTA_OBJ_TYPE - NFTA_OBJ_DATA = C.NFTA_OBJ_DATA - NFTA_OBJ_USE = C.NFTA_OBJ_USE - NFTA_TRACE_UNSPEC = C.NFTA_TRACE_UNSPEC - NFTA_TRACE_TABLE = C.NFTA_TRACE_TABLE - NFTA_TRACE_CHAIN = C.NFTA_TRACE_CHAIN - NFTA_TRACE_RULE_HANDLE = C.NFTA_TRACE_RULE_HANDLE - NFTA_TRACE_TYPE = C.NFTA_TRACE_TYPE - NFTA_TRACE_VERDICT = C.NFTA_TRACE_VERDICT - NFTA_TRACE_ID = C.NFTA_TRACE_ID - NFTA_TRACE_LL_HEADER = C.NFTA_TRACE_LL_HEADER - NFTA_TRACE_NETWORK_HEADER = C.NFTA_TRACE_NETWORK_HEADER - NFTA_TRACE_TRANSPORT_HEADER = C.NFTA_TRACE_TRANSPORT_HEADER - NFTA_TRACE_IIF = C.NFTA_TRACE_IIF - NFTA_TRACE_IIFTYPE = C.NFTA_TRACE_IIFTYPE - NFTA_TRACE_OIF = C.NFTA_TRACE_OIF - NFTA_TRACE_OIFTYPE = C.NFTA_TRACE_OIFTYPE - NFTA_TRACE_MARK = C.NFTA_TRACE_MARK - NFTA_TRACE_NFPROTO = C.NFTA_TRACE_NFPROTO - NFTA_TRACE_POLICY = C.NFTA_TRACE_POLICY - NFTA_TRACE_PAD = C.NFTA_TRACE_PAD - NFT_TRACETYPE_UNSPEC = C.NFT_TRACETYPE_UNSPEC - NFT_TRACETYPE_POLICY = C.NFT_TRACETYPE_POLICY - NFT_TRACETYPE_RETURN = C.NFT_TRACETYPE_RETURN - NFT_TRACETYPE_RULE = C.NFT_TRACETYPE_RULE - NFTA_NG_UNSPEC = C.NFTA_NG_UNSPEC - NFTA_NG_DREG = C.NFTA_NG_DREG - NFTA_NG_MODULUS = C.NFTA_NG_MODULUS - NFTA_NG_TYPE = C.NFTA_NG_TYPE - NFTA_NG_OFFSET = C.NFTA_NG_OFFSET - NFT_NG_INCREMENTAL = C.NFT_NG_INCREMENTAL - NFT_NG_RANDOM = C.NFT_NG_RANDOM -) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/mmap_unix_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/mmap_unix_test.go deleted file mode 100644 index fc3093cc3f..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/mmap_unix_test.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2014 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestMmap(t *testing.T) { - b, err := unix.Mmap(-1, 0, unix.Getpagesize(), unix.PROT_NONE, unix.MAP_ANON|unix.MAP_PRIVATE) - if err != nil { - t.Fatalf("Mmap: %v", err) - } - if err := unix.Mprotect(b, unix.PROT_READ|unix.PROT_WRITE); err != nil { - t.Fatalf("Mprotect: %v", err) - } - - b[0] = 42 - - if err := unix.Msync(b, unix.MS_SYNC); err != nil { - t.Fatalf("Msync: %v", err) - } - if err := unix.Madvise(b, unix.MADV_DONTNEED); err != nil { - t.Fatalf("Madvise: %v", err) - } - if err := unix.Munmap(b); err != nil { - t.Fatalf("Munmap: %v", err) - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/openbsd_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/openbsd_test.go deleted file mode 100644 index 1b266f7f25..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/openbsd_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2016 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. - -// +build openbsd - -// This, on the face of it, bizarre testing mechanism is necessary because -// the only reliable way to gauge whether or not a pledge(2) call has succeeded -// is that the program has been killed as a result of breaking its pledge. - -package unix_test - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -type testProc struct { - fn func() // should always exit instead of returning - cleanup func() error // for instance, delete coredumps from testing pledge - success bool // whether zero-exit means success or failure -} - -var ( - testProcs = map[string]testProc{} - procName = "" -) - -const ( - optName = "sys-unix-internal-procname" -) - -func init() { - flag.StringVar(&procName, optName, "", "internal use only") -} - -// testCmd generates a proper command that, when executed, runs the test -// corresponding to the given key. -func testCmd(procName string) (*exec.Cmd, error) { - exe, err := filepath.Abs(os.Args[0]) - if err != nil { - return nil, err - } - cmd := exec.Command(exe, "-"+optName+"="+procName) - cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr - return cmd, nil -} - -// ExitsCorrectly is a comprehensive, one-line-of-use wrapper for testing -// a testProc with a key. -func ExitsCorrectly(procName string, t *testing.T) { - s := testProcs[procName] - c, err := testCmd(procName) - defer func() { - if s.cleanup() != nil { - t.Fatalf("Failed to run cleanup for %s", procName) - } - }() - if err != nil { - t.Fatalf("Failed to construct command for %s", procName) - } - if (c.Run() == nil) != s.success { - result := "succeed" - if !s.success { - result = "fail" - } - t.Fatalf("Process did not %s when it was supposed to", result) - } -} - -func TestMain(m *testing.M) { - flag.Parse() - if procName != "" { - testProcs[procName].fn() - } - os.Exit(m.Run()) -} - -// For example, add a test for pledge. -func init() { - testProcs["pledge"] = testProc{ - func() { - fmt.Println(unix.Pledge("", nil)) - os.Exit(0) - }, - func() error { - files, err := ioutil.ReadDir(".") - if err != nil { - return err - } - for _, file := range files { - if filepath.Ext(file.Name()) == ".core" { - if err := os.Remove(file.Name()); err != nil { - return err - } - } - } - return nil - }, - false, - } -} - -func TestPledge(t *testing.T) { - ExitsCorrectly("pledge", t) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_bsd_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_bsd_test.go deleted file mode 100644 index e45b5ff34f..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_bsd_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2014 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. - -// +build darwin dragonfly freebsd openbsd - -package unix_test - -import ( - "os/exec" - "runtime" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -const MNT_WAIT = 1 -const MNT_NOWAIT = 2 - -func TestGetfsstat(t *testing.T) { - const flags = MNT_NOWAIT // see golang.org/issue/16937 - n, err := unix.Getfsstat(nil, flags) - if err != nil { - t.Fatal(err) - } - - data := make([]unix.Statfs_t, n) - n2, err := unix.Getfsstat(data, flags) - if err != nil { - t.Fatal(err) - } - if n != n2 { - t.Errorf("Getfsstat(nil) = %d, but subsequent Getfsstat(slice) = %d", n, n2) - } - for i, stat := range data { - if stat == (unix.Statfs_t{}) { - t.Errorf("index %v is an empty Statfs_t struct", i) - } - } - if t.Failed() { - for i, stat := range data[:n2] { - t.Logf("data[%v] = %+v", i, stat) - } - mount, err := exec.Command("mount").CombinedOutput() - if err != nil { - t.Logf("mount: %v\n%s", err, mount) - } else { - t.Logf("mount: %s", mount) - } - } -} - -func TestSelect(t *testing.T) { - err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0}) - if err != nil { - t.Fatalf("Select: %v", err) - } - - dur := 250 * time.Millisecond - tv := unix.NsecToTimeval(int64(dur)) - start := time.Now() - err = unix.Select(0, nil, nil, nil, &tv) - took := time.Since(start) - if err != nil { - t.Fatalf("Select: %v", err) - } - - // On some BSDs the actual timeout might also be slightly less than the requested. - // Add an acceptable margin to avoid flaky tests. - if took < dur*2/3 { - t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) - } -} - -func TestSysctlRaw(t *testing.T) { - if runtime.GOOS == "openbsd" { - t.Skip("kern.proc.pid does not exist on OpenBSD") - } - - _, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid()) - if err != nil { - t.Fatal(err) - } -} - -func TestSysctlUint32(t *testing.T) { - maxproc, err := unix.SysctlUint32("kern.maxproc") - if err != nil { - t.Fatal(err) - } - t.Logf("kern.maxproc: %v", maxproc) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_darwin_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_darwin_test.go deleted file mode 100644 index 65691d5c1b..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_darwin_test.go +++ /dev/null @@ -1,19 +0,0 @@ -// 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 unix_test - -// stringsFromByteSlice converts a sequence of attributes to a []string. -// On Darwin, each entry is a NULL-terminated string. -func stringsFromByteSlice(buf []byte) []string { - var result []string - off := 0 - for i, b := range buf { - if b == 0 { - result = append(result, string(buf[off:i])) - off = i + 1 - } - } - return result -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_freebsd_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_freebsd_test.go deleted file mode 100644 index 1e765df4ad..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_freebsd_test.go +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2014 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. - -// +build freebsd - -package unix_test - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "runtime" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestSysctlUint64(t *testing.T) { - _, err := unix.SysctlUint64("vm.swap_total") - if err != nil { - t.Fatal(err) - } -} - -// FIXME: Infrastructure for launching tests in subprocesses stolen from openbsd_test.go - refactor? -// testCmd generates a proper command that, when executed, runs the test -// corresponding to the given key. - -type testProc struct { - fn func() // should always exit instead of returning - arg func(t *testing.T) string // generate argument for test - cleanup func(arg string) error // for instance, delete coredumps from testing pledge - success bool // whether zero-exit means success or failure -} - -var ( - testProcs = map[string]testProc{} - procName = "" - procArg = "" -) - -const ( - optName = "sys-unix-internal-procname" - optArg = "sys-unix-internal-arg" -) - -func init() { - flag.StringVar(&procName, optName, "", "internal use only") - flag.StringVar(&procArg, optArg, "", "internal use only") - -} - -func testCmd(procName string, procArg string) (*exec.Cmd, error) { - exe, err := filepath.Abs(os.Args[0]) - if err != nil { - return nil, err - } - cmd := exec.Command(exe, "-"+optName+"="+procName, "-"+optArg+"="+procArg) - cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr - return cmd, nil -} - -// ExitsCorrectly is a comprehensive, one-line-of-use wrapper for testing -// a testProc with a key. -func ExitsCorrectly(t *testing.T, procName string) { - s := testProcs[procName] - arg := "-" - if s.arg != nil { - arg = s.arg(t) - } - c, err := testCmd(procName, arg) - defer func(arg string) { - if err := s.cleanup(arg); err != nil { - t.Fatalf("Failed to run cleanup for %s %s %#v", procName, err, err) - } - }(arg) - if err != nil { - t.Fatalf("Failed to construct command for %s", procName) - } - if (c.Run() == nil) != s.success { - result := "succeed" - if !s.success { - result = "fail" - } - t.Fatalf("Process did not %s when it was supposed to", result) - } -} - -func TestMain(m *testing.M) { - flag.Parse() - if procName != "" { - t := testProcs[procName] - t.fn() - os.Stderr.WriteString("test function did not exit\n") - if t.success { - os.Exit(1) - } else { - os.Exit(0) - } - } - os.Exit(m.Run()) -} - -// end of infrastructure - -const testfile = "gocapmodetest" -const testfile2 = testfile + "2" - -func CapEnterTest() { - _, err := os.OpenFile(path.Join(procArg, testfile), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) - if err != nil { - panic(fmt.Sprintf("OpenFile: %s", err)) - } - - err = unix.CapEnter() - if err != nil { - panic(fmt.Sprintf("CapEnter: %s", err)) - } - - _, err = os.OpenFile(path.Join(procArg, testfile2), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) - if err == nil { - panic("OpenFile works!") - } - if err.(*os.PathError).Err != unix.ECAPMODE { - panic(fmt.Sprintf("OpenFile failed wrong: %s %#v", err, err)) - } - os.Exit(0) -} - -func makeTempDir(t *testing.T) string { - d, err := ioutil.TempDir("", "go_openat_test") - if err != nil { - t.Fatalf("TempDir failed: %s", err) - } - return d -} - -func removeTempDir(arg string) error { - err := os.RemoveAll(arg) - if err != nil && err.(*os.PathError).Err == unix.ENOENT { - return nil - } - return err -} - -func init() { - testProcs["cap_enter"] = testProc{ - CapEnterTest, - makeTempDir, - removeTempDir, - true, - } -} - -func TestCapEnter(t *testing.T) { - if runtime.GOARCH != "amd64" { - t.Skipf("skipping test on %s", runtime.GOARCH) - } - ExitsCorrectly(t, "cap_enter") -} - -func OpenatTest() { - f, err := os.Open(procArg) - if err != nil { - panic(err) - } - - err = unix.CapEnter() - if err != nil { - panic(fmt.Sprintf("CapEnter: %s", err)) - } - - fxx, err := unix.Openat(int(f.Fd()), "xx", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) - if err != nil { - panic(err) - } - unix.Close(fxx) - - // The right to open BASE/xx is not ambient - _, err = os.OpenFile(procArg+"/xx", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) - if err == nil { - panic("OpenFile succeeded") - } - if err.(*os.PathError).Err != unix.ECAPMODE { - panic(fmt.Sprintf("OpenFile failed wrong: %s %#v", err, err)) - } - - // Can't make a new directory either - err = os.Mkdir(procArg+"2", 0777) - if err == nil { - panic("MKdir succeeded") - } - if err.(*os.PathError).Err != unix.ECAPMODE { - panic(fmt.Sprintf("Mkdir failed wrong: %s %#v", err, err)) - } - - // Remove all caps except read and lookup. - r, err := unix.CapRightsInit([]uint64{unix.CAP_READ, unix.CAP_LOOKUP}) - if err != nil { - panic(fmt.Sprintf("CapRightsInit failed: %s %#v", err, err)) - } - err = unix.CapRightsLimit(f.Fd(), r) - if err != nil { - panic(fmt.Sprintf("CapRightsLimit failed: %s %#v", err, err)) - } - - // Check we can get the rights back again - r, err = unix.CapRightsGet(f.Fd()) - if err != nil { - panic(fmt.Sprintf("CapRightsGet failed: %s %#v", err, err)) - } - b, err := unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP}) - if err != nil { - panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err)) - } - if !b { - panic(fmt.Sprintf("Unexpected rights")) - } - b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP, unix.CAP_WRITE}) - if err != nil { - panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err)) - } - if b { - panic(fmt.Sprintf("Unexpected rights (2)")) - } - - // Can no longer create a file - _, err = unix.Openat(int(f.Fd()), "xx2", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) - if err == nil { - panic("Openat succeeded") - } - if err != unix.ENOTCAPABLE { - panic(fmt.Sprintf("OpenFileAt failed wrong: %s %#v", err, err)) - } - - // But can read an existing one - _, err = unix.Openat(int(f.Fd()), "xx", os.O_RDONLY, 0666) - if err != nil { - panic(fmt.Sprintf("Openat failed: %s %#v", err, err)) - } - - os.Exit(0) -} - -func init() { - testProcs["openat"] = testProc{ - OpenatTest, - makeTempDir, - removeTempDir, - true, - } -} - -func TestOpenat(t *testing.T) { - if runtime.GOARCH != "amd64" { - t.Skipf("skipping test on %s", runtime.GOARCH) - } - ExitsCorrectly(t, "openat") -} - -func TestCapRightsSetAndClear(t *testing.T) { - r, err := unix.CapRightsInit([]uint64{unix.CAP_READ, unix.CAP_WRITE, unix.CAP_PDWAIT}) - if err != nil { - t.Fatalf("CapRightsInit failed: %s", err) - } - - err = unix.CapRightsSet(r, []uint64{unix.CAP_EVENT, unix.CAP_LISTEN}) - if err != nil { - t.Fatalf("CapRightsSet failed: %s", err) - } - - b, err := unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_WRITE, unix.CAP_PDWAIT, unix.CAP_EVENT, unix.CAP_LISTEN}) - if err != nil { - t.Fatalf("CapRightsIsSet failed: %s", err) - } - if !b { - t.Fatalf("Wrong rights set") - } - - err = unix.CapRightsClear(r, []uint64{unix.CAP_READ, unix.CAP_PDWAIT}) - if err != nil { - t.Fatalf("CapRightsClear failed: %s", err) - } - - b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_WRITE, unix.CAP_EVENT, unix.CAP_LISTEN}) - if err != nil { - t.Fatalf("CapRightsIsSet failed: %s", err) - } - if !b { - t.Fatalf("Wrong rights set") - } -} - -// stringsFromByteSlice converts a sequence of attributes to a []string. -// On FreeBSD, each entry consists of a single byte containing the length -// of the attribute name, followed by the attribute name. -// The name is _not_ NULL-terminated. -func stringsFromByteSlice(buf []byte) []string { - var result []string - i := 0 - for i < len(buf) { - next := i + 1 + int(buf[i]) - result = append(result, string(buf[i+1:next])) - i = next - } - return result -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_linux_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_linux_test.go deleted file mode 100644 index 2df45b2b23..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_linux_test.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright 2016 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. - -// +build linux - -package unix_test - -import ( - "os" - "runtime" - "runtime/debug" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestIoctlGetInt(t *testing.T) { - f, err := os.Open("/dev/random") - if err != nil { - t.Fatalf("failed to open device: %v", err) - } - defer f.Close() - - v, err := unix.IoctlGetInt(int(f.Fd()), unix.RNDGETENTCNT) - if err != nil { - t.Fatalf("failed to perform ioctl: %v", err) - } - - t.Logf("%d bits of entropy available", v) -} - -func TestPpoll(t *testing.T) { - if runtime.GOOS == "android" { - t.Skip("mkfifo syscall is not available on android, skipping test") - } - - f, cleanup := mktmpfifo(t) - defer cleanup() - - const timeout = 100 * time.Millisecond - - ok := make(chan bool, 1) - go func() { - select { - case <-time.After(10 * timeout): - t.Errorf("Ppoll: failed to timeout after %d", 10*timeout) - case <-ok: - } - }() - - fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} - timeoutTs := unix.NsecToTimespec(int64(timeout)) - n, err := unix.Ppoll(fds, &timeoutTs, nil) - ok <- true - if err != nil { - t.Errorf("Ppoll: unexpected error: %v", err) - return - } - if n != 0 { - t.Errorf("Ppoll: wrong number of events: got %v, expected %v", n, 0) - return - } -} - -func TestTime(t *testing.T) { - var ut unix.Time_t - ut2, err := unix.Time(&ut) - if err != nil { - t.Fatalf("Time: %v", err) - } - if ut != ut2 { - t.Errorf("Time: return value %v should be equal to argument %v", ut2, ut) - } - - var now time.Time - - for i := 0; i < 10; i++ { - ut, err = unix.Time(nil) - if err != nil { - t.Fatalf("Time: %v", err) - } - - now = time.Now() - - if int64(ut) == now.Unix() { - return - } - } - - t.Errorf("Time: return value %v should be nearly equal to time.Now().Unix() %v", ut, now.Unix()) -} - -func TestUtime(t *testing.T) { - defer chtmpdir(t)() - - touch(t, "file1") - - buf := &unix.Utimbuf{ - Modtime: 12345, - } - - err := unix.Utime("file1", buf) - if err != nil { - t.Fatalf("Utime: %v", err) - } - - fi, err := os.Stat("file1") - if err != nil { - t.Fatal(err) - } - - if fi.ModTime().Unix() != 12345 { - t.Errorf("Utime: failed to change modtime: expected %v, got %v", 12345, fi.ModTime().Unix()) - } -} - -func TestUtimesNanoAt(t *testing.T) { - defer chtmpdir(t)() - - symlink := "symlink1" - os.Remove(symlink) - err := os.Symlink("nonexisting", symlink) - if err != nil { - t.Fatal(err) - } - - ts := []unix.Timespec{ - {Sec: 1111, Nsec: 2222}, - {Sec: 3333, Nsec: 4444}, - } - err = unix.UtimesNanoAt(unix.AT_FDCWD, symlink, ts, unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - t.Fatalf("UtimesNanoAt: %v", err) - } - - var st unix.Stat_t - err = unix.Lstat(symlink, &st) - if err != nil { - t.Fatalf("Lstat: %v", err) - } - if st.Atim != ts[0] { - t.Errorf("UtimesNanoAt: wrong atime: %v", st.Atim) - } - if st.Mtim != ts[1] { - t.Errorf("UtimesNanoAt: wrong mtime: %v", st.Mtim) - } -} - -func TestRlimitAs(t *testing.T) { - // disable GC during to avoid flaky test - defer debug.SetGCPercent(debug.SetGCPercent(-1)) - - var rlim unix.Rlimit - err := unix.Getrlimit(unix.RLIMIT_AS, &rlim) - if err != nil { - t.Fatalf("Getrlimit: %v", err) - } - var zero unix.Rlimit - if zero == rlim { - t.Fatalf("Getrlimit: got zero value %#v", rlim) - } - set := rlim - set.Cur = uint64(unix.Getpagesize()) - err = unix.Setrlimit(unix.RLIMIT_AS, &set) - if err != nil { - t.Fatalf("Setrlimit: set failed: %#v %v", set, err) - } - - // RLIMIT_AS was set to the page size, so mmap()'ing twice the page size - // should fail. See 'man 2 getrlimit'. - _, err = unix.Mmap(-1, 0, 2*unix.Getpagesize(), unix.PROT_NONE, unix.MAP_ANON|unix.MAP_PRIVATE) - if err == nil { - t.Fatal("Mmap: unexpectedly suceeded after setting RLIMIT_AS") - } - - err = unix.Setrlimit(unix.RLIMIT_AS, &rlim) - if err != nil { - t.Fatalf("Setrlimit: restore failed: %#v %v", rlim, err) - } - - b, err := unix.Mmap(-1, 0, 2*unix.Getpagesize(), unix.PROT_NONE, unix.MAP_ANON|unix.MAP_PRIVATE) - if err != nil { - t.Fatalf("Mmap: %v", err) - } - err = unix.Munmap(b) - if err != nil { - t.Fatalf("Munmap: %v", err) - } -} - -func TestSelect(t *testing.T) { - _, err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0}) - if err != nil { - t.Fatalf("Select: %v", err) - } - - dur := 150 * time.Millisecond - tv := unix.NsecToTimeval(int64(dur)) - start := time.Now() - _, err = unix.Select(0, nil, nil, nil, &tv) - took := time.Since(start) - if err != nil { - t.Fatalf("Select: %v", err) - } - - if took < dur { - t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) - } -} - -func TestPselect(t *testing.T) { - _, err := unix.Pselect(0, nil, nil, nil, &unix.Timespec{Sec: 0, Nsec: 0}, nil) - if err != nil { - t.Fatalf("Pselect: %v", err) - } - - dur := 2500 * time.Microsecond - ts := unix.NsecToTimespec(int64(dur)) - start := time.Now() - _, err = unix.Pselect(0, nil, nil, nil, &ts, nil) - took := time.Since(start) - if err != nil { - t.Fatalf("Pselect: %v", err) - } - - if took < dur { - t.Errorf("Pselect: timeout should have been at least %v, got %v", dur, took) - } -} - -func TestSchedSetaffinity(t *testing.T) { - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - var oldMask unix.CPUSet - err := unix.SchedGetaffinity(0, &oldMask) - if err != nil { - t.Fatalf("SchedGetaffinity: %v", err) - } - - var newMask unix.CPUSet - newMask.Zero() - if newMask.Count() != 0 { - t.Errorf("CpuZero: didn't zero CPU set: %v", newMask) - } - cpu := 1 - newMask.Set(cpu) - if newMask.Count() != 1 || !newMask.IsSet(cpu) { - t.Errorf("CpuSet: didn't set CPU %d in set: %v", cpu, newMask) - } - cpu = 5 - newMask.Set(cpu) - if newMask.Count() != 2 || !newMask.IsSet(cpu) { - t.Errorf("CpuSet: didn't set CPU %d in set: %v", cpu, newMask) - } - newMask.Clear(cpu) - if newMask.Count() != 1 || newMask.IsSet(cpu) { - t.Errorf("CpuClr: didn't clear CPU %d in set: %v", cpu, newMask) - } - - if runtime.NumCPU() < 2 { - t.Skip("skipping setaffinity tests on single CPU system") - } - if runtime.GOOS == "android" { - t.Skip("skipping setaffinity tests on android") - } - - err = unix.SchedSetaffinity(0, &newMask) - if err != nil { - t.Fatalf("SchedSetaffinity: %v", err) - } - - var gotMask unix.CPUSet - err = unix.SchedGetaffinity(0, &gotMask) - if err != nil { - t.Fatalf("SchedGetaffinity: %v", err) - } - - if gotMask != newMask { - t.Errorf("SchedSetaffinity: returned affinity mask does not match set affinity mask") - } - - // Restore old mask so it doesn't affect successive tests - err = unix.SchedSetaffinity(0, &oldMask) - if err != nil { - t.Fatalf("SchedSetaffinity: %v", err) - } -} - -func TestStatx(t *testing.T) { - var stx unix.Statx_t - err := unix.Statx(unix.AT_FDCWD, ".", 0, 0, &stx) - if err == unix.ENOSYS || err == unix.EPERM { - t.Skip("statx syscall is not available, skipping test") - } else if err != nil { - t.Fatalf("Statx: %v", err) - } - - defer chtmpdir(t)() - touch(t, "file1") - - var st unix.Stat_t - err = unix.Stat("file1", &st) - if err != nil { - t.Fatalf("Stat: %v", err) - } - - flags := unix.AT_STATX_SYNC_AS_STAT - err = unix.Statx(unix.AT_FDCWD, "file1", flags, unix.STATX_ALL, &stx) - if err != nil { - t.Fatalf("Statx: %v", err) - } - - if uint32(stx.Mode) != st.Mode { - t.Errorf("Statx: returned stat mode does not match Stat") - } - - ctime := unix.StatxTimestamp{Sec: int64(st.Ctim.Sec), Nsec: uint32(st.Ctim.Nsec)} - mtime := unix.StatxTimestamp{Sec: int64(st.Mtim.Sec), Nsec: uint32(st.Mtim.Nsec)} - - if stx.Ctime != ctime { - t.Errorf("Statx: returned stat ctime does not match Stat") - } - if stx.Mtime != mtime { - t.Errorf("Statx: returned stat mtime does not match Stat") - } - - err = os.Symlink("file1", "symlink1") - if err != nil { - t.Fatal(err) - } - - err = unix.Lstat("symlink1", &st) - if err != nil { - t.Fatalf("Lstat: %v", err) - } - - err = unix.Statx(unix.AT_FDCWD, "symlink1", flags, unix.STATX_BASIC_STATS, &stx) - if err != nil { - t.Fatalf("Statx: %v", err) - } - - // follow symlink, expect a regulat file - if stx.Mode&unix.S_IFREG == 0 { - t.Errorf("Statx: didn't follow symlink") - } - - err = unix.Statx(unix.AT_FDCWD, "symlink1", flags|unix.AT_SYMLINK_NOFOLLOW, unix.STATX_ALL, &stx) - if err != nil { - t.Fatalf("Statx: %v", err) - } - - // follow symlink, expect a symlink - if stx.Mode&unix.S_IFLNK == 0 { - t.Errorf("Statx: unexpectedly followed symlink") - } - if uint32(stx.Mode) != st.Mode { - t.Errorf("Statx: returned stat mode does not match Lstat") - } - - ctime = unix.StatxTimestamp{Sec: int64(st.Ctim.Sec), Nsec: uint32(st.Ctim.Nsec)} - mtime = unix.StatxTimestamp{Sec: int64(st.Mtim.Sec), Nsec: uint32(st.Mtim.Nsec)} - - if stx.Ctime != ctime { - t.Errorf("Statx: returned stat ctime does not match Lstat") - } - if stx.Mtime != mtime { - t.Errorf("Statx: returned stat mtime does not match Lstat") - } -} - -// stringsFromByteSlice converts a sequence of attributes to a []string. -// On Linux, each entry is a NULL-terminated string. -func stringsFromByteSlice(buf []byte) []string { - var result []string - off := 0 - for i, b := range buf { - if b == 0 { - result = append(result, string(buf[off:i])) - off = i + 1 - } - } - return result -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_solaris_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_solaris_test.go deleted file mode 100644 index 5c3cf40209..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_solaris_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2017 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. - -// +build solaris - -package unix_test - -import ( - "os/exec" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestSelect(t *testing.T) { - err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0}) - if err != nil { - t.Fatalf("Select: %v", err) - } - - dur := 150 * time.Millisecond - tv := unix.NsecToTimeval(int64(dur)) - start := time.Now() - err = unix.Select(0, nil, nil, nil, &tv) - took := time.Since(start) - if err != nil { - t.Fatalf("Select: %v", err) - } - - if took < dur { - t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) - } -} - -func TestStatvfs(t *testing.T) { - if err := unix.Statvfs("", nil); err == nil { - t.Fatal(`Statvfs("") expected failure`) - } - - statvfs := unix.Statvfs_t{} - if err := unix.Statvfs("/", &statvfs); err != nil { - t.Errorf(`Statvfs("/") failed: %v`, err) - } - - if t.Failed() { - mount, err := exec.Command("mount").CombinedOutput() - if err != nil { - t.Logf("mount: %v\n%s", err, mount) - } else { - t.Logf("mount: %s", mount) - } - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_test.go deleted file mode 100644 index 41d28a5987..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "fmt" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func testSetGetenv(t *testing.T, key, value string) { - err := unix.Setenv(key, value) - if err != nil { - t.Fatalf("Setenv failed to set %q: %v", value, err) - } - newvalue, found := unix.Getenv(key) - if !found { - t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) - } - if newvalue != value { - t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) - } -} - -func TestEnv(t *testing.T) { - testSetGetenv(t, "TESTENV", "AVALUE") - // make sure TESTENV gets set to "", not deleted - testSetGetenv(t, "TESTENV", "") -} - -func TestItoa(t *testing.T) { - // Make most negative integer: 0x8000... - i := 1 - for i<<1 != 0 { - i <<= 1 - } - if i >= 0 { - t.Fatal("bad math") - } - s := unix.Itoa(i) - f := fmt.Sprint(i) - if s != f { - t.Fatalf("itoa(%d) = %s, want %s", i, s, f) - } -} - -func TestUname(t *testing.T) { - var utsname unix.Utsname - err := unix.Uname(&utsname) - if err != nil { - t.Fatalf("Uname: %v", err) - } - - t.Logf("OS: %s/%s %s", utsname.Sysname[:], utsname.Machine[:], utsname.Release[:]) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_unix_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_unix_test.go deleted file mode 100644 index eedf18e570..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/syscall_unix_test.go +++ /dev/null @@ -1,639 +0,0 @@ -// Copyright 2013 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "flag" - "fmt" - "io/ioutil" - "net" - "os" - "os/exec" - "path/filepath" - "runtime" - "syscall" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -// Tests that below functions, structures and constants are consistent -// on all Unix-like systems. -func _() { - // program scheduling priority functions and constants - var ( - _ func(int, int, int) error = unix.Setpriority - _ func(int, int) (int, error) = unix.Getpriority - ) - const ( - _ int = unix.PRIO_USER - _ int = unix.PRIO_PROCESS - _ int = unix.PRIO_PGRP - ) - - // termios constants - const ( - _ int = unix.TCIFLUSH - _ int = unix.TCIOFLUSH - _ int = unix.TCOFLUSH - ) - - // fcntl file locking structure and constants - var ( - _ = unix.Flock_t{ - Type: int16(0), - Whence: int16(0), - Start: int64(0), - Len: int64(0), - Pid: int32(0), - } - ) - const ( - _ = unix.F_GETLK - _ = unix.F_SETLK - _ = unix.F_SETLKW - ) -} - -func TestErrnoSignalName(t *testing.T) { - testErrors := []struct { - num syscall.Errno - name string - }{ - {syscall.EPERM, "EPERM"}, - {syscall.EINVAL, "EINVAL"}, - {syscall.ENOENT, "ENOENT"}, - } - - for _, te := range testErrors { - t.Run(fmt.Sprintf("%d/%s", te.num, te.name), func(t *testing.T) { - e := unix.ErrnoName(te.num) - if e != te.name { - t.Errorf("ErrnoName(%d) returned %s, want %s", te.num, e, te.name) - } - }) - } - - testSignals := []struct { - num syscall.Signal - name string - }{ - {syscall.SIGHUP, "SIGHUP"}, - {syscall.SIGPIPE, "SIGPIPE"}, - {syscall.SIGSEGV, "SIGSEGV"}, - } - - for _, ts := range testSignals { - t.Run(fmt.Sprintf("%d/%s", ts.num, ts.name), func(t *testing.T) { - s := unix.SignalName(ts.num) - if s != ts.name { - t.Errorf("SignalName(%d) returned %s, want %s", ts.num, s, ts.name) - } - }) - } -} - -// TestFcntlFlock tests whether the file locking structure matches -// the calling convention of each kernel. -func TestFcntlFlock(t *testing.T) { - name := filepath.Join(os.TempDir(), "TestFcntlFlock") - fd, err := unix.Open(name, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0) - if err != nil { - t.Fatalf("Open failed: %v", err) - } - defer unix.Unlink(name) - defer unix.Close(fd) - flock := unix.Flock_t{ - Type: unix.F_RDLCK, - Start: 0, Len: 0, Whence: 1, - } - if err := unix.FcntlFlock(uintptr(fd), unix.F_GETLK, &flock); err != nil { - t.Fatalf("FcntlFlock failed: %v", err) - } -} - -// TestPassFD tests passing a file descriptor over a Unix socket. -// -// This test involved both a parent and child process. The parent -// process is invoked as a normal test, with "go test", which then -// runs the child process by running the current test binary with args -// "-test.run=^TestPassFD$" and an environment variable used to signal -// that the test should become the child process instead. -func TestPassFD(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skip("cannot exec subprocess on iOS, skipping test") - } - - if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" { - passFDChild() - return - } - - tempDir, err := ioutil.TempDir("", "TestPassFD") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(tempDir) - - fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) - if err != nil { - t.Fatalf("Socketpair: %v", err) - } - defer unix.Close(fds[0]) - defer unix.Close(fds[1]) - writeFile := os.NewFile(uintptr(fds[0]), "child-writes") - readFile := os.NewFile(uintptr(fds[1]), "parent-reads") - defer writeFile.Close() - defer readFile.Close() - - cmd := exec.Command(os.Args[0], "-test.run=^TestPassFD$", "--", tempDir) - cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} - if lp := os.Getenv("LD_LIBRARY_PATH"); lp != "" { - cmd.Env = append(cmd.Env, "LD_LIBRARY_PATH="+lp) - } - cmd.ExtraFiles = []*os.File{writeFile} - - out, err := cmd.CombinedOutput() - if len(out) > 0 || err != nil { - t.Fatalf("child process: %q, %v", out, err) - } - - c, err := net.FileConn(readFile) - if err != nil { - t.Fatalf("FileConn: %v", err) - } - defer c.Close() - - uc, ok := c.(*net.UnixConn) - if !ok { - t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) - } - - buf := make([]byte, 32) // expect 1 byte - oob := make([]byte, 32) // expect 24 bytes - closeUnix := time.AfterFunc(5*time.Second, func() { - t.Logf("timeout reading from unix socket") - uc.Close() - }) - _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob) - if err != nil { - t.Fatalf("ReadMsgUnix: %v", err) - } - closeUnix.Stop() - - scms, err := unix.ParseSocketControlMessage(oob[:oobn]) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - if len(scms) != 1 { - t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms) - } - scm := scms[0] - gotFds, err := unix.ParseUnixRights(&scm) - if err != nil { - t.Fatalf("unix.ParseUnixRights: %v", err) - } - if len(gotFds) != 1 { - t.Fatalf("wanted 1 fd; got %#v", gotFds) - } - - f := os.NewFile(uintptr(gotFds[0]), "fd-from-child") - defer f.Close() - - got, err := ioutil.ReadAll(f) - want := "Hello from child process!\n" - if string(got) != want { - t.Errorf("child process ReadAll: %q, %v; want %q", got, err, want) - } -} - -// passFDChild is the child process used by TestPassFD. -func passFDChild() { - defer os.Exit(0) - - // Look for our fd. It should be fd 3, but we work around an fd leak - // bug here (http://golang.org/issue/2603) to let it be elsewhere. - var uc *net.UnixConn - for fd := uintptr(3); fd <= 10; fd++ { - f := os.NewFile(fd, "unix-conn") - var ok bool - netc, _ := net.FileConn(f) - uc, ok = netc.(*net.UnixConn) - if ok { - break - } - } - if uc == nil { - fmt.Println("failed to find unix fd") - return - } - - // Make a file f to send to our parent process on uc. - // We make it in tempDir, which our parent will clean up. - flag.Parse() - tempDir := flag.Arg(0) - f, err := ioutil.TempFile(tempDir, "") - if err != nil { - fmt.Printf("TempFile: %v", err) - return - } - - f.Write([]byte("Hello from child process!\n")) - f.Seek(0, 0) - - rights := unix.UnixRights(int(f.Fd())) - dummyByte := []byte("x") - n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil) - if err != nil { - fmt.Printf("WriteMsgUnix: %v", err) - return - } - if n != 1 || oobn != len(rights) { - fmt.Printf("WriteMsgUnix = %d, %d; want 1, %d", n, oobn, len(rights)) - return - } -} - -// TestUnixRightsRoundtrip tests that UnixRights, ParseSocketControlMessage, -// and ParseUnixRights are able to successfully round-trip lists of file descriptors. -func TestUnixRightsRoundtrip(t *testing.T) { - testCases := [...][][]int{ - {{42}}, - {{1, 2}}, - {{3, 4, 5}}, - {{}}, - {{1, 2}, {3, 4, 5}, {}, {7}}, - } - for _, testCase := range testCases { - b := []byte{} - var n int - for _, fds := range testCase { - // Last assignment to n wins - n = len(b) + unix.CmsgLen(4*len(fds)) - b = append(b, unix.UnixRights(fds...)...) - } - // Truncate b - b = b[:n] - - scms, err := unix.ParseSocketControlMessage(b) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - if len(scms) != len(testCase) { - t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms) - } - for i, scm := range scms { - gotFds, err := unix.ParseUnixRights(&scm) - if err != nil { - t.Fatalf("ParseUnixRights: %v", err) - } - wantFds := testCase[i] - if len(gotFds) != len(wantFds) { - t.Fatalf("expected %v fds, got %#v", len(wantFds), gotFds) - } - for j, fd := range gotFds { - if fd != wantFds[j] { - t.Fatalf("expected fd %v, got %v", wantFds[j], fd) - } - } - } - } -} - -func TestRlimit(t *testing.T) { - var rlimit, zero unix.Rlimit - err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlimit) - if err != nil { - t.Fatalf("Getrlimit: save failed: %v", err) - } - if zero == rlimit { - t.Fatalf("Getrlimit: save failed: got zero value %#v", rlimit) - } - set := rlimit - set.Cur = set.Max - 1 - err = unix.Setrlimit(unix.RLIMIT_NOFILE, &set) - if err != nil { - t.Fatalf("Setrlimit: set failed: %#v %v", set, err) - } - var get unix.Rlimit - err = unix.Getrlimit(unix.RLIMIT_NOFILE, &get) - if err != nil { - t.Fatalf("Getrlimit: get failed: %v", err) - } - set = rlimit - set.Cur = set.Max - 1 - if set != get { - // Seems like Darwin requires some privilege to - // increase the soft limit of rlimit sandbox, though - // Setrlimit never reports an error. - switch runtime.GOOS { - case "darwin": - default: - t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) - } - } - err = unix.Setrlimit(unix.RLIMIT_NOFILE, &rlimit) - if err != nil { - t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err) - } -} - -func TestSeekFailure(t *testing.T) { - _, err := unix.Seek(-1, 0, 0) - if err == nil { - t.Fatalf("Seek(-1, 0, 0) did not fail") - } - str := err.Error() // used to crash on Linux - t.Logf("Seek: %v", str) - if str == "" { - t.Fatalf("Seek(-1, 0, 0) return error with empty message") - } -} - -func TestDup(t *testing.T) { - file, err := ioutil.TempFile("", "TestDup") - if err != nil { - t.Fatalf("Tempfile failed: %v", err) - } - defer os.Remove(file.Name()) - defer file.Close() - f := int(file.Fd()) - - newFd, err := unix.Dup(f) - if err != nil { - t.Fatalf("Dup: %v", err) - } - - err = unix.Dup2(newFd, newFd+1) - if err != nil { - t.Fatalf("Dup2: %v", err) - } - - b1 := []byte("Test123") - b2 := make([]byte, 7) - _, err = unix.Write(newFd+1, b1) - if err != nil { - t.Fatalf("Write to dup2 fd failed: %v", err) - } - _, err = unix.Seek(f, 0, 0) - if err != nil { - t.Fatalf("Seek failed: %v", err) - } - _, err = unix.Read(f, b2) - if err != nil { - t.Fatalf("Read back failed: %v", err) - } - if string(b1) != string(b2) { - t.Errorf("Dup: stdout write not in file, expected %v, got %v", string(b1), string(b2)) - } -} - -func TestPoll(t *testing.T) { - if runtime.GOOS == "android" || - (runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64")) { - t.Skip("mkfifo syscall is not available on android and iOS, skipping test") - } - - f, cleanup := mktmpfifo(t) - defer cleanup() - - const timeout = 100 - - ok := make(chan bool, 1) - go func() { - select { - case <-time.After(10 * timeout * time.Millisecond): - t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout) - case <-ok: - } - }() - - fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} - n, err := unix.Poll(fds, timeout) - ok <- true - if err != nil { - t.Errorf("Poll: unexpected error: %v", err) - return - } - if n != 0 { - t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0) - return - } -} - -func TestGetwd(t *testing.T) { - fd, err := os.Open(".") - if err != nil { - t.Fatalf("Open .: %s", err) - } - defer fd.Close() - // These are chosen carefully not to be symlinks on a Mac - // (unlike, say, /var, /etc) - dirs := []string{"/", "/usr/bin"} - switch runtime.GOOS { - case "android": - dirs = []string{"/", "/system/bin"} - case "darwin": - switch runtime.GOARCH { - case "arm", "arm64": - d1, err := ioutil.TempDir("", "d1") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - d2, err := ioutil.TempDir("", "d2") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - dirs = []string{d1, d2} - } - } - oldwd := os.Getenv("PWD") - for _, d := range dirs { - err = os.Chdir(d) - if err != nil { - t.Fatalf("Chdir: %v", err) - } - pwd, err := unix.Getwd() - if err != nil { - t.Fatalf("Getwd in %s: %s", d, err) - } - os.Setenv("PWD", oldwd) - err = fd.Chdir() - if err != nil { - // We changed the current directory and cannot go back. - // Don't let the tests continue; they'll scribble - // all over some other directory. - fmt.Fprintf(os.Stderr, "fchdir back to dot failed: %s\n", err) - os.Exit(1) - } - if pwd != d { - t.Fatalf("Getwd returned %q want %q", pwd, d) - } - } -} - -func TestFstatat(t *testing.T) { - defer chtmpdir(t)() - - touch(t, "file1") - - var st1 unix.Stat_t - err := unix.Stat("file1", &st1) - if err != nil { - t.Fatalf("Stat: %v", err) - } - - var st2 unix.Stat_t - err = unix.Fstatat(unix.AT_FDCWD, "file1", &st2, 0) - if err != nil { - t.Fatalf("Fstatat: %v", err) - } - - if st1 != st2 { - t.Errorf("Fstatat: returned stat does not match Stat") - } - - err = os.Symlink("file1", "symlink1") - if err != nil { - t.Fatal(err) - } - - err = unix.Lstat("symlink1", &st1) - if err != nil { - t.Fatalf("Lstat: %v", err) - } - - err = unix.Fstatat(unix.AT_FDCWD, "symlink1", &st2, unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - t.Fatalf("Fstatat: %v", err) - } - - if st1 != st2 { - t.Errorf("Fstatat: returned stat does not match Lstat") - } -} - -func TestFchmodat(t *testing.T) { - defer chtmpdir(t)() - - touch(t, "file1") - err := os.Symlink("file1", "symlink1") - if err != nil { - t.Fatal(err) - } - - mode := os.FileMode(0444) - err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), 0) - if err != nil { - t.Fatalf("Fchmodat: unexpected error: %v", err) - } - - fi, err := os.Stat("file1") - if err != nil { - t.Fatal(err) - } - - if fi.Mode() != mode { - t.Errorf("Fchmodat: failed to change file mode: expected %v, got %v", mode, fi.Mode()) - } - - mode = os.FileMode(0644) - didChmodSymlink := true - err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - if (runtime.GOOS == "android" || runtime.GOOS == "linux" || runtime.GOOS == "solaris") && err == unix.EOPNOTSUPP { - // Linux and Illumos don't support flags != 0 - didChmodSymlink = false - } else { - t.Fatalf("Fchmodat: unexpected error: %v", err) - } - } - - if !didChmodSymlink { - // Didn't change mode of the symlink. On Linux, the permissions - // of a symbolic link are always 0777 according to symlink(7) - mode = os.FileMode(0777) - } - - var st unix.Stat_t - err = unix.Lstat("symlink1", &st) - if err != nil { - t.Fatal(err) - } - - got := os.FileMode(st.Mode & 0777) - if got != mode { - t.Errorf("Fchmodat: failed to change symlink mode: expected %v, got %v", mode, got) - } -} - -func TestMkdev(t *testing.T) { - major := uint32(42) - minor := uint32(7) - dev := unix.Mkdev(major, minor) - - if unix.Major(dev) != major { - t.Errorf("Major(%#x) == %d, want %d", dev, unix.Major(dev), major) - } - if unix.Minor(dev) != minor { - t.Errorf("Minor(%#x) == %d, want %d", dev, unix.Minor(dev), minor) - } -} - -// mktmpfifo creates a temporary FIFO and provides a cleanup function. -func mktmpfifo(t *testing.T) (*os.File, func()) { - err := unix.Mkfifo("fifo", 0666) - if err != nil { - t.Fatalf("mktmpfifo: failed to create FIFO: %v", err) - } - - f, err := os.OpenFile("fifo", os.O_RDWR, 0666) - if err != nil { - os.Remove("fifo") - t.Fatalf("mktmpfifo: failed to open FIFO: %v", err) - } - - return f, func() { - f.Close() - os.Remove("fifo") - } -} - -// utilities taken from os/os_test.go - -func touch(t *testing.T, name string) { - f, err := os.Create(name) - if err != nil { - t.Fatal(err) - } - if err := f.Close(); err != nil { - t.Fatal(err) - } -} - -// chtmpdir changes the working directory to a new temporary directory and -// provides a cleanup function. Used when PWD is read-only. -func chtmpdir(t *testing.T) func() { - oldwd, err := os.Getwd() - if err != nil { - t.Fatalf("chtmpdir: %v", err) - } - d, err := ioutil.TempDir("", "test") - if err != nil { - t.Fatalf("chtmpdir: %v", err) - } - if err := os.Chdir(d); err != nil { - t.Fatalf("chtmpdir: %v", err) - } - return func() { - if err := os.Chdir(oldwd); err != nil { - t.Fatalf("chtmpdir: %v", err) - } - os.RemoveAll(d) - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/timestruct_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/timestruct_test.go deleted file mode 100644 index 5395949681..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/timestruct_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2017 The Go Authors. All right reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "testing" - "time" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestTimeToTimespec(t *testing.T) { - timeTests := []struct { - time time.Time - valid bool - }{ - {time.Unix(0, 0), true}, - {time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC), true}, - {time.Date(2262, time.December, 31, 23, 0, 0, 0, time.UTC), false}, - {time.Unix(0x7FFFFFFF, 0), true}, - {time.Unix(0x80000000, 0), false}, - {time.Unix(0x7FFFFFFF, 1000000000), false}, - {time.Unix(0x7FFFFFFF, 999999999), true}, - {time.Unix(-0x80000000, 0), true}, - {time.Unix(-0x80000001, 0), false}, - {time.Date(2038, time.January, 19, 3, 14, 7, 0, time.UTC), true}, - {time.Date(2038, time.January, 19, 3, 14, 8, 0, time.UTC), false}, - {time.Date(1901, time.December, 13, 20, 45, 52, 0, time.UTC), true}, - {time.Date(1901, time.December, 13, 20, 45, 51, 0, time.UTC), false}, - } - - // Currently all targets have either int32 or int64 for Timespec.Sec. - // If there were a new target with unsigned or floating point type for - // it, this test must be adjusted. - have64BitTime := (unsafe.Sizeof(unix.Timespec{}.Sec) == 8) - for _, tt := range timeTests { - ts, err := unix.TimeToTimespec(tt.time) - tt.valid = tt.valid || have64BitTime - if tt.valid && err != nil { - t.Errorf("TimeToTimespec(%v): %v", tt.time, err) - } - if err == nil { - tstime := time.Unix(int64(ts.Sec), int64(ts.Nsec)) - if !tstime.Equal(tt.time) { - t.Errorf("TimeToTimespec(%v) is the time %v", tt.time, tstime) - } - } - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/xattr_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/xattr_test.go deleted file mode 100644 index fd67493aa8..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix/xattr_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// 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. - -// +build darwin freebsd linux - -package unix_test - -import ( - "os" - "runtime" - "strings" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -func TestXattr(t *testing.T) { - defer chtmpdir(t)() - - f := "xattr1" - touch(t, f) - - xattrName := "user.test" - xattrDataSet := "gopher" - err := unix.Setxattr(f, xattrName, []byte(xattrDataSet), 0) - if err == unix.ENOTSUP || err == unix.EOPNOTSUPP { - t.Skip("filesystem does not support extended attributes, skipping test") - } else if err != nil { - t.Fatalf("Setxattr: %v", err) - } - - // find size - size, err := unix.Listxattr(f, nil) - if err != nil { - t.Fatalf("Listxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Listxattr returned an empty list of attributes") - } - - buf := make([]byte, size) - read, err := unix.Listxattr(f, buf) - if err != nil { - t.Fatalf("Listxattr: %v", err) - } - - xattrs := stringsFromByteSlice(buf[:read]) - - xattrWant := xattrName - if runtime.GOOS == "freebsd" { - // On FreeBSD, the namespace is stored separately from the xattr - // name and Listxattr doesn't return the namespace prefix. - xattrWant = strings.TrimPrefix(xattrWant, "user.") - } - found := false - for _, name := range xattrs { - if name == xattrWant { - found = true - } - } - - if !found { - t.Errorf("Listxattr did not return previously set attribute '%s'", xattrName) - } - - // find size - size, err = unix.Getxattr(f, xattrName, nil) - if err != nil { - t.Fatalf("Getxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Getxattr returned an empty attribute") - } - - xattrDataGet := make([]byte, size) - _, err = unix.Getxattr(f, xattrName, xattrDataGet) - if err != nil { - t.Fatalf("Getxattr: %v", err) - } - - got := string(xattrDataGet) - if got != xattrDataSet { - t.Errorf("Getxattr: expected attribute value %s, got %s", xattrDataSet, got) - } - - err = unix.Removexattr(f, xattrName) - if err != nil { - t.Fatalf("Removexattr: %v", err) - } - - n := "nonexistent" - err = unix.Lsetxattr(n, xattrName, []byte(xattrDataSet), 0) - if err != unix.ENOENT { - t.Errorf("Lsetxattr: expected %v on non-existent file, got %v", unix.ENOENT, err) - } - - _, err = unix.Lgetxattr(n, xattrName, nil) - if err != unix.ENOENT { - t.Errorf("Lgetxattr: %v", err) - } - - s := "symlink1" - err = os.Symlink(n, s) - if err != nil { - t.Fatal(err) - } - - err = unix.Lsetxattr(s, xattrName, []byte(xattrDataSet), 0) - if err != nil { - // Linux and Android doen't support xattrs on symlinks according - // to xattr(7), so just test that we get the proper error. - if (runtime.GOOS != "linux" && runtime.GOOS != "android") || err != unix.EPERM { - t.Fatalf("Lsetxattr: %v", err) - } - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/export_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/export_test.go deleted file mode 100644 index 8badf6fdcf..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/export_test.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2015 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. - -// +build windows - -package registry - -func (k Key) SetValue(name string, valtype uint32, data []byte) error { - return k.setValue(name, valtype, data) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/key.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/key.go deleted file mode 100644 index c256483434..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/key.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2015 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. - -// +build windows - -// Package registry provides access to the Windows registry. -// -// Here is a simple example, opening a registry key and reading a string value from it. -// -// k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) -// if err != nil { -// log.Fatal(err) -// } -// defer k.Close() -// -// s, _, err := k.GetStringValue("SystemRoot") -// if err != nil { -// log.Fatal(err) -// } -// fmt.Printf("Windows system root is %q\n", s) -// -package registry - -import ( - "io" - "syscall" - "time" -) - -const ( - // Registry key security and access rights. - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx - // for details. - ALL_ACCESS = 0xf003f - CREATE_LINK = 0x00020 - CREATE_SUB_KEY = 0x00004 - ENUMERATE_SUB_KEYS = 0x00008 - EXECUTE = 0x20019 - NOTIFY = 0x00010 - QUERY_VALUE = 0x00001 - READ = 0x20019 - SET_VALUE = 0x00002 - WOW64_32KEY = 0x00200 - WOW64_64KEY = 0x00100 - WRITE = 0x20006 -) - -// Key is a handle to an open Windows registry key. -// Keys can be obtained by calling OpenKey; there are -// also some predefined root keys such as CURRENT_USER. -// Keys can be used directly in the Windows API. -type Key syscall.Handle - -const ( - // Windows defines some predefined root keys that are always open. - // An application can use these keys as entry points to the registry. - // Normally these keys are used in OpenKey to open new keys, - // but they can also be used anywhere a Key is required. - CLASSES_ROOT = Key(syscall.HKEY_CLASSES_ROOT) - CURRENT_USER = Key(syscall.HKEY_CURRENT_USER) - LOCAL_MACHINE = Key(syscall.HKEY_LOCAL_MACHINE) - USERS = Key(syscall.HKEY_USERS) - CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG) - PERFORMANCE_DATA = Key(syscall.HKEY_PERFORMANCE_DATA) -) - -// Close closes open key k. -func (k Key) Close() error { - return syscall.RegCloseKey(syscall.Handle(k)) -} - -// OpenKey opens a new key with path name relative to key k. -// It accepts any open key, including CURRENT_USER and others, -// and returns the new key and an error. -// The access parameter specifies desired access rights to the -// key to be opened. -func OpenKey(k Key, path string, access uint32) (Key, error) { - p, err := syscall.UTF16PtrFromString(path) - if err != nil { - return 0, err - } - var subkey syscall.Handle - err = syscall.RegOpenKeyEx(syscall.Handle(k), p, 0, access, &subkey) - if err != nil { - return 0, err - } - return Key(subkey), nil -} - -// OpenRemoteKey opens a predefined registry key on another -// computer pcname. The key to be opened is specified by k, but -// can only be one of LOCAL_MACHINE, PERFORMANCE_DATA or USERS. -// If pcname is "", OpenRemoteKey returns local computer key. -func OpenRemoteKey(pcname string, k Key) (Key, error) { - var err error - var p *uint16 - if pcname != "" { - p, err = syscall.UTF16PtrFromString(`\\` + pcname) - if err != nil { - return 0, err - } - } - var remoteKey syscall.Handle - err = regConnectRegistry(p, syscall.Handle(k), &remoteKey) - if err != nil { - return 0, err - } - return Key(remoteKey), nil -} - -// ReadSubKeyNames returns the names of subkeys of key k. -// The parameter n controls the number of returned names, -// analogous to the way os.File.Readdirnames works. -func (k Key) ReadSubKeyNames(n int) ([]string, error) { - names := make([]string, 0) - // Registry key size limit is 255 bytes and described there: - // https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx - buf := make([]uint16, 256) //plus extra room for terminating zero byte -loopItems: - for i := uint32(0); ; i++ { - if n > 0 { - if len(names) == n { - return names, nil - } - } - l := uint32(len(buf)) - for { - err := syscall.RegEnumKeyEx(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) - if err == nil { - break - } - if err == syscall.ERROR_MORE_DATA { - // Double buffer size and try again. - l = uint32(2 * len(buf)) - buf = make([]uint16, l) - continue - } - if err == _ERROR_NO_MORE_ITEMS { - break loopItems - } - return names, err - } - names = append(names, syscall.UTF16ToString(buf[:l])) - } - if n > len(names) { - return names, io.EOF - } - return names, nil -} - -// CreateKey creates a key named path under open key k. -// CreateKey returns the new key and a boolean flag that reports -// whether the key already existed. -// The access parameter specifies the access rights for the key -// to be created. -func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool, err error) { - var h syscall.Handle - var d uint32 - err = regCreateKeyEx(syscall.Handle(k), syscall.StringToUTF16Ptr(path), - 0, nil, _REG_OPTION_NON_VOLATILE, access, nil, &h, &d) - if err != nil { - return 0, false, err - } - return Key(h), d == _REG_OPENED_EXISTING_KEY, nil -} - -// DeleteKey deletes the subkey path of key k and its values. -func DeleteKey(k Key, path string) error { - return regDeleteKey(syscall.Handle(k), syscall.StringToUTF16Ptr(path)) -} - -// A KeyInfo describes the statistics of a key. It is returned by Stat. -type KeyInfo struct { - SubKeyCount uint32 - MaxSubKeyLen uint32 // size of the key's subkey with the longest name, in Unicode characters, not including the terminating zero byte - ValueCount uint32 - MaxValueNameLen uint32 // size of the key's longest value name, in Unicode characters, not including the terminating zero byte - MaxValueLen uint32 // longest data component among the key's values, in bytes - lastWriteTime syscall.Filetime -} - -// ModTime returns the key's last write time. -func (ki *KeyInfo) ModTime() time.Time { - return time.Unix(0, ki.lastWriteTime.Nanoseconds()) -} - -// Stat retrieves information about the open key k. -func (k Key) Stat() (*KeyInfo, error) { - var ki KeyInfo - err := syscall.RegQueryInfoKey(syscall.Handle(k), nil, nil, nil, - &ki.SubKeyCount, &ki.MaxSubKeyLen, nil, &ki.ValueCount, - &ki.MaxValueNameLen, &ki.MaxValueLen, nil, &ki.lastWriteTime) - if err != nil { - return nil, err - } - return &ki, nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/mksyscall.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/mksyscall.go deleted file mode 100644 index 0ac95ffe73..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/mksyscall.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2015 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 registry - -//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/registry_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/registry_test.go deleted file mode 100644 index f8a8214073..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/registry_test.go +++ /dev/null @@ -1,756 +0,0 @@ -// Copyright 2015 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. - -// +build windows - -package registry_test - -import ( - "bytes" - "crypto/rand" - "os" - "syscall" - "testing" - "time" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry" -) - -func randKeyName(prefix string) string { - const numbers = "0123456789" - buf := make([]byte, 10) - rand.Read(buf) - for i, b := range buf { - buf[i] = numbers[b%byte(len(numbers))] - } - return prefix + string(buf) -} - -func TestReadSubKeyNames(t *testing.T) { - k, err := registry.OpenKey(registry.CLASSES_ROOT, "TypeLib", registry.ENUMERATE_SUB_KEYS) - if err != nil { - t.Fatal(err) - } - defer k.Close() - - names, err := k.ReadSubKeyNames(-1) - if err != nil { - t.Fatal(err) - } - var foundStdOle bool - for _, name := range names { - // Every PC has "stdole 2.0 OLE Automation" library installed. - if name == "{00020430-0000-0000-C000-000000000046}" { - foundStdOle = true - } - } - if !foundStdOle { - t.Fatal("could not find stdole 2.0 OLE Automation") - } -} - -func TestCreateOpenDeleteKey(t *testing.T) { - k, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) - if err != nil { - t.Fatal(err) - } - defer k.Close() - - testKName := randKeyName("TestCreateOpenDeleteKey_") - - testK, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY) - if err != nil { - t.Fatal(err) - } - defer testK.Close() - - if exist { - t.Fatalf("key %q already exists", testKName) - } - - testKAgain, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY) - if err != nil { - t.Fatal(err) - } - defer testKAgain.Close() - - if !exist { - t.Fatalf("key %q should already exist", testKName) - } - - testKOpened, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS) - if err != nil { - t.Fatal(err) - } - defer testKOpened.Close() - - err = registry.DeleteKey(k, testKName) - if err != nil { - t.Fatal(err) - } - - testKOpenedAgain, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS) - if err == nil { - defer testKOpenedAgain.Close() - t.Fatalf("key %q should already been deleted", testKName) - } - if err != registry.ErrNotExist { - t.Fatalf(`unexpected error ("not exist" expected): %v`, err) - } -} - -func equalStringSlice(a, b []string) bool { - if len(a) != len(b) { - return false - } - if a == nil { - return true - } - for i := range a { - if a[i] != b[i] { - return false - } - } - return true -} - -type ValueTest struct { - Type uint32 - Name string - Value interface{} - WillFail bool -} - -var ValueTests = []ValueTest{ - {Type: registry.SZ, Name: "String1", Value: ""}, - {Type: registry.SZ, Name: "String2", Value: "\000", WillFail: true}, - {Type: registry.SZ, Name: "String3", Value: "Hello World"}, - {Type: registry.SZ, Name: "String4", Value: "Hello World\000", WillFail: true}, - {Type: registry.EXPAND_SZ, Name: "ExpString1", Value: ""}, - {Type: registry.EXPAND_SZ, Name: "ExpString2", Value: "\000", WillFail: true}, - {Type: registry.EXPAND_SZ, Name: "ExpString3", Value: "Hello World"}, - {Type: registry.EXPAND_SZ, Name: "ExpString4", Value: "Hello\000World", WillFail: true}, - {Type: registry.EXPAND_SZ, Name: "ExpString5", Value: "%PATH%"}, - {Type: registry.EXPAND_SZ, Name: "ExpString6", Value: "%NO_SUCH_VARIABLE%"}, - {Type: registry.EXPAND_SZ, Name: "ExpString7", Value: "%PATH%;."}, - {Type: registry.BINARY, Name: "Binary1", Value: []byte{}}, - {Type: registry.BINARY, Name: "Binary2", Value: []byte{1, 2, 3}}, - {Type: registry.BINARY, Name: "Binary3", Value: []byte{3, 2, 1, 0, 1, 2, 3}}, - {Type: registry.DWORD, Name: "Dword1", Value: uint64(0)}, - {Type: registry.DWORD, Name: "Dword2", Value: uint64(1)}, - {Type: registry.DWORD, Name: "Dword3", Value: uint64(0xff)}, - {Type: registry.DWORD, Name: "Dword4", Value: uint64(0xffff)}, - {Type: registry.QWORD, Name: "Qword1", Value: uint64(0)}, - {Type: registry.QWORD, Name: "Qword2", Value: uint64(1)}, - {Type: registry.QWORD, Name: "Qword3", Value: uint64(0xff)}, - {Type: registry.QWORD, Name: "Qword4", Value: uint64(0xffff)}, - {Type: registry.QWORD, Name: "Qword5", Value: uint64(0xffffff)}, - {Type: registry.QWORD, Name: "Qword6", Value: uint64(0xffffffff)}, - {Type: registry.MULTI_SZ, Name: "MultiString1", Value: []string{"a", "b", "c"}}, - {Type: registry.MULTI_SZ, Name: "MultiString2", Value: []string{"abc", "", "cba"}}, - {Type: registry.MULTI_SZ, Name: "MultiString3", Value: []string{""}}, - {Type: registry.MULTI_SZ, Name: "MultiString4", Value: []string{"abcdef"}}, - {Type: registry.MULTI_SZ, Name: "MultiString5", Value: []string{"\000"}, WillFail: true}, - {Type: registry.MULTI_SZ, Name: "MultiString6", Value: []string{"a\000b"}, WillFail: true}, - {Type: registry.MULTI_SZ, Name: "MultiString7", Value: []string{"ab", "\000", "cd"}, WillFail: true}, - {Type: registry.MULTI_SZ, Name: "MultiString8", Value: []string{"\000", "cd"}, WillFail: true}, - {Type: registry.MULTI_SZ, Name: "MultiString9", Value: []string{"ab", "\000"}, WillFail: true}, -} - -func setValues(t *testing.T, k registry.Key) { - for _, test := range ValueTests { - var err error - switch test.Type { - case registry.SZ: - err = k.SetStringValue(test.Name, test.Value.(string)) - case registry.EXPAND_SZ: - err = k.SetExpandStringValue(test.Name, test.Value.(string)) - case registry.MULTI_SZ: - err = k.SetStringsValue(test.Name, test.Value.([]string)) - case registry.BINARY: - err = k.SetBinaryValue(test.Name, test.Value.([]byte)) - case registry.DWORD: - err = k.SetDWordValue(test.Name, uint32(test.Value.(uint64))) - case registry.QWORD: - err = k.SetQWordValue(test.Name, test.Value.(uint64)) - default: - t.Fatalf("unsupported type %d for %s value", test.Type, test.Name) - } - if test.WillFail { - if err == nil { - t.Fatalf("setting %s value %q should fail, but succeeded", test.Name, test.Value) - } - } else { - if err != nil { - t.Fatal(err) - } - } - } -} - -func enumerateValues(t *testing.T, k registry.Key) { - names, err := k.ReadValueNames(-1) - if err != nil { - t.Error(err) - return - } - haveNames := make(map[string]bool) - for _, n := range names { - haveNames[n] = false - } - for _, test := range ValueTests { - wantFound := !test.WillFail - _, haveFound := haveNames[test.Name] - if wantFound && !haveFound { - t.Errorf("value %s is not found while enumerating", test.Name) - } - if haveFound && !wantFound { - t.Errorf("value %s is found while enumerating, but expected to fail", test.Name) - } - if haveFound { - delete(haveNames, test.Name) - } - } - for n, v := range haveNames { - t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v) - } -} - -func testErrNotExist(t *testing.T, name string, err error) { - if err == nil { - t.Errorf("%s value should not exist", name) - return - } - if err != registry.ErrNotExist { - t.Errorf("reading %s value should return 'not exist' error, but got: %s", name, err) - return - } -} - -func testErrUnexpectedType(t *testing.T, test ValueTest, gottype uint32, err error) { - if err == nil { - t.Errorf("GetXValue(%q) should not succeed", test.Name) - return - } - if err != registry.ErrUnexpectedType { - t.Errorf("reading %s value should return 'unexpected key value type' error, but got: %s", test.Name, err) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } -} - -func testGetStringValue(t *testing.T, k registry.Key, test ValueTest) { - got, gottype, err := k.GetStringValue(test.Name) - if err != nil { - t.Errorf("GetStringValue(%s) failed: %v", test.Name, err) - return - } - if got != test.Value { - t.Errorf("want %s value %q, got %q", test.Name, test.Value, got) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } - if gottype == registry.EXPAND_SZ { - _, err = registry.ExpandString(got) - if err != nil { - t.Errorf("ExpandString(%s) failed: %v", got, err) - return - } - } -} - -func testGetIntegerValue(t *testing.T, k registry.Key, test ValueTest) { - got, gottype, err := k.GetIntegerValue(test.Name) - if err != nil { - t.Errorf("GetIntegerValue(%s) failed: %v", test.Name, err) - return - } - if got != test.Value.(uint64) { - t.Errorf("want %s value %v, got %v", test.Name, test.Value, got) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } -} - -func testGetBinaryValue(t *testing.T, k registry.Key, test ValueTest) { - got, gottype, err := k.GetBinaryValue(test.Name) - if err != nil { - t.Errorf("GetBinaryValue(%s) failed: %v", test.Name, err) - return - } - if !bytes.Equal(got, test.Value.([]byte)) { - t.Errorf("want %s value %v, got %v", test.Name, test.Value, got) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } -} - -func testGetStringsValue(t *testing.T, k registry.Key, test ValueTest) { - got, gottype, err := k.GetStringsValue(test.Name) - if err != nil { - t.Errorf("GetStringsValue(%s) failed: %v", test.Name, err) - return - } - if !equalStringSlice(got, test.Value.([]string)) { - t.Errorf("want %s value %#v, got %#v", test.Name, test.Value, got) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } -} - -func testGetValue(t *testing.T, k registry.Key, test ValueTest, size int) { - if size <= 0 { - return - } - // read data with no buffer - gotsize, gottype, err := k.GetValue(test.Name, nil) - if err != nil { - t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err) - return - } - if gotsize != size { - t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } - // read data with short buffer - gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size-1)) - if err == nil { - t.Errorf("GetValue(%s, [%d]byte) should fail, but succeeded", test.Name, size-1) - return - } - if err != registry.ErrShortBuffer { - t.Errorf("reading %s value should return 'short buffer' error, but got: %s", test.Name, err) - return - } - if gotsize != size { - t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } - // read full data - gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size)) - if err != nil { - t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err) - return - } - if gotsize != size { - t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) - return - } - if gottype != test.Type { - t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) - return - } - // check GetValue returns ErrNotExist as required - _, _, err = k.GetValue(test.Name+"_not_there", make([]byte, size)) - if err == nil { - t.Errorf("GetValue(%q) should not succeed", test.Name) - return - } - if err != registry.ErrNotExist { - t.Errorf("GetValue(%q) should return 'not exist' error, but got: %s", test.Name, err) - return - } -} - -func testValues(t *testing.T, k registry.Key) { - for _, test := range ValueTests { - switch test.Type { - case registry.SZ, registry.EXPAND_SZ: - if test.WillFail { - _, _, err := k.GetStringValue(test.Name) - testErrNotExist(t, test.Name, err) - } else { - testGetStringValue(t, k, test) - _, gottype, err := k.GetIntegerValue(test.Name) - testErrUnexpectedType(t, test, gottype, err) - // Size of utf16 string in bytes is not perfect, - // but correct for current test values. - // Size also includes terminating 0. - testGetValue(t, k, test, (len(test.Value.(string))+1)*2) - } - _, _, err := k.GetStringValue(test.Name + "_string_not_created") - testErrNotExist(t, test.Name+"_string_not_created", err) - case registry.DWORD, registry.QWORD: - testGetIntegerValue(t, k, test) - _, gottype, err := k.GetBinaryValue(test.Name) - testErrUnexpectedType(t, test, gottype, err) - _, _, err = k.GetIntegerValue(test.Name + "_int_not_created") - testErrNotExist(t, test.Name+"_int_not_created", err) - size := 8 - if test.Type == registry.DWORD { - size = 4 - } - testGetValue(t, k, test, size) - case registry.BINARY: - testGetBinaryValue(t, k, test) - _, gottype, err := k.GetStringsValue(test.Name) - testErrUnexpectedType(t, test, gottype, err) - _, _, err = k.GetBinaryValue(test.Name + "_byte_not_created") - testErrNotExist(t, test.Name+"_byte_not_created", err) - testGetValue(t, k, test, len(test.Value.([]byte))) - case registry.MULTI_SZ: - if test.WillFail { - _, _, err := k.GetStringsValue(test.Name) - testErrNotExist(t, test.Name, err) - } else { - testGetStringsValue(t, k, test) - _, gottype, err := k.GetStringValue(test.Name) - testErrUnexpectedType(t, test, gottype, err) - size := 0 - for _, s := range test.Value.([]string) { - size += len(s) + 1 // nil terminated - } - size += 1 // extra nil at the end - size *= 2 // count bytes, not uint16 - testGetValue(t, k, test, size) - } - _, _, err := k.GetStringsValue(test.Name + "_strings_not_created") - testErrNotExist(t, test.Name+"_strings_not_created", err) - default: - t.Errorf("unsupported type %d for %s value", test.Type, test.Name) - continue - } - } -} - -func testStat(t *testing.T, k registry.Key) { - subk, _, err := registry.CreateKey(k, "subkey", registry.CREATE_SUB_KEY) - if err != nil { - t.Error(err) - return - } - defer subk.Close() - - defer registry.DeleteKey(k, "subkey") - - ki, err := k.Stat() - if err != nil { - t.Error(err) - return - } - if ki.SubKeyCount != 1 { - t.Error("key must have 1 subkey") - } - if ki.MaxSubKeyLen != 6 { - t.Error("key max subkey name length must be 6") - } - if ki.ValueCount != 24 { - t.Errorf("key must have 24 values, but is %d", ki.ValueCount) - } - if ki.MaxValueNameLen != 12 { - t.Errorf("key max value name length must be 10, but is %d", ki.MaxValueNameLen) - } - if ki.MaxValueLen != 38 { - t.Errorf("key max value length must be 38, but is %d", ki.MaxValueLen) - } - if mt, ct := ki.ModTime(), time.Now(); ct.Sub(mt) > 100*time.Millisecond { - t.Errorf("key mod time is not close to current time: mtime=%v current=%v delta=%v", mt, ct, ct.Sub(mt)) - } -} - -func deleteValues(t *testing.T, k registry.Key) { - for _, test := range ValueTests { - if test.WillFail { - continue - } - err := k.DeleteValue(test.Name) - if err != nil { - t.Error(err) - continue - } - } - names, err := k.ReadValueNames(-1) - if err != nil { - t.Error(err) - return - } - if len(names) != 0 { - t.Errorf("some values remain after deletion: %v", names) - } -} - -func TestValues(t *testing.T) { - softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) - if err != nil { - t.Fatal(err) - } - defer softwareK.Close() - - testKName := randKeyName("TestValues_") - - k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE) - if err != nil { - t.Fatal(err) - } - defer k.Close() - - if exist { - t.Fatalf("key %q already exists", testKName) - } - - defer registry.DeleteKey(softwareK, testKName) - - setValues(t, k) - - enumerateValues(t, k) - - testValues(t, k) - - testStat(t, k) - - deleteValues(t, k) -} - -func walkKey(t *testing.T, k registry.Key, kname string) { - names, err := k.ReadValueNames(-1) - if err != nil { - t.Fatalf("reading value names of %s failed: %v", kname, err) - } - for _, name := range names { - _, valtype, err := k.GetValue(name, nil) - if err != nil { - t.Fatalf("reading value type of %s of %s failed: %v", name, kname, err) - } - switch valtype { - case registry.NONE: - case registry.SZ: - _, _, err := k.GetStringValue(name) - if err != nil { - t.Error(err) - } - case registry.EXPAND_SZ: - s, _, err := k.GetStringValue(name) - if err != nil { - t.Error(err) - } - _, err = registry.ExpandString(s) - if err != nil { - t.Error(err) - } - case registry.DWORD, registry.QWORD: - _, _, err := k.GetIntegerValue(name) - if err != nil { - t.Error(err) - } - case registry.BINARY: - _, _, err := k.GetBinaryValue(name) - if err != nil { - t.Error(err) - } - case registry.MULTI_SZ: - _, _, err := k.GetStringsValue(name) - if err != nil { - t.Error(err) - } - case registry.FULL_RESOURCE_DESCRIPTOR, registry.RESOURCE_LIST, registry.RESOURCE_REQUIREMENTS_LIST: - // TODO: not implemented - default: - t.Fatalf("value type %d of %s of %s failed: %v", valtype, name, kname, err) - } - } - - names, err = k.ReadSubKeyNames(-1) - if err != nil { - t.Fatalf("reading sub-keys of %s failed: %v", kname, err) - } - for _, name := range names { - func() { - subk, err := registry.OpenKey(k, name, registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE) - if err != nil { - if err == syscall.ERROR_ACCESS_DENIED { - // ignore error, if we are not allowed to access this key - return - } - t.Fatalf("opening sub-keys %s of %s failed: %v", name, kname, err) - } - defer subk.Close() - - walkKey(t, subk, kname+`\`+name) - }() - } -} - -func TestWalkFullRegistry(t *testing.T) { - if testing.Short() { - t.Skip("skipping long running test in short mode") - } - walkKey(t, registry.CLASSES_ROOT, "CLASSES_ROOT") - walkKey(t, registry.CURRENT_USER, "CURRENT_USER") - walkKey(t, registry.LOCAL_MACHINE, "LOCAL_MACHINE") - walkKey(t, registry.USERS, "USERS") - walkKey(t, registry.CURRENT_CONFIG, "CURRENT_CONFIG") -} - -func TestExpandString(t *testing.T) { - got, err := registry.ExpandString("%PATH%") - if err != nil { - t.Fatal(err) - } - want := os.Getenv("PATH") - if got != want { - t.Errorf("want %q string expanded, got %q", want, got) - } -} - -func TestInvalidValues(t *testing.T) { - softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) - if err != nil { - t.Fatal(err) - } - defer softwareK.Close() - - testKName := randKeyName("TestInvalidValues_") - - k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE) - if err != nil { - t.Fatal(err) - } - defer k.Close() - - if exist { - t.Fatalf("key %q already exists", testKName) - } - - defer registry.DeleteKey(softwareK, testKName) - - var tests = []struct { - Type uint32 - Name string - Data []byte - }{ - {registry.DWORD, "Dword1", nil}, - {registry.DWORD, "Dword2", []byte{1, 2, 3}}, - {registry.QWORD, "Qword1", nil}, - {registry.QWORD, "Qword2", []byte{1, 2, 3}}, - {registry.QWORD, "Qword3", []byte{1, 2, 3, 4, 5, 6, 7}}, - {registry.MULTI_SZ, "MultiString1", nil}, - {registry.MULTI_SZ, "MultiString2", []byte{0}}, - {registry.MULTI_SZ, "MultiString3", []byte{'a', 'b', 0}}, - {registry.MULTI_SZ, "MultiString4", []byte{'a', 0, 0, 'b', 0}}, - {registry.MULTI_SZ, "MultiString5", []byte{'a', 0, 0}}, - } - - for _, test := range tests { - err := k.SetValue(test.Name, test.Type, test.Data) - if err != nil { - t.Fatalf("SetValue for %q failed: %v", test.Name, err) - } - } - - for _, test := range tests { - switch test.Type { - case registry.DWORD, registry.QWORD: - value, valType, err := k.GetIntegerValue(test.Name) - if err == nil { - t.Errorf("GetIntegerValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value) - } - case registry.MULTI_SZ: - value, valType, err := k.GetStringsValue(test.Name) - if err == nil { - if len(value) != 0 { - t.Errorf("GetStringsValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value) - } - } - default: - t.Errorf("unsupported type %d for %s value", test.Type, test.Name) - } - } -} - -func TestGetMUIStringValue(t *testing.T) { - if err := registry.LoadRegLoadMUIString(); err != nil { - t.Skip("regLoadMUIString not supported; skipping") - } - if err := procGetDynamicTimeZoneInformation.Find(); err != nil { - t.Skipf("%s not supported; skipping", procGetDynamicTimeZoneInformation.Name) - } - var dtzi DynamicTimezoneinformation - if _, err := GetDynamicTimeZoneInformation(&dtzi); err != nil { - t.Fatal(err) - } - tzKeyName := syscall.UTF16ToString(dtzi.TimeZoneKeyName[:]) - timezoneK, err := registry.OpenKey(registry.LOCAL_MACHINE, - `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\`+tzKeyName, registry.READ) - if err != nil { - t.Fatal(err) - } - defer timezoneK.Close() - - type testType struct { - name string - want string - } - var tests = []testType{ - {"MUI_Std", syscall.UTF16ToString(dtzi.StandardName[:])}, - } - if dtzi.DynamicDaylightTimeDisabled == 0 { - tests = append(tests, testType{"MUI_Dlt", syscall.UTF16ToString(dtzi.DaylightName[:])}) - } - - for _, test := range tests { - got, err := timezoneK.GetMUIStringValue(test.name) - if err != nil { - t.Error("GetMUIStringValue:", err) - } - - if got != test.want { - t.Errorf("GetMUIStringValue: %s: Got %q, want %q", test.name, got, test.want) - } - } -} - -type DynamicTimezoneinformation struct { - Bias int32 - StandardName [32]uint16 - StandardDate syscall.Systemtime - StandardBias int32 - DaylightName [32]uint16 - DaylightDate syscall.Systemtime - DaylightBias int32 - TimeZoneKeyName [128]uint16 - DynamicDaylightTimeDisabled uint8 -} - -var ( - kernel32DLL = syscall.NewLazyDLL("kernel32") - - procGetDynamicTimeZoneInformation = kernel32DLL.NewProc("GetDynamicTimeZoneInformation") -) - -func GetDynamicTimeZoneInformation(dtzi *DynamicTimezoneinformation) (rc uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetDynamicTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(dtzi)), 0, 0) - rc = uint32(r0) - if rc == 0xffffffff { - if e1 != 0 { - err = error(e1) - } else { - err = syscall.EINVAL - } - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/syscall.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/syscall.go deleted file mode 100644 index e66643cbaa..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/syscall.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 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. - -// +build windows - -package registry - -import "syscall" - -const ( - _REG_OPTION_NON_VOLATILE = 0 - - _REG_CREATED_NEW_KEY = 1 - _REG_OPENED_EXISTING_KEY = 2 - - _ERROR_NO_MORE_ITEMS syscall.Errno = 259 -) - -func LoadRegLoadMUIString() error { - return procRegLoadMUIStringW.Find() -} - -//sys regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) = advapi32.RegCreateKeyExW -//sys regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) = advapi32.RegDeleteKeyW -//sys regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) = advapi32.RegSetValueExW -//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegEnumValueW -//sys regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) = advapi32.RegDeleteValueW -//sys regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) = advapi32.RegLoadMUIStringW -//sys regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) = advapi32.RegConnectRegistryW - -//sys expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/value.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/value.go deleted file mode 100644 index 71d4e15bab..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/value.go +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright 2015 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. - -// +build windows - -package registry - -import ( - "errors" - "io" - "syscall" - "unicode/utf16" - "unsafe" -) - -const ( - // Registry value types. - NONE = 0 - SZ = 1 - EXPAND_SZ = 2 - BINARY = 3 - DWORD = 4 - DWORD_BIG_ENDIAN = 5 - LINK = 6 - MULTI_SZ = 7 - RESOURCE_LIST = 8 - FULL_RESOURCE_DESCRIPTOR = 9 - RESOURCE_REQUIREMENTS_LIST = 10 - QWORD = 11 -) - -var ( - // ErrShortBuffer is returned when the buffer was too short for the operation. - ErrShortBuffer = syscall.ERROR_MORE_DATA - - // ErrNotExist is returned when a registry key or value does not exist. - ErrNotExist = syscall.ERROR_FILE_NOT_FOUND - - // ErrUnexpectedType is returned by Get*Value when the value's type was unexpected. - ErrUnexpectedType = errors.New("unexpected key value type") -) - -// GetValue retrieves the type and data for the specified value associated -// with an open key k. It fills up buffer buf and returns the retrieved -// byte count n. If buf is too small to fit the stored value it returns -// ErrShortBuffer error along with the required buffer size n. -// If no buffer is provided, it returns true and actual buffer size n. -// If no buffer is provided, GetValue returns the value's type only. -// If the value does not exist, the error returned is ErrNotExist. -// -// GetValue is a low level function. If value's type is known, use the appropriate -// Get*Value function instead. -func (k Key) GetValue(name string, buf []byte) (n int, valtype uint32, err error) { - pname, err := syscall.UTF16PtrFromString(name) - if err != nil { - return 0, 0, err - } - var pbuf *byte - if len(buf) > 0 { - pbuf = (*byte)(unsafe.Pointer(&buf[0])) - } - l := uint32(len(buf)) - err = syscall.RegQueryValueEx(syscall.Handle(k), pname, nil, &valtype, pbuf, &l) - if err != nil { - return int(l), valtype, err - } - return int(l), valtype, nil -} - -func (k Key) getValue(name string, buf []byte) (date []byte, valtype uint32, err error) { - p, err := syscall.UTF16PtrFromString(name) - if err != nil { - return nil, 0, err - } - var t uint32 - n := uint32(len(buf)) - for { - err = syscall.RegQueryValueEx(syscall.Handle(k), p, nil, &t, (*byte)(unsafe.Pointer(&buf[0])), &n) - if err == nil { - return buf[:n], t, nil - } - if err != syscall.ERROR_MORE_DATA { - return nil, 0, err - } - if n <= uint32(len(buf)) { - return nil, 0, err - } - buf = make([]byte, n) - } -} - -// GetStringValue retrieves the string value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetStringValue returns ErrNotExist. -// If value is not SZ or EXPAND_SZ, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetStringValue(name string) (val string, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return "", typ, err2 - } - switch typ { - case SZ, EXPAND_SZ: - default: - return "", typ, ErrUnexpectedType - } - if len(data) == 0 { - return "", typ, nil - } - u := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[:] - return syscall.UTF16ToString(u), typ, nil -} - -// GetMUIStringValue retrieves the localized string value for -// the specified value name associated with an open key k. -// If the value name doesn't exist or the localized string value -// can't be resolved, GetMUIStringValue returns ErrNotExist. -// GetMUIStringValue panics if the system doesn't support -// regLoadMUIString; use LoadRegLoadMUIString to check if -// regLoadMUIString is supported before calling this function. -func (k Key) GetMUIStringValue(name string) (string, error) { - pname, err := syscall.UTF16PtrFromString(name) - if err != nil { - return "", err - } - - buf := make([]uint16, 1024) - var buflen uint32 - var pdir *uint16 - - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - if err == syscall.ERROR_FILE_NOT_FOUND { // Try fallback path - - // Try to resolve the string value using the system directory as - // a DLL search path; this assumes the string value is of the form - // @[path]\dllname,-strID but with no path given, e.g. @tzres.dll,-320. - - // This approach works with tzres.dll but may have to be revised - // in the future to allow callers to provide custom search paths. - - var s string - s, err = ExpandString("%SystemRoot%\\system32\\") - if err != nil { - return "", err - } - pdir, err = syscall.UTF16PtrFromString(s) - if err != nil { - return "", err - } - - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - } - - for err == syscall.ERROR_MORE_DATA { // Grow buffer if needed - if buflen <= uint32(len(buf)) { - break // Buffer not growing, assume race; break - } - buf = make([]uint16, buflen) - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - } - - if err != nil { - return "", err - } - - return syscall.UTF16ToString(buf), nil -} - -// ExpandString expands environment-variable strings and replaces -// them with the values defined for the current user. -// Use ExpandString to expand EXPAND_SZ strings. -func ExpandString(value string) (string, error) { - if value == "" { - return "", nil - } - p, err := syscall.UTF16PtrFromString(value) - if err != nil { - return "", err - } - r := make([]uint16, 100) - for { - n, err := expandEnvironmentStrings(p, &r[0], uint32(len(r))) - if err != nil { - return "", err - } - if n <= uint32(len(r)) { - u := (*[1 << 29]uint16)(unsafe.Pointer(&r[0]))[:] - return syscall.UTF16ToString(u), nil - } - r = make([]uint16, n) - } -} - -// GetStringsValue retrieves the []string value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetStringsValue returns ErrNotExist. -// If value is not MULTI_SZ, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetStringsValue(name string) (val []string, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return nil, typ, err2 - } - if typ != MULTI_SZ { - return nil, typ, ErrUnexpectedType - } - if len(data) == 0 { - return nil, typ, nil - } - p := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[:len(data)/2] - if len(p) == 0 { - return nil, typ, nil - } - if p[len(p)-1] == 0 { - p = p[:len(p)-1] // remove terminating null - } - val = make([]string, 0, 5) - from := 0 - for i, c := range p { - if c == 0 { - val = append(val, string(utf16.Decode(p[from:i]))) - from = i + 1 - } - } - return val, typ, nil -} - -// GetIntegerValue retrieves the integer value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetIntegerValue returns ErrNotExist. -// If value is not DWORD or QWORD, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetIntegerValue(name string) (val uint64, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 8)) - if err2 != nil { - return 0, typ, err2 - } - switch typ { - case DWORD: - if len(data) != 4 { - return 0, typ, errors.New("DWORD value is not 4 bytes long") - } - return uint64(*(*uint32)(unsafe.Pointer(&data[0]))), DWORD, nil - case QWORD: - if len(data) != 8 { - return 0, typ, errors.New("QWORD value is not 8 bytes long") - } - return uint64(*(*uint64)(unsafe.Pointer(&data[0]))), QWORD, nil - default: - return 0, typ, ErrUnexpectedType - } -} - -// GetBinaryValue retrieves the binary value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetBinaryValue returns ErrNotExist. -// If value is not BINARY, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetBinaryValue(name string) (val []byte, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return nil, typ, err2 - } - if typ != BINARY { - return nil, typ, ErrUnexpectedType - } - return data, typ, nil -} - -func (k Key) setValue(name string, valtype uint32, data []byte) error { - p, err := syscall.UTF16PtrFromString(name) - if err != nil { - return err - } - if len(data) == 0 { - return regSetValueEx(syscall.Handle(k), p, 0, valtype, nil, 0) - } - return regSetValueEx(syscall.Handle(k), p, 0, valtype, &data[0], uint32(len(data))) -} - -// SetDWordValue sets the data and type of a name value -// under key k to value and DWORD. -func (k Key) SetDWordValue(name string, value uint32) error { - return k.setValue(name, DWORD, (*[4]byte)(unsafe.Pointer(&value))[:]) -} - -// SetQWordValue sets the data and type of a name value -// under key k to value and QWORD. -func (k Key) SetQWordValue(name string, value uint64) error { - return k.setValue(name, QWORD, (*[8]byte)(unsafe.Pointer(&value))[:]) -} - -func (k Key) setStringValue(name string, valtype uint32, value string) error { - v, err := syscall.UTF16FromString(value) - if err != nil { - return err - } - buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[:len(v)*2] - return k.setValue(name, valtype, buf) -} - -// SetStringValue sets the data and type of a name value -// under key k to value and SZ. The value must not contain a zero byte. -func (k Key) SetStringValue(name, value string) error { - return k.setStringValue(name, SZ, value) -} - -// SetExpandStringValue sets the data and type of a name value -// under key k to value and EXPAND_SZ. The value must not contain a zero byte. -func (k Key) SetExpandStringValue(name, value string) error { - return k.setStringValue(name, EXPAND_SZ, value) -} - -// SetStringsValue sets the data and type of a name value -// under key k to value and MULTI_SZ. The value strings -// must not contain a zero byte. -func (k Key) SetStringsValue(name string, value []string) error { - ss := "" - for _, s := range value { - for i := 0; i < len(s); i++ { - if s[i] == 0 { - return errors.New("string cannot have 0 inside") - } - } - ss += s + "\x00" - } - v := utf16.Encode([]rune(ss + "\x00")) - buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[:len(v)*2] - return k.setValue(name, MULTI_SZ, buf) -} - -// SetBinaryValue sets the data and type of a name value -// under key k to value and BINARY. -func (k Key) SetBinaryValue(name string, value []byte) error { - return k.setValue(name, BINARY, value) -} - -// DeleteValue removes a named value from the key k. -func (k Key) DeleteValue(name string) error { - return regDeleteValue(syscall.Handle(k), syscall.StringToUTF16Ptr(name)) -} - -// ReadValueNames returns the value names of key k. -// The parameter n controls the number of returned names, -// analogous to the way os.File.Readdirnames works. -func (k Key) ReadValueNames(n int) ([]string, error) { - ki, err := k.Stat() - if err != nil { - return nil, err - } - names := make([]string, 0, ki.ValueCount) - buf := make([]uint16, ki.MaxValueNameLen+1) // extra room for terminating null character -loopItems: - for i := uint32(0); ; i++ { - if n > 0 { - if len(names) == n { - return names, nil - } - } - l := uint32(len(buf)) - for { - err := regEnumValue(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) - if err == nil { - break - } - if err == syscall.ERROR_MORE_DATA { - // Double buffer size and try again. - l = uint32(2 * len(buf)) - buf = make([]uint16, l) - continue - } - if err == _ERROR_NO_MORE_ITEMS { - break loopItems - } - return names, err - } - names = append(names, syscall.UTF16ToString(buf[:l])) - } - if n > len(names) { - return names, io.EOF - } - return names, nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/zsyscall_windows.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/zsyscall_windows.go deleted file mode 100644 index 9821761b69..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry/zsyscall_windows.go +++ /dev/null @@ -1,120 +0,0 @@ -// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT - -package registry - -import ( - "syscall" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -var _ unsafe.Pointer - -// Do the interface allocations only once for common -// Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) -) - -// errnoErr returns common boxed Errno values, to prevent -// allocations at runtime. -func errnoErr(e syscall.Errno) error { - switch e { - case 0: - return nil - case errnoERROR_IO_PENDING: - return errERROR_IO_PENDING - } - // TODO: add more here, after collecting data on the common - // error values see on Windows. (perhaps when running - // all.bat?) - return e -} - -var ( - modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") - modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - - procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW") - procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW") - procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW") - procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW") - procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW") - procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW") - procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW") - procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") -) - -func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) { - r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) - n = uint32(r0) - if n == 0 { - if e1 != 0 { - err = errnoErr(e1) - } else { - err = syscall.EINVAL - } - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/event.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/event.go deleted file mode 100644 index f4e2fa102d..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/event.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package svc - -import ( - "errors" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -// event represents auto-reset, initially non-signaled Windows event. -// It is used to communicate between go and asm parts of this package. -type event struct { - h windows.Handle -} - -func newEvent() (*event, error) { - h, err := windows.CreateEvent(nil, 0, 0, nil) - if err != nil { - return nil, err - } - return &event{h: h}, nil -} - -func (e *event) Close() error { - return windows.CloseHandle(e.h) -} - -func (e *event) Set() error { - return windows.SetEvent(e.h) -} - -func (e *event) Wait() error { - s, err := windows.WaitForSingleObject(e.h, windows.INFINITE) - switch s { - case windows.WAIT_OBJECT_0: - break - case windows.WAIT_FAILED: - return err - default: - return errors.New("unexpected result from WaitForSingleObject") - } - return nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/install.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/install.go deleted file mode 100644 index f86c410639..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/install.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package eventlog - -import ( - "errors" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/registry" -) - -const ( - // Log levels. - Info = windows.EVENTLOG_INFORMATION_TYPE - Warning = windows.EVENTLOG_WARNING_TYPE - Error = windows.EVENTLOG_ERROR_TYPE -) - -const addKeyName = `SYSTEM\CurrentControlSet\Services\EventLog\Application` - -// Install modifies PC registry to allow logging with an event source src. -// It adds all required keys and values to the event log registry key. -// Install uses msgFile as the event message file. If useExpandKey is true, -// the event message file is installed as REG_EXPAND_SZ value, -// otherwise as REG_SZ. Use bitwise of log.Error, log.Warning and -// log.Info to specify events supported by the new event source. -func Install(src, msgFile string, useExpandKey bool, eventsSupported uint32) error { - appkey, err := registry.OpenKey(registry.LOCAL_MACHINE, addKeyName, registry.CREATE_SUB_KEY) - if err != nil { - return err - } - defer appkey.Close() - - sk, alreadyExist, err := registry.CreateKey(appkey, src, registry.SET_VALUE) - if err != nil { - return err - } - defer sk.Close() - if alreadyExist { - return errors.New(addKeyName + `\` + src + " registry key already exists") - } - - err = sk.SetDWordValue("CustomSource", 1) - if err != nil { - return err - } - if useExpandKey { - err = sk.SetExpandStringValue("EventMessageFile", msgFile) - } else { - err = sk.SetStringValue("EventMessageFile", msgFile) - } - if err != nil { - return err - } - err = sk.SetDWordValue("TypesSupported", eventsSupported) - if err != nil { - return err - } - return nil -} - -// InstallAsEventCreate is the same as Install, but uses -// %SystemRoot%\System32\EventCreate.exe as the event message file. -func InstallAsEventCreate(src string, eventsSupported uint32) error { - return Install(src, "%SystemRoot%\\System32\\EventCreate.exe", true, eventsSupported) -} - -// Remove deletes all registry elements installed by the correspondent Install. -func Remove(src string) error { - appkey, err := registry.OpenKey(registry.LOCAL_MACHINE, addKeyName, registry.SET_VALUE) - if err != nil { - return err - } - defer appkey.Close() - return registry.DeleteKey(appkey, src) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log.go deleted file mode 100644 index 011d6d8feb..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// Package eventlog implements access to Windows event log. -// -package eventlog - -import ( - "errors" - "syscall" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -// Log provides access to the system log. -type Log struct { - Handle windows.Handle -} - -// Open retrieves a handle to the specified event log. -func Open(source string) (*Log, error) { - return OpenRemote("", source) -} - -// OpenRemote does the same as Open, but on different computer host. -func OpenRemote(host, source string) (*Log, error) { - if source == "" { - return nil, errors.New("Specify event log source") - } - var s *uint16 - if host != "" { - s = syscall.StringToUTF16Ptr(host) - } - h, err := windows.RegisterEventSource(s, syscall.StringToUTF16Ptr(source)) - if err != nil { - return nil, err - } - return &Log{Handle: h}, nil -} - -// Close closes event log l. -func (l *Log) Close() error { - return windows.DeregisterEventSource(l.Handle) -} - -func (l *Log) report(etype uint16, eid uint32, msg string) error { - ss := []*uint16{syscall.StringToUTF16Ptr(msg)} - return windows.ReportEvent(l.Handle, etype, 0, eid, 0, 1, 0, &ss[0], nil) -} - -// Info writes an information event msg with event id eid to the end of event log l. -// When EventCreate.exe is used, eid must be between 1 and 1000. -func (l *Log) Info(eid uint32, msg string) error { - return l.report(windows.EVENTLOG_INFORMATION_TYPE, eid, msg) -} - -// Warning writes an warning event msg with event id eid to the end of event log l. -// When EventCreate.exe is used, eid must be between 1 and 1000. -func (l *Log) Warning(eid uint32, msg string) error { - return l.report(windows.EVENTLOG_WARNING_TYPE, eid, msg) -} - -// Error writes an error event msg with event id eid to the end of event log l. -// When EventCreate.exe is used, eid must be between 1 and 1000. -func (l *Log) Error(eid uint32, msg string) error { - return l.report(windows.EVENTLOG_ERROR_TYPE, eid, msg) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log_test.go deleted file mode 100644 index 269eacc7f8..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog/log_test.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package eventlog_test - -import ( - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog" -) - -func TestLog(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode - it modifies system logs") - } - - const name = "mylog" - const supports = eventlog.Error | eventlog.Warning | eventlog.Info - err := eventlog.InstallAsEventCreate(name, supports) - if err != nil { - t.Fatalf("Install failed: %s", err) - } - defer func() { - err = eventlog.Remove(name) - if err != nil { - t.Fatalf("Remove failed: %s", err) - } - }() - - l, err := eventlog.Open(name) - if err != nil { - t.Fatalf("Open failed: %s", err) - } - defer l.Close() - - err = l.Info(1, "info") - if err != nil { - t.Fatalf("Info failed: %s", err) - } - err = l.Warning(2, "warning") - if err != nil { - t.Fatalf("Warning failed: %s", err) - } - err = l.Error(3, "error") - if err != nil { - t.Fatalf("Error failed: %s", err) - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/beep.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/beep.go deleted file mode 100644 index dcf23408d3..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/beep.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package main - -import ( - "syscall" -) - -// BUG(brainman): MessageBeep Windows api is broken on Windows 7, -// so this example does not beep when runs as service on Windows 7. - -var ( - beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") -) - -func beep() { - beepFunc.Call(0xffffffff) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/install.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/install.go deleted file mode 100644 index 8e7c0d0bd7..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/install.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package main - -import ( - "fmt" - "os" - "path/filepath" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr" -) - -func exePath() (string, error) { - prog := os.Args[0] - p, err := filepath.Abs(prog) - if err != nil { - return "", err - } - fi, err := os.Stat(p) - if err == nil { - if !fi.Mode().IsDir() { - return p, nil - } - err = fmt.Errorf("%s is directory", p) - } - if filepath.Ext(p) == "" { - p += ".exe" - fi, err := os.Stat(p) - if err == nil { - if !fi.Mode().IsDir() { - return p, nil - } - err = fmt.Errorf("%s is directory", p) - } - } - return "", err -} - -func installService(name, desc string) error { - exepath, err := exePath() - if err != nil { - return err - } - m, err := mgr.Connect() - if err != nil { - return err - } - defer m.Disconnect() - s, err := m.OpenService(name) - if err == nil { - s.Close() - return fmt.Errorf("service %s already exists", name) - } - s, err = m.CreateService(name, exepath, mgr.Config{DisplayName: desc}, "is", "auto-started") - if err != nil { - return err - } - defer s.Close() - err = eventlog.InstallAsEventCreate(name, eventlog.Error|eventlog.Warning|eventlog.Info) - if err != nil { - s.Delete() - return fmt.Errorf("SetupEventLogSource() failed: %s", err) - } - return nil -} - -func removeService(name string) error { - m, err := mgr.Connect() - if err != nil { - return err - } - defer m.Disconnect() - s, err := m.OpenService(name) - if err != nil { - return fmt.Errorf("service %s is not installed", name) - } - defer s.Close() - err = s.Delete() - if err != nil { - return err - } - err = eventlog.Remove(name) - if err != nil { - return fmt.Errorf("RemoveEventLogSource() failed: %s", err) - } - return nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/main.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/main.go deleted file mode 100644 index 9ca2f04474..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/main.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// Example service program that beeps. -// -// The program demonstrates how to create Windows service and -// install / remove it on a computer. It also shows how to -// stop / start / pause / continue any service, and how to -// write to event log. It also shows how to use debug -// facilities available in debug package. -// -package main - -import ( - "fmt" - "log" - "os" - "strings" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc" -) - -func usage(errmsg string) { - fmt.Fprintf(os.Stderr, - "%s\n\n"+ - "usage: %s \n"+ - " where is one of\n"+ - " install, remove, debug, start, stop, pause or continue.\n", - errmsg, os.Args[0]) - os.Exit(2) -} - -func main() { - const svcName = "myservice" - - isIntSess, err := svc.IsAnInteractiveSession() - if err != nil { - log.Fatalf("failed to determine if we are running in an interactive session: %v", err) - } - if !isIntSess { - runService(svcName, false) - return - } - - if len(os.Args) < 2 { - usage("no command specified") - } - - cmd := strings.ToLower(os.Args[1]) - switch cmd { - case "debug": - runService(svcName, true) - return - case "install": - err = installService(svcName, "my service") - case "remove": - err = removeService(svcName) - case "start": - err = startService(svcName) - case "stop": - err = controlService(svcName, svc.Stop, svc.Stopped) - case "pause": - err = controlService(svcName, svc.Pause, svc.Paused) - case "continue": - err = controlService(svcName, svc.Continue, svc.Running) - default: - usage(fmt.Sprintf("invalid command %s", cmd)) - } - if err != nil { - log.Fatalf("failed to %s %s: %v", cmd, svcName, err) - } - return -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/manage.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/manage.go deleted file mode 100644 index 4734f57f11..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/manage.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package main - -import ( - "fmt" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr" -) - -func startService(name string) error { - m, err := mgr.Connect() - if err != nil { - return err - } - defer m.Disconnect() - s, err := m.OpenService(name) - if err != nil { - return fmt.Errorf("could not access service: %v", err) - } - defer s.Close() - err = s.Start("is", "manual-started") - if err != nil { - return fmt.Errorf("could not start service: %v", err) - } - return nil -} - -func controlService(name string, c svc.Cmd, to svc.State) error { - m, err := mgr.Connect() - if err != nil { - return err - } - defer m.Disconnect() - s, err := m.OpenService(name) - if err != nil { - return fmt.Errorf("could not access service: %v", err) - } - defer s.Close() - status, err := s.Control(c) - if err != nil { - return fmt.Errorf("could not send control=%d: %v", c, err) - } - timeout := time.Now().Add(10 * time.Second) - for status.State != to { - if timeout.Before(time.Now()) { - return fmt.Errorf("timeout waiting for service to go to state=%d", to) - } - time.Sleep(300 * time.Millisecond) - status, err = s.Query() - if err != nil { - return fmt.Errorf("could not retrieve service status: %v", err) - } - } - return nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/service.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/service.go deleted file mode 100644 index 1cf3c87170..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/example/service.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package main - -import ( - "fmt" - "strings" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/debug" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/eventlog" -) - -var elog debug.Log - -type myservice struct{} - -func (m *myservice) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) { - const cmdsAccepted = svc.AcceptStop | svc.AcceptShutdown | svc.AcceptPauseAndContinue - changes <- svc.Status{State: svc.StartPending} - fasttick := time.Tick(500 * time.Millisecond) - slowtick := time.Tick(2 * time.Second) - tick := fasttick - changes <- svc.Status{State: svc.Running, Accepts: cmdsAccepted} - elog.Info(1, strings.Join(args, "-")) -loop: - for { - select { - case <-tick: - beep() - elog.Info(1, "beep") - case c := <-r: - switch c.Cmd { - case svc.Interrogate: - changes <- c.CurrentStatus - // Testing deadlock from https://code.google.com/p/winsvc/issues/detail?id=4 - time.Sleep(100 * time.Millisecond) - changes <- c.CurrentStatus - case svc.Stop, svc.Shutdown: - break loop - case svc.Pause: - changes <- svc.Status{State: svc.Paused, Accepts: cmdsAccepted} - tick = slowtick - case svc.Continue: - changes <- svc.Status{State: svc.Running, Accepts: cmdsAccepted} - tick = fasttick - default: - elog.Error(1, fmt.Sprintf("unexpected control request #%d", c)) - } - } - } - changes <- svc.Status{State: svc.StopPending} - return -} - -func runService(name string, isDebug bool) { - var err error - if isDebug { - elog = debug.New(name) - } else { - elog, err = eventlog.Open(name) - if err != nil { - return - } - } - defer elog.Close() - - elog.Info(1, fmt.Sprintf("starting %s service", name)) - run := svc.Run - if isDebug { - run = debug.Run - } - err = run(name, &myservice{}) - if err != nil { - elog.Error(1, fmt.Sprintf("%s service failed: %v", name, err)) - return - } - elog.Info(1, fmt.Sprintf("%s service stopped", name)) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.c b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.c deleted file mode 100644 index 6f1be1fa3b..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.c +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012 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. - -// +build windows -// +build !go1.3 - -// copied from pkg/runtime -typedef unsigned int uint32; -typedef unsigned long long int uint64; -#ifdef _64BIT -typedef uint64 uintptr; -#else -typedef uint32 uintptr; -#endif - -// from sys_386.s or sys_amd64.s -void ·servicemain(void); - -void -·getServiceMain(uintptr *r) -{ - *r = (uintptr)·servicemain; -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.go deleted file mode 100644 index cd8b913c99..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go12.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2014 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. - -// +build windows -// +build !go1.3 - -package svc - -// from go12.c -func getServiceMain(r *uintptr) diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go13.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go13.go deleted file mode 100644 index 9d7f3cec54..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/go13.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2014 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. - -// +build windows -// +build go1.3 - -package svc - -import "unsafe" - -const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const - -// Should be a built-in for unsafe.Pointer? -func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { - return unsafe.Pointer(uintptr(p) + x) -} - -// funcPC returns the entry PC of the function f. -// It assumes that f is a func value. Otherwise the behavior is undefined. -func funcPC(f interface{}) uintptr { - return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) -} - -// from sys_386.s and sys_amd64.s -func servicectlhandler(ctl uint32) uintptr -func servicemain(argc uint32, argv **uint16) - -func getServiceMain(r *uintptr) { - *r = funcPC(servicemain) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr.go deleted file mode 100644 index b5860e794d..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// Package mgr can be used to manage Windows service programs. -// It can be used to install and remove them. It can also start, -// stop and pause them. The package can query / change current -// service state and config parameters. -// -package mgr - -import ( - "syscall" - "unicode/utf16" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -// Mgr is used to manage Windows service. -type Mgr struct { - Handle windows.Handle -} - -// Connect establishes a connection to the service control manager. -func Connect() (*Mgr, error) { - return ConnectRemote("") -} - -// ConnectRemote establishes a connection to the -// service control manager on computer named host. -func ConnectRemote(host string) (*Mgr, error) { - var s *uint16 - if host != "" { - s = syscall.StringToUTF16Ptr(host) - } - h, err := windows.OpenSCManager(s, nil, windows.SC_MANAGER_ALL_ACCESS) - if err != nil { - return nil, err - } - return &Mgr{Handle: h}, nil -} - -// Disconnect closes connection to the service control manager m. -func (m *Mgr) Disconnect() error { - return windows.CloseServiceHandle(m.Handle) -} - -func toPtr(s string) *uint16 { - if len(s) == 0 { - return nil - } - return syscall.StringToUTF16Ptr(s) -} - -// toStringBlock terminates strings in ss with 0, and then -// concatenates them together. It also adds extra 0 at the end. -func toStringBlock(ss []string) *uint16 { - if len(ss) == 0 { - return nil - } - t := "" - for _, s := range ss { - if s != "" { - t += s + "\x00" - } - } - if t == "" { - return nil - } - t += "\x00" - return &utf16.Encode([]rune(t))[0] -} - -// CreateService installs new service name on the system. -// The service will be executed by running exepath binary. -// Use config c to specify service parameters. -// Any args will be passed as command-line arguments when -// the service is started; these arguments are distinct from -// the arguments passed to Service.Start or via the "Start -// parameters" field in the service's Properties dialog box. -func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Service, error) { - if c.StartType == 0 { - c.StartType = StartManual - } - if c.ErrorControl == 0 { - c.ErrorControl = ErrorNormal - } - if c.ServiceType == 0 { - c.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS - } - s := syscall.EscapeArg(exepath) - for _, v := range args { - s += " " + syscall.EscapeArg(v) - } - h, err := windows.CreateService(m.Handle, toPtr(name), toPtr(c.DisplayName), - windows.SERVICE_ALL_ACCESS, c.ServiceType, - c.StartType, c.ErrorControl, toPtr(s), toPtr(c.LoadOrderGroup), - nil, toStringBlock(c.Dependencies), toPtr(c.ServiceStartName), toPtr(c.Password)) - if err != nil { - return nil, err - } - if c.Description != "" { - err = updateDescription(h, c.Description) - if err != nil { - return nil, err - } - } - return &Service{Name: name, Handle: h}, nil -} - -// OpenService retrieves access to service name, so it can -// be interrogated and controlled. -func (m *Mgr) OpenService(name string) (*Service, error) { - h, err := windows.OpenService(m.Handle, syscall.StringToUTF16Ptr(name), windows.SERVICE_ALL_ACCESS) - if err != nil { - return nil, err - } - return &Service{Name: name, Handle: h}, nil -} - -// ListServices enumerates services in the specified -// service control manager database m. -// If the caller does not have the SERVICE_QUERY_STATUS -// access right to a service, the service is silently -// omitted from the list of services returned. -func (m *Mgr) ListServices() ([]string, error) { - var err error - var bytesNeeded, servicesReturned uint32 - var buf []byte - for { - var p *byte - if len(buf) > 0 { - p = &buf[0] - } - err = windows.EnumServicesStatusEx(m.Handle, windows.SC_ENUM_PROCESS_INFO, - windows.SERVICE_WIN32, windows.SERVICE_STATE_ALL, - p, uint32(len(buf)), &bytesNeeded, &servicesReturned, nil, nil) - if err == nil { - break - } - if err != syscall.ERROR_MORE_DATA { - return nil, err - } - if bytesNeeded <= uint32(len(buf)) { - return nil, err - } - buf = make([]byte, bytesNeeded) - } - if servicesReturned == 0 { - return nil, nil - } - services := (*[1 << 20]windows.ENUM_SERVICE_STATUS_PROCESS)(unsafe.Pointer(&buf[0]))[:servicesReturned] - var names []string - for _, s := range services { - name := syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(s.ServiceName))[:]) - names = append(names, name) - } - return names, nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr_test.go deleted file mode 100644 index 99eb74f4b8..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/mgr_test.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package mgr_test - -import ( - "os" - "path/filepath" - "sort" - "strings" - "syscall" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr" -) - -func TestOpenLanManServer(t *testing.T) { - m, err := mgr.Connect() - if err != nil { - if errno, ok := err.(syscall.Errno); ok && errno == syscall.ERROR_ACCESS_DENIED { - t.Skip("Skipping test: we don't have rights to manage services.") - } - t.Fatalf("SCM connection failed: %s", err) - } - defer m.Disconnect() - - s, err := m.OpenService("LanmanServer") - if err != nil { - t.Fatalf("OpenService(lanmanserver) failed: %s", err) - } - defer s.Close() - - _, err = s.Config() - if err != nil { - t.Fatalf("Config failed: %s", err) - } -} - -func install(t *testing.T, m *mgr.Mgr, name, exepath string, c mgr.Config) { - // Sometimes it takes a while for the service to get - // removed after previous test run. - for i := 0; ; i++ { - s, err := m.OpenService(name) - if err != nil { - break - } - s.Close() - - if i > 10 { - t.Fatalf("service %s already exists", name) - } - time.Sleep(300 * time.Millisecond) - } - - s, err := m.CreateService(name, exepath, c) - if err != nil { - t.Fatalf("CreateService(%s) failed: %v", name, err) - } - defer s.Close() -} - -func depString(d []string) string { - if len(d) == 0 { - return "" - } - for i := range d { - d[i] = strings.ToLower(d[i]) - } - ss := sort.StringSlice(d) - ss.Sort() - return strings.Join([]string(ss), " ") -} - -func testConfig(t *testing.T, s *mgr.Service, should mgr.Config) mgr.Config { - is, err := s.Config() - if err != nil { - t.Fatalf("Config failed: %s", err) - } - if should.DisplayName != is.DisplayName { - t.Fatalf("config mismatch: DisplayName is %q, but should have %q", is.DisplayName, should.DisplayName) - } - if should.StartType != is.StartType { - t.Fatalf("config mismatch: StartType is %v, but should have %v", is.StartType, should.StartType) - } - if should.Description != is.Description { - t.Fatalf("config mismatch: Description is %q, but should have %q", is.Description, should.Description) - } - if depString(should.Dependencies) != depString(is.Dependencies) { - t.Fatalf("config mismatch: Dependencies is %v, but should have %v", is.Dependencies, should.Dependencies) - } - return is -} - -func remove(t *testing.T, s *mgr.Service) { - err := s.Delete() - if err != nil { - t.Fatalf("Delete failed: %s", err) - } -} - -func TestMyService(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode - it modifies system services") - } - - const name = "myservice" - - m, err := mgr.Connect() - if err != nil { - if errno, ok := err.(syscall.Errno); ok && errno == syscall.ERROR_ACCESS_DENIED { - t.Skip("Skipping test: we don't have rights to manage services.") - } - t.Fatalf("SCM connection failed: %s", err) - } - defer m.Disconnect() - - c := mgr.Config{ - StartType: mgr.StartDisabled, - DisplayName: "my service", - Description: "my service is just a test", - Dependencies: []string{"LanmanServer", "W32Time"}, - } - - exename := os.Args[0] - exepath, err := filepath.Abs(exename) - if err != nil { - t.Fatalf("filepath.Abs(%s) failed: %s", exename, err) - } - - install(t, m, name, exepath, c) - - s, err := m.OpenService(name) - if err != nil { - t.Fatalf("service %s is not installed", name) - } - defer s.Close() - - c.BinaryPathName = exepath - c = testConfig(t, s, c) - - c.StartType = mgr.StartManual - err = s.UpdateConfig(c) - if err != nil { - t.Fatalf("UpdateConfig failed: %v", err) - } - - testConfig(t, s, c) - - svcnames, err := m.ListServices() - if err != nil { - t.Fatalf("ListServices failed: %v", err) - } - var myserviceIsInstalled bool - for _, sn := range svcnames { - if sn == name { - myserviceIsInstalled = true - break - } - } - if !myserviceIsInstalled { - t.Errorf("ListServices failed to find %q service", name) - } - - remove(t, s) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/service.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/service.go deleted file mode 100644 index 9d642941f9..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr/service.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package mgr - -import ( - "syscall" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc" -) - -// TODO(brainman): Use EnumDependentServices to enumerate dependent services. - -// Service is used to access Windows service. -type Service struct { - Name string - Handle windows.Handle -} - -// Delete marks service s for deletion from the service control manager database. -func (s *Service) Delete() error { - return windows.DeleteService(s.Handle) -} - -// Close relinquish access to the service s. -func (s *Service) Close() error { - return windows.CloseServiceHandle(s.Handle) -} - -// Start starts service s. -// args will be passed to svc.Handler.Execute. -func (s *Service) Start(args ...string) error { - var p **uint16 - if len(args) > 0 { - vs := make([]*uint16, len(args)) - for i := range vs { - vs[i] = syscall.StringToUTF16Ptr(args[i]) - } - p = &vs[0] - } - return windows.StartService(s.Handle, uint32(len(args)), p) -} - -// Control sends state change request c to the servce s. -func (s *Service) Control(c svc.Cmd) (svc.Status, error) { - var t windows.SERVICE_STATUS - err := windows.ControlService(s.Handle, uint32(c), &t) - if err != nil { - return svc.Status{}, err - } - return svc.Status{ - State: svc.State(t.CurrentState), - Accepts: svc.Accepted(t.ControlsAccepted), - }, nil -} - -// Query returns current status of service s. -func (s *Service) Query() (svc.Status, error) { - var t windows.SERVICE_STATUS - err := windows.QueryServiceStatus(s.Handle, &t) - if err != nil { - return svc.Status{}, err - } - return svc.Status{ - State: svc.State(t.CurrentState), - Accepts: svc.Accepted(t.ControlsAccepted), - }, nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/security.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/security.go deleted file mode 100644 index 7d727914fe..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/security.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package svc - -import ( - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -func allocSid(subAuth0 uint32) (*windows.SID, error) { - var sid *windows.SID - err := windows.AllocateAndInitializeSid(&windows.SECURITY_NT_AUTHORITY, - 1, subAuth0, 0, 0, 0, 0, 0, 0, 0, &sid) - if err != nil { - return nil, err - } - return sid, nil -} - -// IsAnInteractiveSession determines if calling process is running interactively. -// It queries the process token for membership in the Interactive group. -// http://stackoverflow.com/questions/2668851/how-do-i-detect-that-my-application-is-running-as-service-or-in-an-interactive-s -func IsAnInteractiveSession() (bool, error) { - interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID) - if err != nil { - return false, err - } - defer windows.FreeSid(interSid) - - serviceSid, err := allocSid(windows.SECURITY_SERVICE_RID) - if err != nil { - return false, err - } - defer windows.FreeSid(serviceSid) - - t, err := windows.OpenCurrentProcessToken() - if err != nil { - return false, err - } - defer t.Close() - - gs, err := t.GetTokenGroups() - if err != nil { - return false, err - } - p := unsafe.Pointer(&gs.Groups[0]) - groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount] - for _, g := range groups { - if windows.EqualSid(g.Sid, interSid) { - return true, nil - } - if windows.EqualSid(g.Sid, serviceSid) { - return false, nil - } - } - return false, nil -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/service.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/service.go deleted file mode 100644 index af8ec3be1c..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/service.go +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// Package svc provides everything required to build Windows service. -// -package svc - -import ( - "errors" - "runtime" - "syscall" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -// State describes service execution state (Stopped, Running and so on). -type State uint32 - -const ( - Stopped = State(windows.SERVICE_STOPPED) - StartPending = State(windows.SERVICE_START_PENDING) - StopPending = State(windows.SERVICE_STOP_PENDING) - Running = State(windows.SERVICE_RUNNING) - ContinuePending = State(windows.SERVICE_CONTINUE_PENDING) - PausePending = State(windows.SERVICE_PAUSE_PENDING) - Paused = State(windows.SERVICE_PAUSED) -) - -// Cmd represents service state change request. It is sent to a service -// by the service manager, and should be actioned upon by the service. -type Cmd uint32 - -const ( - Stop = Cmd(windows.SERVICE_CONTROL_STOP) - Pause = Cmd(windows.SERVICE_CONTROL_PAUSE) - Continue = Cmd(windows.SERVICE_CONTROL_CONTINUE) - Interrogate = Cmd(windows.SERVICE_CONTROL_INTERROGATE) - Shutdown = Cmd(windows.SERVICE_CONTROL_SHUTDOWN) - ParamChange = Cmd(windows.SERVICE_CONTROL_PARAMCHANGE) - NetBindAdd = Cmd(windows.SERVICE_CONTROL_NETBINDADD) - NetBindRemove = Cmd(windows.SERVICE_CONTROL_NETBINDREMOVE) - NetBindEnable = Cmd(windows.SERVICE_CONTROL_NETBINDENABLE) - NetBindDisable = Cmd(windows.SERVICE_CONTROL_NETBINDDISABLE) - DeviceEvent = Cmd(windows.SERVICE_CONTROL_DEVICEEVENT) - HardwareProfileChange = Cmd(windows.SERVICE_CONTROL_HARDWAREPROFILECHANGE) - PowerEvent = Cmd(windows.SERVICE_CONTROL_POWEREVENT) - SessionChange = Cmd(windows.SERVICE_CONTROL_SESSIONCHANGE) -) - -// Accepted is used to describe commands accepted by the service. -// Note that Interrogate is always accepted. -type Accepted uint32 - -const ( - AcceptStop = Accepted(windows.SERVICE_ACCEPT_STOP) - AcceptShutdown = Accepted(windows.SERVICE_ACCEPT_SHUTDOWN) - AcceptPauseAndContinue = Accepted(windows.SERVICE_ACCEPT_PAUSE_CONTINUE) - AcceptParamChange = Accepted(windows.SERVICE_ACCEPT_PARAMCHANGE) - AcceptNetBindChange = Accepted(windows.SERVICE_ACCEPT_NETBINDCHANGE) - AcceptHardwareProfileChange = Accepted(windows.SERVICE_ACCEPT_HARDWAREPROFILECHANGE) - AcceptPowerEvent = Accepted(windows.SERVICE_ACCEPT_POWEREVENT) - AcceptSessionChange = Accepted(windows.SERVICE_ACCEPT_SESSIONCHANGE) -) - -// Status combines State and Accepted commands to fully describe running service. -type Status struct { - State State - Accepts Accepted - CheckPoint uint32 // used to report progress during a lengthy operation - WaitHint uint32 // estimated time required for a pending operation, in milliseconds -} - -// ChangeRequest is sent to the service Handler to request service status change. -type ChangeRequest struct { - Cmd Cmd - EventType uint32 - EventData uintptr - CurrentStatus Status -} - -// Handler is the interface that must be implemented to build Windows service. -type Handler interface { - - // Execute will be called by the package code at the start of - // the service, and the service will exit once Execute completes. - // Inside Execute you must read service change requests from r and - // act accordingly. You must keep service control manager up to date - // about state of your service by writing into s as required. - // args contains service name followed by argument strings passed - // to the service. - // You can provide service exit code in exitCode return parameter, - // with 0 being "no error". You can also indicate if exit code, - // if any, is service specific or not by using svcSpecificEC - // parameter. - Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32) -} - -var ( - // These are used by asm code. - goWaitsH uintptr - cWaitsH uintptr - ssHandle uintptr - sName *uint16 - sArgc uintptr - sArgv **uint16 - ctlHandlerExProc uintptr - cSetEvent uintptr - cWaitForSingleObject uintptr - cRegisterServiceCtrlHandlerExW uintptr -) - -func init() { - k := syscall.MustLoadDLL("kernel32.dll") - cSetEvent = k.MustFindProc("SetEvent").Addr() - cWaitForSingleObject = k.MustFindProc("WaitForSingleObject").Addr() - a := syscall.MustLoadDLL("advapi32.dll") - cRegisterServiceCtrlHandlerExW = a.MustFindProc("RegisterServiceCtrlHandlerExW").Addr() -} - -// The HandlerEx prototype also has a context pointer but since we don't use -// it at start-up time we don't have to pass it over either. -type ctlEvent struct { - cmd Cmd - eventType uint32 - eventData uintptr - errno uint32 -} - -// service provides access to windows service api. -type service struct { - name string - h windows.Handle - cWaits *event - goWaits *event - c chan ctlEvent - handler Handler -} - -func newService(name string, handler Handler) (*service, error) { - var s service - var err error - s.name = name - s.c = make(chan ctlEvent) - s.handler = handler - s.cWaits, err = newEvent() - if err != nil { - return nil, err - } - s.goWaits, err = newEvent() - if err != nil { - s.cWaits.Close() - return nil, err - } - return &s, nil -} - -func (s *service) close() error { - s.cWaits.Close() - s.goWaits.Close() - return nil -} - -type exitCode struct { - isSvcSpecific bool - errno uint32 -} - -func (s *service) updateStatus(status *Status, ec *exitCode) error { - if s.h == 0 { - return errors.New("updateStatus with no service status handle") - } - var t windows.SERVICE_STATUS - t.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS - t.CurrentState = uint32(status.State) - if status.Accepts&AcceptStop != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_STOP - } - if status.Accepts&AcceptShutdown != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_SHUTDOWN - } - if status.Accepts&AcceptPauseAndContinue != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_PAUSE_CONTINUE - } - if status.Accepts&AcceptParamChange != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_PARAMCHANGE - } - if status.Accepts&AcceptNetBindChange != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_NETBINDCHANGE - } - if status.Accepts&AcceptHardwareProfileChange != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_HARDWAREPROFILECHANGE - } - if status.Accepts&AcceptPowerEvent != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_POWEREVENT - } - if status.Accepts&AcceptSessionChange != 0 { - t.ControlsAccepted |= windows.SERVICE_ACCEPT_SESSIONCHANGE - } - if ec.errno == 0 { - t.Win32ExitCode = windows.NO_ERROR - t.ServiceSpecificExitCode = windows.NO_ERROR - } else if ec.isSvcSpecific { - t.Win32ExitCode = uint32(windows.ERROR_SERVICE_SPECIFIC_ERROR) - t.ServiceSpecificExitCode = ec.errno - } else { - t.Win32ExitCode = ec.errno - t.ServiceSpecificExitCode = windows.NO_ERROR - } - t.CheckPoint = status.CheckPoint - t.WaitHint = status.WaitHint - return windows.SetServiceStatus(s.h, &t) -} - -const ( - sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota - sysErrNewThreadInCallback -) - -func (s *service) run() { - s.goWaits.Wait() - s.h = windows.Handle(ssHandle) - argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc] - args := make([]string, len(argv)) - for i, a := range argv { - args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:]) - } - - cmdsToHandler := make(chan ChangeRequest) - changesFromHandler := make(chan Status) - exitFromHandler := make(chan exitCode) - - go func() { - ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler) - exitFromHandler <- exitCode{ss, errno} - }() - - status := Status{State: Stopped} - ec := exitCode{isSvcSpecific: true, errno: 0} - var outch chan ChangeRequest - inch := s.c - var cmd Cmd - var evtype uint32 - var evdata uintptr -loop: - for { - select { - case r := <-inch: - if r.errno != 0 { - ec.errno = r.errno - break loop - } - inch = nil - outch = cmdsToHandler - cmd = r.cmd - evtype = r.eventType - evdata = r.eventData - case outch <- ChangeRequest{cmd, evtype, evdata, status}: - inch = s.c - outch = nil - case c := <-changesFromHandler: - err := s.updateStatus(&c, &ec) - if err != nil { - // best suitable error number - ec.errno = sysErrSetServiceStatusFailed - if err2, ok := err.(syscall.Errno); ok { - ec.errno = uint32(err2) - } - break loop - } - status = c - case ec = <-exitFromHandler: - break loop - } - } - - s.updateStatus(&Status{State: Stopped}, &ec) - s.cWaits.Set() -} - -func newCallback(fn interface{}) (cb uintptr, err error) { - defer func() { - r := recover() - if r == nil { - return - } - cb = 0 - switch v := r.(type) { - case string: - err = errors.New(v) - case error: - err = v - default: - err = errors.New("unexpected panic in syscall.NewCallback") - } - }() - return syscall.NewCallback(fn), nil -} - -// BUG(brainman): There is no mechanism to run multiple services -// inside one single executable. Perhaps, it can be overcome by -// using RegisterServiceCtrlHandlerEx Windows api. - -// Run executes service name by calling appropriate handler function. -func Run(name string, handler Handler) error { - runtime.LockOSThread() - - tid := windows.GetCurrentThreadId() - - s, err := newService(name, handler) - if err != nil { - return err - } - - ctlHandler := func(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr { - e := ctlEvent{cmd: Cmd(ctl), eventType: evtype, eventData: evdata} - // We assume that this callback function is running on - // the same thread as Run. Nowhere in MS documentation - // I could find statement to guarantee that. So putting - // check here to verify, otherwise things will go bad - // quickly, if ignored. - i := windows.GetCurrentThreadId() - if i != tid { - e.errno = sysErrNewThreadInCallback - } - s.c <- e - // Always return NO_ERROR (0) for now. - return 0 - } - - var svcmain uintptr - getServiceMain(&svcmain) - t := []windows.SERVICE_TABLE_ENTRY{ - {ServiceName: syscall.StringToUTF16Ptr(s.name), ServiceProc: svcmain}, - {ServiceName: nil, ServiceProc: 0}, - } - - goWaitsH = uintptr(s.goWaits.h) - cWaitsH = uintptr(s.cWaits.h) - sName = t[0].ServiceName - ctlHandlerExProc, err = newCallback(ctlHandler) - if err != nil { - return err - } - - go s.run() - - err = windows.StartServiceCtrlDispatcher(&t[0]) - if err != nil { - return err - } - return nil -} - -// StatusHandle returns service status handle. It is safe to call this function -// from inside the Handler.Execute because then it is guaranteed to be set. -// This code will have to change once multiple services are possible per process. -func StatusHandle() windows.Handle { - return windows.Handle(ssHandle) -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/svc_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/svc_test.go deleted file mode 100644 index d0468baa33..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/svc_test.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -package svc_test - -import ( - "fmt" - "io/ioutil" - "math/rand" - "os" - "os/exec" - "path/filepath" - "strings" - "testing" - "time" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc" - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/mgr" -) - -func getState(t *testing.T, s *mgr.Service) svc.State { - status, err := s.Query() - if err != nil { - t.Fatalf("Query(%s) failed: %s", s.Name, err) - } - return status.State -} - -func testState(t *testing.T, s *mgr.Service, want svc.State) { - have := getState(t, s) - if have != want { - t.Fatalf("%s state is=%d want=%d", s.Name, have, want) - } -} - -func waitState(t *testing.T, s *mgr.Service, want svc.State) { - for i := 0; ; i++ { - have := getState(t, s) - if have == want { - return - } - if i > 10 { - t.Fatalf("%s state is=%d, waiting timeout", s.Name, have) - } - time.Sleep(300 * time.Millisecond) - } -} - -func TestExample(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode - it modifies system services") - } - - const name = "myservice" - - m, err := mgr.Connect() - if err != nil { - t.Fatalf("SCM connection failed: %s", err) - } - defer m.Disconnect() - - dir, err := ioutil.TempDir("", "svc") - if err != nil { - t.Fatalf("failed to create temp directory: %v", err) - } - defer os.RemoveAll(dir) - - exepath := filepath.Join(dir, "a.exe") - o, err := exec.Command("go", "build", "-o", exepath, "golang.org/x/sys/windows/svc/example").CombinedOutput() - if err != nil { - t.Fatalf("failed to build service program: %v\n%v", err, string(o)) - } - - s, err := m.OpenService(name) - if err == nil { - err = s.Delete() - if err != nil { - s.Close() - t.Fatalf("Delete failed: %s", err) - } - s.Close() - } - s, err = m.CreateService(name, exepath, mgr.Config{DisplayName: "my service"}, "is", "auto-started") - if err != nil { - t.Fatalf("CreateService(%s) failed: %v", name, err) - } - defer s.Close() - - args := []string{"is", "manual-started", fmt.Sprintf("%d", rand.Int())} - - testState(t, s, svc.Stopped) - err = s.Start(args...) - if err != nil { - t.Fatalf("Start(%s) failed: %s", s.Name, err) - } - waitState(t, s, svc.Running) - time.Sleep(1 * time.Second) - - // testing deadlock from issues 4. - _, err = s.Control(svc.Interrogate) - if err != nil { - t.Fatalf("Control(%s) failed: %s", s.Name, err) - } - _, err = s.Control(svc.Interrogate) - if err != nil { - t.Fatalf("Control(%s) failed: %s", s.Name, err) - } - time.Sleep(1 * time.Second) - - _, err = s.Control(svc.Stop) - if err != nil { - t.Fatalf("Control(%s) failed: %s", s.Name, err) - } - waitState(t, s, svc.Stopped) - - err = s.Delete() - if err != nil { - t.Fatalf("Delete failed: %s", err) - } - - cmd := `Get-Eventlog -LogName Application -Newest 100` + - ` | Where Source -eq "myservice"` + - ` | Select -first 10` + - ` | Format-table -HideTableHeaders -property ReplacementStrings` - out, err := exec.Command("powershell", "-Command", cmd).CombinedOutput() - if err != nil { - t.Fatalf("powershell failed: %v\n%v", err, string(out)) - } - if want := strings.Join(append([]string{name}, args...), "-"); !strings.Contains(string(out), want) { - t.Errorf("%q string does not contain %q", string(out), want) - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_386.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_386.s deleted file mode 100644 index 2c82a9d91d..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_386.s +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// func servicemain(argc uint32, argv **uint16) -TEXT ·servicemain(SB),7,$0 - MOVL argc+0(FP), AX - MOVL AX, ·sArgc(SB) - MOVL argv+4(FP), AX - MOVL AX, ·sArgv(SB) - - PUSHL BP - PUSHL BX - PUSHL SI - PUSHL DI - - SUBL $12, SP - - MOVL ·sName(SB), AX - MOVL AX, (SP) - MOVL $·servicectlhandler(SB), AX - MOVL AX, 4(SP) - MOVL $0, 8(SP) - MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX - MOVL SP, BP - CALL AX - MOVL BP, SP - CMPL AX, $0 - JE exit - MOVL AX, ·ssHandle(SB) - - MOVL ·goWaitsH(SB), AX - MOVL AX, (SP) - MOVL ·cSetEvent(SB), AX - MOVL SP, BP - CALL AX - MOVL BP, SP - - MOVL ·cWaitsH(SB), AX - MOVL AX, (SP) - MOVL $-1, AX - MOVL AX, 4(SP) - MOVL ·cWaitForSingleObject(SB), AX - MOVL SP, BP - CALL AX - MOVL BP, SP - -exit: - ADDL $12, SP - - POPL DI - POPL SI - POPL BX - POPL BP - - MOVL 0(SP), CX - ADDL $12, SP - JMP CX - -// I do not know why, but this seems to be the only way to call -// ctlHandlerProc on Windows 7. - -// func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr { -TEXT ·servicectlhandler(SB),7,$0 - MOVL ·ctlHandlerExProc(SB), CX - JMP CX diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_amd64.s b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_amd64.s deleted file mode 100644 index bde25e9c48..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/svc/sys_amd64.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2012 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. - -// +build windows - -// func servicemain(argc uint32, argv **uint16) -TEXT ·servicemain(SB),7,$0 - MOVL CX, ·sArgc(SB) - MOVQ DX, ·sArgv(SB) - - SUBQ $32, SP // stack for the first 4 syscall params - - MOVQ ·sName(SB), CX - MOVQ $·servicectlhandler(SB), DX - // BUG(pastarmovj): Figure out a way to pass in context in R8. - MOVQ ·cRegisterServiceCtrlHandlerExW(SB), AX - CALL AX - CMPQ AX, $0 - JE exit - MOVQ AX, ·ssHandle(SB) - - MOVQ ·goWaitsH(SB), CX - MOVQ ·cSetEvent(SB), AX - CALL AX - - MOVQ ·cWaitsH(SB), CX - MOVQ $4294967295, DX - MOVQ ·cWaitForSingleObject(SB), AX - CALL AX - -exit: - ADDQ $32, SP - RET - -// I do not know why, but this seems to be the only way to call -// ctlHandlerProc on Windows 7. - -// func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr { -TEXT ·servicectlhandler(SB),7,$0 - MOVQ ·ctlHandlerExProc(SB), AX - JMP AX diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_test.go deleted file mode 100644 index 52d27dcc41..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_test.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2013 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. - -// +build windows - -package windows_test - -import ( - "syscall" - "testing" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -func testSetGetenv(t *testing.T, key, value string) { - err := windows.Setenv(key, value) - if err != nil { - t.Fatalf("Setenv failed to set %q: %v", value, err) - } - newvalue, found := windows.Getenv(key) - if !found { - t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) - } - if newvalue != value { - t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) - } -} - -func TestEnv(t *testing.T) { - testSetGetenv(t, "TESTENV", "AVALUE") - // make sure TESTENV gets set to "", not deleted - testSetGetenv(t, "TESTENV", "") -} - -func TestGetProcAddressByOrdinal(t *testing.T) { - // Attempt calling shlwapi.dll:IsOS, resolving it by ordinal, as - // suggested in - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb773795.aspx - h, err := windows.LoadLibrary("shlwapi.dll") - if err != nil { - t.Fatalf("Failed to load shlwapi.dll: %s", err) - } - procIsOS, err := windows.GetProcAddressByOrdinal(h, 437) - if err != nil { - t.Fatalf("Could not find shlwapi.dll:IsOS by ordinal: %s", err) - } - const OS_NT = 1 - r, _, _ := syscall.Syscall(procIsOS, 1, OS_NT, 0, 0) - if r == 0 { - t.Error("shlwapi.dll:IsOS(OS_NT) returned 0, expected non-zero value") - } -} diff --git a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_windows_test.go b/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_windows_test.go deleted file mode 100644 index 0067f9cc9f..0000000000 --- a/vendor/gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows/syscall_windows_test.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2012 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 windows_test - -import ( - "io/ioutil" - "os" - "path/filepath" - "syscall" - "testing" - "unsafe" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -func TestWin32finddata(t *testing.T) { - dir, err := ioutil.TempDir("", "go-build") - if err != nil { - t.Fatalf("failed to create temp directory: %v", err) - } - defer os.RemoveAll(dir) - - path := filepath.Join(dir, "long_name.and_extension") - f, err := os.Create(path) - if err != nil { - t.Fatalf("failed to create %v: %v", path, err) - } - f.Close() - - type X struct { - fd windows.Win32finddata - got byte - pad [10]byte // to protect ourselves - - } - var want byte = 2 // it is unlikely to have this character in the filename - x := X{got: want} - - pathp, _ := windows.UTF16PtrFromString(path) - h, err := windows.FindFirstFile(pathp, &(x.fd)) - if err != nil { - t.Fatalf("FindFirstFile failed: %v", err) - } - err = windows.FindClose(h) - if err != nil { - t.Fatalf("FindClose failed: %v", err) - } - - if x.got != want { - t.Fatalf("memory corruption: want=%d got=%d", want, x.got) - } -} - -func TestFormatMessage(t *testing.T) { - dll := windows.MustLoadDLL("pdh.dll") - - pdhOpenQuery := func(datasrc *uint16, userdata uint32, query *windows.Handle) (errno uintptr) { - r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhOpenQueryW").Addr(), 3, uintptr(unsafe.Pointer(datasrc)), uintptr(userdata), uintptr(unsafe.Pointer(query))) - return r0 - } - - pdhCloseQuery := func(query windows.Handle) (errno uintptr) { - r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhCloseQuery").Addr(), 1, uintptr(query), 0, 0) - return r0 - } - - var q windows.Handle - name, err := windows.UTF16PtrFromString("no_such_source") - if err != nil { - t.Fatal(err) - } - errno := pdhOpenQuery(name, 0, &q) - if errno == 0 { - pdhCloseQuery(q) - t.Fatal("PdhOpenQuery succeeded, but expected to fail.") - } - - const flags uint32 = syscall.FORMAT_MESSAGE_FROM_HMODULE | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS - buf := make([]uint16, 300) - _, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil) - if err != nil { - t.Fatalf("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) - } -} - -func abort(funcname string, err error) { - panic(funcname + " failed: " + err.Error()) -} - -func ExampleLoadLibrary() { - h, err := windows.LoadLibrary("kernel32.dll") - if err != nil { - abort("LoadLibrary", err) - } - defer windows.FreeLibrary(h) - proc, err := windows.GetProcAddress(h, "GetVersion") - if err != nil { - abort("GetProcAddress", err) - } - r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) - major := byte(r) - minor := uint8(r >> 8) - build := uint16(r >> 16) - print("windows version ", major, ".", minor, " (Build ", build, ")\n") -} diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/.travis.yml b/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/.travis.yml deleted file mode 100644 index 627ea6245c..0000000000 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -sudo: required - -os: - - linux - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/addrs.go b/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/addrs.go deleted file mode 100644 index bdaee3353b..0000000000 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/addrs.go +++ /dev/null @@ -1,35 +0,0 @@ -package swarm - -import ( - mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" - mafilter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" -) - -// http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml -var lowTimeoutFilters = mafilter.NewFilters() - -func init() { - for _, p := range []string{ - "/ip4/10.0.0.0/ipcidr/8", - "/ip4/100.64.0.0/ipcidr/10", - "/ip4/169.254.0.0/ipcidr/16", - "/ip4/172.16.0.0/ipcidr/12", - "/ip4/192.0.0.0/ipcidr/24", - "/ip4/192.0.0.0/ipcidr/29", - "/ip4/192.0.0.8/ipcidr/32", - "/ip4/192.0.0.170/ipcidr/32", - "/ip4/192.0.0.171/ipcidr/32", - "/ip4/192.0.2.0/ipcidr/24", - "/ip4/192.168.0.0/ipcidr/16", - "/ip4/198.18.0.0/ipcidr/15", - "/ip4/198.51.100.0/ipcidr/24", - "/ip4/203.0.113.0/ipcidr/24", - "/ip4/240.0.0.0/ipcidr/4", - } { - f, err := mamask.NewMask(p) - if err != nil { - panic("error in lowTimeoutFilters init: " + err.Error()) - } - lowTimeoutFilters.AddDialFilter(f) - } -} diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/limiter.go b/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/limiter.go deleted file mode 100644 index e25cb0193e..0000000000 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/limiter.go +++ /dev/null @@ -1,192 +0,0 @@ -package swarm - -import ( - "context" - "sync" - "time" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - addrutil "gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -type dialResult struct { - Conn transport.Conn - Addr ma.Multiaddr - Err error -} - -type dialJob struct { - addr ma.Multiaddr - peer peer.ID - ctx context.Context - resp chan dialResult -} - -func (dj *dialJob) cancelled() bool { - select { - case <-dj.ctx.Done(): - return true - default: - return false - } -} - -func (dj *dialJob) dialTimeout() time.Duration { - timeout := transport.DialTimeout - if lowTimeoutFilters.AddrBlocked(dj.addr) { - timeout = DialTimeoutLocal - } - - return timeout -} - -type dialLimiter struct { - lk sync.Mutex - - fdConsuming int - fdLimit int - waitingOnFd []*dialJob - - dialFunc dialfunc - - activePerPeer map[peer.ID]int - perPeerLimit int - waitingOnPeerLimit map[peer.ID][]*dialJob -} - -type dialfunc func(context.Context, peer.ID, ma.Multiaddr) (transport.Conn, error) - -func newDialLimiter(df dialfunc) *dialLimiter { - return newDialLimiterWithParams(df, ConcurrentFdDials, DefaultPerPeerRateLimit) -} - -func newDialLimiterWithParams(df dialfunc, fdLimit, perPeerLimit int) *dialLimiter { - return &dialLimiter{ - fdLimit: fdLimit, - perPeerLimit: perPeerLimit, - waitingOnPeerLimit: make(map[peer.ID][]*dialJob), - activePerPeer: make(map[peer.ID]int), - dialFunc: df, - } -} - -// freeFDToken frees FD token and if there are any schedules another waiting dialJob -// in it's place -func (dl *dialLimiter) freeFDToken() { - dl.fdConsuming-- - - if len(dl.waitingOnFd) > 0 { - next := dl.waitingOnFd[0] - dl.waitingOnFd[0] = nil // clear out memory - dl.waitingOnFd = dl.waitingOnFd[1:] - if len(dl.waitingOnFd) == 0 { - dl.waitingOnFd = nil // clear out memory - } - dl.fdConsuming++ - - // we already have activePerPeer token at this point so we can just dial - go dl.executeDial(next) - } -} - -func (dl *dialLimiter) freePeerToken(dj *dialJob) { - // release tokens in reverse order than we take them - dl.activePerPeer[dj.peer]-- - if dl.activePerPeer[dj.peer] == 0 { - delete(dl.activePerPeer, dj.peer) - } - - waitlist := dl.waitingOnPeerLimit[dj.peer] - if len(waitlist) > 0 { - next := waitlist[0] - if len(waitlist) == 1 { - delete(dl.waitingOnPeerLimit, next.peer) - } else { - waitlist[0] = nil // clear out memory - dl.waitingOnPeerLimit[next.peer] = waitlist[1:] - } - - dl.activePerPeer[next.peer]++ // just kidding, we still want this token - - dl.addCheckFdLimit(next) - } -} - -func (dl *dialLimiter) finishedDial(dj *dialJob) { - dl.lk.Lock() - defer dl.lk.Unlock() - - if addrutil.IsFDCostlyTransport(dj.addr) { - dl.freeFDToken() - } - - dl.freePeerToken(dj) -} - -func (dl *dialLimiter) addCheckFdLimit(dj *dialJob) { - if addrutil.IsFDCostlyTransport(dj.addr) { - if dl.fdConsuming >= dl.fdLimit { - dl.waitingOnFd = append(dl.waitingOnFd, dj) - return - } - - // take token - dl.fdConsuming++ - } - - go dl.executeDial(dj) -} - -func (dl *dialLimiter) addCheckPeerLimit(dj *dialJob) { - if dl.activePerPeer[dj.peer] >= dl.perPeerLimit { - wlist := dl.waitingOnPeerLimit[dj.peer] - dl.waitingOnPeerLimit[dj.peer] = append(wlist, dj) - return - } - dl.activePerPeer[dj.peer]++ - - dl.addCheckFdLimit(dj) -} - -// AddDialJob tries to take the needed tokens for starting the given dial job. -// If it acquires all needed tokens, it immediately starts the dial, otherwise -// it will put it on the waitlist for the requested token. -func (dl *dialLimiter) AddDialJob(dj *dialJob) { - dl.lk.Lock() - defer dl.lk.Unlock() - - dl.addCheckPeerLimit(dj) -} - -func (dl *dialLimiter) clearAllPeerDials(p peer.ID) { - dl.lk.Lock() - defer dl.lk.Unlock() - delete(dl.waitingOnPeerLimit, p) - // NB: the waitingOnFd list doesn't need to be cleaned out here, we will - // remove them as we encounter them because they are 'cancelled' at this - // point -} - -// executeDial calls the dialFunc, and reports the result through the response -// channel when finished. Once the response is sent it also releases all tokens -// it held during the dial. -func (dl *dialLimiter) executeDial(j *dialJob) { - defer dl.finishedDial(j) - if j.cancelled() { - return - } - - dctx, cancel := context.WithTimeout(j.ctx, j.dialTimeout()) - defer cancel() - - con, err := dl.dialFunc(dctx, j.peer, j.addr) - select { - case j.resp <- dialResult{Conn: con, Addr: j.addr, Err: err}: - case <-j.ctx.Done(): - if err == nil { - con.Close() - } - } -} diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/package.json b/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/package.json deleted file mode 100644 index 6da6da998b..0000000000 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/package.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-swarm/issues" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-swarm" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmRYdszNNq7ykPqavVNKMVyyjX59AcTisHqzussDfhwHkK", - "name": "go-smux-multistream", - "version": "2.0.2" - }, - { - "author": "whyrusleeping", - "hash": "Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC", - "name": "go-smux-yamux", - "version": "2.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv", - "name": "multiaddr-filter", - "version": "1.0.2" - }, - { - "author": "whyrusleeping", - "hash": "QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx", - "name": "go-libp2p-metrics", - "version": "2.1.7" - }, - { - "author": "whyrusleeping", - "hash": "QmTkKN1x5Jvhc5Np55gJzD3PQ6GL74aKm9145t9WbvJyrB", - "name": "go-tcp-transport", - "version": "2.0.16" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB", - "name": "go-maddr-filter", - "version": "1.1.10" - }, - { - "author": "whyrusleeping", - "hash": "QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6", - "name": "go-addr-util", - "version": "2.0.7" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - }, - { - "author": "whyrusleeping", - "hash": "QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv", - "name": "go-libp2p-loggables", - "version": "1.1.24" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "stebalien", - "hash": "QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM", - "name": "go-conn-security-multistream", - "version": "0.1.15" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - }, - { - "author": "whyrusleeping", - "hash": "QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc", - "name": "go-libp2p-secio", - "version": "2.0.17" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "MIT", - "name": "go-libp2p-swarm", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.22" -} - diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm.go b/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm.go deleted file mode 100644 index d4f9600d8c..0000000000 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm.go +++ /dev/null @@ -1,500 +0,0 @@ -package swarm - -import ( - "context" - "errors" - "fmt" - "strings" - "sync" - "sync/atomic" - "time" - - "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - mafilter "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - filter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" - metrics "gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics" -) - -// DialTimeoutLocal is the maximum duration a Dial to local network address -// is allowed to take. -// This includes the time between dialing the raw network connection, -// protocol selection as well the handshake, if applicable. -var DialTimeoutLocal = 5 * time.Second - -var log = logging.Logger("swarm2") - -// ErrSwarmClosed is returned when one attempts to operate on a closed swarm. -var ErrSwarmClosed = errors.New("swarm closed") - -// ErrAddrFiltered is returned when trying to register a connection to a -// filtered address. You shouldn't see this error unless some underlying -// transport is misbehaving. -var ErrAddrFiltered = errors.New("address filtered") - -// Swarm is a connection muxer, allowing connections to other peers to -// be opened and closed, while still using the same Chan for all -// communication. The Chan sends/receives Messages, which note the -// destination or source Peer. -type Swarm struct { - // Close refcount. This allows us to fully wait for the swarm to be torn - // down before continuing. - refs sync.WaitGroup - - local peer.ID - peers pstore.Peerstore - - conns struct { - sync.RWMutex - m map[peer.ID][]*Conn - } - - listeners struct { - sync.RWMutex - m map[transport.Listener]struct{} - } - - notifs struct { - sync.RWMutex - m map[inet.Notifiee]struct{} - } - - transports struct { - sync.RWMutex - m map[int]transport.Transport - } - - // new connection and stream handlers - connh atomic.Value - streamh atomic.Value - - // dialing helpers - dsync *DialSync - backf DialBackoff - limiter *dialLimiter - - // filters for addresses that shouldnt be dialed (or accepted) - Filters *filter.Filters - - proc goprocess.Process - ctx context.Context - bwc metrics.Reporter -} - -// NewSwarm constructs a Swarm -func NewSwarm(ctx context.Context, local peer.ID, peers pstore.Peerstore, bwc metrics.Reporter) *Swarm { - s := &Swarm{ - local: local, - peers: peers, - bwc: bwc, - Filters: filter.NewFilters(), - } - - s.conns.m = make(map[peer.ID][]*Conn) - s.listeners.m = make(map[transport.Listener]struct{}) - s.transports.m = make(map[int]transport.Transport) - s.notifs.m = make(map[inet.Notifiee]struct{}) - - s.dsync = NewDialSync(s.doDial) - s.limiter = newDialLimiter(s.dialAddr) - s.proc = goprocessctx.WithContextAndTeardown(ctx, s.teardown) - s.ctx = goprocessctx.OnClosingContext(s.proc) - - return s -} - -func (s *Swarm) teardown() error { - // Prevents new connections and/or listeners from being added to the swarm. - - s.listeners.Lock() - listeners := s.listeners.m - s.listeners.m = nil - s.listeners.Unlock() - - s.conns.Lock() - conns := s.conns.m - s.conns.m = nil - s.conns.Unlock() - - // Lots of go routines but we might as well do this in parallel. We want - // to shut down as fast as possible. - - for l := range listeners { - go func(l transport.Listener) { - if err := l.Close(); err != nil { - log.Errorf("error when shutting down listener: %s", err) - } - }(l) - } - - for _, cs := range conns { - for _, c := range cs { - go func(c *Conn) { - if err := c.Close(); err != nil { - log.Errorf("error when shutting down connection: %s", err) - } - }(c) - } - } - - // Wait for everything to finish. - s.refs.Wait() - - return nil -} - -// AddAddrFilter adds a multiaddr filter to the set of filters the swarm will -// use to determine which addresses not to dial to. -func (s *Swarm) AddAddrFilter(f string) error { - m, err := mafilter.NewMask(f) - if err != nil { - return err - } - - s.Filters.AddDialFilter(m) - return nil -} - -// Process returns the Process of the swarm -func (s *Swarm) Process() goprocess.Process { - return s.proc -} - -func (s *Swarm) addConn(tc transport.Conn, dir inet.Direction) (*Conn, error) { - // The underlying transport (or the dialer) *should* filter it's own - // connections but we should double check anyways. - raddr := tc.RemoteMultiaddr() - if s.Filters.AddrBlocked(raddr) { - tc.Close() - return nil, ErrAddrFiltered - } - - p := tc.RemotePeer() - - // Add the public key. - if pk := tc.RemotePublicKey(); pk != nil { - s.peers.AddPubKey(p, pk) - } - - // Clear any backoffs - s.backf.Clear(p) - - // Finally, add the peer. - s.conns.Lock() - // Check if we're still online - if s.conns.m == nil { - s.conns.Unlock() - tc.Close() - return nil, ErrSwarmClosed - } - - // Wrap and register the connection. - stat := inet.Stat{Direction: dir} - c := &Conn{ - conn: tc, - swarm: s, - stat: stat, - } - c.streams.m = make(map[*Stream]struct{}) - s.conns.m[p] = append(s.conns.m[p], c) - - // Add two swarm refs: - // * One will be decremented after the close notifications fire in Conn.doClose - // * The other will be decremented when Conn.start exits. - s.refs.Add(2) - - // Take the notification lock before releasing the conns lock to block - // Disconnect notifications until after the Connect notifications done. - c.notifyLk.Lock() - s.conns.Unlock() - - // We have a connection now. Cancel all other in-progress dials. - // This should be fast, no reason to wait till later. - s.dsync.CancelDial(p) - - s.notifyAll(func(f inet.Notifiee) { - f.Connected(s, c) - }) - c.notifyLk.Unlock() - - c.start() - - // TODO: Get rid of this. We use it for identify but that happen much - // earlier (really, inside the transport and, if not then, during the - // notifications). - if h := s.ConnHandler(); h != nil { - go h(c) - } - - return c, nil -} - -// Peerstore returns this swarms internal Peerstore. -func (s *Swarm) Peerstore() pstore.Peerstore { - return s.peers -} - -// Context returns the context of the swarm -func (s *Swarm) Context() context.Context { - return s.ctx -} - -// Close stops the Swarm. -func (s *Swarm) Close() error { - return s.proc.Close() -} - -// TODO: We probably don't need the conn handlers. - -// SetConnHandler assigns the handler for new connections. -// You will rarely use this. See SetStreamHandler -func (s *Swarm) SetConnHandler(handler inet.ConnHandler) { - s.connh.Store(handler) -} - -// ConnHandler gets the handler for new connections. -func (s *Swarm) ConnHandler() inet.ConnHandler { - handler, _ := s.connh.Load().(inet.ConnHandler) - return handler -} - -// SetStreamHandler assigns the handler for new streams. -func (s *Swarm) SetStreamHandler(handler inet.StreamHandler) { - s.streamh.Store(handler) -} - -// StreamHandler gets the handler for new streams. -func (s *Swarm) StreamHandler() inet.StreamHandler { - handler, _ := s.streamh.Load().(inet.StreamHandler) - return handler -} - -// NewStream creates a new stream on any available connection to peer, dialing -// if necessary. -func (s *Swarm) NewStream(ctx context.Context, p peer.ID) (inet.Stream, error) { - log.Debugf("[%s] opening stream to peer [%s]", s.local, p) - - // Algorithm: - // 1. Find the best connection, otherwise, dial. - // 2. Try opening a stream. - // 3. If the underlying connection is, in fact, closed, close the outer - // connection and try again. We do this in case we have a closed - // connection but don't notice it until we actually try to open a - // stream. - // - // Note: We only dial once. - // - // TODO: Try all connections even if we get an error opening a stream on - // a non-closed connection. - dials := 0 - for { - c := s.bestConnToPeer(p) - if c == nil { - if dials >= DialAttempts { - return nil, errors.New("max dial attempts exceeded") - } - dials++ - - var err error - c, err = s.dialPeer(ctx, p) - if err != nil { - return nil, err - } - } - s, err := c.NewStream() - if err != nil { - if c.conn.IsClosed() { - continue - } - return nil, err - } - return s, nil - } -} - -// ConnsToPeer returns all the live connections to peer. -func (s *Swarm) ConnsToPeer(p peer.ID) []inet.Conn { - // TODO: Consider sorting the connection list best to worst. Currently, - // it's sorted oldest to newest. - s.conns.RLock() - defer s.conns.RUnlock() - conns := s.conns.m[p] - output := make([]inet.Conn, len(conns)) - for i, c := range conns { - output[i] = c - } - return output -} - -// bestConnToPeer returns the best connection to peer. -func (s *Swarm) bestConnToPeer(p peer.ID) *Conn { - // Selects the best connection we have to the peer. - // TODO: Prefer some transports over others. Currently, we just select - // the newest non-closed connection with the most streams. - s.conns.RLock() - defer s.conns.RUnlock() - - var best *Conn - bestLen := 0 - for _, c := range s.conns.m[p] { - if c.conn.IsClosed() { - // We *will* garbage collect this soon anyways. - continue - } - c.streams.Lock() - cLen := len(c.streams.m) - c.streams.Unlock() - - if cLen >= bestLen { - best = c - bestLen = cLen - } - - } - return best -} - -// Connectedness returns our "connectedness" state with the given peer. -// -// To check if we have an open connection, use `s.Connectedness(p) == -// inet.Connected`. -func (s *Swarm) Connectedness(p peer.ID) inet.Connectedness { - if s.bestConnToPeer(p) != nil { - return inet.Connected - } - return inet.NotConnected -} - -// Conns returns a slice of all connections. -func (s *Swarm) Conns() []inet.Conn { - s.conns.RLock() - defer s.conns.RUnlock() - - conns := make([]inet.Conn, 0, len(s.conns.m)) - for _, cs := range s.conns.m { - for _, c := range cs { - conns = append(conns, c) - } - } - return conns -} - -// ClosePeer closes all connections to the given peer. -func (s *Swarm) ClosePeer(p peer.ID) error { - conns := s.ConnsToPeer(p) - switch len(conns) { - case 0: - return nil - case 1: - return conns[0].Close() - default: - errCh := make(chan error) - for _, c := range conns { - go func(c inet.Conn) { - errCh <- c.Close() - }(c) - } - - var errs []string - for range conns { - err := <-errCh - if err != nil { - errs = append(errs, err.Error()) - } - } - if len(errs) > 0 { - return fmt.Errorf("when disconnecting from peer %s: %s", p, strings.Join(errs, ", ")) - } - return nil - } -} - -// Peers returns a copy of the set of peers swarm is connected to. -func (s *Swarm) Peers() []peer.ID { - s.conns.RLock() - defer s.conns.RUnlock() - peers := make([]peer.ID, 0, len(s.conns.m)) - for p := range s.conns.m { - peers = append(peers, p) - } - - return peers -} - -// LocalPeer returns the local peer swarm is associated to. -func (s *Swarm) LocalPeer() peer.ID { - return s.local -} - -// Backoff returns the DialBackoff object for this swarm. -func (s *Swarm) Backoff() *DialBackoff { - return &s.backf -} - -// notifyAll sends a signal to all Notifiees -func (s *Swarm) notifyAll(notify func(inet.Notifiee)) { - var wg sync.WaitGroup - - s.notifs.RLock() - wg.Add(len(s.notifs.m)) - for f := range s.notifs.m { - go func(f inet.Notifiee) { - defer wg.Done() - notify(f) - }(f) - } - - wg.Wait() - s.notifs.RUnlock() -} - -// Notify signs up Notifiee to receive signals when events happen -func (s *Swarm) Notify(f inet.Notifiee) { - s.notifs.Lock() - s.notifs.m[f] = struct{}{} - s.notifs.Unlock() -} - -// StopNotify unregisters Notifiee fromr receiving signals -func (s *Swarm) StopNotify(f inet.Notifiee) { - s.notifs.Lock() - delete(s.notifs.m, f) - s.notifs.Unlock() -} - -func (s *Swarm) removeConn(c *Conn) { - p := c.RemotePeer() - - s.conns.Lock() - defer s.conns.Unlock() - cs := s.conns.m[p] - for i, ci := range cs { - if ci == c { - if len(cs) == 1 { - delete(s.conns.m, p) - } else { - // NOTE: We're intentionally preserving order. - // This way, connections to a peer are always - // sorted oldest to newest. - copy(cs[i:], cs[i+1:]) - cs[len(cs)-1] = nil - s.conns.m[p] = cs[:len(cs)-1] - } - return - } - } -} - -// String returns a string representation of Network. -func (s *Swarm) String() string { - return fmt.Sprintf("", s.LocalPeer()) -} - -// Swarm is a Network. -var _ inet.Network = (*Swarm)(nil) -var _ transport.Network = (*Swarm)(nil) diff --git a/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/package.json b/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/package.json deleted file mode 100644 index 6989fc5047..0000000000 --- a/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "author": "chris", - "bugs": { - "url": "https://github.com/OpenBazaar/go-onion-transport" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - } - ], - "gxVersion": "0.11.0", - "language": "English", - "license": "", - "name": "go-onion-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.0" -} - diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/README.md b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/README.md deleted file mode 100644 index e04dfd27ca..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# go-quic-transport - -[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/marten-seemann/libp2p-quic-transport) -[![Linux Build Status](https://img.shields.io/travis/marten-seemann/libp2p-quic-transport/master.svg?style=flat-square&label=linux+build)](https://travis-ci.org/marten-seemann/libp2p-quic-transport) -[![Code Coverage](https://img.shields.io/codecov/c/github/marten-seemann/libp2p-quic-transport/master.svg?style=flat-square)](https://codecov.io/gh/marten-seemann/libp2p-quic-transport/) - -This is an implementation of the [libp2p transport](https://github.com/libp2p/go-libp2p-transport/blob/master/transport.go) and the [libp2p stream muxer](https://github.com/libp2p/go-stream-muxer) using QUIC. - -## Known limitations - -* currently only works with RSA host keys diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/conn.go b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/conn.go deleted file mode 100644 index a708e444ad..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/conn.go +++ /dev/null @@ -1,80 +0,0 @@ -package libp2pquic - -import ( - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -type conn struct { - sess quic.Session - transport tpt.Transport - - localPeer peer.ID - privKey ic.PrivKey - localMultiaddr ma.Multiaddr - - remotePeerID peer.ID - remotePubKey ic.PubKey - remoteMultiaddr ma.Multiaddr -} - -var _ tpt.Conn = &conn{} - -func (c *conn) Close() error { - return c.sess.Close() -} - -// IsClosed returns whether a connection is fully closed. -func (c *conn) IsClosed() bool { - return c.sess.Context().Err() != nil -} - -// OpenStream creates a new stream. -func (c *conn) OpenStream() (smux.Stream, error) { - qstr, err := c.sess.OpenStreamSync() - return &stream{Stream: qstr}, err -} - -// AcceptStream accepts a stream opened by the other side. -func (c *conn) AcceptStream() (smux.Stream, error) { - qstr, err := c.sess.AcceptStream() - return &stream{Stream: qstr}, err -} - -// LocalPeer returns our peer ID -func (c *conn) LocalPeer() peer.ID { - return c.localPeer -} - -// LocalPrivateKey returns our private key -func (c *conn) LocalPrivateKey() ic.PrivKey { - return c.privKey -} - -// RemotePeer returns the peer ID of the remote peer. -func (c *conn) RemotePeer() peer.ID { - return c.remotePeerID -} - -// RemotePublicKey returns the public key of the remote peer. -func (c *conn) RemotePublicKey() ic.PubKey { - return c.remotePubKey -} - -// LocalMultiaddr returns the local Multiaddr associated -func (c *conn) LocalMultiaddr() ma.Multiaddr { - return c.localMultiaddr -} - -// RemoteMultiaddr returns the remote Multiaddr associated -func (c *conn) RemoteMultiaddr() ma.Multiaddr { - return c.remoteMultiaddr -} - -func (c *conn) Transport() tpt.Transport { - return c.transport -} diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/crypto.go b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/crypto.go deleted file mode 100644 index 42cb915ad3..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/crypto.go +++ /dev/null @@ -1,120 +0,0 @@ -package libp2pquic - -import ( - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/tls" - "crypto/x509" - "errors" - "math/big" - "time" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -// mint certificate selection is broken. -const hostname = "quic.ipfs" - -const certValidityPeriod = 180 * 24 * time.Hour - -func generateConfig(privKey ic.PrivKey) (*tls.Config, error) { - key, hostCert, err := keyToCertificate(privKey) - if err != nil { - return nil, err - } - // The ephemeral key used just for a couple of connections (or a limited time). - ephemeralKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - return nil, err - } - // Sign the ephemeral key using the host key. - // This is the only time that the host's private key of the peer is needed. - // Note that this step could be done asynchronously, such that a running node doesn't need access its private key at all. - certTemplate := &x509.Certificate{ - DNSNames: []string{hostname}, - SerialNumber: big.NewInt(1), - NotBefore: time.Now().Add(-24 * time.Hour), - NotAfter: time.Now().Add(certValidityPeriod), - } - certDER, err := x509.CreateCertificate(rand.Reader, certTemplate, hostCert, ephemeralKey.Public(), key) - if err != nil { - return nil, err - } - cert, err := x509.ParseCertificate(certDER) - if err != nil { - return nil, err - } - return &tls.Config{ - ServerName: hostname, - InsecureSkipVerify: true, // This is not insecure here. We will verify the cert chain ourselves. - ClientAuth: tls.RequireAnyClientCert, - Certificates: []tls.Certificate{{ - Certificate: [][]byte{cert.Raw, hostCert.Raw}, - PrivateKey: ephemeralKey, - }}, - }, nil -} - -func getRemotePubKey(chain []*x509.Certificate) (ic.PubKey, error) { - if len(chain) != 2 { - return nil, errors.New("expected 2 certificates in the chain") - } - pool := x509.NewCertPool() - pool.AddCert(chain[1]) - if _, err := chain[0].Verify(x509.VerifyOptions{Roots: pool}); err != nil { - return nil, err - } - remotePubKey, err := x509.MarshalPKIXPublicKey(chain[1].PublicKey) - if err != nil { - return nil, err - } - return ic.UnmarshalRsaPublicKey(remotePubKey) -} - -func keyToCertificate(sk ic.PrivKey) (interface{}, *x509.Certificate, error) { - sn, err := rand.Int(rand.Reader, big.NewInt(1<<62)) - if err != nil { - return nil, nil, err - } - tmpl := &x509.Certificate{ - SerialNumber: sn, - NotBefore: time.Now().Add(-24 * time.Hour), - NotAfter: time.Now().Add(certValidityPeriod), - IsCA: true, - BasicConstraintsValid: true, - } - - var publicKey, privateKey interface{} - keyBytes, err := sk.Bytes() - if err != nil { - return nil, nil, err - } - pbmes := new(pb.PrivateKey) - if err := proto.Unmarshal(keyBytes, pbmes); err != nil { - return nil, nil, err - } - switch pbmes.GetType() { - case pb.KeyType_RSA: - k, err := x509.ParsePKCS1PrivateKey(pbmes.GetData()) - if err != nil { - return nil, nil, err - } - publicKey = &k.PublicKey - privateKey = k - // TODO: add support for ECDSA - default: - return nil, nil, errors.New("unsupported key type for TLS") - } - certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, publicKey, privateKey) - if err != nil { - return nil, nil, err - } - cert, err := x509.ParseCertificate(certDER) - if err != nil { - return nil, nil, err - } - return privateKey, cert, nil -} diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/listener.go b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/listener.go deleted file mode 100644 index 001b3c624a..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/listener.go +++ /dev/null @@ -1,113 +0,0 @@ -package libp2pquic - -import ( - "crypto/tls" - "net" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -var quicListenAddr = quic.ListenAddr - -// A listener listens for QUIC connections. -type listener struct { - quicListener quic.Listener - transport tpt.Transport - - privKey ic.PrivKey - localPeer peer.ID - localMultiaddr ma.Multiaddr -} - -var _ tpt.Listener = &listener{} - -func newListener(addr ma.Multiaddr, transport tpt.Transport, localPeer peer.ID, key ic.PrivKey, tlsConf *tls.Config) (tpt.Listener, error) { - lnet, host, err := manet.DialArgs(addr) - if err != nil { - return nil, err - } - laddr, err := net.ResolveUDPAddr(lnet, host) - if err != nil { - return nil, err - } - conn, err := net.ListenUDP(lnet, laddr) - if err != nil { - return nil, err - } - ln, err := quic.Listen(conn, tlsConf, quicConfig) - if err != nil { - return nil, err - } - localMultiaddr, err := toQuicMultiaddr(ln.Addr()) - if err != nil { - return nil, err - } - return &listener{ - quicListener: ln, - transport: transport, - privKey: key, - localPeer: localPeer, - localMultiaddr: localMultiaddr, - }, nil -} - -// Accept accepts new connections. -func (l *listener) Accept() (tpt.Conn, error) { - for { - sess, err := l.quicListener.Accept() - if err != nil { - return nil, err - } - conn, err := l.setupConn(sess) - if err != nil { - sess.CloseWithError(0, err) - continue - } - return conn, nil - } -} - -func (l *listener) setupConn(sess quic.Session) (tpt.Conn, error) { - remotePubKey, err := getRemotePubKey(sess.ConnectionState().PeerCertificates) - if err != nil { - return nil, err - } - remotePeerID, err := peer.IDFromPublicKey(remotePubKey) - if err != nil { - return nil, err - } - remoteMultiaddr, err := toQuicMultiaddr(sess.RemoteAddr()) - if err != nil { - return nil, err - } - return &conn{ - sess: sess, - transport: l.transport, - localPeer: l.localPeer, - localMultiaddr: l.localMultiaddr, - privKey: l.privKey, - remoteMultiaddr: remoteMultiaddr, - remotePeerID: remotePeerID, - remotePubKey: remotePubKey, - }, nil -} - -// Close closes the listener. -func (l *listener) Close() error { - return l.quicListener.Close() -} - -// Addr returns the address of this listener. -func (l *listener) Addr() net.Addr { - return l.quicListener.Addr() -} - -// Multiaddr returns the multiaddress of this listener. -func (l *listener) Multiaddr() ma.Multiaddr { - return l.localMultiaddr -} diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/package.json b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/package.json deleted file mode 100644 index 730ff97402..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "marten-seemann", - "bugs": { - "url": "github.com/libp2p/go-libp2p-quic-transport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-quic-transport" - }, - "gxDependencies": [ - { - "author": "marten-seemann", - "hash": "QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ", - "name": "quic-go", - "version": "0.10.0" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "", - "name": "go-libp2p-quic-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.9" -} - diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/stream.go b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/stream.go deleted file mode 100644 index a5463a44e4..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/stream.go +++ /dev/null @@ -1,19 +0,0 @@ -package libp2pquic - -import ( - quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" -) - -type stream struct { - quic.Stream -} - -var _ smux.Stream = &stream{} - -func (s *stream) Reset() error { - if err := s.Stream.CancelRead(0); err != nil { - return err - } - return s.Stream.CancelWrite(0) -} diff --git a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/transport.go b/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/transport.go deleted file mode 100644 index 52fbc15f05..0000000000 --- a/vendor/gx/ipfs/QmVX7uSFmFLZRFsN9QNPDJf7Pmhuv4GdedrKYrt2xXm5ag/go-libp2p-quic-transport/transport.go +++ /dev/null @@ -1,177 +0,0 @@ -package libp2pquic - -import ( - "context" - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "net" - "sync" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - quic "gx/ipfs/QmU44KWVkSHno7sNDTeUcL4FBgxgoidkFuTUyTXWJPXXFJ/quic-go" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" -) - -var quicConfig = &quic.Config{ - Versions: []quic.VersionNumber{quic.VersionMilestone0_10_0}, - MaxIncomingStreams: 1000, - MaxIncomingUniStreams: -1, // disable unidirectional streams - MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB - MaxReceiveConnectionFlowControlWindow: 4.5 * (1 << 20), // 4.5 MB - AcceptCookie: func(clientAddr net.Addr, cookie *quic.Cookie) bool { - // TODO(#6): require source address validation when under load - return true - }, - KeepAlive: true, -} - -type connManager struct { - connIPv4Once sync.Once - connIPv4 net.PacketConn - - connIPv6Once sync.Once - connIPv6 net.PacketConn -} - -func (c *connManager) GetConnForAddr(network string) (net.PacketConn, error) { - switch network { - case "udp4": - var err error - c.connIPv4Once.Do(func() { - c.connIPv4, err = c.createConn(network, "0.0.0.0:0") - }) - return c.connIPv4, err - case "udp6": - var err error - c.connIPv6Once.Do(func() { - c.connIPv6, err = c.createConn(network, ":0") - }) - return c.connIPv6, err - default: - return nil, fmt.Errorf("unsupported network: %s", network) - } -} - -func (c *connManager) createConn(network, host string) (net.PacketConn, error) { - addr, err := net.ResolveUDPAddr(network, host) - if err != nil { - return nil, err - } - return net.ListenUDP(network, addr) -} - -// The Transport implements the tpt.Transport interface for QUIC connections. -type transport struct { - privKey ic.PrivKey - localPeer peer.ID - tlsConf *tls.Config - connManager *connManager -} - -var _ tpt.Transport = &transport{} - -// NewTransport creates a new QUIC transport -func NewTransport(key ic.PrivKey) (tpt.Transport, error) { - localPeer, err := peer.IDFromPrivateKey(key) - if err != nil { - return nil, err - } - tlsConf, err := generateConfig(key) - if err != nil { - return nil, err - } - - return &transport{ - privKey: key, - localPeer: localPeer, - tlsConf: tlsConf, - connManager: &connManager{}, - }, nil -} - -// Dial dials a new QUIC connection -func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tpt.Conn, error) { - network, host, err := manet.DialArgs(raddr) - if err != nil { - return nil, err - } - pconn, err := t.connManager.GetConnForAddr(network) - if err != nil { - return nil, err - } - addr, err := fromQuicMultiaddr(raddr) - if err != nil { - return nil, err - } - var remotePubKey ic.PubKey - tlsConf := t.tlsConf.Clone() - // We need to check the peer ID in the VerifyPeerCertificate callback. - // The tls.Config it is also used for listening, and we might also have concurrent dials. - // Clone it so we can check for the specific peer ID we're dialing here. - tlsConf.VerifyPeerCertificate = func(rawCerts [][]byte, _ [][]*x509.Certificate) error { - chain := make([]*x509.Certificate, len(rawCerts)) - for i := 0; i < len(rawCerts); i++ { - cert, err := x509.ParseCertificate(rawCerts[i]) - if err != nil { - return err - } - chain[i] = cert - } - var err error - remotePubKey, err = getRemotePubKey(chain) - if err != nil { - return err - } - if !p.MatchesPublicKey(remotePubKey) { - return errors.New("peer IDs don't match") - } - return nil - } - sess, err := quic.DialContext(ctx, pconn, addr, host, tlsConf, quicConfig) - if err != nil { - return nil, err - } - localMultiaddr, err := toQuicMultiaddr(sess.LocalAddr()) - if err != nil { - return nil, err - } - return &conn{ - sess: sess, - privKey: t.privKey, - localPeer: t.localPeer, - localMultiaddr: localMultiaddr, - remotePubKey: remotePubKey, - remotePeerID: p, - remoteMultiaddr: raddr, - }, nil -} - -// CanDial determines if we can dial to an address -func (t *transport) CanDial(addr ma.Multiaddr) bool { - return mafmt.QUIC.Matches(addr) -} - -// Listen listens for new QUIC connections on the passed multiaddr. -func (t *transport) Listen(addr ma.Multiaddr) (tpt.Listener, error) { - return newListener(addr, t, t.localPeer, t.privKey, t.tlsConf) -} - -// Proxy returns true if this transport proxies. -func (t *transport) Proxy() bool { - return false -} - -// Protocols returns the set of protocols handled by this transport. -func (t *transport) Protocols() []int { - return []int{ma.P_QUIC} -} - -func (t *transport) String() string { - return "QUIC" -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/README.md b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/README.md deleted file mode 100644 index 8d83153b37..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/README.md +++ /dev/null @@ -1,37 +0,0 @@ -go-libp2p-circuit -================== - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://libp2p.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) -[![Coverage Status](https://img.shields.io/codecov/c/github/libp2p/go-libp2p-circuit.svg?style=flat-square&branch=master)](https://codecov.io/github/libp2p/go-libp2p-circuit?branch=master) -[![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit) - -> The libp2p relay allows peers to relay connections on behalf of others. - - -## Table of Contents - -- [Install](#install) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -go get -u github.com/libp2p/go-libp2p-circuit -``` - -## Usage - -TODO - -## Contribute - -PRs are welcome! - -Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -MIT © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/conn.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/conn.go deleted file mode 100644 index cca710edba..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/conn.go +++ /dev/null @@ -1,59 +0,0 @@ -package relay - -import ( - "fmt" - "net" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -type Conn struct { - inet.Stream - remote pstore.PeerInfo -} - -type NetAddr struct { - Relay string - Remote string -} - -func (n *NetAddr) Network() string { - return "libp2p-circuit-relay" -} - -func (n *NetAddr) String() string { - return fmt.Sprintf("relay[%s-%s]", n.Remote, n.Relay) -} - -func (c *Conn) RemoteAddr() net.Addr { - return &NetAddr{ - Relay: c.Conn().RemotePeer().Pretty(), - Remote: c.remote.ID.Pretty(), - } -} - -// TODO: is it okay to cast c.Conn().RemotePeer() into a multiaddr? might be "user input" -func (c *Conn) RemoteMultiaddr() ma.Multiaddr { - proto := ma.ProtocolWithCode(ma.P_P2P).Name - peerid := c.Conn().RemotePeer().Pretty() - p2paddr := ma.StringCast(fmt.Sprintf("/%s/%s", proto, peerid)) - - circaddr := ma.Cast(ma.CodeToVarint(P_CIRCUIT)) - return p2paddr.Encapsulate(circaddr) -} - -func (c *Conn) LocalMultiaddr() ma.Multiaddr { - return c.Conn().LocalMultiaddr() -} - -func (c *Conn) LocalAddr() net.Addr { - na, err := manet.ToNetAddr(c.Conn().LocalMultiaddr()) - if err != nil { - log.Error("failed to convert local multiaddr to net addr:", err) - return nil - } - return na -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/dial.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/dial.go deleted file mode 100644 index e6e6af95d4..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/dial.go +++ /dev/null @@ -1,89 +0,0 @@ -package relay - -import ( - "context" - "fmt" - "math/rand" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -func (d *RelayTransport) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (tpt.Conn, error) { - c, err := d.Relay().Dial(ctx, a, p) - if err != nil { - return nil, err - } - return d.upgrader.UpgradeOutbound(ctx, d, c, p) -} - -func (r *Relay) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (*Conn, error) { - if !r.Matches(a) { - return nil, fmt.Errorf("%s is not a relay address", a) - } - parts := ma.Split(a) - - spl := ma.Cast(ma.CodeToVarint(P_CIRCUIT)) - - var relayaddr, destaddr ma.Multiaddr - for i, p := range parts { - if p.Equal(spl) { - relayaddr = ma.Join(parts[:i]...) - destaddr = ma.Join(parts[i+1:]...) - break - } - } - - dinfo := &pstore.PeerInfo{ID: p, Addrs: []ma.Multiaddr{}} - if len(destaddr.Bytes()) > 0 { - dinfo.Addrs = append(dinfo.Addrs, destaddr) - } - - if len(relayaddr.Bytes()) == 0 { - // unspecific relay address, try dialing using known hop relays - return r.tryDialRelays(ctx, *dinfo) - } - - var rinfo *pstore.PeerInfo - rinfo, err := pstore.InfoFromP2pAddr(relayaddr) - if err != nil { - return nil, fmt.Errorf("error parsing multiaddr '%s': %s", relayaddr.String(), err) - } - - return r.DialPeer(ctx, *rinfo, *dinfo) -} - -func (r *Relay) tryDialRelays(ctx context.Context, dinfo pstore.PeerInfo) (*Conn, error) { - var relays []peer.ID - r.mx.Lock() - for p := range r.relays { - relays = append(relays, p) - } - r.mx.Unlock() - - // shuffle list of relays, avoid overloading a specific relay - for i := range relays { - j := rand.Intn(i + 1) - relays[i], relays[j] = relays[j], relays[i] - } - - for _, relay := range relays { - if len(r.host.Network().ConnsToPeer(relay)) == 0 { - continue - } - - rctx, cancel := context.WithTimeout(ctx, HopConnectTimeout) - c, err := r.DialPeer(rctx, pstore.PeerInfo{ID: relay}, dinfo) - cancel() - - if err == nil { - return c, nil - } - - log.Debugf("error opening relay connection through %s: %s", dinfo.ID, err.Error()) - } - - return nil, fmt.Errorf("Failed to dial through %d known relay hosts", len(relays)) -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/listen.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/listen.go deleted file mode 100644 index 90340a763a..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/listen.go +++ /dev/null @@ -1,58 +0,0 @@ -package relay - -import ( - "net" - - pb "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -var _ manet.Listener = (*RelayListener)(nil) - -type RelayListener Relay - -func (l *RelayListener) Relay() *Relay { - return (*Relay)(l) -} - -func (r *Relay) Listener() *RelayListener { - // TODO: Only allow one! - return (*RelayListener)(r) -} - -func (l *RelayListener) Accept() (manet.Conn, error) { - select { - case c := <-l.incoming: - err := l.Relay().writeResponse(c.Stream, pb.CircuitRelay_SUCCESS) - if err != nil { - log.Debugf("error writing relay response: %s", err.Error()) - c.Stream.Reset() - return nil, err - } - - // TODO: Pretty print. - log.Infof("accepted relay connection: %s", c) - - return c, nil - case <-l.ctx.Done(): - return nil, l.ctx.Err() - } -} - -func (l *RelayListener) Addr() net.Addr { - return &NetAddr{ - Relay: "any", - Remote: "any", - } -} - -func (l *RelayListener) Multiaddr() ma.Multiaddr { - return ma.Cast(ma.CodeToVarint(P_CIRCUIT)) -} - -func (l *RelayListener) Close() error { - // TODO: noop? - return nil -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/notify.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/notify.go deleted file mode 100644 index a785d0a026..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/notify.go +++ /dev/null @@ -1,54 +0,0 @@ -package relay - -import ( - "context" - "time" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -var _ inet.Notifiee = (*RelayNotifiee)(nil) - -type RelayNotifiee Relay - -func (r *Relay) Notifiee() inet.Notifiee { - return (*RelayNotifiee)(r) -} - -func (n *RelayNotifiee) Relay() *Relay { - return (*Relay)(n) -} - -func (n *RelayNotifiee) Listen(net inet.Network, a ma.Multiaddr) {} -func (n *RelayNotifiee) ListenClose(net inet.Network, a ma.Multiaddr) {} -func (n *RelayNotifiee) OpenedStream(net inet.Network, s inet.Stream) {} -func (n *RelayNotifiee) ClosedStream(net inet.Network, s inet.Stream) {} - -func (n *RelayNotifiee) Connected(s inet.Network, c inet.Conn) { - if n.Relay().Matches(c.RemoteMultiaddr()) { - return - } - - go func(id peer.ID) { - ctx, cancel := context.WithTimeout(n.ctx, time.Second) - defer cancel() - - canhop, err := n.Relay().CanHop(ctx, id) - if err != nil { - log.Debugf("Error testing relay hop: %s", err.Error()) - return - } - - if canhop { - log.Debugf("Discovered hop relay %s", id.Pretty()) - n.mx.Lock() - n.relays[id] = struct{}{} - n.mx.Unlock() - n.host.ConnManager().TagPeer(id, "relay-hop", 2) - } - }(c.RemotePeer()) -} - -func (n *RelayNotifiee) Disconnected(s inet.Network, c inet.Conn) {} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/package.json b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/package.json deleted file mode 100644 index df5d1c80ef..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "author": "vyzo", - "bugs": { - "url": "github.com/libp2p/go-libp2p-circuit" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-circuit" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "Qmcwep23T9AwwbuQRRhVyjk9PBRbMFCyGKCKGZfTPteiFU", - "name": "go-libp2p-blankhost", - "version": "0.3.15" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-circuit", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.3.2" -} - diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/relay.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/relay.go deleted file mode 100644 index 2d9e6b93ab..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/relay.go +++ /dev/null @@ -1,456 +0,0 @@ -package relay - -import ( - "context" - "fmt" - "io" - "sync" - "time" - - pb "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" -) - -var log = logging.Logger("relay") - -const ProtoID = "/libp2p/circuit/relay/0.1.0" - -const maxMessageSize = 4096 - -var RelayAcceptTimeout = time.Minute -var HopConnectTimeout = 10 * time.Second - -type Relay struct { - host host.Host - upgrader *tptu.Upgrader - ctx context.Context - self peer.ID - - active bool - hop bool - discovery bool - - incoming chan *Conn - - relays map[peer.ID]struct{} - mx sync.Mutex - - liveHops map[peer.ID]map[peer.ID]int - lhCount uint64 - lhLk sync.Mutex -} - -type RelayOpt int - -var ( - OptActive = RelayOpt(0) - OptHop = RelayOpt(1) - OptDiscovery = RelayOpt(2) -) - -type RelayError struct { - Code pb.CircuitRelay_Status -} - -func (e RelayError) Error() string { - return fmt.Sprintf("error opening relay circuit: %s (%d)", pb.CircuitRelay_Status_name[int32(e.Code)], e.Code) -} - -func NewRelay(ctx context.Context, h host.Host, upgrader *tptu.Upgrader, opts ...RelayOpt) (*Relay, error) { - r := &Relay{ - upgrader: upgrader, - host: h, - ctx: ctx, - self: h.ID(), - incoming: make(chan *Conn), - relays: make(map[peer.ID]struct{}), - liveHops: make(map[peer.ID]map[peer.ID]int), - } - - for _, opt := range opts { - switch opt { - case OptActive: - r.active = true - case OptHop: - r.hop = true - case OptDiscovery: - r.discovery = true - default: - return nil, fmt.Errorf("unrecognized option: %d", opt) - } - } - - h.SetStreamHandler(ProtoID, r.handleNewStream) - - if r.discovery { - h.Network().Notify(r.Notifiee()) - } - - return r, nil -} - -func (r *Relay) addLiveHop(from, to peer.ID) { - r.lhLk.Lock() - defer r.lhLk.Unlock() - - trg, ok := r.liveHops[from] - if !ok { - trg = make(map[peer.ID]int) - r.liveHops[from] = trg - } - trg[to]++ - r.lhCount++ -} - -func (r *Relay) rmLiveHop(from, to peer.ID) { - r.lhLk.Lock() - defer r.lhLk.Unlock() - - trg, ok := r.liveHops[from] - if !ok { - return - } - var count int - if count, ok = trg[to]; !ok { - return - } - count-- - - r.lhCount-- - if count <= 0 { - delete(trg, to) - if len(trg) == 0 { - delete(r.liveHops, from) - } - } else { - trg[to] = count - } -} - -func (r *Relay) GetActiveHops() uint64 { - r.lhLk.Lock() - defer r.lhLk.Unlock() - - return r.lhCount -} - -func (r *Relay) DialPeer(ctx context.Context, relay pstore.PeerInfo, dest pstore.PeerInfo) (*Conn, error) { - - log.Debugf("dialing peer %s through relay %s", dest.ID, relay.ID) - - if len(relay.Addrs) > 0 { - r.host.Peerstore().AddAddrs(relay.ID, relay.Addrs, pstore.TempAddrTTL) - } - - s, err := r.host.NewStream(ctx, relay.ID, ProtoID) - if err != nil { - return nil, err - } - - rd := newDelimitedReader(s, maxMessageSize) - wr := newDelimitedWriter(s) - - var msg pb.CircuitRelay - - msg.Type = pb.CircuitRelay_HOP.Enum() - msg.SrcPeer = peerInfoToPeer(r.host.Peerstore().PeerInfo(r.self)) - msg.DstPeer = peerInfoToPeer(dest) - - err = wr.WriteMsg(&msg) - if err != nil { - s.Reset() - return nil, err - } - - msg.Reset() - - err = rd.ReadMsg(&msg) - if err != nil { - s.Reset() - return nil, err - } - - if msg.GetType() != pb.CircuitRelay_STATUS { - s.Reset() - return nil, fmt.Errorf("unexpected relay response; not a status message (%d)", msg.GetType()) - } - - if msg.GetCode() != pb.CircuitRelay_SUCCESS { - s.Reset() - return nil, RelayError{msg.GetCode()} - } - - return &Conn{Stream: s, remote: dest}, nil -} - -func (r *Relay) Matches(addr ma.Multiaddr) bool { - // TODO: Look at the prefix transport as well. - _, err := addr.ValueForProtocol(P_CIRCUIT) - return err == nil -} - -func (r *Relay) CanHop(ctx context.Context, id peer.ID) (bool, error) { - s, err := r.host.NewStream(ctx, id, ProtoID) - if err != nil { - return false, err - } - - rd := newDelimitedReader(s, maxMessageSize) - wr := newDelimitedWriter(s) - - var msg pb.CircuitRelay - - msg.Type = pb.CircuitRelay_CAN_HOP.Enum() - - if err := wr.WriteMsg(&msg); err != nil { - s.Reset() - return false, err - } - - msg.Reset() - - if err := rd.ReadMsg(&msg); err != nil { - s.Reset() - return false, err - } - if err := inet.FullClose(s); err != nil { - return false, err - } - - if msg.GetType() != pb.CircuitRelay_STATUS { - return false, fmt.Errorf("unexpected relay response; not a status message (%d)", msg.GetType()) - } - - return msg.GetCode() == pb.CircuitRelay_SUCCESS, nil -} - -func (r *Relay) handleNewStream(s inet.Stream) { - log.Infof("new relay stream from: %s", s.Conn().RemotePeer()) - - rd := newDelimitedReader(s, maxMessageSize) - - var msg pb.CircuitRelay - - err := rd.ReadMsg(&msg) - if err != nil { - r.handleError(s, pb.CircuitRelay_MALFORMED_MESSAGE) - return - } - - switch msg.GetType() { - case pb.CircuitRelay_HOP: - r.handleHopStream(s, &msg) - case pb.CircuitRelay_STOP: - r.handleStopStream(s, &msg) - case pb.CircuitRelay_CAN_HOP: - r.handleCanHop(s, &msg) - default: - log.Warningf("unexpected relay handshake: %d", msg.GetType()) - r.handleError(s, pb.CircuitRelay_MALFORMED_MESSAGE) - } -} - -func (r *Relay) handleHopStream(s inet.Stream, msg *pb.CircuitRelay) { - if !r.hop { - r.handleError(s, pb.CircuitRelay_HOP_CANT_SPEAK_RELAY) - return - } - - src, err := peerToPeerInfo(msg.GetSrcPeer()) - if err != nil { - r.handleError(s, pb.CircuitRelay_HOP_SRC_MULTIADDR_INVALID) - return - } - - if src.ID != s.Conn().RemotePeer() { - r.handleError(s, pb.CircuitRelay_HOP_SRC_MULTIADDR_INVALID) - return - } - - dst, err := peerToPeerInfo(msg.GetDstPeer()) - if err != nil { - r.handleError(s, pb.CircuitRelay_HOP_DST_MULTIADDR_INVALID) - return - } - - if dst.ID == r.self { - r.handleError(s, pb.CircuitRelay_HOP_CANT_RELAY_TO_SELF) - return - } - - // open stream - ctp := r.host.Network().ConnsToPeer(dst.ID) - - if len(ctp) == 0 && !r.active { - r.handleError(s, pb.CircuitRelay_HOP_NO_CONN_TO_DST) - return - } - - if len(dst.Addrs) > 0 { - r.host.Peerstore().AddAddrs(dst.ID, dst.Addrs, pstore.TempAddrTTL) - } - - ctx, cancel := context.WithTimeout(r.ctx, HopConnectTimeout) - defer cancel() - - bs, err := r.host.NewStream(ctx, dst.ID, ProtoID) - if err != nil { - log.Debugf("error opening relay stream to %s: %s", dst.ID.Pretty(), err.Error()) - r.handleError(s, pb.CircuitRelay_HOP_CANT_DIAL_DST) - return - } - - // stop handshake - rd := newDelimitedReader(bs, maxMessageSize) - wr := newDelimitedWriter(bs) - - msg.Type = pb.CircuitRelay_STOP.Enum() - - err = wr.WriteMsg(msg) - if err != nil { - log.Debugf("error writing stop handshake: %s", err.Error()) - bs.Reset() - r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) - return - } - - msg.Reset() - - err = rd.ReadMsg(msg) - if err != nil { - log.Debugf("error reading stop response: %s", err.Error()) - bs.Reset() - r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) - return - } - - if msg.GetType() != pb.CircuitRelay_STATUS { - log.Debugf("unexpected relay stop response: not a status message (%d)", msg.GetType()) - bs.Reset() - r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) - return - } - - if msg.GetCode() != pb.CircuitRelay_SUCCESS { - log.Debugf("relay stop failure: %d", msg.GetCode()) - bs.Reset() - r.handleError(s, msg.GetCode()) - return - } - - err = r.writeResponse(s, pb.CircuitRelay_SUCCESS) - if err != nil { - log.Debugf("error writing relay response: %s", err.Error()) - bs.Reset() - s.Reset() - return - } - - // relay connection - log.Infof("relaying connection between %s and %s", src.ID.Pretty(), dst.ID.Pretty()) - - r.addLiveHop(src.ID, dst.ID) - - // Don't reset streams after finishing or the other side will get an - // error, not an EOF. - go func() { - defer r.rmLiveHop(src.ID, dst.ID) - - count, err := io.Copy(s, bs) - if err != nil { - log.Debugf("relay copy error: %s", err) - // Reset both. - s.Reset() - bs.Reset() - } else { - // propagate the close - s.Close() - } - log.Debugf("relayed %d bytes from %s to %s", count, dst.ID.Pretty(), src.ID.Pretty()) - }() - - go func() { - count, err := io.Copy(bs, s) - if err != nil { - log.Debugf("relay copy error: %s", err) - // Reset both. - bs.Reset() - s.Reset() - } else { - // propagate the close - bs.Close() - } - log.Debugf("relayed %d bytes from %s to %s", count, src.ID.Pretty(), dst.ID.Pretty()) - }() -} - -func (r *Relay) handleStopStream(s inet.Stream, msg *pb.CircuitRelay) { - src, err := peerToPeerInfo(msg.GetSrcPeer()) - if err != nil { - r.handleError(s, pb.CircuitRelay_STOP_SRC_MULTIADDR_INVALID) - return - } - - dst, err := peerToPeerInfo(msg.GetDstPeer()) - if err != nil || dst.ID != r.self { - r.handleError(s, pb.CircuitRelay_STOP_DST_MULTIADDR_INVALID) - return - } - - log.Infof("relay connection from: %s", src.ID) - - if len(src.Addrs) > 0 { - r.host.Peerstore().AddAddrs(src.ID, src.Addrs, pstore.TempAddrTTL) - } - - select { - case r.incoming <- &Conn{Stream: s, remote: src}: - case <-time.After(RelayAcceptTimeout): - r.handleError(s, pb.CircuitRelay_STOP_RELAY_REFUSED) - } -} - -func (r *Relay) handleCanHop(s inet.Stream, msg *pb.CircuitRelay) { - var err error - - if r.hop { - err = r.writeResponse(s, pb.CircuitRelay_SUCCESS) - } else { - err = r.writeResponse(s, pb.CircuitRelay_HOP_CANT_SPEAK_RELAY) - } - - if err != nil { - s.Reset() - log.Debugf("error writing relay response: %s", err.Error()) - } else { - inet.FullClose(s) - } -} - -func (r *Relay) handleError(s inet.Stream, code pb.CircuitRelay_Status) { - log.Warningf("relay error: %s (%d)", pb.CircuitRelay_Status_name[int32(code)], code) - err := r.writeResponse(s, code) - if err != nil { - s.Reset() - log.Debugf("error writing relay response: %s", err.Error()) - } else { - inet.FullClose(s) - } -} - -func (r *Relay) writeResponse(s inet.Stream, code pb.CircuitRelay_Status) error { - wr := newDelimitedWriter(s) - - var msg pb.CircuitRelay - msg.Type = pb.CircuitRelay_STATUS.Enum() - msg.Code = code.Enum() - - return wr.WriteMsg(&msg) -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/transport.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/transport.go deleted file mode 100644 index 04a2dc289f..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/transport.go +++ /dev/null @@ -1,80 +0,0 @@ -package relay - -import ( - "context" - "fmt" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" -) - -const P_CIRCUIT = 290 - -var Protocol = ma.Protocol{ - Code: P_CIRCUIT, - Size: 0, - Name: "p2p-circuit", - VCode: ma.CodeToVarint(P_CIRCUIT), -} - -func init() { - ma.AddProtocol(Protocol) -} - -var _ tpt.Transport = (*RelayTransport)(nil) - -type RelayTransport Relay - -func (t *RelayTransport) Relay() *Relay { - return (*Relay)(t) -} - -func (r *Relay) Transport() *RelayTransport { - return (*RelayTransport)(r) -} - -func (t *RelayTransport) Listen(laddr ma.Multiaddr) (tpt.Listener, error) { - // TODO: Ensure we have a connection to the relay, if specified. Also, - // make sure the multiaddr makes sense. - if !t.Relay().Matches(laddr) { - return nil, fmt.Errorf("%s is not a relay address", laddr) - } - return t.upgrader.UpgradeListener(t, t.Relay().Listener()), nil -} - -func (t *RelayTransport) CanDial(raddr ma.Multiaddr) bool { - return t.Relay().Matches(raddr) -} - -func (t *RelayTransport) Proxy() bool { - return true -} - -func (t *RelayTransport) Protocols() []int { - return []int{P_CIRCUIT} -} - -// AddRelayTransport constructs a relay and adds it as a transport to the host network. -func AddRelayTransport(ctx context.Context, h host.Host, upgrader *tptu.Upgrader, opts ...RelayOpt) error { - n, ok := h.Network().(tpt.Network) - if !ok { - return fmt.Errorf("%v is not a transport network", h.Network()) - } - - r, err := NewRelay(ctx, h, upgrader, opts...) - if err != nil { - return err - } - - // There's no nice way to handle these errors as we have no way to tear - // down the relay. - // TODO - if err := n.AddTransport(r.Transport()); err != nil { - log.Error("failed to add relay transport:", err) - } else if err := n.Listen(r.Listener().Multiaddr()); err != nil { - log.Error("failed to listen on relay transport:", err) - } - return nil -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/util.go b/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/util.go deleted file mode 100644 index c6808bba9c..0000000000 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/util.go +++ /dev/null @@ -1,97 +0,0 @@ -package relay - -import ( - "encoding/binary" - "errors" - "io" - - pb "gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -func peerToPeerInfo(p *pb.CircuitRelay_Peer) (pstore.PeerInfo, error) { - if p == nil { - return pstore.PeerInfo{}, errors.New("nil peer") - } - - id, err := peer.IDFromBytes(p.Id) - if err != nil { - return pstore.PeerInfo{}, err - } - - addrs := make([]ma.Multiaddr, 0, len(p.Addrs)) - for _, addrBytes := range p.Addrs { - a, err := ma.NewMultiaddrBytes(addrBytes) - if err == nil { - addrs = append(addrs, a) - } - } - - return pstore.PeerInfo{ID: id, Addrs: addrs}, nil -} - -func peerInfoToPeer(pi pstore.PeerInfo) *pb.CircuitRelay_Peer { - addrs := make([][]byte, len(pi.Addrs)) - for i, addr := range pi.Addrs { - addrs[i] = addr.Bytes() - } - - p := new(pb.CircuitRelay_Peer) - p.Id = []byte(pi.ID) - p.Addrs = addrs - - return p -} - -type delimitedReader struct { - r io.Reader - buf []byte -} - -// The gogo protobuf NewDelimitedReader is buffered, which may eat up stream data. -// So we need to implement a compatible delimited reader that reads unbuffered. -// There is a slowdown from unbuffered reading: when reading the message -// it can take multiple single byte Reads to read the length and another Read -// to read the message payload. -// However, this is not critical performance degradation as -// - the reader is utilized to read one (dialer, stop) or two messages (hop) during -// the handshake, so it's a drop in the water for the connection lifetime. -// - messages are small (max 4k) and the length fits in a couple of bytes, -// so overall we have at most three reads per message. -func newDelimitedReader(r io.Reader, maxSize int) *delimitedReader { - return &delimitedReader{r: r, buf: make([]byte, maxSize)} -} - -func (d *delimitedReader) ReadByte() (byte, error) { - buf := d.buf[:1] - _, err := d.r.Read(buf) - return buf[0], err -} - -func (d *delimitedReader) ReadMsg(msg proto.Message) error { - mlen, err := binary.ReadUvarint(d) - if err != nil { - return err - } - - if uint64(len(d.buf)) < mlen { - return errors.New("Message too large") - } - - buf := d.buf[:mlen] - _, err = io.ReadFull(d.r, buf) - if err != nil { - return err - } - - return proto.Unmarshal(buf, msg) -} - -func newDelimitedWriter(w io.Writer) ggio.WriteCloser { - return ggio.NewDelimitedWriter(w) -} diff --git a/vendor/gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language/lookup.go b/vendor/gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language/lookup.go index de39062015..16b70782f6 100644 --- a/vendor/gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language/lookup.go +++ b/vendor/gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/internal/language/lookup.go @@ -391,7 +391,7 @@ var ( {'z', 'h', '-', 'm', 'i', 'n'}: -6, // zh-min // CLDR-specific tag. - {'r', 'o', 'o', 't'}: 0, // root + {'r', 'o', 'o', 't'}: 0, // root {'e', 'n', '-', 'u', 's', '-', 'p', 'o', 's', 'i', 'x'}: -7, // en_US_POSIX" } diff --git a/vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/package.json b/vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/package.json deleted file mode 100644 index adf10b8d00..0000000000 --- a/vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "author": "why", - "bugs": {}, - "gx": { - "dvcsimport": "github.com/ipfs/go-verifcid" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-verifcid", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.0" -} - diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/.travis.yml b/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/.travis.yml deleted file mode 100644 index 2e9fa78cef..0000000000 --- a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -sudo: false - -go: - - 1.9.x - - tip - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/package.json b/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/package.json deleted file mode 100644 index aa44a2aa34..0000000000 --- a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-loggables" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-loggables" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "google", - "hash": "QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W", - "name": "uuid", - "version": "0.1.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-loggables", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.24" -} - diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/.gxignore b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/.gxignore similarity index 100% rename from vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/.gxignore rename to vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/.gxignore diff --git a/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/.travis.yml b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/.travis.yml new file mode 100644 index 0000000000..16f237af9a --- /dev/null +++ b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.9.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/LICENSE b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/LICENSE rename to vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/LICENSE diff --git a/vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/Makefile b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/Makefile similarity index 100% rename from vendor/gx/ipfs/QmTSih5JrkhMH62dp1oGjEwcaC38dxXBgRwTbeQEL4mPcU/go-libp2p-connmgr/Makefile rename to vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/Makefile diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/README.md b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/README.md similarity index 100% rename from vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/README.md rename to vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/README.md diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/codecov.yml b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/codecov.yml rename to vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/codecov.yml diff --git a/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/muxer.go b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/muxer.go new file mode 100644 index 0000000000..c534af5e17 --- /dev/null +++ b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/muxer.go @@ -0,0 +1,55 @@ +package streammux + +import ( + "errors" + "io" + "net" + "time" +) + +// ErrReset is returned when reading or writing on a reset stream. +var ErrReset = errors.New("stream reset") + +// Stream is a bidirectional io pipe within a connection. +type Stream interface { + io.Reader + io.Writer + + // Close closes the stream for writing. Reading will still work (that + // is, the remote side can still write). + io.Closer + + // Reset closes both ends of the stream. Use this to tell the remote + // side to hang up and go away. + Reset() error + + SetDeadline(time.Time) error + SetReadDeadline(time.Time) error + SetWriteDeadline(time.Time) error +} + +// NoOpHandler do nothing. Resets streams as soon as they are opened. +var NoOpHandler = func(s Stream) { s.Reset() } + +// Conn is a stream-multiplexing connection to a remote peer. +type Conn interface { + // Close closes the stream muxer and the the underlying net.Conn. + io.Closer + + // IsClosed returns whether a connection is fully closed, so it can + // be garbage collected. + IsClosed() bool + + // OpenStream creates a new stream. + OpenStream() (Stream, error) + + // AcceptStream accepts a stream opened by the other side. + AcceptStream() (Stream, error) +} + +// Transport constructs go-stream-muxer compatible connections. +type Transport interface { + + // NewConn constructs a new connection + NewConn(c net.Conn, isServer bool) (Conn, error) +} diff --git a/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/package.json b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/package.json new file mode 100644 index 0000000000..c63d0829a7 --- /dev/null +++ b/vendor/gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer/package.json @@ -0,0 +1,15 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-stream-muxer" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-stream-muxer" + }, + "gxVersion": "0.7.0", + "language": "go", + "license": "", + "name": "go-stream-muxer", + "version": "3.1.0" +} + diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/.travis.yml b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/.travis.yml rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/.travis.yml diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/LICENSE b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/LICENSE rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/LICENSE diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/Makefile b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/Makefile similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/Makefile rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/Makefile diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/README.md b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/README.md similarity index 100% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/README.md rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/README.md diff --git a/vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/codecov.yml b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables/codecov.yml rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/codecov.yml diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/cloner.go b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/cloner.go similarity index 82% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/cloner.go rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/cloner.go index 80a836edd4..89998e2441 100644 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/cloner.go +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/cloner.go @@ -3,8 +3,8 @@ package encoding import ( "sync" - refmt "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" + refmt "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" ) // PooledCloner is a thread-safe pooled object cloner. diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/marshaller.go b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/marshaller.go similarity index 93% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/marshaller.go rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/marshaller.go index f125d0f074..3d6472ff35 100644 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/marshaller.go +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/marshaller.go @@ -5,8 +5,8 @@ import ( "io" "sync" - cbor "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" + cbor "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" ) type proxyWriter struct { diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/unmarshaller.go b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/unmarshaller.go similarity index 88% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/unmarshaller.go rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/unmarshaller.go index 18d3e0a638..9fd2b7a2d7 100644 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding/unmarshaller.go +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding/unmarshaller.go @@ -5,8 +5,8 @@ import ( "io" "sync" - cbor "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" + cbor "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" ) type proxyReader struct { @@ -26,7 +26,7 @@ type Unmarshaller struct { // NewUnmarshallerAtlased creates a new reusable unmarshaller. func NewUnmarshallerAtlased(atl atlas.Atlas) *Unmarshaller { m := new(Unmarshaller) - m.unmarshal = cbor.NewUnmarshallerAtlased(&m.reader, atl) + m.unmarshal = cbor.NewUnmarshallerAtlased(cbor.DecodeOptions{CoerceUndefToNull: true}, &m.reader, atl) return m } diff --git a/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/node.go b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/node.go new file mode 100644 index 0000000000..edc25a6503 --- /dev/null +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/node.go @@ -0,0 +1,541 @@ +package cbornode + +import ( + "encoding/json" + "errors" + "io" + "math" + "strconv" + "strings" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + node "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// CBORTagLink is the integer used to represent tags in CBOR. +const CBORTagLink = 42 + +// Node represents an IPLD node. +type Node struct { + obj interface{} + tree []string + links []*node.Link + raw []byte + cid cid.Cid +} + +// Compile time check to make sure Node implements the node.Node interface +var _ node.Node = (*Node)(nil) + +var ( + // ErrNoSuchLink is returned when no link with the given name was found. + ErrNoSuchLink = errors.New("no such link found") + ErrNonLink = errors.New("non-link found at given path") + ErrInvalidLink = errors.New("link value should have been bytes") + ErrInvalidKeys = errors.New("map keys must be strings") + ErrArrayOutOfRange = errors.New("array index out of range") + ErrNoLinks = errors.New("tried to resolve through object that had no links") + ErrEmptyLink = errors.New("link value was empty") + ErrInvalidMultibase = errors.New("invalid multibase on IPLD link") + ErrNonStringLink = errors.New("link should have been a string") +) + +// DecodeBlock decodes a CBOR encoded Block into an IPLD Node. +// +// This method *does not* canonicalize and *will* preserve the CID. As a matter +// of fact, it will assume that `block.Cid()` returns the correct CID and will +// make no effort to validate this assumption. +// +// In general, you should not be calling this method directly. Instead, you +// should be calling the `Decode` method from the `go-ipld-format` package. That +// method will pick the right decoder based on the Block's CID. +// +// Note: This function keeps a reference to `block` and assumes that it is +// immutable. +func DecodeBlock(block blocks.Block) (node.Node, error) { + return decodeBlock(block) +} + +func decodeBlock(block blocks.Block) (*Node, error) { + var m interface{} + if err := DecodeInto(block.RawData(), &m); err != nil { + return nil, err + } + return newObject(block, m) +} + +func newObject(block blocks.Block, m interface{}) (*Node, error) { + tree, links, err := compute(m) + if err != nil { + return nil, err + } + + return &Node{ + obj: m, + tree: tree, + links: links, + raw: block.RawData(), + cid: block.Cid(), + }, nil +} + +var _ node.DecodeBlockFunc = DecodeBlock + +// Decode decodes a CBOR object into an IPLD Node. +// +// If passed a non-canonical CBOR node, this function will canonicalize it. +// Therefore, `bytes.Equal(b, Decode(b).RawData())` may not hold. If you already +// have a CID for this data and want to ensure that it doesn't change, you +// should use `DecodeBlock`. +// mhType is multihash code to use for hashing, for example mh.SHA2_256 +// +// Note: This function does not hold onto `b`. You may reuse it. +func Decode(b []byte, mhType uint64, mhLen int) (*Node, error) { + var m interface{} + if err := DecodeInto(b, &m); err != nil { + return nil, err + } + + // We throw away `b` here to ensure that we canonicalize the encoded + // CBOR object. + return WrapObject(m, mhType, mhLen) +} + +// DecodeInto decodes a serialized IPLD cbor object into the given object. +func DecodeInto(b []byte, v interface{}) error { + return unmarshaller.Unmarshal(b, v) +} + +// WrapObject converts an arbitrary object into a Node. +func WrapObject(m interface{}, mhType uint64, mhLen int) (*Node, error) { + data, err := marshaller.Marshal(m) + if err != nil { + return nil, err + } + + var obj interface{} + err = cloner.Clone(m, &obj) + if err != nil { + return nil, err + } + + if mhType == math.MaxUint64 { + mhType = mh.SHA2_256 + } + + hash, err := mh.Sum(data, mhType, mhLen) + if err != nil { + return nil, err + } + c := cid.NewCidV1(cid.DagCBOR, hash) + + block, err := blocks.NewBlockWithCid(data, c) + if err != nil { + // TODO: Shouldn't this just panic? + return nil, err + } + // No need to deserialize. We can just deep copy. + return newObject(block, obj) +} + +// Resolve resolves a given path, and returns the object found at the end, as well +// as the possible tail of the path that was not resolved. +func (n *Node) Resolve(path []string) (interface{}, []string, error) { + var cur interface{} = n.obj + for i, val := range path { + switch curv := cur.(type) { + case map[string]interface{}: + next, ok := curv[val] + if !ok { + return nil, nil, ErrNoSuchLink + } + + cur = next + case map[interface{}]interface{}: + next, ok := curv[val] + if !ok { + return nil, nil, ErrNoSuchLink + } + + cur = next + case []interface{}: + n, err := strconv.Atoi(val) + if err != nil { + return nil, nil, err + } + + if n < 0 || n >= len(curv) { + return nil, nil, ErrArrayOutOfRange + } + + cur = curv[n] + case cid.Cid: + return &node.Link{Cid: curv}, path[i:], nil + default: + return nil, nil, ErrNoLinks + } + } + + lnk, ok := cur.(cid.Cid) + if ok { + return &node.Link{Cid: lnk}, nil, nil + } + + jsonish, err := convertToJSONIsh(cur) + if err != nil { + return nil, nil, err + } + + return jsonish, nil, nil +} + +// Copy creates a copy of the Node. +func (n *Node) Copy() node.Node { + links := make([]*node.Link, len(n.links)) + copy(links, n.links) + + raw := make([]byte, len(n.raw)) + copy(raw, n.raw) + + tree := make([]string, len(n.tree)) + copy(tree, n.tree) + + return &Node{ + obj: copyObj(n.obj), + links: links, + raw: raw, + tree: tree, + cid: n.cid, + } +} + +func copyObj(i interface{}) interface{} { + switch i := i.(type) { + case map[string]interface{}: + out := make(map[string]interface{}) + for k, v := range i { + out[k] = copyObj(v) + } + return out + case map[interface{}]interface{}: + out := make(map[interface{}]interface{}) + for k, v := range i { + out[k] = copyObj(v) + } + return out + case []interface{}: + var out []interface{} + for _, v := range i { + out = append(out, copyObj(v)) + } + return out + default: + // TODO: do not be lazy + // being lazy for now + // use caution + return i + } +} + +// ResolveLink resolves a path and returns the raw Link at the end, as well as +// the possible tail of the path that was not resolved. +func (n *Node) ResolveLink(path []string) (*node.Link, []string, error) { + obj, rest, err := n.Resolve(path) + if err != nil { + return nil, nil, err + } + + lnk, ok := obj.(*node.Link) + if !ok { + return nil, rest, ErrNonLink + } + + return lnk, rest, nil +} + +// Tree returns a flattend array of paths at the given path for the given depth. +func (n *Node) Tree(path string, depth int) []string { + if path == "" && depth == -1 { + return n.tree + } + + var out []string + for _, t := range n.tree { + if !strings.HasPrefix(t, path) { + continue + } + + sub := strings.TrimLeft(t[len(path):], "/") + if sub == "" { + continue + } + + if depth < 0 { + out = append(out, sub) + continue + } + + parts := strings.Split(sub, "/") + if len(parts) <= depth { + out = append(out, sub) + } + } + return out +} + +func compute(obj interface{}) (tree []string, links []*node.Link, err error) { + err = traverse(obj, "", func(name string, val interface{}) error { + if name != "" { + tree = append(tree, name[1:]) + } + if lnk, ok := val.(cid.Cid); ok { + links = append(links, &node.Link{Cid: lnk}) + } + return nil + }) + if err != nil { + return nil, nil, err + } + + return tree, links, nil +} + +// Links lists all known links of the Node. +func (n *Node) Links() []*node.Link { + return n.links +} + +func traverse(obj interface{}, cur string, cb func(string, interface{}) error) error { + if err := cb(cur, obj); err != nil { + return err + } + + switch obj := obj.(type) { + case map[string]interface{}: + for k, v := range obj { + this := cur + "/" + k + if err := traverse(v, this, cb); err != nil { + return err + } + } + return nil + case map[interface{}]interface{}: + for k, v := range obj { + ks, ok := k.(string) + if !ok { + return errors.New("map key was not a string") + } + this := cur + "/" + ks + if err := traverse(v, this, cb); err != nil { + return err + } + } + return nil + case []interface{}: + for i, v := range obj { + this := cur + "/" + strconv.Itoa(i) + if err := traverse(v, this, cb); err != nil { + return err + } + } + return nil + default: + return nil + } +} + +// RawData returns the raw bytes that represent the Node as serialized CBOR. +func (n *Node) RawData() []byte { + return n.raw +} + +// Cid returns the canonical Cid of the NOde. +func (n *Node) Cid() cid.Cid { + return n.cid +} + +// Loggable returns a loggable representation of the Node. +func (n *Node) Loggable() map[string]interface{} { + return map[string]interface{}{ + "node_type": "cbor", + "cid": n.Cid(), + } +} + +// Size returns the size of the binary representation of the Node. +func (n *Node) Size() (uint64, error) { + return uint64(len(n.RawData())), nil +} + +// Stat returns stats about the Node. +// TODO: implement? +func (n *Node) Stat() (*node.NodeStat, error) { + return &node.NodeStat{}, nil +} + +// String returns the string representation of the CID of the Node. +func (n *Node) String() string { + return n.Cid().String() +} + +// MarshalJSON converts the Node into its JSON representation. +func (n *Node) MarshalJSON() ([]byte, error) { + out, err := convertToJSONIsh(n.obj) + if err != nil { + return nil, err + } + + return json.Marshal(out) +} + +// DumpObject marshals any object into its CBOR serialized byte representation +// TODO: rename +func DumpObject(obj interface{}) (out []byte, err error) { + return marshaller.Marshal(obj) +} + +func toSaneMap(n map[interface{}]interface{}) (interface{}, error) { + if lnk, ok := n["/"]; ok && len(n) == 1 { + lnkb, ok := lnk.([]byte) + if !ok { + return nil, ErrInvalidLink + } + + c, err := cid.Cast(lnkb) + if err != nil { + return nil, err + } + + return map[string]interface{}{"/": c}, nil + } + out := make(map[string]interface{}) + for k, v := range n { + ks, ok := k.(string) + if !ok { + return nil, ErrInvalidKeys + } + + obj, err := convertToJSONIsh(v) + if err != nil { + return nil, err + } + + out[ks] = obj + } + + return out, nil +} + +func convertToJSONIsh(v interface{}) (interface{}, error) { + switch v := v.(type) { + case map[interface{}]interface{}: + return toSaneMap(v) + case []interface{}: + var out []interface{} + if len(v) == 0 && v != nil { + return []interface{}{}, nil + } + for _, i := range v { + obj, err := convertToJSONIsh(i) + if err != nil { + return nil, err + } + + out = append(out, obj) + } + return out, nil + default: + return v, nil + } +} + +// FromJSON converts incoming JSON into a Node. +func FromJSON(r io.Reader, mhType uint64, mhLen int) (*Node, error) { + var m interface{} + err := json.NewDecoder(r).Decode(&m) + if err != nil { + return nil, err + } + + obj, err := convertToCborIshObj(m) + if err != nil { + return nil, err + } + + return WrapObject(obj, mhType, mhLen) +} + +func convertToCborIshObj(i interface{}) (interface{}, error) { + switch v := i.(type) { + case map[string]interface{}: + if len(v) == 0 && v != nil { + return v, nil + } + + if lnk, ok := v["/"]; ok && len(v) == 1 { + // special case for links + vstr, ok := lnk.(string) + if !ok { + return nil, ErrNonStringLink + } + + return cid.Decode(vstr) + } + + for a, b := range v { + val, err := convertToCborIshObj(b) + if err != nil { + return nil, err + } + + v[a] = val + } + return v, nil + case []interface{}: + if len(v) == 0 && v != nil { + return v, nil + } + + var out []interface{} + for _, o := range v { + obj, err := convertToCborIshObj(o) + if err != nil { + return nil, err + } + + out = append(out, obj) + } + + return out, nil + default: + return v, nil + } +} + +func castBytesToCid(x []byte) (cid.Cid, error) { + if len(x) == 0 { + return cid.Cid{}, ErrEmptyLink + } + + // TODO: manually doing multibase checking here since our deps don't + // support binary multibase yet + if x[0] != 0 { + return cid.Cid{}, ErrInvalidMultibase + } + + c, err := cid.Cast(x[1:]) + if err != nil { + return cid.Cid{}, ErrInvalidLink + } + + return c, nil +} + +func castCidToBytes(link cid.Cid) ([]byte, error) { + if !link.Defined() { + return nil, ErrEmptyLink + } + return append([]byte{0}, link.Bytes()...), nil +} diff --git a/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/package.json b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/package.json new file mode 100644 index 0000000000..8b19bc1f00 --- /dev/null +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/package.json @@ -0,0 +1,54 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ipld-cbor" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipld-cbor" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "why", + "hash": "QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu", + "name": "refmt", + "version": "1.2.1" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-ipld-cbor", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.5.10" +} + diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/refmt.go b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/refmt.go similarity index 89% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/refmt.go rename to vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/refmt.go index 9f68a349ab..8e19e60138 100644 --- a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/refmt.go +++ b/vendor/gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/refmt.go @@ -3,11 +3,11 @@ package cbornode import ( "math/big" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" - encoding "gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/encoding" + encoding "gx/ipfs/QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D/go-ipld-cbor/encoding" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" ) // This atlas describes the CBOR Tag (42) for IPLD links, such that refmt can marshal and unmarshal them diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/.travis.yml b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/.travis.yml new file mode 100644 index 0000000000..58d60ddf4a --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/LICENSE b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/LICENSE rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/LICENSE diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/Makefile b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/Makefile similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/Makefile rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/Makefile diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/README.md b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/README.md new file mode 100644 index 0000000000..38d20644c4 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/README.md @@ -0,0 +1,55 @@ +# go-libp2p-pubsub + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://github.com/libp2p/libp2p) +[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) + +> A pubsub system with flooding and gossiping variants. + +This is the canonical pubsub implementation for libp2p. + +We currently provide three implementations: +- floodsub, which is the baseline flooding protocol. +- gossipsub, which is a more advanced router with mesh formation and gossip propagation. + See [spec](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) and [implementation](https://github.com/libp2p/go-libp2p-pubsub/blob/master/gossipsub.go) for more details. +- randomsub, which is a simple probabilistic router that propagates to random subsets of peers. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Documentation](#documentation) +- [Contribute](#contribute) +- [License](#license) + +## Install + +``` +go get github.com/libp2p/go-libp2p-pubsub +``` + +## Usage + +To be used for messaging in p2p instrastructure (as part of libp2p) such as IPFS, Ethereum, other blockchains, etc. + +## Implementations + +See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations). + +## Documentation + +See the [libp2p specs](https://github.com/libp2p/specs/tree/master/pubsub) for high level documentation +and [godoc](https://godoc.org/github.com/libp2p/go-libp2p-pubsub) for API documentation. + + +## Contribute + +Contributions welcome. Please check out [the issues](https://github.com/libp2p/go-libp2p-pubsub/issues). + +Check out our [contributing document](https://github.com/libp2p/community/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/blacklist.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/blacklist.go new file mode 100644 index 0000000000..622246b7eb --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/blacklist.go @@ -0,0 +1,53 @@ +package pubsub + +import ( + lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// Blacklist is an interface for peer blacklisting. +type Blacklist interface { + Add(peer.ID) + Contains(peer.ID) bool +} + +// MapBlacklist is a blacklist implementation using a perfect map +type MapBlacklist map[peer.ID]struct{} + +// NewMapBlacklist creates a new MapBlacklist +func NewMapBlacklist() Blacklist { + return MapBlacklist(make(map[peer.ID]struct{})) +} + +func (b MapBlacklist) Add(p peer.ID) { + b[p] = struct{}{} +} + +func (b MapBlacklist) Contains(p peer.ID) bool { + _, ok := b[p] + return ok +} + +// LRUBlacklist is a blacklist implementation using an LRU cache +type LRUBlacklist struct { + lru *lru.Cache +} + +// NewLRUBlacklist creates a new LRUBlacklist with capacity cap +func NewLRUBlacklist(cap int) (Blacklist, error) { + c, err := lru.New(cap) + if err != nil { + return nil, err + } + + b := &LRUBlacklist{lru: c} + return b, nil +} + +func (b LRUBlacklist) Add(p peer.ID) { + b.lru.Add(p, nil) +} + +func (b LRUBlacklist) Contains(p peer.ID) bool { + return b.lru.Contains(p) +} diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/codecov.yml b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/codecov.yml rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/codecov.yml diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/comm.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/comm.go new file mode 100644 index 0000000000..0be58385c5 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/comm.go @@ -0,0 +1,172 @@ +package pubsub + +import ( + "bufio" + "context" + "io" + + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" + + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ms "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +// get the initial RPC containing all of our subscriptions to send to new peers +func (p *PubSub) getHelloPacket() *RPC { + var rpc RPC + for t := range p.myTopics { + as := &pb.RPC_SubOpts{ + Topicid: proto.String(t), + Subscribe: proto.Bool(true), + } + rpc.Subscriptions = append(rpc.Subscriptions, as) + } + return &rpc +} + +func (p *PubSub) handleNewStream(s inet.Stream) { + r := ggio.NewDelimitedReader(s, 1<<20) + for { + rpc := new(RPC) + err := r.ReadMsg(&rpc.RPC) + if err != nil { + if err != io.EOF { + s.Reset() + log.Infof("error reading rpc from %s: %s", s.Conn().RemotePeer(), err) + } else { + // Just be nice. They probably won't read this + // but it doesn't hurt to send it. + s.Close() + } + return + } + + rpc.from = s.Conn().RemotePeer() + select { + case p.incoming <- rpc: + case <-p.ctx.Done(): + // Close is useless because the other side isn't reading. + s.Reset() + return + } + } +} + +func (p *PubSub) handleNewPeer(ctx context.Context, pid peer.ID, outgoing <-chan *RPC) { + s, err := p.host.NewStream(p.ctx, pid, p.rt.Protocols()...) + if err != nil { + log.Warning("opening new stream to peer: ", err, pid) + + var ch chan peer.ID + if err == ms.ErrNotSupported { + ch = p.newPeerError + } else { + ch = p.peerDead + } + + select { + case ch <- pid: + case <-ctx.Done(): + } + return + } + + go p.handleSendingMessages(ctx, s, outgoing) + go p.handlePeerEOF(ctx, s) + select { + case p.newPeerStream <- s: + case <-ctx.Done(): + } +} + +func (p *PubSub) handlePeerEOF(ctx context.Context, s inet.Stream) { + r := ggio.NewDelimitedReader(s, 1<<20) + rpc := new(RPC) + for { + err := r.ReadMsg(&rpc.RPC) + if err != nil { + select { + case p.peerDead <- s.Conn().RemotePeer(): + case <-ctx.Done(): + } + return + } + log.Warning("unexpected message from ", s.Conn().RemotePeer()) + } +} + +func (p *PubSub) handleSendingMessages(ctx context.Context, s inet.Stream, outgoing <-chan *RPC) { + bufw := bufio.NewWriter(s) + wc := ggio.NewDelimitedWriter(bufw) + + writeMsg := func(msg proto.Message) error { + err := wc.WriteMsg(msg) + if err != nil { + return err + } + + return bufw.Flush() + } + + defer inet.FullClose(s) + for { + select { + case rpc, ok := <-outgoing: + if !ok { + return + } + + err := writeMsg(&rpc.RPC) + if err != nil { + s.Reset() + log.Infof("writing message to %s: %s", s.Conn().RemotePeer(), err) + return + } + case <-ctx.Done(): + return + } + } +} + +func rpcWithSubs(subs ...*pb.RPC_SubOpts) *RPC { + return &RPC{ + RPC: pb.RPC{ + Subscriptions: subs, + }, + } +} + +func rpcWithMessages(msgs ...*pb.Message) *RPC { + return &RPC{RPC: pb.RPC{Publish: msgs}} +} + +func rpcWithControl(msgs []*pb.Message, + ihave []*pb.ControlIHave, + iwant []*pb.ControlIWant, + graft []*pb.ControlGraft, + prune []*pb.ControlPrune) *RPC { + return &RPC{ + RPC: pb.RPC{ + Publish: msgs, + Control: &pb.ControlMessage{ + Ihave: ihave, + Iwant: iwant, + Graft: graft, + Prune: prune, + }, + }, + } +} + +func copyRPC(rpc *RPC) *RPC { + res := new(RPC) + *res = *rpc + if rpc.Control != nil { + res.Control = new(pb.ControlMessage) + *res.Control = *rpc.Control + } + return res +} diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/doc.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/doc.go new file mode 100644 index 0000000000..e8a5ac8900 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/doc.go @@ -0,0 +1,27 @@ +// The pubsub package provides facilities for the Publish/Subscribe pattern of message +// propagation, also known as overlay multicast. +// The implementation provides topic-based pubsub, with pluggable routing algorithms. +// +// The main interface to the library is the PubSub object. +// You can construct this object with the following constructors: +// +// - NewFloodSub creates an instance that uses the floodsub routing algorithm. +// +// - NewGossipSub creates an instance that uses the gossipsub routing algorithm. +// +// - NewRandomSub creates an instance that uses the randomsub routing algorithm. +// +// In addition, there is a generic constructor that creates a pubsub instance with +// a custom PubSubRouter interface. This procedure is currently reserved for internal +// use within the package. +// +// Once you have constructed a PubSub instance, you need to establish some connections +// to your peers; the implementation relies on ambient peer discovery, leaving bootstrap +// and active peer discovery up to the client. +// +// To publish a message to some topic, use Publish; you don't need to be subscribed +// to the topic in order to publish. +// +// To subscribe to a topic, use Subscribe; this will give you a subscription interface +// from which new messages can be pumped. +package pubsub diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/floodsub.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/floodsub.go similarity index 87% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/floodsub.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/floodsub.go index 1921c5c391..16dc0afcb5 100644 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/floodsub.go +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/floodsub.go @@ -3,18 +3,18 @@ package pubsub import ( "context" - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" ) const ( FloodSubID = protocol.ID("/floodsub/1.0.0") ) -// NewFloodsubWithProtocols returns a new floodsub-enabled PubSub objecting using the protocols specified in ps +// NewFloodsubWithProtocols returns a new floodsub-enabled PubSub objecting using the protocols specified in ps. func NewFloodsubWithProtocols(ctx context.Context, h host.Host, ps []protocol.ID, opts ...Option) (*PubSub, error) { rt := &FloodSubRouter{ protocols: ps, @@ -22,7 +22,7 @@ func NewFloodsubWithProtocols(ctx context.Context, h host.Host, ps []protocol.ID return NewPubSub(ctx, h, rt, opts...) } -// NewFloodSub returns a new PubSub object using the FloodSubRouter +// NewFloodSub returns a new PubSub object using the FloodSubRouter. func NewFloodSub(ctx context.Context, h host.Host, opts ...Option) (*PubSub, error) { return NewFloodsubWithProtocols(ctx, h, []protocol.ID{FloodSubID}, opts...) } diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/gossipsub.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/gossipsub.go similarity index 98% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/gossipsub.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/gossipsub.go index 370d15ee8b..7d7ac78e42 100644 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/gossipsub.go +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/gossipsub.go @@ -6,11 +6,11 @@ import ( "math/rand" "time" - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" ) const ( @@ -35,7 +35,7 @@ var ( GossipSubFanoutTTL = 60 * time.Second ) -// NewGossipSub returns a new PubSub object using GossipSubRouter as the router +// NewGossipSub returns a new PubSub object using GossipSubRouter as the router. func NewGossipSub(ctx context.Context, h host.Host, opts ...Option) (*PubSub, error) { rt := &GossipSubRouter{ peers: make(map[peer.ID]protocol.ID), diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/mcache.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/mcache.go similarity index 94% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/mcache.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/mcache.go index 20d338765f..3f42e503b4 100644 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/mcache.go +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/mcache.go @@ -1,7 +1,7 @@ package pubsub import ( - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" ) func NewMessageCache(gossip, history int) *MessageCache { diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/notify.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/notify.go new file mode 100644 index 0000000000..6ff2563ce2 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/notify.go @@ -0,0 +1,34 @@ +package pubsub + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" +) + +var _ inet.Notifiee = (*PubSubNotif)(nil) + +type PubSubNotif PubSub + +func (p *PubSubNotif) OpenedStream(n inet.Network, s inet.Stream) { +} + +func (p *PubSubNotif) ClosedStream(n inet.Network, s inet.Stream) { +} + +func (p *PubSubNotif) Connected(n inet.Network, c inet.Conn) { + go func() { + select { + case p.newPeers <- c.RemotePeer(): + case <-p.ctx.Done(): + } + }() +} + +func (p *PubSubNotif) Disconnected(n inet.Network, c inet.Conn) { +} + +func (p *PubSubNotif) Listen(n inet.Network, _ ma.Multiaddr) { +} + +func (p *PubSubNotif) ListenClose(n inet.Network, _ ma.Multiaddr) { +} diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/package.json b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/package.json new file mode 100644 index 0000000000..b6ad15e9e1 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/package.json @@ -0,0 +1,95 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-pubsub" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-pubsub" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b", + "name": "timecache", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "author": "hashicorp", + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + } + ], + "gxVersion": "0.9.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-pubsub", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.11.15" +} + diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/Makefile b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/Makefile rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/Makefile diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/rpc.pb.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/rpc.pb.go similarity index 91% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/rpc.pb.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/rpc.pb.go index 78a1f668b2..3625df209a 100644 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/rpc.pb.go +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/rpc.pb.go @@ -3,11 +3,12 @@ package pubsub_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -33,6 +34,7 @@ var TopicDescriptor_AuthOpts_AuthMode_name = map[int32]string{ 1: "KEY", 2: "WOT", } + var TopicDescriptor_AuthOpts_AuthMode_value = map[string]int32{ "NONE": 0, "KEY": 1, @@ -44,9 +46,11 @@ func (x TopicDescriptor_AuthOpts_AuthMode) Enum() *TopicDescriptor_AuthOpts_Auth *p = x return p } + func (x TopicDescriptor_AuthOpts_AuthMode) String() string { return proto.EnumName(TopicDescriptor_AuthOpts_AuthMode_name, int32(x)) } + func (x *TopicDescriptor_AuthOpts_AuthMode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(TopicDescriptor_AuthOpts_AuthMode_value, data, "TopicDescriptor_AuthOpts_AuthMode") if err != nil { @@ -55,8 +59,9 @@ func (x *TopicDescriptor_AuthOpts_AuthMode) UnmarshalJSON(data []byte) error { *x = TopicDescriptor_AuthOpts_AuthMode(value) return nil } + func (TopicDescriptor_AuthOpts_AuthMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{7, 0, 0} + return fileDescriptor_77a6da22d6a3feb1, []int{7, 0, 0} } type TopicDescriptor_EncOpts_EncMode int32 @@ -72,6 +77,7 @@ var TopicDescriptor_EncOpts_EncMode_name = map[int32]string{ 1: "SHAREDKEY", 2: "WOT", } + var TopicDescriptor_EncOpts_EncMode_value = map[string]int32{ "NONE": 0, "SHAREDKEY": 1, @@ -83,9 +89,11 @@ func (x TopicDescriptor_EncOpts_EncMode) Enum() *TopicDescriptor_EncOpts_EncMode *p = x return p } + func (x TopicDescriptor_EncOpts_EncMode) String() string { return proto.EnumName(TopicDescriptor_EncOpts_EncMode_name, int32(x)) } + func (x *TopicDescriptor_EncOpts_EncMode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(TopicDescriptor_EncOpts_EncMode_value, data, "TopicDescriptor_EncOpts_EncMode") if err != nil { @@ -94,8 +102,9 @@ func (x *TopicDescriptor_EncOpts_EncMode) UnmarshalJSON(data []byte) error { *x = TopicDescriptor_EncOpts_EncMode(value) return nil } + func (TopicDescriptor_EncOpts_EncMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{7, 1, 0} + return fileDescriptor_77a6da22d6a3feb1, []int{7, 1, 0} } type RPC struct { @@ -111,7 +120,7 @@ func (m *RPC) Reset() { *m = RPC{} } func (m *RPC) String() string { return proto.CompactTextString(m) } func (*RPC) ProtoMessage() {} func (*RPC) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{0} + return fileDescriptor_77a6da22d6a3feb1, []int{0} } func (m *RPC) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -128,8 +137,8 @@ func (m *RPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *RPC) XXX_Merge(src proto.Message) { - xxx_messageInfo_RPC.Merge(dst, src) +func (m *RPC) XXX_Merge(src proto.Message) { + xxx_messageInfo_RPC.Merge(m, src) } func (m *RPC) XXX_Size() int { return m.Size() @@ -173,7 +182,7 @@ func (m *RPC_SubOpts) Reset() { *m = RPC_SubOpts{} } func (m *RPC_SubOpts) String() string { return proto.CompactTextString(m) } func (*RPC_SubOpts) ProtoMessage() {} func (*RPC_SubOpts) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{0, 0} + return fileDescriptor_77a6da22d6a3feb1, []int{0, 0} } func (m *RPC_SubOpts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,8 +199,8 @@ func (m *RPC_SubOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *RPC_SubOpts) XXX_Merge(src proto.Message) { - xxx_messageInfo_RPC_SubOpts.Merge(dst, src) +func (m *RPC_SubOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_RPC_SubOpts.Merge(m, src) } func (m *RPC_SubOpts) XXX_Size() int { return m.Size() @@ -232,7 +241,7 @@ func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{1} + return fileDescriptor_77a6da22d6a3feb1, []int{1} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -249,8 +258,8 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(dst, src) +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) } func (m *Message) XXX_Size() int { return m.Size() @@ -317,7 +326,7 @@ func (m *ControlMessage) Reset() { *m = ControlMessage{} } func (m *ControlMessage) String() string { return proto.CompactTextString(m) } func (*ControlMessage) ProtoMessage() {} func (*ControlMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{2} + return fileDescriptor_77a6da22d6a3feb1, []int{2} } func (m *ControlMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -334,8 +343,8 @@ func (m *ControlMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (dst *ControlMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControlMessage.Merge(dst, src) +func (m *ControlMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlMessage.Merge(m, src) } func (m *ControlMessage) XXX_Size() int { return m.Size() @@ -386,7 +395,7 @@ func (m *ControlIHave) Reset() { *m = ControlIHave{} } func (m *ControlIHave) String() string { return proto.CompactTextString(m) } func (*ControlIHave) ProtoMessage() {} func (*ControlIHave) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{3} + return fileDescriptor_77a6da22d6a3feb1, []int{3} } func (m *ControlIHave) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -403,8 +412,8 @@ func (m *ControlIHave) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *ControlIHave) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControlIHave.Merge(dst, src) +func (m *ControlIHave) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlIHave.Merge(m, src) } func (m *ControlIHave) XXX_Size() int { return m.Size() @@ -440,7 +449,7 @@ func (m *ControlIWant) Reset() { *m = ControlIWant{} } func (m *ControlIWant) String() string { return proto.CompactTextString(m) } func (*ControlIWant) ProtoMessage() {} func (*ControlIWant) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{4} + return fileDescriptor_77a6da22d6a3feb1, []int{4} } func (m *ControlIWant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -457,8 +466,8 @@ func (m *ControlIWant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *ControlIWant) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControlIWant.Merge(dst, src) +func (m *ControlIWant) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlIWant.Merge(m, src) } func (m *ControlIWant) XXX_Size() int { return m.Size() @@ -487,7 +496,7 @@ func (m *ControlGraft) Reset() { *m = ControlGraft{} } func (m *ControlGraft) String() string { return proto.CompactTextString(m) } func (*ControlGraft) ProtoMessage() {} func (*ControlGraft) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{5} + return fileDescriptor_77a6da22d6a3feb1, []int{5} } func (m *ControlGraft) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -504,8 +513,8 @@ func (m *ControlGraft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *ControlGraft) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControlGraft.Merge(dst, src) +func (m *ControlGraft) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlGraft.Merge(m, src) } func (m *ControlGraft) XXX_Size() int { return m.Size() @@ -534,7 +543,7 @@ func (m *ControlPrune) Reset() { *m = ControlPrune{} } func (m *ControlPrune) String() string { return proto.CompactTextString(m) } func (*ControlPrune) ProtoMessage() {} func (*ControlPrune) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{6} + return fileDescriptor_77a6da22d6a3feb1, []int{6} } func (m *ControlPrune) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,8 +560,8 @@ func (m *ControlPrune) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *ControlPrune) XXX_Merge(src proto.Message) { - xxx_messageInfo_ControlPrune.Merge(dst, src) +func (m *ControlPrune) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlPrune.Merge(m, src) } func (m *ControlPrune) XXX_Size() int { return m.Size() @@ -583,7 +592,7 @@ func (m *TopicDescriptor) Reset() { *m = TopicDescriptor{} } func (m *TopicDescriptor) String() string { return proto.CompactTextString(m) } func (*TopicDescriptor) ProtoMessage() {} func (*TopicDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{7} + return fileDescriptor_77a6da22d6a3feb1, []int{7} } func (m *TopicDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -600,8 +609,8 @@ func (m *TopicDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (dst *TopicDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopicDescriptor.Merge(dst, src) +func (m *TopicDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor.Merge(m, src) } func (m *TopicDescriptor) XXX_Size() int { return m.Size() @@ -645,7 +654,7 @@ func (m *TopicDescriptor_AuthOpts) Reset() { *m = TopicDescriptor_AuthOp func (m *TopicDescriptor_AuthOpts) String() string { return proto.CompactTextString(m) } func (*TopicDescriptor_AuthOpts) ProtoMessage() {} func (*TopicDescriptor_AuthOpts) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{7, 0} + return fileDescriptor_77a6da22d6a3feb1, []int{7, 0} } func (m *TopicDescriptor_AuthOpts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,8 +671,8 @@ func (m *TopicDescriptor_AuthOpts) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (dst *TopicDescriptor_AuthOpts) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopicDescriptor_AuthOpts.Merge(dst, src) +func (m *TopicDescriptor_AuthOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor_AuthOpts.Merge(m, src) } func (m *TopicDescriptor_AuthOpts) XXX_Size() int { return m.Size() @@ -700,7 +709,7 @@ func (m *TopicDescriptor_EncOpts) Reset() { *m = TopicDescriptor_EncOpts func (m *TopicDescriptor_EncOpts) String() string { return proto.CompactTextString(m) } func (*TopicDescriptor_EncOpts) ProtoMessage() {} func (*TopicDescriptor_EncOpts) Descriptor() ([]byte, []int) { - return fileDescriptor_rpc_f0491c6c9ffa591d, []int{7, 1} + return fileDescriptor_77a6da22d6a3feb1, []int{7, 1} } func (m *TopicDescriptor_EncOpts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -717,8 +726,8 @@ func (m *TopicDescriptor_EncOpts) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (dst *TopicDescriptor_EncOpts) XXX_Merge(src proto.Message) { - xxx_messageInfo_TopicDescriptor_EncOpts.Merge(dst, src) +func (m *TopicDescriptor_EncOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor_EncOpts.Merge(m, src) } func (m *TopicDescriptor_EncOpts) XXX_Size() int { return m.Size() @@ -744,6 +753,8 @@ func (m *TopicDescriptor_EncOpts) GetKeyHashes() [][]byte { } func init() { + proto.RegisterEnum("pubsub.pb.TopicDescriptor_AuthOpts_AuthMode", TopicDescriptor_AuthOpts_AuthMode_name, TopicDescriptor_AuthOpts_AuthMode_value) + proto.RegisterEnum("pubsub.pb.TopicDescriptor_EncOpts_EncMode", TopicDescriptor_EncOpts_EncMode_name, TopicDescriptor_EncOpts_EncMode_value) proto.RegisterType((*RPC)(nil), "pubsub.pb.RPC") proto.RegisterType((*RPC_SubOpts)(nil), "pubsub.pb.RPC.SubOpts") proto.RegisterType((*Message)(nil), "pubsub.pb.Message") @@ -755,9 +766,52 @@ func init() { proto.RegisterType((*TopicDescriptor)(nil), "pubsub.pb.TopicDescriptor") proto.RegisterType((*TopicDescriptor_AuthOpts)(nil), "pubsub.pb.TopicDescriptor.AuthOpts") proto.RegisterType((*TopicDescriptor_EncOpts)(nil), "pubsub.pb.TopicDescriptor.EncOpts") - proto.RegisterEnum("pubsub.pb.TopicDescriptor_AuthOpts_AuthMode", TopicDescriptor_AuthOpts_AuthMode_name, TopicDescriptor_AuthOpts_AuthMode_value) - proto.RegisterEnum("pubsub.pb.TopicDescriptor_EncOpts_EncMode", TopicDescriptor_EncOpts_EncMode_name, TopicDescriptor_EncOpts_EncMode_value) } + +func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } + +var fileDescriptor_77a6da22d6a3feb1 = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xd9, 0x38, 0xc5, 0xf1, 0xd4, 0x2d, 0xd1, 0x0a, 0x81, 0x89, 0xaa, 0x28, 0x32, 0x12, + 0xb2, 0xa0, 0xf8, 0x10, 0x90, 0xb8, 0x20, 0x44, 0x69, 0x22, 0x12, 0xa1, 0x7e, 0x68, 0x5b, 0xa9, + 0xe2, 0xb8, 0x76, 0xb6, 0x89, 0x95, 0xc6, 0x36, 0xf6, 0xba, 0x28, 0x6f, 0xc0, 0x1d, 0x9e, 0x85, + 0x67, 0xe0, 0xc0, 0x81, 0x47, 0x40, 0xb9, 0xf1, 0x16, 0x68, 0xc7, 0x4e, 0xe2, 0xa4, 0x1f, 0x70, + 0xf2, 0xec, 0xec, 0xef, 0xbf, 0xf3, 0x9f, 0xd9, 0x35, 0x18, 0x49, 0xec, 0xbb, 0x71, 0x12, 0xc9, + 0x88, 0x1a, 0x71, 0xe6, 0xa5, 0x99, 0xe7, 0xc6, 0x9e, 0xfd, 0x87, 0x80, 0xc6, 0x8e, 0xf7, 0xe9, + 0x6b, 0xd8, 0x4a, 0x33, 0x2f, 0xf5, 0x93, 0x20, 0x96, 0x41, 0x14, 0xa6, 0x16, 0x69, 0x69, 0xce, + 0x66, 0xfb, 0x81, 0xbb, 0x40, 0x5d, 0x76, 0xbc, 0xef, 0x9e, 0x64, 0xde, 0x51, 0x2c, 0x53, 0xb6, + 0x0a, 0xd3, 0x5d, 0xd0, 0xe3, 0xcc, 0xbb, 0x08, 0xd2, 0x91, 0x55, 0x41, 0x1d, 0x2d, 0xe9, 0x0e, + 0x44, 0x9a, 0xf2, 0xa1, 0x60, 0x73, 0x84, 0xbe, 0x00, 0xdd, 0x8f, 0x42, 0x99, 0x44, 0x17, 0x96, + 0xd6, 0x22, 0xce, 0x66, 0xfb, 0x51, 0x89, 0xde, 0xcf, 0x77, 0x16, 0xa2, 0x82, 0x6c, 0xec, 0x81, + 0x5e, 0x14, 0xa7, 0x3b, 0x60, 0x14, 0xe5, 0x3d, 0x61, 0x91, 0x16, 0x71, 0x6a, 0x6c, 0x99, 0xa0, + 0x16, 0xe8, 0x32, 0x8a, 0x03, 0x3f, 0x18, 0x58, 0x95, 0x16, 0x71, 0x0c, 0x36, 0x5f, 0xda, 0x5f, + 0x09, 0xe8, 0xc5, 0xb9, 0x94, 0x42, 0xf5, 0x3c, 0x89, 0x26, 0x28, 0x37, 0x19, 0xc6, 0x2a, 0x37, + 0xe0, 0x92, 0xa3, 0xcc, 0x64, 0x18, 0xd3, 0xfb, 0xb0, 0x91, 0x8a, 0x4f, 0x61, 0x84, 0x4e, 0x4d, + 0x96, 0x2f, 0x68, 0x03, 0x6a, 0x78, 0x68, 0xbf, 0x93, 0x5a, 0xd5, 0x96, 0xe6, 0x18, 0x6c, 0xb1, + 0x46, 0x77, 0xc1, 0x30, 0xe4, 0x32, 0x4b, 0x84, 0xb5, 0x81, 0xaa, 0x65, 0x82, 0xd6, 0x41, 0x1b, + 0x8b, 0xa9, 0x75, 0x17, 0xf3, 0x2a, 0xb4, 0x7f, 0x12, 0xd8, 0x5e, 0x6d, 0x9a, 0x3e, 0x87, 0x8d, + 0x60, 0xc4, 0x2f, 0x45, 0x71, 0x09, 0x0f, 0xaf, 0x8e, 0xa7, 0xdf, 0xe3, 0x97, 0x82, 0xe5, 0x14, + 0xe2, 0x9f, 0x79, 0x28, 0x8b, 0xd9, 0x5f, 0x87, 0x9f, 0xf1, 0x50, 0xb2, 0x9c, 0x52, 0xf8, 0x30, + 0xe1, 0xe7, 0xd2, 0xd2, 0x6e, 0xc2, 0xdf, 0xab, 0x6d, 0x96, 0x53, 0x0a, 0x8f, 0x93, 0x2c, 0x14, + 0xd8, 0xe8, 0xb5, 0xf8, 0xb1, 0xda, 0x66, 0x39, 0x65, 0xf7, 0xc0, 0x2c, 0x7b, 0x5c, 0x5c, 0x47, + 0xbf, 0x83, 0xb3, 0x9e, 0x5f, 0x47, 0xbf, 0x43, 0x9b, 0x00, 0x93, 0xbc, 0x61, 0x35, 0xc6, 0x0a, + 0x8e, 0xb1, 0x94, 0xb1, 0xdd, 0xe5, 0x49, 0xca, 0xfe, 0x1a, 0x4f, 0xae, 0xf0, 0xce, 0x82, 0x47, + 0xff, 0x37, 0x57, 0x2e, 0x91, 0x68, 0xfd, 0x16, 0xf2, 0xbb, 0x06, 0xf7, 0x4e, 0x55, 0xdc, 0x11, + 0xf9, 0x73, 0x8f, 0x12, 0xf5, 0x4c, 0x42, 0x3e, 0x11, 0x05, 0x8a, 0x31, 0x7d, 0x05, 0x55, 0x9e, + 0xc9, 0x11, 0x3e, 0x9d, 0xcd, 0xf6, 0xe3, 0xd2, 0x8c, 0xd6, 0xd4, 0xee, 0x5e, 0x26, 0x47, 0xf8, + 0x0b, 0xa1, 0x80, 0xbe, 0x04, 0x4d, 0x84, 0x7e, 0xf1, 0x1f, 0xd8, 0xb7, 0xe8, 0xba, 0xa1, 0x8f, + 0x32, 0x85, 0x37, 0xbe, 0x10, 0xa8, 0xcd, 0x0f, 0xa2, 0x6f, 0xa1, 0x3a, 0x89, 0x06, 0xb9, 0x9f, + 0xed, 0xf6, 0xee, 0x7f, 0xd4, 0xc6, 0xe0, 0x20, 0x1a, 0x08, 0x86, 0x4a, 0xd5, 0xd1, 0x58, 0x4c, + 0xf3, 0x3b, 0x30, 0x19, 0xc6, 0xf6, 0x93, 0xbc, 0x82, 0xa2, 0x68, 0x0d, 0xaa, 0x87, 0x47, 0x87, + 0xdd, 0xfa, 0x1d, 0xaa, 0x83, 0xf6, 0xa1, 0xfb, 0xb1, 0x4e, 0x54, 0x70, 0x76, 0x74, 0x5a, 0xaf, + 0x34, 0xbe, 0x11, 0xd0, 0x0b, 0x6f, 0xf4, 0xcd, 0x8a, 0x93, 0xa7, 0xff, 0xee, 0x46, 0x7d, 0x4b, + 0x3e, 0x76, 0xc0, 0x18, 0x8b, 0x69, 0x8f, 0xa7, 0x23, 0x31, 0x37, 0xb3, 0x4c, 0xd8, 0xcf, 0xb0, + 0xd0, 0x9a, 0xa1, 0x2d, 0x30, 0x4e, 0x7a, 0x7b, 0xac, 0xdb, 0x59, 0xb5, 0xf5, 0xce, 0xfc, 0x31, + 0x6b, 0x92, 0x5f, 0xb3, 0x26, 0xf9, 0x3d, 0x6b, 0x92, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, + 0xb0, 0xae, 0x4e, 0xfc, 0x04, 0x00, 0x00, +} + func (m *RPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1242,6 +1296,9 @@ func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *RPC) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Subscriptions) > 0 { @@ -1267,6 +1324,9 @@ func (m *RPC) Size() (n int) { } func (m *RPC_SubOpts) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Subscribe != nil { @@ -1283,6 +1343,9 @@ func (m *RPC_SubOpts) Size() (n int) { } func (m *Message) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.From != nil { @@ -1318,6 +1381,9 @@ func (m *Message) Size() (n int) { } func (m *ControlMessage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Ihave) > 0 { @@ -1351,6 +1417,9 @@ func (m *ControlMessage) Size() (n int) { } func (m *ControlIHave) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TopicID != nil { @@ -1370,6 +1439,9 @@ func (m *ControlIHave) Size() (n int) { } func (m *ControlIWant) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.MessageIDs) > 0 { @@ -1385,6 +1457,9 @@ func (m *ControlIWant) Size() (n int) { } func (m *ControlGraft) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TopicID != nil { @@ -1398,6 +1473,9 @@ func (m *ControlGraft) Size() (n int) { } func (m *ControlPrune) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TopicID != nil { @@ -1411,6 +1489,9 @@ func (m *ControlPrune) Size() (n int) { } func (m *TopicDescriptor) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Name != nil { @@ -1432,6 +1513,9 @@ func (m *TopicDescriptor) Size() (n int) { } func (m *TopicDescriptor_AuthOpts) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Mode != nil { @@ -1450,6 +1534,9 @@ func (m *TopicDescriptor_AuthOpts) Size() (n int) { } func (m *TopicDescriptor_EncOpts) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Mode != nil { @@ -1495,7 +1582,7 @@ func (m *RPC) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1523,7 +1610,7 @@ func (m *RPC) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1532,6 +1619,9 @@ func (m *RPC) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1554,7 +1644,7 @@ func (m *RPC) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1563,6 +1653,9 @@ func (m *RPC) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1585,7 +1678,7 @@ func (m *RPC) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1594,6 +1687,9 @@ func (m *RPC) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1613,6 +1709,9 @@ func (m *RPC) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1641,7 +1740,7 @@ func (m *RPC_SubOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1669,7 +1768,7 @@ func (m *RPC_SubOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1690,7 +1789,7 @@ func (m *RPC_SubOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1700,6 +1799,9 @@ func (m *RPC_SubOpts) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1715,6 +1817,9 @@ func (m *RPC_SubOpts) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1743,7 +1848,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1771,7 +1876,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1780,6 +1885,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1802,7 +1910,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1811,6 +1919,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1833,7 +1944,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1842,6 +1953,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1864,7 +1978,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1874,6 +1988,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1893,7 +2010,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1902,6 +2019,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1924,7 +2044,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1933,6 +2053,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1950,6 +2073,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1978,7 +2104,7 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2006,7 +2132,7 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2015,6 +2141,9 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2037,7 +2166,7 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2046,6 +2175,9 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2068,7 +2200,7 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2077,6 +2209,9 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2099,7 +2234,7 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2108,6 +2243,9 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2125,6 +2263,9 @@ func (m *ControlMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2153,7 +2294,7 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2181,7 +2322,7 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2191,6 +2332,9 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2211,7 +2355,7 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2221,6 +2365,9 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2235,6 +2382,9 @@ func (m *ControlIHave) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2263,7 +2413,7 @@ func (m *ControlIWant) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2291,7 +2441,7 @@ func (m *ControlIWant) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2301,6 +2451,9 @@ func (m *ControlIWant) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2315,6 +2468,9 @@ func (m *ControlIWant) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2343,7 +2499,7 @@ func (m *ControlGraft) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2371,7 +2527,7 @@ func (m *ControlGraft) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2381,6 +2537,9 @@ func (m *ControlGraft) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2396,6 +2555,9 @@ func (m *ControlGraft) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2424,7 +2586,7 @@ func (m *ControlPrune) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2452,7 +2614,7 @@ func (m *ControlPrune) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2462,6 +2624,9 @@ func (m *ControlPrune) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2477,6 +2642,9 @@ func (m *ControlPrune) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2505,7 +2673,7 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2533,7 +2701,7 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2543,6 +2711,9 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2563,7 +2734,7 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2572,6 +2743,9 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2596,7 +2770,7 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2605,6 +2779,9 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2624,6 +2801,9 @@ func (m *TopicDescriptor) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2652,7 +2832,7 @@ func (m *TopicDescriptor_AuthOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2680,7 +2860,7 @@ func (m *TopicDescriptor_AuthOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (TopicDescriptor_AuthOpts_AuthMode(b) & 0x7F) << shift + v |= TopicDescriptor_AuthOpts_AuthMode(b&0x7F) << shift if b < 0x80 { break } @@ -2700,7 +2880,7 @@ func (m *TopicDescriptor_AuthOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2709,6 +2889,9 @@ func (m *TopicDescriptor_AuthOpts) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2724,6 +2907,9 @@ func (m *TopicDescriptor_AuthOpts) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2752,7 +2938,7 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2780,7 +2966,7 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (TopicDescriptor_EncOpts_EncMode(b) & 0x7F) << shift + v |= TopicDescriptor_EncOpts_EncMode(b&0x7F) << shift if b < 0x80 { break } @@ -2800,7 +2986,7 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2809,6 +2995,9 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRpc } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2824,6 +3013,9 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRpc } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRpc + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2891,10 +3083,13 @@ func skipRpc(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthRpc } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthRpc + } return iNdEx, nil case 3: for { @@ -2923,6 +3118,9 @@ func skipRpc(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthRpc + } } return iNdEx, nil case 4: @@ -2941,47 +3139,3 @@ var ( ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("rpc.proto", fileDescriptor_rpc_f0491c6c9ffa591d) } - -var fileDescriptor_rpc_f0491c6c9ffa591d = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xd9, 0x38, 0xc5, 0xf1, 0xd4, 0x2d, 0xd1, 0x0a, 0x81, 0x89, 0xaa, 0x28, 0x32, 0x12, - 0xb2, 0xa0, 0xf8, 0x10, 0x90, 0xb8, 0x20, 0x44, 0x69, 0x22, 0x12, 0xa1, 0x7e, 0x68, 0x5b, 0xa9, - 0xe2, 0xb8, 0x76, 0xb6, 0x89, 0x95, 0xc6, 0x36, 0xf6, 0xba, 0x28, 0x6f, 0xc0, 0x1d, 0x9e, 0x85, - 0x67, 0xe0, 0xc0, 0x81, 0x47, 0x40, 0xb9, 0xf1, 0x16, 0x68, 0xc7, 0x4e, 0xe2, 0xa4, 0x1f, 0x70, - 0xf2, 0xec, 0xec, 0xef, 0xbf, 0xf3, 0x9f, 0xd9, 0x35, 0x18, 0x49, 0xec, 0xbb, 0x71, 0x12, 0xc9, - 0x88, 0x1a, 0x71, 0xe6, 0xa5, 0x99, 0xe7, 0xc6, 0x9e, 0xfd, 0x87, 0x80, 0xc6, 0x8e, 0xf7, 0xe9, - 0x6b, 0xd8, 0x4a, 0x33, 0x2f, 0xf5, 0x93, 0x20, 0x96, 0x41, 0x14, 0xa6, 0x16, 0x69, 0x69, 0xce, - 0x66, 0xfb, 0x81, 0xbb, 0x40, 0x5d, 0x76, 0xbc, 0xef, 0x9e, 0x64, 0xde, 0x51, 0x2c, 0x53, 0xb6, - 0x0a, 0xd3, 0x5d, 0xd0, 0xe3, 0xcc, 0xbb, 0x08, 0xd2, 0x91, 0x55, 0x41, 0x1d, 0x2d, 0xe9, 0x0e, - 0x44, 0x9a, 0xf2, 0xa1, 0x60, 0x73, 0x84, 0xbe, 0x00, 0xdd, 0x8f, 0x42, 0x99, 0x44, 0x17, 0x96, - 0xd6, 0x22, 0xce, 0x66, 0xfb, 0x51, 0x89, 0xde, 0xcf, 0x77, 0x16, 0xa2, 0x82, 0x6c, 0xec, 0x81, - 0x5e, 0x14, 0xa7, 0x3b, 0x60, 0x14, 0xe5, 0x3d, 0x61, 0x91, 0x16, 0x71, 0x6a, 0x6c, 0x99, 0xa0, - 0x16, 0xe8, 0x32, 0x8a, 0x03, 0x3f, 0x18, 0x58, 0x95, 0x16, 0x71, 0x0c, 0x36, 0x5f, 0xda, 0x5f, - 0x09, 0xe8, 0xc5, 0xb9, 0x94, 0x42, 0xf5, 0x3c, 0x89, 0x26, 0x28, 0x37, 0x19, 0xc6, 0x2a, 0x37, - 0xe0, 0x92, 0xa3, 0xcc, 0x64, 0x18, 0xd3, 0xfb, 0xb0, 0x91, 0x8a, 0x4f, 0x61, 0x84, 0x4e, 0x4d, - 0x96, 0x2f, 0x68, 0x03, 0x6a, 0x78, 0x68, 0xbf, 0x93, 0x5a, 0xd5, 0x96, 0xe6, 0x18, 0x6c, 0xb1, - 0x46, 0x77, 0xc1, 0x30, 0xe4, 0x32, 0x4b, 0x84, 0xb5, 0x81, 0xaa, 0x65, 0x82, 0xd6, 0x41, 0x1b, - 0x8b, 0xa9, 0x75, 0x17, 0xf3, 0x2a, 0xb4, 0x7f, 0x12, 0xd8, 0x5e, 0x6d, 0x9a, 0x3e, 0x87, 0x8d, - 0x60, 0xc4, 0x2f, 0x45, 0x71, 0x09, 0x0f, 0xaf, 0x8e, 0xa7, 0xdf, 0xe3, 0x97, 0x82, 0xe5, 0x14, - 0xe2, 0x9f, 0x79, 0x28, 0x8b, 0xd9, 0x5f, 0x87, 0x9f, 0xf1, 0x50, 0xb2, 0x9c, 0x52, 0xf8, 0x30, - 0xe1, 0xe7, 0xd2, 0xd2, 0x6e, 0xc2, 0xdf, 0xab, 0x6d, 0x96, 0x53, 0x0a, 0x8f, 0x93, 0x2c, 0x14, - 0xd8, 0xe8, 0xb5, 0xf8, 0xb1, 0xda, 0x66, 0x39, 0x65, 0xf7, 0xc0, 0x2c, 0x7b, 0x5c, 0x5c, 0x47, - 0xbf, 0x83, 0xb3, 0x9e, 0x5f, 0x47, 0xbf, 0x43, 0x9b, 0x00, 0x93, 0xbc, 0x61, 0x35, 0xc6, 0x0a, - 0x8e, 0xb1, 0x94, 0xb1, 0xdd, 0xe5, 0x49, 0xca, 0xfe, 0x1a, 0x4f, 0xae, 0xf0, 0xce, 0x82, 0x47, - 0xff, 0x37, 0x57, 0x2e, 0x91, 0x68, 0xfd, 0x16, 0xf2, 0xbb, 0x06, 0xf7, 0x4e, 0x55, 0xdc, 0x11, - 0xf9, 0x73, 0x8f, 0x12, 0xf5, 0x4c, 0x42, 0x3e, 0x11, 0x05, 0x8a, 0x31, 0x7d, 0x05, 0x55, 0x9e, - 0xc9, 0x11, 0x3e, 0x9d, 0xcd, 0xf6, 0xe3, 0xd2, 0x8c, 0xd6, 0xd4, 0xee, 0x5e, 0x26, 0x47, 0xf8, - 0x0b, 0xa1, 0x80, 0xbe, 0x04, 0x4d, 0x84, 0x7e, 0xf1, 0x1f, 0xd8, 0xb7, 0xe8, 0xba, 0xa1, 0x8f, - 0x32, 0x85, 0x37, 0xbe, 0x10, 0xa8, 0xcd, 0x0f, 0xa2, 0x6f, 0xa1, 0x3a, 0x89, 0x06, 0xb9, 0x9f, - 0xed, 0xf6, 0xee, 0x7f, 0xd4, 0xc6, 0xe0, 0x20, 0x1a, 0x08, 0x86, 0x4a, 0xd5, 0xd1, 0x58, 0x4c, - 0xf3, 0x3b, 0x30, 0x19, 0xc6, 0xf6, 0x93, 0xbc, 0x82, 0xa2, 0x68, 0x0d, 0xaa, 0x87, 0x47, 0x87, - 0xdd, 0xfa, 0x1d, 0xaa, 0x83, 0xf6, 0xa1, 0xfb, 0xb1, 0x4e, 0x54, 0x70, 0x76, 0x74, 0x5a, 0xaf, - 0x34, 0xbe, 0x11, 0xd0, 0x0b, 0x6f, 0xf4, 0xcd, 0x8a, 0x93, 0xa7, 0xff, 0xee, 0x46, 0x7d, 0x4b, - 0x3e, 0x76, 0xc0, 0x18, 0x8b, 0x69, 0x8f, 0xa7, 0x23, 0x31, 0x37, 0xb3, 0x4c, 0xd8, 0xcf, 0xb0, - 0xd0, 0x9a, 0xa1, 0x2d, 0x30, 0x4e, 0x7a, 0x7b, 0xac, 0xdb, 0x59, 0xb5, 0xf5, 0xce, 0xfc, 0x31, - 0x6b, 0x92, 0x5f, 0xb3, 0x26, 0xf9, 0x3d, 0x6b, 0x92, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, - 0xb0, 0xae, 0x4e, 0xfc, 0x04, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/rpc.proto b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/rpc.proto similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/rpc.proto rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb/rpc.proto diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pubsub.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pubsub.go new file mode 100644 index 0000000000..c42a1c0672 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pubsub.go @@ -0,0 +1,1011 @@ +package pubsub + +import ( + "context" + "encoding/binary" + "fmt" + "math/rand" + "sync/atomic" + "time" + + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" + + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + timecache "gx/ipfs/QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b/timecache" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +const ( + defaultValidateTimeout = 150 * time.Millisecond + defaultValidateConcurrency = 100 + defaultValidateThrottle = 8192 +) + +var ( + TimeCacheDuration = 120 * time.Second +) + +var log = logging.Logger("pubsub") + +// PubSub is the implementation of the pubsub system. +type PubSub struct { + // atomic counter for seqnos + // NOTE: Must be declared at the top of the struct as we perform atomic + // operations on this field. + // + // See: https://golang.org/pkg/sync/atomic/#pkg-note-BUG + counter uint64 + + host host.Host + + rt PubSubRouter + + // incoming messages from other peers + incoming chan *RPC + + // messages we are publishing out to our peers + publish chan *Message + + // addSub is a control channel for us to add and remove subscriptions + addSub chan *addSubReq + + // get list of topics we are subscribed to + getTopics chan *topicReq + + // get chan of peers we are connected to + getPeers chan *listPeerReq + + // send subscription here to cancel it + cancelCh chan *Subscription + + // a notification channel for new peer connections + newPeers chan peer.ID + + // a notification channel for new outoging peer streams + newPeerStream chan inet.Stream + + // a notification channel for errors opening new peer streams + newPeerError chan peer.ID + + // a notification channel for when our peers die + peerDead chan peer.ID + + // The set of topics we are subscribed to + myTopics map[string]map[*Subscription]struct{} + + // topics tracks which topics each of our peers are subscribed to + topics map[string]map[peer.ID]struct{} + + // sendMsg handles messages that have been validated + sendMsg chan *sendReq + + // addVal handles validator registration requests + addVal chan *addValReq + + // rmVal handles validator unregistration requests + rmVal chan *rmValReq + + // topicVals tracks per topic validators + topicVals map[string]*topicVal + + // validateThrottle limits the number of active validation goroutines + validateThrottle chan struct{} + + // eval thunk in event loop + eval chan func() + + // peer blacklist + blacklist Blacklist + blacklistPeer chan peer.ID + + peers map[peer.ID]chan *RPC + seenMessages *timecache.TimeCache + + // key for signing messages; nil when signing is disabled (default for now) + signKey crypto.PrivKey + // source ID for signed messages; corresponds to signKey + signID peer.ID + // strict mode rejects all unsigned messages prior to validation + signStrict bool + + ctx context.Context +} + +// PubSubRouter is the message router component of PubSub. +type PubSubRouter interface { + // Protocols returns the list of protocols supported by the router. + Protocols() []protocol.ID + // Attach is invoked by the PubSub constructor to attach the router to a + // freshly initialized PubSub instance. + Attach(*PubSub) + // AddPeer notifies the router that a new peer has been connected. + AddPeer(peer.ID, protocol.ID) + // RemovePeer notifies the router that a peer has been disconnected. + RemovePeer(peer.ID) + // HandleRPC is invoked to process control messages in the RPC envelope. + // It is invoked after subscriptions and payload messages have been processed. + HandleRPC(*RPC) + // Publish is invoked to forward a new message that has been validated. + Publish(peer.ID, *pb.Message) + // Join notifies the router that we want to receive and forward messages in a topic. + // It is invoked after the subscription announcement. + Join(topic string) + // Leave notifies the router that we are no longer interested in a topic. + // It is invoked after the unsubscription announcement. + Leave(topic string) +} + +type Message struct { + *pb.Message +} + +func (m *Message) GetFrom() peer.ID { + return peer.ID(m.Message.GetFrom()) +} + +type RPC struct { + pb.RPC + + // unexported on purpose, not sending this over the wire + from peer.ID +} + +type Option func(*PubSub) error + +// NewPubSub returns a new PubSub management object. +func NewPubSub(ctx context.Context, h host.Host, rt PubSubRouter, opts ...Option) (*PubSub, error) { + ps := &PubSub{ + host: h, + ctx: ctx, + rt: rt, + signID: h.ID(), + signKey: h.Peerstore().PrivKey(h.ID()), + incoming: make(chan *RPC, 32), + publish: make(chan *Message), + newPeers: make(chan peer.ID), + newPeerStream: make(chan inet.Stream), + newPeerError: make(chan peer.ID), + peerDead: make(chan peer.ID), + cancelCh: make(chan *Subscription), + getPeers: make(chan *listPeerReq), + addSub: make(chan *addSubReq), + getTopics: make(chan *topicReq), + sendMsg: make(chan *sendReq, 32), + addVal: make(chan *addValReq), + rmVal: make(chan *rmValReq), + validateThrottle: make(chan struct{}, defaultValidateThrottle), + eval: make(chan func()), + myTopics: make(map[string]map[*Subscription]struct{}), + topics: make(map[string]map[peer.ID]struct{}), + peers: make(map[peer.ID]chan *RPC), + topicVals: make(map[string]*topicVal), + blacklist: NewMapBlacklist(), + blacklistPeer: make(chan peer.ID), + seenMessages: timecache.NewTimeCache(TimeCacheDuration), + counter: uint64(time.Now().UnixNano()), + } + + for _, opt := range opts { + err := opt(ps) + if err != nil { + return nil, err + } + } + + if ps.signStrict && ps.signKey == nil { + return nil, fmt.Errorf("strict signature verification enabled but message signing is disabled") + } + + rt.Attach(ps) + + for _, id := range rt.Protocols() { + h.SetStreamHandler(id, ps.handleNewStream) + } + h.Network().Notify((*PubSubNotif)(ps)) + + go ps.processLoop(ctx) + + return ps, nil +} + +// WithValidateThrottle sets the upper bound on the number of active validation +// goroutines. +func WithValidateThrottle(n int) Option { + return func(ps *PubSub) error { + ps.validateThrottle = make(chan struct{}, n) + return nil + } +} + +// WithMessageSigning enables or disables message signing (enabled by default). +func WithMessageSigning(enabled bool) Option { + return func(p *PubSub) error { + if enabled { + p.signKey = p.host.Peerstore().PrivKey(p.signID) + if p.signKey == nil { + return fmt.Errorf("can't sign for peer %s: no private key", p.signID) + } + } else { + p.signKey = nil + } + return nil + } +} + +// WithMessageAuthor sets the author for outbound messages to the given peer ID +// (defaults to the host's ID). If message signing is enabled, the private key +// must be available in the host's peerstore. +func WithMessageAuthor(author peer.ID) Option { + return func(p *PubSub) error { + if author == "" { + author = p.host.ID() + } + if p.signKey != nil { + newSignKey := p.host.Peerstore().PrivKey(author) + if newSignKey == nil { + return fmt.Errorf("can't sign for peer %s: no private key", p.signID) + } + p.signKey = newSignKey + } + p.signID = author + return nil + } +} + +// WithStrictSignatureVerification enforces message signing. If set, unsigned +// messages will be discarded. +// +// This currently defaults to false but, as we transition to signing by default, +// will eventually default to true. +func WithStrictSignatureVerification(required bool) Option { + return func(p *PubSub) error { + p.signStrict = required + return nil + } +} + +// WithBlacklist provides an implementation of the blacklist; the default is a +// MapBlacklist +func WithBlacklist(b Blacklist) Option { + return func(p *PubSub) error { + p.blacklist = b + return nil + } +} + +// processLoop handles all inputs arriving on the channels +func (p *PubSub) processLoop(ctx context.Context) { + defer func() { + // Clean up go routines. + for _, ch := range p.peers { + close(ch) + } + p.peers = nil + p.topics = nil + }() + + for { + select { + case pid := <-p.newPeers: + if _, ok := p.peers[pid]; ok { + log.Warning("already have connection to peer: ", pid) + continue + } + + if p.blacklist.Contains(pid) { + log.Warning("ignoring connection from blacklisted peer: ", pid) + continue + } + + messages := make(chan *RPC, 32) + messages <- p.getHelloPacket() + go p.handleNewPeer(ctx, pid, messages) + p.peers[pid] = messages + + case s := <-p.newPeerStream: + pid := s.Conn().RemotePeer() + + ch, ok := p.peers[pid] + if !ok { + log.Warning("new stream for unknown peer: ", pid) + s.Reset() + continue + } + + if p.blacklist.Contains(pid) { + log.Warning("closing stream for blacklisted peer: ", pid) + close(ch) + s.Reset() + continue + } + + p.rt.AddPeer(pid, s.Protocol()) + + case pid := <-p.newPeerError: + delete(p.peers, pid) + + case pid := <-p.peerDead: + ch, ok := p.peers[pid] + if !ok { + continue + } + + close(ch) + + if p.host.Network().Connectedness(pid) == inet.Connected { + // still connected, must be a duplicate connection being closed. + // we respawn the writer as we need to ensure there is a stream active + log.Warning("peer declared dead but still connected; respawning writer: ", pid) + messages := make(chan *RPC, 32) + messages <- p.getHelloPacket() + go p.handleNewPeer(ctx, pid, messages) + p.peers[pid] = messages + continue + } + + delete(p.peers, pid) + for _, t := range p.topics { + delete(t, pid) + } + + p.rt.RemovePeer(pid) + + case treq := <-p.getTopics: + var out []string + for t := range p.myTopics { + out = append(out, t) + } + treq.resp <- out + case sub := <-p.cancelCh: + p.handleRemoveSubscription(sub) + case sub := <-p.addSub: + p.handleAddSubscription(sub) + case preq := <-p.getPeers: + tmap, ok := p.topics[preq.topic] + if preq.topic != "" && !ok { + preq.resp <- nil + continue + } + var peers []peer.ID + for p := range p.peers { + if preq.topic != "" { + _, ok := tmap[p] + if !ok { + continue + } + } + peers = append(peers, p) + } + preq.resp <- peers + case rpc := <-p.incoming: + p.handleIncomingRPC(rpc) + + case msg := <-p.publish: + vals := p.getValidators(msg) + p.pushMsg(vals, p.host.ID(), msg) + + case req := <-p.sendMsg: + p.publishMessage(req.from, req.msg.Message) + + case req := <-p.addVal: + p.addValidator(req) + + case req := <-p.rmVal: + p.rmValidator(req) + + case thunk := <-p.eval: + thunk() + + case pid := <-p.blacklistPeer: + log.Infof("Blacklisting peer %s", pid) + p.blacklist.Add(pid) + + ch, ok := p.peers[pid] + if ok { + close(ch) + delete(p.peers, pid) + for _, t := range p.topics { + delete(t, pid) + } + p.rt.RemovePeer(pid) + } + + case <-ctx.Done(): + log.Info("pubsub processloop shutting down") + return + } + } +} + +// handleRemoveSubscription removes Subscription sub from bookeeping. +// If this was the last Subscription for a given topic, it will also announce +// that this node is not subscribing to this topic anymore. +// Only called from processLoop. +func (p *PubSub) handleRemoveSubscription(sub *Subscription) { + subs := p.myTopics[sub.topic] + + if subs == nil { + return + } + + sub.err = fmt.Errorf("subscription cancelled by calling sub.Cancel()") + close(sub.ch) + delete(subs, sub) + + if len(subs) == 0 { + delete(p.myTopics, sub.topic) + p.announce(sub.topic, false) + p.rt.Leave(sub.topic) + } +} + +// handleAddSubscription adds a Subscription for a particular topic. If it is +// the first Subscription for the topic, it will announce that this node +// subscribes to the topic. +// Only called from processLoop. +func (p *PubSub) handleAddSubscription(req *addSubReq) { + sub := req.sub + subs := p.myTopics[sub.topic] + + // announce we want this topic + if len(subs) == 0 { + p.announce(sub.topic, true) + p.rt.Join(sub.topic) + } + + // make new if not there + if subs == nil { + p.myTopics[sub.topic] = make(map[*Subscription]struct{}) + subs = p.myTopics[sub.topic] + } + + sub.ch = make(chan *Message, 32) + sub.cancelCh = p.cancelCh + + p.myTopics[sub.topic][sub] = struct{}{} + + req.resp <- sub +} + +// announce announces whether or not this node is interested in a given topic +// Only called from processLoop. +func (p *PubSub) announce(topic string, sub bool) { + subopt := &pb.RPC_SubOpts{ + Topicid: &topic, + Subscribe: &sub, + } + + out := rpcWithSubs(subopt) + for pid, peer := range p.peers { + select { + case peer <- out: + default: + log.Infof("Can't send announce message to peer %s: queue full; scheduling retry", pid) + go p.announceRetry(pid, topic, sub) + } + } +} + +func (p *PubSub) announceRetry(pid peer.ID, topic string, sub bool) { + time.Sleep(time.Duration(1+rand.Intn(1000)) * time.Millisecond) + + retry := func() { + _, ok := p.myTopics[topic] + if (ok && sub) || (!ok && !sub) { + p.doAnnounceRetry(pid, topic, sub) + } + } + + select { + case p.eval <- retry: + case <-p.ctx.Done(): + } +} + +func (p *PubSub) doAnnounceRetry(pid peer.ID, topic string, sub bool) { + peer, ok := p.peers[pid] + if !ok { + return + } + + subopt := &pb.RPC_SubOpts{ + Topicid: &topic, + Subscribe: &sub, + } + + out := rpcWithSubs(subopt) + select { + case peer <- out: + default: + log.Infof("Can't send announce message to peer %s: queue full; scheduling retry", pid) + go p.announceRetry(pid, topic, sub) + } +} + +// notifySubs sends a given message to all corresponding subscribers. +// Only called from processLoop. +func (p *PubSub) notifySubs(msg *pb.Message) { + for _, topic := range msg.GetTopicIDs() { + subs := p.myTopics[topic] + for f := range subs { + select { + case f.ch <- &Message{msg}: + default: + log.Infof("Can't deliver message to subscription for topic %s; subscriber too slow", topic) + } + } + } +} + +// seenMessage returns whether we already saw this message before +func (p *PubSub) seenMessage(id string) bool { + return p.seenMessages.Has(id) +} + +// markSeen marks a message as seen such that seenMessage returns `true' for the given id +func (p *PubSub) markSeen(id string) { + p.seenMessages.Add(id) +} + +// subscribedToMessage returns whether we are subscribed to one of the topics +// of a given message +func (p *PubSub) subscribedToMsg(msg *pb.Message) bool { + if len(p.myTopics) == 0 { + return false + } + + for _, t := range msg.GetTopicIDs() { + if _, ok := p.myTopics[t]; ok { + return true + } + } + return false +} + +func (p *PubSub) handleIncomingRPC(rpc *RPC) { + for _, subopt := range rpc.GetSubscriptions() { + t := subopt.GetTopicid() + if subopt.GetSubscribe() { + tmap, ok := p.topics[t] + if !ok { + tmap = make(map[peer.ID]struct{}) + p.topics[t] = tmap + } + + tmap[rpc.from] = struct{}{} + } else { + tmap, ok := p.topics[t] + if !ok { + continue + } + delete(tmap, rpc.from) + } + } + + for _, pmsg := range rpc.GetPublish() { + if !p.subscribedToMsg(pmsg) { + log.Warning("received message we didn't subscribe to. Dropping.") + continue + } + + msg := &Message{pmsg} + vals := p.getValidators(msg) + p.pushMsg(vals, rpc.from, msg) + } + + p.rt.HandleRPC(rpc) +} + +// msgID returns a unique ID of the passed Message +func msgID(pmsg *pb.Message) string { + return string(pmsg.GetFrom()) + string(pmsg.GetSeqno()) +} + +// pushMsg pushes a message performing validation as necessary +func (p *PubSub) pushMsg(vals []*topicVal, src peer.ID, msg *Message) { + // reject messages from blacklisted peers + if p.blacklist.Contains(src) { + log.Warningf("dropping message from blacklisted peer %s", src) + return + } + + // even if they are forwarded by good peers + if p.blacklist.Contains(msg.GetFrom()) { + log.Warningf("dropping message from blacklisted source %s", src) + return + } + + // reject unsigned messages when strict before we even process the id + if p.signStrict && msg.Signature == nil { + log.Debugf("dropping unsigned message from %s", src) + return + } + + // have we already seen and validated this message? + id := msgID(msg.Message) + if p.seenMessage(id) { + return + } + + if len(vals) > 0 || msg.Signature != nil { + // validation is asynchronous and globally throttled with the throttleValidate semaphore. + // the purpose of the global throttle is to bound the goncurrency possible from incoming + // network traffic; each validator also has an individual throttle to preclude + // slow (or faulty) validators from starving other topics; see validate below. + select { + case p.validateThrottle <- struct{}{}: + go func() { + p.validate(vals, src, msg) + <-p.validateThrottle + }() + default: + log.Warningf("message validation throttled; dropping message from %s", src) + } + return + } + + p.publishMessage(src, msg.Message) +} + +// validate performs validation and only sends the message if all validators succeed +func (p *PubSub) validate(vals []*topicVal, src peer.ID, msg *Message) { + if msg.Signature != nil { + if !p.validateSignature(msg) { + log.Warningf("message signature validation failed; dropping message from %s", src) + return + } + } + + if len(vals) > 0 { + if !p.validateTopic(vals, src, msg) { + log.Warningf("message validation failed; dropping message from %s", src) + return + } + } + + // all validators were successful, send the message + p.sendMsg <- &sendReq{ + from: src, + msg: msg, + } +} + +func (p *PubSub) validateSignature(msg *Message) bool { + err := verifyMessageSignature(msg.Message) + if err != nil { + log.Debugf("signature verification error: %s", err.Error()) + return false + } + + return true +} + +func (p *PubSub) validateTopic(vals []*topicVal, src peer.ID, msg *Message) bool { + if len(vals) == 1 { + return p.validateSingleTopic(vals[0], src, msg) + } + + ctx, cancel := context.WithCancel(p.ctx) + defer cancel() + + rch := make(chan bool, len(vals)) + rcount := 0 + throttle := false + +loop: + for _, val := range vals { + rcount++ + + select { + case val.validateThrottle <- struct{}{}: + go func(val *topicVal) { + rch <- val.validateMsg(ctx, src, msg) + <-val.validateThrottle + }(val) + + default: + log.Debugf("validation throttled for topic %s", val.topic) + throttle = true + break loop + } + } + + if throttle { + return false + } + + for i := 0; i < rcount; i++ { + valid := <-rch + if !valid { + return false + } + } + + return true +} + +// fast path for single topic validation that avoids the extra goroutine +func (p *PubSub) validateSingleTopic(val *topicVal, src peer.ID, msg *Message) bool { + select { + case val.validateThrottle <- struct{}{}: + ctx, cancel := context.WithCancel(p.ctx) + defer cancel() + + res := val.validateMsg(ctx, src, msg) + <-val.validateThrottle + + return res + + default: + log.Debugf("validation throttled for topic %s", val.topic) + return false + } +} + +func (p *PubSub) publishMessage(from peer.ID, pmsg *pb.Message) { + id := msgID(pmsg) + if p.seenMessage(id) { + return + } + p.markSeen(id) + + p.notifySubs(pmsg) + p.rt.Publish(from, pmsg) +} + +// getValidators returns all validators that apply to a given message +func (p *PubSub) getValidators(msg *Message) []*topicVal { + var vals []*topicVal + + for _, topic := range msg.GetTopicIDs() { + val, ok := p.topicVals[topic] + if !ok { + continue + } + + vals = append(vals, val) + } + + return vals +} + +type addSubReq struct { + sub *Subscription + resp chan *Subscription +} + +type SubOpt func(sub *Subscription) error + +// Subscribe returns a new Subscription for the given topic. +// Note that subscription is not an instanteneous operation. It may take some time +// before the subscription is processed by the pubsub main loop and propagated to our peers. +func (p *PubSub) Subscribe(topic string, opts ...SubOpt) (*Subscription, error) { + td := pb.TopicDescriptor{Name: &topic} + + return p.SubscribeByTopicDescriptor(&td, opts...) +} + +// SubscribeByTopicDescriptor lets you subscribe a topic using a pb.TopicDescriptor. +func (p *PubSub) SubscribeByTopicDescriptor(td *pb.TopicDescriptor, opts ...SubOpt) (*Subscription, error) { + if td.GetAuth().GetMode() != pb.TopicDescriptor_AuthOpts_NONE { + return nil, fmt.Errorf("auth mode not yet supported") + } + + if td.GetEnc().GetMode() != pb.TopicDescriptor_EncOpts_NONE { + return nil, fmt.Errorf("encryption mode not yet supported") + } + + sub := &Subscription{ + topic: td.GetName(), + } + + for _, opt := range opts { + err := opt(sub) + if err != nil { + return nil, err + } + } + + out := make(chan *Subscription, 1) + p.addSub <- &addSubReq{ + sub: sub, + resp: out, + } + + return <-out, nil +} + +type topicReq struct { + resp chan []string +} + +// GetTopics returns the topics this node is subscribed to. +func (p *PubSub) GetTopics() []string { + out := make(chan []string, 1) + p.getTopics <- &topicReq{resp: out} + return <-out +} + +// Publish publishes data to the given topic. +func (p *PubSub) Publish(topic string, data []byte) error { + seqno := p.nextSeqno() + m := &pb.Message{ + Data: data, + TopicIDs: []string{topic}, + From: []byte(p.host.ID()), + Seqno: seqno, + } + if p.signKey != nil { + m.From = []byte(p.signID) + err := signMessage(p.signID, p.signKey, m) + if err != nil { + return err + } + } + p.publish <- &Message{m} + return nil +} + +func (p *PubSub) nextSeqno() []byte { + seqno := make([]byte, 8) + counter := atomic.AddUint64(&p.counter, 1) + binary.BigEndian.PutUint64(seqno, counter) + return seqno +} + +type listPeerReq struct { + resp chan []peer.ID + topic string +} + +// sendReq is a request to call publishMessage. +// It is issued after message validation is done. +type sendReq struct { + from peer.ID + msg *Message +} + +// ListPeers returns a list of peers we are connected to in the given topic. +func (p *PubSub) ListPeers(topic string) []peer.ID { + out := make(chan []peer.ID) + p.getPeers <- &listPeerReq{ + resp: out, + topic: topic, + } + return <-out +} + +// BlacklistPeer blacklists a peer; all messages from this peer will be unconditionally dropped. +func (p *PubSub) BlacklistPeer(pid peer.ID) { + p.blacklistPeer <- pid +} + +// per topic validators +type addValReq struct { + topic string + validate Validator + timeout time.Duration + throttle int + resp chan error +} + +type rmValReq struct { + topic string + resp chan error +} + +type topicVal struct { + topic string + validate Validator + validateTimeout time.Duration + validateThrottle chan struct{} +} + +// Validator is a function that validates a message. +type Validator func(context.Context, peer.ID, *Message) bool + +// ValidatorOpt is an option for RegisterTopicValidator. +type ValidatorOpt func(addVal *addValReq) error + +// WithValidatorTimeout is an option that sets the topic validator timeout. +func WithValidatorTimeout(timeout time.Duration) ValidatorOpt { + return func(addVal *addValReq) error { + addVal.timeout = timeout + return nil + } +} + +// WithValidatorConcurrency is an option that sets topic validator throttle. +func WithValidatorConcurrency(n int) ValidatorOpt { + return func(addVal *addValReq) error { + addVal.throttle = n + return nil + } +} + +// RegisterTopicValidator registers a validator for topic. +func (p *PubSub) RegisterTopicValidator(topic string, val Validator, opts ...ValidatorOpt) error { + addVal := &addValReq{ + topic: topic, + validate: val, + resp: make(chan error, 1), + } + + for _, opt := range opts { + err := opt(addVal) + if err != nil { + return err + } + } + + p.addVal <- addVal + return <-addVal.resp +} + +func (ps *PubSub) addValidator(req *addValReq) { + topic := req.topic + + _, ok := ps.topicVals[topic] + if ok { + req.resp <- fmt.Errorf("Duplicate validator for topic %s", topic) + return + } + + val := &topicVal{ + topic: topic, + validate: req.validate, + validateTimeout: defaultValidateTimeout, + validateThrottle: make(chan struct{}, defaultValidateConcurrency), + } + + if req.timeout > 0 { + val.validateTimeout = req.timeout + } + + if req.throttle > 0 { + val.validateThrottle = make(chan struct{}, req.throttle) + } + + ps.topicVals[topic] = val + req.resp <- nil +} + +// UnregisterTopicValidator removes a validator from a topic. +// Returns an error if there was no validator registered with the topic. +func (p *PubSub) UnregisterTopicValidator(topic string) error { + rmVal := &rmValReq{ + topic: topic, + resp: make(chan error, 1), + } + + p.rmVal <- rmVal + return <-rmVal.resp +} + +func (ps *PubSub) rmValidator(req *rmValReq) { + topic := req.topic + + _, ok := ps.topicVals[topic] + if ok { + delete(ps.topicVals, topic) + req.resp <- nil + } else { + req.resp <- fmt.Errorf("No validator for topic %s", topic) + } +} + +func (val *topicVal) validateMsg(ctx context.Context, src peer.ID, msg *Message) bool { + vctx, cancel := context.WithTimeout(ctx, val.validateTimeout) + defer cancel() + + valid := val.validate(vctx, src, msg) + if !valid { + log.Debugf("validation failed for topic %s", val.topic) + } + + return valid +} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/randomsub.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/randomsub.go similarity index 91% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/randomsub.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/randomsub.go index 647d41422c..50ba81dc11 100644 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/randomsub.go +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/randomsub.go @@ -3,11 +3,11 @@ package pubsub import ( "context" - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" ) const ( @@ -18,7 +18,7 @@ var ( RandomSubD = 6 ) -// NewRandomSub returns a new PubSub object using RandomSubRouter as the router +// NewRandomSub returns a new PubSub object using RandomSubRouter as the router. func NewRandomSub(ctx context.Context, h host.Host, opts ...Option) (*PubSub, error) { rt := &RandomSubRouter{ peers: make(map[peer.ID]protocol.ID), diff --git a/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/sign.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/sign.go new file mode 100644 index 0000000000..b8f78e5713 --- /dev/null +++ b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/sign.go @@ -0,0 +1,103 @@ +package pubsub + +import ( + "fmt" + + pb "gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/pb" + + crypto "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +const SignPrefix = "libp2p-pubsub:" + +func verifyMessageSignature(m *pb.Message) error { + pubk, err := messagePubKey(m) + if err != nil { + return err + } + + xm := *m + xm.Signature = nil + xm.Key = nil + bytes, err := xm.Marshal() + if err != nil { + return err + } + + bytes = withSignPrefix(bytes) + + valid, err := pubk.Verify(bytes, m.Signature) + if err != nil { + return err + } + + if !valid { + return fmt.Errorf("invalid signature") + } + + return nil +} + +func messagePubKey(m *pb.Message) (crypto.PubKey, error) { + var pubk crypto.PubKey + + pid, err := peer.IDFromBytes(m.From) + if err != nil { + return nil, err + } + + if m.Key == nil { + // no attached key, it must be extractable from the source ID + pubk, err = pid.ExtractPublicKey() + if err != nil { + return nil, fmt.Errorf("cannot extract signing key: %s", err.Error()) + } + if pubk == nil { + return nil, fmt.Errorf("cannot extract signing key") + } + } else { + pubk, err = crypto.UnmarshalPublicKey(m.Key) + if err != nil { + return nil, fmt.Errorf("cannot unmarshal signing key: %s", err.Error()) + } + + // verify that the source ID matches the attached key + if !pid.MatchesPublicKey(pubk) { + return nil, fmt.Errorf("bad signing key; source ID %s doesn't match key", pid) + } + } + + return pubk, nil +} + +func signMessage(pid peer.ID, key crypto.PrivKey, m *pb.Message) error { + bytes, err := m.Marshal() + if err != nil { + return err + } + + bytes = withSignPrefix(bytes) + + sig, err := key.Sign(bytes) + if err != nil { + return err + } + + m.Signature = sig + + pk, _ := pid.ExtractPublicKey() + if pk == nil { + pubk, err := key.GetPublic().Bytes() + if err != nil { + return err + } + m.Key = pubk + } + + return nil +} + +func withSignPrefix(bytes []byte) []byte { + return append([]byte(SignPrefix), bytes...) +} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/subscription.go b/vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/subscription.go similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/subscription.go rename to vendor/gx/ipfs/QmVzLBPPg4gdyX3XFnNaNDkK4V81ptT5X6WZVFzTUECXMa/go-libp2p-pubsub/subscription.go diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/AUTHORS b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/AUTHORS deleted file mode 100644 index 2b00ddba0d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at https://tip.golang.org/AUTHORS. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTING.md b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTING.md deleted file mode 100644 index d0485e887a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -Go is an open source project. - -It is the work of hundreds of contributors. We appreciate your help! - -## Filing issues - -When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: - -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? - -General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. -The gophers there will answer or ask you to file an issue if you've tripped over a bug. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTORS b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTORS deleted file mode 100644 index 1fbd3e976f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at https://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/LICENSE b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/LICENSE deleted file mode 100644 index 6a66aea5ea..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/PATENTS b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/PATENTS deleted file mode 100644 index 733099041f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/README.md b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/README.md deleted file mode 100644 index c9d6fecd1e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Go Cryptography - -This repository holds supplementary Go cryptography libraries. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You -can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the crypto repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the -subject line, so it is easy to find. - -Note that contributions to the cryptography package receive additional scrutiny -due to their sensitive nature. Patches may take longer than normal to receive -feedback. diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme.go deleted file mode 100644 index 9fbe72c3a5..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme.go +++ /dev/null @@ -1,907 +0,0 @@ -// Copyright 2015 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 acme provides an implementation of the -// Automatic Certificate Management Environment (ACME) spec. -// See https://tools.ietf.org/html/draft-ietf-acme-acme-02 for details. -// -// Most common scenarios will want to use autocert subdirectory instead, -// which provides automatic access to certificates from Let's Encrypt -// and any other ACME-based CA. -// -// This package is a work in progress and makes no API stability promises. -package acme - -import ( - "context" - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "encoding/base64" - "encoding/hex" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - "io/ioutil" - "math/big" - "net/http" - "strings" - "sync" - "time" -) - -// LetsEncryptURL is the Directory endpoint of Let's Encrypt CA. -const LetsEncryptURL = "https://acme-v01.api.letsencrypt.org/directory" - -// idPeACMEIdentifierV1 is the OID for the ACME extension for the TLS-ALPN challenge. -var idPeACMEIdentifierV1 = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 30, 1} - -const ( - maxChainLen = 5 // max depth and breadth of a certificate chain - maxCertSize = 1 << 20 // max size of a certificate, in bytes - - // Max number of collected nonces kept in memory. - // Expect usual peak of 1 or 2. - maxNonces = 100 -) - -// Client is an ACME client. -// The only required field is Key. An example of creating a client with a new key -// is as follows: -// -// key, err := rsa.GenerateKey(rand.Reader, 2048) -// if err != nil { -// log.Fatal(err) -// } -// client := &Client{Key: key} -// -type Client struct { - // Key is the account key used to register with a CA and sign requests. - // Key.Public() must return a *rsa.PublicKey or *ecdsa.PublicKey. - Key crypto.Signer - - // HTTPClient optionally specifies an HTTP client to use - // instead of http.DefaultClient. - HTTPClient *http.Client - - // DirectoryURL points to the CA directory endpoint. - // If empty, LetsEncryptURL is used. - // Mutating this value after a successful call of Client's Discover method - // will have no effect. - DirectoryURL string - - // RetryBackoff computes the duration after which the nth retry of a failed request - // should occur. The value of n for the first call on failure is 1. - // The values of r and resp are the request and response of the last failed attempt. - // If the returned value is negative or zero, no more retries are done and an error - // is returned to the caller of the original method. - // - // Requests which result in a 4xx client error are not retried, - // except for 400 Bad Request due to "bad nonce" errors and 429 Too Many Requests. - // - // If RetryBackoff is nil, a truncated exponential backoff algorithm - // with the ceiling of 10 seconds is used, where each subsequent retry n - // is done after either ("Retry-After" + jitter) or (2^n seconds + jitter), - // preferring the former if "Retry-After" header is found in the resp. - // The jitter is a random value up to 1 second. - RetryBackoff func(n int, r *http.Request, resp *http.Response) time.Duration - - dirMu sync.Mutex // guards writes to dir - dir *Directory // cached result of Client's Discover method - - noncesMu sync.Mutex - nonces map[string]struct{} // nonces collected from previous responses -} - -// Discover performs ACME server discovery using c.DirectoryURL. -// -// It caches successful result. So, subsequent calls will not result in -// a network round-trip. This also means mutating c.DirectoryURL after successful call -// of this method will have no effect. -func (c *Client) Discover(ctx context.Context) (Directory, error) { - c.dirMu.Lock() - defer c.dirMu.Unlock() - if c.dir != nil { - return *c.dir, nil - } - - dirURL := c.DirectoryURL - if dirURL == "" { - dirURL = LetsEncryptURL - } - res, err := c.get(ctx, dirURL, wantStatus(http.StatusOK)) - if err != nil { - return Directory{}, err - } - defer res.Body.Close() - c.addNonce(res.Header) - - var v struct { - Reg string `json:"new-reg"` - Authz string `json:"new-authz"` - Cert string `json:"new-cert"` - Revoke string `json:"revoke-cert"` - Meta struct { - Terms string `json:"terms-of-service"` - Website string `json:"website"` - CAA []string `json:"caa-identities"` - } - } - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return Directory{}, err - } - c.dir = &Directory{ - RegURL: v.Reg, - AuthzURL: v.Authz, - CertURL: v.Cert, - RevokeURL: v.Revoke, - Terms: v.Meta.Terms, - Website: v.Meta.Website, - CAA: v.Meta.CAA, - } - return *c.dir, nil -} - -// CreateCert requests a new certificate using the Certificate Signing Request csr encoded in DER format. -// The exp argument indicates the desired certificate validity duration. CA may issue a certificate -// with a different duration. -// If the bundle argument is true, the returned value will also contain the CA (issuer) certificate chain. -// -// In the case where CA server does not provide the issued certificate in the response, -// CreateCert will poll certURL using c.FetchCert, which will result in additional round-trips. -// In such a scenario, the caller can cancel the polling with ctx. -// -// CreateCert returns an error if the CA's response or chain was unreasonably large. -// Callers are encouraged to parse the returned value to ensure the certificate is valid and has the expected features. -func (c *Client) CreateCert(ctx context.Context, csr []byte, exp time.Duration, bundle bool) (der [][]byte, certURL string, err error) { - if _, err := c.Discover(ctx); err != nil { - return nil, "", err - } - - req := struct { - Resource string `json:"resource"` - CSR string `json:"csr"` - NotBefore string `json:"notBefore,omitempty"` - NotAfter string `json:"notAfter,omitempty"` - }{ - Resource: "new-cert", - CSR: base64.RawURLEncoding.EncodeToString(csr), - } - now := timeNow() - req.NotBefore = now.Format(time.RFC3339) - if exp > 0 { - req.NotAfter = now.Add(exp).Format(time.RFC3339) - } - - res, err := c.post(ctx, c.Key, c.dir.CertURL, req, wantStatus(http.StatusCreated)) - if err != nil { - return nil, "", err - } - defer res.Body.Close() - - curl := res.Header.Get("Location") // cert permanent URL - if res.ContentLength == 0 { - // no cert in the body; poll until we get it - cert, err := c.FetchCert(ctx, curl, bundle) - return cert, curl, err - } - // slurp issued cert and CA chain, if requested - cert, err := c.responseCert(ctx, res, bundle) - return cert, curl, err -} - -// FetchCert retrieves already issued certificate from the given url, in DER format. -// It retries the request until the certificate is successfully retrieved, -// context is cancelled by the caller or an error response is received. -// -// The returned value will also contain the CA (issuer) certificate if the bundle argument is true. -// -// FetchCert returns an error if the CA's response or chain was unreasonably large. -// Callers are encouraged to parse the returned value to ensure the certificate is valid -// and has expected features. -func (c *Client) FetchCert(ctx context.Context, url string, bundle bool) ([][]byte, error) { - res, err := c.get(ctx, url, wantStatus(http.StatusOK)) - if err != nil { - return nil, err - } - return c.responseCert(ctx, res, bundle) -} - -// RevokeCert revokes a previously issued certificate cert, provided in DER format. -// -// The key argument, used to sign the request, must be authorized -// to revoke the certificate. It's up to the CA to decide which keys are authorized. -// For instance, the key pair of the certificate may be authorized. -// If the key is nil, c.Key is used instead. -func (c *Client) RevokeCert(ctx context.Context, key crypto.Signer, cert []byte, reason CRLReasonCode) error { - if _, err := c.Discover(ctx); err != nil { - return err - } - - body := &struct { - Resource string `json:"resource"` - Cert string `json:"certificate"` - Reason int `json:"reason"` - }{ - Resource: "revoke-cert", - Cert: base64.RawURLEncoding.EncodeToString(cert), - Reason: int(reason), - } - if key == nil { - key = c.Key - } - res, err := c.post(ctx, key, c.dir.RevokeURL, body, wantStatus(http.StatusOK)) - if err != nil { - return err - } - defer res.Body.Close() - return nil -} - -// AcceptTOS always returns true to indicate the acceptance of a CA's Terms of Service -// during account registration. See Register method of Client for more details. -func AcceptTOS(tosURL string) bool { return true } - -// Register creates a new account registration by following the "new-reg" flow. -// It returns the registered account. The account is not modified. -// -// The registration may require the caller to agree to the CA's Terms of Service (TOS). -// If so, and the account has not indicated the acceptance of the terms (see Account for details), -// Register calls prompt with a TOS URL provided by the CA. Prompt should report -// whether the caller agrees to the terms. To always accept the terms, the caller can use AcceptTOS. -func (c *Client) Register(ctx context.Context, a *Account, prompt func(tosURL string) bool) (*Account, error) { - if _, err := c.Discover(ctx); err != nil { - return nil, err - } - - var err error - if a, err = c.doReg(ctx, c.dir.RegURL, "new-reg", a); err != nil { - return nil, err - } - var accept bool - if a.CurrentTerms != "" && a.CurrentTerms != a.AgreedTerms { - accept = prompt(a.CurrentTerms) - } - if accept { - a.AgreedTerms = a.CurrentTerms - a, err = c.UpdateReg(ctx, a) - } - return a, err -} - -// GetReg retrieves an existing registration. -// The url argument is an Account URI. -func (c *Client) GetReg(ctx context.Context, url string) (*Account, error) { - a, err := c.doReg(ctx, url, "reg", nil) - if err != nil { - return nil, err - } - a.URI = url - return a, nil -} - -// UpdateReg updates an existing registration. -// It returns an updated account copy. The provided account is not modified. -func (c *Client) UpdateReg(ctx context.Context, a *Account) (*Account, error) { - uri := a.URI - a, err := c.doReg(ctx, uri, "reg", a) - if err != nil { - return nil, err - } - a.URI = uri - return a, nil -} - -// Authorize performs the initial step in an authorization flow. -// The caller will then need to choose from and perform a set of returned -// challenges using c.Accept in order to successfully complete authorization. -// -// If an authorization has been previously granted, the CA may return -// a valid authorization (Authorization.Status is StatusValid). If so, the caller -// need not fulfill any challenge and can proceed to requesting a certificate. -func (c *Client) Authorize(ctx context.Context, domain string) (*Authorization, error) { - if _, err := c.Discover(ctx); err != nil { - return nil, err - } - - type authzID struct { - Type string `json:"type"` - Value string `json:"value"` - } - req := struct { - Resource string `json:"resource"` - Identifier authzID `json:"identifier"` - }{ - Resource: "new-authz", - Identifier: authzID{Type: "dns", Value: domain}, - } - res, err := c.post(ctx, c.Key, c.dir.AuthzURL, req, wantStatus(http.StatusCreated)) - if err != nil { - return nil, err - } - defer res.Body.Close() - - var v wireAuthz - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return nil, fmt.Errorf("acme: invalid response: %v", err) - } - if v.Status != StatusPending && v.Status != StatusValid { - return nil, fmt.Errorf("acme: unexpected status: %s", v.Status) - } - return v.authorization(res.Header.Get("Location")), nil -} - -// GetAuthorization retrieves an authorization identified by the given URL. -// -// If a caller needs to poll an authorization until its status is final, -// see the WaitAuthorization method. -func (c *Client) GetAuthorization(ctx context.Context, url string) (*Authorization, error) { - res, err := c.get(ctx, url, wantStatus(http.StatusOK, http.StatusAccepted)) - if err != nil { - return nil, err - } - defer res.Body.Close() - var v wireAuthz - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return nil, fmt.Errorf("acme: invalid response: %v", err) - } - return v.authorization(url), nil -} - -// RevokeAuthorization relinquishes an existing authorization identified -// by the given URL. -// The url argument is an Authorization.URI value. -// -// If successful, the caller will be required to obtain a new authorization -// using the Authorize method before being able to request a new certificate -// for the domain associated with the authorization. -// -// It does not revoke existing certificates. -func (c *Client) RevokeAuthorization(ctx context.Context, url string) error { - req := struct { - Resource string `json:"resource"` - Status string `json:"status"` - Delete bool `json:"delete"` - }{ - Resource: "authz", - Status: "deactivated", - Delete: true, - } - res, err := c.post(ctx, c.Key, url, req, wantStatus(http.StatusOK)) - if err != nil { - return err - } - defer res.Body.Close() - return nil -} - -// WaitAuthorization polls an authorization at the given URL -// until it is in one of the final states, StatusValid or StatusInvalid, -// the ACME CA responded with a 4xx error code, or the context is done. -// -// It returns a non-nil Authorization only if its Status is StatusValid. -// In all other cases WaitAuthorization returns an error. -// If the Status is StatusInvalid, the returned error is of type *AuthorizationError. -func (c *Client) WaitAuthorization(ctx context.Context, url string) (*Authorization, error) { - for { - res, err := c.get(ctx, url, wantStatus(http.StatusOK, http.StatusAccepted)) - if err != nil { - return nil, err - } - - var raw wireAuthz - err = json.NewDecoder(res.Body).Decode(&raw) - res.Body.Close() - switch { - case err != nil: - // Skip and retry. - case raw.Status == StatusValid: - return raw.authorization(url), nil - case raw.Status == StatusInvalid: - return nil, raw.error(url) - } - - // Exponential backoff is implemented in c.get above. - // This is just to prevent continuously hitting the CA - // while waiting for a final authorization status. - d := retryAfter(res.Header.Get("Retry-After")) - if d == 0 { - // Given that the fastest challenges TLS-SNI and HTTP-01 - // require a CA to make at least 1 network round trip - // and most likely persist a challenge state, - // this default delay seems reasonable. - d = time.Second - } - t := time.NewTimer(d) - select { - case <-ctx.Done(): - t.Stop() - return nil, ctx.Err() - case <-t.C: - // Retry. - } - } -} - -// GetChallenge retrieves the current status of an challenge. -// -// A client typically polls a challenge status using this method. -func (c *Client) GetChallenge(ctx context.Context, url string) (*Challenge, error) { - res, err := c.get(ctx, url, wantStatus(http.StatusOK, http.StatusAccepted)) - if err != nil { - return nil, err - } - defer res.Body.Close() - v := wireChallenge{URI: url} - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return nil, fmt.Errorf("acme: invalid response: %v", err) - } - return v.challenge(), nil -} - -// Accept informs the server that the client accepts one of its challenges -// previously obtained with c.Authorize. -// -// The server will then perform the validation asynchronously. -func (c *Client) Accept(ctx context.Context, chal *Challenge) (*Challenge, error) { - auth, err := keyAuth(c.Key.Public(), chal.Token) - if err != nil { - return nil, err - } - - req := struct { - Resource string `json:"resource"` - Type string `json:"type"` - Auth string `json:"keyAuthorization"` - }{ - Resource: "challenge", - Type: chal.Type, - Auth: auth, - } - res, err := c.post(ctx, c.Key, chal.URI, req, wantStatus( - http.StatusOK, // according to the spec - http.StatusAccepted, // Let's Encrypt: see https://goo.gl/WsJ7VT (acme-divergences.md) - )) - if err != nil { - return nil, err - } - defer res.Body.Close() - - var v wireChallenge - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return nil, fmt.Errorf("acme: invalid response: %v", err) - } - return v.challenge(), nil -} - -// DNS01ChallengeRecord returns a DNS record value for a dns-01 challenge response. -// A TXT record containing the returned value must be provisioned under -// "_acme-challenge" name of the domain being validated. -// -// The token argument is a Challenge.Token value. -func (c *Client) DNS01ChallengeRecord(token string) (string, error) { - ka, err := keyAuth(c.Key.Public(), token) - if err != nil { - return "", err - } - b := sha256.Sum256([]byte(ka)) - return base64.RawURLEncoding.EncodeToString(b[:]), nil -} - -// HTTP01ChallengeResponse returns the response for an http-01 challenge. -// Servers should respond with the value to HTTP requests at the URL path -// provided by HTTP01ChallengePath to validate the challenge and prove control -// over a domain name. -// -// The token argument is a Challenge.Token value. -func (c *Client) HTTP01ChallengeResponse(token string) (string, error) { - return keyAuth(c.Key.Public(), token) -} - -// HTTP01ChallengePath returns the URL path at which the response for an http-01 challenge -// should be provided by the servers. -// The response value can be obtained with HTTP01ChallengeResponse. -// -// The token argument is a Challenge.Token value. -func (c *Client) HTTP01ChallengePath(token string) string { - return "/.well-known/acme-challenge/" + token -} - -// TLSSNI01ChallengeCert creates a certificate for TLS-SNI-01 challenge response. -// Servers can present the certificate to validate the challenge and prove control -// over a domain name. -// -// The implementation is incomplete in that the returned value is a single certificate, -// computed only for Z0 of the key authorization. ACME CAs are expected to update -// their implementations to use the newer version, TLS-SNI-02. -// For more details on TLS-SNI-01 see https://tools.ietf.org/html/draft-ietf-acme-acme-01#section-7.3. -// -// The token argument is a Challenge.Token value. -// If a WithKey option is provided, its private part signs the returned cert, -// and the public part is used to specify the signee. -// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve. -// -// The returned certificate is valid for the next 24 hours and must be presented only when -// the server name of the TLS ClientHello matches exactly the returned name value. -func (c *Client) TLSSNI01ChallengeCert(token string, opt ...CertOption) (cert tls.Certificate, name string, err error) { - ka, err := keyAuth(c.Key.Public(), token) - if err != nil { - return tls.Certificate{}, "", err - } - b := sha256.Sum256([]byte(ka)) - h := hex.EncodeToString(b[:]) - name = fmt.Sprintf("%s.%s.acme.invalid", h[:32], h[32:]) - cert, err = tlsChallengeCert([]string{name}, opt) - if err != nil { - return tls.Certificate{}, "", err - } - return cert, name, nil -} - -// TLSSNI02ChallengeCert creates a certificate for TLS-SNI-02 challenge response. -// Servers can present the certificate to validate the challenge and prove control -// over a domain name. For more details on TLS-SNI-02 see -// https://tools.ietf.org/html/draft-ietf-acme-acme-03#section-7.3. -// -// The token argument is a Challenge.Token value. -// If a WithKey option is provided, its private part signs the returned cert, -// and the public part is used to specify the signee. -// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve. -// -// The returned certificate is valid for the next 24 hours and must be presented only when -// the server name in the TLS ClientHello matches exactly the returned name value. -func (c *Client) TLSSNI02ChallengeCert(token string, opt ...CertOption) (cert tls.Certificate, name string, err error) { - b := sha256.Sum256([]byte(token)) - h := hex.EncodeToString(b[:]) - sanA := fmt.Sprintf("%s.%s.token.acme.invalid", h[:32], h[32:]) - - ka, err := keyAuth(c.Key.Public(), token) - if err != nil { - return tls.Certificate{}, "", err - } - b = sha256.Sum256([]byte(ka)) - h = hex.EncodeToString(b[:]) - sanB := fmt.Sprintf("%s.%s.ka.acme.invalid", h[:32], h[32:]) - - cert, err = tlsChallengeCert([]string{sanA, sanB}, opt) - if err != nil { - return tls.Certificate{}, "", err - } - return cert, sanA, nil -} - -// TLSALPN01ChallengeCert creates a certificate for TLS-ALPN-01 challenge response. -// Servers can present the certificate to validate the challenge and prove control -// over a domain name. For more details on TLS-ALPN-01 see -// https://tools.ietf.org/html/draft-shoemaker-acme-tls-alpn-00#section-3 -// -// The token argument is a Challenge.Token value. -// If a WithKey option is provided, its private part signs the returned cert, -// and the public part is used to specify the signee. -// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve. -// -// The returned certificate is valid for the next 24 hours and must be presented only when -// the server name in the TLS ClientHello matches the domain, and the special acme-tls/1 ALPN protocol -// has been specified. -func (c *Client) TLSALPN01ChallengeCert(token, domain string, opt ...CertOption) (cert tls.Certificate, err error) { - ka, err := keyAuth(c.Key.Public(), token) - if err != nil { - return tls.Certificate{}, err - } - shasum := sha256.Sum256([]byte(ka)) - acmeExtension := pkix.Extension{ - Id: idPeACMEIdentifierV1, - Critical: true, - Value: shasum[:], - } - - tmpl := defaultTLSChallengeCertTemplate() - - var newOpt []CertOption - for _, o := range opt { - switch o := o.(type) { - case *certOptTemplate: - t := *(*x509.Certificate)(o) // shallow copy is ok - tmpl = &t - default: - newOpt = append(newOpt, o) - } - } - tmpl.ExtraExtensions = append(tmpl.ExtraExtensions, acmeExtension) - newOpt = append(newOpt, WithTemplate(tmpl)) - return tlsChallengeCert([]string{domain}, newOpt) -} - -// doReg sends all types of registration requests. -// The type of request is identified by typ argument, which is a "resource" -// in the ACME spec terms. -// -// A non-nil acct argument indicates whether the intention is to mutate data -// of the Account. Only Contact and Agreement of its fields are used -// in such cases. -func (c *Client) doReg(ctx context.Context, url string, typ string, acct *Account) (*Account, error) { - req := struct { - Resource string `json:"resource"` - Contact []string `json:"contact,omitempty"` - Agreement string `json:"agreement,omitempty"` - }{ - Resource: typ, - } - if acct != nil { - req.Contact = acct.Contact - req.Agreement = acct.AgreedTerms - } - res, err := c.post(ctx, c.Key, url, req, wantStatus( - http.StatusOK, // updates and deletes - http.StatusCreated, // new account creation - )) - if err != nil { - return nil, err - } - defer res.Body.Close() - - var v struct { - Contact []string - Agreement string - Authorizations string - Certificates string - } - if err := json.NewDecoder(res.Body).Decode(&v); err != nil { - return nil, fmt.Errorf("acme: invalid response: %v", err) - } - var tos string - if v := linkHeader(res.Header, "terms-of-service"); len(v) > 0 { - tos = v[0] - } - var authz string - if v := linkHeader(res.Header, "next"); len(v) > 0 { - authz = v[0] - } - return &Account{ - URI: res.Header.Get("Location"), - Contact: v.Contact, - AgreedTerms: v.Agreement, - CurrentTerms: tos, - Authz: authz, - Authorizations: v.Authorizations, - Certificates: v.Certificates, - }, nil -} - -// popNonce returns a nonce value previously stored with c.addNonce -// or fetches a fresh one from the given URL. -func (c *Client) popNonce(ctx context.Context, url string) (string, error) { - c.noncesMu.Lock() - defer c.noncesMu.Unlock() - if len(c.nonces) == 0 { - return c.fetchNonce(ctx, url) - } - var nonce string - for nonce = range c.nonces { - delete(c.nonces, nonce) - break - } - return nonce, nil -} - -// clearNonces clears any stored nonces -func (c *Client) clearNonces() { - c.noncesMu.Lock() - defer c.noncesMu.Unlock() - c.nonces = make(map[string]struct{}) -} - -// addNonce stores a nonce value found in h (if any) for future use. -func (c *Client) addNonce(h http.Header) { - v := nonceFromHeader(h) - if v == "" { - return - } - c.noncesMu.Lock() - defer c.noncesMu.Unlock() - if len(c.nonces) >= maxNonces { - return - } - if c.nonces == nil { - c.nonces = make(map[string]struct{}) - } - c.nonces[v] = struct{}{} -} - -func (c *Client) fetchNonce(ctx context.Context, url string) (string, error) { - r, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return "", err - } - resp, err := c.doNoRetry(ctx, r) - if err != nil { - return "", err - } - defer resp.Body.Close() - nonce := nonceFromHeader(resp.Header) - if nonce == "" { - if resp.StatusCode > 299 { - return "", responseError(resp) - } - return "", errors.New("acme: nonce not found") - } - return nonce, nil -} - -func nonceFromHeader(h http.Header) string { - return h.Get("Replay-Nonce") -} - -func (c *Client) responseCert(ctx context.Context, res *http.Response, bundle bool) ([][]byte, error) { - b, err := ioutil.ReadAll(io.LimitReader(res.Body, maxCertSize+1)) - if err != nil { - return nil, fmt.Errorf("acme: response stream: %v", err) - } - if len(b) > maxCertSize { - return nil, errors.New("acme: certificate is too big") - } - cert := [][]byte{b} - if !bundle { - return cert, nil - } - - // Append CA chain cert(s). - // At least one is required according to the spec: - // https://tools.ietf.org/html/draft-ietf-acme-acme-03#section-6.3.1 - up := linkHeader(res.Header, "up") - if len(up) == 0 { - return nil, errors.New("acme: rel=up link not found") - } - if len(up) > maxChainLen { - return nil, errors.New("acme: rel=up link is too large") - } - for _, url := range up { - cc, err := c.chainCert(ctx, url, 0) - if err != nil { - return nil, err - } - cert = append(cert, cc...) - } - return cert, nil -} - -// chainCert fetches CA certificate chain recursively by following "up" links. -// Each recursive call increments the depth by 1, resulting in an error -// if the recursion level reaches maxChainLen. -// -// First chainCert call starts with depth of 0. -func (c *Client) chainCert(ctx context.Context, url string, depth int) ([][]byte, error) { - if depth >= maxChainLen { - return nil, errors.New("acme: certificate chain is too deep") - } - - res, err := c.get(ctx, url, wantStatus(http.StatusOK)) - if err != nil { - return nil, err - } - defer res.Body.Close() - b, err := ioutil.ReadAll(io.LimitReader(res.Body, maxCertSize+1)) - if err != nil { - return nil, err - } - if len(b) > maxCertSize { - return nil, errors.New("acme: certificate is too big") - } - chain := [][]byte{b} - - uplink := linkHeader(res.Header, "up") - if len(uplink) > maxChainLen { - return nil, errors.New("acme: certificate chain is too large") - } - for _, up := range uplink { - cc, err := c.chainCert(ctx, up, depth+1) - if err != nil { - return nil, err - } - chain = append(chain, cc...) - } - - return chain, nil -} - -// linkHeader returns URI-Reference values of all Link headers -// with relation-type rel. -// See https://tools.ietf.org/html/rfc5988#section-5 for details. -func linkHeader(h http.Header, rel string) []string { - var links []string - for _, v := range h["Link"] { - parts := strings.Split(v, ";") - for _, p := range parts { - p = strings.TrimSpace(p) - if !strings.HasPrefix(p, "rel=") { - continue - } - if v := strings.Trim(p[4:], `"`); v == rel { - links = append(links, strings.Trim(parts[0], "<>")) - } - } - } - return links -} - -// keyAuth generates a key authorization string for a given token. -func keyAuth(pub crypto.PublicKey, token string) (string, error) { - th, err := JWKThumbprint(pub) - if err != nil { - return "", err - } - return fmt.Sprintf("%s.%s", token, th), nil -} - -// defaultTLSChallengeCertTemplate is a template used to create challenge certs for TLS challenges. -func defaultTLSChallengeCertTemplate() *x509.Certificate { - return &x509.Certificate{ - SerialNumber: big.NewInt(1), - NotBefore: time.Now(), - NotAfter: time.Now().Add(24 * time.Hour), - BasicConstraintsValid: true, - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - } -} - -// tlsChallengeCert creates a temporary certificate for TLS-SNI challenges -// with the given SANs and auto-generated public/private key pair. -// The Subject Common Name is set to the first SAN to aid debugging. -// To create a cert with a custom key pair, specify WithKey option. -func tlsChallengeCert(san []string, opt []CertOption) (tls.Certificate, error) { - var key crypto.Signer - tmpl := defaultTLSChallengeCertTemplate() - for _, o := range opt { - switch o := o.(type) { - case *certOptKey: - if key != nil { - return tls.Certificate{}, errors.New("acme: duplicate key option") - } - key = o.key - case *certOptTemplate: - t := *(*x509.Certificate)(o) // shallow copy is ok - tmpl = &t - default: - // package's fault, if we let this happen: - panic(fmt.Sprintf("unsupported option type %T", o)) - } - } - if key == nil { - var err error - if key, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader); err != nil { - return tls.Certificate{}, err - } - } - tmpl.DNSNames = san - if len(san) > 0 { - tmpl.Subject.CommonName = san[0] - } - - der, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, key.Public(), key) - if err != nil { - return tls.Certificate{}, err - } - return tls.Certificate{ - Certificate: [][]byte{der}, - PrivateKey: key, - }, nil -} - -// encodePEM returns b encoded as PEM with block of type typ. -func encodePEM(typ string, b []byte) []byte { - pb := &pem.Block{Type: typ, Bytes: b} - return pem.EncodeToMemory(pb) -} - -// timeNow is useful for testing for fixed current time. -var timeNow = time.Now diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme_test.go deleted file mode 100644 index aa6ecaf57e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/acme_test.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Copyright 2015 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 acme - -import ( - "bytes" - "context" - "crypto/rand" - "crypto/rsa" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/base64" - "encoding/hex" - "encoding/json" - "fmt" - "math/big" - "net/http" - "net/http/httptest" - "reflect" - "sort" - "strings" - "testing" - "time" -) - -// Decodes a JWS-encoded request and unmarshals the decoded JSON into a provided -// interface. -func decodeJWSRequest(t *testing.T, v interface{}, r *http.Request) { - // Decode request - var req struct{ Payload string } - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - t.Fatal(err) - } - payload, err := base64.RawURLEncoding.DecodeString(req.Payload) - if err != nil { - t.Fatal(err) - } - err = json.Unmarshal(payload, v) - if err != nil { - t.Fatal(err) - } -} - -type jwsHead struct { - Alg string - Nonce string - JWK map[string]string `json:"jwk"` -} - -func decodeJWSHead(r *http.Request) (*jwsHead, error) { - var req struct{ Protected string } - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - return nil, err - } - b, err := base64.RawURLEncoding.DecodeString(req.Protected) - if err != nil { - return nil, err - } - var head jwsHead - if err := json.Unmarshal(b, &head); err != nil { - return nil, err - } - return &head, nil -} - -func TestDiscover(t *testing.T) { - const ( - reg = "https://example.com/acme/new-reg" - authz = "https://example.com/acme/new-authz" - cert = "https://example.com/acme/new-cert" - revoke = "https://example.com/acme/revoke-cert" - ) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - fmt.Fprintf(w, `{ - "new-reg": %q, - "new-authz": %q, - "new-cert": %q, - "revoke-cert": %q - }`, reg, authz, cert, revoke) - })) - defer ts.Close() - c := Client{DirectoryURL: ts.URL} - dir, err := c.Discover(context.Background()) - if err != nil { - t.Fatal(err) - } - if dir.RegURL != reg { - t.Errorf("dir.RegURL = %q; want %q", dir.RegURL, reg) - } - if dir.AuthzURL != authz { - t.Errorf("dir.AuthzURL = %q; want %q", dir.AuthzURL, authz) - } - if dir.CertURL != cert { - t.Errorf("dir.CertURL = %q; want %q", dir.CertURL, cert) - } - if dir.RevokeURL != revoke { - t.Errorf("dir.RevokeURL = %q; want %q", dir.RevokeURL, revoke) - } -} - -func TestRegister(t *testing.T) { - contacts := []string{"mailto:admin@example.com"} - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string - Contact []string - Agreement string - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "new-reg" { - t.Errorf("j.Resource = %q; want new-reg", j.Resource) - } - if !reflect.DeepEqual(j.Contact, contacts) { - t.Errorf("j.Contact = %v; want %v", j.Contact, contacts) - } - - w.Header().Set("Location", "https://ca.tld/acme/reg/1") - w.Header().Set("Link", `;rel="next"`) - w.Header().Add("Link", `;rel="recover"`) - w.Header().Add("Link", `;rel="terms-of-service"`) - w.WriteHeader(http.StatusCreated) - b, _ := json.Marshal(contacts) - fmt.Fprintf(w, `{"contact": %s}`, b) - })) - defer ts.Close() - - prompt := func(url string) bool { - const terms = "https://ca.tld/acme/terms" - if url != terms { - t.Errorf("prompt url = %q; want %q", url, terms) - } - return false - } - - c := Client{Key: testKeyEC, dir: &Directory{RegURL: ts.URL}} - a := &Account{Contact: contacts} - var err error - if a, err = c.Register(context.Background(), a, prompt); err != nil { - t.Fatal(err) - } - if a.URI != "https://ca.tld/acme/reg/1" { - t.Errorf("a.URI = %q; want https://ca.tld/acme/reg/1", a.URI) - } - if a.Authz != "https://ca.tld/acme/new-authz" { - t.Errorf("a.Authz = %q; want https://ca.tld/acme/new-authz", a.Authz) - } - if a.CurrentTerms != "https://ca.tld/acme/terms" { - t.Errorf("a.CurrentTerms = %q; want https://ca.tld/acme/terms", a.CurrentTerms) - } - if !reflect.DeepEqual(a.Contact, contacts) { - t.Errorf("a.Contact = %v; want %v", a.Contact, contacts) - } -} - -func TestUpdateReg(t *testing.T) { - const terms = "https://ca.tld/acme/terms" - contacts := []string{"mailto:admin@example.com"} - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string - Contact []string - Agreement string - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "reg" { - t.Errorf("j.Resource = %q; want reg", j.Resource) - } - if j.Agreement != terms { - t.Errorf("j.Agreement = %q; want %q", j.Agreement, terms) - } - if !reflect.DeepEqual(j.Contact, contacts) { - t.Errorf("j.Contact = %v; want %v", j.Contact, contacts) - } - - w.Header().Set("Link", `;rel="next"`) - w.Header().Add("Link", `;rel="recover"`) - w.Header().Add("Link", fmt.Sprintf(`<%s>;rel="terms-of-service"`, terms)) - w.WriteHeader(http.StatusOK) - b, _ := json.Marshal(contacts) - fmt.Fprintf(w, `{"contact":%s, "agreement":%q}`, b, terms) - })) - defer ts.Close() - - c := Client{Key: testKeyEC} - a := &Account{URI: ts.URL, Contact: contacts, AgreedTerms: terms} - var err error - if a, err = c.UpdateReg(context.Background(), a); err != nil { - t.Fatal(err) - } - if a.Authz != "https://ca.tld/acme/new-authz" { - t.Errorf("a.Authz = %q; want https://ca.tld/acme/new-authz", a.Authz) - } - if a.AgreedTerms != terms { - t.Errorf("a.AgreedTerms = %q; want %q", a.AgreedTerms, terms) - } - if a.CurrentTerms != terms { - t.Errorf("a.CurrentTerms = %q; want %q", a.CurrentTerms, terms) - } - if a.URI != ts.URL { - t.Errorf("a.URI = %q; want %q", a.URI, ts.URL) - } -} - -func TestGetReg(t *testing.T) { - const terms = "https://ca.tld/acme/terms" - const newTerms = "https://ca.tld/acme/new-terms" - contacts := []string{"mailto:admin@example.com"} - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string - Contact []string - Agreement string - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "reg" { - t.Errorf("j.Resource = %q; want reg", j.Resource) - } - if len(j.Contact) != 0 { - t.Errorf("j.Contact = %v", j.Contact) - } - if j.Agreement != "" { - t.Errorf("j.Agreement = %q", j.Agreement) - } - - w.Header().Set("Link", `;rel="next"`) - w.Header().Add("Link", `;rel="recover"`) - w.Header().Add("Link", fmt.Sprintf(`<%s>;rel="terms-of-service"`, newTerms)) - w.WriteHeader(http.StatusOK) - b, _ := json.Marshal(contacts) - fmt.Fprintf(w, `{"contact":%s, "agreement":%q}`, b, terms) - })) - defer ts.Close() - - c := Client{Key: testKeyEC} - a, err := c.GetReg(context.Background(), ts.URL) - if err != nil { - t.Fatal(err) - } - if a.Authz != "https://ca.tld/acme/new-authz" { - t.Errorf("a.AuthzURL = %q; want https://ca.tld/acme/new-authz", a.Authz) - } - if a.AgreedTerms != terms { - t.Errorf("a.AgreedTerms = %q; want %q", a.AgreedTerms, terms) - } - if a.CurrentTerms != newTerms { - t.Errorf("a.CurrentTerms = %q; want %q", a.CurrentTerms, newTerms) - } - if a.URI != ts.URL { - t.Errorf("a.URI = %q; want %q", a.URI, ts.URL) - } -} - -func TestAuthorize(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string - Identifier struct { - Type string - Value string - } - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "new-authz" { - t.Errorf("j.Resource = %q; want new-authz", j.Resource) - } - if j.Identifier.Type != "dns" { - t.Errorf("j.Identifier.Type = %q; want dns", j.Identifier.Type) - } - if j.Identifier.Value != "example.com" { - t.Errorf("j.Identifier.Value = %q; want example.com", j.Identifier.Value) - } - - w.Header().Set("Location", "https://ca.tld/acme/auth/1") - w.WriteHeader(http.StatusCreated) - fmt.Fprintf(w, `{ - "identifier": {"type":"dns","value":"example.com"}, - "status":"pending", - "challenges":[ - { - "type":"http-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id1", - "token":"token1" - }, - { - "type":"tls-sni-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id2", - "token":"token2" - } - ], - "combinations":[[0],[1]]}`) - })) - defer ts.Close() - - cl := Client{Key: testKeyEC, dir: &Directory{AuthzURL: ts.URL}} - auth, err := cl.Authorize(context.Background(), "example.com") - if err != nil { - t.Fatal(err) - } - - if auth.URI != "https://ca.tld/acme/auth/1" { - t.Errorf("URI = %q; want https://ca.tld/acme/auth/1", auth.URI) - } - if auth.Status != "pending" { - t.Errorf("Status = %q; want pending", auth.Status) - } - if auth.Identifier.Type != "dns" { - t.Errorf("Identifier.Type = %q; want dns", auth.Identifier.Type) - } - if auth.Identifier.Value != "example.com" { - t.Errorf("Identifier.Value = %q; want example.com", auth.Identifier.Value) - } - - if n := len(auth.Challenges); n != 2 { - t.Fatalf("len(auth.Challenges) = %d; want 2", n) - } - - c := auth.Challenges[0] - if c.Type != "http-01" { - t.Errorf("c.Type = %q; want http-01", c.Type) - } - if c.URI != "https://ca.tld/acme/challenge/publickey/id1" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI) - } - if c.Token != "token1" { - t.Errorf("c.Token = %q; want token1", c.Token) - } - - c = auth.Challenges[1] - if c.Type != "tls-sni-01" { - t.Errorf("c.Type = %q; want tls-sni-01", c.Type) - } - if c.URI != "https://ca.tld/acme/challenge/publickey/id2" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id2", c.URI) - } - if c.Token != "token2" { - t.Errorf("c.Token = %q; want token2", c.Token) - } - - combs := [][]int{{0}, {1}} - if !reflect.DeepEqual(auth.Combinations, combs) { - t.Errorf("auth.Combinations: %+v\nwant: %+v\n", auth.Combinations, combs) - } -} - -func TestAuthorizeValid(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "nonce") - return - } - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"status":"valid"}`)) - })) - defer ts.Close() - client := Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}} - _, err := client.Authorize(context.Background(), "example.com") - if err != nil { - t.Errorf("err = %v", err) - } -} - -func TestGetAuthorization(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" { - t.Errorf("r.Method = %q; want GET", r.Method) - } - - w.WriteHeader(http.StatusOK) - fmt.Fprintf(w, `{ - "identifier": {"type":"dns","value":"example.com"}, - "status":"pending", - "challenges":[ - { - "type":"http-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id1", - "token":"token1" - }, - { - "type":"tls-sni-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id2", - "token":"token2" - } - ], - "combinations":[[0],[1]]}`) - })) - defer ts.Close() - - cl := Client{Key: testKeyEC} - auth, err := cl.GetAuthorization(context.Background(), ts.URL) - if err != nil { - t.Fatal(err) - } - - if auth.Status != "pending" { - t.Errorf("Status = %q; want pending", auth.Status) - } - if auth.Identifier.Type != "dns" { - t.Errorf("Identifier.Type = %q; want dns", auth.Identifier.Type) - } - if auth.Identifier.Value != "example.com" { - t.Errorf("Identifier.Value = %q; want example.com", auth.Identifier.Value) - } - - if n := len(auth.Challenges); n != 2 { - t.Fatalf("len(set.Challenges) = %d; want 2", n) - } - - c := auth.Challenges[0] - if c.Type != "http-01" { - t.Errorf("c.Type = %q; want http-01", c.Type) - } - if c.URI != "https://ca.tld/acme/challenge/publickey/id1" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI) - } - if c.Token != "token1" { - t.Errorf("c.Token = %q; want token1", c.Token) - } - - c = auth.Challenges[1] - if c.Type != "tls-sni-01" { - t.Errorf("c.Type = %q; want tls-sni-01", c.Type) - } - if c.URI != "https://ca.tld/acme/challenge/publickey/id2" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id2", c.URI) - } - if c.Token != "token2" { - t.Errorf("c.Token = %q; want token2", c.Token) - } - - combs := [][]int{{0}, {1}} - if !reflect.DeepEqual(auth.Combinations, combs) { - t.Errorf("auth.Combinations: %+v\nwant: %+v\n", auth.Combinations, combs) - } -} - -func TestWaitAuthorization(t *testing.T) { - t.Run("wait loop", func(t *testing.T) { - var count int - authz, err := runWaitAuthorization(context.Background(), t, func(w http.ResponseWriter, r *http.Request) { - count++ - w.Header().Set("Retry-After", "0") - if count > 1 { - fmt.Fprintf(w, `{"status":"valid"}`) - return - } - fmt.Fprintf(w, `{"status":"pending"}`) - }) - if err != nil { - t.Fatalf("non-nil error: %v", err) - } - if authz == nil { - t.Fatal("authz is nil") - } - }) - t.Run("invalid status", func(t *testing.T) { - _, err := runWaitAuthorization(context.Background(), t, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, `{"status":"invalid"}`) - }) - if _, ok := err.(*AuthorizationError); !ok { - t.Errorf("err is %v (%T); want non-nil *AuthorizationError", err, err) - } - }) - t.Run("non-retriable error", func(t *testing.T) { - const code = http.StatusBadRequest - _, err := runWaitAuthorization(context.Background(), t, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(code) - }) - res, ok := err.(*Error) - if !ok { - t.Fatalf("err is %v (%T); want a non-nil *Error", err, err) - } - if res.StatusCode != code { - t.Errorf("res.StatusCode = %d; want %d", res.StatusCode, code) - } - }) - for _, code := range []int{http.StatusTooManyRequests, http.StatusInternalServerError} { - t.Run(fmt.Sprintf("retriable %d error", code), func(t *testing.T) { - var count int - authz, err := runWaitAuthorization(context.Background(), t, func(w http.ResponseWriter, r *http.Request) { - count++ - w.Header().Set("Retry-After", "0") - if count > 1 { - fmt.Fprintf(w, `{"status":"valid"}`) - return - } - w.WriteHeader(code) - }) - if err != nil { - t.Fatalf("non-nil error: %v", err) - } - if authz == nil { - t.Fatal("authz is nil") - } - }) - } - t.Run("context cancel", func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond) - defer cancel() - _, err := runWaitAuthorization(ctx, t, func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Retry-After", "60") - fmt.Fprintf(w, `{"status":"pending"}`) - }) - if err == nil { - t.Error("err is nil") - } - }) -} -func runWaitAuthorization(ctx context.Context, t *testing.T, h http.HandlerFunc) (*Authorization, error) { - t.Helper() - ts := httptest.NewServer(h) - defer ts.Close() - type res struct { - authz *Authorization - err error - } - ch := make(chan res, 1) - go func() { - var client Client - a, err := client.WaitAuthorization(ctx, ts.URL) - ch <- res{a, err} - }() - select { - case <-time.After(3 * time.Second): - t.Fatal("WaitAuthorization took too long to return") - case v := <-ch: - return v.authz, v.err - } - panic("runWaitAuthorization: out of select") -} - -func TestRevokeAuthorization(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "nonce") - return - } - switch r.URL.Path { - case "/1": - var req struct { - Resource string - Status string - Delete bool - } - decodeJWSRequest(t, &req, r) - if req.Resource != "authz" { - t.Errorf("req.Resource = %q; want authz", req.Resource) - } - if req.Status != "deactivated" { - t.Errorf("req.Status = %q; want deactivated", req.Status) - } - if !req.Delete { - t.Errorf("req.Delete is false") - } - case "/2": - w.WriteHeader(http.StatusBadRequest) - } - })) - defer ts.Close() - client := &Client{Key: testKey} - ctx := context.Background() - if err := client.RevokeAuthorization(ctx, ts.URL+"/1"); err != nil { - t.Errorf("err = %v", err) - } - if client.RevokeAuthorization(ctx, ts.URL+"/2") == nil { - t.Error("nil error") - } -} - -func TestPollChallenge(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" { - t.Errorf("r.Method = %q; want GET", r.Method) - } - - w.WriteHeader(http.StatusOK) - fmt.Fprintf(w, `{ - "type":"http-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id1", - "token":"token1"}`) - })) - defer ts.Close() - - cl := Client{Key: testKeyEC} - chall, err := cl.GetChallenge(context.Background(), ts.URL) - if err != nil { - t.Fatal(err) - } - - if chall.Status != "pending" { - t.Errorf("Status = %q; want pending", chall.Status) - } - if chall.Type != "http-01" { - t.Errorf("c.Type = %q; want http-01", chall.Type) - } - if chall.URI != "https://ca.tld/acme/challenge/publickey/id1" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", chall.URI) - } - if chall.Token != "token1" { - t.Errorf("c.Token = %q; want token1", chall.Token) - } -} - -func TestAcceptChallenge(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string - Type string - Auth string `json:"keyAuthorization"` - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "challenge" { - t.Errorf(`resource = %q; want "challenge"`, j.Resource) - } - if j.Type != "http-01" { - t.Errorf(`type = %q; want "http-01"`, j.Type) - } - keyAuth := "token1." + testKeyECThumbprint - if j.Auth != keyAuth { - t.Errorf(`keyAuthorization = %q; want %q`, j.Auth, keyAuth) - } - - // Respond to request - w.WriteHeader(http.StatusAccepted) - fmt.Fprintf(w, `{ - "type":"http-01", - "status":"pending", - "uri":"https://ca.tld/acme/challenge/publickey/id1", - "token":"token1", - "keyAuthorization":%q - }`, keyAuth) - })) - defer ts.Close() - - cl := Client{Key: testKeyEC} - c, err := cl.Accept(context.Background(), &Challenge{ - URI: ts.URL, - Token: "token1", - Type: "http-01", - }) - if err != nil { - t.Fatal(err) - } - - if c.Type != "http-01" { - t.Errorf("c.Type = %q; want http-01", c.Type) - } - if c.URI != "https://ca.tld/acme/challenge/publickey/id1" { - t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI) - } - if c.Token != "token1" { - t.Errorf("c.Token = %q; want token1", c.Token) - } -} - -func TestNewCert(t *testing.T) { - notBefore := time.Now() - notAfter := notBefore.AddDate(0, 2, 0) - timeNow = func() time.Time { return notBefore } - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "test-nonce") - return - } - if r.Method != "POST" { - t.Errorf("r.Method = %q; want POST", r.Method) - } - - var j struct { - Resource string `json:"resource"` - CSR string `json:"csr"` - NotBefore string `json:"notBefore,omitempty"` - NotAfter string `json:"notAfter,omitempty"` - } - decodeJWSRequest(t, &j, r) - - // Test request - if j.Resource != "new-cert" { - t.Errorf(`resource = %q; want "new-cert"`, j.Resource) - } - if j.NotBefore != notBefore.Format(time.RFC3339) { - t.Errorf(`notBefore = %q; wanted %q`, j.NotBefore, notBefore.Format(time.RFC3339)) - } - if j.NotAfter != notAfter.Format(time.RFC3339) { - t.Errorf(`notAfter = %q; wanted %q`, j.NotAfter, notAfter.Format(time.RFC3339)) - } - - // Respond to request - template := x509.Certificate{ - SerialNumber: big.NewInt(int64(1)), - Subject: pkix.Name{ - Organization: []string{"goacme"}, - }, - NotBefore: notBefore, - NotAfter: notAfter, - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - BasicConstraintsValid: true, - } - - sampleCert, err := x509.CreateCertificate(rand.Reader, &template, &template, &testKeyEC.PublicKey, testKeyEC) - if err != nil { - t.Fatalf("Error creating certificate: %v", err) - } - - w.Header().Set("Location", "https://ca.tld/acme/cert/1") - w.WriteHeader(http.StatusCreated) - w.Write(sampleCert) - })) - defer ts.Close() - - csr := x509.CertificateRequest{ - Version: 0, - Subject: pkix.Name{ - CommonName: "example.com", - Organization: []string{"goacme"}, - }, - } - csrb, err := x509.CreateCertificateRequest(rand.Reader, &csr, testKeyEC) - if err != nil { - t.Fatal(err) - } - - c := Client{Key: testKeyEC, dir: &Directory{CertURL: ts.URL}} - cert, certURL, err := c.CreateCert(context.Background(), csrb, notAfter.Sub(notBefore), false) - if err != nil { - t.Fatal(err) - } - if cert == nil { - t.Errorf("cert is nil") - } - if certURL != "https://ca.tld/acme/cert/1" { - t.Errorf("certURL = %q; want https://ca.tld/acme/cert/1", certURL) - } -} - -func TestFetchCert(t *testing.T) { - var count byte - var ts *httptest.Server - ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - count++ - if count < 3 { - up := fmt.Sprintf("<%s>;rel=up", ts.URL) - w.Header().Set("Link", up) - } - w.Write([]byte{count}) - })) - defer ts.Close() - res, err := (&Client{}).FetchCert(context.Background(), ts.URL, true) - if err != nil { - t.Fatalf("FetchCert: %v", err) - } - cert := [][]byte{{1}, {2}, {3}} - if !reflect.DeepEqual(res, cert) { - t.Errorf("res = %v; want %v", res, cert) - } -} - -func TestFetchCertRetry(t *testing.T) { - var count int - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if count < 1 { - w.Header().Set("Retry-After", "0") - w.WriteHeader(http.StatusTooManyRequests) - count++ - return - } - w.Write([]byte{1}) - })) - defer ts.Close() - res, err := (&Client{}).FetchCert(context.Background(), ts.URL, false) - if err != nil { - t.Fatalf("FetchCert: %v", err) - } - cert := [][]byte{{1}} - if !reflect.DeepEqual(res, cert) { - t.Errorf("res = %v; want %v", res, cert) - } -} - -func TestFetchCertCancel(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Retry-After", "0") - w.WriteHeader(http.StatusAccepted) - })) - defer ts.Close() - ctx, cancel := context.WithCancel(context.Background()) - done := make(chan struct{}) - var err error - go func() { - _, err = (&Client{}).FetchCert(ctx, ts.URL, false) - close(done) - }() - cancel() - <-done - if err != context.Canceled { - t.Errorf("err = %v; want %v", err, context.Canceled) - } -} - -func TestFetchCertDepth(t *testing.T) { - var count byte - var ts *httptest.Server - ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - count++ - if count > maxChainLen+1 { - t.Errorf("count = %d; want at most %d", count, maxChainLen+1) - w.WriteHeader(http.StatusInternalServerError) - } - w.Header().Set("Link", fmt.Sprintf("<%s>;rel=up", ts.URL)) - w.Write([]byte{count}) - })) - defer ts.Close() - _, err := (&Client{}).FetchCert(context.Background(), ts.URL, true) - if err == nil { - t.Errorf("err is nil") - } -} - -func TestFetchCertBreadth(t *testing.T) { - var ts *httptest.Server - ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - for i := 0; i < maxChainLen+1; i++ { - w.Header().Add("Link", fmt.Sprintf("<%s>;rel=up", ts.URL)) - } - w.Write([]byte{1}) - })) - defer ts.Close() - _, err := (&Client{}).FetchCert(context.Background(), ts.URL, true) - if err == nil { - t.Errorf("err is nil") - } -} - -func TestFetchCertSize(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - b := bytes.Repeat([]byte{1}, maxCertSize+1) - w.Write(b) - })) - defer ts.Close() - _, err := (&Client{}).FetchCert(context.Background(), ts.URL, false) - if err == nil { - t.Errorf("err is nil") - } -} - -func TestRevokeCert(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == "HEAD" { - w.Header().Set("Replay-Nonce", "nonce") - return - } - - var req struct { - Resource string - Certificate string - Reason int - } - decodeJWSRequest(t, &req, r) - if req.Resource != "revoke-cert" { - t.Errorf("req.Resource = %q; want revoke-cert", req.Resource) - } - if req.Reason != 1 { - t.Errorf("req.Reason = %d; want 1", req.Reason) - } - // echo -n cert | base64 | tr -d '=' | tr '/+' '_-' - cert := "Y2VydA" - if req.Certificate != cert { - t.Errorf("req.Certificate = %q; want %q", req.Certificate, cert) - } - })) - defer ts.Close() - client := &Client{ - Key: testKeyEC, - dir: &Directory{RevokeURL: ts.URL}, - } - ctx := context.Background() - if err := client.RevokeCert(ctx, nil, []byte("cert"), CRLReasonKeyCompromise); err != nil { - t.Fatal(err) - } -} - -func TestNonce_add(t *testing.T) { - var c Client - c.addNonce(http.Header{"Replay-Nonce": {"nonce"}}) - c.addNonce(http.Header{"Replay-Nonce": {}}) - c.addNonce(http.Header{"Replay-Nonce": {"nonce"}}) - - nonces := map[string]struct{}{"nonce": {}} - if !reflect.DeepEqual(c.nonces, nonces) { - t.Errorf("c.nonces = %q; want %q", c.nonces, nonces) - } -} - -func TestNonce_addMax(t *testing.T) { - c := &Client{nonces: make(map[string]struct{})} - for i := 0; i < maxNonces; i++ { - c.nonces[fmt.Sprintf("%d", i)] = struct{}{} - } - c.addNonce(http.Header{"Replay-Nonce": {"nonce"}}) - if n := len(c.nonces); n != maxNonces { - t.Errorf("len(c.nonces) = %d; want %d", n, maxNonces) - } -} - -func TestNonce_fetch(t *testing.T) { - tests := []struct { - code int - nonce string - }{ - {http.StatusOK, "nonce1"}, - {http.StatusBadRequest, "nonce2"}, - {http.StatusOK, ""}, - } - var i int - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "HEAD" { - t.Errorf("%d: r.Method = %q; want HEAD", i, r.Method) - } - w.Header().Set("Replay-Nonce", tests[i].nonce) - w.WriteHeader(tests[i].code) - })) - defer ts.Close() - for ; i < len(tests); i++ { - test := tests[i] - c := &Client{} - n, err := c.fetchNonce(context.Background(), ts.URL) - if n != test.nonce { - t.Errorf("%d: n=%q; want %q", i, n, test.nonce) - } - switch { - case err == nil && test.nonce == "": - t.Errorf("%d: n=%q, err=%v; want non-nil error", i, n, err) - case err != nil && test.nonce != "": - t.Errorf("%d: n=%q, err=%v; want %q", i, n, err, test.nonce) - } - } -} - -func TestNonce_fetchError(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusTooManyRequests) - })) - defer ts.Close() - c := &Client{} - _, err := c.fetchNonce(context.Background(), ts.URL) - e, ok := err.(*Error) - if !ok { - t.Fatalf("err is %T; want *Error", err) - } - if e.StatusCode != http.StatusTooManyRequests { - t.Errorf("e.StatusCode = %d; want %d", e.StatusCode, http.StatusTooManyRequests) - } -} - -func TestNonce_postJWS(t *testing.T) { - var count int - seen := make(map[string]bool) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - count++ - w.Header().Set("Replay-Nonce", fmt.Sprintf("nonce%d", count)) - if r.Method == "HEAD" { - // We expect the client do a HEAD request - // but only to fetch the first nonce. - return - } - // Make client.Authorize happy; we're not testing its result. - defer func() { - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"status":"valid"}`)) - }() - - head, err := decodeJWSHead(r) - if err != nil { - t.Errorf("decodeJWSHead: %v", err) - return - } - if head.Nonce == "" { - t.Error("head.Nonce is empty") - return - } - if seen[head.Nonce] { - t.Errorf("nonce is already used: %q", head.Nonce) - } - seen[head.Nonce] = true - })) - defer ts.Close() - - client := Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}} - if _, err := client.Authorize(context.Background(), "example.com"); err != nil { - t.Errorf("client.Authorize 1: %v", err) - } - // The second call should not generate another extra HEAD request. - if _, err := client.Authorize(context.Background(), "example.com"); err != nil { - t.Errorf("client.Authorize 2: %v", err) - } - - if count != 3 { - t.Errorf("total requests count: %d; want 3", count) - } - if n := len(client.nonces); n != 1 { - t.Errorf("len(client.nonces) = %d; want 1", n) - } - for k := range seen { - if _, exist := client.nonces[k]; exist { - t.Errorf("used nonce %q in client.nonces", k) - } - } -} - -func TestLinkHeader(t *testing.T) { - h := http.Header{"Link": { - `;rel="next"`, - `; rel=recover`, - `; foo=bar; rel="terms-of-service"`, - `;rel="next"`, - }} - tests := []struct { - rel string - out []string - }{ - {"next", []string{"https://example.com/acme/new-authz", "dup"}}, - {"recover", []string{"https://example.com/acme/recover-reg"}}, - {"terms-of-service", []string{"https://example.com/acme/terms"}}, - {"empty", nil}, - } - for i, test := range tests { - if v := linkHeader(h, test.rel); !reflect.DeepEqual(v, test.out) { - t.Errorf("%d: linkHeader(%q): %v; want %v", i, test.rel, v, test.out) - } - } -} - -func TestTLSSNI01ChallengeCert(t *testing.T) { - const ( - token = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" - // echo -n | shasum -a 256 - san = "dbbd5eefe7b4d06eb9d1d9f5acb4c7cd.a27d320e4b30332f0b6cb441734ad7b0.acme.invalid" - ) - - client := &Client{Key: testKeyEC} - tlscert, name, err := client.TLSSNI01ChallengeCert(token) - if err != nil { - t.Fatal(err) - } - - if n := len(tlscert.Certificate); n != 1 { - t.Fatalf("len(tlscert.Certificate) = %d; want 1", n) - } - cert, err := x509.ParseCertificate(tlscert.Certificate[0]) - if err != nil { - t.Fatal(err) - } - if len(cert.DNSNames) != 1 || cert.DNSNames[0] != san { - t.Fatalf("cert.DNSNames = %v; want %q", cert.DNSNames, san) - } - if cert.DNSNames[0] != name { - t.Errorf("cert.DNSNames[0] != name: %q vs %q", cert.DNSNames[0], name) - } - if cn := cert.Subject.CommonName; cn != san { - t.Errorf("cert.Subject.CommonName = %q; want %q", cn, san) - } -} - -func TestTLSSNI02ChallengeCert(t *testing.T) { - const ( - token = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" - // echo -n evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA | shasum -a 256 - sanA = "7ea0aaa69214e71e02cebb18bb867736.09b730209baabf60e43d4999979ff139.token.acme.invalid" - // echo -n | shasum -a 256 - sanB = "dbbd5eefe7b4d06eb9d1d9f5acb4c7cd.a27d320e4b30332f0b6cb441734ad7b0.ka.acme.invalid" - ) - - client := &Client{Key: testKeyEC} - tlscert, name, err := client.TLSSNI02ChallengeCert(token) - if err != nil { - t.Fatal(err) - } - - if n := len(tlscert.Certificate); n != 1 { - t.Fatalf("len(tlscert.Certificate) = %d; want 1", n) - } - cert, err := x509.ParseCertificate(tlscert.Certificate[0]) - if err != nil { - t.Fatal(err) - } - names := []string{sanA, sanB} - if !reflect.DeepEqual(cert.DNSNames, names) { - t.Fatalf("cert.DNSNames = %v;\nwant %v", cert.DNSNames, names) - } - sort.Strings(cert.DNSNames) - i := sort.SearchStrings(cert.DNSNames, name) - if i >= len(cert.DNSNames) || cert.DNSNames[i] != name { - t.Errorf("%v doesn't have %q", cert.DNSNames, name) - } - if cn := cert.Subject.CommonName; cn != sanA { - t.Errorf("CommonName = %q; want %q", cn, sanA) - } -} - -func TestTLSALPN01ChallengeCert(t *testing.T) { - const ( - token = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" - keyAuth = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA." + testKeyECThumbprint - // echo -n | shasum -a 256 - h = "dbbd5eefe7b4d06eb9d1d9f5acb4c7cda27d320e4b30332f0b6cb441734ad7b0" - domain = "example.com" - ) - - extValue, err := hex.DecodeString(h) - if err != nil { - t.Fatal(err) - } - - client := &Client{Key: testKeyEC} - tlscert, err := client.TLSALPN01ChallengeCert(token, domain) - if err != nil { - t.Fatal(err) - } - - if n := len(tlscert.Certificate); n != 1 { - t.Fatalf("len(tlscert.Certificate) = %d; want 1", n) - } - cert, err := x509.ParseCertificate(tlscert.Certificate[0]) - if err != nil { - t.Fatal(err) - } - names := []string{domain} - if !reflect.DeepEqual(cert.DNSNames, names) { - t.Fatalf("cert.DNSNames = %v;\nwant %v", cert.DNSNames, names) - } - if cn := cert.Subject.CommonName; cn != domain { - t.Errorf("CommonName = %q; want %q", cn, domain) - } - acmeExts := []pkix.Extension{} - for _, ext := range cert.Extensions { - if idPeACMEIdentifierV1.Equal(ext.Id) { - acmeExts = append(acmeExts, ext) - } - } - if len(acmeExts) != 1 { - t.Errorf("acmeExts = %v; want exactly one", acmeExts) - } - if !acmeExts[0].Critical { - t.Errorf("acmeExt.Critical = %v; want true", acmeExts[0].Critical) - } - if bytes.Compare(acmeExts[0].Value, extValue) != 0 { - t.Errorf("acmeExt.Value = %v; want %v", acmeExts[0].Value, extValue) - } - -} - -func TestTLSChallengeCertOpt(t *testing.T) { - key, err := rsa.GenerateKey(rand.Reader, 512) - if err != nil { - t.Fatal(err) - } - tmpl := &x509.Certificate{ - SerialNumber: big.NewInt(2), - Subject: pkix.Name{Organization: []string{"Test"}}, - DNSNames: []string{"should-be-overwritten"}, - } - opts := []CertOption{WithKey(key), WithTemplate(tmpl)} - - client := &Client{Key: testKeyEC} - cert1, _, err := client.TLSSNI01ChallengeCert("token", opts...) - if err != nil { - t.Fatal(err) - } - cert2, _, err := client.TLSSNI02ChallengeCert("token", opts...) - if err != nil { - t.Fatal(err) - } - - for i, tlscert := range []tls.Certificate{cert1, cert2} { - // verify generated cert private key - tlskey, ok := tlscert.PrivateKey.(*rsa.PrivateKey) - if !ok { - t.Errorf("%d: tlscert.PrivateKey is %T; want *rsa.PrivateKey", i, tlscert.PrivateKey) - continue - } - if tlskey.D.Cmp(key.D) != 0 { - t.Errorf("%d: tlskey.D = %v; want %v", i, tlskey.D, key.D) - } - // verify generated cert public key - x509Cert, err := x509.ParseCertificate(tlscert.Certificate[0]) - if err != nil { - t.Errorf("%d: %v", i, err) - continue - } - tlspub, ok := x509Cert.PublicKey.(*rsa.PublicKey) - if !ok { - t.Errorf("%d: x509Cert.PublicKey is %T; want *rsa.PublicKey", i, x509Cert.PublicKey) - continue - } - if tlspub.N.Cmp(key.N) != 0 { - t.Errorf("%d: tlspub.N = %v; want %v", i, tlspub.N, key.N) - } - // verify template option - sn := big.NewInt(2) - if x509Cert.SerialNumber.Cmp(sn) != 0 { - t.Errorf("%d: SerialNumber = %v; want %v", i, x509Cert.SerialNumber, sn) - } - org := []string{"Test"} - if !reflect.DeepEqual(x509Cert.Subject.Organization, org) { - t.Errorf("%d: Subject.Organization = %+v; want %+v", i, x509Cert.Subject.Organization, org) - } - for _, v := range x509Cert.DNSNames { - if !strings.HasSuffix(v, ".acme.invalid") { - t.Errorf("%d: invalid DNSNames element: %q", i, v) - } - } - } -} - -func TestHTTP01Challenge(t *testing.T) { - const ( - token = "xxx" - // thumbprint is precomputed for testKeyEC in jws_test.go - value = token + "." + testKeyECThumbprint - urlpath = "/.well-known/acme-challenge/" + token - ) - client := &Client{Key: testKeyEC} - val, err := client.HTTP01ChallengeResponse(token) - if err != nil { - t.Fatal(err) - } - if val != value { - t.Errorf("val = %q; want %q", val, value) - } - if path := client.HTTP01ChallengePath(token); path != urlpath { - t.Errorf("path = %q; want %q", path, urlpath) - } -} - -func TestDNS01ChallengeRecord(t *testing.T) { - // echo -n xxx. | \ - // openssl dgst -binary -sha256 | \ - // base64 | tr -d '=' | tr '/+' '_-' - const value = "8DERMexQ5VcdJ_prpPiA0mVdp7imgbCgjsG4SqqNMIo" - - client := &Client{Key: testKeyEC} - val, err := client.DNS01ChallengeRecord("xxx") - if err != nil { - t.Fatal(err) - } - if val != value { - t.Errorf("val = %q; want %q", val, value) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert.go deleted file mode 100644 index 86f8bdb73f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert.go +++ /dev/null @@ -1,1082 +0,0 @@ -// Copyright 2016 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 autocert provides automatic access to certificates from Let's Encrypt -// and any other ACME-based CA. -// -// This package is a work in progress and makes no API stability promises. -package autocert - -import ( - "bytes" - "context" - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "errors" - "fmt" - "io" - mathrand "math/rand" - "net" - "net/http" - "path" - "strings" - "sync" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme" -) - -// createCertRetryAfter is how much time to wait before removing a failed state -// entry due to an unsuccessful createCert call. -// This is a variable instead of a const for testing. -// TODO: Consider making it configurable or an exp backoff? -var createCertRetryAfter = time.Minute - -// pseudoRand is safe for concurrent use. -var pseudoRand *lockedMathRand - -func init() { - src := mathrand.NewSource(timeNow().UnixNano()) - pseudoRand = &lockedMathRand{rnd: mathrand.New(src)} -} - -// AcceptTOS is a Manager.Prompt function that always returns true to -// indicate acceptance of the CA's Terms of Service during account -// registration. -func AcceptTOS(tosURL string) bool { return true } - -// HostPolicy specifies which host names the Manager is allowed to respond to. -// It returns a non-nil error if the host should be rejected. -// The returned error is accessible via tls.Conn.Handshake and its callers. -// See Manager's HostPolicy field and GetCertificate method docs for more details. -type HostPolicy func(ctx context.Context, host string) error - -// HostWhitelist returns a policy where only the specified host names are allowed. -// Only exact matches are currently supported. Subdomains, regexp or wildcard -// will not match. -func HostWhitelist(hosts ...string) HostPolicy { - whitelist := make(map[string]bool, len(hosts)) - for _, h := range hosts { - whitelist[h] = true - } - return func(_ context.Context, host string) error { - if !whitelist[host] { - return errors.New("acme/autocert: host not configured") - } - return nil - } -} - -// defaultHostPolicy is used when Manager.HostPolicy is not set. -func defaultHostPolicy(context.Context, string) error { - return nil -} - -// Manager is a stateful certificate manager built on top of acme.Client. -// It obtains and refreshes certificates automatically using "tls-sni-01", -// "tls-sni-02" and "http-01" challenge types, as well as providing them -// to a TLS server via tls.Config. -// -// You must specify a cache implementation, such as DirCache, -// to reuse obtained certificates across program restarts. -// Otherwise your server is very likely to exceed the certificate -// issuer's request rate limits. -type Manager struct { - // Prompt specifies a callback function to conditionally accept a CA's Terms of Service (TOS). - // The registration may require the caller to agree to the CA's TOS. - // If so, Manager calls Prompt with a TOS URL provided by the CA. Prompt should report - // whether the caller agrees to the terms. - // - // To always accept the terms, the callers can use AcceptTOS. - Prompt func(tosURL string) bool - - // Cache optionally stores and retrieves previously-obtained certificates - // and other state. If nil, certs will only be cached for the lifetime of - // the Manager. Multiple Managers can share the same Cache. - // - // Using a persistent Cache, such as DirCache, is strongly recommended. - Cache Cache - - // HostPolicy controls which domains the Manager will attempt - // to retrieve new certificates for. It does not affect cached certs. - // - // If non-nil, HostPolicy is called before requesting a new cert. - // If nil, all hosts are currently allowed. This is not recommended, - // as it opens a potential attack where clients connect to a server - // by IP address and pretend to be asking for an incorrect host name. - // Manager will attempt to obtain a certificate for that host, incorrectly, - // eventually reaching the CA's rate limit for certificate requests - // and making it impossible to obtain actual certificates. - // - // See GetCertificate for more details. - HostPolicy HostPolicy - - // RenewBefore optionally specifies how early certificates should - // be renewed before they expire. - // - // If zero, they're renewed 30 days before expiration. - RenewBefore time.Duration - - // Client is used to perform low-level operations, such as account registration - // and requesting new certificates. - // - // If Client is nil, a zero-value acme.Client is used with acme.LetsEncryptURL - // as directory endpoint. If the Client.Key is nil, a new ECDSA P-256 key is - // generated and, if Cache is not nil, stored in cache. - // - // Mutating the field after the first call of GetCertificate method will have no effect. - Client *acme.Client - - // Email optionally specifies a contact email address. - // This is used by CAs, such as Let's Encrypt, to notify about problems - // with issued certificates. - // - // If the Client's account key is already registered, Email is not used. - Email string - - // ForceRSA used to make the Manager generate RSA certificates. It is now ignored. - // - // Deprecated: the Manager will request the correct type of certificate based - // on what each client supports. - ForceRSA bool - - // ExtraExtensions are used when generating a new CSR (Certificate Request), - // thus allowing customization of the resulting certificate. - // For instance, TLS Feature Extension (RFC 7633) can be used - // to prevent an OCSP downgrade attack. - // - // The field value is passed to crypto/x509.CreateCertificateRequest - // in the template's ExtraExtensions field as is. - ExtraExtensions []pkix.Extension - - clientMu sync.Mutex - client *acme.Client // initialized by acmeClient method - - stateMu sync.Mutex - state map[certKey]*certState - - // renewal tracks the set of domains currently running renewal timers. - renewalMu sync.Mutex - renewal map[certKey]*domainRenewal - - // tokensMu guards the rest of the fields: tryHTTP01, certTokens and httpTokens. - tokensMu sync.RWMutex - // tryHTTP01 indicates whether the Manager should try "http-01" challenge type - // during the authorization flow. - tryHTTP01 bool - // httpTokens contains response body values for http-01 challenges - // and is keyed by the URL path at which a challenge response is expected - // to be provisioned. - // The entries are stored for the duration of the authorization flow. - httpTokens map[string][]byte - // certTokens contains temporary certificates for tls-sni challenges - // and is keyed by token domain name, which matches server name of ClientHello. - // Keys always have ".acme.invalid" suffix. - // The entries are stored for the duration of the authorization flow. - certTokens map[string]*tls.Certificate -} - -// certKey is the key by which certificates are tracked in state, renewal and cache. -type certKey struct { - domain string // without trailing dot - isRSA bool // RSA cert for legacy clients (as opposed to default ECDSA) - isToken bool // tls-sni challenge token cert; key type is undefined regardless of isRSA -} - -func (c certKey) String() string { - if c.isToken { - return c.domain + "+token" - } - if c.isRSA { - return c.domain + "+rsa" - } - return c.domain -} - -// GetCertificate implements the tls.Config.GetCertificate hook. -// It provides a TLS certificate for hello.ServerName host, including answering -// *.acme.invalid (TLS-SNI) challenges. All other fields of hello are ignored. -// -// If m.HostPolicy is non-nil, GetCertificate calls the policy before requesting -// a new cert. A non-nil error returned from m.HostPolicy halts TLS negotiation. -// The error is propagated back to the caller of GetCertificate and is user-visible. -// This does not affect cached certs. See HostPolicy field description for more details. -func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) { - if m.Prompt == nil { - return nil, errors.New("acme/autocert: Manager.Prompt not set") - } - - name := hello.ServerName - if name == "" { - return nil, errors.New("acme/autocert: missing server name") - } - if !strings.Contains(strings.Trim(name, "."), ".") { - return nil, errors.New("acme/autocert: server name component count invalid") - } - if strings.ContainsAny(name, `+/\`) { - return nil, errors.New("acme/autocert: server name contains invalid character") - } - - // In the worst-case scenario, the timeout needs to account for caching, host policy, - // domain ownership verification and certificate issuance. - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) - defer cancel() - - // check whether this is a token cert requested for TLS-SNI challenge - if strings.HasSuffix(name, ".acme.invalid") { - m.tokensMu.RLock() - defer m.tokensMu.RUnlock() - if cert := m.certTokens[name]; cert != nil { - return cert, nil - } - if cert, err := m.cacheGet(ctx, certKey{domain: name, isToken: true}); err == nil { - return cert, nil - } - // TODO: cache error results? - return nil, fmt.Errorf("acme/autocert: no token cert for %q", name) - } - - // regular domain - ck := certKey{ - domain: strings.TrimSuffix(name, "."), // golang.org/issue/18114 - isRSA: !supportsECDSA(hello), - } - cert, err := m.cert(ctx, ck) - if err == nil { - return cert, nil - } - if err != ErrCacheMiss { - return nil, err - } - - // first-time - if err := m.hostPolicy()(ctx, name); err != nil { - return nil, err - } - cert, err = m.createCert(ctx, ck) - if err != nil { - return nil, err - } - m.cachePut(ctx, ck, cert) - return cert, nil -} - -func supportsECDSA(hello *tls.ClientHelloInfo) bool { - // The "signature_algorithms" extension, if present, limits the key exchange - // algorithms allowed by the cipher suites. See RFC 5246, section 7.4.1.4.1. - if hello.SignatureSchemes != nil { - ecdsaOK := false - schemeLoop: - for _, scheme := range hello.SignatureSchemes { - const tlsECDSAWithSHA1 tls.SignatureScheme = 0x0203 // constant added in Go 1.10 - switch scheme { - case tlsECDSAWithSHA1, tls.ECDSAWithP256AndSHA256, - tls.ECDSAWithP384AndSHA384, tls.ECDSAWithP521AndSHA512: - ecdsaOK = true - break schemeLoop - } - } - if !ecdsaOK { - return false - } - } - if hello.SupportedCurves != nil { - ecdsaOK := false - for _, curve := range hello.SupportedCurves { - if curve == tls.CurveP256 { - ecdsaOK = true - break - } - } - if !ecdsaOK { - return false - } - } - for _, suite := range hello.CipherSuites { - switch suite { - case tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: - return true - } - } - return false -} - -// HTTPHandler configures the Manager to provision ACME "http-01" challenge responses. -// It returns an http.Handler that responds to the challenges and must be -// running on port 80. If it receives a request that is not an ACME challenge, -// it delegates the request to the optional fallback handler. -// -// If fallback is nil, the returned handler redirects all GET and HEAD requests -// to the default TLS port 443 with 302 Found status code, preserving the original -// request path and query. It responds with 400 Bad Request to all other HTTP methods. -// The fallback is not protected by the optional HostPolicy. -// -// Because the fallback handler is run with unencrypted port 80 requests, -// the fallback should not serve TLS-only requests. -// -// If HTTPHandler is never called, the Manager will only use TLS SNI -// challenges for domain verification. -func (m *Manager) HTTPHandler(fallback http.Handler) http.Handler { - m.tokensMu.Lock() - defer m.tokensMu.Unlock() - m.tryHTTP01 = true - - if fallback == nil { - fallback = http.HandlerFunc(handleHTTPRedirect) - } - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if !strings.HasPrefix(r.URL.Path, "/.well-known/acme-challenge/") { - fallback.ServeHTTP(w, r) - return - } - // A reasonable context timeout for cache and host policy only, - // because we don't wait for a new certificate issuance here. - ctx, cancel := context.WithTimeout(r.Context(), time.Minute) - defer cancel() - if err := m.hostPolicy()(ctx, r.Host); err != nil { - http.Error(w, err.Error(), http.StatusForbidden) - return - } - data, err := m.httpToken(ctx, r.URL.Path) - if err != nil { - http.Error(w, err.Error(), http.StatusNotFound) - return - } - w.Write(data) - }) -} - -func handleHTTPRedirect(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" && r.Method != "HEAD" { - http.Error(w, "Use HTTPS", http.StatusBadRequest) - return - } - target := "https://" + stripPort(r.Host) + r.URL.RequestURI() - http.Redirect(w, r, target, http.StatusFound) -} - -func stripPort(hostport string) string { - host, _, err := net.SplitHostPort(hostport) - if err != nil { - return hostport - } - return net.JoinHostPort(host, "443") -} - -// cert returns an existing certificate either from m.state or cache. -// If a certificate is found in cache but not in m.state, the latter will be filled -// with the cached value. -func (m *Manager) cert(ctx context.Context, ck certKey) (*tls.Certificate, error) { - m.stateMu.Lock() - if s, ok := m.state[ck]; ok { - m.stateMu.Unlock() - s.RLock() - defer s.RUnlock() - return s.tlscert() - } - defer m.stateMu.Unlock() - cert, err := m.cacheGet(ctx, ck) - if err != nil { - return nil, err - } - signer, ok := cert.PrivateKey.(crypto.Signer) - if !ok { - return nil, errors.New("acme/autocert: private key cannot sign") - } - if m.state == nil { - m.state = make(map[certKey]*certState) - } - s := &certState{ - key: signer, - cert: cert.Certificate, - leaf: cert.Leaf, - } - m.state[ck] = s - go m.renew(ck, s.key, s.leaf.NotAfter) - return cert, nil -} - -// cacheGet always returns a valid certificate, or an error otherwise. -// If a cached certificate exists but is not valid, ErrCacheMiss is returned. -func (m *Manager) cacheGet(ctx context.Context, ck certKey) (*tls.Certificate, error) { - if m.Cache == nil { - return nil, ErrCacheMiss - } - data, err := m.Cache.Get(ctx, ck.String()) - if err != nil { - return nil, err - } - - // private - priv, pub := pem.Decode(data) - if priv == nil || !strings.Contains(priv.Type, "PRIVATE") { - return nil, ErrCacheMiss - } - privKey, err := parsePrivateKey(priv.Bytes) - if err != nil { - return nil, err - } - - // public - var pubDER [][]byte - for len(pub) > 0 { - var b *pem.Block - b, pub = pem.Decode(pub) - if b == nil { - break - } - pubDER = append(pubDER, b.Bytes) - } - if len(pub) > 0 { - // Leftover content not consumed by pem.Decode. Corrupt. Ignore. - return nil, ErrCacheMiss - } - - // verify and create TLS cert - leaf, err := validCert(ck, pubDER, privKey) - if err != nil { - return nil, ErrCacheMiss - } - tlscert := &tls.Certificate{ - Certificate: pubDER, - PrivateKey: privKey, - Leaf: leaf, - } - return tlscert, nil -} - -func (m *Manager) cachePut(ctx context.Context, ck certKey, tlscert *tls.Certificate) error { - if m.Cache == nil { - return nil - } - - // contains PEM-encoded data - var buf bytes.Buffer - - // private - switch key := tlscert.PrivateKey.(type) { - case *ecdsa.PrivateKey: - if err := encodeECDSAKey(&buf, key); err != nil { - return err - } - case *rsa.PrivateKey: - b := x509.MarshalPKCS1PrivateKey(key) - pb := &pem.Block{Type: "RSA PRIVATE KEY", Bytes: b} - if err := pem.Encode(&buf, pb); err != nil { - return err - } - default: - return errors.New("acme/autocert: unknown private key type") - } - - // public - for _, b := range tlscert.Certificate { - pb := &pem.Block{Type: "CERTIFICATE", Bytes: b} - if err := pem.Encode(&buf, pb); err != nil { - return err - } - } - - return m.Cache.Put(ctx, ck.String(), buf.Bytes()) -} - -func encodeECDSAKey(w io.Writer, key *ecdsa.PrivateKey) error { - b, err := x509.MarshalECPrivateKey(key) - if err != nil { - return err - } - pb := &pem.Block{Type: "EC PRIVATE KEY", Bytes: b} - return pem.Encode(w, pb) -} - -// createCert starts the domain ownership verification and returns a certificate -// for that domain upon success. -// -// If the domain is already being verified, it waits for the existing verification to complete. -// Either way, createCert blocks for the duration of the whole process. -func (m *Manager) createCert(ctx context.Context, ck certKey) (*tls.Certificate, error) { - // TODO: maybe rewrite this whole piece using sync.Once - state, err := m.certState(ck) - if err != nil { - return nil, err - } - // state may exist if another goroutine is already working on it - // in which case just wait for it to finish - if !state.locked { - state.RLock() - defer state.RUnlock() - return state.tlscert() - } - - // We are the first; state is locked. - // Unblock the readers when domain ownership is verified - // and we got the cert or the process failed. - defer state.Unlock() - state.locked = false - - der, leaf, err := m.authorizedCert(ctx, state.key, ck) - if err != nil { - // Remove the failed state after some time, - // making the manager call createCert again on the following TLS hello. - time.AfterFunc(createCertRetryAfter, func() { - defer testDidRemoveState(ck) - m.stateMu.Lock() - defer m.stateMu.Unlock() - // Verify the state hasn't changed and it's still invalid - // before deleting. - s, ok := m.state[ck] - if !ok { - return - } - if _, err := validCert(ck, s.cert, s.key); err == nil { - return - } - delete(m.state, ck) - }) - return nil, err - } - state.cert = der - state.leaf = leaf - go m.renew(ck, state.key, state.leaf.NotAfter) - return state.tlscert() -} - -// certState returns a new or existing certState. -// If a new certState is returned, state.exist is false and the state is locked. -// The returned error is non-nil only in the case where a new state could not be created. -func (m *Manager) certState(ck certKey) (*certState, error) { - m.stateMu.Lock() - defer m.stateMu.Unlock() - if m.state == nil { - m.state = make(map[certKey]*certState) - } - // existing state - if state, ok := m.state[ck]; ok { - return state, nil - } - - // new locked state - var ( - err error - key crypto.Signer - ) - if ck.isRSA { - key, err = rsa.GenerateKey(rand.Reader, 2048) - } else { - key, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - } - if err != nil { - return nil, err - } - - state := &certState{ - key: key, - locked: true, - } - state.Lock() // will be unlocked by m.certState caller - m.state[ck] = state - return state, nil -} - -// authorizedCert starts the domain ownership verification process and requests a new cert upon success. -// The key argument is the certificate private key. -func (m *Manager) authorizedCert(ctx context.Context, key crypto.Signer, ck certKey) (der [][]byte, leaf *x509.Certificate, err error) { - client, err := m.acmeClient(ctx) - if err != nil { - return nil, nil, err - } - - if err := m.verify(ctx, client, ck.domain); err != nil { - return nil, nil, err - } - csr, err := certRequest(key, ck.domain, m.ExtraExtensions) - if err != nil { - return nil, nil, err - } - der, _, err = client.CreateCert(ctx, csr, 0, true) - if err != nil { - return nil, nil, err - } - leaf, err = validCert(ck, der, key) - if err != nil { - return nil, nil, err - } - return der, leaf, nil -} - -// revokePendingAuthz revokes all authorizations idenfied by the elements of uri slice. -// It ignores revocation errors. -func (m *Manager) revokePendingAuthz(ctx context.Context, uri []string) { - client, err := m.acmeClient(ctx) - if err != nil { - return - } - for _, u := range uri { - client.RevokeAuthorization(ctx, u) - } -} - -// verify runs the identifier (domain) authorization flow -// using each applicable ACME challenge type. -func (m *Manager) verify(ctx context.Context, client *acme.Client, domain string) error { - // The list of challenge types we'll try to fulfill - // in this specific order. - challengeTypes := []string{"tls-sni-02", "tls-sni-01"} - m.tokensMu.RLock() - if m.tryHTTP01 { - challengeTypes = append(challengeTypes, "http-01") - } - m.tokensMu.RUnlock() - - // Keep track of pending authzs and revoke the ones that did not validate. - pendingAuthzs := make(map[string]bool) - defer func() { - var uri []string - for k, pending := range pendingAuthzs { - if pending { - uri = append(uri, k) - } - } - if len(uri) > 0 { - // Use "detached" background context. - // The revocations need not happen in the current verification flow. - go m.revokePendingAuthz(context.Background(), uri) - } - }() - - var nextTyp int // challengeType index of the next challenge type to try - for { - // Start domain authorization and get the challenge. - authz, err := client.Authorize(ctx, domain) - if err != nil { - return err - } - // No point in accepting challenges if the authorization status - // is in a final state. - switch authz.Status { - case acme.StatusValid: - return nil // already authorized - case acme.StatusInvalid: - return fmt.Errorf("acme/autocert: invalid authorization %q", authz.URI) - } - - pendingAuthzs[authz.URI] = true - - // Pick the next preferred challenge. - var chal *acme.Challenge - for chal == nil && nextTyp < len(challengeTypes) { - chal = pickChallenge(challengeTypes[nextTyp], authz.Challenges) - nextTyp++ - } - if chal == nil { - return fmt.Errorf("acme/autocert: unable to authorize %q; tried %q", domain, challengeTypes) - } - cleanup, err := m.fulfill(ctx, client, chal) - if err != nil { - continue - } - defer cleanup() - if _, err := client.Accept(ctx, chal); err != nil { - continue - } - - // A challenge is fulfilled and accepted: wait for the CA to validate. - if _, err := client.WaitAuthorization(ctx, authz.URI); err == nil { - delete(pendingAuthzs, authz.URI) - return nil - } - } -} - -// fulfill provisions a response to the challenge chal. -// The cleanup is non-nil only if provisioning succeeded. -func (m *Manager) fulfill(ctx context.Context, client *acme.Client, chal *acme.Challenge) (cleanup func(), err error) { - switch chal.Type { - case "tls-sni-01": - cert, name, err := client.TLSSNI01ChallengeCert(chal.Token) - if err != nil { - return nil, err - } - m.putCertToken(ctx, name, &cert) - return func() { go m.deleteCertToken(name) }, nil - case "tls-sni-02": - cert, name, err := client.TLSSNI02ChallengeCert(chal.Token) - if err != nil { - return nil, err - } - m.putCertToken(ctx, name, &cert) - return func() { go m.deleteCertToken(name) }, nil - case "http-01": - resp, err := client.HTTP01ChallengeResponse(chal.Token) - if err != nil { - return nil, err - } - p := client.HTTP01ChallengePath(chal.Token) - m.putHTTPToken(ctx, p, resp) - return func() { go m.deleteHTTPToken(p) }, nil - } - return nil, fmt.Errorf("acme/autocert: unknown challenge type %q", chal.Type) -} - -func pickChallenge(typ string, chal []*acme.Challenge) *acme.Challenge { - for _, c := range chal { - if c.Type == typ { - return c - } - } - return nil -} - -// putCertToken stores the token certificate with the specified name -// in both m.certTokens map and m.Cache. -func (m *Manager) putCertToken(ctx context.Context, name string, cert *tls.Certificate) { - m.tokensMu.Lock() - defer m.tokensMu.Unlock() - if m.certTokens == nil { - m.certTokens = make(map[string]*tls.Certificate) - } - m.certTokens[name] = cert - m.cachePut(ctx, certKey{domain: name, isToken: true}, cert) -} - -// deleteCertToken removes the token certificate with the specified name -// from both m.certTokens map and m.Cache. -func (m *Manager) deleteCertToken(name string) { - m.tokensMu.Lock() - defer m.tokensMu.Unlock() - delete(m.certTokens, name) - if m.Cache != nil { - ck := certKey{domain: name, isToken: true} - m.Cache.Delete(context.Background(), ck.String()) - } -} - -// httpToken retrieves an existing http-01 token value from an in-memory map -// or the optional cache. -func (m *Manager) httpToken(ctx context.Context, tokenPath string) ([]byte, error) { - m.tokensMu.RLock() - defer m.tokensMu.RUnlock() - if v, ok := m.httpTokens[tokenPath]; ok { - return v, nil - } - if m.Cache == nil { - return nil, fmt.Errorf("acme/autocert: no token at %q", tokenPath) - } - return m.Cache.Get(ctx, httpTokenCacheKey(tokenPath)) -} - -// putHTTPToken stores an http-01 token value using tokenPath as key -// in both in-memory map and the optional Cache. -// -// It ignores any error returned from Cache.Put. -func (m *Manager) putHTTPToken(ctx context.Context, tokenPath, val string) { - m.tokensMu.Lock() - defer m.tokensMu.Unlock() - if m.httpTokens == nil { - m.httpTokens = make(map[string][]byte) - } - b := []byte(val) - m.httpTokens[tokenPath] = b - if m.Cache != nil { - m.Cache.Put(ctx, httpTokenCacheKey(tokenPath), b) - } -} - -// deleteHTTPToken removes an http-01 token value from both in-memory map -// and the optional Cache, ignoring any error returned from the latter. -// -// If m.Cache is non-nil, it blocks until Cache.Delete returns without a timeout. -func (m *Manager) deleteHTTPToken(tokenPath string) { - m.tokensMu.Lock() - defer m.tokensMu.Unlock() - delete(m.httpTokens, tokenPath) - if m.Cache != nil { - m.Cache.Delete(context.Background(), httpTokenCacheKey(tokenPath)) - } -} - -// httpTokenCacheKey returns a key at which an http-01 token value may be stored -// in the Manager's optional Cache. -func httpTokenCacheKey(tokenPath string) string { - return path.Base(tokenPath) + "+http-01" -} - -// renew starts a cert renewal timer loop, one per domain. -// -// The loop is scheduled in two cases: -// - a cert was fetched from cache for the first time (wasn't in m.state) -// - a new cert was created by m.createCert -// -// The key argument is a certificate private key. -// The exp argument is the cert expiration time (NotAfter). -func (m *Manager) renew(ck certKey, key crypto.Signer, exp time.Time) { - m.renewalMu.Lock() - defer m.renewalMu.Unlock() - if m.renewal[ck] != nil { - // another goroutine is already on it - return - } - if m.renewal == nil { - m.renewal = make(map[certKey]*domainRenewal) - } - dr := &domainRenewal{m: m, ck: ck, key: key} - m.renewal[ck] = dr - dr.start(exp) -} - -// stopRenew stops all currently running cert renewal timers. -// The timers are not restarted during the lifetime of the Manager. -func (m *Manager) stopRenew() { - m.renewalMu.Lock() - defer m.renewalMu.Unlock() - for name, dr := range m.renewal { - delete(m.renewal, name) - dr.stop() - } -} - -func (m *Manager) accountKey(ctx context.Context) (crypto.Signer, error) { - const keyName = "acme_account+key" - - // Previous versions of autocert stored the value under a different key. - const legacyKeyName = "acme_account.key" - - genKey := func() (*ecdsa.PrivateKey, error) { - return ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - } - - if m.Cache == nil { - return genKey() - } - - data, err := m.Cache.Get(ctx, keyName) - if err == ErrCacheMiss { - data, err = m.Cache.Get(ctx, legacyKeyName) - } - if err == ErrCacheMiss { - key, err := genKey() - if err != nil { - return nil, err - } - var buf bytes.Buffer - if err := encodeECDSAKey(&buf, key); err != nil { - return nil, err - } - if err := m.Cache.Put(ctx, keyName, buf.Bytes()); err != nil { - return nil, err - } - return key, nil - } - if err != nil { - return nil, err - } - - priv, _ := pem.Decode(data) - if priv == nil || !strings.Contains(priv.Type, "PRIVATE") { - return nil, errors.New("acme/autocert: invalid account key found in cache") - } - return parsePrivateKey(priv.Bytes) -} - -func (m *Manager) acmeClient(ctx context.Context) (*acme.Client, error) { - m.clientMu.Lock() - defer m.clientMu.Unlock() - if m.client != nil { - return m.client, nil - } - - client := m.Client - if client == nil { - client = &acme.Client{DirectoryURL: acme.LetsEncryptURL} - } - if client.Key == nil { - var err error - client.Key, err = m.accountKey(ctx) - if err != nil { - return nil, err - } - } - var contact []string - if m.Email != "" { - contact = []string{"mailto:" + m.Email} - } - a := &acme.Account{Contact: contact} - _, err := client.Register(ctx, a, m.Prompt) - if ae, ok := err.(*acme.Error); err == nil || ok && ae.StatusCode == http.StatusConflict { - // conflict indicates the key is already registered - m.client = client - err = nil - } - return m.client, err -} - -func (m *Manager) hostPolicy() HostPolicy { - if m.HostPolicy != nil { - return m.HostPolicy - } - return defaultHostPolicy -} - -func (m *Manager) renewBefore() time.Duration { - if m.RenewBefore > renewJitter { - return m.RenewBefore - } - return 720 * time.Hour // 30 days -} - -// certState is ready when its mutex is unlocked for reading. -type certState struct { - sync.RWMutex - locked bool // locked for read/write - key crypto.Signer // private key for cert - cert [][]byte // DER encoding - leaf *x509.Certificate // parsed cert[0]; always non-nil if cert != nil -} - -// tlscert creates a tls.Certificate from s.key and s.cert. -// Callers should wrap it in s.RLock() and s.RUnlock(). -func (s *certState) tlscert() (*tls.Certificate, error) { - if s.key == nil { - return nil, errors.New("acme/autocert: missing signer") - } - if len(s.cert) == 0 { - return nil, errors.New("acme/autocert: missing certificate") - } - return &tls.Certificate{ - PrivateKey: s.key, - Certificate: s.cert, - Leaf: s.leaf, - }, nil -} - -// certRequest generates a CSR for the given common name cn and optional SANs. -func certRequest(key crypto.Signer, cn string, ext []pkix.Extension, san ...string) ([]byte, error) { - req := &x509.CertificateRequest{ - Subject: pkix.Name{CommonName: cn}, - DNSNames: san, - ExtraExtensions: ext, - } - return x509.CreateCertificateRequest(rand.Reader, req, key) -} - -// Attempt to parse the given private key DER block. OpenSSL 0.9.8 generates -// PKCS#1 private keys by default, while OpenSSL 1.0.0 generates PKCS#8 keys. -// OpenSSL ecparam generates SEC1 EC private keys for ECDSA. We try all three. -// -// Inspired by parsePrivateKey in crypto/tls/tls.go. -func parsePrivateKey(der []byte) (crypto.Signer, error) { - if key, err := x509.ParsePKCS1PrivateKey(der); err == nil { - return key, nil - } - if key, err := x509.ParsePKCS8PrivateKey(der); err == nil { - switch key := key.(type) { - case *rsa.PrivateKey: - return key, nil - case *ecdsa.PrivateKey: - return key, nil - default: - return nil, errors.New("acme/autocert: unknown private key type in PKCS#8 wrapping") - } - } - if key, err := x509.ParseECPrivateKey(der); err == nil { - return key, nil - } - - return nil, errors.New("acme/autocert: failed to parse private key") -} - -// validCert parses a cert chain provided as der argument and verifies the leaf and der[0] -// correspond to the private key, the domain and key type match, and expiration dates -// are valid. It doesn't do any revocation checking. -// -// The returned value is the verified leaf cert. -func validCert(ck certKey, der [][]byte, key crypto.Signer) (leaf *x509.Certificate, err error) { - // parse public part(s) - var n int - for _, b := range der { - n += len(b) - } - pub := make([]byte, n) - n = 0 - for _, b := range der { - n += copy(pub[n:], b) - } - x509Cert, err := x509.ParseCertificates(pub) - if err != nil || len(x509Cert) == 0 { - return nil, errors.New("acme/autocert: no public key found") - } - // verify the leaf is not expired and matches the domain name - leaf = x509Cert[0] - now := timeNow() - if now.Before(leaf.NotBefore) { - return nil, errors.New("acme/autocert: certificate is not valid yet") - } - if now.After(leaf.NotAfter) { - return nil, errors.New("acme/autocert: expired certificate") - } - if err := leaf.VerifyHostname(ck.domain); err != nil { - return nil, err - } - // ensure the leaf corresponds to the private key and matches the certKey type - switch pub := leaf.PublicKey.(type) { - case *rsa.PublicKey: - prv, ok := key.(*rsa.PrivateKey) - if !ok { - return nil, errors.New("acme/autocert: private key type does not match public key type") - } - if pub.N.Cmp(prv.N) != 0 { - return nil, errors.New("acme/autocert: private key does not match public key") - } - if !ck.isRSA && !ck.isToken { - return nil, errors.New("acme/autocert: key type does not match expected value") - } - case *ecdsa.PublicKey: - prv, ok := key.(*ecdsa.PrivateKey) - if !ok { - return nil, errors.New("acme/autocert: private key type does not match public key type") - } - if pub.X.Cmp(prv.X) != 0 || pub.Y.Cmp(prv.Y) != 0 { - return nil, errors.New("acme/autocert: private key does not match public key") - } - if ck.isRSA && !ck.isToken { - return nil, errors.New("acme/autocert: key type does not match expected value") - } - default: - return nil, errors.New("acme/autocert: unknown public key algorithm") - } - return leaf, nil -} - -type lockedMathRand struct { - sync.Mutex - rnd *mathrand.Rand -} - -func (r *lockedMathRand) int63n(max int64) int64 { - r.Lock() - n := r.rnd.Int63n(max) - r.Unlock() - return n -} - -// For easier testing. -var ( - timeNow = time.Now - - // Called when a state is removed. - testDidRemoveState = func(certKey) {} -) diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert_test.go deleted file mode 100644 index 79c8940e60..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/autocert_test.go +++ /dev/null @@ -1,1130 +0,0 @@ -// Copyright 2016 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 autocert - -import ( - "bytes" - "context" - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "encoding/base64" - "encoding/json" - "fmt" - "html/template" - "io" - "math/big" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "sync" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme" -) - -var ( - exampleDomain = "example.org" - exampleCertKey = certKey{domain: exampleDomain} - exampleCertKeyRSA = certKey{domain: exampleDomain, isRSA: true} -) - -var discoTmpl = template.Must(template.New("disco").Parse(`{ - "new-reg": "{{.}}/new-reg", - "new-authz": "{{.}}/new-authz", - "new-cert": "{{.}}/new-cert" -}`)) - -var authzTmpl = template.Must(template.New("authz").Parse(`{ - "status": "pending", - "challenges": [ - { - "uri": "{{.}}/challenge/1", - "type": "tls-sni-01", - "token": "token-01" - }, - { - "uri": "{{.}}/challenge/2", - "type": "tls-sni-02", - "token": "token-02" - }, - { - "uri": "{{.}}/challenge/dns-01", - "type": "dns-01", - "token": "token-dns-01" - }, - { - "uri": "{{.}}/challenge/http-01", - "type": "http-01", - "token": "token-http-01" - } - ] -}`)) - -type memCache struct { - t *testing.T - mu sync.Mutex - keyData map[string][]byte -} - -func (m *memCache) Get(ctx context.Context, key string) ([]byte, error) { - m.mu.Lock() - defer m.mu.Unlock() - - v, ok := m.keyData[key] - if !ok { - return nil, ErrCacheMiss - } - return v, nil -} - -// filenameSafe returns whether all characters in s are printable ASCII -// and safe to use in a filename on most filesystems. -func filenameSafe(s string) bool { - for _, c := range s { - if c < 0x20 || c > 0x7E { - return false - } - switch c { - case '\\', '/', ':', '*', '?', '"', '<', '>', '|': - return false - } - } - return true -} - -func (m *memCache) Put(ctx context.Context, key string, data []byte) error { - if !filenameSafe(key) { - m.t.Errorf("invalid characters in cache key %q", key) - } - - m.mu.Lock() - defer m.mu.Unlock() - - m.keyData[key] = data - return nil -} - -func (m *memCache) Delete(ctx context.Context, key string) error { - m.mu.Lock() - defer m.mu.Unlock() - - delete(m.keyData, key) - return nil -} - -func newMemCache(t *testing.T) *memCache { - return &memCache{ - t: t, - keyData: make(map[string][]byte), - } -} - -func (m *memCache) numCerts() int { - m.mu.Lock() - defer m.mu.Unlock() - - res := 0 - for key := range m.keyData { - if strings.HasSuffix(key, "+token") || - strings.HasSuffix(key, "+key") || - strings.HasSuffix(key, "+http-01") { - continue - } - res++ - } - return res -} - -func dummyCert(pub interface{}, san ...string) ([]byte, error) { - return dateDummyCert(pub, time.Now(), time.Now().Add(90*24*time.Hour), san...) -} - -func dateDummyCert(pub interface{}, start, end time.Time, san ...string) ([]byte, error) { - // use EC key to run faster on 386 - key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - return nil, err - } - t := &x509.Certificate{ - SerialNumber: big.NewInt(1), - NotBefore: start, - NotAfter: end, - BasicConstraintsValid: true, - KeyUsage: x509.KeyUsageKeyEncipherment, - DNSNames: san, - } - if pub == nil { - pub = &key.PublicKey - } - return x509.CreateCertificate(rand.Reader, t, t, pub, key) -} - -func decodePayload(v interface{}, r io.Reader) error { - var req struct{ Payload string } - if err := json.NewDecoder(r).Decode(&req); err != nil { - return err - } - payload, err := base64.RawURLEncoding.DecodeString(req.Payload) - if err != nil { - return err - } - return json.Unmarshal(payload, v) -} - -func clientHelloInfo(sni string, ecdsaSupport bool) *tls.ClientHelloInfo { - hello := &tls.ClientHelloInfo{ - ServerName: sni, - CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305}, - } - if ecdsaSupport { - hello.CipherSuites = append(hello.CipherSuites, tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305) - } - return hello -} - -func TestGetCertificate(t *testing.T) { - man := &Manager{Prompt: AcceptTOS} - defer man.stopRenew() - hello := clientHelloInfo("example.org", true) - testGetCertificate(t, man, "example.org", hello) -} - -func TestGetCertificate_trailingDot(t *testing.T) { - man := &Manager{Prompt: AcceptTOS} - defer man.stopRenew() - hello := clientHelloInfo("example.org.", true) - testGetCertificate(t, man, "example.org", hello) -} - -func TestGetCertificate_ForceRSA(t *testing.T) { - man := &Manager{ - Prompt: AcceptTOS, - Cache: newMemCache(t), - ForceRSA: true, - } - defer man.stopRenew() - hello := clientHelloInfo(exampleDomain, true) - testGetCertificate(t, man, exampleDomain, hello) - - // ForceRSA was deprecated and is now ignored. - cert, err := man.cacheGet(context.Background(), exampleCertKey) - if err != nil { - t.Fatalf("man.cacheGet: %v", err) - } - if _, ok := cert.PrivateKey.(*ecdsa.PrivateKey); !ok { - t.Errorf("cert.PrivateKey is %T; want *ecdsa.PrivateKey", cert.PrivateKey) - } -} - -func TestGetCertificate_nilPrompt(t *testing.T) { - man := &Manager{} - defer man.stopRenew() - url, finish := startACMEServerStub(t, getCertificateFromManager(man, true), "example.org") - defer finish() - man.Client = &acme.Client{DirectoryURL: url} - hello := clientHelloInfo("example.org", true) - if _, err := man.GetCertificate(hello); err == nil { - t.Error("got certificate for example.org; wanted error") - } -} - -func TestGetCertificate_expiredCache(t *testing.T) { - // Make an expired cert and cache it. - pk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - tmpl := &x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{CommonName: exampleDomain}, - NotAfter: time.Now(), - } - pub, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &pk.PublicKey, pk) - if err != nil { - t.Fatal(err) - } - tlscert := &tls.Certificate{ - Certificate: [][]byte{pub}, - PrivateKey: pk, - } - - man := &Manager{Prompt: AcceptTOS, Cache: newMemCache(t)} - defer man.stopRenew() - if err := man.cachePut(context.Background(), exampleCertKey, tlscert); err != nil { - t.Fatalf("man.cachePut: %v", err) - } - - // The expired cached cert should trigger a new cert issuance - // and return without an error. - hello := clientHelloInfo(exampleDomain, true) - testGetCertificate(t, man, exampleDomain, hello) -} - -func TestGetCertificate_failedAttempt(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusBadRequest) - })) - defer ts.Close() - - d := createCertRetryAfter - f := testDidRemoveState - defer func() { - createCertRetryAfter = d - testDidRemoveState = f - }() - createCertRetryAfter = 0 - done := make(chan struct{}) - testDidRemoveState = func(ck certKey) { - if ck != exampleCertKey { - t.Errorf("testDidRemoveState: domain = %v; want %v", ck, exampleCertKey) - } - close(done) - } - - man := &Manager{ - Prompt: AcceptTOS, - Client: &acme.Client{ - DirectoryURL: ts.URL, - }, - } - defer man.stopRenew() - hello := clientHelloInfo(exampleDomain, true) - if _, err := man.GetCertificate(hello); err == nil { - t.Error("GetCertificate: err is nil") - } - select { - case <-time.After(5 * time.Second): - t.Errorf("took too long to remove the %q state", exampleCertKey) - case <-done: - man.stateMu.Lock() - defer man.stateMu.Unlock() - if v, exist := man.state[exampleCertKey]; exist { - t.Errorf("state exists for %v: %+v", exampleCertKey, v) - } - } -} - -// testGetCertificate_tokenCache tests the fallback of token certificate fetches -// to cache when Manager.certTokens misses. ecdsaSupport refers to the CA when -// verifying the certificate token. -func testGetCertificate_tokenCache(t *testing.T, ecdsaSupport bool) { - man1 := &Manager{ - Cache: newMemCache(t), - Prompt: AcceptTOS, - } - defer man1.stopRenew() - man2 := &Manager{ - Cache: man1.Cache, - Prompt: AcceptTOS, - } - defer man2.stopRenew() - - // Send the verification request to a different Manager from the one that - // initiated the authorization, when they share caches. - url, finish := startACMEServerStub(t, getCertificateFromManager(man2, ecdsaSupport), "example.org") - defer finish() - man1.Client = &acme.Client{DirectoryURL: url} - hello := clientHelloInfo("example.org", true) - if _, err := man1.GetCertificate(hello); err != nil { - t.Error(err) - } - if _, err := man2.GetCertificate(hello); err != nil { - t.Error(err) - } -} - -func TestGetCertificate_tokenCache(t *testing.T) { - t.Run("ecdsaSupport=true", func(t *testing.T) { - testGetCertificate_tokenCache(t, true) - }) - t.Run("ecdsaSupport=false", func(t *testing.T) { - testGetCertificate_tokenCache(t, false) - }) -} - -func TestGetCertificate_ecdsaVsRSA(t *testing.T) { - cache := newMemCache(t) - man := &Manager{Prompt: AcceptTOS, Cache: cache} - defer man.stopRenew() - url, finish := startACMEServerStub(t, getCertificateFromManager(man, true), "example.org") - defer finish() - man.Client = &acme.Client{DirectoryURL: url} - - cert, err := man.GetCertificate(clientHelloInfo("example.org", true)) - if err != nil { - t.Error(err) - } - if _, ok := cert.Leaf.PublicKey.(*ecdsa.PublicKey); !ok { - t.Error("an ECDSA client was served a non-ECDSA certificate") - } - - cert, err = man.GetCertificate(clientHelloInfo("example.org", false)) - if err != nil { - t.Error(err) - } - if _, ok := cert.Leaf.PublicKey.(*rsa.PublicKey); !ok { - t.Error("a RSA client was served a non-RSA certificate") - } - - if _, err := man.GetCertificate(clientHelloInfo("example.org", true)); err != nil { - t.Error(err) - } - if _, err := man.GetCertificate(clientHelloInfo("example.org", false)); err != nil { - t.Error(err) - } - if numCerts := cache.numCerts(); numCerts != 2 { - t.Errorf("found %d certificates in cache; want %d", numCerts, 2) - } -} - -func TestGetCertificate_wrongCacheKeyType(t *testing.T) { - cache := newMemCache(t) - man := &Manager{Prompt: AcceptTOS, Cache: cache} - defer man.stopRenew() - url, finish := startACMEServerStub(t, getCertificateFromManager(man, true), exampleDomain) - defer finish() - man.Client = &acme.Client{DirectoryURL: url} - - // Make an RSA cert and cache it without suffix. - pk, err := rsa.GenerateKey(rand.Reader, 512) - if err != nil { - t.Fatal(err) - } - tmpl := &x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{CommonName: exampleDomain}, - NotAfter: time.Now().Add(90 * 24 * time.Hour), - } - pub, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &pk.PublicKey, pk) - if err != nil { - t.Fatal(err) - } - rsaCert := &tls.Certificate{ - Certificate: [][]byte{pub}, - PrivateKey: pk, - } - if err := man.cachePut(context.Background(), exampleCertKey, rsaCert); err != nil { - t.Fatalf("man.cachePut: %v", err) - } - - // The RSA cached cert should be silently ignored and replaced. - cert, err := man.GetCertificate(clientHelloInfo(exampleDomain, true)) - if err != nil { - t.Error(err) - } - if _, ok := cert.Leaf.PublicKey.(*ecdsa.PublicKey); !ok { - t.Error("an ECDSA client was served a non-ECDSA certificate") - } - if numCerts := cache.numCerts(); numCerts != 1 { - t.Errorf("found %d certificates in cache; want %d", numCerts, 1) - } -} - -func getCertificateFromManager(man *Manager, ecdsaSupport bool) func(string) error { - return func(sni string) error { - _, err := man.GetCertificate(clientHelloInfo(sni, ecdsaSupport)) - return err - } -} - -// startACMEServerStub runs an ACME server -// The domain argument is the expected domain name of a certificate request. -func startACMEServerStub(t *testing.T, getCertificate func(string) error, domain string) (url string, finish func()) { - // echo token-02 | shasum -a 256 - // then divide result in 2 parts separated by dot - tokenCertName := "4e8eb87631187e9ff2153b56b13a4dec.13a35d002e485d60ff37354b32f665d9.token.acme.invalid" - verifyTokenCert := func() { - if err := getCertificate(tokenCertName); err != nil { - t.Errorf("verifyTokenCert: GetCertificate(%q): %v", tokenCertName, err) - return - } - } - - // ACME CA server stub - var ca *httptest.Server - ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Replay-Nonce", "nonce") - if r.Method == "HEAD" { - // a nonce request - return - } - - switch r.URL.Path { - // discovery - case "/": - if err := discoTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("discoTmpl: %v", err) - } - // client key registration - case "/new-reg": - w.Write([]byte("{}")) - // domain authorization - case "/new-authz": - w.Header().Set("Location", ca.URL+"/authz/1") - w.WriteHeader(http.StatusCreated) - if err := authzTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("authzTmpl: %v", err) - } - // accept tls-sni-02 challenge - case "/challenge/2": - verifyTokenCert() - w.Write([]byte("{}")) - // authorization status - case "/authz/1": - w.Write([]byte(`{"status": "valid"}`)) - // cert request - case "/new-cert": - var req struct { - CSR string `json:"csr"` - } - decodePayload(&req, r.Body) - b, _ := base64.RawURLEncoding.DecodeString(req.CSR) - csr, err := x509.ParseCertificateRequest(b) - if err != nil { - t.Errorf("new-cert: CSR: %v", err) - } - if csr.Subject.CommonName != domain { - t.Errorf("CommonName in CSR = %q; want %q", csr.Subject.CommonName, domain) - } - der, err := dummyCert(csr.PublicKey, domain) - if err != nil { - t.Errorf("new-cert: dummyCert: %v", err) - } - chainUp := fmt.Sprintf("<%s/ca-cert>; rel=up", ca.URL) - w.Header().Set("Link", chainUp) - w.WriteHeader(http.StatusCreated) - w.Write(der) - // CA chain cert - case "/ca-cert": - der, err := dummyCert(nil, "ca") - if err != nil { - t.Errorf("ca-cert: dummyCert: %v", err) - } - w.Write(der) - default: - t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path) - } - })) - finish = func() { - ca.Close() - - // make sure token cert was removed - cancel := make(chan struct{}) - done := make(chan struct{}) - go func() { - defer close(done) - tick := time.NewTicker(100 * time.Millisecond) - defer tick.Stop() - for { - if err := getCertificate(tokenCertName); err != nil { - return - } - select { - case <-tick.C: - case <-cancel: - return - } - } - }() - select { - case <-done: - case <-time.After(5 * time.Second): - close(cancel) - t.Error("token cert was not removed") - <-done - } - } - return ca.URL, finish -} - -// tests man.GetCertificate flow using the provided hello argument. -// The domain argument is the expected domain name of a certificate request. -func testGetCertificate(t *testing.T, man *Manager, domain string, hello *tls.ClientHelloInfo) { - url, finish := startACMEServerStub(t, getCertificateFromManager(man, true), domain) - defer finish() - man.Client = &acme.Client{DirectoryURL: url} - - // simulate tls.Config.GetCertificate - var tlscert *tls.Certificate - var err error - done := make(chan struct{}) - go func() { - tlscert, err = man.GetCertificate(hello) - close(done) - }() - select { - case <-time.After(time.Minute): - t.Fatal("man.GetCertificate took too long to return") - case <-done: - } - if err != nil { - t.Fatalf("man.GetCertificate: %v", err) - } - - // verify the tlscert is the same we responded with from the CA stub - if len(tlscert.Certificate) == 0 { - t.Fatal("len(tlscert.Certificate) is 0") - } - cert, err := x509.ParseCertificate(tlscert.Certificate[0]) - if err != nil { - t.Fatalf("x509.ParseCertificate: %v", err) - } - if len(cert.DNSNames) == 0 || cert.DNSNames[0] != domain { - t.Errorf("cert.DNSNames = %v; want %q", cert.DNSNames, domain) - } - -} - -func TestVerifyHTTP01(t *testing.T) { - var ( - http01 http.Handler - - authzCount int // num. of created authorizations - didAcceptHTTP01 bool - ) - - verifyHTTPToken := func() { - r := httptest.NewRequest("GET", "/.well-known/acme-challenge/token-http-01", nil) - w := httptest.NewRecorder() - http01.ServeHTTP(w, r) - if w.Code != http.StatusOK { - t.Errorf("http token: w.Code = %d; want %d", w.Code, http.StatusOK) - } - if v := w.Body.String(); !strings.HasPrefix(v, "token-http-01.") { - t.Errorf("http token value = %q; want 'token-http-01.' prefix", v) - } - } - - // ACME CA server stub, only the needed bits. - // TODO: Merge this with startACMEServerStub, making it a configurable CA for testing. - var ca *httptest.Server - ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Replay-Nonce", "nonce") - if r.Method == "HEAD" { - // a nonce request - return - } - - switch r.URL.Path { - // Discovery. - case "/": - if err := discoTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("discoTmpl: %v", err) - } - // Client key registration. - case "/new-reg": - w.Write([]byte("{}")) - // New domain authorization. - case "/new-authz": - authzCount++ - w.Header().Set("Location", fmt.Sprintf("%s/authz/%d", ca.URL, authzCount)) - w.WriteHeader(http.StatusCreated) - if err := authzTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("authzTmpl: %v", err) - } - // Accept tls-sni-02. - case "/challenge/2": - w.Write([]byte("{}")) - // Reject tls-sni-01. - case "/challenge/1": - http.Error(w, "won't accept tls-sni-01", http.StatusBadRequest) - // Should not accept dns-01. - case "/challenge/dns-01": - t.Errorf("dns-01 challenge was accepted") - http.Error(w, "won't accept dns-01", http.StatusBadRequest) - // Accept http-01. - case "/challenge/http-01": - didAcceptHTTP01 = true - verifyHTTPToken() - w.Write([]byte("{}")) - // Authorization statuses. - // Make tls-sni-xxx invalid. - case "/authz/1", "/authz/2": - w.Write([]byte(`{"status": "invalid"}`)) - case "/authz/3", "/authz/4": - w.Write([]byte(`{"status": "valid"}`)) - default: - http.NotFound(w, r) - t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path) - } - })) - defer ca.Close() - - m := &Manager{ - Client: &acme.Client{ - DirectoryURL: ca.URL, - }, - } - http01 = m.HTTPHandler(nil) - ctx := context.Background() - client, err := m.acmeClient(ctx) - if err != nil { - t.Fatalf("m.acmeClient: %v", err) - } - if err := m.verify(ctx, client, "example.org"); err != nil { - t.Errorf("m.verify: %v", err) - } - // Only tls-sni-01, tls-sni-02 and http-01 must be accepted - // The dns-01 challenge is unsupported. - if authzCount != 3 { - t.Errorf("authzCount = %d; want 3", authzCount) - } - if !didAcceptHTTP01 { - t.Error("did not accept http-01 challenge") - } -} - -func TestRevokeFailedAuthz(t *testing.T) { - // Prefill authorization URIs expected to be revoked. - // The challenges are selected in a specific order, - // each tried within a newly created authorization. - // This means each authorization URI corresponds to a different challenge type. - revokedAuthz := map[string]bool{ - "/authz/0": false, // tls-sni-02 - "/authz/1": false, // tls-sni-01 - "/authz/2": false, // no viable challenge, but authz is created - } - - var authzCount int // num. of created authorizations - var revokeCount int // num. of revoked authorizations - done := make(chan struct{}) // closed when revokeCount is 3 - - // ACME CA server stub, only the needed bits. - // TODO: Merge this with startACMEServerStub, making it a configurable CA for testing. - var ca *httptest.Server - ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Replay-Nonce", "nonce") - if r.Method == "HEAD" { - // a nonce request - return - } - - switch r.URL.Path { - // Discovery. - case "/": - if err := discoTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("discoTmpl: %v", err) - } - // Client key registration. - case "/new-reg": - w.Write([]byte("{}")) - // New domain authorization. - case "/new-authz": - w.Header().Set("Location", fmt.Sprintf("%s/authz/%d", ca.URL, authzCount)) - w.WriteHeader(http.StatusCreated) - if err := authzTmpl.Execute(w, ca.URL); err != nil { - t.Errorf("authzTmpl: %v", err) - } - authzCount++ - // tls-sni-02 challenge "accept" request. - case "/challenge/2": - // Refuse. - http.Error(w, "won't accept tls-sni-02 challenge", http.StatusBadRequest) - // tls-sni-01 challenge "accept" request. - case "/challenge/1": - // Accept but the authorization will be "expired". - w.Write([]byte("{}")) - // Authorization requests. - case "/authz/0", "/authz/1", "/authz/2": - // Revocation requests. - if r.Method == "POST" { - var req struct{ Status string } - if err := decodePayload(&req, r.Body); err != nil { - t.Errorf("%s: decodePayload: %v", r.URL, err) - } - switch req.Status { - case "deactivated": - revokedAuthz[r.URL.Path] = true - revokeCount++ - if revokeCount >= 3 { - // Last authorization is revoked. - defer close(done) - } - default: - t.Errorf("%s: req.Status = %q; want 'deactivated'", r.URL, req.Status) - } - w.Write([]byte(`{"status": "invalid"}`)) - return - } - // Authorization status requests. - // Simulate abandoned authorization, deleted by the CA. - w.WriteHeader(http.StatusNotFound) - default: - http.NotFound(w, r) - t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path) - } - })) - defer ca.Close() - - m := &Manager{ - Client: &acme.Client{DirectoryURL: ca.URL}, - } - // Should fail and revoke 3 authorizations. - // The first 2 are tsl-sni-02 and tls-sni-01 challenges. - // The third time an authorization is created but no viable challenge is found. - // See revokedAuthz above for more explanation. - if _, err := m.createCert(context.Background(), exampleCertKey); err == nil { - t.Errorf("m.createCert returned nil error") - } - select { - case <-time.After(3 * time.Second): - t.Error("revocations took too long") - case <-done: - // revokeCount is at least 3. - } - for uri, ok := range revokedAuthz { - if !ok { - t.Errorf("%q authorization was not revoked", uri) - } - } -} - -func TestHTTPHandlerDefaultFallback(t *testing.T) { - tt := []struct { - method, url string - wantCode int - wantLocation string - }{ - {"GET", "http://example.org", 302, "https://example.org/"}, - {"GET", "http://example.org/foo", 302, "https://example.org/foo"}, - {"GET", "http://example.org/foo/bar/", 302, "https://example.org/foo/bar/"}, - {"GET", "http://example.org/?a=b", 302, "https://example.org/?a=b"}, - {"GET", "http://example.org/foo?a=b", 302, "https://example.org/foo?a=b"}, - {"GET", "http://example.org:80/foo?a=b", 302, "https://example.org:443/foo?a=b"}, - {"GET", "http://example.org:80/foo%20bar", 302, "https://example.org:443/foo%20bar"}, - {"GET", "http://[2602:d1:xxxx::c60a]:1234", 302, "https://[2602:d1:xxxx::c60a]:443/"}, - {"GET", "http://[2602:d1:xxxx::c60a]", 302, "https://[2602:d1:xxxx::c60a]/"}, - {"GET", "http://[2602:d1:xxxx::c60a]/foo?a=b", 302, "https://[2602:d1:xxxx::c60a]/foo?a=b"}, - {"HEAD", "http://example.org", 302, "https://example.org/"}, - {"HEAD", "http://example.org/foo", 302, "https://example.org/foo"}, - {"HEAD", "http://example.org/foo/bar/", 302, "https://example.org/foo/bar/"}, - {"HEAD", "http://example.org/?a=b", 302, "https://example.org/?a=b"}, - {"HEAD", "http://example.org/foo?a=b", 302, "https://example.org/foo?a=b"}, - {"POST", "http://example.org", 400, ""}, - {"PUT", "http://example.org", 400, ""}, - {"GET", "http://example.org/.well-known/acme-challenge/x", 404, ""}, - } - var m Manager - h := m.HTTPHandler(nil) - for i, test := range tt { - r := httptest.NewRequest(test.method, test.url, nil) - w := httptest.NewRecorder() - h.ServeHTTP(w, r) - if w.Code != test.wantCode { - t.Errorf("%d: w.Code = %d; want %d", i, w.Code, test.wantCode) - t.Errorf("%d: body: %s", i, w.Body.Bytes()) - } - if v := w.Header().Get("Location"); v != test.wantLocation { - t.Errorf("%d: Location = %q; want %q", i, v, test.wantLocation) - } - } -} - -func TestAccountKeyCache(t *testing.T) { - m := Manager{Cache: newMemCache(t)} - ctx := context.Background() - k1, err := m.accountKey(ctx) - if err != nil { - t.Fatal(err) - } - k2, err := m.accountKey(ctx) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(k1, k2) { - t.Errorf("account keys don't match: k1 = %#v; k2 = %#v", k1, k2) - } -} - -func TestCache(t *testing.T) { - ecdsaKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - cert, err := dummyCert(ecdsaKey.Public(), exampleDomain) - if err != nil { - t.Fatal(err) - } - ecdsaCert := &tls.Certificate{ - Certificate: [][]byte{cert}, - PrivateKey: ecdsaKey, - } - - rsaKey, err := rsa.GenerateKey(rand.Reader, 512) - if err != nil { - t.Fatal(err) - } - cert, err = dummyCert(rsaKey.Public(), exampleDomain) - if err != nil { - t.Fatal(err) - } - rsaCert := &tls.Certificate{ - Certificate: [][]byte{cert}, - PrivateKey: rsaKey, - } - - man := &Manager{Cache: newMemCache(t)} - defer man.stopRenew() - ctx := context.Background() - - if err := man.cachePut(ctx, exampleCertKey, ecdsaCert); err != nil { - t.Fatalf("man.cachePut: %v", err) - } - if err := man.cachePut(ctx, exampleCertKeyRSA, rsaCert); err != nil { - t.Fatalf("man.cachePut: %v", err) - } - - res, err := man.cacheGet(ctx, exampleCertKey) - if err != nil { - t.Fatalf("man.cacheGet: %v", err) - } - if res == nil || !bytes.Equal(res.Certificate[0], ecdsaCert.Certificate[0]) { - t.Errorf("man.cacheGet = %+v; want %+v", res, ecdsaCert) - } - - res, err = man.cacheGet(ctx, exampleCertKeyRSA) - if err != nil { - t.Fatalf("man.cacheGet: %v", err) - } - if res == nil || !bytes.Equal(res.Certificate[0], rsaCert.Certificate[0]) { - t.Errorf("man.cacheGet = %+v; want %+v", res, rsaCert) - } -} - -func TestHostWhitelist(t *testing.T) { - policy := HostWhitelist("example.com", "example.org", "*.example.net") - tt := []struct { - host string - allow bool - }{ - {"example.com", true}, - {"example.org", true}, - {"one.example.com", false}, - {"two.example.org", false}, - {"three.example.net", false}, - {"dummy", false}, - } - for i, test := range tt { - err := policy(nil, test.host) - if err != nil && test.allow { - t.Errorf("%d: policy(%q): %v; want nil", i, test.host, err) - } - if err == nil && !test.allow { - t.Errorf("%d: policy(%q): nil; want an error", i, test.host) - } - } -} - -func TestValidCert(t *testing.T) { - key1, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - key2, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - key3, err := rsa.GenerateKey(rand.Reader, 512) - if err != nil { - t.Fatal(err) - } - cert1, err := dummyCert(key1.Public(), "example.org") - if err != nil { - t.Fatal(err) - } - cert2, err := dummyCert(key2.Public(), "example.org") - if err != nil { - t.Fatal(err) - } - cert3, err := dummyCert(key3.Public(), "example.org") - if err != nil { - t.Fatal(err) - } - now := time.Now() - early, err := dateDummyCert(key1.Public(), now.Add(time.Hour), now.Add(2*time.Hour), "example.org") - if err != nil { - t.Fatal(err) - } - expired, err := dateDummyCert(key1.Public(), now.Add(-2*time.Hour), now.Add(-time.Hour), "example.org") - if err != nil { - t.Fatal(err) - } - - tt := []struct { - ck certKey - key crypto.Signer - cert [][]byte - ok bool - }{ - {certKey{domain: "example.org"}, key1, [][]byte{cert1}, true}, - {certKey{domain: "example.org", isRSA: true}, key3, [][]byte{cert3}, true}, - {certKey{domain: "example.org"}, key1, [][]byte{cert1, cert2, cert3}, true}, - {certKey{domain: "example.org"}, key1, [][]byte{cert1, {1}}, false}, - {certKey{domain: "example.org"}, key1, [][]byte{{1}}, false}, - {certKey{domain: "example.org"}, key1, [][]byte{cert2}, false}, - {certKey{domain: "example.org"}, key2, [][]byte{cert1}, false}, - {certKey{domain: "example.org"}, key1, [][]byte{cert3}, false}, - {certKey{domain: "example.org"}, key3, [][]byte{cert1}, false}, - {certKey{domain: "example.net"}, key1, [][]byte{cert1}, false}, - {certKey{domain: "example.org"}, key1, [][]byte{early}, false}, - {certKey{domain: "example.org"}, key1, [][]byte{expired}, false}, - {certKey{domain: "example.org", isRSA: true}, key1, [][]byte{cert1}, false}, - {certKey{domain: "example.org"}, key3, [][]byte{cert3}, false}, - } - for i, test := range tt { - leaf, err := validCert(test.ck, test.cert, test.key) - if err != nil && test.ok { - t.Errorf("%d: err = %v", i, err) - } - if err == nil && !test.ok { - t.Errorf("%d: err is nil", i) - } - if err == nil && test.ok && leaf == nil { - t.Errorf("%d: leaf is nil", i) - } - } -} - -type cacheGetFunc func(ctx context.Context, key string) ([]byte, error) - -func (f cacheGetFunc) Get(ctx context.Context, key string) ([]byte, error) { - return f(ctx, key) -} - -func (f cacheGetFunc) Put(ctx context.Context, key string, data []byte) error { - return fmt.Errorf("unsupported Put of %q = %q", key, data) -} - -func (f cacheGetFunc) Delete(ctx context.Context, key string) error { - return fmt.Errorf("unsupported Delete of %q", key) -} - -func TestManagerGetCertificateBogusSNI(t *testing.T) { - m := Manager{ - Prompt: AcceptTOS, - Cache: cacheGetFunc(func(ctx context.Context, key string) ([]byte, error) { - return nil, fmt.Errorf("cache.Get of %s", key) - }), - } - tests := []struct { - name string - wantErr string - }{ - {"foo.com", "cache.Get of foo.com"}, - {"foo.com.", "cache.Get of foo.com"}, - {`a\b.com`, "acme/autocert: server name contains invalid character"}, - {`a/b.com`, "acme/autocert: server name contains invalid character"}, - {"", "acme/autocert: missing server name"}, - {"foo", "acme/autocert: server name component count invalid"}, - {".foo", "acme/autocert: server name component count invalid"}, - {"foo.", "acme/autocert: server name component count invalid"}, - {"fo.o", "cache.Get of fo.o"}, - } - for _, tt := range tests { - _, err := m.GetCertificate(clientHelloInfo(tt.name, true)) - got := fmt.Sprint(err) - if got != tt.wantErr { - t.Errorf("GetCertificate(SNI = %q) = %q; want %q", tt.name, got, tt.wantErr) - } - } -} - -func TestCertRequest(t *testing.T) { - key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - // An extension from RFC7633. Any will do. - ext := pkix.Extension{ - Id: asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1}, - Value: []byte("dummy"), - } - b, err := certRequest(key, "example.org", []pkix.Extension{ext}, "san.example.org") - if err != nil { - t.Fatalf("certRequest: %v", err) - } - r, err := x509.ParseCertificateRequest(b) - if err != nil { - t.Fatalf("ParseCertificateRequest: %v", err) - } - var found bool - for _, v := range r.Extensions { - if v.Id.Equal(ext.Id) { - found = true - break - } - } - if !found { - t.Errorf("want %v in Extensions: %v", ext, r.Extensions) - } -} - -func TestSupportsECDSA(t *testing.T) { - tests := []struct { - CipherSuites []uint16 - SignatureSchemes []tls.SignatureScheme - SupportedCurves []tls.CurveID - ecdsaOk bool - }{ - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - }, nil, nil, false}, - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - }, nil, nil, true}, - - // SignatureSchemes limits, not extends, CipherSuites - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - }, []tls.SignatureScheme{ - tls.PKCS1WithSHA256, tls.ECDSAWithP256AndSHA256, - }, nil, false}, - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - }, []tls.SignatureScheme{ - tls.PKCS1WithSHA256, - }, nil, false}, - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - }, []tls.SignatureScheme{ - tls.PKCS1WithSHA256, tls.ECDSAWithP256AndSHA256, - }, nil, true}, - - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - }, []tls.SignatureScheme{ - tls.PKCS1WithSHA256, tls.ECDSAWithP256AndSHA256, - }, []tls.CurveID{ - tls.CurveP521, - }, false}, - {[]uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - }, []tls.SignatureScheme{ - tls.PKCS1WithSHA256, tls.ECDSAWithP256AndSHA256, - }, []tls.CurveID{ - tls.CurveP256, - tls.CurveP521, - }, true}, - } - for i, tt := range tests { - result := supportsECDSA(&tls.ClientHelloInfo{ - CipherSuites: tt.CipherSuites, - SignatureSchemes: tt.SignatureSchemes, - SupportedCurves: tt.SupportedCurves, - }) - if result != tt.ecdsaOk { - t.Errorf("%d: supportsECDSA = %v; want %v", i, result, tt.ecdsaOk) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache.go deleted file mode 100644 index aa9aa845c8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2016 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 autocert - -import ( - "context" - "errors" - "io/ioutil" - "os" - "path/filepath" -) - -// ErrCacheMiss is returned when a certificate is not found in cache. -var ErrCacheMiss = errors.New("acme/autocert: certificate cache miss") - -// Cache is used by Manager to store and retrieve previously obtained certificates -// and other account data as opaque blobs. -// -// Cache implementations should not rely on the key naming pattern. Keys can -// include any printable ASCII characters, except the following: \/:*?"<>| -type Cache interface { - // Get returns a certificate data for the specified key. - // If there's no such key, Get returns ErrCacheMiss. - Get(ctx context.Context, key string) ([]byte, error) - - // Put stores the data in the cache under the specified key. - // Underlying implementations may use any data storage format, - // as long as the reverse operation, Get, results in the original data. - Put(ctx context.Context, key string, data []byte) error - - // Delete removes a certificate data from the cache under the specified key. - // If there's no such key in the cache, Delete returns nil. - Delete(ctx context.Context, key string) error -} - -// DirCache implements Cache using a directory on the local filesystem. -// If the directory does not exist, it will be created with 0700 permissions. -type DirCache string - -// Get reads a certificate data from the specified file name. -func (d DirCache) Get(ctx context.Context, name string) ([]byte, error) { - name = filepath.Join(string(d), name) - var ( - data []byte - err error - done = make(chan struct{}) - ) - go func() { - data, err = ioutil.ReadFile(name) - close(done) - }() - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-done: - } - if os.IsNotExist(err) { - return nil, ErrCacheMiss - } - return data, err -} - -// Put writes the certificate data to the specified file name. -// The file will be created with 0600 permissions. -func (d DirCache) Put(ctx context.Context, name string, data []byte) error { - if err := os.MkdirAll(string(d), 0700); err != nil { - return err - } - - done := make(chan struct{}) - var err error - go func() { - defer close(done) - var tmp string - if tmp, err = d.writeTempFile(name, data); err != nil { - return - } - select { - case <-ctx.Done(): - // Don't overwrite the file if the context was canceled. - default: - newName := filepath.Join(string(d), name) - err = os.Rename(tmp, newName) - } - }() - select { - case <-ctx.Done(): - return ctx.Err() - case <-done: - } - return err -} - -// Delete removes the specified file name. -func (d DirCache) Delete(ctx context.Context, name string) error { - name = filepath.Join(string(d), name) - var ( - err error - done = make(chan struct{}) - ) - go func() { - err = os.Remove(name) - close(done) - }() - select { - case <-ctx.Done(): - return ctx.Err() - case <-done: - } - if err != nil && !os.IsNotExist(err) { - return err - } - return nil -} - -// writeTempFile writes b to a temporary file, closes the file and returns its path. -func (d DirCache) writeTempFile(prefix string, b []byte) (string, error) { - // TempFile uses 0600 permissions - f, err := ioutil.TempFile(string(d), prefix) - if err != nil { - return "", err - } - if _, err := f.Write(b); err != nil { - f.Close() - return "", err - } - return f.Name(), f.Close() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache_test.go deleted file mode 100644 index 653b05bed0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/cache_test.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016 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 autocert - -import ( - "context" - "io/ioutil" - "os" - "path/filepath" - "reflect" - "testing" -) - -// make sure DirCache satisfies Cache interface -var _ Cache = DirCache("/") - -func TestDirCache(t *testing.T) { - dir, err := ioutil.TempDir("", "autocert") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) - dir = filepath.Join(dir, "certs") // a nonexistent dir - cache := DirCache(dir) - ctx := context.Background() - - // test cache miss - if _, err := cache.Get(ctx, "nonexistent"); err != ErrCacheMiss { - t.Errorf("get: %v; want ErrCacheMiss", err) - } - - // test put/get - b1 := []byte{1} - if err := cache.Put(ctx, "dummy", b1); err != nil { - t.Fatalf("put: %v", err) - } - b2, err := cache.Get(ctx, "dummy") - if err != nil { - t.Fatalf("get: %v", err) - } - if !reflect.DeepEqual(b1, b2) { - t.Errorf("b1 = %v; want %v", b1, b2) - } - name := filepath.Join(dir, "dummy") - if _, err := os.Stat(name); err != nil { - t.Error(err) - } - - // test delete - if err := cache.Delete(ctx, "dummy"); err != nil { - t.Fatalf("delete: %v", err) - } - if _, err := cache.Get(ctx, "dummy"); err != ErrCacheMiss { - t.Errorf("get: %v; want ErrCacheMiss", err) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/example_test.go deleted file mode 100644 index f64201bf91..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 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 autocert_test - -import ( - "crypto/tls" - "fmt" - "log" - "net/http" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert" -) - -func ExampleNewListener() { - mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS) - }) - log.Fatal(http.Serve(autocert.NewListener("example.com"), mux)) -} - -func ExampleManager() { - m := &autocert.Manager{ - Cache: autocert.DirCache("secret-dir"), - Prompt: autocert.AcceptTOS, - HostPolicy: autocert.HostWhitelist("example.org"), - } - go http.ListenAndServe(":http", m.HTTPHandler(nil)) - s := &http.Server{ - Addr: ":https", - TLSConfig: &tls.Config{GetCertificate: m.GetCertificate}, - } - s.ListenAndServeTLS("", "") -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/listener.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/listener.go deleted file mode 100644 index d744df0ed0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/listener.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2017 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 autocert - -import ( - "crypto/tls" - "log" - "net" - "os" - "path/filepath" - "runtime" - "time" -) - -// NewListener returns a net.Listener that listens on the standard TLS -// port (443) on all interfaces and returns *tls.Conn connections with -// LetsEncrypt certificates for the provided domain or domains. -// -// It enables one-line HTTPS servers: -// -// log.Fatal(http.Serve(autocert.NewListener("example.com"), handler)) -// -// NewListener is a convenience function for a common configuration. -// More complex or custom configurations can use the autocert.Manager -// type instead. -// -// Use of this function implies acceptance of the LetsEncrypt Terms of -// Service. If domains is not empty, the provided domains are passed -// to HostWhitelist. If domains is empty, the listener will do -// LetsEncrypt challenges for any requested domain, which is not -// recommended. -// -// Certificates are cached in a "golang-autocert" directory under an -// operating system-specific cache or temp directory. This may not -// be suitable for servers spanning multiple machines. -// -// The returned listener uses a *tls.Config that enables HTTP/2, and -// should only be used with servers that support HTTP/2. -// -// The returned Listener also enables TCP keep-alives on the accepted -// connections. The returned *tls.Conn are returned before their TLS -// handshake has completed. -func NewListener(domains ...string) net.Listener { - m := &Manager{ - Prompt: AcceptTOS, - } - if len(domains) > 0 { - m.HostPolicy = HostWhitelist(domains...) - } - dir := cacheDir() - if err := os.MkdirAll(dir, 0700); err != nil { - log.Printf("warning: autocert.NewListener not using a cache: %v", err) - } else { - m.Cache = DirCache(dir) - } - return m.Listener() -} - -// Listener listens on the standard TLS port (443) on all interfaces -// and returns a net.Listener returning *tls.Conn connections. -// -// The returned listener uses a *tls.Config that enables HTTP/2, and -// should only be used with servers that support HTTP/2. -// -// The returned Listener also enables TCP keep-alives on the accepted -// connections. The returned *tls.Conn are returned before their TLS -// handshake has completed. -// -// Unlike NewListener, it is the caller's responsibility to initialize -// the Manager m's Prompt, Cache, HostPolicy, and other desired options. -func (m *Manager) Listener() net.Listener { - ln := &listener{ - m: m, - conf: &tls.Config{ - GetCertificate: m.GetCertificate, // bonus: panic on nil m - NextProtos: []string{"h2", "http/1.1"}, // Enable HTTP/2 - }, - } - ln.tcpListener, ln.tcpListenErr = net.Listen("tcp", ":443") - return ln -} - -type listener struct { - m *Manager - conf *tls.Config - - tcpListener net.Listener - tcpListenErr error -} - -func (ln *listener) Accept() (net.Conn, error) { - if ln.tcpListenErr != nil { - return nil, ln.tcpListenErr - } - conn, err := ln.tcpListener.Accept() - if err != nil { - return nil, err - } - tcpConn := conn.(*net.TCPConn) - - // Because Listener is a convenience function, help out with - // this too. This is not possible for the caller to set once - // we return a *tcp.Conn wrapping an inaccessible net.Conn. - // If callers don't want this, they can do things the manual - // way and tweak as needed. But this is what net/http does - // itself, so copy that. If net/http changes, we can change - // here too. - tcpConn.SetKeepAlive(true) - tcpConn.SetKeepAlivePeriod(3 * time.Minute) - - return tls.Server(tcpConn, ln.conf), nil -} - -func (ln *listener) Addr() net.Addr { - if ln.tcpListener != nil { - return ln.tcpListener.Addr() - } - // net.Listen failed. Return something non-nil in case callers - // call Addr before Accept: - return &net.TCPAddr{IP: net.IP{0, 0, 0, 0}, Port: 443} -} - -func (ln *listener) Close() error { - if ln.tcpListenErr != nil { - return ln.tcpListenErr - } - return ln.tcpListener.Close() -} - -func homeDir() string { - if runtime.GOOS == "windows" { - return os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") - } - if h := os.Getenv("HOME"); h != "" { - return h - } - return "/" -} - -func cacheDir() string { - const base = "golang-autocert" - switch runtime.GOOS { - case "darwin": - return filepath.Join(homeDir(), "Library", "Caches", base) - case "windows": - for _, ev := range []string{"APPDATA", "CSIDL_APPDATA", "TEMP", "TMP"} { - if v := os.Getenv(ev); v != "" { - return filepath.Join(v, base) - } - } - // Worst case: - return filepath.Join(homeDir(), base) - } - if xdg := os.Getenv("XDG_CACHE_HOME"); xdg != "" { - return filepath.Join(xdg, base) - } - return filepath.Join(homeDir(), ".cache", base) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal.go deleted file mode 100644 index ef3e44e199..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2016 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 autocert - -import ( - "context" - "crypto" - "sync" - "time" -) - -// renewJitter is the maximum deviation from Manager.RenewBefore. -const renewJitter = time.Hour - -// domainRenewal tracks the state used by the periodic timers -// renewing a single domain's cert. -type domainRenewal struct { - m *Manager - ck certKey - key crypto.Signer - - timerMu sync.Mutex - timer *time.Timer -} - -// start starts a cert renewal timer at the time -// defined by the certificate expiration time exp. -// -// If the timer is already started, calling start is a noop. -func (dr *domainRenewal) start(exp time.Time) { - dr.timerMu.Lock() - defer dr.timerMu.Unlock() - if dr.timer != nil { - return - } - dr.timer = time.AfterFunc(dr.next(exp), dr.renew) -} - -// stop stops the cert renewal timer. -// If the timer is already stopped, calling stop is a noop. -func (dr *domainRenewal) stop() { - dr.timerMu.Lock() - defer dr.timerMu.Unlock() - if dr.timer == nil { - return - } - dr.timer.Stop() - dr.timer = nil -} - -// renew is called periodically by a timer. -// The first renew call is kicked off by dr.start. -func (dr *domainRenewal) renew() { - dr.timerMu.Lock() - defer dr.timerMu.Unlock() - if dr.timer == nil { - return - } - - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) - defer cancel() - // TODO: rotate dr.key at some point? - next, err := dr.do(ctx) - if err != nil { - next = renewJitter / 2 - next += time.Duration(pseudoRand.int63n(int64(next))) - } - dr.timer = time.AfterFunc(next, dr.renew) - testDidRenewLoop(next, err) -} - -// updateState locks and replaces the relevant Manager.state item with the given -// state. It additionally updates dr.key with the given state's key. -func (dr *domainRenewal) updateState(state *certState) { - dr.m.stateMu.Lock() - defer dr.m.stateMu.Unlock() - dr.key = state.key - dr.m.state[dr.ck] = state -} - -// do is similar to Manager.createCert but it doesn't lock a Manager.state item. -// Instead, it requests a new certificate independently and, upon success, -// replaces dr.m.state item with a new one and updates cache for the given domain. -// -// It may lock and update the Manager.state if the expiration date of the currently -// cached cert is far enough in the future. -// -// The returned value is a time interval after which the renewal should occur again. -func (dr *domainRenewal) do(ctx context.Context) (time.Duration, error) { - // a race is likely unavoidable in a distributed environment - // but we try nonetheless - if tlscert, err := dr.m.cacheGet(ctx, dr.ck); err == nil { - next := dr.next(tlscert.Leaf.NotAfter) - if next > dr.m.renewBefore()+renewJitter { - signer, ok := tlscert.PrivateKey.(crypto.Signer) - if ok { - state := &certState{ - key: signer, - cert: tlscert.Certificate, - leaf: tlscert.Leaf, - } - dr.updateState(state) - return next, nil - } - } - } - - der, leaf, err := dr.m.authorizedCert(ctx, dr.key, dr.ck) - if err != nil { - return 0, err - } - state := &certState{ - key: dr.key, - cert: der, - leaf: leaf, - } - tlscert, err := state.tlscert() - if err != nil { - return 0, err - } - if err := dr.m.cachePut(ctx, dr.ck, tlscert); err != nil { - return 0, err - } - dr.updateState(state) - return dr.next(leaf.NotAfter), nil -} - -func (dr *domainRenewal) next(expiry time.Time) time.Duration { - d := expiry.Sub(timeNow()) - dr.m.renewBefore() - // add a bit of randomness to renew deadline - n := pseudoRand.int63n(int64(renewJitter)) - d -= time.Duration(n) - if d < 0 { - return 0 - } - return d -} - -var testDidRenewLoop = func(next time.Duration, err error) {} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal_test.go deleted file mode 100644 index 5c4084e9f1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/autocert/renewal_test.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2016 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 autocert - -import ( - "context" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/tls" - "crypto/x509" - "encoding/base64" - "fmt" - "net/http" - "net/http/httptest" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme" -) - -func TestRenewalNext(t *testing.T) { - now := time.Now() - timeNow = func() time.Time { return now } - defer func() { timeNow = time.Now }() - - man := &Manager{RenewBefore: 7 * 24 * time.Hour} - defer man.stopRenew() - tt := []struct { - expiry time.Time - min, max time.Duration - }{ - {now.Add(90 * 24 * time.Hour), 83*24*time.Hour - renewJitter, 83 * 24 * time.Hour}, - {now.Add(time.Hour), 0, 1}, - {now, 0, 1}, - {now.Add(-time.Hour), 0, 1}, - } - - dr := &domainRenewal{m: man} - for i, test := range tt { - next := dr.next(test.expiry) - if next < test.min || test.max < next { - t.Errorf("%d: next = %v; want between %v and %v", i, next, test.min, test.max) - } - } -} - -func TestRenewFromCache(t *testing.T) { - // ACME CA server stub - var ca *httptest.Server - ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Replay-Nonce", "nonce") - if r.Method == "HEAD" { - // a nonce request - return - } - - switch r.URL.Path { - // discovery - case "/": - if err := discoTmpl.Execute(w, ca.URL); err != nil { - t.Fatalf("discoTmpl: %v", err) - } - // client key registration - case "/new-reg": - w.Write([]byte("{}")) - // domain authorization - case "/new-authz": - w.Header().Set("Location", ca.URL+"/authz/1") - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"status": "valid"}`)) - // cert request - case "/new-cert": - var req struct { - CSR string `json:"csr"` - } - decodePayload(&req, r.Body) - b, _ := base64.RawURLEncoding.DecodeString(req.CSR) - csr, err := x509.ParseCertificateRequest(b) - if err != nil { - t.Fatalf("new-cert: CSR: %v", err) - } - der, err := dummyCert(csr.PublicKey, exampleDomain) - if err != nil { - t.Fatalf("new-cert: dummyCert: %v", err) - } - chainUp := fmt.Sprintf("<%s/ca-cert>; rel=up", ca.URL) - w.Header().Set("Link", chainUp) - w.WriteHeader(http.StatusCreated) - w.Write(der) - // CA chain cert - case "/ca-cert": - der, err := dummyCert(nil, "ca") - if err != nil { - t.Fatalf("ca-cert: dummyCert: %v", err) - } - w.Write(der) - default: - t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path) - } - })) - defer ca.Close() - - man := &Manager{ - Prompt: AcceptTOS, - Cache: newMemCache(t), - RenewBefore: 24 * time.Hour, - Client: &acme.Client{ - DirectoryURL: ca.URL, - }, - } - defer man.stopRenew() - - // cache an almost expired cert - key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - now := time.Now() - cert, err := dateDummyCert(key.Public(), now.Add(-2*time.Hour), now.Add(time.Minute), exampleDomain) - if err != nil { - t.Fatal(err) - } - tlscert := &tls.Certificate{PrivateKey: key, Certificate: [][]byte{cert}} - if err := man.cachePut(context.Background(), exampleCertKey, tlscert); err != nil { - t.Fatal(err) - } - - // veriy the renewal happened - defer func() { - testDidRenewLoop = func(next time.Duration, err error) {} - }() - done := make(chan struct{}) - testDidRenewLoop = func(next time.Duration, err error) { - defer close(done) - if err != nil { - t.Errorf("testDidRenewLoop: %v", err) - } - // Next should be about 90 days: - // dummyCert creates 90days expiry + account for man.RenewBefore. - // Previous expiration was within 1 min. - future := 88 * 24 * time.Hour - if next < future { - t.Errorf("testDidRenewLoop: next = %v; want >= %v", next, future) - } - - // ensure the new cert is cached - after := time.Now().Add(future) - tlscert, err := man.cacheGet(context.Background(), exampleCertKey) - if err != nil { - t.Fatalf("man.cacheGet: %v", err) - } - if !tlscert.Leaf.NotAfter.After(after) { - t.Errorf("cache leaf.NotAfter = %v; want > %v", tlscert.Leaf.NotAfter, after) - } - - // verify the old cert is also replaced in memory - man.stateMu.Lock() - defer man.stateMu.Unlock() - s := man.state[exampleCertKey] - if s == nil { - t.Fatalf("m.state[%q] is nil", exampleCertKey) - } - tlscert, err = s.tlscert() - if err != nil { - t.Fatalf("s.tlscert: %v", err) - } - if !tlscert.Leaf.NotAfter.After(after) { - t.Errorf("state leaf.NotAfter = %v; want > %v", tlscert.Leaf.NotAfter, after) - } - } - - // trigger renew - hello := clientHelloInfo(exampleDomain, true) - if _, err := man.GetCertificate(hello); err != nil { - t.Fatal(err) - } - - // wait for renew loop - select { - case <-time.After(10 * time.Second): - t.Fatal("renew took too long to occur") - case <-done: - } -} - -func TestRenewFromCacheAlreadyRenewed(t *testing.T) { - man := &Manager{ - Prompt: AcceptTOS, - Cache: newMemCache(t), - RenewBefore: 24 * time.Hour, - Client: &acme.Client{ - DirectoryURL: "invalid", - }, - } - defer man.stopRenew() - - // cache a recently renewed cert with a different private key - newKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - now := time.Now() - newCert, err := dateDummyCert(newKey.Public(), now.Add(-2*time.Hour), now.Add(time.Hour*24*90), exampleDomain) - if err != nil { - t.Fatal(err) - } - newLeaf, err := validCert(exampleCertKey, [][]byte{newCert}, newKey) - if err != nil { - t.Fatal(err) - } - newTLSCert := &tls.Certificate{PrivateKey: newKey, Certificate: [][]byte{newCert}, Leaf: newLeaf} - if err := man.cachePut(context.Background(), exampleCertKey, newTLSCert); err != nil { - t.Fatal(err) - } - - // set internal state to an almost expired cert - key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - oldCert, err := dateDummyCert(key.Public(), now.Add(-2*time.Hour), now.Add(time.Minute), exampleDomain) - if err != nil { - t.Fatal(err) - } - oldLeaf, err := validCert(exampleCertKey, [][]byte{oldCert}, key) - if err != nil { - t.Fatal(err) - } - man.stateMu.Lock() - if man.state == nil { - man.state = make(map[certKey]*certState) - } - s := &certState{ - key: key, - cert: [][]byte{oldCert}, - leaf: oldLeaf, - } - man.state[exampleCertKey] = s - man.stateMu.Unlock() - - // veriy the renewal accepted the newer cached cert - defer func() { - testDidRenewLoop = func(next time.Duration, err error) {} - }() - done := make(chan struct{}) - testDidRenewLoop = func(next time.Duration, err error) { - defer close(done) - if err != nil { - t.Errorf("testDidRenewLoop: %v", err) - } - // Next should be about 90 days - // Previous expiration was within 1 min. - future := 88 * 24 * time.Hour - if next < future { - t.Errorf("testDidRenewLoop: next = %v; want >= %v", next, future) - } - - // ensure the cached cert was not modified - tlscert, err := man.cacheGet(context.Background(), exampleCertKey) - if err != nil { - t.Fatalf("man.cacheGet: %v", err) - } - if !tlscert.Leaf.NotAfter.Equal(newLeaf.NotAfter) { - t.Errorf("cache leaf.NotAfter = %v; want == %v", tlscert.Leaf.NotAfter, newLeaf.NotAfter) - } - - // verify the old cert is also replaced in memory - man.stateMu.Lock() - defer man.stateMu.Unlock() - s := man.state[exampleCertKey] - if s == nil { - t.Fatalf("m.state[%q] is nil", exampleCertKey) - } - stateKey := s.key.Public().(*ecdsa.PublicKey) - if stateKey.X.Cmp(newKey.X) != 0 || stateKey.Y.Cmp(newKey.Y) != 0 { - t.Fatalf("state key was not updated from cache x: %v y: %v; want x: %v y: %v", stateKey.X, stateKey.Y, newKey.X, newKey.Y) - } - tlscert, err = s.tlscert() - if err != nil { - t.Fatalf("s.tlscert: %v", err) - } - if !tlscert.Leaf.NotAfter.Equal(newLeaf.NotAfter) { - t.Errorf("state leaf.NotAfter = %v; want == %v", tlscert.Leaf.NotAfter, newLeaf.NotAfter) - } - - // verify the private key is replaced in the renewal state - r := man.renewal[exampleCertKey] - if r == nil { - t.Fatalf("m.renewal[%q] is nil", exampleCertKey) - } - renewalKey := r.key.Public().(*ecdsa.PublicKey) - if renewalKey.X.Cmp(newKey.X) != 0 || renewalKey.Y.Cmp(newKey.Y) != 0 { - t.Fatalf("renewal private key was not updated from cache x: %v y: %v; want x: %v y: %v", renewalKey.X, renewalKey.Y, newKey.X, newKey.Y) - } - - } - - // assert the expiring cert is returned from state - hello := clientHelloInfo(exampleDomain, true) - tlscert, err := man.GetCertificate(hello) - if err != nil { - t.Fatal(err) - } - if !oldLeaf.NotAfter.Equal(tlscert.Leaf.NotAfter) { - t.Errorf("state leaf.NotAfter = %v; want == %v", tlscert.Leaf.NotAfter, oldLeaf.NotAfter) - } - - // trigger renew - go man.renew(exampleCertKey, s.key, s.leaf.NotAfter) - - // wait for renew loop - select { - case <-time.After(10 * time.Second): - t.Fatal("renew took too long to occur") - case <-done: - // assert the new cert is returned from state after renew - hello := clientHelloInfo(exampleDomain, true) - tlscert, err := man.GetCertificate(hello) - if err != nil { - t.Fatal(err) - } - if !newTLSCert.Leaf.NotAfter.Equal(tlscert.Leaf.NotAfter) { - t.Errorf("state leaf.NotAfter = %v; want == %v", tlscert.Leaf.NotAfter, newTLSCert.Leaf.NotAfter) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http.go deleted file mode 100644 index 56ba53a10b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http.go +++ /dev/null @@ -1,276 +0,0 @@ -// 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 acme - -import ( - "bytes" - "context" - "crypto" - "crypto/rand" - "encoding/json" - "fmt" - "io/ioutil" - "math/big" - "net/http" - "strconv" - "strings" - "time" -) - -// retryTimer encapsulates common logic for retrying unsuccessful requests. -// It is not safe for concurrent use. -type retryTimer struct { - // backoffFn provides backoff delay sequence for retries. - // See Client.RetryBackoff doc comment. - backoffFn func(n int, r *http.Request, res *http.Response) time.Duration - // n is the current retry attempt. - n int -} - -func (t *retryTimer) inc() { - t.n++ -} - -// backoff pauses the current goroutine as described in Client.RetryBackoff. -func (t *retryTimer) backoff(ctx context.Context, r *http.Request, res *http.Response) error { - d := t.backoffFn(t.n, r, res) - if d <= 0 { - return fmt.Errorf("acme: no more retries for %s; tried %d time(s)", r.URL, t.n) - } - wakeup := time.NewTimer(d) - defer wakeup.Stop() - select { - case <-ctx.Done(): - return ctx.Err() - case <-wakeup.C: - return nil - } -} - -func (c *Client) retryTimer() *retryTimer { - f := c.RetryBackoff - if f == nil { - f = defaultBackoff - } - return &retryTimer{backoffFn: f} -} - -// defaultBackoff provides default Client.RetryBackoff implementation -// using a truncated exponential backoff algorithm, -// as described in Client.RetryBackoff. -// -// The n argument is always bounded between 1 and 30. -// The returned value is always greater than 0. -func defaultBackoff(n int, r *http.Request, res *http.Response) time.Duration { - const max = 10 * time.Second - var jitter time.Duration - if x, err := rand.Int(rand.Reader, big.NewInt(1000)); err == nil { - // Set the minimum to 1ms to avoid a case where - // an invalid Retry-After value is parsed into 0 below, - // resulting in the 0 returned value which would unintentionally - // stop the retries. - jitter = (1 + time.Duration(x.Int64())) * time.Millisecond - } - if v, ok := res.Header["Retry-After"]; ok { - return retryAfter(v[0]) + jitter - } - - if n < 1 { - n = 1 - } - if n > 30 { - n = 30 - } - d := time.Duration(1< max { - return max - } - return d -} - -// retryAfter parses a Retry-After HTTP header value, -// trying to convert v into an int (seconds) or use http.ParseTime otherwise. -// It returns zero value if v cannot be parsed. -func retryAfter(v string) time.Duration { - if i, err := strconv.Atoi(v); err == nil { - return time.Duration(i) * time.Second - } - t, err := http.ParseTime(v) - if err != nil { - return 0 - } - return t.Sub(timeNow()) -} - -// resOkay is a function that reports whether the provided response is okay. -// It is expected to keep the response body unread. -type resOkay func(*http.Response) bool - -// wantStatus returns a function which reports whether the code -// matches the status code of a response. -func wantStatus(codes ...int) resOkay { - return func(res *http.Response) bool { - for _, code := range codes { - if code == res.StatusCode { - return true - } - } - return false - } -} - -// get issues an unsigned GET request to the specified URL. -// It returns a non-error value only when ok reports true. -// -// get retries unsuccessful attempts according to c.RetryBackoff -// until the context is done or a non-retriable error is received. -func (c *Client) get(ctx context.Context, url string, ok resOkay) (*http.Response, error) { - retry := c.retryTimer() - for { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - res, err := c.doNoRetry(ctx, req) - switch { - case err != nil: - return nil, err - case ok(res): - return res, nil - case isRetriable(res.StatusCode): - res.Body.Close() - retry.inc() - if err := retry.backoff(ctx, req, res); err != nil { - return nil, err - } - default: - defer res.Body.Close() - return nil, responseError(res) - } - } -} - -// post issues a signed POST request in JWS format using the provided key -// to the specified URL. -// It returns a non-error value only when ok reports true. -// -// post retries unsuccessful attempts according to c.RetryBackoff -// until the context is done or a non-retriable error is received. -// It uses postNoRetry to make individual requests. -func (c *Client) post(ctx context.Context, key crypto.Signer, url string, body interface{}, ok resOkay) (*http.Response, error) { - retry := c.retryTimer() - for { - res, req, err := c.postNoRetry(ctx, key, url, body) - if err != nil { - return nil, err - } - if ok(res) { - return res, nil - } - err = responseError(res) - res.Body.Close() - switch { - // Check for bad nonce before isRetriable because it may have been returned - // with an unretriable response code such as 400 Bad Request. - case isBadNonce(err): - // Consider any previously stored nonce values to be invalid. - c.clearNonces() - case !isRetriable(res.StatusCode): - return nil, err - } - retry.inc() - if err := retry.backoff(ctx, req, res); err != nil { - return nil, err - } - } -} - -// postNoRetry signs the body with the given key and POSTs it to the provided url. -// The body argument must be JSON-serializable. -// It is used by c.post to retry unsuccessful attempts. -func (c *Client) postNoRetry(ctx context.Context, key crypto.Signer, url string, body interface{}) (*http.Response, *http.Request, error) { - nonce, err := c.popNonce(ctx, url) - if err != nil { - return nil, nil, err - } - b, err := jwsEncodeJSON(body, key, nonce) - if err != nil { - return nil, nil, err - } - req, err := http.NewRequest("POST", url, bytes.NewReader(b)) - if err != nil { - return nil, nil, err - } - req.Header.Set("Content-Type", "application/jose+json") - res, err := c.doNoRetry(ctx, req) - if err != nil { - return nil, nil, err - } - c.addNonce(res.Header) - return res, req, nil -} - -// doNoRetry issues a request req, replacing its context (if any) with ctx. -func (c *Client) doNoRetry(ctx context.Context, req *http.Request) (*http.Response, error) { - res, err := c.httpClient().Do(req.WithContext(ctx)) - if err != nil { - select { - case <-ctx.Done(): - // Prefer the unadorned context error. - // (The acme package had tests assuming this, previously from ctxhttp's - // behavior, predating net/http supporting contexts natively) - // TODO(bradfitz): reconsider this in the future. But for now this - // requires no test updates. - return nil, ctx.Err() - default: - return nil, err - } - } - return res, nil -} - -func (c *Client) httpClient() *http.Client { - if c.HTTPClient != nil { - return c.HTTPClient - } - return http.DefaultClient -} - -// isBadNonce reports whether err is an ACME "badnonce" error. -func isBadNonce(err error) bool { - // According to the spec badNonce is urn:ietf:params:acme:error:badNonce. - // However, ACME servers in the wild return their versions of the error. - // See https://tools.ietf.org/html/draft-ietf-acme-acme-02#section-5.4 - // and https://github.com/letsencrypt/boulder/blob/0e07eacb/docs/acme-divergences.md#section-66. - ae, ok := err.(*Error) - return ok && strings.HasSuffix(strings.ToLower(ae.ProblemType), ":badnonce") -} - -// isRetriable reports whether a request can be retried -// based on the response status code. -// -// Note that a "bad nonce" error is returned with a non-retriable 400 Bad Request code. -// Callers should parse the response and check with isBadNonce. -func isRetriable(code int) bool { - return code <= 399 || code >= 500 || code == http.StatusTooManyRequests -} - -// responseError creates an error of Error type from resp. -func responseError(resp *http.Response) error { - // don't care if ReadAll returns an error: - // json.Unmarshal will fail in that case anyway - b, _ := ioutil.ReadAll(resp.Body) - e := &wireError{Status: resp.StatusCode} - if err := json.Unmarshal(b, e); err != nil { - // this is not a regular error response: - // populate detail with anything we received, - // e.Status will already contain HTTP response code value - e.Detail = string(b) - if e.Detail == "" { - e.Detail = resp.Status - } - } - return e.error(resp.Header) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http_test.go deleted file mode 100644 index c9ce1d64ed..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/http_test.go +++ /dev/null @@ -1,158 +0,0 @@ -// 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 acme - -import ( - "context" - "fmt" - "io/ioutil" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - "time" -) - -func TestDefaultBackoff(t *testing.T) { - tt := []struct { - nretry int - retryAfter string // Retry-After header - out time.Duration // expected min; max = min + jitter - }{ - {-1, "", time.Second}, // verify the lower bound is 1 - {0, "", time.Second}, // verify the lower bound is 1 - {100, "", 10 * time.Second}, // verify the ceiling - {1, "3600", time.Hour}, // verify the header value is used - {1, "", 1 * time.Second}, - {2, "", 2 * time.Second}, - {3, "", 4 * time.Second}, - {4, "", 8 * time.Second}, - } - for i, test := range tt { - r := httptest.NewRequest("GET", "/", nil) - resp := &http.Response{Header: http.Header{}} - if test.retryAfter != "" { - resp.Header.Set("Retry-After", test.retryAfter) - } - d := defaultBackoff(test.nretry, r, resp) - max := test.out + time.Second // + max jitter - if d < test.out || max < d { - t.Errorf("%d: defaultBackoff(%v) = %v; want between %v and %v", i, test.nretry, d, test.out, max) - } - } -} - -func TestErrorResponse(t *testing.T) { - s := `{ - "status": 400, - "type": "urn:acme:error:xxx", - "detail": "text" - }` - res := &http.Response{ - StatusCode: 400, - Status: "400 Bad Request", - Body: ioutil.NopCloser(strings.NewReader(s)), - Header: http.Header{"X-Foo": {"bar"}}, - } - err := responseError(res) - v, ok := err.(*Error) - if !ok { - t.Fatalf("err = %+v (%T); want *Error type", err, err) - } - if v.StatusCode != 400 { - t.Errorf("v.StatusCode = %v; want 400", v.StatusCode) - } - if v.ProblemType != "urn:acme:error:xxx" { - t.Errorf("v.ProblemType = %q; want urn:acme:error:xxx", v.ProblemType) - } - if v.Detail != "text" { - t.Errorf("v.Detail = %q; want text", v.Detail) - } - if !reflect.DeepEqual(v.Header, res.Header) { - t.Errorf("v.Header = %+v; want %+v", v.Header, res.Header) - } -} - -func TestPostWithRetries(t *testing.T) { - var count int - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - count++ - w.Header().Set("Replay-Nonce", fmt.Sprintf("nonce%d", count)) - if r.Method == "HEAD" { - // We expect the client to do 2 head requests to fetch - // nonces, one to start and another after getting badNonce - return - } - - head, err := decodeJWSHead(r) - if err != nil { - t.Errorf("decodeJWSHead: %v", err) - } else if head.Nonce == "" { - t.Error("head.Nonce is empty") - } else if head.Nonce == "nonce1" { - // return a badNonce error to force the call to retry - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte(`{"type":"urn:ietf:params:acme:error:badNonce"}`)) - return - } - // Make client.Authorize happy; we're not testing its result. - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"status":"valid"}`)) - })) - defer ts.Close() - - client := &Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}} - // This call will fail with badNonce, causing a retry - if _, err := client.Authorize(context.Background(), "example.com"); err != nil { - t.Errorf("client.Authorize 1: %v", err) - } - if count != 4 { - t.Errorf("total requests count: %d; want 4", count) - } -} - -func TestRetryBackoffArgs(t *testing.T) { - const resCode = http.StatusInternalServerError - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Replay-Nonce", "test-nonce") - w.WriteHeader(resCode) - })) - defer ts.Close() - - // Canceled in backoff. - ctx, cancel := context.WithCancel(context.Background()) - - var nretry int - backoff := func(n int, r *http.Request, res *http.Response) time.Duration { - nretry++ - if n != nretry { - t.Errorf("n = %d; want %d", n, nretry) - } - if nretry == 3 { - cancel() - } - - if r == nil { - t.Error("r is nil") - } - if res.StatusCode != resCode { - t.Errorf("res.StatusCode = %d; want %d", res.StatusCode, resCode) - } - return time.Millisecond - } - - client := &Client{ - Key: testKey, - RetryBackoff: backoff, - dir: &Directory{AuthzURL: ts.URL}, - } - if _, err := client.Authorize(ctx, "example.com"); err == nil { - t.Error("err is nil") - } - if nretry != 3 { - t.Errorf("nretry = %d; want 3", nretry) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws.go deleted file mode 100644 index 6cbca25de9..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2015 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 acme - -import ( - "crypto" - "crypto/ecdsa" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - _ "crypto/sha512" // need for EC keys - "encoding/base64" - "encoding/json" - "fmt" - "math/big" -) - -// jwsEncodeJSON signs claimset using provided key and a nonce. -// The result is serialized in JSON format. -// See https://tools.ietf.org/html/rfc7515#section-7. -func jwsEncodeJSON(claimset interface{}, key crypto.Signer, nonce string) ([]byte, error) { - jwk, err := jwkEncode(key.Public()) - if err != nil { - return nil, err - } - alg, sha := jwsHasher(key) - if alg == "" || !sha.Available() { - return nil, ErrUnsupportedKey - } - phead := fmt.Sprintf(`{"alg":%q,"jwk":%s,"nonce":%q}`, alg, jwk, nonce) - phead = base64.RawURLEncoding.EncodeToString([]byte(phead)) - cs, err := json.Marshal(claimset) - if err != nil { - return nil, err - } - payload := base64.RawURLEncoding.EncodeToString(cs) - hash := sha.New() - hash.Write([]byte(phead + "." + payload)) - sig, err := jwsSign(key, sha, hash.Sum(nil)) - if err != nil { - return nil, err - } - - enc := struct { - Protected string `json:"protected"` - Payload string `json:"payload"` - Sig string `json:"signature"` - }{ - Protected: phead, - Payload: payload, - Sig: base64.RawURLEncoding.EncodeToString(sig), - } - return json.Marshal(&enc) -} - -// jwkEncode encodes public part of an RSA or ECDSA key into a JWK. -// The result is also suitable for creating a JWK thumbprint. -// https://tools.ietf.org/html/rfc7517 -func jwkEncode(pub crypto.PublicKey) (string, error) { - switch pub := pub.(type) { - case *rsa.PublicKey: - // https://tools.ietf.org/html/rfc7518#section-6.3.1 - n := pub.N - e := big.NewInt(int64(pub.E)) - // Field order is important. - // See https://tools.ietf.org/html/rfc7638#section-3.3 for details. - return fmt.Sprintf(`{"e":"%s","kty":"RSA","n":"%s"}`, - base64.RawURLEncoding.EncodeToString(e.Bytes()), - base64.RawURLEncoding.EncodeToString(n.Bytes()), - ), nil - case *ecdsa.PublicKey: - // https://tools.ietf.org/html/rfc7518#section-6.2.1 - p := pub.Curve.Params() - n := p.BitSize / 8 - if p.BitSize%8 != 0 { - n++ - } - x := pub.X.Bytes() - if n > len(x) { - x = append(make([]byte, n-len(x)), x...) - } - y := pub.Y.Bytes() - if n > len(y) { - y = append(make([]byte, n-len(y)), y...) - } - // Field order is important. - // See https://tools.ietf.org/html/rfc7638#section-3.3 for details. - return fmt.Sprintf(`{"crv":"%s","kty":"EC","x":"%s","y":"%s"}`, - p.Name, - base64.RawURLEncoding.EncodeToString(x), - base64.RawURLEncoding.EncodeToString(y), - ), nil - } - return "", ErrUnsupportedKey -} - -// jwsSign signs the digest using the given key. -// It returns ErrUnsupportedKey if the key type is unknown. -// The hash is used only for RSA keys. -func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error) { - switch key := key.(type) { - case *rsa.PrivateKey: - return key.Sign(rand.Reader, digest, hash) - case *ecdsa.PrivateKey: - r, s, err := ecdsa.Sign(rand.Reader, key, digest) - if err != nil { - return nil, err - } - rb, sb := r.Bytes(), s.Bytes() - size := key.Params().BitSize / 8 - if size%8 > 0 { - size++ - } - sig := make([]byte, size*2) - copy(sig[size-len(rb):], rb) - copy(sig[size*2-len(sb):], sb) - return sig, nil - } - return nil, ErrUnsupportedKey -} - -// jwsHasher indicates suitable JWS algorithm name and a hash function -// to use for signing a digest with the provided key. -// It returns ("", 0) if the key is not supported. -func jwsHasher(key crypto.Signer) (string, crypto.Hash) { - switch key := key.(type) { - case *rsa.PrivateKey: - return "RS256", crypto.SHA256 - case *ecdsa.PrivateKey: - switch key.Params().Name { - case "P-256": - return "ES256", crypto.SHA256 - case "P-384": - return "ES384", crypto.SHA384 - case "P-521": - return "ES512", crypto.SHA512 - } - } - return "", 0 -} - -// JWKThumbprint creates a JWK thumbprint out of pub -// as specified in https://tools.ietf.org/html/rfc7638. -func JWKThumbprint(pub crypto.PublicKey) (string, error) { - jwk, err := jwkEncode(pub) - if err != nil { - return "", err - } - b := sha256.Sum256([]byte(jwk)) - return base64.RawURLEncoding.EncodeToString(b[:]), nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws_test.go deleted file mode 100644 index 0ff0fb5a31..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/jws_test.go +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright 2015 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 acme - -import ( - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "fmt" - "math/big" - "testing" -) - -const ( - testKeyPEM = ` ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEA4xgZ3eRPkwoRvy7qeRUbmMDe0V+xH9eWLdu0iheeLlrmD2mq -WXfP9IeSKApbn34g8TuAS9g5zhq8ELQ3kmjr+KV86GAMgI6VAcGlq3QrzpTCf/30 -Ab7+zawrfRaFONa1HwEzPY1KHnGVkxJc85gNkwYI9SY2RHXtvln3zs5wITNrdosq -EXeaIkVYBEhbhNu54pp3kxo6TuWLi9e6pXeWetEwmlBwtWZlPoib2j3TxLBksKZf -oyFyek380mHgJAumQ/I2fjj98/97mk3ihOY4AgVdCDj1z/GCoZkG5Rq7nbCGyosy -KWyDX00Zs+nNqVhoLeIvXC4nnWdJMZ6rogxyQQIDAQABAoIBACIEZTOI1Kao9nmV -9IeIsuaR1Y61b9neOF/MLmIVIZu+AAJFCMB4Iw11FV6sFodwpEyeZhx2WkpWVN+H -r19eGiLX3zsL0DOdqBJoSIHDWCCMxgnYJ6nvS0nRxX3qVrBp8R2g12Ub+gNPbmFm -ecf/eeERIVxfifd9VsyRu34eDEvcmKFuLYbElFcPh62xE3x12UZvV/sN7gXbawpP -G+w255vbE5MoaKdnnO83cTFlcHvhn24M/78qP7Te5OAeelr1R89kYxQLpuGe4fbS -zc6E3ym5Td6urDetGGrSY1Eu10/8sMusX+KNWkm+RsBRbkyKq72ks/qKpOxOa+c6 -9gm+Y8ECgYEA/iNUyg1ubRdH11p82l8KHtFC1DPE0V1gSZsX29TpM5jS4qv46K+s -8Ym1zmrORM8x+cynfPx1VQZQ34EYeCMIX212ryJ+zDATl4NE0I4muMvSiH9vx6Xc -7FmhNnaYzPsBL5Tm9nmtQuP09YEn8poiOJFiDs/4olnD5ogA5O4THGkCgYEA5MIL -qWYBUuqbEWLRtMruUtpASclrBqNNsJEsMGbeqBJmoMxdHeSZckbLOrqm7GlMyNRJ -Ne/5uWRGSzaMYuGmwsPpERzqEvYFnSrpjW5YtXZ+JtxFXNVfm9Z1gLLgvGpOUCIU -RbpoDckDe1vgUuk3y5+DjZihs+rqIJ45XzXTzBkCgYBWuf3segruJZy5rEKhTv+o -JqeUvRn0jNYYKFpLBeyTVBrbie6GkbUGNIWbrK05pC+c3K9nosvzuRUOQQL1tJbd -4gA3oiD9U4bMFNr+BRTHyZ7OQBcIXdz3t1qhuHVKtnngIAN1p25uPlbRFUNpshnt -jgeVoHlsBhApcs5DUc+pyQKBgDzeHPg/+g4z+nrPznjKnktRY1W+0El93kgi+J0Q -YiJacxBKEGTJ1MKBb8X6sDurcRDm22wMpGfd9I5Cv2v4GsUsF7HD/cx5xdih+G73 -c4clNj/k0Ff5Nm1izPUno4C+0IOl7br39IPmfpSuR6wH/h6iHQDqIeybjxyKvT1G -N0rRAoGBAKGD+4ZI/E1MoJ5CXB8cDDMHagbE3cq/DtmYzE2v1DFpQYu5I4PCm5c7 -EQeIP6dZtv8IMgtGIb91QX9pXvP0aznzQKwYIA8nZgoENCPfiMTPiEDT9e/0lObO -9XWsXpbSTsRPj0sv1rB+UzBJ0PgjK4q2zOF0sNo7b1+6nlM3BWPx ------END RSA PRIVATE KEY----- -` - - // This thumbprint is for the testKey defined above. - testKeyThumbprint = "6nicxzh6WETQlrvdchkz-U3e3DOQZ4heJKU63rfqMqQ" - - // openssl ecparam -name secp256k1 -genkey -noout - testKeyECPEM = ` ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIK07hGLr0RwyUdYJ8wbIiBS55CjnkMD23DWr+ccnypWLoAoGCCqGSM49 -AwEHoUQDQgAE5lhEug5xK4xBDZ2nAbaxLtaLiv85bxJ7ePd1dkO23HThqIrvawF5 -QAaS/RNouybCiRhRjI3EaxLkQwgrCw0gqQ== ------END EC PRIVATE KEY----- -` - // openssl ecparam -name secp384r1 -genkey -noout - testKeyEC384PEM = ` ------BEGIN EC PRIVATE KEY----- -MIGkAgEBBDAQ4lNtXRORWr1bgKR1CGysr9AJ9SyEk4jiVnlUWWUChmSNL+i9SLSD -Oe/naPqXJ6CgBwYFK4EEACKhZANiAAQzKtj+Ms0vHoTX5dzv3/L5YMXOWuI5UKRj -JigpahYCqXD2BA1j0E/2xt5vlPf+gm0PL+UHSQsCokGnIGuaHCsJAp3ry0gHQEke -WYXapUUFdvaK1R2/2hn5O+eiQM8YzCg= ------END EC PRIVATE KEY----- -` - // openssl ecparam -name secp521r1 -genkey -noout - testKeyEC512PEM = ` ------BEGIN EC PRIVATE KEY----- -MIHcAgEBBEIBSNZKFcWzXzB/aJClAb305ibalKgtDA7+70eEkdPt28/3LZMM935Z -KqYHh/COcxuu3Kt8azRAUz3gyr4zZKhlKUSgBwYFK4EEACOhgYkDgYYABAHUNKbx -7JwC7H6pa2sV0tERWhHhB3JmW+OP6SUgMWryvIKajlx73eS24dy4QPGrWO9/ABsD -FqcRSkNVTXnIv6+0mAF25knqIBIg5Q8M9BnOu9GGAchcwt3O7RDHmqewnJJDrbjd -GGnm6rb+NnWR9DIopM0nKNkToWoF/hzopxu4Ae/GsQ== ------END EC PRIVATE KEY----- -` - // 1. openssl ec -in key.pem -noout -text - // 2. remove first byte, 04 (the header); the rest is X and Y - // 3. convert each with: echo | xxd -r -p | base64 -w 100 | tr -d '=' | tr '/+' '_-' - testKeyECPubX = "5lhEug5xK4xBDZ2nAbaxLtaLiv85bxJ7ePd1dkO23HQ" - testKeyECPubY = "4aiK72sBeUAGkv0TaLsmwokYUYyNxGsS5EMIKwsNIKk" - testKeyEC384PubX = "MyrY_jLNLx6E1-Xc79_y-WDFzlriOVCkYyYoKWoWAqlw9gQNY9BP9sbeb5T3_oJt" - testKeyEC384PubY = "Dy_lB0kLAqJBpyBrmhwrCQKd68tIB0BJHlmF2qVFBXb2itUdv9oZ-TvnokDPGMwo" - testKeyEC512PubX = "AdQ0pvHsnALsfqlraxXS0RFaEeEHcmZb44_pJSAxavK8gpqOXHvd5Lbh3LhA8atY738AGwMWpxFKQ1VNeci_r7SY" - testKeyEC512PubY = "AXbmSeogEiDlDwz0Gc670YYByFzC3c7tEMeap7CckkOtuN0Yaebqtv42dZH0MiikzSco2ROhagX-HOinG7gB78ax" - - // echo -n '{"crv":"P-256","kty":"EC","x":"","y":""}' | \ - // openssl dgst -binary -sha256 | base64 | tr -d '=' | tr '/+' '_-' - testKeyECThumbprint = "zedj-Bd1Zshp8KLePv2MB-lJ_Hagp7wAwdkA0NUTniU" -) - -var ( - testKey *rsa.PrivateKey - testKeyEC *ecdsa.PrivateKey - testKeyEC384 *ecdsa.PrivateKey - testKeyEC512 *ecdsa.PrivateKey -) - -func init() { - testKey = parseRSA(testKeyPEM, "testKeyPEM") - testKeyEC = parseEC(testKeyECPEM, "testKeyECPEM") - testKeyEC384 = parseEC(testKeyEC384PEM, "testKeyEC384PEM") - testKeyEC512 = parseEC(testKeyEC512PEM, "testKeyEC512PEM") -} - -func decodePEM(s, name string) []byte { - d, _ := pem.Decode([]byte(s)) - if d == nil { - panic("no block found in " + name) - } - return d.Bytes -} - -func parseRSA(s, name string) *rsa.PrivateKey { - b := decodePEM(s, name) - k, err := x509.ParsePKCS1PrivateKey(b) - if err != nil { - panic(fmt.Sprintf("%s: %v", name, err)) - } - return k -} - -func parseEC(s, name string) *ecdsa.PrivateKey { - b := decodePEM(s, name) - k, err := x509.ParseECPrivateKey(b) - if err != nil { - panic(fmt.Sprintf("%s: %v", name, err)) - } - return k -} - -func TestJWSEncodeJSON(t *testing.T) { - claims := struct{ Msg string }{"Hello JWS"} - // JWS signed with testKey and "nonce" as the nonce value - // JSON-serialized JWS fields are split for easier testing - const ( - // {"alg":"RS256","jwk":{"e":"AQAB","kty":"RSA","n":"..."},"nonce":"nonce"} - protected = "eyJhbGciOiJSUzI1NiIsImp3ayI6eyJlIjoiQVFBQiIsImt0eSI6" + - "IlJTQSIsIm4iOiI0eGdaM2VSUGt3b1J2eTdxZVJVYm1NRGUwVi14" + - "SDllV0xkdTBpaGVlTGxybUQybXFXWGZQOUllU0tBcGJuMzRnOFR1" + - "QVM5ZzV6aHE4RUxRM2ttanItS1Y4NkdBTWdJNlZBY0dscTNRcnpw" + - "VENmXzMwQWI3LXphd3JmUmFGT05hMUh3RXpQWTFLSG5HVmt4SmM4" + - "NWdOa3dZSTlTWTJSSFh0dmxuM3pzNXdJVE5yZG9zcUVYZWFJa1ZZ" + - "QkVoYmhOdTU0cHAza3hvNlR1V0xpOWU2cFhlV2V0RXdtbEJ3dFda" + - "bFBvaWIyajNUeExCa3NLWmZveUZ5ZWszODBtSGdKQXVtUV9JMmZq" + - "ajk4Xzk3bWszaWhPWTRBZ1ZkQ0RqMXpfR0NvWmtHNVJxN25iQ0d5" + - "b3N5S1d5RFgwMFpzLW5OcVZob0xlSXZYQzRubldkSk1aNnJvZ3h5" + - "UVEifSwibm9uY2UiOiJub25jZSJ9" - // {"Msg":"Hello JWS"} - payload = "eyJNc2ciOiJIZWxsbyBKV1MifQ" - signature = "eAGUikStX_UxyiFhxSLMyuyBcIB80GeBkFROCpap2sW3EmkU_ggF" + - "knaQzxrTfItICSAXsCLIquZ5BbrSWA_4vdEYrwWtdUj7NqFKjHRa" + - "zpLHcoR7r1rEHvkoP1xj49lS5fc3Wjjq8JUhffkhGbWZ8ZVkgPdC" + - "4tMBWiQDoth-x8jELP_3LYOB_ScUXi2mETBawLgOT2K8rA0Vbbmx" + - "hWNlOWuUf-8hL5YX4IOEwsS8JK_TrTq5Zc9My0zHJmaieqDV0UlP" + - "k0onFjPFkGm7MrPSgd0MqRG-4vSAg2O4hDo7rKv4n8POjjXlNQvM" + - "9IPLr8qZ7usYBKhEGwX3yq_eicAwBw" - ) - - b, err := jwsEncodeJSON(claims, testKey, "nonce") - if err != nil { - t.Fatal(err) - } - var jws struct{ Protected, Payload, Signature string } - if err := json.Unmarshal(b, &jws); err != nil { - t.Fatal(err) - } - if jws.Protected != protected { - t.Errorf("protected:\n%s\nwant:\n%s", jws.Protected, protected) - } - if jws.Payload != payload { - t.Errorf("payload:\n%s\nwant:\n%s", jws.Payload, payload) - } - if jws.Signature != signature { - t.Errorf("signature:\n%s\nwant:\n%s", jws.Signature, signature) - } -} - -func TestJWSEncodeJSONEC(t *testing.T) { - tt := []struct { - key *ecdsa.PrivateKey - x, y string - alg, crv string - }{ - {testKeyEC, testKeyECPubX, testKeyECPubY, "ES256", "P-256"}, - {testKeyEC384, testKeyEC384PubX, testKeyEC384PubY, "ES384", "P-384"}, - {testKeyEC512, testKeyEC512PubX, testKeyEC512PubY, "ES512", "P-521"}, - } - for i, test := range tt { - claims := struct{ Msg string }{"Hello JWS"} - b, err := jwsEncodeJSON(claims, test.key, "nonce") - if err != nil { - t.Errorf("%d: %v", i, err) - continue - } - var jws struct{ Protected, Payload, Signature string } - if err := json.Unmarshal(b, &jws); err != nil { - t.Errorf("%d: %v", i, err) - continue - } - - b, err = base64.RawURLEncoding.DecodeString(jws.Protected) - if err != nil { - t.Errorf("%d: jws.Protected: %v", i, err) - } - var head struct { - Alg string - Nonce string - JWK struct { - Crv string - Kty string - X string - Y string - } `json:"jwk"` - } - if err := json.Unmarshal(b, &head); err != nil { - t.Errorf("%d: jws.Protected: %v", i, err) - } - if head.Alg != test.alg { - t.Errorf("%d: head.Alg = %q; want %q", i, head.Alg, test.alg) - } - if head.Nonce != "nonce" { - t.Errorf("%d: head.Nonce = %q; want nonce", i, head.Nonce) - } - if head.JWK.Crv != test.crv { - t.Errorf("%d: head.JWK.Crv = %q; want %q", i, head.JWK.Crv, test.crv) - } - if head.JWK.Kty != "EC" { - t.Errorf("%d: head.JWK.Kty = %q; want EC", i, head.JWK.Kty) - } - if head.JWK.X != test.x { - t.Errorf("%d: head.JWK.X = %q; want %q", i, head.JWK.X, test.x) - } - if head.JWK.Y != test.y { - t.Errorf("%d: head.JWK.Y = %q; want %q", i, head.JWK.Y, test.y) - } - } -} - -func TestJWKThumbprintRSA(t *testing.T) { - // Key example from RFC 7638 - const base64N = "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAt" + - "VT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn6" + - "4tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FD" + - "W2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n9" + - "1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINH" + - "aQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw" - const base64E = "AQAB" - const expected = "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs" - - b, err := base64.RawURLEncoding.DecodeString(base64N) - if err != nil { - t.Fatalf("Error parsing example key N: %v", err) - } - n := new(big.Int).SetBytes(b) - - b, err = base64.RawURLEncoding.DecodeString(base64E) - if err != nil { - t.Fatalf("Error parsing example key E: %v", err) - } - e := new(big.Int).SetBytes(b) - - pub := &rsa.PublicKey{N: n, E: int(e.Uint64())} - th, err := JWKThumbprint(pub) - if err != nil { - t.Error(err) - } - if th != expected { - t.Errorf("thumbprint = %q; want %q", th, expected) - } -} - -func TestJWKThumbprintEC(t *testing.T) { - // Key example from RFC 7520 - // expected was computed with - // echo -n '{"crv":"P-521","kty":"EC","x":"","y":""}' | \ - // openssl dgst -binary -sha256 | \ - // base64 | \ - // tr -d '=' | tr '/+' '_-' - const ( - base64X = "AHKZLLOsCOzz5cY97ewNUajB957y-C-U88c3v13nmGZx6sYl_oJXu9A5RkT" + - "KqjqvjyekWF-7ytDyRXYgCF5cj0Kt" - base64Y = "AdymlHvOiLxXkEhayXQnNCvDX4h9htZaCJN34kfmC6pV5OhQHiraVySsUda" + - "QkAgDPrwQrJmbnX9cwlGfP-HqHZR1" - expected = "dHri3SADZkrush5HU_50AoRhcKFryN-PI6jPBtPL55M" - ) - - b, err := base64.RawURLEncoding.DecodeString(base64X) - if err != nil { - t.Fatalf("Error parsing example key X: %v", err) - } - x := new(big.Int).SetBytes(b) - - b, err = base64.RawURLEncoding.DecodeString(base64Y) - if err != nil { - t.Fatalf("Error parsing example key Y: %v", err) - } - y := new(big.Int).SetBytes(b) - - pub := &ecdsa.PublicKey{Curve: elliptic.P521(), X: x, Y: y} - th, err := JWKThumbprint(pub) - if err != nil { - t.Error(err) - } - if th != expected { - t.Errorf("thumbprint = %q; want %q", th, expected) - } -} - -func TestJWKThumbprintErrUnsupportedKey(t *testing.T) { - _, err := JWKThumbprint(struct{}{}) - if err != ErrUnsupportedKey { - t.Errorf("err = %q; want %q", err, ErrUnsupportedKey) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types.go deleted file mode 100644 index 54792c0650..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2016 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 acme - -import ( - "crypto" - "crypto/x509" - "errors" - "fmt" - "net/http" - "strings" - "time" -) - -// ACME server response statuses used to describe Authorization and Challenge states. -const ( - StatusUnknown = "unknown" - StatusPending = "pending" - StatusProcessing = "processing" - StatusValid = "valid" - StatusInvalid = "invalid" - StatusRevoked = "revoked" -) - -// CRLReasonCode identifies the reason for a certificate revocation. -type CRLReasonCode int - -// CRL reason codes as defined in RFC 5280. -const ( - CRLReasonUnspecified CRLReasonCode = 0 - CRLReasonKeyCompromise CRLReasonCode = 1 - CRLReasonCACompromise CRLReasonCode = 2 - CRLReasonAffiliationChanged CRLReasonCode = 3 - CRLReasonSuperseded CRLReasonCode = 4 - CRLReasonCessationOfOperation CRLReasonCode = 5 - CRLReasonCertificateHold CRLReasonCode = 6 - CRLReasonRemoveFromCRL CRLReasonCode = 8 - CRLReasonPrivilegeWithdrawn CRLReasonCode = 9 - CRLReasonAACompromise CRLReasonCode = 10 -) - -// ErrUnsupportedKey is returned when an unsupported key type is encountered. -var ErrUnsupportedKey = errors.New("acme: unknown key type; only RSA and ECDSA are supported") - -// Error is an ACME error, defined in Problem Details for HTTP APIs doc -// http://tools.ietf.org/html/draft-ietf-appsawg-http-problem. -type Error struct { - // StatusCode is The HTTP status code generated by the origin server. - StatusCode int - // ProblemType is a URI reference that identifies the problem type, - // typically in a "urn:acme:error:xxx" form. - ProblemType string - // Detail is a human-readable explanation specific to this occurrence of the problem. - Detail string - // Header is the original server error response headers. - // It may be nil. - Header http.Header -} - -func (e *Error) Error() string { - return fmt.Sprintf("%d %s: %s", e.StatusCode, e.ProblemType, e.Detail) -} - -// AuthorizationError indicates that an authorization for an identifier -// did not succeed. -// It contains all errors from Challenge items of the failed Authorization. -type AuthorizationError struct { - // URI uniquely identifies the failed Authorization. - URI string - - // Identifier is an AuthzID.Value of the failed Authorization. - Identifier string - - // Errors is a collection of non-nil error values of Challenge items - // of the failed Authorization. - Errors []error -} - -func (a *AuthorizationError) Error() string { - e := make([]string, len(a.Errors)) - for i, err := range a.Errors { - e[i] = err.Error() - } - return fmt.Sprintf("acme: authorization error for %s: %s", a.Identifier, strings.Join(e, "; ")) -} - -// RateLimit reports whether err represents a rate limit error and -// any Retry-After duration returned by the server. -// -// See the following for more details on rate limiting: -// https://tools.ietf.org/html/draft-ietf-acme-acme-05#section-5.6 -func RateLimit(err error) (time.Duration, bool) { - e, ok := err.(*Error) - if !ok { - return 0, false - } - // Some CA implementations may return incorrect values. - // Use case-insensitive comparison. - if !strings.HasSuffix(strings.ToLower(e.ProblemType), ":ratelimited") { - return 0, false - } - if e.Header == nil { - return 0, true - } - return retryAfter(e.Header.Get("Retry-After")), true -} - -// Account is a user account. It is associated with a private key. -type Account struct { - // URI is the account unique ID, which is also a URL used to retrieve - // account data from the CA. - URI string - - // Contact is a slice of contact info used during registration. - Contact []string - - // The terms user has agreed to. - // A value not matching CurrentTerms indicates that the user hasn't agreed - // to the actual Terms of Service of the CA. - AgreedTerms string - - // Actual terms of a CA. - CurrentTerms string - - // Authz is the authorization URL used to initiate a new authz flow. - Authz string - - // Authorizations is a URI from which a list of authorizations - // granted to this account can be fetched via a GET request. - Authorizations string - - // Certificates is a URI from which a list of certificates - // issued for this account can be fetched via a GET request. - Certificates string -} - -// Directory is ACME server discovery data. -type Directory struct { - // RegURL is an account endpoint URL, allowing for creating new - // and modifying existing accounts. - RegURL string - - // AuthzURL is used to initiate Identifier Authorization flow. - AuthzURL string - - // CertURL is a new certificate issuance endpoint URL. - CertURL string - - // RevokeURL is used to initiate a certificate revocation flow. - RevokeURL string - - // Term is a URI identifying the current terms of service. - Terms string - - // Website is an HTTP or HTTPS URL locating a website - // providing more information about the ACME server. - Website string - - // CAA consists of lowercase hostname elements, which the ACME server - // recognises as referring to itself for the purposes of CAA record validation - // as defined in RFC6844. - CAA []string -} - -// Challenge encodes a returned CA challenge. -// Its Error field may be non-nil if the challenge is part of an Authorization -// with StatusInvalid. -type Challenge struct { - // Type is the challenge type, e.g. "http-01", "tls-sni-02", "dns-01". - Type string - - // URI is where a challenge response can be posted to. - URI string - - // Token is a random value that uniquely identifies the challenge. - Token string - - // Status identifies the status of this challenge. - Status string - - // Error indicates the reason for an authorization failure - // when this challenge was used. - // The type of a non-nil value is *Error. - Error error -} - -// Authorization encodes an authorization response. -type Authorization struct { - // URI uniquely identifies a authorization. - URI string - - // Status identifies the status of an authorization. - Status string - - // Identifier is what the account is authorized to represent. - Identifier AuthzID - - // Challenges that the client needs to fulfill in order to prove possession - // of the identifier (for pending authorizations). - // For final authorizations, the challenges that were used. - Challenges []*Challenge - - // A collection of sets of challenges, each of which would be sufficient - // to prove possession of the identifier. - // Clients must complete a set of challenges that covers at least one set. - // Challenges are identified by their indices in the challenges array. - // If this field is empty, the client needs to complete all challenges. - Combinations [][]int -} - -// AuthzID is an identifier that an account is authorized to represent. -type AuthzID struct { - Type string // The type of identifier, e.g. "dns". - Value string // The identifier itself, e.g. "example.org". -} - -// wireAuthz is ACME JSON representation of Authorization objects. -type wireAuthz struct { - Status string - Challenges []wireChallenge - Combinations [][]int - Identifier struct { - Type string - Value string - } -} - -func (z *wireAuthz) authorization(uri string) *Authorization { - a := &Authorization{ - URI: uri, - Status: z.Status, - Identifier: AuthzID{Type: z.Identifier.Type, Value: z.Identifier.Value}, - Combinations: z.Combinations, // shallow copy - Challenges: make([]*Challenge, len(z.Challenges)), - } - for i, v := range z.Challenges { - a.Challenges[i] = v.challenge() - } - return a -} - -func (z *wireAuthz) error(uri string) *AuthorizationError { - err := &AuthorizationError{ - URI: uri, - Identifier: z.Identifier.Value, - } - for _, raw := range z.Challenges { - if raw.Error != nil { - err.Errors = append(err.Errors, raw.Error.error(nil)) - } - } - return err -} - -// wireChallenge is ACME JSON challenge representation. -type wireChallenge struct { - URI string `json:"uri"` - Type string - Token string - Status string - Error *wireError -} - -func (c *wireChallenge) challenge() *Challenge { - v := &Challenge{ - URI: c.URI, - Type: c.Type, - Token: c.Token, - Status: c.Status, - } - if v.Status == "" { - v.Status = StatusPending - } - if c.Error != nil { - v.Error = c.Error.error(nil) - } - return v -} - -// wireError is a subset of fields of the Problem Details object -// as described in https://tools.ietf.org/html/rfc7807#section-3.1. -type wireError struct { - Status int - Type string - Detail string -} - -func (e *wireError) error(h http.Header) *Error { - return &Error{ - StatusCode: e.Status, - ProblemType: e.Type, - Detail: e.Detail, - Header: h, - } -} - -// CertOption is an optional argument type for the TLS ChallengeCert methods for -// customizing a temporary certificate for TLS-based challenges. -type CertOption interface { - privateCertOpt() -} - -// WithKey creates an option holding a private/public key pair. -// The private part signs a certificate, and the public part represents the signee. -func WithKey(key crypto.Signer) CertOption { - return &certOptKey{key} -} - -type certOptKey struct { - key crypto.Signer -} - -func (*certOptKey) privateCertOpt() {} - -// WithTemplate creates an option for specifying a certificate template. -// See x509.CreateCertificate for template usage details. -// -// In TLS ChallengeCert methods, the template is also used as parent, -// resulting in a self-signed certificate. -// The DNSNames field of t is always overwritten for tls-sni challenge certs. -func WithTemplate(t *x509.Certificate) CertOption { - return (*certOptTemplate)(t) -} - -type certOptTemplate x509.Certificate - -func (*certOptTemplate) privateCertOpt() {} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types_test.go deleted file mode 100644 index a7553e6b70..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/acme/types_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2017 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 acme - -import ( - "errors" - "net/http" - "testing" - "time" -) - -func TestRateLimit(t *testing.T) { - now := time.Date(2017, 04, 27, 10, 0, 0, 0, time.UTC) - f := timeNow - defer func() { timeNow = f }() - timeNow = func() time.Time { return now } - - h120, hTime := http.Header{}, http.Header{} - h120.Set("Retry-After", "120") - hTime.Set("Retry-After", "Tue Apr 27 11:00:00 2017") - - err1 := &Error{ - ProblemType: "urn:ietf:params:acme:error:nolimit", - Header: h120, - } - err2 := &Error{ - ProblemType: "urn:ietf:params:acme:error:rateLimited", - Header: h120, - } - err3 := &Error{ - ProblemType: "urn:ietf:params:acme:error:rateLimited", - Header: nil, - } - err4 := &Error{ - ProblemType: "urn:ietf:params:acme:error:rateLimited", - Header: hTime, - } - - tt := []struct { - err error - res time.Duration - ok bool - }{ - {nil, 0, false}, - {errors.New("dummy"), 0, false}, - {err1, 0, false}, - {err2, 2 * time.Minute, true}, - {err3, 0, true}, - {err4, time.Hour, true}, - } - for i, test := range tt { - res, ok := RateLimit(test.err) - if ok != test.ok { - t.Errorf("%d: RateLimit(%+v): ok = %v; want %v", i, test.err, ok, test.ok) - continue - } - if res != test.res { - t.Errorf("%d: RateLimit(%+v) = %v; want %v", i, test.err, res, test.res) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2.go deleted file mode 100644 index 2ed87fe9c8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2017 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 argon2 implements the key derivation function Argon2. -// Argon2 was selected as the winner of the Password Hashing Competition and can -// be used to derive cryptographic keys from passwords. -// -// For a detailed specification of Argon2 see [1]. -// -// If you aren't sure which function you need, use Argon2id (IDKey) and -// the parameter recommendations for your scenario. -// -// -// Argon2i -// -// Argon2i (implemented by Key) is the side-channel resistant version of Argon2. -// It uses data-independent memory access, which is preferred for password -// hashing and password-based key derivation. Argon2i requires more passes over -// memory than Argon2id to protect from trade-off attacks. The recommended -// parameters (taken from [2]) for non-interactive operations are time=3 and to -// use the maximum available memory. -// -// -// Argon2id -// -// Argon2id (implemented by IDKey) is a hybrid version of Argon2 combining -// Argon2i and Argon2d. It uses data-independent memory access for the first -// half of the first iteration over the memory and data-dependent memory access -// for the rest. Argon2id is side-channel resistant and provides better brute- -// force cost savings due to time-memory tradeoffs than Argon2i. The recommended -// parameters for non-interactive operations (taken from [2]) are time=1 and to -// use the maximum available memory. -// -// [1] https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf -// [2] https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03#section-9.3 -package argon2 - -import ( - "encoding/binary" - "sync" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b" -) - -// The Argon2 version implemented by this package. -const Version = 0x13 - -const ( - argon2d = iota - argon2i - argon2id -) - -// Key derives a key from the password, salt, and cost parameters using Argon2i -// returning a byte slice of length keyLen that can be used as cryptographic -// key. The CPU cost and parallelism degree must be greater than zero. -// -// For example, you can get a derived key for e.g. AES-256 (which needs a -// 32-byte key) by doing: -// -// key := argon2.Key([]byte("some password"), salt, 3, 32*1024, 4, 32) -// -// The draft RFC recommends[2] time=3, and memory=32*1024 is a sensible number. -// If using that amount of memory (32 MB) is not possible in some contexts then -// the time parameter can be increased to compensate. -// -// The time parameter specifies the number of passes over the memory and the -// memory parameter specifies the size of the memory in KiB. For example -// memory=32*1024 sets the memory cost to ~32 MB. The number of threads can be -// adjusted to the number of available CPUs. The cost parameters should be -// increased as memory latency and CPU parallelism increases. Remember to get a -// good random salt. -func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte { - return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen) -} - -// IDKey derives a key from the password, salt, and cost parameters using -// Argon2id returning a byte slice of length keyLen that can be used as -// cryptographic key. The CPU cost and parallelism degree must be greater than -// zero. -// -// For example, you can get a derived key for e.g. AES-256 (which needs a -// 32-byte key) by doing: -// -// key := argon2.IDKey([]byte("some password"), salt, 1, 64*1024, 4, 32) -// -// The draft RFC recommends[2] time=1, and memory=64*1024 is a sensible number. -// If using that amount of memory (64 MB) is not possible in some contexts then -// the time parameter can be increased to compensate. -// -// The time parameter specifies the number of passes over the memory and the -// memory parameter specifies the size of the memory in KiB. For example -// memory=64*1024 sets the memory cost to ~64 MB. The number of threads can be -// adjusted to the numbers of available CPUs. The cost parameters should be -// increased as memory latency and CPU parallelism increases. Remember to get a -// good random salt. -func IDKey(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte { - return deriveKey(argon2id, password, salt, nil, nil, time, memory, threads, keyLen) -} - -func deriveKey(mode int, password, salt, secret, data []byte, time, memory uint32, threads uint8, keyLen uint32) []byte { - if time < 1 { - panic("argon2: number of rounds too small") - } - if threads < 1 { - panic("argon2: parallelism degree too low") - } - h0 := initHash(password, salt, secret, data, time, memory, uint32(threads), keyLen, mode) - - memory = memory / (syncPoints * uint32(threads)) * (syncPoints * uint32(threads)) - if memory < 2*syncPoints*uint32(threads) { - memory = 2 * syncPoints * uint32(threads) - } - B := initBlocks(&h0, memory, uint32(threads)) - processBlocks(B, time, memory, uint32(threads), mode) - return extractKey(B, memory, uint32(threads), keyLen) -} - -const ( - blockLength = 128 - syncPoints = 4 -) - -type block [blockLength]uint64 - -func initHash(password, salt, key, data []byte, time, memory, threads, keyLen uint32, mode int) [blake2b.Size + 8]byte { - var ( - h0 [blake2b.Size + 8]byte - params [24]byte - tmp [4]byte - ) - - b2, _ := blake2b.New512(nil) - binary.LittleEndian.PutUint32(params[0:4], threads) - binary.LittleEndian.PutUint32(params[4:8], keyLen) - binary.LittleEndian.PutUint32(params[8:12], memory) - binary.LittleEndian.PutUint32(params[12:16], time) - binary.LittleEndian.PutUint32(params[16:20], uint32(Version)) - binary.LittleEndian.PutUint32(params[20:24], uint32(mode)) - b2.Write(params[:]) - binary.LittleEndian.PutUint32(tmp[:], uint32(len(password))) - b2.Write(tmp[:]) - b2.Write(password) - binary.LittleEndian.PutUint32(tmp[:], uint32(len(salt))) - b2.Write(tmp[:]) - b2.Write(salt) - binary.LittleEndian.PutUint32(tmp[:], uint32(len(key))) - b2.Write(tmp[:]) - b2.Write(key) - binary.LittleEndian.PutUint32(tmp[:], uint32(len(data))) - b2.Write(tmp[:]) - b2.Write(data) - b2.Sum(h0[:0]) - return h0 -} - -func initBlocks(h0 *[blake2b.Size + 8]byte, memory, threads uint32) []block { - var block0 [1024]byte - B := make([]block, memory) - for lane := uint32(0); lane < threads; lane++ { - j := lane * (memory / threads) - binary.LittleEndian.PutUint32(h0[blake2b.Size+4:], lane) - - binary.LittleEndian.PutUint32(h0[blake2b.Size:], 0) - blake2bHash(block0[:], h0[:]) - for i := range B[j+0] { - B[j+0][i] = binary.LittleEndian.Uint64(block0[i*8:]) - } - - binary.LittleEndian.PutUint32(h0[blake2b.Size:], 1) - blake2bHash(block0[:], h0[:]) - for i := range B[j+1] { - B[j+1][i] = binary.LittleEndian.Uint64(block0[i*8:]) - } - } - return B -} - -func processBlocks(B []block, time, memory, threads uint32, mode int) { - lanes := memory / threads - segments := lanes / syncPoints - - processSegment := func(n, slice, lane uint32, wg *sync.WaitGroup) { - var addresses, in, zero block - if mode == argon2i || (mode == argon2id && n == 0 && slice < syncPoints/2) { - in[0] = uint64(n) - in[1] = uint64(lane) - in[2] = uint64(slice) - in[3] = uint64(memory) - in[4] = uint64(time) - in[5] = uint64(mode) - } - - index := uint32(0) - if n == 0 && slice == 0 { - index = 2 // we have already generated the first two blocks - if mode == argon2i || mode == argon2id { - in[6]++ - processBlock(&addresses, &in, &zero) - processBlock(&addresses, &addresses, &zero) - } - } - - offset := lane*lanes + slice*segments + index - var random uint64 - for index < segments { - prev := offset - 1 - if index == 0 && slice == 0 { - prev += lanes // last block in lane - } - if mode == argon2i || (mode == argon2id && n == 0 && slice < syncPoints/2) { - if index%blockLength == 0 { - in[6]++ - processBlock(&addresses, &in, &zero) - processBlock(&addresses, &addresses, &zero) - } - random = addresses[index%blockLength] - } else { - random = B[prev][0] - } - newOffset := indexAlpha(random, lanes, segments, threads, n, slice, lane, index) - processBlockXOR(&B[offset], &B[prev], &B[newOffset]) - index, offset = index+1, offset+1 - } - wg.Done() - } - - for n := uint32(0); n < time; n++ { - for slice := uint32(0); slice < syncPoints; slice++ { - var wg sync.WaitGroup - for lane := uint32(0); lane < threads; lane++ { - wg.Add(1) - go processSegment(n, slice, lane, &wg) - } - wg.Wait() - } - } - -} - -func extractKey(B []block, memory, threads, keyLen uint32) []byte { - lanes := memory / threads - for lane := uint32(0); lane < threads-1; lane++ { - for i, v := range B[(lane*lanes)+lanes-1] { - B[memory-1][i] ^= v - } - } - - var block [1024]byte - for i, v := range B[memory-1] { - binary.LittleEndian.PutUint64(block[i*8:], v) - } - key := make([]byte, keyLen) - blake2bHash(key, block[:]) - return key -} - -func indexAlpha(rand uint64, lanes, segments, threads, n, slice, lane, index uint32) uint32 { - refLane := uint32(rand>>32) % threads - if n == 0 && slice == 0 { - refLane = lane - } - m, s := 3*segments, ((slice+1)%syncPoints)*segments - if lane == refLane { - m += index - } - if n == 0 { - m, s = slice*segments, 0 - if slice == 0 || lane == refLane { - m += index - } - } - if index == 0 || lane == refLane { - m-- - } - return phi(rand, uint64(m), uint64(s), refLane, lanes) -} - -func phi(rand, m, s uint64, lane, lanes uint32) uint32 { - p := rand & 0xFFFFFFFF - p = (p * p) >> 32 - p = (p * m) >> 32 - return lane*lanes + uint32((s+m-(p+1))%uint64(lanes)) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2_test.go deleted file mode 100644 index 775b97a404..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/argon2_test.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2017 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 argon2 - -import ( - "bytes" - "encoding/hex" - "testing" -) - -var ( - genKatPassword = []byte{ - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - } - genKatSalt = []byte{0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02} - genKatSecret = []byte{0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03} - genKatAAD = []byte{0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04} -) - -func TestArgon2(t *testing.T) { - defer func(sse4 bool) { useSSE4 = sse4 }(useSSE4) - - if useSSE4 { - t.Log("SSE4.1 version") - testArgon2i(t) - testArgon2d(t) - testArgon2id(t) - useSSE4 = false - } - t.Log("generic version") - testArgon2i(t) - testArgon2d(t) - testArgon2id(t) -} - -func testArgon2d(t *testing.T) { - want := []byte{ - 0x51, 0x2b, 0x39, 0x1b, 0x6f, 0x11, 0x62, 0x97, - 0x53, 0x71, 0xd3, 0x09, 0x19, 0x73, 0x42, 0x94, - 0xf8, 0x68, 0xe3, 0xbe, 0x39, 0x84, 0xf3, 0xc1, - 0xa1, 0x3a, 0x4d, 0xb9, 0xfa, 0xbe, 0x4a, 0xcb, - } - hash := deriveKey(argon2d, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) - if !bytes.Equal(hash, want) { - t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) - } -} - -func testArgon2i(t *testing.T) { - want := []byte{ - 0xc8, 0x14, 0xd9, 0xd1, 0xdc, 0x7f, 0x37, 0xaa, - 0x13, 0xf0, 0xd7, 0x7f, 0x24, 0x94, 0xbd, 0xa1, - 0xc8, 0xde, 0x6b, 0x01, 0x6d, 0xd3, 0x88, 0xd2, - 0x99, 0x52, 0xa4, 0xc4, 0x67, 0x2b, 0x6c, 0xe8, - } - hash := deriveKey(argon2i, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) - if !bytes.Equal(hash, want) { - t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) - } -} - -func testArgon2id(t *testing.T) { - want := []byte{ - 0x0d, 0x64, 0x0d, 0xf5, 0x8d, 0x78, 0x76, 0x6c, - 0x08, 0xc0, 0x37, 0xa3, 0x4a, 0x8b, 0x53, 0xc9, - 0xd0, 0x1e, 0xf0, 0x45, 0x2d, 0x75, 0xb6, 0x5e, - 0xb5, 0x25, 0x20, 0xe9, 0x6b, 0x01, 0xe6, 0x59, - } - hash := deriveKey(argon2id, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) - if !bytes.Equal(hash, want) { - t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) - } -} - -func TestVectors(t *testing.T) { - password, salt := []byte("password"), []byte("somesalt") - for i, v := range testVectors { - want, err := hex.DecodeString(v.hash) - if err != nil { - t.Fatalf("Test %d: failed to decode hash: %v", i, err) - } - hash := deriveKey(v.mode, password, salt, nil, nil, v.time, v.memory, v.threads, uint32(len(want))) - if !bytes.Equal(hash, want) { - t.Errorf("Test %d - got: %s want: %s", i, hex.EncodeToString(hash), hex.EncodeToString(want)) - } - } -} - -func benchmarkArgon2(mode int, time, memory uint32, threads uint8, keyLen uint32, b *testing.B) { - password := []byte("password") - salt := []byte("choosing random salts is hard") - b.ReportAllocs() - for i := 0; i < b.N; i++ { - deriveKey(mode, password, salt, nil, nil, time, memory, threads, keyLen) - } -} - -func BenchmarkArgon2i(b *testing.B) { - b.Run(" Time: 3 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 3, 32*1024, 1, 32, b) }) - b.Run(" Time: 4 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 4, 32*1024, 1, 32, b) }) - b.Run(" Time: 5 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 5, 32*1024, 1, 32, b) }) - b.Run(" Time: 3 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 3, 64*1024, 4, 32, b) }) - b.Run(" Time: 4 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 4, 64*1024, 4, 32, b) }) - b.Run(" Time: 5 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 5, 64*1024, 4, 32, b) }) -} - -func BenchmarkArgon2d(b *testing.B) { - b.Run(" Time: 3, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 3, 32*1024, 1, 32, b) }) - b.Run(" Time: 4, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 4, 32*1024, 1, 32, b) }) - b.Run(" Time: 5, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 5, 32*1024, 1, 32, b) }) - b.Run(" Time: 3, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 3, 64*1024, 4, 32, b) }) - b.Run(" Time: 4, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 4, 64*1024, 4, 32, b) }) - b.Run(" Time: 5, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 5, 64*1024, 4, 32, b) }) -} - -func BenchmarkArgon2id(b *testing.B) { - b.Run(" Time: 3, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 3, 32*1024, 1, 32, b) }) - b.Run(" Time: 4, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 4, 32*1024, 1, 32, b) }) - b.Run(" Time: 5, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 5, 32*1024, 1, 32, b) }) - b.Run(" Time: 3, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 3, 64*1024, 4, 32, b) }) - b.Run(" Time: 4, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 4, 64*1024, 4, 32, b) }) - b.Run(" Time: 5, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 5, 64*1024, 4, 32, b) }) -} - -// Generated with the CLI of https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf -var testVectors = []struct { - mode int - time, memory uint32 - threads uint8 - hash string -}{ - { - mode: argon2i, time: 1, memory: 64, threads: 1, - hash: "b9c401d1844a67d50eae3967dc28870b22e508092e861a37", - }, - { - mode: argon2d, time: 1, memory: 64, threads: 1, - hash: "8727405fd07c32c78d64f547f24150d3f2e703a89f981a19", - }, - { - mode: argon2id, time: 1, memory: 64, threads: 1, - hash: "655ad15eac652dc59f7170a7332bf49b8469be1fdb9c28bb", - }, - { - mode: argon2i, time: 2, memory: 64, threads: 1, - hash: "8cf3d8f76a6617afe35fac48eb0b7433a9a670ca4a07ed64", - }, - { - mode: argon2d, time: 2, memory: 64, threads: 1, - hash: "3be9ec79a69b75d3752acb59a1fbb8b295a46529c48fbb75", - }, - { - mode: argon2id, time: 2, memory: 64, threads: 1, - hash: "068d62b26455936aa6ebe60060b0a65870dbfa3ddf8d41f7", - }, - { - mode: argon2i, time: 2, memory: 64, threads: 2, - hash: "2089f3e78a799720f80af806553128f29b132cafe40d059f", - }, - { - mode: argon2d, time: 2, memory: 64, threads: 2, - hash: "68e2462c98b8bc6bb60ec68db418ae2c9ed24fc6748a40e9", - }, - { - mode: argon2id, time: 2, memory: 64, threads: 2, - hash: "350ac37222f436ccb5c0972f1ebd3bf6b958bf2071841362", - }, - { - mode: argon2i, time: 3, memory: 256, threads: 2, - hash: "f5bbf5d4c3836af13193053155b73ec7476a6a2eb93fd5e6", - }, - { - mode: argon2d, time: 3, memory: 256, threads: 2, - hash: "f4f0669218eaf3641f39cc97efb915721102f4b128211ef2", - }, - { - mode: argon2id, time: 3, memory: 256, threads: 2, - hash: "4668d30ac4187e6878eedeacf0fd83c5a0a30db2cc16ef0b", - }, - { - mode: argon2i, time: 4, memory: 4096, threads: 4, - hash: "a11f7b7f3f93f02ad4bddb59ab62d121e278369288a0d0e7", - }, - { - mode: argon2d, time: 4, memory: 4096, threads: 4, - hash: "935598181aa8dc2b720914aa6435ac8d3e3a4210c5b0fb2d", - }, - { - mode: argon2id, time: 4, memory: 4096, threads: 4, - hash: "145db9733a9f4ee43edf33c509be96b934d505a4efb33c5a", - }, - { - mode: argon2i, time: 4, memory: 1024, threads: 8, - hash: "0cdd3956aa35e6b475a7b0c63488822f774f15b43f6e6e17", - }, - { - mode: argon2d, time: 4, memory: 1024, threads: 8, - hash: "83604fc2ad0589b9d055578f4d3cc55bc616df3578a896e9", - }, - { - mode: argon2id, time: 4, memory: 1024, threads: 8, - hash: "8dafa8e004f8ea96bf7c0f93eecf67a6047476143d15577f", - }, - { - mode: argon2i, time: 2, memory: 64, threads: 3, - hash: "5cab452fe6b8479c8661def8cd703b611a3905a6d5477fe6", - }, - { - mode: argon2d, time: 2, memory: 64, threads: 3, - hash: "22474a423bda2ccd36ec9afd5119e5c8949798cadf659f51", - }, - { - mode: argon2id, time: 2, memory: 64, threads: 3, - hash: "4a15b31aec7c2590b87d1f520be7d96f56658172deaa3079", - }, - { - mode: argon2i, time: 3, memory: 1024, threads: 6, - hash: "d236b29c2b2a09babee842b0dec6aa1e83ccbdea8023dced", - }, - { - mode: argon2d, time: 3, memory: 1024, threads: 6, - hash: "a3351b0319a53229152023d9206902f4ef59661cdca89481", - }, - { - mode: argon2id, time: 3, memory: 1024, threads: 6, - hash: "1640b932f4b60e272f5d2207b9a9c626ffa1bd88d2349016", - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blake2b.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blake2b.go deleted file mode 100644 index 7f856fd844..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blake2b.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017 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 argon2 - -import ( - "encoding/binary" - "hash" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b" -) - -// blake2bHash computes an arbitrary long hash value of in -// and writes the hash to out. -func blake2bHash(out []byte, in []byte) { - var b2 hash.Hash - if n := len(out); n < blake2b.Size { - b2, _ = blake2b.New(n, nil) - } else { - b2, _ = blake2b.New512(nil) - } - - var buffer [blake2b.Size]byte - binary.LittleEndian.PutUint32(buffer[:4], uint32(len(out))) - b2.Write(buffer[:4]) - b2.Write(in) - - if len(out) <= blake2b.Size { - b2.Sum(out[:0]) - return - } - - outLen := len(out) - b2.Sum(buffer[:0]) - b2.Reset() - copy(out, buffer[:32]) - out = out[32:] - for len(out) > blake2b.Size { - b2.Write(buffer[:]) - b2.Sum(buffer[:0]) - copy(out, buffer[:32]) - out = out[32:] - b2.Reset() - } - - if outLen%blake2b.Size > 0 { // outLen > 64 - r := ((outLen + 31) / 32) - 2 // ⌈τ /32⌉-2 - b2, _ = blake2b.New(outLen-32*r, nil) - } - b2.Write(buffer[:]) - b2.Sum(out[:0]) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.go deleted file mode 100644 index 62da3cf130..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2017 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. - -// +build amd64,!gccgo,!appengine - -package argon2 - -import "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu" - -func init() { - useSSE4 = cpu.X86.HasSSE41 -} - -//go:noescape -func mixBlocksSSE2(out, a, b, c *block) - -//go:noescape -func xorBlocksSSE2(out, a, b, c *block) - -//go:noescape -func blamkaSSE4(b *block) - -func processBlockSSE(out, in1, in2 *block, xor bool) { - var t block - mixBlocksSSE2(&t, in1, in2, &t) - if useSSE4 { - blamkaSSE4(&t) - } else { - for i := 0; i < blockLength; i += 16 { - blamkaGeneric( - &t[i+0], &t[i+1], &t[i+2], &t[i+3], - &t[i+4], &t[i+5], &t[i+6], &t[i+7], - &t[i+8], &t[i+9], &t[i+10], &t[i+11], - &t[i+12], &t[i+13], &t[i+14], &t[i+15], - ) - } - for i := 0; i < blockLength/8; i += 2 { - blamkaGeneric( - &t[i], &t[i+1], &t[16+i], &t[16+i+1], - &t[32+i], &t[32+i+1], &t[48+i], &t[48+i+1], - &t[64+i], &t[64+i+1], &t[80+i], &t[80+i+1], - &t[96+i], &t[96+i+1], &t[112+i], &t[112+i+1], - ) - } - } - if xor { - xorBlocksSSE2(out, in1, in2, &t) - } else { - mixBlocksSSE2(out, in1, in2, &t) - } -} - -func processBlock(out, in1, in2 *block) { - processBlockSSE(out, in1, in2, false) -} - -func processBlockXOR(out, in1, in2 *block) { - processBlockSSE(out, in1, in2, true) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.s deleted file mode 100644 index 74a6e7332a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_amd64.s +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2017 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. - -// +build amd64,!gccgo,!appengine - -#include "textflag.h" - -DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 - -#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v6, t1; \ - PUNPCKLQDQ v6, t2; \ - PUNPCKHQDQ v7, v6; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ v7, t2; \ - MOVO t1, v7; \ - MOVO v2, t1; \ - PUNPCKHQDQ t2, v7; \ - PUNPCKLQDQ v3, t2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v3 - -#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v2, t1; \ - PUNPCKLQDQ v2, t2; \ - PUNPCKHQDQ v3, v2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ v3, t2; \ - MOVO t1, v3; \ - MOVO v6, t1; \ - PUNPCKHQDQ t2, v3; \ - PUNPCKLQDQ v7, t2; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v7 - -#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, t0, c40, c48) \ - MOVO v0, t0; \ - PMULULQ v2, t0; \ - PADDQ v2, v0; \ - PADDQ t0, v0; \ - PADDQ t0, v0; \ - PXOR v0, v6; \ - PSHUFD $0xB1, v6, v6; \ - MOVO v4, t0; \ - PMULULQ v6, t0; \ - PADDQ v6, v4; \ - PADDQ t0, v4; \ - PADDQ t0, v4; \ - PXOR v4, v2; \ - PSHUFB c40, v2; \ - MOVO v0, t0; \ - PMULULQ v2, t0; \ - PADDQ v2, v0; \ - PADDQ t0, v0; \ - PADDQ t0, v0; \ - PXOR v0, v6; \ - PSHUFB c48, v6; \ - MOVO v4, t0; \ - PMULULQ v6, t0; \ - PADDQ v6, v4; \ - PADDQ t0, v4; \ - PADDQ t0, v4; \ - PXOR v4, v2; \ - MOVO v2, t0; \ - PADDQ v2, t0; \ - PSRLQ $63, v2; \ - PXOR t0, v2; \ - MOVO v1, t0; \ - PMULULQ v3, t0; \ - PADDQ v3, v1; \ - PADDQ t0, v1; \ - PADDQ t0, v1; \ - PXOR v1, v7; \ - PSHUFD $0xB1, v7, v7; \ - MOVO v5, t0; \ - PMULULQ v7, t0; \ - PADDQ v7, v5; \ - PADDQ t0, v5; \ - PADDQ t0, v5; \ - PXOR v5, v3; \ - PSHUFB c40, v3; \ - MOVO v1, t0; \ - PMULULQ v3, t0; \ - PADDQ v3, v1; \ - PADDQ t0, v1; \ - PADDQ t0, v1; \ - PXOR v1, v7; \ - PSHUFB c48, v7; \ - MOVO v5, t0; \ - PMULULQ v7, t0; \ - PADDQ v7, v5; \ - PADDQ t0, v5; \ - PADDQ t0, v5; \ - PXOR v5, v3; \ - MOVO v3, t0; \ - PADDQ v3, t0; \ - PSRLQ $63, v3; \ - PXOR t0, v3 - -#define LOAD_MSG_0(block, off) \ - MOVOU 8*(off+0)(block), X0; \ - MOVOU 8*(off+2)(block), X1; \ - MOVOU 8*(off+4)(block), X2; \ - MOVOU 8*(off+6)(block), X3; \ - MOVOU 8*(off+8)(block), X4; \ - MOVOU 8*(off+10)(block), X5; \ - MOVOU 8*(off+12)(block), X6; \ - MOVOU 8*(off+14)(block), X7 - -#define STORE_MSG_0(block, off) \ - MOVOU X0, 8*(off+0)(block); \ - MOVOU X1, 8*(off+2)(block); \ - MOVOU X2, 8*(off+4)(block); \ - MOVOU X3, 8*(off+6)(block); \ - MOVOU X4, 8*(off+8)(block); \ - MOVOU X5, 8*(off+10)(block); \ - MOVOU X6, 8*(off+12)(block); \ - MOVOU X7, 8*(off+14)(block) - -#define LOAD_MSG_1(block, off) \ - MOVOU 8*off+0*8(block), X0; \ - MOVOU 8*off+16*8(block), X1; \ - MOVOU 8*off+32*8(block), X2; \ - MOVOU 8*off+48*8(block), X3; \ - MOVOU 8*off+64*8(block), X4; \ - MOVOU 8*off+80*8(block), X5; \ - MOVOU 8*off+96*8(block), X6; \ - MOVOU 8*off+112*8(block), X7 - -#define STORE_MSG_1(block, off) \ - MOVOU X0, 8*off+0*8(block); \ - MOVOU X1, 8*off+16*8(block); \ - MOVOU X2, 8*off+32*8(block); \ - MOVOU X3, 8*off+48*8(block); \ - MOVOU X4, 8*off+64*8(block); \ - MOVOU X5, 8*off+80*8(block); \ - MOVOU X6, 8*off+96*8(block); \ - MOVOU X7, 8*off+112*8(block) - -#define BLAMKA_ROUND_0(block, off, t0, t1, c40, c48) \ - LOAD_MSG_0(block, off); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ - STORE_MSG_0(block, off) - -#define BLAMKA_ROUND_1(block, off, t0, t1, c40, c48) \ - LOAD_MSG_1(block, off); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ - STORE_MSG_1(block, off) - -// func blamkaSSE4(b *block) -TEXT ·blamkaSSE4(SB), 4, $0-8 - MOVQ b+0(FP), AX - - MOVOU ·c40<>(SB), X10 - MOVOU ·c48<>(SB), X11 - - BLAMKA_ROUND_0(AX, 0, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 16, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 32, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 48, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 64, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 80, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 96, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 112, X8, X9, X10, X11) - - BLAMKA_ROUND_1(AX, 0, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 2, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 4, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 6, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 8, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 10, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 12, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 14, X8, X9, X10, X11) - RET - -// func mixBlocksSSE2(out, a, b, c *block) -TEXT ·mixBlocksSSE2(SB), 4, $0-32 - MOVQ out+0(FP), DX - MOVQ a+8(FP), AX - MOVQ b+16(FP), BX - MOVQ a+24(FP), CX - MOVQ $128, BP - -loop: - MOVOU 0(AX), X0 - MOVOU 0(BX), X1 - MOVOU 0(CX), X2 - PXOR X1, X0 - PXOR X2, X0 - MOVOU X0, 0(DX) - ADDQ $16, AX - ADDQ $16, BX - ADDQ $16, CX - ADDQ $16, DX - SUBQ $2, BP - JA loop - RET - -// func xorBlocksSSE2(out, a, b, c *block) -TEXT ·xorBlocksSSE2(SB), 4, $0-32 - MOVQ out+0(FP), DX - MOVQ a+8(FP), AX - MOVQ b+16(FP), BX - MOVQ a+24(FP), CX - MOVQ $128, BP - -loop: - MOVOU 0(AX), X0 - MOVOU 0(BX), X1 - MOVOU 0(CX), X2 - MOVOU 0(DX), X3 - PXOR X1, X0 - PXOR X2, X0 - PXOR X3, X0 - MOVOU X0, 0(DX) - ADDQ $16, AX - ADDQ $16, BX - ADDQ $16, CX - ADDQ $16, DX - SUBQ $2, BP - JA loop - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_generic.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_generic.go deleted file mode 100644 index a481b2243f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_generic.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2017 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 argon2 - -var useSSE4 bool - -func processBlockGeneric(out, in1, in2 *block, xor bool) { - var t block - for i := range t { - t[i] = in1[i] ^ in2[i] - } - for i := 0; i < blockLength; i += 16 { - blamkaGeneric( - &t[i+0], &t[i+1], &t[i+2], &t[i+3], - &t[i+4], &t[i+5], &t[i+6], &t[i+7], - &t[i+8], &t[i+9], &t[i+10], &t[i+11], - &t[i+12], &t[i+13], &t[i+14], &t[i+15], - ) - } - for i := 0; i < blockLength/8; i += 2 { - blamkaGeneric( - &t[i], &t[i+1], &t[16+i], &t[16+i+1], - &t[32+i], &t[32+i+1], &t[48+i], &t[48+i+1], - &t[64+i], &t[64+i+1], &t[80+i], &t[80+i+1], - &t[96+i], &t[96+i+1], &t[112+i], &t[112+i+1], - ) - } - if xor { - for i := range t { - out[i] ^= in1[i] ^ in2[i] ^ t[i] - } - } else { - for i := range t { - out[i] = in1[i] ^ in2[i] ^ t[i] - } - } -} - -func blamkaGeneric(t00, t01, t02, t03, t04, t05, t06, t07, t08, t09, t10, t11, t12, t13, t14, t15 *uint64) { - v00, v01, v02, v03 := *t00, *t01, *t02, *t03 - v04, v05, v06, v07 := *t04, *t05, *t06, *t07 - v08, v09, v10, v11 := *t08, *t09, *t10, *t11 - v12, v13, v14, v15 := *t12, *t13, *t14, *t15 - - v00 += v04 + 2*uint64(uint32(v00))*uint64(uint32(v04)) - v12 ^= v00 - v12 = v12>>32 | v12<<32 - v08 += v12 + 2*uint64(uint32(v08))*uint64(uint32(v12)) - v04 ^= v08 - v04 = v04>>24 | v04<<40 - - v00 += v04 + 2*uint64(uint32(v00))*uint64(uint32(v04)) - v12 ^= v00 - v12 = v12>>16 | v12<<48 - v08 += v12 + 2*uint64(uint32(v08))*uint64(uint32(v12)) - v04 ^= v08 - v04 = v04>>63 | v04<<1 - - v01 += v05 + 2*uint64(uint32(v01))*uint64(uint32(v05)) - v13 ^= v01 - v13 = v13>>32 | v13<<32 - v09 += v13 + 2*uint64(uint32(v09))*uint64(uint32(v13)) - v05 ^= v09 - v05 = v05>>24 | v05<<40 - - v01 += v05 + 2*uint64(uint32(v01))*uint64(uint32(v05)) - v13 ^= v01 - v13 = v13>>16 | v13<<48 - v09 += v13 + 2*uint64(uint32(v09))*uint64(uint32(v13)) - v05 ^= v09 - v05 = v05>>63 | v05<<1 - - v02 += v06 + 2*uint64(uint32(v02))*uint64(uint32(v06)) - v14 ^= v02 - v14 = v14>>32 | v14<<32 - v10 += v14 + 2*uint64(uint32(v10))*uint64(uint32(v14)) - v06 ^= v10 - v06 = v06>>24 | v06<<40 - - v02 += v06 + 2*uint64(uint32(v02))*uint64(uint32(v06)) - v14 ^= v02 - v14 = v14>>16 | v14<<48 - v10 += v14 + 2*uint64(uint32(v10))*uint64(uint32(v14)) - v06 ^= v10 - v06 = v06>>63 | v06<<1 - - v03 += v07 + 2*uint64(uint32(v03))*uint64(uint32(v07)) - v15 ^= v03 - v15 = v15>>32 | v15<<32 - v11 += v15 + 2*uint64(uint32(v11))*uint64(uint32(v15)) - v07 ^= v11 - v07 = v07>>24 | v07<<40 - - v03 += v07 + 2*uint64(uint32(v03))*uint64(uint32(v07)) - v15 ^= v03 - v15 = v15>>16 | v15<<48 - v11 += v15 + 2*uint64(uint32(v11))*uint64(uint32(v15)) - v07 ^= v11 - v07 = v07>>63 | v07<<1 - - v00 += v05 + 2*uint64(uint32(v00))*uint64(uint32(v05)) - v15 ^= v00 - v15 = v15>>32 | v15<<32 - v10 += v15 + 2*uint64(uint32(v10))*uint64(uint32(v15)) - v05 ^= v10 - v05 = v05>>24 | v05<<40 - - v00 += v05 + 2*uint64(uint32(v00))*uint64(uint32(v05)) - v15 ^= v00 - v15 = v15>>16 | v15<<48 - v10 += v15 + 2*uint64(uint32(v10))*uint64(uint32(v15)) - v05 ^= v10 - v05 = v05>>63 | v05<<1 - - v01 += v06 + 2*uint64(uint32(v01))*uint64(uint32(v06)) - v12 ^= v01 - v12 = v12>>32 | v12<<32 - v11 += v12 + 2*uint64(uint32(v11))*uint64(uint32(v12)) - v06 ^= v11 - v06 = v06>>24 | v06<<40 - - v01 += v06 + 2*uint64(uint32(v01))*uint64(uint32(v06)) - v12 ^= v01 - v12 = v12>>16 | v12<<48 - v11 += v12 + 2*uint64(uint32(v11))*uint64(uint32(v12)) - v06 ^= v11 - v06 = v06>>63 | v06<<1 - - v02 += v07 + 2*uint64(uint32(v02))*uint64(uint32(v07)) - v13 ^= v02 - v13 = v13>>32 | v13<<32 - v08 += v13 + 2*uint64(uint32(v08))*uint64(uint32(v13)) - v07 ^= v08 - v07 = v07>>24 | v07<<40 - - v02 += v07 + 2*uint64(uint32(v02))*uint64(uint32(v07)) - v13 ^= v02 - v13 = v13>>16 | v13<<48 - v08 += v13 + 2*uint64(uint32(v08))*uint64(uint32(v13)) - v07 ^= v08 - v07 = v07>>63 | v07<<1 - - v03 += v04 + 2*uint64(uint32(v03))*uint64(uint32(v04)) - v14 ^= v03 - v14 = v14>>32 | v14<<32 - v09 += v14 + 2*uint64(uint32(v09))*uint64(uint32(v14)) - v04 ^= v09 - v04 = v04>>24 | v04<<40 - - v03 += v04 + 2*uint64(uint32(v03))*uint64(uint32(v04)) - v14 ^= v03 - v14 = v14>>16 | v14<<48 - v09 += v14 + 2*uint64(uint32(v09))*uint64(uint32(v14)) - v04 ^= v09 - v04 = v04>>63 | v04<<1 - - *t00, *t01, *t02, *t03 = v00, v01, v02, v03 - *t04, *t05, *t06, *t07 = v04, v05, v06, v07 - *t08, *t09, *t10, *t11 = v08, v09, v10, v11 - *t12, *t13, *t14, *t15 = v12, v13, v14, v15 -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_ref.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_ref.go deleted file mode 100644 index baf7b551da..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/argon2/blamka_ref.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017 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. - -// +build !amd64 appengine gccgo - -package argon2 - -func processBlock(out, in1, in2 *block) { - processBlockGeneric(out, in1, in2, false) -} - -func processBlockXOR(out, in1, in2 *block) { - processBlockGeneric(out, in1, in2, true) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/base64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/base64.go deleted file mode 100644 index fc31160908..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/base64.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2011 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 bcrypt - -import "encoding/base64" - -const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" - -var bcEncoding = base64.NewEncoding(alphabet) - -func base64Encode(src []byte) []byte { - n := bcEncoding.EncodedLen(len(src)) - dst := make([]byte, n) - bcEncoding.Encode(dst, src) - for dst[n-1] == '=' { - n-- - } - return dst[:n] -} - -func base64Decode(src []byte) ([]byte, error) { - numOfEquals := 4 - (len(src) % 4) - for i := 0; i < numOfEquals; i++ { - src = append(src, '=') - } - - dst := make([]byte, bcEncoding.DecodedLen(len(src))) - n, err := bcEncoding.Decode(dst, src) - if err != nil { - return nil, err - } - return dst[:n], nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt.go deleted file mode 100644 index acbb7c69ef..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2011 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 bcrypt implements Provos and Mazières's bcrypt adaptive hashing -// algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf -package bcrypt - -// The code is a port of Provos and Mazières's C implementation. -import ( - "crypto/rand" - "crypto/subtle" - "errors" - "fmt" - "io" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish" -) - -const ( - MinCost int = 4 // the minimum allowable cost as passed in to GenerateFromPassword - MaxCost int = 31 // the maximum allowable cost as passed in to GenerateFromPassword - DefaultCost int = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword -) - -// The error returned from CompareHashAndPassword when a password and hash do -// not match. -var ErrMismatchedHashAndPassword = errors.New("crypto/bcrypt: hashedPassword is not the hash of the given password") - -// The error returned from CompareHashAndPassword when a hash is too short to -// be a bcrypt hash. -var ErrHashTooShort = errors.New("crypto/bcrypt: hashedSecret too short to be a bcrypted password") - -// The error returned from CompareHashAndPassword when a hash was created with -// a bcrypt algorithm newer than this implementation. -type HashVersionTooNewError byte - -func (hv HashVersionTooNewError) Error() string { - return fmt.Sprintf("crypto/bcrypt: bcrypt algorithm version '%c' requested is newer than current version '%c'", byte(hv), majorVersion) -} - -// The error returned from CompareHashAndPassword when a hash starts with something other than '$' -type InvalidHashPrefixError byte - -func (ih InvalidHashPrefixError) Error() string { - return fmt.Sprintf("crypto/bcrypt: bcrypt hashes must start with '$', but hashedSecret started with '%c'", byte(ih)) -} - -type InvalidCostError int - -func (ic InvalidCostError) Error() string { - return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), int(MinCost), int(MaxCost)) -} - -const ( - majorVersion = '2' - minorVersion = 'a' - maxSaltSize = 16 - maxCryptedHashSize = 23 - encodedSaltSize = 22 - encodedHashSize = 31 - minHashSize = 59 -) - -// magicCipherData is an IV for the 64 Blowfish encryption calls in -// bcrypt(). It's the string "OrpheanBeholderScryDoubt" in big-endian bytes. -var magicCipherData = []byte{ - 0x4f, 0x72, 0x70, 0x68, - 0x65, 0x61, 0x6e, 0x42, - 0x65, 0x68, 0x6f, 0x6c, - 0x64, 0x65, 0x72, 0x53, - 0x63, 0x72, 0x79, 0x44, - 0x6f, 0x75, 0x62, 0x74, -} - -type hashed struct { - hash []byte - salt []byte - cost int // allowed range is MinCost to MaxCost - major byte - minor byte -} - -// GenerateFromPassword returns the bcrypt hash of the password at the given -// cost. If the cost given is less than MinCost, the cost will be set to -// DefaultCost, instead. Use CompareHashAndPassword, as defined in this package, -// to compare the returned hashed password with its cleartext version. -func GenerateFromPassword(password []byte, cost int) ([]byte, error) { - p, err := newFromPassword(password, cost) - if err != nil { - return nil, err - } - return p.Hash(), nil -} - -// CompareHashAndPassword compares a bcrypt hashed password with its possible -// plaintext equivalent. Returns nil on success, or an error on failure. -func CompareHashAndPassword(hashedPassword, password []byte) error { - p, err := newFromHash(hashedPassword) - if err != nil { - return err - } - - otherHash, err := bcrypt(password, p.cost, p.salt) - if err != nil { - return err - } - - otherP := &hashed{otherHash, p.salt, p.cost, p.major, p.minor} - if subtle.ConstantTimeCompare(p.Hash(), otherP.Hash()) == 1 { - return nil - } - - return ErrMismatchedHashAndPassword -} - -// Cost returns the hashing cost used to create the given hashed -// password. When, in the future, the hashing cost of a password system needs -// to be increased in order to adjust for greater computational power, this -// function allows one to establish which passwords need to be updated. -func Cost(hashedPassword []byte) (int, error) { - p, err := newFromHash(hashedPassword) - if err != nil { - return 0, err - } - return p.cost, nil -} - -func newFromPassword(password []byte, cost int) (*hashed, error) { - if cost < MinCost { - cost = DefaultCost - } - p := new(hashed) - p.major = majorVersion - p.minor = minorVersion - - err := checkCost(cost) - if err != nil { - return nil, err - } - p.cost = cost - - unencodedSalt := make([]byte, maxSaltSize) - _, err = io.ReadFull(rand.Reader, unencodedSalt) - if err != nil { - return nil, err - } - - p.salt = base64Encode(unencodedSalt) - hash, err := bcrypt(password, p.cost, p.salt) - if err != nil { - return nil, err - } - p.hash = hash - return p, err -} - -func newFromHash(hashedSecret []byte) (*hashed, error) { - if len(hashedSecret) < minHashSize { - return nil, ErrHashTooShort - } - p := new(hashed) - n, err := p.decodeVersion(hashedSecret) - if err != nil { - return nil, err - } - hashedSecret = hashedSecret[n:] - n, err = p.decodeCost(hashedSecret) - if err != nil { - return nil, err - } - hashedSecret = hashedSecret[n:] - - // The "+2" is here because we'll have to append at most 2 '=' to the salt - // when base64 decoding it in expensiveBlowfishSetup(). - p.salt = make([]byte, encodedSaltSize, encodedSaltSize+2) - copy(p.salt, hashedSecret[:encodedSaltSize]) - - hashedSecret = hashedSecret[encodedSaltSize:] - p.hash = make([]byte, len(hashedSecret)) - copy(p.hash, hashedSecret) - - return p, nil -} - -func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) { - cipherData := make([]byte, len(magicCipherData)) - copy(cipherData, magicCipherData) - - c, err := expensiveBlowfishSetup(password, uint32(cost), salt) - if err != nil { - return nil, err - } - - for i := 0; i < 24; i += 8 { - for j := 0; j < 64; j++ { - c.Encrypt(cipherData[i:i+8], cipherData[i:i+8]) - } - } - - // Bug compatibility with C bcrypt implementations. We only encode 23 of - // the 24 bytes encrypted. - hsh := base64Encode(cipherData[:maxCryptedHashSize]) - return hsh, nil -} - -func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { - csalt, err := base64Decode(salt) - if err != nil { - return nil, err - } - - // Bug compatibility with C bcrypt implementations. They use the trailing - // NULL in the key string during expansion. - // We copy the key to prevent changing the underlying array. - ckey := append(key[:len(key):len(key)], 0) - - c, err := blowfish.NewSaltedCipher(ckey, csalt) - if err != nil { - return nil, err - } - - var i, rounds uint64 - rounds = 1 << cost - for i = 0; i < rounds; i++ { - blowfish.ExpandKey(ckey, c) - blowfish.ExpandKey(csalt, c) - } - - return c, nil -} - -func (p *hashed) Hash() []byte { - arr := make([]byte, 60) - arr[0] = '$' - arr[1] = p.major - n := 2 - if p.minor != 0 { - arr[2] = p.minor - n = 3 - } - arr[n] = '$' - n++ - copy(arr[n:], []byte(fmt.Sprintf("%02d", p.cost))) - n += 2 - arr[n] = '$' - n++ - copy(arr[n:], p.salt) - n += encodedSaltSize - copy(arr[n:], p.hash) - n += encodedHashSize - return arr[:n] -} - -func (p *hashed) decodeVersion(sbytes []byte) (int, error) { - if sbytes[0] != '$' { - return -1, InvalidHashPrefixError(sbytes[0]) - } - if sbytes[1] > majorVersion { - return -1, HashVersionTooNewError(sbytes[1]) - } - p.major = sbytes[1] - n := 3 - if sbytes[2] != '$' { - p.minor = sbytes[2] - n++ - } - return n, nil -} - -// sbytes should begin where decodeVersion left off. -func (p *hashed) decodeCost(sbytes []byte) (int, error) { - cost, err := strconv.Atoi(string(sbytes[0:2])) - if err != nil { - return -1, err - } - err = checkCost(cost) - if err != nil { - return -1, err - } - p.cost = cost - return 3, nil -} - -func (p *hashed) String() string { - return fmt.Sprintf("&{hash: %#v, salt: %#v, cost: %d, major: %c, minor: %c}", string(p.hash), p.salt, p.cost, p.major, p.minor) -} - -func checkCost(cost int) error { - if cost < MinCost || cost > MaxCost { - return InvalidCostError(cost) - } - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt_test.go deleted file mode 100644 index aecf759eb1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bcrypt/bcrypt_test.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2011 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 bcrypt - -import ( - "bytes" - "fmt" - "testing" -) - -func TestBcryptingIsEasy(t *testing.T) { - pass := []byte("mypassword") - hp, err := GenerateFromPassword(pass, 0) - if err != nil { - t.Fatalf("GenerateFromPassword error: %s", err) - } - - if CompareHashAndPassword(hp, pass) != nil { - t.Errorf("%v should hash %s correctly", hp, pass) - } - - notPass := "notthepass" - err = CompareHashAndPassword(hp, []byte(notPass)) - if err != ErrMismatchedHashAndPassword { - t.Errorf("%v and %s should be mismatched", hp, notPass) - } -} - -func TestBcryptingIsCorrect(t *testing.T) { - pass := []byte("allmine") - salt := []byte("XajjQvNhvvRt5GSeFk1xFe") - expectedHash := []byte("$2a$10$XajjQvNhvvRt5GSeFk1xFeyqRrsxkhBkUiQeg0dt.wU1qD4aFDcga") - - hash, err := bcrypt(pass, 10, salt) - if err != nil { - t.Fatalf("bcrypt blew up: %v", err) - } - if !bytes.HasSuffix(expectedHash, hash) { - t.Errorf("%v should be the suffix of %v", hash, expectedHash) - } - - h, err := newFromHash(expectedHash) - if err != nil { - t.Errorf("Unable to parse %s: %v", string(expectedHash), err) - } - - // This is not the safe way to compare these hashes. We do this only for - // testing clarity. Use bcrypt.CompareHashAndPassword() - if err == nil && !bytes.Equal(expectedHash, h.Hash()) { - t.Errorf("Parsed hash %v should equal %v", h.Hash(), expectedHash) - } -} - -func TestVeryShortPasswords(t *testing.T) { - key := []byte("k") - salt := []byte("XajjQvNhvvRt5GSeFk1xFe") - _, err := bcrypt(key, 10, salt) - if err != nil { - t.Errorf("One byte key resulted in error: %s", err) - } -} - -func TestTooLongPasswordsWork(t *testing.T) { - salt := []byte("XajjQvNhvvRt5GSeFk1xFe") - // One byte over the usual 56 byte limit that blowfish has - tooLongPass := []byte("012345678901234567890123456789012345678901234567890123456") - tooLongExpected := []byte("$2a$10$XajjQvNhvvRt5GSeFk1xFe5l47dONXg781AmZtd869sO8zfsHuw7C") - hash, err := bcrypt(tooLongPass, 10, salt) - if err != nil { - t.Fatalf("bcrypt blew up on long password: %v", err) - } - if !bytes.HasSuffix(tooLongExpected, hash) { - t.Errorf("%v should be the suffix of %v", hash, tooLongExpected) - } -} - -type InvalidHashTest struct { - err error - hash []byte -} - -var invalidTests = []InvalidHashTest{ - {ErrHashTooShort, []byte("$2a$10$fooo")}, - {ErrHashTooShort, []byte("$2a")}, - {HashVersionTooNewError('3'), []byte("$3a$10$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")}, - {InvalidHashPrefixError('%'), []byte("%2a$10$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")}, - {InvalidCostError(32), []byte("$2a$32$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")}, -} - -func TestInvalidHashErrors(t *testing.T) { - check := func(name string, expected, err error) { - if err == nil { - t.Errorf("%s: Should have returned an error", name) - } - if err != nil && err != expected { - t.Errorf("%s gave err %v but should have given %v", name, err, expected) - } - } - for _, iht := range invalidTests { - _, err := newFromHash(iht.hash) - check("newFromHash", iht.err, err) - err = CompareHashAndPassword(iht.hash, []byte("anything")) - check("CompareHashAndPassword", iht.err, err) - } -} - -func TestUnpaddedBase64Encoding(t *testing.T) { - original := []byte{101, 201, 101, 75, 19, 227, 199, 20, 239, 236, 133, 32, 30, 109, 243, 30} - encodedOriginal := []byte("XajjQvNhvvRt5GSeFk1xFe") - - encoded := base64Encode(original) - - if !bytes.Equal(encodedOriginal, encoded) { - t.Errorf("Encoded %v should have equaled %v", encoded, encodedOriginal) - } - - decoded, err := base64Decode(encodedOriginal) - if err != nil { - t.Fatalf("base64Decode blew up: %s", err) - } - - if !bytes.Equal(decoded, original) { - t.Errorf("Decoded %v should have equaled %v", decoded, original) - } -} - -func TestCost(t *testing.T) { - suffix := "XajjQvNhvvRt5GSeFk1xFe5l47dONXg781AmZtd869sO8zfsHuw7C" - for _, vers := range []string{"2a", "2"} { - for _, cost := range []int{4, 10} { - s := fmt.Sprintf("$%s$%02d$%s", vers, cost, suffix) - h := []byte(s) - actual, err := Cost(h) - if err != nil { - t.Errorf("Cost, error: %s", err) - continue - } - if actual != cost { - t.Errorf("Cost, expected: %d, actual: %d", cost, actual) - } - } - } - _, err := Cost([]byte("$a$a$" + suffix)) - if err == nil { - t.Errorf("Cost, malformed but no error returned") - } -} - -func TestCostValidationInHash(t *testing.T) { - if testing.Short() { - return - } - - pass := []byte("mypassword") - - for c := 0; c < MinCost; c++ { - p, _ := newFromPassword(pass, c) - if p.cost != DefaultCost { - t.Errorf("newFromPassword should default costs below %d to %d, but was %d", MinCost, DefaultCost, p.cost) - } - } - - p, _ := newFromPassword(pass, 14) - if p.cost != 14 { - t.Errorf("newFromPassword should default cost to 14, but was %d", p.cost) - } - - hp, _ := newFromHash(p.Hash()) - if p.cost != hp.cost { - t.Errorf("newFromHash should maintain the cost at %d, but was %d", p.cost, hp.cost) - } - - _, err := newFromPassword(pass, 32) - if err == nil { - t.Fatalf("newFromPassword: should return a cost error") - } - if err != InvalidCostError(32) { - t.Errorf("newFromPassword: should return cost error, got %#v", err) - } -} - -func TestCostReturnsWithLeadingZeroes(t *testing.T) { - hp, _ := newFromPassword([]byte("abcdefgh"), 7) - cost := hp.Hash()[4:7] - expected := []byte("07$") - - if !bytes.Equal(expected, cost) { - t.Errorf("single digit costs in hash should have leading zeros: was %v instead of %v", cost, expected) - } -} - -func TestMinorNotRequired(t *testing.T) { - noMinorHash := []byte("$2$10$XajjQvNhvvRt5GSeFk1xFeyqRrsxkhBkUiQeg0dt.wU1qD4aFDcga") - h, err := newFromHash(noMinorHash) - if err != nil { - t.Fatalf("No minor hash blew up: %s", err) - } - if h.minor != 0 { - t.Errorf("Should leave minor version at 0, but was %d", h.minor) - } - - if !bytes.Equal(noMinorHash, h.Hash()) { - t.Errorf("Should generate hash %v, but created %v", noMinorHash, h.Hash()) - } -} - -func BenchmarkEqual(b *testing.B) { - b.StopTimer() - passwd := []byte("somepasswordyoulike") - hash, _ := GenerateFromPassword(passwd, 10) - b.StartTimer() - for i := 0; i < b.N; i++ { - CompareHashAndPassword(hash, passwd) - } -} - -func BenchmarkGeneration(b *testing.B) { - b.StopTimer() - passwd := []byte("mylongpassword1234") - b.StartTimer() - for i := 0; i < b.N; i++ { - GenerateFromPassword(passwd, 10) - } -} - -// See Issue https://github.com/golang/go/issues/20425. -func TestNoSideEffectsFromCompare(t *testing.T) { - source := []byte("passw0rd123456") - password := source[:len(source)-6] - token := source[len(source)-6:] - want := make([]byte, len(source)) - copy(want, source) - - wantHash := []byte("$2a$10$LK9XRuhNxHHCvjX3tdkRKei1QiCDUKrJRhZv7WWZPuQGRUM92rOUa") - _ = CompareHashAndPassword(wantHash, password) - - got := bytes.Join([][]byte{password, token}, []byte("")) - if !bytes.Equal(got, want) { - t.Errorf("got=%q want=%q", got, want) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b.go deleted file mode 100644 index 58ea875361..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2016 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 blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 -// and the extendable output function (XOF) BLAKE2Xb. -// -// For a detailed specification of BLAKE2b see https://blake2.net/blake2.pdf -// and for BLAKE2Xb see https://blake2.net/blake2x.pdf -// -// If you aren't sure which function you need, use BLAKE2b (Sum512 or New512). -// If you need a secret-key MAC (message authentication code), use the New512 -// function with a non-nil key. -// -// BLAKE2X is a construction to compute hash values larger than 64 bytes. It -// can produce hash values between 0 and 4 GiB. -package blake2b - -import ( - "encoding/binary" - "errors" - "hash" -) - -const ( - // The blocksize of BLAKE2b in bytes. - BlockSize = 128 - // The hash size of BLAKE2b-512 in bytes. - Size = 64 - // The hash size of BLAKE2b-384 in bytes. - Size384 = 48 - // The hash size of BLAKE2b-256 in bytes. - Size256 = 32 -) - -var ( - useAVX2 bool - useAVX bool - useSSE4 bool -) - -var ( - errKeySize = errors.New("blake2b: invalid key size") - errHashSize = errors.New("blake2b: invalid hash size") -) - -var iv = [8]uint64{ - 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, - 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179, -} - -// Sum512 returns the BLAKE2b-512 checksum of the data. -func Sum512(data []byte) [Size]byte { - var sum [Size]byte - checkSum(&sum, Size, data) - return sum -} - -// Sum384 returns the BLAKE2b-384 checksum of the data. -func Sum384(data []byte) [Size384]byte { - var sum [Size]byte - var sum384 [Size384]byte - checkSum(&sum, Size384, data) - copy(sum384[:], sum[:Size384]) - return sum384 -} - -// Sum256 returns the BLAKE2b-256 checksum of the data. -func Sum256(data []byte) [Size256]byte { - var sum [Size]byte - var sum256 [Size256]byte - checkSum(&sum, Size256, data) - copy(sum256[:], sum[:Size256]) - return sum256 -} - -// New512 returns a new hash.Hash computing the BLAKE2b-512 checksum. A non-nil -// key turns the hash into a MAC. The key must between zero and 64 bytes long. -func New512(key []byte) (hash.Hash, error) { return newDigest(Size, key) } - -// New384 returns a new hash.Hash computing the BLAKE2b-384 checksum. A non-nil -// key turns the hash into a MAC. The key must between zero and 64 bytes long. -func New384(key []byte) (hash.Hash, error) { return newDigest(Size384, key) } - -// New256 returns a new hash.Hash computing the BLAKE2b-256 checksum. A non-nil -// key turns the hash into a MAC. The key must between zero and 64 bytes long. -func New256(key []byte) (hash.Hash, error) { return newDigest(Size256, key) } - -// New returns a new hash.Hash computing the BLAKE2b checksum with a custom length. -// A non-nil key turns the hash into a MAC. The key must between zero and 64 bytes long. -// The hash size can be a value between 1 and 64 but it is highly recommended to use -// values equal or greater than: -// - 32 if BLAKE2b is used as a hash function (The key is zero bytes long). -// - 16 if BLAKE2b is used as a MAC function (The key is at least 16 bytes long). -// When the key is nil, the returned hash.Hash implements BinaryMarshaler -// and BinaryUnmarshaler for state (de)serialization as documented by hash.Hash. -func New(size int, key []byte) (hash.Hash, error) { return newDigest(size, key) } - -func newDigest(hashSize int, key []byte) (*digest, error) { - if hashSize < 1 || hashSize > Size { - return nil, errHashSize - } - if len(key) > Size { - return nil, errKeySize - } - d := &digest{ - size: hashSize, - keyLen: len(key), - } - copy(d.key[:], key) - d.Reset() - return d, nil -} - -func checkSum(sum *[Size]byte, hashSize int, data []byte) { - h := iv - h[0] ^= uint64(hashSize) | (1 << 16) | (1 << 24) - var c [2]uint64 - - if length := len(data); length > BlockSize { - n := length &^ (BlockSize - 1) - if length == n { - n -= BlockSize - } - hashBlocks(&h, &c, 0, data[:n]) - data = data[n:] - } - - var block [BlockSize]byte - offset := copy(block[:], data) - remaining := uint64(BlockSize - offset) - if c[0] < remaining { - c[1]-- - } - c[0] -= remaining - - hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:]) - - for i, v := range h[:(hashSize+7)/8] { - binary.LittleEndian.PutUint64(sum[8*i:], v) - } -} - -type digest struct { - h [8]uint64 - c [2]uint64 - size int - block [BlockSize]byte - offset int - - key [BlockSize]byte - keyLen int -} - -const ( - magic = "b2b" - marshaledSize = len(magic) + 8*8 + 2*8 + 1 + BlockSize + 1 -) - -func (d *digest) MarshalBinary() ([]byte, error) { - if d.keyLen != 0 { - return nil, errors.New("crypto/blake2b: cannot marshal MACs") - } - b := make([]byte, 0, marshaledSize) - b = append(b, magic...) - for i := 0; i < 8; i++ { - b = appendUint64(b, d.h[i]) - } - b = appendUint64(b, d.c[0]) - b = appendUint64(b, d.c[1]) - // Maximum value for size is 64 - b = append(b, byte(d.size)) - b = append(b, d.block[:]...) - b = append(b, byte(d.offset)) - return b, nil -} - -func (d *digest) UnmarshalBinary(b []byte) error { - if len(b) < len(magic) || string(b[:len(magic)]) != magic { - return errors.New("crypto/blake2b: invalid hash state identifier") - } - if len(b) != marshaledSize { - return errors.New("crypto/blake2b: invalid hash state size") - } - b = b[len(magic):] - for i := 0; i < 8; i++ { - b, d.h[i] = consumeUint64(b) - } - b, d.c[0] = consumeUint64(b) - b, d.c[1] = consumeUint64(b) - d.size = int(b[0]) - b = b[1:] - copy(d.block[:], b[:BlockSize]) - b = b[BlockSize:] - d.offset = int(b[0]) - return nil -} - -func (d *digest) BlockSize() int { return BlockSize } - -func (d *digest) Size() int { return d.size } - -func (d *digest) Reset() { - d.h = iv - d.h[0] ^= uint64(d.size) | (uint64(d.keyLen) << 8) | (1 << 16) | (1 << 24) - d.offset, d.c[0], d.c[1] = 0, 0, 0 - if d.keyLen > 0 { - d.block = d.key - d.offset = BlockSize - } -} - -func (d *digest) Write(p []byte) (n int, err error) { - n = len(p) - - if d.offset > 0 { - remaining := BlockSize - d.offset - if n <= remaining { - d.offset += copy(d.block[d.offset:], p) - return - } - copy(d.block[d.offset:], p[:remaining]) - hashBlocks(&d.h, &d.c, 0, d.block[:]) - d.offset = 0 - p = p[remaining:] - } - - if length := len(p); length > BlockSize { - nn := length &^ (BlockSize - 1) - if length == nn { - nn -= BlockSize - } - hashBlocks(&d.h, &d.c, 0, p[:nn]) - p = p[nn:] - } - - if len(p) > 0 { - d.offset += copy(d.block[:], p) - } - - return -} - -func (d *digest) Sum(sum []byte) []byte { - var hash [Size]byte - d.finalize(&hash) - return append(sum, hash[:d.size]...) -} - -func (d *digest) finalize(hash *[Size]byte) { - var block [BlockSize]byte - copy(block[:], d.block[:d.offset]) - remaining := uint64(BlockSize - d.offset) - - c := d.c - if c[0] < remaining { - c[1]-- - } - c[0] -= remaining - - h := d.h - hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:]) - - for i, v := range h { - binary.LittleEndian.PutUint64(hash[8*i:], v) - } -} - -func appendUint64(b []byte, x uint64) []byte { - var a [8]byte - binary.BigEndian.PutUint64(a[:], x) - return append(b, a[:]...) -} - -func appendUint32(b []byte, x uint32) []byte { - var a [4]byte - binary.BigEndian.PutUint32(a[:], x) - return append(b, a[:]...) -} - -func consumeUint64(b []byte) ([]byte, uint64) { - x := binary.BigEndian.Uint64(b) - return b[8:], x -} - -func consumeUint32(b []byte) ([]byte, uint32) { - x := binary.BigEndian.Uint32(b) - return b[4:], x -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.go deleted file mode 100644 index 003a928436..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2016 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. - -// +build go1.7,amd64,!gccgo,!appengine - -package blake2b - -import "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu" - -func init() { - useAVX2 = cpu.X86.HasAVX2 - useAVX = cpu.X86.HasAVX - useSSE4 = cpu.X86.HasSSE41 -} - -//go:noescape -func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) - -//go:noescape -func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) - -//go:noescape -func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) - -func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { - switch { - case useAVX2: - hashBlocksAVX2(h, c, flag, blocks) - case useAVX: - hashBlocksAVX(h, c, flag, blocks) - case useSSE4: - hashBlocksSSE4(h, c, flag, blocks) - default: - hashBlocksGeneric(h, c, flag, blocks) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.s deleted file mode 100644 index 5593b1b3dc..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2bAVX2_amd64.s +++ /dev/null @@ -1,750 +0,0 @@ -// Copyright 2016 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. - -// +build go1.7,amd64,!gccgo,!appengine - -#include "textflag.h" - -DATA ·AVX2_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX2_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -DATA ·AVX2_iv0<>+0x10(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX2_iv0<>+0x18(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX2_iv0<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_iv1<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX2_iv1<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -DATA ·AVX2_iv1<>+0x10(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX2_iv1<>+0x18(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX2_iv1<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -DATA ·AVX2_c40<>+0x10(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x18(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX2_c40<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -DATA ·AVX2_c48<>+0x10(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x18(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX2_c48<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·AVX_iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX_iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX_iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX_iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·AVX_iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX_iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX_iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX_c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX_c48<>(SB), (NOPTR+RODATA), $16 - -#define VPERMQ_0x39_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x39 -#define VPERMQ_0x93_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x93 -#define VPERMQ_0x4E_Y2_Y2 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xd2; BYTE $0x4e -#define VPERMQ_0x93_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x93 -#define VPERMQ_0x39_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x39 - -#define ROUND_AVX2(m0, m1, m2, m3, t, c40, c48) \ - VPADDQ m0, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m1, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y1_Y1; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y3_Y3; \ - VPADDQ m2, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m3, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y3_Y3; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y1_Y1 - -#define VMOVQ_SI_X11_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x1E -#define VMOVQ_SI_X12_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x26 -#define VMOVQ_SI_X13_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x2E -#define VMOVQ_SI_X14_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x36 -#define VMOVQ_SI_X15_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x3E - -#define VMOVQ_SI_X11(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x5E; BYTE $n -#define VMOVQ_SI_X12(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x66; BYTE $n -#define VMOVQ_SI_X13(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x6E; BYTE $n -#define VMOVQ_SI_X14(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x76; BYTE $n -#define VMOVQ_SI_X15(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x7E; BYTE $n - -#define VPINSRQ_1_SI_X11_0 BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x1E; BYTE $0x01 -#define VPINSRQ_1_SI_X12_0 BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x26; BYTE $0x01 -#define VPINSRQ_1_SI_X13_0 BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x2E; BYTE $0x01 -#define VPINSRQ_1_SI_X14_0 BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x36; BYTE $0x01 -#define VPINSRQ_1_SI_X15_0 BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x3E; BYTE $0x01 - -#define VPINSRQ_1_SI_X11(n) BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x5E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X12(n) BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x66; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X13(n) BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x6E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X14(n) BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x76; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X15(n) BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x7E; BYTE $n; BYTE $0x01 - -#define VMOVQ_R8_X15 BYTE $0xC4; BYTE $0x41; BYTE $0xF9; BYTE $0x6E; BYTE $0xF8 -#define VPINSRQ_1_R9_X15 BYTE $0xC4; BYTE $0x43; BYTE $0x81; BYTE $0x22; BYTE $0xF9; BYTE $0x01 - -// load msg: Y12 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y12(i0, i1, i2, i3) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y12, Y12 - -// load msg: Y13 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y13(i0, i1, i2, i3) \ - VMOVQ_SI_X13(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X13(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y13, Y13 - -// load msg: Y14 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y14(i0, i1, i2, i3) \ - VMOVQ_SI_X14(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X14(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y14, Y14 - -// load msg: Y15 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y15(i0, i1, i2, i3) \ - VMOVQ_SI_X15(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X15(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X11(6*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(1, 3, 5, 7); \ - LOAD_MSG_AVX2_Y14(8, 10, 12, 14); \ - LOAD_MSG_AVX2_Y15(9, 11, 13, 15) - -#define LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() \ - LOAD_MSG_AVX2_Y12(14, 4, 9, 13); \ - LOAD_MSG_AVX2_Y13(10, 8, 15, 6); \ - VMOVQ_SI_X11(11*8); \ - VPSHUFD $0x4E, 0*8(SI), X14; \ - VPINSRQ_1_SI_X11(5*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(12, 2, 7, 3) - -#define LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() \ - VMOVQ_SI_X11(5*8); \ - VMOVDQU 11*8(SI), X12; \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - VMOVQ_SI_X13(8*8); \ - VMOVQ_SI_X11(2*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X11(13*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(10, 3, 7, 9); \ - LOAD_MSG_AVX2_Y15(14, 6, 1, 4) - -#define LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() \ - LOAD_MSG_AVX2_Y12(7, 3, 13, 11); \ - LOAD_MSG_AVX2_Y13(9, 1, 12, 14); \ - LOAD_MSG_AVX2_Y14(2, 5, 4, 15); \ - VMOVQ_SI_X15(6*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X15(10*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() \ - LOAD_MSG_AVX2_Y12(9, 5, 2, 10); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X13(7*8); \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(14, 11, 6, 3); \ - LOAD_MSG_AVX2_Y15(1, 12, 8, 13) - -#define LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(12, 10, 11, 3); \ - LOAD_MSG_AVX2_Y14(4, 7, 15, 1); \ - LOAD_MSG_AVX2_Y15(13, 5, 14, 9) - -#define LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() \ - LOAD_MSG_AVX2_Y12(12, 1, 14, 4); \ - LOAD_MSG_AVX2_Y13(5, 15, 13, 10); \ - VMOVQ_SI_X14_0; \ - VPSHUFD $0x4E, 8*8(SI), X11; \ - VPINSRQ_1_SI_X14(6*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(7, 3, 2, 11) - -#define LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() \ - LOAD_MSG_AVX2_Y12(13, 7, 12, 3); \ - LOAD_MSG_AVX2_Y13(11, 14, 1, 9); \ - LOAD_MSG_AVX2_Y14(5, 15, 8, 2); \ - VMOVQ_SI_X15_0; \ - VMOVQ_SI_X11(6*8); \ - VPINSRQ_1_SI_X15(4*8); \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() \ - VMOVQ_SI_X12(6*8); \ - VMOVQ_SI_X11(11*8); \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(15, 9, 3, 8); \ - VMOVQ_SI_X11(1*8); \ - VMOVDQU 12*8(SI), X14; \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - VMOVQ_SI_X15(2*8); \ - VMOVDQU 4*8(SI), X11; \ - VPINSRQ_1_SI_X15(7*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() \ - LOAD_MSG_AVX2_Y12(10, 8, 7, 1); \ - VMOVQ_SI_X13(2*8); \ - VPSHUFD $0x4E, 5*8(SI), X11; \ - VPINSRQ_1_SI_X13(4*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(15, 9, 3, 13); \ - VMOVQ_SI_X15(11*8); \ - VMOVQ_SI_X11(12*8); \ - VPINSRQ_1_SI_X15(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y15, Y15 - -// func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX2(SB), 4, $320-48 // frame size = 288 + 32 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, DX - MOVQ SP, R9 - ADDQ $31, R9 - ANDQ $~31, R9 - MOVQ R9, SP - - MOVQ CX, 16(SP) - XORQ CX, CX - MOVQ CX, 24(SP) - - VMOVDQU ·AVX2_c40<>(SB), Y4 - VMOVDQU ·AVX2_c48<>(SB), Y5 - - VMOVDQU 0(AX), Y8 - VMOVDQU 32(AX), Y9 - VMOVDQU ·AVX2_iv0<>(SB), Y6 - VMOVDQU ·AVX2_iv1<>(SB), Y7 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 - MOVQ R9, 8(SP) - -loop: - ADDQ $128, R8 - MOVQ R8, 0(SP) - CMPQ R8, $128 - JGE noinc - INCQ R9 - MOVQ R9, 8(SP) - -noinc: - VMOVDQA Y8, Y0 - VMOVDQA Y9, Y1 - VMOVDQA Y6, Y2 - VPXOR 0(SP), Y7, Y3 - - LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() - VMOVDQA Y12, 32(SP) - VMOVDQA Y13, 64(SP) - VMOVDQA Y14, 96(SP) - VMOVDQA Y15, 128(SP) - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() - VMOVDQA Y12, 160(SP) - VMOVDQA Y13, 192(SP) - VMOVDQA Y14, 224(SP) - VMOVDQA Y15, 256(SP) - - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - - ROUND_AVX2(32(SP), 64(SP), 96(SP), 128(SP), Y10, Y4, Y5) - ROUND_AVX2(160(SP), 192(SP), 224(SP), 256(SP), Y10, Y4, Y5) - - VPXOR Y0, Y8, Y8 - VPXOR Y1, Y9, Y9 - VPXOR Y2, Y8, Y8 - VPXOR Y3, Y9, Y9 - - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop - - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - - VMOVDQU Y8, 0(AX) - VMOVDQU Y9, 32(AX) - VZEROUPPER - - MOVQ DX, SP - RET - -#define VPUNPCKLQDQ_X2_X2_X15 BYTE $0xC5; BYTE $0x69; BYTE $0x6C; BYTE $0xFA -#define VPUNPCKLQDQ_X3_X3_X15 BYTE $0xC5; BYTE $0x61; BYTE $0x6C; BYTE $0xFB -#define VPUNPCKLQDQ_X7_X7_X15 BYTE $0xC5; BYTE $0x41; BYTE $0x6C; BYTE $0xFF -#define VPUNPCKLQDQ_X13_X13_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x11; BYTE $0x6C; BYTE $0xFD -#define VPUNPCKLQDQ_X14_X14_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x09; BYTE $0x6C; BYTE $0xFE - -#define VPUNPCKHQDQ_X15_X2_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x69; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X3_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X6_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x49; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X7_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xFF -#define VPUNPCKHQDQ_X15_X3_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X7_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X13_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X13_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xFF - -#define SHUFFLE_AVX() \ - VMOVDQA X6, X13; \ - VMOVDQA X2, X14; \ - VMOVDQA X4, X6; \ - VPUNPCKLQDQ_X13_X13_X15; \ - VMOVDQA X5, X4; \ - VMOVDQA X6, X5; \ - VPUNPCKHQDQ_X15_X7_X6; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X13_X7; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VPUNPCKHQDQ_X15_X2_X2; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X3_X3; \ - -#define SHUFFLE_AVX_INV() \ - VMOVDQA X2, X13; \ - VMOVDQA X4, X14; \ - VPUNPCKLQDQ_X2_X2_X15; \ - VMOVDQA X5, X4; \ - VPUNPCKHQDQ_X15_X3_X2; \ - VMOVDQA X14, X5; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VMOVDQA X6, X14; \ - VPUNPCKHQDQ_X15_X13_X3; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X6_X6; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X7_X7; \ - -#define HALF_ROUND_AVX(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - VPADDQ m0, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m1, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFD $-79, v6, v6; \ - VPSHUFD $-79, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPSHUFB c40, v2, v2; \ - VPSHUFB c40, v3, v3; \ - VPADDQ m2, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m3, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFB c48, v6, v6; \ - VPSHUFB c48, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPADDQ v2, v2, t0; \ - VPSRLQ $63, v2, v2; \ - VPXOR t0, v2, v2; \ - VPADDQ v3, v3, t0; \ - VPSRLQ $63, v3, v3; \ - VPXOR t0, v3, v3 - -// load msg: X12 = (i0, i1), X13 = (i2, i3), X14 = (i4, i5), X15 = (i6, i7) -// i0, i1, i2, i3, i4, i5, i6, i7 must not be 0 -#define LOAD_MSG_AVX(i0, i1, i2, i3, i4, i5, i6, i7) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X13(i2*8); \ - VMOVQ_SI_X14(i4*8); \ - VMOVQ_SI_X15(i6*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X13(i3*8); \ - VPINSRQ_1_SI_X14(i5*8); \ - VPINSRQ_1_SI_X15(i7*8) - -// load msg: X12 = (0, 2), X13 = (4, 6), X14 = (1, 3), X15 = (5, 7) -#define LOAD_MSG_AVX_0_2_4_6_1_3_5_7() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(1*8); \ - VMOVQ_SI_X15(5*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X13(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(7*8) - -// load msg: X12 = (1, 0), X13 = (11, 5), X14 = (12, 2), X15 = (7, 3) -#define LOAD_MSG_AVX_1_0_11_5_12_2_7_3() \ - VPSHUFD $0x4E, 0*8(SI), X12; \ - VMOVQ_SI_X13(11*8); \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(7*8); \ - VPINSRQ_1_SI_X13(5*8); \ - VPINSRQ_1_SI_X14(2*8); \ - VPINSRQ_1_SI_X15(3*8) - -// load msg: X12 = (11, 12), X13 = (5, 15), X14 = (8, 0), X15 = (2, 13) -#define LOAD_MSG_AVX_11_12_5_15_8_0_2_13() \ - VMOVDQU 11*8(SI), X12; \ - VMOVQ_SI_X13(5*8); \ - VMOVQ_SI_X14(8*8); \ - VMOVQ_SI_X15(2*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14_0; \ - VPINSRQ_1_SI_X15(13*8) - -// load msg: X12 = (2, 5), X13 = (4, 15), X14 = (6, 10), X15 = (0, 8) -#define LOAD_MSG_AVX_2_5_4_15_6_10_0_8() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(6*8); \ - VMOVQ_SI_X15_0; \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(8*8) - -// load msg: X12 = (9, 5), X13 = (2, 10), X14 = (0, 7), X15 = (4, 15) -#define LOAD_MSG_AVX_9_5_2_10_0_7_4_15() \ - VMOVQ_SI_X12(9*8); \ - VMOVQ_SI_X13(2*8); \ - VMOVQ_SI_X14_0; \ - VMOVQ_SI_X15(4*8); \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VPINSRQ_1_SI_X15(15*8) - -// load msg: X12 = (2, 6), X13 = (0, 8), X14 = (12, 10), X15 = (11, 3) -#define LOAD_MSG_AVX_2_6_0_8_12_10_11_3() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(11*8); \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X13(8*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(3*8) - -// load msg: X12 = (0, 6), X13 = (9, 8), X14 = (7, 3), X15 = (2, 11) -#define LOAD_MSG_AVX_0_6_9_8_7_3_2_11() \ - MOVQ 0*8(SI), X12; \ - VPSHUFD $0x4E, 8*8(SI), X13; \ - MOVQ 7*8(SI), X14; \ - MOVQ 2*8(SI), X15; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(11*8) - -// load msg: X12 = (6, 14), X13 = (11, 0), X14 = (15, 9), X15 = (3, 8) -#define LOAD_MSG_AVX_6_14_11_0_15_9_3_8() \ - MOVQ 6*8(SI), X12; \ - MOVQ 11*8(SI), X13; \ - MOVQ 15*8(SI), X14; \ - MOVQ 3*8(SI), X15; \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X14(9*8); \ - VPINSRQ_1_SI_X15(8*8) - -// load msg: X12 = (5, 15), X13 = (8, 2), X14 = (0, 4), X15 = (6, 10) -#define LOAD_MSG_AVX_5_15_8_2_0_4_6_10() \ - MOVQ 5*8(SI), X12; \ - MOVQ 8*8(SI), X13; \ - MOVQ 0*8(SI), X14; \ - MOVQ 6*8(SI), X15; \ - VPINSRQ_1_SI_X12(15*8); \ - VPINSRQ_1_SI_X13(2*8); \ - VPINSRQ_1_SI_X14(4*8); \ - VPINSRQ_1_SI_X15(10*8) - -// load msg: X12 = (12, 13), X13 = (1, 10), X14 = (2, 7), X15 = (4, 5) -#define LOAD_MSG_AVX_12_13_1_10_2_7_4_5() \ - VMOVDQU 12*8(SI), X12; \ - MOVQ 1*8(SI), X13; \ - MOVQ 2*8(SI), X14; \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VMOVDQU 4*8(SI), X15 - -// load msg: X12 = (15, 9), X13 = (3, 13), X14 = (11, 14), X15 = (12, 0) -#define LOAD_MSG_AVX_15_9_3_13_11_14_12_0() \ - MOVQ 15*8(SI), X12; \ - MOVQ 3*8(SI), X13; \ - MOVQ 11*8(SI), X14; \ - MOVQ 12*8(SI), X15; \ - VPINSRQ_1_SI_X12(9*8); \ - VPINSRQ_1_SI_X13(13*8); \ - VPINSRQ_1_SI_X14(14*8); \ - VPINSRQ_1_SI_X15_0 - -// func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, BP - MOVQ SP, R9 - ADDQ $15, R9 - ANDQ $~15, R9 - MOVQ R9, SP - - VMOVDQU ·AVX_c40<>(SB), X0 - VMOVDQU ·AVX_c48<>(SB), X1 - VMOVDQA X0, X8 - VMOVDQA X1, X9 - - VMOVDQU ·AVX_iv3<>(SB), X0 - VMOVDQA X0, 0(SP) - XORQ CX, 0(SP) // 0(SP) = ·AVX_iv3 ^ (CX || 0) - - VMOVDQU 0(AX), X10 - VMOVDQU 16(AX), X11 - VMOVDQU 32(AX), X2 - VMOVDQU 48(AX), X3 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 - -loop: - ADDQ $128, R8 - CMPQ R8, $128 - JGE noinc - INCQ R9 - -noinc: - VMOVQ_R8_X15 - VPINSRQ_1_R9_X15 - - VMOVDQA X10, X0 - VMOVDQA X11, X1 - VMOVDQU ·AVX_iv0<>(SB), X4 - VMOVDQU ·AVX_iv1<>(SB), X5 - VMOVDQU ·AVX_iv2<>(SB), X6 - - VPXOR X15, X6, X6 - VMOVDQA 0(SP), X7 - - LOAD_MSG_AVX_0_2_4_6_1_3_5_7() - VMOVDQA X12, 16(SP) - VMOVDQA X13, 32(SP) - VMOVDQA X14, 48(SP) - VMOVDQA X15, 64(SP) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(8, 10, 12, 14, 9, 11, 13, 15) - VMOVDQA X12, 80(SP) - VMOVDQA X13, 96(SP) - VMOVDQA X14, 112(SP) - VMOVDQA X15, 128(SP) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(14, 4, 9, 13, 10, 8, 15, 6) - VMOVDQA X12, 144(SP) - VMOVDQA X13, 160(SP) - VMOVDQA X14, 176(SP) - VMOVDQA X15, 192(SP) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_1_0_11_5_12_2_7_3() - VMOVDQA X12, 208(SP) - VMOVDQA X13, 224(SP) - VMOVDQA X14, 240(SP) - VMOVDQA X15, 256(SP) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_11_12_5_15_8_0_2_13() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_2_5_4_15_6_10_0_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_9_5_2_10_0_7_4_15() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_2_6_0_8_12_10_11_3() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_0_6_9_8_7_3_2_11() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_5_15_8_2_0_4_6_10() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_6_14_11_0_15_9_3_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_12_13_1_10_2_7_4_5() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_15_9_3_13_11_14_12_0() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 80(SP), 96(SP), 112(SP), 128(SP), X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 144(SP), 160(SP), 176(SP), 192(SP), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 208(SP), 224(SP), 240(SP), 256(SP), X15, X8, X9) - SHUFFLE_AVX_INV() - - VMOVDQU 32(AX), X14 - VMOVDQU 48(AX), X15 - VPXOR X0, X10, X10 - VPXOR X1, X11, X11 - VPXOR X2, X14, X14 - VPXOR X3, X15, X15 - VPXOR X4, X10, X10 - VPXOR X5, X11, X11 - VPXOR X6, X14, X2 - VPXOR X7, X15, X3 - VMOVDQU X2, 32(AX) - VMOVDQU X3, 48(AX) - - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop - - VMOVDQU X10, 0(AX) - VMOVDQU X11, 16(AX) - - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - VZEROUPPER - - MOVQ BP, SP - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.go deleted file mode 100644 index 6dcd7e801f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2016 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. - -// +build !go1.7,amd64,!gccgo,!appengine - -package blake2b - -import "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu" - -func init() { - useSSE4 = cpu.X86.HasSSE41 -} - -//go:noescape -func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) - -func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { - if useSSE4 { - hashBlocksSSE4(h, c, flag, blocks) - } else { - hashBlocksGeneric(h, c, flag, blocks) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.s deleted file mode 100644 index 578e947b3b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_amd64.s +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2016 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. - -// +build amd64,!gccgo,!appengine - -#include "textflag.h" - -DATA ·iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 - -#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v6, t1; \ - PUNPCKLQDQ v6, t2; \ - PUNPCKHQDQ v7, v6; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ v7, t2; \ - MOVO t1, v7; \ - MOVO v2, t1; \ - PUNPCKHQDQ t2, v7; \ - PUNPCKLQDQ v3, t2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v3 - -#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v2, t1; \ - PUNPCKLQDQ v2, t2; \ - PUNPCKHQDQ v3, v2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ v3, t2; \ - MOVO t1, v3; \ - MOVO v6, t1; \ - PUNPCKHQDQ t2, v3; \ - PUNPCKLQDQ v7, t2; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v7 - -#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - PADDQ m0, v0; \ - PADDQ m1, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFD $0xB1, v6, v6; \ - PSHUFD $0xB1, v7, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - PSHUFB c40, v2; \ - PSHUFB c40, v3; \ - PADDQ m2, v0; \ - PADDQ m3, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFB c48, v6; \ - PSHUFB c48, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - MOVOU v2, t0; \ - PADDQ v2, t0; \ - PSRLQ $63, v2; \ - PXOR t0, v2; \ - MOVOU v3, t0; \ - PADDQ v3, t0; \ - PSRLQ $63, v3; \ - PXOR t0, v3 - -#define LOAD_MSG(m0, m1, m2, m3, src, i0, i1, i2, i3, i4, i5, i6, i7) \ - MOVQ i0*8(src), m0; \ - PINSRQ $1, i1*8(src), m0; \ - MOVQ i2*8(src), m1; \ - PINSRQ $1, i3*8(src), m1; \ - MOVQ i4*8(src), m2; \ - PINSRQ $1, i5*8(src), m2; \ - MOVQ i6*8(src), m3; \ - PINSRQ $1, i7*8(src), m3 - -// func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksSSE4(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, BP - MOVQ SP, R9 - ADDQ $15, R9 - ANDQ $~15, R9 - MOVQ R9, SP - - MOVOU ·iv3<>(SB), X0 - MOVO X0, 0(SP) - XORQ CX, 0(SP) // 0(SP) = ·iv3 ^ (CX || 0) - - MOVOU ·c40<>(SB), X13 - MOVOU ·c48<>(SB), X14 - - MOVOU 0(AX), X12 - MOVOU 16(AX), X15 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 - -loop: - ADDQ $128, R8 - CMPQ R8, $128 - JGE noinc - INCQ R9 - -noinc: - MOVQ R8, X8 - PINSRQ $1, R9, X8 - - MOVO X12, X0 - MOVO X15, X1 - MOVOU 32(AX), X2 - MOVOU 48(AX), X3 - MOVOU ·iv0<>(SB), X4 - MOVOU ·iv1<>(SB), X5 - MOVOU ·iv2<>(SB), X6 - - PXOR X8, X6 - MOVO 0(SP), X7 - - LOAD_MSG(X8, X9, X10, X11, SI, 0, 2, 4, 6, 1, 3, 5, 7) - MOVO X8, 16(SP) - MOVO X9, 32(SP) - MOVO X10, 48(SP) - MOVO X11, 64(SP) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 8, 10, 12, 14, 9, 11, 13, 15) - MOVO X8, 80(SP) - MOVO X9, 96(SP) - MOVO X10, 112(SP) - MOVO X11, 128(SP) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 14, 4, 9, 13, 10, 8, 15, 6) - MOVO X8, 144(SP) - MOVO X9, 160(SP) - MOVO X10, 176(SP) - MOVO X11, 192(SP) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 1, 0, 11, 5, 12, 2, 7, 3) - MOVO X8, 208(SP) - MOVO X9, 224(SP) - MOVO X10, 240(SP) - MOVO X11, 256(SP) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 11, 12, 5, 15, 8, 0, 2, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 2, 5, 4, 15, 6, 10, 0, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 9, 5, 2, 10, 0, 7, 4, 15) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 2, 6, 0, 8, 12, 10, 11, 3) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 0, 6, 9, 8, 7, 3, 2, 11) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 5, 15, 8, 2, 0, 4, 6, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 6, 14, 11, 0, 15, 9, 3, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 12, 13, 1, 10, 2, 7, 4, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 15, 9, 3, 13, 11, 14, 12, 0) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 80(SP), 96(SP), 112(SP), 128(SP), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 144(SP), 160(SP), 176(SP), 192(SP), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 208(SP), 224(SP), 240(SP), 256(SP), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - MOVOU 32(AX), X10 - MOVOU 48(AX), X11 - PXOR X0, X12 - PXOR X1, X15 - PXOR X2, X10 - PXOR X3, X11 - PXOR X4, X12 - PXOR X5, X15 - PXOR X6, X10 - PXOR X7, X11 - MOVOU X10, 32(AX) - MOVOU X11, 48(AX) - - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop - - MOVOU X12, 0(AX) - MOVOU X15, 16(AX) - - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - - MOVQ BP, SP - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_generic.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_generic.go deleted file mode 100644 index 4bd2abc916..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_generic.go +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2016 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 blake2b - -import "encoding/binary" - -// the precomputed values for BLAKE2b -// there are 12 16-byte arrays - one for each round -// the entries are calculated from the sigma constants. -var precomputed = [12][16]byte{ - {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15}, - {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3}, - {11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4}, - {7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8}, - {9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13}, - {2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9}, - {12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11}, - {13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10}, - {6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5}, - {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0}, - {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15}, // equal to the first - {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3}, // equal to the second -} - -func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { - var m [16]uint64 - c0, c1 := c[0], c[1] - - for i := 0; i < len(blocks); { - c0 += BlockSize - if c0 < BlockSize { - c1++ - } - - v0, v1, v2, v3, v4, v5, v6, v7 := h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7] - v8, v9, v10, v11, v12, v13, v14, v15 := iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7] - v12 ^= c0 - v13 ^= c1 - v14 ^= flag - - for j := range m { - m[j] = binary.LittleEndian.Uint64(blocks[i:]) - i += 8 - } - - for j := range precomputed { - s := &(precomputed[j]) - - v0 += m[s[0]] - v0 += v4 - v12 ^= v0 - v12 = v12<<(64-32) | v12>>32 - v8 += v12 - v4 ^= v8 - v4 = v4<<(64-24) | v4>>24 - v1 += m[s[1]] - v1 += v5 - v13 ^= v1 - v13 = v13<<(64-32) | v13>>32 - v9 += v13 - v5 ^= v9 - v5 = v5<<(64-24) | v5>>24 - v2 += m[s[2]] - v2 += v6 - v14 ^= v2 - v14 = v14<<(64-32) | v14>>32 - v10 += v14 - v6 ^= v10 - v6 = v6<<(64-24) | v6>>24 - v3 += m[s[3]] - v3 += v7 - v15 ^= v3 - v15 = v15<<(64-32) | v15>>32 - v11 += v15 - v7 ^= v11 - v7 = v7<<(64-24) | v7>>24 - - v0 += m[s[4]] - v0 += v4 - v12 ^= v0 - v12 = v12<<(64-16) | v12>>16 - v8 += v12 - v4 ^= v8 - v4 = v4<<(64-63) | v4>>63 - v1 += m[s[5]] - v1 += v5 - v13 ^= v1 - v13 = v13<<(64-16) | v13>>16 - v9 += v13 - v5 ^= v9 - v5 = v5<<(64-63) | v5>>63 - v2 += m[s[6]] - v2 += v6 - v14 ^= v2 - v14 = v14<<(64-16) | v14>>16 - v10 += v14 - v6 ^= v10 - v6 = v6<<(64-63) | v6>>63 - v3 += m[s[7]] - v3 += v7 - v15 ^= v3 - v15 = v15<<(64-16) | v15>>16 - v11 += v15 - v7 ^= v11 - v7 = v7<<(64-63) | v7>>63 - - v0 += m[s[8]] - v0 += v5 - v15 ^= v0 - v15 = v15<<(64-32) | v15>>32 - v10 += v15 - v5 ^= v10 - v5 = v5<<(64-24) | v5>>24 - v1 += m[s[9]] - v1 += v6 - v12 ^= v1 - v12 = v12<<(64-32) | v12>>32 - v11 += v12 - v6 ^= v11 - v6 = v6<<(64-24) | v6>>24 - v2 += m[s[10]] - v2 += v7 - v13 ^= v2 - v13 = v13<<(64-32) | v13>>32 - v8 += v13 - v7 ^= v8 - v7 = v7<<(64-24) | v7>>24 - v3 += m[s[11]] - v3 += v4 - v14 ^= v3 - v14 = v14<<(64-32) | v14>>32 - v9 += v14 - v4 ^= v9 - v4 = v4<<(64-24) | v4>>24 - - v0 += m[s[12]] - v0 += v5 - v15 ^= v0 - v15 = v15<<(64-16) | v15>>16 - v10 += v15 - v5 ^= v10 - v5 = v5<<(64-63) | v5>>63 - v1 += m[s[13]] - v1 += v6 - v12 ^= v1 - v12 = v12<<(64-16) | v12>>16 - v11 += v12 - v6 ^= v11 - v6 = v6<<(64-63) | v6>>63 - v2 += m[s[14]] - v2 += v7 - v13 ^= v2 - v13 = v13<<(64-16) | v13>>16 - v8 += v13 - v7 ^= v8 - v7 = v7<<(64-63) | v7>>63 - v3 += m[s[15]] - v3 += v4 - v14 ^= v3 - v14 = v14<<(64-16) | v14>>16 - v9 += v14 - v4 ^= v9 - v4 = v4<<(64-63) | v4>>63 - - } - - h[0] ^= v0 ^ v8 - h[1] ^= v1 ^ v9 - h[2] ^= v2 ^ v10 - h[3] ^= v3 ^ v11 - h[4] ^= v4 ^ v12 - h[5] ^= v5 ^ v13 - h[6] ^= v6 ^ v14 - h[7] ^= v7 ^ v15 - } - c[0], c[1] = c0, c1 -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_ref.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_ref.go deleted file mode 100644 index da156a1ba6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_ref.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 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. - -// +build !amd64 appengine gccgo - -package blake2b - -func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { - hashBlocksGeneric(h, c, flag, blocks) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_test.go deleted file mode 100644 index 723327ab56..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2b_test.go +++ /dev/null @@ -1,847 +0,0 @@ -// Copyright 2016 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 blake2b - -import ( - "bytes" - "encoding" - "encoding/hex" - "fmt" - "hash" - "io" - "testing" -) - -func fromHex(s string) []byte { - b, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return b -} - -func TestHashes(t *testing.T) { - defer func(sse4, avx, avx2 bool) { - useSSE4, useAVX, useAVX2 = sse4, avx, avx2 - }(useSSE4, useAVX, useAVX2) - - if useAVX2 { - t.Log("AVX2 version") - testHashes(t) - useAVX2 = false - } - if useAVX { - t.Log("AVX version") - testHashes(t) - useAVX = false - } - if useSSE4 { - t.Log("SSE4 version") - testHashes(t) - useSSE4 = false - } - t.Log("generic version") - testHashes(t) -} - -func TestHashes2X(t *testing.T) { - defer func(sse4, avx, avx2 bool) { - useSSE4, useAVX, useAVX2 = sse4, avx, avx2 - }(useSSE4, useAVX, useAVX2) - - if useAVX2 { - t.Log("AVX2 version") - testHashes2X(t) - useAVX2 = false - } - if useAVX { - t.Log("AVX version") - testHashes2X(t) - useAVX = false - } - if useSSE4 { - t.Log("SSE4 version") - testHashes2X(t) - useSSE4 = false - } - t.Log("generic version") - testHashes2X(t) -} - -func TestMarshal(t *testing.T) { - input := make([]byte, 255) - for i := range input { - input[i] = byte(i) - } - for _, size := range []int{Size, Size256, Size384, 12, 25, 63} { - for i := 0; i < 256; i++ { - h, err := New(size, nil) - if err != nil { - t.Fatalf("size=%d, len(input)=%d: error from New(%v, nil): %v", size, i, size, err) - } - h2, err := New(size, nil) - if err != nil { - t.Fatalf("size=%d, len(input)=%d: error from New(%v, nil): %v", size, i, size, err) - } - - h.Write(input[:i/2]) - halfstate, err := h.(encoding.BinaryMarshaler).MarshalBinary() - if err != nil { - t.Fatalf("size=%d, len(input)=%d: could not marshal: %v", size, i, err) - } - err = h2.(encoding.BinaryUnmarshaler).UnmarshalBinary(halfstate) - if err != nil { - t.Fatalf("size=%d, len(input)=%d: could not unmarshal: %v", size, i, err) - } - - h.Write(input[i/2 : i]) - sum := h.Sum(nil) - h2.Write(input[i/2 : i]) - sum2 := h2.Sum(nil) - - if !bytes.Equal(sum, sum2) { - t.Fatalf("size=%d, len(input)=%d: results do not match; sum = %v, sum2 = %v", size, i, sum, sum2) - } - - h3, err := New(size, nil) - if err != nil { - t.Fatalf("size=%d, len(input)=%d: error from New(%v, nil): %v", size, i, size, err) - } - h3.Write(input[:i]) - sum3 := h3.Sum(nil) - if !bytes.Equal(sum, sum3) { - t.Fatalf("size=%d, len(input)=%d: sum = %v, want %v", size, i, sum, sum3) - } - } - } -} - -func testHashes(t *testing.T) { - key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f") - - input := make([]byte, 255) - for i := range input { - input[i] = byte(i) - } - - for i, expectedHex := range hashes { - h, err := New512(key) - if err != nil { - t.Fatalf("#%d: error from New512: %v", i, err) - } - - h.Write(input[:i]) - sum := h.Sum(nil) - - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) - } - - h.Reset() - for j := 0; j < i; j++ { - h.Write(input[j : j+1]) - } - - sum = h.Sum(sum[:0]) - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex) - } - } -} - -func testHashes2X(t *testing.T) { - key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f") - - input := make([]byte, 256) - for i := range input { - input[i] = byte(i) - } - - for i, expectedHex := range hashes2X { - length := uint32(len(expectedHex) / 2) - sum := make([]byte, int(length)) - - h, err := NewXOF(length, key) - if err != nil { - t.Fatalf("#%d: error from NewXOF: %v", i, err) - } - - if _, err := h.Write(input); err != nil { - t.Fatalf("#%d (single write): error from Write: %v", i, err) - } - if _, err := h.Read(sum); err != nil { - t.Fatalf("#%d (single write): error from Read: %v", i, err) - } - if n, err := h.Read(sum); n != 0 || err != io.EOF { - t.Fatalf("#%d (single write): Read did not return (0, io.EOF) after exhaustion, got (%v, %v)", i, n, err) - } - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) - } - - h.Reset() - for j := 0; j < len(input); j++ { - h.Write(input[j : j+1]) - } - for j := 0; j < len(sum); j++ { - h = h.Clone() - if _, err := h.Read(sum[j : j+1]); err != nil { - t.Fatalf("#%d (byte-by-byte) - Read %d: error from Read: %v", i, j, err) - } - } - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex) - } - } - - h, err := NewXOF(OutputLengthUnknown, key) - if err != nil { - t.Fatalf("#unknown length: error from NewXOF: %v", err) - } - if _, err := h.Write(input); err != nil { - t.Fatalf("#unknown length: error from Write: %v", err) - } - - var result [64]byte - if n, err := h.Read(result[:]); err != nil { - t.Fatalf("#unknown length: error from Read: %v", err) - } else if n != len(result) { - t.Fatalf("#unknown length: Read returned %d bytes, want %d", n, len(result)) - } - - const expected = "3dbba8516da76bf7330055c66ea36cf1005e92714262b24d9710f51d9e126406e1bcd6497059f9331f1091c3634b695428d475ed432f987040575520a1c29f5e" - if fmt.Sprintf("%x", result) != expected { - t.Fatalf("#unknown length: bad result %x, wanted %s", result, expected) - } -} - -func generateSequence(out []byte, seed uint32) { - a := 0xDEAD4BAD * seed // prime - b := uint32(1) - - for i := range out { // fill the buf - a, b = b, a+b - out[i] = byte(b >> 24) - } -} - -func computeMAC(msg []byte, hashSize int, key []byte) (sum []byte) { - var h hash.Hash - switch hashSize { - case Size: - h, _ = New512(key) - case Size384: - h, _ = New384(key) - case Size256: - h, _ = New256(key) - case 20: - h, _ = newDigest(20, key) - default: - panic("unexpected hashSize") - } - - h.Write(msg) - return h.Sum(sum) -} - -func computeHash(msg []byte, hashSize int) (sum []byte) { - switch hashSize { - case Size: - hash := Sum512(msg) - return hash[:] - case Size384: - hash := Sum384(msg) - return hash[:] - case Size256: - hash := Sum256(msg) - return hash[:] - case 20: - var hash [64]byte - checkSum(&hash, 20, msg) - return hash[:20] - default: - panic("unexpected hashSize") - } -} - -// Test function from RFC 7693. -func TestSelfTest(t *testing.T) { - hashLens := [4]int{20, 32, 48, 64} - msgLens := [6]int{0, 3, 128, 129, 255, 1024} - - msg := make([]byte, 1024) - key := make([]byte, 64) - - h, _ := New256(nil) - for _, hashSize := range hashLens { - for _, msgLength := range msgLens { - generateSequence(msg[:msgLength], uint32(msgLength)) // unkeyed hash - - md := computeHash(msg[:msgLength], hashSize) - h.Write(md) - - generateSequence(key[:], uint32(hashSize)) // keyed hash - md = computeMAC(msg[:msgLength], hashSize, key[:hashSize]) - h.Write(md) - } - } - - sum := h.Sum(nil) - expected := [32]byte{ - 0xc2, 0x3a, 0x78, 0x00, 0xd9, 0x81, 0x23, 0xbd, - 0x10, 0xf5, 0x06, 0xc6, 0x1e, 0x29, 0xda, 0x56, - 0x03, 0xd7, 0x63, 0xb8, 0xbb, 0xad, 0x2e, 0x73, - 0x7f, 0x5e, 0x76, 0x5a, 0x7b, 0xcc, 0xd4, 0x75, - } - if !bytes.Equal(sum, expected[:]) { - t.Fatalf("got %x, wanted %x", sum, expected) - } -} - -// Benchmarks - -func benchmarkSum(b *testing.B, size int) { - data := make([]byte, size) - b.SetBytes(int64(size)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Sum512(data) - } -} - -func benchmarkWrite(b *testing.B, size int) { - data := make([]byte, size) - h, _ := New512(nil) - b.SetBytes(int64(size)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - h.Write(data) - } -} - -func BenchmarkWrite128(b *testing.B) { benchmarkWrite(b, 128) } -func BenchmarkWrite1K(b *testing.B) { benchmarkWrite(b, 1024) } - -func BenchmarkSum128(b *testing.B) { benchmarkSum(b, 128) } -func BenchmarkSum1K(b *testing.B) { benchmarkSum(b, 1024) } - -// These values were taken from https://blake2.net/blake2b-test.txt. -var hashes = []string{ - "10ebb67700b1868efb4417987acf4690ae9d972fb7a590c2f02871799aaa4786b5e996e8f0f4eb981fc214b005f42d2ff4233499391653df7aefcbc13fc51568", - "961f6dd1e4dd30f63901690c512e78e4b45e4742ed197c3c5e45c549fd25f2e4187b0bc9fe30492b16b0d0bc4ef9b0f34c7003fac09a5ef1532e69430234cebd", - "da2cfbe2d8409a0f38026113884f84b50156371ae304c4430173d08a99d9fb1b983164a3770706d537f49e0c916d9f32b95cc37a95b99d857436f0232c88a965", - "33d0825dddf7ada99b0e7e307104ad07ca9cfd9692214f1561356315e784f3e5a17e364ae9dbb14cb2036df932b77f4b292761365fb328de7afdc6d8998f5fc1", - "beaa5a3d08f3807143cf621d95cd690514d0b49efff9c91d24b59241ec0eefa5f60196d407048bba8d2146828ebcb0488d8842fd56bb4f6df8e19c4b4daab8ac", - "098084b51fd13deae5f4320de94a688ee07baea2800486689a8636117b46c1f4c1f6af7f74ae7c857600456a58a3af251dc4723a64cc7c0a5ab6d9cac91c20bb", - "6044540d560853eb1c57df0077dd381094781cdb9073e5b1b3d3f6c7829e12066bbaca96d989a690de72ca3133a83652ba284a6d62942b271ffa2620c9e75b1f", - "7a8cfe9b90f75f7ecb3acc053aaed6193112b6f6a4aeeb3f65d3de541942deb9e2228152a3c4bbbe72fc3b12629528cfbb09fe630f0474339f54abf453e2ed52", - "380beaf6ea7cc9365e270ef0e6f3a64fb902acae51dd5512f84259ad2c91f4bc4108db73192a5bbfb0cbcf71e46c3e21aee1c5e860dc96e8eb0b7b8426e6abe9", - "60fe3c4535e1b59d9a61ea8500bfac41a69dffb1ceadd9aca323e9a625b64da5763bad7226da02b9c8c4f1a5de140ac5a6c1124e4f718ce0b28ea47393aa6637", - "4fe181f54ad63a2983feaaf77d1e7235c2beb17fa328b6d9505bda327df19fc37f02c4b6f0368ce23147313a8e5738b5fa2a95b29de1c7f8264eb77b69f585cd", - "f228773ce3f3a42b5f144d63237a72d99693adb8837d0e112a8a0f8ffff2c362857ac49c11ec740d1500749dac9b1f4548108bf3155794dcc9e4082849e2b85b", - "962452a8455cc56c8511317e3b1f3b2c37df75f588e94325fdd77070359cf63a9ae6e930936fdf8e1e08ffca440cfb72c28f06d89a2151d1c46cd5b268ef8563", - "43d44bfa18768c59896bf7ed1765cb2d14af8c260266039099b25a603e4ddc5039d6ef3a91847d1088d401c0c7e847781a8a590d33a3c6cb4df0fab1c2f22355", - "dcffa9d58c2a4ca2cdbb0c7aa4c4c1d45165190089f4e983bb1c2cab4aaeff1fa2b5ee516fecd780540240bf37e56c8bcca7fab980e1e61c9400d8a9a5b14ac6", - "6fbf31b45ab0c0b8dad1c0f5f4061379912dde5aa922099a030b725c73346c524291adef89d2f6fd8dfcda6d07dad811a9314536c2915ed45da34947e83de34e", - "a0c65bddde8adef57282b04b11e7bc8aab105b99231b750c021f4a735cb1bcfab87553bba3abb0c3e64a0b6955285185a0bd35fb8cfde557329bebb1f629ee93", - "f99d815550558e81eca2f96718aed10d86f3f1cfb675cce06b0eff02f617c5a42c5aa760270f2679da2677c5aeb94f1142277f21c7f79f3c4f0cce4ed8ee62b1", - "95391da8fc7b917a2044b3d6f5374e1ca072b41454d572c7356c05fd4bc1e0f40b8bb8b4a9f6bce9be2c4623c399b0dca0dab05cb7281b71a21b0ebcd9e55670", - "04b9cd3d20d221c09ac86913d3dc63041989a9a1e694f1e639a3ba7e451840f750c2fc191d56ad61f2e7936bc0ac8e094b60caeed878c18799045402d61ceaf9", - "ec0e0ef707e4ed6c0c66f9e089e4954b058030d2dd86398fe84059631f9ee591d9d77375355149178c0cf8f8e7c49ed2a5e4f95488a2247067c208510fadc44c", - "9a37cce273b79c09913677510eaf7688e89b3314d3532fd2764c39de022a2945b5710d13517af8ddc0316624e73bec1ce67df15228302036f330ab0cb4d218dd", - "4cf9bb8fb3d4de8b38b2f262d3c40f46dfe747e8fc0a414c193d9fcf753106ce47a18f172f12e8a2f1c26726545358e5ee28c9e2213a8787aafbc516d2343152", - "64e0c63af9c808fd893137129867fd91939d53f2af04be4fa268006100069b2d69daa5c5d8ed7fddcb2a70eeecdf2b105dd46a1e3b7311728f639ab489326bc9", - "5e9c93158d659b2def06b0c3c7565045542662d6eee8a96a89b78ade09fe8b3dcc096d4fe48815d88d8f82620156602af541955e1f6ca30dce14e254c326b88f", - "7775dff889458dd11aef417276853e21335eb88e4dec9cfb4e9edb49820088551a2ca60339f12066101169f0dfe84b098fddb148d9da6b3d613df263889ad64b", - "f0d2805afbb91f743951351a6d024f9353a23c7ce1fc2b051b3a8b968c233f46f50f806ecb1568ffaa0b60661e334b21dde04f8fa155ac740eeb42e20b60d764", - "86a2af316e7d7754201b942e275364ac12ea8962ab5bd8d7fb276dc5fbffc8f9a28cae4e4867df6780d9b72524160927c855da5b6078e0b554aa91e31cb9ca1d", - "10bdf0caa0802705e706369baf8a3f79d72c0a03a80675a7bbb00be3a45e516424d1ee88efb56f6d5777545ae6e27765c3a8f5e493fc308915638933a1dfee55", - "b01781092b1748459e2e4ec178696627bf4ebafebba774ecf018b79a68aeb84917bf0b84bb79d17b743151144cd66b7b33a4b9e52c76c4e112050ff5385b7f0b", - "c6dbc61dec6eaeac81e3d5f755203c8e220551534a0b2fd105a91889945a638550204f44093dd998c076205dffad703a0e5cd3c7f438a7e634cd59fededb539e", - "eba51acffb4cea31db4b8d87e9bf7dd48fe97b0253ae67aa580f9ac4a9d941f2bea518ee286818cc9f633f2a3b9fb68e594b48cdd6d515bf1d52ba6c85a203a7", - "86221f3ada52037b72224f105d7999231c5e5534d03da9d9c0a12acb68460cd375daf8e24386286f9668f72326dbf99ba094392437d398e95bb8161d717f8991", - "5595e05c13a7ec4dc8f41fb70cb50a71bce17c024ff6de7af618d0cc4e9c32d9570d6d3ea45b86525491030c0d8f2b1836d5778c1ce735c17707df364d054347", - "ce0f4f6aca89590a37fe034dd74dd5fa65eb1cbd0a41508aaddc09351a3cea6d18cb2189c54b700c009f4cbf0521c7ea01be61c5ae09cb54f27bc1b44d658c82", - "7ee80b06a215a3bca970c77cda8761822bc103d44fa4b33f4d07dcb997e36d55298bceae12241b3fa07fa63be5576068da387b8d5859aeab701369848b176d42", - "940a84b6a84d109aab208c024c6ce9647676ba0aaa11f86dbb7018f9fd2220a6d901a9027f9abcf935372727cbf09ebd61a2a2eeb87653e8ecad1bab85dc8327", - "2020b78264a82d9f4151141adba8d44bf20c5ec062eee9b595a11f9e84901bf148f298e0c9f8777dcdbc7cc4670aac356cc2ad8ccb1629f16f6a76bcefbee760", - "d1b897b0e075ba68ab572adf9d9c436663e43eb3d8e62d92fc49c9be214e6f27873fe215a65170e6bea902408a25b49506f47babd07cecf7113ec10c5dd31252", - "b14d0c62abfa469a357177e594c10c194243ed2025ab8aa5ad2fa41ad318e0ff48cd5e60bec07b13634a711d2326e488a985f31e31153399e73088efc86a5c55", - "4169c5cc808d2697dc2a82430dc23e3cd356dc70a94566810502b8d655b39abf9e7f902fe717e0389219859e1945df1af6ada42e4ccda55a197b7100a30c30a1", - "258a4edb113d66c839c8b1c91f15f35ade609f11cd7f8681a4045b9fef7b0b24c82cda06a5f2067b368825e3914e53d6948ede92efd6e8387fa2e537239b5bee", - "79d2d8696d30f30fb34657761171a11e6c3f1e64cbe7bebee159cb95bfaf812b4f411e2f26d9c421dc2c284a3342d823ec293849e42d1e46b0a4ac1e3c86abaa", - "8b9436010dc5dee992ae38aea97f2cd63b946d94fedd2ec9671dcde3bd4ce9564d555c66c15bb2b900df72edb6b891ebcadfeff63c9ea4036a998be7973981e7", - "c8f68e696ed28242bf997f5b3b34959508e42d613810f1e2a435c96ed2ff560c7022f361a9234b9837feee90bf47922ee0fd5f8ddf823718d86d1e16c6090071", - "b02d3eee4860d5868b2c39ce39bfe81011290564dd678c85e8783f29302dfc1399ba95b6b53cd9ebbf400cca1db0ab67e19a325f2d115812d25d00978ad1bca4", - "7693ea73af3ac4dad21ca0d8da85b3118a7d1c6024cfaf557699868217bc0c2f44a199bc6c0edd519798ba05bd5b1b4484346a47c2cadf6bf30b785cc88b2baf", - "a0e5c1c0031c02e48b7f09a5e896ee9aef2f17fc9e18e997d7f6cac7ae316422c2b1e77984e5f3a73cb45deed5d3f84600105e6ee38f2d090c7d0442ea34c46d", - "41daa6adcfdb69f1440c37b596440165c15ada596813e2e22f060fcd551f24dee8e04ba6890387886ceec4a7a0d7fc6b44506392ec3822c0d8c1acfc7d5aebe8", - "14d4d40d5984d84c5cf7523b7798b254e275a3a8cc0a1bd06ebc0bee726856acc3cbf516ff667cda2058ad5c3412254460a82c92187041363cc77a4dc215e487", - "d0e7a1e2b9a447fee83e2277e9ff8010c2f375ae12fa7aaa8ca5a6317868a26a367a0b69fbc1cf32a55d34eb370663016f3d2110230eba754028a56f54acf57c", - "e771aa8db5a3e043e8178f39a0857ba04a3f18e4aa05743cf8d222b0b095825350ba422f63382a23d92e4149074e816a36c1cd28284d146267940b31f8818ea2", - "feb4fd6f9e87a56bef398b3284d2bda5b5b0e166583a66b61e538457ff0584872c21a32962b9928ffab58de4af2edd4e15d8b35570523207ff4e2a5aa7754caa", - "462f17bf005fb1c1b9e671779f665209ec2873e3e411f98dabf240a1d5ec3f95ce6796b6fc23fe171903b502023467dec7273ff74879b92967a2a43a5a183d33", - "d3338193b64553dbd38d144bea71c5915bb110e2d88180dbc5db364fd6171df317fc7268831b5aef75e4342b2fad8797ba39eddcef80e6ec08159350b1ad696d", - "e1590d585a3d39f7cb599abd479070966409a6846d4377acf4471d065d5db94129cc9be92573b05ed226be1e9b7cb0cabe87918589f80dadd4ef5ef25a93d28e", - "f8f3726ac5a26cc80132493a6fedcb0e60760c09cfc84cad178175986819665e76842d7b9fedf76dddebf5d3f56faaad4477587af21606d396ae570d8e719af2", - "30186055c07949948183c850e9a756cc09937e247d9d928e869e20bafc3cd9721719d34e04a0899b92c736084550186886efba2e790d8be6ebf040b209c439a4", - "f3c4276cb863637712c241c444c5cc1e3554e0fddb174d035819dd83eb700b4ce88df3ab3841ba02085e1a99b4e17310c5341075c0458ba376c95a6818fbb3e2", - "0aa007c4dd9d5832393040a1583c930bca7dc5e77ea53add7e2b3f7c8e231368043520d4a3ef53c969b6bbfd025946f632bd7f765d53c21003b8f983f75e2a6a", - "08e9464720533b23a04ec24f7ae8c103145f765387d738777d3d343477fd1c58db052142cab754ea674378e18766c53542f71970171cc4f81694246b717d7564", - "d37ff7ad297993e7ec21e0f1b4b5ae719cdc83c5db687527f27516cbffa822888a6810ee5c1ca7bfe3321119be1ab7bfa0a502671c8329494df7ad6f522d440f", - "dd9042f6e464dcf86b1262f6accfafbd8cfd902ed3ed89abf78ffa482dbdeeb6969842394c9a1168ae3d481a017842f660002d42447c6b22f7b72f21aae021c9", - "bd965bf31e87d70327536f2a341cebc4768eca275fa05ef98f7f1b71a0351298de006fba73fe6733ed01d75801b4a928e54231b38e38c562b2e33ea1284992fa", - "65676d800617972fbd87e4b9514e1c67402b7a331096d3bfac22f1abb95374abc942f16e9ab0ead33b87c91968a6e509e119ff07787b3ef483e1dcdccf6e3022", - "939fa189699c5d2c81ddd1ffc1fa207c970b6a3685bb29ce1d3e99d42f2f7442da53e95a72907314f4588399a3ff5b0a92beb3f6be2694f9f86ecf2952d5b41c", - "c516541701863f91005f314108ceece3c643e04fc8c42fd2ff556220e616aaa6a48aeb97a84bad74782e8dff96a1a2fa949339d722edcaa32b57067041df88cc", - "987fd6e0d6857c553eaebb3d34970a2c2f6e89a3548f492521722b80a1c21a153892346d2cba6444212d56da9a26e324dccbc0dcde85d4d2ee4399eec5a64e8f", - "ae56deb1c2328d9c4017706bce6e99d41349053ba9d336d677c4c27d9fd50ae6aee17e853154e1f4fe7672346da2eaa31eea53fcf24a22804f11d03da6abfc2b", - "49d6a608c9bde4491870498572ac31aac3fa40938b38a7818f72383eb040ad39532bc06571e13d767e6945ab77c0bdc3b0284253343f9f6c1244ebf2ff0df866", - "da582ad8c5370b4469af862aa6467a2293b2b28bd80ae0e91f425ad3d47249fdf98825cc86f14028c3308c9804c78bfeeeee461444ce243687e1a50522456a1d", - "d5266aa3331194aef852eed86d7b5b2633a0af1c735906f2e13279f14931a9fc3b0eac5ce9245273bd1aa92905abe16278ef7efd47694789a7283b77da3c70f8", - "2962734c28252186a9a1111c732ad4de4506d4b4480916303eb7991d659ccda07a9911914bc75c418ab7a4541757ad054796e26797feaf36e9f6ad43f14b35a4", - "e8b79ec5d06e111bdfafd71e9f5760f00ac8ac5d8bf768f9ff6f08b8f026096b1cc3a4c973333019f1e3553e77da3f98cb9f542e0a90e5f8a940cc58e59844b3", - "dfb320c44f9d41d1efdcc015f08dd5539e526e39c87d509ae6812a969e5431bf4fa7d91ffd03b981e0d544cf72d7b1c0374f8801482e6dea2ef903877eba675e", - "d88675118fdb55a5fb365ac2af1d217bf526ce1ee9c94b2f0090b2c58a06ca58187d7fe57c7bed9d26fca067b4110eefcd9a0a345de872abe20de368001b0745", - "b893f2fc41f7b0dd6e2f6aa2e0370c0cff7df09e3acfcc0e920b6e6fad0ef747c40668417d342b80d2351e8c175f20897a062e9765e6c67b539b6ba8b9170545", - "6c67ec5697accd235c59b486d7b70baeedcbd4aa64ebd4eef3c7eac189561a726250aec4d48cadcafbbe2ce3c16ce2d691a8cce06e8879556d4483ed7165c063", - "f1aa2b044f8f0c638a3f362e677b5d891d6fd2ab0765f6ee1e4987de057ead357883d9b405b9d609eea1b869d97fb16d9b51017c553f3b93c0a1e0f1296fedcd", - "cbaa259572d4aebfc1917acddc582b9f8dfaa928a198ca7acd0f2aa76a134a90252e6298a65b08186a350d5b7626699f8cb721a3ea5921b753ae3a2dce24ba3a", - "fa1549c9796cd4d303dcf452c1fbd5744fd9b9b47003d920b92de34839d07ef2a29ded68f6fc9e6c45e071a2e48bd50c5084e96b657dd0404045a1ddefe282ed", - "5cf2ac897ab444dcb5c8d87c495dbdb34e1838b6b629427caa51702ad0f9688525f13bec503a3c3a2c80a65e0b5715e8afab00ffa56ec455a49a1ad30aa24fcd", - "9aaf80207bace17bb7ab145757d5696bde32406ef22b44292ef65d4519c3bb2ad41a59b62cc3e94b6fa96d32a7faadae28af7d35097219aa3fd8cda31e40c275", - "af88b163402c86745cb650c2988fb95211b94b03ef290eed9662034241fd51cf398f8073e369354c43eae1052f9b63b08191caa138aa54fea889cc7024236897", - "48fa7d64e1ceee27b9864db5ada4b53d00c9bc7626555813d3cd6730ab3cc06ff342d727905e33171bde6e8476e77fb1720861e94b73a2c538d254746285f430", - "0e6fd97a85e904f87bfe85bbeb34f69e1f18105cf4ed4f87aec36c6e8b5f68bd2a6f3dc8a9ecb2b61db4eedb6b2ea10bf9cb0251fb0f8b344abf7f366b6de5ab", - "06622da5787176287fdc8fed440bad187d830099c94e6d04c8e9c954cda70c8bb9e1fc4a6d0baa831b9b78ef6648681a4867a11da93ee36e5e6a37d87fc63f6f", - "1da6772b58fabf9c61f68d412c82f182c0236d7d575ef0b58dd22458d643cd1dfc93b03871c316d8430d312995d4197f0874c99172ba004a01ee295abac24e46", - "3cd2d9320b7b1d5fb9aab951a76023fa667be14a9124e394513918a3f44096ae4904ba0ffc150b63bc7ab1eeb9a6e257e5c8f000a70394a5afd842715de15f29", - "04cdc14f7434e0b4be70cb41db4c779a88eaef6accebcb41f2d42fffe7f32a8e281b5c103a27021d0d08362250753cdf70292195a53a48728ceb5844c2d98bab", - "9071b7a8a075d0095b8fb3ae5113785735ab98e2b52faf91d5b89e44aac5b5d4ebbf91223b0ff4c71905da55342e64655d6ef8c89a4768c3f93a6dc0366b5bc8", - "ebb30240dd96c7bc8d0abe49aa4edcbb4afdc51ff9aaf720d3f9e7fbb0f9c6d6571350501769fc4ebd0b2141247ff400d4fd4be414edf37757bb90a32ac5c65a", - "8532c58bf3c8015d9d1cbe00eef1f5082f8f3632fbe9f1ed4f9dfb1fa79e8283066d77c44c4af943d76b300364aecbd0648c8a8939bd204123f4b56260422dec", - "fe9846d64f7c7708696f840e2d76cb4408b6595c2f81ec6a28a7f2f20cb88cfe6ac0b9e9b8244f08bd7095c350c1d0842f64fb01bb7f532dfcd47371b0aeeb79", - "28f17ea6fb6c42092dc264257e29746321fb5bdaea9873c2a7fa9d8f53818e899e161bc77dfe8090afd82bf2266c5c1bc930a8d1547624439e662ef695f26f24", - "ec6b7d7f030d4850acae3cb615c21dd25206d63e84d1db8d957370737ba0e98467ea0ce274c66199901eaec18a08525715f53bfdb0aacb613d342ebdceeddc3b", - "b403d3691c03b0d3418df327d5860d34bbfcc4519bfbce36bf33b208385fadb9186bc78a76c489d89fd57e7dc75412d23bcd1dae8470ce9274754bb8585b13c5", - "31fc79738b8772b3f55cd8178813b3b52d0db5a419d30ba9495c4b9da0219fac6df8e7c23a811551a62b827f256ecdb8124ac8a6792ccfecc3b3012722e94463", - "bb2039ec287091bcc9642fc90049e73732e02e577e2862b32216ae9bedcd730c4c284ef3968c368b7d37584f97bd4b4dc6ef6127acfe2e6ae2509124e66c8af4", - "f53d68d13f45edfcb9bd415e2831e938350d5380d3432278fc1c0c381fcb7c65c82dafe051d8c8b0d44e0974a0e59ec7bf7ed0459f86e96f329fc79752510fd3", - "8d568c7984f0ecdf7640fbc483b5d8c9f86634f6f43291841b309a350ab9c1137d24066b09da9944bac54d5bb6580d836047aac74ab724b887ebf93d4b32eca9", - "c0b65ce5a96ff774c456cac3b5f2c4cd359b4ff53ef93a3da0778be4900d1e8da1601e769e8f1b02d2a2f8c5b9fa10b44f1c186985468feeb008730283a6657d", - "4900bba6f5fb103ece8ec96ada13a5c3c85488e05551da6b6b33d988e611ec0fe2e3c2aa48ea6ae8986a3a231b223c5d27cec2eadde91ce07981ee652862d1e4", - "c7f5c37c7285f927f76443414d4357ff789647d7a005a5a787e03c346b57f49f21b64fa9cf4b7e45573e23049017567121a9c3d4b2b73ec5e9413577525db45a", - "ec7096330736fdb2d64b5653e7475da746c23a4613a82687a28062d3236364284ac01720ffb406cfe265c0df626a188c9e5963ace5d3d5bb363e32c38c2190a6", - "82e744c75f4649ec52b80771a77d475a3bc091989556960e276a5f9ead92a03f718742cdcfeaee5cb85c44af198adc43a4a428f5f0c2ddb0be36059f06d7df73", - "2834b7a7170f1f5b68559ab78c1050ec21c919740b784a9072f6e5d69f828d70c919c5039fb148e39e2c8a52118378b064ca8d5001cd10a5478387b966715ed6", - "16b4ada883f72f853bb7ef253efcab0c3e2161687ad61543a0d2824f91c1f81347d86be709b16996e17f2dd486927b0288ad38d13063c4a9672c39397d3789b6", - "78d048f3a69d8b54ae0ed63a573ae350d89f7c6cf1f3688930de899afa037697629b314e5cd303aa62feea72a25bf42b304b6c6bcb27fae21c16d925e1fbdac3", - "0f746a48749287ada77a82961f05a4da4abdb7d77b1220f836d09ec814359c0ec0239b8c7b9ff9e02f569d1b301ef67c4612d1de4f730f81c12c40cc063c5caa", - "f0fc859d3bd195fbdc2d591e4cdac15179ec0f1dc821c11df1f0c1d26e6260aaa65b79fafacafd7d3ad61e600f250905f5878c87452897647a35b995bcadc3a3", - "2620f687e8625f6a412460b42e2cef67634208ce10a0cbd4dff7044a41b7880077e9f8dc3b8d1216d3376a21e015b58fb279b521d83f9388c7382c8505590b9b", - "227e3aed8d2cb10b918fcb04f9de3e6d0a57e08476d93759cd7b2ed54a1cbf0239c528fb04bbf288253e601d3bc38b21794afef90b17094a182cac557745e75f", - "1a929901b09c25f27d6b35be7b2f1c4745131fdebca7f3e2451926720434e0db6e74fd693ad29b777dc3355c592a361c4873b01133a57c2e3b7075cbdb86f4fc", - "5fd7968bc2fe34f220b5e3dc5af9571742d73b7d60819f2888b629072b96a9d8ab2d91b82d0a9aaba61bbd39958132fcc4257023d1eca591b3054e2dc81c8200", - "dfcce8cf32870cc6a503eadafc87fd6f78918b9b4d0737db6810be996b5497e7e5cc80e312f61e71ff3e9624436073156403f735f56b0b01845c18f6caf772e6", - "02f7ef3a9ce0fff960f67032b296efca3061f4934d690749f2d01c35c81c14f39a67fa350bc8a0359bf1724bffc3bca6d7c7bba4791fd522a3ad353c02ec5aa8", - "64be5c6aba65d594844ae78bb022e5bebe127fd6b6ffa5a13703855ab63b624dcd1a363f99203f632ec386f3ea767fc992e8ed9686586aa27555a8599d5b808f", - "f78585505c4eaa54a8b5be70a61e735e0ff97af944ddb3001e35d86c4e2199d976104b6ae31750a36a726ed285064f5981b503889fef822fcdc2898dddb7889a", - "e4b5566033869572edfd87479a5bb73c80e8759b91232879d96b1dda36c012076ee5a2ed7ae2de63ef8406a06aea82c188031b560beafb583fb3de9e57952a7e", - "e1b3e7ed867f6c9484a2a97f7715f25e25294e992e41f6a7c161ffc2adc6daaeb7113102d5e6090287fe6ad94ce5d6b739c6ca240b05c76fb73f25dd024bf935", - "85fd085fdc12a080983df07bd7012b0d402a0f4043fcb2775adf0bad174f9b08d1676e476985785c0a5dcc41dbff6d95ef4d66a3fbdc4a74b82ba52da0512b74", - "aed8fa764b0fbff821e05233d2f7b0900ec44d826f95e93c343c1bc3ba5a24374b1d616e7e7aba453a0ada5e4fab5382409e0d42ce9c2bc7fb39a99c340c20f0", - "7ba3b2e297233522eeb343bd3ebcfd835a04007735e87f0ca300cbee6d416565162171581e4020ff4cf176450f1291ea2285cb9ebffe4c56660627685145051c", - "de748bcf89ec88084721e16b85f30adb1a6134d664b5843569babc5bbd1a15ca9b61803c901a4fef32965a1749c9f3a4e243e173939dc5a8dc495c671ab52145", - "aaf4d2bdf200a919706d9842dce16c98140d34bc433df320aba9bd429e549aa7a3397652a4d768277786cf993cde2338673ed2e6b66c961fefb82cd20c93338f", - "c408218968b788bf864f0997e6bc4c3dba68b276e2125a4843296052ff93bf5767b8cdce7131f0876430c1165fec6c4f47adaa4fd8bcfacef463b5d3d0fa61a0", - "76d2d819c92bce55fa8e092ab1bf9b9eab237a25267986cacf2b8ee14d214d730dc9a5aa2d7b596e86a1fd8fa0804c77402d2fcd45083688b218b1cdfa0dcbcb", - "72065ee4dd91c2d8509fa1fc28a37c7fc9fa7d5b3f8ad3d0d7a25626b57b1b44788d4caf806290425f9890a3a2a35a905ab4b37acfd0da6e4517b2525c9651e4", - "64475dfe7600d7171bea0b394e27c9b00d8e74dd1e416a79473682ad3dfdbb706631558055cfc8a40e07bd015a4540dcdea15883cbbf31412df1de1cd4152b91", - "12cd1674a4488a5d7c2b3160d2e2c4b58371bedad793418d6f19c6ee385d70b3e06739369d4df910edb0b0a54cbff43d54544cd37ab3a06cfa0a3ddac8b66c89", - "60756966479dedc6dd4bcff8ea7d1d4ce4d4af2e7b097e32e3763518441147cc12b3c0ee6d2ecabf1198cec92e86a3616fba4f4e872f5825330adbb4c1dee444", - "a7803bcb71bc1d0f4383dde1e0612e04f872b715ad30815c2249cf34abb8b024915cb2fc9f4e7cc4c8cfd45be2d5a91eab0941c7d270e2da4ca4a9f7ac68663a", - "b84ef6a7229a34a750d9a98ee2529871816b87fbe3bc45b45fa5ae82d5141540211165c3c5d7a7476ba5a4aa06d66476f0d9dc49a3f1ee72c3acabd498967414", - "fae4b6d8efc3f8c8e64d001dabec3a21f544e82714745251b2b4b393f2f43e0da3d403c64db95a2cb6e23ebb7b9e94cdd5ddac54f07c4a61bd3cb10aa6f93b49", - "34f7286605a122369540141ded79b8957255da2d4155abbf5a8dbb89c8eb7ede8eeef1daa46dc29d751d045dc3b1d658bb64b80ff8589eddb3824b13da235a6b", - "3b3b48434be27b9eababba43bf6b35f14b30f6a88dc2e750c358470d6b3aa3c18e47db4017fa55106d8252f016371a00f5f8b070b74ba5f23cffc5511c9f09f0", - "ba289ebd6562c48c3e10a8ad6ce02e73433d1e93d7c9279d4d60a7e879ee11f441a000f48ed9f7c4ed87a45136d7dccdca482109c78a51062b3ba4044ada2469", - "022939e2386c5a37049856c850a2bb10a13dfea4212b4c732a8840a9ffa5faf54875c5448816b2785a007da8a8d2bc7d71a54e4e6571f10b600cbdb25d13ede3", - "e6fec19d89ce8717b1a087024670fe026f6c7cbda11caef959bb2d351bf856f8055d1c0ebdaaa9d1b17886fc2c562b5e99642fc064710c0d3488a02b5ed7f6fd", - "94c96f02a8f576aca32ba61c2b206f907285d9299b83ac175c209a8d43d53bfe683dd1d83e7549cb906c28f59ab7c46f8751366a28c39dd5fe2693c9019666c8", - "31a0cd215ebd2cb61de5b9edc91e6195e31c59a5648d5c9f737e125b2605708f2e325ab3381c8dce1a3e958886f1ecdc60318f882cfe20a24191352e617b0f21", - "91ab504a522dce78779f4c6c6ba2e6b6db5565c76d3e7e7c920caf7f757ef9db7c8fcf10e57f03379ea9bf75eb59895d96e149800b6aae01db778bb90afbc989", - "d85cabc6bd5b1a01a5afd8c6734740da9fd1c1acc6db29bfc8a2e5b668b028b6b3154bfb8703fa3180251d589ad38040ceb707c4bad1b5343cb426b61eaa49c1", - "d62efbec2ca9c1f8bd66ce8b3f6a898cb3f7566ba6568c618ad1feb2b65b76c3ce1dd20f7395372faf28427f61c9278049cf0140df434f5633048c86b81e0399", - "7c8fdc6175439e2c3db15bafa7fb06143a6a23bc90f449e79deef73c3d492a671715c193b6fea9f036050b946069856b897e08c00768f5ee5ddcf70b7cd6d0e0", - "58602ee7468e6bc9df21bd51b23c005f72d6cb013f0a1b48cbec5eca299299f97f09f54a9a01483eaeb315a6478bad37ba47ca1347c7c8fc9e6695592c91d723", - "27f5b79ed256b050993d793496edf4807c1d85a7b0a67c9c4fa99860750b0ae66989670a8ffd7856d7ce411599e58c4d77b232a62bef64d15275be46a68235ff", - "3957a976b9f1887bf004a8dca942c92d2b37ea52600f25e0c9bc5707d0279c00c6e85a839b0d2d8eb59c51d94788ebe62474a791cadf52cccf20f5070b6573fc", - "eaa2376d55380bf772ecca9cb0aa4668c95c707162fa86d518c8ce0ca9bf7362b9f2a0adc3ff59922df921b94567e81e452f6c1a07fc817cebe99604b3505d38", - "c1e2c78b6b2734e2480ec550434cb5d613111adcc21d475545c3b1b7e6ff12444476e5c055132e2229dc0f807044bb919b1a5662dd38a9ee65e243a3911aed1a", - "8ab48713389dd0fcf9f965d3ce66b1e559a1f8c58741d67683cd971354f452e62d0207a65e436c5d5d8f8ee71c6abfe50e669004c302b31a7ea8311d4a916051", - "24ce0addaa4c65038bd1b1c0f1452a0b128777aabc94a29df2fd6c7e2f85f8ab9ac7eff516b0e0a825c84a24cfe492eaad0a6308e46dd42fe8333ab971bb30ca", - "5154f929ee03045b6b0c0004fa778edee1d139893267cc84825ad7b36c63de32798e4a166d24686561354f63b00709a1364b3c241de3febf0754045897467cd4", - "e74e907920fd87bd5ad636dd11085e50ee70459c443e1ce5809af2bc2eba39f9e6d7128e0e3712c316da06f4705d78a4838e28121d4344a2c79c5e0db307a677", - "bf91a22334bac20f3fd80663b3cd06c4e8802f30e6b59f90d3035cc9798a217ed5a31abbda7fa6842827bdf2a7a1c21f6fcfccbb54c6c52926f32da816269be1", - "d9d5c74be5121b0bd742f26bffb8c89f89171f3f934913492b0903c271bbe2b3395ef259669bef43b57f7fcc3027db01823f6baee66e4f9fead4d6726c741fce", - "50c8b8cf34cd879f80e2faab3230b0c0e1cc3e9dcadeb1b9d97ab923415dd9a1fe38addd5c11756c67990b256e95ad6d8f9fedce10bf1c90679cde0ecf1be347", - "0a386e7cd5dd9b77a035e09fe6fee2c8ce61b5383c87ea43205059c5e4cd4f4408319bb0a82360f6a58e6c9ce3f487c446063bf813bc6ba535e17fc1826cfc91", - "1f1459cb6b61cbac5f0efe8fc487538f42548987fcd56221cfa7beb22504769e792c45adfb1d6b3d60d7b749c8a75b0bdf14e8ea721b95dca538ca6e25711209", - "e58b3836b7d8fedbb50ca5725c6571e74c0785e97821dab8b6298c10e4c079d4a6cdf22f0fedb55032925c16748115f01a105e77e00cee3d07924dc0d8f90659", - "b929cc6505f020158672deda56d0db081a2ee34c00c1100029bdf8ea98034fa4bf3e8655ec697fe36f40553c5bb46801644a627d3342f4fc92b61f03290fb381", - "72d353994b49d3e03153929a1e4d4f188ee58ab9e72ee8e512f29bc773913819ce057ddd7002c0433ee0a16114e3d156dd2c4a7e80ee53378b8670f23e33ef56", - "c70ef9bfd775d408176737a0736d68517ce1aaad7e81a93c8c1ed967ea214f56c8a377b1763e676615b60f3988241eae6eab9685a5124929d28188f29eab06f7", - "c230f0802679cb33822ef8b3b21bf7a9a28942092901d7dac3760300831026cf354c9232df3e084d9903130c601f63c1f4a4a4b8106e468cd443bbe5a734f45f", - "6f43094cafb5ebf1f7a4937ec50f56a4c9da303cbb55ac1f27f1f1976cd96beda9464f0e7b9c54620b8a9fba983164b8be3578425a024f5fe199c36356b88972", - "3745273f4c38225db2337381871a0c6aafd3af9b018c88aa02025850a5dc3a42a1a3e03e56cbf1b0876d63a441f1d2856a39b8801eb5af325201c415d65e97fe", - "c50c44cca3ec3edaae779a7e179450ebdda2f97067c690aa6c5a4ac7c30139bb27c0df4db3220e63cb110d64f37ffe078db72653e2daacf93ae3f0a2d1a7eb2e", - "8aef263e385cbc61e19b28914243262af5afe8726af3ce39a79c27028cf3ecd3f8d2dfd9cfc9ad91b58f6f20778fd5f02894a3d91c7d57d1e4b866a7f364b6be", - "28696141de6e2d9bcb3235578a66166c1448d3e905a1b482d423be4bc5369bc8c74dae0acc9cc123e1d8ddce9f97917e8c019c552da32d39d2219b9abf0fa8c8", - "2fb9eb2085830181903a9dafe3db428ee15be7662224efd643371fb25646aee716e531eca69b2bdc8233f1a8081fa43da1500302975a77f42fa592136710e9dc", - "66f9a7143f7a3314a669bf2e24bbb35014261d639f495b6c9c1f104fe8e320aca60d4550d69d52edbd5a3cdeb4014ae65b1d87aa770b69ae5c15f4330b0b0ad8", - "f4c4dd1d594c3565e3e25ca43dad82f62abea4835ed4cd811bcd975e46279828d44d4c62c3679f1b7f7b9dd4571d7b49557347b8c5460cbdc1bef690fb2a08c0", - "8f1dc9649c3a84551f8f6e91cac68242a43b1f8f328ee92280257387fa7559aa6db12e4aeadc2d26099178749c6864b357f3f83b2fb3efa8d2a8db056bed6bcc", - "3139c1a7f97afd1675d460ebbc07f2728aa150df849624511ee04b743ba0a833092f18c12dc91b4dd243f333402f59fe28abdbbbae301e7b659c7a26d5c0f979", - "06f94a2996158a819fe34c40de3cf0379fd9fb85b3e363ba3926a0e7d960e3f4c2e0c70c7ce0ccb2a64fc29869f6e7ab12bd4d3f14fce943279027e785fb5c29", - "c29c399ef3eee8961e87565c1ce263925fc3d0ce267d13e48dd9e732ee67b0f69fad56401b0f10fcaac119201046cca28c5b14abdea3212ae65562f7f138db3d", - "4cec4c9df52eef05c3f6faaa9791bc7445937183224ecc37a1e58d0132d35617531d7e795f52af7b1eb9d147de1292d345fe341823f8e6bc1e5badca5c656108", - "898bfbae93b3e18d00697eab7d9704fa36ec339d076131cefdf30edbe8d9cc81c3a80b129659b163a323bab9793d4feed92d54dae966c77529764a09be88db45", - "ee9bd0469d3aaf4f14035be48a2c3b84d9b4b1fff1d945e1f1c1d38980a951be197b25fe22c731f20aeacc930ba9c4a1f4762227617ad350fdabb4e80273a0f4", - "3d4d3113300581cd96acbf091c3d0f3c310138cd6979e6026cde623e2dd1b24d4a8638bed1073344783ad0649cc6305ccec04beb49f31c633088a99b65130267", - "95c0591ad91f921ac7be6d9ce37e0663ed8011c1cfd6d0162a5572e94368bac02024485e6a39854aa46fe38e97d6c6b1947cd272d86b06bb5b2f78b9b68d559d", - "227b79ded368153bf46c0a3ca978bfdbef31f3024a5665842468490b0ff748ae04e7832ed4c9f49de9b1706709d623e5c8c15e3caecae8d5e433430ff72f20eb", - "5d34f3952f0105eef88ae8b64c6ce95ebfade0e02c69b08762a8712d2e4911ad3f941fc4034dc9b2e479fdbcd279b902faf5d838bb2e0c6495d372b5b7029813", - "7f939bf8353abce49e77f14f3750af20b7b03902e1a1e7fb6aaf76d0259cd401a83190f15640e74f3e6c5a90e839c7821f6474757f75c7bf9002084ddc7a62dc", - "062b61a2f9a33a71d7d0a06119644c70b0716a504de7e5e1be49bd7b86e7ed6817714f9f0fc313d06129597e9a2235ec8521de36f7290a90ccfc1ffa6d0aee29", - "f29e01eeae64311eb7f1c6422f946bf7bea36379523e7b2bbaba7d1d34a22d5ea5f1c5a09d5ce1fe682cced9a4798d1a05b46cd72dff5c1b355440b2a2d476bc", - "ec38cd3bbab3ef35d7cb6d5c914298351d8a9dc97fcee051a8a02f58e3ed6184d0b7810a5615411ab1b95209c3c810114fdeb22452084e77f3f847c6dbaafe16", - "c2aef5e0ca43e82641565b8cb943aa8ba53550caef793b6532fafad94b816082f0113a3ea2f63608ab40437ecc0f0229cb8fa224dcf1c478a67d9b64162b92d1", - "15f534efff7105cd1c254d074e27d5898b89313b7d366dc2d7d87113fa7d53aae13f6dba487ad8103d5e854c91fdb6e1e74b2ef6d1431769c30767dde067a35c", - "89acbca0b169897a0a2714c2df8c95b5b79cb69390142b7d6018bb3e3076b099b79a964152a9d912b1b86412b7e372e9cecad7f25d4cbab8a317be36492a67d7", - "e3c0739190ed849c9c962fd9dbb55e207e624fcac1eb417691515499eea8d8267b7e8f1287a63633af5011fde8c4ddf55bfdf722edf88831414f2cfaed59cb9a", - "8d6cf87c08380d2d1506eee46fd4222d21d8c04e585fbfd08269c98f702833a156326a0724656400ee09351d57b440175e2a5de93cc5f80db6daf83576cf75fa", - "da24bede383666d563eeed37f6319baf20d5c75d1635a6ba5ef4cfa1ac95487e96f8c08af600aab87c986ebad49fc70a58b4890b9c876e091016daf49e1d322e", - "f9d1d1b1e87ea7ae753a029750cc1cf3d0157d41805e245c5617bb934e732f0ae3180b78e05bfe76c7c3051e3e3ac78b9b50c05142657e1e03215d6ec7bfd0fc", - "11b7bc1668032048aa43343de476395e814bbbc223678db951a1b03a021efac948cfbe215f97fe9a72a2f6bc039e3956bfa417c1a9f10d6d7ba5d3d32ff323e5", - "b8d9000e4fc2b066edb91afee8e7eb0f24e3a201db8b6793c0608581e628ed0bcc4e5aa6787992a4bcc44e288093e63ee83abd0bc3ec6d0934a674a4da13838a", - "ce325e294f9b6719d6b61278276ae06a2564c03bb0b783fafe785bdf89c7d5acd83e78756d301b445699024eaeb77b54d477336ec2a4f332f2b3f88765ddb0c3", - "29acc30e9603ae2fccf90bf97e6cc463ebe28c1b2f9b4b765e70537c25c702a29dcbfbf14c99c54345ba2b51f17b77b5f15db92bbad8fa95c471f5d070a137cc", - "3379cbaae562a87b4c0425550ffdd6bfe1203f0d666cc7ea095be407a5dfe61ee91441cd5154b3e53b4f5fb31ad4c7a9ad5c7af4ae679aa51a54003a54ca6b2d", - "3095a349d245708c7cf550118703d7302c27b60af5d4e67fc978f8a4e60953c7a04f92fcf41aee64321ccb707a895851552b1e37b00bc5e6b72fa5bcef9e3fff", - "07262d738b09321f4dbccec4bb26f48cb0f0ed246ce0b31b9a6e7bc683049f1f3e5545f28ce932dd985c5ab0f43bd6de0770560af329065ed2e49d34624c2cbb", - "b6405eca8ee3316c87061cc6ec18dba53e6c250c63ba1f3bae9e55dd3498036af08cd272aa24d713c6020d77ab2f3919af1a32f307420618ab97e73953994fb4", - "7ee682f63148ee45f6e5315da81e5c6e557c2c34641fc509c7a5701088c38a74756168e2cd8d351e88fd1a451f360a01f5b2580f9b5a2e8cfc138f3dd59a3ffc", - "1d263c179d6b268f6fa016f3a4f29e943891125ed8593c81256059f5a7b44af2dcb2030d175c00e62ecaf7ee96682aa07ab20a611024a28532b1c25b86657902", - "106d132cbdb4cd2597812846e2bc1bf732fec5f0a5f65dbb39ec4e6dc64ab2ce6d24630d0f15a805c3540025d84afa98e36703c3dbee713e72dde8465bc1be7e", - "0e79968226650667a8d862ea8da4891af56a4e3a8b6d1750e394f0dea76d640d85077bcec2cc86886e506751b4f6a5838f7f0b5fef765d9dc90dcdcbaf079f08", - "521156a82ab0c4e566e5844d5e31ad9aaf144bbd5a464fdca34dbd5717e8ff711d3ffebbfa085d67fe996a34f6d3e4e60b1396bf4b1610c263bdbb834d560816", - "1aba88befc55bc25efbce02db8b9933e46f57661baeabeb21cc2574d2a518a3cba5dc5a38e49713440b25f9c744e75f6b85c9d8f4681f676160f6105357b8406", - "5a9949fcb2c473cda968ac1b5d08566dc2d816d960f57e63b898fa701cf8ebd3f59b124d95bfbbedc5f1cf0e17d5eaed0c02c50b69d8a402cabcca4433b51fd4", - "b0cead09807c672af2eb2b0f06dde46cf5370e15a4096b1a7d7cbb36ec31c205fbefca00b7a4162fa89fb4fb3eb78d79770c23f44e7206664ce3cd931c291e5d", - "bb6664931ec97044e45b2ae420ae1c551a8874bc937d08e969399c3964ebdba8346cdd5d09caafe4c28ba7ec788191ceca65ddd6f95f18583e040d0f30d0364d", - "65bc770a5faa3792369803683e844b0be7ee96f29f6d6a35568006bd5590f9a4ef639b7a8061c7b0424b66b60ac34af3119905f33a9d8c3ae18382ca9b689900", - "ea9b4dca333336aaf839a45c6eaa48b8cb4c7ddabffea4f643d6357ea6628a480a5b45f2b052c1b07d1fedca918b6f1139d80f74c24510dcbaa4be70eacc1b06", - "e6342fb4a780ad975d0e24bce149989b91d360557e87994f6b457b895575cc02d0c15bad3ce7577f4c63927ff13f3e381ff7e72bdbe745324844a9d27e3f1c01", - "3e209c9b33e8e461178ab46b1c64b49a07fb745f1c8bc95fbfb94c6b87c69516651b264ef980937fad41238b91ddc011a5dd777c7efd4494b4b6ecd3a9c22ac0", - "fd6a3d5b1875d80486d6e69694a56dbb04a99a4d051f15db2689776ba1c4882e6d462a603b7015dc9f4b7450f05394303b8652cfb404a266962c41bae6e18a94", - "951e27517e6bad9e4195fc8671dee3e7e9be69cee1422cb9fecfce0dba875f7b310b93ee3a3d558f941f635f668ff832d2c1d033c5e2f0997e4c66f147344e02", - "8eba2f874f1ae84041903c7c4253c82292530fc8509550bfdc34c95c7e2889d5650b0ad8cb988e5c4894cb87fbfbb19612ea93ccc4c5cad17158b9763464b492", - "16f712eaa1b7c6354719a8e7dbdfaf55e4063a4d277d947550019b38dfb564830911057d50506136e2394c3b28945cc964967d54e3000c2181626cfb9b73efd2", - "c39639e7d5c7fb8cdd0fd3e6a52096039437122f21c78f1679cea9d78a734c56ecbeb28654b4f18e342c331f6f7229ec4b4bc281b2d80a6eb50043f31796c88c", - "72d081af99f8a173dcc9a0ac4eb3557405639a29084b54a40172912a2f8a395129d5536f0918e902f9e8fa6000995f4168ddc5f893011be6a0dbc9b8a1a3f5bb", - "c11aa81e5efd24d5fc27ee586cfd8847fbb0e27601ccece5ecca0198e3c7765393bb74457c7e7a27eb9170350e1fb53857177506be3e762cc0f14d8c3afe9077", - "c28f2150b452e6c0c424bcde6f8d72007f9310fed7f2f87de0dbb64f4479d6c1441ba66f44b2accee61609177ed340128b407ecec7c64bbe50d63d22d8627727", - "f63d88122877ec30b8c8b00d22e89000a966426112bd44166e2f525b769ccbe9b286d437a0129130dde1a86c43e04bedb594e671d98283afe64ce331de9828fd", - "348b0532880b88a6614a8d7408c3f913357fbb60e995c60205be9139e74998aede7f4581e42f6b52698f7fa1219708c14498067fd1e09502de83a77dd281150c", - "5133dc8bef725359dff59792d85eaf75b7e1dcd1978b01c35b1b85fcebc63388ad99a17b6346a217dc1a9622ebd122ecf6913c4d31a6b52a695b86af00d741a0", - "2753c4c0e98ecad806e88780ec27fccd0f5c1ab547f9e4bf1659d192c23aa2cc971b58b6802580baef8adc3b776ef7086b2545c2987f348ee3719cdef258c403", - "b1663573ce4b9d8caefc865012f3e39714b9898a5da6ce17c25a6a47931a9ddb9bbe98adaa553beed436e89578455416c2a52a525cf2862b8d1d49a2531b7391", - "64f58bd6bfc856f5e873b2a2956ea0eda0d6db0da39c8c7fc67c9f9feefcff3072cdf9e6ea37f69a44f0c61aa0da3693c2db5b54960c0281a088151db42b11e8", - "0764c7be28125d9065c4b98a69d60aede703547c66a12e17e1c618994132f5ef82482c1e3fe3146cc65376cc109f0138ed9a80e49f1f3c7d610d2f2432f20605", - "f748784398a2ff03ebeb07e155e66116a839741a336e32da71ec696001f0ad1b25cd48c69cfca7265eca1dd71904a0ce748ac4124f3571076dfa7116a9cf00e9", - "3f0dbc0186bceb6b785ba78d2a2a013c910be157bdaffae81bb6663b1a73722f7f1228795f3ecada87cf6ef0078474af73f31eca0cc200ed975b6893f761cb6d", - "d4762cd4599876ca75b2b8fe249944dbd27ace741fdab93616cbc6e425460feb51d4e7adcc38180e7fc47c89024a7f56191adb878dfde4ead62223f5a2610efe", - "cd36b3d5b4c91b90fcbba79513cfee1907d8645a162afd0cd4cf4192d4a5f4c892183a8eacdb2b6b6a9d9aa8c11ac1b261b380dbee24ca468f1bfd043c58eefe", - "98593452281661a53c48a9d8cd790826c1a1ce567738053d0bee4a91a3d5bd92eefdbabebe3204f2031ca5f781bda99ef5d8ae56e5b04a9e1ecd21b0eb05d3e1", - "771f57dd2775ccdab55921d3e8e30ccf484d61fe1c1b9c2ae819d0fb2a12fab9be70c4a7a138da84e8280435daade5bbe66af0836a154f817fb17f3397e725a3", - "c60897c6f828e21f16fbb5f15b323f87b6c8955eabf1d38061f707f608abdd993fac3070633e286cf8339ce295dd352df4b4b40b2f29da1dd50b3a05d079e6bb", - "8210cd2c2d3b135c2cf07fa0d1433cd771f325d075c6469d9c7f1ba0943cd4ab09808cabf4acb9ce5bb88b498929b4b847f681ad2c490d042db2aec94214b06b", - "1d4edfffd8fd80f7e4107840fa3aa31e32598491e4af7013c197a65b7f36dd3ac4b478456111cd4309d9243510782fa31b7c4c95fa951520d020eb7e5c36e4ef", - "af8e6e91fab46ce4873e1a50a8ef448cc29121f7f74deef34a71ef89cc00d9274bc6c2454bbb3230d8b2ec94c62b1dec85f3593bfa30ea6f7a44d7c09465a253", - "29fd384ed4906f2d13aa9fe7af905990938bed807f1832454a372ab412eea1f5625a1fcc9ac8343b7c67c5aba6e0b1cc4644654913692c6b39eb9187ceacd3ec", - "a268c7885d9874a51c44dffed8ea53e94f78456e0b2ed99ff5a3924760813826d960a15edbedbb5de5226ba4b074e71b05c55b9756bb79e55c02754c2c7b6c8a", - "0cf8545488d56a86817cd7ecb10f7116b7ea530a45b6ea497b6c72c997e09e3d0da8698f46bb006fc977c2cd3d1177463ac9057fdd1662c85d0c126443c10473", - "b39614268fdd8781515e2cfebf89b4d5402bab10c226e6344e6b9ae000fb0d6c79cb2f3ec80e80eaeb1980d2f8698916bd2e9f747236655116649cd3ca23a837", - "74bef092fc6f1e5dba3663a3fb003b2a5ba257496536d99f62b9d73f8f9eb3ce9ff3eec709eb883655ec9eb896b9128f2afc89cf7d1ab58a72f4a3bf034d2b4a", - "3a988d38d75611f3ef38b8774980b33e573b6c57bee0469ba5eed9b44f29945e7347967fba2c162e1c3be7f310f2f75ee2381e7bfd6b3f0baea8d95dfb1dafb1", - "58aedfce6f67ddc85a28c992f1c0bd0969f041e66f1ee88020a125cbfcfebcd61709c9c4eba192c15e69f020d462486019fa8dea0cd7a42921a19d2fe546d43d", - "9347bd291473e6b4e368437b8e561e065f649a6d8ada479ad09b1999a8f26b91cf6120fd3bfe014e83f23acfa4c0ad7b3712b2c3c0733270663112ccd9285cd9", - "b32163e7c5dbb5f51fdc11d2eac875efbbcb7e7699090a7e7ff8a8d50795af5d74d9ff98543ef8cdf89ac13d0485278756e0ef00c817745661e1d59fe38e7537", - "1085d78307b1c4b008c57a2e7e5b234658a0a82e4ff1e4aaac72b312fda0fe27d233bc5b10e9cc17fdc7697b540c7d95eb215a19a1a0e20e1abfa126efd568c7", - "4e5c734c7dde011d83eac2b7347b373594f92d7091b9ca34cb9c6f39bdf5a8d2f134379e16d822f6522170ccf2ddd55c84b9e6c64fc927ac4cf8dfb2a17701f2", - "695d83bd990a1117b3d0ce06cc888027d12a054c2677fd82f0d4fbfc93575523e7991a5e35a3752e9b70ce62992e268a877744cdd435f5f130869c9a2074b338", - "a6213743568e3b3158b9184301f3690847554c68457cb40fc9a4b8cfd8d4a118c301a07737aeda0f929c68913c5f51c80394f53bff1c3e83b2e40ca97eba9e15", - "d444bfa2362a96df213d070e33fa841f51334e4e76866b8139e8af3bb3398be2dfaddcbc56b9146de9f68118dc5829e74b0c28d7711907b121f9161cb92b69a9", - "142709d62e28fcccd0af97fad0f8465b971e82201dc51070faa0372aa43e92484be1c1e73ba10906d5d1853db6a4106e0a7bf9800d373d6dee2d46d62ef2a461", -} - -var hashes2X = []string{ - "64", - "f457", - "e8c045", - "a74c6d0d", - "eb02ae482a", - "be65b981275e", - "8540ccd083a455", - "074a02fa58d7c7c0", - "da6da05e10db3022b6", - "542a5aae2f28f2c3b68c", - "ca3af2afc4afe891da78b1", - "e0f66b8dcebf4edc85f12c85", - "744224d383733b3fa2c53bfcf5", - "b09b653e85b72ef5cdf8fcfa95f3", - "dd51877f31f1cf7b9f68bbb09064a3", - "f5ebf68e7ebed6ad445ffc0c47e82650", - "ebdcfe03bcb7e21a9091202c5938c0a1bb", - "860fa5a72ff92efafc48a89df1632a4e2809", - "0d6d49daa26ae2818041108df3ce0a4db48c8d", - "e5d7e1bc5715f5ae991e4043e39533af5d53e47f", - "5232028a43b9d4dfa7f37439b49495926481ab8a29", - "c118803c922f9ae2397fb676a2ab7603dd9c29c21fe4", - "2af924f48b9bd7076bfd68794bba6402e2a7ae048de3ea", - "61255ac38231087c79ea1a0fa14538c26be1c851b6f318c0", - "f9712b8e42f0532162822f142cb946c40369f2f0e77b6b186e", - "76da0b89558df66f9b1e66a61d1e795b178ce77a359087793ff2", - "9036fd1eb32061bdecebc4a32aa524b343b8098a16768ee774d93c", - "f4ce5a05934e125d159678bea521f585574bcf9572629f155f63efcc", - "5e1c0d9fae56393445d3024d6b82692d1339f7b5936f68b062c691d3bf", - "538e35f3e11111d7c4bab69f83b30ade4f67addf1f45cdd2ac74bf299509", - "17572c4dcbb17faf8785f3bba9f6903895394352eae79b01ebd758377694cc", - "29f6bb55de7f8868e053176c878c9fe6c2055c4c5413b51ab0386c277fdbac75", - "bad026c8b2bd3d294907f2280a7145253ec2117d76e3800357be6d431b16366e41", - "386b7cb6e0fd4b27783125cbe80065af8eb9981fafc3ed18d8120863d972fa7427d9", - "06e8e6e26e756fff0b83b226dce974c21f970e44fb5b3e5bbada6e4b12f81cca666f48", - "2f9bd300244f5bc093ba6dcdb4a89fa29da22b1de9d2c9762af919b5fedf6998fbda305b", - "cf6bdcc46d788074511f9e8f0a4b86704365b2d3f98340b8db53920c385b959a38c8869ae7", - "1171e603e5cdeb4cda8fd7890222dd8390ede87b6f3284cac0f0d832d8250c9200715af7913d", - "bda7b2ad5d02bd35ffb009bdd72b7d7bc9c28b3a32f32b0ba31d6cbd3ee87c60b7b98c03404621", - "2001455324e748503aa08eff2fb2e52ae0170e81a6e9368ada054a36ca340fb779393fb045ac72b3", - "45f0761aefafbf87a68f9f1f801148d9bba52616ad5ee8e8ac9207e9846a782f487d5cca8b20355a18", - "3a7e05708be62f087f17b41ac9f20e4ef8115c5ab6d08e84d46af8c273fb46d3ce1aabebae5eea14e018", - "ea318da9d042ca337ccdfb2bee3e96ecb8f907876c8d143e8e44569178353c2e593e4a82c265931ba1dd79", - "e0f7c08f5bd712f87094b04528fadb283d83c9ceb82a3e39ec31c19a42a1a1c3bee5613b5640abe069b0d690", - "d35e63fb1f3f52ab8f7c6cd7c8247e9799042e53922fbaea808ab979fa0c096588cfea3009181d2f93002dfc11", - "b8b0ab69e3ae55a8699eb481dd665b6a2424c89bc6b7cca02d15fdf1b9854139cab49d34de498b50b2c7e8b910cf", - "fb65e3222a2950eae1701d4cdd4736266f65bf2c0d2e77968996eadb60ef74fb786f6234973a2524bdfe32d100aa0e", - "f28b4bb3a2e2c4d5c01a23ff134558559a2d3d704b75402983ee4e0f71d273ae056842c4153b18ee5c47e2bfa54313d4", - "7bb78794e58a53c3e4b1aeb161e756af051583d14e0a5a3205e094b7c9a8cf62d098fa9ea1db12f330a51ab9852c17f983", - "a879a8ebae4d0987789bcc58ec3448e35ba1fa1ee58c668d8295aba4eaeaf2762b053a677e25404f635a53037996974d418a", - "695865b353ec701ecc1cb38f3154489eed0d39829fc192bb68db286d20fa0a64235cde5639137819f7e99f86bd89afcef84a0f", - "a6ec25f369f71176952fb9b33305dc768589a6070463ee4c35996e1ced4964a865a5c3dc8f0d809eab71366450de702318e4834d", - "604749f7bfadb069a036409ffac5ba291fa05be8cba2f141554132f56d9bcb88d1ce12f2004cd3ade1aa66a26e6ef64e327514096d", - "daf9fa7dc2464a899533594e7916fc9bc585bd29dd60c930f3bfa78bc47f6c8439448043a45119fc9228c15bce5fd24f46baf9de736b", - "943ea5647a8666763084da6a6f15dcf0e8dc24f27fd0d9194805d25180fe3a6d98f4b2b5e0d6a04e9b41869817030f16ae975dd41fc35c", - "af4f73cbfc093760dfeb52d57ef45207bbd1a515f5523404e5d95a73c237d97ae65bd195b472de6d514c2c448b12fafc282166da132258e9", - "605f4ed72ed7f5046a342fe4cf6808100d4632e610d59f7ebb016e367d0ff0a95cf45b02c727ba71f147e95212f52046804d376c918cadd260", - "3750d8ab0a6b13f78e51d321dfd1aa801680e958de45b7b977d05732ee39f856b27cb2bcce8fbf3db6666d35e21244c2881fdcc27fbfea6b1672", - "8f1b929e80ab752b58abe9731b7b34eb61369536995abef1c0980d93903c1880da3637d367456895f0cb4769d6de3a979e38ed6f5f6ac4d48e9b32", - "d8469b7aa538b36cdc711a591d60dafecca22bd421973a70e2deef72f69d8014a6f0064eabfbebf5383cbb90f452c6e113d2110e4b1092c54a38b857", - "7d1f1ad2029f4880e1898af8289c23bc933a40863cc4ab697fead79c58b6b8e25b68cf5324579b0fe879fe7a12e6d03907f0140dfe7b29d33d6109ecf1", - "87a77aca6d551642288a0dff66078225ae39d288801607429d6725ca949eed7a6f199dd8a65523b4ee7cfa4187400e96597bfffc3e38ade0ae0ab88536a9", - "e101f43179d8e8546e5ce6a96d7556b7e6b9d4a7d00e7aade5579d085d527ce34a9329551ebcaf6ba946949bbe38e30a62ae344c1950b4bde55306b3bac432", - "4324561d76c370ef35ac36a4adf8f3773a50d86504bd284f71f7ce9e2bc4c1f1d34a7fb2d67561d101955d448b67577eb30dfee96a95c7f921ef53e20be8bc44", - "78f0ed6e220b3da3cc9381563b2f72c8dc830cb0f39a48c6ae479a6a78dcfa94002631dec467e9e9b47cc8f0887eb680e340aec3ec009d4a33d241533c76c8ca8c", - "9f6589c31a472e0a736f4eb22b6c70a9d332cc15304ccb66a6b97cd051b6ed82f8990e1d9bee2e4bb1c3c45e550ae0e7b96e93ae23f2fb8f63b309131e72b36cba6a", - "c138077ee4ed3d7ffa85ba851dfdf6e9843fc1dc00889d117237bfaad9aa757192f73556b959f98e6d24886ce48869f2a01a48c371785f12b6484eb2078f08c22066e1", - "f83e7c9e0954a500576ea1fc90a3db2cbd7994eaef647dab5b34e88ab9dc0b47addbc807b21c8e6dd3d0bd357f008471d4f3e0abb18450e1d4919e03a34545b9643f870e", - "3277a11f2628544fc66f50428f1ad56bcba6ee36ba2ca6ecdf7e255effc0c30235c039d13e01f04cf1efe95b5c2033ab72adda30994b62f2851d17c9920eadca9a251752dc", - "c2a834281a06fe7b730d3a03f90761daf02714c066e33fc07e1f59ac801ec2f4433486b5a2da8faa51a0cf3c34e29b2960cd0013378938dbd47c3a3d12d70db01d7d06c3e91e", - "47680182924a51cabe142a6175c9253e8ba7ea579ece8d9bcb78b1e9ca00db844fa08abcf41702bd758ee2c608d9612fed50e85854469cb4ef3038acf1e35b6ba4390561d8ae82", - "cec45830cd71869e83b109a99a3cd7d935f83a95de7c582f3adbd34e4938fa2f3f922f52f14f169c38cc6618d3f306a8a4d607b345b8a9c48017136fbf825aecf7b620e85f837fae", - "46fb53c70ab105079d5d78dc60eaa30d938f26e4d0b9df122e21ec85deda94744c1daf8038b8a6652d1ff3e7e15376f5abd30e564784a999f665078340d66b0e939e0c2ef03f9c08bb", - "7b0dcb52791a170cc52f2e8b95d8956f325c3751d3ef3b2b83b41d82d4496b46228a750d02b71a96012e56b0720949ca77dc68be9b1ef1ad6d6a5ceb86bf565cb972279039e209dddcdc", - "7153fd43e6b05f5e1a4401e0fef954a737ed142ec2f60bc4daeef9ce73ea1b40a0fcaf1a1e03a3513f930dd5335723632f59f7297fe3a98b68e125eadf478eb045ed9fc4ee566d13f537f5", - "c7f569c79c801dab50e9d9ca6542f25774b3841e49c83efe0b89109f569509ce7887bc0d2b57b50320eb81fab9017f16c4c870e59edb6c26620d93748500231d70a36f48a7c60747ca2d5986", - "0a81e0c547648595adca65623ce783411aac7f7d30c3ad269efafab288e7186f6895261972f5137877669c550f34f5128850ebb50e1884814ea1055ee29a866afd04b2087abed02d9592573428", - "6a7b6769e1f1c95314b0c7fe77013567891bd23416374f23e4f43e27bc4c55cfada13b53b1581948e07fb96a50676baa2756db0988077b0f27d36ac088e0ff0fe72eda1e8eb4b8facff3218d9af0", - "a399474595cb1ccab6107f18e80f03b1707745c7bf769fc9f260094dc9f8bc6fe09271cb0b131ebb2acd073de4a6521c8368e664278be86be216d1622393f23435fae4fbc6a2e7c961282a777c2d75", - "4f0fc590b2755a515ae6b46e9628092369d9c8e589e3239320639aa8f7aa44f8111c7c4b3fdbe6e55e036fbf5ebc9c0aa87a4e66851c11e86f6cbf0bd9eb1c98a378c7a7d3af900f55ee108b59bc9e5c", - "ed96a046f08dd675107331d267379c6fce3c352a9f8d7b243008a74cb4e9410836afaabe871dab6038ca94ce5f6d41fa922ce08aba58169f94cfc86d9f688f396abd24c11a6a9b0830572105a477c33e92", - "379955f539abf0eb2972ee99ed9546c4bbee363403991833005dc27904c271ef22a799bc32cb39f08d2e4ba6717d55153feb692d7c5efae70890bf29d96df02333c7b05ccc314e4835b018fec9141a82c745", - "e16cc8d41b96547ede0d0cf4d908c5fa393399daa4a9696e76a4c1f6a2a9fef70f17fb53551a8145ed88f18db8fe780a079d94732437023f7c1d1849ef69ad536a76204239e8ba5d97e507c36c7d042f87fe0e", - "a81de50750ece3f84536728f227208bf01ec5b7721579d007de72c88ee20663318332efe5bc7c09ad1fa8342be51f0609046ccf760a7957a7d8dc88941adb93666a4521ebe76618e5ddc2dd3261493d400b50073", - "b72c5fb7c7f60d243928fa41a2d711157b96aef290185c64b4de3dcfa3d644da67a8f37c2ac55caad79ec695a473e8b481f658c497edb8a191526592b11a412282d2a4010c90ef4647bd6ce745ebc9244a71d4876b", - "9550703877079c90e200e830f277b605624954c549e729c359ee01ee2b07741ecc4255cb37f96682dafcdbaade1063e2c5ccbd1918fb669926a67744101fb6de3ac016be4c74165a1e5a696b704ba2ebf4a953d44b95", - "a17eb44d4de502dc04a80d5a5e9507d17f27c96467f24c79b06bc98a4c410741d4ac2db98ec02c2a976d788531f1a4451b6c6204cef6dae1b6ebbcd0bde23e6fffb02754043c8fd3c783d90a670b16879ce68b5554fe1c", - "41d3ea1eaba5be4a206732dbb5b70b79b66a6e5908795ad4fb7cf9e67efb13f06fef8f90acb080ce082aadec6a1b543af759ab63fa6f1d3941186482b0c2b312f1151ea8386253a13ed3708093279b8eb04185636488b226", - "5e7cdd8373dc42a243c96013cd29df9283b5f28bb50453a903c85e2ce57f35861bf93f03029072b70dac0804e7d51fd0c578c8d9fa619f1e9ce3d8044f65d55634dba611280c1d5cfb59c836a595c803124f696b07ddfac718", - "26a14c4aa168907cb5de0d12a82e1373a128fb21f2ed11feba108b1bebce934ad63ed89f4ed7ea5e0bc8846e4fc10142f82de0bebd39d68f7874f615c3a9c896bab34190e85df05aaa316e14820b5e478d838fa89dfc94a7fc1e", - "0211dfc3c35881adc170e4ba6daab1b702dff88933db9a6829a76b8f4a7c2a6d658117132a974f0a0b3a38ceea1efc2488da21905345909e1d859921dc2b5054f09bce8eeb91fa2fc6d048ce00b9cd655e6aafbdaa3a2f19270a16", - "ddf015b01b68c4f5f72c3145d54049867d99ee6bef24282abf0eecdb506e295bacf8f23ffa65a4cd891f76a046b9dd82cae43a8d01e18a8dff3b50aeb92672be69d7c087ec1fa2d3b2a39196ea5b49b7baede37a586fea71aded587f", - "6ee721f71ca4dd5c9ce7873c5c04c6ce76a2c824b984251c15535afc96adc9a4d48ca314bfeb6b8ee65092f14cf2a7ca9614e1dcf24c2a7f0f0c11207d3d8aed4af92873b56e8b9ba2fbd659c3f4ca90fa24f113f74a37181bf0fdf758", - "689bd150e65ac123612524f720f54def78c095eaab8a87b8bcc72b443408e3227f5c8e2bd5af9bcac684d497bc3e41b7a022c28fb5458b95e8dfa2e8caccde0492936ff1902476bb7b4ef2125b19aca2cd3384d922d9f36dddbcd96ae0d6", - "3a3c0ef066fa4390ec76ad6be1dc9c31ddf45fef43fbfa1f49b439caa2eb9f3042253a9853e96a9cf86b4f873785a5d2c5d3b05f6501bc876e09031188e05f48937bf3c9b667d14800db62437590b84ce96aa70bb5141ee2ea41b55a6fd944", - "741ce384e5e0edaebb136701ce38b3d33215415197758ae81235307a4115777d4dab23891db530c6d28f63a957428391421f742789a0e04c99c828373d9903b64dd57f26b3a38b67df829ae243feef731ead0abfca049924667fdec49d40f665", - "a513f450d66cd5a48a115aee862c65b26e836f35a5eb6894a80519e2cd96cc4cad8ed7eb922b4fc9bbc55c973089d627b1da9c3a95f6c019ef1d47143cc545b15e4244424be28199c51a5efc7234dcd94e72d229897c392af85f523c2633427825", - "71f1554d2d49bb7bd9e62e71fa049fb54a2c097032f61ebda669b3e1d4593962e47fc62a0ab5d85706aebd6a2f9a192c88aa1ee2f6a46710cf4af6d3c25b7e68ad5c3db23ac009c8f13625ff85dc8e50a9a1b2682d3329330b973ec8cbb7bb73b2bd", - "167cc1067bc08a8d2c1a0c10041ebe1fc327b37043f6bd8f1c63569e9d36ded58519e66b162f34b6d8f1107ef1e3de199d97b36b44141a1fc4f49b883f40507ff11f909a017869dc8a2357fc7336ae68703d25f75710b0ff5f9765321c0fa53a51675c", - "cb859b35dc70e264efaad2a809fea1e71cd4a3f924be3b5a13f8687a1166b538c40b2ad51d5c3e47b0de482497382673140f547068ff0b3b0fb7501209e1bf36082509ae85f60bb98fd02ac50d883a1a8daa704952d83c1f6da60c9624bc7c99912930bf", - "afb1f0c6b7125b04fa2578dd40f60cb411b35ebc7026c702e25b3f0ae3d4695d44cfdf37cb755691dd9c365edadf21ee44245620e6a24d4c2497135b37cd7ac67e3bd0aaee9f63f107746f9b88859ea902bc7d6895406aa2161f480cad56327d0a5bba2836", - "13e9c0522587460d90c7cb354604de8f1bf850e75b4b176bda92862d35ec810861f7d5e7ff6ba9302f2c2c8642ff8b7776a2f53665790f570fcef3cac069a90d50db42227331c4affb33d6c040d75b9aeafc9086eb83ced38bb02c759e95ba08c92b17031288", - "0549812d62d3ed497307673a4806a21060987a4dbbf43d352b9b170a29240954cf04bc3e1e250476e6800b79e843a8bd8253b7d743de01ab336e978d4bea384eaff700ce020691647411b10a60acacb6f8837fb08ad666b8dcc9eaa87ccb42aef6914a3f3bc30a", - "3a263efbe1f2d463f20526e1d0fd735035fd3f808925f058b32c4d8788aeeab9b8ce233b3c34894731cd73361f465bd350395aebcabd2fb63010298ca025d849c1fa3cd573309b74d7f824bbfe383f09db24bcc565f636b877333206a6ad70815c3bef5574c5fc1c", - "3c6a7d8a84ef7e3eaa812fc1eb8e85105467230d2c9e4562edbfd808f4d1ac15d16b786cc6a02959c2bc17149c2ce74c6f85ee5ef22a8a96b9be1f197cffd214c1ab02a06a9227f37cd432579f8c28ff2b5ac91cca8ffe6240932739d56788c354e92c591e1dd76499", - "b571859294b02af17541a0b5e899a5f67d6f5e36d38255bc417486e69240db56b09cf2607fbf4f95d085a779358a8a8b41f36503438c1860c8f361ce0f2783a08b21bd7232b50ca6d35428335272a5c05b436b2631d8d5c84d60e8040083768ce56a250727fb0579dd5c", - "98ee1b7269d2a0dd490ca38d447279870ea55326571a1b430adbb2cf65c492131136f504145df3ab113a13abfb72c33663266b8bc9c458db4bf5d7ef03e1d3b8a99d5de0c024be8fabc8dc4f5dac82a0342d8ed65c329e7018d6997e69e29a01350516c86beaf153da65ac", - "41c5c95f088df320d35269e5bf86d10248f17aec6776f0fe653f1c356aae409788c938befeb67c86d1c8870e8099ca0ce61a80fbb5a6654c44529368f70fc9b9c2f912f5092047d0ffc339577d24142300e34948e086f62e23ecaca410d24f8a36b5c8c5a80e0926bc8aa16a", - "9f93c41f533b2a82a4df893c78faaaa793c1506974ba2a604cd33101713ca4adfd30819ffd8403402b8d40aff78106f3357f3e2c24312c0d3603a17184d7b999fc9908d14d50192aebabd90d05073da7af4be37dd3d81c90acc80e8333df546f17ab6874f1ec204392d1c0571e", - "3da5207245ac270a915fc91cdb314e5a2577c4f8e269c4e701f0d7493ba716de79935918b917a2bd5db98050dbd1eb3894b65fac5abf13e075abebc011e651c03cafb6127147771a5c8418223e1548137a89206635c26ca9c235ccc108dc25cf846e4732444bd0c2782b197b262b", - "96011af3965bb941dc8f749932ea484eccb9ba94e34b39f24c1e80410f96ce1d4f6e0aa5be606def4f54301e930493d4b55d484d93ab9dd4dc2c9cfb79345363af31ad42f4bd1aa6c77b8afc9f0d551bef7570b13b927afe3e7ac4de7603a0876d5edb1ad9be05e9ee8b53941e8f59", - "51dbbf2a7ca224e524e3454fe82ddc901fafd2120fa8603bc343f129484e9600f688586e040566de0351d1693829045232d04ff31aa6b80125c763faab2a9b233313d931903dcfaba490538b06e4688a35886dc24cdd32a13875e6acf45454a8eb8a315ab95e608ad8b6a49aef0e299a", - "5a6a422529e22104681e8b18d64bc0463a45df19ae2633751c7aae412c250f8fb2cd5e1270d3d0cf009c8aa69688ccd4e2b6536f5747a5bc479b20c135bf4e89d33a26118705a614c6be7ecfe766932471ad4ba01c4f045b1abb5070f90ec78439a27a1788db9327d1c32f939e5fb1d5ba", - "5d26c983642093cb12ff0afabd87b7c56e211d01844ad6da3f623b9f20a0c968034299f2a65e6673530c5980a532beb831c7d0697d12760445986681076dfb6fae5f3a4d8f17a0db5008ce8619f566d2cfe4cf2a6d6f9c3664e3a48564a351c0b3c945c5ee24587521e4112c57e318be1b6a", - "52641dbc6e36be4d905d8d60311e303e8e859cc47901ce30d6f67f152343e3c4030e3a33463793c19effd81fb7c4d631a9479a7505a983a052b1e948ce093b30efa595fab3a00f4cef9a2f664ceeb07ec61719212d58966bca9f00a7d7a8cb4024cf6476bab7fbccee5fd4e7c3f5e2b2975aa2", - "a34ce135b37bf3db1c4aaa4878b4499bd2ee17b85578fcaf605d41e1826b45fdaa1b083d8235dc642787f11469a5493e36806504fe2a2063905e821475e2d5ee217057950370492f5024995e77b82aa51b4f5bd8ea24dc71e0a8a640b0592c0d80c24a726169cf0a10b40944747113d03b52708c", - "46b3cdf4946e15a5334fc3244d6680f5fc132afa67bf43bfade23d0c9e0ec64e7dab76faaeca1870c05f96b7d019411d8b0873d9fed04fa5057c039d5949a4d592827f619471359d6171691cfa8a5d7cb07ef2804f6ccad4821c56d4988bea7765f660f09ef87405f0a80bcf8559efa111f2a0b419", - "8b9fc21691477f11252fca050b121c5334eb4280aa11659e267297de1fec2b2294c7ccee9b59a149b9930b08bd320d3943130930a7d931b71d2f10234f4480c67f1de883d9894ada5ed5071660e221d78ae402f1f05af47761e13fec979f2671e3c63fb0ae7aa1327cf9b8313adab90794a52686bbc4", - "cd6598924ce847de7ff45b20ac940aa6292a8a99b56a74eddc24f2cfb45797188614a21d4e8867e23ff75afd7cd324248d58fcf1ddc73fbd115dfa8c09e62022fab540a59f87c989c12a86ded05130939f00cd2f3b512963dfe0289f0e54acad881c1027d2a0292138fdee902d67d9669c0ca1034a9456", - "594e1cd7337248704e691854af0fdb021067ddf7832b049ba7b684438c32b029eded2df2c89a6ff5f2f2c311522ae2dc6db5a815afc60637b15ec24ef9541f1550409db2a006da3affffe548a1eaee7bd114e9b805d0756c8e90c4dc33cb05226bc2b393b18d953f8730d4c7ae693159cdba758ad28964e2", - "1f0d292453f04406ada8be4c161b82e3cdd69099a8637659e0ee40b8f6da46005cfc6085db9804852decfbe9f7b4dda019a7112612895a144ed430a960c8b2f5458d3d56b7f427cee6358915aee7146278aed2a0296cdd929e4d21ef95a3adf8b7a6beba673cdccdbdcfb2474711732d972ad054b2dc64f38d", - "b65a72d4e1f9f9f75911cc46ad0806b9b18c87d105332a3fe183f45f063a746c892dc6c4b9181b1485b3e3a2cc3b453eba2d4c39d6905a774ed3fb755468beb190925ecd8e57ecb0d985125741650c6b6a1b2a3a50e93e3892c21d47ed5884eed83aa94e1602288f2f49fe286624de9d01fcb54433a0dc4ad70b", - "705ce0ffa469250782aff725248fc88fe98eb76659e8407edc1c4842c9867d61fe64fb86f74e980598b92bc213d06f337bd5654fc28643c7ba769a4c31563427543c00808b627a19c90d86c322f33566ce020121cc322229c3337943d46f68ef939d613dcef0077269f88151d6398b6b009abb763410b154ad76a3", - "7fa881ce87498440ab6af13854f0d851a7e0404de33896999a9b3292a5d2f5b3ad033530c558168fe5d2fdb9b89a2354c46cf32a0e612afc6c6485d789511bfef26800c74bf1a4cfbe30bda310d5f6029c3dccdedb6149e4971274e276dccfabd63bc4b9955e8303feb57f8a688db55ecb4b33d1f9fe1b3a8ba7ac32", - "23a98f71c01c0408ae16843dc03be7db0aeaf055f951709d4e0dfdf64fffbffaf900ee592ee10929648e56f6c1e9f5be5793f7df66453eb56502c7c56c0f0c88da77abc8fa371e434104627ef7c663c49f40998dbad63fa6c7aa4fac17ae138d8bbe081f9bd168cd33c1fbc92fa35ed687679f48a64b87db1fe5bae675", - "7b8970b6a33237e5a7bcb39272703edb92285c55842b30b9a48834b1b507cc02a6764739f2f7ee6ae02a7b715a1c455e59e8c77a1ae98abb10161853f1234d20da99016588cd8602d6b7ec7e177d4011edfa61e6b3766a3c6f8d6e9eac893c568903eb6e6aba9c4725774f6b4343b7acaa6c031593a36eef6c72806ff309", - "f7f4d328ba108b7b1de4443e889a985ed52f485f3ca4e0c246aa5526590cbed344e9f4fe53e4eea0e761c82324649206ca8c2b45152157d4115e68c818644b03b65bb47ad79f94d37cb03c1d953b74c2b8adfa0e1c418bda9c518ddcd7050e0f149044740a2b16479413b63fc13c36144f80c73687513dca761ba8642a8ae0", - "2d7dc80c19a1d12d5fe3963569547a5d1d3e821e6f06c5d5e2c09401f946c9f7e13cd019f2f9a878b62dd850453b6294b99ccaa068e542993524b0f63832d48e865be31e8ec1ee103c718340c904b32efb69170b67f038d50a3252794b1b4076c0620621ab3d91215d55ffea99f23d54e161a90d8d4902fda5931d9f6a27146a", - "77dff4c7ad30c954338c4b23639dae4b275086cbe654d401a2343528065e4c9f1f2eca22aa025d49ca823e76fdbb35df78b1e5075ff2c82b680bca385c6d57f7ea7d1030bb392527b25dd73e9eeff97bea397cf3b9dda0c817a9c870ed12c006cc054968c64000e0da874e9b7d7d621b0679866912243ea096c7b38a1344e98f74", - "83bed0d556798f2b419f7056e6d3ffada06e939b95a688d0ec8c6ac5ea45ab73a4cf01043e0a170766e21395f27ab4b78c435f5f0dfe6e93ab80df38610e41158429ddf20296f53a06a017723359fe22dc08b5da33f0800a4fe50118e8d7eab2f83a85cd764bf8a166903bd0e9dcfeeceba44ff4ca4439846458d31ea2bb564645d1", - "ea12cf5a113543e39504123036f15a5bafa9c555562469f99cd29996a4dfaaab2a34b00557ccf15f37fc0cc1b3be427e725f2cd952e50af7970dda9200cd5ce252b1f29c40067fea3027ed686190803b59d834179d1b8f5b55abe55ad174b2a1188f7753ec0ae2fc01316e7d498b68ee3598a0e9baaaa664a60f7fb4f90edbed494ad7", - "55266358332d8d9e68bd13432088beadf95833aab67a0eb3b10650414255f299e2670c3e1a5b2976159a46c72a7ce57d59b7be14c15798e09ed50fa312a431b0264d7a1396aa6168bde897e208ece53d2cfc83786113b1e6eac5e9bb98984abb6c8d64eebb991903254abc650c999bb9958a5d7937434b869bc940e21b9dc1cc8982f2ba", - "4d6104ded730aefe02873f4c741232c8234a6d66d85393aff57fbf56ba6347666988dfc4d58f3cc895a0da598822edeee4533d24ec0ee292fd5e1ad04898ffbc1ff4bef14dec220babcb0f28fffe32a6e2c28aaaac16442bf4feb02917d18bb3a415d84fa9358d5a9852688d846c92271911f934181c30f82434d915f93f155a1ffbf0b125", - "eb5f579a4c476af554aac11e5719d378549497e613b35a929d6f36bb8831d7a466aa76de9be24ebb55543f1c13924f64cfd648a5b3fa90387315c16174dbf1e9a183c196d9bb8f84af65f1f8212429aadc11ef2426d07d4716062b85c8d5d2dff8e21b9e62b7fa7dbd57d72633054b464fb28583a56ca13ccc5ddc74dae942492f31731e7046", - "ebddec3dcaf18063e45a76ebeac39af85a1adc2818881ccce48c106288f5988365cca2b4b1d7f037322da46840f42bebdcbc7193838d426e101087d8cea03aaff743d573eb4f4e9a71a2c884390769a6503874125d194bee8d46a3a0d5e4fcf28ff8465887d8e9df771d70157e75df3642b331d2778ceb32ceba868640171ab7a5d22eede1ee44", - "26d87ec70b57691e3bb359633d3ddba17f029d62cdfe977f5fd42274d79b444a32494d1c01e9f72d03cce78c806df96e93ea78da3a054209924ed765edc4d570f66168dc25ee3114e4017e387440349c8f0a94804761c3055f88e4fda2a49b860b1486a9609095f6250f268b6a4d1aecc03a505632ebf0b9dc22d0755a736faf7ad7000858b5864b", - "3880f5cc2d08fa70ef44b1f263fcf534d062a298c1bd5ee2eee8c3265806c4ce50b004f3a1fc1fa5b024aaac7f528c023c8181f67c6e1c357425dc4d573bd46b93a542afa3a19bdb140a2ce666e1a01f5c4d2dcd681fa9f5839b797813c394738d5ee4971386c12c7c117d17c7bec324b760aa30cda9ab2aa850284ba6fa97946f710f02449d1883c6", - "3317d2f452105dd3f4a96f9257af8285a80be58066b50f6f54bd633749b49f6ab9d57d45652d2ae852a2f6940cd5ec3159dd7f333358b12f502325df38843508faf7e246352d201280babd90b14fbf7722641c3601d0e458474439973c611bb5502fd0eb3078f87124ca7e1a016fcb6cfeff65f6a565985aca7122cfa8c5a11da0cb47797c5132333179", - "f2c5c955d0224e784a46b9125f8fef8a5e1271e145eb08bbbd07ca8e1cfc848cef14fa3b36221ac62006403dbb7f7d77958ccc54a8566c837858b809f3e310ace8ca682515bc655d2a397cab238a663b464d511f02dc5d033dad4cb5e0e519e94a54b62a3896e460ec70e5716b5921bf8396aa86a60123e6287e34570bb01bdc602e113670bf498af2ff10", - "180e275205691a83630cf4b0c7b80e6df8fad6ef1c23ba8013d2f09aef7abade1827f23af230de90676240b4b3b0673f8afdea0327330055041741f65560d90348de696d34ca80dfe8afae582fe4879d4594b80e9408fb53e800e01ca58552b905c365e7f1416e51c080f517d6bbd30e64ae1535d59decdc76c6624d737868f49f2f719da39ba1344d59eab9", - "c517a84e4631a7f65ace170d1e5c2fdb259841535d88da323e68c0883e6af7b041cfe05908815a5a9d1b14fa712c2c16fadcf1ca54d3aa954d411240df331b2aebdfb65aced84d0b8aace56ec0aa7c13ec7d75ca883b6bcf6db74c9e98463c484a8262684f29910373430651f90ecffe18b072170e61ee58de20e2a6ff67b3ab00fccbb80af943f20b56b98107", - "d1a56a5ee990e02b84b5862fde62f69ec07567be2d7ccb769a461c4989d11fdda6c945d942fb8b2da795ed97e43a5b7dbdde7f8fd2ff7154544336d5c50fb7380341e660d4898c7fbc39b2b782f28defac6873523c7c1de8e52c65e4395c686ba483c35a220b0416d46357a063fa4c33fa9c52d5c207a1304ae141c791e62ba6a7374ed922b8dd94079b72b69302", - "4720b88d6bfb1ab43958e26827730d852d9ec30173ebd0fe0d273edcece2e788558984cd9306fe5978086a5cb6d37975755d2a3daeb16f99a8a11544b8247a8b7ed5587afc5bea1daf85dcea5703c5905cf56ae7cc76408ccabb8fcc25cacc5ff456db3f62fa559c45b9c71505eb5073df1f10fc4c9060843f0cd68bbb4e8edfb48d0fd81d9c21e53b28a2aae4f7ba", - "f4639b511db9e092823d47d2947efacbaae0e5b912dec3b284d2350b9262f3a51796a0cd9f8bc5a65879d6578ec24a060e293100c2e12ad82d5b2a0e9d22965858030e7cdf2ab3562bfa8ac084c6e8237aa22f54b94c4e92d69f22169ced6c85a293f5e16bfc326153bf629cdd6393675c6627cd949cd367eef02e0f54779f4d5210197698e4754a5fe490a3a7521c1c", - "3d9e7a860a718565e3670c29079ce80e381969fea91017cfd5952e0d8a4a79bb08e2cd1e26161f30ee03a24891d1bfa8c212861b51618d07429fb48000ff87ef09c6fca526567777e9c076d58a642d5c521b1caa5fb0fb3a4b8982dc14a444732b72b239b8f01fc8ba8ee86b3013b5d3e98a92b2aeaecd4879fca5d5e9e0bd880dbfffa6f96f94f3998812aac6a714f331", - "4d9bf551d7fd531e7482e2ec875c0651b0bcc6caa738f7497befd11e67ae0e036c9d7ae4301cc3c7906f0d0e1ed4738753f414f9b3cd9b8a71176e325c4c74ce020680ecbfb146889597f5b40487e93f974cd866817fb9fb24c7c7c16177e6e120bfe349e83aa82ba40e59e917565788658a2b254f25cf99bc65070b3794cea2259eb10e42bb54852cba3110baa773dcd70c", - "b91f65ab5bc059bfa5b43b6ebae243b1c46826f3da061338b5af02b2da76bb5ebad2b426de3c3134a633499c7c36a120369727cb48a0c6cbab0acecdda137057159aa117a5d687c4286868f561a272e0c18966b2fec3e55d75abea818ce2d339e26adc005c2658493fe06271ad0cc33fcb25065e6a2a286af45a518aee5e2532f81ec9256f93ff2d0d41c9b9a2efdb1a2af899", - "736f6e387acb9acbee026a6080f8a9eb8dbb5d7c54ac7053ce75dd184b2cb7b942e22a3497419ddb3a04cf9e4eb9340a1a6f9474c06ee1dcfc8513979fee1fc4768087617fd424f4d65f54782c787a1d2de6efc81534343e855f20b3f3589027a5436201eee747d45b9b8375e4294d72ab6a52e04dfbb2914db92ee58f134b026527ed52d4f794459e02a43a17b0d51ea69bd7f3", - "9242d3eb31d26d923b99d66954cfade94f25a18912e6356810b63b971ae74bb53bc58b3c01424208ea1e0b1499936daea27e63d904f9ed65fdf69de40780a3027b2e89d94bdf214f585472613ce328f628f4f0d56217dfb53db5f7a07f54c8d71db16e27de7cdb8d23988837b49b65c12f1771d979e8b192c9f4a16b8d9fba917bcf74ce5a82aac2075608ba6c2d485fa59864b9de", - "5da68704f4b592d41f08aca08f62d85e2e2466e5f3be010315d11d113db674c4b98764a509a2f5aacc7ae72c9deff2bcc42810b47f64d429b35745b9efff0b18c58653461e968aaa3c2c7fc455bc5771a8f10cd184be831040df767201ab8d32cb9a58c89afbebecb524502c9b940c1b838f8361bbcde90d272715017f67609ea39b20fac985332d82daaa023999e3f8bfa5f3758bb8", - "71ea2af9c8ac2e5ae44a176662882e01027ca3cdb41ec2c6785606a07d7231cd4a2bded7155c2feef3d44d8fd42afa73265cef826f6e03aa761c5c51d5b1f129ddc27503ff50d9c2d748322df4b13dd5cdc7d46381528ab22b79b0049011e4d2e57fe2735e0d58d8d56e92c75dbeac8c76c4239d7f3f24fb56697593b3e4afa6671d5bbc96c079a1c154fe20212ade67b05d49ceaa7a84", - "1d133170582fa4bff59a21953ebbc01bc202d43cd79c083d1f5c02fa15a43a0f519e36acb710bdabac880f04bc003800641c2487930de9c03c0e0deb347fa815efca0a38c6c5de694db698743bc955581f6a945deec4ae988ef7cdf40498b77796ddea3fae0ea844891ab751c7ee20917c5a4af53cd4ebd82170078f41ada2795e6eea17593fa90cbf5290a1095e299fc7f507f360f187cd", - "5ec4ac45d48fc15c72471d795066bdf8e99a483d5fdd599511b9cdc408de7c0616491b73924d0266da34a495331a935c4b8884f57d7ad8cce4cbe586875aa52482215ed39d7626cce55d50349c7767981c8bd6890f132a196184247343566fc972b86fe3c5369d6a6519e9f07942f0522b77ad01c751dcf7defe31e471a0ec00963765dd8518144a3b8c3c978ad108056516a25dbe3092e73c", - "0d5e74b78290c689f2b3cfea45fc9b6a84c822639cd438a7f05c07c374adced42cdc12d2a9233a4ffe80307efc1ac13cb04300e165f8d90dd01c0ea955e7657332c6e86ad6b43e78ba4c13c675aed83192d8427866fb6484e6a3071b2369a46fba9005f31232da7ffec7952f831aaaddf63e225263531c2cf387f8cc14fa856c8795137142c3a52ffa69b8e30ebc88ce3bbc227597bcc8dddd89", - "a0fe36f983259921dc2fa7d89002b3066241d63bfc2448caf7e10522a35562be0bfedc3dce49cfce2e614a04d4c64cfc0ab898873a7fc26928dc1927c009d12f6f9b7a278205d3d0057604f4ac746f8b9287c3bc6b929832bf253b6586192ac43fdd29ba585dbd9059aab9c6ff6000a7867c67fec1457b733f6b620881166b8fed92bc8d84f0426002e7be7fcd6ee0abf3755e2babfe5636ca0b37", - "1d29b6d8eca793bb801becf90b7d7de215b17618ec32340da4bac707cdbb58b951d5036ec02e105d83b5960e2a72002d19b7fa8e1128cc7c5049ed1f76b82a59eac6ed09e56eb73d9ade38a6739f0e07155afa6ec0d9f5cf13c4b30f5f9a465b162a9c3ba04b5a0b3363c2a63f13f2a3b57c590ec6aa7f64f4dcf7f1582d0ca157eb3b3e53b20e306b1f24e9bda87397d413f01b453ceffeca1fb1e7", - "6a2860c110cd0fc5a19bcaafcd30762ee10242d34739638e716bd89fd537ea4dc630e6f85d1bd88a25ad3892ca554c232c9830bd56980c9f08d378d28f7fa6fa7df4fcbf6ad98b1adfff3ec1f63310e50f920c99a5200b8e64c2c2ca249399a149942261f737d5d72da949e914c024d57c4b639cb89990fed2b38a37e5bcd24d17ca12dfcd36ce04691fd03c32f6ed5de2a2191ed7c826375ba81f78d0", - "7132aa291ddc9210c60dbe7eb3c19f9053f2dd74742cf57fdc5df98312adbf4710a73245de4a0c3b24e21ab8b466a77ae29d15500d5142555ef3088cbccbe685ed9119a10755148f0b9f0dbcf02b2b9bcadc8517c88346ea4e78285e9cbab122f824cc18faf53b742a87c008bb6aa47eed8e1c8709b8c2b9adb4cc4f07fb423e5830a8e503ab4f7945a2a02ab0a019b65d4fd71dc364d07bdc6e637990e3", - "3e664da330f2c6007bff0d5101d88288aaacd3c07913c09e871cce16e55a39fde1ce4db6b8379977c46cce08983ca686778afe0a77a41baf447854b9aa286c398c2b83c95a127b053101b6799c1638e5efd67273b2618df6ec0b96d8d040e8c1ee01a99b9b5c8fe63fea2f749e6c90d31f6fae4e1469ac09884c4fe1a8539acb313f42c941224a0e79c059e18affc2bcb6724975c436f7bf949ebdd8aef51c", - "7a6ea63a271eb49470f5ce77519ed61ae9b2f1be07a96855726bc3df1d0723af3a703fdfc2e739c9d31d25814daf661a23558b50982e66ee37ad880f5c8f11c8130fac8a5d0250583700d5a324894fae6d61993f6bf9327214f8674649f355b23fd634940b2c467973a839e659169c773119919f5b81ee171edb2e5f6940d7551f9e5a70625d9ea88711ad0ed8ab2da720ad358bef954456cb2d5636425717c2", - "c5106bbda114168c449172e49590c7eeb827fa4e1a2a7a87a3c1f721a9047d0c0a50fbf244731be1b7eb1a2ef30f5ae846a9f38f0df44f32af61b68dbdcd0226e741dfb6ef81a2503691af5e4b3171f48c59ba4ef91eba344b5b697f261df7bbbb734ca6e6daebaa4a179feb17002823281b8534d55a6531c59305f6e3fd3fa63b747bcf0deb654c392a02fe687a269effb1238f38bcaea6b208b221c45fe7fbe7", - "597716a5ebeebc4bf524c15518816f0b5dcda39cc833c3d66b6368ce39f3fd02ceba8d12072bfe6137c68d3acd50c849873150928b320b4fbc31c1456679ea1d0acaeeabf666d1f1bad3e6b9312c5cbdecf9b799d3e30b0316bed5f41245107b693366accc8b2bcef2a6be54209ffabc0bb6f93377abdcd57d1b25a89e046f16d8fd00f99d1c0cd247aafa72234386ae484510c084ee609f08aad32a005a0a5710cb", - "0771ffe789f4135704b6970b617bae41666bc9a6939d47bd04282e140d5a861c44cf05e0aa57190f5b02e298f1431265a365d29e3127d6fccd86ec0df600e26bcdda2d8f487d2e4b38fbb20f1667591f9b5730930788f2691b9ee1564829d1ada15fffc53e785e0c5e5dd11705a5a71e390ca66f4a592785be188fefe89b4bd085b2024b22a210cb7f4a71c2ad215f082ec63746c7367c22aedb5601f513d9f1ffc1f3", - "be6556c94313739c115895a7bad2b620c0708e24f0390daa55521c31d2c6782acf41156271238885c367a57c72b4fe999c160e804ad58d8e565edbce14a2dd90e443eb80626b3eab9d7ab75d6f8a062d7ca89b7af8eb292c98eaf87ad1dfd0db103d1bb6188bd7e7a63502153cf3ce23d43b60c5782602bac8ad92fb2324f5a79453898c5de18415639ecc5c7974d3077f76fc1df5b956723bb19a624d7ea3ec13ba3d86", - "4bc33729f14cd2f1dc2ff459abee8f6860dda1062845e4adab78b53c835d106bdfa35dd9e77219eaef403d4e80488ca6bd1c93dd76ef9d543fbb7c8904dccc5f71509a6214f73d0f4e467c3e038ea639b29e7fc442ee29f57117740576188ada15a739827c647a46b0271817ab235c023c30c90f2115e5c90cd8501e7b286962fc66ffc3fe7e8978746168314908a41998bd83a1eeffda9d714b864f4d490fdeb9c7a6edfa", - "ab12faea205b3d3a803cf6cb32b9698c32301a1e7f7c6c23a20174c95e98b7c3cfe93fffb3c970face8f5751312a261741141b948d777b8a2ea286fe69fc8ac84d34116a4674bb09a1a0b6af90a748e511749de4697908f4acb22be08e96ebc58ab1690acf73914286c198a2b57f1dd70ea8a52325d3045b8bdfe9a09792521526b7564a2a5fcd01e291f1f8894017ce7d3e8a5dba15332fb410fcfc8d62195a48a9e7c86fc4", - "7d421e59a567af70594757a49809a9c22e07fe14061090b9a041875bb77933deae36c823a9b47044fa0599187c75426b6b5ed94982ab1af7882d9e952eca399ee80a8903c4bc8ebe7a0fb035b6b26a2a013536e57fa9c94b16f8c2753c9dd79fb568f638966b06da81ce87cd77ac0793b7a36c45b8687c995bf4414d28289dbee977e77bf05d931b4feaa359a397ca41be529910077c8d498e0e8fb06e8e660cc6ebf07b77a02f", - "0c18ab727725d62fd3a2714b7185c09faca130438eff1675b38beca7f93a6962d7b98cb300ea33067a2035cdd694348784aa2eda2f16c731eca119a050d3b3ce7d5c0fd6c234354a1da98c0642451922f670984d035f8c6f35031d6188bbeb31a95e99e21b26f6eb5e2af3c7f8eea426357b3b5f83e0029f4c4732bca366c9aa625748297f039327c276cd8d9c9bf692a47af098aa50ca97b99961bef8bc2a7a802e0b8cfdb84319", - "92d5909d18a8b2b9971cd1627b461e98a74ba377186a6a9df5bd133635250b300abccb2254cacb775df6d99f7c7d0952653c28e6909b9f9a45adce691f7adc1afffcd9b06e49f775364cc2c62825b9c1a86089080e26b57e732aac98d80d009bfe50df01b95205aa07ed8ec5c873da3b92d00d53af825aa64b3c634c5ece40bff152c331222d3453fd92e0ca17cef19ecb96a6eed4961b627aca48b12fecd091754f770d52ba861546", - "802f22e4a388e874927fef24c797408254e03910bab5bf372320207f8067f2b1ea543917d4a27df89f5bf936ba12e04302bde23119533d0976beca9e20cc16b4dbf17a2ddc44b66aba76c61ad59d5e90de02a88327ead0a8b75463a1a68e307a6e2e53ecc1986274b9ee80bc9f3140671d5285bc5fb57b281042a8978a1175900c6073fd7bd740122956602c1aa773dd2896674d0a6beab24454b107f7c847acb31a0d332b4dfc5e3f2f", - "3844fe65db11c92fb90bf15e2e0cd216b5b5be91604baf3b84a0ca480e41ecfaca3709b32f8c6e8761406a635b88eec91e075c48799a16ca08f295d9766d74475c47f3f2a274eae8a6ee1d191a7f37ee413a4bf42cad52acd5564a651715ae42ac2cddd52f819c692ecdef52ecb763270322cdca7bd5aef71428fa73e844568b96b43c89bf1ed42a0abf209ffad0eeec286c6f141e8af073ba4adfbbdeda253752ae36c9957dfc905b4c49", - "329377f7bf3c8d74991a7d61b0cf39baff5d485d79751b0d5ad017d23bec570fb19810105bab79ab5acb102ab972165224d4ec888ec7de5148077fa9c1bb6820e0d91ae4e2591a21fec2f820606ce4bafc1e377f8dc3a5bd1a9e2772a57abccd0b757164d768872c91d02789545ab5b203f688d71dd08522a3fd2f5bcd7df507aebf1ca27ddff0a82afb7aa9c180008f49d1325adf97d047e77238fc75f56356de4e87d8c961575c9f6362c9", - "f7f269929b0d71ea8eef7120e55ccba691c582dd534692abef35c0fe9dec7dae973cd9702e5ad420d278fe0e653fdcb22fdcb63148109ec7e94f2d0750b28157dd1764376ae10fdb0a4aef3b304bd82793e0595f941226a2d72abbc929f53134dc495b0d65ced409914f94c2523f3dfbbdeeac84ae247ab5d1b9ea33dce1a808885a55be1f3683b46f4be73d9b62eec2585f690056858dfc427aabf591cd276724885bcd4c00b93bb51fb7484d", - "ac022309aa2c4d7fb628255b8b7fb4c3e3ae64b1cb65e0de711a6def1653d95d8088871cb8905fe8ae76423604988a8f77589f3f776dc1e4b30dbe9dd262b2187db02518a132d219bd1a06ebac13132b5164b6c420b37dd2ccee7d69b3b7fa12e54f0a53b853d490a68379ea1fa2d79762830ffb71bf86aab506b51f85c4b6a41b69325c7d0c7aa85b93b7144489d213e8f33dbb879fce22849865337b620b155cb2d2d36a68832889e30194d36d", - "d009c2b78a8f02e5e5dbb586ef71fc324b375092e15913ca1a5bfd22d516baadb96867bee3562e77c4a4852344a1a76c30728be5e22400b4cc41711f66754c246a520498d8c24f0205b9c873748dbeb67fe1ad099ad04cf89f4b517f0aa481136d9f6de2d727df01c6aa4099da59d4382b51e25fd47c33d9842c32b62331e50794bfe8b61b3ba9de1b8b704779c6d65edff3af00f121ab4a7ea384edabe47c6d0098a48991f387ca4444135ec59d46", - "c00bab36cce69899817d1425016d222d7303197ed3e3fdcac744705e7f178a1ac745968900f69299163e19b3161f3e0a4cc55aa2e4e71e0ee6ac427d1f4d14e063f68d303ddfbb18118335cfa7a6a90d99c38319ee76f7a884846a9e0b68030bf28e78bfbd56359b9368842814da42b04cb0e307d5d846dc22f049147bae31b9a956d17676a8cc348dafa3cabc2007a30e730e3894dddf9999fb8819086311f0703e141613ed6dcd7af8510e2dc435b0", - "c9789152a9fc29698d49ed95f09bd11b75f18a8c5615a73dbe54ae5e550027fd0ae6a8b60667040c1b12de3d1ee3f6bf061c78c951a3210effc912e19f482dd4de152063c588c44903bc11761706fd935afa040df085b08144d83d0dde32b46ab52f4fae98ac116c7ff11d7f553450c2e37b9c5f0b1dd9e0b8640a24cba6f2a5246c41f197f46e3dc8a29131c79bef3351c6e277a0a34442274d546ccd058891277473d668420f121750d19cd684267405", - "06a15a0731ce52557e368bcbaa11ef3399299e36fb9f2eda6e5726907c1d29c5c6fc581405ba48c7e2e522206a8f128d7c1c939d1132a00bd7d6366aa82724e968964eb2e373563f607dfa649590dcf5589114df69da5547fef8d1604cc4c6de1ed5783c8746918a4dd31168d6bc8784cd0c769206bd803d6ca8557b66748770402b075ef44b38157d4c0da7c6281725a2065d087b1f7b23455fa673bdeeba45b983311c44eabe9ef4b7bde3420ae9881863", - "d08aacef2d7a41aec09473bd8a44f628e15addb7b9e5b77a1e09c8ab4942f379a0bfcb324d580b774666f18ae78dd36710824ff12393f059068fe4b559c53662c2b0e6c69e23785c8f32554e837ec1714bee902e60737b639dd933af4f68cb9d7de77e1f3b28e5b122891afce62b79acd5b1ab4ba411662cc77d806449e69c5a45a143b742d98ac84a0826d68433b9b700ace6cd472ba2d58a90847f42ce9c43f38ffc017db4bf40450b2eee1f4594dc740c0f", - "6a6058b0a498b7ea76a93c646eb9b8629f0cba4a0c726420c5f67ba9b0412cade356abdf0a4fb94384bad32ce0d5dd9e23dcaae1d6f28ff8683616b30f1392890c67b3a2c04b360893b801f127e527e4da82e239f4c878da13f4a4f1c76db07190e77ec123995168102fb274434a2d1e12913b9b5cbab4aacaad2bd89d88b3ca2b8e60dacf7c22c9379097ff60880f552e320ca3b571994f52534470feee2b39e0dadb5cd88257a3e459a4cc6f12f17b8d54e1bb", - "adeced01fc5671531cbb45679f5ddd42b3a95151677b6125aaf6f5e8f82fbabaa5ecf7c3552c2458587224f0042870f178f5fca5465250e75d71352e652eeed23cdb7f915f5ebb44099b6db116ca1be45530ac8ed32b7f161d60ed4397ad3d7d649ae6bf75ca5bec891d8e595605be9764f3a03965e1fe0eaffbf212e3df4f0fa35e08ff9d0091e6d4ac4748edfe43b611085a6ffec163014655fdd839fd9e81b63b1fa8cae4ec335ec343289758e389a79ceedfae", - "d014592f3a83ba40af366f137c674724916c3cdd3f6cf9d4c5c7c8d6d51ebf26e315e2c12b3546be56fb52382904046ecbd2f5b883aa4ff473de6f0c26ab862c3fa34bf3d880cc1911ce39a4088c6617c179dc5faf68a2c488bbde12d67b50f73abcfab0e3b062e68c95363e11f5f1de8ec36ed01ea21442518089045df67d346135283ad5b3fff80cf57f20876849f6db9fa139728358415a90610f69ec720fc92d8234e3e122551e9df2c644c4a2c4e3734d07de8e", - "c0d0c37838873ba8757d6e41b409605043bc1635edcd731219587676d94217e9f0ab44b71de25000661ce7303b7015f45e6eaa7b7ebef92b8f4a34c902c908d2172185505fa33aca5a41be83079316cdfdd430fc2c45f505f85d867e6d516f7e1bf19c001d9f43018968aab65ec031b3801399231c83ec9e622dab5629922a6b424cab938c135ff7310501c2c02971bfd2f577e25904d1a618baf0859f77f4e8b1d0cde9544e95ec52ff710c0672fdb3d891feeea2b017", - "7022e7f00902219ba97baa0e940e8ac7727f58955aa068c29680fac4a16bcd812c03eeb5adbcfe867a7f7c6b5d89f4641adb9173b76a1a8438866f9b4f640ce2aedf5f1080c890bcf515b4be4e3e512352f1e5323c62ec46cb73f3d71be8235fee55a154763f7c3f9aeb61ffd28f4cd93d3310f608e2133586bf1ab3f102de96f64c68a4668de8acb2a76a7ce0cddddc8fa3df5e9d230823da16ed9ebb402d36e38e6e018795e5a71517ecab5f9ca472b9ced8ff69d2d195", - "acaf4baf3681ab865ab9abfae41697141ead9d5e98523c2e0e1eeb6373dd15405242a3393611e19b693cabaa4e45ac866cc66663a6e898dc73095a4132d43fb78ff7166724f06562fc6c546c78f2d5087467fcfb780478ec871ac38d9516c2f62bdb66c00218747e959b24f1f1795fafe39ee4109a1f84e3f82e96436a3f8e2c74ef1a665b0daaa459c7a80757b52c905e2fb4e30c4a3f882e87bce35d70e2925a1671205c28c89886a49e045e31434abaab4a7aed077ff22c", - "84cb6ec8a2da4f6c3b15edf77f9af9e44e13d67acc17b24bd4c7a33980f37050c0301ba3aa15ad92efe842cd3ebd3636cf945bb1f199fe0682037b9dacf86f162dadabfa625239c37f8b8db9901df0e618ff56fa62a57499f7ba83baebc085eaf3dda850835520344a67e09419368d81012168e5de5ea45158397af9a5c6a1657b26f319b66f816cd2c28996547d697e8df2bb163ccb9dda4d6691dffd102a13667ab9cde60ffbfb872187d9c425a7f67c1d9fffff9276ed0aeb", - "6a52c9bbbba454c14540b2be58230d78ecbeb391646a0c6fcce2f789086a78364b81ae85d5396d7cfa8b46bda41e3083ec5cf7b4c47dc601c8a697df52f557defca248506dbebab25657f5a561d09625b7f4b2f0119a12beeac087efc9d350a735c35d2431c1da7dda99befb17f41a3dc4da0f00bb95366be128538ce27763d81f832fe3c1d4efc07b5b08ad8dc9e65fb5e48546664e18cb2d3bb3fe1f56fa7aae718c5e3bbdeaf70e15023f6a25b72a2d177fcfd04211d40664fe", - "c3c4d3b31f1f5f9538923df3478c84fffaef411520a542da9a220ee4132eabb9d718b5076fb2f985485e8ba058330aed27ddfd3afa3db34aa60301088caec3d0053828c0c2bc87e2e61db5ea5a29f62fdad9c8b5fc5063ec4ee865e5b2e35fac0c7a835d5f57a1b1079833c25fc38fcb14311c54f8a3bd251bca19342d69e5785f9c2e43cf189d421c76c8e8db925d70fa0fae5ee3a28c4047c23a2b8a167ce53f35ced33bec822b88b06f41558c47d4fed1bfa3e21eb060df4d8ba1", - "8d55e92136992ba23856c1aea109766fc44772477efc932b3194af2265e433ed77d63b44d2a1cff2e8680eff120a430fe012f0f09c6201d546e13ad46fc4ce910eab27bb1569879abed2d9c37fae9f1267c2216ec5debcb20d4de58461a621e6ce8946899de81c0add44d35e27b7982a97f2a5e6314901caebe41dbba35f48bc9244ca6dca2bdde7306435892f287036df088633a070c2e385815ab3e2bfc1a47c05a5b9fe0e80dd6e38e4713a70c8f82bd32475eea8400c7bc67f59cf", - "5016284e20362610fa05ca9d789cad25f6d43263787e7e085476764ce4a8908ce99b262b375e9d106170b1bec1f473d5e777e0c1896533040e39c8c1465e07907ef5860e14e4d8310013e35f12090e0bfc687474b1f15f3dd2033a0edac5246102da4deec7e188c3517d84d9c2a0a4497a4c5f82a30f1ba009e45ee6eb3ab4368c720ea6feee428ffd2c4cc52debb8d634a64176572c72368f94a66689f23f8a01218f532117af5a8060d140e7ca435a92882fcb5630ebe14a4805f1dc83", - "05456ec59b8d41bbd736727976b96b38c43827f9e16169be673ff37870c2ecd5f0d1ea1a136be4cc7b047a02a4421d484fd2a12ece418e42ee391a13a0b1df5a0162b29ab70d3fe3e04ba6ab26b37d62b7cf05a5e2f033611bf970b8e1f30e198e483e740fa9618c1e8677e07b61296b94a9787a68fba622d7653b5568f4a8628025939b0f74389ea8fced6098c065bf2a869fd8e07d705eadb53006be2abb716a3114ceb0236d7e916f037cb954cf977720855d12be76d900ca124a2a66bb", - "eb6f60b83fcee77060ff346aaf6ec34d82a8af469947d3b5074cde8eb26566eb1fa039bcc707738df1e95869bd827c246e88436f0614d9834ead5392ef376105c4a9f370071cdeaaff6ca0f18b74c3a48d19a717253c49bd9009ccbfdd5728a08b7d112a2ed8dbafbbb46d7a75dc9a05e09bfde1a0a92d74a51887f9d123d7896e9f9d0057b660ed7d55454c069d3c5260411db4cdc67e7b74f680d7ac4b9dcc2f8baf72e15e6b3cafebcdf449a6436ed2c398b675f79c644747c57553bf7ea2", - "187a88e88514f6c4157c1ba40b442baae1ae563a6c989277443b12a219aa484cb9fa8adbb9a29d429f50155321b15664926317477079c7060dfdaa84c1d74bba78892c34e6f21ad35208d2ae622012401696bff5cd57b6485944b3db7b9071fa5f57fbfb1085d91bb9cff5808d662cdc6c8157249478262c44b7fbc397ed42a4977b202e817717bfccc9f0467294062313f7705251ed09573f16d23429361fada259dfb300369c4198f07341b38e84d02cdb74af5de6aab1fc2026208ea7c418c0", - "be31bc96606d0fab007e5caeded2f1c9f747c759777e9b6eef962bed49e45a1d4fc993e279d024915e600865ecb087b960584be18c41114d3c43f92169b9e0e1f85a0ebcd4e196376ccdc920e66103cd3b1c58407d0aafd0e003c4e341a1daddb9f4faba974362a32f35db83384b05ae8e3322d728893861afd8b1c940de5a17f691e763ce4969b6d94f67fb4a0235d100225bd8602f291388f0ca4a568748ad0d6040f1262eac2aede6cd27419bb78a394c1ffad72c262be8c3f9d9619d633e51d0", - "4d83d85ca838b4518588f2a90228a4dd18f14dd5b4c012d26298a97d848abbd825d221d02cceb6e8c701b4ad00e1dee4889b5c533e4bb60f1f41a4a61ee5478be2c1b1016c30345afd7a5253668260515e70751f22c8b4022d7fe4877d7bbce90b46531507dd3e89549e7fd58ea28f4cb23d33662bd003c1345ba94cc4b06867f778957901a8c441bee0f3b12e16463a51f7e50690356971dd73a686a49fda1eae46c9d54fba262811d698025d0ee053f1c58591c3bb3cbde69de0b31549ef5b69cf10", - "cdeb07d36dc5f9a1cd717a9e9cca37a2ce93caa298eee63571f7d6c5fde2a11c666cf53cf2dcb41ca2ea2319e7230ca68e38c647905928713a13982bf47fe33d7095ebd50b2df976208920a43eb2e29b942f32467403c45cea18bf44e0f6aeb155b48a8e5c471fec972a9d62f7ae093d2758f0aaec7ca50cb4725bfa219f1a3a46ad6bde7361f445f86b94d66b8ece080e56c510250693a5d0ea0ae87b4421860b853bcf0381eae4f1bf7c5c0472a93ad18407bc88475ab8560d344a921d3e86a02da397", - "a598fad52852c5d51ae3b10528fc1f722e21d44fbd42ae5acdf20e85a28532e646a223d27fd907bfd38eb8bb75175636892f8242877aab89e8c0824d368f3339ce7a82aa4e5af6db1f3b588a4d667a00f67bee37cfd2724dde06d2909fb9e58d892f4cfd2c4ca85acdf8256f5458b030a6bda151154ff2e6d7a8da90b54a2884c8a99fab5a4ac211ff23dc0975f4f592fd1b6b9dc7783bdcd2d4ca4e68d2902f2013e122cb62e2bff6b0a98ec55ba25837e21f1cfe67739b568d43e6413dab2bd1dc471e5a", - "17b68c74c9fe4926e8102070916a4e381b9fe25f5973c9bd4b04ce25749fc18931f37a65a356d3f5e5a1ef125d546f4f0ea797c15fb2efea6fbfcc5739c564693d47adeb12dcb3d98a2830719b13247792cb2491dca159a28138c6cff925aca42f4fdb02e73fbd508ec49b25c60703a7595a3e8f44b155b371d525e48e7e5dc84ac7b17c52bf5e526a67e7187234a2f19f57c548c70fc0b27183df73ffa53fa58b658034c896fa791ae9a7fd2620f5e46ce84c842a6e60e9324ae4db224ffc87d9617cb85ca2", - "b9e4267ea39e1de1fed0579f93bb351007c9f8fcdd811053fae33f09e2753d7428f04e1a9efcd45ea701a5d87a35b3afb2e6b65365dee6ead0bbb611b7797b212ac688653f542e604a39df277f12514ddfee3b4e27b98395c2cd97a203f1f1153c50327965770802ec2c9783edc428271762b275471e7ac65ac36523df28b0d7e6e6ccc7674268a132a63411fc82c0738dbb68af003b769a0bf9e6587b36476cb465350fee13f88ea355d47ffac7b0f964f4139db11b7642cb8d75fe1bc74d859b6d9e884f75ac", - "8ca704fe7208fe5f9c23110c0b3b4eee0ef632cae82bda68d8db2436ad409aa05cf159223586e1e6d8bdae9f316ea786809fbe7fe81ec61c61552d3a83cd6beaf652d1263862664df6aae321d0323440430f400f291c3efbe5d5c690b0cc6b0bf871b3933befb40bc870e2ee1ebb68025a2dcc11b68daadef6be29b5f21e440374301bde1e80dcfade4c9d681480e65ec494a6af48df232c3d51447b9d06be714949249c44c43cf73ed13ef0d533e770284e51369d94ae241a5fb2f163893071b2b4c118aeaf9eae", - "4fd8dd01012bb4df82bf42e0683f998e6f52dd9c5617bae33f867d6c0b69798cead8179346d70acc941abbbdd26e3229d5651361d2252c72ff22db2938d06ff6fc29a42fdf800ae967d06479bc7bbb8e71f40b1190a4b7189ffc9a7096cdb76d40aec424e1388e1eb7ef4ac3b34f3f089da8fda7d1927f5d775c0b2801d22dd1265c973158f640cec93edfed06dc80b20ef8c496b98289d54d46ccd205951cbb0f4e7daeb866b60bacb483411e4382b6f04d472843186bd0e31fbaa93e5c901ec028efafeb45fc551a", - "e9ee1b22b04b321a5fdd8301627011f583887d77560fb0f35552e207561f81e38ac58a0d0aeaf832d1ee72d913720d01f75574e9a321864fe95f4d0d8f0b8db97649a53e71e940aede5c40b4b9105daa42a6fb2811b61209247534cbaf830b07abe338d75d2f5f4eb1c3cf151e9edabe2c8d5f6fff08fac1495ef48160b100d30dcb0676700bcceb28723a29980ab0766a93abb8cb3d1963007db8458ed99b689d2a7c28c788743c80e8c1239b20982c81dadd0eed6740c65fbc4ef15c7b5569cb9fc997c6550a34b3b2", - "ec01e3a60964360f7f23ab0b22e021815765ad706f242265ebc19a2bb9e4eac94393952dcf61aae47682671a10f9165f0b20adf83a6706bfbdcf04c6faba6114653a35584267267873291c6fe7ff5f7695243143421509502c8875aafa9e9afe5be5ef2c851c7f35d69be5d3896000ccdbbfab5c238bb34d607cfe2d55d748880545b4aa7ca61137992925189025c62654b1f20d49c3ccd75aa73ce99cd7258dabedd6480a9f5185531fc0118beb68cc0a9cd182f6973287cf9252e12be5b619f15c25b65c71b7a316ebfd", - "db51a2f84704b78414093aa93708ec5e78573595c6e3a16c9e15744fa0f98ec78a1b3ed1e16f9717c01f6cab1bff0d56367ffc516c2e33261074935e0735ccf0d018744b4d28450f9a4db0dcf7ff504d3183aa967f76a507357948da9018fc38f150db53e2df6cea14466f03792f8bc11bdb5266dd6d508cde9e12ff04305c0295de29de19d491ad86e766774bb517e7e65befb1c5e2c267f013e235d8483e177214f89978b4cdc81aa7eff8b39f2825ad3a1b6ac1424e30edd49b067d770f16e74dd7a9c3af2ad74289a676", - "00e40f30ae3746edad0f5dd03d0e640933cf3d1694804c1e1ed6399ac36611d405196ee48f129344a8512feda16a354517871322bd5d9c6a1b592933eab531923efb393ffb23d9109cbe1075cebfa5fb917b40df028a621460ff6783c798792cb1d9635b5a6f84ec13918fa302924649b5c7fcb1f7007f0d2f06e9cfd7c27491e565a96c68a0c3644f92cd8f38857258c33801c5d537a83dfe583cba59d7eec7e394199c0a2660a62fabe3ed2099d57f315a6cd8de1a4ade29d977f15d65759cff433e5ac0c182aef3761163e1", - "3c5ea24d0d9b618294a263f062b2414a722be4eb10dfc346a6ec3b821d7396eba61cd6ef33618b04cd087a811f299d4606820227f16000d7c839062b96d3e3f59cd1a082448d13fc8f56b3fa7fb5f66d0350aa3b72dd7c165d590282f7da2e12cfe9e60e1796122bb8c2d40fdc2997af634b9c6b127a893dfb3467909378300db3da911be1d7b616bb8e0572433e65527e15d936500a2c60e9f9909dcf22ab5e4b6700f0238c205b4a813626fac3d945bab2637fb08203044a73d20c9a3fcf7c3fc4eb7807c3276dd5f73ce89597", - "9271aeeebfac46f4de85df78f1bfd36136aa8905e15835c9e1941176f71e3aa5b1b131843d40479735e23e182a2bd71f66f6149dccb7ed8c16469079dc8590bbf165374951785f4531f7e7361de62f936cfb23a2b5bdf186632e7042a0dd451fdc9b7208f923f3a5f250ae590ec348c63a16c3aacaf7379f53b5dd4152dcd40d23e683e2156e64c592ffc07e2cd6bbeebef4dd590b2f6b2bcbf08fcd111c079f5c4033adb6c17574f8756ecd87be27eff1d7c8e8d0324438d59ae171d5a17128fbcb5533d921bd044a2038a5046b33", - "4e3e533d5bcb15793d1b9d0468aaee801f32fdb486b11027183553a09ddbee8213924296f2815dc61577297459e834bf1c7a53f87d43782209e589b8295219ba7073a8fff18ad647fdb474fa39e1faa69911bf83438d5f64fe52f38ce6a991f25812c8f548de7bf2fdea7e9b4782beb4011d3567184c817521a2ba0ebad75b892f7f8e35d68b099827a1b08a84ec5e8125651d6f260295684d0ab1011a9209d2bdeb75128bf5364774d7df91e0746b7b08bda9185035f4f226e7d0a1946fcaa9c607a66b185d8546aac2800e85b74e67", - "b5d89fa2d94531093365d1259cc6fe8827fea48e6374c8b9a8c4d2209c280fa5c44958a1847222a692a59e6aa2696e6cdc8a543dd89b0ce03bc293b4e78d6ef48e1839694ccd5c65661143095c705b07e3ced84a0f5959114dd89deb956ab3fac8130eb4a878278205b801ae41a29e34146192308c4e759b374757b0c3b00319bce92a1b95a4d2ee179fd6714ff96155d26f693a5bc973f84ac8b3b91e3926276297532d98b46992a3f104c08100bf1671c43134bac280c617da711e90a0100137525375ebb12802a428885ae7fce6514a", - "40e3d8048fc10650cb8a7fc2e7113e26dec34f9ca2d5129cd10a8e8e44d113d61ee48c7d003e19fd307fc6debd70feb30243f298c510ccc4418355ce143066f067ad7c6de7288c3080e7ad46a23c8d34deb55a43e652fe90444ad3c57d3ec1e1c489d63ef915a24bc74a7925a0a7b1e1523f21ca8fee78df24e3d0a68d0013423db97c280799a0618229c0f2c167289a891e5c8d6661ab21285951c31710e3b5fe55f6347fe16d9b40507948a59252efeb616df83e5c098b07d0a7247cd371daff0e50491c582503fd89f79ba94d6af9ed76", - "1fa444de01dd3901e2b4684e3d7a799ffa02d85afd35fb30fe4c9d672837bee6dd8a3b8608b4bb5e589220ad5a854f46b46e41c6d57ad124a46beab4169ff69fee7e3838a6165e19dad8eb5d7bf53d4edd3cd2769daf219510a02fdd2afe0c0e1da3cd30fcd1aa88b68965586f07a25a1720fbd90a096ea30fc8e945e3637d7857c8a9c0ab4154ffb2000e57b5f9adfa4e4eaf8065bc3c2b2e75f495963325588785a6ce417dcddffd299873b15dcccca128d63cd4eeeadb64cda28099a9ad7c80d34844901f26b88b00b9aafeb2f90286d29d", - "fde0a0d9d813983bd1f55cf778a003a2023b34a555322ab280584537bc6bdd844d22a7d6066c18da83ec09f3d8d5a1aab4be0d5ce19b436052f6e259a4b49017a1f47f1fe2bf115d5bc8599fb216351c60dd6b1bedb2e6f4dcadf424b833501b6f099cbfad9e2290680fb69c25032b42a6274f7cb9b5c5950401354838a45f7cb77b95bf54718e2f3d3d9fb91eb2311903980277396398d9736d8e92fd838594ac8a537c6c529db5a8a4f89290e6ba6f20ac0e5ed6fef40901d0e0e8e3e502990811f9acaae555dd54eb1bcd96b513e2fe751bec", - "9f8e0caec87858599f5ab29bff86da78a841a918a023a111098687ecdf2747612d3f3809d9ca400b878bd4f92c43a1004f1c17c7f19a3cd1ce449bd2b23aff551623c37dd8c0be56bf3fd857b500c2b9f9ccea62481944090a3cf3b6ee81d9af8eeb60f65ef150f9fa4d3ed6ce4762d3d4f174ee8ccd460c25cafac0ea5ec8a6a4b2f9e8c0520cb7061155e532cb65f188b01e4b9086db951f504b060c296b326b3fc1c590498ecce594f828f4a10ea416675720ae505295d38a791bd0e93f428448a8f4c1fc0af53604a9e8255384d29ae5c334e2", - "33d1e683a4c97ee6bbaa5f9df1a88cb53b7f3c157b6045d70a56fda0ccbd3a1fa1f049cd564da072b53f415bf5fb843771c1d2551fd075d33377362b2f7c0645f9723123d11975991db8a2b518f02e2c7c30342a044754290bae2c77496d755e5981f12e6b0a0174280b958bf11ed628a9062775993ced04bf752ea8d165e3ac2177d7cd1b9371c44efa98f0b3e68602a839d384eec007979f46429dafb138cbc231ad928a9f65f7d66fac77416395e8f1debaaf76ec2e4e03e8674102cd26f614739f3ec9f949033df1fb97e87c2326d65aef94ed5f", - "180048f09d0b480887af7fd548a85abf605440c1ddde6afe4c30c30670233f7bf928f43b4681f59279ebbda5e8f8f2a1abefdee129e18ac60f9224e90b38b0aabd01308e0a27f41b6fb2ee07ee176ec9048c5fe33c3f7c791469c81f30e28170585b9f3e7e3c8c2e9d74370cb4518f13bf2dee048cbd98ffa32d85e43bcc64a626b40efb51ce712925fdd6fee006dc68b88004a81549d2121986dd1966084cd654a7c6686b3bae32afbd9625e09344e85cf9611ea08dfce835a2e5b3726e69ae8a76a97db60fcc539944ba4b1e8449e4d9802ae99fae86", - "13c0bc2f5eb887cd90eae426143764cf82b3545998c386007cca871890912217aa143ac4ed4ddb5a7495b704aa4de18419b8664b15bc26cfc6596a4d2ae408f98b47a566476d5802d594ba84c2f538def9d016661f6404bb2337a3932a24f6e30073a6c9c274b940c62c727242e24466084a3ea336365d71ea8fa6499c0ea8d59eea505f1126b99c795023c4963aa0d99323d0391e8701110edf551b2d3799e1063ca443f1add162156e445502ca1a052fe70c289838593b58839fc63de128a03e2bbf389e22ae0cf957fd03315ee407b096cc1cfd92dee6", - "6f1eb607d679efef065df08987a1174aab41bdac8aece7726dfa65805d6fff5b3d17a672d96b770dc32165f144f0f7324822a5c87563b7cd9e37a742ae83ef245d09006d91576f435a03476f509ea2936636232f66aa7f6cdf1ac187bbd1fcb8e20f8791866e60ed96c73374c12ac16795e999b891c64507d2dbd97e5fc29fac750ad27f2937cbcd29fdafccf27ab22453834d475f6186eaf975a36fad5c8bd61c21da554e1ded46c4c39765dcf5c8f5ccfb49b6a4dc562c919d0c7d8940ec536ab2448ec3c9a9c8b0e8fd4870cad9de2577c7b0c38563f355", - "dcdd993c94d3acbc555f464871a32c5da6f13b3d5bbc3e34429705e8ad2e76393fdd96a69a94acb652f5dc3c120d41187e9aa919669f727c4868013b0cb6acc165c1b7706c52248e15c3bf81eb6c147619467945c7c48fa14a73e7c3d5bec91706c567145342a026c9d97eff97ec672c5debb9df1a998083b0b0081d65c517b3e5634c95e347e781aa30ca1c8af815e2e494d844e847fdcb41622894a518dc36571123a40bfdbe8c4f4cff44d83c61dd9dcd24c464c53b395edb31efee9f3aa080e87cdc3d22d613ae84a53c9249c32c96f9a3bc4629bb126a70", - "49971f9823e63c3a72574d977953329e813b22a8387cd13f56d8ea77a5d1a8a20012632d1d8732bbcb9f756b9675aab5db927beacab7ca263e5718b8dfa7b2eed9a91bf5ed163b16139d45f7b8cc7e3f7bdda6202106f67dfb23b7c315ee3e17a09d466b1e6b13e7c7428184a979f5358667b4fa8bd40bcc8ea46058db44587a85377ac46bf155136c09ac58cb6c27f28e17028c91e7e8f74d5b500e56293b316974f02b9d9ea205d9b6ac4cfb74eb8eb0c944577fd2f41316368307beab3e327bf7dbaa0a4428836ec4e895dea635234abeaf113ceeadac33c7a3", - "c57a9cc958cee983599b04fe694f15fb470fcbc53e4bfcc00a27351b12d5d2434444253ad4184e87b81b738922ffd7ff1dc1e54f39c5518b49fb8fe50d63e3935f99e4bd125e8dc0ba8a17fd62de709339a43fabe15cf86d96a54010112170c340cfac4132182eed7301402bc7c8276089dec38488af145cb6222525894658f03501204b7a66aba0be1b557b28a2f652d66f7313ed825ecc4d8596c1be7420d4425b86a1a90a5b7f30d0f24e0d1aae0eb619ca457a71699e44be612a4011c597ee80b94d5507e429d7fc6af22579cd6ad642723b05ef169fade526fb", - "0568a672cd1ecbaa947045b712e2ac27995392fbef8f9488f79803cbee561c212287f080eca95adb5ba42739d78e3ba667f06045d87850d3a0499358649caa257ad29f1a9c511e7054db20554d15cbb55ff854afa45cae475c729cea72ede953522031865bc02b95589ed4d9841c552a8cc94904a93ed09ed77222f6c178195056be59bc4e96a815adf534e6b466fb47e262ff79c803c157a21b6e2269c2e0abeb494113cd868d8466e82d4b2f6a28b73645853d96bc9242515d803e33294848d3fe42fdff68da53c03491636beede47ff1399dd3d54a5e914d55d7adf", - "3f19f61a4cd085796731ac9f85a75a8bce77031932c31762d87d8b8d07b8bd19ff78d6b7d1bd1e87f3a4f41aad03b6c4d17a6cbc86be55f7c8b88ada047bb04f8d49f1c34bcf81cc0f3389ad01a758fc7eeb0072aa9ad1481992bfdde82e438e75590a4423832dfbe3756e2229ea873bc3606e6d72174cb2163bf40b5d49c81009dab85ecc03e311351bbf96e32c030a2b276a7698cb25bc2c967acb3213161a1fdde7d912cd6a804490f8056c47da1333f6e35c41e749c2c23919cb9af5eec5652e6e072b034fb1682e9aaa194a9c0bd456ea0b008d14dbce37967a7a8e", - "705f98f632d99d3651793825c38dc4deda56c59eac539da6a0159c83131cf8ab6f2ee0c3b74111fde351f7aa1a8c500a0cecab17c212d2c58ca09eae608c8eefc922b9902ef8d6832f799ba48c3c28aa702b3242107edeba01daafe424406a3822965056cfe8783455a671e93b1e2eae2321364f1871471c82124df33bc09e1b52882bd7e1c4c7d0b2f3dd4a28c2a002a43246768af0700f9659de99d62167be93177aabf19d678e79e9c726ac510d94e74873eda99620a3961930cd91937c88a06d8153d64fd60da7ca38cf26d1d4f04a0df273f52127c53fdc593f0f8df9", - "ea6f8e977c954657b45f25480ff42c36c7a10c77caa26eb1c907062e24fbca5aebc65cacca0de10abea8c78322f08672e13d8ac16996eca1aa17402eaea4c1cc6c800b22dc18cb8d620192d74bac02c07b5cfa61e513c7f28b7e29b9700e0e442720bf4c669d4995da19d19f841d9eb68cc74153592591e3bf059ef616b95305aa453b32fe99a91afb35bd482cf2b7aa42702837a53be3c38883d2963020e347556f841254ec6b85854485fe8c520b05f2ea67a9bf3981555c20991e2bacd4db5b418228b6002d8d41c025cb472bf5443aaa885974a408ea7f2e3f932c600deb", - "408190134ed06556811b1af808ab2d986aff152a28de2c41a2207c0ccc18125ac20f48384de89ea7c80cda1da14e60cc1599943646b4c0082bbcda2d9fa55a13e9df2934edf15eb4fd41f25fa3dd706ab6de522ed351b106321e494e7a27d5f7caf44ec6fadf1122d227eefc0f57aefc140d2c63d07dcbfd65790b1099745ed042cfd1548242076b98e616b76ff0d53db5179df8dd62c06a36a8b9e95a671e2a9b9dd3fb187a31ae5828d218ec5851913e0b52e2532bd4bf9e7b349f32de2b6d5d3cdf9f372d49617b6220c93c05962327e99a0480488443349f0fd54c1860f7c8", - "5f9e5c6f38573a85010a9d84d33f29c057003b2645e3ea6f72cbc7af95d197ce6a06b13fea81722853e6991791b8b15091cd066f5ed913592ed3d3af5370d39ba22beeb2a582a414b16824b77e194a094c2afdcc09aa73ce36f4943cca5ae32c5017dc398801dd92a47382d9327c9f6cffd38ca4167cd836f7855fc5ff048d8efba378cdde224905a0425e6b1de061fc951c5e624a5153b008ad41160a710b3ff2081748d5e02deb9f841f4fc6cf4a15153dd4fe874fd447482696283e79ee0e6bc8c1c0409baa5ab02c5209c319e3169b2476149c0c6e541c6197ca46e004eef533", - "218c6b3508aec69574f2b5039b30b942b72a8349d05f48ff945bbbe5c8957d5a6199492a6bf54bab821c9377e2edfa4c908384664d2c80112d5e805d66e0a551b941021be17dd20bd825bea9a3b6afb1b8c605805b3bda58750f03ea5c953a698494b425d8980c69f34d1c3f6b5866e8717031152a127215c256e08873c21b0f5cc85875d0f7c94601659150c04cd5fe5d381ba29983a2d94fcd3a65a94c53c7279cd000dddd4253d8cff8d7f6ace10247fe3bc30d63ba4bb54f557b3d22a3924369430d71ab37b701e9500bda70b5a643704858beed4726a889b6c9c91584194c68f1", - "dac26aa7273fc25d6e044c79fc2bfa46e59892a42bbca59a86826c91e76ab03e4bd9f7c0b5f08d1931d88b36ea77d94f7ba67cd4f1d3086e529427201119096ae066ae6f170940830ed7900de7bb9d66e09788287403a4ecc93c6da975d2fb08e918840a236c15f5d3a8f7375c2eeebbf6f01a6e7f29ca2b8d42df158414c320777433663c59fdcd1f39ca68e3473db721be7ce8c6dba5fddc024f94fedb286b0477581d451313ca8c737484daf60d67f9b2d56d4bcc271f7e9ae958c7f258efbc74d25753e0516f28282461941bf2dcc7dd8c7df6173b89760cefcac07190243ff863fb", - "c46e6512e6797cc7a54254a1b26b2de29aa83d6c4b1ea5a2786fbcec388270625b12635eae39e1fba013f8a65219421bca8b52a8ddfd431cda60299bdf160734d5a7450ec79620058522702174ae451b9bfa7c4a455fbbee3e1d048c7d4bac5131018228f137c8e130440c7059b4f15eaa34ce872a851a16ce86f982df78a00be4d564da2003a450ddee9ab43ea876b8b4b65c84f0b39265fd5456417afb5bc54997c986e66fc222f2123ba5e719c4d6b9a177b188277df384f1125821cf19d5248cef0be183ccdc84ac194506f740ed2188b2689ea4c9236a9e9e3a2fff85b6af4e9b49a3", - "1ccd4d278d67b65cf2564ecd4de1b55fe07adc80e1f735fe2f08ea53fd3977323689122c29c798957abaff6aba09bdcbf661d77f4dc8913ab1fe2bef38846166e3834785e7105d746484eff8c656af5d8c7854abc1c62b7fadb65521dc6f793d978bda9838eb3800417d32e8a24d8c8cb1d18a5de6ca79d9e1b0ff9aa25e6218fe944cf18666fecc1e31334b390260dbe0997539e1b02f6366b2aea4f4a21efe04f4b97568fcb39e59919d5ebac6543d5d0f48fc66b923c34aac377dc95c20329b837b6ed5e8d9a3d2089cd0d8f025658006ff41cbdaccca618822ca590ab155253f8bc1c7f5", - "9875209588395ee3c9fdd793fd48717cc84c8c3ea622b2ccc4a1be4448e6034b7810569855255031f10be5ffd714b05f9ce01972d712d40abf03d4d0ce175813a7a668f761324996093fc2aa5912f7fc2abdadd8775d2b4d9ad492216293381460ed8f6db3d641d1525f4242c348bbfe504c704f215dc461de51b5c75c1aae967936963848f16c673eca5e78dfd47eb19001d52d1bcf96c98956dad5ddf594a5da757e7ca35f2f69803b784e66ac5a58b75c228b8266ec592505e5d1ca87d81225738855f15bc0914677e81593fd409e77d159f8a908f67788de9eb06c5561547aada96c47c535", - "40c90e375e366f3756d89091eb3eed9fe0fbfc5638700af4617d358812bac53124a2205dd6756456787d49cd6a35e302479a0992288f47532e4ea7ab62fc5ad5adc690a5d9a446f7e035ad4641bd8dae83946aee3338ec984ccb5cc633e1409f2531eeffe05532a8b0062ba99454c9aeabf8ecb94db195af7032bfebc22912f49d39330add47ff8fa5720612d697f0b602738930e060a1bb214efc5e292224cf34e29deaea6b1b1ff847e94ecc997325ac38df61db45d82bf0e74a664d2fe085c20b04c39e90d6a170b68d2f1d373f00c731c524456ada73d659aaac9df3191a7a3865083343fc13", - "e8800d82e072210ca6d7fa2472028974780b76aad4bcb9ad362422dd05ae3232668251d164daa375a43b26a38cce28dbeb3dee1a4a579f70d0fe7febb29b5ece8aa836e050fb3d188c63aa9c3c0da6c717d86458a6096b5effceb964efdec7035960c09ccd10dea3c5f1c7f9f478d5887ebbe2e15c5ff85dbacbc444bb951c4eec7abecb89ed80187e409e2972ffe1a5f01562af109f2cf09471cf72cf83a3bb8f4e2ef38ed0e326b698296394e5b2718a5000c01425708e8ad0461e62462d8819c2377f13ab1be2c7c9f33dc06fe23cad27b87569f2ce2e56e4b2c60c7b1b3d370841d89ebdc1f192", - "796d6d1447d5b7e8c55cd8b2f8b7010db39f27565f907e3fc0e464ea2d4bb52b37f10e7c6dcfc59231b9cdee12c32aeb4adbc42b86e86eb6defb5b69e6ca75e1f4d0dae3e124e5a1b8b6697f7e10b0403f1f0a5ff848eef3752837a9ba17780f16a9a709188a8d5b89a2fa74adb2e651163b1c2b3d261e225c9158dcd9eb7ac3d6704cee290cdff6bcb3cb90cee030aa0d19d4693655c3c30ac6fc06d2ae37787c47126d57ed9a6bef5f8a6c56859aefc08755739a95aac57a4dd916a92ba9f3afbf969df8085949615033365c751a9a3e1a18cee98a69d22e64009bebf8307169b6c61de0617ecfafdf", - "4f9057183566153cf337b07c3f5556006de54c56b2a1e5326c07aaeabd1886ec6f1641358925db232b2f0dbf75229c796a7395b2f934c1f99090bec1123f3c841b1cb3c5b1ec42ed5408f2940f0c48a9470b852c46d6557853d459cecd2c32bbcd8ee21fa11e385eef0857cba4d8545a61b52a484cdd779db4739fbc7aa9860dcabe0488b98fa0b60c3f7d6153db279000a52ffb573dab37d2ab1896a90e5deb7ac6bbe56239085c325d83a917dc6e8a448425b718c2356b9f3066163555ec444f372e184e02c8c4c69b1c1c2ae2b51e45b98f73d933d18750968945ca85d6bbb22014b4c4015262e3c40d", - "79dcca7d8b81a61359e4aece21f3df7b99518ce70bd2f57a18bab5e7114af2add0a0cea7f319d69f231f060e0a539d9a23fb3e95451ce8c6340cfb09edf931df84203a39226dd9eb278f11b691ef612585b973daab373e65d11325898badf6732100371fd759960fa8fec373268421d28bffdb9b12a430b92fe4b07566ca0c89e616e49f8fc75ccd9cdc66db820d7c02e109aa5ed86b89770262918a518f90a2292f6b68d68ae03992e4259a17a23c84ec2a417f082b5abf3a26e44d2278ecb8ba9456965303a75f25394d1aaf5544590e74b14d8a4cc4050be2b0ebcfe4d2db6b12a02c68a3bcdda70301f3", - "848755dc31e25e9a42f9ec12d847d19f292c14c162c9aba49e972cb123b58b8e57bb263a923929833373858594ff52dbc298dbbc078599194e4c07b0e5fc1e10808bbacdb6e93c72b333685cf961f28eb0d5a395c63266b01f130d25db384b356e5da6d01042fc2359581b89c63b3bb2d1ce897fbc9e83fe85d9666cb60e6a8c657f70caad5387b8a045bf91095606802c8424ea8ac52ef29386dc46183378a5fcb2cb927428b8c070f1c42aafd3bc70ca25437807696a46873cfeb7b80ba2ebc3c4272443d445e46343a1465253a9eebd532a0d1d2c18264b91ff45159f245404ae9335f2af55c802772426b4", - "ecaa6e999ef355a0768730edb835db411829a3764f79d764bb5682af6d00f51b313e017b83fffe2e332cd4a3de0a81d6a52084d5748346a1f81eb9b183ff6d93d05edc00e938d001c90872dfe234e8dd085f639af168af4a07e18f1c56ca6c7c1addffc4a70eb4660666dda0321636c3f83479ad3b64e23d749620413a2ecdcc52ad4e6e63f2b817ce99c15b5d2da3792721d7158297cce65e0c04fe810d7e2434b969e4c7892b3840623e153576356e9a696fd9e7a801c25de621a7849da3f99158d3d09bf039f43c510c8ffb00fa3e9a3c12d2c8062dd25b8dabe53d8581e30427e81c3dfc2d455352487e1255", - "23a3fe80e3636313fdf922a1359514d9f31775e1adf24285e8001c04dbce866df055edf25b506e18953492a173ba5aa0c1ec758123406a97025ba9b6b7a97eb14734424d1a7841ec0eaeba0051d6e9734263bea1af9895a3b8c83d8c854da2ae7832bdd7c285b73f8113c3821cced38b3656b4e6369a9f8327cd368f04128f1d78b6b4260f55995277feffa15e34532cd0306c1f47354667c17018ee012a791af2dbbc7afc92c388008c601740cccbbe66f1eb06ea657e9d478066c2bd2093ab62cd94abadc002722f50968e8acf361658fc64f50685a5b1b004888b3b4f64a4ddb67bec7e4ac64c9ee8deeda896b9", - "758f3567cd992228386a1c01930f7c52a9dcce28fdc1aaa54b0fed97d9a54f1df805f31bac12d559e90a2063cd7df8311a148f6904f78c5440f75e49877c0c0855d59c7f7ee52837e6ef3e54a568a7b38a0d5b896e298c8e46a56d24d8cabda8aeff85a622a3e7c87483ba921f34156defd185f608e2241224286e38121a162c2ba7604f68484717196f6628861a948180e8f06c6cc1ec66d032cf8d16da039cd74277cde31e535bc1692a44046e16881c954af3cd91dc49b443a3680e4bc42a954a46ebd1368b1398edd7580f935514b15c7fbfa9b40048a35122283af731f5e460aa85b66e65f49a9d158699bd2870", - "fe511e86971cea2b6af91b2afa898d9b067fa71780790bb409189f5debe719f405e16acf7c4306a6e6ac5cd535290efe088943b9e6c5d25bfc508023c1b105d20d57252fee8cdbddb4d34a6ec2f72e8d55be55afcafd2e922ab8c31888bec4e816d04f0b2cd23df6e04720969c5152b3563c6da37e4608554cc7b8715bc10aba6a2e3b6fbcd35408df0dd73a9076bfad32b741fcdb0edfb563b3f753508b9b26f0a91673255f9bcda2b9a120f6bfa0632b6551ca517d846a747b66ebda1b2170891ece94c19ce8bf682cc94afdf0053fba4e4f0530935c07cdd6f879c999a8c4328ef6d3e0a37974a230ada83910604337", - "a6024f5b959698c0de45f4f29e1803f99dc8112989c536e5a1337e281bc856ff721e986de183d7b0ea9eb61166830ae5d6d6bc857dc833ff189b52889b8e2bd3f35b4937624d9b36dc5f19db44f0772508029784c7dac9568d28609058bc437e2f79f95b12307d8a8fb042d7fd6ee910a9e8df609ede3283f958ba918a9925a0b1d0f9f9f232062315f28a52cbd60e71c09d83e0f6600f508f0ae8ad7642c080ffc618fcd2314e26f67f1529342569f6df37017f7e3b2dac32ad88d56d175ab22205ee7e3ee94720d76933a21132e110fefbb0689a3adbaa4c685f43652136d09b3a359b5c671e38f11915cb5612db2ae294", - "af6de0e227bd78494acb559ddf34d8a7d55a03912384831be21c38376f39cda8a864aff7a48aed758f6bdf777779a669068a75ce82a06f6b3325c855ed83daf5513a078a61f7dc6c1622a633367e5f3a33e765c8ec5d8d54f48494006fdbf8922063e5340013e312871b7f8f8e5ea439c0d4cb78e2f19dd11f010729b692c65dd0d347f0ce53de9d849224666ea2f6487f1c6f953e8f9dbfd3d6de291c3e9d045e633cfd83c89d2f2327d0b2f31f72ac1604a3db1febc5f22cad08153278047210cc2894582c251a014c652e3951593e70e52a5d7451be8924b64f85c8247dab6268d24710b39fc1c07b4ac829fbda34ed79b5", - "d7314e8b1ff82100b8f5870da62b61c31ab37ace9e6a7b6f7d294571523783c1fdedcbc00dd487dd6f848c34aab493507d07071b5eb59d1a2346068c7f356755fbde3d2cab67514f8c3a12d6ff9f96a977a9ac9263491bd33122a904da5386b943d35a6ba383932df07f259b6b45f69e9b27b4ca124fb3ae143d709853eed86690bc2754d5f8865c355a44b5279d8eb31cdc00f7407fb5f5b34edc57fc7ace943565da2222dc80632ccf42f2f125ceb19714ea964c2e50603c9f8960c3f27c2ed0e18a559931c4352bd7422109a28c5e145003f55c9b7c664fdc985168868950396eaf6fefc7b73d815c1aca721d7c67da632925", - "2928b55c0e4d0f5cb4b60af59e9a702e3d616a8cf427c8bb03981fb8c29026d8f7d89161f36c11654f9a5e8ccb703595a58d671ecdc22c6a784abe363158682be4643002a7da5c9d268a30ea9a8d4cc24f562ab59f55c2b43af7dbcecc7e5ebe7494e82d74145a1e7d442125eb0431c5ea0939b27afa47f8ca97849f341f707660c7fbe49b7a0712fbcb6f7562ae2961425f27c7779c7534ecdeb8047ff3cb89a25159f3e1cefe42f9ef16426241f2c4d62c11d7ac43c4500dfcd184436bb4ef33260366f875230f26d81613c334dbda4736ba9d1d2966502914ec01bbe72d885606ec11da7a2cb01b29d35eebedbb0ecc73ed6c35", - "fd993f50e8a68c7b2c7f87511ce65b93c0aa94dcbdf2c9cca93816f0f3b2ab34c62c586fc507b4900a34cf9d0517e0fe10a89d154c5419c1f5e38de00e8834fe3dc1032abdeb10729a81655a69a12856a78ca6e12110580de879b086fd6608726541cfa9616326bdd36064bc0d1e5f9c93b41278bff6a13b2494b81e238c0c45aea1b07d855e8f3fe1478e373bd9d3957cf8a5e5b9003386793d994c7c575cff2322e2428cbbaa4f47560316ae3354a7478842ff7cc5dcbacb6e871e72b36f06d63a9aaeb9044cfb7974afdc238a5816f537dcf33ee40b4e1a5eb3cff2402b46d548264e133008d284f11b7e4e450bc3c5ff9f79b9c4", - "8df21892f5fc303b0de4adef1970186db6fe71bb3ea3094922e13afcfabf1d0be009f36d6f6310c5f9fda51f1a946507a055b645c296370440e5e83d8e906a2fb51f2b42de8856a81a4f28a73a8825c68ea08e5e366730bce8047011cb7d6d9be8c6f4211308fad21856284d5bc47d199988e0abf5badf8693ceeed0a2d98e8ae94b7775a42925edb1f697ffbd8e806af23145054a85e071819cca4cd48875290ca65e5ee72a9a54ff9f19c10ef4adaf8d04c9a9afcc73853fc128bbebc61f78702787c966ca6e1b1a0e4dab646acdfcd3c6bf3e5cfbec5ebe3e06c8abaa1de56e48421d87c46b5c78030afcafd91f27e7d7c85eb4872b", - "48ec6ec520f8e593d7b3f653eb15553de246723b81a6d0c3221aaa42a37420fba98a23796338dff5f845dce6d5a449be5ecc1887356619270461087e08d05fb60433a83d7bd00c002b09ea210b428965124b9b27d9105a71c826c1a2491cfd60e4cfa86c2da0c7100a8dc1c3f2f94b280d54e01e043acf0e966200d9fa8a41daf3b9382820786c75cadbb8841a1b2be5b6cbeb64878e4a231ae063a99b4e2308960ef0c8e2a16bb3545cc43bdf171493fb89a84f47e7973dc60cf75aeeca71e0a7ebe17d161d4fb9fe009941cc438f16a5bae6c99fcad08cac486eb2a48060b023d8730bf1d82fe60a2f036e6f52a5bff95f43bbe088933f", - "f4d84ed3e564c102600a795eaa9b1eaf4ad12f1a4deca1d042a0a2750ddf6201db03073d8bf553cb9dde48a1b0083827a609f7242b86584cc180964ae794b12ce55661e00e36a6ba4dbc389e6a5a85f1b45df9af7ead1b0a54db56e68639b9d438a91504e82c35d40c7bc7e048a53ac0b04accd0dadf4ac9884b0ca0e3cb5ba4336e3581be4c4760a553823ffa283a1120d4e145af56a59f2533903650f0b9e9ad9fe2e8a3c3c3dd03a1fcb709032c8835324839c735b0c051d0cbd8b5d867617c11023432e4bd275d3d0eb98a0b6cf58071a5b712922f2bc751ac7c2588c447444cde2f37a8ea5ec126425bf517e0d17c9e2999f52fee14b3", - "2ccea21bac9c2b70d3923309cbf2d7cb7abd1fcc8b8b002688870a80029c62397350c3c898194e5deea360bb963d26d485cb7963f8167586976ec0556950b2e86135f4a2800991ce8473bfd44a3c5e937a48b5e355ba5141bccf2131a83988d9d2a9e8e7635a956105b3512c05ef708139ced51d7a4e204c12d8a49a21e8dc6de2629a2fd092326885d9f218745fe09f6d91fb6afce250a30a63689534b6be1f26899ffa3767d835cf586aa47776700f94241bc999b1e3deefe188f37ff734f5f16ee6a00914323dc7b8a143c9137cdcc5cd08ae9566f04bb2941532674c97dff6ffa5ce3405ef8e5d27ec403114253dd6394c0167d72a0044c5", - "2b681c6398aee63bf862770341648bbcd31d7de7903c5903fe3d9469311320bb24d914f2af0cdca199c97214c7c679dc32a2800ba484a03c010ea6be3bb9f2c87e30a98b606050b8a3f297f12b8f92caaeceb3e844652115934874e0a1ab093a73d759b53f6a6c3096940dd22c2bb96ce6820a7b9c6d71a208de9892aa6a7209b0fff56a0cafea52b952cdd6f5752cff3309d448800b4e4c878aa595595b56b12b83fcd6ca89520c7da664e449d7b4438fc455888aad5de0fad9a06eed14afd3513b5ebbffe01775549b701181bd26370764f56eba52fdb24286ad1ac0f5418a7c429f7dfc7f3168437fa8eed7a2ed7c723a485e4c3ed14dea2e07", - "aadfd505a89f4aade2c3018258a7e039401b1fc6a7f3d87910dddbb880d372ec8a13c70d92245de5b8e5f9a285c33b99dc82fa2b22decee72b93a72211656ad7a52696c8e570f78be28c0e427a371dafde856e8d5ed24f83b0660b51e7fac05d93a8666dfde6def59af863f80f3e5f6801182c87422203df390dcb736b8f830052a8832eeeb0b4e27e732aaf793d166b5a3ec7745aeef3766937c2b75a276bddd145f6010c29d035e343e267cb2d828436876ec3a7ebe3b6347d4172f7a99d6821ce152e039e53deb33340b324c7f068ffb94b3cde35a8eaa12d15c3806a7ad0acec3e8c7078c1d32a28fd3eec9f32cb86e4c22166ff69e83785e851", - "1605b8cce529a9d6262fd4390d9e4ae5e14e0adc0ec89b028ef68dd0f373ea259aaa96f2967091dd0874c0105385e9e6da9ca68297c31afa44ef834535fb302ce5b4e49edacbbdf359fe1228a8172495b3e57014c27edd58b685110980056c50c398a64f4923f2d720b4df16d75cb36b4233660694182099c35028a972519c24764fc94e18e582b24deb3491535fc06b83837c7958522800e822201d694af0bd0aa3834e17d4b1ba36f470905ae5f8bbeeb6c4c8604d8af02baa347b07086d6989867ddd5e8e8ed7740c3469bfa2810519c55c6add1332c4c54ee9097961d6741cb12a09713a0d07645f784f42f5ad94b48b836b34263130b0483f15e3", - "ff9c6125b2f60bfd6c2427b279df070e430075096647599bdc68c531152c58e13858b82385d78c856092d6c74106e87ccf51ac7e673936332d9b223444eaa0e762ee258d8a733d3a515ec68ed73285e5ca183ae3278b4820b0ab2797feb1e7d8cc864df585dfb5ebe02a993325a9ad5e2d7d49d3132cf66013898351d044e0fe908ccdfeeebf651983601e3673a1f92d36510c0cc19b2e75856db8e4a41f92a51efa66d6cc22e414944c2c34a5a89ccde0be76f51410824e330d8e7c613194338c93732e8aea651fca18bcf1ac1824340c5553aff1e58d4ab8d7c8842b4712021e517cd6c140f6743c69c7bee05b10a8f24050a8caa4f96d1664909c5a06", - "6e85c2f8e1fdc3aaeb969da1258cb504bbf0070cd03d23b3fb5ee08feea5ee2e0ee1c71a5d0f4f701b351f4e4b4d74cb1e2ae6184814f77b62d2f08134b7236ebf6b67d8a6c9f01b4248b30667c555f5d8646dbfe291151b23c9c9857e33a4d5c847be29a5ee7b402e03bac02d1a4319acc0dd8f25e9c7a266f5e5c896cc11b5b238df96a0963ae806cb277abc515c298a3e61a3036b177acf87a56ca4478c4c6d0d468913de602ec891318bbaf52c97a77c35c5b7d164816cf24e4c4b0b5f45853882f716d61eb947a45ce2efa78f1c70a918512af1ad536cbe6148083385b34e207f5f690d7a954021e4b5f4258a385fd8a87809a481f34202af4caccb82", - "1e9b2c454e9de3a2d723d850331037dbf54133dbe27488ff757dd255833a27d8eb8a128ad12d0978b6884e25737086a704fb289aaaccf930d5b582ab4df1f55f0c429b6875edec3fe45464fa74164be056a55e243c4222c586bec5b18f39036aa903d98180f24f83d09a454dfa1e03a60e6a3ba4613e99c35f874d790174ee48a557f4f021ade4d1b278d7997ef094569b37b3db0505951e9ee8400adaea275c6db51b325ee730c69df97745b556ae41cd98741e28aa3a49544541eeb3da1b1e8fa4e8e9100d66dd0c7f5e2c271b1ecc077de79c462b9fe4c273543ecd82a5bea63c5acc01eca5fb780c7d7c8c9fe208ae8bd50cad1769693d92c6c8649d20d8", -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2x.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2x.go deleted file mode 100644 index c814496a76..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/blake2x.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2017 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 blake2b - -import ( - "encoding/binary" - "errors" - "io" -) - -// XOF defines the interface to hash functions that -// support arbitrary-length output. -type XOF interface { - // Write absorbs more data into the hash's state. It panics if called - // after Read. - io.Writer - - // Read reads more output from the hash. It returns io.EOF if the limit - // has been reached. - io.Reader - - // Clone returns a copy of the XOF in its current state. - Clone() XOF - - // Reset resets the XOF to its initial state. - Reset() -} - -// OutputLengthUnknown can be used as the size argument to NewXOF to indicate -// the the length of the output is not known in advance. -const OutputLengthUnknown = 0 - -// magicUnknownOutputLength is a magic value for the output size that indicates -// an unknown number of output bytes. -const magicUnknownOutputLength = (1 << 32) - 1 - -// maxOutputLength is the absolute maximum number of bytes to produce when the -// number of output bytes is unknown. -const maxOutputLength = (1 << 32) * 64 - -// NewXOF creates a new variable-output-length hash. The hash either produce a -// known number of bytes (1 <= size < 2**32-1), or an unknown number of bytes -// (size == OutputLengthUnknown). In the latter case, an absolute limit of -// 256GiB applies. -// -// A non-nil key turns the hash into a MAC. The key must between -// zero and 32 bytes long. -func NewXOF(size uint32, key []byte) (XOF, error) { - if len(key) > Size { - return nil, errKeySize - } - if size == magicUnknownOutputLength { - // 2^32-1 indicates an unknown number of bytes and thus isn't a - // valid length. - return nil, errors.New("blake2b: XOF length too large") - } - if size == OutputLengthUnknown { - size = magicUnknownOutputLength - } - x := &xof{ - d: digest{ - size: Size, - keyLen: len(key), - }, - length: size, - } - copy(x.d.key[:], key) - x.Reset() - return x, nil -} - -type xof struct { - d digest - length uint32 - remaining uint64 - cfg, root, block [Size]byte - offset int - nodeOffset uint32 - readMode bool -} - -func (x *xof) Write(p []byte) (n int, err error) { - if x.readMode { - panic("blake2b: write to XOF after read") - } - return x.d.Write(p) -} - -func (x *xof) Clone() XOF { - clone := *x - return &clone -} - -func (x *xof) Reset() { - x.cfg[0] = byte(Size) - binary.LittleEndian.PutUint32(x.cfg[4:], uint32(Size)) // leaf length - binary.LittleEndian.PutUint32(x.cfg[12:], x.length) // XOF length - x.cfg[17] = byte(Size) // inner hash size - - x.d.Reset() - x.d.h[1] ^= uint64(x.length) << 32 - - x.remaining = uint64(x.length) - if x.remaining == magicUnknownOutputLength { - x.remaining = maxOutputLength - } - x.offset, x.nodeOffset = 0, 0 - x.readMode = false -} - -func (x *xof) Read(p []byte) (n int, err error) { - if !x.readMode { - x.d.finalize(&x.root) - x.readMode = true - } - - if x.remaining == 0 { - return 0, io.EOF - } - - n = len(p) - if uint64(n) > x.remaining { - n = int(x.remaining) - p = p[:n] - } - - if x.offset > 0 { - blockRemaining := Size - x.offset - if n < blockRemaining { - x.offset += copy(p, x.block[x.offset:]) - x.remaining -= uint64(n) - return - } - copy(p, x.block[x.offset:]) - p = p[blockRemaining:] - x.offset = 0 - x.remaining -= uint64(blockRemaining) - } - - for len(p) >= Size { - binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset) - x.nodeOffset++ - - x.d.initConfig(&x.cfg) - x.d.Write(x.root[:]) - x.d.finalize(&x.block) - - copy(p, x.block[:]) - p = p[Size:] - x.remaining -= uint64(Size) - } - - if todo := len(p); todo > 0 { - if x.remaining < uint64(Size) { - x.cfg[0] = byte(x.remaining) - } - binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset) - x.nodeOffset++ - - x.d.initConfig(&x.cfg) - x.d.Write(x.root[:]) - x.d.finalize(&x.block) - - x.offset = copy(p, x.block[:todo]) - x.remaining -= uint64(todo) - } - return -} - -func (d *digest) initConfig(cfg *[Size]byte) { - d.offset, d.c[0], d.c[1] = 0, 0, 0 - for i := range d.h { - d.h[i] = iv[i] ^ binary.LittleEndian.Uint64(cfg[i*8:]) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/register.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/register.go deleted file mode 100644 index efd689af4b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2b/register.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2017 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. - -// +build go1.9 - -package blake2b - -import ( - "crypto" - "hash" -) - -func init() { - newHash256 := func() hash.Hash { - h, _ := New256(nil) - return h - } - newHash384 := func() hash.Hash { - h, _ := New384(nil) - return h - } - - newHash512 := func() hash.Hash { - h, _ := New512(nil) - return h - } - - crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) - crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) - crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2s/blake2s_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2s/blake2s_test.go deleted file mode 100644 index cde79fb1cd..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2s/blake2s_test.go +++ /dev/null @@ -1,1050 +0,0 @@ -// Copyright 2016 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 blake2s - -import ( - "bytes" - "encoding" - "encoding/hex" - "fmt" - "testing" -) - -func TestHashes(t *testing.T) { - defer func(sse2, ssse3, sse4 bool) { - useSSE2, useSSSE3, useSSE4 = sse2, ssse3, sse4 - }(useSSE2, useSSSE3, useSSE4) - - if useSSE4 { - t.Log("SSE4 version") - testHashes(t) - testHashes128(t) - useSSE4 = false - } - if useSSSE3 { - t.Log("SSSE3 version") - testHashes(t) - testHashes128(t) - useSSSE3 = false - } - if useSSE2 { - t.Log("SSE2 version") - testHashes(t) - testHashes128(t) - useSSE2 = false - } - - t.Log("generic version") - testHashes(t) - testHashes128(t) -} - -func TestHashes2X(t *testing.T) { - defer func(sse2, ssse3, sse4 bool) { - useSSE2, useSSSE3, useSSE4 = sse2, ssse3, sse4 - }(useSSE2, useSSSE3, useSSE4) - - if useSSE4 { - t.Log("SSE4 version") - testHashes2X(t) - useSSE4 = false - } - if useSSSE3 { - t.Log("SSSE3 version") - testHashes2X(t) - useSSSE3 = false - } - if useSSE2 { - t.Log("SSE2 version") - testHashes2X(t) - useSSE2 = false - } - - t.Log("generic version") - testHashes2X(t) -} - -func TestMarshal(t *testing.T) { - input := make([]byte, 255) - for i := range input { - input[i] = byte(i) - } - for i := 0; i < 256; i++ { - h, err := New256(nil) - if err != nil { - t.Fatalf("len(input)=%d: error from New256(nil): %v", i, err) - } - h2, err := New256(nil) - if err != nil { - t.Fatalf("len(input)=%d: error from New256(nil): %v", i, err) - } - - h.Write(input[:i/2]) - halfstate, err := h.(encoding.BinaryMarshaler).MarshalBinary() - if err != nil { - t.Fatalf("len(input)=%d: could not marshal: %v", i, err) - } - err = h2.(encoding.BinaryUnmarshaler).UnmarshalBinary(halfstate) - if err != nil { - t.Fatalf("len(input)=%d: could not unmarshal: %v", i, err) - } - - h.Write(input[i/2 : i]) - sum := h.Sum(nil) - h2.Write(input[i/2 : i]) - sum2 := h2.Sum(nil) - - if !bytes.Equal(sum, sum2) { - t.Fatalf("len(input)=%d: results do not match; sum = %v, sum2 = %v", i, sum, sum2) - } - - h3, err := New256(nil) - if err != nil { - t.Fatalf("len(input)=%d: error from New256(nil): %v", i, err) - } - h3.Write(input[:i]) - sum3 := h3.Sum(nil) - if !bytes.Equal(sum, sum3) { - t.Fatalf("len(input)=%d: sum = %v, want %v", i, sum, sum3) - } - } -} - -func testHashes(t *testing.T) { - key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f") - - input := make([]byte, 255) - for i := range input { - input[i] = byte(i) - } - - for i, expectedHex := range hashes { - h, err := New256(key) - if err != nil { - t.Fatalf("#%d: error from New256: %v", i, err) - } - - h.Write(input[:i]) - sum := h.Sum(nil) - - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) - } - - h.Reset() - for j := 0; j < i; j++ { - h.Write(input[j : j+1]) - } - - sum = h.Sum(sum[:0]) - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex) - } - } -} - -func testHashes128(t *testing.T) { - key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f") - - input := make([]byte, 255) - for i := range input { - input[i] = byte(i) - } - - for i, expectedHex := range hashes128 { - h, err := New128(key) - if err != nil { - t.Fatalf("#%d: error from New128: %v", i, err) - } - - h.Write(input[:i]) - sum := h.Sum(nil) - - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) - } - - h.Reset() - for j := 0; j < i; j++ { - h.Write(input[j : j+1]) - } - - sum = h.Sum(sum[:0]) - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex) - } - } -} - -func testHashes2X(t *testing.T) { - key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f") - - input := make([]byte, 256) - for i := range input { - input[i] = byte(i) - } - - for i, expectedHex := range hashes2X { - length := uint16(len(expectedHex) / 2) - sum := make([]byte, int(length)) - - h, err := NewXOF(length, key) - if err != nil { - t.Fatalf("#%d: error from NewXOF: %v", i, err) - } - - if _, err := h.Write(input); err != nil { - t.Fatalf("#%d (single write): error from Write: %v", i, err) - } - if _, err := h.Read(sum); err != nil { - t.Fatalf("#%d (single write): error from Read: %v", i, err) - } - - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) - } - - h.Reset() - for j := 0; j < len(input); j++ { - h.Write(input[j : j+1]) - } - for j := 0; j < len(sum); j++ { - h = h.Clone() - if _, err := h.Read(sum[j : j+1]); err != nil { - t.Fatalf("#%d (byte-by-byte) - Read %d: error from Read: %v", i, j, err) - } - } - if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { - t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex) - } - } - - h, err := NewXOF(OutputLengthUnknown, key) - if err != nil { - t.Fatalf("#unknown length: error from NewXOF: %v", err) - } - if _, err := h.Write(input); err != nil { - t.Fatalf("#unknown length: error from Write: %v", err) - } - - var result [64]byte - if n, err := h.Read(result[:]); err != nil { - t.Fatalf("#unknown length: error from Read: %v", err) - } else if n != len(result) { - t.Fatalf("#unknown length: Read returned %d bytes, want %d", n, len(result)) - } - - const expected = "2a9a6977d915a2c4dd07dbcafe1918bf1682e56d9c8e567ecd19bfd7cd93528833c764d12b34a5e2a219c9fd463dab45e972c5574d73f45de5b2e23af72530d8" - if fmt.Sprintf("%x", result) != expected { - t.Fatalf("#unknown length: bad result %x, wanted %s", result, expected) - } -} - -// Benchmarks - -func benchmarkSum(b *testing.B, size int) { - data := make([]byte, size) - b.SetBytes(int64(size)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Sum256(data) - } -} - -func benchmarkWrite(b *testing.B, size int) { - data := make([]byte, size) - h, _ := New256(nil) - b.SetBytes(int64(size)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - h.Write(data) - } -} - -func BenchmarkWrite64(b *testing.B) { benchmarkWrite(b, 64) } -func BenchmarkWrite1K(b *testing.B) { benchmarkWrite(b, 1024) } - -func BenchmarkSum64(b *testing.B) { benchmarkSum(b, 64) } -func BenchmarkSum1K(b *testing.B) { benchmarkSum(b, 1024) } - -// hashes is taken from https://blake2.net/blake2s-test.txt -var hashes = []string{ - "48a8997da407876b3d79c0d92325ad3b89cbb754d86ab71aee047ad345fd2c49", - "40d15fee7c328830166ac3f918650f807e7e01e177258cdc0a39b11f598066f1", - "6bb71300644cd3991b26ccd4d274acd1adeab8b1d7914546c1198bbe9fc9d803", - "1d220dbe2ee134661fdf6d9e74b41704710556f2f6e5a091b227697445dbea6b", - "f6c3fbadb4cc687a0064a5be6e791bec63b868ad62fba61b3757ef9ca52e05b2", - "49c1f21188dfd769aea0e911dd6b41f14dab109d2b85977aa3088b5c707e8598", - "fdd8993dcd43f696d44f3cea0ff35345234ec8ee083eb3cada017c7f78c17143", - "e6c8125637438d0905b749f46560ac89fd471cf8692e28fab982f73f019b83a9", - "19fc8ca6979d60e6edd3b4541e2f967ced740df6ec1eaebbfe813832e96b2974", - "a6ad777ce881b52bb5a4421ab6cdd2dfba13e963652d4d6d122aee46548c14a7", - "f5c4b2ba1a00781b13aba0425242c69cb1552f3f71a9a3bb22b4a6b4277b46dd", - "e33c4c9bd0cc7e45c80e65c77fa5997fec7002738541509e68a9423891e822a3", - "fba16169b2c3ee105be6e1e650e5cbf40746b6753d036ab55179014ad7ef6651", - "f5c4bec6d62fc608bf41cc115f16d61c7efd3ff6c65692bbe0afffb1fede7475", - "a4862e76db847f05ba17ede5da4e7f91b5925cf1ad4ba12732c3995742a5cd6e", - "65f4b860cd15b38ef814a1a804314a55be953caa65fd758ad989ff34a41c1eea", - "19ba234f0a4f38637d1839f9d9f76ad91c8522307143c97d5f93f69274cec9a7", - "1a67186ca4a5cb8e65fca0e2ecbc5ddc14ae381bb8bffeb9e0a103449e3ef03c", - "afbea317b5a2e89c0bd90ccf5d7fd0ed57fe585e4be3271b0a6bf0f5786b0f26", - "f1b01558ce541262f5ec34299d6fb4090009e3434be2f49105cf46af4d2d4124", - "13a0a0c86335635eaa74ca2d5d488c797bbb4f47dc07105015ed6a1f3309efce", - "1580afeebebb346f94d59fe62da0b79237ead7b1491f5667a90e45edf6ca8b03", - "20be1a875b38c573dd7faaa0de489d655c11efb6a552698e07a2d331b5f655c3", - "be1fe3c4c04018c54c4a0f6b9a2ed3c53abe3a9f76b4d26de56fc9ae95059a99", - "e3e3ace537eb3edd8463d9ad3582e13cf86533ffde43d668dd2e93bbdbd7195a", - "110c50c0bf2c6e7aeb7e435d92d132ab6655168e78a2decdec3330777684d9c1", - "e9ba8f505c9c80c08666a701f3367e6cc665f34b22e73c3c0417eb1c2206082f", - "26cd66fca02379c76df12317052bcafd6cd8c3a7b890d805f36c49989782433a", - "213f3596d6e3a5d0e9932cd2159146015e2abc949f4729ee2632fe1edb78d337", - "1015d70108e03be1c702fe97253607d14aee591f2413ea6787427b6459ff219a", - "3ca989de10cfe609909472c8d35610805b2f977734cf652cc64b3bfc882d5d89", - "b6156f72d380ee9ea6acd190464f2307a5c179ef01fd71f99f2d0f7a57360aea", - "c03bc642b20959cbe133a0303e0c1abff3e31ec8e1a328ec8565c36decff5265", - "2c3e08176f760c6264c3a2cd66fec6c3d78de43fc192457b2a4a660a1e0eb22b", - "f738c02f3c1b190c512b1a32deabf353728e0e9ab034490e3c3409946a97aeec", - "8b1880df301cc963418811088964839287ff7fe31c49ea6ebd9e48bdeee497c5", - "1e75cb21c60989020375f1a7a242839f0b0b68973a4c2a05cf7555ed5aaec4c1", - "62bf8a9c32a5bccf290b6c474d75b2a2a4093f1a9e27139433a8f2b3bce7b8d7", - "166c8350d3173b5e702b783dfd33c66ee0432742e9b92b997fd23c60dc6756ca", - "044a14d822a90cacf2f5a101428adc8f4109386ccb158bf905c8618b8ee24ec3", - "387d397ea43a994be84d2d544afbe481a2000f55252696bba2c50c8ebd101347", - "56f8ccf1f86409b46ce36166ae9165138441577589db08cbc5f66ca29743b9fd", - "9706c092b04d91f53dff91fa37b7493d28b576b5d710469df79401662236fc03", - "877968686c068ce2f7e2adcff68bf8748edf3cf862cfb4d3947a3106958054e3", - "8817e5719879acf7024787eccdb271035566cfa333e049407c0178ccc57a5b9f", - "8938249e4b50cadaccdf5b18621326cbb15253e33a20f5636e995d72478de472", - "f164abba4963a44d107257e3232d90aca5e66a1408248c51741e991db5227756", - "d05563e2b1cba0c4a2a1e8bde3a1a0d9f5b40c85a070d6f5fb21066ead5d0601", - "03fbb16384f0a3866f4c3117877666efbf124597564b293d4aab0d269fabddfa", - "5fa8486ac0e52964d1881bbe338eb54be2f719549224892057b4da04ba8b3475", - "cdfabcee46911111236a31708b2539d71fc211d9b09c0d8530a11e1dbf6eed01", - "4f82de03b9504793b82a07a0bdcdff314d759e7b62d26b784946b0d36f916f52", - "259ec7f173bcc76a0994c967b4f5f024c56057fb79c965c4fae41875f06a0e4c", - "193cc8e7c3e08bb30f5437aa27ade1f142369b246a675b2383e6da9b49a9809e", - "5c10896f0e2856b2a2eee0fe4a2c1633565d18f0e93e1fab26c373e8f829654d", - "f16012d93f28851a1eb989f5d0b43f3f39ca73c9a62d5181bff237536bd348c3", - "2966b3cfae1e44ea996dc5d686cf25fa053fb6f67201b9e46eade85d0ad6b806", - "ddb8782485e900bc60bcf4c33a6fd585680cc683d516efa03eb9985fad8715fb", - "4c4d6e71aea05786413148fc7a786b0ecaf582cff1209f5a809fba8504ce662c", - "fb4c5e86d7b2229b99b8ba6d94c247ef964aa3a2bae8edc77569f28dbbff2d4e", - "e94f526de9019633ecd54ac6120f23958d7718f1e7717bf329211a4faeed4e6d", - "cbd6660a10db3f23f7a03d4b9d4044c7932b2801ac89d60bc9eb92d65a46c2a0", - "8818bbd3db4dc123b25cbba5f54c2bc4b3fcf9bf7d7a7709f4ae588b267c4ece", - "c65382513f07460da39833cb666c5ed82e61b9e998f4b0c4287cee56c3cc9bcd", - "8975b0577fd35566d750b362b0897a26c399136df07bababbde6203ff2954ed4", - "21fe0ceb0052be7fb0f004187cacd7de67fa6eb0938d927677f2398c132317a8", - "2ef73f3c26f12d93889f3c78b6a66c1d52b649dc9e856e2c172ea7c58ac2b5e3", - "388a3cd56d73867abb5f8401492b6e2681eb69851e767fd84210a56076fb3dd3", - "af533e022fc9439e4e3cb838ecd18692232adf6fe9839526d3c3dd1b71910b1a", - "751c09d41a9343882a81cd13ee40818d12eb44c6c7f40df16e4aea8fab91972a", - "5b73ddb68d9d2b0aa265a07988d6b88ae9aac582af83032f8a9b21a2e1b7bf18", - "3da29126c7c5d7f43e64242a79feaa4ef3459cdeccc898ed59a97f6ec93b9dab", - "566dc920293da5cb4fe0aa8abda8bbf56f552313bff19046641e3615c1e3ed3f", - "4115bea02f73f97f629e5c5590720c01e7e449ae2a6697d4d2783321303692f9", - "4ce08f4762468a7670012164878d68340c52a35e66c1884d5c864889abc96677", - "81ea0b7804124e0c22ea5fc71104a2afcb52a1fa816f3ecb7dcb5d9dea1786d0", - "fe362733b05f6bedaf9379d7f7936ede209b1f8323c3922549d9e73681b5db7b", - "eff37d30dfd20359be4e73fdf40d27734b3df90a97a55ed745297294ca85d09f", - "172ffc67153d12e0ca76a8b6cd5d4731885b39ce0cac93a8972a18006c8b8baf", - "c47957f1cc88e83ef9445839709a480a036bed5f88ac0fcc8e1e703ffaac132c", - "30f3548370cfdceda5c37b569b6175e799eef1a62aaa943245ae7669c227a7b5", - "c95dcb3cf1f27d0eef2f25d2413870904a877c4a56c2de1e83e2bc2ae2e46821", - "d5d0b5d705434cd46b185749f66bfb5836dcdf6ee549a2b7a4aee7f58007caaf", - "bbc124a712f15d07c300e05b668389a439c91777f721f8320c1c9078066d2c7e", - "a451b48c35a6c7854cfaae60262e76990816382ac0667e5a5c9e1b46c4342ddf", - "b0d150fb55e778d01147f0b5d89d99ecb20ff07e5e6760d6b645eb5b654c622b", - "34f737c0ab219951eee89a9f8dac299c9d4c38f33fa494c5c6eefc92b6db08bc", - "1a62cc3a00800dcbd99891080c1e098458193a8cc9f970ea99fbeff00318c289", - "cfce55ebafc840d7ae48281c7fd57ec8b482d4b704437495495ac414cf4a374b", - "6746facf71146d999dabd05d093ae586648d1ee28e72617b99d0f0086e1e45bf", - "571ced283b3f23b4e750bf12a2caf1781847bd890e43603cdc5976102b7bb11b", - "cfcb765b048e35022c5d089d26e85a36b005a2b80493d03a144e09f409b6afd1", - "4050c7a27705bb27f42089b299f3cbe5054ead68727e8ef9318ce6f25cd6f31d", - "184070bd5d265fbdc142cd1c5cd0d7e414e70369a266d627c8fba84fa5e84c34", - "9edda9a4443902a9588c0d0ccc62b930218479a6841e6fe7d43003f04b1fd643", - "e412feef7908324a6da1841629f35d3d358642019310ec57c614836b63d30763", - "1a2b8edff3f9acc1554fcbae3cf1d6298c6462e22e5eb0259684f835012bd13f", - "288c4ad9b9409762ea07c24a41f04f69a7d74bee2d95435374bde946d7241c7b", - "805691bb286748cfb591d3aebe7e6f4e4dc6e2808c65143cc004e4eb6fd09d43", - "d4ac8d3a0afc6cfa7b460ae3001baeb36dadb37da07d2e8ac91822df348aed3d", - "c376617014d20158bced3d3ba552b6eccf84e62aa3eb650e90029c84d13eea69", - "c41f09f43cecae7293d6007ca0a357087d5ae59be500c1cd5b289ee810c7b082", - "03d1ced1fba5c39155c44b7765cb760c78708dcfc80b0bd8ade3a56da8830b29", - "09bde6f152218dc92c41d7f45387e63e5869d807ec70b821405dbd884b7fcf4b", - "71c9036e18179b90b37d39e9f05eb89cc5fc341fd7c477d0d7493285faca08a4", - "5916833ebb05cd919ca7fe83b692d3205bef72392b2cf6bb0a6d43f994f95f11", - "f63aab3ec641b3b024964c2b437c04f6043c4c7e0279239995401958f86bbe54", - "f172b180bfb09740493120b6326cbdc561e477def9bbcfd28cc8c1c5e3379a31", - "cb9b89cc18381dd9141ade588654d4e6a231d5bf49d4d59ac27d869cbe100cf3", - "7bd8815046fdd810a923e1984aaebdcdf84d87c8992d68b5eeb460f93eb3c8d7", - "607be66862fd08ee5b19facac09dfdbcd40c312101d66e6ebd2b841f1b9a9325", - "9fe03bbe69ab1834f5219b0da88a08b30a66c5913f0151963c360560db0387b3", - "90a83585717b75f0e9b725e055eeeeb9e7a028ea7e6cbc07b20917ec0363e38c", - "336ea0530f4a7469126e0218587ebbde3358a0b31c29d200f7dc7eb15c6aadd8", - "a79e76dc0abca4396f0747cd7b748df913007626b1d659da0c1f78b9303d01a3", - "44e78a773756e0951519504d7038d28d0213a37e0ce375371757bc996311e3b8", - "77ac012a3f754dcfeab5eb996be9cd2d1f96111b6e49f3994df181f28569d825", - "ce5a10db6fccdaf140aaa4ded6250a9c06e9222bc9f9f3658a4aff935f2b9f3a", - "ecc203a7fe2be4abd55bb53e6e673572e0078da8cd375ef430cc97f9f80083af", - "14a5186de9d7a18b0412b8563e51cc5433840b4a129a8ff963b33a3c4afe8ebb", - "13f8ef95cb86e6a638931c8e107673eb76ba10d7c2cd70b9d9920bbeed929409", - "0b338f4ee12f2dfcb78713377941e0b0632152581d1332516e4a2cab1942cca4", - "eaab0ec37b3b8ab796e9f57238de14a264a076f3887d86e29bb5906db5a00e02", - "23cb68b8c0e6dc26dc27766ddc0a13a99438fd55617aa4095d8f969720c872df", - "091d8ee30d6f2968d46b687dd65292665742de0bb83dcc0004c72ce10007a549", - "7f507abc6d19ba00c065a876ec5657868882d18a221bc46c7a6912541f5bc7ba", - "a0607c24e14e8c223db0d70b4d30ee88014d603f437e9e02aa7dafa3cdfbad94", - "ddbfea75cc467882eb3483ce5e2e756a4f4701b76b445519e89f22d60fa86e06", - "0c311f38c35a4fb90d651c289d486856cd1413df9b0677f53ece2cd9e477c60a", - "46a73a8dd3e70f59d3942c01df599def783c9da82fd83222cd662b53dce7dbdf", - "ad038ff9b14de84a801e4e621ce5df029dd93520d0c2fa38bff176a8b1d1698c", - "ab70c5dfbd1ea817fed0cd067293abf319e5d7901c2141d5d99b23f03a38e748", - "1fffda67932b73c8ecaf009a3491a026953babfe1f663b0697c3c4ae8b2e7dcb", - "b0d2cc19472dd57f2b17efc03c8d58c2283dbb19da572f7755855aa9794317a0", - "a0d19a6ee33979c325510e276622df41f71583d07501b87071129a0ad94732a5", - "724642a7032d1062b89e52bea34b75df7d8fe772d9fe3c93ddf3c4545ab5a99b", - "ade5eaa7e61f672d587ea03dae7d7b55229c01d06bc0a5701436cbd18366a626", - "013b31ebd228fcdda51fabb03bb02d60ac20ca215aafa83bdd855e3755a35f0b", - "332ed40bb10dde3c954a75d7b8999d4b26a1c063c1dc6e32c1d91bab7bbb7d16", - "c7a197b3a05b566bcc9facd20e441d6f6c2860ac9651cd51d6b9d2cdeeea0390", - "bd9cf64ea8953c037108e6f654914f3958b68e29c16700dc184d94a21708ff60", - "8835b0ac021151df716474ce27ce4d3c15f0b2dab48003cf3f3efd0945106b9a", - "3bfefa3301aa55c080190cffda8eae51d9af488b4c1f24c3d9a75242fd8ea01d", - "08284d14993cd47d53ebaecf0df0478cc182c89c00e1859c84851686ddf2c1b7", - "1ed7ef9f04c2ac8db6a864db131087f27065098e69c3fe78718d9b947f4a39d0", - "c161f2dcd57e9c1439b31a9dd43d8f3d7dd8f0eb7cfac6fb25a0f28e306f0661", - "c01969ad34c52caf3dc4d80d19735c29731ac6e7a92085ab9250c48dea48a3fc", - "1720b3655619d2a52b3521ae0e49e345cb3389ebd6208acaf9f13fdacca8be49", - "756288361c83e24c617cf95c905b22d017cdc86f0bf1d658f4756c7379873b7f", - "e7d0eda3452693b752abcda1b55e276f82698f5f1605403eff830bea0071a394", - "2c82ecaa6b84803e044af63118afe544687cb6e6c7df49ed762dfd7c8693a1bc", - "6136cbf4b441056fa1e2722498125d6ded45e17b52143959c7f4d4e395218ac2", - "721d3245aafef27f6a624f47954b6c255079526ffa25e9ff77e5dcff473b1597", - "9dd2fbd8cef16c353c0ac21191d509eb28dd9e3e0d8cea5d26ca839393851c3a", - "b2394ceacdebf21bf9df2ced98e58f1c3a4bbbff660dd900f62202d6785cc46e", - "57089f222749ad7871765f062b114f43ba20ec56422a8b1e3f87192c0ea718c6", - "e49a9459961cd33cdf4aae1b1078a5dea7c040e0fea340c93a724872fc4af806", - "ede67f720effd2ca9c88994152d0201dee6b0a2d2c077aca6dae29f73f8b6309", - "e0f434bf22e3088039c21f719ffc67f0f2cb5e98a7a0194c76e96bf4e8e17e61", - "277c04e2853484a4eba910ad336d01b477b67cc200c59f3c8d77eef8494f29cd", - "156d5747d0c99c7f27097d7b7e002b2e185cb72d8dd7eb424a0321528161219f", - "20ddd1ed9b1ca803946d64a83ae4659da67fba7a1a3eddb1e103c0f5e03e3a2c", - "f0af604d3dabbf9a0f2a7d3dda6bd38bba72c6d09be494fcef713ff10189b6e6", - "9802bb87def4cc10c4a5fd49aa58dfe2f3fddb46b4708814ead81d23ba95139b", - "4f8ce1e51d2fe7f24043a904d898ebfc91975418753413aa099b795ecb35cedb", - "bddc6514d7ee6ace0a4ac1d0e068112288cbcf560454642705630177cba608bd", - "d635994f6291517b0281ffdd496afa862712e5b3c4e52e4cd5fdae8c0e72fb08", - "878d9ca600cf87e769cc305c1b35255186615a73a0da613b5f1c98dbf81283ea", - "a64ebe5dc185de9fdde7607b6998702eb23456184957307d2fa72e87a47702d6", - "ce50eab7b5eb52bdc9ad8e5a480ab780ca9320e44360b1fe37e03f2f7ad7de01", - "eeddb7c0db6e30abe66d79e327511e61fcebbc29f159b40a86b046ecf0513823", - "787fc93440c1ec96b5ad01c16cf77916a1405f9426356ec921d8dff3ea63b7e0", - "7f0d5eab47eefda696c0bf0fbf86ab216fce461e9303aba6ac374120e890e8df", - "b68004b42f14ad029f4c2e03b1d5eb76d57160e26476d21131bef20ada7d27f4", - "b0c4eb18ae250b51a41382ead92d0dc7455f9379fc9884428e4770608db0faec", - "f92b7a870c059f4d46464c824ec96355140bdce681322cc3a992ff103e3fea52", - "5364312614813398cc525d4c4e146edeb371265fba19133a2c3d2159298a1742", - "f6620e68d37fb2af5000fc28e23b832297ecd8bce99e8be4d04e85309e3d3374", - "5316a27969d7fe04ff27b283961bffc3bf5dfb32fb6a89d101c6c3b1937c2871", - "81d1664fdf3cb33c24eebac0bd64244b77c4abea90bbe8b5ee0b2aafcf2d6a53", - "345782f295b0880352e924a0467b5fbc3e8f3bfbc3c7e48b67091fb5e80a9442", - "794111ea6cd65e311f74ee41d476cb632ce1e4b051dc1d9e9d061a19e1d0bb49", - "2a85daf6138816b99bf8d08ba2114b7ab07975a78420c1a3b06a777c22dd8bcb", - "89b0d5f289ec16401a069a960d0b093e625da3cf41ee29b59b930c5820145455", - "d0fdcb543943fc27d20864f52181471b942cc77ca675bcb30df31d358ef7b1eb", - "b17ea8d77063c709d4dc6b879413c343e3790e9e62ca85b7900b086f6b75c672", - "e71a3e2c274db842d92114f217e2c0eac8b45093fdfd9df4ca7162394862d501", - "c0476759ab7aa333234f6b44f5fd858390ec23694c622cb986e769c78edd733e", - "9ab8eabb1416434d85391341d56993c55458167d4418b19a0f2ad8b79a83a75b", - "7992d0bbb15e23826f443e00505d68d3ed7372995a5c3e498654102fbcd0964e", - "c021b30085151435df33b007ccecc69df1269f39ba25092bed59d932ac0fdc28", - "91a25ec0ec0d9a567f89c4bfe1a65a0e432d07064b4190e27dfb81901fd3139b", - "5950d39a23e1545f301270aa1a12f2e6c453776e4d6355de425cc153f9818867", - "d79f14720c610af179a3765d4b7c0968f977962dbf655b521272b6f1e194488e", - "e9531bfc8b02995aeaa75ba27031fadbcbf4a0dab8961d9296cd7e84d25d6006", - "34e9c26a01d7f16181b454a9d1623c233cb99d31c694656e9413aca3e918692f", - "d9d7422f437bd439ddd4d883dae2a08350173414be78155133fff1964c3d7972", - "4aee0c7aaf075414ff1793ead7eaca601775c615dbd60b640b0a9f0ce505d435", - "6bfdd15459c83b99f096bfb49ee87b063d69c1974c6928acfcfb4099f8c4ef67", - "9fd1c408fd75c336193a2a14d94f6af5adf050b80387b4b010fb29f4cc72707c", - "13c88480a5d00d6c8c7ad2110d76a82d9b70f4fa6696d4e5dd42a066dcaf9920", - "820e725ee25fe8fd3a8d5abe4c46c3ba889de6fa9191aa22ba67d5705421542b", - "32d93a0eb02f42fbbcaf2bad0085b282e46046a4df7ad10657c9d6476375b93e", - "adc5187905b1669cd8ec9c721e1953786b9d89a9bae30780f1e1eab24a00523c", - "e90756ff7f9ad810b239a10ced2cf9b2284354c1f8c7e0accc2461dc796d6e89", - "1251f76e56978481875359801db589a0b22f86d8d634dc04506f322ed78f17e8", - "3afa899fd980e73ecb7f4d8b8f291dc9af796bc65d27f974c6f193c9191a09fd", - "aa305be26e5deddc3c1010cbc213f95f051c785c5b431e6a7cd048f161787528", - "8ea1884ff32e9d10f039b407d0d44e7e670abd884aeee0fb757ae94eaa97373d", - "d482b2155d4dec6b4736a1f1617b53aaa37310277d3fef0c37ad41768fc235b4", - "4d413971387e7a8898a8dc2a27500778539ea214a2dfe9b3d7e8ebdce5cf3db3", - "696e5d46e6c57e8796e4735d08916e0b7929b3cf298c296d22e9d3019653371c", - "1f5647c1d3b088228885865c8940908bf40d1a8272821973b160008e7a3ce2eb", - "b6e76c330f021a5bda65875010b0edf09126c0f510ea849048192003aef4c61c", - "3cd952a0beada41abb424ce47f94b42be64e1ffb0fd0782276807946d0d0bc55", - "98d92677439b41b7bb513312afb92bcc8ee968b2e3b238cecb9b0f34c9bb63d0", - "ecbca2cf08ae57d517ad16158a32bfa7dc0382eaeda128e91886734c24a0b29d", - "942cc7c0b52e2b16a4b89fa4fc7e0bf609e29a08c1a8543452b77c7bfd11bb28", - "8a065d8b61a0dffb170d5627735a76b0e9506037808cba16c345007c9f79cf8f", - "1b9fa19714659c78ff413871849215361029ac802b1cbcd54e408bd87287f81f", - "8dab071bcd6c7292a9ef727b4ae0d86713301da8618d9a48adce55f303a869a1", - "8253e3e7c7b684b9cb2beb014ce330ff3d99d17abbdbabe4f4d674ded53ffc6b", - "f195f321e9e3d6bd7d074504dd2ab0e6241f92e784b1aa271ff648b1cab6d7f6", - "27e4cc72090f241266476a7c09495f2db153d5bcbd761903ef79275ec56b2ed8", - "899c2405788e25b99a1846355e646d77cf400083415f7dc5afe69d6e17c00023", - "a59b78c4905744076bfee894de707d4f120b5c6893ea0400297d0bb834727632", - "59dc78b105649707a2bb4419c48f005400d3973de3736610230435b10424b24f", - "c0149d1d7e7a6353a6d906efe728f2f329fe14a4149a3ea77609bc42b975ddfa", - "a32f241474a6c16932e9243be0cf09bcdc7e0ca0e7a6a1b9b1a0f01e41502377", - "b239b2e4f81841361c1339f68e2c359f929af9ad9f34e01aab4631ad6d5500b0", - "85fb419c7002a3e0b4b6ea093b4c1ac6936645b65dac5ac15a8528b7b94c1754", - "9619720625f190b93a3fad186ab314189633c0d3a01e6f9bc8c4a8f82f383dbf", - "7d620d90fe69fa469a6538388970a1aa09bb48a2d59b347b97e8ce71f48c7f46", - "294383568596fb37c75bbacd979c5ff6f20a556bf8879cc72924855df9b8240e", - "16b18ab314359c2b833c1c6986d48c55a9fc97cde9a3c1f10a3177140f73f738", - "8cbbdd14bc33f04cf45813e4a153a273d36adad5ce71f499eeb87fb8ac63b729", - "69c9a498db174ecaefcc5a3ac9fdedf0f813a5bec727f1e775babdec7718816e", - "b462c3be40448f1d4f80626254e535b08bc9cdcff599a768578d4b2881a8e3f0", - "553e9d9c5f360ac0b74a7d44e5a391dad4ced03e0c24183b7e8ecabdf1715a64", - "7a7c55a56fa9ae51e655e01975d8a6ff4ae9e4b486fcbe4eac044588f245ebea", - "2afdf3c82abc4867f5de111286c2b3be7d6e48657ba923cfbf101a6dfcf9db9a", - "41037d2edcdce0c49b7fb4a6aa0999ca66976c7483afe631d4eda283144f6dfc", - "c4466f8497ca2eeb4583a0b08e9d9ac74395709fda109d24f2e4462196779c5d", - "75f609338aa67d969a2ae2a2362b2da9d77c695dfd1df7224a6901db932c3364", - "68606ceb989d5488fc7cf649f3d7c272ef055da1a93faecd55fe06f6967098ca", - "44346bdeb7e052f6255048f0d9b42c425bab9c3dd24168212c3ecf1ebf34e6ae", - "8e9cf6e1f366471f2ac7d2ee9b5e6266fda71f8f2e4109f2237ed5f8813fc718", - "84bbeb8406d250951f8c1b3e86a7c010082921833dfd9555a2f909b1086eb4b8", - "ee666f3eef0f7e2a9c222958c97eaf35f51ced393d714485ab09a069340fdf88", - "c153d34a65c47b4a62c5cacf24010975d0356b2f32c8f5da530d338816ad5de6", - "9fc5450109e1b779f6c7ae79d56c27635c8dd426c5a9d54e2578db989b8c3b4e", - "d12bf3732ef4af5c22fa90356af8fc50fcb40f8f2ea5c8594737a3b3d5abdbd7", - "11030b9289bba5af65260672ab6fee88b87420acef4a1789a2073b7ec2f2a09e", - "69cb192b8444005c8c0ceb12c846860768188cda0aec27a9c8a55cdee2123632", - "db444c15597b5f1a03d1f9edd16e4a9f43a667cc275175dfa2b704e3bb1a9b83", - "3fb735061abc519dfe979e54c1ee5bfad0a9d858b3315bad34bde999efd724dd", -} - -var hashes128 = []string{ - "9536f9b267655743dee97b8a670f9f53", - "13bacfb85b48a1223c595f8c1e7e82cb", - "d47a9b1645e2feae501cd5fe44ce6333", - "1e2a79436a7796a3e9826bfedf07659f", - "7640360ed3c4f3054dba79a21dda66b7", - "d1207ac2bf5ac84fc9ef016da5a46a86", - "3123987871e59305ece3125abfc0099a", - "cf9e072ad522f2cda2d825218086731c", - "95d22870392efe2846b12b6e8e84efbb", - "7d63c30e2d51333f245601b038c0b93b", - "ed608b98e13976bdf4bedc63fa35e443", - "ed704b5cd1abf8e0dd67a6ac667a3fa5", - "77dc70109827dc74c70fd26cba379ae5", - "d2bf34508b07825ee934f33958f4560e", - "a340baa7b8a93a6e658adef42e78eeb7", - "b85c5ceaecbe9a251eac76f6932ba395", - "246519722001f6e8e97a2183f5985e53", - "5bce5aa0b7c6cac2ecf6406183cd779a", - "13408f1647c02f6efd0047ad8344f695", - "a63970f196760aa36cb965ab62f0e0fa", - "bc26f48421dd99fd45e15e736d3e7dac", - "4c6f70f9e3237cde918afb52d26f1823", - "45ed610cfbc37db80c4bf0eef14ae8d6", - "87c4c150705ea5078209ec008200539c", - "54de21f5e0e6f2afe04daeb822b6931e", - "9732a04e505064e19de3d542e7e71631", - "d2bd27e95531d6957eef511c4ba64ad4", - "7a36c9f70dcc7c3063b547101a5f6c35", - "322007d1a44c4257bc7903b183305529", - "dbcc9a09f412290ca2e0d53dfd142ddb", - "df12ed43b8e53a56db20e0f83764002c", - "d114cc11e7d5b33a360c45f18d4c7c6e", - "c43b5e836af88620a8a71b1652cb8640", - "9491c653e8867ed73c1b4ac6b5a9bb4d", - "06d0e988df94ada6c6f9f36f588ab7c5", - "561efad2480e93262c8eeaa3677615c4", - "ba8ffc702e5adc93503045eca8702312", - "5782be6ccdc78c8425285e85de8ccdc6", - "aa1c4393e4c07b53ea6e2b5b1e970771", - "42a229dc50e52271c51e8666023ebc1e", - "53706110e919f84de7f8d6c7f0e7b831", - "fc5ac8ee39cc1dd1424391323e2901bd", - "bed27b62ff66cac2fbb68193c727106a", - "cd5e689b96d0b9ea7e08dac36f7b211e", - "0b4c7f604eba058d18e322c6e1baf173", - "eb838227fdfad09a27f0f8413120675d", - "3149cf9d19a7fd529e6154a8b4c3b3ad", - "ca1e20126df930fd5fb7afe4422191e5", - "b23398f910599f3c09b6549fa81bcb46", - "27fb17c11b34fa5d8b5afe5ee3321ead", - "0f665f5f04cf2d46b7fead1a1f328158", - "8f068be73b3681f99f3b282e3c02bba5", - "ba189bbd13808dcf4e002a4dd21660d5", - "2732dcd1b16668ae6ab6a61595d0d62a", - "d410ccdd059f0e02b472ec9ec54bdd3c", - "b2eaa07b055b3a03a399971327f7e8c2", - "2e8a225655e9f99b69c60dc8b4d8e566", - "4eb55416c853f2152e67f8a224133cec", - "49552403790d8de0505a8e317a443687", - "7f2747cd41f56942752e868212c7d5ac", - "02a28f10e193b430df7112d2d98cf759", - "d4213404a9f1cf759017747cf5958270", - "faa34884344f9c65e944882db8476d34", - "ece382a8bd5018f1de5da44b72cea75b", - "f1efa90d2547036841ecd3627fafbc36", - "811ff8686d23a435ecbd0bdafcd27b1b", - "b21beea9c7385f657a76558530438721", - "9cb969da4f1b4fc5b13bf78fe366f0c4", - "8850d16d7b614d3268ccfa009d33c7fc", - "aa98a2b6176ea86415b9aff3268c6f6d", - "ec3e1efa5ed195eff667e16b1af1e39e", - "e40787dca57411d2630db2de699beb08", - "554835890735babd06318de23d31e78a", - "493957feecddc302ee2bb2086b6ebfd3", - "f6069709ad5b0139163717e9ce1114ab", - "ba5ed386098da284484b211555505a01", - "9244c8dfad8cbb68c118fa51465b3ae4", - "51e309a5008eb1f5185e5cc007cfb36f", - "6ce9ff712121b4f6087955f4911eafd4", - "59b51d8dcda031218ccdd7c760828155", - "0012878767a3d4f1c8194458cf1f8832", - "82900708afd5b6582dc16f008c655edd", - "21302c7e39b5a4cdf1d6f86b4f00c9b4", - "e894c7431591eab8d1ce0fe2aa1f01df", - "b67e1c40ee9d988226d605621854d955", - "6237bdafa34137cbbec6be43ea9bd22c", - "4172a8e19b0dcb09b978bb9eff7af52b", - "5714abb55bd4448a5a6ad09fbd872fdf", - "7ce1700bef423e1f958a94a77a94d44a", - "3742ec50cded528527775833453e0b26", - "5d41b135724c7c9c689495324b162f18", - "85c523333c6442c202e9e6e0f1185f93", - "5c71f5222d40ff5d90e7570e71ab2d30", - "6e18912e83d012efb4c66250ced6f0d9", - "4add4448c2e35e0b138a0bac7b4b1775", - "c0376c6bc5e7b8b9d2108ec25d2aab53", - "f72261d5ed156765c977751c8a13fcc1", - "cff4156c48614b6ceed3dd6b9058f17e", - "36bfb513f76c15f514bcb593419835aa", - "166bf48c6bffaf8291e6fdf63854bef4", - "0b67d33f8b859c3157fbabd9e6e47ed0", - "e4da659ca76c88e73a9f9f10f3d51789", - "33c1ae2a86b3f51c0642e6ed5b5aa1f1", - "27469b56aca2334449c1cf4970dcd969", - "b7117b2e363378aa0901b0d6a9f6ddc0", - "a9578233b09e5cd5231943fdb12cd90d", - "486d7d75253598b716a068243c1c3e89", - "66f6b02d682b78ffdc85e9ec86852489", - "38a07b9a4b228fbcc305476e4d2e05d2", - "aedb61c7970e7d05bf9002dae3c6858c", - "c03ef441f7dd30fdb61ad2d4d8e4c7da", - "7f45cc1eea9a00cb6aeb2dd748361190", - "a59538b358459132e55160899e47bd65", - "137010fef72364411820c3fbed15c8df", - "d8362b93fc504500dbd33ac74e1b4d70", - "a7e49f12c8f47e3b29cf8c0889b0a9c8", - "072e94ffbfc684bd8ab2a1b9dade2fd5", - "5ab438584bd2229e452052e002631a5f", - "f233d14221097baef57d3ec205c9e086", - "3a95db000c4a8ff98dc5c89631a7f162", - "0544f18c2994ab4ddf1728f66041ff16", - "0bc02116c60a3cc331928d6c9d3ba37e", - "b189dca6cb5b813c74200834fba97f29", - "ac8aaab075b4a5bc24419da239212650", - "1e9f19323dc71c29ae99c479dc7e8df9", - "12d944c3fa7caa1b3d62adfc492274dd", - "b4c68f1fffe8f0030e9b18aad8c9dc96", - "25887fab1422700d7fa3edc0b20206e2", - "8c09f698d03eaf88abf69f8147865ef6", - "5c363ae42a5bec26fbc5e996428d9bd7", - "7fdfc2e854fbb3928150d5e3abcf56d6", - "f0c944023f714df115f9e4f25bcdb89b", - "6d19534b4c332741c8ddd79a9644de2d", - "32595eb23764fbfc2ee7822649f74a12", - "5a51391aab33c8d575019b6e76ae052a", - "98b861ce2c620f10f913af5d704a5afd", - "b7fe2fc8b77fb1ce434f8465c7ddf793", - "0e8406e0cf8e9cc840668ece2a0fc64e", - "b89922db99c58f6a128ccffe19b6ce60", - "e1be9af665f0932b77d7f5631a511db7", - "74b96f20f58de8dc9ff5e31f91828523", - "36a4cfef5a2a7d8548db6710e50b3009", - "007e95e8d3b91948a1dedb91f75de76b", - "a87a702ce08f5745edf765bfcd5fbe0d", - "847e69a388a749a9c507354d0dddfe09", - "07176eefbc107a78f058f3d424ca6a54", - "ad7e80682333b68296f6cb2b4a8e446d", - "53c4aba43896ae422e5de5b9edbd46bf", - "33bd6c20ca2a7ab916d6e98003c6c5f8", - "060d088ea94aa093f9981a79df1dfcc8", - "5617b214b9df08d4f11e58f5e76d9a56", - "ca3a60ee85bd971e1daf9f7db059d909", - "cd2b7754505d8c884eddf736f1ec613e", - "f496163b252f1439e7e113ba2ecabd8e", - "5719c7dcf9d9f756d6213354acb7d5cf", - "6f7dd40b245c54411e7a9be83ae5701c", - "c8994dd9fdeb077a45ea04a30358b637", - "4b1184f1e35458c1c747817d527a252f", - "fc7df674afeac7a3fd994183f4c67a74", - "4f68e05ce4dcc533acf9c7c01d95711e", - "d4ebc59e918400720035dfc88e0c486a", - "d3105dd6fa123e543b0b3a6e0eeaea9e", - "874196128ed443f5bdb2800ca048fcad", - "01645f134978dc8f9cf0abc93b53780e", - "5b8b64caa257873a0ffd47c981ef6c3f", - "4ee208fc50ba0a6e65c5b58cec44c923", - "53f409a52427b3b7ffabb057ca088428", - "c1d6cd616f5341a93d921e356e5887a9", - "e85c20fea67fa7320dc23379181183c8", - "7912b6409489df001b7372bc94aebde7", - "e559f761ec866a87f1f331767fafc60f", - "20a6f5a36bc37043d977ed7708465ef8", - "6a72f526965ab120826640dd784c6cc4", - "bf486d92ad68e87c613689dd370d001b", - "d339fd0eb35edf3abd6419c8d857acaf", - "9521cd7f32306d969ddabc4e6a617f52", - "a1cd9f3e81520842f3cf6cc301cb0021", - "18e879b6f154492d593edd3f4554e237", - "66e2329c1f5137589e051592587e521e", - "e899566dd6c3e82cbc83958e69feb590", - "8a4b41d7c47e4e80659d77b4e4bfc9ae", - "f1944f6fcfc17803405a1101998c57dd", - "f6bcec07567b4f72851b307139656b18", - "22e7bb256918fe9924dce9093e2d8a27", - "dd25b925815fe7b50b7079f5f65a3970", - "0457f10f299acf0c230dd4007612e58f", - "ecb420c19efd93814fae2964d69b54af", - "14eb47b06dff685d88751c6e32789db4", - "e8f072dbb50d1ab6654aa162604a892d", - "69cff9c62092332f03a166c7b0034469", - "d3619f98970b798ca32c6c14cd25af91", - "2246d423774ee9d51a551e89c0539d9e", - "75e5d1a1e374a04a699247dad827b6cf", - "6d087dd1d4cd15bf47db07c7a96b1db8", - "967e4c055ac51b4b2a3e506cebd5826f", - "7417aa79247e473401bfa92a25b62e2a", - "24f3f4956da34b5c533d9a551ccd7b16", - "0c40382de693a5304e2331eb951cc962", - "9436f949d51b347db5c8e6258dafaaac", - "d2084297fe84c4ba6e04e4fb73d734fe", - "42a6f8ff590af21b512e9e088257aa34", - "c484ad06b1cdb3a54f3f6464a7a2a6fd", - "1b8ac860f5ceb4365400a201ed2917aa", - "c43eadabbe7b7473f3f837fc52650f54", - "0e5d3205406126b1f838875deb150d6a", - "6bf4946f8ec8a9c417f50cd1e67565be", - "42f09a2522314799c95b3fc121a0e3e8", - "06b8f1487f691a3f7c3f74e133d55870", - "1a70a65fb4f314dcf6a31451a9d2704f", - "7d4acdd0823279fd28a1e48b49a04669", - "09545cc8822a5dfc93bbab708fd69174", - "efc063db625013a83c9a426d39a9bddb", - "213bbf89b3f5be0ffdb14854bbcb2588", - "b69624d89fe2774df9a6f43695d755d4", - "c0f9ff9ded82bd73c512e365a894774d", - "d1b68507ed89c17ead6f69012982db71", - "14cf16db04648978e35c44850855d1b0", - "9f254d4eccab74cd91d694df863650a8", - "8f8946e2967baa4a814d36ff01d20813", - "6b9dc4d24ecba166cb2915d7a6cba43b", - "eb35a80418a0042b850e294db7898d4d", - "f55f925d280c637d54055c9df088ef5f", - "f48427a04f67e33f3ba0a17f7c9704a7", - "4a9f5bfcc0321aea2eced896cee65894", - "8723a67d1a1df90f1cef96e6fe81e702", - "c166c343ee25998f80bad4067960d3fd", - "dab67288d16702e676a040fd42344d73", - "c8e9e0d80841eb2c116dd14c180e006c", - "92294f546bacf0dea9042c93ecba8b34", - "013705b1502b37369ad22fe8237d444e", - "9b97f8837d5f2ebab0768fc9a6446b93", - "7e7e5236b05ec35f89edf8bf655498e7", - "7be8f2362c174c776fb9432fe93bf259", - "2422e80420276d2df5702c6470879b01", - "df645795db778bcce23bbe819a76ba48", - "3f97a4ac87dfc58761cda1782d749074", - "50e3f45df21ebfa1b706b9c0a1c245a8", - "7879541c7ff612c7ddf17cb8f7260183", - "67f6542b903b7ba1945eba1a85ee6b1c", - "b34b73d36ab6234b8d3f5494d251138e", - "0aea139641fdba59ab1103479a96e05f", - "02776815a87b8ba878453666d42afe3c", - "5929ab0a90459ebac5a16e2fb37c847e", - "c244def5b20ce0468f2b5012d04ac7fd", - "12116add6fefce36ed8a0aeccce9b6d3", - "3cd743841e9d8b878f34d91b793b4fad", - "45e87510cf5705262185f46905fae35f", - "276047016b0bfb501b2d4fc748165793", - "ddd245df5a799417d350bd7f4e0b0b7e", - "d34d917a54a2983f3fdbc4b14caae382", - "7730fbc09d0c1fb1939a8fc436f6b995", - "eb4899ef257a1711cc9270a19702e5b5", - "8a30932014bce35bba620895d374df7a", - "1924aabf9c50aa00bee5e1f95b5d9e12", - "1758d6f8b982aec9fbe50f20e3082b46", - "cd075928ab7e6883e697fe7fd3ac43ee", -} - -// hashes2X is taken from -// https://github.com/BLAKE2/BLAKE2/blob/master/testvectors/blake2-kat.json -var hashes2X = []string{ - "0e", - "5196", - "ad6bad", - "d8e4b32f", - "8eb89056f3", - "410497c2ed72", - "f0de771b375c90", - "8662db8685033611", - "9ef9f1eed88a3f52ca", - "08225082df0d2b0a815e", - "0f6e84a17439f1bc97c299", - "895ec39c78d3556cefdbfabc", - "2b396b3fa90ab556079a79b44d", - "abae26501c4c1d6123c0f2289111", - "bca098df9099b3f785a37ba40fce5f", - "19b827f054b67a120f11efb0d690be70", - "b88d32a338fd60b58570fda228a121113b", - "3f30143af1cad33f9b794576e078cc79062e", - "ffddb58d9aa8d38086fcdae07e6653e8f31dfc", - "abb99c2e74a74556919040ca0cd857c95ec985e9", - "71f13f89af55ba936f8a7188ee93d2e8fb0cf2a720", - "99734fdf0eef4838a7515426f4c59b800854e2fcdc1c", - "579b1652aa1f5779d2b0e61868af856855020bdd44d7a7", - "1383d4ab4a6d8672b4075d421a159f69380ff47e4bb518d5", - "d3fa1412712dbbab71d4c6265dc1585c8dcc73380cf807f76a", - "1d57868a71e7245667780455d9aaa9e0683baf08fbaf946091c2", - "ef80418fe7049c6251ed7960a6b0e9def0da2749781994b24593a0", - "ef91cb81e4bfb50231e89475e251e2ef2fde59357551cd227588b63f", - "d7f398a5d21c3139cff0562a84f154b6953c7bc18a5f4b60491c196b6d", - "0a2abc6d38f30aef253579a4088c5b9aec64391f37d576eb06a300c193a5", - "02dd758fa23113a14fd94830e50e0f6b86faec4e551e808b0ca8d00fef2a15", - "a4fe2bd0f96a215fa7164ae1a405f4030a586c12b0c29806a099d7d7fdd8dd72", - "7dce710a20f42ab687ec6ea83b53faaa418229ce0d5a2ff2a5e66defb0b65c03c9", - "0320c40b5eea641d0bc25420b7545ac1d796b61563728a4dc451207f1addeedcf860", - "460539415f2baeb626fad748dee0eb3e9f27221661160e13edf39d1b5d476ee0672400", - "02de8ffa5b9c748164f99ed9d678b02e53f4ae88fb26c6d94a8cefc328725a692eae78c2", - "348a61a0136436136910262ad67ef20644b32c15456d5fad6b1679386d0bea87cc1a2e2b5e", - "24c32966c803434d48d2283482ee8f404f598cf7a17961748125d2ed1da987039b1ce00f2ba7", - "bd07cb16121d3b47adf03b96c41c947beadc01e40548e0d0773e61780d48d33a0e2a675ca681a6", - "a35844e34c20b4b9371b6c52fac412afe5d80a4c1e40aa3a0e5a729dc3d41c2c3719d096f616f0ba", - "6df1efbb4567747fe98d218935612f8835852dde2ce3dec767792d7f1d876cdae0056fef085245449d", - "48d6094af78bd38d8f4b39c54279b80ef617bc6ad21def0b2c62113b656c5d6a55aea2e3fde94a254b92", - "cd6e684759d2f19083164712c2aca0038442efb5b646594396b1fccdbd21203290f44cfdecca0373b3801b", - "155dfbf26103c8354362663677fa27d0e1ce3487a821a2a7171014c1bd5dd071f4974df272b1374765b8f2e1", - "15b11067f311efa4ee813dbca48d690dc92780656bc4d4c56510523190a240180867c829a8b8b9844175a8aa23", - "9bc27953a17fb84d5eabe95b4ea6bc03ea450274abccfb6f3938ded8560fb59662459a11a86b0e0f32fbea6bb1f8", - "03b78fb0b34fb8662accdf350a6be75ace9789653ee4375d351e871f6a98ac5e782ca4b4a717665d25e49a5ae25d81", - "687e9a6fda6e2ce0e40e4d30fef38c31e3513d2892bbe85c991fc3715947e42bc49bcd079a40ed061c2c3665efe555ab", - "f3886027d2049a8909e26545bd202d6a6fa2a6f815d31c7d520f705a81fa606dd695369c37aee4fa77dc645e9b05813ceb", - "e4a412ccd20b97797d91ccc286904fcd17c5afe8bed0618f1af333c052c473cd327637d951c32e4af047106036a3bc8c1c45", - "92f4b8c240a28b6238bc2eabadaf2ff3c4bfe0e6c61268ace6aebdeb0691450caea4287db8b329bde96af8cdb8a0fe2f57ef2d", - "e506834b3445e1a9a9b7bae844e91e0834512a06c0dc75fa4604e3b903c4e23616f2e0c78b5cc496660b4a13064bb1138edef4ff", - "27031955a40d8dbd1591f26e3c26e367a3c68f8204a396c6a4ba34b89672896d11276966a42bd516716f35ed63e442e116dbcf35da", - "646b1635c68d2328dddd5ac26eb9877c24c28390a45753a65044c3136ae2fe4fb40d09bf555271646d3dceb1ab1b7c8d8e421f553f94", - "f6171f8d833743bdee7cc8f8b29c38614e1d2d8d6a5fff68bec2c0f4dd463d7941ff5c368e2683d8f1dc97119bde2b73ca412718bc8cb1", - "45db1c478b040aa2e23fb4427017079810775c62abe737e82ec0ef8dcd0fc51f521f29fe6412fff7eac9beb7bcf75f483f3f8b971e42454b", - "500dab14687db3ca3dde9304af5f54194b37bdf475628af46b07bfbf6bc2b64ecef284b17f9d1d9be41794699bc0e76c2878b3a55730f7142d", - "31bba2efc7b3f415c3f031d4c06bb590ae40085ad157370af30238e03e25a359c9e133212ed34b7a006f839173b577e7015a87fdff2270fafddb", - "0600b3fb4b5e1ed0c8b2698ac1d9905e67e027390764821f963ad8d2b33cbc378b9c25c3ee422992d22b760222ed5697be0576d73938ae9d634ed7", - "4c0ca4f177d132594a4c613bad68da24c564efa3b4da0d0a903f26534a2e09f8d799d10e78f48ccdb0203954a36c5cf1bf24c076632c2b022b041200", - "97aacf2e1b013677b2e14084f097cb1e64d7b3fa36f097e189d86dc4a263bcc46817cd1ee6ff0c7ccd9acef63201cdc0e36254e19204a7388643bb571f", - "71fd6846ce7adb0843d6063546a16b79b54ad6c0f018a479a45817624fa221f63525084860559d1a0679c8d89a80701c62743ec2da8419d503f8f0cd7946", - "f73dfb046def3362d6de36077dae2cee2587fe95fe0800548bb7d99737897096ba59052e0dadcc1fb0ccb5535391875328637a0376a43a4d89366758dfe3e2", - "ec470d0aa932c78c5bcf86203ec0014314114765fa679c3daef214f883a17e1b4ca12f44433772a6e4ef685c904b2fc35586c6bd88f325b965968b06d808d73f", - "cf601753ffa09fe48a8a84c37769991e96290e200bbaf1910c57760f989bd0c72e6128e294528ee861ad7eee70d589de3cf4a0c35f7197e1925a64d0133628d87d", - "f15413f7d6fc54bb55829f698da92ee42fcf58dde1aa1bd07d438ecdc32ad6bf2bcdbecc99f18ed43e81b33065af5a4ca29960ae50553e610c0bbf4153d580e73dbb", - "84b1738adb9757fb9402ef7113581291136184d7ae35fe0b6a738da6acb0889d4d5bac7a957024e3709fa80c77d3859871ed1aa25cf488e438a2d24cfadce6008761dd", - "e02814bb81f250c1835a05108396b74c7878e737654bb83155e241774d04e639bbc571b413cd9349092f926c8a149a53cd33e9b63f370b6d460e504199d2e7d849db6cbe", - "aeee4a789956ec0913592c30ce4f9c544894da77ba447c84df3be2c869100e4df8f7e316445d844b31c3209abcc912f647735fd4a7136c2f35c6fda5b2e6708f5ca951b2b0", - "8cfd11ca385de3c843de84c830d59278fe79b70fb5ddbfbfc1ddefeb22c329ef2f607d1d1abbd1cd0d0cc7c5d3ed922add76aadca0d2f57b66cb16c582b6f18f60aee2f7509b", - "852e5ce2047d8d8b42b4c7e4987b95d23e8026a202d4567951bbbd23111e389fe33a736318546a914d2bddedfbf53846036ad9e35f29318b1f96e33eba08f071d6dc665149feb6", - "f225c23164979d0d13874a90ee291627e4f61a672a5578506fd3d65a12cb48a182f78350dc24c637b2f3950dc4882a5c1d5d5bad551c6f3e0093aa87e962bea51566af3791d52d65", - "5f33864d882455f8ef046aed64e2d1691e5c1555e333b0852750592e6f00d3b5ec941d0c00e99629612795d5870cf93c984b45e4464ba072a34903b400a42824ac13da28c7c1cb1959", - "7baaee7c3eb68c18c5ae1d45ba381803de34e36a52e2d7ccc9d48a297273c4d8644b473195bc23005f7a4f5ca790b1fa11f6a96e585e635513f11745dd97a69c1222204ab28d3c7735df", - "d0a2a3fc450ef9af7ae982041feb2842901026467d87839c33b4a9e081ea63d5be60ae99ca6e42393ded45255b8f42886f87ba0310572d9f0d8b5a07ff4b6bae1f30559a844983cc568560", - "3aa4164462b3e7044c35b08b047b924790f6d5c520b1df4305b5d41f4717e81f0cd4bccb9a5a6594773832b8707443adde4047caaed2293f92234df257df54ed275a9658fab483d0576d33a9", - "c8b4239fd7f1b893d978268f77f6505b5775d89090374322d40083b0f4c437423f670ca213f7fe05c61069725da2561646eefaea597ac48e293fbad44c2872046857e56d04a426a84008cefd71", - "f94839a7024c0a16971271b6727c081770110c957b1f2e03be03d2200b565cf8240f2873b0426042aaea996a1784fadb2b27f23bc1a521b4f7320dfbed86cd38d75141365ba9b443defc0a3b4078", - "8af934fdc8b3376ca09bdd89f9057ed38b656bff96a8f8a3038d456a265689ca32036670cb01469cc6e958cc4a46f1e80d700ae56659828a65c0456b8e55f28f255bc86ce48e44377bf1f9970b617d", - "ada572989e42f0e38c1f7c22b46bb52a84df8f7b3b773c9f17a5823e59a9725248d703efb4cb011abc9474e8e711666ed3cfa60db48480a8160615dfabad761bc0eb843d2e46299c59b61a15b4422fdf", - "b11f1ea52a7e4bd2a5cf1e234b7c9eb909fb45860080f0a6bdb5517a37b5b7cd90f3a9e2297f995e96c293189b807a7bf6e7633bebbc36674544db5f18dd33020aeaf50ee832efe4d3d053873fd31ce3b9", - "e54b006cd96c43d19787c1ab1e08ea0f8922bdb7142e748212e7912a1f2c0a4fad1b9f5209c30960b8b83ef4960e929b155a8a48c8fb7ce4326915950cede6b98a96b6f1ecb12715b713985dacd1c1180413", - "ee2c2f31a414ccd8f6a790f55e09155fd50aac2a878f9014f6c6035cae9186f90cdef0b7adf3e207c3d24ddfba8cd321b2e9228b02a1182b6973da6698071fce8cc0a23a7bf0d5aefd21ab1b8dc7818549bba3", - "6d6810793bad6c7efe8fd56cac04a0fb8717a44c09cbfaebce196a80ac318c79ca5c2db54fee8191ee2d305b690a92bd9e2c947a3c29342a93ac05796484638787a184e4525e82aeb9afa2f9480caebb91014c51", - "91e4694366cff84854872667fd168d2d42eca9070cdc92fca9936e8361e7266931f418450d098a42686241d08024dd72f0024d22ba644bd414245e78608942321ff61860ba1245f83c88592dc7995c49c0c53aa8a9", - "608aa620a5cf145f4477694407ccd8faa3182465b29ae98d96a42f7409434c21e4671bcae079f6871a09d8f2965e4926a9b08277d32f9dd6a474e3a9fb232f27fc4235df9c02abf67f7e540ca9ddc270ee91b23a5b57", - "c14f75e92f75f4356ab01c8792af13383e7fef2ffb3064de55e8da0a50511fea364ccd8140134872adccad197228319260a7b77b67a39677a0dcdcadfb750333ac8e032121e278bdcdbed5e452dae0416011186d9ebf29", - "03fcb9f6e1f058091b11351e775184ff2cd1f31ee846c6ea8efd49dd344f4af473f92eb44eba8a019776f77bb24e294aa9f962b39feecf7c59d46f1a606f89b1e81c2715ac9aa252e9ce941d091ffb99bb52404961794cf8", - "11e189b1d90fcfe8111c79c5351d826f5ec15a602af3b71d50bc7ed813f36c9a682520984ae911669d3c3036223a53176794c7e17929efab2b1c5b500f24f8c83d3db5d1029c5714c6fd34eb800a913985c218071677b9885c", - "69f8f5db3ab0321a708ab2f4234645dade6bfda495851dbe7257f2b72e3e8378b9fa8120bc836b737a675271e519b4712d2b56b359e0f2234ba7552dd4828b939e0542e729878ac1f81b6ce14cb573e76af3a6aa227f95b2350e", - "be734d78fae92cacb009cc400e023086bc3a3a10e8ca7cb4d553ea85314f51383660b8508e8477af60baf7e07c04cc9e094690ae12c73e5f089763201b4b48d664b94b4f5820bd1540f4a84100fdf8fce7f6466aa5d5c34fcbab45", - "d61b77032403f9b6ea5ad2b760eb0157545e37f1712ec44d7926ccf130e8fc0fe8e9b15570a6214c3899a074811486182b250dc97ebdd3b61403614d935cd0a61c0899f31b0e49b81c8a9a4fe8409822c470aacfde229d965dd62f51", - "c31bd548e36d5fae95ed8fa6e807642711c897f0fcc3b0d00bd317ed2bca73412064618c6a84a61c71bce3e963333b0266a5656571dcc4ba8a8c9d84af4bdb445c34a7aef445b15d77698e0b13c436c928cc7fa7acd5f68867e8132993", - "9903b8adab803d085b634bfae2e109dd247a7d6249f203403216d9f7410c36142df8fa56fb4d6f78136eef5817bad5ea3608439bb19336628c37d42db16ab2df8018b773baedafb77278a50926370b48bd81710203c7abc7b4043f9a1751", - "4dadaf0d6a96022c8ce40d48f460526d9956da33260e1770315ead420da75b122c762762aa3ddc1aef9070ff2298b2304cf90443318b17183b60778f3859b141053e5827decfff27ff106a48cfdb0371d0ef614fc7400e860b676df3176d1a", - "314dda800f2f494ca9c9678f178940d2284cb29c51cb01ca2019a9bede0cdc50f8ecf2a77e238b884867e78e691461a66100b38f374c4ccac80309641533a3217eca7e6b9a9af01c026201f0afaec5a61629a59eb530c3cb81934b0cb5b45eae", - "4658b7500951f75c84e4509d74047ca621009835c0152f03c9f96ca73beb29608c44390ba4473323e621284be872bdb72175628780113e470036265d11dfcb284ac04604e667f1e4c1d357a411d3100d4d9f84a14a6fabd1e3f4de0ac81af50179", - "491f877592837e7912f16b73ee1fb06f4633d854a5723e156978f48ec48fbd8b5e863c24d838ff95fa865155d07e5513df42c8bb7706f8e3806b705866475c0ac04bbe5aa4b91b7dc373e82153483b1b03304a1a791b058926c1becd069509cbf46e", - "231034720c719ab31f7c146a702a971f5943b70086b80a2a3eb928fa9380b7a1ad8773bfd0739142d2ad6e19819765ca54f92db5f16c1df5fa4b445c266215a92527bd4ef50ed277b9a21aee3fb7a8128c14ce084f53eac878a7a660b7c011eb1a33c5", - "3366860c77804fe0b4f368b02bb5b0d150821d957e3ba37842da9fc8d336e9d702c8446ecafbd19d79b868702f32405853bc17695873a7306e0ce4573cd9ac0b7fc7dd35534d7635198d152a1802f7d8d6a4bb07600fcdaacfaa1c3f40a09bc02e974c99", - "ccbbbe621f910a95835f5f8d74b21e13f8a4b03f72f91f37b5c7e995aa3cd5539508d5e234e77a4668a42c239b2d13ef0e55ecf85142055e3f8a7e46320e21324a6b88e6c823ac04b485125c2aa59b61476481208f92ea4dd330cb18777c1cf0df7cd07893", - "87faf0e49e7e5ab66ee3147921f8817867fe637d4ab694c33ee8009c759e7d707f44c69c1b9754e2b4f8f47b25f51cd01de7273f548f4952e8efc4d9044c6ea72d1d5857e0ffeb3f44b0c88cb67683401cfb2f1d17f0ca5696641bef28d7579f68d9d066d968", - "38c876a007ec727c92e2503990c4d9407cea2271026aee88cd7b16c4396f00cc4b760576adf2d683713a3f6063cc13ecd7e4f3b6148ad914ca89f34d1375aa4c8e2033f1315153189507bfd116b07fc4bc14f751bbbb0e752f621153ae8df4d68491a22430b309", - "87d636a33dbd9ad81ecd6f3569e418bf8a972f97c5644787b99c361195231a72455a121dd7b3254d6ff80101a0a1e2b1eb1ca4866bd23063fe007310c88c4a2ab3b49f14755cd0ee0e5ffa2fd0d2c0ea41d89e67a27a8f6c94b134ba8d361491b3c20bacac3d226b", - "b021af793badbb857f9a353e320450c44c1030fce3885e6b271bcc02e6af65fdc5be4dc483ff44bd5d539ed1e7eb7efe3001252e92a87df8227ace601047e101c871d29302b3cb6c6f4639078afc81c4c0f4c2e04688612ecf3f7be1d58ea92894a5dab49b949f2089", - "c5c1f2fbf2c8504a686b615278fc6221858d401b7fe790b75fb6bca6885cdd128e9142bf925471ee126f9e62d984de1c30c9c677eff5fdbd5eb0fa4ef3bff6a831056cea20fd61cf44d56ffc5bda0e8472ecdc67946d63c40db4ba882bc4dfa16d8ddac600570b9b6bf3", - "88f8cc0daeaeaea7ab0520a311dff91b1fd9a7a3ec778c333422c9f3eb0bc183acc80dfefb17a5ac5f95c490693c45666ec69234919b83244003191bad837aa2a237daeb427e07b9e7aa6ca94b1db03d54ee8f4fe8d0802cb14a6599005eb6326eefe5008d9098d40aa851", - "2eb6b1a58e7fe39ff915ac84c2f21a22432c4f0d260380a3f993310af048b11647f95d23adf8a746500833ee4e467fb52ea9f1039519fa58bcb0f1d0151558147b3c92b83730aba0e20eeeea2b75f3ff3ad79f2f8a46cbbadb114a52e32f018342aeeaf827e03ad6d583bbce", - "3ba7dcd16a98be1df6b904457709b906cbf8d39516ef107006c0bf363db79f91aaae033466624d30858e61c2c368599963e49f22446e4473aa0df06e9c734e183a941510d540536377072334910e9cef56bc66c12df310ecd4b9dc14207439c1da0ac08bdd9be9f2c840df207e", - "a34a7926324ea96867dac6f0dba51d753268e497b1c4f272918c7eb0e34120be65b7b5ba044d583141ec3ea16fcedae6197116b16562fb0706a89dc8efd3ba173ccd0fd7d84d480e0a3dda3b580c326aa1caca623879b0fb91e7d173998889da704eda6495023b5ad4c9ad406298", - "5ef97d80b90d5c716322d9ba645a0e1b7a403968258a7d43d310320f60f96235f50e9f22cac0ad239636521fa0607d2f471051b505b371d88778c46fe6787d47a91a5bec4e3900fe6ed22918226fc9fbb3f70ee733c369420612b76b5f55988d757c891d7005d17ee55783fe506202", - "140d2c08dae0553f6a49585fd5c217796279152b2e100ebde6812d6e5f6b862b2a3a484aed4d6226197e511be2d7f05f55a916e32534ddcb81bdcf499c3f44f526eb515cc3b6fa4c4039ad251253241f541558bba7413ca29318a414179048a054104e433c674ca2d4b3a4c181878727", - "29fdfc1e859b001ee104d107216b5299a792d26b2418e823e0381fa390380d654e4a0a0720ba5ff59b2ff22d8c4e013284f980911dcfec7f0dca2f89867f311ced1ac8a14d669ef1114504a5b7626f67b22ecd86469800f1575543b72ab1d4c5c10ee08f06159a4a3e1ae09937f12aa173", - "52dfb643832a598a10786a430fc484d6370a05356ee61c80a101dbbcfac75847fba78e27e537cc4eb918eb5ab40b968d0fb23506fee2ad37e12fb7534fb55a9e50902b69ceb78d51db449cbe2d1fc0a8c0022d8a82e2182b0a059035e5f6c4f4cc90278518e178becfbea814f317f9e7c051", - "d32f69c6a8ee00ca83b82eaf82e312fbb00d9b2f6202412a1ffc6890b4509bbbeda4c4a90e8f7bca37e7fd82bd23307e2342d27aa10039a83da55e84ce273822740510e4ec239d73c52b0cbc245ad523af961994f19db225212bf4cc160f68a84760233952a8e09f2c963be9bb1d71ca4bb265", - "d1e603a46aa49ee1a9ded63918f80feca5fc22fb45f659fd837ff79be5ad7faf0bbd9c4ba91628ee293b478a7e6a7bd433fa265c20e5941b9ea7edc906055ce9799cbb06d0b33ae7ed7f4b918cc082c3d4a1ac317a4acec175a73cc3eeb7cb97d96d24133a29c19375c57f3a4105519846dd14d4", - "b45ac88fac2e8d8f5a4a90930cd7523730733369af9e39bf1ffb833c01108952198301f4619f04b9c399fef04c214bad3358999967c474b67a7c06457a1d61f9466489ed5c0c64c6cdc83027386d6263491d18e81ae8d68ca4e396a71207adaaa60997d0dca867065e68852e6dba9669b62dc7672b", - "d5f2893edd67f8a4b5245a616039ffe459d50e3d103ad4675102028f2c497ea69bf52fa62cd9e84f30ae2ea40449302932bbb0a5e426a054f166fdbe92c744314cc0a0aa58bbc3a8739f7e099961219ec208a8d01c1ae8a2a2b06534bf822aaa00ca96218e430f0389c69c7f3fd195e128c38d484ff6", - "37279a76e79f33f8b52f29358841db9ec2e03cc86d09a335f5a35c0a31a1db3e9c4eb7b1d1b978332f47f8c3e5409d4e443e1d15342a316f442e3bfa151f6a0d216df2443d80cbcf12c101c51f2946d81161583218584640f4f9c10de3bb3f4772bd3a0f4a365f444777456b913592719818afb26472b6", - "a46d252a0addf504ad2541e7d992cbed58a22ea5679980fb0df072d37540a77dd0a1448bdb7f172da7da19d6e4180a29356ecb2a8b5199b59a24e7028bb4521f3281313d2c00da9e1d284972ab6527066e9d508d68094c6aa03537226ef19c28d47f91dddebfcc796ec4221642ddf9de5b80b3b90c22d9e7", - "060c18d8b57b5e6572dee194c69e265c2743a48d4185a802eaa8d4dbd4c66c9ff725c93667f1fb816418f18c5f9be55e38b7718a9250bc06284bd834c7bd6dfcd11a97c14779ac539629bcd6e15b5fca3466d14fe60d8671af0fb8b080218703bc1c21563b8f640fde0304a3f4aeb9ec0482f880b5be0daa74", - "8f2f42bc01acca20d36054ec81272da60580a9a5414697e0bdb4e44a4ab18b8e690c8056d32f6eaaf9ee08f3448f1f23b9844cf33fb4a93cba5e8157b00b2179d18b6aa7215ae4e9dc9ad52484ad4bfb3688fc80565ddb246dd6db8f0937e01b0d2f2e2a64ad87e03c2a4ad74af5ab97976379445b96404f1d71", - "ccb9e524051cca0578aa1cb437116a01c400338f371f9e57525214ad5143b9c3416897eae8e584ce79347297071f67041f921cbc381c2be0b310b8004d039c7cc08cb8ff30ef83c3db413f3fb9c799e31cd930f64da1592ec980cc19830b2a448594cb12a61fc7a229e9c59fe1d66179772865894afd068f0942e5", - "3eb5dc42172022ab7d0bc465a3c725b2d82ee8d9844b396913ceb8a885323dbbbf9ef4ed549724cc96d451ea1d1d44a8175a75f2a7d44bb8bfc2c2dffed00db0328cfde52bf9171f4025770abbe59b3aefd8151c480bafa09f613955fd571e5d8c0d4936c670d182cf119c068d420ded12af694d63cd5aef2f4f6f71", - "20ea77e58e41337ad63f149ed962a8210b6efa3747fe9bea317c4b48f9641f7145b7906ed020a7ae7d2ee59435392edc32aee7eff978a661375af723fbd440dd84e4a152f2e6ef66f4ab1046b22c77ac52717de721dfe39aa8ba8cd5da27baca00cc1fffe12c52382f0ee83ad1418f4c6a122effaf7471e1e125d7e7ba", - "95c662b835171fa23f948c3c3ed27bab9b3c367bbfe267fe65f8037a35b50cd7fc6030bfce4000425ef646c34793f0762635ae70487a0216ef7428da622be895d1b6040423246511c2370d6876a5c5d2df8bbd48fb14f787b632ad2c1f5a927fdf36bc493c1c8606accfa52de33258669f7d2d73c9c81119591c8ea2b0ef", - "f708a230675d83299cc43167a771602d52fa37cbc068ef9128ef60d186e5d98efb8c98798da619d2011bf4673214f4a4c82e4b11156f6292f6e676d5b84dc1b81e7cc811b0d37310ac58da1bfcb339f6ba689d80dd876b82d131e03f450c6c9f15c3a3b3d4db43c273c94ed1d1bd6d369c4d30256ff80ea626bda56a6b94ea", - "f8417766ce86b275f2b7fec49da832ab9bf9cb6fdfe1b916979ae5b69176d7e0293f8d34cb55cf2b4264a8d671370cb595c419c1a3ce5b8afa642208481333522005fbe48cdc700e47b29254b79f685e1e91e7e34121784f53bd6a7d9fb6369571bba992c54316a54e309bbc2d488e9f4233d51d72a0dd8845772377f2c0feb9", - "3479e04efa2318afc441931a7d0134abc2f04227239fa5a6ae40f25189da1f1f313732026631969d3761aea0c478528b129808955be429136eeff003779dd0b8757e3b802bdff0f5f957e19278eabad72764aa74d469231e935f4c80040462ab56094e4a69a82346b3aeb075e73a8e30318e46fdaec0a42f17ccf5b592fb800613", - "03df0e061fa2ae63b42f94a1ba387661760deaab3ec8ffabcaff20eeed8d0717d8d09a0eafd9bde04e97b9501ac0c6f4255331f787d16054873f0673a3b42ce23b75a3b38c1ebcc04306d086c57a79d6095d8ce78e082a66c9efca7c2650c1046c6e0bbce0b2cba27c3824333e50e046e2a7703d3328ab3b82c9d6a51bc99b9516ff", - "76b488b801932932beefffdd8c19cf5b4632306e69e37e6a837e9a20c8e073bcadd5640549faa4972ebd7ee55cb2425b74cb041a52dd401b1a531beb6dfb23c4cfe74bc84f034156c8f55050ca93236eb73c4e2595d9fbf93dc49e1ec9a31705359732dda73f737ec4274e5c82626dc4ec929e5e2c7a2f5f5fb666181922bd8be575e3", - "ff17f6ef13abc0426b03d309dc6e8eeb822300f7b87eff4f9c44140a424098fd2aef860e5646066d22f5e8ed1e82a459c9b9ad7b9d5978c29718e17bff4eeefd1a80ba48108b551e62cd8be919e29edea8fbd5a96dfc97d01058d226105cfcdec0fba5d70769039c77be10bd182bd67f431e4b48b3345f534f08a4beb49628515d3e0b67", - "95b9d7b5b88431445ec80df511d4d106db2da75a2ba201484f90699157e5954d31a19f34d8f11524c1dabd88b9c3adcdba0520b2bdc8485def670409d1cd3707ff5f3e9dffe1bca56a23f254bf24770e2e636755f215814c8e897a062fd84c9f3f3fd62d16c6672a2578db26f65851b2c9f50e0f42685733a12dd9828cee198eb7c835b066", - "010e2192db21f3d49f96ba542b9977588025d823fc941c1c02d982eae87fb58c200b70b88d41bbe8ab0b0e8d6e0f14f7da03fde25e10148887d698289d2f686fa1408501422e1250af6b63e8bb30aac23dcdec4bba9c517361dff6dff5e6c6d9adcf42e1606e451b0004de10d90f0aed30dd853a7143e9e3f9256a1e638793713013ebee79d5", - "02aaf6b569e8e5b703ff5f28ccb6b89bf879b7311ea7f1a25edd372db62de8e000219afc1ad67e7909cc2f7c714c6fc63ba341062cebf24780980899950afc35cef38086ee88991e3002ae17c07fd8a16a49a8a90fc5540be0956dff95390c3d37629949de99920d93096eb35cf0427f75a6561cf68326e129dbeffb8772bfdce245d320f922ae", - "70752b3f18713e2f533246a2a46e38a83cc36dfccec07c1030b5204cba4432700735a8cee538b078d281a2d0262110381c5815a112bb84404f55af91652bd17502dd75e4910e062943d8a736ae3eecdfdd8e3f83e0a5e2ddeeff0ccbdadaddc95391310fc657a59724f7e6560c37dc1d5bb5db40170190f04a274c864ade9687c0f6a2a48283177a", - "01f3c1333b44077c518cc594d0fb90c37651fb7b2442e71fc0a5611097f1cf7bcfaf11c8e0ac1b1cab54afba15bb9332df6bc64d8032368e3f686c8324b0114e0979dad78a5ccd3fff88bbe89eef89c4be586ca092addef552ed33224e85d8c2f4fba85ac7735f34b6aa5ae5299154f861a9fb83046b0e8fca4db32c1343e02676f283975f43c086cf", - "509283ebc99ff8d87902fa00e2d2a6fa239e335fb840dbd0fdbab6ed2d95e8275402523f7ce9a2fabd4b6c9b533288fbe914bde84365a204711d0977a7d698f4614385984dd4c137e4820035dd6737da364edff1bb62283e87a8c7ae8637314fe9b5777ec4ec21276dafedb2ad5ee1aa0ac99e34a6c01c055c8a239fd28681607f65143082cd4553c529", - "c17e417e876db4e123c631f7136b8a85bfd6ce66a69180d0cd5ecfd6f037bb1c7bd7908d51f2c485bf9e92c0e1799ee5f6ab834ee481f5eb1a8020205adb4d0f90126d4e7c2c859c5a5f644bdfa9c649ff4f168e834de6f9769429732099d46d0af506ab86c6fd92175159bbc05c75db8e1fa867e6030d64250008d64c857c47caec3dc8b2ffb384d0193e", - "950988fbe9d62a66f5f2c492bc8dc944a78eb3796ec37ba94b6a81a9d402ccad03cd8497fff74c5f4a03081c5fecec48574fecb21c1de261332c23108195d3f6a96ff8e433a1a30eda53dd5bb414973334f8cde5510ff759f7c17046cbb5acd8e8c4a6eecf2a9121ec3fc4b22c4daa72678194ce809024cd45c4ebb9ccdb6f854205cdb624f0787480d8034d", - "552a212c403b473741da8e9c7b916d5e5e9bcc9949021ae1ca1ed46b7d4a98addbb604d9fff56175b7e0367db26c9635fa7813653dc8d610befdd09ec41e99b192a716106f4299eec8b940863e5a59cf26cdc2cd0c3017f9b4f215812bed15f69e77edf672178e13c55580982f01fcc2fa131ec3d736a55d56504c545f4be50fee83f1263e4d3f3c877cc6242c", - "b00c4283dd3d9cd26e44bd97cede6c771cb14f2571b51cfdaae4309560ffd165da025a1bbd31096c3aa8286e2d6dcc3e681b8d01f2c5064ea26dfd0b5156b7a7f5d1e046c5bd1628f8fdae24b03bdf7cf7366900cc013a8cbed9d7f5937c914b08f8c27683b956e1279812d04288515333fc6aba3684dde2292951f0610649d90fe61606630fc6a4cd383649252c", - "f6e79457bb6d0884dd223be2cf5ae412a1ed425f1e4012f75951b096aea3b9f3581f9013bcae1aff2d3fc1e5c7e06f24af6d53c2c5c238b71c71cc670b05a7ee5204400026a5c4e5ddec3ad96771e49fae4b0f75ec58049ad9d972e5749a32d90f847f1ed2a1bab83db181e541cf5c8adb6b29ecc64dc25add491d408d3eb3ddcb013de7f5ffb6de9dd7ff300a5fc6", - "fe1d71e1d5efa3f712d23216ee8ee9139e66bd648b83efc02cdb4d45a28cf36759ff190a84d14d9471477abefb5aea4111110336143dd80cf81e02f268120cc07d746538f968e9876bff8358d390f5b8e7eafa61ecd236cedaf276bd61865fdd3424988201dcdeda2e3e0c33c9e3b3670125dd1049106cc6df5695fb2dca443233ff440f265bbff055483bac1e859b83", - "4c80163562872a965dedd8725652906156ada6e9d999027d96f49289edb92f9ef043e9d7c3377e091b27f85275499454af32317535997fb4aaeaf93565ad481ff7d45d2abddd4df4b60f71a6923ec30496c6ae534dc5427107ab4c5e656a322c7ab058d4c13ec0ebafa76576560697ac98f84aa4a554f98ec87134c0d7dca9184cf70412a324aac91823c0aca02537d197", - "fdd58c5ffe88665beb7073c8f4c22472f4bc9390cdd27a42622ca55978b000ab7579f795d4de0dfcaf521b8268980ef1d20277b07567985c0fd5030784ad6c32541ac24e99ab706105a2255fc32935c0fce6fdad9bb224d94ae4eae2a3ff08836618a3adf193630647bce1952b69da4de360f59da303519278bfd39b733cf66820a5e9e971b702f45998b69a0889f4bec8ec", - "ff38b15aba3794e2c81d88003e045ac6cbfc9f4833cdf896cefd8ac0c88674727ad9a9fcb9ef36574deea480e6f6e8691c8390ad73b8ea0eb3665c914b0d886546948e67d7987eea248b5feb52346ffdd965d5c835144c3bc63daf325e74b11267e32e58a914ae4521a668839d9445fececa49c5fba41f9e171698bbc7c6c97fa163a377a96456958d6e1d74f91ada56a30df8", - "f048c19328d60b4e59ed76940415b2c84c23883198bba5699efb0a1774ad5da6d15390c7b55d77d66f37448fe08107f42a5336408d5322f4b630e3275865fc66dccab39f6e13fabc133e5a441fe352d81c7cd9a25f145a6e2e2417d3b0bbc79eafcd7ad688c02011fd268dd44ac3f4f87b37a84a46fd9e9975962fba92c9a3486deb0c45f6a2e044df4bb79f0feeea432c5008b0", - "1b3e5fe6f113cce28a6f8d6f7809d3cec398cabffe9ff2ff10a7fec29a4ee4b54186063fd5307a2be393c9ecd75a37620bdb94c9c18da69b658579676ec90351d10dc33a7cb3b75798b1234f9f684d4a73a0fab2df3d5d6fdb1c1b1514d0935c1f2dd21486f91c2595b2f8f8a500ff443b9305270fb6f3da7961d9316d4ed6a135a31c4a3611d40e6585bbb34f498cd5b9a5d92676", - "740db337baa12b16897f17a85fa5685acc85e48338867f8ac9c0198dd650f5dfa7c17725c1262c72207e365c8aa45ffaab6470a0e5afefbfc3bb702a9766064f28cc8b796878dfdd3ca9d0216c14941438fc541fb5be0a13d29a996c5c985db4f630df067a5626db5dcd8df3a2bff17dc446e46e4079b8815da4318cb228c7722684e2a795a0ca56f500ea51951a6a385385d886f678", - "1465f2d578d167faa017fe8f763ce3cc8dc1e8371d774ed2a8803f12585296ee71a1f2253dd16b717a81f91f0f3641018a0111182b4e65d884b0a3d0292631ad807cdccc88bdeecb476e76f72b5246a630aff6e2401fa9570f85acb73ccb4e19ef04a932a03d7b7985dbe1e5bb410df517fe362321469e6f8b0e0cef6c31d7aa8ec06aa220620d66cc0e133fdee963589b12320fc9678e", - "80c051952fa6f3ef6af0f1759ec3e83c8eb91abee1de360bfa09e74b05af2475a0dbf8f9135aa25892919bbe0515898cfb6f88abc9e1891f2b2180bb97370f578973d55c13c35edb22ed80647c2a7e2884d1ccb2dc2f92d7b6ec5843ade13a608a31190ce965bde97161c4d4af1d91ca9962053f9aa51865bdf04fc23fa35a6fc3c8e888941263a26ed66c2dd0b29b2325dfbd1227c5091c", - "9c1e2a1aed6406052eed12b4495365f2f80e9c9645473f3549b607f20910bcd16dc3a4b173ac8d128129cdb7c76ebbc8e9a2a1ba0d822c66b367e790a69ac71f0a60ed4bff0e979148e3f3ee6607c76dbc572ee5ff17c27e4b52adebb4bedddff517f591a1977299c7cb01106f1453b098d29848ba3751c816215bb0d090c50f9e445b41b2c49d4eec83b92ce6c269ce835fd279e7cbbb5e47", - "466abda8944d0329d2975c0f2e2afc901f117887af301881f63b714f49a2f692fa63a8871fc0b301fe8573dc9b2689880cd8969e5072c57671e0633b041481dab25e65c9de404af033a11a8070c8ab70ca6d465318501afdd9940c7efbe1bb6d49581c222fad251dba4ee0a98efe22a3c4f74da05844523b30bbad6b080ac8df70a02da80bc9d477dfb869adb211e209a316d5dd1fd89a6b8f8e", - "0e89a873e07799ba9372fc95d483193bd91a1ee6cc186374b51c8e4d1f40dd3d30e08f7feecfffbea5395d480ee588a294b96304b04f1ee7bbf6200cc8876395d1db3ac813e1019bb68d27204e514fe4a61ad2cbd1782dca0e38b5538c5390bca626c5895b745cfca5dac636fd4f37fed9014ab46ae1156c7789bbcbb956ff7ee5ce9effa560731d26783dc6ae8bddd53a5d28133614d0ddeddd9c", - "fdde2b80bc7a577ef0a6c03e59512bd5b62c265d860b75416ef0ce374d544cbb4e3a5dbd31e3b43e82975090c28bc77d1bdec907aeceb5d1c8b71375b6d631b84a46153f5f1d195bfcb2af6f597a9cdc83782c5bbbb58c5188a87ebf375eee5212fa52523820a83106e8ecd52bedd60d95cd646159774389c07e1adcaa6b6f649408f33399ec6e507d61659696b3dd249996892d5986b654d94ff337", - "f5d7d66929afcdff04de30e83f248e69e89604daea782e1d82d8032e91a95c1d6fb2f5578f79b51be4397e4cd7cbc608ce143fdddbc6fb6c43ffdd394a7df0124353b919aeeac025f3eb11ff246c3b9657c1a947fc534ce48e18feffada8797037c6bc7e2d9a9e2e019fe65627b3feb28e446473e3bd413047a2587f0be6a103403cb3c33fdc212dca14d8e386aa511c22308e632f5f9528dbabaf2deb", - "332990a8dba55f977bc814436cf386ebbf10cb487a5f6ce83e13741bac670c6810284fbbe4e303547ef411e964fae82854e8c13cf56979b89ecfedd337aad78260060122d13dfbbf8497acb2066ed89e30a1d5c11008bd4d145b5ec353956310536304d8b8bba0793baec6d8f3ff49718a56e6694f8122078265cf5731d9ba61292c1219a1affb3679576d4998290aba3684a205c3469d40761a5c4e96b2", - "efbdff285027610f03182009c89b953f19721cfcdb8accd74bab6ec4bdf3f555ab902cb0dd91284269d140638aaabd211748aa4da3b18cddc653b57e461b9ad8491807c535c08fe97d89eb587c6af19ca152e72479626ab764e8b62da89fefc8354c75a44851f985746d78715a5a92798dac1a4222be27897b3f0aa63d596aa7378545f49b259aa8518c3def8a2ec8f7aa956c43668c8717052035a7c36b47", - "0eea9bb83bdc324fd21b03669aa922fbebc448e7d25e210294c07862cfa6e061731dfb67b4810633f4dbe2130d90fa1c65843af436e74219d213c4458dcac1c48ec4541fc6e3b7918ab2bc621aedda53658050900c3865ca57cd5dfa1d28576827401956d2dd8b861fa90ab11bb0b544ded9bd3d62e3278ed484e17db8f2d5dc5ea4d19a0e15134ba6986714c2b22c59c2f0e517b74eb92ce40d2f5b89e6d79f", - "25da9f90d2d3f81b420ea5b03be69df8ccf05f91cc46d9ace62c7f56ead9de4af576fbeee747b906aad69e59104523fe03e1a0a4d5d902352df18d18dc8225855c46fefeec9bd09c508c916995ed4161ee633f6e6291cb16e8cac7edcce213417d34a2c1edea84a0e613278b1e853e25fb4d66ff4c7ee4584e7f9b681c319c874d43502534e8c16a57b1ae7cc0723783807738a55b661e617ee285bdb8b845607f", - "a76b6f81372df09322098868d469fb3fb9beafc5edb32c674974ca7032966aaca5b5c9bffef87bfe626bd8e33d1c5f054f7d5acd3b91ff95324d1ae39eb905b9f2694fe5cb03486cee86d2f661a751b0e6c716a61d1d405494c2d4e32bf803803dc02dba2c06eecf6f97fb1f6c5fd10cfc4215c06d627c46b6a16da0854e4c7c873d50aa1bd396b35961b5fa31ac962575230c07c369f8fbc1ff2256b47383a3df2a", - "f9db613812f2259972d91b1598ffb166031b339913925ee385f03b3b35dc4b2f1ae78a3c3d99c6ff6a07be129ce1f4b8d994d24988d7fbd31f20535d36ab6bd0592cfb4f8c1ed9244c7fa8a3c46e91272a1a40c6cfcf261c5658476c59793bf1a3775086e41a0492f88a31e2d9d1ce75cf1c6b4b928b3545d838d1de6b61b735d921bcf72e4e0615e9ff969ef76b4b947026cb016e2660ba39b0c4c953369a52c210de", - "e601c7e75f80b10a2d15b06c521618ddc1836fe9b024458385c53cbfcedd79f3b4239598cd7b9f72c42dec0b29dda9d4fa842173558ed16c2c0969f7117157317b57266990855b9acbf510e76310ebe4b96c0de47d7f6b00bb88d06fad2c2f01610b9a686079f3ed84613ba477922502bc2305681cd8dd465e70e357534503b7cbc68070ad16d9c51de96ccf0aae1599299331c5655b801fd1dd48dddf6902d0e9579f0c", - "ee5ff4ca16d1bde59ffaf2d064eac9141c1d8f120ea2bda942b7956ba3effc5f1e725a3b40b0b9223a14d7a50df1681d14ca0e0eda7bb09c428fa3b2701f83a7a3e139485a118f6287d266dbc7fe68c87b35becabc7782537c79cb8165bdc40cc103d7b6d4b627fafa0e4113f92341ab90ceab594bfae20dadbfafd401684584598941f1ffb8e23dc8a04ecd15376cda6d849fe0dfd177538c62413622d172d9d46e05c450", - "1daca80db6ed9cb162ae24aae07c02f4126f07cd09ecee8e798fa1bc25c26c644333b63731b4ebc3f287f2318a820c32a3a55fc976576bc936f7384e2553d2891e3771ff24dd4c7f0256906460a8f12d30ed2b23583a0259cb00a9065a757d654d6e4603e7c7eb4a8426b527ae8a849d9350e9094b890367df3e8b23ad2df4d7dcce416bd8ea3badd037f53f7b07c02e5926515f196d62aeb9b8b14c863f067fc12c5dfc90db", - "27ff4e58a34ff1fcd66855d014ea17889a3cf0021a9fea3fabfd5b270ae770f40b5439e00c0d26bd9766f6fb0b4f23c5fcc195edf6d04bf708e5b0bced4f5c256e5ae47cc5651e51cd9fe9dc5d101439b9bc5cc24f76a8e8847c72686e2af1ce7098ad7bc104dad00c096a6d48b6453322e9cd6773fb91fb1eabd05dc5185a9aea07a2f64c6fea9897681b4428aaffe1fe5fd3e8ceb890b12169ec9d51eaabf0ca3d5ba415770d", - "75e2fb56327983b04f640717be8cba6fef3655b4d8e5539587d6478356ec397efaed818b8425d052778eb30ef0dee656c52c2aeab079ed496ae4441a365f2130432c87ba757e25b4511656ad15e2eff84d342331fd2814d1f1d11af65d98a424c115ba183437c0d0aa55f5c44b8685028a47d89d0d36a0f20aed510c366ab338f074a941b404fb349caaec821e0850a627777cc8f5abce6b509290027a2a28ff1db62a5ed2f95fc6", - "c6ae8b6a060917cd498aa7874ad44baff73efc89a023d9f3e9d12c03d0b7f5bcb5e24e1bc2ab2f2c67b9a9d36ff8beb51b5affd4a3510361001c80642955b22ea4bf28b81a5affe5ecdbabd8d17960a6af3825a4522fe76b3d720b5d06e66bff5379d7a8de1f5cc3e7bb75163a854d77d9b3949bf904b6c4e568682f0dab7f217f80da7303cfdc9a53c17b6b51d8ddff0ce49541e0c7d7b2eed82a9d6be4aec73274c30895f5f0f5fa", - "606c9a15a89cd66a00f26122e33ab0a08c4f73f073d843e0f6a4c1618271cfd64e52a055327deaaea8841bdd5b778ebbbd46fbc5f43362326208fdb0d0f93153c57072e2e84cecfe3b45accae7cf9dd1b3eaf9d8250d8174b3dade2256ecc8c3acc77f79d1bf9795a53c46c0f04196d8b492608a9f2a0f0b80294e2abe012dc01e60af94323c467f44c536bf375cddbb068c78432843703dd00544f4fff3eaa1a5a1467afaae7815f80d", - "88b383cb266937c4259fc65b9005a8c190ee6cc4b7d3575900e6f3f091d0a2cefa26e601259ffb3fd03083270eb63db1ffb8b4515ec454d12f0944f8f9f6869eedc2c5f1689766a748d74e79ad83ff6a1639aefdec6109342dead31e9cead50bcc00c5b2206e8aaa47fdd01397b141880490174141a1e6e19268378c1b54a84aba60ca711fd72f7df88e120dfea2caa140085a0cf73342f3c588b7edfb5b5e5ccabd68a32364746d92d536", - "dc0b293f1ba02a326743509f41efdfeeac1efc45137ac03e397a3273a1f586a0190cfb4ea96d6c13ca692a4de6de905c8338c3e29a04cbae76272f568b9d795cea5d758106b9d9cff6f80ef650d6b7c428ea3946c3acc594907fe4227ed68faf31f2f6775f1be5139dc0b4d73ed6308fa226b9077561c9e4c7a4df68cc6b819b0f463a11b9a09682ba99752c4db7aea9beac1d9279f2c2675d42b551d27aa2c1c34125e32f2f6f45c35bca45", - "5d801a7413311e1d1b19b3c321542b22e2a4ccbe340545d272abede9223741d9835a0fc80cc9da97a13f8bb4110eb4ad71093efba165b1edad0da01da89d86726e0d8e42ae003b4b50297d233c87da08406f0e7fc58ba6da5ee5ba3d2d7142cbe6632734eb2e7b7863c15cc82198ee8f9a0ae0b7f93bdbda1ed269b3824d5d3c8e78513815b17a4c0cc8c9706b9c77423a309ae3fd98e1e05cdbe9e2577834fd71f964301b10b66c316a2d8f2c", - "2fd32a2bc15a9e96a100624404fd0a4e54ba9f8c0543d8ccf7c5c2e35f5e8c3c11dfd497320aa903900a4ca55a2b323b3ac4a7cfcd01bf0b448db8829072bee6b77c3d7bec2e1d8b414d907288d4a804d2379546ef2e2dc628269589164b13fceb32dba6fd5d48a956ce0b5c3eb28d894a95af58bf52f0d6d6cbe51317152744b4ccfc918ed17fa6856478d580b389016b772e1d02e57d2217a204e25361d91d4845a3fa20fefe2c5004f1f89ff7", - "f537b437662759bef8bd64368536b9c64fffbddc5e2cbdad465c3966b7f2c4bc5b96767ef40a1c144a4f1cd49edc4cc5b57e7eb30d9b90108f6fd3c0dc8a8808b9e0bd13aa3d661c4863637c5e4ba286553694a60bef18801299ae349df53a355051dcc46a7d003c4aa613808f430e9db8ca7dfe0b3f0a4c5ab6eb306aeb53e11a01f910064fbe6ca78b2a94fac34a2602f73de3f275953e13ff5c6bb5c39b82321ead17ec0f8ecc479e6afbc926e1", - "1dd9fb7d5b5d5074971e69300720014deba6fbdb942bd29704cdfcd40fa5281d2a1b9f5b776183e03ff99c29587f10e8d325cb49c5c93e94f5132741b92c4086eec1374dea5c1e772cbb230c7b31f3e962eb572be810076bdb926b63732522cdf815c3ab99bbc164a1036aab103cac7b823dd21a911aec9bc794028f07b7f839bae0e68211286441f1c8d3a35b281fd321312577bbda04f643ecb2a74ec4527bb5148dbccbeba749f5ea19b6072366ba", - "5bd63737449de2d20ca63943953338ecf4cdd6cd0a726241adb04376385a809cc6ba0f3482a310746fbc2cd5eb214f03a14cdc548777fb0d048d659cd75a962e490c4fe47affc2430a34b10275e4c76752a115aae3a24d4fb4fad89ce4d79d65de10292f3490bfdaeabfae08ed51bda6ec8230e66cb07ddbeec26e3ef68dd71c852900659fcf0c963f4574ffe4626a33db9abf0873dde68b21138498b81e8cc44d354be4073615889a7ddff633b5447d38", - "a683ec8250506571f9c640fb1837e1ebb06f123e745f95e521e4ea7a0b2b08a514bbe5bdfd316903d1d6a05f5a143d94dab61d8a3a146ab40b2d6b72df2f0e945875a8aa7051ed115975f6f1567cfcbf04c5e11e3a7027b8e179ba00739181ba10b028e3df7259d0712f4a6cef96469ff737865b85fee2c2db02a6423e32505381e18a1e0b4ce3c7998b8d6b1b5e09c3a280b85486d0984c9e193b0ad2043c2bc4ad04f5b00a73956715937eebf6b3e27afc", - "4df9d160b8e81c42930c48956fcb46b20b6656ee30e5a51dd6317876dc33e0160d31280fc185e58479f994991d575a917073b4439919c9ac49b6a7c3f985211d084c82c9d5c5b9a2d29c5699a22e79de3958d7b0e856b9aa97493cd4563aaa04fa3977a9bb89e0bc06a82296bdc76d20c8d393770176d648712454305fdfcf4e117d05acb5a5b006a9f8d0dc66dca708c4e4103ca825d2331750685c44ce3d9b3e753455580f4d6ac4533edeeb02cebec7cc84", - "67bb59c3ef5ee8bc79b89a673e331e581215076cc36b68f517ca0a74f74efafe9dcc240e6d8ca4b21019c27d6c9289f4419b4f218eeb39eb741c5ebebfe0ed2f6faeec5e8c477acf71907990e8e288f4d4049111779b0635c7bbec16b76493f1c22f645745fdac2b383679fee573e4f47af45ee08d84f63a5ace4ee1c06fa41e2e6e14b7bc392e38426813087a3a461efc62ed1941dc8f1728a2bdc04fde72a0b786558783c84abd4bd100e4926979a0a5e707b1", - "d341147169d2937ff2373bd0a9aefa77968ec8f0d993c6f9881eb174a1911e05cdc45993cb86d149a754bbe321ae38363f9518c50dd3faf087ffeeeb6a058b226ccab7858c00ba6de0e8f4d034b1d27508da5cc473f3a413189ee6fd912d7750486912944d4dc34405ce5ccc3885fb0aabcb922bcfa9081d0ab84c288022bd501235a835eb2e1124ed1d48fd4f8682da8e7919321031326502273375625c4e3a7282b9f53452195e53c6b4b57cd5c66f621bed1814", - "27e7872a54dfff359ea7f0fca256983f7600236e716e111be15a1fe72eb66923ea60038ca2953b0286447dfe4fe853ca13c4d1ddc7a578f1fc5fc8598b05809ad0c64a4363c0228f8d15e28280837a16a5c4dadab681e28968ae17934639fbc124bc59212138e494eecad48f6546c38366f1b7b2a0f56f579f41fb3aef75dc5a0958b25deaa50cb7fd1c69816aa9a51874a98e57911a33daf773c6e6166cecfeec7a0cf54df01ab4b931984f54424e92e08cd92d5e43", - "13dcc9c2783b3fbf6711d02505b924e72ec6736131159017b966dda90986b97522bf52fd15fc0560ecb91e2175322334aaaa0097e1f3777c0be6d5d3de18ed6fa3444133486068a777443a8d0fa212ca46994944555c87ad1fb3a367db711c7ebd8f7a7a6dbb3a0207de85851d1b0ad2f4149bdd5a5ba0e1a81ff742df95edee850c0de20e90dd01753137cb8f2c64e5e4638ceb893a3879ae2c049aa5bce44d56bf3f325b6c5029b2b8e1b2da8de7d4e48ca7d8f6fbdc", - "9ca875115b109eab538d4ec7023600ad953cacdb49b5abe263e68b48eafac89a15e803e838d048d9625972f271cc8f36344bed7bab69abf0bf05979a4cfff273b82f9961626509765fcb4b4e7fa48212bcb3ab2b1f2dd5e2af768cba6300a813514dd13e4d269e3d36548af0cacdb18bb2439ec9459f6d847d39f5598304ec46a26d75de1f9f0c2a88db915bd26e45e1f1e68c5b5b50d1890e97a3803c36755f026863d14176b8b57f42e91d3ff37787f9b38e333e9f0433", - "ec006ac11e6d62b6d9b32ebe2e18c002353a9ffd5dfbc5161ab887770ddd9b8c0e19e5321e5bc105add22e473050b71f0399327c7eba1ef809f8667c1f4e2c7172e10e753705e9a083f5bce88d77521225ecd9e89f1e1caed367fb0275dc28f620fbd67e6b176c9ae5d2659e6ec662116c9f2bbca3a93043233a4861e0688db6dc1800f752c5d58aa5033c250c891d9126e534ed921a9026eb333333fa8292059b8b446f336ca6a0cb4c7946b6aea3831653122f154a4ea1d7", - "23deadc94481ce28188f3a0ca3e85431964cb31b60fabf381e6bd45ef0332bd4dde774b0281d317dc2e7d0c298fcf8625fa734126968df8b68ef8a35c325d84ba4fc53936ff3ffdd8838d2a8cabf8a9cac54aa444ed9875944e55994a22f7fa8538b1e983b57d9215fac5c0052029644044e790ce2f5044655608c1d7ad3bb862203ba3aba3b526606f273d342ed5721648e3f600942d3f7546f679161436389d879dd8094e1bd1b1e12cde15cd3cda4c30a40835665e4e5cf94", - "94701e06340114f9cf715a1fb659988d33db59e87bc4844b1500448960af757b5282f6d52967a6ae11aa4ecfc6818c962b084c811a57724f5d401191567f24ce917e4f8c3963474fdc9d2c8613c16f62446448b6da6eeae54d672825ed7606a90e4611d0e318ff00566862c955b636b5e81fec3362e8672ad2a6d222a515cf410482836deba092a51a4d464dfbbab35c50a33437ac16a88256e9e23ddd3c827cc58d3e5000ee90b12e4c5175c5733662d4848ae0d406c2f0a4f498", - "735b0758d5a331b2304f01081172eb95ae4115de651b1a6693c5b9543de33df25d9f421dbaeca033fc8bff57313b482778005aa9fdcbca65c643da2f3320e34197868eec3848ff3c70d7ac7d910fc332e9a359f892ae01641be253013b554a0d3f249b3586b1857e5a0f9482ebd91432a852b221f4287a6e81ed24e8064645d5b28ab9a13b26cc1420ce73dbc47b31acf8a871601022ce23bc443b1222ce9a037a2fe5226295feb4efd4fd671338f459ae146032697cf82fc55c8fbf", - "c48d94f14549352790079fee69e3e72ebaa380510e3581a0824066413e7044a36ad08affbf9b52b21963d2f8e092ff0ac1c973c423ade3ece5d3bca852b894675e8173290529226939c24109f50b8b0d5c9f762ff10388833d99bea99c5ef3ebb2a9d19d2231e67ca6c9056d8834730605897426cd069cbeb6a46b9f5332be73ab45c03fcc35c2d91f22bf3861b2b2549f9ec8798aeff83ceaf707325c77e7389b388de8dab7c7c63a4110ec156c5145e42203c4a8e3d071a7cb83b4cd", - "553e9e0de274167ecdd7b5fc85f9c0e665be7c22c93ddc6ec840ce171cf5d1d1a476743eb7ea0c9492eac5a4c9837c62a91dd1a6ea9e6fff1f1470b22cc62359474a6ba0b0334b2739528454470f4e14b9c4eeb6fd2cdd7e7c6f97668eebd1000bef4388015630a8332de7b17c2004060ecb11e58029b3f9575040a5dd4e294e7c78e4fc99e4390c56534a4e933d9a45460f62ffaaba25da293f7765cd7a4ce78c28a85013b893a0099c1c128b01ee66a76f051dc1409bf4176e5afec90e", - "dea8f97c66a3e375d0a3412105ed4f0784f3973ec8c57b4f553d3da40fd4cfd39761de563ec96a9178804641f7ebbee48caf9dec17a14bc8246618b22e683c0090259e3db19dc5b6175710df80cdc735a92a990a3cfb166461ae713adda7d9fa3c4cf9f409b1467f3cf85d2141ef3f119d1c53f23c0380b1ebd728d7e932c535965bca41a414b6ea5bf0f9a381e098d282a554a25ce41980d7c7be75ff5ce4b1e54cc61e683f1dd817b8e2c1a430d7f895e5e7af13912cc110f0bbb95372fb", - "9dfda2e2f732867e60ed2b5fa99ab88eb82dc7a54334d02031258beef75fa4bd6962a1083b9c29e4eeb3e5ab8065f3e2fc732675b8d7705c16cfb4ef7305eb58120f1af5ddc55872a2cbde3a48661a0598f48f63e2e9aadc603545e2b6001748e3af9e86e1830af7b84ffd3e8f16679213d37cac91f07af0af02b37f5ed946ef5c955b60d488acc6ae736b10459ca7dabeacd7dabcfd656511ac913174f6d99327be59befe3e463a49afbb5235f0ce2840588c6edfbaaba00a4211c0764dd638", - "ddcd23e8b9dc8889b8599c721e7f8ecc2cbdca03e5a8fd5105f7f2941daec4e2906c654210bdd478374ddee43ee749a920ee91872e057a1157d384dcd111266221b3c79774476b4862fe450704ff2c5353e9a936cac87c96515c28ed4c830335a55d084cb5873c5fd2dd907f3266d8eb7bf13b6dd7cd4966982a0949efd8e428dae13daee549e01cc3c226211d6307823f742c5ef2155601a4644c46eddd603d4abd959c6d242e427768df3b1e22d87971df58a1564b38311a897c85b497a72556", - "39016647acfbc63fe55a74598bc1956eaf4e0cb49d532c5d8323fc6a3f15a0231597f06eafd74ad245e672bf6b21e4da503cb5bf9d15e9038ef354b38807564d91f38b4258378ccd9b9420a1562d7136196822a1291c913d83c4cd99fd8d420990c72cdc47607124de21da8d9c7f472fdcc780379f186a04da93cd87628abf323c8dadcd7fb8fbade37d7d2b5c9f9fc524ff77494c98f42f2158a6f68c906105ca9e8bb2df463863cfc1e9008d8344f55c4e3203dde6699b59812d49ce1279fa1c86", - "02cff7567067cbca5911664c6bd7daaf484181edd2a771d0b64566c3ab08d382e83932cdd7b4dbf86c9cdd1a4c353a511e68afb6746a507a9cd385c198246f4543d606c6149a5384e4ff54c1b90d663dc7a4b91aeac3cf716db7ca6f9a1914e3a33efe82e7ccc4215999c0b012782402db4726db1d7d1c73571d45739aa6fcb5a20eeb54a84d5f99902a8d356cbf95f34c9c28c8f2badfbc08c69233514493c0c04963268c88bc54039ab2999c7b06cba405936dfc43b48cb53f62e18e7ff8ff3f6eb9", - "5764812ae6ab9491d8d295a0299228ec7146148ff373241a510faee7db7080706a8dada87938bf726c754e416c8c63c0ac617266a0a4863c2582412bf0f53b827e9a3465949a03dc2db3cb10b8c75e45cb9bf65410a0f6e6410b7f71f3a7e229e647cbbd5a54904bb96f8358adea1aaa0e845ac2838f6dd16936baa15a7c755af8029ef50aed3066d375d3265eaaa38822d11b173f4a1de39461d17d1629c8df7334d8da1b6401daaf7f34b2b48d6556ae99cd29ed1073926bcda867421832a4c36c7095", - "4df3043cf0f90462b37d9106e67366d112e4938c4f06abae97869531af89e9feebce0812dffe71a226de5dc36be652e26ef6a4be47d9b2db5cdd43809a565e4fc0988bfe82037c505dd276b757b785203249fd083fb474a25acccc9f38dc5164ff9097e05989aa6e280739a755231f93670e7226e22046914c155bf33d135b3f736ccca84cc47ae643215a054b54b7e13ffcd7ad73cced9279dc3210b80700fcc757acfb64c68e0bc4da05aac2b6a99d5582e79b303c88a7ac4dd8ed4289516bba0e243527", - "bf041a11622715426c3a755c637d5f478dd7da949e50f05377bf333f1c62c671ebdbf9467d37b780c25f7af9d453fc67fafb2f065a3f9f15d4c3561eeaa73fa6c813bf96dcf02430a2e6b65da8d174d2558110dc1208bdcb7898e2670894c0b9e2c894da3b130f57a90ec8ea1bffd27a37b4da4645c546b2b141db4e2c919154dac00e78dd3eb6e4445974e3bb07905982da35e4069ee8f8c5acd0efcfa5c981b4fd5d42da83c633e3e35ebdc959bd14c8bacb52212b4334f94aa64d2ee183861db35d2d8a94", - "a170ceda0613adc9c3a1e427f07beacf3b16ed69fb42b6bc09a38d803f632ad2929dba215b85683b74e2feb1d18fe17d0ea0db84d1be4e2e73476917a2a4cff51d6eca7c5e82232afde00dd2286a4c20eb09800b4d5d80e7ea35b6965b9792d99e399abda8cf32174ae2b7414b9bdb9d63e148f7357635a7310b130c939593cd3479164724011966c4232142df9966f09422f34f20b30af4b640a2c6d3dd985fe0ba3dfa9083cbb9b8dfe540ff9f6c608d18481213040768ef33300d773f9890c724ead320a1e7", - "929477e9c2d0bbad3429a0e0de776695255013108261dc6404cb09828770e274d8bb650a50e490dfe917fc2047b0f8ee72e105927d9fa70523c727778cbf6ae876d641ad562938c870d12f2e047bb78920739dba0c3f8ce1fb77589623a5f1625f5d6ab81940c7dfc3dc3a641d82b2813629bab8282999317d6b93842334f123fb4693a9c2c9d8ba9bfc746642dfbd045cd2021b272eab7358aa954d453da53fc5392dfa7eb881f6f53809b692d27f3366595ff403289efcc691e118b4744a1147071d8909bef1e8", - "3e98bb14fff5bdf7db38a3960dc55ca7d02333daed8712cca13dd5bffd114636559279db72554cc0a0ee1f7e15557d77cab0f2f1131f94fe698db81be38300a856a5eca85e5cf915fb7b6f38ccd2f27350e62cc30ce10ffe835118be3d435d2342ed3d06199b7e20c8e34d68902f0ab8745bd8b7d5b863d525c1f5906d2dca598db8a0f1e67736182cac15677579c58b8c670cae1be3e3c882153b2aa2988933e579ec2d6dbb00c671da64443dfc027dee6dfc3233c99758304570a982bf9b2eb59ccd70d0b54c4b54", - "aa12c7fa50ffdc2811c1872e4bee15f43e6909212385c872eb489f7e06dc1787043f56126f8373bdfa4b3f61405c73dd4dfd3f40aa5cd207e8520849c26f67716a46c0989a99efff42f24e0736e327af8e607c401a1bac77341e9a78c91e35d55b2457bdd5317a405a1fcf7a2a23de68ef92b65819e8aa3807c545361dfc9fe89125123492da958dc313cb5d03cb4b192c54ac6b27fcbc498652f5ed36b587bb74942b3ad453a8d79e5ddc06ebf806dad5046b73251064582ef5777dc530f8701701761884783fdf197f", - "83e615cf6e17a29e63945710b548a6d9935850eec69830841e26cb6071e908bf72c87cf079ffb34c5eb1a390def72d004a9488224a18e189aa1092a0f1135712834d257a53dc1d0e2c6417d8f472ff13b181910f4c93a307420d44beec8875d5219a3160b8e921434ddf3f71d68db1c1d5c39d68edb7a604792f8b4e31ecda7895c99fc7031a5b98a22009c1da005ac8fd2da0b5d742743f5712d12fd76d11a18e487776ce21ca0d6e5ab9ca6d8c394c321b91c14e291399a642721361811a73b7392e8603a3004e7060bf", - "ae1a8f7bfe4b1a0fa94708921dadb2c20b938239d7b9a2c7c598528f20f49764d322ebe85a5b2ea15563cf2f2304baf55d6607c52e2e1160859dcb7af6d7856899eada0e9128a180d3de6fed9334ba52b80c5c362d5591a0ec30f86d37a399927eb1c53076a12d26775522c511c83eb5b7abc2a00bd2dfd5627a8febba53d85f9b74c4b7f0c862ddb0d9298899b646b774d6cc23e4e23ab47174fccd34499253996d5e0917210e2f6daa1685f89f2f1fdfd5509ebc38191d539ecfb54ff0f5bbe6ef36ea35d425af6462f518", - "1d033e06be253ab800c8176d3a9650ab2a5bcaa03e11ea95fb9ab3834b41eb0d1b2bcecfe219364c3104ef65a8d692bd77c798548b7d9a8faf7f5172db24ec7c93006d6e9839368291b8277a82c034a3731f1b2e298d6e0282ec8a7902e4f844d132f1d261d171375c646065e201849f2df73e3748d853a3122c2206aac92fea448500c5418ecfb3d80e0e6c0d51f85831ce74f6c659cc291f5348a1ef8b949f1b2a753633e382f40c1bd1b2f44748ea61127b6f568255ae25e1da9f52c8c53cd62cd482788ae430388a92694c", - "104bc838b16a641749dcf73c57b207ea3bcc84381170e4ca362065a3d492e892b426a1f4fd82f69461d1ce1f3aaf8fc291ea30d6667e7e1aea4c44f7d52a5fa6d34709e6658483260ff5da76bfb74e7d194ad40dcac00daf0e45e74db4bc2248100a8b256b257278c3c98f1f2e3a80cdb812352aaf4155b3a4033999fb9fe7f506994fcf3a8db31e9e5ca8ef8c2e9c6326ca5b0803724ba641950eca877fe6ed6afc2e014651c56d0e6a61eaff7c5ed0b861d4bebe42904c0a568c26aa8abb2e97da2bfb40f14eafb6bf16cd208f", - "5b92e4a175437d0a53eb10de2c56401720b11715a034459ebf506c3fd6534b5e817a0f09deac4bcfd353301d8d031b1331582ac09189b48e6ccea444655866c4bbd123d45ebabb774f877cf12d33b84cfca4a6a94f3f98869fcf2bbb6cc1b964c2438c2f348bcdf9001dce60a4706d20c169a040baa61cbeb0b8e58d505e6e3739ab03e110ae7efdf91347474033defbd1e86af322ec6456d3394699ca7ca6a29a70d9b10a38fe666eab2858bfe12dacb31568549c826c15af5b6fddf779954351be1872f04e53db7b3b5fbf61fd18", - "401cc7bd9f8227efaed70dad83fc8db3bd38efc166f0f11ab142c565c68ba9db680423a3d698b6f3476ef440051fd20b93f6a2ed045825567df5a65e3f62e4442ec396ad260a16a13a1dee46c7e8d88bdd7edf223ab76a9a787c1f4fe9925c051a4ca0e77a0e78baa29f36d193c862fd3a60653f544ea9e3f75f2f553891be8c1fb882f6a6aad118f576f3c2793efc67221b37a45ab6137434f6228cb002fc137b91fb8572c757f00736879453d64a8a868c131810ffdad9e9d028d132157ecb1da675d54047d19b27d3258c9b1bca0a", - "c20cf0354982ca6a19d9a4dbf78f810934db2373941a12c263adefa61a5f385c859bc47028829c531dc25ccc0004c7510e707175a102ec3c4b4c933e3f52033e67476ff5f864c446c042a21e6037f7798363d20267891b965879fde80af6b59d77862e3a229af01b7ac78b578e94bd9f9b073c38a627c1864df0083aabb17024bdab6c3c0f0f73d31d59480523a2f23b78baa0385c15f290114305d7f98786b7dbc17a8c2aad97448e8ea389e68ef71091a6a9735ac12ca5497b9171da11a93c28d3273f58b74e2e46279d3ce9d0b20d19", - "e2365c2754073b511f16a1881ff8a537541ca7362ae7b84223d3c7d1d49d03a37d6d05dd2b819af9705c015dacc9dda83474eb14b7d5fce6e8a8f8c58e870149338d320e5ae476da6749af45e65ffed550d225a39dc74ffd93ba7da476985d6f44e90fc8e82454496260458431804d802fe804d825f611772f9710667377adfb1a11e4275bcecb42175c515f6a9439a359824f82cc9d480954364e6693099a821ace362e6c7ecbe68be8823bb5b49b4f23ad81b64139e3b63d9d4d298a842f013ef0d91ce7915ee8f816c70ba2aa3994216f", - "9c43944676fe859327096f82049cf69e48b98715878400fdf2805e0d5ee642e6cc9c43739f418b701348a033c5cb96bf8702fcd2fac9be58262a843c1e4155ed8a1724b6ebf7cce659d88a95a0c54deb2d7d9574a45219b6419ee173d1d8fad3ace47c962b349abe1048565df85bbd0eb9b11698258c23598023a00fdd26573e41951452027125c6e894a97736ecd63fd15b29a55d8dd9dab7e2e18f541a2e341890a61b7c896e7dc67aa82f3479dacd4a8ec7558d40c34d9ae4060e13718d676c2450258d83de8a86e012813693098c165b4e", - "1c707c29582d98a0e99639211102f3f041660ca03ad0939fe3855b8c1b22d6a9b8673c93e3eabc0ab231509b2b0d73c76a290a363943d12d2ff0ea30c6dd54eda753767effe04cabb4c3966388fa4c83a1906a0f48519a5fba9aeb585e0f8c45d6123a75ebe98fd1d0272f733a3925119481a321fe7509346c05128302851ba17a137f956f184e057a305e79a148727a5926de6854eb0314d5492fd735fa773d99ea34c95ca7546bd3a3aa8e66bcc6d860cec3d35d0e2165d5fbe8be99b6e7967df6693e5a6243e94c9c4a2528ae6305cbeca209", - "8f1e88103ffa378f062cade0ec509bec99a5c73fb273e79dbef24abf718ac26ac23dfd2b8932038ed3cb9637b71643c161142019f45b25b4fa4c52356737a27027e805ec635154327a66bfe64efc6285cca98c34edc7fb6c0766970a545342cf840aec0a5ba1dd3c6949be4fe97b0f8c8186de07536fd9074db34d09b2f08af9dcf9424d6edbf9cd044102c0e5dc35aff78c36d079dbd2c500e19c8c985ae2abaf6b2a20716bb719754a8840ce97632116c4d0b0e3c83ccca27f11c4204b76b5d6cfe6348a9615d8e4af53500dc4c2cabf12ec8c76", - "b9a0c28f1a6156992c103a84655fc6e654fa6e45e45819513afa797024717c00cc195994512fd53ecd1e12dac4d2448e0c40308382312084d2111f7db147b2e6589ce6d977f6115f629508167df8f45bac98abd49f6b272bcc4fd874dd5e29fb6daceb2d727a2a892194cfb9269eda00626ac89b4e74bd29b21e9f6ef18cb69889a02d4f0a06a2e5718899c1dc3b051c2cfa29653e782f87fefa478e6465bf5ff27f8b6abdb500077aac97100bd955ec535a587d66f23354be51cd8170289344bac9451f74e8aee3639f7c09981f4885e018912324d7", - "456844a34ae1074246f8f71eeef2010ec8733265bed7c1cc60043d770edfa320cbd4284a94be2574337e16d27f125074ebd7e99031f7abb4547b9540a7b0b5148ef501b550dd929f3dfe39ac65519f563e9254424aaafa05b1d37c16c771882e9e25d4906ac58603da749adf686932cd73d81e2658134fe69294c7a521d257eaf2110c667fc9d6f09b52d24b93910e532184eeb96eae9d9c9750ac3c39e79367431ac1af7011172d0a8be46a31010219a0310a733068c589bfc4748f3626aa4ff8d355cc893d05111c287c9992e95ad47481a6c42d6eca", - "c5c4b9900b9727bdc24baa544cad5faf8340be6b3759361f53889f71f5f4b224aa0090d875a00ea7116772117dbefc3a81c6950ca7ceeae71e4ba975c50d61fec82e6d9448d3a0dfd10bb087bdf0673e3e19fa2aaa7e97eebf71f11b86034fcf5a61240c71444ac3da15ef09b27b3523d37d309e8722380f835c1aee4a767bb027ec0674040853e5b53d6a31657f51acff6d2487860becd5ce695696cfe5937f4a0217b69e01cc6facc24dfe5f5230b8692a0b718e3b3c789d682db36101795a9a5f8bbb838c3679be72f7941a1db180135347d0a884ab7c", - "1781df2fedd2c39137854737d054cd3ed16b0ade411e41d97888ac900fdb46d9ae26b3d2dd07e118fd57eabd0dfd03a55793c76420666444865371adffc9b2f35068a0d70f9cfda1ac27ccb4beff4ffa5b8bb8bddac843386675c38a181fd0d935d6d51b25d78e7ff4ecef27a9853c0f0d2879c395ed1c4883987d123890d04f851c3e042e1164c68c0d503de16816f4b0e554236e5f4c339ea11d01ce652f6208f78f457a2417a97c0a6a240f443262def4b6763abf53e597bf1a28f907dc7cbdc751a234ea7d75710ad5ab0c37e8e9805102a375abd44011", - "8963552ad1e729ead07750df599d734157aaa4bcdcac17e8eb19b4f99cdb162686ff433137aa4e8a0cc8df0053999196262115aec326cf37567d9ba4760e0ad21d5763977f1ab9b35c0fc667890fa87fc946ceb776a811b5adc69446bfb8f5d9908029dc5aa38db816e4a4e8f98e5a48cf0a01627031c5bd1ced8bc1940dcafe4ae2f1199b186468eafc07e96a89d95dc18ef0fed3eda5b58ce58f221a47ba5311313cc680367eeb058fafc7bcadce5f520b6371489d9e529278ae6ee2650a85aed82896879038bbd9aa8d685fc9528943ccf2235cdf69a86464", - "23ceae3008085134433f5de4b47bafe0f443d443491e6cd47b216dd2dcc3da65239515a6e6b9beb9a939ae9f1f1f5e11f88326475e0962f319d9bf75ddfb4a46e7cc3f799d7547f3c0b2e089018b75787b82ea1a7295e7411f4852f94c94170e98bb0647923b8eb7d184038e56560da46085540cbfef82b6b577c445d038f6c93fbfdfc96ab3a0191d20a57b8610efb4cc45cd95198198e6f80ac46b0601511885f650eb00992605be903bcb46cd53c360c6f86e476c4c9ca4ad052eb572bbf26eb81dd9c73bcbec137aea6ee27aa97dadf7bef733fa1555019dab", - "c0fd31e82c996d7edef095cccfcf669accb85a483ea9c59f368cc980f73da7202a95c5156c34192ae4ebf773c1a683c079b17ac9d08b4265b4054fcddaf6666ca50f38f1a2ef2497459a68c06837363a526e850ecfbd223f55dba67db017eadb7a9139abb5bf3854834478b838aafa16c5ee90ea52fb2f7b8db2bcefb85b06fc455c2b6c27d0af9a49dbf2f313bf2599370637393e7972b31d8bf6759f3e6115c618e672831f84d76ba1879c754144e1df4d56b1e264b1797dcb8ab165040c8d20b931071081d7f74fbff590bdc8e888e71acc6a720270da8db7c821", - "936fdab91fba396e4a8754a97a04ba333daadc29885c9d0c8fea3387165278f4974e468fea57f2bfd8428c4d0f010833283db73735d39de0c0cb5898d0c06c0ecd05f61098935cb6130a8da60d1a6c2ecfe420f972263fff5a631b09e81c837183c5528bb1c740b36fc39cb082f3383c2b4afb25d04ad1d1f4af63dcf26a0bf5a647cd2e35a51cc119c4dc5031f5715b3bfa1f2b92de06bdac0d670fdd30980f32c51f3936b51e5db6b95a8d36279da5faa4c4e454f2b7e54e9f488071011c7f6f9b63da260a2e46d796d36c9a9dcae88085806a10a77bbb670d475778", - "a55fe162b287bd6eebd6cf7e7aeea8672322d924ae42c7404ff89aedb98943f3755d2889bca488cc7000e6e9b8e7a0ef289273cd29c44cc600e330d1775e3cb767f12150e1615dca8c3f67466463a3ca993a1b788cf67a7a35b95dfff954206eb5ea1e1bf7fb06482a551625b5c9fd9a86e8414c8cf79d3a14104a153cbe04aac5172aa4c4a89349f5856c4262dd1d7317a7544c9afbbed449e7dcc2b58d9df6c9c9ed3883e42e80f5c2433550f30e73c7bce0fccdd880adc19282a392dae26a0108e7faf168cfc15937aeb046d60712603286b8ddfb27916b79242d56f1", - "2bd6976592408cdbc4e41dcd3ecfbb786775ddedef914d9058e6753f839fdfe15b17d549dbc084aa6cdf3befa0158aa84c5d58c5876144fd7e6c41ab7d42419d0dd353732e0e6d3fafc4f5626c07433390a4fd467197e85b5de7e2cf1c26cc575356adedcc0740008523b503df12ff571387726c5ccb280376d19cbacb1d7ce7aab8b13292c6a8b8881e949cbf6d4610d16ebba1d46cdb8d0459596e0aa683d0307bd926e14de19b9bfeaefa29d91b82248604673a455520cbb64eef3f38cfad8e126a3b1cfa1aaba53a784c8ae0c50279c0ecdab54095d36f67ace9b8ebbb", - "71913ae2b1c8729ed6da003c24a1d4f96e28d7faf55ca14ee0b2865282b9b61103ce6ee0b00b00aacf2081adedea5616f9dfd22c6d6d4f5907bcc02eb33edf92de0bd479794f51246d9b612b4543f6ff633c4fc83bfa6144c9d26721cdc690a3d5a8db54d8bc7873bfd32924eeb502810732b5ac2f1852bb021c401d26c39aa3b7eb09083093a9e89bf889b53383b5af61110aca1b9fdf38908c7d5a184fc5f46b3423a66a2749feb8de2c541c563987278dbd0513d99b732411012b5b75e385510de5f6839c3797dc094c9501d5f0504b06b43efb6e746f2129ca189c1da424", - "9d048a83294de08d3063d2ee4b4f3106641d9b340a3785c076233686dd3382d9064a349c9eaa78028d35652078b583e3f708e036eb2ced3f7f0e936c0fd98f5d0f8aa91b8d9badef298bd0c06843831279e7c0c67ca7e572f552cfdd984c12e924c08c13aeec6f7e13d161785546ebfd794b5d6a92a4744e52c4cab1d0df93b9468be6e264e8cfcc488f9c3c1817cbe501f4b9cc5999483b7433aea777226b25273a6ef2331b5f3b6db8091591e8e276015da3ef78bb2ee0526ffe23def2d8d193cbe594e8ced1f3d216fcedae2a1eb288da82e34cf98aebc28def658ee0849ae7", - "3251c96cbf82ee2e5264528c0b6cdfc23d20e1eb2d6441b5d62f0fd24c692a0d45a8bc8aac32884b7141ac0f4f113ec9fc7f6b4db3d696374177f9a42d602ca471275b928f639105a55b846da9ac7274cc37de8c38541f6895f94d72a81e117844b46601c201f7189b935a96e42505f2098ac985d92dfe86349a706ef6325b3c2e4060ced3c453e68ed09e043bcc75846b80118dc53530248da250fb57922d0afa53a7b2c89161aa4fa372a46b2a8e1307741cecedf585d2f998a9d496763800b6965c38a5d8aa566c709f13699c8185ab4fd8fdc8b824f4dd6d1c255b4788f50574", - "2de31dbc8a012254586f3229d3524fc529554e98850d30acdfc11406bba6a142029126ac165ee90b2de7509fc3571a8ee12e16b05054eb8baea879d135b39627f0d8331be3e66bc720c2096ce74e437daebf3bc53d8f2ccc228c3256d3edb6e9ae7c354a0c9350e6d663a9a30630bf9da3d96b96608a2a171ae28105714058b6c4b38a36c56561c4612c32aad25c65b7fb6faa4e4ecd44ebf9b2fad42ff9a807cda2581614fd30d41a7436069399b8d4f062a37a5bd4066a93d541fa5797a7d3e7dc9c4c40f0bbf5256f71613240f9ef128b3423eacaf428ada06b6a531f835281e4f3", - "07dadee629a08223dcd7ec441287b4c5e26347451d9c003e3a8496b4ea313b51126283a6720d7851e24423d9c9c818b4601247178f38a61f45fd4c8596d79529d416834226666a2c8552bbc901cc5cc3406a18fc88077fea52e1b620748553052ab7788c0d025b095b736fbe714cb3a968ec16b5917652eba2d7cf32ef3140d6c27b25d053e9786d24cd09a5306a0ef55e46201faa6196a91084267d7a7b5ca57c2efdeb2cb97d682d2a191b915553c8933f1d1b7faf0b4a1d83ef611f1e44438bc1c3d860fbfd12b5f26e5a6889a31ce26ae6a55c7a563b5816d113423ef3f25fa9befc", - "1d94166bb387526d519c4ce150221954da8930f66765fe6a5504e30a69962d595cfdd07a82c003843598864261f053bdb6f5086d516c261e089caa89990f0967605768ae9200bdfe4dcd7b77a93265cb33d9851a2a1036113c732bf3f37534530641300f0620de5c16101e16f4baf39d9fcbfcb01c52afce0992c329d8dbb438c314eee995c5020611d6f889e06b8a032785cba9a415580dbf752b5e510523c89f478cc6f047bd926f51e4a965c9749d1e76379c0e7e5b56803893bafaa4d2892b4c52f143b2fa777cd1035ea418684b8019df084f9a3f1f768753096621f342895c510d01", - "fc0073f199ed8a1d6edc8e7bdf182670003108d82b283aba82326e856f8de378987a03d0fe8d2041440fd29d51c63796aab44090d2b14ee00859b3a08cbe88f724badcd3c401226c5db8b307b8deea5be305412b080e9f99cf79d6d08d3646f347a7afebb62912e3e246e2e726f9aec5c101d916e47f984507b1d65d313697256c77da7eca3bc5811c87bee02a2826cefff0d92bae989609aaf95d70561b40d98474c37277c884aed887a1606d206b11e8a8a71d1f1d19319557b57351228ff0404be700a6cc56c0a30f3d4b7a0a046463fdaf19e7d5f59e155f378e35baa33db1e881f2207f", - "f42a6a91278d6a076feba985b1cf4ce0af1fa9d6d039c136e8971e665ff088a10b6b9a379a6f5526fc5957773a0ccb8972a4a19be0745ac13937030a54b18dee4f4c5df47a58a33a7516b90e646e5da999166ab0e52f457f7c9b7e391836a687eaae37b377e59a4c995ab0c57162c307ab951a9ba6590f429cd27250e7010eb794ec1b1ec35f8aad189b2fd3e8aff24d93601d91a4884e6f84b02757ce7620a02901519fccfda52f68ad6df709d112a9c25d66bcbb9622806427ca8b8d346b6db05874bde800cde9cf17df4b05baab0f133febd1ebbb053b49c109a7f5b1f864a304d10288e2f0", - "bbcefaf4a0739509f8a2f831c954071aac52e60cfa882a867b8b910dcf7edf92e1c0692bb027bc378c460a01cb6ecc8f2a012dd84ee5a678cd497b1457b6d393421fbee98ff544fc7eba24cbc3aae506254d9a2d74dde74437ce4c8a69010718506bf4c5943342a942e5e2d3406a3016280b6e37954c5d5e763346251afb0b746cad68cac757f9df765e092518729cfb9a5e76300c124e708ca33591a369767ffb63933cb72fba67beb2223d98984d0b75eb5d1a38615913747b520b3d613c715c0c77d2987bb88f3c419bcc5d38573cf4a8a4f550b2d876f05ca252d88c70a561d869a5018b32f7", - "dc2437010cb05d9cab2af5c275e1d2acd627ce19fb86355df91fb8d059e60d591663c8eb077d48388c9a321057a98136f49f0098348d9f29d808936f98bb1787c7ac75fb14f6076dfd2de5b59b1fa4848cabaa9a99a091dc24b561911c392ecdbe53f4adae82b852d830adea3a10490c908e337ce0a6d12354ce05a37ad3a06696b66820af8a1f67e6287533fd6f38a5f6ad1c6b078c08baf2c37d2683af01e6a5b33796c8ae48935a888f9bd265f4f11a4e27c433b8b1c9afd140bcd21a07e24378ad6badde8e47c57e3340f49e2406e8d49afadd65eaaa4c3d078c27d7e42118cb86cd248100a356", - "6c290db326dd3152e6fa9b9c0cd7d49e50a0221b96e32f5f34a8cb7d0c2edd3e937a7d025d6999b7b468add4d6894d8f7aceaabc18f4d9c171f1fe95ea1ae8570382a8450fbc595d95b1f51d24e1abc2970b0e1d20ca40aa21bdfb3656adf2f19882eda606f5ef1c03174e1d94c8d12f0fee8dce6852f42a364eeafa27a7971d4379405db8e46baac4d685b969238e5df06292a6c790bf1994a051b038e1d8db91e1bc4804f32443781c34a552ed2e8100cea374e77af56ba0e11c45990d3ba68df9087b1f4968cbcbb1c42f99b7267c76af926ff3134e093df28fab039cad420c6b70f2d9b5e678c155", - "ac724a22ebabaedbbb052953e3c264a4b6440f313bad501cdc1484b64f33402a2230898776db5c818c28035ffae6ea24abd04b7159e42159833903a0c23a7c564f7645e49ddedb748fd9e51bd6cbf2eced98caaa35226970f003ce1fd260ac5795e096f1c04aebf8fd36e5e2adeea929b5e963a3cb71d6b55c85bb7d3a2b03a7e74b4416de8fa68950168d7c3ae8ed2e29bad1e8a182a7c5418e5d564373163778cd3c34e9d320eb1a60480a8f98b12e0026cbd7752e6079812e3767d9f55f3f10b8c214a6eceb2a58954091a06b33862af171a9b60bf2c6a44e8766e6c56e98092c56f2a8510f6d05c103", - "8c70114f7cffb375c2b9a06e27297a5c32418b2daf68af5bbedcc7106edbc070e764bf40c1f8eb15079e2ab77f898afff3490108ed9afb7ea9cb05df41d263be0e42d2321d3d2656622d7bd232bf68d37375fe7314b09cba66f19c8b59424198ee69e7a9f3de0ecce0685127807ce336fa479ccaf7aa1ebc4e406271ce6c4923ec36093516498cc227f9218869346c80ba5ae83e023aca0ae2bc86b5bf5d115a4616b6587cb869d92f8c780ab70d5766de07a204af5e1c8dbba622516d2e911b36c82e4687e4d258ea616c07f76ff0baa376c8d5975cffac0b25817f779ae3ce88b72eb47e378484ce999bf0", - "0733d59f041036398233fd47a84b93f6778ae5259ef5d62aa3b9faedec34c7edb570c18b2a5d2c4c55cf656d98a1ae396d45a3b746b7ad6f07312c3d05d1a50ffa90bcdcdba105e25b7b0c52664223f8c2476925d46dc6ea2406ded7d0b0b292f6656cebcc7616cfa4b82aec68b35d1da67f6ed2bf0171849d6bb65128d8a140ea5cf97f1003f8d7093bee077be78def4f7bd2caccbf0644f26b26285225142c40038484c3bb9ba9597744f4389e76dca3eb695c33ccc621cab1fb603cb3535a0ad318d220385d5e94f8674f3d55e97e097f8d5c049e911946afbfce783819951d65d6bff4567dc951390d1aaa", - "398ddbba3dcb5642c102efa841c1fcdaf067062e7eef8e2ee0cd73d7f77e57372d6ee1a9b7b6f86ad12d575001ae71f593449cb5a476c6bfeddaa2af0f9239c1d7effdedf66ceaf413707b5ab9661a7cc0ef8cfe4d1651579c4f0f64e2d12a52653c54f2dd60864e769eab8a627c89c56ee93365d031f0d2523cb95664b1575d51b122f33c9e94de75432a690658c977b68aa5b721a393f9b9b3b612c10e920a7d510c6d8460b35f8614c42f5d2c241a01b28105aa7c1b521ac63ebbedafac6d5a38c898e8590f918a1927bc53aecc2b1c8b18d7df9107c6997d9b3fa4b0bdb1c603da619d9e75670b97a5b40f06", - "ef07bbc7c4150dd47f8c69a7989948fe831dc798b0424dcd6551bfa8e88216095a7e5d720909bf3d23526b9ba464b66ff6b63a7337c31451ab9a15f04ead809a62bb52206237de77597a730106d02d227dd6099ea9ee2a92cdc446ac3b9d024e32255adb3e9b56b561c431e0b5a721f0336f19568a5335d0ebc6c73ed8ff2c15e219477d9e4b67f2928e251f8a61a2848857e037d010806c718ab062967fd8e85f3722252957923f5f9005aae47b4b1b3fa464e3ba9df573a56055f17e903126fbbcb6cb96de92fe617c97f84ef3ba0d8f2651dc4aa80c157f372ae1bc02e5067ad076f3fe48bb72c0f3c99273f82b", - "c7076986d2333f3a6752adf11f1a9e5c6bc4755f341073cc86a9c7519c8db029d5ae833fdf3fee826ff4692c57880c5074620ea97c00f1dde1e8a0f18501627984ded4d1b5c4af35be5cc1bcc868060a49a968dc0547acde490b4c68d79924a93a986aa0ad060c7de706e8a99ce8f84a4f8707b52a8ee122b763ba580d6b1f35f6af25094c69f49247da96c836991851ad36f60bf577863d7471608a012afa7a56656abeee7cd9b4f1f4d9d13a8526c0f33cd251caf7486639e787250390e7e488e9ec311fc3d847a7266cc59bcc2bc34192554aa57cf25db10ce04bdabef3fde6db85f55195ecc2ff892b2e268ebea6", - "01789f40d42d8d3e4a416fd9ae7de78c3a30507809eda200e1afaaf8d7020cd1fad18eba62d821946f220506cf105ff0e2069a771a2c233714afa6b2f695497e4b95c9693dbb93ec4c9a14720676aa87ee31dd34e4e081756477032b4a57b328285f2cdec1b269754c474936927e93acc26012aff1bb36f30c2402aca0a9b9ce9568f5000e2c934263933b436c94f8d6589c89db7edabc5d03a8fe795fe50c5166beab64ed7c22662b984ae2c66dbe4c090b0df603b27c759278f8d66859afea3f6a8f02c2c2a2202b9fc29132256f164b5050a803b43688dc4c9ba86374a3522afba5d1a19bb3820b883aebc267627095", - "2c61944bd6a50da00ebb951d2b67d79fc6b6fb5aca83b1de3dbd7690ab756bb1e1a21051ccf1e24136ac8ccb42a2ee10be94d2cb9289d5f52b6f90e9d07a3478f36a1eb7d08c3dec52ca154fd1427ba92a4ecbe73a71bceafbd26e9a39d50821e2876d3a0c0e6e373b9795dbf72ea29cc439ff42706be798c90d4617b39c90ec84bf9fb699dc8a9a34e25d81759d6c57df45efb1d0d68aa51278564b99633ed5dc464bb7d53c5c21f798f33bcd868657ecfe75a1ed8149d394b398969ef624831b30f1458465bfd2fdf3f284f2ffc54bf2817b5fab2e02056e864f78bb6fd870c64f3609dab218f25da8060f756e45121e79", - "942fa0c68cc72f69518a3a7aac0cde45bab0e928b5cb2bd24d049fc313f74b6afa87c4e34150484f3b5200163f8a6472d04777928ecc49319539fc17d71a38090f55a74f757fe45781a3c09f08dcd3dd4c73c8533a5e00cf8a86ebe77fe45be2848574f7c5d25e9a0632a60d2dd41febdbf987d2a0487e4a4ce6ed5f49f2d741a88ecac232b1498253fa4ee8147bbd0f600abdf295e81f7570015aac5fe6ca7bb4a99bb3fc54287106d7fc1132a574af49db82a7b9a5f33e193cde527ca2176c52cdab672165e0fe5720f71ada57ee90060aa069ae2a0bfe67c1b71b17c601c3c2224bf9891bc11ba216e3ebcb51fd95b8d7cb", - "0d68cfe9c087ec116fe7572042385159cc705960f842aabad1ed1387ec1697f4413a23c6090041328fedd4b626c6eeaac5b5a71acc1fd1bb8fbd228857ac5bd045c364be7a5a26338ff04c99c4c473cf445a891db6422d1bdef4533442df171643fc36a092fabb464298e4194c9e2950884de13d113ee24160a416404c16ddc5d2476cb3fb80da543e6ed9105f6003977acb34e1fdd2cbdf7a00d5ff84350b74ac231418c0d88269d02d824802791ff42a51cc835deb9869a6023f867f82ef6dc0bfb03e6dfa835646bb18a4074773486e308aa39e532aaea4e6fb35dcada7e060f8282c371ed26d22302323d4fd142a85534671", - "45e24b167a0bbef1bd8f79dd047763d0754f36a7b623f298059d177e8ac994945c37d2c4af06f01318960301595941124592f2995af1459d854339998d3ae17534df2d9793d6e203857d02c98a0cd88991e641b3e640090ba303f87b907dca8ca462fac19ad079b2c82ea5b521ab891b10138b083b3d9fa214a8fe60d1cb3599c5d199c61a2cfb7ee2f39e5a5abad5ac4998b707545f73e92128d21803420526d2598a53bb314adf29a0ef56b94bd2221601eb53ecb8540e8fffd38fba7bd827ef255e4ef55491475c0f383a241f81c72af4e1dbf2a65cd4d18a497615aa0de2791a3511a7977a8d4d41492bfa4085f2fd4e8f751d", - "1c1bb695ae90e6e33fc1e8b2a62ab98bf835ac7193440f2351c8cdd830472b637d2fd9c9013cb83caef506abc1c4f7567706db6046b1d184579c7a9223ab1b35e32898c70a3c27628123ffcfa518612f080a2c4a9f8e0a927a47dc98307d2b48de9d5dddcb5c82f0b0e4e610d44f1baa9bbbf7f5a727134680bb7d1327b73b52d8e5e36dbb53971e99e699d79f75a3fc01316bd7012947d119d6aeb7f75b8fbf0479c03002148553fa0da450fd59d4f1bebc252caa11ed9bec5b6ef54279b5f8382b61cffc67ec03f4baa7ea476c31364b86aa8ccad9fd0818717f0ced2dd49477874b4341c602d7a1beab860eb476c7e3ce597e6926", - "7a3cd9bb2277e2c7f1134fe7233f0f7883c2db9fba80aa5742b03041de0fe589d9e5ea84470dabf41bb66816f3e33ebf19a0ca5aba1004cf971249b258ff26a98dbd0c37ec6cd574854109433357720040bafed4531e0079186b1e853e0ced35d08d27f6d732ed6e2c6651b51cc15c420a24f2dc36c16ef4b3896df1bb03b3963f9aaeb02a48eac5772abd5948c2fd0db2bb74e3351e5eabd681c4f413655bd94dec96b1544c1d5d2d1df4bdc26020d25fe81d5238de824687a5505e1fbe08d11b3924b3ccc070fd225bf01eb79e3d21f7b62a836cd3bcc11c931669c37613470e356143df87c48848a829f5e018973a5db88eb6c60203", - "3f158afd0733fcc5dfe1efc2dd4eada732f942af734ee664955bb1ba613eafd0f349e7554a14d68200c62d8f2dca2ec8b81c8350735eaf437041f78b452598825b6899560963ade66a0fc74ad01f8343d1d19c7bb327a8dc14ffdb1c42fa72b2970d9155e2da6a2e6419d4117842d826ff38ffab9617307a0283d3ea28c8104ad9a6e087bb750ed1d10fd8f7100b1663682e979d80e43968c33d9eff66f4d1344e583ee521e78d0a2193c0577516b978339c143bfc689bc744bbc4a9163063de82c9706384b6b385e54666c86b34f23c1e25be293af06092ca31d857e11e5b2caf0d19dd3afbe85380878eda76d718b4bb869c67e044e242", - "a177af4387b9bfa3d59e97ee7b0ff5f4ae4a326fd9204c8d28831a67fcc385ee6c4828247b16d11aea9bb8cd9e6c4d2876c6b2fa6d5041ad39e1b04039071e29c4d86417e7eac4fc7d3823958a021823e2c880a757dfbcd0c8196371db5bbfac15e4d1a0596508b6d26f8c4a664924c95082d173f817995b44c4285d625d9b2f56c86632fe1295c5a8a7a3760028072bcb07bc245a705e7174d06b9d5c0c8ca495b9ac218f1921fa63f2db3fd148f07545366d008fb5aead7497d902b91fbaa39669929d4ae9d07df8557f1f0aed7b51252f10c6606e5ff3ede1327530ca356b4896ecf14bf7322d77fddfbe28d52f6de7f66eeb81704c87e2", - "01a15b9018e35cc342c926b01d03ad9db4993a6bf92e0555969fee90033f28f3ec234c1268b11b040dfa0770d4ceb39edfeb8ee6a589f4eebcc08d2d1b0a1a52953aa26eb44fdf4a2743c3dacb212a0c0f325572f645f53027b6f3c0c55abaeb1b0918c89bedcb5028f094d743ea354f8ff553c45f111a8fd5a14a4e5c835164747d302472e19a67da04b4c8e39756a9d248ce14d1ed43de75aca86850f2455eccd4639b2af035bb3f504cc9065d091c1c47e036083cb3fc50bf39292b11737c7ce0b49673ba93981de304dc65a671775b6ff927e3ff93850b214fffb5792105a4bdc81354d5b09e84afbdd1792b8fb4e9d0ae3dad2492b03282", - "24f07ae31279ceed18ec6d35990f21200934ad6b132c6c62e82fe92a40a0e60a5bed10720eff5a1f728971888682772b2d9060d4fee88f37d0824e7384dddcc549475f0e1a44eda4804778b62febe46e04657a20577ee70acb3425e334881eebd8ddf714ae8c527ea747e3367de384e595a43b299b6bb3f6b0a4716cf90038e0f75a47d5057d7fcc3c8a8f9224992c67f8ae0d3251ea09a24aed9ce57ab637f6b3cbb7083df62b6287f64d0877984c4249d113bdb2b07865082aa24cd7ec07061b17de320f51f29f25b82d7073d369cf2dbf96310c0c311997911b2cc02f606f9cd99663c57e78499192a2a78f9c9fa67013e0f9817287faa69b22", - "4aeb32bf9d050f10bea18d9f71b4afea7bd08550e574e7d50df234c7413668b297b6721d7a0f0bdcdcceb2f55adddea28cd59bd44be0c5ec067039e428706caae11f565d961ad6e7f4c51b0aed6d05cc5b8d826c4b9c39daefb6c7da46dce619a359dc9ce215a215218fa8d54ee0b4f301b6c201c7c2c5f7cb1c6e0cb76ba6c6e8f63ef7a5213d550b0d0857fa0ff9e3e38e497161617413ac066e2fa539520233193a5cb7baa0c2cb20b45e56bfed2c40a9544d1f230dd0cd6d4976e7cf51da8a13200c3957c0154c8237b2931ce19b824963ac576ea49b548cc6aa85c47796b470fb2c6308d88f390bb13607e294c84a838b2713b14ca6a5e8bcee", - "77e607478be5502432230c913d9ec82f967d87c0ee169a74076f989648853eca693277287f8a5b306bc94dfdbf64ca5cb5dfc0bc498589d51a691b8d57d4b0a9ee247d038fe1b5571183be3e75c37045bf1235863ff1b84b208c10e7f1a5ba54ff36af5b2870129867164d013e0a6d2cc067a3509bba2f46390302c80b651cf590ef69aad8effd94cab28a9b44be6a38b58cfc47c9c725d6fa467894163383b6873d10d263b1cbbad932ded59ab503920267ac026726f794a335a88f6ef564f8968c6fa6f5d3ea161eb6062ca349b9a0e4038273399cfa297a6b07ceda1ebaa99c9de2d935ee230a08c5a488ad46f3393243371d40916b8063cac9da63", - "50957c407519951bd32e45d21129d6b83436e520b0801ec8292d79a828106a41583a0d607f853dc4410e0a1427f7e873455a75df065cfc6eef970f7e49d123b346976460aadd91cf513c140c356442a84656904a8b1d708dc6089db371c36f4fe059c62302eaab3c06c0cb3b429961f899dcf99798464b8571a440cac7a52b495f32417af6bc8f58adc63647531f804b4e96273b29b42434c1236bde80ba3744fef7b1d11c2f9db332b35bc25123338ac9a0796aac213c9709b3c514ea7ecd80e22d3d8a74f28c8194418a6e1ff30714d0f5a61c068b73b2ba6cad14e05569b4a5a100da3f91429d6e3ffee10ceea057845ec6fc47a6c5125b22e598b2dc", - "f2273ec31e03cf42d9ca953f8b87e78c291cb538098e0f2436194b308ce30583f553fccb21ae6c2d58f3a5a2ca6037c1b8b7afb291009e4310a0c518e75314c5bb1e813bf521f56d0a4891d0772ad84f09a00634815029a3f9ad4e41eafb4a745e409ef3d4f0b1cf6232b70a5ce262b9432f096e834201a0992db5d09ffa5cbc5471460519a4bc7cdc33ae6dfe6ffc1e80ea5d29813136406499c3514186ced71854a340701519ef33b6c82ca67049ab58578ff49c4c4fbf7d97bfec2ecd8fbefec1b6d6467503fea9d26e134e8c35739a422647aaf4db29c9a32e3df36e5845791fdd75a70903e0ce808313a3327431b7772567f779bbaee2e134c109a387", - "5784e614d538f7f26c803191deb464a884817002988c36448dcbecfad1997fe51ab0b3853c51ed49ce9f4e477522fb3f32cc50515b753c18fb89a8d965afcf1ed5e099b22c4225732baeb986f5c5bc88e4582d27915e2a19126d3d4555fab4f6516a6a156dbfeed9e982fc589e33ce2b9e1ba2b416e11852ddeab93025974267ac82c84f071c3d07f215f47e3565fd1d962c76e0d635892ea71488273765887d31f250a26c4ddc377ed89b17326e259f6cc1de0e63158e83aebb7f5a7c08c63c767876c8203639958a407acca096d1f606c04b4f4b3fd771781a5901b1c3cee7c04c3b6870226eee309b74f51edbf70a3817cc8da87875301e04d0416a65dc5d", -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish/blowfish_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish/blowfish_test.go deleted file mode 100644 index 368ba872bf..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blowfish/blowfish_test.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2010 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 blowfish - -import "testing" - -type CryptTest struct { - key []byte - in []byte - out []byte -} - -// Test vector values are from https://www.schneier.com/code/vectors.txt. -var encryptTests = []CryptTest{ - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}}, - { - []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - []byte{0x51, 0x86, 0x6F, 0xD5, 0xB8, 0x5E, 0xCB, 0x8A}}, - { - []byte{0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - []byte{0x7D, 0x85, 0x6F, 0x9A, 0x61, 0x30, 0x63, 0xF2}}, - { - []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}, - []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}, - []byte{0x24, 0x66, 0xDD, 0x87, 0x8B, 0x96, 0x3C, 0x9D}}, - - { - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}, - []byte{0x61, 0xF9, 0xC3, 0x80, 0x22, 0x81, 0xB0, 0x96}}, - { - []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}, - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0x7D, 0x0C, 0xC6, 0x30, 0xAF, 0xDA, 0x1E, 0xC7}}, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}}, - { - []byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10}, - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0x0A, 0xCE, 0xAB, 0x0F, 0xC6, 0xA0, 0xA2, 0x8D}}, - { - []byte{0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57}, - []byte{0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42}, - []byte{0x59, 0xC6, 0x82, 0x45, 0xEB, 0x05, 0x28, 0x2B}}, - { - []byte{0x01, 0x31, 0xD9, 0x61, 0x9D, 0xC1, 0x37, 0x6E}, - []byte{0x5C, 0xD5, 0x4C, 0xA8, 0x3D, 0xEF, 0x57, 0xDA}, - []byte{0xB1, 0xB8, 0xCC, 0x0B, 0x25, 0x0F, 0x09, 0xA0}}, - { - []byte{0x07, 0xA1, 0x13, 0x3E, 0x4A, 0x0B, 0x26, 0x86}, - []byte{0x02, 0x48, 0xD4, 0x38, 0x06, 0xF6, 0x71, 0x72}, - []byte{0x17, 0x30, 0xE5, 0x77, 0x8B, 0xEA, 0x1D, 0xA4}}, - { - []byte{0x38, 0x49, 0x67, 0x4C, 0x26, 0x02, 0x31, 0x9E}, - []byte{0x51, 0x45, 0x4B, 0x58, 0x2D, 0xDF, 0x44, 0x0A}, - []byte{0xA2, 0x5E, 0x78, 0x56, 0xCF, 0x26, 0x51, 0xEB}}, - { - []byte{0x04, 0xB9, 0x15, 0xBA, 0x43, 0xFE, 0xB5, 0xB6}, - []byte{0x42, 0xFD, 0x44, 0x30, 0x59, 0x57, 0x7F, 0xA2}, - []byte{0x35, 0x38, 0x82, 0xB1, 0x09, 0xCE, 0x8F, 0x1A}}, - { - []byte{0x01, 0x13, 0xB9, 0x70, 0xFD, 0x34, 0xF2, 0xCE}, - []byte{0x05, 0x9B, 0x5E, 0x08, 0x51, 0xCF, 0x14, 0x3A}, - []byte{0x48, 0xF4, 0xD0, 0x88, 0x4C, 0x37, 0x99, 0x18}}, - { - []byte{0x01, 0x70, 0xF1, 0x75, 0x46, 0x8F, 0xB5, 0xE6}, - []byte{0x07, 0x56, 0xD8, 0xE0, 0x77, 0x47, 0x61, 0xD2}, - []byte{0x43, 0x21, 0x93, 0xB7, 0x89, 0x51, 0xFC, 0x98}}, - { - []byte{0x43, 0x29, 0x7F, 0xAD, 0x38, 0xE3, 0x73, 0xFE}, - []byte{0x76, 0x25, 0x14, 0xB8, 0x29, 0xBF, 0x48, 0x6A}, - []byte{0x13, 0xF0, 0x41, 0x54, 0xD6, 0x9D, 0x1A, 0xE5}}, - { - []byte{0x07, 0xA7, 0x13, 0x70, 0x45, 0xDA, 0x2A, 0x16}, - []byte{0x3B, 0xDD, 0x11, 0x90, 0x49, 0x37, 0x28, 0x02}, - []byte{0x2E, 0xED, 0xDA, 0x93, 0xFF, 0xD3, 0x9C, 0x79}}, - { - []byte{0x04, 0x68, 0x91, 0x04, 0xC2, 0xFD, 0x3B, 0x2F}, - []byte{0x26, 0x95, 0x5F, 0x68, 0x35, 0xAF, 0x60, 0x9A}, - []byte{0xD8, 0x87, 0xE0, 0x39, 0x3C, 0x2D, 0xA6, 0xE3}}, - { - []byte{0x37, 0xD0, 0x6B, 0xB5, 0x16, 0xCB, 0x75, 0x46}, - []byte{0x16, 0x4D, 0x5E, 0x40, 0x4F, 0x27, 0x52, 0x32}, - []byte{0x5F, 0x99, 0xD0, 0x4F, 0x5B, 0x16, 0x39, 0x69}}, - { - []byte{0x1F, 0x08, 0x26, 0x0D, 0x1A, 0xC2, 0x46, 0x5E}, - []byte{0x6B, 0x05, 0x6E, 0x18, 0x75, 0x9F, 0x5C, 0xCA}, - []byte{0x4A, 0x05, 0x7A, 0x3B, 0x24, 0xD3, 0x97, 0x7B}}, - { - []byte{0x58, 0x40, 0x23, 0x64, 0x1A, 0xBA, 0x61, 0x76}, - []byte{0x00, 0x4B, 0xD6, 0xEF, 0x09, 0x17, 0x60, 0x62}, - []byte{0x45, 0x20, 0x31, 0xC1, 0xE4, 0xFA, 0xDA, 0x8E}}, - { - []byte{0x02, 0x58, 0x16, 0x16, 0x46, 0x29, 0xB0, 0x07}, - []byte{0x48, 0x0D, 0x39, 0x00, 0x6E, 0xE7, 0x62, 0xF2}, - []byte{0x75, 0x55, 0xAE, 0x39, 0xF5, 0x9B, 0x87, 0xBD}}, - { - []byte{0x49, 0x79, 0x3E, 0xBC, 0x79, 0xB3, 0x25, 0x8F}, - []byte{0x43, 0x75, 0x40, 0xC8, 0x69, 0x8F, 0x3C, 0xFA}, - []byte{0x53, 0xC5, 0x5F, 0x9C, 0xB4, 0x9F, 0xC0, 0x19}}, - { - []byte{0x4F, 0xB0, 0x5E, 0x15, 0x15, 0xAB, 0x73, 0xA7}, - []byte{0x07, 0x2D, 0x43, 0xA0, 0x77, 0x07, 0x52, 0x92}, - []byte{0x7A, 0x8E, 0x7B, 0xFA, 0x93, 0x7E, 0x89, 0xA3}}, - { - []byte{0x49, 0xE9, 0x5D, 0x6D, 0x4C, 0xA2, 0x29, 0xBF}, - []byte{0x02, 0xFE, 0x55, 0x77, 0x81, 0x17, 0xF1, 0x2A}, - []byte{0xCF, 0x9C, 0x5D, 0x7A, 0x49, 0x86, 0xAD, 0xB5}}, - { - []byte{0x01, 0x83, 0x10, 0xDC, 0x40, 0x9B, 0x26, 0xD6}, - []byte{0x1D, 0x9D, 0x5C, 0x50, 0x18, 0xF7, 0x28, 0xC2}, - []byte{0xD1, 0xAB, 0xB2, 0x90, 0x65, 0x8B, 0xC7, 0x78}}, - { - []byte{0x1C, 0x58, 0x7F, 0x1C, 0x13, 0x92, 0x4F, 0xEF}, - []byte{0x30, 0x55, 0x32, 0x28, 0x6D, 0x6F, 0x29, 0x5A}, - []byte{0x55, 0xCB, 0x37, 0x74, 0xD1, 0x3E, 0xF2, 0x01}}, - { - []byte{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0xFA, 0x34, 0xEC, 0x48, 0x47, 0xB2, 0x68, 0xB2}}, - { - []byte{0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E}, - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0xA7, 0x90, 0x79, 0x51, 0x08, 0xEA, 0x3C, 0xAE}}, - { - []byte{0xE0, 0xFE, 0xE0, 0xFE, 0xF1, 0xFE, 0xF1, 0xFE}, - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0xC3, 0x9E, 0x07, 0x2D, 0x9F, 0xAC, 0x63, 0x1D}}, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - []byte{0x01, 0x49, 0x33, 0xE0, 0xCD, 0xAF, 0xF6, 0xE4}}, - { - []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0xF2, 0x1E, 0x9A, 0x77, 0xB7, 0x1C, 0x49, 0xBC}}, - { - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x24, 0x59, 0x46, 0x88, 0x57, 0x54, 0x36, 0x9A}}, - { - []byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10}, - []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - []byte{0x6B, 0x5C, 0x5A, 0x9C, 0x5D, 0x9E, 0x0A, 0x5A}}, -} - -func TestCipherEncrypt(t *testing.T) { - for i, tt := range encryptTests { - c, err := NewCipher(tt.key) - if err != nil { - t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err) - continue - } - ct := make([]byte, len(tt.out)) - c.Encrypt(ct, tt.in) - for j, v := range ct { - if v != tt.out[j] { - t.Errorf("Cipher.Encrypt, test vector #%d: cipher-text[%d] = %#x, expected %#x", i, j, v, tt.out[j]) - break - } - } - } -} - -func TestCipherDecrypt(t *testing.T) { - for i, tt := range encryptTests { - c, err := NewCipher(tt.key) - if err != nil { - t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err) - continue - } - pt := make([]byte, len(tt.in)) - c.Decrypt(pt, tt.out) - for j, v := range pt { - if v != tt.in[j] { - t.Errorf("Cipher.Decrypt, test vector #%d: plain-text[%d] = %#x, expected %#x", i, j, v, tt.in[j]) - break - } - } - } -} - -func TestSaltedCipherKeyLength(t *testing.T) { - if _, err := NewSaltedCipher(nil, []byte{'a'}); err != KeySizeError(0) { - t.Errorf("NewSaltedCipher with short key, gave error %#v, expected %#v", err, KeySizeError(0)) - } - - // A 57-byte key. One over the typical blowfish restriction. - key := []byte("012345678901234567890123456789012345678901234567890123456") - if _, err := NewSaltedCipher(key, []byte{'a'}); err != nil { - t.Errorf("NewSaltedCipher with long key, gave error %#v", err) - } -} - -// Test vectors generated with Blowfish from OpenSSH. -var saltedVectors = [][8]byte{ - {0x0c, 0x82, 0x3b, 0x7b, 0x8d, 0x01, 0x4b, 0x7e}, - {0xd1, 0xe1, 0x93, 0xf0, 0x70, 0xa6, 0xdb, 0x12}, - {0xfc, 0x5e, 0xba, 0xde, 0xcb, 0xf8, 0x59, 0xad}, - {0x8a, 0x0c, 0x76, 0xe7, 0xdd, 0x2c, 0xd3, 0xa8}, - {0x2c, 0xcb, 0x7b, 0xee, 0xac, 0x7b, 0x7f, 0xf8}, - {0xbb, 0xf6, 0x30, 0x6f, 0xe1, 0x5d, 0x62, 0xbf}, - {0x97, 0x1e, 0xc1, 0x3d, 0x3d, 0xe0, 0x11, 0xe9}, - {0x06, 0xd7, 0x4d, 0xb1, 0x80, 0xa3, 0xb1, 0x38}, - {0x67, 0xa1, 0xa9, 0x75, 0x0e, 0x5b, 0xc6, 0xb4}, - {0x51, 0x0f, 0x33, 0x0e, 0x4f, 0x67, 0xd2, 0x0c}, - {0xf1, 0x73, 0x7e, 0xd8, 0x44, 0xea, 0xdb, 0xe5}, - {0x14, 0x0e, 0x16, 0xce, 0x7f, 0x4a, 0x9c, 0x7b}, - {0x4b, 0xfe, 0x43, 0xfd, 0xbf, 0x36, 0x04, 0x47}, - {0xb1, 0xeb, 0x3e, 0x15, 0x36, 0xa7, 0xbb, 0xe2}, - {0x6d, 0x0b, 0x41, 0xdd, 0x00, 0x98, 0x0b, 0x19}, - {0xd3, 0xce, 0x45, 0xce, 0x1d, 0x56, 0xb7, 0xfc}, - {0xd9, 0xf0, 0xfd, 0xda, 0xc0, 0x23, 0xb7, 0x93}, - {0x4c, 0x6f, 0xa1, 0xe4, 0x0c, 0xa8, 0xca, 0x57}, - {0xe6, 0x2f, 0x28, 0xa7, 0x0c, 0x94, 0x0d, 0x08}, - {0x8f, 0xe3, 0xf0, 0xb6, 0x29, 0xe3, 0x44, 0x03}, - {0xff, 0x98, 0xdd, 0x04, 0x45, 0xb4, 0x6d, 0x1f}, - {0x9e, 0x45, 0x4d, 0x18, 0x40, 0x53, 0xdb, 0xef}, - {0xb7, 0x3b, 0xef, 0x29, 0xbe, 0xa8, 0x13, 0x71}, - {0x02, 0x54, 0x55, 0x41, 0x8e, 0x04, 0xfc, 0xad}, - {0x6a, 0x0a, 0xee, 0x7c, 0x10, 0xd9, 0x19, 0xfe}, - {0x0a, 0x22, 0xd9, 0x41, 0xcc, 0x23, 0x87, 0x13}, - {0x6e, 0xff, 0x1f, 0xff, 0x36, 0x17, 0x9c, 0xbe}, - {0x79, 0xad, 0xb7, 0x40, 0xf4, 0x9f, 0x51, 0xa6}, - {0x97, 0x81, 0x99, 0xa4, 0xde, 0x9e, 0x9f, 0xb6}, - {0x12, 0x19, 0x7a, 0x28, 0xd0, 0xdc, 0xcc, 0x92}, - {0x81, 0xda, 0x60, 0x1e, 0x0e, 0xdd, 0x65, 0x56}, - {0x7d, 0x76, 0x20, 0xb2, 0x73, 0xc9, 0x9e, 0xee}, -} - -func TestSaltedCipher(t *testing.T) { - var key, salt [32]byte - for i := range key { - key[i] = byte(i) - salt[i] = byte(i + 32) - } - for i, v := range saltedVectors { - c, err := NewSaltedCipher(key[:], salt[:i]) - if err != nil { - t.Fatal(err) - } - var buf [8]byte - c.Encrypt(buf[:], buf[:]) - if v != buf { - t.Errorf("%d: expected %x, got %x", i, v, buf) - } - } -} - -func BenchmarkExpandKeyWithSalt(b *testing.B) { - key := make([]byte, 32) - salt := make([]byte, 16) - c, _ := NewCipher(key) - for i := 0; i < b.N; i++ { - expandKeyWithSalt(key, salt, c) - } -} - -func BenchmarkExpandKey(b *testing.B) { - key := make([]byte, 32) - c, _ := NewCipher(key) - for i := 0; i < b.N; i++ { - ExpandKey(key, c) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256.go deleted file mode 100644 index 0aa253f7b1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256.go +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright 2012 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 bn256 implements a particular bilinear group. -// -// Bilinear groups are the basis of many of the new cryptographic protocols -// that have been proposed over the past decade. They consist of a triplet of -// groups (G₁, G₂ and GT) such that there exists a function e(g₁ˣ,g₂ʸ)=gTˣʸ -// (where gₓ is a generator of the respective group). That function is called -// a pairing function. -// -// This package specifically implements the Optimal Ate pairing over a 256-bit -// Barreto-Naehrig curve as described in -// http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible -// with the implementation described in that paper. -// -// (This package previously claimed to operate at a 128-bit security level. -// However, recent improvements in attacks mean that is no longer true. See -// https://moderncrypto.org/mail-archive/curves/2016/000740.html.) -package bn256 - -import ( - "crypto/rand" - "io" - "math/big" -) - -// BUG(agl): this implementation is not constant time. -// TODO(agl): keep GF(p²) elements in Mongomery form. - -// G1 is an abstract cyclic group. The zero value is suitable for use as the -// output of an operation, but cannot be used as an input. -type G1 struct { - p *curvePoint -} - -// RandomG1 returns x and g₁ˣ where x is a random, non-zero number read from r. -func RandomG1(r io.Reader) (*big.Int, *G1, error) { - var k *big.Int - var err error - - for { - k, err = rand.Int(r, Order) - if err != nil { - return nil, nil, err - } - if k.Sign() > 0 { - break - } - } - - return k, new(G1).ScalarBaseMult(k), nil -} - -func (e *G1) String() string { - return "bn256.G1" + e.p.String() -} - -// ScalarBaseMult sets e to g*k where g is the generator of the group and -// then returns e. -func (e *G1) ScalarBaseMult(k *big.Int) *G1 { - if e.p == nil { - e.p = newCurvePoint(nil) - } - e.p.Mul(curveGen, k, new(bnPool)) - return e -} - -// ScalarMult sets e to a*k and then returns e. -func (e *G1) ScalarMult(a *G1, k *big.Int) *G1 { - if e.p == nil { - e.p = newCurvePoint(nil) - } - e.p.Mul(a.p, k, new(bnPool)) - return e -} - -// Add sets e to a+b and then returns e. -// BUG(agl): this function is not complete: a==b fails. -func (e *G1) Add(a, b *G1) *G1 { - if e.p == nil { - e.p = newCurvePoint(nil) - } - e.p.Add(a.p, b.p, new(bnPool)) - return e -} - -// Neg sets e to -a and then returns e. -func (e *G1) Neg(a *G1) *G1 { - if e.p == nil { - e.p = newCurvePoint(nil) - } - e.p.Negative(a.p) - return e -} - -// Marshal converts n to a byte slice. -func (e *G1) Marshal() []byte { - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - if e.p.IsInfinity() { - return make([]byte, numBytes*2) - } - - e.p.MakeAffine(nil) - - xBytes := new(big.Int).Mod(e.p.x, p).Bytes() - yBytes := new(big.Int).Mod(e.p.y, p).Bytes() - - - ret := make([]byte, numBytes*2) - copy(ret[1*numBytes-len(xBytes):], xBytes) - copy(ret[2*numBytes-len(yBytes):], yBytes) - - return ret -} - -// Unmarshal sets e to the result of converting the output of Marshal back into -// a group element and then returns e. -func (e *G1) Unmarshal(m []byte) (*G1, bool) { - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - if len(m) != 2*numBytes { - return nil, false - } - - if e.p == nil { - e.p = newCurvePoint(nil) - } - - e.p.x.SetBytes(m[0*numBytes : 1*numBytes]) - e.p.y.SetBytes(m[1*numBytes : 2*numBytes]) - - if e.p.x.Sign() == 0 && e.p.y.Sign() == 0 { - // This is the point at infinity. - e.p.y.SetInt64(1) - e.p.z.SetInt64(0) - e.p.t.SetInt64(0) - } else { - e.p.z.SetInt64(1) - e.p.t.SetInt64(1) - - if !e.p.IsOnCurve() { - return nil, false - } - } - - return e, true -} - -// G2 is an abstract cyclic group. The zero value is suitable for use as the -// output of an operation, but cannot be used as an input. -type G2 struct { - p *twistPoint -} - -// RandomG1 returns x and g₂ˣ where x is a random, non-zero number read from r. -func RandomG2(r io.Reader) (*big.Int, *G2, error) { - var k *big.Int - var err error - - for { - k, err = rand.Int(r, Order) - if err != nil { - return nil, nil, err - } - if k.Sign() > 0 { - break - } - } - - return k, new(G2).ScalarBaseMult(k), nil -} - -func (e *G2) String() string { - return "bn256.G2" + e.p.String() -} - -// ScalarBaseMult sets e to g*k where g is the generator of the group and -// then returns out. -func (e *G2) ScalarBaseMult(k *big.Int) *G2 { - if e.p == nil { - e.p = newTwistPoint(nil) - } - e.p.Mul(twistGen, k, new(bnPool)) - return e -} - -// ScalarMult sets e to a*k and then returns e. -func (e *G2) ScalarMult(a *G2, k *big.Int) *G2 { - if e.p == nil { - e.p = newTwistPoint(nil) - } - e.p.Mul(a.p, k, new(bnPool)) - return e -} - -// Add sets e to a+b and then returns e. -// BUG(agl): this function is not complete: a==b fails. -func (e *G2) Add(a, b *G2) *G2 { - if e.p == nil { - e.p = newTwistPoint(nil) - } - e.p.Add(a.p, b.p, new(bnPool)) - return e -} - -// Marshal converts n into a byte slice. -func (n *G2) Marshal() []byte { - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - if n.p.IsInfinity() { - return make([]byte, numBytes*4) - } - - n.p.MakeAffine(nil) - - xxBytes := new(big.Int).Mod(n.p.x.x, p).Bytes() - xyBytes := new(big.Int).Mod(n.p.x.y, p).Bytes() - yxBytes := new(big.Int).Mod(n.p.y.x, p).Bytes() - yyBytes := new(big.Int).Mod(n.p.y.y, p).Bytes() - - - ret := make([]byte, numBytes*4) - copy(ret[1*numBytes-len(xxBytes):], xxBytes) - copy(ret[2*numBytes-len(xyBytes):], xyBytes) - copy(ret[3*numBytes-len(yxBytes):], yxBytes) - copy(ret[4*numBytes-len(yyBytes):], yyBytes) - - return ret -} - -// Unmarshal sets e to the result of converting the output of Marshal back into -// a group element and then returns e. -func (e *G2) Unmarshal(m []byte) (*G2, bool) { - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - if len(m) != 4*numBytes { - return nil, false - } - - if e.p == nil { - e.p = newTwistPoint(nil) - } - - e.p.x.x.SetBytes(m[0*numBytes : 1*numBytes]) - e.p.x.y.SetBytes(m[1*numBytes : 2*numBytes]) - e.p.y.x.SetBytes(m[2*numBytes : 3*numBytes]) - e.p.y.y.SetBytes(m[3*numBytes : 4*numBytes]) - - if e.p.x.x.Sign() == 0 && - e.p.x.y.Sign() == 0 && - e.p.y.x.Sign() == 0 && - e.p.y.y.Sign() == 0 { - // This is the point at infinity. - e.p.y.SetOne() - e.p.z.SetZero() - e.p.t.SetZero() - } else { - e.p.z.SetOne() - e.p.t.SetOne() - - if !e.p.IsOnCurve() { - return nil, false - } - } - - return e, true -} - -// GT is an abstract cyclic group. The zero value is suitable for use as the -// output of an operation, but cannot be used as an input. -type GT struct { - p *gfP12 -} - -func (g *GT) String() string { - return "bn256.GT" + g.p.String() -} - -// ScalarMult sets e to a*k and then returns e. -func (e *GT) ScalarMult(a *GT, k *big.Int) *GT { - if e.p == nil { - e.p = newGFp12(nil) - } - e.p.Exp(a.p, k, new(bnPool)) - return e -} - -// Add sets e to a+b and then returns e. -func (e *GT) Add(a, b *GT) *GT { - if e.p == nil { - e.p = newGFp12(nil) - } - e.p.Mul(a.p, b.p, new(bnPool)) - return e -} - -// Neg sets e to -a and then returns e. -func (e *GT) Neg(a *GT) *GT { - if e.p == nil { - e.p = newGFp12(nil) - } - e.p.Invert(a.p, new(bnPool)) - return e -} - -// Marshal converts n into a byte slice. -func (n *GT) Marshal() []byte { - n.p.Minimal() - - xxxBytes := n.p.x.x.x.Bytes() - xxyBytes := n.p.x.x.y.Bytes() - xyxBytes := n.p.x.y.x.Bytes() - xyyBytes := n.p.x.y.y.Bytes() - xzxBytes := n.p.x.z.x.Bytes() - xzyBytes := n.p.x.z.y.Bytes() - yxxBytes := n.p.y.x.x.Bytes() - yxyBytes := n.p.y.x.y.Bytes() - yyxBytes := n.p.y.y.x.Bytes() - yyyBytes := n.p.y.y.y.Bytes() - yzxBytes := n.p.y.z.x.Bytes() - yzyBytes := n.p.y.z.y.Bytes() - - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - ret := make([]byte, numBytes*12) - copy(ret[1*numBytes-len(xxxBytes):], xxxBytes) - copy(ret[2*numBytes-len(xxyBytes):], xxyBytes) - copy(ret[3*numBytes-len(xyxBytes):], xyxBytes) - copy(ret[4*numBytes-len(xyyBytes):], xyyBytes) - copy(ret[5*numBytes-len(xzxBytes):], xzxBytes) - copy(ret[6*numBytes-len(xzyBytes):], xzyBytes) - copy(ret[7*numBytes-len(yxxBytes):], yxxBytes) - copy(ret[8*numBytes-len(yxyBytes):], yxyBytes) - copy(ret[9*numBytes-len(yyxBytes):], yyxBytes) - copy(ret[10*numBytes-len(yyyBytes):], yyyBytes) - copy(ret[11*numBytes-len(yzxBytes):], yzxBytes) - copy(ret[12*numBytes-len(yzyBytes):], yzyBytes) - - return ret -} - -// Unmarshal sets e to the result of converting the output of Marshal back into -// a group element and then returns e. -func (e *GT) Unmarshal(m []byte) (*GT, bool) { - // Each value is a 256-bit number. - const numBytes = 256 / 8 - - if len(m) != 12*numBytes { - return nil, false - } - - if e.p == nil { - e.p = newGFp12(nil) - } - - e.p.x.x.x.SetBytes(m[0*numBytes : 1*numBytes]) - e.p.x.x.y.SetBytes(m[1*numBytes : 2*numBytes]) - e.p.x.y.x.SetBytes(m[2*numBytes : 3*numBytes]) - e.p.x.y.y.SetBytes(m[3*numBytes : 4*numBytes]) - e.p.x.z.x.SetBytes(m[4*numBytes : 5*numBytes]) - e.p.x.z.y.SetBytes(m[5*numBytes : 6*numBytes]) - e.p.y.x.x.SetBytes(m[6*numBytes : 7*numBytes]) - e.p.y.x.y.SetBytes(m[7*numBytes : 8*numBytes]) - e.p.y.y.x.SetBytes(m[8*numBytes : 9*numBytes]) - e.p.y.y.y.SetBytes(m[9*numBytes : 10*numBytes]) - e.p.y.z.x.SetBytes(m[10*numBytes : 11*numBytes]) - e.p.y.z.y.SetBytes(m[11*numBytes : 12*numBytes]) - - return e, true -} - -// Pair calculates an Optimal Ate pairing. -func Pair(g1 *G1, g2 *G2) *GT { - return >{optimalAte(g2.p, g1.p, new(bnPool))} -} - -// bnPool implements a tiny cache of *big.Int objects that's used to reduce the -// number of allocations made during processing. -type bnPool struct { - bns []*big.Int - count int -} - -func (pool *bnPool) Get() *big.Int { - if pool == nil { - return new(big.Int) - } - - pool.count++ - l := len(pool.bns) - if l == 0 { - return new(big.Int) - } - - bn := pool.bns[l-1] - pool.bns = pool.bns[:l-1] - return bn -} - -func (pool *bnPool) Put(bn *big.Int) { - if pool == nil { - return - } - pool.bns = append(pool.bns, bn) - pool.count-- -} - -func (pool *bnPool) Count() int { - return pool.count -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256_test.go deleted file mode 100644 index 1cec3884ec..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/bn256_test.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2012 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 bn256 - -import ( - "bytes" - "crypto/rand" - "math/big" - "testing" -) - -func TestGFp2Invert(t *testing.T) { - pool := new(bnPool) - - a := newGFp2(pool) - a.x.SetString("23423492374", 10) - a.y.SetString("12934872398472394827398470", 10) - - inv := newGFp2(pool) - inv.Invert(a, pool) - - b := newGFp2(pool).Mul(inv, a, pool) - if b.x.Int64() != 0 || b.y.Int64() != 1 { - t.Fatalf("bad result for a^-1*a: %s %s", b.x, b.y) - } - - a.Put(pool) - b.Put(pool) - inv.Put(pool) - - if c := pool.Count(); c > 0 { - t.Errorf("Pool count non-zero: %d\n", c) - } -} - -func isZero(n *big.Int) bool { - return new(big.Int).Mod(n, p).Int64() == 0 -} - -func isOne(n *big.Int) bool { - return new(big.Int).Mod(n, p).Int64() == 1 -} - -func TestGFp6Invert(t *testing.T) { - pool := new(bnPool) - - a := newGFp6(pool) - a.x.x.SetString("239487238491", 10) - a.x.y.SetString("2356249827341", 10) - a.y.x.SetString("082659782", 10) - a.y.y.SetString("182703523765", 10) - a.z.x.SetString("978236549263", 10) - a.z.y.SetString("64893242", 10) - - inv := newGFp6(pool) - inv.Invert(a, pool) - - b := newGFp6(pool).Mul(inv, a, pool) - if !isZero(b.x.x) || - !isZero(b.x.y) || - !isZero(b.y.x) || - !isZero(b.y.y) || - !isZero(b.z.x) || - !isOne(b.z.y) { - t.Fatalf("bad result for a^-1*a: %s", b) - } - - a.Put(pool) - b.Put(pool) - inv.Put(pool) - - if c := pool.Count(); c > 0 { - t.Errorf("Pool count non-zero: %d\n", c) - } -} - -func TestGFp12Invert(t *testing.T) { - pool := new(bnPool) - - a := newGFp12(pool) - a.x.x.x.SetString("239846234862342323958623", 10) - a.x.x.y.SetString("2359862352529835623", 10) - a.x.y.x.SetString("928836523", 10) - a.x.y.y.SetString("9856234", 10) - a.x.z.x.SetString("235635286", 10) - a.x.z.y.SetString("5628392833", 10) - a.y.x.x.SetString("252936598265329856238956532167968", 10) - a.y.x.y.SetString("23596239865236954178968", 10) - a.y.y.x.SetString("95421692834", 10) - a.y.y.y.SetString("236548", 10) - a.y.z.x.SetString("924523", 10) - a.y.z.y.SetString("12954623", 10) - - inv := newGFp12(pool) - inv.Invert(a, pool) - - b := newGFp12(pool).Mul(inv, a, pool) - if !isZero(b.x.x.x) || - !isZero(b.x.x.y) || - !isZero(b.x.y.x) || - !isZero(b.x.y.y) || - !isZero(b.x.z.x) || - !isZero(b.x.z.y) || - !isZero(b.y.x.x) || - !isZero(b.y.x.y) || - !isZero(b.y.y.x) || - !isZero(b.y.y.y) || - !isZero(b.y.z.x) || - !isOne(b.y.z.y) { - t.Fatalf("bad result for a^-1*a: %s", b) - } - - a.Put(pool) - b.Put(pool) - inv.Put(pool) - - if c := pool.Count(); c > 0 { - t.Errorf("Pool count non-zero: %d\n", c) - } -} - -func TestCurveImpl(t *testing.T) { - pool := new(bnPool) - - g := &curvePoint{ - pool.Get().SetInt64(1), - pool.Get().SetInt64(-2), - pool.Get().SetInt64(1), - pool.Get().SetInt64(0), - } - - x := pool.Get().SetInt64(32498273234) - X := newCurvePoint(pool).Mul(g, x, pool) - - y := pool.Get().SetInt64(98732423523) - Y := newCurvePoint(pool).Mul(g, y, pool) - - s1 := newCurvePoint(pool).Mul(X, y, pool).MakeAffine(pool) - s2 := newCurvePoint(pool).Mul(Y, x, pool).MakeAffine(pool) - - if s1.x.Cmp(s2.x) != 0 || - s2.x.Cmp(s1.x) != 0 { - t.Errorf("DH points don't match: (%s, %s) (%s, %s)", s1.x, s1.y, s2.x, s2.y) - } - - pool.Put(x) - X.Put(pool) - pool.Put(y) - Y.Put(pool) - s1.Put(pool) - s2.Put(pool) - g.Put(pool) - - if c := pool.Count(); c > 0 { - t.Errorf("Pool count non-zero: %d\n", c) - } -} - -func TestOrderG1(t *testing.T) { - g := new(G1).ScalarBaseMult(Order) - if !g.p.IsInfinity() { - t.Error("G1 has incorrect order") - } - - one := new(G1).ScalarBaseMult(new(big.Int).SetInt64(1)) - g.Add(g, one) - g.p.MakeAffine(nil) - if g.p.x.Cmp(one.p.x) != 0 || g.p.y.Cmp(one.p.y) != 0 { - t.Errorf("1+0 != 1 in G1") - } -} - -func TestOrderG2(t *testing.T) { - g := new(G2).ScalarBaseMult(Order) - if !g.p.IsInfinity() { - t.Error("G2 has incorrect order") - } - - one := new(G2).ScalarBaseMult(new(big.Int).SetInt64(1)) - g.Add(g, one) - g.p.MakeAffine(nil) - if g.p.x.x.Cmp(one.p.x.x) != 0 || - g.p.x.y.Cmp(one.p.x.y) != 0 || - g.p.y.x.Cmp(one.p.y.x) != 0 || - g.p.y.y.Cmp(one.p.y.y) != 0 { - t.Errorf("1+0 != 1 in G2") - } -} - -func TestOrderGT(t *testing.T) { - gt := Pair(&G1{curveGen}, &G2{twistGen}) - g := new(GT).ScalarMult(gt, Order) - if !g.p.IsOne() { - t.Error("GT has incorrect order") - } -} - -func TestBilinearity(t *testing.T) { - for i := 0; i < 2; i++ { - a, p1, _ := RandomG1(rand.Reader) - b, p2, _ := RandomG2(rand.Reader) - e1 := Pair(p1, p2) - - e2 := Pair(&G1{curveGen}, &G2{twistGen}) - e2.ScalarMult(e2, a) - e2.ScalarMult(e2, b) - - minusE2 := new(GT).Neg(e2) - e1.Add(e1, minusE2) - - if !e1.p.IsOne() { - t.Fatalf("bad pairing result: %s", e1) - } - } -} - -func TestG1Marshal(t *testing.T) { - g := new(G1).ScalarBaseMult(new(big.Int).SetInt64(1)) - form := g.Marshal() - _, ok := new(G1).Unmarshal(form) - if !ok { - t.Fatalf("failed to unmarshal") - } - - g.ScalarBaseMult(Order) - form = g.Marshal() - g2, ok := new(G1).Unmarshal(form) - if !ok { - t.Fatalf("failed to unmarshal ∞") - } - if !g2.p.IsInfinity() { - t.Fatalf("∞ unmarshaled incorrectly") - } -} - -func TestG2Marshal(t *testing.T) { - g := new(G2).ScalarBaseMult(new(big.Int).SetInt64(1)) - form := g.Marshal() - _, ok := new(G2).Unmarshal(form) - if !ok { - t.Fatalf("failed to unmarshal") - } - - g.ScalarBaseMult(Order) - form = g.Marshal() - g2, ok := new(G2).Unmarshal(form) - if !ok { - t.Fatalf("failed to unmarshal ∞") - } - if !g2.p.IsInfinity() { - t.Fatalf("∞ unmarshaled incorrectly") - } -} - -func TestG1Identity(t *testing.T) { - g := new(G1).ScalarBaseMult(new(big.Int).SetInt64(0)) - if !g.p.IsInfinity() { - t.Error("failure") - } -} - -func TestG2Identity(t *testing.T) { - g := new(G2).ScalarBaseMult(new(big.Int).SetInt64(0)) - if !g.p.IsInfinity() { - t.Error("failure") - } -} - -func TestTripartiteDiffieHellman(t *testing.T) { - a, _ := rand.Int(rand.Reader, Order) - b, _ := rand.Int(rand.Reader, Order) - c, _ := rand.Int(rand.Reader, Order) - - pa, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(a).Marshal()) - qa, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(a).Marshal()) - pb, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(b).Marshal()) - qb, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(b).Marshal()) - pc, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(c).Marshal()) - qc, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(c).Marshal()) - - k1 := Pair(pb, qc) - k1.ScalarMult(k1, a) - k1Bytes := k1.Marshal() - - k2 := Pair(pc, qa) - k2.ScalarMult(k2, b) - k2Bytes := k2.Marshal() - - k3 := Pair(pa, qb) - k3.ScalarMult(k3, c) - k3Bytes := k3.Marshal() - - if !bytes.Equal(k1Bytes, k2Bytes) || !bytes.Equal(k2Bytes, k3Bytes) { - t.Errorf("keys didn't agree") - } -} - -func BenchmarkPairing(b *testing.B) { - for i := 0; i < b.N; i++ { - Pair(&G1{curveGen}, &G2{twistGen}) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/constants.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/constants.go deleted file mode 100644 index 1ccefc4982..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/constants.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2012 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 bn256 - -import ( - "math/big" -) - -func bigFromBase10(s string) *big.Int { - n, _ := new(big.Int).SetString(s, 10) - return n -} - -// u is the BN parameter that determines the prime: 1868033³. -var u = bigFromBase10("6518589491078791937") - -// p is a prime over which we form a basic field: 36u⁴+36u³+24u²+6u+1. -var p = bigFromBase10("65000549695646603732796438742359905742825358107623003571877145026864184071783") - -// Order is the number of elements in both G₁ and G₂: 36u⁴+36u³+18u²+6u+1. -var Order = bigFromBase10("65000549695646603732796438742359905742570406053903786389881062969044166799969") - -// xiToPMinus1Over6 is ξ^((p-1)/6) where ξ = i+3. -var xiToPMinus1Over6 = &gfP2{bigFromBase10("8669379979083712429711189836753509758585994370025260553045152614783263110636"), bigFromBase10("19998038925833620163537568958541907098007303196759855091367510456613536016040")} - -// xiToPMinus1Over3 is ξ^((p-1)/3) where ξ = i+3. -var xiToPMinus1Over3 = &gfP2{bigFromBase10("26098034838977895781559542626833399156321265654106457577426020397262786167059"), bigFromBase10("15931493369629630809226283458085260090334794394361662678240713231519278691715")} - -// xiToPMinus1Over2 is ξ^((p-1)/2) where ξ = i+3. -var xiToPMinus1Over2 = &gfP2{bigFromBase10("50997318142241922852281555961173165965672272825141804376761836765206060036244"), bigFromBase10("38665955945962842195025998234511023902832543644254935982879660597356748036009")} - -// xiToPSquaredMinus1Over3 is ξ^((p²-1)/3) where ξ = i+3. -var xiToPSquaredMinus1Over3 = bigFromBase10("65000549695646603727810655408050771481677621702948236658134783353303381437752") - -// xiTo2PSquaredMinus2Over3 is ξ^((2p²-2)/3) where ξ = i+3 (a cubic root of unity, mod p). -var xiTo2PSquaredMinus2Over3 = bigFromBase10("4985783334309134261147736404674766913742361673560802634030") - -// xiToPSquaredMinus1Over6 is ξ^((1p²-1)/6) where ξ = i+3 (a cubic root of -1, mod p). -var xiToPSquaredMinus1Over6 = bigFromBase10("65000549695646603727810655408050771481677621702948236658134783353303381437753") - -// xiTo2PMinus2Over3 is ξ^((2p-2)/3) where ξ = i+3. -var xiTo2PMinus2Over3 = &gfP2{bigFromBase10("19885131339612776214803633203834694332692106372356013117629940868870585019582"), bigFromBase10("21645619881471562101905880913352894726728173167203616652430647841922248593627")} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/curve.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/curve.go deleted file mode 100644 index 63c052bc22..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/curve.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2012 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 bn256 - -import ( - "math/big" -) - -// curvePoint implements the elliptic curve y²=x³+3. Points are kept in -// Jacobian form and t=z² when valid. G₁ is the set of points of this curve on -// GF(p). -type curvePoint struct { - x, y, z, t *big.Int -} - -var curveB = new(big.Int).SetInt64(3) - -// curveGen is the generator of G₁. -var curveGen = &curvePoint{ - new(big.Int).SetInt64(1), - new(big.Int).SetInt64(-2), - new(big.Int).SetInt64(1), - new(big.Int).SetInt64(1), -} - -func newCurvePoint(pool *bnPool) *curvePoint { - return &curvePoint{ - pool.Get(), - pool.Get(), - pool.Get(), - pool.Get(), - } -} - -func (c *curvePoint) String() string { - c.MakeAffine(new(bnPool)) - return "(" + c.x.String() + ", " + c.y.String() + ")" -} - -func (c *curvePoint) Put(pool *bnPool) { - pool.Put(c.x) - pool.Put(c.y) - pool.Put(c.z) - pool.Put(c.t) -} - -func (c *curvePoint) Set(a *curvePoint) { - c.x.Set(a.x) - c.y.Set(a.y) - c.z.Set(a.z) - c.t.Set(a.t) -} - -// IsOnCurve returns true iff c is on the curve where c must be in affine form. -func (c *curvePoint) IsOnCurve() bool { - yy := new(big.Int).Mul(c.y, c.y) - xxx := new(big.Int).Mul(c.x, c.x) - xxx.Mul(xxx, c.x) - yy.Sub(yy, xxx) - yy.Sub(yy, curveB) - if yy.Sign() < 0 || yy.Cmp(p) >= 0 { - yy.Mod(yy, p) - } - return yy.Sign() == 0 -} - -func (c *curvePoint) SetInfinity() { - c.z.SetInt64(0) -} - -func (c *curvePoint) IsInfinity() bool { - return c.z.Sign() == 0 -} - -func (c *curvePoint) Add(a, b *curvePoint, pool *bnPool) { - if a.IsInfinity() { - c.Set(b) - return - } - if b.IsInfinity() { - c.Set(a) - return - } - - // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/addition/add-2007-bl.op3 - - // Normalize the points by replacing a = [x1:y1:z1] and b = [x2:y2:z2] - // by [u1:s1:z1·z2] and [u2:s2:z1·z2] - // where u1 = x1·z2², s1 = y1·z2³ and u1 = x2·z1², s2 = y2·z1³ - z1z1 := pool.Get().Mul(a.z, a.z) - z1z1.Mod(z1z1, p) - z2z2 := pool.Get().Mul(b.z, b.z) - z2z2.Mod(z2z2, p) - u1 := pool.Get().Mul(a.x, z2z2) - u1.Mod(u1, p) - u2 := pool.Get().Mul(b.x, z1z1) - u2.Mod(u2, p) - - t := pool.Get().Mul(b.z, z2z2) - t.Mod(t, p) - s1 := pool.Get().Mul(a.y, t) - s1.Mod(s1, p) - - t.Mul(a.z, z1z1) - t.Mod(t, p) - s2 := pool.Get().Mul(b.y, t) - s2.Mod(s2, p) - - // Compute x = (2h)²(s²-u1-u2) - // where s = (s2-s1)/(u2-u1) is the slope of the line through - // (u1,s1) and (u2,s2). The extra factor 2h = 2(u2-u1) comes from the value of z below. - // This is also: - // 4(s2-s1)² - 4h²(u1+u2) = 4(s2-s1)² - 4h³ - 4h²(2u1) - // = r² - j - 2v - // with the notations below. - h := pool.Get().Sub(u2, u1) - xEqual := h.Sign() == 0 - - t.Add(h, h) - // i = 4h² - i := pool.Get().Mul(t, t) - i.Mod(i, p) - // j = 4h³ - j := pool.Get().Mul(h, i) - j.Mod(j, p) - - t.Sub(s2, s1) - yEqual := t.Sign() == 0 - if xEqual && yEqual { - c.Double(a, pool) - return - } - r := pool.Get().Add(t, t) - - v := pool.Get().Mul(u1, i) - v.Mod(v, p) - - // t4 = 4(s2-s1)² - t4 := pool.Get().Mul(r, r) - t4.Mod(t4, p) - t.Add(v, v) - t6 := pool.Get().Sub(t4, j) - c.x.Sub(t6, t) - - // Set y = -(2h)³(s1 + s*(x/4h²-u1)) - // This is also - // y = - 2·s1·j - (s2-s1)(2x - 2i·u1) = r(v-x) - 2·s1·j - t.Sub(v, c.x) // t7 - t4.Mul(s1, j) // t8 - t4.Mod(t4, p) - t6.Add(t4, t4) // t9 - t4.Mul(r, t) // t10 - t4.Mod(t4, p) - c.y.Sub(t4, t6) - - // Set z = 2(u2-u1)·z1·z2 = 2h·z1·z2 - t.Add(a.z, b.z) // t11 - t4.Mul(t, t) // t12 - t4.Mod(t4, p) - t.Sub(t4, z1z1) // t13 - t4.Sub(t, z2z2) // t14 - c.z.Mul(t4, h) - c.z.Mod(c.z, p) - - pool.Put(z1z1) - pool.Put(z2z2) - pool.Put(u1) - pool.Put(u2) - pool.Put(t) - pool.Put(s1) - pool.Put(s2) - pool.Put(h) - pool.Put(i) - pool.Put(j) - pool.Put(r) - pool.Put(v) - pool.Put(t4) - pool.Put(t6) -} - -func (c *curvePoint) Double(a *curvePoint, pool *bnPool) { - // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3 - A := pool.Get().Mul(a.x, a.x) - A.Mod(A, p) - B := pool.Get().Mul(a.y, a.y) - B.Mod(B, p) - C := pool.Get().Mul(B, B) - C.Mod(C, p) - - t := pool.Get().Add(a.x, B) - t2 := pool.Get().Mul(t, t) - t2.Mod(t2, p) - t.Sub(t2, A) - t2.Sub(t, C) - d := pool.Get().Add(t2, t2) - t.Add(A, A) - e := pool.Get().Add(t, A) - f := pool.Get().Mul(e, e) - f.Mod(f, p) - - t.Add(d, d) - c.x.Sub(f, t) - - t.Add(C, C) - t2.Add(t, t) - t.Add(t2, t2) - c.y.Sub(d, c.x) - t2.Mul(e, c.y) - t2.Mod(t2, p) - c.y.Sub(t2, t) - - t.Mul(a.y, a.z) - t.Mod(t, p) - c.z.Add(t, t) - - pool.Put(A) - pool.Put(B) - pool.Put(C) - pool.Put(t) - pool.Put(t2) - pool.Put(d) - pool.Put(e) - pool.Put(f) -} - -func (c *curvePoint) Mul(a *curvePoint, scalar *big.Int, pool *bnPool) *curvePoint { - sum := newCurvePoint(pool) - sum.SetInfinity() - t := newCurvePoint(pool) - - for i := scalar.BitLen(); i >= 0; i-- { - t.Double(sum, pool) - if scalar.Bit(i) != 0 { - sum.Add(t, a, pool) - } else { - sum.Set(t) - } - } - - c.Set(sum) - sum.Put(pool) - t.Put(pool) - return c -} - -// MakeAffine converts c to affine form and returns c. If c is ∞, then it sets -// c to 0 : 1 : 0. -func (c *curvePoint) MakeAffine(pool *bnPool) *curvePoint { - if words := c.z.Bits(); len(words) == 1 && words[0] == 1 { - return c - } - if c.IsInfinity() { - c.x.SetInt64(0) - c.y.SetInt64(1) - c.z.SetInt64(0) - c.t.SetInt64(0) - return c - } - - zInv := pool.Get().ModInverse(c.z, p) - t := pool.Get().Mul(c.y, zInv) - t.Mod(t, p) - zInv2 := pool.Get().Mul(zInv, zInv) - zInv2.Mod(zInv2, p) - c.y.Mul(t, zInv2) - c.y.Mod(c.y, p) - t.Mul(c.x, zInv2) - t.Mod(t, p) - c.x.Set(t) - c.z.SetInt64(1) - c.t.SetInt64(1) - - pool.Put(zInv) - pool.Put(t) - pool.Put(zInv2) - - return c -} - -func (c *curvePoint) Negative(a *curvePoint) { - c.x.Set(a.x) - c.y.Neg(a.y) - c.z.Set(a.z) - c.t.SetInt64(0) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/example_test.go deleted file mode 100644 index b2d19807a2..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/example_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2012 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 bn256 - -import ( - "crypto/rand" -) - -func ExamplePair() { - // This implements the tripartite Diffie-Hellman algorithm from "A One - // Round Protocol for Tripartite Diffie-Hellman", A. Joux. - // http://www.springerlink.com/content/cddc57yyva0hburb/fulltext.pdf - - // Each of three parties, a, b and c, generate a private value. - a, _ := rand.Int(rand.Reader, Order) - b, _ := rand.Int(rand.Reader, Order) - c, _ := rand.Int(rand.Reader, Order) - - // Then each party calculates g₁ and g₂ times their private value. - pa := new(G1).ScalarBaseMult(a) - qa := new(G2).ScalarBaseMult(a) - - pb := new(G1).ScalarBaseMult(b) - qb := new(G2).ScalarBaseMult(b) - - pc := new(G1).ScalarBaseMult(c) - qc := new(G2).ScalarBaseMult(c) - - // Now each party exchanges its public values with the other two and - // all parties can calculate the shared key. - k1 := Pair(pb, qc) - k1.ScalarMult(k1, a) - - k2 := Pair(pc, qa) - k2.ScalarMult(k2, b) - - k3 := Pair(pa, qb) - k3.ScalarMult(k3, c) - - // k1, k2 and k3 will all be equal. -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp12.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp12.go deleted file mode 100644 index f084eddf21..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp12.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2012 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 bn256 - -// For details of the algorithms used, see "Multiplication and Squaring on -// Pairing-Friendly Fields, Devegili et al. -// http://eprint.iacr.org/2006/471.pdf. - -import ( - "math/big" -) - -// gfP12 implements the field of size p¹² as a quadratic extension of gfP6 -// where ω²=τ. -type gfP12 struct { - x, y *gfP6 // value is xω + y -} - -func newGFp12(pool *bnPool) *gfP12 { - return &gfP12{newGFp6(pool), newGFp6(pool)} -} - -func (e *gfP12) String() string { - return "(" + e.x.String() + "," + e.y.String() + ")" -} - -func (e *gfP12) Put(pool *bnPool) { - e.x.Put(pool) - e.y.Put(pool) -} - -func (e *gfP12) Set(a *gfP12) *gfP12 { - e.x.Set(a.x) - e.y.Set(a.y) - return e -} - -func (e *gfP12) SetZero() *gfP12 { - e.x.SetZero() - e.y.SetZero() - return e -} - -func (e *gfP12) SetOne() *gfP12 { - e.x.SetZero() - e.y.SetOne() - return e -} - -func (e *gfP12) Minimal() { - e.x.Minimal() - e.y.Minimal() -} - -func (e *gfP12) IsZero() bool { - e.Minimal() - return e.x.IsZero() && e.y.IsZero() -} - -func (e *gfP12) IsOne() bool { - e.Minimal() - return e.x.IsZero() && e.y.IsOne() -} - -func (e *gfP12) Conjugate(a *gfP12) *gfP12 { - e.x.Negative(a.x) - e.y.Set(a.y) - return a -} - -func (e *gfP12) Negative(a *gfP12) *gfP12 { - e.x.Negative(a.x) - e.y.Negative(a.y) - return e -} - -// Frobenius computes (xω+y)^p = x^p ω·ξ^((p-1)/6) + y^p -func (e *gfP12) Frobenius(a *gfP12, pool *bnPool) *gfP12 { - e.x.Frobenius(a.x, pool) - e.y.Frobenius(a.y, pool) - e.x.MulScalar(e.x, xiToPMinus1Over6, pool) - return e -} - -// FrobeniusP2 computes (xω+y)^p² = x^p² ω·ξ^((p²-1)/6) + y^p² -func (e *gfP12) FrobeniusP2(a *gfP12, pool *bnPool) *gfP12 { - e.x.FrobeniusP2(a.x) - e.x.MulGFP(e.x, xiToPSquaredMinus1Over6) - e.y.FrobeniusP2(a.y) - return e -} - -func (e *gfP12) Add(a, b *gfP12) *gfP12 { - e.x.Add(a.x, b.x) - e.y.Add(a.y, b.y) - return e -} - -func (e *gfP12) Sub(a, b *gfP12) *gfP12 { - e.x.Sub(a.x, b.x) - e.y.Sub(a.y, b.y) - return e -} - -func (e *gfP12) Mul(a, b *gfP12, pool *bnPool) *gfP12 { - tx := newGFp6(pool) - tx.Mul(a.x, b.y, pool) - t := newGFp6(pool) - t.Mul(b.x, a.y, pool) - tx.Add(tx, t) - - ty := newGFp6(pool) - ty.Mul(a.y, b.y, pool) - t.Mul(a.x, b.x, pool) - t.MulTau(t, pool) - e.y.Add(ty, t) - e.x.Set(tx) - - tx.Put(pool) - ty.Put(pool) - t.Put(pool) - return e -} - -func (e *gfP12) MulScalar(a *gfP12, b *gfP6, pool *bnPool) *gfP12 { - e.x.Mul(e.x, b, pool) - e.y.Mul(e.y, b, pool) - return e -} - -func (c *gfP12) Exp(a *gfP12, power *big.Int, pool *bnPool) *gfP12 { - sum := newGFp12(pool) - sum.SetOne() - t := newGFp12(pool) - - for i := power.BitLen() - 1; i >= 0; i-- { - t.Square(sum, pool) - if power.Bit(i) != 0 { - sum.Mul(t, a, pool) - } else { - sum.Set(t) - } - } - - c.Set(sum) - - sum.Put(pool) - t.Put(pool) - - return c -} - -func (e *gfP12) Square(a *gfP12, pool *bnPool) *gfP12 { - // Complex squaring algorithm - v0 := newGFp6(pool) - v0.Mul(a.x, a.y, pool) - - t := newGFp6(pool) - t.MulTau(a.x, pool) - t.Add(a.y, t) - ty := newGFp6(pool) - ty.Add(a.x, a.y) - ty.Mul(ty, t, pool) - ty.Sub(ty, v0) - t.MulTau(v0, pool) - ty.Sub(ty, t) - - e.y.Set(ty) - e.x.Double(v0) - - v0.Put(pool) - t.Put(pool) - ty.Put(pool) - - return e -} - -func (e *gfP12) Invert(a *gfP12, pool *bnPool) *gfP12 { - // See "Implementing cryptographic pairings", M. Scott, section 3.2. - // ftp://136.206.11.249/pub/crypto/pairings.pdf - t1 := newGFp6(pool) - t2 := newGFp6(pool) - - t1.Square(a.x, pool) - t2.Square(a.y, pool) - t1.MulTau(t1, pool) - t1.Sub(t2, t1) - t2.Invert(t1, pool) - - e.x.Negative(a.x) - e.y.Set(a.y) - e.MulScalar(e, t2, pool) - - t1.Put(pool) - t2.Put(pool) - - return e -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp2.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp2.go deleted file mode 100644 index 97f3f1f3fa..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp2.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2012 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 bn256 - -// For details of the algorithms used, see "Multiplication and Squaring on -// Pairing-Friendly Fields, Devegili et al. -// http://eprint.iacr.org/2006/471.pdf. - -import ( - "math/big" -) - -// gfP2 implements a field of size p² as a quadratic extension of the base -// field where i²=-1. -type gfP2 struct { - x, y *big.Int // value is xi+y. -} - -func newGFp2(pool *bnPool) *gfP2 { - return &gfP2{pool.Get(), pool.Get()} -} - -func (e *gfP2) String() string { - x := new(big.Int).Mod(e.x, p) - y := new(big.Int).Mod(e.y, p) - return "(" + x.String() + "," + y.String() + ")" -} - -func (e *gfP2) Put(pool *bnPool) { - pool.Put(e.x) - pool.Put(e.y) -} - -func (e *gfP2) Set(a *gfP2) *gfP2 { - e.x.Set(a.x) - e.y.Set(a.y) - return e -} - -func (e *gfP2) SetZero() *gfP2 { - e.x.SetInt64(0) - e.y.SetInt64(0) - return e -} - -func (e *gfP2) SetOne() *gfP2 { - e.x.SetInt64(0) - e.y.SetInt64(1) - return e -} - -func (e *gfP2) Minimal() { - if e.x.Sign() < 0 || e.x.Cmp(p) >= 0 { - e.x.Mod(e.x, p) - } - if e.y.Sign() < 0 || e.y.Cmp(p) >= 0 { - e.y.Mod(e.y, p) - } -} - -func (e *gfP2) IsZero() bool { - return e.x.Sign() == 0 && e.y.Sign() == 0 -} - -func (e *gfP2) IsOne() bool { - if e.x.Sign() != 0 { - return false - } - words := e.y.Bits() - return len(words) == 1 && words[0] == 1 -} - -func (e *gfP2) Conjugate(a *gfP2) *gfP2 { - e.y.Set(a.y) - e.x.Neg(a.x) - return e -} - -func (e *gfP2) Negative(a *gfP2) *gfP2 { - e.x.Neg(a.x) - e.y.Neg(a.y) - return e -} - -func (e *gfP2) Add(a, b *gfP2) *gfP2 { - e.x.Add(a.x, b.x) - e.y.Add(a.y, b.y) - return e -} - -func (e *gfP2) Sub(a, b *gfP2) *gfP2 { - e.x.Sub(a.x, b.x) - e.y.Sub(a.y, b.y) - return e -} - -func (e *gfP2) Double(a *gfP2) *gfP2 { - e.x.Lsh(a.x, 1) - e.y.Lsh(a.y, 1) - return e -} - -func (c *gfP2) Exp(a *gfP2, power *big.Int, pool *bnPool) *gfP2 { - sum := newGFp2(pool) - sum.SetOne() - t := newGFp2(pool) - - for i := power.BitLen() - 1; i >= 0; i-- { - t.Square(sum, pool) - if power.Bit(i) != 0 { - sum.Mul(t, a, pool) - } else { - sum.Set(t) - } - } - - c.Set(sum) - - sum.Put(pool) - t.Put(pool) - - return c -} - -// See "Multiplication and Squaring in Pairing-Friendly Fields", -// http://eprint.iacr.org/2006/471.pdf -func (e *gfP2) Mul(a, b *gfP2, pool *bnPool) *gfP2 { - tx := pool.Get().Mul(a.x, b.y) - t := pool.Get().Mul(b.x, a.y) - tx.Add(tx, t) - tx.Mod(tx, p) - - ty := pool.Get().Mul(a.y, b.y) - t.Mul(a.x, b.x) - ty.Sub(ty, t) - e.y.Mod(ty, p) - e.x.Set(tx) - - pool.Put(tx) - pool.Put(ty) - pool.Put(t) - - return e -} - -func (e *gfP2) MulScalar(a *gfP2, b *big.Int) *gfP2 { - e.x.Mul(a.x, b) - e.y.Mul(a.y, b) - return e -} - -// MulXi sets e=ξa where ξ=i+3 and then returns e. -func (e *gfP2) MulXi(a *gfP2, pool *bnPool) *gfP2 { - // (xi+y)(i+3) = (3x+y)i+(3y-x) - tx := pool.Get().Lsh(a.x, 1) - tx.Add(tx, a.x) - tx.Add(tx, a.y) - - ty := pool.Get().Lsh(a.y, 1) - ty.Add(ty, a.y) - ty.Sub(ty, a.x) - - e.x.Set(tx) - e.y.Set(ty) - - pool.Put(tx) - pool.Put(ty) - - return e -} - -func (e *gfP2) Square(a *gfP2, pool *bnPool) *gfP2 { - // Complex squaring algorithm: - // (xi+b)² = (x+y)(y-x) + 2*i*x*y - t1 := pool.Get().Sub(a.y, a.x) - t2 := pool.Get().Add(a.x, a.y) - ty := pool.Get().Mul(t1, t2) - ty.Mod(ty, p) - - t1.Mul(a.x, a.y) - t1.Lsh(t1, 1) - - e.x.Mod(t1, p) - e.y.Set(ty) - - pool.Put(t1) - pool.Put(t2) - pool.Put(ty) - - return e -} - -func (e *gfP2) Invert(a *gfP2, pool *bnPool) *gfP2 { - // See "Implementing cryptographic pairings", M. Scott, section 3.2. - // ftp://136.206.11.249/pub/crypto/pairings.pdf - t := pool.Get() - t.Mul(a.y, a.y) - t2 := pool.Get() - t2.Mul(a.x, a.x) - t.Add(t, t2) - - inv := pool.Get() - inv.ModInverse(t, p) - - e.x.Neg(a.x) - e.x.Mul(e.x, inv) - e.x.Mod(e.x, p) - - e.y.Mul(a.y, inv) - e.y.Mod(e.y, p) - - pool.Put(t) - pool.Put(t2) - pool.Put(inv) - - return e -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp6.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp6.go deleted file mode 100644 index f98ae782cc..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/gfp6.go +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2012 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 bn256 - -// For details of the algorithms used, see "Multiplication and Squaring on -// Pairing-Friendly Fields, Devegili et al. -// http://eprint.iacr.org/2006/471.pdf. - -import ( - "math/big" -) - -// gfP6 implements the field of size p⁶ as a cubic extension of gfP2 where τ³=ξ -// and ξ=i+3. -type gfP6 struct { - x, y, z *gfP2 // value is xτ² + yτ + z -} - -func newGFp6(pool *bnPool) *gfP6 { - return &gfP6{newGFp2(pool), newGFp2(pool), newGFp2(pool)} -} - -func (e *gfP6) String() string { - return "(" + e.x.String() + "," + e.y.String() + "," + e.z.String() + ")" -} - -func (e *gfP6) Put(pool *bnPool) { - e.x.Put(pool) - e.y.Put(pool) - e.z.Put(pool) -} - -func (e *gfP6) Set(a *gfP6) *gfP6 { - e.x.Set(a.x) - e.y.Set(a.y) - e.z.Set(a.z) - return e -} - -func (e *gfP6) SetZero() *gfP6 { - e.x.SetZero() - e.y.SetZero() - e.z.SetZero() - return e -} - -func (e *gfP6) SetOne() *gfP6 { - e.x.SetZero() - e.y.SetZero() - e.z.SetOne() - return e -} - -func (e *gfP6) Minimal() { - e.x.Minimal() - e.y.Minimal() - e.z.Minimal() -} - -func (e *gfP6) IsZero() bool { - return e.x.IsZero() && e.y.IsZero() && e.z.IsZero() -} - -func (e *gfP6) IsOne() bool { - return e.x.IsZero() && e.y.IsZero() && e.z.IsOne() -} - -func (e *gfP6) Negative(a *gfP6) *gfP6 { - e.x.Negative(a.x) - e.y.Negative(a.y) - e.z.Negative(a.z) - return e -} - -func (e *gfP6) Frobenius(a *gfP6, pool *bnPool) *gfP6 { - e.x.Conjugate(a.x) - e.y.Conjugate(a.y) - e.z.Conjugate(a.z) - - e.x.Mul(e.x, xiTo2PMinus2Over3, pool) - e.y.Mul(e.y, xiToPMinus1Over3, pool) - return e -} - -// FrobeniusP2 computes (xτ²+yτ+z)^(p²) = xτ^(2p²) + yτ^(p²) + z -func (e *gfP6) FrobeniusP2(a *gfP6) *gfP6 { - // τ^(2p²) = τ²τ^(2p²-2) = τ²ξ^((2p²-2)/3) - e.x.MulScalar(a.x, xiTo2PSquaredMinus2Over3) - // τ^(p²) = ττ^(p²-1) = τξ^((p²-1)/3) - e.y.MulScalar(a.y, xiToPSquaredMinus1Over3) - e.z.Set(a.z) - return e -} - -func (e *gfP6) Add(a, b *gfP6) *gfP6 { - e.x.Add(a.x, b.x) - e.y.Add(a.y, b.y) - e.z.Add(a.z, b.z) - return e -} - -func (e *gfP6) Sub(a, b *gfP6) *gfP6 { - e.x.Sub(a.x, b.x) - e.y.Sub(a.y, b.y) - e.z.Sub(a.z, b.z) - return e -} - -func (e *gfP6) Double(a *gfP6) *gfP6 { - e.x.Double(a.x) - e.y.Double(a.y) - e.z.Double(a.z) - return e -} - -func (e *gfP6) Mul(a, b *gfP6, pool *bnPool) *gfP6 { - // "Multiplication and Squaring on Pairing-Friendly Fields" - // Section 4, Karatsuba method. - // http://eprint.iacr.org/2006/471.pdf - - v0 := newGFp2(pool) - v0.Mul(a.z, b.z, pool) - v1 := newGFp2(pool) - v1.Mul(a.y, b.y, pool) - v2 := newGFp2(pool) - v2.Mul(a.x, b.x, pool) - - t0 := newGFp2(pool) - t0.Add(a.x, a.y) - t1 := newGFp2(pool) - t1.Add(b.x, b.y) - tz := newGFp2(pool) - tz.Mul(t0, t1, pool) - - tz.Sub(tz, v1) - tz.Sub(tz, v2) - tz.MulXi(tz, pool) - tz.Add(tz, v0) - - t0.Add(a.y, a.z) - t1.Add(b.y, b.z) - ty := newGFp2(pool) - ty.Mul(t0, t1, pool) - ty.Sub(ty, v0) - ty.Sub(ty, v1) - t0.MulXi(v2, pool) - ty.Add(ty, t0) - - t0.Add(a.x, a.z) - t1.Add(b.x, b.z) - tx := newGFp2(pool) - tx.Mul(t0, t1, pool) - tx.Sub(tx, v0) - tx.Add(tx, v1) - tx.Sub(tx, v2) - - e.x.Set(tx) - e.y.Set(ty) - e.z.Set(tz) - - t0.Put(pool) - t1.Put(pool) - tx.Put(pool) - ty.Put(pool) - tz.Put(pool) - v0.Put(pool) - v1.Put(pool) - v2.Put(pool) - return e -} - -func (e *gfP6) MulScalar(a *gfP6, b *gfP2, pool *bnPool) *gfP6 { - e.x.Mul(a.x, b, pool) - e.y.Mul(a.y, b, pool) - e.z.Mul(a.z, b, pool) - return e -} - -func (e *gfP6) MulGFP(a *gfP6, b *big.Int) *gfP6 { - e.x.MulScalar(a.x, b) - e.y.MulScalar(a.y, b) - e.z.MulScalar(a.z, b) - return e -} - -// MulTau computes τ·(aτ²+bτ+c) = bτ²+cτ+aξ -func (e *gfP6) MulTau(a *gfP6, pool *bnPool) { - tz := newGFp2(pool) - tz.MulXi(a.x, pool) - ty := newGFp2(pool) - ty.Set(a.y) - e.y.Set(a.z) - e.x.Set(ty) - e.z.Set(tz) - tz.Put(pool) - ty.Put(pool) -} - -func (e *gfP6) Square(a *gfP6, pool *bnPool) *gfP6 { - v0 := newGFp2(pool).Square(a.z, pool) - v1 := newGFp2(pool).Square(a.y, pool) - v2 := newGFp2(pool).Square(a.x, pool) - - c0 := newGFp2(pool).Add(a.x, a.y) - c0.Square(c0, pool) - c0.Sub(c0, v1) - c0.Sub(c0, v2) - c0.MulXi(c0, pool) - c0.Add(c0, v0) - - c1 := newGFp2(pool).Add(a.y, a.z) - c1.Square(c1, pool) - c1.Sub(c1, v0) - c1.Sub(c1, v1) - xiV2 := newGFp2(pool).MulXi(v2, pool) - c1.Add(c1, xiV2) - - c2 := newGFp2(pool).Add(a.x, a.z) - c2.Square(c2, pool) - c2.Sub(c2, v0) - c2.Add(c2, v1) - c2.Sub(c2, v2) - - e.x.Set(c2) - e.y.Set(c1) - e.z.Set(c0) - - v0.Put(pool) - v1.Put(pool) - v2.Put(pool) - c0.Put(pool) - c1.Put(pool) - c2.Put(pool) - xiV2.Put(pool) - - return e -} - -func (e *gfP6) Invert(a *gfP6, pool *bnPool) *gfP6 { - // See "Implementing cryptographic pairings", M. Scott, section 3.2. - // ftp://136.206.11.249/pub/crypto/pairings.pdf - - // Here we can give a short explanation of how it works: let j be a cubic root of - // unity in GF(p²) so that 1+j+j²=0. - // Then (xτ² + yτ + z)(xj²τ² + yjτ + z)(xjτ² + yj²τ + z) - // = (xτ² + yτ + z)(Cτ²+Bτ+A) - // = (x³ξ²+y³ξ+z³-3ξxyz) = F is an element of the base field (the norm). - // - // On the other hand (xj²τ² + yjτ + z)(xjτ² + yj²τ + z) - // = τ²(y²-ξxz) + τ(ξx²-yz) + (z²-ξxy) - // - // So that's why A = (z²-ξxy), B = (ξx²-yz), C = (y²-ξxz) - t1 := newGFp2(pool) - - A := newGFp2(pool) - A.Square(a.z, pool) - t1.Mul(a.x, a.y, pool) - t1.MulXi(t1, pool) - A.Sub(A, t1) - - B := newGFp2(pool) - B.Square(a.x, pool) - B.MulXi(B, pool) - t1.Mul(a.y, a.z, pool) - B.Sub(B, t1) - - C := newGFp2(pool) - C.Square(a.y, pool) - t1.Mul(a.x, a.z, pool) - C.Sub(C, t1) - - F := newGFp2(pool) - F.Mul(C, a.y, pool) - F.MulXi(F, pool) - t1.Mul(A, a.z, pool) - F.Add(F, t1) - t1.Mul(B, a.x, pool) - t1.MulXi(t1, pool) - F.Add(F, t1) - - F.Invert(F, pool) - - e.x.Mul(C, F, pool) - e.y.Mul(B, F, pool) - e.z.Mul(A, F, pool) - - t1.Put(pool) - A.Put(pool) - B.Put(pool) - C.Put(pool) - F.Put(pool) - - return e -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/optate.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/optate.go deleted file mode 100644 index 7ae0746eb1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/optate.go +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright 2012 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 bn256 - -func lineFunctionAdd(r, p *twistPoint, q *curvePoint, r2 *gfP2, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) { - // See the mixed addition algorithm from "Faster Computation of the - // Tate Pairing", http://arxiv.org/pdf/0904.0854v3.pdf - - B := newGFp2(pool).Mul(p.x, r.t, pool) - - D := newGFp2(pool).Add(p.y, r.z) - D.Square(D, pool) - D.Sub(D, r2) - D.Sub(D, r.t) - D.Mul(D, r.t, pool) - - H := newGFp2(pool).Sub(B, r.x) - I := newGFp2(pool).Square(H, pool) - - E := newGFp2(pool).Add(I, I) - E.Add(E, E) - - J := newGFp2(pool).Mul(H, E, pool) - - L1 := newGFp2(pool).Sub(D, r.y) - L1.Sub(L1, r.y) - - V := newGFp2(pool).Mul(r.x, E, pool) - - rOut = newTwistPoint(pool) - rOut.x.Square(L1, pool) - rOut.x.Sub(rOut.x, J) - rOut.x.Sub(rOut.x, V) - rOut.x.Sub(rOut.x, V) - - rOut.z.Add(r.z, H) - rOut.z.Square(rOut.z, pool) - rOut.z.Sub(rOut.z, r.t) - rOut.z.Sub(rOut.z, I) - - t := newGFp2(pool).Sub(V, rOut.x) - t.Mul(t, L1, pool) - t2 := newGFp2(pool).Mul(r.y, J, pool) - t2.Add(t2, t2) - rOut.y.Sub(t, t2) - - rOut.t.Square(rOut.z, pool) - - t.Add(p.y, rOut.z) - t.Square(t, pool) - t.Sub(t, r2) - t.Sub(t, rOut.t) - - t2.Mul(L1, p.x, pool) - t2.Add(t2, t2) - a = newGFp2(pool) - a.Sub(t2, t) - - c = newGFp2(pool) - c.MulScalar(rOut.z, q.y) - c.Add(c, c) - - b = newGFp2(pool) - b.SetZero() - b.Sub(b, L1) - b.MulScalar(b, q.x) - b.Add(b, b) - - B.Put(pool) - D.Put(pool) - H.Put(pool) - I.Put(pool) - E.Put(pool) - J.Put(pool) - L1.Put(pool) - V.Put(pool) - t.Put(pool) - t2.Put(pool) - - return -} - -func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) { - // See the doubling algorithm for a=0 from "Faster Computation of the - // Tate Pairing", http://arxiv.org/pdf/0904.0854v3.pdf - - A := newGFp2(pool).Square(r.x, pool) - B := newGFp2(pool).Square(r.y, pool) - C := newGFp2(pool).Square(B, pool) - - D := newGFp2(pool).Add(r.x, B) - D.Square(D, pool) - D.Sub(D, A) - D.Sub(D, C) - D.Add(D, D) - - E := newGFp2(pool).Add(A, A) - E.Add(E, A) - - G := newGFp2(pool).Square(E, pool) - - rOut = newTwistPoint(pool) - rOut.x.Sub(G, D) - rOut.x.Sub(rOut.x, D) - - rOut.z.Add(r.y, r.z) - rOut.z.Square(rOut.z, pool) - rOut.z.Sub(rOut.z, B) - rOut.z.Sub(rOut.z, r.t) - - rOut.y.Sub(D, rOut.x) - rOut.y.Mul(rOut.y, E, pool) - t := newGFp2(pool).Add(C, C) - t.Add(t, t) - t.Add(t, t) - rOut.y.Sub(rOut.y, t) - - rOut.t.Square(rOut.z, pool) - - t.Mul(E, r.t, pool) - t.Add(t, t) - b = newGFp2(pool) - b.SetZero() - b.Sub(b, t) - b.MulScalar(b, q.x) - - a = newGFp2(pool) - a.Add(r.x, E) - a.Square(a, pool) - a.Sub(a, A) - a.Sub(a, G) - t.Add(B, B) - t.Add(t, t) - a.Sub(a, t) - - c = newGFp2(pool) - c.Mul(rOut.z, r.t, pool) - c.Add(c, c) - c.MulScalar(c, q.y) - - A.Put(pool) - B.Put(pool) - C.Put(pool) - D.Put(pool) - E.Put(pool) - G.Put(pool) - t.Put(pool) - - return -} - -func mulLine(ret *gfP12, a, b, c *gfP2, pool *bnPool) { - a2 := newGFp6(pool) - a2.x.SetZero() - a2.y.Set(a) - a2.z.Set(b) - a2.Mul(a2, ret.x, pool) - t3 := newGFp6(pool).MulScalar(ret.y, c, pool) - - t := newGFp2(pool) - t.Add(b, c) - t2 := newGFp6(pool) - t2.x.SetZero() - t2.y.Set(a) - t2.z.Set(t) - ret.x.Add(ret.x, ret.y) - - ret.y.Set(t3) - - ret.x.Mul(ret.x, t2, pool) - ret.x.Sub(ret.x, a2) - ret.x.Sub(ret.x, ret.y) - a2.MulTau(a2, pool) - ret.y.Add(ret.y, a2) - - a2.Put(pool) - t3.Put(pool) - t2.Put(pool) - t.Put(pool) -} - -// sixuPlus2NAF is 6u+2 in non-adjacent form. -var sixuPlus2NAF = []int8{0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 1} - -// miller implements the Miller loop for calculating the Optimal Ate pairing. -// See algorithm 1 from http://cryptojedi.org/papers/dclxvi-20100714.pdf -func miller(q *twistPoint, p *curvePoint, pool *bnPool) *gfP12 { - ret := newGFp12(pool) - ret.SetOne() - - aAffine := newTwistPoint(pool) - aAffine.Set(q) - aAffine.MakeAffine(pool) - - bAffine := newCurvePoint(pool) - bAffine.Set(p) - bAffine.MakeAffine(pool) - - minusA := newTwistPoint(pool) - minusA.Negative(aAffine, pool) - - r := newTwistPoint(pool) - r.Set(aAffine) - - r2 := newGFp2(pool) - r2.Square(aAffine.y, pool) - - for i := len(sixuPlus2NAF) - 1; i > 0; i-- { - a, b, c, newR := lineFunctionDouble(r, bAffine, pool) - if i != len(sixuPlus2NAF)-1 { - ret.Square(ret, pool) - } - - mulLine(ret, a, b, c, pool) - a.Put(pool) - b.Put(pool) - c.Put(pool) - r.Put(pool) - r = newR - - switch sixuPlus2NAF[i-1] { - case 1: - a, b, c, newR = lineFunctionAdd(r, aAffine, bAffine, r2, pool) - case -1: - a, b, c, newR = lineFunctionAdd(r, minusA, bAffine, r2, pool) - default: - continue - } - - mulLine(ret, a, b, c, pool) - a.Put(pool) - b.Put(pool) - c.Put(pool) - r.Put(pool) - r = newR - } - - // In order to calculate Q1 we have to convert q from the sextic twist - // to the full GF(p^12) group, apply the Frobenius there, and convert - // back. - // - // The twist isomorphism is (x', y') -> (xω², yω³). If we consider just - // x for a moment, then after applying the Frobenius, we have x̄ω^(2p) - // where x̄ is the conjugate of x. If we are going to apply the inverse - // isomorphism we need a value with a single coefficient of ω² so we - // rewrite this as x̄ω^(2p-2)ω². ξ⁶ = ω and, due to the construction of - // p, 2p-2 is a multiple of six. Therefore we can rewrite as - // x̄ξ^((p-1)/3)ω² and applying the inverse isomorphism eliminates the - // ω². - // - // A similar argument can be made for the y value. - - q1 := newTwistPoint(pool) - q1.x.Conjugate(aAffine.x) - q1.x.Mul(q1.x, xiToPMinus1Over3, pool) - q1.y.Conjugate(aAffine.y) - q1.y.Mul(q1.y, xiToPMinus1Over2, pool) - q1.z.SetOne() - q1.t.SetOne() - - // For Q2 we are applying the p² Frobenius. The two conjugations cancel - // out and we are left only with the factors from the isomorphism. In - // the case of x, we end up with a pure number which is why - // xiToPSquaredMinus1Over3 is ∈ GF(p). With y we get a factor of -1. We - // ignore this to end up with -Q2. - - minusQ2 := newTwistPoint(pool) - minusQ2.x.MulScalar(aAffine.x, xiToPSquaredMinus1Over3) - minusQ2.y.Set(aAffine.y) - minusQ2.z.SetOne() - minusQ2.t.SetOne() - - r2.Square(q1.y, pool) - a, b, c, newR := lineFunctionAdd(r, q1, bAffine, r2, pool) - mulLine(ret, a, b, c, pool) - a.Put(pool) - b.Put(pool) - c.Put(pool) - r.Put(pool) - r = newR - - r2.Square(minusQ2.y, pool) - a, b, c, newR = lineFunctionAdd(r, minusQ2, bAffine, r2, pool) - mulLine(ret, a, b, c, pool) - a.Put(pool) - b.Put(pool) - c.Put(pool) - r.Put(pool) - r = newR - - aAffine.Put(pool) - bAffine.Put(pool) - minusA.Put(pool) - r.Put(pool) - r2.Put(pool) - - return ret -} - -// finalExponentiation computes the (p¹²-1)/Order-th power of an element of -// GF(p¹²) to obtain an element of GT (steps 13-15 of algorithm 1 from -// http://cryptojedi.org/papers/dclxvi-20100714.pdf) -func finalExponentiation(in *gfP12, pool *bnPool) *gfP12 { - t1 := newGFp12(pool) - - // This is the p^6-Frobenius - t1.x.Negative(in.x) - t1.y.Set(in.y) - - inv := newGFp12(pool) - inv.Invert(in, pool) - t1.Mul(t1, inv, pool) - - t2 := newGFp12(pool).FrobeniusP2(t1, pool) - t1.Mul(t1, t2, pool) - - fp := newGFp12(pool).Frobenius(t1, pool) - fp2 := newGFp12(pool).FrobeniusP2(t1, pool) - fp3 := newGFp12(pool).Frobenius(fp2, pool) - - fu, fu2, fu3 := newGFp12(pool), newGFp12(pool), newGFp12(pool) - fu.Exp(t1, u, pool) - fu2.Exp(fu, u, pool) - fu3.Exp(fu2, u, pool) - - y3 := newGFp12(pool).Frobenius(fu, pool) - fu2p := newGFp12(pool).Frobenius(fu2, pool) - fu3p := newGFp12(pool).Frobenius(fu3, pool) - y2 := newGFp12(pool).FrobeniusP2(fu2, pool) - - y0 := newGFp12(pool) - y0.Mul(fp, fp2, pool) - y0.Mul(y0, fp3, pool) - - y1, y4, y5 := newGFp12(pool), newGFp12(pool), newGFp12(pool) - y1.Conjugate(t1) - y5.Conjugate(fu2) - y3.Conjugate(y3) - y4.Mul(fu, fu2p, pool) - y4.Conjugate(y4) - - y6 := newGFp12(pool) - y6.Mul(fu3, fu3p, pool) - y6.Conjugate(y6) - - t0 := newGFp12(pool) - t0.Square(y6, pool) - t0.Mul(t0, y4, pool) - t0.Mul(t0, y5, pool) - t1.Mul(y3, y5, pool) - t1.Mul(t1, t0, pool) - t0.Mul(t0, y2, pool) - t1.Square(t1, pool) - t1.Mul(t1, t0, pool) - t1.Square(t1, pool) - t0.Mul(t1, y1, pool) - t1.Mul(t1, y0, pool) - t0.Square(t0, pool) - t0.Mul(t0, t1, pool) - - inv.Put(pool) - t1.Put(pool) - t2.Put(pool) - fp.Put(pool) - fp2.Put(pool) - fp3.Put(pool) - fu.Put(pool) - fu2.Put(pool) - fu3.Put(pool) - fu2p.Put(pool) - fu3p.Put(pool) - y0.Put(pool) - y1.Put(pool) - y2.Put(pool) - y3.Put(pool) - y4.Put(pool) - y5.Put(pool) - y6.Put(pool) - - return t0 -} - -func optimalAte(a *twistPoint, b *curvePoint, pool *bnPool) *gfP12 { - e := miller(a, b, pool) - ret := finalExponentiation(e, pool) - e.Put(pool) - - if a.IsInfinity() || b.IsInfinity() { - ret.SetOne() - } - - return ret -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/twist.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/twist.go deleted file mode 100644 index 056d80f18f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/bn256/twist.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2012 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 bn256 - -import ( - "math/big" -) - -// twistPoint implements the elliptic curve y²=x³+3/ξ over GF(p²). Points are -// kept in Jacobian form and t=z² when valid. The group G₂ is the set of -// n-torsion points of this curve over GF(p²) (where n = Order) -type twistPoint struct { - x, y, z, t *gfP2 -} - -var twistB = &gfP2{ - bigFromBase10("6500054969564660373279643874235990574282535810762300357187714502686418407178"), - bigFromBase10("45500384786952622612957507119651934019977750675336102500314001518804928850249"), -} - -// twistGen is the generator of group G₂. -var twistGen = &twistPoint{ - &gfP2{ - bigFromBase10("21167961636542580255011770066570541300993051739349375019639421053990175267184"), - bigFromBase10("64746500191241794695844075326670126197795977525365406531717464316923369116492"), - }, - &gfP2{ - bigFromBase10("20666913350058776956210519119118544732556678129809273996262322366050359951122"), - bigFromBase10("17778617556404439934652658462602675281523610326338642107814333856843981424549"), - }, - &gfP2{ - bigFromBase10("0"), - bigFromBase10("1"), - }, - &gfP2{ - bigFromBase10("0"), - bigFromBase10("1"), - }, -} - -func newTwistPoint(pool *bnPool) *twistPoint { - return &twistPoint{ - newGFp2(pool), - newGFp2(pool), - newGFp2(pool), - newGFp2(pool), - } -} - -func (c *twistPoint) String() string { - return "(" + c.x.String() + ", " + c.y.String() + ", " + c.z.String() + ")" -} - -func (c *twistPoint) Put(pool *bnPool) { - c.x.Put(pool) - c.y.Put(pool) - c.z.Put(pool) - c.t.Put(pool) -} - -func (c *twistPoint) Set(a *twistPoint) { - c.x.Set(a.x) - c.y.Set(a.y) - c.z.Set(a.z) - c.t.Set(a.t) -} - -// IsOnCurve returns true iff c is on the curve where c must be in affine form. -func (c *twistPoint) IsOnCurve() bool { - pool := new(bnPool) - yy := newGFp2(pool).Square(c.y, pool) - xxx := newGFp2(pool).Square(c.x, pool) - xxx.Mul(xxx, c.x, pool) - yy.Sub(yy, xxx) - yy.Sub(yy, twistB) - yy.Minimal() - return yy.x.Sign() == 0 && yy.y.Sign() == 0 -} - -func (c *twistPoint) SetInfinity() { - c.z.SetZero() -} - -func (c *twistPoint) IsInfinity() bool { - return c.z.IsZero() -} - -func (c *twistPoint) Add(a, b *twistPoint, pool *bnPool) { - // For additional comments, see the same function in curve.go. - - if a.IsInfinity() { - c.Set(b) - return - } - if b.IsInfinity() { - c.Set(a) - return - } - - // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/addition/add-2007-bl.op3 - z1z1 := newGFp2(pool).Square(a.z, pool) - z2z2 := newGFp2(pool).Square(b.z, pool) - u1 := newGFp2(pool).Mul(a.x, z2z2, pool) - u2 := newGFp2(pool).Mul(b.x, z1z1, pool) - - t := newGFp2(pool).Mul(b.z, z2z2, pool) - s1 := newGFp2(pool).Mul(a.y, t, pool) - - t.Mul(a.z, z1z1, pool) - s2 := newGFp2(pool).Mul(b.y, t, pool) - - h := newGFp2(pool).Sub(u2, u1) - xEqual := h.IsZero() - - t.Add(h, h) - i := newGFp2(pool).Square(t, pool) - j := newGFp2(pool).Mul(h, i, pool) - - t.Sub(s2, s1) - yEqual := t.IsZero() - if xEqual && yEqual { - c.Double(a, pool) - return - } - r := newGFp2(pool).Add(t, t) - - v := newGFp2(pool).Mul(u1, i, pool) - - t4 := newGFp2(pool).Square(r, pool) - t.Add(v, v) - t6 := newGFp2(pool).Sub(t4, j) - c.x.Sub(t6, t) - - t.Sub(v, c.x) // t7 - t4.Mul(s1, j, pool) // t8 - t6.Add(t4, t4) // t9 - t4.Mul(r, t, pool) // t10 - c.y.Sub(t4, t6) - - t.Add(a.z, b.z) // t11 - t4.Square(t, pool) // t12 - t.Sub(t4, z1z1) // t13 - t4.Sub(t, z2z2) // t14 - c.z.Mul(t4, h, pool) - - z1z1.Put(pool) - z2z2.Put(pool) - u1.Put(pool) - u2.Put(pool) - t.Put(pool) - s1.Put(pool) - s2.Put(pool) - h.Put(pool) - i.Put(pool) - j.Put(pool) - r.Put(pool) - v.Put(pool) - t4.Put(pool) - t6.Put(pool) -} - -func (c *twistPoint) Double(a *twistPoint, pool *bnPool) { - // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3 - A := newGFp2(pool).Square(a.x, pool) - B := newGFp2(pool).Square(a.y, pool) - C := newGFp2(pool).Square(B, pool) - - t := newGFp2(pool).Add(a.x, B) - t2 := newGFp2(pool).Square(t, pool) - t.Sub(t2, A) - t2.Sub(t, C) - d := newGFp2(pool).Add(t2, t2) - t.Add(A, A) - e := newGFp2(pool).Add(t, A) - f := newGFp2(pool).Square(e, pool) - - t.Add(d, d) - c.x.Sub(f, t) - - t.Add(C, C) - t2.Add(t, t) - t.Add(t2, t2) - c.y.Sub(d, c.x) - t2.Mul(e, c.y, pool) - c.y.Sub(t2, t) - - t.Mul(a.y, a.z, pool) - c.z.Add(t, t) - - A.Put(pool) - B.Put(pool) - C.Put(pool) - t.Put(pool) - t2.Put(pool) - d.Put(pool) - e.Put(pool) - f.Put(pool) -} - -func (c *twistPoint) Mul(a *twistPoint, scalar *big.Int, pool *bnPool) *twistPoint { - sum := newTwistPoint(pool) - sum.SetInfinity() - t := newTwistPoint(pool) - - for i := scalar.BitLen(); i >= 0; i-- { - t.Double(sum, pool) - if scalar.Bit(i) != 0 { - sum.Add(t, a, pool) - } else { - sum.Set(t) - } - } - - c.Set(sum) - sum.Put(pool) - t.Put(pool) - return c -} - -// MakeAffine converts c to affine form and returns c. If c is ∞, then it sets -// c to 0 : 1 : 0. -func (c *twistPoint) MakeAffine(pool *bnPool) *twistPoint { - if c.z.IsOne() { - return c - } - if c.IsInfinity() { - c.x.SetZero() - c.y.SetOne() - c.z.SetZero() - c.t.SetZero() - return c - } - - zInv := newGFp2(pool).Invert(c.z, pool) - t := newGFp2(pool).Mul(c.y, zInv, pool) - zInv2 := newGFp2(pool).Square(zInv, pool) - c.y.Mul(t, zInv2, pool) - t.Mul(c.x, zInv2, pool) - c.x.Set(t) - c.z.SetOne() - c.t.SetOne() - - zInv.Put(pool) - t.Put(pool) - zInv2.Put(pool) - - return c -} - -func (c *twistPoint) Negative(a *twistPoint, pool *bnPool) { - c.x.Set(a.x) - c.y.SetZero() - c.y.Sub(c.y, a.y) - c.z.Set(a.z) - c.t.SetZero() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5.go deleted file mode 100644 index 8c1b299bf2..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5.go +++ /dev/null @@ -1,526 +0,0 @@ -// Copyright 2010 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 cast5 implements CAST5, as defined in RFC 2144. CAST5 is a common -// OpenPGP cipher. -package cast5 - -import "errors" - -const BlockSize = 8 -const KeySize = 16 - -type Cipher struct { - masking [16]uint32 - rotate [16]uint8 -} - -func NewCipher(key []byte) (c *Cipher, err error) { - if len(key) != KeySize { - return nil, errors.New("CAST5: keys must be 16 bytes") - } - - c = new(Cipher) - c.keySchedule(key) - return -} - -func (c *Cipher) BlockSize() int { - return BlockSize -} - -func (c *Cipher) Encrypt(dst, src []byte) { - l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) - r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) - - l, r = r, l^f1(r, c.masking[0], c.rotate[0]) - l, r = r, l^f2(r, c.masking[1], c.rotate[1]) - l, r = r, l^f3(r, c.masking[2], c.rotate[2]) - l, r = r, l^f1(r, c.masking[3], c.rotate[3]) - - l, r = r, l^f2(r, c.masking[4], c.rotate[4]) - l, r = r, l^f3(r, c.masking[5], c.rotate[5]) - l, r = r, l^f1(r, c.masking[6], c.rotate[6]) - l, r = r, l^f2(r, c.masking[7], c.rotate[7]) - - l, r = r, l^f3(r, c.masking[8], c.rotate[8]) - l, r = r, l^f1(r, c.masking[9], c.rotate[9]) - l, r = r, l^f2(r, c.masking[10], c.rotate[10]) - l, r = r, l^f3(r, c.masking[11], c.rotate[11]) - - l, r = r, l^f1(r, c.masking[12], c.rotate[12]) - l, r = r, l^f2(r, c.masking[13], c.rotate[13]) - l, r = r, l^f3(r, c.masking[14], c.rotate[14]) - l, r = r, l^f1(r, c.masking[15], c.rotate[15]) - - dst[0] = uint8(r >> 24) - dst[1] = uint8(r >> 16) - dst[2] = uint8(r >> 8) - dst[3] = uint8(r) - dst[4] = uint8(l >> 24) - dst[5] = uint8(l >> 16) - dst[6] = uint8(l >> 8) - dst[7] = uint8(l) -} - -func (c *Cipher) Decrypt(dst, src []byte) { - l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) - r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) - - l, r = r, l^f1(r, c.masking[15], c.rotate[15]) - l, r = r, l^f3(r, c.masking[14], c.rotate[14]) - l, r = r, l^f2(r, c.masking[13], c.rotate[13]) - l, r = r, l^f1(r, c.masking[12], c.rotate[12]) - - l, r = r, l^f3(r, c.masking[11], c.rotate[11]) - l, r = r, l^f2(r, c.masking[10], c.rotate[10]) - l, r = r, l^f1(r, c.masking[9], c.rotate[9]) - l, r = r, l^f3(r, c.masking[8], c.rotate[8]) - - l, r = r, l^f2(r, c.masking[7], c.rotate[7]) - l, r = r, l^f1(r, c.masking[6], c.rotate[6]) - l, r = r, l^f3(r, c.masking[5], c.rotate[5]) - l, r = r, l^f2(r, c.masking[4], c.rotate[4]) - - l, r = r, l^f1(r, c.masking[3], c.rotate[3]) - l, r = r, l^f3(r, c.masking[2], c.rotate[2]) - l, r = r, l^f2(r, c.masking[1], c.rotate[1]) - l, r = r, l^f1(r, c.masking[0], c.rotate[0]) - - dst[0] = uint8(r >> 24) - dst[1] = uint8(r >> 16) - dst[2] = uint8(r >> 8) - dst[3] = uint8(r) - dst[4] = uint8(l >> 24) - dst[5] = uint8(l >> 16) - dst[6] = uint8(l >> 8) - dst[7] = uint8(l) -} - -type keyScheduleA [4][7]uint8 -type keyScheduleB [4][5]uint8 - -// keyScheduleRound contains the magic values for a round of the key schedule. -// The keyScheduleA deals with the lines like: -// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8] -// Conceptually, both x and z are in the same array, x first. The first -// element describes which word of this array gets written to and the -// second, which word gets read. So, for the line above, it's "4, 0", because -// it's writing to the first word of z, which, being after x, is word 4, and -// reading from the first word of x: word 0. -// -// Next are the indexes into the S-boxes. Now the array is treated as bytes. So -// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear -// that it's z that we're indexing. -// -// keyScheduleB deals with lines like: -// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2] -// "K1" is ignored because key words are always written in order. So the five -// elements are the S-box indexes. They use the same form as in keyScheduleA, -// above. - -type keyScheduleRound struct{} -type keySchedule []keyScheduleRound - -var schedule = []struct { - a keyScheduleA - b keyScheduleB -}{ - { - keyScheduleA{ - {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8}, - {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, - {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, - {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, - }, - keyScheduleB{ - {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2}, - {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6}, - {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9}, - {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc}, - }, - }, - { - keyScheduleA{ - {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, - {1, 4, 0, 2, 1, 3, 16 + 2}, - {2, 5, 7, 6, 5, 4, 16 + 1}, - {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, - }, - keyScheduleB{ - {3, 2, 0xc, 0xd, 8}, - {1, 0, 0xe, 0xf, 0xd}, - {7, 6, 8, 9, 3}, - {5, 4, 0xa, 0xb, 7}, - }, - }, - { - keyScheduleA{ - {4, 0, 0xd, 0xf, 0xc, 0xe, 8}, - {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, - {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, - {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, - }, - keyScheduleB{ - {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9}, - {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc}, - {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2}, - {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6}, - }, - }, - { - keyScheduleA{ - {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, - {1, 4, 0, 2, 1, 3, 16 + 2}, - {2, 5, 7, 6, 5, 4, 16 + 1}, - {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, - }, - keyScheduleB{ - {8, 9, 7, 6, 3}, - {0xa, 0xb, 5, 4, 7}, - {0xc, 0xd, 3, 2, 8}, - {0xe, 0xf, 1, 0, 0xd}, - }, - }, -} - -func (c *Cipher) keySchedule(in []byte) { - var t [8]uint32 - var k [32]uint32 - - for i := 0; i < 4; i++ { - j := i * 4 - t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3]) - } - - x := []byte{6, 7, 4, 5} - ki := 0 - - for half := 0; half < 2; half++ { - for _, round := range schedule { - for j := 0; j < 4; j++ { - var a [7]uint8 - copy(a[:], round.a[j][:]) - w := t[a[1]] - w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff] - w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff] - w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff] - w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff] - w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff] - t[a[0]] = w - } - - for j := 0; j < 4; j++ { - var b [5]uint8 - copy(b[:], round.b[j][:]) - w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff] - w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff] - w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff] - w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff] - w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff] - k[ki] = w - ki++ - } - } - } - - for i := 0; i < 16; i++ { - c.masking[i] = k[i] - c.rotate[i] = uint8(k[16+i] & 0x1f) - } -} - -// These are the three 'f' functions. See RFC 2144, section 2.2. -func f1(d, m uint32, r uint8) uint32 { - t := m + d - I := (t << r) | (t >> (32 - r)) - return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff] -} - -func f2(d, m uint32, r uint8) uint32 { - t := m ^ d - I := (t << r) | (t >> (32 - r)) - return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff] -} - -func f3(d, m uint32, r uint8) uint32 { - t := m - d - I := (t << r) | (t >> (32 - r)) - return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff] -} - -var sBox = [8][256]uint32{ - { - 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949, - 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, - 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, - 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0, - 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7, - 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935, - 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d, - 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, - 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe, - 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3, - 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167, - 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291, - 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779, - 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2, - 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511, - 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d, - 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5, - 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324, - 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, - 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc, - 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d, - 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96, - 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a, - 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, - 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, - 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6, - 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, - 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872, - 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c, - 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e, - 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9, - 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf, - }, - { - 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651, - 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, - 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb, - 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, - 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b, - 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359, - 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b, - 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c, - 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34, - 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb, - 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd, - 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860, - 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b, - 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, - 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b, - 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, - 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c, - 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13, - 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f, - 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, - 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6, - 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58, - 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, - 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, - 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6, - 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, - 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6, - 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f, - 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, - 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, - 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9, - 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1, - }, - { - 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90, - 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5, - 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e, - 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240, - 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, - 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, - 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71, - 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, - 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, - 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15, - 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2, - 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176, - 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148, - 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc, - 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, - 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e, - 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, - 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f, - 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a, - 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b, - 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, - 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, - 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, - 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536, - 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, - 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, - 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69, - 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, - 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49, - 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d, - 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a, - 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783, - }, - { - 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1, - 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf, - 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15, - 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121, - 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25, - 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, - 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb, - 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5, - 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d, - 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6, - 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23, - 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003, - 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, - 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119, - 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, - 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a, - 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79, - 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df, - 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, - 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab, - 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7, - 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, - 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2, - 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2, - 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, - 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919, - 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, - 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, - 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab, - 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04, - 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282, - 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2, - }, - { - 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f, - 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a, - 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff, - 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, - 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, - 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7, - 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9, - 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981, - 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774, - 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655, - 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2, - 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910, - 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1, - 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da, - 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049, - 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f, - 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba, - 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, - 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3, - 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840, - 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4, - 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2, - 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7, - 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5, - 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, - 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e, - 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801, - 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, - 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, - 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20, - 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8, - 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4, - }, - { - 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac, - 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138, - 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367, - 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98, - 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, - 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, - 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, - 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8, - 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9, - 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54, - 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387, - 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc, - 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf, - 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf, - 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f, - 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289, - 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950, - 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, - 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b, - 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be, - 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, - 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976, - 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0, - 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891, - 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da, - 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc, - 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084, - 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25, - 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121, - 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, - 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd, - 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f, - }, - { - 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f, - 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de, - 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, - 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19, - 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2, - 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516, - 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, - 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816, - 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756, - 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, - 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264, - 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688, - 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28, - 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3, - 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7, - 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, - 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, - 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a, - 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566, - 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, - 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962, - 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e, - 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c, - 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, - 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, - 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301, - 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be, - 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767, - 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647, - 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914, - 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c, - 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3, - }, - { - 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5, - 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc, - 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd, - 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d, - 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2, - 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862, - 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc, - 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c, - 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e, - 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039, - 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, - 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42, - 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5, - 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472, - 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225, - 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c, - 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb, - 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054, - 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70, - 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc, - 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, - 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3, - 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4, - 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101, - 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f, - 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e, - 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, - 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c, - 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384, - 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c, - 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, - 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e, - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5_test.go deleted file mode 100644 index 778b272a63..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5/cast5_test.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2010 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 cast5 - -import ( - "bytes" - "encoding/hex" - "testing" -) - -// This test vector is taken from RFC 2144, App B.1. -// Since the other two test vectors are for reduced-round variants, we can't -// use them. -var basicTests = []struct { - key, plainText, cipherText string -}{ - { - "0123456712345678234567893456789a", - "0123456789abcdef", - "238b4fe5847e44b2", - }, -} - -func TestBasic(t *testing.T) { - for i, test := range basicTests { - key, _ := hex.DecodeString(test.key) - plainText, _ := hex.DecodeString(test.plainText) - expected, _ := hex.DecodeString(test.cipherText) - - c, err := NewCipher(key) - if err != nil { - t.Errorf("#%d: failed to create Cipher: %s", i, err) - continue - } - var cipherText [BlockSize]byte - c.Encrypt(cipherText[:], plainText) - if !bytes.Equal(cipherText[:], expected) { - t.Errorf("#%d: got:%x want:%x", i, cipherText, expected) - } - - var plainTextAgain [BlockSize]byte - c.Decrypt(plainTextAgain[:], cipherText[:]) - if !bytes.Equal(plainTextAgain[:], plainText) { - t.Errorf("#%d: got:%x want:%x", i, plainTextAgain, plainText) - } - } -} - -// TestFull performs the test specified in RFC 2144, App B.2. -// However, due to the length of time taken, it's disabled here and a more -// limited version is included, below. -func TestFull(t *testing.T) { - if testing.Short() { - // This is too slow for normal testing - return - } - - a, b := iterate(1000000) - - const expectedA = "eea9d0a249fd3ba6b3436fb89d6dca92" - const expectedB = "b2c95eb00c31ad7180ac05b8e83d696e" - - if hex.EncodeToString(a) != expectedA { - t.Errorf("a: got:%x want:%s", a, expectedA) - } - if hex.EncodeToString(b) != expectedB { - t.Errorf("b: got:%x want:%s", b, expectedB) - } -} - -func iterate(iterations int) ([]byte, []byte) { - const initValueHex = "0123456712345678234567893456789a" - - initValue, _ := hex.DecodeString(initValueHex) - - var a, b [16]byte - copy(a[:], initValue) - copy(b[:], initValue) - - for i := 0; i < iterations; i++ { - c, _ := NewCipher(b[:]) - c.Encrypt(a[:8], a[:8]) - c.Encrypt(a[8:], a[8:]) - c, _ = NewCipher(a[:]) - c.Encrypt(b[:8], b[:8]) - c.Encrypt(b[8:], b[8:]) - } - - return a[:], b[:] -} - -func TestLimited(t *testing.T) { - a, b := iterate(1000) - - const expectedA = "23f73b14b02a2ad7dfb9f2c35644798d" - const expectedB = "e5bf37eff14c456a40b21ce369370a9f" - - if hex.EncodeToString(a) != expectedA { - t.Errorf("a: got:%x want:%s", a, expectedA) - } - if hex.EncodeToString(b) != expectedB { - t.Errorf("b: got:%x want:%s", b, expectedB) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305.go deleted file mode 100644 index 80789a1212..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2016 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 chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539. -package chacha20poly1305 - -import ( - "crypto/cipher" - "encoding/binary" - "errors" -) - -const ( - // KeySize is the size of the key used by this AEAD, in bytes. - KeySize = 32 - // NonceSize is the size of the nonce used with this AEAD, in bytes. - NonceSize = 12 -) - -type chacha20poly1305 struct { - key [8]uint32 -} - -// New returns a ChaCha20-Poly1305 AEAD that uses the given, 256-bit key. -func New(key []byte) (cipher.AEAD, error) { - if len(key) != KeySize { - return nil, errors.New("chacha20poly1305: bad key length") - } - ret := new(chacha20poly1305) - ret.key[0] = binary.LittleEndian.Uint32(key[0:4]) - ret.key[1] = binary.LittleEndian.Uint32(key[4:8]) - ret.key[2] = binary.LittleEndian.Uint32(key[8:12]) - ret.key[3] = binary.LittleEndian.Uint32(key[12:16]) - ret.key[4] = binary.LittleEndian.Uint32(key[16:20]) - ret.key[5] = binary.LittleEndian.Uint32(key[20:24]) - ret.key[6] = binary.LittleEndian.Uint32(key[24:28]) - ret.key[7] = binary.LittleEndian.Uint32(key[28:32]) - return ret, nil -} - -func (c *chacha20poly1305) NonceSize() int { - return NonceSize -} - -func (c *chacha20poly1305) Overhead() int { - return 16 -} - -func (c *chacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte { - if len(nonce) != NonceSize { - panic("chacha20poly1305: bad nonce length passed to Seal") - } - - if uint64(len(plaintext)) > (1<<38)-64 { - panic("chacha20poly1305: plaintext too large") - } - - return c.seal(dst, nonce, plaintext, additionalData) -} - -var errOpen = errors.New("chacha20poly1305: message authentication failed") - -func (c *chacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { - if len(nonce) != NonceSize { - panic("chacha20poly1305: bad nonce length passed to Open") - } - if len(ciphertext) < 16 { - return nil, errOpen - } - if uint64(len(ciphertext)) > (1<<38)-48 { - panic("chacha20poly1305: ciphertext too large") - } - - return c.open(dst, nonce, ciphertext, additionalData) -} - -// sliceForAppend takes a slice and a requested number of bytes. It returns a -// slice with the contents of the given slice followed by that many bytes and a -// second slice that aliases into it and contains only the extra bytes. If the -// original slice has sufficient capacity then no allocation is performed. -func sliceForAppend(in []byte, n int) (head, tail []byte) { - if total := len(in) + n; cap(in) >= total { - head = in[:total] - } else { - head = make([]byte, total) - copy(head, in) - } - tail = head[len(in):] - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.go deleted file mode 100644 index a0f09c6423..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2016 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. - -// +build go1.7,amd64,!gccgo,!appengine - -package chacha20poly1305 - -import ( - "encoding/binary" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/cpu" -) - -//go:noescape -func chacha20Poly1305Open(dst []byte, key []uint32, src, ad []byte) bool - -//go:noescape -func chacha20Poly1305Seal(dst []byte, key []uint32, src, ad []byte) - -var ( - useASM = cpu.X86.HasSSSE3 - useAVX2 = cpu.X86.HasAVX2 && cpu.X86.HasBMI2 -) - -// setupState writes a ChaCha20 input matrix to state. See -// https://tools.ietf.org/html/rfc7539#section-2.3. -func setupState(state *[16]uint32, key *[8]uint32, nonce []byte) { - state[0] = 0x61707865 - state[1] = 0x3320646e - state[2] = 0x79622d32 - state[3] = 0x6b206574 - - state[4] = key[0] - state[5] = key[1] - state[6] = key[2] - state[7] = key[3] - state[8] = key[4] - state[9] = key[5] - state[10] = key[6] - state[11] = key[7] - - state[12] = 0 - state[13] = binary.LittleEndian.Uint32(nonce[:4]) - state[14] = binary.LittleEndian.Uint32(nonce[4:8]) - state[15] = binary.LittleEndian.Uint32(nonce[8:12]) -} - -func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte { - if !useASM { - return c.sealGeneric(dst, nonce, plaintext, additionalData) - } - - var state [16]uint32 - setupState(&state, &c.key, nonce) - - ret, out := sliceForAppend(dst, len(plaintext)+16) - chacha20Poly1305Seal(out[:], state[:], plaintext, additionalData) - return ret -} - -func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { - if !useASM { - return c.openGeneric(dst, nonce, ciphertext, additionalData) - } - - var state [16]uint32 - setupState(&state, &c.key, nonce) - - ciphertext = ciphertext[:len(ciphertext)-16] - ret, out := sliceForAppend(dst, len(ciphertext)) - if !chacha20Poly1305Open(out, state[:], ciphertext, additionalData) { - for i := range out { - out[i] = 0 - } - return nil, errOpen - } - - return ret, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.s deleted file mode 100644 index af76bbcc93..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_amd64.s +++ /dev/null @@ -1,2695 +0,0 @@ -// Copyright 2016 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. - -// This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare. - -// +build go1.7,amd64,!gccgo,!appengine - -#include "textflag.h" -// General register allocation -#define oup DI -#define inp SI -#define inl BX -#define adp CX // free to reuse, after we hash the additional data -#define keyp R8 // free to reuse, when we copy the key to stack -#define itr2 R9 // general iterator -#define itr1 CX // general iterator -#define acc0 R10 -#define acc1 R11 -#define acc2 R12 -#define t0 R13 -#define t1 R14 -#define t2 R15 -#define t3 R8 -// Register and stack allocation for the SSE code -#define rStore (0*16)(BP) -#define sStore (1*16)(BP) -#define state1Store (2*16)(BP) -#define state2Store (3*16)(BP) -#define tmpStore (4*16)(BP) -#define ctr0Store (5*16)(BP) -#define ctr1Store (6*16)(BP) -#define ctr2Store (7*16)(BP) -#define ctr3Store (8*16)(BP) -#define A0 X0 -#define A1 X1 -#define A2 X2 -#define B0 X3 -#define B1 X4 -#define B2 X5 -#define C0 X6 -#define C1 X7 -#define C2 X8 -#define D0 X9 -#define D1 X10 -#define D2 X11 -#define T0 X12 -#define T1 X13 -#define T2 X14 -#define T3 X15 -#define A3 T0 -#define B3 T1 -#define C3 T2 -#define D3 T3 -// Register and stack allocation for the AVX2 code -#define rsStoreAVX2 (0*32)(BP) -#define state1StoreAVX2 (1*32)(BP) -#define state2StoreAVX2 (2*32)(BP) -#define ctr0StoreAVX2 (3*32)(BP) -#define ctr1StoreAVX2 (4*32)(BP) -#define ctr2StoreAVX2 (5*32)(BP) -#define ctr3StoreAVX2 (6*32)(BP) -#define tmpStoreAVX2 (7*32)(BP) // 256 bytes on stack -#define AA0 Y0 -#define AA1 Y5 -#define AA2 Y6 -#define AA3 Y7 -#define BB0 Y14 -#define BB1 Y9 -#define BB2 Y10 -#define BB3 Y11 -#define CC0 Y12 -#define CC1 Y13 -#define CC2 Y8 -#define CC3 Y15 -#define DD0 Y4 -#define DD1 Y1 -#define DD2 Y2 -#define DD3 Y3 -#define TT0 DD3 -#define TT1 AA3 -#define TT2 BB3 -#define TT3 CC3 -// ChaCha20 constants -DATA ·chacha20Constants<>+0x00(SB)/4, $0x61707865 -DATA ·chacha20Constants<>+0x04(SB)/4, $0x3320646e -DATA ·chacha20Constants<>+0x08(SB)/4, $0x79622d32 -DATA ·chacha20Constants<>+0x0c(SB)/4, $0x6b206574 -DATA ·chacha20Constants<>+0x10(SB)/4, $0x61707865 -DATA ·chacha20Constants<>+0x14(SB)/4, $0x3320646e -DATA ·chacha20Constants<>+0x18(SB)/4, $0x79622d32 -DATA ·chacha20Constants<>+0x1c(SB)/4, $0x6b206574 -// <<< 16 with PSHUFB -DATA ·rol16<>+0x00(SB)/8, $0x0504070601000302 -DATA ·rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A -DATA ·rol16<>+0x10(SB)/8, $0x0504070601000302 -DATA ·rol16<>+0x18(SB)/8, $0x0D0C0F0E09080B0A -// <<< 8 with PSHUFB -DATA ·rol8<>+0x00(SB)/8, $0x0605040702010003 -DATA ·rol8<>+0x08(SB)/8, $0x0E0D0C0F0A09080B -DATA ·rol8<>+0x10(SB)/8, $0x0605040702010003 -DATA ·rol8<>+0x18(SB)/8, $0x0E0D0C0F0A09080B - -DATA ·avx2InitMask<>+0x00(SB)/8, $0x0 -DATA ·avx2InitMask<>+0x08(SB)/8, $0x0 -DATA ·avx2InitMask<>+0x10(SB)/8, $0x1 -DATA ·avx2InitMask<>+0x18(SB)/8, $0x0 - -DATA ·avx2IncMask<>+0x00(SB)/8, $0x2 -DATA ·avx2IncMask<>+0x08(SB)/8, $0x0 -DATA ·avx2IncMask<>+0x10(SB)/8, $0x2 -DATA ·avx2IncMask<>+0x18(SB)/8, $0x0 -// Poly1305 key clamp -DATA ·polyClampMask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·polyClampMask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -DATA ·polyClampMask<>+0x10(SB)/8, $0xFFFFFFFFFFFFFFFF -DATA ·polyClampMask<>+0x18(SB)/8, $0xFFFFFFFFFFFFFFFF - -DATA ·sseIncMask<>+0x00(SB)/8, $0x1 -DATA ·sseIncMask<>+0x08(SB)/8, $0x0 -// To load/store the last < 16 bytes in a buffer -DATA ·andMask<>+0x00(SB)/8, $0x00000000000000ff -DATA ·andMask<>+0x08(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x10(SB)/8, $0x000000000000ffff -DATA ·andMask<>+0x18(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x20(SB)/8, $0x0000000000ffffff -DATA ·andMask<>+0x28(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x30(SB)/8, $0x00000000ffffffff -DATA ·andMask<>+0x38(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x40(SB)/8, $0x000000ffffffffff -DATA ·andMask<>+0x48(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x50(SB)/8, $0x0000ffffffffffff -DATA ·andMask<>+0x58(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x60(SB)/8, $0x00ffffffffffffff -DATA ·andMask<>+0x68(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x70(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x78(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x80(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x88(SB)/8, $0x00000000000000ff -DATA ·andMask<>+0x90(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x98(SB)/8, $0x000000000000ffff -DATA ·andMask<>+0xa0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xa8(SB)/8, $0x0000000000ffffff -DATA ·andMask<>+0xb0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xb8(SB)/8, $0x00000000ffffffff -DATA ·andMask<>+0xc0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xc8(SB)/8, $0x000000ffffffffff -DATA ·andMask<>+0xd0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xd8(SB)/8, $0x0000ffffffffffff -DATA ·andMask<>+0xe0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xe8(SB)/8, $0x00ffffffffffffff - -GLOBL ·chacha20Constants<>(SB), (NOPTR+RODATA), $32 -GLOBL ·rol16<>(SB), (NOPTR+RODATA), $32 -GLOBL ·rol8<>(SB), (NOPTR+RODATA), $32 -GLOBL ·sseIncMask<>(SB), (NOPTR+RODATA), $16 -GLOBL ·avx2IncMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·avx2InitMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·polyClampMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·andMask<>(SB), (NOPTR+RODATA), $240 -// No PALIGNR in Go ASM yet (but VPALIGNR is present). -#define shiftB0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X3, X3 -#define shiftB1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x04 // PALIGNR $4, X4, X4 -#define shiftB2Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X5, X5 -#define shiftB3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X13, X13 -#define shiftC0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X6, X6 -#define shiftC1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x08 // PALIGNR $8, X7, X7 -#define shiftC2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc0; BYTE $0x08 // PALIGNR $8, X8, X8 -#define shiftC3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X14, X14 -#define shiftD0Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x0c // PALIGNR $12, X9, X9 -#define shiftD1Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x0c // PALIGNR $12, X10, X10 -#define shiftD2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X11, X11 -#define shiftD3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x0c // PALIGNR $12, X15, X15 -#define shiftB0Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X3, X3 -#define shiftB1Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x0c // PALIGNR $12, X4, X4 -#define shiftB2Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X5, X5 -#define shiftB3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X13, X13 -#define shiftC0Right shiftC0Left -#define shiftC1Right shiftC1Left -#define shiftC2Right shiftC2Left -#define shiftC3Right shiftC3Left -#define shiftD0Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x04 // PALIGNR $4, X9, X9 -#define shiftD1Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x04 // PALIGNR $4, X10, X10 -#define shiftD2Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X11, X11 -#define shiftD3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x04 // PALIGNR $4, X15, X15 -// Some macros -#define chachaQR(A, B, C, D, T) \ - PADDD B, A; PXOR A, D; PSHUFB ·rol16<>(SB), D \ - PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $12, T; PSRLL $20, B; PXOR T, B \ - PADDD B, A; PXOR A, D; PSHUFB ·rol8<>(SB), D \ - PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $7, T; PSRLL $25, B; PXOR T, B - -#define chachaQR_AVX2(A, B, C, D, T) \ - VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol16<>(SB), D, D \ - VPADDD D, C, C; VPXOR C, B, B; VPSLLD $12, B, T; VPSRLD $20, B, B; VPXOR T, B, B \ - VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol8<>(SB), D, D \ - VPADDD D, C, C; VPXOR C, B, B; VPSLLD $7, B, T; VPSRLD $25, B, B; VPXOR T, B, B - -#define polyAdd(S) ADDQ S, acc0; ADCQ 8+S, acc1; ADCQ $1, acc2 -#define polyMulStage1 MOVQ (0*8)(BP), AX; MOVQ AX, t2; MULQ acc0; MOVQ AX, t0; MOVQ DX, t1; MOVQ (0*8)(BP), AX; MULQ acc1; IMULQ acc2, t2; ADDQ AX, t1; ADCQ DX, t2 -#define polyMulStage2 MOVQ (1*8)(BP), AX; MOVQ AX, t3; MULQ acc0; ADDQ AX, t1; ADCQ $0, DX; MOVQ DX, acc0; MOVQ (1*8)(BP), AX; MULQ acc1; ADDQ AX, t2; ADCQ $0, DX -#define polyMulStage3 IMULQ acc2, t3; ADDQ acc0, t2; ADCQ DX, t3 -#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t2:t3; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2 - -#define polyMulStage1_AVX2 MOVQ (0*8)(BP), DX; MOVQ DX, t2; MULXQ acc0, t0, t1; IMULQ acc2, t2; MULXQ acc1, AX, DX; ADDQ AX, t1; ADCQ DX, t2 -#define polyMulStage2_AVX2 MOVQ (1*8)(BP), DX; MULXQ acc0, acc0, AX; ADDQ acc0, t1; MULXQ acc1, acc1, t3; ADCQ acc1, t2; ADCQ $0, t3 -#define polyMulStage3_AVX2 IMULQ acc2, DX; ADDQ AX, t2; ADCQ DX, t3 - -#define polyMul polyMulStage1; polyMulStage2; polyMulStage3; polyMulReduceStage -#define polyMulAVX2 polyMulStage1_AVX2; polyMulStage2_AVX2; polyMulStage3_AVX2; polyMulReduceStage -// ---------------------------------------------------------------------------- -TEXT polyHashADInternal<>(SB), NOSPLIT, $0 - // adp points to beginning of additional data - // itr2 holds ad length - XORQ acc0, acc0 - XORQ acc1, acc1 - XORQ acc2, acc2 - CMPQ itr2, $13 - JNE hashADLoop - -openFastTLSAD: - // Special treatment for the TLS case of 13 bytes - MOVQ (adp), acc0 - MOVQ 5(adp), acc1 - SHRQ $24, acc1 - MOVQ $1, acc2 - polyMul - RET - -hashADLoop: - // Hash in 16 byte chunks - CMPQ itr2, $16 - JB hashADTail - polyAdd(0(adp)) - LEAQ (1*16)(adp), adp - SUBQ $16, itr2 - polyMul - JMP hashADLoop - -hashADTail: - CMPQ itr2, $0 - JE hashADDone - - // Hash last < 16 byte tail - XORQ t0, t0 - XORQ t1, t1 - XORQ t2, t2 - ADDQ itr2, adp - -hashADTailLoop: - SHLQ $8, t1:t0 - SHLQ $8, t0 - MOVB -1(adp), t2 - XORQ t2, t0 - DECQ adp - DECQ itr2 - JNE hashADTailLoop - -hashADTailFinish: - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - - // Finished AD -hashADDone: - RET - -// ---------------------------------------------------------------------------- -// func chacha20Poly1305Open(dst, key, src, ad []byte) bool -TEXT ·chacha20Poly1305Open(SB), 0, $288-97 - // For aligned stack access - MOVQ SP, BP - ADDQ $32, BP - ANDQ $-32, BP - MOVQ dst+0(FP), oup - MOVQ key+24(FP), keyp - MOVQ src+48(FP), inp - MOVQ src_len+56(FP), inl - MOVQ ad+72(FP), adp - - // Check for AVX2 support - CMPB ·useAVX2(SB), $1 - JE chacha20Poly1305Open_AVX2 - - // Special optimization, for very short buffers - CMPQ inl, $128 - JBE openSSE128 // About 16% faster - - // For long buffers, prepare the poly key first - MOVOU ·chacha20Constants<>(SB), A0 - MOVOU (1*16)(keyp), B0 - MOVOU (2*16)(keyp), C0 - MOVOU (3*16)(keyp), D0 - MOVO D0, T1 - - // Store state on stack for future use - MOVO B0, state1Store - MOVO C0, state2Store - MOVO D0, ctr3Store - MOVQ $10, itr2 - -openSSEPreparePolyKey: - chachaQR(A0, B0, C0, D0, T0) - shiftB0Left; shiftC0Left; shiftD0Left - chachaQR(A0, B0, C0, D0, T0) - shiftB0Right; shiftC0Right; shiftD0Right - DECQ itr2 - JNE openSSEPreparePolyKey - - // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0 - - // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVO A0, rStore; MOVO B0, sStore - - // Hash AAD - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - -openSSEMainLoop: - CMPQ inl, $256 - JB openSSEMainLoopDone - - // Load state, increment counter blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 - - // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - - // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash 2 blocks, and for the remaining 4 only 1 block - for a total of 16 - MOVQ $4, itr1 - MOVQ inp, itr2 - -openSSEInternalLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyAdd(0(itr2)) - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - LEAQ (2*8)(itr2), itr2 - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - polyMulStage3 - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr1 - JGE openSSEInternalLoop - - polyAdd(0(itr2)) - polyMul - LEAQ (2*8)(itr2), itr2 - - CMPQ itr1, $-6 - JG openSSEInternalLoop - - // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - - // Load - xor - store - MOVO D3, tmpStore - MOVOU (0*16)(inp), D3; PXOR D3, A0; MOVOU A0, (0*16)(oup) - MOVOU (1*16)(inp), D3; PXOR D3, B0; MOVOU B0, (1*16)(oup) - MOVOU (2*16)(inp), D3; PXOR D3, C0; MOVOU C0, (2*16)(oup) - MOVOU (3*16)(inp), D3; PXOR D3, D0; MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), D0; PXOR D0, A1; MOVOU A1, (4*16)(oup) - MOVOU (5*16)(inp), D0; PXOR D0, B1; MOVOU B1, (5*16)(oup) - MOVOU (6*16)(inp), D0; PXOR D0, C1; MOVOU C1, (6*16)(oup) - MOVOU (7*16)(inp), D0; PXOR D0, D1; MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), D0; PXOR D0, A2; MOVOU A2, (8*16)(oup) - MOVOU (9*16)(inp), D0; PXOR D0, B2; MOVOU B2, (9*16)(oup) - MOVOU (10*16)(inp), D0; PXOR D0, C2; MOVOU C2, (10*16)(oup) - MOVOU (11*16)(inp), D0; PXOR D0, D2; MOVOU D2, (11*16)(oup) - MOVOU (12*16)(inp), D0; PXOR D0, A3; MOVOU A3, (12*16)(oup) - MOVOU (13*16)(inp), D0; PXOR D0, B3; MOVOU B3, (13*16)(oup) - MOVOU (14*16)(inp), D0; PXOR D0, C3; MOVOU C3, (14*16)(oup) - MOVOU (15*16)(inp), D0; PXOR tmpStore, D0; MOVOU D0, (15*16)(oup) - LEAQ 256(inp), inp - LEAQ 256(oup), oup - SUBQ $256, inl - JMP openSSEMainLoop - -openSSEMainLoopDone: - // Handle the various tail sizes efficiently - TESTQ inl, inl - JE openSSEFinalize - CMPQ inl, $64 - JBE openSSETail64 - CMPQ inl, $128 - JBE openSSETail128 - CMPQ inl, $192 - JBE openSSETail192 - JMP openSSETail256 - -openSSEFinalize: - // Hash in the PT, AAD lengths - ADDQ ad_len+80(FP), acc0; ADCQ src_len+56(FP), acc1; ADCQ $1, acc2 - polyMul - - // Final reduce - MOVQ acc0, t0 - MOVQ acc1, t1 - MOVQ acc2, t2 - SUBQ $-5, acc0 - SBBQ $-1, acc1 - SBBQ $3, acc2 - CMOVQCS t0, acc0 - CMOVQCS t1, acc1 - CMOVQCS t2, acc2 - - // Add in the "s" part of the key - ADDQ 0+sStore, acc0 - ADCQ 8+sStore, acc1 - - // Finally, constant time compare to the tag at the end of the message - XORQ AX, AX - MOVQ $1, DX - XORQ (0*8)(inp), acc0 - XORQ (1*8)(inp), acc1 - ORQ acc1, acc0 - CMOVQEQ DX, AX - - // Return true iff tags are equal - MOVB AX, ret+96(FP) - RET - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 129 bytes -openSSE128: - // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks - MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO B0, T1; MOVO C0, T2; MOVO D1, T3 - MOVQ $10, itr2 - -openSSE128InnerCipherLoop: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftB1Left; shiftB2Left - shiftC0Left; shiftC1Left; shiftC2Left - shiftD0Left; shiftD1Left; shiftD2Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftB1Right; shiftB2Right - shiftC0Right; shiftC1Right; shiftC2Right - shiftD0Right; shiftD1Right; shiftD2Right - DECQ itr2 - JNE openSSE128InnerCipherLoop - - // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL T1, B0; PADDL T1, B1; PADDL T1, B2 - PADDL T2, C1; PADDL T2, C2 - PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2 - - // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVOU A0, rStore; MOVOU B0, sStore - - // Hash - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - -openSSE128Open: - CMPQ inl, $16 - JB openSSETail16 - SUBQ $16, inl - - // Load for hashing - polyAdd(0(inp)) - - // Load for decryption - MOVOU (inp), T0; PXOR T0, A1; MOVOU A1, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - polyMul - - // Shift the stream "left" - MOVO B1, A1 - MOVO C1, B1 - MOVO D1, C1 - MOVO A2, D1 - MOVO B2, A2 - MOVO C2, B2 - MOVO D2, C2 - JMP openSSE128Open - -openSSETail16: - TESTQ inl, inl - JE openSSEFinalize - - // We can safely load the CT from the end, because it is padded with the MAC - MOVQ inl, itr2 - SHLQ $4, itr2 - LEAQ ·andMask<>(SB), t0 - MOVOU (inp), T0 - ADDQ inl, inp - PAND -16(t0)(itr2*1), T0 - MOVO T0, 0+tmpStore - MOVQ T0, t0 - MOVQ 8+tmpStore, t1 - PXOR A1, T0 - - // We can only store one byte at a time, since plaintext can be shorter than 16 bytes -openSSETail16Store: - MOVQ T0, t3 - MOVB t3, (oup) - PSRLDQ $1, T0 - INCQ oup - DECQ inl - JNE openSSETail16Store - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - JMP openSSEFinalize - -// ---------------------------------------------------------------------------- -// Special optimization for the last 64 bytes of ciphertext -openSSETail64: - // Need to decrypt up to 64 bytes - prepare single block - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - XORQ itr2, itr2 - MOVQ inl, itr1 - CMPQ itr1, $16 - JB openSSETail64LoopB - -openSSETail64LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul - SUBQ $16, itr1 - -openSSETail64LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0) - shiftB0Left; shiftC0Left; shiftD0Left - chachaQR(A0, B0, C0, D0, T0) - shiftB0Right; shiftC0Right; shiftD0Right - - CMPQ itr1, $16 - JAE openSSETail64LoopA - - CMPQ itr2, $160 - JNE openSSETail64LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0; PADDL state2Store, C0; PADDL ctr0Store, D0 - -openSSETail64DecLoop: - CMPQ inl, $16 - JB openSSETail64DecLoopDone - SUBQ $16, inl - MOVOU (inp), T0 - PXOR T0, A0 - MOVOU A0, (oup) - LEAQ 16(inp), inp - LEAQ 16(oup), oup - MOVO B0, A0 - MOVO C0, B0 - MOVO D0, C0 - JMP openSSETail64DecLoop - -openSSETail64DecLoopDone: - MOVO A0, A1 - JMP openSSETail16 - -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext -openSSETail128: - // Need to decrypt up to 128 bytes - prepare two blocks - MOVO ·chacha20Constants<>(SB), A1; MOVO state1Store, B1; MOVO state2Store, C1; MOVO ctr3Store, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr0Store - MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr1Store - XORQ itr2, itr2 - MOVQ inl, itr1 - ANDQ $-16, itr1 - -openSSETail128LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul - -openSSETail128LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - - CMPQ itr2, itr1 - JB openSSETail128LoopA - - CMPQ itr2, $160 - JNE openSSETail128LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B0; PADDL state1Store, B1 - PADDL state2Store, C0; PADDL state2Store, C1 - PADDL ctr1Store, D0; PADDL ctr0Store, D1 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup) - - SUBQ $64, inl - LEAQ 64(inp), inp - LEAQ 64(oup), oup - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 192 bytes of ciphertext -openSSETail192: - // Need to decrypt up to 192 bytes - prepare three blocks - MOVO ·chacha20Constants<>(SB), A2; MOVO state1Store, B2; MOVO state2Store, C2; MOVO ctr3Store, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr0Store - MOVO A2, A1; MOVO B2, B1; MOVO C2, C1; MOVO D2, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store - MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr2Store - - MOVQ inl, itr1 - MOVQ $160, itr2 - CMPQ itr1, $160 - CMOVQGT itr2, itr1 - ANDQ $-16, itr1 - XORQ itr2, itr2 - -openSSLTail192LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul - -openSSLTail192LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - shiftB2Left; shiftC2Left; shiftD2Left - - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - shiftB2Right; shiftC2Right; shiftD2Right - - CMPQ itr2, itr1 - JB openSSLTail192LoopA - - CMPQ itr2, $160 - JNE openSSLTail192LoopB - - CMPQ inl, $176 - JB openSSLTail192Store - - polyAdd(160(inp)) - polyMul - - CMPQ inl, $192 - JB openSSLTail192Store - - polyAdd(176(inp)) - polyMul - -openSSLTail192Store: - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2 - PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2 - PADDL ctr2Store, D0; PADDL ctr1Store, D1; PADDL ctr0Store, D2 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A2; PXOR T1, B2; PXOR T2, C2; PXOR T3, D2 - MOVOU A2, (0*16)(oup); MOVOU B2, (1*16)(oup); MOVOU C2, (2*16)(oup); MOVOU D2, (3*16)(oup) - - MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - - SUBQ $128, inl - LEAQ 128(inp), inp - LEAQ 128(oup), oup - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext -openSSETail256: - // Need to decrypt up to 256 bytes - prepare four blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 - - // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - XORQ itr2, itr2 - -openSSETail256Loop: - // This loop inteleaves 8 ChaCha quarter rounds with 1 poly multiplication - polyAdd(0(inp)(itr2*1)) - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulStage3 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - ADDQ $2*8, itr2 - CMPQ itr2, $160 - JB openSSETail256Loop - MOVQ inl, itr1 - ANDQ $-16, itr1 - -openSSETail256HashLoop: - polyAdd(0(inp)(itr2*1)) - polyMul - ADDQ $2*8, itr2 - CMPQ itr2, itr1 - JB openSSETail256HashLoop - - // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - MOVO D3, tmpStore - - // Load - xor - store - MOVOU (0*16)(inp), D3; PXOR D3, A0 - MOVOU (1*16)(inp), D3; PXOR D3, B0 - MOVOU (2*16)(inp), D3; PXOR D3, C0 - MOVOU (3*16)(inp), D3; PXOR D3, D0 - MOVOU A0, (0*16)(oup) - MOVOU B0, (1*16)(oup) - MOVOU C0, (2*16)(oup) - MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup) - LEAQ 192(inp), inp - LEAQ 192(oup), oup - SUBQ $192, inl - MOVO A3, A0 - MOVO B3, B0 - MOVO C3, C0 - MOVO tmpStore, D0 - - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// ------------------------- AVX2 Code ---------------------------------------- -chacha20Poly1305Open_AVX2: - VZEROUPPER - VMOVDQU ·chacha20Constants<>(SB), AA0 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12 - BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4 - VPADDD ·avx2InitMask<>(SB), DD0, DD0 - - // Special optimization, for very short buffers - CMPQ inl, $192 - JBE openAVX2192 - CMPQ inl, $320 - JBE openAVX2320 - - // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream - VMOVDQA BB0, state1StoreAVX2 - VMOVDQA CC0, state2StoreAVX2 - VMOVDQA DD0, ctr3StoreAVX2 - MOVQ $10, itr2 - -openAVX2PreparePolyKey: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - DECQ itr2 - JNE openAVX2PreparePolyKey - - VPADDD ·chacha20Constants<>(SB), AA0, AA0 - VPADDD state1StoreAVX2, BB0, BB0 - VPADDD state2StoreAVX2, CC0, CC0 - VPADDD ctr3StoreAVX2, DD0, DD0 - - VPERM2I128 $0x02, AA0, BB0, TT0 - - // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 - - // Stream for the first 64 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - - // Hash AD + first 64 bytes - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 - -openAVX2InitialHash64: - polyAdd(0(inp)(itr1*1)) - polyMulAVX2 - ADDQ $16, itr1 - CMPQ itr1, $64 - JNE openAVX2InitialHash64 - - // Decrypt the first 64 bytes - VPXOR (0*32)(inp), AA0, AA0 - VPXOR (1*32)(inp), BB0, BB0 - VMOVDQU AA0, (0*32)(oup) - VMOVDQU BB0, (1*32)(oup) - LEAQ (2*32)(inp), inp - LEAQ (2*32)(oup), oup - SUBQ $64, inl - -openAVX2MainLoop: - CMPQ inl, $512 - JB openAVX2MainLoopDone - - // Load state, increment counter blocks, store the incremented counters - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - XORQ itr1, itr1 - -openAVX2InternalLoop: - // Lets just say this spaghetti loop interleaves 2 quarter rounds with 3 poly multiplications - // Effectively per 512 bytes of stream we hash 480 bytes of ciphertext - polyAdd(0*8(inp)(itr1*1)) - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage1_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulStage2_AVX2 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyMulStage3_AVX2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - polyAdd(2*8(inp)(itr1*1)) - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage1_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage2_AVX2 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage3_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulReduceStage - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(4*8(inp)(itr1*1)) - LEAQ (6*8)(itr1), itr1 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage1_AVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - polyMulStage2_AVX2 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage3_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - CMPQ itr1, $480 - JNE openAVX2InternalLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - - // We only hashed 480 of the 512 bytes available - hash the remaining 32 here - polyAdd(480(inp)) - polyMulAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - - // and here - polyAdd(496(inp)) - polyMulAVX2 - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0 - VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup) - LEAQ (32*16)(inp), inp - LEAQ (32*16)(oup), oup - SUBQ $(32*16), inl - JMP openAVX2MainLoop - -openAVX2MainLoopDone: - // Handle the various tail sizes efficiently - TESTQ inl, inl - JE openSSEFinalize - CMPQ inl, $128 - JBE openAVX2Tail128 - CMPQ inl, $256 - JBE openAVX2Tail256 - CMPQ inl, $384 - JBE openAVX2Tail384 - JMP openAVX2Tail512 - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 193 bytes -openAVX2192: - // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks - VMOVDQA AA0, AA1 - VMOVDQA BB0, BB1 - VMOVDQA CC0, CC1 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2 - VMOVDQA BB0, BB2 - VMOVDQA CC0, CC2 - VMOVDQA DD0, DD2 - VMOVDQA DD1, TT3 - MOVQ $10, itr2 - -openAVX2192InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr2 - JNE openAVX2192InnerCipherLoop - VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1 - VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1 - VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1 - VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 - - // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 - - // Stream for up to 192 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - -openAVX2ShortOpen: - // Hash - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - -openAVX2ShortOpenLoop: - CMPQ inl, $32 - JB openAVX2ShortTail32 - SUBQ $32, inl - - // Load for hashing - polyAdd(0*8(inp)) - polyMulAVX2 - polyAdd(2*8(inp)) - polyMulAVX2 - - // Load for decryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp - LEAQ (1*32)(oup), oup - - // Shift stream left - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 - VMOVDQA AA1, DD0 - VMOVDQA BB1, AA1 - VMOVDQA CC1, BB1 - VMOVDQA DD1, CC1 - VMOVDQA AA2, DD1 - VMOVDQA BB2, AA2 - JMP openAVX2ShortOpenLoop - -openAVX2ShortTail32: - CMPQ inl, $16 - VMOVDQA A0, A1 - JB openAVX2ShortDone - - SUBQ $16, inl - - // Load for hashing - polyAdd(0*8(inp)) - polyMulAVX2 - - // Load for decryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 - -openAVX2ShortDone: - VZEROUPPER - JMP openSSETail16 - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 321 bytes -openAVX2320: - // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks - VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3 - MOVQ $10, itr2 - -openAVX2320InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr2 - JNE openAVX2320InnerCipherLoop - - VMOVDQA ·chacha20Constants<>(SB), TT0 - VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2 - VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2 - VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2 - VMOVDQA ·avx2IncMask<>(SB), TT0 - VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD2, DD2 - - // Clamp and store poly key - VPERM2I128 $0x02, AA0, BB0, TT0 - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 - - // Stream for up to 320 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - VPERM2I128 $0x02, AA2, BB2, CC1 - VPERM2I128 $0x02, CC2, DD2, DD1 - VPERM2I128 $0x13, AA2, BB2, AA2 - VPERM2I128 $0x13, CC2, DD2, BB2 - JMP openAVX2ShortOpen - -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext -openAVX2Tail128: - // Need to decrypt up to 128 bytes - prepare two blocks - VMOVDQA ·chacha20Constants<>(SB), AA1 - VMOVDQA state1StoreAVX2, BB1 - VMOVDQA state2StoreAVX2, CC1 - VMOVDQA ctr3StoreAVX2, DD1 - VPADDD ·avx2IncMask<>(SB), DD1, DD1 - VMOVDQA DD1, DD0 - - XORQ itr2, itr2 - MOVQ inl, itr1 - ANDQ $-16, itr1 - TESTQ itr1, itr1 - JE openAVX2Tail128LoopB - -openAVX2Tail128LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMulAVX2 - -openAVX2Tail128LoopB: - ADDQ $16, itr2 - chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD1, DD1, DD1 - CMPQ itr2, itr1 - JB openAVX2Tail128LoopA - CMPQ itr2, $160 - JNE openAVX2Tail128LoopB - - VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC1, CC1 - VPADDD DD0, DD1, DD1 - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - -openAVX2TailLoop: - CMPQ inl, $32 - JB openAVX2Tail - SUBQ $32, inl - - // Load for decryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp - LEAQ (1*32)(oup), oup - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 - JMP openAVX2TailLoop - -openAVX2Tail: - CMPQ inl, $16 - VMOVDQA A0, A1 - JB openAVX2TailDone - SUBQ $16, inl - - // Load for decryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 - -openAVX2TailDone: - VZEROUPPER - JMP openSSETail16 - -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext -openAVX2Tail256: - // Need to decrypt up to 256 bytes - prepare four blocks - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA DD0, TT1 - VMOVDQA DD1, TT2 - - // Compute the number of iterations that will hash data - MOVQ inl, tmpStoreAVX2 - MOVQ inl, itr1 - SUBQ $128, itr1 - SHRQ $4, itr1 - MOVQ $10, itr2 - CMPQ itr1, $10 - CMOVQGT itr2, itr1 - MOVQ inp, inl - XORQ itr2, itr2 - -openAVX2Tail256LoopA: - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl - - // Perform ChaCha rounds, while hashing the remaining input -openAVX2Tail256LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - INCQ itr2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - CMPQ itr2, itr1 - JB openAVX2Tail256LoopA - - CMPQ itr2, $10 - JNE openAVX2Tail256LoopB - - MOVQ inl, itr2 - SUBQ inp, inl - MOVQ inl, itr1 - MOVQ tmpStoreAVX2, inl - - // Hash the remainder of data (if any) -openAVX2Tail256Hash: - ADDQ $16, itr1 - CMPQ itr1, inl - JGT openAVX2Tail256HashEnd - polyAdd (0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - JMP openAVX2Tail256Hash - -// Store 128 bytes safely, then go to store loop -openAVX2Tail256HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, AA2; VPERM2I128 $0x02, CC0, DD0, BB2; VPERM2I128 $0x13, AA0, BB0, CC2; VPERM2I128 $0x13, CC0, DD0, DD2 - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - - VPXOR (0*32)(inp), AA2, AA2; VPXOR (1*32)(inp), BB2, BB2; VPXOR (2*32)(inp), CC2, CC2; VPXOR (3*32)(inp), DD2, DD2 - VMOVDQU AA2, (0*32)(oup); VMOVDQU BB2, (1*32)(oup); VMOVDQU CC2, (2*32)(oup); VMOVDQU DD2, (3*32)(oup) - LEAQ (4*32)(inp), inp - LEAQ (4*32)(oup), oup - SUBQ $4*32, inl - - JMP openAVX2TailLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 384 bytes of ciphertext -openAVX2Tail384: - // Need to decrypt up to 384 bytes - prepare six blocks - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA DD0, ctr0StoreAVX2 - VMOVDQA DD1, ctr1StoreAVX2 - VMOVDQA DD2, ctr2StoreAVX2 - - // Compute the number of iterations that will hash two blocks of data - MOVQ inl, tmpStoreAVX2 - MOVQ inl, itr1 - SUBQ $256, itr1 - SHRQ $4, itr1 - ADDQ $6, itr1 - MOVQ $10, itr2 - CMPQ itr1, $10 - CMOVQGT itr2, itr1 - MOVQ inp, inl - XORQ itr2, itr2 - - // Perform ChaCha rounds, while hashing the remaining input -openAVX2Tail384LoopB: - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl - -openAVX2Tail384LoopA: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl - INCQ itr2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - - CMPQ itr2, itr1 - JB openAVX2Tail384LoopB - - CMPQ itr2, $10 - JNE openAVX2Tail384LoopA - - MOVQ inl, itr2 - SUBQ inp, inl - MOVQ inl, itr1 - MOVQ tmpStoreAVX2, inl - -openAVX2Tail384Hash: - ADDQ $16, itr1 - CMPQ itr1, inl - JGT openAVX2Tail384HashEnd - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - JMP openAVX2Tail384Hash - -// Store 256 bytes safely, then go to store loop -openAVX2Tail384HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2 - VPERM2I128 $0x02, AA0, BB0, TT0; VPERM2I128 $0x02, CC0, DD0, TT1; VPERM2I128 $0x13, AA0, BB0, TT2; VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, TT0; VPERM2I128 $0x02, CC1, DD1, TT1; VPERM2I128 $0x13, AA1, BB1, TT2; VPERM2I128 $0x13, CC1, DD1, TT3 - VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3 - VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - LEAQ (8*32)(inp), inp - LEAQ (8*32)(oup), oup - SUBQ $8*32, inl - JMP openAVX2TailLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 512 bytes of ciphertext -openAVX2Tail512: - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - XORQ itr1, itr1 - MOVQ inp, itr2 - -openAVX2Tail512LoopB: - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ (2*8)(itr2), itr2 - -openAVX2Tail512LoopA: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyAdd(0*8(itr2)) - polyMulAVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(2*8(itr2)) - polyMulAVX2 - LEAQ (4*8)(itr2), itr2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - INCQ itr1 - CMPQ itr1, $4 - JLT openAVX2Tail512LoopB - - CMPQ itr1, $10 - JNE openAVX2Tail512LoopA - - MOVQ inl, itr1 - SUBQ $384, itr1 - ANDQ $-16, itr1 - -openAVX2Tail512HashLoop: - TESTQ itr1, itr1 - JE openAVX2Tail512HashEnd - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - SUBQ $16, itr1 - JMP openAVX2Tail512HashLoop - -openAVX2Tail512HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - - LEAQ (12*32)(inp), inp - LEAQ (12*32)(oup), oup - SUBQ $12*32, inl - - JMP openAVX2TailLoop - -// ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- -// func chacha20Poly1305Seal(dst, key, src, ad []byte) -TEXT ·chacha20Poly1305Seal(SB), 0, $288-96 - // For aligned stack access - MOVQ SP, BP - ADDQ $32, BP - ANDQ $-32, BP - MOVQ dst+0(FP), oup - MOVQ key+24(FP), keyp - MOVQ src+48(FP), inp - MOVQ src_len+56(FP), inl - MOVQ ad+72(FP), adp - - CMPB ·useAVX2(SB), $1 - JE chacha20Poly1305Seal_AVX2 - - // Special optimization, for very short buffers - CMPQ inl, $128 - JBE sealSSE128 // About 15% faster - - // In the seal case - prepare the poly key + 3 blocks of stream in the first iteration - MOVOU ·chacha20Constants<>(SB), A0 - MOVOU (1*16)(keyp), B0 - MOVOU (2*16)(keyp), C0 - MOVOU (3*16)(keyp), D0 - - // Store state on stack for future use - MOVO B0, state1Store - MOVO C0, state2Store - - // Load state, increment counter blocks - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 - - // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - MOVQ $10, itr2 - -sealSSEIntroLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr2 - JNE sealSSEIntroLoop - - // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - - // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVO A0, rStore - MOVO B0, sStore - - // Hash AAD - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup) - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (4*16)(oup); MOVOU B2, (5*16)(oup); MOVOU C2, (6*16)(oup); MOVOU D2, (7*16)(oup) - - MOVQ $128, itr1 - SUBQ $128, inl - LEAQ 128(inp), inp - - MOVO A3, A1; MOVO B3, B1; MOVO C3, C1; MOVO D3, D1 - - CMPQ inl, $64 - JBE sealSSE128SealHash - - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3 - MOVOU A3, (8*16)(oup); MOVOU B3, (9*16)(oup); MOVOU C3, (10*16)(oup); MOVOU D3, (11*16)(oup) - - ADDQ $64, itr1 - SUBQ $64, inl - LEAQ 64(inp), inp - - MOVQ $2, itr1 - MOVQ $8, itr2 - - CMPQ inl, $64 - JBE sealSSETail64 - CMPQ inl, $128 - JBE sealSSETail128 - CMPQ inl, $192 - JBE sealSSETail192 - -sealSSEMainLoop: - // Load state, increment counter blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 - - // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - -sealSSEInnerLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyAdd(0(oup)) - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - LEAQ (2*8)(oup), oup - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - polyMulStage3 - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr2 - JGE sealSSEInnerLoop - polyAdd(0(oup)) - polyMul - LEAQ (2*8)(oup), oup - DECQ itr1 - JG sealSSEInnerLoop - - // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - MOVO D3, tmpStore - - // Load - xor - store - MOVOU (0*16)(inp), D3; PXOR D3, A0 - MOVOU (1*16)(inp), D3; PXOR D3, B0 - MOVOU (2*16)(inp), D3; PXOR D3, C0 - MOVOU (3*16)(inp), D3; PXOR D3, D0 - MOVOU A0, (0*16)(oup) - MOVOU B0, (1*16)(oup) - MOVOU C0, (2*16)(oup) - MOVOU D0, (3*16)(oup) - MOVO tmpStore, D3 - - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup) - ADDQ $192, inp - MOVQ $192, itr1 - SUBQ $192, inl - MOVO A3, A1 - MOVO B3, B1 - MOVO C3, C1 - MOVO D3, D1 - CMPQ inl, $64 - JBE sealSSE128SealHash - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3 - MOVOU A3, (12*16)(oup); MOVOU B3, (13*16)(oup); MOVOU C3, (14*16)(oup); MOVOU D3, (15*16)(oup) - LEAQ 64(inp), inp - SUBQ $64, inl - MOVQ $6, itr1 - MOVQ $4, itr2 - CMPQ inl, $192 - JG sealSSEMainLoop - - MOVQ inl, itr1 - TESTQ inl, inl - JE sealSSE128SealHash - MOVQ $6, itr1 - CMPQ inl, $64 - JBE sealSSETail64 - CMPQ inl, $128 - JBE sealSSETail128 - JMP sealSSETail192 - -// ---------------------------------------------------------------------------- -// Special optimization for the last 64 bytes of plaintext -sealSSETail64: - // Need to encrypt up to 64 bytes - prepare single block, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A1 - MOVO state1Store, B1 - MOVO state2Store, C1 - MOVO ctr3Store, D1 - PADDL ·sseIncMask<>(SB), D1 - MOVO D1, ctr0Store - -sealSSETail64LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealSSETail64LoopB: - chachaQR(A1, B1, C1, D1, T1) - shiftB1Left; shiftC1Left; shiftD1Left - chachaQR(A1, B1, C1, D1, T1) - shiftB1Right; shiftC1Right; shiftD1Right - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - - DECQ itr1 - JG sealSSETail64LoopA - - DECQ itr2 - JGE sealSSETail64LoopB - PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B1 - PADDL state2Store, C1 - PADDL ctr0Store, D1 - - JMP sealSSE128Seal - -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of plaintext -sealSSETail128: - // Need to encrypt up to 128 bytes - prepare two blocks, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store - -sealSSETail128LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealSSETail128LoopB: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - - DECQ itr1 - JG sealSSETail128LoopA - - DECQ itr2 - JGE sealSSETail128LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B0; PADDL state1Store, B1 - PADDL state2Store, C0; PADDL state2Store, C1 - PADDL ctr0Store, D0; PADDL ctr1Store, D1 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0 - MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup) - - MOVQ $64, itr1 - LEAQ 64(inp), inp - SUBQ $64, inl - - JMP sealSSE128SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 192 bytes of plaintext -sealSSETail192: - // Need to encrypt up to 192 bytes - prepare three blocks, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr2Store - -sealSSETail192LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealSSETail192LoopB: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - shiftB2Left; shiftC2Left; shiftD2Left - - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - shiftB2Right; shiftC2Right; shiftD2Right - - DECQ itr1 - JG sealSSETail192LoopA - - DECQ itr2 - JGE sealSSETail192LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2 - PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2 - PADDL ctr0Store, D0; PADDL ctr1Store, D1; PADDL ctr2Store, D2 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0 - MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - - MOVO A2, A1 - MOVO B2, B1 - MOVO C2, C1 - MOVO D2, D1 - MOVQ $128, itr1 - LEAQ 128(inp), inp - SUBQ $128, inl - - JMP sealSSE128SealHash - -// ---------------------------------------------------------------------------- -// Special seal optimization for buffers smaller than 129 bytes -sealSSE128: - // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks - MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO B0, T1; MOVO C0, T2; MOVO D1, T3 - MOVQ $10, itr2 - -sealSSE128InnerCipherLoop: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftB1Left; shiftB2Left - shiftC0Left; shiftC1Left; shiftC2Left - shiftD0Left; shiftD1Left; shiftD2Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftB1Right; shiftB2Right - shiftC0Right; shiftC1Right; shiftC2Right - shiftD0Right; shiftD1Right; shiftD2Right - DECQ itr2 - JNE sealSSE128InnerCipherLoop - - // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL T1, B0; PADDL T1, B1; PADDL T1, B2 - PADDL T2, C1; PADDL T2, C2 - PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2 - PAND ·polyClampMask<>(SB), A0 - MOVOU A0, rStore - MOVOU B0, sStore - - // Hash - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 - -sealSSE128SealHash: - // itr1 holds the number of bytes encrypted but not yet hashed - CMPQ itr1, $16 - JB sealSSE128Seal - polyAdd(0(oup)) - polyMul - - SUBQ $16, itr1 - ADDQ $16, oup - - JMP sealSSE128SealHash - -sealSSE128Seal: - CMPQ inl, $16 - JB sealSSETail - SUBQ $16, inl - - // Load for decryption - MOVOU (inp), T0 - PXOR T0, A1 - MOVOU A1, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - - // Extract for hashing - MOVQ A1, t0 - PSRLDQ $8, A1 - MOVQ A1, t1 - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - - // Shift the stream "left" - MOVO B1, A1 - MOVO C1, B1 - MOVO D1, C1 - MOVO A2, D1 - MOVO B2, A2 - MOVO C2, B2 - MOVO D2, C2 - JMP sealSSE128Seal - -sealSSETail: - TESTQ inl, inl - JE sealSSEFinalize - - // We can only load the PT one byte at a time to avoid read after end of buffer - MOVQ inl, itr2 - SHLQ $4, itr2 - LEAQ ·andMask<>(SB), t0 - MOVQ inl, itr1 - LEAQ -1(inp)(inl*1), inp - XORQ t2, t2 - XORQ t3, t3 - XORQ AX, AX - -sealSSETailLoadLoop: - SHLQ $8, t2, t3 - SHLQ $8, t2 - MOVB (inp), AX - XORQ AX, t2 - LEAQ -1(inp), inp - DECQ itr1 - JNE sealSSETailLoadLoop - MOVQ t2, 0+tmpStore - MOVQ t3, 8+tmpStore - PXOR 0+tmpStore, A1 - MOVOU A1, (oup) - MOVOU -16(t0)(itr2*1), T0 - PAND T0, A1 - MOVQ A1, t0 - PSRLDQ $8, A1 - MOVQ A1, t1 - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - - ADDQ inl, oup - -sealSSEFinalize: - // Hash in the buffer lengths - ADDQ ad_len+80(FP), acc0 - ADCQ src_len+56(FP), acc1 - ADCQ $1, acc2 - polyMul - - // Final reduce - MOVQ acc0, t0 - MOVQ acc1, t1 - MOVQ acc2, t2 - SUBQ $-5, acc0 - SBBQ $-1, acc1 - SBBQ $3, acc2 - CMOVQCS t0, acc0 - CMOVQCS t1, acc1 - CMOVQCS t2, acc2 - - // Add in the "s" part of the key - ADDQ 0+sStore, acc0 - ADCQ 8+sStore, acc1 - - // Finally store the tag at the end of the message - MOVQ acc0, (0*8)(oup) - MOVQ acc1, (1*8)(oup) - RET - -// ---------------------------------------------------------------------------- -// ------------------------- AVX2 Code ---------------------------------------- -chacha20Poly1305Seal_AVX2: - VZEROUPPER - VMOVDQU ·chacha20Constants<>(SB), AA0 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12 - BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4 - VPADDD ·avx2InitMask<>(SB), DD0, DD0 - - // Special optimizations, for very short buffers - CMPQ inl, $192 - JBE seal192AVX2 // 33% faster - CMPQ inl, $320 - JBE seal320AVX2 // 17% faster - - // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream - VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3; VMOVDQA BB0, state1StoreAVX2 - VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3; VMOVDQA CC0, state2StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD0, DD1; VMOVDQA DD0, ctr0StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD1, DD2; VMOVDQA DD1, ctr1StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD2, DD3; VMOVDQA DD2, ctr2StoreAVX2 - VMOVDQA DD3, ctr3StoreAVX2 - MOVQ $10, itr2 - -sealAVX2IntroLoop: - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1 - VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2 - VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1 - VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2 - VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3 - DECQ itr2 - JNE sealAVX2IntroLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - - VPERM2I128 $0x13, CC0, DD0, CC0 // Stream bytes 96 - 127 - VPERM2I128 $0x02, AA0, BB0, DD0 // The Poly1305 key - VPERM2I128 $0x13, AA0, BB0, AA0 // Stream bytes 64 - 95 - - // Clamp and store poly key - VPAND ·polyClampMask<>(SB), DD0, DD0 - VMOVDQA DD0, rsStoreAVX2 - - // Hash AD - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - - // Can store at least 320 bytes - VPXOR (0*32)(inp), AA0, AA0 - VPXOR (1*32)(inp), CC0, CC0 - VMOVDQU AA0, (0*32)(oup) - VMOVDQU CC0, (1*32)(oup) - - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (2*32)(inp), AA0, AA0; VPXOR (3*32)(inp), BB0, BB0; VPXOR (4*32)(inp), CC0, CC0; VPXOR (5*32)(inp), DD0, DD0 - VMOVDQU AA0, (2*32)(oup); VMOVDQU BB0, (3*32)(oup); VMOVDQU CC0, (4*32)(oup); VMOVDQU DD0, (5*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (6*32)(inp), AA0, AA0; VPXOR (7*32)(inp), BB0, BB0; VPXOR (8*32)(inp), CC0, CC0; VPXOR (9*32)(inp), DD0, DD0 - VMOVDQU AA0, (6*32)(oup); VMOVDQU BB0, (7*32)(oup); VMOVDQU CC0, (8*32)(oup); VMOVDQU DD0, (9*32)(oup) - - MOVQ $320, itr1 - SUBQ $320, inl - LEAQ 320(inp), inp - - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, CC3, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, CC3, DD3, DD0 - CMPQ inl, $128 - JBE sealAVX2SealHash - - VPXOR (0*32)(inp), AA0, AA0; VPXOR (1*32)(inp), BB0, BB0; VPXOR (2*32)(inp), CC0, CC0; VPXOR (3*32)(inp), DD0, DD0 - VMOVDQU AA0, (10*32)(oup); VMOVDQU BB0, (11*32)(oup); VMOVDQU CC0, (12*32)(oup); VMOVDQU DD0, (13*32)(oup) - SUBQ $128, inl - LEAQ 128(inp), inp - - MOVQ $8, itr1 - MOVQ $2, itr2 - - CMPQ inl, $128 - JBE sealAVX2Tail128 - CMPQ inl, $256 - JBE sealAVX2Tail256 - CMPQ inl, $384 - JBE sealAVX2Tail384 - CMPQ inl, $512 - JBE sealAVX2Tail512 - - // We have 448 bytes to hash, but main loop hashes 512 bytes at a time - perform some rounds, before the main loop - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1 - VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2 - VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1 - VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2 - VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - - SUBQ $16, oup // Adjust the pointer - MOVQ $9, itr1 - JMP sealAVX2InternalLoopStart - -sealAVX2MainLoop: - // Load state, increment counter blocks, store the incremented counters - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - MOVQ $10, itr1 - -sealAVX2InternalLoop: - polyAdd(0*8(oup)) - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage1_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulStage2_AVX2 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyMulStage3_AVX2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - -sealAVX2InternalLoopStart: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - polyAdd(2*8(oup)) - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage1_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage2_AVX2 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage3_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulReduceStage - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(4*8(oup)) - LEAQ (6*8)(oup), oup - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage1_AVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - polyMulStage2_AVX2 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage3_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - DECQ itr1 - JNE sealAVX2InternalLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - - // We only hashed 480 of the 512 bytes available - hash the remaining 32 here - polyAdd(0*8(oup)) - polyMulAVX2 - LEAQ (4*8)(oup), oup - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - - // and here - polyAdd(-2*8(oup)) - polyMulAVX2 - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0 - VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup) - LEAQ (32*16)(inp), inp - SUBQ $(32*16), inl - CMPQ inl, $512 - JG sealAVX2MainLoop - - // Tail can only hash 480 bytes - polyAdd(0*8(oup)) - polyMulAVX2 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ 32(oup), oup - - MOVQ $10, itr1 - MOVQ $0, itr2 - CMPQ inl, $128 - JBE sealAVX2Tail128 - CMPQ inl, $256 - JBE sealAVX2Tail256 - CMPQ inl, $384 - JBE sealAVX2Tail384 - JMP sealAVX2Tail512 - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 193 bytes -seal192AVX2: - // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks - VMOVDQA AA0, AA1 - VMOVDQA BB0, BB1 - VMOVDQA CC0, CC1 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2 - VMOVDQA BB0, BB2 - VMOVDQA CC0, CC2 - VMOVDQA DD0, DD2 - VMOVDQA DD1, TT3 - MOVQ $10, itr2 - -sealAVX2192InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr2 - JNE sealAVX2192InnerCipherLoop - VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1 - VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1 - VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1 - VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 - - // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 - - // Stream for up to 192 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - -sealAVX2ShortSeal: - // Hash aad - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 - -sealAVX2SealHash: - // itr1 holds the number of bytes encrypted but not yet hashed - CMPQ itr1, $16 - JB sealAVX2ShortSealLoop - polyAdd(0(oup)) - polyMul - SUBQ $16, itr1 - ADDQ $16, oup - JMP sealAVX2SealHash - -sealAVX2ShortSealLoop: - CMPQ inl, $32 - JB sealAVX2ShortTail32 - SUBQ $32, inl - - // Load for encryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp - - // Now can hash - polyAdd(0*8(oup)) - polyMulAVX2 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ (1*32)(oup), oup - - // Shift stream left - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 - VMOVDQA AA1, DD0 - VMOVDQA BB1, AA1 - VMOVDQA CC1, BB1 - VMOVDQA DD1, CC1 - VMOVDQA AA2, DD1 - VMOVDQA BB2, AA2 - JMP sealAVX2ShortSealLoop - -sealAVX2ShortTail32: - CMPQ inl, $16 - VMOVDQA A0, A1 - JB sealAVX2ShortDone - - SUBQ $16, inl - - // Load for encryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp - - // Hash - polyAdd(0*8(oup)) - polyMulAVX2 - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 - -sealAVX2ShortDone: - VZEROUPPER - JMP sealSSETail - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 321 bytes -seal320AVX2: - // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks - VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3 - MOVQ $10, itr2 - -sealAVX2320InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr2 - JNE sealAVX2320InnerCipherLoop - - VMOVDQA ·chacha20Constants<>(SB), TT0 - VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2 - VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2 - VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2 - VMOVDQA ·avx2IncMask<>(SB), TT0 - VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD2, DD2 - - // Clamp and store poly key - VPERM2I128 $0x02, AA0, BB0, TT0 - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 - - // Stream for up to 320 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - VPERM2I128 $0x02, AA2, BB2, CC1 - VPERM2I128 $0x02, CC2, DD2, DD1 - VPERM2I128 $0x13, AA2, BB2, AA2 - VPERM2I128 $0x13, CC2, DD2, BB2 - JMP sealAVX2ShortSeal - -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext -sealAVX2Tail128: - // Need to decrypt up to 128 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0 - VMOVDQA state1StoreAVX2, BB0 - VMOVDQA state2StoreAVX2, CC0 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VMOVDQA DD0, DD1 - -sealAVX2Tail128LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealAVX2Tail128LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0 - VPALIGNR $8, CC0, CC0, CC0 - VPALIGNR $12, DD0, DD0, DD0 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0 - VPALIGNR $8, CC0, CC0, CC0 - VPALIGNR $4, DD0, DD0, DD0 - DECQ itr1 - JG sealAVX2Tail128LoopA - DECQ itr2 - JGE sealAVX2Tail128LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA1 - VPADDD state1StoreAVX2, BB0, BB1 - VPADDD state2StoreAVX2, CC0, CC1 - VPADDD DD1, DD0, DD1 - - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 - JMP sealAVX2ShortSealLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext -sealAVX2Tail256: - // Need to decrypt up to 256 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA ·chacha20Constants<>(SB), AA1 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA state1StoreAVX2, BB1 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA state2StoreAVX2, CC1 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA DD0, TT1 - VMOVDQA DD1, TT2 - -sealAVX2Tail256LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealAVX2Tail256LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr1 - JG sealAVX2Tail256LoopA - DECQ itr2 - JGE sealAVX2Tail256LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 - VPERM2I128 $0x02, CC0, DD0, TT1 - VPERM2I128 $0x13, AA0, BB0, TT2 - VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - MOVQ $128, itr1 - LEAQ 128(inp), inp - SUBQ $128, inl - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 - - JMP sealAVX2SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 384 bytes of ciphertext -sealAVX2Tail384: - // Need to decrypt up to 384 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA DD0, TT1; VMOVDQA DD1, TT2; VMOVDQA DD2, TT3 - -sealAVX2Tail384LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealAVX2Tail384LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr1 - JG sealAVX2Tail384LoopA - DECQ itr2 - JGE sealAVX2Tail384LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1; VPADDD TT3, DD2, DD2 - VPERM2I128 $0x02, AA0, BB0, TT0 - VPERM2I128 $0x02, CC0, DD0, TT1 - VPERM2I128 $0x13, AA0, BB0, TT2 - VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, TT0 - VPERM2I128 $0x02, CC1, DD1, TT1 - VPERM2I128 $0x13, AA1, BB1, TT2 - VPERM2I128 $0x13, CC1, DD1, TT3 - VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3 - VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup) - MOVQ $256, itr1 - LEAQ 256(inp), inp - SUBQ $256, inl - VPERM2I128 $0x02, AA2, BB2, AA0 - VPERM2I128 $0x02, CC2, DD2, BB0 - VPERM2I128 $0x13, AA2, BB2, CC0 - VPERM2I128 $0x13, CC2, DD2, DD0 - - JMP sealAVX2SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 512 bytes of ciphertext -sealAVX2Tail512: - // Need to decrypt up to 512 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - -sealAVX2Tail512LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - -sealAVX2Tail512LoopB: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyAdd(0*8(oup)) - polyMulAVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ (4*8)(oup), oup - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - - DECQ itr1 - JG sealAVX2Tail512LoopA - DECQ itr2 - JGE sealAVX2Tail512LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3 - VPXOR (0*32)(inp), CC3, CC3 - VMOVDQU CC3, (0*32)(oup) - VPERM2I128 $0x02, CC0, DD0, CC3 - VPXOR (1*32)(inp), CC3, CC3 - VMOVDQU CC3, (1*32)(oup) - VPERM2I128 $0x13, AA0, BB0, CC3 - VPXOR (2*32)(inp), CC3, CC3 - VMOVDQU CC3, (2*32)(oup) - VPERM2I128 $0x13, CC0, DD0, CC3 - VPXOR (3*32)(inp), CC3, CC3 - VMOVDQU CC3, (3*32)(oup) - - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - - VPERM2I128 $0x02, AA2, BB2, AA0 - VPERM2I128 $0x02, CC2, DD2, BB0 - VPERM2I128 $0x13, AA2, BB2, CC0 - VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - - MOVQ $384, itr1 - LEAQ 384(inp), inp - SUBQ $384, inl - VPERM2I128 $0x02, AA3, BB3, AA0 - VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0 - VPERM2I128 $0x13, AA3, BB3, CC0 - VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - - JMP sealAVX2SealHash diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_generic.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_generic.go deleted file mode 100644 index fbc22ad47a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_generic.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2016 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 chacha20poly1305 - -import ( - "encoding/binary" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305" -) - -func roundTo16(n int) int { - return 16 * ((n + 15) / 16) -} - -func (c *chacha20poly1305) sealGeneric(dst, nonce, plaintext, additionalData []byte) []byte { - ret, out := sliceForAppend(dst, len(plaintext)+poly1305.TagSize) - - var polyKey [32]byte - s := chacha20.New(c.key, [3]uint32{ - binary.LittleEndian.Uint32(nonce[0:4]), - binary.LittleEndian.Uint32(nonce[4:8]), - binary.LittleEndian.Uint32(nonce[8:12]), - }) - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip the next 32 bytes - s.XORKeyStream(out, plaintext) - - polyInput := make([]byte, roundTo16(len(additionalData))+roundTo16(len(plaintext))+8+8) - copy(polyInput, additionalData) - copy(polyInput[roundTo16(len(additionalData)):], out[:len(plaintext)]) - binary.LittleEndian.PutUint64(polyInput[len(polyInput)-16:], uint64(len(additionalData))) - binary.LittleEndian.PutUint64(polyInput[len(polyInput)-8:], uint64(len(plaintext))) - - var tag [poly1305.TagSize]byte - poly1305.Sum(&tag, polyInput, &polyKey) - copy(out[len(plaintext):], tag[:]) - - return ret -} - -func (c *chacha20poly1305) openGeneric(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { - var tag [poly1305.TagSize]byte - copy(tag[:], ciphertext[len(ciphertext)-16:]) - ciphertext = ciphertext[:len(ciphertext)-16] - - var polyKey [32]byte - s := chacha20.New(c.key, [3]uint32{ - binary.LittleEndian.Uint32(nonce[0:4]), - binary.LittleEndian.Uint32(nonce[4:8]), - binary.LittleEndian.Uint32(nonce[8:12]), - }) - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip the next 32 bytes - - polyInput := make([]byte, roundTo16(len(additionalData))+roundTo16(len(ciphertext))+8+8) - copy(polyInput, additionalData) - copy(polyInput[roundTo16(len(additionalData)):], ciphertext) - binary.LittleEndian.PutUint64(polyInput[len(polyInput)-16:], uint64(len(additionalData))) - binary.LittleEndian.PutUint64(polyInput[len(polyInput)-8:], uint64(len(ciphertext))) - - ret, out := sliceForAppend(dst, len(ciphertext)) - if !poly1305.Verify(&tag, polyInput, &polyKey) { - for i := range out { - out[i] = 0 - } - return nil, errOpen - } - - s.XORKeyStream(out, ciphertext) - return ret, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_noasm.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_noasm.go deleted file mode 100644 index 4c2eb703c3..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_noasm.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2016 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. - -// +build !amd64 !go1.7 gccgo appengine - -package chacha20poly1305 - -func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte { - return c.sealGeneric(dst, nonce, plaintext, additionalData) -} - -func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { - return c.openGeneric(dst, nonce, ciphertext, additionalData) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_test.go deleted file mode 100644 index 78f981a74f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_test.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2016 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 chacha20poly1305 - -import ( - "bytes" - cr "crypto/rand" - "encoding/hex" - mr "math/rand" - "testing" -) - -func TestVectors(t *testing.T) { - for i, test := range chacha20Poly1305Tests { - key, _ := hex.DecodeString(test.key) - nonce, _ := hex.DecodeString(test.nonce) - ad, _ := hex.DecodeString(test.aad) - plaintext, _ := hex.DecodeString(test.plaintext) - - aead, err := New(key) - if err != nil { - t.Fatal(err) - } - - ct := aead.Seal(nil, nonce, plaintext, ad) - if ctHex := hex.EncodeToString(ct); ctHex != test.out { - t.Errorf("#%d: got %s, want %s", i, ctHex, test.out) - continue - } - - plaintext2, err := aead.Open(nil, nonce, ct, ad) - if err != nil { - t.Errorf("#%d: Open failed", i) - continue - } - - if !bytes.Equal(plaintext, plaintext2) { - t.Errorf("#%d: plaintext's don't match: got %x vs %x", i, plaintext2, plaintext) - continue - } - - if len(ad) > 0 { - alterAdIdx := mr.Intn(len(ad)) - ad[alterAdIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce, ct, ad); err == nil { - t.Errorf("#%d: Open was successful after altering additional data", i) - } - ad[alterAdIdx] ^= 0x80 - } - - alterNonceIdx := mr.Intn(aead.NonceSize()) - nonce[alterNonceIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce, ct, ad); err == nil { - t.Errorf("#%d: Open was successful after altering nonce", i) - } - nonce[alterNonceIdx] ^= 0x80 - - alterCtIdx := mr.Intn(len(ct)) - ct[alterCtIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce, ct, ad); err == nil { - t.Errorf("#%d: Open was successful after altering ciphertext", i) - } - ct[alterCtIdx] ^= 0x80 - } -} - -func TestRandom(t *testing.T) { - // Some random tests to verify Open(Seal) == Plaintext - for i := 0; i < 256; i++ { - var nonce [12]byte - var key [32]byte - - al := mr.Intn(128) - pl := mr.Intn(16384) - ad := make([]byte, al) - plaintext := make([]byte, pl) - cr.Read(key[:]) - cr.Read(nonce[:]) - cr.Read(ad) - cr.Read(plaintext) - - aead, err := New(key[:]) - if err != nil { - t.Fatal(err) - } - - ct := aead.Seal(nil, nonce[:], plaintext, ad) - - plaintext2, err := aead.Open(nil, nonce[:], ct, ad) - if err != nil { - t.Errorf("Random #%d: Open failed", i) - continue - } - - if !bytes.Equal(plaintext, plaintext2) { - t.Errorf("Random #%d: plaintext's don't match: got %x vs %x", i, plaintext2, plaintext) - continue - } - - if len(ad) > 0 { - alterAdIdx := mr.Intn(len(ad)) - ad[alterAdIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil { - t.Errorf("Random #%d: Open was successful after altering additional data", i) - } - ad[alterAdIdx] ^= 0x80 - } - - alterNonceIdx := mr.Intn(aead.NonceSize()) - nonce[alterNonceIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil { - t.Errorf("Random #%d: Open was successful after altering nonce", i) - } - nonce[alterNonceIdx] ^= 0x80 - - alterCtIdx := mr.Intn(len(ct)) - ct[alterCtIdx] ^= 0x80 - if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil { - t.Errorf("Random #%d: Open was successful after altering ciphertext", i) - } - ct[alterCtIdx] ^= 0x80 - } -} - -func benchamarkChaCha20Poly1305Seal(b *testing.B, buf []byte) { - b.SetBytes(int64(len(buf))) - - var key [32]byte - var nonce [12]byte - var ad [13]byte - var out []byte - - aead, _ := New(key[:]) - b.ResetTimer() - for i := 0; i < b.N; i++ { - out = aead.Seal(out[:0], nonce[:], buf[:], ad[:]) - } -} - -func benchamarkChaCha20Poly1305Open(b *testing.B, buf []byte) { - b.SetBytes(int64(len(buf))) - - var key [32]byte - var nonce [12]byte - var ad [13]byte - var ct []byte - var out []byte - - aead, _ := New(key[:]) - ct = aead.Seal(ct[:0], nonce[:], buf[:], ad[:]) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - out, _ = aead.Open(out[:0], nonce[:], ct[:], ad[:]) - } -} - -func BenchmarkChacha20Poly1305Open_64(b *testing.B) { - benchamarkChaCha20Poly1305Open(b, make([]byte, 64)) -} - -func BenchmarkChacha20Poly1305Seal_64(b *testing.B) { - benchamarkChaCha20Poly1305Seal(b, make([]byte, 64)) -} - -func BenchmarkChacha20Poly1305Open_1350(b *testing.B) { - benchamarkChaCha20Poly1305Open(b, make([]byte, 1350)) -} - -func BenchmarkChacha20Poly1305Seal_1350(b *testing.B) { - benchamarkChaCha20Poly1305Seal(b, make([]byte, 1350)) -} - -func BenchmarkChacha20Poly1305Open_8K(b *testing.B) { - benchamarkChaCha20Poly1305Open(b, make([]byte, 8*1024)) -} - -func BenchmarkChacha20Poly1305Seal_8K(b *testing.B) { - benchamarkChaCha20Poly1305Seal(b, make([]byte, 8*1024)) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_vectors_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_vectors_test.go deleted file mode 100644 index 64f6a7200c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/chacha20poly1305/chacha20poly1305_vectors_test.go +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright 2016 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 chacha20poly1305 - -var chacha20Poly1305Tests = []struct { - plaintext, aad, key, nonce, out string -}{ - { - "", - "", - "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", - "070000004041424344454647", - "a0784d7a4716f3feb4f64e7f4b39bf04", - }, - { - "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e", - "50515253c0c1c2c3c4c5c6c7", - "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", - "070000004041424344454647", - "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b61161ae10b594f09e26a7e902ecbd0600691", - }, - { - "1400000cebccee3bf561b292340fec60", - "00000000000000001603030010", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "2b487a2941bc07f3cc76d1a531662588ee7c2598e59778c24d5b27559a80d163", - }, - { - "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "3f487a25aa70e9c8391763370569c9e83b7650dd1921c8b78869f241f25d2096c910b180930c5b8747fd90959fe8ca2dcadb4fa50fa1439f916b2301e1cc0810d6725775d3ab86721700f96e22709b0a7a8bef32627dd929b2dd3ba15772b669062bb558bc92e6c241a1d60d9f0035e80c335f854815fe1138ab8af653eab3e122135feeec7dfaba1cc24af82a2b7acccdd824899a7e03cc29c25be8a4f56a66673845b93bae1556f09dafc89a0d22af207718e2a6bb022e9d917597295992ea3b750cc0e7a7c3d33b23c5a8aeab45f5bb542f6c9e6c1747ae5a344aff483ba38577ad534b33b3abc7d284776ea33ed488c2a2475648a4fcda561745ea7787ed60f2368deb27c75adce6ff9b6cc6de1f5e72a741e2d59f64751b3ae482d714e0c90e83c671ff98ed611823afb39e6e5019a6ba548a2a72e829c7b7b4a101ac9deb90a25d3e0c50d22e1fc26c7c02296fa13c6d9c14767f68aaf46450a8d0fd5feb60d9d73c6e68623425b4984a79d619dd6bf896459aa77a681ec9c1a97f645e121f47779b051f8948a817f84d1f55da170d5bbbaf2f64e18b97ed3fd822db2819f523314f1e5ac72e8f69bbe6c87c22daddb0e1ac6790f8534071de2f258064b99789bfb165b065b8fe96f9127cd7dca9f7cb0368420f1e802faa3ca23792f2a5b93773dd405e71c320b211b54f7a26626b03c060e1ab87f32ac588abfa056ce090bd7c69913a700c80f325bfe824fa", - }, - { - "0967de57eefe1aaa999b9b746d88a1a248000d8734e0e938c6aa87", - "e4f0a3a4f90a8250f8806aa319053e8d73c62f150e2f239563037e9cc92823ad18c65111d0d462c954cc6c6ed2aafb45702a5a7e597d13bd8091594ab97cf7d1", - "f2db28620582e05f00f31c808475ca3df1c20e340bf14828352499466d79295f", - "4349e2131d44dc711148dfe3", - "bd06cc144fdc0d8b735fa4452eabbf78fd4ad2966ea41a84f68da40ca2da439777bc2ba6c4ec2de0d003eb", - }, - { - "c4c920fb52a56fe66eaa8aa3fa187c543e3db8e5c8094c4313dc4ed35dfc5821c5791d171e8cfe8d37883031a0ad", - "85deea3dc4", - "05ff881d1e151bab4ca3db7d44880222733fe62686f71ce1e4610f2ea19599a7", - "b34710f65aed442e4a40866b", - "b154452fb7e85d175dd0b0db08591565c5587a725cf22386922f5d27a01015aba778975510b38754b2182e24352f019b7ad493e1ed255906715644aec6e0", - }, - { - "c4b337df5e83823900c6c202e93541cf5bc8c677a9aad8b8d87a4d7221e294e595cbc4f34e462d4e0def50f62491c57f598cf60236cfba0f4908816aea154f80e013732e59a07c668fcc5cb35d2232b7ae29b9e4f874f3417c74ab6689fae6690d5a9766fa13cd8adf293d3d4b70f4f999adde9121d1d29d467d04cf77ea398444d0ea3fe4b7c9c3e106002c76f4260fa204a0c3d5", - "72611bef65eb664f24ea94f4d5d3d88c9c9c6da29c9a1991c02833c4c9f6993b57b5", - "dd0f2d4bb1c9e5ca5aa5f38d69bc8402f7dbb7229857b4a41b3044d481b7655e", - "2bbca0910cc47ca0b8517391", - "83aa28d6d98901e2981d21d3758ae4db8cce07fe08d82ca6f036a68daa88a7dda56eeb38040c942bdda0fd2d369eec44bd070e2c9314992f68dc16989a6ac0c3912c378cf3254f4bae74a66b075e828df6f855c0d8a827ffed3c03582c12a9112eeb7be43dfe8bd78beb2d1e56678b99a0372531727cb7f2b98d2f917ec10de93fe86267100c20356e80528c5066688c8b7acba76e591449952343f663993d5b642e59eb0f", - }, - { - "a9775b8e42b63335439cf1c79fe8a3560b3baebfdfc9ef239d70da02cea0947817f00659a63a8ee9d67fb1756854cc738f7a326e432191e1916be35f0b78d72268de7c0e180af7ee8aa864f2fc30658baa97f9edb88ace49f5b2a8002a8023925e9fa076a997643340c8253cf88ac8a221c190d94c5e224110cb423a4b65cca9046c1fad0483e1444c0680449148e7b20a778c56d5ae97e679d920c43eed6d42598cf05d10d1a15cd722a0686a871b74fea7cad45562bacf3bda937ac701bc218dac7e9d7d20f955429abdac21d821207febf4d54daea4898837035038bf71c66cef63e90f5d3e51f7fcfe18d41f38540a2c2958dacde16304e4b33da324030f1366f923c337", - "74ba3372d308910b5c9c3885f41252d57556", - "9cf77bd06a4ed8fb59349791b98ba40b6019611942f5768e8be2ee88477149e3", - "b928935c4c966c60fd6583c0", - "ec7fd64fd75b254961a2b7fc942470d8620f439258b871d0d00f58028b5e0bee5e139e8108ac439391465d6658f559b1df57aa21cf826ede1a28bc11af885e13eebfc009870928fae8abfdd943a60c54fca93f0502dc23d29c2fd5340f9bc0e6ef2a18b66ef627af95f796d5bbca50de22c8ec802da9397089b25c6ba5262468e3977b45dc112e51896c70731b0a52d7efec7c93b41995823436bf4b0c477ae79684407c9831b487928b2b8303caca752b3edf1f0598e15831155462706f94ef3fa3a9e5f937f37085afa9b4bbf939d275796a61b78f70597acfd25cd87f967021cd99328fc371b5eb5739869520657b30e4a5b0db7c8715cbe275dee78e719b357d3a9731f9eaba95986479bb2004a77822fc115a3d", - }, - { - "b3d3128bce6bbf66fd78f1a18352bae56bfcdae18b65c379ee0aeb37ee54fba1270d2df578ec5b75654d16e89fd1cd0acda7ec580dafd2fbbabd32a8112d49383a762db2638928c8d63eb0750f7e7fdd256b35321b072dd5c45f7dd58cc60dc63d3b79a0c4a1689adf180fef968eccbcfa01ee15091ceacd7b67a3082db0ce6aeb470aafe87249c88b58b721e783dde184ccf68de8e05b6347fe6b74ae3adf9a81e9496a5c9332e7ebe908d26ce6b3f0b2a97e9a89d9fdd0d7694585a3241f240d698e69fcc050e7a959ba153f6d06f117848ba05d887134f1b6b994dad9b9e74247513e08a125b1fadfc7394dcd2a6451b504ae3e75e22f2b9bc405747dedb6c43ef4ccdf1a7edaf9451346123eaa63f3af113124f361508e255503a242b96680ae3360c8b13ac1f64d08088bb26b7f617cb0866f11d6fd362b00d86eba3fee68724e302388f119d6f92161ac8ce00d08919377a26974d99575b1032ff0f1976240c785c8b89e9eb2bf005e4be06b5371ffca14683fedfdb49e00e38ff27af1324177faf91599abd5990920797574eb743effdc7decda318ada1419cc8e0bfecf82f9c99792746c2b", - "7e8da4f3018f673f8e43bd7a1dee05f8031ec49129c361abbc2a434e9eaf791c3c1d0f3dad767d3bba3ab6d728bbcf2bd994bd03571eae1348f161e6a1da03ddf7121ba4", - "7ee32dd501dce849cd492f6e23324c1a4567bfceff9f11d1352bcb8615f1b093", - "8998e043d2961afa51ea262a", - "ba85e72af18cb5ba85a4a0d6c28b4ac1e5509a3a2fdb0e3255cbc559df5e6a661fc560c756a0264dd99b72c61c51a4b7ad56ca4c8ccb7e8edfc48ff3cceac5d1e8ac5fc87096adc4d0e9a27492857b17604c3a694cfe0e70b22df106c8f3c61f840bcd634964cdb571840e125e381e7dd3a0d97972e965f16f775fa4ce555124318290bf508beb7bd77e633042deb0e863631478fc3dc9122862b3c31264471bcce54e0b74040c8bafd481cf798f332e8940f1134d3027d6f28e771d15e154fc89c6c25fe18a5d312807cc2e623bb1bbb4f0b6ec71d009407eb54bb0759f03682f65d0da8812f84d8e97483f6a8d76a8417efcd9526444abba24288647609791578887ef49780b0b89f51b072cae81c5b5014463da3633dda105b82add0f9c2f065dca46eedd2928be2570493c79a996fa78ea6aec0996497fe2dc444432ade4eaa662ee2255f0f4b92d593288a8e3ffe7a15a10e9d33b0203af23f4c9fd2cfcb6160db63b52810869ff1e65423dbe2c4415884b9f8dec3c968e14cd74f323c89053a96111bc9ce59ec483832c49c53a648e5f0f797f53642ac60170c94b473f1f2e7d8a38e46460b81219b52081263027f74cbf63a75af3a7", - }, - { - "68d5ba501e87994ef6bc8042d7c5a99693a835a4796ad044f0e536a0790a7ee1e03832fec0cb4cb688cdf85f92a1f526492acac2949a0684803c24f947a3da27db0c259bd87251603f49bfd1eab4f733dec2f5725cfcf6dc381ad57fbdb0a699bccc34943e86f47dcfb34eba6746ed4508e3b764dfad4117c8169785c63d1e8309531747d90cc4a8bf13622759506c613324c512d10629991dc01fe3fe3d6607907e4f698a1312492674707fc4dde0f701a609d2ac336cc9f38badf1c813f9599148c21b5bd4658249d5010db2e205b3880e863441f2fe357dab2645be1f9e5067616bc335d0457ea6468c5828910cb09f92e5e184e316018e3c464c5ce59cc34608867bd8cbfa7e1286d73a17e3ebb675d097f9b3adfa41ea408d46252a096b3290e70a5be1896d6760a87e439334b863ccb11679ab5763ebe4a9110eb37c4043634b9e44d40cab34b42977475e2faa2ae0c0a38b170776fbb0870a63044aa6679545ac6951579d0581144cdf43f60923b6acaecdb325c864acd2c7b01d6e18b2b3c41c041bb9099cce557b114b84350131e3cee4089648b5691065867e7d38314154355d0e3ef9dc9375eddef922df2a06ad0f0e4357c3ac672932e5a66b16e8bf4b45cd893ea91cb397faadb9d9d7bf86e6ceca3e9176a5baa98b6114a149d3ed8ea176cc4a9380e18d2d9b67045aedeb28b729ba2ece74d759d5ebfb1ebee8ac5f5e79aaf1f98b7f2626e62a81d315a98b3e", - "63b90dd89066ad7b61cc39497899a8f14399eace1810f5fe3b76d2501f5d8f83169c5ba602082164d45aad4df3553e36ef29050739fa067470d8c58f3554124bf06df1f27612564a6c04976059d69648ff9b50389556ad052e729563c6a7", - "7d5c4314a542aff57a454b274a7999dfdc5f878a159c29be27dabdfcf7c06975", - "aeb6159fa88bb1ffd51d036d", - "7597f7f44191e815a409754db7fea688e0105c987fa065e621823ea6dea617aed613092ad566c487cfa1a93f556615d2a575fb30ac34b11e19cd908d74545906f929dc9e59f6f1e1e6eaaabe182748ef87057ef7820ffcf254c40237d3ea9ff004472db783ed54b5a294a46cf90519bf89367b04fc01ce544c5bcdd3197eb1237923ce2c0c99921ca959c53b54176d292e97f6d9696ded6054711721aebda543e3e077c90e6f216cdc275b86d45603521c5aab24f08fd06833b0743c388382f941e19e0283ac7c4ef22383e1b9b08572882769c1382bab9ad127e7f3e09b5330b82d3e0c7d6f0df46edc93265999eef8e7afa0cb1db77df7accf5bff8631a320d146a5c751a637a80f627b0c9a41b44f09212f38c154226de02f4906ef34139bbeacc3f06739c8540e37334392d38ba1cbf4bc7debe77c09b35d2200216db15ed4389f43bfd8ae9bf76fd8243c3d869546e16b8e44a6cd1edbd2c58ef890b5a84cda889131e5cd9402ca4d8271052c6b4fe3f2dff54fb77bcb575c315b9109f90b14bc8e109919808a581c1809e2a188d29fd34ce639088a6683f641925f5b4b3529baa34e080bb47fb7ad9b43d0d67c9e6ae7cacb50527fa74e56d0c8b20149f5d332d686d48ebbe634c2b5d35fc84c69a5bcc93b93dedcf9fdf19a1fb9b75f6df9692d16f6c3490377a06294499e4b8ebeaa0cfd840bfa05fde21c0b5e94d13063b3f5da7b537caefe89069cfa9de9eb8f06e4d30125de64716f821bcc8279c0c7ea2e", - }, - { - "89c1ee38b6697d0190c87a2aa756892ee09fca095df1e31aeedbda5750f604d9b8f2116e5b8f70ec57ea16fe419f2d213ef72b9be90eb5d7e98f2e398632123e2524ac80b31c6c0a07820848223569602d94fc16a3b1ed8c411bc6c74ed80573fcb1f3afce60b9d5e2c21d04f78665241b613abe12274a5343101a91e91f04e5d1f7959f574e743a10913e0817a32c320467f0178e3b6ad14b856234a4661a755eaf14b5fd88ef0e192e1631d14263d6a954ed388f5709dadc6c0f81d229f630d80be6d593d5e3ad03f9ded53c41abe595981d24ef27ffcc930e4d653743960f4e7ce4e251c88f55c16d2afdaed5e3446d00685c276728ba757520acb9b6bb0732a0e9836878d829e5022794d70ad8440a40a132a8c9ec1d3f0ccaf8c285fff425e9788d6150b74753dedb2ae8b36ff2f310249bd911b9181d8310e00810d42ef94cbb5a9d72a1f0507c1a382f892b23994fbe7360778b7efa9c5e03ac3231a57fecff1c5fa10caf1d26e84db0137049622ebcc3a64841a0e49fa390d1d43550c1346c20d578cff39fb7404fcab0982dde55f0849d312581d0c811a19d46f25e7a5e7e50d74d43760583c5cf335dfc11b2ec964f1dbbd0ed83e18f2027817ea2dffcf2b64a352c4fb8f11eeb4f1bfc01079251254d2112d103a1f12a2270cc026cbeb8b6f3e505abd62496253f93274625786b73997e449c1f35c742a593441252fcc845e1cef1b8f287dd311a0477407ce3b31661f7b2802c79c2d20d06e45f03aca4e47a959c6c1d7a9d377e1577fbf82a115921c3d94e3d9c204aa204a9a5b04d8a2be3269700a035371f4aaf1a42d92b9bfbee74492b106975b36d1e581d6ce2484f09e04fa91586c85f35e2a10f0d3c0afcb05327c1bc9d7429bbcc4627af8f76b86fc561844c2ae3810c84901ac09a1670ed3d31a9daa5d296", - "7219bd21a834d917f93a9b45647ec77102578bc2f2a132dfde6489b9095b4f7b740c9c1c4075333ab0ce7f14", - "a7f849b054982cc8a4c8e5e53e181feee79e0233e58882839892134ad582da7c", - "4c46854e9e101090b1436f90", - "ab2e189baf60886bed88eb751bf3560a8bd3cdb6ee621d8c18b5fb3aa418f350048ecf359a7d542daf7090ec8688c3b0fe85914aa49d83be4ae3396f7bdc48051afae6a97fca7b42c0bf612a42d3c79ef6aadceb57f5cfe8d67f89d49add0ea1ffd423da058297239e72a85fa6cd1d82e243a503b1b0e12d7510a9ee98d7921dae2754d7581e52acb8ab9e7f9df3c73410789115cef6ce7c937a5441ad4edf2b7a8c0c6d152d5a5909c4ce839d59594a6163364038c4c71a1507389717f61e2bda1ea66a83ef477762e7834ebcfaa8f2ee61ced1605ba1380108236e1763bf40af5259da07dd3e3d0fb2801868c2e7c839e318678687cbe33384e2ef5750a0a0e2d2e19e869a4277e32a315ed4de79357f6a12a8a25d5b18291316d9bf40dad2d05d1b523ade76650669c700a1c2965f4e51337aa5d45ec7b4981072779401d6d30ed69034053334bccb18425ac68460becf2aeccc75aacd3d6709f07ee10366ed848c8a54904af4ea71fc2117de133f01e1cc031f2a4d0779b997b82682433ee615202d5dfffba6c916f11a00551d56ffde8c36b303263e14adaf45b6eab0bedf344e5214ce52f071d2f40154d788c6870020791a03d2fd4ec5879d9026241954ed45cfddef4937ea3d0d45647f252be31411237983a1be340fc65ebab9a5620abb0e8d475af4e89e842e895eda0cbd283bb5d0bf20236c62d956de733d60ebceb42fc0c9adbf9b69f8d66551b0aca0e260625ad41cad75d752a234af7caf7902c2c5b62f04b6a8e019a6179d44feeb2ad5859ef1c45371e66f1af1fe0de63997266c290e27f0dd62185c53f81e0a50c296a51ace7c90d9cf0dda8b2d7e72a347f64c44262e2a544d1acc7bb05734dc1783bbc1903279092fe7fe434610aa95fc2ce5fc5ee45858f5e8337d8fcb0a468464becb1cef6b7e5ea48ba383ad8a406df9c581f1cac057d8711fcb", - }, - { - "2dcfbb59975f217c445f95634d7c0250afe7d8316a70c47dba99ff94167ab74349729ce1d2bd5d161df27a6a6e7cba1e63924fcd03134abdad4952c3c409060d7ca2ee4e5f4c647c3edee7ad5aa1cbbd341a8a372ed4f4db1e469ee250a4efcc46de1aa52a7e22685d0915b7aae075defbff1529d40a04f250a2d4a046c36c8ca18631cb055334625c4919072a8ee5258efb4e6205525455f428f63aeb62c68de9f758ee4b8c50a7d669ae00f89425868f73e894c53ce9b964dff34f42b9dc2bb03519fbc169a397d25197cae5bc50742f3808f474f2add8d1a0281359043e0a395705fbc0a89293fa2a5ddfe6ae5416e65c0a5b4eb83320585b33b26072bc99c9c1948a6a271d64517a433728974d0ff4586a42109d6268f9961a5908d6f2d198875b02ae7866fff3a9361b41842a35dc9477ec32da542b706f8478457649ddfda5dfab1d45aa10efe12c3065566541ebdc2d1db6814826f0cc9e3642e813408df3ebaa3896bb2777e757dc3dbc1d28994a454fcb8d76bc5914f29cfc05dc89f8c734315def58d4d6b0b0136ccd3c05178155e30fcb9f68df9104dc96e0658fa899c0058818da5ec88a723558ae3a6f2f8f523e5af1a73a82ab16198c7ba8341568399d8013fc499e6e7ef61cb8654b48b88aa2a931dc2cdcf245686eed9c8355d620d5e91c1e878a9c7da655e3f29d9b7c3f44ad1c70890eb5f27ca28efff76420cd4e3cebd5c788536ddd365f7ad1dbb91588d58612e43b0460de9260d5f780a245bc8e1a83166df1f3a3506d742c268ab4fc10c6e04bca40295da0ff5420a199dd2fb36045215138c4a2a539ceccc382c8d349a81e13e848708947c4a9e85d861811e75d323896f6da3b2fa807f22bcfc57477e487602cf8e973bc925b1a19732b00d15d38675313a283bbaa75e6793b5af11fe2514bda3abe96cc19b0e58ddbe55e381ec58c31670fec1184d38bbf2d7cde0fcd29e907e780d30130b98e0c9eec44bcb1d0ed18dfda2a64adb523da3102eafe2bd3051353d8148491a290308ed4ec3fa5da5784b481e861360c3b670e256539f96a4c4c4360d0d40260049035f1cfdacb275e7fa847e0df531b466141ac9a3a16e7865947572e4ab732daec23aac6eed1256d796c4d58bf699f20aa4bbae461a16abbe9c1e9", - "33791b0d653fb72c2d88519b02bde85a7c51f99cfb4456dfa6f84a61e10b4a14846521", - "a0a7b73ca2fc9282a28acc036bd74d7f5cb2a146577a5c29dbc3963fe7ebfd87", - "eaa4d916d261676d632455be", - "c9a631de470fd04dcbf8ea9f4d8ac37c3988878b6381707ac2c91d3720edbb31576ba90731f433a5e13582aca2b3c76ae75ca8881a463ecfa789910d3a776a9ad4800521c6baa120b2f1afd10f32ef8da63f5b69f5e5fd88ee84bf66b0666b15d05c4050f5358a050b9d5cf1503719f56cd48ceba78f29efe2ae8092e37f5134df526831532f86ccb9339637e2c9e9b9036f83cc058fda23e826a188456e7fd3f4ee20f4e4a3221883fe3232b49db607b90a8956133ab95051c9ec33a908ea7e81a1bfa7bd06c09f0143d07bb23a3feeac7f0d7720269c93e2df19d03605828c8713b84d183c9a50954c12fe3b047511ad15ef03a63355520cbd224d06a34de67a671368e6a8f9feeefe48fc273764a8c69c00314e5d693f159cb5270544f3c4e1760b0529e3303ab308e9a6d03835a3a42aef2df5f7643696f707a574d1dcc676aeecdd9947ebe8c13bcf15d30b2d10d2cd95445a307c1d22d39450615ad38f9302c6eb9dc05764b0503d6a7eaff9feb94834853b47bc25660207be3e7c0e27cb3127b5402cb016396e5ff07ddc3df29861dd68a17f53bf660b23352b739d6da72381b8d19a9fc95da7efb79330a2b360dce4309860af429e3fd10cab235c4acc1d80d9e20d67019375bd161ab65648400f308815afe63cfc717f7d0eea150e687caac25b6603287d44dca4a7cc2f67c3bdd54450bd3170340253b03ba054ec003070eddf9c14fb9dc595e228e4968524900cb5d85af6d1e658a42d744e0e7eb6995023823a8dc33528c6715b2e1aa607782c8e1ddddad72026d657bf122ece8685f6e92236e809139325e4a3c069facf94c10b7896995bba01eb22c7b3a87ea2114a7649d7ed3e83d223e5e785c66a75119beab0968d3eaf0cbcc2d7ede95d024041e6db39a880ce3e19efea32fb89a40a2aae22f407e5fd615e51e48dbd50a8b4ec27ce95e2ba1928bf699d0418705482ed0ed7acc858dfbd690403c74667a88dd5221bb79940c6c4a268379c10343aaefb635982c14f33ad83d47ced9682961540bd4f75804d3d48ba8aa67fb2e3a1db83fbcbe57fec9e4ffb1b575e947f8bd8263c680357960e3a39382974774b5a013f2f8514b3c63c21dbfd314fd5d927d82ba616d76629ac018879f54ff84b5808e94af4fcfe1cf8845b65208ca5510b5b593ce6c109611652cd", - }, - { - "c335b055b752e083554b5aa2cbb6556cfcace658d5c11b6b000256fd89e9b24c1e62a2d5b582580acdb2ad9869020465aeeabe83acd9eeacdc44aa652d5cb24bbe542073d6787ea32b2b3c942d40f9db2bb75ed7914c836d902dd2be89840948d82abbaea23952cd648e6191ce5b6cf912cad0a3165410a781e3650b676e5340980eee3b484008acce6a3e9dc5aa96d775677b8bbb8b323c6e9747d6069a169ea904d9f145e29d134cdbb0118647e8fbae638669efb9a55d50ed33568749f5304ece2193b0bfa6fc9a570d209ef61b4c59a2b5485b5aa6ab47d902cf23f7ff71c5210476e0aa727a01809b9f76b6ebcf58a018b3fbbe5f42976111ba58112b1d322f9312da068cdb86277bfcde66cb3607e3ea02a1494439aa56f302671f1f994eb3ab28b937043f5f7f3b3de50673ecea5dee8ba633c45089b852f0d772892525344ede6b521dcad15807b65e7ba348d891d47fc498cf4d50223d2794c64db9fa9b9766edb430be0c38746ab317b38ba9870a6d1fdabb70fcf89790bfe449b97fe01f6c94502aa0889f0a3bb6bdc65f44d1cd64ab88d4a7806b373f5080f9cf60183cf4686694f0059e2bbc5cf21ba0c3e8046e70d815f1444c3094cc29632c429f20aa06b49b0b52c6c7aeb8e34f7bcb53e93c2cfe2d704a5d0416876742c90762730d160e1869d5e0178dc366098ebaf2cae6f1f7563b555a52dcc194a5c8f718d50d27ee76fcce8e8991f4921fae85ea9476e1eab1364403120698b7ce8fd0a49cf79213f360a17cf1950f104494fad80adcc3bb1207bf250d57dcdce6ac8082a312959672361363cc227310b66ee8c04aab7b5cb33a81c0915e9c770a1cfaae2e8f44a0c65703927977a22fe58aef2f366b8be9a50da9376b46ae7562a82391386831febf359039ac326891bc58c0f2c34bdb6858859fc3cb4e392df65cbe2ec4f02c8425bcbdd1ee2562ab7d229d406d79a9c6fe4889c996c2f68d1fb5bbe3a5e867caa4249b934afd3ec71fdb088c54b15252f9dc1b909e121dbdc7d8a16cc00836652dd1f877ce363eed11467966f7ccb8f1a8d48146e69e04ad76a51937ad4f9cda209451eeca90dbdbd65441ce20fabfc8ce400fb4de136154b87a8b65c92740e9bb91d78521b261f806a2c6279c85ef6ac5fe1ea3117ff7c9f9832fc2aa6fab660082eb22344c1a3befe0628b6551f62a5014cd6194c42b8d475a50f2c9fb58c97e43ebb29005ed7fe54f0a4aa10074f1154152a9067d364dd7863fa082976a00db55b26b5ba0ea40eff48b90", - "f5ff810a41d4b34751e9942970d4c9f26b33f24689a4b1e4449b243490afc485af468ff01a42376b2bcb949b9f5e8d0b917f511a", - "a74271c184a82cb074c14b131fd91eb05870cb7c73c9e511ec8140bfe2f34089", - "2403fe689e239c2ed261b381", - "af9be893d5fd23aab42e6a2e59a8e7cb13d4f543db02af87cb0802bc1af7c717cd0093cc8244994cf21189146922b69927ffd5745e57118bea07a6afe7c21d952c13ab636b3c2e461dc9ffb3ae701175360156338be94b1fa7115799831019455cfaf5114010fe45f8fb9c77ec50fe06f2c5a32423edccb3b2210ee1200a78e1a3130c567542377827586ca8cf0c14c19fa1449a2cce9c039bb441b04e9c0a3f9a743b31c828032174fcdb7c894349aa68f5adf97dfe9294d24e6b5fed95eb994397883f58487bf5c57b0aea5268be7cee9efeab370f89805ebe5373ab2e93658fc078955ccf68b554dd5605005751ee8531c35ca5336a5d0ce273370c0dc9307779b86e96d2d1daf2620d67d43e1fb7800ccf250ca3c02eb74047c1d2a2bc7f29fff8320301694b80d0fd975f834337d00d5f0e4215044d52aa4ca21e6a9d7e03f186d7cdd5c48e3765dc926fb0a46bb0f05c50d9f69c9c507527a60366b7dc251aae1d6bb0d9c73735dcfab959f6fd4382fe2a1f6ad07affb0601bb9040f81b55a48f6a6c5f8ac4a2acc2b0c9a6c439198f7926460695fa11e0b0b017e39de5cf0d5d5f84d972b5eee7b5d1e0343b5485cd84b92ad892e5b23f3e803f5b363f2398c11c15be9f13e59922b0d49902dc8483fb142850b4226da2fb84e9b434a34f6bb67f575a9e57fde3354bc3077a876e260311bb2481bb139aa9af55df5074749fe532d7b8a554218a90cc7e7ac69db280bae5d55a174dfc8d325b9909a8da1016d4e162fe5ba70cf8726cdf291f5e47083d9929cd5e32021cbfd982fd0975f6f9baf4322b553cb3174b11c007559879f308419ff9e4e18eee8d3640cec8aea082b90f69cf3c7676c28af0265c24c91cd58a06513198892ce6ce1ab3ee9ac0a2e937b973a9cac06a039a54f8d994c13d42c59187f677352e5feb32a417aebec4d852b2595e7e67450e06dbd183279e3b63022a3813b37257b085bf8454d6890875a2950d20210a8df4f9da746722f62687e92f0e9efc3e5d526d65ccfbcc042fcac7964dbe147932c73924bdcdf62f9eae58d29e8567ffed90048bcf0566b952e986efeae4c477944af18bd243c3eccf8d88c06d07279adad037450cb8547a8aa0a74223f4851747c803cb21a2dd027e7080aed75038cdcecbc4639d87763cdd41829a1b72cedf0d722b180d0d492a5740ea7607b95f3201df352fb1ab28149124d2df5d5ec106867897b537302c3431402348f94d28eebc701ae1b49d10adedea38f1654fbc48885e59e6e6dfd413c6b5a97d8c35dfb07a6cdefe317bf61cf91", - }, - { - "4aba5a776ace38b6e2578f0007e770d264e39c49f588ca3547ad2888365e3a811994f8836330394587c8458eb0b6611499fd5d8e8527c3cdd4ec550b4a8f8c632384e786b420cb3be911c999c72aad60270aefad31b27a069ecf11e95e9d4c81213308d554d3103de4d9d6ab04830c2b8dfbd8bead52c44c21d5357f72810193b5096809dc7846c1521c6c569f78812c735aea21acaf6dce84a24df7234e8ad857f3e1346b27f5bd436113e2da950e4deff96e9ba8db692c7db723a105ae795da15b910c8286cac6e7dda8c172b70f61b07dfd58596684d61da8772356f180f74c1103ce97cd947eab3d401df44f7fa4cc7cfc25e280fc002873237e64a375b0b4797f4b4613c9f150090f44588ee8250ae44aec6546ec8dba0f0c1eb281cf66fa4eb141617b32b28441f6ddcfdf02d9c34cc62893b2b64dc2c26b74433adb3e888c7fea07b19c8cf39269c2716b9c35b7625d4a141397d6d5034b193d2657c6b2d6b0ba874c467adeaf3d501ad985d13be21c4ff6b326cbb671e4f4973bba49116a0399b6491394f850e4122969e4644c00b442b3da0d6a4bf25ee22d182b3f822fd83878ebcc713cb183651a67ca66677ea81b58b685a3a8e385d5fbb0147ddfecb558d881c914324c794db443b31bc15c361912bbbcba9e418f99f2a416d190cb29684df27c7f3ff6ccf339800efbdc4514ee00d1a89f12373804db4fd66c1affd467f251e73147b3248033327b0f7790fd7861a51773dd4f78b89e4e24b94df9203f4a077091bb9411eec78dfe3e1dfbb67ea1cdf17e1d6936bbb75b74055495449e9cb52f5749404610cd444fea3f0568e0d35a5ef0c395ab7bf0208044b5c4e2517911a9c351efd31f33220972287253fbccb1eb8f46960a36b68a7a6b4f5cbdc86d668bbf555fde8881e7faa9594da425ff8fb54526bf7cdc4af64899530561c06bed7fc04c5d48cd4542779e901bc48fab79d4d13850ad8247f51b9afa7d5a656ada25b6376d837cb0fa1b4016dfcfc158a39290f43f133b352ed52fab2f951509bacb41284fbdd849d8185fb7e7200f8ab2a07ef2b3b927e18e568dbeeba2c7a66e08cebdc6a6069ebe6656a586652f3905ae2bb867529af6a827b494c97b3a378408f44aaefbe86c613e11e7a44020a9ee4b62569dfc4c462300daec7b1424ff1c1849ca1332367470475c14877cbe76c820cc651c18ab3f18852b93994f93b568dc7f7b0eb5f07ffc4c9384c851fa9071c6f68ddea1ccf627f889c0471c76aff9f52b07ab1b86a7671a2b2f6b25c0ddebb66ac95737bf7e2f493f7665b5265eaa5166556cecfdd3062802724ec24f3978b903d0f0c24e1f0b8d967142bccfed0d354279223f4c28684e9ab611e9ef89a3f25993b5a8b3c0354931780501651236a78b58e7d7814f251b053605f4c0a8e7193b9cc1ee5cf7378e6f3c8fd44ec57bd91e62b09fb1d6bab60cbfabcc6792e6a32ea7918a9ec9180d05a7e1546d5d2d8bbfde2a71b4e427c0a4d28d0b6473ae", - "921a401db90935c60edda8624a0590d5c46eff3522e35de2872f6f9394e24126fd8143b68a797c995624fba0298b75eef974", - "6a4d35ae03bf277f587da4541dcddf92bbd906dff45d5ff23c0f60ae53b062be", - "231b5780fedfb06d724450b3", - "ba40968282d98849b19d867f8b564ea5a81d657516099362926bca4cb6e9ae02719d10c8061f53008c727a0eeea5e1e36c9e55c117e9434e213316c96840231a1e356b254a9981d4a6ca3c66cfc61018bcaade1a4486506559e6aa3a86bac980d391d835fd5ded98d10f1394d84bf1bbf2cd3397890d704154802f7864ecc753db782fd3d19213ae65ace4770e1bacf32d61c6730aa5adcab4d7e2e437888c11c29abba4890a17a00f67a53b660becd94092df0598df5ac57326f6860593a519e28bd4a39f6481e1a4748881fd5f0456a3cd9f28d1d1e78dc64030cbd8fdb2c5abdab3f13d6ccccd187e71e989f8c486929efcdbf2a763effa95af62db5cef95e9081b818275c69267022fda4b7fdb8c650b491a785b03d4d0186625962b6326ec3f4e176373da4dc1f83a14815adf82c6bffa7c6967d77528d0249754bb4d17656bc4a89449b16152a4a1aea7eb0054a8892f271138971507d2f3b237ba5b620f444544e4a8c2b1ab4f9168762c27478c9f776c47ee2e9ff05bfa35ed127f0cabe7cc053640bb8aa01f8359b74bf89ef43ca94c48fcd201eae39d1835957eeccd6b3a852f4e1bbfef9a469f42c764481ff8408fe5871afeeae7676b58f4202199aad50a596626dff97c8e60d750cc59da9f595ce12ce9afdce14481cb1e39994de8fe4cce07845110d6703dc59d34734e93e9e57e1c52d61f44143a2d290220a4bad5098d098ee65ea4b6757d8a9bf5485aa3d697a7826d4a285186f5da10eff707566c23c6a15033365bcb498c44487c72d96402d1834753fdbf86770239761f03e0dc8963766441da99c0813e4f1df5a1d018c8799861a396562eb24ce305ca15f4022d83ea3c56b68d9a7ceac4742ec0ce50f4d36273df26005ec2b051fa071b319be2d8a5ed26eb75bc1ea83761b8454db234d15d84d6706cd178981c1f156e6d28f774aee3e9a4fade022e71b52b50aa532b8bc7fe464f22d6eb169c69671875d614e987658820c2f584a4fea3008afdcbb646dba3d69020fbf503f121be3480344db23efdda0d255aa058c3ff66abd3a5fe35db977521608bba7eddae72ae801f4fbb12a1de4133039e046ceb8db87e465e5ede1d79a08c857d59076d7ff858942c31e15cbbdae6fc15c3f9545a0825d6ff8583c0aba8a7d143d27b93f6caefb98c0d83bd8715abcab2a49087f55a9daf9090eacdf45be08ad80b5df5070e1719f68c4cc8f8711083f0f7823a09ec092f22df95fe9e95114fdf82a3f6eed0bfc9c0aa65222609442776154a474dbc9e662cd5dce66846572e52417ee5d7eb59287d07ef60a9537fe1f85c7fa74fe84dea0da235ac7574335e6649b54a6bd33397df4bf4a7976c4ab868aa702766d2bc8d2c82c2d1c2653fc8428b8d1e61852ac185a3a0b416dbcf8eb54c44967ff43c44f2b32c6d4a9dbf2c2f3a587b430aef50f0375cdb4c1b319ac9aca486d9bb321141b065f52f7b6decaf1985531ca7bbc3772a561eb1efb8a6297075920bc432131a5b211bf25e35fa31e12833bc77a9de14c7", - }, - { - "6c0056937faf1023032df1e2bfacbbc58bb022eba25ffa020d4eb26f0caf0678af5d0b2f0c1b520f4843f107f0adcc7b5dee66ff4d61025bafb4cabb64d133132e3e423a599549a1d83aa8c8e774444462aa44b00b460bbafad5755ea6a872d4e6b40e3f4957e0229288ea79fc2ebe5fd9020fe4481a9f42ef14a196bd136aa3c779e311d0c333624c1ddc484c9aa7259cb609e4d0a826c0bdc7567adac01da23900b30ac4e66c100348584fe200747eb67e6287268947e3509d5d2b5d7bcd977b80a13f660d4f6956a8b938a82db75eab19e5d2a22cb5f3c9131e278eebbe096b5f49d16c983ac240f3fbe821b247cccb2c9e6e59546122677f49f56a07fed56647a6d3e0e09520d49009f54250c10e7c607cd5b4ddf81b5c4110c6490e9baf56418236211856f5a85feaebafacf92c0c7501c052f9dbae3beb7484f90f334f50b68571cedc67763b5161ebfd5a1709cf18c92112a4cf4d8f43d1895204d8a2ba5e14883a7bff75cc6060cabb77d38a909daca2417befd1bfc05a11c432b47f90c807ca4306400f67a0d92218adaca84a584a8bd4395c93f9b6a4bde9583c79204444634a8473b1244cd33cf980e443d82ecfac672b3f60e2e41ecb3c5a445d9e88c0e90c339a31806e6d79ee52bdc6808c73e8b7b24899966664d3c1a9305f31f0483e24e36fa451dc1d3f2eda05af6678971e2bdfb7c1461c9407c5c466f6b5af34d992a37de3809a22ae75275ddba0f4f9cbd4b18c1acd212192e587889a36bd73c860f0abe08bcd8f00f5ecdb95e1d560b586eccf530df0e5f3776d8dae2a01768bf1226b7ceffa7ce4e75879c82dd97db3c64c06d33cebc6b35854618355d80e46fa79c3e9743fce5b974723c421a077e7ec7dba286881dbc1d53d442a1552700fcb33f83f73c69a0a0ebdcf2f5d461649c4d0712c514ded268a31509f83c1ae4ff4a68e676d29727be641aa4487c08d4b90ff78e24c6508d69759751a1a23690ec9f8763621e8b107295b4bb01bd9fcacd8748e24d996fa70ef6f8b0992f4185bec8e920d7643159f9f604fba394b6611bff435998b2f097a9e948430899c8c752a1e83a061983f00f88ebb32da214399167932a1a83c1b47d09f77593b03cf6521520583ea4483e2d33e14ad60584676d1791779b532c085d238df0d3bae735d0078e0eabd63cc90a2e13d023983780afc8f83b1c14437937c16a1b7c41414c48cf4ae49587ad9fa5b16fc949a749e96032248c4667f58e295f999590dae1d99a2cbe3fa45bcf4a1d3f0356d64d40367f64b2c5cca843e5f7dd7b88a85d52328a00622e6c317879607bc036c9006d38652ffe21c83207c00f8348a7d0aaea5aab4c89077df170de6d41052641726eb6925cd85a9ee01a9e636346340e209ea96d17b0eb0921b96662ce9cb430fb6ac348331dd7133875769bbbba99dc49333950e4145a15ddb0789c4d2ccd38878080ca9e57ddc6cd5452790eec45482f8e990392e319609391fce0beba19463a9a00d8f1de9fbf22f23821de7d69fdfbf3019ed61aff79acfc5a6ba663a1e10da2b9ff7149aea43bd6c61a543008402309df0924de72c1cacd2d6120cf422e61fc1de345cc8771934d8be77d9437a09e06a9b2d51c849fd9a200fa714328d34f36b684f33df6968b827df916a599a4bc3367814fec21198e2213ff653cd2a463892966c72ffd42a26b3bb91", - "0d55dcd08b54e58916f622f81761ef6a2e19b167ac47d3", - "e42e1d6d44138f3d2bf12c951f454686f18d590fd30057405b5a3dc2b317fa97", - "1e46a7486c5a03fd6758d938", - "fd3c1fac10cc82e49235fd57f5aea0ee7a7bd6d539b138d4b3fb623aee591615c1a61228ef9673113a3a90a3687a12d4c6367d5f7bc67d422fdc4106455084d79c2c42c5e86368dd164bcbce7925bfffe7d96c13a2f49aac8e9d1ada3554e3fdc21aab00455a0f33b0c1fdea91b3588e7ad301bfccf9940027332fbdf966463491f7a33c093e0a13831ea9d2183294f89f414cf7b5876af04fa68d594430194429df74fa5915394427259e832bc545c13400aef6cf16620d48280798a6e49773c9316d79fa1dc758e54cde2e2cdb856092d83f4e9b698385cb976fd6cc2538abe055273a5b34a784182ea5e7d3ac9019a05de5e5afe4308a7ed2d363cd50ed6a52df1c616e4a82f607ced768445d13ae4884f2ae1f9fd8313924e8a1a8a23905c92eb231f638dfa6f4cb27bbb9844e05afbbe2ca4d1a3b3a5b371bf33c9ab6f82a7387d61cf8bf662097624145a983839b0cb9f4bd07556800b4054fb3d0bac94f44bcc9b4ac49c39f5571fac4e02ff09f08b3ed5add4bf8bba934e9feb773c0590b45c45fa036382f3fe9782ad19107d4630321e414b7b442b64f18fdd5219039e5740f34b3ce8925d1afe8a39e35ce8db086060bab63b9720700499f82db19a62897c6d845389461260303f9cf2bc7235a898b4620c2191ef05604a5c8c783d58009533a86b27c12b0772635d34ac53993ccf174c9087073e5e69b26c0c3d9f768507ac4d4e2af847b65e3a6e1b7a6dafb0aefc190871cdae6c60f0b1d6137c351d4cb211870791cf4cb8af2ea446f6401eb9ec8a5bcebccce898d1dfb13454df6b35b81ed6d7637e6e261e004080c60944f3a08e8e5fc7e2e4939e7c2607c8cf07d1d10883ba3ad43e2611826f245df571857ae0a7a867df9659f2082c19f94ce400132e48c7f8de2b102c7f83ba5cd1e785597a0ba0d73bb81bba0c00300d4bcd6ec25fb73105a46122873bfa729c0979d8d314ab7ea52391aabab513dbfd1cf01c2990c0a3612f4511c2bcf0f5a07e659a881a7f99c3f1fc4a46e66904427fe26a4a80a904c047d090c861a075c0ae4e29bfbc18b9620aaa42237f4c6fa76ee7491ee638ab5f1cf0b440759828e1ec519679efc776eb1468999a00f667e87199ad6891e98b95fb682e02517b024a6bb803ed23c944010cb7bad0733eccc12d6ab6030c6e88d510ce92e2f98fdcfaa1e37e41fbfb4e99589c0e8efbefd40473db42b3a73b57b22a2f8c9bdaab16831f1b117dd83a77dd01ee8d0c2e92203adb670f4fd65e618823ad196220d70e014c1aafd8863797c61c16382c2600062683ed3a180c70891717c52da15191b02f25d1715ebf33a5e6037092421989c942082f4b836423cc3e976c9bcda185de36f06265dfc250a27d2de0bc48c73b3bff704f3b386f962522f572108458bdb283c6ab3fd33b3ac13a406268fd5d97e17db9c0f780b4b2a8f761d15a4d8b3a0cd73357ecf4d26a6492ee069f19325823ef50bcb2f73326719a57b67eeef506fe8915a1b1ba1a637592268257b91e9c7c5d33cdd947967efc1952005d82ccef9a3ad7ef8ffbb6b658983d64c51242ba53f8f8963245b87a25aa9324c527e53f8c11d55f30aab598401589acd13f090541b3b057b162190f27910718b02a6b8ddbb8ca6cf40bf0d2848f4b76341bd5e78f476862bcdbe2d1bac84c0566fb45b21388221ecd8483d99fe603646b1a9f38a49230cf4dbe5d7883d73eece01bf", - }, - { - "04892b94c65685f2eba438322b29bf8439938590d3e0eb10a29e279d356cb439f6dfcdbc3552af21f7e753221012a649a52bda780bc589ae63b04b981dffd113df9fcf14f17e35e865880a769bb1bf40dc99b9e85e4296c1f2e1590fe02b22bfcaf2d4bb7009a4d692ae4c2d5f0b6d3ca526240368bac55b9b1e6a7b498d3b137f0fcfef1873c5aa2111d7811d45bdc26be1c5d49b8a2f36a999b1f226ec06a5fbd59514485abe696c96ea89dba74b4688101a239b495944e30b3609f73caff3114407599ec5c30a5bad933655de7dddef97018ae15acec46504cd5d417c5052c057ac5f1c6f69781cfdae71db2b4fcac35054a4aa22681027356d68b2bdba721466d130d53ba8f23857631382b2de450232e9ad5551bd7c872ae439e79eabfb057d2bdab8d4ccf02b3003ade2e1f3e514dc92692e4fe5b579c9ee6067995b6c168647ce5a13be8543c23326a3260bb7029d2030ec05e565ced3c5366d20a283a6e95201fd108640d2b96676df712de20e4e12fa53f85f22cb24583844fabcebe40eece11e7221f12c88670bf994ed08e2000236f86258c386b0fccbaab8b68ec6a26fe41491d540193c4c12d1391ab3391de9317f41f505f1f1d09ca9862a6f289a533d2b297d4465c956360371ea3c8ed36e0d1563120654e3a2fd69cd6c9267bfcf92e84cd64e162c84199d6e552b42c33857264b5d7a2e007797cde32934a3f8c68b459cd95bc85e7466ccc9910e8dca65b315c32e43c3a5da908904c42cfc8ab74126919ceeef1054bbdae6ca67b02f1ac5f24808b5eee24577e609a3e3935a24b9ebc1a8dad1fc96abe26012928f2d5782755f3763427dda28867d0b1ad830d3c3f17b9ec278346e5a9480ed23ad44a523a4dd86e65a610ee0de1afab64ace7a3b4918fdc14c6b1ce0ec0903994da9bcf18643d7e0a4e6c08200bb394a89b385d2cb829417eeb0f7dab9fa7306a330f82973cf0917b5ca99b585d2ff0e8584e050077467f5245ecfdd5942e4fc72dc26e5ab2ffc61f996167e68168cee9a6d3ea1e1a696060465e35da8c75a1aa380004faffcb0a992c627fbdcb4e97721271802cdaf08d214ec2fbcb389d75709d7a6b9d35662661c8961f93d4a705e7188613f3769114c55400809cadf60d3b6068c8a5ceef078785171b59be1140c6a754ba1de5ced349df63d67d59d3a8ca3c716ffb506772d57e9e3f2caf7fe346c4ad64aa6c37e43b9bbaa8f58e51bfbac31fa6137728f8e5b728025697e5ad5c8301f6ff39eb2ad595d3cb24257adee88a84fbf1ade4d7550cd9ab94bf48e1424ae83184c35c5a5920157d45805c2e0ad129fc7f0ec3c41b9d6fa04cb8918ef379b0783d1cc2863cd80382585fa05320ca4f9fd90353e490b384ed6c166c6f802cd7bd39aa43667246e8da96992db7537d472c709b01114e95febaac5b1a3c77e1e9a18c2d180e63f0d8fa89f6a1ed63e909e4741af5c2a0e47d4d3f8779b7696358f58060f3f461cceeebb390c92779d30bfdedf1b08ed62dcc05a545bd0ea915f42976e81dd8a50cc4689d8d8007508bf53e7da5bd43c3894968cf0677681c6b818353af6bf8ac205139add1310e5d363ccadbfa0eaf735808325e7f9a6aeb1bee3ebb4a27576a88811859c216b6f84371c43d8063a0d87bd326eb6d81c6896ff534ba2c9c14a51d2cfedf33a5c787279bb4a7ff65706b389756a6191d2f791254233ee047d40d64c2dca878a42f903fd4382f39a89a723fe11848fe37b2008be53f7c2d037981d6462a4eea49df1a2e074957afd3c9dfb4d218a309cab395afe301ccf", - "67b5eccb1790babc2dab5e0d1ff3871c3024177d45a2ae", - "259603e1c3af3fd0ce3257eb627b02e0c0a48ea2f175de3d8c36570a445e5369", - "e14de73c4b17581a7e0d0649", - "33522e67ef932da5fa8abe628b51f3abd5049951dbc982ea95b7769652d4830c588fa45e3fcff094c8602b9008d7b2f9bf6c1c4a8cfb515401c7c44a7ec42ccb967722a710199e121a41160b1ec581507e9bd2e2e506b10c4b5a8d6977435aa08e27504957cd49e756e1574c4ccbbdde937de35128b7ee3455d2e665c596c2e97c253c94e405f85eb5de84874c099b4a97eb8f492d28f2e4bc64b228dd5984e76ca08376d7f1355ba8e0fa60fca96635075417d8b436278e0fb91e3bfc7d61ca8c7407086933c061b2d318f46f352099e1d317d6c44098539d1d2c1b7894db668e7a82ff991864fae236570cc420a4229883f1e2242d05aa07e175bc6abe11cc643cf1786a4456a2de8c066fb1a70fe387f149ffbe8cca7b110e256fd0c09b1d3bd7381cfa82fa700c8db1e79809ccf75ea52d0b349264557046e8703a191ddaace00ccfc513db5e78810eaac0a99d7bb1a5725e722d4e595216a0e12f3a7aab2e623ea9e1dad06169914bcd51b643016fea7dc3f2743b1e65877f1fd5581bee5ef206d86494a587ec8462a170746fcedb2c9f99090674ee687382711b4610ddac599732453dc063518aa36f5b4129098fb9fddc02eb8f8cfc2fdf0d904ef4d6d06014f977b29d0e9aab4044ce9c662a18b1a8db1ceea97854e90704430fe9b1046b221b27ac79054fcc68c3abd6fab7da66e255ff0cbd0506c852e961e619615c944cd9a05c25abb63742f5da7bd9939feb0f2f2208c8ce82f551a9d4d70e935dad018e3e4e6998e39670221601c3e34716ba75eb4e2fdf53c4d471c444330514986de45cf44d77f793c17e36a271fc65e6bf08943aef4c66547dc310c7a430e3fe7a54898de48f69f282f52bbdc4daabdb325cec7ab66fce1aea4e2fd932dc1a316c821f5220ea437447feae2fa478adade7cd515a27d8c132d0299b3ca1bc8516c9d9e7c65c38c238c69f03e104eb42a29cacc8d79b808ea6fb233a5056201e3697f81a2d49ccd8b8efd1ab0fd407c16a210767d1d3ca798ee53a4bbf1ce5090d321b1a64fc2c5f013c23829f5b0d2737936ca71595a1d02711c8a7b0e74654e5d76376ae26977dd49c68e3c0a7b36e047d44be42d732c31f681bd7b1b4b339f004ecd847960377acd005debfab13d0fb88355025877630aff753a7cfddf6851e8bcc8ec37b8f9149830f47e6b601098b2ba19a4c0808e31e8927b2525cb82bfddc9b4bcba2b46bbe768ee278fb89010243d16f9679f5ba4f13cfe76b5beb16c7b28daf99b0873098115c2233ee3402ac0f6c899a2cfcc83b2ccc06676999ad48017c4ace507080a26501993327ebdcbd1e2eaaaa99f4998b716cd9e36eb26b4573a03fd1d18047198fdf675ef4f979864ac85d230a011c69d8b6c45e9efbdc2a03f195c9731b4cefa60208ba845c0978e73d082bf6d6a513b93dc805a4f5973f4158f60a200167ca88704a15ac5ab1f38ed455a426f7c6a96b6bfea2ebc1ae1247cfe5ff29ee81bdbcb53b03b89568bae9a6f311d2b20e31c2d91bd18fd93a37be266d0de8015d52e325f78356dea0b77cc76f28e0f06e4ec705d1328340013a77b0b6196f44b7712fff4ae0ac7f6afab9456a95012b7c6d387285487476d189977e28f6c9d1a3f736320d61302c2d627d5a7ac8cde4988056b55eeba27efe7e640f94c115762ad5849423ae138c76f15b47bd2a2bde2c492489b7980aaf1c4e32a155f858d7be4fcd0f8a18e7b5d97c5a08d7885d6d56222ef49542c7f80498a14a8eed1c092543aac3439966d5b5d0cb9e602f4fd795c09d652b64f9ab67e38f48c88d18e30a9774f37e9c77b7a94cc7310d", - }, - { - "4ab8068988d4bbe0bf1e5bc2fe1c668cbe58019c958dd2ec97164aea7f3f41c9f747527f1c0e5fdb2cbb9d2ad704b6955cb731f14403dddb1a28c5996707635e4eb5dd6ac33d46eff8e319cfe7cf6443869534ca9812a5b23a6b4ca172afffc064dc2b28197117115431e03c00447f87d9b45172c6f724006270a1d41fa094847cbfac9630c3a785f488c1f5cc407ca6f4cd18bac43cba26ad5bfaccfb8f50784efc0e7fc0b504b43dc5a90a0525b0faf3c8b4b7046fdeb1cad87ec667ce3eb6cb4c358b01393f3ffee949030ef9fd01c1b2b9c5219777eb6ff5b1d7c3ef8d8e3bc2193dfb597cf942c5fc50befa527fac0b44cda2bbb811b06ae87459750295371cd232754e2bb7132807d1225950ce64949b0650531800bd0074177677acad937ee008cc0bbfdf33c6b0552000238494be8be412a3e5cfa359e619d092c76310a76bdcb22abbe6f16b3b116b5f95001d20e42fc3c9ff6723e580f378475788eec265a1ed2087de8cc2eff72184f73fa5dc6e68a56dcfc85350bccb97135386d5b827c2d9aea065708f5c921454d1b9303f21d5adf19e00415acbd86d1e5e42d78505b033a515a435713649c50702f54623cbf31469f355c3be2e30dd8c72b4127764451d79e952ea1f9bb0269da56dc07060d5d9542a9c1258ccefe53fa3f7b6073cd38026256b45c01b6c5dc0d91e3139f30a8d1da7a076738f5bb23352693a8e3cbbb46226fa22416680013f9e3278913d06aee4a62457357f0a68d173a360af5e1411840e34c574b4c6b352f92ce33632911ad8b6710d357b7607ee19679e777baffb8ae3c0fe9786b2e97fdeccb5105ecfe81441f549bc6b50ab84b749fb33f8f6bddcb6bb733d6d5dbc4b29725b8741439b8239e53fa435ea29ed3324202b1bdd07d1987b0e06d8cb51013dad897ef02401290940ce3f2af72c5d1b4c8836299008c10b16c7e3e119e41ec66d9db6929ee09bdeaeda08a50665c052edf77b7dff3d8815046bf71d5015e3bdb29a4f507aeb2e28c536cdcc9b8d1e89849a0683d78f99dbfa90f94aa5dc08587657a8f042d718080de5d4a973f232f78c387b63c7143fc2a4380c491414a18b6c4a7bae2194b62e798ad7ec7d09e409425f6d0973accb17e4d860f8ec0283584cff076d93bd9b0c4873f9c57cddcebe3c3bc8afe793c6cb6b26c4582847b07446b7e1d9757de6bdf0df826cbc502bf88cf3a773866d3ff293034abc4afa3091b2126a278f50e47f2f66ebebb616e342098ab690f7f5828bf8cc4742c677d378893e9f188e8397bee983a9a0998de2a31798330f8db59a8581e1c847589bc0e2d95ffa68e39226cc15cf6cae5c4f5174e7848375391dfabafec202565ec2383721339f04c5c5d1da953d88f18cda65745ee8e99805e35203a6545a0416923b38c5db3c8aa00d64354bed27d7c78c4b257534bd7a18107ebe64d8c27b6afdb330d8efba79fd1fae480cd51fd3626bf8d79fb651b7c6cf752aa737a5123558420d48fc86451b358d270aacfa6c17f343b7a9956e6f64e4990c1b3f1e5097605edf5ce4247819b19f245e9a90758dd42c36699ba5cd7f3ed99a7df7eb155749f4b42d192c47cacb6b2865fb9ef2cfca283865cd06e40cdf7f89d76a9e2eb393e2e0ac0e2776da929f3f8e3d325d075a966d289c51347bd0bd523a5c81edef63ce9b72f5114c88b08b16edbd73f518096240a5b37421843173be8df4ac7c587a17ca6f2916f7d9a10dc75f81bc778a1eb730d12b51555cc414eab9c066113a7edba9a7f1a18092ae47f12f0368ba211feaf34a3b48a7ff5c91b81cf7c95675a4001c95a19d284fe4197fe8823909a123fcec5e45935da12416be1bdf14918414ad19b54a41052f5b8417ddbd207ee01d6a3e62fd9b0321b1c13d91d6ce15ea7b2ea0c670a5f5cb290ca8e62c26c6499104ab8e9fafb05170ede246bbf7313625d1fc9576f1609ffd08852a2f4b73c04f1f4eeecefe3f3eeb2185a618b6dd3e87d9d3fdcb349cc83c21f26b6c662bbb857aa95378e991640a160a23cce76153c134508c68ec54a5", - "0d471079ad3c3432b6de852ec71692d12d9df4f984554d458a9dd1f28a2697976da8111ae4454c9a23d1c8eae75bbc14f8b00e7c065bc290f8938282b91a1a26c22b40a6708c40945d087e45633a595beb67d8f1c29a81", - "f3dac58738ce057d3140d68d2b3e651c00ff9dbb2ca0f913be50219dd36f23c6", - "bb2d033de71d570ddf824e85", - "238c4e6be84bfb151557327095c88f6dc2889bce2d6f0329e0c42a5cd7554ab16c8b5a4db26eab30f519c24766b1085e11d40823053ca77adfe2af387b4dcde12bc38502229510606ff086265f45b1087375dc4a022eb0b641101c74ad566ab6f230133b7aa61861aa8202b67beddc30dda506691a42032357010d45adc7ee633b536a2fefb3b2143837bb46db04f66a6e2bc628d6041b3d306ff78e96205ab66847036efa1fb6e6a387cf8d5a105738be7163df9da0db48e3d8fd6a786f0f887968e180ad6888e110fb3d7919c42a7f8c92491d795c813f30ea645fafcddf877f5035f133f864fd0ba1415b3d698f2349ebe03d9e76610355e7fc23221c5c72b1b2628a40b14badf93288fc4abeaff5306d274f21938650ab236a39496d3f8a6e9086eac058e365d4335b51eafac813f9175bb7bebb75605909ec3fde6515694e119f7b6e96aa1d6d6454c3a7dddeacc83bf0c1f5f6c2a9dd2f460f3e5b074a33b8d7904e6988ae43a22a87f0933f812e45c4c518bf83e606bad4c3c55422ab2207e9d3cfcbc5819049f55e35b9663273d9d3a6f8a897fa38b0dca77eb6c344290cc007b68d913187f2cd480a40262623a4e95d90d5701ac2b9d858d70a27f0672f919c2ded1fb89134ac9a8ba6ac62931c832372abb70e811dc50cce264ece65e87338231f18ac007c5f68f3b1c5904ffbb2e1dc361d53914917770d66afe28c547d8cd5896d892cbdadc34cd6af348c93bdb8b072f38b085361e62ded7a38b4368824c759ec7d2cf4caddb9191e5deedc8b8388bc4ba2c0672321bcda3a7343c9ea71ef03750912f35624d81da5fa8a6ee676c4efd99d0c7258b844ded7b35d8c8233a316b508d79c7c0b3edabad5db9543615179b1c111bfd78b79327ac5b4155336d670baa592d441c810cb1b7c07f3d35473a45b57e780b7d997782aeecfc0363976fb608d6967844ed00b63ba75996054d090aeb605c195b1ff86f9d9ab5892d27632cbb59c06b3ccd69d33ed5dea9398f00b7c6404fcfe2fcb5924e4cb75cbcae0a1b084ea8b15eaa5847431e9ab70e4afe15b4c82239f6165e243e3b76d6c91d23b16edecad8bcb16898641f8e323671452034a8ec9b42b29cec0db210bad0444f1c5bf3505cc41d514d5a270d556f0a34333bd06cd6509ba253a6ba7a6db8f1a60c99f0c3d566a038a72f1271a178cc3ff890b0df1e7438c0c1a12d9873643e2d7bfeb92379545de50834abe2a345faf7ca49beeab87ee516dd8598b71196b8cdb15e7200cb5bd814338babd74c565faaf33d9a8ed4209b417345a1ae611880ea22ab2e894d5d14a28fe3835d3b2718125f0e6daabd85327455646290ceab89e579ed5e1d72a0172e4a6d8da70290b5022c941f3866f96cc4218de5d2622d13af6dab15760a1ec5d10918267f9585284058aba611ba07b1d5711cef505869831699bedc2b190fe1d578814065c91d87a8c8dc9b0d4dae0c80cd241f0bda3a6d5e714c894b7a48b1e5eed4555f103eb03c9db30efcb855df422d7451a6d70f28174c7ebff536dd2cd2891f6c3f264d632ca924c4e0d84b37cf8e06e6f2e29efac6cf008cc27f062441278dbc9f09cf44987e0e9ca088a48437b0b89efb9cf00d3d0c5fb449fd4b64e21dc48cf300c2d80a502cb583219f1881e78e647783d91dd2f3b389a1594eefd8ea07d4786f983d13e33cf7a34e4c9a0ec4b791f1666a4eef4e63bde7a241f49b5cf615888bd8130743bc8a6d502bfc73ab64d1184ead9a611832b7e24483a1a0fc475d9ff6166b86a18a3dc96910ff182cf326456c4461ce8acb3467f801890eaf1ce0b24791da9c650876e718c0bf43c475174f9712dd4a228695e8f8b2b23fc4a06358b4a6a8e1afa87a0280c3e098f218f7a6d6bd716f8c105a7eb799ba0220837fa5a96c8a22a826a6f7ea9d7216a24acbc7b0133210cc17c8190507badb421bc54997ff9340cdc1ee415126ac46a4fec9fee12d40f06300f7e397b228250f36d6f0d2ddad5fe1898ea690e4c7cc3a116a70bfaf6d2dc996753fffae40ba5280b8356b7ab4ffbc914ec74eaa070581fdd1d9e5aa2", - }, - { - "4d81b652fee892d575bd13dad913d976cf0517c819d5183a72eba995b1f27efe743451721ce34791a15a6b7a6e44f13d4a080563dd1d9d4f0946e5ba3863b9ac970a1fb4ed66458ec1b1092ff5fa6c3f0271a2df8e3f2e97851352be760b6a0e1589c202f00791b1b89ae0ae944ced96bd90754bcfa3e355b735132d407d3b5507fd57f705e8a8bd82886b16d459ac91e921dcb8c5bf0d7cf420a9349ee589a5e2e19ce7c944a54ccc1062a0690f3152300d0bf5cd1871c1391bf6d7007f7ce26018ca2a5c6f76287fd8c8e9e7f93b1806460dd35f7f95989a8b6f9a0aeb7c6b0346955fb50b8735e34f1ecb4859e34ea0f022ff6fb797094206a34cf120b7f4664c531c57da513b296f0671c8e9bf68d9e1674998fe52da04f627f516dee97c2b3c988216e9bd3f58c3b021ac70898651f1cfeaef21c4f417ebe92dcad3aaf50f4277262c356584f816a5a5862f2bd720fac10f1b86033371ed603bc00a30cf4da8f579dd5bfdd571a37af7d2a5cef29f9001bb1605ee87f24ec3b259f381a69b771f78d21c4e43bfc83a916e08830d9885c8ae8ab6367c05f92e5eecaf0488262300f83f4e3bff177590857e149216995bc52311fb9f16f4cd74e07c7868a39b699bdbb7d7dace4c6a53ca7ee6e11741a63a52a1d96995a6dd752356dec6f14761ccfe38a6cd8511204f8f0630a747d6e19a77bb030c61e0828436604a28a7acf4a5e49b7269ac93b93b99e9e2e1c0c47b377f7e44e05ec6659526afbdcd5bb172404ce5a9f8786234114c16f20cda6d4359eb873a4a4d9fdf734e9c40aa4db3ea9a98939210f6c62142dd144eb78191116d194bb766ea96da38321ae27fcdcc196560ac75567297984fabe6072c771899906350f74de6d18518eb6898b934b11e945d94ead02b821fd6682602e03e9c70a1ec67eed33874eb24dc83dd1035fba5928f8f62ba1282907aa8935ae72fcb881b3277ee6bebda8fc75d6cd792677c25f70c87b11e094298b2d5f39904be211ff0980e5b83e8ea4a455622d8be9efdb5aa8466c88ea861407d54d98112faa10293af5e16974861dc9f83b45d21b112cc367894c421f5049e49dd205bd7c15e6a70bc810704e2e3a3659800864912527f8be743acdc474a26246a81fc2bdf669b9be7a2a0c986432e1e44b5675607e7e1ee2a8dcb72d8f1964272926e52f909ede0ac8daa32d1d850158db76b959e4d83c9da4e3bb23fd1f5b26463045d6cf13d187fe74a50c09a654d52d0e2f01d66b9f8b4f4aaf4c69fa62a02aa876f9bc4871aacd26a6c6ccfb9bea09cafbd0268b5b65d60aa23ff504d02fad4719698f8b044ca1bb037ea6af58a06a448080dfdbe6a5d698d5db9da5fb4aed04a46c8fa8b93153bca00a5bf8aab64d2b371d072db2ddb688a9442e948f0b99236828dc115a2fddfa2a29e2d4e02ff0173cf734efd4eb687e3f8712be82abe1fac4be0c1eddda090803fbdce41bccfb58c43038991ba1074b281a09bac5eba58a99a1a9678ba26f8f9e3c63ba095f02cd8f3b56aadc5de60477efbf3dcb54b854f651cc72042bf19268554c61b44f2f338a75de56c3c45b3ba40a697f5f21c4557380c777bcc91a151e5676c2a59606200bd476cf98d20b4cdc64bc3b8670810a014871be018bc32fe239e287cfe8a7cbcd1e8b55e08692ccfb4ef871cf797bc0b1fd7ec37931e35b6bc5d32bbe7ae77b9962c179f96436e4a32f566298d2235acf921e38c3f1942fb7674b65e222d17b95a2e58f072c63aa4bba1ce48c303f4bd24d84963f18c5e670015c52342dcdc9c0b348c7dfac721b568effe2bf2f2e816ca3279bbbed823beede8e12fc5bdccd0f1584deb1f6ea1875e9fb350919b675ccde0178bb83a4aa5232bd5e8e9a1b8daf905c6197367a0d106532297ef89f3bc690b48224592c768bd9c50a63d0881370d475081aef052b444744b33fd3fef674a37898fc950f887ed482d2a51ae615ef5b1dfa3a23257e6a6a319a4e2080b2c4094bb09e4b390d1fcbefc4d6c5dab620f8b05b1bd5d976300b007e2b8120ef8a6c9028b7d925c795058c6bdb6711fc5fc2476b9810d1d81bd24637537716edd3b7068b802c531531df710d3682f9865530e1ed51b3b56d860ba4e972bbc74662cdd1e2ea24f81bf469193afc02b14143a32e9556e3f2ecef97c65", - "2538d98b64b6aa9258f9141840a5abef66d6037a10356366a3a294719c10d6c148b04cac66f63ebff052d730f8821f5e5822d869573bcffbdd636c7973433abbf38767597da5186df8ef9df071bc4ecade2633366102313e659db8d8e0f293d379fa2df79f456497", - "a5049b0aa153e282457555bf6f82b60fc81aa6fd1c2ea3db031478ffb74b5b5d", - "350287a6bed5709dfba3d35c", - "849670914f5fe318eb01e8849e536374ec11e813acdbbe6a5e82a506f6aef4f916a3a7fb2e41db3adf990175e21f2386d1805af9bbc32a6ac156b13b1a9505958f68599019c4b7297314229c467114754277b10e9f49a4d12837ef24184629c8902ebe2a23f740dc826b01f8963d47100bf617b314835e436104eb207fa9a1079b8feba06d9369b9aa8222d38d87096b73678bc5db9a1add59394530e678b6ec93a80efc6e8320f2909e3e891306d69b016ade0d30cde64c2c903b401f9d01a29b5cb8619dc68ad6c21900b365a6b657f7d9ca4c145fe598a94eeea741e20a9329996b17aba5d7115c93623f2f5d6927068d0f190b49eb885429d771bbbb3980e9293e4d664a71c3cb629d869dc97e58fc3d328331b11df19a38d61e1705ec4c3d779168abe049e9d675337ff658e00d2d610c8f227d1341d1c41f1c01d8b5d83c4b1b30ae4318da9822f46402ee8cd5cfe9f3f22d90a5ec2d0aaa0baa85e10f5295cc6005c5a0887287b0c867a23da1a4c2196f91fe0bd4f0db1ab324c26fe6088d7583f3cd052b7f6fca38e8b21f98fd07fe78b7657da1f586f1fbd3d2b4079e20f21dccc0d269d53a29deb7c7fb63cc291d1d2c50ff163e08ce612310d3bd622f2416e193078ce4e1463f8a3490578af96ca98e665468281f1af9117a2ed23367df19b570885de9d6594f09aaba4090bdd1079720b08d54311793c97bbe14433b031c865b059cb4f75db74779b82c4f83eb4bd829c62eab995027b548063d7cab7d1a6f9642da6cf7181c0ac71594b97fc2c84b1768f81eb287091f63c76623c61e7ba90c922c74d46b9ae5d8094d9752bc1e8020a82601c356a201e0473d540053c707a88f4baad37826152dd245c4cee6b0019583c61e4327fdf6bdcae53584cdba8a503b835bfb5df9d649705fcc1f09376eec96c3da1e105accc1cbc21d90f527041a9beb85f8cbb1ee8db798838bb45374b741618f83b5d0801a3af2f640abdbe74ec3dc15d6711b4c1480aa8d6084defba82ed221ba359c9744705c4feee0955c27ef468cbb816694516f73fb541e0ad4ccf99ec8b67ef090505d1f7c4c3a8ed7e291c820261f12d92bbc6609da6c275349819848c9112826674f243acb9a29ab73f17c8f8af12c7437c11972c824f00db7ad284e51b9b508a925f0664bb259b4443d56463bffc9e5d845c9b9f79b24c1f457088fadd281f48238866e0b92d6253638eb188bbaa8bf6a81d2b1087904974752697cffb00b4ba05e5b7b842a3d2c0a743e4bd691625788fbe9df14600643b1d161bb2916176b6ee40aee38dbb594ec2735d41369ed3a0c6dd9073f1eb51d1b77eb9a967b53670a8ed755f3b2b73a6cb50a9e1ea7549346646dbe4b801c8aa642779d8761b6c2d2e1a9995e758ab92f07c4eb4a23c042171a4b354f434ced5f6d9ccd26cd6c2506e5023dc076ced15566fdabc7364f4a8594cd6ec404e1a9470f52a83052390e4f7789ade9179b069d9f84ca2c7ac9eea51035db817845aded7405bee90cbe92364c8c7cf8a366cbebd7a972438f2a9881395a8610a2cd0c06c46b60cdae5b1f473f4fd6ec48479cf35101656f05485198a470cd36af22838e7ba3e28863cd8ba7bbba7e3c2625c1106a6be44c9e3d9b9938679b26f0713c62c3757a2dc8b2d9eed5e652220a7711cd220bc91a9afd7c940dd8be71616ebb8b2cb0686dfa161c6ef56994a3cafaec5e79bd0a2531fd1c1a42771acb101a38988bcba51ad85bffcd8c67aebec5b37d526b29f7b9d31388e1e7ad7154f8e65516f0d80a30b88c2b868be2541d19ea1d2bcbadd30e2fbb1b4678bfef7f200e0f8309ac0701000c52ebbcd6fa00cb85c8d3ea9c5aceeb3adcf3773cfb3bfc9ac764d031d7c63ab888e9b03eb9fa74554dab4719d426d0875a508c8c86b22cabfeeb70b0f1461db4e5f639d2a2d28a089dbcc48e3f34394ff1acb887b89f75d3236c8143bb9b06273c3878744340ea1858a9f383f8bbdc259250e23a3c3992bf8b7ca7e1a66913547710402bb538a8866772d11cf4214060ed091d403e1c9ca3af75859259f88656a1cfecfdb49d57c193e60a2223627c681a2fbc7390140aeddc19df035a5207adde4f5736bc542bfdc943ae8b094f4a8701618688fadc2284fb423f602c41ad8ee11e5d9fdfa67fb7dc7d4dce7847d4875b3af667168ebb6082f6911c95", - }, - { - "67f0494a728fbfc84e2f4a043e121ee40f3b12b31616c78e157ed970db28674318b08d8b3f4c538d7b9d91b9b0b09ebfebb07201c6398fdbb8684c9390b3d6a8636333a3b086302b24c2e5d47283935d33065efa3fedd5f755218be5d4618d38c5c1db75470ba06bcd853f3f08d39c3cd9fa3618e70b103c2d9b2101fcaf39c1701436b720d723ed5c622d6535c9a10ec4d727abe237e80fd20911ceb84a90285fc6e07f9d036cfa65995f9b6300a927d7d0d2b907bac9d9c4daa87c2438a583fe85029c886f96ed08f5886bf53292cc0265850a1f4ee3e3288b604dc305d0c28ad35e1242f4ff4ae988b6deba48aabcad2fc6cd7eaab0a63510f3f915c4bb9f9719b1d90db123f639d9d4f3227eafcfad769c2b204dd2555dc54e738909122022c4f92f751d25aef6f9a1187750e825c68450e6d1223c2fe88aa27194b492b6788be6eda80b9b9f053cb77c8d9fa15324f23af5147624fc00c66e947b004bf38b31e1343c7cd341b98abe462a5f994e51d343664968624a2ed0dea9d0299d5c5a7e9097fa63d8b3ed96f917f693654766a9adb01110fa3fe0d8e9b102860d5c049df3fe00ccb2ed62ab05583e6aa0a5134d55245d4f643e274def29d3fc86d79979d599458786a8338b0071f6a01609ee6b2e4bba9289e2df780bb27491890d0b5ea650e62df819b8f98aae99a1b8870ce6d3c7785ca957d5b4094946925751f0fda1d62a9aefe3937a912c1b49b4272f87eea7e397feb84c0702929959e38a568460811e5064b1caf5dee53f920c6e19fb16fc9214b5de1cb770b510533f66d8a0e7f6f04ba8ba41869f8018abee31a6042d3919e217359988eaa9db2a10b3caf7aaba43527484d81304f0bef22165f74e9e1031b545ca3d2f74195984cc237b76ddbec85142a06446902339b1883000264031db85fb19b46f320ef3fe316f750f2d3d6070dec5b66ee8ef20701f20965f5171e44c8a99bcbca7afbbd81e30e74c6d48bc4b0d72baf562da6581fafbe14b6cc597f75e53b305036ede219ec56d0c0d29571a9c110ffeeb747fe56f6030dc26c8d3841b868a1ef56840932dad9f3bd7f75573086571f4d9f0d949510a2577d2f8fbed7e850c73ed4c071bf9a656d09dab43a610b49aeaa57333f67d586d4f50683dceee4942db9549f68eef4c5f8df8a2330857cdf2fc4025f2be7d5f0dcdc74a9cb593de91282787b716d416a3ccb8d6d40fa3c70be4ecfda26a5caf3724fad3d98db16ab6d8f26defc68392923b69664b0c2d56f01a549284b042bbd43c8faec940187f190aec08d06f9a62ab03c9f610f64c0010a0939451d5502511dfd3da1fec5a38f64640c7b6db2961def257eee9a3eff944828e9557deba68bd8e42dc7a9c1570e35537993061fa0f5351fd3cf4ec36386ec4cdc5a2882d5f16703b900c5000efa63888d69982e5ecd3e329c8cf5f003e23ce03c55631246ca15ffcadb0fc9d5634252ccda812ba7bf5e343c44244026512062a68374ed4d8add0855dcc22b30148e0cef0f2886be76bafabadf3ae1205b43c6deb8a41c338114895dd6b49deb329ada31b350e02a1bdad4eb05b61b50f9d22fa2863bd607406f552713e302467ddc78213d584b4933202438d63f99d011b97297f5589f35b7e45ccbd76f02453b7a7668c2b1a1f5d1d63eb805c8881771faaf67433eacfb22f9b6fa58b93f9423a5fcf667aeec39751ae17ad36992556431bca77059a29353598dac12bd3036633d2ccadc18f44123e5bc074f4e5ca380095af062fd83b647015259be929011cfbcdc9bc5d0dcf9b688f0f5d74da95746f447a9e1cb5028ccb2827b45129d04cf6990953a6d8ee0e67fe6bdbd8004f4744cae5607fe7ec4a0f14fe603dcead3367b6870d8e751cf57387d04b881f92cce9772d695f19b36e2db2cf6a807c9ee83225f5c09a11b50e99855921a4eced8e631af7c234aa31615c00ccdd7c6ac5ae8fba6e29cc233765a891864c7d73dae08ed1a3c27cd423d8d4efb550597afee8356c12018f496637daec83575f5e38ed2fdbafabafd38483c239d31cb4d104e93d16eacc6050033a3c86929be4ca8914a538bf540b43d7ce7daaea317bee1ab80504846554879f900d312bf2fbb406a0edc5f4f809cbc68675b0b7f09fd1a8a4d52c0929b3a8b9c1dae4b3d599b976867e6a7e8736450dabf5c49c949544386a71419324ea4ce5c4319899ca510f50d07ace57b013655b0929f79dbf3cd629ad17bdd10109b7c53a4f5f04a16e5471e823c898362df43f57ebdd1627b33fd4cafca6cc065d9140acf0454d5f99be47bc87e0f3b4d4320bbf0f21e7c261bb8d5d615963beeaa46bdbe9b83a8277813ffe6132b23564bef5", - "74dfdc364097c39ef91c01b707a522e28edb1c11529d5050ff820234e6c0295aa00591e09d547e9671804d7825705ab44b76c59d1315ed1297ef477db070d85076693013bdafa92e2ff6a654660008b176cd4e8ae23b9c792be3f7db54cf2bca385bddf50a8624397cca8ee3cb96944164e3cb461e68", - "b3b5ccd7ef49a27d2c6d13c0ae77a37abec2e27e0b2d3530cdbb7f36792a7d2c", - "c0494bb7249f864f69beab46", - "ed8d6e964bcde1df68e7f362243073941fd68ac77929c8e480c89f519f748b3dc337b1af6231632c975167a8425b174b42c2c60dfc0ec85a0a212bf5c9aada818a83f9664c8712d96de1036b5e5d8c8298786b753638de3a8da958549f16eb9c723355cdf7b999aac464ec39df7d6c1607e81b88b63043d1c847dab618f1b19336911b4b0145c2a694e61db71e021282006d48e37f10f3b6314dd012a07618228532c28ca84a936e0eff83723d117b2f2db857d14af5bbd5948a0e53018b31e57cc2a81f36aa013a844990753ccb347fe98fab294cbd252a8b8f7246276275d2780511fd3cb7baa2fd1548184f968c422230f7ad73ae9dde91295f79f6b799e7d234dfd6573fee6d6ae748b0a8cd7ed4862ebd957390826f276c2afb01fbb4b64b61a1bfc138508efd630e77580867bdc1e96a48a694cf0db6c2a11f05dd0bc8769e7200bb0749f5798b6f3559de55d0c281eb5df22b731fbbc109da9c68f209b888e61240c4c0ca006d105c0a7f43144021547d3316e5a99f6c429f9ea2f17d77dc68bc9d5125b6260f79bc8b3b8061972e6757d87b6544f21645c0b4debe5224f7c48142c09f35b8e144c0c1e6521f04c170519ff744d61abd59a56d25a26c5ed5972191b25e78e2140f3ce68fe17be9e59a79f6c69619a79b83614c670c7736d19c27fd22515fb5b896a6418cc0b4850e85c07b38b995cffafd9f69763cbbcfa9d1bbea6868244a66a5cc82e815fae09f5775d28437634926d571c2b0d200855e09cbdc67d10f85bd4cc334ded4c83aeea57f8e373a950f135997666b653e8de47a3bc0059525720045996bff500a47baeec97808fe971d7693dfde339e8beca3598fbc053121536c30d0af10f8f5d8e5eeaaaa9586d7abb563fd69e88351f93bcc46520f6d97c1a49ba9f8f6a25cdcfc11b2a722910aabe7435ac8f0dcda9f824fdde80850f21a2d4bcbfd2e9fcbd14dec05c117a9796db49e2f0dc55e74c7f0f615bd049fa7d0bfcf197dcda3ef3de90762e6f6f9f8a8936bd04fcf2a97cf18ecc8f2f118ffbf02b67f252097e4289d02f264161f6f90f79e1e1ef8414b01a9e1a77b88c039ad6eda6df1e28fcfe9370f0d574aa9e857dcebb19eb7ce8af9b19b4481c9fb3e1f0db3b02af483f737ce3ea824b2165e7c0fca8585383d4b0a16eab2c7e3ee5c038f939a97bc8e1c093cc5372ee45d81836c988f3ab3e6ee0e5f9549e4b7bc381a2afac2074cf75ed56b0e757e7966cb253d549fb0902da98294c6dd4de3c2e166b7e45098d2729b1393deb68471d4d3218dea3dfd0183b654ae4092a79357945eea4b28cfd06b40d30d1b4b8f19827895f6f908f0fe511f74ec84cbab2483ca4bdfc6ef50178eabad79b18b58529c9328c13c52c2869858cc20ec36ef7717e1c743d13f9607bbdb0b701d9df6aca7366814e883d23e51ee5b0f20ef70e2c4134ab037d213315fddc89009260981329a1872e541767adbd5ee9501e7df4ef0cdfae9769961f8716ee7dfbab0ec89b3f62e987387d5842e124a69b07245d359052ada50cfd67472d27ce2c4eacb5421b62dd7331da54ebf0989803797f4c8c781d0e2e6477b421c7d5cefc8146aacc0012af3f1f7cd71ce2b1045d86bf48c9a13fe469a1865294e160b4975023d0eb24ed26837afefc250a914f86f8b1f5d67d65e9737e841519148d4dd5dbf2b5a8b073861288ec9793d4b113d71c01727f67d791852fc3946dc912d60fc66bffccf4c45d859eed9f0bfc7f89086df5d5cd830ac919aa7cdb4504018052d67f6a3ca012ed69187cd5fbe91875cfade381bff1e804ba59cd59f0f75cb46dcfba234ab9832c3fb9aa8dde19fc1fb30677ac1793a38d94aefd9ffcd4e777e9e4f6d49e0cdac6c16a36bc2f3ed8e23b80350e3be6d866aaafbc8cbf7c69fe44c2aa80651164803150c23ebe262aa669c77ca94d215895d2ee9c3e325a0bf2c61e419a41e0f7b1ba8ee0508307d49301abccd5b74c054b6c7bd1aa67cffeafee033761d8226d9dbd7214b130a867764062cf4da685deefa23693b8549d5ef5e53df85c19bfb3c43c6bd073e7a836f849587a4747e1a9a3c7194f6d5472d2e3e4c81784a3061fc9bd3b94862c4784974d859134369486f2651f1db94f511c6f59f41da0d75307191602730b88e4e6101fc8d392c87687f3be454dd92fb8ec380715bcd88aadb63717cbce4db91a36821a572c363759d8d0a2ab007e5981b78731dfdea20d900b14f0c5ee6a4a9b532ed2134e6edb4dc267f001cb88dbe43aac4aad453b839d035697df7de98ca7a9ee7601228a79004b89796e9ab971aeb8e62c789bb21f38b77b492c57db402bf6a42ad0cee169e9251d865ea3e5f79b1801ef1e53797aa6c7060d6f9486081", - }, - { - "04cf92a64cbe135f7fc1d7223b95e41d13f04b482018039f4e7ccacba8aa15ac79a752c5666524e527fb076290ec80a3dccbebfce3ee9b316a65fd130f12bf88b9124d1f7772049e6d0c01fef881a1d44c8dd02f7b6b60e6d15df9e06fb86929cab64842284de09659e19451623525aec2f5dd3e603e24319b1d120bd57b34a0317ce25ac9c2f022a4847306b998b57c8d92baeed0de1f6cfb3177d0acab70de275238f1152813b9ac87bf651f74e1ad079b9bd779ba4374ecba459865b5768d08ae7e1dd691d6821895e8380ac9e5116580e8de3a2c5326e698bf4c4d35d955e45772bae8483d01de2539e8ee1ef9539ee132d80d85fff41dbe406af319c0d7703292587bcf5959f49241e2b03a364e1b682729ed261d0ae45d74d77634afe667413ee210983b042a7ce6dbb61c29d18450fa7176177b5a74f032ea24e1d08b220f6d32a7a836d1241cacda39d6acbd26a62f9dbeaaf7329a291dbf0aed4a2cfcb85ea360947585b1215feaf70ba71eb2d6bb7081b2a21bdcbfdae6ad2513a9dd714d3d06c2c2b7e322a1db2d48f9df1fb44fa066f2bb42b196295ebb3c0898ad55d5b317986afaba0bd5e754cec773821613e908ce2bba6454181f9020b73e758df18c255c87df675cc6bb2b8d2eada44196ac10c26674167f94a79f4be515d8d6a1fd3228dc9a85a355b030845dd4c5f481d5b6e74acc66de730629581b022fbcff61e5dcfb6a7f511aafd577849a6b057021ecbaee53986159c1ba74c3e930c34a159f467f1e9799cd6c1151067c56769e43308c96c8edef8aa7634d909310dba9af2128cdb8c29b24d3ec2a4f43a1ed86d1791c9a670b240e6e719f01827aaa319bd3ff53959a776886a1b7c942a54f141e6bae8576d294e44333e6c5ad90f74863f69bf890126016b318e0f6bd2f0adb9bb861118af5f6cd28dc93d56c8a1dd080b8c810ca29267d410673fe367dd9d1353ae2bf2fd88d57b4202c21aa49f12a01b93acbe260492367bc219d3afb6e6f35502f6529bcbcdddce9fe8632efb034a9eaff8b4a48afb105d04e3fcbbcae010ddd6636992213750b12fb3e01ab72aa957136e0bae591bfb5e0fe819cac82a98ae8df230af399160594540640c6b1d537e7b5f1cc47b08127ae02c35b846de56c4c08773fa18d4436e14b76a7fc4bdee301d0af4880306f2f33328ab79f6f24ec779b2b1928704f09bbc5b0b7108e9a115e4959df79c80eacfb98649a0788867e23b2974b22e654ddab0494bc922ecdf17727d0f0efde9dea7601857d890bfbacbd93f7df794bbc254f50e1e17eaed2f5d5a2e6c58083aff68434730d406fb9fd02b0dd7bfb99a04aea812b6830fe5e05a044ca21c77a174bae8b58eefa11ecfcc1c977bc6218064c9931b5c92f13cfd05799f11e130869c293c1b08dd29c899365014fc8195514b286c97cb6dc4b8633e47751f87fbaba137b6aa04d072ae06c2b2f34448449f60b1272c1efbd4722a2be749a3d2e5450aabef1f7c51bd8324607668a8caf8097c2f358b1b09fd3525d47ec9a7640eb20ffdc17c4f7eff63df75dc7830c471ace3a727feb11533d6e9a2a08106af33069cf482ec63724032e81cab18e12cb5c4c3ddc374e2f75bcc99fc5da09b80a738852a14e8ac552b8471c6ad52e35317b730db2c13c277e06c643e0d0fbea43833de4d2c7a9247ff040e9c56f1ff7ea92049c5341c4d1478a14275a10119d934e8165152b89951bca7ee1399dd8232fdcbf831d8354640e698b68799d060ceb877201b2fb96cec514affeb28721e163e1648164b9e5722271db9b0ee1a7f96819fa1b1590e9daa598d9571ffa3882db9d034056e9b2785a8d13686eba61d7d45cf2e9ecdbc391739ce89297211472be18b21401658c5bf29fc3615924382d802a166d05dafe7876e70a0d081e80c63632da379766928a0555eb5e7a238cfa4da267527c66caf34dd40055f2801b29b3f5604a5bf3d46048bfbec2e24abd2fed2481698a4b5cd71f5d2c12dd473b903c9bdb978eaff7d76fb69951005681ed7b0257054eb3dd6d10097fee51ba7e8d565925e4091cbb78d255c9d3ab4ac0264d172c9bcb0908db1288c9634248f198a1167daa323822058decd83936985f83b08b1e7b942756a7af200af168fb8a091107b4443fd649cdc22106f9b9657c69f19be485c23b2c715b3762c332eccc44f380883357d10019f20612ab6b8f155c2af9e2ec340e5d8f45bf5278ac1fbc9f9f44d2f615d21007d822b244b1c7a0dbc182c7f5912485d6e4d74e90f60a2f964e028c63d49c6aadbf1df170e4914ca514139ba538207b1cf7caaceed4db8423dd1086b2adf15f6c0e50dcf2e12898f53c339a745316904ae03c38b417bcd7f5cd5ea77a4f06e65d56c24f37ebe72d271ac79b6ddd2bb8bd67f0727ead49737aa71af4f620da53769ca3ae878adbaea5a249128074ca3ddbbbaf5a68f9cde2a0e8d69708b0ea7f4c8d2dd4180882bdaacccf2a409a681c551776bd10439fb12b7548342532b371c0e045d8e8c895929464bdd4fe25f0533c66104daaaffed52446094978bcbb389c", - "001084c8a5175c0ad43108f9215c35886c82321c800740c6118a3fcd45776a4588ee0e2d056a37d99b40d2bd9c0845088a77240b7e65d18fef105d3488c77910b5873dbbf275948db5", - "d614d2e671066e387f7eee07bca9f9313d86e6a4d1371360900d670e11ecf1e7", - "674a516f8f59f9067e0485e3", - "1ee376e9e3c89b2147bcf75480ff0dec1d0e8cd45ba812f34c84124871d484b4ca87bfc8cf99f85ad452c482933801426e2737a97468809fa36caebebe8eed07a626b3bc3614ef1ceb54f9221ecb16f413f0bd9ed4b3010c40632f05223484af7bf5948c2fb8a3d2ce04c53e3f2682494f3969a0f8eb738cf93c0141799c9e6b68924433f0326991e19626bb19e6fbb5dd46baf39f92e830f9b1ff465a007f031891fb1f1799cc122d3ae7a55624356b5297bd5d948d9ff2e414cd8adf00a53524df43f398938d33c93b2c06bcde2679566c0a7b0177b4a873f35874739d550712d5cfe3d25c19292ba97c01d84224738bb25546e5c252fe5e5f260ca881aaf176a271a6fca2edbb2cf23ae6d4c56c20daadadb8205c2e33881867cd67ae6e59132edccc3601f014b744ff8eb6aef5e09b358607695d3af42ab8fa30e9fdf99ce54427ba9da3699de19f7a8f9be368df47ff0607601a91e7a5fa6e72be50bb32b825427cdeda3972a18a23af290986cde14f5fb9cbddad336f5efcd2d7a0cf3d5b23e54b702352fd5ee52d7e3479441497d56e17d5868574c56cfc421ee47bb00e9c75b84262a1b9e2cbfcccfed9c4c386ef0d2c1be9a7b7556909b5d72a38b7258acdd624de2396c75386e077c34f005f92a2203c82d1072c8998f03b1df22de832ac733977705453b1d72336b8d371cf1ed3923f462ecd22075de5df68c83ab1e6648ede7fd5ee5794a744abcb32af73bcb182cf97d36f37c15535c4107b7c8f2321f9fe0e2b6ccbe74204df3d748c05bc1e0e2c55ae1aee2d4aa4a52e98ca7229d6d06576196ac8e4b14a9ce807075cdc876aaf904c9962741efa8c6caf41e6b87b2ecd6636e2e58f3ecf576e5d8b895162545e618960ff6e336ff17eacd5a1eb335001633fa78c41ed05466d904ef9b81b643a043298c0e291a085e4e67da72e329adfccc407f800709865147db49cbdf4232073b7bc7ad89b3dd901d927ee08ae6497e0f2f9d052ca8d7444d2e2ae2197f930a7b1c8af38d8739ad298464169823684612cb628c484f710cf9c552551b6837b575a43275100bf800b7a3d777adc44d07f67cee5000422b9049dcfbedfccded0f2aa4d189621579b01e3fdaedc4d772dcc593316ca85e7aa248d219dac21c561d318a4936ac0d3bd5c75311486c174e0e2182affdf69bdd6a086534e4a602efba2b9363beeb5346539b45336cbaf479da6b15b226a9ac026482216dedb84ae3443b306820d9f05f78dca7090d727c7481d82c6e5df80e189e24e46f5758e453e542bd91a58eb51a89e07c50afb543c6b998704432e863dc4c0d0236e0672835a7b0b64e14f5ced2904e54da4287597f920bb4d542c35d3b0271cf0eec055656d523d7d2cbd667445d3e8634854f8616b7d7a7f3e14fd32651e9df40e1daedfdff1371f16d5549ed5646adf2d417e4b3a4d145bbe0974ab388c2716861a08296b862e4fd035163281457877eff89dadb160eb2b780414435784804bf4fd36602699d8c2f6a8cbcb509198c38e2df2edaae7bd7c93313ca98a9c2d24419a12ce35b0b3d68c18840e3ff8739d70969927c7db9a6569787bdedf5c99948a9e79b2302a83a71159f4c789b3b3f05f1e574f8a24c899ae3457f8e73f9bd86976fbddd83b1af337eb8da4c0dbac3792921597e18a2fd3a0ac89a270794529d370d36bb6dc7452e754e903781cbf57c8646b92d5d02842e7df229b3d721f9b981f9d61a48f00e53948a5dbc4f739849609d94aba3e3f5f8163d40321576cb8eb8e89953b608a01184d41aafc13f40c47b12240e3ad49413473c26b6843f4514be221c2af632d1a54cba230457f23f00b2608485c381ae03b389ad0a1671fb416de4659cc7f7a9c4b6d9807789c307d061fcf613b96a2d79e5e3e20b863c8b1b75f35c982b40ac8dcb7d2712ef7df94901facef783e8015a9a48574aa6f0cfb0bf6c1a3409028f8d62137c347f5a35ad6a3cd60d71aeb29bae56bb4590f69226fb4e08fab7a9f41e58f4d5784540a70e7a97720c549c8440b089eabd0eb3e4d37a2e54b1160572ce568f4256dd244decec31fec555017ebf488e878945383750eff26a8a1cca73e7d6f52d8cb229d5603360a3bffec23029ee34145c4aade82d486758e0aea9e1b7bf0b4bfbd4fcc96aab66a27fb463b48c6a6c5c5a60253e2fbc5716ef55629277a5f3b89c300e21bf1226241ce0d587fe3f5b11e47f35614169dcfaa375ee1aa589be33a4363765368f5666d155cf72e851d426fa67b982aac4dbbc29356d71deb0715b34e00b9fd8876bbb09ca0701b15615f05cc45e128b3864b26003e6ffe801c4e27402f37b8997e0c29ebc273dc03358cd22fdb68d9cd3b56ff8248a727c2d4ac65acda4d0e0f511bc07ab06cefcf444f1002c151b953d7f7b19695668a86683497c2a2d2e69f19a4997148d2e8d158da859c8f44437d9ce9db92f84a88e89cbffc74c0ef4295088e2543a4f7c6ae9c908bd987bcfd7a074f83ffaf3888bd7f430dc5a5bb70d223c21b1bcd8bff2103408460df864dcc168486f6a66d67ded366c6e10f50bcddada93627cda711764a57ec36035ebc", - }, - { - "ce72c93caa49bb9850774149a87fcf8e23a0c53701554468645554553d54190bc6e247712b02097b794bc421ca94afed34742435ca689d2ebef183fb469c060c7f4d7daa508726c9d2eaeb9c7e9a89b30faee8d9168607d4778acfbd27d5caa623475073ce763ca061273cdfc2c692d1747baa8a01b15f783b2e36620400082747599a16cfd6b630fef310c0b9a2912d1d3bb71eec16972745cd8a49cd927014eb0a2abbe0e1ebded4fb9e8d9e2fbabb6a71da5688717ecd3e08160b9a861f86904a41702b2c4fff28ed8cc61d468187b75bde3fcc5c0c0a642215fea83584387fc5a9aaf2f8a91ae535e0027b618a32bd687289c47e9428a1a92649deab825d702b076223b07c08e55c0b60be95937bfd0504c18398e924420f6e20baf07e2b1b858d3e360a461b66517c24e60f9fe314a4a4973c8dbc7e9d2a9f571a1d8235a21073d81ab9f4800b70a5f17f44d593e8792a2507e6a3a41042fb2a5f7e5f028ed2daa88cce28973ecd88bd125d50fad77b1fde61c38272057d9c65fbfc6789ce41315a105af14e277a0c39d75c34aed7538c39160eab1c8c47818743e8111229426c399c5e88c4d894fdaff0315ec885ea019bf9acb785f3380c37201d494a60b583fc130bc0eb9fbe9b90eff95874e35910dc05c761f8006e2f208b786aeb2eeee841f9a82d9966c82956c181caa4dada81dfa2e2d7a25007c2dc7f2dc7ad1bafef14581cadbee4d614a557df4931b9ca105bade8fdfdefc0d96eeda11c08500b1ca827ca670ba07bb0f85af92914c43a6f71226d6e112d487f1ae99b2239a63ee2cd0849d8a9c488a11f82ca334604a2b7260f25373c6db75656527890f9b772c6bfbb9f687f27099ea9d4d1efd874a6ff83cc36c039ed1690408f20394692ff054d9e6eccc6776b6f4b3c5f24b0052334d159f40b470a9b8799bbc0df4dbfe59a5e536624cad193160ef23abef85df2c9b6e6d4fdf16f848a2a446a77044f1162a278866c491982570cbc16041908cdd0efa2cde011526a3c96d4b39a23c5fcc53d8232869cb4dea871f4ac8afc795aeb1b28cb2d7a3669100a1cab2ee1a7f31e2a25a5c6da836e4b771ad57393305faf582adcd26045e26b618d9943358c615fb206258c8993d700adac7440dcd3ef34fdcb065e10e9c9727662b5abee160aa01d2f2ca6c203a76fb01bb08cee9fc1eb6bc7497bb012ed2774a2d263b9dd03d60c307ccf33233ee33eee702c8e3118f9f86174a97462d0e804a24bbd7f4f938c7f105bb23399967288069e1637b60f2f1883d88ce5a874ea4bc0a7ca0f3b568e4bb1407e4bd6f0d3dc8fe91345f8435d7b1be961c45e4b0f1ef2d92d2d30bb78e1fbf72cd2e7ffae76e8c2bce005195c2003bde46108f37ffacdac28fd67a0de62970b347f0ae3f5f3a5b1d3aacb2fcaceecaf2ff4a2aeef6f5a176cc1b74b234f5658ce603bc353e075278a4056540e43033d37a6eb2615453d8206f5cd294423811283bcd5d79c4afe268a547b98977ed5cf24c0f53a0533bc0b2889356cacb67e2f7353060f9e04362859b1c1f02f96bf5457b58e5ce84a6810d39d7c7f53faaec64db5d6ebb90c1412bdd503ec6bc240c277ce1f5f18876feb24eb6a77e5193e33ce141e8720329add079dc9735f0a35d7d85436f1dba6dcff9147777760b5aa2ec9c8b5e9fb4fc602ec8f754c99ab2372ff5963dbff3fda91865108e606b214cf7acab875197e78060eed52a798751998ce7c73cebc4d5f429f6729a5193d7593072d0921ac8127ba6e796107ee7b9fbcf7128ab35fe9f6fe501fa4695c19fd64460685f287acacf5250efc13899bcf80ad5a340d432a0b9449affda5c8fa090f008e01873aae7d5fbc7972451542c5c29cf9cfdf23db736c8a7112536b1b626caa63f3e4117044cdeab612fff8d8c194d19174f56ce761f6587349c48fab30390f231d209461ee7e18007d10d83ea5aacf199f3b00003259747b1d03274d3c3670595604bb4482d345ffe31d3e88c70da16649a2677bfbdbf618de1d651a53d573aada2eee5c01335ce5519a6d18a70f7ff0b1e66bacc162c49f7f29b9d3fe2c7dd85b6b355c9f9141f02baf08d2be87c36f6d2e1b2e90dfcd100886e306b360df0ecb146a6aa5ac5ad05b63a219ea65885894a386248254348ada17908d776f9b438306ad28b208f80d6b9b265500aead945134b9d388ed5d6205edf07c5d8bbfe0916d0943750150e09c76359d24e3317517ea489fd8a501dd93f159f07d19d00e86d952fbdba2db771910143df346b30a30fba908a1abe5349c3f241958f428dece7ad9a91cb42035c43573b87b26c2ab216cb4c21799f6b3d81acd300ff50edd6fe7868b9ba6c160db3418565ada027b46b63e5d4f3411284fde585ed3673b424ec1cdea678e4a43c262991c3c9b988351d6e0a10af1c959cf21b7a288f2e4d7b3b2c11b400b5e036df71fa993b72ce48d0d8598fe4ef1ce70a970f89b55cf4f07906a479bc84a08bf6ab25221de37afebbc47ea0b38b87be128737d7d43cc84d336cc6ffe1677bd802910a2084751f30398dd0ed09589b2befd2f3b40fbc013318c822fa2faec2323fcc52b43161f47aefc557e92df3050dc5f8b1c5a4b2f8bd7b2ba7aaca79dcfa362fbe7781a2e261683a4a862d5f83e34845a8fcf8a1aa73cd521e87cbeb71f20b20698cc34bee3b8628b1a3784596c", - "08b3fbd73d157e79ea9f61665d19867dcb8c1598c1d37b793606936d8aecd992a0d46addeae857d488b83be5d1c1639d4d78350e4cb08782b61bef4107c9d3a79d3d85", - "a56f38b4bbe83b3d9e562cdf5ef5b30593f08a1a166676c4fb0d5861654e640b", - "8726dc5cae9497936658f603", - "88420357d1ad70e7c7bfd55b3cfd4bf06cd4e9b4ed5cba681045199a06985956d35fe86b28b9a4599964930d05d230a23c55a6a152f67082a453fc31f68489df05c553f9ae5cdb3f611445db384d79af865e52440a876fc4153d896b7a2318dbc2a4495ecdbb2e9dc68022326d35289e82aa55197aedc266dd91ba3018c7b474ba22b4e773773f3e9890ea84bc16a6b235e4bb69e785c40c1adc15b0e0ef03aa147b0d14e62341e27398b84a53f72c9199cc1c94cbcad2bd31aa69c96b06d01775b8c0f80278a43f526664bdd430164863c9c9140ad87798a5b8f38dfe90d37f54d1137709d5311136b728e6c799da244294daa4c8b44bfb0acc603a16c088a081129a0d2cff55ce1c4ccb486fa0ecc3098ef2196f47c49f9d253112bd5746fd99df5d2be577617dc2519c0ad04ee49ee1d7be3d50492017108fffc9a414ea227af39fe49fb2c895fcf00d927bf4a2d78c466fd44df4768e6775d39fa5c834b60979ca27ee9f00faf37a090838f56275a894ddadd265a8d2de74265e4d8d286639ce8f01eccd4f551cf6b4429eae3f08902b6ce6ef422cf91ce8946d9403fe8064784895b62a7f5df76ea294132c59da6b9f53d4195c1e9000bec499c14cf8bad460aebb024a76ac50616f0dcda71c0f56dd3239b11764f3ed6ed06c049b2ad673e4beea391dbb854fde1f01b1900858b9809259f3906b34f95a1c6ce8d24fdf0cf7c2ab7bde2202a7f1482baa6e51caaccef9f541c377da620bfbc63955cae0e6644ec8ed6878f704f1dea30d6b50d4291892bad19b0234582d50c6cc0b4165322cff24a9dc2ce1be35be0fdb3bb7abb777ff0b2f4cf16277388af5a89220d59f1f45ee9cc2a0fd7af9aa8e9e8d548fd65be4e47e7f8ef58f7701f93a42e7ff78f70e807fb63513157fcba96ad9731b2e8f80da85ef407d5c368ad16f0657620bfc122ba1b10d7ac2bf46d8133a9c6fec1fe04882f3d5765da8f825e1984a4313f72b67d806ed45c000dd3ddedd524d474b9b5788547d0712e8edb4c6c586d0cdf8f2384f1e093a7f6dffea6e79df9cb9398f5d0b9a7cbd63d489430fbfa397a0d03ef916b7702f33a54ebab84a7055b7ec6179b0ab7722f03e126ed343b1cdf2af3763df7e3a070162535514b01ad86c6cb051859aba1cc4766b12c8cd57b73fdd3c65af6961c45395aa7b885dd59e115db885f644e1c94bfa26b3804f767601c86e2c7dcecd4daa59955e6a40991a4b4701e63fc82b46dc0ccf59af40a8583171375551c868436ede535705f2e6380c5899cddfcaf9e94314794bab98846cd5ba9e9afbdbe1ea7fec5e22e7b2aae59fa598f4d6c0cc6f936a616e11bf01a2acc891cbfa2bc53c511a8a3a3da2e3aa5907d123ab2a4a3c0009fdb5235a3c33718fe4c504e1539abac6370e06150c402b5fc2f8c32608db4ce2eca9d1e4b96371ee195f6cd632f5b972385f9d5d357b87c78cb4e2c27aa9851534de14de923543f5fd9d55e34d6e8b7e1f3f2735df80046de01f79d0321066f9bbd76299c7386d285f7bf4ac15e033e89a040710c90f87aacc09fb8159f93c8b4860247eef079e32d05707e88aac734a2eadaa853f528d9986e0af3435b5c5f44ddfdab9b0c9ab3eea97676e920f80d1794740067f9b229fb018c804e595aa997533a5e967cb79ee58eea18995a90ac08333f1c69600b17ef4f454f540dbfa8b502457761bc4daa876d9053ae1f55001b6916ce559dc6268d01841255990e56614e6f4ee4ce04472dff0657360d75da4e83a71c852a2585110e53137e91bd89d64d99b5614ab2a5691c876f15d9931b092fc6729c0732db5cc40f966fe440ff99d7d05b24a872f552c27fb0cf2af443340b153214b407fb9ca3750d9c157aa75763b0b7600959663889d00f392d6ebc12835bd2f03ad802a21d0228f1d2e9731d0f0051eb2d5369ab790d1134c38e28d2bc2d5d57d6d897244742c176559961a1e40c84ee5c8225c8d72b92352a011e3785c262aac115cafccc2fe1b5e81a677a0220f207ebadd786b93f58e40eb6ade68ddda5b66c5f0f6b4b95cdb8241156110ba3303beb79acbd54423315768bb43b4fe8c4a465e50c4e63bce272c4d731ea4c797e14b2de31ce4264e2479179b906f67af4a23c56e817abafedc2c7a65aa45f0c89fcd0baba60561a8d013e2d5e0bdf9fbcc1346d3edb20e6e9f9c410982e1ac43039ad8fd0ebd453a6788376951fc20374b59946a6803498929d9fdf2e0f5e58c441329a79d1232e957b3a9ed17231c663b4819dcb6b4e33d205edaeb7d7ec466930bd84a064b40aa67fd76f6ca005408062b45b5aed6f8161836c7160a8c8313dc9aa1c6d42c2c16972a1065e41aea9c58db7916e1670cb42a8b54d85498561b4401761506860b19b446655f8988101fb4c45067e30edc3f00df8d88ee34111dd6626d605d993ff207be09704fd8dc242ce514bae77cecd20f10d4a38435a3f5e545882fdc224586a04ca6a162e118d23716240fa67892b78faf98a17916471f7f121fb9f85497a0b34bf5aaa4ee1ed8a4681bec55d1b4973d4368600115bea70f20a37c9e942b87f6cd1e2ab70fd401e703e3c8334c75fc338508e06d6370779578fbe737a75954b4701bfd92028ec32d3d7ae606caaf9f049d9774f70efa707c1c1174d9fcb5b0a0ae2a961c6f58e48ba82c2db14ebbbdc24288e42879f547b855c86dea9a3b9877e4b105515bd78cc43465", - }, - { - "bf7884fab52251e202afd7b5b46aa53f85bca5fb80a009d8016e276579e401385d853312a884f4aa33cc5fe7360426bbc0ccb7416cc0196e2e40d3a825d5e0825a1394029789acca550bb28b10d847d0a4fe1111be2b7fec6b5294902775128288a784203031ea853c9c104c75571d19552e2a1359a900c5fc9455230968a5920f2ab23f5b9cc49739d4e4ae2c01c7812ff295899b954e9729a3bb330b60c51a8a7759e5131d7d4cf261fa1e62c29f91b4341a4fc968e7f30ca2261702eb328d628b7275a9efc29b50bcb9b27e5844328d5e8256c76949d30b6fea0d5a1c9abca80d3251fcf4ec4db0a5ff2ffd43618aa2e3e1694c2a3c579a2665f443ffb1eb0ce33c09d7285687cd55b6ca9918553bfb36a44860e09ffa0604ef4904a034108370195a986fe165c598305eb08599abbb3df31b1d93162397056d9ba5a1ac2812c582aa356310fafb4058abc5f157802e4a9b4bddb16e75b6db105b7dbc838f820539b76949b1648909104efa67ce28b16a738f1be104d2bd142d3ad1b1c953b6020a1f4cbb84d5c49424befbf2e6ac5c593b783a3f4af75477312528fa78dffd82fe493d821e011642bf1135a5be91fef909383953308dcb61b2f35c2ad259acd1a2e953c0ea6a03a97b384e39c94c33d3846c26b4f9f116abe572d5b7cb81886d6adc2d544630fdc1684bfb32972e051b9a2bd0931de63e025813b923944290fe1ebd5264ee4f25569a2088314e8d4ce8b91c7bd602b9d85acc917d60d30d5ef1cbb055b9ff7b0f999b98caea2517d2de334eb436078c90d41e0e34f11b93e3e643389f43b3afdc4f47a7396cbe0b4bf159ff27618cb835aac6699be1fc7ec840b767836a165fb95d06f2cac4fe15b65714ddb8a095ed4a5b57e63d536405931b6c168683763fe07c32aa4130bff787d4d440746a2dbfc584a502d809076b257482abf7f8ead7741c82b54c41acd41581148aeb4149b0c6eeb39ef7ba091c2e8bc72583b2fdf8ce7fad1bc05aefd6db0360c644a9760a9729a88ee4b2ab123d7238c12435b9f3b4660e74c0fd4a9b00aa614453d84fea01f779e5a924f8e79630a8bb6561ae19c7bc8d88b9d823b98285fdd65d4cc05e443944ed5d3cd4f46c7cafd1dd5deaa519772dd24f508bd2d588a832d5689119a2d506ff11dbf37d57a24e35ff38da18af07eaff5775d12dfe795fd3e1f0ec83c5f283d6cd76532519a15a18d93431893b1b88929159bf8fd21f62b30f4e37d540baab0e30ff3349a08d627ac19303fcae8b8e3fe44eceb66d30697c7ea051bf5afdcd8bfc00d49c8d36164ec9194a78a4d8b78826863e93b6a810354861f4a35ec12e5ac102f74e390d9c0227e67acbbe3254e5b892786e3a88a383ea9726485854a319569a678fa70392cee90c9aa83eee8df6800565bb8e083e78a064c0f8b863120efd799ea57d3073663c0d0e7bfb9b717ca1d6372fdf75a77fd9677791cb899fc8033d6d806de1e6aaeef525ea909666316d9d604c1207cbeb6f427c3acc1b02cf59704fc65135703f2a9529bb2c8fec992c4de53e54b029c3f2a5fdbec1008d1a70dce0c11251003ce62af712b9e4abe631902485404e4933f346f1b4467fceb65baf776d0078aae6a2a1f95b85a441b635663c75b485a8a7cb9a5c12192ac874d940e2d9b88cc05a2db9b5b35df769925da508112ab0b8f64a1408633fd0d81810baf2c846b222736bd826c8cf905b2c35633d6013f5565e0a5ec1492e99613f53530799052a0d70023339d1c394fdf9f73a590a2faf68390d2a823bc3e47a173782b03dacbdadaef1e67fb47a7cad71b6067ce5b5e41fc20ea1fed28578e9bdfa99faa657a754488ed3fc084faa7a05b0f6eb66da0a28e9ab26bb319fa4ee993de840948f94dc1d68d926b783a0bd3396a89970b2c2595de8148e87b87c21f664618af4f567115d403715c3d7d2f66d7a90de2c5237893a4c18c20494e3faf94485ed39ecfe972c36acef0d7ee57bf8755924c790ad02dcc5c4e15aa7db53eb6040244c3ebb7874676782e54dfdddc256018ae6af8cc37450a4cef77f21e2e061062ca0c2a514290c960f5993ec1ce9eea6d09d3293118237e079b6015b966361c3032368174d74ae5cce4148ea2b3690fbd3c28ee544c5c5bd7bc618122979d52c9d3d44eab1f2467f338e695ec5f95998bbe77dffac42bc2809d43a324e0f5feb4ca3d5fd951b7dc8a9e6276ee080079b68849b14c7573cd02c76027a856165d1043acf99554c62fe32896d120974ae71f84986bfa0c28fcc399246bef3ab90f8e55f913aabf339dd7ca6f0861a9ef712e77dd28740615479f39a37e746c7df2b267066d1649fafe0459f665f3d5e7124db43ab1ba5ff94989acc7fe0935e0bbacf718b33103a1355d97ab416d8263ab369e6cf0ee563a77f2f265fc3856b7d54dc0887ed439a421c14f733ec1d6da086536f9539d23cb8026218c5e783423b5f4ac24c8d5d8faa7186dd5ea34afe299e6dbed73ffa8f415da706442a48808a9342d6209f65ca11eba76f8ef26db890da76671971f65bce9e6112c8aa92523dd5295d748e28857acff408c161c0513b37b855a8afb0764d118815bb1b68f8f09156641f7eea994ddea20f4062607b9919d041c880b71592402a4d5b92464b239caf431a99dc67787e76b8e1d7337af004bcb88473cd16b3f7640e8aaa59ad4609f060a2cdc71a4b3ed22c1506a7050a63bd8ed68aa58a8109980bb3f2b9f9fba9599d7620b8c25e8aee739095789af83529cfbfce5941d7f14c8ae30583deafdc7c25fc34e75bbed6ce4f6b47e9647c12333ce08c7db77dc94161cfc43f7ea0bba39def8bf8ae61c6fdcc0de6308af963c6d9ef43916d0cd2cedb970d5937c9fdd4b888cc66e99363b5a04ae62a4349f01c3933ada64080741b1781754e4a722303faef69e382cd9823177e4d5ac83e76017124a7b1a41bcdbb9c4209e7b42c", - "eaae1c53919e2029c137a80f91704d0871be2c1870d0333d8bcf7f94", - "4c434cddb399e52457113cc7e16f046c3f8301f5b6c296979f8a091a9ea557ea", - "b633c1a0e1ddf4727b149b3d", - "f1de487001a580cee6edadb1ef6b700c861a70c6ef16274447b8c61bb10d2d1efbf104d5f7d7172c6a5cf9c06d886165a2919ee9418e2e8f803d47832dae5ef232ee300d1f973a6298c22d777a1b16264353cc731a7a683cfe31e0abc704460788c555c0c24f281b81d7761235a955c736f17f213a896b40a034609ca8456ec3cf5906d01121b7580ce19d89347b6a59c81add318df487b2442a7a8b5e30df78467abbf46bcd5ee5b994a39ca5bd8846caba6f02f4f1335b73d4e20be0b6ad85966f86d1bb857713ebf947ae936782f1f4929498bbd66bdd5ad6fa252364a5a6b46180e93b54cc321b3cf63cf23d55392475c6b8c8c9dc707924b55544151c7c55ae0bf391f793e52bed70829fcd32b2926600f65be0943d6a9a96547675426b0dca9cc7b0f5dbc9d5439d0281014c6c159d055d6bd89d67828ba7fd2a0570ba82996037f7dcce297fe6518331270f6fd5ee63d406cc5081472bc5f2298a9208dba9398ccf807ce9af982885897715b3c5742456f756d79c70434a9baf7b4b6664c9d9f5696c5256b74099e593f97a2d4a469cb3430d0c3eb06083398cabd58af598945a85c9235a3fdd9ba7686e54d0de9afb594b1bb030be8e6bb839f6b45699dbcd2f771db64b0c62bbf6c8672fb412d60c00b3d87f82ffff6512e8308877573323c5a2d6a216ce3e2ce07c9763835ae59d44d7958fd873e3995b62b1b347e489ce86e023ae27a6cb03ddec27a38fb233499a714acd89232a91d38abce30299f38f437f7a46df647f2be862c1e7bcc1e4263c2147b13ee5b345b7fcb973f3ac71db8bc12309f67ddb62659bd73fbd20664eadcd23a79233386aeec1a6fcc8c592053954ee53826cb9b6bba22400648887311cdfa5414c96d5956fe193a3729be1434d923a3f9849f6c419f77ea05fb72f3c4f75ccec03b7f7aef8c8e55c8c5480ee505ae1a7594e6a911dfbc39dbb0ae8656f5972eb644c64203a920fe0078f3d050cc5666ed9747c23df7853d6913005d0156e741a5ead3bb1b22e5bd802c303a73a961f0b60d0fa698041c22577b44eba5d6071de4b545d9f5de24944c151de6a189bfdc223e0507c74ff929f06a2e7497e8c63073294b4aba110a006a6e9510a9617405d9ee711831e085940006761822672549d1d1c70e50002c2227f6f304b9a7f11dc05751be2dfd297087044d2e20ecfa0c091478d62c1bf5f0aacd25bb0384853762a51144b77d30418b633c4c10a6eda7b2eac46905641da0b685f85349749a91cdbaa4027fc50eb97a7dea9e8cbb5b5f386ace0363803ba579cd16ef80dc40ba1044b4ecd0e81e382635d7855e2341b18e0ca705ff46990282fe25093a248ca04a1fff64ebee25065350ea4b9e5990da4dd2e28688ab08b6d6fcb54d70f6d74fd7e5e05d21c12f5b140839aa966aea9ee094a923ee5ec704b5b709ff009c20ed89a75468c48b505d07c7a5ba1ad54ed610886c9d84468eaa598c71b017578404c909dbca431703e0cb1cfb975a696a1677bc015a75db007eccdcb21b9e5e119c48f148c2cffcf29e245e52156ba5ba0a8b0031570e4cbe7b3ac4646353594f0c4a9424c9d97845c5e1a4b4016df9be8df3013e5269484cf32258849afbdd733189ea11783f0f64d3aba9b4f48818011e868cc03ecaa44ff0ab83ed12981a6df445294ff672f3a16d6e0d19b90007d4646e967e0fb1763b3c879f548e1103a75c94f3a7f72be78555eafc086c1c58d1761aac60b843704f234c55b951a1303a12705f2120f784c2bc1494432a94c835d908f0edd5cbb169afd2d38087ca5bc5e5df9c3bd970dd2da4fb2a00933538148ebf669a20b5beef0402e53dbfc3a0f289b33b41ca27eb2f036a22f0d02e0617bd01e8c74be264515c9b46b9ab6fc67403a35837844580794088a9d3c14ad9309435daa0396f48017be524856ab6c191350529962ead64bab33171a01bb3c144b23bed406cb05102c693ce5df36eb541c47e871acf56f2b47de687eb9b3511ae83d06b1f69fbcef3225c3469c304741437fcd0ff4ae3484c117f51d24b6ae1363beb7d85d9b61e01e3dee901b90f2d3272eedb384ddb4d3b9594b9c0926595e500f8ce2e5cd407bd7a4e2c8e6f4315bf693e8c961ba5b8a6c7f5030c68a6b995e9d3f9eaee9eebc9d679eaf72a5f1cb6b2fc66edc7dffa2370dd778ea7ff446121999afba7bb35ceabf626c6269bc466d65f7f812c663bcb2fd87d3e09ab7d71e727f66d20ec48a5d2bf0aaf0aca05d1546d6e974f90df85c1393e3d45731f71ec7b5cb6cfb4e5c29976ead6944a99df2045056e198b19905362d4e9b765adb65eb089233a8b3777352665489c9456cceed593c6590d9f3cc4024d0bb92e1a0dc619bf8ae65be77456c18f8171e4d2d846073cf5c57ba93adbc0db9799e3d98934aa6899372acfa4d7d2ea32e20164b79c71d7bd33c94f9a781a25cbcafe563462eeacaec0e8d9d6c0199de85558a3a05d1ee3483351915d8a4e65ca0ab129a2386a9e26aff9b912c588babbcf25f8c467145061b9b8fbbff19d8c6ded8527d457be7c926c8f490bbcd627b3002044b7729a52e94147f95772591616f6074047e758597f410b3100f9efafaa4137dedfd0edfa85b0927804f0b4fcea1a174622116222004d42b36c2c73d04781f2f49d080f351e57154a3980005bcfb0ea34288e2fafec5bfd01e1f7901b3efc71ae58bf8df4cd7c045856103b77bd78073f0174aaaef4a3c0e8b5b46dc92db55478f012dc1b7d513e215e735573257f105d2390b5366f49b61809033c13ed4e1ebe19ab89313c947f2585f0788a0c5de90b41ad0dbbfc604a0d414d0e5390a0f3c9616cfce4097e38e05888b8bc6e55e40368bacdba7e5b76f4bd8fe619746155c30b38807a1ad325b00ecc3dbcf23014e79f1c39af7cdd0dc7ea58ce733e6611b7eae069deb047aeadfc21960e614db19d2e7e0905a9873268b9a24f856c28059321a742cd6cb3d1527", - }, - { - "c89c3cadc094bffd5ba06c600dabe30ea19ad037316fc13b895fe0e14ac8841264c1bf25557e22b01f8e102c3af43adb8e0a12bf79d3fa0232dae37ca3688e07294e2c7ecc4e2eebdd3f17173351f2c15b0480d4d77bd70955ba86f82214004b622cc92f7bf81a5837326f6a83612bdf65abb33c268a457c45cb7467e074b342a17c711c748c74abbee31541444020a9ecd4e5125e2a8ea3f6030bd677be18183a8a34af16a85ad48b7015cfb036789c0a5daf68883d0c7e401754b8d56cd00ff605be0cad19e03989f608392c81d636de859e66c2aae403c138bb96a58ba69b9064a83e7d8877067e7f40aa0016e0df9b7f455d292a60eb621b8107a727a3378c4b7509d3ec10526c50fc6c66dd4b015c915e85bbbf701ddaf2258119c8b9a5132eafe61bbf38870f35f375123f766ed0d4f38b9364a86e56cdef6f95a815a8d7c48ff283c77992fc6c070eab7d7c7b517006e5d4af532a7c429912ebaebac27249b4f5112d870d998e1c450b98c05d08c742dc769506f2d7a004c24ebf84c10838b619653e27ffcc4344d8db0435e4cb77c0410cc734e36738a6b5f72a7600632d19c86b40c737830b0f5f104443dbbb031dc7ca51ab318951e7817b5d81de8a9aa7f5db6e2d5e7a3cbd8a8100653c048204ced3af005d00e7de7b445f5acff901c4d46ff133e92ef073aff1d9ebf55befc32f9ec38c9eaa6a1aefc974bec2758297e474cacea2ba4151ab1a3ca0762c64a5ca273169d29b83c164f77f266c01bd5075871e17426068ed7aa58ef0d1f2959b19c604eb6187acc57e2becea2da93ba23159ba73b9226034c7ee2498e0ba34fa8038e5e2c092a73ebd9329ea3d648d6ebd47e1776941ab3130cfc91089fd0a0a36f0ecf68293343f275d2a64c1b7d27ffeb3f667f4a19824706235fa5f3f04952ff08bb183c0f1aa1d1b0edfd2e05ed093543788f5d0ac6532e15f912163275053b202d772f381900e906fe070cdb00421e78c16b7387be91adb7b3b3ea28b92548d69c780ea578e7ac66eeb931eefb4067bcabdb345a7cd2022085fc494f118215adfa2443630bffc9faa8fbd9943c3140d81c7532895734a9dd20e31c326531d06f5623c252139c4cbc882640c457819c63f6ceed4e03872b246a3766df69373ebf5af1116e8d5e1b15745bd9dbdd663fd4352d1238a43d5d1e74b3edddfb1c9d460daeb49afccfa0712b7a4cf8d07ccd0599ef3e4e1c9b5c814f3a6f3a46fc80449b34df87f47ff91fea3618cab2d5c04cb50e8ad199d752d901b21348ae939d39c86cc1bcecbadcc6f0e581a3bb51e070507b41ea4294b35456c69cf55a2a3f1296f0df73abac3a9c81cc303d1e20ad6e9bef48de83fc22dac2cfc01ce9ff3f70e00ee49bab2f282ceb6859f989075814e690e36a8d16354fd6056cbff49c30e49b1570363498531ff0ad0979a4518e9ae271f57f883abf5e301c0e24a83f09335479698911bca90269a28c0e040a98e67c9e55f4c91542f921511dd980270cd490766da22306b48ca9309aad3b2393b7b1e9ac7afeff64204081f9c0a8f6a5396d02eb9009901ca2c0a75ffbdae3a38ccd5007cc4f6bec8fedd64086cce5c039e8abc9e23bd694fc8de4e858c89bd585ebdd422b492eab26f4ebbdc1d17dfbba19b5ac458c31320a161a52dea638548205a6ad4ec54875ca34238c059177bfab2d5be0a98d12b3932d0661d33ec655446d0283224af8ec7f1c6874add03448fd8029a71d3c5aa06951123c9fd881d435845757df50444e6cacc31a8cf7537a778d1184b96c3512cd474f5d1fd1214555789d24c8d173358e36400b2d937595109729d9f35eecb0963c0da60d2eeb52a778876059fa95d820d5d34e7948d389dffd53d34c4083d27c917879b053cc57dc43c8263e5dfe5f33c19dad0a7126ea6e8abdbacb318d37c305a183596ddb25b1934beff13a4f24fbdcc2064de8e0bc639e672ecfe45692e9f8164365e1691784b4f775ef369aeb135ce15135c20da95064c810592ea33316b9767caaef842f948b9573b2205ec57d3026a2f2244c42991462e233061549cf9bc66a7b4a8a0fc61f73883fd24dad02644004989c4721a0aa03d3b0191d7fa4d3da102e541fe463936c9365ba30681e706ca70cb3c8ad5dcc710de59e7d8a6247aa809bba74ff4dd182a38bb31baa337841302c19ed89d65e87bbed05465f4ce0dfe89b44d7e9266a8ca21d984c41109d813ca76eb67dbd4e39aa437ff98050c968ec1e40c534ab51d6b8ea2309fab08b3757e9edc5972bff316f6f2affbff458ac0299613734b30dfdad20f797d172cf295cbcfee3d8ee25485d40380d3480a9372a1a6e5ecd7c4c6a9d34027ea6c197f37e86e757750c9fc24cc7cf814878b8628326c140930dbb2041bd9ee87f36ebfdbdc34522cfd4e50c9cb48dd52d4647a06d08e0f0069c104849bf30c8e61cb693dffbc69fc0ab9c5d502a227d606a1dcd630ebd799acdb1e47ce2ad52ff53f6cf4fbd5f0058fb5db915702675ea44334d42e0b6ddae78b22b5b5f7e5aa36519e31278e37b64312479b14aef9b8f12d8c1f39faf920851bd53b13bae5490c847b3312b2e956c430f1d8deea91cf171dee5017e7709d0346d81600bd5f0c41da3f548c28aa50589b293685ba059cd7f3edefdb5d8cdea364f4a42153b0632ef0b7ba18610b71fc34a781eead1dc5a00ab47b6840590ba44dafc6a16029cf50e089684194d93dc881beb62edb7ccee6304a4e71a35915f109db92690461b9e4ea21257ffb62477c20feaafc7a78e2aac2301b66893157920ce9fb114ab4f534d61bb3d17dfb4d9ef9f79a736f7c1d32ac3998356aefc876d8c38722787d564e980a1f15056cb3fe634d71d2c98e0475c79cab318b73a863362f85aeacdcfc44e61b5aeb870de9ea5b5abd24e8c19ab05e45e1e9b8894deeb9d29d65ae99aa94b5047f3c1168276cc2e491aba52b5b03703ced28c63a167f0cb3e4bb4d8e4f0292cf3ea4376510fa49a1a5efcc00f23c3cdf6402197b81262e66e17bf4307d87ffbc2b37213b316bddd65aa9d64ce6122c4a1545c5966bf4fc4c6ff17ded787ca9a3b3cadee435bbba8f6590dc4ba30895b84d5b4eb94f4b05be3c", - "82abb4ff5457b21f359754f151e456e2c0a185c8363d15918bcee0d6d49f12564ac655", - "b63b577e719494032062e3f63682098dcdcfe26cedea2a40893c847a331e4ce9", - "9f1d08be539f1244f0f69ad2", - "88dcdb0309f8c4a96ad5560f8210eda1f5afb31b85b7a8b15525777748967d4ed77c063f65d64ef19b31044f2adc690f5e457faa1abe2e127b38c626eaa94053c9ae1b6b4d0db1f02c8404b50f58210cc9fcc6fa4ecc615631da631031cd6253b4a13a3e88295ffdc775fd4bdf29655d9780dbe02b0a82aad4c4088e90b51f170909c0f98ff93ca3926067ec94be05841603db4f913b7025a9ee34b8d8bc629ed827a2a9857e0814d36b83cba21e670f8f94ceb4be5757e0b8782895b5d8605868e4f584b5bb6a5f3a94edd9b23fc2b6fa06914aec970c260fc370aa245ca68888c90c43eecb68474c9e45c53a7da055f5bfe39b56769fa56264dc8bf4c1616e30262bd501ff9fc5cd78f73ad89e093feba0393a11c6b2cbca765ba025c40dd0417dfa644fce96db5a0362235ad37a317145e7b5f3c7213c7fb3c393be57a1cb55035f06da1f0bf665653c5fe8a0f3ca67dbcbfc59852694d34819d0978cd09b508d103017168f6848258493be737cc24c2112f2afeabf41038bea1f74bc8656d9910b77d33cc691a0d9b12f7c518ecef93423cb4871949a518d2f06e5427823324275b97110f8f88b0d14788741e617f4b194e679a1627da50376a08d4f23b005c0446b46d4f534ed85e4692e7946ec818437089425ee30e47de995e8774b61003801de67939d9fed7bf0cdaf625798d0d0d04a61a2482217b890168e36f20cf1d6b81f9daf1a49a781567c4363ac2f3ebf0252d5adfbed17f98cc264ed2765aa279b7437410ee8b4cf42932e5055f4884deefd2a979ab1328f97cb750b3b7e4615b9c1c61659c90a5ff6d1c736e785587ec85040fb2c6decf789c2707974bfcbd0c7f699627b31e0762321d55bcc6acf1aabbd44abd7766d397bfbb68c424b311611d9eeb6598ca3126f569f688455da8d5ab86eb01f9c96186858c4b5e447aa2b9ca11aa5453f731beed4e09f95bb7376e200212e2f03551b8b09a19d6910f25898d692bc20bf6ed3ac9a0276db560de5c9e264f4db8fec6577042fbbd4510bb7070086508ac451a1fda26582c259412fbf1bd60cd5e921160c2604fde559b5ed4df52b805010b225f999450adadc6e108b70f169a3d8da6efbe1cce1c4908b004e928e3cdfdd0b4c5f742fd72a11c9585aa3517486201b6d9a98739b77970a88072750d29d005a291546f13b576b4249d71f04a9abf8f653ca206d98f738af2a1203bf0975f0a40138df054ee834ab73a3b1d7036567369a7ae15f808904e08adfc84b34a0e1356009d8a82e51c3e8f2170908179bfe47be8ad819cb12e85b6b76bba7c9b9398dfc00f550e32c171b4d5f2d9676063efee0b0b49660c10260ce052dd00addc3359e35c25dc33066d4b05bec7d93f71e0ad7d5ab83d844c7f33137894327f464260688ea4ce9847046e7dd0bfa48d4e15277a9586b4742daf0c5ecc59aceea6867068b03c20aad38d04a814472287d809a9285cd4dcdbf68f3f4ffb794701f4c265b2dff4aee55c9815938689162e08309df150538e60dccc03d495adcc560fb831444b922a6375845cef5dec56eff2910b5bde5f25f0e550ab5a13205de91d20896fe04a8ecc2c83d1371cf381424f8c43d2a5ced374878405f52bb92f4fa3c15d29ec151508488f9b4e42527921e245a8ee4b5d6ee95797f6ec4374d79acd7b467454a1d7eda05a8ae104534b23c46b27581abed6afc3ca555202dda94fc2b93501fe78867730a84f6f726dfd7364bc240b65d6c3022a04e09c89e36a809fbf244cc5522315110e9e33c8a4e1f1396e3e51fcdd53d9ae94fe7bf6c6ccef0ce02048a11441de3c25aa9787c577501977e486f8dfaa4c81e3183e648311148ce5cf3de56878847a9d14c0645777022c158670377dd9553eb63eb17e19ebb06202be8fd9bc2b24878cc86f9938e5996751ad9ca04b636497199f7f27dfa0f5ba2a01c3a491bec6dc5113d127f6aae38fa07ce7539a0c1817f7f0de0da538f4d85ffa394784a42eb50994e28530e3997e3345db28bafbb836fa463d34146d9f46d8d2b28b3954b9bc7f84046828e9b55e2fd663e562aa95caa97873f48f0a003d2251fb3ddbce0b6072fc17e0d3f99b655b8f41e8e6986ef7526544222e2d402489eabed4c219540605b9f5dd321ad902708601e85bc874c11efedd072aab7e10272c87b08b9457223de9fbc3abc2d1346656a524e9c67d79d4053c4257e886d6b430f5b7f57b2e5e92ae69273c1705a3074d5066def69fadea1af8fa9b3bf4890f9cda4b1833e5ed27f22bc4fe4cf452880c7b53320bc7cb748c0af6e7550ffa84e4714ec18d208131ae9e3edc6cd6fa2c60ab8ebc1ee56eafc01fbfba061e55014b9711eb58fdd01f8936d29dd081565de0b175b02989c5ff374e6f58c3383e9bc00d8a93903e6a221c7475e15aaef77594849af877f3807a76e03bdd54ff0b192bf34385d24d858d6f454810ee48141d73e3acf1aa3d19cd4c723a634cd8e25b4fb604c744e408dfd82961e46e8444f001d0991af24b3b6ec57ba41fb45122afc73ec6b25f501f1abd46181247945729337bf5083e5821968502a5a696043ee696c290095feac000957f968ac61ccb572ab2f37008830ab9a81d02456190af99873450b52df1888c3d8b6b13df65a9bb36a4b6d0538a0f179daebca2bed6f94b4670560fc5471c3770f2d004b6a138b8243068d754fd246e9881242638c6675f1611f237146f6e0f72ff2fba96f479fe0a662a81f40928f5400a0bbfb5ed07a87f457d5febdbdd6f323e2a59f749e6fc8a51d08b023734c762a91cc517401be57ffdf6a52b9174ea153abf2190ae2642955c3c02b4a15d72456c9d2f323de6fabbf56dfa3b566f1aa688c86b662bd34cf2511cc4a30621b6f1f1ac382bc1c4fa4c0d4d5a30ae90a5e54a9fb4afc1475e7c612eeb7f0e09e894c2004cd04126df9359d525d7f090e4b531916207c38c3512341c84218c86fc50061043ba1b89ddfb21cd756b391cb53e8c1cd55352be05efe562669e3986c022e30c79a97bdf087889a392e6da0d72cc7ea208aaf23408df23f3a9ea9bf9a935e49c9994a37a5dd0faf1267d5f7db47cf64ae1d3ec166466b2f882eb21698aa375cb50146c0e660e9bbb38d7bbc1c1c6d8333f7031d6a", - }, - { - "68ca38fccd585eb14f953358220027046c14ef965478d3d8f206f63fef4fe3571a1b53e774b298c347cc1b69cc426d39575ccfabd5a284c7a87a0698cae9efe40543cb79f5643c3c3057a5fc991235f06f059c44a7200b509a12e864fbd748001a14790f78b54ba80cf0a4a603da9672df32b68652c1d6edd3be51cf969acfb0ae49c026fe0bce0bfc72b1ff4c47712b7a27b2cce888b9bc470b8bdda55a8d53a34d79a25947ad55b95e5406a5c5311fece3ecd46ca590b3b01b9055761da8196b21bbc468681922c66d286c32598b1e3d77f2a91d835ccd9eec231409cb2e74ede9385552517718be9f84f0f9100e368701dfa4843b7222279537306065a54d4edda3a02f1ab9edba3ddeb34dece9d5edc8797103eb942a80cb5ae130ff2e7eddd11f0cecd8f9a615d75963c44238b10ab1230d9db7371d8291feb2912d306efe4f7aea2773903d4be9a00f2bd8c03589e342269a79441c0b42ce9c6fff0a6e4e845876f7e9b342d25351fe2b1233b4f576db90ef1facfa617b96d17aa03fc824973e1c80f15e5344b0516fc28424b7faff47ea1ef4e47f6f7b50e91b8fb14027f05ca7e1bafa266a4b952cd0b9e4cab82bb4d61f99568e14a6772f36296f5d19cb04fa86ff20f04ab61d1a6f01e5282c99fe4c3254da46fb5276317be58e94b1928e3791af27dc6544f6d445dbfc7275fbbea74f98ee4aea647b654909f9fa9c88312d3759099c9d0070e3db6d55506813f8b7abe602964a7dfb9387f58e237dbf50b4185a50b65ac099352dee8695017e4dac644f42aecc3e415333cf76b08fc764a721b45d7b74f6b0a2e43637e5b4849218d3d4c6a01208f345d76af56631590e520d6bcd82627d2446b45b2c68e0be81b3924753a54f47ea27b1e08de2399b34470701c9697eedaf3248db9b28991cdc2c632fd1b376bbda279b6709d5033d1c0a3ee573bdd222ef1afe8a4397a61fc30a4e94bdc55097ecebfef6c00133dc0b72c17e2f93a11eae9fa9f1364f10fa595e8e1623dead10caac068aad3967b9ab2837dabcd8f96a77a25baef16ba84bc93661ed150ffddfbb0369683cd021e8f959c2b531bb1fa95d7a574fe5ff9aae35fb9b4a0a9829c59b932ed8634fc05ca88211da3e30839baadaea8fd9843e0e80d9598a7282500d157ee579cda5d57628e7506617d301c2adec5186708f94f069ed7bdb70cbe88549cefe1673d48c9bbbdc01d2af03945cefe6e25f757750de64cbb9d496a25adf7058f5e32c827fe75e80ba0e834e6a72344dd2aac4228828ed42fd83e4576254af5737dcd9b6c338377d46baccb02d00fdffaac12133ea0e75e791593ef3aded4ae4c9249b8d5cd20aa28cd652b9d750b88111d9b4fbe729e27882206b2f0eb614d7daaf6436816fd80d452ac71c7a7f9e8c595287407c6ab9fe8a242e98da4270b4f1d4ea7243c27f89ed46a567c643f31f967b5f12e518106f3d3e08178078cc714cb6e39079631966a9becd6f02c18e983ceeaa2106ba9043f9985b791027eb5dddceed563106bcdbc48a4ac64bd95e87c708a8cdc33811bcd16c35e193203e70ef2bc7203183fbf60d46bc581f1bdfe62387b3e6c0c4a29130d872c3f8b134e7dcfb080e7e03048c49c0e468dbc44eff4b02e50bc6889cf7600fba58c0ee409ce948aa684baef4956fd8fd4a9c4c49e84e2ff314b7900b179fc66f5fb4affb9ef7a6064354fad8c3d2d50e6f2157576f864a843dda8f547955c4d80a73d4a86b7aaeaecea886927a5ba0e97df740ec7e8b70bb650010df55d4b75f478b07b205b560d45de666d84206c1bffd02ab7b8d1c37f21c47d1711b89d16214d8151a8e75eeeb5c54c39e5a855d578708d314240a064051d8b26c6183ce755be38fe9597dd5b5d198532b1db083a4b856b8dd60bf1db197cf1df852eb6daecffd97287a6cdd4c05307722e0fac798507f75b03e9361d5627ecdb56a3b633938fa61b2673efe6c6e768e4e7055e6c1d55c7113efd3e95151b606bbf169f4296455dccb93da370150c54fc11b3682f092f30381c6ecd218a3d9d39442c8bea61d9a71b174a8b2c56e028689380879cafb7c4bc2691dda0cf6ada039755edf93f851446df9f63267f8b8f030c069fabbe6457d4f63575b5905fb927a5a720d52c351bfbc48f12440a91471697e6b2564b1a2b314fa0e6dff090079637287b635d875f120671561102ad27aa83d9f0cee41bf023bcd703ad670b43ae23bf01713650834cc1e95dd486757f0a4f6fc9337bb95738805ad5e756198579c886eb0ee77e4ba957997dde0eecd84e4c9171c84ad8f0cb23c6a289e037f3a8beeea7965ce34fa47cbd727baa4ac9e6dc3baf17049fd2386674b246aca5ef6b8496f1d17a3175f6fee86299232c7fff682f066cbed895155d475bf9fd4b5571d257534c88c93377b1a600d4c280d42aafda975eb32c740073cffa610b5fd2dda7262a2fff5da7a0f3a875c62949e0c9247827d7a49bd8185bc27967124c34b9725ee961bc8102a029786652c2571be6cf33be63cf867c2b48e5826b31b714a415fe05c27f0862a870d8fb33200719ef4ac8530a4ecf2597b4a7f2e66f078a7505803774889a1cf963083c831f46725a1ec5545d8489e53921d81f80ef99f5e51a2d5992c7769c2a7ec8bd8e0f2fd81de53c7b69b650a2d838b269185c5efd668c470943bd956e3c5e1bba5d3b927b10cee68a75372d4d6fdfa6782c05659281bc9bc56a2123967f4f50cc7ae3379ba21e1617553354b5030b3d3f0092c1824f5d47b97e6b4fedaa90aa2573e1b115ffc72d44fa8209fd8d372c8dc9ee00193b47c2a9a302875da331731713243d02eb5a57d5dc51c35988ffd742ddd75c191f1eb2c2214a1fc47b82db8ea708818262d9583f2b1b98a40b6ff6e94742f25661a51882ef28475aab12d9422b6ac48e341cbd6f38460333b5fa1cfd4d0f43aeb46c21938468fe3f7bc771972246156652d2c58b18c8cecec2dbbc0feb0fae9f6bc022e029111f94e8913c0ad741612a1426b53cff73fbb24fb7b22ab750ba1310ecf339fe12ced6a3fae17b4c429550794a8d68be891b0e30cd28e81de2fb2ecfee58bdf11794951276005eb8a5af21e03c8aaeb595ace652c5ce60a8b98f6897d82698ffbb2e02213e50d9d3f00bb42c8652d22bffb87ec576ef6e206ed6c846fd5136a87f38c9ad899371799f35a6258878418830b04da79fabd80e7290456fe17c0850a4c20e2e657f97f4a53e1a3db65bb5e71bf38eab9f56aa11e6ef71c85b8a28f04c271", - "ea196b6a64be4b0799b1c2f72281300c3a2577db44e5d3606b8b02fa8fc46c7aded7e442", - "7c86a2c06b7520d60023d18fe73d09c514ed07a91d50d8fd5bff00e7550faed1", - "952f492fe00b26028c560fc6", - "b3f3294815ce461c8843172efe93f73a8254e58a0e71953e35c15aa89a7bd9dfee967853dcbfba73d3b87fa60449cbcabf13b1206d0cb27d2c3fedcfa695b6d41efda37bb6db35449bd470a23787619ee48f981d3f0b1c8e121725b2289b6d67858a4f9ab41683bdaec8a913ca2cc292a9640efe50fb85a1d1f7b286f45d4448f85b3242f45ab44e3281d759db24dfabbae4259f127d6546ecb914d7e93e2c19230c67fba8a6cba6069023ff7ea3d8a170289c2b4391bb97a7b899228d032b36186dfbb29ae8f0e6c06d753f4c6b21982d49ee682bef50a5c2c8434510c5fa2b9c0349592f33f8d7ad6f7243d42b292aee6d210c61e3f898875b91a17a89148275031b74cb34e628d7b701775dbfcf87c79ab279a73dad14d8eed365eb9f29a007b7d2ccc07ceb8cdcdaece67fa0166e135c9a4b939426882eeca98ab887ed2e4888bbebd5afc9f2da3e9162527262b0fa85903246bc8b80df3060c890ebaa516781a2b2a138b98001287e12a9c68471912dd297bc0beadccdc31a27b7c726baf31510cd355a28e4ef786b30084af66ef135909795aa73814cbbc6552270d5e11d46e9497ba30d6d8cecf343d16e7e3357bc9bbfbc7c1dcaa5fafd8a9b07056129da02e6228886463474c5af1d670bc14cf2868b816cc71578ad807a37477341c8192bfc2e8b1f7bfd58827e041f70384f92bb4c6acc415dde5099a1c2b27b709f9e53d1dab07c87a042ca4af7a2a6ee57b37bf2bb42259d372ecfeaf1dc55ac3a9f211f16fef3b2d5f11dc19fd1f425c14779580b2501ec6e0a84220e7e12baf9e0fee3e8cf499a7fba6721a746f598f04ee8ab4df31fb8fa5ce2d2419d5551155c009f2780cdd225ec2c19f94fb9c8b785ad4574b4da766eabfa696a1994e64a2518d1bcade6390cc683a6e80cf8b163c3e58cfa1134ee743079347f08a89c81478668df32ce9cdd7b853db5cf7af13436f3bbb11bcfa8f6b6d727a1df84f99fb3a5c248b8fd5baf669b68fd9af45298030f3251bf0351fa9b58b0b9fba53ecfd838300790ebd689744c1b7b333fbed76c8fb96fc669ecc6695ff5bf8379dd2a3c270af858cc60894be8922d69fb9707bd2a7825f2eec4a5056e5e91714f4dcfa86974259fcbfd5f20d55923a0a9936fb20e5ae9670e2019336e15f530c0be449fe355a7a02c0938d60720d5b8f4f59d2e4213ad5251c6058312b43d47c44ffc8946a98797f5ace279d3e126da63633c0eff1c412febdd47817aaee466c639e43637c1e179f606780ab490d3f0b3c2d79709f1262305fc87c02f68da2dc32f8c544e7b358c3a5d2c27986a19d13fe736c60a3524e94caa55e853eedeece985d16bfa6c487bed6583436cf82077fcdcf90a05f49db50588f46550f7a0c3a1cfca902d66d25dba8d2c53bb5557cc1d87c8a407898b3c30c4f0852df92d839859c191228d0a47324ea9ec2e0ae84513cbe4ff4aff85e77b8587f1044bcb9775099ebc2f28fbcd1cad58a8ce1f072f2228f559fbfdd8405d86f8262c27c3d95e01016b343c6a4e59dec81b59bb6e3c6109a4cffffa85e9752ed2149b5624417c0dfd1a27bd2630bf59814f15820c43bfa317be59ef6f433c95e8be154a8ae94765bcedadebb717f0d8c24e01e1952bd104ba9620f067554ae0faeb78f13c622c45d97b2b5774a3e30cb07f2cf0e8b19d1266d8a8861f3772305e24ec5c9cb714806c7d705a3bed6385f8be4e12562e17ec3df01afb4ef6f7427c48a1bc0e64fc65eb1c3d3ff2d6687e4c275a019f5ab5c63bbe47e3680fb1802d5835c4d494f0f394de1ae47f81eef005127d0971c4589c456ae6a69855f35635c28b590c1b93f155fabcab59b6c7cd8ea1c4ed1f67093aa782c54329cdcf9bf84a40400de707b894587d6e08cf7fd72fa45b6709a26e97ff5ec1269b8042358f872a79e8c2db1c7ebffac014d6b6f71b0c1c1945ddedaf5b6911668059b61b55eea4737aa307c829309c9ea548fba2bede023849bd61b5a467cd1ab1c61205ce64301e2531e5d58d03c74ecdafe1f5b74627be8716cad0d0a0be60984c9f9dfeae24a6c4949170ce2f589326e0a76c447a578ea3a5e4bd9f18884f18843eb1a78aa2fae06a7569a97551b227c34d429c8e1c8c5417ced93c30dcc607cb32a365d87328aaecb4ce57ab8e74f0d9099e267cfb747a3bca9f76b5f6dfb543bc4b5c06c3646062ec14f511058eb2939601913f8a0f1785249cb72b0bb1c12a9508b23caf490537eec53f614f3e06592eb61f75c1cecfa514cf7b500b0375095d5db74556220131390b77d0db72711c0c7229a5769b1d2b3f5105f3a4370beb1cacbd93ce32f89f1fc833c7949211dd204616c013a3399a22f5325f1a00008f4c8ee7dc5bd7476848721fef843123a6213cb0c0b6ae84233ed01a77a115d06e08990b8e60cfa4f41dbc9505cfae76463278b6c6b5ac7c3b83284caaba4a6a1d739c392528ff5b06bc3b82e98060e3001279a44aabaacc661fb14e7581d1235940cbe067c6b386da09454e0467c785ed0b65d41ff4cf36ba5f63d3ff2b45c11c6c22d3ea8ebbf1d52d770e0ebf2ba0c67c7d3641c145cab474a88119335990137fa82a340c2cc8c453752a3aa801127a47aeefe66d1af1a26ee1cd0e6d935bd548f6ce33a9c204be02ba08f9fa03c685665375db7c0c656ddf3e441ddd96b0d2018beff5086cc63339f26bc8332a5e6a1422bfedb69187a3443c23b630a28b02f8075faf3ff2fbeef6cdf02ba4af47a765003de2254b69f487bb5d038759a33ce6885611198b81b0b6fc5d7a531a7a90dbc3556aa758db1657698cb3698b8207b1c1b589efe5d52790667ac483dde9543953c6392d5eb8afdafa205d325e314f810e9c7722cbf5bb76fd6502733149bf21c60717ff5bc366b85ee9f206bb1f330ea72f61a9766090eabde747b1eb9c046cc8713d5a4f8d4b7dcd7c61f2496c5b467608cd9260382b8f11b04c318a5ebb6411a4c7fa060e08c295c6062ac644bd3d10bcbfcfe2e3748eba66f65d904ff21147faa8475f508f21238d42f62b697249b9fceb905127f7684c8130cb8663f09cd25ea038078e1980237389337d1446c3a77bce41b37b50b9c3a020526e7b7b3bef370cd7af71b225700627060eb65693899d277ed130ec5ed9eee75d4886f31aa93bbf302e0c69c9c4499396b43dceb67c02fafaff8b56698308393a03f60babde883f00de2c66831f024fafaf98b2fcf37a9ce01d4f34e95c9408395716dcf83fe86c7a0f5e3e6741c3b63b6ebe9964f1d5005eeb732ce66402007beb3e6a087053", - }, - { - "9100c5b2d7c5d5a854bce55e82f94b89a268da7b66357a661dcf75cba10a1b320ae0e4e1a5b989f9766e57f867a3810a0b5b857191ffd7aece4c796f5694a2617486421940cc12b63a6aaea20d2fac188b318a1c3061cafeae436e04d710654b96a864d674768caee03a50ed6afc06f52d90115df1db5c9f1ecaa4f5da094070b1a447251ad3d4fb0e24e87821ee6d4e7e7eac7059080f77d2b36cacbdac1c6e5063946a376865458c4ebdad3c2afcbba8a82b01b03a7882eee42eab904a19e0aead4ae515b02aa2fee74f3a114bf5b9f320baa35b3225491653f4a69e0d864cbbd031d0805b727e42c2b9530dae0c01cfc6a42af8ca730e1d67b4bb743a072f0a38008b937209d534c2284271344340fae76af2b1dd00cf44b48ab8ee92e8f9cae8845e5a8d338f505cd1c19014018bfb6b7dad487e7c8c32064421982c1a63149ec16f2bf4fe7b50cf3ce1e33d6cdea8e98bf067077c9a0ec1bba6edd5090273ca719ebf6f1a0f3e56f021945cff3c468b2dad92a947a06a024758d7505a4a1bcbe9da3a03e97859da99ed36982a7c23572ab60071566b749dc34bee1d9609e87fe32282cc9adba633c9ddcbf359ef4a83a54af5fbb5699978b487954a907dc9739f4b3f3927e66cf0c338e31c272da0cc7795c72dfe60a5b2e73bfd77b8c6ea58122a913910fe29d3360cef5d398f29b024f0dd225183d538bed2b076989aceaac460e3d45e0ca7941897f151261a024b0adf6d5b62429420144497adde6557a3c53b7723471fb760b6a8b1dcc2b327cd939528f5d7bc16ec00ad99df12f082d82bf9fb7318b3d3ce5b84ab1e38d2ebcb6713c03fd0d62bd083c4af96b4316ee02b6953431c261278aabd96e28f81adf7946e3664446135c825e45ed916ccb941350c84523296cadd5360bfe3e16dda75db10da1f710fe796f3456f0911294a4735cf9968656345b9c3049ca47176194c86f36cf702538df699fcffaa254af15b198ac37eed0837b00cd3547e496ecacf6136c6648a535a235059cd75a3bfd0bc49933b379b72e7a8463c268faaf05f0b27256fb179c9d4c923a13ec6600f83aaa2bee13e30c8e676040c06aefc65ba238a29d403f3a8cc164a0bdcaa1a5f54bc1d35fa4efee0c402eccab1e92f6b0cba94e1bd87898a9dd3957a7eafd9d26bf70866450646090833d4b91c032428bdb9097b409305de669a58e44931b7b428bf1a6dc56177cd944b87b04eabd80c64e287a5758c83db26dbc06f0c772335363ea2fb9f19c833644fe3b3fbbbbf5f9d460412d287eef862ae676f258aa45bc8465667601e9ac46e7d77693936c8d67ccde94e54d746b785ad26aa38ca0500105b6870790235e780ac50b9e3198f5fe678ae3a4ff4f1d4a2177edae183daf2de42625845973fc544907e27a90d868f8634c9d529bbaacbd228a5b4ac7fa68ac208e207a022cce4b24a0b5b5791eaddc6b3b3ef6e5dba41855ff531de9bbca0a39ea743c0732772bd32cd15c4b7f28a6ba579d902331a88920fb970aa75114e14b891d42cb947e9eb14feafccf1393796b21099e52b21773adae8e550f93364b1c438dd7d7fc76994c51860b652974d04a7e6ead207610de149f231422595f4e9ced1674d98d0e15ee841143ad8613f804729524e8a5f30d451611676f70a60c5dcc7127497f4d27f35e7ba0e48f98e9022e0deac400e809170970867a1682c7d2f3ef2c632c44568abff76f4f804841ae462c7247147b6e1debe48802674fd55b2ef1be5b4604d5f60c35358c7d773ab3a3ad0ab81868c6044d4e06a48ddbffacddadf813a2ce09aef34f3b60b666245a032f021b87c81fc506166983f25930cff728d399f6dd48ea1c745ad2da7f2cdd9e3ee915f708db0d1f3481018db1c174ea950ed17247bb8ebc065186758e5403bd4d19a445e4a15519326696e4280bcecd1a903f525bbe1e521f94d79df8db4b35f4ef7bd990c0f2c32789a75f95761ca0064bf251fa00b409a58b979e56d2c44bc2302552f118162891bd78272384c739c0c98bbaca3fc46fbb5bfe123eb25df0e27343e38b5a0c2d0774443af91b64b9d4e0649f20290edb84fcedb3bf4ba491bee8754a32716739e5ab64deb6c9888bb9fd2ada1629a59b16934ec5dee3678dcbdcc7fe5e2f3833da9d1281669b1d108837eaae5180396813883de26b957037623825b0675df431fb06b35191c06229f84cc849ccf1b1e079efc2e575331cd77b3297d2908c048b82b7dd14883f3e707bf6ca38f87c19625bec47c11f54988a97205d27ac51a32f19704391af72021b78cc4461386dc3844a1b45596fede3f70e311eba92b1d9ac221d3dc19f3fdd080c2169348f2cc8c9380e12a7ebf69efa37bda4ca6f7e66919b94532ac43022c0518c04d0a8cd99e0cbac88b7a317a1dac5469534b4fbc64080196b44498e149b0a196bb2d6f59392a21c4a4523ec1ff922a52de790e42810fd9355471169d22b734dde4a3361ecd57e271a92132a8b35cfa91d508d45618ad8c6c1ea209405a3d1d3ee1535caeaa3f20546052fc13aff7a584ff79db1726678344098d8563caa2a2abf6fe5aa03d7af49dccf1b17be85600e7cfdbfff54282394b0fbeafda615185574fdff78d59ec2a26dddba1c531a1ac007cabf5be2e2f0a3dedb9174e0a9da5597c9de6d68911fc66ec9d2b1e3fd71ebb83147ab14384ee303d067f47a324a01fc187f54a98f1b0848fdba2ceb3c18936d503e71887d548c4dbc70b7eecac9ead3393f8cb85a84f1484f2e237b36b6d886f54a0f629e8bb05b0c6839c722149a5b541703aeac04e6eb230a5659b12ed0a668d018f75bc94258218c1f5390b9aee4c0b2836cb76a47da649e2425bcf4cc15c4d51d109e5f78cfdb88137c31b2510264e46f1c4eb6e6b3450ad901ff9517b47a24d508844dc85fc5dbcc079e2d09f301691f401ff5f36500cc66f0617eb4dba389d427c7ac778d78438506608f0961f818a2080ea56d0f61c40fc342b49ee63e730df61f757387b9089e1987977b7fa02d87aec2e4be24b8bdf7fb6286d190f9df870944fa910df32f178ab692fa56b071f57366a3981f51800ab416dc4500abcc19e0c6aaeeb9ca063470993ec749a0bcbd07604516b1d51175ebedbaec8986f67a4d9158f75b5f3bcbe86a83220b4fdf12a0242951f94ac7d52882b1b209b82c4749753ea4d46a60bcc4f3eed033bde2d3d20c25cb46fd907f7052217a0a4db143b2efe8875a59441f4d22ef70d0c244b2de6a7e15581e84c860a6326ae3e3aea6d3972e2de0623d2d852c9e65eed318bd3d86d29595575df60d9050e1740f884796b6657718a294adcf2303adf61c6b23933db93885172e82a78f741b8efc6315a2c88ccb6b11692a346cd82a79334e0c610734e61e6378b5e2ecc161d924778bfcf4475805a0823a0d5a54768d9272ee99b7c4a81b3d5dfe1a2f5ff34", - "3c77f30bbb698b1571aeb54653fcae2c23dc16be58603f0c361eedd813ec0c4f63005a1e69e533da93e820e6e4ce1308aa29c60289060ebf24fc9738e8a4874ca4e26a0dc79ee75b8607416bd554737f", - "0223c0a6052bb3cdc99a284fa169ba76be2df53b677642a606090a9267a60769", - "7d3981073f90c6648c5e9c74", - "61ec5230306b70113f67b340575b77ef76d521ff75b754d551e4177591a02351ad382b2a4067f2b3af7e8e15431c7133e98be9d8293d17ef40161dbad9a4f1a4f30cdd557bb9a8b03b5f1b277c850e23ecfa0fc2ab1102e4b1d5e836a606883c3d43527fc3aa26955964b144a9a56cafa7b174d72a0635b80e7b4f871ead3838a955a14c4b8c5c3c66fd86a5e4ff10dfaa92105378bbc5f76ad29727e5bc4779ba3e6dc19bf45020f6ce4dfb3400df05cac51577d58eec21b22839b8f055226b204e641783bb3305b4461172f1c1d48eec56fe6f82aae564ac6688d7b0994747d9b23a24418e69f8a4fc548f854f86baacbdec78b7597b138c453349034c8cad2ff272781e0e6799ef2f8addaf18528736aef21ef8c2d213161e36b2c7815fcfc40747626e0165684e46a9a2275c533d548e52a9952a556168195d602ead86f6bd699e97ca59f4cb2050ff148f5bdfec358dc4542ff2f700db9861dfe5ba377ec7fdc0fcb2501e72fe6873c7cc76b95b4f300857f76e6e6e370119f403b556115b19fee7009f4f6675ad2d174f44002e35ddc360f309f20a3a1dbf39d90d7e5fa2106c53afb0bf445e4cede59cb50b8a7a2c0961d00b2c251f2d815309f74a46a424838ee87f1229273ff3b66dfb79e3b1ce11bd60e061e60e3f37bd7ac896b618cd78388590f44b1a276b965a4b95f2e3a7a175b30fb45dc7a71d4b3a1a33e98af30dbb46a217c50046ac21b8bbe9537c02f05a5780c8a5d796bd6424fd9e9f3ed5932069bc050bf4a1898a0ef0ca756aa2e2269b709cc92e0c5192ab49d692143388ede2bde4923c85eae8f59db5c7711dabeb33743c692be6dfebd815456958b5e1384a109f891f433e7b4a1031d4f30478b05766dd97eb964a28f2f7b55aa6c27c7f4ebf4d47ee8709bf99915426b3896412a855798e392e111789213af537cff7a976b4509e0eb6ffbb8e886a3596a242d16d95109b0ff562c624e06636a3611f804f9b2e252afe8a4e5e868b48e9e734f688f2da2012d7fdfe2d3aca75fd74730a85aae90353417fd52b92d28a5098b6af358a096b859859916bcd5a8f779676c6e04ea461fe62872050af92d08cdf1124bde1e889ace3c923457ecfe0a635ec757907a131ad7c2ca3f60e1317880f843c5e63f4ba59ab2882a492dd1e070b070af6f60e18cca29541206a7b267c3f75a5327fd9b8ffc9b36b57b73b36e586541d15c85253e17a2581e8f8a1518f275cc79afcf2b5c88a16e9bf553e757df089b5db90a9dcdc1867b788fe75abb5161dd7ee1cf37d3f0faa793ddb1bbf1eca13f4220ea63af8ef7c0e7144d999ba1c5a983e74d48cef708c1d28d3c0a168ab87d0ef70f381693f0d438ce013ffa2cba65a8cf6b498a7120209564535b7372690329cdbd74eaa76765962720f06aae58338a10064ad80f5a67395db2c31d36b1f5eb777306395f192599d2f737327afdcd9f14b3f24155a3f974915d3302427494fad756703b13afcd1764ef9735e7dbff920f1253cb668e9f40632aea1e0b4620db162138e4a97e6f0729b14be4a7c3256250d5e7423ba1238c704503c51cfc9cb68db7001b2f597a15e77138beea02e11e0bb98a72f2a77b7260e9172fe7e60483114ddd836addd966b69570db5eb26a0cfc4f8a8b80d26357ed51a70165bc0dd11ad7467688025bdb532e7222ea12f23c44d08d111b0ad4acb2f5b3d6b45c387d541ffc84466ed57acacefb1436ef00bcb5b6211dfd0650113ac369b9f3e4891acb2693c377467b1e9c949cc0ea6c4a72ef9292964275ed397cd2b1ed25fe1aa8f47e90cde362392da5e53893eef6e4f61decae1a75e3b726f0596f09c3cba62aa08bea89984b484d5768296a5afa8b0759dceba530a169d22b81979212b3343db35ce4e4766dd251ea6a47f5033cc090d6577efbed441bb4f8944937e812f12ef17ede76df621bd4cfa31567ade18b74583a2b783279150d584ca13c0d4784b70156afdf9be8ae96666b82def888465cd3df349de427d5f5b3572e4f963d33f968e6780e381ca196bc04a6664fe93fdc8558b21b84130dfa2a646950eb2e927885925af46d7a28d1507bcc3c02ba98318bfebe5b9eea1bd47935ad869eb701cbc35a9aef5efad88ff54eb350a34ccef2e159de8e16135b81105bf799fbd86aa11653b5ef93a1ab1c367231d61b42b8bdb4f04d8d05396d53247d51890be9b56c51cb19eec0fd1e6b8cdc98376b6c6b30963ac7ab02656ff94dec0e3a0eb3f3ffb8bebd99d5889df98e6c77093c370373dd5f17871fb334c7eb12c6ca22deb75bdac9eaf24281c965dffe03da9c940e13fb382fb6be332797813710a7cd2e7720f5b9e53fc0d98fcceeea4a8e9f787e670d60bfc4a849f34571e5d09b9e9c28cdf2b2d888eca9bb31ea8b9239bd19dca86880ad3e12b1583acc3a6d1f0a438ce3b5a337487279dc4ead1b214272d455e6a2c8cce4ae3bb29abfdbe77a67ababeaff5dd9c96b17f589cd4615c0209eba5e4b1c7167b4b739ca4b9957185961529d1082226f85068890c94aa1f1c244259ef7b120e40114926a49c4412b67b4caef1ff3ce6f3aea3c6107b830cd34df9f4d73d7d978b6b9d5c481e9d76e83d649e742b098334838fe50d80975fb567642d3b72c461ef3072ebb1d03c0099e97575bae6a12cd2352d9d296351df6965d736d7568c2911394a73d199743526ba54dd62c56c598f4e78495c0172739274c0b8c96755e489765723a24a8704093a94544f6c8764dcd1ce6b4bf2917cfad27d85e4442b4e5bd577ea1a88c2b79d61cc1be01ee9028235b36444483b4e45da1087bf6d45ca540620de5aacc644a0d5c4b807b582c7b058e140eebca539947502bf73c9abc81a0e3a618b39d3a38c4ff7f94767fd7e6b9eb61e629806bc3d183bdade7e369d180dd2f57fef677e22ce41be7224f11723a85a3f1d14d7b72dc98ccb2816b77e625ce3db3e2c5753af8b079e0d63939079a01910ee4699cb405d4d9c60e4ac86a7fda3a4c9c290662afbdb7678c3a84c87ff83470fa8a416511a06d3216a1445699d7ad7e6980491fd596d39762d576b08fcbf0825243c1fc01ec8300780857c429c607113160a8354f6699b368a87983464472a5754fd58943fca6f6779764fbe6cbb510d5280292df02c4a7ed9acec8c95ad67ebcda71d0f519ac18db9b43b28244cd34fe02c5d694df57410eb54c5e1ca0f8501e7776a811d7ee81eb9d8c80b2ca50a012b5eecd5428af965b217e7fdac80be88a01f76d473105b027eb557a523f13c55e1670ff34627667649573e0f19dda41c525a8c96c2866a88bd73e66c786767e1657960f6676d8a22be1c6024158a0f0e4ec761148b5a3d8ea481d8fed94855be82479ba23213190054f937838f0e35e00aa74c89b294c29ea25ad7e96b4b6fa952ea8f1cbe5397b7c86d0b74ccc25e22c88736b045fe86110bffa0679f28a1f27162b51410498cb7", - }, - { - "0fcff2c29cbb5cc40bfd2ec573ecf368275ade6a00e5730b77dab17e437b46524b3814e7f470acff6ddac4e0c6b748ed112657120bca1d83a4ce01e74a473995804d7c74bd28732a02370ac8ef52b600790d1284d82f077cfe096448509dddd0eb5944a882b7d384efdd4dde3003dea910f12de82035651e3ec9668e66435f519da3fa1f5bcda34aaaf028daf3068304f7b1ec18e65136241a9db281e011d27db5cc9c1099405a4430821e2488a228805314983966ce5d806b0f014c21d4c9d6a066e63aa6407ed6c29cfa4a3e22ca913762ca9d31271d9c371fe858f3b22e931814cdbe544b9416e88f6026b12bb8e88d8285beaaa35be1c24339b5f567480d7b16cbcf6160e549ef4570a0702889feaa0ebc54b11735735b6e2850d5715e5087291fe8890432784aa219bacaa2b874b075c9628cfed5e76dfe38426f9693f6bfb2de49b710c101b2dabb7c7c74f12de9ba8f75b8645d25629568d12bfbc7eaada63364b6f56569cf21e54c95d6797e9008f3496c506ecfe5d6a010d168fb7f0e2ee3c423492df36a133fffe9b87d7ac070c32cc131fba6089cb7d904b25812e03cd6048504f7ef1736ee00ee6b7aaedb3dda9c6fd6437772fa5076aca9888ce55e906a62875979bd477aabb2f4598d32342aa10a6d187c6768f213117a9ff6d830603bb7b9b475002e20b2237a4055ae6af6b8d70e343e76265188a0f07e7820dfb3d898684d99966d4bb9e78b0e95f5044dcc12810a89a75b11474c8fc06c6e734407db91a072ffeb2be6773a7c6c3ec939514b43daf29feb3aeb7afa57e96d9cf0492d90bb2c7be613f2208f5f5f5898b0a3db8a967a75d065efcabdd83759c88086583bb3d422c6c6425525a1adbd515199dbe71350b77940813618b88fe139153974c80d968ed4d9e3f97a91b7cce250a7c963f880dc38011250b9a131f2b76b677f78fd0e4cd6f1465182fd1d644dc42db0bcad8df4ae9f456841765af8e1c1775abf85a69577ece6f9e9035e36c88be784397479e713be4f5434aa4c166bc4702a4916c0c003a6baecaa182372a30af6dc7e6fc4912d13e662bd327829f6e85340fe130001babaee64d211d6761bcc52993c162a692a10cbe7434310392b64792a777a2b31341995072a6b7d4538cfde74e609dd1019a9f75cec0896186c0f42e3896d15be87aac5b11642f74e11d5c2f7de9f07f848ff543507ea4d73fa8f5683fc6b41831606352c482c7a5a013c51e0db59d824582c595f17a6d2113528943194d6b5aadcead62516507f178cd0f76729cf8b81fce4e0138ab224bfdbb8f16f8ea6196b90ef90a63f0fbdcbdfb5320984be8a80a26b932d1db7ecf870dd67fe838069136ff9b9ae087779e82cacf1b06a7b310ce6c439047c26fcec0364ea87e4549a544d540256cb7c3ef7282fa792aad89e919dd89519fe910501f5ef88da43232e917730e742ac2539d454e066feb9058f56dd246fdbb674dcab636585a788b338ffe41f4190447a65985acb9613d02669ad4ad888004c65acb0ca315752e58f51c9ae9259f20cbe8a668a207a5a46e30891bc909108f53db8bf6f0f11549e621d4cf4763e0035c867bfe9e1192fc421c080b25289a78f4167fe517852efdb6f3ccfe67ad01b4337da2c18f35bdc151c5dc76ee66efd27d5fc784e4e6829bea4f8a41ec8bf61ff998d178ce9f4a10551687337d7705eac6cd7fabb3f2379e31c1d01e4dc63e475f0fb01d9efa3de400b5177e2c2d68f2ead89e9ecad62cfc97fd0ad5b3391d0248dd2fd7c75dcbd802d3463ef0af21eb77b07a3286a72f1e9439f457630159abde7983a5c74f7dda12b40913632afedadb691d62003c70a46664fbd976457544cef8ea863858505b1c596e7f745d4a5fb657b1c694226afa9756c40d9c49425b323ce17a8531c5919b24010f715b5f27a300ee37334931ca9ff5c83c3f0a87713768ebccaaa15e35c56f3536ba945e5d954c94c885c68325bc4b51fb55d96c8d424849ece9a812af0747d5b1dc240f71609439f65acd1c17086e025e376eeb79a7255680cd692fc4b0f5768d1985fe8a1a387074f58c8bfdea8e5c11ed379b845ce2052a5b24ef0c1a658923eb87adf5b01e6aa59ae6937564ef97421722c67404cb9e5fe07d5bfad2e52ebe6cccb41ceb1eb2760545fb6a3582bc4ca572b0aa4e4f0a2ecc56299f3b485d980501a4e010576615ad518fd2d43c1f79aed013ed1f1e1bdb74357aaf7dc84772c9ec62da43c8ffe11a7fb3eeabc3584a936c37b28a438dfe78f89de6b0d5597ac1bc55057544e68fb49a6e505db69af122c2a3ad06219b7f2a2955db0ebf55c06baac5e0efac609436dee484857f75a8421945484ad0c7650a1d3008cc85c938208f19002b7994524878d6ddf85c763a65cb72a09c3a059657459f13cb584bfbd754fbf2de904517092be4f1786b2bde26ae8eb2d884592fc9e84395408f8117e47d1ab30d5fca167bbf07e41a33c230d240e3aac53cda9f251e24659da57d721288252fe7ff3653ae3e47b86209e9344accef0009b99f2ec7b3845558f1d77b89fc9b61ebc1b589fffd3261f71b9631e87541e22ed100e694854bed771358f10fe452fba61875a605b8080cc39e3eac13708e32518f28e60464c38b782c7c7800df63b6e7e95ced9154ea54e32900f6998f38eb1e51c112b6949e2eb11a96b1ea0a68c1e3b5af750a99c9fdb2cae44c5a1d37686ef87b158d19343e23daf00dd558cfb91e6f2e18f8e806abb2faf80d082f657717d08ca4e9c0d30d9bc30b612bcb1a3a3a3843231059dec344c6c04ce625b3fe064092e00175fd9d38f8fe54c4088efe30d211412be01460a6d4ad8d0a618b00a21de0a383de30ccd72f119b27a08958729a999e8aadff21829cbe8cfe398d90476e33db4c64981383a9aeab4a27f3bcb29d4b3d3b3a6ebdd71d3ac546b8658e269959630de176819b153cd53d2091efbddd2cf9178ba6ee98e1a3df9a095db0a2b713a0988a22239f5f08cc8f9abc3d67d9267f54dd5dedbf01bd490b0b09adb21d4e5aa7707e36cf77034f01bf8c7988a2e8dd7046bb2f486878436371f1258f3f7026afee6d7f6560be67103ad098edc9665e00118d4879f58bdd677cf2e6bc631d5c517acbb6db8a1debb4fe7492b7daf0b7ec7df056637c23caf926a1a589bef1db29cd81f547afd0fc9e459f46108ffdfcfdee43515a771c439dbde9177ceaf296a8749be0146cdca2b26be8c2ebd6cfd9b5032b1f7a375307f54c2f622711f8cf8684afaaf17c4da3e83666c40d26adc239c8d1a40024bbf560db5787ed404763d4e70ec6635c6a4b82c10f8ff7ad42217613c57648716ba94cb33129f3789dc86f9c8ec2e8e90e6bba0dfba1bb3dc3215188979a09f33346a6647099ed0e624c9ae10f83da0def840bdb25b718e8d86a616ff46b5327b1f99c22937920f5b5bbd6b53fa0b32f24befa4a7603234e6d94be51f00189a20b15c49e8ee58434a15ae9d10b9cf0204bfa7ab1fd9e006b22bebd22b036c4bb4c9949cb7ecdf01028d9f12466e144b2dbbf64d95d65347013e192d428678f64f0d9306f97208fb00a70d4615229143dd8890725ee3ba6021d38d6359055aa812edaf", - "0c5fb7075f5e15a6733737b614bf46871e29417e4b140bae6e10081623f5c52f557c36b4da4b5a4e82920497514b1e6f745fedbf73f86ee10976f82c6cbd5bc13a917514ddd062", - "e70954c812cac03e367e99f7b82a6dcc073d2f679f965d524872756ee58654cc", - "5f6267f6b3b21423267310e6", - "c53868c0fdc14e891ae1bc257fbb13be210a5d9cdbd9d18fe1b474f9a1929dbba3f25222d8fe8c1be3eef22352100064b922fd9642ad128a202b6382ae0a67c8affb0c5bfa1a80e55c1084cc372485243df872d677a80a3ef1ca3589908bca621f6f50133eb762cb9c05775d13db7dd3eb65ffd3eef96e8dd42928facc68390f6bbc50b17e1ef5ea6310d8756dd177be2cceb63a97bcceaa046794915589ca022d90756b02c22e8634c0ed44192abc3b8b1e2814c855ab27aaae3bdd801a73e6209fdd559ceb59a94fd98a66d12a31a643ca2f4b07ed910bc390f77ab89395d5cd1d783d8940dad4447f0452991b209cfcd998b0c814cebd08f9ff15052818bab0bf51c3b72ac1020d3b0974fbdf4ff941b1ab9c01f284fe82f2fd89c0aeb4b9fbb0a74ece08b3debc7b65e7263e2922fd4aba15ae3cba7885d04127c8e06a67f244e7aa4556f8694a5db6653f6e48d6de54f9e4024d25d3236d4f933205b6a358aa1506f832ef7d556c6a1bfe4aabfce51f3b5ac64bf6ab1e665bddb12fe13db9f07a55db3da3886df36ddb89f3a4939b1e9e5b701301570e3d01c0b947f498dcc6af438cc15e6038cb78a78986da0316cab67bca3e28c95e6b7e6b36cae9202cf4a77a0e15d3c3291d267aeee172dd587a944719b9fbe077603b4d39d4302b9a6415aa07af309a5e1cf7a9379552becdb4bc6a0b5c85d2e63bb141c405afc58a8b2b4188b3883a24eedf98dd50fc54725c440ccdb03514a6f37cab49296b6826b6bc7d7ad8cac0a3425eeb6866d94119acdad468cefe162a29e8831c77aa83321e8ae3e20e968cfe51dbf2b63f4e26c61536e6be4f63d61bbd06af38023b15f4fccb8ae0356d924dbf646bff69d1ac0d6e1c7f40b12d6d16e52d1c15958add5708bd38c514e47fe623a67c9ec211cd625b398fa7fd67a23e6e9f65d42dda2bae94524372fbc1a7e0ab3f1c451c126135536e73c573749aa60177dfb68843752b010e2cb9c1afaf51c94a48cf8ac7aab3fb200aaebcedefc6cccb581848da0121af92d9f4be002f0c2beffdfa65c36bec80e7f62d7009b1eb719d24b96e97059e6b50a52662c2c833738849f342391514349305228b29bfa9c7cf2a931558ca8e704c600148a28bd871465b23af499c11784aa45acd051f276d82789c58b14f12619372be4bc3a285f6cee21d65648d18e61752d6e7957736d3385f8ad36702c451c61ed475997d6d9f11c8be5257d8febce329aa701028aa2b5644b8515a95b5e866780e32754ac2e6f2e31b2c04a4ad35cbcbc25b23e9bf49cb1a5d877ca30880741757c29303af8676546760016f1538991b37cf0cd24ad3b1d877e5e1bd083e4b990af6ff5c0b28e530db3f463d21e76c928c8e1ffaa6c045937ea171a9071827a173e231f50e95430ae4895932c88ce048058ce6d0a50ca5c1842506158e98bb2912a61c7991a2256c97cb9050a4bb3ca32594622756291340561e9e584dd2e096263b6ff8eb898ae86f5f24500320d2d0ebb30d84cb4ef876a877dad23a611b39bf0cba5e22f2850e11c298fa23fed40691b83acc87136f8fa540b1dc40d1b0d0bd489ee9dad785c121955a094a2c6bd3353e142c04f7b88b2eb3305fd00d5eddb391b73fa2b16a6357aaa2abf2059ec979bd3ce06d5fff1c325bbe5c833a101615750613047d8155ac0c3a0734cc6aaeae7cb65d7501cb95f9d6d1161d09c961c0681547faf7983ed2efaf4e0fbb87a06169ecff1d0ee540a9223a73f75584441d4669cac09c2dbdb8aa2aed74eb9a2870f2021eb16e5f5c3e79a24d7110af4bece22a1086d27642550cadfa4f0e03f2c032a2745e1c9277a4f67fa4dc74ba056110fed3a63f643567d079c9430b8d5b3bf57a9b3f02d486d870229fee5462043b6bda8d265c745ddc1b8952bf91828d6db2edcfca7051e74df9dd456dca5e04ba469b9ff6a8130aab3903c05659b8f31cf4ba4c22511493a36541ff9d88c708dfb714d52a3c0356543e6efad37530b598bb63c3724772907abe4cad39c896c62daf5b30cd7d37eb36a7be2494353028c76e8d148b018c7bb755c45d2a33f61944071bae8316881e9aa37e4ec2374aac4f8436ed3c7db2092326538f07fc6644e0239899e3335f73c1e3c4602b12d19d7b639d4968974b6b2703ec1add8cd930cbafff4158f68f06aaac83bb4a2e31466e2ddc247ad71c5f4c49af7defd1394e21819cc24c78380caefb2ce87c0d1050680313037def12ca21cf67bb6692d6e4a9e90a9c9a0b7118ac300c6c6f636337aa25bc59cf1d9749dc183803cc0ccd1ff53210352795c6edb49ff1e5e8ebaee7b3eda6e3c0c340fa60594115e37fab60133b8a3b39d2e63db0bc6a03973e236fca801553912f93feafd8b96766049dd2066f3c5ac9222121ee9d36cbcd8f713adc8779949941f8a8dcc92ade62e46e9f1b292d5f7eced14c3bff50a811cb762ced1f103652773ef946e18569eb5892626627e085d4ffb3102c1586ddf88acbaeed903b22d3e7ccd8b8ddcdfddb872403240bc8e0e46a068f55bbddaf90fffb9a914187aac2ceedf21fefa1fe32fc7bdbb9fd76dcda1fca7b39107d308d11a118e47499dc4092ef0cd28d0d9af84440f095b4feb7adcba198894cd89a324c60ed0b996c520d4b33391bbbef1997256af7ba7ec1069244359066af81543ca23105742fee3480f890373d3205236bed566cd22a62bf69f8c0f27b714f84a203bca1605865e2cc2f9211389e0df7a4b3aab9d10826639357efe1f5fe64a1bd6d06d0b5605658c4d2d12e1bec77e70ea393b0a09043dd7d6684bd53f4c883f2f6928d99ba91873d063d43600f9105d503b11d8dc2b05e34b4fcf18e78b2b6c97d3b2c9249a2f6566ddab2a8a67fed6c9f8af2f4ef98dd579f2d4fb572e178489c503df5d5f03bee9920db347a6e734ed72ec7233387f1579c13725599a33a90915ddf03725dce20fd3806abc1029a20732380596057830ed63b6edcaa4d4418871bbfd58de1d1f2800588ed207f2016e11abd1baf1895f6096e2c75cc5916836a9ddc09cab4c28e53fadbd7d3080088131cc270095315b61011b0cea5b4d64b647bbcea54d20be1eec0992c72fc9c9771cae19191cf6a6f1840acec1deff605626d0a0d79ea8fe0af63ea75e80f8141fa8d7ca6f4c99dc7e78aeacc67762ed0134f1a0b053debfb9ccb145800b9818c2deb46f7124e8655f37c3291af107ed75384afcedb44518ca14cdea341c9657ec638531011cb957ed6b3434b736ae8c8199684cc58862638c5f6c07e1cbe8ae68c5582b1697ca9dbdd01e97023138a9173d6b1294cd99514a28102e6912b1c87ef22cdc611133bcc111e95c355a26b20a3d6f0ead66e932c5e1229b0fc17a7d6f78134c69beb362ca75017b1bf1105ac8970fad48acb8313cb3ff10e9d72c4ff11f95c2dab59575525c98653a9c7d31585a3742267c062d6ffc7a4303a3e81a45bf39e1ce2097623bba70f216aa612c64ba06ed6d596ad6abbdde69d56ab45e25ebcd4e485824449550232be26f987c14008f67c9db9d0f709f567fa44502b9e0839457e5f0aadec0395bf5c38ed8de7529708e58c0a895198fc8b2570fb6e68547630ca7f313526d392ac4776be973205f971854c300454d5", - }, - { - "95a17355dfa9d378a18ba20e58aa4b8711ea1d6e3c65e0b2d3c6382892c7d02768437d47ed50bf8edc619c340be7bb1cd1d88b0d3d6bbf1031f738c4be09eb264c686d39b92cc7958e63c9994a84b61b5c412999ace8a9dee0e2a29eeb8dc537f63271af5f3844ed9c0d86e6913c02ed7d2b862a132f08f311aa92fc3757342d89a5dce8dd20d5792d5c60be9862ab168d3140a061489472f2266f297da357064833ef2554c49f8120ff40b961ebcfee1d0f8e7e5722f049485f72c502c9cc4afdbb70517f0fd2a00e12596ffe285d1b37eb998e0e89d756e9491ceb13e83610a3a66122b533c2c3461b3244438f5f7a7af8088881dfdf6a29fb563ce38c4c8632ada8e7e06baa2686dc6aca6bc944e5c14d6e432c4dad554803912b8fddb1c18a59a86bc452914b2efc1599c5597f87a6edcad33a7728827bbaad0a975ecc22b7748d7cc71ec7f51adc8fe0350e67dcfb31af35a8d7b72391642e29c2fa4b796ed8f535f6bc2b1198baf1cec858aac38959f83130af55c21383ebd57d364eeb0e442104004c1599060667ce5e1191e76a89199a386e5c4bf147206e7d6e598bb27a90b3c6a54cccacb39a0ac42bf22eb40bc8ec7925376a6c57d8eac6317578ac052b72ab773f572ad961ee05531cb95ee5a6d70add4176351960fb4bd673f7db9f698616a8dd41823f2f87924c40f131e6c83bc40ab1f92312f46ee86765c306cf4a1d77275ef9668d80f9d9c1ea0aa7b2456bbcf764e009584ef1c0b4b4c683fee3fa2641f48ccf7485a8356fb3dd22f848deefadbef8050de9c5c19e8c449c6f3ec2b1324f80a7d428dc44dbb966d40244c3af03bcb410a57ad1430615e07553a22686f1a62dc6cf090aaac3707ec5b44274b7fe28c7a3a298e7a8adc71e016944875bebb421babd2b64809be3454f25b90723e2cec68467ad2d14744b15de8f9c397a505a340e85998e207cd46fa18d76c46f458af4ac3821c0ac6cd68afb72c376c31daad1a2435fc2bf333260c1a82430edaf2499e7455a93b1301eada2e12365ffcd36a1119664d0c996318a3e55bb2c04dfc5eb251f7fd64f9d83f27ea6577d748e1f85248355ed19867857dc3383e01249cc37684b0eb8e891aa663801e4ac8f0331b38686a19f0d19f6e94c7ac95ec395962be0a4e3c8358d2f6d8f13191e164ad29cd1733bde8c31c7d8ab90366e26cc9a06707dcfa60bfe139a112db827778ac348fdfe26892fed61db7e9849a464e3aad561797b6c778e0688bbbeaf3349727b4670a2d0a08f317b0dc9c4b12ea85c0309d57e754d0c7bd5c83985fb82f776c968189908a8ca83b5944767c2efc3c5f898436de54fe8bb17224012a437896d9fa106a749d12aff657266276129ec5ac12fc7a77eb06296d2a2a876d931e479d3ea201cbb4b1b20bd81471eaa33786c624013e1f07577c2171f38f0511c6924078a40c2d55ce392dd2ab0885e29f4c06907a1597c181b933853838970edad7777ed394c491cde27478eafa5b7a36520aa0779261f94b957e83ce058298dcfa07b08ecc425caeb6c599a11103d7631e77daa0d9d3fc6f42703d57f2c624ecddd56b9a27b848de7dd28f8ed656f1e4decc95a8908217e2f2453ae50b5fc1d9352d735ce5bc2b538eaae25501d449d090df793151811443c64f28d19eeaaac4081e10edca4c4148e723ade8f7e7b988b732ba08b3ce4c8a0d655bac4ff66048148135decd7727a49ac59d82ad470b5479c55d3d8399b790ff033d3ef99d770e1eacecdc140480aeca1e2167553cbbdef2090c7592b40681b733b0a0d127beefd49bcbe8904c975a5ab8b1afe56d7ed7667b5cf92f537ad6972b876843364817c20400524097ac9b405e4b35bbba0d12355a0b54bd763b4491b2acd4e8e4fcaaf8fcfd398499d4c4e81ffa93ca07a5ff51a1540f178f43a931e07e1ad56ab5ce57a2f7dc3ccca114dc9ba8a6934e95f4efe9f3f76947909b280ea5fd795bbbc0feb3ad2b704e305cd9d8f37d178961f77355eedc9d7f77c58e1db2f7797eb8682255939293c3ef7dacd2eab46c4cbbdf929aac301a13f59831a88fab173803399d96dc216abb9f079e79bbfab667ca590266891c8a7ea4bc1724573e5c5a67e9f1341b5bffaa538e240f78da7733237999ac86141b2ac0324f17609b71c885630c90befc3b027a5f01e33979165ce2a00968c414838446c2aba76e1d7fe3707c742f68af21d30e23b637accc848f6c8df820a27bb4e94e5090ac6e008fde7cf3fdd5931fa891335ec8d01b5d6f77db57a87dc35d6701adf7ae0bf82dda6511c83ab4d7d3460b221eeb3d6c4aa537924db5559b1c6739040534fc330f5144c78bf99f5f4faa715e85aebac043e2529197a82ca40f65a8149a9447a9e58c61618600b0c5ab221420c0cee114a133a648dbc2eceb2894ffc329376d1eb3ce7039cf30ff6a53038b23c26c38739fdebc7b919956ca2e468d577dea6621a8d66b78075ad26a6e6d8e20c9b694698540d516ea2bd108625e5fd038b5f1e19c5d5993b82bfe16897c375322dbbca81c81cef6ad900f0ffe5ed02714c208a12f5234d78e32ee07af155ad1e1077a0d8938f426d8f326c751f6ee66c8f707e8493cbfc76f9ddf1ea329e094315a91ba9385e16c890823db0f0231c7f939a042665009d5edd8e48102c515341fa6eea33cc00fb5d82380d735b29f2eec3f61428f7b186d43fcee46b2037ad1aa6974d729848cf1a80dc8ddb0580c9c876def06d8f7642cf45263a655ee77f047fcd76171546319622bf71283f3bf0b519e123a85765779c8bb201e99981ed184e642f63aa61f9cc206bf45fa6e514bfc637671d9cdfba2891bb112a3cff438a6372ee0dd3e7d9f352ce52f8b367b7799e1f963bfe50638f0c74b94873fcd3d66fc1e342a8bd36fb8b88f33eefabb78eca4dc9c89e2c57aaa010f2140dc5ea7c86cebe2f8bf42a167d1d546cc80bfa9258c35af6efb1a090c293a4cf588e4bdf5c090ee7fe38fd7b5551e71e5ce2b0b5a50bab95bc4c257edfc94d37579816b4a2249ba05c991bb2ea02d047e480fc8a8ba71f48f344c6d20d140a64ac20184e45b4eea14d0953370c237ef0a47a7a2f22997715dd3ee8ea52f24ffe12674d571b3bf968454ca051701e411499bc43bb55bbd033f9b81d4baa6c49bdd49614efd20d58175af868ca16a9deaf65216abbdc3beed5f30b209e786a5b4c006f3bd27d93e9d78b51a1a2fb7f5160a0bc1b7df70952ea1573888ddde3d9dd5314b0d0a899a733eb48d5e6c7274667e362e4da6b37c480aa4d0d8730e66483fb1453a3aefad69942ac7f09d3c571b6275590938c541336a121bdd20722550236a9a5e4a37c7de628fceffbc260b1e9b6417c4295907937b13609b8585ebb8f076073abdcf19104ed80ffafe1b09997f115d987a552be5689c70fe125ca702d2ae4d807d5690bc2e90b72cabb0b61ad203b34c68df21c16b92bf8def5680b204ce327214c32e4363d5600f96162a6819dda472acc6441858f396385a16fa5ee52cc0f9ffef3d53c49d535aa37db2cd4b573ff81d74006677969ec1ad891082b5d18ca5b0b9f975574ccffaca72b805c9f7fdd76bfe3dd384dc953255a5b50b7731a137fb9aad42e77d3da1eff5a7b9eda5814993cf2d289bb25ae1680ffcdf419e073d38b4701021adb2019359bb70ff4cca930be7bb979a0678f20665d14803d8753c8ce54cae92feb026486ba747a861daa449863bd38cb4d5831aa6db1e7f404b0c3587aac8765aeecec686066ee7d11321574f04d3f3da571e71222ce07277eca7ff97607", - "5e24f34a8d53b17bd0c2aee5369e3276dbd7e7c2ea0990f1300fbbb00831b76655aab1e2fd625ecd", - "c1d796f1e651a1ee825855d80206baff6818cc8c247ee6ce62b7531e6e9ac32f", - "240cb25aaae4d085bbb747a5", - "319e968ad291ea5d4a057c38f7afa4ddb9c9565962fa1a7b231e397a268ad8e0c5030a2df09dc4f99402ddf2e0d06e753bf55e1b318b3e5ff0108de2328d3b8d53e23e08bf7d84d59fededd60d47bbb52736b0491f82c616eb5f779c496abd6499555035e4513c8613e7204e6bff8d06dfecd9ce38c6b83efd8d0e41f84f7cfc9ae07113237987a4b2eaa87f7e0a310155e282e57858244e9071712fa026cb781e5a4bfe6fa1bc480e534096394459a3d1354e2d9a54aac6926a60b388410fd0b53f7a3a9116292f37406369c22ea674418c4deeead171e00f74f5cabae5d24a0686a4bcd8ba99aea613a23edd0a019a319daa3779c212fbdca9d772fc3fe612cf178c2aca2aeaf6bce2433494027a474eff699bba95fc7dcf79ca1d77b1e097439a9050a5cc78e0b78bf2e7f50f959ea2986a59be3880519cd84d0a673acb0432feb1945c603e70748445c74600ccfec60efcf9e4d02a7df5f967de4b473f63b0b0499ff4ba350ec1182f3a0ac17ef9ae28945fc9bc714c49909a7c1e2f311aa6ad7652e22e1f48bb51cf53814a2125152813752d86c7f9468a991d0ac84b1a2f3969b8081c228b7f5760718036e26a10e211ff04ea323acdaaddf9b06a08c92ed663d0fdf13fa601cda45c416c2d3803dd9b5ca29cba57e59cf4ad93176c65c64507b1995d638541c90b381ff758833a2ad67b0de44c280fdfd82b3c6d4353ae30b33768863cd3169a2032f26e37ddd57e7da1673cfc7375bf6e6792495a2b434155d684f2a6f2b919f944469d47be5aa7da74eed69d871e6f65c3ae08904a9ad042ba39905188f0b9158fd14094bd6a408fba6ef57566d69eccda86bb54cd3ca7381f51bffeaf8bcc1ae8df91d22c359888e21b70f640d6f3726a34e6100ee269124747f0ca05110f63deee07e3628bd6aacf926036ccec02c0b6bd7259db52ea8b7a686b36ba1d0296c85e43e25d72ce46c66a1e646301dafd2f4c502281e6f949011cea69459c026c65bd130d6ef06be17b23a9c9a84746e39d017b144135025ac527c1e653f233770cd68e9f232c3b623ceda836843b3e9ea313cc6a57d28ce71ccfb7265ce73b06bce1447220645e6f66caeb06b55129b97c8dd8db54c94d771504d24cedc86a8ec706a9f7dcbbcd7fc7cf38005b2913b1cfb77370bd23183ac7b5ca5135a2738cc91d05b2b22640469e3daeb6a7b0f14fc6652563663520f7754aba624a35e5d24529a6ee9f5ef0d019d83c04f5a93a38b68cbce0cecd42a11aae305475806326aebb4f673791f50c9f90894add51a0fd7c02807efd8c1bd21fa717a860e224bc9fa3f40975fd8d558e4844a09f8920256528450d77e546604e2ce2d38efadaf39a0ea3ea12156174aa8a20481e6c1190e448564675f9ca60bcef37cacec5aa218122e7bd25b571ff10f54979d62018b779a2a3d5d7d6cd56ae31efef2c844ba50ff9da88eba7a8e0d9fc5388a805ba4ad35eaa4798e395d2fe112083cce2f11cc850d25ca5c6e60a9996cee4789ca99d519daedb62f4fb1e535b742a35d71d7390117e93821ff18948a78c1fcdcb90a5f1211327d7ee0663ef16ff446e0e22d8cb7b2d3d05469b1c02864f4a87e2d9715f60c9e7be841e308d0a5f6c50161a4a0464aebafb88e0d2df8cefcead93c9623106d5518a9852f320235594be10c45bc0cf06c9daa007100ff97959357f9be8e49c870d0a11c884213e266c35e9131439fb3654fd5f1abd1e778ccb02b8c262753a22653a09272a0c33b6b2683c9045e8f967af756b98dc1797ff605c64ac5bda8252e9ebfe0e4d8d7ca754fcca5e3de3c4b63678da095281d76d60fa12ff4ca818825f346b9c4e426cee16db5818d78a527a901cd088bc2983f9b83430b50683018996996717a1738439680b68e3f61cbdcd0f0e1a6b436af8fa05d3ce2228054e319bad1dc6ac970c75313c552fc1136fabc302fcd1d09ef1b9138d18133a772cbd9cb197ff58c6e898f9e83e4e27206f3b15b6bf2778aaf9fb38e0d50152f8dbf5763816132a04b4b2e9639584b3dc8ea6d95ade024f9497944200ab0aeab206ef099859b9240aaa15f737c1e0fe6d015d04f47261ade4928e3c2ca21d1f5ab4a3f571f2ed92ebeeebf2493e6e39f0063ba931e165384ee1b5081f5f8d26ec24716757037f5158d35effbe67009080ad7b0381292a513f312eb28328cf5ff47a6599e36c14277c3eb5053c5aca530ff5954c21c03fb3fd5fc0facdac36dd819b0495fde421411e0440991da0cc4a20d294446115c0b79045037fbfacfeac574da3bf192fec4bf38c27cef71d03787430223b6069ba6d9273ec8679736a832277c657862ca791b559a5054ee8c7c07618083f75480c8aa01cb086c7317315911802e6cefb15bbe20494b14d97e3a885806db775c216dc15949e3b724f7cbb30bd2c46bd5a2fd6132352c2b21cc2b47891dd9794975f70a6fa7a0791ee761ccf4c263f27f64790826c1aa656c39483e029baef0855935e7e6c133a4035a3699925fbde131ca62948879373346af35bd7fa52b8d6c3338f213bbd9c79977c0d710028d1d386df614c5faf4a1f8fe5506a9af7059370893ff6d07d91383baba67a617b5d829e0e2eb20e541ed5c34be7ef0eaf6c6f6f52d7ca01933a2a4e8de46e422dc95161ba8ad354f6bc7c8e4cf8ab5e08607530147fcd7c9481afc621c5a3230a05e2c4db79db9e1e73f43556a8e8f0dff7ffe420282212f23d4c5f6f8d2febe129b9fe5ba7ddf27f72ae898a4eba270b5d2bb3b6b06e38c546ba80a9b2bc46097d0b47db5ae72485ef2c6419e856c33c2d66a861b9d474699e730eb8a8992e3ea9c1ed74316687d5d9fc611189eba2aa31af5ba8e81179866dc016bda977c59c595e40001c8ab3a4a44cec00ff84c6dbd9ad4be30bcc080e69b9398089d6ea464a70f536ace3b447693301c94850606d0de1299770b5f45e6d28f8ab83e3ffe52178522eb91fdaa9e4a696674ba0f52ee18e960b04415782f018d67479081b1bf9b4c9b90de026cbb66bf7d9d12cddccdd9b2c8ee2f010892571c6f0c0feac9555c71bf61f9cd69553cf7fc2be8d058e0c3430e134adb1ba28985fdc4f0cf71bd3cd09f5f82f303cded0de62f98404477bdd0a846c6c51e3e82ebf72f475afc8e6388aec57206018ba2528ede194345cc1ee95cb2023793f692f708aac3c9e8a682af36b078f5d6c7a3ed07475e9fe73b95d1eee048ab898edfee3fac4beda45f03eeb64b2128f6df9453ed77c6010e13c0270c068f704f49e62fb7410be90ffee47584ca2efc5287dae1f63bcc1819e7548eb9f0d8a3182f9ed00da3817255a2ff735876b75cd21cb25e86aa4b2893f9e5089dfac76194563f9a14335dd37ef06a501c89623caaf6feb4afb792092dfed515ba7518e278c341834a9dd17b50a0fc860b62ec621b69408cb3fbf7d4ab88a3e367fda84c82357376fa9b1161b739361c313b99dcbf4122f3870c8175093298cf432174217398928983ab6cea4759f18e7a21d71fe1b0f3cda05d241e12db0818b8763bd23d958d6e52981ce8d84cd6d82640d2000874a53c0bd14949ec99e48ce6c954ef0d08e6e319de5ebf7e142f25c0f50ff13f6acecde6a270c8d8de05ef4c310ce9e92f40f6f2b77d6e7aa3f056d4a20f7faa7cd0b93d82e3972343a50a26ff462caada10621bc953b73913944246d2a4da25fa52cc6ee1293c436ab9031ee2dc79cce39f139f44d473c236731257c6f65ca4d383e39cf8d33923afea3c80244021d36e0ed43230c44e7d1a1297d35464861f9149d869f26cc51879027169803e43c898d1b4a2a2480197500", - }, - { - "2158abc2472e1b9c061da2c01d0ad9e996fd687cccca331fe8a2baacd12c06f284b1b5cbdfd067e5ed09a60a137ff4a97c5c26482659680ffb22bbcd4ec1bfd272749e52440537320fdd3c225c30ccd98cf221b34b89c247ab7d14f93ed3ccb0486a028c6f3abe7e17fba1742b6d4db85f6e6baaf82df1a3aa059de8d9699821d39bad42d56cc1ec67626092cfad4a2e1cb5d814e2cab78ccf5474a8bd0dc990a877d37de394694af6cadcc57727f393dccba7bf955f4b65b3c00d71cdd701754ed4f231685b7b5e2557239d7e16305be2d81a773765dcea25ea5bf2c15d670f3159409ab5bbf8da121c779132a8ec1480068cb76b68a19152fd83135aeb228b446225f91d1ed4303a4bc16cf3ad8173b30d2a1e75ccafc8c933db231efeae6260d45c7ef230ae2c7b6f986f1c19e2cf260ded9cd99d64a2d03fc5ee3d73509e47ac1c39dcca655839fec75517a9243eb611da8fae3e317e7df66cbb6abd59b16975eb463f509e784e65cd660ef1a4c5027e54b1bc862f397c9cf4e6594d98c2c2830801d3a679220b46881a372cdf3aaa33eb66b91a9f36b6941c0fe1b4d2a437daa50b811f2d8c65b5a69de185d78bb9c2f172dc90a89324c5a2067974aab14f4fbcd06ee95cd49e03717f88480a410afbb4e68b5c79b0211cb69b90604cdfaf08af1ef10cf28f0f630e97ab18d9b5138d9b9ee9154e0b3104a6c164f2a114fa5032eb5c247a6b87880332a0dce7b36982515297a05dc8a4038a09f52b1def7b4fdad8735443fadc462c7c22132f8b9581de2d213bf5c53f7fce34aaeb24263afefead5341a72f88d3acaae6db367c5c14a97d4f9e438e1e11c3c8fde7ee37e5ece5382e8c68b660146046ef96c24caa6bc9fa0a0c88281e4bf01b32df5218cb3750f9c4b8af24cc106abca62d085198d14ba2ded3cafc1fbb17519a696965a1ba5f65720e893f1ef3fbc5200316b9d4615bb23426ae53e1c5a57b2f0ee0d0c83f353b4ebe7a6cb17531d278478b4ca8e6ffdd0cad30ed73d568a2e44972ac88a7e7d665614316d674e84ebc739b645a9a4166477254ba47bc5c2b05ced88e75bf64da21a7f1f71cd946d84de13ca77b7e0dc2f0617d371ed96323a83bb11dfa16f81bbde913d9c259b10f3aeeb6b56cc4775c25f49343cef667763118932c2e8b47ec745ac537b37746ed65fda2d1c11a2de60ec02adcb79152e8a9e614d8715cc4e6b6891d6a0063576560fa3621146308222432ffdbc351c36c37d844a934088fea92ac54920facf870a62e91ba9299dcb6cbdb918e2d54fb642c3f0d60489c4bda489f6c584b64c8f19359ab25f388dbbe636c4d90c048f5ed87024dcf9f98a9e738163f837a07750d61203254a80d120c795f9c3aa791272f9474fe330da81a45be5ac838613d46c25e781606862912ff88af393040605fd4d55d07e2052227c37ceffcdd2d42a08bbab69140dfa4406853799893daf768af546f915a91b81d0da719ebd45b8b5f1641f15621959689e810217bea18e3996c532ac6e4e2e4f289fddd5e5968bd6fa9aec5ca435c532b6c74a7568c8aeff9dd19bfc2fba3b484a191e2faf9a069a24e2e6d928ac0bdf635644cc1ef3bbacc547a8e4f1d42d4bed3b6b8cc56216fa550dc37da9cf4d1d1591d9348594d14adc7a3fde5e5d1a3b9875c85de7df483cdd0baa86dae793e0796d14fef1f649de6079acbec6b6fa5f2cb2bd0481f5316f00dbe5dbc379bc3cd6d13bd8c775a727ef43e6a5fad1051783b22c05a75d64a8394a73fcb430299b015563c8cb0ae0aa4ec750399855411c076d21aeca8656f3d0cae084fb0a1ffc6f73b52a7ea5d4bd6d24e7057a3811719533105fc967439a32241f2d3e3f299da2deb821748cdee1a1c5e71bfdf88d833bade2f505268f375a9e6488cd8e16705cce91d15b60b2fd269a19148296a7be348aa349a12270fbc0d5748e538afeb0598081a4f1349217ceab3c4141d40f765ea2bfffd530fb9606601469fb131a44939be984c07bac8f26d8c068accfdefb729eeb47cfd6ddc646e22031f53a7698c6501d86cbba05e282d64b2f962a1b08b9064078dd1e3f14006f45f599bc8e600cabe6d855fcbae8c3060859202361d929a241f6c0711ac0d050b67a1d44da19e0b0e236adad1f60a327c9c34b2b9c64cdde5b8e4f664f2fc70599d44a63ee2b14d051c27d71231098ecd3d4086038d63e84547dfaa39db1a92785e38b640ea0345062a1c185b25a72862e7ae6574114eba592d6492087e2580dc5d361c473a614d647e66c0a30de806f4976b69a8b92301e68794ee05b96ee116a5fd5edf5eab43dc1103801eec861383f17c2bab9f2d9126c1802b7aee0c909309ee72679ab644abb9c4caa54add283b5954e6f881781e42f849bce6554c7a5e3becc5d5a209805ccd4a0117272a53807e3978ffb19641a9dffd9034490a9284f658599961daf52f24f6464c2099cc9ed3459d84dbde2ebbdbbeef25c882a9beda03573bdd4c6a0143b14d634a1a021d5f9fa23a7ed0f5598ee57e56672814412b6c7c08b8e709fb98575fe2716100d000a20a7e7200d800e556564c7e6a8da9d609b18ff0bb8a8812e96b834a6b534b0d5dc97f5da17f42f8d58e763f1b201625d1a5158c2f9e9e190921637474ae81d278002f197f7211540088931ca8a941794e56067ef4a497fdc6fa713aa9f20c21f23c3a71ae4cc5aed459ca7c020bf55162fbcf56a066546660c5a009b8ad2aaae9651c97b1e145853a10013d1bf68e7df25dd492c328f823ed982da54557502ebc6cc56d4d0bf2881bf3c536ea53b4dcb0886e73b066969dfec343441b9372d7ff38454c4337d45e2b999415ec48f19cd05f0f80c5a61ec369610784f47a5cf3b2a13ff5d8145303ade7189a300936006846812dec9ff15500f8daf47236e724d72619af3a6cb3e854cb8284d5b8843dfe056beaa45c40a4541a98c7507feb27a605d6e07189c8c5554a492a03ce6701d3d2ec782e2c1c8346b54a963435bdda3a93bbac1d837172cebb9cd18903d25cd6bed404eaf18730a6d1c6da0783b5411770ed34f35fa6c11a4292a34565ff1b23d4200ec5a73e6b7905458088fac19f6aafd35e0e791f28bbb2cb0117ca1c3a9e3c4863e487ce5d8c14dd140e9eb4794d87d75b01f683bca84ebdbf19dafab716421bfac9e95755fd346a0cd31e8520a55c7ca652ff63fb4e20ba67fab41e11f7390bc02363162097802c6a9eb18b430d07ea60064d5b546d15bb68cada79c113848136e797577f1783e9b53574f9427be3a28230fdd69d139205dd6c7e9e7f031fb6eab70d69ce905384c5c77d084360aac590a89b2dbb2d339899b13619b455cf9f0cdc08db6c5b5f3223dc3a663ce42bcc8cc6f947f42cdf8dde15a6926b753177513a52be95b1f0b88d2a1ec90e49959b108fe204bbc29199d7382c42ad5dbaff970cbd2dbeade54bd70415e54daa805d396361f525f38efc2bba3fd818f9d7af0594dcc341c20f18c624fe13ce7e7108e1d2fd06c58b03f04642c95e3ba00d4035ea0476ac138f72378d85050bf60dedc90af38e96f67fdc38483a73e847b41d31b894ddcb234f02b0d507bbcb15a8941f9c23b592a291cbeacb3ed213f2f044aa842275a7717757467f121294bba6b357c969e96bfab455c6f328d9e5181d909c3f0543b17d9af7fcac099067b043be79aca8e5a75c3a6d4f6246357a63c516a3ca595447f34b43a055d3070517c67ec36e636aca9ed71a001d4f7b81149124deeb7826dec3697e183d861d544c9c17baff82849d599e9e77ed19f801aa1ce095940674576ff270ac788d00c429187e299a03c6f3a1646a8f7d6290287e70bd1276316ae624da929c67936191abdfba45e2803884e5a3136205a38a841448968a7900709dda033a42969bd3417a8d865d0dbee1f261f4556797dfebab278136a182a63e5ca9789e3f1371808efe06eb0cc5ccfe26c0538d573378035afa39fb7cdf3ad889b277c8c6e84954e74f3ff3140bf13bcb45c822784125d23b5eceb73e", - "088fc7ba068f80efd8d4d62813c93c1eba77e9ff400c7781314abc901873ce200295da09245bf8fd2fce254397616151d94b511957c89a881256182ac9e64acb7b25d4a080cc9daf9ac2f231235483fc9fd415f69caf7eaf0597", - "78d5f86b071bbf8a185e5e2d54faddd2a9e26983b1e7a74be0f0b979b9f4af31", - "d9ce7d249af9496e99c93b36", - "ad542824b49fc520f0b7ff8ce2bff8b3d47baacb4a1c95ed56a306483aac551fffba48e8a8f5e4cc536e9266182f6811d070fb9282f5c542cefb4993ccc7044b42cfd6fc71793dc8dd2de23c630f9ceaeddba45efed9d7fca25fcb07d193c000822478b19c2ee9fb31760cfe01475ba8a003db469d1130318a79345a29d054a9f9412dca1edf6d8f1498af5bb6fdbbd3d5f9a244ff176f62742c53779291ef6294df6540d841f4ee8c7c58fc8497ba74d9cf7947add5373427d81ae928305b93dd26cfc65e63b0ed0812ce759511bfbb10aca98f2abdbc9055c4e5ab82637f6a965bb74f592bdf11118b8eb79d50331e76cb4d10c6b4428cd4ec2ef4cb727bdba2b5375f5184d77772d0f9fd3a3c579a4a548b9c2dadc22c805ae959617af49a514b43f47af834313ed2e4d1fcec2c4b9ea87f328fa3d23129a36e6c54bcd08f7e30645de86e98ebb11bcaf99543503eb1e024bc9fd51fe6bd5e6d749033f2452cdf28b3d0f8a304111bdd26dbde641c02fcb15dc21b1a9baac5e86d35b4126ed1cc8a2c3c2a5b94c99fb9b2008daf1a0c090633bf9e31326428c75a50e821b1e72a6504c9d7bcfcaabecd929163d365832e8971f5efebff99ee3f5b95f957e8904d05b410936d8a81c60b4947f8605c58e5b727d491995c76fbe06e556c8ab5cc661a0c09ebc98d61010050f68b31fbe1f9de8f6481b2704204b0164d8433ba4dc1076908c782826e9b555e8d608463581099a466f92bfd6ac9796eacc0ab771a3f11d03806b0f33ec04c69cef6b87d58c11acb5d1374450ce61ba159456b915043c5c17cb03f0ba66d027105bb6fff41e6422f13e2a466f073358bf68149a3b577cfba7ea08b42f83fbc5a2aff17c5ee7dbdac3ff97389f5b8d1f3750e5c9be651209eeb9574127ea81bd7619da16d1cfab85754883543f6474c8c0cc9d5b80e34bf8262d2b4798f9917bcab4b880339397907a5bafe7d149247fd735523df3cbb17ae5e298846ad3bfb7d4f902aa549b7667d3ea945b002e7b209bc83842a7b120d6d27ce80631404371f31d1f61efc5423e1822032a1cbf4fa1a6b6fe79934a202d5add8c6e3595e49be3dd9553a569521c50e9653bc684ef2b73c3526ff7a0843fcac9cc9ecf46e63df5b9328a54c576bd299a366bbdc0f83a9de67b03f1da16244bd6d52e7e4b52c4ed693827735554b05b3a260cd01a41d7c944d0b7b58ae4b0eb052da34bc22b779d7ad46f90f3d4049c097e0adeaf71bbb30ed24b32ff5c7a65177db77492c2571e9cd99f15e613797e319ea7377038d53b28a4cd66a697e5e8f84cf16bd0f0430b34826114b4e1d1ebaaf2939dff7f9f4ce7c0861e51701c42d9cc9e871018b447ccaf4e402e3d63be164dcdf6799314a389ada8bf5e51a35148acf627e51481b9b0e4bec09c9e6d59229721b151fa9adf8323001fcf33afbc9a949643172f39b0d10ef57b37973683fdd9b9eb46e63054fd05ffbef889ff8fc8f251b0ab41fb00757ec1964ef373fceb8f6d148a7f7c89944b3cfc240d091601b23046188ba70a7cdf7b6f96eb93dcd3d24d4aebdc4a29a749bfe3cf5f6e1a025b62982ce188e6b57245d829c9fc1dcaaa5309a8b9557b8824a78eceef6e977721de4065b474ae008642b974001a5565ef5fe4250194e8b861cc45a8691c461817f10b646fb526bf0fe7790bb0db29d1356e8c7a197ec78df8310431d632a032b5490c2a458eb8d4327a9679d7e8ef8739797b0e820e2c567ce3562592e862a1dfcecd50bf77fcfcd00518db65ee0effb9eb3655d5d401a4a47808faa596d17b316f828cbbc14a7e018a0593da9320140a752f3824b5fcb66aa4c3cb94366ee8b821b09e7bea2c04ece15e8a7be1f58463b525e8cfcfc3fdd395ec5b0575094313557e632d0a65e3099e3c653111a5fb4f0eb2aa710229fc055a2bfd8a7147cbecc10823f1244fbb6894af1408ff9047d6483ef83573b5421b9798ee387dc38f166b11de6c33e9785e9b3d9d28bc24c37890e4f8f8ff24cca298b44d6fb1c6aad28cc634a67dd427205285521a172c2a4884ac5b038e261e38faf0086a02aa29195713cea335c47d03d67fa0dec7a8cb21db741519f5f0ba0143f14d71e33d82c75d6a19b3f7a42e6c16d762354daa2670ffa55bd400637de9cddf9e7964a03b4c8956f36bf54d89cf16de23e8c52957b52eb4572a11d1398be72bdb129e2c1abb58c65cc291bb7b0d2dc326c6125a441863a6c92de0f47a355222d58bf10af0d297a86a98b4e933a8f844fc7f1bbc8ba77919dfc50c41219e3db309b92ba056349faa758daf360b8ac05e43fc2069cd46e63fec399cd7764b111467fc65407ac06f5f84a3179930f6215ac5ec906146c19e0d3e162e77a2bca3582128284282b251cdcac03ecc204266ac3a9cfe8d8854008baf89c0ea0096a400d6a0d2f7c681c99462cf0105f7a3dde690ece0438fbb820b9c73c6cdf6208c336831101b904526cf8ac331d879d71615d8b1f750ac7f0ec692d97a5e21e17e194a98c10172b5c4bc1049a8743188ae7c4d70384a7e68c1353aab7882bb91aa383821046ed0ebabb4b2dd126ccb935f48646b299095cdb71ecd5cc402e4635a3f7a3c8a6f54f4076ba028dedb402bcc92f5668dec3d91dda7319f58382017e306237e42480ee2c1f5930564cf16fdf37a3434585336b8e4535bba87311cd47722b9da727250560624a5dde48a2090ee44592d2fc06edda634b600fad9f843c6b2eaa0697b42858afee8191dd2a31e5685bd104188e2ccb057dd0a8d4d1205d7c846f5b8ec0f06bff61c7f47ac4da30e1bc80a4e95af79b14a83e9af2e0f195cb92d14f752a5f12ff90a05765be453075d799694848fcddb07859336ec101c8052bdc273d4abc313cfb351b543fa340dcd01bf32fea59881ddb8f33c6023ccea70532814ce4a2d0c66c846347b86c29dfc34f6fa4db298911d4367c59939020a3d078194e6a3a3c5126c24ed182398468e77fd61a5b1271f5cb2a97868876954c3f7179d6a045f4bd770f681cd82216cd2b1ceeb4e724b3fddeb74481e662fbd7f5dd45bed6d4f89d21b8dd9c1009ad2b0b16954e97993ab8f3fdd9d61f8db102a945591b4552f419971a9e46a792dd8392c8d9502767c82d9b4f69e66071eb579859e9ca070cad5fe3b7fcb77b8474926ea991ce7ad201421f8a79c051b762a066027ab2b9595a1c97ad57f3149f5872ed4d8e99195d47bd3c03bbee590a50a99d8048e912aaeed797977b52f0240a6cf2c865b108456881adbfda60cf701454da17bae879cf098df808f34e50bccaada2d3edeb1aa73cfe3c512d814eb33897b6ff9d67d3d682517cc333c3c2552adc99860b1f0d1076390de9f84fcc9e802581f77e14f5254da01831c70cb8581630dadb44209377d90447a1a21cc8a2d6d897db62d8420afbcc6ed85ce42f3281255bd43e0afd3e86b27d3b957104ef54959282b0e1b381a26f16057246704c7888126055af5a1f494540f01897e8781e1a5c0193b7bef4b5588d0e9b9c8de74dcdb63f03f7b15cf48fbb71c7c3bbe9329e3d326988bad7d0cb85537c1e0b3cd88f37a3c7765f548f99e495ddc29daed8c7f15dadf2e5b79def91dbbea277c51a5da250e66c305604bcce4789ca2df9a10614d72824ba8e4f179f35ccae7119fd962cce13b282f0f970ca6c4776374c4bc438f0de98aa04fb3cf23d2c6800a4a666c15bd20c486e88e688ff9e5fce906b4ae96ec7c3388d7567ce6c8bc61f6d2373b93f9ddbb02b384084b3f28f54c9ddda232d3084daa5fac5ca356ac0059f2fd3fde5d6a9516d0954653b699aa986f70733538e19721daa41329abb95058450e602eb5726ad5a8b81aa474650659c6f7f6f53f8a6e635bf35f4b1191e0dbefad3be756c6141c7d55f007f4fd131e5d5eaa120ba31cc32b8d4c69d4fa784fe0af7dc272898789c774e7995cb252eb6c8e8053c9e7adb59c27f675952d161dba78bdfb15859fdfe4fe4a44c01efd394bf51d43c600aa9a527d9c490971e188e28b980e77a9c6ea0a4ef6bd38d11b47f5745ecdb", - }, - { - "9cd1c25b5bdab9b9080db3e5e05dc749e0783087c310777d89307138613bdffe0ca259677c13208420d4690031314a11a97a986d8b0fea143f5b4da0972c9ea3cef80b4b0b2bcf2bff392c306a764113f0d9807be86a9027c6ddc85d096600d85e0b236937f295362bc1679537a8a9278229a36a9433925a105ab719c0b7f11fc31488fa071d3032de97c81540713dc29ae02c2e13be8823183f3cd9f72ef8ba4280b4499ee47c7c7c4492bcb5cf7e4fafaa7ec26906e58146215a3d4f52f792d3abdb718f57ed0b9b7fc7504e45a0fdf01ebf5924a4da6ac635a715879ea75a4983cbd9dab9e47638acc687f16684e184443aa9e81513ae4abbc4d1596b2ca3eef77cc9b0603fe90c0570fe6cf4dff0381a99212fadcf7968934ac1ff7664ed6ee0b61e41f5074dfb774b676c2b57a445f1c5749e95ed062837c727ae2c151c0ccb3a4dc1429bbcb9e62325117aca566b8fca0924b70f4defd7749d0389b90f55f35d1635f8d2efdef514f06fde46db6e11e492c8f4dfb7cb5454cedd0ddd32013a4836321a25110f3a017f18475a86583e192132f8d8fd4c2dcb2a3aa95c3be3a57216bf9727cfd1284eea6fa870c8e689e91982c116ceeee2f8298b55646efad684b96eab883fd3d629437e9a0b6523f47ea5b59474a4766ccd01c13170bb08f47576a0fdb573d4dfb65279c1b79cb535426bcab60f4022dc42e40db29f15a6148b461241bae62070389932f035e7257752ef2d6130503d72344b24d360cae8ec11fa2dcbe04d3b18e66d081b552e93a71dc0094d1046bf4491e318f2ae00debffa0b8ada58c5f23e33fb598829ec2f46ad3894bd7f530210371a02e51ae0a414eb2eee43f3e08126dbdbae04c7de4b7416df32953234a6694ea84e6889f27c74206ab8144a393a2614e92adcc77550dd54827387b619f004c13f6c4a31e8bf525277669db0a0c3c589eda15063f12eb774a13e2aba2f2f7b6e9bc69f8485f1d6fc5773acf83671812412d28704003e78a17da25bacd1d61a6d9cb9f121abc71d023bcafa713b7c954e4e1c524e5bcaefd86c4a843e209eabbd579cde0263fc059ec6ff10017ba54fc9c2a1171d6b06f5d85079167117c12e6e5d0c71c008765fce756fd0f1141fbad6c1d2f32cd8e80429611a9a78dbc8e738d458f9ddce58ab43c77b34db9befb25cc1a588998e8dc2efa75c6883244fbbf9a7b4d6750c81b8d3fdedaf98dc61f49d067c369409f984b155ec347a3bef73e2a44957b0ca0f84c7fc335fd89453759ad0ac2fd9a5b38afa9fbe74daaee7bc52301302fb2286c21fb922f74d756de84519171fbecaa9b869682d431614ff6845126a4034f10253aa244bf89ab8e0dfd1f7fe8fc1a8472a10746d26896c8ece7ef80eb2e910069435518ccf096caeda63ad692455b04e6525bb8bae27197ca5118a57fb9a5d8fcfae1b9eb7874d91eafafa0e4fab5cb4d0173f7e3e58fae369843a641e98f3ee460e8cfe95d98f7fd38a8d2235e9d6050015833e6d7d21d7015c3b1ff42f0d3a3d9a38d373c8524752e06987c9408cca550f08c38c2a9a8d86d5ac7a04bab44254ed15c7b5670e0747788e11b81adb0d29e3d0b50d6a429340ee0d44a8c286fcaf9bc46403d26b4a4af95b021336103c1ae0f1274b33bb8b21c8cfca8a56c639f18a9df45d083fa7019aaa14d1ba50eb9a4112e574cd70969640602096265a87b1f77c0e00bbb501555f1626196611b4a824991cf10ab2874a12a8e0390267eaf9e3f8f99eadfbf40d111a26772cda1f50743c417eeec9c80171a83a730f246cf31c6691c96185d672a0fde9ccd7091c4b455dc93326913497396e0a4992773caeddcd783e534eb0f34b99bf23a2db6ee738381b5fc94ff603be014c507888ff55557793a8c5439b11dc5a347f35a2666eda81cda4d1c3a78fc4f3df3c7bde91d05524791b67142c446f60c3a4022912ddabdf817ca3280b671beaa496c935661e5adf39c1f4650563c5c807c8f21aa59df926199c4e2404690ea8ffd7dd65f637452ff93995fe9c5ac7a322b9bdc756b7ed6f533b9357a4a1ffa379dd096f144e9e0d87330c238ed3c6b08c8478e23b65518ea1e4e64585e5e9fec2f26dd7400ce4c73ff0eacdc3b07e4f34f6316f5b82fefc66e442ecc92bea8c1d58635d644724a3380e71fbbeef4bf3e57c6240ff603d65447f510eaa3c9ac794fd24f844489b7c560c7814fbc307e03f6a213eca5ea40fddf51d8731b74ec5b472bdf8ba59751065ed2461b02c41ef96622e60c0d26f9dc78c24f94372bef7e47cf09ed565ae3a52d39b02ffddf1953f1ff500f1659db9f1c2b23534702c19ec1cb7c18166fcd33997d53874c7cdb4e6c2b4d82751911913434e48b37a61a0971861187e5decb7f5c1ef6988bc1d6f7fd147a623d8bf361b0d7ece88df6e1ff8d037762d232e22e51d8c6ddaa9dc597b23ff9efbbfd416cc53e5543253732a23aba151cecf73b3ecff21c6a9fd1f24211fc21cde9633aae918ff1c6b72468f1de7e0ecb6539fa353c069fcbe8920dfa8e2fb86782e3062462f7eb2a2c441bfac21ab62744b05c70b6fc3c9f8e3a8a0c5a4263ed256a019861ecb28e20ce78e2d93f1a1def669e9652cb35d105bfdd5ff2313d27ab3eb00d1b628b4c20f42efa23390802af96a8f261ded3678ea0b780e1f4a88d23588a4ebb058adbf9a9c62ce2ce2f8264c874c697482e25f8d5a6daca4f57fd97d23c42d7b71ec150d4ee33931db5f7d63abe7d72dc936bb23a367c798e6a01509644284d52f9ae27d7d1bae597b2cbc26139354dcca0fff6d76c6065d661b66ca5eeb9f8d85810a029cb95b17e5173ef8ab92d475a1d3e21799e874ff04dbc962c668ef4be9f94d85b2a99d97c0db8f6b6d63e00e36c325cfab9aceaf7597113bff0086e8fad36eac7c0b443de6d3a8533789616d4c863df7200ba795a3b8d0a2b9568bb32af95fa604a3e3ea778c3dae159e1b612458584564ffda07b8aba9710134242b2d83d23127b51b9e41584c56f667b71bc01060240f3a2bc7e5d438e7095c1236e0e468079a83a5dbdcf132d258e9ed18f94d3c098867d06d3c09544565677b454be34ce567f1c143e2f3153bdc0353d65090dfd8f7af4633b89a781e01f4634dd7b0323ea1f38184e697bfc39a1299eaa278c39a2709cde0a346fea53a61f211112450b318d137fe68f6c102085aedabd2b045fab912da5c58d8019239f3a44b18f4fe30c5352e2e2bf030334a1dde1dcd23178636f1e38ec9e42102d8c54df0b94b207e804eacab3edddf89fabda6c8e1bd4e17ae31a57716c679ee8bc7de4412fec3934c6f3e8b4c1d1447dbba0fbc775dd3258f789ca53f1593cadc710fef6fd282bb41c0468ede5ad5b914e4758b4148b0d0c04c75ff6208ca3e79d92de8abafa4ec70ea7a4e454f0759337ce575c4954584e2bb8444c34e823d27b025d25fc9becfb4391df9882452bca0373164cd76e9af316df3f5bb7532e22557b485217254d5ab72ce349620f03758219b259784d4c9f1c7beac3cf08e624742e768b53b3d60ad0b94442c847b84a516a93d9b7d068c44c43980b4c7e2fb0ac964bf05a11fb2adb4f6d938715dde88061b238321afc7e5e84799b02a94baf3f879f89a98ab474ca12085137d639b837ebe069f6dcd8456141d063eb1c032aa392a44d1d58b1e77aba38a280625ab84e3b123507ea7a692c4acd1756c031fa52d637703ee957a993804c13e296cc20c1de55c9b8c032e50afffc51c02e5c12f48383237cdacd005b09243d9fe05e51cea42b77645e5c6f4e48c10e671d216b90a48f0d8f5c1dda553217f5126646d11a62587eb0a4ee0efdaf0d54bc2eb04cd34f5a529b682ce09a34d5acab2c8db58ed6244f7b024e68a14bcd5d7a7daa4dbcf490485cbd38e6f20e839d2b0142b9d766f9527937bb1a737877edf6122ba306bbfb5379243a6b22bdf85dcf3b079691f0e90b28a4259c1c9d8a02afa5b5a661a0f9dac52435e7d22e3591593d37eb2e10f646b51be2d1a96cd4490289ef642ad93eeffd64d7cf830d60dc4a98c768a9bdbf6ec9923062ff04abf19e8b65b95494a9420971018c7e6268b8fb2021a4ddd103976333fa52389643c711a980664e29a8479aa9c4091c2cc2074ce3ac1ab4afa217d39c6a1", - "c22add33457539a957d32dd07ec9110f8cdd2f00ab6ac256b4bc7732f63dd3b867b0ecac262555", - "e71f9a3dd457b4064df1d9055889f105af175a2d10dd7b8729da0d0116c2d9fd", - "7df9824e774c5f86d83cb5d8", - "689683c9e7aa9c48b9fda0cfffea0458ea0c3dedccd21efeb06126f1194780917c9f4f2f44b1daceec3f6b1f75506f4169bdacf12c1f65958784851056fe0b4b42a22aeb043ab35ca73747346ac58c550324c4b849a404c94b8860967b6fc58aff25dad0556f1952c045b91f56ec8eebf6f552c18b2a0641c037e6c6538b289601e1fd5a7bbe7b6e0b224124fec341bf77615183abafb52b3e30082a0abfc2cf224324338c132426011d9f800b382e6b834896ea48a8247f149d92ded7e69c7800096076cd2a729a1fe41c70dafb1f855ffa2ffc27b93e2f5f6827ade7118af60730033675d84de9cde6c260d3d615a945dfe0ed25f33b6cbd2c0e204ee919219d85c7536f4700f06fa61937f8dbbe9bda88db1f4ba8a8d195cd385eec62edd9ce673880800be9aa4430e5c10a5908f6dd349af70f32b32d8db38a7d73821af47b993b622bf168565082d07e88fc48231a440469adeca59263302438ece96d89de11cf8057454d1bfe8e4e36965a4d82618834a0847af39dd8776866d9558a5cff79a1cc9d1e3c22e050677e54ead68b3cf0094daa01330d41bb66708a8bbb8a196fae5c77dc6774629d38905e81d97c5b16d755182f687a8046e55d148419cf9c12139fee50c0533b0f04a805723ce1ea5595fca5b668e58f6b3b396f438308372489b640317cfa3a79392cf6d1afdd8c3359557a83790021a4eb418fa189ad15ba9be0f74182ac76076f102ec171117a3d16ca20b4d200e03e54f1f0ee6308e463a148c0c85aac3ccbe5781cf45b53a313f7c9975a45d1853ed9104a860c08634a8211b87500b5ffa3d8d9d56f22256d485b9b45b24d3873159adb8ae25966cc40f164f342519e88d1ead1e711e1b2bbd4be64c7e83f056f797c2d3a5cf7c5025f92be5637fa7738a1bbba55f761dcd1451ce4b1e85a6628b629a2f7917a86363b01516472c0f8614abe2ad1c9d5501b2a44a68e3eeeb34a64541125bf49138bcd15b7c82dfd40708414b85107d8b982c4f99783a03c707a37787a91a7198063f0e8a2d52dca61755105faaa09c063c7a0849570cba1aa7ddb3600eeba602c7e7c9b90ed00ec731d4d1d8e4bb42f9e9db21616c4aca48dc27b939428834404331288f03c2b5e887103c51748d0257519c3988f6492eb70cabbc2dd8a8a910d737a678d0970ec48bef3b81673bd10b687b37e11d49e7cf90c03c54826ecd833bfd9dbb8174274dd45b139d08371d5d248ee33298193194734c5863adf4bca92bc282bae2f47da5201fc240dd0710a22a8d922faf92c2071a7eede7ee17232d3b6ee5f3ebb1a8b230600b243c860968ab427a5f540912e5e7bfa0271201f288727f2bd5173539d5318e5c1c0a71cba4d9501b91c3bffa7bb61b3713f1751efe94a66e17d2b42da51d13c3df40f4db988dace42a6a1b9d138c4f590b7227990711afbf8f56fa63f2800cc019bbd4a7b3a0983c9b9e5f77562dcad6de96e3b2eb85cd99d28a021a10d6734400a91369236b48ed68528afc68f247d45c79318fc5d634ecb0f3ef8536d8ec2e877adc3308be906c5b96777d0e05970023e5c5dffed12310cc97249e4b95e32451c9acca8394fde699deda57e938bed7167e62e2cb62357f82fbe821ee73b4e09c6e2f512515412c2f27805762a8493e74a3d30bb409e499002a97354381318af28311ce484bdf7c39db53f08f73ca5793945e13fc8c66d503fa95506b37ce134ce2945d75b424ca6367ef4ed47b9cb8ba7de80e773279bf23ac888eb105385ea958b1b49b27c8db6b1e14a5c8ed5d28808a7d0b6bff1a58f24f9c57fd8b8f477a9d1365f89c698b8ba923896181299d474b93e05d3c915b10a69e61910761a6d8644933c593661b0828afeca590ca18e702322d9140d98fcf836c2f7a4f72b59eb529823a52ab05d919c3eee4db2cae1067213c5070450a160fd52fa44bc9bacc5c136701cd7adb1faf484da376477da08f6a4dcaa37af47c7b026c2da9d5fd0b30741357104cb2bc0d3cebd132b5fc7c873ebeceec5492aecab95ab393f35b93b923d2ca071e6bd8522c3ad8598a05e96646504f1620c045aa5734d665acbdda0ef73612be4ca4d95ba069041e042497f7b10445869989ce30f55206a1feb4e64890b7d1f7e9df2e88a352674a52ae4267c06592d425ed1d88101cf94588135892218ac11f3976ab2b47a27f02eb887696c94b13d48b4370eb11222274b5513a0fef905c66d0c1893832ffdb9b333178b65338fd8b81094d8f86f2e4e96a47e72032cd6fd47af87eec295c6e980f595b57f79abeb4654c4039fa03ade732b1e579551898b801ecd6e0fb1c5fd198335834b51673d074a8222640d2a969998f5b878bf897fdcf3426c4e24a7c599e5567643fa79ea5d20e7de581a873ee0181e3632a4e304f9dae09a81f882d4061ec17e588793b160c93a926874d5a8b78727f88de9bc125589a9562db5bb1c01012bbea1b2eeab68877871ce83455db43cc48455effbc71c436aebe362af22c6a319d134f65681c4d0d51f9aa42fb20f48ae3f7065664aeff5d8349624a5d79eb0bef3cbb2a1244ee445f560a6bf7a796b2c950a37dfb85ed5be11e8e305e835c9e077e676aa5ce23edb1f74806278548e3fa35059abc2f032289f9bd76043c8dd1352b6131cf34f66bcd0e7f1d13081f5b08ed0c69136f3b7ad8e05e9fe99a9b73624095f96740c1f40074e5d92ffeccdc0f15502082fdfcfc97a800be511c22b875f2832b2b891cb1aad2a17c7bd0be4427a4549404172f7c14d5e425e14498237c26a7813cd8612d048703cb180f1a6194f688b4644304950b078692faec7a2a5c5bbc482f3a7e8ef2825c4c19032a7a79a2908ca9774c6403e6b15625c485f2dd078902aff769dfee2dca9373704bf63ad981b51f61253910fd48c49ef10e3938f35ca8dd491a8e569baef675df30367b093f1088ebe8f876191dc32055481d074e5e47a4bd728efaea9fee3e83d8556255ffb2fa08194bdc66897d97d1557186d5f873169461494a83368ed8065b9a033fa4c2f07f7c60f945b60479e3c89233d58f674c0c6fa5918150bae0c6de2b65a09ccd490e2ad8571745bc37e70982411af667f3e8e9b9f7f75d863e5fef05c1f0d2acc7c86585a83ee32e0a64a9e67e75b80def5bfeb7cffe6e6822efa7a9cf049689b58336b081c039696e0fd3b2a2a6b0d177c9b3f8fe5cbb1c69ea93c1235b2c5b6934f603127eeafc4ed0728161612acdb2ba894a5ac376c4ef1fa8d49b4722379e5cb39752837395c413dd29a2a88c03849b6fb2221fd85ba6d5a50ba7ee9c09ecc5e6dc66afdaa1b021282cadc68f19529eadab809341187d57cfdfe01d0798ab8a94277b9b868612e575bd98f70de80ebe5f57637c511800373262eb5ac3836b03808ca5d5f732f286a5f18a7b7fb8cd8f60e4debe54731c9c524b84694c5469975443964ed28ccff2f4e8e0cf4c60c1c8a092e986cf12fa90a994e4f26ac89fabe8a0d1e27fdc00f1d3d3fdb73bb76809f93ea113e336cb0a5438147e454e262fbb7d656aa1be1288839bc342b48ba7d0e72c85a2e24be1a97dfb2db85b5d850481e62f3b11a28c6407686e73d550b9f1d0f010602e82af26813d2484a8db2da0814782c8404b2865abfbe3c98a07ffb37eea6de7992cad73a9b81ae96a9acb13ba213eb4111d868cc73b0432d2b6c2d7e0e0ca7ccbdce86d01576e1136871a07c76498eae53fb7ebf2e85fb8561d10dfba740400ef4495ece7eb33ce3bce26344eddd88cf1ed8028ec5fe8e71edda54dbdae08f50f8df6295f6d7ef1163f62262a200456a7777d0565d7f5832fcc7ac144b5c3e0ce3e5c9b7f880a54ed5e80662e96b356ff58f2e372b1dc0d73cb8b96c72caa9e5dd312841a8be23f838bc706d893e1a8a48b2c069874c293c41d00226f73f987aec8686046ac4c0c972c991c38b98cabce30e7255dbf16039b95dc7d103fde630b03441b15bd2c214763fece9d6778d1c6354d2c9478c226175c02cb006006715fffc879a6a2b4111f6234ee330d6c84d453c9ffac08efda1f380110a8ef8c2fe44e2ed644cc3e0146b4d02f76586fbb6d69b827be38b9add444e2bac4d7165007cdbf2ea8c4b967fc1bb70c68b229f19bc3f79cb13ee6265264885f04c09a96583f331ed46de3e5dcaf08313ba6053f3d0c1916a0f", - }, - { - "3ab6cbeebc18df951d371e0f3cce2697fb367476bd9d50ca9e668c77636eeb9d24b68be0ce6a75eca194fbde6221755d57e9d3148623de24896a9becd98789fd3d14de0c7e53f81fe7f3fd491472a66b5b797fe19c5d0525c7a111a0289a9e65ae7c712ccf694cb75c490070bca7db17205af9bdb7fee27f9ff41fc78ebd2d3d399e690908b5c064ffc0d5bb67b0d2880bcb45c2ca2741691b6131aa1e5ee758fc50610406216905e13ec049ee92d1f95e16bc283dfd91595ec2037d20ead51d3a362140578a4538c80581b79852b0f6686c1ea66aafffc872024592ec1aaf2650d167a75bace024b261db4ab48b401cf85ec2620dc12a7fc37012af8ac1d6db923d82eee962129bc4ede578782594708357d29118fd10dc6d228bf7e461d2769e556488b776237b6309f3dc2e884cb2df1f43f71c53d389765f805ac053d05fa835e75fab0adb0f13ceeb425637f43556372d728a00fb005f7c5a20cf2b7f776066d60b70b11a848005c6d63dba0c93f139067b39017c997dd6b94c0138c3619e9a6d0e4b8792cb8d58a2ca12ae5d03e7637f2065fbb9e2d1722fd3aaf234488ca157d829e9a3b642458054f3dd58da41d7fba6d2b488a327b776d1aaab1a364c710e755ab22b9cf7abf1eb8949c5ca20c070f275f8959cb00c6d5ab7879003f89f795351a4ef4850e033d929f9a349b9133b2e0bd1cabbdd381594bfa697b845100b96b5fade05db12de040b814ec49489f39f5abd5b37f570cbb516636d5b7378f12872d02d4de20b52ed8ca0b12029a4c084621bbb578b870ca2ea79fd5df1ef8664bfb3b1a1bf038e4ba33f6ccde42c5146470c9dd293aa747d2372db1561617920142ac1d32e4f1fd18e8b9e72b7efb8fefc56d08f00450d23b7e8381849b1385ddcf9310a4850dbd6db7a4992690190655760f557a5027b5ceab3743365ac9041a5c14bed1126c4eca00d7e0a0e0e6f666f64bd1466387150ece5835192149237d5dd25e703e9d3a4f652ae04601d6acf8228e4e86055394c3abc9dccd02f04a60c298d101260b408b2620c137f77e2019fc6eaff1b234c56dfe922b0192656254fe3356143e969f64b7609cbedebcc8cb2b68bcdd9d723b9c14669da6cbfffbca2351de51e87db6afde435ead0017682b8014f91d9734a9ab9b374257273e114a8fffac786d53183ba666d8a67e30c1fe45bb1bdcefb5787afcbad213f8e36e78d30ae1305df96bf450349ade655cccbb17d887f79e00728abb449ea427fd2d0af80e3b5607a74a57dbe5264131f2fc49cb74415974b3d43ff872d4106ff11b680f56be06fdf85ec9dd850b1f77f759337b9a9ce04e611036d3f45743e562abe4b959eba7424a712fcf7c3f3773886aef22f7cf6168efa83cd3ff70b9521cae1b6689b2b8c423d883a007bb138025f2a31db2147691bcb365ac242efe40cd09a746cc501ae0289e80205993b07f86538d486803da14b74fb0db6ebf1c2bb8c36275137d654c1be56c65891cd50f705247d85621fd0d61ade8c05cf4ec15b84e8adbcbe017d7d5743d5e91025e0154a5d9bac7c6b8297490e9c195c5d74e046219c042219817a5c56636c7c4382c6a01d721d88f4b4d20250eb5eae5f3ef481dbf8a3f47a1d51d080bd4cc33f12645c8481e57835b77a85a2d83301172782f22026e69a43376ac4f5b78734c9eb914e6c76c6a12d4127cf195ad030825322a279093cbc40a680355d086a27f3fb7560713b019e7c286d96833dc60590e9a709f2e3c632894668e74ed20e42cd83a23ebea3dc3bcc49d14f8697541780fb2072dee6a5672d0d4e7bdf5cbdacdf5fea9e03c6d9cf0faa1e954172acc26dcd344bb3d9b2e0e6015cc55d19713d795bdb7c21b44b305e69c69fdb7261483f9693f36f45d356462f1ba4498de1c2e8bc3e0a70893acef2006dcd73cf15b265a8a5d4ed792a34a846d8f1d3b9b3bb75f1c5e57a00b36c00203973ef4e2654f6cb29e4445318ed99f0de6ca992281e83ed03feedb66aeed6a461c6f2871ae95343cd9797e58430d5639d7ef5c59c78b29f76a055e18e2b85eff177770c60ca4f2d61e612e617e749b4653e7901b62ba02dcbf50e59219349120ac01e6b8a6e98eb54abd16b921a1ff85898f90fc49a3c8f8f4ae9b0dd32c3e7f2e1527c4feb67a496390f28532f20acc71abb8bb4f71b434104f41e36b705289858a4e8430b8cd9449b0198ca2244923cff1df0f63833373c275572de5a9a77b23e5ff54aebce8e86d02651f26ae32e69001e5f3951967579ebe8574682cef8c12dee0b18bc999f8cc0f07e2ad3ac94d3caf30c1c8a8295756aecbbecbbb4ade8a2b8015e52a0eb1290693c6316d036e0c443fc4ec591c32f7e7f1b3933c921d5812233d3c21ee5528822b59ef2ec7eb62f7b04f40cc8238a473ec37a07e54f8907825ccaa1421c2964d2c756be450dedc011e1cdd9045720421b9a4a00e9d3076c2fd10d71ee36d5c0fd2c7e42396b034a4cd0245027449242dfdc42c8af4a34df1b4150097726c9745247b78bb2bad5fe8af94eb13ee1f41dbd36e56d801a4c9c5b9ca5d3c26f4714b6fe9f69b87567426eb6f4ac97e8c9541eafc19fc90d3b24aae0f76c4f3f81063d206ff695d638048c2cb023147a78332939d2f2470d16f1ed0e5d3d4dde438affb2809488b99815e54938fac3b02deceaffde310cf422f9027f364f5e79da5d2b5af1b4138ac9f9d301f396b220829c1f60cd2b54ef24576e5ba6ccd4802900db1bb4eea57de7787eda0e30fa90cc19f099444488699bf7c442c398c2ed989d084c8cadc97325484e337848c34562b3dea6f7670f935ed3d5216c970e04351651c1c31a34e862821bdbcbde202d91fed38965e31cc3b6f1e52288f327bd0a787ecd92b3b6f535d1d000b0f02d41ee01ca54e4e6179ad7fcbd60f0e41dfa5c9cc7ee4f7de3844fb385ffa3b24092b30be697f1fd32c9faef29ead346e42fe2ab1d312901b678b43b7758edb7eaa1c2d038b4cd6a7dc759a6b12cec955bcf4179006a7ab6e22ef15986df107080d340b8870e2304d57caa87a9961c04655d7d66c7f71ca9260e02aced131d6de65d256d6b487141c51bc86eb1e4721742f07d09e799b30da7b5ba94c8d701ae34271ba06f8ce134a7a9a2598d1570cf05edd9ec868cfa2e41b4c20a8bc4b8bfebd45f5a60408f08e931617746d1464bbe1f3844ab3272ede635f771f9af30e483903ee4d0cdecbaff4d31451e7791dc97c92042fb932fe1c82652c1d682a55912e33de3b1299db076cef594458670dc4f911f4a244e2bec757dad4b0052a41235e2f5e60b929682608c16a61287826218a1ac3cf0d8286555d5b0552754685c365d4342f0d9c45065daf6786179da791a86b50a5edd6fb4b21f09d9747136aacf79ecbf52b00fb88b0630ec7f0a6699901ba4eff913a3ab33ac85a71ebb51ed343eac86eebb3e79c16e664078ccda09e77ef8e0919b8cc447116b65ccbd5200fbfe86e9bac5637b33c9bcac9596b57c14ad5da548e96a8ffad5f5c69247c68d464c770011da7b45a337f138cda6b4e15311879bfaf12af4c61fba596780e6adcd5dadde372823da6014122dbac70f0dd896a8d387d3c74df282a659028d06cfeab3ae22dcd1fc3ce60f69a0d678aeae0e5681952949e31ccb8975cd167c9d012f4b230b1c1f47022eb1a3042951b338a734cdd17db0ed483a621650deb3510efe74191a94611dc212c0c73b117a73b8ae41892cf176742bd98a7cb73dcdc53b42df56d640739852335f8d44d901fc884286b433fc285fd5b3db8df0a8522cea3182c071f559c328b8516c9252681a94eecec7ebf626c0a9014d9aaaa0c694d14855433dae06656657d1f8a939123d28e00513d72bd3802d211ad7c1e06b9228c0d5656edccad5339bcdddd5e01afdc01f10974be3187804324fc513ba583b7b2da1e9096bbe3d078c1adc6c34d92c54e9c49fccdc17d10e66962120ee5d9b1cfe852569436270cf7c4c3bb12568050e2ca4db08bbac16214238413195dd4d936272fca5d56d7551b9b002df1807ed44abc84c66746387b79bc9e830a635c308a7bfad7c2c22cee6d3d0c5ebd8b230837b7ceaefdf71a67a3a8eaae0c36de86b2d96e759b8b53f8b8604775eb7a7e13223cb21033dc87d775628581a954085c2d66c1c8f225b1aa86091061738e7495cb36a5ff032dc678904bfa39a00285cd6947865b6d4805e3411644b4a4c94a6fffe05ef31e156bae6165d801685dcec195552d029d22e5de393a82ddf3cd3de3ad8cd6bba2325a03982204f07fc3c21518ef17a601fd743b27f7191bb446ff61d3c61d7608777990997e911932532e5b3235f13423756f5b6c786720cf6682932c90092", - "50772c5a0e156ba13a9d86edc0e600021d56f7d31e7e452a74ad53a6775339c7ca6521d87a8c79b42900a1e9e6a1ec03f7e3d615611c3fd5c9927c40e5b508af1a298794b60148df01e9c9e78ab5ea8198c097fadcd6cfa6694be64e00eefe1a1885aece86f6ad87df766e692b58ebc41982bef5", - "93a2561a9904a1787a10e2a668cd6a814f2877a7b512698e94796805875c8d1a", - "588d9bc1d98210d9700ef488", - "165d8c9eabcd5e93e6eff7be122c8c242e1a7f284790c93324f924efabcec4a4ce48262011b7360c2833143d645ff295453853c92f0c48c6dfc2af7ec58d9bec0d13239c7e5593cdb39d49376c6341263df80c0ed2ed79fe9899d0c07de93f6ea95a5dfd307e49bdb5672b158a4df623ee86d54cd1a0fa9a60ce39d1f5f4b6b0ce9daf2a61a907cff3bdd3f29156ac439638e0910d728843ae17ea7368814ad7734732e7c023d4954e1cd5fd19fc9b76e9bb84b61dd4371478917757b14b366b4bfab4eab0d9de746088ad43d8742e2b9e58faff15c2eff084df5f4316111d5dd7d23cc0b1ee1000253f26cd260aa636f03f64a8342e531ca1515b3beecc3ee07a29184988325322d5c09754c278231f92c0d980adc919d4fccf4a1da1d37f1ddb58ca997d6d700946199fa007c43853b6caf5f8049233584087fb23c3952414ac487e452f0c3898486d04e5b008b843122501f9c8a294da9159a04119ad5c8e9f5c211411e34559d3a7bcf2ac10e0174f94f3f2968c80ebdf4498de172884dbdad0acc3a887f9bfe896a6004d54cc424567d53f1198ba33c56aa460edc6af0e437b34322c1144854bafb2434f00703c1992dbad0ceaa0616aec60a380676ca11558cece57a936959d6c2ffe0647eeffd37524fbafa9691f31499701b202d9dc9980e79ea517089eced779aa45b522c9ad193e63ea8b64e8a942f630d44370f23b7e9acfedac51dd9f139f8806b09a8fbbabc76fec3c3721fad5087a6d41f93973af8d787d8bc74a3122d99ea14e2f30a3c90be4b695c8b269784eefafa52d6a79e785eb47a23d72f037ca572b7029d2f37baabce57658119fb02c5b659e3aadfe0052f1cc3c0afc6fe4624533d9700388713945c20c1d175da53738fc73f48fe57fef8305e796b474b6f8d3fc5040042373a13384237d95bb045ce0c20934a964a8372acedfd6e559aa84180a86311a3996cc17bf7f73e5d85d4db2529989e5836edad490aaa5f56d17326825aa20608fd209903335de4b36b79f68b6a52194f6ea8ce42570533df650e65b50c367f69b9f08c32b3ce3e75318106b8b2c6b6d09369c781fbf2aaa35053af215b621f833814ec4778ac683de0dc22c418b077a917a6e405ccbde9f72ed523aa696be1a6f247b096b9235217bcf19b88d43178cce5a7d82335fccb4c079e00280bfd272b9f16ffefa7fea38d09dfb2e4874553b135052595812aed3fa15096abf1eebf9abd598289e0d156974de4c2654c60825d42b662ca7439816d9d3a0255f40a4965504f643f029da535d4b109e8658ec570e99859382ca0ede0b0495d508c63c7f1eff3f648c60e9b773590cc663a751178ba7603a11985ff519056661b9460c1aabc30e83bb0073a927682a06d1b8050c345f7920c1a37546d79587fae2a92c803a986248f90547f0b6c0ad0552d8260d2a0dc3cc76d092ab76b8c12f05dcf141167a6ea300bc23227933396ef6fe9d51a1ba5a754485950f06cfa6964db2d0fd1d4393cc36f0592fca25ac1a6aacda2a32f548ed20287e3d291661848a62d41504e4fcb1cd1785617fa5786712b3005f1a1041733df6cf838ea3ea0b93685889bc6b2857d80a9bc0e7a66f7fb3d805770402f049889311fc112dccc72a25bd127777fd87bf5ab56d39bfe6be2b45a8301c2f324dcc50b27540200d522c24941701f7293b8877ac84cf35638507c7d912a3a94e4384b68c507412df65d0c4ca8ec2da704bd4483eb2e0d13b68c0c2b68c106a55b9710ad0a1436d655a3cf3c419d5e6f027ddf5dcfc896a5b316a7dae9290a7bf81aed539a647c8c98e24e7ed6a4f7f00a11134ca715e5826625c250500f8f16b40de048b095b5dd08268407f58a91c86c36ca5a2bf4f8fc682adf1bf601da24414c74956e1a8fd2888b5260e980c32f6678a4dc4ff73220c22593d23144b84c2ff56920342248876d15ea54fc100c09a81b802dd15f030bda9aa08727ea49e34f0ca8693e0a06d0af06ea7ceddbf0584adfdebeb20510bbac683451d9f84cf0f4e85c34d979e550e07e7f414d6f1011cb3dc28d0df6d4aac113f2d5b04e4486ee2cdcd4157dafcbbd55e8330a7176d1b231d9f47a63da9ee30fec6cc2c5aba3a8c6154f79997af89d972743255355647235ee939f4f305ec655271e0cd562ff6f401b86dd5826c769298445108ad0d9e13c504551f74c507436911331db60ef0ea99dc259b13cfcb0596fa9b3c95cd7fc3b1611e3b012b6719afbcee7548939676dffc372276aecd08e6a14251407cf995266545427d49ae5ab245cd5d534c52542fc71b3973f0b766f3d234c8baaec8b74eaa8ba90abe160b4504769d02e08d7af4e7ecc167780c619cefa58865169b674b2b1e10d82f6560ba0be41a781f4afa46bd722566d941a8e6f87e4a5c03d89685a22a3470354f2922e2915f9d46288a5e8896ed13617dce694a595e379f25fe621dde8ba73d865976950954e5bd07db147a0fb74f87cb06aba49b073942b82fab33a878651df73df2721ef800b658bdc6c359d396f684598e93f38e79639b8736b02dfcc124fb9fc199c35f2fa1d0dc39939c57286e58a7deed7b6c76e02b99a14d9bbf11f65d8eb7fa096fe4baf0f78cb34736499a0ca550f10d7edc8909dc34b039e3abdf1aa67a51d37a2eaf4c07022897d4d8355d3325bcf392d91d02d462488ead90b366e9645b956c3802e4249d34b5b2b2484a1dec15a9477821df6bef5e1626ec5ee9832fc3bd0b63a3c4100d32fac3e9085f0b5ba43123f54beaa7ccbe6ba68231649f35a28acfcbbf97dea2d6cfd96025032b3950ec8437108d0f07baf1bc89e3afbc2cdbb5031d3cd9e20b19018adda466382059229e4c8c54b455eda4280bde43b36afa96e146e408c7104523d5f565d22ef86d4c7cbf9c6e0d0b30e37b37feb9332939c642eacfe19d0dae1259d3267635051ea5f9b518dd74786e45fb8bdf72cbe3753bd50bea2a961b49cc0e2d589e77fd25ebd962463fc728b1d288c38a79a182b124d345872afbcfe792d259e7e5334311244edc75d05f9a12eadb61fd3ff79fe8c097eb01a4ac1f0c339d3be74be3d96b0b6a15e8868d043a0f2007ee8aa51756d78b7a78ad90fd9a26afbcb51fdc20ed7a3947f715c833e363bb87504d8efc9f8b93a993e2e26430f79f3cce203b09093c9b456b1967212eb0db4f7688d4dccd4a523866f75c9d9e7ce07825ae34399c5607a60b771866a647b6d5e1e20795ca906e451f367d8c40ffe79a2cecfe7aa47a402f8d49be9084661c96ebb11f1b48e7e8abd2978ee626f962e98f99db4eb3c6a52aa2bb2e62194120ce1e773b9db784e8c9b5adcfb70e3bd5717293eebf014e9872c5c1bdf3fb296cb88eab5e97a5ac320092033b49f37d840dac23021c19ab2a89190f3c8dde927f6e6b41874bf71ba7747a616682bd5b3f17a1dad40f4993a1b186ce4f44afb4e36af7715450bac62cb1527eb8db1d87bbc4d9c99415d16660e48efd911e02f5777a77e72733af3c3f5315dd0c785d5212b79c46c3bccd74582c57cfac0d50fc0c85370476913f9d8e8e10d0f6602f2271994972de49ab1a91728713c3cfcedb0e61c270b5fb331a980965bcfe10b41251a0f7915d5943f49fb139626f1c424524f2fba3a407e77dd7513669894fd09fff4185fbb997b4e4677f6ea0b52892f013f1691bdb38eee9307a565e396bab484d91cea9268f49aed29e319b0add900b6a75f7461db5486aaf5366f98df05674361308931de753c70777de73337a996f6d4b0e06d63a69849ba7533bb0e446f062edbd6250e61a49f4120f84efc1cf74c1bd30cc61a2d719fa76991dab119fc814a7c56f48bd584c7935679c53bb0ac78905b5d961fcd89a4b567d17a5182651cb07146aa9a94972ce613e8ff9c878a8433c0244052f09980a52d800e97ba65e8ac186862def58c72b9feec91266e26aa5075b3337c7bb8716b3acafe666ffe2df32b78f9995661d3ba28f8a8780436aae1da2a3e6a0a16dc562b8d5df6f68391aab73a10508e0f55208f974a0505f0fc0d8a55049a7b631fc94fab91459ae1f199527362695b41972e50faee34c5cca9e35e8682099f5e9652f88cfe9fa990ff2154c89c1c2a4ed6bb8a889fecfdf048ee0aae7798c55d6cdfd062cbca97ca289578c832d658ceaf26faba54c9c3ee9eb5bac80698c1441b9cba287f749a5e30d5cc715a01c89353ceab0974ae77fecc1d2dfb31a5101783cbc002c73cd155dfd14685c2f9acc170dc437c649b6b4720b676848a7f9b56cc4787eabe72f6e3f2aed776f9bb1432fba93a63bfa44fbcfcb6eaa9ef4b79b32bdbd68cddbb9897cf5a02c6f99fc765790092edf0d5bca7c55cf232a03fbb6f3eae09b12e09a9b49a538e0589394700d16ebd3", - }, - { - "3497e8d61062e6f2084ebf72d00e9a47b550591edeee9746f31ea28039a1646d384c4348af293ab778f92a4807c48fbd14e8dbf3d67339c991dc4aca7dae38b5fb7bfeaaa538611d328b653950f4f664dcd257b345917cd66dc6a1ea75d99f70549d1af9d67b1608077b41576f38bb4c0a13ff4fa47b251142c6fbb79f9a27f43841ed0ebc0416c37f571aef8fd63b99e93ae88db50e9ef7d499ae7433d5686b165579d3598f96d9e7b1c876870310703df8fdf2069beadb34984f676eb7d3840c4c5766dcee3fc39f0739260a499647429339482e232362bc72c92a299cae36e9069cc5f4db8893e2c1b9ec0b4f334de26c951090b9724c2b3b7655d8248bc12a27861e020eb1e4cf6ad0dab903279b6fbdabff761d4ba159c1f631e681f210a8782faa86e08e554b5e30046157a0d1144bd08a691c2cc2dd22f3c3a4e5d44c5d03f7e3e385382ee4683345c0d316d41ee75f87038b49e0ad3ca45121789e7e7b95615e1a9a8dfe02c044c2935a97b141f639448182252ebfc980e0411e5fbcb3c01acd5aa7cc5d67101ffa6ab6acacace5f02d67155c26dedc071ffa66dbad26f67a819d46de0556fdffc1b4ab6d60905d8ef873ea1e51c62571c08b4c6db242e733e02e11e5840ee445c290b2232010b118839b37d4615c4521e8928e9ad475cdb4a3de9928ec7e6daf0e20d22e308347b31e7e877fdacda0c25f2e5c33a329e84707816ff4ffdca30dfc753c2cf883df16016795db34359e9363fac60624ae4d2b30bc1f2f99c23d953779c22ffca145fd08dad83c0f76cf727196799544c6c07483e0a41ca2e1b1da5a730956154f531d292b5a39a229ab13bf24a804eb68786e481c8aebfd3bc557afceadc41d00e1472c3b80ce652be1245089283bf1a1a93abd3325bb6eea121db8c0e1d6c0c31decfe9dba63c89b881824b0531651fc500f2f75ca9e5fdcbb179c9ded5d600a495ea704c2709f4a88c4fadcda4cd82a5b089f25a6fe0161159efe03fb5e0d44bdb5487f25e8c9adacc389860f62b06a6a4f8f104d9171622f70652ace736e8b28b70a4d9fd3fa4b9784d1a6e6811150d0a0601d31d17f6041e58a1058f99b80b0a6cd4f79c79a104b6bb731ecc881bc68e1d99ab358faf43d8504957ea0152e46e27dbfaa17d0f58287276e4fa82ab78a03513d5b4c3199d1362e4fd6447d1c26fadbd011abc69332ed0181952b391f2e8a5c89d68e22a7c451f69a9573b6bb6d918c7e3d52116f3f12f1d43d2af46bb450f58bde1732a268293cfd9cf2b90a844588c1979a30d6ac21aaea4b9e5500ef4a8bcd62bd70cae6acc8839f818d23c615e45daf14335c36dd46817c9b816be60c3848caa812b055da33f45bc01721d6fb7e850fb1e1458f27c70bc34876a955aef11f5703cfacde03a039c3b75b99b2d91fc18b00071a28ce25eb169b946b49858aa0885a4c665deca020a3fbba55d4d9175fd91e7901ec9eec0239806e8305f8238e5270f4af5c94d0008f8a5564636cc33c8a3d3e76db2a7915abe798b0dfbb3e322b33e188c7b188573bddbb9e4a7edbd4bb194b9743c4aceeab449f8affddbc2b109eb3d84f3b2f8b18ea2962680437241d82bb6146674ff1abee7baacc38d5dcd688b425c3e3b0dccdda3e36de755afcf7155d3d7cac2e279baad167e2a743b82ff8ddf3db8ecfa9680ddf468339427a4e9fb8ca4ce6f1e790c24e7269912a9989088c65965b0efe68ed44eb26876674261e3e72042f5995f1a7075b3932f4c23a8027d0db35ce4322122f489995bcc0b3fa32b7298c4c1b3354766c866a2fc0ea5690c58c5e08ae7037f70accb3ca7faefc37d78883f2bcd768285dd2571dbcaead813a0b8ae87cc1df868e93500d414c4418d5c80b919f73b9fd46111a02bfc884f9d30ee14fcfc1d55d54256b9572afad4777b8d8172c911472a22e7461f6f85aca063c19d6fdef3351149ee6864e93cdc54ca5dc7837f0ead91f5e3b155795df5dd1f933cee8671ffc05058353995019e5f6f55d2de6470605a5411afcd7fa5aa8f38d77dbf496d7fa9c5a4d35ab661aa15c77ce42bed44763166160ed5bba954e470c293ca301363f5b837406ea8ea746057588c34acf266030864d8c40e2da88ef04c49205fad1607d456767d30eadd884359bce04c12e35487bc1885d9b104c9fd4dea4ceaf054cf46cb3c77a619ffe963acc9bfcfad0447591ccd32cdd1fccb1fe7080ad75cca2e17f695ce0095a774327123f21e2839773506a9f2d896bde87dc5e35512ad733aa408f8a49e9018d1013cc32f550c968a03308cdbc73ab444f0a79a13450d4de906369da4c6a675d7e338f738358dc238be4f047579c8ba7a60448da541cb9e57f22bfcb8c26280a59b77edd0f5a009a3ef1e2958d6d3c3372840dc6a0c6ab1fe86aeb7590137feacbfdc7da57c77595b8572b45c4677836ec86fd8c4ca8ac351397aaa3aa298d752754507e1cc514d41c3f1ae0a692179218141f65bccb9acf6244730c6d00829455d21371972745b3665f930cf2aa9f0abebe6f7b89094aeb4dbdf7bbbe794f134b6284e289c995ef2929fc1bd39b259259950de29e57cdec15c4a7d33ef6e689596a6ce23301d25c2ace77fe699d90c2329da4d0f471bc093563dc735ac2fdb32c6995606a67bc953534939ed1236003c004d3b47590beabf39a1e4d5d1b00898496e9effda68433da17d1ab3a32aefa3681aeac116c5705077552649153ed15e9d704e67d8819579feb02d91db0d3533182ff43ee5648f5cc9a595ded4772d61e77bd9bffd6f29fc1f478dea44c32d5ce3118bc8860b254fb0bb1e85223bf709a7c0b9a52fd3914f1b1f295fd246bcb568388dee43a32df45e3c798068608a102143b5511746903255b98238003eed68776b46bb0e64af6c9118ecf9896709aaaabefbc1f58bf45b45768345b560ae2cdbe4d7da497736da8013c4098addb4258cafe7823bdbdd715250b707b155248d39fc6773639e4de3b201fd3cdfa1526c4149ee7d15bbee680c956fbdea844b1470a287d430c5c7e2d7b51fa756720397bbe214c19df3399a989958732d93979e361f7266e53a59bcef695435db67cd8749d258e7d582726e1bcad1395e68d7848849fb6d74451a53ae6e8989c64701102959f7fedc6a5cf8352e218396f9181f33037ca74886fae6e57460bbcb71cbe4cbb3d3a81e2090434eb1d6d5baeee4ede251952ad88001ce047279cfe435a4afe97847f798d84ad79a11bd44f09222d2f3b7fdcc47ff8a4c61f40c4629a0f603193e0aa2164579a05726e547c9081abcc0087907f8034469f740a020e19623fad42e9cea64068abb3d6ff2f6680da328061c200e1f646816a5083786ae5b71728a0e5cee14d7a942379c389fa9dbc7afe7e7ae075c061df11e4587bc90f92f1b077c091c43a25e7b3e870ad852c2883aba2632063c4ff74a857ef7267816317f823a8bc5dcda311b513be3a40e6bdeb89210bece50a608e624f00c9d063e0c8878884e45527f50a3ab4447a9a01652322700f087b6f96ddbe96a68ef98656800eda6563015a6d3c0eb1b6a9b21cccd58cdcdd074b73e40a098a980210ef831ec9e881cb42ee07519fbdfa52d9c62766a2046dee7752f880dc9082ed7f050b49ed8d14307b1b811bd87b6db2419418e49885d20fd7ca8fb45a11a1da17ac2304393734b552b5d02a303ddc72d1f456697a287851f207054c18a6262f5349348c806841d21e11fd4e4ed9c01fce1688483e009930079f7d2045a34f98ed83256dec66400a783d58c61619e6e42f6e2c6e6fc69e76651b96aabfe643ac69681955ce595f4696b80dadd1f3910061be6ed0840d47e928dd93e7c3d6932d3ead820d06e2539d9a604a6b53db6bb599da851de7cc060faa9af76d708a9aaf371dbc3eff0fdb99702504c3006f789a49feb730cabe40745837e2c8c17c77f999333798431231b337357637a5efd1eeed891fb7475f2c9f960e67578adf50241287bc5599ee08d0237f08c86ed9b75b62d612a9353e48cb4cb022d78f73fba1fab7f794a5ff64c97e6c91ec464847a81e5a5253989a1ee54a41bcd9b4b77bae6e72421471a7ddf0136edc59b72402d57e542916ee47fb3988b7123c6e8debddff2df171d4ce61e83c3d41f36143c9df97f2f68639f1bfc2a9d1fe175fe9f45e17e5cfebb330d3f06e15e3cf58acaff09ea576d896359a3f06985765824bc499319384e4c458d4326db801c564b0b503552bdbec60752b670d82cc8fce9028ff24ade3e805b81a72701b37d4ccedd72118b20d792739e035bbacc4893ded88619a6c499f246311947e48684a35406c4ef279c71ab2a74f6e5313f7900080f19aec3a39109d4aa41c930c66c84cd2163f4cdd59fe84a86cd8bb6468bce45a56d09490e032da844e6d90b436dd874c1cd32a75d1ae1d3e86d8a2ef948649eb56dd7b360f55ba5dc34a12f9279945436c6fb83d1ed57ba4ae1d9342a3dc2df9baa82fc9fee927c13439ba5bd2ff9f3e6f577b8d2df731db14c51db8a14bb15bf3e125f1ca4cb2fe856c5a576cf995db5010687d0799581c5e76d400c1855bb46680a631cc582f51c589a831", - "823d0cd34e7450550da9716c1f456ce0cbc79431483a6214939266581b0e899e4c95719a09c1ef166a618289a6ee6971b6fea3fe380512cb977823b387ac51d341c26d4a835c61eebde37764d2e1d588df7886177e98e3151106c898b3196bf4dbd83f5f", - "a4639c22fc7f370d8500a53819102df5e86c541c0ca10e8f6564e50b90c28f34", - "34a04df283c45655a52bdd84", - "cd8d1b2e5f65ddb3c0da8f12096134da22ad4d541444964077610aafc1f77f8da5ffc75bee807541cb6eb0526e78d57fd88fa9d9608914cf391ae7ccb8eedb0aa711889f9b6192601163b271c90df5d69fef487b6c05a24fc667469cf16cbd5afd58fc830119fc9f61b26dd50a96ed84c96825a615a3aee84ea4c950152323b20884346b25c9e2a6be3a93505ba059fbb114c224bed8f05f54eab76b2c9c23a0fd942eef9696ff67484b542c8347f1b1fd7df7242872b3528c9e45030447b2bc85eaf191963291e4223b75778335e5f1256618ff87bbd68b5a9e5cbd2ca1dc8aff4625c834edf8fb0d879b1f75ba9b85895a6bb4d7569a41bb3be6cdd020065bcc69b44a8fa335d9418ea2d090d8061e042e8e1a6ac03a6d5525079f14274079734ed42c5c9ab9986f0fee6bc9ee6c485e233e9b4d6de70664902529a135a5675ae129353eb2c00b73f226e84fe8c594272d6eceaca28b6da30492c92074250ec80beddb7208f9b5418944305b0864009b3bbb3dfbfb4cc2bba3313f8f7c6c19860f1dc0f5d7aa06e3b551adfc63dddac980a79d72bd2225d54a87a93717291c7b78bdfc5521f7f3239d5564fe9c9559dfefe76b77efc2e75991f31a0134529a6611ab9ef076491f2d2d81ffc5774ba8f8009dd7e5881e09ddf5116fcb5a44e576aef6cea91ebf52c56c742049639392cfb8b280dc2229252e04d8d394ffafa539290acdd8118656e7e1a4f7bfc0bb689448379e8cedff7590a09a3f5a29bf819fd87297b96ca07431a29a07ae126eb9d65e21824c16707db89868e127f17614a536de6ed268b1600a8b02aac2bca54a09b7cccf8e184448df334f95b9f0221187d56da7bd422f09b4d94228098b563df53414a5a86728962a2ea63023d8c3f03847b36db7cd189ccfef3e623b14842b8cccb18b4f80f01b32a4cec48f3009b98ffa25dbad76089c8700e90848da74aeca81d01f4dab2b7e844a3e48bef21f33c92734b821ab382bdf6d0b1048a9866e676b78ac9398678ff626d5c173a15a0a7514b2544405dd54eccaa2791605c87d7117bc9f8c0ad84623a9d3a2b1733304b492d4dec38f7981db9361b03a2837a95fe937976c7f4341a802dbf583366fbe368a3af3f92618046bb55696cf7af1f465a5a57ec5908621f431ffc762f35abe892f772a60a3f75ad8401321f67981e90083fdd1cce40903ce56a629120d6e13c8871523c4d848664331966298c8b31a5bc8174a8c14f61cbe98ae7ee3e90bc832b04318864d19a9b8b6d49a260f42bb120cef9afbe704faecf0f428d917ead9f020f5e9d772bc8f29600f8a7623d8971c1e3c5f1a3b094191e497bd70f85de124137cc4b9fe0617cb73cd44b89aada072625e25976e7aaa5a8fe9d9e3f32db47d1565aaef0e84d256bfce6aedfa1a2dce5a94976a2bb9a0da95941fb7ed444990b0e0e87627e35f3235a998019650a5e5cae804ecab8cf729a5c712f1e7d17486082dd50cbeb2ee1b0be6a7bf08a66ab3cf1fe9f49c7083f5b8ad183f32fb35fb8a41230e4041bcf0e5ef54bc3d21ecc1fceb08d95d745a997e8f2fc3c0f6b1b6c1c02e03ff02ae0d879d13eedd42d9f9949ca7ebb785764162ceb6c6f9944dcb3927b2f4eab23ab566b2b2bcc0c7d77b82579e88203602264064ce98b5b1ed992c1bb13edce579ae7f5e11697b493749f308b33e47512533350df5c07c3dadff656197884f359cdfcb736d29231aea1524b56e06c92f5a98ea663543f67e44003f5b41907a951dd792468c84c5e0e1b46149a5c9751295e153990b78c0cc712889a21b299b0315150dc50aa3b4f7fb0079ddd39d263a754b1dcc595c76ea9fea6c120384afb38d4bd40491c4689b1afc9dd096dd0327c84802bda6bb6b7a8830bc6c06b308ae9665a8666a5551ec954eb72adb827ef38f036c51698a28c92dc1c9e25c267532da2c04c1bf27f5b683ac750c3ef53a8460dc186331549bf82868f9327422c09afe1cd15e161bc41a70cab2f973efcfc8f01a380b86a432e1ae540e09d404d93d22a20dd5f685a52f0acb863dadea236288b1714700f23d1c19e40e219e8ed21f6a393e541abba850ffbbd4030e5f6567b7202fb66d86cc2a0beabd495814f6a50690e8d74cb8b093e4d43261fff80e7a67ca06dfe808899cbef84c09ece01414baac740cbe4c656b17991868e2a136f4785a0de311aeb18cc95ed33fbece22aaed8cc1e47f58cf6c09a6f92c96f37d2d2485b369093506f5e9f8534f8569655277d0399ddd3d33861bd40c71ac53a44d1981cd744d79202322d47a0228356c0e27efa2ff1009cf2a416fb6e8844eb76b8077a4a3961ff193e1c95b222e72688ba48be82ec5da498e58861ea613782ed1ab50a95b5cc236834af98e61528ab18453c20ff978551b81e1bcc0ff4b7092bdd9ab0b946b7324b7361ef05e1f7d7f6a336281b4bb2c671a95a6ab84be6bef1b9c8c3d2536edb8d79b40637e16d7281ec5243016232d7c9fc07ed9dfcf555055d8ae65f12ad150da81f62f2e1e82b3adacf6d623ee4759ad61a09038905bcf1dbbab671dd28fc1d10a0b7eaaef73a5862ab449bd84c8698d061e79fbe52a86739ba945a01353e0f3916667bd7b4356cc65451c7003927f2aa738d98245760550156dda529be741ce3ae1afdea0de35ada26ac241fcb5d518e6ee7f9930baf88bacf8bdaccbecfdb920f3b26285439912a8902ae029b07f28c1dbcfde780cd2bee6c6e5f4520c5c7ff3ab5448ec86cfb270c39586f80041f3764b5dc77dc5ced0695c89671cf90ed34c4067b4bd938b1493c7902dd94be824810a00bbde4915d138fcc7584790bb0b6682fc0799cd415441ac90c1caa008c7fde3ab4a3aae478c64991ebe07e6c4587d3046c9ebb8e125e795f0be9266bcee5a4e4355a2830c5b34e583b0355b34b89c08011db6f6b8371de003074704e8cdda37ce42c7e395b6a37bae3dfbe67bcfd1f125c9a262d56883ddc028773988270aa30c6dd326cbffee589f38286533e1d5c9486011170be591beab5e0ce98837cf91f0a58d69d872e364aa88daf9cfa71bad167129420282d99ed5884a1276dfffb2c4100c74a8b863b063c07937f2e9c12523deac4ea16178863d975e3a5be5efb5ffbea994d07f7ddc5326bed1f5c9415c1d4ee1667e3a581499bb573595158636ad94d84f7c6e4b8efc2b141f2bfab7932a050fd88a8c7b21877cddd488543db5b11138cc808e1248b6e2ef492faa8a32f9d93e3c060b5cec10f03794248f9662ed8c283a8e0eb493824e2750ec75b3b1292d80ce002083a3c64cc487afc31b20f84a778f386b012ef7bef46e638d0f1cd75487ea46e05621d608482637b3e642a9a2c5371bead4386eff968b3e007fc263086d8a930dc76a8431a4e6907ae35c7b3291075d1c723f02e4895714803c0e97d65b04c0f27d01d5d68001bdb3bbd44dfee1eff1754fe8c182cd9bc6ee273beb2a444ca1766f747d86f36cd8cef6eb1dafe0c38b9327a8cac6e83e076099188f02721cc4de3d940c3ef19d9b067be07b890c798a79ee8c44d96c5e05ee5d5202d941a674378386233a83bc85134dc8c46a7531b2b952fb277d8089cfb13e882bcf7545f0605271fe38bf4754f98dfa13fe6b635a62bcf962553882a8f28a9a5fc0b3f85509b702d4a7555d40c4f7d10fbe80d48b4826995fda7d15f14aa9b95fc6526101cf09c97fd74baca6bd26b4fce8a57b0726e0f68118969ec067e9ca39b2ba59fb0d78eb5cec5b872613b1b76763b3217d859bd6d991bbb5448bd4e49dd6597ddec9e46afb3f71d254aba828c91de51904139ab19138e36e6996a207da80323d96077c97a3e8994296376d4dcb602f1e77371efe8b020b7b6f6f7bd2bd733ad9c06c45b77a2893d73b4a8a57707969af74ba06b2fe7d4079bcad1cfeb3689ab95c8b1215fe0a855eb431f67df4ea589dadbf055086924e42cb142c9031e25b81e8e1167a54008ba1ad7fec6794f203b27f3092dd72bb766c9653a72b2e25c965f53487cf3baf74eb7742702380303af8c0a61cca3eec78d4b709e35e2cc5bd586263d9f56fc12454547bc6165e3f070ce7b2bcace5c8cbf52f987568dd90237cf190dabd4ee7a80494692a5379b013611f4eebeef8e1ab9a9c5ba61926095545e19c3dd61b7b404230729aff7d82b6bbbed6b4a926f6e49189e3bccb578fcb3537951fe9c78ac842350ddd80133275ac0bce3a669183776fee8288f874d29190b452d65bb7d8edfedc6fa0ae147102b92041af6dd8a566932e016763b60a5b9b1e3667f228cab075f966d1c525ac19d12046c6409345799adfd7154b6d8b51eeb1eab3a132ac6a2e08acd1a34bbbbdd019195af9f8a93c6ed5463765173e669cb0d42b6cffee1a4b45987853d43c02f920819f45a4fe0905d8c65aca182b4bf56fa0dc51cb53c642fef003d92c13ef4bc1bac571cbe2ba3673a49694f6311b7dfc17a4069759177930b179748d4403c7259e10a5d221cd0a6b745966e598f894e607b779dd5289fbdae0b4348141ad373a62c76aa454b35b39a7be875598bb30007fc300606ee2537cfcd7c22b6149880fb3cd8eb53054d698a0d20f26a5c3ce468255737a68706784", - }, - { - "5622aa8d2f308dd468a7e4959ccc01f0e80d91f79df65b8201eb44911f6abc758c6703bb97908fff377395d33f96c328a4541f414b7ac34c6607dd85729afbfe01feba988e4997c6bd2c99fcc35d2467b143a8fcbe6b49247226a9e4c0a4e3c1a29d5931e6f1f7a31d90a0e0edc4479f08ef9bc65ae4eacd0b93b1cb38948dda31e60b18d702bbf5935bd580201d1f280cbbee679fd834aa6be576a37a037eabe989c3c18c7fb61fda8b9ffaa8bf22b57a101c19e850c454353af7af3d755b26ff1ee78b9d9daa78294972d108958682a5a29c8ef260e2289ad9d7d74f32fd4e51e5d9ee828366abccd97dd56e035713a6f3a1985383c0ed5d98c4accac2fa1ba7d30a295670d5224952f7b7554fcbfb426c9496f054834dec48f9b70af3d2b1c6dcda1c4daf3e9601364e57851952c785e65d753be1c22729bbde33aeb1e4748dbe90da6ecf716f05bfc68ad819515dffafd33a909562b95140ecfff1d0747f8e0459fcd3ca6cd8893262614bb4bf4b639285f327e7ac782898781968ec98f6f0f2f3c4bc5f9c4691ffa7ddb3662816f8ad092095b598bd4d10d6b5fc6fabed619eb11dfd4d638f4c0b6cff7194156a411e8ad6d3229320336ad52fd9811c3a1fcd571d1bbbac67c6186737ac7ca1ed9b2bc46e4e578f81c164b09ae5cdd4059a2c22b5e7ce1dade684e49200867f9bb1430aff9b99805cfd31f7e3fecbe898f70a4eded86b8bbeef7050eff6cf8ba71395a7ae2e270a2b58010e56cdf6efc4003da3d8a82e96979ee68694b6113cc9a6e377d40a810063830eb95005a81405e5b7de8de67424845bab1911bc55da6338513742d237a555465fa54b07ba50ed712e7a57a39fdcfe4af50f064ae969823aa1c40cd86a621ec90769d0c1babd33e8388a8bd76689215b9827a5819127bb32ecc80a562a291f3192eff34cad2635e5b0c0bc174add72e2041864953f1fc72be7d28111fba0438d9036da3d5c0f220ccfde2319bb96fcbfae6055ed7f1c1967ee9a78e93bbb77cbf151084d602a5a2f087d49c3134582c1a5d7af24f4c88be26204cc9dbf4368b19470fef49a5823a2d66c65e9b1e8ab56bf5a7bb3220696840a6222caa58a7b39fb792d95d25038a8bd9d916e853cc5459640f8b8468e3d51f05f1b95e996cee40ffb7ae14cb289094f1b77d5573c1aee7c12a6c3a1e31491422f272cc5f510d4f18ab63d3c3f468c5abd61b2fa7ba0768d46392e2a4dc06c7ce79841dca916cd33cc0a700b50fc660e5d1808d8b87e65feb89428055495823b2dc317d6d9e50aa5ef7ab14076174ed32f56abe7d410e58ca40e92f8a31433d0d74ba7b130b1561f2b075fa11ead744d031f34d82f1a64d428f6cccb0a009be24b42937bf3e99a1ef1fabf0fa7335dab52918382abe756d3de229ee8223aca6d7c5de87047838e387d4e472481a4cfd4365256e13aacb518ce5300f18dcb5e0a28477a6fca08a74756ef6bd8933bacc98d02abc7ae60df7cb3e06d41abcc4bd313c543ddcdea2424d98ffc6dcaa83658aae11f5841ffd4f5df42368a0e815d2146a0fe138b223764b133d17cdb08d485e9f3dd2bf2b220d1f4565b02d7b9231d592130e4436849f49b1a70772244fc0c38da372a8c57fc80ad57828410a5a16ac6d14e093997fdd5b26e4cd4b248e0ea221715ae6e112e1b68b09f795540e31b1231244bc922207b906c4f42b5302dd7474286b653b4d1bb657134bab117d6c349fa0f121c2f8dac9cdcef510c1c28545eae0ab163db6cc84ca182feb858c10153d0136f00a01c9c7d0bed892715dd85c4e73627c3a2ef0f43710dfccacffd1d9f118c9fb1a83b2eb328b8da3e955f027d95294038184f7b895d77532c7570cb86fd6b37a5a66659cf1e330db3930f302838706050c0dcd91d532d49c89d144e9a7f864026ec99f50acc02bd5f11ee88495ee8991ec4723b189f84e03d992fd718b5173ea1b033ab7d3568dc4656648fb54d28d3119b0f293a930a772c394f45ee66838f17b73a94eca27033f9d5c2ae22eb813386905dc024673850a087958eed191d04d05798bcf909eff2deb2a0009d223323b290e3d6f71b2797a2bc2590d54294a5992d629336518514032614a04847c3fad8a7d1cfc2f86765b48cf58acf892f68b691fbece38100e6a71487ef5c4ae934f1ba03b4b26a1967f70ef1c697202e4eb22a3a95ab3b7b524f0241ab4d2adf3ee5e3f2974d0bfe4419ef0ab11039ffc26339570e74d260c4d5a16f22cb4f60b03253487f5e46c47836ce29460728086a615f78d631d89a06790928455889f58adc3d0a3a84ceb2ba9cdb00a403080e6567873b985fd59fd9dec71e375013c12c51cb67d599198f36f58fdaf897e85dfe6f9896cf6d35a84cfdc6834dd9447a2a10e1ffa9fa8edfef1db9e8b4a245b211de49e04b7e88977b4e1ac9285f43526f2452181ee0f80efeb1f6b2533b656519ae45652ccefca81c17714476b497e5d8e9fdf6c9f504c7a7fa7afa36df5f4f8da5b4b973b1618fc8d2d43e866b235e5420551d1659e5bd545fb78a3e17d9cbbc8e842f3fe6be07b892453ffd689d5188f26f9e4c545ba0b3132af12a03bce6914015d026d3d7df661c1e6384bbb50dae24abfa78079a2b1ac41c44c7d82a59183f293f12011e781d3cdca2f791afa5b55a9f2d6139587bfd74bfc54ce91e642847a33b48c1b366fd8f08f520b79ad5113a0273735aee71ceae361a97547fc09b22fbe4e4ae4ae13e52d65e0971341aab368d1e917c8f5f2ac57ac119f981b51b7c99ff2be3e16935b7c73e28fb58d332e6f2c36281228c479c4d6095cf15b14baeb0769191dfc649a70471a25d45d4433797a5b8ba31ff567e60ec4d759d99244d0fb5dfef7c2896809938ddde0d2015a4c5ce5ef6cdb5752da1c2a33e5bc78b6b7c6a5af892f0792c28560a357720da3cee3833bbeda8e98e6a8cccc6535831cfc28bc8557b4181a3978bd90eabb34b99eb7e55d9263e6790ca34561d8c87ec4e12b4a38df524318db00a9b5bbde6f5a8644a818a88e91b521d716fa9f95bf70b109b9905bfca926fd42ecb9114c039790abb0392a41ee4c190536a89ae6194befc2dc4bcf7562bcb84f65c99b69612c0511552f53436b6c489204d3881e1f67e0fba3a061165d2955c2e2e12c440d31556250a8a5cc04ee5e09b1d627c14e08bce1a92df7f6475db92a3ee57e4c16c3ae677c44237122818ad457a29595ab528744707f3ab7ccf3d20bd94047e013e647802a7af14cfc7c11441ea6e9b9f960fe69d03911ad2cf3a8f633e0d647c71dc7e188c92e75353fc953d6a30dd0040c39d4355b71524f1a4872fb1ecab22c8293b54bb22a80e1e3d4c886d2988adec26f041dd0565cfa9edfe5ad9aa7da1d3b8f68fda9e9df9dbe98148120af6ff30e6400deca6dc9593dbf06c856d0d582503e7ffa185f87c6e7ac58184bb80b4a1c0c18d669e23f9791365fe807356a5763ea418c39d94311759b29b14324fb6f3104359ae66532779b825f92b7c9ea2ba43ba7de04eaef7a86192bc93e17286f1b6e0a01c33c796ebed8f17692eb9237173a051c14e4869afda2643bb98c9ac4ea94c6bdc1401c80190df6abe988d2f0b2d80cc7bc8362ba25c6e5df4370a43e156aebd6aaf856b3f64d5fefc622d078faed40b760a361966a4765adb809dbcd74b7a41faffad3a64823860e5656874133c7f8a46b5a3ac591906359aa4f171ef6bb2ea6b5f24cfe25c2fc7c1973bd5d3bb5f197002c5ca1bccffb570f0265f5cd949c7386d961ac9c5e18b5d1d6030d8bf4a48c10f12dcdb11924b02b8ab5e91f425ca62bbe42b80c6b6dde3160ebbd55803966716734327058e29bd39874f2eac199067fdbbe8c372c5a688d3615e2b65f4937b67d6a26c64cc2a9e5379cc00925c678f174f538915f912e85b7014c064a73bcc7ddd38e1a9627ffddb4bfd6da764fdbfb45048c9495ab1a4cac5642f6c9ffbe97d33cb26964a23719620df3d85dcfc392c4502759fb31a6a797e99e51e94cf9bc79ac15de4e5cf7a05aeb88a8ab4c3b6f9c52b99794503f2c49cd7e230a67df7403e552523249f29d257b35c0c7712053c3d9eb583a1a7473d7f296d25a66566e4ba8b08de2a31b082e40c8e5b1e93985b324dded3f52511744e7e99f4e3ffd99d8ae17bb5122b37f637c5525558eab18a378f5e2cb56fa003ed3af8d139d16ec4b2ea79c415b0ba4d750ca2cdf653582ee3b65a9825fb9b123593e36e645232163cabda515b959ed0a1419e9894f6c677ac200fd11babe3503ec7bfa319f1b9559d94a6f82945c9ca8667621a5d28920949a1da644cbdb58b84742e9d65e7f2027b99fba4dec46f642bd17e88fa109143b26ba7fe285c89add0b74a369f3d381ad633bfb4f72e1822ff96aaf9a73b3c59a6e457cf40e17c1198c64737037f52d9b3118daa3fa5cd3e3c7738e3b3743c595893289974a4aa0d6bf1446e70964823a7d5cee67b9b25b7125d9ac5d1d61f2a6947c3deec6deb575e2fc5cec60df26de3c0545e5b79156dd6af33a78552d1ee9994cc8501b7dc5fe7a22eadaf201a92e06ef03be705a8bdb4db65392d3628c7cbf44cccac292c93cb5a407a7a5a0d5ac9fd95b0033d6eb719d3f14609190dd40d5aa1b983cd4c4e278cc8a1e7d5fbb0d39060d6cdce8de6a17e2dab973a7fa594205e17edab6514372eb51e03b0ced6402fac0efd3af49fb8214a505cc9f5f0ea5308d7fe6dec369ba154", - "9f522375925222a04f5c95ee14b6386412025903ecad0bc3ab78afe1145136b3a3592835ab4ad6faa66be9", - "d1ba82b3ced3e9817642aaacedf482e79bedd0560ef2754215ee792514bbf8e6", - "bb21211f342379370f2642d3", - "1a6683805d3f478ca1c1512b9846468378f83be27393db63956e151ec408368b47334afe610249182f54c4d0a01b704db2aa90a9755b8feb67ef9301f0715d7d6bdfa5cc4497cef1142a43eeb42f7c413e8f489af30d742a706d05a40a0c4a5991f9e2cc5d9fbca6ad3767682e20c146ac35aef38dfb2a77388b738fa022158d5c802e5f0761096bb45b50815ebf09172759521b5c5d459703ebe9ff669ee4d14a86e5d0650b597f4a082ba0aef366a924ea378b91c3262d99f48189eea19c76c0f644079f8415c11033cf24d30d6c149ab13ca5c29deafdc816e457257361c1af4b915da312d2e6c7fc712faa27be3e67c893f9005a0e2c28369991c1dab22d38961d1abd6d94c4d549cf491aa1f8d522be3ffa6d214825a5fde3c94c4e35c29b8d05b2627eb12c9d94f450a85eec6bc963a279a37c2344ca36eb604c4bd11c2bf2ecc0dc16c2c365bbbcad3541bd54f8d0bdbb3ca4a087b62fc19fcc1c13984eab807d2a6a1386643d90d412d027bcd0a638765498cdbb1f4cc1b91b69bd241eab3645f225ece85a56e5008d6094041f8cca6b9a0ae3b15585de6fe0695d79d348f8619431ece40e736957a7627224fe92bbe30df5124f476d97e36b5b08b3787e8e00f0c10013068eb156f82f3494a35d6edd5f7048d1e91954f1013ede22eca8b4ba41699ee08decedde87139180a567c6d169b672af0f12aa09ce20e9cac4e78b8067d31ba4f63606c00d1d787b868cf7643fbb170f8074667c9f7584d36af80b4e6557724013618c28d0dd40bfe9d4b25761b3c99558af528c2d290d04b09821bd7f992c044dd61dde9395bd0c9ddec6d0bf6e044ddf0b4b2d6753f5acf2e9c904caa4e9f310578527b85e6738803758da646919989f735b09c9a5744e63fed2c3982e59fd29d2baeb9771316bf8d29213a4956b66c78d5654436ffdd82d0d572530fd09507b988d13fd743f35333237681f8abbb301a8ea870159f802a57760659094d0e4902036c5a62c563f1fc86c4238e1ce89f5176ecaea194ca112fbdeefbef4fa7c203678cafd34486fe58b2af04f84a1cb620c6e123bfd96301e0a5e5e5abcc95d28b852d0cee2f51faa73e42f22fc335f50de4c3812ee14038633a195083f3944284c1086c34995832c3cceb7d385b4ce86af10685c16005495121105272d1d739c584a07ec7801c3667bb280987a8aa41f9537e9d1812a5dba5b385a0b71d2e9573c6f3e9ebf0bf7267528946a6aa6f43efce908d32525cdc3b825bb11c7239f1de412704d24c17455b9382fd6a873180f0d5d44dc449320973d5cd0d4e67e83946b6ef47e5fc3dabadd80751f1421404e56b1bce748b7bde63c6975ca81f3eaf52586a55242c9745dee3f7c796d4508e818eaa4fa50490c1a79624561b98d2e1139a328806414c905372356a22393ea0da51c83957029edd8c2dfcf46d9564264d74c1c0497034ec018b1dd4c14acebc34b6d2c1a616937c37b8b4a0ee5dcdf787a0de1173798ab929b72e0fa83a6c9b9a99d8024328d9c236a8f57550a4f83e8071eac76adb55939f85f5b5f514174b670a3e8dc2b54656f6201940a81fe4953d2680ae4ec58635ba74d15efab3e06dca6ac269711ef2d4dd49f731e24a92a3b935ebbb3fe8d001cd4062669ae4baa62c2947033afcfaca227d88a11769f87456d5cd1bb6606891e71d63aff9cd5a7d23263a78768ac2ac54ece1441fd37d096cd27e916e68891137fc3cca427febd1947cfb4d7ccfad75b2ec5e809c132111eadf25a73043d68333139bd2435de9941bbc61c5c509897cfc19a21645019eaaccb6d06371e3d0570c09c7556e41a727e44d9bd672fccd1f89cc7d58761c16df8fb75fb8a1dde2caaf088f02dad91b6489114398740e6798f3ea8c7b0cfd974e160a0106d703d9589ab09aae79108e3212f19cb950ea9c0798a1532bc2a065d5900a12054395c0545b0878ac0b1d461f553dccfc2a22bf254ced88dcb538e3889549960b77ba6237ab1458e158f4f46606372e797ec9d9ecc6534acaa1218e7540eef11030bb9c3e5a7816f3b33a590d970619bdd2dc04d5c6f4ec38b7cb4d525234b836eab57f65dd045e02367eede9049e219b8712b8d6fe178080c5f77b821f1a475259ae571a5578eb3b48863162d45486f71a28ecbcedb35b320e5b6401f9e7870aa5418449bf47502626e1f42abf481b48d5a6819c640bfdb64f873d583fc4e40187940a6c3373ea7b47195270a8657898f55568985018abcea9bce1c155d95b426f91a734b2a14ec2c7ca2011a4d30019fd9b3ef63a804e9c30c3de2651c4213e90285a4ba100b31ee402e8a7f23cf9d4dba003bbf982526bc63be5af102dca34e7d362d6fbf6f56046160d7af33b364f2a86074d1c0fdd54aae89b19480efde2a9caef9de7c0f9491e1cf43a48752cef405a0ff16b0fc67bbe433a3c1b9661406c3726092efdc076febd60c436476f24dab1b0b8f8893986d951ed72282990e8b1526f4dcf539b22c01c6a7eb5577cd540a16a81296ebeeb7ddda72e60fcf2840c5b42c5cba30eaea5402f267d1d04bc80da5ef0dd2bf3c7a2be986507617c9bdbc96c6273a0c9e586a0c48c98b4552113149c6f79557fc8ace0b1a512fec3aa09ef191f95c2163113ac5cdd940f0c2120509bc53c3ea493c54703effb902ef752c830c61e85636ca95429bf16937bf6786b3eae1b277bf08dcd69f521a0078d633beb33c9aa0cb33b238e1021ca67df122a403a3698452740bdcac81d22ccfe4ab5f835d1961708d1faf6d40f115f16c6094ea37a7ff15e0534f62c19a6f4ded0967be337cdbdd2a7c58ba16ba2e4c3686e9d075c6fa7d29b2a0335ab4940d2a95c4500295f4db84ae65e46c54b7300909cc5411c725a31fd962d239aa0e2007c285586b4c778e2ac7afec42cd8409a63d7cd9c677031f43f4aaf04258dcf1270c02a4764177aa66db2d8f860eeb1fd06d0b27587537410bcb641f90aaa7bfc6f12bd143f66e7c933a0f3ce6b5048913e1b2d79eaa6c19e7255d5eabd24d5f12426339541a22d600cdfd1781a1a3894740887840aa82e5a461fc324285b0223ac9b95c3eb88160353f168b3d4ae8a2e87b7715b5fd2671f66e6eaaf9365b3d9e3acd9a749faefba6009783771177aa4dc91f72fed7a5bf6b1b7738b84ac0a07b4a5a3f0a9134a39e1e7e3e2f9a92d5644295f31c5a356092bf07c709b4c34305ebf50e857a4f593dd1cce0439d3fd125c1ede1a48f583bbbe0eec7058345129ef78868a96f8a76ba7fbfd1c5eebf75f3e0eeeb9db87474b96f321b87fffc02433513fb467fb74e2fc8feb498d51530c753e9a173e95e0edc5ba9802641a45db281b2e2d87d409057b4fb1925e834e90fa5619ae3a9237d5b104e7ac67c2bdc31001eedb4ec7064b2f72e0379bf8780f67ec4b195db014a2d130e77b1778efe3dc703f1310a566a6d3b5c9b12b1d4e25815493ed1510a516a31ced3b64ca49a783ad63ea71a57290727fa31386d2fbfe41f12d36a618c6c28d8f10405eb3e0a33e8ac2e4133ba75c688c8c9a2bb33c8fa032eaf3ea0d2c27bf89269c4aec55f8232b292e7fa9fc24527184f19187d9d8a3f52335e2feb5dc6d997b9b773a79a31db832b752e5738963ee5d61a1b426414975693f986e165e52d46cb059fdd4f48f008e96d4c1a48306b7c002fd0c861721656074cf11173ca65cbdb694c79f58a3f3365e872b24670b691682c10261eb1ffb2b65da031d070e31542f49704b77970a78bcfb4c4ca517b4c966a4e8e27664704f633e90cb7d7917dc1d3a8b8b7fcf59ea3a8a81305761923cb182cebdd59255803a14ca8a75fd007670d79a25eacda1138d67a0fd1da981529dbf182fc4d7a700ba498e4476a1d415381c9e2ffa3bd46201cf2e454c4aaedbbe3893bb4121a6de02cbecc1f319155eb8c99d1030103bb6194bee51e74fa01f28dbe16092955b9599d5c1f1c3f356e26d48fcad7c4cdf0eef25c25273dd62171785c9d2c5a01b1f3da9b4786b1b399d890e2049b73c12de2fb7177f2bc3d9c645398111ebcfd83b73119897bb994f998f4a6fae1b3d6361e171059dba0bf9de9af7a5a1b21641790baf82a36278945d649cf5d310f3792fdefe8c58986a48118fd94647b786e47733ae703701e18992bc1b143b1da6110a98030bb9895c14d7b8eae1a155a550e219a5b6301b6d26d7956ecfe4c7023eec1ff62538b3606ebc7906a1243bf8357f593b6cfff32e3fc6b51f6a0ffaecb658d526f7a5e9faa6294e4808b779f4832318cc184e49e8957b72bea0d67366e040cf76a85889fc6b04e84afab0d02947d0d83e0de19f12966fa8372f6e82ff402bd7a69195eb1a7864a3375aa9e23736fa4d4b0224647e416474c01f72b7d4af240d7f43395b5b04c8fdef1165ce1d56ee8ba0e350e6ada893e0594facbfb5f0d8829ae203929525951584c21371b86deb0f76ef5daad5e847135a6488b35ea33e3a165fea502975d6421d4567a229bf3ce94605885453610eb9c82f9ea743bee9e14776bc3076a29af268cc72d9092a492d9ff08c345dc2eb2f8003b561d9912ae1198c58107f8b37a08b35075af9863110e6770425e9d59c2dfff9d9942c8bc3bf7904c2a952bcd573706caf1ee14420564ffc433c0f5871c4bda916f2530ac75819ade49fa1de21edacbbf6b7075dba21a84989411c566b7c356b81803c7215ab0f326a6b8910dbc62c1bee3af51f105fcdebc0dbc56a50b22cf81eda563bf8c2eff98b476e8", - }, - { - "99444e82c6c4c47070b164f298ffdf6955ee5bcb3070b9aa95ce658db4db084d2056cfe61a93568b44ba7ddcba5d450f4ba0da7b119425a6628b3416663c638692326cacc5c237097db5e537122b465dcb21d8dcb5fe831789b72deff3907685c2e23187a56990221e755930a09f8d6cc065487563cb8cec82b9dc754952fa0b342c92d99522fbb39854e338f470a4b4d5ed2a39b8b6253b7001b0b953abc588d757616c7a5d1f12b1024aa572ef5a47dc8480943aa6cfaaa78064fb2b29830280e46efa418d0cf38f57980146f2482276c9b6b16f865b1606bf1131e894336979a163ba2e70adbdc746be0d38062fafcfe5603e6bbb55717b66a263fbd5cc7476302ea4a0dc6167221f745a26a309f5886934f4258965a0ef0803eaddd05e54008df8a0695a078b797be59f1eef95a658c99a7d52001d4108212ce5f18a39f1173291808c980b0513f1a531e03ad7380372b65572d3967af4c25fe54d99d664cb67e557fff05c12e10143c13b1bfa3e8db093ff832a7978ecd85d3971349e3c9b83939b73f0ad55f1f1162d0c106b99c0ff98442911bc15e9194f5b4ded97e9702b84e31b31380c224f392e5fa5c720a45f64cd7020e25a3931b5871e4c708e77f4729225aa9f48f9d876597d3e79219dddee0efdd16836021dbd21692dafe121217347cc128fc5eb051e6843978ae17478ef714957a84c74656ddd931cbeb43e32fb0a448acf2f90ee98d38522b4fa9aa36be4fa13306e799d4c0cb90ac0f73cbc018146d1b0d6bf48aa446a5e3e0502aae9fcbd196b36b6b7426fc10367febf687f05392fdcf878863de2e47be7e625d0e3e3e94e199f055c0fc65f76c41ede43231873ff10eb854dcd6ac9b550ee8533d16f81eb0e86471d4da69311c47255e78ac8e79ab36ce880d6b135279fbb5a712adc5c3862a356af49e9c10d5b16f4e5dedb80914868111e194745b802a0292c7c8564de28ba8e71a44f7eff6573e5434e65d496cde5b5e62cfa9e2e9ac85a164dbff5767983e71dd2661d37d9027a27674ebe3433731a606db88e0880e91ecea8134421962b3f68915c9f6a5e1992c56750f99bc313fb30cb89384c72571a1a6a5e3c01897b691bd70985352217fa8a67f3252a06205bd1a9931d1cea3736559572561fedbf3ac4c8bff9ebd7f3753ee69a69ecbac4be6357db7f4213b697a828edc716ac01da75c1d46098c7d5d6ae6f3f9a2903588c5b340c9d47c234efea21b700cdb8db4279afa2117677e824e627bf0f2b179c864ba823926a57825478395545f130886bdf2a7c55a2647a888c3998b750343d9cdc602e46b7b09a2fe9ef74db1ffc46fe27c254c927ce51b307e96a571da7f3f907223fbed2daedbcc96197e95edde7859f3b4ec6099f791089e368a68a5ba0917ddf4f50b93c0c839ea36cfc8053811f8fcfe6986e5fa9f743119ecd6c3e5fea1dae3ad7eb465a89e9c68569190688a8d56e4143ceea3b11fbd9de67173d5134ec8b0bd7d16560ba2be52345ebacedc01a2e03e8183ef91317d87b2e15cc6301586ed829d438e4ff1d074408b332c8ce60ccb6790ab08c228807509dd4b39f2c227755f6b039f5cd413ad6f46c9ec2cc6a79457529d297b1d9e74ead9bedd9bd652fb31568a8e2a9e2b89e4e57601bc1d960360232cdb30cb502b950ef930d54c2c0692a684cd44b0472995bd2b41dac1553ae47216253d6640d2653a033a862f3118c5b5d60a662d240bda5f4da51092eff514f61a425c5b14b19517ec1b371d240cc30a0739273b34f18a72a69b1586802a7caa6cc8f5817a8a995695d063c9dd26c3d45feb0f84dc8a0773151cf9a537664f942f351599cfbee0558f441f5c7ad320cabe305f9aba570ddf6407749b6db42f9ce94526a8f4170e735b1dcfc5f0e090af10e039db3747aa9b4f1f26acc34639ac8b60557f7753e2c261a29852932901a4093b7f307319cbb228e26eec289898b3f8ee236032163293b8caf64be3f7ffed236f1da688d958a1bbb79dd45026884904bbb936c1ebca7aa6b0c68aa8b667dc1575729e4ecb4ffa82ddced2f4571bf902c52fc4a0ea3f47aaf5c243ac2a1fc19f825fde5d9fc8d06d97a351eebf4ae1846aa62554d57cffdb3f3377695338f8d598d723289ff3962796e8065632e7da9d8dffe2636cd23eac15a60568eefe3e77c561906555268cfc1e9342417b1cdf090cc16c79939b15a9311b0210094087dea22833f74eb0e35d44259ecf327dc84f3f24b8c2bfce7be0d97e00d2be88a150a0d557ff963b4cda60eb99935951d288768b4b2649b717133517f5e3909744417c9c3102c77ddd285976cba2c89e2b4f297665632d7c8652847c4625038a6670169772de0550066ec6c2018f503cce79a333ecc0a0632334df6959d2e3b052fa47c5c84d15ceabdc80bd6be0ea2a5a8d5e374e0e9a613369ca8d4cae3d9f98755560b27b2f6e47b01ba390f5ddeb732c22b12abd225e26ecdb639b08f3237e488430b3b39f0b63aaaef4907cd003a8f2b4c3bfd721d6c3fd3a5f062d72746606a529ba34251ddec4026f40d262e9d527ad84fecf5bb2cc8601c2a38437098aec2335104842ff1c455e5d17c136ece8d461d7a3bd9a60339c22d71059e09b3603c0565c0345684893b56054ec4d3db0bf15546cafb4a03bd7775c3157e7676bb7bdb7baf3100396c563eba1a12952503eb6ccde6b6d0a42d456743c4ddb97f5994fa08c5fa41315080eb6b928090956bfc6252b232f6e0785d233c3adcbb9370b59c35b0dd66005d516befd1fc843df8e68fab19858b91e2aecd1c8a88b0fa3d4c2fed2995ee87e65976b755fbf44ee183f9fa08848bea325807bce0b7b61e03e50b2c7af9b360532a17a8250cf6068fef0198738c82a5e58961c54017e343fcef7076e823d63b4deee472fada7989ca7a213d06a4e3eb2d44b16e5c94b1588321cf6c45a5a792938b058d667e1730f8386dfedc50ea0a959b78f12f2949b34b181f90bec622515227dfb8a5f6e89d2e559c0ba686153b218d2c50b67503018e22914ce9b49d3bdb7cf38172db1ea130baacd640c111614e3db204b3b50641d8978dc14b2afc27a7efa819cac6bafa8166d1c127e2237520d57ad38a80146217a12363cb1f8a720e328cd8f846d379ada43bd4865e4aa633c479bd448d205b2e43befa63486c717af84a733f1dececc127c047850aeeb8ce677612f5966e23d92c1d3c758aaeef82f862c1154fadd6766e1dfc780bb447732a5968c0c78b9af4a9d669338458b57cbb77910a24678092857c0b903152035bab6b1c73f7b667a08cd0d31128888de3ff1fed24866eb60beac19c1b139f77bf0b9332024999a2d56975e691fd7475fd93622119d0d725bb99c1d6ac604d6b6be09d6d29360fff9f84e5318259a67fec08a006d9772b9410ec6abd4cb828b898c625c2fc35c19cb9a6cd3b0073baec7b5af254d21de8e209539f560bc80ea38e33658a68262622cdf35dcd6618b9e272ac3644c91f27d372c6297d8e37201c6a86a7d3accdf579c15246276a0009ddac4021755f4848d10f714e9da86eba13f461e6a12edb1aef2d6117986120750d609682bfdfcb90ee3cde8be54d45f841a6dee2d5b9fdc4e65edb7ebffcf3cc5c8a4e1c6919ac57568be23bd8283319ce11fca3caf968b057432f163f22e29cac30b8154a646ca0ef4fdbc7770ee1451fdde9e9d651992d94c843d4eb2570975528ad9f8c193f7c681a43df28242547010e30d75fca04f39247c77d6c3715c25fc261ecdba16844bbab23e4d0482bd1565ca9b526ada9b8f5703661a84b23070d85f3e8265b2ce10750c5d798f1a8ef4d51a473ff4d2bf4be615566ac796db9fe61a224bcce05c31ecb9ab7bc43a609944a7c9398a7875609ddbcb556296f548a117847df7d0afe48a5b504e85b0d7ca589103d3197933a744fefca795e1e036f964a4f14554d5cfa0261e25d6e5e02f86e402906d3637a2352459cb1639f20faea6f0e3fbc6a39becb1b1b3a791e32e85e5bee31be685410adf0c11190e20b7a5119b90e83f2cc4f0de8898606bb6e64165c95d4c5eae472daa6836a888ee4d9a79de72b8fb47a9c9c0323a2be9106d4ee9ba8b3858c256032a9caba37af94df4c7b0adc2f8478cb879b6d452d73191b0fc1ce944df3f4809cbf3ad46eceb3ba4abd9679410f45c8aab20dd72626f235e7c0c934b4beb4507def24ebbdd7a507943c81d54bc69df578aacd9ed0bfd3b7809dec345ba084d88fa9c34d80685415a4d5eaef9b88e51432b2b2037186baf123a6257e47aa56d6531923d38178e8264dd315e95bfafd8dacaf901e354b0f58f135d638df2c0f32453205c7aaeeedf8c102e11cfddea9a98d3ac7c385d71b760cf2afeb1ebe1d64f0222b9b101893d11a74ed175297c1dfd188a2565fbecc6bb07b56ce3973322a965dc5a675587890cc65a71efc68fdcdf1a023505ef0bc0e6b12dca5860fcf1c6c94c2e2ec3a72b8a019d69c82d36a73738dc3d17d7fdfe992bc8e18cb5d3437f1f619dd318b95d1a56b6d273ed79ab2655d83e2dd63cb6f1f5987eab6bb21a7b13b84e2c619b36b842192c3f82c755d8af840675b0bd67a655d641b1886c3c9c147ac87615ff3e58085a879b21dd63c1616a3712279ec87d650a2eed665b797ad631f0ec312f343979cbc49b99385cfa92841cba12d52777df565545a1deb07800a15431c0987b4a543fd5ed6832e80ab6f4b4d9c9ec419932a6ded4759f5c7630a0b80139234b8d53117acb4452c60b477ad50157169a89bd796e2308baa9395b513a94747611c7978c82dbdf48d716c3ac181ac2b2a4702c02a324bd4c5e089d989d020ebec9963b5c721a95492158f54973b7fc1828181acb3cc8078ac095136d97221c60b847bd2a52427383ab68cd1f10b92738c13203fdfa0b78baa09c1837be2498667c459", - "0ce980442336d0f427db869a6799baa6785b5e030567c588e2a7d2680e96c11b7f415fa27730969e0b1c3973b5f3192d4e773153def6dcc09dae29ac44eac7c42c2666a356fd4262197bd5cf6eeefcbd662d104423ec05c19a2e6ddf1834a3445a09e8b1062a1320a5e8ef13d6ebd03c19e1813ccd86fd68b46a", - "1ac8a509db7bf4acb80d8d394a5abf47c273b2093f50f35049e749f3e16cb0fb", - "47cc9eea11f9f3f9aafa23bd", - "088888333340b3a057b05491fb2402301c8654948aa6d5ee1ec75eb045858c22056fef0873d6675f897126052923a47a30675b266ffb6181cbd29ce2da3720e36a227e4c6e53328d789913c0d9cd149a6e49293996b1be7d6c513b24d876445a950e723ade3efc36907c840b9b8cfdb1503811b4044d931a0009b381fd60a5bf1e73d16348cb57eea672709875fb9d56908dbc729d5d7d322a17a41d0f62c9af9a013ab1e19fb7b6c6e7fa0c0b18bec5e3d3e92546c77e3753193389e5fcdb6a6a1896cba461343e71ef7a156b136b27ae6f45be9368301cfade203e9b53824d70f07de9abfea1968b8ff8489b9804422ba05ac3c3adf23ba0848817fa51febab5e9b5500100310479e710b663f064c1ef101c9a5320367cd8bc6e52081a32f070e7d3fd6f4210cdffdb9fcab1de4af5b06a7c6d191dcc12b25b3053e58952bfd1f723afbf570796946c1df9579ad14ea9c8c30389c1de4d1e845c764fec5eb8faaf4c558c5eb5113018c6a21ef653ac7d7f5b6c7e1a8fd48c6f423e9913436202da176a86731287db7331db055508acc94168888040ee37b3c119c8a0d88360241d68745825fe480324a944d56e7cd0375d4d33a5fe7a3863c2aaa899b2d24f65b70bd804039116fe959c32442c9f0b5470463523eb4336985b71125fe5235cbca0c88a6f92416d038e144de5ff8ef6ca749a9e239f02db505bff8e16fad1cba8b1500445f067a674142b6413e9dc0f432242d8301879bfc11fa86d1ac9992ab12319fea8b703e10a13bfd4b017496222be26b56af3ef67610f904f0ca8a3e7cc249ca8122735a542b289f13922904ff23dd197f8883c7ac77150d7331316ef94e0cf13b6ad95070420513599100b0a6d117640b781c622ed7ef7ead29476b3c835bd9dbda2203930bcee7ac01c3b9c89da405ee436ee652ddcc3e96c7f1a94e200eec9a4a226f3cf7ae5725068916e73b61149497d11dd85157f895669f51978d1bea8fd2afabb18d082365daba2682ef623109988b7d0e27ae57bc14d86603f93b5ac040ae52d8db404ee27e6c34cd4246f40eccf9d3f8637a4615a4006918b01d34709bcbebd02ea72958d54db3e87d69e6d783de2f1841029d6975eb11f9b076c247108797d5368c656f888092b82aa81aa26e164e038b359bd68801c22fc107e4083a9d85fc254b002ece9d4545310b0cb22ec1af04a7ee31d210ede4b605dbdbcb70e4301989422ef46edf63f9c96de9cb3f70638b51df5c0abe79b7af8cd97148f2b7bf394bea0f7bbbf6925f83b901b87a6079f2c3b38a98fe1a86dc7f48bf97553701834f557451df4b41e7db984a34432823585380b45c1b84813d6aa21107cae252923fb4673cf660a541e65610ac0127d238285f53bf329b62169f3e42d5efe268dea62578e97da59a58a1314a1bd46cf7a7cae772814130b51411082e30062fdbda1c9e14d6b2bfff89d0379d32461f3b8e833b105f6a89532ae748b5fb43f283fc86450404e8befb8442b65e338aa0408303a70e9c27a1d923d9f2a06e7c6159c50bf2e3ba5b035420ecbd9d0b5fae478eb1ab72fa714f99d00188bb10e60380fa3a3a318c2d359ea3805c2fa0dde17ee52a504f70d6b466bd38d1dd4196be336a9ab4a9e573d1bc6404018a119f688c1dc2a8ed1433e8a8ebf455ce3808c245f0220f0c12d28c771757763bd111ab829294e2429a6f7a59858dfa1fe0b806e986d40aaff934589fefd75ab91097a979f26bc9352267efb2d82c4738e4e6c451b0d5adc398f546c646b9e6b8fc84e91651a1252d5b805a857c7798d102d1e6f90749252bc53588348ecec0897c79f514442fe3b27608c95d0cba999a7e0fbd7f601689b4dc63ecb9ff553ff12eca3e9b26e3eccbde28770bb6aff7c864ad6be77fc09f81f90df6efd0c4025d0916ab5197ab846dfe6121c462761d9cc87112ebbca197b0a222fd34a15b824b7eda06a56a6ffda760fae5f0b527e2798f01e205a3f47947a4bd190f6abfb1dab2e3a53131af95d593bb57e4f4af506440cf20636d9fccc449d9565bf43dec8b6877337ca5a43900c1dc600c877b290342914e909aad8c5f0755bc25652781535c057ed5ab2ff8ad4322a8edf3fc1b5311dae6361a7395919725f4cd87ce0ccba37c64eb3618f9c5a53644ada569b90cd07184fc048f1b589eb29852909e75e7116ef96a268ea85c2bd257cefdde9222d7eda875a2a3abcd3a02a1fb470ba967b20beb54914b8b0c6ed464ba978088d7f8b30d098966b0bde82a8f1210f5d0c3405c9bc73f703134d0b6ee13326f65fa0b8154f4e30808997d4afbd060285942ca1dededc3410a099881492b5730ab7bdc2a4cfd0068f67766d60b5d4945f121459d2083334ac878d067bef644b9ee427bbbd6c9351d7b019bfc051c05ac301ff3792a1c687546dbf6a07a0cf56717374bfa1191c22b7753f6ae02392f8aac9207d1ad0fcd57c5c8b35817574b7dd90a00cab75f508f8a234eabce6618305f94746cb6a8573389d336bb67e1b0d2b6e9bd3959ef344e1eb245b522c35222813b8c6e82df48987436b5592025e9786ca63b6d1a064223bfacf59ada713c2a3116611393aa8446ea79b3cb21e96d13b659ada2d6524686fd46ec66c1b4d8f5ae7831840c9e3db64d528f83a1cef1e0a586a783f8306cb261ed9c2905493e74d35883fcb39cfc5745c282104cc3ce804999231d13e1bc6f2c022f05999fb57575bbdaf00d7a990e17dd2f8b9dfe66a637b42f58ee49ba60f2dd9718d09d7025b6061b2087bc35f0a8c884f5b67a5e18c2b4e857d3b48b79dc7cab6b72f572d22987566238a7153ed6264578424f1ce091fd05b7f14563fe12c76104d3373367af3ed3aca694a21127b5912c0b7eb1ddf9d4a9f03f660d49f7a7f0fb42797fd112414c3eba2b75a04282dcb9645191fd3dbe376e7f60ab40bb7ca1e991053a1912854a68d7dcf854201d1f2c26c6cfaea32e29d80847e6288274713d2ca973b91dab97884326b280c6f06c65b8fd25d314be29139961051a1d8699467d02b67991baabc9b05629660c243ca3b0477362d5e6bf9eaa33beeb52cf399846c77fcae11a89cbfdb2058e443ddd44fe202a3ba5c2efce937d78b9639781b8b2b99077b433189cf3b0733ed73b59bb194c9a98c5aa0cba6e71d1c5522f193defb9e31fd2cd60f22bedaf7008c2fb0b55a8dd52731dfa2bc69b40f835ae95db040cda6a4a1588a5ba4769edfeb7369c1e9a3b1cda293255b4942881d94d771b7b82460004875e71be64c582f2830c5e80dd6de421a311c5852f4912bea1451b0328d01c7029867cf9af99284cdfc1e1f0aa0d8c19ba9bc035dc270b45724247137da5d3fc4daa09e7014fe1439889968eb23fe124f067825d5f7b304f17a983580e009e0e51630ea0006dbc74a30b512cd9eb4d0b315a0ffdbfb581609ea9661b0007cd234ce43c17c92269a7519bfe99c2ca94b5cd3e7654946e67b37d4270a369266db6804336a446022677a024d44cc02cb04108292dc12f790578a0d61cb6fada738902eed3afdf1850bafcb279f18b5798d7466752c6368a594533baff5dbd17974638ecc41753b184845206c79bbab84dfef148eb7f1390f8cb7346a14c88caf540c241cad11ce8869be3bec85d029ef490fc5edacf94fa962be39a33c8efefcbb6b43960d5bc35f8fb72038af3801466aed141b50e9ac7dcf1921f7a6abaf320ff02ac34bbfac265e05e27495e6e027e673a48a874e6f0c33827a050fa21c2efa789c1e3df2ecda95fc52ca7be35dbf17ff6c73f37cb236e5131542e002913d177ffb21ac450e2542e24b894650007c36c52d90f83731009a7c3239ccf11829cf0fb6510d9924e927f14d6a06f8dc772fc9b028a8bbd2d3388985f3e2609abbd08434c46642b97240c9380a831bbafdc5db77be63a1400cc9a4f7362a689b07a77162022c6ba7a1bb9f0446a0b6b460ebdd9111132694fa5f1b29da39be66c5179849ae9720b2da0a012d4bdfd1b18b8fbef0d5c32b92c351dcf2c599f069c3b53f622fc8e904f27584b2d97d43f779abcde6dc1413c0a677dd187b28cfbcf7fa6316f0967b53977432d45944ce8ebd2e265c0bf6b2870c75ae808fed52aa35421ef55667ecd6f9d279c9b91c9314bd9411bce267d6ad52b1d910b3e65147c3eb6021a0af98707408e66bb11ca5abf5e34b2bc85b144fd06ea56f5d7f8939fe0cfa4862e7f306de069cf85f4aa7aa97c6848594f5a6dbcc718d2af77497f4b9d5ffa217fc301127071e9bc9c2c9222ba90e286506e384f321e622f05d81c114953d0f7e9626b74f4a6bea8cfb86ceb4575e5cf4fb84e9efac8291d1f4153ad3cd9a34ce0ffcfbe30b6829c0f986a4f85d63b602ab99ff3934b1e0c46e55d56eb479b79ca0729beb59aed783e9a3ccd55db8d884733dbd93f9fd7a7209fb92fcc49826b2d4356ca676f01b0981637897b3d2f90f37bfd73b214a398a8e4e2f9e5abec01d8192ca690191255dd8304a2d95a69331288bce00385f462e942f4d694dc3560a263c8ac2b5cd1d2c63b90ec67c32eaf5bd947bd8ac730da9c09ebc6888b0b4f3bead157aa9d31c2802df8ff0e4d69b7abfed6f184bf35a16ffb5677ddfc4682322128932d57fe4c32f21e190e1147d8e673ae407b1dbbca31331310b299e9f3db08ebfd2dad3158562c2e47addcbcc831cef0194ac8ba9778d0103c2955c886d439967bf788eae688f2a7459b0ef3bd16808e8d768b8962a24588d918ceb2cd1cd611b504019f65216beca212f44600cb7fac77216b7645c49f18064a3acdc01399315084dc9ea151ee28534fb31628d190bc540ac6b6aba572ba51aee89544015e6fbca2b3c2330f2ac1f68849e99e1a1f7f523599eaee22720392ea52259e26f1101614d4edae481b3783af4e99082d75dcca549049290731bbadd1ec0a93789ad5c9afe8bae44e35b3e59e562362964", - }, - { - "0410d1f8bc890649c250a3819766f4496f339a6384e34acdd72b3a87266edd2a7eae223a372883f978277a108d6e59fca1f35f25d7a9f3aed42d35fa9b12241ac04754f76fd8f0e8ff6af88cd851887a45e89f1c9192ca66bfff605b128575d2ccc9ca3ba1ba23a0251b2cfd6db577b29d17ce2ea998946997f5c4a97a397c46024681a400a54425c071232d269adfc3b1adf15b4586c4dd7b8886f5c1023bc348bc674961ac6e221d914f432c2f06dddcf738227dfcfff88485ed45882809d0e57019461c88683919b87c45e78223c37a5be5f758e4f0dc6add22f2062bc2eb9bdc31b8649af17d526ec339f0e6fc6a41e26299c65276302f982235c3e5205ec1521625ec08a23e766577664b73d18d5533261c859c4cb4346feaf7540a56155c6c3a4874dc86ea42fd518d71221ac65541e2dadd2f8e129e7809f2835f07dfcc4128401dae2b5fac7ced1d9e07e3f348c6cd26f55b3893d4418557a18c366dcd5eadea0dd84ab95437d6f23eb9e5877fb2ad740ee507e2268c39c7186f34e5cee2d0dbba1a940f516a018f23e716a399c317a7a81f89cfabc296c432cba900ad79db67936f76e4d97874fc5f8a9ff84eb7a0f6d629c581ec5c451e27ef1ed468f93bfc68b2e0412a543d89dfdd812d9421236a4be9eb374531556c207340886c7b84d42d651557b952e0982f62c5c383e92dced21905174a5a836acdc3f2393e770d6cdc22c39575a42ea406f36889dc9558aeae5dc5f8b84862850b55bf4accccb6a8ef793d641d6b08235f70ad3b0605eab462afad1af80fa003645f4d302b03d81a7d167e9a8187bee0f76b1cfd7006b2d2b55fedad6e8db1d3ecfe031702dc327ff2b0197337d7542f42702cb276de852b3d72d9acff8a7feb8882028a5e340950e523c41cfa184b3d8878effe56742994e60240e58cbfd01541d39fa007a9f0ecccb409c6cc540354ccf35223677cb74e7ef7330bb60420f7d7bf97de6888cb343cd4fb0928fe5df5f1b018592ccfa7aac6dab57cded573b5950b94fd935f32cf332dd85b2b36501de6687612371dbcfdf77279d647ed8bdcf81fda8b7e0c5ab139330d64695d814fc6f761fd141dfb0c8f74e2d7616db3598d8de40b993fbdd272ca37db27b82aedb08bebc4a8e6d0385ab20fbc20c215ad50fab8e93975bcab3ff38667abb0545b3b3f20e325f01b80a32a3cc3ed51703d4b2826849ee22fddd5b544816599dca0d8fc84feed9f7e90caba53b70bc3f457eb1adb89fd0b67d2c0ab53264430c61d2c4a1b19ea99a9b453fc6b5ebf5fb5ab799134769c9b495c479c828bcc49a8f993c3127d5cbc31afb89c0e78fbc323755457ebf0f3344d3ad1cfc59d186e96ac31a9298e655b3d1df74b95f30fb868631053540388a13d597002f689708d35a2365e309bb96db8b1b94ea4c8060c2b165f7f19e72056409159371ac9c44f6bfaad9b9567094d18c29bbc8aa2c8b5b82735d20f55284fe68186004b4a4fb644fd52d9645b277c1dc238a764005c1d2791ef36e71786cd990ccee4571d9a9b1aec757e479cfa645e320bc33268e05af9cf90e0e616ae7f237c637a99fe15b4ea8a3232262d96855fa248920a28ec03f77ce4dd93925db60ec030a7be455ba9d08edbf6bb717b1a13c3ac1deb9821e21505c0a8971d5ea5dd8e4c9cd3a845a336209af191150ba5d9b8c2c450e3a765e8670d7f846b2461f971fdcd1942704f620a40f4204b99f9035bbd543f64b927cbc7a74f32cbb12c3caef955f169a45374e4479430e08d333c4a877baf41a27a0849ca3a157b6651295fa71ac94b6e3d30b5d160965e93d2a81b4d575cefd264399c9e4e17059f4064465b2d92c96ac27e3b221499b5e642d033992c236b905c072faa1e34495f9890bac6228330e4016c061605bbfc478c30e1b8534c49af54785972aca2d144328b0a540e3b3810a73e26acfa22f48652d53ea521875475ffade8ab50b9f08245fad753350f63dc4e898948ac7dcefe520ca47394f8e993a6d13ff68a2f78cf294f235f5f863bad10c4f5bc41c3ba93cf5e076357f0f7fdc136f34b656b1b8ebb3eed1ac429c7d4edbc902f7f4bc24ea9c9b200b9a9fd7adff0c6445ce1d2171fc031e3e9f8b8d6b448053393c8813d91333d4bdc3bc5bb2b8bff876cd29e8b92cf6f7bc727517b6f57ae031f3040b0637dfb40b8c1fbe44cfb6bb9cd0a445fd9b3daa1da2b1c4a82cb4da1fb8d525e0a4d9ec30e9aa75b951214621c58c1f60c9b97e6c6b330497e7dea790a3cd8158a76d898107ff3a5910707ae60c8a46c633b522aee83736d005de60b9abe202435f8bc4577b0eb08b7f2b617bb5a831e95d6488459bbf15919d764b39684d7cb7c9310f343fbfcfbeeb212a90d96c7a26c1026c5cb171ee4ef839785076e5084026077455c73404a2653f333e9bad555cafc1a9613387a02bb1287c380d7478238bec8943208de585bd18b448b6099565cb3ec70ec6672a778fa6af9d1b17b0970439da24c7bfaa74c85ecd8e5852e42391ab2258024ccf91e37f2f0e86df958b197fafd12f4a45f7990375f1665a14f7f5374ff7740f89677ea8660587fb80916b30629a7aa88213bbf80512421a0a37414a2eb549b81cc85072cdd87e4e69d97ecc63f974e60d20de0233101c3d475d777602b12e2f797e9237570085b0e9f48d4dedf233eb1301ed4621f9736946eadf599bfd79157c0b4cc31bc273f5c6f133a4e3679ff6797d3c9b76aff4bd8ad40726c1703c3d8b78f0974b748d0265b0a75928374f91b48c2d2b2c11d8b6e5efddb75009e4db72e562be59efb0bfa06808c89f585a43d4776ef08947a77f277526777f0b52f1e0b5a03aa560fa45c8f30e584b58ac1fc00b104942b7b86a3cdee1abea349dcaea4e058faeffc567e2c3b03e1c5c4ddc675e25aa15de1442bcf5ee972a8c5204ca5794694759c13a2d716839dda61635043bdf1a09e35cb6d93b4df3b7a00871f79cdb4ee69c79041dd14deb7754107b8fef8589d2d240ac1d8eafc52ea847263512651bbede2fccaf6da816b1b892319817bb6af9fc17078ab6cca95f03cf8426249fd4f2bf91921d39b8cee24af07a52bbe54ca7fc4422a310dbf2149b763ac0060fb2c59154d2cb0da1ad4892279b4e0ce7f5f92c189c3ce48e518ff48c4ffa9bf2b02d4792f84534958dc6bd2914ba010aa32d133f6a07bdbb87a237c7acc3ba5cf101efe947147ed4eb3bfdffe5fefa991c0dc8760586218d286944c52d0f221e0101f74826761d01a20af187f9ec1115e9e98bff6fbd7c8816c15d33c07f51c171490997bf269951218ae92b66fa3150d3bd40336abccb717e18b53e8806fff94009910f202a5041b5396d1c339e6d075bad4ab66a0637d81eed1696e4068024001123204b8371f0bcdf0ce07d79f7c917327f7138a75947846fde68665e9c767fbf96bb3308abffe7a8d05512c81e39fa8dab2334f46ab9543921ca97be31076dc7b2a0d05e90b7f7610d1a391b442398ef56cde3b18737faa8f282572389b4fb3c55cb8ae6737257708c808bc0a414bffae293bc69cba702ce2959e1a30edcdf64985a4b0bcc927c5912f819c71cc9b1ff5d6e5929055be72ea5c8c1a4a591093deb5449b7e6b60109be1ac0cae472ba31e1035ae65f3214f50ad699a077a2de52f7180addde0bd78c2698470b1af13cfbf497d243c9e738c4cdc265356543885c5b933a299f01a5b5a9ecb0b4ddfda0c28573064f6a3f142801795d66bcd5c31868fd3207fee7bd98c47e4da26bee64e1617b20cbaa34e3abbe31126b06d5737fc2b577b19d255a519397f3ff8668d0e7d401a37e368729e4b83c5fbf01c32ec478967605cbc0675f685b5eeeb42fc688216a0667e1204c995c9c485e6f7712d80d88edc9594528b1907790549756dcc8b0d32091f36d2b4009639e68daa130e83a1ea18353ca34f431c548d91c1591ccf8b25eec1f7a3c18ddca71b87bb290a5c13229250c5e193e1352072f6798ec504b3b4c6aa578737332f52baea7bc4468fe6d8dfabb9728cee93fee50c8caa113f5ed7e9b55e21e98d73a377ef68be7e4e965dfa50cf863e6285236f11ce80512c573ae2b55bcb43cf6ebabed6783c250f991f5f68a59dcb2ac13a3c8fba8dbb11c79dc6236809f2d7c4b0ad3cecd24b85f1aaed9748b8c109f2fd98ac8a53bd52f18475598d67305117de8e03b0d988a2847539cc2efad520f86dcd82c08ad4b10e490b9cb03bedc7197bcaca55526cd9c8a5a5f69f7a1697e7e31aa76eee597c386418e89f06b0b9817a83d6cdefaf9594548b33cea1cbb585e55df3d3b66f0b1a88f4b98ea4720f1ef5e6ebe4958078ea0bacb8ad776e325ccb252f81943b9b1c2f54aad3c7baf1bca0dda1355d191f69c5d8163c464898116dc89201032d1e3281c8054882f60522d3a65831bf779a854fb0c195f85aa66522386625658457e74d5c2fcf5234f226da4a579ac1f11f11a1e0a6993a4dfe5c856481ebe9d8d2363401058736f7ad104104aa03f5c91496aaba2fe4072d418d91c2787a9b4ab0cf4bb65681ad0392ef073cf2fc060692b0c0c194c8eed5558098cdfa3317ab02626159e40e5c76fd64b2ef60b8f5f368b6b4fd7ea3d2d3236aa01d9db7c8a01929f9fd38557335b926251ade1a0d47d0c1444e6416218781c1a51e786dbe9297b78fcf0d0304c62929e00744ed4e14af926313a9849b2a464048bead075044bee013cbe318920c4172138560629a0ff4fd229d81bdc7c7fd1086ab17d6efd5b603a1991b33a55ca5b9e2051b7c140f7937adfaf474c2f284489d9b1e8c71d58f126eaa451407eacde9f0e86504f7de3ba4d830199a229de2bf39014baad6dbbc448501588ceb2575db0ddae005b81ba9914bc22b6d600e2c990f7843e553ff29d8008265eba7dac7b5b5a7ba6dc263fe0e262a7b8638a81f4720622c7361554b61d7b04c7f8b133440baeead7d51ac8b77d606fd0eae1c55ce7e8141dfd68d40ae3d8d2dc8a061085b4fb6d8a06263183869154618329be6b01c2890f2b5d0a0f25dcdbbfe2ec3597d79311edb943613fd4b59157df4fc2e1024be03d98ea3cbec7186ea9f4a431dc3743b9f0871b205bc0c1b3a001768", - "113b261414b4b7dfa028668ac8b0cde5734120124991c54f4dd16a87d181efe2bc15f6d0caaeaf6ad615f59ec5c2833904a34b4d34109c82e10609b387f995430e8c13d83ac34310d838af9efa32d7fed6224c0a33", - "cd762390b93369f1e207eb15deeaeb0036f5331e82480d180f84a76c3e44550b", - "e88c14ef96c7768f5dba9de9", - "8d6aaa27892a76fb05a2e96cef9a9b4b7ae0670a12cff95f7b076372456889fbd3b9b4fb5fd98b3bd85b247f15009be2f4e7a0329dd118b6872199b314e159618ede0381dd97db28743461ace1a694c0383d8458150a501d6c45f4b50d5b1bd47e61a51f9ed4929bf2e564f201ed0e6825170027d93e482c1ce268459d2f81cab41f0e7ff281430c16b34a29b5c76630dba72ab9e751bae41122b26121d91f2af271a23e818263f46e05fdd52f319d58330bcabf66637a368c0a8aeeb20cad1916d966e5e0b0de74cc67ebe57e3d1fe01e9743d42a931cb4b98bb762ea43ab937d1e5c42eb08fd56e70e911bdcc1ca4ca0604a329c5364b262ce2de282b4732ea657b89300cc7b7127ba4a2d08c13f581f024fd093ac09c2bc245be60c80e102405597fa8082f4d28cc954a93217edffaba3d2a397bb59ee89c8cc0f33eded78f21183bd1acdce64a923dd609a0620d2911f61e81fb2c8ccad8ad9d81157223253a121ea2bc60d6a3670c563fe06bd75688572b3be83cd31dfeac6b17cf8455267b481219c42034b2252977f32b8e6588fb05166498fa37d17c2b002a655b5711bbc21175348225fdcca041b1f97fae48fb1e222c5bb46b5202191c00666b7e1b2d84aca3edbee7a97dc0f6d1330e929226f8a76c155e973c1ab62c867e1f87be37788754e51825ba31af9f4722b5782ef782fbb70c391a664f252d14e49a805e94790135ff6bd881a687f98b42da96fd34bf240eae4914488af739ec15f13f048a7eb5fa94af14e8b6ac5fae714cbef6268b114813ca2a3920a7a9d5eb506a2ca211758de292047eefdb5a97e18530dcd8410495fc42abed91b1204d9b8ba9d6aed11d2d0fa0d931d46f93f2c1a560ef9f5f7cee1497be770d3cb07c534215cec12c1458bb57aab4d95cf4a15a5e3a3bf8e650206d5cac4af3193d169f1a57638d9a50f6b7c6985d42f7138b9226451670d7359351c2affbca65680557693d03458341198b8e13d0ea6abb7496edea3cd4dee2eb93695e668c7c0901c6809b8ef434e88b85a8b22cab6508b9560fae62900056b7c5c29a8c899bed45a2b5159a1d4929476ef350101317f77f02d48a039cf4cf01c56319cbba16fe908c49ed6f3face88867c0ad3703452baa7b86fe58a00ab8f740b4e8055164b0385dd3fa44502ffbb99cdd843bc3287ea468aafe4cc298a3fc180f284dbf78aa09e0a2f7d8593356eab016ad8dc505420edd376b66598a3d0aaa848fd68c4e07419b8b50e40febe2b6b17ad07726fae1f87e86abd01490a0ce24fb57b533c765504ee0a9ca154187bcf5e6828e3addc7597532643cfd992558d63b1acd00e7aa41b9765094217480c08c43f4f0b3f0127120699b7f2a5ac07c655b6143e467777cdad4bc21d4b57da4d8f9b9a7e4523d8c6fba3614b7f7281e80ff0f9004577adcff1b79fe443c80ca9655ecc102d5df6aab2ff6c3401f344b77666c59ac7d5b92bf4f1e2322f74b75e6ef2bf43ad9e018f164ae76a91451e5221bdf5b65a4fbbaa8dc31e6063b451edbbf4965307f8e65bfae87b15f2453083bea8484017228a9cdc6edab1a28834eed8ce07430f776b916b3bdd2340798955ce9ffcf114c3f6a88bcc4c7b6f2e3842426488c340d00f2c4d2d6fd3b6263dcf7a57f5cea6c77efba7013297bd3320accf033acc0833aaa8e8f95cecba469704214f54a1ed581349878a591f9993371f1daf92e55b2a4faf8f952cf785c687a59b3c258daef1b6d7bf9f904123c7384a859933c3ac31e33edf648a1be4d6264ffade860915bd118f0b9aaec2eb8e16b2015fc25e68caac77a3accea53b9b178f6cf48d15029fac12963b4277df037b7a494cb29b1d9e6d2148531a1f7360519cba5657c080254f130a1cc3ccaadb4298d7ea0223897e63d798b4f4909577cf9b491a82de0275a246bb1211bc4144574c8ef176b382262c0e087975cbef33cc616d32e0131a9efdbe8ad3d9cb5f935d3f4f409852acca22ae2a6e7450e9a426ec3b9183f93b4b7f89d850e1c7053c661936e0cde23e831a261b319b430da45772f0fc0113679d06f025983bbf37ecfba35eeca28de5ff4815a490570491266e92faaf8d0ad4ac8df106faff8fe3c8d050ae9dfc03a01ad177c21d7b653509a80369a668a97eaa532dc9867c32aebaf89ed36586e1ebbe1045347766a354a86ec1e8b2f30c8fdfbb6c5d549e7a84db81b73fb828499c5c4be0d4b2b7ffb197133a0ee18abb5a4e371be0ec0a6535507029316f8decde30833ca47493ffcab781d028edfb91c138609baf1054ad52a5d8ccb98b3ca5b138f253d99bd556afd80f71b39f36e0d96fba4e0cbdb18926894968aa825392f12d98b6497ff85a0e4a91c97f37ba1dcad30fe688b54008b925805104a61dc22b712685202ecdb073fad9b10b5b9ee2ff781f23fd41ecdec87f85b369a304b85bd2af126d08f79d8a9e2bff0b18607a95c4efe35941c5493c94e3f2f3902e79f4cfe84c138b83c7f32d7c5a125b28c6107921e8ac92f1af7da015b46a2f9169369cede770292eee8a5f40d080ea1c267c33cb7d4187093d486dc3911bb2d6cae036cb508e81ca783ab5e95cec751e39f3038003081a252eefa7cd913baf136d4e27076251da9cbf0c7d2586fe02b62ec786790ef08fb3ff3d79bd06868eb1abd9875920e14fccf6dc144e898f578b7295fb5f4e84cbf683722ce3597aafe3195e194736fc317ed03ebbb00d956ce89f7a41a334020e1a88da355d3b47d5bd3965a290f6fbf5dfdc8c8e6347b4eb85151e53a960311582235f3b546ca80a670dcb628fef572dfae0c101bc08c80f78d5630a793bdfe402592c316227f2333b386839a67e6ee8d9396fabc9648ea656a407670efaf80966034958f4a70fe7b920c79dea3d5a0ff05f3ed0516537d51a686efcb258520936fdd415345251c9ac1143a41be295cf12da5d4319e78e1c57ce20507490e5213ca7be92afca8ec8b6a07b33571afe6940daa2afb0dd4dcc1c329474ff8e13d740488e5ced552074fff695a04fc1b70755245895a1e9c387fd9514261dbb0f600ae03f4896e795d1e72f421d8572543243d662f6811eb9402b6a3b8dbb0f32de95bb1ac01b1287663d3b6a3f52339a4f6b27789e15519b2b59f2f4fc8fd33ad1a6e4d02cf0ddf8499f45746da424ee78e72847e3cd3833551b6e6fd6b1aa98c688252b57a1d97660ff006ea1b970a0b8fc7d2e313ffd0b0b85299ded47b60cd2fe9bdd7ebace4b0c1072cdf67231a475045990b35ec761e1dc1dfbd0c402296566eb4b9462979d33c9d652a9295ae70943f38adb212b48bd8ebe82722b1712ab6a3be6060297e2aa54e7d0158e4aba6975237e7c7a1e22b29560b8d262125ff2a6e5c1332acd0f6b5ba15b4a82d3631891a01530321830aa8f2e8ab6b41bc5b5356957a4d0c3bc3eab04df7700305a95d0f9cd18d486c675c963876b25b1a0f78e245deb40dedd14dafdaa9d614fb06eb2538c5411e13be116c76fbd3377ff212eb07c5c035612e4cd7a1de2ceafe95832eff88a9bdb3595cc19287fa40b8d244afe9bd24dca40db49893602a59640d7a1b8e7475825b09cb0cee111864deba9d3d1beac03664279910accb9fac534ef099e398d7f6e3235cef7685fd1ae46e47da093135741894273c0c3486197c26057044b10faa57244721328b47e611633d16d3e4776d90309d68ce4a60d3ecda26c9f39c1c6da67ff79fde4977efc5653d79ad86c3b53090003bb72e78aeedcf4c8107185d9aa65221df4e2104640a1a083845c01000370371fea2a6bc8ae43fbe290949da4e559d3867c16df16b143fdc807616f51ebce8d05bb03c2b0bd587b95e3f6a15d907aa9a5b11622ddf4c81ff9fda4bb49d3e9577551bae649cf64ac0cfd646b02f6f16cdefde09a55e77afd16c74e8a3d777d80b7cc42c51f618a3c467968631119f11ca4385f0f5713e37ab1133b692de475db1d44fbfe9d274b9a09e673dac88aea74ba88cde8db3c831e9b5a0f1e40261281e5aea9d4dfd48c5d9e173f4d9cd56fe7fd610909c838bcbe1d6c729e151ecb4caef511a36a14b03cca7ec5d0feacb4647ea5212a11d18cbcbedf78443127680ac0b1bb65120b4197570288226830e2a92b380e32387bbcd3be2c77d6c7722054d849be9de459cc1832ec3ac8e7f60fba9c81cf5fbad37d228eba137a23227d56cd24970340f2b7599aada9d2424cdba8b50c2b97244dc83f7391e2ceba5bc0a11ba547c142126c791265b33a3db6238321a5f3273ffb01e42adee17b898153e41818b91413ec4f6386ab3dd48db875afe659db9eac94d16f850ac179d087d93784d607349e8711f5f96fd514e8d096de8b4a74122ba914520e93a11fa4adf006700e122e2531e1f39340cccbab4862708d69c117d3efbebabc14a0231916ae1ee8285727c9fc980051360346d53dfc76aa5a11fb1fc8f36f95f741e913bd2cd1031e508b320abd2d3a62baa400dc439969eb44e6abf8223b29d4025c3d1ca08d2dbdbbf9927c625270543e8c0cb5ac5bb5d504d224e66a1895719e4f975d819a95e54cecfa59ec8e385aaacbb023772fdddbe093afaf5a75e63a62d51926254e5b47da1e9b05851196644b9180734d05810dcf3502747c4ece652b67674c02aae74f20d07de2ad5993b3a68d10207eab6be5be34e52ada655aa96c1d82df9b24c2acec35e8f0bec9131c20d0ad8936880af87215611b80d07d7a741a12d8145bd05066c6ac171afd8684b92f72237bb0e4ca4aec1ec280e39f36928852d5d8d02fe463acbad8ecefc103083fd4298f399bb254e7bfa166638460b760ccf2b0f5fec0e3875206bdc8ce096274643824acfad71ba06441c74788356caebdd2208f6f077b056fa9d85aa4357e93bf064a776f5f3b0f288d0afdc51558c8f25cbee17247364c2bb24637dd69017f92bbb43024d9c773439626a02bd0cd44136a642c9c5ae593f32eada790c31a6704030f2e07f1173cbc0dabc410bf9864214c298a6283b3631acbf94b8371681ba81eed1aa81ccf258252d7f90fe733ac770b9744d0170cb554b39e6c72e05919cc237f8f4d7f3545f4d2732f4c9473c77401dcba04c0fd33efc73219f31c08dfab26abee9a7cd4ad3584730768fae899fc", - }, - { - "9c73ac05648e0c50a3ea3a8eea70841e8e06669c1e7520c5e25e093769c4b005375c0a9cea16ec8e00261ceb96a00924a66fc0c4e4e089c63e93fea857aead8e0ab82af4ce1682cf3c9fbad23fc3f7e632b7aa169834ddd6c7db7e1e892cac93e4d787b2ed0a812aa93bfce8fef3ce30ab794743ad241974ff989288c43e1ba815a25a03acdc2d5517293e161d0c46c8858d0b32b124a6b0bc3838807753288cf6838fa25fbcf876e6368c0342d3cbc860d6fa12faa1c2b7d9fb37504e60dd44e36ce74229dfb80f1545125718dd1f78b31a8aadbb4d6494489ce596fcc2dbdf2ec22157a1d966b61e780d36552daf084739b602861a96ceb67b65b23d40916c02b2c3a38c2a59aaa266e1f8939000dac9b6dc50d1731e87ee833a2cc3cb98c57e5b680a85c1b428289520bb252096efd7723fa8e55d2fd4e16900a435986ab3f3d2bd799471a1bc07c1772ce10d1bb8805a6065b8903999f9393d2ed1a7e1c57a9e3e0e10dfca17a04143814f5f3acfb99a34712a6e0a24a7485279ef343e69d27c77e25b41f9fb833d7cd29cb6a15551d5c77b43d19feb19f2640926a272f81eeadb792bd474ae11f080ada72103f8f7ca733a9b1325b50589be2b2b3023491afec246d336f4e4277592ce9695c68d5f39c8fa4cedaf51776d7ca29ea0ecb89eaefe71e5f3560c68e8dafe7da08cdcd954d626418677b8f3f45b9194474a32f548a4da3bfae6a3e2c0a25f602e3b3a821160c397d77c8bcbd71c5f1e669213af36eeea30d48e12953071f55eac2fe0bd8fa355671fe032f6fc9214632428125a16fc8aea8a9c7fba0d7518b9a4f876349ccb9bbbabcdb2a85fc60b83ee1ddd041967efa4036e5e10e377c9886f40bc0b0b57c7b724795f843f6a072e87e532a04c21445090a360731a2afb896ab795750e5c2c33d58bb714f5be427ca3751df09661402604a09a1eca95a8344d3daa5b99d68e6e6245825704c5d4a73af197d052d7f75778917542261d77735a21cff3f75d6159a3e4b1a7a9854ee376e6b3c8bdaa1f353b957862b2efd50d10a40007026261a546124cef979ad20d8085d53e30f5736b8aebcd3cdaa349ea474af249ac53eef2653ae1fcd5b3095538de9368d307d45df2a19acd44e3b78c2da9d5d9fcc4cb61feac5dd35f66299845bc0018c3d476b6761083baf33a4621e41cfae0e0c642de729fb2d206db6a4b976a635b3fd911b5e9946fddceb6feb2d2f893b2bed590317442037a1d6dc5b5d72910160221cbecb53bc983f1c736c3bfc9757e9e05af1248b28d651f521af67b2a0d7e4bd86a0013338404fabac7b9833c372142e6338a98c0efb7130aae8e34bb0c80937680a7a904aba3be735d41af9462f17b967b13566bcb697579f8a9340429c77baa6e24ae1ac86d8d25ae3cb9112e34a7a948fd141367898c5f33c0635c87de06f603b510cb229df0d0d9a9e107de88b12686c539ed4fc54c8285afde0c8ee502919a125cbcaf4c8c89f56e90d3f641f97c07326956f7b5d87c65b689f39b8b84359ee0f14d2c7ed621ec67f5e2a8ee5faf21c805187edd95e3941ed62fa95a65473a569566d46b87c0d27ca37b6b022a8cca30a4480d392ba15701d1015b3648958cddfb614983211bffc4966ac6c1f691f19bd9fed405a02c06712d62a775f73353f3949c76b6b7757a4ee0410fd6d20071abfe46b09e72b70f9f19b61410ea67037e037934bbefaf09cff018a5c218176d165d1eb5cfd5c46eee7b82fe65ea02e3ed7b18a86ac7b139b7c9df79e1f6e6f85304ad22d97190c7ec12c651fcc835ea434d92ae1444e7cb0dc644efbc2ae70f2f94310805c1d0f2d49643d05e78baa1c54d4fd99137a49efde88dba1374c94208fb4a0ebc1a0090b043610ebc1bb08168ff5bf936ff9834e825eefb9ab73da2b287b06fa2b0ff52f46061b07c1131e4108cde478c767b749b696f3520acd8d3338842d53941282da289dd1e9a0e02aa9be0f127566c9bf2d50a27f6b6ffc9e9880bbfc14ce7eeee70cb0c0ad90fb474efa69b46123638e8405fdef65fa7e0e7b29fa8fe8696edf661f9003a08b4aff85a4a3e6d817655c1d533b834da981b8c37c38abd5977b3ba71b3f57967a471c2eeaf2f6f258431fbb7e92f91814b1db80ea775681f282290db170942bb7b04aa2a331950b74a4b6e337affb4c51c6cd4c4e13ce3095e73e4767c2731f72bdb225ff572163fbd8573378427fda194d165750d487f6bbb63e1378a132fb6ee5115e3c32b2380b096b735bdb4d651853bc7928346fe3ea9df7534f2a4eae1f5ffc4b82ae738db7df0103ba4e68c2a2153bca499bae2439a57778cfc616df16032aa8a19e26597d275d2775b5ea17cb25d204b18028eb25a053e5666ac47c6def151f7d4b68ea62c601d87bfbe04711c24bc34274be6815024d7b7d01e7dae10cea6e485348ab195a83854663cc5826181b688cc9c091dc1e0d491fe51400e20e6f2a51a7d56af258e038bcbc80e2c4ac4b41661bd33229d07b39b59f3aa79d99c1ef41974a33e02a7cacd6fd8f9b99cadd0fd6a031f070bd3a364c64ddda0e9fb94036f374171de0b3f4ee3380780e6d77d50db9d58e670fb4a364827d631226a3491a27602808141ce657ad6e560ad62b088ff086e6f03b8a64bdf7c7d01e7b19289279509a9d6d80e50aef3b05b5561e4556952c46d0b6ab8eae735eccee77e570e1360b7ea38c53ae6b8eb420e4c2663b57827228392db6e79105a47f7d89e06ecfebdd63783101d3bfb5f494785acfdfed41f8166faefdf0b49260222c4080ec2c6e4f949f41784f076ce37fc7a34fa4e547bb44e6b9359b4b95cd67d64e4402ac83973bd50f8adc7c6e4c34019bd8f6d3843bba3d7155890712e0ed5134e00db877398d86b459f312a6272431f01b057446bfb1b8053acf181bac79408c7708f3a0867a64e06d7786849bb874a6bdf8fd6daaa572d5648ae100f4318d6b3a811bb0fb709168e817ed83c0622a7e5b17ebf5cd5ecb21d9ac32ddddb039083144c93cb55a95ad72732132d54bb120639d1620ebd142b58d75835b35cc6367012c93c6772963e9ac852c71c0dda2246ab845469997fc170d8f62334bc5aa4ce23e036967674303ec6f75bd3d17d197d026de69beda70bc59d2ff95a899d28ac7e5e42f4d37233996a8e6d3b0b86b80df49ea8e145b4a6e3e39f3d6c3c6518bac45baf97cde23037709d737b242b8918ca31f90fe59ff2c83e2f347a954d3559a8e4f075c620ad36be20b1e24b3afa156cf3255192171ad0474e4adc9b7f35436325b92945665f038611e5d14bdfe7b7d20c09642323346a717f460dfe7b5062a0098be66febe9f5fccfc747aeaeff81ba08e5dd2b1a489c998ea9970afaf9aa03859073707a686c492fb3f7ddb27897ba5e75e578bd82114b2ba85525a2002927909c970a04035334b64b1169c3a923211e0999db8baa26b6537cdcf57c051c0ca1b317a5b66ad96cb5ebd57994f99ab202348d8ddeb343312f1f26ab2442b8c5f5cf6bab394418ef2fed68c3e60275e836027515b6b946e5d86d91fdaf49c2a5182d5051726840a156a8653cabda25e1dd9af693533d782caa09295952ebfe6a194fbc8bb7fc2c0da5914a506c6f31490928dc5d6554890f5eb268b09d671bb6b6d7416dd36e7b78ffc5c86b34fab43d22909a87e5239643d5fef373650e291be56b89b9d90431d8c9fa44fdf4f83a1689d59d6ef833b1ce31a44197b36ab298d53b51ae3f8387087dcb0571c340874c1524ba0d576bdb88101c1fc387d25b5c0dad0b4d309255ad5d5b1e209ba56db0c927bd209399a8a3b5c8663c9ac199a76ea4f49e364a4b93a569b3400e20f0d748adf7db46a07efc68e43802a5d1a914759eb2abe8fe3e8d67f2cd7612bd4d5a6a4535b1e5b3ad4d97e54f3db7f8512c9603d87e01160b6908d8df1b952c750071abb1565e5ea3f643f233faeb84278187ff0089150bf21ee4d13979fdae796f592ac5b88869aecc5be1c64665edc8ececc87502d36720b73859313607aaa561d56a195dd3c7292fa8f0750ddd3df9ca056fccd9d6ec900f45c1454c6ceaad4154c69e288dc85735b8cc42950a3c5f0fab2be8811779905c3ad5a9a6bf56e7141d863caa4e93e0065f229b695efb790926618b3eda1b9a15f143bbb09aa3c4b72900617793417df364185cc213d5cc3a375778117212266356e214f085d8a7aed908256c4aa25faebabc70ce913c08c89380da06920069e8e27dd867567f152f883a9bd2dcfb8097b7f065482d6d11c0edebc67feb3068cead403503c04b324885ce1a62c99af9808a5ec8b7cbd978b8c43e37b06e9f7e1ce0b31fa0fe52e8842002e6e99cdf69263d31de080b56c0cf94f77f0397fd1f77b13e17af90ff33b00119999df802c33534a13d3ff7fd0e8cf58e8f8c8bae033cec1aec7d191f2d1a39c7b731c97a67fd1ca43c13a24b9f97d92e2364dc26a1c9408d4659ac7373e53a2a1704a47e01c0223ed4c489735b62a27ec67ea46747e4f48d3da101b0863bda9d3f7f1b413f3e7f130208875e6a29dc30a78198ef658c7ca32d7d53b4b92e51f8ad6d39ecabb800adc0870b2ab0e85b5769f346ce7fc371ad40c561f9f3b2f2a01f2b8ccae48c78a41383cfc36b2a1bd41d61a39c24144965d9aa5ecc5d506c7c7cf9476085bf049942d35caefd77821ad925b7fd3a006213abc1e008114c848d45cbedcb8af264cdc5c07bc338fddd1123940e5d95717040325048439dccd1e298bead22b011ef76d26a390a68161b8bab29e8409a5880cca9c8104694e1282c9fd64f50e73ec6b9a9ffc31115de9cc0088400a2dc806f85487fcbdd60f409ffca584fb197156b40142e512a0dedea1571ebb74d6b26d3b4a59e9105929a055cf3540e8a6a79ca7ea71ba8b40893c9797e81c6e9a7999d4d382e52cac95727bcac354616ae1094552b3d0a33d0d3ac4e547237fc0cd54944039b0eccf335889f6aceb518de496e0986783c564be8a4a05bdc9c67b1e5abb480b98173ef091259d8c772b611e0c09758fceea3e59243406edfa71fc452d4450b55b8fa5ecb543692c6eda3a6ad3bfea929a18ebbe5ce2ac4754989c71dced37286cdd1512107e4e7f4878da1c28b4beb2dd9a712a8d1d61d1a5fe5382db8aab4857b05a783e98e77711c1933a7641fd43dc6e6e597bd03b11ce8e94aa094fe250f03cc92ed5b0a5e7723911e87b0f3c476d9aa0d96adbfb395a8fd353cfb5a4cfe27deeb82e849f90bdb17928b0a5702e4010f7aaece2d43772a78b325d2ff24f9de0f7bc65974d2348c64", - "bf96bbc17abcd1f56a9f22ad164d25ca72f8c996f1a7a66d6effe140336da4f20460b47e1c8573872496343be35a055552ceec437692b0e4919224c4ffc8b603286a8245eff5cc148b004f6e5a54c4ac22b0f09842a07cd332a09732694d3591b8b7d6a7ada2bb38a30aa7fd5e6baa811b9a195d3a96306d", - "aa2f714d3a184a9883f4199e8e33fbc9c92b36fff2d59f07a9d0d335d7476e81", - "36c79f9f14d431cc8c077439", - "873d0617c986dc9d83e9cdfc50b1f916626a9d9e1c595dc7ccd99d1e993d25d89b04a893c89e205952eef8f1733054bbb55fa5e1b07135787d4fcfae226737b50cafa2c11276e8708451be9b4d7f662e98ef6b705c5c4fc64588728eab1dfee22a0a92bae61828a7394977b0ae8a3b6d0126a23583fec025becf0a72a28891391ac1495732a7a4a1d43a63ed8eb37b280b6d886096fbc4f77aadbc5e441e996334d0e10cd7f3dbba9bb7efb147297986509a07735385c681e0543186dc166291edc3b4664f5c8ffb0965c85bc30ff5e7769a69609c69ebb68f35d104bafe3dbd3e2a40e13865f19bca3612e48592aa930eaee29440b4ebc1c0a59f1c54519857c929709b086bfddd6d4a30940b592be48e0067976099efe71f45f956182dbb300e8076e1207baa32d59c1afef7f34171bd66099d2d7f07b39d16d0f8b085185bf2554c6ad66bcd656f07979e8f19575a116f5c4fb9700ec3b46a3254f28afa1ed51348c1af6dba26fd398098a76d7bfa2ff195eebab41330ef290bf75205a2ee570a2fa46bbaa74aa6ba68a0e63e2731dc1974eb44794f3c89ba58cf96f7a070fcca678185711d97cd9d7d8202351ed589e0b05a7a190e60ae4aa109254a7bcf7013f8addd07a64145e21226795ff7c7b1c225f40ed7c3552da8eb18b9bc9bc70c2e7ecb10c8b20c54f04b6e27b5044a7a67b558407eb330f2083444375c022565c45fe817dc00c7d24c23db320d15949b0b64fbbaedd310e73e423fcebe6e1e98a5cd232d97e6466642e5e3b23f06525ac1cdf8688650cd366b1b7ba2a9033e62d836b14bb73717757b76b9673671bd3d3b2a56628f5a309f3b86ad32abac0590c50f7c5a22e0a920d88dc9fbcb3add08b900a2a2fae4178aa100a0e645ab428e0e79bd90baf4af2755e48262b64838a6fbc21226e323c0a1ba5703e30738fc7b5a7df9eabec6199df5ff6ad58f9df5a734ccd6509e53ecb3de1c881732e26e52ab848a0335b04b25f2254aaf8c130c78b0c9a40b60d402673ac7ec7311d0b00c45bd176bc73ad81c2478611804f59e3c145110aacce922e473ef346f8acaabdbb9f313dd3f8d0a937d0c048e5af789e2e09a816146f9ea28170909caf2572a2f6e2d0d511242909de2815e9ec586b2d12183ddbeb7dd70f32424097e2ec28b4ba62cf78f547e2057a4c050cccdf6b582172343742ec8c85e2847efb1595bccf89ece3b3ebba824d2f097b1987ec26c6e5710544739d54a714060fa91b7995cff0161415eaf55758078772c0271d9d282354e47a25b673eb11497a6ed8db82267d65ad47412300ed525af96f943c5336b1de88676dc346e7339230032463d305b0442f934018bdf0242768511d20474c6ecc82fd752c0c0ca5cee1f3e06e679fa5835540f97870d47ccc6bab233290be7a3bbd4a73f1dc7682049bf7b3cbfb6687479c18d246e3c07161df5c889ee95d39cccd989625a8c9e80f951f8b1832f6378e05daa8566477d7fe547e49ae6e822a68de4df9fc4d6500d5219c3d3bd8887bd7f695151ba378da17c2e750399f7482973510a386721c59683a86003edb9f0ce1ea89bd7bb8a25c222df7ebedcc1b56c8ce18f367b2cae720e0591b477f6ffb498c3d7ce59cabb1b01d7cba84d7180b4b2a165d4b889a6ac361720e768f2913aa50b0b5c88e55c35bb4df4fbc4460338809605f1fd445a2bcd97ec1d2f269b5e779a18c8f215bbc5555c745424484ee5436119eb8754f5e9e91f51fe715353596baa1fbb0a690e99691636e6027cbd4b7be752bc278661e2677070ddc12dccc262d3dd47160345de51359ee8dcf2f61044f95dfdaf323881b2bbff68af6572348f786f6e52d1309cff871ad58148307d7eaedc93ef037922b6092ac62171433adc4934884efdee3052ebd60ee115f76f9dbd0eab7c4c0a77b4ce8078209d23d81d957335f331965b556ebd54732327b5aacc899f9ed0edacad9eb98cb845867f249efb0e1a5fa2483227f78decbf7f1f32d060ab0c01eb985d83920b2cc24b5f9a0d5d869e980129d3b78277fb87e5cda61e340a729d86b6617b8828dffc7c37d4c38080ef3515c2784935973dd184e0a8160f84bb78bcd8a5e691760be4a4d41ed6512ee436ce24650c0e17e7d74b5e01cc39b21e21514a84db262d673f24a82cfd5dfe2a162976171c538b24af16429bf8ed5fa8e37f89ec6e7d63ea1d83ac1087cf89e8f43161f225108889e922493d973e36b510074533cb1cb22174d21c4076959e4191a5df880a8b868b95a9cb5151a7ad47375fcd87725660cc0b59c88ceb86984941268493c49b8aa2baa8c531ecf497853ffc3d26b926a379e72188e246d42073041fbca453bd558f328881c8f8d9e099e898a912530c4be499f2b32229c359ea10e0befe6d94cba5ddafe51d164898166e890b22fd1eebd5724451511dce1f8f7431d712a3f1e50fa5f609da686253311af255b84b2106b09b803e94b51729cfa0826869945d46b9606547e7e33fd9961cf15b400d0f5e01d8fd4d92a83ae526934059d4514b9e0005317a70466aa0b6086d5fcfed201d958a0de55fd23f0919ea29b8aa02440031a9fc206b9feef362a73430a4204869354ec81b6fff92eca97e7f1bb12d25228eae466b8137b4806895ce34b57dc14bdcd107fe160776b0e5daab150ba06976eb884eaa574da393af4de355381c7caa4f611a2ee70a0c78df93a4276f55e6281997b4aeb36888a6d9638cc95444047e5202f41f8bdd787f1ff44a648cc7d39f05e49e5d6989fedb194c526780709763da81a780db0d1534a466cce57e11dd3a4c0e273d9873af1040d52a90e20101e1f80ef296d45769d204cd5417a84e022b6b336675d36d9cbdb16b0cbb08f5e240012967c8067c92f97f981cd19d449084400d76adfb7c610abb73bf21e161db04debe6665fca79d71c8cc50adc3ecf0e52d07773478ca97b8e9821a5704dc58acc647a5bc618d2b681f17942c46c266c73ec211ca403a7d47e42e12c775b370cd500d70a4aac7124f5f6d2d4ca78e1c17a96426c326bb60379ceb0c84a86200f3b450e5e9aaa11f45440f5260eee7675a8b9c47fbc58cf18a651a1dc7b39a911442504f12c103054bb50f15381e512dc6e3af7b414b3db26fe767d83a2a53d7181fec8f6b196c7874befd6628b31797ee3c9260c7b7853b137893e36696e2a47277add98462ea9a0edeb7d2d3c0f2805fd7db64c2c7eff353ff2b36f4de862a42779ffd4dbe77b6a79bc9f4ea3e909474ead915fa3fa990bc82b83a670b163e79300b627fb91c4502e96bb9dde00f716ae6ad14dac647c9f7c2e5b2e505708b5fee996b8e9113a8f4f2caaf414061ee72e76b8bf47ec4f781bd7c589adebc2c267448247e30d659998d8037783494a1fdadcc819d7ad7ea2674f75e10639c3d3055046a00814ddda0e463185454a4455d60b9780250183d591c3db6f27373cd2ce4f02f206ae10a8c32d71226e7cb8d5b05909445977164983c0073434d6c0f2bb62bda66a16792d6e53a49ccb5ac3e285a6baba935f30e9d1ddb812a018ce04f29e2009ad678ba72b6a7112d6e7cfcd3ee7b058ec954a6fd7fd01018a6eba6209687c3130de58147b07bcfa02ec1caf30b59daf87db4618b4a5fad34cbc8014a7529b9458e05eccb9a77ef1621aa95513c6fa4003b0877ffa6d48805e7867dcf53447caf348228ce926233f65d553146584d6ff3dc3ed3296db9bfe69dec6a07add13037b3aade118b2ac3c52350b9691a6cb32356ad93377059fb8ceab68de38d96876d6d383db01f3cf620e47cbfd471bf6dd1f601210482f7c3bdd4c3bd37dd0a7507e1f0fe515151634813dd4ecefe97b52eda28e7a7129993b0af311abd3a07bc463f3cbbcb4fb0eb265a5835663fdbab0d8b8b5a73837ac98ced6582348fdeb41ac8ea9e36f9818ab9c0a41bac1389a6b518ea17df043dd50550f32471645791bf59855ed695b84919aa5cb688e569122786660f06e3a919ef9cf18c355bb397b86710c367362cddb0239aa1d32d489328e4bf92b3abdc3d0dacd76ef1a1efa28fdb848e708aed6780e2d8efb19a2e26fea56b4440dc3eafd796896d73fd150bbd967871f5e6ee5db58995f2f85cc2a15077d7d472bec2e30430af6891193ef03dfc7761e2b3b3b54a72d4f1084a8fc541526fdeb0633dcba14e9485b43065aee8750397ea88d9ff13417149e0fa145be666e6f4afdabe7ad8e4864e777c20ee7a2842db44dedee22f3ce2f97d72919b9ff6059352083be816a7515c48c5140a99af8e81b9e18b10074dc73dab55fae66261421629c8e323d8134f08beefbda555660a51e4b55a9ba4573bdf0396cc413145a941c4175aa672586f7676027f9fe211db87fe07a23962f5b1ad8f566f0d5b13c5146457276f307a02e1e13d00c5032a06d225248215e4bc4be1b672f1eaff16ca95da42513fc4315c7a6663f9101aba80224acbf0c87fd3a2ee9dedd1808c1247c5bebf3cb8d77377a508ddb484ed91203a438ef5ed3ca14e087102bc5f3828d8c3437ecf5c92eeec0331ed93ae33520740abae9b7bfc45f097da70adbb9b9b879e46a7d655dbf75d89773f737b66fd8a8c13506cff7b44bd85dee279ea7053f3ed8447fe79c400cf23726fae800449d27af5e342ecf776378e2eb449a3af27a40fe4a9806487b81c942bfe1a4b0fc146c971a13f83669e0189e337cc9fa2024864436189a9165ade6b864698ecb797ea05fed0d60f0ab4b92cbae36c72ccb5aa45337cc02dd086afed9e5522ecdb75ccf389fcd63c5a4abbf60908e39cb3268c76a08687588be67a856a841eeaaee8ed016f6640ef0f5acce12ab8bb58dda380696e3fb22d0bae0788c4fb79d00cfa5ae3e479dcf7d08b45f4592c2d2a7f8081d5a9398659613ba4932ebfd7382d516b2648ec4ff4477648069b9b2e4decc89547c16ab82a0ad9cf293fee5adb17cea4c95ab7b8e386dcae6acac63ad0d1d13656dfd97d5623dbe45230de597751321bbe5a03c879c303fd7a0d837d48141decb6df4f0865717628c85dbfda29df9a8a69b2c956c75fc66e45c08960c23bbbc706e48395057f989dfe675305067b3ed8d046db339e504d5b2bc978ab4dc261d8afb325c5e794ec79d63d8db53f9dd24b623fbcc202679fae8f7d39f7f7e0667b142c714b6a723996e5254ad2ebafd63c3577f8909981ce6b3eb1a6ad67a4e93c45ac3b34587d153ec5ab67a2697a9741610d5a176cb9b5856bdccb98f69421061c84811dd6660495d9f30548efaa69e36ead246d997c95bad0ca3fdc1a08b4be31b12daf211d3e29d585cdac48af8f2268ec304bb35d", - }, - { - "ceb1f819497c0d631a9c9616655f419b5e3470fd3b19cd0e4fa556bd26cd9df57e960ec7121b2a2cb7c0421c1f84b77eb8277bf341490190ee574d1424eb09a281176a933394bfea5502077486bef23ee66e3127b732b7a58a04b9aeefc35170dabb030d4fc3f8a4c5ff194bbd0b89a379baca30ec81d576868f25755276e62c31e93a80ac322571313ebcee494592c3ff5cf3ecdec962645887d9aafdbfd62ea910af5542d4c7731283625bc9f41ec85012b42edb1792339e6cdd9c2bb3cad4c4792a064df17a5f74dcbb3dd0d90620ebba4fc6d1e1f9704dd60c798ad64d4e5077549d68cefdddaab81a7a91209b7ddbea43accb3d1c191328929dffdfeb4f5740ecbf0ee99cb9a1b73333d7ceb0b2b8f35f84307b9d44a42fe1a30ecdf2650dde251bc8c1d46978089c50d64c028f40611370ddb0b481df9624ed63165370f4788bbc396026b268c2023e0f04cd4f66e0bf439074c46f0ae85d6dfeb0ddf22868af61c8d5133097156fa61a3cf5801db5c3ad29871d336f7aa06d2a7d5f52e50eb3aee3c7de7bdc4d21f68a1776a7cc3954f5c071282febc89c1545fc672a0a1bd8eee2b769be048ab58ea12b356d658a6225fb8a55e752f1fc97ed64c2f87f9ae661514f1f56d9d4e47b001ae865a44b8a9fd5df8628d183bfbee781b6661c9cc76debe6c3c5bba840bbc228206673aa05498a8c715b0f3019f6b2d05cce6c233b5809ff1dc4a75d7f69859fcff94ad442d460b32f6fe348659518c16385e49fddee9efab2455732aedcd17dd51b5117efb2ca1e21ae6787437f48a7042d46e11be4dbcd2932ffd70fd154e4eca5fcdc57c6fa79746100b8e1485fe575a5c79089a25eb2d55d89e42eddc81b82c4f7da8bf153ff5353b7349b161911bbe0a14483fff6585d7f3c8b5c04a6dfc99db9548f0c53e25f0b16fa212f0bdd10ad2193ac18eb09972795f42b3bd3f4d98c4868989c4af7a760f1c88ffda59faac73256df1d607644f56a70303d6409c9ad716149bb58f01b4ab8ab475e4af1257d47049aa77adf9ce54fcd22b3d6ec60484da903a6991ff052ca37b01428d5916fd92c17530bb3385a805b0d57476e9f9417a23ab1c12a038b61b3a0898831f9615d10b468c3edc24448d09b8f3e3a2355dc5e069e880929eabcc97344fb6ca5587c5ac1404783848f531f1e915941e7359fedd328f7fd12b3c685f8c1f29d1a6ef7dbae3e5e32cdb251eb43aa2d2ae0cc18b3f40fb006c2778cba387e5852ec4f2d9b8e8ccd5b3e1f4781c974aca940c45d35d30d3b9584c750bd45a80f32f73dcd85c99ae107b92888839c342cdcf88911cb974d611b14b1d85a59e88c502559d6eef3b7f5addf7d307bb25c57aae669767db6d798ca887124e159b0317e09076cfdbe61aa9ddeda189036703b1cd9b1998f88325910a37ef1fc2e227a382ae635e847df8625b99eb6ef0ef10ce7a2a5762ad7d03a7a4e2b767c4df0b477d6e9601dc8e6438184f97193ea7d7a8c22f1b6fac1f0740f1beb8b68db40e0b22940cff2261273aa0be43df561b88184a9377e6a27f27942dd04abb9448b6b6ecb3a60f14dd39b58b8d94e1991cf9d3a071ba42e0e1d71eb211ca466a70fd4724a34639707feefbfd73dd9680d76a214924642a063b38b85cf30eb763fbfe889f34b20fa4a10ba214d938a5a092c6e9b73b13bd664c75b34f746aa360593c0f8dee0f328f0ad4a3e40d498490007e573b8204a1ce7a550deecfb15f18ed5ea6cb5dd95a68adfe4cab37c13b383f8273b1971580016a8df02a3f4f431c9de9e7ebb33244512080fc5852278081b9f4434109c3427441329e8071d19d0fbb74fb6ea73fbfc7c0ac1012d3a0948d94d7ceae9b0112ec43a16cb582f9c53e7eb0ad15e05ceda108fdb3dc9e585a332018d1cb19e4a75d86041308fdd8476c88e4826931601a3a5dce06fc16512f4669f10183d5a8d15bace4649abcac07358089aeb1e9b8fc3776f3239d5442d3be33d532097e13651af7c9a5b465ace9e626889800318447b8876b45dbbe1989e1eecbfb5cdf5067c71a0d7b7fba6555d0edede12f7228d7f9841dc532274f24060b1f52da6fbaa179b81ce962723f43601d248f8f4d5778c1653e038c8d27828836d562968004003810e9aa9318edf3260272b54fca2e012f6c04abe92c2e6152f3c3e973c7e9abe8c3467bdc246f0226d1b7669bd577bb317c571aa8758bfb694fe4dd17ce78f091cf6c6de3cb601a9d177128fce8d42e652b490d90c4f8fa04ddc71cac300d3dff699be3250bfdb2136edb0057af3ebcca77ba5b3ca34531810c5e2d4c5b5b3bc4e71ee9e30cac067b7706c326357fe0ad2a4bd9cd811b4e9d696bd9b4b70579ae246381210f879c769e5f9cc3cf8d70e9c94ab74a55f5d7bf61a17418b6edb6db4147fc40cf98c75de85421b7d192919add48e5334ebce2a06e56b915447fe085b7dcd677659dd55de1f705c389975e56e0338a2ef07ccf5ec3786407e8449d9011641786f1ecd4d3d3da975d61f5a442293e6119ab20686ea8cc7681010421226838a95a157e2de948c536aabadafcd4095dfda48e5613272289a8238dc945e5f1ef30075d5de096131740cdf23da1fb8b9fa009e5b321083cd93bba9271909460c09bbe1e8c54319394ff85c291814e21215816d4791f01424abbe4cc4c792d0d04db1b812f4d24b44caa76de2bc50f4d1d1611862512d87fcebd3c0b2659082b2423bc5360d107ad7b8e8ba7438ae4509105d6b618af25e75c51e272aafaaddf1e5a227f2b2a2c96a8a83dec23223cb428136a30b290181ee20a819cf52f6c03798e7294a89f3b5137693d5a8b7a0ea38d78e43008fc4eeaf6d077ebffd3ef7952620e0af1395c38a289832df391d1710ab5b103a1ffeea8c06684c03a74399cd63797c770e3f0136d8331611502d21fb883136a82f2034358880392fc3d2fc274b799e59b89f8f90d2a5a123d3c21e5bf3540323743858fdb8912c7c6329a3aea241075ae097ebb23c8cd50f4ff46b42486e65bda6beba5f4fe6dbb30f7e61b1bf690c9f00f7513c83274cd21bb71563257a20cc38da2b88c1063bd0849c8243058ee205853342085a8edb7545f0d96a6af936a3d4612b95676665eb02e72e0875100dfa444f039eddde1422ceed8d38e6c3dbba25064f8c6cb5786f9ca67712b7840cfbd40f99b1edadd4bb9a61f48124cf3b49d68bd642404eb1dcf428eeabadfba6810a4032f8ed06b38867a7098c7744d54dcfab8f0ff941ecee69da9916d54097e080cad86dd08bf53833fec4aa4399f7124586223ec70e2c31e8c647be06df9e86a976f37901e9b134e775de2a0fd53d545c5f92236dbf5455859c138b7bb1112427049d29ed4f5dd5c43cffd3113c276d9bba910879e55efe817189fc239a204a9ebe738c0dd161d10d60a51e9dcc8c38861d41ff029ffd841086803320a17ebf5ff14b6cc2ac3dcf0ce2eea9af7ae23597233599c2321dd2b99e06d93f84989e75e30a388f47079c2af545d96f270e064a43a00c76bddf2f5be5089a69a138de844216148a1eb0b413f58d831d9b8967df297455e7538442388cdda12d157fb25896c6e2b47696c76b234a88bed4f09dfd64f2e4b77627ef03049030190fe271a5a853591ee9218a0c6b12cb3f02683d665b211dd1480cd44c9c0566ace7d751902babae14cc3821374bec774d54b4b4afd5d1811ede556a7a5ad02642a878d2d32380e7efb9082604f49d51495105f827d77945b5cfaf2f2980566b28ce3dfbf1bee2e077eb067bdfa4cc28f5d2211ca99a615e69118d9391e3feb9b13cb4a2fa9682718189ec612db889228aaa3f3345a091aeb11f41420240fbb47caf567646d9e7c762d3288f8bb2b1165cf049a191db5042fa9185fcd180b04d3007c376e0aa3d427d66d10918821f74736816044366463df7cb3ac94cea167cf1daf2d1842f130295e40bad672a22da9238ded69e241395f04d5e3c3875b8294faafbd3d90ed56ff3e01c5a0a3e349d761273143686aa26d408620c7d1a35ccc430a09e3f750d3256298c6068c0fdded270f308f79d2fcba591d723ac0cef703d8f0e7c051bae5b453abbadfab98bcc297ed4201b03ebc195c2e441cfd3b10c63c08868db36c320707ecd6a37593661d70a81f30e6db4a32f98e4fe6b950ace55923631c8f95138781fa2af78d8104fe39242f1fff6942e8e782dfa0d37c863caff9492f8e5cb70046d207c4630cc29c20e1ac105aef093261d8d335456961e552ab14d107cbe14e9de912f0e5d58d16b729270208204469f917af4e710123c3bc38a4b3f485f2926f058344db105b9239829441a2d8ababf04aea615c0e350846d9bc3b5faecdbeb450f38f615f119ad1b5dc748e88107ec2fae01f0915174feec37b3e7248ed2699d0a5fb2fc785f17d6275fbea867aad815acc8a6fd3ca4ea7357d197e5a30082ad5f35a9d894c0aebb206c6487163c9cc20442c040e6aab33d7b4b221e4ba4cbabd975836e353129559d8ddcb3c97876cdba360da0e0c1dd5b0cff7957a444027db985ebefb6154453a221076c997d3954b347f49308d2ee14d1676b75ab6ef365f3de54aaf398fd96b9040253813ba734829bc78a6db59e3f1c0ab4c878a72d6b8681157919130fd3171126994dcdcdcf68955ad64af8156702c92f7a715ce6f7ddfb70f60e80c92691efbfdebc8cae252108fb6c0010d303d9027d4a5e63413b5fb2316d32fb93c3ea52a2a7df50cc0058c76c58d73f5bb041d9fb9f3c3cda9bee0c0920079ce4f1ef8698ced664ce2e2b3b86027ae2b3bcbbae5bf7ea3693d9429cf94938dd3a2763d3f53937c46763ffee6579d018358bc69182b1c7158a09b18352ea618c11c45f07fe97cb65faca535f43237879ae3e0a31efd14679daf8fd2ce25eb8f32218fa20afc586a98fd908d3fd804cabbf56dcae272328011b252dfd83e5f0a5fdebc6acb04c5540255e1322de5fce9db5aa4cdccd74dde8990ae51cefd6c1edc1879971d3efb1f94dc41b2b23e9c9d89415b46189914a229b2f3e8b05ff78c68711385a00e9534dae6f79d15842aaec575e4ee0f098028bc74016cd3f8e93c6a0cb21a0b574ee63e367343ca9de28003d76e02d0ee2b8d622cfa3615d3628fd02499eb7bd8c1aa1f34edd9c2d059c6a7c7c978a5e4f60801e03e17c3a09793c5217f310a30db1965b8e328893cef20f4a899aa8d9fa28f7fe0a733813ed7466046776a874273ecfb57158483f4a588ad4f232adec5ba4ea651822780596de09fd54b1717bf04130619979a0e3d12ab7c35d64afb8099a1d21bc952653742f50c8e1c244d10374329cedd27fbefd37815a9b3112a4cb2fc587c4ebda381b2b01fced45cdf0b9ff8ca7d10b65ce42e728de183a82e369486a2e3345664e70674a5dac174d6616d90de8e472b62759df057119875483cfbfb103041751747f9cd12bb31e91caf79eb2db1168026a4707dc618f30", - "e45eef9561f3acb3672b4f38570256e8cc4d877e2998e72b022e33de8fc20f7320fe0882f2b53559e084923786e8205336a7d15f3fb88a41e7bd20767f2feaa02df2221fa7577988db0bbf61f3dfb429868688c53e130725d0279c505686f083", - "475a44cde0cc931edf9a44b0c1e0001766f09ade023dfe6b59a6af800e549b55", - "7812a320691ca8442767a51a", - "eaa577bd67fe79ce4586f43355c94528e306c1678946e4f7a907d2a8ee7f4281270502522119a8b09b6f05d864921cb515fddf6a1000fc2f67b52d0627998591e2acf5b6faf71c278e5754b2703662ce670dd049da8d6e280c2b84d6a9b29ce28980563c40e03381a49c54608b72faec9b272ef05cfa41957d9eaf3e944b22610c725d8efea90aaac6e782848d368ffc08784d7fe37ea1effbbbb34952def29fc511fb10a1282bb0b6334328e4d00529a44de3259b522553a07d524dc75f431cc9670127c15670c0df419826617cfb5ebdd8788d5f528a9eb1e61324eac5c1746f339aae2e2e2fae598642a389da671482128acf2d69814258d83de98f186468136868b729aa5f0874fef2ff2575a1f87439d64e049e4d0637e9c99ecb7275417af654541306615f30b75a6caaa563e4790dfb28fe9f0e7881ea2d885eefdba99efa7f878925ce7d33e86d888154a1b03189429fe20af8fa3a68d65ced9b690a709031121425cfcd7e1890ed9614f9dc3ecbd0e38c6c84e453e3204978ddc1ef8d7fc6cae28c61a472d8e089e23209f0c36e80c994af771e6505e72ba90e5543f6bad6dcd31fdd468b13533a0254e44797825764ac1f63747d8d6ca019ff16fa732068ee94be382c46b168050ba725379df31a98ab81ec8eb266a3c3f2e1cd95e5f12b3bc79b8b435e4d94098c6184631cec57e9d8913458889223a2a4541f34d2f9df380f34c3e541fc587f0a6cf08c82e99476060eb84709a292f4c7a8551bda3a9eb6735787dbb9d7f1e83937c2e0e49f2cf6e0ab0ad84c40fbafc3c7e61886a8629bea816972fa0afd0f617b6340b1af19e341875e97565c8eb0b25fcf68696ee674d2abdc29396bfd0f282543d2b72a239c6470f76d3b5bff6d1d064e6e2d06f9deef2aae8a259c034373efc820f9a2fdbce36cc27f35dd6386de3b49509d0c305757257f8674d958c580a09e768c0f6ef237416fd53c31511badb2e7cdfee636508482f01899e72052b46b5d844799cf94708520178cfec2b61c8980fa7dfaad8915b0b75ce6eb57ed4a01edcb4a35c1dfcdf8d60f3191bbcdfd522a0e321ea41c2cd87a303522d0f98b82dcbe53232ecbf0e2528de7e1be75569584bf2ec574687fde67ffe9827ebbe78f2e5bc4fb368f3c9b0f588c97f7a139bd82fe86eb605b8e29cee75d07b510da1b24fd62cd2fb366f1621e7dbf268b15937f7f7ea4acf6e615775a32c90733769996dd2c5aebe08ecba73e0bc4781d33971992b2764c1b08aa972859cb61b003406479423254a01ea85a348ef249d408157cc0962d1e24cd9c426e6e6a3784dec6fe935be1f6730b01e8683d97e21d8774b2e2655f85db7149e930a44524d4f86004cd687d8a528b6ceadd890707458cab62809110ee28f61a7277ed79dc41e573fd4a59fabf15393ed4c21bf4d5138ac843e80bbf5e1c39ac2d7f2147f35996eb51a9e835db63faaa196b8aef1823ad72523fbfcb35b5560582a48a25ab770e7528e4b3ef291e6f62f5fac916e2162b3b56304287e46839858daf322b0de083d1691d6bda44d66d085ef0d0ad364eebacdd0a43a4456035e58910d0b2dacce45b1c0beabc784f3620a3e4390c345df6117b86d4fc386523b7ceeaecc21233a2865ec6b63bffba6689fb3323402119db8f0665a4730b2e26ca6411db04f1bcc78ce6272159ed2665a286f1ad7758d6d90090a6fd320e697dafbdfef575077e282b825bd64a4dbcf92d1fc0c6f795154e8466ee4b318f2d44b6f81c52523ab68ff8367e01090c2623e00b4008e784049df873a35c29e0abcfae7acbf27236adba0b913d19a15b4af4996669aba4c656c317084347ca962ac8df15cd2f849f522016eb92de4de62944b917d88200ef9aa2def0d13e5f4ae09d2eb4a2d0800af1d704cb01975f6d59768a2b50e39e78116147fd6dcdfbc08354c1b4033bf6772fa127856a4072556a9f07bd7516d01ef41bcb519005c0a3b2a04400427ec033f1b52fe5fdc1aed8e2521fd0fff663e203defc39d7546281a98a502b8a470af16cc62a6581c9985d7ca516864b799fcc55a803ce80711484f6b81591d2402bb1499c95dfb1dee9846679c22853be87c84b4547138dc4fd46b4e79ad12773a5392540a595954112f0cb1d9be4d4eb3aaa4286b6c01520558d58587d9d7f0df3a0282011ce01c9c17111d10ad61b3675b1826c1ad37fc562bdde951b43f890555d6f74ac4fbdb9abbe8bc1e80bb6d52c13de8960a3ff8f65201265e82981dbe39e0d65cf3f1fb6c56e11f9786210383d0150a5e0cbbdb52ca8b2bc45c12fb572657380df369082685b3de9847d5014beaeef815d63e203cc911061eb53d89a312d187f9f02760bfa71083fb643f5d8c324c410070b7ebde250a185e7359837899bb1568a43fa3418f39c12feb03b148b924bfb98b99352b1fbad3f07ac8e4302f85d1fe9ee4bf7507972670ff8beca105cdeb037f1cc4f944d6ca869d0281653de5ee93a7362420fdba8b01a375ff08fe27873655953ec1c00f53613c6ab8b244e2fc1b6babdca5311428d06f57aa4882dc870165deff75ba877dd2a04d1799f26ebfac97a1be53a83ab77dbc2cd4aa45bd779f61b1283eae1a1866ec8a9c150dd0a4deceb2ddea1bc0f4206cd435600a8f190b999b952337d9eb2bdeb3aba2cb2e7000319056629dc1f00901f0880278509417223a3ea0919fcdcf12bff0771c7cc725bdca292068478ccb2e1f35ae8964e0601789a73e7e7c1769ba53f865910fc3d0085c922d7f7849d27b6e7503d521371351f9d7dfd5afc5df0effdf6ac49617fa228501ad72154a73e07781dc4b07765dbfa721d95cf1dc41e161cbd34fc7883a25e3ba6b03e504b2c3b98c8b12ff629b965c2aefc26d74faff7f784baf09c3fc38c487a9d1f5818261162f97e9dff70cf42eb5dbcd7bebb66d68f26d917ddf2a3efc0db1e3372b170b4cd18da507e44c467943f73648dba74db1053b53f989e481c3054bac22c6342fca2c26d30a859a1312e9c353bf921f68136de2b1589747bc765153927c31ebe749dcdff98b5da84c4b66085451b4c87fe1ba2142f98636bcb268c33f7b8c2b96a6525298814578377aa189dd73d5bb27ec5cd2110d8751c18a3110273df2595d4c3a00809bdeda70d86c4a8169b7010c9cdeabfbc3dd3266518226d0ade9bcc4825f18198c854de329fb8fe456dd3bf35d89bd9d2384f3f3282f6872351a18a2f852bf173ea4426de6d01b3ef4b4685aa82df7dc45b99617a8b8c8a0c65a2237b3eaae8267e1f6c453f485432529d973924a080f6a1cc2cc18f804f53209383ce3601ad9361afc331707be1c88b4370404cb7fe0bc538df04adc5c8d9ced94b4c474b19619a53dca3fddb434cac09ce10c0293fea04e8e1b19fd3ff3d174baa988d91cb604fadc59ac0b61f4f87bfd07eee20f7f3ffd96766dd6f3555cd48da7ecd71d2fef34ab082678bfc4dd007669b3fc7a937a5a46269baa7e4e4e43eff1b2b847ea70b6c6c23905d6fb2fbccd944251087ac00c35c2eedba30641797d36ef9d3cb1afc0e3e8930f5b605a847ee77106995bd44047294d04350194369c5a7bf246d1108e1d18d9a638be0c051f695ce86579db613cd8922e86c683c91800b9a34fe6339e0dd79472daa662f78f04f0151a3acd18f11faa4e1216222843b521fb998c8490ab8bab27fde36395b456501307d07b484b453b189fa339282a634af30fea99c9af8f877e61871fe743238b2cee6cb69dbd17d574b5106ebe4b0fde4ef42fab469a5ba7d62c23b67d857f1af6ac981c320db70cdbb6be41bbca60bb7a159ee1c85cb82e0a220064359c06c660b75de6b49839eea68c80283b75d9d627aa4500c0c0f21edafe4a2cf7ee079d5310479da06ba58b142614fe69cb236c51447d63db31cdff91485b46325c26d40dc6d608d46a5e2fb01df06064a022ddf6d5cce0147d5b2a5aba5f9fadc5e778010a924e00a13e21daeea2cd330f45536ef4f42c2e77be00bb53b3f9a93d3eb327dbf30baccee5d26849cfad654ff3ef2b035b78dd3ef42de3302e5514551a968a205b823dffb040ac9452ae3efb43219b02436d0761ca11470405510e534d56caeaacc40eaf9c47a39475adad266f5ddc813e71223800dd46fa7c02b078353f870049806ed7ba57b40b7c3c6272296667500c4b97dd2d7026698b6bc4985bc01be99e0097013a2632c71740888ffaf902a02bf644b38cf9a42528880d9dd142de967cc2ad3e1f1737f0cb8dc5c59c252496e8cfe4e53c82f4a28d9ba2bfa62b6415ba3e5e09040d7f3e3abfeba53e46575e8817ac5eca806ec8a84c7cf77c9fa86c9dd2940f5b96b25a92d4a8f894d4717c8f80a62a35a51d8511f1e822fd79e6fc27cc3f3097d9e3272447de6f223971657ded9e660ee4f8836359742ce7616fd0ca2de6656c71b212b34b8edc71ff36bc84ac4af58eb1adcba4b2c0cb31468dbd2c2b7ee6752981ee1d152c4e4a9b25b2ce87796820def34b662381806d2e4fc77f0b69d7a87de43d94d62a6a6526a7f8c588392890e96f9c51bb58b4f438eb5d197477ce9b160d1c898c89ab408b3c1d648be93b531a5bb4988592c5a8999ae3acbe586d947fe6dd507cddb92dff4974ae17ab99aad5aec9d07b96bd29489876f51afa67570e86b69321d9e565d86001514638403f86666dbf93f18e0a62bf65db333bb85a3ae12d8411aa3c2a423a29bacbbfeebb8a5bafd90436bfded16f992232360211086a3084d9fd1980dd96631820a2cf25c3ac5c19d164cf5ab9a852399491962100ca4fd640146b7ea5460b4fb9e46bf8d23d508a4eeb8a3e9fad8249ece3648c2ec7705a7414eb8e8d602549204cb437f589161fe40de1447d14efa4d738b775d0333526c845cef5ffcbaf5c957df1d8022176b56eeb198e7ad2dfc3d7ea46b125ed432cd04c77efc011a2dad8573345080d7c3cdf5cc160fbc86c4ee1959ee1b8258056b0f3d9343c22dbb2f7858c5f162f08cffdca1acc866aa68e5f1c00b74f66544e8a61e429335adf6f73e32fa87e48e1adf15bb6c7aeacc93713dbc31cdccc9b0e52f922842679494039c395cc1d95eb97ae4df3bb8aba9a2584d97a236f87cb22f00c0a078b045044a5c456e22b2b94a76a559de2672c880660f9785b76bcc2aaed780e05212415c6e73880ca110654ed155a1004af45d5f15ae8e5bfd4817440c5d3d5589eea2c6c344ca0d85d91460638b37f877ea4cbbed35ea75678ef2335a5922cc8541987cc256c8f58045028d33a1c4899cc32265c619ac782ff998a478996be6a0c5b102a664831b395a884f18e77885d860d6b236c52a8066d2ced25432bce79a31b23117f405ef4ebdf3517de98d288f8c3baf04b63b6817c46c14b646308e9f97170b7dbbf9d1a36480338d8eb7466df56feb6baef42cba75512954fd7e33961d247b7393726e46c6e94e156d5776a89ad3e288554470ca0bc4cf4d2d2b0c01ae4fcafcb65ccd6ead03df1d4d6577bb", - }, - { - "228eabb5ad8b4ff13b10d13b27372bc2152dff149859ba47d9c89b741d4a5340d8fff5858a4576c55547007d7e2b3f94583ea8f0976237712bd2e5481c3988f5387e7ac2c3f18718388795b7b2d44b0a13f3faaa55311b800301c9203a511572cf8f349280bbabb9424070f415bbfe28aef8d20329ee842cef4d4c299e619b6ef1cf00718aab2accec9ac00155be2903b6fb07dfe98b0bd8d8580176b99ce4aa6be51cf59046c17ce1817d363fa63af5a241d48bcce064a438651af102ff9c6de4b86374fe24f1dfa66e16e51550dbb791af425d8fa601c70c1bb90e1a557bfe0dde730b0364eba9d2018ee751699ee219e13fa8874070935b29a1767e1d748bfbe796fe4b81a71e823605d39fa4b5b885f4610c34d1a090fa4106785e7a035a629958ad1b00cb9d36d171d575268efa1bef064fc0a6dfbae8e532466035a0c2cef96fe9f93b872f0cf804811e927b39818189412868fb104e2d56ae62f77031f0df1ae91aa11826991ca7b8af22f130a47a72cce36ddc319b32dffd294f2e192e490249ea1a6f8437173ce6392d16dda888a98bf685bc91b89b8ee1eabdfb1806fd61f018d1744fe8b03521de4bff86d4a811ca2ecd5be668e9c752a6c26aacc0cc9dd89d112785c25ca6a0a7a5267b4e37457c04a0626c8a29be30ec28ddacf47a84918bab164d07bdedae62132ab04a6f2c4e108eba9ab878caa4a1a7509521d427ad7f3dfa86fae8345dfb5e0d46ce3a94dec84f7880c7422468ea74fe0b4825b8c762b34d5d9b82ba96e0c7dcae01718ccac0044a87476ff031e3ee3c2c13f5f375a841d243c38cd9a354b6525527de1fe7e36a6e2ad95e5bbc4c97e85f8cdcd5341da777e03451838807d5dd2eb4fd15976783c140e21cfc2eb3e58e40c16374de0aecbe3e3d41c64417a472cba18762080a2348ec3f441bf229a932ea0ca7c816938655d0c81b14dfbf86aa600d0c68172fb0046ef51f601ec89309d43ad1eacd583f9d205bb1ff1a37a97b44b5e35be4945f52897eb2a74645b01a7f82054cda44e9fa9f9af9bad1a235155718713bacd08d354f3fdd95858db0040fb551e9f93ae399d5dc53a67e88bcd5a02d104dfd9d824cdd5fe262ed9266fc47b7e640f2c9d9c7a62c6d24b429fa55560aa254a824a0858482e771144d6d5b05539cf71d75bec3a22be75655e1ababec4dff9472a019f6220067374dd49252282e4945a407084633ef9c88d14833bd95335107d36afdf56a642cb739bf0a61ed53a6915baed78e9d74166ebc492b517c7c594fe6564550bb7108f43012551e65fbafc0a9874e46fb64b5b7aee0082a5d617a43b8bf9473309c6761aebc7f13b72ed460b522a6b0875b67353c705f99d1d9dc899870fcc90c632aba1fa9ced6d7a2368dc4dd3d4b38a5807415e00de6b9ea70525a6c1b67d04521efeeefc6c591fc5256d990a1123522864a029430bb7ea00dd80d283fdd6d61cc5b509221e28f73386803d97a38fb0182fd95b3b91353c6eb60ef2b3d5c8c0ab8dc9cd9be2b4cf69450d00e88cb0f0bc9a4be82b71148a37237ceaf945ab94c365625f58171eb15c1bb244a87335550d813d28f241a3296520046e65aff3291555786d7c871ec8a2d10d4b44429041c3cd6ab60f0def742de3d28393c5aca92b150697ac15504ee66d8a2aa01a6c63d7c719d6d4f94af2ed1d8670e3231a0e481095e425e6231c43ad36e3b7a3478f6a61563f5aa13237beb8a891dbb29013c325f7f91c1b055fb83c436fdf8aef49ec457946e6ab7e955427373fd9c743acfd4b9609569b591ec79c7ea7276de103a35a4a8a05c91f59e04689ba1ddd570b18ed046f785d7e4ff9fce7115ac814fe126f781828877208ddfbb2ebc919e6d1f6eb417f38bfbf22ac9633f75e58e560b85d88d0e4fad9b2e68c9ebf9675819d50c30c8982bbbc2f41e02690390bf0e16979b24e648bf15b18800aaef58c3c465f38cfd1e47bf1266c17b69523b7868d2138cb95c4bce0dd3ceb7c2267b868b6e12888d5a489fc0091b295b56a1c328b54fe1119aaf1e6d7dd52fa450b52fbfc8b84c2200ebe209060b655cad288562786673121691809366af37b76567762d1fc24f1fad3128b43c8d10e9b6954b2efcbe40124fc0a5b670dd6dd544e30263a551825282aa06be3817a8eeacf31ca8b25cba011d60b78d3d2462810764e4acb566ff371005f5481c9d36c991527143af2c44cc8cfc59c920bb4a281f2ed4d494d30ba4d900edf59e23be2f763072255cb6f1e8b24ab1d305fbfb2429cff8bda303617c034e71a17230d0e860420dbcf9fea4ab48557e4d50797179496936ec6c97686fe6d9115809e14069244d251d4bc9c8931e47e06ec051e709ba1df526b55d959b37a6f3408833aaac80cfc9cb99915eb7d83e26998f0da2492b986fe0f5047b2cab6e6d33a117df21e6a8ec7f394a3712885dab176a4d6095e5cf75dbd3f0077e5e74b1ff8b902072380cf172562884de852ff5f07c55856224fb3df8eb44764ab9284944b86ab6f176a863cdd0e7ab5616a14692f6cbf41bc63113b27689fc2fb145736aaf2a5b26d2bef3a2a59ef8bb3f3e4d360a4251d0736482e9ed7e189fc48c0973b6649988228c2ac72b23826a61cfa06b11f13c8555be6e433d87e20113eb74c94f0e51719a7b38c59eba300089d06b9bc2a72017668e5aa3153ca4282718f1762642e7c1be1f865cd9b65c6387c8fe496f1e60d5acbb78c2f71cea1f35dc955b1e7d1cdc9ca339765995d9e05dd729cdf58aa2a1451b633c374e5b6c2af1c8486ee4250a875e80e1f359c15130eb1e2575c0c7badb2af61378527fa24347ebb12c10bbb36e3c94619556b2c641d0ebb691b2706cdd667f55b8fff8fb46e3ac72f3682661a4bac2391075ff5145eb07d69d77437adec2d096c1c89208ab3e7a9ea6a0ff4a5bc1846b3683bd7c6ec4520c3c95861a5856b0191e4221c9819c67273c66729728f6035e79c0dae8842df4c0c27ada1ad18b34efcd55b94ef120762e87e8c5afdec80d5788e83f0d1533cdd7aea8f27f33266e007b274f6d48c59bcfad607e8b298be2b17322be88558c60033452826778f167f318b660607bfb2f285cadb385399636acb8f5350d819511b5e7931c5f8483529d3ab3fdb5ae2dde0ada918f1327c6c0dfbbf5ed3c8afef171910dd0169022b3cad5b08084dd5e8eb8ef1ecb17e48bf69f80e3db0ae1cc7b73d94b89696e3c3443ecb4c7ca12568201744d1858d90ff759f2d264d49edf47772bd0e0990c14dcf8c8a4c2dafa44dc6e92f4c66b03bdc4f68f28ca2d0811a433e184cced99a8e5614ca83c46ec18b47e0c7ae91037ae06c6d6d0f3dee19711c21cddafb5869416d23c5219296acda7774891877f3f8d46155d39f43ed10500ede3afa26943b83b800b54a9752250ec6ae173e920002f365d692a9b3a2f9b27124ac97b8e81b70e8c0bb7022d07ee97e962810962b03fc019695b5399f77aab414327cfc5dedd51e99453179c42ae85a42f8e06e0cec6f937224dd019c77c5a0ba32ad08107216a9c758138b730bd5b5f4b613f192839514a8621634d9dbd5840e728c1ef4a2c8bbfadc376dd80d13dcb327ce55ab536a43b570789f5c5e135ac0af79b54232613d0e989ae695aeb358c671ae71d508b58a793e19c58c3d204cdc9a021ecc634bcb0bd6a1917554ea3bd688adab8163260a914fc01d7ce05a497a5c5836cf9401cb6aa35cd008470bdecfb97a511c905badd01bbb4d0c05867661debd2162beeccd52399d5a70a929405293916f33ed0d03f8b850f4bdd77b1fb6283118d71de629577383c81cad086f4099ce7476cb787f73c96431a0df4156f7826fce9045f7e7c97bbfd618b845595203cdc8df4638430fac74a07bc5f773486731d8ad29c06695704cbe2882077a85d543551b7ba81b181ccb93d2b3071b1a38f3c762b42df8246aa64cecbdc772830ac79e766fa99e8c65225f28297a32526df9b51227bd368253737f013ae18435a912bc18cc4a95216ce449865e8bd8bc759dce9d4af52f9e789eafa37023e91946952202dfb7243cab7db2f9f98bb66f19750c547a2bf2e2ba92862ab66f33fcf465ffc41d23f0b891a3b28b3f68ea48dde6ad4802902abd22b0d7d9101bd61471c5d88ee9d9477b7cf9f6ac52e0f520c79278da22938745446f1e647ae478ecba416b941aa31f979d0633efe72910bebb8988de1d0013616f31c5da163eb6c07022649ac57422627a5642618f53103adc9918f9992c5b085e10d2744f9934bfbb994a710d6cd387c325e94278f97d5582864f1bb29a1400aaf674ea8fb99a3b42e4ac50418fd804a5b1471eaac4642d4aa338fd3d5d0dd84372b2c32c5cfe7f319acf731a9787b048cedee3833300dde639cb1386c8fbca4bae8d67fb7bd72d1696a0212e27e166e6b04a79e34b47c98502ed0bdbd8d61777537f72df569fe5ed30071b57e8724e98ccb88c07f0458cf32298cefb6ed672b255e581ac756789b57e950d57174bffd3f47bdbe4b168e7e3f1a6df508d4202d327947facfbf9526a9e5fc1a5abb179902d4584deae6cb2900391e080d3f3540b87c3a873ccfaee5b4aaff0e6516a867ea00b4d5e680fee6b91defc65c240614a1409bdd0f49c2c4f3c1d258d77abfc17a749660f49547adb236730e5a7a22fbbabdd8ca079a8efa5b605332db12f455868ab67a1ffd27d1339bdf8d150189cfbf6199c6fc27c05788138a63267eb8ac086e27286b4ef99ee9d92cfedab5ce9916675f128f206a1733f47a597232067aa12da20c7b9cab6575d7634f8c31e9a29948b528681f3f9c13b9f585ebfbff8c28a299a43e4409b31b6c02a79eeb493734fe5f9c1d9e3830572eb54229b5cf525768f695acff48c76b4a6e0936b7406ab69f06d33d3f04946db9d7966ea6e8c50ede5abadda28149edef5223a6938d5c32933070d234043feddbd65c81be218f9d7c497a1ecac30bb9162e60a9bbbcdb4fec4b212050610e2b376aadf58b3c9207860d2650d0310ae6606a8f1b266b6a13b68c3306ed413224abdf19371bac3ea1b964f28996fc70f666ff118c6a7c9f2108d327f5145919c03832f754de35f5979ae72130e39126499037d6fbb3751cbb4843b05d9dc91dd5fc1429da491f72e3069313ea243933b47109af247fcbe0c70f9024ac5a41815655ab309fcaa282d03596ba59cfee0e40f7bd657689453e98d562442fa4c585f970b6983a581b0b8eb1c5e780b3f5c1abb326213c6b5fd440c2187066ddf55f4eabf88804139392c45979440c6f05b7222bd95e963832d7fa4a4760273cc075e8b8feeccb917e8feaf7d3f766d9ae880487e69bc01872ba62b91b8af5dbffdd93fdc95e8f47ed793fc070a5991f2e9ea61439662dab218f643c1959171937aa160008a548f51f87b58f2c4fae5aed556f26bb9cd1dc2b3518458e2f5ec5d974c6e11a0ed639958cc8c1db771cc8cc8bee8727bf6452f47c9782acf548856a0e67841c3dbdb1c98572a4fc8e6cc8195a504019b4930d302a90dc20d8628ae6c90e0206cbb3d05025744db4e115cd3b650e5519a1624acbf226ebca8875b05183b2584e65289f8b9cec3f7d010cb9671a0e80bb70ca8763f1722d79e8decb6b9023baf64b5981e745c06546cc1e", - "ade72c2ea29cf829ffe99c2d63840b2eef9b51a9919c02128347d2e88e9f063b86326928cf6252ce4beefbae7206dc61a22d0b33c90d464d551835e3b73c1e3d6e88663deab80c35a607e4180ec079b0ee84e3b7922904e7423acaf976e837", - "43348cf32211d7daa300de8a4218543c8e3c7373ad10950765c39760f80b733c", - "e4709d225a552e90fb357413", - "562050bfb40451f27b1181c389508550a0f46b53d14ca73143da9dae3d3d2b466e9618db39e3219675d2b6eadded7dd9c741d7c9bf3c5619a521189607acbcf6b3964d469d966fa134444aa06d80749c873f0f976e0c5efc5be8d00a2729f03eda6a7b8630575df8b3a19388ff88daf0d00bb3e7c35a525ded90a4511ce815fe6c8904406cf72d7bfa14ca533566f7b54268835285c5402e22a63f98b5d90c86dae0a76d65eacc1ba85b3f5a1499d5f3432dd5455fab9e8bfbd266e99283c2bddf9b556410956b2f061603d1fc91194766f90da841699ba7da3d53ed5abdd8e98034f8fe734446d92b458a731aa4c578552ec1ac5d1baaccc4153a67b48a290602d5f955d61a08436b27cfb0786a80afef76e1266310a42d90feeb3bcc40ae5c4506432dcc92f7e5758ceaf277255401f5c5f4b10df93a249e38edd9effe7bacdf7fecc451d3b2cea77c9bab0403450c41929775b8c0ace46f6928f4d9cf3adf86832d298ea32b236d3201464e2ff506ef01da0e1e389e26e2b3ddc553b369b48d1aa5dd43edd5cab065e276aeff72a4c43206063fc7eea3bcc783ba2221f5b615a7a43a75cecda6bca5aa159e9208bf66af61e2e465c2daee630c4c62077ea6ef0e8b4b4e272d4e93a5f5284f9da463e1a60f815a8a31698ecdc09dff2b62f00e37aea5fd4b07a110cef27e12466c1814d3b10017cb9b8e12f2f38f10cbe31296de2570d5662b16639fcdc05db81e0d48178d055ef873501148d00903ec771400fa4873c5579dc3265028f531538f6dab1e5607a15c8b90cbfa4835107cba6f453bbdc71d08c7e423f58b44be38a9c8a610469f2551ee6177edf639cde35fe8e02f76b7ed106d691a876a4fda3b42d8ace3e0d3d4e026206c5d7d4d56fdda9dcd30fd7b74217fab3c617903f1aeffb8363443ed128af94c391810e327704d6f655e57dece97658d41e074029823850ddf7c5937af41c64465046d8544bba65c691ac69121bd272107f7eef8cfdb6a25da5da16d1033cede09129d51f6abfe63905a6fba9a64d7832fa35825447150595a60163af848eea878fb31a5fb97b1859efbfcc8586eebce8cfe64386461a9b88aa5efc1db43c64dfd5d4a45aa74803fd178f9e16a3f59acfb6e13a564d645cedd73890d0a82fb6dffeef527694a7cf2a89aed9750c3675a67505bff77de8d046087bd39a85c90aedb085e99baf04c7e3bf92e350b332da1b8af85550a00d68904ca426da61add864496d6ff442bb0b848e9aa463bb0c2085cff1a83a47d6f702bd184cfb5c139752754c8978d27b58d364bd88722b9097ee3a6ae28eabb14ca7c31e40461101e92448dbbc63b55cfe56efd078d0058c5e6146c73bcd949c4b3ec9f881b9a5f7b41ca83301261e0c674f2d35d96761baa00ce0675c082bf73dc52dc726a3e605067569a372d2bb47fc8fe1e74f00078ce6f352a6d9d97fd2834670ba3a45aa6751eafc7ed6694e1e07542860c8ea516f296ee901a3ee16b00b40419c74bf6db12c7230325e85a918f412bc2f6469c1a13a5aa77f028e327749efd05b91053f49d9f1edf49aa552c58c68257233a168db60ac55b4086ddaea275b078869cda7b69493c4b371b4e9c8361357a7ac7d3d3bbb464c960addfa8df2b208b21b090d540c440241598212d33273203d484e0930e22469c2a8e866579a4a2b3db8f8344dbf8baa1b97be0c4d976f6aaf14cc09ec52630139b894b2b6f4dad3a205a7b286253f1522b1d6e43bfa37beaf06f831c6f0945cefb2593b9b298da13b0d910582086c5d7e256ed4067bfb476dbe01bcddb437d46ba716d6ace2ff9912c8e460ad33ab3d8f97b7b08dd4ba9e01968d1949ff85b4b9d5b8da291fc0f90ab1eab1d246f67d76092b7a37528ceb388dd76f8a8f0aabb7490f02a2c8bc6498cb26350d859c466dd611bf0ceb81a8b7899c67742c22697ccee21c4963acb003d15c1a2078112bab05595917584e417db3872a0ff0a29138bbca7314449b19827525340370d7e48fdf9f7c6b4a280e78d00775a291081a5e78e7a00ff915015dd5af5f0a45690baba8b1b503bf85f326c23136f4424be4a559aed03fbc81400ac27a33dadb2155d1704950d98043dcd86df1eee78f3f266c4d14deb8126708f74b59aa15e8b497c6a52924a473f999aaf0abd3d148fee8503a1568efec7bfb0bd463402f563e4019cc9c9e1eb498aa54dcb659f43b86df0a34de4e51ec558bbbade3d69511d3fea2baf44f67e85ada7398d7f72ecadcd9e981f82b0743ed74bd33088ba4cbc85b0c99dc5382c599706dd2d51aa9f470c25a98e7e8248dec216a155495630662bf6ba0b7a4baa2cdad30e9ce3e1a65e3c23d69d5f946606ee8504dd70830aa5a8ddd84f10e064695469727d2efeb46186c9d3b7a170057636f05b9ec4c2de7d935fba504a1e7eddf7a5a95226b253b0b9eccec976ca3c57599850db40c27a51ae755c1f30d392467cb74e5c8235861d11d0f8461b0e1d84f5718d64ea92da62f4de184a6499dba473e82b3d197305de0e494f118a263237c7b4c0652327977edb427ccded35552c00a5804b9557ccf2bca2484d9da2c33f6c1bbf2c666ea10b4644a21e3905e5c4eb417ac3572e783428d23dd7222e75c356b99e8183d033034e29e618c90e66ec2f1e9fca47d82c1cffda8ad14c96045159d9437e91ecef41d24cff89009ff57e18c1a422860aa9cd31dd2a85b07422c72a5decc614a9742e62a4988f394421b6918e51c2412d749bb53b1e8fed7b2ef0873ffe14fa77bc366bbd5fa1432be465f5e25266c6c12b55df1f19b1a491acfc5c9019f122c422243d751d8eaa8ff721397915171556e999b34425f7d3ad6f6c3323b8133b4618c65ac16cb5941edc979472734bdccafc73c08939c0b1e306ae3015faa9cfa09ed6560269a1dc54c2c046a12a178144f4381f7b6fd3fd2d28f778d444d9f7a0dae00ea96c6969b78ef326a962d23275f1518f0e6a2469440612f3710b53538fe99a6179471be8c5b2d682ab3e9a5126e41ed6de000cd9e92fec3974e0f4cb2d2245d03d6ee80d6a793b16efa829d75c796f34d4e918250f457703559bb48ff78f0896be1bda403b7f1fd6a319d68478ff70d88238f2b8afc7d20e51757bb9db3bffb35a8040fc0db913c4f03d48619af7fd24cb8986b3e139058be3cc253b3de9b3bb3f8dab7b8818638279b2e6a0c29cfe16fa7250d3c74362ffa07e2977cf562140fe28afba8f61d81f7c73bdd4a2faddb00752bb049d0a57d05c6475c7387e6716ee31974169930c9fd830cef138659cf56f2212de185186c3d683fc6b7fd36e7821f69d0de041a569765066dc4a1934870a7b80f174e8f9e484942e62404a42b21658467873865ef94fc262c231527f39e82dfec91215947b99567daf75c6a28073ee4e67d4307e4b35b46f85433abd9812f35438b34598ff3b6dbd60b60747ad64565391df45ac80b272d0141702ab807fa27c6a6ba2f42c3facfae0c773940cb2943bb1353b41298258bc0d07542b69483e17ab9ce709e4160b80a0968dae9af8fc7c0324c753ca4a11a6df32dfa79a87b445c988154bb3c503e6884cf6d8f5e062a16b4ff230fbda109a6127d35e3bf2b29bfd3b18ba275af773b1981d603300035e046ef023d51874aa105d136bfcc9c7323bd0513a6b2b397ffea71afb7a8d4695411d86164917099eef504f6cff3c5cefb88f23f56c4ae3e2b09a3f353fa55630f45f06c29e8912e8c3c4f493f25eda781680585580595bba43dca9cfd400d9eaf5081d2c6697da59e012dfd0b875336b88fe16609c2e9876737b9afb868ed52417ed0c6b359d582d585ff82d98edd4e63c6b65cf43d4f69eee2af4819157b8a433966953862d1ff2c6d0cba382644a1b0033ddb7be3d1fa9a204042d7b821b293bd659dca980c108ad1db740800b9bd2fc1a163f9b4066f7604f160a7910bd947cb48ce6c81e680fc6571ff0cd12a3ded9c8cd560970ca5cb480a70a8322d5072edcd257604eba8dcf55f9ec97ea2b14fdcc72fbf615131836fb14e42b8d7171d0a06d2fb3caec2e0759e86b0d8f21e312d9211ed7fe0b48669934ffb892baf1db9aa457c07820723e5446420334bf6479f2099e01ef8adf273adfdd9ed0b741931284515d69c211cc2efead8339e450b13be71b35c36c1f00c2b8ed0cfa9792e422912e14b5b1455ef6abdbbec0035480c6cb69d21321d12ee19d528dd48f43b142cf0502eae5304ce52b7fb827552db9ab885b93e83d56a33346135aef11b7e48efca7cd52e2499a7edab0bd0562862187ff4599b2446bff11c37181092fbb05d0e05220ca6bc37f529d6599e8c29acb9f25616c27df291d4fb07430188e6470df7002f73cfe5fe6907dab0b4f90bb58130fe90241c29c6063a22c9f45d032b282eb92c93736692bd5cbde2a17552e942b595b08e6ba0c91a03b9079e9117fbba8f26ce6c5d0500c69bb6e22e3562a50baece49109c2d42b6714250665afd0f0a7e951182012f21aef4b917cd434d9ca22661437608e32666497516be34652500def6c28ef8f56f2273de5416142ce9606faf7df92ab779ed6aa74cb99bb1bfe758ffd344e1d31f479807326d1a7b98f6811e275545d69198707b0fbf027dc6a5e4815d62ef191535569a452c27c4e25ecf139df949d70dd5935bddc04f33b2f0bcf5073c51fc51c15067963a20569b5659f0e7413b347d6d5ee38a92b7e6e656c199149f07ebafe5281db6b1b2ecd9e0384b6f5a8e27ecea9a0249c61b16564964054f5f9621471a98de132e102f518c1419829e2ae2c8c5fffd1270f0a0b33a383437b0034783d50bce8bd7420c059d16364eecbd55b6ac8df8a70382734d8127f4f5895cc9e508b13c000ea053ab59b87ee639745418ffc566ceebad37a17b842d24d3423ac3f086142c622eceaadc4106f8c90c5dae1f52f407fa0bf1e6bf9385cbcbf3b61006ea3b1e66b693ce704577ca9598587f41e05d36d1de424e0e51290a5f2e2f99f1960c0253a046a49b19eef249ca2dda2af1e8dd78411088eff1e9c23c31bd20abd4fc9e7eab19500827d202f76270fe9f90e95309516343e0fca48e5a12182e91c78ebf2cdd4644629afdc90bbccb77546cd765135910ba1cd8a3e3c00fa77e585865e898bfecd06c01a0a4d7be483801099c61941c4967154af5620b171b426cf229df59d2944ba50754140c3f305c16956953be376fe6e7cf31a2e9c276bb09cc24c4b86b2b26f039b0d8511853adcb7feb8502e7641a34e3242bf2c538006bb1983345ec3cacbf219ef10efc1681d52e6e1b1c60bb556b6b8a63d1d1f6869077841d1b816f3165a35833e33d39a8c6e62a2f7c482c395768fc6a0e3cbfc7a1a6d64da53adad66c8016f76eaa73df1b8ef83012ecbe75c92a8e39b48169433f951a539b28a034d5fdd00639a5e3e17ef14dafe869064d130c90c68be4d5ceddabed1bc94e97e2cdf7313f780cd6e175a9e3eba3eaed896fe464073fcf07ae7b5bd41d58c3160f66ac95a76fdaa7a8cbaebb304fe3c8f03cef927a1182ac2281c3b32378813b24bb99e42cb0774331ad78b74d46b8ce48bbf4ef8431a82d4240edfd61b910c38570ba0bfbd4a41665117e6d5f5a97908462e62d0b76160d06aa56cc6e17aaf4607ba8263648f2a0077e306c25486f5f39a75", - }, - { - "2f6210063cb3071b3d49339185c2cef8357b08ca826d8d1acd852540c16540f1c850f70404fe1f414853d3cd15a1c64a1cce149e3ca1b80926de4ae8438ad90bdad010decf2f201782f3e49794aae1b079f54eb59607bebde508a528927e346d4e444b1d736b34f65e198df2c36fa23c64f1f1fbf8b0b8ddb85d054bdb39b8297d0347f16f7be7cd9474c058e36294485386434b36fb28ee582e393367f15ce5f5a3d6641fbd31b331f10b1554a05da726a0f35c9b1b4af3498426b17582966a266cce452900f85af1046f45a4ccedca6ce02607fb70fa45f420f66aa38cd4c9f8a30e21a3067b940aebdaaeb7c77824a79e2ba20f26e70346dd6de96942b261e5c08288c7fe1cd1e9f680a0bdf8c46497f007a616eea95ccc17463559f8973eb919c68017e25100d9d1a196ca65fb615502076bf0b0c8bcc70ef22006895ebfa2243fba0791bae0625b762cc1718d1673948264454a200c58122d5e9b8b1e3eb05df8b7eeb297510e0d7dcf7f0be5f29f6756e4b177f109891e6825a9866359e35b10d20da7231bb5a0ea34abd0264b377d2fe9f420f27d3e5aa2e8e00541c46052966ef9b989ae5974e2054409507b867f647aa057f7deb19ac6929f0856005aec6e53a5f702fe6be403afed532b73d38fed73e6e551987f182a1e20801e7a6c8ccd1184cf0fefb4139fa166ca15395902ac40e7fed8661602853682a3b0ee307dffb44d0ea3012142a2880cb7c166ba6ea6a16c7e0882808db8023068f060e5ef1432fdb8331ffad6a7078d686d47d613e94291f1c4117e7c13aee4030fcaf223fcefdb300ed606b5dd931e4adbf45dc437eeb5fbff337812e15c15f026071423f6ef5305c559baa2ecd8ecc7cd498b043740ff3673774855d45d45fa64591d5b4970600ec91ab1b6f39d7dc0e709c41e49c355bd3b9d120ffb57095fb127bafa971a086135b917285794e83e9dac5ce76fb1a4aa4fb6b94a0dc3a9beea64b8817ec1e2b37af9dbd18ec30f2b6f6c12df1db6896c6c43b67a066038f0c4f17142b254f62c4dd1fedb950d07047919e397d06d033cb0bab6b61aefa6dee01720926b16beb9e8bc947dca9b8143b565da85d2dec182987838b267de9047f5b0d961c7971aaf54ae2c1e4aad61ff123c84e41a4566b2bd9e64247cf46b72a444d36bdced1a309b464ee5f4afe406eb68eb05ae51b76bf01b906c0ffbdeb440b11f1c9e3a4c3a809a1f7449047b356c663a1ab7f286a70d16141d11f2d151a4f06d422ab97cab539c1f9da09ad20c000c27b8fead5f0cc37329d466fa260aea934c154dc9c0a065df3d057a0f117a1c38321ae59226a8054f7d6b49a3753436c249838b0924f0e861f5627106dd8d3f0fa724a1cecda71d4a1267ed889b234ae4a7d5edcbc5d52cba389dc0152aff24d224c6a0f16dbd3b7f242807bf4b51a3f22690bdeb66eaa59e8766b3b265d784899d247a0ae1b58a06dd91c529e3691b09f9d9f55fc39afd4a00b0fc668880ef25a46a30861fba8cfd4b51262eba4138b41a2d13ddc71128c8c1242e49a51d6f49879fcfa7595ba4a4adcad3670b0b1b26382f03ff402bc70150f54bf513ba3e9a590e41b269e55616af297ebb3499e16cc8e46c0810330a602955553c0f93d668a1181a0bfd7021ad9a9f68ce39493b012da70a3dda149d0369f23f788616e0272efa322b6a54d804f340d32c890e2eb7b538f48f4c9293b584d22d0ae80d321607644271b81a76ac5b49d8e457069b0c3e909b8a222e3fa6016cb1e979e300804742f2005c68acb7b1849c088b3714c9c7af54e9de9390df0041c87924c8fa6b0aec6b6754171e059cba0d27f221f0b9d044a3aed8338dd8745651981e4b0329376f908b86ae9022699d495bbe3a148f7eb73d56eacb2e5e2180f63fcbfa680369f88eefa71f1210bc5b6b7b957f0a1437476a2112998033197673e470dbe7d9d476c97b95db8b5136f6cccc75d6e0ac1e4ace30e34e64fcc4d7e135b2c80e863ed701d3b28c25e982f1b5f8c895a4e6df7216c3c07abf8551a0ba0469c88aa7a08c7b5218a03b9b91f0935985373f65aa56286ad0e7ef2288a926f172b098123c136455b3a0f04590839e16bade7b6434a3cf048abe2612684c03dafd9cec39af508e63f07ea881014697bc24122058b5ef5d3fae835216d055f0cdf1dc06a12c95041d13ac9e15f235d11747f16ffce1cc3b8f508da520e395edd471f3759d8879ba9c2558b1188d822fd4739ed0546b0ce3bb9988db7c1dc8518ebbc62c4440e6e0653f917dcc13aca1864b71dbb67dbe7117474c936414e4f3cfab1f13eb05f3504484ce11977ab21ec523f97ba1b7ecb8fe384b634c30561cdb752fc67a2316bfa7e4d03f5f825d24a556a0460d8cfe0cc54a6f117ac52d553a5d1bb48031732716436675c5c3996b1939b127c6b0338bfaa29c7467cac9a127e455a715c9ce2b0c35a0d2f83a3d1273ee39399e6cc4980e610c752bd51652b96bf9cf34c7fa41fc9b13f5d55007483e4082ddac4675baa7822fd257452411b01de0e5e5da26e17539d64a89dd93c71d15a4c95b1a83039cb2d5f3f7fa04a817e48dfcbfb3de34ecb47f7592123caf27e17982fbfc8597af5b8aa6558f4e6c73db69328e47677afbe6ef8df82c3d1f0db6a108b2279f61822908d7b856432c32ac5ec0f3c53befab2a7ca356b9c2636f646b228b0a830d348be4ece2271814d477d4c73c0fb6e83a338b90ec4ef45cb25f7e3d6a014a9e8d2e8a6f55a383291a57f15667a73ea1daca31c7182523ca85a107efa2518d2f7f179ed4ba21fed479ef2be09669817133b2384bd85b155dfc1c4c9e6dd9ceecf06cc1ab8ebf7f07aeaae7441468b5471aed93f248a84f44c59be33274b11f651de010ab9f8fb24d3a99914e0147951c34280e7dd15ec196f9a4c86e55e7d373c7e31e6672d1b3ac6a45fa6c8c9088c0b8963d89f4ff1feea3e85cf9cf2f6c97128afd845bb131c6f62b3282bbba42745080fd457f1d3322058f1bd4be876bd01269546d1a853310b165926c1fd4e07054deb5d3fbe8f6007711d435994005aba95918c3df4cd390b165fcd139dd418ebbf661b6de57b655698a8a02ca8fad73e8c536c7110957c36e5494a831d536eccb97a2a9ef58fe58e2885aad170720ffcc57c7de601ea1cf723577a30aad8fd544317e33897c8b6c04e5191bec391ab990e197f10038c0726d371677e4a54c28d7ca5c6046e7cc4acde565b91f7f72af6109a0614160d3ae97e9257b8f71a4663b00c681e793cbb478306e97b0e04711eae7722b4845dadf2fff5bbe71ff24acffea2ee67df99bf62a098ddae9d4ebd3bc5dff04a2d9e3d1d83e8f493db3f63c9e24231b1dbe1147c79f21b0730c842f6983330c5c17dd34556d7e932074cfbe98f2dab5b0ebfd778a1e28fe2bac2d942f61a08b787ebfcdeb3d600bb130ca4922a4ffd38ffc4a1a1a7218451e45da4da67ad81ef898ece3d54cef877cb9d09f5dcf72eccbbc06e62f1e2b4d64059b0a807329780b155ce1614b68de04387d6108ef4dd3ab54b9da72e528d6eac3e16a360ae3421f3f23808a8b5e8ec3dbefcbca3c9f76905850033d78d9283bba9272c475b4e3b4d7643e62c2cc259ebbf168f890de88e82f8b26a7654ee31fe055e45609c70ae02b4942ee15678cd158f4c9e8d351d102ddf7a942458c6125e1457bea0d86ca38cf0c26e474b2b5cca77eb57ad0867cad7d25efc2b250e79396637ea3e948dbb855029cc9b452955bd04ad5a0d0514d4d773c0f298df7bc235a3ac64383a1fbd8a397a158e936b3ba81895a51daa89f51e4ae7a71a53794ff715a42f4fc3dcc9fd56df7bea4ab782534d3760e7b15605fc4dad16911656983c0ab77bce9445bbeb1537c55fef57a32c8f1404306a0a2ca7b73348cd99d0f9948875531cbb0ef7c036cd201614c33293d746c44140e0e8f82421c5bdf2bf428b249597df949fafdb5ccfe1618323f56a6ab9abab9a84a3beb6696ca918af244d34cc1cd95bbca4a87c860a0fa9ff6a04a905b0338a53f230bd5ee9c60e0e0332ca200c15dca0be5936b858d0a7b2e540b8958432e9767396c55d5cc35b60062580023b5cb2f9a5e9a1feba59a19f9a5a251e9d0e8500955a5df21da95213ced2260a2ed8f3d4b295c36cef750c89cf21985c302d5cc577aab7855409a912dbcf1d0a9800df4aa692a78607a40fd6d5a82305c58fcb3d2a82b27e8c5b91681aae62a2bf31ed55c494dbdc38eba30e83c6044945df76705228eede8470369f2e9941ddcb2f239fb3ff6bfcdb0efb5ec50f981adf0e8b213769ffbbea364b08cf8cd69abbfa2a6fe9865cc48558134a57bb5526b9d047e14a379d246de82d3d64f3c810ede280c768dd8bee25af287d5a8d94045ddbf5981382bc716ad9aedfcd66e0ab496172a24efe80649db8e1e83675fc8451e22c6564d8d6dfb285af7fec802b35f19dd8308c68952a11770247fcfecc4ed0e8a445c17b1573f0b4e3ed350f13269ceb572943fc435563459d5044699f1542335b03be6077af156b8c5a6a9f71078ad820cec4642427a9b187ee1b17036d5a5e6108cee8a7d444342eaec3afa64e77c71d3c2b3153d4e2dbb30df2b66b4d14cc45d3a4eda7e911d697e5763e23ee05311a20626df55549b8533c6ebe79737abf472f9cff08bec590943bdeb819d3f923f45b81f9a0cba1f3f800a261842d10cb4cbdba456c7fe5f0abb4a8b58891d97cfd6b669e2708922f1934809d51a1589e5f12e3bb82c9ac3e7e44e3f6e6cd63d428da624fd2f46eec38ff798a90d228efe50c9b67c63796347c8a2b53478f27605999a03c8e1f18b70e92419f646a7f49670aa12d324751aec17d0208fc296955b3098241189af8172d39a6819415cafb107c1842b369f174d6f37dd31cd728dfd0ab10f93609006342b6e4d6ccbfd1ed2bea2fdf5411442b04b1fe218916f159b20242f80b535b4e0a3024c6eff6a40bd0d3db24e51f5ff9c14e1b4a650ca4170ee70f0a3a5a58349a7d0b7a63af86347351696870b95231f76d8c5c6a20736907726341dcbb76672871d18c2157c094b929fd29d34f5bcaacd82706f89a60000cd341d98eb830b73a12335b69f3e0131ded3ce12c98bbd960d2d0696d40696a13ab43925374498d868cd8f070c9039ea6407fc2d92b9c39fe7c935bbcfcc5c0980952fb7dac79042951f49a1af828b138a87401c4104bc28cdf1e39dbd3fa63dd4d5f5ae9d85f032a43ad353bc5e6746e5a76326ab1f4e79103116ce70bc0b459200f32f85e461291e347dda92e421778b849e37a3ecb0b31ec6818e828dd3148dc74313aba43cc9d8b9a36a9dc4e229488060eb6c109f8ad6201958adec6d3bb3b04e5e558a272d44cb98e18f7a0ad8fa6ac3667a62f150830aa930f6166baac6b9081b44304988fbe1698a5b746255de26bb5988aca90bb6523cad68a7572f615f4aa58f932d8a749615cf0a7724e99de042268ceb31433e6df0a61547d576a6201b36b348c028ded5f7e94d1cd2eafc141088ff42cb3dafbbe4c402b93aa9d955df8d9d9fb57c75ac65c2c837acc44bbd4d4aff1888aed46c73d625ad7fff035e8ca0fe411c73ed8135b6b8e17a039ec74e9de0d64cb442bf8a676c0a666f68f21066332cd921ae0ed766f0516a8e19b82cf98e78add0373737a3419e13aa902310c44feae5fdf8bc64e80dce772686a31f141bcce452041bf545b908ef4a2b000e7beaf378e2afdccbbcaa42e330e5024400cf2852d3444718", - "fd5008477b0855f6f2486fd4f74b9fb4f6e19726c6996bc66893183bd76054d5b05c1c2b64722256ba912ab2dcca66d2abfdf972966438fff7513acfb18ea461eac08c4e32aea4ed3fcf9f1c9905ee4402e7b6984bef974340d212f160b6524b76de99a98d3e96cc0d35e8a63ad7ea3cbea1d40a906c4dd03e5fc19e1513e9", - "390a5e75c9ff4ad38fb6205ff47f209294337c1f25ff54a3c01eee8e1e220257", - "8bf183347ec1ca4bceff3374", - "19fa2641519e21293094e9d767ee1237f9e0715dc57172794867c3bbe2cb647f9b28a8d3f85c0ff557b91bad66f5ea16e0107757b0277fdd3ca05bf47c19bcb92a958a57e8c142a51af29bddb20af84377b6db65f77494e0dc4d2634a776b3a5d777319873bc0dacbbd4b9ebccfae849fa7e9769cdf54660ecca0d5cf4fa5190713726d54d02b3a3f21857125b8a808c0ca2f99d11dc430ed5113ee49ff8f00bcc08f0370dd510e8100e1285659a7b2c7457a6049f2af7786c4db1471ce5bd164e11c7a2165e83e03a135ae2b3429f82f677de044a067e99e0bda2d65a7270d629c00e1d528212d3aeb2896e58ee5145a93ed06a9c00705ad5c5988d3a192304c1d17661d45257c5d16799ef70771964435b12e3b2ee9d5b467c3b1992f45b7a59871b40d8daa1c280747ecb3d170257b91df1f549ce6d66455b5b6f60b7c6e95c92a67e20cffe8599ceb183de53f1dedfe19bae836447af8e053ba419660e0912cad064d6125b9e978e8d0d5f28f8a4e43ca3cdf2d4c0e9a11221d8184e9eb6c90761b0beac82d0d22793279aedb1c7db3632adbee323bc3bbde4801152694831abf5676979af26af7dcbadfba1cad1306b635840cbca76c558b37db0803b4c12befa27d16f21506b07ade4a838d6beba1816eb29ed5e3c4f132a752fc747bd9ba879156e87e6c1584e911da9f796e1fa4a055e427272559e4bd6d0f54b8257100f8a55d84c27b702bb1fe2f995425c85fd48b0a0610db5b39f7a5031407a12dae9f508b21b1378f14952d1beb2dea81d016b2d9b7f1a67b814569b69c0e619adea02a8683242d63a11d3317d060e5b4d85df5ad73127541ba5314715d187990735aa81f438f8b94070ec506ba536274d98b766c1694e54367891a602b99e370425b47a70b819277a249fa429c5bbd0530267f987e6022f25030c30f3baeedc0d13c95f3d5e4b2b87465d179a3a23b9f9e76a42ceea55226ce072f9488392f40621289124d786109d2498e74fb37e2ef466fe8bf3016d96e34204c32978775765aa80461cac48518157f86d59f6187bad4ee62fba1ddbe166b29452f4a59af1e057300c353440644a8e40ae8171ea028be2fa315804abf518847c7945e8228b7766cfdb08d3a3116b59aab8e94b6d8c8c9ef442c2dc7f923bc2cd3e5c663baca7dded976bf191fe36da16948c89c385fe71434f4aa5dd15fe0e925d2459e3b068b9d82a9cc8b8f9786bd9f5fef9baaaf2d67027d9bfd58bb2c58ec7c746b747ab62f9242e4b53ed14d6fc75f5280eca0de23717c97a2293826e19cc8eb47f946421516c349dc4ba49225b91e4e868874bdebd373700df1f3792aaa140597e58b88f90e163397dbad3941705b53d754e3e0c9003df836a7fb8d23f40362fcb5f3947a4281b24240be4ee89aa8e917b194f94345eeca224df0adc15f22a617b6427f29410bc48ea3f92216163785723efc36301d23ed52780c6fd7924bcfaa03269b13582b7c7ea9c0e4a451f38a469fbdb585dcb7c81452da77945ebe27eb26ff6e8c7b2decea289aac5af74746dc257c9bea44a0847f02c4f586e1d76f39d5bf952355a0875f177a666d1d354ad86ce5ec0aba2c2b20cab050eaffd31095395132f5af80a2d2d53b77bda49f948bbb37bdf31c8a690476488e14e542ff6841e7fbfc2eb84795696562d079dc1612274b6dff362567084f793f0bc2dd8de23392d05aeeeeac6991c9f74387153a4b7da94790375e336a00c8293bad0fcef2dd1880e7094e2e53f738247c860780ebe308410ca02ae409ae720e841f48c9677acc6e7d4ccd18c219c400f8b7e1257f692e09eaef96802b17a1cb7d93eb81d3bfcbc7af4cdf05b98e22556b3d1a8b56d6d83bb5f5724696f8f329839dbe477483ec3c09fa2e0628faeba1bf285c224bea3f6cdc7bbd768133c6ef1da14f248cc3b819b196588811b073a7291817bd1e89c65760435d8d17cbf9423744a92143e0f956e2977b39c54fdead5a57f3a04a0facca01bbf44d3b1fb9c4fa83ae1046985e3f26aa0a437999004dd8adc04c5111759849f919b93558dbc559173a23b069b59f800096d9fcf077c7640f59170bb9a6fffe64778bac272365d27ea62aa956559e90edd3f6393cc8775597bcf7d91990ab9511973d948324a27261059e93f4b5dd2f70caf12e1a08e0493cb05588618764391f355379578cf94dd33e616136eea997ec11c0d4ff064ff51a767e5558433a2e3a9a74c232d8e187f47b8cca010709eb9fea0dac8f1ea53bf18822e154ecd929c83b0eac366e30fffbd5ba6a46d734f58d26e7f5df538e18b3d827884aa857a680823131bcf30a76f1a555bcabb17b02b53aefad96fe76f7312da69719434c580d3ff1bcdcd594e6375935003d5d732cc577e11ea2abb1d04259f50aed4c3af9866e8c4a52a09809046ee330f05c4403acbc297a9416c5208fadb31ed4eb7a3b01b87bf08c75cf44c2b0df84df30872d021d6567ea649859268e5e1b5b6405e1b41e350a32c1af13722959c17c01b52c42241313b26b25995a1c89a53e248488724d280647226195746901929501df36d1e94815d7fe6c4ca2731f3181293217f71b9d7f59c2474856972013924ae4796db4cbd22d8905a6043c959941ca6b556c53d1688c439036c715d33a47a7dfc2fe40e53424c5093020d2e85e4b04aa4c704ea5bfe5a2384878da38319c59d41d66b6add2a443d9ea11edd8d18fa41004251653857733b388b453943eb33df93dcd5d549757fa2967ef0f9a5105836c48826c47fcccb2d9bc349032b286962136b848632bdcf186a08cbeaa52d195efcfc3a440bac154971d11ff4994f293b14fb8c3214ebe7ab8b3d0f2fe0b03ed7b145fafd7730a173e3cc1847f0cdf2cf629f5ea81a07bef716b1a67dd9e3b7a52fea1aaa7a393f53b5bdb5988df78a57a9dad19a8253316835acab8a6b9a9fb42d97bf29b2443322f46de386fd82bd3453ed68e2370c6eac4497b1bde7b42d569c452f377bd38bd50fa5a6792ef5c9ec6c647001149b86fedb3e2f18d4271e9cc4801aa16ecddb31b6a795fecabc613bfbc8e4f5636d71e74595c841fd11b6a6bc7f169317c1added56b82a71fc36d774bb4d661685363e9da5fd2e1f357006dc5b5bbf8b42ee3f869e75a541586fba558a8f490d641b78c27368b9b4c2db046354e9358ae9140e91cd95ebeffc6c0d2676a3ff4ab10d463bf32bed97023a80a79df191ab9858c43537a03072a17c30b1bd99efbd361590ed6b7d5b0ec4e2326fa35904ab9a48596f44491cbbc0112890f9386ed04dec30126be359a05e99b2b77fa2c8f6b7460a6cd590d71c73b2a1b23312ff89306b6e41c76ddc0a099bfa79498e36ae5cf0c560b8854dff32d2b690ce0ac4aabfa723ac6f2e97ad1083235196b464ad67fdd649aec01695d55c8b4bb198f30630ca635aa5a1915f3718341bcfd8b522f764015fa5479004d28eceea7fe67df7ee24a97a9708d528b89589f1899f13242a0d00f7464c3cdfce213699340e754533b934f4a8410224e111f31cf8e54d7b5e90cd8c68bf96edbc8d183894deefdf4fcc1a83162a3f6341dcd9a9aecf171c0df28257a68b1af1b67c54c43c3cff27fed89cc64bc46e23a49ec74a9efbab7981d9f0a018247441e4f0f5b5f68ba9325582f92de4cca4a5f878a0c5c387581e64324e3246d8f3205c838a29f1abeea24446e496421f0e742d411adb55f70272ae4a992e825a3d327e44b8b3762b25aa451d07eb4eac0322b431fa676462632daba2aba7bdeee1b438f051d21d4b1897e2ac2f95ee7c23f9996a805de8fffb3b30b855cd6c5b84c011accf4bf94d304d944079f04b5cadf8fcd6751c22a0f9165ab98998b2d89e6514641f1f3b91b8c0bf057d69c3d893fc4e041e06a2229e2ee58082ffb58cb920972ede58483287d0ace94c1becef26a410b93e4ff402e61dcc574b790d49679f18f4e2004f8b7cc357faba34a80e56821bb5b883d1a8b49c6605002152f270bbc36bc79095644e29ab08cc988deda765d67e4fff12b726d5de135ff9d0cbd9d5f9d440e548836633b93a38330d638468b59a32642da3375cdf70b062d14b46a78569c24a706e179baa2058dcae5c61fb6cadd9e015b017f26e9dbe3e6366cf5f1ec839aa3bbb21dd6c9b8e910245fa95b09b7d6cbf08a4c6c84bef257a70389be962dad14d97a893c128b73bf6580689e540d004f21edf8403f36b1ad7c9a2e83ffceb141af59700c316c8c1e3347187f24819c2ff0c9f9a2360dce354f3374374eab1643d2d8831310a8e3ca6768200ea7759822b82f7027cd450479fcc7f6d04802b15735a137ad489f1e1ee78434a253a9dd16684ad58fc91960cde6754f82e8b38edd5e798fdbbbf8fc2e2380a4e21dd94f8c1c063b18f29d8cd8d89f65deac5640799d4ca2caa29c1e72ad8bc417490d11e4051d94956fbc74289857e5f8e9e87b9a2d83074a994de0b10bc7782f6650cfbdb8c835c81cd88bdce5f04ca939b3c5cd010d4dc5d51224fcacbca9851694b8bf55b22dead859d023eee5a7ad3436a912c3fc0284456d5d72ea5f1afa8545c856676ac2dd9a057028bd3ca0f50e7070fa74152f13997c95c1834c3e67504f1a4165d2b49a96919b88f72caed60f56ca7ab5a3204fb12ad3592c725fdebb048732fc189c7dfed185c6c184a626e07d7356860d00389862d5b9701eaa4e5f7889e6db0f54633369b8d26805c08471de8fc3f8fa1fb0b0711d9e015add5373f7f8b64abaddbac3399c756244b1b07c579d33e4967e5e0cf16de29cb8a7efad07ff9039ca305772a6e45c76bd9b77e24949556766a8b8425c5e595efb431bde4ee222f9eb3fc2d002a1e2d14db2b23135266c942eea33bffd30eb0218405373240e0cd3040436ca895093bf056fd001c00ba59d90502042e6e6c0167105051628895c8164c9ab959400898309cabafdef12be53604fa57df44e0a90a81bd63c331291a93bffefe809e80db0679568f6e94e0d8e2edec0087c35bcb3c4f4725e6013bcf197156cd9d90612423348123383e45c14d27d8833f56ddb04083c069fd6e282fe69c940840f5f747dfb72ad72fd8cf9f3ded15c9e2f4727fd60b4f40e95dbe77a89b47dde7d5326942600554905d9dade9d145ab6da802643f2081678392609c2fdd1b79dd8caec137cbed315374c6f05c0758070f3bb17e23d81ccc39c6aa89913897e487fde889c5aacd422278f8571641cc4f0a93d9768aef9e45d6bd187d1ba637ce0fbd3c573d6778cf7bf5188c00dcdf13be3fd599143952b376220283e34e014e83b214bd5f64eb0ecb098ae8bef883949907cc36e22ece60b893b963cfa73d120513e285aaf70ce5add34edbdac60b3aa7b385b90e339058fb9b3cf984b06f79788016035c5ce490f2de7995b98a8c1c9c80f29603ae2b7fc41886663163e604275cb085f8453b27f4d795b9bad19ade2f98a1c99b43a7581bd991e5d0e5e1a6e713acc522ba9fe8302658a9782558e35436e714ac6bc85ad1d3cd008f24106901fa954f5fefb61210d6f8dc9ff35c480f1d14e59c0e501917a31ee9d00c6bdb06a00af5a8b08c3928cc5f37476248223627cb77eaf0e96213cb0a13e97d3fe9b9814d462690e8d68d02655a32fc271ee73db4f88a33386ea88a5857e15a28d9b3e3a96f00c7cd85aa53f9282ab8c8ca6d6a8afed43aa87fe7fc1ad59b0f0db2dd25c20af96e8c282c19fc883ef01a4060398926a1c82f07bcd3bc314580d7636b623b7bad8ddba05850291a6344df0f346fa4a321a85ee3e9c", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b", - "0942e506c433afcda3847f2dad", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff4b4086fbbd1b6cec23e45481eac5a25d", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314", - "d3d934f75ea0f210a8f6059401", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f685eb7731024bbf6794c3f4c7c5a1cf925", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314", - "d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525cf08f5e9e25e5360aad2b2d085fa54d835e8d466826498d9a8877565705a8a3f62802944de7ca5894e5759d351adac869580ec17e485f18c0c66f17cc07cbb", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68a12d0f1cc99e132db9014100d9668c91", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9b", - "bc", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32d4d00a24b826b6efb16013ef54cbe170", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525cf08f5e9e25e5360aad2b2d085fa54d835e8d466826498d9a8877565705a8a3f62802944de7ca5894e5759d351adac869580ec17e485f18c0c66f17cc0", - "7cbb22fce466da610b63af62bc83b4692f3affaf271693ac071fb86d11342d", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32c38dbb37d04f8272e741da2802c54a9d9aaf8ecf38b36fc9ad0079523f6a4abd5281a22697a3180bc02662a7c13ee23599d18e5c48300dbb831509df4c172f53e524b3c15124a87ac73e5028cde6c94d8d", - }, - { - "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525", - "", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32c38dbb370a9bbc3187cc260ddac991f94ce4f0d5", - }, - { - "0fb826ddb2eb5e708de203d0438be12cf708d635ebdbae56278be09077009586b9bc646ba7c2db35a5de05e86ae71461efea96dac64430edcf117d461113cccacf303576f310ab98efb180599894ba877e50614494923163a3afa9b4c2757f91a6b40799c5b331b464b10dfc45c783c317e408ab76390e19e8b7ceaa2c4d3bd201436bc6f69c7a5a4d8756924ed95665bd5e1034971e4d80d51b2a", - "026866d46aa940309fdcabf92a324fbc", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "30f05cf8189bb7b8b4f560e746e228c4cc7e86e8f2fa66e1afe212d1855db51070acd5eb34ce80b2e223957df50fde4c2531d97fc9e573725e7a5e47f0dfc4da1942620320bb2deaf8b17937bae4218d04db8e76f6efe84a117292159507c9f8a09fb2c17921d7762510dbf1dac7b62b1bd7572e3e2cf008d01c445c7fa78833235034281ae180e051451c6a64f22ca9708634bd0d604e4cfcd971b13742efa5b6363e662a875daccb2b00", - }, - { - "c7d4f8790e4c47d4daecbddf5939973521ddbf3b832e564afc66f03b5583c41c58bd956609dc3ae3c8f7c2213059575236168dba44e3044049f47c9e7840bbd0fd5036062d70e9f567ac1797056ee93c8476f6c959fa09a3ee854166c6fc36c34d6cca7adcb36f435f86db65f4c4a1793b974294914b377fd179e697751c5ac289243c65d8aca93732849c27483da083d4e218652d4fe5fec8cb953ee7f00070143dd6ece97f241b03c0424bfee2cfd2c4e738f2361df0ffe8863dcf763d408a7a167763959b7f985bc1e359a4b22c6899645ad0814bcf69d10c38474978d1c48e482723e3a6bb3f689f980c51c474eb28cfbba91a8a12eb964b32dfc303a3524ccb752f71316ed9d007e521cb5a0cf429c79d4351b02ee7fb60c7be636a10af3586dfa7b74d80875466a820c0b514e97cb12cce615ab55cba7c1b1de72bcd1cb1acc368f944ef4eaa986e6a4d8253c9337f9795d94df193c90cb0b0387dcde929905223d441717ed9dfe826613bf094ba872993d41b269e27d74e5f541b497eac9ba180dc12ffb6f1e7dc5223cce6dd541071282b97c6526e15b2c330fb41dc96e25d72f45c28e543053766d11d44252db54e584c14abbb295d7e5a58bf36eea1936095ef897a338eb1995fcedd85fc92d354dfe7ff9a115c186bb4d7a1a27835030d248c87571a38f17906cefe0261d15740b9", - "56", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "f89c825ca43cae1ce3fbdee85c505edd1aabefe69a0f9efd740f027aa7dee48a91ad24e69ad061648f0a52b4afb19d7ffccdc21f4b4247dfd89f5f9f998cb3c02b226173fedb6f8770aceef9271e7236fefd19fb3b87d08a5c587ac7918e80aa4b477f22602189811e270d686bc4949137a41d11d95ec96ee9d26c6126f6e923ab37638b34d1538d2e46d6df6216da4f193a3cecb731e632e109ced643056a1673059355d2d1314df35ded8364efed7de490201090a6f2d1751748585f64d26041637ba3723cbc4b60e226f10a19699d223075bc1f27d82e7f560c0db630ea670b3f8a70a8950894af4d1c7b3f674a3fa00d19ee4cc2b6174c1d259a297424bf2c3943a29a16a9830ce11abaa79cd2eb77b53a02b365b1838e7bfd5ae1bd044ffc885c61c6b2186a357e8b8f732b7ab96517969aeb70c7b493bbaca9462a61815a3c6135c748bf9c8487ac0631807aa69243fa09cd3b8efb63f8d4e090ad30b6c2f08bf4e82f191cedfa5cbe2b42268d67ecd105918181e44fc9879efd642d20be84e6f74717e03fb94fcbaa6ed3b307431d2a9384b8a2b3e5825ffce8d99af48f177e43bb4272226d8a5edd37d53807f768feb9e0733b437a1d0f84779ab68a1804e92a5eecca56364f0fa6dca152203b249fdc8fbd950fdc37c1887596308a90ba3a5751c7096bfbd1cb177bb17847b33c4379b43938a67674459cd9a06e3017ccac5b", - }, - { - "135a28170fe89066da7bcff3a9ccc1b27dfe942a6f47b23835ef746aaea63dc10066d90f4e697528e5451b8e11dd408fdbd4b94a1c6c82515bf7bc099df9cb9d5fa4acad0d22d5f267f18078cec107a995c1f3b12d7603886dbf910ab85ca7180053c50e759b00dc8c81555a425c03d71df6894a6c8cd2d94b64e303c08a1bc1dee1cf537ccf300850856292e1656aff5bf349c87f1ca1ca8085cd400fe901edcad04146a0714ef0f6b083d715edd670e020385f3cda29bc5ff6fc6edffe5ca9ce9def6e0e3d5f04ede2db02cfb2", - "73afd2ab0e0e8537cae42dc6530dc4afb6934ca6", - "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e", - "129039b5572e8a7a8131f76a", - "2c125232a59879aee36cacc4aca5085a4688c4f776667a8fbd86862b5cfb1d57c976688fdd652eafa2b88b1b8e358aa2110ff6ef13cdc1ceca9c9f087c35c38d89d6fbd8de89538070f17916ecb19ca3ef4a1c834f0bdaa1df62aaabef2e117106787056c909e61ecd208357dd5c363f11c5d6cf24992cc873cf69f59360a820fcf290bd90b2cab24c47286acb4e1033962b6d41e562a206a94796a8ab1c6b8bade804ff9bdf5ba6062d2c1f8fe0f4dfc05720bd9a612b92c26789f9f6a7ce43f5e8e3aee99a9cd7d6c11eaa611983c36935b0dda57d898a60a0ab7c4b54", - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/codereview.cfg b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/codereview.cfg deleted file mode 100644 index 3f8b14b64e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1.go deleted file mode 100644 index ce11b72a10..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1.go +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright 2017 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 cryptobyte - -import ( - encoding_asn1 "encoding/asn1" - "fmt" - "math/big" - "reflect" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1" -) - -// This file contains ASN.1-related methods for String and Builder. - -// Builder - -// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1Int64(v int64) { - b.addASN1Signed(asn1.INTEGER, v) -} - -// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the -// given tag. -func (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) { - b.addASN1Signed(tag, v) -} - -// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION. -func (b *Builder) AddASN1Enum(v int64) { - b.addASN1Signed(asn1.ENUM, v) -} - -func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) { - b.AddASN1(tag, func(c *Builder) { - length := 1 - for i := v; i >= 0x80 || i < -0x80; i >>= 8 { - length++ - } - - for ; length > 0; length-- { - i := v >> uint((length-1)*8) & 0xff - c.AddUint8(uint8(i)) - } - }) -} - -// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1Uint64(v uint64) { - b.AddASN1(asn1.INTEGER, func(c *Builder) { - length := 1 - for i := v; i >= 0x80; i >>= 8 { - length++ - } - - for ; length > 0; length-- { - i := v >> uint((length-1)*8) & 0xff - c.AddUint8(uint8(i)) - } - }) -} - -// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1BigInt(n *big.Int) { - if b.err != nil { - return - } - - b.AddASN1(asn1.INTEGER, func(c *Builder) { - if n.Sign() < 0 { - // A negative number has to be converted to two's-complement form. So we - // invert and subtract 1. If the most-significant-bit isn't set then - // we'll need to pad the beginning with 0xff in order to keep the number - // negative. - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bytes := nMinus1.Bytes() - for i := range bytes { - bytes[i] ^= 0xff - } - if bytes[0]&0x80 == 0 { - c.add(0xff) - } - c.add(bytes...) - } else if n.Sign() == 0 { - c.add(0) - } else { - bytes := n.Bytes() - if bytes[0]&0x80 != 0 { - c.add(0) - } - c.add(bytes...) - } - }) -} - -// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING. -func (b *Builder) AddASN1OctetString(bytes []byte) { - b.AddASN1(asn1.OCTET_STRING, func(c *Builder) { - c.AddBytes(bytes) - }) -} - -const generalizedTimeFormatStr = "20060102150405Z0700" - -// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME. -func (b *Builder) AddASN1GeneralizedTime(t time.Time) { - if t.Year() < 0 || t.Year() > 9999 { - b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t) - return - } - b.AddASN1(asn1.GeneralizedTime, func(c *Builder) { - c.AddBytes([]byte(t.Format(generalizedTimeFormatStr))) - }) -} - -// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not -// support BIT STRINGs that are not a whole number of bytes. -func (b *Builder) AddASN1BitString(data []byte) { - b.AddASN1(asn1.BIT_STRING, func(b *Builder) { - b.AddUint8(0) - b.AddBytes(data) - }) -} - -func (b *Builder) addBase128Int(n int64) { - var length int - if n == 0 { - length = 1 - } else { - for i := n; i > 0; i >>= 7 { - length++ - } - } - - for i := length - 1; i >= 0; i-- { - o := byte(n >> uint(i*7)) - o &= 0x7f - if i != 0 { - o |= 0x80 - } - - b.add(o) - } -} - -func isValidOID(oid encoding_asn1.ObjectIdentifier) bool { - if len(oid) < 2 { - return false - } - - if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) { - return false - } - - for _, v := range oid { - if v < 0 { - return false - } - } - - return true -} - -func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) { - b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) { - if !isValidOID(oid) { - b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid) - return - } - - b.addBase128Int(int64(oid[0])*40 + int64(oid[1])) - for _, v := range oid[2:] { - b.addBase128Int(int64(v)) - } - }) -} - -func (b *Builder) AddASN1Boolean(v bool) { - b.AddASN1(asn1.BOOLEAN, func(b *Builder) { - if v { - b.AddUint8(0xff) - } else { - b.AddUint8(0) - } - }) -} - -func (b *Builder) AddASN1NULL() { - b.add(uint8(asn1.NULL), 0) -} - -// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if -// successful or records an error if one occurred. -func (b *Builder) MarshalASN1(v interface{}) { - // NOTE(martinkr): This is somewhat of a hack to allow propagation of - // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a - // value embedded into a struct, its tag information is lost. - if b.err != nil { - return - } - bytes, err := encoding_asn1.Marshal(v) - if err != nil { - b.err = err - return - } - b.AddBytes(bytes) -} - -// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag. -// Tags greater than 30 are not supported and result in an error (i.e. -// low-tag-number form only). The child builder passed to the -// BuilderContinuation can be used to build the content of the ASN.1 object. -func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) { - if b.err != nil { - return - } - // Identifiers with the low five bits set indicate high-tag-number format - // (two or more octets), which we don't support. - if tag&0x1f == 0x1f { - b.err = fmt.Errorf("cryptobyte: high-tag number identifier octects not supported: 0x%x", tag) - return - } - b.AddUint8(uint8(tag)) - b.addLengthPrefixed(1, true, f) -} - -// String - -// ReadASN1Boolean decodes an ASN.1 INTEGER and converts it to a boolean -// representation into out and advances. It reports whether the read -// was successful. -func (s *String) ReadASN1Boolean(out *bool) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || len(bytes) != 1 { - return false - } - - switch bytes[0] { - case 0: - *out = false - case 0xff: - *out = true - default: - return false - } - - return true -} - -var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem() - -// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does -// not point to an integer or to a big.Int, it panics. It reports whether the -// read was successful. -func (s *String) ReadASN1Integer(out interface{}) bool { - if reflect.TypeOf(out).Kind() != reflect.Ptr { - panic("out is not a pointer") - } - switch reflect.ValueOf(out).Elem().Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - var i int64 - if !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) { - return false - } - reflect.ValueOf(out).Elem().SetInt(i) - return true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - var u uint64 - if !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) { - return false - } - reflect.ValueOf(out).Elem().SetUint(u) - return true - case reflect.Struct: - if reflect.TypeOf(out).Elem() == bigIntType { - return s.readASN1BigInt(out.(*big.Int)) - } - } - panic("out does not point to an integer type") -} - -func checkASN1Integer(bytes []byte) bool { - if len(bytes) == 0 { - // An INTEGER is encoded with at least one octet. - return false - } - if len(bytes) == 1 { - return true - } - if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 { - // Value is not minimally encoded. - return false - } - return true -} - -var bigOne = big.NewInt(1) - -func (s *String) readASN1BigInt(out *big.Int) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) { - return false - } - if bytes[0]&0x80 == 0x80 { - // Negative number. - neg := make([]byte, len(bytes)) - for i, b := range bytes { - neg[i] = ^b - } - out.SetBytes(neg) - out.Add(out, bigOne) - out.Neg(out) - } else { - out.SetBytes(bytes) - } - return true -} - -func (s *String) readASN1Int64(out *int64) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) { - return false - } - return true -} - -func asn1Signed(out *int64, n []byte) bool { - length := len(n) - if length > 8 { - return false - } - for i := 0; i < length; i++ { - *out <<= 8 - *out |= int64(n[i]) - } - // Shift up and down in order to sign extend the result. - *out <<= 64 - uint8(length)*8 - *out >>= 64 - uint8(length)*8 - return true -} - -func (s *String) readASN1Uint64(out *uint64) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) { - return false - } - return true -} - -func asn1Unsigned(out *uint64, n []byte) bool { - length := len(n) - if length > 9 || length == 9 && n[0] != 0 { - // Too large for uint64. - return false - } - if n[0]&0x80 != 0 { - // Negative number. - return false - } - for i := 0; i < length; i++ { - *out <<= 8 - *out |= uint64(n[i]) - } - return true -} - -// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out -// and advances. It reports whether the read was successful and resulted in a -// value that can be represented in an int64. -func (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool { - var bytes String - return s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes) -} - -// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports -// whether the read was successful. -func (s *String) ReadASN1Enum(out *int) bool { - var bytes String - var i int64 - if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) { - return false - } - if int64(int(i)) != i { - return false - } - *out = int(i) - return true -} - -func (s *String) readBase128Int(out *int) bool { - ret := 0 - for i := 0; len(*s) > 0; i++ { - if i == 4 { - return false - } - ret <<= 7 - b := s.read(1)[0] - ret |= int(b & 0x7f) - if b&0x80 == 0 { - *out = ret - return true - } - } - return false // truncated -} - -// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and -// advances. It reports whether the read was successful. -func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 { - return false - } - - // In the worst case, we get two elements from the first byte (which is - // encoded differently) and then every varint is a single byte long. - components := make([]int, len(bytes)+1) - - // The first varint is 40*value1 + value2: - // According to this packing, value1 can take the values 0, 1 and 2 only. - // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2, - // then there are no restrictions on value2. - var v int - if !bytes.readBase128Int(&v) { - return false - } - if v < 80 { - components[0] = v / 40 - components[1] = v % 40 - } else { - components[0] = 2 - components[1] = v - 80 - } - - i := 2 - for ; len(bytes) > 0; i++ { - if !bytes.readBase128Int(&v) { - return false - } - components[i] = v - } - *out = components[:i] - return true -} - -// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and -// advances. It reports whether the read was successful. -func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.GeneralizedTime) { - return false - } - t := string(bytes) - res, err := time.Parse(generalizedTimeFormatStr, t) - if err != nil { - return false - } - if serialized := res.Format(generalizedTimeFormatStr); serialized != t { - return false - } - *out = res - return true -} - -// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. -// It reports whether the read was successful. -func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 { - return false - } - - paddingBits := uint8(bytes[0]) - bytes = bytes[1:] - if paddingBits > 7 || - len(bytes) == 0 && paddingBits != 0 || - len(bytes) > 0 && bytes[len(bytes)-1]&(1< 4 || len(*s) < int(2+lenLen) { - return false - } - - lenBytes := String((*s)[2 : 2+lenLen]) - if !lenBytes.readUnsigned(&len32, int(lenLen)) { - return false - } - - // ITU-T X.690 section 10.1 (DER length forms) requires encoding the length - // with the minimum number of octets. - if len32 < 128 { - // Length should have used short-form encoding. - return false - } - if len32>>((lenLen-1)*8) == 0 { - // Leading octet is 0. Length should have been at least one byte shorter. - return false - } - - headerLen = 2 + uint32(lenLen) - if headerLen+len32 < len32 { - // Overflow. - return false - } - length = headerLen + len32 - } - - if uint32(int(length)) != length || !s.ReadBytes((*[]byte)(out), int(length)) { - return false - } - if skipHeader && !out.Skip(int(headerLen)) { - panic("cryptobyte: internal error") - } - - return true -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1/asn1.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1/asn1.go deleted file mode 100644 index 90ef6a241d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1/asn1.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2017 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 asn1 contains supporting types for parsing and building ASN.1 -// messages with the cryptobyte package. -package asn1 - -// Tag represents an ASN.1 identifier octet, consisting of a tag number -// (indicating a type) and class (such as context-specific or constructed). -// -// Methods in the cryptobyte package only support the low-tag-number form, i.e. -// a single identifier octet with bits 7-8 encoding the class and bits 1-6 -// encoding the tag number. -type Tag uint8 - -const ( - classConstructed = 0x20 - classContextSpecific = 0x80 -) - -// Constructed returns t with the constructed class bit set. -func (t Tag) Constructed() Tag { return t | classConstructed } - -// ContextSpecific returns t with the context-specific class bit set. -func (t Tag) ContextSpecific() Tag { return t | classContextSpecific } - -// The following is a list of standard tag and class combinations. -const ( - BOOLEAN = Tag(1) - INTEGER = Tag(2) - BIT_STRING = Tag(3) - OCTET_STRING = Tag(4) - NULL = Tag(5) - OBJECT_IDENTIFIER = Tag(6) - ENUM = Tag(10) - UTF8String = Tag(12) - SEQUENCE = Tag(16 | classConstructed) - SET = Tag(17 | classConstructed) - PrintableString = Tag(19) - T61String = Tag(20) - IA5String = Tag(22) - UTCTime = Tag(23) - GeneralizedTime = Tag(24) - GeneralString = Tag(27) -) diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1_test.go deleted file mode 100644 index a61dec833e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright 2017 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 cryptobyte - -import ( - "bytes" - encoding_asn1 "encoding/asn1" - "math/big" - "reflect" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1" -) - -type readASN1Test struct { - name string - in []byte - tag asn1.Tag - ok bool - out interface{} -} - -var readASN1TestData = []readASN1Test{ - {"valid", []byte{0x30, 2, 1, 2}, 0x30, true, []byte{1, 2}}, - {"truncated", []byte{0x30, 3, 1, 2}, 0x30, false, nil}, - {"zero length of length", []byte{0x30, 0x80}, 0x30, false, nil}, - {"invalid long form length", []byte{0x30, 0x81, 1, 1}, 0x30, false, nil}, - {"non-minimal length", append([]byte{0x30, 0x82, 0, 0x80}, make([]byte, 0x80)...), 0x30, false, nil}, - {"invalid tag", []byte{0xa1, 3, 0x4, 1, 1}, 31, false, nil}, - {"high tag", []byte{0x1f, 0x81, 0x80, 0x01, 2, 1, 2}, 0xff /* actually 0x4001, but tag is uint8 */, false, nil}, -} - -func TestReadASN1(t *testing.T) { - for _, test := range readASN1TestData { - t.Run(test.name, func(t *testing.T) { - var in, out String = test.in, nil - ok := in.ReadASN1(&out, test.tag) - if ok != test.ok || ok && !bytes.Equal(out, test.out.([]byte)) { - t.Errorf("in.ReadASN1() = %v, want %v; out = %v, want %v", ok, test.ok, out, test.out) - } - }) - } -} - -func TestReadASN1Optional(t *testing.T) { - var empty String - var present bool - ok := empty.ReadOptionalASN1(nil, &present, 0xa0) - if !ok || present { - t.Errorf("empty.ReadOptionalASN1() = %v, want true; present = %v want false", ok, present) - } - - var in, out String = []byte{0xa1, 3, 0x4, 1, 1}, nil - ok = in.ReadOptionalASN1(&out, &present, 0xa0) - if !ok || present { - t.Errorf("in.ReadOptionalASN1() = %v, want true, present = %v, want false", ok, present) - } - ok = in.ReadOptionalASN1(&out, &present, 0xa1) - wantBytes := []byte{4, 1, 1} - if !ok || !present || !bytes.Equal(out, wantBytes) { - t.Errorf("in.ReadOptionalASN1() = %v, want true; present = %v, want true; out = %v, want = %v", ok, present, out, wantBytes) - } -} - -var optionalOctetStringTestData = []struct { - readASN1Test - present bool -}{ - {readASN1Test{"empty", []byte{}, 0xa0, true, []byte{}}, false}, - {readASN1Test{"invalid", []byte{0xa1, 3, 0x4, 2, 1}, 0xa1, false, []byte{}}, true}, - {readASN1Test{"missing", []byte{0xa1, 3, 0x4, 1, 1}, 0xa0, true, []byte{}}, false}, - {readASN1Test{"present", []byte{0xa1, 3, 0x4, 1, 1}, 0xa1, true, []byte{1}}, true}, -} - -func TestReadASN1OptionalOctetString(t *testing.T) { - for _, test := range optionalOctetStringTestData { - t.Run(test.name, func(t *testing.T) { - in := String(test.in) - var out []byte - var present bool - ok := in.ReadOptionalASN1OctetString(&out, &present, test.tag) - if ok != test.ok || present != test.present || !bytes.Equal(out, test.out.([]byte)) { - t.Errorf("in.ReadOptionalASN1OctetString() = %v, want %v; present = %v want %v; out = %v, want %v", ok, test.ok, present, test.present, out, test.out) - } - }) - } -} - -const defaultInt = -1 - -var optionalIntTestData = []readASN1Test{ - {"empty", []byte{}, 0xa0, true, defaultInt}, - {"invalid", []byte{0xa1, 3, 0x2, 2, 127}, 0xa1, false, 0}, - {"missing", []byte{0xa1, 3, 0x2, 1, 127}, 0xa0, true, defaultInt}, - {"present", []byte{0xa1, 3, 0x2, 1, 42}, 0xa1, true, 42}, -} - -func TestReadASN1OptionalInteger(t *testing.T) { - for _, test := range optionalIntTestData { - t.Run(test.name, func(t *testing.T) { - in := String(test.in) - var out int - ok := in.ReadOptionalASN1Integer(&out, test.tag, defaultInt) - if ok != test.ok || ok && out != test.out.(int) { - t.Errorf("in.ReadOptionalASN1Integer() = %v, want %v; out = %v, want %v", ok, test.ok, out, test.out) - } - }) - } -} - -func TestReadASN1IntegerSigned(t *testing.T) { - testData64 := []struct { - in []byte - out int64 - }{ - {[]byte{2, 3, 128, 0, 0}, -0x800000}, - {[]byte{2, 2, 255, 0}, -256}, - {[]byte{2, 2, 255, 127}, -129}, - {[]byte{2, 1, 128}, -128}, - {[]byte{2, 1, 255}, -1}, - {[]byte{2, 1, 0}, 0}, - {[]byte{2, 1, 1}, 1}, - {[]byte{2, 1, 2}, 2}, - {[]byte{2, 1, 127}, 127}, - {[]byte{2, 2, 0, 128}, 128}, - {[]byte{2, 2, 1, 0}, 256}, - {[]byte{2, 4, 0, 128, 0, 0}, 0x800000}, - } - for i, test := range testData64 { - in := String(test.in) - var out int64 - ok := in.ReadASN1Integer(&out) - if !ok || out != test.out { - t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out, test.out) - } - } - - // Repeat the same cases, reading into a big.Int. - t.Run("big.Int", func(t *testing.T) { - for i, test := range testData64 { - in := String(test.in) - var out big.Int - ok := in.ReadASN1Integer(&out) - if !ok || out.Int64() != test.out { - t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out.Int64(), test.out) - } - } - }) - - // Repeat with the implicit-tagging functions - t.Run("WithTag", func(t *testing.T) { - for i, test := range testData64 { - tag := asn1.Tag((i * 3) % 32).ContextSpecific() - - testData := make([]byte, len(test.in)) - copy(testData, test.in) - - // Alter the tag of the test case. - testData[0] = uint8(tag) - - in := String(testData) - var out int64 - ok := in.ReadASN1Int64WithTag(&out, tag) - if !ok || out != test.out { - t.Errorf("#%d: in.ReadASN1Int64WithTag() = %v, want true; out = %d, want %d", i, ok, out, test.out) - } - - var b Builder - b.AddASN1Int64WithTag(test.out, tag) - result, err := b.Bytes() - - if err != nil { - t.Errorf("#%d: AddASN1Int64WithTag failed: %s", i, err) - continue - } - - if !bytes.Equal(result, testData) { - t.Errorf("#%d: AddASN1Int64WithTag: got %x, want %x", i, result, testData) - } - } - }) -} - -func TestReadASN1IntegerUnsigned(t *testing.T) { - testData := []struct { - in []byte - out uint64 - }{ - {[]byte{2, 1, 0}, 0}, - {[]byte{2, 1, 1}, 1}, - {[]byte{2, 1, 2}, 2}, - {[]byte{2, 1, 127}, 127}, - {[]byte{2, 2, 0, 128}, 128}, - {[]byte{2, 2, 1, 0}, 256}, - {[]byte{2, 4, 0, 128, 0, 0}, 0x800000}, - {[]byte{2, 8, 127, 255, 255, 255, 255, 255, 255, 255}, 0x7fffffffffffffff}, - {[]byte{2, 9, 0, 128, 0, 0, 0, 0, 0, 0, 0}, 0x8000000000000000}, - {[]byte{2, 9, 0, 255, 255, 255, 255, 255, 255, 255, 255}, 0xffffffffffffffff}, - } - for i, test := range testData { - in := String(test.in) - var out uint64 - ok := in.ReadASN1Integer(&out) - if !ok || out != test.out { - t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out, test.out) - } - } -} - -func TestReadASN1IntegerInvalid(t *testing.T) { - testData := []String{ - []byte{3, 1, 0}, // invalid tag - // truncated - []byte{2, 1}, - []byte{2, 2, 0}, - // not minimally encoded - []byte{2, 2, 0, 1}, - []byte{2, 2, 0xff, 0xff}, - } - - for i, test := range testData { - var out int64 - if test.ReadASN1Integer(&out) { - t.Errorf("#%d: in.ReadASN1Integer() = true, want false (out = %d)", i, out) - } - } -} - -func TestASN1ObjectIdentifier(t *testing.T) { - testData := []struct { - in []byte - ok bool - out []int - }{ - {[]byte{}, false, []int{}}, - {[]byte{6, 0}, false, []int{}}, - {[]byte{5, 1, 85}, false, []int{2, 5}}, - {[]byte{6, 1, 85}, true, []int{2, 5}}, - {[]byte{6, 2, 85, 0x02}, true, []int{2, 5, 2}}, - {[]byte{6, 4, 85, 0x02, 0xc0, 0x00}, true, []int{2, 5, 2, 0x2000}}, - {[]byte{6, 3, 0x81, 0x34, 0x03}, true, []int{2, 100, 3}}, - {[]byte{6, 7, 85, 0x02, 0xc0, 0x80, 0x80, 0x80, 0x80}, false, []int{}}, - } - - for i, test := range testData { - in := String(test.in) - var out encoding_asn1.ObjectIdentifier - ok := in.ReadASN1ObjectIdentifier(&out) - if ok != test.ok || ok && !out.Equal(test.out) { - t.Errorf("#%d: in.ReadASN1ObjectIdentifier() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out) - continue - } - - var b Builder - b.AddASN1ObjectIdentifier(out) - result, err := b.Bytes() - if builderOk := err == nil; test.ok != builderOk { - t.Errorf("#%d: error from Builder.Bytes: %s", i, err) - continue - } - if test.ok && !bytes.Equal(result, test.in) { - t.Errorf("#%d: reserialisation didn't match, got %x, want %x", i, result, test.in) - continue - } - } -} - -func TestReadASN1GeneralizedTime(t *testing.T) { - testData := []struct { - in string - ok bool - out time.Time - }{ - {"20100102030405Z", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.UTC)}, - {"20100102030405", false, time.Time{}}, - {"20100102030405+0607", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.FixedZone("", 6*60*60+7*60))}, - {"20100102030405-0607", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.FixedZone("", -6*60*60-7*60))}, - /* These are invalid times. However, the time package normalises times - * and they were accepted in some versions. See #11134. */ - {"00000100000000Z", false, time.Time{}}, - {"20101302030405Z", false, time.Time{}}, - {"20100002030405Z", false, time.Time{}}, - {"20100100030405Z", false, time.Time{}}, - {"20100132030405Z", false, time.Time{}}, - {"20100231030405Z", false, time.Time{}}, - {"20100102240405Z", false, time.Time{}}, - {"20100102036005Z", false, time.Time{}}, - {"20100102030460Z", false, time.Time{}}, - {"-20100102030410Z", false, time.Time{}}, - {"2010-0102030410Z", false, time.Time{}}, - {"2010-0002030410Z", false, time.Time{}}, - {"201001-02030410Z", false, time.Time{}}, - {"20100102-030410Z", false, time.Time{}}, - {"2010010203-0410Z", false, time.Time{}}, - {"201001020304-10Z", false, time.Time{}}, - } - for i, test := range testData { - in := String(append([]byte{byte(asn1.GeneralizedTime), byte(len(test.in))}, test.in...)) - var out time.Time - ok := in.ReadASN1GeneralizedTime(&out) - if ok != test.ok || ok && !reflect.DeepEqual(out, test.out) { - t.Errorf("#%d: in.ReadASN1GeneralizedTime() = %v, want %v; out = %q, want %q", i, ok, test.ok, out, test.out) - } - } -} - -func TestReadASN1BitString(t *testing.T) { - testData := []struct { - in []byte - ok bool - out encoding_asn1.BitString - }{ - {[]byte{}, false, encoding_asn1.BitString{}}, - {[]byte{0x00}, true, encoding_asn1.BitString{}}, - {[]byte{0x07, 0x00}, true, encoding_asn1.BitString{Bytes: []byte{0}, BitLength: 1}}, - {[]byte{0x07, 0x01}, false, encoding_asn1.BitString{}}, - {[]byte{0x07, 0x40}, false, encoding_asn1.BitString{}}, - {[]byte{0x08, 0x00}, false, encoding_asn1.BitString{}}, - {[]byte{0xff}, false, encoding_asn1.BitString{}}, - {[]byte{0xfe, 0x00}, false, encoding_asn1.BitString{}}, - } - for i, test := range testData { - in := String(append([]byte{3, byte(len(test.in))}, test.in...)) - var out encoding_asn1.BitString - ok := in.ReadASN1BitString(&out) - if ok != test.ok || ok && (!bytes.Equal(out.Bytes, test.out.Bytes) || out.BitLength != test.out.BitLength) { - t.Errorf("#%d: in.ReadASN1BitString() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/builder.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/builder.go deleted file mode 100644 index 29b4c76412..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/builder.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright 2017 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 cryptobyte - -import ( - "errors" - "fmt" -) - -// A Builder builds byte strings from fixed-length and length-prefixed values. -// Builders either allocate space as needed, or are ‘fixed’, which means that -// they write into a given buffer and produce an error if it's exhausted. -// -// The zero value is a usable Builder that allocates space as needed. -// -// Simple values are marshaled and appended to a Builder using methods on the -// Builder. Length-prefixed values are marshaled by providing a -// BuilderContinuation, which is a function that writes the inner contents of -// the value to a given Builder. See the documentation for BuilderContinuation -// for details. -type Builder struct { - err error - result []byte - fixedSize bool - child *Builder - offset int - pendingLenLen int - pendingIsASN1 bool - inContinuation *bool -} - -// NewBuilder creates a Builder that appends its output to the given buffer. -// Like append(), the slice will be reallocated if its capacity is exceeded. -// Use Bytes to get the final buffer. -func NewBuilder(buffer []byte) *Builder { - return &Builder{ - result: buffer, - } -} - -// NewFixedBuilder creates a Builder that appends its output into the given -// buffer. This builder does not reallocate the output buffer. Writes that -// would exceed the buffer's capacity are treated as an error. -func NewFixedBuilder(buffer []byte) *Builder { - return &Builder{ - result: buffer, - fixedSize: true, - } -} - -// Bytes returns the bytes written by the builder or an error if one has -// occurred during during building. -func (b *Builder) Bytes() ([]byte, error) { - if b.err != nil { - return nil, b.err - } - return b.result[b.offset:], nil -} - -// BytesOrPanic returns the bytes written by the builder or panics if an error -// has occurred during building. -func (b *Builder) BytesOrPanic() []byte { - if b.err != nil { - panic(b.err) - } - return b.result[b.offset:] -} - -// AddUint8 appends an 8-bit value to the byte string. -func (b *Builder) AddUint8(v uint8) { - b.add(byte(v)) -} - -// AddUint16 appends a big-endian, 16-bit value to the byte string. -func (b *Builder) AddUint16(v uint16) { - b.add(byte(v>>8), byte(v)) -} - -// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest -// byte of the 32-bit input value is silently truncated. -func (b *Builder) AddUint24(v uint32) { - b.add(byte(v>>16), byte(v>>8), byte(v)) -} - -// AddUint32 appends a big-endian, 32-bit value to the byte string. -func (b *Builder) AddUint32(v uint32) { - b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) -} - -// AddBytes appends a sequence of bytes to the byte string. -func (b *Builder) AddBytes(v []byte) { - b.add(v...) -} - -// BuilderContinuation is continuation-passing interface for building -// length-prefixed byte sequences. Builder methods for length-prefixed -// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation -// supplied to them. The child builder passed to the continuation can be used -// to build the content of the length-prefixed sequence. For example: -// -// parent := cryptobyte.NewBuilder() -// parent.AddUint8LengthPrefixed(func (child *Builder) { -// child.AddUint8(42) -// child.AddUint8LengthPrefixed(func (grandchild *Builder) { -// grandchild.AddUint8(5) -// }) -// }) -// -// It is an error to write more bytes to the child than allowed by the reserved -// length prefix. After the continuation returns, the child must be considered -// invalid, i.e. users must not store any copies or references of the child -// that outlive the continuation. -// -// If the continuation panics with a value of type BuildError then the inner -// error will be returned as the error from Bytes. If the child panics -// otherwise then Bytes will repanic with the same value. -type BuilderContinuation func(child *Builder) - -// BuildError wraps an error. If a BuilderContinuation panics with this value, -// the panic will be recovered and the inner error will be returned from -// Builder.Bytes. -type BuildError struct { - Err error -} - -// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence. -func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(1, false, f) -} - -// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence. -func (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(2, false, f) -} - -// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence. -func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(3, false, f) -} - -// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence. -func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(4, false, f) -} - -func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) { - if !*b.inContinuation { - *b.inContinuation = true - - defer func() { - *b.inContinuation = false - - r := recover() - if r == nil { - return - } - - if buildError, ok := r.(BuildError); ok { - b.err = buildError.Err - } else { - panic(r) - } - }() - } - - f(arg) -} - -func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) { - // Subsequent writes can be ignored if the builder has encountered an error. - if b.err != nil { - return - } - - offset := len(b.result) - b.add(make([]byte, lenLen)...) - - if b.inContinuation == nil { - b.inContinuation = new(bool) - } - - b.child = &Builder{ - result: b.result, - fixedSize: b.fixedSize, - offset: offset, - pendingLenLen: lenLen, - pendingIsASN1: isASN1, - inContinuation: b.inContinuation, - } - - b.callContinuation(f, b.child) - b.flushChild() - if b.child != nil { - panic("cryptobyte: internal error") - } -} - -func (b *Builder) flushChild() { - if b.child == nil { - return - } - b.child.flushChild() - child := b.child - b.child = nil - - if child.err != nil { - b.err = child.err - return - } - - length := len(child.result) - child.pendingLenLen - child.offset - - if length < 0 { - panic("cryptobyte: internal error") // result unexpectedly shrunk - } - - if child.pendingIsASN1 { - // For ASN.1, we reserved a single byte for the length. If that turned out - // to be incorrect, we have to move the contents along in order to make - // space. - if child.pendingLenLen != 1 { - panic("cryptobyte: internal error") - } - var lenLen, lenByte uint8 - if int64(length) > 0xfffffffe { - b.err = errors.New("pending ASN.1 child too long") - return - } else if length > 0xffffff { - lenLen = 5 - lenByte = 0x80 | 4 - } else if length > 0xffff { - lenLen = 4 - lenByte = 0x80 | 3 - } else if length > 0xff { - lenLen = 3 - lenByte = 0x80 | 2 - } else if length > 0x7f { - lenLen = 2 - lenByte = 0x80 | 1 - } else { - lenLen = 1 - lenByte = uint8(length) - length = 0 - } - - // Insert the initial length byte, make space for successive length bytes, - // and adjust the offset. - child.result[child.offset] = lenByte - extraBytes := int(lenLen - 1) - if extraBytes != 0 { - child.add(make([]byte, extraBytes)...) - childStart := child.offset + child.pendingLenLen - copy(child.result[childStart+extraBytes:], child.result[childStart:]) - } - child.offset++ - child.pendingLenLen = extraBytes - } - - l := length - for i := child.pendingLenLen - 1; i >= 0; i-- { - child.result[child.offset+i] = uint8(l) - l >>= 8 - } - if l != 0 { - b.err = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", length, child.pendingLenLen) - return - } - - if !b.fixedSize { - b.result = child.result // In case child reallocated result. - } -} - -func (b *Builder) add(bytes ...byte) { - if b.err != nil { - return - } - if b.child != nil { - panic("attempted write while child is pending") - } - if len(b.result)+len(bytes) < len(bytes) { - b.err = errors.New("cryptobyte: length overflow") - } - if b.fixedSize && len(b.result)+len(bytes) > cap(b.result) { - b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer") - return - } - b.result = append(b.result, bytes...) -} - -// A MarshalingValue marshals itself into a Builder. -type MarshalingValue interface { - // Marshal is called by Builder.AddValue. It receives a pointer to a builder - // to marshal itself into. It may return an error that occurred during - // marshaling, such as unset or invalid values. - Marshal(b *Builder) error -} - -// AddValue calls Marshal on v, passing a pointer to the builder to append to. -// If Marshal returns an error, it is set on the Builder so that subsequent -// appends don't have an effect. -func (b *Builder) AddValue(v MarshalingValue) { - err := v.Marshal(b) - if err != nil { - b.err = err - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/cryptobyte_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/cryptobyte_test.go deleted file mode 100644 index f294dd552b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/cryptobyte_test.go +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright 2017 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 cryptobyte - -import ( - "bytes" - "errors" - "fmt" - "testing" -) - -func builderBytesEq(b *Builder, want ...byte) error { - got := b.BytesOrPanic() - if !bytes.Equal(got, want) { - return fmt.Errorf("Bytes() = %v, want %v", got, want) - } - return nil -} - -func TestContinuationError(t *testing.T) { - const errorStr = "TestContinuationError" - var b Builder - b.AddUint8LengthPrefixed(func(b *Builder) { - b.AddUint8(1) - panic(BuildError{Err: errors.New(errorStr)}) - }) - - ret, err := b.Bytes() - if ret != nil { - t.Error("expected nil result") - } - if err == nil { - t.Fatal("unexpected nil error") - } - if s := err.Error(); s != errorStr { - t.Errorf("expected error %q, got %v", errorStr, s) - } -} - -func TestContinuationNonError(t *testing.T) { - defer func() { - recover() - }() - - var b Builder - b.AddUint8LengthPrefixed(func(b *Builder) { - b.AddUint8(1) - panic(1) - }) - - t.Error("Builder did not panic") -} - -func TestGeneratedPanic(t *testing.T) { - defer func() { - recover() - }() - - var b Builder - b.AddUint8LengthPrefixed(func(b *Builder) { - var p *byte - *p = 0 - }) - - t.Error("Builder did not panic") -} - -func TestBytes(t *testing.T) { - var b Builder - v := []byte("foobarbaz") - b.AddBytes(v[0:3]) - b.AddBytes(v[3:4]) - b.AddBytes(v[4:9]) - if err := builderBytesEq(&b, v...); err != nil { - t.Error(err) - } - s := String(b.BytesOrPanic()) - for _, w := range []string{"foo", "bar", "baz"} { - var got []byte - if !s.ReadBytes(&got, 3) { - t.Errorf("ReadBytes() = false, want true (w = %v)", w) - } - want := []byte(w) - if !bytes.Equal(got, want) { - t.Errorf("ReadBytes(): got = %v, want %v", got, want) - } - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUint8(t *testing.T) { - var b Builder - b.AddUint8(42) - if err := builderBytesEq(&b, 42); err != nil { - t.Error(err) - } - - var s String = b.BytesOrPanic() - var v uint8 - if !s.ReadUint8(&v) { - t.Error("ReadUint8() = false, want true") - } - if v != 42 { - t.Errorf("v = %d, want 42", v) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUint16(t *testing.T) { - var b Builder - b.AddUint16(65534) - if err := builderBytesEq(&b, 255, 254); err != nil { - t.Error(err) - } - var s String = b.BytesOrPanic() - var v uint16 - if !s.ReadUint16(&v) { - t.Error("ReadUint16() == false, want true") - } - if v != 65534 { - t.Errorf("v = %d, want 65534", v) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUint24(t *testing.T) { - var b Builder - b.AddUint24(0xfffefd) - if err := builderBytesEq(&b, 255, 254, 253); err != nil { - t.Error(err) - } - - var s String = b.BytesOrPanic() - var v uint32 - if !s.ReadUint24(&v) { - t.Error("ReadUint8() = false, want true") - } - if v != 0xfffefd { - t.Errorf("v = %d, want fffefd", v) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUint24Truncation(t *testing.T) { - var b Builder - b.AddUint24(0x10111213) - if err := builderBytesEq(&b, 0x11, 0x12, 0x13); err != nil { - t.Error(err) - } -} - -func TestUint32(t *testing.T) { - var b Builder - b.AddUint32(0xfffefdfc) - if err := builderBytesEq(&b, 255, 254, 253, 252); err != nil { - t.Error(err) - } - - var s String = b.BytesOrPanic() - var v uint32 - if !s.ReadUint32(&v) { - t.Error("ReadUint8() = false, want true") - } - if v != 0xfffefdfc { - t.Errorf("v = %x, want fffefdfc", v) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUMultiple(t *testing.T) { - var b Builder - b.AddUint8(23) - b.AddUint32(0xfffefdfc) - b.AddUint16(42) - if err := builderBytesEq(&b, 23, 255, 254, 253, 252, 0, 42); err != nil { - t.Error(err) - } - - var s String = b.BytesOrPanic() - var ( - x uint8 - y uint32 - z uint16 - ) - if !s.ReadUint8(&x) || !s.ReadUint32(&y) || !s.ReadUint16(&z) { - t.Error("ReadUint8() = false, want true") - } - if x != 23 || y != 0xfffefdfc || z != 42 { - t.Errorf("x, y, z = %d, %d, %d; want 23, 4294901244, 5", x, y, z) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } -} - -func TestUint8LengthPrefixedSimple(t *testing.T) { - var b Builder - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8(23) - c.AddUint8(42) - }) - if err := builderBytesEq(&b, 2, 23, 42); err != nil { - t.Error(err) - } - - var base, child String = b.BytesOrPanic(), nil - var x, y uint8 - if !base.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&x) || - !child.ReadUint8(&y) { - t.Error("parsing failed") - } - if x != 23 || y != 42 { - t.Errorf("want x, y == 23, 42; got %d, %d", x, y) - } - if len(base) != 0 { - t.Errorf("len(base) = %d, want 0", len(base)) - } - if len(child) != 0 { - t.Errorf("len(child) = %d, want 0", len(child)) - } -} - -func TestUint8LengthPrefixedMulti(t *testing.T) { - var b Builder - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8(23) - c.AddUint8(42) - }) - b.AddUint8(5) - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8(123) - c.AddUint8(234) - }) - if err := builderBytesEq(&b, 2, 23, 42, 5, 2, 123, 234); err != nil { - t.Error(err) - } - - var s, child String = b.BytesOrPanic(), nil - var u, v, w, x, y uint8 - if !s.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&u) || !child.ReadUint8(&v) || - !s.ReadUint8(&w) || !s.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&x) || !child.ReadUint8(&y) { - t.Error("parsing failed") - } - if u != 23 || v != 42 || w != 5 || x != 123 || y != 234 { - t.Errorf("u, v, w, x, y = %d, %d, %d, %d, %d; want 23, 42, 5, 123, 234", - u, v, w, x, y) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } - if len(child) != 0 { - t.Errorf("len(child) = %d, want 0", len(child)) - } -} - -func TestUint8LengthPrefixedNested(t *testing.T) { - var b Builder - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8(5) - c.AddUint8LengthPrefixed(func(d *Builder) { - d.AddUint8(23) - d.AddUint8(42) - }) - c.AddUint8(123) - }) - if err := builderBytesEq(&b, 5, 5, 2, 23, 42, 123); err != nil { - t.Error(err) - } - - var base, child1, child2 String = b.BytesOrPanic(), nil, nil - var u, v, w, x uint8 - if !base.ReadUint8LengthPrefixed(&child1) { - t.Error("parsing base failed") - } - if !child1.ReadUint8(&u) || !child1.ReadUint8LengthPrefixed(&child2) || !child1.ReadUint8(&x) { - t.Error("parsing child1 failed") - } - if !child2.ReadUint8(&v) || !child2.ReadUint8(&w) { - t.Error("parsing child2 failed") - } - if u != 5 || v != 23 || w != 42 || x != 123 { - t.Errorf("u, v, w, x = %d, %d, %d, %d, want 5, 23, 42, 123", - u, v, w, x) - } - if len(base) != 0 { - t.Errorf("len(base) = %d, want 0", len(base)) - } - if len(child1) != 0 { - t.Errorf("len(child1) = %d, want 0", len(child1)) - } - if len(base) != 0 { - t.Errorf("len(child2) = %d, want 0", len(child2)) - } -} - -func TestPreallocatedBuffer(t *testing.T) { - var buf [5]byte - b := NewBuilder(buf[0:0]) - b.AddUint8(1) - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8(3) - c.AddUint8(4) - }) - b.AddUint16(1286) // Outgrow buf by one byte. - want := []byte{1, 2, 3, 4, 0} - if !bytes.Equal(buf[:], want) { - t.Errorf("buf = %v want %v", buf, want) - } - if err := builderBytesEq(b, 1, 2, 3, 4, 5, 6); err != nil { - t.Error(err) - } -} - -func TestWriteWithPendingChild(t *testing.T) { - var b Builder - b.AddUint8LengthPrefixed(func(c *Builder) { - c.AddUint8LengthPrefixed(func(d *Builder) { - defer func() { - if recover() == nil { - t.Errorf("recover() = nil, want error; c.AddUint8() did not panic") - } - }() - c.AddUint8(2) // panics - - defer func() { - if recover() == nil { - t.Errorf("recover() = nil, want error; b.AddUint8() did not panic") - } - }() - b.AddUint8(2) // panics - }) - - defer func() { - if recover() == nil { - t.Errorf("recover() = nil, want error; b.AddUint8() did not panic") - } - }() - b.AddUint8(2) // panics - }) -} - -// ASN.1 - -func TestASN1Int64(t *testing.T) { - tests := []struct { - in int64 - want []byte - }{ - {-0x800000, []byte{2, 3, 128, 0, 0}}, - {-256, []byte{2, 2, 255, 0}}, - {-129, []byte{2, 2, 255, 127}}, - {-128, []byte{2, 1, 128}}, - {-1, []byte{2, 1, 255}}, - {0, []byte{2, 1, 0}}, - {1, []byte{2, 1, 1}}, - {2, []byte{2, 1, 2}}, - {127, []byte{2, 1, 127}}, - {128, []byte{2, 2, 0, 128}}, - {256, []byte{2, 2, 1, 0}}, - {0x800000, []byte{2, 4, 0, 128, 0, 0}}, - } - for i, tt := range tests { - var b Builder - b.AddASN1Int64(tt.in) - if err := builderBytesEq(&b, tt.want...); err != nil { - t.Errorf("%v, (i = %d; in = %v)", err, i, tt.in) - } - - var n int64 - s := String(b.BytesOrPanic()) - ok := s.ReadASN1Integer(&n) - if !ok || n != tt.in { - t.Errorf("s.ReadASN1Integer(&n) = %v, n = %d; want true, n = %d (i = %d)", - ok, n, tt.in, i) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } - } -} - -func TestASN1Uint64(t *testing.T) { - tests := []struct { - in uint64 - want []byte - }{ - {0, []byte{2, 1, 0}}, - {1, []byte{2, 1, 1}}, - {2, []byte{2, 1, 2}}, - {127, []byte{2, 1, 127}}, - {128, []byte{2, 2, 0, 128}}, - {256, []byte{2, 2, 1, 0}}, - {0x800000, []byte{2, 4, 0, 128, 0, 0}}, - {0x7fffffffffffffff, []byte{2, 8, 127, 255, 255, 255, 255, 255, 255, 255}}, - {0x8000000000000000, []byte{2, 9, 0, 128, 0, 0, 0, 0, 0, 0, 0}}, - {0xffffffffffffffff, []byte{2, 9, 0, 255, 255, 255, 255, 255, 255, 255, 255}}, - } - for i, tt := range tests { - var b Builder - b.AddASN1Uint64(tt.in) - if err := builderBytesEq(&b, tt.want...); err != nil { - t.Errorf("%v, (i = %d; in = %v)", err, i, tt.in) - } - - var n uint64 - s := String(b.BytesOrPanic()) - ok := s.ReadASN1Integer(&n) - if !ok || n != tt.in { - t.Errorf("s.ReadASN1Integer(&n) = %v, n = %d; want true, n = %d (i = %d)", - ok, n, tt.in, i) - } - if len(s) != 0 { - t.Errorf("len(s) = %d, want 0", len(s)) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/example_test.go deleted file mode 100644 index 9b4f3e142b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/example_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2017 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 cryptobyte_test - -import ( - "errors" - "fmt" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/asn1" -) - -func ExampleString_lengthPrefixed() { - // This is an example of parsing length-prefixed data (as found in, for - // example, TLS). Imagine a 16-bit prefixed series of 8-bit prefixed - // strings. - - input := cryptobyte.String([]byte{0, 12, 5, 'h', 'e', 'l', 'l', 'o', 5, 'w', 'o', 'r', 'l', 'd'}) - var result []string - - var values cryptobyte.String - if !input.ReadUint16LengthPrefixed(&values) || - !input.Empty() { - panic("bad format") - } - - for !values.Empty() { - var value cryptobyte.String - if !values.ReadUint8LengthPrefixed(&value) { - panic("bad format") - } - - result = append(result, string(value)) - } - - // Output: []string{"hello", "world"} - fmt.Printf("%#v\n", result) -} - -func ExampleString_aSN1() { - // This is an example of parsing ASN.1 data that looks like: - // Foo ::= SEQUENCE { - // version [6] INTEGER DEFAULT 0 - // data OCTET STRING - // } - - input := cryptobyte.String([]byte{0x30, 12, 0xa6, 3, 2, 1, 2, 4, 5, 'h', 'e', 'l', 'l', 'o'}) - - var ( - version int64 - data, inner, versionBytes cryptobyte.String - haveVersion bool - ) - if !input.ReadASN1(&inner, asn1.SEQUENCE) || - !input.Empty() || - !inner.ReadOptionalASN1(&versionBytes, &haveVersion, asn1.Tag(6).Constructed().ContextSpecific()) || - (haveVersion && !versionBytes.ReadASN1Integer(&version)) || - (haveVersion && !versionBytes.Empty()) || - !inner.ReadASN1(&data, asn1.OCTET_STRING) || - !inner.Empty() { - panic("bad format") - } - - // Output: haveVersion: true, version: 2, data: hello - fmt.Printf("haveVersion: %t, version: %d, data: %s\n", haveVersion, version, string(data)) -} - -func ExampleBuilder_aSN1() { - // This is an example of building ASN.1 data that looks like: - // Foo ::= SEQUENCE { - // version [6] INTEGER DEFAULT 0 - // data OCTET STRING - // } - - version := int64(2) - data := []byte("hello") - const defaultVersion = 0 - - var b cryptobyte.Builder - b.AddASN1(asn1.SEQUENCE, func(b *cryptobyte.Builder) { - if version != defaultVersion { - b.AddASN1(asn1.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) { - b.AddASN1Int64(version) - }) - } - b.AddASN1OctetString(data) - }) - - result, err := b.Bytes() - if err != nil { - panic(err) - } - - // Output: 300ca603020102040568656c6c6f - fmt.Printf("%x\n", result) -} - -func ExampleBuilder_lengthPrefixed() { - // This is an example of building length-prefixed data (as found in, - // for example, TLS). Imagine a 16-bit prefixed series of 8-bit - // prefixed strings. - input := []string{"hello", "world"} - - var b cryptobyte.Builder - b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) { - for _, value := range input { - b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) { - b.AddBytes([]byte(value)) - }) - } - }) - - result, err := b.Bytes() - if err != nil { - panic(err) - } - - // Output: 000c0568656c6c6f05776f726c64 - fmt.Printf("%x\n", result) -} - -func ExampleBuilder_lengthPrefixOverflow() { - // Writing more data that can be expressed by the length prefix results - // in an error from Bytes(). - - tooLarge := make([]byte, 256) - - var b cryptobyte.Builder - b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) { - b.AddBytes(tooLarge) - }) - - result, err := b.Bytes() - fmt.Printf("len=%d err=%s\n", len(result), err) - - // Output: len=0 err=cryptobyte: pending child length 256 exceeds 1-byte length prefix -} - -func ExampleBuilderContinuation_errorHandling() { - var b cryptobyte.Builder - // Continuations that panic with a BuildError will cause Bytes to - // return the inner error. - b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) { - b.AddUint32(0) - panic(cryptobyte.BuildError{Err: errors.New("example error")}) - }) - - result, err := b.Bytes() - fmt.Printf("len=%d err=%s\n", len(result), err) - - // Output: len=0 err=example error -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/string.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/string.go deleted file mode 100644 index bd2ed2e207..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cryptobyte/string.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2017 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 cryptobyte contains types that help with parsing and constructing -// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage -// contains useful ASN.1 constants.) -// -// The String type is for parsing. It wraps a []byte slice and provides helper -// functions for consuming structures, value by value. -// -// The Builder type is for constructing messages. It providers helper functions -// for appending values and also for appending length-prefixed submessages – -// without having to worry about calculating the length prefix ahead of time. -// -// See the documentation and examples for the Builder and String types to get -// started. -package cryptobyte - -// String represents a string of bytes. It provides methods for parsing -// fixed-length and length-prefixed values from it. -type String []byte - -// read advances a String by n bytes and returns them. If less than n bytes -// remain, it returns nil. -func (s *String) read(n int) []byte { - if len(*s) < n { - return nil - } - v := (*s)[:n] - *s = (*s)[n:] - return v -} - -// Skip advances the String by n byte and reports whether it was successful. -func (s *String) Skip(n int) bool { - return s.read(n) != nil -} - -// ReadUint8 decodes an 8-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint8(out *uint8) bool { - v := s.read(1) - if v == nil { - return false - } - *out = uint8(v[0]) - return true -} - -// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint16(out *uint16) bool { - v := s.read(2) - if v == nil { - return false - } - *out = uint16(v[0])<<8 | uint16(v[1]) - return true -} - -// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint24(out *uint32) bool { - v := s.read(3) - if v == nil { - return false - } - *out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2]) - return true -} - -// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint32(out *uint32) bool { - v := s.read(4) - if v == nil { - return false - } - *out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3]) - return true -} - -func (s *String) readUnsigned(out *uint32, length int) bool { - v := s.read(length) - if v == nil { - return false - } - var result uint32 - for i := 0; i < length; i++ { - result <<= 8 - result |= uint32(v[i]) - } - *out = result - return true -} - -func (s *String) readLengthPrefixed(lenLen int, outChild *String) bool { - lenBytes := s.read(lenLen) - if lenBytes == nil { - return false - } - var length uint32 - for _, b := range lenBytes { - length = length << 8 - length = length | uint32(b) - } - if int(length) < 0 { - // This currently cannot overflow because we read uint24 at most, but check - // anyway in case that changes in the future. - return false - } - v := s.read(int(length)) - if v == nil { - return false - } - *outChild = v - return true -} - -// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value -// into out and advances over it. It reports whether the read was successful. -func (s *String) ReadUint8LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(1, out) -} - -// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit -// length-prefixed value into out and advances over it. It reports whether the -// read was successful. -func (s *String) ReadUint16LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(2, out) -} - -// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit -// length-prefixed value into out and advances over it. It reports whether -// the read was successful. -func (s *String) ReadUint24LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(3, out) -} - -// ReadBytes reads n bytes into out and advances over them. It reports -// whether the read was successful. -func (s *String) ReadBytes(out *[]byte, n int) bool { - v := s.read(n) - if v == nil { - return false - } - *out = v - return true -} - -// CopyBytes copies len(out) bytes into out and advances over them. It reports -// whether the copy operation was successful -func (s *String) CopyBytes(out []byte) bool { - n := len(out) - v := s.read(n) - if v == nil { - return false - } - return copy(out, v) == n -} - -// Empty reports whether the string does not contain any bytes. -func (s String) Empty() bool { - return len(s) == 0 -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.h b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.h deleted file mode 100644 index b3f74162f6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.h +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -#define REDMASK51 0x0007FFFFFFFFFFFF diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.s deleted file mode 100644 index ee7b4bd5f8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/const_amd64.s +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// +build amd64,!gccgo,!appengine - -// These constants cannot be encoded in non-MOVQ immediates. -// We access them directly from memory instead. - -DATA ·_121666_213(SB)/8, $996687872 -GLOBL ·_121666_213(SB), 8, $8 - -DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA -GLOBL ·_2P0(SB), 8, $8 - -DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE -GLOBL ·_2P1234(SB), 8, $8 diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/cswap_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/cswap_amd64.s deleted file mode 100644 index cd793a5b5f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/cswap_amd64.s +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2012 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. - -// +build amd64,!gccgo,!appengine - -// func cswap(inout *[4][5]uint64, v uint64) -TEXT ·cswap(SB),7,$0 - MOVQ inout+0(FP),DI - MOVQ v+8(FP),SI - - SUBQ $1, SI - NOTQ SI - MOVQ SI, X15 - PSHUFD $0x44, X15, X15 - - MOVOU 0(DI), X0 - MOVOU 16(DI), X2 - MOVOU 32(DI), X4 - MOVOU 48(DI), X6 - MOVOU 64(DI), X8 - MOVOU 80(DI), X1 - MOVOU 96(DI), X3 - MOVOU 112(DI), X5 - MOVOU 128(DI), X7 - MOVOU 144(DI), X9 - - MOVO X1, X10 - MOVO X3, X11 - MOVO X5, X12 - MOVO X7, X13 - MOVO X9, X14 - - PXOR X0, X10 - PXOR X2, X11 - PXOR X4, X12 - PXOR X6, X13 - PXOR X8, X14 - PAND X15, X10 - PAND X15, X11 - PAND X15, X12 - PAND X15, X13 - PAND X15, X14 - PXOR X10, X0 - PXOR X10, X1 - PXOR X11, X2 - PXOR X11, X3 - PXOR X12, X4 - PXOR X12, X5 - PXOR X13, X6 - PXOR X13, X7 - PXOR X14, X8 - PXOR X14, X9 - - MOVOU X0, 0(DI) - MOVOU X2, 16(DI) - MOVOU X4, 32(DI) - MOVOU X6, 48(DI) - MOVOU X8, 64(DI) - MOVOU X1, 80(DI) - MOVOU X3, 96(DI) - MOVOU X5, 112(DI) - MOVOU X7, 128(DI) - MOVOU X9, 144(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519.go deleted file mode 100644 index cb8fbc57b9..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519.go +++ /dev/null @@ -1,834 +0,0 @@ -// Copyright 2013 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. - -// We have an implementation in amd64 assembly so this code is only run on -// non-amd64 platforms. The amd64 assembly does not support gccgo. -// +build !amd64 gccgo appengine - -package curve25519 - -import ( - "encoding/binary" -) - -// This code is a port of the public domain, "ref10" implementation of -// curve25519 from SUPERCOP 20130419 by D. J. Bernstein. - -// fieldElement represents an element of the field GF(2^255 - 19). An element -// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 -// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on -// context. -type fieldElement [10]int32 - -func feZero(fe *fieldElement) { - for i := range fe { - fe[i] = 0 - } -} - -func feOne(fe *fieldElement) { - feZero(fe) - fe[0] = 1 -} - -func feAdd(dst, a, b *fieldElement) { - for i := range dst { - dst[i] = a[i] + b[i] - } -} - -func feSub(dst, a, b *fieldElement) { - for i := range dst { - dst[i] = a[i] - b[i] - } -} - -func feCopy(dst, src *fieldElement) { - for i := range dst { - dst[i] = src[i] - } -} - -// feCSwap replaces (f,g) with (g,f) if b == 1; replaces (f,g) with (f,g) if b == 0. -// -// Preconditions: b in {0,1}. -func feCSwap(f, g *fieldElement, b int32) { - b = -b - for i := range f { - t := b & (f[i] ^ g[i]) - f[i] ^= t - g[i] ^= t - } -} - -// load3 reads a 24-bit, little-endian value from in. -func load3(in []byte) int64 { - var r int64 - r = int64(in[0]) - r |= int64(in[1]) << 8 - r |= int64(in[2]) << 16 - return r -} - -// load4 reads a 32-bit, little-endian value from in. -func load4(in []byte) int64 { - return int64(binary.LittleEndian.Uint32(in)) -} - -func feFromBytes(dst *fieldElement, src *[32]byte) { - h0 := load4(src[:]) - h1 := load3(src[4:]) << 6 - h2 := load3(src[7:]) << 5 - h3 := load3(src[10:]) << 3 - h4 := load3(src[13:]) << 2 - h5 := load4(src[16:]) - h6 := load3(src[20:]) << 7 - h7 := load3(src[23:]) << 5 - h8 := load3(src[26:]) << 4 - h9 := load3(src[29:]) << 2 - - var carry [10]int64 - carry[9] = (h9 + 1<<24) >> 25 - h0 += carry[9] * 19 - h9 -= carry[9] << 25 - carry[1] = (h1 + 1<<24) >> 25 - h2 += carry[1] - h1 -= carry[1] << 25 - carry[3] = (h3 + 1<<24) >> 25 - h4 += carry[3] - h3 -= carry[3] << 25 - carry[5] = (h5 + 1<<24) >> 25 - h6 += carry[5] - h5 -= carry[5] << 25 - carry[7] = (h7 + 1<<24) >> 25 - h8 += carry[7] - h7 -= carry[7] << 25 - - carry[0] = (h0 + 1<<25) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - carry[2] = (h2 + 1<<25) >> 26 - h3 += carry[2] - h2 -= carry[2] << 26 - carry[4] = (h4 + 1<<25) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - carry[6] = (h6 + 1<<25) >> 26 - h7 += carry[6] - h6 -= carry[6] << 26 - carry[8] = (h8 + 1<<25) >> 26 - h9 += carry[8] - h8 -= carry[8] << 26 - - dst[0] = int32(h0) - dst[1] = int32(h1) - dst[2] = int32(h2) - dst[3] = int32(h3) - dst[4] = int32(h4) - dst[5] = int32(h5) - dst[6] = int32(h6) - dst[7] = int32(h7) - dst[8] = int32(h8) - dst[9] = int32(h9) -} - -// feToBytes marshals h to s. -// Preconditions: -// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -// -// Write p=2^255-19; q=floor(h/p). -// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). -// -// Proof: -// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4. -// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4. -// -// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9). -// Then 0> 25 - q = (h[0] + q) >> 26 - q = (h[1] + q) >> 25 - q = (h[2] + q) >> 26 - q = (h[3] + q) >> 25 - q = (h[4] + q) >> 26 - q = (h[5] + q) >> 25 - q = (h[6] + q) >> 26 - q = (h[7] + q) >> 25 - q = (h[8] + q) >> 26 - q = (h[9] + q) >> 25 - - // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. - h[0] += 19 * q - // Goal: Output h-2^255 q, which is between 0 and 2^255-20. - - carry[0] = h[0] >> 26 - h[1] += carry[0] - h[0] -= carry[0] << 26 - carry[1] = h[1] >> 25 - h[2] += carry[1] - h[1] -= carry[1] << 25 - carry[2] = h[2] >> 26 - h[3] += carry[2] - h[2] -= carry[2] << 26 - carry[3] = h[3] >> 25 - h[4] += carry[3] - h[3] -= carry[3] << 25 - carry[4] = h[4] >> 26 - h[5] += carry[4] - h[4] -= carry[4] << 26 - carry[5] = h[5] >> 25 - h[6] += carry[5] - h[5] -= carry[5] << 25 - carry[6] = h[6] >> 26 - h[7] += carry[6] - h[6] -= carry[6] << 26 - carry[7] = h[7] >> 25 - h[8] += carry[7] - h[7] -= carry[7] << 25 - carry[8] = h[8] >> 26 - h[9] += carry[8] - h[8] -= carry[8] << 26 - carry[9] = h[9] >> 25 - h[9] -= carry[9] << 25 - // h10 = carry9 - - // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20. - // Have h[0]+...+2^230 h[9] between 0 and 2^255-1; - // evidently 2^255 h10-2^255 q = 0. - // Goal: Output h[0]+...+2^230 h[9]. - - s[0] = byte(h[0] >> 0) - s[1] = byte(h[0] >> 8) - s[2] = byte(h[0] >> 16) - s[3] = byte((h[0] >> 24) | (h[1] << 2)) - s[4] = byte(h[1] >> 6) - s[5] = byte(h[1] >> 14) - s[6] = byte((h[1] >> 22) | (h[2] << 3)) - s[7] = byte(h[2] >> 5) - s[8] = byte(h[2] >> 13) - s[9] = byte((h[2] >> 21) | (h[3] << 5)) - s[10] = byte(h[3] >> 3) - s[11] = byte(h[3] >> 11) - s[12] = byte((h[3] >> 19) | (h[4] << 6)) - s[13] = byte(h[4] >> 2) - s[14] = byte(h[4] >> 10) - s[15] = byte(h[4] >> 18) - s[16] = byte(h[5] >> 0) - s[17] = byte(h[5] >> 8) - s[18] = byte(h[5] >> 16) - s[19] = byte((h[5] >> 24) | (h[6] << 1)) - s[20] = byte(h[6] >> 7) - s[21] = byte(h[6] >> 15) - s[22] = byte((h[6] >> 23) | (h[7] << 3)) - s[23] = byte(h[7] >> 5) - s[24] = byte(h[7] >> 13) - s[25] = byte((h[7] >> 21) | (h[8] << 4)) - s[26] = byte(h[8] >> 4) - s[27] = byte(h[8] >> 12) - s[28] = byte((h[8] >> 20) | (h[9] << 6)) - s[29] = byte(h[9] >> 2) - s[30] = byte(h[9] >> 10) - s[31] = byte(h[9] >> 18) -} - -// feMul calculates h = f * g -// Can overlap h with f or g. -// -// Preconditions: -// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -// -// Postconditions: -// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -// -// Notes on implementation strategy: -// -// Using schoolbook multiplication. -// Karatsuba would save a little in some cost models. -// -// Most multiplications by 2 and 19 are 32-bit precomputations; -// cheaper than 64-bit postcomputations. -// -// There is one remaining multiplication by 19 in the carry chain; -// one *19 precomputation can be merged into this, -// but the resulting data flow is considerably less clean. -// -// There are 12 carries below. -// 10 of them are 2-way parallelizable and vectorizable. -// Can get away with 11 carries, but then data flow is much deeper. -// -// With tighter constraints on inputs can squeeze carries into int32. -func feMul(h, f, g *fieldElement) { - f0 := f[0] - f1 := f[1] - f2 := f[2] - f3 := f[3] - f4 := f[4] - f5 := f[5] - f6 := f[6] - f7 := f[7] - f8 := f[8] - f9 := f[9] - g0 := g[0] - g1 := g[1] - g2 := g[2] - g3 := g[3] - g4 := g[4] - g5 := g[5] - g6 := g[6] - g7 := g[7] - g8 := g[8] - g9 := g[9] - g1_19 := 19 * g1 // 1.4*2^29 - g2_19 := 19 * g2 // 1.4*2^30; still ok - g3_19 := 19 * g3 - g4_19 := 19 * g4 - g5_19 := 19 * g5 - g6_19 := 19 * g6 - g7_19 := 19 * g7 - g8_19 := 19 * g8 - g9_19 := 19 * g9 - f1_2 := 2 * f1 - f3_2 := 2 * f3 - f5_2 := 2 * f5 - f7_2 := 2 * f7 - f9_2 := 2 * f9 - f0g0 := int64(f0) * int64(g0) - f0g1 := int64(f0) * int64(g1) - f0g2 := int64(f0) * int64(g2) - f0g3 := int64(f0) * int64(g3) - f0g4 := int64(f0) * int64(g4) - f0g5 := int64(f0) * int64(g5) - f0g6 := int64(f0) * int64(g6) - f0g7 := int64(f0) * int64(g7) - f0g8 := int64(f0) * int64(g8) - f0g9 := int64(f0) * int64(g9) - f1g0 := int64(f1) * int64(g0) - f1g1_2 := int64(f1_2) * int64(g1) - f1g2 := int64(f1) * int64(g2) - f1g3_2 := int64(f1_2) * int64(g3) - f1g4 := int64(f1) * int64(g4) - f1g5_2 := int64(f1_2) * int64(g5) - f1g6 := int64(f1) * int64(g6) - f1g7_2 := int64(f1_2) * int64(g7) - f1g8 := int64(f1) * int64(g8) - f1g9_38 := int64(f1_2) * int64(g9_19) - f2g0 := int64(f2) * int64(g0) - f2g1 := int64(f2) * int64(g1) - f2g2 := int64(f2) * int64(g2) - f2g3 := int64(f2) * int64(g3) - f2g4 := int64(f2) * int64(g4) - f2g5 := int64(f2) * int64(g5) - f2g6 := int64(f2) * int64(g6) - f2g7 := int64(f2) * int64(g7) - f2g8_19 := int64(f2) * int64(g8_19) - f2g9_19 := int64(f2) * int64(g9_19) - f3g0 := int64(f3) * int64(g0) - f3g1_2 := int64(f3_2) * int64(g1) - f3g2 := int64(f3) * int64(g2) - f3g3_2 := int64(f3_2) * int64(g3) - f3g4 := int64(f3) * int64(g4) - f3g5_2 := int64(f3_2) * int64(g5) - f3g6 := int64(f3) * int64(g6) - f3g7_38 := int64(f3_2) * int64(g7_19) - f3g8_19 := int64(f3) * int64(g8_19) - f3g9_38 := int64(f3_2) * int64(g9_19) - f4g0 := int64(f4) * int64(g0) - f4g1 := int64(f4) * int64(g1) - f4g2 := int64(f4) * int64(g2) - f4g3 := int64(f4) * int64(g3) - f4g4 := int64(f4) * int64(g4) - f4g5 := int64(f4) * int64(g5) - f4g6_19 := int64(f4) * int64(g6_19) - f4g7_19 := int64(f4) * int64(g7_19) - f4g8_19 := int64(f4) * int64(g8_19) - f4g9_19 := int64(f4) * int64(g9_19) - f5g0 := int64(f5) * int64(g0) - f5g1_2 := int64(f5_2) * int64(g1) - f5g2 := int64(f5) * int64(g2) - f5g3_2 := int64(f5_2) * int64(g3) - f5g4 := int64(f5) * int64(g4) - f5g5_38 := int64(f5_2) * int64(g5_19) - f5g6_19 := int64(f5) * int64(g6_19) - f5g7_38 := int64(f5_2) * int64(g7_19) - f5g8_19 := int64(f5) * int64(g8_19) - f5g9_38 := int64(f5_2) * int64(g9_19) - f6g0 := int64(f6) * int64(g0) - f6g1 := int64(f6) * int64(g1) - f6g2 := int64(f6) * int64(g2) - f6g3 := int64(f6) * int64(g3) - f6g4_19 := int64(f6) * int64(g4_19) - f6g5_19 := int64(f6) * int64(g5_19) - f6g6_19 := int64(f6) * int64(g6_19) - f6g7_19 := int64(f6) * int64(g7_19) - f6g8_19 := int64(f6) * int64(g8_19) - f6g9_19 := int64(f6) * int64(g9_19) - f7g0 := int64(f7) * int64(g0) - f7g1_2 := int64(f7_2) * int64(g1) - f7g2 := int64(f7) * int64(g2) - f7g3_38 := int64(f7_2) * int64(g3_19) - f7g4_19 := int64(f7) * int64(g4_19) - f7g5_38 := int64(f7_2) * int64(g5_19) - f7g6_19 := int64(f7) * int64(g6_19) - f7g7_38 := int64(f7_2) * int64(g7_19) - f7g8_19 := int64(f7) * int64(g8_19) - f7g9_38 := int64(f7_2) * int64(g9_19) - f8g0 := int64(f8) * int64(g0) - f8g1 := int64(f8) * int64(g1) - f8g2_19 := int64(f8) * int64(g2_19) - f8g3_19 := int64(f8) * int64(g3_19) - f8g4_19 := int64(f8) * int64(g4_19) - f8g5_19 := int64(f8) * int64(g5_19) - f8g6_19 := int64(f8) * int64(g6_19) - f8g7_19 := int64(f8) * int64(g7_19) - f8g8_19 := int64(f8) * int64(g8_19) - f8g9_19 := int64(f8) * int64(g9_19) - f9g0 := int64(f9) * int64(g0) - f9g1_38 := int64(f9_2) * int64(g1_19) - f9g2_19 := int64(f9) * int64(g2_19) - f9g3_38 := int64(f9_2) * int64(g3_19) - f9g4_19 := int64(f9) * int64(g4_19) - f9g5_38 := int64(f9_2) * int64(g5_19) - f9g6_19 := int64(f9) * int64(g6_19) - f9g7_38 := int64(f9_2) * int64(g7_19) - f9g8_19 := int64(f9) * int64(g8_19) - f9g9_38 := int64(f9_2) * int64(g9_19) - h0 := f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38 - h1 := f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19 - h2 := f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38 - h3 := f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19 - h4 := f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38 - h5 := f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19 - h6 := f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38 - h7 := f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19 - h8 := f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38 - h9 := f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0 - var carry [10]int64 - - // |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38)) - // i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8 - // |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19)) - // i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9 - - carry[0] = (h0 + (1 << 25)) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - carry[4] = (h4 + (1 << 25)) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - // |h0| <= 2^25 - // |h4| <= 2^25 - // |h1| <= 1.51*2^58 - // |h5| <= 1.51*2^58 - - carry[1] = (h1 + (1 << 24)) >> 25 - h2 += carry[1] - h1 -= carry[1] << 25 - carry[5] = (h5 + (1 << 24)) >> 25 - h6 += carry[5] - h5 -= carry[5] << 25 - // |h1| <= 2^24; from now on fits into int32 - // |h5| <= 2^24; from now on fits into int32 - // |h2| <= 1.21*2^59 - // |h6| <= 1.21*2^59 - - carry[2] = (h2 + (1 << 25)) >> 26 - h3 += carry[2] - h2 -= carry[2] << 26 - carry[6] = (h6 + (1 << 25)) >> 26 - h7 += carry[6] - h6 -= carry[6] << 26 - // |h2| <= 2^25; from now on fits into int32 unchanged - // |h6| <= 2^25; from now on fits into int32 unchanged - // |h3| <= 1.51*2^58 - // |h7| <= 1.51*2^58 - - carry[3] = (h3 + (1 << 24)) >> 25 - h4 += carry[3] - h3 -= carry[3] << 25 - carry[7] = (h7 + (1 << 24)) >> 25 - h8 += carry[7] - h7 -= carry[7] << 25 - // |h3| <= 2^24; from now on fits into int32 unchanged - // |h7| <= 2^24; from now on fits into int32 unchanged - // |h4| <= 1.52*2^33 - // |h8| <= 1.52*2^33 - - carry[4] = (h4 + (1 << 25)) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - carry[8] = (h8 + (1 << 25)) >> 26 - h9 += carry[8] - h8 -= carry[8] << 26 - // |h4| <= 2^25; from now on fits into int32 unchanged - // |h8| <= 2^25; from now on fits into int32 unchanged - // |h5| <= 1.01*2^24 - // |h9| <= 1.51*2^58 - - carry[9] = (h9 + (1 << 24)) >> 25 - h0 += carry[9] * 19 - h9 -= carry[9] << 25 - // |h9| <= 2^24; from now on fits into int32 unchanged - // |h0| <= 1.8*2^37 - - carry[0] = (h0 + (1 << 25)) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - // |h0| <= 2^25; from now on fits into int32 unchanged - // |h1| <= 1.01*2^24 - - h[0] = int32(h0) - h[1] = int32(h1) - h[2] = int32(h2) - h[3] = int32(h3) - h[4] = int32(h4) - h[5] = int32(h5) - h[6] = int32(h6) - h[7] = int32(h7) - h[8] = int32(h8) - h[9] = int32(h9) -} - -// feSquare calculates h = f*f. Can overlap h with f. -// -// Preconditions: -// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -// -// Postconditions: -// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -func feSquare(h, f *fieldElement) { - f0 := f[0] - f1 := f[1] - f2 := f[2] - f3 := f[3] - f4 := f[4] - f5 := f[5] - f6 := f[6] - f7 := f[7] - f8 := f[8] - f9 := f[9] - f0_2 := 2 * f0 - f1_2 := 2 * f1 - f2_2 := 2 * f2 - f3_2 := 2 * f3 - f4_2 := 2 * f4 - f5_2 := 2 * f5 - f6_2 := 2 * f6 - f7_2 := 2 * f7 - f5_38 := 38 * f5 // 1.31*2^30 - f6_19 := 19 * f6 // 1.31*2^30 - f7_38 := 38 * f7 // 1.31*2^30 - f8_19 := 19 * f8 // 1.31*2^30 - f9_38 := 38 * f9 // 1.31*2^30 - f0f0 := int64(f0) * int64(f0) - f0f1_2 := int64(f0_2) * int64(f1) - f0f2_2 := int64(f0_2) * int64(f2) - f0f3_2 := int64(f0_2) * int64(f3) - f0f4_2 := int64(f0_2) * int64(f4) - f0f5_2 := int64(f0_2) * int64(f5) - f0f6_2 := int64(f0_2) * int64(f6) - f0f7_2 := int64(f0_2) * int64(f7) - f0f8_2 := int64(f0_2) * int64(f8) - f0f9_2 := int64(f0_2) * int64(f9) - f1f1_2 := int64(f1_2) * int64(f1) - f1f2_2 := int64(f1_2) * int64(f2) - f1f3_4 := int64(f1_2) * int64(f3_2) - f1f4_2 := int64(f1_2) * int64(f4) - f1f5_4 := int64(f1_2) * int64(f5_2) - f1f6_2 := int64(f1_2) * int64(f6) - f1f7_4 := int64(f1_2) * int64(f7_2) - f1f8_2 := int64(f1_2) * int64(f8) - f1f9_76 := int64(f1_2) * int64(f9_38) - f2f2 := int64(f2) * int64(f2) - f2f3_2 := int64(f2_2) * int64(f3) - f2f4_2 := int64(f2_2) * int64(f4) - f2f5_2 := int64(f2_2) * int64(f5) - f2f6_2 := int64(f2_2) * int64(f6) - f2f7_2 := int64(f2_2) * int64(f7) - f2f8_38 := int64(f2_2) * int64(f8_19) - f2f9_38 := int64(f2) * int64(f9_38) - f3f3_2 := int64(f3_2) * int64(f3) - f3f4_2 := int64(f3_2) * int64(f4) - f3f5_4 := int64(f3_2) * int64(f5_2) - f3f6_2 := int64(f3_2) * int64(f6) - f3f7_76 := int64(f3_2) * int64(f7_38) - f3f8_38 := int64(f3_2) * int64(f8_19) - f3f9_76 := int64(f3_2) * int64(f9_38) - f4f4 := int64(f4) * int64(f4) - f4f5_2 := int64(f4_2) * int64(f5) - f4f6_38 := int64(f4_2) * int64(f6_19) - f4f7_38 := int64(f4) * int64(f7_38) - f4f8_38 := int64(f4_2) * int64(f8_19) - f4f9_38 := int64(f4) * int64(f9_38) - f5f5_38 := int64(f5) * int64(f5_38) - f5f6_38 := int64(f5_2) * int64(f6_19) - f5f7_76 := int64(f5_2) * int64(f7_38) - f5f8_38 := int64(f5_2) * int64(f8_19) - f5f9_76 := int64(f5_2) * int64(f9_38) - f6f6_19 := int64(f6) * int64(f6_19) - f6f7_38 := int64(f6) * int64(f7_38) - f6f8_38 := int64(f6_2) * int64(f8_19) - f6f9_38 := int64(f6) * int64(f9_38) - f7f7_38 := int64(f7) * int64(f7_38) - f7f8_38 := int64(f7_2) * int64(f8_19) - f7f9_76 := int64(f7_2) * int64(f9_38) - f8f8_19 := int64(f8) * int64(f8_19) - f8f9_38 := int64(f8) * int64(f9_38) - f9f9_38 := int64(f9) * int64(f9_38) - h0 := f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38 - h1 := f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38 - h2 := f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19 - h3 := f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38 - h4 := f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38 - h5 := f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38 - h6 := f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19 - h7 := f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38 - h8 := f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38 - h9 := f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2 - var carry [10]int64 - - carry[0] = (h0 + (1 << 25)) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - carry[4] = (h4 + (1 << 25)) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - - carry[1] = (h1 + (1 << 24)) >> 25 - h2 += carry[1] - h1 -= carry[1] << 25 - carry[5] = (h5 + (1 << 24)) >> 25 - h6 += carry[5] - h5 -= carry[5] << 25 - - carry[2] = (h2 + (1 << 25)) >> 26 - h3 += carry[2] - h2 -= carry[2] << 26 - carry[6] = (h6 + (1 << 25)) >> 26 - h7 += carry[6] - h6 -= carry[6] << 26 - - carry[3] = (h3 + (1 << 24)) >> 25 - h4 += carry[3] - h3 -= carry[3] << 25 - carry[7] = (h7 + (1 << 24)) >> 25 - h8 += carry[7] - h7 -= carry[7] << 25 - - carry[4] = (h4 + (1 << 25)) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - carry[8] = (h8 + (1 << 25)) >> 26 - h9 += carry[8] - h8 -= carry[8] << 26 - - carry[9] = (h9 + (1 << 24)) >> 25 - h0 += carry[9] * 19 - h9 -= carry[9] << 25 - - carry[0] = (h0 + (1 << 25)) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - - h[0] = int32(h0) - h[1] = int32(h1) - h[2] = int32(h2) - h[3] = int32(h3) - h[4] = int32(h4) - h[5] = int32(h5) - h[6] = int32(h6) - h[7] = int32(h7) - h[8] = int32(h8) - h[9] = int32(h9) -} - -// feMul121666 calculates h = f * 121666. Can overlap h with f. -// -// Preconditions: -// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -// -// Postconditions: -// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -func feMul121666(h, f *fieldElement) { - h0 := int64(f[0]) * 121666 - h1 := int64(f[1]) * 121666 - h2 := int64(f[2]) * 121666 - h3 := int64(f[3]) * 121666 - h4 := int64(f[4]) * 121666 - h5 := int64(f[5]) * 121666 - h6 := int64(f[6]) * 121666 - h7 := int64(f[7]) * 121666 - h8 := int64(f[8]) * 121666 - h9 := int64(f[9]) * 121666 - var carry [10]int64 - - carry[9] = (h9 + (1 << 24)) >> 25 - h0 += carry[9] * 19 - h9 -= carry[9] << 25 - carry[1] = (h1 + (1 << 24)) >> 25 - h2 += carry[1] - h1 -= carry[1] << 25 - carry[3] = (h3 + (1 << 24)) >> 25 - h4 += carry[3] - h3 -= carry[3] << 25 - carry[5] = (h5 + (1 << 24)) >> 25 - h6 += carry[5] - h5 -= carry[5] << 25 - carry[7] = (h7 + (1 << 24)) >> 25 - h8 += carry[7] - h7 -= carry[7] << 25 - - carry[0] = (h0 + (1 << 25)) >> 26 - h1 += carry[0] - h0 -= carry[0] << 26 - carry[2] = (h2 + (1 << 25)) >> 26 - h3 += carry[2] - h2 -= carry[2] << 26 - carry[4] = (h4 + (1 << 25)) >> 26 - h5 += carry[4] - h4 -= carry[4] << 26 - carry[6] = (h6 + (1 << 25)) >> 26 - h7 += carry[6] - h6 -= carry[6] << 26 - carry[8] = (h8 + (1 << 25)) >> 26 - h9 += carry[8] - h8 -= carry[8] << 26 - - h[0] = int32(h0) - h[1] = int32(h1) - h[2] = int32(h2) - h[3] = int32(h3) - h[4] = int32(h4) - h[5] = int32(h5) - h[6] = int32(h6) - h[7] = int32(h7) - h[8] = int32(h8) - h[9] = int32(h9) -} - -// feInvert sets out = z^-1. -func feInvert(out, z *fieldElement) { - var t0, t1, t2, t3 fieldElement - var i int - - feSquare(&t0, z) - for i = 1; i < 1; i++ { - feSquare(&t0, &t0) - } - feSquare(&t1, &t0) - for i = 1; i < 2; i++ { - feSquare(&t1, &t1) - } - feMul(&t1, z, &t1) - feMul(&t0, &t0, &t1) - feSquare(&t2, &t0) - for i = 1; i < 1; i++ { - feSquare(&t2, &t2) - } - feMul(&t1, &t1, &t2) - feSquare(&t2, &t1) - for i = 1; i < 5; i++ { - feSquare(&t2, &t2) - } - feMul(&t1, &t2, &t1) - feSquare(&t2, &t1) - for i = 1; i < 10; i++ { - feSquare(&t2, &t2) - } - feMul(&t2, &t2, &t1) - feSquare(&t3, &t2) - for i = 1; i < 20; i++ { - feSquare(&t3, &t3) - } - feMul(&t2, &t3, &t2) - feSquare(&t2, &t2) - for i = 1; i < 10; i++ { - feSquare(&t2, &t2) - } - feMul(&t1, &t2, &t1) - feSquare(&t2, &t1) - for i = 1; i < 50; i++ { - feSquare(&t2, &t2) - } - feMul(&t2, &t2, &t1) - feSquare(&t3, &t2) - for i = 1; i < 100; i++ { - feSquare(&t3, &t3) - } - feMul(&t2, &t3, &t2) - feSquare(&t2, &t2) - for i = 1; i < 50; i++ { - feSquare(&t2, &t2) - } - feMul(&t1, &t2, &t1) - feSquare(&t1, &t1) - for i = 1; i < 5; i++ { - feSquare(&t1, &t1) - } - feMul(out, &t1, &t0) -} - -func scalarMult(out, in, base *[32]byte) { - var e [32]byte - - copy(e[:], in[:]) - e[0] &= 248 - e[31] &= 127 - e[31] |= 64 - - var x1, x2, z2, x3, z3, tmp0, tmp1 fieldElement - feFromBytes(&x1, base) - feOne(&x2) - feCopy(&x3, &x1) - feOne(&z3) - - swap := int32(0) - for pos := 254; pos >= 0; pos-- { - b := e[pos/8] >> uint(pos&7) - b &= 1 - swap ^= int32(b) - feCSwap(&x2, &x3, swap) - feCSwap(&z2, &z3, swap) - swap = int32(b) - - feSub(&tmp0, &x3, &z3) - feSub(&tmp1, &x2, &z2) - feAdd(&x2, &x2, &z2) - feAdd(&z2, &x3, &z3) - feMul(&z3, &tmp0, &x2) - feMul(&z2, &z2, &tmp1) - feSquare(&tmp0, &tmp1) - feSquare(&tmp1, &x2) - feAdd(&x3, &z3, &z2) - feSub(&z2, &z3, &z2) - feMul(&x2, &tmp1, &tmp0) - feSub(&tmp1, &tmp1, &tmp0) - feSquare(&z2, &z2) - feMul121666(&z3, &tmp1) - feSquare(&x3, &x3) - feAdd(&tmp0, &tmp0, &z3) - feMul(&z3, &x1, &z2) - feMul(&z2, &tmp1, &tmp0) - } - - feCSwap(&x2, &x3, swap) - feCSwap(&z2, &z3, swap) - - feInvert(&z2, &z2) - feMul(&x2, &x2, &z2) - feToBytes(out, &x2) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519_test.go deleted file mode 100644 index 051a8301f0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/curve25519_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2012 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 curve25519 - -import ( - "fmt" - "testing" -) - -const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a" - -func TestBaseScalarMult(t *testing.T) { - var a, b [32]byte - in := &a - out := &b - a[0] = 1 - - for i := 0; i < 200; i++ { - ScalarBaseMult(out, in) - in, out = out, in - } - - result := fmt.Sprintf("%x", in[:]) - if result != expectedHex { - t.Errorf("incorrect result: got %s, want %s", result, expectedHex) - } -} - -func BenchmarkScalarBaseMult(b *testing.B) { - var in, out [32]byte - in[0] = 1 - - b.SetBytes(32) - for i := 0; i < b.N; i++ { - ScalarBaseMult(&out, &in) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/doc.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/doc.go deleted file mode 100644 index 076a8d4f10..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2012 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 curve25519 provides an implementation of scalar multiplication on -// the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html -package curve25519 - -// basePoint is the x coordinate of the generator of the curve. -var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - -// ScalarMult sets dst to the product in*base where dst and base are the x -// coordinates of group points and all values are in little-endian form. -func ScalarMult(dst, in, base *[32]byte) { - scalarMult(dst, in, base) -} - -// ScalarBaseMult sets dst to the product in*base where dst and base are the x -// coordinates of group points, base is the standard generator and all values -// are in little-endian form. -func ScalarBaseMult(dst, in *[32]byte) { - ScalarMult(dst, in, &basePoint) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/freeze_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/freeze_amd64.s deleted file mode 100644 index 390816106e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/freeze_amd64.s +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// +build amd64,!gccgo,!appengine - -#include "const_amd64.h" - -// func freeze(inout *[5]uint64) -TEXT ·freeze(SB),7,$0-8 - MOVQ inout+0(FP), DI - - MOVQ 0(DI),SI - MOVQ 8(DI),DX - MOVQ 16(DI),CX - MOVQ 24(DI),R8 - MOVQ 32(DI),R9 - MOVQ $REDMASK51,AX - MOVQ AX,R10 - SUBQ $18,R10 - MOVQ $3,R11 -REDUCELOOP: - MOVQ SI,R12 - SHRQ $51,R12 - ANDQ AX,SI - ADDQ R12,DX - MOVQ DX,R12 - SHRQ $51,R12 - ANDQ AX,DX - ADDQ R12,CX - MOVQ CX,R12 - SHRQ $51,R12 - ANDQ AX,CX - ADDQ R12,R8 - MOVQ R8,R12 - SHRQ $51,R12 - ANDQ AX,R8 - ADDQ R12,R9 - MOVQ R9,R12 - SHRQ $51,R12 - ANDQ AX,R9 - IMUL3Q $19,R12,R12 - ADDQ R12,SI - SUBQ $1,R11 - JA REDUCELOOP - MOVQ $1,R12 - CMPQ R10,SI - CMOVQLT R11,R12 - CMPQ AX,DX - CMOVQNE R11,R12 - CMPQ AX,CX - CMOVQNE R11,R12 - CMPQ AX,R8 - CMOVQNE R11,R12 - CMPQ AX,R9 - CMOVQNE R11,R12 - NEGQ R12 - ANDQ R12,AX - ANDQ R12,R10 - SUBQ R10,SI - SUBQ AX,DX - SUBQ AX,CX - SUBQ AX,R8 - SUBQ AX,R9 - MOVQ SI,0(DI) - MOVQ DX,8(DI) - MOVQ CX,16(DI) - MOVQ R8,24(DI) - MOVQ R9,32(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/ladderstep_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/ladderstep_amd64.s deleted file mode 100644 index 9e9040b250..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/ladderstep_amd64.s +++ /dev/null @@ -1,1377 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// +build amd64,!gccgo,!appengine - -#include "const_amd64.h" - -// func ladderstep(inout *[5][5]uint64) -TEXT ·ladderstep(SB),0,$296-8 - MOVQ inout+0(FP),DI - - MOVQ 40(DI),SI - MOVQ 48(DI),DX - MOVQ 56(DI),CX - MOVQ 64(DI),R8 - MOVQ 72(DI),R9 - MOVQ SI,AX - MOVQ DX,R10 - MOVQ CX,R11 - MOVQ R8,R12 - MOVQ R9,R13 - ADDQ ·_2P0(SB),AX - ADDQ ·_2P1234(SB),R10 - ADDQ ·_2P1234(SB),R11 - ADDQ ·_2P1234(SB),R12 - ADDQ ·_2P1234(SB),R13 - ADDQ 80(DI),SI - ADDQ 88(DI),DX - ADDQ 96(DI),CX - ADDQ 104(DI),R8 - ADDQ 112(DI),R9 - SUBQ 80(DI),AX - SUBQ 88(DI),R10 - SUBQ 96(DI),R11 - SUBQ 104(DI),R12 - SUBQ 112(DI),R13 - MOVQ SI,0(SP) - MOVQ DX,8(SP) - MOVQ CX,16(SP) - MOVQ R8,24(SP) - MOVQ R9,32(SP) - MOVQ AX,40(SP) - MOVQ R10,48(SP) - MOVQ R11,56(SP) - MOVQ R12,64(SP) - MOVQ R13,72(SP) - MOVQ 40(SP),AX - MULQ 40(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 40(SP),AX - SHLQ $1,AX - MULQ 48(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 40(SP),AX - SHLQ $1,AX - MULQ 56(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 40(SP),AX - SHLQ $1,AX - MULQ 64(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 40(SP),AX - SHLQ $1,AX - MULQ 72(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 48(SP),AX - MULQ 48(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 48(SP),AX - SHLQ $1,AX - MULQ 56(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 48(SP),AX - SHLQ $1,AX - MULQ 64(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 48(SP),DX - IMUL3Q $38,DX,AX - MULQ 72(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 56(SP),AX - MULQ 56(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 56(SP),DX - IMUL3Q $38,DX,AX - MULQ 64(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 56(SP),DX - IMUL3Q $38,DX,AX - MULQ 72(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 64(SP),DX - IMUL3Q $19,DX,AX - MULQ 64(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 64(SP),DX - IMUL3Q $38,DX,AX - MULQ 72(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 72(SP),DX - IMUL3Q $19,DX,AX - MULQ 72(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - ANDQ DX,SI - MOVQ CX,R8 - SHRQ $51,CX - ADDQ R10,CX - ANDQ DX,R8 - MOVQ CX,R9 - SHRQ $51,CX - ADDQ R12,CX - ANDQ DX,R9 - MOVQ CX,AX - SHRQ $51,CX - ADDQ R14,CX - ANDQ DX,AX - MOVQ CX,R10 - SHRQ $51,CX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,80(SP) - MOVQ R8,88(SP) - MOVQ R9,96(SP) - MOVQ AX,104(SP) - MOVQ R10,112(SP) - MOVQ 0(SP),AX - MULQ 0(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 0(SP),AX - SHLQ $1,AX - MULQ 8(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 0(SP),AX - SHLQ $1,AX - MULQ 16(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 0(SP),AX - SHLQ $1,AX - MULQ 24(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 0(SP),AX - SHLQ $1,AX - MULQ 32(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 8(SP),AX - MULQ 8(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SP),AX - SHLQ $1,AX - MULQ 16(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 8(SP),AX - SHLQ $1,AX - MULQ 24(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 8(SP),DX - IMUL3Q $38,DX,AX - MULQ 32(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 16(SP),AX - MULQ 16(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 16(SP),DX - IMUL3Q $38,DX,AX - MULQ 24(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 16(SP),DX - IMUL3Q $38,DX,AX - MULQ 32(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 24(SP),DX - IMUL3Q $19,DX,AX - MULQ 24(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 24(SP),DX - IMUL3Q $38,DX,AX - MULQ 32(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 32(SP),DX - IMUL3Q $19,DX,AX - MULQ 32(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - ANDQ DX,SI - MOVQ CX,R8 - SHRQ $51,CX - ADDQ R10,CX - ANDQ DX,R8 - MOVQ CX,R9 - SHRQ $51,CX - ADDQ R12,CX - ANDQ DX,R9 - MOVQ CX,AX - SHRQ $51,CX - ADDQ R14,CX - ANDQ DX,AX - MOVQ CX,R10 - SHRQ $51,CX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,120(SP) - MOVQ R8,128(SP) - MOVQ R9,136(SP) - MOVQ AX,144(SP) - MOVQ R10,152(SP) - MOVQ SI,SI - MOVQ R8,DX - MOVQ R9,CX - MOVQ AX,R8 - MOVQ R10,R9 - ADDQ ·_2P0(SB),SI - ADDQ ·_2P1234(SB),DX - ADDQ ·_2P1234(SB),CX - ADDQ ·_2P1234(SB),R8 - ADDQ ·_2P1234(SB),R9 - SUBQ 80(SP),SI - SUBQ 88(SP),DX - SUBQ 96(SP),CX - SUBQ 104(SP),R8 - SUBQ 112(SP),R9 - MOVQ SI,160(SP) - MOVQ DX,168(SP) - MOVQ CX,176(SP) - MOVQ R8,184(SP) - MOVQ R9,192(SP) - MOVQ 120(DI),SI - MOVQ 128(DI),DX - MOVQ 136(DI),CX - MOVQ 144(DI),R8 - MOVQ 152(DI),R9 - MOVQ SI,AX - MOVQ DX,R10 - MOVQ CX,R11 - MOVQ R8,R12 - MOVQ R9,R13 - ADDQ ·_2P0(SB),AX - ADDQ ·_2P1234(SB),R10 - ADDQ ·_2P1234(SB),R11 - ADDQ ·_2P1234(SB),R12 - ADDQ ·_2P1234(SB),R13 - ADDQ 160(DI),SI - ADDQ 168(DI),DX - ADDQ 176(DI),CX - ADDQ 184(DI),R8 - ADDQ 192(DI),R9 - SUBQ 160(DI),AX - SUBQ 168(DI),R10 - SUBQ 176(DI),R11 - SUBQ 184(DI),R12 - SUBQ 192(DI),R13 - MOVQ SI,200(SP) - MOVQ DX,208(SP) - MOVQ CX,216(SP) - MOVQ R8,224(SP) - MOVQ R9,232(SP) - MOVQ AX,240(SP) - MOVQ R10,248(SP) - MOVQ R11,256(SP) - MOVQ R12,264(SP) - MOVQ R13,272(SP) - MOVQ 224(SP),SI - IMUL3Q $19,SI,AX - MOVQ AX,280(SP) - MULQ 56(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 232(SP),DX - IMUL3Q $19,DX,AX - MOVQ AX,288(SP) - MULQ 48(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 200(SP),AX - MULQ 40(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 200(SP),AX - MULQ 48(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 200(SP),AX - MULQ 56(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 200(SP),AX - MULQ 64(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 200(SP),AX - MULQ 72(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 208(SP),AX - MULQ 40(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 208(SP),AX - MULQ 48(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 208(SP),AX - MULQ 56(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 208(SP),AX - MULQ 64(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 208(SP),DX - IMUL3Q $19,DX,AX - MULQ 72(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 216(SP),AX - MULQ 40(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 216(SP),AX - MULQ 48(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 216(SP),AX - MULQ 56(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 216(SP),DX - IMUL3Q $19,DX,AX - MULQ 64(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 216(SP),DX - IMUL3Q $19,DX,AX - MULQ 72(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 224(SP),AX - MULQ 40(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 224(SP),AX - MULQ 48(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 280(SP),AX - MULQ 64(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 280(SP),AX - MULQ 72(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 232(SP),AX - MULQ 40(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 288(SP),AX - MULQ 56(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 288(SP),AX - MULQ 64(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 288(SP),AX - MULQ 72(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $51,CX - ANDQ DX,SI - ADDQ R10,CX - MOVQ CX,R9 - SHRQ $51,CX - ANDQ DX,R8 - ADDQ R12,CX - MOVQ CX,AX - SHRQ $51,CX - ANDQ DX,R9 - ADDQ R14,CX - MOVQ CX,R10 - SHRQ $51,CX - ANDQ DX,AX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,40(SP) - MOVQ R8,48(SP) - MOVQ R9,56(SP) - MOVQ AX,64(SP) - MOVQ R10,72(SP) - MOVQ 264(SP),SI - IMUL3Q $19,SI,AX - MOVQ AX,200(SP) - MULQ 16(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 272(SP),DX - IMUL3Q $19,DX,AX - MOVQ AX,208(SP) - MULQ 8(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 240(SP),AX - MULQ 0(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 240(SP),AX - MULQ 8(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 240(SP),AX - MULQ 16(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 240(SP),AX - MULQ 24(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 240(SP),AX - MULQ 32(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 248(SP),AX - MULQ 0(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 248(SP),AX - MULQ 8(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 248(SP),AX - MULQ 16(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 248(SP),AX - MULQ 24(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 248(SP),DX - IMUL3Q $19,DX,AX - MULQ 32(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 256(SP),AX - MULQ 0(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 256(SP),AX - MULQ 8(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 256(SP),AX - MULQ 16(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 256(SP),DX - IMUL3Q $19,DX,AX - MULQ 24(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 256(SP),DX - IMUL3Q $19,DX,AX - MULQ 32(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 264(SP),AX - MULQ 0(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 264(SP),AX - MULQ 8(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 200(SP),AX - MULQ 24(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 200(SP),AX - MULQ 32(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 272(SP),AX - MULQ 0(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 208(SP),AX - MULQ 16(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 208(SP),AX - MULQ 24(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 208(SP),AX - MULQ 32(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $51,CX - ANDQ DX,SI - ADDQ R10,CX - MOVQ CX,R9 - SHRQ $51,CX - ANDQ DX,R8 - ADDQ R12,CX - MOVQ CX,AX - SHRQ $51,CX - ANDQ DX,R9 - ADDQ R14,CX - MOVQ CX,R10 - SHRQ $51,CX - ANDQ DX,AX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,DX - MOVQ R8,CX - MOVQ R9,R11 - MOVQ AX,R12 - MOVQ R10,R13 - ADDQ ·_2P0(SB),DX - ADDQ ·_2P1234(SB),CX - ADDQ ·_2P1234(SB),R11 - ADDQ ·_2P1234(SB),R12 - ADDQ ·_2P1234(SB),R13 - ADDQ 40(SP),SI - ADDQ 48(SP),R8 - ADDQ 56(SP),R9 - ADDQ 64(SP),AX - ADDQ 72(SP),R10 - SUBQ 40(SP),DX - SUBQ 48(SP),CX - SUBQ 56(SP),R11 - SUBQ 64(SP),R12 - SUBQ 72(SP),R13 - MOVQ SI,120(DI) - MOVQ R8,128(DI) - MOVQ R9,136(DI) - MOVQ AX,144(DI) - MOVQ R10,152(DI) - MOVQ DX,160(DI) - MOVQ CX,168(DI) - MOVQ R11,176(DI) - MOVQ R12,184(DI) - MOVQ R13,192(DI) - MOVQ 120(DI),AX - MULQ 120(DI) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 120(DI),AX - SHLQ $1,AX - MULQ 128(DI) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 120(DI),AX - SHLQ $1,AX - MULQ 136(DI) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 120(DI),AX - SHLQ $1,AX - MULQ 144(DI) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 120(DI),AX - SHLQ $1,AX - MULQ 152(DI) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 128(DI),AX - MULQ 128(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 128(DI),AX - SHLQ $1,AX - MULQ 136(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 128(DI),AX - SHLQ $1,AX - MULQ 144(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 128(DI),DX - IMUL3Q $38,DX,AX - MULQ 152(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 136(DI),AX - MULQ 136(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 136(DI),DX - IMUL3Q $38,DX,AX - MULQ 144(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 136(DI),DX - IMUL3Q $38,DX,AX - MULQ 152(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 144(DI),DX - IMUL3Q $19,DX,AX - MULQ 144(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 144(DI),DX - IMUL3Q $38,DX,AX - MULQ 152(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 152(DI),DX - IMUL3Q $19,DX,AX - MULQ 152(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - ANDQ DX,SI - MOVQ CX,R8 - SHRQ $51,CX - ADDQ R10,CX - ANDQ DX,R8 - MOVQ CX,R9 - SHRQ $51,CX - ADDQ R12,CX - ANDQ DX,R9 - MOVQ CX,AX - SHRQ $51,CX - ADDQ R14,CX - ANDQ DX,AX - MOVQ CX,R10 - SHRQ $51,CX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,120(DI) - MOVQ R8,128(DI) - MOVQ R9,136(DI) - MOVQ AX,144(DI) - MOVQ R10,152(DI) - MOVQ 160(DI),AX - MULQ 160(DI) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 160(DI),AX - SHLQ $1,AX - MULQ 168(DI) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 160(DI),AX - SHLQ $1,AX - MULQ 176(DI) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 160(DI),AX - SHLQ $1,AX - MULQ 184(DI) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 160(DI),AX - SHLQ $1,AX - MULQ 192(DI) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 168(DI),AX - MULQ 168(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 168(DI),AX - SHLQ $1,AX - MULQ 176(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 168(DI),AX - SHLQ $1,AX - MULQ 184(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 168(DI),DX - IMUL3Q $38,DX,AX - MULQ 192(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 176(DI),AX - MULQ 176(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 176(DI),DX - IMUL3Q $38,DX,AX - MULQ 184(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 176(DI),DX - IMUL3Q $38,DX,AX - MULQ 192(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 184(DI),DX - IMUL3Q $19,DX,AX - MULQ 184(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 184(DI),DX - IMUL3Q $38,DX,AX - MULQ 192(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 192(DI),DX - IMUL3Q $19,DX,AX - MULQ 192(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - ANDQ DX,SI - MOVQ CX,R8 - SHRQ $51,CX - ADDQ R10,CX - ANDQ DX,R8 - MOVQ CX,R9 - SHRQ $51,CX - ADDQ R12,CX - ANDQ DX,R9 - MOVQ CX,AX - SHRQ $51,CX - ADDQ R14,CX - ANDQ DX,AX - MOVQ CX,R10 - SHRQ $51,CX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,160(DI) - MOVQ R8,168(DI) - MOVQ R9,176(DI) - MOVQ AX,184(DI) - MOVQ R10,192(DI) - MOVQ 184(DI),SI - IMUL3Q $19,SI,AX - MOVQ AX,0(SP) - MULQ 16(DI) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 192(DI),DX - IMUL3Q $19,DX,AX - MOVQ AX,8(SP) - MULQ 8(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 160(DI),AX - MULQ 0(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 160(DI),AX - MULQ 8(DI) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 160(DI),AX - MULQ 16(DI) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 160(DI),AX - MULQ 24(DI) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 160(DI),AX - MULQ 32(DI) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 168(DI),AX - MULQ 0(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 168(DI),AX - MULQ 8(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 168(DI),AX - MULQ 16(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 168(DI),AX - MULQ 24(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 168(DI),DX - IMUL3Q $19,DX,AX - MULQ 32(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 176(DI),AX - MULQ 0(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 176(DI),AX - MULQ 8(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 176(DI),AX - MULQ 16(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 176(DI),DX - IMUL3Q $19,DX,AX - MULQ 24(DI) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 176(DI),DX - IMUL3Q $19,DX,AX - MULQ 32(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 184(DI),AX - MULQ 0(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 184(DI),AX - MULQ 8(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 0(SP),AX - MULQ 24(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 0(SP),AX - MULQ 32(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 192(DI),AX - MULQ 0(DI) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 8(SP),AX - MULQ 16(DI) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 8(SP),AX - MULQ 24(DI) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SP),AX - MULQ 32(DI) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $51,CX - ANDQ DX,SI - ADDQ R10,CX - MOVQ CX,R9 - SHRQ $51,CX - ANDQ DX,R8 - ADDQ R12,CX - MOVQ CX,AX - SHRQ $51,CX - ANDQ DX,R9 - ADDQ R14,CX - MOVQ CX,R10 - SHRQ $51,CX - ANDQ DX,AX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,160(DI) - MOVQ R8,168(DI) - MOVQ R9,176(DI) - MOVQ AX,184(DI) - MOVQ R10,192(DI) - MOVQ 144(SP),SI - IMUL3Q $19,SI,AX - MOVQ AX,0(SP) - MULQ 96(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 152(SP),DX - IMUL3Q $19,DX,AX - MOVQ AX,8(SP) - MULQ 88(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 120(SP),AX - MULQ 80(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 120(SP),AX - MULQ 88(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 120(SP),AX - MULQ 96(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 120(SP),AX - MULQ 104(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 120(SP),AX - MULQ 112(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 128(SP),AX - MULQ 80(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 128(SP),AX - MULQ 88(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 128(SP),AX - MULQ 96(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 128(SP),AX - MULQ 104(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 128(SP),DX - IMUL3Q $19,DX,AX - MULQ 112(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 136(SP),AX - MULQ 80(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 136(SP),AX - MULQ 88(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 136(SP),AX - MULQ 96(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 136(SP),DX - IMUL3Q $19,DX,AX - MULQ 104(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 136(SP),DX - IMUL3Q $19,DX,AX - MULQ 112(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 144(SP),AX - MULQ 80(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 144(SP),AX - MULQ 88(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 0(SP),AX - MULQ 104(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 0(SP),AX - MULQ 112(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 152(SP),AX - MULQ 80(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 8(SP),AX - MULQ 96(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 8(SP),AX - MULQ 104(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SP),AX - MULQ 112(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $51,CX - ANDQ DX,SI - ADDQ R10,CX - MOVQ CX,R9 - SHRQ $51,CX - ANDQ DX,R8 - ADDQ R12,CX - MOVQ CX,AX - SHRQ $51,CX - ANDQ DX,R9 - ADDQ R14,CX - MOVQ CX,R10 - SHRQ $51,CX - ANDQ DX,AX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,40(DI) - MOVQ R8,48(DI) - MOVQ R9,56(DI) - MOVQ AX,64(DI) - MOVQ R10,72(DI) - MOVQ 160(SP),AX - MULQ ·_121666_213(SB) - SHRQ $13,AX - MOVQ AX,SI - MOVQ DX,CX - MOVQ 168(SP),AX - MULQ ·_121666_213(SB) - SHRQ $13,AX - ADDQ AX,CX - MOVQ DX,R8 - MOVQ 176(SP),AX - MULQ ·_121666_213(SB) - SHRQ $13,AX - ADDQ AX,R8 - MOVQ DX,R9 - MOVQ 184(SP),AX - MULQ ·_121666_213(SB) - SHRQ $13,AX - ADDQ AX,R9 - MOVQ DX,R10 - MOVQ 192(SP),AX - MULQ ·_121666_213(SB) - SHRQ $13,AX - ADDQ AX,R10 - IMUL3Q $19,DX,DX - ADDQ DX,SI - ADDQ 80(SP),SI - ADDQ 88(SP),CX - ADDQ 96(SP),R8 - ADDQ 104(SP),R9 - ADDQ 112(SP),R10 - MOVQ SI,80(DI) - MOVQ CX,88(DI) - MOVQ R8,96(DI) - MOVQ R9,104(DI) - MOVQ R10,112(DI) - MOVQ 104(DI),SI - IMUL3Q $19,SI,AX - MOVQ AX,0(SP) - MULQ 176(SP) - MOVQ AX,SI - MOVQ DX,CX - MOVQ 112(DI),DX - IMUL3Q $19,DX,AX - MOVQ AX,8(SP) - MULQ 168(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 80(DI),AX - MULQ 160(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 80(DI),AX - MULQ 168(SP) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 80(DI),AX - MULQ 176(SP) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 80(DI),AX - MULQ 184(SP) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 80(DI),AX - MULQ 192(SP) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 88(DI),AX - MULQ 160(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 88(DI),AX - MULQ 168(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 88(DI),AX - MULQ 176(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 88(DI),AX - MULQ 184(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 88(DI),DX - IMUL3Q $19,DX,AX - MULQ 192(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 96(DI),AX - MULQ 160(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 96(DI),AX - MULQ 168(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 96(DI),AX - MULQ 176(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 96(DI),DX - IMUL3Q $19,DX,AX - MULQ 184(SP) - ADDQ AX,SI - ADCQ DX,CX - MOVQ 96(DI),DX - IMUL3Q $19,DX,AX - MULQ 192(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 104(DI),AX - MULQ 160(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 104(DI),AX - MULQ 168(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 0(SP),AX - MULQ 184(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 0(SP),AX - MULQ 192(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 112(DI),AX - MULQ 160(SP) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 8(SP),AX - MULQ 176(SP) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 8(SP),AX - MULQ 184(SP) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SP),AX - MULQ 192(SP) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ $REDMASK51,DX - SHLQ $13,CX:SI - ANDQ DX,SI - SHLQ $13,R9:R8 - ANDQ DX,R8 - ADDQ CX,R8 - SHLQ $13,R11:R10 - ANDQ DX,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ DX,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ DX,R14 - ADDQ R13,R14 - IMUL3Q $19,R15,CX - ADDQ CX,SI - MOVQ SI,CX - SHRQ $51,CX - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $51,CX - ANDQ DX,SI - ADDQ R10,CX - MOVQ CX,R9 - SHRQ $51,CX - ANDQ DX,R8 - ADDQ R12,CX - MOVQ CX,AX - SHRQ $51,CX - ANDQ DX,R9 - ADDQ R14,CX - MOVQ CX,R10 - SHRQ $51,CX - ANDQ DX,AX - IMUL3Q $19,CX,CX - ADDQ CX,SI - ANDQ DX,R10 - MOVQ SI,80(DI) - MOVQ R8,88(DI) - MOVQ R9,96(DI) - MOVQ AX,104(DI) - MOVQ R10,112(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mont25519_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mont25519_amd64.go deleted file mode 100644 index 5822bd5338..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mont25519_amd64.go +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright 2012 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. - -// +build amd64,!gccgo,!appengine - -package curve25519 - -// These functions are implemented in the .s files. The names of the functions -// in the rest of the file are also taken from the SUPERCOP sources to help -// people following along. - -//go:noescape - -func cswap(inout *[5]uint64, v uint64) - -//go:noescape - -func ladderstep(inout *[5][5]uint64) - -//go:noescape - -func freeze(inout *[5]uint64) - -//go:noescape - -func mul(dest, a, b *[5]uint64) - -//go:noescape - -func square(out, in *[5]uint64) - -// mladder uses a Montgomery ladder to calculate (xr/zr) *= s. -func mladder(xr, zr *[5]uint64, s *[32]byte) { - var work [5][5]uint64 - - work[0] = *xr - setint(&work[1], 1) - setint(&work[2], 0) - work[3] = *xr - setint(&work[4], 1) - - j := uint(6) - var prevbit byte - - for i := 31; i >= 0; i-- { - for j < 8 { - bit := ((*s)[i] >> j) & 1 - swap := bit ^ prevbit - prevbit = bit - cswap(&work[1], uint64(swap)) - ladderstep(&work) - j-- - } - j = 7 - } - - *xr = work[1] - *zr = work[2] -} - -func scalarMult(out, in, base *[32]byte) { - var e [32]byte - copy(e[:], (*in)[:]) - e[0] &= 248 - e[31] &= 127 - e[31] |= 64 - - var t, z [5]uint64 - unpack(&t, base) - mladder(&t, &z, &e) - invert(&z, &z) - mul(&t, &t, &z) - pack(out, &t) -} - -func setint(r *[5]uint64, v uint64) { - r[0] = v - r[1] = 0 - r[2] = 0 - r[3] = 0 - r[4] = 0 -} - -// unpack sets r = x where r consists of 5, 51-bit limbs in little-endian -// order. -func unpack(r *[5]uint64, x *[32]byte) { - r[0] = uint64(x[0]) | - uint64(x[1])<<8 | - uint64(x[2])<<16 | - uint64(x[3])<<24 | - uint64(x[4])<<32 | - uint64(x[5])<<40 | - uint64(x[6]&7)<<48 - - r[1] = uint64(x[6])>>3 | - uint64(x[7])<<5 | - uint64(x[8])<<13 | - uint64(x[9])<<21 | - uint64(x[10])<<29 | - uint64(x[11])<<37 | - uint64(x[12]&63)<<45 - - r[2] = uint64(x[12])>>6 | - uint64(x[13])<<2 | - uint64(x[14])<<10 | - uint64(x[15])<<18 | - uint64(x[16])<<26 | - uint64(x[17])<<34 | - uint64(x[18])<<42 | - uint64(x[19]&1)<<50 - - r[3] = uint64(x[19])>>1 | - uint64(x[20])<<7 | - uint64(x[21])<<15 | - uint64(x[22])<<23 | - uint64(x[23])<<31 | - uint64(x[24])<<39 | - uint64(x[25]&15)<<47 - - r[4] = uint64(x[25])>>4 | - uint64(x[26])<<4 | - uint64(x[27])<<12 | - uint64(x[28])<<20 | - uint64(x[29])<<28 | - uint64(x[30])<<36 | - uint64(x[31]&127)<<44 -} - -// pack sets out = x where out is the usual, little-endian form of the 5, -// 51-bit limbs in x. -func pack(out *[32]byte, x *[5]uint64) { - t := *x - freeze(&t) - - out[0] = byte(t[0]) - out[1] = byte(t[0] >> 8) - out[2] = byte(t[0] >> 16) - out[3] = byte(t[0] >> 24) - out[4] = byte(t[0] >> 32) - out[5] = byte(t[0] >> 40) - out[6] = byte(t[0] >> 48) - - out[6] ^= byte(t[1]<<3) & 0xf8 - out[7] = byte(t[1] >> 5) - out[8] = byte(t[1] >> 13) - out[9] = byte(t[1] >> 21) - out[10] = byte(t[1] >> 29) - out[11] = byte(t[1] >> 37) - out[12] = byte(t[1] >> 45) - - out[12] ^= byte(t[2]<<6) & 0xc0 - out[13] = byte(t[2] >> 2) - out[14] = byte(t[2] >> 10) - out[15] = byte(t[2] >> 18) - out[16] = byte(t[2] >> 26) - out[17] = byte(t[2] >> 34) - out[18] = byte(t[2] >> 42) - out[19] = byte(t[2] >> 50) - - out[19] ^= byte(t[3]<<1) & 0xfe - out[20] = byte(t[3] >> 7) - out[21] = byte(t[3] >> 15) - out[22] = byte(t[3] >> 23) - out[23] = byte(t[3] >> 31) - out[24] = byte(t[3] >> 39) - out[25] = byte(t[3] >> 47) - - out[25] ^= byte(t[4]<<4) & 0xf0 - out[26] = byte(t[4] >> 4) - out[27] = byte(t[4] >> 12) - out[28] = byte(t[4] >> 20) - out[29] = byte(t[4] >> 28) - out[30] = byte(t[4] >> 36) - out[31] = byte(t[4] >> 44) -} - -// invert calculates r = x^-1 mod p using Fermat's little theorem. -func invert(r *[5]uint64, x *[5]uint64) { - var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t [5]uint64 - - square(&z2, x) /* 2 */ - square(&t, &z2) /* 4 */ - square(&t, &t) /* 8 */ - mul(&z9, &t, x) /* 9 */ - mul(&z11, &z9, &z2) /* 11 */ - square(&t, &z11) /* 22 */ - mul(&z2_5_0, &t, &z9) /* 2^5 - 2^0 = 31 */ - - square(&t, &z2_5_0) /* 2^6 - 2^1 */ - for i := 1; i < 5; i++ { /* 2^20 - 2^10 */ - square(&t, &t) - } - mul(&z2_10_0, &t, &z2_5_0) /* 2^10 - 2^0 */ - - square(&t, &z2_10_0) /* 2^11 - 2^1 */ - for i := 1; i < 10; i++ { /* 2^20 - 2^10 */ - square(&t, &t) - } - mul(&z2_20_0, &t, &z2_10_0) /* 2^20 - 2^0 */ - - square(&t, &z2_20_0) /* 2^21 - 2^1 */ - for i := 1; i < 20; i++ { /* 2^40 - 2^20 */ - square(&t, &t) - } - mul(&t, &t, &z2_20_0) /* 2^40 - 2^0 */ - - square(&t, &t) /* 2^41 - 2^1 */ - for i := 1; i < 10; i++ { /* 2^50 - 2^10 */ - square(&t, &t) - } - mul(&z2_50_0, &t, &z2_10_0) /* 2^50 - 2^0 */ - - square(&t, &z2_50_0) /* 2^51 - 2^1 */ - for i := 1; i < 50; i++ { /* 2^100 - 2^50 */ - square(&t, &t) - } - mul(&z2_100_0, &t, &z2_50_0) /* 2^100 - 2^0 */ - - square(&t, &z2_100_0) /* 2^101 - 2^1 */ - for i := 1; i < 100; i++ { /* 2^200 - 2^100 */ - square(&t, &t) - } - mul(&t, &t, &z2_100_0) /* 2^200 - 2^0 */ - - square(&t, &t) /* 2^201 - 2^1 */ - for i := 1; i < 50; i++ { /* 2^250 - 2^50 */ - square(&t, &t) - } - mul(&t, &t, &z2_50_0) /* 2^250 - 2^0 */ - - square(&t, &t) /* 2^251 - 2^1 */ - square(&t, &t) /* 2^252 - 2^2 */ - square(&t, &t) /* 2^253 - 2^3 */ - - square(&t, &t) /* 2^254 - 2^4 */ - - square(&t, &t) /* 2^255 - 2^5 */ - mul(r, &t, &z11) /* 2^255 - 21 */ -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mul_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mul_amd64.s deleted file mode 100644 index 5ce80a2e56..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/mul_amd64.s +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// +build amd64,!gccgo,!appengine - -#include "const_amd64.h" - -// func mul(dest, a, b *[5]uint64) -TEXT ·mul(SB),0,$16-24 - MOVQ dest+0(FP), DI - MOVQ a+8(FP), SI - MOVQ b+16(FP), DX - - MOVQ DX,CX - MOVQ 24(SI),DX - IMUL3Q $19,DX,AX - MOVQ AX,0(SP) - MULQ 16(CX) - MOVQ AX,R8 - MOVQ DX,R9 - MOVQ 32(SI),DX - IMUL3Q $19,DX,AX - MOVQ AX,8(SP) - MULQ 8(CX) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 0(SI),AX - MULQ 0(CX) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 0(SI),AX - MULQ 8(CX) - MOVQ AX,R10 - MOVQ DX,R11 - MOVQ 0(SI),AX - MULQ 16(CX) - MOVQ AX,R12 - MOVQ DX,R13 - MOVQ 0(SI),AX - MULQ 24(CX) - MOVQ AX,R14 - MOVQ DX,R15 - MOVQ 0(SI),AX - MULQ 32(CX) - MOVQ AX,BX - MOVQ DX,BP - MOVQ 8(SI),AX - MULQ 0(CX) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SI),AX - MULQ 8(CX) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 8(SI),AX - MULQ 16(CX) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 8(SI),AX - MULQ 24(CX) - ADDQ AX,BX - ADCQ DX,BP - MOVQ 8(SI),DX - IMUL3Q $19,DX,AX - MULQ 32(CX) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 16(SI),AX - MULQ 0(CX) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 16(SI),AX - MULQ 8(CX) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 16(SI),AX - MULQ 16(CX) - ADDQ AX,BX - ADCQ DX,BP - MOVQ 16(SI),DX - IMUL3Q $19,DX,AX - MULQ 24(CX) - ADDQ AX,R8 - ADCQ DX,R9 - MOVQ 16(SI),DX - IMUL3Q $19,DX,AX - MULQ 32(CX) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 24(SI),AX - MULQ 0(CX) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ 24(SI),AX - MULQ 8(CX) - ADDQ AX,BX - ADCQ DX,BP - MOVQ 0(SP),AX - MULQ 24(CX) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 0(SP),AX - MULQ 32(CX) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 32(SI),AX - MULQ 0(CX) - ADDQ AX,BX - ADCQ DX,BP - MOVQ 8(SP),AX - MULQ 16(CX) - ADDQ AX,R10 - ADCQ DX,R11 - MOVQ 8(SP),AX - MULQ 24(CX) - ADDQ AX,R12 - ADCQ DX,R13 - MOVQ 8(SP),AX - MULQ 32(CX) - ADDQ AX,R14 - ADCQ DX,R15 - MOVQ $REDMASK51,SI - SHLQ $13,R9:R8 - ANDQ SI,R8 - SHLQ $13,R11:R10 - ANDQ SI,R10 - ADDQ R9,R10 - SHLQ $13,R13:R12 - ANDQ SI,R12 - ADDQ R11,R12 - SHLQ $13,R15:R14 - ANDQ SI,R14 - ADDQ R13,R14 - SHLQ $13,BP:BX - ANDQ SI,BX - ADDQ R15,BX - IMUL3Q $19,BP,DX - ADDQ DX,R8 - MOVQ R8,DX - SHRQ $51,DX - ADDQ R10,DX - MOVQ DX,CX - SHRQ $51,DX - ANDQ SI,R8 - ADDQ R12,DX - MOVQ DX,R9 - SHRQ $51,DX - ANDQ SI,CX - ADDQ R14,DX - MOVQ DX,AX - SHRQ $51,DX - ANDQ SI,R9 - ADDQ BX,DX - MOVQ DX,R10 - SHRQ $51,DX - ANDQ SI,AX - IMUL3Q $19,DX,DX - ADDQ DX,R8 - ANDQ SI,R10 - MOVQ R8,0(DI) - MOVQ CX,8(DI) - MOVQ R9,16(DI) - MOVQ AX,24(DI) - MOVQ R10,32(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/square_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/square_amd64.s deleted file mode 100644 index 12f73734ff..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519/square_amd64.s +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2012 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. - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// +build amd64,!gccgo,!appengine - -#include "const_amd64.h" - -// func square(out, in *[5]uint64) -TEXT ·square(SB),7,$0-16 - MOVQ out+0(FP), DI - MOVQ in+8(FP), SI - - MOVQ 0(SI),AX - MULQ 0(SI) - MOVQ AX,CX - MOVQ DX,R8 - MOVQ 0(SI),AX - SHLQ $1,AX - MULQ 8(SI) - MOVQ AX,R9 - MOVQ DX,R10 - MOVQ 0(SI),AX - SHLQ $1,AX - MULQ 16(SI) - MOVQ AX,R11 - MOVQ DX,R12 - MOVQ 0(SI),AX - SHLQ $1,AX - MULQ 24(SI) - MOVQ AX,R13 - MOVQ DX,R14 - MOVQ 0(SI),AX - SHLQ $1,AX - MULQ 32(SI) - MOVQ AX,R15 - MOVQ DX,BX - MOVQ 8(SI),AX - MULQ 8(SI) - ADDQ AX,R11 - ADCQ DX,R12 - MOVQ 8(SI),AX - SHLQ $1,AX - MULQ 16(SI) - ADDQ AX,R13 - ADCQ DX,R14 - MOVQ 8(SI),AX - SHLQ $1,AX - MULQ 24(SI) - ADDQ AX,R15 - ADCQ DX,BX - MOVQ 8(SI),DX - IMUL3Q $38,DX,AX - MULQ 32(SI) - ADDQ AX,CX - ADCQ DX,R8 - MOVQ 16(SI),AX - MULQ 16(SI) - ADDQ AX,R15 - ADCQ DX,BX - MOVQ 16(SI),DX - IMUL3Q $38,DX,AX - MULQ 24(SI) - ADDQ AX,CX - ADCQ DX,R8 - MOVQ 16(SI),DX - IMUL3Q $38,DX,AX - MULQ 32(SI) - ADDQ AX,R9 - ADCQ DX,R10 - MOVQ 24(SI),DX - IMUL3Q $19,DX,AX - MULQ 24(SI) - ADDQ AX,R9 - ADCQ DX,R10 - MOVQ 24(SI),DX - IMUL3Q $38,DX,AX - MULQ 32(SI) - ADDQ AX,R11 - ADCQ DX,R12 - MOVQ 32(SI),DX - IMUL3Q $19,DX,AX - MULQ 32(SI) - ADDQ AX,R13 - ADCQ DX,R14 - MOVQ $REDMASK51,SI - SHLQ $13,R8:CX - ANDQ SI,CX - SHLQ $13,R10:R9 - ANDQ SI,R9 - ADDQ R8,R9 - SHLQ $13,R12:R11 - ANDQ SI,R11 - ADDQ R10,R11 - SHLQ $13,R14:R13 - ANDQ SI,R13 - ADDQ R12,R13 - SHLQ $13,BX:R15 - ANDQ SI,R15 - ADDQ R14,R15 - IMUL3Q $19,BX,DX - ADDQ DX,CX - MOVQ CX,DX - SHRQ $51,DX - ADDQ R9,DX - ANDQ SI,CX - MOVQ DX,R8 - SHRQ $51,DX - ADDQ R11,DX - ANDQ SI,R8 - MOVQ DX,R9 - SHRQ $51,DX - ADDQ R13,DX - ANDQ SI,R9 - MOVQ DX,AX - SHRQ $51,DX - ADDQ R15,DX - ANDQ SI,AX - MOVQ DX,R10 - SHRQ $51,DX - IMUL3Q $19,DX,DX - ADDQ DX,CX - ANDQ SI,R10 - MOVQ CX,0(DI) - MOVQ R8,8(DI) - MOVQ R9,16(DI) - MOVQ AX,24(DI) - MOVQ R10,32(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/ed25519_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/ed25519_test.go deleted file mode 100644 index 97fedce17b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/ed25519_test.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2016 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 ed25519 - -import ( - "bufio" - "bytes" - "compress/gzip" - "crypto" - "crypto/rand" - "encoding/hex" - "os" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/internal/edwards25519" -) - -type zeroReader struct{} - -func (zeroReader) Read(buf []byte) (int, error) { - for i := range buf { - buf[i] = 0 - } - return len(buf), nil -} - -func TestUnmarshalMarshal(t *testing.T) { - pub, _, _ := GenerateKey(rand.Reader) - - var A edwards25519.ExtendedGroupElement - var pubBytes [32]byte - copy(pubBytes[:], pub) - if !A.FromBytes(&pubBytes) { - t.Fatalf("ExtendedGroupElement.FromBytes failed") - } - - var pub2 [32]byte - A.ToBytes(&pub2) - - if pubBytes != pub2 { - t.Errorf("FromBytes(%v)->ToBytes does not round-trip, got %x\n", pubBytes, pub2) - } -} - -func TestSignVerify(t *testing.T) { - var zero zeroReader - public, private, _ := GenerateKey(zero) - - message := []byte("test message") - sig := Sign(private, message) - if !Verify(public, message, sig) { - t.Errorf("valid signature rejected") - } - - wrongMessage := []byte("wrong message") - if Verify(public, wrongMessage, sig) { - t.Errorf("signature of different message accepted") - } -} - -func TestCryptoSigner(t *testing.T) { - var zero zeroReader - public, private, _ := GenerateKey(zero) - - signer := crypto.Signer(private) - - publicInterface := signer.Public() - public2, ok := publicInterface.(PublicKey) - if !ok { - t.Fatalf("expected PublicKey from Public() but got %T", publicInterface) - } - - if !bytes.Equal(public, public2) { - t.Errorf("public keys do not match: original:%x vs Public():%x", public, public2) - } - - message := []byte("message") - var noHash crypto.Hash - signature, err := signer.Sign(zero, message, noHash) - if err != nil { - t.Fatalf("error from Sign(): %s", err) - } - - if !Verify(public, message, signature) { - t.Errorf("Verify failed on signature from Sign()") - } -} - -func TestGolden(t *testing.T) { - // sign.input.gz is a selection of test cases from - // https://ed25519.cr.yp.to/python/sign.input - testDataZ, err := os.Open("testdata/sign.input.gz") - if err != nil { - t.Fatal(err) - } - defer testDataZ.Close() - testData, err := gzip.NewReader(testDataZ) - if err != nil { - t.Fatal(err) - } - defer testData.Close() - - scanner := bufio.NewScanner(testData) - lineNo := 0 - - for scanner.Scan() { - lineNo++ - - line := scanner.Text() - parts := strings.Split(line, ":") - if len(parts) != 5 { - t.Fatalf("bad number of parts on line %d", lineNo) - } - - privBytes, _ := hex.DecodeString(parts[0]) - pubKey, _ := hex.DecodeString(parts[1]) - msg, _ := hex.DecodeString(parts[2]) - sig, _ := hex.DecodeString(parts[3]) - // The signatures in the test vectors also include the message - // at the end, but we just want R and S. - sig = sig[:SignatureSize] - - if l := len(pubKey); l != PublicKeySize { - t.Fatalf("bad public key length on line %d: got %d bytes", lineNo, l) - } - - var priv [PrivateKeySize]byte - copy(priv[:], privBytes) - copy(priv[32:], pubKey) - - sig2 := Sign(priv[:], msg) - if !bytes.Equal(sig, sig2[:]) { - t.Errorf("different signature result on line %d: %x vs %x", lineNo, sig, sig2) - } - - if !Verify(pubKey, msg, sig2) { - t.Errorf("signature failed to verify on line %d", lineNo) - } - - priv2 := NewKeyFromSeed(priv[:32]) - if !bytes.Equal(priv[:], priv2) { - t.Errorf("recreating key pair gave different private key on line %d: %x vs %x", lineNo, priv[:], priv2) - } - - if pubKey2 := priv2.Public().(PublicKey); !bytes.Equal(pubKey, pubKey2) { - t.Errorf("recreating key pair gave different public key on line %d: %x vs %x", lineNo, pubKey, pubKey2) - } - - if seed := priv2.Seed(); !bytes.Equal(priv[:32], seed) { - t.Errorf("recreating key pair gave different seed on line %d: %x vs %x", lineNo, priv[:32], seed) - } - } - - if err := scanner.Err(); err != nil { - t.Fatalf("error reading test data: %s", err) - } -} - -func TestMalleability(t *testing.T) { - // https://tools.ietf.org/html/rfc8032#section-5.1.7 adds an additional test - // that s be in [0, order). This prevents someone from adding a multiple of - // order to s and obtaining a second valid signature for the same message. - msg := []byte{0x54, 0x65, 0x73, 0x74} - sig := []byte{ - 0x7c, 0x38, 0xe0, 0x26, 0xf2, 0x9e, 0x14, 0xaa, 0xbd, 0x05, 0x9a, - 0x0f, 0x2d, 0xb8, 0xb0, 0xcd, 0x78, 0x30, 0x40, 0x60, 0x9a, 0x8b, - 0xe6, 0x84, 0xdb, 0x12, 0xf8, 0x2a, 0x27, 0x77, 0x4a, 0xb0, 0x67, - 0x65, 0x4b, 0xce, 0x38, 0x32, 0xc2, 0xd7, 0x6f, 0x8f, 0x6f, 0x5d, - 0xaf, 0xc0, 0x8d, 0x93, 0x39, 0xd4, 0xee, 0xf6, 0x76, 0x57, 0x33, - 0x36, 0xa5, 0xc5, 0x1e, 0xb6, 0xf9, 0x46, 0xb3, 0x1d, - } - publicKey := []byte{ - 0x7d, 0x4d, 0x0e, 0x7f, 0x61, 0x53, 0xa6, 0x9b, 0x62, 0x42, 0xb5, - 0x22, 0xab, 0xbe, 0xe6, 0x85, 0xfd, 0xa4, 0x42, 0x0f, 0x88, 0x34, - 0xb1, 0x08, 0xc3, 0xbd, 0xae, 0x36, 0x9e, 0xf5, 0x49, 0xfa, - } - - if Verify(publicKey, msg, sig) { - t.Fatal("non-canonical signature accepted") - } -} - -func BenchmarkKeyGeneration(b *testing.B) { - var zero zeroReader - for i := 0; i < b.N; i++ { - if _, _, err := GenerateKey(zero); err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkSigning(b *testing.B) { - var zero zeroReader - _, priv, err := GenerateKey(zero) - if err != nil { - b.Fatal(err) - } - message := []byte("Hello, world!") - b.ResetTimer() - for i := 0; i < b.N; i++ { - Sign(priv, message) - } -} - -func BenchmarkVerification(b *testing.B) { - var zero zeroReader - pub, priv, err := GenerateKey(zero) - if err != nil { - b.Fatal(err) - } - message := []byte("Hello, world!") - signature := Sign(priv, message) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Verify(pub, message, signature) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/testdata/sign.input.gz b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/testdata/sign.input.gz deleted file mode 100644 index 41030690c0..0000000000 Binary files a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519/testdata/sign.input.gz and /dev/null differ diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/example_test.go deleted file mode 100644 index 671f2409ae..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/example_test.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2014 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 hkdf_test - -import ( - "bytes" - "crypto/rand" - "crypto/sha256" - "fmt" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf" - "io" -) - -// Usage example that expands one master key into three other cryptographically -// secure keys. -func Example_usage() { - // Underlying hash function to use - hash := sha256.New - - // Cryptographically secure master key. - master := []byte{0x00, 0x01, 0x02, 0x03} // i.e. NOT this. - - // Non secret salt, optional (can be nil) - // Recommended: hash-length sized random - salt := make([]byte, hash().Size()) - n, err := io.ReadFull(rand.Reader, salt) - if n != len(salt) || err != nil { - fmt.Println("error:", err) - return - } - - // Non secret context specific info, optional (can be nil). - // Note, independent from the master key. - info := []byte{0x03, 0x14, 0x15, 0x92, 0x65} - - // Create the key derivation function - hkdf := hkdf.New(hash, master, salt, info) - - // Generate the required keys - keys := make([][]byte, 3) - for i := 0; i < len(keys); i++ { - keys[i] = make([]byte, 24) - n, err := io.ReadFull(hkdf, keys[i]) - if n != len(keys[i]) || err != nil { - fmt.Println("error:", err) - return - } - } - - // Keys should contain 192 bit random keys - for i := 1; i <= len(keys); i++ { - fmt.Printf("Key #%d: %v\n", i, !bytes.Equal(keys[i-1], make([]byte, 24))) - } - - // Output: - // Key #1: true - // Key #2: true - // Key #3: true -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf.go deleted file mode 100644 index 5c6cf6ffa7..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 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 hkdf implements the HMAC-based Extract-and-Expand Key Derivation -// Function (HKDF) as defined in RFC 5869. -// -// HKDF is a cryptographic key derivation function (KDF) with the goal of -// expanding limited input keying material into one or more cryptographically -// strong secret keys. -// -// RFC 5869: https://tools.ietf.org/html/rfc5869 -package hkdf - -import ( - "crypto/hmac" - "errors" - "hash" - "io" -) - -type hkdf struct { - expander hash.Hash - size int - - info []byte - counter byte - - prev []byte - cache []byte -} - -func (f *hkdf) Read(p []byte) (int, error) { - // Check whether enough data can be generated - need := len(p) - remains := len(f.cache) + int(255-f.counter+1)*f.size - if remains < need { - return 0, errors.New("hkdf: entropy limit reached") - } - // Read from the cache, if enough data is present - n := copy(p, f.cache) - p = p[n:] - - // Fill the buffer - for len(p) > 0 { - f.expander.Reset() - f.expander.Write(f.prev) - f.expander.Write(f.info) - f.expander.Write([]byte{f.counter}) - f.prev = f.expander.Sum(f.prev[:0]) - f.counter++ - - // Copy the new batch into p - f.cache = f.prev - n = copy(p, f.cache) - p = p[n:] - } - // Save leftovers for next run - f.cache = f.cache[n:] - - return need, nil -} - -// New returns a new HKDF using the given hash, the secret keying material to expand -// and optional salt and info fields. -func New(hash func() hash.Hash, secret, salt, info []byte) io.Reader { - if salt == nil { - salt = make([]byte, hash().Size()) - } - extractor := hmac.New(hash, salt) - extractor.Write(secret) - prk := extractor.Sum(nil) - - return &hkdf{hmac.New(hash, prk), extractor.Size(), info, 1, nil, nil} -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf_test.go deleted file mode 100644 index cee659bcdb..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/hkdf/hkdf_test.go +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright 2014 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 hkdf - -import ( - "bytes" - "crypto/md5" - "crypto/sha1" - "crypto/sha256" - "crypto/sha512" - "hash" - "io" - "testing" -) - -type hkdfTest struct { - hash func() hash.Hash - master []byte - salt []byte - info []byte - out []byte -} - -var hkdfTests = []hkdfTest{ - // Tests from RFC 5869 - { - sha256.New, - []byte{ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - }, - []byte{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, - }, - []byte{ - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, - }, - []byte{ - 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, - 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, - 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, - 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, - 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, - 0x58, 0x65, - }, - }, - { - sha256.New, - []byte{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, - }, - []byte{ - 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - }, - []byte{ - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - []byte{ - 0xb1, 0x1e, 0x39, 0x8d, 0xc8, 0x03, 0x27, 0xa1, - 0xc8, 0xe7, 0xf7, 0x8c, 0x59, 0x6a, 0x49, 0x34, - 0x4f, 0x01, 0x2e, 0xda, 0x2d, 0x4e, 0xfa, 0xd8, - 0xa0, 0x50, 0xcc, 0x4c, 0x19, 0xaf, 0xa9, 0x7c, - 0x59, 0x04, 0x5a, 0x99, 0xca, 0xc7, 0x82, 0x72, - 0x71, 0xcb, 0x41, 0xc6, 0x5e, 0x59, 0x0e, 0x09, - 0xda, 0x32, 0x75, 0x60, 0x0c, 0x2f, 0x09, 0xb8, - 0x36, 0x77, 0x93, 0xa9, 0xac, 0xa3, 0xdb, 0x71, - 0xcc, 0x30, 0xc5, 0x81, 0x79, 0xec, 0x3e, 0x87, - 0xc1, 0x4c, 0x01, 0xd5, 0xc1, 0xf3, 0x43, 0x4f, - 0x1d, 0x87, - }, - }, - { - sha256.New, - []byte{ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - }, - []byte{}, - []byte{}, - []byte{ - 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, - 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, - 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, - 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, - 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, - 0x96, 0xc8, - }, - }, - { - sha1.New, - []byte{ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, - }, - []byte{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, - }, - []byte{ - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, - }, - []byte{ - 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, - 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, - 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, - 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, - 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, - 0xf8, 0x96, - }, - }, - { - sha1.New, - []byte{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, - }, - []byte{ - 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - }, - []byte{ - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - []byte{ - 0x0b, 0xd7, 0x70, 0xa7, 0x4d, 0x11, 0x60, 0xf7, - 0xc9, 0xf1, 0x2c, 0xd5, 0x91, 0x2a, 0x06, 0xeb, - 0xff, 0x6a, 0xdc, 0xae, 0x89, 0x9d, 0x92, 0x19, - 0x1f, 0xe4, 0x30, 0x56, 0x73, 0xba, 0x2f, 0xfe, - 0x8f, 0xa3, 0xf1, 0xa4, 0xe5, 0xad, 0x79, 0xf3, - 0xf3, 0x34, 0xb3, 0xb2, 0x02, 0xb2, 0x17, 0x3c, - 0x48, 0x6e, 0xa3, 0x7c, 0xe3, 0xd3, 0x97, 0xed, - 0x03, 0x4c, 0x7f, 0x9d, 0xfe, 0xb1, 0x5c, 0x5e, - 0x92, 0x73, 0x36, 0xd0, 0x44, 0x1f, 0x4c, 0x43, - 0x00, 0xe2, 0xcf, 0xf0, 0xd0, 0x90, 0x0b, 0x52, - 0xd3, 0xb4, - }, - }, - { - sha1.New, - []byte{ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - }, - []byte{}, - []byte{}, - []byte{ - 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, - 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, - 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, - 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, - 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, - 0x49, 0x18, - }, - }, - { - sha1.New, - []byte{ - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - }, - nil, - []byte{}, - []byte{ - 0x2c, 0x91, 0x11, 0x72, 0x04, 0xd7, 0x45, 0xf3, - 0x50, 0x0d, 0x63, 0x6a, 0x62, 0xf6, 0x4f, 0x0a, - 0xb3, 0xba, 0xe5, 0x48, 0xaa, 0x53, 0xd4, 0x23, - 0xb0, 0xd1, 0xf2, 0x7e, 0xbb, 0xa6, 0xf5, 0xe5, - 0x67, 0x3a, 0x08, 0x1d, 0x70, 0xcc, 0xe7, 0xac, - 0xfc, 0x48, - }, - }, -} - -func TestHKDF(t *testing.T) { - for i, tt := range hkdfTests { - hkdf := New(tt.hash, tt.master, tt.salt, tt.info) - out := make([]byte, len(tt.out)) - - n, err := io.ReadFull(hkdf, out) - if n != len(tt.out) || err != nil { - t.Errorf("test %d: not enough output bytes: %d.", i, n) - } - - if !bytes.Equal(out, tt.out) { - t.Errorf("test %d: incorrect output: have %v, need %v.", i, out, tt.out) - } - } -} - -func TestHKDFMultiRead(t *testing.T) { - for i, tt := range hkdfTests { - hkdf := New(tt.hash, tt.master, tt.salt, tt.info) - out := make([]byte, len(tt.out)) - - for b := 0; b < len(tt.out); b++ { - n, err := io.ReadFull(hkdf, out[b:b+1]) - if n != 1 || err != nil { - t.Errorf("test %d.%d: not enough output bytes: have %d, need %d .", i, b, n, len(tt.out)) - } - } - - if !bytes.Equal(out, tt.out) { - t.Errorf("test %d: incorrect output: have %v, need %v.", i, out, tt.out) - } - } -} - -func TestHKDFLimit(t *testing.T) { - hash := sha1.New - master := []byte{0x00, 0x01, 0x02, 0x03} - info := []byte{} - - hkdf := New(hash, master, nil, info) - limit := hash().Size() * 255 - out := make([]byte, limit) - - // The maximum output bytes should be extractable - n, err := io.ReadFull(hkdf, out) - if n != limit || err != nil { - t.Errorf("not enough output bytes: %d, %v.", n, err) - } - - // Reading one more should fail - n, err = io.ReadFull(hkdf, make([]byte, 1)) - if n > 0 || err == nil { - t.Errorf("key expansion overflowed: n = %d, err = %v", n, err) - } -} - -func Benchmark16ByteMD5Single(b *testing.B) { - benchmarkHKDFSingle(md5.New, 16, b) -} - -func Benchmark20ByteSHA1Single(b *testing.B) { - benchmarkHKDFSingle(sha1.New, 20, b) -} - -func Benchmark32ByteSHA256Single(b *testing.B) { - benchmarkHKDFSingle(sha256.New, 32, b) -} - -func Benchmark64ByteSHA512Single(b *testing.B) { - benchmarkHKDFSingle(sha512.New, 64, b) -} - -func Benchmark8ByteMD5Stream(b *testing.B) { - benchmarkHKDFStream(md5.New, 8, b) -} - -func Benchmark16ByteMD5Stream(b *testing.B) { - benchmarkHKDFStream(md5.New, 16, b) -} - -func Benchmark8ByteSHA1Stream(b *testing.B) { - benchmarkHKDFStream(sha1.New, 8, b) -} - -func Benchmark20ByteSHA1Stream(b *testing.B) { - benchmarkHKDFStream(sha1.New, 20, b) -} - -func Benchmark8ByteSHA256Stream(b *testing.B) { - benchmarkHKDFStream(sha256.New, 8, b) -} - -func Benchmark32ByteSHA256Stream(b *testing.B) { - benchmarkHKDFStream(sha256.New, 32, b) -} - -func Benchmark8ByteSHA512Stream(b *testing.B) { - benchmarkHKDFStream(sha512.New, 8, b) -} - -func Benchmark64ByteSHA512Stream(b *testing.B) { - benchmarkHKDFStream(sha512.New, 64, b) -} - -func benchmarkHKDFSingle(hasher func() hash.Hash, block int, b *testing.B) { - master := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07} - salt := []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17} - info := []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27} - out := make([]byte, block) - - b.SetBytes(int64(block)) - b.ResetTimer() - - for i := 0; i < b.N; i++ { - hkdf := New(hasher, master, salt, info) - io.ReadFull(hkdf, out) - } -} - -func benchmarkHKDFStream(hasher func() hash.Hash, block int, b *testing.B) { - master := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07} - salt := []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17} - info := []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27} - out := make([]byte, block) - - b.SetBytes(int64(block)) - b.ResetTimer() - - hkdf := New(hasher, master, salt, info) - for i := 0; i < b.N; i++ { - _, err := io.ReadFull(hkdf, out) - if err != nil { - hkdf = New(hasher, master, salt, info) - i-- - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/asm_s390x.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/asm_s390x.s deleted file mode 100644 index 98427c5e22..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/asm_s390x.s +++ /dev/null @@ -1,283 +0,0 @@ -// 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. - -// +build s390x,!gccgo,!appengine - -#include "go_asm.h" -#include "textflag.h" - -// This is an implementation of the ChaCha20 encryption algorithm as -// specified in RFC 7539. It uses vector instructions to compute -// 4 keystream blocks in parallel (256 bytes) which are then XORed -// with the bytes in the input slice. - -GLOBL ·constants<>(SB), RODATA|NOPTR, $32 -// BSWAP: swap bytes in each 4-byte element -DATA ·constants<>+0x00(SB)/4, $0x03020100 -DATA ·constants<>+0x04(SB)/4, $0x07060504 -DATA ·constants<>+0x08(SB)/4, $0x0b0a0908 -DATA ·constants<>+0x0c(SB)/4, $0x0f0e0d0c -// J0: [j0, j1, j2, j3] -DATA ·constants<>+0x10(SB)/4, $0x61707865 -DATA ·constants<>+0x14(SB)/4, $0x3320646e -DATA ·constants<>+0x18(SB)/4, $0x79622d32 -DATA ·constants<>+0x1c(SB)/4, $0x6b206574 - -// EXRL targets: -TEXT ·mvcSrcToBuf(SB), NOFRAME|NOSPLIT, $0 - MVC $1, (R1), (R8) - RET - -TEXT ·mvcBufToDst(SB), NOFRAME|NOSPLIT, $0 - MVC $1, (R8), (R9) - RET - -#define BSWAP V5 -#define J0 V6 -#define KEY0 V7 -#define KEY1 V8 -#define NONCE V9 -#define CTR V10 -#define M0 V11 -#define M1 V12 -#define M2 V13 -#define M3 V14 -#define INC V15 -#define X0 V16 -#define X1 V17 -#define X2 V18 -#define X3 V19 -#define X4 V20 -#define X5 V21 -#define X6 V22 -#define X7 V23 -#define X8 V24 -#define X9 V25 -#define X10 V26 -#define X11 V27 -#define X12 V28 -#define X13 V29 -#define X14 V30 -#define X15 V31 - -#define NUM_ROUNDS 20 - -#define ROUND4(a0, a1, a2, a3, b0, b1, b2, b3, c0, c1, c2, c3, d0, d1, d2, d3) \ - VAF a1, a0, a0 \ - VAF b1, b0, b0 \ - VAF c1, c0, c0 \ - VAF d1, d0, d0 \ - VX a0, a2, a2 \ - VX b0, b2, b2 \ - VX c0, c2, c2 \ - VX d0, d2, d2 \ - VERLLF $16, a2, a2 \ - VERLLF $16, b2, b2 \ - VERLLF $16, c2, c2 \ - VERLLF $16, d2, d2 \ - VAF a2, a3, a3 \ - VAF b2, b3, b3 \ - VAF c2, c3, c3 \ - VAF d2, d3, d3 \ - VX a3, a1, a1 \ - VX b3, b1, b1 \ - VX c3, c1, c1 \ - VX d3, d1, d1 \ - VERLLF $12, a1, a1 \ - VERLLF $12, b1, b1 \ - VERLLF $12, c1, c1 \ - VERLLF $12, d1, d1 \ - VAF a1, a0, a0 \ - VAF b1, b0, b0 \ - VAF c1, c0, c0 \ - VAF d1, d0, d0 \ - VX a0, a2, a2 \ - VX b0, b2, b2 \ - VX c0, c2, c2 \ - VX d0, d2, d2 \ - VERLLF $8, a2, a2 \ - VERLLF $8, b2, b2 \ - VERLLF $8, c2, c2 \ - VERLLF $8, d2, d2 \ - VAF a2, a3, a3 \ - VAF b2, b3, b3 \ - VAF c2, c3, c3 \ - VAF d2, d3, d3 \ - VX a3, a1, a1 \ - VX b3, b1, b1 \ - VX c3, c1, c1 \ - VX d3, d1, d1 \ - VERLLF $7, a1, a1 \ - VERLLF $7, b1, b1 \ - VERLLF $7, c1, c1 \ - VERLLF $7, d1, d1 - -#define PERMUTE(mask, v0, v1, v2, v3) \ - VPERM v0, v0, mask, v0 \ - VPERM v1, v1, mask, v1 \ - VPERM v2, v2, mask, v2 \ - VPERM v3, v3, mask, v3 - -#define ADDV(x, v0, v1, v2, v3) \ - VAF x, v0, v0 \ - VAF x, v1, v1 \ - VAF x, v2, v2 \ - VAF x, v3, v3 - -#define XORV(off, dst, src, v0, v1, v2, v3) \ - VLM off(src), M0, M3 \ - PERMUTE(BSWAP, v0, v1, v2, v3) \ - VX v0, M0, M0 \ - VX v1, M1, M1 \ - VX v2, M2, M2 \ - VX v3, M3, M3 \ - VSTM M0, M3, off(dst) - -#define SHUFFLE(a, b, c, d, t, u, v, w) \ - VMRHF a, c, t \ // t = {a[0], c[0], a[1], c[1]} - VMRHF b, d, u \ // u = {b[0], d[0], b[1], d[1]} - VMRLF a, c, v \ // v = {a[2], c[2], a[3], c[3]} - VMRLF b, d, w \ // w = {b[2], d[2], b[3], d[3]} - VMRHF t, u, a \ // a = {a[0], b[0], c[0], d[0]} - VMRLF t, u, b \ // b = {a[1], b[1], c[1], d[1]} - VMRHF v, w, c \ // c = {a[2], b[2], c[2], d[2]} - VMRLF v, w, d // d = {a[3], b[3], c[3], d[3]} - -// func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32, buf *[256]byte, len *int) -TEXT ·xorKeyStreamVX(SB), NOSPLIT, $0 - MOVD $·constants<>(SB), R1 - MOVD dst+0(FP), R2 // R2=&dst[0] - LMG src+24(FP), R3, R4 // R3=&src[0] R4=len(src) - MOVD key+48(FP), R5 // R5=key - MOVD nonce+56(FP), R6 // R6=nonce - MOVD counter+64(FP), R7 // R7=counter - MOVD buf+72(FP), R8 // R8=buf - MOVD len+80(FP), R9 // R9=len - - // load BSWAP and J0 - VLM (R1), BSWAP, J0 - - // set up tail buffer - ADD $-1, R4, R12 - MOVBZ R12, R12 - CMPUBEQ R12, $255, aligned - MOVD R4, R1 - AND $~255, R1 - MOVD $(R3)(R1*1), R1 - EXRL $·mvcSrcToBuf(SB), R12 - MOVD $255, R0 - SUB R12, R0 - MOVD R0, (R9) // update len - -aligned: - // setup - MOVD $95, R0 - VLM (R5), KEY0, KEY1 - VLL R0, (R6), NONCE - VZERO M0 - VLEIB $7, $32, M0 - VSRLB M0, NONCE, NONCE - - // initialize counter values - VLREPF (R7), CTR - VZERO INC - VLEIF $1, $1, INC - VLEIF $2, $2, INC - VLEIF $3, $3, INC - VAF INC, CTR, CTR - VREPIF $4, INC - -chacha: - VREPF $0, J0, X0 - VREPF $1, J0, X1 - VREPF $2, J0, X2 - VREPF $3, J0, X3 - VREPF $0, KEY0, X4 - VREPF $1, KEY0, X5 - VREPF $2, KEY0, X6 - VREPF $3, KEY0, X7 - VREPF $0, KEY1, X8 - VREPF $1, KEY1, X9 - VREPF $2, KEY1, X10 - VREPF $3, KEY1, X11 - VLR CTR, X12 - VREPF $1, NONCE, X13 - VREPF $2, NONCE, X14 - VREPF $3, NONCE, X15 - - MOVD $(NUM_ROUNDS/2), R1 - -loop: - ROUND4(X0, X4, X12, X8, X1, X5, X13, X9, X2, X6, X14, X10, X3, X7, X15, X11) - ROUND4(X0, X5, X15, X10, X1, X6, X12, X11, X2, X7, X13, X8, X3, X4, X14, X9) - - ADD $-1, R1 - BNE loop - - // decrement length - ADD $-256, R4 - BLT tail - -continue: - // rearrange vectors - SHUFFLE(X0, X1, X2, X3, M0, M1, M2, M3) - ADDV(J0, X0, X1, X2, X3) - SHUFFLE(X4, X5, X6, X7, M0, M1, M2, M3) - ADDV(KEY0, X4, X5, X6, X7) - SHUFFLE(X8, X9, X10, X11, M0, M1, M2, M3) - ADDV(KEY1, X8, X9, X10, X11) - VAF CTR, X12, X12 - SHUFFLE(X12, X13, X14, X15, M0, M1, M2, M3) - ADDV(NONCE, X12, X13, X14, X15) - - // increment counters - VAF INC, CTR, CTR - - // xor keystream with plaintext - XORV(0*64, R2, R3, X0, X4, X8, X12) - XORV(1*64, R2, R3, X1, X5, X9, X13) - XORV(2*64, R2, R3, X2, X6, X10, X14) - XORV(3*64, R2, R3, X3, X7, X11, X15) - - // increment pointers - MOVD $256(R2), R2 - MOVD $256(R3), R3 - - CMPBNE R4, $0, chacha - CMPUBEQ R12, $255, return - EXRL $·mvcBufToDst(SB), R12 // len was updated during setup - -return: - VSTEF $0, CTR, (R7) - RET - -tail: - MOVD R2, R9 - MOVD R8, R2 - MOVD R8, R3 - MOVD $0, R4 - JMP continue - -// func hasVectorFacility() bool -TEXT ·hasVectorFacility(SB), NOSPLIT, $24-1 - MOVD $x-24(SP), R1 - XC $24, 0(R1), 0(R1) // clear the storage - MOVD $2, R0 // R0 is the number of double words stored -1 - WORD $0xB2B01000 // STFLE 0(R1) - XOR R0, R0 // reset the value of R0 - MOVBZ z-8(SP), R1 - AND $0x40, R1 - BEQ novector - -vectorinstalled: - // check if the vector instruction has been enabled - VLEIB $0, $0xF, V16 - VLGVB $0, V16, R1 - CMPBNE R1, $0xF, novector - MOVB $1, ret+0(FP) // have vx - RET - -novector: - MOVB $0, ret+0(FP) // no vx - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_generic.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_generic.go deleted file mode 100644 index 7ed1cd9b18..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_generic.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2016 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 ChaCha20 implements the core ChaCha20 function as specified -// in https://tools.ietf.org/html/rfc7539#section-2.3. -package chacha20 - -import ( - "crypto/cipher" - "encoding/binary" -) - -// assert that *Cipher implements cipher.Stream -var _ cipher.Stream = (*Cipher)(nil) - -// Cipher is a stateful instance of ChaCha20 using a particular key -// and nonce. A *Cipher implements the cipher.Stream interface. -type Cipher struct { - key [8]uint32 - counter uint32 // incremented after each block - nonce [3]uint32 - buf [bufSize]byte // buffer for unused keystream bytes - len int // number of unused keystream bytes at end of buf -} - -// New creates a new ChaCha20 stream cipher with the given key and nonce. -// The initial counter value is set to 0. -func New(key [8]uint32, nonce [3]uint32) *Cipher { - return &Cipher{key: key, nonce: nonce} -} - -// XORKeyStream XORs each byte in the given slice with a byte from the -// cipher's key stream. Dst and src must overlap entirely or not at all. -// -// If len(dst) < len(src), XORKeyStream will panic. It is acceptable -// to pass a dst bigger than src, and in that case, XORKeyStream will -// only update dst[:len(src)] and will not touch the rest of dst. -// -// Multiple calls to XORKeyStream behave as if the concatenation of -// the src buffers was passed in a single run. That is, Cipher -// maintains state and does not reset at each XORKeyStream call. -func (s *Cipher) XORKeyStream(dst, src []byte) { - // xor src with buffered keystream first - if s.len != 0 { - buf := s.buf[len(s.buf)-s.len:] - if len(src) < len(buf) { - buf = buf[:len(src)] - } - td, ts := dst[:len(buf)], src[:len(buf)] // BCE hint - for i, b := range buf { - td[i] = ts[i] ^ b - } - s.len -= len(buf) - if s.len != 0 { - return - } - s.buf = [len(s.buf)]byte{} // zero the empty buffer - src = src[len(buf):] - dst = dst[len(buf):] - } - - if len(src) == 0 { - return - } - if haveAsm { - s.xorKeyStreamAsm(dst, src) - return - } - - // set up a 64-byte buffer to pad out the final block if needed - // (hoisted out of the main loop to avoid spills) - rem := len(src) % 64 // length of final block - fin := len(src) - rem // index of final block - if rem > 0 { - copy(s.buf[len(s.buf)-64:], src[fin:]) - } - - // qr calculates a quarter round - qr := func(a, b, c, d uint32) (uint32, uint32, uint32, uint32) { - a += b - d ^= a - d = (d << 16) | (d >> 16) - c += d - b ^= c - b = (b << 12) | (b >> 20) - a += b - d ^= a - d = (d << 8) | (d >> 24) - c += d - b ^= c - b = (b << 7) | (b >> 25) - return a, b, c, d - } - - // ChaCha20 constants - const ( - j0 = 0x61707865 - j1 = 0x3320646e - j2 = 0x79622d32 - j3 = 0x6b206574 - ) - - // pre-calculate most of the first round - s1, s5, s9, s13 := qr(j1, s.key[1], s.key[5], s.nonce[0]) - s2, s6, s10, s14 := qr(j2, s.key[2], s.key[6], s.nonce[1]) - s3, s7, s11, s15 := qr(j3, s.key[3], s.key[7], s.nonce[2]) - - n := len(src) - src, dst = src[:n:n], dst[:n:n] // BCE hint - for i := 0; i < n; i += 64 { - // calculate the remainder of the first round - s0, s4, s8, s12 := qr(j0, s.key[0], s.key[4], s.counter) - - // execute the second round - x0, x5, x10, x15 := qr(s0, s5, s10, s15) - x1, x6, x11, x12 := qr(s1, s6, s11, s12) - x2, x7, x8, x13 := qr(s2, s7, s8, s13) - x3, x4, x9, x14 := qr(s3, s4, s9, s14) - - // execute the remaining 18 rounds - for i := 0; i < 9; i++ { - x0, x4, x8, x12 = qr(x0, x4, x8, x12) - x1, x5, x9, x13 = qr(x1, x5, x9, x13) - x2, x6, x10, x14 = qr(x2, x6, x10, x14) - x3, x7, x11, x15 = qr(x3, x7, x11, x15) - - x0, x5, x10, x15 = qr(x0, x5, x10, x15) - x1, x6, x11, x12 = qr(x1, x6, x11, x12) - x2, x7, x8, x13 = qr(x2, x7, x8, x13) - x3, x4, x9, x14 = qr(x3, x4, x9, x14) - } - - x0 += j0 - x1 += j1 - x2 += j2 - x3 += j3 - - x4 += s.key[0] - x5 += s.key[1] - x6 += s.key[2] - x7 += s.key[3] - x8 += s.key[4] - x9 += s.key[5] - x10 += s.key[6] - x11 += s.key[7] - - x12 += s.counter - x13 += s.nonce[0] - x14 += s.nonce[1] - x15 += s.nonce[2] - - // increment the counter - s.counter += 1 - if s.counter == 0 { - panic("chacha20: counter overflow") - } - - // pad to 64 bytes if needed - in, out := src[i:], dst[i:] - if i == fin { - // src[fin:] has already been copied into s.buf before - // the main loop - in, out = s.buf[len(s.buf)-64:], s.buf[len(s.buf)-64:] - } - in, out = in[:64], out[:64] // BCE hint - - // XOR the key stream with the source and write out the result - xor(out[0:], in[0:], x0) - xor(out[4:], in[4:], x1) - xor(out[8:], in[8:], x2) - xor(out[12:], in[12:], x3) - xor(out[16:], in[16:], x4) - xor(out[20:], in[20:], x5) - xor(out[24:], in[24:], x6) - xor(out[28:], in[28:], x7) - xor(out[32:], in[32:], x8) - xor(out[36:], in[36:], x9) - xor(out[40:], in[40:], x10) - xor(out[44:], in[44:], x11) - xor(out[48:], in[48:], x12) - xor(out[52:], in[52:], x13) - xor(out[56:], in[56:], x14) - xor(out[60:], in[60:], x15) - } - // copy any trailing bytes out of the buffer and into dst - if rem != 0 { - s.len = 64 - rem - copy(dst[fin:], s.buf[len(s.buf)-64:]) - } -} - -// Advance discards bytes in the key stream until the next 64 byte block -// boundary is reached and updates the counter accordingly. If the key -// stream is already at a block boundary no bytes will be discarded and -// the counter will be unchanged. -func (s *Cipher) Advance() { - s.len -= s.len % 64 - if s.len == 0 { - s.buf = [len(s.buf)]byte{} - } -} - -// XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out must overlap entirely or not at all. Counter contains the raw -// ChaCha20 counter bytes (i.e. block counter followed by nonce). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { - s := Cipher{ - key: [8]uint32{ - binary.LittleEndian.Uint32(key[0:4]), - binary.LittleEndian.Uint32(key[4:8]), - binary.LittleEndian.Uint32(key[8:12]), - binary.LittleEndian.Uint32(key[12:16]), - binary.LittleEndian.Uint32(key[16:20]), - binary.LittleEndian.Uint32(key[20:24]), - binary.LittleEndian.Uint32(key[24:28]), - binary.LittleEndian.Uint32(key[28:32]), - }, - nonce: [3]uint32{ - binary.LittleEndian.Uint32(counter[4:8]), - binary.LittleEndian.Uint32(counter[8:12]), - binary.LittleEndian.Uint32(counter[12:16]), - }, - counter: binary.LittleEndian.Uint32(counter[0:4]), - } - s.XORKeyStream(out, in) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_noasm.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_noasm.go deleted file mode 100644 index 91520d1de0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_noasm.go +++ /dev/null @@ -1,16 +0,0 @@ -// 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. - -// +build !s390x gccgo appengine - -package chacha20 - -const ( - bufSize = 64 - haveAsm = false -) - -func (*Cipher) xorKeyStreamAsm(dst, src []byte) { - panic("not implemented") -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_s390x.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_s390x.go deleted file mode 100644 index 0c1c671c40..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_s390x.go +++ /dev/null @@ -1,30 +0,0 @@ -// 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. - -// +build s390x,!gccgo,!appengine - -package chacha20 - -var haveAsm = hasVectorFacility() - -const bufSize = 256 - -// hasVectorFacility reports whether the machine supports the vector -// facility (vx). -// Implementation in asm_s390x.s. -func hasVectorFacility() bool - -// xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only -// be called when the vector facility is available. -// Implementation in asm_s390x.s. -//go:noescape -func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32, buf *[256]byte, len *int) - -func (c *Cipher) xorKeyStreamAsm(dst, src []byte) { - xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter, &c.buf, &c.len) -} - -// EXRL targets, DO NOT CALL! -func mvcSrcToBuf() -func mvcBufToDst() diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_test.go deleted file mode 100644 index bf993304e8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/chacha_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2016 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 chacha20 - -import ( - "encoding/hex" - "fmt" - "math/rand" - "testing" -) - -func TestCore(t *testing.T) { - // This is just a smoke test that checks the example from - // https://tools.ietf.org/html/rfc7539#section-2.3.2. The - // chacha20poly1305 package contains much more extensive tests of this - // code. - var key [32]byte - for i := range key { - key[i] = byte(i) - } - - var input [16]byte - input[0] = 1 - input[7] = 9 - input[11] = 0x4a - - var out [64]byte - XORKeyStream(out[:], out[:], &input, &key) - const expected = "10f1e7e4d13b5915500fdd1fa32071c4c7d1f4c733c068030422aa9ac3d46c4ed2826446079faa0914c2d705d98b02a2b5129cd1de164eb9cbd083e8a2503c4e" - if result := hex.EncodeToString(out[:]); result != expected { - t.Errorf("wanted %x but got %x", expected, result) - } -} - -// Run the test cases with the input and output in different buffers. -func TestNoOverlap(t *testing.T) { - for _, c := range testVectors { - s := New(c.key, c.nonce) - input, err := hex.DecodeString(c.input) - if err != nil { - t.Fatalf("cannot decode input %#v: %v", c.input, err) - } - output := make([]byte, c.length) - s.XORKeyStream(output, input) - got := hex.EncodeToString(output) - if got != c.output { - t.Errorf("length=%v: got %#v, want %#v", c.length, got, c.output) - } - } -} - -// Run the test cases with the input and output overlapping entirely. -func TestOverlap(t *testing.T) { - for _, c := range testVectors { - s := New(c.key, c.nonce) - data, err := hex.DecodeString(c.input) - if err != nil { - t.Fatalf("cannot decode input %#v: %v", c.input, err) - } - s.XORKeyStream(data, data) - got := hex.EncodeToString(data) - if got != c.output { - t.Errorf("length=%v: got %#v, want %#v", c.length, got, c.output) - } - } -} - -// Run the test cases with various source and destination offsets. -func TestUnaligned(t *testing.T) { - const max = 8 // max offset (+1) to test - for _, c := range testVectors { - input := make([]byte, c.length+max) - output := make([]byte, c.length+max) - for i := 0; i < max; i++ { // input offsets - for j := 0; j < max; j++ { // output offsets - s := New(c.key, c.nonce) - - input := input[i : i+c.length] - output := output[j : j+c.length] - - data, err := hex.DecodeString(c.input) - if err != nil { - t.Fatalf("cannot decode input %#v: %v", c.input, err) - } - copy(input, data) - s.XORKeyStream(output, input) - got := hex.EncodeToString(output) - if got != c.output { - t.Errorf("length=%v: got %#v, want %#v", c.length, got, c.output) - } - } - } - } -} - -// Run the test cases by calling XORKeyStream multiple times. -func TestStep(t *testing.T) { - // wide range of step sizes to try and hit edge cases - steps := [...]int{1, 3, 4, 7, 8, 17, 24, 30, 64, 256} - rnd := rand.New(rand.NewSource(123)) - for _, c := range testVectors { - s := New(c.key, c.nonce) - input, err := hex.DecodeString(c.input) - if err != nil { - t.Fatalf("cannot decode input %#v: %v", c.input, err) - } - output := make([]byte, c.length) - - // step through the buffers - i, step := 0, steps[rnd.Intn(len(steps))] - for i+step < c.length { - s.XORKeyStream(output[i:i+step], input[i:i+step]) - if i+step < c.length && output[i+step] != 0 { - t.Errorf("length=%v, i=%v, step=%v: output overwritten", c.length, i, step) - } - i += step - step = steps[rnd.Intn(len(steps))] - } - // finish the encryption - s.XORKeyStream(output[i:], input[i:]) - - got := hex.EncodeToString(output) - if got != c.output { - t.Errorf("length=%v: got %#v, want %#v", c.length, got, c.output) - } - } -} - -// Test that Advance() discards bytes until a block boundary is hit. -func TestAdvance(t *testing.T) { - for _, c := range testVectors { - for i := 0; i < 63; i++ { - s := New(c.key, c.nonce) - z := New(c.key, c.nonce) - input, err := hex.DecodeString(c.input) - if err != nil { - t.Fatalf("cannot decode input %#v: %v", c.input, err) - } - zeros, discard := make([]byte, 64), make([]byte, 64) - so, zo := make([]byte, c.length), make([]byte, c.length) - for j := 0; j < c.length; j += 64 { - lim := j + i - if lim > c.length { - lim = c.length - } - s.XORKeyStream(so[j:lim], input[j:lim]) - // calling s.Advance() multiple times should have no effect - for k := 0; k < i%3+1; k++ { - s.Advance() - } - z.XORKeyStream(zo[j:lim], input[j:lim]) - if lim < c.length { - end := 64 - i - if c.length-lim < end { - end = c.length - lim - } - z.XORKeyStream(discard[:], zeros[:end]) - } - } - - got := hex.EncodeToString(so) - want := hex.EncodeToString(zo) - if got != want { - t.Errorf("length=%v: got %#v, want %#v", c.length, got, want) - } - } - } -} - -func BenchmarkChaCha20(b *testing.B) { - sizes := []int{32, 63, 64, 256, 1024, 1350, 65536} - for _, size := range sizes { - s := size - b.Run(fmt.Sprint(s), func(b *testing.B) { - k := [32]byte{} - c := [16]byte{} - src := make([]byte, s) - dst := make([]byte, s) - b.SetBytes(int64(s)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - XORKeyStream(dst, src, &c, &k) - } - }) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/vectors_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/vectors_test.go deleted file mode 100644 index b441fbd149..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/vectors_test.go +++ /dev/null @@ -1,578 +0,0 @@ -// 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 chacha20 - -// Test vectors for ChaCha20 implementations. - -type testCase struct { - length int - nonce [3]uint32 - key [8]uint32 - input string - output string -} - -var testVectors = [...]testCase{ - { - length: 0, - nonce: [3]uint32{0x94d13317, 0x6b6a2b3, 0x3ffe0036}, - key: [8]uint32{0x9da8a3b6, 0x3abf4ae6, 0xa2f19cae, 0x1068c707, 0x72e4801e, 0xce165d92, 0x61e7028f, 0x82ac3d57}, - input: "", - output: "", - }, - { - length: 5, - nonce: [3]uint32{0x469fadd, 0xee3fcc1e, 0x45cf77b0}, - key: [8]uint32{0x3477e02b, 0x45bf809f, 0x27f4a1fa, 0xdb901de8, 0xd8a190dc, 0x1d2c21d4, 0x87bdf2ac, 0xdfbf0000}, - input: "23dbad0780", - output: "415a3e498d", - }, - { - length: 9, - nonce: [3]uint32{0x512a6b49, 0x8df9af6d, 0x5336a2a5}, - key: [8]uint32{0xe9124c25, 0x4fd1a373, 0x7945f7bb, 0xeed5f064, 0x29c4185d, 0x3c9acf13, 0x4c94a367, 0x7c2c2c53}, - input: "f518831fab69c054a6", - output: "cfe40f63f81391484b", - }, - { - length: 12, - nonce: [3]uint32{0xca697a9e, 0x6b2f6717, 0xb7859220}, - key: [8]uint32{0xfc825020, 0x5ca4410b, 0x7d5285d0, 0x160a1c9d, 0x15470b41, 0x3634742a, 0xe64aa7fa, 0xca0be67a}, - input: "805fad1d62951537aeed9859", - output: "47bd303f93c3ce04bce44710", - }, - { - length: 14, - nonce: [3]uint32{0xcded3db3, 0x35770a7f, 0x6aede9b}, - key: [8]uint32{0x44632def, 0xa5e420a7, 0xfc12a8f, 0x63b79a15, 0x337de314, 0xb82fbf16, 0x3104bc57, 0x677c9227}, - input: "f4e8a7577affb841cf48392cf5df", - output: "f445c0fb7e3d5bfdab47090ddee6", - }, - { - length: 15, - nonce: [3]uint32{0x348a50b1, 0x4acc9280, 0x8d6014ce}, - key: [8]uint32{0x34bd31a8, 0x2808f47e, 0x9d8b19f9, 0x4df59683, 0x31584348, 0x34a74a45, 0xde174a2, 0x29d4c7dc}, - input: "1179b71ec4dc34bd812f742b5a0b27", - output: "cc7f80f333c647d6e592e4f7ecc834", - }, - { - length: 20, - nonce: [3]uint32{0xc8754703, 0x9188c521, 0xac8ce8a6}, - key: [8]uint32{0xe93c79ed, 0xce89162b, 0x116a8366, 0xecdc657f, 0x5bc81d98, 0xff5d2f52, 0x171f3ebb, 0x50773f2f}, - input: "7bd94943d55392d0311c413ac755ce0347872ba3", - output: "c43665de15136af232675d9d5dbbeca77f3c542a", - }, - { - length: 21, - nonce: [3]uint32{0x9a8655cb, 0x6e9d6ea5, 0x5dad705e}, - key: [8]uint32{0x3542d5b3, 0x1f7bfd8f, 0x1038abf8, 0x7214e8ec, 0xedd05693, 0x60e663bd, 0xe8e5d506, 0xeea923a2}, - input: "1505f669acc5ad9aaa0e993ba8c24e744d13655e1f", - output: "26cad1ccf4cf4c49b267ab7be10bc2ffa3ba66bc86", - }, - { - length: 25, - nonce: [3]uint32{0x3f202ca4, 0x63fc86, 0x7260a10e}, - key: [8]uint32{0xe28ab1d6, 0xe83b3d47, 0x671271ca, 0xb977bcff, 0xa2f64476, 0x311d79b4, 0x180d91d0, 0xec1a6e0c}, - input: "20070523ddb4ebf0d5f20fd95aacf47fb269ebadda6879638a", - output: "5ce972624cb2b7e7c28f5b865ba08c887911b4f5e361830a4b", - }, - { - length: 31, - nonce: [3]uint32{0xcf8671ea, 0x8d72df2f, 0x8b5a538a}, - key: [8]uint32{0xe46ca2bb, 0xd06ab5ef, 0xb0e2966b, 0x54dd0c2d, 0x8815d89a, 0x426c30a9, 0x15b0f1e, 0x254bae75}, - input: "d10f8050c1186f92e26f351db36490d82ea677498562d8d4f487a0a4058adf", - output: "f30c11bc553b2baf6870760d735680897c9fee168f976b2a33ef395fdbd4fc", - }, - { - length: 34, - nonce: [3]uint32{0xd1be983a, 0xf5aa389, 0xfa26c7e1}, - key: [8]uint32{0x795c6da7, 0x8cb1aadc, 0xa042359a, 0x95ea2e27, 0x128253c4, 0xaabc592f, 0x391e810, 0xf641d971}, - input: "e88dc380b7d45a4a762c34f310199587867516fac4a2634022b96a9f862e17714d17", - output: "aac98ba3821399e55a5eab5862f7f1bfc63637d700125878c2b17151f306c9aec80e", - }, - { - length: 34, - nonce: [3]uint32{0x98f5f4b8, 0x3f181d73, 0x5bf4572e}, - key: [8]uint32{0xa86f8cf7, 0x8db41a2b, 0xe0e03156, 0x3dad8a59, 0xb3e4d1ba, 0x75f6fb38, 0xdb94709d, 0xc3db34f3}, - input: "b0fcf0a731e2902787309697db2384e1cda07b60002c95355a4e261fb601f034b2b3", - output: "b6c8c40ddda029a70a21c25f724cc90c43f6edc407055683572a9f5e9690a1d571bb", - }, - { - length: 40, - nonce: [3]uint32{0x7289ae18, 0x7ebe7e50, 0x7d819176}, - key: [8]uint32{0x336c07a0, 0x4a2ea22b, 0xa8872f46, 0xa47b5e28, 0xbe645e3f, 0x371c6591, 0xd2dc237a, 0x92c59580}, - input: "cf9ec6fa3f0a67488adb5598a48ed916729a1e416d206f9675dfa9fd6585793f274f363bbca348b3", - output: "bb7ed8a199aa329dcd18736ce705804ffae8c3e2ba341ae907f94f4672d57175df25d28e16962fd6", - }, - { - length: 47, - nonce: [3]uint32{0xfd3181de, 0x8b193e26, 0xbebc799}, - key: [8]uint32{0x781a4c2e, 0x27ab55e2, 0x814aaf43, 0xa0bab01, 0x9de62ce0, 0x472b03d2, 0xdfee18e8, 0x8b855b93}, - input: "be9a8211d68642310724eda3dd02f63fcc03a101d9564b0ecee6f4ecececcb0099bb26aabee46b1a2c0416b4ac269e", - output: "3152f317cf3626e26d02cff9392619ea02e22115b6d43d6dd2e1177c6bb3cb71c4a90c3d13b63c43e03605ec98d9a1", - }, - { - length: 51, - nonce: [3]uint32{0x27b02ff6, 0xa510613e, 0x218b22d8}, - key: [8]uint32{0x62fc7732, 0xcef06cf4, 0xa4f45ed5, 0x2f96654f, 0x9f2b956e, 0x42b572f4, 0x5bb59c86, 0x35e4784f}, - input: "495343a257250f8970f791f493b89d10edba89806b88aaaeb3b5aefd078ba7b765746164bce653f5e6c096dd8499fb76d97d77", - output: "62c01f426581551b5b16e8b1a3a23c86bcdd189ab695dbea4bf811a14741e6ebbb0261ef8ae47778a6be7e0ef11697b891412c", - }, - { - length: 52, - nonce: [3]uint32{0x9db97a63, 0xff50248, 0xf2b6df56}, - key: [8]uint32{0x2b657a8f, 0xfe67575d, 0xaa56d261, 0x30179a97, 0xaefcfff1, 0x9b8eb698, 0x1efe3756, 0xb4ea450c}, - input: "e37fbbd3fe37ce5a99d18e5dcb0dafe7adf8b596528708f7d310569ab44c251377f7363a390c653965e0cb8dd217464b3d8f79c1", - output: "b07d4c56fb83a49e8d9fc992e1230bb5086fecbd828cdbc7353f61b1a3cec0baf9c5bf67c9da06b49469a999ba3b37916ec125be", - }, - { - length: 56, - nonce: [3]uint32{0xc1dfec38, 0x7d7503d3, 0x9a3e3c66}, - key: [8]uint32{0x8614d8e7, 0xde9b0413, 0x2a48b4fa, 0xcbbde744, 0xad5ddc5e, 0x9144d83e, 0x74d9d617, 0x230bdb45}, - input: "9efab614388a7d99102bcc901e3623d31fd9dd9d3c3338d086f69c13e7aa8653f9ce76e722e5a6a8cbbbee067a6cb9c59aa9b4b4c518bbed", - output: "829d9fe74b7a4b3aeb04580b41d38a156ffbebba5d49ad55d1b0370f25abcd41221304941ad8e0d5095e15fbd839295bf1e7a509a807c005", - }, - { - length: 63, - nonce: [3]uint32{0xc7e2521c, 0x795499b4, 0xc7946cd7}, - key: [8]uint32{0x53fce774, 0x9a4b53bf, 0x5f614134, 0xa3c39414, 0xa8a07c72, 0x93242311, 0x43aeec99, 0x216deb5a}, - input: "03b5d7ab4bd8c9a4f47ec122cbeb595bd1a0d58de3bb3dcc66c4e288f29622d6863e846fdfb27a90740feb03a4761c6017250bc0f129cc65d19680ab9d6970", - output: "83db55d9eb441a909268311da67d432c732ad6bda0a0dae710d1bce040b91269deb558a68ced4aa5760ca0b9c5efc84e725f297bdbdadbc368bea4e20261c5", - }, - { - length: 66, - nonce: [3]uint32{0x1d41f0a1, 0x7c3b7778, 0x6991eea5}, - key: [8]uint32{0x1f213e39, 0x56261d14, 0x15fc7c2c, 0x21feccc5, 0xa95684c5, 0x26600506, 0xdadcc06b, 0xf2c810b0}, - input: "2f4da518578a2a82c8c855155645838ca431cdf35d9f8562f256746150580ca1c74f79b3e9ae78224573da8b47a4b3cc63fbed8d4e831a6b4d796c124d87c78a66e5", - output: "6fc086ded3d1d5566577ccd9971e713c1126ec52d3894f09ab701116c7b5abda959cbb207f4468eb7b6a6b7e1b6d2bc6047f337499d63522f256ee751b91f84f70b6", - }, - { - length: 72, - nonce: [3]uint32{0x749f022c, 0xa021dab0, 0x648c2252}, - key: [8]uint32{0xa1ace7b0, 0x567a0ea1, 0x52af13b9, 0xcba30c08, 0xe07a6d74, 0x5c3bca39, 0x85b2ac07, 0x3b5afc0}, - input: "55739a1738b4a4028021b21549e2661b050e3d830ad9a56f57bfcaca3e0f72051b9ca92411840061083e5e45124d8425061ab26c632ac7852118411ac80026da946357c630f27225", - output: "8051bf98f8f2617e159ba205a9342ab700973dd045e09321805eed89e419f37f3211c5aa82666b9a097270babc26d3bfe0c990fe245ae982a31f23cfbf6156b5c8cfb77f340e2bf5", - }, - { - length: 74, - nonce: [3]uint32{0x23c16ba8, 0x9fd1cd4e, 0xcb224ecb}, - key: [8]uint32{0xb694404a, 0x86b5f198, 0x10fd1bff, 0x13a84e54, 0xab21e509, 0x7443d764, 0x931b3f1, 0x686e87f2}, - input: "7ffd8d5970fdee613eeae531d1c673fd379d64b0b6bfedd010433b080b561038f7f266fa7e15d7d8e10d23f21b9d7724bb200b0f58b9250483e784f4a6555d09c234e8d1c549ebb76a8e", - output: "c173617e36ea20ce04c490803b2098bd4f1ff4b31fdca1c51c6475ade83892c5f12731652d5774631d55ae2938617a5e9462bb6083328a23a4fba52de50ca9075586f2efc22aae56e3a8", - }, - { - length: 81, - nonce: [3]uint32{0xd65f6f29, 0xf3f76219, 0x9a033c9e}, - key: [8]uint32{0xeba017c4, 0x69e0421a, 0x449e2317, 0x29858a11, 0xd0c8523a, 0xa8b0c9a2, 0xab2ca84, 0xaf011a45}, - input: "7a5766097562361cfaeac5b8a6175e1ceeeda30aec5e354df4302e7700ea48c505da9fdc57874da879480ecfea9c6c8904f330cbac5e27f296b33b667fea483348f031bef761d0b8e318a8132caa7a5943", - output: "5e9fbf427c4f0fcf44db3180ea47d923f52bee933a985543622eff70e2b3f5c673be8e05cd7acbcadd8593da454c60d5f19131e61730a73b9c0f87e3921ee5a591a086446b2a0fadd8a4bc7b49a8e83764", - }, - { - length: 88, - nonce: [3]uint32{0xc70ee56e, 0xe58ec41, 0xafd96f61}, - key: [8]uint32{0x172af2bb, 0x9085d27c, 0x8ca2c44d, 0x8aa148da, 0x290c88b0, 0x88187439, 0x18d54781, 0x633f2cce}, - input: "0777c02a2900052d9b79f38387d2c234108a2ad066cbf7df6ea6acc5a3f86b3d6156abb5b18ad4ecf79e171383a1897e64a95ecdbba6aa3f1c7c12fe31283629ff547cb113a826cb348a7c10507cc645fa2eb97b5f22e44d", - output: "368c90db3464ba488340b1960e9f75d2c3b5b392bdd5622ff70e85e6d00b1e6a996ba3978ce64f8f2b5a9a90576c8f32b908233e15d2f443cccc98af87745c93c8056603407a3fb37ce0c1f8ab6384cc37c69c98bfecf337", - }, - { - length: 92, - nonce: [3]uint32{0x3006da79, 0x2748051d, 0x72c17cdc}, - key: [8]uint32{0x60cdb7e8, 0xcecbe928, 0xe19b7ab9, 0x30d61537, 0xa0fbc199, 0x897738bf, 0xdd7705a9, 0x3e5c1763}, - input: "cf2dccbcfd781c030376f9019d841ca701cb54a1791f50f50bee0c2bf178182603a4712b5916eebd5001595c3f48283f1ba097ce2e7bf94f2b7fa957ce776e14a7a570093be2de386ececbd6525e72c5970c3e7d35974b8f0b831fbc", - output: "7c92b8c75e6eb8675229660cedcb10334965a7737cde7336512d9eff846c670d1fa8f8a427ea4f43e66be609466711fd241ccff7d3f049bda3a2394e5aa2108abc80e859611dbd3c7ba2d044a3ececa4980dd65e823dd110fea7a548", - }, - { - length: 96, - nonce: [3]uint32{0xfc0fb1ee, 0x414cc60a, 0x4144bd67}, - key: [8]uint32{0x103291c6, 0x822b03b6, 0xd29ab548, 0xc88f3efe, 0x6936056a, 0x28aaa61f, 0xa0df7858, 0xdaa23519}, - input: "e08a8949a1bfd6a8c1186b431b6ad59b106ae5552821db69b66dc03fbc4a2b970dcf9c7da4f5082572bc978f8ee27c554c8884b5a450b36d70453348cd6cac9b80c9900cf98a4088803f564bb1281d24507b2f61ba737c8145c71b50eb0f6dfc", - output: "73d043acf9dcd758c7299bd1fd1f4100d61ff77d339e279bfbe6f9233b0d9afa24992a9c1c7a19545d469fdfb369c201322f6fe8c633fcdcffef31032bfb41b9fb55506e301d049fd447d61f974a713debeaed886f486a98efd3d6c3f25fbb30", - }, - { - length: 103, - nonce: [3]uint32{0xc2030c57, 0x1e3b59e1, 0x607ede1a}, - key: [8]uint32{0xd1bac2b5, 0x56a94583, 0x628b479b, 0x3056a51e, 0x69bf8f8f, 0x2df1e03d, 0x4b9d48d2, 0x7df5c379}, - input: "a0c302120111f00c99cff7d839cdf43207a7e2f73d5dd888daa00d84254db0e621a72493480420c9c61ce1cfc54188ff525bb7a0e6c1cd298f598973a1de9fd2d79a21401588775b0adbe261ba4e4f79a894d1bd5835b5924d09ba32ef03cb4bc0bd6eb4ee4274", - output: "bc714bd7d8399beedc238f7ddeb0b99d94ad6bf8bf54548a3e4b90a76aa5673c91db6482591e8ff9126e1412bce56d52a4c2d89f22c29858e24482f177abacef428d0ae1779f0ae0778c44f9f02fe474da93c35c615b5fad29eca697978891f426714441317f2b", - }, - { - length: 109, - nonce: [3]uint32{0xf44dc81f, 0xcf6e03e7, 0xf4966796}, - key: [8]uint32{0xd7b12f4, 0x683f4789, 0xc7828fb4, 0x820fc6a0, 0xc51231eb, 0xe46716d7, 0x4036ef93, 0x26afb96c}, - input: "ebce290c03c7cb65d053918ba2da0256dc700b337b8c124c43d5da4746888ca78387feea1a3a72c5e249d3d93a1907977dd4009699a15be5da2ca89c60e971c8df5d4553b61b710d92d3453dea595a0e45ae1e093f02ea70608b7b32f9c6aadc661a052f9b14c03ea0117a3192", - output: "cbb8c4ec827a1123c1141327c594d4a8b0b4a74b0008115bb9ec4275db3a8e5529a4f145551af29c473764cbaa0794b2d1eb1066f32a07fd39f5f3fe51498c46fba5310ae7c3664571d6a851e673ded3badc25e426f9c6038724779aa6d2d8ec3f54865f7df612e25575635ab5", - }, - { - length: 115, - nonce: [3]uint32{0x8d3e461b, 0x7e05c360, 0x3bbbafdd}, - key: [8]uint32{0xf9b917c9, 0x9af89bf7, 0x7decbbc9, 0xe7e5ea7b, 0x9b4aab55, 0x90eff6be, 0xa19b6d90, 0xb9f69b1a}, - input: "275c97de985aa265332065ccce437770b110737a77dea62137a5d6cb62e9cb8b504d34334a58a71aba153d9b86f21377467b2fafaf54829331bf2ce0009acb37842b7a4b5f152aab650a393153f1ed479abc21f7a6fe205b9852ff2f7f3a0e3bfe76ca9770efada4e29e06db0569a99d08648e", - output: "b225aa01d5c438d572deaea51ac12c0c694e0f9dc0ed2884a98e5e2943d52bb4692d7d8f12486de12d0559087e8c09e4f2d5b74e350838aa2bd36023032ccbcae56be75c6a17c59583d81a1fd60e305af5053ac89f753c9347f3040e48405232dc8428c49dcb3d9b899145f5b3bc955f34dbbe", - }, - { - length: 119, - nonce: [3]uint32{0x871f33f5, 0xe4fee3ba, 0xcb8c1e93}, - key: [8]uint32{0x33124903, 0x7e0287e5, 0xe9d6988f, 0x1962405f, 0x5f21c1b5, 0x2ac695e6, 0x46b200c9, 0x9fda98ba}, - input: "ceda15cfffd53ccebe31b5886facd863f6166e02ec65f46f54148860a5c2702e34fd204d881af6055952690cd1ffa8ba4d0e297cc165d981b371932adb935398c987baff335108c5e77f2e5dd5e1ca9a017bc376cbdbe3c0f45e079c212e8986b438444e79cd37927c1479f45c9e75b0076cc9f8679011", - output: "a3f1c3f885583b999c85cd118e2ababfa5a2de0c8eb28aacc161b1efee89d8de36ddeb584174c0e92011b8d667cb64009049976082072e6262933dbf7b14839805e1face375b7cbb54f9828ba1ed8aa55634ec5d72b6351feff4d77a3a22b34203b02e096f5e5f9ae9ad6a9dd16c57ce6d94dcc8873d18", - }, - { - length: 120, - nonce: [3]uint32{0xef553ce8, 0xdfe120ea, 0x9a047e3a}, - key: [8]uint32{0xbef479c1, 0x59554f8b, 0xbf97f089, 0x52316f1e, 0x141e428, 0xff26dc04, 0xe10c8f57, 0xa7568a59}, - input: "799bb2d634406753416b3a2b67513293a0b3496ef5b2d019758dedaaac2edd72502fc4a375b3f0d4237bc16b0e3d47e7ddc315c6aef3a23fcae2eb3a6083bc7ac4fd1b5bf0025cc1cb266b40234b77db762c747d3a7b27956cf3a4cf72320fb60c0d0713fa60b37a6cb5b21a599e79d0f06a5b7201aeb5d2", - output: "e84dfb3dbaac364085497aeabd197db852d3140c0c07f5f10e5c144c1fe26a50a9877649e88c6fe04283f4b7590a8d0d042ef577693f76f706e31c4979437590fe0ab03d89afb089d1be50ae173ea5458810372838eceac53bf4bac792735d8149e548efb432e236da92bf3168bbcf36f644c23efb478a4e", - }, - { - length: 123, - nonce: [3]uint32{0xd98124a0, 0x78cd80aa, 0x3dc55cfc}, - key: [8]uint32{0x2286e41, 0xf13e38e3, 0xf735476b, 0x33c44bfc, 0xd7978797, 0x4a9c4595, 0x6080413, 0x1299fdd8}, - input: "b2d060bd173955f44ee01b8bfcf0a6fad017c3517e4e8c8da728379f6d54471c955615e2b1effe4ce3d0139df225223c361be1cac416ade10a749c5da324563696dae8272577e44e8588cd5306bff0bfbdb32af3ac7cbc78be24b51baf4d5e47cf8f1d6b0a63ed9359da45c3e7297b2314028848f5816feab885e2", - output: "ffa4aa66dd5d39694ae64696bfa96f771accef68f195456ad815751e25c47ed4f27b436f1b3e3fcaa3e0d04133b53559c100cd633ced3d4321fc56225c85d2443727bce40434455aa4c1f3e6768c0fe58ad88b3a928313d41a7629f1ce874d2c8bcf822ebdaebfd9d95a31bb62daab5385eb8eefe026e8cbf1ff7a", - }, - { - length: 127, - nonce: [3]uint32{0x53106b0f, 0xdf11fd81, 0x69d1b6f3}, - key: [8]uint32{0x736b138, 0x55cde194, 0xf8273c1, 0xf7c268e6, 0x61362bd5, 0xbb3cb455, 0x44d3c9fc, 0x7d56d3fd}, - input: "4f0171d7309493a349530940feece3c6200693f9cff38924114d53f723d090fffa3c80731b5ca989d3e924d1fa14266632cb9ab879e1a36df22dc9f8d1dadea229db72fded0c42187c38b9fa263c20e5fb5b4aa80eb90e8616e36d9b8c613b371c402343823184ecad3532058a46cf9e7ea5a9ecad043ac3028cbcc3f36d32", - output: "88c773ff34b23e691e14018ba1b2bd48a4a6979b377eb0d68336ce6192dcd5177e6b4f1c4bea2df90af56b35fe2a1d6279d253c0194dcbca9bf136f92d69165b216e4c9d1ce6b3fbe40c71e32c3f4088de352732d0e2bad9c16fd0bb9bde3d6c30257ce063432d09f19da79d49aa7641124a6c9e3f09449e911edbae11a053", - }, - { - length: 130, - nonce: [3]uint32{0x5e90ffbd, 0xa898f173, 0x269f9a88}, - key: [8]uint32{0x5244e05f, 0xf9adbe9b, 0x9e9f54ac, 0x23460046, 0x6782cdea, 0xba982c96, 0xc721506b, 0xed10f7e3}, - input: "8f8d9e18d3212bd20b96d75c06d1a63622fd83d13f79d542e45996135368772ea81511302a0d87e246dd346314cfe019bae8a5c97f567f12d82aca98dfea397c6a47dd0c419f1c609d9c52dcfcbe7eee68b2635954206ed592b7081442ce9ce3187d10ccd41cc856fb924b011f817c676c9419f52a2938c7af5f76755a75eb065411", - output: "4e130c5df384b9c3c84aa38a744260735e93783da0337ade99f777e692c5ea276ac4cc65880b4ae9c3b96888760fdddb74bc2e2694bedf1ee6f14619c8015f951ba81b274b466e318d09defe80bdbed57bc213ac4631d2eb14c8e348181d60f6295ceee1e9231ae047830ef4778ff66146621b76974773b5d11c8e17a476450f46ef", - }, - { - length: 130, - nonce: [3]uint32{0x308e39e8, 0x9aa4f14f, 0xf511db96}, - key: [8]uint32{0x833b5219, 0x4b82e588, 0x4b2d652c, 0x7c8f6ed7, 0xfe4be863, 0x9d3a50e5, 0xb888099b, 0x9f8d1968}, - input: "30d2379dd3ceae612182576f9acf6de505ab5a9445fe1a86ae75c5c29429e11c50fd9ec657b29b173a3763b1e171b5a7da1803ba5d64fccb2d32cb7788be194dbca00c3c91774c4c4c8ede48c1027d7cc8b387101a4fe5e44a1d9693b2f627626025072806083aadbced91c9711a0171f52ffb8ed5596cf34130022398c8a1da99c7", - output: "b1e8da34ad0189038ee24673979b405ef73fdbdd6f376f800031d64005a4ebed51a37f2180571223848decbea6dd22b198ab9560d7edc047c5d69183dc69b5fca346911d25cb2a1a9f830dc6382ad0024e8c3eef3aa2d155abcfe43bff01956a5e20a862fbed5c5e8df8eed0601a120caac634b068314e221f175baa11ae29002bb9", - }, - { - length: 135, - nonce: [3]uint32{0xa5feca5a, 0x753ac1b4, 0xc5a46609}, - key: [8]uint32{0xabbf4859, 0x828d9bf6, 0xf7f7aa6d, 0x25208ca2, 0xd7a4c0ad, 0x2fdd3282, 0x2bfcb8c2, 0x8389d84b}, - input: "d9404ccdcc8ef128a1b1ace4f9f1669d274ec82aa914cac34b83ac00b236478fd6167e96ec658850c6c139eb0f6fc0dd7191ba9a39828032008f7f37eb9a8df9d6cdd54240e600efe7fc49a674000c5030d825b2c5c96d0f19b8ecdbf4eeb86d3e569c5e3131abc7d6359dd4255284ccacf150d42e7a899536d51ee6db329654a4581c5ac6e419", - output: "c5534b5fb40b4834300e9577a9d87440c5272263d06e6aee84aa92cdf5d1b033145d336f26e5fe55c09a7e75753af93d0786dfc1cb435e86c67bd3ec8e766d0801b99e68691e2c3c3ffec539cf62e68285ea9027daa2716cd6f97e8eb7b9e266357a25eb2d4839a829508a6b7228f2832b3cd998f77597ae530430e6e4ecb53eb9efe456863a04", - }, - { - length: 135, - nonce: [3]uint32{0x12aa5846, 0x88604f6c, 0xc10d9585}, - key: [8]uint32{0x1491ccd6, 0x602f559d, 0xd4080c06, 0x202fabd, 0xffd3f4f8, 0xbf144c17, 0x88bf3f3c, 0x8083375}, - input: "231765f832927461f338aceb0f4cf51fd8469348c69c549c1dec7333d4aa4968c1ed58b65ab3fe3d0562600a2b076d56fd9ef91f589752e0455dd1d2e614cacfc0d757a11a4a2264bd38f23d3cca108632201b4f6c3b06477467726dde0c2f3aee01d66d788247663f1d0e66b044da9393ede27b9905b44115b067914961bdade85a2eca2844e1", - output: "1dd35f3f774f66d88cb7c2b23820ee078a093d0d85f86c4f103d869f93e2dbdd8a7cb8f101084fe1d7281a71754ec9aac5eb4fca8c365b24ed80e695caace1a8781a5a225938b50b8be96d0499752fdabd4f50d0b6ce396c6e2ca45308d1f2cc5a2a2361a8ca7a334e6ee62d466d74a1b0bf5b352f4ef6d8f8c589b733748bd3d7cda593243fab", - }, - { - length: 140, - nonce: [3]uint32{0x1c9d70f0, 0xa088a367, 0x4ec24d2b}, - key: [8]uint32{0x494e9775, 0xd07a852, 0xaf8af24a, 0xc65b825c, 0xc5e06780, 0x17fbbace, 0x651d71b5, 0xf548d8ef}, - input: "e46841f12d98aeb7710b9162d342895a971b0e3a499886bbb6aa74dc744a28d89a54542b628acdc2f693cb7c03f73fc3b74069bc3f2d000a145fb8a806cdc7d6fa971da09a33b92851cc3d1f6f5646d7fa2b1d564876feefeb63b6e66dba1c0b86ca345235bb822e0f93132346840d2a3d6eb1b541178ea51affc7b31f8da02732cc4e5bcb5d8683ae0a91c9", - output: "1dcbfd0bb2b905656c52bd7b1bcdad9b4d434ae9ac221a0d3a316115cdd4a463fa9b3444d2612a4e277d0dcd881fa6e80e59e5a54e35e1a14747aed31edf4ac24214f9d9c329ebe2157620b64efaded9976549bc4aa100d5c15be3f85f700f8a21dfe77590dfee2de9a23cc1ed1e44f32ebf68ca289b097bc13b42802dc7c75309c4afc25b5741839f7db3d5", - }, - { - length: 144, - nonce: [3]uint32{0x23067b8b, 0x5b276c6d, 0xaeca6c60}, - key: [8]uint32{0x29d64488, 0x893a2973, 0x32e3b4ef, 0x2af3d5d4, 0x95ec01b, 0xc805b64c, 0x884e8b7d, 0x798d7062}, - input: "e98e4a9550bdd29e4106f0cc8669dcc646a69438408e9a72c7cdb9b9d437b5f7a13fcb197629541c55bca1f8972a80cd1c1f591a0e24f977cdeb84763eab2648e42286e6473ea95e3a6a43b07a32b6a6cd80fe007ba0cf7f5ac7e651431f5e72690ec52a7134f9757daf0d8eff6b831a229db4ab8288f6bbf81e16fedebe621fd1737c8792cfd15fb3040f4f6a4cbc1e", - output: "5c69cf522c058790a3bc38979e172b60e71f7896d362d754edc1668d4f388b3fc0acdf40786d2f34886e107a142b1e724b9b9b171cb0e38fd78b35f8ac5269d74296c39c9f8628d848f57af9d8525a33f19021db2b9c64ba113171ebb3882075019ec7e77b51ce80b063ed41d48dad481d9536c030002a75d15c1c10ce0ec3ff17bc483f8416055a99b53035f4b6ea60", - }, - { - length: 148, - nonce: [3]uint32{0x2b079658, 0xbdf5da85, 0x8a75450d}, - key: [8]uint32{0x49c9eaa3, 0x62048819, 0x9baacfa5, 0x3870addc, 0x5c682e1, 0xf4f9fff3, 0xa3848e4b, 0xac1ebc1}, - input: "ce0f0d900dd0d31749d08631ec59f216a1391f66a73bae81d3b0e2919a461bc9a14d6a01b827e3bcb55bbccf27c1ed574157e6becd5cf47181a73c9d3e865ab48a20551027e560e965876b0e1a256bfa5cb5179bf54bd8ec65e5570e374b853b37bf4b3ef1ec612d288ebc19275fa88da9419e012f957f9b6a7e375b3377db0eb3619c731aebfeb0930772b4020d3a3e90723e72", - output: "b06981b57fe184091ef9f8ccf522a5bcdb59bf9a68a3ddb817fdd999a6ecf81053a602141cf1b17017bae592b6b6e64756631a2b29a9e1b4f877c8b2ae30f71bc921e4f34b6f9cd8e587c57a30245f80e95005d0f18f5114400785140e6743da352d921fb4a74632a9c40115ad7706263ac9b41a11609fa0c42fc00f8d60931976162598df63ebad9496dd8943d25a03fa47475c", - }, - { - length: 148, - nonce: [3]uint32{0x98e8ab8, 0x84d8e77b, 0xbb305841}, - key: [8]uint32{0x46b5f93c, 0xc8b2778d, 0x2cc5278f, 0xd2a3904c, 0x6ce5d4f, 0xc4459e8, 0x4a35c30, 0x2feadc02}, - input: "eccfd66bdc691478f354b8423d6a3f20932a1f591d8e6cefa734975fb8ee6881b6dc92c0d1d5ed54fd1999efd7f11ac697a1f130587dd895eb498c9a8fc7d1714c385ec156ecae3bdea2a3462834245e724531d0fedda2b77693a53ed7354b758e875b23cfc83219a091fb2076e7a88cd77f779ed96f8d81ffa3fe5059303ac706086494b9f2982f4f88a0c6fadc3748625004db", - output: "925529047d4177b72bf50905ba77e47608815522c1829b24046e439d5451901257903a5409fb910373167e8b7f4fdfa543a477608ddfc11bbd1efc138366961463b9915b302a346b795dd593f6fcf4fa73529b6fe83079552aabbe99474a72806f59688d826675fa7f6649b9f5307e5028853c9821b8c4a1a0fc4bfdc7c8c78b25aeaba2b5821d17b36317381a3bd578917d2504", - }, - { - length: 152, - nonce: [3]uint32{0x2e2a6e4a, 0x9a6d488a, 0xf9966cb6}, - key: [8]uint32{0x58903bff, 0xc2be173f, 0xe26128b5, 0xb6b6af53, 0x92f8eeb, 0x38cf3336, 0x7fdf90fb, 0x7ae24b37}, - input: "f0c7139c69413869bca980d7f192b2bc3f57e34ca4f26164e1a54a234e84e1aa285cc02cfbaef3dfba2dbb52a555ec1f6ef0e89d0b2f0bd1846e65b74444b5f003a7308965e67bed558689be2668ca10ca368fac072e0e4535a031af23b3c37c561e185872b86c9bceddb5c1199e43fb5f735384766d33710460b541b52d3f5b6c108c08e76724bcac7ad2d866a8bbeeea92a3d867660d2e", - output: "d2c16c7a242b493038203daec65960de384c030eb698ef6a53c36eabb7556cbfa4770eaa8bc0a2b385ad97495eeb1c03ff4e6efcb804aefa81c177dc62700a9eefe6e8dd10cff5d43a2f47463cab5eb1ee260c3826cac9bfa070f1e0435541a89ebd224d13cc43f8fff12f38091c2b3f2102d5c20d8b1c3ae4f129364bbe9f9ce2147dcf0639668ddb90dffe6a50f939f53fa7ba358e913f", - }, - { - length: 155, - nonce: [3]uint32{0x243e0198, 0x884448c, 0x9a31e760}, - key: [8]uint32{0x37e017bc, 0x9b1e2e90, 0x15679daa, 0xf94a23ee, 0xda86dfe, 0xc3eea84c, 0xdd199799, 0x6eeffb92}, - input: "7024974ebf3f66e25631c0699bcc057be0af06bc60d81a7131acaa620a998e15f385c4eaf51ff1e0a81ae5c6a7442d28a3cdc8aeb9701055e75d39ecac35f1e0ac9f9affb6f9197c0066bf39338a2286316e9d1bb7464398e411da1507c470d64f88d11d86d09e6958fa856583ace697f4ee4edc82618662cb3c5380cb4ce7f01c770aab3467d6367c409a83e447c36768a92fc78f9cbe5698c11e", - output: "ff56a3a6e3867588c753260b320c301ce80de8c406545fdd69025abc21ce7430cba6b4f4a08ad3d95dc09be50e67beeff20d1983a98b9cb544b91165f9a0a5b803a66c4e21bd3a10b463b7c1f565e66064f7019362290c77238d72b0ea1e264c0939d76799843439b9f09e220982eb1dc075d449412f838709428a6b8975db25163c58f40bf320514abf7a685150d37a98bac8b34ccb5245edb551", - }, - { - length: 160, - nonce: [3]uint32{0xd24e866d, 0xc59d25d8, 0xfcf623f1}, - key: [8]uint32{0x5f32cca0, 0x4167cac5, 0xc04943ee, 0x507fa1ec, 0xad8fdfc0, 0x6266fa2d, 0x22f05341, 0x8074143e}, - input: "8d79329cf647e966fde65a57fc959223c745801c55312046b791671773cca0af4cd48ead1f316eba0da44aa5d18025eced0c9ed97abaabb24570d89b5b00c179dca15dbae89c0b12bb9e67028e3ae4d6065041b76e508706bec36517a135554d8e6ef7cf3b613cbf894bec65d4dc4e8cb5ca8734ad397238e1e5f528fa11181a57dc71cc3d8c29f3aba45f746b1e8c7faace119c9ba23a05fffd9022c6c85260", - output: "60aea840869f7be6fcc5584b87f43d7ba91ed2d246a8f0a58e82c5153772a9561bdf08e31a0a974f8a057b04a238feb014403cd5ffe9cf231db292199198271f9793c9202387f0835a1e1dc24f85dd86cb34608923783fd38226244a2dd745071b27d49cbffebea80d9dacad1578c09852406aa15250de58d6d09cf50c3fcfff3313fac92c8dad5cb0a61ccc02c91cecee3f628e30c666698edecf81831e55ec", - }, - { - length: 167, - nonce: [3]uint32{0x30b61047, 0x810cf901, 0x4d681524}, - key: [8]uint32{0xe51476d0, 0xdf98008d, 0x59dfe69e, 0xdb39166, 0x6c1e4a4a, 0xfb76165e, 0x5180f185, 0x7359fb35}, - input: "85484293a843d2d80b72924b7972dfa97cbe5b8c6bcc096f4d5b38956eb3f13f47b02b0f759ea37014ecdecfb55f2707ef6d7e81fd4973c92b0043eac160aaf90a4f32b83067b708a08b48db7c5900d87e4f2f62b932cf0981de72b4feea50a5eb00e39429c374698cbe5b86cf3e1fc313a6156a1559f73c5bac146ceaaaf3ccf81917c3fdd0b639d57cf19ab5bc98295fff3c779242f8be486ba348bd757ba920ca6579be2156", - output: "bb1650260ef2e86d96d39170f355411b6561082dcc763df0e018fdea8f10e9dc48489fb7a075f7f84260aecc10abcfadbc6e1cd26924b25dedb1cc887ada49bb4e3e02006bdd39098ef404c1c320fb3b294ded3e82b3920c8798727badfb0d63853138c29cf1ebf1759423a1457b3d2c252acf0d1cde8165f01c0b2266297e688ff03756d1b06cb79a2cc3ba649d161b8d9ef1f8fb792bd823c4eabb7fb799393f4106ab324d98", - }, - { - length: 172, - nonce: [3]uint32{0x42020cbe, 0xad62af90, 0x29e53cd}, - key: [8]uint32{0xabad2095, 0x601ec477, 0x3bc923a1, 0x1edede1a, 0x33612355, 0x285b4858, 0xd3fd6714, 0xe0f4bcc3}, - input: "a2fc6e1b5281a4e0330eecd1ab4c41670570423173255979953142b78733b2910fa5540e8294208df6ae4f18672d5ac65acf851bcd394e1932db13c81b21e6f165e5538aff862e46126c650bbe055e54b31c78f2f0221d2631d66ef6d3f4c5ae25eada043b74d8770e2c29799c0954d8ccbd17766b79e6e94e88f478db3566a20cb890846917591a07738328d5c05f7ed4695a82607660f1239661faa9af0368aeb89726f13c2aaecf0deaf7", - output: "d8fe402a641c388522842385de98be60f87d922c318215947d4b7562d4ca1e2dbc7ee86494e65fb0bfddfdebdb2ae6469312f95b32c722b2720d64bb8d7cc3dd82f9055b1d89f05b77984f91f94ba4ac79c5129cd7c91cc751b0defc3f2799518e372d27aa683f1e7bbd4f55414c48fe8a3a37ac1f179a1a329cda775aec0d31d75a5a38addb1de67c06bddbedf4c8d87abc18c9f9dd072d457ea29ad4dfb109ce7e99a4a82fbe330b0afbb5", - }, - { - length: 176, - nonce: [3]uint32{0xa8021c8f, 0x667a02c4, 0x7a68b693}, - key: [8]uint32{0xece401c8, 0xfa805a47, 0x6d572fca, 0x9c1c780c, 0x647545e5, 0xd7ef4c11, 0x91dc1e46, 0xba2a694e}, - input: "480387bc6d2bbc9e4ced2448d9ec39a4f27abe8cfb46752d773552ad7808a794058962b49e005fef4e403e6a391d1d3f59025eeb5fb8fbbe920f5361862c205d430eac613cd66108f2f2f0bd4d95a8f6ca7bd1f917eaeb388be87d8b7084a2eb98c575034578edf1b3dafff051a59313873a7be78908599e7e1c442d883d3fd3d26787eb7467eed3a3fb2d40046a4460d5d14215565606bcf8b6270af8500e3504d6d27dacf45bace32214472d525fdc", - output: "ab81a9c28358dfe12e35a21e96f5f4190afb59214f3cf310c092ab273c63cd73a783d080c7d4db2faccd70d1180b954cd700c0a56b086691e2c2cd735c88e765e2266cd9ebe1830d63df4b34e2611a8abeeca9c8c4fac71135dafb1cb3569540ed1362ddeb744ed62f6fd21de87b836ec2980f165c02506e0c316ae3cf3d18a862954d9781f726ecc1723af4a730ccc6d6de82553450a52499acb58fb2008969401c45b2f20e12b58f308db1d199b4ff", - }, - { - length: 176, - nonce: [3]uint32{0x414e687c, 0xc6fc69c2, 0xd3ca12d3}, - key: [8]uint32{0x1b51cca, 0xbc8455af, 0x3f904842, 0x6042b452, 0xcd4dd164, 0xda83f3f0, 0xff04b972, 0xf972dd0e}, - input: "b274e61059f3215173ae226e30a92ee4b4f8a3da95f2e768e3fac2e54ddac92c200c525f190403a6ef9d13c0661c6a7e52ed14c73b821c9680f1f29711f28a6f3163cf762742ed9474dbea51ff94503a5a404adbbdfbf4c6041e57cb14ea90945dc6cb095a52a1c57c69c5f62ac1a91cd8784b925666335bbfee331820b5f7470bc566f8bbb303366aafe75d77c4df5de2649ed55b2e5e514c3cb9f632b567594a0cf02ec6089a950dbe00554ee4dfb9", - output: "a0969730d48ee881792a3927b2f5d279aba9f2ed01e6b31b92d0e1fb8ba7f35a236d838e0ce5f8654957167de864f324c870864b4e7450a6050cd4950aa35e5a1a34a595e88dd6f6396300aff285de369691b6e0e894106dc5b31525e4539c1e56df3ceedbbab1e85da8c0914e816270a4bae3af294b04a3ea6e9ef7e2aab4da5f5370df2706b5e3f000d88179ac756deaa652a1cc85e80ad9622f1bf91a2776262eb7289846d44f7f8192e763cb37aa", - }, - { - length: 183, - nonce: [3]uint32{0xdd315c1d, 0x2335da98, 0xe0a0da0f}, - key: [8]uint32{0x6419c7d6, 0xd340f42, 0x7af2f4b8, 0x3536cf42, 0x2f68c6fb, 0xac9d855f, 0x7c4d490, 0x9711b1b1}, - input: "ee849039c6cd972dc943d2a4468844d130c0150276f4e0889047e2300c3ecc6792c4527bfe9437dad877eb986e6b1aa9b867d1798c9d314243f0a87ec9ee5b601c2554876c87cbf50df3334a077c4152f8b8fef4a2d301ddbfa90c887ece757c3eb6c4fc1e0212d6b5a8bb038acaec28cba064c9b34f5364cb7f0fc2ac4ef2c7ddde0f5ba17014459eaa78f08a46a01882ebf7c6e409dadda250bb899dc8b3b70e160bbcb4412a9963b174d0fc6bc16383a46ffaacb6e0", - output: "3e272ded9c0a5cebe7cf17ac03f69eb20f62996e047501b6cc3c8691ddb2780ea72c21a81888bfea96e4373a412c55ca95648390de740102d661143043baec3976230e024477d134b8504a223c36a215b34164c9e9e1fa99a49fdc56f2f04ea525a6b82997d9bbc95c4b5baeab4dec50061efb7c1a757887acb8b47b142e0a2e61885a2c14c4642d83d718a0546b90699adc545a48129603862a1c89d8e665cde54b3ba487754db6d6f5acf6a4b95693cc569577a2dc48", - }, - { - length: 185, - nonce: [3]uint32{0xebb44f7c, 0xaf14c7dd, 0x4543cd7a}, - key: [8]uint32{0xce71977, 0x99790e86, 0x6510d6dc, 0x37968ae7, 0x2917fb9a, 0x19ef25f, 0xd282d085, 0x6128d043}, - input: "0992396a6f29b861dd0bc256e1d1b7dce88435733506a6aa20c62e43afa542d1c46e28b2e6d8e2eacb7c08db05e356fe404684b0e3a9849596db82eb788aa09258c28eb19e9838f757425b4edef12deeca56e30cf030272e325d4246d6e083219b2f965124963ca91f066d47bf5a8282a011a78b0155aa70038259a4a59135f241fd2f88c908b9f4eef7b7df0f3a1c16a52c009b522f89dabd52601bbf6e3ce68732e1a6d444469480f06da218786cf6c9666362e7a7f7be12", - output: "545c05a84b5a4fffd1dd623c8f2b11443818560bdb0c26dadd3b694d4790d294b99059f4127b7cca122c4000954d745af96094ff4623f60db33e994bb6903263d775f48d7047427b3a498c2ecde65bd37bcb8ee7e240a1e08c884c0079cab518f4e1c38ba5ea547f4da83b7c6036e4259bee91c42e8fae895df07781cc166f1d50e1550a88ee0244bb2950070714dd80a891aa8a9f0580a67a35cb44609b82a5cc7235f16deea2c4f3667f2c2b33e8eeef944e1abdc25e48fa", - }, - { - length: 187, - nonce: [3]uint32{0x35cb7190, 0x212e9a86, 0xbc423ce4}, - key: [8]uint32{0xfa19cede, 0x576ae8f2, 0x58055dab, 0x91b3355d, 0x69d2501a, 0x736323c2, 0x266c1385, 0x134f4557}, - input: "3b9efcbbb607fad5e9f1263dad014cc5c2617d439fcd980408f4f9a93acb1a33d1c3a22f38c037e4603dfbbfb5571bc08c4a1958cbbf510e3e4dd19007fe15fad7808369149a9c4db7ca0496f7a600a6f2454ee1cffd5a68d45c270e4b53ac9b77f33a1ffbb1804244f57d2b05b8036fe2cda9efead3d4eff074ea5c07128e0b354a4a11ffa179163933bc6bd10d200804cc93b64575746e94e975f990bddcc8a4335e99e2459fbe9bc0e004ffcd6cac52f48ef55cc0637a75c1dc", - output: "631ba7301e33236da2477506ea98d3b732447389e849b68e1f09bd5fd814f40dc3247a1012fa654f08e3dda0c104ee2dff12ecf5cb018644de50d70dfb6c8cc1f5f552e5f1e50466bbb538ad6b98fd37f33fe615c326efc9cc97899b829b007f91569fa9b28ce0076c53daedf9cc0f838e22cf1125b86a6a2c2eb4a45dadea45ad00fb4f054e7d6b09c13ab1dd5328debfbf4f1b70af2b8a5b1d02df8a87d7661473e0c180ba4c815f14db87c5bdc15f11a29d8e0ce3d747d5dcd4", - }, - { - length: 191, - nonce: [3]uint32{0xccc941ac, 0xdba45b02, 0xab0d7ad6}, - key: [8]uint32{0x9b750752, 0xa627090a, 0x967c95f0, 0xf8ff2c3f, 0x69beb97e, 0xa30b99c1, 0xadddc83, 0x443f9baf}, - input: "f28a71efd95e963e5e0bc0fcf04d8768ce93cb55dc73c32e6496022e214596314b7f843f5c7b136a371c2776a0bfbdd534dccbe7f55e9d3d3b5e938f2d7e74393e4caf6c38fa4b05c948e31dc6a9126817fa3d7892c478f75ab9f6ab85c0e12091bd06e89c7d3ca8d9dcdd4c21fead3d769a253919c2c72dd068474ea322b7e71cafa31684e05a63e179e6432fb70661792cc626a5060cec9e506b35d9286f15dc53cc220b1826314eec337dd8e7af688e5950b2316c30516620569ea65aab", - output: "1bcea54b1bf4e6e17f87e0d16388abe49b988b9c785b31f67f49f2ca4011ecd2ad5283d52ef707dd3b803e73a17663b5bfa9027710e045a0da4237f77a725cf92792b178575456de731b2971718937dd0e9ea12558c3fa06e80bbf769e9799f7470db5b91476d6175f1a6d8e974fd505854c1230b252bb892a318e6d0c24dcc9ecb4861769cd746abab58805bc41c6086a6d22b951fba57b00c5b78f6dcb2831715b9d4d788b11c06086f1d6e6279cd130bc752218d7836abc77d255a9e7a1", - }, - { - length: 198, - nonce: [3]uint32{0x987e7c58, 0xcc839a94, 0x30952e60}, - key: [8]uint32{0xe34a286f, 0x4adcd996, 0x97168712, 0xa82dde8, 0x14249e5, 0x5e82810b, 0xb4a445e8, 0x9579adb0}, - input: "c1d1ede73bd89b7c3d4ea43b7d49c065a99f789c57452670d1f92f04f2e26f4f5325c825f545016c854f2db2b3448f3dc00afe37c547d0740223515de57fd7a0861b00acfb39931dc9b1681035d69702183e4b9c6559fb8196acbf80b45e8cc5348b638c6d12cea11f6ef3cc370073c5467d0e077d2fb75e6bf89cea9e93e5cf9612862219ca743ef1696783140d833cd2147d8821a33310e3a49360cb26e393b3fee6dba08fcda38d1b7e2310ec1f715e3d8fa0c6b5e291eea07c25afd5c82759a834a89cc5", - output: "11a8493cdc495c179f0d29c2b4672997205a9080f596ee3c80d79b55162b1c875ac18eb94bf2a9e05b08024f524a1e9665912394a330c593d23260e6bdf87620c10a48f678693196fb744c49054182fba667c601e7b7ebf0f068e8d69ba004b804fda616a4a0d5350e1a3bd424b8266462be282308219c578569aefc1ccd09ecdf5da283356c9e524e14e69d25b0e19643dab26f54373a7272b43755c3f1ddaee6c5fb9e8e093110c41697e95f73a68c75454e050239197c9fbd8cec76698bd11894ebf6e2b2", - }, - { - length: 204, - nonce: [3]uint32{0x851f025a, 0xe6f3c800, 0x85ae7530}, - key: [8]uint32{0x2d0dbe47, 0xda05e465, 0x42f6b3b2, 0x7026e79e, 0x9e446680, 0x691df976, 0xf7b23da2, 0xbb3421fa}, - input: "37b2dc4b6a5203d3a753d2aeffcdaed5a7c1741ed04d755dd6325902128f63b6981f93c8cc540f678987f0ddb13aae6965abb975a565f0769528e2bc8c6c19d66b8934f2a39f1234f5a5e16f8f0e47789cd3042ca24d7e1d4ddb9f69d6a96e4fd648673a3a7e988a0730229512382caaded327b6bbbbd00a35df681aca21b186bc7ac3356d50889bbf891839a22bb85db4c00bfa43717b26699c485892eb5e16d1034b08d3afa61f3b5f798af502bba33d7281f2f1942b18fb733ca983244e57963615a43b64184f00a5e220", - output: "b68c7a2a1c8d8c8a03fc33495199c432726b9a1500bc5b0f8034ce32c3e3a78c42c1078e087665bd93c72a41df6bfa4e5beb63e3d3226aeeba686128229a584fab0c8c074a65cef417ad06ab1565675a41cf06bb0fb38f51204eccccb75edd724cdd16b1d65a272f939c01508f0385ca55ac68a0e145806317cc12e6848b1124943a6b2d99a8c92083fc5f31ab2e7354db3f8f2d783dbf1cfec9c54f8bfcb93d6f28ef66f18f19b0fab8836458e9b09bee742ba936cb2b747dd9dcf97ca7f6c82bf0af6f1b433592d65143fe", - }, - { - length: 210, - nonce: [3]uint32{0xaebfd97f, 0xf583442d, 0x15ab2f1f}, - key: [8]uint32{0xd3d1cf9b, 0xe43187e6, 0x5071a757, 0x412a83b4, 0x3f27716f, 0x17fdc488, 0x271f77ed, 0x6c4bb056}, - input: "68c2c5612912b5f994172720130dff092ee85a2c1395111efa64d5a281ca864d3db9600e685854d81c6de7e8747b92fb7c4c2efa829d3d4c0c9fc9d689e2e5c84c9eae8ba4ab536fb6c7523124b9e9f2997f0b36e05fb16163d6952eee066dd22fb7585925ffded0204cc76818bcead0d1f8095ca2cf9cd1ddcd0361b9c9451940e14332dac4e870e8b2af57f8c55996447e2a8c9d548255fe3ed6c08aedaf05bb599743ecb0df8655152bbb162a52e3f21bea51cb8bf29f6df8525eb1aa9f2dd73cd3d99f4cca31f90c05316a146aab2b5b", - output: "d0ae327fa3c4d6270a2750b1125145bdeef8ab5d0a11662c25372e56f368c82c6f5fc99115a06a5968f22ffe1e4c3034c231614dd6304e6853090c5940b4d1f7905ef4588356d16d903199186167fec57e3d5ce72c900fe1330a389200ed61eec0bdc3672554f1588ec342961bf4be874139b95df66431178d1d10b178e11fcbd26963ff589d5d5faf301b7774a56bbfa836112a6ea9c3026ebdd051085f9131132c2700674bef6e6c2c5b96aace94eb2ba6c0e0aef0eefa88995e742ca51ac50af83683b801b7c2c5af4880e2b344cc5564", - }, - { - length: 216, - nonce: [3]uint32{0xf9e973b8, 0x2485a6a7, 0x2ea7dee6}, - key: [8]uint32{0x96edef11, 0x8cf57f26, 0xb6e3a83c, 0x9ef434c6, 0x4607ea48, 0xace87e4d, 0xa0d87475, 0x3a9c9458}, - input: "fed3d1efa309c8b50cb9da02b95167f3b77c76e0f213490a404f049270a9c105158160357b7922e6be78bc014053360534add61c2052265d9d1985022af6c2327cf2d565e9cef25a13202577948c01edc22337dc4c45defe6adbfb36385b2766e4fa7e9059b23754b1bad52e42fce76c87782918c5911f57a9394a565620d4b2d46716aa6b2ba73e9c4001298c77bfdca6e9f7df8c20807fa71278bd11d6c318ed323584978ad345c9d383b9186db3bd9cec6d128f43ff89998f315dd07fa56e2230c89d803c1c000a1b749107a3159a54398dac37487d9a", - output: "6a95fba06be8147a269599bccda0ce8f5c693398a83738512e972808ec2f25bc72402d4bcd1bc808cc7772b6e863b0e49d1d70c58fcf4fcaa442215eeb3a4648ade085177b4e7a0b0e2198f0acf5465c97bd63f93781db3f0b9a0a184c3e06a76c4793a13923f83b2242b62511c2edff00b5304584cbe317c538de23785d2504fae8faabee81c5315298186ce3dcbf63370d1ccd9efec718cbc90b3d2e0b0b6aefb3a9b31e4311f8f518be22fdc2b0f00e79a283701c53f6936dd63734ecb24480d5365d1a81392498faf9a1ddee577007acc5f8c87895be", - }, - { - length: 217, - nonce: [3]uint32{0xe3bd4c44, 0xa3b75a31, 0xfe92010f}, - key: [8]uint32{0xdd05ab8b, 0x5ac7cd1, 0xb8113720, 0x53524706, 0x8e0ceea1, 0x52eb23e7, 0x1c85730b, 0xb33914d5}, - input: "d776bee5625d29a2ebf6fec4df94d2b9ac62e8e7c56704fd38a87ee932b787cbc555621535e76ea30183cb0ee30604f485b541f45feb8c01b9750d37fded5cdffbbc34fb90fdc9c7c7ddf949a1d50b796f1ea5db437238c7fb83c4b22c9e491f75b33d84746f1cd10bfda56851b8514ff0ded0adfd5092a66a85202d06bd967485d06a2c56011110da74bf40b6e59f61b0273164744da02ce2b285d5c3f03aee79eea4d4503e517177692ed3bb035071d77fc1b95c97a4d6cc0d41462ae4a357edf478d457c4805fa586515614697e647e19271091d5734d90", - output: "60e9b2dd15da511770162345251edfb15cea929fb79285a42f6c616dfde6befc77f252e653b2d7902a403032fc4ce4934620931a2ec952a8d0f14bf1c0b65cc287b23c2300999ed993446eb416749bf0c9c7dfe60181903e5d78a92d85e7a46b5e1f824c6004d851810b0875ec7b4083e7d861aabdd251b255b3f1fd1ee64619a17d97fde45c5704ab1ef28242d607d9501709a3ac28ee7d91a3aac00cd7f27eb9e7feaf7279962b9d3468bb4367e8e725ecf168a2e1af0b0dc5ca3f5a205b8a7a2aae6534edd224efa2cf1a9cd113b372577decaaf83c1afd", - }, - { - length: 218, - nonce: [3]uint32{0xcdabfd50, 0xd10d5b99, 0x9e160a85}, - key: [8]uint32{0x8231a4e9, 0x89f33c8b, 0xf96b11b, 0x853cae9d, 0xf6624a33, 0xee9523ee, 0x28bb7853, 0x688ac6f8}, - input: "4f57848ff5398e61bcafd4d4609bcd616ef109c0f5aa826c84f0e5055d475c6a3a90f978a38d0bd773df153179465ab6402b2c03a4bf43de1f7516eb8626d057ae1ab455316dd87f7636b15762a9e46a332645648b707b139e609b377165207bb501b8bccfa05f1bf0084631c648279afdf51c26798899777812de520f6a6f0d3c7f3ef866982f5d57f9c8d81c9a4eabb036651e8055a43c23a7f558b893dd66d8534bf8d179d8aa7d9e8987cfdaaa7b5a9381ba9c79d5c1161b1bdbd30defdd304ee07f19b7ba829a0d5b40a04b42edd6407b68399caac69069", - output: "e096cc68956ed16d2dea1154a259e01647913eeea488be0b54bd1816c781a35e161772ae1f7a26b82e864ade297a51cc9be518641b2e5f195b557ec6fc183e4e5c1fc01d84fe6ca75e5b073af8339427569b1b8ee7fcff0ffa5e7e6237987c40deec0abf091c06a3b28469c8f955fc72e4f3727557f78e8606123e0639dff782e954d55e236448f4223ff6301accda9f8fa6cd43a8d6381e5dde61851a5aec0f23aeca7262659bc793ce71fa7992f80e44611ae080b7d36066e5c75c30851306f0af514591d4d5034ecdf0d6c704bfdf85473f86141c9eb59377", - }, - { - length: 219, - nonce: [3]uint32{0x67de323f, 0xa0442ac9, 0x9d77b1d9}, - key: [8]uint32{0xca8d33d4, 0x834349d9, 0x5e68d581, 0x99a7c30e, 0xdc7f6038, 0x697e8b63, 0x284c2ece, 0xee3e3bfa}, - input: "046a61c0f09dcbf3e3af52fab8bbcded365092fad817b66ed8ca6603b649780ed812af0150adbc8b988c43a6ada564a70df677661aff7b9f380d62977d8180d2506c63637c0585dcef6fe3f7a2cf3bbb7b3d0df7769f04bf0f2e3af9439ab7615c304b32055aea0fc060890beb34fa9f90084814b6ed7363b400dfc52ee87925c5b4a14a98e3b50c7f65adc48c89ddd6414626c5e0bdefabab85c4a0e012243e682d4931be413af62fd7123ab7e7774fcae7e423bf1d3a31d036195437e9ea8f38aa40182daa9aacf3c9f3d90cc0050977c6065c9a46bcca6ba745", - output: "cd5a6a263e3ee50dda0e34c614b94c3ec1b14b99a2f4095a6b5715fdfc3449fcdf8a09d1ae02d4c52e5e638f1ee87a4a629f99f15a23dd06718792f24285f5a415e40f698752c697ee81f2f9248da1506ce04a7f489f8e2b02e6834671a2da79acc1cdfb78ea01822d09a1c4a87ffa44e56c4f85f97507044cf946ccb6a2e06e2917bac013f608d75ee78fa422a5efc9c569226bf7068d4705fde3a9fad2030256db0acf9a1d12666e0acf9f5346ad62e5af4c01a008d67ab1224b3e98278d073116ff966cdc779fb3aff985ec9411a3eefa042d71dd4ae5b15d5e", - }, - { - length: 221, - nonce: [3]uint32{0xa36a3d5a, 0x1747a05f, 0x5440eb4}, - key: [8]uint32{0x2d701ee6, 0x143d5a1a, 0xbb67b9ab, 0xabc88ccc, 0x20baad8f, 0x6507e48b, 0xdb1e1b39, 0x9e521d80}, - input: "af516216f74a6344cbe458cbba820f7e25c0b10aa84b790da2ee6317e059171076d7246c2878be83fc00c200d546c007f849e4c163d52c7b0da31beff4abff481be3266b92e668cf4dd1c84d9d7b3e5191dcd6ddb51d17d337621046e83e9ac035fccfb239648bc3c6fd340fbb50707e5a33b3ef439d292192d0e4bc727690c61450e5a28789e5ea50e746bc66d039493e080fb70e9ae06d89004cb71de8178941c422f1e9862492fc9149a4864ff52b1277b9f5a63c2f16e9adb5263cf65a034a62ebb0f1a385d2681c87a35f1c45670b4edef1c68fe9544fcf411d95", - output: "b22ffd8f0e549bd3e0206d7f01ff222f92d39b41cf995a331d5ef0cf5c24bcc3ddb36e64d351b5755400246fe4989b5f912e18daa46cdd33e52dafbd2872f16e94220b56315d72c1dbb1525fd34831d7202970c11711ff36de3fc479407c34fef0aea86e172f9beb0f393194355b9dd59625639f4a6bf72ba571c229f2fb053c1114e82793deb2dfe8232f1a327949689d2fb2820662dcd2a39a2546c7df12b3ff7e87e58c74badf568cddebd3c558f0f7874c834c4b8aa988653f138ec79620f5e3ed737690928a30f981dca9f2920ac7307607063b40f87c204de47c", - }, - { - length: 223, - nonce: [3]uint32{0xb92be022, 0x1e1257c7, 0xad7c01e}, - key: [8]uint32{0xca1dbb9c, 0xaadb9504, 0x77b8a95c, 0xc50deb5e, 0x2dbc0fb8, 0x9e654bc2, 0x94d8925a, 0xfe9cfb66}, - input: "a3d70bdb509f10bb28a8caab96db61652467cf4d8e608ee365699d6148d4e84d5d93bdabe29aa4f0bc8ee155f0b1fb73293c5293929eaacdd070e770c7cccfb2de120b0c3811abeeddaf77b7214a375ca67d618a5d169bb274a477421d71a651cfb9370bcf7e0d38f913754c11002089cf6cd6a8de1c8a937fb216591d57b37efdf3797f280773950f7eddeb9c3385c8315ff5ff581c64610a86ada7ff6a1657e262df94892dff9fdfb6e958d101f4c26296470c138dc4e1ca4bb565b3ff877a7f78b3d11d64b7c24e27ba6f6b06f6e368f5ac218cd5d11b815ab0987678eb", - output: "646314264896a6e25601e536f6e783d465b2ead1e0be4422bc9cc8eacabae4a749ad533eb28091be8397328dcfb34c92006bbda930ab070ed7b806095bb1c8f476350e7b08ffbd4d7d6055c8defaa8deff9d54f5215c2d7db27ce09e08f5d87a859145ea3126e2a01882921c3fddef3985bd451bca44063258390aec8ec725b07d064314fe43a9c83e9287b47616dfefbf539b82da209aa08a6d3176b7e3b4be4a17d44e581280a684e4a64414649bfcea82b541729f8178b580e8b972a89f5b8c4f9b68205e9396d8ae5e81873b61da074080fd44c52d50fb0880ee9c35da", - }, - { - length: 224, - nonce: [3]uint32{0x5091927, 0x661c75ba, 0xc23dad}, - key: [8]uint32{0x2e00499d, 0xafdc63db, 0xc3c62efb, 0xb4157a19, 0x84ce8b13, 0x85326279, 0x2ee71e9d, 0x318721e4}, - input: "f48b5ae62f9968baa9ba0754276cd8e9dcfa8a88e4571856d483ee857b1e7bc98b4732e81f1b4421a3bf05ab9020d56c573474b2a2ac4a2daf0a7e0c3a692a097e746d12507ba6c47bec1d91d4c7cfc8993c6700c65a0e5f11b1ccd07a04eac41f59b15b085c1e2a38b7d3be9eb7d08984782753ae23acdafbd01ae0065ab9c6d2a2d157c1fc9c49c2444f2e5f9b0f0bbfb055cc04e29b2658b85d414b448a5b62d32af9a1e115d3d396387d4bb97ba656a9202f868b32353cc05f15ae46cbe983d47b78ba73d2578a94d149e2c64a48d0c1a04fc68baf34c24b641ea0b7a800", - output: "b9af1016275eaff9905356292944168c3fe5fdffd9e4494eb33d539b34546680936c664420769204e91ead32c2bb33a8b4868b563174d1a46108b9dfe6d9ac6cc1e975f9662c8473b14950cbc9bc2c08de19d5d0653bb460bea37b4c20a9ab118a9550bfeb1b4892a3ff774e8efe3656adcdf48239f96e844d242525ee9f9559f6a469e920dcb3eaa283a0f31f5dfac3c4fac7befa586ac31bd17f8406f5c4379ba8c3e03a6992a1915afa526d5ed8cc7d5a2605423ece9f4a44f0c41d6dc35a5d2085916ca8cabd85ac257421eb78d73451f69aaedeb4ec57840231436654ce", - }, - { - length: 227, - nonce: [3]uint32{0x5d6d997c, 0x9d623987, 0x5742de36}, - key: [8]uint32{0x57b2a5ea, 0xc5bdd68b, 0x99c7b0c6, 0x26aea960, 0xba5c75f1, 0xa904cf6b, 0x685031de, 0xa0f0e99}, - input: "b39101601efa2ecdf41878b0fd920a3005ce709e4ec2970abb76e32c232ea21069f81b246eda75aace7555ce8ae203455d3723e684bd671389300e353eec0d2f499d10654fafda2e7a69bfca7198eb172249167ca8864b5d5f58d28723090ec86e251a1bac0346d52fd81f06e0c05429e0b2b895588290b7d00878a4da3378eb6c7e61487de2b318fedf68fa7ad7c88ee746827c1f60d98c7716f3f9695c5ffd4670f71a0fa78a1fb554ba482c5de83feaed7c65fc71acc9f541342eb8f7622b12bb2cfa222fa2ddd8b3ed210ce442275afa3132c8a0e17dd504ecbc92525c118952be", - output: "50eb5b21c179a03b9a822f0075906a3ce4acc32486139f92635c7d834f69071d5a6dc0e15ed06a5cee37147071d59641d140a82ad5815b954e7f28e080c3dbbeaf13943d7b7c66d49d51ba1132eeadd4cb7a7e7d726d08d95f1578d55519f267f753f3e16ff39504a87b2286d8bfba0fe6bc28887b466bf276453a82cdd0abbbbf08db0e1c26c317d50ad9b8dc09cd621bc566d362024e8404739df6468869d2125c58b25d70e392f5e75924c4341be81c263915bb514ad436fb24c2c67450e84f6d1b72d1a02a3310c07a7814d930264fdbbf5ddca7067e18e8a44faa87169b7f2e35", - }, - { - length: 233, - nonce: [3]uint32{0x75bca707, 0x89f6d1f4, 0x2a6f657a}, - key: [8]uint32{0x949f42cc, 0x2b5d3c48, 0xfe0be473, 0x17ac92aa, 0xbdc9d9dd, 0x74f9df26, 0x26487508, 0x7c7b41a2}, - input: "0a42f63b975ad0e12a1e32615813dfd6f79e53ce011e2a2f0534dd054689f8df73a8326fecfd517ff7fe530d78081af66c3a8c7c189eb9d9efed1e5577b5512d42ef1fe273f670ce380c64bc62e217a7e410a8ed89998344e29301e4e053a3a3cf7e71587fd056a6bd976f16e157476a06997dfaaff32172dd84190570621f2221420c0a0ea607ea756e9792c8c0e7157c95b89c9490e20b750ee85e4c27c9b8f409e848ec90afcad33342010bb9808358afbcb3d9b094127c38c243a204e76899677079758e7cbada9a5c18363449eebc07bab516a16372722403a046df85c7dd2ffc804c54d38aab", - output: "87a47bcaa1c1eb8e55151011c4f39af4b9e108a55a7124cdcf66d0dee727306e6971f783b038bd6b215f530cdbb53e17975742ec304fdb3792a88b674504396978c6a5e4a9c87a7c3ca430d61165c1a3f6162eeaf38c93e18b6ccb6a595ad428cdc98efef8f84463eed757a72ffd827b71c0579fcc1f4baa11812be2bc5a2a95df8e41d04b33343df09ce628c367d1f88488f7a2787f013c8e76f0b9257cee777ec4adc6df8c5790e41ea02da85142b777a0d4e7c7157a48118046935f8888b5352d1750bf00b92843027a349cf5685e8a2a2efde16dcf5e1c1ed8c779bb38cabfb42ec4dd87d58273", - }, - { - length: 234, - nonce: [3]uint32{0x5003a4f7, 0x40bd8cde, 0xfe35fb25}, - key: [8]uint32{0x576e49d9, 0xe84e9df, 0x9f227a3, 0x437c9de0, 0xc46ac8de, 0x1a6a2d2b, 0x42ab7684, 0x4253fbb6}, - input: "abeff48fa082dfe78cac33636c421991b0d94c3bc9e5bd6d22763601a55201fa47b09ce60cb959ba107020213c28ae31d54923d1e74ab1d9ddc2762b2d23d8c6961d81068230884a39682fa4b30676ffec19319362c075df0b879a0f083a67b23597bf95c4bb997fae4736479cb8a9c00520ba2f6e5962d54c313c576180d17779ff239ad60f1f1373627770d50a1c49718b2b2e536846299e052f8c1a5d3079e91cb1b8eac4661daac32d73b3b99e2051f8f694a61d1e9d3935f802921a4d979b6ade453cf30d73a4a498a6a2c5395c60fcf271d50b4967ac12b0d7bf818c2679d552e9b3b963f9f789", - output: "a0d11e732984ad575570ed51031b8ac2d7b4c536f7e85f6fce9ef5d2b946cefe2ee009227d6747c7d133ba69609f4a1e2253d0eb59d1f930611e0c26a7c0cf2d2ce7ccea6e079eadf2eb1acf0463d90fb4b3269faae3febfc88cb9fb0873d8b74894506199394c8e44a96e6b479bd3e045749cce1c3f57243abdb37e67084eb573cd820c6cee424227019592a027e9da8f7b8997bfb292627a986f83c8fb8d156a91a12a8b52659cf9272924631745ed3a2453a4c2d87a167faa9104e799c715ed597bcb66949ab15dae29a86ba147507e8d8af66e96c09c53caa053ad3b79d9ed3c0c6c00169eaec3a3", - }, - { - length: 237, - nonce: [3]uint32{0xc6ae48ce, 0x26f0906f, 0xfd8ab8bf}, - key: [8]uint32{0x42b82c50, 0x7f519e0d, 0xcbb95098, 0x6f75e532, 0xe2c9f61b, 0x5a4af942, 0x2679777b, 0x6a8e1c9c}, - input: "a77b7a5870335b9145fd2e08ec898ba2f158fda16e8a2661a7a416857b6ba6937b4843ecaa79d3635d28383af80290842de9ca0bb621ee22b7fd6bf379922741e812b1739c33dd6923d0607826fc84d46bbdbd1fe9d1255f56a167779a560a6eed1b9c9579b8f771147df467e67a070d9e9ce8ad92dc0543d1c28216c1dec82614ac5e853ed49b6abac7eb3426ef0c749febce2ca4e589d06ccfc8f9f622ede388282d69ceb2fd5122ba024b7a194da9dffc7acb481eabfcd127e9b854be1da727483452a83d1ca14238a496db89958afd7140dd057773ea9a1eee412875b552d464ba0fab31239c752d7dd3d9", - output: "b330c33a511d9809436ab0c4b84253eeda63b095d5e8dc74803de5f070444a0256d21d6c1cf82054a231b43648c3547aa37919b32cfd9893e265b55545be6d7cd11d3f238ef66c3c278fcccb7dd0dc59f57750562cb28da05d86ee30265ff6a3991a466ba7e6208c56fc8862e19ac332e5fb3cbcc84e83a6205dee61a71acd363a3c9de96d54070a69860c152d4ceb9c4b4cc3b878547b6116699885654b11f888dc3c23483a4b24fbe27c52545c06dd80ab7223d4578ab89bff5f9cbf5d55b19611a5251031df5da5060a1f198226c638ab5e8ec5db459e9cd8210f64b2521a2329d79228cc484c5065ef8a1d", - }, - { - length: 244, - nonce: [3]uint32{0xea38678b, 0xc41eada, 0x3381147b}, - key: [8]uint32{0x268fc2ac, 0x21297e86, 0xdf9ef8cf, 0xd4b45234, 0x2a95c4f2, 0xcec36ce3, 0xd5fa38c9, 0x7dc43790}, - input: "322d634bc180458123e10d0509870b54e0f0a3a72a2bd9e9cf44324c7a1ca37dd6adf9db1fcc8dadabd881f91d47d93b58382802b42ee936802fac8612ea4dd9eca5f215935ea9ba6233b9c8bddba3385861de669d95c888c8977851cb305db577a4eb2360f362fa459d61ffc8fcaa1502905b073bd8e9567ac7cff8e5fb1002c55641a3af5fc47ac0131fae372f073e19721ffcce9821e0241d7fa67bfc499c8f100e050d39bd4d7cae4557d208629603ec4a007852762ec1905d0e81b873510fd334dedcd9c288eb8415db505913af06bea94d197ab627d58f6a9944f6c56247595fc54ae3f8604aa37c3466f74561131e11dc", - output: "edbfb1090987762f75eba2439d746cdbefe8605b8ebad59e075d28b54edfe48813ccae891f6ed655c5ab5211ba896fff0c8e09bd1554aad987dc53f355d0822e9b0f524a99a79c68a9f3b4e30506cd725b07be135e4540078be88dac64fc545c433837b96a924452f6b844291c4c3fb5f8cc94f06d9f19dad7fc945f093020e82ed19f9eb3ddff68b813629991d1a460e5455e1cb41cf23bb3d96fdb6b96581c3bf9ef72814406329bbbba5b835e7724c728cebe88efcd996dea71d0fd5c53e081c21ce8b3764738d693e390fbf8e0137a716760fc9cd2014cd9bf3fd706bc3464d1f15803606976e96b1077cda0a62921ff7c32", - }, - { - length: 250, - nonce: [3]uint32{0x883ac584, 0x8fb8e7d5, 0xdf07de66}, - key: [8]uint32{0xc7747e47, 0x853d88c6, 0xbf9aa631, 0x78f16480, 0x7c248080, 0x15ff973b, 0x31528a40, 0x629686e5}, - input: "e6b8a9012cdfd2041ab2b65b4e4f1442794fdf1c3685e6622ce70f80b9c2252ba6d9e6384d474a7622053d35df946a3b19408b3e1712da00525070279ce381359b542a9ad7c07750e393e0834593777352c1f7dbc84cc1a2b1eba787377d2cb1d08a7d20e1393d44022107acac5d765be37f9075af02e4bbf8e60ceb262aa34e2b870cc7adcf54329a667249cb4958393bff4f4333338cae45cbca419d59e605aa0cecb1241080339198b9b283e4201afc07360b8ae2a57b0b9b97167c315f03fd7a87a00ae73f91ca560a1505f3cdf04576b9aee5ea775f719916f1e1942ad5311c7f87153f8e62855ace3f34afb08d4d7c7f4fd2bf83e42f76", - output: "fc2673c80812d101bca7a2e0e105fa449550e695a016596f5c3cde11fb7dc518b94fdb74058e634546a726c37896110e1d1f9cdeccba1c89958041061ded8e8bc2751ec6dad76a305e70c57f9c81a5a65b5116390af4f7bf7053a03ec13f5d60a58cc5ba61f8c46ef6d2d291de490082dcfdf294aeb3a9414d64e4bd6497d4625acfa591627bfd98f0aec7e7def71515c09942db6911d73b96b4bd2d6df03bb729e945d71549d40e4bc401e1f73baf263a74280537692240638619f92645a5ade1eb8151191c7ff8bd715b3c1cd667e69745b806e16d46d9aa680a7367b8fb45a1598631cf3d44c1f5cfcd95bc8dafdb65a2083905a6937fcf21", - }, - { - length: 256, - nonce: [3]uint32{0x79cd7a62, 0xae619be, 0x7d96d236}, - key: [8]uint32{0x7dec8e64, 0x9f12b14, 0x6c70df2a, 0xeae0aa0d, 0x27b1ac14, 0x7a00d833, 0xe63c0aca, 0x189438e2}, - input: "0cfd93b195e37dd15dfae83132c24ed5bfce7fe6fad4064b213b2c31a39e39ddad2f977e904c9c5b055ed03db46fcdd845bbb6ff0ab5a8c92e89295b6801f36ae63eba61fba24a3858aeb36f2da226b23b24d7b2c7d2670f23a9a1b60db85c0ecee584bef1b00e42d10ca17432a74bbb220d88356d82c850da4c09dd5baf413caf8f9479e02a330065fb865489c0f59605d56146ec8434182345de2d15e2a1dceeeee2fe94871d41913f6788738947ed9849ca0ae985e3e19a97bee82b96feeddceb196c9b6012264661945981c279f43db9599a4ef01116f592478619690daa64387290484d21e8d2444751194e1f361fb37f04014a3c7e4b409e5c828d8990", - output: "0502848571d1472ff10bec06c1299fad23a2cb824d88bf91b5447c5139500bd837a2fddc629e4a964e84907c1e6740263f1fef4f5ed41062982c150d9e77a1047b7d86c0e191945e8db00ca3845a39560857fc9e0e4a394eea4ba80a689cb5714c4bab7124ffdbfa8bbb91c3eb3caa1621f49dba1eea3ebf1d547ee337f9085638a12317b86c11aa1525813445107038942fc519eebdc1b98d313ad822bf0b94a054259aa8cf1be4b3a68f974269729941747f9a23fa5d83453071b431dac62274c24f6a32248b0785ff90aad5840fadc89af0aef7553d9352cfb00d3999ffbe28cd9fde7854e95710f4532b8bf5011e518c93361e58d22a2302182e00e8bccd", - }, - { - length: 268, - nonce: [3]uint32{0xb7581e00, 0x9a1bba92, 0x64356674}, - key: [8]uint32{0xdc2c9fcd, 0x5e50de1a, 0x8546466b, 0xc1b49b21, 0x36a670cd, 0x2887f367, 0x2fbf4300, 0xf90a0374}, - input: "0d8d864010ce8df1c0179cf0236dce1c100f9c115eaa5294c24a2e1afa27f9d57ebc18f00482be0218d44262bd4db73002ff53c6388f5e333470aced2a42a73b376686c8d02e05ece27cdd8b1e3f675c715981f8b656d68d0e16227b529cf881d2433e4371fbcd933eaa72346e77e688ac80ee95324512c66a4c16338cf38c941b72c21c3d01e005a07c0eb436014fb1ee61806de7e96842ca3217ab8c7607d609dd2f637f9fda8a85cb0549f262c9e4a955c384319a6ad2b696e2593d7d174f5ddb98e2a8d5d12558c18ab67571e9a0202e91ce26d720cbe41a3a6a4f309296ca4d9d9a59a9043dd2e5a707ed7d5034023d5ea06ab14b39b7852e5c984848d5670c6f2f0b189c2a8a4a4bca", - output: "d2a5693c9d503a8821751d085a0837579233e65b691366e4a7464481d22800e786939349f721a815f28b4e47c8889f0814fb95d592d1185e45d6dbcac14ffa4f1d6c79194f2f7eb7323439d9607edf80f01e3a968b483eb93c01d9cb9d3625d21d66927e7aeedc1d9bd589560ed2b61cbed5ad0e0310c8ebe140c64c67d4909c010902d5386efa359ab60a9573493d3e5d8761cfd4023eba23de48372032d4673b5f6ad66cd0dfab02a73aa81f269ae88fcabb3ae9cb09f6bf60fd3575a3046bc6843f444e1e9fb9ff9b991620344fb99da68df09496b40f8b9dfc34e830a87f65710940603ebab554d36e8b4c9228bc9c26c07b828f34cdfdd40b161717236ba325e8c20bd018b324345e09", - }, - { - length: 305, - nonce: [3]uint32{0x2c641fcb, 0x5170c7e2, 0x62a23688}, - key: [8]uint32{0x5aed5915, 0xc5c4cc18, 0xf0e51574, 0x75d894c6, 0x1b7082d1, 0x5d2ea1db, 0x709fd24, 0xf5f69898}, - input: "07c50a69e168e388caf6f91471cf436886a3de58ef2c44795d94fba6538add8d414d84f3ef0ac9377fd5bed6aa6805a695f3a711025550bb6f014893c664e09bd05f4d3b850771991fc02f41c7353cd062156243b67fce9c1f0c21eb73087a5de0db0578923eb49bf87a583351e8441c7b121645bcb64ef5960fdca85af863dca7ebb56662e9707d541513bc91bf9b301431423b552e2c148e66ecfd48045ecb3a940dd65694d7fc8bf511e691b9cfd7547fe7bca6465b72ff9f1748723c4eb14f8bc1efb2fbc6726115c597a3881e0d5019335daf2e5ea8796c2a8b893ca798c4ef2639465505c4bd492bf7e934bb35be9b66c9f35730736c65fa4c1a2485378b9d71912cb924634a8e0db2802b75728818dc00fc28effdf1d8a05e4de4608bb6a78bb19c377d5ec77dca1b5ad38fded7", - output: "3dff5fde2ca24bf419e13cb7d12368e70449d41f2aa22e4b567f5cbdbcf3257975e44097deb180f2621ec36acf375dad3b7a19234b9856dc6c7842a7f86be00304b41a8c1662a02e8390346cbd0ff6be7bc1ceb821dbd805ab5c93c9c6ea5093249b5dc52081cbbbe1b326e831ef3c6c42fb791790086d1586f7daf031e70a71b54e9134f942e9ce229fc77980eb80c985ee0c5965eaba375d156f9b423b0615f4ca6fd77de28e28f35aba327e4f1b75725730155b7b4d6c5c264bf3d9dc9a16e7ededcc261add8c666278bac5cf0b3275d6d6678060eae30bbf2ce5f63e6a53a450b65aa0adbd1c90cf045f5ddd9700c2a99c80586c5244cf4c08035b6ff630c82cec3a4fcc83860e987898b42fe746939f8b37c814f8dab65de276e9784fb90f0751d3ba0826889e1e7e4fdbf8a90942", - }, - { - length: 430, - nonce: [3]uint32{0x99b172cc, 0x91056d0, 0x48057533}, - key: [8]uint32{0xe6cf398e, 0xc3c56066, 0xc5ff194c, 0xf6d2d8c4, 0x6d1d8908, 0x63e62065, 0xcca485cb, 0x1eb03dd6}, - input: "3ddcd3c00014747903c95e49f64258615455a0b26c5070a9532382a9bbd18eeb19c9fe1a902f5c6baf544c5938fc256d310a9332223dc3c54a6eb79a4b4091c3b01c798d2800418863f2865c1cd8add760e445588576d4a6c945e1d6d50dc913674daa4737ac94d84eb0ff57cda95df915989c75adc97c4e3c1c837c798a432ba4803a246bb274b032db77e5c1bb554a5342ef2e5d3ff7f102adb5d4e282ad800ccae83f68c4bfd3b6046786a8cfaa2b63c62d64c938189b1039ae1a81ce5c91530772cca0f4a3470ba68e4e0548a221eb4addf91554e603155a4592dc5c338aa0f75a8cc2822b318fbfba4a8f73fa08512132705dae792eed6b809c251d35cca60c476406d964187b63cd59333771e37367671d0ccb393f5b8bde77bebc133485ec5c66bdd631d98cdbee78a3cf435d2f824fa2f9e91e89af28b2e155df4fb04bbe4ce0b6162dcd8e81ee8d5922ebf9c957b26c343a0396d91f6287a4af9e11b7fbb5a5a5c1fcdb186365a20617d4ff5037b0bfa97b6213a6ebcf0b78b81c65737378787b255cba03d715fed4addc2c70c1fb4d3ab16f2bff287186c26a164dae2fe9dbe3c4a2e1617f01cae79f", - output: "ecea5fc18dc4aed23359cacb8f79a457512e0a27d9816f353e315519d2b2faf74d14ae8ae5e227b203823998a47a050c363a807f45f610942fed4518b8091b88dff8b2af8fb6552eb654c85d2b6a918bcf56fb898392941d983b1afd867ef840e12313059ed3e4d217498dd511563a939c3c536fbbf8e019deed29262f0a655fc680b15939475e0cee0ce2e8bab5834f7354b93e2e0958a5bc608fab369b6aee3c9d73a6898e402484eac7300150517bbd137bf55762897696a3dc4be74b0c141755ac8f2f6e59f707b1690c451a774c46bbe195d826a6784f8d807b78f8ebc343ecacf37cb9b1b2fdbff6a1237b5098853d783e77515c419894c2628f8b5117042294ee2ed58a33746f9e79b13fdfaa25a75fc95340a89076e786e0ecad7de437a9a3fb3092146d255005b22895310b1252a3e34572cf74665b97f4adc30dd0f34e3216c7757953a4b618a775bbe68f9e0922d75afc80a1379aaf1745f2263afb6f0b37553d9c984f1ef781ea75b1980c559c77565c83f3e0bd7a3cd7cdb594658beb7e5eb940633dbc6ae2f50383beea676cb6c814b17b1d73dd133f544da88ab371415889ead21803c1ffe3f2", - }, - { - length: 449, - nonce: [3]uint32{0x2adb4a6d, 0x33d00c1c, 0x10a0193c}, - key: [8]uint32{0x8bd707df, 0x70212019, 0xdb685581, 0x9cdbd1a3, 0x7db9ff1a, 0x1af119ee, 0xb1d8c0ff, 0x3c4a22cb}, - input: "93ce72a518ae892e00c271a08ead720cc4a32b676016612b5bf2b45d9ae9a27da52e664dbbdf709d9a69ba0506e2c988bb5a587400bca8ae4773bf1f315a8f383826741bfd36afeae5219796f5ce34b229cac71c066988dbcae2cbcfcdbb49efcf335380519669aaf3058e9df7f364bfd66c84703d3faaf8747442bdd35ac98acdc719011d27beba39f62eab8656060df02fab7039223f2a96caac8649bc34da45f6f224f928d69c18b281a9b3065f376858c9fd10f26658ae21f5166a50fe9a0d20739402eec84f5240ee05e61268f34408089e264e7006a59bb63eeaa629ba72603e65718d48e94e244e7b39d21d85848d5f6f417631f3876f51b76b6c264356d7d7b1b27bbac78316c5167b689eff236078cf9e2e4626a4ae8bedeecbcaf6883e2e6e9304969b4fc7a4280dcdc5196267e9bb980e225fcbf7a9b2f7098f7f5c9edd06f50c8791edaf387ff3e85ff7bee1f61e4660fddd4eaf5ab0320508e3ccaa9823ae5a71faa86bd76e16d862d83ed57bf6a13de046a3095a74a10c4da952b3c9b8fbde36048537f76eef631a83d55d3a13096e48f02b96a5a8da74c287a9164ce03ddf2f868e9ca3119ec41f0233792e64086c903eb9247dbae80e923eae", - output: "bcf49d62dcd1cff9dc37d7096df0c39031e64ccaeea3830fa485edb71b7fcf2ec709a4b327ef9c7d4ea2b35f113a8485d4c236e06b3baccee30e79c6c08739fe5fbed59db30479b56dfbe584a5d79b169b200430ed27072137e940a34170606b31f22095f2151b4d9b901f6337f991a23e4c8997a1ebf5105361fdade1c889b8dc9565e3b33e0bd608c39d725becbb60da8a797186fe0986736112da3d09906442364d6e253e5b27fd5ad72e877c120ea7a11d42b19948f0df5ddabf9cf661c5ce14b81adc2a95b6b0009ece48922b6a2b6efffdf961be8f8ec1b51ad7cfc5c1bca371f42cdac2389cbddcdc5373b6507cdf3ffc7bfb7e81487a778fcf380b934f7326b131cb568bbaa14c8f427920aa78cc0b323d6ea65260022113e2febfb93dcfce791ab6a18489e9b38de281169f1cd3b35eee0a57ed30533d7411a7e50641a78d2e80db1f872398e4ae49938b8d5aa930c0c0da2182bd176e3df56ab90af3e46cdb862cfc12070bc3bd62d6b0387e4eee66d90c50972427b34acaf2baff9d8a76002a20f43c22ac93686defc68b98b7b707d78d0e7265aabadde32507a67f425cbd16c22a426d56b9892bac3a73dd2d2c03efdb22ecc6483f8d1ca67fc7d5", - }, - { - length: 487, - nonce: [3]uint32{0xecf15215, 0x45e31add, 0x56499d31}, - key: [8]uint32{0xf5988496, 0x49bcc2df, 0x7b4ba3c3, 0x5d5138be, 0xd6cb466b, 0xe98c82f8, 0x147d3f27, 0xc82389f0}, - input: "f72bec13b0f0b6f2317118f14c2a0d8e963b1bd49ae7584e710dbde75bb1e30c79281847cb822a5f3ae4fa56825e511212f17f0d293cfe80f872e6992d304e9283d08ce65ceeacb003b36a862c91282a22536e0b9c19953512a1bf9e20d3e7a8f1a2dff45dec0b9b04c592e88a7814540cf636a024d10008463d0b3aafbc4c9359889149433ef173124866aa6f53526ef3b3f2c630860ecdd08ffd9fc050e95da512cc87f812f9391085cdec5cc87258b8560806a52336d612da7ab05e0f60566b950904aa27c975a48c7d78455728c87f9b53aa4978374ab9592e12c22d9a760e26eb527133534ac5bbf969596b71cde8b4ef3587fa7ffa7116834348c275ad4dce68ab3397521ddc8e54380129cc81b981f9b32db20dddb0ecaa0f1ff7b06495a42b4a800a207b8e9ca38794e2fa9f40546e0e3aef7b5236d7fdadd72b1158714a5ad8d6264df1e75120088e449b9e911eddac59f1f19a795205ab7532783a93159876133b3fe3a518475a545fbe8dd2ac143f33c35d98e3ee13b63606b1e671917ac3ff9412773a3ac47b8c6627b8ba9dde6820f4f16c2ed9cb7d7086cfbb0cf2d7533eff253d14f634ab2aad3fb4289b9a0bb667a6fdd0acd5949185d53f1dd2b96ff060bb44f872a67259100669e6eaf1a7e2b11dd5fc35792db0c44a1127765934a068bf", - output: "bb618ae6b7739a4dedde1dbacf864b0892b93dea3007237d2f6f23be0718bdd29321e6b0fcb6a44dacf0f5c53d91e16165997e2302ae7ebc2dbd02c0fd8e8606a4ad13e409a4e807f331cf4174171c5fff23ca232192906b4eefdf2ffb4c65af78be01b0ba7d15b4341dd5a2edd49b17db2812358c8af0a4a9724e0169f50d1d331936bc2400012a60849876c3ead52cc9fe60173c9992f83f3e41ebd24fe3961835109612994c7620280539d483f91ef9a64c16032a35612a119589efe6357fa35b19531274576e304be75bc7e91d58015792095bb00ce4de251a52b946554366ea7ed9ce9317020ec155ae0071e022af36ad10eda5d671e5090c136e381cecdb8bc179474fabc7dab2d8a134772976cf0791b6cebe2333d34b4b8e2b6b2eab2b5dc7c6a08a583d091df64328cbcde36bc1b81095d82c741a1503c55d833d551a855e098166c5efffb8e4146e32e54abcaa85076ca6660abdfca9e82824217b5d3f23f7ff3455872bc76751480c1a8e3e725365c82fc135cd3713cc0f1ea733754142f8c37716a2a4fa8a6b898215c287565325774c2510df6b49e78cb986853ac5ca532c9a7e2bceb7c0157f60433f29fe29009343d6035d7b5892c77f821b644590615dc505604501dd218dcab789e6f0525387919cf25c7c6d62a8979e39d346decbed2657", - }, - { - length: 511, - nonce: [3]uint32{0xba68c47, 0xbc020097, 0xbf7d14a7}, - key: [8]uint32{0x3bbeedde, 0x6e8f4d6c, 0x6e27cd72, 0x140ff360, 0xc891efa0, 0x4aaa227f, 0x733cfef2, 0x2b51f1f3}, - input: "96eb94e1adbcc0646440c8824a2fc0f2c4b17d9cbddbb8ba8d9dbd6482fbf7201c74eb923153e0138b2f6f182f9c3d5656ee40bb7c26a01740b5c7d125261d4e4197614800aa152b402ba581bfbf4288e73c9ef7e7e37491212b921420eaaff880eeb458e3d0aa108b01b53492c97e328e9d10e3220b924351d583c00e76aee9325d6b89b1f162ffa30b386b37b5eaf4dfc25d22987dde4496158818c4d8f19ea300fe140be921d3f1abdaf9ab8946833a57cda5f41f995ff80e98b0f10f7afd736dd33438dfd395547f11563056078ff8f7c202aac262955f0ca5dae2365472de40f069028104ac552ea5a45ff2773335e5d3242f1e62e0e98003333dc51a3c8abbaf368f284536672e55d005b24b7aeba8e4cef23289adc12db2213aa037c797e7e753ae985568199cfe14cf1704fbca443e6036bdd05859e3583897cbefe7a0cf268b75d554b2da6e503ee04b126fbf74eaac0ebca37e84ab9c726973af780fe2bc9869fe67b7d9e4a04062ee535b2c1740d1347224e211b5cd37ee14c3325f40abee930eb6a1634986e756b3a1f86a3d7ee7184d95ea948506d8ab8b23f92ecf3eb0586f7a8b1bc227e08a0e32ca75ca4eeffc5c0a2a623547788bca66f3dc2c48671e462544d52a87d34307a7f111aeacb7da50262deab33d9f29dd6b47c3bb555be598d619cc66be8c4b74b01772725268a43d467f39bc565e5efcd0", - output: "590965d18ebdf1a89689662cfae1b8c8a73db8b26941313006b9b9bd6afa6a57149d09a27390b8883069e4fc2dfcf75035def1f8b865e24c21b1a1ed3e9f220d7b48046577b661bc92d9888a912984ad415ea2fc92c9e37da0bef5c7dab11495c612c27b5babe6eee28fd26482272fce69ca7f11bac95251735ad808365ac587830ec04105304f8e440a4da47d30e788718da4282941c9c76f18de4f954b8be750b54cb1145489edf273625a0df9a694a23fe7bfea12579b53c3b2a3de85705568cd7e603f3b8beba9a14cad9979ea283a8a291d3e1105b7f890e2a569804d9b7dd4c7e50bd0dcd11223fd7247af77f04212ece1b98c238d2fa0386a994bc502f83dcdd2e5a0d45b185155e1a395d91726d383c2c198fff1590e983c65ee041638510787c8c59c2e96f31678226a033e027bb40c416b73c3dbef31affc93a659c8ec7ffeca313fd5283a80533b2d63941c8f245d22b160c5fe57c5fa4b759c407b9acd6d9c4f80f244360b9acd11e2b43d4af757e16a6ef9d6756df39ca3a8a235e74351f50b2ebf54df633c8c400fd80b41b07117676d486377095660f2f20f62c034563b4560b473a8f4d6a740306d2a822fd8bd98012a840ba9b1709df9a0d61ecc305f7180fd764e334045d9a8ca23cb8036c05616a8b21fc488429ba4168c59dfa231f0ffa668a3be7b16583df1a55bb9c15d51660ddeca730d66f7a9", - }, - { - length: 607, - nonce: [3]uint32{0x9419df54, 0x4593f2a, 0x71c06dd6}, - key: [8]uint32{0x7b517740, 0x41e86353, 0xed629408, 0x5fe32cea, 0xb06bc5df, 0xaec9b350, 0xc00c2a6f, 0xb3aaf44f}, - input: "be3f309c6e7b89e1ec4a855cf161156d09f8a04d5630534ee19e9e071e3f4603f23f0c59a7b7f8a32c4c203ec8c129a268faba09abde7b61135c6c37fd091e2d695f0e242488098ebed30c7d321f4dcef0bdd23fa85a53569868cf2008bf4d2ee7a12a6673298c7e797321b9f4559748223b590e6fcf17aa72251586b01181cefcd32c6a1a20a0fc27143426f6572b1aab0e7301e390cb857f912d78d5153906c698ee140b36cdc72693cc019cb7add747ca3a07b2b82a2332bfa76c962b186ad94209fcf590ed0f6a73b08a771a58eb9649f2f1da4f7c385da83d50c939231f745514d14b0920deedd9c4dc6d2e547f83643d13541870875e52c610372b14b602e7a47f0b3721cfca60ec68e2eee91f40ceba2d0fdb4ebe19cb1d1ab170726c9e600030454ef355f9a40033672be520e528937f38e7a862a5ae50cd94f667cd015a72ee3f91b1a09031bf4c207e0c516b2e7a4baedf373f1ee71843e560741ed3a3094d2b513e2248caf27ce135716f6887d9f1fe5b11e02c12c989d29054ab183a3f55d9b40d78e12ff56edf936ab966c7c3130bea472b71fd69e70165a76afbf720e2c1587a77943b35acfd81b2ab6f39476623edf3663024fb84da8057ed3a361e9533caf9fc58a5e4897e4bf84f58ed063b5c353bdca3792952eec0a1404149ebeb5b17cd6350ab3e27e44e40fbcb00780d001a48d0365d534ff830553409919608881e665f83bb5cf0736d728c41cc4e985c377f89ee1186303d0d76bc634875ab3ebd87059969f24b0464ae11967bcc47f300a34e3b917b1affceea716c5ad9abf1aa3a1106e2f4d006514dc62cfd2a52426968f2f3991c9f9d8fcd", - output: "e4032c01bcece73fde73961ed216820dcb44ce20134678c98afb674bb03afec2f4aacbade7f87a32fff57ae9213eaf0509e9d9db1313b06fd1df53561f85896ba627cccd2d0e2ae4f24f5579bf02f6599f5e63412ba084cf53a5bc9a8061b5c029b755329fcd73f629fadd3bcf6cb4c572fea86466cb5159d19eaaf0f44c3471d0323bc7206bb514ed8117a61c6d98d44faff6a83716657531d965ba3efbcf067c452e0d2807db3423958d9a4421886fe132d7c47e82086db9507616b67f0051dffc1a49ecce3ca8e4d5f5af15684cd8837a471430ddd333ea0b6ee603b7d9e702692f857fab060ccf26f2a8e61dfd3b12923acca78b83a6004e4ff09113becf6bdd0bec3a449a195559dfeafd4e2a79ead5ae3c993a15ad9b1a2ce818e18edb010b7fece9aa437d85ba9841d89026d6aac1a3a6ab6dad932a26d7db6f3664b06d51584cf4d22a75c06e2840db7292798306e4d39379af85a6bc8dcaebb5246e07fadd5e336f122de0ecb99ca24a971701a1f43bd69933beef6e52d299b132e7510caf27b99739e32bd272afc36755ea80cc7ed3957d91325584b338d15b19fe554ee70bee903babe21d0cbecd49235c70a3a4f516ce16761d1cfcd70bb4b9c7c73c359f3fdd0753d6c1ac1a1463142f18266b6a9c84675f247d56563646fb2c8c3b6b81944c2ba2b76b685ba5ea40cf539bcf3850a8af3e0a69c0b38164de520a3bea82b91f67d36bbd87877b5be7f06c2d26b2dc747a26a51f51fe293197db0e91e6ac617c71ddc6edfeb7db8f067ac2012268deb7e5f00a640c1bbec5c4c71f10f921071308cadededad5c90e72d744d0bf790b043fd35729570889ebe5", - }, - { - length: 682, - nonce: [3]uint32{0x17cebe90, 0xeffe259b, 0xbdf9d4ca}, - key: [8]uint32{0x172d51e8, 0x5b80f5c6, 0xb9c9e438, 0xa56119c0, 0x62212323, 0xf5386589, 0xde7079a3, 0x669e643}, - input: "0aa4fbce7e1774f0607e7ea01fc0e6d210bb283964ae75e180a9f6ff3d2c4d50914bfc32bca6d243eb33551521d54d66f377fdc1d31974ece79b157905ff7e7a9b064f349727ce37c83c15ae13df635c3e6b4baf994d9aa0bb90b06c6cda51deefda72c97a2993448e654b746b216d2b949bff1af5238558205cfc3162f1d7a020a919db4d4eb44bcf7b269d4df57e24133d1e540694b9148444cee16e64035ef006a6079dff449949c1b342991f2a27f21c8bd74ccf4bc944284a46e9fd9f9bfd4b95f80c05553950fabbf5e5aed6babb8427832266aa4d175114de9127ff6ee848534d6dd5aa6d2dc361319863cdf32cfb1b074faed17d368964393352df01fe8d86af0e994bc9dac315f7d9efa7bef47a16676cdf17a535ae71d399c4c11a3a3ba0491e8d41f419685258a4ec7d1ae588b3ca341719c0827ce5f5a653959a8671844f2d0293c09bc7d35497ed18c160fc7b6d073a311b621a7a37f7ded1df3d73dcba1821278c9e17a191997fa4dab0802e1ee1b468e91e4272c4569a17dc0b2805b980bde798640aa328a3605abea1865083d7446e960c27f69d32882a2a2295efc9c440dc203872373411925f8839715e9441d31dd9cc14bab09a3e03b4a63e14db3039d58725796326ea6327f189beecd63955f1409467c81f4691ecfe9f0ac5234f23dfb84e3199e415ee7b4f67189e8857ff6cb3f64c2ac1b554bfbd679a6ea8491cfd69d96d08ee2744d9103e0b044212560ff707974b1a9043e1f2c3592828fde8ab5e993652c00e2b3fdb19082611b67866ece6c4a2635f87e04d2136d679f632416b03ece4d7e9406f3437163f4fe0c8cc7b87d487f6de3b3022665bcafa847c2b9199e1ba9af7deb0e29b66ad41688d03a8369416dfbee6d03526adb3ebc4b4f8531d73589499a3010b5309e9d9d2f5a9cf347983a92722dbf6c4f0bae8aba57b37d322", - output: "a31f9a532f35f20ba604a9ab9989260e5a4ed04e6ecfa1cb9e0e1d16943906acbbb4e761a2bebc86cad0ce8b3f26d98b455e4b0835eb8b43791cea29fe8fa6e5187b60198142059bbce98917aa2957ae2555bee70e6e9e21ff6197a51ac2ca2952c413efec4d9903a2f6883e88aebe7ca8316831f6a8f2cd0e486319b58dc8db862779adff98b7f35c33faa53d56acd7a81e0feffc286b728f3a11afab7cace4c30b1a45780276b1f0ab89242410d07cb1191c7b9da5d09db7c9a729d91ac3ed82f4350f2871a12d125ba672861d1b0af7219c360a0e023a8b7c23fb9d72631c72e032c097118d90e5db0576586d8224165a8376fe8d04de93516848e7c2653cb4f7d24a971ccf4f16c527ea5b4153fad5fd5bf473b15806671854507bf1a6d9e5fe4a6f6ec977197d21d69a041dd955e199031f895adefd850c8b0ae327ba0c18ca1783560e1ff0feb2f659137e34a91e9e9ff04fe3375b7db6e4326986e6265e5fef00297f6ae627c7563846e531762748fe8d0b6baff17acf1e6c5cfefa35a95ef634ff96f83f16342a6c62311fc653d314f8a6de109356ab7801316e69a48834cb6325816b1f66d5c67d6e9c9cbc8e1a0521fd6e4bf77a7d2609f99c9579e143f530677b99d198a97620d087f058edf35eb7271701ecebb8bfde5671641ed21aeee9e7db06b932e0def91be93cf2955159e9666c770cdffa03886eb6e98dfca8f91ff5cef1927c0f82b9226d65c68d011416cbef802c264e34244ead7a6ebbe28a510a37e1276f4f3cf27a3944a08aaa23bd321092761627dae20dc269b6150545c75e995cfee0a9bcedb1ad8b364beb8839fd5c9f7984fa0a08a1a354aebe18f62acf6d6664978fcfda2ce6fc16eaa2cda5b835339001b3b98d3a407a3e18e0ec2da6ee3d1448c1ece2ed67c3f51f01e76ed59f0e61102b103a3c65aea94275e8d1f0d331538efe", - }, - { - length: 768, - nonce: [3]uint32{0xb1c9bd09, 0xdbe6497d, 0x16c73b95}, - key: [8]uint32{0xbf9d9e5, 0x2eede668, 0x631dca95, 0x4233e36d, 0xd83fe644, 0x99b11f89, 0xef055717, 0x1ae9695f}, - input: "e097b1e8dea40f63714e63ab3ad9bdd518ac3e188926d1086a9850a5580affb592f6e421abc617c103479ba39a3924eea1c0bbbb051614c4b5003bbd5fcbb8093864fc1c130748194d6b560e203b889b98b574a98ec3e0e07cb2d9f271ba7794e5419123b4f2ebc7e0d65cd404104868905ff2c38d30c967fe9d77ebdd4b8fa836c3b0ad15e3e70e9a28236d5593e761e694b047f63bc62c7b0d493c3e2528c8af78f56725172ac9416ec2bdc54de92b92a63f9ccb61e686f9249c7cc337d99b2160400bb5535eb8f8eb1e3cafcbceaa821c1088edbacb3b01b5bed977e702de747ad00268ffe72e3d877dd75816db65b5459607cd1b963fe43bf2405ec223ddc0de514d59cde74f7522dc72285caa3eeb7eae527a7723b33d21ce91c91c8d26bf36eeb1dcdfc1e9e475c1565ed9c7e64ef601874a4f277280a5ceec26717e9385aee8b159379e3feed7952b87240c942970d63351259aa7a286ddb4a2620fa67565c92f592902e49422f1eecea2f44d1c0bbbf54a9e5612b86a9549aa3e6639a924c7bbe2d3c1b5669da73c0e2c6f6f6084f54a912ad2635d0141c2f5ac925414dce0da09ab8f86eae2a7b7e48741253189e5fd554d5c04d9807ac6ffd8a4f8229a3e8ab75ca5c778bd7ec5a5c02085faba9792cbc47f9e9311f3444e6544359769e1b3eb4d42ac8923ec94536e1a44497766b5da523f5763749dbc2738dfa8e13c191dfeac56c7614a96bd3ae23e4e6e5ac00be851ac9831108989b491eaade62113c531385ef3e964ce817c8ed0857adca946467682c2f4387fab2f31ce71b58370853171720268459588d5d216faca58d0bebbd7cd83a78445d9b49e83ec2cdb59b5d760880bf60532178d60372752b47d52562b316c7de5c74af9cd588643002d66bc6260595a540d2f82cf2c07fa64e0cdd1f79877b6a25b0608c735a7d35ca10852da441fcfb31061fd7e482a0989866f9eea8b0b39c3d519715c1c2766c3ad99f041143cdb36557ed647403458155dccbb80c3a365f0a85b1135695648ab67ac76b3d219c7b77e49d735c72ac947b1d7eeb279beb9d2602aba7b36ca", - output: "7b6e07e6415660affba56047b988f4548b308e7a642c76791f5c3742cc4cb744cde48fc30e50d458084e06c6dd29a52cb4c306a69a493a17c0838d14b107d07b81c983a2dbad09b80f087ba48465a8beaae5b16e8093e17cfb9e84ea3bdb9af00889268a5c01ddf25af434de56f65882322432aa275fac8519e317ef4d89478f29182143f97350983050f5d37c4b518611da6fa2aed7bb73e614231a194fe17c9073e377fc6ea0aa491e15ca54808e0536c8c3f1bf657283f807ebfc89b55049ac8fb86f89f17974fcf0afc1a2c690c0442842d0f4af9ee29dd960e499d1077bfdad4c0c9189a6e83799bb585acdb853c1e99da7ce9c7eeb9bf431f8d364d0ea80b0a95a7807f196c6ee69fe90e6d1f5d23e5cb256e37e65826d7a111f2272884d6319f968580b3164b2697ea6556816cea3ca316651fe2fd68dfa905d080c28622606f7d24da216289fa2c54c6f42dc244ecb047512ace62f0801f2dfad8f0218f45e2b3bbac97c2176c842398b16dfa1fdfc9a68b7b5a1e785d2a0cc592bc491f5a69c81127b758ee02c66b81674d3135c5882d1dc89dadcffa06f4b0644df5c7fd65c72611d79be7ad637edd6fc38b39946aa2a2c6d08ca9d3ff9a8ffe2e7989546489539b1a623fa937c468e59e0978602526b4367de277526895aa222fbaeae2084f418c5745d8ee844da0baa47f592970c14cf710f49539c12104a62baddb3382f5773dd18c83ecb238ae2e749a51584a38e394ebadd175bf5c3cec787907abb1d94af70ae63d3b7d8d5ff254da90b78ec8fe2ea95dfbc6e3e69ecad856c9e54906df8fe39859f2014b74dc3ca0ee2a957001939d37a6c0b489bd3f1658b835a57b24aa282c23e875c9e67e6eb8b32fe44e7d7d8e285d85da0ce1b53990f9fdb5e2e74728e433ed2c1044df9e89cb9bb316c39fc6fc8bcc74a382093926a288170e857d6b7f47858a4c2d05c74263dc9e8199332d0179687f4a4cdfc80ee6737300cefba75905b22d21e897f887b67aa3051877fff11d98bf96ca5091bb225bddd5eae697f3dfb0efcdb788ebf6694b5b39dbb0d4bf9427382a3a58f0b", - }, - { - length: 828, - nonce: [3]uint32{0xc7e503e, 0xf8110ddf, 0x83316c8c}, - key: [8]uint32{0xfa2d1cd, 0x4fe7f905, 0x2b9e4c1b, 0x115bc881, 0x2922bcc5, 0x3f60aa25, 0x13c26d31, 0x2096af63}, - input: "0a1064714f20d9e47fe53250ecfec759f4137e60afaf65755f4709a483504c3855833b6dcaf7aa0180fd735fa9a73d46697f6c45004adf12452ea4c04a720fd7c20b9783b74b8b3ea0c8b1563d5a85f44af8afd7d91ca6298ca22642a684f66e365edd6f6bdb2dd32dfa13c62dc497fb341b86f65d40655931171416e23e3b2623c0b4a67d448877b6e3d4e0fe284034a10162b2b5e21639047036874f4bcde22b145b5f18aa8ff32dec81e6a5ac68b3c30c24bd8fd3b8e098a1cf202e2ab2a3bb66a9393222b9f7384653cda7707f00bc3c81e9591fd040a07d3629410c2db78781a4c9db3df5f9d648162f1b087974f56a89db07aa21ba827e3864a1618945b2fba06853a13c35da2909f5013feb313bae09870b8eab904024adab0d6ac46c1a1499791b47413139dee59db676949b9e9ab8d3d6abaa954ec2a9fc83953c91b483c3b6bd6700b96484850734e72e3710a1b379c0d0698aeaf68f13a0d317bfd689471e3299288e7a383a58522f0daaff210cc4917fa05f0b8ceefc2afc46148a05a100d30787accfb4da094e61ea6b58f132692aedcabae928e53c2594b01507b8fc2d0a85a1d111d1f4de0b95258281ae01873a72606753b6f878ecd8c4f613fb3477710d260f0bca0d4c06f675ab7113eded395f88755a98a0ad22b4a002cfe9447c4e39eda13738f4eccb9c13367ebc2878257c4647d31b67e5e32b6a77f23e9593658d19c0a40e8a7228767afba1cf23072b013b2d76ee66e42b57bec2797ce3619c695a661004c8129cb5c5d6a2836be22483f3b7e40bf8ac5535bf6cd065c4821a87829948c88163cfe3c0f60cea4e7ff59df4cdbf80064b2d664b39487413039999b5e86f1d467b12682d0cd355e9f7cd980e87d584ddbda89f68632d3b8fd6bc3b80205d7feb97a46842b093f74aa14bb21accda7474247b5e39ac76ef75e9b5b52b6a829a7e2297ab88fb0eb690d54ab1af2d7437149a6202035ce15f1e6c6267458d62677c263d83d3f8119af191b7d766582620e0f08b411c996c25ba6a32c2d73f592e789ed662e94103329bfa5e6573f1116ec04438997f3e4ad91b4123b570743455020d914bde2d8417fb24671e6db261732fb89dda1a36614b095529e4f97374c9bc0e55aa577bfffa663c816ca9fae3472e0a", - output: "b00a7caf5359c5bcebe590e6bab9aa03370050c55cbd45a257f4869937e922a15f2d38121b1493d6b5dd4a8a47d7b4e5cb049d396ad84ed421df774b0408b6939f18ebf5cf83f48c540affcc2a885967bf4bd222c42904b8a73c4185bde3f97e874fad25b46714235e60c9ff53ed2975c9c85ebad0752249e4b627ffa41555eb9074f63a5f7d61d207d2ce11b2a9fa23a13a0832eccb91efa2afd8d9acfee94ac78a733fa156bfea5006da1d0127c32aadbb75c015b68c627903e1c85bf3a1a9f99c6cfbdbb5c871f7f9661b78cf5e16d819f53e9930e201d4f58e69bcdce77ec5b9b1d2cf206a71f744342273c26b9abc71303c20df3d51f52222893d803fc8e0e0afcd99ee1c7f95b48680403566f7f9e296d7ccc0ec348b6ad515af58d11fd82c628ea29ee6a5d67aaeabd8823addc01a078b04313af73105d4ce4abef8e6ee8ce649640a19678292d4f1017d121549fd2c19ba6cdc0b613e512bc9551d759c6d38aea7e35c0847a142e273a16bb1495e652f9668b97801ba3f6d9931c0a1efaa4452e15732dca1ca9cb45ed289e0fd08d1cee1cdcc9dfba8d0b2562b0b1a180f4ee69d63573222c8d4789bf0d63d2a201a70c7b27c84e620e33e8a863cf49b784269a51ead3d4ad26f044d5859988d5485a11533ea805f5a8f6313caa6b421071a34f57170fdd8e4663e9a4cdcdcc1ddaa9f6e651fb365cf827667b018ae7d028c7f96295b2b4f9eeb4b361b48af86463a79f50b107ab0935e3cec3f4f203cea801ff95fb870d2c2f0e315dc8a6a547dd3c390a1f5403917315164bd2d40362489b389a54e8dc0ddb83e6a43a26c65923e6f76ee0ee0e3a33b0a9066620a01f0319e20b9f1beb3910ad962a3000e6aacb0ae57f3f6c5e0315be5de93edcf0e45e0e47332f9daf7f33e6e8bf1929910b78b8f88ca12bf5519a3217b7554c8c8350cc314561d580bf67a3878e3979430d070121a5e070a3458742e8549bda972f603222e2b30eb8a49a955805307e6e02f8c60a08188f69340e116422458d4a8841f46a78c833b1a822e3f6c9c97422c918f17c36175ca4b3d1c081ee4b175b4b07bf101c3836eb5b9e3cbd08a89b4a1c50edcb41ea8ea6ceb1532f5b842715d50dc21e2499e08c373d3dedb96bb477c8802ab7aa957e0b5810f38", - }, - { - length: 859, - nonce: [3]uint32{0xeb02dac9, 0xa7cba06c, 0xc24764c}, - key: [8]uint32{0xe9414a57, 0xd5e29546, 0x1a5e2f4c, 0x806e4c46, 0x48098d1f, 0x4351ca1a, 0x53ed97c, 0xa6a495ca}, - input: "00fa3b13b5cfa9b5d65a41cc2d3c420518802c22c4582873f1ad52a22032d2cef7c975078b199787e852fb1f914529f60d1cc854e5d6d547216dce043e0fc94866bb2193343c3a07fde60e668266d1cee3067c6f2ce0f9f63456ad08094b6c7f515f7ca90caa96494e2a6835ba1f3f166012ad1ff6af6b5f8455d5c26e72402966af9066ca70ad027eed23b0eb02c751195064a62283975efeb29bc5993f83360d012a2f5275ac758a9e8fe458fc7cc0673e6b9e338678f0faff60a67fff3784c3054dcbd95d1b00ed4c6156b3831cc42a2ccdeee55541f228b88e6c318e2d797c6fc035ae12868c4a4e3843b5b25a530b1477dec3f5ac27644476b5766e0ee132d833f9a63200eb0980bf72c3666150e567e01e3e1f469cf36beea65946fce714a3f354983e54ca4315b57ea35c5f48bd5eada05f49db1004cbb39888ebab3afad62f6509abad77ca8c4ff28731c7ae545e6876c8f4a80b6cc26928ee05001a9764694b52edd605e182d5a3a5fd192bff58aba90f57e4debe612d02cf6f08af33a78ebf8823bb3eb46d4da25b7dfa15ad436c380633d3db3d0dc4dfec6c2324d105e7090e65342b554854e777b40b5dab8125a58e8b212364ff88459a8466ff5ae661034abc8286a78ad5aa582e2dabbcd7a0b0cedcb9fd5f0bb8c3bef9117f2ca6520a72b94e528c1a4a464398e654995d5f4c77cbabf2b204b96a058cf1b38284b34e41ac37b05a003ed51be9602050f21c6b9326714bc425c1e22833da95a6e77571691d4dcab4ef9056c4c7f85d5b445b902eb375b5164c6bdf629ccfd4127a6c024bb6c4da0b6b08350432e58f8229e04e2e76f704be17d36e0c04fcc7a98f721d4572aa7f66ae8e9664300a189bc3862da47b60c8b33424f6d577cc10f4755f36c2a6decc30ba81bf48f96616ccfcfb74965d6bdcab82728bb224c560d1cfd7a175413ad1c14c734746be3b062b4e7514e9075c688103515e32e3335dbd272a315024d56f4ecd354264da9bc712080657b2b51b06dc7c4c441d9858935a4c3e6b207bde38ea83bba4c6854b2bcf914d758e0a174c0528e0e385c7cff355c38db1c22440369141e91266824c59f1ed23e7d4b99d31b0baa7bed4526e24259dbef5c9ae275e97267b756645f804c274d65ac7ab0f7683435bc2e4f24075cd1b790aa2b53fbf044e8f2092bdf0dbe88a582ff8f8de291e8220", - output: "bea32587095caac661c3ac49e65654b282192b2addf5b9a403aea6c8bd0096291a0a66ca4062acf1da91fb5749952096ec63ab652ecf94c29807f0aaac939b6896edcd6f0cd8dd8d208b906ef4d7a8766831fecd6ce98f4ea0c34fa9a5114dbeb23c2cd6d3aa962e39b18cb343c24e65d49fad0a0fb50736f8d2b24b011108932484399f4c4510ac9a5e6bc78ff0b450e67f87b49f253b99d95d6294e15a9934fc8b89a5913c08f75d3516766fb0f60f82e2b2647b4619991c78adbcf548c07c0dda30c629349d84f298313c3e629e03760b1cf860264205a950d6fd86732a6513827f72c0dff5aff96f7203464f60849c1065beb70f282cca1334f6f6c767dfff94f063361f592e85597de5d313eaed17bd533db24818d9ba9aea2afa797721fbd19eea7b8d46bbc4b9dc0164636d2e754f5e9e8c04e2a381096331731c645ea1f613a37bfa9a6fb2c6307e9bacacbeab7f5672163ff9742a8115049bce0269d7d5f6f35787be031dbee1535b0516ec0b46d12f5833cde5f2cc569edcdd20993e9776aacf48ace7bfadf79065f2803fba6b2b27aa622abb7ae023ff2b27b727f509f313f92026392485a5ed4fd53b2e22b2d2dc1538ce158d34921214638be30ae054a0f5f1d4f9c590a2d215ac2a5b23ed33871ab26c8bb6db7fe9d6f51e527c9547248a4e9734c64658b22893f4f6867a35f18e2bbfd7d62142025955cb51af8e40b6fcb91c7e959cea2c92022c87c29dae107a306f41b00e73c7bceef8cb070e8f9e830caeee463170e919cba6eee63092a5a7ee33b74db09cdd022fdafbcd5d524253a29a103ba6f4d668d31d18f867557871c0e0258221c3050d57c18bdae4cc4ff8da0daddb5c08619be127ee76a317b59a9d8e67808603a1bfce6b4e0d070082b283bf9c0e6ef8256208e482f3e2d1a40d30807f60a868e2279dfbc3586d44ee25fdca3505cd39fd469c2cd03bc2f921d22a8346750f346c919e7247301c1c8a4a3ddb8eabc6e80d85cd2459afe1cbb4851ea2c86b8075e0fef3177cb074894410ecf681242fac62b5fa4ed3a10ddaa595427851d376cf69e350207b667f7aa26d003f1ec739a8792532ebd93f3cafb1fea40d227bcadda2fb6da794cea3371240f257f80b1b8a857ea453b46938397c1f4b303a46257750003a60666a11d03bf2afb5c71e059933d617288891733b63784bd9c662234f", - }, - { - length: 985, - nonce: [3]uint32{0x3c2b47a4, 0xf614c813, 0xa26f7014}, - key: [8]uint32{0x39bd3d18, 0xc9aacd67, 0xcb5485b5, 0x20536a22, 0xbb22ac87, 0x1c9da580, 0x7d996b2e, 0x456fe461}, - input: "01847d8a97d56e55e12f89adb13c8c0f9dea5555e8dc61171fbb8e181f6cf846a4dd68b2c75335c0896fa215bf7f9eb7e398e4520aaaf33461ecfb61051f43d43569fb75fabd79d319bf39469f951e4da7932a74624c46d8d26a9499c701c00d3dea57a6f65b4c0f33b568d13989340294d17cd005b26d89cf6fa1c88e7b6ef4d074291fa8c117ae05d7c785459ef4561c45af63a811e9aa1c31b69a5bdac2356d955a0f579791247a757a691b3de447a53619878397cd82a74053f06da3574045bc856500ec01fd2afbc64d8dd283ac876a50e9396f78c424ab157f481316fd9c90cd899f5aca46dad32c68f1d64ea7f1c4bdb994ad847072609bd89adc2fa8382a5d573b680533640b8321b6adf27926274660b2cbaf04fbc9a4fb17ce8957c38c7bab1aafd5bf7263171e47d2e1ae5cf0494815642209d303dba561754479c24ea01a573c9083b68acc49907b1748924d3c6a82feb9417ca932578c123f9db35521c0d992565f7396f0c23e436289c1720e4e7c6e285c04a8159f93e06801334e523b18fe188355cc6a155febe64ba053e6b5d1cc87787fd5ae68fa86d8c51868b9f6a9664cf0d56aa6cb8463362bb671e6b8423bcbefe2a1a0acba3f135496736b5cec5e329494af46aba322bf5d1cc108c98298459558773a316e09b0bb960a26f4b0bfbaa493b5f98a0e522b6203c471b10e662abe9b9e60de2a1517843933add02017fadd62608383ad53796159f3d21b2c8ed7295802ca79ea65d550114ca2bcc7f7c3b4c6709fffc3c2de00da06e83d8f0cf04b8c8edd21c0fc11a0b2aa7f6adad255fef25e5c0a9d59546e97446e1fbf6a51a8ea6cad54cabfdd19cd10d7d33ff0549b710557e3931821dd8809ab0a9d3aaa761a01ae0f2e378906672924d6a1b12fb1cca7bed41f31974b9917a05de60c32796f502e7035a2c01cb49bc8e1734b9fa138b81b4dfe19d37f5942dd1b42f03e1e5a6a046ecd457174150e17dd148e4bfea44b72da35ef42a7251244700e59e702033677d42611168fd246e1b18b9a464b6c20fc7fcf6360cd00466ece059a69d7d54a4f5565d08799f85dd3c849a08ba43415077c1c0e5dbdba52bb3167ee99a11db551f0260493be1dde58d2072e8c02251f4f574b6e115cbb6136dc2c3fbce75fdcefe812d9c07a91a89088985a52cb1fb9f6cef80fa30364706414175e42c75e8e37f6e7cd028c99f59caa88c49db5b46e8d6301bc39034013718a9eeef5506415016fb21d70e46a03b4c5ba72f91dd9321ff5e210e5e5f7b0723a3bc4bb02b5a74c1f4a63aa5a993a31f79a768fe8033c9abfeb4deb536af1054be02d8d1c4a6a0fa75f3eb787d57a03b7ae994fb1b54b2c43b230ce32e6245d944b3cea4fa6", - output: "785dbea5d1e50af4743ed5fd2209e441fc7c50bc7f6fd9cc7f24654c619e2606178dcbbd81a1f94c1b3176837024098bd31326145be326b32fd9277a55a6fb38780c8dc8b471a3184379d90da4aa87d80b889b1f4d8d0755c1704a526b99ac829b8ad157ca54b2b05ff8b2917e27b0c147ab54add9a89fdcad7b93ba1fe2d5be9de88b68a5324f1b42943e45ee31c4ef783ec9e2337b3f2834b10cf452b313fafdf0c03719140f64060da0a565e185cb8e544e1c185ca230ff2321739a285abe8be4be0ce76678a7b0902a77a645194de49fef8ff64cc464ea25e1f1d72c775e450f08ddd7680d27a4142879787b198583d93b84cd87fd5b4063d92d13d9c9cb580c01fac0174686a18f64e6fa0b3589624cfae04aad74950559bdf92b2b199c60cb04013aa0ef56d1f9ec5b7e968f6a83756ecc9cee7dd8b433f64649f948df5474a64549e71e46fd8bb16568d21f5fb67f5ed555f2b8aec4709383e8cbc45b9fe47c0434178ad4c6d0d42606d6eef0e21d0370898d1d5d646830a88d5f024094fe9c7a2003ca13d20ab7cd748dc11a22f578ddab416f3500eff3d89fc177b46436108e2e2c7973910cb8454a01c9e9b98f966848325444b2ac205b1ed6919fa76aaf63717574761b7f62b10649357df49f85a845a30b6acd57fa202fe58673930ec59399f537e9682b1f5f6f409988789a8e0c1f803478dded14b40d3b6eb3109758efeb6a7fe21f41c4dcc8027258da27ad74010839dbfdf8fe55050511f85c321e653f76e55f22248f46da529a380c6b1a16a19ce73af9715545c2cae098dc42dd61248dbcf7b295f4dc6b8930b41baeef677156c534869be65e723e1aa0336e8be8a3b138f840c9cd63bab6d9d61f239a47d8cf56258544e6ef65edca27069f7a57f087a7cc021fa1294b75c0c0f1093c025e426e4f041ed5187f358402676d5da5fb6ceba76a178f65c8c3046f258531c165b8808bdd221c59ff56e3e06247576e144aac01ea96a07f1be15d7a2b0b3b6c259a9133f8a50b56154ecf9f61022f470027247e6e70e6eaf7ece5e324ec8f95667ffed10337652b119e7cb8d197e306e81ea251340b9fb2c33aa230c0a16e1ca783f9344b3acbf413acd96616e6d477dba90e39326089934bc5ca6620855cdc442e25bf8b8debf335e16e7e25cceb68659cc81b13a507fbd9f30b347126beeb57016bd348fe3df592d4778011664a218227e70d7360d139480500b7f6f84153e61ca4dea105875e19ce3d11a3dfd0ad0074035ff6a9fac0ece91afd8be74c168da20c8baafcc14632eb0e774db758a3d90709cddf0266c27963788c35a842beea8ba2d916234431efde4bb32fd7e1cef51dcf580f4697206bbc3f991f4046360aea6e88ec", - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/xor.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/xor.go deleted file mode 100644 index 9c5ba0b33a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20/xor.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found src the LICENSE file. - -package chacha20 - -import ( - "runtime" -) - -// Platforms that have fast unaligned 32-bit little endian accesses. -const unaligned = runtime.GOARCH == "386" || - runtime.GOARCH == "amd64" || - runtime.GOARCH == "arm64" || - runtime.GOARCH == "ppc64le" || - runtime.GOARCH == "s390x" - -// xor reads a little endian uint32 from src, XORs it with u and -// places the result in little endian byte order in dst. -func xor(dst, src []byte, u uint32) { - _, _ = src[3], dst[3] // eliminate bounds checks - if unaligned { - // The compiler should optimize this code into - // 32-bit unaligned little endian loads and stores. - // TODO: delete once the compiler does a reliably - // good job with the generic code below. - // See issue #25111 for more details. - v := uint32(src[0]) - v |= uint32(src[1]) << 8 - v |= uint32(src[2]) << 16 - v |= uint32(src[3]) << 24 - v ^= u - dst[0] = byte(v) - dst[1] = byte(v >> 8) - dst[2] = byte(v >> 16) - dst[3] = byte(v >> 24) - } else { - dst[0] = src[0] ^ byte(u) - dst[1] = src[1] ^ byte(u>>8) - dst[2] = src[2] ^ byte(u>>16) - dst[3] = src[3] ^ byte(u>>24) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/example_test.go deleted file mode 100644 index 0faf93b241..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/example_test.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 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 md4_test - -import ( - "fmt" - "io" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4" -) - -func ExampleNew() { - h := md4.New() - data := "These pretzels are making me thirsty." - io.WriteString(h, data) - fmt.Printf("%x", h.Sum(nil)) - // Output: 48c4e365090b30a32f084c4888deceaa -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4.go deleted file mode 100644 index c5f7c57d16..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2009 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 md4 implements the MD4 hash algorithm as defined in RFC 1320. -package md4 - -import ( - "crypto" - "hash" -) - -func init() { - crypto.RegisterHash(crypto.MD4, New) -} - -// The size of an MD4 checksum in bytes. -const Size = 16 - -// The blocksize of MD4 in bytes. -const BlockSize = 64 - -const ( - _Chunk = 64 - _Init0 = 0x67452301 - _Init1 = 0xEFCDAB89 - _Init2 = 0x98BADCFE - _Init3 = 0x10325476 -) - -// digest represents the partial evaluation of a checksum. -type digest struct { - s [4]uint32 - x [_Chunk]byte - nx int - len uint64 -} - -func (d *digest) Reset() { - d.s[0] = _Init0 - d.s[1] = _Init1 - d.s[2] = _Init2 - d.s[3] = _Init3 - d.nx = 0 - d.len = 0 -} - -// New returns a new hash.Hash computing the MD4 checksum. -func New() hash.Hash { - d := new(digest) - d.Reset() - return d -} - -func (d *digest) Size() int { return Size } - -func (d *digest) BlockSize() int { return BlockSize } - -func (d *digest) Write(p []byte) (nn int, err error) { - nn = len(p) - d.len += uint64(nn) - if d.nx > 0 { - n := len(p) - if n > _Chunk-d.nx { - n = _Chunk - d.nx - } - for i := 0; i < n; i++ { - d.x[d.nx+i] = p[i] - } - d.nx += n - if d.nx == _Chunk { - _Block(d, d.x[0:]) - d.nx = 0 - } - p = p[n:] - } - n := _Block(d, p) - p = p[n:] - if len(p) > 0 { - d.nx = copy(d.x[:], p) - } - return -} - -func (d0 *digest) Sum(in []byte) []byte { - // Make a copy of d0, so that caller can keep writing and summing. - d := new(digest) - *d = *d0 - - // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64. - len := d.len - var tmp [64]byte - tmp[0] = 0x80 - if len%64 < 56 { - d.Write(tmp[0 : 56-len%64]) - } else { - d.Write(tmp[0 : 64+56-len%64]) - } - - // Length in bits. - len <<= 3 - for i := uint(0); i < 8; i++ { - tmp[i] = byte(len >> (8 * i)) - } - d.Write(tmp[0:8]) - - if d.nx != 0 { - panic("d.nx != 0") - } - - for _, s := range d.s { - in = append(in, byte(s>>0)) - in = append(in, byte(s>>8)) - in = append(in, byte(s>>16)) - in = append(in, byte(s>>24)) - } - return in -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4_test.go deleted file mode 100644 index b56edd7875..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2009 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 md4 - -import ( - "fmt" - "io" - "testing" -) - -type md4Test struct { - out string - in string -} - -var golden = []md4Test{ - {"31d6cfe0d16ae931b73c59d7e0c089c0", ""}, - {"bde52cb31de33e46245e05fbdbd6fb24", "a"}, - {"ec388dd78999dfc7cf4632465693b6bf", "ab"}, - {"a448017aaf21d8525fc10ae87aa6729d", "abc"}, - {"41decd8f579255c5200f86a4bb3ba740", "abcd"}, - {"9803f4a34e8eb14f96adba49064a0c41", "abcde"}, - {"804e7f1c2586e50b49ac65db5b645131", "abcdef"}, - {"752f4adfe53d1da0241b5bc216d098fc", "abcdefg"}, - {"ad9daf8d49d81988590a6f0e745d15dd", "abcdefgh"}, - {"1e4e28b05464316b56402b3815ed2dfd", "abcdefghi"}, - {"dc959c6f5d6f9e04e4380777cc964b3d", "abcdefghij"}, - {"1b5701e265778898ef7de5623bbe7cc0", "Discard medicine more than two years old."}, - {"d7f087e090fe7ad4a01cb59dacc9a572", "He who has a shady past knows that nice guys finish last."}, - {"a6f8fd6df617c72837592fc3570595c9", "I wouldn't marry him with a ten foot pole."}, - {"c92a84a9526da8abc240c05d6b1a1ce0", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"}, - {"f6013160c4dcb00847069fee3bb09803", "The days of the digital watch are numbered. -Tom Stoppard"}, - {"2c3bb64f50b9107ed57640fe94bec09f", "Nepal premier won't resign."}, - {"45b7d8a32c7806f2f7f897332774d6e4", "For every action there is an equal and opposite government program."}, - {"b5b4f9026b175c62d7654bdc3a1cd438", "His money is twice tainted: 'taint yours and 'taint mine."}, - {"caf44e80f2c20ce19b5ba1cab766e7bd", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"}, - {"191fae6707f496aa54a6bce9f2ecf74d", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"}, - {"9ddc753e7a4ccee6081cd1b45b23a834", "size: a.out: bad magic"}, - {"8d050f55b1cadb9323474564be08a521", "The major problem is with sendmail. -Mark Horton"}, - {"ad6e2587f74c3e3cc19146f6127fa2e3", "Give me a rock, paper and scissors and I will move the world. CCFestoon"}, - {"1d616d60a5fabe85589c3f1566ca7fca", "If the enemy is within range, then so are you."}, - {"aec3326a4f496a2ced65a1963f84577f", "It's well we cannot hear the screams/That we create in others' dreams."}, - {"77b4fd762d6b9245e61c50bf6ebf118b", "You remind me of a TV show, but that's all right: I watch it anyway."}, - {"e8f48c726bae5e516f6ddb1a4fe62438", "C is as portable as Stonehedge!!"}, - {"a3a84366e7219e887423b01f9be7166e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"}, - {"a6b7aa35157e984ef5d9b7f32e5fbb52", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"}, - {"75661f0545955f8f9abeeb17845f3fd6", "How can you write a big system without C++? -Paul Glick"}, -} - -func TestGolden(t *testing.T) { - for i := 0; i < len(golden); i++ { - g := golden[i] - c := New() - for j := 0; j < 3; j++ { - if j < 2 { - io.WriteString(c, g.in) - } else { - io.WriteString(c, g.in[0:len(g.in)/2]) - c.Sum(nil) - io.WriteString(c, g.in[len(g.in)/2:]) - } - s := fmt.Sprintf("%x", c.Sum(nil)) - if s != g.out { - t.Fatalf("md4[%d](%s) = %s want %s", j, g.in, s, g.out) - } - c.Reset() - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4block.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4block.go deleted file mode 100644 index 3fed475f3f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/md4/md4block.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2009 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. - -// MD4 block step. -// In its own file so that a faster assembly or C version -// can be substituted easily. - -package md4 - -var shift1 = []uint{3, 7, 11, 19} -var shift2 = []uint{3, 5, 9, 13} -var shift3 = []uint{3, 9, 11, 15} - -var xIndex2 = []uint{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15} -var xIndex3 = []uint{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15} - -func _Block(dig *digest, p []byte) int { - a := dig.s[0] - b := dig.s[1] - c := dig.s[2] - d := dig.s[3] - n := 0 - var X [16]uint32 - for len(p) >= _Chunk { - aa, bb, cc, dd := a, b, c, d - - j := 0 - for i := 0; i < 16; i++ { - X[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24 - j += 4 - } - - // If this needs to be made faster in the future, - // the usual trick is to unroll each of these - // loops by a factor of 4; that lets you replace - // the shift[] lookups with constants and, - // with suitable variable renaming in each - // unrolled body, delete the a, b, c, d = d, a, b, c - // (or you can let the optimizer do the renaming). - // - // The index variables are uint so that % by a power - // of two can be optimized easily by a compiler. - - // Round 1. - for i := uint(0); i < 16; i++ { - x := i - s := shift1[i%4] - f := ((c ^ d) & b) ^ d - a += f + X[x] - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - // Round 2. - for i := uint(0); i < 16; i++ { - x := xIndex2[i] - s := shift2[i%4] - g := (b & c) | (b & d) | (c & d) - a += g + X[x] + 0x5a827999 - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - // Round 3. - for i := uint(0); i < 16; i++ { - x := xIndex3[i] - s := shift3[i%4] - h := b ^ c ^ d - a += h + X[x] + 0x6ed9eba1 - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - a += aa - b += bb - c += cc - d += dd - - p = p[_Chunk:] - n += _Chunk - } - - dig.s[0] = a - dig.s[1] = b - dig.s[2] = c - dig.s[3] = d - return n -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth.go deleted file mode 100644 index ec1d6ebe4a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2017 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 auth authenticates a message using a secret key. - -The Sum function, viewed as a function of the message for a uniform random -key, is designed to meet the standard notion of unforgeability. This means -that an attacker cannot find authenticators for any messages not authenticated -by the sender, even if the attacker has adaptively influenced the messages -authenticated by the sender. For a formal definition see, e.g., Section 2.4 -of Bellare, Kilian, and Rogaway, "The security of the cipher block chaining -message authentication code," Journal of Computer and System Sciences 61 (2000), -362–399; http://www-cse.ucsd.edu/~mihir/papers/cbc.html. - -auth does not make any promises regarding "strong" unforgeability; perhaps -one valid authenticator can be converted into another valid authenticator for -the same message. NaCl also does not make any promises regarding "truncated -unforgeability." - -This package is interoperable with NaCl: https://nacl.cr.yp.to/auth.html. -*/ -package auth - -import ( - "crypto/hmac" - "crypto/sha512" -) - -const ( - // Size is the size, in bytes, of an authenticated digest. - Size = 32 - // KeySize is the size, in bytes, of an authentication key. - KeySize = 32 -) - -// Sum generates an authenticator for m using a secret key and returns the -// 32-byte digest. -func Sum(m []byte, key *[KeySize]byte) *[Size]byte { - mac := hmac.New(sha512.New, key[:]) - mac.Write(m) - out := new([KeySize]byte) - copy(out[:], mac.Sum(nil)[:Size]) - return out -} - -// Verify checks that digest is a valid authenticator of message m under the -// given secret key. Verify does not leak timing information. -func Verify(digest []byte, m []byte, key *[KeySize]byte) bool { - if len(digest) != Size { - return false - } - mac := hmac.New(sha512.New, key[:]) - mac.Write(m) - expectedMAC := mac.Sum(nil) // first 256 bits of 512-bit sum - return hmac.Equal(digest, expectedMAC[:Size]) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth_test.go deleted file mode 100644 index 92074b50b6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/auth_test.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2017 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 auth - -import ( - "bytes" - rand "crypto/rand" - mrand "math/rand" - "testing" -) - -// Test cases are from RFC 4231, and match those present in the tests directory -// of the download here: https://nacl.cr.yp.to/install.html -var testCases = []struct { - key [32]byte - msg []byte - out [32]byte -}{ - { - key: [32]byte{ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, - }, - msg: []byte("Hi There"), - out: [32]byte{ - 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, - 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, - 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78, - 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde, - }, - }, - { - key: [32]byte{'J', 'e', 'f', 'e'}, - msg: []byte("what do ya want for nothing?"), - out: [32]byte{ - 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, - 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, - 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6, - 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54, - }, - }, - { - key: [32]byte{ - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, - }, - msg: []byte{ // 50 bytes of 0xdd - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, - }, - out: [32]byte{ - 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, - 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9, - 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36, - 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39, - }, - }, - { - key: [32]byte{ - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, - }, - msg: []byte{ - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, - }, - out: [32]byte{ - 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69, - 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7, - 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d, - 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb, - }, - }, -} - -func TestSum(t *testing.T) { - for i, test := range testCases { - tag := Sum(test.msg, &test.key) - if !bytes.Equal(tag[:], test.out[:]) { - t.Errorf("#%d: Sum: got\n%x\nwant\n%x", i, tag, test.out) - } - } -} - -func TestVerify(t *testing.T) { - wrongMsg := []byte("unknown msg") - - for i, test := range testCases { - if !Verify(test.out[:], test.msg, &test.key) { - t.Errorf("#%d: Verify(%x, %q, %x) failed", i, test.out, test.msg, test.key) - } - if Verify(test.out[:], wrongMsg, &test.key) { - t.Errorf("#%d: Verify(%x, %q, %x) unexpectedly passed", i, test.out, wrongMsg, test.key) - } - } -} - -func TestStress(t *testing.T) { - if testing.Short() { - t.Skip("exhaustiveness test") - } - - var key [32]byte - msg := make([]byte, 10000) - prng := mrand.New(mrand.NewSource(0)) - - // copied from tests/auth5.c in nacl - for i := 0; i < 10000; i++ { - if _, err := rand.Read(key[:]); err != nil { - t.Fatal(err) - } - if _, err := rand.Read(msg[:i]); err != nil { - t.Fatal(err) - } - tag := Sum(msg[:i], &key) - if !Verify(tag[:], msg[:i], &key) { - t.Errorf("#%d: unexpected failure from Verify", i) - } - if i > 0 { - msgIndex := prng.Intn(i) - oldMsgByte := msg[msgIndex] - msg[msgIndex] += byte(1 + prng.Intn(255)) - if Verify(tag[:], msg[:i], &key) { - t.Errorf("#%d: unexpected success from Verify after corrupting message", i) - } - msg[msgIndex] = oldMsgByte - - tag[prng.Intn(len(tag))] += byte(1 + prng.Intn(255)) - if Verify(tag[:], msg[:i], &key) { - t.Errorf("#%d: unexpected success from Verify after corrupting authenticator", i) - } - } - } -} - -func BenchmarkAuth(b *testing.B) { - var key [32]byte - if _, err := rand.Read(key[:]); err != nil { - b.Fatal(err) - } - buf := make([]byte, 1024) - if _, err := rand.Read(buf[:]); err != nil { - b.Fatal(err) - } - - b.SetBytes(int64(len(buf))) - b.ReportAllocs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - tag := Sum(buf, &key) - if Verify(tag[:], buf, &key) == false { - b.Fatal("unexpected failure from Verify") - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/example_test.go deleted file mode 100644 index 30d5d54e41..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth/example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 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 auth_test - -import ( - "encoding/hex" - "fmt" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/auth" -) - -func Example() { - // Load your secret key from a safe place and reuse it across multiple - // Sum calls. (Obviously don't use this example key for anything - // real.) If you want to convert a passphrase to a key, use a suitable - // package like bcrypt or scrypt. - secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574") - if err != nil { - panic(err) - } - - var secretKey [32]byte - copy(secretKey[:], secretKeyBytes) - - mac := auth.Sum([]byte("hello world"), &secretKey) - fmt.Printf("%x\n", *mac) - result := auth.Verify(mac[:], []byte("hello world"), &secretKey) - fmt.Println(result) - badResult := auth.Verify(mac[:], []byte("different message"), &secretKey) - fmt.Println(badResult) - // Output: eca5a521f3d77b63f567fb0cb6f5f2d200641bc8dada42f60c5f881260c30317 - // true - // false -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box.go deleted file mode 100644 index f4bc943531..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2012 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 box authenticates and encrypts small messages using public-key cryptography. - -Box uses Curve25519, XSalsa20 and Poly1305 to encrypt and authenticate -messages. The length of messages is not hidden. - -It is the caller's responsibility to ensure the uniqueness of nonces—for -example, by using nonce 1 for the first message, nonce 2 for the second -message, etc. Nonces are long enough that randomly generated nonces have -negligible risk of collision. - -Messages should be small because: - -1. The whole message needs to be held in memory to be processed. - -2. Using large messages pressures implementations on small machines to decrypt -and process plaintext before authenticating it. This is very dangerous, and -this API does not allow it, but a protocol that uses excessive message sizes -might present some implementations with no other choice. - -3. Fixed overheads will be sufficiently amortised by messages as small as 8KB. - -4. Performance may be improved by working with messages that fit into data caches. - -Thus large amounts of data should be chunked so that each message is small. -(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable -chunk size. - -This package is interoperable with NaCl: https://nacl.cr.yp.to/box.html. -*/ -package box - -import ( - "io" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa" -) - -// Overhead is the number of bytes of overhead when boxing a message. -const Overhead = secretbox.Overhead - -// GenerateKey generates a new public/private key pair suitable for use with -// Seal and Open. -func GenerateKey(rand io.Reader) (publicKey, privateKey *[32]byte, err error) { - publicKey = new([32]byte) - privateKey = new([32]byte) - _, err = io.ReadFull(rand, privateKey[:]) - if err != nil { - publicKey = nil - privateKey = nil - return - } - - curve25519.ScalarBaseMult(publicKey, privateKey) - return -} - -var zeros [16]byte - -// Precompute calculates the shared key between peersPublicKey and privateKey -// and writes it to sharedKey. The shared key can be used with -// OpenAfterPrecomputation and SealAfterPrecomputation to speed up processing -// when using the same pair of keys repeatedly. -func Precompute(sharedKey, peersPublicKey, privateKey *[32]byte) { - curve25519.ScalarMult(sharedKey, privateKey, peersPublicKey) - salsa.HSalsa20(sharedKey, &zeros, sharedKey, &salsa.Sigma) -} - -// Seal appends an encrypted and authenticated copy of message to out, which -// will be Overhead bytes longer than the original and must not overlap it. The -// nonce must be unique for each distinct message for a given pair of keys. -func Seal(out, message []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) []byte { - var sharedKey [32]byte - Precompute(&sharedKey, peersPublicKey, privateKey) - return secretbox.Seal(out, message, nonce, &sharedKey) -} - -// SealAfterPrecomputation performs the same actions as Seal, but takes a -// shared key as generated by Precompute. -func SealAfterPrecomputation(out, message []byte, nonce *[24]byte, sharedKey *[32]byte) []byte { - return secretbox.Seal(out, message, nonce, sharedKey) -} - -// Open authenticates and decrypts a box produced by Seal and appends the -// message to out, which must not overlap box. The output will be Overhead -// bytes smaller than box. -func Open(out, box []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) ([]byte, bool) { - var sharedKey [32]byte - Precompute(&sharedKey, peersPublicKey, privateKey) - return secretbox.Open(out, box, nonce, &sharedKey) -} - -// OpenAfterPrecomputation performs the same actions as Open, but takes a -// shared key as generated by Precompute. -func OpenAfterPrecomputation(out, box []byte, nonce *[24]byte, sharedKey *[32]byte) ([]byte, bool) { - return secretbox.Open(out, box, nonce, sharedKey) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box_test.go deleted file mode 100644 index 304af55e05..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/box_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2012 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 box - -import ( - "bytes" - "crypto/rand" - "encoding/hex" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519" -) - -func TestSealOpen(t *testing.T) { - publicKey1, privateKey1, _ := GenerateKey(rand.Reader) - publicKey2, privateKey2, _ := GenerateKey(rand.Reader) - - if *privateKey1 == *privateKey2 { - t.Fatalf("private keys are equal!") - } - if *publicKey1 == *publicKey2 { - t.Fatalf("public keys are equal!") - } - message := []byte("test message") - var nonce [24]byte - - box := Seal(nil, message, &nonce, publicKey1, privateKey2) - opened, ok := Open(nil, box, &nonce, publicKey2, privateKey1) - if !ok { - t.Fatalf("failed to open box") - } - - if !bytes.Equal(opened, message) { - t.Fatalf("got %x, want %x", opened, message) - } - - for i := range box { - box[i] ^= 0x40 - _, ok := Open(nil, box, &nonce, publicKey2, privateKey1) - if ok { - t.Fatalf("opened box with byte %d corrupted", i) - } - box[i] ^= 0x40 - } -} - -func TestBox(t *testing.T) { - var privateKey1, privateKey2 [32]byte - for i := range privateKey1[:] { - privateKey1[i] = 1 - } - for i := range privateKey2[:] { - privateKey2[i] = 2 - } - - var publicKey1 [32]byte - curve25519.ScalarBaseMult(&publicKey1, &privateKey1) - var message [64]byte - for i := range message[:] { - message[i] = 3 - } - - var nonce [24]byte - for i := range nonce[:] { - nonce[i] = 4 - } - - box := Seal(nil, message[:], &nonce, &publicKey1, &privateKey2) - - // expected was generated using the C implementation of NaCl. - expected, _ := hex.DecodeString("78ea30b19d2341ebbdba54180f821eec265cf86312549bea8a37652a8bb94f07b78a73ed1708085e6ddd0e943bbdeb8755079a37eb31d86163ce241164a47629c0539f330b4914cd135b3855bc2a2dfc") - - if !bytes.Equal(box, expected) { - t.Fatalf("box didn't match, got\n%x\n, expected\n%x", box, expected) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/example_test.go deleted file mode 100644 index 6850eecbbd..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box/example_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package box_test - -import ( - crypto_rand "crypto/rand" // Custom so it's clear which rand we're using. - "fmt" - "io" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/box" -) - -func Example() { - senderPublicKey, senderPrivateKey, err := box.GenerateKey(crypto_rand.Reader) - if err != nil { - panic(err) - } - - recipientPublicKey, recipientPrivateKey, err := box.GenerateKey(crypto_rand.Reader) - if err != nil { - panic(err) - } - - // You must use a different nonce for each message you encrypt with the - // same key. Since the nonce here is 192 bits long, a random value - // provides a sufficiently small probability of repeats. - var nonce [24]byte - if _, err := io.ReadFull(crypto_rand.Reader, nonce[:]); err != nil { - panic(err) - } - - msg := []byte("Alas, poor Yorick! I knew him, Horatio") - // This encrypts msg and appends the result to the nonce. - encrypted := box.Seal(nonce[:], msg, &nonce, recipientPublicKey, senderPrivateKey) - - // The recipient can decrypt the message using their private key and the - // sender's public key. When you decrypt, you must use the same nonce you - // used to encrypt the message. One way to achieve this is to store the - // nonce alongside the encrypted message. Above, we stored the nonce in the - // first 24 bytes of the encrypted text. - var decryptNonce [24]byte - copy(decryptNonce[:], encrypted[:24]) - decrypted, ok := box.Open(nil, encrypted[24:], &decryptNonce, senderPublicKey, recipientPrivateKey) - if !ok { - panic("decryption error") - } - fmt.Println(string(decrypted)) - // Output: Alas, poor Yorick! I knew him, Horatio -} - -func Example_precompute() { - senderPublicKey, senderPrivateKey, err := box.GenerateKey(crypto_rand.Reader) - if err != nil { - panic(err) - } - - recipientPublicKey, recipientPrivateKey, err := box.GenerateKey(crypto_rand.Reader) - if err != nil { - panic(err) - } - - // The shared key can be used to speed up processing when using the same - // pair of keys repeatedly. - sharedEncryptKey := new([32]byte) - box.Precompute(sharedEncryptKey, recipientPublicKey, senderPrivateKey) - - // You must use a different nonce for each message you encrypt with the - // same key. Since the nonce here is 192 bits long, a random value - // provides a sufficiently small probability of repeats. - var nonce [24]byte - if _, err := io.ReadFull(crypto_rand.Reader, nonce[:]); err != nil { - panic(err) - } - - msg := []byte("A fellow of infinite jest, of most excellent fancy") - // This encrypts msg and appends the result to the nonce. - encrypted := box.SealAfterPrecomputation(nonce[:], msg, &nonce, sharedEncryptKey) - - // The shared key can be used to speed up processing when using the same - // pair of keys repeatedly. - var sharedDecryptKey [32]byte - box.Precompute(&sharedDecryptKey, senderPublicKey, recipientPrivateKey) - - // The recipient can decrypt the message using the shared key. When you - // decrypt, you must use the same nonce you used to encrypt the message. - // One way to achieve this is to store the nonce alongside the encrypted - // message. Above, we stored the nonce in the first 24 bytes of the - // encrypted text. - var decryptNonce [24]byte - copy(decryptNonce[:], encrypted[:24]) - decrypted, ok := box.OpenAfterPrecomputation(nil, encrypted[24:], &decryptNonce, &sharedDecryptKey) - if !ok { - panic("decryption error") - } - fmt.Println(string(decrypted)) - // Output: A fellow of infinite jest, of most excellent fancy -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/example_test.go deleted file mode 100644 index 02aff23e4b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/example_test.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2016 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 secretbox_test - -import ( - "crypto/rand" - "encoding/hex" - "fmt" - "io" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox" -) - -func Example() { - // Load your secret key from a safe place and reuse it across multiple - // Seal calls. (Obviously don't use this example key for anything - // real.) If you want to convert a passphrase to a key, use a suitable - // package like bcrypt or scrypt. - secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574") - if err != nil { - panic(err) - } - - var secretKey [32]byte - copy(secretKey[:], secretKeyBytes) - - // You must use a different nonce for each message you encrypt with the - // same key. Since the nonce here is 192 bits long, a random value - // provides a sufficiently small probability of repeats. - var nonce [24]byte - if _, err := io.ReadFull(rand.Reader, nonce[:]); err != nil { - panic(err) - } - - // This encrypts "hello world" and appends the result to the nonce. - encrypted := secretbox.Seal(nonce[:], []byte("hello world"), &nonce, &secretKey) - - // When you decrypt, you must use the same nonce and key you used to - // encrypt the message. One way to achieve this is to store the nonce - // alongside the encrypted message. Above, we stored the nonce in the first - // 24 bytes of the encrypted text. - var decryptNonce [24]byte - copy(decryptNonce[:], encrypted[:24]) - decrypted, ok := secretbox.Open(nil, encrypted[24:], &decryptNonce, &secretKey) - if !ok { - panic("decryption error") - } - - fmt.Println(string(decrypted)) - // Output: hello world -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox.go deleted file mode 100644 index 8b0c944f81..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2012 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 secretbox encrypts and authenticates small messages. - -Secretbox uses XSalsa20 and Poly1305 to encrypt and authenticate messages with -secret-key cryptography. The length of messages is not hidden. - -It is the caller's responsibility to ensure the uniqueness of nonces—for -example, by using nonce 1 for the first message, nonce 2 for the second -message, etc. Nonces are long enough that randomly generated nonces have -negligible risk of collision. - -Messages should be small because: - -1. The whole message needs to be held in memory to be processed. - -2. Using large messages pressures implementations on small machines to decrypt -and process plaintext before authenticating it. This is very dangerous, and -this API does not allow it, but a protocol that uses excessive message sizes -might present some implementations with no other choice. - -3. Fixed overheads will be sufficiently amortised by messages as small as 8KB. - -4. Performance may be improved by working with messages that fit into data caches. - -Thus large amounts of data should be chunked so that each message is small. -(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable -chunk size. - -This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html. -*/ -package secretbox - -import ( - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa" -) - -// Overhead is the number of bytes of overhead when boxing a message. -const Overhead = poly1305.TagSize - -// setup produces a sub-key and Salsa20 counter given a nonce and key. -func setup(subKey *[32]byte, counter *[16]byte, nonce *[24]byte, key *[32]byte) { - // We use XSalsa20 for encryption so first we need to generate a - // key and nonce with HSalsa20. - var hNonce [16]byte - copy(hNonce[:], nonce[:]) - salsa.HSalsa20(subKey, &hNonce, key, &salsa.Sigma) - - // The final 8 bytes of the original nonce form the new nonce. - copy(counter[:], nonce[16:]) -} - -// sliceForAppend takes a slice and a requested number of bytes. It returns a -// slice with the contents of the given slice followed by that many bytes and a -// second slice that aliases into it and contains only the extra bytes. If the -// original slice has sufficient capacity then no allocation is performed. -func sliceForAppend(in []byte, n int) (head, tail []byte) { - if total := len(in) + n; cap(in) >= total { - head = in[:total] - } else { - head = make([]byte, total) - copy(head, in) - } - tail = head[len(in):] - return -} - -// Seal appends an encrypted and authenticated copy of message to out, which -// must not overlap message. The key and nonce pair must be unique for each -// distinct message and the output will be Overhead bytes longer than message. -func Seal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte { - var subKey [32]byte - var counter [16]byte - setup(&subKey, &counter, nonce, key) - - // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since - // Salsa20 works with 64-byte blocks, we also generate 32 bytes of - // keystream as a side effect. - var firstBlock [64]byte - salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey) - - var poly1305Key [32]byte - copy(poly1305Key[:], firstBlock[:]) - - ret, out := sliceForAppend(out, len(message)+poly1305.TagSize) - - // We XOR up to 32 bytes of message with the keystream generated from - // the first block. - firstMessageBlock := message - if len(firstMessageBlock) > 32 { - firstMessageBlock = firstMessageBlock[:32] - } - - tagOut := out - out = out[poly1305.TagSize:] - for i, x := range firstMessageBlock { - out[i] = firstBlock[32+i] ^ x - } - message = message[len(firstMessageBlock):] - ciphertext := out - out = out[len(firstMessageBlock):] - - // Now encrypt the rest. - counter[8] = 1 - salsa.XORKeyStream(out, message, &counter, &subKey) - - var tag [poly1305.TagSize]byte - poly1305.Sum(&tag, ciphertext, &poly1305Key) - copy(tagOut, tag[:]) - - return ret -} - -// Open authenticates and decrypts a box produced by Seal and appends the -// message to out, which must not overlap box. The output will be Overhead -// bytes smaller than box. -func Open(out []byte, box []byte, nonce *[24]byte, key *[32]byte) ([]byte, bool) { - if len(box) < Overhead { - return nil, false - } - - var subKey [32]byte - var counter [16]byte - setup(&subKey, &counter, nonce, key) - - // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since - // Salsa20 works with 64-byte blocks, we also generate 32 bytes of - // keystream as a side effect. - var firstBlock [64]byte - salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey) - - var poly1305Key [32]byte - copy(poly1305Key[:], firstBlock[:]) - var tag [poly1305.TagSize]byte - copy(tag[:], box) - - if !poly1305.Verify(&tag, box[poly1305.TagSize:], &poly1305Key) { - return nil, false - } - - ret, out := sliceForAppend(out, len(box)-Overhead) - - // We XOR up to 32 bytes of box with the keystream generated from - // the first block. - box = box[Overhead:] - firstMessageBlock := box - if len(firstMessageBlock) > 32 { - firstMessageBlock = firstMessageBlock[:32] - } - for i, x := range firstMessageBlock { - out[i] = firstBlock[32+i] ^ x - } - - box = box[len(firstMessageBlock):] - out = out[len(firstMessageBlock):] - - // Now decrypt the rest. - counter[8] = 1 - salsa.XORKeyStream(out, box, &counter, &subKey) - - return ret, true -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox_test.go deleted file mode 100644 index 3c70b0f4b3..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/secretbox/secretbox_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2012 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 secretbox - -import ( - "bytes" - "crypto/rand" - "encoding/hex" - "testing" -) - -func TestSealOpen(t *testing.T) { - var key [32]byte - var nonce [24]byte - - rand.Reader.Read(key[:]) - rand.Reader.Read(nonce[:]) - - var box, opened []byte - - for msgLen := 0; msgLen < 128; msgLen += 17 { - message := make([]byte, msgLen) - rand.Reader.Read(message) - - box = Seal(box[:0], message, &nonce, &key) - var ok bool - opened, ok = Open(opened[:0], box, &nonce, &key) - if !ok { - t.Errorf("%d: failed to open box", msgLen) - continue - } - - if !bytes.Equal(opened, message) { - t.Errorf("%d: got %x, expected %x", msgLen, opened, message) - continue - } - } - - for i := range box { - box[i] ^= 0x20 - _, ok := Open(opened[:0], box, &nonce, &key) - if ok { - t.Errorf("box was opened after corrupting byte %d", i) - } - box[i] ^= 0x20 - } -} - -func TestSecretBox(t *testing.T) { - var key [32]byte - var nonce [24]byte - var message [64]byte - - for i := range key[:] { - key[i] = 1 - } - for i := range nonce[:] { - nonce[i] = 2 - } - for i := range message[:] { - message[i] = 3 - } - - box := Seal(nil, message[:], &nonce, &key) - // expected was generated using the C implementation of NaCl. - expected, _ := hex.DecodeString("8442bc313f4626f1359e3b50122b6ce6fe66ddfe7d39d14e637eb4fd5b45beadab55198df6ab5368439792a23c87db70acb6156dc5ef957ac04f6276cf6093b84be77ff0849cc33e34b7254d5a8f65ad") - - if !bytes.Equal(box, expected) { - t.Fatalf("box didn't match, got\n%x\n, expected\n%x", box, expected) - } -} - -func TestAppend(t *testing.T) { - var key [32]byte - var nonce [24]byte - var message [8]byte - - out := make([]byte, 4) - box := Seal(out, message[:], &nonce, &key) - if !bytes.Equal(box[:4], out[:4]) { - t.Fatalf("Seal didn't correctly append") - } - - out = make([]byte, 4, 100) - box = Seal(out, message[:], &nonce, &key) - if !bytes.Equal(box[:4], out[:4]) { - t.Fatalf("Seal didn't correctly append with sufficient capacity.") - } -} - -func benchmarkSealSize(b *testing.B, size int) { - message := make([]byte, size) - out := make([]byte, size+Overhead) - var nonce [24]byte - var key [32]byte - - b.SetBytes(int64(size)) - b.ResetTimer() - - for i := 0; i < b.N; i++ { - out = Seal(out[:0], message, &nonce, &key) - } -} - -func BenchmarkSeal8Bytes(b *testing.B) { - benchmarkSealSize(b, 8) -} - -func BenchmarkSeal100Bytes(b *testing.B) { - benchmarkSealSize(b, 100) -} - -func BenchmarkSeal1K(b *testing.B) { - benchmarkSealSize(b, 1024) -} - -func BenchmarkSeal8K(b *testing.B) { - benchmarkSealSize(b, 8192) -} - -func benchmarkOpenSize(b *testing.B, size int) { - msg := make([]byte, size) - result := make([]byte, size) - var nonce [24]byte - var key [32]byte - box := Seal(nil, msg, &nonce, &key) - - b.SetBytes(int64(size)) - b.ResetTimer() - - for i := 0; i < b.N; i++ { - if _, ok := Open(result[:0], box, &nonce, &key); !ok { - panic("Open failed") - } - } -} - -func BenchmarkOpen8Bytes(b *testing.B) { - benchmarkOpenSize(b, 8) -} - -func BenchmarkOpen100Bytes(b *testing.B) { - benchmarkOpenSize(b, 100) -} - -func BenchmarkOpen1K(b *testing.B) { - benchmarkOpenSize(b, 1024) -} - -func BenchmarkOpen8K(b *testing.B) { - benchmarkOpenSize(b, 8192) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign.go deleted file mode 100644 index c0ba96d2ee..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign.go +++ /dev/null @@ -1,83 +0,0 @@ -// 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 sign signs small messages using public-key cryptography. -// -// Sign uses Ed25519 to sign messages. The length of messages is not hidden. -// Messages should be small because: -// 1. The whole message needs to be held in memory to be processed. -// 2. Using large messages pressures implementations on small machines to process -// plaintext without verifying the signature. This is very dangerous, and this API -// discourages it, but a protocol that uses excessive message sizes might present -// some implementations with no other choice. -// 3. Performance may be improved by working with messages that fit into data caches. -// Thus large amounts of data should be chunked so that each message is small. -// -// This package is not interoperable with the current release of NaCl -// (https://nacl.cr.yp.to/sign.html), which does not support Ed25519 yet. However, -// it is compatible with the NaCl fork libsodium (https://www.libsodium.org), as well -// as TweetNaCl (https://tweetnacl.cr.yp.to/). -package sign - -import ( - "io" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" -) - -// Overhead is the number of bytes of overhead when signing a message. -const Overhead = 64 - -// GenerateKey generates a new public/private key pair suitable for use with -// Sign and Open. -func GenerateKey(rand io.Reader) (publicKey *[32]byte, privateKey *[64]byte, err error) { - pub, priv, err := ed25519.GenerateKey(rand) - if err != nil { - return nil, nil, err - } - publicKey, privateKey = new([32]byte), new([64]byte) - copy((*publicKey)[:], pub) - copy((*privateKey)[:], priv) - return publicKey, privateKey, nil -} - -// Sign appends a signed copy of message to out, which will be Overhead bytes -// longer than the original and must not overlap it. -func Sign(out, message []byte, privateKey *[64]byte) []byte { - sig := ed25519.Sign(ed25519.PrivateKey((*privateKey)[:]), message) - ret, out := sliceForAppend(out, Overhead+len(message)) - copy(out, sig) - copy(out[Overhead:], message) - return ret -} - -// Open verifies a signed message produced by Sign and appends the message to -// out, which must not overlap the signed message. The output will be Overhead -// bytes smaller than the signed message. -func Open(out, signedMessage []byte, publicKey *[32]byte) ([]byte, bool) { - if len(signedMessage) < Overhead { - return nil, false - } - if !ed25519.Verify(ed25519.PublicKey((*publicKey)[:]), signedMessage[Overhead:], signedMessage[:Overhead]) { - return nil, false - } - ret, out := sliceForAppend(out, len(signedMessage)-Overhead) - copy(out, signedMessage[Overhead:]) - return ret, true -} - -// sliceForAppend takes a slice and a requested number of bytes. It returns a -// slice with the contents of the given slice followed by that many bytes and a -// second slice that aliases into it and contains only the extra bytes. If the -// original slice has sufficient capacity then no allocation is performed. -func sliceForAppend(in []byte, n int) (head, tail []byte) { - if total := len(in) + n; cap(in) >= total { - head = in[:total] - } else { - head = make([]byte, total) - copy(head, in) - } - tail = head[len(in):] - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign_test.go deleted file mode 100644 index 0a6439a622..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/nacl/sign/sign_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// 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 sign - -import ( - "bytes" - "crypto/rand" - "encoding/hex" - "testing" -) - -var testSignedMessage, _ = hex.DecodeString("26a0a47f733d02ddb74589b6cbd6f64a7dab1947db79395a1a9e00e4c902c0f185b119897b89b248d16bab4ea781b5a3798d25c2984aec833dddab57e0891e0d68656c6c6f20776f726c64") -var testMessage = testSignedMessage[Overhead:] -var testPublicKey [32]byte -var testPrivateKey = [64]byte{ - 0x98, 0x3c, 0x6a, 0xa6, 0x21, 0xcc, 0xbb, 0xb2, 0xa7, 0xe8, 0x97, 0x94, 0xde, 0x5f, 0xf8, 0x11, - 0x8a, 0xf3, 0x33, 0x1a, 0x03, 0x5c, 0x43, 0x99, 0x03, 0x13, 0x2d, 0xd7, 0xb4, 0xc4, 0x8b, 0xb0, - 0xf6, 0x33, 0x20, 0xa3, 0x34, 0x8b, 0x7b, 0xe2, 0xfe, 0xb4, 0xe7, 0x3a, 0x54, 0x08, 0x2d, 0xd7, - 0x0c, 0xb7, 0xc0, 0xe3, 0xbf, 0x62, 0x6c, 0x55, 0xf0, 0x33, 0x28, 0x52, 0xf8, 0x48, 0x7d, 0xfd, -} - -func init() { - copy(testPublicKey[:], testPrivateKey[32:]) -} - -func TestSign(t *testing.T) { - signedMessage := Sign(nil, testMessage, &testPrivateKey) - if !bytes.Equal(signedMessage, testSignedMessage) { - t.Fatalf("signed message did not match, got\n%x\n, expected\n%x", signedMessage, testSignedMessage) - } -} - -func TestOpen(t *testing.T) { - message, ok := Open(nil, testSignedMessage, &testPublicKey) - if !ok { - t.Fatalf("valid signed message not successfully verified") - } - if !bytes.Equal(message, testMessage) { - t.Fatalf("message did not match, got\n%x\n, expected\n%x", message, testMessage) - } - message, ok = Open(nil, testSignedMessage[1:], &testPublicKey) - if ok { - t.Fatalf("invalid signed message successfully verified") - } - - badMessage := make([]byte, len(testSignedMessage)) - copy(badMessage, testSignedMessage) - badMessage[5] ^= 1 - if _, ok := Open(nil, badMessage, &testPublicKey); ok { - t.Fatalf("Open succeeded with a corrupt message") - } - - var badPublicKey [32]byte - copy(badPublicKey[:], testPublicKey[:]) - badPublicKey[5] ^= 1 - if _, ok := Open(nil, testSignedMessage, &badPublicKey); ok { - t.Fatalf("Open succeeded with a corrupt public key") - } -} - -func TestGenerateSignOpen(t *testing.T) { - publicKey, privateKey, _ := GenerateKey(rand.Reader) - signedMessage := Sign(nil, testMessage, privateKey) - message, ok := Open(nil, signedMessage, publicKey) - if !ok { - t.Fatalf("failed to verify signed message") - } - - if !bytes.Equal(message, testMessage) { - t.Fatalf("verified message does not match signed messge, got\n%x\n, expected\n%x", message, testMessage) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp.go deleted file mode 100644 index 687e73ce63..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp.go +++ /dev/null @@ -1,781 +0,0 @@ -// Copyright 2013 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 ocsp parses OCSP responses as specified in RFC 2560. OCSP responses -// are signed messages attesting to the validity of a certificate for a small -// period of time. This is used to manage revocation for X.509 certificates. -package ocsp - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - _ "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "errors" - "fmt" - "math/big" - "strconv" - "time" -) - -var idPKIXOCSPBasic = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 5, 5, 7, 48, 1, 1}) - -// ResponseStatus contains the result of an OCSP request. See -// https://tools.ietf.org/html/rfc6960#section-2.3 -type ResponseStatus int - -const ( - Success ResponseStatus = 0 - Malformed ResponseStatus = 1 - InternalError ResponseStatus = 2 - TryLater ResponseStatus = 3 - // Status code four is unused in OCSP. See - // https://tools.ietf.org/html/rfc6960#section-4.2.1 - SignatureRequired ResponseStatus = 5 - Unauthorized ResponseStatus = 6 -) - -func (r ResponseStatus) String() string { - switch r { - case Success: - return "success" - case Malformed: - return "malformed" - case InternalError: - return "internal error" - case TryLater: - return "try later" - case SignatureRequired: - return "signature required" - case Unauthorized: - return "unauthorized" - default: - return "unknown OCSP status: " + strconv.Itoa(int(r)) - } -} - -// ResponseError is an error that may be returned by ParseResponse to indicate -// that the response itself is an error, not just that its indicating that a -// certificate is revoked, unknown, etc. -type ResponseError struct { - Status ResponseStatus -} - -func (r ResponseError) Error() string { - return "ocsp: error from server: " + r.Status.String() -} - -// These are internal structures that reflect the ASN.1 structure of an OCSP -// response. See RFC 2560, section 4.2. - -type certID struct { - HashAlgorithm pkix.AlgorithmIdentifier - NameHash []byte - IssuerKeyHash []byte - SerialNumber *big.Int -} - -// https://tools.ietf.org/html/rfc2560#section-4.1.1 -type ocspRequest struct { - TBSRequest tbsRequest -} - -type tbsRequest struct { - Version int `asn1:"explicit,tag:0,default:0,optional"` - RequestorName pkix.RDNSequence `asn1:"explicit,tag:1,optional"` - RequestList []request -} - -type request struct { - Cert certID -} - -type responseASN1 struct { - Status asn1.Enumerated - Response responseBytes `asn1:"explicit,tag:0,optional"` -} - -type responseBytes struct { - ResponseType asn1.ObjectIdentifier - Response []byte -} - -type basicResponse struct { - TBSResponseData responseData - SignatureAlgorithm pkix.AlgorithmIdentifier - Signature asn1.BitString - Certificates []asn1.RawValue `asn1:"explicit,tag:0,optional"` -} - -type responseData struct { - Raw asn1.RawContent - Version int `asn1:"optional,default:0,explicit,tag:0"` - RawResponderID asn1.RawValue - ProducedAt time.Time `asn1:"generalized"` - Responses []singleResponse -} - -type singleResponse struct { - CertID certID - Good asn1.Flag `asn1:"tag:0,optional"` - Revoked revokedInfo `asn1:"tag:1,optional"` - Unknown asn1.Flag `asn1:"tag:2,optional"` - ThisUpdate time.Time `asn1:"generalized"` - NextUpdate time.Time `asn1:"generalized,explicit,tag:0,optional"` - SingleExtensions []pkix.Extension `asn1:"explicit,tag:1,optional"` -} - -type revokedInfo struct { - RevocationTime time.Time `asn1:"generalized"` - Reason asn1.Enumerated `asn1:"explicit,tag:0,optional"` -} - -var ( - oidSignatureMD2WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 2} - oidSignatureMD5WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4} - oidSignatureSHA1WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5} - oidSignatureSHA256WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11} - oidSignatureSHA384WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12} - oidSignatureSHA512WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 13} - oidSignatureDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 3} - oidSignatureDSAWithSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 3, 2} - oidSignatureECDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 1} - oidSignatureECDSAWithSHA256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 2} - oidSignatureECDSAWithSHA384 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 3} - oidSignatureECDSAWithSHA512 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 4} -) - -var hashOIDs = map[crypto.Hash]asn1.ObjectIdentifier{ - crypto.SHA1: asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}), - crypto.SHA256: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 1}), - crypto.SHA384: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 2}), - crypto.SHA512: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 3}), -} - -// TODO(rlb): This is also from crypto/x509, so same comment as AGL's below -var signatureAlgorithmDetails = []struct { - algo x509.SignatureAlgorithm - oid asn1.ObjectIdentifier - pubKeyAlgo x509.PublicKeyAlgorithm - hash crypto.Hash -}{ - {x509.MD2WithRSA, oidSignatureMD2WithRSA, x509.RSA, crypto.Hash(0) /* no value for MD2 */}, - {x509.MD5WithRSA, oidSignatureMD5WithRSA, x509.RSA, crypto.MD5}, - {x509.SHA1WithRSA, oidSignatureSHA1WithRSA, x509.RSA, crypto.SHA1}, - {x509.SHA256WithRSA, oidSignatureSHA256WithRSA, x509.RSA, crypto.SHA256}, - {x509.SHA384WithRSA, oidSignatureSHA384WithRSA, x509.RSA, crypto.SHA384}, - {x509.SHA512WithRSA, oidSignatureSHA512WithRSA, x509.RSA, crypto.SHA512}, - {x509.DSAWithSHA1, oidSignatureDSAWithSHA1, x509.DSA, crypto.SHA1}, - {x509.DSAWithSHA256, oidSignatureDSAWithSHA256, x509.DSA, crypto.SHA256}, - {x509.ECDSAWithSHA1, oidSignatureECDSAWithSHA1, x509.ECDSA, crypto.SHA1}, - {x509.ECDSAWithSHA256, oidSignatureECDSAWithSHA256, x509.ECDSA, crypto.SHA256}, - {x509.ECDSAWithSHA384, oidSignatureECDSAWithSHA384, x509.ECDSA, crypto.SHA384}, - {x509.ECDSAWithSHA512, oidSignatureECDSAWithSHA512, x509.ECDSA, crypto.SHA512}, -} - -// TODO(rlb): This is also from crypto/x509, so same comment as AGL's below -func signingParamsForPublicKey(pub interface{}, requestedSigAlgo x509.SignatureAlgorithm) (hashFunc crypto.Hash, sigAlgo pkix.AlgorithmIdentifier, err error) { - var pubType x509.PublicKeyAlgorithm - - switch pub := pub.(type) { - case *rsa.PublicKey: - pubType = x509.RSA - hashFunc = crypto.SHA256 - sigAlgo.Algorithm = oidSignatureSHA256WithRSA - sigAlgo.Parameters = asn1.RawValue{ - Tag: 5, - } - - case *ecdsa.PublicKey: - pubType = x509.ECDSA - - switch pub.Curve { - case elliptic.P224(), elliptic.P256(): - hashFunc = crypto.SHA256 - sigAlgo.Algorithm = oidSignatureECDSAWithSHA256 - case elliptic.P384(): - hashFunc = crypto.SHA384 - sigAlgo.Algorithm = oidSignatureECDSAWithSHA384 - case elliptic.P521(): - hashFunc = crypto.SHA512 - sigAlgo.Algorithm = oidSignatureECDSAWithSHA512 - default: - err = errors.New("x509: unknown elliptic curve") - } - - default: - err = errors.New("x509: only RSA and ECDSA keys supported") - } - - if err != nil { - return - } - - if requestedSigAlgo == 0 { - return - } - - found := false - for _, details := range signatureAlgorithmDetails { - if details.algo == requestedSigAlgo { - if details.pubKeyAlgo != pubType { - err = errors.New("x509: requested SignatureAlgorithm does not match private key type") - return - } - sigAlgo.Algorithm, hashFunc = details.oid, details.hash - if hashFunc == 0 { - err = errors.New("x509: cannot sign with hash function requested") - return - } - found = true - break - } - } - - if !found { - err = errors.New("x509: unknown SignatureAlgorithm") - } - - return -} - -// TODO(agl): this is taken from crypto/x509 and so should probably be exported -// from crypto/x509 or crypto/x509/pkix. -func getSignatureAlgorithmFromOID(oid asn1.ObjectIdentifier) x509.SignatureAlgorithm { - for _, details := range signatureAlgorithmDetails { - if oid.Equal(details.oid) { - return details.algo - } - } - return x509.UnknownSignatureAlgorithm -} - -// TODO(rlb): This is not taken from crypto/x509, but it's of the same general form. -func getHashAlgorithmFromOID(target asn1.ObjectIdentifier) crypto.Hash { - for hash, oid := range hashOIDs { - if oid.Equal(target) { - return hash - } - } - return crypto.Hash(0) -} - -func getOIDFromHashAlgorithm(target crypto.Hash) asn1.ObjectIdentifier { - for hash, oid := range hashOIDs { - if hash == target { - return oid - } - } - return nil -} - -// This is the exposed reflection of the internal OCSP structures. - -// The status values that can be expressed in OCSP. See RFC 6960. -const ( - // Good means that the certificate is valid. - Good = iota - // Revoked means that the certificate has been deliberately revoked. - Revoked - // Unknown means that the OCSP responder doesn't know about the certificate. - Unknown - // ServerFailed is unused and was never used (see - // https://go-review.googlesource.com/#/c/18944). ParseResponse will - // return a ResponseError when an error response is parsed. - ServerFailed -) - -// The enumerated reasons for revoking a certificate. See RFC 5280. -const ( - Unspecified = 0 - KeyCompromise = 1 - CACompromise = 2 - AffiliationChanged = 3 - Superseded = 4 - CessationOfOperation = 5 - CertificateHold = 6 - - RemoveFromCRL = 8 - PrivilegeWithdrawn = 9 - AACompromise = 10 -) - -// Request represents an OCSP request. See RFC 6960. -type Request struct { - HashAlgorithm crypto.Hash - IssuerNameHash []byte - IssuerKeyHash []byte - SerialNumber *big.Int -} - -// Marshal marshals the OCSP request to ASN.1 DER encoded form. -func (req *Request) Marshal() ([]byte, error) { - hashAlg := getOIDFromHashAlgorithm(req.HashAlgorithm) - if hashAlg == nil { - return nil, errors.New("Unknown hash algorithm") - } - return asn1.Marshal(ocspRequest{ - tbsRequest{ - Version: 0, - RequestList: []request{ - { - Cert: certID{ - pkix.AlgorithmIdentifier{ - Algorithm: hashAlg, - Parameters: asn1.RawValue{Tag: 5 /* ASN.1 NULL */}, - }, - req.IssuerNameHash, - req.IssuerKeyHash, - req.SerialNumber, - }, - }, - }, - }, - }) -} - -// Response represents an OCSP response containing a single SingleResponse. See -// RFC 6960. -type Response struct { - // Status is one of {Good, Revoked, Unknown} - Status int - SerialNumber *big.Int - ProducedAt, ThisUpdate, NextUpdate, RevokedAt time.Time - RevocationReason int - Certificate *x509.Certificate - // TBSResponseData contains the raw bytes of the signed response. If - // Certificate is nil then this can be used to verify Signature. - TBSResponseData []byte - Signature []byte - SignatureAlgorithm x509.SignatureAlgorithm - - // IssuerHash is the hash used to compute the IssuerNameHash and IssuerKeyHash. - // Valid values are crypto.SHA1, crypto.SHA256, crypto.SHA384, and crypto.SHA512. - // If zero, the default is crypto.SHA1. - IssuerHash crypto.Hash - - // RawResponderName optionally contains the DER-encoded subject of the - // responder certificate. Exactly one of RawResponderName and - // ResponderKeyHash is set. - RawResponderName []byte - // ResponderKeyHash optionally contains the SHA-1 hash of the - // responder's public key. Exactly one of RawResponderName and - // ResponderKeyHash is set. - ResponderKeyHash []byte - - // Extensions contains raw X.509 extensions from the singleExtensions field - // of the OCSP response. When parsing certificates, this can be used to - // extract non-critical extensions that are not parsed by this package. When - // marshaling OCSP responses, the Extensions field is ignored, see - // ExtraExtensions. - Extensions []pkix.Extension - - // ExtraExtensions contains extensions to be copied, raw, into any marshaled - // OCSP response (in the singleExtensions field). Values override any - // extensions that would otherwise be produced based on the other fields. The - // ExtraExtensions field is not populated when parsing certificates, see - // Extensions. - ExtraExtensions []pkix.Extension -} - -// These are pre-serialized error responses for the various non-success codes -// defined by OCSP. The Unauthorized code in particular can be used by an OCSP -// responder that supports only pre-signed responses as a response to requests -// for certificates with unknown status. See RFC 5019. -var ( - MalformedRequestErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x01} - InternalErrorErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x02} - TryLaterErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x03} - SigRequredErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x05} - UnauthorizedErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x06} -) - -// CheckSignatureFrom checks that the signature in resp is a valid signature -// from issuer. This should only be used if resp.Certificate is nil. Otherwise, -// the OCSP response contained an intermediate certificate that created the -// signature. That signature is checked by ParseResponse and only -// resp.Certificate remains to be validated. -func (resp *Response) CheckSignatureFrom(issuer *x509.Certificate) error { - return issuer.CheckSignature(resp.SignatureAlgorithm, resp.TBSResponseData, resp.Signature) -} - -// ParseError results from an invalid OCSP response. -type ParseError string - -func (p ParseError) Error() string { - return string(p) -} - -// ParseRequest parses an OCSP request in DER form. It only supports -// requests for a single certificate. Signed requests are not supported. -// If a request includes a signature, it will result in a ParseError. -func ParseRequest(bytes []byte) (*Request, error) { - var req ocspRequest - rest, err := asn1.Unmarshal(bytes, &req) - if err != nil { - return nil, err - } - if len(rest) > 0 { - return nil, ParseError("trailing data in OCSP request") - } - - if len(req.TBSRequest.RequestList) == 0 { - return nil, ParseError("OCSP request contains no request body") - } - innerRequest := req.TBSRequest.RequestList[0] - - hashFunc := getHashAlgorithmFromOID(innerRequest.Cert.HashAlgorithm.Algorithm) - if hashFunc == crypto.Hash(0) { - return nil, ParseError("OCSP request uses unknown hash function") - } - - return &Request{ - HashAlgorithm: hashFunc, - IssuerNameHash: innerRequest.Cert.NameHash, - IssuerKeyHash: innerRequest.Cert.IssuerKeyHash, - SerialNumber: innerRequest.Cert.SerialNumber, - }, nil -} - -// ParseResponse parses an OCSP response in DER form. It only supports -// responses for a single certificate. If the response contains a certificate -// then the signature over the response is checked. If issuer is not nil then -// it will be used to validate the signature or embedded certificate. -// -// Invalid responses and parse failures will result in a ParseError. -// Error responses will result in a ResponseError. -func ParseResponse(bytes []byte, issuer *x509.Certificate) (*Response, error) { - return ParseResponseForCert(bytes, nil, issuer) -} - -// ParseResponseForCert parses an OCSP response in DER form and searches for a -// Response relating to cert. If such a Response is found and the OCSP response -// contains a certificate then the signature over the response is checked. If -// issuer is not nil then it will be used to validate the signature or embedded -// certificate. -// -// Invalid responses and parse failures will result in a ParseError. -// Error responses will result in a ResponseError. -func ParseResponseForCert(bytes []byte, cert, issuer *x509.Certificate) (*Response, error) { - var resp responseASN1 - rest, err := asn1.Unmarshal(bytes, &resp) - if err != nil { - return nil, err - } - if len(rest) > 0 { - return nil, ParseError("trailing data in OCSP response") - } - - if status := ResponseStatus(resp.Status); status != Success { - return nil, ResponseError{status} - } - - if !resp.Response.ResponseType.Equal(idPKIXOCSPBasic) { - return nil, ParseError("bad OCSP response type") - } - - var basicResp basicResponse - rest, err = asn1.Unmarshal(resp.Response.Response, &basicResp) - if err != nil { - return nil, err - } - - if n := len(basicResp.TBSResponseData.Responses); n == 0 || cert == nil && n > 1 { - return nil, ParseError("OCSP response contains bad number of responses") - } - - var singleResp singleResponse - if cert == nil { - singleResp = basicResp.TBSResponseData.Responses[0] - } else { - match := false - for _, resp := range basicResp.TBSResponseData.Responses { - if cert.SerialNumber.Cmp(resp.CertID.SerialNumber) == 0 { - singleResp = resp - match = true - break - } - } - if !match { - return nil, ParseError("no response matching the supplied certificate") - } - } - - ret := &Response{ - TBSResponseData: basicResp.TBSResponseData.Raw, - Signature: basicResp.Signature.RightAlign(), - SignatureAlgorithm: getSignatureAlgorithmFromOID(basicResp.SignatureAlgorithm.Algorithm), - Extensions: singleResp.SingleExtensions, - SerialNumber: singleResp.CertID.SerialNumber, - ProducedAt: basicResp.TBSResponseData.ProducedAt, - ThisUpdate: singleResp.ThisUpdate, - NextUpdate: singleResp.NextUpdate, - } - - // Handle the ResponderID CHOICE tag. ResponderID can be flattened into - // TBSResponseData once https://go-review.googlesource.com/34503 has been - // released. - rawResponderID := basicResp.TBSResponseData.RawResponderID - switch rawResponderID.Tag { - case 1: // Name - var rdn pkix.RDNSequence - if rest, err := asn1.Unmarshal(rawResponderID.Bytes, &rdn); err != nil || len(rest) != 0 { - return nil, ParseError("invalid responder name") - } - ret.RawResponderName = rawResponderID.Bytes - case 2: // KeyHash - if rest, err := asn1.Unmarshal(rawResponderID.Bytes, &ret.ResponderKeyHash); err != nil || len(rest) != 0 { - return nil, ParseError("invalid responder key hash") - } - default: - return nil, ParseError("invalid responder id tag") - } - - if len(basicResp.Certificates) > 0 { - // Responders should only send a single certificate (if they - // send any) that connects the responder's certificate to the - // original issuer. We accept responses with multiple - // certificates due to a number responders sending them[1], but - // ignore all but the first. - // - // [1] https://github.com/golang/go/issues/21527 - ret.Certificate, err = x509.ParseCertificate(basicResp.Certificates[0].FullBytes) - if err != nil { - return nil, err - } - - if err := ret.CheckSignatureFrom(ret.Certificate); err != nil { - return nil, ParseError("bad signature on embedded certificate: " + err.Error()) - } - - if issuer != nil { - if err := issuer.CheckSignature(ret.Certificate.SignatureAlgorithm, ret.Certificate.RawTBSCertificate, ret.Certificate.Signature); err != nil { - return nil, ParseError("bad OCSP signature: " + err.Error()) - } - } - } else if issuer != nil { - if err := ret.CheckSignatureFrom(issuer); err != nil { - return nil, ParseError("bad OCSP signature: " + err.Error()) - } - } - - for _, ext := range singleResp.SingleExtensions { - if ext.Critical { - return nil, ParseError("unsupported critical extension") - } - } - - for h, oid := range hashOIDs { - if singleResp.CertID.HashAlgorithm.Algorithm.Equal(oid) { - ret.IssuerHash = h - break - } - } - if ret.IssuerHash == 0 { - return nil, ParseError("unsupported issuer hash algorithm") - } - - switch { - case bool(singleResp.Good): - ret.Status = Good - case bool(singleResp.Unknown): - ret.Status = Unknown - default: - ret.Status = Revoked - ret.RevokedAt = singleResp.Revoked.RevocationTime - ret.RevocationReason = int(singleResp.Revoked.Reason) - } - - return ret, nil -} - -// RequestOptions contains options for constructing OCSP requests. -type RequestOptions struct { - // Hash contains the hash function that should be used when - // constructing the OCSP request. If zero, SHA-1 will be used. - Hash crypto.Hash -} - -func (opts *RequestOptions) hash() crypto.Hash { - if opts == nil || opts.Hash == 0 { - // SHA-1 is nearly universally used in OCSP. - return crypto.SHA1 - } - return opts.Hash -} - -// CreateRequest returns a DER-encoded, OCSP request for the status of cert. If -// opts is nil then sensible defaults are used. -func CreateRequest(cert, issuer *x509.Certificate, opts *RequestOptions) ([]byte, error) { - hashFunc := opts.hash() - - // OCSP seems to be the only place where these raw hash identifiers are - // used. I took the following from - // http://msdn.microsoft.com/en-us/library/ff635603.aspx - _, ok := hashOIDs[hashFunc] - if !ok { - return nil, x509.ErrUnsupportedAlgorithm - } - - if !hashFunc.Available() { - return nil, x509.ErrUnsupportedAlgorithm - } - h := opts.hash().New() - - var publicKeyInfo struct { - Algorithm pkix.AlgorithmIdentifier - PublicKey asn1.BitString - } - if _, err := asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo); err != nil { - return nil, err - } - - h.Write(publicKeyInfo.PublicKey.RightAlign()) - issuerKeyHash := h.Sum(nil) - - h.Reset() - h.Write(issuer.RawSubject) - issuerNameHash := h.Sum(nil) - - req := &Request{ - HashAlgorithm: hashFunc, - IssuerNameHash: issuerNameHash, - IssuerKeyHash: issuerKeyHash, - SerialNumber: cert.SerialNumber, - } - return req.Marshal() -} - -// CreateResponse returns a DER-encoded OCSP response with the specified contents. -// The fields in the response are populated as follows: -// -// The responder cert is used to populate the responder's name field, and the -// certificate itself is provided alongside the OCSP response signature. -// -// The issuer cert is used to puplate the IssuerNameHash and IssuerKeyHash fields. -// -// The template is used to populate the SerialNumber, Status, RevokedAt, -// RevocationReason, ThisUpdate, and NextUpdate fields. -// -// If template.IssuerHash is not set, SHA1 will be used. -// -// The ProducedAt date is automatically set to the current date, to the nearest minute. -func CreateResponse(issuer, responderCert *x509.Certificate, template Response, priv crypto.Signer) ([]byte, error) { - var publicKeyInfo struct { - Algorithm pkix.AlgorithmIdentifier - PublicKey asn1.BitString - } - if _, err := asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo); err != nil { - return nil, err - } - - if template.IssuerHash == 0 { - template.IssuerHash = crypto.SHA1 - } - hashOID := getOIDFromHashAlgorithm(template.IssuerHash) - if hashOID == nil { - return nil, errors.New("unsupported issuer hash algorithm") - } - - if !template.IssuerHash.Available() { - return nil, fmt.Errorf("issuer hash algorithm %v not linked into binary", template.IssuerHash) - } - h := template.IssuerHash.New() - h.Write(publicKeyInfo.PublicKey.RightAlign()) - issuerKeyHash := h.Sum(nil) - - h.Reset() - h.Write(issuer.RawSubject) - issuerNameHash := h.Sum(nil) - - innerResponse := singleResponse{ - CertID: certID{ - HashAlgorithm: pkix.AlgorithmIdentifier{ - Algorithm: hashOID, - Parameters: asn1.RawValue{Tag: 5 /* ASN.1 NULL */}, - }, - NameHash: issuerNameHash, - IssuerKeyHash: issuerKeyHash, - SerialNumber: template.SerialNumber, - }, - ThisUpdate: template.ThisUpdate.UTC(), - NextUpdate: template.NextUpdate.UTC(), - SingleExtensions: template.ExtraExtensions, - } - - switch template.Status { - case Good: - innerResponse.Good = true - case Unknown: - innerResponse.Unknown = true - case Revoked: - innerResponse.Revoked = revokedInfo{ - RevocationTime: template.RevokedAt.UTC(), - Reason: asn1.Enumerated(template.RevocationReason), - } - } - - rawResponderID := asn1.RawValue{ - Class: 2, // context-specific - Tag: 1, // Name (explicit tag) - IsCompound: true, - Bytes: responderCert.RawSubject, - } - tbsResponseData := responseData{ - Version: 0, - RawResponderID: rawResponderID, - ProducedAt: time.Now().Truncate(time.Minute).UTC(), - Responses: []singleResponse{innerResponse}, - } - - tbsResponseDataDER, err := asn1.Marshal(tbsResponseData) - if err != nil { - return nil, err - } - - hashFunc, signatureAlgorithm, err := signingParamsForPublicKey(priv.Public(), template.SignatureAlgorithm) - if err != nil { - return nil, err - } - - responseHash := hashFunc.New() - responseHash.Write(tbsResponseDataDER) - signature, err := priv.Sign(rand.Reader, responseHash.Sum(nil), hashFunc) - if err != nil { - return nil, err - } - - response := basicResponse{ - TBSResponseData: tbsResponseData, - SignatureAlgorithm: signatureAlgorithm, - Signature: asn1.BitString{ - Bytes: signature, - BitLength: 8 * len(signature), - }, - } - if template.Certificate != nil { - response.Certificates = []asn1.RawValue{ - {FullBytes: template.Certificate.Raw}, - } - } - responseDER, err := asn1.Marshal(response) - if err != nil { - return nil, err - } - - return asn1.Marshal(responseASN1{ - Status: asn1.Enumerated(Success), - Response: responseBytes{ - ResponseType: idPKIXOCSPBasic, - Response: responseDER, - }, - }) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp_test.go deleted file mode 100644 index 70b19764f5..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ocsp/ocsp_test.go +++ /dev/null @@ -1,875 +0,0 @@ -// Copyright 2013 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. - -// +build go1.7 - -package ocsp - -import ( - "bytes" - "crypto" - "crypto/sha1" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "encoding/hex" - "math/big" - "reflect" - "testing" - "time" -) - -func TestOCSPDecode(t *testing.T) { - responseBytes, _ := hex.DecodeString(ocspResponseHex) - resp, err := ParseResponse(responseBytes, nil) - if err != nil { - t.Fatal(err) - } - - responderCert, _ := hex.DecodeString(startComResponderCertHex) - responder, err := x509.ParseCertificate(responderCert) - if err != nil { - t.Fatal(err) - } - - expected := Response{ - Status: Good, - SerialNumber: big.NewInt(0x1d0fa), - RevocationReason: Unspecified, - ThisUpdate: time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC), - NextUpdate: time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC), - RawResponderName: responder.RawSubject, - } - - if !reflect.DeepEqual(resp.ThisUpdate, expected.ThisUpdate) { - t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, expected.ThisUpdate) - } - - if !reflect.DeepEqual(resp.NextUpdate, expected.NextUpdate) { - t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, expected.NextUpdate) - } - - if resp.Status != expected.Status { - t.Errorf("resp.Status: got %d, want %d", resp.Status, expected.Status) - } - - if resp.SerialNumber.Cmp(expected.SerialNumber) != 0 { - t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, expected.SerialNumber) - } - - if resp.RevocationReason != expected.RevocationReason { - t.Errorf("resp.RevocationReason: got %d, want %d", resp.RevocationReason, expected.RevocationReason) - } - - if !bytes.Equal(resp.RawResponderName, expected.RawResponderName) { - t.Errorf("resp.RawResponderName: got %x, want %x", resp.RawResponderName, expected.RawResponderName) - } - - if !bytes.Equal(resp.ResponderKeyHash, expected.ResponderKeyHash) { - t.Errorf("resp.ResponderKeyHash: got %x, want %x", resp.ResponderKeyHash, expected.ResponderKeyHash) - } -} - -func TestOCSPDecodeWithoutCert(t *testing.T) { - responseBytes, _ := hex.DecodeString(ocspResponseWithoutCertHex) - _, err := ParseResponse(responseBytes, nil) - if err != nil { - t.Error(err) - } -} - -func TestOCSPDecodeWithExtensions(t *testing.T) { - responseBytes, _ := hex.DecodeString(ocspResponseWithCriticalExtensionHex) - _, err := ParseResponse(responseBytes, nil) - if err == nil { - t.Error(err) - } - - responseBytes, _ = hex.DecodeString(ocspResponseWithExtensionHex) - response, err := ParseResponse(responseBytes, nil) - if err != nil { - t.Fatal(err) - } - - if len(response.Extensions) != 1 { - t.Errorf("len(response.Extensions): got %v, want %v", len(response.Extensions), 1) - } - - extensionBytes := response.Extensions[0].Value - expectedBytes, _ := hex.DecodeString(ocspExtensionValueHex) - if !bytes.Equal(extensionBytes, expectedBytes) { - t.Errorf("response.Extensions[0]: got %x, want %x", extensionBytes, expectedBytes) - } -} - -func TestOCSPSignature(t *testing.T) { - issuerCert, _ := hex.DecodeString(startComHex) - issuer, err := x509.ParseCertificate(issuerCert) - if err != nil { - t.Fatal(err) - } - - response, _ := hex.DecodeString(ocspResponseHex) - if _, err := ParseResponse(response, issuer); err != nil { - t.Error(err) - } -} - -func TestOCSPRequest(t *testing.T) { - leafCert, _ := hex.DecodeString(leafCertHex) - cert, err := x509.ParseCertificate(leafCert) - if err != nil { - t.Fatal(err) - } - - issuerCert, _ := hex.DecodeString(issuerCertHex) - issuer, err := x509.ParseCertificate(issuerCert) - if err != nil { - t.Fatal(err) - } - - request, err := CreateRequest(cert, issuer, nil) - if err != nil { - t.Fatal(err) - } - - expectedBytes, _ := hex.DecodeString(ocspRequestHex) - if !bytes.Equal(request, expectedBytes) { - t.Errorf("request: got %x, wanted %x", request, expectedBytes) - } - - decodedRequest, err := ParseRequest(expectedBytes) - if err != nil { - t.Fatal(err) - } - - if decodedRequest.HashAlgorithm != crypto.SHA1 { - t.Errorf("request.HashAlgorithm: got %v, want %v", decodedRequest.HashAlgorithm, crypto.SHA1) - } - - var publicKeyInfo struct { - Algorithm pkix.AlgorithmIdentifier - PublicKey asn1.BitString - } - _, err = asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo) - if err != nil { - t.Fatal(err) - } - - h := sha1.New() - h.Write(publicKeyInfo.PublicKey.RightAlign()) - issuerKeyHash := h.Sum(nil) - - h.Reset() - h.Write(issuer.RawSubject) - issuerNameHash := h.Sum(nil) - - if got := decodedRequest.IssuerKeyHash; !bytes.Equal(got, issuerKeyHash) { - t.Errorf("request.IssuerKeyHash: got %x, want %x", got, issuerKeyHash) - } - - if got := decodedRequest.IssuerNameHash; !bytes.Equal(got, issuerNameHash) { - t.Errorf("request.IssuerKeyHash: got %x, want %x", got, issuerNameHash) - } - - if got := decodedRequest.SerialNumber; got.Cmp(cert.SerialNumber) != 0 { - t.Errorf("request.SerialNumber: got %x, want %x", got, cert.SerialNumber) - } - - marshaledRequest, err := decodedRequest.Marshal() - if err != nil { - t.Fatal(err) - } - - if bytes.Compare(expectedBytes, marshaledRequest) != 0 { - t.Errorf( - "Marshaled request doesn't match expected: wanted %x, got %x", - expectedBytes, - marshaledRequest, - ) - } -} - -func TestOCSPResponse(t *testing.T) { - leafCert, _ := hex.DecodeString(leafCertHex) - leaf, err := x509.ParseCertificate(leafCert) - if err != nil { - t.Fatal(err) - } - - issuerCert, _ := hex.DecodeString(issuerCertHex) - issuer, err := x509.ParseCertificate(issuerCert) - if err != nil { - t.Fatal(err) - } - - responderCert, _ := hex.DecodeString(responderCertHex) - responder, err := x509.ParseCertificate(responderCert) - if err != nil { - t.Fatal(err) - } - - responderPrivateKeyDER, _ := hex.DecodeString(responderPrivateKeyHex) - responderPrivateKey, err := x509.ParsePKCS1PrivateKey(responderPrivateKeyDER) - if err != nil { - t.Fatal(err) - } - - extensionBytes, _ := hex.DecodeString(ocspExtensionValueHex) - extensions := []pkix.Extension{ - { - Id: ocspExtensionOID, - Critical: false, - Value: extensionBytes, - }, - } - - thisUpdate := time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC) - nextUpdate := time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC) - template := Response{ - Status: Revoked, - SerialNumber: leaf.SerialNumber, - ThisUpdate: thisUpdate, - NextUpdate: nextUpdate, - RevokedAt: thisUpdate, - RevocationReason: KeyCompromise, - Certificate: responder, - ExtraExtensions: extensions, - } - - template.IssuerHash = crypto.MD5 - _, err = CreateResponse(issuer, responder, template, responderPrivateKey) - if err == nil { - t.Fatal("CreateResponse didn't fail with non-valid template.IssuerHash value crypto.MD5") - } - - testCases := []struct { - name string - issuerHash crypto.Hash - }{ - {"Zero value", 0}, - {"crypto.SHA1", crypto.SHA1}, - {"crypto.SHA256", crypto.SHA256}, - {"crypto.SHA384", crypto.SHA384}, - {"crypto.SHA512", crypto.SHA512}, - } - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - template.IssuerHash = tc.issuerHash - responseBytes, err := CreateResponse(issuer, responder, template, responderPrivateKey) - if err != nil { - t.Fatalf("CreateResponse failed: %s", err) - } - - resp, err := ParseResponse(responseBytes, nil) - if err != nil { - t.Fatalf("ParseResponse failed: %s", err) - } - - if !reflect.DeepEqual(resp.ThisUpdate, template.ThisUpdate) { - t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, template.ThisUpdate) - } - - if !reflect.DeepEqual(resp.NextUpdate, template.NextUpdate) { - t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, template.NextUpdate) - } - - if !reflect.DeepEqual(resp.RevokedAt, template.RevokedAt) { - t.Errorf("resp.RevokedAt: got %v, want %v", resp.RevokedAt, template.RevokedAt) - } - - if !reflect.DeepEqual(resp.Extensions, template.ExtraExtensions) { - t.Errorf("resp.Extensions: got %v, want %v", resp.Extensions, template.ExtraExtensions) - } - - delay := time.Since(resp.ProducedAt) - if delay < -time.Hour || delay > time.Hour { - t.Errorf("resp.ProducedAt: got %s, want close to current time (%s)", resp.ProducedAt, time.Now()) - } - - if resp.Status != template.Status { - t.Errorf("resp.Status: got %d, want %d", resp.Status, template.Status) - } - - if resp.SerialNumber.Cmp(template.SerialNumber) != 0 { - t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, template.SerialNumber) - } - - if resp.RevocationReason != template.RevocationReason { - t.Errorf("resp.RevocationReason: got %d, want %d", resp.RevocationReason, template.RevocationReason) - } - - expectedHash := tc.issuerHash - if tc.issuerHash == 0 { - expectedHash = crypto.SHA1 - } - - if resp.IssuerHash != expectedHash { - t.Errorf("resp.IssuerHash: got %d, want %d", resp.IssuerHash, expectedHash) - } - }) - } -} - -func TestErrorResponse(t *testing.T) { - responseBytes, _ := hex.DecodeString(errorResponseHex) - _, err := ParseResponse(responseBytes, nil) - - respErr, ok := err.(ResponseError) - if !ok { - t.Fatalf("expected ResponseError from ParseResponse but got %#v", err) - } - if respErr.Status != Malformed { - t.Fatalf("expected Malformed status from ParseResponse but got %d", respErr.Status) - } -} - -func TestOCSPDecodeMultiResponse(t *testing.T) { - inclCert, _ := hex.DecodeString(ocspMultiResponseCertHex) - cert, err := x509.ParseCertificate(inclCert) - if err != nil { - t.Fatal(err) - } - - responseBytes, _ := hex.DecodeString(ocspMultiResponseHex) - resp, err := ParseResponseForCert(responseBytes, cert, nil) - if err != nil { - t.Fatal(err) - } - - if resp.SerialNumber.Cmp(cert.SerialNumber) != 0 { - t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, cert.SerialNumber) - } -} - -func TestOCSPDecodeMultiResponseWithoutMatchingCert(t *testing.T) { - wrongCert, _ := hex.DecodeString(startComHex) - cert, err := x509.ParseCertificate(wrongCert) - if err != nil { - t.Fatal(err) - } - - responseBytes, _ := hex.DecodeString(ocspMultiResponseHex) - _, err = ParseResponseForCert(responseBytes, cert, nil) - want := ParseError("no response matching the supplied certificate") - if err != want { - t.Errorf("err: got %q, want %q", err, want) - } -} - -// This OCSP response was taken from Thawte's public OCSP responder. -// To recreate: -// $ openssl s_client -tls1 -showcerts -servername www.google.com -connect www.google.com:443 -// Copy and paste the first certificate into /tmp/cert.crt and the second into -// /tmp/intermediate.crt -// $ openssl ocsp -issuer /tmp/intermediate.crt -cert /tmp/cert.crt -url http://ocsp.thawte.com -resp_text -respout /tmp/ocsp.der -// Then hex encode the result: -// $ python -c 'print file("/tmp/ocsp.der", "r").read().encode("hex")' - -const ocspResponseHex = "308206bc0a0100a08206b5308206b106092b0601050507300101048206a23082069e3081" + - "c9a14e304c310b300906035504061302494c31163014060355040a130d5374617274436f" + - "6d204c74642e312530230603550403131c5374617274436f6d20436c6173732031204f43" + - "5350205369676e6572180f32303130303730373137333531375a30663064303c30090605" + - "2b0e03021a050004146568874f40750f016a3475625e1f5c93e5a26d580414eb4234d098" + - "b0ab9ff41b6b08f7cc642eef0e2c45020301d0fa8000180f323031303037303731353031" + - "30355aa011180f32303130303730373138333531375a300d06092a864886f70d01010505" + - "000382010100ab557ff070d1d7cebbb5f0ec91a15c3fed22eb2e1b8244f1b84545f013a4" + - "fb46214c5e3fbfbebb8a56acc2b9db19f68fd3c3201046b3824d5ba689f99864328710cb" + - "467195eb37d84f539e49f859316b32964dc3e47e36814ce94d6c56dd02733b1d0802f7ff" + - "4eebdbbd2927dcf580f16cbc290f91e81b53cb365e7223f1d6e20a88ea064104875e0145" + - "672b20fc14829d51ca122f5f5d77d3ad6c83889c55c7dc43680ba2fe3cef8b05dbcabdc0" + - "d3e09aaf9725597f8c858c2fa38c0d6aed2e6318194420dd1a1137445d13e1c97ab47896" + - "17a4e08925f46f867b72e3a4dc1f08cb870b2b0717f7207faa0ac512e628a029aba7457a" + - "e63dcf3281e2162d9349a08204ba308204b6308204b23082039aa003020102020101300d" + - "06092a864886f70d010105050030818c310b300906035504061302494c31163014060355" + - "040a130d5374617274436f6d204c74642e312b3029060355040b13225365637572652044" + - "69676974616c204365727469666963617465205369676e696e6731383036060355040313" + - "2f5374617274436f6d20436c6173732031205072696d61727920496e7465726d65646961" + - "746520536572766572204341301e170d3037313032353030323330365a170d3132313032" + - "333030323330365a304c310b300906035504061302494c31163014060355040a130d5374" + - "617274436f6d204c74642e312530230603550403131c5374617274436f6d20436c617373" + - "2031204f435350205369676e657230820122300d06092a864886f70d0101010500038201" + - "0f003082010a0282010100b9561b4c45318717178084e96e178df2255e18ed8d8ecc7c2b" + - "7b51a6c1c2e6bf0aa3603066f132fe10ae97b50e99fa24b83fc53dd2777496387d14e1c3" + - "a9b6a4933e2ac12413d085570a95b8147414a0bc007c7bcf222446ef7f1a156d7ea1c577" + - "fc5f0facdfd42eb0f5974990cb2f5cefebceef4d1bdc7ae5c1075c5a99a93171f2b0845b" + - "4ff0864e973fcfe32f9d7511ff87a3e943410c90a4493a306b6944359340a9ca96f02b66" + - "ce67f028df2980a6aaee8d5d5d452b8b0eb93f923cc1e23fcccbdbe7ffcb114d08fa7a6a" + - "3c404f825d1a0e715935cf623a8c7b59670014ed0622f6089a9447a7a19010f7fe58f841" + - "29a2765ea367824d1c3bb2fda308530203010001a382015c30820158300c0603551d1301" + - "01ff04023000300b0603551d0f0404030203a8301e0603551d250417301506082b060105" + - "0507030906092b0601050507300105301d0603551d0e0416041445e0a36695414c5dd449" + - "bc00e33cdcdbd2343e173081a80603551d230481a030819d8014eb4234d098b0ab9ff41b" + - "6b08f7cc642eef0e2c45a18181a47f307d310b300906035504061302494c311630140603" + - "55040a130d5374617274436f6d204c74642e312b3029060355040b132253656375726520" + - "4469676974616c204365727469666963617465205369676e696e67312930270603550403" + - "13205374617274436f6d2043657274696669636174696f6e20417574686f726974798201" + - "0a30230603551d12041c301a8618687474703a2f2f7777772e737461727473736c2e636f" + - "6d2f302c06096086480186f842010d041f161d5374617274436f6d205265766f63617469" + - "6f6e20417574686f72697479300d06092a864886f70d01010505000382010100182d2215" + - "8f0fc0291324fa8574c49bb8ff2835085adcbf7b7fc4191c397ab6951328253fffe1e5ec" + - "2a7da0d50fca1a404e6968481366939e666c0a6209073eca57973e2fefa9ed1718e8176f" + - "1d85527ff522c08db702e3b2b180f1cbff05d98128252cf0f450f7dd2772f4188047f19d" + - "c85317366f94bc52d60f453a550af58e308aaab00ced33040b62bf37f5b1ab2a4f7f0f80" + - "f763bf4d707bc8841d7ad9385ee2a4244469260b6f2bf085977af9074796048ecc2f9d48" + - "a1d24ce16e41a9941568fec5b42771e118f16c106a54ccc339a4b02166445a167902e75e" + - "6d8620b0825dcd18a069b90fd851d10fa8effd409deec02860d26d8d833f304b10669b42" - -const startComResponderCertHex = "308204b23082039aa003020102020101300d06092a864886f70d010105050030818c310b" + - "300906035504061302494c31163014060355040a130d5374617274436f6d204c74642e31" + - "2b3029060355040b1322536563757265204469676974616c204365727469666963617465" + - "205369676e696e67313830360603550403132f5374617274436f6d20436c617373203120" + - "5072696d61727920496e7465726d65646961746520536572766572204341301e170d3037" + - "313032353030323330365a170d3132313032333030323330365a304c310b300906035504" + - "061302494c31163014060355040a130d5374617274436f6d204c74642e31253023060355" + - "0403131c5374617274436f6d20436c6173732031204f435350205369676e657230820122" + - "300d06092a864886f70d01010105000382010f003082010a0282010100b9561b4c453187" + - "17178084e96e178df2255e18ed8d8ecc7c2b7b51a6c1c2e6bf0aa3603066f132fe10ae97" + - "b50e99fa24b83fc53dd2777496387d14e1c3a9b6a4933e2ac12413d085570a95b8147414" + - "a0bc007c7bcf222446ef7f1a156d7ea1c577fc5f0facdfd42eb0f5974990cb2f5cefebce" + - "ef4d1bdc7ae5c1075c5a99a93171f2b0845b4ff0864e973fcfe32f9d7511ff87a3e94341" + - "0c90a4493a306b6944359340a9ca96f02b66ce67f028df2980a6aaee8d5d5d452b8b0eb9" + - "3f923cc1e23fcccbdbe7ffcb114d08fa7a6a3c404f825d1a0e715935cf623a8c7b596700" + - "14ed0622f6089a9447a7a19010f7fe58f84129a2765ea367824d1c3bb2fda30853020301" + - "0001a382015c30820158300c0603551d130101ff04023000300b0603551d0f0404030203" + - "a8301e0603551d250417301506082b0601050507030906092b0601050507300105301d06" + - "03551d0e0416041445e0a36695414c5dd449bc00e33cdcdbd2343e173081a80603551d23" + - "0481a030819d8014eb4234d098b0ab9ff41b6b08f7cc642eef0e2c45a18181a47f307d31" + - "0b300906035504061302494c31163014060355040a130d5374617274436f6d204c74642e" + - "312b3029060355040b1322536563757265204469676974616c2043657274696669636174" + - "65205369676e696e6731293027060355040313205374617274436f6d2043657274696669" + - "636174696f6e20417574686f7269747982010a30230603551d12041c301a861868747470" + - "3a2f2f7777772e737461727473736c2e636f6d2f302c06096086480186f842010d041f16" + - "1d5374617274436f6d205265766f636174696f6e20417574686f72697479300d06092a86" + - "4886f70d01010505000382010100182d22158f0fc0291324fa8574c49bb8ff2835085adc" + - "bf7b7fc4191c397ab6951328253fffe1e5ec2a7da0d50fca1a404e6968481366939e666c" + - "0a6209073eca57973e2fefa9ed1718e8176f1d85527ff522c08db702e3b2b180f1cbff05" + - "d98128252cf0f450f7dd2772f4188047f19dc85317366f94bc52d60f453a550af58e308a" + - "aab00ced33040b62bf37f5b1ab2a4f7f0f80f763bf4d707bc8841d7ad9385ee2a4244469" + - "260b6f2bf085977af9074796048ecc2f9d48a1d24ce16e41a9941568fec5b42771e118f1" + - "6c106a54ccc339a4b02166445a167902e75e6d8620b0825dcd18a069b90fd851d10fa8ef" + - "fd409deec02860d26d8d833f304b10669b42" - -const startComHex = "308206343082041ca003020102020118300d06092a864886f70d0101050500307d310b30" + - "0906035504061302494c31163014060355040a130d5374617274436f6d204c74642e312b" + - "3029060355040b1322536563757265204469676974616c20436572746966696361746520" + - "5369676e696e6731293027060355040313205374617274436f6d20436572746966696361" + - "74696f6e20417574686f72697479301e170d3037313032343230353431375a170d313731" + - "3032343230353431375a30818c310b300906035504061302494c31163014060355040a13" + - "0d5374617274436f6d204c74642e312b3029060355040b13225365637572652044696769" + - "74616c204365727469666963617465205369676e696e67313830360603550403132f5374" + - "617274436f6d20436c6173732031205072696d61727920496e7465726d65646961746520" + - "53657276657220434130820122300d06092a864886f70d01010105000382010f00308201" + - "0a0282010100b689c6acef09527807ac9263d0f44418188480561f91aee187fa3250b4d3" + - "4706f0e6075f700e10f71dc0ce103634855a0f92ac83c6ac58523fba38e8fce7a724e240" + - "a60876c0926e9e2a6d4d3f6e61200adb59ded27d63b33e46fefa215118d7cd30a6ed076e" + - "3b7087b4f9faebee823c056f92f7a4dc0a301e9373fe07cad75f809d225852ae06da8b87" + - "2369b0e42ad8ea83d2bdf371db705a280faf5a387045123f304dcd3baf17e50fcba0a95d" + - "48aab16150cb34cd3c5cc30be810c08c9bf0030362feb26c3e720eee1c432ac9480e5739" + - "c43121c810c12c87fe5495521f523c31129b7fe7c0a0a559d5e28f3ef0d5a8e1d77031a9" + - "c4b3cfaf6d532f06f4a70203010001a38201ad308201a9300f0603551d130101ff040530" + - "030101ff300e0603551d0f0101ff040403020106301d0603551d0e04160414eb4234d098" + - "b0ab9ff41b6b08f7cc642eef0e2c45301f0603551d230418301680144e0bef1aa4405ba5" + - "17698730ca346843d041aef2306606082b06010505070101045a3058302706082b060105" + - "05073001861b687474703a2f2f6f6373702e737461727473736c2e636f6d2f6361302d06" + - "082b060105050730028621687474703a2f2f7777772e737461727473736c2e636f6d2f73" + - "667363612e637274305b0603551d1f045430523027a025a0238621687474703a2f2f7777" + - "772e737461727473736c2e636f6d2f73667363612e63726c3027a025a023862168747470" + - "3a2f2f63726c2e737461727473736c2e636f6d2f73667363612e63726c3081800603551d" + - "20047930773075060b2b0601040181b5370102013066302e06082b060105050702011622" + - "687474703a2f2f7777772e737461727473736c2e636f6d2f706f6c6963792e7064663034" + - "06082b060105050702011628687474703a2f2f7777772e737461727473736c2e636f6d2f" + - "696e7465726d6564696174652e706466300d06092a864886f70d01010505000382020100" + - "2109493ea5886ee00b8b48da314d8ff75657a2e1d36257e9b556f38545753be5501f048b" + - "e6a05a3ee700ae85d0fbff200364cbad02e1c69172f8a34dd6dee8cc3fa18aa2e37c37a7" + - "c64f8f35d6f4d66e067bdd21d9cf56ffcb302249fe8904f385e5aaf1e71fe875904dddf9" + - "46f74234f745580c110d84b0c6da5d3ef9019ee7e1da5595be741c7bfc4d144fac7e5547" + - "7d7bf4a50d491e95e8f712c1ccff76a62547d0f37535be97b75816ebaa5c786fec5330af" + - "ea044dcca902e3f0b60412f630b1113d904e5664d7dc3c435f7339ef4baf87ebf6fe6888" + - "4472ead207c669b0c1a18bef1749d761b145485f3b2021e95bb2ccf4d7e931f50b15613b" + - "7a94e3ebd9bc7f94ae6ae3626296a8647cb887f399327e92a252bebbf865cfc9f230fc8b" + - "c1c2a696d75f89e15c3480f58f47072fb491bfb1a27e5f4b5ad05b9f248605515a690365" + - "434971c5e06f94346bf61bd8a9b04c7e53eb8f48dfca33b548fa364a1a53a6330cd089cd" + - "4915cd89313c90c072d7654b52358a461144b93d8e2865a63e799e5c084429adb035112e" + - "214eb8d2e7103e5d8483b3c3c2e4d2c6fd094b7409ddf1b3d3193e800da20b19f038e7c5" + - "c2afe223db61e29d5c6e2089492e236ab262c145b49faf8ba7f1223bf87de290d07a19fb" + - "4a4ce3d27d5f4a8303ed27d6239e6b8db459a2d9ef6c8229dd75193c3f4c108defbb7527" + - "d2ae83a7a8ce5ba7" - -const ocspResponseWithoutCertHex = "308201d40a0100a08201cd308201c906092b0601050507300101048201ba3082" + - "01b630819fa2160414884451ff502a695e2d88f421bad90cf2cecbea7c180f3230313330" + - "3631383037323434335a30743072304a300906052b0e03021a0500041448b60d38238df8" + - "456e4ee5843ea394111802979f0414884451ff502a695e2d88f421bad90cf2cecbea7c02" + - "1100f78b13b946fc9635d8ab49de9d2148218000180f3230313330363138303732343433" + - "5aa011180f32303133303632323037323434335a300d06092a864886f70d010105050003" + - "82010100103e18b3d297a5e7a6c07a4fc52ac46a15c0eba96f3be17f0ffe84de5b8c8e05" + - "5a8f577586a849dc4abd6440eb6fedde4622451e2823c1cbf3558b4e8184959c9fe96eff" + - "8bc5f95866c58c6d087519faabfdae37e11d9874f1bc0db292208f645dd848185e4dd38b" + - "6a8547dfa7b74d514a8470015719064d35476b95bebb03d4d2845c5ca15202d2784878f2" + - "0f904c24f09736f044609e9c271381713400e563023d212db422236440c6f377bbf24b2b" + - "9e7dec8698e36a8df68b7592ad3489fb2937afb90eb85d2aa96b81c94c25057dbd4759d9" + - "20a1a65c7f0b6427a224b3c98edd96b9b61f706099951188b0289555ad30a216fb774651" + - "5a35fca2e054dfa8" - -// PKIX nonce extension -var ocspExtensionOID = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 48, 1, 2} -var ocspExtensionValueHex = "0403000000" - -const ocspResponseWithCriticalExtensionHex = "308204fe0a0100a08204f7308204f306092b0601050507300101048204e4308204e03081" + - "dba003020100a11b3019311730150603550403130e4f43535020526573706f6e64657218" + - "0f32303136303130343137303130305a3081a53081a23049300906052b0e03021a050004" + - "14c0fe0278fc99188891b3f212e9c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b21317" + - "7e6f8d157cd4f60210017f77deb3bcbb235d44ccc7dba62e72a116180f32303130303730" + - "373135303130355aa0030a0101180f32303130303730373135303130355aa011180f3230" + - "3130303730373138333531375aa1193017301506092b06010505073001020101ff040504" + - "03000000300d06092a864886f70d01010b0500038201010031c730ca60a7a0d92d8e4010" + - "911b469de95b4d27e89de6537552436237967694f76f701cf6b45c932bd308bca4a8d092" + - "5c604ba94796903091d9e6c000178e72c1f0a24a277dd262835af5d17d3f9d7869606c9f" + - "e7c8e708a41645699895beee38bfa63bb46296683761c5d1d65439b8ab868dc3017c9eeb" + - "b70b82dbf3a31c55b457d48bb9e82b335ed49f445042eaf606b06a3e0639824924c89c63" + - "eccddfe85e6694314138b2536f5e15e07085d0f6e26d4b2f8244bab0d70de07283ac6384" + - "a0501fc3dea7cf0adfd4c7f34871080900e252ddc403e3f0265f2a704af905d3727504ed" + - "28f3214a219d898a022463c78439799ca81c8cbafdbcec34ea937cd6a08202ea308202e6" + - "308202e2308201caa003020102020101300d06092a864886f70d01010b05003019311730" + - "150603550403130e4f43535020526573706f6e646572301e170d31353031333031353530" + - "33335a170d3136303133303135353033335a3019311730150603550403130e4f43535020" + - "526573706f6e64657230820122300d06092a864886f70d01010105000382010f00308201" + - "0a0282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616e" + - "c5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbc" + - "bec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b72" + - "3350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b898" + - "9ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d" + - "285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e6" + - "55b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31" + - "a77dcf920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030" + - "130603551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d" + - "06092a864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab8612" + - "31c15fd5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d2288" + - "9064f4aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f3267" + - "09dce52c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156" + - "d67156e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff5" + - "9e2005d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf9" + - "66705de17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d9" + - "3a25439a94299a65a709756c7a3e568be049d5c38839" - -const ocspResponseWithExtensionHex = "308204fb0a0100a08204f4308204f006092b0601050507300101048204e1308204dd3081" + - "d8a003020100a11b3019311730150603550403130e4f43535020526573706f6e64657218" + - "0f32303136303130343136353930305a3081a230819f3049300906052b0e03021a050004" + - "14c0fe0278fc99188891b3f212e9c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b21317" + - "7e6f8d157cd4f60210017f77deb3bcbb235d44ccc7dba62e72a116180f32303130303730" + - "373135303130355aa0030a0101180f32303130303730373135303130355aa011180f3230" + - "3130303730373138333531375aa1163014301206092b0601050507300102040504030000" + - "00300d06092a864886f70d01010b05000382010100c09a33e0b2324c852421bb83f85ac9" + - "9113f5426012bd2d2279a8166e9241d18a33c870894250622ffc7ed0c4601b16d624f90b" + - "779265442cdb6868cf40ab304ab4b66e7315ed02cf663b1601d1d4751772b31bc299db23" + - "9aebac78ed6797c06ed815a7a8d18d63cfbb609cafb47ec2e89e37db255216eb09307848" + - "d01be0a3e943653c78212b96ff524b74c9ec456b17cdfb950cc97645c577b2e09ff41dde" + - "b03afb3adaa381cc0f7c1d95663ef22a0f72f2c45613ae8e2b2d1efc96e8463c7d1d8a1d" + - "7e3b35df8fe73a301fc3f804b942b2b3afa337ff105fc1462b7b1c1d75eb4566c8665e59" + - "f80393b0adbf8004ff6c3327ed34f007cb4a3348a7d55e06e3a08202ea308202e6308202" + - "e2308201caa003020102020101300d06092a864886f70d01010b05003019311730150603" + - "550403130e4f43535020526573706f6e646572301e170d3135303133303135353033335a" + - "170d3136303133303135353033335a3019311730150603550403130e4f43535020526573" + - "706f6e64657230820122300d06092a864886f70d01010105000382010f003082010a0282" + - "010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616ec5265b" + - "56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbcbec75a" + - "70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b723350f0" + - "a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b8989ad0f6" + - "3aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d285b6a" + - "04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e655b104" + - "9a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31a77dcf" + - "920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030130603" + - "551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d06092a" + - "864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab861231c15f" + - "d5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d22889064f4" + - "aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f326709dce5" + - "2c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156d67156" + - "e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff59e2005" + - "d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf966705d" + - "e17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d93a2543" + - "9a94299a65a709756c7a3e568be049d5c38839" - -const ocspMultiResponseHex = "30820ee60a0100a0820edf30820edb06092b060105050730010104820ecc30820ec83082" + - "0839a216041445ac2ecd75f53f1cf6e4c51d3de0047ad0aa7465180f3230313530363032" + - "3130303033305a3082080c3065303d300906052b0e03021a05000414f7452a0080601527" + - "72e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204" + - "5456656a8000180f32303135303630323039303230375aa011180f323031353036303331" + - "30303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e7" + - "6e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456656b80" + - "00180f32303135303630323039303230375aa011180f3230313530363033313030303330" + - "5a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0" + - "f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456656c8000180f3230" + - "3135303630323039303230375aa011180f32303135303630333130303033305a3065303d" + - "300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414ed" + - "d8f2ee977252853a330b297a18f5c993853b3f02045456656d8000180f32303135303630" + - "323039303230375aa011180f32303135303630333130303033305a3065303d300906052b" + - "0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee9772" + - "52853a330b297a18f5c993853b3f02045456656e8000180f323031353036303230393032" + - "30375aa011180f32303135303630333130303033305a3065303d300906052b0e03021a05" + - "000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b" + - "297a18f5c993853b3f02045456656f8000180f32303135303630323039303230375aa011" + - "180f32303135303630333130303033305a3065303d300906052b0e03021a05000414f745" + - "2a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c9" + - "93853b3f0204545665708000180f32303135303630323039303230375aa011180f323031" + - "35303630333130303033305a3065303d300906052b0e03021a05000414f7452a00806015" + - "2772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02" + - "04545665718000180f32303135303630323039303230375aa011180f3230313530363033" + - "3130303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135" + - "e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f020454566572" + - "8000180f32303135303630323039303230375aa011180f32303135303630333130303033" + - "305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fd" + - "e0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204545665738000180f32" + - "303135303630323039303230375aa011180f32303135303630333130303033305a306530" + - "3d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414" + - "edd8f2ee977252853a330b297a18f5c993853b3f0204545665748000180f323031353036" + - "30323039303230375aa011180f32303135303630333130303033305a3065303d30090605" + - "2b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee97" + - "7252853a330b297a18f5c993853b3f0204545665758000180f3230313530363032303930" + - "3230375aa011180f32303135303630333130303033305a3065303d300906052b0e03021a" + - "05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a33" + - "0b297a18f5c993853b3f0204545665768000180f32303135303630323039303230375aa0" + - "11180f32303135303630333130303033305a3065303d300906052b0e03021a05000414f7" + - "452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5" + - "c993853b3f0204545665778000180f32303135303630323039303230375aa011180f3230" + - "3135303630333130303033305a3065303d300906052b0e03021a05000414f7452a008060" + - "152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f" + - "0204545665788000180f32303135303630323039303230375aa011180f32303135303630" + - "333130303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a1" + - "35e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204545665" + - "798000180f32303135303630323039303230375aa011180f323031353036303331303030" + - "33305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52" + - "fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456657a8000180f" + - "32303135303630323039303230375aa011180f32303135303630333130303033305a3065" + - "303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f15804" + - "14edd8f2ee977252853a330b297a18f5c993853b3f02045456657b8000180f3230313530" + - "3630323039303230375aa011180f32303135303630333130303033305a3065303d300906" + - "052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee" + - "977252853a330b297a18f5c993853b3f02045456657c8000180f32303135303630323039" + - "303230375aa011180f32303135303630333130303033305a3065303d300906052b0e0302" + - "1a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a" + - "330b297a18f5c993853b3f02045456657d8000180f32303135303630323039303230375a" + - "a011180f32303135303630333130303033305a300d06092a864886f70d01010505000382" + - "01010016b73b92859979f27d15eb018cf069eed39c3d280213565f3026de11ba15bdb94d" + - "764cf2d0fdd204ef926c588d7b183483c8a2b1995079c7ed04dcefcc650c1965be4b6832" + - "a8839e832f7f60f638425eccdf9bc3a81fbe700fda426ddf4f06c29bee431bbbe81effda" + - "a60b7da5b378f199af2f3c8380be7ba6c21c8e27124f8a4d8989926aea19055700848d33" + - "799e833512945fd75364edbd2dd18b783c1e96e332266b17979a0b88c35b43f47c87c493" + - "19155056ad8dbbae5ff2afad3c0e1c69ed111206ffda49875e8e4efc0926264823bc4423" + - "c8a002f34288c4bc22516f98f54fc609943721f590ddd8d24f989457526b599b0eb75cb5" + - "a80da1ad93a621a08205733082056f3082056b30820453a0030201020204545638c4300d" + - "06092a864886f70d01010b0500308182310b300906035504061302555331183016060355" + - "040a130f552e532e20476f7665726e6d656e7431233021060355040b131a446570617274" + - "6d656e74206f662074686520547265617375727931223020060355040b13194365727469" + - "6669636174696f6e20417574686f7269746965733110300e060355040b13074f43494f20" + - "4341301e170d3135303332303131353531335a170d3135303633303034303030305a3081" + - "98310b300906035504061302555331183016060355040a130f552e532e20476f7665726e" + - "6d656e7431233021060355040b131a4465706172746d656e74206f662074686520547265" + - "617375727931223020060355040b131943657274696669636174696f6e20417574686f72" + - "69746965733110300e060355040b13074f43494f204341311430120603550403130b4f43" + - "5350205369676e657230820122300d06092a864886f70d01010105000382010f00308201" + - "0a0282010100c1b6fe1ba1ad50bb98c855811acbd67fe68057f48b8e08d3800e7f2c51b7" + - "9e20551934971fd92b9c9e6c49453097927cba83a94c0b2fea7124ba5ac442b38e37dba6" + - "7303d4962dd7d92b22a04b0e0e182e9ea67620b1c6ce09ee607c19e0e6e3adae81151db1" + - "2bb7f706149349a292e21c1eb28565b6839df055e1a838a772ff34b5a1452618e2c26042" + - "705d53f0af4b57aae6163f58216af12f3887813fe44b0321827b3a0c52b0e47d0aab94a2" + - "f768ab0ba3901d22f8bb263823090b0e37a7f8856db4b0d165c42f3aa7e94f5f6ce1855e" + - "98dc57adea0ae98ad39f67ecdec00b88685566e9e8d69f6cefb6ddced53015d0d3b862bc" + - "be21f3d72251eefcec730203010001a38201cf308201cb300e0603551d0f0101ff040403" + - "020780306b0603551d2004643062300c060a60864801650302010502300c060a60864801" + - "650302010503300c060a60864801650302010504300c060a60864801650302010507300c" + - "060a60864801650302010508300c060a6086480165030201030d300c060a608648016503" + - "020103113081e506082b060105050701010481d83081d5303006082b0601050507300286" + - "24687474703a2f2f706b692e74726561732e676f762f746f63615f65655f6169612e7037" + - "633081a006082b060105050730028681936c6461703a2f2f6c6461702e74726561732e67" + - "6f762f6f753d4f43494f25323043412c6f753d43657274696669636174696f6e25323041" + - "7574686f7269746965732c6f753d4465706172746d656e742532306f6625323074686525" + - "323054726561737572792c6f3d552e532e253230476f7665726e6d656e742c633d55533f" + - "634143657274696669636174653b62696e61727930130603551d25040c300a06082b0601" + - "0505070309300f06092b060105050730010504020500301f0603551d23041830168014a2" + - "13a8e5c607546c243d4eb72b27a2a7711ab5af301d0603551d0e0416041451f98046818a" + - "e46d953ac90c210ccfaa1a06980c300d06092a864886f70d01010b050003820101003a37" + - "0b301d14ffdeb370883639bec5ae6f572dcbddadd672af16ee2a8303316b14e1fbdca8c2" + - "8f4bad9c7b1410250e149c14e9830ca6f17370a8d13151205d956e28c141cc0500379596" + - "c5b9239fcfa3d2de8f1d4f1a2b1bf2d1851bed1c86012ee8135bdc395cd4496ce69fadd0" + - "3b682b90350ca7b4f458190b7a0ab5c33a04cf1347a77d541877a380a4c94988c5658908" + - "44fdc22637a72b9fa410333e2caf969477f9fe07f50e3681c204fb3bf073b9da01cd8d91" + - "8044c40b1159955af12a3263ab1d34119d7f59bfa6cae88ed058addc4e08250263f8f836" + - "2f5bdffd45636fea7474c60a55c535954477b2f286e1b2535f0dd12c162f1b353c370e08" + - "be67" - -const ocspMultiResponseCertHex = "308207943082067ca003020102020454566573300d06092a864886f70d01010b05003081" + - "82310b300906035504061302555331183016060355040a130f552e532e20476f7665726e" + - "6d656e7431233021060355040b131a4465706172746d656e74206f662074686520547265" + - "617375727931223020060355040b131943657274696669636174696f6e20417574686f72" + - "69746965733110300e060355040b13074f43494f204341301e170d313530343130313535" + - "3733385a170d3138303431303136323733385a30819d310b300906035504061302555331" + - "183016060355040a130f552e532e20476f7665726e6d656e7431233021060355040b131a" + - "4465706172746d656e74206f662074686520547265617375727931253023060355040b13" + - "1c427572656175206f66207468652046697363616c20536572766963653110300e060355" + - "040b130744657669636573311630140603550403130d706b692e74726561732e676f7630" + - "820122300d06092a864886f70d01010105000382010f003082010a0282010100c7273623" + - "8c49c48bf501515a2490ef6e5ae0c06e0ad2aa9a6bb77f3d0370d846b2571581ebf38fd3" + - "1948daad3dec7a4da095f1dcbe9654e65bcf7acdfd4ee802421dad9b90536c721d2bca58" + - "8413e6bfd739a72470560bb7d64f9a09284f90ff8af1d5a3c5c84d0f95a00f9c6d988dd0" + - "d87f1d0d3344580901c955139f54d09de0acdbd3322b758cb0c58881bf04913243401f44" + - "013fd9f6d8348044cc8bb0a71978ad93366b2a4687a5274b2ee07d0fb40225453eb244ed" + - "b20152251ac77c59455260ff07eeceb3cb3c60fb8121cf92afd3daa2a4650e1942ccb555" + - "de10b3d481feb299838ef05d0fd1810b146753472ae80da65dd34da25ca1f89971f10039" + - "0203010001a38203f3308203ef300e0603551d0f0101ff0404030205a030170603551d20" + - "0410300e300c060a60864801650302010503301106096086480186f84201010404030206" + - "4030130603551d25040c300a06082b060105050703013082010806082b06010505070101" + - "0481fb3081f8303006082b060105050730028624687474703a2f2f706b692e7472656173" + - "2e676f762f746f63615f65655f6169612e7037633081a006082b06010505073002868193" + - "6c6461703a2f2f6c6461702e74726561732e676f762f6f753d4f43494f25323043412c6f" + - "753d43657274696669636174696f6e253230417574686f7269746965732c6f753d446570" + - "6172746d656e742532306f6625323074686525323054726561737572792c6f3d552e532e" + - "253230476f7665726e6d656e742c633d55533f634143657274696669636174653b62696e" + - "617279302106082b060105050730018615687474703a2f2f6f6373702e74726561732e67" + - "6f76307b0603551d1104743072811c6373612d7465616d4066697363616c2e7472656173" + - "7572792e676f768210706b692e74726561737572792e676f768210706b692e64696d632e" + - "6468732e676f76820d706b692e74726561732e676f76811f6563622d686f7374696e6740" + - "66697363616c2e74726561737572792e676f76308201890603551d1f048201803082017c" + - "3027a025a0238621687474703a2f2f706b692e74726561732e676f762f4f43494f5f4341" + - "332e63726c3082014fa082014ba0820147a48197308194310b3009060355040613025553" + - "31183016060355040a130f552e532e20476f7665726e6d656e7431233021060355040b13" + - "1a4465706172746d656e74206f662074686520547265617375727931223020060355040b" + - "131943657274696669636174696f6e20417574686f7269746965733110300e060355040b" + - "13074f43494f2043413110300e0603550403130743524c313430398681aa6c6461703a2f" + - "2f6c6461702e74726561732e676f762f636e3d43524c313430392c6f753d4f43494f2532" + - "3043412c6f753d43657274696669636174696f6e253230417574686f7269746965732c6f" + - "753d4465706172746d656e742532306f6625323074686525323054726561737572792c6f" + - "3d552e532e253230476f7665726e6d656e742c633d55533f636572746966696361746552" + - "65766f636174696f6e4c6973743b62696e617279302b0603551d1004243022800f323031" + - "35303431303135353733385a810f32303138303431303136323733385a301f0603551d23" + - "041830168014a213a8e5c607546c243d4eb72b27a2a7711ab5af301d0603551d0e041604" + - "14b0869c12c293914cd460e33ed43e6c5a26e0d68f301906092a864886f67d074100040c" + - "300a1b0456382e31030203a8300d06092a864886f70d01010b050003820101004968d182" + - "8f9efdc147e747bb5dda15536a42a079b32d3d7f87e619b483aeee70b7e26bda393c6028" + - "7c733ecb468fe8b8b11bf809ff76add6b90eb25ad8d3a1052e43ee281e48a3a1ebe7efb5" + - "9e2c4a48765dedeb23f5346242145786cc988c762d230d28dd33bf4c2405d80cbb2cb1d6" + - "4c8f10ba130d50cb174f6ffb9cfc12808297a2cefba385f4fad170f39b51ebd87c12abf9" + - "3c51fc000af90d8aaba78f48923908804a5eb35f617ccf71d201e3708a559e6d16f9f13e" + - "074361eb9007e28d86bb4e0bfa13aad0e9ddd9124e84519de60e2fc6040b18d9fd602b02" + - "684b4c071c3019fc842197d00c120c41654bcbfbc4a096a1c637b79112b81ce1fa3899f9" - -const ocspRequestHex = "3051304f304d304b3049300906052b0e03021a05000414c0fe0278fc99188891b3f212e9" + - "c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b213177e6f8d157cd4f60210017f77deb3" + - "bcbb235d44ccc7dba62e72" - -const leafCertHex = "308203c830820331a0030201020210017f77deb3bcbb235d44ccc7dba62e72300d06092a" + - "864886f70d01010505003081ba311f301d060355040a1316566572695369676e20547275" + - "7374204e6574776f726b31173015060355040b130e566572695369676e2c20496e632e31" + - "333031060355040b132a566572695369676e20496e7465726e6174696f6e616c20536572" + - "766572204341202d20436c617373203331493047060355040b13407777772e7665726973" + - "69676e2e636f6d2f43505320496e636f72702e6279205265662e204c494142494c495459" + - "204c54442e286329393720566572695369676e301e170d3132303632313030303030305a" + - "170d3133313233313233353935395a3068310b3009060355040613025553311330110603" + - "550408130a43616c69666f726e6961311230100603550407130950616c6f20416c746f31" + - "173015060355040a130e46616365626f6f6b2c20496e632e311730150603550403140e2a" + - "2e66616365626f6f6b2e636f6d30819f300d06092a864886f70d010101050003818d0030" + - "818902818100ae94b171e2deccc1693e051063240102e0689ae83c39b6b3e74b97d48d7b" + - "23689100b0b496ee62f0e6d356bcf4aa0f50643402f5d1766aa972835a7564723f39bbef" + - "5290ded9bcdbf9d3d55dfad23aa03dc604c54d29cf1d4b3bdbd1a809cfae47b44c7eae17" + - "c5109bee24a9cf4a8d911bb0fd0415ae4c3f430aa12a557e2ae10203010001a382011e30" + - "82011a30090603551d130402300030440603551d20043d303b3039060b6086480186f845" + - "01071703302a302806082b06010505070201161c68747470733a2f2f7777772e76657269" + - "7369676e2e636f6d2f727061303c0603551d1f043530333031a02fa02d862b687474703a" + - "2f2f535652496e746c2d63726c2e766572697369676e2e636f6d2f535652496e746c2e63" + - "726c301d0603551d250416301406082b0601050507030106082b06010505070302300b06" + - "03551d0f0404030205a0303406082b0601050507010104283026302406082b0601050507" + - "30018618687474703a2f2f6f6373702e766572697369676e2e636f6d30270603551d1104" + - "20301e820e2a2e66616365626f6f6b2e636f6d820c66616365626f6f6b2e636f6d300d06" + - "092a864886f70d0101050500038181005b6c2b75f8ed30aa51aad36aba595e555141951f" + - "81a53b447910ac1f76ff78fc2781616b58f3122afc1c87010425e9ed43df1a7ba6498060" + - "67e2688af03db58c7df4ee03309a6afc247ccb134dc33e54c6bc1d5133a532a73273b1d7" + - "9cadc08e7e1a83116d34523340b0305427a21742827c98916698ee7eaf8c3bdd71700817" - -const issuerCertHex = "30820383308202eca003020102021046fcebbab4d02f0f926098233f93078f300d06092a" + - "864886f70d0101050500305f310b300906035504061302555331173015060355040a130e" + - "566572695369676e2c20496e632e31373035060355040b132e436c617373203320507562" + - "6c6963205072696d6172792043657274696669636174696f6e20417574686f7269747930" + - "1e170d3937303431373030303030305a170d3136313032343233353935395a3081ba311f" + - "301d060355040a1316566572695369676e205472757374204e6574776f726b3117301506" + - "0355040b130e566572695369676e2c20496e632e31333031060355040b132a5665726953" + - "69676e20496e7465726e6174696f6e616c20536572766572204341202d20436c61737320" + - "3331493047060355040b13407777772e766572697369676e2e636f6d2f43505320496e63" + - "6f72702e6279205265662e204c494142494c495459204c54442e28632939372056657269" + - "5369676e30819f300d06092a864886f70d010101050003818d0030818902818100d88280" + - "e8d619027d1f85183925a2652be1bfd405d3bce6363baaf04c6c5bb6e7aa3c734555b2f1" + - "bdea9742ed9a340a15d4a95cf54025ddd907c132b2756cc4cabba3fe56277143aa63f530" + - "3e9328e5faf1093bf3b74d4e39f75c495ab8c11dd3b28afe70309542cbfe2b518b5a3c3a" + - "f9224f90b202a7539c4f34e7ab04b27b6f0203010001a381e33081e0300f0603551d1304" + - "0830060101ff02010030440603551d20043d303b3039060b6086480186f8450107010130" + - "2a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e" + - "636f6d2f43505330340603551d25042d302b06082b0601050507030106082b0601050507" + - "030206096086480186f8420401060a6086480186f845010801300b0603551d0f04040302" + - "0106301106096086480186f842010104040302010630310603551d1f042a30283026a024" + - "a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726c" + - "300d06092a864886f70d010105050003818100408e4997968a73dd8e4def3e61b7caa062" + - "adf40e0abb753de26ed82cc7bff4b98c369bcaa2d09c724639f6a682036511c4bcbf2da6" + - "f5d93b0ab598fab378b91ef22b4c62d5fdb27a1ddf33fd73f9a5d82d8c2aead1fcb028b6" + - "e94948134b838a1b487b24f738de6f4154b8ab576b06dfc7a2d4a9f6f136628088f28b75" + - "d68071" - -// Key and certificate for the OCSP responder were not taken from the Thawte -// responder, since CreateResponse requires that we have the private key. -// Instead, they were generated randomly. -const responderPrivateKeyHex = "308204a40201000282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef" + - "1099f0f6616ec5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df" + - "1701dc6ccfbcbec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074f" + - "fde8a99d5b723350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14" + - "c9fc0f27b8989ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa7" + - "7e7332971c7d285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f" + - "1290bafd97e655b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb9" + - "6222b12ace31a77dcf920334dc94581b02030100010282010100bcf0b93d7238bda329a8" + - "72e7149f61bcb37c154330ccb3f42a85c9002c2e2bdea039d77d8581cd19bed94078794e" + - "56293d601547fc4bf6a2f9002fe5772b92b21b254403b403585e3130cc99ccf08f0ef81a" + - "575b38f597ba4660448b54f44bfbb97072b5a2bf043bfeca828cf7741d13698e3f38162b" + - "679faa646b82abd9a72c5c7d722c5fc577a76d2c2daac588accad18516d1bbad10b0dfa2" + - "05cfe246b59e28608a43942e1b71b0c80498075121de5b900d727c31c42c78cf1db5c0aa" + - "5b491e10ea4ed5c0962aaf2ae025dd81fa4ce490d9d6b4a4465411d8e542fc88617e5695" + - "1aa4fc8ea166f2b4d0eb89ef17f2b206bd5f1014bf8fe0e71fe62f2cccf102818100f2dc" + - "ddf878d553286daad68bac4070a82ffec3dc4666a2750f47879eec913f91836f1d976b60" + - "daf9356e078446dafab5bd2e489e5d64f8572ba24a4ba4f3729b5e106c4dd831cc2497a7" + - "e6c7507df05cb64aeb1bbc81c1e340d58b5964cf39cff84ea30c29ec5d3f005ee1362698" + - "07395037955955655292c3e85f6187fa1f9502818100f4a33c102630840705f8c778a47b" + - "87e8da31e68809af981ac5e5999cf1551685d761cdf0d6520361b99aebd5777a940fa64d" + - "327c09fa63746fbb3247ec73a86edf115f1fe5c83598db803881ade71c33c6e956118345" + - "497b98b5e07bb5be75971465ec78f2f9467e1b74956ca9d4c7c3e314e742a72d8b33889c" + - "6c093a466cef0281801d3df0d02124766dd0be98349b19eb36a508c4e679e793ba0a8bef" + - "4d786888c1e9947078b1ea28938716677b4ad8c5052af12eb73ac194915264a913709a0b" + - "7b9f98d4a18edd781a13d49899f91c20dbd8eb2e61d991ba19b5cdc08893f5cb9d39e5a6" + - "0629ea16d426244673b1b3ee72bd30e41fac8395acac40077403de5efd028180050731dd" + - "d71b1a2b96c8d538ba90bb6b62c8b1c74c03aae9a9f59d21a7a82b0d572ef06fa9c807bf" + - "c373d6b30d809c7871df96510c577421d9860c7383fda0919ece19996b3ca13562159193" + - "c0c246471e287f975e8e57034e5136aaf44254e2650def3d51292474c515b1588969112e" + - "0a85cc77073e9d64d2c2fc497844284b02818100d71d63eabf416cf677401ebf965f8314" + - "120b568a57dd3bd9116c629c40dc0c6948bab3a13cc544c31c7da40e76132ef5dd3f7534" + - "45a635930c74326ae3df0edd1bfb1523e3aa259873ac7cf1ac31151ec8f37b528c275622" + - "48f99b8bed59fd4da2576aa6ee20d93a684900bf907e80c66d6e2261ae15e55284b4ed9d" + - "6bdaa059" - -const responderCertHex = "308202e2308201caa003020102020101300d06092a864886f70d01010b05003019311730" + - "150603550403130e4f43535020526573706f6e646572301e170d31353031333031353530" + - "33335a170d3136303133303135353033335a3019311730150603550403130e4f43535020" + - "526573706f6e64657230820122300d06092a864886f70d01010105000382010f00308201" + - "0a0282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616e" + - "c5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbc" + - "bec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b72" + - "3350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b898" + - "9ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d" + - "285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e6" + - "55b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31" + - "a77dcf920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030" + - "130603551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d" + - "06092a864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab8612" + - "31c15fd5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d2288" + - "9064f4aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f3267" + - "09dce52c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156" + - "d67156e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff5" + - "9e2005d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf9" + - "66705de17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d9" + - "3a25439a94299a65a709756c7a3e568be049d5c38839" - -const errorResponseHex = "30030a0101" diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor.go deleted file mode 100644 index 2c90cb236d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2010 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 armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is -// very similar to PEM except that it has an additional CRC checksum. -package armor - -import ( - "bufio" - "bytes" - "encoding/base64" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "io" -) - -// A Block represents an OpenPGP armored structure. -// -// The encoded form is: -// -----BEGIN Type----- -// Headers -// -// base64-encoded Bytes -// '=' base64 encoded checksum -// -----END Type----- -// where Headers is a possibly empty sequence of Key: Value lines. -// -// Since the armored data can be very large, this package presents a streaming -// interface. -type Block struct { - Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE"). - Header map[string]string // Optional headers. - Body io.Reader // A Reader from which the contents can be read - lReader lineReader - oReader openpgpReader -} - -var ArmorCorrupt error = errors.StructuralError("armor invalid") - -const crc24Init = 0xb704ce -const crc24Poly = 0x1864cfb -const crc24Mask = 0xffffff - -// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1 -func crc24(crc uint32, d []byte) uint32 { - for _, b := range d { - crc ^= uint32(b) << 16 - for i := 0; i < 8; i++ { - crc <<= 1 - if crc&0x1000000 != 0 { - crc ^= crc24Poly - } - } - } - return crc -} - -var armorStart = []byte("-----BEGIN ") -var armorEnd = []byte("-----END ") -var armorEndOfLine = []byte("-----") - -// lineReader wraps a line based reader. It watches for the end of an armor -// block and records the expected CRC value. -type lineReader struct { - in *bufio.Reader - buf []byte - eof bool - crc uint32 -} - -func (l *lineReader) Read(p []byte) (n int, err error) { - if l.eof { - return 0, io.EOF - } - - if len(l.buf) > 0 { - n = copy(p, l.buf) - l.buf = l.buf[n:] - return - } - - line, isPrefix, err := l.in.ReadLine() - if err != nil { - return - } - if isPrefix { - return 0, ArmorCorrupt - } - - if len(line) == 5 && line[0] == '=' { - // This is the checksum line - var expectedBytes [3]byte - var m int - m, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:]) - if m != 3 || err != nil { - return - } - l.crc = uint32(expectedBytes[0])<<16 | - uint32(expectedBytes[1])<<8 | - uint32(expectedBytes[2]) - - line, _, err = l.in.ReadLine() - if err != nil && err != io.EOF { - return - } - if !bytes.HasPrefix(line, armorEnd) { - return 0, ArmorCorrupt - } - - l.eof = true - return 0, io.EOF - } - - if len(line) > 96 { - return 0, ArmorCorrupt - } - - n = copy(p, line) - bytesToSave := len(line) - n - if bytesToSave > 0 { - if cap(l.buf) < bytesToSave { - l.buf = make([]byte, 0, bytesToSave) - } - l.buf = l.buf[0:bytesToSave] - copy(l.buf, line[n:]) - } - - return -} - -// openpgpReader passes Read calls to the underlying base64 decoder, but keeps -// a running CRC of the resulting data and checks the CRC against the value -// found by the lineReader at EOF. -type openpgpReader struct { - lReader *lineReader - b64Reader io.Reader - currentCRC uint32 -} - -func (r *openpgpReader) Read(p []byte) (n int, err error) { - n, err = r.b64Reader.Read(p) - r.currentCRC = crc24(r.currentCRC, p[:n]) - - if err == io.EOF { - if r.lReader.crc != uint32(r.currentCRC&crc24Mask) { - return 0, ArmorCorrupt - } - } - - return -} - -// Decode reads a PGP armored block from the given Reader. It will ignore -// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The -// given Reader is not usable after calling this function: an arbitrary amount -// of data may have been read past the end of the block. -func Decode(in io.Reader) (p *Block, err error) { - r := bufio.NewReaderSize(in, 100) - var line []byte - ignoreNext := false - -TryNextBlock: - p = nil - - // Skip leading garbage - for { - ignoreThis := ignoreNext - line, ignoreNext, err = r.ReadLine() - if err != nil { - return - } - if ignoreNext || ignoreThis { - continue - } - line = bytes.TrimSpace(line) - if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) { - break - } - } - - p = new(Block) - p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)]) - p.Header = make(map[string]string) - nextIsContinuation := false - var lastKey string - - // Read headers - for { - isContinuation := nextIsContinuation - line, nextIsContinuation, err = r.ReadLine() - if err != nil { - p = nil - return - } - if isContinuation { - p.Header[lastKey] += string(line) - continue - } - line = bytes.TrimSpace(line) - if len(line) == 0 { - break - } - - i := bytes.Index(line, []byte(": ")) - if i == -1 { - goto TryNextBlock - } - lastKey = string(line[:i]) - p.Header[lastKey] = string(line[i+2:]) - } - - p.lReader.in = r - p.oReader.currentCRC = crc24Init - p.oReader.lReader = &p.lReader - p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) - p.Body = &p.oReader - - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor_test.go deleted file mode 100644 index 9334e94e96..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/armor_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2010 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 armor - -import ( - "bytes" - "hash/adler32" - "io/ioutil" - "testing" -) - -func TestDecodeEncode(t *testing.T) { - buf := bytes.NewBuffer([]byte(armorExample1)) - result, err := Decode(buf) - if err != nil { - t.Error(err) - } - expectedType := "PGP SIGNATURE" - if result.Type != expectedType { - t.Errorf("result.Type: got:%s want:%s", result.Type, expectedType) - } - if len(result.Header) != 1 { - t.Errorf("len(result.Header): got:%d want:1", len(result.Header)) - } - v, ok := result.Header["Version"] - if !ok || v != "GnuPG v1.4.10 (GNU/Linux)" { - t.Errorf("result.Header: got:%#v", result.Header) - } - - contents, err := ioutil.ReadAll(result.Body) - if err != nil { - t.Error(err) - } - - if adler32.Checksum(contents) != 0x27b144be { - t.Errorf("contents: got: %x", contents) - } - - buf = bytes.NewBuffer(nil) - w, err := Encode(buf, result.Type, result.Header) - if err != nil { - t.Error(err) - } - _, err = w.Write(contents) - if err != nil { - t.Error(err) - } - w.Close() - - if !bytes.Equal(buf.Bytes(), []byte(armorExample1)) { - t.Errorf("got: %s\nwant: %s", string(buf.Bytes()), armorExample1) - } -} - -func TestLongHeader(t *testing.T) { - buf := bytes.NewBuffer([]byte(armorLongLine)) - result, err := Decode(buf) - if err != nil { - t.Error(err) - return - } - value, ok := result.Header["Version"] - if !ok { - t.Errorf("missing Version header") - } - if value != longValueExpected { - t.Errorf("got: %s want: %s", value, longValueExpected) - } -} - -const armorExample1 = `-----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.10 (GNU/Linux) - -iJwEAAECAAYFAk1Fv/0ACgkQo01+GMIMMbsYTwQAiAw+QAaNfY6WBdplZ/uMAccm -4g+81QPmTSGHnetSb6WBiY13kVzK4HQiZH8JSkmmroMLuGeJwsRTEL4wbjRyUKEt -p1xwUZDECs234F1xiG5enc5SGlRtP7foLBz9lOsjx+LEcA4sTl5/2eZR9zyFZqWW -TxRjs+fJCIFuo71xb1g= -=/teI ------END PGP SIGNATURE-----` - -const armorLongLine = `-----BEGIN PGP SIGNATURE----- -Version: 0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz - -iQEcBAABAgAGBQJMtFESAAoJEKsQXJGvOPsVj40H/1WW6jaMXv4BW+1ueDSMDwM8 -kx1fLOXbVM5/Kn5LStZNt1jWWnpxdz7eq3uiqeCQjmqUoRde3YbB2EMnnwRbAhpp -cacnAvy9ZQ78OTxUdNW1mhX5bS6q1MTEJnl+DcyigD70HG/yNNQD7sOPMdYQw0TA -byQBwmLwmTsuZsrYqB68QyLHI+DUugn+kX6Hd2WDB62DKa2suoIUIHQQCd/ofwB3 -WfCYInXQKKOSxu2YOg2Eb4kLNhSMc1i9uKUWAH+sdgJh7NBgdoE4MaNtBFkHXRvv -okWuf3+xA9ksp1npSY/mDvgHijmjvtpRDe6iUeqfCn8N9u9CBg8geANgaG8+QA4= -=wfQG ------END PGP SIGNATURE-----` - -const longValueExpected = "0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz" diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/encode.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/encode.go deleted file mode 100644 index 6f07582c37..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor/encode.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2010 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 armor - -import ( - "encoding/base64" - "io" -) - -var armorHeaderSep = []byte(": ") -var blockEnd = []byte("\n=") -var newline = []byte("\n") -var armorEndOfLineOut = []byte("-----\n") - -// writeSlices writes its arguments to the given Writer. -func writeSlices(out io.Writer, slices ...[]byte) (err error) { - for _, s := range slices { - _, err = out.Write(s) - if err != nil { - return err - } - } - return -} - -// lineBreaker breaks data across several lines, all of the same byte length -// (except possibly the last). Lines are broken with a single '\n'. -type lineBreaker struct { - lineLength int - line []byte - used int - out io.Writer - haveWritten bool -} - -func newLineBreaker(out io.Writer, lineLength int) *lineBreaker { - return &lineBreaker{ - lineLength: lineLength, - line: make([]byte, lineLength), - used: 0, - out: out, - } -} - -func (l *lineBreaker) Write(b []byte) (n int, err error) { - n = len(b) - - if n == 0 { - return - } - - if l.used == 0 && l.haveWritten { - _, err = l.out.Write([]byte{'\n'}) - if err != nil { - return - } - } - - if l.used+len(b) < l.lineLength { - l.used += copy(l.line[l.used:], b) - return - } - - l.haveWritten = true - _, err = l.out.Write(l.line[0:l.used]) - if err != nil { - return - } - excess := l.lineLength - l.used - l.used = 0 - - _, err = l.out.Write(b[0:excess]) - if err != nil { - return - } - - _, err = l.Write(b[excess:]) - return -} - -func (l *lineBreaker) Close() (err error) { - if l.used > 0 { - _, err = l.out.Write(l.line[0:l.used]) - if err != nil { - return - } - } - - return -} - -// encoding keeps track of a running CRC24 over the data which has been written -// to it and outputs a OpenPGP checksum when closed, followed by an armor -// trailer. -// -// It's built into a stack of io.Writers: -// encoding -> base64 encoder -> lineBreaker -> out -type encoding struct { - out io.Writer - breaker *lineBreaker - b64 io.WriteCloser - crc uint32 - blockType []byte -} - -func (e *encoding) Write(data []byte) (n int, err error) { - e.crc = crc24(e.crc, data) - return e.b64.Write(data) -} - -func (e *encoding) Close() (err error) { - err = e.b64.Close() - if err != nil { - return - } - e.breaker.Close() - - var checksumBytes [3]byte - checksumBytes[0] = byte(e.crc >> 16) - checksumBytes[1] = byte(e.crc >> 8) - checksumBytes[2] = byte(e.crc) - - var b64ChecksumBytes [4]byte - base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:]) - - return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine) -} - -// Encode returns a WriteCloser which will encode the data written to it in -// OpenPGP armor. -func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) { - bType := []byte(blockType) - err = writeSlices(out, armorStart, bType, armorEndOfLineOut) - if err != nil { - return - } - - for k, v := range headers { - err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline) - if err != nil { - return - } - } - - _, err = out.Write(newline) - if err != nil { - return - } - - e := &encoding{ - out: out, - breaker: newLineBreaker(out, 64), - crc: crc24Init, - blockType: bType, - } - e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker) - return e, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text.go deleted file mode 100644 index e601e389f1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2011 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 openpgp - -import "hash" - -// NewCanonicalTextHash reformats text written to it into the canonical -// form and then applies the hash h. See RFC 4880, section 5.2.1. -func NewCanonicalTextHash(h hash.Hash) hash.Hash { - return &canonicalTextHash{h, 0} -} - -type canonicalTextHash struct { - h hash.Hash - s int -} - -var newline = []byte{'\r', '\n'} - -func (cth *canonicalTextHash) Write(buf []byte) (int, error) { - start := 0 - - for i, c := range buf { - switch cth.s { - case 0: - if c == '\r' { - cth.s = 1 - } else if c == '\n' { - cth.h.Write(buf[start:i]) - cth.h.Write(newline) - start = i + 1 - } - case 1: - cth.s = 0 - } - } - - cth.h.Write(buf[start:]) - return len(buf), nil -} - -func (cth *canonicalTextHash) Sum(in []byte) []byte { - return cth.h.Sum(in) -} - -func (cth *canonicalTextHash) Reset() { - cth.h.Reset() - cth.s = 0 -} - -func (cth *canonicalTextHash) Size() int { - return cth.h.Size() -} - -func (cth *canonicalTextHash) BlockSize() int { - return cth.h.BlockSize() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text_test.go deleted file mode 100644 index 8f3ba2a881..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/canonical_text_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "bytes" - "testing" -) - -type recordingHash struct { - buf *bytes.Buffer -} - -func (r recordingHash) Write(b []byte) (n int, err error) { - return r.buf.Write(b) -} - -func (r recordingHash) Sum(in []byte) []byte { - return append(in, r.buf.Bytes()...) -} - -func (r recordingHash) Reset() { - panic("shouldn't be called") -} - -func (r recordingHash) Size() int { - panic("shouldn't be called") -} - -func (r recordingHash) BlockSize() int { - panic("shouldn't be called") -} - -func testCanonicalText(t *testing.T, input, expected string) { - r := recordingHash{bytes.NewBuffer(nil)} - c := NewCanonicalTextHash(r) - c.Write([]byte(input)) - result := c.Sum(nil) - if expected != string(result) { - t.Errorf("input: %x got: %x want: %x", input, result, expected) - } -} - -func TestCanonicalText(t *testing.T) { - testCanonicalText(t, "foo\n", "foo\r\n") - testCanonicalText(t, "foo", "foo") - testCanonicalText(t, "foo\r\n", "foo\r\n") - testCanonicalText(t, "foo\r\nbar", "foo\r\nbar") - testCanonicalText(t, "foo\r\nbar\n\n", "foo\r\nbar\r\n\r\n") -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign.go deleted file mode 100644 index bc039e3702..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign.go +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright 2012 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 clearsign generates and processes OpenPGP, clear-signed data. See -// RFC 4880, section 7. -// -// Clearsigned messages are cryptographically signed, but the contents of the -// message are kept in plaintext so that it can be read without special tools. -package clearsign - -import ( - "bufio" - "bytes" - "crypto" - "hash" - "io" - "net/textproto" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" -) - -// A Block represents a clearsigned message. A signature on a Block can -// be checked by passing Bytes into openpgp.CheckDetachedSignature. -type Block struct { - Headers textproto.MIMEHeader // Optional message headers - Plaintext []byte // The original message text - Bytes []byte // The signed message - ArmoredSignature *armor.Block // The signature block -} - -// start is the marker which denotes the beginning of a clearsigned message. -var start = []byte("\n-----BEGIN PGP SIGNED MESSAGE-----") - -// dashEscape is prefixed to any lines that begin with a hyphen so that they -// can't be confused with endText. -var dashEscape = []byte("- ") - -// endText is a marker which denotes the end of the message and the start of -// an armored signature. -var endText = []byte("-----BEGIN PGP SIGNATURE-----") - -// end is a marker which denotes the end of the armored signature. -var end = []byte("\n-----END PGP SIGNATURE-----") - -var crlf = []byte("\r\n") -var lf = byte('\n') - -// getLine returns the first \r\n or \n delineated line from the given byte -// array. The line does not include the \r\n or \n. The remainder of the byte -// array (also not including the new line bytes) is also returned and this will -// always be smaller than the original argument. -func getLine(data []byte) (line, rest []byte) { - i := bytes.Index(data, []byte{'\n'}) - var j int - if i < 0 { - i = len(data) - j = i - } else { - j = i + 1 - if i > 0 && data[i-1] == '\r' { - i-- - } - } - return data[0:i], data[j:] -} - -// Decode finds the first clearsigned message in data and returns it, as well -// as the suffix of data which remains after the message. -func Decode(data []byte) (b *Block, rest []byte) { - // start begins with a newline. However, at the very beginning of - // the byte array, we'll accept the start string without it. - rest = data - if bytes.HasPrefix(data, start[1:]) { - rest = rest[len(start)-1:] - } else if i := bytes.Index(data, start); i >= 0 { - rest = rest[i+len(start):] - } else { - return nil, data - } - - // Consume the start line. - _, rest = getLine(rest) - - var line []byte - b = &Block{ - Headers: make(textproto.MIMEHeader), - } - - // Next come a series of header lines. - for { - // This loop terminates because getLine's second result is - // always smaller than its argument. - if len(rest) == 0 { - return nil, data - } - // An empty line marks the end of the headers. - if line, rest = getLine(rest); len(line) == 0 { - break - } - - i := bytes.Index(line, []byte{':'}) - if i == -1 { - return nil, data - } - - key, val := line[0:i], line[i+1:] - key = bytes.TrimSpace(key) - val = bytes.TrimSpace(val) - b.Headers.Add(string(key), string(val)) - } - - firstLine := true - for { - start := rest - - line, rest = getLine(rest) - if len(line) == 0 && len(rest) == 0 { - // No armored data was found, so this isn't a complete message. - return nil, data - } - if bytes.Equal(line, endText) { - // Back up to the start of the line because armor expects to see the - // header line. - rest = start - break - } - - // The final CRLF isn't included in the hash so we don't write it until - // we've seen the next line. - if firstLine { - firstLine = false - } else { - b.Bytes = append(b.Bytes, crlf...) - } - - if bytes.HasPrefix(line, dashEscape) { - line = line[2:] - } - line = bytes.TrimRight(line, " \t") - b.Bytes = append(b.Bytes, line...) - - b.Plaintext = append(b.Plaintext, line...) - b.Plaintext = append(b.Plaintext, lf) - } - - // We want to find the extent of the armored data (including any newlines at - // the end). - i := bytes.Index(rest, end) - if i == -1 { - return nil, data - } - i += len(end) - for i < len(rest) && (rest[i] == '\r' || rest[i] == '\n') { - i++ - } - armored := rest[:i] - rest = rest[i:] - - var err error - b.ArmoredSignature, err = armor.Decode(bytes.NewBuffer(armored)) - if err != nil { - return nil, data - } - - return b, rest -} - -// A dashEscaper is an io.WriteCloser which processes the body of a clear-signed -// message. The clear-signed message is written to buffered and a hash, suitable -// for signing, is maintained in h. -// -// When closed, an armored signature is created and written to complete the -// message. -type dashEscaper struct { - buffered *bufio.Writer - h hash.Hash - hashType crypto.Hash - - atBeginningOfLine bool - isFirstLine bool - - whitespace []byte - byteBuf []byte // a one byte buffer to save allocations - - privateKey *packet.PrivateKey - config *packet.Config -} - -func (d *dashEscaper) Write(data []byte) (n int, err error) { - for _, b := range data { - d.byteBuf[0] = b - - if d.atBeginningOfLine { - // The final CRLF isn't included in the hash so we have to wait - // until this point (the start of the next line) before writing it. - if !d.isFirstLine { - d.h.Write(crlf) - } - d.isFirstLine = false - } - - // Any whitespace at the end of the line has to be removed so we - // buffer it until we find out whether there's more on this line. - if b == ' ' || b == '\t' || b == '\r' { - d.whitespace = append(d.whitespace, b) - d.atBeginningOfLine = false - continue - } - - if d.atBeginningOfLine { - // At the beginning of a line, hyphens have to be escaped. - if b == '-' { - // The signature isn't calculated over the dash-escaped text so - // the escape is only written to buffered. - if _, err = d.buffered.Write(dashEscape); err != nil { - return - } - d.h.Write(d.byteBuf) - d.atBeginningOfLine = false - } else if b == '\n' { - // Nothing to do because we delay writing CRLF to the hash. - } else { - d.h.Write(d.byteBuf) - d.atBeginningOfLine = false - } - if err = d.buffered.WriteByte(b); err != nil { - return - } - } else { - if b == '\n' { - // We got a raw \n. Drop any trailing whitespace and write a - // CRLF. - d.whitespace = d.whitespace[:0] - // We delay writing CRLF to the hash until the start of the - // next line. - if err = d.buffered.WriteByte(b); err != nil { - return - } - d.atBeginningOfLine = true - } else { - // Any buffered whitespace wasn't at the end of the line so - // we need to write it out. - if len(d.whitespace) > 0 { - d.h.Write(d.whitespace) - if _, err = d.buffered.Write(d.whitespace); err != nil { - return - } - d.whitespace = d.whitespace[:0] - } - d.h.Write(d.byteBuf) - if err = d.buffered.WriteByte(b); err != nil { - return - } - } - } - } - - n = len(data) - return -} - -func (d *dashEscaper) Close() (err error) { - if !d.atBeginningOfLine { - if err = d.buffered.WriteByte(lf); err != nil { - return - } - } - sig := new(packet.Signature) - sig.SigType = packet.SigTypeText - sig.PubKeyAlgo = d.privateKey.PubKeyAlgo - sig.Hash = d.hashType - sig.CreationTime = d.config.Now() - sig.IssuerKeyId = &d.privateKey.KeyId - - if err = sig.Sign(d.h, d.privateKey, d.config); err != nil { - return - } - - out, err := armor.Encode(d.buffered, "PGP SIGNATURE", nil) - if err != nil { - return - } - - if err = sig.Serialize(out); err != nil { - return - } - if err = out.Close(); err != nil { - return - } - if err = d.buffered.Flush(); err != nil { - return - } - return -} - -// Encode returns a WriteCloser which will clear-sign a message with privateKey -// and write it to w. If config is nil, sensible defaults are used. -func Encode(w io.Writer, privateKey *packet.PrivateKey, config *packet.Config) (plaintext io.WriteCloser, err error) { - if privateKey.Encrypted { - return nil, errors.InvalidArgumentError("signing key is encrypted") - } - - hashType := config.Hash() - name := nameOfHash(hashType) - if len(name) == 0 { - return nil, errors.UnsupportedError("unknown hash type: " + strconv.Itoa(int(hashType))) - } - - if !hashType.Available() { - return nil, errors.UnsupportedError("unsupported hash type: " + strconv.Itoa(int(hashType))) - } - h := hashType.New() - - buffered := bufio.NewWriter(w) - // start has a \n at the beginning that we don't want here. - if _, err = buffered.Write(start[1:]); err != nil { - return - } - if err = buffered.WriteByte(lf); err != nil { - return - } - if _, err = buffered.WriteString("Hash: "); err != nil { - return - } - if _, err = buffered.WriteString(name); err != nil { - return - } - if err = buffered.WriteByte(lf); err != nil { - return - } - if err = buffered.WriteByte(lf); err != nil { - return - } - - plaintext = &dashEscaper{ - buffered: buffered, - h: h, - hashType: hashType, - - atBeginningOfLine: true, - isFirstLine: true, - - byteBuf: make([]byte, 1), - - privateKey: privateKey, - config: config, - } - - return -} - -// nameOfHash returns the OpenPGP name for the given hash, or the empty string -// if the name isn't known. See RFC 4880, section 9.4. -func nameOfHash(h crypto.Hash) string { - switch h { - case crypto.MD5: - return "MD5" - case crypto.SHA1: - return "SHA1" - case crypto.RIPEMD160: - return "RIPEMD160" - case crypto.SHA224: - return "SHA224" - case crypto.SHA256: - return "SHA256" - case crypto.SHA384: - return "SHA384" - case crypto.SHA512: - return "SHA512" - } - return "" -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign_test.go deleted file mode 100644 index d649330f77..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/clearsign/clearsign_test.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2012 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 clearsign - -import ( - "bytes" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp" - "testing" -) - -func testParse(t *testing.T, input []byte, expected, expectedPlaintext string) { - b, rest := Decode(input) - if b == nil { - t.Fatal("failed to decode clearsign message") - } - if !bytes.Equal(rest, []byte("trailing")) { - t.Errorf("unexpected remaining bytes returned: %s", string(rest)) - } - if b.ArmoredSignature.Type != "PGP SIGNATURE" { - t.Errorf("bad armor type, got:%s, want:PGP SIGNATURE", b.ArmoredSignature.Type) - } - if !bytes.Equal(b.Bytes, []byte(expected)) { - t.Errorf("bad body, got:%x want:%x", b.Bytes, expected) - } - - if !bytes.Equal(b.Plaintext, []byte(expectedPlaintext)) { - t.Errorf("bad plaintext, got:%x want:%x", b.Plaintext, expectedPlaintext) - } - - keyring, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(signingKey)) - if err != nil { - t.Errorf("failed to parse public key: %s", err) - } - - if _, err := openpgp.CheckDetachedSignature(keyring, bytes.NewBuffer(b.Bytes), b.ArmoredSignature.Body); err != nil { - t.Errorf("failed to check signature: %s", err) - } -} - -func TestParse(t *testing.T) { - testParse(t, clearsignInput, "Hello world\r\nline 2", "Hello world\nline 2\n") - testParse(t, clearsignInput2, "\r\n\r\n(This message has a couple of blank lines at the start and end.)\r\n\r\n", "\n\n(This message has a couple of blank lines at the start and end.)\n\n\n") -} - -func TestParseInvalid(t *testing.T) { - if b, _ := Decode(clearsignInput3); b != nil { - t.Fatal("decoded a bad clearsigned message without any error") - } -} - -func TestParseWithNoNewlineAtEnd(t *testing.T) { - input := clearsignInput - input = input[:len(input)-len("trailing")-1] - b, rest := Decode(input) - if b == nil { - t.Fatal("failed to decode clearsign message") - } - if len(rest) > 0 { - t.Errorf("unexpected remaining bytes returned: %s", string(rest)) - } -} - -var signingTests = []struct { - in, signed, plaintext string -}{ - {"", "", ""}, - {"a", "a", "a\n"}, - {"a\n", "a", "a\n"}, - {"-a\n", "-a", "-a\n"}, - {"--a\nb", "--a\r\nb", "--a\nb\n"}, - // leading whitespace - {" a\n", " a", " a\n"}, - {" a\n", " a", " a\n"}, - // trailing whitespace (should be stripped) - {"a \n", "a", "a\n"}, - {"a ", "a", "a\n"}, - // whitespace-only lines (should be stripped) - {" \n", "", "\n"}, - {" ", "", "\n"}, - {"a\n \n \nb\n", "a\r\n\r\n\r\nb", "a\n\n\nb\n"}, -} - -func TestSigning(t *testing.T) { - keyring, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(signingKey)) - if err != nil { - t.Errorf("failed to parse public key: %s", err) - } - - for i, test := range signingTests { - var buf bytes.Buffer - - plaintext, err := Encode(&buf, keyring[0].PrivateKey, nil) - if err != nil { - t.Errorf("#%d: error from Encode: %s", i, err) - continue - } - if _, err := plaintext.Write([]byte(test.in)); err != nil { - t.Errorf("#%d: error from Write: %s", i, err) - continue - } - if err := plaintext.Close(); err != nil { - t.Fatalf("#%d: error from Close: %s", i, err) - continue - } - - b, _ := Decode(buf.Bytes()) - if b == nil { - t.Errorf("#%d: failed to decode clearsign message", i) - continue - } - if !bytes.Equal(b.Bytes, []byte(test.signed)) { - t.Errorf("#%d: bad result, got:%x, want:%x", i, b.Bytes, test.signed) - continue - } - if !bytes.Equal(b.Plaintext, []byte(test.plaintext)) { - t.Errorf("#%d: bad result, got:%x, want:%x", i, b.Plaintext, test.plaintext) - continue - } - - if _, err := openpgp.CheckDetachedSignature(keyring, bytes.NewBuffer(b.Bytes), b.ArmoredSignature.Body); err != nil { - t.Errorf("#%d: failed to check signature: %s", i, err) - } - } -} - -var clearsignInput = []byte(` -;lasjlkfdsa - ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -Hello world -line 2 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.10 (GNU/Linux) - -iJwEAQECAAYFAk8kMuEACgkQO9o98PRieSpMsAQAhmY/vwmNpflrPgmfWsYhk5O8 -pjnBUzZwqTDoDeINjZEoPDSpQAHGhjFjgaDx/Gj4fAl0dM4D0wuUEBb6QOrwflog -2A2k9kfSOMOtk0IH/H5VuFN1Mie9L/erYXjTQIptv9t9J7NoRBMU0QOOaFU0JaO9 -MyTpno24AjIAGb+mH1U= -=hIJ6 ------END PGP SIGNATURE----- -trailing`) - -var clearsignInput2 = []byte(` -asdlfkjasdlkfjsadf - ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - - - -(This message has a couple of blank lines at the start and end.) - - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iJwEAQEIAAYFAlPpSREACgkQO9o98PRieSpZTAP+M8QUoCt/7Rf3YbXPcdzIL32v -pt1I+cMNeopzfLy0u4ioEFi8s5VkwpL1AFmirvgViCwlf82inoRxzZRiW05JQ5LI -ESEzeCoy2LIdRCQ2hcrG8pIUPzUO4TqO5D/dMbdHwNH4h5nNmGJUAEG6FpURlPm+ -qZg6BaTvOxepqOxnhVU= -=e+C6 ------END PGP SIGNATURE----- - -trailing`) - -var clearsignInput3 = []byte(` ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -(This message was truncated.) -`) - -var signingKey = `-----BEGIN PGP PRIVATE KEY BLOCK----- -Version: GnuPG v1.4.10 (GNU/Linux) - -lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp -idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn -vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB -AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X -0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL -IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk -VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn -gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9 -TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx -q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz -dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA -CgkQO9o98PRieSoLhgQAkLEZex02Qt7vGhZzMwuN0R22w3VwyYyjBx+fM3JFETy1 -ut4xcLJoJfIaF5ZS38UplgakHG0FQ+b49i8dMij0aZmDqGxrew1m4kBfjXw9B/v+ -eIqpODryb6cOSwyQFH0lQkXC040pjq9YqDsO5w0WYNXYKDnzRV0p4H1pweo2VDid -AdgETasU2gEEAN46UPeWRqKHvA99arOxee38fBt2CI08iiWyI8T3J6ivtFGixSqV -bRcPxYO/qLpVe5l84Nb3X71GfVXlc9hyv7CD6tcowL59hg1E/DC5ydI8K8iEpUmK -/UnHdIY5h8/kqgGxkY/T/hgp5fRQgW1ZoZxLajVlMRZ8W4tFtT0DeA+JABEBAAEA -A/0bE1jaaZKj6ndqcw86jd+QtD1SF+Cf21CWRNeLKnUds4FRRvclzTyUMuWPkUeX -TaNNsUOFqBsf6QQ2oHUBBK4VCHffHCW4ZEX2cd6umz7mpHW6XzN4DECEzOVksXtc -lUC1j4UB91DC/RNQqwX1IV2QLSwssVotPMPqhOi0ZLNY7wIA3n7DWKInxYZZ4K+6 -rQ+POsz6brEoRHwr8x6XlHenq1Oki855pSa1yXIARoTrSJkBtn5oI+f8AzrnN0BN -oyeQAwIA/7E++3HDi5aweWrViiul9cd3rcsS0dEnksPhvS0ozCJiHsq/6GFmy7J8 -QSHZPteedBnZyNp5jR+H7cIfVN3KgwH/Skq4PsuPhDq5TKK6i8Pc1WW8MA6DXTdU -nLkX7RGmMwjC0DBf7KWAlPjFaONAX3a8ndnz//fy1q7u2l9AZwrj1qa1iJ8EGAEC -AAkFAk2rFNoCGwwACgkQO9o98PRieSo2/QP/WTzr4ioINVsvN1akKuekmEMI3LAp -BfHwatufxxP1U+3Si/6YIk7kuPB9Hs+pRqCXzbvPRrI8NHZBmc8qIGthishdCYad -AHcVnXjtxrULkQFGbGvhKURLvS9WnzD/m1K2zzwxzkPTzT9/Yf06O6Mal5AdugPL -VrM0m72/jnpKo04= -=zNCn ------END PGP PRIVATE KEY BLOCK----- -` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal.go deleted file mode 100644 index a553bdee8d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2011 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 elgamal implements ElGamal encryption, suitable for OpenPGP, -// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on -// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31, -// n. 4, 1985, pp. 469-472. -// -// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it -// unsuitable for other protocols. RSA should be used in preference in any -// case. -package elgamal - -import ( - "crypto/rand" - "crypto/subtle" - "errors" - "io" - "math/big" -) - -// PublicKey represents an ElGamal public key. -type PublicKey struct { - G, P, Y *big.Int -} - -// PrivateKey represents an ElGamal private key. -type PrivateKey struct { - PublicKey - X *big.Int -} - -// Encrypt encrypts the given message to the given public key. The result is a -// pair of integers. Errors can result from reading random, or because msg is -// too large to be encrypted to the public key. -func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) { - pLen := (pub.P.BitLen() + 7) / 8 - if len(msg) > pLen-11 { - err = errors.New("elgamal: message too long") - return - } - - // EM = 0x02 || PS || 0x00 || M - em := make([]byte, pLen-1) - em[0] = 2 - ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):] - err = nonZeroRandomBytes(ps, random) - if err != nil { - return - } - em[len(em)-len(msg)-1] = 0 - copy(mm, msg) - - m := new(big.Int).SetBytes(em) - - k, err := rand.Int(random, pub.P) - if err != nil { - return - } - - c1 = new(big.Int).Exp(pub.G, k, pub.P) - s := new(big.Int).Exp(pub.Y, k, pub.P) - c2 = s.Mul(s, m) - c2.Mod(c2, pub.P) - - return -} - -// Decrypt takes two integers, resulting from an ElGamal encryption, and -// returns the plaintext of the message. An error can result only if the -// ciphertext is invalid. Users should keep in mind that this is a padding -// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can -// be used to break the cryptosystem. See ``Chosen Ciphertext Attacks -// Against Protocols Based on the RSA Encryption Standard PKCS #1'', Daniel -// Bleichenbacher, Advances in Cryptology (Crypto '98), -func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) { - s := new(big.Int).Exp(c1, priv.X, priv.P) - s.ModInverse(s, priv.P) - s.Mul(s, c2) - s.Mod(s, priv.P) - em := s.Bytes() - - firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2) - - // The remainder of the plaintext must be a string of non-zero random - // octets, followed by a 0, followed by the message. - // lookingForIndex: 1 iff we are still looking for the zero. - // index: the offset of the first zero byte. - var lookingForIndex, index int - lookingForIndex = 1 - - for i := 1; i < len(em); i++ { - equals0 := subtle.ConstantTimeByteEq(em[i], 0) - index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index) - lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex) - } - - if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 { - return nil, errors.New("elgamal: decryption error") - } - return em[index+1:], nil -} - -// nonZeroRandomBytes fills the given slice with non-zero random octets. -func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) { - _, err = io.ReadFull(rand, s) - if err != nil { - return - } - - for i := 0; i < len(s); i++ { - for s[i] == 0 { - _, err = io.ReadFull(rand, s[i:i+1]) - if err != nil { - return - } - } - } - - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal_test.go deleted file mode 100644 index c4f99f5c48..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal/elgamal_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2011 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 elgamal - -import ( - "bytes" - "crypto/rand" - "math/big" - "testing" -) - -// This is the 1024-bit MODP group from RFC 5114, section 2.1: -const primeHex = "B10B8F96A080E01DDE92DE5EAE5D54EC52C99FBCFB06A3C69A6A9DCA52D23B616073E28675A23D189838EF1E2EE652C013ECB4AEA906112324975C3CD49B83BFACCBDD7D90C4BD7098488E9C219A73724EFFD6FAE5644738FAA31A4FF55BCCC0A151AF5F0DC8B4BD45BF37DF365C1A65E68CFDA76D4DA708DF1FB2BC2E4A4371" - -const generatorHex = "A4D1CBD5C3FD34126765A442EFB99905F8104DD258AC507FD6406CFF14266D31266FEA1E5C41564B777E690F5504F213160217B4B01B886A5E91547F9E2749F4D7FBD7D3B9A92EE1909D0D2263F80A76A6A24C087A091F531DBF0A0169B6A28AD662A4D18E73AFA32D779D5918D08BC8858F4DCEF97C2A24855E6EEB22B3B2E5" - -func fromHex(hex string) *big.Int { - n, ok := new(big.Int).SetString(hex, 16) - if !ok { - panic("failed to parse hex number") - } - return n -} - -func TestEncryptDecrypt(t *testing.T) { - priv := &PrivateKey{ - PublicKey: PublicKey{ - G: fromHex(generatorHex), - P: fromHex(primeHex), - }, - X: fromHex("42"), - } - priv.Y = new(big.Int).Exp(priv.G, priv.X, priv.P) - - message := []byte("hello world") - c1, c2, err := Encrypt(rand.Reader, &priv.PublicKey, message) - if err != nil { - t.Errorf("error encrypting: %s", err) - } - message2, err := Decrypt(priv, c1, c2) - if err != nil { - t.Errorf("error decrypting: %s", err) - } - if !bytes.Equal(message2, message) { - t.Errorf("decryption failed, got: %x, want: %x", message2, message) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors/errors.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors/errors.go deleted file mode 100644 index 6c4c2f1769..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2010 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 errors contains common error types for the OpenPGP packages. -package errors - -import ( - "strconv" -) - -// A StructuralError is returned when OpenPGP data is found to be syntactically -// invalid. -type StructuralError string - -func (s StructuralError) Error() string { - return "openpgp: invalid data: " + string(s) -} - -// UnsupportedError indicates that, although the OpenPGP data is valid, it -// makes use of currently unimplemented features. -type UnsupportedError string - -func (s UnsupportedError) Error() string { - return "openpgp: unsupported feature: " + string(s) -} - -// InvalidArgumentError indicates that the caller is in error and passed an -// incorrect value. -type InvalidArgumentError string - -func (i InvalidArgumentError) Error() string { - return "openpgp: invalid argument: " + string(i) -} - -// SignatureError indicates that a syntactically valid signature failed to -// validate. -type SignatureError string - -func (b SignatureError) Error() string { - return "openpgp: invalid signature: " + string(b) -} - -type keyIncorrectError int - -func (ki keyIncorrectError) Error() string { - return "openpgp: incorrect key" -} - -var ErrKeyIncorrect error = keyIncorrectError(0) - -type unknownIssuerError int - -func (unknownIssuerError) Error() string { - return "openpgp: signature made by unknown entity" -} - -var ErrUnknownIssuer error = unknownIssuerError(0) - -type keyRevokedError int - -func (keyRevokedError) Error() string { - return "openpgp: signature made by revoked key" -} - -var ErrKeyRevoked error = keyRevokedError(0) - -type UnknownPacketTypeError uint8 - -func (upte UnknownPacketTypeError) Error() string { - return "openpgp: unknown packet type: " + strconv.Itoa(int(upte)) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys.go deleted file mode 100644 index 9fc9550c38..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys.go +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "crypto/rsa" - "io" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" -) - -// PublicKeyType is the armor type for a PGP public key. -var PublicKeyType = "PGP PUBLIC KEY BLOCK" - -// PrivateKeyType is the armor type for a PGP private key. -var PrivateKeyType = "PGP PRIVATE KEY BLOCK" - -// An Entity represents the components of an OpenPGP key: a primary public key -// (which must be a signing key), one or more identities claimed by that key, -// and zero or more subkeys, which may be encryption keys. -type Entity struct { - PrimaryKey *packet.PublicKey - PrivateKey *packet.PrivateKey - Identities map[string]*Identity // indexed by Identity.Name - Revocations []*packet.Signature - Subkeys []Subkey -} - -// An Identity represents an identity claimed by an Entity and zero or more -// assertions by other entities about that claim. -type Identity struct { - Name string // by convention, has the form "Full Name (comment) " - UserId *packet.UserId - SelfSignature *packet.Signature - Signatures []*packet.Signature -} - -// A Subkey is an additional public key in an Entity. Subkeys can be used for -// encryption. -type Subkey struct { - PublicKey *packet.PublicKey - PrivateKey *packet.PrivateKey - Sig *packet.Signature -} - -// A Key identifies a specific public key in an Entity. This is either the -// Entity's primary key or a subkey. -type Key struct { - Entity *Entity - PublicKey *packet.PublicKey - PrivateKey *packet.PrivateKey - SelfSignature *packet.Signature -} - -// A KeyRing provides access to public and private keys. -type KeyRing interface { - // KeysById returns the set of keys that have the given key id. - KeysById(id uint64) []Key - // KeysByIdAndUsage returns the set of keys with the given id - // that also meet the key usage given by requiredUsage. - // The requiredUsage is expressed as the bitwise-OR of - // packet.KeyFlag* values. - KeysByIdUsage(id uint64, requiredUsage byte) []Key - // DecryptionKeys returns all private keys that are valid for - // decryption. - DecryptionKeys() []Key -} - -// primaryIdentity returns the Identity marked as primary or the first identity -// if none are so marked. -func (e *Entity) primaryIdentity() *Identity { - var firstIdentity *Identity - for _, ident := range e.Identities { - if firstIdentity == nil { - firstIdentity = ident - } - if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { - return ident - } - } - return firstIdentity -} - -// encryptionKey returns the best candidate Key for encrypting a message to the -// given Entity. -func (e *Entity) encryptionKey(now time.Time) (Key, bool) { - candidateSubkey := -1 - - // Iterate the keys to find the newest key - var maxTime time.Time - for i, subkey := range e.Subkeys { - if subkey.Sig.FlagsValid && - subkey.Sig.FlagEncryptCommunications && - subkey.PublicKey.PubKeyAlgo.CanEncrypt() && - !subkey.Sig.KeyExpired(now) && - (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) { - candidateSubkey = i - maxTime = subkey.Sig.CreationTime - } - } - - if candidateSubkey != -1 { - subkey := e.Subkeys[candidateSubkey] - return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true - } - - // If we don't have any candidate subkeys for encryption and - // the primary key doesn't have any usage metadata then we - // assume that the primary key is ok. Or, if the primary key is - // marked as ok to encrypt to, then we can obviously use it. - i := e.primaryIdentity() - if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications && - e.PrimaryKey.PubKeyAlgo.CanEncrypt() && - !i.SelfSignature.KeyExpired(now) { - return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true - } - - // This Entity appears to be signing only. - return Key{}, false -} - -// signingKey return the best candidate Key for signing a message with this -// Entity. -func (e *Entity) signingKey(now time.Time) (Key, bool) { - candidateSubkey := -1 - - for i, subkey := range e.Subkeys { - if subkey.Sig.FlagsValid && - subkey.Sig.FlagSign && - subkey.PublicKey.PubKeyAlgo.CanSign() && - !subkey.Sig.KeyExpired(now) { - candidateSubkey = i - break - } - } - - if candidateSubkey != -1 { - subkey := e.Subkeys[candidateSubkey] - return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true - } - - // If we have no candidate subkey then we assume that it's ok to sign - // with the primary key. - i := e.primaryIdentity() - if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign && - !i.SelfSignature.KeyExpired(now) { - return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true - } - - return Key{}, false -} - -// An EntityList contains one or more Entities. -type EntityList []*Entity - -// KeysById returns the set of keys that have the given key id. -func (el EntityList) KeysById(id uint64) (keys []Key) { - for _, e := range el { - if e.PrimaryKey.KeyId == id { - var selfSig *packet.Signature - for _, ident := range e.Identities { - if selfSig == nil { - selfSig = ident.SelfSignature - } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { - selfSig = ident.SelfSignature - break - } - } - keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig}) - } - - for _, subKey := range e.Subkeys { - if subKey.PublicKey.KeyId == id { - keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) - } - } - } - return -} - -// KeysByIdAndUsage returns the set of keys with the given id that also meet -// the key usage given by requiredUsage. The requiredUsage is expressed as -// the bitwise-OR of packet.KeyFlag* values. -func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) { - for _, key := range el.KeysById(id) { - if len(key.Entity.Revocations) > 0 { - continue - } - - if key.SelfSignature.RevocationReason != nil { - continue - } - - if key.SelfSignature.FlagsValid && requiredUsage != 0 { - var usage byte - if key.SelfSignature.FlagCertify { - usage |= packet.KeyFlagCertify - } - if key.SelfSignature.FlagSign { - usage |= packet.KeyFlagSign - } - if key.SelfSignature.FlagEncryptCommunications { - usage |= packet.KeyFlagEncryptCommunications - } - if key.SelfSignature.FlagEncryptStorage { - usage |= packet.KeyFlagEncryptStorage - } - if usage&requiredUsage != requiredUsage { - continue - } - } - - keys = append(keys, key) - } - return -} - -// DecryptionKeys returns all private keys that are valid for decryption. -func (el EntityList) DecryptionKeys() (keys []Key) { - for _, e := range el { - for _, subKey := range e.Subkeys { - if subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) { - keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) - } - } - } - return -} - -// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file. -func ReadArmoredKeyRing(r io.Reader) (EntityList, error) { - block, err := armor.Decode(r) - if err == io.EOF { - return nil, errors.InvalidArgumentError("no armored data found") - } - if err != nil { - return nil, err - } - if block.Type != PublicKeyType && block.Type != PrivateKeyType { - return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type) - } - - return ReadKeyRing(block.Body) -} - -// ReadKeyRing reads one or more public/private keys. Unsupported keys are -// ignored as long as at least a single valid key is found. -func ReadKeyRing(r io.Reader) (el EntityList, err error) { - packets := packet.NewReader(r) - var lastUnsupportedError error - - for { - var e *Entity - e, err = ReadEntity(packets) - if err != nil { - // TODO: warn about skipped unsupported/unreadable keys - if _, ok := err.(errors.UnsupportedError); ok { - lastUnsupportedError = err - err = readToNextPublicKey(packets) - } else if _, ok := err.(errors.StructuralError); ok { - // Skip unreadable, badly-formatted keys - lastUnsupportedError = err - err = readToNextPublicKey(packets) - } - if err == io.EOF { - err = nil - break - } - if err != nil { - el = nil - break - } - } else { - el = append(el, e) - } - } - - if len(el) == 0 && err == nil { - err = lastUnsupportedError - } - return -} - -// readToNextPublicKey reads packets until the start of the entity and leaves -// the first packet of the new entity in the Reader. -func readToNextPublicKey(packets *packet.Reader) (err error) { - var p packet.Packet - for { - p, err = packets.Next() - if err == io.EOF { - return - } else if err != nil { - if _, ok := err.(errors.UnsupportedError); ok { - err = nil - continue - } - return - } - - if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey { - packets.Unread(p) - return - } - } -} - -// ReadEntity reads an entity (public key, identities, subkeys etc) from the -// given Reader. -func ReadEntity(packets *packet.Reader) (*Entity, error) { - e := new(Entity) - e.Identities = make(map[string]*Identity) - - p, err := packets.Next() - if err != nil { - return nil, err - } - - var ok bool - if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok { - if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { - packets.Unread(p) - return nil, errors.StructuralError("first packet was not a public/private key") - } - e.PrimaryKey = &e.PrivateKey.PublicKey - } - - if !e.PrimaryKey.PubKeyAlgo.CanSign() { - return nil, errors.StructuralError("primary key cannot be used for signatures") - } - - var current *Identity - var revocations []*packet.Signature -EachPacket: - for { - p, err := packets.Next() - if err == io.EOF { - break - } else if err != nil { - return nil, err - } - - switch pkt := p.(type) { - case *packet.UserId: - current = new(Identity) - current.Name = pkt.Id - current.UserId = pkt - e.Identities[pkt.Id] = current - - for { - p, err = packets.Next() - if err == io.EOF { - return nil, io.ErrUnexpectedEOF - } else if err != nil { - return nil, err - } - - sig, ok := p.(*packet.Signature) - if !ok { - return nil, errors.StructuralError("user ID packet not followed by self-signature") - } - - if (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId { - if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil { - return nil, errors.StructuralError("user ID self-signature invalid: " + err.Error()) - } - current.SelfSignature = sig - break - } - current.Signatures = append(current.Signatures, sig) - } - case *packet.Signature: - if pkt.SigType == packet.SigTypeKeyRevocation { - revocations = append(revocations, pkt) - } else if pkt.SigType == packet.SigTypeDirectSignature { - // TODO: RFC4880 5.2.1 permits signatures - // directly on keys (eg. to bind additional - // revocation keys). - } else if current == nil { - return nil, errors.StructuralError("signature packet found before user id packet") - } else { - current.Signatures = append(current.Signatures, pkt) - } - case *packet.PrivateKey: - if pkt.IsSubkey == false { - packets.Unread(p) - break EachPacket - } - err = addSubkey(e, packets, &pkt.PublicKey, pkt) - if err != nil { - return nil, err - } - case *packet.PublicKey: - if pkt.IsSubkey == false { - packets.Unread(p) - break EachPacket - } - err = addSubkey(e, packets, pkt, nil) - if err != nil { - return nil, err - } - default: - // we ignore unknown packets - } - } - - if len(e.Identities) == 0 { - return nil, errors.StructuralError("entity without any identities") - } - - for _, revocation := range revocations { - err = e.PrimaryKey.VerifyRevocationSignature(revocation) - if err == nil { - e.Revocations = append(e.Revocations, revocation) - } else { - // TODO: RFC 4880 5.2.3.15 defines revocation keys. - return nil, errors.StructuralError("revocation signature signed by alternate key") - } - } - - return e, nil -} - -func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error { - var subKey Subkey - subKey.PublicKey = pub - subKey.PrivateKey = priv - p, err := packets.Next() - if err == io.EOF { - return io.ErrUnexpectedEOF - } - if err != nil { - return errors.StructuralError("subkey signature invalid: " + err.Error()) - } - var ok bool - subKey.Sig, ok = p.(*packet.Signature) - if !ok { - return errors.StructuralError("subkey packet not followed by signature") - } - if subKey.Sig.SigType != packet.SigTypeSubkeyBinding && subKey.Sig.SigType != packet.SigTypeSubkeyRevocation { - return errors.StructuralError("subkey signature with wrong type") - } - err = e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, subKey.Sig) - if err != nil { - return errors.StructuralError("subkey signature invalid: " + err.Error()) - } - e.Subkeys = append(e.Subkeys, subKey) - return nil -} - -const defaultRSAKeyBits = 2048 - -// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a -// single identity composed of the given full name, comment and email, any of -// which may be empty but must not contain any of "()<>\x00". -// If config is nil, sensible defaults will be used. -func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { - currentTime := config.Now() - - bits := defaultRSAKeyBits - if config != nil && config.RSABits != 0 { - bits = config.RSABits - } - - uid := packet.NewUserId(name, comment, email) - if uid == nil { - return nil, errors.InvalidArgumentError("user id field contained invalid characters") - } - signingPriv, err := rsa.GenerateKey(config.Random(), bits) - if err != nil { - return nil, err - } - encryptingPriv, err := rsa.GenerateKey(config.Random(), bits) - if err != nil { - return nil, err - } - - e := &Entity{ - PrimaryKey: packet.NewRSAPublicKey(currentTime, &signingPriv.PublicKey), - PrivateKey: packet.NewRSAPrivateKey(currentTime, signingPriv), - Identities: make(map[string]*Identity), - } - isPrimaryId := true - e.Identities[uid.Id] = &Identity{ - Name: uid.Id, - UserId: uid, - SelfSignature: &packet.Signature{ - CreationTime: currentTime, - SigType: packet.SigTypePositiveCert, - PubKeyAlgo: packet.PubKeyAlgoRSA, - Hash: config.Hash(), - IsPrimaryId: &isPrimaryId, - FlagsValid: true, - FlagSign: true, - FlagCertify: true, - IssuerKeyId: &e.PrimaryKey.KeyId, - }, - } - err = e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e.PrimaryKey, e.PrivateKey, config) - if err != nil { - return nil, err - } - - // If the user passes in a DefaultHash via packet.Config, - // set the PreferredHash for the SelfSignature. - if config != nil && config.DefaultHash != 0 { - e.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)} - } - - // Likewise for DefaultCipher. - if config != nil && config.DefaultCipher != 0 { - e.Identities[uid.Id].SelfSignature.PreferredSymmetric = []uint8{uint8(config.DefaultCipher)} - } - - e.Subkeys = make([]Subkey, 1) - e.Subkeys[0] = Subkey{ - PublicKey: packet.NewRSAPublicKey(currentTime, &encryptingPriv.PublicKey), - PrivateKey: packet.NewRSAPrivateKey(currentTime, encryptingPriv), - Sig: &packet.Signature{ - CreationTime: currentTime, - SigType: packet.SigTypeSubkeyBinding, - PubKeyAlgo: packet.PubKeyAlgoRSA, - Hash: config.Hash(), - FlagsValid: true, - FlagEncryptStorage: true, - FlagEncryptCommunications: true, - IssuerKeyId: &e.PrimaryKey.KeyId, - }, - } - e.Subkeys[0].PublicKey.IsSubkey = true - e.Subkeys[0].PrivateKey.IsSubkey = true - err = e.Subkeys[0].Sig.SignKey(e.Subkeys[0].PublicKey, e.PrivateKey, config) - if err != nil { - return nil, err - } - return e, nil -} - -// SerializePrivate serializes an Entity, including private key material, to -// the given Writer. For now, it must only be used on an Entity returned from -// NewEntity. -// config is ignored -func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) { - err = e.PrivateKey.Serialize(w) - if err != nil { - return - } - for _, ident := range e.Identities { - err = ident.UserId.Serialize(w) - if err != nil { - return - } - err = ident.SelfSignature.Serialize(w) - if err != nil { - return - } - } - for _, subkey := range e.Subkeys { - err = subkey.PrivateKey.Serialize(w) - if err != nil { - return - } - err = subkey.Sig.Serialize(w) - if err != nil { - return - } - } - return nil -} - -// Serialize writes the public part of the given Entity to w. (No private -// key material will be output). -func (e *Entity) Serialize(w io.Writer) error { - err := e.PrimaryKey.Serialize(w) - if err != nil { - return err - } - for _, ident := range e.Identities { - err = ident.UserId.Serialize(w) - if err != nil { - return err - } - err = ident.SelfSignature.Serialize(w) - if err != nil { - return err - } - for _, sig := range ident.Signatures { - err = sig.Serialize(w) - if err != nil { - return err - } - } - } - for _, subkey := range e.Subkeys { - err = subkey.PublicKey.Serialize(w) - if err != nil { - return err - } - err = subkey.Sig.Serialize(w) - if err != nil { - return err - } - } - return nil -} - -// SignIdentity adds a signature to e, from signer, attesting that identity is -// associated with e. The provided identity must already be an element of -// e.Identities and the private key of signer must have been decrypted if -// necessary. -// If config is nil, sensible defaults will be used. -func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error { - if signer.PrivateKey == nil { - return errors.InvalidArgumentError("signing Entity must have a private key") - } - if signer.PrivateKey.Encrypted { - return errors.InvalidArgumentError("signing Entity's private key must be decrypted") - } - ident, ok := e.Identities[identity] - if !ok { - return errors.InvalidArgumentError("given identity string not found in Entity") - } - - sig := &packet.Signature{ - SigType: packet.SigTypeGenericCert, - PubKeyAlgo: signer.PrivateKey.PubKeyAlgo, - Hash: config.Hash(), - CreationTime: config.Now(), - IssuerKeyId: &signer.PrivateKey.KeyId, - } - if err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil { - return err - } - ident.Signatures = append(ident.Signatures, sig) - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys_test.go deleted file mode 100644 index e3ab5bba80..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/keys_test.go +++ /dev/null @@ -1,483 +0,0 @@ -package openpgp - -import ( - "bytes" - "crypto" - "strings" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" -) - -func TestKeyExpiry(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(expiringKeyHex)) - if err != nil { - t.Fatal(err) - } - entity := kring[0] - - const timeFormat = "2006-01-02" - time1, _ := time.Parse(timeFormat, "2013-07-01") - - // The expiringKeyHex key is structured as: - // - // pub 1024R/5E237D8C created: 2013-07-01 expires: 2013-07-31 usage: SC - // sub 1024R/1ABB25A0 created: 2013-07-01 23:11:07 +0200 CEST expires: 2013-07-08 usage: E - // sub 1024R/96A672F5 created: 2013-07-01 23:11:23 +0200 CEST expires: 2013-07-31 usage: E - // - // So this should select the newest, non-expired encryption key. - key, _ := entity.encryptionKey(time1) - if id := key.PublicKey.KeyIdShortString(); id != "96A672F5" { - t.Errorf("Expected key 1ABB25A0 at time %s, but got key %s", time1.Format(timeFormat), id) - } - - // Once the first encryption subkey has expired, the second should be - // selected. - time2, _ := time.Parse(timeFormat, "2013-07-09") - key, _ = entity.encryptionKey(time2) - if id := key.PublicKey.KeyIdShortString(); id != "96A672F5" { - t.Errorf("Expected key 96A672F5 at time %s, but got key %s", time2.Format(timeFormat), id) - } - - // Once all the keys have expired, nothing should be returned. - time3, _ := time.Parse(timeFormat, "2013-08-01") - if key, ok := entity.encryptionKey(time3); ok { - t.Errorf("Expected no key at time %s, but got key %s", time3.Format(timeFormat), key.PublicKey.KeyIdShortString()) - } -} - -func TestMissingCrossSignature(t *testing.T) { - // This public key has a signing subkey, but the subkey does not - // contain a cross-signature. - keys, err := ReadArmoredKeyRing(bytes.NewBufferString(missingCrossSignatureKey)) - if len(keys) != 0 { - t.Errorf("Accepted key with missing cross signature") - } - if err == nil { - t.Fatal("Failed to detect error in keyring with missing cross signature") - } - structural, ok := err.(errors.StructuralError) - if !ok { - t.Fatalf("Unexpected class of error: %T. Wanted StructuralError", err) - } - const expectedMsg = "signing subkey is missing cross-signature" - if !strings.Contains(string(structural), expectedMsg) { - t.Fatalf("Unexpected error: %q. Expected it to contain %q", err, expectedMsg) - } -} - -func TestInvalidCrossSignature(t *testing.T) { - // This public key has a signing subkey, and the subkey has an - // embedded cross-signature. However, the cross-signature does - // not correctly validate over the primary and subkey. - keys, err := ReadArmoredKeyRing(bytes.NewBufferString(invalidCrossSignatureKey)) - if len(keys) != 0 { - t.Errorf("Accepted key with invalid cross signature") - } - if err == nil { - t.Fatal("Failed to detect error in keyring with an invalid cross signature") - } - structural, ok := err.(errors.StructuralError) - if !ok { - t.Fatalf("Unexpected class of error: %T. Wanted StructuralError", err) - } - const expectedMsg = "subkey signature invalid" - if !strings.Contains(string(structural), expectedMsg) { - t.Fatalf("Unexpected error: %q. Expected it to contain %q", err, expectedMsg) - } -} - -func TestGoodCrossSignature(t *testing.T) { - // This public key has a signing subkey, and the subkey has an - // embedded cross-signature which correctly validates over the - // primary and subkey. - keys, err := ReadArmoredKeyRing(bytes.NewBufferString(goodCrossSignatureKey)) - if err != nil { - t.Fatal(err) - } - if len(keys) != 1 { - t.Errorf("Failed to accept key with good cross signature, %d", len(keys)) - } - if len(keys[0].Subkeys) != 1 { - t.Errorf("Failed to accept good subkey, %d", len(keys[0].Subkeys)) - } -} - -// TestExternallyRevokableKey attempts to load and parse a key with a third party revocation permission. -func TestExternallyRevocableKey(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex)) - if err != nil { - t.Fatal(err) - } - - // The 0xA42704B92866382A key can be revoked by 0xBE3893CB843D0FE70C - // according to this signature that appears within the key: - // :signature packet: algo 1, keyid A42704B92866382A - // version 4, created 1396409682, md5len 0, sigclass 0x1f - // digest algo 2, begin of digest a9 84 - // hashed subpkt 2 len 4 (sig created 2014-04-02) - // hashed subpkt 12 len 22 (revocation key: c=80 a=1 f=CE094AA433F7040BB2DDF0BE3893CB843D0FE70C) - // hashed subpkt 7 len 1 (not revocable) - // subpkt 16 len 8 (issuer key ID A42704B92866382A) - // data: [1024 bits] - - id := uint64(0xA42704B92866382A) - keys := kring.KeysById(id) - if len(keys) != 1 { - t.Errorf("Expected to find key id %X, but got %d matches", id, len(keys)) - } -} - -func TestKeyRevocation(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(revokedKeyHex)) - if err != nil { - t.Fatal(err) - } - - // revokedKeyHex contains these keys: - // pub 1024R/9A34F7C0 2014-03-25 [revoked: 2014-03-25] - // sub 1024R/1BA3CD60 2014-03-25 [revoked: 2014-03-25] - ids := []uint64{0xA401D9F09A34F7C0, 0x5CD3BE0A1BA3CD60} - - for _, id := range ids { - keys := kring.KeysById(id) - if len(keys) != 1 { - t.Errorf("Expected KeysById to find revoked key %X, but got %d matches", id, len(keys)) - } - keys = kring.KeysByIdUsage(id, 0) - if len(keys) != 0 { - t.Errorf("Expected KeysByIdUsage to filter out revoked key %X, but got %d matches", id, len(keys)) - } - } -} - -func TestSubkeyRevocation(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(revokedSubkeyHex)) - if err != nil { - t.Fatal(err) - } - - // revokedSubkeyHex contains these keys: - // pub 1024R/4EF7E4BECCDE97F0 2014-03-25 - // sub 1024R/D63636E2B96AE423 2014-03-25 - // sub 1024D/DBCE4EE19529437F 2014-03-25 - // sub 1024R/677815E371C2FD23 2014-03-25 [revoked: 2014-03-25] - validKeys := []uint64{0x4EF7E4BECCDE97F0, 0xD63636E2B96AE423, 0xDBCE4EE19529437F} - revokedKey := uint64(0x677815E371C2FD23) - - for _, id := range validKeys { - keys := kring.KeysById(id) - if len(keys) != 1 { - t.Errorf("Expected KeysById to find key %X, but got %d matches", id, len(keys)) - } - keys = kring.KeysByIdUsage(id, 0) - if len(keys) != 1 { - t.Errorf("Expected KeysByIdUsage to find key %X, but got %d matches", id, len(keys)) - } - } - - keys := kring.KeysById(revokedKey) - if len(keys) != 1 { - t.Errorf("Expected KeysById to find key %X, but got %d matches", revokedKey, len(keys)) - } - - keys = kring.KeysByIdUsage(revokedKey, 0) - if len(keys) != 0 { - t.Errorf("Expected KeysByIdUsage to filter out revoked key %X, but got %d matches", revokedKey, len(keys)) - } -} - -func TestKeyUsage(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex)) - if err != nil { - t.Fatal(err) - } - - // subkeyUsageHex contains these keys: - // pub 1024R/2866382A created: 2014-04-01 expires: never usage: SC - // sub 1024R/936C9153 created: 2014-04-01 expires: never usage: E - // sub 1024R/64D5F5BB created: 2014-04-02 expires: never usage: E - // sub 1024D/BC0BA992 created: 2014-04-02 expires: never usage: S - certifiers := []uint64{0xA42704B92866382A} - signers := []uint64{0xA42704B92866382A, 0x42CE2C64BC0BA992} - encrypters := []uint64{0x09C0C7D9936C9153, 0xC104E98664D5F5BB} - - for _, id := range certifiers { - keys := kring.KeysByIdUsage(id, packet.KeyFlagCertify) - if len(keys) == 1 { - if keys[0].PublicKey.KeyId != id { - t.Errorf("Expected to find certifier key id %X, but got %X", id, keys[0].PublicKey.KeyId) - } - } else { - t.Errorf("Expected one match for certifier key id %X, but got %d matches", id, len(keys)) - } - } - - for _, id := range signers { - keys := kring.KeysByIdUsage(id, packet.KeyFlagSign) - if len(keys) == 1 { - if keys[0].PublicKey.KeyId != id { - t.Errorf("Expected to find signing key id %X, but got %X", id, keys[0].PublicKey.KeyId) - } - } else { - t.Errorf("Expected one match for signing key id %X, but got %d matches", id, len(keys)) - } - - // This keyring contains no encryption keys that are also good for signing. - keys = kring.KeysByIdUsage(id, packet.KeyFlagEncryptStorage|packet.KeyFlagEncryptCommunications) - if len(keys) != 0 { - t.Errorf("Unexpected match for encryption key id %X", id) - } - } - - for _, id := range encrypters { - keys := kring.KeysByIdUsage(id, packet.KeyFlagEncryptStorage|packet.KeyFlagEncryptCommunications) - if len(keys) == 1 { - if keys[0].PublicKey.KeyId != id { - t.Errorf("Expected to find encryption key id %X, but got %X", id, keys[0].PublicKey.KeyId) - } - } else { - t.Errorf("Expected one match for encryption key id %X, but got %d matches", id, len(keys)) - } - - // This keyring contains no encryption keys that are also good for signing. - keys = kring.KeysByIdUsage(id, packet.KeyFlagSign) - if len(keys) != 0 { - t.Errorf("Unexpected match for signing key id %X", id) - } - } -} - -func TestIdVerification(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex)) - if err != nil { - t.Fatal(err) - } - if err := kring[1].PrivateKey.Decrypt([]byte("passphrase")); err != nil { - t.Fatal(err) - } - - const identity = "Test Key 1 (RSA)" - if err := kring[0].SignIdentity(identity, kring[1], nil); err != nil { - t.Fatal(err) - } - - ident, ok := kring[0].Identities[identity] - if !ok { - t.Fatal("identity missing from key after signing") - } - - checked := false - for _, sig := range ident.Signatures { - if sig.IssuerKeyId == nil || *sig.IssuerKeyId != kring[1].PrimaryKey.KeyId { - continue - } - - if err := kring[1].PrimaryKey.VerifyUserIdSignature(identity, kring[0].PrimaryKey, sig); err != nil { - t.Fatalf("error verifying new identity signature: %s", err) - } - checked = true - break - } - - if !checked { - t.Fatal("didn't find identity signature in Entity") - } -} - -func TestNewEntityWithPreferredHash(t *testing.T) { - c := &packet.Config{ - DefaultHash: crypto.SHA256, - } - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", c) - if err != nil { - t.Fatal(err) - } - - for _, identity := range entity.Identities { - if len(identity.SelfSignature.PreferredHash) == 0 { - t.Fatal("didn't find a preferred hash in self signature") - } - ph := hashToHashId(c.DefaultHash) - if identity.SelfSignature.PreferredHash[0] != ph { - t.Fatalf("Expected preferred hash to be %d, got %d", ph, identity.SelfSignature.PreferredHash[0]) - } - } -} - -func TestNewEntityWithoutPreferredHash(t *testing.T) { - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", nil) - if err != nil { - t.Fatal(err) - } - - for _, identity := range entity.Identities { - if len(identity.SelfSignature.PreferredHash) != 0 { - t.Fatalf("Expected preferred hash to be empty but got length %d", len(identity.SelfSignature.PreferredHash)) - } - } -} - -func TestNewEntityCorrectName(t *testing.T) { - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", nil) - if err != nil { - t.Fatal(err) - } - if len(entity.Identities) != 1 { - t.Fatalf("len(entity.Identities) = %d, want 1", len(entity.Identities)) - } - var got string - for _, i := range entity.Identities { - got = i.Name - } - want := "Golang Gopher (Test Key) " - if got != want { - t.Fatalf("Identity.Name = %q, want %q", got, want) - } -} - -func TestNewEntityWithPreferredSymmetric(t *testing.T) { - c := &packet.Config{ - DefaultCipher: packet.CipherAES256, - } - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", c) - if err != nil { - t.Fatal(err) - } - - for _, identity := range entity.Identities { - if len(identity.SelfSignature.PreferredSymmetric) == 0 { - t.Fatal("didn't find a preferred cipher in self signature") - } - if identity.SelfSignature.PreferredSymmetric[0] != uint8(c.DefaultCipher) { - t.Fatalf("Expected preferred cipher to be %d, got %d", uint8(c.DefaultCipher), identity.SelfSignature.PreferredSymmetric[0]) - } - } -} - -func TestNewEntityWithoutPreferredSymmetric(t *testing.T) { - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", nil) - if err != nil { - t.Fatal(err) - } - - for _, identity := range entity.Identities { - if len(identity.SelfSignature.PreferredSymmetric) != 0 { - t.Fatalf("Expected preferred cipher to be empty but got length %d", len(identity.SelfSignature.PreferredSymmetric)) - } - } -} - -func TestNewEntityPublicSerialization(t *testing.T) { - entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", nil) - if err != nil { - t.Fatal(err) - } - serializedEntity := bytes.NewBuffer(nil) - entity.Serialize(serializedEntity) - - _, err = ReadEntity(packet.NewReader(bytes.NewBuffer(serializedEntity.Bytes()))) - if err != nil { - t.Fatal(err) - } -} - -const expiringKeyHex = "988d0451d1ec5d010400ba3385721f2dc3f4ab096b2ee867ab77213f0a27a8538441c35d2fa225b08798a1439a66a5150e6bdc3f40f5d28d588c712394c632b6299f77db8c0d48d37903fb72ebd794d61be6aa774688839e5fdecfe06b2684cc115d240c98c66cb1ef22ae84e3aa0c2b0c28665c1e7d4d044e7f270706193f5223c8d44e0d70b7b8da830011010001b40f4578706972792074657374206b657988be041301020028050251d1ec5d021b03050900278d00060b090807030206150802090a0b0416020301021e01021780000a091072589ad75e237d8c033503fd10506d72837834eb7f994117740723adc39227104b0d326a1161871c0b415d25b4aedef946ca77ea4c05af9c22b32cf98be86ab890111fced1ee3f75e87b7cc3c00dc63bbc85dfab91c0dc2ad9de2c4d13a34659333a85c6acc1a669c5e1d6cecb0cf1e56c10e72d855ae177ddc9e766f9b2dda57ccbb75f57156438bbdb4e42b88d0451d1ec5d0104009c64906559866c5cb61578f5846a94fcee142a489c9b41e67b12bb54cfe86eb9bc8566460f9a720cb00d6526fbccfd4f552071a8e3f7744b1882d01036d811ee5a3fb91a1c568055758f43ba5d2c6a9676b012f3a1a89e47bbf624f1ad571b208f3cc6224eb378f1645dd3d47584463f9eadeacfd1ce6f813064fbfdcc4b5a53001101000188a504180102000f021b0c050251d1f06b050900093e89000a091072589ad75e237d8c20e00400ab8310a41461425b37889c4da28129b5fae6084fafbc0a47dd1adc74a264c6e9c9cc125f40462ee1433072a58384daef88c961c390ed06426a81b464a53194c4e291ddd7e2e2ba3efced01537d713bd111f48437bde2363446200995e8e0d4e528dda377fd1e8f8ede9c8e2198b393bd86852ce7457a7e3daf74d510461a5b77b88d0451d1ece8010400b3a519f83ab0010307e83bca895170acce8964a044190a2b368892f7a244758d9fc193482648acb1fb9780d28cc22d171931f38bb40279389fc9bf2110876d4f3db4fcfb13f22f7083877fe56592b3b65251312c36f83ffcb6d313c6a17f197dd471f0712aad15a8537b435a92471ba2e5b0c72a6c72536c3b567c558d7b6051001101000188a504180102000f021b0c050251d1f07b050900279091000a091072589ad75e237d8ce69e03fe286026afacf7c97ee20673864d4459a2240b5655219950643c7dba0ac384b1d4359c67805b21d98211f7b09c2a0ccf6410c8c04d4ff4a51293725d8d6570d9d8bb0e10c07d22357caeb49626df99c180be02d77d1fe8ed25e7a54481237646083a9f89a11566cd20b9e995b1487c5f9e02aeb434f3a1897cd416dd0a87861838da3e9e" -const subkeyUsageHex = "988d04533a52bc010400d26af43085558f65b9e7dbc90cb9238015259aed5e954637adcfa2181548b2d0b60c65f1f42ec5081cbf1bc0a8aa4900acfb77070837c58f26012fbce297d70afe96e759ad63531f0037538e70dbf8e384569b9720d99d8eb39d8d0a2947233ed242436cb6ac7dfe74123354b3d0119b5c235d3dd9c9d6c004f8ffaf67ad8583001101000188b7041f010200210502533b8552170c8001ce094aa433f7040bb2ddf0be3893cb843d0fe70c020700000a0910a42704b92866382aa98404009d63d916a27543da4221c60087c33f1c44bec9998c5438018ed370cca4962876c748e94b73eb39c58eb698063f3fd6346d58dd2a11c0247934c4a9d71f24754f7468f96fb24c3e791dd2392b62f626148ad724189498cbf993db2df7c0cdc2d677c35da0f16cb16c9ce7c33b4de65a4a91b1d21a130ae9cc26067718910ef8e2b417556d627261203c756d627261407379642e65642e61753e88b80413010200220502533a52bc021b03060b090807030206150802090a0b0416020301021e01021780000a0910a42704b92866382a47840400c0c2bd04f5fca586de408b395b3c280a278259c93eaaa8b79a53b97003f8ed502a8a00446dd9947fb462677e4fcac0dac2f0701847d15130aadb6cd9e0705ea0cf5f92f129136c7be21a718d46c8e641eb7f044f2adae573e11ae423a0a9ca51324f03a8a2f34b91fa40c3cc764bee4dccadedb54c768ba0469b683ea53f1c29b88d04533a52bc01040099c92a5d6f8b744224da27bc2369127c35269b58bec179de6bbc038f749344222f85a31933224f26b70243c4e4b2d242f0c4777eaef7b5502f9dad6d8bf3aaeb471210674b74de2d7078af497d55f5cdad97c7bedfbc1b41e8065a97c9c3d344b21fc81d27723af8e374bc595da26ea242dccb6ae497be26eea57e563ed517e90011010001889f0418010200090502533a52bc021b0c000a0910a42704b92866382afa1403ff70284c2de8a043ff51d8d29772602fa98009b7861c540535f874f2c230af8caf5638151a636b21f8255003997ccd29747fdd06777bb24f9593bd7d98a3e887689bf902f999915fcc94625ae487e5d13e6616f89090ebc4fdc7eb5cad8943e4056995bb61c6af37f8043016876a958ec7ebf39c43d20d53b7f546cfa83e8d2604b88d04533b8283010400c0b529316dbdf58b4c54461e7e669dc11c09eb7f73819f178ccd4177b9182b91d138605fcf1e463262fabefa73f94a52b5e15d1904635541c7ea540f07050ce0fb51b73e6f88644cec86e91107c957a114f69554548a85295d2b70bd0b203992f76eb5d493d86d9eabcaa7ef3fc7db7e458438db3fcdb0ca1cc97c638439a9170011010001889f0418010200090502533b8283021b0c000a0910a42704b92866382adc6d0400cfff6258485a21675adb7a811c3e19ebca18851533f75a7ba317950b9997fda8d1a4c8c76505c08c04b6c2cc31dc704d33da36a21273f2b388a1a706f7c3378b66d887197a525936ed9a69acb57fe7f718133da85ec742001c5d1864e9c6c8ea1b94f1c3759cebfd93b18606066c063a63be86085b7e37bdbc65f9a915bf084bb901a204533b85cd110400aed3d2c52af2b38b5b67904b0ef73d6dd7aef86adb770e2b153cd22489654dcc91730892087bb9856ae2d9f7ed1eb48f214243fe86bfe87b349ebd7c30e630e49c07b21fdabf78b7a95c8b7f969e97e3d33f2e074c63552ba64a2ded7badc05ce0ea2be6d53485f6900c7860c7aa76560376ce963d7271b9b54638a4028b573f00a0d8854bfcdb04986141568046202192263b9b67350400aaa1049dbc7943141ef590a70dcb028d730371d92ea4863de715f7f0f16d168bd3dc266c2450457d46dcbbf0b071547e5fbee7700a820c3750b236335d8d5848adb3c0da010e998908dfd93d961480084f3aea20b247034f8988eccb5546efaa35a92d0451df3aaf1aee5aa36a4c4d462c760ecd9cebcabfbe1412b1f21450f203fd126687cd486496e971a87fd9e1a8a765fe654baa219a6871ab97768596ab05c26c1aeea8f1a2c72395a58dbc12ef9640d2b95784e974a4d2d5a9b17c25fedacfe551bda52602de8f6d2e48443f5dd1a2a2a8e6a5e70ecdb88cd6e766ad9745c7ee91d78cc55c3d06536b49c3fee6c3d0b6ff0fb2bf13a314f57c953b8f4d93bf88e70418010200090502533b85cd021b0200520910a42704b92866382a47200419110200060502533b85cd000a091042ce2c64bc0ba99214b2009e26b26852c8b13b10c35768e40e78fbbb48bd084100a0c79d9ea0844fa5853dd3c85ff3ecae6f2c9dd6c557aa04008bbbc964cd65b9b8299d4ebf31f41cc7264b8cf33a00e82c5af022331fac79efc9563a822497ba012953cefe2629f1242fcdcb911dbb2315985bab060bfd58261ace3c654bdbbe2e8ed27a46e836490145c86dc7bae15c011f7e1ffc33730109b9338cd9f483e7cef3d2f396aab5bd80efb6646d7e778270ee99d934d187dd98" -const revokedKeyHex = "988d045331ce82010400c4fdf7b40a5477f206e6ee278eaef888ca73bf9128a9eef9f2f1ddb8b7b71a4c07cfa241f028a04edb405e4d916c61d6beabc333813dc7b484d2b3c52ee233c6a79b1eea4e9cc51596ba9cd5ac5aeb9df62d86ea051055b79d03f8a4fa9f38386f5bd17529138f3325d46801514ea9047977e0829ed728e68636802796801be10011010001889f04200102000905025331d0e3021d03000a0910a401d9f09a34f7c042aa040086631196405b7e6af71026b88e98012eab44aa9849f6ef3fa930c7c9f23deaedba9db1538830f8652fb7648ec3fcade8dbcbf9eaf428e83c6cbcc272201bfe2fbb90d41963397a7c0637a1a9d9448ce695d9790db2dc95433ad7be19eb3de72dacf1d6db82c3644c13eae2a3d072b99bb341debba012c5ce4006a7d34a1f4b94b444526567205265766f6b657220283c52656727732022424d204261726973746122204b657920262530305c303e5c29203c72656740626d626172697374612e636f2e61753e88b704130102002205025331ce82021b03060b090807030206150802090a0b0416020301021e01021780000a0910a401d9f09a34f7c0019c03f75edfbeb6a73e7225ad3cc52724e2872e04260d7daf0d693c170d8c4b243b8767bc7785763533febc62ec2600c30603c433c095453ede59ff2fcabeb84ce32e0ed9d5cf15ffcbc816202b64370d4d77c1e9077d74e94a16fb4fa2e5bec23a56d7a73cf275f91691ae1801a976fcde09e981a2f6327ac27ea1fecf3185df0d56889c04100102000605025331cfb5000a0910fe9645554e8266b64b4303fc084075396674fb6f778d302ac07cef6bc0b5d07b66b2004c44aef711cbac79617ef06d836b4957522d8772dd94bf41a2f4ac8b1ee6d70c57503f837445a74765a076d07b829b8111fc2a918423ddb817ead7ca2a613ef0bfb9c6b3562aec6c3cf3c75ef3031d81d95f6563e4cdcc9960bcb386c5d757b104fcca5fe11fc709df884604101102000605025331cfe7000a09107b15a67f0b3ddc0317f6009e360beea58f29c1d963a22b962b80788c3fa6c84e009d148cfde6b351469b8eae91187eff07ad9d08fcaab88d045331ce820104009f25e20a42b904f3fa555530fe5c46737cf7bd076c35a2a0d22b11f7e0b61a69320b768f4a80fe13980ce380d1cfc4a0cd8fbe2d2e2ef85416668b77208baa65bf973fe8e500e78cc310d7c8705cdb34328bf80e24f0385fce5845c33bc7943cf6b11b02348a23da0bf6428e57c05135f2dc6bd7c1ce325d666d5a5fd2fd5e410011010001889f04180102000905025331ce82021b0c000a0910a401d9f09a34f7c0418003fe34feafcbeaef348a800a0d908a7a6809cc7304017d820f70f0474d5e23cb17e38b67dc6dca282c6ca00961f4ec9edf2738d0f087b1d81e4871ef08e1798010863afb4eac4c44a376cb343be929c5be66a78cfd4456ae9ec6a99d97f4e1c3ff3583351db2147a65c0acef5c003fb544ab3a2e2dc4d43646f58b811a6c3a369d1f" -const revokedSubkeyHex = "988d04533121f6010400aefc803a3e4bb1a61c86e8a86d2726c6a43e0079e9f2713f1fa017e9854c83877f4aced8e331d675c67ea83ddab80aacbfa0b9040bb12d96f5a3d6be09455e2a76546cbd21677537db941cab710216b6d24ec277ee0bd65b910f416737ed120f6b93a9d3b306245c8cfd8394606fdb462e5cf43c551438d2864506c63367fc890011010001b41d416c696365203c616c69636540626d626172697374612e636f2e61753e88bb041301020025021b03060b090807030206150802090a0b0416020301021e01021780050253312798021901000a09104ef7e4beccde97f015a803ff5448437780f63263b0df8442a995e7f76c221351a51edd06f2063d8166cf3157aada4923dfc44aa0f2a6a4da5cf83b7fe722ba8ab416c976e77c6b5682e7f1069026673bd0de56ba06fd5d7a9f177607f277d9b55ff940a638c3e68525c67517e2b3d976899b93ca267f705b3e5efad7d61220e96b618a4497eab8d04403d23f8846041011020006050253312910000a09107b15a67f0b3ddc03d96e009f50b6365d86c4be5d5e9d0ea42d5e56f5794c617700a0ab274e19c2827780016d23417ce89e0a2c0d987d889c04100102000605025331cf7a000a0910a401d9f09a34f7c0ee970400aca292f213041c9f3b3fc49148cbda9d84afee6183c8dd6c5ff2600b29482db5fecd4303797be1ee6d544a20a858080fec43412061c9a71fae4039fd58013b4ae341273e6c66ad4c7cdd9e68245bedb260562e7b166f2461a1032f2b38c0e0e5715fb3d1656979e052b55ca827a76f872b78a9fdae64bc298170bfcebedc1271b41a416c696365203c616c696365407379646973702e6f722e61753e88b804130102002205025331278b021b03060b090807030206150802090a0b0416020301021e01021780000a09104ef7e4beccde97f06a7003fa03c3af68d272ebc1fa08aa72a03b02189c26496a2833d90450801c4e42c5b5f51ad96ce2d2c9cef4b7c02a6a2fcf1412d6a2d486098eb762f5010a201819c17fd2888aec8eda20c65a3b75744de7ee5cc8ac7bfc470cbe3cb982720405a27a3c6a8c229cfe36905f881b02ed5680f6a8f05866efb9d6c5844897e631deb949ca8846041011020006050253312910000a09107b15a67f0b3ddc0347bc009f7fa35db59147469eb6f2c5aaf6428accb138b22800a0caa2f5f0874bacc5909c652a57a31beda65eddd5889c04100102000605025331cf7a000a0910a401d9f09a34f7c0316403ff46f2a5c101256627f16384d34a38fb47a6c88ba60506843e532d91614339fccae5f884a5741e7582ffaf292ba38ee10a270a05f139bde3814b6a077e8cd2db0f105ebea2a83af70d385f13b507fac2ad93ff79d84950328bb86f3074745a8b7f9b64990fb142e2a12976e27e8d09a28dc5621f957ac49091116da410ac3cbde1b88d04533121f6010400cbd785b56905e4192e2fb62a720727d43c4fa487821203cf72138b884b78b701093243e1d8c92a0248a6c0203a5a88693da34af357499abacaf4b3309c640797d03093870a323b4b6f37865f6eaa2838148a67df4735d43a90ca87942554cdf1c4a751b1e75f9fd4ce4e97e278d6c1c7ed59d33441df7d084f3f02beb68896c70011010001889f0418010200090502533121f6021b0c000a09104ef7e4beccde97f0b98b03fc0a5ccf6a372995835a2f5da33b282a7d612c0ab2a97f59cf9fff73e9110981aac2858c41399afa29624a7fd8a0add11654e3d882c0fd199e161bdad65e5e2548f7b68a437ea64293db1246e3011cbb94dc1bcdeaf0f2539bd88ff16d95547144d97cead6a8c5927660a91e6db0d16eb36b7b49a3525b54d1644e65599b032b7eb901a204533127a0110400bd3edaa09eff9809c4edc2c2a0ebe52e53c50a19c1e49ab78e6167bf61473bb08f2050d78a5cbbc6ed66aff7b42cd503f16b4a0b99fa1609681fca9b7ce2bbb1a5b3864d6cdda4d7ef7849d156d534dea30fb0efb9e4cf8959a2b2ce623905882d5430b995a15c3b9fe92906086788b891002924f94abe139b42cbbfaaabe42f00a0b65dc1a1ad27d798adbcb5b5ad02d2688c89477b03ff4eebb6f7b15a73b96a96bed201c0e5e4ea27e4c6e2dd1005b94d4b90137a5b1cf5e01c6226c070c4cc999938101578877ee76d296b9aab8246d57049caacf489e80a3f40589cade790a020b1ac146d6f7a6241184b8c7fcde680eae3188f5dcbe846d7f7bdad34f6fcfca08413e19c1d5df83fc7c7c627d493492e009c2f52a80400a2fe82de87136fd2e8845888c4431b032ba29d9a29a804277e31002a8201fb8591a3e55c7a0d0881496caf8b9fb07544a5a4879291d0dc026a0ea9e5bd88eb4aa4947bbd694b25012e208a250d65ddc6f1eea59d3aed3b4ec15fcab85e2afaa23a40ab1ef9ce3e11e1bc1c34a0e758e7aa64deb8739276df0af7d4121f834a9b88e70418010200090502533127a0021b02005209104ef7e4beccde97f047200419110200060502533127a0000a0910dbce4ee19529437fe045009c0b32f5ead48ee8a7e98fac0dea3d3e6c0e2c552500a0ad71fadc5007cfaf842d9b7db3335a8cdad15d3d1a6404009b08e2c68fe8f3b45c1bb72a4b3278cdf3012aa0f229883ad74aa1f6000bb90b18301b2f85372ca5d6b9bf478d235b733b1b197d19ccca48e9daf8e890cb64546b4ce1b178faccfff07003c172a2d4f5ebaba9f57153955f3f61a9b80a4f5cb959908f8b211b03b7026a8a82fc612bfedd3794969bcf458c4ce92be215a1176ab88d045331d144010400a5063000c5aaf34953c1aa3bfc95045b3aab9882b9a8027fecfe2142dc6b47ba8aca667399990244d513dd0504716908c17d92c65e74219e004f7b83fc125e575dd58efec3ab6dd22e3580106998523dea42ec75bf9aa111734c82df54630bebdff20fe981cfc36c76f865eb1c2fb62c9e85bc3a6e5015a361a2eb1c8431578d0011010001889f04280102000905025331d433021d03000a09104ef7e4beccde97f02e5503ff5e0630d1b65291f4882b6d40a29da4616bb5088717d469fbcc3648b8276de04a04988b1f1b9f3e18f52265c1f8b6c85861691c1a6b8a3a25a1809a0b32ad330aec5667cb4262f4450649184e8113849b05e5ad06a316ea80c001e8e71838190339a6e48bbde30647bcf245134b9a97fa875c1d83a9862cae87ffd7e2c4ce3a1b89013d04180102000905025331d144021b0200a809104ef7e4beccde97f09d2004190102000605025331d144000a0910677815e371c2fd23522203fe22ab62b8e7a151383cea3edd3a12995693911426f8ccf125e1f6426388c0010f88d9ca7da2224aee8d1c12135998640c5e1813d55a93df472faae75bef858457248db41b4505827590aeccf6f9eb646da7f980655dd3050c6897feddddaca90676dee856d66db8923477d251712bb9b3186b4d0114daf7d6b59272b53218dd1da94a03ff64006fcbe71211e5daecd9961fba66cdb6de3f914882c58ba5beddeba7dcb950c1156d7fba18c19ea880dccc800eae335deec34e3b84ac75ffa24864f782f87815cda1c0f634b3dd2fa67cea30811d21723d21d9551fa12ccbcfa62b6d3a15d01307b99925707992556d50065505b090aadb8579083a20fe65bd2a270da9b011" -const missingCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK----- -Charset: UTF-8 - -mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY -ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG -zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54 -QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ -QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo -9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu -Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/ -dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R -JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL -ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew -RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW -/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu -yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAJcXQeP+NmuciE99YcJoffxv -2gVLU4ZXBNHEaP0mgaJ1+tmMD089vUQAcyGRvw8jfsNsVZQIOAuRxY94aHQhIRHR -bUzBN28ofo/AJJtfx62C15xt6fDKRV6HXYqAiygrHIpEoRLyiN69iScUsjIJeyFL -C8wa72e8pSL6dkHoaV1N9ZH/xmrJ+k0vsgkQaAh9CzYufncDxcwkoP+aOlGtX1gP -WwWoIbz0JwLEMPHBWvDDXQcQPQTYQyj+LGC9U6f9VZHN25E94subM1MjuT9OhN9Y -MLfWaaIc5WyhLFyQKW2Upofn9wSFi8ubyBnv640Dfd0rVmaWv7LNTZpoZ/GbJAMA -EQEAAYkBHwQYAQIACQUCU5ygeQIbAgAKCRDt1A0FCB6SP0zCB/sEzaVR38vpx+OQ -MMynCBJrakiqDmUZv9xtplY7zsHSQjpd6xGflbU2n+iX99Q+nav0ETQZifNUEd4N -1ljDGQejcTyKD6Pkg6wBL3x9/RJye7Zszazm4+toJXZ8xJ3800+BtaPoI39akYJm -+ijzbskvN0v/j5GOFJwQO0pPRAFtdHqRs9Kf4YanxhedB4dIUblzlIJuKsxFit6N -lgGRblagG3Vv2eBszbxzPbJjHCgVLR3RmrVezKOsZjr/2i7X+xLWIR0uD3IN1qOW -CXQxLBizEEmSNVNxsp7KPGTLnqO3bPtqFirxS9PJLIMPTPLNBY7ZYuPNTMqVIUWF -4artDmrG -=7FfJ ------END PGP PUBLIC KEY BLOCK-----` - -const invalidCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK----- - -mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY -ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG -zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54 -QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ -QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo -9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu -Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/ -dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R -JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL -ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew -RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW -/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu -yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAIINDqlj7X6jYKc6DjwrOkjQ -UIRWbQQar0LwmNilehmt70g5DCL1SYm9q4LcgJJ2Nhxj0/5qqsYib50OSWMcKeEe -iRXpXzv1ObpcQtI5ithp0gR53YPXBib80t3bUzomQ5UyZqAAHzMp3BKC54/vUrSK -FeRaxDzNLrCeyI00+LHNUtwghAqHvdNcsIf8VRumK8oTm3RmDh0TyjASWYbrt9c8 -R1Um3zuoACOVy+mEIgIzsfHq0u7dwYwJB5+KeM7ZLx+HGIYdUYzHuUE1sLwVoELh -+SHIGHI1HDicOjzqgajShuIjj5hZTyQySVprrsLKiXS6NEwHAP20+XjayJ/R3tEA -EQEAAYkCPgQYAQIBKAUCU5ygeQIbAsBdIAQZAQIABgUCU5ygeQAKCRCpVlnFZmhO -52RJB/9uD1MSa0wjY6tHOIgquZcP3bHBvHmrHNMw9HR2wRCMO91ZkhrpdS3ZHtgb -u3/55etj0FdvDo1tb8P8FGSVtO5Vcwf5APM8sbbqoi8L951Q3i7qt847lfhu6sMl -w0LWFvPTOLHrliZHItPRjOltS1WAWfr2jUYhsU9ytaDAJmvf9DujxEOsN5G1YJep -54JCKVCkM/y585Zcnn+yxk/XwqoNQ0/iJUT9qRrZWvoeasxhl1PQcwihCwss44A+ -YXaAt3hbk+6LEQuZoYS73yR3WHj+42tfm7YxRGeubXfgCEz/brETEWXMh4pe0vCL -bfWrmfSPq2rDegYcAybxRQz0lF8PAAoJEO3UDQUIHpI/exkH/0vQfdHA8g/N4T6E -i6b1CUVBAkvtdJpCATZjWPhXmShOw62gkDw306vHPilL4SCvEEi4KzG72zkp6VsB -DSRcpxCwT4mHue+duiy53/aRMtSJ+vDfiV1Vhq+3sWAck/yUtfDU9/u4eFaiNok1 -8/Gd7reyuZt5CiJnpdPpjCwelK21l2w7sHAnJF55ITXdOxI8oG3BRKufz0z5lyDY -s2tXYmhhQIggdgelN8LbcMhWs/PBbtUr6uZlNJG2lW1yscD4aI529VjwJlCeo745 -U7pO4eF05VViUJ2mmfoivL3tkhoTUWhx8xs8xCUcCg8DoEoSIhxtOmoTPR22Z9BL -6LCg2mg= -=Dhm4 ------END PGP PUBLIC KEY BLOCK-----` - -const goodCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 - -mI0EVUqeVwEEAMufHRrMPWK3gyvi0O0tABCs/oON9zV9KDZlr1a1M91ShCSFwCPo -7r80PxdWVWcj0V5h50/CJYtpN3eE/mUIgW2z1uDYQF1OzrQ8ubrksfsJvpAhENom -lTQEppv9mV8qhcM278teb7TX0pgrUHLYF5CfPdp1L957JLLXoQR/lwLVABEBAAG0 -E2dvb2Qtc2lnbmluZy1zdWJrZXmIuAQTAQIAIgUCVUqeVwIbAwYLCQgHAwIGFQgC -CQoLBBYCAwECHgECF4AACgkQNRjL95IRWP69XQQAlH6+eyXJN4DZTLX78KGjHrsw -6FCvxxClEPtPUjcJy/1KCRQmtLAt9PbbA78dvgzjDeZMZqRAwdjyJhjyg/fkU2OH -7wq4ktjUu+dLcOBb+BFMEY+YjKZhf6EJuVfxoTVr5f82XNPbYHfTho9/OABKH6kv -X70PaKZhbwnwij8Nts65AaIEVUqftREEAJ3WxZfqAX0bTDbQPf2CMT2IVMGDfhK7 -GyubOZgDFFjwUJQvHNvsrbeGLZ0xOBumLINyPO1amIfTgJNm1iiWFWfmnHReGcDl -y5mpYG60Mb79Whdcer7CMm3AqYh/dW4g6IB02NwZMKoUHo3PXmFLxMKXnWyJ0clw -R0LI/Qn509yXAKDh1SO20rqrBM+EAP2c5bfI98kyNwQAi3buu94qo3RR1ZbvfxgW -CKXDVm6N99jdZGNK7FbRifXqzJJDLcXZKLnstnC4Sd3uyfyf1uFhmDLIQRryn5m+ -LBYHfDBPN3kdm7bsZDDq9GbTHiFZUfm/tChVKXWxkhpAmHhU/tH6GGzNSMXuIWSO -aOz3Rqq0ED4NXyNKjdF9MiwD/i83S0ZBc0LmJYt4Z10jtH2B6tYdqnAK29uQaadx -yZCX2scE09UIm32/w7pV77CKr1Cp/4OzAXS1tmFzQ+bX7DR+Gl8t4wxr57VeEMvl -BGw4Vjh3X8//m3xynxycQU18Q1zJ6PkiMyPw2owZ/nss3hpSRKFJsxMLhW3fKmKr -Ey2KiOcEGAECAAkFAlVKn7UCGwIAUgkQNRjL95IRWP5HIAQZEQIABgUCVUqftQAK -CRD98VjDN10SqkWrAKDTpEY8D8HC02E/KVC5YUI01B30wgCgurpILm20kXEDCeHp -C5pygfXw1DJrhAP+NyPJ4um/bU1I+rXaHHJYroYJs8YSweiNcwiHDQn0Engh/mVZ -SqLHvbKh2dL/RXymC3+rjPvQf5cup9bPxNMa6WagdYBNAfzWGtkVISeaQW+cTEp/ -MtgVijRGXR/lGLGETPg2X3Afwn9N9bLMBkBprKgbBqU7lpaoPupxT61bL70= -=vtbN ------END PGP PUBLIC KEY BLOCK-----` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed.go deleted file mode 100644 index 54d9d07d14..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "compress/bzip2" - "compress/flate" - "compress/zlib" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "io" - "strconv" -) - -// Compressed represents a compressed OpenPGP packet. The decompressed contents -// will contain more OpenPGP packets. See RFC 4880, section 5.6. -type Compressed struct { - Body io.Reader -} - -const ( - NoCompression = flate.NoCompression - BestSpeed = flate.BestSpeed - BestCompression = flate.BestCompression - DefaultCompression = flate.DefaultCompression -) - -// CompressionConfig contains compressor configuration settings. -type CompressionConfig struct { - // Level is the compression level to use. It must be set to - // between -1 and 9, with -1 causing the compressor to use the - // default compression level, 0 causing the compressor to use - // no compression and 1 to 9 representing increasing (better, - // slower) compression levels. If Level is less than -1 or - // more then 9, a non-nil error will be returned during - // encryption. See the constants above for convenient common - // settings for Level. - Level int -} - -func (c *Compressed) parse(r io.Reader) error { - var buf [1]byte - _, err := readFull(r, buf[:]) - if err != nil { - return err - } - - switch buf[0] { - case 1: - c.Body = flate.NewReader(r) - case 2: - c.Body, err = zlib.NewReader(r) - case 3: - c.Body = bzip2.NewReader(r) - default: - err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0]))) - } - - return err -} - -// compressedWriterCloser represents the serialized compression stream -// header and the compressor. Its Close() method ensures that both the -// compressor and serialized stream header are closed. Its Write() -// method writes to the compressor. -type compressedWriteCloser struct { - sh io.Closer // Stream Header - c io.WriteCloser // Compressor -} - -func (cwc compressedWriteCloser) Write(p []byte) (int, error) { - return cwc.c.Write(p) -} - -func (cwc compressedWriteCloser) Close() (err error) { - err = cwc.c.Close() - if err != nil { - return err - } - - return cwc.sh.Close() -} - -// SerializeCompressed serializes a compressed data packet to w and -// returns a WriteCloser to which the literal data packets themselves -// can be written and which MUST be closed on completion. If cc is -// nil, sensible defaults will be used to configure the compression -// algorithm. -func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) { - compressed, err := serializeStreamHeader(w, packetTypeCompressed) - if err != nil { - return - } - - _, err = compressed.Write([]byte{uint8(algo)}) - if err != nil { - return - } - - level := DefaultCompression - if cc != nil { - level = cc.Level - } - - var compressor io.WriteCloser - switch algo { - case CompressionZIP: - compressor, err = flate.NewWriter(compressed, level) - case CompressionZLIB: - compressor, err = zlib.NewWriterLevel(compressed, level) - default: - s := strconv.Itoa(int(algo)) - err = errors.UnsupportedError("Unsupported compression algorithm: " + s) - } - if err != nil { - return - } - - literaldata = compressedWriteCloser{compressed, compressor} - - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed_test.go deleted file mode 100644 index cb2d70bd41..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/compressed_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "encoding/hex" - "io" - "io/ioutil" - "testing" -) - -func TestCompressed(t *testing.T) { - packet, err := Read(readerFromHex(compressedHex)) - if err != nil { - t.Errorf("failed to read Compressed: %s", err) - return - } - - c, ok := packet.(*Compressed) - if !ok { - t.Error("didn't find Compressed packet") - return - } - - contents, err := ioutil.ReadAll(c.Body) - if err != nil && err != io.EOF { - t.Error(err) - return - } - - expected, _ := hex.DecodeString(compressedExpectedHex) - if !bytes.Equal(expected, contents) { - t.Errorf("got:%x want:%x", contents, expected) - } -} - -const compressedHex = "a3013b2d90c4e02b72e25f727e5e496a5e49b11e1700" -const compressedExpectedHex = "cb1062004d14c8fe636f6e74656e74732e0a" diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key.go deleted file mode 100644 index 6fe0bc0159..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto/rsa" - "encoding/binary" - "io" - "math/big" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -const encryptedKeyVersion = 3 - -// EncryptedKey represents a public-key encrypted session key. See RFC 4880, -// section 5.1. -type EncryptedKey struct { - KeyId uint64 - Algo PublicKeyAlgorithm - CipherFunc CipherFunction // only valid after a successful Decrypt - Key []byte // only valid after a successful Decrypt - - encryptedMPI1, encryptedMPI2 parsedMPI -} - -func (e *EncryptedKey) parse(r io.Reader) (err error) { - var buf [10]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != encryptedKeyVersion { - return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0]))) - } - e.KeyId = binary.BigEndian.Uint64(buf[1:9]) - e.Algo = PublicKeyAlgorithm(buf[9]) - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) - if err != nil { - return - } - case PubKeyAlgoElGamal: - e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) - if err != nil { - return - } - e.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r) - if err != nil { - return - } - } - _, err = consumeAll(r) - return -} - -func checksumKeyMaterial(key []byte) uint16 { - var checksum uint16 - for _, v := range key { - checksum += uint16(v) - } - return checksum -} - -// Decrypt decrypts an encrypted session key with the given private key. The -// private key must have been decrypted first. -// If config is nil, sensible defaults will be used. -func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error { - var err error - var b []byte - - // TODO(agl): use session key decryption routines here to avoid - // padding oracle attacks. - switch priv.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - k := priv.PrivateKey.(*rsa.PrivateKey) - b, err = rsa.DecryptPKCS1v15(config.Random(), k, padToKeySize(&k.PublicKey, e.encryptedMPI1.bytes)) - case PubKeyAlgoElGamal: - c1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes) - c2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes) - b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2) - default: - err = errors.InvalidArgumentError("cannot decrypted encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo))) - } - - if err != nil { - return err - } - - e.CipherFunc = CipherFunction(b[0]) - e.Key = b[1 : len(b)-2] - expectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1]) - checksum := checksumKeyMaterial(e.Key) - if checksum != expectedChecksum { - return errors.StructuralError("EncryptedKey checksum incorrect") - } - - return nil -} - -// Serialize writes the encrypted key packet, e, to w. -func (e *EncryptedKey) Serialize(w io.Writer) error { - var mpiLen int - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - mpiLen = 2 + len(e.encryptedMPI1.bytes) - case PubKeyAlgoElGamal: - mpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes) - default: - return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo))) - } - - serializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen) - - w.Write([]byte{encryptedKeyVersion}) - binary.Write(w, binary.BigEndian, e.KeyId) - w.Write([]byte{byte(e.Algo)}) - - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - writeMPIs(w, e.encryptedMPI1) - case PubKeyAlgoElGamal: - writeMPIs(w, e.encryptedMPI1, e.encryptedMPI2) - default: - panic("internal error") - } - - return nil -} - -// SerializeEncryptedKey serializes an encrypted key packet to w that contains -// key, encrypted to pub. -// If config is nil, sensible defaults will be used. -func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error { - var buf [10]byte - buf[0] = encryptedKeyVersion - binary.BigEndian.PutUint64(buf[1:9], pub.KeyId) - buf[9] = byte(pub.PubKeyAlgo) - - keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */) - keyBlock[0] = byte(cipherFunc) - copy(keyBlock[1:], key) - checksum := checksumKeyMaterial(key) - keyBlock[1+len(key)] = byte(checksum >> 8) - keyBlock[1+len(key)+1] = byte(checksum) - - switch pub.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - return serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock) - case PubKeyAlgoElGamal: - return serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock) - case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly: - return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) - } - - return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) -} - -func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error { - cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock) - if err != nil { - return errors.InvalidArgumentError("RSA encryption failed: " + err.Error()) - } - - packetLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText) - - err = serializeHeader(w, packetTypeEncryptedKey, packetLen) - if err != nil { - return err - } - _, err = w.Write(header[:]) - if err != nil { - return err - } - return writeMPI(w, 8*uint16(len(cipherText)), cipherText) -} - -func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error { - c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock) - if err != nil { - return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error()) - } - - packetLen := 10 /* header length */ - packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8 - packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8 - - err = serializeHeader(w, packetTypeEncryptedKey, packetLen) - if err != nil { - return err - } - _, err = w.Write(header[:]) - if err != nil { - return err - } - err = writeBig(w, c1) - if err != nil { - return err - } - return writeBig(w, c2) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key_test.go deleted file mode 100644 index f2fcf4d354..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/encrypted_key_test.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto/rsa" - "encoding/hex" - "fmt" - "math/big" - "testing" -) - -func bigFromBase10(s string) *big.Int { - b, ok := new(big.Int).SetString(s, 10) - if !ok { - panic("bigFromBase10 failed") - } - return b -} - -var encryptedKeyPub = rsa.PublicKey{ - E: 65537, - N: bigFromBase10("115804063926007623305902631768113868327816898845124614648849934718568541074358183759250136204762053879858102352159854352727097033322663029387610959884180306668628526686121021235757016368038585212410610742029286439607686208110250133174279811431933746643015923132833417396844716207301518956640020862630546868823"), -} - -var encryptedKeyRSAPriv = &rsa.PrivateKey{ - PublicKey: encryptedKeyPub, - D: bigFromBase10("32355588668219869544751561565313228297765464314098552250409557267371233892496951383426602439009993875125222579159850054973310859166139474359774543943714622292329487391199285040721944491839695981199720170366763547754915493640685849961780092241140181198779299712578774460837139360803883139311171713302987058393"), -} - -var encryptedKeyPriv = &PrivateKey{ - PublicKey: PublicKey{ - PubKeyAlgo: PubKeyAlgoRSA, - }, - PrivateKey: encryptedKeyRSAPriv, -} - -func TestDecryptingEncryptedKey(t *testing.T) { - for i, encryptedKeyHex := range []string{ - "c18c032a67d68660df41c70104005789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8", - // MPI can be shorter than the length of the key. - "c18b032a67d68660df41c70103f8e520c52ae9807183c669ce26e772e482dc5d8cf60e6f59316e145be14d2e5221ee69550db1d5618a8cb002a719f1f0b9345bde21536d410ec90ba86cac37748dec7933eb7f9873873b2d61d3321d1cd44535014f6df58f7bc0c7afb5edc38e1a974428997d2f747f9a173bea9ca53079b409517d332df62d805564cffc9be6", - } { - const expectedKeyHex = "d930363f7e0308c333b9618617ea728963d8df993665ae7be1092d4926fd864b" - - p, err := Read(readerFromHex(encryptedKeyHex)) - if err != nil { - t.Errorf("#%d: error from Read: %s", i, err) - return - } - ek, ok := p.(*EncryptedKey) - if !ok { - t.Errorf("#%d: didn't parse an EncryptedKey, got %#v", i, p) - return - } - - if ek.KeyId != 0x2a67d68660df41c7 || ek.Algo != PubKeyAlgoRSA { - t.Errorf("#%d: unexpected EncryptedKey contents: %#v", i, ek) - return - } - - err = ek.Decrypt(encryptedKeyPriv, nil) - if err != nil { - t.Errorf("#%d: error from Decrypt: %s", i, err) - return - } - - if ek.CipherFunc != CipherAES256 { - t.Errorf("#%d: unexpected EncryptedKey contents: %#v", i, ek) - return - } - - keyHex := fmt.Sprintf("%x", ek.Key) - if keyHex != expectedKeyHex { - t.Errorf("#%d: bad key, got %s want %s", i, keyHex, expectedKeyHex) - } - } -} - -func TestEncryptingEncryptedKey(t *testing.T) { - key := []byte{1, 2, 3, 4} - const expectedKeyHex = "01020304" - const keyId = 42 - - pub := &PublicKey{ - PublicKey: &encryptedKeyPub, - KeyId: keyId, - PubKeyAlgo: PubKeyAlgoRSAEncryptOnly, - } - - buf := new(bytes.Buffer) - err := SerializeEncryptedKey(buf, pub, CipherAES128, key, nil) - if err != nil { - t.Errorf("error writing encrypted key packet: %s", err) - } - - p, err := Read(buf) - if err != nil { - t.Errorf("error from Read: %s", err) - return - } - ek, ok := p.(*EncryptedKey) - if !ok { - t.Errorf("didn't parse an EncryptedKey, got %#v", p) - return - } - - if ek.KeyId != keyId || ek.Algo != PubKeyAlgoRSAEncryptOnly { - t.Errorf("unexpected EncryptedKey contents: %#v", ek) - return - } - - err = ek.Decrypt(encryptedKeyPriv, nil) - if err != nil { - t.Errorf("error from Decrypt: %s", err) - return - } - - if ek.CipherFunc != CipherAES128 { - t.Errorf("unexpected EncryptedKey contents: %#v", ek) - return - } - - keyHex := fmt.Sprintf("%x", ek.Key) - if keyHex != expectedKeyHex { - t.Errorf("bad key, got %s want %s", keyHex, expectedKeyHex) - } -} - -func TestSerializingEncryptedKey(t *testing.T) { - const encryptedKeyHex = "c18c032a67d68660df41c70104005789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8" - - p, err := Read(readerFromHex(encryptedKeyHex)) - if err != nil { - t.Fatalf("error from Read: %s", err) - } - ek, ok := p.(*EncryptedKey) - if !ok { - t.Fatalf("didn't parse an EncryptedKey, got %#v", p) - } - - var buf bytes.Buffer - ek.Serialize(&buf) - - if bufHex := hex.EncodeToString(buf.Bytes()); bufHex != encryptedKeyHex { - t.Fatalf("serialization of encrypted key differed from original. Original was %s, but reserialized as %s", encryptedKeyHex, bufHex) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/literal.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/literal.go deleted file mode 100644 index 1a9ec6e51e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/literal.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "encoding/binary" - "io" -) - -// LiteralData represents an encrypted file. See RFC 4880, section 5.9. -type LiteralData struct { - IsBinary bool - FileName string - Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined. - Body io.Reader -} - -// ForEyesOnly returns whether the contents of the LiteralData have been marked -// as especially sensitive. -func (l *LiteralData) ForEyesOnly() bool { - return l.FileName == "_CONSOLE" -} - -func (l *LiteralData) parse(r io.Reader) (err error) { - var buf [256]byte - - _, err = readFull(r, buf[:2]) - if err != nil { - return - } - - l.IsBinary = buf[0] == 'b' - fileNameLen := int(buf[1]) - - _, err = readFull(r, buf[:fileNameLen]) - if err != nil { - return - } - - l.FileName = string(buf[:fileNameLen]) - - _, err = readFull(r, buf[:4]) - if err != nil { - return - } - - l.Time = binary.BigEndian.Uint32(buf[:4]) - l.Body = r - return -} - -// SerializeLiteral serializes a literal data packet to w and returns a -// WriteCloser to which the data itself can be written and which MUST be closed -// on completion. The fileName is truncated to 255 bytes. -func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) { - var buf [4]byte - buf[0] = 't' - if isBinary { - buf[0] = 'b' - } - if len(fileName) > 255 { - fileName = fileName[:255] - } - buf[1] = byte(len(fileName)) - - inner, err := serializeStreamHeader(w, packetTypeLiteralData) - if err != nil { - return - } - - _, err = inner.Write(buf[:2]) - if err != nil { - return - } - _, err = inner.Write([]byte(fileName)) - if err != nil { - return - } - binary.BigEndian.PutUint32(buf[:], time) - _, err = inner.Write(buf[:]) - if err != nil { - return - } - - plaintext = inner - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb.go deleted file mode 100644 index ce2a33a547..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2010 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. - -// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9 - -package packet - -import ( - "crypto/cipher" -) - -type ocfbEncrypter struct { - b cipher.Block - fre []byte - outUsed int -} - -// An OCFBResyncOption determines if the "resynchronization step" of OCFB is -// performed. -type OCFBResyncOption bool - -const ( - OCFBResync OCFBResyncOption = true - OCFBNoResync OCFBResyncOption = false -) - -// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's -// cipher feedback mode using the given cipher.Block, and an initial amount of -// ciphertext. randData must be random bytes and be the same length as the -// cipher.Block's block size. Resync determines if the "resynchronization step" -// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on -// this point. -func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) { - blockSize := block.BlockSize() - if len(randData) != blockSize { - return nil, nil - } - - x := &ocfbEncrypter{ - b: block, - fre: make([]byte, blockSize), - outUsed: 0, - } - prefix := make([]byte, blockSize+2) - - block.Encrypt(x.fre, x.fre) - for i := 0; i < blockSize; i++ { - prefix[i] = randData[i] ^ x.fre[i] - } - - block.Encrypt(x.fre, prefix[:blockSize]) - prefix[blockSize] = x.fre[0] ^ randData[blockSize-2] - prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1] - - if resync { - block.Encrypt(x.fre, prefix[2:]) - } else { - x.fre[0] = prefix[blockSize] - x.fre[1] = prefix[blockSize+1] - x.outUsed = 2 - } - return x, prefix -} - -func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) { - for i := 0; i < len(src); i++ { - if x.outUsed == len(x.fre) { - x.b.Encrypt(x.fre, x.fre) - x.outUsed = 0 - } - - x.fre[x.outUsed] ^= src[i] - dst[i] = x.fre[x.outUsed] - x.outUsed++ - } -} - -type ocfbDecrypter struct { - b cipher.Block - fre []byte - outUsed int -} - -// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's -// cipher feedback mode using the given cipher.Block. Prefix must be the first -// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's -// block size. If an incorrect key is detected then nil is returned. On -// successful exit, blockSize+2 bytes of decrypted data are written into -// prefix. Resync determines if the "resynchronization step" from RFC 4880, -// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point. -func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream { - blockSize := block.BlockSize() - if len(prefix) != blockSize+2 { - return nil - } - - x := &ocfbDecrypter{ - b: block, - fre: make([]byte, blockSize), - outUsed: 0, - } - prefixCopy := make([]byte, len(prefix)) - copy(prefixCopy, prefix) - - block.Encrypt(x.fre, x.fre) - for i := 0; i < blockSize; i++ { - prefixCopy[i] ^= x.fre[i] - } - - block.Encrypt(x.fre, prefix[:blockSize]) - prefixCopy[blockSize] ^= x.fre[0] - prefixCopy[blockSize+1] ^= x.fre[1] - - if prefixCopy[blockSize-2] != prefixCopy[blockSize] || - prefixCopy[blockSize-1] != prefixCopy[blockSize+1] { - return nil - } - - if resync { - block.Encrypt(x.fre, prefix[2:]) - } else { - x.fre[0] = prefix[blockSize] - x.fre[1] = prefix[blockSize+1] - x.outUsed = 2 - } - copy(prefix, prefixCopy) - return x -} - -func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) { - for i := 0; i < len(src); i++ { - if x.outUsed == len(x.fre) { - x.b.Encrypt(x.fre, x.fre) - x.outUsed = 0 - } - - c := src[i] - dst[i] = x.fre[x.outUsed] ^ src[i] - x.fre[x.outUsed] = c - x.outUsed++ - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb_test.go deleted file mode 100644 index 91022c042d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/ocfb_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2010 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 packet - -import ( - "bytes" - "crypto/aes" - "crypto/rand" - "testing" -) - -var commonKey128 = []byte{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c} - -func testOCFB(t *testing.T, resync OCFBResyncOption) { - block, err := aes.NewCipher(commonKey128) - if err != nil { - t.Error(err) - return - } - - plaintext := []byte("this is the plaintext, which is long enough to span several blocks.") - randData := make([]byte, block.BlockSize()) - rand.Reader.Read(randData) - ocfb, prefix := NewOCFBEncrypter(block, randData, resync) - ciphertext := make([]byte, len(plaintext)) - ocfb.XORKeyStream(ciphertext, plaintext) - - ocfbdec := NewOCFBDecrypter(block, prefix, resync) - if ocfbdec == nil { - t.Errorf("NewOCFBDecrypter failed (resync: %t)", resync) - return - } - plaintextCopy := make([]byte, len(plaintext)) - ocfbdec.XORKeyStream(plaintextCopy, ciphertext) - - if !bytes.Equal(plaintextCopy, plaintext) { - t.Errorf("got: %x, want: %x (resync: %t)", plaintextCopy, plaintext, resync) - } -} - -func TestOCFB(t *testing.T) { - testOCFB(t, OCFBNoResync) - testOCFB(t, OCFBResync) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/one_pass_signature.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/one_pass_signature.go deleted file mode 100644 index 3b3d2cc58d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/one_pass_signature.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto" - "encoding/binary" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" - "io" - "strconv" -) - -// OnePassSignature represents a one-pass signature packet. See RFC 4880, -// section 5.4. -type OnePassSignature struct { - SigType SignatureType - Hash crypto.Hash - PubKeyAlgo PublicKeyAlgorithm - KeyId uint64 - IsLast bool -} - -const onePassSignatureVersion = 3 - -func (ops *OnePassSignature) parse(r io.Reader) (err error) { - var buf [13]byte - - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != onePassSignatureVersion { - err = errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0]))) - } - - var ok bool - ops.Hash, ok = s2k.HashIdToHash(buf[2]) - if !ok { - return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2]))) - } - - ops.SigType = SignatureType(buf[1]) - ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3]) - ops.KeyId = binary.BigEndian.Uint64(buf[4:12]) - ops.IsLast = buf[12] != 0 - return -} - -// Serialize marshals the given OnePassSignature to w. -func (ops *OnePassSignature) Serialize(w io.Writer) error { - var buf [13]byte - buf[0] = onePassSignatureVersion - buf[1] = uint8(ops.SigType) - var ok bool - buf[2], ok = s2k.HashToHashId(ops.Hash) - if !ok { - return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash))) - } - buf[3] = uint8(ops.PubKeyAlgo) - binary.BigEndian.PutUint64(buf[4:12], ops.KeyId) - if ops.IsLast { - buf[12] = 1 - } - - if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil { - return err - } - _, err := w.Write(buf[:]) - return err -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque.go deleted file mode 100644 index 526519d887..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2012 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 packet - -import ( - "bytes" - "io" - "io/ioutil" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is -// useful for splitting and storing the original packet contents separately, -// handling unsupported packet types or accessing parts of the packet not yet -// implemented by this package. -type OpaquePacket struct { - // Packet type - Tag uint8 - // Reason why the packet was parsed opaquely - Reason error - // Binary contents of the packet data - Contents []byte -} - -func (op *OpaquePacket) parse(r io.Reader) (err error) { - op.Contents, err = ioutil.ReadAll(r) - return -} - -// Serialize marshals the packet to a writer in its original form, including -// the packet header. -func (op *OpaquePacket) Serialize(w io.Writer) (err error) { - err = serializeHeader(w, packetType(op.Tag), len(op.Contents)) - if err == nil { - _, err = w.Write(op.Contents) - } - return -} - -// Parse attempts to parse the opaque contents into a structure supported by -// this package. If the packet is not known then the result will be another -// OpaquePacket. -func (op *OpaquePacket) Parse() (p Packet, err error) { - hdr := bytes.NewBuffer(nil) - err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents)) - if err != nil { - op.Reason = err - return op, err - } - p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents))) - if err != nil { - op.Reason = err - p = op - } - return -} - -// OpaqueReader reads OpaquePackets from an io.Reader. -type OpaqueReader struct { - r io.Reader -} - -func NewOpaqueReader(r io.Reader) *OpaqueReader { - return &OpaqueReader{r: r} -} - -// Read the next OpaquePacket. -func (or *OpaqueReader) Next() (op *OpaquePacket, err error) { - tag, _, contents, err := readHeader(or.r) - if err != nil { - return - } - op = &OpaquePacket{Tag: uint8(tag), Reason: err} - err = op.parse(contents) - if err != nil { - consumeAll(contents) - } - return -} - -// OpaqueSubpacket represents an unparsed OpenPGP subpacket, -// as found in signature and user attribute packets. -type OpaqueSubpacket struct { - SubType uint8 - Contents []byte -} - -// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from -// their byte representation. -func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) { - var ( - subHeaderLen int - subPacket *OpaqueSubpacket - ) - for len(contents) > 0 { - subHeaderLen, subPacket, err = nextSubpacket(contents) - if err != nil { - break - } - result = append(result, subPacket) - contents = contents[subHeaderLen+len(subPacket.Contents):] - } - return -} - -func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) { - // RFC 4880, section 5.2.3.1 - var subLen uint32 - if len(contents) < 1 { - goto Truncated - } - subPacket = &OpaqueSubpacket{} - switch { - case contents[0] < 192: - subHeaderLen = 2 // 1 length byte, 1 subtype byte - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[0]) - contents = contents[1:] - case contents[0] < 255: - subHeaderLen = 3 // 2 length bytes, 1 subtype - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192 - contents = contents[2:] - default: - subHeaderLen = 6 // 5 length bytes, 1 subtype - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[1])<<24 | - uint32(contents[2])<<16 | - uint32(contents[3])<<8 | - uint32(contents[4]) - contents = contents[5:] - } - if subLen > uint32(len(contents)) || subLen == 0 { - goto Truncated - } - subPacket.SubType = contents[0] - subPacket.Contents = contents[1:subLen] - return -Truncated: - err = errors.StructuralError("subpacket truncated") - return -} - -func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) { - buf := make([]byte, 6) - n := serializeSubpacketLength(buf, len(osp.Contents)+1) - buf[n] = osp.SubType - if _, err = w.Write(buf[:n+1]); err != nil { - return - } - _, err = w.Write(osp.Contents) - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque_test.go deleted file mode 100644 index f27bbfe090..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/opaque_test.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "encoding/hex" - "io" - "testing" -) - -// Test packet.Read error handling in OpaquePacket.Parse, -// which attempts to re-read an OpaquePacket as a supported -// Packet type. -func TestOpaqueParseReason(t *testing.T) { - buf, err := hex.DecodeString(UnsupportedKeyHex) - if err != nil { - t.Fatal(err) - } - or := NewOpaqueReader(bytes.NewBuffer(buf)) - count := 0 - badPackets := 0 - var uid *UserId - for { - op, err := or.Next() - if err == io.EOF { - break - } else if err != nil { - t.Errorf("#%d: opaque read error: %v", count, err) - break - } - // try to parse opaque packet - p, err := op.Parse() - switch pkt := p.(type) { - case *UserId: - uid = pkt - case *OpaquePacket: - // If an OpaquePacket can't re-parse, packet.Read - // certainly had its reasons. - if pkt.Reason == nil { - t.Errorf("#%d: opaque packet, no reason", count) - } else { - badPackets++ - } - } - count++ - } - - const expectedBad = 3 - // Test post-conditions, make sure we actually parsed packets as expected. - if badPackets != expectedBad { - t.Errorf("unexpected # unparseable packets: %d (want %d)", badPackets, expectedBad) - } - if uid == nil { - t.Errorf("failed to find expected UID in unsupported keyring") - } else if uid.Id != "Armin M. Warda " { - t.Errorf("unexpected UID: %v", uid.Id) - } -} - -// This key material has public key and signature packet versions modified to -// an unsupported value (1), so that trying to parse the OpaquePacket to -// a typed packet will get an error. It also contains a GnuPG trust packet. -// (Created with: od -An -t x1 pubring.gpg | xargs | sed 's/ //g') -const UnsupportedKeyHex = `988d012e7a18a20000010400d6ac00d92b89c1f4396c243abb9b76d2e9673ad63483291fed88e22b82e255e441c078c6abbbf7d2d195e50b62eeaa915b85b0ec20c225ce2c64c167cacb6e711daf2e45da4a8356a059b8160e3b3628ac0dd8437b31f06d53d6e8ea4214d4a26406a6b63e1001406ef23e0bb3069fac9a99a91f77dfafd5de0f188a5da5e3c9000511b42741726d696e204d2e205761726461203c7761726461406e657068696c696d2e727568722e64653e8900950105102e8936c705d1eb399e58489901013f0e03ff5a0c4f421e34fcfa388129166420c08cd76987bcdec6f01bd0271459a85cc22048820dd4e44ac2c7d23908d540f54facf1b36b0d9c20488781ce9dca856531e76e2e846826e9951338020a03a09b57aa5faa82e9267458bd76105399885ac35af7dc1cbb6aaed7c39e1039f3b5beda2c0e916bd38560509bab81235d1a0ead83b0020000` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet.go deleted file mode 100644 index 9b177a075c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet.go +++ /dev/null @@ -1,549 +0,0 @@ -// Copyright 2011 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 packet implements parsing and serialization of OpenPGP packets, as -// specified in RFC 4880. -package packet - -import ( - "bufio" - "crypto/aes" - "crypto/cipher" - "crypto/des" - "crypto/rsa" - "io" - "math/big" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/cast5" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -// readFull is the same as io.ReadFull except that reading zero bytes returns -// ErrUnexpectedEOF rather than EOF. -func readFull(r io.Reader, buf []byte) (n int, err error) { - n, err = io.ReadFull(r, buf) - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2. -func readLength(r io.Reader) (length int64, isPartial bool, err error) { - var buf [4]byte - _, err = readFull(r, buf[:1]) - if err != nil { - return - } - switch { - case buf[0] < 192: - length = int64(buf[0]) - case buf[0] < 224: - length = int64(buf[0]-192) << 8 - _, err = readFull(r, buf[0:1]) - if err != nil { - return - } - length += int64(buf[0]) + 192 - case buf[0] < 255: - length = int64(1) << (buf[0] & 0x1f) - isPartial = true - default: - _, err = readFull(r, buf[0:4]) - if err != nil { - return - } - length = int64(buf[0])<<24 | - int64(buf[1])<<16 | - int64(buf[2])<<8 | - int64(buf[3]) - } - return -} - -// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths. -// The continuation lengths are parsed and removed from the stream and EOF is -// returned at the end of the packet. See RFC 4880, section 4.2.2.4. -type partialLengthReader struct { - r io.Reader - remaining int64 - isPartial bool -} - -func (r *partialLengthReader) Read(p []byte) (n int, err error) { - for r.remaining == 0 { - if !r.isPartial { - return 0, io.EOF - } - r.remaining, r.isPartial, err = readLength(r.r) - if err != nil { - return 0, err - } - } - - toRead := int64(len(p)) - if toRead > r.remaining { - toRead = r.remaining - } - - n, err = r.r.Read(p[:int(toRead)]) - r.remaining -= int64(n) - if n < int(toRead) && err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// partialLengthWriter writes a stream of data using OpenPGP partial lengths. -// See RFC 4880, section 4.2.2.4. -type partialLengthWriter struct { - w io.WriteCloser - lengthByte [1]byte -} - -func (w *partialLengthWriter) Write(p []byte) (n int, err error) { - for len(p) > 0 { - for power := uint(14); power < 32; power-- { - l := 1 << power - if len(p) >= l { - w.lengthByte[0] = 224 + uint8(power) - _, err = w.w.Write(w.lengthByte[:]) - if err != nil { - return - } - var m int - m, err = w.w.Write(p[:l]) - n += m - if err != nil { - return - } - p = p[l:] - break - } - } - } - return -} - -func (w *partialLengthWriter) Close() error { - w.lengthByte[0] = 0 - _, err := w.w.Write(w.lengthByte[:]) - if err != nil { - return err - } - return w.w.Close() -} - -// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the -// underlying Reader returns EOF before the limit has been reached. -type spanReader struct { - r io.Reader - n int64 -} - -func (l *spanReader) Read(p []byte) (n int, err error) { - if l.n <= 0 { - return 0, io.EOF - } - if int64(len(p)) > l.n { - p = p[0:l.n] - } - n, err = l.r.Read(p) - l.n -= int64(n) - if l.n > 0 && err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// readHeader parses a packet header and returns an io.Reader which will return -// the contents of the packet. See RFC 4880, section 4.2. -func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) { - var buf [4]byte - _, err = io.ReadFull(r, buf[:1]) - if err != nil { - return - } - if buf[0]&0x80 == 0 { - err = errors.StructuralError("tag byte does not have MSB set") - return - } - if buf[0]&0x40 == 0 { - // Old format packet - tag = packetType((buf[0] & 0x3f) >> 2) - lengthType := buf[0] & 3 - if lengthType == 3 { - length = -1 - contents = r - return - } - lengthBytes := 1 << lengthType - _, err = readFull(r, buf[0:lengthBytes]) - if err != nil { - return - } - for i := 0; i < lengthBytes; i++ { - length <<= 8 - length |= int64(buf[i]) - } - contents = &spanReader{r, length} - return - } - - // New format packet - tag = packetType(buf[0] & 0x3f) - length, isPartial, err := readLength(r) - if err != nil { - return - } - if isPartial { - contents = &partialLengthReader{ - remaining: length, - isPartial: true, - r: r, - } - length = -1 - } else { - contents = &spanReader{r, length} - } - return -} - -// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section -// 4.2. -func serializeHeader(w io.Writer, ptype packetType, length int) (err error) { - var buf [6]byte - var n int - - buf[0] = 0x80 | 0x40 | byte(ptype) - if length < 192 { - buf[1] = byte(length) - n = 2 - } else if length < 8384 { - length -= 192 - buf[1] = 192 + byte(length>>8) - buf[2] = byte(length) - n = 3 - } else { - buf[1] = 255 - buf[2] = byte(length >> 24) - buf[3] = byte(length >> 16) - buf[4] = byte(length >> 8) - buf[5] = byte(length) - n = 6 - } - - _, err = w.Write(buf[:n]) - return -} - -// serializeStreamHeader writes an OpenPGP packet header to w where the -// length of the packet is unknown. It returns a io.WriteCloser which can be -// used to write the contents of the packet. See RFC 4880, section 4.2. -func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) { - var buf [1]byte - buf[0] = 0x80 | 0x40 | byte(ptype) - _, err = w.Write(buf[:]) - if err != nil { - return - } - out = &partialLengthWriter{w: w} - return -} - -// Packet represents an OpenPGP packet. Users are expected to try casting -// instances of this interface to specific packet types. -type Packet interface { - parse(io.Reader) error -} - -// consumeAll reads from the given Reader until error, returning the number of -// bytes read. -func consumeAll(r io.Reader) (n int64, err error) { - var m int - var buf [1024]byte - - for { - m, err = r.Read(buf[:]) - n += int64(m) - if err == io.EOF { - err = nil - return - } - if err != nil { - return - } - } -} - -// packetType represents the numeric ids of the different OpenPGP packet types. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2 -type packetType uint8 - -const ( - packetTypeEncryptedKey packetType = 1 - packetTypeSignature packetType = 2 - packetTypeSymmetricKeyEncrypted packetType = 3 - packetTypeOnePassSignature packetType = 4 - packetTypePrivateKey packetType = 5 - packetTypePublicKey packetType = 6 - packetTypePrivateSubkey packetType = 7 - packetTypeCompressed packetType = 8 - packetTypeSymmetricallyEncrypted packetType = 9 - packetTypeLiteralData packetType = 11 - packetTypeUserId packetType = 13 - packetTypePublicSubkey packetType = 14 - packetTypeUserAttribute packetType = 17 - packetTypeSymmetricallyEncryptedMDC packetType = 18 -) - -// peekVersion detects the version of a public key packet about to -// be read. A bufio.Reader at the original position of the io.Reader -// is returned. -func peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) { - bufr = bufio.NewReader(r) - var verBuf []byte - if verBuf, err = bufr.Peek(1); err != nil { - return - } - ver = verBuf[0] - return -} - -// Read reads a single OpenPGP packet from the given io.Reader. If there is an -// error parsing a packet, the whole packet is consumed from the input. -func Read(r io.Reader) (p Packet, err error) { - tag, _, contents, err := readHeader(r) - if err != nil { - return - } - - switch tag { - case packetTypeEncryptedKey: - p = new(EncryptedKey) - case packetTypeSignature: - var version byte - // Detect signature version - if contents, version, err = peekVersion(contents); err != nil { - return - } - if version < 4 { - p = new(SignatureV3) - } else { - p = new(Signature) - } - case packetTypeSymmetricKeyEncrypted: - p = new(SymmetricKeyEncrypted) - case packetTypeOnePassSignature: - p = new(OnePassSignature) - case packetTypePrivateKey, packetTypePrivateSubkey: - pk := new(PrivateKey) - if tag == packetTypePrivateSubkey { - pk.IsSubkey = true - } - p = pk - case packetTypePublicKey, packetTypePublicSubkey: - var version byte - if contents, version, err = peekVersion(contents); err != nil { - return - } - isSubkey := tag == packetTypePublicSubkey - if version < 4 { - p = &PublicKeyV3{IsSubkey: isSubkey} - } else { - p = &PublicKey{IsSubkey: isSubkey} - } - case packetTypeCompressed: - p = new(Compressed) - case packetTypeSymmetricallyEncrypted: - p = new(SymmetricallyEncrypted) - case packetTypeLiteralData: - p = new(LiteralData) - case packetTypeUserId: - p = new(UserId) - case packetTypeUserAttribute: - p = new(UserAttribute) - case packetTypeSymmetricallyEncryptedMDC: - se := new(SymmetricallyEncrypted) - se.MDC = true - p = se - default: - err = errors.UnknownPacketTypeError(tag) - } - if p != nil { - err = p.parse(contents) - } - if err != nil { - consumeAll(contents) - } - return -} - -// SignatureType represents the different semantic meanings of an OpenPGP -// signature. See RFC 4880, section 5.2.1. -type SignatureType uint8 - -const ( - SigTypeBinary SignatureType = 0 - SigTypeText = 1 - SigTypeGenericCert = 0x10 - SigTypePersonaCert = 0x11 - SigTypeCasualCert = 0x12 - SigTypePositiveCert = 0x13 - SigTypeSubkeyBinding = 0x18 - SigTypePrimaryKeyBinding = 0x19 - SigTypeDirectSignature = 0x1F - SigTypeKeyRevocation = 0x20 - SigTypeSubkeyRevocation = 0x28 -) - -// PublicKeyAlgorithm represents the different public key system specified for -// OpenPGP. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12 -type PublicKeyAlgorithm uint8 - -const ( - PubKeyAlgoRSA PublicKeyAlgorithm = 1 - PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 - PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 - PubKeyAlgoElGamal PublicKeyAlgorithm = 16 - PubKeyAlgoDSA PublicKeyAlgorithm = 17 - // RFC 6637, Section 5. - PubKeyAlgoECDH PublicKeyAlgorithm = 18 - PubKeyAlgoECDSA PublicKeyAlgorithm = 19 -) - -// CanEncrypt returns true if it's possible to encrypt a message to a public -// key of the given type. -func (pka PublicKeyAlgorithm) CanEncrypt() bool { - switch pka { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal: - return true - } - return false -} - -// CanSign returns true if it's possible for a public key of the given type to -// sign a message. -func (pka PublicKeyAlgorithm) CanSign() bool { - switch pka { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: - return true - } - return false -} - -// CipherFunction represents the different block ciphers specified for OpenPGP. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13 -type CipherFunction uint8 - -const ( - Cipher3DES CipherFunction = 2 - CipherCAST5 CipherFunction = 3 - CipherAES128 CipherFunction = 7 - CipherAES192 CipherFunction = 8 - CipherAES256 CipherFunction = 9 -) - -// KeySize returns the key size, in bytes, of cipher. -func (cipher CipherFunction) KeySize() int { - switch cipher { - case Cipher3DES: - return 24 - case CipherCAST5: - return cast5.KeySize - case CipherAES128: - return 16 - case CipherAES192: - return 24 - case CipherAES256: - return 32 - } - return 0 -} - -// blockSize returns the block size, in bytes, of cipher. -func (cipher CipherFunction) blockSize() int { - switch cipher { - case Cipher3DES: - return des.BlockSize - case CipherCAST5: - return 8 - case CipherAES128, CipherAES192, CipherAES256: - return 16 - } - return 0 -} - -// new returns a fresh instance of the given cipher. -func (cipher CipherFunction) new(key []byte) (block cipher.Block) { - switch cipher { - case Cipher3DES: - block, _ = des.NewTripleDESCipher(key) - case CipherCAST5: - block, _ = cast5.NewCipher(key) - case CipherAES128, CipherAES192, CipherAES256: - block, _ = aes.NewCipher(key) - } - return -} - -// readMPI reads a big integer from r. The bit length returned is the bit -// length that was specified in r. This is preserved so that the integer can be -// reserialized exactly. -func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) { - var buf [2]byte - _, err = readFull(r, buf[0:]) - if err != nil { - return - } - bitLength = uint16(buf[0])<<8 | uint16(buf[1]) - numBytes := (int(bitLength) + 7) / 8 - mpi = make([]byte, numBytes) - _, err = readFull(r, mpi) - // According to RFC 4880 3.2. we should check that the MPI has no leading - // zeroes (at least when not an encrypted MPI?), but this implementation - // does generate leading zeroes, so we keep accepting them. - return -} - -// writeMPI serializes a big integer to w. -func writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) { - // Note that we can produce leading zeroes, in violation of RFC 4880 3.2. - // Implementations seem to be tolerant of them, and stripping them would - // make it complex to guarantee matching re-serialization. - _, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)}) - if err == nil { - _, err = w.Write(mpiBytes) - } - return -} - -// writeBig serializes a *big.Int to w. -func writeBig(w io.Writer, i *big.Int) error { - return writeMPI(w, uint16(i.BitLen()), i.Bytes()) -} - -// padToKeySize left-pads a MPI with zeroes to match the length of the -// specified RSA public. -func padToKeySize(pub *rsa.PublicKey, b []byte) []byte { - k := (pub.N.BitLen() + 7) / 8 - if len(b) >= k { - return b - } - bb := make([]byte, k) - copy(bb[len(bb)-len(b):], b) - return bb -} - -// CompressionAlgo Represents the different compression algorithms -// supported by OpenPGP (except for BZIP2, which is not currently -// supported). See Section 9.3 of RFC 4880. -type CompressionAlgo uint8 - -const ( - CompressionNone CompressionAlgo = 0 - CompressionZIP CompressionAlgo = 1 - CompressionZLIB CompressionAlgo = 2 -) diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet_test.go deleted file mode 100644 index 424131d6aa..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/packet_test.go +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "encoding/hex" - "fmt" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "io" - "io/ioutil" - "testing" -) - -func TestReadFull(t *testing.T) { - var out [4]byte - - b := bytes.NewBufferString("foo") - n, err := readFull(b, out[:3]) - if n != 3 || err != nil { - t.Errorf("full read failed n:%d err:%s", n, err) - } - - b = bytes.NewBufferString("foo") - n, err = readFull(b, out[:4]) - if n != 3 || err != io.ErrUnexpectedEOF { - t.Errorf("partial read failed n:%d err:%s", n, err) - } - - b = bytes.NewBuffer(nil) - n, err = readFull(b, out[:3]) - if n != 0 || err != io.ErrUnexpectedEOF { - t.Errorf("empty read failed n:%d err:%s", n, err) - } -} - -func readerFromHex(s string) io.Reader { - data, err := hex.DecodeString(s) - if err != nil { - panic("readerFromHex: bad input") - } - return bytes.NewBuffer(data) -} - -var readLengthTests = []struct { - hexInput string - length int64 - isPartial bool - err error -}{ - {"", 0, false, io.ErrUnexpectedEOF}, - {"1f", 31, false, nil}, - {"c0", 0, false, io.ErrUnexpectedEOF}, - {"c101", 256 + 1 + 192, false, nil}, - {"e0", 1, true, nil}, - {"e1", 2, true, nil}, - {"e2", 4, true, nil}, - {"ff", 0, false, io.ErrUnexpectedEOF}, - {"ff00", 0, false, io.ErrUnexpectedEOF}, - {"ff0000", 0, false, io.ErrUnexpectedEOF}, - {"ff000000", 0, false, io.ErrUnexpectedEOF}, - {"ff00000000", 0, false, nil}, - {"ff01020304", 16909060, false, nil}, -} - -func TestReadLength(t *testing.T) { - for i, test := range readLengthTests { - length, isPartial, err := readLength(readerFromHex(test.hexInput)) - if test.err != nil { - if err != test.err { - t.Errorf("%d: expected different error got:%s want:%s", i, err, test.err) - } - continue - } - if err != nil { - t.Errorf("%d: unexpected error: %s", i, err) - continue - } - if length != test.length || isPartial != test.isPartial { - t.Errorf("%d: bad result got:(%d,%t) want:(%d,%t)", i, length, isPartial, test.length, test.isPartial) - } - } -} - -var partialLengthReaderTests = []struct { - hexInput string - err error - hexOutput string -}{ - {"e0", io.ErrUnexpectedEOF, ""}, - {"e001", io.ErrUnexpectedEOF, ""}, - {"e0010102", nil, "0102"}, - {"ff00000000", nil, ""}, - {"e10102e1030400", nil, "01020304"}, - {"e101", io.ErrUnexpectedEOF, ""}, -} - -func TestPartialLengthReader(t *testing.T) { - for i, test := range partialLengthReaderTests { - r := &partialLengthReader{readerFromHex(test.hexInput), 0, true} - out, err := ioutil.ReadAll(r) - if test.err != nil { - if err != test.err { - t.Errorf("%d: expected different error got:%s want:%s", i, err, test.err) - } - continue - } - if err != nil { - t.Errorf("%d: unexpected error: %s", i, err) - continue - } - - got := fmt.Sprintf("%x", out) - if got != test.hexOutput { - t.Errorf("%d: got:%s want:%s", i, test.hexOutput, got) - } - } -} - -var readHeaderTests = []struct { - hexInput string - structuralError bool - unexpectedEOF bool - tag int - length int64 - hexOutput string -}{ - {"", false, false, 0, 0, ""}, - {"7f", true, false, 0, 0, ""}, - - // Old format headers - {"80", false, true, 0, 0, ""}, - {"8001", false, true, 0, 1, ""}, - {"800102", false, false, 0, 1, "02"}, - {"81000102", false, false, 0, 1, "02"}, - {"820000000102", false, false, 0, 1, "02"}, - {"860000000102", false, false, 1, 1, "02"}, - {"83010203", false, false, 0, -1, "010203"}, - - // New format headers - {"c0", false, true, 0, 0, ""}, - {"c000", false, false, 0, 0, ""}, - {"c00102", false, false, 0, 1, "02"}, - {"c0020203", false, false, 0, 2, "0203"}, - {"c00202", false, true, 0, 2, ""}, - {"c3020203", false, false, 3, 2, "0203"}, -} - -func TestReadHeader(t *testing.T) { - for i, test := range readHeaderTests { - tag, length, contents, err := readHeader(readerFromHex(test.hexInput)) - if test.structuralError { - if _, ok := err.(errors.StructuralError); ok { - continue - } - t.Errorf("%d: expected StructuralError, got:%s", i, err) - continue - } - if err != nil { - if len(test.hexInput) == 0 && err == io.EOF { - continue - } - if !test.unexpectedEOF || err != io.ErrUnexpectedEOF { - t.Errorf("%d: unexpected error from readHeader: %s", i, err) - } - continue - } - if int(tag) != test.tag || length != test.length { - t.Errorf("%d: got:(%d,%d) want:(%d,%d)", i, int(tag), length, test.tag, test.length) - continue - } - - body, err := ioutil.ReadAll(contents) - if err != nil { - if !test.unexpectedEOF || err != io.ErrUnexpectedEOF { - t.Errorf("%d: unexpected error from contents: %s", i, err) - } - continue - } - if test.unexpectedEOF { - t.Errorf("%d: expected ErrUnexpectedEOF from contents but got no error", i) - continue - } - got := fmt.Sprintf("%x", body) - if got != test.hexOutput { - t.Errorf("%d: got:%s want:%s", i, got, test.hexOutput) - } - } -} - -func TestSerializeHeader(t *testing.T) { - tag := packetTypePublicKey - lengths := []int{0, 1, 2, 64, 192, 193, 8000, 8384, 8385, 10000} - - for _, length := range lengths { - buf := bytes.NewBuffer(nil) - serializeHeader(buf, tag, length) - tag2, length2, _, err := readHeader(buf) - if err != nil { - t.Errorf("length %d, err: %s", length, err) - } - if tag2 != tag { - t.Errorf("length %d, tag incorrect (got %d, want %d)", length, tag2, tag) - } - if int(length2) != length { - t.Errorf("length %d, length incorrect (got %d)", length, length2) - } - } -} - -func TestPartialLengths(t *testing.T) { - buf := bytes.NewBuffer(nil) - w := new(partialLengthWriter) - w.w = noOpCloser{buf} - - const maxChunkSize = 64 - - var b [maxChunkSize]byte - var n uint8 - for l := 1; l <= maxChunkSize; l++ { - for i := 0; i < l; i++ { - b[i] = n - n++ - } - m, err := w.Write(b[:l]) - if m != l { - t.Errorf("short write got: %d want: %d", m, l) - } - if err != nil { - t.Errorf("error from write: %s", err) - } - } - w.Close() - - want := (maxChunkSize * (maxChunkSize + 1)) / 2 - copyBuf := bytes.NewBuffer(nil) - r := &partialLengthReader{buf, 0, true} - m, err := io.Copy(copyBuf, r) - if m != int64(want) { - t.Errorf("short copy got: %d want: %d", m, want) - } - if err != nil { - t.Errorf("error from copy: %s", err) - } - - copyBytes := copyBuf.Bytes() - for i := 0; i < want; i++ { - if copyBytes[i] != uint8(i) { - t.Errorf("bad pattern in copy at %d", i) - break - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key.go deleted file mode 100644 index 4c05411b01..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key.go +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/cipher" - "crypto/dsa" - "crypto/ecdsa" - "crypto/rsa" - "crypto/sha1" - "io" - "io/ioutil" - "math/big" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" -) - -// PrivateKey represents a possibly encrypted private key. See RFC 4880, -// section 5.5.3. -type PrivateKey struct { - PublicKey - Encrypted bool // if true then the private key is unavailable until Decrypt has been called. - encryptedData []byte - cipher CipherFunction - s2k func(out, in []byte) - PrivateKey interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or a crypto.Signer. - sha1Checksum bool - iv []byte -} - -func NewRSAPrivateKey(currentTime time.Time, priv *rsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewRSAPublicKey(currentTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewDSAPrivateKey(currentTime time.Time, priv *dsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewDSAPublicKey(currentTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewElGamalPrivateKey(currentTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewElGamalPublicKey(currentTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewECDSAPrivateKey(currentTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewECDSAPublicKey(currentTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -// NewSignerPrivateKey creates a sign-only PrivateKey from a crypto.Signer that -// implements RSA or ECDSA. -func NewSignerPrivateKey(currentTime time.Time, signer crypto.Signer) *PrivateKey { - pk := new(PrivateKey) - switch pubkey := signer.Public().(type) { - case rsa.PublicKey: - pk.PublicKey = *NewRSAPublicKey(currentTime, &pubkey) - pk.PubKeyAlgo = PubKeyAlgoRSASignOnly - case ecdsa.PublicKey: - pk.PublicKey = *NewECDSAPublicKey(currentTime, &pubkey) - default: - panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") - } - pk.PrivateKey = signer - return pk -} - -func (pk *PrivateKey) parse(r io.Reader) (err error) { - err = (&pk.PublicKey).parse(r) - if err != nil { - return - } - var buf [1]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - - s2kType := buf[0] - - switch s2kType { - case 0: - pk.s2k = nil - pk.Encrypted = false - case 254, 255: - _, err = readFull(r, buf[:]) - if err != nil { - return - } - pk.cipher = CipherFunction(buf[0]) - pk.Encrypted = true - pk.s2k, err = s2k.Parse(r) - if err != nil { - return - } - if s2kType == 254 { - pk.sha1Checksum = true - } - default: - return errors.UnsupportedError("deprecated s2k function in private key") - } - - if pk.Encrypted { - blockSize := pk.cipher.blockSize() - if blockSize == 0 { - return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher))) - } - pk.iv = make([]byte, blockSize) - _, err = readFull(r, pk.iv) - if err != nil { - return - } - } - - pk.encryptedData, err = ioutil.ReadAll(r) - if err != nil { - return - } - - if !pk.Encrypted { - return pk.parsePrivateKey(pk.encryptedData) - } - - return -} - -func mod64kHash(d []byte) uint16 { - var h uint16 - for _, b := range d { - h += uint16(b) - } - return h -} - -func (pk *PrivateKey) Serialize(w io.Writer) (err error) { - // TODO(agl): support encrypted private keys - buf := bytes.NewBuffer(nil) - err = pk.PublicKey.serializeWithoutHeaders(buf) - if err != nil { - return - } - buf.WriteByte(0 /* no encryption */) - - privateKeyBuf := bytes.NewBuffer(nil) - - switch priv := pk.PrivateKey.(type) { - case *rsa.PrivateKey: - err = serializeRSAPrivateKey(privateKeyBuf, priv) - case *dsa.PrivateKey: - err = serializeDSAPrivateKey(privateKeyBuf, priv) - case *elgamal.PrivateKey: - err = serializeElGamalPrivateKey(privateKeyBuf, priv) - case *ecdsa.PrivateKey: - err = serializeECDSAPrivateKey(privateKeyBuf, priv) - default: - err = errors.InvalidArgumentError("unknown private key type") - } - if err != nil { - return - } - - ptype := packetTypePrivateKey - contents := buf.Bytes() - privateKeyBytes := privateKeyBuf.Bytes() - if pk.IsSubkey { - ptype = packetTypePrivateSubkey - } - err = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2) - if err != nil { - return - } - _, err = w.Write(contents) - if err != nil { - return - } - _, err = w.Write(privateKeyBytes) - if err != nil { - return - } - - checksum := mod64kHash(privateKeyBytes) - var checksumBytes [2]byte - checksumBytes[0] = byte(checksum >> 8) - checksumBytes[1] = byte(checksum) - _, err = w.Write(checksumBytes[:]) - - return -} - -func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error { - err := writeBig(w, priv.D) - if err != nil { - return err - } - err = writeBig(w, priv.Primes[1]) - if err != nil { - return err - } - err = writeBig(w, priv.Primes[0]) - if err != nil { - return err - } - return writeBig(w, priv.Precomputed.Qinv) -} - -func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error { - return writeBig(w, priv.X) -} - -func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error { - return writeBig(w, priv.X) -} - -func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error { - return writeBig(w, priv.D) -} - -// Decrypt decrypts an encrypted private key using a passphrase. -func (pk *PrivateKey) Decrypt(passphrase []byte) error { - if !pk.Encrypted { - return nil - } - - key := make([]byte, pk.cipher.KeySize()) - pk.s2k(key, passphrase) - block := pk.cipher.new(key) - cfb := cipher.NewCFBDecrypter(block, pk.iv) - - data := make([]byte, len(pk.encryptedData)) - cfb.XORKeyStream(data, pk.encryptedData) - - if pk.sha1Checksum { - if len(data) < sha1.Size { - return errors.StructuralError("truncated private key data") - } - h := sha1.New() - h.Write(data[:len(data)-sha1.Size]) - sum := h.Sum(nil) - if !bytes.Equal(sum, data[len(data)-sha1.Size:]) { - return errors.StructuralError("private key checksum failure") - } - data = data[:len(data)-sha1.Size] - } else { - if len(data) < 2 { - return errors.StructuralError("truncated private key data") - } - var sum uint16 - for i := 0; i < len(data)-2; i++ { - sum += uint16(data[i]) - } - if data[len(data)-2] != uint8(sum>>8) || - data[len(data)-1] != uint8(sum) { - return errors.StructuralError("private key checksum failure") - } - data = data[:len(data)-2] - } - - return pk.parsePrivateKey(data) -} - -func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) { - switch pk.PublicKey.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly: - return pk.parseRSAPrivateKey(data) - case PubKeyAlgoDSA: - return pk.parseDSAPrivateKey(data) - case PubKeyAlgoElGamal: - return pk.parseElGamalPrivateKey(data) - case PubKeyAlgoECDSA: - return pk.parseECDSAPrivateKey(data) - } - panic("impossible") -} - -func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) { - rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey) - rsaPriv := new(rsa.PrivateKey) - rsaPriv.PublicKey = *rsaPub - - buf := bytes.NewBuffer(data) - d, _, err := readMPI(buf) - if err != nil { - return - } - p, _, err := readMPI(buf) - if err != nil { - return - } - q, _, err := readMPI(buf) - if err != nil { - return - } - - rsaPriv.D = new(big.Int).SetBytes(d) - rsaPriv.Primes = make([]*big.Int, 2) - rsaPriv.Primes[0] = new(big.Int).SetBytes(p) - rsaPriv.Primes[1] = new(big.Int).SetBytes(q) - if err := rsaPriv.Validate(); err != nil { - return err - } - rsaPriv.Precompute() - pk.PrivateKey = rsaPriv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) { - dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey) - dsaPriv := new(dsa.PrivateKey) - dsaPriv.PublicKey = *dsaPub - - buf := bytes.NewBuffer(data) - x, _, err := readMPI(buf) - if err != nil { - return - } - - dsaPriv.X = new(big.Int).SetBytes(x) - pk.PrivateKey = dsaPriv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) { - pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey) - priv := new(elgamal.PrivateKey) - priv.PublicKey = *pub - - buf := bytes.NewBuffer(data) - x, _, err := readMPI(buf) - if err != nil { - return - } - - priv.X = new(big.Int).SetBytes(x) - pk.PrivateKey = priv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) { - ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey) - - buf := bytes.NewBuffer(data) - d, _, err := readMPI(buf) - if err != nil { - return - } - - pk.PrivateKey = &ecdsa.PrivateKey{ - PublicKey: *ecdsaPub, - D: new(big.Int).SetBytes(d), - } - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key_test.go deleted file mode 100644 index ac651d917d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/private_key_test.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/hex" - "hash" - "io" - "testing" - "time" -) - -var privateKeyTests = []struct { - privateKeyHex string - creationTime time.Time -}{ - { - privKeyRSAHex, - time.Unix(0x4cc349a8, 0), - }, - { - privKeyElGamalHex, - time.Unix(0x4df9ee1a, 0), - }, -} - -func TestPrivateKeyRead(t *testing.T) { - for i, test := range privateKeyTests { - packet, err := Read(readerFromHex(test.privateKeyHex)) - if err != nil { - t.Errorf("#%d: failed to parse: %s", i, err) - continue - } - - privKey := packet.(*PrivateKey) - - if !privKey.Encrypted { - t.Errorf("#%d: private key isn't encrypted", i) - continue - } - - err = privKey.Decrypt([]byte("wrong password")) - if err == nil { - t.Errorf("#%d: decrypted with incorrect key", i) - continue - } - - err = privKey.Decrypt([]byte("testing")) - if err != nil { - t.Errorf("#%d: failed to decrypt: %s", i, err) - continue - } - - if !privKey.CreationTime.Equal(test.creationTime) || privKey.Encrypted { - t.Errorf("#%d: bad result, got: %#v", i, privKey) - } - } -} - -func populateHash(hashFunc crypto.Hash, msg []byte) (hash.Hash, error) { - h := hashFunc.New() - if _, err := h.Write(msg); err != nil { - return nil, err - } - return h, nil -} - -func TestRSAPrivateKey(t *testing.T) { - privKeyDER, _ := hex.DecodeString(pkcs1PrivKeyHex) - rsaPriv, err := x509.ParsePKCS1PrivateKey(privKeyDER) - if err != nil { - t.Fatal(err) - } - - var buf bytes.Buffer - if err := NewRSAPrivateKey(time.Now(), rsaPriv).Serialize(&buf); err != nil { - t.Fatal(err) - } - - p, err := Read(&buf) - if err != nil { - t.Fatal(err) - } - - priv, ok := p.(*PrivateKey) - if !ok { - t.Fatal("didn't parse private key") - } - - sig := &Signature{ - PubKeyAlgo: PubKeyAlgoRSA, - Hash: crypto.SHA256, - } - msg := []byte("Hello World!") - - h, err := populateHash(sig.Hash, msg) - if err != nil { - t.Fatal(err) - } - if err := sig.Sign(h, priv, nil); err != nil { - t.Fatal(err) - } - - if h, err = populateHash(sig.Hash, msg); err != nil { - t.Fatal(err) - } - if err := priv.VerifySignature(h, sig); err != nil { - t.Fatal(err) - } -} - -func TestECDSAPrivateKey(t *testing.T) { - ecdsaPriv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - - var buf bytes.Buffer - if err := NewECDSAPrivateKey(time.Now(), ecdsaPriv).Serialize(&buf); err != nil { - t.Fatal(err) - } - - p, err := Read(&buf) - if err != nil { - t.Fatal(err) - } - - priv, ok := p.(*PrivateKey) - if !ok { - t.Fatal("didn't parse private key") - } - - sig := &Signature{ - PubKeyAlgo: PubKeyAlgoECDSA, - Hash: crypto.SHA256, - } - msg := []byte("Hello World!") - - h, err := populateHash(sig.Hash, msg) - if err != nil { - t.Fatal(err) - } - if err := sig.Sign(h, priv, nil); err != nil { - t.Fatal(err) - } - - if h, err = populateHash(sig.Hash, msg); err != nil { - t.Fatal(err) - } - if err := priv.VerifySignature(h, sig); err != nil { - t.Fatal(err) - } -} - -type rsaSigner struct { - priv *rsa.PrivateKey -} - -func (s *rsaSigner) Public() crypto.PublicKey { - return s.priv.PublicKey -} - -func (s *rsaSigner) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error) { - return s.priv.Sign(rand, msg, opts) -} - -func TestRSASignerPrivateKey(t *testing.T) { - rsaPriv, err := rsa.GenerateKey(rand.Reader, 1024) - if err != nil { - t.Fatal(err) - } - - priv := NewSignerPrivateKey(time.Now(), &rsaSigner{rsaPriv}) - - if priv.PubKeyAlgo != PubKeyAlgoRSASignOnly { - t.Fatal("NewSignerPrivateKey should have made a sign-only RSA private key") - } - - sig := &Signature{ - PubKeyAlgo: PubKeyAlgoRSASignOnly, - Hash: crypto.SHA256, - } - msg := []byte("Hello World!") - - h, err := populateHash(sig.Hash, msg) - if err != nil { - t.Fatal(err) - } - if err := sig.Sign(h, priv, nil); err != nil { - t.Fatal(err) - } - - if h, err = populateHash(sig.Hash, msg); err != nil { - t.Fatal(err) - } - if err := priv.VerifySignature(h, sig); err != nil { - t.Fatal(err) - } -} - -type ecdsaSigner struct { - priv *ecdsa.PrivateKey -} - -func (s *ecdsaSigner) Public() crypto.PublicKey { - return s.priv.PublicKey -} - -func (s *ecdsaSigner) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error) { - return s.priv.Sign(rand, msg, opts) -} - -func TestECDSASignerPrivateKey(t *testing.T) { - ecdsaPriv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - - priv := NewSignerPrivateKey(time.Now(), &ecdsaSigner{ecdsaPriv}) - - if priv.PubKeyAlgo != PubKeyAlgoECDSA { - t.Fatal("NewSignerPrivateKey should have made an ECSDA private key") - } - - sig := &Signature{ - PubKeyAlgo: PubKeyAlgoECDSA, - Hash: crypto.SHA256, - } - msg := []byte("Hello World!") - - h, err := populateHash(sig.Hash, msg) - if err != nil { - t.Fatal(err) - } - if err := sig.Sign(h, priv, nil); err != nil { - t.Fatal(err) - } - - if h, err = populateHash(sig.Hash, msg); err != nil { - t.Fatal(err) - } - if err := priv.VerifySignature(h, sig); err != nil { - t.Fatal(err) - } -} - -func TestIssue11505(t *testing.T) { - // parsing a rsa private key with p or q == 1 used to panic due to a divide by zero - _, _ = Read(readerFromHex("9c3004303030300100000011303030000000000000010130303030303030303030303030303030303030303030303030303030303030303030303030303030303030")) -} - -// Generated with `gpg --export-secret-keys "Test Key 2"` -const privKeyRSAHex = "9501fe044cc349a8010400b70ca0010e98c090008d45d1ee8f9113bd5861fd57b88bacb7c68658747663f1e1a3b5a98f32fda6472373c024b97359cd2efc88ff60f77751adfbf6af5e615e6a1408cfad8bf0cea30b0d5f53aa27ad59089ba9b15b7ebc2777a25d7b436144027e3bcd203909f147d0e332b240cf63d3395f5dfe0df0a6c04e8655af7eacdf0011010001fe0303024a252e7d475fd445607de39a265472aa74a9320ba2dac395faa687e9e0336aeb7e9a7397e511b5afd9dc84557c80ac0f3d4d7bfec5ae16f20d41c8c84a04552a33870b930420e230e179564f6d19bb153145e76c33ae993886c388832b0fa042ddda7f133924f3854481533e0ede31d51278c0519b29abc3bf53da673e13e3e1214b52413d179d7f66deee35cac8eacb060f78379d70ef4af8607e68131ff529439668fc39c9ce6dfef8a5ac234d234802cbfb749a26107db26406213ae5c06d4673253a3cbee1fcbae58d6ab77e38d6e2c0e7c6317c48e054edadb5a40d0d48acb44643d998139a8a66bb820be1f3f80185bc777d14b5954b60effe2448a036d565c6bc0b915fcea518acdd20ab07bc1529f561c58cd044f723109b93f6fd99f876ff891d64306b5d08f48bab59f38695e9109c4dec34013ba3153488ce070268381ba923ee1eb77125b36afcb4347ec3478c8f2735b06ef17351d872e577fa95d0c397c88c71b59629a36aec" - -// Generated by `gpg --export-secret-keys` followed by a manual extraction of -// the ElGamal subkey from the packets. -const privKeyElGamalHex = "9d0157044df9ee1a100400eb8e136a58ec39b582629cdadf830bc64e0a94ed8103ca8bb247b27b11b46d1d25297ef4bcc3071785ba0c0bedfe89eabc5287fcc0edf81ab5896c1c8e4b20d27d79813c7aede75320b33eaeeaa586edc00fd1036c10133e6ba0ff277245d0d59d04b2b3421b7244aca5f4a8d870c6f1c1fbff9e1c26699a860b9504f35ca1d700030503fd1ededd3b840795be6d9ccbe3c51ee42e2f39233c432b831ddd9c4e72b7025a819317e47bf94f9ee316d7273b05d5fcf2999c3a681f519b1234bbfa6d359b4752bd9c3f77d6b6456cde152464763414ca130f4e91d91041432f90620fec0e6d6b5116076c2985d5aeaae13be492b9b329efcaf7ee25120159a0a30cd976b42d7afe030302dae7eb80db744d4960c4df930d57e87fe81412eaace9f900e6c839817a614ddb75ba6603b9417c33ea7b6c93967dfa2bcff3fa3c74a5ce2c962db65b03aece14c96cbd0038fc" - -// pkcs1PrivKeyHex is a PKCS#1, RSA private key. -// Generated by `openssl genrsa 1024 | openssl rsa -outform DER | xxd -p` -const pkcs1PrivKeyHex = "3082025d02010002818100e98edfa1c3b35884a54d0b36a6a603b0290fa85e49e30fa23fc94fef9c6790bc4849928607aa48d809da326fb42a969d06ad756b98b9c1a90f5d4a2b6d0ac05953c97f4da3120164a21a679793ce181c906dc01d235cc085ddcdf6ea06c389b6ab8885dfd685959e693138856a68a7e5db263337ff82a088d583a897cf2d59e9020301000102818100b6d5c9eb70b02d5369b3ee5b520a14490b5bde8a317d36f7e4c74b7460141311d1e5067735f8f01d6f5908b2b96fbd881f7a1ab9a84d82753e39e19e2d36856be960d05ac9ef8e8782ea1b6d65aee28fdfe1d61451e8cff0adfe84322f12cf455028b581cf60eb9e0e140ba5d21aeba6c2634d7c65318b9a665fc01c3191ca21024100fa5e818da3705b0fa33278bb28d4b6f6050388af2d4b75ec9375dd91ccf2e7d7068086a8b82a8f6282e4fbbdb8a7f2622eb97295249d87acea7f5f816f54d347024100eecf9406d7dc49cdfb95ab1eff4064de84c7a30f64b2798936a0d2018ba9eb52e4b636f82e96c49cc63b80b675e91e40d1b2e4017d4b9adaf33ab3d9cf1c214f024100c173704ace742c082323066226a4655226819a85304c542b9dacbeacbf5d1881ee863485fcf6f59f3a604f9b42289282067447f2b13dfeed3eab7851fc81e0550240741fc41f3fc002b382eed8730e33c5d8de40256e4accee846667f536832f711ab1d4590e7db91a8a116ac5bff3be13d3f9243ff2e976662aa9b395d907f8e9c9024046a5696c9ef882363e06c9fa4e2f5b580906452befba03f4a99d0f873697ef1f851d2226ca7934b30b7c3e80cb634a67172bbbf4781735fe3e09263e2dd723e7" diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key.go deleted file mode 100644 index 88b57921ef..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key.go +++ /dev/null @@ -1,753 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rsa" - "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" - "encoding/binary" - "fmt" - "hash" - "io" - "math/big" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/elgamal" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -var ( - // NIST curve P-256 - oidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07} - // NIST curve P-384 - oidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22} - // NIST curve P-521 - oidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23} -) - -const maxOIDLength = 8 - -// ecdsaKey stores the algorithm-specific fields for ECDSA keys. -// as defined in RFC 6637, Section 9. -type ecdsaKey struct { - // oid contains the OID byte sequence identifying the elliptic curve used - oid []byte - // p contains the elliptic curve point that represents the public key - p parsedMPI -} - -// parseOID reads the OID for the curve as defined in RFC 6637, Section 9. -func parseOID(r io.Reader) (oid []byte, err error) { - buf := make([]byte, maxOIDLength) - if _, err = readFull(r, buf[:1]); err != nil { - return - } - oidLen := buf[0] - if int(oidLen) > len(buf) { - err = errors.UnsupportedError("invalid oid length: " + strconv.Itoa(int(oidLen))) - return - } - oid = buf[:oidLen] - _, err = readFull(r, oid) - return -} - -func (f *ecdsaKey) parse(r io.Reader) (err error) { - if f.oid, err = parseOID(r); err != nil { - return err - } - f.p.bytes, f.p.bitLength, err = readMPI(r) - return -} - -func (f *ecdsaKey) serialize(w io.Writer) (err error) { - buf := make([]byte, maxOIDLength+1) - buf[0] = byte(len(f.oid)) - copy(buf[1:], f.oid) - if _, err = w.Write(buf[:len(f.oid)+1]); err != nil { - return - } - return writeMPIs(w, f.p) -} - -func (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) { - var c elliptic.Curve - if bytes.Equal(f.oid, oidCurveP256) { - c = elliptic.P256() - } else if bytes.Equal(f.oid, oidCurveP384) { - c = elliptic.P384() - } else if bytes.Equal(f.oid, oidCurveP521) { - c = elliptic.P521() - } else { - return nil, errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", f.oid)) - } - x, y := elliptic.Unmarshal(c, f.p.bytes) - if x == nil { - return nil, errors.UnsupportedError("failed to parse EC point") - } - return &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil -} - -func (f *ecdsaKey) byteLen() int { - return 1 + len(f.oid) + 2 + len(f.p.bytes) -} - -type kdfHashFunction byte -type kdfAlgorithm byte - -// ecdhKdf stores key derivation function parameters -// used for ECDH encryption. See RFC 6637, Section 9. -type ecdhKdf struct { - KdfHash kdfHashFunction - KdfAlgo kdfAlgorithm -} - -func (f *ecdhKdf) parse(r io.Reader) (err error) { - buf := make([]byte, 1) - if _, err = readFull(r, buf); err != nil { - return - } - kdfLen := int(buf[0]) - if kdfLen < 3 { - return errors.UnsupportedError("Unsupported ECDH KDF length: " + strconv.Itoa(kdfLen)) - } - buf = make([]byte, kdfLen) - if _, err = readFull(r, buf); err != nil { - return - } - reserved := int(buf[0]) - f.KdfHash = kdfHashFunction(buf[1]) - f.KdfAlgo = kdfAlgorithm(buf[2]) - if reserved != 0x01 { - return errors.UnsupportedError("Unsupported KDF reserved field: " + strconv.Itoa(reserved)) - } - return -} - -func (f *ecdhKdf) serialize(w io.Writer) (err error) { - buf := make([]byte, 4) - // See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys. - buf[0] = byte(0x03) // Length of the following fields - buf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now - buf[2] = byte(f.KdfHash) - buf[3] = byte(f.KdfAlgo) - _, err = w.Write(buf[:]) - return -} - -func (f *ecdhKdf) byteLen() int { - return 4 -} - -// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2. -type PublicKey struct { - CreationTime time.Time - PubKeyAlgo PublicKeyAlgorithm - PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey - Fingerprint [20]byte - KeyId uint64 - IsSubkey bool - - n, e, p, q, g, y parsedMPI - - // RFC 6637 fields - ec *ecdsaKey - ecdh *ecdhKdf -} - -// signingKey provides a convenient abstraction over signature verification -// for v3 and v4 public keys. -type signingKey interface { - SerializeSignaturePrefix(io.Writer) - serializeWithoutHeaders(io.Writer) error -} - -func fromBig(n *big.Int) parsedMPI { - return parsedMPI{ - bytes: n.Bytes(), - bitLength: uint16(n.BitLen()), - } -} - -// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey. -func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoRSA, - PublicKey: pub, - n: fromBig(pub.N), - e: fromBig(big.NewInt(int64(pub.E))), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey. -func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoDSA, - PublicKey: pub, - p: fromBig(pub.P), - q: fromBig(pub.Q), - g: fromBig(pub.G), - y: fromBig(pub.Y), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey. -func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoElGamal, - PublicKey: pub, - p: fromBig(pub.P), - g: fromBig(pub.G), - y: fromBig(pub.Y), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoECDSA, - PublicKey: pub, - ec: new(ecdsaKey), - } - - switch pub.Curve { - case elliptic.P256(): - pk.ec.oid = oidCurveP256 - case elliptic.P384(): - pk.ec.oid = oidCurveP384 - case elliptic.P521(): - pk.ec.oid = oidCurveP521 - default: - panic("unknown elliptic curve") - } - - pk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y) - - // The bit length is 3 (for the 0x04 specifying an uncompressed key) - // plus two field elements (for x and y), which are rounded up to the - // nearest byte. See https://tools.ietf.org/html/rfc6637#section-6 - fieldBytes := (pub.Curve.Params().BitSize + 7) & ^7 - pk.ec.p.bitLength = uint16(3 + fieldBytes + fieldBytes) - - pk.setFingerPrintAndKeyId() - return pk -} - -func (pk *PublicKey) parse(r io.Reader) (err error) { - // RFC 4880, section 5.5.2 - var buf [6]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != 4 { - return errors.UnsupportedError("public key version") - } - pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) - pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5]) - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - err = pk.parseRSA(r) - case PubKeyAlgoDSA: - err = pk.parseDSA(r) - case PubKeyAlgoElGamal: - err = pk.parseElGamal(r) - case PubKeyAlgoECDSA: - pk.ec = new(ecdsaKey) - if err = pk.ec.parse(r); err != nil { - return err - } - pk.PublicKey, err = pk.ec.newECDSA() - case PubKeyAlgoECDH: - pk.ec = new(ecdsaKey) - if err = pk.ec.parse(r); err != nil { - return - } - pk.ecdh = new(ecdhKdf) - if err = pk.ecdh.parse(r); err != nil { - return - } - // The ECDH key is stored in an ecdsa.PublicKey for convenience. - pk.PublicKey, err = pk.ec.newECDSA() - default: - err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) - } - if err != nil { - return - } - - pk.setFingerPrintAndKeyId() - return -} - -func (pk *PublicKey) setFingerPrintAndKeyId() { - // RFC 4880, section 12.2 - fingerPrint := sha1.New() - pk.SerializeSignaturePrefix(fingerPrint) - pk.serializeWithoutHeaders(fingerPrint) - copy(pk.Fingerprint[:], fingerPrint.Sum(nil)) - pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20]) -} - -// parseRSA parses RSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKey) parseRSA(r io.Reader) (err error) { - pk.n.bytes, pk.n.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.e.bytes, pk.e.bitLength, err = readMPI(r) - if err != nil { - return - } - - if len(pk.e.bytes) > 3 { - err = errors.UnsupportedError("large public exponent") - return - } - rsa := &rsa.PublicKey{ - N: new(big.Int).SetBytes(pk.n.bytes), - E: 0, - } - for i := 0; i < len(pk.e.bytes); i++ { - rsa.E <<= 8 - rsa.E |= int(pk.e.bytes[i]) - } - pk.PublicKey = rsa - return -} - -// parseDSA parses DSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKey) parseDSA(r io.Reader) (err error) { - pk.p.bytes, pk.p.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.q.bytes, pk.q.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.g.bytes, pk.g.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.y.bytes, pk.y.bitLength, err = readMPI(r) - if err != nil { - return - } - - dsa := new(dsa.PublicKey) - dsa.P = new(big.Int).SetBytes(pk.p.bytes) - dsa.Q = new(big.Int).SetBytes(pk.q.bytes) - dsa.G = new(big.Int).SetBytes(pk.g.bytes) - dsa.Y = new(big.Int).SetBytes(pk.y.bytes) - pk.PublicKey = dsa - return -} - -// parseElGamal parses ElGamal public key material from the given Reader. See -// RFC 4880, section 5.5.2. -func (pk *PublicKey) parseElGamal(r io.Reader) (err error) { - pk.p.bytes, pk.p.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.g.bytes, pk.g.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.y.bytes, pk.y.bitLength, err = readMPI(r) - if err != nil { - return - } - - elgamal := new(elgamal.PublicKey) - elgamal.P = new(big.Int).SetBytes(pk.p.bytes) - elgamal.G = new(big.Int).SetBytes(pk.g.bytes) - elgamal.Y = new(big.Int).SetBytes(pk.y.bytes) - pk.PublicKey = elgamal - return -} - -// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. -// The prefix is used when calculating a signature over this public key. See -// RFC 4880, section 5.2.4. -func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) { - var pLength uint16 - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - pLength += 2 + uint16(len(pk.n.bytes)) - pLength += 2 + uint16(len(pk.e.bytes)) - case PubKeyAlgoDSA: - pLength += 2 + uint16(len(pk.p.bytes)) - pLength += 2 + uint16(len(pk.q.bytes)) - pLength += 2 + uint16(len(pk.g.bytes)) - pLength += 2 + uint16(len(pk.y.bytes)) - case PubKeyAlgoElGamal: - pLength += 2 + uint16(len(pk.p.bytes)) - pLength += 2 + uint16(len(pk.g.bytes)) - pLength += 2 + uint16(len(pk.y.bytes)) - case PubKeyAlgoECDSA: - pLength += uint16(pk.ec.byteLen()) - case PubKeyAlgoECDH: - pLength += uint16(pk.ec.byteLen()) - pLength += uint16(pk.ecdh.byteLen()) - default: - panic("unknown public key algorithm") - } - pLength += 6 - h.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) - return -} - -func (pk *PublicKey) Serialize(w io.Writer) (err error) { - length := 6 // 6 byte header - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - length += 2 + len(pk.n.bytes) - length += 2 + len(pk.e.bytes) - case PubKeyAlgoDSA: - length += 2 + len(pk.p.bytes) - length += 2 + len(pk.q.bytes) - length += 2 + len(pk.g.bytes) - length += 2 + len(pk.y.bytes) - case PubKeyAlgoElGamal: - length += 2 + len(pk.p.bytes) - length += 2 + len(pk.g.bytes) - length += 2 + len(pk.y.bytes) - case PubKeyAlgoECDSA: - length += pk.ec.byteLen() - case PubKeyAlgoECDH: - length += pk.ec.byteLen() - length += pk.ecdh.byteLen() - default: - panic("unknown public key algorithm") - } - - packetType := packetTypePublicKey - if pk.IsSubkey { - packetType = packetTypePublicSubkey - } - err = serializeHeader(w, packetType, length) - if err != nil { - return - } - return pk.serializeWithoutHeaders(w) -} - -// serializeWithoutHeaders marshals the PublicKey to w in the form of an -// OpenPGP public key packet, not including the packet header. -func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) { - var buf [6]byte - buf[0] = 4 - t := uint32(pk.CreationTime.Unix()) - buf[1] = byte(t >> 24) - buf[2] = byte(t >> 16) - buf[3] = byte(t >> 8) - buf[4] = byte(t) - buf[5] = byte(pk.PubKeyAlgo) - - _, err = w.Write(buf[:]) - if err != nil { - return - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - return writeMPIs(w, pk.n, pk.e) - case PubKeyAlgoDSA: - return writeMPIs(w, pk.p, pk.q, pk.g, pk.y) - case PubKeyAlgoElGamal: - return writeMPIs(w, pk.p, pk.g, pk.y) - case PubKeyAlgoECDSA: - return pk.ec.serialize(w) - case PubKeyAlgoECDH: - if err = pk.ec.serialize(w); err != nil { - return - } - return pk.ecdh.serialize(w) - } - return errors.InvalidArgumentError("bad public-key algorithm") -} - -// CanSign returns true iff this public key can generate signatures -func (pk *PublicKey) CanSign() bool { - return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal -} - -// VerifySignature returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - signed.Write(sig.HashSuffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey) - err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)) - if err != nil { - return errors.SignatureError("RSA verification failure") - } - return nil - case PubKeyAlgoDSA: - dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey) - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 - if len(hashBytes) > subgroupSize { - hashBytes = hashBytes[:subgroupSize] - } - if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { - return errors.SignatureError("DSA verification failure") - } - return nil - case PubKeyAlgoECDSA: - ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey) - if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) { - return errors.SignatureError("ECDSA verification failure") - } - return nil - default: - return errors.SignatureError("Unsupported public key algorithm used in signature") - } -} - -// VerifySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - suffix := make([]byte, 5) - suffix[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) - signed.Write(suffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - rsaPublicKey := pk.PublicKey.(*rsa.PublicKey) - if err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)); err != nil { - return errors.SignatureError("RSA verification failure") - } - return - case PubKeyAlgoDSA: - dsaPublicKey := pk.PublicKey.(*dsa.PublicKey) - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 - if len(hashBytes) > subgroupSize { - hashBytes = hashBytes[:subgroupSize] - } - if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { - return errors.SignatureError("DSA verification failure") - } - return nil - default: - panic("shouldn't happen") - } -} - -// keySignatureHash returns a Hash of the message that needs to be signed for -// pk to assert a subkey relationship to signed. -func keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - signed.SerializeSignaturePrefix(h) - signed.serializeWithoutHeaders(h) - return -} - -// VerifyKeySignature returns nil iff sig is a valid signature, made by this -// public key, of signed. -func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error { - h, err := keySignatureHash(pk, signed, sig.Hash) - if err != nil { - return err - } - if err = pk.VerifySignature(h, sig); err != nil { - return err - } - - if sig.FlagSign { - // Signing subkeys must be cross-signed. See - // https://www.gnupg.org/faq/subkey-cross-certify.html. - if sig.EmbeddedSignature == nil { - return errors.StructuralError("signing subkey is missing cross-signature") - } - // Verify the cross-signature. This is calculated over the same - // data as the main signature, so we cannot just recursively - // call signed.VerifyKeySignature(...) - if h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil { - return errors.StructuralError("error while hashing for cross-signature: " + err.Error()) - } - if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil { - return errors.StructuralError("error while verifying cross-signature: " + err.Error()) - } - } - - return nil -} - -func keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - return -} - -// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this -// public key. -func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) { - h, err := keyRevocationHash(pk, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignature(h, sig) -} - -// userIdSignatureHash returns a Hash of the message that needs to be signed -// to assert that pk is a valid key for id. -func userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - var buf [5]byte - buf[0] = 0xb4 - buf[1] = byte(len(id) >> 24) - buf[2] = byte(len(id) >> 16) - buf[3] = byte(len(id) >> 8) - buf[4] = byte(len(id)) - h.Write(buf[:]) - h.Write([]byte(id)) - - return -} - -// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) { - h, err := userIdSignatureHash(id, pub, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignature(h, sig) -} - -// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) { - h, err := userIdSignatureV3Hash(id, pub, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// KeyIdString returns the public key's fingerprint in capital hex -// (e.g. "6C7EE1B8621CC013"). -func (pk *PublicKey) KeyIdString() string { - return fmt.Sprintf("%X", pk.Fingerprint[12:20]) -} - -// KeyIdShortString returns the short form of public key's fingerprint -// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). -func (pk *PublicKey) KeyIdShortString() string { - return fmt.Sprintf("%X", pk.Fingerprint[16:20]) -} - -// A parsedMPI is used to store the contents of a big integer, along with the -// bit length that was specified in the original input. This allows the MPI to -// be reserialized exactly. -type parsedMPI struct { - bytes []byte - bitLength uint16 -} - -// writeMPIs is a utility function for serializing several big integers to the -// given Writer. -func writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) { - for _, mpi := range mpis { - err = writeMPI(w, mpi.bitLength, mpi.bytes) - if err != nil { - return - } - } - return -} - -// BitLength returns the bit length for the given public key. -func (pk *PublicKey) BitLength() (bitLength uint16, err error) { - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - bitLength = pk.n.bitLength - case PubKeyAlgoDSA: - bitLength = pk.p.bitLength - case PubKeyAlgoElGamal: - bitLength = pk.p.bitLength - default: - err = errors.InvalidArgumentError("bad public-key algorithm") - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_test.go deleted file mode 100644 index 103696ee7c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_test.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "encoding/hex" - "math/big" - "testing" - "time" -) - -var pubKeyTests = []struct { - hexData string - hexFingerprint string - creationTime time.Time - pubKeyAlgo PublicKeyAlgorithm - keyId uint64 - keyIdString string - keyIdShort string -}{ - {rsaPkDataHex, rsaFingerprintHex, time.Unix(0x4d3c5c10, 0), PubKeyAlgoRSA, 0xa34d7e18c20c31bb, "A34D7E18C20C31BB", "C20C31BB"}, - {dsaPkDataHex, dsaFingerprintHex, time.Unix(0x4d432f89, 0), PubKeyAlgoDSA, 0x8e8fbe54062f19ed, "8E8FBE54062F19ED", "062F19ED"}, - {ecdsaPkDataHex, ecdsaFingerprintHex, time.Unix(0x5071c294, 0), PubKeyAlgoECDSA, 0x43fe956c542ca00b, "43FE956C542CA00B", "542CA00B"}, -} - -func TestPublicKeyRead(t *testing.T) { - for i, test := range pubKeyTests { - packet, err := Read(readerFromHex(test.hexData)) - if err != nil { - t.Errorf("#%d: Read error: %s", i, err) - continue - } - pk, ok := packet.(*PublicKey) - if !ok { - t.Errorf("#%d: failed to parse, got: %#v", i, packet) - continue - } - if pk.PubKeyAlgo != test.pubKeyAlgo { - t.Errorf("#%d: bad public key algorithm got:%x want:%x", i, pk.PubKeyAlgo, test.pubKeyAlgo) - } - if !pk.CreationTime.Equal(test.creationTime) { - t.Errorf("#%d: bad creation time got:%v want:%v", i, pk.CreationTime, test.creationTime) - } - expectedFingerprint, _ := hex.DecodeString(test.hexFingerprint) - if !bytes.Equal(expectedFingerprint, pk.Fingerprint[:]) { - t.Errorf("#%d: bad fingerprint got:%x want:%x", i, pk.Fingerprint[:], expectedFingerprint) - } - if pk.KeyId != test.keyId { - t.Errorf("#%d: bad keyid got:%x want:%x", i, pk.KeyId, test.keyId) - } - if g, e := pk.KeyIdString(), test.keyIdString; g != e { - t.Errorf("#%d: bad KeyIdString got:%q want:%q", i, g, e) - } - if g, e := pk.KeyIdShortString(), test.keyIdShort; g != e { - t.Errorf("#%d: bad KeyIdShortString got:%q want:%q", i, g, e) - } - } -} - -func TestPublicKeySerialize(t *testing.T) { - for i, test := range pubKeyTests { - packet, err := Read(readerFromHex(test.hexData)) - if err != nil { - t.Errorf("#%d: Read error: %s", i, err) - continue - } - pk, ok := packet.(*PublicKey) - if !ok { - t.Errorf("#%d: failed to parse, got: %#v", i, packet) - continue - } - serializeBuf := bytes.NewBuffer(nil) - err = pk.Serialize(serializeBuf) - if err != nil { - t.Errorf("#%d: failed to serialize: %s", i, err) - continue - } - - packet, err = Read(serializeBuf) - if err != nil { - t.Errorf("#%d: Read error (from serialized data): %s", i, err) - continue - } - pk, ok = packet.(*PublicKey) - if !ok { - t.Errorf("#%d: failed to parse serialized data, got: %#v", i, packet) - continue - } - } -} - -func TestEcc384Serialize(t *testing.T) { - r := readerFromHex(ecc384PubHex) - var w bytes.Buffer - for i := 0; i < 2; i++ { - // Public key - p, err := Read(r) - if err != nil { - t.Error(err) - } - pubkey := p.(*PublicKey) - if !bytes.Equal(pubkey.ec.oid, []byte{0x2b, 0x81, 0x04, 0x00, 0x22}) { - t.Errorf("Unexpected pubkey OID: %x", pubkey.ec.oid) - } - if !bytes.Equal(pubkey.ec.p.bytes[:5], []byte{0x04, 0xf6, 0xb8, 0xc5, 0xac}) { - t.Errorf("Unexpected pubkey P[:5]: %x", pubkey.ec.p.bytes) - } - if pubkey.KeyId != 0x098033880F54719F { - t.Errorf("Unexpected pubkey ID: %x", pubkey.KeyId) - } - err = pubkey.Serialize(&w) - if err != nil { - t.Error(err) - } - // User ID - p, err = Read(r) - if err != nil { - t.Error(err) - } - uid := p.(*UserId) - if uid.Id != "ec_dsa_dh_384 " { - t.Error("Unexpected UID:", uid.Id) - } - err = uid.Serialize(&w) - if err != nil { - t.Error(err) - } - // User ID Sig - p, err = Read(r) - if err != nil { - t.Error(err) - } - uidSig := p.(*Signature) - err = pubkey.VerifyUserIdSignature(uid.Id, pubkey, uidSig) - if err != nil { - t.Error(err, ": UID") - } - err = uidSig.Serialize(&w) - if err != nil { - t.Error(err) - } - // Subkey - p, err = Read(r) - if err != nil { - t.Error(err) - } - subkey := p.(*PublicKey) - if !bytes.Equal(subkey.ec.oid, []byte{0x2b, 0x81, 0x04, 0x00, 0x22}) { - t.Errorf("Unexpected subkey OID: %x", subkey.ec.oid) - } - if !bytes.Equal(subkey.ec.p.bytes[:5], []byte{0x04, 0x2f, 0xaa, 0x84, 0x02}) { - t.Errorf("Unexpected subkey P[:5]: %x", subkey.ec.p.bytes) - } - if subkey.ecdh.KdfHash != 0x09 { - t.Error("Expected KDF hash function SHA384 (0x09), got", subkey.ecdh.KdfHash) - } - if subkey.ecdh.KdfAlgo != 0x09 { - t.Error("Expected KDF symmetric alg AES256 (0x09), got", subkey.ecdh.KdfAlgo) - } - if subkey.KeyId != 0xAA8B938F9A201946 { - t.Errorf("Unexpected subkey ID: %x", subkey.KeyId) - } - err = subkey.Serialize(&w) - if err != nil { - t.Error(err) - } - // Subkey Sig - p, err = Read(r) - if err != nil { - t.Error(err) - } - subkeySig := p.(*Signature) - err = pubkey.VerifyKeySignature(subkey, subkeySig) - if err != nil { - t.Error(err) - } - err = subkeySig.Serialize(&w) - if err != nil { - t.Error(err) - } - // Now read back what we've written again - r = bytes.NewBuffer(w.Bytes()) - w.Reset() - } -} - -func TestP256KeyID(t *testing.T) { - // Confirm that key IDs are correctly calculated for ECC keys. - ecdsaPub := &ecdsa.PublicKey{ - Curve: elliptic.P256(), - X: fromHex("81fbbc20eea9e8d1c3ceabb0a8185925b113d1ac42cd5c78403bd83da19235c6"), - Y: fromHex("5ed6db13d91db34507d0129bf88981878d29adbf8fcd1720afdb767bb3fcaaff"), - } - pub := NewECDSAPublicKey(time.Unix(1297309478, 0), ecdsaPub) - - const want = uint64(0xd01055fbcadd268e) - if pub.KeyId != want { - t.Errorf("want key ID: %x, got %x", want, pub.KeyId) - } -} - -func fromHex(hex string) *big.Int { - n, ok := new(big.Int).SetString(hex, 16) - if !ok { - panic("bad hex number: " + hex) - } - return n -} - -const rsaFingerprintHex = "5fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb" - -const rsaPkDataHex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001" - -const dsaFingerprintHex = "eece4c094db002103714c63c8e8fbe54062f19ed" - -const dsaPkDataHex = "9901a2044d432f89110400cd581334f0d7a1e1bdc8b9d6d8c0baf68793632735d2bb0903224cbaa1dfbf35a60ee7a13b92643421e1eb41aa8d79bea19a115a677f6b8ba3c7818ce53a6c2a24a1608bd8b8d6e55c5090cbde09dd26e356267465ae25e69ec8bdd57c7bbb2623e4d73336f73a0a9098f7f16da2e25252130fd694c0e8070c55a812a423ae7f00a0ebf50e70c2f19c3520a551bd4b08d30f23530d3d03ff7d0bf4a53a64a09dc5e6e6e35854b7d70c882b0c60293401958b1bd9e40abec3ea05ba87cf64899299d4bd6aa7f459c201d3fbbd6c82004bdc5e8a9eb8082d12054cc90fa9d4ec251a843236a588bf49552441817436c4f43326966fe85447d4e6d0acf8fa1ef0f014730770603ad7634c3088dc52501c237328417c31c89ed70400b2f1a98b0bf42f11fefc430704bebbaa41d9f355600c3facee1e490f64208e0e094ea55e3a598a219a58500bf78ac677b670a14f4e47e9cf8eab4f368cc1ddcaa18cc59309d4cc62dd4f680e73e6cc3e1ce87a84d0925efbcb26c575c093fc42eecf45135fabf6403a25c2016e1774c0484e440a18319072c617cc97ac0a3bb0" - -const ecdsaFingerprintHex = "9892270b38b8980b05c8d56d43fe956c542ca00b" - -const ecdsaPkDataHex = "9893045071c29413052b8104002304230401f4867769cedfa52c325018896245443968e52e51d0c2df8d939949cb5b330f2921711fbee1c9b9dddb95d15cb0255e99badeddda7cc23d9ddcaacbc290969b9f24019375d61c2e4e3b36953a28d8b2bc95f78c3f1d592fb24499be348656a7b17e3963187b4361afe497bc5f9f81213f04069f8e1fb9e6a6290ae295ca1a92b894396cb4" - -// Source: https://sites.google.com/site/brainhub/pgpecckeys#TOC-ECC-NIST-P-384-key -const ecc384PubHex = `99006f044d53059213052b81040022030304f6b8c5aced5b84ef9f4a209db2e4a9dfb70d28cb8c10ecd57674a9fa5a67389942b62d5e51367df4c7bfd3f8e500feecf07ed265a621a8ebbbe53e947ec78c677eba143bd1533c2b350e1c29f82313e1e1108eba063be1e64b10e6950e799c2db42465635f6473615f64685f333834203c6f70656e70677040627261696e6875622e6f72673e8900cb04101309005305024d530592301480000000002000077072656665727265642d656d61696c2d656e636f64696e67407067702e636f6d7067706d696d65040b090807021901051b03000000021602051e010000000415090a08000a0910098033880f54719fca2b0180aa37350968bd5f115afd8ce7bc7b103822152dbff06d0afcda835329510905b98cb469ba208faab87c7412b799e7b633017f58364ea480e8a1a3f253a0c5f22c446e8be9a9fce6210136ee30811abbd49139de28b5bdf8dc36d06ae748579e9ff503b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec9180301090989008404181309000c05024d530592051b0c000000000a0910098033880f54719f80970180eee7a6d8fcee41ee4f9289df17f9bcf9d955dca25c583b94336f3a2b2d4986dc5cf417b8d2dc86f741a9e1a6d236c0e3017d1c76575458a0cfb93ae8a2b274fcc65ceecd7a91eec83656ba13219969f06945b48c56bd04152c3a0553c5f2f4bd1267` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3.go deleted file mode 100644 index e1be069e4a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "crypto" - "crypto/md5" - "crypto/rsa" - "encoding/binary" - "fmt" - "hash" - "io" - "math/big" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and -// should not be used for signing or encrypting. They are supported here only for -// parsing version 3 key material and validating signatures. -// See RFC 4880, section 5.5.2. -type PublicKeyV3 struct { - CreationTime time.Time - DaysToExpire uint16 - PubKeyAlgo PublicKeyAlgorithm - PublicKey *rsa.PublicKey - Fingerprint [16]byte - KeyId uint64 - IsSubkey bool - - n, e parsedMPI -} - -// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey. -// Included here for testing purposes only. RFC 4880, section 5.5.2: -// "an implementation MUST NOT generate a V3 key, but MAY accept it." -func newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 { - pk := &PublicKeyV3{ - CreationTime: creationTime, - PublicKey: pub, - n: fromBig(pub.N), - e: fromBig(big.NewInt(int64(pub.E))), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -func (pk *PublicKeyV3) parse(r io.Reader) (err error) { - // RFC 4880, section 5.5.2 - var buf [8]byte - if _, err = readFull(r, buf[:]); err != nil { - return - } - if buf[0] < 2 || buf[0] > 3 { - return errors.UnsupportedError("public key version") - } - pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) - pk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7]) - pk.PubKeyAlgo = PublicKeyAlgorithm(buf[7]) - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - err = pk.parseRSA(r) - default: - err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) - } - if err != nil { - return - } - - pk.setFingerPrintAndKeyId() - return -} - -func (pk *PublicKeyV3) setFingerPrintAndKeyId() { - // RFC 4880, section 12.2 - fingerPrint := md5.New() - fingerPrint.Write(pk.n.bytes) - fingerPrint.Write(pk.e.bytes) - fingerPrint.Sum(pk.Fingerprint[:0]) - pk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:]) -} - -// parseRSA parses RSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) { - if pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil { - return - } - if pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil { - return - } - - // RFC 4880 Section 12.2 requires the low 8 bytes of the - // modulus to form the key id. - if len(pk.n.bytes) < 8 { - return errors.StructuralError("v3 public key modulus is too short") - } - if len(pk.e.bytes) > 3 { - err = errors.UnsupportedError("large public exponent") - return - } - rsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)} - for i := 0; i < len(pk.e.bytes); i++ { - rsa.E <<= 8 - rsa.E |= int(pk.e.bytes[i]) - } - pk.PublicKey = rsa - return -} - -// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. -// The prefix is used when calculating a signature over this public key. See -// RFC 4880, section 5.2.4. -func (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) { - var pLength uint16 - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - pLength += 2 + uint16(len(pk.n.bytes)) - pLength += 2 + uint16(len(pk.e.bytes)) - default: - panic("unknown public key algorithm") - } - pLength += 6 - w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) - return -} - -func (pk *PublicKeyV3) Serialize(w io.Writer) (err error) { - length := 8 // 8 byte header - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - length += 2 + len(pk.n.bytes) - length += 2 + len(pk.e.bytes) - default: - panic("unknown public key algorithm") - } - - packetType := packetTypePublicKey - if pk.IsSubkey { - packetType = packetTypePublicSubkey - } - if err = serializeHeader(w, packetType, length); err != nil { - return - } - return pk.serializeWithoutHeaders(w) -} - -// serializeWithoutHeaders marshals the PublicKey to w in the form of an -// OpenPGP public key packet, not including the packet header. -func (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) { - var buf [8]byte - // Version 3 - buf[0] = 3 - // Creation time - t := uint32(pk.CreationTime.Unix()) - buf[1] = byte(t >> 24) - buf[2] = byte(t >> 16) - buf[3] = byte(t >> 8) - buf[4] = byte(t) - // Days to expire - buf[5] = byte(pk.DaysToExpire >> 8) - buf[6] = byte(pk.DaysToExpire) - // Public key algorithm - buf[7] = byte(pk.PubKeyAlgo) - - if _, err = w.Write(buf[:]); err != nil { - return - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - return writeMPIs(w, pk.n, pk.e) - } - return errors.InvalidArgumentError("bad public-key algorithm") -} - -// CanSign returns true iff this public key can generate signatures -func (pk *PublicKeyV3) CanSign() bool { - return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly -} - -// VerifySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - suffix := make([]byte, 5) - suffix[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) - signed.Write(suffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - if err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil { - return errors.SignatureError("RSA verification failure") - } - return - default: - // V3 public keys only support RSA. - panic("shouldn't happen") - } -} - -// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) { - h, err := userIdSignatureV3Hash(id, pk, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of signed. -func (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) { - h, err := keySignatureHash(pk, signed, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// userIdSignatureV3Hash returns a Hash of the message that needs to be signed -// to assert that pk is a valid key for id. -func userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) { - if !hfn.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hfn.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - h.Write([]byte(id)) - - return -} - -// KeyIdString returns the public key's fingerprint in capital hex -// (e.g. "6C7EE1B8621CC013"). -func (pk *PublicKeyV3) KeyIdString() string { - return fmt.Sprintf("%X", pk.KeyId) -} - -// KeyIdShortString returns the short form of public key's fingerprint -// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). -func (pk *PublicKeyV3) KeyIdShortString() string { - return fmt.Sprintf("%X", pk.KeyId&0xFFFFFFFF) -} - -// BitLength returns the bit length for the given public key. -func (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) { - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - bitLength = pk.n.bitLength - default: - err = errors.InvalidArgumentError("bad public-key algorithm") - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3_test.go deleted file mode 100644 index e06405904b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/public_key_v3_test.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "bytes" - "encoding/hex" - "testing" - "time" -) - -var pubKeyV3Test = struct { - hexFingerprint string - creationTime time.Time - pubKeyAlgo PublicKeyAlgorithm - keyId uint64 - keyIdString string - keyIdShort string -}{ - "103BECF5BD1E837C89D19E98487767F7", - time.Unix(779753634, 0), - PubKeyAlgoRSA, - 0xDE0F188A5DA5E3C9, - "DE0F188A5DA5E3C9", - "5DA5E3C9"} - -func TestPublicKeyV3Read(t *testing.T) { - i, test := 0, pubKeyV3Test - packet, err := Read(v3KeyReader(t)) - if err != nil { - t.Fatalf("#%d: Read error: %s", i, err) - } - pk, ok := packet.(*PublicKeyV3) - if !ok { - t.Fatalf("#%d: failed to parse, got: %#v", i, packet) - } - if pk.PubKeyAlgo != test.pubKeyAlgo { - t.Errorf("#%d: bad public key algorithm got:%x want:%x", i, pk.PubKeyAlgo, test.pubKeyAlgo) - } - if !pk.CreationTime.Equal(test.creationTime) { - t.Errorf("#%d: bad creation time got:%v want:%v", i, pk.CreationTime, test.creationTime) - } - expectedFingerprint, _ := hex.DecodeString(test.hexFingerprint) - if !bytes.Equal(expectedFingerprint, pk.Fingerprint[:]) { - t.Errorf("#%d: bad fingerprint got:%x want:%x", i, pk.Fingerprint[:], expectedFingerprint) - } - if pk.KeyId != test.keyId { - t.Errorf("#%d: bad keyid got:%x want:%x", i, pk.KeyId, test.keyId) - } - if g, e := pk.KeyIdString(), test.keyIdString; g != e { - t.Errorf("#%d: bad KeyIdString got:%q want:%q", i, g, e) - } - if g, e := pk.KeyIdShortString(), test.keyIdShort; g != e { - t.Errorf("#%d: bad KeyIdShortString got:%q want:%q", i, g, e) - } -} - -func TestPublicKeyV3Serialize(t *testing.T) { - //for i, test := range pubKeyV3Tests { - i := 0 - packet, err := Read(v3KeyReader(t)) - if err != nil { - t.Fatalf("#%d: Read error: %s", i, err) - } - pk, ok := packet.(*PublicKeyV3) - if !ok { - t.Fatalf("#%d: failed to parse, got: %#v", i, packet) - } - var serializeBuf bytes.Buffer - if err = pk.Serialize(&serializeBuf); err != nil { - t.Fatalf("#%d: failed to serialize: %s", i, err) - } - - if packet, err = Read(bytes.NewBuffer(serializeBuf.Bytes())); err != nil { - t.Fatalf("#%d: Read error (from serialized data): %s", i, err) - } - if pk, ok = packet.(*PublicKeyV3); !ok { - t.Fatalf("#%d: failed to parse serialized data, got: %#v", i, packet) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/reader.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/reader.go deleted file mode 100644 index 863b0f2e5b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/reader.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "io" -) - -// Reader reads packets from an io.Reader and allows packets to be 'unread' so -// that they result from the next call to Next. -type Reader struct { - q []Packet - readers []io.Reader -} - -// New io.Readers are pushed when a compressed or encrypted packet is processed -// and recursively treated as a new source of packets. However, a carefully -// crafted packet can trigger an infinite recursive sequence of packets. See -// http://mumble.net/~campbell/misc/pgp-quine -// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402 -// This constant limits the number of recursive packets that may be pushed. -const maxReaders = 32 - -// Next returns the most recently unread Packet, or reads another packet from -// the top-most io.Reader. Unknown packet types are skipped. -func (r *Reader) Next() (p Packet, err error) { - if len(r.q) > 0 { - p = r.q[len(r.q)-1] - r.q = r.q[:len(r.q)-1] - return - } - - for len(r.readers) > 0 { - p, err = Read(r.readers[len(r.readers)-1]) - if err == nil { - return - } - if err == io.EOF { - r.readers = r.readers[:len(r.readers)-1] - continue - } - if _, ok := err.(errors.UnknownPacketTypeError); !ok { - return nil, err - } - } - - return nil, io.EOF -} - -// Push causes the Reader to start reading from a new io.Reader. When an EOF -// error is seen from the new io.Reader, it is popped and the Reader continues -// to read from the next most recent io.Reader. Push returns a StructuralError -// if pushing the reader would exceed the maximum recursion level, otherwise it -// returns nil. -func (r *Reader) Push(reader io.Reader) (err error) { - if len(r.readers) >= maxReaders { - return errors.StructuralError("too many layers of packets") - } - r.readers = append(r.readers, reader) - return nil -} - -// Unread causes the given Packet to be returned from the next call to Next. -func (r *Reader) Unread(p Packet) { - r.q = append(r.q, p) -} - -func NewReader(r io.Reader) *Reader { - return &Reader{ - q: nil, - readers: []io.Reader{r}, - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature.go deleted file mode 100644 index 434bbc50a9..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature.go +++ /dev/null @@ -1,731 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "encoding/asn1" - "encoding/binary" - "hash" - "io" - "math/big" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" -) - -const ( - // See RFC 4880, section 5.2.3.21 for details. - KeyFlagCertify = 1 << iota - KeyFlagSign - KeyFlagEncryptCommunications - KeyFlagEncryptStorage -) - -// Signature represents a signature. See RFC 4880, section 5.2. -type Signature struct { - SigType SignatureType - PubKeyAlgo PublicKeyAlgorithm - Hash crypto.Hash - - // HashSuffix is extra data that is hashed in after the signed data. - HashSuffix []byte - // HashTag contains the first two bytes of the hash for fast rejection - // of bad signed data. - HashTag [2]byte - CreationTime time.Time - - RSASignature parsedMPI - DSASigR, DSASigS parsedMPI - ECDSASigR, ECDSASigS parsedMPI - - // rawSubpackets contains the unparsed subpackets, in order. - rawSubpackets []outputSubpacket - - // The following are optional so are nil when not included in the - // signature. - - SigLifetimeSecs, KeyLifetimeSecs *uint32 - PreferredSymmetric, PreferredHash, PreferredCompression []uint8 - IssuerKeyId *uint64 - IsPrimaryId *bool - - // FlagsValid is set if any flags were given. See RFC 4880, section - // 5.2.3.21 for details. - FlagsValid bool - FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool - - // RevocationReason is set if this signature has been revoked. - // See RFC 4880, section 5.2.3.23 for details. - RevocationReason *uint8 - RevocationReasonText string - - // MDC is set if this signature has a feature packet that indicates - // support for MDC subpackets. - MDC bool - - // EmbeddedSignature, if non-nil, is a signature of the parent key, by - // this key. This prevents an attacker from claiming another's signing - // subkey as their own. - EmbeddedSignature *Signature - - outSubpackets []outputSubpacket -} - -func (sig *Signature) parse(r io.Reader) (err error) { - // RFC 4880, section 5.2.3 - var buf [5]byte - _, err = readFull(r, buf[:1]) - if err != nil { - return - } - if buf[0] != 4 { - err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) - return - } - - _, err = readFull(r, buf[:5]) - if err != nil { - return - } - sig.SigType = SignatureType(buf[0]) - sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1]) - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: - default: - err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) - return - } - - var ok bool - sig.Hash, ok = s2k.HashIdToHash(buf[2]) - if !ok { - return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) - } - - hashedSubpacketsLength := int(buf[3])<<8 | int(buf[4]) - l := 6 + hashedSubpacketsLength - sig.HashSuffix = make([]byte, l+6) - sig.HashSuffix[0] = 4 - copy(sig.HashSuffix[1:], buf[:5]) - hashedSubpackets := sig.HashSuffix[6:l] - _, err = readFull(r, hashedSubpackets) - if err != nil { - return - } - // See RFC 4880, section 5.2.4 - trailer := sig.HashSuffix[l:] - trailer[0] = 4 - trailer[1] = 0xff - trailer[2] = uint8(l >> 24) - trailer[3] = uint8(l >> 16) - trailer[4] = uint8(l >> 8) - trailer[5] = uint8(l) - - err = parseSignatureSubpackets(sig, hashedSubpackets, true) - if err != nil { - return - } - - _, err = readFull(r, buf[:2]) - if err != nil { - return - } - unhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1]) - unhashedSubpackets := make([]byte, unhashedSubpacketsLength) - _, err = readFull(r, unhashedSubpackets) - if err != nil { - return - } - err = parseSignatureSubpackets(sig, unhashedSubpackets, false) - if err != nil { - return - } - - _, err = readFull(r, sig.HashTag[:2]) - if err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) - case PubKeyAlgoDSA: - sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r) - if err == nil { - sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) - } - case PubKeyAlgoECDSA: - sig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r) - if err == nil { - sig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r) - } - default: - panic("unreachable") - } - return -} - -// parseSignatureSubpackets parses subpackets of the main signature packet. See -// RFC 4880, section 5.2.3.1. -func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) { - for len(subpackets) > 0 { - subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) - if err != nil { - return - } - } - - if sig.CreationTime.IsZero() { - err = errors.StructuralError("no creation time in signature") - } - - return -} - -type signatureSubpacketType uint8 - -const ( - creationTimeSubpacket signatureSubpacketType = 2 - signatureExpirationSubpacket signatureSubpacketType = 3 - keyExpirationSubpacket signatureSubpacketType = 9 - prefSymmetricAlgosSubpacket signatureSubpacketType = 11 - issuerSubpacket signatureSubpacketType = 16 - prefHashAlgosSubpacket signatureSubpacketType = 21 - prefCompressionSubpacket signatureSubpacketType = 22 - primaryUserIdSubpacket signatureSubpacketType = 25 - keyFlagsSubpacket signatureSubpacketType = 27 - reasonForRevocationSubpacket signatureSubpacketType = 29 - featuresSubpacket signatureSubpacketType = 30 - embeddedSignatureSubpacket signatureSubpacketType = 32 -) - -// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1. -func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) { - // RFC 4880, section 5.2.3.1 - var ( - length uint32 - packetType signatureSubpacketType - isCritical bool - ) - switch { - case subpacket[0] < 192: - length = uint32(subpacket[0]) - subpacket = subpacket[1:] - case subpacket[0] < 255: - if len(subpacket) < 2 { - goto Truncated - } - length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192 - subpacket = subpacket[2:] - default: - if len(subpacket) < 5 { - goto Truncated - } - length = uint32(subpacket[1])<<24 | - uint32(subpacket[2])<<16 | - uint32(subpacket[3])<<8 | - uint32(subpacket[4]) - subpacket = subpacket[5:] - } - if length > uint32(len(subpacket)) { - goto Truncated - } - rest = subpacket[length:] - subpacket = subpacket[:length] - if len(subpacket) == 0 { - err = errors.StructuralError("zero length signature subpacket") - return - } - packetType = signatureSubpacketType(subpacket[0] & 0x7f) - isCritical = subpacket[0]&0x80 == 0x80 - subpacket = subpacket[1:] - sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket}) - switch packetType { - case creationTimeSubpacket: - if !isHashed { - err = errors.StructuralError("signature creation time in non-hashed area") - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("signature creation time not four bytes") - return - } - t := binary.BigEndian.Uint32(subpacket) - sig.CreationTime = time.Unix(int64(t), 0) - case signatureExpirationSubpacket: - // Signature expiration time, section 5.2.3.10 - if !isHashed { - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("expiration subpacket with bad length") - return - } - sig.SigLifetimeSecs = new(uint32) - *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket) - case keyExpirationSubpacket: - // Key expiration time, section 5.2.3.6 - if !isHashed { - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("key expiration subpacket with bad length") - return - } - sig.KeyLifetimeSecs = new(uint32) - *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket) - case prefSymmetricAlgosSubpacket: - // Preferred symmetric algorithms, section 5.2.3.7 - if !isHashed { - return - } - sig.PreferredSymmetric = make([]byte, len(subpacket)) - copy(sig.PreferredSymmetric, subpacket) - case issuerSubpacket: - // Issuer, section 5.2.3.5 - if len(subpacket) != 8 { - err = errors.StructuralError("issuer subpacket with bad length") - return - } - sig.IssuerKeyId = new(uint64) - *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket) - case prefHashAlgosSubpacket: - // Preferred hash algorithms, section 5.2.3.8 - if !isHashed { - return - } - sig.PreferredHash = make([]byte, len(subpacket)) - copy(sig.PreferredHash, subpacket) - case prefCompressionSubpacket: - // Preferred compression algorithms, section 5.2.3.9 - if !isHashed { - return - } - sig.PreferredCompression = make([]byte, len(subpacket)) - copy(sig.PreferredCompression, subpacket) - case primaryUserIdSubpacket: - // Primary User ID, section 5.2.3.19 - if !isHashed { - return - } - if len(subpacket) != 1 { - err = errors.StructuralError("primary user id subpacket with bad length") - return - } - sig.IsPrimaryId = new(bool) - if subpacket[0] > 0 { - *sig.IsPrimaryId = true - } - case keyFlagsSubpacket: - // Key flags, section 5.2.3.21 - if !isHashed { - return - } - if len(subpacket) == 0 { - err = errors.StructuralError("empty key flags subpacket") - return - } - sig.FlagsValid = true - if subpacket[0]&KeyFlagCertify != 0 { - sig.FlagCertify = true - } - if subpacket[0]&KeyFlagSign != 0 { - sig.FlagSign = true - } - if subpacket[0]&KeyFlagEncryptCommunications != 0 { - sig.FlagEncryptCommunications = true - } - if subpacket[0]&KeyFlagEncryptStorage != 0 { - sig.FlagEncryptStorage = true - } - case reasonForRevocationSubpacket: - // Reason For Revocation, section 5.2.3.23 - if !isHashed { - return - } - if len(subpacket) == 0 { - err = errors.StructuralError("empty revocation reason subpacket") - return - } - sig.RevocationReason = new(uint8) - *sig.RevocationReason = subpacket[0] - sig.RevocationReasonText = string(subpacket[1:]) - case featuresSubpacket: - // Features subpacket, section 5.2.3.24 specifies a very general - // mechanism for OpenPGP implementations to signal support for new - // features. In practice, the subpacket is used exclusively to - // indicate support for MDC-protected encryption. - sig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1 - case embeddedSignatureSubpacket: - // Only usage is in signatures that cross-certify - // signing subkeys. section 5.2.3.26 describes the - // format, with its usage described in section 11.1 - if sig.EmbeddedSignature != nil { - err = errors.StructuralError("Cannot have multiple embedded signatures") - return - } - sig.EmbeddedSignature = new(Signature) - // Embedded signatures are required to be v4 signatures see - // section 12.1. However, we only parse v4 signatures in this - // file anyway. - if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil { - return nil, err - } - if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding { - return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType))) - } - default: - if isCritical { - err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType))) - return - } - } - return - -Truncated: - err = errors.StructuralError("signature subpacket truncated") - return -} - -// subpacketLengthLength returns the length, in bytes, of an encoded length value. -func subpacketLengthLength(length int) int { - if length < 192 { - return 1 - } - if length < 16320 { - return 2 - } - return 5 -} - -// serializeSubpacketLength marshals the given length into to. -func serializeSubpacketLength(to []byte, length int) int { - // RFC 4880, Section 4.2.2. - if length < 192 { - to[0] = byte(length) - return 1 - } - if length < 16320 { - length -= 192 - to[0] = byte((length >> 8) + 192) - to[1] = byte(length) - return 2 - } - to[0] = 255 - to[1] = byte(length >> 24) - to[2] = byte(length >> 16) - to[3] = byte(length >> 8) - to[4] = byte(length) - return 5 -} - -// subpacketsLength returns the serialized length, in bytes, of the given -// subpackets. -func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) { - for _, subpacket := range subpackets { - if subpacket.hashed == hashed { - length += subpacketLengthLength(len(subpacket.contents) + 1) - length += 1 // type byte - length += len(subpacket.contents) - } - } - return -} - -// serializeSubpackets marshals the given subpackets into to. -func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) { - for _, subpacket := range subpackets { - if subpacket.hashed == hashed { - n := serializeSubpacketLength(to, len(subpacket.contents)+1) - to[n] = byte(subpacket.subpacketType) - to = to[1+n:] - n = copy(to, subpacket.contents) - to = to[n:] - } - } - return -} - -// KeyExpired returns whether sig is a self-signature of a key that has -// expired. -func (sig *Signature) KeyExpired(currentTime time.Time) bool { - if sig.KeyLifetimeSecs == nil { - return false - } - expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second) - return currentTime.After(expiry) -} - -// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing. -func (sig *Signature) buildHashSuffix() (err error) { - hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true) - - var ok bool - l := 6 + hashedSubpacketsLen - sig.HashSuffix = make([]byte, l+6) - sig.HashSuffix[0] = 4 - sig.HashSuffix[1] = uint8(sig.SigType) - sig.HashSuffix[2] = uint8(sig.PubKeyAlgo) - sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash) - if !ok { - sig.HashSuffix = nil - return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash))) - } - sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8) - sig.HashSuffix[5] = byte(hashedSubpacketsLen) - serializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true) - trailer := sig.HashSuffix[l:] - trailer[0] = 4 - trailer[1] = 0xff - trailer[2] = byte(l >> 24) - trailer[3] = byte(l >> 16) - trailer[4] = byte(l >> 8) - trailer[5] = byte(l) - return -} - -func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) { - err = sig.buildHashSuffix() - if err != nil { - return - } - - h.Write(sig.HashSuffix) - digest = h.Sum(nil) - copy(sig.HashTag[:], digest) - return -} - -// Sign signs a message with a private key. The hash, h, must contain -// the hash of the message to be signed and will be mutated by this function. -// On success, the signature is stored in sig. Call Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) { - sig.outSubpackets = sig.buildSubpackets() - digest, err := sig.signPrepareHash(h) - if err != nil { - return - } - - switch priv.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - // supports both *rsa.PrivateKey and crypto.Signer - sig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) - sig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes)) - case PubKeyAlgoDSA: - dsaPriv := priv.PrivateKey.(*dsa.PrivateKey) - - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8 - if len(digest) > subgroupSize { - digest = digest[:subgroupSize] - } - r, s, err := dsa.Sign(config.Random(), dsaPriv, digest) - if err == nil { - sig.DSASigR.bytes = r.Bytes() - sig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes)) - sig.DSASigS.bytes = s.Bytes() - sig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes)) - } - case PubKeyAlgoECDSA: - var r, s *big.Int - if pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok { - // direct support, avoid asn1 wrapping/unwrapping - r, s, err = ecdsa.Sign(config.Random(), pk, digest) - } else { - var b []byte - b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, nil) - if err == nil { - r, s, err = unwrapECDSASig(b) - } - } - if err == nil { - sig.ECDSASigR = fromBig(r) - sig.ECDSASigS = fromBig(s) - } - default: - err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo))) - } - - return -} - -// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA -// signature. -func unwrapECDSASig(b []byte) (r, s *big.Int, err error) { - var ecsdaSig struct { - R, S *big.Int - } - _, err = asn1.Unmarshal(b, &ecsdaSig) - if err != nil { - return - } - return ecsdaSig.R, ecsdaSig.S, nil -} - -// SignUserId computes a signature from priv, asserting that pub is a valid -// key for the identity id. On success, the signature is stored in sig. Call -// Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error { - h, err := userIdSignatureHash(id, pub, sig.Hash) - if err != nil { - return err - } - return sig.Sign(h, priv, config) -} - -// SignKey computes a signature from priv, asserting that pub is a subkey. On -// success, the signature is stored in sig. Call Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error { - h, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash) - if err != nil { - return err - } - return sig.Sign(h, priv, config) -} - -// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been -// called first. -func (sig *Signature) Serialize(w io.Writer) (err error) { - if len(sig.outSubpackets) == 0 { - sig.outSubpackets = sig.rawSubpackets - } - if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil { - return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") - } - - sigLength := 0 - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sigLength = 2 + len(sig.RSASignature.bytes) - case PubKeyAlgoDSA: - sigLength = 2 + len(sig.DSASigR.bytes) - sigLength += 2 + len(sig.DSASigS.bytes) - case PubKeyAlgoECDSA: - sigLength = 2 + len(sig.ECDSASigR.bytes) - sigLength += 2 + len(sig.ECDSASigS.bytes) - default: - panic("impossible") - } - - unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false) - length := len(sig.HashSuffix) - 6 /* trailer not included */ + - 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen + - 2 /* hash tag */ + sigLength - err = serializeHeader(w, packetTypeSignature, length) - if err != nil { - return - } - - _, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6]) - if err != nil { - return - } - - unhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen) - unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8) - unhashedSubpackets[1] = byte(unhashedSubpacketsLen) - serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false) - - _, err = w.Write(unhashedSubpackets) - if err != nil { - return - } - _, err = w.Write(sig.HashTag[:]) - if err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - err = writeMPIs(w, sig.RSASignature) - case PubKeyAlgoDSA: - err = writeMPIs(w, sig.DSASigR, sig.DSASigS) - case PubKeyAlgoECDSA: - err = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS) - default: - panic("impossible") - } - return -} - -// outputSubpacket represents a subpacket to be marshaled. -type outputSubpacket struct { - hashed bool // true if this subpacket is in the hashed area. - subpacketType signatureSubpacketType - isCritical bool - contents []byte -} - -func (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) { - creationTime := make([]byte, 4) - binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix())) - subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime}) - - if sig.IssuerKeyId != nil { - keyId := make([]byte, 8) - binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId) - subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId}) - } - - if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 { - sigLifetime := make([]byte, 4) - binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs) - subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime}) - } - - // Key flags may only appear in self-signatures or certification signatures. - - if sig.FlagsValid { - var flags byte - if sig.FlagCertify { - flags |= KeyFlagCertify - } - if sig.FlagSign { - flags |= KeyFlagSign - } - if sig.FlagEncryptCommunications { - flags |= KeyFlagEncryptCommunications - } - if sig.FlagEncryptStorage { - flags |= KeyFlagEncryptStorage - } - subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}}) - } - - // The following subpackets may only appear in self-signatures - - if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 { - keyLifetime := make([]byte, 4) - binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs) - subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime}) - } - - if sig.IsPrimaryId != nil && *sig.IsPrimaryId { - subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}}) - } - - if len(sig.PreferredSymmetric) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric}) - } - - if len(sig.PreferredHash) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash}) - } - - if len(sig.PreferredCompression) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression}) - } - - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_test.go deleted file mode 100644 index 56e761179d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "encoding/hex" - "testing" -) - -func TestSignatureRead(t *testing.T) { - packet, err := Read(readerFromHex(signatureDataHex)) - if err != nil { - t.Error(err) - return - } - sig, ok := packet.(*Signature) - if !ok || sig.SigType != SigTypeBinary || sig.PubKeyAlgo != PubKeyAlgoRSA || sig.Hash != crypto.SHA1 { - t.Errorf("failed to parse, got: %#v", packet) - } -} - -func TestSignatureReserialize(t *testing.T) { - packet, _ := Read(readerFromHex(signatureDataHex)) - sig := packet.(*Signature) - out := new(bytes.Buffer) - err := sig.Serialize(out) - if err != nil { - t.Errorf("error reserializing: %s", err) - return - } - - expected, _ := hex.DecodeString(signatureDataHex) - if !bytes.Equal(expected, out.Bytes()) { - t.Errorf("output doesn't match input (got vs expected):\n%s\n%s", hex.Dump(out.Bytes()), hex.Dump(expected)) - } -} - -func TestSignUserId(t *testing.T) { - sig := &Signature{ - SigType: SigTypeGenericCert, - PubKeyAlgo: PubKeyAlgoRSA, - Hash: 0, // invalid hash function - } - - packet, err := Read(readerFromHex(rsaPkDataHex)) - if err != nil { - t.Fatalf("failed to deserialize public key: %v", err) - } - pubKey := packet.(*PublicKey) - - packet, err = Read(readerFromHex(privKeyRSAHex)) - if err != nil { - t.Fatalf("failed to deserialize private key: %v", err) - } - privKey := packet.(*PrivateKey) - - err = sig.SignUserId("", pubKey, privKey, nil) - if err == nil { - t.Errorf("did not receive an error when expected") - } - - sig.Hash = crypto.SHA256 - err = privKey.Decrypt([]byte("testing")) - if err != nil { - t.Fatalf("failed to decrypt private key: %v", err) - } - - err = sig.SignUserId("", pubKey, privKey, nil) - if err != nil { - t.Errorf("failed to sign user id: %v", err) - } -} - -const signatureDataHex = "c2c05c04000102000605024cb45112000a0910ab105c91af38fb158f8d07ff5596ea368c5efe015bed6e78348c0f033c931d5f2ce5db54ce7f2a7e4b4ad64db758d65a7a71773edeab7ba2a9e0908e6a94a1175edd86c1d843279f045b021a6971a72702fcbd650efc393c5474d5b59a15f96d2eaad4c4c426797e0dcca2803ef41c6ff234d403eec38f31d610c344c06f2401c262f0993b2e66cad8a81ebc4322c723e0d4ba09fe917e8777658307ad8329adacba821420741009dfe87f007759f0982275d028a392c6ed983a0d846f890b36148c7358bdb8a516007fac760261ecd06076813831a36d0459075d1befa245ae7f7fb103d92ca759e9498fe60ef8078a39a3beda510deea251ea9f0a7f0df6ef42060f20780360686f3e400e" diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3.go deleted file mode 100644 index b15116a6dc..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "crypto" - "encoding/binary" - "fmt" - "io" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" -) - -// SignatureV3 represents older version 3 signatures. These signatures are less secure -// than version 4 and should not be used to create new signatures. They are included -// here for backwards compatibility to read and validate with older key material. -// See RFC 4880, section 5.2.2. -type SignatureV3 struct { - SigType SignatureType - CreationTime time.Time - IssuerKeyId uint64 - PubKeyAlgo PublicKeyAlgorithm - Hash crypto.Hash - HashTag [2]byte - - RSASignature parsedMPI - DSASigR, DSASigS parsedMPI -} - -func (sig *SignatureV3) parse(r io.Reader) (err error) { - // RFC 4880, section 5.2.2 - var buf [8]byte - if _, err = readFull(r, buf[:1]); err != nil { - return - } - if buf[0] < 2 || buf[0] > 3 { - err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) - return - } - if _, err = readFull(r, buf[:1]); err != nil { - return - } - if buf[0] != 5 { - err = errors.UnsupportedError( - "invalid hashed material length " + strconv.Itoa(int(buf[0]))) - return - } - - // Read hashed material: signature type + creation time - if _, err = readFull(r, buf[:5]); err != nil { - return - } - sig.SigType = SignatureType(buf[0]) - t := binary.BigEndian.Uint32(buf[1:5]) - sig.CreationTime = time.Unix(int64(t), 0) - - // Eight-octet Key ID of signer. - if _, err = readFull(r, buf[:8]); err != nil { - return - } - sig.IssuerKeyId = binary.BigEndian.Uint64(buf[:]) - - // Public-key and hash algorithm - if _, err = readFull(r, buf[:2]); err != nil { - return - } - sig.PubKeyAlgo = PublicKeyAlgorithm(buf[0]) - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA: - default: - err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) - return - } - var ok bool - if sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok { - return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) - } - - // Two-octet field holding left 16 bits of signed hash value. - if _, err = readFull(r, sig.HashTag[:2]); err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) - case PubKeyAlgoDSA: - if sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil { - return - } - sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) - default: - panic("unreachable") - } - return -} - -// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been -// called first. -func (sig *SignatureV3) Serialize(w io.Writer) (err error) { - buf := make([]byte, 8) - - // Write the sig type and creation time - buf[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix())) - if _, err = w.Write(buf[:5]); err != nil { - return - } - - // Write the issuer long key ID - binary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId) - if _, err = w.Write(buf[:8]); err != nil { - return - } - - // Write public key algorithm, hash ID, and hash value - buf[0] = byte(sig.PubKeyAlgo) - hashId, ok := s2k.HashToHashId(sig.Hash) - if !ok { - return errors.UnsupportedError(fmt.Sprintf("hash function %v", sig.Hash)) - } - buf[1] = hashId - copy(buf[2:4], sig.HashTag[:]) - if _, err = w.Write(buf[:4]); err != nil { - return - } - - if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil { - return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - err = writeMPIs(w, sig.RSASignature) - case PubKeyAlgoDSA: - err = writeMPIs(w, sig.DSASigR, sig.DSASigS) - default: - panic("impossible") - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3_test.go deleted file mode 100644 index bf4b1bbe22..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/signature_v3_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "bytes" - "crypto" - "encoding/hex" - "io" - "io/ioutil" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" -) - -func TestSignatureV3Read(t *testing.T) { - r := v3KeyReader(t) - Read(r) // Skip public key - Read(r) // Skip uid - packet, err := Read(r) // Signature - if err != nil { - t.Error(err) - return - } - sig, ok := packet.(*SignatureV3) - if !ok || sig.SigType != SigTypeGenericCert || sig.PubKeyAlgo != PubKeyAlgoRSA || sig.Hash != crypto.MD5 { - t.Errorf("failed to parse, got: %#v", packet) - } -} - -func TestSignatureV3Reserialize(t *testing.T) { - r := v3KeyReader(t) - Read(r) // Skip public key - Read(r) // Skip uid - packet, err := Read(r) - if err != nil { - t.Error(err) - return - } - sig := packet.(*SignatureV3) - out := new(bytes.Buffer) - if err = sig.Serialize(out); err != nil { - t.Errorf("error reserializing: %s", err) - return - } - expected, err := ioutil.ReadAll(v3KeyReader(t)) - if err != nil { - t.Error(err) - return - } - expected = expected[4+141+4+39:] // See pgpdump offsets below, this is where the sig starts - if !bytes.Equal(expected, out.Bytes()) { - t.Errorf("output doesn't match input (got vs expected):\n%s\n%s", hex.Dump(out.Bytes()), hex.Dump(expected)) - } -} - -func v3KeyReader(t *testing.T) io.Reader { - armorBlock, err := armor.Decode(bytes.NewBufferString(keySigV3Armor)) - if err != nil { - t.Fatalf("armor Decode failed: %v", err) - } - return armorBlock.Body -} - -// keySigV3Armor is some V3 public key I found in an SKS dump. -// Old: Public Key Packet(tag 6)(141 bytes) -// Ver 4 - new -// Public key creation time - Fri Sep 16 17:13:54 CDT 1994 -// Pub alg - unknown(pub 0) -// Unknown public key(pub 0) -// Old: User ID Packet(tag 13)(39 bytes) -// User ID - Armin M. Warda -// Old: Signature Packet(tag 2)(149 bytes) -// Ver 4 - new -// Sig type - unknown(05) -// Pub alg - ElGamal Encrypt-Only(pub 16) -// Hash alg - unknown(hash 46) -// Hashed Sub: unknown(sub 81, critical)(1988 bytes) -const keySigV3Armor = `-----BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.0.10 - -mI0CLnoYogAAAQQA1qwA2SuJwfQ5bCQ6u5t20ulnOtY0gykf7YjiK4LiVeRBwHjGq7v30tGV -5Qti7qqRW4Ww7CDCJc4sZMFnystucR2vLkXaSoNWoFm4Fg47NiisDdhDezHwbVPW6OpCFNSi -ZAamtj4QAUBu8j4LswafrJqZqR9336/V3g8Yil2l48kABRG0J0FybWluIE0uIFdhcmRhIDx3 -YXJkYUBuZXBoaWxpbS5ydWhyLmRlPoiVAgUQLok2xwXR6zmeWEiZAQE/DgP/WgxPQh40/Po4 -gSkWZCDAjNdph7zexvAb0CcUWahcwiBIgg3U5ErCx9I5CNVA9U+s8bNrDZwgSIeBzp3KhWUx -524uhGgm6ZUTOAIKA6CbV6pfqoLpJnRYvXYQU5mIWsNa99wcu2qu18OeEDnztb7aLA6Ra9OF -YFCbq4EjXRoOrYM= -=LPjs ------END PGP PUBLIC KEY BLOCK-----` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted.go deleted file mode 100644 index bf3246f3b7..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto/cipher" - "io" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" -) - -// This is the largest session key that we'll support. Since no 512-bit cipher -// has even been seriously used, this is comfortably large. -const maxSessionKeySizeInBytes = 64 - -// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC -// 4880, section 5.3. -type SymmetricKeyEncrypted struct { - CipherFunc CipherFunction - s2k func(out, in []byte) - encryptedKey []byte -} - -const symmetricKeyEncryptedVersion = 4 - -func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error { - // RFC 4880, section 5.3. - var buf [2]byte - if _, err := readFull(r, buf[:]); err != nil { - return err - } - if buf[0] != symmetricKeyEncryptedVersion { - return errors.UnsupportedError("SymmetricKeyEncrypted version") - } - ske.CipherFunc = CipherFunction(buf[1]) - - if ske.CipherFunc.KeySize() == 0 { - return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[1]))) - } - - var err error - ske.s2k, err = s2k.Parse(r) - if err != nil { - return err - } - - encryptedKey := make([]byte, maxSessionKeySizeInBytes) - // The session key may follow. We just have to try and read to find - // out. If it exists then we limit it to maxSessionKeySizeInBytes. - n, err := readFull(r, encryptedKey) - if err != nil && err != io.ErrUnexpectedEOF { - return err - } - - if n != 0 { - if n == maxSessionKeySizeInBytes { - return errors.UnsupportedError("oversized encrypted session key") - } - ske.encryptedKey = encryptedKey[:n] - } - - return nil -} - -// Decrypt attempts to decrypt an encrypted session key and returns the key and -// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data -// packet. -func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) { - key := make([]byte, ske.CipherFunc.KeySize()) - ske.s2k(key, passphrase) - - if len(ske.encryptedKey) == 0 { - return key, ske.CipherFunc, nil - } - - // the IV is all zeros - iv := make([]byte, ske.CipherFunc.blockSize()) - c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv) - plaintextKey := make([]byte, len(ske.encryptedKey)) - c.XORKeyStream(plaintextKey, ske.encryptedKey) - cipherFunc := CipherFunction(plaintextKey[0]) - if cipherFunc.blockSize() == 0 { - return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) - } - plaintextKey = plaintextKey[1:] - if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() { - return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " + - "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")") - } - return plaintextKey, cipherFunc, nil -} - -// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The -// packet contains a random session key, encrypted by a key derived from the -// given passphrase. The session key is returned and must be passed to -// SerializeSymmetricallyEncrypted. -// If config is nil, sensible defaults will be used. -func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) { - cipherFunc := config.Cipher() - keySize := cipherFunc.KeySize() - if keySize == 0 { - return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) - } - - s2kBuf := new(bytes.Buffer) - keyEncryptingKey := make([]byte, keySize) - // s2k.Serialize salts and stretches the passphrase, and writes the - // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf. - err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()}) - if err != nil { - return - } - s2kBytes := s2kBuf.Bytes() - - packetLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize - err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength) - if err != nil { - return - } - - var buf [2]byte - buf[0] = symmetricKeyEncryptedVersion - buf[1] = byte(cipherFunc) - _, err = w.Write(buf[:]) - if err != nil { - return - } - _, err = w.Write(s2kBytes) - if err != nil { - return - } - - sessionKey := make([]byte, keySize) - _, err = io.ReadFull(config.Random(), sessionKey) - if err != nil { - return - } - iv := make([]byte, cipherFunc.blockSize()) - c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv) - encryptedCipherAndKey := make([]byte, keySize+1) - c.XORKeyStream(encryptedCipherAndKey, buf[1:]) - c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey) - _, err = w.Write(encryptedCipherAndKey) - if err != nil { - return - } - - key = sessionKey - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted_test.go deleted file mode 100644 index e1d52c122e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetric_key_encrypted_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "encoding/hex" - "io" - "io/ioutil" - "testing" -) - -func TestSymmetricKeyEncrypted(t *testing.T) { - buf := readerFromHex(symmetricallyEncryptedHex) - packet, err := Read(buf) - if err != nil { - t.Errorf("failed to read SymmetricKeyEncrypted: %s", err) - return - } - ske, ok := packet.(*SymmetricKeyEncrypted) - if !ok { - t.Error("didn't find SymmetricKeyEncrypted packet") - return - } - key, cipherFunc, err := ske.Decrypt([]byte("password")) - if err != nil { - t.Error(err) - return - } - - packet, err = Read(buf) - if err != nil { - t.Errorf("failed to read SymmetricallyEncrypted: %s", err) - return - } - se, ok := packet.(*SymmetricallyEncrypted) - if !ok { - t.Error("didn't find SymmetricallyEncrypted packet") - return - } - r, err := se.Decrypt(cipherFunc, key) - if err != nil { - t.Error(err) - return - } - - contents, err := ioutil.ReadAll(r) - if err != nil && err != io.EOF { - t.Error(err) - return - } - - expectedContents, _ := hex.DecodeString(symmetricallyEncryptedContentsHex) - if !bytes.Equal(expectedContents, contents) { - t.Errorf("bad contents got:%x want:%x", contents, expectedContents) - } -} - -const symmetricallyEncryptedHex = "8c0d04030302371a0b38d884f02060c91cf97c9973b8e58e028e9501708ccfe618fb92afef7fa2d80ddadd93cf" -const symmetricallyEncryptedContentsHex = "cb1062004d14c4df636f6e74656e74732e0a" - -func TestSerializeSymmetricKeyEncryptedCiphers(t *testing.T) { - tests := [...]struct { - cipherFunc CipherFunction - name string - }{ - {Cipher3DES, "Cipher3DES"}, - {CipherCAST5, "CipherCAST5"}, - {CipherAES128, "CipherAES128"}, - {CipherAES192, "CipherAES192"}, - {CipherAES256, "CipherAES256"}, - } - - for _, test := range tests { - var buf bytes.Buffer - passphrase := []byte("testing") - config := &Config{ - DefaultCipher: test.cipherFunc, - } - - key, err := SerializeSymmetricKeyEncrypted(&buf, passphrase, config) - if err != nil { - t.Errorf("cipher(%s) failed to serialize: %s", test.name, err) - continue - } - - p, err := Read(&buf) - if err != nil { - t.Errorf("cipher(%s) failed to reparse: %s", test.name, err) - continue - } - - ske, ok := p.(*SymmetricKeyEncrypted) - if !ok { - t.Errorf("cipher(%s) parsed a different packet type: %#v", test.name, p) - continue - } - - if ske.CipherFunc != config.DefaultCipher { - t.Errorf("cipher(%s) SKE cipher function is %d (expected %d)", test.name, ske.CipherFunc, config.DefaultCipher) - } - parsedKey, parsedCipherFunc, err := ske.Decrypt(passphrase) - if err != nil { - t.Errorf("cipher(%s) failed to decrypt reparsed SKE: %s", test.name, err) - continue - } - if !bytes.Equal(key, parsedKey) { - t.Errorf("cipher(%s) keys don't match after Decrypt: %x (original) vs %x (parsed)", test.name, key, parsedKey) - } - if parsedCipherFunc != test.cipherFunc { - t.Errorf("cipher(%s) cipher function doesn't match after Decrypt: %d (original) vs %d (parsed)", - test.name, test.cipherFunc, parsedCipherFunc) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted.go deleted file mode 100644 index dc0873f55e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto/cipher" - "crypto/sha1" - "crypto/subtle" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "hash" - "io" - "strconv" -) - -// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The -// encrypted contents will consist of more OpenPGP packets. See RFC 4880, -// sections 5.7 and 5.13. -type SymmetricallyEncrypted struct { - MDC bool // true iff this is a type 18 packet and thus has an embedded MAC. - contents io.Reader - prefix []byte -} - -const symmetricallyEncryptedVersion = 1 - -func (se *SymmetricallyEncrypted) parse(r io.Reader) error { - if se.MDC { - // See RFC 4880, section 5.13. - var buf [1]byte - _, err := readFull(r, buf[:]) - if err != nil { - return err - } - if buf[0] != symmetricallyEncryptedVersion { - return errors.UnsupportedError("unknown SymmetricallyEncrypted version") - } - } - se.contents = r - return nil -} - -// Decrypt returns a ReadCloser, from which the decrypted contents of the -// packet can be read. An incorrect key can, with high probability, be detected -// immediately and this will result in a KeyIncorrect error being returned. -func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) { - keySize := c.KeySize() - if keySize == 0 { - return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c))) - } - if len(key) != keySize { - return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length") - } - - if se.prefix == nil { - se.prefix = make([]byte, c.blockSize()+2) - _, err := readFull(se.contents, se.prefix) - if err != nil { - return nil, err - } - } else if len(se.prefix) != c.blockSize()+2 { - return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths") - } - - ocfbResync := OCFBResync - if se.MDC { - // MDC packets use a different form of OCFB mode. - ocfbResync = OCFBNoResync - } - - s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync) - if s == nil { - return nil, errors.ErrKeyIncorrect - } - - plaintext := cipher.StreamReader{S: s, R: se.contents} - - if se.MDC { - // MDC packets have an embedded hash that we need to check. - h := sha1.New() - h.Write(se.prefix) - return &seMDCReader{in: plaintext, h: h}, nil - } - - // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser. - return seReader{plaintext}, nil -} - -// seReader wraps an io.Reader with a no-op Close method. -type seReader struct { - in io.Reader -} - -func (ser seReader) Read(buf []byte) (int, error) { - return ser.in.Read(buf) -} - -func (ser seReader) Close() error { - return nil -} - -const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size - -// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold -// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an -// MDC packet containing a hash of the previous contents which is checked -// against the running hash. See RFC 4880, section 5.13. -type seMDCReader struct { - in io.Reader - h hash.Hash - trailer [mdcTrailerSize]byte - scratch [mdcTrailerSize]byte - trailerUsed int - error bool - eof bool -} - -func (ser *seMDCReader) Read(buf []byte) (n int, err error) { - if ser.error { - err = io.ErrUnexpectedEOF - return - } - if ser.eof { - err = io.EOF - return - } - - // If we haven't yet filled the trailer buffer then we must do that - // first. - for ser.trailerUsed < mdcTrailerSize { - n, err = ser.in.Read(ser.trailer[ser.trailerUsed:]) - ser.trailerUsed += n - if err == io.EOF { - if ser.trailerUsed != mdcTrailerSize { - n = 0 - err = io.ErrUnexpectedEOF - ser.error = true - return - } - ser.eof = true - n = 0 - return - } - - if err != nil { - n = 0 - return - } - } - - // If it's a short read then we read into a temporary buffer and shift - // the data into the caller's buffer. - if len(buf) <= mdcTrailerSize { - n, err = readFull(ser.in, ser.scratch[:len(buf)]) - copy(buf, ser.trailer[:n]) - ser.h.Write(buf[:n]) - copy(ser.trailer[:], ser.trailer[n:]) - copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:]) - if n < len(buf) { - ser.eof = true - err = io.EOF - } - return - } - - n, err = ser.in.Read(buf[mdcTrailerSize:]) - copy(buf, ser.trailer[:]) - ser.h.Write(buf[:n]) - copy(ser.trailer[:], buf[n:]) - - if err == io.EOF { - ser.eof = true - } - return -} - -// This is a new-format packet tag byte for a type 19 (MDC) packet. -const mdcPacketTagByte = byte(0x80) | 0x40 | 19 - -func (ser *seMDCReader) Close() error { - if ser.error { - return errors.SignatureError("error during reading") - } - - for !ser.eof { - // We haven't seen EOF so we need to read to the end - var buf [1024]byte - _, err := ser.Read(buf[:]) - if err == io.EOF { - break - } - if err != nil { - return errors.SignatureError("error during reading") - } - } - - if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size { - return errors.SignatureError("MDC packet not found") - } - ser.h.Write(ser.trailer[:2]) - - final := ser.h.Sum(nil) - if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 { - return errors.SignatureError("hash mismatch") - } - return nil -} - -// An seMDCWriter writes through to an io.WriteCloser while maintains a running -// hash of the data written. On close, it emits an MDC packet containing the -// running hash. -type seMDCWriter struct { - w io.WriteCloser - h hash.Hash -} - -func (w *seMDCWriter) Write(buf []byte) (n int, err error) { - w.h.Write(buf) - return w.w.Write(buf) -} - -func (w *seMDCWriter) Close() (err error) { - var buf [mdcTrailerSize]byte - - buf[0] = mdcPacketTagByte - buf[1] = sha1.Size - w.h.Write(buf[:2]) - digest := w.h.Sum(nil) - copy(buf[2:], digest) - - _, err = w.w.Write(buf[:]) - if err != nil { - return - } - return w.w.Close() -} - -// noOpCloser is like an ioutil.NopCloser, but for an io.Writer. -type noOpCloser struct { - w io.Writer -} - -func (c noOpCloser) Write(data []byte) (n int, err error) { - return c.w.Write(data) -} - -func (c noOpCloser) Close() error { - return nil -} - -// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet -// to w and returns a WriteCloser to which the to-be-encrypted packets can be -// written. -// If config is nil, sensible defaults will be used. -func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) { - if c.KeySize() != len(key) { - return nil, errors.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length") - } - writeCloser := noOpCloser{w} - ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC) - if err != nil { - return - } - - _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion}) - if err != nil { - return - } - - block := c.new(key) - blockSize := block.BlockSize() - iv := make([]byte, blockSize) - _, err = config.Random().Read(iv) - if err != nil { - return - } - s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync) - _, err = ciphertext.Write(prefix) - if err != nil { - return - } - plaintext := cipher.StreamWriter{S: s, W: ciphertext} - - h := sha1.New() - h.Write(iv) - h.Write(iv[blockSize-2:]) - contents = &seMDCWriter{w: plaintext, h: h} - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted_test.go deleted file mode 100644 index 396c572e36..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/symmetrically_encrypted_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto/sha1" - "encoding/hex" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "io" - "io/ioutil" - "testing" -) - -// TestReader wraps a []byte and returns reads of a specific length. -type testReader struct { - data []byte - stride int -} - -func (t *testReader) Read(buf []byte) (n int, err error) { - n = t.stride - if n > len(t.data) { - n = len(t.data) - } - if n > len(buf) { - n = len(buf) - } - copy(buf, t.data) - t.data = t.data[n:] - if len(t.data) == 0 { - err = io.EOF - } - return -} - -func testMDCReader(t *testing.T) { - mdcPlaintext, _ := hex.DecodeString(mdcPlaintextHex) - - for stride := 1; stride < len(mdcPlaintext)/2; stride++ { - r := &testReader{data: mdcPlaintext, stride: stride} - mdcReader := &seMDCReader{in: r, h: sha1.New()} - body, err := ioutil.ReadAll(mdcReader) - if err != nil { - t.Errorf("stride: %d, error: %s", stride, err) - continue - } - if !bytes.Equal(body, mdcPlaintext[:len(mdcPlaintext)-22]) { - t.Errorf("stride: %d: bad contents %x", stride, body) - continue - } - - err = mdcReader.Close() - if err != nil { - t.Errorf("stride: %d, error on Close: %s", stride, err) - } - } - - mdcPlaintext[15] ^= 80 - - r := &testReader{data: mdcPlaintext, stride: 2} - mdcReader := &seMDCReader{in: r, h: sha1.New()} - _, err := ioutil.ReadAll(mdcReader) - if err != nil { - t.Errorf("corruption test, error: %s", err) - return - } - err = mdcReader.Close() - if err == nil { - t.Error("corruption: no error") - } else if _, ok := err.(*errors.SignatureError); !ok { - t.Errorf("corruption: expected SignatureError, got: %s", err) - } -} - -const mdcPlaintextHex = "a302789c3b2d93c4e0eb9aba22283539b3203335af44a134afb800c849cb4c4de10200aff40b45d31432c80cb384299a0655966d6939dfdeed1dddf980" - -func TestSerialize(t *testing.T) { - buf := bytes.NewBuffer(nil) - c := CipherAES128 - key := make([]byte, c.KeySize()) - - w, err := SerializeSymmetricallyEncrypted(buf, c, key, nil) - if err != nil { - t.Errorf("error from SerializeSymmetricallyEncrypted: %s", err) - return - } - - contents := []byte("hello world\n") - - w.Write(contents) - w.Close() - - p, err := Read(buf) - if err != nil { - t.Errorf("error from Read: %s", err) - return - } - - se, ok := p.(*SymmetricallyEncrypted) - if !ok { - t.Errorf("didn't read a *SymmetricallyEncrypted") - return - } - - r, err := se.Decrypt(c, key) - if err != nil { - t.Errorf("error from Decrypt: %s", err) - return - } - - contentsCopy := bytes.NewBuffer(nil) - _, err = io.Copy(contentsCopy, r) - if err != nil { - t.Errorf("error from io.Copy: %s", err) - return - } - if !bytes.Equal(contentsCopy.Bytes(), contents) { - t.Errorf("contents not equal got: %x want: %x", contentsCopy.Bytes(), contents) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute.go deleted file mode 100644 index 96a2b382a1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "bytes" - "image" - "image/jpeg" - "io" - "io/ioutil" -) - -const UserAttrImageSubpacket = 1 - -// UserAttribute is capable of storing other types of data about a user -// beyond name, email and a text comment. In practice, user attributes are typically used -// to store a signed thumbnail photo JPEG image of the user. -// See RFC 4880, section 5.12. -type UserAttribute struct { - Contents []*OpaqueSubpacket -} - -// NewUserAttributePhoto creates a user attribute packet -// containing the given images. -func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) { - uat = new(UserAttribute) - for _, photo := range photos { - var buf bytes.Buffer - // RFC 4880, Section 5.12.1. - data := []byte{ - 0x10, 0x00, // Little-endian image header length (16 bytes) - 0x01, // Image header version 1 - 0x01, // JPEG - 0, 0, 0, 0, // 12 reserved octets, must be all zero. - 0, 0, 0, 0, - 0, 0, 0, 0} - if _, err = buf.Write(data); err != nil { - return - } - if err = jpeg.Encode(&buf, photo, nil); err != nil { - return - } - uat.Contents = append(uat.Contents, &OpaqueSubpacket{ - SubType: UserAttrImageSubpacket, - Contents: buf.Bytes()}) - } - return -} - -// NewUserAttribute creates a new user attribute packet containing the given subpackets. -func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute { - return &UserAttribute{Contents: contents} -} - -func (uat *UserAttribute) parse(r io.Reader) (err error) { - // RFC 4880, section 5.13 - b, err := ioutil.ReadAll(r) - if err != nil { - return - } - uat.Contents, err = OpaqueSubpackets(b) - return -} - -// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including -// header. -func (uat *UserAttribute) Serialize(w io.Writer) (err error) { - var buf bytes.Buffer - for _, sp := range uat.Contents { - sp.Serialize(&buf) - } - if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil { - return err - } - _, err = w.Write(buf.Bytes()) - return -} - -// ImageData returns zero or more byte slices, each containing -// JPEG File Interchange Format (JFIF), for each photo in the -// the user attribute packet. -func (uat *UserAttribute) ImageData() (imageData [][]byte) { - for _, sp := range uat.Contents { - if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 { - imageData = append(imageData, sp.Contents[16:]) - } - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute_test.go deleted file mode 100644 index 13ca5143ce..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userattribute_test.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "encoding/base64" - "image/color" - "image/jpeg" - "testing" -) - -func TestParseUserAttribute(t *testing.T) { - r := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(userAttributePacket)) - for i := 0; i < 2; i++ { - p, err := Read(r) - if err != nil { - t.Fatal(err) - } - uat := p.(*UserAttribute) - imgs := uat.ImageData() - if len(imgs) != 1 { - t.Errorf("Unexpected number of images in user attribute packet: %d", len(imgs)) - } - if len(imgs[0]) != 3395 { - t.Errorf("Unexpected JPEG image size: %d", len(imgs[0])) - } - img, err := jpeg.Decode(bytes.NewBuffer(imgs[0])) - if err != nil { - t.Errorf("Error decoding JPEG image: %v", err) - } - // A pixel in my right eye. - pixel := color.NRGBAModel.Convert(img.At(56, 36)) - ref := color.NRGBA{R: 157, G: 128, B: 124, A: 255} - if pixel != ref { - t.Errorf("Unexpected pixel color: %v", pixel) - } - w := bytes.NewBuffer(nil) - err = uat.Serialize(w) - if err != nil { - t.Errorf("Error writing user attribute: %v", err) - } - r = bytes.NewBuffer(w.Bytes()) - } -} - -const userAttributePacket = ` -0cyWzJQBEAABAQAAAAAAAAAAAAAAAP/Y/+AAEEpGSUYAAQIAAAEAAQAA/9sAQwAFAwQEBAMFBAQE -BQUFBgcMCAcHBwcPCgsJDBEPEhIRDxEQExYcFxMUGhUQERghGBocHR8fHxMXIiQiHiQcHh8e/9sA -QwEFBQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e -Hh4eHh4eHh4e/8AAEQgAZABkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYH -CAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHw -JDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6 -g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk -5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIB -AgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEX -GBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKT -lJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX2 -9/j5+v/aAAwDAQACEQMRAD8A5uGP06VehQ4pIox04q5EnHSvAep+hIIl4zVuMHGPWmRrUWtalaaN -pU2oXsgSGJSxPr6ClvoitErs0Itqjc7BQOpPAFYmrfEnwjojtHNqaXEynBjtx5hH4jj9a8B8d+Od -W8UXZjWR4LJT+7t0Jwfc+prnIdO1CWZEW2mZ3HyDactXXDB3V5s8evm1namj6r0H4weCLtxG+ova -ueP30RA/MV6not1bX0Ed1ZzxzwyDKvGwZSPqK+Ff+ES8R8t/ZV2oHUmM10Hgbxp4m8BatEfNnWBH -/eWshOxx9Kmpg4te49RUM1kn+8Wh9zQ4P1FaMC7l465rjPh14y0fxnoseoaXOpfaPOgJ+eI98j09 -67W19M15bi4uzPSqTU480WXkjZkAyAR61DPE6OCSOalWRRgZxjvTb598sfU4FBwx5uY4T4feIm8P -TeJbAgc65NIM+8cX+FFeLfF3Vr3SfiNrMFrMypJMJcDPUqP8KK+kpVFyLU+ar037SXqX4hxVpMY7 -1UhPpVlT2rybKx9smWYz3NeH/EDVLzxt40j8O6bITaQybPlbKkjq39K9O8fasdH8IahfKxWQRFIy -Ou9uB/OuE/Z/0y3j1d9TuyoZCMs5xjuea1pLli5nn46q240l13PcfhN8EvDNtpcEl/CklyVBLuMk -mvU/Dfwo0BL/AO13FjEDD/qyV7Vn+CvGPg8zRpJrVm8ikLtEg6+1ew2dxZ3EQaJgysuQPasH7eXW -1zzsbVhT92kk/PsYieEND+zlPs6c/wCyAPyryH4wfCPRtW0u6j+xRLOxLxSoADkDpXY+MPjJ4c0S -9k082d3O8ZKkxw5XI96ytK+IGk+IpFjRpod+Qq3C7QT6A1E6NenaXbqRg6rlLlqS0fRnxjpd1r/w -w8afa7GWRPKbZLGeBKmeVNfZngLxNaeKfDdprVjxHcLlkJ5Vh1H5185/tDad9h8XOsqAw3Cb0cjq -CfX61P8AsveKf7L8T3fhe5nxa3g324YniQdh9R/KuivTdSmp9TXB1/Z1nRlsfU249QBx1pWfcwI7 -Cq6u2Ovamb9rYz16V5x7Psz5q/aJhZfibcupIElvE3H+7j+lFbXx9szP45jlUfeso8/99OKK9elL -3EeNVopzZVharCtxVRGGMk02S5JyFOB69zWTieypnL/GksfB+0cr9oQt69awPhPpD69Y3Ky3DWth -CWluGU4LAdq3vibGs/g68BJygVxjrwRW5+ztoRv/AAs8EeCZnO/J/hzz/Kumi4wp3kePjlOdZKPY -ml8Mvo6WM9ppi7J0EkQYMzkb1X0wW+bJHGACa+ivg14huZPCkjXUO6SImIYOQAP6UQ2sGneHmiWF -CYoSAAuM8etXfhBpMr+EZ3SSNRcMx6ZxWdes6ytBGSwkMNFuo7pnP614Ut9Zn1C4uLySKcwObGFA -Qnm4+XcR71h+CfDHiKCQWuv2YWFtw+bBZQD8rcE8n2Ney+GbGGQSM6I7xvtI681rXdp8hKRRp6t3 -FYPE1VDlsY1nQjWdl+J8w/tOeDZZ/AMd/EGefTHyxxyYjwfyODXg3waRh8UtEcFh+8Jb8FNfZPxh -Ak8J6nbPIsiyW7LnseK+Ofh99ptPHFnf2lu0y2twGcKuSEPB/Q1WHk50miq1o14TXU+xop+On61H -NMC6Nis1LgsAcUTSt1APFcXJZn0EqmhyvxA037friTYziBV6f7Tf40Vr3k4aXLx5OMZIzRXZB2ik -efJXbPHJJcnaD9aN2R1qoGO8/WkuLlIV+YjdjpXSonQ5lTxfiTwzqCnkeQxx9BWx+zPrQsrBFYja -zEfrXL6lfie3khcjY6lSPUGud+G3iA6FrY0uQ/KJsA9gCa0jSvFpnBi6tpKSPu++nsIfDFxeXciR -qIicscY4rxTwB8RUkn1axsPEf2LTYx85kTGzqCUP8VcJ47+JOs+I0Hhq1njjt/ufIeSvq1VtE+Gs -eoaUbSHUrkHdu3WtuX5Ix81XRh7OL5jirVpV5Whdn0F8C/iX4auVn0i612T7bASoe8wjTAd89K9g -vtSt5NMa4t5lkRhgOh3Dn6V8aaz8KZrIR3OlQ6r56LySmSxxz06Vo/CHx34h0rxBP4XvJ5AjK2RP -nEbAEj6ZxjPrWM6fMmoswqJxqJ1VZnqHxn1NLPwveqWHmNC2BnnNcD8DfDkGi+CH1m+ijN1qMzNA -4GSIiAMf+hVxPxU8Tapc3c0F9MGCn5GU5BX0Pau3+HmrT3XgXSIJCBHDGdgAx1NYSpezha52Yauq -1dya2Wh2onAIwTj1p0lxxWWLkhRyCKWa5O3ORXOos9KVQluZm83j0oqi84JyWH50Vdmc7ep43d3I -t1Z2Iz2FYdxeSTsxyRnvTdVuDNcNluM9KrKcg817NOnZGNbEXdkNckjrXGeIIprPxFFdRHAlIwem -COtdmxrG8Q2cd/ZNExw45RvQ1bVjim+dWNzw7eaTD4mN3dndCQCo6hmI5zXpj/Ea/wBHjkh0kwRW -xXEfl4yTxXzXZalJDL9nuWKMmRnHcV2Hh3WreCyYXW2SWQhd5P3F6n+lS43d2cTm6d7Ox9EWPxH1 -ODQxPqWpCaSU/ukUc4z3/WvKW8UhviAdaMewYZG98gj9c1ymoa8LyWOJHwkTDaVPb0qpr+q2m6Nb -cfvNo349az9mou9iZVXNWbub3jm98/Vza2ReV7lsJg/e3dsV654UR9N0K0sZP9ZDGFbHr3rzL4P+ -H7rXfEEWr3I3W1qf3IYdW9fwqDxf4k8UeH/G95p08kscHmk25dPlZT0we9YTj7SXKjpw1aNG8mj3 -FLv5ccU959ycnmvKPDnxB82YQarGsZPAlTp+IrvIr1ZIgySKwIyCOhFYTpyg9T0qWIhVV4svzPvf -IdhgY4orPachj81FRdmtzxqdiZmJ9aQEgdqZcPtmbJ71DJcAZ5r20kkeXJtsfPIQDwPzrG1a+S3i -LyHAHvmp7y7HOD1rlNdm+1T7Acovf3o+J2RMpezjzMvrob67pX9o2ShZlYgg/wAWKxZLLWLZ/Ke3 -mVh14yK9M+BMC3dre2ko3LHKCB7EV7EngeGQJdQ7HyBkMKS0djgq1W3c+XtK03U522RwzsTwNiEk -ntXoHgf4calql9El/G8UZbLfLyfr7V9FeGvh+s+0Lbxxcglu2K1NW1nwN4Gk/wBLuI57tV5jjwzE -/QVNS+0dWYRqNvXRFv4eeCodKsY1ggVIY1G3K4z714h+1Jqul3GpwaXYeXJLbzgyyrg4b+6D+HNb -vjz436zq9m+naHF/ZdkeGfOZXH17V4Vqt2b29K+ZuOc5bnce5zWdPBShL2lTfojSeJhy+zp/NjVz -1Bwa6DSfFGq6fbJFDKrov8DjPFcu97ZxsUe4jVhwVJ5Bpp1mwQiLewJPXacVq6fNpYyjOUXdHoKf -EG8VQHsInbuVcgflRXnt5fIs2FYHgcgUVi8LG+xusdW/mN7U2KgEVkTzPt60UVfQ9eHxGHrV1MGi -iD4V25x1qvdgLAMd6KK0pbHm4x++dp8FtUubLxJ5EIjMc+A4Za+qfD8pe1JZVOBmiinW3RyRPMfi -R8QPE638+k2l6LK0Hylbddhb6nOa80mlkcmWR2kcnlnOSaKK7qCXKcNdu5narcSrAoBxvODWJIga -VckjDdqKKwq/EaQ0gUdbjQ6mr7QGBUcd6tPBC6gtGpOOuKKKie5qn7qIpEXd0HSiiimSf//Z` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid.go deleted file mode 100644 index d6bea7d4ac..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "io" - "io/ioutil" - "strings" -) - -// UserId contains text that is intended to represent the name and email -// address of the key holder. See RFC 4880, section 5.11. By convention, this -// takes the form "Full Name (Comment) " -type UserId struct { - Id string // By convention, this takes the form "Full Name (Comment) " which is split out in the fields below. - - Name, Comment, Email string -} - -func hasInvalidCharacters(s string) bool { - for _, c := range s { - switch c { - case '(', ')', '<', '>', 0: - return true - } - } - return false -} - -// NewUserId returns a UserId or nil if any of the arguments contain invalid -// characters. The invalid characters are '\x00', '(', ')', '<' and '>' -func NewUserId(name, comment, email string) *UserId { - // RFC 4880 doesn't deal with the structure of userid strings; the - // name, comment and email form is just a convention. However, there's - // no convention about escaping the metacharacters and GPG just refuses - // to create user ids where, say, the name contains a '('. We mirror - // this behaviour. - - if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) { - return nil - } - - uid := new(UserId) - uid.Name, uid.Comment, uid.Email = name, comment, email - uid.Id = name - if len(comment) > 0 { - if len(uid.Id) > 0 { - uid.Id += " " - } - uid.Id += "(" - uid.Id += comment - uid.Id += ")" - } - if len(email) > 0 { - if len(uid.Id) > 0 { - uid.Id += " " - } - uid.Id += "<" - uid.Id += email - uid.Id += ">" - } - return uid -} - -func (uid *UserId) parse(r io.Reader) (err error) { - // RFC 4880, section 5.11 - b, err := ioutil.ReadAll(r) - if err != nil { - return - } - uid.Id = string(b) - uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id) - return -} - -// Serialize marshals uid to w in the form of an OpenPGP packet, including -// header. -func (uid *UserId) Serialize(w io.Writer) error { - err := serializeHeader(w, packetTypeUserId, len(uid.Id)) - if err != nil { - return err - } - _, err = w.Write([]byte(uid.Id)) - return err -} - -// parseUserId extracts the name, comment and email from a user id string that -// is formatted as "Full Name (Comment) ". -func parseUserId(id string) (name, comment, email string) { - var n, c, e struct { - start, end int - } - var state int - - for offset, rune := range id { - switch state { - case 0: - // Entering name - n.start = offset - state = 1 - fallthrough - case 1: - // In name - if rune == '(' { - state = 2 - n.end = offset - } else if rune == '<' { - state = 5 - n.end = offset - } - case 2: - // Entering comment - c.start = offset - state = 3 - fallthrough - case 3: - // In comment - if rune == ')' { - state = 4 - c.end = offset - } - case 4: - // Between comment and email - if rune == '<' { - state = 5 - } - case 5: - // Entering email - e.start = offset - state = 6 - fallthrough - case 6: - // In email - if rune == '>' { - state = 7 - e.end = offset - } - default: - // After email - } - } - switch state { - case 1: - // ended in the name - n.end = len(id) - case 3: - // ended in comment - c.end = len(id) - case 6: - // ended in email - e.end = len(id) - } - - name = strings.TrimSpace(id[n.start:n.end]) - comment = strings.TrimSpace(id[c.start:c.end]) - email = strings.TrimSpace(id[e.start:e.end]) - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid_test.go deleted file mode 100644 index 2968193893..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet/userid_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "testing" -) - -var userIdTests = []struct { - id string - name, comment, email string -}{ - {"", "", "", ""}, - {"John Smith", "John Smith", "", ""}, - {"John Smith ()", "John Smith", "", ""}, - {"John Smith () <>", "John Smith", "", ""}, - {"(comment", "", "comment", ""}, - {"(comment)", "", "comment", ""}, - {" sdfk", "", "", "email"}, - {" John Smith ( Comment ) asdkflj < email > lksdfj", "John Smith", "Comment", "email"}, - {" John Smith < email > lksdfj", "John Smith", "", "email"}, - {"("}, - {"foo", "bar", "", "foo (bar)"}, - {"foo", "", "baz", "foo "}, - {"", "bar", "baz", "(bar) "}, - {"foo", "bar", "baz", "foo (bar) "}, -} - -func TestNewUserId(t *testing.T) { - for i, test := range newUserIdTests { - uid := NewUserId(test.name, test.comment, test.email) - if uid == nil { - t.Errorf("#%d: returned nil", i) - continue - } - if uid.Id != test.id { - t.Errorf("#%d: got '%s', want '%s'", i, uid.Id, test.id) - } - } -} - -var invalidNewUserIdTests = []struct { - name, comment, email string -}{ - {"foo(", "", ""}, - {"foo<", "", ""}, - {"", "bar)", ""}, - {"", "bar<", ""}, - {"", "", "baz>"}, - {"", "", "baz)"}, - {"", "", "baz\x00"}, -} - -func TestNewUserIdWithInvalidInput(t *testing.T) { - for i, test := range invalidNewUserIdTests { - if uid := NewUserId(test.name, test.comment, test.email); uid != nil { - t.Errorf("#%d: returned non-nil value: %#v", i, uid) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read.go deleted file mode 100644 index 20385d866e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read.go +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright 2011 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 openpgp implements high level operations on OpenPGP messages. -package openpgp - -import ( - "crypto" - _ "crypto/sha256" - "hash" - "io" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" -) - -// SignatureType is the armor type for a PGP signature. -var SignatureType = "PGP SIGNATURE" - -// readArmored reads an armored block with the given type. -func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) { - block, err := armor.Decode(r) - if err != nil { - return - } - - if block.Type != expectedType { - return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type) - } - - return block.Body, nil -} - -// MessageDetails contains the result of parsing an OpenPGP encrypted and/or -// signed message. -type MessageDetails struct { - IsEncrypted bool // true if the message was encrypted. - EncryptedToKeyIds []uint64 // the list of recipient key ids. - IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message. - DecryptedWith Key // the private key used to decrypt the message, if any. - IsSigned bool // true if the message is signed. - SignedByKeyId uint64 // the key id of the signer, if any. - SignedBy *Key // the key of the signer, if available. - LiteralData *packet.LiteralData // the metadata of the contents - UnverifiedBody io.Reader // the contents of the message. - - // If IsSigned is true and SignedBy is non-zero then the signature will - // be verified as UnverifiedBody is read. The signature cannot be - // checked until the whole of UnverifiedBody is read so UnverifiedBody - // must be consumed until EOF before the data can be trusted. Even if a - // message isn't signed (or the signer is unknown) the data may contain - // an authentication code that is only checked once UnverifiedBody has - // been consumed. Once EOF has been seen, the following fields are - // valid. (An authentication code failure is reported as a - // SignatureError error when reading from UnverifiedBody.) - SignatureError error // nil if the signature is good. - Signature *packet.Signature // the signature packet itself, if v4 (default) - SignatureV3 *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature - - decrypted io.ReadCloser -} - -// A PromptFunction is used as a callback by functions that may need to decrypt -// a private key, or prompt for a passphrase. It is called with a list of -// acceptable, encrypted private keys and a boolean that indicates whether a -// passphrase is usable. It should either decrypt a private key or return a -// passphrase to try. If the decrypted private key or given passphrase isn't -// correct, the function will be called again, forever. Any error returned will -// be passed up. -type PromptFunction func(keys []Key, symmetric bool) ([]byte, error) - -// A keyEnvelopePair is used to store a private key with the envelope that -// contains a symmetric key, encrypted with that key. -type keyEnvelopePair struct { - key Key - encryptedKey *packet.EncryptedKey -} - -// ReadMessage parses an OpenPGP message that may be signed and/or encrypted. -// The given KeyRing should contain both public keys (for signature -// verification) and, possibly encrypted, private keys for decrypting. -// If config is nil, sensible defaults will be used. -func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) { - var p packet.Packet - - var symKeys []*packet.SymmetricKeyEncrypted - var pubKeys []keyEnvelopePair - var se *packet.SymmetricallyEncrypted - - packets := packet.NewReader(r) - md = new(MessageDetails) - md.IsEncrypted = true - - // The message, if encrypted, starts with a number of packets - // containing an encrypted decryption key. The decryption key is either - // encrypted to a public key, or with a passphrase. This loop - // collects these packets. -ParsePackets: - for { - p, err = packets.Next() - if err != nil { - return nil, err - } - switch p := p.(type) { - case *packet.SymmetricKeyEncrypted: - // This packet contains the decryption key encrypted with a passphrase. - md.IsSymmetricallyEncrypted = true - symKeys = append(symKeys, p) - case *packet.EncryptedKey: - // This packet contains the decryption key encrypted to a public key. - md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId) - switch p.Algo { - case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal: - break - default: - continue - } - var keys []Key - if p.KeyId == 0 { - keys = keyring.DecryptionKeys() - } else { - keys = keyring.KeysById(p.KeyId) - } - for _, k := range keys { - pubKeys = append(pubKeys, keyEnvelopePair{k, p}) - } - case *packet.SymmetricallyEncrypted: - se = p - break ParsePackets - case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature: - // This message isn't encrypted. - if len(symKeys) != 0 || len(pubKeys) != 0 { - return nil, errors.StructuralError("key material not followed by encrypted message") - } - packets.Unread(p) - return readSignedMessage(packets, nil, keyring) - } - } - - var candidates []Key - var decrypted io.ReadCloser - - // Now that we have the list of encrypted keys we need to decrypt at - // least one of them or, if we cannot, we need to call the prompt - // function so that it can decrypt a key or give us a passphrase. -FindKey: - for { - // See if any of the keys already have a private key available - candidates = candidates[:0] - candidateFingerprints := make(map[string]bool) - - for _, pk := range pubKeys { - if pk.key.PrivateKey == nil { - continue - } - if !pk.key.PrivateKey.Encrypted { - if len(pk.encryptedKey.Key) == 0 { - pk.encryptedKey.Decrypt(pk.key.PrivateKey, config) - } - if len(pk.encryptedKey.Key) == 0 { - continue - } - decrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key) - if err != nil && err != errors.ErrKeyIncorrect { - return nil, err - } - if decrypted != nil { - md.DecryptedWith = pk.key - break FindKey - } - } else { - fpr := string(pk.key.PublicKey.Fingerprint[:]) - if v := candidateFingerprints[fpr]; v { - continue - } - candidates = append(candidates, pk.key) - candidateFingerprints[fpr] = true - } - } - - if len(candidates) == 0 && len(symKeys) == 0 { - return nil, errors.ErrKeyIncorrect - } - - if prompt == nil { - return nil, errors.ErrKeyIncorrect - } - - passphrase, err := prompt(candidates, len(symKeys) != 0) - if err != nil { - return nil, err - } - - // Try the symmetric passphrase first - if len(symKeys) != 0 && passphrase != nil { - for _, s := range symKeys { - key, cipherFunc, err := s.Decrypt(passphrase) - if err == nil { - decrypted, err = se.Decrypt(cipherFunc, key) - if err != nil && err != errors.ErrKeyIncorrect { - return nil, err - } - if decrypted != nil { - break FindKey - } - } - - } - } - } - - md.decrypted = decrypted - if err := packets.Push(decrypted); err != nil { - return nil, err - } - return readSignedMessage(packets, md, keyring) -} - -// readSignedMessage reads a possibly signed message if mdin is non-zero then -// that structure is updated and returned. Otherwise a fresh MessageDetails is -// used. -func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) { - if mdin == nil { - mdin = new(MessageDetails) - } - md = mdin - - var p packet.Packet - var h hash.Hash - var wrappedHash hash.Hash -FindLiteralData: - for { - p, err = packets.Next() - if err != nil { - return nil, err - } - switch p := p.(type) { - case *packet.Compressed: - if err := packets.Push(p.Body); err != nil { - return nil, err - } - case *packet.OnePassSignature: - if !p.IsLast { - return nil, errors.UnsupportedError("nested signatures") - } - - h, wrappedHash, err = hashForSignature(p.Hash, p.SigType) - if err != nil { - md = nil - return - } - - md.IsSigned = true - md.SignedByKeyId = p.KeyId - keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign) - if len(keys) > 0 { - md.SignedBy = &keys[0] - } - case *packet.LiteralData: - md.LiteralData = p - break FindLiteralData - } - } - - if md.SignedBy != nil { - md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md} - } else if md.decrypted != nil { - md.UnverifiedBody = checkReader{md} - } else { - md.UnverifiedBody = md.LiteralData.Body - } - - return md, nil -} - -// hashForSignature returns a pair of hashes that can be used to verify a -// signature. The signature may specify that the contents of the signed message -// should be preprocessed (i.e. to normalize line endings). Thus this function -// returns two hashes. The second should be used to hash the message itself and -// performs any needed preprocessing. -func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) { - if !hashId.Available() { - return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId))) - } - h := hashId.New() - - switch sigType { - case packet.SigTypeBinary: - return h, h, nil - case packet.SigTypeText: - return h, NewCanonicalTextHash(h), nil - } - - return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType))) -} - -// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF -// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger -// MDC checks. -type checkReader struct { - md *MessageDetails -} - -func (cr checkReader) Read(buf []byte) (n int, err error) { - n, err = cr.md.LiteralData.Body.Read(buf) - if err == io.EOF { - mdcErr := cr.md.decrypted.Close() - if mdcErr != nil { - err = mdcErr - } - } - return -} - -// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes -// the data as it is read. When it sees an EOF from the underlying io.Reader -// it parses and checks a trailing Signature packet and triggers any MDC checks. -type signatureCheckReader struct { - packets *packet.Reader - h, wrappedHash hash.Hash - md *MessageDetails -} - -func (scr *signatureCheckReader) Read(buf []byte) (n int, err error) { - n, err = scr.md.LiteralData.Body.Read(buf) - scr.wrappedHash.Write(buf[:n]) - if err == io.EOF { - var p packet.Packet - p, scr.md.SignatureError = scr.packets.Next() - if scr.md.SignatureError != nil { - return - } - - var ok bool - if scr.md.Signature, ok = p.(*packet.Signature); ok { - scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature) - } else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok { - scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3) - } else { - scr.md.SignatureError = errors.StructuralError("LiteralData not followed by Signature") - return - } - - // The SymmetricallyEncrypted packet, if any, might have an - // unsigned hash of its own. In order to check this we need to - // close that Reader. - if scr.md.decrypted != nil { - mdcErr := scr.md.decrypted.Close() - if mdcErr != nil { - err = mdcErr - } - } - } - return -} - -// CheckDetachedSignature takes a signed file and a detached signature and -// returns the signer if the signature is valid. If the signer isn't known, -// ErrUnknownIssuer is returned. -func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { - var issuerKeyId uint64 - var hashFunc crypto.Hash - var sigType packet.SignatureType - var keys []Key - var p packet.Packet - - packets := packet.NewReader(signature) - for { - p, err = packets.Next() - if err == io.EOF { - return nil, errors.ErrUnknownIssuer - } - if err != nil { - return nil, err - } - - switch sig := p.(type) { - case *packet.Signature: - if sig.IssuerKeyId == nil { - return nil, errors.StructuralError("signature doesn't have an issuer") - } - issuerKeyId = *sig.IssuerKeyId - hashFunc = sig.Hash - sigType = sig.SigType - case *packet.SignatureV3: - issuerKeyId = sig.IssuerKeyId - hashFunc = sig.Hash - sigType = sig.SigType - default: - return nil, errors.StructuralError("non signature packet found") - } - - keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign) - if len(keys) > 0 { - break - } - } - - if len(keys) == 0 { - panic("unreachable") - } - - h, wrappedHash, err := hashForSignature(hashFunc, sigType) - if err != nil { - return nil, err - } - - if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF { - return nil, err - } - - for _, key := range keys { - switch sig := p.(type) { - case *packet.Signature: - err = key.PublicKey.VerifySignature(h, sig) - case *packet.SignatureV3: - err = key.PublicKey.VerifySignatureV3(h, sig) - default: - panic("unreachable") - } - - if err == nil { - return key.Entity, nil - } - } - - return nil, err -} - -// CheckArmoredDetachedSignature performs the same actions as -// CheckDetachedSignature but expects the signature to be armored. -func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { - body, err := readArmored(signature, SignatureType) - if err != nil { - return - } - - return CheckDetachedSignature(keyring, signed, body) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read_test.go deleted file mode 100644 index 3443493377..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/read_test.go +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "bytes" - _ "crypto/sha512" - "encoding/hex" - "io" - "io/ioutil" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -func readerFromHex(s string) io.Reader { - data, err := hex.DecodeString(s) - if err != nil { - panic("readerFromHex: bad input") - } - return bytes.NewBuffer(data) -} - -func TestReadKeyRing(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - if err != nil { - t.Error(err) - return - } - if len(kring) != 2 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB || uint32(kring[1].PrimaryKey.KeyId) != 0x1E35246B { - t.Errorf("bad keyring: %#v", kring) - } -} - -func TestRereadKeyRing(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - if err != nil { - t.Errorf("error in initial parse: %s", err) - return - } - out := new(bytes.Buffer) - err = kring[0].Serialize(out) - if err != nil { - t.Errorf("error in serialization: %s", err) - return - } - kring, err = ReadKeyRing(out) - if err != nil { - t.Errorf("error in second parse: %s", err) - return - } - - if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB { - t.Errorf("bad keyring: %#v", kring) - } -} - -func TestReadPrivateKeyRing(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex)) - if err != nil { - t.Error(err) - return - } - if len(kring) != 2 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB || uint32(kring[1].PrimaryKey.KeyId) != 0x1E35246B || kring[0].PrimaryKey == nil { - t.Errorf("bad keyring: %#v", kring) - } -} - -func TestReadDSAKey(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(dsaTestKeyHex)) - if err != nil { - t.Error(err) - return - } - if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0x0CCC0360 { - t.Errorf("bad parse: %#v", kring) - } -} - -func TestReadP256Key(t *testing.T) { - kring, err := ReadKeyRing(readerFromHex(p256TestKeyHex)) - if err != nil { - t.Error(err) - return - } - if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0x5918513E { - t.Errorf("bad parse: %#v", kring) - } -} - -func TestDSAHashTruncatation(t *testing.T) { - // dsaKeyWithSHA512 was generated with GnuPG and --cert-digest-algo - // SHA512 in order to require DSA hash truncation to verify correctly. - _, err := ReadKeyRing(readerFromHex(dsaKeyWithSHA512)) - if err != nil { - t.Error(err) - } -} - -func TestGetKeyById(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - - keys := kring.KeysById(0xa34d7e18c20c31bb) - if len(keys) != 1 || keys[0].Entity != kring[0] { - t.Errorf("bad result for 0xa34d7e18c20c31bb: %#v", keys) - } - - keys = kring.KeysById(0xfd94408d4543314f) - if len(keys) != 1 || keys[0].Entity != kring[0] { - t.Errorf("bad result for 0xa34d7e18c20c31bb: %#v", keys) - } -} - -func checkSignedMessage(t *testing.T, signedHex, expected string) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - - md, err := ReadMessage(readerFromHex(signedHex), kring, nil, nil) - if err != nil { - t.Error(err) - return - } - - if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.DecryptedWith != (Key{}) { - t.Errorf("bad MessageDetails: %#v", md) - } - - contents, err := ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Errorf("error reading UnverifiedBody: %s", err) - } - if string(contents) != expected { - t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected) - } - if md.SignatureError != nil || md.Signature == nil { - t.Errorf("failed to validate: %s", md.SignatureError) - } -} - -func TestSignedMessage(t *testing.T) { - checkSignedMessage(t, signedMessageHex, signedInput) -} - -func TestTextSignedMessage(t *testing.T) { - checkSignedMessage(t, signedTextMessageHex, signedTextInput) -} - -// The reader should detect "compressed quines", which are compressed -// packets that expand into themselves and cause an infinite recursive -// parsing loop. -// The packet in this test case comes from Taylor R. Campbell at -// http://mumble.net/~campbell/misc/pgp-quine/ -func TestCampbellQuine(t *testing.T) { - md, err := ReadMessage(readerFromHex(campbellQuine), nil, nil, nil) - if md != nil { - t.Errorf("Reading a compressed quine should not return any data: %#v", md) - } - structural, ok := err.(errors.StructuralError) - if !ok { - t.Fatalf("Unexpected class of error: %T", err) - } - if !strings.Contains(string(structural), "too many layers of packets") { - t.Fatalf("Unexpected error: %s", err) - } -} - -var signedEncryptedMessageTests = []struct { - keyRingHex string - messageHex string - signedByKeyId uint64 - encryptedToKeyId uint64 -}{ - { - testKeys1And2PrivateHex, - signedEncryptedMessageHex, - 0xa34d7e18c20c31bb, - 0x2a67d68660df41c7, - }, - { - dsaElGamalTestKeysHex, - signedEncryptedMessage2Hex, - 0x33af447ccd759b09, - 0xcf6a7abcd43e3673, - }, -} - -func TestSignedEncryptedMessage(t *testing.T) { - for i, test := range signedEncryptedMessageTests { - expected := "Signed and encrypted message\n" - kring, _ := ReadKeyRing(readerFromHex(test.keyRingHex)) - prompt := func(keys []Key, symmetric bool) ([]byte, error) { - if symmetric { - t.Errorf("prompt: message was marked as symmetrically encrypted") - return nil, errors.ErrKeyIncorrect - } - - if len(keys) == 0 { - t.Error("prompt: no keys requested") - return nil, errors.ErrKeyIncorrect - } - - err := keys[0].PrivateKey.Decrypt([]byte("passphrase")) - if err != nil { - t.Errorf("prompt: error decrypting key: %s", err) - return nil, errors.ErrKeyIncorrect - } - - return nil, nil - } - - md, err := ReadMessage(readerFromHex(test.messageHex), kring, prompt, nil) - if err != nil { - t.Errorf("#%d: error reading message: %s", i, err) - return - } - - if !md.IsSigned || md.SignedByKeyId != test.signedByKeyId || md.SignedBy == nil || !md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) == 0 || md.EncryptedToKeyIds[0] != test.encryptedToKeyId { - t.Errorf("#%d: bad MessageDetails: %#v", i, md) - } - - contents, err := ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Errorf("#%d: error reading UnverifiedBody: %s", i, err) - } - if string(contents) != expected { - t.Errorf("#%d: bad UnverifiedBody got:%s want:%s", i, string(contents), expected) - } - - if md.SignatureError != nil || md.Signature == nil { - t.Errorf("#%d: failed to validate: %s", i, md.SignatureError) - } - } -} - -func TestUnspecifiedRecipient(t *testing.T) { - expected := "Recipient unspecified\n" - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex)) - - md, err := ReadMessage(readerFromHex(recipientUnspecifiedHex), kring, nil, nil) - if err != nil { - t.Errorf("error reading message: %s", err) - return - } - - contents, err := ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Errorf("error reading UnverifiedBody: %s", err) - } - if string(contents) != expected { - t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected) - } -} - -func TestSymmetricallyEncrypted(t *testing.T) { - firstTimeCalled := true - - prompt := func(keys []Key, symmetric bool) ([]byte, error) { - if len(keys) != 0 { - t.Errorf("prompt: len(keys) = %d (want 0)", len(keys)) - } - - if !symmetric { - t.Errorf("symmetric is not set") - } - - if firstTimeCalled { - firstTimeCalled = false - return []byte("wrongpassword"), nil - } - - return []byte("password"), nil - } - - md, err := ReadMessage(readerFromHex(symmetricallyEncryptedCompressedHex), nil, prompt, nil) - if err != nil { - t.Errorf("ReadMessage: %s", err) - return - } - - contents, err := ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Errorf("ReadAll: %s", err) - } - - expectedCreationTime := uint32(1295992998) - if md.LiteralData.Time != expectedCreationTime { - t.Errorf("LiteralData.Time is %d, want %d", md.LiteralData.Time, expectedCreationTime) - } - - const expected = "Symmetrically encrypted.\n" - if string(contents) != expected { - t.Errorf("contents got: %s want: %s", string(contents), expected) - } -} - -func testDetachedSignature(t *testing.T, kring KeyRing, signature io.Reader, sigInput, tag string, expectedSignerKeyId uint64) { - signed := bytes.NewBufferString(sigInput) - signer, err := CheckDetachedSignature(kring, signed, signature) - if err != nil { - t.Errorf("%s: signature error: %s", tag, err) - return - } - if signer == nil { - t.Errorf("%s: signer is nil", tag) - return - } - if signer.PrimaryKey.KeyId != expectedSignerKeyId { - t.Errorf("%s: wrong signer got:%x want:%x", tag, signer.PrimaryKey.KeyId, expectedSignerKeyId) - } -} - -func TestDetachedSignature(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - testDetachedSignature(t, kring, readerFromHex(detachedSignatureHex), signedInput, "binary", testKey1KeyId) - testDetachedSignature(t, kring, readerFromHex(detachedSignatureTextHex), signedInput, "text", testKey1KeyId) - testDetachedSignature(t, kring, readerFromHex(detachedSignatureV3TextHex), signedInput, "v3", testKey1KeyId) - - incorrectSignedInput := signedInput + "X" - _, err := CheckDetachedSignature(kring, bytes.NewBufferString(incorrectSignedInput), readerFromHex(detachedSignatureHex)) - if err == nil { - t.Fatal("CheckDetachedSignature returned without error for bad signature") - } - if err == errors.ErrUnknownIssuer { - t.Fatal("CheckDetachedSignature returned ErrUnknownIssuer when the signer was known, but the signature invalid") - } -} - -func TestDetachedSignatureDSA(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyHex)) - testDetachedSignature(t, kring, readerFromHex(detachedSignatureDSAHex), signedInput, "binary", testKey3KeyId) -} - -func TestMultipleSignaturePacketsDSA(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyHex)) - testDetachedSignature(t, kring, readerFromHex(missingHashFunctionHex+detachedSignatureDSAHex), signedInput, "binary", testKey3KeyId) -} - -func TestDetachedSignatureP256(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(p256TestKeyHex)) - testDetachedSignature(t, kring, readerFromHex(detachedSignatureP256Hex), signedInput, "binary", testKeyP256KeyId) -} - -func testHashFunctionError(t *testing.T, signatureHex string) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - _, err := CheckDetachedSignature(kring, nil, readerFromHex(signatureHex)) - if err == nil { - t.Fatal("Packet with bad hash type was correctly parsed") - } - unsupported, ok := err.(errors.UnsupportedError) - if !ok { - t.Fatalf("Unexpected class of error: %s", err) - } - if !strings.Contains(string(unsupported), "hash ") { - t.Fatalf("Unexpected error: %s", err) - } -} - -func TestUnknownHashFunction(t *testing.T) { - // unknownHashFunctionHex contains a signature packet with hash - // function type 153 (which isn't a real hash function id). - testHashFunctionError(t, unknownHashFunctionHex) -} - -func TestMissingHashFunction(t *testing.T) { - // missingHashFunctionHex contains a signature packet that uses - // RIPEMD160, which isn't compiled in. Since that's the only signature - // packet we don't find any suitable packets and end up with ErrUnknownIssuer - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex)) - _, err := CheckDetachedSignature(kring, nil, readerFromHex(missingHashFunctionHex)) - if err == nil { - t.Fatal("Packet with missing hash type was correctly parsed") - } - if err != errors.ErrUnknownIssuer { - t.Fatalf("Unexpected class of error: %s", err) - } -} - -func TestReadingArmoredPrivateKey(t *testing.T) { - el, err := ReadArmoredKeyRing(bytes.NewBufferString(armoredPrivateKeyBlock)) - if err != nil { - t.Error(err) - } - if len(el) != 1 { - t.Errorf("got %d entities, wanted 1\n", len(el)) - } -} - -func TestReadingArmoredPublicKey(t *testing.T) { - el, err := ReadArmoredKeyRing(bytes.NewBufferString(e2ePublicKey)) - if err != nil { - t.Error(err) - } - if len(el) != 1 { - t.Errorf("didn't get a valid entity") - } -} - -func TestNoArmoredData(t *testing.T) { - _, err := ReadArmoredKeyRing(bytes.NewBufferString("foo")) - if _, ok := err.(errors.InvalidArgumentError); !ok { - t.Errorf("error was not an InvalidArgumentError: %s", err) - } -} - -func testReadMessageError(t *testing.T, messageHex string) { - buf, err := hex.DecodeString(messageHex) - if err != nil { - t.Errorf("hex.DecodeString(): %v", err) - } - - kr, err := ReadKeyRing(new(bytes.Buffer)) - if err != nil { - t.Errorf("ReadKeyring(): %v", err) - } - - _, err = ReadMessage(bytes.NewBuffer(buf), kr, - func([]Key, bool) ([]byte, error) { - return []byte("insecure"), nil - }, nil) - - if err == nil { - t.Errorf("ReadMessage(): Unexpected nil error") - } -} - -func TestIssue11503(t *testing.T) { - testReadMessageError(t, "8c040402000aa430aa8228b9248b01fc899a91197130303030") -} - -func TestIssue11504(t *testing.T) { - testReadMessageError(t, "9303000130303030303030303030983002303030303030030000000130") -} - -// TestSignatureV3Message tests the verification of V3 signature, generated -// with a modern V4-style key. Some people have their clients set to generate -// V3 signatures, so it's useful to be able to verify them. -func TestSignatureV3Message(t *testing.T) { - sig, err := armor.Decode(strings.NewReader(signedMessageV3)) - if err != nil { - t.Error(err) - return - } - key, err := ReadArmoredKeyRing(strings.NewReader(keyV4forVerifyingSignedMessageV3)) - if err != nil { - t.Error(err) - return - } - md, err := ReadMessage(sig.Body, key, nil, nil) - if err != nil { - t.Error(err) - return - } - - _, err = ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Error(err) - return - } - - // We'll see a sig error here after reading in the UnverifiedBody above, - // if there was one to see. - if err = md.SignatureError; err != nil { - t.Error(err) - return - } - - if md.SignatureV3 == nil { - t.Errorf("No available signature after checking signature") - return - } - if md.Signature != nil { - t.Errorf("Did not expect a signature V4 back") - return - } - return -} - -const testKey1KeyId = 0xA34D7E18C20C31BB -const testKey3KeyId = 0x338934250CCC0360 -const testKeyP256KeyId = 0xd44a2c495918513e - -const signedInput = "Signed message\nline 2\nline 3\n" -const signedTextInput = "Signed message\r\nline 2\r\nline 3\r\n" - -const recipientUnspecifiedHex = "848c0300000000000000000103ff62d4d578d03cf40c3da998dfe216c074fa6ddec5e31c197c9666ba292830d91d18716a80f699f9d897389a90e6d62d0238f5f07a5248073c0f24920e4bc4a30c2d17ee4e0cae7c3d4aaa4e8dced50e3010a80ee692175fa0385f62ecca4b56ee6e9980aa3ec51b61b077096ac9e800edaf161268593eedb6cc7027ff5cb32745d250010d407a6221ae22ef18469b444f2822478c4d190b24d36371a95cb40087cdd42d9399c3d06a53c0673349bfb607927f20d1e122bde1e2bf3aa6cae6edf489629bcaa0689539ae3b718914d88ededc3b" - -const detachedSignatureHex = "889c04000102000605024d449cd1000a0910a34d7e18c20c31bb167603ff57718d09f28a519fdc7b5a68b6a3336da04df85e38c5cd5d5bd2092fa4629848a33d85b1729402a2aab39c3ac19f9d573f773cc62c264dc924c067a79dfd8a863ae06c7c8686120760749f5fd9b1e03a64d20a7df3446ddc8f0aeadeaeba7cbaee5c1e366d65b6a0c6cc749bcb912d2f15013f812795c2e29eb7f7b77f39ce77" - -const detachedSignatureTextHex = "889c04010102000605024d449d21000a0910a34d7e18c20c31bbc8c60400a24fbef7342603a41cb1165767bd18985d015fb72fe05db42db36cfb2f1d455967f1e491194fbf6cf88146222b23bf6ffbd50d17598d976a0417d3192ff9cc0034fd00f287b02e90418bbefe609484b09231e4e7a5f3562e199bf39909ab5276c4d37382fe088f6b5c3426fc1052865da8b3ab158672d58b6264b10823dc4b39" - -const detachedSignatureV3TextHex = "8900950305005255c25ca34d7e18c20c31bb0102bb3f04009f6589ef8a028d6e54f6eaf25432e590d31c3a41f4710897585e10c31e5e332c7f9f409af8512adceaff24d0da1474ab07aa7bce4f674610b010fccc5b579ae5eb00a127f272fb799f988ab8e4574c141da6dbfecfef7e6b2c478d9a3d2551ba741f260ee22bec762812f0053e05380bfdd55ad0f22d8cdf71b233fe51ae8a24" - -const detachedSignatureDSAHex = "884604001102000605024d6c4eac000a0910338934250ccc0360f18d00a087d743d6405ed7b87755476629600b8b694a39e900a0abff8126f46faf1547c1743c37b21b4ea15b8f83" - -const detachedSignatureP256Hex = "885e0400130a0006050256e5bb00000a0910d44a2c495918513edef001009841a4f792beb0befccb35c8838a6a87d9b936beaa86db6745ddc7b045eee0cf00fd1ac1f78306b17e965935dd3f8bae4587a76587e4af231efe19cc4011a8434817" - -const testKeys1And2Hex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b0020003b88d044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f0011010001889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab0020003988d044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b0020003b88d044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020003" - -const testKeys1And2PrivateHex = "9501d8044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd00110100010003ff4d91393b9a8e3430b14d6209df42f98dc927425b881f1209f319220841273a802a97c7bdb8b3a7740b3ab5866c4d1d308ad0d3a79bd1e883aacf1ac92dfe720285d10d08752a7efe3c609b1d00f17f2805b217be53999a7da7e493bfc3e9618fd17018991b8128aea70a05dbce30e4fbe626aa45775fa255dd9177aabf4df7cf0200c1ded12566e4bc2bb590455e5becfb2e2c9796482270a943343a7835de41080582c2be3caf5981aa838140e97afa40ad652a0b544f83eb1833b0957dce26e47b0200eacd6046741e9ce2ec5beb6fb5e6335457844fb09477f83b050a96be7da043e17f3a9523567ed40e7a521f818813a8b8a72209f1442844843ccc7eb9805442570200bdafe0438d97ac36e773c7162028d65844c4d463e2420aa2228c6e50dc2743c3d6c72d0d782a5173fe7be2169c8a9f4ef8a7cf3e37165e8c61b89c346cdc6c1799d2b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b00200009d01d8044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f00110100010003fd17a7490c22a79c59281fb7b20f5e6553ec0c1637ae382e8adaea295f50241037f8997cf42c1ce26417e015091451b15424b2c59eb8d4161b0975630408e394d3b00f88d4b4e18e2cc85e8251d4753a27c639c83f5ad4a571c4f19d7cd460b9b73c25ade730c99df09637bd173d8e3e981ac64432078263bb6dc30d3e974150dd0200d0ee05be3d4604d2146fb0457f31ba17c057560785aa804e8ca5530a7cd81d3440d0f4ba6851efcfd3954b7e68908fc0ba47f7ac37bf559c6c168b70d3a7c8cd0200da1c677c4bce06a068070f2b3733b0a714e88d62aa3f9a26c6f5216d48d5c2b5624144f3807c0df30be66b3268eeeca4df1fbded58faf49fc95dc3c35f134f8b01fd1396b6c0fc1b6c4f0eb8f5e44b8eace1e6073e20d0b8bc5385f86f1cf3f050f66af789f3ef1fc107b7f4421e19e0349c730c68f0a226981f4e889054fdb4dc149e8e889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab00200009501fe044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001fe030302e9030f3c783e14856063f16938530e148bc57a7aa3f3e4f90df9dceccdc779bc0835e1ad3d006e4a8d7b36d08b8e0de5a0d947254ecfbd22037e6572b426bcfdc517796b224b0036ff90bc574b5509bede85512f2eefb520fb4b02aa523ba739bff424a6fe81c5041f253f8d757e69a503d3563a104d0d49e9e890b9d0c26f96b55b743883b472caa7050c4acfd4a21f875bdf1258d88bd61224d303dc9df77f743137d51e6d5246b88c406780528fd9a3e15bab5452e5b93970d9dcc79f48b38651b9f15bfbcf6da452837e9cc70683d1bdca94507870f743e4ad902005812488dd342f836e72869afd00ce1850eea4cfa53ce10e3608e13d3c149394ee3cbd0e23d018fcbcb6e2ec5a1a22972d1d462ca05355d0d290dd2751e550d5efb38c6c89686344df64852bf4ff86638708f644e8ec6bd4af9b50d8541cb91891a431326ab2e332faa7ae86cfb6e0540aa63160c1e5cdd5a4add518b303fff0a20117c6bc77f7cfbaf36b04c865c6c2b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b00200009d01fe044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001fe030302e9030f3c783e148560f936097339ae381d63116efcf802ff8b1c9360767db5219cc987375702a4123fd8657d3e22700f23f95020d1b261eda5257e9a72f9a918e8ef22dd5b3323ae03bbc1923dd224db988cadc16acc04b120a9f8b7e84da9716c53e0334d7b66586ddb9014df604b41be1e960dcfcbc96f4ed150a1a0dd070b9eb14276b9b6be413a769a75b519a53d3ecc0c220e85cd91ca354d57e7344517e64b43b6e29823cbd87eae26e2b2e78e6dedfbb76e3e9f77bcb844f9a8932eb3db2c3f9e44316e6f5d60e9e2a56e46b72abe6b06dc9a31cc63f10023d1f5e12d2a3ee93b675c96f504af0001220991c88db759e231b3320dcedf814dcf723fd9857e3d72d66a0f2af26950b915abdf56c1596f46a325bf17ad4810d3535fb02a259b247ac3dbd4cc3ecf9c51b6c07cebb009c1506fba0a89321ec8683e3fd009a6e551d50243e2d5092fefb3321083a4bad91320dc624bd6b5dddf93553e3d53924c05bfebec1fb4bd47e89a1a889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020000" - -const dsaElGamalTestKeysHex = "9501e1044dfcb16a110400aa3e5c1a1f43dd28c2ffae8abf5cfce555ee874134d8ba0a0f7b868ce2214beddc74e5e1e21ded354a95d18acdaf69e5e342371a71fbb9093162e0c5f3427de413a7f2c157d83f5cd2f9d791256dc4f6f0e13f13c3302af27f2384075ab3021dff7a050e14854bbde0a1094174855fc02f0bae8e00a340d94a1f22b32e48485700a0cec672ac21258fb95f61de2ce1af74b2c4fa3e6703ff698edc9be22c02ae4d916e4fa223f819d46582c0516235848a77b577ea49018dcd5e9e15cff9dbb4663a1ae6dd7580fa40946d40c05f72814b0f88481207e6c0832c3bded4853ebba0a7e3bd8e8c66df33d5a537cd4acf946d1080e7a3dcea679cb2b11a72a33a2b6a9dc85f466ad2ddf4c3db6283fa645343286971e3dd700703fc0c4e290d45767f370831a90187e74e9972aae5bff488eeff7d620af0362bfb95c1a6c3413ab5d15a2e4139e5d07a54d72583914661ed6a87cce810be28a0aa8879a2dd39e52fb6fe800f4f181ac7e328f740cde3d09a05cecf9483e4cca4253e60d4429ffd679d9996a520012aad119878c941e3cf151459873bdfc2a9563472fe0303027a728f9feb3b864260a1babe83925ce794710cfd642ee4ae0e5b9d74cee49e9c67b6cd0ea5dfbb582132195a121356a1513e1bca73e5b80c58c7ccb4164453412f456c47616d616c2054657374204b65792031886204131102002205024dfcb16a021b03060b090807030206150802090a0b0416020301021e01021780000a091033af447ccd759b09fadd00a0b8fd6f5a790bad7e9f2dbb7632046dc4493588db009c087c6a9ba9f7f49fab221587a74788c00db4889ab00200009d0157044dfcb16a1004008dec3f9291205255ccff8c532318133a6840739dd68b03ba942676f9038612071447bf07d00d559c5c0875724ea16a4c774f80d8338b55fca691a0522e530e604215b467bbc9ccfd483a1da99d7bc2648b4318fdbd27766fc8bfad3fddb37c62b8ae7ccfe9577e9b8d1e77c1d417ed2c2ef02d52f4da11600d85d3229607943700030503ff506c94c87c8cab778e963b76cf63770f0a79bf48fb49d3b4e52234620fc9f7657f9f8d56c96a2b7c7826ae6b57ebb2221a3fe154b03b6637cea7e6d98e3e45d87cf8dc432f723d3d71f89c5192ac8d7290684d2c25ce55846a80c9a7823f6acd9bb29fa6cd71f20bc90eccfca20451d0c976e460e672b000df49466408d527affe0303027a728f9feb3b864260abd761730327bca2aaa4ea0525c175e92bf240682a0e83b226f97ecb2e935b62c9a133858ce31b271fa8eb41f6a1b3cd72a63025ce1a75ee4180dcc284884904181102000905024dfcb16a021b0c000a091033af447ccd759b09dd0b009e3c3e7296092c81bee5a19929462caaf2fff3ae26009e218c437a2340e7ea628149af1ec98ec091a43992b00200009501e1044dfcb1be1104009f61faa61aa43df75d128cbe53de528c4aec49ce9360c992e70c77072ad5623de0a3a6212771b66b39a30dad6781799e92608316900518ec01184a85d872365b7d2ba4bacfb5882ea3c2473d3750dc6178cc1cf82147fb58caa28b28e9f12f6d1efcb0534abed644156c91cca4ab78834268495160b2400bc422beb37d237c2300a0cac94911b6d493bda1e1fbc6feeca7cb7421d34b03fe22cec6ccb39675bb7b94a335c2b7be888fd3906a1125f33301d8aa6ec6ee6878f46f73961c8d57a3e9544d8ef2a2cbfd4d52da665b1266928cfe4cb347a58c412815f3b2d2369dec04b41ac9a71cc9547426d5ab941cccf3b18575637ccfb42df1a802df3cfe0a999f9e7109331170e3a221991bf868543960f8c816c28097e503fe319db10fb98049f3a57d7c80c420da66d56f3644371631fad3f0ff4040a19a4fedc2d07727a1b27576f75a4d28c47d8246f27071e12d7a8de62aad216ddbae6aa02efd6b8a3e2818cda48526549791ab277e447b3a36c57cefe9b592f5eab73959743fcc8e83cbefec03a329b55018b53eec196765ae40ef9e20521a603c551efe0303020950d53a146bf9c66034d00c23130cce95576a2ff78016ca471276e8227fb30b1ffbd92e61804fb0c3eff9e30b1a826ee8f3e4730b4d86273ca977b4164453412f456c47616d616c2054657374204b65792032886204131102002205024dfcb1be021b03060b090807030206150802090a0b0416020301021e01021780000a0910a86bf526325b21b22bd9009e34511620415c974750a20df5cb56b182f3b48e6600a0a9466cb1a1305a84953445f77d461593f1d42bc1b00200009d0157044dfcb1be1004009565a951da1ee87119d600c077198f1c1bceb0f7aa54552489298e41ff788fa8f0d43a69871f0f6f77ebdfb14a4260cf9fbeb65d5844b4272a1904dd95136d06c3da745dc46327dd44a0f16f60135914368c8039a34033862261806bb2c5ce1152e2840254697872c85441ccb7321431d75a747a4bfb1d2c66362b51ce76311700030503fc0ea76601c196768070b7365a200e6ddb09307f262d5f39eec467b5f5784e22abdf1aa49226f59ab37cb49969d8f5230ea65caf56015abda62604544ed526c5c522bf92bed178a078789f6c807b6d34885688024a5bed9e9f8c58d11d4b82487b44c5f470c5606806a0443b79cadb45e0f897a561a53f724e5349b9267c75ca17fe0303020950d53a146bf9c660bc5f4ce8f072465e2d2466434320c1e712272fafc20e342fe7608101580fa1a1a367e60486a7cd1246b7ef5586cf5e10b32762b710a30144f12dd17dd4884904181102000905024dfcb1be021b0c000a0910a86bf526325b21b2904c00a0b2b66b4b39ccffda1d10f3ea8d58f827e30a8b8e009f4255b2d8112a184e40cde43a34e8655ca7809370b0020000" - -const signedMessageHex = "a3019bc0cbccc0c4b8d8b74ee2108fe16ec6d3ca490cbe362d3f8333d3f352531472538b8b13d353b97232f352158c20943157c71c16064626063656269052062e4e01987e9b6fccff4b7df3a34c534b23e679cbec3bc0f8f6e64dfb4b55fe3f8efa9ce110ddb5cd79faf1d753c51aecfa669f7e7aa043436596cccc3359cb7dd6bbe9ecaa69e5989d9e57209571edc0b2fa7f57b9b79a64ee6e99ce1371395fee92fec2796f7b15a77c386ff668ee27f6d38f0baa6c438b561657377bf6acff3c5947befd7bf4c196252f1d6e5c524d0300" - -const signedTextMessageHex = "a3019bc0cbccc8c4b8d8b74ee2108fe16ec6d36a250cbece0c178233d3f352531472538b8b13d35379b97232f352158ca0b4312f57c71c1646462606365626906a062e4e019811591798ff99bf8afee860b0d8a8c2a85c3387e3bcf0bb3b17987f2bbcfab2aa526d930cbfd3d98757184df3995c9f3e7790e36e3e9779f06089d4c64e9e47dd6202cb6e9bc73c5d11bb59fbaf89d22d8dc7cf199ddf17af96e77c5f65f9bbed56f427bd8db7af37f6c9984bf9385efaf5f184f986fb3e6adb0ecfe35bbf92d16a7aa2a344fb0bc52fb7624f0200" - -const signedEncryptedMessageHex = "848c032a67d68660df41c70103ff5789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8d2c03b018bd210b1d3791e1aba74b0f1034e122ab72e760492c192383cf5e20b5628bd043272d63df9b923f147eb6091cd897553204832aba48fec54aa447547bb16305a1024713b90e77fd0065f1918271947549205af3c74891af22ee0b56cd29bfec6d6e351901cd4ab3ece7c486f1e32a792d4e474aed98ee84b3f591c7dff37b64e0ecd68fd036d517e412dcadf85840ce184ad7921ad446c4ee28db80447aea1ca8d4f574db4d4e37688158ddd19e14ee2eab4873d46947d65d14a23e788d912cf9a19624ca7352469b72a83866b7c23cb5ace3deab3c7018061b0ba0f39ed2befe27163e5083cf9b8271e3e3d52cc7ad6e2a3bd81d4c3d7022f8d" - -const signedEncryptedMessage2Hex = "85010e03cf6a7abcd43e36731003fb057f5495b79db367e277cdbe4ab90d924ddee0c0381494112ff8c1238fb0184af35d1731573b01bc4c55ecacd2aafbe2003d36310487d1ecc9ac994f3fada7f9f7f5c3a64248ab7782906c82c6ff1303b69a84d9a9529c31ecafbcdb9ba87e05439897d87e8a2a3dec55e14df19bba7f7bd316291c002ae2efd24f83f9e3441203fc081c0c23dc3092a454ca8a082b27f631abf73aca341686982e8fbda7e0e7d863941d68f3de4a755c2964407f4b5e0477b3196b8c93d551dd23c8beef7d0f03fbb1b6066f78907faf4bf1677d8fcec72651124080e0b7feae6b476e72ab207d38d90b958759fdedfc3c6c35717c9dbfc979b3cfbbff0a76d24a5e57056bb88acbd2a901ef64bc6e4db02adc05b6250ff378de81dca18c1910ab257dff1b9771b85bb9bbe0a69f5989e6d1710a35e6dfcceb7d8fb5ccea8db3932b3d9ff3fe0d327597c68b3622aec8e3716c83a6c93f497543b459b58ba504ed6bcaa747d37d2ca746fe49ae0a6ce4a8b694234e941b5159ff8bd34b9023da2814076163b86f40eed7c9472f81b551452d5ab87004a373c0172ec87ea6ce42ccfa7dbdad66b745496c4873d8019e8c28d6b3" - -const symmetricallyEncryptedCompressedHex = "8c0d04030302eb4a03808145d0d260c92f714339e13de5a79881216431925bf67ee2898ea61815f07894cd0703c50d0a76ef64d482196f47a8bc729af9b80bb6" - -const dsaTestKeyHex = "9901a2044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794" - -const dsaTestKeyPrivateHex = "9501bb044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4d00009f592e0619d823953577d4503061706843317e4fee083db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794" - -const p256TestKeyHex = "98520456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b7754b8560456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b6030108078861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e" - -const p256TestKeyPrivateHex = "94a50456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253fe070302f0c2bfb0b6c30f87ee1599472b8636477eab23ced13b271886a4b50ed34c9d8436af5af5b8f88921f0efba6ef8c37c459bbb88bc1c6a13bbd25c4ce9b1e97679569ee77645d469bf4b43de637f5561b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b77549ca90456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b603010807fe0703027510012471a603cfee2968dce19f732721ddf03e966fd133b4e3c7a685b788705cbc46fb026dc94724b830c9edbaecd2fb2c662f23169516cacd1fe423f0475c364ecc10abcabcfd4bbbda1a36a1bd8861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e" - -const armoredPrivateKeyBlock = `-----BEGIN PGP PRIVATE KEY BLOCK----- -Version: GnuPG v1.4.10 (GNU/Linux) - -lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp -idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn -vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB -AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X -0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL -IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk -VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn -gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9 -TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx -q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz -dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA -CgkQO9o98PRieSoLhgQAkLEZex02Qt7vGhZzMwuN0R22w3VwyYyjBx+fM3JFETy1 -ut4xcLJoJfIaF5ZS38UplgakHG0FQ+b49i8dMij0aZmDqGxrew1m4kBfjXw9B/v+ -eIqpODryb6cOSwyQFH0lQkXC040pjq9YqDsO5w0WYNXYKDnzRV0p4H1pweo2VDid -AdgETasU2gEEAN46UPeWRqKHvA99arOxee38fBt2CI08iiWyI8T3J6ivtFGixSqV -bRcPxYO/qLpVe5l84Nb3X71GfVXlc9hyv7CD6tcowL59hg1E/DC5ydI8K8iEpUmK -/UnHdIY5h8/kqgGxkY/T/hgp5fRQgW1ZoZxLajVlMRZ8W4tFtT0DeA+JABEBAAEA -A/0bE1jaaZKj6ndqcw86jd+QtD1SF+Cf21CWRNeLKnUds4FRRvclzTyUMuWPkUeX -TaNNsUOFqBsf6QQ2oHUBBK4VCHffHCW4ZEX2cd6umz7mpHW6XzN4DECEzOVksXtc -lUC1j4UB91DC/RNQqwX1IV2QLSwssVotPMPqhOi0ZLNY7wIA3n7DWKInxYZZ4K+6 -rQ+POsz6brEoRHwr8x6XlHenq1Oki855pSa1yXIARoTrSJkBtn5oI+f8AzrnN0BN -oyeQAwIA/7E++3HDi5aweWrViiul9cd3rcsS0dEnksPhvS0ozCJiHsq/6GFmy7J8 -QSHZPteedBnZyNp5jR+H7cIfVN3KgwH/Skq4PsuPhDq5TKK6i8Pc1WW8MA6DXTdU -nLkX7RGmMwjC0DBf7KWAlPjFaONAX3a8ndnz//fy1q7u2l9AZwrj1qa1iJ8EGAEC -AAkFAk2rFNoCGwwACgkQO9o98PRieSo2/QP/WTzr4ioINVsvN1akKuekmEMI3LAp -BfHwatufxxP1U+3Si/6YIk7kuPB9Hs+pRqCXzbvPRrI8NHZBmc8qIGthishdCYad -AHcVnXjtxrULkQFGbGvhKURLvS9WnzD/m1K2zzwxzkPTzT9/Yf06O6Mal5AdugPL -VrM0m72/jnpKo04= -=zNCn ------END PGP PRIVATE KEY BLOCK-----` - -const e2ePublicKey = `-----BEGIN PGP PUBLIC KEY BLOCK----- -Charset: UTF-8 - -xv8AAABSBAAAAAATCCqGSM49AwEHAgME1LRoXSpOxtHXDUdmuvzchyg6005qIBJ4 -sfaSxX7QgH9RV2ONUhC+WiayCNADq+UMzuR/vunSr4aQffXvuGnR383/AAAAFDxk -Z2lsQHlhaG9vLWluYy5jb20+wv8AAACGBBATCAA4/wAAAAWCVGvAG/8AAAACiwn/ -AAAACZC2VkQCOjdvYf8AAAAFlQgJCgv/AAAAA5YBAv8AAAACngEAAE1BAP0X8veD -24IjmI5/C6ZAfVNXxgZZFhTAACFX75jUA3oD6AEAzoSwKf1aqH6oq62qhCN/pekX -+WAsVMBhNwzLpqtCRjLO/wAAAFYEAAAAABIIKoZIzj0DAQcCAwT50ain7vXiIRv8 -B1DO3x3cE/aattZ5sHNixJzRCXi2vQIA5QmOxZ6b5jjUekNbdHG3SZi1a2Ak5mfX -fRxC/5VGAwEIB8L/AAAAZQQYEwgAGP8AAAAFglRrwBz/AAAACZC2VkQCOjdvYQAA -FJAA9isX3xtGyMLYwp2F3nXm7QEdY5bq5VUcD/RJlj792VwA/1wH0pCzVLl4Q9F9 -ex7En5r7rHR5xwX82Msc+Rq9dSyO -=7MrZ ------END PGP PUBLIC KEY BLOCK-----` - -const dsaKeyWithSHA512 = `9901a2044f04b07f110400db244efecc7316553ee08d179972aab87bb1214de7692593fcf5b6feb1c80fba268722dd464748539b85b81d574cd2d7ad0ca2444de4d849b8756bad7768c486c83a824f9bba4af773d11742bdfb4ac3b89ef8cc9452d4aad31a37e4b630d33927bff68e879284a1672659b8b298222fc68f370f3e24dccacc4a862442b9438b00a0ea444a24088dc23e26df7daf8f43cba3bffc4fe703fe3d6cd7fdca199d54ed8ae501c30e3ec7871ea9cdd4cf63cfe6fc82281d70a5b8bb493f922cd99fba5f088935596af087c8d818d5ec4d0b9afa7f070b3d7c1dd32a84fca08d8280b4890c8da1dde334de8e3cad8450eed2a4a4fcc2db7b8e5528b869a74a7f0189e11ef097ef1253582348de072bb07a9fa8ab838e993cef0ee203ff49298723e2d1f549b00559f886cd417a41692ce58d0ac1307dc71d85a8af21b0cf6eaa14baf2922d3a70389bedf17cc514ba0febbd107675a372fe84b90162a9e88b14d4b1c6be855b96b33fb198c46f058568817780435b6936167ebb3724b680f32bf27382ada2e37a879b3d9de2abe0c3f399350afd1ad438883f4791e2e3b4184453412068617368207472756e636174696f6e207465737488620413110a002205024f04b07f021b03060b090807030206150802090a0b0416020301021e01021780000a0910ef20e0cefca131581318009e2bf3bf047a44d75a9bacd00161ee04d435522397009a03a60d51bd8a568c6c021c8d7cf1be8d990d6417b0020003` - -const unknownHashFunctionHex = `8a00000040040001990006050253863c24000a09103b4fe6acc0b21f32ffff01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101` - -const missingHashFunctionHex = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101` - -const campbellQuine = `a0b001000300fcffa0b001000d00f2ff000300fcffa0b001000d00f2ff8270a01c00000500faff8270a01c00000500faff000500faff001400ebff8270a01c00000500faff000500faff001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400000000ffff000000ffff000b00f4ff428821c400000000ffff000000ffff000b00f4ff0233214c40000100feff000233214c40000100feff0000` - -const keyV4forVerifyingSignedMessageV3 = `-----BEGIN PGP PUBLIC KEY BLOCK----- -Comment: GPGTools - https://gpgtools.org - -mI0EVfxoFQEEAMBIqmbDfYygcvP6Phr1wr1XI41IF7Qixqybs/foBF8qqblD9gIY -BKpXjnBOtbkcVOJ0nljd3/sQIfH4E0vQwK5/4YRQSI59eKOqd6Fx+fWQOLG+uu6z -tewpeCj9LLHvibx/Sc7VWRnrznia6ftrXxJ/wHMezSab3tnGC0YPVdGNABEBAAG0 -JEdvY3J5cHRvIFRlc3QgS2V5IDx0aGVtYXhAZ21haWwuY29tPoi5BBMBCgAjBQJV -/GgVAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQeXnQmhdGW9PFVAP+ -K7TU0qX5ArvIONIxh/WAweyOk884c5cE8f+3NOPOOCRGyVy0FId5A7MmD5GOQh4H -JseOZVEVCqlmngEvtHZb3U1VYtVGE5WZ+6rQhGsMcWP5qaT4soYwMBlSYxgYwQcx -YhN9qOr292f9j2Y//TTIJmZT4Oa+lMxhWdqTfX+qMgG4jQRV/GgVAQQArhFSiij1 -b+hT3dnapbEU+23Z1yTu1DfF6zsxQ4XQWEV3eR8v+8mEDDNcz8oyyF56k6UQ3rXi -UMTIwRDg4V6SbZmaFbZYCOwp/EmXJ3rfhm7z7yzXj2OFN22luuqbyVhuL7LRdB0M -pxgmjXb4tTvfgKd26x34S+QqUJ7W6uprY4sAEQEAAYifBBgBCgAJBQJV/GgVAhsM -AAoJEHl50JoXRlvT7y8D/02ckx4OMkKBZo7viyrBw0MLG92i+DC2bs35PooHR6zz -786mitjOp5z2QWNLBvxC70S0qVfCIz8jKupO1J6rq6Z8CcbLF3qjm6h1omUBf8Nd -EfXKD2/2HV6zMKVknnKzIEzauh+eCKS2CeJUSSSryap/QLVAjRnckaES/OsEWhNB -=RZia ------END PGP PUBLIC KEY BLOCK----- -` - -const signedMessageV3 = `-----BEGIN PGP MESSAGE----- -Comment: GPGTools - https://gpgtools.org - -owGbwMvMwMVYWXlhlrhb9GXG03JJDKF/MtxDMjKLFYAoUaEktbhEITe1uDgxPVWP -q5NhKjMrWAVcC9evD8z/bF/uWNjqtk/X3y5/38XGRQHm/57rrDRYuGnTw597Xqka -uM3137/hH3Os+Jf2dc0fXOITKwJvXJvecPVs0ta+Vg7ZO1MLn8w58Xx+6L58mbka -DGHyU9yTueZE8D+QF/Tz28Y78dqtF56R1VPn9Xw4uJqrWYdd7b3vIZ1V6R4Nh05d -iT57d/OhWwA= -=hG7R ------END PGP MESSAGE----- -` diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k.go deleted file mode 100644 index d3350053d1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2011 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 s2k implements the various OpenPGP string-to-key transforms as -// specified in RFC 4800 section 3.7.1. -package s2k - -import ( - "crypto" - "hash" - "io" - "strconv" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" -) - -// Config collects configuration parameters for s2k key-stretching -// transformatioms. A nil *Config is valid and results in all default -// values. Currently, Config is used only by the Serialize function in -// this package. -type Config struct { - // Hash is the default hash function to be used. If - // nil, SHA1 is used. - Hash crypto.Hash - // S2KCount is only used for symmetric encryption. It - // determines the strength of the passphrase stretching when - // the said passphrase is hashed to produce a key. S2KCount - // should be between 1024 and 65011712, inclusive. If Config - // is nil or S2KCount is 0, the value 65536 used. Not all - // values in the above range can be represented. S2KCount will - // be rounded up to the next representable value if it cannot - // be encoded exactly. When set, it is strongly encrouraged to - // use a value that is at least 65536. See RFC 4880 Section - // 3.7.1.3. - S2KCount int -} - -func (c *Config) hash() crypto.Hash { - if c == nil || uint(c.Hash) == 0 { - // SHA1 is the historical default in this package. - return crypto.SHA1 - } - - return c.Hash -} - -func (c *Config) encodedCount() uint8 { - if c == nil || c.S2KCount == 0 { - return 96 // The common case. Correspoding to 65536 - } - - i := c.S2KCount - switch { - // Behave like GPG. Should we make 65536 the lowest value used? - case i < 1024: - i = 1024 - case i > 65011712: - i = 65011712 - } - - return encodeCount(i) -} - -// encodeCount converts an iterative "count" in the range 1024 to -// 65011712, inclusive, to an encoded count. The return value is the -// octet that is actually stored in the GPG file. encodeCount panics -// if i is not in the above range (encodedCount above takes care to -// pass i in the correct range). See RFC 4880 Section 3.7.7.1. -func encodeCount(i int) uint8 { - if i < 1024 || i > 65011712 { - panic("count arg i outside the required range") - } - - for encoded := 0; encoded < 256; encoded++ { - count := decodeCount(uint8(encoded)) - if count >= i { - return uint8(encoded) - } - } - - return 255 -} - -// decodeCount returns the s2k mode 3 iterative "count" corresponding to -// the encoded octet c. -func decodeCount(c uint8) int { - return (16 + int(c&15)) << (uint32(c>>4) + 6) -} - -// Simple writes to out the result of computing the Simple S2K function (RFC -// 4880, section 3.7.1.1) using the given hash and input passphrase. -func Simple(out []byte, h hash.Hash, in []byte) { - Salted(out, h, in, nil) -} - -var zero [1]byte - -// Salted writes to out the result of computing the Salted S2K function (RFC -// 4880, section 3.7.1.2) using the given hash, input passphrase and salt. -func Salted(out []byte, h hash.Hash, in []byte, salt []byte) { - done := 0 - var digest []byte - - for i := 0; done < len(out); i++ { - h.Reset() - for j := 0; j < i; j++ { - h.Write(zero[:]) - } - h.Write(salt) - h.Write(in) - digest = h.Sum(digest[:0]) - n := copy(out[done:], digest) - done += n - } -} - -// Iterated writes to out the result of computing the Iterated and Salted S2K -// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase, -// salt and iteration count. -func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) { - combined := make([]byte, len(in)+len(salt)) - copy(combined, salt) - copy(combined[len(salt):], in) - - if count < len(combined) { - count = len(combined) - } - - done := 0 - var digest []byte - for i := 0; done < len(out); i++ { - h.Reset() - for j := 0; j < i; j++ { - h.Write(zero[:]) - } - written := 0 - for written < count { - if written+len(combined) > count { - todo := count - written - h.Write(combined[:todo]) - written = count - } else { - h.Write(combined) - written += len(combined) - } - } - digest = h.Sum(digest[:0]) - n := copy(out[done:], digest) - done += n - } -} - -// Parse reads a binary specification for a string-to-key transformation from r -// and returns a function which performs that transform. -func Parse(r io.Reader) (f func(out, in []byte), err error) { - var buf [9]byte - - _, err = io.ReadFull(r, buf[:2]) - if err != nil { - return - } - - hash, ok := HashIdToHash(buf[1]) - if !ok { - return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(buf[1]))) - } - if !hash.Available() { - return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hash))) - } - h := hash.New() - - switch buf[0] { - case 0: - f := func(out, in []byte) { - Simple(out, h, in) - } - return f, nil - case 1: - _, err = io.ReadFull(r, buf[:8]) - if err != nil { - return - } - f := func(out, in []byte) { - Salted(out, h, in, buf[:8]) - } - return f, nil - case 3: - _, err = io.ReadFull(r, buf[:9]) - if err != nil { - return - } - count := decodeCount(buf[8]) - f := func(out, in []byte) { - Iterated(out, h, in, buf[:8], count) - } - return f, nil - } - - return nil, errors.UnsupportedError("S2K function") -} - -// Serialize salts and stretches the given passphrase and writes the -// resulting key into key. It also serializes an S2K descriptor to -// w. The key stretching can be configured with c, which may be -// nil. In that case, sensible defaults will be used. -func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error { - var buf [11]byte - buf[0] = 3 /* iterated and salted */ - buf[1], _ = HashToHashId(c.hash()) - salt := buf[2:10] - if _, err := io.ReadFull(rand, salt); err != nil { - return err - } - encodedCount := c.encodedCount() - count := decodeCount(encodedCount) - buf[10] = encodedCount - if _, err := w.Write(buf[:]); err != nil { - return err - } - - Iterated(key, c.hash().New(), passphrase, salt, count) - return nil -} - -// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with -// Go's crypto.Hash type. See RFC 4880, section 9.4. -var hashToHashIdMapping = []struct { - id byte - hash crypto.Hash - name string -}{ - {1, crypto.MD5, "MD5"}, - {2, crypto.SHA1, "SHA1"}, - {3, crypto.RIPEMD160, "RIPEMD160"}, - {8, crypto.SHA256, "SHA256"}, - {9, crypto.SHA384, "SHA384"}, - {10, crypto.SHA512, "SHA512"}, - {11, crypto.SHA224, "SHA224"}, -} - -// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP -// hash id. -func HashIdToHash(id byte) (h crypto.Hash, ok bool) { - for _, m := range hashToHashIdMapping { - if m.id == id { - return m.hash, true - } - } - return 0, false -} - -// HashIdToString returns the name of the hash function corresponding to the -// given OpenPGP hash id. -func HashIdToString(id byte) (name string, ok bool) { - for _, m := range hashToHashIdMapping { - if m.id == id { - return m.name, true - } - } - - return "", false -} - -// HashIdToHash returns an OpenPGP hash id which corresponds the given Hash. -func HashToHashId(h crypto.Hash) (id byte, ok bool) { - for _, m := range hashToHashIdMapping { - if m.hash == h { - return m.id, true - } - } - return 0, false -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k_test.go deleted file mode 100644 index c9f038b869..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k/s2k_test.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2011 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 s2k - -import ( - "bytes" - "crypto" - _ "crypto/md5" - "crypto/rand" - "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" - "encoding/hex" - "testing" - - _ "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160" -) - -var saltedTests = []struct { - in, out string -}{ - {"hello", "10295ac1"}, - {"world", "ac587a5e"}, - {"foo", "4dda8077"}, - {"bar", "bd8aac6b9ea9cae04eae6a91c6133b58b5d9a61c14f355516ed9370456"}, - {"x", "f1d3f289"}, - {"xxxxxxxxxxxxxxxxxxxxxxx", "e00d7b45"}, -} - -func TestSalted(t *testing.T) { - h := sha1.New() - salt := [4]byte{1, 2, 3, 4} - - for i, test := range saltedTests { - expected, _ := hex.DecodeString(test.out) - out := make([]byte, len(expected)) - Salted(out, h, []byte(test.in), salt[:]) - if !bytes.Equal(expected, out) { - t.Errorf("#%d, got: %x want: %x", i, out, expected) - } - } -} - -var iteratedTests = []struct { - in, out string -}{ - {"hello", "83126105"}, - {"world", "6fa317f9"}, - {"foo", "8fbc35b9"}, - {"bar", "2af5a99b54f093789fd657f19bd245af7604d0f6ae06f66602a46a08ae"}, - {"x", "5a684dfe"}, - {"xxxxxxxxxxxxxxxxxxxxxxx", "18955174"}, -} - -func TestIterated(t *testing.T) { - h := sha1.New() - salt := [4]byte{4, 3, 2, 1} - - for i, test := range iteratedTests { - expected, _ := hex.DecodeString(test.out) - out := make([]byte, len(expected)) - Iterated(out, h, []byte(test.in), salt[:], 31) - if !bytes.Equal(expected, out) { - t.Errorf("#%d, got: %x want: %x", i, out, expected) - } - } -} - -var parseTests = []struct { - spec, in, out string -}{ - /* Simple with SHA1 */ - {"0002", "hello", "aaf4c61d"}, - /* Salted with SHA1 */ - {"01020102030405060708", "hello", "f4f7d67e"}, - /* Iterated with SHA1 */ - {"03020102030405060708f1", "hello", "f2a57b7c"}, -} - -func TestParse(t *testing.T) { - for i, test := range parseTests { - spec, _ := hex.DecodeString(test.spec) - buf := bytes.NewBuffer(spec) - f, err := Parse(buf) - if err != nil { - t.Errorf("%d: Parse returned error: %s", i, err) - continue - } - - expected, _ := hex.DecodeString(test.out) - out := make([]byte, len(expected)) - f(out, []byte(test.in)) - if !bytes.Equal(out, expected) { - t.Errorf("%d: output got: %x want: %x", i, out, expected) - } - if testing.Short() { - break - } - } -} - -func TestSerialize(t *testing.T) { - hashes := []crypto.Hash{crypto.MD5, crypto.SHA1, crypto.RIPEMD160, - crypto.SHA256, crypto.SHA384, crypto.SHA512, crypto.SHA224} - testCounts := []int{-1, 0, 1024, 65536, 4063232, 65011712} - for _, h := range hashes { - for _, c := range testCounts { - testSerializeConfig(t, &Config{Hash: h, S2KCount: c}) - } - } -} - -func testSerializeConfig(t *testing.T, c *Config) { - t.Logf("Running testSerializeConfig() with config: %+v", c) - - buf := bytes.NewBuffer(nil) - key := make([]byte, 16) - passphrase := []byte("testing") - err := Serialize(buf, key, rand.Reader, passphrase, c) - if err != nil { - t.Errorf("failed to serialize: %s", err) - return - } - - f, err := Parse(buf) - if err != nil { - t.Errorf("failed to reparse: %s", err) - return - } - key2 := make([]byte, len(key)) - f(key2, passphrase) - if !bytes.Equal(key2, key) { - t.Errorf("keys don't match: %x (serialied) vs %x (parsed)", key, key2) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write.go deleted file mode 100644 index 34e907ce24..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write.go +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "crypto" - "hash" - "io" - "strconv" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/armor" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/errors" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/s2k" -) - -// DetachSign signs message with the private key from signer (which must -// already have been decrypted) and writes the signature to w. -// If config is nil, sensible defaults will be used. -func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return detachSign(w, signer, message, packet.SigTypeBinary, config) -} - -// ArmoredDetachSign signs message with the private key from signer (which -// must already have been decrypted) and writes an armored signature to w. -// If config is nil, sensible defaults will be used. -func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) { - return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config) -} - -// DetachSignText signs message (after canonicalising the line endings) with -// the private key from signer (which must already have been decrypted) and -// writes the signature to w. -// If config is nil, sensible defaults will be used. -func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return detachSign(w, signer, message, packet.SigTypeText, config) -} - -// ArmoredDetachSignText signs message (after canonicalising the line endings) -// with the private key from signer (which must already have been decrypted) -// and writes an armored signature to w. -// If config is nil, sensible defaults will be used. -func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return armoredDetachSign(w, signer, message, packet.SigTypeText, config) -} - -func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { - out, err := armor.Encode(w, SignatureType, nil) - if err != nil { - return - } - err = detachSign(out, signer, message, sigType, config) - if err != nil { - return - } - return out.Close() -} - -func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { - if signer.PrivateKey == nil { - return errors.InvalidArgumentError("signing key doesn't have a private key") - } - if signer.PrivateKey.Encrypted { - return errors.InvalidArgumentError("signing key is encrypted") - } - - sig := new(packet.Signature) - sig.SigType = sigType - sig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo - sig.Hash = config.Hash() - sig.CreationTime = config.Now() - sig.IssuerKeyId = &signer.PrivateKey.KeyId - - h, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType) - if err != nil { - return - } - io.Copy(wrappedHash, message) - - err = sig.Sign(h, signer.PrivateKey, config) - if err != nil { - return - } - - return sig.Serialize(w) -} - -// FileHints contains metadata about encrypted files. This metadata is, itself, -// encrypted. -type FileHints struct { - // IsBinary can be set to hint that the contents are binary data. - IsBinary bool - // FileName hints at the name of the file that should be written. It's - // truncated to 255 bytes if longer. It may be empty to suggest that the - // file should not be written to disk. It may be equal to "_CONSOLE" to - // suggest the data should not be written to disk. - FileName string - // ModTime contains the modification time of the file, or the zero time if not applicable. - ModTime time.Time -} - -// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase. -// The resulting WriteCloser must be closed after the contents of the file have -// been written. -// If config is nil, sensible defaults will be used. -func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { - if hints == nil { - hints = &FileHints{} - } - - key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config) - if err != nil { - return - } - w, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config) - if err != nil { - return - } - - literaldata := w - if algo := config.Compression(); algo != packet.CompressionNone { - var compConfig *packet.CompressionConfig - if config != nil { - compConfig = config.CompressionConfig - } - literaldata, err = packet.SerializeCompressed(w, algo, compConfig) - if err != nil { - return - } - } - - var epochSeconds uint32 - if !hints.ModTime.IsZero() { - epochSeconds = uint32(hints.ModTime.Unix()) - } - return packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds) -} - -// intersectPreferences mutates and returns a prefix of a that contains only -// the values in the intersection of a and b. The order of a is preserved. -func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) { - var j int - for _, v := range a { - for _, v2 := range b { - if v == v2 { - a[j] = v - j++ - break - } - } - } - - return a[:j] -} - -func hashToHashId(h crypto.Hash) uint8 { - v, ok := s2k.HashToHashId(h) - if !ok { - panic("tried to convert unknown hash") - } - return v -} - -// Encrypt encrypts a message to a number of recipients and, optionally, signs -// it. hints contains optional information, that is also encrypted, that aids -// the recipients in processing the message. The resulting WriteCloser must -// be closed after the contents of the file have been written. -// If config is nil, sensible defaults will be used. -func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { - var signer *packet.PrivateKey - if signed != nil { - signKey, ok := signed.signingKey(config.Now()) - if !ok { - return nil, errors.InvalidArgumentError("no valid signing keys") - } - signer = signKey.PrivateKey - if signer == nil { - return nil, errors.InvalidArgumentError("no private key in signing key") - } - if signer.Encrypted { - return nil, errors.InvalidArgumentError("signing key must be decrypted") - } - } - - // These are the possible ciphers that we'll use for the message. - candidateCiphers := []uint8{ - uint8(packet.CipherAES128), - uint8(packet.CipherAES256), - uint8(packet.CipherCAST5), - } - // These are the possible hash functions that we'll use for the signature. - candidateHashes := []uint8{ - hashToHashId(crypto.SHA256), - hashToHashId(crypto.SHA512), - hashToHashId(crypto.SHA1), - hashToHashId(crypto.RIPEMD160), - } - // In the event that a recipient doesn't specify any supported ciphers - // or hash functions, these are the ones that we assume that every - // implementation supports. - defaultCiphers := candidateCiphers[len(candidateCiphers)-1:] - defaultHashes := candidateHashes[len(candidateHashes)-1:] - - encryptKeys := make([]Key, len(to)) - for i := range to { - var ok bool - encryptKeys[i], ok = to[i].encryptionKey(config.Now()) - if !ok { - return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no encryption keys") - } - - sig := to[i].primaryIdentity().SelfSignature - - preferredSymmetric := sig.PreferredSymmetric - if len(preferredSymmetric) == 0 { - preferredSymmetric = defaultCiphers - } - preferredHashes := sig.PreferredHash - if len(preferredHashes) == 0 { - preferredHashes = defaultHashes - } - candidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric) - candidateHashes = intersectPreferences(candidateHashes, preferredHashes) - } - - if len(candidateCiphers) == 0 || len(candidateHashes) == 0 { - return nil, errors.InvalidArgumentError("cannot encrypt because recipient set shares no common algorithms") - } - - cipher := packet.CipherFunction(candidateCiphers[0]) - // If the cipher specified by config is a candidate, we'll use that. - configuredCipher := config.Cipher() - for _, c := range candidateCiphers { - cipherFunc := packet.CipherFunction(c) - if cipherFunc == configuredCipher { - cipher = cipherFunc - break - } - } - - var hash crypto.Hash - for _, hashId := range candidateHashes { - if h, ok := s2k.HashIdToHash(hashId); ok && h.Available() { - hash = h - break - } - } - - // If the hash specified by config is a candidate, we'll use that. - if configuredHash := config.Hash(); configuredHash.Available() { - for _, hashId := range candidateHashes { - if h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash { - hash = h - break - } - } - } - - if hash == 0 { - hashId := candidateHashes[0] - name, ok := s2k.HashIdToString(hashId) - if !ok { - name = "#" + strconv.Itoa(int(hashId)) - } - return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)") - } - - symKey := make([]byte, cipher.KeySize()) - if _, err := io.ReadFull(config.Random(), symKey); err != nil { - return nil, err - } - - for _, key := range encryptKeys { - if err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil { - return nil, err - } - } - - encryptedData, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config) - if err != nil { - return - } - - if signer != nil { - ops := &packet.OnePassSignature{ - SigType: packet.SigTypeBinary, - Hash: hash, - PubKeyAlgo: signer.PubKeyAlgo, - KeyId: signer.KeyId, - IsLast: true, - } - if err := ops.Serialize(encryptedData); err != nil { - return nil, err - } - } - - if hints == nil { - hints = &FileHints{} - } - - w := encryptedData - if signer != nil { - // If we need to write a signature packet after the literal - // data then we need to stop literalData from closing - // encryptedData. - w = noOpCloser{encryptedData} - - } - var epochSeconds uint32 - if !hints.ModTime.IsZero() { - epochSeconds = uint32(hints.ModTime.Unix()) - } - literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds) - if err != nil { - return nil, err - } - - if signer != nil { - return signatureWriter{encryptedData, literalData, hash, hash.New(), signer, config}, nil - } - return literalData, nil -} - -// signatureWriter hashes the contents of a message while passing it along to -// literalData. When closed, it closes literalData, writes a signature packet -// to encryptedData and then also closes encryptedData. -type signatureWriter struct { - encryptedData io.WriteCloser - literalData io.WriteCloser - hashType crypto.Hash - h hash.Hash - signer *packet.PrivateKey - config *packet.Config -} - -func (s signatureWriter) Write(data []byte) (int, error) { - s.h.Write(data) - return s.literalData.Write(data) -} - -func (s signatureWriter) Close() error { - sig := &packet.Signature{ - SigType: packet.SigTypeBinary, - PubKeyAlgo: s.signer.PubKeyAlgo, - Hash: s.hashType, - CreationTime: s.config.Now(), - IssuerKeyId: &s.signer.KeyId, - } - - if err := sig.Sign(s.h, s.signer, s.config); err != nil { - return err - } - if err := s.literalData.Close(); err != nil { - return err - } - if err := sig.Serialize(s.encryptedData); err != nil { - return err - } - return s.encryptedData.Close() -} - -// noOpCloser is like an ioutil.NopCloser, but for an io.Writer. -// TODO: we have two of these in OpenPGP packages alone. This probably needs -// to be promoted somewhere more common. -type noOpCloser struct { - w io.Writer -} - -func (c noOpCloser) Write(data []byte) (n int, err error) { - return c.w.Write(data) -} - -func (c noOpCloser) Close() error { - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write_test.go deleted file mode 100644 index c78c2dad0c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/write_test.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "bytes" - "io" - "io/ioutil" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/openpgp/packet" -) - -func TestSignDetached(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex)) - out := bytes.NewBuffer(nil) - message := bytes.NewBufferString(signedInput) - err := DetachSign(out, kring[0], message, nil) - if err != nil { - t.Error(err) - } - - testDetachedSignature(t, kring, out, signedInput, "check", testKey1KeyId) -} - -func TestSignTextDetached(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex)) - out := bytes.NewBuffer(nil) - message := bytes.NewBufferString(signedInput) - err := DetachSignText(out, kring[0], message, nil) - if err != nil { - t.Error(err) - } - - testDetachedSignature(t, kring, out, signedInput, "check", testKey1KeyId) -} - -func TestSignDetachedDSA(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyPrivateHex)) - out := bytes.NewBuffer(nil) - message := bytes.NewBufferString(signedInput) - err := DetachSign(out, kring[0], message, nil) - if err != nil { - t.Error(err) - } - - testDetachedSignature(t, kring, out, signedInput, "check", testKey3KeyId) -} - -func TestSignDetachedP256(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(p256TestKeyPrivateHex)) - kring[0].PrivateKey.Decrypt([]byte("passphrase")) - - out := bytes.NewBuffer(nil) - message := bytes.NewBufferString(signedInput) - err := DetachSign(out, kring[0], message, nil) - if err != nil { - t.Error(err) - } - - testDetachedSignature(t, kring, out, signedInput, "check", testKeyP256KeyId) -} - -func TestNewEntity(t *testing.T) { - if testing.Short() { - return - } - - // Check bit-length with no config. - e, err := NewEntity("Test User", "test", "test@example.com", nil) - if err != nil { - t.Errorf("failed to create entity: %s", err) - return - } - bl, err := e.PrimaryKey.BitLength() - if err != nil { - t.Errorf("failed to find bit length: %s", err) - } - if int(bl) != defaultRSAKeyBits { - t.Errorf("BitLength %v, expected %v", int(bl), defaultRSAKeyBits) - } - - // Check bit-length with a config. - cfg := &packet.Config{RSABits: 1024} - e, err = NewEntity("Test User", "test", "test@example.com", cfg) - if err != nil { - t.Errorf("failed to create entity: %s", err) - return - } - bl, err = e.PrimaryKey.BitLength() - if err != nil { - t.Errorf("failed to find bit length: %s", err) - } - if int(bl) != cfg.RSABits { - t.Errorf("BitLength %v, expected %v", bl, cfg.RSABits) - } - - w := bytes.NewBuffer(nil) - if err := e.SerializePrivate(w, nil); err != nil { - t.Errorf("failed to serialize entity: %s", err) - return - } - serialized := w.Bytes() - - el, err := ReadKeyRing(w) - if err != nil { - t.Errorf("failed to reparse entity: %s", err) - return - } - - if len(el) != 1 { - t.Errorf("wrong number of entities found, got %d, want 1", len(el)) - } - - w = bytes.NewBuffer(nil) - if err := e.SerializePrivate(w, nil); err != nil { - t.Errorf("failed to serialize entity second time: %s", err) - return - } - - if !bytes.Equal(w.Bytes(), serialized) { - t.Errorf("results differed") - } -} - -func TestSymmetricEncryption(t *testing.T) { - buf := new(bytes.Buffer) - plaintext, err := SymmetricallyEncrypt(buf, []byte("testing"), nil, nil) - if err != nil { - t.Errorf("error writing headers: %s", err) - return - } - message := []byte("hello world\n") - _, err = plaintext.Write(message) - if err != nil { - t.Errorf("error writing to plaintext writer: %s", err) - } - err = plaintext.Close() - if err != nil { - t.Errorf("error closing plaintext writer: %s", err) - } - - md, err := ReadMessage(buf, nil, func(keys []Key, symmetric bool) ([]byte, error) { - return []byte("testing"), nil - }, nil) - if err != nil { - t.Errorf("error rereading message: %s", err) - } - messageBuf := bytes.NewBuffer(nil) - _, err = io.Copy(messageBuf, md.UnverifiedBody) - if err != nil { - t.Errorf("error rereading message: %s", err) - } - if !bytes.Equal(message, messageBuf.Bytes()) { - t.Errorf("recovered message incorrect got '%s', want '%s'", messageBuf.Bytes(), message) - } -} - -var testEncryptionTests = []struct { - keyRingHex string - isSigned bool -}{ - { - testKeys1And2PrivateHex, - false, - }, - { - testKeys1And2PrivateHex, - true, - }, - { - dsaElGamalTestKeysHex, - false, - }, - { - dsaElGamalTestKeysHex, - true, - }, -} - -func TestEncryption(t *testing.T) { - for i, test := range testEncryptionTests { - kring, _ := ReadKeyRing(readerFromHex(test.keyRingHex)) - - passphrase := []byte("passphrase") - for _, entity := range kring { - if entity.PrivateKey != nil && entity.PrivateKey.Encrypted { - err := entity.PrivateKey.Decrypt(passphrase) - if err != nil { - t.Errorf("#%d: failed to decrypt key", i) - } - } - for _, subkey := range entity.Subkeys { - if subkey.PrivateKey != nil && subkey.PrivateKey.Encrypted { - err := subkey.PrivateKey.Decrypt(passphrase) - if err != nil { - t.Errorf("#%d: failed to decrypt subkey", i) - } - } - } - } - - var signed *Entity - if test.isSigned { - signed = kring[0] - } - - buf := new(bytes.Buffer) - w, err := Encrypt(buf, kring[:1], signed, nil /* no hints */, nil) - if err != nil { - t.Errorf("#%d: error in Encrypt: %s", i, err) - continue - } - - const message = "testing" - _, err = w.Write([]byte(message)) - if err != nil { - t.Errorf("#%d: error writing plaintext: %s", i, err) - continue - } - err = w.Close() - if err != nil { - t.Errorf("#%d: error closing WriteCloser: %s", i, err) - continue - } - - md, err := ReadMessage(buf, kring, nil /* no prompt */, nil) - if err != nil { - t.Errorf("#%d: error reading message: %s", i, err) - continue - } - - testTime, _ := time.Parse("2006-01-02", "2013-07-01") - if test.isSigned { - signKey, _ := kring[0].signingKey(testTime) - expectedKeyId := signKey.PublicKey.KeyId - if md.SignedByKeyId != expectedKeyId { - t.Errorf("#%d: message signed by wrong key id, got: %v, want: %v", i, *md.SignedBy, expectedKeyId) - } - if md.SignedBy == nil { - t.Errorf("#%d: failed to find the signing Entity", i) - } - } - - plaintext, err := ioutil.ReadAll(md.UnverifiedBody) - if err != nil { - t.Errorf("#%d: error reading encrypted contents: %s", i, err) - continue - } - - encryptKey, _ := kring[0].encryptionKey(testTime) - expectedKeyId := encryptKey.PublicKey.KeyId - if len(md.EncryptedToKeyIds) != 1 || md.EncryptedToKeyIds[0] != expectedKeyId { - t.Errorf("#%d: expected message to be encrypted to %v, but got %#v", i, expectedKeyId, md.EncryptedToKeyIds) - } - - if string(plaintext) != message { - t.Errorf("#%d: got: %s, want: %s", i, string(plaintext), message) - } - - if test.isSigned { - if md.SignatureError != nil { - t.Errorf("#%d: signature error: %s", i, md.SignatureError) - } - if md.Signature == nil { - t.Error("signature missing") - } - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/libotr_test_helper.c b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/libotr_test_helper.c deleted file mode 100644 index b3ca072d48..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/libotr_test_helper.c +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright 2012 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. - -// This code can be compiled and used to test the otr package against libotr. -// See otr_test.go. - -// +build ignore - -#include -#include -#include - -#include -#include -#include - -static int g_session_established = 0; - -OtrlPolicy policy(void *opdata, ConnContext *context) { - return OTRL_POLICY_ALWAYS; -} - -int is_logged_in(void *opdata, const char *accountname, const char *protocol, - const char *recipient) { - return 1; -} - -void inject_message(void *opdata, const char *accountname, const char *protocol, - const char *recipient, const char *message) { - printf("%s\n", message); - fflush(stdout); - fprintf(stderr, "libotr helper sent: %s\n", message); -} - -void update_context_list(void *opdata) {} - -void new_fingerprint(void *opdata, OtrlUserState us, const char *accountname, - const char *protocol, const char *username, - unsigned char fingerprint[20]) { - fprintf(stderr, "NEW FINGERPRINT\n"); - g_session_established = 1; -} - -void write_fingerprints(void *opdata) {} - -void gone_secure(void *opdata, ConnContext *context) {} - -void gone_insecure(void *opdata, ConnContext *context) {} - -void still_secure(void *opdata, ConnContext *context, int is_reply) {} - -int max_message_size(void *opdata, ConnContext *context) { return 99999; } - -const char *account_name(void *opdata, const char *account, - const char *protocol) { - return "ACCOUNT"; -} - -void account_name_free(void *opdata, const char *account_name) {} - -const char *error_message(void *opdata, ConnContext *context, - OtrlErrorCode err_code) { - return "ERR"; -} - -void error_message_free(void *opdata, const char *msg) {} - -void resent_msg_prefix_free(void *opdata, const char *prefix) {} - -void handle_smp_event(void *opdata, OtrlSMPEvent smp_event, - ConnContext *context, unsigned short progress_event, - char *question) {} - -void handle_msg_event(void *opdata, OtrlMessageEvent msg_event, - ConnContext *context, const char *message, - gcry_error_t err) { - fprintf(stderr, "msg event: %d %s\n", msg_event, message); -} - -OtrlMessageAppOps uiops = { - policy, - NULL, - is_logged_in, - inject_message, - update_context_list, - new_fingerprint, - write_fingerprints, - gone_secure, - gone_insecure, - still_secure, - max_message_size, - account_name, - account_name_free, - NULL, /* received_symkey */ - error_message, - error_message_free, - NULL, /* resent_msg_prefix */ - resent_msg_prefix_free, - handle_smp_event, - handle_msg_event, - NULL /* create_instag */, - NULL /* convert_msg */, - NULL /* convert_free */, - NULL /* timer_control */, -}; - -static const char kPrivateKeyData[] = - "(privkeys (account (name \"account\") (protocol proto) (private-key (dsa " - "(p " - "#00FC07ABCF0DC916AFF6E9AE47BEF60C7AB9B4D6B2469E436630E36F8A489BE812486A09F" - "30B71224508654940A835301ACC525A4FF133FC152CC53DCC59D65C30A54F1993FE13FE63E" - "5823D4C746DB21B90F9B9C00B49EC7404AB1D929BA7FBA12F2E45C6E0A651689750E8528AB" - "8C031D3561FECEE72EBB4A090D450A9B7A857#) (q " - "#00997BD266EF7B1F60A5C23F3A741F2AEFD07A2081#) (g " - "#535E360E8A95EBA46A4F7DE50AD6E9B2A6DB785A66B64EB9F20338D2A3E8FB0E94725848F" - "1AA6CC567CB83A1CC517EC806F2E92EAE71457E80B2210A189B91250779434B41FC8A8873F" - "6DB94BEA7D177F5D59E7E114EE10A49CFD9CEF88AE43387023B672927BA74B04EB6BBB5E57" - "597766A2F9CE3857D7ACE3E1E3BC1FC6F26#) (y " - "#0AC8670AD767D7A8D9D14CC1AC6744CD7D76F993B77FFD9E39DF01E5A6536EF65E775FCEF" - "2A983E2A19BD6415500F6979715D9FD1257E1FE2B6F5E1E74B333079E7C880D39868462A93" - "454B41877BE62E5EF0A041C2EE9C9E76BD1E12AE25D9628DECB097025DD625EF49C3258A1A" - "3C0FF501E3DC673B76D7BABF349009B6ECF#) (x " - "#14D0345A3562C480A039E3C72764F72D79043216#)))))\n"; - -int main() { - OTRL_INIT; - - // We have to write the private key information to a file because the libotr - // API demands a filename to read from. - const char *tmpdir = "/tmp"; - if (getenv("TMP")) { - tmpdir = getenv("TMP"); - } - - char private_key_file[256]; - snprintf(private_key_file, sizeof(private_key_file), - "%s/libotr_test_helper_privatekeys-XXXXXX", tmpdir); - int fd = mkstemp(private_key_file); - if (fd == -1) { - perror("creating temp file"); - } - write(fd, kPrivateKeyData, sizeof(kPrivateKeyData) - 1); - close(fd); - - OtrlUserState userstate = otrl_userstate_create(); - otrl_privkey_read(userstate, private_key_file); - unlink(private_key_file); - - fprintf(stderr, "libotr helper started\n"); - - char buf[4096]; - - for (;;) { - char *message = fgets(buf, sizeof(buf), stdin); - if (strlen(message) == 0) { - break; - } - message[strlen(message) - 1] = 0; - fprintf(stderr, "libotr helper got: %s\n", message); - - char *newmessage = NULL; - OtrlTLV *tlvs; - int ignore_message = otrl_message_receiving( - userstate, &uiops, NULL, "account", "proto", "peer", message, - &newmessage, &tlvs, NULL, NULL, NULL); - if (tlvs) { - otrl_tlv_free(tlvs); - } - - if (newmessage != NULL) { - fprintf(stderr, "libotr got: %s\n", newmessage); - otrl_message_free(newmessage); - - gcry_error_t err; - char *newmessage = NULL; - - err = otrl_message_sending(userstate, &uiops, NULL, "account", "proto", - "peer", 0, "test message", NULL, &newmessage, - OTRL_FRAGMENT_SEND_SKIP, NULL, NULL, NULL); - if (newmessage == NULL) { - fprintf(stderr, "libotr didn't encrypt message\n"); - return 1; - } - write(1, newmessage, strlen(newmessage)); - write(1, "\n", 1); - fprintf(stderr, "libotr sent: %s\n", newmessage); - otrl_message_free(newmessage); - - g_session_established = 0; - write(1, "?OTRv2?\n", 8); - fprintf(stderr, "libotr sent: ?OTRv2\n"); - } - } - - return 0; -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr.go deleted file mode 100644 index d830efc1b9..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr.go +++ /dev/null @@ -1,1415 +0,0 @@ -// Copyright 2012 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 otr implements the Off The Record protocol as specified in -// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html -package otr - -import ( - "bytes" - "crypto/aes" - "crypto/cipher" - "crypto/dsa" - "crypto/hmac" - "crypto/rand" - "crypto/sha1" - "crypto/sha256" - "crypto/subtle" - "encoding/base64" - "encoding/hex" - "errors" - "hash" - "io" - "math/big" - "strconv" -) - -// SecurityChange describes a change in the security state of a Conversation. -type SecurityChange int - -const ( - NoChange SecurityChange = iota - // NewKeys indicates that a key exchange has completed. This occurs - // when a conversation first becomes encrypted, and when the keys are - // renegotiated within an encrypted conversation. - NewKeys - // SMPSecretNeeded indicates that the peer has started an - // authentication and that we need to supply a secret. Call SMPQuestion - // to get the optional, human readable challenge and then Authenticate - // to supply the matching secret. - SMPSecretNeeded - // SMPComplete indicates that an authentication completed. The identity - // of the peer has now been confirmed. - SMPComplete - // SMPFailed indicates that an authentication failed. - SMPFailed - // ConversationEnded indicates that the peer ended the secure - // conversation. - ConversationEnded -) - -// QueryMessage can be sent to a peer to start an OTR conversation. -var QueryMessage = "?OTRv2?" - -// ErrorPrefix can be used to make an OTR error by appending an error message -// to it. -var ErrorPrefix = "?OTR Error:" - -var ( - fragmentPartSeparator = []byte(",") - fragmentPrefix = []byte("?OTR,") - msgPrefix = []byte("?OTR:") - queryMarker = []byte("?OTR") -) - -// isQuery attempts to parse an OTR query from msg and returns the greatest -// common version, or 0 if msg is not an OTR query. -func isQuery(msg []byte) (greatestCommonVersion int) { - pos := bytes.Index(msg, queryMarker) - if pos == -1 { - return 0 - } - for i, c := range msg[pos+len(queryMarker):] { - if i == 0 { - if c == '?' { - // Indicates support for version 1, but we don't - // implement that. - continue - } - - if c != 'v' { - // Invalid message - return 0 - } - - continue - } - - if c == '?' { - // End of message - return - } - - if c == ' ' || c == '\t' { - // Probably an invalid message - return 0 - } - - if c == '2' { - greatestCommonVersion = 2 - } - } - - return 0 -} - -const ( - statePlaintext = iota - stateEncrypted - stateFinished -) - -const ( - authStateNone = iota - authStateAwaitingDHKey - authStateAwaitingRevealSig - authStateAwaitingSig -) - -const ( - msgTypeDHCommit = 2 - msgTypeData = 3 - msgTypeDHKey = 10 - msgTypeRevealSig = 17 - msgTypeSig = 18 -) - -const ( - // If the requested fragment size is less than this, it will be ignored. - minFragmentSize = 18 - // Messages are padded to a multiple of this number of bytes. - paddingGranularity = 256 - // The number of bytes in a Diffie-Hellman private value (320-bits). - dhPrivateBytes = 40 - // The number of bytes needed to represent an element of the DSA - // subgroup (160-bits). - dsaSubgroupBytes = 20 - // The number of bytes of the MAC that are sent on the wire (160-bits). - macPrefixBytes = 20 -) - -// These are the global, common group parameters for OTR. -var ( - p *big.Int // group prime - g *big.Int // group generator - q *big.Int // group order - pMinus2 *big.Int -) - -func init() { - p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF", 16) - q, _ = new(big.Int).SetString("7FFFFFFFFFFFFFFFE487ED5110B4611A62633145C06E0E68948127044533E63A0105DF531D89CD9128A5043CC71A026EF7CA8CD9E69D218D98158536F92F8A1BA7F09AB6B6A8E122F242DABB312F3F637A262174D31BF6B585FFAE5B7A035BF6F71C35FDAD44CFD2D74F9208BE258FF324943328F6722D9EE1003E5C50B1DF82CC6D241B0E2AE9CD348B1FD47E9267AFC1B2AE91EE51D6CB0E3179AB1042A95DCF6A9483B84B4B36B3861AA7255E4C0278BA36046511B993FFFFFFFFFFFFFFFF", 16) - g = new(big.Int).SetInt64(2) - pMinus2 = new(big.Int).Sub(p, g) -} - -// Conversation represents a relation with a peer. The zero value is a valid -// Conversation, although PrivateKey must be set. -// -// When communicating with a peer, all inbound messages should be passed to -// Conversation.Receive and all outbound messages to Conversation.Send. The -// Conversation will take care of maintaining the encryption state and -// negotiating encryption as needed. -type Conversation struct { - // PrivateKey contains the private key to use to sign key exchanges. - PrivateKey *PrivateKey - - // Rand can be set to override the entropy source. Otherwise, - // crypto/rand will be used. - Rand io.Reader - // If FragmentSize is set, all messages produced by Receive and Send - // will be fragmented into messages of, at most, this number of bytes. - FragmentSize int - - // Once Receive has returned NewKeys once, the following fields are - // valid. - SSID [8]byte - TheirPublicKey PublicKey - - state, authState int - - r [16]byte - x, y *big.Int - gx, gy *big.Int - gxBytes []byte - digest [sha256.Size]byte - - revealKeys, sigKeys akeKeys - - myKeyId uint32 - myCurrentDHPub *big.Int - myCurrentDHPriv *big.Int - myLastDHPub *big.Int - myLastDHPriv *big.Int - - theirKeyId uint32 - theirCurrentDHPub *big.Int - theirLastDHPub *big.Int - - keySlots [4]keySlot - - myCounter [8]byte - theirLastCtr [8]byte - oldMACs []byte - - k, n int // fragment state - frag []byte - - smp smpState -} - -// A keySlot contains key material for a specific (their keyid, my keyid) pair. -type keySlot struct { - // used is true if this slot is valid. If false, it's free for reuse. - used bool - theirKeyId uint32 - myKeyId uint32 - sendAESKey, recvAESKey []byte - sendMACKey, recvMACKey []byte - theirLastCtr [8]byte -} - -// akeKeys are generated during key exchange. There's one set for the reveal -// signature message and another for the signature message. In the protocol -// spec the latter are indicated with a prime mark. -type akeKeys struct { - c [16]byte - m1, m2 [32]byte -} - -func (c *Conversation) rand() io.Reader { - if c.Rand != nil { - return c.Rand - } - return rand.Reader -} - -func (c *Conversation) randMPI(buf []byte) *big.Int { - _, err := io.ReadFull(c.rand(), buf) - if err != nil { - panic("otr: short read from random source") - } - - return new(big.Int).SetBytes(buf) -} - -// tlv represents the type-length value from the protocol. -type tlv struct { - typ, length uint16 - data []byte -} - -const ( - tlvTypePadding = 0 - tlvTypeDisconnected = 1 - tlvTypeSMP1 = 2 - tlvTypeSMP2 = 3 - tlvTypeSMP3 = 4 - tlvTypeSMP4 = 5 - tlvTypeSMPAbort = 6 - tlvTypeSMP1WithQuestion = 7 -) - -// Receive handles a message from a peer. It returns a human readable message, -// an indicator of whether that message was encrypted, a hint about the -// encryption state and zero or more messages to send back to the peer. -// These messages do not need to be passed to Send before transmission. -func (c *Conversation) Receive(in []byte) (out []byte, encrypted bool, change SecurityChange, toSend [][]byte, err error) { - if bytes.HasPrefix(in, fragmentPrefix) { - in, err = c.processFragment(in) - if in == nil || err != nil { - return - } - } - - if bytes.HasPrefix(in, msgPrefix) && in[len(in)-1] == '.' { - in = in[len(msgPrefix) : len(in)-1] - } else if version := isQuery(in); version > 0 { - c.authState = authStateAwaitingDHKey - c.reset() - toSend = c.encode(c.generateDHCommit()) - return - } else { - // plaintext message - out = in - return - } - - msg := make([]byte, base64.StdEncoding.DecodedLen(len(in))) - msgLen, err := base64.StdEncoding.Decode(msg, in) - if err != nil { - err = errors.New("otr: invalid base64 encoding in message") - return - } - msg = msg[:msgLen] - - // The first two bytes are the protocol version (2) - if len(msg) < 3 || msg[0] != 0 || msg[1] != 2 { - err = errors.New("otr: invalid OTR message") - return - } - - msgType := int(msg[2]) - msg = msg[3:] - - switch msgType { - case msgTypeDHCommit: - switch c.authState { - case authStateNone: - c.authState = authStateAwaitingRevealSig - if err = c.processDHCommit(msg); err != nil { - return - } - c.reset() - toSend = c.encode(c.generateDHKey()) - return - case authStateAwaitingDHKey: - // This is a 'SYN-crossing'. The greater digest wins. - var cmp int - if cmp, err = c.compareToDHCommit(msg); err != nil { - return - } - if cmp > 0 { - // We win. Retransmit DH commit. - toSend = c.encode(c.serializeDHCommit()) - return - } else { - // They win. We forget about our DH commit. - c.authState = authStateAwaitingRevealSig - if err = c.processDHCommit(msg); err != nil { - return - } - c.reset() - toSend = c.encode(c.generateDHKey()) - return - } - case authStateAwaitingRevealSig: - if err = c.processDHCommit(msg); err != nil { - return - } - toSend = c.encode(c.serializeDHKey()) - case authStateAwaitingSig: - if err = c.processDHCommit(msg); err != nil { - return - } - c.reset() - toSend = c.encode(c.generateDHKey()) - c.authState = authStateAwaitingRevealSig - default: - panic("bad state") - } - case msgTypeDHKey: - switch c.authState { - case authStateAwaitingDHKey: - var isSame bool - if isSame, err = c.processDHKey(msg); err != nil { - return - } - if isSame { - err = errors.New("otr: unexpected duplicate DH key") - return - } - toSend = c.encode(c.generateRevealSig()) - c.authState = authStateAwaitingSig - case authStateAwaitingSig: - var isSame bool - if isSame, err = c.processDHKey(msg); err != nil { - return - } - if isSame { - toSend = c.encode(c.serializeDHKey()) - } - } - case msgTypeRevealSig: - if c.authState != authStateAwaitingRevealSig { - return - } - if err = c.processRevealSig(msg); err != nil { - return - } - toSend = c.encode(c.generateSig()) - c.authState = authStateNone - c.state = stateEncrypted - change = NewKeys - case msgTypeSig: - if c.authState != authStateAwaitingSig { - return - } - if err = c.processSig(msg); err != nil { - return - } - c.authState = authStateNone - c.state = stateEncrypted - change = NewKeys - case msgTypeData: - if c.state != stateEncrypted { - err = errors.New("otr: encrypted message received without encrypted session established") - return - } - var tlvs []tlv - out, tlvs, err = c.processData(msg) - encrypted = true - - EachTLV: - for _, inTLV := range tlvs { - switch inTLV.typ { - case tlvTypeDisconnected: - change = ConversationEnded - c.state = stateFinished - break EachTLV - case tlvTypeSMP1, tlvTypeSMP2, tlvTypeSMP3, tlvTypeSMP4, tlvTypeSMPAbort, tlvTypeSMP1WithQuestion: - var reply tlv - var complete bool - reply, complete, err = c.processSMP(inTLV) - if err == smpSecretMissingError { - err = nil - change = SMPSecretNeeded - c.smp.saved = &inTLV - return - } - if err == smpFailureError { - err = nil - change = SMPFailed - } else if complete { - change = SMPComplete - } - if reply.typ != 0 { - toSend = c.encode(c.generateData(nil, &reply)) - } - break EachTLV - default: - // skip unknown TLVs - } - } - default: - err = errors.New("otr: unknown message type " + strconv.Itoa(msgType)) - } - - return -} - -// Send takes a human readable message from the local user, possibly encrypts -// it and returns zero one or more messages to send to the peer. -func (c *Conversation) Send(msg []byte) ([][]byte, error) { - switch c.state { - case statePlaintext: - return [][]byte{msg}, nil - case stateEncrypted: - return c.encode(c.generateData(msg, nil)), nil - case stateFinished: - return nil, errors.New("otr: cannot send message because secure conversation has finished") - } - - return nil, errors.New("otr: cannot send message in current state") -} - -// SMPQuestion returns the human readable challenge question from the peer. -// It's only valid after Receive has returned SMPSecretNeeded. -func (c *Conversation) SMPQuestion() string { - return c.smp.question -} - -// Authenticate begins an authentication with the peer. Authentication involves -// an optional challenge message and a shared secret. The authentication -// proceeds until either Receive returns SMPComplete, SMPSecretNeeded (which -// indicates that a new authentication is happening and thus this one was -// aborted) or SMPFailed. -func (c *Conversation) Authenticate(question string, mutualSecret []byte) (toSend [][]byte, err error) { - if c.state != stateEncrypted { - err = errors.New("otr: can't authenticate a peer without a secure conversation established") - return - } - - if c.smp.saved != nil { - c.calcSMPSecret(mutualSecret, false /* they started it */) - - var out tlv - var complete bool - out, complete, err = c.processSMP(*c.smp.saved) - if complete { - panic("SMP completed on the first message") - } - c.smp.saved = nil - if out.typ != 0 { - toSend = c.encode(c.generateData(nil, &out)) - } - return - } - - c.calcSMPSecret(mutualSecret, true /* we started it */) - outs := c.startSMP(question) - for _, out := range outs { - toSend = append(toSend, c.encode(c.generateData(nil, &out))...) - } - return -} - -// End ends a secure conversation by generating a termination message for -// the peer and switches to unencrypted communication. -func (c *Conversation) End() (toSend [][]byte) { - switch c.state { - case statePlaintext: - return nil - case stateEncrypted: - c.state = statePlaintext - return c.encode(c.generateData(nil, &tlv{typ: tlvTypeDisconnected})) - case stateFinished: - c.state = statePlaintext - return nil - } - panic("unreachable") -} - -// IsEncrypted returns true if a message passed to Send would be encrypted -// before transmission. This result remains valid until the next call to -// Receive or End, which may change the state of the Conversation. -func (c *Conversation) IsEncrypted() bool { - return c.state == stateEncrypted -} - -var fragmentError = errors.New("otr: invalid OTR fragment") - -// processFragment processes a fragmented OTR message and possibly returns a -// complete message. Fragmented messages look like "?OTR,k,n,msg," where k is -// the fragment number (starting from 1), n is the number of fragments in this -// message and msg is a substring of the base64 encoded message. -func (c *Conversation) processFragment(in []byte) (out []byte, err error) { - in = in[len(fragmentPrefix):] // remove "?OTR," - parts := bytes.Split(in, fragmentPartSeparator) - if len(parts) != 4 || len(parts[3]) != 0 { - return nil, fragmentError - } - - k, err := strconv.Atoi(string(parts[0])) - if err != nil { - return nil, fragmentError - } - - n, err := strconv.Atoi(string(parts[1])) - if err != nil { - return nil, fragmentError - } - - if k < 1 || n < 1 || k > n { - return nil, fragmentError - } - - if k == 1 { - c.frag = append(c.frag[:0], parts[2]...) - c.k, c.n = k, n - } else if n == c.n && k == c.k+1 { - c.frag = append(c.frag, parts[2]...) - c.k++ - } else { - c.frag = c.frag[:0] - c.n, c.k = 0, 0 - } - - if c.n > 0 && c.k == c.n { - c.n, c.k = 0, 0 - return c.frag, nil - } - - return nil, nil -} - -func (c *Conversation) generateDHCommit() []byte { - _, err := io.ReadFull(c.rand(), c.r[:]) - if err != nil { - panic("otr: short read from random source") - } - - var xBytes [dhPrivateBytes]byte - c.x = c.randMPI(xBytes[:]) - c.gx = new(big.Int).Exp(g, c.x, p) - c.gy = nil - c.gxBytes = appendMPI(nil, c.gx) - - h := sha256.New() - h.Write(c.gxBytes) - h.Sum(c.digest[:0]) - - aesCipher, err := aes.NewCipher(c.r[:]) - if err != nil { - panic(err.Error()) - } - - var iv [aes.BlockSize]byte - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(c.gxBytes, c.gxBytes) - - return c.serializeDHCommit() -} - -func (c *Conversation) serializeDHCommit() []byte { - var ret []byte - ret = appendU16(ret, 2) // protocol version - ret = append(ret, msgTypeDHCommit) - ret = appendData(ret, c.gxBytes) - ret = appendData(ret, c.digest[:]) - return ret -} - -func (c *Conversation) processDHCommit(in []byte) error { - var ok1, ok2 bool - c.gxBytes, in, ok1 = getData(in) - digest, in, ok2 := getData(in) - if !ok1 || !ok2 || len(in) > 0 { - return errors.New("otr: corrupt DH commit message") - } - copy(c.digest[:], digest) - return nil -} - -func (c *Conversation) compareToDHCommit(in []byte) (int, error) { - _, in, ok1 := getData(in) - digest, in, ok2 := getData(in) - if !ok1 || !ok2 || len(in) > 0 { - return 0, errors.New("otr: corrupt DH commit message") - } - return bytes.Compare(c.digest[:], digest), nil -} - -func (c *Conversation) generateDHKey() []byte { - var yBytes [dhPrivateBytes]byte - c.y = c.randMPI(yBytes[:]) - c.gy = new(big.Int).Exp(g, c.y, p) - return c.serializeDHKey() -} - -func (c *Conversation) serializeDHKey() []byte { - var ret []byte - ret = appendU16(ret, 2) // protocol version - ret = append(ret, msgTypeDHKey) - ret = appendMPI(ret, c.gy) - return ret -} - -func (c *Conversation) processDHKey(in []byte) (isSame bool, err error) { - gy, in, ok := getMPI(in) - if !ok { - err = errors.New("otr: corrupt DH key message") - return - } - if gy.Cmp(g) < 0 || gy.Cmp(pMinus2) > 0 { - err = errors.New("otr: DH value out of range") - return - } - if c.gy != nil { - isSame = c.gy.Cmp(gy) == 0 - return - } - c.gy = gy - return -} - -func (c *Conversation) generateEncryptedSignature(keys *akeKeys, xFirst bool) ([]byte, []byte) { - var xb []byte - xb = c.PrivateKey.PublicKey.Serialize(xb) - - var verifyData []byte - if xFirst { - verifyData = appendMPI(verifyData, c.gx) - verifyData = appendMPI(verifyData, c.gy) - } else { - verifyData = appendMPI(verifyData, c.gy) - verifyData = appendMPI(verifyData, c.gx) - } - verifyData = append(verifyData, xb...) - verifyData = appendU32(verifyData, c.myKeyId) - - mac := hmac.New(sha256.New, keys.m1[:]) - mac.Write(verifyData) - mb := mac.Sum(nil) - - xb = appendU32(xb, c.myKeyId) - xb = append(xb, c.PrivateKey.Sign(c.rand(), mb)...) - - aesCipher, err := aes.NewCipher(keys.c[:]) - if err != nil { - panic(err.Error()) - } - var iv [aes.BlockSize]byte - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(xb, xb) - - mac = hmac.New(sha256.New, keys.m2[:]) - encryptedSig := appendData(nil, xb) - mac.Write(encryptedSig) - - return encryptedSig, mac.Sum(nil) -} - -func (c *Conversation) generateRevealSig() []byte { - s := new(big.Int).Exp(c.gy, c.x, p) - c.calcAKEKeys(s) - c.myKeyId++ - - encryptedSig, mac := c.generateEncryptedSignature(&c.revealKeys, true /* gx comes first */) - - c.myCurrentDHPub = c.gx - c.myCurrentDHPriv = c.x - c.rotateDHKeys() - incCounter(&c.myCounter) - - var ret []byte - ret = appendU16(ret, 2) - ret = append(ret, msgTypeRevealSig) - ret = appendData(ret, c.r[:]) - ret = append(ret, encryptedSig...) - ret = append(ret, mac[:20]...) - return ret -} - -func (c *Conversation) processEncryptedSig(encryptedSig, theirMAC []byte, keys *akeKeys, xFirst bool) error { - mac := hmac.New(sha256.New, keys.m2[:]) - mac.Write(appendData(nil, encryptedSig)) - myMAC := mac.Sum(nil)[:20] - - if len(myMAC) != len(theirMAC) || subtle.ConstantTimeCompare(myMAC, theirMAC) == 0 { - return errors.New("bad signature MAC in encrypted signature") - } - - aesCipher, err := aes.NewCipher(keys.c[:]) - if err != nil { - panic(err.Error()) - } - var iv [aes.BlockSize]byte - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(encryptedSig, encryptedSig) - - sig := encryptedSig - sig, ok1 := c.TheirPublicKey.Parse(sig) - keyId, sig, ok2 := getU32(sig) - if !ok1 || !ok2 { - return errors.New("otr: corrupt encrypted signature") - } - - var verifyData []byte - if xFirst { - verifyData = appendMPI(verifyData, c.gx) - verifyData = appendMPI(verifyData, c.gy) - } else { - verifyData = appendMPI(verifyData, c.gy) - verifyData = appendMPI(verifyData, c.gx) - } - verifyData = c.TheirPublicKey.Serialize(verifyData) - verifyData = appendU32(verifyData, keyId) - - mac = hmac.New(sha256.New, keys.m1[:]) - mac.Write(verifyData) - mb := mac.Sum(nil) - - sig, ok1 = c.TheirPublicKey.Verify(mb, sig) - if !ok1 { - return errors.New("bad signature in encrypted signature") - } - if len(sig) > 0 { - return errors.New("corrupt encrypted signature") - } - - c.theirKeyId = keyId - zero(c.theirLastCtr[:]) - return nil -} - -func (c *Conversation) processRevealSig(in []byte) error { - r, in, ok1 := getData(in) - encryptedSig, in, ok2 := getData(in) - theirMAC := in - if !ok1 || !ok2 || len(theirMAC) != 20 { - return errors.New("otr: corrupt reveal signature message") - } - - aesCipher, err := aes.NewCipher(r) - if err != nil { - return errors.New("otr: cannot create AES cipher from reveal signature message: " + err.Error()) - } - var iv [aes.BlockSize]byte - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(c.gxBytes, c.gxBytes) - h := sha256.New() - h.Write(c.gxBytes) - digest := h.Sum(nil) - if len(digest) != len(c.digest) || subtle.ConstantTimeCompare(digest, c.digest[:]) == 0 { - return errors.New("otr: bad commit MAC in reveal signature message") - } - var rest []byte - c.gx, rest, ok1 = getMPI(c.gxBytes) - if !ok1 || len(rest) > 0 { - return errors.New("otr: gx corrupt after decryption") - } - if c.gx.Cmp(g) < 0 || c.gx.Cmp(pMinus2) > 0 { - return errors.New("otr: DH value out of range") - } - s := new(big.Int).Exp(c.gx, c.y, p) - c.calcAKEKeys(s) - - if err := c.processEncryptedSig(encryptedSig, theirMAC, &c.revealKeys, true /* gx comes first */); err != nil { - return errors.New("otr: in reveal signature message: " + err.Error()) - } - - c.theirCurrentDHPub = c.gx - c.theirLastDHPub = nil - - return nil -} - -func (c *Conversation) generateSig() []byte { - c.myKeyId++ - - encryptedSig, mac := c.generateEncryptedSignature(&c.sigKeys, false /* gy comes first */) - - c.myCurrentDHPub = c.gy - c.myCurrentDHPriv = c.y - c.rotateDHKeys() - incCounter(&c.myCounter) - - var ret []byte - ret = appendU16(ret, 2) - ret = append(ret, msgTypeSig) - ret = append(ret, encryptedSig...) - ret = append(ret, mac[:macPrefixBytes]...) - return ret -} - -func (c *Conversation) processSig(in []byte) error { - encryptedSig, in, ok1 := getData(in) - theirMAC := in - if !ok1 || len(theirMAC) != macPrefixBytes { - return errors.New("otr: corrupt signature message") - } - - if err := c.processEncryptedSig(encryptedSig, theirMAC, &c.sigKeys, false /* gy comes first */); err != nil { - return errors.New("otr: in signature message: " + err.Error()) - } - - c.theirCurrentDHPub = c.gy - c.theirLastDHPub = nil - - return nil -} - -func (c *Conversation) rotateDHKeys() { - // evict slots using our retired key id - for i := range c.keySlots { - slot := &c.keySlots[i] - if slot.used && slot.myKeyId == c.myKeyId-1 { - slot.used = false - c.oldMACs = append(c.oldMACs, slot.recvMACKey...) - } - } - - c.myLastDHPriv = c.myCurrentDHPriv - c.myLastDHPub = c.myCurrentDHPub - - var xBytes [dhPrivateBytes]byte - c.myCurrentDHPriv = c.randMPI(xBytes[:]) - c.myCurrentDHPub = new(big.Int).Exp(g, c.myCurrentDHPriv, p) - c.myKeyId++ -} - -func (c *Conversation) processData(in []byte) (out []byte, tlvs []tlv, err error) { - origIn := in - flags, in, ok1 := getU8(in) - theirKeyId, in, ok2 := getU32(in) - myKeyId, in, ok3 := getU32(in) - y, in, ok4 := getMPI(in) - counter, in, ok5 := getNBytes(in, 8) - encrypted, in, ok6 := getData(in) - macedData := origIn[:len(origIn)-len(in)] - theirMAC, in, ok7 := getNBytes(in, macPrefixBytes) - _, in, ok8 := getData(in) - if !ok1 || !ok2 || !ok3 || !ok4 || !ok5 || !ok6 || !ok7 || !ok8 || len(in) > 0 { - err = errors.New("otr: corrupt data message") - return - } - - ignoreErrors := flags&1 != 0 - - slot, err := c.calcDataKeys(myKeyId, theirKeyId) - if err != nil { - if ignoreErrors { - err = nil - } - return - } - - mac := hmac.New(sha1.New, slot.recvMACKey) - mac.Write([]byte{0, 2, 3}) - mac.Write(macedData) - myMAC := mac.Sum(nil) - if len(myMAC) != len(theirMAC) || subtle.ConstantTimeCompare(myMAC, theirMAC) == 0 { - if !ignoreErrors { - err = errors.New("otr: bad MAC on data message") - } - return - } - - if bytes.Compare(counter, slot.theirLastCtr[:]) <= 0 { - err = errors.New("otr: counter regressed") - return - } - copy(slot.theirLastCtr[:], counter) - - var iv [aes.BlockSize]byte - copy(iv[:], counter) - aesCipher, err := aes.NewCipher(slot.recvAESKey) - if err != nil { - panic(err.Error()) - } - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(encrypted, encrypted) - decrypted := encrypted - - if myKeyId == c.myKeyId { - c.rotateDHKeys() - } - if theirKeyId == c.theirKeyId { - // evict slots using their retired key id - for i := range c.keySlots { - slot := &c.keySlots[i] - if slot.used && slot.theirKeyId == theirKeyId-1 { - slot.used = false - c.oldMACs = append(c.oldMACs, slot.recvMACKey...) - } - } - - c.theirLastDHPub = c.theirCurrentDHPub - c.theirKeyId++ - c.theirCurrentDHPub = y - } - - if nulPos := bytes.IndexByte(decrypted, 0); nulPos >= 0 { - out = decrypted[:nulPos] - tlvData := decrypted[nulPos+1:] - for len(tlvData) > 0 { - var t tlv - var ok1, ok2, ok3 bool - - t.typ, tlvData, ok1 = getU16(tlvData) - t.length, tlvData, ok2 = getU16(tlvData) - t.data, tlvData, ok3 = getNBytes(tlvData, int(t.length)) - if !ok1 || !ok2 || !ok3 { - err = errors.New("otr: corrupt tlv data") - return - } - tlvs = append(tlvs, t) - } - } else { - out = decrypted - } - - return -} - -func (c *Conversation) generateData(msg []byte, extra *tlv) []byte { - slot, err := c.calcDataKeys(c.myKeyId-1, c.theirKeyId) - if err != nil { - panic("otr: failed to generate sending keys: " + err.Error()) - } - - var plaintext []byte - plaintext = append(plaintext, msg...) - plaintext = append(plaintext, 0) - - padding := paddingGranularity - ((len(plaintext) + 4) % paddingGranularity) - plaintext = appendU16(plaintext, tlvTypePadding) - plaintext = appendU16(plaintext, uint16(padding)) - for i := 0; i < padding; i++ { - plaintext = append(plaintext, 0) - } - - if extra != nil { - plaintext = appendU16(plaintext, extra.typ) - plaintext = appendU16(plaintext, uint16(len(extra.data))) - plaintext = append(plaintext, extra.data...) - } - - encrypted := make([]byte, len(plaintext)) - - var iv [aes.BlockSize]byte - copy(iv[:], c.myCounter[:]) - aesCipher, err := aes.NewCipher(slot.sendAESKey) - if err != nil { - panic(err.Error()) - } - ctr := cipher.NewCTR(aesCipher, iv[:]) - ctr.XORKeyStream(encrypted, plaintext) - - var ret []byte - ret = appendU16(ret, 2) - ret = append(ret, msgTypeData) - ret = append(ret, 0 /* flags */) - ret = appendU32(ret, c.myKeyId-1) - ret = appendU32(ret, c.theirKeyId) - ret = appendMPI(ret, c.myCurrentDHPub) - ret = append(ret, c.myCounter[:]...) - ret = appendData(ret, encrypted) - - mac := hmac.New(sha1.New, slot.sendMACKey) - mac.Write(ret) - ret = append(ret, mac.Sum(nil)[:macPrefixBytes]...) - ret = appendData(ret, c.oldMACs) - c.oldMACs = nil - incCounter(&c.myCounter) - - return ret -} - -func incCounter(counter *[8]byte) { - for i := 7; i >= 0; i-- { - counter[i]++ - if counter[i] > 0 { - break - } - } -} - -// calcDataKeys computes the keys used to encrypt a data message given the key -// IDs. -func (c *Conversation) calcDataKeys(myKeyId, theirKeyId uint32) (slot *keySlot, err error) { - // Check for a cache hit. - for i := range c.keySlots { - slot = &c.keySlots[i] - if slot.used && slot.theirKeyId == theirKeyId && slot.myKeyId == myKeyId { - return - } - } - - // Find an empty slot to write into. - slot = nil - for i := range c.keySlots { - if !c.keySlots[i].used { - slot = &c.keySlots[i] - break - } - } - if slot == nil { - return nil, errors.New("otr: internal error: no more key slots") - } - - var myPriv, myPub, theirPub *big.Int - - if myKeyId == c.myKeyId { - myPriv = c.myCurrentDHPriv - myPub = c.myCurrentDHPub - } else if myKeyId == c.myKeyId-1 { - myPriv = c.myLastDHPriv - myPub = c.myLastDHPub - } else { - err = errors.New("otr: peer requested keyid " + strconv.FormatUint(uint64(myKeyId), 10) + " when I'm on " + strconv.FormatUint(uint64(c.myKeyId), 10)) - return - } - - if theirKeyId == c.theirKeyId { - theirPub = c.theirCurrentDHPub - } else if theirKeyId == c.theirKeyId-1 && c.theirLastDHPub != nil { - theirPub = c.theirLastDHPub - } else { - err = errors.New("otr: peer requested keyid " + strconv.FormatUint(uint64(myKeyId), 10) + " when they're on " + strconv.FormatUint(uint64(c.myKeyId), 10)) - return - } - - var sendPrefixByte, recvPrefixByte [1]byte - - if myPub.Cmp(theirPub) > 0 { - // we're the high end - sendPrefixByte[0], recvPrefixByte[0] = 1, 2 - } else { - // we're the low end - sendPrefixByte[0], recvPrefixByte[0] = 2, 1 - } - - s := new(big.Int).Exp(theirPub, myPriv, p) - sBytes := appendMPI(nil, s) - - h := sha1.New() - h.Write(sendPrefixByte[:]) - h.Write(sBytes) - slot.sendAESKey = h.Sum(slot.sendAESKey[:0])[:16] - - h.Reset() - h.Write(slot.sendAESKey) - slot.sendMACKey = h.Sum(slot.sendMACKey[:0]) - - h.Reset() - h.Write(recvPrefixByte[:]) - h.Write(sBytes) - slot.recvAESKey = h.Sum(slot.recvAESKey[:0])[:16] - - h.Reset() - h.Write(slot.recvAESKey) - slot.recvMACKey = h.Sum(slot.recvMACKey[:0]) - - slot.theirKeyId = theirKeyId - slot.myKeyId = myKeyId - slot.used = true - - zero(slot.theirLastCtr[:]) - return -} - -func (c *Conversation) calcAKEKeys(s *big.Int) { - mpi := appendMPI(nil, s) - h := sha256.New() - - var cBytes [32]byte - hashWithPrefix(c.SSID[:], 0, mpi, h) - - hashWithPrefix(cBytes[:], 1, mpi, h) - copy(c.revealKeys.c[:], cBytes[:16]) - copy(c.sigKeys.c[:], cBytes[16:]) - - hashWithPrefix(c.revealKeys.m1[:], 2, mpi, h) - hashWithPrefix(c.revealKeys.m2[:], 3, mpi, h) - hashWithPrefix(c.sigKeys.m1[:], 4, mpi, h) - hashWithPrefix(c.sigKeys.m2[:], 5, mpi, h) -} - -func hashWithPrefix(out []byte, prefix byte, in []byte, h hash.Hash) { - h.Reset() - var p [1]byte - p[0] = prefix - h.Write(p[:]) - h.Write(in) - if len(out) == h.Size() { - h.Sum(out[:0]) - } else { - digest := h.Sum(nil) - copy(out, digest) - } -} - -func (c *Conversation) encode(msg []byte) [][]byte { - b64 := make([]byte, base64.StdEncoding.EncodedLen(len(msg))+len(msgPrefix)+1) - base64.StdEncoding.Encode(b64[len(msgPrefix):], msg) - copy(b64, msgPrefix) - b64[len(b64)-1] = '.' - - if c.FragmentSize < minFragmentSize || len(b64) <= c.FragmentSize { - // We can encode this in a single fragment. - return [][]byte{b64} - } - - // We have to fragment this message. - var ret [][]byte - bytesPerFragment := c.FragmentSize - minFragmentSize - numFragments := (len(b64) + bytesPerFragment) / bytesPerFragment - - for i := 0; i < numFragments; i++ { - frag := []byte("?OTR," + strconv.Itoa(i+1) + "," + strconv.Itoa(numFragments) + ",") - todo := bytesPerFragment - if todo > len(b64) { - todo = len(b64) - } - frag = append(frag, b64[:todo]...) - b64 = b64[todo:] - frag = append(frag, ',') - ret = append(ret, frag) - } - - return ret -} - -func (c *Conversation) reset() { - c.myKeyId = 0 - - for i := range c.keySlots { - c.keySlots[i].used = false - } -} - -type PublicKey struct { - dsa.PublicKey -} - -func (pk *PublicKey) Parse(in []byte) ([]byte, bool) { - var ok bool - var pubKeyType uint16 - - if pubKeyType, in, ok = getU16(in); !ok || pubKeyType != 0 { - return nil, false - } - if pk.P, in, ok = getMPI(in); !ok { - return nil, false - } - if pk.Q, in, ok = getMPI(in); !ok { - return nil, false - } - if pk.G, in, ok = getMPI(in); !ok { - return nil, false - } - if pk.Y, in, ok = getMPI(in); !ok { - return nil, false - } - - return in, true -} - -func (pk *PublicKey) Serialize(in []byte) []byte { - in = appendU16(in, 0) - in = appendMPI(in, pk.P) - in = appendMPI(in, pk.Q) - in = appendMPI(in, pk.G) - in = appendMPI(in, pk.Y) - return in -} - -// Fingerprint returns the 20-byte, binary fingerprint of the PublicKey. -func (pk *PublicKey) Fingerprint() []byte { - b := pk.Serialize(nil) - h := sha1.New() - h.Write(b[2:]) - return h.Sum(nil) -} - -func (pk *PublicKey) Verify(hashed, sig []byte) ([]byte, bool) { - if len(sig) != 2*dsaSubgroupBytes { - return nil, false - } - r := new(big.Int).SetBytes(sig[:dsaSubgroupBytes]) - s := new(big.Int).SetBytes(sig[dsaSubgroupBytes:]) - ok := dsa.Verify(&pk.PublicKey, hashed, r, s) - return sig[dsaSubgroupBytes*2:], ok -} - -type PrivateKey struct { - PublicKey - dsa.PrivateKey -} - -func (priv *PrivateKey) Sign(rand io.Reader, hashed []byte) []byte { - r, s, err := dsa.Sign(rand, &priv.PrivateKey, hashed) - if err != nil { - panic(err.Error()) - } - rBytes := r.Bytes() - sBytes := s.Bytes() - if len(rBytes) > dsaSubgroupBytes || len(sBytes) > dsaSubgroupBytes { - panic("DSA signature too large") - } - - out := make([]byte, 2*dsaSubgroupBytes) - copy(out[dsaSubgroupBytes-len(rBytes):], rBytes) - copy(out[len(out)-len(sBytes):], sBytes) - return out -} - -func (priv *PrivateKey) Serialize(in []byte) []byte { - in = priv.PublicKey.Serialize(in) - in = appendMPI(in, priv.PrivateKey.X) - return in -} - -func (priv *PrivateKey) Parse(in []byte) ([]byte, bool) { - in, ok := priv.PublicKey.Parse(in) - if !ok { - return in, ok - } - priv.PrivateKey.PublicKey = priv.PublicKey.PublicKey - priv.PrivateKey.X, in, ok = getMPI(in) - return in, ok -} - -func (priv *PrivateKey) Generate(rand io.Reader) { - if err := dsa.GenerateParameters(&priv.PrivateKey.PublicKey.Parameters, rand, dsa.L1024N160); err != nil { - panic(err.Error()) - } - if err := dsa.GenerateKey(&priv.PrivateKey, rand); err != nil { - panic(err.Error()) - } - priv.PublicKey.PublicKey = priv.PrivateKey.PublicKey -} - -func notHex(r rune) bool { - if r >= '0' && r <= '9' || - r >= 'a' && r <= 'f' || - r >= 'A' && r <= 'F' { - return false - } - - return true -} - -// Import parses the contents of a libotr private key file. -func (priv *PrivateKey) Import(in []byte) bool { - mpiStart := []byte(" #") - - mpis := make([]*big.Int, 5) - - for i := 0; i < len(mpis); i++ { - start := bytes.Index(in, mpiStart) - if start == -1 { - return false - } - in = in[start+len(mpiStart):] - end := bytes.IndexFunc(in, notHex) - if end == -1 { - return false - } - hexBytes := in[:end] - in = in[end:] - - if len(hexBytes)&1 != 0 { - return false - } - - mpiBytes := make([]byte, len(hexBytes)/2) - if _, err := hex.Decode(mpiBytes, hexBytes); err != nil { - return false - } - - mpis[i] = new(big.Int).SetBytes(mpiBytes) - } - - for _, mpi := range mpis { - if mpi.Sign() <= 0 { - return false - } - } - - priv.PrivateKey.P = mpis[0] - priv.PrivateKey.Q = mpis[1] - priv.PrivateKey.G = mpis[2] - priv.PrivateKey.Y = mpis[3] - priv.PrivateKey.X = mpis[4] - priv.PublicKey.PublicKey = priv.PrivateKey.PublicKey - - a := new(big.Int).Exp(priv.PrivateKey.G, priv.PrivateKey.X, priv.PrivateKey.P) - return a.Cmp(priv.PrivateKey.Y) == 0 -} - -func getU8(in []byte) (uint8, []byte, bool) { - if len(in) < 1 { - return 0, in, false - } - return in[0], in[1:], true -} - -func getU16(in []byte) (uint16, []byte, bool) { - if len(in) < 2 { - return 0, in, false - } - r := uint16(in[0])<<8 | uint16(in[1]) - return r, in[2:], true -} - -func getU32(in []byte) (uint32, []byte, bool) { - if len(in) < 4 { - return 0, in, false - } - r := uint32(in[0])<<24 | uint32(in[1])<<16 | uint32(in[2])<<8 | uint32(in[3]) - return r, in[4:], true -} - -func getMPI(in []byte) (*big.Int, []byte, bool) { - l, in, ok := getU32(in) - if !ok || uint32(len(in)) < l { - return nil, in, false - } - r := new(big.Int).SetBytes(in[:l]) - return r, in[l:], true -} - -func getData(in []byte) ([]byte, []byte, bool) { - l, in, ok := getU32(in) - if !ok || uint32(len(in)) < l { - return nil, in, false - } - return in[:l], in[l:], true -} - -func getNBytes(in []byte, n int) ([]byte, []byte, bool) { - if len(in) < n { - return nil, in, false - } - return in[:n], in[n:], true -} - -func appendU16(out []byte, v uint16) []byte { - out = append(out, byte(v>>8), byte(v)) - return out -} - -func appendU32(out []byte, v uint32) []byte { - out = append(out, byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) - return out -} - -func appendData(out, v []byte) []byte { - out = appendU32(out, uint32(len(v))) - out = append(out, v...) - return out -} - -func appendMPI(out []byte, v *big.Int) []byte { - vBytes := v.Bytes() - out = appendU32(out, uint32(len(vBytes))) - out = append(out, vBytes...) - return out -} - -func appendMPIs(out []byte, mpis ...*big.Int) []byte { - for _, mpi := range mpis { - out = appendMPI(out, mpi) - } - return out -} - -func zero(b []byte) { - for i := range b { - b[i] = 0 - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr_test.go deleted file mode 100644 index cfcd062b27..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/otr_test.go +++ /dev/null @@ -1,470 +0,0 @@ -// Copyright 2012 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 otr - -import ( - "bufio" - "bytes" - "crypto/rand" - "encoding/hex" - "math/big" - "os" - "os/exec" - "testing" -) - -var isQueryTests = []struct { - msg string - expectedVersion int -}{ - {"foo", 0}, - {"?OtR", 0}, - {"?OtR?", 0}, - {"?OTR?", 0}, - {"?OTRv?", 0}, - {"?OTRv1?", 0}, - {"?OTR?v1?", 0}, - {"?OTR?v?", 0}, - {"?OTR?v2?", 2}, - {"?OTRv2?", 2}, - {"?OTRv23?", 2}, - {"?OTRv23 ?", 0}, -} - -func TestIsQuery(t *testing.T) { - for i, test := range isQueryTests { - version := isQuery([]byte(test.msg)) - if version != test.expectedVersion { - t.Errorf("#%d: got %d, want %d", i, version, test.expectedVersion) - } - } -} - -var alicePrivateKeyHex = "000000000080c81c2cb2eb729b7e6fd48e975a932c638b3a9055478583afa46755683e30102447f6da2d8bec9f386bbb5da6403b0040fee8650b6ab2d7f32c55ab017ae9b6aec8c324ab5844784e9a80e194830d548fb7f09a0410df2c4d5c8bc2b3e9ad484e65412be689cf0834694e0839fb2954021521ffdffb8f5c32c14dbf2020b3ce7500000014da4591d58def96de61aea7b04a8405fe1609308d000000808ddd5cb0b9d66956e3dea5a915d9aba9d8a6e7053b74dadb2fc52f9fe4e5bcc487d2305485ed95fed026ad93f06ebb8c9e8baf693b7887132c7ffdd3b0f72f4002ff4ed56583ca7c54458f8c068ca3e8a4dfa309d1dd5d34e2a4b68e6f4338835e5e0fb4317c9e4c7e4806dafda3ef459cd563775a586dd91b1319f72621bf3f00000080b8147e74d8c45e6318c37731b8b33b984a795b3653c2cd1d65cc99efe097cb7eb2fa49569bab5aab6e8a1c261a27d0f7840a5e80b317e6683042b59b6dceca2879c6ffc877a465be690c15e4a42f9a7588e79b10faac11b1ce3741fcef7aba8ce05327a2c16d279ee1b3d77eb783fb10e3356caa25635331e26dd42b8396c4d00000001420bec691fea37ecea58a5c717142f0b804452f57" - -var aliceFingerprintHex = "0bb01c360424522e94ee9c346ce877a1a4288b2f" - -var bobPrivateKeyHex = "000000000080a5138eb3d3eb9c1d85716faecadb718f87d31aaed1157671d7fee7e488f95e8e0ba60ad449ec732710a7dec5190f7182af2e2f98312d98497221dff160fd68033dd4f3a33b7c078d0d9f66e26847e76ca7447d4bab35486045090572863d9e4454777f24d6706f63e02548dfec2d0a620af37bbc1d24f884708a212c343b480d00000014e9c58f0ea21a5e4dfd9f44b6a9f7f6a9961a8fa9000000803c4d111aebd62d3c50c2889d420a32cdf1e98b70affcc1fcf44d59cca2eb019f6b774ef88153fb9b9615441a5fe25ea2d11b74ce922ca0232bd81b3c0fcac2a95b20cb6e6c0c5c1ace2e26f65dc43c751af0edbb10d669890e8ab6beea91410b8b2187af1a8347627a06ecea7e0f772c28aae9461301e83884860c9b656c722f0000008065af8625a555ea0e008cd04743671a3cda21162e83af045725db2eb2bb52712708dc0cc1a84c08b3649b88a966974bde27d8612c2861792ec9f08786a246fcadd6d8d3a81a32287745f309238f47618c2bd7612cb8b02d940571e0f30b96420bcd462ff542901b46109b1e5ad6423744448d20a57818a8cbb1647d0fea3b664e0000001440f9f2eb554cb00d45a5826b54bfa419b6980e48" - -func TestKeySerialization(t *testing.T) { - var priv PrivateKey - alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex) - rest, ok := priv.Parse(alicePrivateKey) - if !ok { - t.Error("failed to parse private key") - } - if len(rest) > 0 { - t.Error("data remaining after parsing private key") - } - - out := priv.Serialize(nil) - if !bytes.Equal(alicePrivateKey, out) { - t.Errorf("serialization (%x) is not equal to original (%x)", out, alicePrivateKey) - } - - aliceFingerprint, _ := hex.DecodeString(aliceFingerprintHex) - fingerprint := priv.PublicKey.Fingerprint() - if !bytes.Equal(aliceFingerprint, fingerprint) { - t.Errorf("fingerprint (%x) is not equal to expected value (%x)", fingerprint, aliceFingerprint) - } -} - -const libOTRPrivateKey = `(privkeys - (account -(name "foo@example.com") -(protocol prpl-jabber) -(private-key - (dsa - (p #00FC07ABCF0DC916AFF6E9AE47BEF60C7AB9B4D6B2469E436630E36F8A489BE812486A09F30B71224508654940A835301ACC525A4FF133FC152CC53DCC59D65C30A54F1993FE13FE63E5823D4C746DB21B90F9B9C00B49EC7404AB1D929BA7FBA12F2E45C6E0A651689750E8528AB8C031D3561FECEE72EBB4A090D450A9B7A857#) - (q #00997BD266EF7B1F60A5C23F3A741F2AEFD07A2081#) - (g #535E360E8A95EBA46A4F7DE50AD6E9B2A6DB785A66B64EB9F20338D2A3E8FB0E94725848F1AA6CC567CB83A1CC517EC806F2E92EAE71457E80B2210A189B91250779434B41FC8A8873F6DB94BEA7D177F5D59E7E114EE10A49CFD9CEF88AE43387023B672927BA74B04EB6BBB5E57597766A2F9CE3857D7ACE3E1E3BC1FC6F26#) - (y #0AC8670AD767D7A8D9D14CC1AC6744CD7D76F993B77FFD9E39DF01E5A6536EF65E775FCEF2A983E2A19BD6415500F6979715D9FD1257E1FE2B6F5E1E74B333079E7C880D39868462A93454B41877BE62E5EF0A041C2EE9C9E76BD1E12AE25D9628DECB097025DD625EF49C3258A1A3C0FF501E3DC673B76D7BABF349009B6ECF#) - (x #14D0345A3562C480A039E3C72764F72D79043216#) - ) - ) - ) -)` - -func TestParseLibOTRPrivateKey(t *testing.T) { - var priv PrivateKey - - if !priv.Import([]byte(libOTRPrivateKey)) { - t.Fatalf("Failed to import sample private key") - } -} - -func TestSignVerify(t *testing.T) { - var priv PrivateKey - alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex) - _, ok := priv.Parse(alicePrivateKey) - if !ok { - t.Error("failed to parse private key") - } - - var msg [32]byte - rand.Reader.Read(msg[:]) - - sig := priv.Sign(rand.Reader, msg[:]) - rest, ok := priv.PublicKey.Verify(msg[:], sig) - if !ok { - t.Errorf("signature (%x) of %x failed to verify", sig, msg[:]) - } else if len(rest) > 0 { - t.Error("signature data remains after verification") - } - - sig[10] ^= 80 - _, ok = priv.PublicKey.Verify(msg[:], sig) - if ok { - t.Errorf("corrupted signature (%x) of %x verified", sig, msg[:]) - } -} - -func setupConversation(t *testing.T) (alice, bob *Conversation) { - alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex) - bobPrivateKey, _ := hex.DecodeString(bobPrivateKeyHex) - - alice, bob = new(Conversation), new(Conversation) - - alice.PrivateKey = new(PrivateKey) - bob.PrivateKey = new(PrivateKey) - alice.PrivateKey.Parse(alicePrivateKey) - bob.PrivateKey.Parse(bobPrivateKey) - alice.FragmentSize = 100 - bob.FragmentSize = 100 - - if alice.IsEncrypted() { - t.Error("Alice believes that the conversation is secure before we've started") - } - if bob.IsEncrypted() { - t.Error("Bob believes that the conversation is secure before we've started") - } - - performHandshake(t, alice, bob) - return alice, bob -} - -func performHandshake(t *testing.T, alice, bob *Conversation) { - var alicesMessage, bobsMessage [][]byte - var out []byte - var aliceChange, bobChange SecurityChange - var err error - alicesMessage = append(alicesMessage, []byte(QueryMessage)) - - for round := 0; len(alicesMessage) > 0 || len(bobsMessage) > 0; round++ { - bobsMessage = nil - for i, msg := range alicesMessage { - out, _, bobChange, bobsMessage, err = bob.Receive(msg) - if len(out) > 0 { - t.Errorf("Bob generated output during key exchange, round %d, message %d", round, i) - } - if err != nil { - t.Fatalf("Bob returned an error, round %d, message %d (%x): %s", round, i, msg, err) - } - if len(bobsMessage) > 0 && i != len(alicesMessage)-1 { - t.Errorf("Bob produced output while processing a fragment, round %d, message %d", round, i) - } - } - - alicesMessage = nil - for i, msg := range bobsMessage { - out, _, aliceChange, alicesMessage, err = alice.Receive(msg) - if len(out) > 0 { - t.Errorf("Alice generated output during key exchange, round %d, message %d", round, i) - } - if err != nil { - t.Fatalf("Alice returned an error, round %d, message %d (%x): %s", round, i, msg, err) - } - if len(alicesMessage) > 0 && i != len(bobsMessage)-1 { - t.Errorf("Alice produced output while processing a fragment, round %d, message %d", round, i) - } - } - } - - if aliceChange != NewKeys { - t.Errorf("Alice terminated without signaling new keys") - } - if bobChange != NewKeys { - t.Errorf("Bob terminated without signaling new keys") - } - - if !bytes.Equal(alice.SSID[:], bob.SSID[:]) { - t.Errorf("Session identifiers don't match. Alice has %x, Bob has %x", alice.SSID[:], bob.SSID[:]) - } - - if !alice.IsEncrypted() { - t.Error("Alice doesn't believe that the conversation is secure") - } - if !bob.IsEncrypted() { - t.Error("Bob doesn't believe that the conversation is secure") - } -} - -const ( - firstRoundTrip = iota - subsequentRoundTrip - noMACKeyCheck -) - -func roundTrip(t *testing.T, alice, bob *Conversation, message []byte, macKeyCheck int) { - alicesMessage, err := alice.Send(message) - if err != nil { - t.Errorf("Error from Alice sending message: %s", err) - } - - if len(alice.oldMACs) != 0 { - t.Errorf("Alice has not revealed all MAC keys") - } - - for i, msg := range alicesMessage { - out, encrypted, _, _, err := bob.Receive(msg) - - if err != nil { - t.Errorf("Error generated while processing test message: %s", err.Error()) - } - if len(out) > 0 { - if i != len(alicesMessage)-1 { - t.Fatal("Bob produced a message while processing a fragment of Alice's") - } - if !encrypted { - t.Errorf("Message was not marked as encrypted") - } - if !bytes.Equal(out, message) { - t.Errorf("Message corrupted: got %x, want %x", out, message) - } - } - } - - switch macKeyCheck { - case firstRoundTrip: - if len(bob.oldMACs) != 0 { - t.Errorf("Bob should not have MAC keys to reveal") - } - case subsequentRoundTrip: - if len(bob.oldMACs) != 40 { - t.Errorf("Bob has %d bytes of MAC keys to reveal, but should have 40", len(bob.oldMACs)) - } - } - - bobsMessage, err := bob.Send(message) - if err != nil { - t.Errorf("Error from Bob sending message: %s", err) - } - - if len(bob.oldMACs) != 0 { - t.Errorf("Bob has not revealed all MAC keys") - } - - for i, msg := range bobsMessage { - out, encrypted, _, _, err := alice.Receive(msg) - - if err != nil { - t.Errorf("Error generated while processing test message: %s", err.Error()) - } - if len(out) > 0 { - if i != len(bobsMessage)-1 { - t.Fatal("Alice produced a message while processing a fragment of Bob's") - } - if !encrypted { - t.Errorf("Message was not marked as encrypted") - } - if !bytes.Equal(out, message) { - t.Errorf("Message corrupted: got %x, want %x", out, message) - } - } - } - - switch macKeyCheck { - case firstRoundTrip: - if len(alice.oldMACs) != 20 { - t.Errorf("Alice has %d bytes of MAC keys to reveal, but should have 20", len(alice.oldMACs)) - } - case subsequentRoundTrip: - if len(alice.oldMACs) != 40 { - t.Errorf("Alice has %d bytes of MAC keys to reveal, but should have 40", len(alice.oldMACs)) - } - } -} - -func TestConversation(t *testing.T) { - alice, bob := setupConversation(t) - - var testMessages = [][]byte{ - []byte("hello"), []byte("bye"), - } - - roundTripType := firstRoundTrip - - for _, testMessage := range testMessages { - roundTrip(t, alice, bob, testMessage, roundTripType) - roundTripType = subsequentRoundTrip - } -} - -func TestGoodSMP(t *testing.T) { - var alice, bob Conversation - - alice.smp.secret = new(big.Int).SetInt64(42) - bob.smp.secret = alice.smp.secret - - var alicesMessages, bobsMessages []tlv - var aliceComplete, bobComplete bool - var err error - var out tlv - - alicesMessages = alice.startSMP("") - for round := 0; len(alicesMessages) > 0 || len(bobsMessages) > 0; round++ { - bobsMessages = bobsMessages[:0] - for i, msg := range alicesMessages { - out, bobComplete, err = bob.processSMP(msg) - if err != nil { - t.Errorf("Error from Bob in round %d: %s", round, err) - } - if bobComplete && i != len(alicesMessages)-1 { - t.Errorf("Bob returned a completed signal before processing all of Alice's messages in round %d", round) - } - if out.typ != 0 { - bobsMessages = append(bobsMessages, out) - } - } - - alicesMessages = alicesMessages[:0] - for i, msg := range bobsMessages { - out, aliceComplete, err = alice.processSMP(msg) - if err != nil { - t.Errorf("Error from Alice in round %d: %s", round, err) - } - if aliceComplete && i != len(bobsMessages)-1 { - t.Errorf("Alice returned a completed signal before processing all of Bob's messages in round %d", round) - } - if out.typ != 0 { - alicesMessages = append(alicesMessages, out) - } - } - } - - if !aliceComplete || !bobComplete { - t.Errorf("SMP completed without both sides reporting success: alice: %v, bob: %v\n", aliceComplete, bobComplete) - } -} - -func TestBadSMP(t *testing.T) { - var alice, bob Conversation - - alice.smp.secret = new(big.Int).SetInt64(42) - bob.smp.secret = new(big.Int).SetInt64(43) - - var alicesMessages, bobsMessages []tlv - - alicesMessages = alice.startSMP("") - for round := 0; len(alicesMessages) > 0 || len(bobsMessages) > 0; round++ { - bobsMessages = bobsMessages[:0] - for _, msg := range alicesMessages { - out, complete, _ := bob.processSMP(msg) - if complete { - t.Errorf("Bob signaled completion in round %d", round) - } - if out.typ != 0 { - bobsMessages = append(bobsMessages, out) - } - } - - alicesMessages = alicesMessages[:0] - for _, msg := range bobsMessages { - out, complete, _ := alice.processSMP(msg) - if complete { - t.Errorf("Alice signaled completion in round %d", round) - } - if out.typ != 0 { - alicesMessages = append(alicesMessages, out) - } - } - } -} - -func TestRehandshaking(t *testing.T) { - alice, bob := setupConversation(t) - roundTrip(t, alice, bob, []byte("test"), firstRoundTrip) - roundTrip(t, alice, bob, []byte("test 2"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 3"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 4"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 5"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 6"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 7"), subsequentRoundTrip) - roundTrip(t, alice, bob, []byte("test 8"), subsequentRoundTrip) - performHandshake(t, alice, bob) - roundTrip(t, alice, bob, []byte("test"), noMACKeyCheck) - roundTrip(t, alice, bob, []byte("test 2"), noMACKeyCheck) -} - -func TestAgainstLibOTR(t *testing.T) { - // This test requires otr.c.test to be built as /tmp/a.out. - // If enabled, this tests runs forever performing OTR handshakes in a - // loop. - return - - alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex) - var alice Conversation - alice.PrivateKey = new(PrivateKey) - alice.PrivateKey.Parse(alicePrivateKey) - - cmd := exec.Command("/tmp/a.out") - cmd.Stderr = os.Stderr - - out, err := cmd.StdinPipe() - if err != nil { - t.Fatal(err) - } - defer out.Close() - stdout, err := cmd.StdoutPipe() - if err != nil { - t.Fatal(err) - } - in := bufio.NewReader(stdout) - - if err := cmd.Start(); err != nil { - t.Fatal(err) - } - - out.Write([]byte(QueryMessage)) - out.Write([]byte("\n")) - var expectedText = []byte("test message") - - for { - line, isPrefix, err := in.ReadLine() - if isPrefix { - t.Fatal("line from subprocess too long") - } - if err != nil { - t.Fatal(err) - } - text, encrypted, change, alicesMessage, err := alice.Receive(line) - if err != nil { - t.Fatal(err) - } - for _, msg := range alicesMessage { - out.Write(msg) - out.Write([]byte("\n")) - } - if change == NewKeys { - alicesMessage, err := alice.Send([]byte("Go -> libotr test message")) - if err != nil { - t.Fatalf("error sending message: %s", err.Error()) - } else { - for _, msg := range alicesMessage { - out.Write(msg) - out.Write([]byte("\n")) - } - } - } - if len(text) > 0 { - if !bytes.Equal(text, expectedText) { - t.Fatalf("expected %x, but got %x", expectedText, text) - } - if !encrypted { - t.Fatal("message wasn't encrypted") - } - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/smp.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/smp.go deleted file mode 100644 index dc6de4ee0e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/otr/smp.go +++ /dev/null @@ -1,572 +0,0 @@ -// Copyright 2012 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. - -// This file implements the Socialist Millionaires Protocol as described in -// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html. The protocol -// specification is required in order to understand this code and, where -// possible, the variable names in the code match up with the spec. - -package otr - -import ( - "bytes" - "crypto/sha256" - "errors" - "hash" - "math/big" -) - -type smpFailure string - -func (s smpFailure) Error() string { - return string(s) -} - -var smpFailureError = smpFailure("otr: SMP protocol failed") -var smpSecretMissingError = smpFailure("otr: mutual secret needed") - -const smpVersion = 1 - -const ( - smpState1 = iota - smpState2 - smpState3 - smpState4 -) - -type smpState struct { - state int - a2, a3, b2, b3, pb, qb *big.Int - g2a, g3a *big.Int - g2, g3 *big.Int - g3b, papb, qaqb, ra *big.Int - saved *tlv - secret *big.Int - question string -} - -func (c *Conversation) startSMP(question string) (tlvs []tlv) { - if c.smp.state != smpState1 { - tlvs = append(tlvs, c.generateSMPAbort()) - } - tlvs = append(tlvs, c.generateSMP1(question)) - c.smp.question = "" - c.smp.state = smpState2 - return -} - -func (c *Conversation) resetSMP() { - c.smp.state = smpState1 - c.smp.secret = nil - c.smp.question = "" -} - -func (c *Conversation) processSMP(in tlv) (out tlv, complete bool, err error) { - data := in.data - - switch in.typ { - case tlvTypeSMPAbort: - if c.smp.state != smpState1 { - err = smpFailureError - } - c.resetSMP() - return - case tlvTypeSMP1WithQuestion: - // We preprocess this into a SMP1 message. - nulPos := bytes.IndexByte(data, 0) - if nulPos == -1 { - err = errors.New("otr: SMP message with question didn't contain a NUL byte") - return - } - c.smp.question = string(data[:nulPos]) - data = data[nulPos+1:] - } - - numMPIs, data, ok := getU32(data) - if !ok || numMPIs > 20 { - err = errors.New("otr: corrupt SMP message") - return - } - - mpis := make([]*big.Int, numMPIs) - for i := range mpis { - var ok bool - mpis[i], data, ok = getMPI(data) - if !ok { - err = errors.New("otr: corrupt SMP message") - return - } - } - - switch in.typ { - case tlvTypeSMP1, tlvTypeSMP1WithQuestion: - if c.smp.state != smpState1 { - c.resetSMP() - out = c.generateSMPAbort() - return - } - if c.smp.secret == nil { - err = smpSecretMissingError - return - } - if err = c.processSMP1(mpis); err != nil { - return - } - c.smp.state = smpState3 - out = c.generateSMP2() - case tlvTypeSMP2: - if c.smp.state != smpState2 { - c.resetSMP() - out = c.generateSMPAbort() - return - } - if out, err = c.processSMP2(mpis); err != nil { - out = c.generateSMPAbort() - return - } - c.smp.state = smpState4 - case tlvTypeSMP3: - if c.smp.state != smpState3 { - c.resetSMP() - out = c.generateSMPAbort() - return - } - if out, err = c.processSMP3(mpis); err != nil { - return - } - c.smp.state = smpState1 - c.smp.secret = nil - complete = true - case tlvTypeSMP4: - if c.smp.state != smpState4 { - c.resetSMP() - out = c.generateSMPAbort() - return - } - if err = c.processSMP4(mpis); err != nil { - out = c.generateSMPAbort() - return - } - c.smp.state = smpState1 - c.smp.secret = nil - complete = true - default: - panic("unknown SMP message") - } - - return -} - -func (c *Conversation) calcSMPSecret(mutualSecret []byte, weStarted bool) { - h := sha256.New() - h.Write([]byte{smpVersion}) - if weStarted { - h.Write(c.PrivateKey.PublicKey.Fingerprint()) - h.Write(c.TheirPublicKey.Fingerprint()) - } else { - h.Write(c.TheirPublicKey.Fingerprint()) - h.Write(c.PrivateKey.PublicKey.Fingerprint()) - } - h.Write(c.SSID[:]) - h.Write(mutualSecret) - c.smp.secret = new(big.Int).SetBytes(h.Sum(nil)) -} - -func (c *Conversation) generateSMP1(question string) tlv { - var randBuf [16]byte - c.smp.a2 = c.randMPI(randBuf[:]) - c.smp.a3 = c.randMPI(randBuf[:]) - g2a := new(big.Int).Exp(g, c.smp.a2, p) - g3a := new(big.Int).Exp(g, c.smp.a3, p) - h := sha256.New() - - r2 := c.randMPI(randBuf[:]) - r := new(big.Int).Exp(g, r2, p) - c2 := new(big.Int).SetBytes(hashMPIs(h, 1, r)) - d2 := new(big.Int).Mul(c.smp.a2, c2) - d2.Sub(r2, d2) - d2.Mod(d2, q) - if d2.Sign() < 0 { - d2.Add(d2, q) - } - - r3 := c.randMPI(randBuf[:]) - r.Exp(g, r3, p) - c3 := new(big.Int).SetBytes(hashMPIs(h, 2, r)) - d3 := new(big.Int).Mul(c.smp.a3, c3) - d3.Sub(r3, d3) - d3.Mod(d3, q) - if d3.Sign() < 0 { - d3.Add(d3, q) - } - - var ret tlv - if len(question) > 0 { - ret.typ = tlvTypeSMP1WithQuestion - ret.data = append(ret.data, question...) - ret.data = append(ret.data, 0) - } else { - ret.typ = tlvTypeSMP1 - } - ret.data = appendU32(ret.data, 6) - ret.data = appendMPIs(ret.data, g2a, c2, d2, g3a, c3, d3) - return ret -} - -func (c *Conversation) processSMP1(mpis []*big.Int) error { - if len(mpis) != 6 { - return errors.New("otr: incorrect number of arguments in SMP1 message") - } - g2a := mpis[0] - c2 := mpis[1] - d2 := mpis[2] - g3a := mpis[3] - c3 := mpis[4] - d3 := mpis[5] - h := sha256.New() - - r := new(big.Int).Exp(g, d2, p) - s := new(big.Int).Exp(g2a, c2, p) - r.Mul(r, s) - r.Mod(r, p) - t := new(big.Int).SetBytes(hashMPIs(h, 1, r)) - if c2.Cmp(t) != 0 { - return errors.New("otr: ZKP c2 incorrect in SMP1 message") - } - r.Exp(g, d3, p) - s.Exp(g3a, c3, p) - r.Mul(r, s) - r.Mod(r, p) - t.SetBytes(hashMPIs(h, 2, r)) - if c3.Cmp(t) != 0 { - return errors.New("otr: ZKP c3 incorrect in SMP1 message") - } - - c.smp.g2a = g2a - c.smp.g3a = g3a - return nil -} - -func (c *Conversation) generateSMP2() tlv { - var randBuf [16]byte - b2 := c.randMPI(randBuf[:]) - c.smp.b3 = c.randMPI(randBuf[:]) - r2 := c.randMPI(randBuf[:]) - r3 := c.randMPI(randBuf[:]) - r4 := c.randMPI(randBuf[:]) - r5 := c.randMPI(randBuf[:]) - r6 := c.randMPI(randBuf[:]) - - g2b := new(big.Int).Exp(g, b2, p) - g3b := new(big.Int).Exp(g, c.smp.b3, p) - - r := new(big.Int).Exp(g, r2, p) - h := sha256.New() - c2 := new(big.Int).SetBytes(hashMPIs(h, 3, r)) - d2 := new(big.Int).Mul(b2, c2) - d2.Sub(r2, d2) - d2.Mod(d2, q) - if d2.Sign() < 0 { - d2.Add(d2, q) - } - - r.Exp(g, r3, p) - c3 := new(big.Int).SetBytes(hashMPIs(h, 4, r)) - d3 := new(big.Int).Mul(c.smp.b3, c3) - d3.Sub(r3, d3) - d3.Mod(d3, q) - if d3.Sign() < 0 { - d3.Add(d3, q) - } - - c.smp.g2 = new(big.Int).Exp(c.smp.g2a, b2, p) - c.smp.g3 = new(big.Int).Exp(c.smp.g3a, c.smp.b3, p) - c.smp.pb = new(big.Int).Exp(c.smp.g3, r4, p) - c.smp.qb = new(big.Int).Exp(g, r4, p) - r.Exp(c.smp.g2, c.smp.secret, p) - c.smp.qb.Mul(c.smp.qb, r) - c.smp.qb.Mod(c.smp.qb, p) - - s := new(big.Int) - s.Exp(c.smp.g2, r6, p) - r.Exp(g, r5, p) - s.Mul(r, s) - s.Mod(s, p) - r.Exp(c.smp.g3, r5, p) - cp := new(big.Int).SetBytes(hashMPIs(h, 5, r, s)) - - // D5 = r5 - r4 cP mod q and D6 = r6 - y cP mod q - - s.Mul(r4, cp) - r.Sub(r5, s) - d5 := new(big.Int).Mod(r, q) - if d5.Sign() < 0 { - d5.Add(d5, q) - } - - s.Mul(c.smp.secret, cp) - r.Sub(r6, s) - d6 := new(big.Int).Mod(r, q) - if d6.Sign() < 0 { - d6.Add(d6, q) - } - - var ret tlv - ret.typ = tlvTypeSMP2 - ret.data = appendU32(ret.data, 11) - ret.data = appendMPIs(ret.data, g2b, c2, d2, g3b, c3, d3, c.smp.pb, c.smp.qb, cp, d5, d6) - return ret -} - -func (c *Conversation) processSMP2(mpis []*big.Int) (out tlv, err error) { - if len(mpis) != 11 { - err = errors.New("otr: incorrect number of arguments in SMP2 message") - return - } - g2b := mpis[0] - c2 := mpis[1] - d2 := mpis[2] - g3b := mpis[3] - c3 := mpis[4] - d3 := mpis[5] - pb := mpis[6] - qb := mpis[7] - cp := mpis[8] - d5 := mpis[9] - d6 := mpis[10] - h := sha256.New() - - r := new(big.Int).Exp(g, d2, p) - s := new(big.Int).Exp(g2b, c2, p) - r.Mul(r, s) - r.Mod(r, p) - s.SetBytes(hashMPIs(h, 3, r)) - if c2.Cmp(s) != 0 { - err = errors.New("otr: ZKP c2 failed in SMP2 message") - return - } - - r.Exp(g, d3, p) - s.Exp(g3b, c3, p) - r.Mul(r, s) - r.Mod(r, p) - s.SetBytes(hashMPIs(h, 4, r)) - if c3.Cmp(s) != 0 { - err = errors.New("otr: ZKP c3 failed in SMP2 message") - return - } - - c.smp.g2 = new(big.Int).Exp(g2b, c.smp.a2, p) - c.smp.g3 = new(big.Int).Exp(g3b, c.smp.a3, p) - - r.Exp(g, d5, p) - s.Exp(c.smp.g2, d6, p) - r.Mul(r, s) - s.Exp(qb, cp, p) - r.Mul(r, s) - r.Mod(r, p) - - s.Exp(c.smp.g3, d5, p) - t := new(big.Int).Exp(pb, cp, p) - s.Mul(s, t) - s.Mod(s, p) - t.SetBytes(hashMPIs(h, 5, s, r)) - if cp.Cmp(t) != 0 { - err = errors.New("otr: ZKP cP failed in SMP2 message") - return - } - - var randBuf [16]byte - r4 := c.randMPI(randBuf[:]) - r5 := c.randMPI(randBuf[:]) - r6 := c.randMPI(randBuf[:]) - r7 := c.randMPI(randBuf[:]) - - pa := new(big.Int).Exp(c.smp.g3, r4, p) - r.Exp(c.smp.g2, c.smp.secret, p) - qa := new(big.Int).Exp(g, r4, p) - qa.Mul(qa, r) - qa.Mod(qa, p) - - r.Exp(g, r5, p) - s.Exp(c.smp.g2, r6, p) - r.Mul(r, s) - r.Mod(r, p) - - s.Exp(c.smp.g3, r5, p) - cp.SetBytes(hashMPIs(h, 6, s, r)) - - r.Mul(r4, cp) - d5 = new(big.Int).Sub(r5, r) - d5.Mod(d5, q) - if d5.Sign() < 0 { - d5.Add(d5, q) - } - - r.Mul(c.smp.secret, cp) - d6 = new(big.Int).Sub(r6, r) - d6.Mod(d6, q) - if d6.Sign() < 0 { - d6.Add(d6, q) - } - - r.ModInverse(qb, p) - qaqb := new(big.Int).Mul(qa, r) - qaqb.Mod(qaqb, p) - - ra := new(big.Int).Exp(qaqb, c.smp.a3, p) - r.Exp(qaqb, r7, p) - s.Exp(g, r7, p) - cr := new(big.Int).SetBytes(hashMPIs(h, 7, s, r)) - - r.Mul(c.smp.a3, cr) - d7 := new(big.Int).Sub(r7, r) - d7.Mod(d7, q) - if d7.Sign() < 0 { - d7.Add(d7, q) - } - - c.smp.g3b = g3b - c.smp.qaqb = qaqb - - r.ModInverse(pb, p) - c.smp.papb = new(big.Int).Mul(pa, r) - c.smp.papb.Mod(c.smp.papb, p) - c.smp.ra = ra - - out.typ = tlvTypeSMP3 - out.data = appendU32(out.data, 8) - out.data = appendMPIs(out.data, pa, qa, cp, d5, d6, ra, cr, d7) - return -} - -func (c *Conversation) processSMP3(mpis []*big.Int) (out tlv, err error) { - if len(mpis) != 8 { - err = errors.New("otr: incorrect number of arguments in SMP3 message") - return - } - pa := mpis[0] - qa := mpis[1] - cp := mpis[2] - d5 := mpis[3] - d6 := mpis[4] - ra := mpis[5] - cr := mpis[6] - d7 := mpis[7] - h := sha256.New() - - r := new(big.Int).Exp(g, d5, p) - s := new(big.Int).Exp(c.smp.g2, d6, p) - r.Mul(r, s) - s.Exp(qa, cp, p) - r.Mul(r, s) - r.Mod(r, p) - - s.Exp(c.smp.g3, d5, p) - t := new(big.Int).Exp(pa, cp, p) - s.Mul(s, t) - s.Mod(s, p) - t.SetBytes(hashMPIs(h, 6, s, r)) - if t.Cmp(cp) != 0 { - err = errors.New("otr: ZKP cP failed in SMP3 message") - return - } - - r.ModInverse(c.smp.qb, p) - qaqb := new(big.Int).Mul(qa, r) - qaqb.Mod(qaqb, p) - - r.Exp(qaqb, d7, p) - s.Exp(ra, cr, p) - r.Mul(r, s) - r.Mod(r, p) - - s.Exp(g, d7, p) - t.Exp(c.smp.g3a, cr, p) - s.Mul(s, t) - s.Mod(s, p) - t.SetBytes(hashMPIs(h, 7, s, r)) - if t.Cmp(cr) != 0 { - err = errors.New("otr: ZKP cR failed in SMP3 message") - return - } - - var randBuf [16]byte - r7 := c.randMPI(randBuf[:]) - rb := new(big.Int).Exp(qaqb, c.smp.b3, p) - - r.Exp(qaqb, r7, p) - s.Exp(g, r7, p) - cr = new(big.Int).SetBytes(hashMPIs(h, 8, s, r)) - - r.Mul(c.smp.b3, cr) - d7 = new(big.Int).Sub(r7, r) - d7.Mod(d7, q) - if d7.Sign() < 0 { - d7.Add(d7, q) - } - - out.typ = tlvTypeSMP4 - out.data = appendU32(out.data, 3) - out.data = appendMPIs(out.data, rb, cr, d7) - - r.ModInverse(c.smp.pb, p) - r.Mul(pa, r) - r.Mod(r, p) - s.Exp(ra, c.smp.b3, p) - if r.Cmp(s) != 0 { - err = smpFailureError - } - - return -} - -func (c *Conversation) processSMP4(mpis []*big.Int) error { - if len(mpis) != 3 { - return errors.New("otr: incorrect number of arguments in SMP4 message") - } - rb := mpis[0] - cr := mpis[1] - d7 := mpis[2] - h := sha256.New() - - r := new(big.Int).Exp(c.smp.qaqb, d7, p) - s := new(big.Int).Exp(rb, cr, p) - r.Mul(r, s) - r.Mod(r, p) - - s.Exp(g, d7, p) - t := new(big.Int).Exp(c.smp.g3b, cr, p) - s.Mul(s, t) - s.Mod(s, p) - t.SetBytes(hashMPIs(h, 8, s, r)) - if t.Cmp(cr) != 0 { - return errors.New("otr: ZKP cR failed in SMP4 message") - } - - r.Exp(rb, c.smp.a3, p) - if r.Cmp(c.smp.papb) != 0 { - return smpFailureError - } - - return nil -} - -func (c *Conversation) generateSMPAbort() tlv { - return tlv{typ: tlvTypeSMPAbort} -} - -func hashMPIs(h hash.Hash, magic byte, mpis ...*big.Int) []byte { - if h != nil { - h.Reset() - } else { - h = sha256.New() - } - - h.Write([]byte{magic}) - for _, mpi := range mpis { - h.Write(appendMPI(nil, mpi)) - } - return h.Sum(nil) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/package.json b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/package.json deleted file mode 100644 index 586d05d730..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "author": "golang", - "bugs": {}, - "gx": { - "dvcsimport": "golang.org/x/crypto" - }, - "gxDependencies": [ - { - "author": "The Go Authors", - "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", - "name": "sys", - "version": "0.2.0" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "BSD-3-Clause", - "name": "go-crypto", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.1" -} - diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2.go deleted file mode 100644 index c02b4d5a70..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2012 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 pbkdf2 implements the key derivation function PBKDF2 as defined in RFC -2898 / PKCS #5 v2.0. - -A key derivation function is useful when encrypting data based on a password -or any other not-fully-random data. It uses a pseudorandom function to derive -a secure encryption key based on the password. - -While v2.0 of the standard defines only one pseudorandom function to use, -HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved -Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To -choose, you can pass the `New` functions from the different SHA packages to -pbkdf2.Key. -*/ -package pbkdf2 - -import ( - "crypto/hmac" - "hash" -) - -// Key derives a key from the password, salt and iteration count, returning a -// []byte of length keylen that can be used as cryptographic key. The key is -// derived based on the method described as PBKDF2 with the HMAC variant using -// the supplied hash function. -// -// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you -// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by -// doing: -// -// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) -// -// Remember to get a good random salt. At least 8 bytes is recommended by the -// RFC. -// -// Using a higher iteration count will increase the cost of an exhaustive -// search but will also make derivation proportionally slower. -func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { - prf := hmac.New(h, password) - hashLen := prf.Size() - numBlocks := (keyLen + hashLen - 1) / hashLen - - var buf [4]byte - dk := make([]byte, 0, numBlocks*hashLen) - U := make([]byte, hashLen) - for block := 1; block <= numBlocks; block++ { - // N.B.: || means concatenation, ^ means XOR - // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter - // U_1 = PRF(password, salt || uint(i)) - prf.Reset() - prf.Write(salt) - buf[0] = byte(block >> 24) - buf[1] = byte(block >> 16) - buf[2] = byte(block >> 8) - buf[3] = byte(block) - prf.Write(buf[:4]) - dk = prf.Sum(dk) - T := dk[len(dk)-hashLen:] - copy(U, T) - - // U_n = PRF(password, U_(n-1)) - for n := 2; n <= iter; n++ { - prf.Reset() - prf.Write(U) - U = U[:0] - U = prf.Sum(U) - for x := range U { - T[x] ^= U[x] - } - } - } - return dk[:keyLen] -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2_test.go deleted file mode 100644 index f83cb69227..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2/pbkdf2_test.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2012 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 pbkdf2 - -import ( - "bytes" - "crypto/sha1" - "crypto/sha256" - "hash" - "testing" -) - -type testVector struct { - password string - salt string - iter int - output []byte -} - -// Test vectors from RFC 6070, http://tools.ietf.org/html/rfc6070 -var sha1TestVectors = []testVector{ - { - "password", - "salt", - 1, - []byte{ - 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71, - 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06, - 0x2f, 0xe0, 0x37, 0xa6, - }, - }, - { - "password", - "salt", - 2, - []byte{ - 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, - 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0, - 0xd8, 0xde, 0x89, 0x57, - }, - }, - { - "password", - "salt", - 4096, - []byte{ - 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, - 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, - 0x65, 0xa4, 0x29, 0xc1, - }, - }, - // // This one takes too long - // { - // "password", - // "salt", - // 16777216, - // []byte{ - // 0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4, - // 0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c, - // 0x26, 0x34, 0xe9, 0x84, - // }, - // }, - { - "passwordPASSWORDpassword", - "saltSALTsaltSALTsaltSALTsaltSALTsalt", - 4096, - []byte{ - 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, - 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, - 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, - 0x38, - }, - }, - { - "pass\000word", - "sa\000lt", - 4096, - []byte{ - 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d, - 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3, - }, - }, -} - -// Test vectors from -// http://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors -var sha256TestVectors = []testVector{ - { - "password", - "salt", - 1, - []byte{ - 0x12, 0x0f, 0xb6, 0xcf, 0xfc, 0xf8, 0xb3, 0x2c, - 0x43, 0xe7, 0x22, 0x52, 0x56, 0xc4, 0xf8, 0x37, - 0xa8, 0x65, 0x48, 0xc9, - }, - }, - { - "password", - "salt", - 2, - []byte{ - 0xae, 0x4d, 0x0c, 0x95, 0xaf, 0x6b, 0x46, 0xd3, - 0x2d, 0x0a, 0xdf, 0xf9, 0x28, 0xf0, 0x6d, 0xd0, - 0x2a, 0x30, 0x3f, 0x8e, - }, - }, - { - "password", - "salt", - 4096, - []byte{ - 0xc5, 0xe4, 0x78, 0xd5, 0x92, 0x88, 0xc8, 0x41, - 0xaa, 0x53, 0x0d, 0xb6, 0x84, 0x5c, 0x4c, 0x8d, - 0x96, 0x28, 0x93, 0xa0, - }, - }, - { - "passwordPASSWORDpassword", - "saltSALTsaltSALTsaltSALTsaltSALTsalt", - 4096, - []byte{ - 0x34, 0x8c, 0x89, 0xdb, 0xcb, 0xd3, 0x2b, 0x2f, - 0x32, 0xd8, 0x14, 0xb8, 0x11, 0x6e, 0x84, 0xcf, - 0x2b, 0x17, 0x34, 0x7e, 0xbc, 0x18, 0x00, 0x18, - 0x1c, - }, - }, - { - "pass\000word", - "sa\000lt", - 4096, - []byte{ - 0x89, 0xb6, 0x9d, 0x05, 0x16, 0xf8, 0x29, 0x89, - 0x3c, 0x69, 0x62, 0x26, 0x65, 0x0a, 0x86, 0x87, - }, - }, -} - -func testHash(t *testing.T, h func() hash.Hash, hashName string, vectors []testVector) { - for i, v := range vectors { - o := Key([]byte(v.password), []byte(v.salt), v.iter, len(v.output), h) - if !bytes.Equal(o, v.output) { - t.Errorf("%s %d: expected %x, got %x", hashName, i, v.output, o) - } - } -} - -func TestWithHMACSHA1(t *testing.T) { - testHash(t, sha1.New, "SHA1", sha1TestVectors) -} - -func TestWithHMACSHA256(t *testing.T) { - testHash(t, sha256.New, "SHA256", sha256TestVectors) -} - -var sink uint8 - -func benchmark(b *testing.B, h func() hash.Hash) { - password := make([]byte, h().Size()) - salt := make([]byte, 8) - for i := 0; i < b.N; i++ { - password = Key(password, salt, 4096, len(password), h) - } - sink += password[0] -} - -func BenchmarkHMACSHA1(b *testing.B) { - benchmark(b, sha1.New) -} - -func BenchmarkHMACSHA256(b *testing.B) { - benchmark(b, sha256.New) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string.go deleted file mode 100644 index 233b8b62cc..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "errors" - "unicode/utf16" -) - -// bmpString returns s encoded in UCS-2 with a zero terminator. -func bmpString(s string) ([]byte, error) { - // References: - // https://tools.ietf.org/html/rfc7292#appendix-B.1 - // https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane - // - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes - // EncodeRune returns 0xfffd if the rune does not need special encoding - // - the above RFC provides the info that BMPStrings are NULL terminated. - - ret := make([]byte, 0, 2*len(s)+2) - - for _, r := range s { - if t, _ := utf16.EncodeRune(r); t != 0xfffd { - return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2") - } - ret = append(ret, byte(r/256), byte(r%256)) - } - - return append(ret, 0, 0), nil -} - -func decodeBMPString(bmpString []byte) (string, error) { - if len(bmpString)%2 != 0 { - return "", errors.New("pkcs12: odd-length BMP string") - } - - // strip terminator if present - if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 { - bmpString = bmpString[:l-2] - } - - s := make([]uint16, 0, len(bmpString)/2) - for len(bmpString) > 0 { - s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1])) - bmpString = bmpString[2:] - } - - return string(utf16.Decode(s)), nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string_test.go deleted file mode 100644 index 7fca55f4e8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/bmp-string_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "encoding/hex" - "testing" -) - -var bmpStringTests = []struct { - in string - expectedHex string - shouldFail bool -}{ - {"", "0000", false}, - // Example from https://tools.ietf.org/html/rfc7292#appendix-B. - {"Beavis", "0042006500610076006900730000", false}, - // Some characters from the "Letterlike Symbols Unicode block". - {"\u2115 - Double-struck N", "21150020002d00200044006f00750062006c0065002d00730074007200750063006b0020004e0000", false}, - // any character outside the BMP should trigger an error. - {"\U0001f000 East wind (Mahjong)", "", true}, -} - -func TestBMPString(t *testing.T) { - for i, test := range bmpStringTests { - expected, err := hex.DecodeString(test.expectedHex) - if err != nil { - t.Fatalf("#%d: failed to decode expectation", i) - } - - out, err := bmpString(test.in) - if err == nil && test.shouldFail { - t.Errorf("#%d: expected to fail, but produced %x", i, out) - continue - } - - if err != nil && !test.shouldFail { - t.Errorf("#%d: failed unexpectedly: %s", i, err) - continue - } - - if !test.shouldFail { - if !bytes.Equal(out, expected) { - t.Errorf("#%d: expected %s, got %x", i, test.expectedHex, out) - continue - } - - roundTrip, err := decodeBMPString(out) - if err != nil { - t.Errorf("#%d: decoding output gave an error: %s", i, err) - continue - } - - if roundTrip != test.in { - t.Errorf("#%d: decoding output resulted in %q, but it should have been %q", i, roundTrip, test.in) - continue - } - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto.go deleted file mode 100644 index 7be1725580..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "crypto/cipher" - "crypto/des" - "crypto/x509/pkix" - "encoding/asn1" - "errors" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2" -) - -var ( - oidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3}) - oidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 6}) -) - -// pbeCipher is an abstraction of a PKCS#12 cipher. -type pbeCipher interface { - // create returns a cipher.Block given a key. - create(key []byte) (cipher.Block, error) - // deriveKey returns a key derived from the given password and salt. - deriveKey(salt, password []byte, iterations int) []byte - // deriveKey returns an IV derived from the given password and salt. - deriveIV(salt, password []byte, iterations int) []byte -} - -type shaWithTripleDESCBC struct{} - -func (shaWithTripleDESCBC) create(key []byte) (cipher.Block, error) { - return des.NewTripleDESCipher(key) -} - -func (shaWithTripleDESCBC) deriveKey(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24) -} - -func (shaWithTripleDESCBC) deriveIV(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) -} - -type shaWith40BitRC2CBC struct{} - -func (shaWith40BitRC2CBC) create(key []byte) (cipher.Block, error) { - return rc2.New(key, len(key)*8) -} - -func (shaWith40BitRC2CBC) deriveKey(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5) -} - -func (shaWith40BitRC2CBC) deriveIV(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) -} - -type pbeParams struct { - Salt []byte - Iterations int -} - -func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, int, error) { - var cipherType pbeCipher - - switch { - case algorithm.Algorithm.Equal(oidPBEWithSHAAnd3KeyTripleDESCBC): - cipherType = shaWithTripleDESCBC{} - case algorithm.Algorithm.Equal(oidPBEWithSHAAnd40BitRC2CBC): - cipherType = shaWith40BitRC2CBC{} - default: - return nil, 0, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported") - } - - var params pbeParams - if err := unmarshal(algorithm.Parameters.FullBytes, ¶ms); err != nil { - return nil, 0, err - } - - key := cipherType.deriveKey(params.Salt, password, params.Iterations) - iv := cipherType.deriveIV(params.Salt, password, params.Iterations) - - block, err := cipherType.create(key) - if err != nil { - return nil, 0, err - } - - return cipher.NewCBCDecrypter(block, iv), block.BlockSize(), nil -} - -func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) { - cbc, blockSize, err := pbDecrypterFor(info.Algorithm(), password) - if err != nil { - return nil, err - } - - encrypted := info.Data() - if len(encrypted) == 0 { - return nil, errors.New("pkcs12: empty encrypted data") - } - if len(encrypted)%blockSize != 0 { - return nil, errors.New("pkcs12: input is not a multiple of the block size") - } - decrypted = make([]byte, len(encrypted)) - cbc.CryptBlocks(decrypted, encrypted) - - psLen := int(decrypted[len(decrypted)-1]) - if psLen == 0 || psLen > blockSize { - return nil, ErrDecryption - } - - if len(decrypted) < psLen { - return nil, ErrDecryption - } - ps := decrypted[len(decrypted)-psLen:] - decrypted = decrypted[:len(decrypted)-psLen] - if bytes.Compare(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) != 0 { - return nil, ErrDecryption - } - - return -} - -// decryptable abstracts an object that contains ciphertext. -type decryptable interface { - Algorithm() pkix.AlgorithmIdentifier - Data() []byte -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto_test.go deleted file mode 100644 index eb4dae8fce..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/crypto_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "crypto/x509/pkix" - "encoding/asn1" - "testing" -) - -var sha1WithTripleDES = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3}) - -func TestPbDecrypterFor(t *testing.T) { - params, _ := asn1.Marshal(pbeParams{ - Salt: []byte{1, 2, 3, 4, 5, 6, 7, 8}, - Iterations: 2048, - }) - alg := pkix.AlgorithmIdentifier{ - Algorithm: asn1.ObjectIdentifier([]int{1, 2, 3}), - Parameters: asn1.RawValue{ - FullBytes: params, - }, - } - - pass, _ := bmpString("Sesame open") - - _, _, err := pbDecrypterFor(alg, pass) - if _, ok := err.(NotImplementedError); !ok { - t.Errorf("expected not implemented error, got: %T %s", err, err) - } - - alg.Algorithm = sha1WithTripleDES - cbc, blockSize, err := pbDecrypterFor(alg, pass) - if err != nil { - t.Errorf("unexpected error from pbDecrypterFor %v", err) - } - if blockSize != 8 { - t.Errorf("unexpected block size %d, wanted 8", blockSize) - } - - plaintext := []byte{1, 2, 3, 4, 5, 6, 7, 8} - expectedCiphertext := []byte{185, 73, 135, 249, 137, 1, 122, 247} - ciphertext := make([]byte, len(plaintext)) - cbc.CryptBlocks(ciphertext, plaintext) - - if bytes.Compare(ciphertext, expectedCiphertext) != 0 { - t.Errorf("bad ciphertext, got %x but wanted %x", ciphertext, expectedCiphertext) - } -} - -var pbDecryptTests = []struct { - in []byte - expected []byte - expectedError error -}{ - { - []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\xa0\x9a\xdf\x5a\x58\xa0\xea\x46"), // 7 padding bytes - []byte("A secret!"), - nil, - }, - { - []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\x96\x24\x2f\x71\x7e\x32\x3f\xe7"), // 8 padding bytes - []byte("A secret"), - nil, - }, - { - []byte("\x35\x0c\xc0\x8d\xab\xa9\x5d\x30\x7f\x9a\xec\x6a\xd8\x9b\x9c\xd9"), // 9 padding bytes, incorrect - nil, - ErrDecryption, - }, - { - []byte("\xb2\xf9\x6e\x06\x60\xae\x20\xcf\x08\xa0\x7b\xd9\x6b\x20\xef\x41"), // incorrect padding bytes: [ ... 0x04 0x02 ] - nil, - ErrDecryption, - }, -} - -func TestPbDecrypt(t *testing.T) { - for i, test := range pbDecryptTests { - decryptable := testDecryptable{ - data: test.in, - algorithm: pkix.AlgorithmIdentifier{ - Algorithm: sha1WithTripleDES, - Parameters: pbeParams{ - Salt: []byte("\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8"), - Iterations: 4096, - }.RawASN1(), - }, - } - password, _ := bmpString("sesame") - - plaintext, err := pbDecrypt(decryptable, password) - if err != test.expectedError { - t.Errorf("#%d: got error %q, but wanted %q", i, err, test.expectedError) - continue - } - - if !bytes.Equal(plaintext, test.expected) { - t.Errorf("#%d: got %x, but wanted %x", i, plaintext, test.expected) - } - } -} - -type testDecryptable struct { - data []byte - algorithm pkix.AlgorithmIdentifier -} - -func (d testDecryptable) Algorithm() pkix.AlgorithmIdentifier { return d.algorithm } -func (d testDecryptable) Data() []byte { return d.data } - -func (params pbeParams) RawASN1() (raw asn1.RawValue) { - asn1Bytes, err := asn1.Marshal(params) - if err != nil { - panic(err) - } - _, err = asn1.Unmarshal(asn1Bytes, &raw) - if err != nil { - panic(err) - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/errors.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/errors.go deleted file mode 100644 index 7377ce6fb2..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/errors.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import "errors" - -var ( - // ErrDecryption represents a failure to decrypt the input. - ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") - - // ErrIncorrectPassword is returned when an incorrect password is detected. - // Usually, P12/PFX data is signed to be able to verify the password. - ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") -) - -// NotImplementedError indicates that the input is not currently supported. -type NotImplementedError string - -func (e NotImplementedError) Error() string { - return "pkcs12: " + string(e) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/bench_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/bench_test.go deleted file mode 100644 index 3347f338c1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/bench_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015 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 rc2 - -import ( - "testing" -) - -func BenchmarkEncrypt(b *testing.B) { - r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) - b.ResetTimer() - var src [8]byte - for i := 0; i < b.N; i++ { - r.Encrypt(src[:], src[:]) - } -} - -func BenchmarkDecrypt(b *testing.B) { - r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) - b.ResetTimer() - var src [8]byte - for i := 0; i < b.N; i++ { - r.Decrypt(src[:], src[:]) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2.go deleted file mode 100644 index 7499e3fb69..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2.go +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright 2015 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 rc2 implements the RC2 cipher -/* -https://www.ietf.org/rfc/rfc2268.txt -http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf - -This code is licensed under the MIT license. -*/ -package rc2 - -import ( - "crypto/cipher" - "encoding/binary" -) - -// The rc2 block size in bytes -const BlockSize = 8 - -type rc2Cipher struct { - k [64]uint16 -} - -// New returns a new rc2 cipher with the given key and effective key length t1 -func New(key []byte, t1 int) (cipher.Block, error) { - // TODO(dgryski): error checking for key length - return &rc2Cipher{ - k: expandKey(key, t1), - }, nil -} - -func (*rc2Cipher) BlockSize() int { return BlockSize } - -var piTable = [256]byte{ - 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, - 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, - 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, - 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, - 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, - 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, - 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, - 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, - 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, - 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, - 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, - 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, - 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, - 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, - 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, - 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad, -} - -func expandKey(key []byte, t1 int) [64]uint16 { - - l := make([]byte, 128) - copy(l, key) - - var t = len(key) - var t8 = (t1 + 7) / 8 - var tm = byte(255 % uint(1<<(8+uint(t1)-8*uint(t8)))) - - for i := len(key); i < 128; i++ { - l[i] = piTable[l[i-1]+l[uint8(i-t)]] - } - - l[128-t8] = piTable[l[128-t8]&tm] - - for i := 127 - t8; i >= 0; i-- { - l[i] = piTable[l[i+1]^l[i+t8]] - } - - var k [64]uint16 - - for i := range k { - k[i] = uint16(l[2*i]) + uint16(l[2*i+1])*256 - } - - return k -} - -func rotl16(x uint16, b uint) uint16 { - return (x >> (16 - b)) | (x << b) -} - -func (c *rc2Cipher) Encrypt(dst, src []byte) { - - r0 := binary.LittleEndian.Uint16(src[0:]) - r1 := binary.LittleEndian.Uint16(src[2:]) - r2 := binary.LittleEndian.Uint16(src[4:]) - r3 := binary.LittleEndian.Uint16(src[6:]) - - var j int - - for j <= 16 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) - j++ - - } - - r0 = r0 + c.k[r3&63] - r1 = r1 + c.k[r0&63] - r2 = r2 + c.k[r1&63] - r3 = r3 + c.k[r2&63] - - for j <= 40 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) - j++ - - } - - r0 = r0 + c.k[r3&63] - r1 = r1 + c.k[r0&63] - r2 = r2 + c.k[r1&63] - r3 = r3 + c.k[r2&63] - - for j <= 60 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) - j++ - } - - binary.LittleEndian.PutUint16(dst[0:], r0) - binary.LittleEndian.PutUint16(dst[2:], r1) - binary.LittleEndian.PutUint16(dst[4:], r2) - binary.LittleEndian.PutUint16(dst[6:], r3) -} - -func (c *rc2Cipher) Decrypt(dst, src []byte) { - - r0 := binary.LittleEndian.Uint16(src[0:]) - r1 := binary.LittleEndian.Uint16(src[2:]) - r2 := binary.LittleEndian.Uint16(src[4:]) - r3 := binary.LittleEndian.Uint16(src[6:]) - - j := 63 - - for j >= 44 { - // unmix r3 - r3 = rotl16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = rotl16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = rotl16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = rotl16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - } - - r3 = r3 - c.k[r2&63] - r2 = r2 - c.k[r1&63] - r1 = r1 - c.k[r0&63] - r0 = r0 - c.k[r3&63] - - for j >= 20 { - // unmix r3 - r3 = rotl16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = rotl16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = rotl16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = rotl16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - - } - - r3 = r3 - c.k[r2&63] - r2 = r2 - c.k[r1&63] - r1 = r1 - c.k[r0&63] - r0 = r0 - c.k[r3&63] - - for j >= 0 { - // unmix r3 - r3 = rotl16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = rotl16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = rotl16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = rotl16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - - } - - binary.LittleEndian.PutUint16(dst[0:], r0) - binary.LittleEndian.PutUint16(dst[2:], r1) - binary.LittleEndian.PutUint16(dst[4:], r2) - binary.LittleEndian.PutUint16(dst[6:], r3) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2_test.go deleted file mode 100644 index 51a7efe506..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/internal/rc2/rc2_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2015 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 rc2 - -import ( - "bytes" - "encoding/hex" - "testing" -) - -func TestEncryptDecrypt(t *testing.T) { - // TODO(dgryski): add the rest of the test vectors from the RFC - var tests = []struct { - key string - plain string - cipher string - t1 int - }{ - { - "0000000000000000", - "0000000000000000", - "ebb773f993278eff", - 63, - }, - { - "ffffffffffffffff", - "ffffffffffffffff", - "278b27e42e2f0d49", - 64, - }, - { - "3000000000000000", - "1000000000000001", - "30649edf9be7d2c2", - 64, - }, - { - "88", - "0000000000000000", - "61a8a244adacccf0", - 64, - }, - { - "88bca90e90875a", - "0000000000000000", - "6ccf4308974c267f", - 64, - }, - { - "88bca90e90875a7f0f79c384627bafb2", - "0000000000000000", - "1a807d272bbe5db1", - 64, - }, - { - "88bca90e90875a7f0f79c384627bafb2", - "0000000000000000", - "2269552ab0f85ca6", - 128, - }, - { - "88bca90e90875a7f0f79c384627bafb216f80a6f85920584c42fceb0be255daf1e", - "0000000000000000", - "5b78d3a43dfff1f1", - 129, - }, - } - - for _, tt := range tests { - k, _ := hex.DecodeString(tt.key) - p, _ := hex.DecodeString(tt.plain) - c, _ := hex.DecodeString(tt.cipher) - - b, _ := New(k, tt.t1) - - var dst [8]byte - - b.Encrypt(dst[:], p) - - if !bytes.Equal(dst[:], c) { - t.Errorf("encrypt failed: got % 2x wanted % 2x\n", dst, c) - } - - b.Decrypt(dst[:], c) - - if !bytes.Equal(dst[:], p) { - t.Errorf("decrypt failed: got % 2x wanted % 2x\n", dst, p) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac.go deleted file mode 100644 index 5f38aa7de8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/x509/pkix" - "encoding/asn1" -) - -type macData struct { - Mac digestInfo - MacSalt []byte - Iterations int `asn1:"optional,default:1"` -} - -// from PKCS#7: -type digestInfo struct { - Algorithm pkix.AlgorithmIdentifier - Digest []byte -} - -var ( - oidSHA1 = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}) -) - -func verifyMac(macData *macData, message, password []byte) error { - if !macData.Mac.Algorithm.Algorithm.Equal(oidSHA1) { - return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String()) - } - - key := pbkdf(sha1Sum, 20, 64, macData.MacSalt, password, macData.Iterations, 3, 20) - - mac := hmac.New(sha1.New, key) - mac.Write(message) - expectedMAC := mac.Sum(nil) - - if !hmac.Equal(macData.Mac.Digest, expectedMAC) { - return ErrIncorrectPassword - } - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac_test.go deleted file mode 100644 index 1ed4ff21e1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/mac_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "encoding/asn1" - "testing" -) - -func TestVerifyMac(t *testing.T) { - td := macData{ - Mac: digestInfo{ - Digest: []byte{0x18, 0x20, 0x3d, 0xff, 0x1e, 0x16, 0xf4, 0x92, 0xf2, 0xaf, 0xc8, 0x91, 0xa9, 0xba, 0xd6, 0xca, 0x9d, 0xee, 0x51, 0x93}, - }, - MacSalt: []byte{1, 2, 3, 4, 5, 6, 7, 8}, - Iterations: 2048, - } - - message := []byte{11, 12, 13, 14, 15} - password, _ := bmpString("") - - td.Mac.Algorithm.Algorithm = asn1.ObjectIdentifier([]int{1, 2, 3}) - err := verifyMac(&td, message, password) - if _, ok := err.(NotImplementedError); !ok { - t.Errorf("err: %v", err) - } - - td.Mac.Algorithm.Algorithm = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}) - err = verifyMac(&td, message, password) - if err != ErrIncorrectPassword { - t.Errorf("Expected incorrect password, got err: %v", err) - } - - password, _ = bmpString("Sesame open") - err = verifyMac(&td, message, password) - if err != nil { - t.Errorf("err: %v", err) - } - -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf.go deleted file mode 100644 index 5c419d41e3..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "crypto/sha1" - "math/big" -) - -var ( - one = big.NewInt(1) -) - -// sha1Sum returns the SHA-1 hash of in. -func sha1Sum(in []byte) []byte { - sum := sha1.Sum(in) - return sum[:] -} - -// fillWithRepeats returns v*ceiling(len(pattern) / v) bytes consisting of -// repeats of pattern. -func fillWithRepeats(pattern []byte, v int) []byte { - if len(pattern) == 0 { - return nil - } - outputLen := v * ((len(pattern) + v - 1) / v) - return bytes.Repeat(pattern, (outputLen+len(pattern)-1)/len(pattern))[:outputLen] -} - -func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID byte, size int) (key []byte) { - // implementation of https://tools.ietf.org/html/rfc7292#appendix-B.2 , RFC text verbatim in comments - - // Let H be a hash function built around a compression function f: - - // Z_2^u x Z_2^v -> Z_2^u - - // (that is, H has a chaining variable and output of length u bits, and - // the message input to the compression function of H is v bits). The - // values for u and v are as follows: - - // HASH FUNCTION VALUE u VALUE v - // MD2, MD5 128 512 - // SHA-1 160 512 - // SHA-224 224 512 - // SHA-256 256 512 - // SHA-384 384 1024 - // SHA-512 512 1024 - // SHA-512/224 224 1024 - // SHA-512/256 256 1024 - - // Furthermore, let r be the iteration count. - - // We assume here that u and v are both multiples of 8, as are the - // lengths of the password and salt strings (which we denote by p and s, - // respectively) and the number n of pseudorandom bits required. In - // addition, u and v are of course non-zero. - - // For information on security considerations for MD5 [19], see [25] and - // [1], and on those for MD2, see [18]. - - // The following procedure can be used to produce pseudorandom bits for - // a particular "purpose" that is identified by a byte called "ID". - // This standard specifies 3 different values for the ID byte: - - // 1. If ID=1, then the pseudorandom bits being produced are to be used - // as key material for performing encryption or decryption. - - // 2. If ID=2, then the pseudorandom bits being produced are to be used - // as an IV (Initial Value) for encryption or decryption. - - // 3. If ID=3, then the pseudorandom bits being produced are to be used - // as an integrity key for MACing. - - // 1. Construct a string, D (the "diversifier"), by concatenating v/8 - // copies of ID. - var D []byte - for i := 0; i < v; i++ { - D = append(D, ID) - } - - // 2. Concatenate copies of the salt together to create a string S of - // length v(ceiling(s/v)) bits (the final copy of the salt may be - // truncated to create S). Note that if the salt is the empty - // string, then so is S. - - S := fillWithRepeats(salt, v) - - // 3. Concatenate copies of the password together to create a string P - // of length v(ceiling(p/v)) bits (the final copy of the password - // may be truncated to create P). Note that if the password is the - // empty string, then so is P. - - P := fillWithRepeats(password, v) - - // 4. Set I=S||P to be the concatenation of S and P. - I := append(S, P...) - - // 5. Set c=ceiling(n/u). - c := (size + u - 1) / u - - // 6. For i=1, 2, ..., c, do the following: - A := make([]byte, c*20) - var IjBuf []byte - for i := 0; i < c; i++ { - // A. Set A2=H^r(D||I). (i.e., the r-th hash of D||1, - // H(H(H(... H(D||I)))) - Ai := hash(append(D, I...)) - for j := 1; j < r; j++ { - Ai = hash(Ai) - } - copy(A[i*20:], Ai[:]) - - if i < c-1 { // skip on last iteration - // B. Concatenate copies of Ai to create a string B of length v - // bits (the final copy of Ai may be truncated to create B). - var B []byte - for len(B) < v { - B = append(B, Ai[:]...) - } - B = B[:v] - - // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit - // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by - // setting I_j=(I_j+B+1) mod 2^v for each j. - { - Bbi := new(big.Int).SetBytes(B) - Ij := new(big.Int) - - for j := 0; j < len(I)/v; j++ { - Ij.SetBytes(I[j*v : (j+1)*v]) - Ij.Add(Ij, Bbi) - Ij.Add(Ij, one) - Ijb := Ij.Bytes() - // We expect Ijb to be exactly v bytes, - // if it is longer or shorter we must - // adjust it accordingly. - if len(Ijb) > v { - Ijb = Ijb[len(Ijb)-v:] - } - if len(Ijb) < v { - if IjBuf == nil { - IjBuf = make([]byte, v) - } - bytesShort := v - len(Ijb) - for i := 0; i < bytesShort; i++ { - IjBuf[i] = 0 - } - copy(IjBuf[bytesShort:], Ijb) - Ijb = IjBuf - } - copy(I[j*v:(j+1)*v], Ijb) - } - } - } - } - // 7. Concatenate A_1, A_2, ..., A_c together to form a pseudorandom - // bit string, A. - - // 8. Use the first n bits of A as the output of this entire process. - return A[:size] - - // If the above process is being used to generate a DES key, the process - // should be used to create 64 random bits, and the key's parity bits - // should be set after the 64 bits have been produced. Similar concerns - // hold for 2-key and 3-key triple-DES keys, for CDMF keys, and for any - // similar keys with parity bits "built into them". -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf_test.go deleted file mode 100644 index 262037d7eb..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pbkdf_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "testing" -) - -func TestThatPBKDFWorksCorrectlyForLongKeys(t *testing.T) { - cipherInfo := shaWithTripleDESCBC{} - - salt := []byte("\xff\xff\xff\xff\xff\xff\xff\xff") - password, _ := bmpString("sesame") - key := cipherInfo.deriveKey(salt, password, 2048) - - if expected := []byte("\x7c\xd9\xfd\x3e\x2b\x3b\xe7\x69\x1a\x44\xe3\xbe\xf0\xf9\xea\x0f\xb9\xb8\x97\xd4\xe3\x25\xd9\xd1"); bytes.Compare(key, expected) != 0 { - t.Fatalf("expected key '%x', but found '%x'", expected, key) - } -} - -func TestThatPBKDFHandlesLeadingZeros(t *testing.T) { - // This test triggers a case where I_j (in step 6C) ends up with leading zero - // byte, meaning that len(Ijb) < v (leading zeros get stripped by big.Int). - // This was previously causing bug whereby certain inputs would break the - // derivation and produce the wrong output. - key := pbkdf(sha1Sum, 20, 64, []byte("\xf3\x7e\x05\xb5\x18\x32\x4b\x4b"), []byte("\x00\x00"), 2048, 1, 24) - expected := []byte("\x00\xf7\x59\xff\x47\xd1\x4d\xd0\x36\x65\xd5\x94\x3c\xb3\xc4\xa3\x9a\x25\x55\xc0\x2a\xed\x66\xe1") - if bytes.Compare(key, expected) != 0 { - t.Fatalf("expected key '%x', but found '%x'", expected, key) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12.go deleted file mode 100644 index eff9ad3a98..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12.go +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright 2015 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 pkcs12 implements some of PKCS#12. -// -// This implementation is distilled from https://tools.ietf.org/html/rfc7292 -// and referenced documents. It is intended for decoding P12/PFX-stored -// certificates and keys for use with the crypto/tls package. -package pkcs12 - -import ( - "crypto/ecdsa" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "encoding/hex" - "encoding/pem" - "errors" -) - -var ( - oidDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 1}) - oidEncryptedDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 6}) - - oidFriendlyName = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 20}) - oidLocalKeyID = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 21}) - oidMicrosoftCSPName = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 17, 1}) -) - -type pfxPdu struct { - Version int - AuthSafe contentInfo - MacData macData `asn1:"optional"` -} - -type contentInfo struct { - ContentType asn1.ObjectIdentifier - Content asn1.RawValue `asn1:"tag:0,explicit,optional"` -} - -type encryptedData struct { - Version int - EncryptedContentInfo encryptedContentInfo -} - -type encryptedContentInfo struct { - ContentType asn1.ObjectIdentifier - ContentEncryptionAlgorithm pkix.AlgorithmIdentifier - EncryptedContent []byte `asn1:"tag:0,optional"` -} - -func (i encryptedContentInfo) Algorithm() pkix.AlgorithmIdentifier { - return i.ContentEncryptionAlgorithm -} - -func (i encryptedContentInfo) Data() []byte { return i.EncryptedContent } - -type safeBag struct { - Id asn1.ObjectIdentifier - Value asn1.RawValue `asn1:"tag:0,explicit"` - Attributes []pkcs12Attribute `asn1:"set,optional"` -} - -type pkcs12Attribute struct { - Id asn1.ObjectIdentifier - Value asn1.RawValue `asn1:"set"` -} - -type encryptedPrivateKeyInfo struct { - AlgorithmIdentifier pkix.AlgorithmIdentifier - EncryptedData []byte -} - -func (i encryptedPrivateKeyInfo) Algorithm() pkix.AlgorithmIdentifier { - return i.AlgorithmIdentifier -} - -func (i encryptedPrivateKeyInfo) Data() []byte { - return i.EncryptedData -} - -// PEM block types -const ( - certificateType = "CERTIFICATE" - privateKeyType = "PRIVATE KEY" -) - -// unmarshal calls asn1.Unmarshal, but also returns an error if there is any -// trailing data after unmarshaling. -func unmarshal(in []byte, out interface{}) error { - trailing, err := asn1.Unmarshal(in, out) - if err != nil { - return err - } - if len(trailing) != 0 { - return errors.New("pkcs12: trailing data found") - } - return nil -} - -// ConvertToPEM converts all "safe bags" contained in pfxData to PEM blocks. -func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) { - encodedPassword, err := bmpString(password) - if err != nil { - return nil, ErrIncorrectPassword - } - - bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) - - if err != nil { - return nil, err - } - - blocks := make([]*pem.Block, 0, len(bags)) - for _, bag := range bags { - block, err := convertBag(&bag, encodedPassword) - if err != nil { - return nil, err - } - blocks = append(blocks, block) - } - - return blocks, nil -} - -func convertBag(bag *safeBag, password []byte) (*pem.Block, error) { - block := &pem.Block{ - Headers: make(map[string]string), - } - - for _, attribute := range bag.Attributes { - k, v, err := convertAttribute(&attribute) - if err != nil { - return nil, err - } - block.Headers[k] = v - } - - switch { - case bag.Id.Equal(oidCertBag): - block.Type = certificateType - certsData, err := decodeCertBag(bag.Value.Bytes) - if err != nil { - return nil, err - } - block.Bytes = certsData - case bag.Id.Equal(oidPKCS8ShroundedKeyBag): - block.Type = privateKeyType - - key, err := decodePkcs8ShroudedKeyBag(bag.Value.Bytes, password) - if err != nil { - return nil, err - } - - switch key := key.(type) { - case *rsa.PrivateKey: - block.Bytes = x509.MarshalPKCS1PrivateKey(key) - case *ecdsa.PrivateKey: - block.Bytes, err = x509.MarshalECPrivateKey(key) - if err != nil { - return nil, err - } - default: - return nil, errors.New("found unknown private key type in PKCS#8 wrapping") - } - default: - return nil, errors.New("don't know how to convert a safe bag of type " + bag.Id.String()) - } - return block, nil -} - -func convertAttribute(attribute *pkcs12Attribute) (key, value string, err error) { - isString := false - - switch { - case attribute.Id.Equal(oidFriendlyName): - key = "friendlyName" - isString = true - case attribute.Id.Equal(oidLocalKeyID): - key = "localKeyId" - case attribute.Id.Equal(oidMicrosoftCSPName): - // This key is chosen to match OpenSSL. - key = "Microsoft CSP Name" - isString = true - default: - return "", "", errors.New("pkcs12: unknown attribute with OID " + attribute.Id.String()) - } - - if isString { - if err := unmarshal(attribute.Value.Bytes, &attribute.Value); err != nil { - return "", "", err - } - if value, err = decodeBMPString(attribute.Value.Bytes); err != nil { - return "", "", err - } - } else { - var id []byte - if err := unmarshal(attribute.Value.Bytes, &id); err != nil { - return "", "", err - } - value = hex.EncodeToString(id) - } - - return key, value, nil -} - -// Decode extracts a certificate and private key from pfxData. This function -// assumes that there is only one certificate and only one private key in the -// pfxData. -func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) { - encodedPassword, err := bmpString(password) - if err != nil { - return nil, nil, err - } - - bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) - if err != nil { - return nil, nil, err - } - - if len(bags) != 2 { - err = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU") - return - } - - for _, bag := range bags { - switch { - case bag.Id.Equal(oidCertBag): - if certificate != nil { - err = errors.New("pkcs12: expected exactly one certificate bag") - } - - certsData, err := decodeCertBag(bag.Value.Bytes) - if err != nil { - return nil, nil, err - } - certs, err := x509.ParseCertificates(certsData) - if err != nil { - return nil, nil, err - } - if len(certs) != 1 { - err = errors.New("pkcs12: expected exactly one certificate in the certBag") - return nil, nil, err - } - certificate = certs[0] - - case bag.Id.Equal(oidPKCS8ShroundedKeyBag): - if privateKey != nil { - err = errors.New("pkcs12: expected exactly one key bag") - } - - if privateKey, err = decodePkcs8ShroudedKeyBag(bag.Value.Bytes, encodedPassword); err != nil { - return nil, nil, err - } - } - } - - if certificate == nil { - return nil, nil, errors.New("pkcs12: certificate missing") - } - if privateKey == nil { - return nil, nil, errors.New("pkcs12: private key missing") - } - - return -} - -func getSafeContents(p12Data, password []byte) (bags []safeBag, updatedPassword []byte, err error) { - pfx := new(pfxPdu) - if err := unmarshal(p12Data, pfx); err != nil { - return nil, nil, errors.New("pkcs12: error reading P12 data: " + err.Error()) - } - - if pfx.Version != 3 { - return nil, nil, NotImplementedError("can only decode v3 PFX PDU's") - } - - if !pfx.AuthSafe.ContentType.Equal(oidDataContentType) { - return nil, nil, NotImplementedError("only password-protected PFX is implemented") - } - - // unmarshal the explicit bytes in the content for type 'data' - if err := unmarshal(pfx.AuthSafe.Content.Bytes, &pfx.AuthSafe.Content); err != nil { - return nil, nil, err - } - - if len(pfx.MacData.Mac.Algorithm.Algorithm) == 0 { - return nil, nil, errors.New("pkcs12: no MAC in data") - } - - if err := verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password); err != nil { - if err == ErrIncorrectPassword && len(password) == 2 && password[0] == 0 && password[1] == 0 { - // some implementations use an empty byte array - // for the empty string password try one more - // time with empty-empty password - password = nil - err = verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password) - } - if err != nil { - return nil, nil, err - } - } - - var authenticatedSafe []contentInfo - if err := unmarshal(pfx.AuthSafe.Content.Bytes, &authenticatedSafe); err != nil { - return nil, nil, err - } - - if len(authenticatedSafe) != 2 { - return nil, nil, NotImplementedError("expected exactly two items in the authenticated safe") - } - - for _, ci := range authenticatedSafe { - var data []byte - - switch { - case ci.ContentType.Equal(oidDataContentType): - if err := unmarshal(ci.Content.Bytes, &data); err != nil { - return nil, nil, err - } - case ci.ContentType.Equal(oidEncryptedDataContentType): - var encryptedData encryptedData - if err := unmarshal(ci.Content.Bytes, &encryptedData); err != nil { - return nil, nil, err - } - if encryptedData.Version != 0 { - return nil, nil, NotImplementedError("only version 0 of EncryptedData is supported") - } - if data, err = pbDecrypt(encryptedData.EncryptedContentInfo, password); err != nil { - return nil, nil, err - } - default: - return nil, nil, NotImplementedError("only data and encryptedData content types are supported in authenticated safe") - } - - var safeContents []safeBag - if err := unmarshal(data, &safeContents); err != nil { - return nil, nil, err - } - bags = append(bags, safeContents...) - } - - return bags, password, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12_test.go deleted file mode 100644 index 14dd2a6c5d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/pkcs12_test.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "crypto/rsa" - "crypto/tls" - "encoding/base64" - "encoding/pem" - "testing" -) - -func TestPfx(t *testing.T) { - for commonName, base64P12 := range testdata { - p12, _ := base64.StdEncoding.DecodeString(base64P12) - - priv, cert, err := Decode(p12, "") - if err != nil { - t.Fatal(err) - } - - if err := priv.(*rsa.PrivateKey).Validate(); err != nil { - t.Errorf("error while validating private key: %v", err) - } - - if cert.Subject.CommonName != commonName { - t.Errorf("expected common name to be %q, but found %q", commonName, cert.Subject.CommonName) - } - } -} - -func TestPEM(t *testing.T) { - for commonName, base64P12 := range testdata { - p12, _ := base64.StdEncoding.DecodeString(base64P12) - - blocks, err := ToPEM(p12, "") - if err != nil { - t.Fatalf("error while converting to PEM: %s", err) - } - - var pemData []byte - for _, b := range blocks { - pemData = append(pemData, pem.EncodeToMemory(b)...) - } - - cert, err := tls.X509KeyPair(pemData, pemData) - if err != nil { - t.Errorf("err while converting to key pair: %v", err) - } - config := tls.Config{ - Certificates: []tls.Certificate{cert}, - } - config.BuildNameToCertificate() - - if _, exists := config.NameToCertificate[commonName]; !exists { - t.Errorf("did not find our cert in PEM?: %v", config.NameToCertificate) - } - } -} - -func ExampleToPEM() { - p12, _ := base64.StdEncoding.DecodeString(`MIIJzgIBAzCCCZQGCS ... CA+gwggPk==`) - - blocks, err := ToPEM(p12, "password") - if err != nil { - panic(err) - } - - var pemData []byte - for _, b := range blocks { - pemData = append(pemData, pem.EncodeToMemory(b)...) - } - - // then use PEM data for tls to construct tls certificate: - cert, err := tls.X509KeyPair(pemData, pemData) - if err != nil { - panic(err) - } - - config := &tls.Config{ - Certificates: []tls.Certificate{cert}, - } - - _ = config -} - -var testdata = map[string]string{ - // 'null' password test case - "Windows Azure Tools": `MIIKDAIBAzCCCcwGCSqGSIb3DQEHAaCCCb0Eggm5MIIJtTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAhStUNnlTGV+gICB9AEggTIJ81JIossF6boFWpPtkiQRPtI6DW6e9QD4/WvHAVrM2bKdpMzSMsCML5NyuddANTKHBVq00Jc9keqGNAqJPKkjhSUebzQFyhe0E1oI9T4zY5UKr/I8JclOeccH4QQnsySzYUG2SnniXnQ+JrG3juetli7EKth9h6jLc6xbubPadY5HMB3wL/eG/kJymiXwU2KQ9Mgd4X6jbcV+NNCE/8jbZHvSTCPeYTJIjxfeX61Sj5kFKUCzERbsnpyevhY3X0eYtEDezZQarvGmXtMMdzf8HJHkWRdk9VLDLgjk8uiJif/+X4FohZ37ig0CpgC2+dP4DGugaZZ51hb8tN9GeCKIsrmWogMXDIVd0OACBp/EjJVmFB6y0kUCXxUE0TZt0XA1tjAGJcjDUpBvTntZjPsnH/4ZySy+s2d9OOhJ6pzRQBRm360TzkFdSwk9DLiLdGfv4pwMMu/vNGBlqjP/1sQtj+jprJiD1sDbCl4AdQZVoMBQHadF2uSD4/o17XG/Ci0r2h6Htc2yvZMAbEY4zMjjIn2a+vqIxD6onexaek1R3zbkS9j19D6EN9EWn8xgz80YRCyW65znZk8xaIhhvlU/mg7sTxeyuqroBZNcq6uDaQTehDpyH7bY2l4zWRpoj10a6JfH2q5shYz8Y6UZC/kOTfuGqbZDNZWro/9pYquvNNW0M847E5t9bsf9VkAAMHRGBbWoVoU9VpI0UnoXSfvpOo+aXa2DSq5sHHUTVY7A9eov3z5IqT+pligx11xcs+YhDWcU8di3BTJisohKvv5Y8WSkm/rloiZd4ig269k0jTRk1olP/vCksPli4wKG2wdsd5o42nX1yL7mFfXocOANZbB+5qMkiwdyoQSk+Vq+C8nAZx2bbKhUq2MbrORGMzOe0Hh0x2a0PeObycN1Bpyv7Mp3ZI9h5hBnONKCnqMhtyQHUj/nNvbJUnDVYNfoOEqDiEqqEwB7YqWzAKz8KW0OIqdlM8uiQ4JqZZlFllnWJUfaiDrdFM3lYSnFQBkzeVlts6GpDOOBjCYd7dcCNS6kq6pZC6p6HN60Twu0JnurZD6RT7rrPkIGE8vAenFt4iGe/yF52fahCSY8Ws4K0UTwN7bAS+4xRHVCWvE8sMRZsRCHizb5laYsVrPZJhE6+hux6OBb6w8kwPYXc+ud5v6UxawUWgt6uPwl8mlAtU9Z7Miw4Nn/wtBkiLL/ke1UI1gqJtcQXgHxx6mzsjh41+nAgTvdbsSEyU6vfOmxGj3Rwc1eOrIhJUqn5YjOWfzzsz/D5DzWKmwXIwdspt1p+u+kol1N3f2wT9fKPnd/RGCb4g/1hc3Aju4DQYgGY782l89CEEdalpQ/35bQczMFk6Fje12HykakWEXd/bGm9Unh82gH84USiRpeOfQvBDYoqEyrY3zkFZzBjhDqa+jEcAj41tcGx47oSfDq3iVYCdL7HSIjtnyEktVXd7mISZLoMt20JACFcMw+mrbjlug+eU7o2GR7T+LwtOp/p4LZqyLa7oQJDwde1BNZtm3TCK2P1mW94QDL0nDUps5KLtr1DaZXEkRbjSJub2ZE9WqDHyU3KA8G84Tq/rN1IoNu/if45jacyPje1Npj9IftUZSP22nV7HMwZtwQ4P4MYHRMBMGCSqGSIb3DQEJFTEGBAQBAAAAMFsGCSqGSIb3DQEJFDFOHkwAewBCADQAQQA0AEYARQBCADAALQBBADEAOABBAC0ANAA0AEIAQgAtAEIANQBGADIALQA0ADkAMQBFAEYAMQA1ADIAQgBBADEANgB9MF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAG8AZgB0AHcAYQByAGUAIABLAGUAeQAgAFMAdABvAHIAYQBnAGUAIABQAHIAbwB2AGkAZABlAHIwggO/BgkqhkiG9w0BBwagggOwMIIDrAIBADCCA6UGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECEBk5ZAYpu0WAgIH0ICCA3hik4mQFGpw9Ha8TQPtk+j2jwWdxfF0+sTk6S8PTsEfIhB7wPltjiCK92Uv2tCBQnodBUmatIfkpnRDEySmgmdglmOCzj204lWAMRs94PoALGn3JVBXbO1vIDCbAPOZ7Z0Hd0/1t2hmk8v3//QJGUg+qr59/4y/MuVfIg4qfkPcC2QSvYWcK3oTf6SFi5rv9B1IOWFgN5D0+C+x/9Lb/myPYX+rbOHrwtJ4W1fWKoz9g7wwmGFA9IJ2DYGuH8ifVFbDFT1Vcgsvs8arSX7oBsJVW0qrP7XkuDRe3EqCmKW7rBEwYrFznhxZcRDEpMwbFoSvgSIZ4XhFY9VKYglT+JpNH5iDceYEBOQL4vBLpxNUk3l5jKaBNxVa14AIBxq18bVHJ+STInhLhad4u10v/Xbx7wIL3f9DX1yLAkPrpBYbNHS2/ew6H/ySDJnoIDxkw2zZ4qJ+qUJZ1S0lbZVG+VT0OP5uF6tyOSpbMlcGkdl3z254n6MlCrTifcwkzscysDsgKXaYQw06rzrPW6RDub+t+hXzGny799fS9jhQMLDmOggaQ7+LA4oEZsfT89HLMWxJYDqjo3gIfjciV2mV54R684qLDS+AO09U49e6yEbwGlq8lpmO/pbXCbpGbB1b3EomcQbxdWxW2WEkkEd/VBn81K4M3obmywwXJkw+tPXDXfBmzzaqqCR+onMQ5ME1nMkY8ybnfoCc1bDIupjVWsEL2Wvq752RgI6KqzVNr1ew1IdqV5AWN2fOfek+0vi3Jd9FHF3hx8JMwjJL9dZsETV5kHtYJtE7wJ23J68BnCt2eI0GEuwXcCf5EdSKN/xXCTlIokc4Qk/gzRdIZsvcEJ6B1lGovKG54X4IohikqTjiepjbsMWj38yxDmK3mtENZ9ci8FPfbbvIEcOCZIinuY3qFUlRSbx7VUerEoV1IP3clUwexVQo4lHFee2jd7ocWsdSqSapW7OWUupBtDzRkqVhE7tGria+i1W2d6YLlJ21QTjyapWJehAMO637OdbJCCzDs1cXbodRRE7bsP492ocJy8OX66rKdhYbg8srSFNKdb3pF3UDNbN9jhI/t8iagRhNBhlQtTr1me2E/c86Q18qcRXl4bcXTt6acgCeffK6Y26LcVlrgjlD33AEYRRUeyC+rpxbT0aMjdFderlndKRIyG23mSp0HaUwNzAfMAcGBSsOAwIaBBRlviCbIyRrhIysg2dc/KbLFTc2vQQUg4rfwHMM4IKYRD/fsd1x6dda+wQ=`, - // empty string password test case - "testing@example.com": `MIIJzgIBAzCCCZQGCSqGSIb3DQEHAaCCCYUEggmBMIIJfTCCA/cGCSqGSIb3DQEHBqCCA+gwggPk -AgEAMIID3QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIIszfRGqcmPcCAggAgIIDsOZ9Eg1L -s5Wx8JhYoV3HAL4aRnkAWvTYB5NISZOgSgIQTssmt/3A7134dibTmaT/93LikkL3cTKLnQzJ4wDf -YZ1bprpVJvUqz+HFT79m27bP9zYXFrvxWBJbxjYKTSjQMgz+h8LAEpXXGajCmxMJ1oCOtdXkhhzc -LdZN6SAYgtmtyFnCdMEDskSggGuLb3fw84QEJ/Sj6FAULXunW/CPaS7Ce0TMsKmNU/jfFWj3yXXw -ro0kwjKiVLpVFlnBlHo2OoVU7hmkm59YpGhLgS7nxLD3n7nBroQ0ID1+8R01NnV9XLGoGzxMm1te -6UyTCkr5mj+kEQ8EP1Ys7g/TC411uhVWySMt/rcpkx7Vz1r9kYEAzJpONAfr6cuEVkPKrxpq4Fh0 -2fzlKBky0i/hrfIEUmngh+ERHUb/Mtv/fkv1j5w9suESbhsMLLiCXAlsP1UWMX+3bNizi3WVMEts -FM2k9byn+p8IUD/A8ULlE4kEaWeoc+2idkCNQkLGuIdGUXUFVm58se0auUkVRoRJx8x4CkMesT8j -b1H831W66YRWoEwwDQp2kK1lA2vQXxdVHWlFevMNxJeromLzj3ayiaFrfByeUXhR2S+Hpm+c0yNR -4UVU9WED2kacsZcpRm9nlEa5sr28mri5JdBrNa/K02OOhvKCxr5ZGmbOVzUQKla2z4w+Ku9k8POm -dfDNU/fGx1b5hcFWtghXe3msWVsSJrQihnN6q1ughzNiYZlJUGcHdZDRtiWwCFI0bR8h/Dmg9uO9 -4rawQQrjIRT7B8yF3UbkZyAqs8Ppb1TsMeNPHh1rxEfGVQknh/48ouJYsmtbnzugTUt3mJCXXiL+ -XcPMV6bBVAUu4aaVKSmg9+yJtY4/VKv10iw88ktv29fViIdBe3t6l/oPuvQgbQ8dqf4T8w0l/uKZ -9lS1Na9jfT1vCoS7F5TRi+tmyj1vL5kr/amEIW6xKEP6oeAMvCMtbPAzVEj38zdJ1R22FfuIBxkh -f0Zl7pdVbmzRxl/SBx9iIBJSqAvcXItiT0FIj8HxQ+0iZKqMQMiBuNWJf5pYOLWGrIyntCWwHuaQ -wrx0sTGuEL9YXLEAsBDrsvzLkx/56E4INGZFrH8G7HBdW6iGqb22IMI4GHltYSyBRKbB0gadYTyv -abPEoqww8o7/85aPSzOTJ/53ozD438Q+d0u9SyDuOb60SzCD/zPuCEd78YgtXJwBYTuUNRT27FaM -3LGMX8Hz+6yPNRnmnA2XKPn7dx/IlaqAjIs8MIIFfgYJKoZIhvcNAQcBoIIFbwSCBWswggVnMIIF -YwYLKoZIhvcNAQwKAQKgggTuMIIE6jAcBgoqhkiG9w0BDAEDMA4ECJr0cClYqOlcAgIIAASCBMhe -OQSiP2s0/46ONXcNeVAkz2ksW3u/+qorhSiskGZ0b3dFa1hhgBU2Q7JVIkc4Hf7OXaT1eVQ8oqND -uhqsNz83/kqYo70+LS8Hocj49jFgWAKrf/yQkdyP1daHa2yzlEw4mkpqOfnIORQHvYCa8nEApspZ -wVu8y6WVuLHKU67mel7db2xwstQp7PRuSAYqGjTfAylElog8ASdaqqYbYIrCXucF8iF9oVgmb/Qo -xrXshJ9aSLO4MuXlTPELmWgj07AXKSb90FKNihE+y0bWb9LPVFY1Sly3AX9PfrtkSXIZwqW3phpv -MxGxQl/R6mr1z+hlTfY9Wdpb5vlKXPKA0L0Rt8d2pOesylFi6esJoS01QgP1kJILjbrV731kvDc0 -Jsd+Oxv4BMwA7ClG8w1EAOInc/GrV1MWFGw/HeEqj3CZ/l/0jv9bwkbVeVCiIhoL6P6lVx9pXq4t -KZ0uKg/tk5TVJmG2vLcMLvezD0Yk3G2ZOMrywtmskrwoF7oAUpO9e87szoH6fEvUZlkDkPVW1NV4 -cZk3DBSQiuA3VOOg8qbo/tx/EE3H59P0axZWno2GSB0wFPWd1aj+b//tJEJHaaNR6qPRj4IWj9ru -Qbc8eRAcVWleHg8uAehSvUXlFpyMQREyrnpvMGddpiTC8N4UMrrBRhV7+UbCOWhxPCbItnInBqgl -1JpSZIP7iUtsIMdu3fEC2cdbXMTRul+4rdzUR7F9OaezV3jjvcAbDvgbK1CpyC+MJ1Mxm/iTgk9V -iUArydhlR8OniN84GyGYoYCW9O/KUwb6ASmeFOu/msx8x6kAsSQHIkKqMKv0TUR3kZnkxUvdpBGP -KTl4YCTvNGX4dYALBqrAETRDhua2KVBD/kEttDHwBNVbN2xi81+Mc7ml461aADfk0c66R/m2sjHB -2tN9+wG12OIWFQjL6wF/UfJMYamxx2zOOExiId29Opt57uYiNVLOO4ourPewHPeH0u8Gz35aero7 -lkt7cZAe1Q0038JUuE/QGlnK4lESK9UkSIQAjSaAlTsrcfwtQxB2EjoOoLhwH5mvxUEmcNGNnXUc -9xj3M5BD3zBz3Ft7G3YMMDwB1+zC2l+0UG0MGVjMVaeoy32VVNvxgX7jk22OXG1iaOB+PY9kdk+O -X+52BGSf/rD6X0EnqY7XuRPkMGgjtpZeAYxRQnFtCZgDY4wYheuxqSSpdF49yNczSPLkgB3CeCfS -+9NTKN7aC6hBbmW/8yYh6OvSiCEwY0lFS/T+7iaVxr1loE4zI1y/FFp4Pe1qfLlLttVlkygga2UU -SCunTQ8UB/M5IXWKkhMOO11dP4niWwb39Y7pCWpau7mwbXOKfRPX96cgHnQJK5uG+BesDD1oYnX0 -6frN7FOnTSHKruRIwuI8KnOQ/I+owmyz71wiv5LMQt+yM47UrEjB/EZa5X8dpEwOZvkdqL7utcyo -l0XH5kWMXdW856LL/FYftAqJIDAmtX1TXF/rbP6mPyN/IlDC0gjP84Uzd/a2UyTIWr+wk49Ek3vQ -/uDamq6QrwAxVmNh5Tset5Vhpc1e1kb7mRMZIzxSP8JcTuYd45oFKi98I8YjvueHVZce1g7OudQP -SbFQoJvdT46iBg1TTatlltpOiH2mFaxWVS0xYjAjBgkqhkiG9w0BCRUxFgQUdA9eVqvETX4an/c8 -p8SsTugkit8wOwYJKoZIhvcNAQkUMS4eLABGAHIAaQBlAG4AZABsAHkAIABuAGEAbQBlACAAZgBv -AHIAIABjAGUAcgB0MDEwITAJBgUrDgMCGgUABBRFsNz3Zd1O1GI8GTuFwCWuDOjEEwQIuBEfIcAy -HQ8CAggA`, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/safebags.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/safebags.go deleted file mode 100644 index def1f7b98d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pkcs12/safebags.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "crypto/x509" - "encoding/asn1" - "errors" -) - -var ( - // see https://tools.ietf.org/html/rfc7292#appendix-D - oidCertTypeX509Certificate = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 22, 1}) - oidPKCS8ShroundedKeyBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 2}) - oidCertBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 3}) -) - -type certBag struct { - Id asn1.ObjectIdentifier - Data []byte `asn1:"tag:0,explicit"` -} - -func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) { - pkinfo := new(encryptedPrivateKeyInfo) - if err = unmarshal(asn1Data, pkinfo); err != nil { - return nil, errors.New("pkcs12: error decoding PKCS#8 shrouded key bag: " + err.Error()) - } - - pkData, err := pbDecrypt(pkinfo, password) - if err != nil { - return nil, errors.New("pkcs12: error decrypting PKCS#8 shrouded key bag: " + err.Error()) - } - - ret := new(asn1.RawValue) - if err = unmarshal(pkData, ret); err != nil { - return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error()) - } - - if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil { - return nil, errors.New("pkcs12: error parsing PKCS#8 private key: " + err.Error()) - } - - return privateKey, nil -} - -func decodeCertBag(asn1Data []byte) (x509Certificates []byte, err error) { - bag := new(certBag) - if err := unmarshal(asn1Data, bag); err != nil { - return nil, errors.New("pkcs12: error decoding cert bag: " + err.Error()) - } - if !bag.Id.Equal(oidCertTypeX509Certificate) { - return nil, NotImplementedError("only X509 certificates are supported") - } - return bag.Data, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305.go deleted file mode 100644 index 6d6be9a640..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 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 poly1305 implements Poly1305 one-time message authentication code as -specified in https://cr.yp.to/mac/poly1305-20050329.pdf. - -Poly1305 is a fast, one-time authentication function. It is infeasible for an -attacker to generate an authenticator for a message without the key. However, a -key must only be used for a single message. Authenticating two different -messages with the same key allows an attacker to forge authenticators for other -messages with the same key. - -Poly1305 was originally coupled with AES in order to make Poly1305-AES. AES was -used with a fixed key in order to generate one-time keys from an nonce. -However, in this package AES isn't used and the one-time key is specified -directly. -*/ -package poly1305 - -import "crypto/subtle" - -// TagSize is the size, in bytes, of a poly1305 authenticator. -const TagSize = 16 - -// Verify returns true if mac is a valid authenticator for m with the given -// key. -func Verify(mac *[16]byte, m []byte, key *[32]byte) bool { - var tmp [16]byte - Sum(&tmp, m, key) - return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1 -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305_test.go deleted file mode 100644 index 256bdbba2f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/poly1305_test.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2012 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 poly1305 - -import ( - "encoding/hex" - "flag" - "testing" - "unsafe" -) - -var stressFlag = flag.Bool("stress", false, "run slow stress tests") - -type test struct { - in string - key string - tag string -} - -func (t *test) Input() []byte { - in, err := hex.DecodeString(t.in) - if err != nil { - panic(err) - } - return in -} - -func (t *test) Key() [32]byte { - buf, err := hex.DecodeString(t.key) - if err != nil { - panic(err) - } - var key [32]byte - copy(key[:], buf[:32]) - return key -} - -func (t *test) Tag() [16]byte { - buf, err := hex.DecodeString(t.tag) - if err != nil { - panic(err) - } - var tag [16]byte - copy(tag[:], buf[:16]) - return tag -} - -func testSum(t *testing.T, unaligned bool, sumImpl func(tag *[TagSize]byte, msg []byte, key *[32]byte)) { - var tag [16]byte - for i, v := range testData { - in := v.Input() - if unaligned { - in = unalignBytes(in) - } - key := v.Key() - sumImpl(&tag, in, &key) - if tag != v.Tag() { - t.Errorf("%d: expected %x, got %x", i, v.Tag(), tag[:]) - } - } -} - -func TestBurnin(t *testing.T) { - // This test can be used to sanity-check significant changes. It can - // take about many minutes to run, even on fast machines. It's disabled - // by default. - if !*stressFlag { - t.Skip("skipping without -stress") - } - - var key [32]byte - var input [25]byte - var output [16]byte - - for i := range key { - key[i] = 1 - } - for i := range input { - input[i] = 2 - } - - for i := uint64(0); i < 1e10; i++ { - Sum(&output, input[:], &key) - copy(key[0:], output[:]) - copy(key[16:], output[:]) - copy(input[:], output[:]) - copy(input[16:], output[:]) - } - - const expected = "5e3b866aea0b636d240c83c428f84bfa" - if got := hex.EncodeToString(output[:]); got != expected { - t.Errorf("expected %s, got %s", expected, got) - } -} - -func TestSum(t *testing.T) { testSum(t, false, Sum) } -func TestSumUnaligned(t *testing.T) { testSum(t, true, Sum) } -func TestSumGeneric(t *testing.T) { testSum(t, false, sumGeneric) } -func TestSumGenericUnaligned(t *testing.T) { testSum(t, true, sumGeneric) } - -func benchmark(b *testing.B, size int, unaligned bool) { - var out [16]byte - var key [32]byte - in := make([]byte, size) - if unaligned { - in = unalignBytes(in) - } - b.SetBytes(int64(len(in))) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Sum(&out, in, &key) - } -} - -func Benchmark64(b *testing.B) { benchmark(b, 64, false) } -func Benchmark1K(b *testing.B) { benchmark(b, 1024, false) } -func Benchmark64Unaligned(b *testing.B) { benchmark(b, 64, true) } -func Benchmark1KUnaligned(b *testing.B) { benchmark(b, 1024, true) } -func Benchmark2M(b *testing.B) { benchmark(b, 2097152, true) } - -func unalignBytes(in []byte) []byte { - out := make([]byte, len(in)+1) - if uintptr(unsafe.Pointer(&out[0]))&(unsafe.Alignof(uint32(0))-1) == 0 { - out = out[1:] - } else { - out = out[:len(in)] - } - copy(out, in) - return out -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.go deleted file mode 100644 index 4dd72fe799..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2012 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. - -// +build amd64,!gccgo,!appengine - -package poly1305 - -// This function is implemented in sum_amd64.s -//go:noescape -func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) - -// Sum generates an authenticator for m using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - poly1305(out, mPtr, uint64(len(m)), key) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.s deleted file mode 100644 index 2edae63828..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_amd64.s +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2012 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. - -// +build amd64,!gccgo,!appengine - -#include "textflag.h" - -#define POLY1305_ADD(msg, h0, h1, h2) \ - ADDQ 0(msg), h0; \ - ADCQ 8(msg), h1; \ - ADCQ $1, h2; \ - LEAQ 16(msg), msg - -#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \ - MOVQ r0, AX; \ - MULQ h0; \ - MOVQ AX, t0; \ - MOVQ DX, t1; \ - MOVQ r0, AX; \ - MULQ h1; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ r0, t2; \ - IMULQ h2, t2; \ - ADDQ DX, t2; \ - \ - MOVQ r1, AX; \ - MULQ h0; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ DX, h0; \ - MOVQ r1, t3; \ - IMULQ h2, t3; \ - MOVQ r1, AX; \ - MULQ h1; \ - ADDQ AX, t2; \ - ADCQ DX, t3; \ - ADDQ h0, t2; \ - ADCQ $0, t3; \ - \ - MOVQ t0, h0; \ - MOVQ t1, h1; \ - MOVQ t2, h2; \ - ANDQ $3, h2; \ - MOVQ t2, t0; \ - ANDQ $0xFFFFFFFFFFFFFFFC, t0; \ - ADDQ t0, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2; \ - SHRQ $2, t3, t2; \ - SHRQ $2, t3; \ - ADDQ t2, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2 - -DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -GLOBL ·poly1305Mask<>(SB), RODATA, $16 - -// func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305(SB), $0-32 - MOVQ out+0(FP), DI - MOVQ m+8(FP), SI - MOVQ mlen+16(FP), R15 - MOVQ key+24(FP), AX - - MOVQ 0(AX), R11 - MOVQ 8(AX), R12 - ANDQ ·poly1305Mask<>(SB), R11 // r0 - ANDQ ·poly1305Mask<>+8(SB), R12 // r1 - XORQ R8, R8 // h0 - XORQ R9, R9 // h1 - XORQ R10, R10 // h2 - - CMPQ R15, $16 - JB bytes_between_0_and_15 - -loop: - POLY1305_ADD(SI, R8, R9, R10) - -multiply: - POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) - SUBQ $16, R15 - CMPQ R15, $16 - JAE loop - -bytes_between_0_and_15: - TESTQ R15, R15 - JZ done - MOVQ $1, BX - XORQ CX, CX - XORQ R13, R13 - ADDQ R15, SI - -flush_buffer: - SHLQ $8, BX, CX - SHLQ $8, BX - MOVB -1(SI), R13 - XORQ R13, BX - DECQ SI - DECQ R15 - JNZ flush_buffer - - ADDQ BX, R8 - ADCQ CX, R9 - ADCQ $0, R10 - MOVQ $16, R15 - JMP multiply - -done: - MOVQ R8, AX - MOVQ R9, BX - SUBQ $0xFFFFFFFFFFFFFFFB, AX - SBBQ $0xFFFFFFFFFFFFFFFF, BX - SBBQ $3, R10 - CMOVQCS R8, AX - CMOVQCS R9, BX - MOVQ key+24(FP), R8 - ADDQ 16(R8), AX - ADCQ 24(R8), BX - - MOVQ AX, 0(DI) - MOVQ BX, 8(DI) - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.go deleted file mode 100644 index 5dc321c2f3..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2015 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. - -// +build arm,!gccgo,!appengine,!nacl - -package poly1305 - -// This function is implemented in sum_arm.s -//go:noescape -func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) - -// Sum generates an authenticator for m using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.s deleted file mode 100644 index f70b4ac484..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_arm.s +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright 2015 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. - -// +build arm,!gccgo,!appengine,!nacl - -#include "textflag.h" - -// This code was translated into a form compatible with 5a from the public -// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305. - -DATA ·poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff -DATA ·poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03 -DATA ·poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff -DATA ·poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff -DATA ·poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff -GLOBL ·poly1305_init_constants_armv6<>(SB), 8, $20 - -// Warning: the linker may use R11 to synthesize certain instructions. Please -// take care and verify that no synthetic instructions use it. - -TEXT poly1305_init_ext_armv6<>(SB), NOSPLIT, $0 - // Needs 16 bytes of stack and 64 bytes of space pointed to by R0. (It - // might look like it's only 60 bytes of space but the final four bytes - // will be written by another function.) We need to skip over four - // bytes of stack because that's saving the value of 'g'. - ADD $4, R13, R8 - MOVM.IB [R4-R7], (R8) - MOVM.IA.W (R1), [R2-R5] - MOVW $·poly1305_init_constants_armv6<>(SB), R7 - MOVW R2, R8 - MOVW R2>>26, R9 - MOVW R3>>20, g - MOVW R4>>14, R11 - MOVW R5>>8, R12 - ORR R3<<6, R9, R9 - ORR R4<<12, g, g - ORR R5<<18, R11, R11 - MOVM.IA (R7), [R2-R6] - AND R8, R2, R2 - AND R9, R3, R3 - AND g, R4, R4 - AND R11, R5, R5 - AND R12, R6, R6 - MOVM.IA.W [R2-R6], (R0) - EOR R2, R2, R2 - EOR R3, R3, R3 - EOR R4, R4, R4 - EOR R5, R5, R5 - EOR R6, R6, R6 - MOVM.IA.W [R2-R6], (R0) - MOVM.IA.W (R1), [R2-R5] - MOVM.IA [R2-R6], (R0) - ADD $20, R13, R0 - MOVM.DA (R0), [R4-R7] - RET - -#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \ - MOVBU (offset+0)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+0)(Rdst); \ - MOVBU (offset+1)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+1)(Rdst); \ - MOVBU (offset+2)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+2)(Rdst); \ - MOVBU (offset+3)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+3)(Rdst) - -TEXT poly1305_blocks_armv6<>(SB), NOSPLIT, $0 - // Needs 24 bytes of stack for saved registers and then 88 bytes of - // scratch space after that. We assume that 24 bytes at (R13) have - // already been used: four bytes for the link register saved in the - // prelude of poly1305_auth_armv6, four bytes for saving the value of g - // in that function and 16 bytes of scratch space used around - // poly1305_finish_ext_armv6_skip1. - ADD $24, R13, R12 - MOVM.IB [R4-R8, R14], (R12) - MOVW R0, 88(R13) - MOVW R1, 92(R13) - MOVW R2, 96(R13) - MOVW R1, R14 - MOVW R2, R12 - MOVW 56(R0), R8 - WORD $0xe1180008 // TST R8, R8 not working see issue 5921 - EOR R6, R6, R6 - MOVW.EQ $(1<<24), R6 - MOVW R6, 84(R13) - ADD $116, R13, g - MOVM.IA (R0), [R0-R9] - MOVM.IA [R0-R4], (g) - CMP $16, R12 - BLO poly1305_blocks_armv6_done - -poly1305_blocks_armv6_mainloop: - WORD $0xe31e0003 // TST R14, #3 not working see issue 5921 - BEQ poly1305_blocks_armv6_mainloop_aligned - ADD $100, R13, g - MOVW_UNALIGNED(R14, g, R0, 0) - MOVW_UNALIGNED(R14, g, R0, 4) - MOVW_UNALIGNED(R14, g, R0, 8) - MOVW_UNALIGNED(R14, g, R0, 12) - MOVM.IA (g), [R0-R3] - ADD $16, R14 - B poly1305_blocks_armv6_mainloop_loaded - -poly1305_blocks_armv6_mainloop_aligned: - MOVM.IA.W (R14), [R0-R3] - -poly1305_blocks_armv6_mainloop_loaded: - MOVW R0>>26, g - MOVW R1>>20, R11 - MOVW R2>>14, R12 - MOVW R14, 92(R13) - MOVW R3>>8, R4 - ORR R1<<6, g, g - ORR R2<<12, R11, R11 - ORR R3<<18, R12, R12 - BIC $0xfc000000, R0, R0 - BIC $0xfc000000, g, g - MOVW 84(R13), R3 - BIC $0xfc000000, R11, R11 - BIC $0xfc000000, R12, R12 - ADD R0, R5, R5 - ADD g, R6, R6 - ORR R3, R4, R4 - ADD R11, R7, R7 - ADD $116, R13, R14 - ADD R12, R8, R8 - ADD R4, R9, R9 - MOVM.IA (R14), [R0-R4] - MULLU R4, R5, (R11, g) - MULLU R3, R5, (R14, R12) - MULALU R3, R6, (R11, g) - MULALU R2, R6, (R14, R12) - MULALU R2, R7, (R11, g) - MULALU R1, R7, (R14, R12) - ADD R4<<2, R4, R4 - ADD R3<<2, R3, R3 - MULALU R1, R8, (R11, g) - MULALU R0, R8, (R14, R12) - MULALU R0, R9, (R11, g) - MULALU R4, R9, (R14, R12) - MOVW g, 76(R13) - MOVW R11, 80(R13) - MOVW R12, 68(R13) - MOVW R14, 72(R13) - MULLU R2, R5, (R11, g) - MULLU R1, R5, (R14, R12) - MULALU R1, R6, (R11, g) - MULALU R0, R6, (R14, R12) - MULALU R0, R7, (R11, g) - MULALU R4, R7, (R14, R12) - ADD R2<<2, R2, R2 - ADD R1<<2, R1, R1 - MULALU R4, R8, (R11, g) - MULALU R3, R8, (R14, R12) - MULALU R3, R9, (R11, g) - MULALU R2, R9, (R14, R12) - MOVW g, 60(R13) - MOVW R11, 64(R13) - MOVW R12, 52(R13) - MOVW R14, 56(R13) - MULLU R0, R5, (R11, g) - MULALU R4, R6, (R11, g) - MULALU R3, R7, (R11, g) - MULALU R2, R8, (R11, g) - MULALU R1, R9, (R11, g) - ADD $52, R13, R0 - MOVM.IA (R0), [R0-R7] - MOVW g>>26, R12 - MOVW R4>>26, R14 - ORR R11<<6, R12, R12 - ORR R5<<6, R14, R14 - BIC $0xfc000000, g, g - BIC $0xfc000000, R4, R4 - ADD.S R12, R0, R0 - ADC $0, R1, R1 - ADD.S R14, R6, R6 - ADC $0, R7, R7 - MOVW R0>>26, R12 - MOVW R6>>26, R14 - ORR R1<<6, R12, R12 - ORR R7<<6, R14, R14 - BIC $0xfc000000, R0, R0 - BIC $0xfc000000, R6, R6 - ADD R14<<2, R14, R14 - ADD.S R12, R2, R2 - ADC $0, R3, R3 - ADD R14, g, g - MOVW R2>>26, R12 - MOVW g>>26, R14 - ORR R3<<6, R12, R12 - BIC $0xfc000000, g, R5 - BIC $0xfc000000, R2, R7 - ADD R12, R4, R4 - ADD R14, R0, R0 - MOVW R4>>26, R12 - BIC $0xfc000000, R4, R8 - ADD R12, R6, R9 - MOVW 96(R13), R12 - MOVW 92(R13), R14 - MOVW R0, R6 - CMP $32, R12 - SUB $16, R12, R12 - MOVW R12, 96(R13) - BHS poly1305_blocks_armv6_mainloop - -poly1305_blocks_armv6_done: - MOVW 88(R13), R12 - MOVW R5, 20(R12) - MOVW R6, 24(R12) - MOVW R7, 28(R12) - MOVW R8, 32(R12) - MOVW R9, 36(R12) - ADD $48, R13, R0 - MOVM.DA (R0), [R4-R8, R14] - RET - -#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \ - MOVBU.P 1(Rsrc), Rtmp; \ - MOVBU.P Rtmp, 1(Rdst); \ - MOVBU.P 1(Rsrc), Rtmp; \ - MOVBU.P Rtmp, 1(Rdst) - -#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \ - MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \ - MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) - -// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key) -TEXT ·poly1305_auth_armv6(SB), $196-16 - // The value 196, just above, is the sum of 64 (the size of the context - // structure) and 132 (the amount of stack needed). - // - // At this point, the stack pointer (R13) has been moved down. It - // points to the saved link register and there's 196 bytes of free - // space above it. - // - // The stack for this function looks like: - // - // +--------------------- - // | - // | 64 bytes of context structure - // | - // +--------------------- - // | - // | 112 bytes for poly1305_blocks_armv6 - // | - // +--------------------- - // | 16 bytes of final block, constructed at - // | poly1305_finish_ext_armv6_skip8 - // +--------------------- - // | four bytes of saved 'g' - // +--------------------- - // | lr, saved by prelude <- R13 points here - // +--------------------- - MOVW g, 4(R13) - - MOVW out+0(FP), R4 - MOVW m+4(FP), R5 - MOVW mlen+8(FP), R6 - MOVW key+12(FP), R7 - - ADD $136, R13, R0 // 136 = 4 + 4 + 16 + 112 - MOVW R7, R1 - - // poly1305_init_ext_armv6 will write to the stack from R13+4, but - // that's ok because none of the other values have been written yet. - BL poly1305_init_ext_armv6<>(SB) - BIC.S $15, R6, R2 - BEQ poly1305_auth_armv6_noblocks - ADD $136, R13, R0 - MOVW R5, R1 - ADD R2, R5, R5 - SUB R2, R6, R6 - BL poly1305_blocks_armv6<>(SB) - -poly1305_auth_armv6_noblocks: - ADD $136, R13, R0 - MOVW R5, R1 - MOVW R6, R2 - MOVW R4, R3 - - MOVW R0, R5 - MOVW R1, R6 - MOVW R2, R7 - MOVW R3, R8 - AND.S R2, R2, R2 - BEQ poly1305_finish_ext_armv6_noremaining - EOR R0, R0 - ADD $8, R13, R9 // 8 = offset to 16 byte scratch space - MOVW R0, (R9) - MOVW R0, 4(R9) - MOVW R0, 8(R9) - MOVW R0, 12(R9) - WORD $0xe3110003 // TST R1, #3 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_aligned - WORD $0xe3120008 // TST R2, #8 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip8 - MOVWP_UNALIGNED(R1, R9, g) - MOVWP_UNALIGNED(R1, R9, g) - -poly1305_finish_ext_armv6_skip8: - WORD $0xe3120004 // TST $4, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip4 - MOVWP_UNALIGNED(R1, R9, g) - -poly1305_finish_ext_armv6_skip4: - WORD $0xe3120002 // TST $2, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip2 - MOVHUP_UNALIGNED(R1, R9, g) - B poly1305_finish_ext_armv6_skip2 - -poly1305_finish_ext_armv6_aligned: - WORD $0xe3120008 // TST R2, #8 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip8_aligned - MOVM.IA.W (R1), [g-R11] - MOVM.IA.W [g-R11], (R9) - -poly1305_finish_ext_armv6_skip8_aligned: - WORD $0xe3120004 // TST $4, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip4_aligned - MOVW.P 4(R1), g - MOVW.P g, 4(R9) - -poly1305_finish_ext_armv6_skip4_aligned: - WORD $0xe3120002 // TST $2, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip2 - MOVHU.P 2(R1), g - MOVH.P g, 2(R9) - -poly1305_finish_ext_armv6_skip2: - WORD $0xe3120001 // TST $1, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip1 - MOVBU.P 1(R1), g - MOVBU.P g, 1(R9) - -poly1305_finish_ext_armv6_skip1: - MOVW $1, R11 - MOVBU R11, 0(R9) - MOVW R11, 56(R5) - MOVW R5, R0 - ADD $8, R13, R1 - MOVW $16, R2 - BL poly1305_blocks_armv6<>(SB) - -poly1305_finish_ext_armv6_noremaining: - MOVW 20(R5), R0 - MOVW 24(R5), R1 - MOVW 28(R5), R2 - MOVW 32(R5), R3 - MOVW 36(R5), R4 - MOVW R4>>26, R12 - BIC $0xfc000000, R4, R4 - ADD R12<<2, R12, R12 - ADD R12, R0, R0 - MOVW R0>>26, R12 - BIC $0xfc000000, R0, R0 - ADD R12, R1, R1 - MOVW R1>>26, R12 - BIC $0xfc000000, R1, R1 - ADD R12, R2, R2 - MOVW R2>>26, R12 - BIC $0xfc000000, R2, R2 - ADD R12, R3, R3 - MOVW R3>>26, R12 - BIC $0xfc000000, R3, R3 - ADD R12, R4, R4 - ADD $5, R0, R6 - MOVW R6>>26, R12 - BIC $0xfc000000, R6, R6 - ADD R12, R1, R7 - MOVW R7>>26, R12 - BIC $0xfc000000, R7, R7 - ADD R12, R2, g - MOVW g>>26, R12 - BIC $0xfc000000, g, g - ADD R12, R3, R11 - MOVW $-(1<<26), R12 - ADD R11>>26, R12, R12 - BIC $0xfc000000, R11, R11 - ADD R12, R4, R9 - MOVW R9>>31, R12 - SUB $1, R12 - AND R12, R6, R6 - AND R12, R7, R7 - AND R12, g, g - AND R12, R11, R11 - AND R12, R9, R9 - MVN R12, R12 - AND R12, R0, R0 - AND R12, R1, R1 - AND R12, R2, R2 - AND R12, R3, R3 - AND R12, R4, R4 - ORR R6, R0, R0 - ORR R7, R1, R1 - ORR g, R2, R2 - ORR R11, R3, R3 - ORR R9, R4, R4 - ORR R1<<26, R0, R0 - MOVW R1>>6, R1 - ORR R2<<20, R1, R1 - MOVW R2>>12, R2 - ORR R3<<14, R2, R2 - MOVW R3>>18, R3 - ORR R4<<8, R3, R3 - MOVW 40(R5), R6 - MOVW 44(R5), R7 - MOVW 48(R5), g - MOVW 52(R5), R11 - ADD.S R6, R0, R0 - ADC.S R7, R1, R1 - ADC.S g, R2, R2 - ADC.S R11, R3, R3 - MOVM.IA [R0-R3], (R8) - MOVW R5, R12 - EOR R0, R0, R0 - EOR R1, R1, R1 - EOR R2, R2, R2 - EOR R3, R3, R3 - EOR R4, R4, R4 - EOR R5, R5, R5 - EOR R6, R6, R6 - EOR R7, R7, R7 - MOVM.IA.W [R0-R7], (R12) - MOVM.IA [R0-R7], (R12) - MOVW 4(R13), g - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_noasm.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_noasm.go deleted file mode 100644 index 751eec5274..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_noasm.go +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// +build s390x,!go1.11 !arm,!amd64,!s390x gccgo appengine nacl - -package poly1305 - -// Sum generates an authenticator for msg using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) { - sumGeneric(out, msg, key) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_ref.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_ref.go deleted file mode 100644 index c4d59bd098..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_ref.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2012 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 poly1305 - -import "encoding/binary" - -// sumGeneric generates an authenticator for msg using a one-time key and -// puts the 16-byte result into out. This is the generic implementation of -// Sum and should be called if no assembly implementation is available. -func sumGeneric(out *[TagSize]byte, msg []byte, key *[32]byte) { - var ( - h0, h1, h2, h3, h4 uint32 // the hash accumulators - r0, r1, r2, r3, r4 uint64 // the r part of the key - ) - - r0 = uint64(binary.LittleEndian.Uint32(key[0:]) & 0x3ffffff) - r1 = uint64((binary.LittleEndian.Uint32(key[3:]) >> 2) & 0x3ffff03) - r2 = uint64((binary.LittleEndian.Uint32(key[6:]) >> 4) & 0x3ffc0ff) - r3 = uint64((binary.LittleEndian.Uint32(key[9:]) >> 6) & 0x3f03fff) - r4 = uint64((binary.LittleEndian.Uint32(key[12:]) >> 8) & 0x00fffff) - - R1, R2, R3, R4 := r1*5, r2*5, r3*5, r4*5 - - for len(msg) >= TagSize { - // h += msg - h0 += binary.LittleEndian.Uint32(msg[0:]) & 0x3ffffff - h1 += (binary.LittleEndian.Uint32(msg[3:]) >> 2) & 0x3ffffff - h2 += (binary.LittleEndian.Uint32(msg[6:]) >> 4) & 0x3ffffff - h3 += (binary.LittleEndian.Uint32(msg[9:]) >> 6) & 0x3ffffff - h4 += (binary.LittleEndian.Uint32(msg[12:]) >> 8) | (1 << 24) - - // h *= r - d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1) - d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2) - d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3) - d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4) - d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0) - - // h %= p - h0 = uint32(d0) & 0x3ffffff - h1 = uint32(d1) & 0x3ffffff - h2 = uint32(d2) & 0x3ffffff - h3 = uint32(d3) & 0x3ffffff - h4 = uint32(d4) & 0x3ffffff - - h0 += uint32(d4>>26) * 5 - h1 += h0 >> 26 - h0 = h0 & 0x3ffffff - - msg = msg[TagSize:] - } - - if len(msg) > 0 { - var block [TagSize]byte - off := copy(block[:], msg) - block[off] = 0x01 - - // h += msg - h0 += binary.LittleEndian.Uint32(block[0:]) & 0x3ffffff - h1 += (binary.LittleEndian.Uint32(block[3:]) >> 2) & 0x3ffffff - h2 += (binary.LittleEndian.Uint32(block[6:]) >> 4) & 0x3ffffff - h3 += (binary.LittleEndian.Uint32(block[9:]) >> 6) & 0x3ffffff - h4 += (binary.LittleEndian.Uint32(block[12:]) >> 8) - - // h *= r - d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1) - d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2) - d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3) - d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4) - d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0) - - // h %= p - h0 = uint32(d0) & 0x3ffffff - h1 = uint32(d1) & 0x3ffffff - h2 = uint32(d2) & 0x3ffffff - h3 = uint32(d3) & 0x3ffffff - h4 = uint32(d4) & 0x3ffffff - - h0 += uint32(d4>>26) * 5 - h1 += h0 >> 26 - h0 = h0 & 0x3ffffff - } - - // h %= p reduction - h2 += h1 >> 26 - h1 &= 0x3ffffff - h3 += h2 >> 26 - h2 &= 0x3ffffff - h4 += h3 >> 26 - h3 &= 0x3ffffff - h0 += 5 * (h4 >> 26) - h4 &= 0x3ffffff - h1 += h0 >> 26 - h0 &= 0x3ffffff - - // h - p - t0 := h0 + 5 - t1 := h1 + (t0 >> 26) - t2 := h2 + (t1 >> 26) - t3 := h3 + (t2 >> 26) - t4 := h4 + (t3 >> 26) - (1 << 26) - t0 &= 0x3ffffff - t1 &= 0x3ffffff - t2 &= 0x3ffffff - t3 &= 0x3ffffff - - // select h if h < p else h - p - t_mask := (t4 >> 31) - 1 - h_mask := ^t_mask - h0 = (h0 & h_mask) | (t0 & t_mask) - h1 = (h1 & h_mask) | (t1 & t_mask) - h2 = (h2 & h_mask) | (t2 & t_mask) - h3 = (h3 & h_mask) | (t3 & t_mask) - h4 = (h4 & h_mask) | (t4 & t_mask) - - // h %= 2^128 - h0 |= h1 << 26 - h1 = ((h1 >> 6) | (h2 << 20)) - h2 = ((h2 >> 12) | (h3 << 14)) - h3 = ((h3 >> 18) | (h4 << 8)) - - // s: the s part of the key - // tag = (h + s) % (2^128) - t := uint64(h0) + uint64(binary.LittleEndian.Uint32(key[16:])) - h0 = uint32(t) - t = uint64(h1) + uint64(binary.LittleEndian.Uint32(key[20:])) + (t >> 32) - h1 = uint32(t) - t = uint64(h2) + uint64(binary.LittleEndian.Uint32(key[24:])) + (t >> 32) - h2 = uint32(t) - t = uint64(h3) + uint64(binary.LittleEndian.Uint32(key[28:])) + (t >> 32) - h3 = uint32(t) - - binary.LittleEndian.PutUint32(out[0:], h0) - binary.LittleEndian.PutUint32(out[4:], h1) - binary.LittleEndian.PutUint32(out[8:], h2) - binary.LittleEndian.PutUint32(out[12:], h3) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.go deleted file mode 100644 index 7a266cece4..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.go +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -// +build s390x,go1.11,!gccgo,!appengine - -package poly1305 - -// hasVectorFacility reports whether the machine supports -// the vector facility (vx). -func hasVectorFacility() bool - -// hasVMSLFacility reports whether the machine supports -// Vector Multiply Sum Logical (VMSL). -func hasVMSLFacility() bool - -var hasVX = hasVectorFacility() -var hasVMSL = hasVMSLFacility() - -// poly1305vx is an assembly implementation of Poly1305 that uses vector -// instructions. It must only be called if the vector facility (vx) is -// available. -//go:noescape -func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]byte) - -// poly1305vmsl is an assembly implementation of Poly1305 that uses vector -// instructions, including VMSL. It must only be called if the vector facility (vx) is -// available and if VMSL is supported. -//go:noescape -func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]byte) - -// Sum generates an authenticator for m using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - if hasVX { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - if hasVMSL && len(m) > 256 { - poly1305vmsl(out, mPtr, uint64(len(m)), key) - } else { - poly1305vx(out, mPtr, uint64(len(m)), key) - } - } else { - sumGeneric(out, m, key) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.s deleted file mode 100644 index 356c07a6c2..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_s390x.s +++ /dev/null @@ -1,400 +0,0 @@ -// 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. - -// +build s390x,go1.11,!gccgo,!appengine - -#include "textflag.h" - -// Implementation of Poly1305 using the vector facility (vx). - -// constants -#define MOD26 V0 -#define EX0 V1 -#define EX1 V2 -#define EX2 V3 - -// temporaries -#define T_0 V4 -#define T_1 V5 -#define T_2 V6 -#define T_3 V7 -#define T_4 V8 - -// key (r) -#define R_0 V9 -#define R_1 V10 -#define R_2 V11 -#define R_3 V12 -#define R_4 V13 -#define R5_1 V14 -#define R5_2 V15 -#define R5_3 V16 -#define R5_4 V17 -#define RSAVE_0 R5 -#define RSAVE_1 R6 -#define RSAVE_2 R7 -#define RSAVE_3 R8 -#define RSAVE_4 R9 -#define R5SAVE_1 V28 -#define R5SAVE_2 V29 -#define R5SAVE_3 V30 -#define R5SAVE_4 V31 - -// message block -#define F_0 V18 -#define F_1 V19 -#define F_2 V20 -#define F_3 V21 -#define F_4 V22 - -// accumulator -#define H_0 V23 -#define H_1 V24 -#define H_2 V25 -#define H_3 V26 -#define H_4 V27 - -GLOBL ·keyMask<>(SB), RODATA, $16 -DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f -DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f - -GLOBL ·bswapMask<>(SB), RODATA, $16 -DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908 -DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100 - -GLOBL ·constants<>(SB), RODATA, $64 -// MOD26 -DATA ·constants<>+0(SB)/8, $0x3ffffff -DATA ·constants<>+8(SB)/8, $0x3ffffff -// EX0 -DATA ·constants<>+16(SB)/8, $0x0006050403020100 -DATA ·constants<>+24(SB)/8, $0x1016151413121110 -// EX1 -DATA ·constants<>+32(SB)/8, $0x060c0b0a09080706 -DATA ·constants<>+40(SB)/8, $0x161c1b1a19181716 -// EX2 -DATA ·constants<>+48(SB)/8, $0x0d0d0d0d0d0f0e0d -DATA ·constants<>+56(SB)/8, $0x1d1d1d1d1d1f1e1d - -// h = (f*g) % (2**130-5) [partial reduction] -#define MULTIPLY(f0, f1, f2, f3, f4, g0, g1, g2, g3, g4, g51, g52, g53, g54, h0, h1, h2, h3, h4) \ - VMLOF f0, g0, h0 \ - VMLOF f0, g1, h1 \ - VMLOF f0, g2, h2 \ - VMLOF f0, g3, h3 \ - VMLOF f0, g4, h4 \ - VMLOF f1, g54, T_0 \ - VMLOF f1, g0, T_1 \ - VMLOF f1, g1, T_2 \ - VMLOF f1, g2, T_3 \ - VMLOF f1, g3, T_4 \ - VMALOF f2, g53, h0, h0 \ - VMALOF f2, g54, h1, h1 \ - VMALOF f2, g0, h2, h2 \ - VMALOF f2, g1, h3, h3 \ - VMALOF f2, g2, h4, h4 \ - VMALOF f3, g52, T_0, T_0 \ - VMALOF f3, g53, T_1, T_1 \ - VMALOF f3, g54, T_2, T_2 \ - VMALOF f3, g0, T_3, T_3 \ - VMALOF f3, g1, T_4, T_4 \ - VMALOF f4, g51, h0, h0 \ - VMALOF f4, g52, h1, h1 \ - VMALOF f4, g53, h2, h2 \ - VMALOF f4, g54, h3, h3 \ - VMALOF f4, g0, h4, h4 \ - VAG T_0, h0, h0 \ - VAG T_1, h1, h1 \ - VAG T_2, h2, h2 \ - VAG T_3, h3, h3 \ - VAG T_4, h4, h4 - -// carry h0->h1 h3->h4, h1->h2 h4->h0, h0->h1 h2->h3, h3->h4 -#define REDUCE(h0, h1, h2, h3, h4) \ - VESRLG $26, h0, T_0 \ - VESRLG $26, h3, T_1 \ - VN MOD26, h0, h0 \ - VN MOD26, h3, h3 \ - VAG T_0, h1, h1 \ - VAG T_1, h4, h4 \ - VESRLG $26, h1, T_2 \ - VESRLG $26, h4, T_3 \ - VN MOD26, h1, h1 \ - VN MOD26, h4, h4 \ - VESLG $2, T_3, T_4 \ - VAG T_3, T_4, T_4 \ - VAG T_2, h2, h2 \ - VAG T_4, h0, h0 \ - VESRLG $26, h2, T_0 \ - VESRLG $26, h0, T_1 \ - VN MOD26, h2, h2 \ - VN MOD26, h0, h0 \ - VAG T_0, h3, h3 \ - VAG T_1, h1, h1 \ - VESRLG $26, h3, T_2 \ - VN MOD26, h3, h3 \ - VAG T_2, h4, h4 - -// expand in0 into d[0] and in1 into d[1] -#define EXPAND(in0, in1, d0, d1, d2, d3, d4) \ - VGBM $0x0707, d1 \ // d1=tmp - VPERM in0, in1, EX2, d4 \ - VPERM in0, in1, EX0, d0 \ - VPERM in0, in1, EX1, d2 \ - VN d1, d4, d4 \ - VESRLG $26, d0, d1 \ - VESRLG $30, d2, d3 \ - VESRLG $4, d2, d2 \ - VN MOD26, d0, d0 \ - VN MOD26, d1, d1 \ - VN MOD26, d2, d2 \ - VN MOD26, d3, d3 - -// pack h4:h0 into h1:h0 (no carry) -#define PACK(h0, h1, h2, h3, h4) \ - VESLG $26, h1, h1 \ - VESLG $26, h3, h3 \ - VO h0, h1, h0 \ - VO h2, h3, h2 \ - VESLG $4, h2, h2 \ - VLEIB $7, $48, h1 \ - VSLB h1, h2, h2 \ - VO h0, h2, h0 \ - VLEIB $7, $104, h1 \ - VSLB h1, h4, h3 \ - VO h3, h0, h0 \ - VLEIB $7, $24, h1 \ - VSRLB h1, h4, h1 - -// if h > 2**130-5 then h -= 2**130-5 -#define MOD(h0, h1, t0, t1, t2) \ - VZERO t0 \ - VLEIG $1, $5, t0 \ - VACCQ h0, t0, t1 \ - VAQ h0, t0, t0 \ - VONE t2 \ - VLEIG $1, $-4, t2 \ - VAQ t2, t1, t1 \ - VACCQ h1, t1, t1 \ - VONE t2 \ - VAQ t2, t1, t1 \ - VN h0, t1, t2 \ - VNC t0, t1, t1 \ - VO t1, t2, h0 - -// func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305vx(SB), $0-32 - // This code processes up to 2 blocks (32 bytes) per iteration - // using the algorithm described in: - // NEON crypto, Daniel J. Bernstein & Peter Schwabe - // https://cryptojedi.org/papers/neoncrypto-20120320.pdf - LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key - - // load MOD26, EX0, EX1 and EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), MOD26, EX2 - - // setup r - VL (R4), T_0 - MOVD $·keyMask<>(SB), R6 - VL (R6), T_1 - VN T_0, T_1, T_0 - EXPAND(T_0, T_0, R_0, R_1, R_2, R_3, R_4) - - // setup r*5 - VLEIG $0, $5, T_0 - VLEIG $1, $5, T_0 - - // store r (for final block) - VMLOF T_0, R_1, R5SAVE_1 - VMLOF T_0, R_2, R5SAVE_2 - VMLOF T_0, R_3, R5SAVE_3 - VMLOF T_0, R_4, R5SAVE_4 - VLGVG $0, R_0, RSAVE_0 - VLGVG $0, R_1, RSAVE_1 - VLGVG $0, R_2, RSAVE_2 - VLGVG $0, R_3, RSAVE_3 - VLGVG $0, R_4, RSAVE_4 - - // skip r**2 calculation - CMPBLE R3, $16, skip - - // calculate r**2 - MULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5SAVE_1, R5SAVE_2, R5SAVE_3, R5SAVE_4, H_0, H_1, H_2, H_3, H_4) - REDUCE(H_0, H_1, H_2, H_3, H_4) - VLEIG $0, $5, T_0 - VLEIG $1, $5, T_0 - VMLOF T_0, H_1, R5_1 - VMLOF T_0, H_2, R5_2 - VMLOF T_0, H_3, R5_3 - VMLOF T_0, H_4, R5_4 - VLR H_0, R_0 - VLR H_1, R_1 - VLR H_2, R_2 - VLR H_3, R_3 - VLR H_4, R_4 - - // initialize h - VZERO H_0 - VZERO H_1 - VZERO H_2 - VZERO H_3 - VZERO H_4 - -loop: - CMPBLE R3, $32, b2 - VLM (R2), T_0, T_1 - SUB $32, R3 - MOVD $32(R2), R2 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - VLEIB $4, $1, F_4 - VLEIB $12, $1, F_4 - -multiply: - VAG H_0, F_0, F_0 - VAG H_1, F_1, F_1 - VAG H_2, F_2, F_2 - VAG H_3, F_3, F_3 - VAG H_4, F_4, F_4 - MULTIPLY(F_0, F_1, F_2, F_3, F_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4) - REDUCE(H_0, H_1, H_2, H_3, H_4) - CMPBNE R3, $0, loop - -finish: - // sum vectors - VZERO T_0 - VSUMQG H_0, T_0, H_0 - VSUMQG H_1, T_0, H_1 - VSUMQG H_2, T_0, H_2 - VSUMQG H_3, T_0, H_3 - VSUMQG H_4, T_0, H_4 - - // h may be >= 2*(2**130-5) so we need to reduce it again - REDUCE(H_0, H_1, H_2, H_3, H_4) - - // carry h1->h4 - VESRLG $26, H_1, T_1 - VN MOD26, H_1, H_1 - VAQ T_1, H_2, H_2 - VESRLG $26, H_2, T_2 - VN MOD26, H_2, H_2 - VAQ T_2, H_3, H_3 - VESRLG $26, H_3, T_3 - VN MOD26, H_3, H_3 - VAQ T_3, H_4, H_4 - - // h is now < 2*(2**130-5) - // pack h into h1 (hi) and h0 (lo) - PACK(H_0, H_1, H_2, H_3, H_4) - - // if h > 2**130-5 then h -= 2**130-5 - MOD(H_0, H_1, T_0, T_1, T_2) - - // h += s - MOVD $·bswapMask<>(SB), R5 - VL (R5), T_1 - VL 16(R4), T_0 - VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big) - VAQ T_0, H_0, H_0 - VPERM H_0, H_0, T_1, H_0 // reverse bytes (to little) - VST H_0, (R1) - - RET - -b2: - CMPBLE R3, $16, b1 - - // 2 blocks remaining - SUB $17, R3 - VL (R2), T_0 - VLL R3, 16(R2), T_1 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, T_1 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - CMPBNE R3, $16, 2(PC) - VLEIB $12, $1, F_4 - VLEIB $4, $1, F_4 - - // setup [r²,r] - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, RSAVE_3, R_3 - VLVGG $1, RSAVE_4, R_4 - VPDI $0, R5_1, R5SAVE_1, R5_1 - VPDI $0, R5_2, R5SAVE_2, R5_2 - VPDI $0, R5_3, R5SAVE_3, R5_3 - VPDI $0, R5_4, R5SAVE_4, R5_4 - - MOVD $0, R3 - BR multiply - -skip: - VZERO H_0 - VZERO H_1 - VZERO H_2 - VZERO H_3 - VZERO H_4 - - CMPBEQ R3, $0, finish - -b1: - // 1 block remaining - SUB $1, R3 - VLL R3, (R2), T_0 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, T_0 - VZERO T_1 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - CMPBNE R3, $16, 2(PC) - VLEIB $4, $1, F_4 - VLEIG $1, $1, R_0 - VZERO R_1 - VZERO R_2 - VZERO R_3 - VZERO R_4 - VZERO R5_1 - VZERO R5_2 - VZERO R5_3 - VZERO R5_4 - - // setup [r, 1] - VLVGG $0, RSAVE_0, R_0 - VLVGG $0, RSAVE_1, R_1 - VLVGG $0, RSAVE_2, R_2 - VLVGG $0, RSAVE_3, R_3 - VLVGG $0, RSAVE_4, R_4 - VPDI $0, R5SAVE_1, R5_1, R5_1 - VPDI $0, R5SAVE_2, R5_2, R5_2 - VPDI $0, R5SAVE_3, R5_3, R5_3 - VPDI $0, R5SAVE_4, R5_4, R5_4 - - MOVD $0, R3 - BR multiply - -TEXT ·hasVectorFacility(SB), NOSPLIT, $24-1 - MOVD $x-24(SP), R1 - XC $24, 0(R1), 0(R1) // clear the storage - MOVD $2, R0 // R0 is the number of double words stored -1 - WORD $0xB2B01000 // STFLE 0(R1) - XOR R0, R0 // reset the value of R0 - MOVBZ z-8(SP), R1 - AND $0x40, R1 - BEQ novector - -vectorinstalled: - // check if the vector instruction has been enabled - VLEIB $0, $0xF, V16 - VLGVB $0, V16, R1 - CMPBNE R1, $0xF, novector - MOVB $1, ret+0(FP) // have vx - RET - -novector: - MOVB $0, ret+0(FP) // no vx - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_vmsl_s390x.s b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_vmsl_s390x.s deleted file mode 100644 index e548020b14..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/sum_vmsl_s390x.s +++ /dev/null @@ -1,931 +0,0 @@ -// 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. - -// +build s390x,go1.11,!gccgo,!appengine - -#include "textflag.h" - -// Implementation of Poly1305 using the vector facility (vx) and the VMSL instruction. - -// constants -#define EX0 V1 -#define EX1 V2 -#define EX2 V3 - -// temporaries -#define T_0 V4 -#define T_1 V5 -#define T_2 V6 -#define T_3 V7 -#define T_4 V8 -#define T_5 V9 -#define T_6 V10 -#define T_7 V11 -#define T_8 V12 -#define T_9 V13 -#define T_10 V14 - -// r**2 & r**4 -#define R_0 V15 -#define R_1 V16 -#define R_2 V17 -#define R5_1 V18 -#define R5_2 V19 -// key (r) -#define RSAVE_0 R7 -#define RSAVE_1 R8 -#define RSAVE_2 R9 -#define R5SAVE_1 R10 -#define R5SAVE_2 R11 - -// message block -#define M0 V20 -#define M1 V21 -#define M2 V22 -#define M3 V23 -#define M4 V24 -#define M5 V25 - -// accumulator -#define H0_0 V26 -#define H1_0 V27 -#define H2_0 V28 -#define H0_1 V29 -#define H1_1 V30 -#define H2_1 V31 - -GLOBL ·keyMask<>(SB), RODATA, $16 -DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f -DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f - -GLOBL ·bswapMask<>(SB), RODATA, $16 -DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908 -DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100 - -GLOBL ·constants<>(SB), RODATA, $48 -// EX0 -DATA ·constants<>+0(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+8(SB)/8, $0x0000050403020100 -// EX1 -DATA ·constants<>+16(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+24(SB)/8, $0x00000a0908070605 -// EX2 -DATA ·constants<>+32(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+40(SB)/8, $0x0000000f0e0d0c0b - -GLOBL ·c<>(SB), RODATA, $48 -// EX0 -DATA ·c<>+0(SB)/8, $0x0000050403020100 -DATA ·c<>+8(SB)/8, $0x0000151413121110 -// EX1 -DATA ·c<>+16(SB)/8, $0x00000a0908070605 -DATA ·c<>+24(SB)/8, $0x00001a1918171615 -// EX2 -DATA ·c<>+32(SB)/8, $0x0000000f0e0d0c0b -DATA ·c<>+40(SB)/8, $0x0000001f1e1d1c1b - -GLOBL ·reduce<>(SB), RODATA, $32 -// 44 bit -DATA ·reduce<>+0(SB)/8, $0x0 -DATA ·reduce<>+8(SB)/8, $0xfffffffffff -// 42 bit -DATA ·reduce<>+16(SB)/8, $0x0 -DATA ·reduce<>+24(SB)/8, $0x3ffffffffff - -// h = (f*g) % (2**130-5) [partial reduction] -// uses T_0...T_9 temporary registers -// input: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9 -// output: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2 -#define MULTIPLY(m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) \ - \ // Eliminate the dependency for the last 2 VMSLs - VMSLG m02_0, r_2, m4_2, m4_2 \ - VMSLG m13_0, r_2, m5_2, m5_2 \ // 8 VMSLs pipelined - VMSLG m02_0, r_0, m4_0, m4_0 \ - VMSLG m02_1, r5_2, V0, T_0 \ - VMSLG m02_0, r_1, m4_1, m4_1 \ - VMSLG m02_1, r_0, V0, T_1 \ - VMSLG m02_1, r_1, V0, T_2 \ - VMSLG m02_2, r5_1, V0, T_3 \ - VMSLG m02_2, r5_2, V0, T_4 \ - VMSLG m13_0, r_0, m5_0, m5_0 \ - VMSLG m13_1, r5_2, V0, T_5 \ - VMSLG m13_0, r_1, m5_1, m5_1 \ - VMSLG m13_1, r_0, V0, T_6 \ - VMSLG m13_1, r_1, V0, T_7 \ - VMSLG m13_2, r5_1, V0, T_8 \ - VMSLG m13_2, r5_2, V0, T_9 \ - VMSLG m02_2, r_0, m4_2, m4_2 \ - VMSLG m13_2, r_0, m5_2, m5_2 \ - VAQ m4_0, T_0, m02_0 \ - VAQ m4_1, T_1, m02_1 \ - VAQ m5_0, T_5, m13_0 \ - VAQ m5_1, T_6, m13_1 \ - VAQ m02_0, T_3, m02_0 \ - VAQ m02_1, T_4, m02_1 \ - VAQ m13_0, T_8, m13_0 \ - VAQ m13_1, T_9, m13_1 \ - VAQ m4_2, T_2, m02_2 \ - VAQ m5_2, T_7, m13_2 \ - -// SQUARE uses three limbs of r and r_2*5 to output square of r -// uses T_1, T_5 and T_7 temporary registers -// input: r_0, r_1, r_2, r5_2 -// temp: TEMP0, TEMP1, TEMP2 -// output: p0, p1, p2 -#define SQUARE(r_0, r_1, r_2, r5_2, p0, p1, p2, TEMP0, TEMP1, TEMP2) \ - VMSLG r_0, r_0, p0, p0 \ - VMSLG r_1, r5_2, V0, TEMP0 \ - VMSLG r_2, r5_2, p1, p1 \ - VMSLG r_0, r_1, V0, TEMP1 \ - VMSLG r_1, r_1, p2, p2 \ - VMSLG r_0, r_2, V0, TEMP2 \ - VAQ TEMP0, p0, p0 \ - VAQ TEMP1, p1, p1 \ - VAQ TEMP2, p2, p2 \ - VAQ TEMP0, p0, p0 \ - VAQ TEMP1, p1, p1 \ - VAQ TEMP2, p2, p2 \ - -// carry h0->h1->h2->h0 || h3->h4->h5->h3 -// uses T_2, T_4, T_5, T_7, T_8, T_9 -// t6, t7, t8, t9, t10, t11 -// input: h0, h1, h2, h3, h4, h5 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 -// output: h0, h1, h2, h3, h4, h5 -#define REDUCE(h0, h1, h2, h3, h4, h5, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) \ - VLM (R12), t6, t7 \ // 44 and 42 bit clear mask - VLEIB $7, $0x28, t10 \ // 5 byte shift mask - VREPIB $4, t8 \ // 4 bit shift mask - VREPIB $2, t11 \ // 2 bit shift mask - VSRLB t10, h0, t0 \ // h0 byte shift - VSRLB t10, h1, t1 \ // h1 byte shift - VSRLB t10, h2, t2 \ // h2 byte shift - VSRLB t10, h3, t3 \ // h3 byte shift - VSRLB t10, h4, t4 \ // h4 byte shift - VSRLB t10, h5, t5 \ // h5 byte shift - VSRL t8, t0, t0 \ // h0 bit shift - VSRL t8, t1, t1 \ // h2 bit shift - VSRL t11, t2, t2 \ // h2 bit shift - VSRL t8, t3, t3 \ // h3 bit shift - VSRL t8, t4, t4 \ // h4 bit shift - VESLG $2, t2, t9 \ // h2 carry x5 - VSRL t11, t5, t5 \ // h5 bit shift - VN t6, h0, h0 \ // h0 clear carry - VAQ t2, t9, t2 \ // h2 carry x5 - VESLG $2, t5, t9 \ // h5 carry x5 - VN t6, h1, h1 \ // h1 clear carry - VN t7, h2, h2 \ // h2 clear carry - VAQ t5, t9, t5 \ // h5 carry x5 - VN t6, h3, h3 \ // h3 clear carry - VN t6, h4, h4 \ // h4 clear carry - VN t7, h5, h5 \ // h5 clear carry - VAQ t0, h1, h1 \ // h0->h1 - VAQ t3, h4, h4 \ // h3->h4 - VAQ t1, h2, h2 \ // h1->h2 - VAQ t4, h5, h5 \ // h4->h5 - VAQ t2, h0, h0 \ // h2->h0 - VAQ t5, h3, h3 \ // h5->h3 - VREPG $1, t6, t6 \ // 44 and 42 bit masks across both halves - VREPG $1, t7, t7 \ - VSLDB $8, h0, h0, h0 \ // set up [h0/1/2, h3/4/5] - VSLDB $8, h1, h1, h1 \ - VSLDB $8, h2, h2, h2 \ - VO h0, h3, h3 \ - VO h1, h4, h4 \ - VO h2, h5, h5 \ - VESRLG $44, h3, t0 \ // 44 bit shift right - VESRLG $44, h4, t1 \ - VESRLG $42, h5, t2 \ - VN t6, h3, h3 \ // clear carry bits - VN t6, h4, h4 \ - VN t7, h5, h5 \ - VESLG $2, t2, t9 \ // multiply carry by 5 - VAQ t9, t2, t2 \ - VAQ t0, h4, h4 \ - VAQ t1, h5, h5 \ - VAQ t2, h3, h3 \ - -// carry h0->h1->h2->h0 -// input: h0, h1, h2 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8 -// output: h0, h1, h2 -#define REDUCE2(h0, h1, h2, t0, t1, t2, t3, t4, t5, t6, t7, t8) \ - VLEIB $7, $0x28, t3 \ // 5 byte shift mask - VREPIB $4, t4 \ // 4 bit shift mask - VREPIB $2, t7 \ // 2 bit shift mask - VGBM $0x003F, t5 \ // mask to clear carry bits - VSRLB t3, h0, t0 \ - VSRLB t3, h1, t1 \ - VSRLB t3, h2, t2 \ - VESRLG $4, t5, t5 \ // 44 bit clear mask - VSRL t4, t0, t0 \ - VSRL t4, t1, t1 \ - VSRL t7, t2, t2 \ - VESRLG $2, t5, t6 \ // 42 bit clear mask - VESLG $2, t2, t8 \ - VAQ t8, t2, t2 \ - VN t5, h0, h0 \ - VN t5, h1, h1 \ - VN t6, h2, h2 \ - VAQ t0, h1, h1 \ - VAQ t1, h2, h2 \ - VAQ t2, h0, h0 \ - VSRLB t3, h0, t0 \ - VSRLB t3, h1, t1 \ - VSRLB t3, h2, t2 \ - VSRL t4, t0, t0 \ - VSRL t4, t1, t1 \ - VSRL t7, t2, t2 \ - VN t5, h0, h0 \ - VN t5, h1, h1 \ - VESLG $2, t2, t8 \ - VN t6, h2, h2 \ - VAQ t0, h1, h1 \ - VAQ t8, t2, t2 \ - VAQ t1, h2, h2 \ - VAQ t2, h0, h0 \ - -// expands two message blocks into the lower halfs of the d registers -// moves the contents of the d registers into upper halfs -// input: in1, in2, d0, d1, d2, d3, d4, d5 -// temp: TEMP0, TEMP1, TEMP2, TEMP3 -// output: d0, d1, d2, d3, d4, d5 -#define EXPACC(in1, in2, d0, d1, d2, d3, d4, d5, TEMP0, TEMP1, TEMP2, TEMP3) \ - VGBM $0xff3f, TEMP0 \ - VGBM $0xff1f, TEMP1 \ - VESLG $4, d1, TEMP2 \ - VESLG $4, d4, TEMP3 \ - VESRLG $4, TEMP0, TEMP0 \ - VPERM in1, d0, EX0, d0 \ - VPERM in2, d3, EX0, d3 \ - VPERM in1, d2, EX2, d2 \ - VPERM in2, d5, EX2, d5 \ - VPERM in1, TEMP2, EX1, d1 \ - VPERM in2, TEMP3, EX1, d4 \ - VN TEMP0, d0, d0 \ - VN TEMP0, d3, d3 \ - VESRLG $4, d1, d1 \ - VESRLG $4, d4, d4 \ - VN TEMP1, d2, d2 \ - VN TEMP1, d5, d5 \ - VN TEMP0, d1, d1 \ - VN TEMP0, d4, d4 \ - -// expands one message block into the lower halfs of the d registers -// moves the contents of the d registers into upper halfs -// input: in, d0, d1, d2 -// temp: TEMP0, TEMP1, TEMP2 -// output: d0, d1, d2 -#define EXPACC2(in, d0, d1, d2, TEMP0, TEMP1, TEMP2) \ - VGBM $0xff3f, TEMP0 \ - VESLG $4, d1, TEMP2 \ - VGBM $0xff1f, TEMP1 \ - VPERM in, d0, EX0, d0 \ - VESRLG $4, TEMP0, TEMP0 \ - VPERM in, d2, EX2, d2 \ - VPERM in, TEMP2, EX1, d1 \ - VN TEMP0, d0, d0 \ - VN TEMP1, d2, d2 \ - VESRLG $4, d1, d1 \ - VN TEMP0, d1, d1 \ - -// pack h2:h0 into h1:h0 (no carry) -// input: h0, h1, h2 -// output: h0, h1, h2 -#define PACK(h0, h1, h2) \ - VMRLG h1, h2, h2 \ // copy h1 to upper half h2 - VESLG $44, h1, h1 \ // shift limb 1 44 bits, leaving 20 - VO h0, h1, h0 \ // combine h0 with 20 bits from limb 1 - VESRLG $20, h2, h1 \ // put top 24 bits of limb 1 into h1 - VLEIG $1, $0, h1 \ // clear h2 stuff from lower half of h1 - VO h0, h1, h0 \ // h0 now has 88 bits (limb 0 and 1) - VLEIG $0, $0, h2 \ // clear upper half of h2 - VESRLG $40, h2, h1 \ // h1 now has upper two bits of result - VLEIB $7, $88, h1 \ // for byte shift (11 bytes) - VSLB h1, h2, h2 \ // shift h2 11 bytes to the left - VO h0, h2, h0 \ // combine h0 with 20 bits from limb 1 - VLEIG $0, $0, h1 \ // clear upper half of h1 - -// if h > 2**130-5 then h -= 2**130-5 -// input: h0, h1 -// temp: t0, t1, t2 -// output: h0 -#define MOD(h0, h1, t0, t1, t2) \ - VZERO t0 \ - VLEIG $1, $5, t0 \ - VACCQ h0, t0, t1 \ - VAQ h0, t0, t0 \ - VONE t2 \ - VLEIG $1, $-4, t2 \ - VAQ t2, t1, t1 \ - VACCQ h1, t1, t1 \ - VONE t2 \ - VAQ t2, t1, t1 \ - VN h0, t1, t2 \ - VNC t0, t1, t1 \ - VO t1, t2, h0 \ - -// func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305vmsl(SB), $0-32 - // This code processes 6 + up to 4 blocks (32 bytes) per iteration - // using the algorithm described in: - // NEON crypto, Daniel J. Bernstein & Peter Schwabe - // https://cryptojedi.org/papers/neoncrypto-20120320.pdf - // And as moddified for VMSL as described in - // Accelerating Poly1305 Cryptographic Message Authentication on the z14 - // O'Farrell et al, CASCON 2017, p48-55 - // https://ibm.ent.box.com/s/jf9gedj0e9d2vjctfyh186shaztavnht - - LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key - VZERO V0 // c - - // load EX0, EX1 and EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 // c - - // setup r - VL (R4), T_0 - MOVD $·keyMask<>(SB), R6 - VL (R6), T_1 - VN T_0, T_1, T_0 - VZERO T_2 // limbs for r - VZERO T_3 - VZERO T_4 - EXPACC2(T_0, T_2, T_3, T_4, T_1, T_5, T_7) - - // T_2, T_3, T_4: [0, r] - - // setup r*20 - VLEIG $0, $0, T_0 - VLEIG $1, $20, T_0 // T_0: [0, 20] - VZERO T_5 - VZERO T_6 - VMSLG T_0, T_3, T_5, T_5 - VMSLG T_0, T_4, T_6, T_6 - - // store r for final block in GR - VLGVG $1, T_2, RSAVE_0 // c - VLGVG $1, T_3, RSAVE_1 // c - VLGVG $1, T_4, RSAVE_2 // c - VLGVG $1, T_5, R5SAVE_1 // c - VLGVG $1, T_6, R5SAVE_2 // c - - // initialize h - VZERO H0_0 - VZERO H1_0 - VZERO H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - // initialize pointer for reduce constants - MOVD $·reduce<>(SB), R12 - - // calculate r**2 and 20*(r**2) - VZERO R_0 - VZERO R_1 - VZERO R_2 - SQUARE(T_2, T_3, T_4, T_6, R_0, R_1, R_2, T_1, T_5, T_7) - REDUCE2(R_0, R_1, R_2, M0, M1, M2, M3, M4, R5_1, R5_2, M5, T_1) - VZERO R5_1 - VZERO R5_2 - VMSLG T_0, R_1, R5_1, R5_1 - VMSLG T_0, R_2, R5_2, R5_2 - - // skip r**4 calculation if 3 blocks or less - CMPBLE R3, $48, b4 - - // calculate r**4 and 20*(r**4) - VZERO T_8 - VZERO T_9 - VZERO T_10 - SQUARE(R_0, R_1, R_2, R5_2, T_8, T_9, T_10, T_1, T_5, T_7) - REDUCE2(T_8, T_9, T_10, M0, M1, M2, M3, M4, T_2, T_3, M5, T_1) - VZERO T_2 - VZERO T_3 - VMSLG T_0, T_9, T_2, T_2 - VMSLG T_0, T_10, T_3, T_3 - - // put r**2 to the right and r**4 to the left of R_0, R_1, R_2 - VSLDB $8, T_8, T_8, T_8 - VSLDB $8, T_9, T_9, T_9 - VSLDB $8, T_10, T_10, T_10 - VSLDB $8, T_2, T_2, T_2 - VSLDB $8, T_3, T_3, T_3 - - VO T_8, R_0, R_0 - VO T_9, R_1, R_1 - VO T_10, R_2, R_2 - VO T_2, R5_1, R5_1 - VO T_3, R5_2, R5_2 - - CMPBLE R3, $80, load // less than or equal to 5 blocks in message - - // 6(or 5+1) blocks - SUB $81, R3 - VLM (R2), M0, M4 - VLL R3, 80(R2), M5 - ADD $1, R3 - MOVBZ $1, R0 - CMPBGE R3, $16, 2(PC) - VLVGB R3, R0, M5 - MOVD $96(R2), R2 - EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - EXPACC(M2, M3, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - VLEIB $2, $1, H2_0 - VLEIB $2, $1, H2_1 - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO T_4 - VZERO T_10 - EXPACC(M4, M5, M0, M1, M2, M3, T_4, T_10, T_0, T_1, T_2, T_3) - VLR T_4, M4 - VLEIB $10, $1, M2 - CMPBLT R3, $16, 2(PC) - VLEIB $10, $1, T_10 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - SUB $16, R3 - CMPBLE R3, $0, square - -load: - // load EX0, EX1 and EX2 - MOVD $·c<>(SB), R5 - VLM (R5), EX0, EX2 - -loop: - CMPBLE R3, $64, add // b4 // last 4 or less blocks left - - // next 4 full blocks - VLM (R2), M2, M5 - SUB $64, R3 - MOVD $64(R2), R2 - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, T_0, T_1, T_3, T_4, T_5, T_2, T_7, T_8, T_9) - - // expacc in-lined to create [m2, m3] limbs - VGBM $0x3f3f, T_0 // 44 bit clear mask - VGBM $0x1f1f, T_1 // 40 bit clear mask - VPERM M2, M3, EX0, T_3 - VESRLG $4, T_0, T_0 // 44 bit clear mask ready - VPERM M2, M3, EX1, T_4 - VPERM M2, M3, EX2, T_5 - VN T_0, T_3, T_3 - VESRLG $4, T_4, T_4 - VN T_1, T_5, T_5 - VN T_0, T_4, T_4 - VMRHG H0_1, T_3, H0_0 - VMRHG H1_1, T_4, H1_0 - VMRHG H2_1, T_5, H2_0 - VMRLG H0_1, T_3, H0_1 - VMRLG H1_1, T_4, H1_1 - VMRLG H2_1, T_5, H2_1 - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - VPERM M4, M5, EX0, T_3 - VPERM M4, M5, EX1, T_4 - VPERM M4, M5, EX2, T_5 - VN T_0, T_3, T_3 - VESRLG $4, T_4, T_4 - VN T_1, T_5, T_5 - VN T_0, T_4, T_4 - VMRHG V0, T_3, M0 - VMRHG V0, T_4, M1 - VMRHG V0, T_5, M2 - VMRLG V0, T_3, M3 - VMRLG V0, T_4, M4 - VMRLG V0, T_5, M5 - VLEIB $10, $1, M2 - VLEIB $10, $1, M5 - - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - CMPBNE R3, $0, loop - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - // load EX0, EX1, EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 - - // sum vectors - VAQ H0_0, H0_1, H0_0 - VAQ H1_0, H1_1, H1_0 - VAQ H2_0, H2_1, H2_0 - - // h may be >= 2*(2**130-5) so we need to reduce it again - // M0...M4 are used as temps here - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - -next: // carry h1->h2 - VLEIB $7, $0x28, T_1 - VREPIB $4, T_2 - VGBM $0x003F, T_3 - VESRLG $4, T_3 - - // byte shift - VSRLB T_1, H1_0, T_4 - - // bit shift - VSRL T_2, T_4, T_4 - - // clear h1 carry bits - VN T_3, H1_0, H1_0 - - // add carry - VAQ T_4, H2_0, H2_0 - - // h is now < 2*(2**130-5) - // pack h into h1 (hi) and h0 (lo) - PACK(H0_0, H1_0, H2_0) - - // if h > 2**130-5 then h -= 2**130-5 - MOD(H0_0, H1_0, T_0, T_1, T_2) - - // h += s - MOVD $·bswapMask<>(SB), R5 - VL (R5), T_1 - VL 16(R4), T_0 - VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big) - VAQ T_0, H0_0, H0_0 - VPERM H0_0, H0_0, T_1, H0_0 // reverse bytes (to little) - VST H0_0, (R1) - RET - -add: - // load EX0, EX1, EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 - - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - CMPBLE R3, $64, b4 - -b4: - CMPBLE R3, $48, b3 // 3 blocks or less - - // 4(3+1) blocks remaining - SUB $49, R3 - VLM (R2), M0, M2 - VLL R3, 48(R2), M3 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M3 - MOVD $64(R2), R2 - EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - VZERO M0 - VZERO M1 - VZERO M4 - VZERO M5 - VZERO T_4 - VZERO T_10 - EXPACC(M2, M3, M0, M1, M4, M5, T_4, T_10, T_0, T_1, T_2, T_3) - VLR T_4, M2 - VLEIB $10, $1, M4 - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_10 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M4, M5, M2, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - SUB $16, R3 - CMPBLE R3, $0, square // this condition must always hold true! - -b3: - CMPBLE R3, $32, b2 - - // 3 blocks remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, T_10, M5) - - SUB $33, R3 - VLM (R2), M0, M1 - VLL R3, 32(R2), M2 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M2 - - // H += m0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6) - VLEIB $10, $1, T_3 - VAG H0_0, T_1, H0_0 - VAG H1_0, T_2, H1_0 - VAG H2_0, T_3, H2_0 - - VZERO M0 - VZERO M3 - VZERO M4 - VZERO M5 - VZERO T_10 - - // (H+m0)*r - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M3, M4, M5, V0, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_10, H0_1, H1_1, H2_1, T_9) - - // H += m1 - VZERO V0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M1, T_1, T_2, T_3, T_4, T_5, T_6) - VLEIB $10, $1, T_3 - VAQ H0_0, T_1, H0_0 - VAQ H1_0, T_2, H1_0 - VAQ H2_0, T_3, H2_0 - REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10) - - // [H, m2] * [r**2, r] - EXPACC2(M2, H0_0, H1_0, H2_0, T_1, T_2, T_3) - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, H2_0 - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, M5, T_10) - SUB $16, R3 - CMPBLE R3, $0, next // this condition must always hold true! - -b2: - CMPBLE R3, $16, b1 - - // 2 blocks remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - // move h to the left and 0s at the right - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - - // get message blocks and append 1 to start - SUB $17, R3 - VL (R2), M0 - VLL R3, 16(R2), M1 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M1 - VZERO T_6 - VZERO T_7 - VZERO T_8 - EXPACC2(M0, T_6, T_7, T_8, T_1, T_2, T_3) - EXPACC2(M1, T_6, T_7, T_8, T_1, T_2, T_3) - VLEIB $2, $1, T_8 - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_8 - - // add [m0, m1] to h - VAG H0_0, T_6, H0_0 - VAG H1_0, T_7, H1_0 - VAG H2_0, T_8, H2_0 - - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - VZERO T_10 - VZERO M0 - - // at this point R_0 .. R5_2 look like [r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M2, M3, M4, M5, T_10, M0, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M2, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10) - SUB $16, R3, R3 - CMPBLE R3, $0, next - -b1: - CMPBLE R3, $0, next - - // 1 block remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - - // set up [0, m0] limbs - SUB $1, R3 - VLL R3, (R2), M0 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6)// limbs: [0, m] - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_3 - - // h+m0 - VAQ H0_0, T_1, H0_0 - VAQ H1_0, T_2, H1_0 - VAQ H2_0, T_3, H2_0 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - - BR next - -square: - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // (h0*r**2) + (h1*r) - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - BR next - -TEXT ·hasVMSLFacility(SB), NOSPLIT, $24-1 - MOVD $x-24(SP), R1 - XC $24, 0(R1), 0(R1) // clear the storage - MOVD $2, R0 // R0 is the number of double words stored -1 - WORD $0xB2B01000 // STFLE 0(R1) - XOR R0, R0 // reset the value of R0 - MOVBZ z-8(SP), R1 - AND $0x01, R1 - BEQ novmsl - -vectorinstalled: - // check if the vector instruction has been enabled - VLEIB $0, $0xF, V16 - VLGVB $0, V16, R1 - CMPBNE R1, $0xF, novmsl - MOVB $1, ret+0(FP) // have vx - RET - -novmsl: - MOVB $0, ret+0(FP) // no vx - RET diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/vectors_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/vectors_test.go deleted file mode 100644 index 18d7ff8e85..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305/vectors_test.go +++ /dev/null @@ -1,2943 +0,0 @@ -// 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 poly1305 - -var testData = [...]test{ - // edge cases - { - // see https://go-review.googlesource.com/#/c/30101/ - key: "3b3a29e93b213a5c5c3b3b053a3a8c0d00000000000000000000000000000000", - tag: "6dc18b8c344cd79927118bbe84b7f314", - in: "81d8b2e46a25213b58fee4213a2a28e921c12a9632516d3b73272727becf2129", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "04000000000000000000000000000000", // (2¹³⁰-1) % (2¹³⁰-5) - in: "ffffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "faffffffffffffffffffffffffffffff", // (2¹³⁰-6) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (2¹³⁰-5) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "f9ffffffffffffffffffffffffffffff", // (2*(2¹³⁰-6)) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (2*(2¹³⁰-5)) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "f8ffffffffffffffffffffffffffffff", // (3*(2¹³⁰-6)) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (3*(2¹³⁰-5)) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "f7ffffffffffffffffffffffffffffff", // (4*(2¹³⁰-6)) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (4*(2¹³⁰-5)) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "f3ffffffffffffffffffffffffffffff", // (8*(2¹³⁰-6)) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (8*(2¹³⁰-5)) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "ebffffffffffffffffffffffffffffff", // (16*(2¹³⁰-6)) % (2¹³⁰-5) - in: "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "faffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - { - key: "0100000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", // (16*(2¹³⁰-5)) % (2¹³⁰-5) - in: "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "fbffffffffffffffffffffffffffffff" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000" + - "00000000000000000000000000000000", - }, - // original smoke tests - { - key: "746869732069732033322d62797465206b657920666f7220506f6c7931333035", - tag: "a6f745008f81c916a20dcc74eef2b2f0", - in: "48656c6c6f20776f726c6421", - }, - { - key: "746869732069732033322d62797465206b657920666f7220506f6c7931333035", - tag: "49ec78090e481ec6c26b33b91ccc0307", - in: "0000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "746869732069732033322d62797465206b657920666f7220506f6c7931333035", - tag: "da84bcab02676c38cdb015604274c2aa", - in: "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000", - }, - { - key: "0000000000000000000000000000000000000000000000000000000000000000", - tag: "00000000000000000000000000000000", - in: "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000000000" + - "000000000000000000000000000000000000000000000000000000", - }, - // randomly generated - { - key: "52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649", - tag: "9566c74d10037c4d7bbb0407d1e2c649", - in: "", - }, - { - key: "81855ad8681d0d86d1e91e00167939cb6694d2c422acd208a0072939487f6999", - tag: "eaa270caaa12faa39b797374a4b8a420", - in: "eb", - }, - { - key: "9d18a44784045d87f3c67cf22746e995af5a25367951baa2ff6cd471c483f15f", - tag: "dbea66e1da48a8f822887c6162c2acf1", - in: "b90b", - }, - { - key: "adb37c5821b6d95526a41a9504680b4e7c8b763a1b1d49d4955c848621632525", - tag: "6ac09aaa88c32ee95a7198376f16abdb", - in: "3fec73", - }, - { - key: "8dd7a9e28bf921119c160f0702448615bbda08313f6a8eb668d20bf505987592", - tag: "b1443487f97fe340b04a74719ed4de68", - in: "1e668a5b", - }, - { - key: "df2c7fc4844592d2572bcd0668d2d6c52f5054e2d0836bf84c7174cb7476364c", - tag: "7463be0f9d99a5348039e4afcbf4019c", - in: "c3dbd968b0", - }, - { - key: "f7172ed85794bb358b0c3b525da1786f9fff094279db1944ebd7a19d0f7bbacb", - tag: "2edaee3bcf303fd05609e131716f8157", - in: "e0255aa5b7d4", - }, - { - key: "4bec40f84c892b9bffd43629b0223beea5f4f74391f445d15afd4294040374f6", - tag: "965f18767420c1d94a4ef657e8d15e1e", - in: "924b98cbf8713f", - }, - { - key: "8d962d7c8d019192c24224e2cafccae3a61fb586b14323a6bc8f9e7df1d92933", - tag: "2bf4a33287dd6d87e1ed4282f7342b6a", - in: "3ff993933bea6f5b", - }, - { - key: "3af6de0374366c4719e43a1b067d89bc7f01f1f573981659a44ff17a4c7215a3", - tag: "c5e987b60373a48893c5af30acf2471f", - in: "b539eb1e5849c6077d", - }, - { - key: "bb5722f5717a289a266f97647981998ebea89c0b4b373970115e82ed6f4125c8", - tag: "19f0f640b309d168ea1b480e6a4faee5", - in: "fa7311e4d7defa922daa", - }, - { - key: "e7786667f7e936cd4f24abf7df866baa56038367ad6145de1ee8f4a8b0993ebd", - tag: "de75e5565d97834b9fa84ad568d31359", - in: "f8883a0ad8be9c3978b048", - }, - { - key: "83e56a156a8de563afa467d49dec6a40e9a1d007f033c2823061bdd0eaa59f8e", - tag: "de184a5a9b826aa203c5c017986d6690", - in: "4da6430105220d0b29688b73", - }, - { - key: "4b8ea0f3ca9936e8461f10d77c96ea80a7a665f606f6a63b7f3dfd2567c18979", - tag: "7478f18d9684905aa5d1a34ee67e4c84", - in: "e4d60f26686d9bf2fb26c901ff", - }, - { - key: "354cde1607ee294b39f32b7c7822ba64f84ab43ca0c6e6b91c1fd3be89904341", - tag: "3b2008a9c52b5308f5538b789ab5506f", - in: "79d3af4491a369012db92d184fc3", - }, - { - key: "9d1734ff5716428953bb6865fcf92b0c3a17c9028be9914eb7649c6c93478009", - tag: "71c8e76a67a505b7370b562ba15ba032", - in: "79d1830356f2a54c3deab2a4b4475d", - }, - { - key: "63afbe8fb56987c77f5818526f1814be823350eab13935f31d84484517e924ae", - tag: "1dc895f74f866bdb3edf6c4430829c1c", - in: "f78ae151c00755925836b7075885650c", - }, - { - key: "30ec29a3703934bf50a28da102975deda77e758579ea3dfe4136abf752b3b827", - tag: "afca2b3ba7b0e1a928001966883e9b16", - in: "1d03e944b3c9db366b75045f8efd69d22ae5411947cb553d7694267aef4e" + - "bcea406b32d6108bd68584f57e37caac6e33feaa3263a399437024ba9c9b" + - "14678a274f01a910ae295f6efbfe5f5abf44ccde263b5606633e2bf0006f" + - "28295d7d39069f01a239c4365854c3af7f6b41d631f92b9a8d12f4125732" + - "5fff332f7576b0620556304a3e3eae14c28d0cea39d2901a52720da85ca1" + - "e4b38eaf3f", - }, - { - key: "44c6c6ef8362f2f54fc00e09d6fc25640854c15dfcacaa8a2cecce5a3aba53ab", - tag: "6f2a09aa76c9b76774e31ec02dcf7991", - in: "705b18db94b4d338a5143e63408d8724b0cf3fae17a3f79be1072fb63c35" + - "d6042c4160f38ee9e2a9f3fb4ffb0019b454d522b5ffa17604193fb89667" + - "10a7960732ca52cf53c3f520c889b79bf504cfb57c7601232d589baccea9" + - "d6e263e25c27741d3f6c62cbbb15d9afbcbf7f7da41ab0408e3969c2e2cd" + - "cf233438bf1774ace7709a4f091e9a83fdeae0ec55eb233a9b5394cb3c78" + - "56b546d313c8a3b4c1c0e05447f4ba370eb36dbcfdec90b302dcdc3b9ef5" + - "22e2a6f1ed0afec1f8e20faabedf6b162e717d3a748a58677a0c56348f89" + - "21a266b11d0f334c62fe52ba53af19779cb2948b6570ffa0b773963c130a" + - "d797ddea", - }, - { - key: "fe4e3ad29b5125210f0ef1c314090f07c79a6f571c246f3e9ac0b7413ef110bd", - tag: "27381e3fc2a356103fb796f107d826e7", - in: "58b00ce73bff706f7ff4b6f44090a32711f3208e4e4b89cb5165ce64002c" + - "bd9c2887aa113df2468928d5a23b9ca740f80c9382d9c6034ad2960c7965" + - "03e1ce221725f50caf1fbfe831b10b7bf5b15c47a53dbf8e7dcafc9e1386" + - "47a4b44ed4bce964ed47f74aa594468ced323cb76f0d3fac476c9fb03fc9" + - "228fbae88fd580663a0454b68312207f0a3b584c62316492b49753b5d502" + - "7ce15a4f0a58250d8fb50e77f2bf4f0152e5d49435807f9d4b97be6fb779" + - "70466a5626fe33408cf9e88e2c797408a32d29416baf206a329cfffd4a75" + - "e498320982c85aad70384859c05a4b13a1d5b2f5bfef5a6ed92da482caa9" + - "568e5b6fe9d8a9ddd9eb09277b92cef9046efa18500944cbe800a0b1527e" + - "a6", - }, - { - key: "4729a861d2f6497a3235c37f4192779ec1d96b3b1c5424fce0b727b03072e641", - tag: "0173965669fb9de88d38a827a0271271", - in: "5a761f03abaa40abc9448fddeb2191d945c04767af847afd0edb5d8857b7" + - "99acb18e4affabe3037ffe7fa68aa8af5e39cc416e734d373c5ebebc9cdc" + - "c595bcce3c7bd3d8df93fab7e125ddebafe65a31bd5d41e2d2ce9c2b1789" + - "2f0fea1931a290220777a93143dfdcbfa68406e877073ff08834e197a403" + - "4aa48afa3f85b8a62708caebbac880b5b89b93da53810164402104e648b6" + - "226a1b78021851f5d9ac0f313a89ddfc454c5f8f72ac89b38b19f53784c1" + - "9e9beac03c875a27db029de37ae37a42318813487685929359ca8c5eb94e" + - "152dc1af42ea3d1676c1bdd19ab8e2925c6daee4de5ef9f9dcf08dfcbd02" + - "b80809398585928a0f7de50be1a6dc1d5768e8537988fddce562e9b948c9" + - "18bba3e933e5c400cde5e60c5ead6fc7ae77ba1d259b188a4b21c86fbc23" + - "d728b45347eada650af24c56d0800a8691332088a805bd55c446e25eb075" + - "90bafcccbec6177536401d9a2b7f512b54bfc9d00532adf5aaa7c3a96bc5" + - "9b489f77d9042c5bce26b163defde5ee6a0fbb3e9346cef81f0ae9515ef3" + - "0fa47a364e75aea9e111d596e685a591121966e031650d510354aa845580" + - "ff560760fd36514ca197c875f1d02d9216eba7627e2398322eb5cf43d72b" + - "d2e5b887d4630fb8d4747ead6eb82acd1c5b078143ee26a586ad23139d50" + - "41723470bf24a865837c", - }, - { - key: "9123461c41f5ff99aa99ce24eb4d788576e3336e65491622558fdf297b9fa007", - tag: "1eb0cdad9237905250d30a24fe172a34", - in: "864bafd7cd4ca1b2fb5766ab431a032b72b9a7e937ed648d0801f29055d3" + - "090d2463718254f9442483c7b98b938045da519843854b0ed3f7ba951a49" + - "3f321f0966603022c1dfc579b99ed9d20d573ad53171c8fef7f1f4e4613b" + - "b365b2ebb44f0ffb6907136385cdc838f0bdd4c812f042577410aca008c2" + - "afbc4c79c62572e20f8ed94ee62b4de7aa1cc84c887e1f7c31e927dfe52a" + - "5f8f46627eb5d3a4fe16fafce23623e196c9dfff7fbaff4ffe94f4589733" + - "e563e19d3045aad3e226488ac02cca4291aed169dce5039d6ab00e40f67a" + - "ab29332de1448b35507c7c8a09c4db07105dc31003620405da3b2169f5a9" + - "10c9d0096e5e3ef1b570680746acd0cc7760331b663138d6d342b051b5df" + - "410637cf7aee9b0c8c10a8f9980630f34ce001c0ab7ac65e502d39b216cb" + - "c50e73a32eaf936401e2506bd8b82c30d346bc4b2fa319f245a8657ec122" + - "eaf4ad5425c249ee160e17b95541c2aee5df820ac85de3f8e784870fd87a" + - "36cc0d163833df636613a9cc947437b6592835b9f6f4f8c0e70dbeebae7b" + - "14cdb9bc41033aa5baf40d45e24d72eac4a28e3ca030c9937ab8409a7cbf" + - "05ae21f97425254543d94d115900b90ae703b97d9856d2441d14ba49a677" + - "de8b18cb454b99ddd9daa7ccbb7500dae4e2e5df8cf3859ebddada6745fb" + - "a6a04c5c37c7ca35036f11732ce8bc27b48868611fc73c82a491bfabd7a1" + - "9df50fdc78a55dbbc2fd37f9296566557fab885b039f30e706f0cd5961e1" + - "9b642221db44a69497b8ad99408fe1e037c68bf7c5e5de1d2c68192348ec" + - "1189fb2e36973cef09ff14be23922801f6eaee41409158b45f2dec82d17c" + - "aaba160cd6", - }, - { - key: "40ff73495fe4a05ce1202ca7287ed3235b95e69f571fa5e656aaa51fae1ebdd7", - tag: "2e619d8ea81b77484e4fddeb29844e4b", - in: "aa6269c2ec7f4057b33593bc84888c970fd528d4a99a1eab9d2420134537" + - "cd6d02282e0981e140232a4a87383a21d1845c408ad757043813032a0bd5" + - "a30dcca6e3aa2df04715d879279a96879a4f3690ac2025a60c7db15e0501" + - "ebc34b734355fe4a059bd3899d920e95f1c46d432f9b08e64d7f9b38965d" + - "5a77a7ac183c3833e1a3425ead69d4f975012fd1a49ed832f69e6e9c63b4" + - "53ec049c9e7a5cf944232d10353f64434abae060f6506ad3fdb1f4415b0a" + - "f9ce8c208bc20ee526741539fa3203c77ecba410fd6718f227e0b430f9bc" + - "b049a3d38540dc222969120ce80f2007cd42a708a721aa29987b45d4e428" + - "811984ecad349cc35dd93515cefe0b002cee5e71c47935e281ebfc4b8b65" + - "2b69ccb092e55a20f1b9f97d046296124621928739a86671cc180152b953" + - "e3bf9d19f825c3dd54ae1688e49efb5efe65dcdad34bc860010e7c8c997c" + - "d5f9e320ca7d39d4ba801a175b1c76f057832f3f36d7d893e216e4c7bbdb" + - "548d0ba48449330027368b34f9c69776b4591532da1c5be68ef4eebe8cb8" + - "fa7dc5483fb70c2c896334cb1f9cb5dfe044fa086197ff5dfd02f2ba3884" + - "c53dd718c8560da743a8e9d4aeae20ccef002d82ca352592b8d8f2a8df3b" + - "0c35f15b9b370dca80d4ca8e9a133eb52094f2dd5c08731f52315d828846" + - "e37df68fd10658b480f2ac84233633957e688e924ffe3713b52c76fd8a56" + - "da8bb07daa8eb4eb8f7334f99256e2766a4109150eed424f0f743543cdea" + - "66e5baaa03edc918e8305bb19fc0c6b4ddb4aa3886cb5090940fc6d4cabe" + - "2153809e4ed60a0e2af07f1b2a6bb5a6017a578a27cbdc20a1759f76b088" + - "9a83ce25ce3ca91a4eb5c2f8580819da04d02c41770c01746de44f3db6e3" + - "402e7873db7635516e87b33e4b412ba3df68544920f5ea27ec097710954f" + - "42158bdba66d4814c064b4112538676095467c89ba98e6a543758d7093a4" + - "94df", - }, - { - key: "5cc36d09c7a6472a41f29c380a987b1ecdcf84765f4e5d3ceefc1c02181f570f", - tag: "0d57b8cbea8090df0541354673dcb4e0", - in: "44fcd629f08dc1ef53c9ae0d8869fe67fdc7a2c67b425f13c5be8d9f630c" + - "1d063c02fd75cf64c1aec9d2e2ef6e6431d5f5ad0489078dc61f46494dcc" + - "f403dad7f094170d2c3e29c198b0f341e284c4be8fa60c1a478d6bd55dd2" + - "c04dad86d2053d5d25b014e3d8b64322cdcb5004faa46cfa2d6ad2ff933b" + - "c3bd9a5a74660af3d048a9a43634c0250427d9a6219197a3f3633f841753" + - "ba7c27f3619f387b6b1a6cb9c1dc227674aa020724d137da2cb87b1615d5" + - "12974fa4747dd1e17d02c9462a44fec150ca3a8f99cc1e4953365e429956" + - "5e108535b1f62e1d4ba18e17a52164418bfd1a933f7fb3a126c860830a87" + - "293d9271da736e4398c1e37fb75c4bf02786e1faf4b610cd1377fbb9ae18" + - "0655a0abefbad700c09473469f1eca5a66d53fa3dc7cd3e7c3b0411d7e14" + - "5f96eb9654ab94913dda503a50f9e773842f4d2a5faa60869bf365830511" + - "f2ededd03e0a73000edb60c9a29a5f5e194cf3b5667a694690384599d116" + - "f8d2fd93b2aed55b7d44b5b054f3f38e788e4fdf36e591568c41d1052cad" + - "0fcb68ca4c4bf5090d57df9db6f0d91dd8b11b804f331adb7efb087a5604" + - "e9e22b4d54db40bcbc6e272ff5eaddfc1471459e59f0554c58251342134a" + - "8daaef1498069ba581ef1da2510be92843487a4eb8111c79a6f0195fc38a" + - "d6aee93c1df2b5897eaa38ad8f47ab2fe0e3aa3e6accbfd4c16d46843318" + - "5fc61c861b96ca65e34d31f24d6f56ee85092314a4d7656205c15322f1c9" + - "7613c079eae292ba966e10d1e700164e518b243f424c46f9ea63db1c2c34" + - "b512c403c128ee19030a6226517b805a072512a5e4cd274b7fd1fa23f830" + - "058208ff1a063b41039c74036b5b3da8b1a0b93135a710352da0f6c31203" + - "a09d1f2329651bb3ab3984ab591f2247e71cd44835e7a1a1b66d8595f7ae" + - "f9bf39d1417d2d31ea3599d405ff4b5999a86f52f3259b452909b57937d8" + - "5364d6c23deb4f14e0d9fcee9184df5994fdc11f045c025c8d561adb0e7d" + - "fd4748fd4b20f84e53322471a410cdb3fd88e48b2e7eb7ae5dae994cb5ea" + - "e3eaf21cf9005db560d6d22e4d9b97d7e9e488751afcd72aa176c0fcde93" + - "16f676fd527d9c42105b851639f09ea70533d26fc60cbeb4b76ed554fc99" + - "177620b28ca6f56a716f8cb384", - }, - { - key: "811c3e356e7c793acf114c624dc86ace38e67bff2a60e5b2a6c20723c1b9f003", - tag: "c6e59044cefc43ee681c3eed872d02b3", - in: "e115b304c023792448794546a2474f04294d7a616215e5dd6c40a65bb6ed" + - "b508c3680b14c176c327fdfb1ee21962c0006b7deb4e5de87db21989d13c" + - "3ab0462d5d2a52ef4ca0d366ae06a314f50e3a21d9247f814037798cc5e1" + - "0a63de027477decdeb8a8e0c279299272490106ddf8683126f60d35772c6" + - "dfc744b0adbfd5dcf118c4f2b06cfaf077881d733a5e643b7c46976647d1" + - "c1d3f8f6237c6218fa86fb47080b1f7966137667bd6661660c43b75b6339" + - "0b514bbe491aa46b524bde1c5b7456255fb214c3f74907b7ce1cba94210b" + - "78b5e68f049fcb002b96a5d38d59df6e977d587abb42d0972d5f3ffc898b" + - "3cbec26f104255761aee1b8a232d703585dd276ee1f43c8cd7e92a993eb1" + - "5107d02f59ba75f8dd1442ee37786ddb902deb88dd0ebdbf229fb25a9dca" + - "86d0ce46a278a45f5517bff2c049cc959a227dcdd3aca677e96ce84390e9" + - "b9a28e0988777331847a59f1225b027a66c1421422683dd6081af95e16f2" + - "48ab03da494112449ce7bdace6c988292f95699bb5e4d9c8d250aa28a6df" + - "44c0c265156deb27e9476a0a4af44f34bdf631b4af1146afe34ea988fc95" + - "3e71fc21ce60b3962313000fe46d757109281f6e55bc950200d0834ceb5c" + - "41553afd12576f3fbb9a8e05883ccc51c9a1269b6d8e9d27123dce5d0bd6" + - "db649c6fea06b4e4e9dea8d2d17709dc50ae8aa38231fd409e9580e255fe" + - "2bf59e6e1b6e310610ea4881206262be76120d6c97db969e003947f08bad" + - "8fa731f149397c47d2c964e84f090e77e19046277e18cd8917c48a776c9d" + - "e627b6656203b522c60e97cc61914621c564243913ae643f1c9c9e0ad00a" + - "14f66eaa45844229ecc35abb2637317ae5d5e338c68691bea8fa1fd469b7" + - "b54d0fccd730c1284ec7e6fccdec800b8fa67e6e55ac574f1e53a65ab976" + - "4c218a404184793cc9892308e296b334c85f7097edc16927c2451c4cd7e5" + - "3f239aa4f4c83241bde178f692898b1ece2dbcb19a97e64c4710326528f2" + - "4b099d0b674bd614fad307d9b9440adab32117f0f15b1450277b00eb366e" + - "0260fca84c1d27e50a1116d2ce16c8f5eb212c77c1a84425744ea3195edb" + - "b54c970b77e090b644942d43fe8c4546a158bad7620217a40e34b9bb84d1" + - "89eff32b20ef3f015714dbb1f150015d6eeb84cbccbd3fffa63bde89", - }, - { - key: "f33691f5db2dea41e1e608af3ff39f3a6988dba204ce1b09214475ae0ea864b8", - tag: "6e50e70411201378c8d67857d7b631d2", - in: "439bc9ea10db4d2b08c7fcf2e8bd89fa9844f8061d462e28f174489e7514" + - "0f84e842040141cc59ce38f9551850cfbdfac2d75337d155090d70d0d930" + - "04340bdfe60062f17c53f3c9005b9995a0feb49f6bef8eaff80f4feb7ef3" + - "f2181733a4b43b6ac43a5130a73a9b3c2cbc93bd296cd5f48c9df022b6c8" + - "2bb752bc21e3d8379be31328aa32edc11efc8a4b4b3f370ee8c870cd281d" + - "614e6bc2c0a5ca303bc48696a3bd574ee34738de4c4c29910f8feb7557bf" + - "ffcfe7428b4703144bd6d7fe5b3f5de748918553df5453b3c6001696f3de" + - "0137e454aadf30cedfb6be36b0b908a38409f1a2dc202fc285610765e4c8" + - "6414692bf4bde20ed899e97727b7ea1d95d7c621717c560f1d260ab3624e" + - "d6168d77c483dd5ce0d234049017795f2e5a7569d7ad323c50a5b1170337" + - "4174a9977026c20cd52c10b72f14e0569a684a3dcf2ccbc148fd3db506e2" + - "8d24f6c55544cb3980a36e86747adc89ebad78d1630618d113fa445f8625" + - "b583cd7be33913c30c419d047cf3baf40fd05219a1fcec717b87a65fa022" + - "1a3aa8143062d77588168019454240ae3d37640996f2967810459bc658df" + - "e556de4d07263dc3d9158ec242008226d1c6aea7f0846e12ce2d316e80da" + - "522343264ec9451ec23aaaa367d640faad4af3d44d6d86544ade34c93518" + - "2843f6b4d1c934996778affa9ee962e7dfef5e70d933d4309f0f343e9606" + - "1b91b11ac380a9675e17a96099fe411bedc28a298cd78d5496e28fbbd4f5" + - "b0a27735d1144348e22be5b75724d8f125e99c4cb4e9c3a1f0b4e9da5146" + - "e6afaa33d02fda74bf58a8badee2b634b989c01755afa6ab20ee494c6ae4" + - "c2c6f17af6b53b61d2947d83a18eb3b8a1612aad5d3ea7e8e35f325c9168" + - "ac490f22cb713ddb61fbd96011c5849ac8e2fcd42db820349bdf9157dcc0" + - "0d9f9ed9c099b10c7194d48b623b0df43759734b2a2e5f8a35e7192bf9a0" + - "03dcb9d16a54bd84d922f85b6021b28aacc5264fe9e83deb48f18f864cbd" + - "367eb163d39c45b0eb907311a2a4b09fb26109088df782ce031b02f3caff" + - "d2dbe25b1cbde9f35ba7c47292a4fd49e7def7a28824f3dfda259a86c3de" + - "59257c255c712686ee47d128a55c7b9e8c546035eab7e2da420f32ed5c94" + - "bc12a34dc68eb99257a7ea03b69d6c760b0681fa24e4ca97b7c377182ab5" + - "fee30a278b08c44c988a8f925af2997883111c750d176b432735868208f4" + - "0de7137331b544f2d28040a3581d195e82811c945c3f9fde68fc21b36a44" + - "e1cfa2d8eb625f3102461539b3f13c660936a5ddb29a0ae791fbf52c2f69" + - "7bd334653f3605b362d91cd78569b41dbd09b2a5892440b5097fa08d0b4b" + - "291fc5b934585dd8d5adc80d573fdd194b2eae26dfc49f5e51c1f1607d7e" + - "87740702f244bf39ca1d52423e0ae84891dfdf4f43ef984c7a5f293a2007" + - "a1e00e39c757f064518953f55621f955986f63", - }, - { - key: "d115b6ac998a65b48b3dae5977abaf985258d3d1cfe1616cec3d6a77f7a75785", - tag: "b431c9318ec2769fc8ee8f5fc3c079c3", - in: "7e7eb43839a6d7616b8a7b1fb7144817904342a9bd34167051162941a6b1" + - "b85db5e587f76e4a53211755d5ab29c11822d7711a97b3f1ff5b21f2485d" + - "9c86241fb56cdd6796245d3112df11ad9a7344db44d09934c4efb280ed65" + - "80cfcafb5c97a32993cbbf4917183e0b7bb38f2ce2479c28e1d39f673962" + - "17a7010448dfd39a4e7f406c8bd2d804f993bb410fffa4eb57518a531ecf" + - "259a8af068230acb826d9ffc20ee0fc43885221a321e3928971bb28615f0" + - "d9f099f5b68a80503a910fdba0bc643c60b64837900be38770b6b30c362c" + - "4580722b5dbb1b9c8cd02a18fd7b5661d2c4d28aa941c50af6655c826690" + - "37312fbf9f1cf4adb0b9400532755011b40e8252bd0e3c7a22efb0ef9122" + - "1e04b4aa8316d4a4ffeaa11909d38cc264650e7ca416835ded0953f39e29" + - "b01d3a33bba454760fb0a96d9fe50b3e42c95271e57840380d1fd39a375b" + - "3e5513a31a4b80a2dad8731d4fd1ced5ff61e1fbe8ff3ff90a277e6b5631" + - "f99f046c4c3c66158554f61af2ede73aede97e94b1d1f129aaadf9b53548" + - "553cc2304103e245b77701f134d94d2a3658f2b41108c5a519c2c8f450db" + - "027824f1c0ab94010589a4139ff521938b4f0c7bf0986585f535b6e292e5" + - "b3ded23bf81cec17c8420fe67a449e508864e4cbb7eaf335975668f013e9" + - "da70b33bd52a72094a8f03762ea7440ce9fcd10e251837cfc9ccc1a8cc47" + - "0c67379f6a32f16cf70ea8c19d1a67779a9b2d2b379665e0e908a88b26e7" + - "8c9f94f17acefa6d5feb70a7095e0297c53e091cf98df132a23a5ce5aa72" + - "59f1154b92e079f0b6f95d2a38aa5d62a2fd97c12ee7b085e57cc4652863" + - "8defacc1e70c3aceab82a9fa04e6aa70f5fbfd19de075bee4e3aac4a87d0" + - "ad0226a463a554816f1ebac08f30f4c3a93fa85d79b92f0da06348b4f008" + - "880fac2df0f768d8f9d082f5a747afb0f62eb29c89d926de9fc491921474" + - "1d8647c67d57ac55f94751389ee466bbd44dbe186f2f38abbc61a0425613" + - "e9b6a64e6bcb45a2e2bb783b9103483643d5610a7e2dcdb10b5d78423285" + - "506b42a99b00a4fb7b619b4526bb4ec78299dd01ad894fde2f053e18c55b" + - "6047f86333f2690c2cb8e87d9834ab8a5e339aa346e4d9952ed62dc083e3" + - "b11a823a67f23fec099a033f127ebe8626a89fa1a5a6b3520aa0d215a8e7" + - "dea3af37907686c16521739a95d6c532cc259c497bf397fceaea49cd46b9" + - "ad5c1b39a36fdd2f0d2225fef1b6ca2bb73fe604646c10ba4c572ab13a26" + - "559ededc98f5a34c874cc25621e65ba4852529b5a4e9c1b2bf8e1a8f8ff0" + - "5a31095b84696c6381eb9ad37ac0db184fe5fccf3554e514946a33cabe6f" + - "4d617b549d28ad1cc4642dac96e0215ee1596481600d3619e8f45e2c9ae1" + - "da834d44aca216bba0efef6254503ca90339f2d7ca508b2722d50c08def8" + - "a736590fa44855cd9eb9979c743783aa26e633696739f2ae25ff7b72ceb2" + - "4dff4455b85bbd675c8cb71ad18386dc58c371bdf37b4b3875b98a9423ff" + - "3becfc0d0ba2aacab3ee7683cb3b345095fefcaca5751ca793da63c89428", - }, - { - key: "f3717306b9729be998cdb2c9d856306c5ae3d89da2cdcef12f86f6110c98d873", - tag: "907dba0f4849c7cf4570b5128b5f31d5", - in: "079572187d4559f24d8e48dc366441acf226a4db79e214ec3ee288acc349" + - "887e2e377419bcafa377d0151497b52e4d9cf2a02b0fc91ad9516482bdf6" + - "eccd1497954b53241bfb0bc5c04cc45045c6251f23a510060fee32721872" + - "bbc95cd8d400dff00bcac2ecce6229c7d73d8f85ed5a87afdccf6dedd299" + - "2d5c7b5b8090c47c737ded036ff0e9aedf02a2242fd9820be618b9601e73" + - "d3ba5d8f1ae9805cfd2306251704bc74e3546997f109f1dfae20c03ff31f" + - "17564769aa49f01233c9c4b79f90fa3d1433d18cdc497914046ad77d2792" + - "2588a7d0e61d4258d7d80cdab8503e3111ddca22cf7f39c1f80f1e16a68d" + - "9e21db8b53dd316dfa4233cb453a39a90101c60efc08514a3057db007e96" + - "507745bd4a0764ed8717a250bffb5fd1ea58474bdfb5b869681939693926" + - "40d832a3387ed4ac9cdab0d2af8fcb51b86e4d927097f1e79b5af96574ec" + - "d59d0dd150a0208978c41de28ad6cadf72a49279cffd6dc281c640f2e294" + - "4cde49a13ed390da1dd92e3011ce0f4a0863375a9db3f67fca1e3b8288a0" + - "78611161d7cb668ecdb932e1ff3733982c8c460eeeff2bca46c96e8a02cf" + - "b55d770940de556373a4dd676e3a0dd66f1280c8cb77a85136b3f003fab4" + - "887dad548de7bfe6488ae55e7a71da4097db03900d4b94e776a939530328" + - "83492da900b2a6c3e73d7a6f12ee30c9dd06cc34e5a3893976eb1de5864d" + - "32e792ac02e68d052d9d0cfc7cfb40b77728422f6c26cf68987c6b40fcfe" + - "9d660abc657360eb129de11bd70af5eb8fe350af2c27a6ece2cdf81b94c8" + - "0e68e8c51106497cfa5171236efe2d71d76b5dff3352af9b407dc5aab60f" + - "46b5683646f5b28732b7c750d351a08a507243d8e437cc4bef13a3edaa20" + - "5fc4e9968b4e563fa0dc965ba20b8e48bc188a321b16d3213bed69647512" + - "7a20afc1a3680ef261df6d37b017dee05cfc3a42e4130216e5540cf715c4" + - "e638d7d615c50bef576eeb19b3b15b2c2b454dfcef2b18161a143ddf52fc" + - "8e88fa71cbe34c92cd4b5a0adc81e5c33e11d2721bc1b95a9e693ac3cabc" + - "490889a8a42bf7e22375b679e8598c8faef22a006ed2da8ab1c08aaed2f5" + - "6d6f26649036335c0881bfec1e3a5346335c3b3707ee92173f1a7a3305c2" + - "933f78e995da8f1df64daf12b81ce23c8813c27fd4551103dc33561c2e80" + - "45b6b6770fa03498fd359a104884699d628020173edbcc4398b977e456e4" + - "885964840466176a490e7c513ba5d66090277c1ab1632a995a54f555a452" + - "1170a000507865b6650730aa6d6050a55959102836fff3d37e4773340e59" + - "2e56951ff9652519de4421d9c5b63edbeb30a3852a1ea110a9a29721aee3" + - "23d5a306de1624cecc87badc47aa87f489635d2fb60bff62ba67f5257999" + - "6af0a1f1a6fbcd8704e119196fcc289a6db6a4170a2cae31a1d30744b702" + - "2536d1526d41659c2dcc8b39c26aecfc0f8a707136d81b2827a158fd7386" + - "a537514471c213a8c859016748e0264cf3fbde10f40c620840ec4df99432" + - "e2b9e1e368e33f126ec40c572e841c2618d49d4eb098b9533b1f4ae00b46" + - "8d15de8c8ab6d0b650e599576f2bd90a124c9c6a0f911fd1bd8253bac272" + - "942cbdf8864f3747ff7f09d8a5a9d8599be7ee1744e5f1faf3e526cd2a06" + - "b157527272af9d38565957c9ce663c295766c0e0e464971c6282b70d4c0c" + - "1fb3b69856b34c089ad2b2c745f5a033cee1429c5b855581ee285278893c" + - "43a5968d9c28384b7abe8d072ba69089c938685cb1eab461f05314ad6d06" + - "eaa58512f8738bde35b7b15ef359dd2e8753cb1ed6", - }, - { - key: "9772c1a4b74cbf53586e5df04369b35f1fdca390565872251bc6844bc81bda88", - tag: "68eb7fc459ecc3be819485001ab438dc", - in: "e115cc2f33e367cb85c01a914b3a512404ad6a98b5b0c3a211d4bffd5802" + - "ee43b3fb07451c74524ec8b4eddbb41ca33dd6e49791875d716a44bec97b" + - "7c2d4546616939ffa3b1ab9b8ba1d1a637e7c985cc922606caa0453085e3" + - "5f2fe0bd2de129d1d1856ade975a3281a62965927d8bb695e54514e69558" + - "89361a2a00a1b24e62bda78d0b71a0d40147016fcdaf1a702331dda8e678" + - "d8f476dcc91698da1688c610ec0cb1d9b8fbcd45dfde6d1503ba60a01337" + - "ae5b2f5c854a82c3087779babd2e522dd92f4718cd9f8c649ac226745ca2" + - "fa1696442764758f67cd926369578ae87612790dc56ed9cda935281a490e" + - "5c984950ec7a4e930520d273a69da4ed3a330e532508e26f942961fed0e3" + - "efeed52a7b96250d723155aa39a8ae85131c255c32bf406b647de1a37fba" + - "dc61e302bb5b70adec4505ee66b3a1d1b7bfe9c58b11e53ad556d56e5807" + - "017bb30b71be94e8f86aaf1496e8b8d6db75ec0afbe1cd336c23963c745d" + - "7b4ba1787ceb30728f1762b46f6eaad5064c8029d29b86266b87f93142a2" + - "74f519f3281d8c1cb43c23eb184ae41f3f625cf624b05a48d73cd7783fdf" + - "14954a03ec1a930e9a954424eff030e3f15357de4c19983f484619a0e9e2" + - "b67221cf965e9aa8d8926595c793adfe0181050df8b845ce648a66df532f" + - "78b10c83ecc86374a4f8abf8edcc303654bafd3dcc7de9c77a0a9d1d98fb" + - "121534b47d16f75b55fdc2a5e2e6799f8a2f8000d4292282e56863ae422a" + - "5779900ad6881b78946e750d7777f33f2f013a75c19615632c0e40b98338" + - "1e9b8d35a26abe30242c45662eebb157e6d7a8a5519de60268ac289b8295" + - "5d4feb47b9eef6da65031c6f52c2c4f5baa36fce3618b6a331f1e8bdd621" + - "48954fcf0846afeeb0a6cadb495c909a7fe671b021d5b0b4669961052187" + - "d01b67d44218471bfb04c1a3d82bf7b776208013fc8adabaefb11719f7a7" + - "e6cb0b92d4cc39b403ceb56bd806cbdcc9ee75362ab4aaeb760e170fdc6a" + - "23c038d45f465d8ec8519af8b0aad2eb5fae2972c603ed35ff8e46644803" + - "fc042ff8044540280766e35d8aaddcaa81e7c0c7eba28674f710492924c6" + - "1743da4d241e12b0c519910d4e31de332c2672ea77c9a3d5c60cd78a35d7" + - "924fda105b6f0a7cc11523157982418405be0bacf554b6398aeb9a1a3b12" + - "fe411c09e9bfb66416a47dd51cbd29abf8fbbd264dd57ba21a388c7e19e8" + - "12e66768b2584ad8471bef36245881fc04a22d9900a246668592ca35cfc3" + - "a8faf77da494df65f7d5c3daa129b7c98cef57e0826dee394eb927b3d6b3" + - "a3c42fa2576dcc6efd1259b6819da9544c82728276b324a36121a519aee5" + - "ae850738a44349cdec1220a6a933808aee44ba48ce46ec8fb7d897bd9e6b" + - "c4c325a27d1b457eb6be5c1806cd301c5d874d2e863fb0a01cbd3e1f5b0f" + - "8e0c771fca0c0b14042a7b0f3ae6264294a82212119b73821dcfbbfd85bb" + - "625b6f75e4dc0ee0292ab4f17daf1d507e6c97364260480d406bd43b7d8e" + - "8c2f26672a916321b482d5fa7166e282bfeed9b3598c8f8c19d2f8c8b98d" + - "f24c2500c8ad41cd6ed3f2835737916d846f1a6406cda1125ed7740fe301" + - "d1144559b7c95fa407599ae40a795226513153f86c9b8abe7d8aa6963c99" + - "5646ec586cbf20a03a698cc0681b7bd333402d00fa8e15cb32300b5a24ea" + - "316c5e1df67de78891846cb9183a4b112c3bcc17bcaa5fecd6c1dbbf6ef8" + - "272d9269e7f0ba9f17050a6aa5f11cb28874360396ab647941f2c9a85cb0" + - "6a969919b16997b0827af8f909c614545f1ad638ebb23109f6bab6b49b22" + - "b2285cabbb998b3e1bf42771b4d4e52330b224e5a1d63169ec85fe1c7dd2" + - "46dbafa6138448420f463d547a41c2b26026d4621b854bc7786ab3a0a93a" + - "e5390dd840f2454028b7c3bb87680f04f084089bbc8786ee42cf06904d01" + - "7e405144d2fae141599e2babe71abfbe7644fb25ec8a8a44a8928ff77a59" + - "a3e235de6bd7c7b803cf3cf60435e473e3315f02d7292b1c3f5a19c93646" + - "3cc4ccd6b24961083756f86ffa107322c5c7dd8d2e4ca0466f6725e8a35b" + - "574f0439f34ca52a393b2f017d2503ba2018fb4a0991fddc1949832d370a" + - "27c42e", - }, - { - key: "d18a328b63a1d0f34e987682fe6ca3d48b4834b4312a17e99b3d88827b8d2238", - tag: "938b43b80cb3935e39b21dd8ba133cf8", - in: "bc2b0baf92580ee6c5efe640f2a029a791a3c77bec459be74cbc30931508" + - "d9f312c3a0944212831cbe4fc92e8f107f2f750c91bcc09f7624fa9a09b4" + - "9b7712cf5d619ea9da100fc23068ae2f4e353047e3956b215884bdb12235" + - "3f06b8ee98f36c3212493d61ae9ce151cd0453f3075b18a12d7d73da3de7" + - "dc2d98376cfb420069ca8148c511ca6bbae57572394a3c615a6fefb30c5f" + - "d727f964b4065ac9ee252bdd2bcae3e70162fe0e8069974e073f0a093d45" + - "be52d7de16a8f5f65c548aa6525822ffb00dc642530fedf355f7188ef017" + - "56384760c80afb61ad903d10119a7d615ec4fbdc79c490160bdeaf200915" + - "e405f2a921a2380c0ab9d2ac1e4fdc8ec4b907368c004458598efac13dc7" + - "2751e7faded538e3dc8b16590cac9b7ec294da0ad53e22cb9c05d8ef494f" + - "a04f6ab7c843c867fbe3cf1b4eb146d65339b0b03392259f12627a8e98e8" + - "0f4896c30b8ecd210acb2365539a872541921dcd8e1e54caf4936dfc7e1f" + - "68f3bbce61d325b447a8cce7f0fcad28494f2e47dae46b136594b5dfca7a" + - "bdafd6856f91496c05b21079aa55aa8c41628220a2cf0cdd755893375b7b" + - "b13d914c9a1d1db4a18f8fa36c55e52d0342352052032fb62d32fcd51cb1" + - "ac46f44b06e682db5d96d583cda03b966c650c03ae53542e8da1066b6884" + - "4a7e2280c664415e413f270b1fdcfbb40b9daa6131d071ee7eb1553dc5b1" + - "a50677971223dc316d2d326d57cbd529c88698facdca425e2d5c6b10d7ae" + - "cae28b8890aa44ede9b9193dbe8d1d8aa1fa580ca384b57eadcbefc96dd8" + - "bfccbe3b855a96f1fd4913035f817b75954ef1827c7718aab24d353e41cb" + - "a73748e14e0c2750d5b6a9752125708cc7ee7a498c7fbadf4186e7f8fa93" + - "bfdf281a49400f877621651b8ba87edda5231e80b758564e75139b61b1a9" + - "9fb9ec694f928ab1f47c6c4287bd4182d1b2be053380616e98da06f3ef57" + - "b570ade17c51da1d602b6ebc5a638ebde30d99bf4f91d0e01557c7dcd8f7" + - "9e5120143c935fc699eb5616ccd3cac56b5f8a53ed9e6c47ba896bfefe71" + - "2004ad908c12cf6d954b83bec8fb0e641cc261ff8f542b86e62d90e227f2" + - "a5bd59c9d390c0dd857f6da2b7624787a0bb31908bae84896890b283da61" + - "d8ec4f56eea38b22b438d6374b42243f9c1d94288874e53ab90c554cc1f1" + - "d736acde67aff55007fd4b3becc4d0f3ddd96f10dc75255cb0327aa47076" + - "2b3a3a656e33c87b02a682658b6cd2a75d9c0462803c9bbffa51441501a0" + - "3a2fbb2344aa13d27ffb9e98704ea6720b6a9992e53449688cd74d0648fa" + - "e8e776b0ea6bf048b2ec05341e5948cab0af015328b284ae7bd89a5f763c" + - "eaf5ca3e647a9f5bff7197e4d357e4359fa5fe30709545453149be510e3b" + - "ff86beeba5110c79c0215fbe9ac9339a8ac7d41f7488588ab14ac657aaf7" + - "d5c03a353932bbb2b261f0e83f3526c5e8e0c2348a10ab4eed6ecdcf9014" + - "7550abcb0a722f257e01d38bad47cdd5a64eef43ef4e741bf50da275720a" + - "0aee47adfc5cd2534b911dc269197c3c396820b303f6941e3fd85b5ed21d" + - "6d8136745c3eeb9f36b1f226434e334dc94be8a5606079cb7643136aacd2" + - "da9c38b2eb7e2b898bd8632003767bf0c87d00a3c2fcee48bbbcdd949af3" + - "3455128216709df25879b0ce894ac4f121dfca6b8c7865002b828696641d" + - "14ffc59924fbda50866fded0afaea545c8008c564a3a0b023f519a9980ea" + - "d541d91d1c07a739fd02286ea5660e473f80494236a68e84ea31aad71348" + - "e45055ded69c39941e31d51df257a4d0b0d8f025dbedee093f2b91795bc1" + - "533dc472020769a157a187abd6d8d52e1693e2ef56b2212759d0c0120e54" + - "c425d0084fdb3925e296dd6cdd8e677043a90674904057d88ebdea5998aa" + - "03562a790adecc4399352df43e5179cf8c584d95ef8e4b37295946b1d37f" + - "faf4b3b7b98869184e42ea8b304fe1059f180ff83d14a0861ca7c0682c34" + - "b48a70df8653bd8d9a26f9489e1271fa44e41b392e648d0e619ecdad2c53" + - "952094802eeb70ade4ffe096e3049867de93a824217e31364b18204e9681" + - "dd8e84ae2678aad155b238f59dd9bf9ce07e97183a690b2a46a8f3624843" + - "5b2f713e7d8dcda4dea1e3c4cf9692dda082322c51f7bb1f63d92aa987ec" + - "cf1355a043e21a7b8d60a2b97f18487f6fff4c77df92dbfdc9837540c518" + - "9fd9585731bc6e726a34ca21154b0499522c9d1016953dd0fa2eb6a92b6d" + - "14d6e3da5c12fabe92bd639e253983fc91041091791643", - }, - { - key: "46e8eb27acfdc8f4be622d8741c7bc414464c149e21da97ab4afbf3e07b98b0e", - tag: "56b5f49be824c7a19b19faabf0787a87", - in: "ced52b76c057872a60107194b432cf04b7be05e65209045d2952ea0284d8" + - "3e2ed5a15cfdc58071204573c18ab03765b4d5e63a601419e039c42075b2" + - "7ebb2827de9c6233d6632e6d3db9140bdb4a9291d53f33734c2dc8e24df9" + - "0764dc10e0d321d20fdf659bfa2a81bc9e04fd0f83448143276647c08bfa" + - "dcfe3bc23898eda655c9353693ed7b022f43eefa23c21db7660c5029ca64" + - "a6085d93029ea6c43197356f56b7624d4819f5008d053357d981ffbe7f40" + - "96d6c55d8417002d36189b04bbb2c637339d90f4910a400833a8d422d88d" + - "c816c1636e8d9f7f926c244a28d9e0a956cec11e81d0fd81d4b2b5d4904a" + - "d1a5f55b5ec078dcb5c2bc1112bbfd5efc8c2577fe6d9872a985ee129e5b" + - "953e9cebf28cf23c6f9c6a5e09cb09ab586c6a50e4389cd3110777591d7f" + - "0608a3fd95b99f6ba03984fb0e13c6bbbde3668c59f2f2b69d7caadffa94" + - "6f67e725d56280e59e66dca025a18d4616e81abd9801835bd94485bb2025" + - "dee81fba440005b181ee81dc1d7796cbec92e4ec1c9016c8e8073cf281ce" + - "f749993f09a618a4671d58b476feffa454600f82955c591882715148a826" + - "586f68bb50059914dce1c1c85e5e3951647c9964ec9316005209a58baeb5" + - "2c6d01e6b4c275c0050a7e2bdc52133e433b050a700b556d4314e5c041d1" + - "93ee47f47adc971aed1b63259dd5cd4f95854a71a947eae3d3d12d0d7b52" + - "c6cd2fef2d2e892607a9681d73ac3236fad21ee30a4f857010bc95c00d5f" + - "6f0c6b3fe50cd6452be6eec4f5f01542dc2cb5e2db1f52224f11348fe2a0" + - "5d1e5885f1317f2d06ce2813dc4c723008e836a2ee95d0aac66855fe4c3b" + - "1b2e02ba0700be759b1ef1c2a3123ee4ccf9200d8d4de5e0d503f04c2053" + - "66393d1e91b648392ca28389d976aa618b4796acbfe8aa356ecdce1f7786" + - "bf09af226bb9402317b6fa319bbb9248d8ce00b1f49f066c69d4df93266b" + - "938342cd7fd4b07c320c2409ef72d8a57c21d0c6d6d493f7ca94d01b9852" + - "e4fca6a9291e9060154bc38af6c86932645f53914709fc90e11db56ec471" + - "6d600ee6452041248ea8244f79534f793bfc1f2020855d817cb4ca3c48ea" + - "7f6441ce9af9bda61936c226d810086c04a35e8654fdc30d4b35701adccc" + - "016d5895b2121ba4066e44d694f6371d97911786edb73dc3020ba186a01f" + - "ee3dd6036c0e205a8d05979bad228fd12c0fd2fded6c7f1e4c11354d266e" + - "d9c2f706269c43cd90504997d93a17b39b10dab0ff083ab3bd06540ce612" + - "d08f46ce75a16ef330525737410a0d98fb3d484968f9c12edcaf50103fdc" + - "c14128ea4ad6c30b56247eab28197fe617e5f88afa5cbe003c63d423647a" + - "d3042626fafd2084a0582ff1b1efdb5baa162662048019546234e2f6b6a1" + - "d8bb971114aae41df7795b4f3598f2af9e8921a9aadc7fab6c780aaa32a3" + - "84865a4ccb02351dbc55ec92a3152d1e66ec9d478be5dca17b4a131b4a0d" + - "3d4420fc6123fef80fd56ca266407d58a7880d6b7e5ce2b6bdc9a3721071" + - "7feec573d83c83a2e3f7d4023f2f68e785cde728fdbf5054060e4c89faa6" + - "1c9dd10524a08811d15c627b3b4ada549a3fa1d8dd77c005daaf2addeb10" + - "0abf694da8dd692f113965cd6366a5a7b0c17e1f2a320243e2c90b01418e" + - "22426d0401a2c8fd02cb3129a14fdfa6cbcaa1f1c2f17706e9ac374a3458" + - "777761e986ee4c358d26f8e420d33230d198fd86704e77298dd4c40c5205" + - "7566ac0cd92993b21937c3a3b4a8b89110a97cf38c781ad758bdc28f3565" + - "60cf3acbedfa8e05b396d226ef619746e8e4fa84c8e00a7f0e6d652808c8" + - "9c9b123d9bd802624cfa949eb68af85ca459b9aa85b81dbc0b630856cb9d" + - "7e18cdc96b3c069a006dd5b716e218a5ed1f580be3e3ccf0083017607902" + - "a7967a02d0a439e7c54b3b7ca4cc9d94a7754efba0bb5e192e8d1a6e7c79" + - "4aa59e410869b21009d9443204213f7bceb880ccf1f61edb6a67c395a361" + - "ff14144262b4d90c0e715dbefce92339ff704cc4065d56118624a7e429e4" + - "cadf0b9d2e7ffc4eb31c6078474a5265beba0774209c79bf81a930b302bd" + - "0f142534a6ae402da6d355a010d8c82dc379ea16d49b9d859a7de4db6e62" + - "40f6976ae0f47bc583b327df7ec88f5bd68f713b5d53796e72e28c29e843" + - "6c64cd411d335623ff4f5d167f3c7b8cba411e82f03714662425c8e1bc1e" + - "fbf435d28df541a914a55317de0ded8c744a1c3a6e047590244b207bcdcb" + - "f4bd1f9f81210deddd629192c58e6fd73e83812f084ef52f21c67bea98ee" + - "17554437d9642e2e", - }, - { - key: "b41210e5ef845bd5a8128455c4e67b533e3e2b19dffc1fb754caa528c234d6a0", - tag: "72c9534aec8c1d883eef899f04e1c65e", - in: "7eeca180bb20d99635e36b9208221b2b8ef073fbf5a57f5190e19cb86c49" + - "89b0e8150d22ec3aaf56f6ed9cb6720284d13a4b0a34cd3d7f7fc7089326" + - "6d1893fa4185269fb806677ff490aec8f889896fca50d6c80d295875b1d5" + - "4a779b6d49305360b31011b48537157d0f323ff4e865d46fba6bd23a06c1" + - "46878cf9404360d325432312ff08ce495edca63a3c93c44d79c050e3f1de" + - "4b6ca5fedbbd43dbdef9ceb26d440a59c7e0be3a8e461c4f15b6b1e1dc36" + - "a71fc723ad593fb903e83d0804ce497fc49bfc6b6a602b9dc6e9891010b1" + - "4ca066cb1c68044c1ad837c638076dd3708078509cba49fdc54922cdf5d7" + - "715fb43e9b5a5942cb8950eade143577bc9dcedde58d51deddc70075e452" + - "bbceab1e95b5d003eb96bea69687faa6d50d9c605769cb4287b5d9924dd6" + - "8881c699abaa6f93e41dac7639cdbbbd0259099a3ed096f482a1fa322b15" + - "ffc379812c74e09e95f1bd3706347eac421fe56895e738a47fcd3e118773" + - "c3a7e7e264cc7ff5a53a80e436df058265dab9756fdf6913786a47e98bbc" + - "411052d58ffec9ee948e28cbaadaae471c5d828eaf3b3c87d3bfd495477b" + - "403da54f1418a15ace0d4d0df68f6a8f2b0457b127d5eae1f45ae055afa1" + - "8f058d5dd7eea559de3ae9378ca53f7d6dc9a9465ea1f945295f16ee0404" + - "7fc9dd3deda8ee32631d7af70c20edc1e12c5f8abd2e78f43dbd4cd6407f" + - "038efab144a24ea8a090a7ba3e6499345a60106220c2959a388e1a73d070" + - "1d854bfaaa86165a5aee934b615ac7f45da7c43a1e8f74613917ed10dcd2" + - "27e4b070414412e77851db5bc053e5f502bb4e2b2645bca074c18643e814" + - "4caeccb58be49ea9a552913c0616382c899635eea79a166988c206b9aaa0" + - "977c7ced89c4c7aaeaa8fb89b38030c44530a97187fda592b088198b63a5" + - "2dfad59a0a4c1aadf812bdf1881924e8b51b8fd4dbca8e73b2986b3ab484" + - "171e9d0cbb08be40ae60de8818bd7f400191b42c7b3200c27643f06720a7" + - "e0a17441f34131629388ac43955b78c31ea6602a70dd665f872e7669e865" + - "f6f40e634e8772d747608cd3a570e1726eb1ddca64f08582b022bb026eda" + - "6a913dc83f174ce3c18b9fc0503d3ac74e2fe45691d6dfb4af8c86d752a1" + - "6d6664fab4de08afe8858392fcc35cb9ea82fc42c42d48c0c0556267ea0d" + - "cc19b10f05e0318c4488ffe704b5036908f5cb938eebd3163503acaa874f" + - "592d945448fbeb93a877a26a72306a36e181745ba300afdc30cb7986919f" + - "3dbdc5c47ef1fa052a9e4aeeda3955f61ce2f30a0593a81dbaffebac5a49" + - "e5a8d1308352701d1ca9e620a67a89abdf5f0f8b1a0acfde5819981d4b77" + - "58799c0fe41030b86754837712af821c315301aa8dd50d1387b9fb92ee63" + - "10777e08229edd54e5e86b086ac281bd321082ef46ce298a6211aaa3aa4f" + - "6e55b5a4641220ec94cca73087760da1b1ac3e0da3f438214e691aa184b0" + - "535950b715a64d11485940dcaa3f72e0aa521002b1443f5e7880e2a85b83" + - "40d32db0fc4c4702e10f0fa24a35da9307850e945f608ad34d6cfdf6f2b9" + - "ff4f6b8e9eb5a883546578e2ff3cc5787322e4384640f42dc5bd05f432d9" + - "610dcf7c06cdf34762dd2a5e805e24aee8cebb3b4db9e4d1471da995bba9" + - "a72cf59ea8a040671b1d8ce24a3dce4fc86d2df85c8ab5e1eb2b0567c186" + - "4fb464f48c3ca72c7df2749542ed4d4be51b63769012ce3d06356856b2a4" + - "24995a2429a156ad93bc79c705e7b163149ce53a42c34a19680dfe4fd0f7" + - "fce38c30dffe9da9bc941d131f435c1398f8284a230e9d6e3992710074c3" + - "881d03aa309a9edd0fde7a39c33f6455dfcc5ae3fa20ea0e0d6549a43536" + - "b4cd8a2991a135b7d7a4265fb840318813091274414108f13fe191db7774" + - "6a5f4270f6d51a29ff523954f84cb76131d4abee79161dcbd97dc1ef24cf" + - "db1fade057dddee00a1e0de0db1afaeed1b535f7bb402afa3b297551fd14" + - "8c8f3e05f1351d3a8ee2948daaf14e7fc448c4670c906ae076eac5a7c656" + - "fd5f9cd937b91e26c9e5adb43c138f8d65e447b0022a524e059f879c6e27" + - "4ff7e671f75717233aae70853d5bd7bbb41b43c47bb08d6dc2f54f9ec606" + - "9487d1267add72403d01552a3d138abab9ca8a0d2dc32439759aa5695f70" + - "1a17d28dfb85850fdb55fddadcdde4d220e4b05821e5736d346e7dc9c945" + - "72743366488b1de8975184771361894b6520e3407c5c2e38473430969e35" + - "b106024da8618665d58c9d084824a28991a33658d6ec702139e01b65b7d0" + - "cc537a644caeee880657803d95f5f67816948d5ab362922f8ffbd531473e" + - "b0ff8fde2afc37a4abfa28dbed0be1b3d4ed48a1d02358e8403905d33b12" + - "3066e7a9fe2491ee9eb24fc9de7dbd322c8ddbc5ebcd0d92cd102ebac96b" + - "90e2fd784fd6d4b699304df23b17d963080a013794322690456be525c071" + - "b78fcd2d1148026e44ff14c4d0f942cd44d2b3263f4a93b79ec7a618b4b0" + - "d77ae7a1f6e6c7c7e2f498b825bf1954df348bae45ae1d7c87b6787f1212" + - "60c9a724429a4a2491ef989f65acfdc72fa717486dcf1984905218e11cc3" + - "970a09d71061e6df751f100abfbf", - }, - { - key: "d9b0dc303188756312c12d08488c29f43a72e78714560fe476703c1d9d3e20c1", - tag: "6b9782f2a09b59653aa448348a49291b", - in: "dbde1820035997dc8a8ff3015b4e0674e7ce7bf0c2d994b7977f2d91b49b" + - "f200995040daeb1218a0f4307b6b8211913992b070d321bdb947b4ba5017" + - "a0885e7e5502710a75cbbcb56d49e1bdc2bc2afa5a0e83851162dec41340" + - "bafc41c5e11fcbf4ea2ac45bc57def4742281bbf734777f83c9ae1ea3d5e" + - "d42380230570f59c40d5dd9a2d89b75fa3c92664f12a274d965ed8de79a8" + - "b37f3763939ad21d1703ad794f617c8b32b20cc4dd7c1b7f969a65e1bafa" + - "f6c43f30c9eba256f10201910e2cc31a9b13a46ad29257024ef8f2ee29b2" + - "ee63cc5b6230ab9f87cd5cb534f4b0bb08a790466e0d57b849fffa1ed21b" + - "fb0b27804e3ff9df7bebf14e100cf91691a493e53870abfad6321f6711c5" + - "0fbcf1f0b2c1e5231d6c0a08e710525176355f6f82bedc1f787f0d3cb41f" + - "a11e91ebf9f4cbae46035a371232d63ef0d8bda0355af8cd0a2f7d1327d8" + - "0ab769ea0f1da0f76ec99cc737b5ce84675fa8a9ac0c98342bb82b5848bf" + - "656d35327ea01a1b09d84ab974c307511af68a30cd6978b529a8f58c68a5" + - "9d476062ace8897ec0d1a90d5d167e29ebaa6f46d93d697760c8771417ce" + - "94c0f3698985a98702833d1b68641b811840ca3d935386dbd4600fbc81c8" + - "728c4fd0e4588be739a048f03bd4ac651ceecd7e2fb120fe7190011f957f" + - "cbbfdc025f1ca0b356208db8cad87fcd53c5d3a30a7c2a48140ccd4cdb49" + - "f3961cef742caedd1e848bf3cacafb0da030416bf3177877aa0bc5f9d1cc" + - "41fafcb829d5e3ace9394028683d712552579e024084a6b855830ad9f567" + - "ff58f05d3ec263eddd6f56adec378f167e8dabbeaf7d0a9e65c71660314d" + - "6c8d54beeca2711113fbc32a2ff8c0daa8373278d10085d2a0660ad53f4e" + - "1ade74a483be180180acf9e9ad3ea5bdd9162ccd69599163a451c6837d5e" + - "a5e115bd9a560f395128ea002ee739009a44fa46078b18959933fb6e866f" + - "eb4612a56ce93b1affcb95fccaa18d71a148582ba1412a5daa07404fcb39" + - "c3cb4a2519cc506c1172c6c326016ae2e5410f6a438569f35a50d45cbf3c" + - "c46188651aa22c257858f60649cee8c05c75953ce49358dfe5980445fce9" + - "614ccd16d333ad236e29d204691ca0bf46f29da954bcaae52e41016556d2" + - "f4cae1d37565bcbe84de1b49f344d0200478a38187da29c155cc98184d9d" + - "33dca088d70054e0fce321f7a90c48a14963d0ace2b4e7a24b21c14a5e67" + - "1994fe1f7d22d1135d4df9268dd18d323fde3603288735626a5449582d35" + - "30e2c2225414e05a8c7b987c873a82e272a5d83e59b90f3d7264631d6ad0" + - "4a0cf3b5e96596a66ed5bfbc24ab6e4870aeec0acbad2cc5affaee06de32" + - "dca06f175bf763cf8e7fdf95941a177e934f0078be7dbaa4c9b6f5c16b4a" + - "5607bab5d56144a6ba3c7d9a084b8d1f4b24b6f9754ed207b230d3a2cc26" + - "259ccc725e1f8a44c4df8143e13edb5ebf073e2c9d2da5f1562df4feece2" + - "f6480987f093f642eb7afa3aa92dce2a8b60bb925cd2d11cf6c2ae7d2153" + - "1a9c8f068d71d0e682023932fe64e956a49347aed22b21084c4a84480491" + - "244ac6b337b6d12d5551ad5684766c68bacca62bdcafab6603c81bdbd8e6" + - "80d9d8b3825eaea4df023142e840f98ee251466a0422d810a54726a9f03a" + - "7e0afeb0043e60e2ba4908f951d2e87fcbc372096f2a9f4f2a95ad5faede" + - "3796b11ecf4401c3ee3d268bd8c46476c61e0ffc5c43c0f3c58c79e20f75" + - "520c102aa3c260972a870fc50f8841fa0553a9e30bf37ad282fb51b34adc" + - "7a933ca1691a8a706605ce0b906fdccbe954f8e5f2f63c42599a483c4be7" + - "3a041ef90ad930fe60e7e6d44bab29eebde5abb111e433447825c8a46ef7" + - "070d1f65862b30418efd93bfea9c2b601a994354a2ff1fc11c383e7bc555" + - "9e7546b8bf8d44358b1ce8cb63978dd194260e00a88a8fd17df06373aa80" + - "04a89172a6051bd5b8cea41bdaf3f23fc0612197f5573f3f72bce39c9f89" + - "faf3fb48d8ca918586d4feaea7e0f2a0d7a6afca096a081af462ea5318cc" + - "898a9cc09e8258a837559570cbd5eb901e8c0e04ee88ba31c81a76b000b8" + - "0e544feba576b3eb5272b53e46e96a0b35b9c759caadcec61444f8ec47c3" + - "45a1d2304e2708eeddfbfa75a98eab3493889047d690e84431d445407fdd" + - "99560c0bdd287e0944116f8ac62ab992ed3f1e2b415aea784b03c6904795" + - "f4326ff60bc839615f2894570dc9c27cf928ef192047528a1a19ec990978" + - "3b0d1a13dd4baf4a19e49bf798975abe2ad167dd574b32b3d0c22aa4d9b5" + - "2761e8f56cf2100fe5a39fceae3d865f3724d4f299d07ff899fed6baf7fc" + - "eb7189357bf56cf94a6493e61301b43e3ed158cb9c7a0e615fd9888c2db0" + - "7f7689762f62ef6b3ad4125e06b07a422f5040c3aa8b8f205d68356c9225" + - "56fc4c976165fed9599daeb297498ecf744bf6c7dc5e30604c461ad99402" + - "2eea0fb6fe33f82a97b5c272fd24162a94b761ec7e52173e7bb42e88b343" + - "64f5fa2c141ed04a86b8d00fd9c25bf77a8dc3e63f5543331405be6bf421" + - "6a891089b316aa4f887cb4aff0dfb4e80c2ccd65ddd9daa74b17b4411c0f" + - "c849dc748d9b138279dcd9ebfc6e6759a53f5c28a41bb82107d71cc161fa" + - "81291a8290", - }, - { - key: "fb70ae7ec12264ff9f51124da188e5b11dbf53cae2671363f6054b575b1ddcc1", - tag: "d9ab81fab28b3be96fa3331714e78c9a", - in: "c62edf20b1d53962b42386eb570b10378f9764421ecbd7c4802853332747" + - "19ff4c89c06005050fa9ba6579a844060eb7ece6c43bab520e683e0f36ba" + - "49cba259edc6ae35d41e0d7812a7d5edbe4d90cd5e0504d16f4c3f70d01f" + - "5a0313de55934b661ce1ec317968c2c4de60f45c66cded8c10565a1ca6d2" + - "3a84bf182df2fcb05956ed4d46b49fc0fe3bd23961d9466fde070341ce41" + - "bc6e148449360a31634fe10e91082d82def90d9da2c250ea72c58add2058" + - "d046b4392b78bc3af5b3936ed568733e8ad5672dabbfa3130a6a535ec73b" + - "da8e7223535f49f96cd35d56ed4792c5cb7076720d5461d96a2692b2ada5" + - "2be08fb7bad15d15a0108143790024f0f15f5adc275e783aa56b70844061" + - "e30952a040e4cb9650f2a010417812790105d8f58bd25d99b0db3cb16229" + - "3f6322e86cd5b0bb1505a7b998fb0f81d1e1915faca3c2c8ddea39115507" + - "80339430a7955521839deff5b301f3fad54edd5ebd2ac4ec9b1795cb4dc0" + - "e2eb62ebca8e886c3f1e507d10a0228c3027b472a7104b815f5ec8dae55e" + - "0783ff7ae9a3e6b99e381ad788206b135520cb870ba0cdbe876feea843b8" + - "5a82adc95a6d71c555f798da92b82daf0abfcdbc82ec30b1f12d78490b06" + - "7315735017a94ac150b44dfaace151896f873923310ffcd41e91bac04de6" + - "d70ea71565948c907ab21c4a23703fbbd2a8de6d3095f3d8f901538968e3" + - "60e7bfddb9d22036b1c23f4f5f1b2ee22623426a2d5de68c1e1a38e38e08" + - "e2b5670aac1edff69e9c73c2ca56cb69c709009ef1d541aff1fdb2b40c92" + - "9b87f162f394b76cdbba1f5605993e4dd9c312321d59b0aa5c6e33be1b10" + - "bfd00b92d4c02db064d0e4a98f2913c89051b0f0ead163deb5087b6466d9" + - "84f57553b0fa53850eaa142e072fd91802eb9f0d2eb7318dd620555e6ce1" + - "86706b866d41cf6ba81f100342faa14d801dc6f3d522db38fab17a879fcb" + - "b6acfe922163505bd23a6842f6ef6397ae5fb6e6016421998bd43b0142b0" + - "3ca3b16d6ccb7a47891c75c687d791a930b26aaa2e3412e7aa16e2cf1501" + - "7bf6df6d2e1c289af0d7ce03954a60c1dfcee5e4b3da51eb43ddd14faf59" + - "082005d0c8b104561f66c002ff426be60be769282fc5685cfd1968df1941" + - "73667e48e9ad681d35757f1199f1d93377bbad093c8cc3efa2bcb6ecb703" + - "694422772d15aaa58cab9e9ab277ed510f684114cc4a44ccadb3eb1c9a76" + - "d8619a9b7743106df6fb6f927ac49b22ae5bb9a9a4d231e340a2cd0e3282" + - "53f6d75df694826f60e4b3e758398793eaf73ef5d4b56cd1471e16400f40" + - "4a947e9737f4f874fe09a29ad799f4525156e3abbf0585c3c3c0a3744c86" + - "5d56db3d2ecba6bcbb1adcc8bf5f3b2a2d46d3eba18cda55201598a8112f" + - "d8f14e205f0e615f081b8ff6c5aa6669da776bfc7c34d5af4d0b26d0d819" + - "f6aacc53cf3c6653138b9a962acee9d6ea01d280c35bb1f05d1509238ccf" + - "004c5013167f804d1780d9f4ef9d45742fccac346b0472bde24ff5db9ae0" + - "16455a3c02256358fcd8e6a9aae94f8a37a1a3da58a889bbe3d295e16544" + - "2e580f59bdd31c92ffcab40c49c1cdbb4db1dd4882b66edc10fcb1704203" + - "c518c1d8d4c268588ce13fc38e0210aeb47d11d2603d4b3de5c6ff5e969b" + - "9d5904abb282b699bd04a6e9f1cb323679e30400d725aab128a032745dc0" + - "be05a46b02b34b93bff02523cd8498c021fc35a488f164a70ef1ceb873d9" + - "14a681d3a3a34cc76bfd5a547e2630d7741a284511bae5897d9f7a197fc2" + - "456af5c6cd7e1a93d3388c7a990b5feacd7749cf39fdecdc20adfdd540c6" + - "9d330195db7cc0d4555ea5f5356a3647e2265399f153c34ed1e217c5dafd" + - "c2c5dd3d566c332c7ddacb0d76ecd3a0ad505a4165443aa81b0f43cabfb4" + - "62942fe74a77c22b8f68a8b1a6d712d1e9b86e6a750005a3796ba1545396" + - "13170906d228dabf572ab969c762f8b296054f23d5d4a37bff64bf9cc46f" + - "43b491b41101256018376d487fe8097f1653a7a9e99e1ef2492600598fb0" + - "bbb7df8270be8b9106126d6f491f8b342a96ab95df6133e883d3db4c6a99" + - "402aeb58d371263a32dcf76d33c8904395b9cf0016fdfc15608eb43e20b0" + - "99cbe7455f7a76f69bba058ef96f83ae752587485657f89c7f26fde7fbeb" + - "a82ede581ee92821dc13b8202930aa58bd4f1c86f68926baca0d06fee642" + - "ea8c652d226af91a9638a0244f1a03c7ce56969b87cd5c1f86110d192e0b" + - "98dd979d74acca6c1956b1127d9a1f456053d17974081ed8ced0faa4293a" + - "319e5b25ba285c1151214f52c283e39c35af51c4572c8e395b7856697bfe" + - "dfc4145ab4ed0bdbe43ba509c06a196ae6bf30d7582550cb546c63b51833" + - "cb0dfff7196d83f6a1c6d6d712cce2ec1989fd9ff5a0a22ac5022b49d566" + - "58f196703e4809e7624fe7cfa6c13b378f5aac7e66e657ed7eaa942d1a00" + - "544a947199f24d736b8976ec2cfb563433c49ba131bd08b63636854219d4" + - "c45100c98e3092773ef492dd9210bfd8f54cfe2cddafcf5c05468d90e620" + - "0c2ef99d17fa6992cc45eff3072b7cfd51cabb07ea3019582c245b3ff758" + - "0302e88edc2c13fc43646ba34de37338568baa66ecff3accfebad88d143a" + - "fd1c3b09ae39c501e3f116af33b0b720d6c2baf5acd7f31220788b2f9017" + - "3ed7a51f400054e174d3b692273fcab263eb87bc38b1f486e707d399fe8d" + - "5a3f0a7ed4f5e443d477d1ab30bc0b312b7d85754cb886e9", - }, - { - key: "f7e7affceb80a0127d9ce2f27693f447be80efc695d2e3ee9ca37c3f1b4120f4", - tag: "41c32ced08a16bb35ac8c23868f58ac9", - in: "5a3607fb98eaea52e4d642e98aa35719bfce5b7d7902950995f4a87c3dc6" + - "ad6238aadc71b7884318c2b93cd24139eed13d68773f901307a90189e272" + - "6471e4bf9e786b2e4cf144764f33c3ac3e66521f845f6f0688f09eaa227f" + - "e71033b0f74295f6ddb91fe741323f2b54f420cb9b774d4291b06219f1fb" + - "4410b55900425c5e6fcabec76a5c2424d637a1641db6f0f6cad564a36a91" + - "0f49894bfd598e91f38ceea65e8253c1284f210cf7b50a96e664e562f3cc" + - "01c4fc490fa6d4679fd63fbb3ed8995a8a05166b573e92d22ef4370c6aac" + - "74ae94c94177e5f71143c6f340efceefda679ae76f6ed7f26eaa4848a8de" + - "8c40894316efbb06400f9695b18ba279e8947c032a84a40ca647d9ace457" + - "6dd0082494d6bd7be4e7928e749c78110af8774a5d43e9c9479964e2fddc" + - "ee51146460eac734311225d08c60706e40f298a7cb97f369ef599be097ac" + - "3bf1c275497bbd68968a235fdf8a61bc7cfeef0fe451bb04e662ca39f34e" + - "a8e3acdd0befe9762f9eeb275c0cdd43c80fc91131d1e0e790020975ab65" + - "afbea81f303ebd86760821efb4cad7cc01fd6d6fd194ac5ffe7703d890d0" + - "169e21b444cdbaf691fc741a5d99bd47357c37785755fa72582ca4754a03" + - "b4def86ded39aa6d9eb3f38801077e6d17e3cee3fb57ae83f30c79c3cf29" + - "0e2739c6b7323612cec3a561ebeadb4faa642f150323aaa9d270658c907c" + - "4c1610a5e1834730c08be3379cf1abc50c30e2bf01ce903927c27d85e135" + - "3db9e216dda8860c45925e2bb791abe5c8281ee6d16607bdca87f60662dc" + - "bd6e20224e7f009a86db66fadd8e37e0a59559328385090c6953cd20bb61" + - "f28a734fb056714f5159977f18e5c5f11de75f7a00ba807e47a29e4da32d" + - "5c67ec76ce4d7b669b5e6ee17e1df7c673dd8a7c87fce665cda8adb9547d" + - "1dccbdbe7be44846b4b121b0bfa65e4ed530789510d79bc4477e50178060" + - "f2668ac8956f39ef422ecb0e4cf90b8ce508552eedeeefa6c7d1bccc077e" + - "8088bd7e0e6aaf0bda9f11c412c270ee2ad6912f9808f9344a4bb137bdac" + - "b5b9372b00b0de026a8f5d1fb13972e1290b5005689f7636c43aee2fd443" + - "93d390371ae573f0e064b2d7df552b9adf04bf173d71c621795b9fb503dc" + - "5e918536c6ad25ce4a76f70e6b752b6d44be321187269a19bcf33ec899ca" + - "40e88b4eb23217095a85057bf95d8a54812cae4a7d32e0c2966a21376110" + - "74c6c8c3dd45a553c43c675d23308709f91be0b235d0222aa5e1e1ce08f9" + - "c6b45ceb5b47bcd7d7b2d4380bcdbd6eced452d93e6d8cbe18123277889c" + - "7f86b15fb991364a501fbf5d8244f2e3332ea0ab49e833c6f765017a4006" + - "cc7cd1a0365945a8d8873cb21832b210c83e451c01ac949de2fb0f7a420e" + - "405bf64eb251c6f022181595d68174b91e503187d3b3f49b60c23e44ea40" + - "ca20311305b413047bb22e89672758b74d6bd1a06decf09e9556421087a4" + - "0c1d2c44c5fb13d4d9625581ac4ccef1a1b5eeb5689aac5c0291aebda276" + - "50daf9d4396a64d02c6d58bcbd609d9a0017880ae0cbaf02ad0f1fc8d1b3" + - "ec987ffe13102d77352690c9b761bf13ea0b3a8ebad4a0823817fcaab4d0" + - "9b0bf03486620761dc77a6ba007ba07153b17425c4026597473e78863cbf" + - "430c0e5e9b04a83ad11506b61b8d9be3aeb06b5114e0d53d4724863eba12" + - "4f3b974bdb0d02743520409910621cd730c97ca984fe2921c38055f83ee8" + - "c4611db92e52d8ea51d89203e89df7586c574df15f3a96ed5a10bf04cb27" + - "f9656b5b11cf35fd21360b029ab26e9a741c6b3e6357aa1a41de2cac6e85" + - "f9a49e3441e60a60e74f434e1b8cd4454b11962e5507ebf904e9d6c52a7d" + - "9722300517c434758fbd6191f4550108b143eb16c0b60094fdc29327492c" + - "18a3f36737e506fda2ae48cd48691533f525acfffb619d356bf8347a8bbb" + - "4babdc2ac866e497f192e65a694d620687cfb4f631fbd6ae5d20ac2e3a12" + - "4d85f9391a240b616d829ac2adceedf8f3451ee77e4835639b13c622ef8c" + - "48a181fc7598eacb419fa438d4046aa971942c86b36eb8e16eab67105783" + - "d27fc56f5b66f35451b2a407d4648a87ae70807e45bccf14983b3abcb198" + - "d661d562dfcb00ffc569ca967171746e4e36f839946bc7d2ea9a0eda85b5" + - "a5594f6a9c1b179f7230eaa7797a6aaf8628d67fd538050cf47aa654778c" + - "11dbdc149458c1ec2233c7ca5cb172356424eb79479b6a3eed1deb9f3278" + - "5282a1034ba165032b0d30733912e7cd775cdb7e0f2616b05d521dc407a2" + - "ae7dfcf46fbae30547b56f14dbb0ead11b3666666c45d345cd5dbfa200ae" + - "24d5d0b747cdc29dfe7d9029a3e8c94d205c0b78b56d5e18613b3169bd44" + - "1b3c31513528fe102f9bac588c400f29c515d59bbcb0725a62c2e5bfb32b" + - "5cf291d737e67f923080f52d8a79f2324e45a3bd051bd51bac2816c501af" + - "873b27f253ef9b92ba4d7a422e2fb26a35c1e99eca605acc10d2a60369d0" + - "1f52bca5850299a522b3aa126f470675fa2ec84793a31e9ac0d11beab08e" + - "2c66d989a1e1b89db8d11439ad0d0e79617eafe0160e88384f936c15eb15" + - "ece4ff00e1ba80b0f9fb7a7d6138bdf0bf48d5d2ad494deae0ccf448c4bd" + - "60f0788d3f2b76de8ad1456f7572bd0ffd27bc2836d704d95e9c0df34571" + - "9dab267dd805577fafda03b834dd225ad9714d2bd182b4103faa5975180f" + - "90d5d6cac1825a19b9d4c87cc825512ae9dbeb33d2759c990905050f960c" + - "db3eb364c15b593524c882902b2a1d7fe40ea3f54fb0202fd8821463c7e3" + - "4b02a1209ba0048a9805f0468a13e03d18009318ecd92042959be263a51a" + - "407f1e660632c4247419659a4e073a8e9cd4a226763a7daea464d5427270" + - "7efd053cb4efc0504602c4f63e7d247b55db2ce1c07138f585d16cec97a3" + - "0731d5aec2166cb4de41695feb76280cbae1af8a2e67c2d5a3ac5487ffe8" + - "640f308ace6137e83576b79d586b663122221c20aba7a6bf60f73958f436" + - "59f087f850ba6e2d7fd862249c5fa6b20e3e43d4f2aa10d4c9cebfcbdf02" + - "6b8d103e4f89b93dd8af172f421001c8b162bd6d0b847a58ac108b6d6cc4" + - "9c7a9ba069deee", - }, - { - key: "e3d21f9674f72ae65661aebe726a8a6496dd3cc4b3319f797e75ccbc98125caa", - tag: "3c95668130de728d24f7bca0c91588bc", - in: "baaea2b4b4cbe9dbc4fa193c376271f40a9e216836dc35ac8012476e9abd" + - "43dac6b9ce67dc6815904e6c84a5730cea0f9b4c6900a04ae2f7344fd846" + - "58a99513ffb268c6899dfe98d605c11e7dc77de77b0d30986f3051754503" + - "7c26be7b719aa9ca1140cfdf4c586b7fe726a8bc403249396a11cfee0a6a" + - "f6c5e72259785cfd13c2897384fe527100170001ea19106aed38f7d5d9a7" + - "ad43f0b41451e19989192a46b4f9734a774b6304cb74feb7d83822044a24" + - "2e51d55c0b8318e0439493bd1a57cc13f6079166cabc46877d003dcd39b2" + - "c0b90f6b32fc77acf04a6c125e11b35d91e2b18401cd53df4aff804e3c67" + - "a8bb3894b27c6e9b0070b53a85aafab0c0a253f9cfd4d3cd3be52428385b" + - "24a3f9f71660ca2c38474d14a0309e2f400e2c21af6e379099283ff241d7" + - "51da5a96a8dcbfdc43b913b29cc8cf8020eebb4a67f5bed31f2e383f8656" + - "8c815ff172382b425e95902e80f5fc219eccb51b656d37b56660f749e5b1" + - "4976a23648680a472d02ba71476e0afb29a0e084984f4eac3befbf8dd802" + - "2b7dca4dadd18bbe58e49c49ce48a06a71557a9a620c51e2623f818e4d62" + - "c2564c7ba04595cc109685869b183faeff2ac7a65049fc57cb10fb01951e" + - "a525332782d691f9759ec2ecd68bebb9c7aece5d522a08ce7830be520db4" + - "c9d60a2e490eaa0c91e37b256a97f84b39fe3c77953748c3b86fd84e9547" + - "a298c049cb28b8c85d59548b8dce635d59487c9de615802d16a8adc4c0e7" + - "80f35b9f10588a431b39b499dca929ab9d225f26e5721820627fe62427fe" + - "06d5773a50878b6effe840dc55bd3ea0c35168f6b6a972d57e8f88c5993d" + - "1ae33e0b7e9459c123753b518c184de7aaf429df078c9a18a29af77c727b" + - "796f5c1a501fa8105ee873c4e78c907142eb19690638a182fddb413adb06" + - "d66db19c7f6f46dac582bd72a6347b4427a576eb769d233febaf7be8f768" + - "337273c12253924f15653f9f3602b783703a81454a1dd7a8772a9ab1eeb8" + - "51be33e0c6c0708f3cc2012cabe8e2f0c38e35372abe27bc148fc4e1054d" + - "9d151f80aec0232a3a92dd77928a3678ebd7d09ba7b4e1d83227257292c0" + - "b8bc4a76de36bff6c9deb383029afaf4f37d5b935dc080a18665545e4acc" + - "195da0b9545d8902408886204b64f8548b32d012e0cdc520c17d9fb3be97" + - "800c2e2b945cb09a75a0a49e5d4d81c4194d91e839333b2b9b9e34d588e4" + - "e20cc1e911ca0a1429fa70ff063f0090fd842f89dfc5cc44affcce4e1e1b" + - "8b11c612f66b074c03ac2a055fd8f51ac9ed4f2e624589ff5730721d077a" + - "fb4c19e43abf8cf3ffa698362be8be51e92c2c91a4a56be64d9ac6d3fbaf" + - "5536a24c7fd0adaf74ca84c508e5e8c8bf7d4254e0c44158bd26acdf3f64" + - "e78438b3aaff89ac9986cef1e3a88d5bf2016340367a1cacd01ec167ec6d" + - "185d93a2a220d718b43ce1d429d2cb598605660b030e51e8d75fdbdd5b8f" + - "8677675e196a40a88285b18b24c5d2d594bab3d457e6f9e503e38cd470a6" + - "9ff8037c9a0a0f110a434335d954fa856a3721e0edcfb14287c3dd9639ba" + - "4db32b7da0670dd0a872e468e3819741d0d4ecf0a4f7a011bbae1493c01e" + - "642757491189f8664be3ec6437c4f3c76abfb0276e44a4d28871d3487c2c" + - "ce2f230452cb06184bb8620919659a7ba0a3d5c12ec25678b03403715ee4" + - "acb6a53d281036d8f3a085143cf5ecc3a0c6c92129caa7ac1f645c7bb95e" + - "4f63da38dc319e2ccff4a9006f9b9b1a38c4c39f6dc686bb82d43fb9fce4" + - "0c767d3ff22f52c5f9900130c65bb6a9cc7408a777d49b70946665f4a733" + - "5099376b276a43dc9a6382bb2d40425f6481b1846148434c672b84dd7a20" + - "33deb5140d43ba39e04ffe83659b6deb48629e1abf51e68748deffb756a3" + - "ed9e0807506b248a024cd509f539f4161366547c62c72933584e851599b6" + - "82ec16f1d79e9c6a01cff6f51ba7f46b67cdca09f3ab8496322b990a6116" + - "8d7574854a1cb1cb8f30a303dbd13a095df56dbb940dd16ce79879cd2d73" + - "80a419842fa1b34da668286de4c1ff5917b7aaa64713c349dc8f855d04ae" + - "de9a3a4d0739dfc36510b1e7bb1695418164285c44631b4b1a7c5798ecb2" + - "d976c1a3679a827bf0e8c662567e402bcc1354222036ad5959a6f0b8508c" + - "6a8c7d4a63e7dde154d778fc80a011592771d55801c7e1297b00b77f80d6" + - "314ebd1f5b3057398d1943599897cfabb65e7568d8fbdfcbecfd4b8a83ca" + - "0a7bed08ab9a656424831e0d7718c15727af7c83b2ef5eb5684aa044eca2" + - "ba896811246766248b20a325094a4b4159f9cde1ee349be6dc3c9a190453" + - "0349212a9537f65ae333c288753cd2bef6c5beb2f4164168d965a2c0fb9c" + - "c8c73d9e776e23d53ddcfb83bb7dfe2a1b8c781280f449d6f310faf8b53e" + - "89e6a611d6d3f42f2aaed5259730d149b3e7dabdc9f865bc1555374738c8" + - "456abe112e9628fb31efc2ecdc972da05987aafce728ccaed246cfcdf518" + - "3fe5dae528bbfb99d33194167e0f84d462d3d0da83e92227cf57922c7956" + - "4fe44648d87c69ad708e797972c44c4a5183fd5d1150a1182e3d39c3cd16" + - "3920f1d7ed83992bc4116d9351ae1c6c4827d1374242e374310409f32d5f" + - "0f38c78b6489c568b791c70394d29ea2516dcb10e51bdad862ce3339d5e6" + - "14fe14f150961809c36e0a2c8eb872e9f7a1c0956fbc9194cb63ff9993e5" + - "d0dcf62c0f49e81dbe99f3656c4dea57b766ae9a11254f9970618f1b33c8" + - "f339f440de240170f7a21f03ff2da42102b323ce2b9b7d0de5aae324d1ba" + - "c87b1e4c5279a566bf659778f8b03882aded57377a0f1b063af2897060e4" + - "23be7cefd4aa9a28479c16773944d254fc21d3e1acdf508b7972372b5991" + - "3b8b088e93471a7d54c6ae4c52ba465ef07f19f269677fc2f64d3fb3d7f1" + - "9069d6c7001d4b002ed6683c59bd5651a450503b68a4a00820b8c17e3263" + - "18f32c21dfbcb2a02a104edaeff67ec09533aaf3d1a7fb41aa5d506ccdbb" + - "e6e35fa0a263c0aad3acc91182addf8c5bdfbd0626702694b8d652a63c65" + - "8d6b2b7c75d015630de508195e1fca9573b61bc549ca017c4bd888194d44" + - "3e031f36170215a301f922736a819f3ffda69117170d1933300366c5f2ae" + - "1052446ef7c3b82c5868be158a881597132f51c91c80c24ebf621393dc45" + - "05fe057364a76ae67494a8a5f67acb551cfe89f447df272ed9c1509fc330" + - "2c3e16541452d4d68438f26858724012ad3b72c094b9f166c6bedb8336a3" + - "41e032988f39cf53535789b320b5424d07b6bf5f8792e3aceb0e868765b8" + - "611d7905089949e0c273e2410c72a146cd63981f420405bd883e5390e985" + - "8214a8db714e8400a21d0636d7e5d9671a3582ab9ff032170b8dd6b9d5a2" + - "144d065228fa54aea9a22654df67f3f62c5fc59d68914d8b219829b536cd" + - "2ae937ecccdb6031d94cb3", - }, - { - key: "84373472e362a356bd5c9b50f55c588d067b939009944f02564f136c62dac36b", - tag: "12dd5297cfcec53deae1dd5f9325d894", - in: "860d9b2954c3daf18fd67eb8bd9e6e3de2e4988ad9b04b1987219204dee2" + - "388db1c59a935de27bce29e7cd3ebdf038785efb35eabd4c3785a62b1d9c" + - "3ffa25e2273cfe5eb10b4ec6152cd8f21dea415421b452efc7cc4ea6bf1a" + - "b85fa6614e7f6d650125424865386ff8ab53247a63ff023b2d0753a9e5bd" + - "458d6ab0156fd3cf2d5002f902f927a847e8c4a8426b0a5191f5e237d590" + - "2659ce9be9024750d1d618a6b8dd57efb6c2bbac2930858f1132639391aa" + - "9e8a620a2a7d64bb7e943c77753401b5b619d95ef857df25a52b4eb97372" + - "a05416706b2644e2687bf1d42c0cf06e5eef8a1fc7e178440bfebb85c44a" + - "4837f69e43a1789728a999c5e04291576e757510f22bca11583a4e93688b" + - "442f2b2dab8d5ea9441ff09b8287862ca538ad979297cc75510a3d9ef36a" + - "662b4b7c373f184202befa5bf3f315642e6210763d033b7e2c59731cb356" + - "045e9470bf2f83cd62f11b3e904b0c0b1be99bcb805150ba7ef12b8df3ca" + - "bfc5055640687d710ab88e0fa8034b26112ebfd044a4b290b1c6f6d18c31" + - "ba9880b1cf2d81b5d02f00d6d351da5dbf47b6a5cb7b53eaf6de52c8a68d" + - "053602ccffa37ccb44a7683ab4f8a58c4bbc9e140e4e6f3cc10a5c07ebd6" + - "070818db983f9f415168606011efab6b8d7b4e61e8eadd8bfd8d028b89bf" + - "b0a16996252d7b4ee4f9ab50fc9d6e482ecf99beeabc38d70efbb9a0d4b7" + - "9a1c5d2835adf8e25111352eabd24d562644efc97637f695e4792f2049c6" + - "00f4d889ceb951cfe289adf159865d013046985d7fe2598014bf2dbbc528" + - "b4166fc2180e724ded8e7ea1c8d66338ec50d955d5594a0a7b4655338b70" + - "e8978485a722df814fdc6fd2436dbc060121fcb575672b2a5e454c1209bc" + - "2bb21a99d39dcb3c697306dbc2104d60fd8051c43ea2fce268987d0ec249" + - "a5c02f91d3b0dfee181b3cf8ef1ba9665daf7ea1f1d3b216e378943b78b6" + - "bb41e5dba095748bc776f8df6383033a1f5504955da3f42153b1c7ea83e2" + - "f90b990ea0c5bd3906b5c4060b19f447ec7762916b8766e5a23bc4d39cdf" + - "8e27752df8129b60ccee1731e47383b589d4fcad865eed4041a186df206e" + - "9fb69ab6ea092e36f186a6fea8d77bd7f3ab0fa0e29404d617317c75c832" + - "854427848237cfc18486c95f7213b9d53f324da036e8d298133b5003984a" + - "b9d71836f9f1b059db90005a9067c261bd85aaeed4d623df2220eb52b73d" + - "d683abcdee5cebd411996f853752f638bd28df6d78bec2ed3e00d7beea06" + - "2b81c19682ffb2f6abe3a3623a2e0570650c1384f1818d76fbefe3a7ef3f" + - "46138160ef897f9934e00e066e215230e719c23905dc60d7fa4d666fa52f" + - "e7737db15126d3262c3a4c385cdb23ff3b56c131e43b241f4a6062a1a248" + - "de9f13eb82c11f7b6a22c28904a1eb6513cdb11179067b13c7b5f83a58c1" + - "4f2753f19fdb356f124f52923249d6e4a2c8dadc8bb0fc91e360155a14c5" + - "c194334b9f0a566d51fad98592b59c1cc4b40eeddb34e64f337f83874884" + - "0583f853398c343dabc29b9444be1e316309fb8d81304d654b3d4bc4cff3" + - "55fc31278fe22e649324ef10acd247c0b72397edf96a1c16bbbef0640296" + - "4d219575fd23c36efc1fb8f8a34b510ba9bdfb3b478e236777ef7c6c47f5" + - "5a2bd0383d8eed3759456ffcffb15e61985b08c022658a5ffc875821bdf8" + - "83f69f096dcc72a96888c3af76db57a54be701759670bf05cc9015f5bf1a" + - "745cf755a25b1403a870875701427f820c4b29eccc260f30113629ba03e2" + - "785014bdcbf34d0c67aa6aca20d2dece811788686d5a45820d2980bf7d69" + - "d5c820a09bad7bd95166f63dcfbe8652565c285e60e2704955d69b3037d8" + - "7f5e6567d95b8891276d5cf7c59047d10a02ae4a28794405e2524ec2d595" + - "1b36ad1b9d5265fa098a033b88aa66cd9eaf01eea49c7dc4cc51c486f624" + - "507a2be23f152f43709b2cfecee44945ca506950e90e70164b77e12e1c13" + - "0b4d1021c2afa20038f190096276cd22e89b6e7dd10fd58fa033c9d42536" + - "98de3f4908203be8dbf259112f840c76726d982b4a837cae7139e27182b6" + - "1b4dfbcc50e42d5ab8532edfbd30f668879824e9ebc34b63ff1526cda81a" + - "e38352a774d79f73219500e57f0159a32326195d8895d965071834876a45" + - "c1a3c0bc4b1638535f7d40011cd5b23343fc27fa318c1aa3f9d8c43351c6" + - "6148dc2175e0e620813266da3000954dfa22048f305244629d512e852376" + - "6248a897a3ec3e2983aaa8a0f025f18feea57a5153a59b02604ebfcc7a9f" + - "b03e62443df88ead9dee955e23bcf6528c278a353f254c9484a67a7b263d" + - "a301923a4efb6866aeaaafd428e6da48781365bc49e90cd16b2388220d08" + - "bb9f79d14012b5a8299a651917b6a829488753b6ca449a14e8dd8c5fd5ef" + - "657d627b8e7773475b802655dc033694f24376e3b01e519d1aa8365d0e55" + - "92d0a4adbf555639b6d75d7ee59a7d12c6c11317b7927f11bbe75ed90508" + - "b0698420e231206704d22dd1f1740edbdcaf19a47d66ace4eecbcefb77b0" + - "85cfcfaced4d2d6048ce76434eb79990f0898adb4af2c377b581ebab3f3a" + - "150f40dcae002d4caa60050591c0de4ba83bfd59a08670beaa4641aa9829" + - "bdbb720d6eb8b2f3e864a98676a67271a82cffdca2b3590a0b5f97efa5d4" + - "ba062b4798707159782bedc75e5363d5f5d55ec2bef70db22955adf401fa" + - "c3b7af937816eb25d54d9f2a92e5a2a04bd8b8d7568204fd289f5ed2e033" + - "a76209d288e11e8a4dbb06b9029e90cb186446746853f02d738e06bba538" + - "894e03e2658ab3d7f9ac861d2cffdf12396004d1cd15f18812d3803ab9e0" + - "6f41c9b374d6a0678bb82ce06d9e3b9dbc8d2e90b8f64d0d040f3fa8a3fa" + - "8be71d2b3183cceae1bcbfa2353689d842f7d7052e5699dcc70ab2b58761" + - "7041e5aa1e2f41911d525505f061d3ca45152f5a7a1fab50c674e4597a52" + - "b46aafb4ba57413879cad1308321843abb7c39696fc2f2e225878bb1191e" + - "e151cc76f1a1b8d491c1672fecbf710db82dcd32554361967fc839c8e5d4" + - "e488856e1b9382eb3fc3bdc3b6886a3cd79761b02bafa080a745ef6afa26" + - "822f1d10d5e8eefb842837d82c9986e78fc3390caa142b7643de8f613e5a" + - "890a57f5883409549537f8139534f4ca1b60f33e42be25433f1d82add530" + - "6a4cfce258c0d4f1f3c9148ffb5c4b626d51f78ac20bff0393b7fdb4b9cd" + - "70fee7f69892c8a9ee089c6c5c7bee0a1b825e5b9517f2c82d6c149735fe" + - "45a8839812c2deb2a355b6230697053092eca450b7b0d3242b2689efe364" + - "09e820d91fa4932034d96495d9dd3baa4b385da815a7cb69438ff648b326" + - "e7efe8d688e88570ba59df7c439faf72c95317a10c984c5ec0043407e9fc" + - "9b46487810eac19d2bb40e0a654935f76e7d8861480c5f48419eb33084d4" + - "0e1070e5ad542c94f58b49e67dd05b6637a2c67d41451b7e00ba30eff221" + - "755d6d427ec634a2b95980d274a89579feccf1c7df3787a9435e588f2496" + - "06a93b7ac41c8aaa84b91c95cad9463d4881de7353d95b13bbde4c9da90b" + - "f1fe96257309a416407c64368b5564f022c4a493f2a39df1696f45801e42" + - "a5", - }, - { - key: "2d0035a30d19b9cbc7a27561f3ab474c01115c4499b4adec660ea06ebaa1a14c", - tag: "a2c77b55cb0c076d8ea83cfe0e64f293", - in: "4e667580ba4f38f64e5cb5566bffb486dcae10cd17acb3754251e837767f" + - "16429bba2b832f29ba538f97f3556548d163be25e69f88fff0743150623b" + - "e0a1d82af9384ca335927a0e9cacc3dadbdf1e24fa5c81f2602d109e1400" + - "33929e409b9a0fa4f2653944edcb8b3ef963ba7f8806196c73bff0ded670" + - "c6def5d240c5f3daa121f8d5bec9b2a0b0f1d62d54b013dc742d6bd46325" + - "460f692b76d4991f0796820ddebf150c7d33829795784dd2759b334d2706" + - "70a7264941be5d99d460d078a9eedc3660cb3176ad302f9365f0bd698e46" + - "9f3e63511abc81109995dba17be1abe8bcd28407c7fc8d02c14794bb033e" + - "178a94f6dc73719d5bc235f980a16eccb4121ca83b13c4e165931ae4f192" + - "4292f8cfdf1c3ed40feb71e13d919b48fa296dddb4d23114a3d86ec10f16" + - "f314de4cef813ed24b49f4c7bc44cb8424df1f70e8d77366161c7cdd709e" + - "97610aca3a24fb2202ffe15eaaa25d711cb5179212a2c6497a13e5d7c365" + - "7bc502b3d2ebde2e57b714dd9bc21e73795f3d35d620613918c4c9aa0e89" + - "031481c97a5a4c15ec6abe42d40498c33d71c823bf1d5bb5fee457e2fff0" + - "bf777c80c6e3336ab3ce793440e74b336a8f7034f6ea2e4ff5ea4ea7c350" + - "65cf2ccd2da1d6df29bde10f4cc0202b5e4cf7ed097da49b970a6db41e5e" + - "98f3845b42f46663b1d1ff01da71389a8737ba8f51eac1ef357ba5ac9a80" + - "dd2c7f9476111dcd651fc33f4c86dc8658656f3f02a8878bc38ff0d0a1af" + - "2e31fb92eaef08c50195490818661feaf90e8b6f5daa1ebedb2cdbc8d5dc" + - "16db3505f9611ac46bc37931e02c1fd6aad6e4b7e187d5e6f990fddc9563" + - "2b33f55bf68b0db3890b11113ecc839a4fa4de25160e574289aabe4d8fb7" + - "9cecf9d2fa75ac8d0195beefbdfe0815f8d7d9751c1280a29b547149ec7c" + - "2295f5afa53cfb516158086bf203357eec2a5db71143f996c81555a47f92" + - "209719a71570a5553f1ff9b4b41827dd74657b463f36623565f0c9f4d2ee" + - "8735d6af56ceb3b3d0ec516b22f0ddafbc24647481f61ab169e2616c91c0" + - "e1f6a35436598ed801670e1dba76226cbd0544959ebe70f836c8a7df575c" + - "b907d780ed5aa0d6e4e8e0d2f457efe89a777374aa49d4961db96dbb787f" + - "021d99231001360d532a70ee1fb94bd6f26524dd4b7556c6d40e08723d7f" + - "9905aca66c4743f2bf8b34493bdabcfca617809a867bfe0a4f94c756a6a3" + - "dcd04ffc0a3ac671a0afefe0d5d447efcec48c6368998760db6a572676d4" + - "29b6d3d6e0c815650447748c4b27541c5447acfb8f7261b6378f3fc0fdd7" + - "375eb9d458648c7fe9cd96344f11aca912cc5098e9ee39e0b6794cc1dc2d" + - "f1b10f927102705efa20e667b63a91f935c17764650b287f5289d5790766" + - "555f31985c5aad94c652ba41fa9c0195d15405f1fcce9e23054a42c8a252" + - "da83bf6268782ba44edec5d8f94a20b1830cd1c5894cc6b9b52ad0b12a5e" + - "cf3195a32a0b02483ae3b954ac6f3af1e0f334221279d03a72138f3a2cb2" + - "1e706427c4d604674dab88d429f28a67be7a996126e077a1dcf8989d90d0" + - "8b08f4abb9a546b3c64ecaa287bf3468c59add86365b885f52afe13ed8d2" + - "69ea61832a7ecbb96ff3336f58a1eeaa6dde3611f3ff7c2cc8c9b745b0e8" + - "b5919914245a49ac192cd77d10deb9a249623f696065a532c20eef9e9b0f" + - "e706579566a9eeb14d4e8251a7750e29eaa60f034c1a7a1d51aa03a45fff" + - "89acf41080deec5506128b06f003fa46bc4021a82fad6a8052a49744ed69" + - "45bd9331b5ae80d873cd042bff079b2b9d8af8065a22c449c32a56dbbe7a" + - "80d0f3e30b9167532506915883dce0aa9cb749e4368c595c5bd33b57e36d" + - "98cc9bf91cbfa47331d69b5cbe9c92bc66c0fc9ca8717bfc108e1f710333" + - "14dba02a28b9aa05890cb01ae9175806c3c4215bd446f6cc96ec5d08982b" + - "4f83cd1646160e1d306b3cdec02d251f0901b03e8c3c35464eaa5082586b" + - "b55482db97599d513ed8d7a82e32fae302684b7ede058474c1fac7893444" + - "16fec93fb982accd162dd956ba2f31a894e9366eca00e6e997fbbf9a2980" + - "8b83a139f6432147a717381bb8baa2205715f735c1e0db273cdda6897c9f" + - "39bf0d7eb7caf93f657ef4d3fecea28baf69cf36d3cf347081df3114455e" + - "b4fe3e49ad3c3f14435e0b39b6c0d16db0fbcfd7ba8da8760d5952c03667" + - "251e7a4c3008cfb0904225e55c23b884bb09d26631650460c4240bd5a165" + - "b531ee76ba5749b3bc60adad35de519321c1672b47bc35fb59f7792a3495" + - "11b2bb3504ba4a28717823a27a1f99ce6970290b26efcf1e7a0399b10eb1" + - "0c1299c09b80f4520d00e7908d004d5b6a72a411759cfa9523f6b2912234" + - "481b1d8fe4c2365961c0528bd593d42bebb398b5836ae6ca013fe440adbb" + - "0090e8ea274f4d8bcae483e3663051a328f7c12870b40e4973a9797a2336" + - "3d3c53e1b0d1a9159bfb26158f44734b3c34b571be641bba2db937d4ae1e" + - "edc807b95b1c2a7d44804885536316ad38aedf0d83b1519661f2bb5283cb" + - "9c50dd61c3753433e988189f26962d1f4befd444257d0b6d5b819d5fd572" + - "22c9fdff032e07a4d8686d451e71de4748965309c0a2d7c422ab7cf3d96a" + - "8c0a1b0afb229debd1c9421cb828b9f2be96bb9d6b5be7ef8134bd9ccf81" + - "51620937d720d83dbdddbfaba8ecd2eab6f1974090efde0ca963e9fdd691" + - "ed0cc5e074c5780779222552fa46ddcd951763a32aa3a044ff4a73cbab41" + - "dabb3c2c03fcda68303477f0dc26f35bdb5c9bde721fba1a2db732a89629" + - "a8de3cfebc3918df1a9d5053d09da5b7316e3285bf62156ca28cb64d343e" + - "72445fd66757bf4ab374fe7932a65f3d7fb6e42cb12e5b67ddf8530383a4" + - "6c1ee7ec8883e454a467df1aa7e468a6e7035515f473901efca5d46ff358" + - "70e0cc2575bbd7f8866c8e73cb157903a1694ff3051424f28de826984dcd" + - "065dc3658df144ae3a6d37b88c367e3cf7c58169dfdedda4a2821ce22188" + - "40472ff72f0dd1a6b0100555ff188b80f835259a634405e3dad61fc299f9" + - "307e27503b2cb7714bf3b636cc64b61d2e374119c8ef8adb21f1516c7fe2" + - "38c807818065bf312003c12e02525d69d9629a99e4ac66ad2e792f302cd2" + - "a6f5f702dd28040738a084a7052f2c3ed0924c33b7a5d357b7c9a29cebd8" + - "621a4bfb7bb34676ff210d59f7f9d4eafb7c5c490c9ea48402af5bb072c4" + - "731bdebcbed4e8e08a67931b6d7342d4ef7bc4a75ca1dfbd32ed6027d8fc" + - "b71e3f55565c02e06daa8c579b69774889181291c470576a99e11f2c5acf" + - "77e091ef65ed243d4287176f7f6ac7aba6908c9ff1fa43b894a499b642ad" + - "c01b2fa1c4b58801411941bb448f1f7a04794d2cfe5db1be61f7b86d6eca" + - "c547ee51d4c9050f9e9f318dae958c150acc21c878f0c7df6065294eb1d9" + - "a278c920838a0db752b080a32e67ac312fa76b589a385f31847196076ed8" + - "1021fcc375bfcc8e1361878e2693860eb21ff0595e4eaaf7897f2b79367f" + - "7c4f711279bf0c93a97dcb1cd8d87e444ad5f4cb5c1de44e37868c6743f1" + - "cd72cec376726f26c8bd4836f9a9f9c68042f95ca6f9d7cde493e531c553" + - "8bf7ace6dd768db69ac7b41ce93e8ca27ff20a83ff2148ec5b89e05d8b8f" + - "5d78d0fe16b96f6eb8d3b20126a186085c6825df81aa16b3dbf57eabc360" + - "71299ccdda60e250c652408d9cd1da94d73c728440ae08fddb901aec0fac" + - "1050a778b10f94f84883bee158bc53b1c001807c43a3151fbf581b18dda2" + - "527430872834e5c380575c54b7aa50f817cf3249fb943d46933cad32092e" + - "bfc575bd31cc744b7405580a5f2eabe27a02eec31e0d7306750adbbb9f08" + - "c78cb2d4c738b2274c7310cbf8dd0e59138b6a91b8253ae9512fe3d7367e" + - "a965ac44d54a7ed664e5e5c3c6c2d942eac388cd32beffb38f", - }, - { - key: "2f29d71d73f7af98f96b34e939e1a21e2789ec6271b878bbebd14d7942d30080", - tag: "ec02f4953a9a63ab6f2bfc3501e4fab8", - in: "0e0950987f3508239063e26a13727fefcdfd2cea6a903615c64bf12d9ed3" + - "887f9b2cf7ccaa196ccc7756b09471475b9daefd4261e69abd23b9faf9c5" + - "1fd5d5788bb39d3c068fa6807d30f6201d3f6dfd31715d08b1733440cde1" + - "049608d23c4e45c5ed61f863350232f85827e7c292dc5f1eced1cbc912e3" + - "f5c420bd945911d3881ede5153d3b2cc85371fff98d2caf97cad6ef59001" + - "4017f9690cab08989851c2647e77e81401714a93ed9f938b79f8f54e3133" + - "fc2cdef259df2ba0d48f37bf9e43792e3a777214cf4aab6dde6deeb543a8" + - "813b71b5974136c1220d6218a252881f0f5677ff5b6aba127f19a5f3c5aa" + - "c988543d7839a90a3f947c4e4d5c6ae1ab48dbd40456d1aa65339a4c15eb" + - "520e8ff9f965ac4c37735937cf09942e7958f8a6cddee41707423f715903" + - "ffe0d15af8c3140d3a736d23be7485fceb9f07c6509f2c506eda4ec9d30c" + - "cc133708f48d8828e332808c84a745d337296d871b9794de1c5d06534aaf" + - "65587526a84e2521f8b332645e0e72564bb308ecf99b7bc69608474389d1" + - "686ffab8c49b7f04dadc28d2ecdd0f508dad2135843304e378b3bc7a4f25" + - "7fa4316be956e0a021edb8045f39fa9f002087f067199bd6001acaadd261" + - "4bf6aefd3f098f92a959685f24bb2206c347359d9c6adc6847117bb434ac" + - "6c40ec618f6ae8b75a5e2e4d44c332b7b06c8b4d521493b9b0bde8894209" + - "717a24b320214297b62dec741cea018ea681c9b56702068528b3726953e8" + - "c5e4ccd5029e4183e772d9834a56a88d45bf87603dfda40e03f7e894766a" + - "7623ab4dcc0dfc3086d17566945069173935916f772e2a5f8e1547348f28" + - "782400fc069ac0e2b94242e9e0f1ba2d0e76898f9b986540e61ea64d7f69" + - "1006b86ce61565da75eb16a8b4c5865ca4eebdde2190e354734bda94fe7e" + - "12ff47dcb5d5e6ad93cfadcc491cb350b09ffe391a157e14b65e3a211b5d" + - "4e447c3ff95571dbab33a83126d68dfddf9383b4359d4103ca64af1e6963" + - "d09e17eb944aa71e76711dca33168586bfc44ebe9fdc55497d83f238c66d" + - "bcb16063bc85635f0f1a6280563bca49ef971db96a41b6ac5e0642643262" + - "61eb4662f3d6ad4cac826db895de22c9b8aa35e6464a7f44e1ae7238e355" + - "068d68754ffcca76c50b7ce7ef9bfebac9eeab32c87d059cc7ef2adb5d57" + - "c7419adb394eef48441952253e8391e555730e29789d6293c3696f441449" + - "0aebe2bbe541e191a6652ffbec1192f0f9395b7ea370aefc1f1cc8438035" + - "d7681f12f1e11d6e334da188b10c302fc0f4bcf1de448090510a8f1d5683" + - "0c943a3c388b33a038c26741a4cf3487313f755fe7a28e25e44b5383c5f4" + - "cd6ef34d7dd73462226281899dc3f2e69809a0150f694673f31addc89888" + - "072a7d4ecd63d6b90540f9522ec05829a7f17d48728345ad808fb0203883" + - "3cbd018d612992a88df944b8e34a70920b3f26cda2e8bb16c3aa38b12b33" + - "b395c9ba5e809f60ff05f087112151af1b5987403cff8bb2dce79093f431" + - "2c744f911a6f3091e4f9ef9375c4dce4c241d2f6024a1797321851ca316c" + - "4e460fc060e7839deaff8ab5e8bf682c0f21ab6952eb793cffe690db911f" + - "50b11f56ea352942c43bfff51d4360882754faeb7cf28b6b32bf7fc9ca71" + - "fbfe1d72be05b8bac9ba513d731e2c9d13d6f2f10eb926edaaf0e3996656" + - "da8718a8e103c59326529e91ebac6ed52657c9690ccbf81028cd9fb189ec" + - "4de94fc0771e53302c8d9082835a68780cccd772660a110a1b40c57bef3a" + - "c1d69428aea549ed17663a96895a66a3bb5ff6ff61dc64908df49b760caf" + - "a5aff05e2766a418dbaa1e7d189a9edd55a04fee8c9d6e506d299abc36a9" + - "d67be035fea5d220f41d081af67615fe627c4dd04bd8659c7fa4f57f35d0" + - "db40d9684aa178d7483ed5d86f04eaea412e0ea05a4698377dbff4fc3a39" + - "1f6ce0cb833d3118d6c69319b511cce65fdc74928e270da0c537f8201eff" + - "77416155d4a39c7ad38c22cdbf7d2b7ff7d85383c178a835ec604c3f9ee3" + - "7399f7dd826e34f1a35ab75da44ba56f86097ddc0f3658ef5bd65a24f4de" + - "4255d0b03411a9d7f0ddc29e33cb865da23393471aa94e6c9e72e789206d" + - "3ba118aecd39727068f528f01b25fae2280d70033e4ee46b41b864bb922e" + - "001d8bf46d6fbaa5a594e926f45eb3a4d2f074506d7834b606f43c89699a" + - "6db00b374658d9333700894d440a712a1f25f5538f9e7c8ee57ae7e612df" + - "13292c8ba9dbede4fb77cc6c8944aaef59ea6ad3b36db398f4bb0f82d40b" + - "44879835f224d6e05992b1b8a68dd58c3dbda2fd73786492ee48c7a25f87" + - "264b766930fe9427487504fad17f8d230934f044e49ba219f26ead728856" + - "cb30eecc33a3946d3b1b781061f2458c7c46f6d96f3e06f369f97be91835" + - "f23b38347d1e381ad5be4419275772c2abd549522a0203c1ee9c96faefe1" + - "df413c4b7b2624417890e0716854b7092b3b3b368cb674035d3e6bab2357" + - "e7c262b606f7141b6dad2f6145ebc1deb7597814719784f3c17848a90ffb" + - "cb0289e2f3cc7da12442b837c4e47f468bca3eb4e944a31c48562c2f144e" + - "9e920ab5e4cf90a14ccadbae29af13db38cda911e3c8f6f525e6722809b5" + - "31a4de1926ab12f643d25af87eb8610df59eded6ec278242247dc69a4213" + - "13f7c2b26ae7a917c1bdaf66c56876e9104d40b59e6ca1431ddb77fc89f3" + - "14b46a154cf127688564a4f9e120d7b5816cd24a6e095dc8ab8b43bc3639" + - "329719f0e0f723e2f5136d82638e2249e648ebca67cf0306741e9e8d45cb" + - "903bca85485c4007397c88a1ce07266f4f611b96b7e0ace3074247a7dfb1" + - "cdbbdd66e25e172fd2bda74abde7f3b4cb5cc7ee7859f053b2f04f9de03b" + - "a8e96264117f502087c3ddbee8d850bf3618b4de90f7b3e562dfa57e4426" + - "5357236e35e71d1669226d63bca50b1b944ac07a1f794e73e80985689b25" + - "f18fc709367d63b8639d71865cee667536040be827145c08cf3e57a66678" + - "4c81115706a146eccadc7aa1a9f074b47e95bcba7db8108a13279077bef2" + - "64699fb87e5abf5b05ff3879d7c7c5169c7cae817c13f0859d4e9c05db0f" + - "74c045ecc30a51e515feea627da387ff780719395b5b9ad93179b16fad10" + - "5856049169dcebd43a7f39c549762405f807378e854b1654a1179d895ef0" + - "85aafc72c7fe1e0e1cd3abf8e20935e331145bbcece4f17ad24ebb6c64ea" + - "73bd98a7494c134859206c9422f7c4a057db0ae0770c4bcb08c1a6b9ca4b" + - "7dd8c1cdb3e4977c7ce6c1e79b9d6ad98e27d2759b53cee73ec037a8b686" + - "f1ff78eb8421f41c74ce9c62a90d38b75159ec925f232e0db71362f31e29" + - "4336f5580a34b26c5a01ee3454cba227c7f400f6889a319d7121dcea27b9" + - "584f33ac796d48a9a24cc5b6799ee12f10725fbc10d7cf83e4b87d9c444b" + - "f43e2f5ee49d8f3b531ebb58fed4234cb8bcab1b8b18bf50956506baae8b" + - "c1b7492250f3adf64294310387f1d4bcac12652895d4f2dce26f380733ce" + - "0b5820e9fcd8512a1585a49940a32fc8875ac3c9542a4270602e5e97e720" + - "90ed71b51badb775340429fdbe45b887fb9ee61cf9e091c06092cf0a2129" + - "b26572574c46910cb458bca7c63eddd29d89753d57e568323e380065794d" + - "3fa1ffb874543f5b0ddc702b087e91e22604d9600d37fa0dd90d7acb2458" + - "4cd408a4e66bb781dde5f39efda6a8fc26be0d08ffdf851e422ab1500c28" + - "bf6b4c85bdfa94e8aef5cda22870c39ad49c3c6acdbb3b0d58cd05424c65" + - "20740b5c2bce4336545eda12716317df58e6fb764fcb3004f5248c5ccd84" + - "f63abdc0dd2a64e447c0de4da4a1082a729d8ebe14810d396933085cde18" + - "318278481fdb9a748b637cacb491f5234bfe16b53a35da6677336baeedb7" + - "4a28c19a412e7812dace251446d40ec07afd63854c3dffbd5c0f6a9a3cac" + - "ee3bab07fba94800fd1fa0fe44f5f2ecb2b4a188cd02b8a2df0728347c50" + - "7d0cc58fcd5d54dffdbda11dd1bcc59758396ed8db77498fbe13238d3d8a" + - "0040194dfe66811542ddaa658094a9580d4e4b4e29", - }, - { - key: "1285f117bd90b70ef078ae62f37d2218419e894b7d334759ddb2d88833b287b5", - tag: "429b2b39195a10357043c9601590a277", - in: "00ef065a1adb4ce7108b497813ccc748933fa8442689a7cb8dc7c1ffdbf6" + - "c09adfe05ca2cc5ec3acb7493f3497ee8f9cd9bb8a4b332c18e33f78114a" + - "c8f9a72ddb9f13494e934ad711818909831013ba195b53f5e9e5b4689399" + - "6d0b669f3860958a32b85a21009d47fddbc8697b7c9b92dc75d5060eb4fb" + - "40aed7a1dbe69dbbeb6296f5467ea2426cd17d323671fa408855bc53e5c2" + - "d111203ae38cecac7719c0bd7f21f6bd6a1588187b3b513983627b80ac0b" + - "300b7fa038af1cc8512403ac2cea6e406595202ec3e74014d94cf8780ed0" + - "33c570e887ca7fb35ee4768202aa52427d02c24e63f7f2cede95ca9909e9" + - "dfa86246a27db757750667c198c9aff4ce348f7ac51864b36ef5695df713" + - "d17b8f561a972d0136bd9ee9aa16079c2ab5d29ac9ab472255ade05dc49c" + - "b966e0c1c04258ef9ec59ded01f402d9fdcd9a2020a2038a8c78892ca218" + - "30136069485527069132959dab2b81c73ca590fde2a7ecff761d95a54d63" + - "a2664aa5a6deec163e46b5225bc98976a4f363063b0f42e29f792d138af8" + - "eae68d3854b5c1985d5cd1c9f49f529b0b4d2c936887b5b92cdebacef992" + - "c35e0b7bbd52114aff8c6b261852e28e451b02099814f809b0289cba0586" + - "04a363e3f969aad3d982f645ec4c549f943fb360fb8fa0d5a597bf89842f" + - "8ced6014a5b2590ef71524a7ad50fe0ef0e2f81b6e26b99f9ebbc8036549" + - "f7eacbf6ab884710c6406ff59788e03ede35c30d4781ad5af171e0623e8f" + - "cf5344d71165f0475e256e9159040f702b359a2963116ed135dd6c1d111d" + - "2a1e33e15c178ca4f02c5fb15593c50cf9a8a492f01e04778dbb81d26c99" + - "0c58cf50a9bcf4fe38fbfc0fc0685d8bd422a773c7bce649f7a86c59118e" + - "f5f857b2c72508cd1ef05e1a0c0b7ab4687fdd57437092eb49bf41a9ae8b" + - "bd98272ea2f8ee2515ff267fa6ae892c266a7effe61ed54984924aefc461" + - "6cf483dec024ad666bc797beaa429a742d1b8806f67d451b6d3a85b4d474" + - "003cfe9e9dd906df47da5559c41f15afabecc3e6af279cca0f2a200eb2e8" + - "31437e034d457fc880f60f5ae635690bce82bf6d1ad6b4f5344ec042bf25" + - "7d010273c861e3ac516e9ee2bab3a255f570baa32298467bf704bf6d9076" + - "a4c0b08a528a05cd1fcbdf51f3885fbaba7891a144fc058919903b269b4a" + - "29f43926eda32c38853b814a7d528156c223748d674d8f7f5448350f011b" + - "bfab1511001b8014e20fee37ccd4a0456f638c197c86dc116b34f955c0b7" + - "dee10bac5ea0c2fec8a780ac05098b51b902ca6afff4db3c6fb4f761df79" + - "b2039dc5f16d9402442a6fcf6c4297769e6c36824d908beba8e584ea0b3a" + - "91b9017baeefac651d0307bd89f517789236c0693c65a5a20f244d39684c" + - "eb810cd2ffd3c78fe9285d2eb9f55d133b86113efb8dffcbc6d258e84c38" + - "2dd8f4d7d63b65672516d9bfcc3310a79ce244b60d380128d529487f99b7" + - "d532d5f5c28fad8b9a071fd2fab8fd98f6d7ed9dadbd2fc4396476eba6e2" + - "1a1b1cc594a31fbd3418d98e4aa736cab285a2786fbbd4650e49f9b080ed" + - "3fda34941c28d25545395e1408fc3e60730d0696061f821a4d24123cadf2" + - "3af3d37ba7ce1ba3cde1368d468f136df82c02f9be9210022192aa02117a" + - "ef5ff70bcfeffd47bc37b920826a4d3db001f956939abc0df520f3ec1613" + - "ba1c4b3385cad97e42bfd15a3150711fe86ba4562f17780cee1cdf198615" + - "ca06270db84986f33e1d53d552b0da82397c496a23c7a78ca7641a908e71" + - "89249cc657c0431f1e09ae0213f28a27e6267e9d17b5bba0ea4f3c21f266" + - "fe538e215ec62f85517ae6bd87799ac5ce68453f09cbbc50d6e2a168f0cf" + - "7166ad50cb65b6c76406c326573c00e04a3186251c6181933828c58f4198" + - "f8208c4484805639b0d428fd05b57e4356239638f458a84000c7a7a8de62" + - "ec25b54d1e39d2579ec9c512fec475f243576f35efc02a1cd6b0478e2dc8" + - "be5f17aa4e3849cd42e76fbffe6e7d6f912d6edf80f718f94a7e48e1fc10" + - "6cac29627d9d4b82f05a30cd7c739f7f3ef7ea368d22612f189da450e274" + - "de7b61c6361521e684d639be5af4cb11fefa5fce6f8a5065c90873e504c1" + - "2c940571ea7bd7e9221129b83039d2edb069e8b5bb68567d8fcae34c6ee0" + - "cb94474d8b056cc3c7403873f2fe6db3b567a44e702e4f4813b2a264231b" + - "0a998207b41916715ef94e5eec281589d0a711f8e74be32bc60f43d693de" + - "77f21d5f7eef892abe87725f3d2b01d9ddb6dee15f40735a8fb67766dbcd" + - "020a93b8eef4361dc3a891d521551f65dbe6e3f68c60819b0a540b0991c6" + - "4449d207cf5b1c198c17ad6caf3adc628d09fa0baae7a696d84e1879577c" + - "ffe9b3f62669d4ea5ebab6364f08c66d170ee4a94d61fb77d60b33dd6b60" + - "650f034c5c9879243d5c16f853dd7a89885a9047a341b076912d47872b3b" + - "3de49edf7451b435698ac4e182d16c339be83e18531a34aebad36c5c7c93" + - "aaf121cf99ff92d3844d40740fe001eeca9ee71300d826bc3cfc87a29d39" + - "ea108a3cf259657ec4b967fbb534e7513ef3a96bffb35abc5ce0e890696e" + - "54fab515af3d2c0be6e003747504e486c0ec6e30fa4ca79d6596ae0425f3" + - "396e40fd37432e52c74f812250dad603b3502f97ada48a26e39fd4d44584" + - "6591bfa5ffb3770d95d3dbd49e9c3a38c6305796b8f7d79bd0845170925d" + - "575774445299bdf9d3f8ad3dc2dc5cfd3ef0293b84d6e11370851af05ebf" + - "b3510a22edd930797dcb76b759a9b5a77ed8dd5130e79ff5ac44b01901bb" + - "79603cecf674202bc5d84076ff41b3c806454ce80cb9e5fa9db77294d20e" + - "6d3008ae3017aba712862ecd4b32daafef1b8cc8b19ee8f8bc3835e2372b" + - "5cec66222ad5ea9df753c033508ec43c8b5995e88c36c13ea3465c8bc462" + - "ae0a659d9767db34499e9d01fb1588410257d6f588b3fdb766a66bce28b5" + - "e0880f8cf988a2e5eb5bf80cd7d83192b7392fbb2e3a07d51aea2b6bfac0" + - "d74d304f56d5af3598a0712cb09c04c5dc14194eca8e1b9b29f88344c0ea" + - "55638c0f8ebb70b6242b797fe2525fa1bde76293dbc0a66ab4715e6f9b11" + - "f7ecd8f35a20ee4ff3552caf01bb307e257ec0576023d624d6094d43d25a" + - "aadfce939a6808f8baacb2109c3de50a1cfada9e384cdba3e97d2c9025a3" + - "2377bb195fce68c5569d2d1267e1bc68fcd925ddb4acf567fb29ea80517a" + - "7e4056fb014cdee597333ac2408157ff60cfa1afdc363a11fd4883308cab" + - "d9a8fe56c2b41c95eaef854f20bf5941ed23156d86de3bd413465a3bc74d" + - "5acffcd15722879849c261c1bbe987f89a1f00b3069453841b7da667d566" + - "e41fd894d94de44c23fed08d9bdffb723aa8449bf236261240d865efd7b1" + - "74a4460e5004ff77f4196d1d421227dff7c78f1726df7b5eebddb4bb5f57" + - "5ade25296dda2e71ab87ea2b44ef2ce8742a7ad5c1e7a40e097eb336561e" + - "865515f7ee0efbe01d5a928f208f7c9f2f58974d1c11af0e737c673dc446" + - "1795da9757010cefc6e7f2784658717938735ed8cbcbd7981a1bb8f31cab" + - "b901c87a3218dd1195c59f64d0bc3ce8b72580fe38e6dbf1181e0090e5c6" + - "d162df9f31cc52fa6a8ac61897e9b4b3cb0ca2bfb38a38d9b78e46d775d5" + - "7645d2d6da16bda8edd8675e2ba121f7f85400cf7cacb9ffcdfae583fb93" + - "753d07985a00afc3a4e26c9939a5116d9b61196502f5d774ab4c7fb6cfa6" + - "01bcfddcfabfcd28055e858d7d3c19feb6bd7c02565add3a3af61bfba8b6" + - "f4b52c072a8613e878368318383143059a98a85ba521f781a8983c2486ba" + - "b83f5b91fce02acee0be8d0dda7489975f0506c8f363b5adc48ba971adeb" + - "4e1c830b5f264ed42da36d2b5ce2fdab1e63333b1061ec5a44ec1b6e99da" + - "0f25e7f7250e788fe3f1b8e64467d3d709aeb7360720f854afe38e190cc0" + - "925c6cbd77fbfccc07d8beeb0ce68e47442fadaf13b53c30a03ce317cf79" + - "dc9155ddf96814583695f15c970fd0b6cea0b04b1825eb26e65ea9351bf2" + - "f7a841ddaa8c9f8e885b7c30b9985bac23d3ce777b", - }, - { - key: "491ebd0dddefc9f0117176772f9bab61b92a1f1de13796176091c56d1e53dfbe", - tag: "fbd3f884a3dc2a8be06ce03883282e1e", - in: "953b9a40789b206fb507ec2c5e9c88ca1baf25ad24c11a62f664db1da8bf" + - "dbe9b54f8e93b0bfb4adb12f8873096b8960fd91eb92a8ddb53232ac9141" + - "57caced33424cff943a8db129049af7e7b733afbec6637d8ee4f39d063e2" + - "be241cca6a339e48d72372efabceac57220692c40856532d95529adfae87" + - "a71c72f30244126d01a875375ad8836ef8db929bc81027935042a05c346f" + - "bc94dcc057db015e55c56064d2b11154596b813ee64b73bcac05d2688bf6" + - "f1fbb0cf3f8307b3df44c3e2dd1d226a4d0e9dc5f7482bada9611970f887" + - "f656dcb19ce1f8c5c86f4cbd1e4f49b18f170ecfd184028e769e79d7424f" + - "d01cb315897c21111f53f4d41c3b71402eea695272cb5b4e5f33abb9df50" + - "cbdaa55ed629d3ed7d93b43e550295502db1f2ed884afc320518e88be4c6" + - "b62a13f8d3636ba091d07dbc6c20c7e7fda016c05b2fadcfc9ea32f4ee2c" + - "4893de78ad8a1771aacf6efdbd8fb1f6ee9b0572ced3edc6313185b5d398" + - "88ce77950aa4c5201a256e3ae3e74f05b70faada14124b35b105a70e7769" + - "7184576b69708eaabd36e0ba885fc6bafd5738a67307a1181792333cddfd" + - "a4ef19c88497c82fccff05a8f9f732fc7505f0467a14e135288ee018aef3" + - "d0412f6b0760573d8ee4ab455d2789b4d22a42eebdf60616fe403627cfca" + - "fea672bd0a49e8e7b80e7b7b8feebce3381f2fc16819a8996a99ea230c3a" + - "84b510cf2e0d914610d646a2f45a14268ec1d6fca03d0aea5c9ae1c8d519" + - "b0e8b0f6fb8ad176b5d6aa620b253cc492b5e5645353fbd9b6c02bea48f0" + - "286e2c669782b5ffefa4d8f3f1037151026d9cca78e7808dfbe61df29e82" + - "951d7154f3c97606cd1e99300012578ea6a776dcef0811338b56606b51a6" + - "9893fe68f762af6c9c26066b1d503e64877d8cd988b443af66a36af8bdfa" + - "41b4dfb3721d1d81895884755b9c52527030afdfaecd66d4638fab1d1786" + - "3d5517ef7ee7d081b5555d24991810f1edde30930fd392f817cfe632b4ca" + - "6fb0460c36bde4a5620b9c369bf51c7d870c43998b8171a553d2f643fe8a" + - "58aabfce8cf7363ea978ff4d53f58284db822ca95b80306ec02a64d26a29" + - "c98520f1924c70d161682c54d08a2c48f54bb72980a8cf5babd0aaf0fd72" + - "7d5b1b9d9b731dc49bad228fe83f7347750e277a4fbd526983c206e075d6" + - "a03d68957b3e925a71bc1ea7304c77660d112a5d19fd21a785d4a8d7f2eb" + - "dc4183376d8125341eb28b2df5be0b4e04bbf95c47d2fe2aed939619cb97" + - "79548b752f57b723cf8295dfce69c9b7486b75a4e900f91926636f3fc78f" + - "7b7720a5151abdf5868fecf1e1a1d830cd6a4c5e3cd739da4432cf1fe2af" + - "a1090d6a1eeb32e7236ecfddb9d07b97220ab8e23edcc93d91abc11b0c30" + - "460d2027869d1c2487070cf60b85ad0b8bc5df566f6fdb0e58fd044da530" + - "6d277e564ca6cbfa820ca73fb6201b240a5a94c4ecd11d466cdc44046a66" + - "32478221bfa69b3a2cebd16baa302a573c90895d7f4cab453b11e3a4d8bb" + - "b5a9bf264781ce5b9796e3c47d0fa57f46b923889af4d073270a360dae8d" + - "51d85ea916f14787c6500d2d906ccaaa92d20d93edd09139f79bfeb5fcd9" + - "8c1cdbcbe9f2587e9c9094e3c4a32ab9ba56f400b929e80c0551f953896b" + - "e8eda6ecf22e6d4a541957dec21d6a9cf388ff0ba58169ab934902892a58" + - "86e1126b16118e965a271495ffa339c49466209ed3875b568a4290b7b949" + - "69d0465744a3c2a75c599c3a04ab1a3fd09125fe8f45724b2f48c7822b9f" + - "ef95af4b758ae66a8b6646df7a0a1aabe2a24c052fd6d30561cae0389263" + - "e3388c4c1effe431a04356c334aac64f36593544885c4b7295b57dc39638" + - "b665b22dcbf7dd6da867615de38c6a575cc66391135d47f8e1f0c73c6129" + - "17ada4099723933a758d83311b384364263cad5fe14bdd7c825d9601c400" + - "3537a5aca7f9da4710c132ce8b0f1464cee625633ef57f507739a0ab1cd2" + - "21ae634d4d0b3ff07e9ecb1baaef0a82a97279d46543a0464855cd62c07d" + - "5e890265612906a9eac88bec07b1dea5f67054c31ae40f8c673296cc5df7" + - "f0dd8cc9e643b44fd90dc2d1e870ad8acdbe165237642fd04c00965837cf" + - "bd2344ae830887a5719a3c16dc8ec08bd9131d055bfb959b64ff4cb638a1" + - "002a4fe02e369871cc4e3ffda17dd85343e679fab43e11970e60198b424b" + - "676ab17fb0dee10cc9c2e92b32b68d5b05b7a559176f822850c0557ed98b" + - "7454916e32af549a0027db95f02b88cfc5e7e05f28f53757dd97cc0f0594" + - "212f8801e58043cb17b040413c226dfce2104a172d218caa4353890de17d" + - "be1f53af6ceda24b8781801516cc51de9ca459e469b3c322be13d8c9541f" + - "755c518ca41a0ed42e44b9f87faa2a968b0292216e9f3d3e8987282103e5" + - "016fe9f7681496e1e8d663eb2d8bc30b41d735465527f19e336a98d2dc54" + - "d7c020bfab30fe6c62cbae7d09f84af69bc2c51a1839ffba15015d381ba0" + - "a44a3758771c4f18d13827f518f30bb74f4bff29a87d4b9e949f1063f63f" + - "662721cfd64ffe1dab3761852387f78fa83fb48ae2c75fc567475b673da6" + - "fa8f53770b6e5a3c9fad951ec099c6bc1e72d1c489e1ae620e7f12ddc29f" + - "ed65f29c65cef75014b999d739e2e6e015f928a30f2fee3f2e59bf65b54d" + - "89948bf2bfde98b076e5460643952befd02fc1b0f472a8b75195c53ea296" + - "6403b9028db529cd04b97231bac3068855fa211f4d976a88bc27a0088f04" + - "576e2487ac0467992066ef7667ca8429faee92db38003728e5c219c751f6" + - "6f011b5d679fdd957f4575a0cfb6b54693a9624f2c7e66c578f5f0367005" + - "c66addd1e3ab7ea1ac404e357cbdab9438b9b4f80b3a6761b864b006f1df" + - "689ae4c0434b06b686d5353d3e421b57381ea24fdcf6199195ccdb3d5cf4" + - "623a6bb1f9eba9b22fa15395f65f8093b5f90455061c1cbf8128b44a31e3" + - "910862a59e187aa7f4d22e0317ae6c177cef24eebc44171f70c25efac73b" + - "38ada0cba0b74f72d1c171277a734819c1111ebe46d5db20a6ff20e2c1a9" + - "a57edae95a3c1f80ddf2b12c86d3df0078a7bf68695b16ccf92053c727a4" + - "80586b8d87d0d1772e456fde0c20a7927f351a641bff5f22f9ee2217b6a2" + - "d0983c8102d7d5356dea60a19e105ce366b9d000987c8c33396569f97c56" + - "2d0fc0bc5859779aa10efd1f8df0909c307a9110083cc6d9748456c9bddf" + - "16dccee52b7974867cec718bb0b76b3353379a621257094277a30148ac38" + - "e5cf67ed7cc9c1bae12dbdeb99d7d880ce98e17f0dc93c5330d1824a3c9e" + - "ffd86f89e15b59a4bee5a48d4f674766896e187abaa39917b83f8d2f3265" + - "bbe7aac44c9f8d92f775fe6493e85ab44e6e28f79f28eff156c21e1abdae" + - "d10a291b88c4020b1ae8be001080870847a852d073e82bfc751028ac62d5" + - "6aeac1b18f2cff1c0c7d336bf08f8cd5099d9d3b28f9e16077e9caabab49" + - "f2d234616a7522a6bde1a3b3c608df4cc74a6c633d4c8068138abda8d26b" + - "4ca70f95d152888fb32bdee5dfad8ff4a5b002a0a327c873656db8d6fdd8" + - "ed882e47ce8e47c729e1292db9122ce2e9fa275f9bb986eb7e0a1dccb7cf" + - "abd0449c92fd35e2aedc4aa89caf53bcd28170cae85e93f93988e723a896" + - "10cefb4edb6fa545835fba3107e21dceb272c5a32da26fa77df070f41d7c" + - "ad1d68b836199ff0f1221e36b9b976b5e69bed54b5bfec67fe9cbb383484" + - "696265204797634594bc335150daea92dbc1004f613b4c27bf5c699debf9" + - "4365041b5a894701da68a93bcb61f4e546c553fe61f14ab0322b45915da6" + - "ecacaa093b0071f2516ca8c3fef2f1e3c403993d734403c47bfe5f4379e9" + - "cb5b613fde3c0d880cecef4101aad8b8b1c60a92ac5185f6c243fdf1711b" + - "0b56f0fd8e5ed6cc0f99da888e4f156455a0f0eb365b8964347eedd15d80" + - "2f297977af667ed1376dfcc610f5152421b97afaaf16f9db57a435328595" + - "b9aa00b5ed9ff106c66970fafef379f4d2f98f2c5984ea05aad64651fbf7" + - "7968c8cbc4e959859b85302a88a3c2faed37765f3f6ced59d8feb6c72e71" + - "f9d4497d98bccf95fcb650f29131e1df1bf06a5443f8af844aa1a7b5a68e" + - "bb250c7de3a65ae9b1086cf83f832050e55030d0f67c6a54ea2a1dbe18e2" + - "8a96c9e0dea2966997bfc5c5afd4244e3c8477c4f5e8bee8fc8ca9a5cde4" + - "d9c5a2c7f3d2e811b1de7ce4279229319e432674c609b4c8b70dc6172e9e" + - "653fe1969bbc2cb3685e64fd81d96d33", - }, - { - key: "b41db44465a0f0d70093f0303bbd7776017bca8461c92116595ae89f1da1e95f", - tag: "d8a111a09db22b841fa28367ce35438b", - in: "b074b0984fb83749586881e8ec2c5ce9e086cfb2aad17b42b2429d4cf43a" + - "0400fd15352d182e6c51e9338da892f886f460d40bd178d81c52e9ab9c1c" + - "bdd812594e6fe7a9bb7fb729c11328d3288604097600a0c151fa3d9e4268" + - "de75866558e9f47d8dd331994bf69f826fd4a6cb475ae5e18365f59a477a" + - "dde7fbcf7e40b4e3dee020a115830b86f0faae561751e9b596c07491c42d" + - "e02fc979e69071113953729d7b99f1867116d058a90f1b8c0f9ba12c6322" + - "4ebd1b563a87734f5d6e2d4e6715d5f0213e33316500cc4b23784f78a9bf" + - "13fdf99bfe149cf47aeaaeb9df1cee140c3c1264fe89bcde8acda6bde16c" + - "e3d770ba51950b67ad2c5232ae0cff048ddfda8540cf18e673582dc96987" + - "4b127f655e7d4e08859f2c6b95403cd5b4e2c21f72bb872e49e592306286" + - "48ba1b16fc9637709636b198f9a297aec364d4c3bc869dcad32b1830e434" + - "b556b429136f0012a0a0b6fb3797bc8668014b010ea51674ef8865348dcc" + - "197672047fcf72e6b6910a0e32a4f110d85e28db0e338d9cfdec715a8800" + - "b4f007a7951d09e41620815848c89f8768344c50bd522c46f64ac6c98e53" + - "92176651961c7a70b62f3d1819bfda674e2ecd3167415edc4b97419e8ae4" + - "9974b56cd8d52e1d05b82610b59606a750b34844ca33bfc9b21fb970738d" + - "b66f48928df79cf67730a30b0b612f8c15c22892120548ab460a6b9bb3ac" + - "e30554c86c9681c797821a1b1ce91d0e87fe90ad4097c974cfbdfd5c4c24" + - "a5f808f388e1b1473e858f48a387614501c8c39d6973ded69b1764663cd5" + - "166be02b596a49e392d637e3d8afc91323f7450318b79d5488c040e346cf" + - "0cee512044514b570aa66bb98d639a9ee23a7cebe28474592623d082873b" + - "73efb3eaa4721fc4761e15a390497cb13cce181107e8b1a0186b9e47a5a4" + - "b67a5be3cd88a43d341ef63f10af6970aaf56035db938655020809033a92" + - "8d4fe6d2f5424fbde2fe82adfd991d388edf293cb4e3eb68d876f225a5f1" + - "58208bcb1aaefcbc28d6763d267406aa8d6ecb413d18cff7a318ba031ba6" + - "0ac4560748c248de64eec56dd4540124b38581604f502d94a2004f9eb1d6" + - "edb009e16af6c6d3ccbea79b10743da98aee7ace407a90c6cfdde694f36b" + - "e0271e722618a457be68619b980754795f4ac95ebf4f1820b85ca8e3fbff" + - "a2430f8e01ab422d7140751f7741f2c921400dac404b04e049736738a87b" + - "6f49bd54b1b447b922c473831a65f224ab84fc96e4551a0333bc6187e15c" + - "c0f0ad628068bcd7c043bd1e3036ec01e7fdc3d157476149917baafaced0" + - "15d09fafb92181a0ec65b00c9c13631e65de184377416e04d3d93b847e0e" + - "286c1d88245d4d550d30d4fbfcb416ff26a39a94275631c2deafc7cb6780" + - "f149e4d0e9c4515b708fcd62be5252485407a6ceeb9247de34e0266ef384" + - "976f6d31284c97468b3b03e951d87a5a00836ea303a266147a79ff3431b4" + - "b382e86c74d92661e0f65e266b7d569c03994b667a8137f3080eda2ff542" + - "0f0b52b427558dc26932a22a615c9e6b1834a251c6b68fdfc0bbe0e8781e" + - "36adf669f2d78bd23509ef7e086634e526258e8d11a1e0be0a678ac09c7b" + - "b4e3c5758504011e701dc85997fe2a3e40c7af83f032bdbe7adc10ef1e4a" + - "666946c2bf31dd8e3a383211c9684d5302f89dafcf77976d5a02c14e2462" + - "09d2d99918e82402cb0eacaa12032ad8316315af1b3d3bd5058f7c935d35" + - "ef0d4e71373958fd5e4140a9a586d89c53e4144c00148a4706a524896eb0" + - "5b1479a0de5d3f57be46b3f5fa4e49bffe027c81a33e37abc01a4cafe08b" + - "8e21fa86b42be52d75d6407e6cdf399de7aedb9b61a6917b2677b211c979" + - "33536664c637a57ce2234e3319fe8b4a77d7285ae6347464dfd0aab3e6f1" + - "178e0029686770d3b0dd541490b097f001e95f27efe8eb16e4747937d643" + - "cdefd49e586ecad541270cedc3064bdb7c79f086bf1fa8c666304d977a15" + - "54ae268881e17d8bc3fe51fa9969f7e560e3d3e050424febec0998b35f2a" + - "7378b2c3e384cbfc80c4987734d76c78224cb81cc5376f88f0ceda28aa50" + - "44e956537c3ee209071d84a66173384e0aa466d989759fb1f2f17fe627a0" + - "ffeaae7c5a3884b237f5151278a07117c2e833f1815c7e0e0b1611f25058" + - "ca338d21deb1a571faf1d0486667cb7c58e2814c3722d24fb77ce1b7e018" + - "2ae5746442b5ad00208b17c0a68bab4df8a8f36edead4fbe79b4c9220dd6" + - "acea6d23c7caaf6ce7cabeeca677a1c764d610ea6c7e994d6a9c88f57fda" + - "ef160b251e7595578ea2cc1441d480c14b8b6945e76a001891b1f214979b" + - "c52ec15e9480d706a40cb6e3b259ee99a9e84e63a738f1b52cf71c8ecb04" + - "fc833c2c680bfed587aa1541e5ffe8bbd7b21302bbf745011e559f94f952" + - "8b7fad8a37f6d855306a5be22725859cc950bcc334179d49564af3b9c78c" + - "e1de59a9cb45086a33856ba7195c17cef573950155bea73ed16645768bf0" + - "a5cefce78ba3ff98a54a8e8afc5dfcb0d422bd811ba9b7770a663b081dbb" + - "40aefffbeabca955a9638830f0c5d70663cbf5b26067cd061c4a3f5cf8fa" + - "4b6678d82d9a2aa33f8538b7499a3466f6b0ae2a1daf280ab91a6c220684" + - "12705245f353b4b83db50bedd3bf99d42bde6363fd6212cb745467acb007" + - "b678128f6580629a06171f7f3af272f8900b801af3bf47439167871e7b0c" + - "33f198333992a6c52c32be46071738cfbf245937d48f816ebb88ff0e726a" + - "dc41de4c771ff0bd320a4c0b1fcccd9fd6c42ec9c5185943c70e9a4b7c26" + - "a980afe104bb1f99576671a254704c7d4233eaf9915e1d56c103ba9f6e8a" + - "46aff466933bf58c9842796ae9cd21f7ac6aa96ef42ca54e390203bac354" + - "b7c1de7d1887c48255201335f819020e2782a2ee8af92ceb206b651ae92b" + - "3f4fdefed05e08974aee0a353d104b1be9a5e75c7f958f1981271b0a6928" + - "05a7a2f28a0448d86102b4fadf9ab4ec2f98e31e64fcfdf2b524780b3342" + - "7a2a3100c2032fc93199f3ea7a9e8063fe73282dcb1fafaa9496c7da868f" + - "dcf33bbb761df0bfc6fef30fadd2b6efef4fd3216a8aee48a2ef28102491" + - "cf7278b567c272d1064a277eb193b3f6f01df641ddb729f72454943cbd3b" + - "671ec077f9e3548f5f57d063c653ebee4f228a78f8a128d26f7f4b44160a" + - "07e942bab87b2d043c77ecdf10c1a419e0a1c4162a99c21d4abae0558b8f" + - "4dc0b7f1ca3892a6babf71f2f70aaca26bb813ac884ee5d71abd273ff1c4" + - "add230a771b678afbb12a1ca7fbcb2c0f5589c9ce67fe8f78a8db87825b3" + - "09ca34f48ac35aa7ac69c2fb2423807650fcf47ee5529e9d79dd2628718e" + - "230ffe5b83f9d5bdfd9c5d211282e71cbcacf972995bf1b13d21419f7fa2" + - "8829ed1dcc459da35883b9269a474f7fceff01d44ab78caf1ef7d8117f50" + - "cc83eb624062b149a6ed06ddd1cd1feafccdee7122353e7b3eb82978ca69" + - "247fde52d2d6cfe7324f04af5259e1b5c2460889da4541b431ba342a1c25" + - "3a1b1b65fce7120829e5466e7ad2fe4e0f773c7c13954a9c92d906c91aa1" + - "de211f40916596bfa8245344e257e5907a2c49ebcc864cfbe28663e700d8" + - "472c50355313d5cf088e9e8a19cdd85bcfc483520498c6386050e53a3ff8" + - "1e2b77b55b116a853d71f60d621265166cd7e95ff5cb4466226d7cef68ff" + - "d0a35b61e76a43cdcfa8da7fff9558e2f89b981ec6be632b126303ca1fe8" + - "53d5c628d967d39317b60ac904d6a882beb0746f6925a86693aff4deaac2" + - "e5b64b611de86767d55a6e11221605508b1c5cc828251539b1b6f65c2c04" + - "8e65be5422c1b11194eb687d906c559068c0a810713b23b30d8b17f10df7" + - "0962c5e7e782aff7bb95adfe4cba9d90b0ebc975fa56822025100b5cb8b3" + - "8bdc8928c1a2a8034dd66e2a763696d7ce6cef4dd586b83f7d01749d37fc" + - "4fe8d7abd324d4ff1efdbdbfeb0a2fbb8b266fc2bce8e5e5b95d0089e7c5" + - "d7de4db837d1822ac8db8198889d6bfe778d0b19e842f12b5afd740aaecd" + - "e36e2cefc2cf0b082aa0c4f75684d024b8d828d8f2911fe1aae270251f62" + - "4f49584e40bb193577c9d8e04eb16c094653cdf9a15fe9210f724c7a7c73" + - "74cfd1a74abb5ceae88ea54f7e7569f8eb674529cbec965ed05bb62f1968" + - "8fdaa97297268bfeefd06eb21f700cc56f9bf7f6cecbbbe7278ada8399fb" + - "960371a2d5cdb852b11c9fa17650e614c5297bf46cb7889d52bcf49d2560" + - "720852822b75bb16524d88273cb366b84b88282da91875562e5a1fe73973" + - "afe90e5cdd3f5381612d3ba7bfa058d023a9326e403ec474d8938313fb32" + - "bdb5bf899b900c3818c43c8a0af6a061bd26e847ed75983402ee8a9cf4ef" + - "85bba5545a0d329ba81495157eda0286f1917de512fe448251697dea406d" + - "a510adcb05", - }, - { - key: "b78d5b3019688e6ef5980c17d28d7f543ca5b8f9f360f805ee459717ca0d85a1", - tag: "f01babc4901e957d0c2032a7279321e1", - in: "ba7d35b2ef8af1118bce1e78018c9314b0c8c320591e103d23f715acb05e" + - "dc98fbc618de06627661df5842dbba9f604c2d20d664e5db06e949b11d49" + - "665088dbafdb0d39d20beaca7d723f8dcdc57e9c5583d303b6cdfdbecf95" + - "7d8daf2f1c72b2a6fa27e3d18841f4841abafd334c110cd2b74efb6191db" + - "ab9b8fc8427ee17664082f31db98d30bf15dda967e20730a9ef525abe9f3" + - "f620e559ed22bf74d347c9869f0311f33da7f1a3dc858b3a8aa73a35989d" + - "b055a4a2c269c95e352259c57de8b94d8de48984ecde426d3ef60ec1c7b4" + - "41cc950f7764f55bd0cf52d069b9ad446d1f765f35d02ec104ffcc00bf1e" + - "dc1b951ef953acd19984ff1b41041bea0e9f5326a7c9ed97e6aab42174ee" + - "971ea1dbe2fd1c1f67f977ab215962b0195417170f6b7748fd57262424d6" + - "cf7c235b34425f4047191232722932213b3eb73904cadd6a2e9c7571d7c6" + - "6c2f705b5039ff75e5e71c5aa738bf4177653e6eb0b49303a4bc0e641e91" + - "2691f217296a3325431d578d615afddf47784e4618a2ca40ccecb05d621d" + - "a52f272b8cf84f7fd8177c83af1580d25a764cc06436d67171cb5d1e3b39" + - "367b46d9a59d849d87ab6bfcf3fb9bac2b1ebfcd1cef4459e74b0e1b7080" + - "dabd2dea79f75581a55de63c4b23ff67d986ad060102933fc6cce8d614c9" + - "c86dc84068828dd9e21ffc5665c809d83b09432fd315dfce5d7a4ebd8143" + - "181953e3f8716e47b0b30cc1f753e31a7d509f2dbd4177b6da310cf3cd02" + - "5db270adf98e96259a5ae1b81f5be4d5c76f502a612ca73c76b91e0ca695" + - "aa921f9489948619482c2956205ae71fffc3aba4476ff754e4878e36c763" + - "2c935c076857c5b90cd63ea4764efbcee53e2ddc9bdce54b1cbbcf0e7544" + - "d023e7c2b79419ad92221a1f76abe31a8236e370d38e2493cc9ca2aaa811" + - "30fc713d11f500fd071d6eba6861e8b0859b372e62fe60b627a96c377f66" + - "236aedf307e1d148a61bdad072b93d7d2a73367c595b1e048f7023e72729" + - "1ec508326f5424a5bbf4e010d0240b71fa9137e6642ab40c5e4fff79877d" + - "b3253c663a221b49b3e77ea307c7b9f3f72a0f3a54d0112c45c64a0c0034" + - "baf2b55ae36ea6f811bbb480cee663136474dacac174c73b1e8be817916c" + - "fd4eb1876582bb3a36cfbabad91776aa676305ddf568a86e3a5eb687fa81" + - "67771fca7b5ca00e974b3cc3e322b4bd9bcee2a87d0ae7976da5e04fa18c" + - "219fa988d4f6fce62f194b05c26ed3ae1b066cd9751a2d916d53426a454d" + - "58f9c3b2fb49374e5791b412fdee1b6029144f1ca787f56fece4f64f4fac" + - "bfe4cfd8ba7c807a83cf44008fe5126a283ab2631a87acd8e2a3bd10979c" + - "4b07a84a49b0687a45a4798ded0b5e9b2acce30e714d78395bfa8f33ca91" + - "e68b2138bd67d8a694cd87c88dcefcd101a3b408d7a9095cc6a4b38898ec" + - "c8b375f5a67deaaf73eb7e99b10314ca6bba824658bee85dd731d9a1475f" + - "976b7c0aed4b67b088f0db5ca5091273217f724969dff6cf184181377c45" + - "5722beb23fd9d097a82ea2d8d527ba6284acc20cb30f2e52af28800c61fd" + - "1faf9f4f619550e0162a1a63758e202533889b27420fe7d0eac9a47a6e11" + - "1d80054412340e0426cdddbb3c7b9b823b8db3ef58230fad7a3ac21a7805" + - "d30878d4ea78dda95c951b7a5dc552e9434c35e03e1dd88652d3714f8fbe" + - "a39936cc0717c2e0335371f2a751204f5d9386baaec853f019325edfd1b0" + - "719d1fdac3fbd774a64bf957fc54039501f66df94b5b9b82c2076c597065" + - "dfcfe58b2e215a3734066aeb685ef97759c704b5f32dd672ba59b74806cf" + - "ad5daeeb98d16f7332ff0ca713d541c84e4aef0750bab7477ea707e2e497" + - "e12882dbc0765106070ec6a722d08fe5c84a677817b28fa3a41a6117f2f5" + - "465c2a2f0eb2b8be4f36e676b4115008bade3573c86cfb1370c03b6b0dc4" + - "bbbb0ada4dedac10a593655068a26febc2bf10d869cac84e046c9c846ce7" + - "927431f606f07b92abdfd81260199ae05ed01dfa07088c56a6a8de9c6d51" + - "d61d6a6d3f9904c216ea8329467a006a3d2495a768a39ef99a21827d2def" + - "909bb743fed7209f7fe59ff1c1e710095b05f166c6173deef5c6ec4105c5" + - "fc3b87c8269c786bebd999af4acbf12d20453b125f338aee87e9509ee405" + - "9c9e568e336304d7be9ffe81d1700555b0800242d9b7450d7256f2b17f6e" + - "d46a39f67bb2980572ce73169e352070dbafd4c7fa5a6be78cf9b72981c0" + - "a01f1e1e30ee3736c59828b791d2373799854497a28a44bbe0e074925723" + - "4986696fbb06ef9ea83fbd49c45a583ce12ff10258ba06127c67b0f66dd1" + - "09f1366d8036853973d8884f93de54fb2a12949eefc020717eff47898cef" + - "306b5de068411f1e113ffdfe2556e0faedc3e27d95a45b8afc15ba0eeeff" + - "eb86da7b4324e20af80c62bf0ceb4aee1515f5912f71c6bf2febf20123e3" + - "dd3a82dc1e58a108f1039942dcdacdeb1f0ad0b2ef34488d98d6a52311ae" + - "acbd03c12f6e775e375d5979c7c295bb049f2cfd3580e3da3841ddd8e6af" + - "4de5e6512ca79cebcab9280554524881da37984d340e8f0163fe10a02ed0" + - "88682560bc6d3c4dbcf1a542ffb3dcc2ed16a2eb96896e8269697ffeb50b" + - "73f2cc354092e782a0072fc12e1eaff117c2cc8a5a1ad8b47802ac9e23fb" + - "91a0cef9e4027595e0885464e61563093ee2b1dc5f22dfd04af7de6a70d5" + - "977d3751a4b3cc0c71a71c59c0534cb1f8c0eeddcf1c0e1b3e5ad0d083b6" + - "6e8b998ddf9ae9d3b365c851d42e995b9afdf8d66b2ac40bf514ce32e456" + - "0880afd38c42c08926067eb243c4b1184e667ba756c14ace5f525eb48df7" + - "ebb429d0a23d159664f8021d27dc7167081de331c7114c9c6456e1ffdb42" + - "2172a81c06d8deca995e158c48df27261a83f83e0127f5e056a139be9b76" + - "e25dadf534d3d1ed6ebc0b5d77d51e5b90ff86f30d4023066115bc11b33c" + - "c827b1103098826d0bf8777176b2da6f1e5b580e407ccf7e614fdf4f5b53" + - "3ef6d30b20c1bee61eab90e983b1a97173a62720ffd27abb8976a948d532" + - "d06596c23b0ef31c79831bead8f8e99ad209af3658cac0cb3c3f9c88379b" + - "9bc871d8e84171d53400902da1243f664afeaff60bd96ba2639a7644676c" + - "a79f43130af12ba2c877d67f7ec030a4217a72f5368af7c9f24e643db6ac" + - "97a04adaf57dbc53762d8dfa1afd49667c4041adcb5ec303e191b786273b" + - "bb065cd9f16a3a4a399c6a7aab9c1a6604998264e8b3dbd13d8f2228b13b" + - "2c2b9fec5055d8e9f2df1d9a25e4bfe2029776389877bbef7e2c7621f06b" + - "c0b7fc0786e2b2d042483ccd4a59d2872a6c5ac73e217123e5c8401580a8" + - "d967e0895aaa28f4d25ce68c90b4394d8113bc423e9fae46ac47bc2ac191" + - "fb97b80b5a85feb2bb54f84c493235c1408662fe253c6786fcf6fdb8be87" + - "dc66a72cc847f94dfb5214af5905b7039a7363a1b23a07853daa26862783" + - "ba08a80846fbb93ce98700a4f9961115128dd67bd7d19e0c588fdf6196c1" + - "1cb0154002ae862f11421f5dc3a57b6c0870b452272be556a1d14eab1af0" + - "a91ff5b89de6bbeed6e03bc64f5efddf9e54da71c594bc5ef78e0192cfde" + - "da36e4ad1a6b0b51110c1b24d20dea1f19e18cb1184d80189f842d4f07ac" + - "834744dd009aa3771b1e5502fe4b65a403a4bb319e1880ff6ba852e90a8f" + - "4fcb52cf374c88408428cdb1255291b04ed58c992310955198d61fa1fd9d" + - "762d48f2f65a287773efc67d549981c291b427889d3e3dfc0cc6cd68415c" + - "dbed81b516786dacf431472a7dfc99688d15bb6c1b85b1a2015a106e5de8" + - "cb9eec4c80b17d00fdcf4a9c64de4643a95dade8fa9f1bc5c839037d86c1" + - "3800a244188e3b18561a74912ed72f99f2365f0126732d037dd54a3ab77f" + - "9a9f6a1c1469ea92eb707482066bd4990dec4d7614ccb4ea6dd4deb8bee2" + - "2c4dc0b9b4d4cc70a500d2c8a5ac3ef88a38439b7dc254a6d920cfd317a8" + - "4d7747148c65b6730709e43369d4c995b03c58b9df444f77f216944e70f6" + - "6446554d8d513b8f7f28ef0a2d7ad5ca2f6110304196953247a7ac184f68" + - "61fba896c2d5a59007ec2b2c8e263957e54cdc1f3b4a145228823fdf0960" + - "c33a28f59b03ee4be21001d2f56fd49ed14db33b2c4eec2c3f41b250a624" + - "99a9b6602c1e838526a54cdcd058af1c252d56009d4c7769deace53bdb66" + - "543f5a081cdde775e61efa70956fe2a7a6019a164c6e413ded314bc928b4" + - "aebccb946ffdf3eb33e187bf421febe26112b3262a526de65678cd1fa03b" + - "83513705108fe0bb87aa99aceb28af3641c46a2c4427cc1063de01aedaea" + - "fba68155d4de494a27ff6b7fcc8f5c5c3f7d3a115c397a1a295bc55aec8f" + - "7f150cbce2a8aa4706d54ec863877bb966ad441c57e612a1b5d438b98d9e" + - "fcdfe6d4f66e885f96407e038015cf974ae5a3540692b054d2ddfde59b28" + - "ede7e2f581eeb56c5b88e2779aea60c1d8ca6107b0cdda1ac93e6c7520da" + - "edc66afeed12f980e20e1e1c327d15ade4bb90de30b011a9cb33855ca3ca" + - "e2", - }, - { - key: "2b0b0fd3347e73c2fa3a9234e2787e690a11aec97a1c6d555ff7b4047b36f372", - tag: "81b1a6633f849ab0aa7baafa58a5d9b8", - in: "427f3a7a5f1142ffa68e83df5f917e07b2bc454f3adce068a8ae9e0908e1" + - "3e0099aaa9074697593c6d8c2528fedddeca05e3888be1a0a201c389a72d" + - "20cb661017544d95a431e70e7c6580d8fb46ea4495bc59db6ae2cd69510a" + - "02426c50de1b6110120f759960605aca718d4d0a497e003e1ea2b8ae9a53" + - "df3c1eb4f704eb32f8f05eb08cecba0fd4a94f0daa3b0984c30a38f94b7a" + - "10cde723182d30588bc40f1f9d38a3bab4800fdd5148e34e396144763696" + - "c9b3e9b8adfdb337123d54237c7413f98bb2056152b256e37a27bb947c67" + - "240fa3ce8da62ab367db540bcdd9eb873d6c71c75a08fe99b5c11ec8e6af" + - "f926d2adfcf073479de394d4aac5fdc6241824d944b8773db604c59afc01" + - "495ee755905e5616f256c8a64321d743a1c9368d46418826d99b762e2f6b" + - "f998d37a995969cdc1de85f0ce3987c6550459f5e5bfd9173bfcb9e0112a" + - "d91f092de446beba14fb3b8ce3fb2f9c941815b2cb5a3b406e2d887b7912" + - "bba07c8dc7caab9836827da93ca71fa5ada810da1e5e9b09738524564d8c" + - "923746d19c78dc9107b9f20f653e05d7f2eb6bd90cf5eb30fdd7b587eb46" + - "74a1064c70ef0af2e75373044d32b78d96eb1db3112342d38dca0e47b96e" + - "9307fcdd711b1c66355186369a28481cb47ef6bf6651c2ff7ee4665247cb" + - "12b573933d3b626d1c6264c88bd77873c2e73e73ee649216bf0b6d6615ab" + - "245c43569d0b8096596f25ceca8667661de1cd60dd575697370ebd63f7e9" + - "5333e8a2cdb829b75ea83d72cd246d50358f7c094c8a515805fda03165d5" + - "21391617c9f9a2ea562b419632df611a67912d2b369e5e505dbd5c719253" + - "16d66cd608cc4a9583a8eaa4661b7279870345fac3031631c1a220551527" + - "5be7d8d89b71960e687aace3a0e8f206e475053d6fbf97717b154c75406f" + - "2caa97d1ab66048f1c99281c188a2f37b8bfc736c25840a9130ef2031c05" + - "6acd9dc10592eddf94f5bac85319b10ae46cc136a0738aa803837287ed7e" + - "dafe08d1fcf31d5e63763e39a5e1f4d7d0edab368d44e63fdb33c28905ff" + - "d6be406a024c017081b4f2d70860776e9d2556cd008fa5017b58733da13c" + - "634938407a118827a80baa28d4e605db59430f65862b90cd8356baa287b8" + - "4e6d9199fd80abb9fa697e2c2c4c760128e4ec0438388cf407e2a2fe0f57" + - "908187ed8efd4c5cb83cc91dbe6a11444eede85099149ca82921bc28bdd6" + - "b9999594a41d97307f8854b1bf77b697e8cdd4daead2aa49fbc571aa44c0" + - "bc84a57cb5fd85f06847ad897ceaf449eec45bddd4e4eb1e1e119d15d5e7" + - "90957e686acbdda1bbe47ea935ebc4b8c2e3cf9b7157cc6dc03bcb19508d" + - "a9e19cb76d166da55559ec7e0995d9b50c6c45932d5b46eee400c56d9dee" + - "618977dcf6f76e3e86bc5207493afbc2aae9f569ec9277f33d9f61c03d59" + - "dd6d8250ee8cb3e54e5e941afb74f0735c41d52ef967610c9f55b2b52868" + - "4b549a99ae3392a7237bb52ff5f8d97327e2837268e767bed0bea51f76bf" + - "88bf0286bf22b881f93f1d54fab5cd4e3c148c96c39e7aeef375de249df0" + - "4d89d1bd97a7afb2be0cbfd3380cb861d31e4ad1ea8627721e4518b9db3c" + - "cda20273ec23549c4adc3c027e3ac9558de2010a0263c1225a77dac8be60" + - "d498b913f91391d8b2656ffddb06e748cb454dc2b7226745f11030a6b9ae" + - "09ac8ac428d9c6500801fb540650c94610ab70465b1210c6db2064dc84dd" + - "7f52573f8f40c281470e85176c85ec6de3c718663d30ad6b3dfc1a3a9606" + - "1936744357ca62fb8bb066aa1fcac6d7a2adf0a635cd546bef39fbd3ee0a" + - "8802ab0466ec9b049b5892a9befa4377cd199a887c34569b6f90852139a7" + - "86babc0049ee2b527aa96b988237a52eae8b4b49d2ee15ee5294118cee62" + - "3c3e11cecb836b21af88555f10be2eff8379beb615b7b3d6c01d545cacf6" + - "61be8ebbf7a3c58ac5e0e7b17997659a2bf15f2b2e3d680d142fd29d23a7" + - "aea9890f3ff7c337fce49ecedaf38573edfae07810ba9806723e576d687e" + - "a11700b8ccb96a6559259c367cef4e3999a05a373ab00a5672ce8b3d1dec" + - "a414187f383e449d10021b73c1f7e39ce01516b7af96193f9993036049fc" + - "72ac059ef36b2bcfbe13acf140d41592880fb8294ebffb98eb428ce9e65e" + - "1094521bcf8ecd71b84c7064539a7a1aac1ad2a8a22558fb3febe8a44b87" + - "72fc00c735773d4ce2868a0b478ee574b4f2e2ceb189221d36780b66212c" + - "dd8fd3627cf2faaa23a3d0b3cd7779b4d2b7f5b01eb8f1d78f5b6549c32a" + - "cc27945b5209f2dc82979324aebb5a80ab8a3b02129d358a7a98003e701c" + - "788a64de89726da470010eda8fdcf3da58b020fadc8970fafb08a29bef20" + - "2bd0707e994015258b08958fc2af4c86c3a570443fe6e1d786d7617b0c66" + - "29a6d9a97740c487622b5b8186c529d7f8af04d9f0a9f883043f08103ca4" + - "d70057ee76639f3b1046d86928d54cd79fb5bb7b46defdf15d2f8578568f" + - "1d7b73e475e798ec6812586700e038ed4791b23ac9439d679a1a4bc04cea" + - "e328330c24b065c9cdcdcedfbaf58e5299779e6f48783d29ec3b1643bc8f" + - "1095c724dea75770583b15797fc666f787510d91e65a8e2090cc1ed2013f" + - "e63ab17bc7640ee817487f4eac8326e9c4698cb4df05d01bae8c0d00fc00" + - "08919484d5e386c8f60b8ac097c93c025d74faa56e8cb688d1f0c554fc95" + - "aae30873e09aae39b2b53b1fd330b8546e82d9e09bbb80132d794c46263f" + - "4fd7b45fda61f86576dec52c49f2373e4dca31f276d033e155bbcdda82af" + - "8f823948498f4949bf23a08f4c8ca5fcc8598b89c7691a13e5aba3299ee0" + - "0b479b031463a11b97a9d0ed3189d60a6b6c2390fa5c27ce27e28384e4fb" + - "04291b476f01689292ace4db14abcb22a1a37556675c3497ac08098dfd94" + - "d682401cabec239377dff592c91aca7eb86634e9d5a2848161dc9f8c0c3a" + - "f7b6a728371fac9be057107b32634478476a34cbc8b95f83e5b7c08d28f6" + - "fb793e557513ca4c5342b124ad7808c7de9ecd2ac22d35d6d3c9ce2f8418" + - "7f16103879ed1f4827d1537f7a92b5bbd7cd12d1ecc13b91b2257ad073b7" + - "a9b1ea8f56b781bea1bddf19b3d7b5973f1065fb72105bb4aeecca5b7513" + - "ffd44d62bf41751e58490f171eb9e9eb6d57ffebedd4f77dd32f4016b769" + - "fed08dd96929e8efb39774d3c694b0d30c58610541dcfab3c1cd34970195" + - "7bf50204acd498da7e83947815e40f42338204392563a7b9039c8583a4dc" + - "faba5eaf2d0c27ada3b357b4fccd1595b9de09c607ebf20c537eb5b214b8" + - "e358cd97992fa5487bc1572c8459c583116a71e87c45c0ba2ca801931a47" + - "a18ef0785ebbe420790a30278d2d0d42a0225d211900618438d1a0b2d5be" + - "d14f8b4be850dc8cb08d775a011683a69ee1970bb114d8d5017de492f672" + - "09062d9ba3616e256d24078536f30489e4dacd6429ed37aab9b73c53fdd8" + - "a8a7aff1b914b9d82d75a46d0ccf85f48d3ce9a8d3f959b596ae9994ac3e" + - "3b4af137d0c8e07ece1b21fd8aa05522ba98f85a7ab24ed8c1e265fadf4e" + - "9a18c5ab5684d8ba8d3382ad53b415c73ebfaba35abeebaf973b6f18e0d8" + - "7f019420eb34e09bbb12afc5b149f1e9e9b6ae36ebde429d437ada1a2d52" + - "b998f7c75ef731132aafc3bb106a2ad3ae11223a355804d4869ebaa47166" + - "2df261d95d48ac6eb17c1781e81c0027ccf8f05c39e1eda7793cb16622be" + - "ce7a1ad5d2f72f8bf4bdb2f4f4dcadac3db3bf727f0d447adddad4500360" + - "09ee011bf4155e5e46c74b00d72e8e6a88de9a81a5a4685651b90e874dfe" + - "eba41698c98370fd9e99619ce59ebb8342417d03fc724f9c910ae36ac5e5" + - "b46c424141073199aaac34232a8e17ebbfdd80eb75e82290de92968f3893" + - "0ab53dc83ac433833576e86fbabfb9d7cd792c7e062811f4cb017710f841" + - "1e0fb65ea4b3cd68b0af132cb08330aa13579196ec632091476f268b44ba" + - "8f2e64b482427dfc535d40d3f58b4dee99053b35a3fed1cb245c711fa16f" + - "c141974c8db04f4c525205dad6ca23ccaebde585cd3bc91f5874452ed473" + - "08de95cb6164102744f90b3007e511e091653c97d364fe0cbd7f4cd3249c" + - "1f5c452becd722ccc8c6b4e371e2631337dff78efd903a8fc195a90ca5a2" + - "aa4513bc63cd43794ff06c5337329055c43d4fb547e63d6e4d14fbe37b52" + - "1411caf2f1b0df51a68f677db59aa227c725cf494ccb7f8cacc5a06ac5bd" + - "f135a2603175a5fd5e5af615fd2e7cea61934e6d938b9e672290aaccd99a" + - "7e26dc55efe928e56ae6354168264e61668a61f842a581cd0c4b39e0e429" + - "04631c01320857b4d7e260a39c7fbed0593875b495a76aa782b51fee4f88" + - "84ca8ddb8dda560b695323cdde78f82dd85757cadea12ef7cf205138c7ba" + - "db6a7361a8d7868c7aefa7aaf15f212f5f5ab090fd40113e5e3ad1ab04f9" + - "b7f68a12ad0c6db642d4efb3d9f54070cc80d05842272991bcdae54cd484" + - "9a017d2879fd2f6d6ebce27469dda28ad5c345c7f3c9738038667cc9a5bf" + - "97f8f3bc", - }, - { - key: "aa3a83a6843cec16ab9a02db3725654cb177e55ec9c0c4abd03ada0fbafca99a", - tag: "719dbe5a028d634398ce98e6702a164b", - in: "643883153c215352a4ff2bb2d6c857bafa6444f910653cacd2bbdb50ffdb" + - "cae23cc297a66e3afefbd85ab885e8ccf8d8f4930e403662fb4db5121aca" + - "82dfcc3069bd5f90be4f5bfd3c10f8038272021f155e5de0a381d1716abe" + - "0b64b6d0f73c30baf6ddfe0e6a700483cad0fa14f637afb2f72361e84915" + - "78ba117e1c03f01fd61aa8f31da6464f3d0c529524d12dc53b68f4d4b326" + - "db7fc45c63f75244002b8f9a185556f8aab85948647818f1486d32c73614" + - "b8c4763e2645bdb457721ff3901327588da01622a37ccbbd0374fec6fd1b" + - "cce62157e64c4cde22c3a5f14c54cd6db63db0bd77e14579989f1dd46461" + - "4c8691ef26406984b3f794bb7b612e8b160374be11586ec91e3dbb3d2ccc" + - "dbfd9c4b52f0069df27f04853e7cc8b2e382323345b82ce19473c30296cc" + - "453f479af9a09ec759597337221e37e395b5ef958d91767eeb2df37069a4" + - "f3a530399961b6bf01a88ce9dfcc21c573e899b7951723d76d3993666b7e" + - "24dc2570afe738cbe215272ccedb9d752e1a2da00d76adb4bc0bd05b52c3" + - "fa08445671c7c99981a1b535582e9b3228ce61662a1d90a9c79afbdcfcd4" + - "74def2b7880cac6533ba0a73fa0ba595e81fd9a72ec26965acc0f4159ba5" + - "08cd42553c23540bc582e6e9ac996a95a63309f3fa012eac14128818a377" + - "4d39936338827bbaafad7316e500a89ed0df7af81be99e2f6aae6bb62568" + - "1dfa7e100ebca5c8d70f67be3c1e534f25446738d990ee821c195c98d19c" + - "fd901e7722b4e388da90b95ac0b5b5dc5d052ad6b54f6ea34a824bcf0cd8" + - "7f1fc9a07e8f5b8aa0793e3c9c1022109a7c7ae97ee2a2867fd0cf0f8971" + - "34b3d150d3b24fcf8323de929b73cca01244df02510393f0b3905caa0268" + - "7fe35f64391e7d4b30be1cc98319716528ca4f35bb75d7e55cf7749968c5" + - "37136eddb149a9f91c456fde51937c0f35e7e524647311077e6fbe7f3c12" + - "37b9584fcf3b0f78744c7b2d3b452823aca06d144e4463eb5b01014201cc" + - "bfed1adf3414427072135d48e705b1b36ab602cae69428e7c19d39cbb4e0" + - "ca26a871d607ed4daa158b5c58a0a9f4aa935c18a66bdeff42f3dc44166b" + - "a299d71a2141877f23213b11c52d068b5afadc1fad76387cf1e76571e334" + - "0b066ade8da02fe3b0bdc575b1d9ec5d5f5a5f78599f14b62db0bef7ccc6" + - "1711482dfa4787957d42a58fdc2f99525c32962b06492229399980601bd2" + - "ee252306b1464914424de9aa414a0a6e5dadf8ffbf789e6d18a761035d3e" + - "f2ff0753becbd2dd19fc1c28f9acebec86f934f20b608a9ef735ac91f6b7" + - "83d9327cce7f4870d39bbbfb0100838dee83e6baf2b40cfc98415dd174ed" + - "72e393ad0459e8035dce7eb18eb3af2f39d2712846b9e1852cd61d06dfc3" + - "5e34fb761b67e2a711ceb4a82557371ed32ca8db2e4cd7fea0b6bd026177" + - "4057b9abc45dae6869cab1097459473a389a80a4523e5de696554f8b0bec" + - "0ca605e6acfaa00386fb5a48e0f5893860a29f35e680be979cf3bf81ee7e" + - "ed88262dc80af042b8cfe6359cf8b475560bb704728034e2bd67e590bd76" + - "1632e516e3292b564c7265d7a6dc15c75ba6f6a447b1c98c25315ac7de59" + - "9edc4993e4dc7d1dbfcea7e50ebd0b226e096500216c42de3abe352e5b09" + - "a3c9754aa35d00883906599c90a80284d172a90abbeaf7e156fe2166ada1" + - "794420fe55b1a166d752d0eb7f04e822d021c615e84777101e7c9f9dd12e" + - "565b7d093fe978f85e6142c1ca26798b45f4b8d23ecff6be836e810e314f" + - "ebd2ea66f2ac95bad84b39b7a6bac41448f237b45e9ec579235ba2bf5fa1" + - "f00286379ec107c743f06ae0d11b57a2f5b32e3bc5f1697aae812d7ca303" + - "b196a8a43259257f7697bae67adc7f121be561b2d0725982532ffc06cb22" + - "839d9066dce0e4d683d9348899089f6732de62751ca77f1c439e43054468" + - "2c531b9c61977bc221b66030f7571dfb3ddfb91d9838529dbc99612f650a" + - "d72bb78de061192068941a81d6ac341101aeb745b61bd7a87a35a2714d50" + - "c3eb2c3ea148fb9ebed948307f8b491aec277ac01903ba36e6ad54f89fe4" + - "280a17f8e7ae639e75aec16d56576f03c2a1efe4af995eb825ccaa6efe0f" + - "d6d878299a351591d791c286cac5cb049834580d47a9bb7720d0603e3141" + - "ad7c1ec2dd23d3002e15d73c1828a7f08062848b1b6fcf816bd954743547" + - "6f0d6f882125bd03095eb1b1a846d535730e258fc279f7095de7c2d3fcca" + - "a4640a2e2d5ce0974c1e073c60bb78171c1c88ae62c7213a95d36ea9ab17" + - "59093813b85d17ff106e69100bd739ede9656388bf47cc52730766a8a186" + - "9dcc623e09e43cfba1f83ae1d9f16789064ec73504c29686760ea02c6634" + - "a929ca10c6d334b1751494c6d143671ce8e1e7dcc9bcda25af895a193032" + - "ce27c1016ccc4d85507fd2265ebf280d3419f54f66ba2a161c068491578f" + - "be056f02f97be745db443e25ed2647c5348f278f4ad8bf5b2a2c2d56e795" + - "532e25585984a3a94f435ef2742a0413abed7230ff2e9724187c91f73a7a" + - "726ebf36bc8d0d959418dd586452664990889358c56720c1001c004ff768" + - "54b9850890ce1b31735fd9f4a3640622ef0b25c659e8a937daa0df7a21f1" + - "77be13dfdb8f729da1f48e39a05f592d8c98da416b022fd8edab8e6132eb" + - "a80c00501f5cc1e0243b6b096c8dbe7f8c6ffa2f8bcc7f309fb80b489b92" + - "c4878fabad42d91876e10ee64ccd415124461cdc7d86c7bb6bcd9133f3c0" + - "dfa8f629ddb43ab914c0ac5ecddf4398052229876fd838b9ae72523946cb" + - "bba0906a6b3ef26672c78cb24cbf691a5ec869d9fc912009d840772b7da0" + - "c7f47856037c7608705cd533918c207a744f75fdfac618a6981778e09332" + - "5c7d22170da85bdc61044b4c397919d601a30746cefefa798c58f02cb827" + - "0d130c813cbeb67b77fe67da37a1b04bf3f1e9ee95b104939220fb8a0394" + - "86ab8954b2a1468016f546406d1946d531966eadce8af3e02a1f59043ff6" + - "e1efc237dbf4dfd482c876531d131c9b120af8b8fd9662cef1a47a32da40" + - "da96c57dc4efad707a4e86d0b84262d850b451bda48e630c482ef7ede5bd" + - "c55147f69e2ff8d49262d9fe66368d1e38ecdb5c1d4e4042effff0670e69" + - "04e47d7d3047a971d65372126ff5d0426d82b12b253bb4b55005e7a22de5" + - "6fa54f1dfcce30b1e4b4f12b1e3c0de27cea30ce79b08c8c1aceb1ffa285" + - "c317d203a9f2e01d542874fc8035b7670f3648eec79561d6ff2fc20d114f" + - "ba4fbed462f1cd975ee78763c41663849b44cb2827ee875e500b445193e1" + - "4556bcccfaba833bb4ea331d24a6a3bd8ec09906c7b75598b44ce1820a49" + - "fca4a0c1501e6c67515d4fa7f88f6aa3cd7fbc6802131a7b14b219e154db" + - "9ed241133e10ace40e4d963f904dd9f3bdaaade99f19de1ddfe8af2b3cc4" + - "0a48374dd8eb559782bea5410f8f9a1cd128523c0157b6baad9ea331c273" + - "311492fa65c032d0d3b513d23b13b86201840d51759021e4133f873f2781" + - "8f54f34ba73b4f33107d49c8de1533856ec37bb440f3c67d42148765610c" + - "3296bce932c839fd866bec3762a38406ac2b39d0d93730d0c88cb8f765dc" + - "d8ee71263fc96068b538da06fc49e25dbeaa10a5111a9af8e8f8d78e6ed1" + - "3752ad021d9f2c6b5ff18a859fee9651d23a7237bd5a5c29029db3882c47" + - "0470de59fd19fb3bfbd25d116f2f13ef5c534bf3a84284ae03e3cf9cf01d" + - "9e984af9a2e63de54e030857b1a071267cc33d22843b28b64b66e4e02803" + - "c6ab5635291aefa69cfeb3958c09d0b37176842b902da26caae3f0d305e7" + - "c6ab550414e862e1d13d9bb9dc6122cb90ddb1a7bc6d31c55f146659baa9" + - "6cca4ea283e5e1639967889543ecb6849e355b6c0227572097221dd46c1d" + - "f8600b230e9644ba611ba45cd83fa4ac7df647b3be57387b6db12682018a" + - "de9be50a8ea7d5f7c743bf0c6382964bb385b3c207c0cdd63279c16130b3" + - "73ba974125291673344b35c8ef9a33be5a8a394e28dc1448f54d46af675a" + - "edc88ce85a11ad7e50058df4f3f2364abd243683d58a2b13fcb0dc0eed21" + - "380b666eb87f4be75e7f2842bae916c15af3e9658c55408537b2301faa6e" + - "42af4d94e3eda6a41d6d302be281e2a9299e9d0fb1f20cf4ca978e66bdd7" + - "4c8bea0f15c84d6513cdea787dacbd4bb529ed03528284cb12f6ecd841d3" + - "c58c3a57c6bc19b65d6d10692f4e1ad63b091137c8acacc6bc1496953f81" + - "2972bf6362cf883bb75a2d10614029596bf9f35e92addbb50315b30161b7" + - "de8867a1393d9583887a292cadceb54078c9c846ec30882e6ff987494060" + - "721d3c761940b91a126e8d1e0118617bdae01a7f9c1aa96bdd6c78ca06f2" + - "6c8d85664a8705334f4997c724ef98fe265985593d5a9c30798714e6de1e" + - "bd04b648be47a6b5d986a3103e738a5cd114b19b7ba99d2e2eec6181bf3d" + - "ff0fec8c54ae6118be8702c3e775d493a6fafb509712a43ee66c3f4b75b0" + - "194c88937cffa5fa17b284d2556f2b0eebf876e05f92c065515198bd5e83" + - "00d0db432cb256a4a0f9963a05694ffce3ecbd182209e0b7bb50120f6be4" + - "eeb9d268b17790ee14a2c887dc5753e0086630b3123734053aa37595aa8f" + - "31968ddae4991af4ab970c1e3cfa1146a2efd9dc42abd6af14777b8a0455" + - "3865691cbac4b4417b3fa13c154d581b498f3b8cb77adf0e42dc2f2fb521" + - "732447de97271e542c6cf8cad3ba0148cc3ba1f2983ead836a25a2c022d0" + - "43ba18fcd009d518d07b53344a5bc4d626b3b38405a114471f75dc70e015" + - "d11e8f6f57d087fa72909785573008b1", - }, - { - key: "1793bfda9c8666f0839b4b983776735a927bdaa3da99b13c9f3d1cc57d4d6b03", - tag: "bc89cfec34ab2f4f2d5308b8c1a5e70a", - in: "a09f661aa125471417d88912f0a4a14115df9a3a19c1de184878291acb0e" + - "89ee1f9d8213f62df442f8969a9a5a7c402fea09bdbe236fb832544e1f93" + - "9cdd4873802b2bb8fc35ba06b7ff96da6dc7efddfeeda84116bc525a7fc5" + - "2d84d2e63cbac00b122dc64f2d15b36595259d81a1d2a09f204c54072751" + - "dd812259df1104bb2d2ee58baee917c5d0aa2649c8a1503114501e6ed6fe" + - "239847d3d88dccd63d5f842426b600079c6bf06e80a2813b2208181163b8" + - "61dca07fa4d88254e84dac1c78c38397a016b5ad55a6b58878f99036db56" + - "89871ab3c321f6ed5895f218f8fd976c348b3f1269fcdf4d38c9492b4721" + - "6c45f499f5705830b33114d721f9731acf6c69fca681b74c2d82c92e145b" + - "7bab77110821d3a12cc818d7595a5c60c4b5e5219376c38a4dd52d435d41" + - "562802ff65ba2bba5c331c333d5adf194d29b2cd9ebb55927bb4ec17681a" + - "3f5574ad34fb4e964f2c756f6dbbb7a6876a21579a515263444de7a30a33" + - "15005458bc137ccfdff18a3892fc9f58f1de10d4de20bbcf860f5f036d8e" + - "8a188f18e5cf7ea3cd260710e7491befcb131d49a28dfb1ef688fd021a1e" + - "e4420d32fbfb03b47f5e85c37d91e49a1b0db85d966eb5434c4197433eb4" + - "9d56f2ff999c9a72230447032dc949202468261b48b6ac212e3f651d6c63" + - "03a06c90bb2d3a755ed91ba73bcdc28e1c5b0936e51e0a9f69c3ebabd3db" + - "add7abab6d8f6a44daeb3126429a01815f57444fb7022a4a510f8b564ae2" + - "dd9779b3a273fef15859a33e233724846c30d89fb78a595b6ff6c834812c" + - "00a991e405806aafd0c26a788895ad00a5e43c5426197aa8247207077548" + - "ee67db4cd6f878431a2e36e952d84b5fb89d681f553198e2c066310ea6ac" + - "3a31f5b1792620616f6c41d486fb844eeacc7fd36971abf416e8d6d50985" + - "c83cc92ea46ac37da8f0026aba30c945d8bb15080d2d95e4081bad626199" + - "3f95f57ed3252822a7caa035ae22a36c35e280cbbc82d729346cacdb1794" + - "ae9a9bb2793fd1d5c47121b135c2836063367339c5151b4e35278e97f62a" + - "fdd2f231d4b47812d083a829ebb9c374ff2ae8479cc4b76d55f9cef3ec6c" + - "4894f53e8caaeb0d8cd072960cedaf758e48e3640590d4f728626e0a08ee" + - "ebf719c96bf8ed4d0c283be09c0ae67b609e22d3b9aa6b03642854909de0" + - "5ed52b39673867bf586a632ab8072de15c637cc212cba8387515c9c9c433" + - "abd7ba6b02abd09da06a34694ad34f88515b65c0c9c247fdf9819fb05a1a" + - "ea4728c1182f8a08a64b7581cd0fb2131265edcb3d4874b009aede0e87ed" + - "463a2e4392aefd55e008eb7ba931788262f56e53193122a3555d4c08133b" + - "66020154b15643fa7f4f5e9f17621d350ede3dc70be02c59e40fea74dbbd" + - "7919d1a8d4e22ef07c916fa65e7d4b89fb11a7c24ddc4ca5f43344c753b6" + - "1331c3fa4558738ba7832b5b2a275bc9b7989b6e6888865793329806cd3b" + - "f0ba57c941d4428623e062f4ac05e7cd79ad5446f8838f2b247b66bddadf" + - "540845a1bb304a04b7edbbff579c8d37e2f6718f8690abd5231822c7e565" + - "69365ce532449a41ae963ec23a2a75e88307dc6b59cbb3fab913e43ed74d" + - "841ca9f6e4ef96dfd9f04e29e89361aece439c0b2e1943b30410a63d495c" + - "522ac3ec1b04ec4cb345f7f86969957ad750e5bd7dbf1d6a22eed02f70b8" + - "1cb5b2b020c0694d7f63044f9de0c3de1ede52009c858992d01ebb92ff19" + - "a9e0fbea18942fbafb77746c8e9e687dd58ccc569e767528bde43b62c7c1" + - "270a5721f1212de2b29a7aae2d6ba6cd173d7fbc78aec4356ce2e8ba9164" + - "d97dec061dd0c3a0e3c520a7611ac99739049dd5825537c70b7ef660046c" + - "1785546cd99aa400da848eb7c3c91247415c8e245d0f14c30d482c5849ae" + - "aaeab2568288229b08267818dae8f76fc674c684c99eb5faf88a0783813d" + - "f7298e0b50cb233f78471e5ca9cc3b04927c26a3871cf253798cc49aa717" + - "d8f18a1ddcbdc26497d188f15f86ec494dcf8f942c3e07e572385c6fa0ef" + - "40c0b625f1737543074a747a369482a0b342a08b3eccac9f9209be31aefe" + - "5a7794974f71ac0bc9a58026397ea3dd4f5e40511d58d2a3b45925c194ef" + - "13987037d736dd48b509d003a86471d5f161e0e5dd168b4f1ce32f703b89" + - "15004d8dfc708a5bb02b2e6fb67424b2cbcb31ddaa0114c4016b0917382d" + - "aad11815ff5b6e37d5af48daa5ef67cee3439283712bc51b5adf2356cb2a" + - "5181b8941fd78945c7c9d61497683e44fee456ad345e12b4258f15945d45" + - "b6ca4369ee792d849112d583fdb39cd4d333ee057355f0abc8d1eea4640c" + - "128cc1617982db0394233dbd416102eec1874081247d2982bbf9fed1b1b3" + - "8f4da923d68c8975c698f189a4d7840fd7aca9dceb7d91c076f85e1c546f" + - "4d5de4f60c91348455aaea30cac134c844dad93d583c139dd52b3be6346c" + - "4d2e6864125c5a2d0aed8f67930e1ebf8700ca88aacc914ea76ff17148f0" + - "777738cc126e75a2c81110faf02fefc47c91edbab7814599000ce55fe20e" + - "f313566e9b62457acf2f22e1141e220bd9d4747417d03e703d4e39282803" + - "386327fc65dd597f723ee28185c78d9195fc70a75706c36287ab9c6e00e8" + - "5cecbbd6043c6af8d30df6cdd8777be0686853b7c8a55a5b1e03e4431d39" + - "1725ff99875a85cae6926998723b36d13ad458220712209bfc5e8d2ca5d4" + - "4ea044d5ba846b4035e7ac7e9885f55d3f85c0c1b3d09fe929a74450f5d2" + - "9c9672e42d3f59be4ca9d864a4322cc454c2578493bd498a51bbe960e657" + - "3e5dd02c4a3a386d4f29e4578a39e9184024cd28d0e86ecac893b8e271bf" + - "ce3f944d130817378c74d471bd20a4086f2429ed66c5c99969fd8da358ff" + - "5c3be72bf356ae49a385aa0a631b588ddb63628fd162673e915cfc4de56e" + - "ae6ff7101df3b33125c9bab95928f6e61c60039b6cc07a66f9c733251447" + - "ef9c1ffefa2158a8ddf89dc08686a4cf9b86ea09914e79842d72a3236afc" + - "98a3afa0a1cac5590ab6a923e35a2ab8db6410a9d33cb84d1c48a054377e" + - "549774b25f50fbb343ecd5db095155cce9fb0c77d09752f62d4bbf16a770" + - "30452a75f6bdf73f7807d8f3a6bae16ad06b22175fee60549c22548de9c1" + - "3df35ef4e7bf7b66491a62b93c2c3fb0c5edc51f60f5704b56af30f1079d" + - "7c385b99f958ef8209e030e381d1ee8d67d3cb84f32e030e8ea2c1d0c77f" + - "d6b242a9f48707557c8682a08e1127f51221a55c733ab1edd00a9c2912cb" + - "36dde85f73b524e1a4f4da6414c5e4c18d9537722b2becc8a91bcc63f2b0" + - "9f32409c53c2beee0de6726dabcd6bf33118a5c23fb9c5c1810476efe658" + - "4bb6109c516b45e16b2f79f96755680374d82b91f2c519639a1815fd485b" + - "a3c00b46fbefeafcf25554ec5a6a5ae2da07c85b8a0f9fcde50263d9ed85" + - "038b2f7aadb9de765655bd201235218bfc74bcad6a9ddf4506167a649afa" + - "df400b85752d68a92b7a97f26b334dd77fce824862046b286a7c8e0adc36" + - "f713a252a673d4d995b268badf4bec8b8eefe85c25b823b6728582d35c4a" + - "60041114dab72b0623b99e2758f6a1e97365279bfba0eb1fc8952ca4f2c6" + - "fbffd9f5fd7dcad1125b18a796981b5ead0b6431141315898ace96f0d38f" + - "865698df8822ca7b65644b6b1f0a0f0d2e5850d4c93ec48ca3eba1b919e2" + - "4413a46d595ffa427715e499db3b7b9ab53c64abec7302bc737a5bd124bc" + - "da756abbca132f7f67e6989e09bfb23b497da31bf156bb9c69ae54588df1" + - "7420e8fe989f0472c8893b2bfe57cdae265a8cc7aeb39624167a567a6fbe" + - "bb1aa30c3dcfd14f2808a070994085e6e1fa79021e77c399f90ab1f995a7" + - "baff672cb693bd39b798b4c890b7d0a57978d6b9bcdc5bf3f4d205f8f24b" + - "2b43d3ae300a96971c9182be297618b9adceebedba1ab0f324b01d23d7e6" + - "35f009db3dbbc643c2d787567594bc639bfd78c4f3e6d948caf06f013423" + - "eb3c764666b58f886d5d28137c053c2a28535efcea400147e92ac6753574" + - "3b47f9cb48852abed1d057647d5b1c6f334eab1a813401fccd3dae332738" + - "776bb223e359f3c459b5c573ba64fa945bdd66c5ac0fcbd53b67032a7b80" + - "25f551e8d1fd2a4291bdb7941cbabe3a09765dc263e2bbb6db7077cc8fe6" + - "790d4bed5e36bd976d1e37dfdba36aafcdaa10c5f3ed51ba973379bcb8fd" + - "203d8b7282abbd271ecf947e54486e8653b7712c9df996a8ad035f41f29c" + - "ab81509f922c67dacb03f25f8f120cb1365ab3c1c286849c2722448ba9bc" + - "ff42a6b8a7a52f2c79b2bfcbdd22ef8a5651c18879a9575dac35f57d8107" + - "d6bece37b15d7dfff480c01f4461ef11f22228792accda4f7936d29d4c56" + - "cbba103b6d3e6db86e39e5f1bb9e9fd955df65b8a6e44a148620f02b5b90" + - "b2be9e5bb526d0ec75b1e723e94da933a356d7ca42d0ce8349699f730b8e" + - "59bac24a6b633759c88041d29399ce60a2ca2261c7eec1acb9a56e0e65bd" + - "e37653ce2cf7eb83a4d019c755bdc5d685b6394ecddb9006823182dd8138" + - "a1bf79a32d07a8e5e8ab221995c714e571b40bb255b79e328ab883542c16" + - "4899fffa16eb3296f310e302512352a864fd809beaab4169113027c6ccca" + - "99a92c6ce35c30f9449a3add70f10db1ed08078e8e6cbaafef630aab7e9f" + - "c8adb09c18e33fe1af3620d1e4d069ac11325e23cc18e5519a1ed249caf8" + - "ddba871c701f1287cc160019766988f63e089bd9bf1af7e6f5b9002e3b6c" + - "264d69a8bac16914ab55c418d3a8e974677cdcbea36c912e90386a839a37" + - "77b878e680c07c7cc99f42a7dd71924babf7fb0627d1f2cc60d9d390d1e1" + - "50d47386be6eefec9ddbb83b28fa7e2fd28cc3867cbe42d13b00545af8a0" + - "48cc07016ec79808b180e0b258c564739185da754f2e", - }, - { - key: "0d41cb4ac25217feb20e86fc2490e8d2ea2e8225c051252a9395cc4f56e1ae5a", - tag: "42df9f9a59d6dc05c98fd9e9577f7176", - in: "01caba7a19cdb09dc0ec6c522c61c628eacf17ef15485aa5710fed723875" + - "2e4e8e93dd4bbc414e4c5620bab596876dfbea33987e568ddabf7814b318" + - "8210a5f8d70041351e4d8410840642a29cc8d901c25fa67cc8f9664ea5e1" + - "9e433eaff7c722d0258ae112b7aca47120aa8af4420d4412a10732551db2" + - "cd3e0af6e5855d5eea61035af15a4d0d898d04033809e995706eba750a7c" + - "ac07aaa0dc71477d3020f778d0347f1a8e37c18540deb9ae967e734c0264" + - "df0e1f52b0b5334805579ea744c8784c3ae0c3ff8217cd3f53cb747f6996" + - "f3d2147699799e649061b205f97f7992e147fb20f21ff862c6c512e95534" + - "f03075e8e52f162e0d70d7a259e3618474427f400f44f75198edebae6e40" + - "a2173257d114e1bb5a13cf419c821eb124d90e89a938d91f4d2e70dfd1ab" + - "60446f1b602614930a329e98a0c30f107d342281db25b8f8259933e14d20" + - "8bbd991e42969e8b0600272f9bd408483cddfc4cb8dfe7bc19be1989c7fa" + - "129d38e1078d094b82e0a845040ddd69f220dc4aa2b236c44101d7da7779" + - "9827a7b037561b51e50fa033a045571c7267af93b96192df3bf6180c9a30" + - "7e8c8f2b1d6b9391767369625015da02730ad6070df4595eb8099bd8e484" + - "59214310cb62c3a91a4fa8ac3b3d7b2017d4254fb465f0a248e1bf45819b" + - "4f0360f37c9a79d405e2bb72e5c25a1b4df192cfd524d61e1e8b274f2fe0" + - "634c73f0653c7c9e9062c9d081f22a8b0327897eed7c6e870f2815bbac8f" + - "585c1bd868759a98dcb5c3db2f6c53244b9cc494a56f28a9ba673167cea8" + - "b799f37049ee7b0772972b3a6603f0b80eddb58ef03f916106814d72f000" + - "250b3573c97c5c105910d79b2f85ad9d56002a76a1f43d9d1c244ef56d3e" + - "032a9bab95fe3bd5dd830ad7d7e341f28b58c0440658f7fc2ca98f157708" + - "1c647e91432cb0739d9acdbf973ceb9b0047634d695279e8837b04dc5357" + - "f013fde3c55c9c53bf1d817ec59a1b18ed0ac0081ed9bbb3bcd1a5d3634f" + - "50f7506f79dc6a4ebfa640bf65682fe9aeca68088e276937669250064de1" + - "c19ad6d5c697f862114d0f81d2cc52be831ed20d3aab1e41fe6f476b5392" + - "af4799392464c51394c2d1a8325ee2e84f1635d295ee663490e538eb338c" + - "7126a8e731ad5c0becf144c7a9cae5c6493350b589385de29e1a0ad6716c" + - "346ec4f0a31ca5ea35c59ab6b099f65d7f0b3d00925a1da1b5777c029aea" + - "9679e895d7100645dc83f81d82a6174beab2357f7888ea640900cf3ee67a" + - "e0724a123919d78e70e05288f67e5e69ffa6f345be8a96e58bbe260184b5" + - "ec5c0c1354cfd516ebdb8d420029137d41b029641959cc07fa7b4e16b39d" + - "17f36b2367057410a42e0550e9ec1dcd2df4604d52d4f9dd1140d57af08d" + - "50e1527dad793b6d649324de799754f755818bf10e6d1ab614958dbb24ac" + - "8e2c01270a90ec3df4379c3f509b5ef721b0fd4f91a1bdb8127ae4dc74d0" + - "75f6cd8bb28319d6f8e8d8ff64fb4a42d646e9365156c6bc72cc46e9cd1c" + - "f9e735549e3df9a8e6b5fe541948b126190117db71fd1d61ad84be0f725f" + - "20b99eb141b240326d399976c4f2ce5823d94649a9580e1e8820bf49184d" + - "fc34378a60bea89b12aca69cb996c17847b7fb517cf2d51f16d78e3875ce" + - "aa33be15f6a154004f0e1134c6652c815c705efc34bcf35bd7743d28f0a2" + - "77d82dea4709dab41fbfb4e0cbc118c17aa00808872f0edc6437c357cd31" + - "74a02aee61890464e03e9458853189431bf5df6a0ad5d69951e24be7f266" + - "5bb3c904aa03f799fe7edc7bc6779d621cab7e520b5994f81505d0f01e55" + - "96e14b4c1efdf3e8aadee866c5337c1e50066b3acc039c84567b29b7d957" + - "683cadfb04fb35402acaba631e46ca83dbdd8adf28e377ec147e4d555a21" + - "e6d779d7c5a3078ab72702234d36ca65f68bd01221c9411f68f32e16ef04" + - "99a20c2d945fa31b79d9965853d38ada9d48eead9084d868c6bad974b0f4" + - "0956aa0fcbce6dac905858e46c4b62c0ee576b8db7d484a524e951f4c179" + - "decfc7d6f619e86dee808f246dd71c7e0b51d28bc958110d122fa2717148" + - "77823242711632f6e1c7c15248655ced8e451a107707cec8c84929beece4" + - "efe5503d3c1763d0ab7f139f043e26027d5e52a00d5414dd98a324a8fc2a" + - "06a1345cbde747f41099c3377b86bbdc5a17c8f6e5b773a761f78573832e" + - "4359b143810361dedc79142fffc49ddc0b32f225d50d360ceec3920fb0ba" + - "0693b644ee07fbd1ce829e223a02794b197614061c4bfa46112d105c2b7b" + - "4efea448501d146dece44f6640d674d5749db498b32969de6e165e705a18" + - "2aa1f3d8e16892b0120337640d52c9bee35e5b4b17f03eaeb31205c8ecbe" + - "1ae1b110023016e40ee87370a65c5c20bfb00f100d3c6c1de6e4a1c90162" + - "f25bddbf300ed637330206788a4ff96903f971c9618493ad074412af625c" + - "ff9e0f8f183bbd5e96c1f28307e6cae8b50cc0eb1a3a8154e44e9de947af" + - "002e4d1098d6b0ee3f2e71a10d03eb444729c42461283f37be8af2ce81ba" + - "bac246a05c2c94efacc43f0cf9ff3df38ab6fc1648c796ae7026ea95752e" + - "b70873a6da59da10d8b5316126431c4a17289466e95dc739c061d7a4b13a" + - "450809479eef421bddcdade77a6df133410328c754af8999a09b1a5c056b" + - "ecbb6fc2c339586ab92100f46d2fa1fa689994b36aa70703d76bf7738adc" + - "f0589fdfa6bd215339ad69ed983f62efce0add5a63fe7dfe4bfa006ff16e" + - "0cc06d39199ad60adcae12b75ca98d764502a783373da3a41281e03c2037" + - "e1b3ca7f7eb60e2b67427e97ec72d36670db7662c6daa505701fd279f116" + - "ac0ef569471f204e1531c25a4ac3ce19b6f68a8994b6f89b5abf034a6507" + - "32c7fad4206eb4eaa7cd9a710d866bf3c3f13c16faa268ae0cf4f69be909" + - "bb9b79aab80dd25101d4cc813a48d3f38d870f10ac0b6768005aa0e69e87" + - "dfc0424deef06414c9ba6f498c93c41c692a7a6221fb5595b390a32c70e0" + - "2cd64471c797ee8a143725849c1e054ee2043dcfc0b4cb1c00be21a14be9" + - "2d9a07f1b4e975d4c86b8a5c1387e6c42bf393e078fe86d24612d497e14b" + - "874485a3cc922b5b6d91295d7b79ab8bfa1c7f64b51e761d19bb9da82a5a" + - "a34aa469699036b6b2c55e2b84f84942f10585027ab07e2e0e562e0fc3dd" + - "36047850ded84be4416e22aa41c7a2f7d4a4d8e3dd420d746a1d8d56d87e" + - "5133a1b4380bd9a89500fd6d7e68a1ec02eb9e79e4a13edfdde1273466e4" + - "6b0e6a75f59ff6175716629da52463ad21de27f40fa2e25a566eec4b2696" + - "4af3a717dfb0170a73144c0bd9b00bed67ad8c0a146eb5a055812d071209" + - "c9d530cd4f50a41488c2238898dea8bb36b0f1496d3ea8c4ff8e263b367f" + - "64977679e697d88e5295bd97ac16a0420850d1ead9621e25a3f58925c266" + - "ef5246488b1c15a8fe0d8ec4291864faa5a67b2388b7786f47b6d27e8fe8" + - "46f85f85163e54155ef95cea4901e712a44404a4d3f27f28dd961ce36b84" + - "f3856770f07f20a2ebd34d77405beab04ddfc09770167d7d6340f494dc6b" + - "7e4c3df896bd974730193b1e862b58d4a5938e6e4ae8897dba8812924379" + - "e54f51a71364d39f76e24fdf2c6c704479ce85b456558ca6947b8fd76f03" + - "78273f0a7bcd1d860ef1defe4eea8fdb81c73eda028d82fdcb2248582ac4" + - "59eb7698a811e6c5823be886410f6b8577ff2e8252343b6ea890016ae846" + - "01c5894cfb988121059fd9c8fbc1596da470a149404fc67baa15383d38cb" + - "d17ac107b4ff3c1ca4c76b7930de02b240e7547d39f4978e0cc1fa37f8c1" + - "012b677f07bb4df4486196e9b0beb823a3827585475b878e3f6f0a2d3836" + - "2c7d34f9f3c91ed46c39cec95c2a0b6f0279a03a00ed5035b0725c393849" + - "cdb1ed3c0ecbcf3c2ce108017f468e1c3d469c03e8231d4195344ced70cf" + - "daa667252cc1554dce8d0c54eb4cf4da62367d77d7dcc02f81e788ce9f8d" + - "d306ba1b48192359cfe92bdbea9980f87ea0677d7d2082205a436cf514e6" + - "fde5eadd21b13dc836ce33b5dfb6118bcac79ae00fbb16d61f00a923b145" + - "f9caa9f3a2c7f0104f8b052e390987e57c8dc80cd5f0358afb0111af1fc4" + - "e31f92bd832ad35fd2e0bdf768272de52ce0b152f74d43a8973ad516b3ea" + - "f5937ec8a236ebc86adeba610de0cf7168453111f3c983b64df07678cae0" + - "a75466ae15adfb127328e716448cdbd2c1b73424cc29d93df11a765441e0" + - "0eeed72228e1099bd20569d9d0e9e5a0b3c11d0002e2896631186483db61" + - "c1a0cb407951f9b1ea6d3ebc79b37afb5a7037e957985e4955979b91fb85" + - "61ca7d5e8b9cdd5b7ce0130a880d9241027b011fea7696b0c695d4949ca2" + - "d0cf22d44b9fee073ecaef66d4981e172e03ea71a6edc7144393bfea5071" + - "2afac137f091bae2f5700bfb073a6d57fddcba674a899d7349044a10aadb" + - "2e7f547887dd2f765f394de5dc9ef5dbf1eab4d869be8cb68aad8e2614ac" + - "37bbf21ccd5a832ee09fdd07ce50a580a2af36256b1046e646fe3dff6d20" + - "0c5110f1ad1311bc39b8114cd11ecdb87f94df43d4f6468932fc0ed892d0" + - "3d8f3db3f8323ebb29776ab7d260493a36700bcda668abd62126a8189e91" + - "df2d2970ef688d4e8172fc942e69ba63941a36b79ac546fff38f5f7d1176" + - "57612a662ea38134e1090c3e903c9adacdeefd3ac2a0467e9f5125058c19" + - "7b2260d2afad2b0e627a9ae52cd579ee27168065658089e1b83a2d8cdb47" + - "e08966e4ec0018e78c4d267f9575b8fea2a42de5c2d25356fe4b8c9cb1ac" + - "daf0d1af4bf58b9704cd4bc08471e3b9a0e45a5693433ede2eb1374bce44" + - "1f1811cdc7612d7bb61f4f34aea0a44757bbcc12a55c1ba41a7901eb004e" + - "689587a38e5b4df4574ddcc7b2eda97f6e480d7d39f45247ea3b03c90a93" + - "0dd168b65d52a59ce9c2cb4e860cc6aaa0ee02a58d0c8ba990194bce80fe" + - "8c34ba5693fb0943ec2cbfc919e534cc47c04f502b6c217c2f860d1d482a" + - "a016aa02adfc2bea3171fc4e27e2a262fd37b824099aa227fccca508f778" + - "b8c6ec7aaff1d15f6497753f439daa9e52060fd6e9e056e6843d770fb057" + - "6d9e2e782db4843c0c2c7f408a17376719a3c5cf9fa08f04f8a779885a16" + - "5cf93ce404be", - }, - { - key: "ddbd5d6c5ebd61fa72b453dd849dc302c98a0f3e300f4768bf1dc698a3827dd2", - tag: "af608b71a353e63c64911558baa122f3", - in: "c67e2524b0de16483158a0232078fadcf611e4fbdb9e642e397b21222423" + - "cc2ed42ed34ffcb178448919ee337eff9d7d691f622e70fd3317cfd271df" + - "fe6a9d9b7e07db0d20813e2331164a654386db2ab06ae2983bf2460eaaa6" + - "3aa0171fb87afb82e85b40d95c8993b2039d32e9d38473dd13f41fb1ff1e" + - "261752ab004b221a4472b9b1a0e139f0c999f826a26a7e7df362b0611aac" + - "fa83c55cca2f7c0138d2c30313c2f6eb357278328ea6ebd6a5077947e18a" + - "a97c34b9dde3b6f2de4b83778ffcebc8c9cb58756691d5e2a3d15a759a2e" + - "5050b6da937a6f5551aec069a08027d60dd870d175d2a5b5f0b4f3143904" + - "7445c368a5c866370e9426abbc1a1c5a272b96731c4128aedeee93e8e00b" + - "b450601a6d31ea279b9450e738b4a47c0dc22d2d8ed5d44257f6318e0c59" + - "b951fb6b57746062ab95cd73c23ef0a5c000a7d14c18bfff172e59b6f6de" + - "aa61b81009e803eb05e24fb0b706870e18889a9180ac16a042d12dfff9d9" + - "1b88130f045d2342fd5ddc5f443681c31090459f262d1a65654c55251fc7" + - "d5a67bd2e62940ccd606f3e50700e4d1e992a3fdf0388b9ce3df9de6dda1" + - "5c1cd6b70622ac062dcb7ed7058872c00ff3df94032853927126cf6fa4cd" + - "c468d91c9b52dcbc272fd7ba920dcd3ea1e048af9c3286dba74d988ce9ce" + - "77174e25a87935352721dc23b60a9549322fadbe6a00dd1197dfa25b33fd" + - "9e5713afcfd0fae6dbcf27147fa58d995580d7e0a903c895752fe9819f5b" + - "b002ed752719552d0f3575312f2e618173a8ae7c147ca64a709053e5d2e1" + - "2f4d1ea337afa9ac4f9ba62760046ec1e48f4ed8f6df66786c9fd9f5bc7f" + - "9ca2526e1327b042f4657c405757690e190c91f260dee2dd3d2e6616b721" + - "e489c7c3cb828478a3d953b88f09904e7927cdf6dbd6a5419eeeb83c0be2" + - "51934a80dfe61e09442f0761aa2d013e10aeec3a32df204571ce8984a430" + - "9bbe30ccc91977790bf0305d2651ee450b749c3e7761534e45970e70a0a8" + - "473cadbc88f096970c275f188c9d2644e237fd50c2e24c1eabbf7578e80e" + - "6500762ac513fcd68cf6f8bb7a9d9eedadca059d9ecec07fe6fe7792b468" + - "9311861728dd482f087c28374cf9c5ea20b2c8630029e8485fa6fe518c74" + - "ef77d44eb7526ca764e50b5f34ed0f253a91fb2af6e59338e2af6e041e01" + - "084e1efade1aebb7d1b698ccdb8b4248ac89cd40d9517d840960c08f5e86" + - "88d8ba2b54889c1870d315498b70e0e9720f2c8c53a3377a8c0bd2d6a1c6" + - "f17c6ff847eb14def6855dc3886b99039e528b421ccbf6064e39263f8f3d" + - "340d5d20b1b14c264ac2310b5f3a0c6f0c1006d0d4f1a69af68d28ab447f" + - "cd17387e1fc98f164982a6d05dd32d6b4f0f1b04e40c6c6e0fb4467dd6b1" + - "0c5a9c92cc8c2bc97ef669b6d55cdd0aa8a15c46af954359165949012713" + - "4ea9f74181d54a300d3172c9f01db73288ef6a709c763a4891666d0baf88" + - "8531dcc77f0911412d096aef9033fa36b5c1ed283b8b5c109e45b5cde911" + - "6f3da2533fa0ab81929bd5783271d5501a9e4fce2aff9eb5a70a4215b253" + - "46885d7e4225fe34bb55b309a114a312693d60ccc61267359a8c2dd28141" + - "226e7cfd99f0f12c69df57d75dd790dbabfe3145f7fd1a24fa58e03bc2e2" + - "6ea19288af4929e5acc517d8f52a074745ff4644d94179eae6ba7d267292" + - "bbd2053167a0da9be5e4b6cd0a4200fcac5182d9957dffbefa857e662b82" + - "fc3a7cc32506e78030ed5c5d448d7f1b4fd854a735a0c50016bb85e6e716" + - "0f87527bca0de235f4b7dacb75be84919c15a5b8cf6bec035795cb67061b" + - "7855c2134c1b1bfa6affe04b7db239f73af6ea9c02bc9f7972b7f6400b6b" + - "838f4653aefc42179c21765e3ca7a5e96b4402ff544d4bc2332756a23500" + - "11241dc42ec6848afe127c00b9c333e69bb5a54ea5c7193e59ea22bd6d32" + - "af4f56b1bd2d5982ef7d9c1b02d7668525e4e81b68a400f7afc2653f0f41" + - "a03e11c7a02bd094830093481afbab96397245b9f37a568ea1c4ae248cdf" + - "afc87f88b1fb5dc300d8e9039af4e6e701b458ed3f32d693f2e869b76bb5" + - "1358cbbe5b5089013bf452734388a176cccfc1ae9b7cff603631ca48e129" + - "b5c9573d4e379547272cce8aeeeb407d3fc57f782a0eb5fcbd41e6fb13be" + - "7e4f1067cd407b42a6121b2969c384916ba2b32563e659f52aae09c8ce2e" + - "3c500fbb7e58be74cc1592dcfacd9f0d4cea1a90a18658147c81cccf6fb3" + - "078ed27f369e7646f551386a74e1b07074d93e0c1f298c761af46cdaae9f" + - "f4be86808b66d0e228016d27a3a77c843365cb847fddccb0bbcfb3b9008a" + - "1bacac59ffb0aa759a0568c72c556caf0ac1091431b574687c5fc7bd486e" + - "963e0fc3bdc828d988734a21070747c955cf8dba2df1c3a0ba8146cd58b5" + - "91b6d54712db67a9851b1607c8445bc97406eeb7488f5f85e547850d619c" + - "407f97632ca1801f52c09c2b314b4ab0f8e7fb5851fd60852f4666913ca6" + - "bc840c1ec8f8f06caefdbfbf02ce00f20b87b14ba9e651c80f40a31d0306" + - "403f541776075fbf23733a6b19e3b44d04b455b29ef8effa70cce0c59331" + - "7119abc07aa8c8d0246a760b0b36a3d87b244e83bae8a745b8277a531298" + - "f5d0283498a509c89898ddf0f7a7455be1f8a6889c46d323f1dd18c3babe" + - "1751a05f871f0639f50967afa46c19cb93d9c2a79c81e2436a7a62f225bc" + - "37c90698640f5b43673e1dc276de05ff1e29acdb4ace5121659db5f23c49" + - "57aae22f53e6f2cc935824fbd07c2ac87672eeeab895c3f06e09e178560e" + - "2fcfa7097f10201dfb8b1ebac08ca806c1b3ba3aff9284846a1a3beada53" + - "e9f7ade12eb89b5591f462b2543bb4090e081fee9fb53bbf821dc92d6b16" + - "fe820ab2ee4b1f6c0b6a6f19edb0bf6479e257fc73bcd60dc2261d0a4752" + - "e23a0be18abf355f3065177d8c3c14e21edc178d0abd1b39f703e6335131" + - "ec90cba3d9846cee7354a06c320a3f61b8a269abc7138831614f57ca6c19" + - "a4a621142889cd924bf4ffb82b57f871b854f3157e8874c22d43a5726900" + - "bafbb8f2260a1eba3a462e23d4def2ccf68ebaae8e52739a1ce67c039eaf" + - "9a6c3232fbb5a91d1e59a8dcd3798ba71345fbf83d09b83b41cc49d5ff5f" + - "2e809d2b1d5fbc1e7001ea76b9b2d8f896eb6609e2e1c5c562d2a6e74960" + - "2d67a0f6b43a201d5087509b8dc7b0440144e308c18ff8b96b607de2f20c" + - "6ee99bb05367a8b25947011889f724965a2b5c52c9db1e0622df9343c548" + - "d054699badeb15fc41055af0d79a2bfc1a5b4574634fa0dd9dd10a6213ed" + - "b6991187dc560facdc27440456a0a209fd7f5ee4fb350ae71f869723e5eb" + - "5338e3d1448bc993afca6957f4cc7b047a2c7c9593b7234725e66cc0eb23" + - "3824eb4cb905701cc522ec210950b871397c6c0bb3d0b839f2eb1a120f70" + - "36107246df4dfb2c24891bef0bd1dc131f2c9d7c295ee967e3184d963037" + - "fcc9e0b8c7011c8e04b4e70038150d34caab4f8c0230418cd2d8a91146e4" + - "4e11cf6707452ddc03d9b4e6380658135dfb48f62c0690ebad75167f4dd1" + - "c0df3ed555b5081a7b82616d9e501757c83c2193d0f640236d59f9c97a4a" + - "5c8bf532aea2cf5964ed2dbd8a70c01ca5c7677224cf2a37f3b24d8fe4ba" + - "91cd3b5033715de227de51deed15afb8eda9d2b9615d197b8f98322d7096" + - "79c5131eed48050fbe0145a9284e236605c25a4876e2adba42f4e35a8949" + - "3d59bbf44b3338d9d2e65a7d7ec6c863cd47cae9e23181b07298078a5e9b" + - "06a5c7e1059f474eb1a4247e8f02cdd4efdca67d22035b12abecf9b15982" + - "de4932a28e797bc4de38442cff2cba263eeddba0ab14fc706dbca04eaca1" + - "b4cc13000a10e35b32461424809b299798e4d8e66c92aa3181c5df16ab65" + - "9611cb625e895a8021af8c60960227d6f2ebeacb17b13536a5ff139734ef" + - "37cb67018ef9a410b856e6f6eddbe3f59b088d538c50a8f3f0912d06e47b" + - "88d773069aa759cc614e1f53cf6e572c127123d1ab56b79ee753a921cb22" + - "a60e4e6cae768c9966de4e2625484f2e990154da7fca84b6e6c0b59201e7" + - "fb8a729cb20b4c774381e84f1bd6e304543d952dc76ef741b72f3a4ca7a6" + - "ea7958b8b6337994ed82dcf988eb70f509610b9a279ab4d0f28cc2b2dd99" + - "3b8637a6be0cb4b5f67c79654c6b15e1b61120374ba9b974a628c547f11e" + - "52d72d39f8f9c5dbfc23a89f22d38984dd8d5c3ca72cd54e6adfe2b3d163" + - "86afdb50967846a4c311351a51e5fd322757bdb061d44c8796a61fa4db36" + - "793bc11984eac83bbcefb40d0bc7bab0ca81e7df3a7f58c6fe800396716d" + - "832acaddff6d72c8e19dc9ea838294ead800deadb6bc18d3e399fa76c46c" + - "5d88ee72a86a87399423b0578eb6e27d78156ea2abf6f08b5cbf747f2f74" + - "5301b694bfba84bfe3c5527acd50660eea5105a2644c1aa92f954a604fb6" + - "a1b3b2d0331497deafc3aaadc7040b9188a36cf607ee85a0655ae963fd32" + - "91dd58f8bb50b4e46dcf7c2957639bffa6b12d895660dc0323b7a092f999" + - "813380b820e1873c60d3e3038129c66d507862100a5d5842150869e7873d" + - "6bb6ad022350ffa3813aca26c80ccae72692bed9c77c9d4da23178c57153" + - "90b5f4505240a796ec9d10a7f280bd60a570b1b693453807707651fc0464" + - "03e4768965a6f42f112152942134f0a38c84137c7a6e086ef1ab9ad20d24" + - "3b93356b305c0996ab7d02c02c44cbaf8f7e60b8c0b8c9fece3f189b099d" + - "dbd126b7357c1c4ea1c8bc1ad93db91ea9bf043a4320acb60b502bec37b8" + - "6b2a5004b8225e549e613c6f83b97b7e4aeda1b013e0a442d7ce2f14e78e" + - "a94bab700c9ac0abba945e28f39fdadff223c4498cb204f01ddfcb450a41" + - "f32ae47f99a49114c6646a5cb103e9cd75f9d81dba417e48c4053e3b0295" + - "2267cd30589b0f5d993a5485a6ead1ffab9f2f4294c5853ba76383a326a6" + - "a42fb8b78948aa49f0f1f614bd0a3fbd2a58a3197daf2094605bd838285a" + - "1260f1265dca74aadd95652632335fd17cafcb73b202c3f0e5da836c2dcf" + - "2934f005935dca80154af43fa34c8ba440d1581b74ff17dfaca369dc9aa6" + - "734c03916d78e1b952691cef918fe033d33f7f4323cf724ffb8cd6c219bd" + - "046e9f268eb0601098e93daa59dde370e46269dd7c54891f71bee2829a53" + - "df86a2c7fb1046cd7c98fa21cd83597be554997a70acebe0b6e60f1f7098" + - "6f65adcae24385cb7102bdd3e01300ffd15d00f9764b3a5c51e35e5c9cdd" + - "da84f4b656fe514ec4ff8dcd774373f8a9103cf36abefe875f7084b9bbd9" + - "42e0c997ec2d860a4b622ff1a39a628582fd81f237d3d8f6843d26ac77cf" + - "bd48003e8e8c591ff813a9a897e3149ff0297ff476299d717e54d885cdd4" + - "4c3ba6ebf54bc7a1", - }, - { - key: "b15578da1020f662ada0ad4f33a180d9f8ad4991b3720bc42a22b52625c7414a", - tag: "b0e4ad4a010afd6dd41ed82868cda555", - in: "6d2afb7a9154064341bdbb533f11990d4987e7c90fbfc0167c1e58d6efff" + - "6010f7ed569dac62ad37183b0d384519ebed0bf9c6e05a070b4858e6b846" + - "547ab5e45619c866f83cce83dcdab6a8a6c36b115ac832de1c6d433b94fa" + - "35803fa1a36f1ee114f8632402a027a74ac110394f32ec4006beb0057f09" + - "a94dada8bd0d1ca9a14b1f2efb8f526d79d6438bbbaac0ca1a43935627e5" + - "d129d52c06bf6413af07513bc579447eccc3a9406645c94dae59dab98d6a" + - "f92fa90fd4efaaa4bec466806ed401d2083cda587139ad7e9ee2adbb1dfe" + - "a88b59dd788b954a0f52c3854a3fffecb4bea83debbb2f5f8883e6415d3b" + - "ac1b872df1afe185468adc59364c173082f1dd6da9d348f5f5ba2d216243" + - "23de1f623eeec875bf31d12acec40dc0c1b9562826f3105cdad4c43cf45d" + - "829aa8b14012c47847aef7a2a6e3935fd972235f5d3a7ce4ad3582785393" + - "602e2e27329914021eff38ed2926c88acec1551f17a1b818fc1c3ed4b3b6" + - "6825d55bea269d710123b52e12ca9520a069d9c6a21df3a0253b3a4a6a8c" + - "dc226d667541548834da6bdbbdc165f39e40047d4b647c507d981be17b3a" + - "836063436241a8bb46b11a2867b621413c42d838e4578b72cc1982e34bde" + - "c303b5575ef4b8dd9fea8ed5bf69539413909d03461d3853b5fbf714a61c" + - "769569f42b38fac4b849104e2f2ac1dad0e388646278789f83e0b0511571" + - "019d3bfc5b03ca4cb5564e4e75e103ea1b6000be6588e27105d7cdc2d2f1" + - "f680ad34ef823ac4bd4068146e9997834665aec7dcc7a82ff28d85d52dd6" + - "9c18dd35f326bcf709f74df5981bb90ca8e765fef9f0698a19e12220b287" + - "24a6d9e4f4c7ce93f8ca9a126689ad1df820072557ce3db246cdf41599dd" + - "44ca841bece6c7869358005536e1189aa86b764e890ef90970d6e3831def" + - "fa890bf8692381123924e7d9df804fd770a0a30ee97d5dcdca302833efe8" + - "1d4b2505b17382f0b3429b38c41269ac95e36e9f5a1dbc6e6c8963741917" + - "02a23198decb4efe6809fcbeb5d0c9098a4c300155dc841610e55c8a6e27" + - "2a38a39de3d8ebf38a750af25836ffb1bb7822bb98886280f0cab6838c01" + - "cec57961bdc2e1bf158248309ff9294adcb962252b1c24646d132a3be2c9" + - "1ff82e8e101facbdb807826cc9d1840a90874ba08692e808c336c9d280ee" + - "f36a43a75c746fb864f85711e802546ab5cc3f8f117904ba1a85d6e4b729" + - "85122c5041891e16d55b93d6fc1b7fcfdc80ed3d72d55d64b8895bbf2f8e" + - "d188684e7e89afdc1e6a7ab9bd1d3da95d68698df2cdcbb2e1a4ae70e2fd" + - "dd4760f9e5cf4255eeb1e9e8009ab507395bacb8b2177e7c5757ad02baa9" + - "a96db967d20a150d2dd7f3081d90675fe0c82f94aa3cfdf6ac5585583901" + - "7a8e122170cc817f327a3c8ef44acd6e4fa81b73bcd0bcb5792eed470481" + - "152e87f7a20c3f7c69d5a8199bf9bb7c7269b450dc37a9b22102acaa8438" + - "134d6d733d231cee9522f7d02fbb37b5818ad3ca72df4752230ee11392ef" + - "8f8219be55202bc3d476f5a9078b32fb63d42bed4cda5ef90cc62467bf5e" + - "418ecd9d5d0cf1a33eb9a930e652ce96057fef40b65588aac67621d651a0" + - "9003dbc3925912e385296cd3b2b386a44113308ddf2af52ca390487eb20c" + - "716b76d78ad45129e7c285d918de7107ea8c3b0cfd9e73933b87c0b2b505" + - "cb4c95794f2ee6d6d43e2e76026923a0bbfbc3bb22df9ad729452283ce62" + - "dc9b26684fd45e07650581afd73713a708869a069c58b599ab478974f206" + - "dbd3e4e563e346ff1881723c5fd440bdf9f70f761c6f746113397d7c04b6" + - "b341d7e44de7de0aae79badaaef5ed372ef629dffd52926110683ab2d4da" + - "a4be83eb86c8700703a660edd5a5029f66f1581da96fe1feefc970ab4086" + - "a83ae02e959821967bd27b3b629652f5bc3db2b7f1af674f9f3fb3a788f7" + - "88e6dc1722382971831a7ed72502f85b25888c1534d81c0a4f7351ecc40f" + - "4e0412e05718403fae5746d313a78c80ac297f1391ad389070410e1330a1" + - "b07d683d1c795bda74bde947f2cf0dc9638b5d0851cda27df030403816dd" + - "3b70f042888c9c192656cc4b9fea10b81b5347900d9199c8f0f47d42f2ee" + - "482b68acfa5ff47d9950c950a926a497d94c6a796e0b715416520bd6c59f" + - "30217718d5f1d7bf7c24039f6467214ac8783cf011b25c37c67dfddde426" + - "40afe97f94879f4586954737b86701b32d560f08caec3fc45184bc719c7c" + - "5bf699074fde814acae32c189158c737665a8f94637068322f0c23ff8860" + - "f1b1c1bd766440afee290aa6f7150c7adefa6d72a738cd2268da7c94788e" + - "bb39002e9a328a51f3a92dc5c7cd9e4faed5702d3592ad16217c4978f84e" + - "af0fd2c9e4c6f4dcdd9112c781eb41a9aacb0f7935bb5c92d41e67cfff6b" + - "991ccefbd667ffeded1de325da50c33e28e2eef2f636c9726dc5bfe753ee" + - "c7bb6e1f080c89451f81bc8c29dc9067ce83deed02769714fa9bb477aca5" + - "c09089934674a0cc8e4b2c3136b2e4af8040cc601b90a4dec898dc922ca4" + - "976ab5ae4ac5af93fa5b1854a76ac3bcc2090bdeaa49ec4f319cf7c7b674" + - "6d8e617abb3361b28b27983dd1b139ec4f5af7e116439d7ecb16534817bf" + - "264dbd8f59e80b443be12c17fa013c7f4d029504c9bb62b296c2326f4f49" + - "cc3201b70ac3f62abb683c630179594a6d4cf30fd55b163bf8d01986bb6b" + - "cb7050fd527f095c45661920268e56f760fee80a29c9d37b7fc23f608710" + - "1e723038e64ee1b91c4849d69bd95fc9bc24fc4a234f4855f2a203e3f699" + - "c32698585c83781677739f2c48697c93b3388dcc64aa61f01118495ded33" + - "21ef9a1c949481f96005f8d5b277a7d6a0d906ec304cf4292df172e72d20" + - "29ecdeb65f06267a605f376804bf7bc5b82d5c8facfe7e41dc10806d27e0" + - "bcc5a341d80b3c1532407f75088716d732632cd88b0037f0d829bf385fec" + - "b52a202956489f61f16b0f4781bf59068b33d7330571d0b4a6ed91830258" + - "e1220b308784fa155be9bc821f5c0009a33802fa66dd66d1dde997dddd97" + - "873ddf65927dc1be979af2b5f110eee627dc1e210326ac20544a757ac168" + - "1823f3dd04b1ddc4bf96677a0a87633994e7af2ec99b7d5dfe44c6192be6" + - "a6e69d17b074256da3947808fbf68c7506a7e2c99e6b64d1ffadbd6285d8" + - "e7e032e24d42dde0594bf03fd550be05e5d66c91a660cd1ab7cb1f43fa9d" + - "69885203a7aee35a28f117427d7ac02b742f53d13b818f8631081b1730d1" + - "5b4e1e283cc8e5c4fc3b4652fce05fd8db821f99fcf93e6842816a549791" + - "7f6c49cc53d733788b2fe3c687de58bfe6153c70d99380df1fd566a7c758" + - "8052c62e73340d6a9eccd2ed26b763d518f3a0c4d6362212fbecebb4ffb7" + - "dc94d29944fcc4ab37725b105aa7571f364146782356d8ef056a0be93a55" + - "0c890df8fecc178776fe40703ad1bd2443d92c420be4306d99686592c030" + - "fd3e2230c0b48d8db79002e8a832ef27edb53a45532955f1171203d38414" + - "b4692e901e9f40f918528fc494430f86cf967452f456b01846ac6a383fc0" + - "de2243c7d804e8643aabcb78e2653b145f400a999670217c8da43bbb9c11" + - "e074176424be0c116c304a420120138e901eca4b12ce68fec460b23bc0c7" + - "765a74fc66cbda0e503e7b1baf5883744e468c97c5f1c4b0acc4b87de9f1" + - "4b537405dfb28195439d1ff848d9cd28a8d375038ebb540a9075b7b5074b" + - "ebc18418a370f1d3ac5d68f5d239513002ad11bfc2b7ff53e2e41ccffc4b" + - "0503acc4967c93ae8590a43439b5e7987d10cb8d1957bd9ef717ee3d12df" + - "5d6736c1d8bd8da102337a94b7d14f830f6c403cbaf7925a8a2a7af1311c" + - "57224967a38f6ca374013a9819c55fd2e2a5fac4f2490be5b059f4cd9c60" + - "2d62f80789eb8d9ab893c7f44a4945e41886af218179dfa754bbb59aab68" + - "13b71d2202eb8fc8a425625d21176a28a620e21bb0dad820c0b7051ce8d1" + - "3a33f3af0958bb6cd89f9d6414ab00ddd1d2f9fdece9183d0c05fcdfd117" + - "10d250e4b2029e6992a88293d0457e73e5b1b6a1aae182c69b9cb664992f" + - "073595ef68117026ad7ea579a4043cda318931eee7b2946a34cdc7c9755f" + - "80cc79a2bfe3ed9c79dc52faa5126b824868c965eeb37e9e4e6a49600f3a" + - "cce93c0853b546edb310dcd16a5755f15b1098b2f59dbd2d90e2ea8360ba" + - "f12108236e854465456598ae2f7bc380f008f2e3cd7c98c87643cafd7c36" + - "d40e2597236428d46aa5b260f84b4212d5e26804086adcf00363ce4becb4" + - "9b57eb2847b2f18ec82c99714ad4ddfe4ff3bcac1d0fcaa32660a1dccc68" + - "5bed83254c8e2ea0ae3632a70cfbcbeadef922d78a006d43ac7ab1f8a609" + - "c6e0ebc3ca6bb8430f1a562f41010db74b9febf931ca794fa08d1bc17780" + - "532ae76f25c4ee679d788835dfa4e70ca154c9e2865c3750ffe7b837eed1" + - "972be058fdf2bdb3eb301867bb132306c7aa237f6771d60bbc56cf31cb30" + - "32a87204d454542de747418470025ab84935d3eaaca01dbbdae9ef6b5d3a" + - "ca62ce9f871a3e1272b2b671582c096a349c00f32d742ddb17993994d8ae" + - "fc178cbcf9abc03114ff2bf7db8f757c63d6898faccd822f5c2e9a7570fb" + - "9cfff148570888be24ae42644c1a5bebb6f6287147a4bcc01c7675be9e4a" + - "897519dd3132a7cc2e778f8c90d23dc8073f6fa108d7ef82d561794bd9d5" + - "f1faa306334f338ac3ba99c853f79c24f7048fa906fde87d1ed28a7b11c0" + - "66a3bb98f8d21055aaafdf7e069b77b60b3d5cbe7c5e4379c7651af955cd" + - "82a19a09caf36becb6cd3fe9e12f40379941542709991066df21b7b12dfb" + - "2416d83fcdc33bb583e3b42f24f53edf8dc7c579ad3be831c99f72bf9fb7" + - "a35b6562e824e039e6bf1adc8f5ca53846de7bae11c4317e696d887df33c" + - "525f0a9c01fc29f2c26c90b85fe82ed8bd50954cd4e9ac7c85c7f3efec75" + - "da1da4ed173cb695cee295190527edb3cb06c5dbdabe0228cc60b6455153" + - "76244f27aa56da2db10f2659090137ffb82c57233c833e0bbf22d6f647fb" + - "97b3652d2888b3ab08010b8e8a6967d560b747757806736dc98b78226634" + - "f1eecaa4a2e23ba36591acb5737d735c5bc7a2e36f1a46946927e061fdf7" + - "7a3b68ef582c26b01f5aa9a438ecc26c6941221d1590c838072f9e471fe7" + - "fd59dacb0d092d40d76ea2f7c6e954a132a015bd4cb31147f3ebe4518322" + - "916438a62836ac85a4cf4492190a85bcc8edb37e38b99ea552d749c30f74" + - "ca20c298165e8ed02d4671e0b41cac3a32a345b9349ad22c2a4bb2c16a4c" + - "e0613ca0f0518759f7d2b33cfad2fae764f410d4d9ff8a76ae02a8107e7e" + - "01d9cd0552676b85ba002f19c01ad5f416d1d08bb84fec7c3555b098dbce" + - "48e1a5d847895e54db9c5b80cc22d5b87cd41a1a94be102bdd45a3cda5d1" + - "181e10446d213d6b3fdc350d486d2011d705c5f16ccf7519065c47bad7d6" + - "89c71e5fdf9d04bfb91eb1f07fa0f001009c1d4b1f6a116a570823a8580b", - }, - { - key: "392468efccff36dade31fc1c62eb38bb61394fe448def9d9d9beec2413ddb418", - tag: "e1122e7c8e6965b90addbd46d8a548d6", - in: "6a13d37f0ec933194c227351f4a19b507d93465b1f3e88dcb5f1ed1262fa" + - "58ea99ff31e6fc85c39c04129fa69195b71b2060122fe618dd9430a63f97" + - "54b52a80b3cd099f248f91a468bae211a27bdb47ba005d29881ea5143a82" + - "967c4c30c9a4f0dba1a4975e6407fe296d40023a00efa06be763f2d73d46" + - "a2901ae28b3d8ce18009a462e223b71476d7b954c138e177d15a390847de" + - "96a7f7fd0598748e86b0f08e64d915e67c7e3cf936f3dcd60edebd36e2a1" + - "d65b6ac29530c48ab3bd52d45b4f938a19b9b31e2911105a8561600d5377" + - "905a67112ec28025aa680350ff85b808c5b4c98b7b9567d03f5ed3911ec9" + - "365a8de4b15ca62adaa69e5ba710eb1756a346016c67a297d8624f9f1ab5" + - "b3fbce98b141049f0ce26c85d2f8a9cc6ca8ab6c6e148be968931430dcc6" + - "2bf58ea9698ef52a5d271cf48e6748ac9e04bc7ae7da205a1a7535478322" + - "d820eca146cedf4b2f9aa9fcfd77ab56a7276977401dcc1f96baa1b607e0" + - "256bd04ec324ec67a4313e2d5a53d3a3fb5332927929b20c63bde805f637" + - "eb1050fee2a152a0405634f55c48a59fe370d54b2ab1671dae2c7fd92243" + - "10627808e553127c74f724362b4a6ee49b697daae7df3ddc5d2ed9d6befd" + - "77fb9f68fe3041f6ef13f46f34ab682ab8563e8996344f82b2ef006a8d54" + - "3dd9c1db4979d7da97bda45e722065f8a238f0873217b783a9a629a12b3a" + - "4de437445039997bd243efbf5e3b6059b9459d395290efb9081c632fb694" + - "81000dc74c395cb507422df181aba20f776ce3fd8765ac485021992c98b1" + - "67c68805662cb4356a0ee7ba6bdae51ac10cd06bb5b2f3a72841c714c8ed" + - "bc56998fe2fefb9bf69e172fdf54b2ab138ae59372c52a67e93882a3000f" + - "d966992aa2250c6ff93e9cac89645d70625d79332ade5dab7eb1adbe7dce" + - "5a013fb65ad32fe22ed16fb9bb35eca1f37a0433c320e8752f8fc4b7618c" + - "5e4df2efece832e259ad98b895c474e47d0e3fc488bea8f717a17de0dcf7" + - "597fb8fe12e62246296f9a887dcc3a700820c190a55a4931a7d44bd3bb2e" + - "ab6c8a8126f1be93790cebabc1d69e01796e6cc80e7c16bbc82fb333fb21" + - "c774ab7db843242838e82d8e1cb8ccab385e67a4271fe7031d74b6e8edcc" + - "8ed585d1c05a365c7665899c1dbc561151d3b44bceace77c4f53c0e0f6f7" + - "74d42f9ad3e56f1c2a8d53879d695f895690afb4698472a3d52d67159313" + - "133c87823fe0500eb68fe286f8b9a2f59f12785d026dc97bdbf793c7d1eb" + - "155f1f136aae66c256583e987f718afbe733e0a5ce30d021493fb84e2242" + - "5b18754d126235ef80335004fa84f88361a584753df409360cd8bd45bace" + - "8f48156bec66577bf2c685089f5ac7e7ec76c0df068fbaa47661f8517f92" + - "e14723b3b278f151816537a7212c96bd340a00c15c9c9bc9a2a5d163655d" + - "84b38073e2be9217cad97d362d89d4baf3ce0a8d8562f19a8c97a9aaf5e7" + - "77d60456360ffb77b30f177d2809052020d141697ecf9cb65f42b9190caf" + - "6540b2c82f6e5a8482934a6a1a5711a8c24546cd8ba432068404eae5a827" + - "2e09efc3c6037af4feaac0a46329229b010ecac6b9f077a9b076bb6d9ce1" + - "38401eb38d124baa11507a994185295020bf9b754fcf78430db9253f5929" + - "87c46c0f8589c4e463b15a3840b1cea795e24cf6b20f29a630136e0589b3" + - "8dd7fbe5ea21da72c88bd8e56473586822aa3765660a45a988df9b8eb8e8" + - "141939d3e4cc637c5d788064d40a9f7c734e43fdf8d7189a5d76700d9743" + - "fe0122944663afdb88c5201318ca782f6848b742ddebe7463fd4a32280ac" + - "1cf8311e9137d319de05ce9cd85abab24c5364041c14d3b4ce650400498e" + - "122166eccc12784b7ac3b262ac0b198ffc26eeed9a5da5374f7a2a53c87a" + - "78c217ea1fbf8d38f62511657b73109f31691aef14d82ce6e1010eae9e6f" + - "a419e5c1c16c0cc70651eb3374c03549a1bc7d3ed42d60f886102c798dbc" + - "ba56f0a2b3b9b412530c35f5f7ed06311ee14571f9c26ed9c81ef38ff000" + - "2f5ef3aab7351e32049a6ef8f48a43da1d84402d229df513dfaf1b2e4043" + - "6ce68c70ebeddd7477c9164f0dce45a6fc5de050f52ec269659d5854bcae" + - "f7762ed7400713c27a4d523eaf8c136c4a1ca00b9e9e55902daf6cdf8528" + - "c22ca1f2fa7ce87902d75a6850e1a5a4592497be1bb401878f18b189b0e2" + - "c59d10705bfabde3cd2da01eb452006b294108d5d42e88e9e15424d8cd0b" + - "8ab43a6c546b3dbf52e47b59cde6a3e417b0395220b6d63736d429da3458" + - "9a2524f1629320206fa7f1d8a041e17222c4a5814561937e1030e6375c77" + - "9dc988bb928bbdbe2c2eb20111639725d82b5d7192cd3e4acc27581f0ba7" + - "286cff41f97aa5a52ea0083de5057fd2ba985aa738e4d03fcf11ebab1d97" + - "e2ac77d1c2beb8799150a421a07b3777d0b850f24194b8309135b13da6c7" + - "e38653a711e407a1811290fbb7bc15d8b12efc6916e97ead41e042a44721" + - "e9cde3388073d921595bcddcac758dc675173f38242e65e4a284aaa7e8fa" + - "6adddaf00bc46428ab2d8601205b8895bcedfc80ca0aa4619ed6bb082ddf" + - "33ec04fa5d417f33fcdd238c6b11320c5a08f800e0f350b75d81e3bcbd15" + - "58a1eab87a3c8c2ffd7ba1d7e754e607cf98ba22a3fc766c45bd6f2569b4" + - "84639e6611714119d188a24a5e963089a16ed34e20b9f154cad8ac6031dd" + - "7a3a885afc2ae5e003ae8d4e4aabdb3e51dfc423b8cf4ed9ae2010072cbb" + - "b1108c7da1ff075e54ed827a0963ac5523ecdf3fc5eee7b4d1a6773764ec" + - "5c30f41690523fd70d895edb7ca6a1806d54240c4c7b43410da73503a323" + - "90d9070ed30da3a2fb5eccd40d083be7cf8bf40b4279f819cf795b6f075b" + - "5a67a10a06a6076d0d83c72efea05f244901c4b5fd9eb380432519311baf" + - "8c81f6325df4d37ff4d30d318f904ebb837ec76b341dd00a8f247cf0bbe9" + - "6f3784dc8f5feb344958fdf1a9ececb105f8770826db1f17a5281e997951" + - "d3c60cc28fc3e66ffeb5dbac315f98f6d240208043f28dee963d843e68ab" + - "57d847f76ae2f96ce6e37f377ef5dfef2176ecd7440ce4dadcec2231b606" + - "e4a80420fb3ed135640e1f05d6bd58b8dce062dd7d36b885d424f6318e5e" + - "a0753efbb33bbc7360d2b5dfab3ae0d5e000b8d31f2ba0f5fd8b34f96b55" + - "28fff35e769461d0f03cf3bfdf0b801dcbbf2838180cb9b108e06c353e3f" + - "0b9ef61678cfed1ea37ae76bccb5ef5957ac2c8e8f4794c8145a15f1cc88" + - "bfb0881080326c481b373c3bc9b07a9b60a0c8bd5fa4f6f90145590a5227" + - "6fcc0ccc2375d0ccb571d414d1b0c38b4e02c39db4d701c5e25e90785ef4" + - "d26f35edd8c4b96455bdca7245cfefd9cfbd2f319615e5fdf07bb9564fa0" + - "44bb35a58391d02e3927780b4076bc0893dfcb4b63a32cd7a541a4a8c253" + - "0349c6e96e378dbeb66dedf87d813d0b744452c1c4088507dca722193827" + - "9e2dfa24e4a409de494acf654f44262db9206a7717fa434ac4fdc6a6eb5b" + - "1fd5a193b6043bc4327c8c09fd6822eaa9df37bbcac1077754a295621601" + - "267b68733b62dadc2563f1700af180141f29899e2689dbbe9745ba8477f4" + - "352921900b403a01c9dd042a8c1b0e0489959fb0b0a8431c97b41e202204" + - "212ebfa00c593399dbd14d7aec07b8292d2e40b48f05fcd54a15da4a24d7" + - "2759e409f4c7b5b98fce4abac6c30e4872d92efa1f96479ec30f21699825" + - "50fa60584f5a09051a00f8e7dbb3853e66ca3f05fbfe43bef9b120a25a01" + - "eb436ba8ecda715201eda72e517d628f883386c1503aa8b8e75610f7155e" + - "9f916335ab6d6f0f9589b6220cd2b81c2c937dc065d3d14a7df8cc916cd0" + - "0ce1bb53fd9c8974298d3bd316f3658aa8cc6904f073a1472149e4b08c64" + - "5e11abe0428ccb6174df2103edd735965d6454b543d3f01410f77053f65e" + - "c1d1aee56fdd3af23bcd4e1a7fcc4e600c4831007c33fe5f0c8300f686eb" + - "9b4d1e4f08fe4ddc8a90be14dc3a5a88ff96716509341d5db24c0d016863" + - "998b1859c5021df815a6f1ca9845f1a8e99dbad132b406227c5897a1bdf3" + - "e698962f799133ff4429decbef6ce036296facf38e4812fec102b76c6d30" + - "beba1b70722254fafbc471096153478c971db7d96263660209265cb10f13" + - "b34b5fd55c4abe818a5f9715d8a85094e2946b7a001b47f629e26c636d86" + - "4968ad2ab616dfe28840bd60b4b9855c8dbe1cb873fcbc4577b5fefeb8bb" + - "4832039867dc35db9c036c83bc204396e3474ddfe806c77c65c936f488b6" + - "7c1028739562d7bb055d21441af29ae2921290e548dccf8a56021385422b" + - "15da6b232b24151309a75a00296d11aa1952a1513110b0faa93d1d8cd9ae" + - "fa9f1c59377ec9165b2c9e07cbde40db7b81bca6d58fc28bae8f473cd0e9" + - "a2420e0b943a83d284108626c24ac570b1d6c1ab971e71f43fbd6c00e171" + - "238141a6dc987a60385c3a04dd147a2f8e80dfe727b104c0fdd80b326f59" + - "0b9f86fd7b2fd1122a390979889eabd803ab57159c8509a1443eb6789382" + - "090a770ae4eba03306f96e50e19a7d44c584ccc230d104548946efca4520" + - "d61de5f473e2f4eada6c8ce9c7ee975eb4f63c0483cb775ed7d3cf690a61" + - "7d6656d683a8512707d81ca5ba176a42bcffcfa692129f292607d2a47536" + - "ccaeb464c9272d6f3816074b712af602470088b253deba18771e5f67734b" + - "587707cdd06f35264b2262fd253c25b5d38ee7db287610e5398062b7a34e" + - "6e4cf7447d00873b930ad148fd96f0ab18771bc468b874bb109924101c84" + - "c4e239ecc7687d875e4d94a1a973620ca61e35a872c2e2e61a502169f1bb" + - "4e5ff5fa2bff657be6195b3e2c7151a52fc0096d98e7f08f5a98f570aee1" + - "7b4275f1356e87e080ce0e1b9bbabe7dea48b5903bc390ce23472ad64a89" + - "41c3247bfd23ea90b2dee09085571bad85568040105e098f993bb37e43c3" + - "e6d511171c77cfc450570dfb9fc6a3930ef43c03f8213f6203d545d791c7" + - "d3fa42d5dde1655038d35c5dfacc12e9dee24fe833977549eda68ae8b508" + - "be277e743921b584f9dfa0eefbd8bf3c23f51efdef7f7487001d29e8097b" + - "ba63289cfca743023d1668555a46fe6d5b7421377414df1e9ef135480622" + - "22e2e9a7baa618d88f407517f6317b6a0ba3384ace16d68631d59ea169d5" + - "092d20afc1a481b82be5e734bb092953a0a94702bae1a0f48d2a22b9a05f" + - "f64493b7b2e984f27582b1eb937fddf8512c49830435d146dcc291a4118d" + - "5dc638b99cdcbcc5860de7a92c5b13cbd1e01e051f01af40afe124346320" + - "d3626bf9d8f7850744e032a993c276fd388718237740c6caf260fca60b8d" + - "d846102e3262b6e05ceca00c6affe938fac1847350865fc858d3ddd1d130" + - "71d1221ce7c5d575587fcba580e544b74d877ed5ca92763ef0ca0d7bfa08" + - "d57a0216b2a01a2b9ec74b8430051e0074862b7be25b6766ab520f2eb75d" + - "eeb979c28f03795f6f1e4b8410beab19a20febc91985b8a7c298534a6598" + - "f2c5b0dc5de9f5e55a97791507bc6373db26", - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160.go deleted file mode 100644 index da690f0b92..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2010 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 ripemd160 implements the RIPEMD-160 hash algorithm. -package ripemd160 - -// RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart -// Preneel with specifications available at: -// http://homes.esat.kuleuven.be/~cosicart/pdf/AB-9601/AB-9601.pdf. - -import ( - "crypto" - "hash" -) - -func init() { - crypto.RegisterHash(crypto.RIPEMD160, New) -} - -// The size of the checksum in bytes. -const Size = 20 - -// The block size of the hash algorithm in bytes. -const BlockSize = 64 - -const ( - _s0 = 0x67452301 - _s1 = 0xefcdab89 - _s2 = 0x98badcfe - _s3 = 0x10325476 - _s4 = 0xc3d2e1f0 -) - -// digest represents the partial evaluation of a checksum. -type digest struct { - s [5]uint32 // running context - x [BlockSize]byte // temporary buffer - nx int // index into x - tc uint64 // total count of bytes processed -} - -func (d *digest) Reset() { - d.s[0], d.s[1], d.s[2], d.s[3], d.s[4] = _s0, _s1, _s2, _s3, _s4 - d.nx = 0 - d.tc = 0 -} - -// New returns a new hash.Hash computing the checksum. -func New() hash.Hash { - result := new(digest) - result.Reset() - return result -} - -func (d *digest) Size() int { return Size } - -func (d *digest) BlockSize() int { return BlockSize } - -func (d *digest) Write(p []byte) (nn int, err error) { - nn = len(p) - d.tc += uint64(nn) - if d.nx > 0 { - n := len(p) - if n > BlockSize-d.nx { - n = BlockSize - d.nx - } - for i := 0; i < n; i++ { - d.x[d.nx+i] = p[i] - } - d.nx += n - if d.nx == BlockSize { - _Block(d, d.x[0:]) - d.nx = 0 - } - p = p[n:] - } - n := _Block(d, p) - p = p[n:] - if len(p) > 0 { - d.nx = copy(d.x[:], p) - } - return -} - -func (d0 *digest) Sum(in []byte) []byte { - // Make a copy of d0 so that caller can keep writing and summing. - d := *d0 - - // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64. - tc := d.tc - var tmp [64]byte - tmp[0] = 0x80 - if tc%64 < 56 { - d.Write(tmp[0 : 56-tc%64]) - } else { - d.Write(tmp[0 : 64+56-tc%64]) - } - - // Length in bits. - tc <<= 3 - for i := uint(0); i < 8; i++ { - tmp[i] = byte(tc >> (8 * i)) - } - d.Write(tmp[0:8]) - - if d.nx != 0 { - panic("d.nx != 0") - } - - var digest [Size]byte - for i, s := range d.s { - digest[i*4] = byte(s) - digest[i*4+1] = byte(s >> 8) - digest[i*4+2] = byte(s >> 16) - digest[i*4+3] = byte(s >> 24) - } - - return append(in, digest[:]...) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160_test.go deleted file mode 100644 index a1fbffdd5f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2010 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 ripemd160 - -// Test vectors are from: -// http://homes.esat.kuleuven.be/~bosselae/ripemd160.html - -import ( - "fmt" - "io" - "testing" -) - -type mdTest struct { - out string - in string -} - -var vectors = [...]mdTest{ - {"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""}, - {"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"}, - {"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"}, - {"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"}, - {"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"}, - {"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"}, - {"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"}, - {"9b752e45573d4b39f4dbd3323cab82bf63326bfb", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"}, -} - -func TestVectors(t *testing.T) { - for i := 0; i < len(vectors); i++ { - tv := vectors[i] - md := New() - for j := 0; j < 3; j++ { - if j < 2 { - io.WriteString(md, tv.in) - } else { - io.WriteString(md, tv.in[0:len(tv.in)/2]) - md.Sum(nil) - io.WriteString(md, tv.in[len(tv.in)/2:]) - } - s := fmt.Sprintf("%x", md.Sum(nil)) - if s != tv.out { - t.Fatalf("RIPEMD-160[%d](%s) = %s, expected %s", j, tv.in, s, tv.out) - } - md.Reset() - } - } -} - -func millionA() string { - md := New() - for i := 0; i < 100000; i++ { - io.WriteString(md, "aaaaaaaaaa") - } - return fmt.Sprintf("%x", md.Sum(nil)) -} - -func TestMillionA(t *testing.T) { - const out = "52783243c1697bdbe16d37f97f68f08325dc1528" - if s := millionA(); s != out { - t.Fatalf("RIPEMD-160 (1 million 'a') = %s, expected %s", s, out) - } -} - -func BenchmarkMillionA(b *testing.B) { - for i := 0; i < b.N; i++ { - millionA() - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160block.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160block.go deleted file mode 100644 index e0edc02f0f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ripemd160/ripemd160block.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2010 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. - -// RIPEMD-160 block step. -// In its own file so that a faster assembly or C version -// can be substituted easily. - -package ripemd160 - -import ( - "math/bits" -) - -// work buffer indices and roll amounts for one line -var _n = [80]uint{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13, -} - -var _r = [80]uint{ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6, -} - -// same for the other parallel one -var n_ = [80]uint{ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11, -} - -var r_ = [80]uint{ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11, -} - -func _Block(md *digest, p []byte) int { - n := 0 - var x [16]uint32 - var alpha, beta uint32 - for len(p) >= BlockSize { - a, b, c, d, e := md.s[0], md.s[1], md.s[2], md.s[3], md.s[4] - aa, bb, cc, dd, ee := a, b, c, d, e - j := 0 - for i := 0; i < 16; i++ { - x[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24 - j += 4 - } - - // round 1 - i := 0 - for i < 16 { - alpha = a + (b ^ c ^ d) + x[_n[i]] - s := int(_r[i]) - alpha = bits.RotateLeft32(alpha, s) + e - beta = bits.RotateLeft32(c, 10) - a, b, c, d, e = e, alpha, b, beta, d - - // parallel line - alpha = aa + (bb ^ (cc | ^dd)) + x[n_[i]] + 0x50a28be6 - s = int(r_[i]) - alpha = bits.RotateLeft32(alpha, s) + ee - beta = bits.RotateLeft32(cc, 10) - aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd - - i++ - } - - // round 2 - for i < 32 { - alpha = a + (b&c | ^b&d) + x[_n[i]] + 0x5a827999 - s := int(_r[i]) - alpha = bits.RotateLeft32(alpha, s) + e - beta = bits.RotateLeft32(c, 10) - a, b, c, d, e = e, alpha, b, beta, d - - // parallel line - alpha = aa + (bb&dd | cc&^dd) + x[n_[i]] + 0x5c4dd124 - s = int(r_[i]) - alpha = bits.RotateLeft32(alpha, s) + ee - beta = bits.RotateLeft32(cc, 10) - aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd - - i++ - } - - // round 3 - for i < 48 { - alpha = a + (b | ^c ^ d) + x[_n[i]] + 0x6ed9eba1 - s := int(_r[i]) - alpha = bits.RotateLeft32(alpha, s) + e - beta = bits.RotateLeft32(c, 10) - a, b, c, d, e = e, alpha, b, beta, d - - // parallel line - alpha = aa + (bb | ^cc ^ dd) + x[n_[i]] + 0x6d703ef3 - s = int(r_[i]) - alpha = bits.RotateLeft32(alpha, s) + ee - beta = bits.RotateLeft32(cc, 10) - aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd - - i++ - } - - // round 4 - for i < 64 { - alpha = a + (b&d | c&^d) + x[_n[i]] + 0x8f1bbcdc - s := int(_r[i]) - alpha = bits.RotateLeft32(alpha, s) + e - beta = bits.RotateLeft32(c, 10) - a, b, c, d, e = e, alpha, b, beta, d - - // parallel line - alpha = aa + (bb&cc | ^bb&dd) + x[n_[i]] + 0x7a6d76e9 - s = int(r_[i]) - alpha = bits.RotateLeft32(alpha, s) + ee - beta = bits.RotateLeft32(cc, 10) - aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd - - i++ - } - - // round 5 - for i < 80 { - alpha = a + (b ^ (c | ^d)) + x[_n[i]] + 0xa953fd4e - s := int(_r[i]) - alpha = bits.RotateLeft32(alpha, s) + e - beta = bits.RotateLeft32(c, 10) - a, b, c, d, e = e, alpha, b, beta, d - - // parallel line - alpha = aa + (bb ^ cc ^ dd) + x[n_[i]] - s = int(r_[i]) - alpha = bits.RotateLeft32(alpha, s) + ee - beta = bits.RotateLeft32(cc, 10) - aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd - - i++ - } - - // combine results - dd += c + md.s[1] - md.s[1] = md.s[2] + d + ee - md.s[2] = md.s[3] + e + aa - md.s[3] = md.s[4] + a + bb - md.s[4] = md.s[0] + b + cc - md.s[0] = dd - - p = p[BlockSize:] - n += BlockSize - } - return n -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa/salsa_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa/salsa_test.go deleted file mode 100644 index f67e94eba4..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa/salsa_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2012 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 salsa - -import "testing" - -func TestCore208(t *testing.T) { - in := [64]byte{ - 0x7e, 0x87, 0x9a, 0x21, 0x4f, 0x3e, 0xc9, 0x86, - 0x7c, 0xa9, 0x40, 0xe6, 0x41, 0x71, 0x8f, 0x26, - 0xba, 0xee, 0x55, 0x5b, 0x8c, 0x61, 0xc1, 0xb5, - 0x0d, 0xf8, 0x46, 0x11, 0x6d, 0xcd, 0x3b, 0x1d, - 0xee, 0x24, 0xf3, 0x19, 0xdf, 0x9b, 0x3d, 0x85, - 0x14, 0x12, 0x1e, 0x4b, 0x5a, 0xc5, 0xaa, 0x32, - 0x76, 0x02, 0x1d, 0x29, 0x09, 0xc7, 0x48, 0x29, - 0xed, 0xeb, 0xc6, 0x8d, 0xb8, 0xb8, 0xc2, 0x5e} - - out := [64]byte{ - 0xa4, 0x1f, 0x85, 0x9c, 0x66, 0x08, 0xcc, 0x99, - 0x3b, 0x81, 0xca, 0xcb, 0x02, 0x0c, 0xef, 0x05, - 0x04, 0x4b, 0x21, 0x81, 0xa2, 0xfd, 0x33, 0x7d, - 0xfd, 0x7b, 0x1c, 0x63, 0x96, 0x68, 0x2f, 0x29, - 0xb4, 0x39, 0x31, 0x68, 0xe3, 0xc9, 0xe6, 0xbc, - 0xfe, 0x6b, 0xc5, 0xb7, 0xa0, 0x6d, 0x96, 0xba, - 0xe4, 0x24, 0xcc, 0x10, 0x2c, 0x91, 0x74, 0x5c, - 0x24, 0xad, 0x67, 0x3d, 0xc7, 0x61, 0x8f, 0x81, - } - - Core208(&in, &in) - if in != out { - t.Errorf("expected %x, got %x", out, in) - } -} - -func TestOutOfBoundsWrite(t *testing.T) { - // encrypted "0123456789" - cipherText := []byte{170, 166, 196, 104, 175, 121, 68, 44, 174, 51} - var counter [16]byte - var key [32]byte - want := "abcdefghij" - plainText := []byte(want) - defer func() { - err := recover() - if err == nil { - t.Error("XORKeyStream expected to panic on len(dst) < len(src), but didn't") - } - if plainText[3] == '3' { - t.Errorf("XORKeyStream did out of bounds write, want %v, got %v", want, string(plainText)) - } - }() - XORKeyStream(plainText[:3], cipherText, &counter, &key) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa20_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa20_test.go deleted file mode 100644 index 0ef3328eb0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/salsa20/salsa20_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2012 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 salsa20 - -import ( - "bytes" - "encoding/hex" - "testing" -) - -func fromHex(s string) []byte { - ret, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return ret -} - -// testVectors was taken from set 6 of the ECRYPT test vectors: -// http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/verified.test-vectors?logsort=rev&rev=210&view=markup -var testVectors = []struct { - key []byte - iv []byte - numBytes int - xor []byte -}{ - { - fromHex("0053A6F94C9FF24598EB3E91E4378ADD3083D6297CCF2275C81B6EC11467BA0D"), - fromHex("0D74DB42A91077DE"), - 131072, - fromHex("C349B6A51A3EC9B712EAED3F90D8BCEE69B7628645F251A996F55260C62EF31FD6C6B0AEA94E136C9D984AD2DF3578F78E457527B03A0450580DD874F63B1AB9"), - }, - { - fromHex("0558ABFE51A4F74A9DF04396E93C8FE23588DB2E81D4277ACD2073C6196CBF12"), - fromHex("167DE44BB21980E7"), - 131072, - fromHex("C3EAAF32836BACE32D04E1124231EF47E101367D6305413A0EEB07C60698A2876E4D031870A739D6FFDDD208597AFF0A47AC17EDB0167DD67EBA84F1883D4DFD"), - }, - { - fromHex("0A5DB00356A9FC4FA2F5489BEE4194E73A8DE03386D92C7FD22578CB1E71C417"), - fromHex("1F86ED54BB2289F0"), - 131072, - fromHex("3CD23C3DC90201ACC0CF49B440B6C417F0DC8D8410A716D5314C059E14B1A8D9A9FB8EA3D9C8DAE12B21402F674AA95C67B1FC514E994C9D3F3A6E41DFF5BBA6"), - }, - { - fromHex("0F62B5085BAE0154A7FA4DA0F34699EC3F92E5388BDE3184D72A7DD02376C91C"), - fromHex("288FF65DC42B92F9"), - 131072, - fromHex("E00EBCCD70D69152725F9987982178A2E2E139C7BCBE04CA8A0E99E318D9AB76F988C8549F75ADD790BA4F81C176DA653C1A043F11A958E169B6D2319F4EEC1A"), - }, -} - -func TestSalsa20(t *testing.T) { - var inBuf, outBuf []byte - var key [32]byte - - for i, test := range testVectors { - if test.numBytes%64 != 0 { - t.Errorf("#%d: numBytes is not a multiple of 64", i) - continue - } - - if test.numBytes > len(inBuf) { - inBuf = make([]byte, test.numBytes) - outBuf = make([]byte, test.numBytes) - } - in := inBuf[:test.numBytes] - out := outBuf[:test.numBytes] - copy(key[:], test.key) - XORKeyStream(out, in, test.iv, &key) - - var xor [64]byte - for len(out) > 0 { - for i := 0; i < 64; i++ { - xor[i] ^= out[i] - } - out = out[64:] - } - - if !bytes.Equal(xor[:], test.xor) { - t.Errorf("#%d: bad result", i) - } - } -} - -var xSalsa20TestData = []struct { - in, nonce, key, out []byte -}{ - { - []byte("Hello world!"), - []byte("24-byte nonce for xsalsa"), - []byte("this is 32-byte key for xsalsa20"), - []byte{0x00, 0x2d, 0x45, 0x13, 0x84, 0x3f, 0xc2, 0x40, 0xc4, 0x01, 0xe5, 0x41}, - }, - { - make([]byte, 64), - []byte("24-byte nonce for xsalsa"), - []byte("this is 32-byte key for xsalsa20"), - []byte{0x48, 0x48, 0x29, 0x7f, 0xeb, 0x1f, 0xb5, 0x2f, 0xb6, - 0x6d, 0x81, 0x60, 0x9b, 0xd5, 0x47, 0xfa, 0xbc, 0xbe, 0x70, - 0x26, 0xed, 0xc8, 0xb5, 0xe5, 0xe4, 0x49, 0xd0, 0x88, 0xbf, - 0xa6, 0x9c, 0x08, 0x8f, 0x5d, 0x8d, 0xa1, 0xd7, 0x91, 0x26, - 0x7c, 0x2c, 0x19, 0x5a, 0x7f, 0x8c, 0xae, 0x9c, 0x4b, 0x40, - 0x50, 0xd0, 0x8c, 0xe6, 0xd3, 0xa1, 0x51, 0xec, 0x26, 0x5f, - 0x3a, 0x58, 0xe4, 0x76, 0x48}, - }, -} - -func TestXSalsa20(t *testing.T) { - var key [32]byte - - for i, test := range xSalsa20TestData { - out := make([]byte, len(test.in)) - copy(key[:], test.key) - XORKeyStream(out, test.in, test.nonce, &key) - if !bytes.Equal(out, test.out) { - t.Errorf("%d: expected %x, got %x", i, test.out, out) - } - } -} - -var ( - keyArray [32]byte - key = &keyArray - nonce [8]byte - msg = make([]byte, 1<<10) -) - -func BenchmarkXOR1K(b *testing.B) { - b.StopTimer() - out := make([]byte, 1024) - b.StartTimer() - for i := 0; i < b.N; i++ { - XORKeyStream(out, msg[:1024], nonce[:], key) - } - b.SetBytes(1024) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/example_test.go deleted file mode 100644 index 2b8cda9bb1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/example_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 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 scrypt_test - -import ( - "encoding/base64" - "fmt" - "log" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt" -) - -func Example() { - // DO NOT use this salt value; generate your own random salt. 8 bytes is - // a good length. - salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b} - - dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32) - if err != nil { - log.Fatal(err) - } - fmt.Println(base64.StdEncoding.EncodeToString(dk)) - // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M= -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt.go deleted file mode 100644 index 41b5dbb1d7..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2012 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 scrypt implements the scrypt key derivation function as defined in -// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard -// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). -package scrypt - -import ( - "crypto/sha256" - "errors" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/pbkdf2" -) - -const maxInt = int(^uint(0) >> 1) - -// blockCopy copies n numbers from src into dst. -func blockCopy(dst, src []uint32, n int) { - copy(dst, src[:n]) -} - -// blockXOR XORs numbers from dst with n numbers from src. -func blockXOR(dst, src []uint32, n int) { - for i, v := range src[:n] { - dst[i] ^= v - } -} - -// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in, -// and puts the result into both both tmp and out. -func salsaXOR(tmp *[16]uint32, in, out []uint32) { - w0 := tmp[0] ^ in[0] - w1 := tmp[1] ^ in[1] - w2 := tmp[2] ^ in[2] - w3 := tmp[3] ^ in[3] - w4 := tmp[4] ^ in[4] - w5 := tmp[5] ^ in[5] - w6 := tmp[6] ^ in[6] - w7 := tmp[7] ^ in[7] - w8 := tmp[8] ^ in[8] - w9 := tmp[9] ^ in[9] - w10 := tmp[10] ^ in[10] - w11 := tmp[11] ^ in[11] - w12 := tmp[12] ^ in[12] - w13 := tmp[13] ^ in[13] - w14 := tmp[14] ^ in[14] - w15 := tmp[15] ^ in[15] - - x0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8 - x9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15 - - for i := 0; i < 8; i += 2 { - u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) - u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) - u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) - u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) - u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) - u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) - u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) - u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) - u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) - - u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) - u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) - u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) - u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) - u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) - u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) - u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) - u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) - u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) - } - x0 += w0 - x1 += w1 - x2 += w2 - x3 += w3 - x4 += w4 - x5 += w5 - x6 += w6 - x7 += w7 - x8 += w8 - x9 += w9 - x10 += w10 - x11 += w11 - x12 += w12 - x13 += w13 - x14 += w14 - x15 += w15 - - out[0], tmp[0] = x0, x0 - out[1], tmp[1] = x1, x1 - out[2], tmp[2] = x2, x2 - out[3], tmp[3] = x3, x3 - out[4], tmp[4] = x4, x4 - out[5], tmp[5] = x5, x5 - out[6], tmp[6] = x6, x6 - out[7], tmp[7] = x7, x7 - out[8], tmp[8] = x8, x8 - out[9], tmp[9] = x9, x9 - out[10], tmp[10] = x10, x10 - out[11], tmp[11] = x11, x11 - out[12], tmp[12] = x12, x12 - out[13], tmp[13] = x13, x13 - out[14], tmp[14] = x14, x14 - out[15], tmp[15] = x15, x15 -} - -func blockMix(tmp *[16]uint32, in, out []uint32, r int) { - blockCopy(tmp[:], in[(2*r-1)*16:], 16) - for i := 0; i < 2*r; i += 2 { - salsaXOR(tmp, in[i*16:], out[i*8:]) - salsaXOR(tmp, in[i*16+16:], out[i*8+r*16:]) - } -} - -func integer(b []uint32, r int) uint64 { - j := (2*r - 1) * 16 - return uint64(b[j]) | uint64(b[j+1])<<32 -} - -func smix(b []byte, r, N int, v, xy []uint32) { - var tmp [16]uint32 - x := xy - y := xy[32*r:] - - j := 0 - for i := 0; i < 32*r; i++ { - x[i] = uint32(b[j]) | uint32(b[j+1])<<8 | uint32(b[j+2])<<16 | uint32(b[j+3])<<24 - j += 4 - } - for i := 0; i < N; i += 2 { - blockCopy(v[i*(32*r):], x, 32*r) - blockMix(&tmp, x, y, r) - - blockCopy(v[(i+1)*(32*r):], y, 32*r) - blockMix(&tmp, y, x, r) - } - for i := 0; i < N; i += 2 { - j := int(integer(x, r) & uint64(N-1)) - blockXOR(x, v[j*(32*r):], 32*r) - blockMix(&tmp, x, y, r) - - j = int(integer(y, r) & uint64(N-1)) - blockXOR(y, v[j*(32*r):], 32*r) - blockMix(&tmp, y, x, r) - } - j = 0 - for _, v := range x[:32*r] { - b[j+0] = byte(v >> 0) - b[j+1] = byte(v >> 8) - b[j+2] = byte(v >> 16) - b[j+3] = byte(v >> 24) - j += 4 - } -} - -// Key derives a key from the password, salt, and cost parameters, returning -// a byte slice of length keyLen that can be used as cryptographic key. -// -// N is a CPU/memory cost parameter, which must be a power of two greater than 1. -// r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the -// limits, the function returns a nil byte slice and an error. -// -// For example, you can get a derived key for e.g. AES-256 (which needs a -// 32-byte key) by doing: -// -// dk, err := scrypt.Key([]byte("some password"), salt, 32768, 8, 1, 32) -// -// The recommended parameters for interactive logins as of 2017 are N=32768, r=8 -// and p=1. The parameters N, r, and p should be increased as memory latency and -// CPU parallelism increases; consider setting N to the highest power of 2 you -// can derive within 100 milliseconds. Remember to get a good random salt. -func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) { - if N <= 1 || N&(N-1) != 0 { - return nil, errors.New("scrypt: N must be > 1 and a power of 2") - } - if uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r { - return nil, errors.New("scrypt: parameters are too large") - } - - xy := make([]uint32, 64*r) - v := make([]uint32, 32*N*r) - b := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New) - - for i := 0; i < p; i++ { - smix(b[i*128*r:], r, N, v, xy) - } - - return pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt_test.go deleted file mode 100644 index 766ed8d905..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/scrypt/scrypt_test.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2012 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 scrypt - -import ( - "bytes" - "testing" -) - -type testVector struct { - password string - salt string - N, r, p int - output []byte -} - -var good = []testVector{ - { - "password", - "salt", - 2, 10, 10, - []byte{ - 0x48, 0x2c, 0x85, 0x8e, 0x22, 0x90, 0x55, 0xe6, 0x2f, - 0x41, 0xe0, 0xec, 0x81, 0x9a, 0x5e, 0xe1, 0x8b, 0xdb, - 0x87, 0x25, 0x1a, 0x53, 0x4f, 0x75, 0xac, 0xd9, 0x5a, - 0xc5, 0xe5, 0xa, 0xa1, 0x5f, - }, - }, - { - "password", - "salt", - 16, 100, 100, - []byte{ - 0x88, 0xbd, 0x5e, 0xdb, 0x52, 0xd1, 0xdd, 0x0, 0x18, - 0x87, 0x72, 0xad, 0x36, 0x17, 0x12, 0x90, 0x22, 0x4e, - 0x74, 0x82, 0x95, 0x25, 0xb1, 0x8d, 0x73, 0x23, 0xa5, - 0x7f, 0x91, 0x96, 0x3c, 0x37, - }, - }, - { - "this is a long \000 password", - "and this is a long \000 salt", - 16384, 8, 1, - []byte{ - 0xc3, 0xf1, 0x82, 0xee, 0x2d, 0xec, 0x84, 0x6e, 0x70, - 0xa6, 0x94, 0x2f, 0xb5, 0x29, 0x98, 0x5a, 0x3a, 0x09, - 0x76, 0x5e, 0xf0, 0x4c, 0x61, 0x29, 0x23, 0xb1, 0x7f, - 0x18, 0x55, 0x5a, 0x37, 0x07, 0x6d, 0xeb, 0x2b, 0x98, - 0x30, 0xd6, 0x9d, 0xe5, 0x49, 0x26, 0x51, 0xe4, 0x50, - 0x6a, 0xe5, 0x77, 0x6d, 0x96, 0xd4, 0x0f, 0x67, 0xaa, - 0xee, 0x37, 0xe1, 0x77, 0x7b, 0x8a, 0xd5, 0xc3, 0x11, - 0x14, 0x32, 0xbb, 0x3b, 0x6f, 0x7e, 0x12, 0x64, 0x40, - 0x18, 0x79, 0xe6, 0x41, 0xae, - }, - }, - { - "p", - "s", - 2, 1, 1, - []byte{ - 0x48, 0xb0, 0xd2, 0xa8, 0xa3, 0x27, 0x26, 0x11, 0x98, - 0x4c, 0x50, 0xeb, 0xd6, 0x30, 0xaf, 0x52, - }, - }, - - { - "", - "", - 16, 1, 1, - []byte{ - 0x77, 0xd6, 0x57, 0x62, 0x38, 0x65, 0x7b, 0x20, 0x3b, - 0x19, 0xca, 0x42, 0xc1, 0x8a, 0x04, 0x97, 0xf1, 0x6b, - 0x48, 0x44, 0xe3, 0x07, 0x4a, 0xe8, 0xdf, 0xdf, 0xfa, - 0x3f, 0xed, 0xe2, 0x14, 0x42, 0xfc, 0xd0, 0x06, 0x9d, - 0xed, 0x09, 0x48, 0xf8, 0x32, 0x6a, 0x75, 0x3a, 0x0f, - 0xc8, 0x1f, 0x17, 0xe8, 0xd3, 0xe0, 0xfb, 0x2e, 0x0d, - 0x36, 0x28, 0xcf, 0x35, 0xe2, 0x0c, 0x38, 0xd1, 0x89, - 0x06, - }, - }, - { - "password", - "NaCl", - 1024, 8, 16, - []byte{ - 0xfd, 0xba, 0xbe, 0x1c, 0x9d, 0x34, 0x72, 0x00, 0x78, - 0x56, 0xe7, 0x19, 0x0d, 0x01, 0xe9, 0xfe, 0x7c, 0x6a, - 0xd7, 0xcb, 0xc8, 0x23, 0x78, 0x30, 0xe7, 0x73, 0x76, - 0x63, 0x4b, 0x37, 0x31, 0x62, 0x2e, 0xaf, 0x30, 0xd9, - 0x2e, 0x22, 0xa3, 0x88, 0x6f, 0xf1, 0x09, 0x27, 0x9d, - 0x98, 0x30, 0xda, 0xc7, 0x27, 0xaf, 0xb9, 0x4a, 0x83, - 0xee, 0x6d, 0x83, 0x60, 0xcb, 0xdf, 0xa2, 0xcc, 0x06, - 0x40, - }, - }, - { - "pleaseletmein", "SodiumChloride", - 16384, 8, 1, - []byte{ - 0x70, 0x23, 0xbd, 0xcb, 0x3a, 0xfd, 0x73, 0x48, 0x46, - 0x1c, 0x06, 0xcd, 0x81, 0xfd, 0x38, 0xeb, 0xfd, 0xa8, - 0xfb, 0xba, 0x90, 0x4f, 0x8e, 0x3e, 0xa9, 0xb5, 0x43, - 0xf6, 0x54, 0x5d, 0xa1, 0xf2, 0xd5, 0x43, 0x29, 0x55, - 0x61, 0x3f, 0x0f, 0xcf, 0x62, 0xd4, 0x97, 0x05, 0x24, - 0x2a, 0x9a, 0xf9, 0xe6, 0x1e, 0x85, 0xdc, 0x0d, 0x65, - 0x1e, 0x40, 0xdf, 0xcf, 0x01, 0x7b, 0x45, 0x57, 0x58, - 0x87, - }, - }, - /* - // Disabled: needs 1 GiB RAM and takes too long for a simple test. - { - "pleaseletmein", "SodiumChloride", - 1048576, 8, 1, - []byte{ - 0x21, 0x01, 0xcb, 0x9b, 0x6a, 0x51, 0x1a, 0xae, 0xad, - 0xdb, 0xbe, 0x09, 0xcf, 0x70, 0xf8, 0x81, 0xec, 0x56, - 0x8d, 0x57, 0x4a, 0x2f, 0xfd, 0x4d, 0xab, 0xe5, 0xee, - 0x98, 0x20, 0xad, 0xaa, 0x47, 0x8e, 0x56, 0xfd, 0x8f, - 0x4b, 0xa5, 0xd0, 0x9f, 0xfa, 0x1c, 0x6d, 0x92, 0x7c, - 0x40, 0xf4, 0xc3, 0x37, 0x30, 0x40, 0x49, 0xe8, 0xa9, - 0x52, 0xfb, 0xcb, 0xf4, 0x5c, 0x6f, 0xa7, 0x7a, 0x41, - 0xa4, - }, - }, - */ -} - -var bad = []testVector{ - {"p", "s", 0, 1, 1, nil}, // N == 0 - {"p", "s", 1, 1, 1, nil}, // N == 1 - {"p", "s", 7, 8, 1, nil}, // N is not power of 2 - {"p", "s", 16, maxInt / 2, maxInt / 2, nil}, // p * r too large -} - -func TestKey(t *testing.T) { - for i, v := range good { - k, err := Key([]byte(v.password), []byte(v.salt), v.N, v.r, v.p, len(v.output)) - if err != nil { - t.Errorf("%d: got unexpected error: %s", i, err) - } - if !bytes.Equal(k, v.output) { - t.Errorf("%d: expected %x, got %x", i, v.output, k) - } - } - for i, v := range bad { - _, err := Key([]byte(v.password), []byte(v.salt), v.N, v.r, v.p, 32) - if err == nil { - t.Errorf("%d: expected error, got nil", i) - } - } -} - -var sink []byte - -func BenchmarkKey(b *testing.B) { - for i := 0; i < b.N; i++ { - sink, _ = Key([]byte("password"), []byte("salt"), 1<<15, 8, 1, 64) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/sha3_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/sha3_test.go deleted file mode 100644 index c1f6ca399f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/sha3_test.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2014 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 sha3 - -// Tests include all the ShortMsgKATs provided by the Keccak team at -// https://github.com/gvanas/KeccakCodePackage -// -// They only include the zero-bit case of the bitwise testvectors -// published by NIST in the draft of FIPS-202. - -import ( - "bytes" - "compress/flate" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "os" - "strings" - "testing" -) - -const ( - testString = "brekeccakkeccak koax koax" - katFilename = "testdata/keccakKats.json.deflate" -) - -// Internal-use instances of SHAKE used to test against KATs. -func newHashShake128() hash.Hash { - return &state{rate: 168, dsbyte: 0x1f, outputLen: 512} -} -func newHashShake256() hash.Hash { - return &state{rate: 136, dsbyte: 0x1f, outputLen: 512} -} - -// testDigests contains functions returning hash.Hash instances -// with output-length equal to the KAT length for SHA-3, Keccak -// and SHAKE instances. -var testDigests = map[string]func() hash.Hash{ - "SHA3-224": New224, - "SHA3-256": New256, - "SHA3-384": New384, - "SHA3-512": New512, - "Keccak-256": NewLegacyKeccak256, - "SHAKE128": newHashShake128, - "SHAKE256": newHashShake256, -} - -// testShakes contains functions that return ShakeHash instances for -// testing the ShakeHash-specific interface. -var testShakes = map[string]func() ShakeHash{ - "SHAKE128": NewShake128, - "SHAKE256": NewShake256, -} - -// decodeHex converts a hex-encoded string into a raw byte string. -func decodeHex(s string) []byte { - b, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return b -} - -// structs used to marshal JSON test-cases. -type KeccakKats struct { - Kats map[string][]struct { - Digest string `json:"digest"` - Length int64 `json:"length"` - Message string `json:"message"` - } -} - -func testUnalignedAndGeneric(t *testing.T, testf func(impl string)) { - xorInOrig, copyOutOrig := xorIn, copyOut - xorIn, copyOut = xorInGeneric, copyOutGeneric - testf("generic") - if xorImplementationUnaligned != "generic" { - xorIn, copyOut = xorInUnaligned, copyOutUnaligned - testf("unaligned") - } - xorIn, copyOut = xorInOrig, copyOutOrig -} - -// TestKeccakKats tests the SHA-3 and Shake implementations against all the -// ShortMsgKATs from https://github.com/gvanas/KeccakCodePackage -// (The testvectors are stored in keccakKats.json.deflate due to their length.) -func TestKeccakKats(t *testing.T) { - testUnalignedAndGeneric(t, func(impl string) { - // Read the KATs. - deflated, err := os.Open(katFilename) - if err != nil { - t.Errorf("error opening %s: %s", katFilename, err) - } - file := flate.NewReader(deflated) - dec := json.NewDecoder(file) - var katSet KeccakKats - err = dec.Decode(&katSet) - if err != nil { - t.Errorf("error decoding KATs: %s", err) - } - - // Do the KATs. - for functionName, kats := range katSet.Kats { - d := testDigests[functionName]() - for _, kat := range kats { - d.Reset() - in, err := hex.DecodeString(kat.Message) - if err != nil { - t.Errorf("error decoding KAT: %s", err) - } - d.Write(in[:kat.Length/8]) - got := strings.ToUpper(hex.EncodeToString(d.Sum(nil))) - if got != kat.Digest { - t.Errorf("function=%s, implementation=%s, length=%d\nmessage:\n %s\ngot:\n %s\nwanted:\n %s", - functionName, impl, kat.Length, kat.Message, got, kat.Digest) - t.Logf("wanted %+v", kat) - t.FailNow() - } - continue - } - } - }) -} - -// TestKeccak does a basic test of the non-standardized Keccak hash functions. -func TestKeccak(t *testing.T) { - tests := []struct { - fn func() hash.Hash - data []byte - want string - }{ - { - NewLegacyKeccak256, - []byte("abc"), - "4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45", - }, - } - - for _, u := range tests { - h := u.fn() - h.Write(u.data) - got := h.Sum(nil) - want := decodeHex(u.want) - if !bytes.Equal(got, want) { - t.Errorf("unexpected hash for size %d: got '%x' want '%s'", h.Size()*8, got, u.want) - } - } -} - -// TestUnalignedWrite tests that writing data in an arbitrary pattern with -// small input buffers. -func TestUnalignedWrite(t *testing.T) { - testUnalignedAndGeneric(t, func(impl string) { - buf := sequentialBytes(0x10000) - for alg, df := range testDigests { - d := df() - d.Reset() - d.Write(buf) - want := d.Sum(nil) - d.Reset() - for i := 0; i < len(buf); { - // Cycle through offsets which make a 137 byte sequence. - // Because 137 is prime this sequence should exercise all corner cases. - offsets := [17]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1} - for _, j := range offsets { - if v := len(buf) - i; v < j { - j = v - } - d.Write(buf[i : i+j]) - i += j - } - } - got := d.Sum(nil) - if !bytes.Equal(got, want) { - t.Errorf("Unaligned writes, implementation=%s, alg=%s\ngot %q, want %q", impl, alg, got, want) - } - } - }) -} - -// TestAppend checks that appending works when reallocation is necessary. -func TestAppend(t *testing.T) { - testUnalignedAndGeneric(t, func(impl string) { - d := New224() - - for capacity := 2; capacity <= 66; capacity += 64 { - // The first time around the loop, Sum will have to reallocate. - // The second time, it will not. - buf := make([]byte, 2, capacity) - d.Reset() - d.Write([]byte{0xcc}) - buf = d.Sum(buf) - expected := "0000DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39" - if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected { - t.Errorf("got %s, want %s", got, expected) - } - } - }) -} - -// TestAppendNoRealloc tests that appending works when no reallocation is necessary. -func TestAppendNoRealloc(t *testing.T) { - testUnalignedAndGeneric(t, func(impl string) { - buf := make([]byte, 1, 200) - d := New224() - d.Write([]byte{0xcc}) - buf = d.Sum(buf) - expected := "00DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39" - if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected { - t.Errorf("%s: got %s, want %s", impl, got, expected) - } - }) -} - -// TestSqueezing checks that squeezing the full output a single time produces -// the same output as repeatedly squeezing the instance. -func TestSqueezing(t *testing.T) { - testUnalignedAndGeneric(t, func(impl string) { - for functionName, newShakeHash := range testShakes { - d0 := newShakeHash() - d0.Write([]byte(testString)) - ref := make([]byte, 32) - d0.Read(ref) - - d1 := newShakeHash() - d1.Write([]byte(testString)) - var multiple []byte - for range ref { - one := make([]byte, 1) - d1.Read(one) - multiple = append(multiple, one...) - } - if !bytes.Equal(ref, multiple) { - t.Errorf("%s (%s): squeezing %d bytes one at a time failed", functionName, impl, len(ref)) - } - } - }) -} - -// sequentialBytes produces a buffer of size consecutive bytes 0x00, 0x01, ..., used for testing. -func sequentialBytes(size int) []byte { - result := make([]byte, size) - for i := range result { - result[i] = byte(i) - } - return result -} - -// BenchmarkPermutationFunction measures the speed of the permutation function -// with no input data. -func BenchmarkPermutationFunction(b *testing.B) { - b.SetBytes(int64(200)) - var lanes [25]uint64 - for i := 0; i < b.N; i++ { - keccakF1600(&lanes) - } -} - -// benchmarkHash tests the speed to hash num buffers of buflen each. -func benchmarkHash(b *testing.B, h hash.Hash, size, num int) { - b.StopTimer() - h.Reset() - data := sequentialBytes(size) - b.SetBytes(int64(size * num)) - b.StartTimer() - - var state []byte - for i := 0; i < b.N; i++ { - for j := 0; j < num; j++ { - h.Write(data) - } - state = h.Sum(state[:0]) - } - b.StopTimer() - h.Reset() -} - -// benchmarkShake is specialized to the Shake instances, which don't -// require a copy on reading output. -func benchmarkShake(b *testing.B, h ShakeHash, size, num int) { - b.StopTimer() - h.Reset() - data := sequentialBytes(size) - d := make([]byte, 32) - - b.SetBytes(int64(size * num)) - b.StartTimer() - - for i := 0; i < b.N; i++ { - h.Reset() - for j := 0; j < num; j++ { - h.Write(data) - } - h.Read(d) - } -} - -func BenchmarkSha3_512_MTU(b *testing.B) { benchmarkHash(b, New512(), 1350, 1) } -func BenchmarkSha3_384_MTU(b *testing.B) { benchmarkHash(b, New384(), 1350, 1) } -func BenchmarkSha3_256_MTU(b *testing.B) { benchmarkHash(b, New256(), 1350, 1) } -func BenchmarkSha3_224_MTU(b *testing.B) { benchmarkHash(b, New224(), 1350, 1) } - -func BenchmarkShake128_MTU(b *testing.B) { benchmarkShake(b, NewShake128(), 1350, 1) } -func BenchmarkShake256_MTU(b *testing.B) { benchmarkShake(b, NewShake256(), 1350, 1) } -func BenchmarkShake256_16x(b *testing.B) { benchmarkShake(b, NewShake256(), 16, 1024) } -func BenchmarkShake256_1MiB(b *testing.B) { benchmarkShake(b, NewShake256(), 1024, 1024) } - -func BenchmarkSha3_512_1MiB(b *testing.B) { benchmarkHash(b, New512(), 1024, 1024) } - -func Example_sum() { - buf := []byte("some data to hash") - // A hash needs to be 64 bytes long to have 256-bit collision resistance. - h := make([]byte, 64) - // Compute a 64-byte hash of buf and put it in h. - ShakeSum256(h, buf) - fmt.Printf("%x\n", h) - // Output: 0f65fe41fc353e52c55667bb9e2b27bfcc8476f2c413e9437d272ee3194a4e3146d05ec04a25d16b8f577c19b82d16b1424c3e022e783d2b4da98de3658d363d -} - -func Example_mac() { - k := []byte("this is a secret key; you should generate a strong random key that's at least 32 bytes long") - buf := []byte("and this is some data to authenticate") - // A MAC with 32 bytes of output has 256-bit security strength -- if you use at least a 32-byte-long key. - h := make([]byte, 32) - d := NewShake256() - // Write the key into the hash. - d.Write(k) - // Now write the data. - d.Write(buf) - // Read 32 bytes of output from the hash into h. - d.Read(h) - fmt.Printf("%x\n", h) - // Output: 78de2974bd2711d5549ffd32b753ef0f5fa80a0db2556db60f0987eb8a9218ff -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/testdata/keccakKats.json.deflate b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/testdata/keccakKats.json.deflate deleted file mode 100644 index 62e85ae242..0000000000 Binary files a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3/testdata/keccakKats.json.deflate and /dev/null differ diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client.go deleted file mode 100644 index 09c04bae64..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client.go +++ /dev/null @@ -1,683 +0,0 @@ -// Copyright 2012 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 agent implements the ssh-agent protocol, and provides both -// a client and a server. The client can talk to a standard ssh-agent -// that uses UNIX sockets, and one could implement an alternative -// ssh-agent process using the sample server. -// -// References: -// [PROTOCOL.agent]: https://tools.ietf.org/html/draft-miller-ssh-agent-00 -package agent - -import ( - "bytes" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rsa" - "encoding/base64" - "encoding/binary" - "errors" - "fmt" - "io" - "math/big" - "sync" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// Agent represents the capabilities of an ssh-agent. -type Agent interface { - // List returns the identities known to the agent. - List() ([]*Key, error) - - // Sign has the agent sign the data using a protocol 2 key as defined - // in [PROTOCOL.agent] section 2.6.2. - Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) - - // Add adds a private key to the agent. - Add(key AddedKey) error - - // Remove removes all identities with the given public key. - Remove(key ssh.PublicKey) error - - // RemoveAll removes all identities. - RemoveAll() error - - // Lock locks the agent. Sign and Remove will fail, and List will empty an empty list. - Lock(passphrase []byte) error - - // Unlock undoes the effect of Lock - Unlock(passphrase []byte) error - - // Signers returns signers for all the known keys. - Signers() ([]ssh.Signer, error) -} - -// ConstraintExtension describes an optional constraint defined by users. -type ConstraintExtension struct { - // ExtensionName consist of a UTF-8 string suffixed by the - // implementation domain following the naming scheme defined - // in Section 4.2 of [RFC4251], e.g. "foo@example.com". - ExtensionName string - // ExtensionDetails contains the actual content of the extended - // constraint. - ExtensionDetails []byte -} - -// AddedKey describes an SSH key to be added to an Agent. -type AddedKey struct { - // PrivateKey must be a *rsa.PrivateKey, *dsa.PrivateKey or - // *ecdsa.PrivateKey, which will be inserted into the agent. - PrivateKey interface{} - // Certificate, if not nil, is communicated to the agent and will be - // stored with the key. - Certificate *ssh.Certificate - // Comment is an optional, free-form string. - Comment string - // LifetimeSecs, if not zero, is the number of seconds that the - // agent will store the key for. - LifetimeSecs uint32 - // ConfirmBeforeUse, if true, requests that the agent confirm with the - // user before each use of this key. - ConfirmBeforeUse bool - // ConstraintExtensions are the experimental or private-use constraints - // defined by users. - ConstraintExtensions []ConstraintExtension -} - -// See [PROTOCOL.agent], section 3. -const ( - agentRequestV1Identities = 1 - agentRemoveAllV1Identities = 9 - - // 3.2 Requests from client to agent for protocol 2 key operations - agentAddIdentity = 17 - agentRemoveIdentity = 18 - agentRemoveAllIdentities = 19 - agentAddIDConstrained = 25 - - // 3.3 Key-type independent requests from client to agent - agentAddSmartcardKey = 20 - agentRemoveSmartcardKey = 21 - agentLock = 22 - agentUnlock = 23 - agentAddSmartcardKeyConstrained = 26 - - // 3.7 Key constraint identifiers - agentConstrainLifetime = 1 - agentConstrainConfirm = 2 - agentConstrainExtension = 3 -) - -// maxAgentResponseBytes is the maximum agent reply size that is accepted. This -// is a sanity check, not a limit in the spec. -const maxAgentResponseBytes = 16 << 20 - -// Agent messages: -// These structures mirror the wire format of the corresponding ssh agent -// messages found in [PROTOCOL.agent]. - -// 3.4 Generic replies from agent to client -const agentFailure = 5 - -type failureAgentMsg struct{} - -const agentSuccess = 6 - -type successAgentMsg struct{} - -// See [PROTOCOL.agent], section 2.5.2. -const agentRequestIdentities = 11 - -type requestIdentitiesAgentMsg struct{} - -// See [PROTOCOL.agent], section 2.5.2. -const agentIdentitiesAnswer = 12 - -type identitiesAnswerAgentMsg struct { - NumKeys uint32 `sshtype:"12"` - Keys []byte `ssh:"rest"` -} - -// See [PROTOCOL.agent], section 2.6.2. -const agentSignRequest = 13 - -type signRequestAgentMsg struct { - KeyBlob []byte `sshtype:"13"` - Data []byte - Flags uint32 -} - -// See [PROTOCOL.agent], section 2.6.2. - -// 3.6 Replies from agent to client for protocol 2 key operations -const agentSignResponse = 14 - -type signResponseAgentMsg struct { - SigBlob []byte `sshtype:"14"` -} - -type publicKey struct { - Format string - Rest []byte `ssh:"rest"` -} - -// 3.7 Key constraint identifiers -type constrainLifetimeAgentMsg struct { - LifetimeSecs uint32 `sshtype:"1"` -} - -type constrainExtensionAgentMsg struct { - ExtensionName string `sshtype:"3"` - ExtensionDetails []byte - - // Rest is a field used for parsing, not part of message - Rest []byte `ssh:"rest"` -} - -// Key represents a protocol 2 public key as defined in -// [PROTOCOL.agent], section 2.5.2. -type Key struct { - Format string - Blob []byte - Comment string -} - -func clientErr(err error) error { - return fmt.Errorf("agent: client error: %v", err) -} - -// String returns the storage form of an agent key with the format, base64 -// encoded serialized key, and the comment if it is not empty. -func (k *Key) String() string { - s := string(k.Format) + " " + base64.StdEncoding.EncodeToString(k.Blob) - - if k.Comment != "" { - s += " " + k.Comment - } - - return s -} - -// Type returns the public key type. -func (k *Key) Type() string { - return k.Format -} - -// Marshal returns key blob to satisfy the ssh.PublicKey interface. -func (k *Key) Marshal() []byte { - return k.Blob -} - -// Verify satisfies the ssh.PublicKey interface. -func (k *Key) Verify(data []byte, sig *ssh.Signature) error { - pubKey, err := ssh.ParsePublicKey(k.Blob) - if err != nil { - return fmt.Errorf("agent: bad public key: %v", err) - } - return pubKey.Verify(data, sig) -} - -type wireKey struct { - Format string - Rest []byte `ssh:"rest"` -} - -func parseKey(in []byte) (out *Key, rest []byte, err error) { - var record struct { - Blob []byte - Comment string - Rest []byte `ssh:"rest"` - } - - if err := ssh.Unmarshal(in, &record); err != nil { - return nil, nil, err - } - - var wk wireKey - if err := ssh.Unmarshal(record.Blob, &wk); err != nil { - return nil, nil, err - } - - return &Key{ - Format: wk.Format, - Blob: record.Blob, - Comment: record.Comment, - }, record.Rest, nil -} - -// client is a client for an ssh-agent process. -type client struct { - // conn is typically a *net.UnixConn - conn io.ReadWriter - // mu is used to prevent concurrent access to the agent - mu sync.Mutex -} - -// NewClient returns an Agent that talks to an ssh-agent process over -// the given connection. -func NewClient(rw io.ReadWriter) Agent { - return &client{conn: rw} -} - -// call sends an RPC to the agent. On success, the reply is -// unmarshaled into reply and replyType is set to the first byte of -// the reply, which contains the type of the message. -func (c *client) call(req []byte) (reply interface{}, err error) { - c.mu.Lock() - defer c.mu.Unlock() - - msg := make([]byte, 4+len(req)) - binary.BigEndian.PutUint32(msg, uint32(len(req))) - copy(msg[4:], req) - if _, err = c.conn.Write(msg); err != nil { - return nil, clientErr(err) - } - - var respSizeBuf [4]byte - if _, err = io.ReadFull(c.conn, respSizeBuf[:]); err != nil { - return nil, clientErr(err) - } - respSize := binary.BigEndian.Uint32(respSizeBuf[:]) - if respSize > maxAgentResponseBytes { - return nil, clientErr(err) - } - - buf := make([]byte, respSize) - if _, err = io.ReadFull(c.conn, buf); err != nil { - return nil, clientErr(err) - } - reply, err = unmarshal(buf) - if err != nil { - return nil, clientErr(err) - } - return reply, err -} - -func (c *client) simpleCall(req []byte) error { - resp, err := c.call(req) - if err != nil { - return err - } - if _, ok := resp.(*successAgentMsg); ok { - return nil - } - return errors.New("agent: failure") -} - -func (c *client) RemoveAll() error { - return c.simpleCall([]byte{agentRemoveAllIdentities}) -} - -func (c *client) Remove(key ssh.PublicKey) error { - req := ssh.Marshal(&agentRemoveIdentityMsg{ - KeyBlob: key.Marshal(), - }) - return c.simpleCall(req) -} - -func (c *client) Lock(passphrase []byte) error { - req := ssh.Marshal(&agentLockMsg{ - Passphrase: passphrase, - }) - return c.simpleCall(req) -} - -func (c *client) Unlock(passphrase []byte) error { - req := ssh.Marshal(&agentUnlockMsg{ - Passphrase: passphrase, - }) - return c.simpleCall(req) -} - -// List returns the identities known to the agent. -func (c *client) List() ([]*Key, error) { - // see [PROTOCOL.agent] section 2.5.2. - req := []byte{agentRequestIdentities} - - msg, err := c.call(req) - if err != nil { - return nil, err - } - - switch msg := msg.(type) { - case *identitiesAnswerAgentMsg: - if msg.NumKeys > maxAgentResponseBytes/8 { - return nil, errors.New("agent: too many keys in agent reply") - } - keys := make([]*Key, msg.NumKeys) - data := msg.Keys - for i := uint32(0); i < msg.NumKeys; i++ { - var key *Key - var err error - if key, data, err = parseKey(data); err != nil { - return nil, err - } - keys[i] = key - } - return keys, nil - case *failureAgentMsg: - return nil, errors.New("agent: failed to list keys") - } - panic("unreachable") -} - -// Sign has the agent sign the data using a protocol 2 key as defined -// in [PROTOCOL.agent] section 2.6.2. -func (c *client) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) { - req := ssh.Marshal(signRequestAgentMsg{ - KeyBlob: key.Marshal(), - Data: data, - }) - - msg, err := c.call(req) - if err != nil { - return nil, err - } - - switch msg := msg.(type) { - case *signResponseAgentMsg: - var sig ssh.Signature - if err := ssh.Unmarshal(msg.SigBlob, &sig); err != nil { - return nil, err - } - - return &sig, nil - case *failureAgentMsg: - return nil, errors.New("agent: failed to sign challenge") - } - panic("unreachable") -} - -// unmarshal parses an agent message in packet, returning the parsed -// form and the message type of packet. -func unmarshal(packet []byte) (interface{}, error) { - if len(packet) < 1 { - return nil, errors.New("agent: empty packet") - } - var msg interface{} - switch packet[0] { - case agentFailure: - return new(failureAgentMsg), nil - case agentSuccess: - return new(successAgentMsg), nil - case agentIdentitiesAnswer: - msg = new(identitiesAnswerAgentMsg) - case agentSignResponse: - msg = new(signResponseAgentMsg) - case agentV1IdentitiesAnswer: - msg = new(agentV1IdentityMsg) - default: - return nil, fmt.Errorf("agent: unknown type tag %d", packet[0]) - } - if err := ssh.Unmarshal(packet, msg); err != nil { - return nil, err - } - return msg, nil -} - -type rsaKeyMsg struct { - Type string `sshtype:"17|25"` - N *big.Int - E *big.Int - D *big.Int - Iqmp *big.Int // IQMP = Inverse Q Mod P - P *big.Int - Q *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type dsaKeyMsg struct { - Type string `sshtype:"17|25"` - P *big.Int - Q *big.Int - G *big.Int - Y *big.Int - X *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type ecdsaKeyMsg struct { - Type string `sshtype:"17|25"` - Curve string - KeyBytes []byte - D *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type ed25519KeyMsg struct { - Type string `sshtype:"17|25"` - Pub []byte - Priv []byte - Comments string - Constraints []byte `ssh:"rest"` -} - -// Insert adds a private key to the agent. -func (c *client) insertKey(s interface{}, comment string, constraints []byte) error { - var req []byte - switch k := s.(type) { - case *rsa.PrivateKey: - if len(k.Primes) != 2 { - return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes)) - } - k.Precompute() - req = ssh.Marshal(rsaKeyMsg{ - Type: ssh.KeyAlgoRSA, - N: k.N, - E: big.NewInt(int64(k.E)), - D: k.D, - Iqmp: k.Precomputed.Qinv, - P: k.Primes[0], - Q: k.Primes[1], - Comments: comment, - Constraints: constraints, - }) - case *dsa.PrivateKey: - req = ssh.Marshal(dsaKeyMsg{ - Type: ssh.KeyAlgoDSA, - P: k.P, - Q: k.Q, - G: k.G, - Y: k.Y, - X: k.X, - Comments: comment, - Constraints: constraints, - }) - case *ecdsa.PrivateKey: - nistID := fmt.Sprintf("nistp%d", k.Params().BitSize) - req = ssh.Marshal(ecdsaKeyMsg{ - Type: "ecdsa-sha2-" + nistID, - Curve: nistID, - KeyBytes: elliptic.Marshal(k.Curve, k.X, k.Y), - D: k.D, - Comments: comment, - Constraints: constraints, - }) - case *ed25519.PrivateKey: - req = ssh.Marshal(ed25519KeyMsg{ - Type: ssh.KeyAlgoED25519, - Pub: []byte(*k)[32:], - Priv: []byte(*k), - Comments: comment, - Constraints: constraints, - }) - default: - return fmt.Errorf("agent: unsupported key type %T", s) - } - - // if constraints are present then the message type needs to be changed. - if len(constraints) != 0 { - req[0] = agentAddIDConstrained - } - - resp, err := c.call(req) - if err != nil { - return err - } - if _, ok := resp.(*successAgentMsg); ok { - return nil - } - return errors.New("agent: failure") -} - -type rsaCertMsg struct { - Type string `sshtype:"17|25"` - CertBytes []byte - D *big.Int - Iqmp *big.Int // IQMP = Inverse Q Mod P - P *big.Int - Q *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type dsaCertMsg struct { - Type string `sshtype:"17|25"` - CertBytes []byte - X *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type ecdsaCertMsg struct { - Type string `sshtype:"17|25"` - CertBytes []byte - D *big.Int - Comments string - Constraints []byte `ssh:"rest"` -} - -type ed25519CertMsg struct { - Type string `sshtype:"17|25"` - CertBytes []byte - Pub []byte - Priv []byte - Comments string - Constraints []byte `ssh:"rest"` -} - -// Add adds a private key to the agent. If a certificate is given, -// that certificate is added instead as public key. -func (c *client) Add(key AddedKey) error { - var constraints []byte - - if secs := key.LifetimeSecs; secs != 0 { - constraints = append(constraints, ssh.Marshal(constrainLifetimeAgentMsg{secs})...) - } - - if key.ConfirmBeforeUse { - constraints = append(constraints, agentConstrainConfirm) - } - - cert := key.Certificate - if cert == nil { - return c.insertKey(key.PrivateKey, key.Comment, constraints) - } - return c.insertCert(key.PrivateKey, cert, key.Comment, constraints) -} - -func (c *client) insertCert(s interface{}, cert *ssh.Certificate, comment string, constraints []byte) error { - var req []byte - switch k := s.(type) { - case *rsa.PrivateKey: - if len(k.Primes) != 2 { - return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes)) - } - k.Precompute() - req = ssh.Marshal(rsaCertMsg{ - Type: cert.Type(), - CertBytes: cert.Marshal(), - D: k.D, - Iqmp: k.Precomputed.Qinv, - P: k.Primes[0], - Q: k.Primes[1], - Comments: comment, - Constraints: constraints, - }) - case *dsa.PrivateKey: - req = ssh.Marshal(dsaCertMsg{ - Type: cert.Type(), - CertBytes: cert.Marshal(), - X: k.X, - Comments: comment, - Constraints: constraints, - }) - case *ecdsa.PrivateKey: - req = ssh.Marshal(ecdsaCertMsg{ - Type: cert.Type(), - CertBytes: cert.Marshal(), - D: k.D, - Comments: comment, - Constraints: constraints, - }) - case *ed25519.PrivateKey: - req = ssh.Marshal(ed25519CertMsg{ - Type: cert.Type(), - CertBytes: cert.Marshal(), - Pub: []byte(*k)[32:], - Priv: []byte(*k), - Comments: comment, - Constraints: constraints, - }) - default: - return fmt.Errorf("agent: unsupported key type %T", s) - } - - // if constraints are present then the message type needs to be changed. - if len(constraints) != 0 { - req[0] = agentAddIDConstrained - } - - signer, err := ssh.NewSignerFromKey(s) - if err != nil { - return err - } - if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 { - return errors.New("agent: signer and cert have different public key") - } - - resp, err := c.call(req) - if err != nil { - return err - } - if _, ok := resp.(*successAgentMsg); ok { - return nil - } - return errors.New("agent: failure") -} - -// Signers provides a callback for client authentication. -func (c *client) Signers() ([]ssh.Signer, error) { - keys, err := c.List() - if err != nil { - return nil, err - } - - var result []ssh.Signer - for _, k := range keys { - result = append(result, &agentKeyringSigner{c, k}) - } - return result, nil -} - -type agentKeyringSigner struct { - agent *client - pub ssh.PublicKey -} - -func (s *agentKeyringSigner) PublicKey() ssh.PublicKey { - return s.pub -} - -func (s *agentKeyringSigner) Sign(rand io.Reader, data []byte) (*ssh.Signature, error) { - // The agent has its own entropy source, so the rand argument is ignored. - return s.agent.Sign(s.pub, data) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client_test.go deleted file mode 100644 index c8f81f92d6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/client_test.go +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2012 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 agent - -import ( - "bytes" - "crypto/rand" - "errors" - "net" - "os" - "os/exec" - "path/filepath" - "strconv" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// startOpenSSHAgent executes ssh-agent, and returns an Agent interface to it. -func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func()) { - if testing.Short() { - // ssh-agent is not always available, and the key - // types supported vary by platform. - t.Skip("skipping test due to -short") - } - - bin, err := exec.LookPath("ssh-agent") - if err != nil { - t.Skip("could not find ssh-agent") - } - - cmd := exec.Command(bin, "-s") - out, err := cmd.Output() - if err != nil { - t.Fatalf("cmd.Output: %v", err) - } - - /* Output looks like: - - SSH_AUTH_SOCK=/tmp/ssh-P65gpcqArqvH/agent.15541; export SSH_AUTH_SOCK; - SSH_AGENT_PID=15542; export SSH_AGENT_PID; - echo Agent pid 15542; - */ - fields := bytes.Split(out, []byte(";")) - line := bytes.SplitN(fields[0], []byte("="), 2) - line[0] = bytes.TrimLeft(line[0], "\n") - if string(line[0]) != "SSH_AUTH_SOCK" { - t.Fatalf("could not find key SSH_AUTH_SOCK in %q", fields[0]) - } - socket = string(line[1]) - - line = bytes.SplitN(fields[2], []byte("="), 2) - line[0] = bytes.TrimLeft(line[0], "\n") - if string(line[0]) != "SSH_AGENT_PID" { - t.Fatalf("could not find key SSH_AGENT_PID in %q", fields[2]) - } - pidStr := line[1] - pid, err := strconv.Atoi(string(pidStr)) - if err != nil { - t.Fatalf("Atoi(%q): %v", pidStr, err) - } - - conn, err := net.Dial("unix", string(socket)) - if err != nil { - t.Fatalf("net.Dial: %v", err) - } - - ac := NewClient(conn) - return ac, socket, func() { - proc, _ := os.FindProcess(pid) - if proc != nil { - proc.Kill() - } - conn.Close() - os.RemoveAll(filepath.Dir(socket)) - } -} - -// startKeyringAgent uses Keyring to simulate a ssh-agent Server and returns a client. -func startKeyringAgent(t *testing.T) (client Agent, cleanup func()) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - go ServeAgent(NewKeyring(), c2) - - return NewClient(c1), func() { - c1.Close() - c2.Close() - } -} - -func testOpenSSHAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { - agent, _, cleanup := startOpenSSHAgent(t) - defer cleanup() - - testAgentInterface(t, agent, key, cert, lifetimeSecs) -} - -func testKeyringAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { - agent, cleanup := startKeyringAgent(t) - defer cleanup() - - testAgentInterface(t, agent, key, cert, lifetimeSecs) -} - -func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { - signer, err := ssh.NewSignerFromKey(key) - if err != nil { - t.Fatalf("NewSignerFromKey(%T): %v", key, err) - } - // The agent should start up empty. - if keys, err := agent.List(); err != nil { - t.Fatalf("RequestIdentities: %v", err) - } else if len(keys) > 0 { - t.Fatalf("got %d keys, want 0: %v", len(keys), keys) - } - - // Attempt to insert the key, with certificate if specified. - var pubKey ssh.PublicKey - if cert != nil { - err = agent.Add(AddedKey{ - PrivateKey: key, - Certificate: cert, - Comment: "comment", - LifetimeSecs: lifetimeSecs, - }) - pubKey = cert - } else { - err = agent.Add(AddedKey{PrivateKey: key, Comment: "comment", LifetimeSecs: lifetimeSecs}) - pubKey = signer.PublicKey() - } - if err != nil { - t.Fatalf("insert(%T): %v", key, err) - } - - // Did the key get inserted successfully? - if keys, err := agent.List(); err != nil { - t.Fatalf("List: %v", err) - } else if len(keys) != 1 { - t.Fatalf("got %v, want 1 key", keys) - } else if keys[0].Comment != "comment" { - t.Fatalf("key comment: got %v, want %v", keys[0].Comment, "comment") - } else if !bytes.Equal(keys[0].Blob, pubKey.Marshal()) { - t.Fatalf("key mismatch") - } - - // Can the agent make a valid signature? - data := []byte("hello") - sig, err := agent.Sign(pubKey, data) - if err != nil { - t.Fatalf("Sign(%s): %v", pubKey.Type(), err) - } - - if err := pubKey.Verify(data, sig); err != nil { - t.Fatalf("Verify(%s): %v", pubKey.Type(), err) - } - - // If the key has a lifetime, is it removed when it should be? - if lifetimeSecs > 0 { - time.Sleep(time.Second*time.Duration(lifetimeSecs) + 100*time.Millisecond) - keys, err := agent.List() - if err != nil { - t.Fatalf("List: %v", err) - } - if len(keys) > 0 { - t.Fatalf("key not expired") - } - } - -} - -func TestAgent(t *testing.T) { - for _, keyType := range []string{"rsa", "dsa", "ecdsa", "ed25519"} { - testOpenSSHAgent(t, testPrivateKeys[keyType], nil, 0) - testKeyringAgent(t, testPrivateKeys[keyType], nil, 0) - } -} - -func TestCert(t *testing.T) { - cert := &ssh.Certificate{ - Key: testPublicKeys["rsa"], - ValidBefore: ssh.CertTimeInfinity, - CertType: ssh.UserCert, - } - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - - testOpenSSHAgent(t, testPrivateKeys["rsa"], cert, 0) - testKeyringAgent(t, testPrivateKeys["rsa"], cert, 0) -} - -// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and -// therefore is buffered (net.Pipe deadlocks if both sides start with -// a write.) -func netPipe() (net.Conn, net.Conn, error) { - listener, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - listener, err = net.Listen("tcp", "[::1]:0") - if err != nil { - return nil, nil, err - } - } - defer listener.Close() - c1, err := net.Dial("tcp", listener.Addr().String()) - if err != nil { - return nil, nil, err - } - - c2, err := listener.Accept() - if err != nil { - c1.Close() - return nil, nil, err - } - - return c1, c2, nil -} - -func TestAuth(t *testing.T) { - agent, _, cleanup := startOpenSSHAgent(t) - defer cleanup() - - a, b, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - defer a.Close() - defer b.Close() - - if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["rsa"], Comment: "comment"}); err != nil { - t.Errorf("Add: %v", err) - } - - serverConf := ssh.ServerConfig{} - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.PublicKeyCallback = func(c ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) { - if bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) { - return nil, nil - } - - return nil, errors.New("pubkey rejected") - } - - go func() { - conn, _, _, err := ssh.NewServerConn(a, &serverConf) - if err != nil { - t.Fatalf("Server: %v", err) - } - conn.Close() - }() - - conf := ssh.ClientConfig{ - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - } - conf.Auth = append(conf.Auth, ssh.PublicKeysCallback(agent.Signers)) - conn, _, _, err := ssh.NewClientConn(b, "", &conf) - if err != nil { - t.Fatalf("NewClientConn: %v", err) - } - conn.Close() -} - -func TestLockOpenSSHAgent(t *testing.T) { - agent, _, cleanup := startOpenSSHAgent(t) - defer cleanup() - testLockAgent(agent, t) -} - -func TestLockKeyringAgent(t *testing.T) { - agent, cleanup := startKeyringAgent(t) - defer cleanup() - testLockAgent(agent, t) -} - -func testLockAgent(agent Agent, t *testing.T) { - if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["rsa"], Comment: "comment 1"}); err != nil { - t.Errorf("Add: %v", err) - } - if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["dsa"], Comment: "comment dsa"}); err != nil { - t.Errorf("Add: %v", err) - } - if keys, err := agent.List(); err != nil { - t.Errorf("List: %v", err) - } else if len(keys) != 2 { - t.Errorf("Want 2 keys, got %v", keys) - } - - passphrase := []byte("secret") - if err := agent.Lock(passphrase); err != nil { - t.Errorf("Lock: %v", err) - } - - if keys, err := agent.List(); err != nil { - t.Errorf("List: %v", err) - } else if len(keys) != 0 { - t.Errorf("Want 0 keys, got %v", keys) - } - - signer, _ := ssh.NewSignerFromKey(testPrivateKeys["rsa"]) - if _, err := agent.Sign(signer.PublicKey(), []byte("hello")); err == nil { - t.Fatalf("Sign did not fail") - } - - if err := agent.Remove(signer.PublicKey()); err == nil { - t.Fatalf("Remove did not fail") - } - - if err := agent.RemoveAll(); err == nil { - t.Fatalf("RemoveAll did not fail") - } - - if err := agent.Unlock(nil); err == nil { - t.Errorf("Unlock with wrong passphrase succeeded") - } - if err := agent.Unlock(passphrase); err != nil { - t.Errorf("Unlock: %v", err) - } - - if err := agent.Remove(signer.PublicKey()); err != nil { - t.Fatalf("Remove: %v", err) - } - - if keys, err := agent.List(); err != nil { - t.Errorf("List: %v", err) - } else if len(keys) != 1 { - t.Errorf("Want 1 keys, got %v", keys) - } -} - -func testOpenSSHAgentLifetime(t *testing.T) { - agent, _, cleanup := startOpenSSHAgent(t) - defer cleanup() - testAgentLifetime(t, agent) -} - -func testKeyringAgentLifetime(t *testing.T) { - agent, cleanup := startKeyringAgent(t) - defer cleanup() - testAgentLifetime(t, agent) -} - -func testAgentLifetime(t *testing.T, agent Agent) { - for _, keyType := range []string{"rsa", "dsa", "ecdsa"} { - // Add private keys to the agent. - err := agent.Add(AddedKey{ - PrivateKey: testPrivateKeys[keyType], - Comment: "comment", - LifetimeSecs: 1, - }) - if err != nil { - t.Fatalf("add: %v", err) - } - // Add certs to the agent. - cert := &ssh.Certificate{ - Key: testPublicKeys[keyType], - ValidBefore: ssh.CertTimeInfinity, - CertType: ssh.UserCert, - } - cert.SignCert(rand.Reader, testSigners[keyType]) - err = agent.Add(AddedKey{ - PrivateKey: testPrivateKeys[keyType], - Certificate: cert, - Comment: "comment", - LifetimeSecs: 1, - }) - if err != nil { - t.Fatalf("add: %v", err) - } - } - time.Sleep(1100 * time.Millisecond) - if keys, err := agent.List(); err != nil { - t.Errorf("List: %v", err) - } else if len(keys) != 0 { - t.Errorf("Want 0 keys, got %v", len(keys)) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/example_test.go deleted file mode 100644 index 8ce1d29d4f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016 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 agent_test - -import ( - "log" - "net" - "os" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent" -) - -func ExampleClientAgent() { - // ssh-agent has a UNIX socket under $SSH_AUTH_SOCK - socket := os.Getenv("SSH_AUTH_SOCK") - conn, err := net.Dial("unix", socket) - if err != nil { - log.Fatalf("net.Dial: %v", err) - } - agentClient := agent.NewClient(conn) - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - // Use a callback rather than PublicKeys - // so we only consult the agent once the remote server - // wants it. - ssh.PublicKeysCallback(agentClient.Signers), - }, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - } - - sshc, err := ssh.Dial("tcp", "localhost:22", config) - if err != nil { - log.Fatalf("Dial: %v", err) - } - // .. use sshc - sshc.Close() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/forward.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/forward.go deleted file mode 100644 index 768892a5a0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/forward.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2014 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 agent - -import ( - "errors" - "io" - "net" - "sync" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// RequestAgentForwarding sets up agent forwarding for the session. -// ForwardToAgent or ForwardToRemote should be called to route -// the authentication requests. -func RequestAgentForwarding(session *ssh.Session) error { - ok, err := session.SendRequest("auth-agent-req@openssh.com", true, nil) - if err != nil { - return err - } - if !ok { - return errors.New("forwarding request denied") - } - return nil -} - -// ForwardToAgent routes authentication requests to the given keyring. -func ForwardToAgent(client *ssh.Client, keyring Agent) error { - channels := client.HandleChannelOpen(channelType) - if channels == nil { - return errors.New("agent: already have handler for " + channelType) - } - - go func() { - for ch := range channels { - channel, reqs, err := ch.Accept() - if err != nil { - continue - } - go ssh.DiscardRequests(reqs) - go func() { - ServeAgent(keyring, channel) - channel.Close() - }() - } - }() - return nil -} - -const channelType = "auth-agent@openssh.com" - -// ForwardToRemote routes authentication requests to the ssh-agent -// process serving on the given unix socket. -func ForwardToRemote(client *ssh.Client, addr string) error { - channels := client.HandleChannelOpen(channelType) - if channels == nil { - return errors.New("agent: already have handler for " + channelType) - } - conn, err := net.Dial("unix", addr) - if err != nil { - return err - } - conn.Close() - - go func() { - for ch := range channels { - channel, reqs, err := ch.Accept() - if err != nil { - continue - } - go ssh.DiscardRequests(reqs) - go forwardUnixSocket(channel, addr) - } - }() - return nil -} - -func forwardUnixSocket(channel ssh.Channel, addr string) { - conn, err := net.Dial("unix", addr) - if err != nil { - return - } - - var wg sync.WaitGroup - wg.Add(2) - go func() { - io.Copy(conn, channel) - conn.(*net.UnixConn).CloseWrite() - wg.Done() - }() - go func() { - io.Copy(channel, conn) - channel.CloseWrite() - wg.Done() - }() - - wg.Wait() - conn.Close() - channel.Close() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring.go deleted file mode 100644 index 0ba37983b8..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2014 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 agent - -import ( - "bytes" - "crypto/rand" - "crypto/subtle" - "errors" - "fmt" - "sync" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -type privKey struct { - signer ssh.Signer - comment string - expire *time.Time -} - -type keyring struct { - mu sync.Mutex - keys []privKey - - locked bool - passphrase []byte -} - -var errLocked = errors.New("agent: locked") - -// NewKeyring returns an Agent that holds keys in memory. It is safe -// for concurrent use by multiple goroutines. -func NewKeyring() Agent { - return &keyring{} -} - -// RemoveAll removes all identities. -func (r *keyring) RemoveAll() error { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return errLocked - } - - r.keys = nil - return nil -} - -// removeLocked does the actual key removal. The caller must already be holding the -// keyring mutex. -func (r *keyring) removeLocked(want []byte) error { - found := false - for i := 0; i < len(r.keys); { - if bytes.Equal(r.keys[i].signer.PublicKey().Marshal(), want) { - found = true - r.keys[i] = r.keys[len(r.keys)-1] - r.keys = r.keys[:len(r.keys)-1] - continue - } else { - i++ - } - } - - if !found { - return errors.New("agent: key not found") - } - return nil -} - -// Remove removes all identities with the given public key. -func (r *keyring) Remove(key ssh.PublicKey) error { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return errLocked - } - - return r.removeLocked(key.Marshal()) -} - -// Lock locks the agent. Sign and Remove will fail, and List will return an empty list. -func (r *keyring) Lock(passphrase []byte) error { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return errLocked - } - - r.locked = true - r.passphrase = passphrase - return nil -} - -// Unlock undoes the effect of Lock -func (r *keyring) Unlock(passphrase []byte) error { - r.mu.Lock() - defer r.mu.Unlock() - if !r.locked { - return errors.New("agent: not locked") - } - if 1 != subtle.ConstantTimeCompare(passphrase, r.passphrase) { - return fmt.Errorf("agent: incorrect passphrase") - } - - r.locked = false - r.passphrase = nil - return nil -} - -// expireKeysLocked removes expired keys from the keyring. If a key was added -// with a lifetimesecs contraint and seconds >= lifetimesecs seconds have -// ellapsed, it is removed. The caller *must* be holding the keyring mutex. -func (r *keyring) expireKeysLocked() { - for _, k := range r.keys { - if k.expire != nil && time.Now().After(*k.expire) { - r.removeLocked(k.signer.PublicKey().Marshal()) - } - } -} - -// List returns the identities known to the agent. -func (r *keyring) List() ([]*Key, error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - // section 2.7: locked agents return empty. - return nil, nil - } - - r.expireKeysLocked() - var ids []*Key - for _, k := range r.keys { - pub := k.signer.PublicKey() - ids = append(ids, &Key{ - Format: pub.Type(), - Blob: pub.Marshal(), - Comment: k.comment}) - } - return ids, nil -} - -// Insert adds a private key to the keyring. If a certificate -// is given, that certificate is added as public key. Note that -// any constraints given are ignored. -func (r *keyring) Add(key AddedKey) error { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return errLocked - } - signer, err := ssh.NewSignerFromKey(key.PrivateKey) - - if err != nil { - return err - } - - if cert := key.Certificate; cert != nil { - signer, err = ssh.NewCertSigner(cert, signer) - if err != nil { - return err - } - } - - p := privKey{ - signer: signer, - comment: key.Comment, - } - - if key.LifetimeSecs > 0 { - t := time.Now().Add(time.Duration(key.LifetimeSecs) * time.Second) - p.expire = &t - } - - r.keys = append(r.keys, p) - - return nil -} - -// Sign returns a signature for the data. -func (r *keyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return nil, errLocked - } - - r.expireKeysLocked() - wanted := key.Marshal() - for _, k := range r.keys { - if bytes.Equal(k.signer.PublicKey().Marshal(), wanted) { - return k.signer.Sign(rand.Reader, data) - } - } - return nil, errors.New("not found") -} - -// Signers returns signers for all the known keys. -func (r *keyring) Signers() ([]ssh.Signer, error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.locked { - return nil, errLocked - } - - r.expireKeysLocked() - s := make([]ssh.Signer, 0, len(r.keys)) - for _, k := range r.keys { - s = append(s, k.signer) - } - return s, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring_test.go deleted file mode 100644 index e5d50e7e0d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/keyring_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2015 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 agent - -import "testing" - -func addTestKey(t *testing.T, a Agent, keyName string) { - err := a.Add(AddedKey{ - PrivateKey: testPrivateKeys[keyName], - Comment: keyName, - }) - if err != nil { - t.Fatalf("failed to add key %q: %v", keyName, err) - } -} - -func removeTestKey(t *testing.T, a Agent, keyName string) { - err := a.Remove(testPublicKeys[keyName]) - if err != nil { - t.Fatalf("failed to remove key %q: %v", keyName, err) - } -} - -func validateListedKeys(t *testing.T, a Agent, expectedKeys []string) { - listedKeys, err := a.List() - if err != nil { - t.Fatalf("failed to list keys: %v", err) - return - } - actualKeys := make(map[string]bool) - for _, key := range listedKeys { - actualKeys[key.Comment] = true - } - - matchedKeys := make(map[string]bool) - for _, expectedKey := range expectedKeys { - if !actualKeys[expectedKey] { - t.Fatalf("expected key %q, but was not found", expectedKey) - } else { - matchedKeys[expectedKey] = true - } - } - - for actualKey := range actualKeys { - if !matchedKeys[actualKey] { - t.Fatalf("key %q was found, but was not expected", actualKey) - } - } -} - -func TestKeyringAddingAndRemoving(t *testing.T) { - keyNames := []string{"dsa", "ecdsa", "rsa", "user"} - - // add all test private keys - k := NewKeyring() - for _, keyName := range keyNames { - addTestKey(t, k, keyName) - } - validateListedKeys(t, k, keyNames) - - // remove a key in the middle - keyToRemove := keyNames[1] - keyNames = append(keyNames[:1], keyNames[2:]...) - - removeTestKey(t, k, keyToRemove) - validateListedKeys(t, k, keyNames) - - // remove all keys - err := k.RemoveAll() - if err != nil { - t.Fatalf("failed to remove all keys: %v", err) - } - validateListedKeys(t, k, []string{}) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server.go deleted file mode 100644 index f9e2317c41..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server.go +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright 2012 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 agent - -import ( - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rsa" - "encoding/binary" - "errors" - "fmt" - "io" - "log" - "math/big" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// Server wraps an Agent and uses it to implement the agent side of -// the SSH-agent, wire protocol. -type server struct { - agent Agent -} - -func (s *server) processRequestBytes(reqData []byte) []byte { - rep, err := s.processRequest(reqData) - if err != nil { - if err != errLocked { - // TODO(hanwen): provide better logging interface? - log.Printf("agent %d: %v", reqData[0], err) - } - return []byte{agentFailure} - } - - if err == nil && rep == nil { - return []byte{agentSuccess} - } - - return ssh.Marshal(rep) -} - -func marshalKey(k *Key) []byte { - var record struct { - Blob []byte - Comment string - } - record.Blob = k.Marshal() - record.Comment = k.Comment - - return ssh.Marshal(&record) -} - -// See [PROTOCOL.agent], section 2.5.1. -const agentV1IdentitiesAnswer = 2 - -type agentV1IdentityMsg struct { - Numkeys uint32 `sshtype:"2"` -} - -type agentRemoveIdentityMsg struct { - KeyBlob []byte `sshtype:"18"` -} - -type agentLockMsg struct { - Passphrase []byte `sshtype:"22"` -} - -type agentUnlockMsg struct { - Passphrase []byte `sshtype:"23"` -} - -func (s *server) processRequest(data []byte) (interface{}, error) { - switch data[0] { - case agentRequestV1Identities: - return &agentV1IdentityMsg{0}, nil - - case agentRemoveAllV1Identities: - return nil, nil - - case agentRemoveIdentity: - var req agentRemoveIdentityMsg - if err := ssh.Unmarshal(data, &req); err != nil { - return nil, err - } - - var wk wireKey - if err := ssh.Unmarshal(req.KeyBlob, &wk); err != nil { - return nil, err - } - - return nil, s.agent.Remove(&Key{Format: wk.Format, Blob: req.KeyBlob}) - - case agentRemoveAllIdentities: - return nil, s.agent.RemoveAll() - - case agentLock: - var req agentLockMsg - if err := ssh.Unmarshal(data, &req); err != nil { - return nil, err - } - - return nil, s.agent.Lock(req.Passphrase) - - case agentUnlock: - var req agentUnlockMsg - if err := ssh.Unmarshal(data, &req); err != nil { - return nil, err - } - return nil, s.agent.Unlock(req.Passphrase) - - case agentSignRequest: - var req signRequestAgentMsg - if err := ssh.Unmarshal(data, &req); err != nil { - return nil, err - } - - var wk wireKey - if err := ssh.Unmarshal(req.KeyBlob, &wk); err != nil { - return nil, err - } - - k := &Key{ - Format: wk.Format, - Blob: req.KeyBlob, - } - - sig, err := s.agent.Sign(k, req.Data) // TODO(hanwen): flags. - if err != nil { - return nil, err - } - return &signResponseAgentMsg{SigBlob: ssh.Marshal(sig)}, nil - - case agentRequestIdentities: - keys, err := s.agent.List() - if err != nil { - return nil, err - } - - rep := identitiesAnswerAgentMsg{ - NumKeys: uint32(len(keys)), - } - for _, k := range keys { - rep.Keys = append(rep.Keys, marshalKey(k)...) - } - return rep, nil - - case agentAddIDConstrained, agentAddIdentity: - return nil, s.insertIdentity(data) - } - - return nil, fmt.Errorf("unknown opcode %d", data[0]) -} - -func parseConstraints(constraints []byte) (lifetimeSecs uint32, confirmBeforeUse bool, extensions []ConstraintExtension, err error) { - for len(constraints) != 0 { - switch constraints[0] { - case agentConstrainLifetime: - lifetimeSecs = binary.BigEndian.Uint32(constraints[1:5]) - constraints = constraints[5:] - case agentConstrainConfirm: - confirmBeforeUse = true - constraints = constraints[1:] - case agentConstrainExtension: - var msg constrainExtensionAgentMsg - if err = ssh.Unmarshal(constraints, &msg); err != nil { - return 0, false, nil, err - } - extensions = append(extensions, ConstraintExtension{ - ExtensionName: msg.ExtensionName, - ExtensionDetails: msg.ExtensionDetails, - }) - constraints = msg.Rest - default: - return 0, false, nil, fmt.Errorf("unknown constraint type: %d", constraints[0]) - } - } - return -} - -func setConstraints(key *AddedKey, constraintBytes []byte) error { - lifetimeSecs, confirmBeforeUse, constraintExtensions, err := parseConstraints(constraintBytes) - if err != nil { - return err - } - - key.LifetimeSecs = lifetimeSecs - key.ConfirmBeforeUse = confirmBeforeUse - key.ConstraintExtensions = constraintExtensions - return nil -} - -func parseRSAKey(req []byte) (*AddedKey, error) { - var k rsaKeyMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - if k.E.BitLen() > 30 { - return nil, errors.New("agent: RSA public exponent too large") - } - priv := &rsa.PrivateKey{ - PublicKey: rsa.PublicKey{ - E: int(k.E.Int64()), - N: k.N, - }, - D: k.D, - Primes: []*big.Int{k.P, k.Q}, - } - priv.Precompute() - - addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseEd25519Key(req []byte) (*AddedKey, error) { - var k ed25519KeyMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - priv := ed25519.PrivateKey(k.Priv) - - addedKey := &AddedKey{PrivateKey: &priv, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseDSAKey(req []byte) (*AddedKey, error) { - var k dsaKeyMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - priv := &dsa.PrivateKey{ - PublicKey: dsa.PublicKey{ - Parameters: dsa.Parameters{ - P: k.P, - Q: k.Q, - G: k.G, - }, - Y: k.Y, - }, - X: k.X, - } - - addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func unmarshalECDSA(curveName string, keyBytes []byte, privScalar *big.Int) (priv *ecdsa.PrivateKey, err error) { - priv = &ecdsa.PrivateKey{ - D: privScalar, - } - - switch curveName { - case "nistp256": - priv.Curve = elliptic.P256() - case "nistp384": - priv.Curve = elliptic.P384() - case "nistp521": - priv.Curve = elliptic.P521() - default: - return nil, fmt.Errorf("agent: unknown curve %q", curveName) - } - - priv.X, priv.Y = elliptic.Unmarshal(priv.Curve, keyBytes) - if priv.X == nil || priv.Y == nil { - return nil, errors.New("agent: point not on curve") - } - - return priv, nil -} - -func parseEd25519Cert(req []byte) (*AddedKey, error) { - var k ed25519CertMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - pubKey, err := ssh.ParsePublicKey(k.CertBytes) - if err != nil { - return nil, err - } - priv := ed25519.PrivateKey(k.Priv) - cert, ok := pubKey.(*ssh.Certificate) - if !ok { - return nil, errors.New("agent: bad ED25519 certificate") - } - - addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseECDSAKey(req []byte) (*AddedKey, error) { - var k ecdsaKeyMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - - priv, err := unmarshalECDSA(k.Curve, k.KeyBytes, k.D) - if err != nil { - return nil, err - } - - addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseRSACert(req []byte) (*AddedKey, error) { - var k rsaCertMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - - pubKey, err := ssh.ParsePublicKey(k.CertBytes) - if err != nil { - return nil, err - } - - cert, ok := pubKey.(*ssh.Certificate) - if !ok { - return nil, errors.New("agent: bad RSA certificate") - } - - // An RSA publickey as marshaled by rsaPublicKey.Marshal() in keys.go - var rsaPub struct { - Name string - E *big.Int - N *big.Int - } - if err := ssh.Unmarshal(cert.Key.Marshal(), &rsaPub); err != nil { - return nil, fmt.Errorf("agent: Unmarshal failed to parse public key: %v", err) - } - - if rsaPub.E.BitLen() > 30 { - return nil, errors.New("agent: RSA public exponent too large") - } - - priv := rsa.PrivateKey{ - PublicKey: rsa.PublicKey{ - E: int(rsaPub.E.Int64()), - N: rsaPub.N, - }, - D: k.D, - Primes: []*big.Int{k.Q, k.P}, - } - priv.Precompute() - - addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseDSACert(req []byte) (*AddedKey, error) { - var k dsaCertMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - pubKey, err := ssh.ParsePublicKey(k.CertBytes) - if err != nil { - return nil, err - } - cert, ok := pubKey.(*ssh.Certificate) - if !ok { - return nil, errors.New("agent: bad DSA certificate") - } - - // A DSA publickey as marshaled by dsaPublicKey.Marshal() in keys.go - var w struct { - Name string - P, Q, G, Y *big.Int - } - if err := ssh.Unmarshal(cert.Key.Marshal(), &w); err != nil { - return nil, fmt.Errorf("agent: Unmarshal failed to parse public key: %v", err) - } - - priv := &dsa.PrivateKey{ - PublicKey: dsa.PublicKey{ - Parameters: dsa.Parameters{ - P: w.P, - Q: w.Q, - G: w.G, - }, - Y: w.Y, - }, - X: k.X, - } - - addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func parseECDSACert(req []byte) (*AddedKey, error) { - var k ecdsaCertMsg - if err := ssh.Unmarshal(req, &k); err != nil { - return nil, err - } - - pubKey, err := ssh.ParsePublicKey(k.CertBytes) - if err != nil { - return nil, err - } - cert, ok := pubKey.(*ssh.Certificate) - if !ok { - return nil, errors.New("agent: bad ECDSA certificate") - } - - // An ECDSA publickey as marshaled by ecdsaPublicKey.Marshal() in keys.go - var ecdsaPub struct { - Name string - ID string - Key []byte - } - if err := ssh.Unmarshal(cert.Key.Marshal(), &ecdsaPub); err != nil { - return nil, err - } - - priv, err := unmarshalECDSA(ecdsaPub.ID, ecdsaPub.Key, k.D) - if err != nil { - return nil, err - } - - addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments} - if err := setConstraints(addedKey, k.Constraints); err != nil { - return nil, err - } - return addedKey, nil -} - -func (s *server) insertIdentity(req []byte) error { - var record struct { - Type string `sshtype:"17|25"` - Rest []byte `ssh:"rest"` - } - - if err := ssh.Unmarshal(req, &record); err != nil { - return err - } - - var addedKey *AddedKey - var err error - - switch record.Type { - case ssh.KeyAlgoRSA: - addedKey, err = parseRSAKey(req) - case ssh.KeyAlgoDSA: - addedKey, err = parseDSAKey(req) - case ssh.KeyAlgoECDSA256, ssh.KeyAlgoECDSA384, ssh.KeyAlgoECDSA521: - addedKey, err = parseECDSAKey(req) - case ssh.KeyAlgoED25519: - addedKey, err = parseEd25519Key(req) - case ssh.CertAlgoRSAv01: - addedKey, err = parseRSACert(req) - case ssh.CertAlgoDSAv01: - addedKey, err = parseDSACert(req) - case ssh.CertAlgoECDSA256v01, ssh.CertAlgoECDSA384v01, ssh.CertAlgoECDSA521v01: - addedKey, err = parseECDSACert(req) - case ssh.CertAlgoED25519v01: - addedKey, err = parseEd25519Cert(req) - default: - return fmt.Errorf("agent: not implemented: %q", record.Type) - } - - if err != nil { - return err - } - return s.agent.Add(*addedKey) -} - -// ServeAgent serves the agent protocol on the given connection. It -// returns when an I/O error occurs. -func ServeAgent(agent Agent, c io.ReadWriter) error { - s := &server{agent} - - var length [4]byte - for { - if _, err := io.ReadFull(c, length[:]); err != nil { - return err - } - l := binary.BigEndian.Uint32(length[:]) - if l > maxAgentResponseBytes { - // We also cap requests. - return fmt.Errorf("agent: request too large: %d", l) - } - - req := make([]byte, l) - if _, err := io.ReadFull(c, req); err != nil { - return err - } - - repData := s.processRequestBytes(req) - if len(repData) > maxAgentResponseBytes { - return fmt.Errorf("agent: reply too large: %d bytes", len(repData)) - } - - binary.BigEndian.PutUint32(length[:], uint32(len(repData))) - if _, err := c.Write(length[:]); err != nil { - return err - } - if _, err := c.Write(repData); err != nil { - return err - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server_test.go deleted file mode 100644 index 5a8c9d656c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/server_test.go +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright 2012 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 agent - -import ( - "crypto" - "crypto/rand" - "fmt" - pseudorand "math/rand" - "reflect" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -func TestServer(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - client := NewClient(c1) - - go ServeAgent(NewKeyring(), c2) - - testAgentInterface(t, client, testPrivateKeys["rsa"], nil, 0) -} - -func TestLockServer(t *testing.T) { - testLockAgent(NewKeyring(), t) -} - -func TestSetupForwardAgent(t *testing.T) { - a, b, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - defer a.Close() - defer b.Close() - - _, socket, cleanup := startOpenSSHAgent(t) - defer cleanup() - - serverConf := ssh.ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["rsa"]) - incoming := make(chan *ssh.ServerConn, 1) - go func() { - conn, _, _, err := ssh.NewServerConn(a, &serverConf) - if err != nil { - t.Fatalf("Server: %v", err) - } - incoming <- conn - }() - - conf := ssh.ClientConfig{ - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - } - conn, chans, reqs, err := ssh.NewClientConn(b, "", &conf) - if err != nil { - t.Fatalf("NewClientConn: %v", err) - } - client := ssh.NewClient(conn, chans, reqs) - - if err := ForwardToRemote(client, socket); err != nil { - t.Fatalf("SetupForwardAgent: %v", err) - } - - server := <-incoming - ch, reqs, err := server.OpenChannel(channelType, nil) - if err != nil { - t.Fatalf("OpenChannel(%q): %v", channelType, err) - } - go ssh.DiscardRequests(reqs) - - agentClient := NewClient(ch) - testAgentInterface(t, agentClient, testPrivateKeys["rsa"], nil, 0) - conn.Close() -} - -func TestV1ProtocolMessages(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - c := NewClient(c1) - - go ServeAgent(NewKeyring(), c2) - - testV1ProtocolMessages(t, c.(*client)) -} - -func testV1ProtocolMessages(t *testing.T, c *client) { - reply, err := c.call([]byte{agentRequestV1Identities}) - if err != nil { - t.Fatalf("v1 request all failed: %v", err) - } - if msg, ok := reply.(*agentV1IdentityMsg); !ok || msg.Numkeys != 0 { - t.Fatalf("invalid request all response: %#v", reply) - } - - reply, err = c.call([]byte{agentRemoveAllV1Identities}) - if err != nil { - t.Fatalf("v1 remove all failed: %v", err) - } - if _, ok := reply.(*successAgentMsg); !ok { - t.Fatalf("invalid remove all response: %#v", reply) - } -} - -func verifyKey(sshAgent Agent) error { - keys, err := sshAgent.List() - if err != nil { - return fmt.Errorf("listing keys: %v", err) - } - - if len(keys) != 1 { - return fmt.Errorf("bad number of keys found. expected 1, got %d", len(keys)) - } - - buf := make([]byte, 128) - if _, err := rand.Read(buf); err != nil { - return fmt.Errorf("rand: %v", err) - } - - sig, err := sshAgent.Sign(keys[0], buf) - if err != nil { - return fmt.Errorf("sign: %v", err) - } - - if err := keys[0].Verify(buf, sig); err != nil { - return fmt.Errorf("verify: %v", err) - } - return nil -} - -func addKeyToAgent(key crypto.PrivateKey) error { - sshAgent := NewKeyring() - if err := sshAgent.Add(AddedKey{PrivateKey: key}); err != nil { - return fmt.Errorf("add: %v", err) - } - return verifyKey(sshAgent) -} - -func TestKeyTypes(t *testing.T) { - for k, v := range testPrivateKeys { - if err := addKeyToAgent(v); err != nil { - t.Errorf("error adding key type %s, %v", k, err) - } - if err := addCertToAgentSock(v, nil); err != nil { - t.Errorf("error adding key type %s, %v", k, err) - } - } -} - -func addCertToAgentSock(key crypto.PrivateKey, cert *ssh.Certificate) error { - a, b, err := netPipe() - if err != nil { - return err - } - agentServer := NewKeyring() - go ServeAgent(agentServer, a) - - agentClient := NewClient(b) - if err := agentClient.Add(AddedKey{PrivateKey: key, Certificate: cert}); err != nil { - return fmt.Errorf("add: %v", err) - } - return verifyKey(agentClient) -} - -func addCertToAgent(key crypto.PrivateKey, cert *ssh.Certificate) error { - sshAgent := NewKeyring() - if err := sshAgent.Add(AddedKey{PrivateKey: key, Certificate: cert}); err != nil { - return fmt.Errorf("add: %v", err) - } - return verifyKey(sshAgent) -} - -func TestCertTypes(t *testing.T) { - for keyType, key := range testPublicKeys { - cert := &ssh.Certificate{ - ValidPrincipals: []string{"gopher1"}, - ValidAfter: 0, - ValidBefore: ssh.CertTimeInfinity, - Key: key, - Serial: 1, - CertType: ssh.UserCert, - SignatureKey: testPublicKeys["rsa"], - Permissions: ssh.Permissions{ - CriticalOptions: map[string]string{}, - Extensions: map[string]string{}, - }, - } - if err := cert.SignCert(rand.Reader, testSigners["rsa"]); err != nil { - t.Fatalf("signcert: %v", err) - } - if err := addCertToAgent(testPrivateKeys[keyType], cert); err != nil { - t.Fatalf("%v", err) - } - if err := addCertToAgentSock(testPrivateKeys[keyType], cert); err != nil { - t.Fatalf("%v", err) - } - } -} - -func TestParseConstraints(t *testing.T) { - // Test LifetimeSecs - var msg = constrainLifetimeAgentMsg{pseudorand.Uint32()} - lifetimeSecs, _, _, err := parseConstraints(ssh.Marshal(msg)) - if err != nil { - t.Fatalf("parseConstraints: %v", err) - } - if lifetimeSecs != msg.LifetimeSecs { - t.Errorf("got lifetime %v, want %v", lifetimeSecs, msg.LifetimeSecs) - } - - // Test ConfirmBeforeUse - _, confirmBeforeUse, _, err := parseConstraints([]byte{agentConstrainConfirm}) - if err != nil { - t.Fatalf("%v", err) - } - if !confirmBeforeUse { - t.Error("got comfirmBeforeUse == false") - } - - // Test ConstraintExtensions - var data []byte - var expect []ConstraintExtension - for i := 0; i < 10; i++ { - var ext = ConstraintExtension{ - ExtensionName: fmt.Sprintf("name%d", i), - ExtensionDetails: []byte(fmt.Sprintf("details: %d", i)), - } - expect = append(expect, ext) - data = append(data, agentConstrainExtension) - data = append(data, ssh.Marshal(ext)...) - } - _, _, extensions, err := parseConstraints(data) - if err != nil { - t.Fatalf("%v", err) - } - if !reflect.DeepEqual(expect, extensions) { - t.Errorf("got extension %v, want %v", extensions, expect) - } - - // Test Unknown Constraint - _, _, _, err = parseConstraints([]byte{128}) - if err == nil || !strings.Contains(err.Error(), "unknown constraint") { - t.Errorf("unexpected error: %v", err) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/testdata_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/testdata_test.go deleted file mode 100644 index be5fcae932..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent/testdata_test.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2014 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. - -// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places: -// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three -// instances. - -package agent - -import ( - "crypto/rand" - "fmt" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -var ( - testPrivateKeys map[string]interface{} - testSigners map[string]ssh.Signer - testPublicKeys map[string]ssh.PublicKey -) - -func init() { - var err error - - n := len(testdata.PEMBytes) - testPrivateKeys = make(map[string]interface{}, n) - testSigners = make(map[string]ssh.Signer, n) - testPublicKeys = make(map[string]ssh.PublicKey, n) - for t, k := range testdata.PEMBytes { - testPrivateKeys[t], err = ssh.ParseRawPrivateKey(k) - if err != nil { - panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err)) - } - testSigners[t], err = ssh.NewSignerFromKey(testPrivateKeys[t]) - if err != nil { - panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err)) - } - testPublicKeys[t] = testSigners[t].PublicKey() - } - - // Create a cert and sign it for use in tests. - testCert := &ssh.Certificate{ - Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage - ValidAfter: 0, // unix epoch - ValidBefore: ssh.CertTimeInfinity, // The end of currently representable time. - Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - Key: testPublicKeys["ecdsa"], - SignatureKey: testPublicKeys["rsa"], - Permissions: ssh.Permissions{ - CriticalOptions: map[string]string{}, - Extensions: map[string]string{}, - }, - } - testCert.SignCert(rand.Reader, testSigners["rsa"]) - testPrivateKeys["cert"] = testPrivateKeys["ecdsa"] - testSigners["cert"], err = ssh.NewCertSigner(testCert, testSigners["ecdsa"]) - if err != nil { - panic(fmt.Sprintf("Unable to create certificate signer: %v", err)) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/benchmark_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/benchmark_test.go deleted file mode 100644 index 20c3307731..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/benchmark_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "errors" - "io" - "net" - "testing" -) - -type server struct { - *ServerConn - chans <-chan NewChannel -} - -func newServer(c net.Conn, conf *ServerConfig) (*server, error) { - sconn, chans, reqs, err := NewServerConn(c, conf) - if err != nil { - return nil, err - } - go DiscardRequests(reqs) - return &server{sconn, chans}, nil -} - -func (s *server) Accept() (NewChannel, error) { - n, ok := <-s.chans - if !ok { - return nil, io.EOF - } - return n, nil -} - -func sshPipe() (Conn, *server, error) { - c1, c2, err := netPipe() - if err != nil { - return nil, nil, err - } - - clientConf := ClientConfig{ - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - } - serverConf := ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["ecdsa"]) - done := make(chan *server, 1) - go func() { - server, err := newServer(c2, &serverConf) - if err != nil { - done <- nil - } - done <- server - }() - - client, _, reqs, err := NewClientConn(c1, "", &clientConf) - if err != nil { - return nil, nil, err - } - - server := <-done - if server == nil { - return nil, nil, errors.New("server handshake failed.") - } - go DiscardRequests(reqs) - - return client, server, nil -} - -func BenchmarkEndToEnd(b *testing.B) { - b.StopTimer() - - client, server, err := sshPipe() - if err != nil { - b.Fatalf("sshPipe: %v", err) - } - - defer client.Close() - defer server.Close() - - size := (1 << 20) - input := make([]byte, size) - output := make([]byte, size) - b.SetBytes(int64(size)) - done := make(chan int, 1) - - go func() { - newCh, err := server.Accept() - if err != nil { - b.Fatalf("Client: %v", err) - } - ch, incoming, err := newCh.Accept() - go DiscardRequests(incoming) - for i := 0; i < b.N; i++ { - if _, err := io.ReadFull(ch, output); err != nil { - b.Fatalf("ReadFull: %v", err) - } - } - ch.Close() - done <- 1 - }() - - ch, in, err := client.OpenChannel("speed", nil) - if err != nil { - b.Fatalf("OpenChannel: %v", err) - } - go DiscardRequests(in) - - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - if _, err := ch.Write(input); err != nil { - b.Fatalf("WriteFull: %v", err) - } - } - ch.Close() - b.StopTimer() - - <-done -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer.go deleted file mode 100644 index 1ab07d078d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2012 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 ssh - -import ( - "io" - "sync" -) - -// buffer provides a linked list buffer for data exchange -// between producer and consumer. Theoretically the buffer is -// of unlimited capacity as it does no allocation of its own. -type buffer struct { - // protects concurrent access to head, tail and closed - *sync.Cond - - head *element // the buffer that will be read first - tail *element // the buffer that will be read last - - closed bool -} - -// An element represents a single link in a linked list. -type element struct { - buf []byte - next *element -} - -// newBuffer returns an empty buffer that is not closed. -func newBuffer() *buffer { - e := new(element) - b := &buffer{ - Cond: newCond(), - head: e, - tail: e, - } - return b -} - -// write makes buf available for Read to receive. -// buf must not be modified after the call to write. -func (b *buffer) write(buf []byte) { - b.Cond.L.Lock() - e := &element{buf: buf} - b.tail.next = e - b.tail = e - b.Cond.Signal() - b.Cond.L.Unlock() -} - -// eof closes the buffer. Reads from the buffer once all -// the data has been consumed will receive io.EOF. -func (b *buffer) eof() { - b.Cond.L.Lock() - b.closed = true - b.Cond.Signal() - b.Cond.L.Unlock() -} - -// Read reads data from the internal buffer in buf. Reads will block -// if no data is available, or until the buffer is closed. -func (b *buffer) Read(buf []byte) (n int, err error) { - b.Cond.L.Lock() - defer b.Cond.L.Unlock() - - for len(buf) > 0 { - // if there is data in b.head, copy it - if len(b.head.buf) > 0 { - r := copy(buf, b.head.buf) - buf, b.head.buf = buf[r:], b.head.buf[r:] - n += r - continue - } - // if there is a next buffer, make it the head - if len(b.head.buf) == 0 && b.head != b.tail { - b.head = b.head.next - continue - } - - // if at least one byte has been copied, return - if n > 0 { - break - } - - // if nothing was read, and there is nothing outstanding - // check to see if the buffer is closed. - if b.closed { - err = io.EOF - break - } - // out of buffers, wait for producer - b.Cond.Wait() - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer_test.go deleted file mode 100644 index d5781cb3da..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/buffer_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "io" - "testing" -) - -var alphabet = []byte("abcdefghijklmnopqrstuvwxyz") - -func TestBufferReadwrite(t *testing.T) { - b := newBuffer() - b.write(alphabet[:10]) - r, _ := b.Read(make([]byte, 10)) - if r != 10 { - t.Fatalf("Expected written == read == 10, written: 10, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:5]) - r, _ = b.Read(make([]byte, 10)) - if r != 5 { - t.Fatalf("Expected written == read == 5, written: 5, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:10]) - r, _ = b.Read(make([]byte, 5)) - if r != 5 { - t.Fatalf("Expected written == 10, read == 5, written: 10, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:5]) - b.write(alphabet[5:15]) - r, _ = b.Read(make([]byte, 10)) - r2, _ := b.Read(make([]byte, 10)) - if r != 10 || r2 != 5 || 15 != r+r2 { - t.Fatal("Expected written == read == 15") - } -} - -func TestBufferClose(t *testing.T) { - b := newBuffer() - b.write(alphabet[:10]) - b.eof() - _, err := b.Read(make([]byte, 5)) - if err != nil { - t.Fatal("expected read of 5 to not return EOF") - } - b = newBuffer() - b.write(alphabet[:10]) - b.eof() - r, err := b.Read(make([]byte, 5)) - r2, err2 := b.Read(make([]byte, 10)) - if r != 5 || r2 != 5 || err != nil || err2 != nil { - t.Fatal("expected reads of 5 and 5") - } - - b = newBuffer() - b.write(alphabet[:10]) - b.eof() - r, err = b.Read(make([]byte, 5)) - r2, err2 = b.Read(make([]byte, 10)) - r3, err3 := b.Read(make([]byte, 10)) - if r != 5 || r2 != 5 || r3 != 0 || err != nil || err2 != nil || err3 != io.EOF { - t.Fatal("expected reads of 5 and 5 and 0, with EOF") - } - - b = newBuffer() - b.write(make([]byte, 5)) - b.write(make([]byte, 10)) - b.eof() - r, err = b.Read(make([]byte, 9)) - r2, err2 = b.Read(make([]byte, 3)) - r3, err3 = b.Read(make([]byte, 3)) - r4, err4 := b.Read(make([]byte, 10)) - if err != nil || err2 != nil || err3 != nil || err4 != io.EOF { - t.Fatalf("Expected EOF on forth read only, err=%v, err2=%v, err3=%v, err4=%v", err, err2, err3, err4) - } - if r != 9 || r2 != 3 || r3 != 3 || r4 != 0 { - t.Fatal("Expected written == read == 15", r, r2, r3, r4) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs.go deleted file mode 100644 index 42106f3f2c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs.go +++ /dev/null @@ -1,521 +0,0 @@ -// Copyright 2012 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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" - "net" - "sort" - "time" -) - -// These constants from [PROTOCOL.certkeys] represent the algorithm names -// for certificate types supported by this package. -const ( - CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" - CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com" - CertAlgoECDSA256v01 = "ecdsa-sha2-nistp256-cert-v01@openssh.com" - CertAlgoECDSA384v01 = "ecdsa-sha2-nistp384-cert-v01@openssh.com" - CertAlgoECDSA521v01 = "ecdsa-sha2-nistp521-cert-v01@openssh.com" - CertAlgoED25519v01 = "ssh-ed25519-cert-v01@openssh.com" -) - -// Certificate types distinguish between host and user -// certificates. The values can be set in the CertType field of -// Certificate. -const ( - UserCert = 1 - HostCert = 2 -) - -// Signature represents a cryptographic signature. -type Signature struct { - Format string - Blob []byte -} - -// CertTimeInfinity can be used for OpenSSHCertV01.ValidBefore to indicate that -// a certificate does not expire. -const CertTimeInfinity = 1<<64 - 1 - -// An Certificate represents an OpenSSH certificate as defined in -// [PROTOCOL.certkeys]?rev=1.8. The Certificate type implements the -// PublicKey interface, so it can be unmarshaled using -// ParsePublicKey. -type Certificate struct { - Nonce []byte - Key PublicKey - Serial uint64 - CertType uint32 - KeyId string - ValidPrincipals []string - ValidAfter uint64 - ValidBefore uint64 - Permissions - Reserved []byte - SignatureKey PublicKey - Signature *Signature -} - -// genericCertData holds the key-independent part of the certificate data. -// Overall, certificates contain an nonce, public key fields and -// key-independent fields. -type genericCertData struct { - Serial uint64 - CertType uint32 - KeyId string - ValidPrincipals []byte - ValidAfter uint64 - ValidBefore uint64 - CriticalOptions []byte - Extensions []byte - Reserved []byte - SignatureKey []byte - Signature []byte -} - -func marshalStringList(namelist []string) []byte { - var to []byte - for _, name := range namelist { - s := struct{ N string }{name} - to = append(to, Marshal(&s)...) - } - return to -} - -type optionsTuple struct { - Key string - Value []byte -} - -type optionsTupleValue struct { - Value string -} - -// serialize a map of critical options or extensions -// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, -// we need two length prefixes for a non-empty string value -func marshalTuples(tups map[string]string) []byte { - keys := make([]string, 0, len(tups)) - for key := range tups { - keys = append(keys, key) - } - sort.Strings(keys) - - var ret []byte - for _, key := range keys { - s := optionsTuple{Key: key} - if value := tups[key]; len(value) > 0 { - s.Value = Marshal(&optionsTupleValue{value}) - } - ret = append(ret, Marshal(&s)...) - } - return ret -} - -// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, -// we need two length prefixes for a non-empty option value -func parseTuples(in []byte) (map[string]string, error) { - tups := map[string]string{} - var lastKey string - var haveLastKey bool - - for len(in) > 0 { - var key, val, extra []byte - var ok bool - - if key, in, ok = parseString(in); !ok { - return nil, errShortRead - } - keyStr := string(key) - // according to [PROTOCOL.certkeys], the names must be in - // lexical order. - if haveLastKey && keyStr <= lastKey { - return nil, fmt.Errorf("ssh: certificate options are not in lexical order") - } - lastKey, haveLastKey = keyStr, true - // the next field is a data field, which if non-empty has a string embedded - if val, in, ok = parseString(in); !ok { - return nil, errShortRead - } - if len(val) > 0 { - val, extra, ok = parseString(val) - if !ok { - return nil, errShortRead - } - if len(extra) > 0 { - return nil, fmt.Errorf("ssh: unexpected trailing data after certificate option value") - } - tups[keyStr] = string(val) - } else { - tups[keyStr] = "" - } - } - return tups, nil -} - -func parseCert(in []byte, privAlgo string) (*Certificate, error) { - nonce, rest, ok := parseString(in) - if !ok { - return nil, errShortRead - } - - key, rest, err := parsePubKey(rest, privAlgo) - if err != nil { - return nil, err - } - - var g genericCertData - if err := Unmarshal(rest, &g); err != nil { - return nil, err - } - - c := &Certificate{ - Nonce: nonce, - Key: key, - Serial: g.Serial, - CertType: g.CertType, - KeyId: g.KeyId, - ValidAfter: g.ValidAfter, - ValidBefore: g.ValidBefore, - } - - for principals := g.ValidPrincipals; len(principals) > 0; { - principal, rest, ok := parseString(principals) - if !ok { - return nil, errShortRead - } - c.ValidPrincipals = append(c.ValidPrincipals, string(principal)) - principals = rest - } - - c.CriticalOptions, err = parseTuples(g.CriticalOptions) - if err != nil { - return nil, err - } - c.Extensions, err = parseTuples(g.Extensions) - if err != nil { - return nil, err - } - c.Reserved = g.Reserved - k, err := ParsePublicKey(g.SignatureKey) - if err != nil { - return nil, err - } - - c.SignatureKey = k - c.Signature, rest, ok = parseSignatureBody(g.Signature) - if !ok || len(rest) > 0 { - return nil, errors.New("ssh: signature parse error") - } - - return c, nil -} - -type openSSHCertSigner struct { - pub *Certificate - signer Signer -} - -// NewCertSigner returns a Signer that signs with the given Certificate, whose -// private key is held by signer. It returns an error if the public key in cert -// doesn't match the key used by signer. -func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) { - if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 { - return nil, errors.New("ssh: signer and cert have different public key") - } - - return &openSSHCertSigner{cert, signer}, nil -} - -func (s *openSSHCertSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - return s.signer.Sign(rand, data) -} - -func (s *openSSHCertSigner) PublicKey() PublicKey { - return s.pub -} - -const sourceAddressCriticalOption = "source-address" - -// CertChecker does the work of verifying a certificate. Its methods -// can be plugged into ClientConfig.HostKeyCallback and -// ServerConfig.PublicKeyCallback. For the CertChecker to work, -// minimally, the IsAuthority callback should be set. -type CertChecker struct { - // SupportedCriticalOptions lists the CriticalOptions that the - // server application layer understands. These are only used - // for user certificates. - SupportedCriticalOptions []string - - // IsUserAuthority should return true if the key is recognized as an - // authority for the given user certificate. This allows for - // certificates to be signed by other certificates. This must be set - // if this CertChecker will be checking user certificates. - IsUserAuthority func(auth PublicKey) bool - - // IsHostAuthority should report whether the key is recognized as - // an authority for this host. This allows for certificates to be - // signed by other keys, and for those other keys to only be valid - // signers for particular hostnames. This must be set if this - // CertChecker will be checking host certificates. - IsHostAuthority func(auth PublicKey, address string) bool - - // Clock is used for verifying time stamps. If nil, time.Now - // is used. - Clock func() time.Time - - // UserKeyFallback is called when CertChecker.Authenticate encounters a - // public key that is not a certificate. It must implement validation - // of user keys or else, if nil, all such keys are rejected. - UserKeyFallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) - - // HostKeyFallback is called when CertChecker.CheckHostKey encounters a - // public key that is not a certificate. It must implement host key - // validation or else, if nil, all such keys are rejected. - HostKeyFallback HostKeyCallback - - // IsRevoked is called for each certificate so that revocation checking - // can be implemented. It should return true if the given certificate - // is revoked and false otherwise. If nil, no certificates are - // considered to have been revoked. - IsRevoked func(cert *Certificate) bool -} - -// CheckHostKey checks a host key certificate. This method can be -// plugged into ClientConfig.HostKeyCallback. -func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey) error { - cert, ok := key.(*Certificate) - if !ok { - if c.HostKeyFallback != nil { - return c.HostKeyFallback(addr, remote, key) - } - return errors.New("ssh: non-certificate host key") - } - if cert.CertType != HostCert { - return fmt.Errorf("ssh: certificate presented as a host key has type %d", cert.CertType) - } - if !c.IsHostAuthority(cert.SignatureKey, addr) { - return fmt.Errorf("ssh: no authorities for hostname: %v", addr) - } - - hostname, _, err := net.SplitHostPort(addr) - if err != nil { - return err - } - - // Pass hostname only as principal for host certificates (consistent with OpenSSH) - return c.CheckCert(hostname, cert) -} - -// Authenticate checks a user certificate. Authenticate can be used as -// a value for ServerConfig.PublicKeyCallback. -func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permissions, error) { - cert, ok := pubKey.(*Certificate) - if !ok { - if c.UserKeyFallback != nil { - return c.UserKeyFallback(conn, pubKey) - } - return nil, errors.New("ssh: normal key pairs not accepted") - } - - if cert.CertType != UserCert { - return nil, fmt.Errorf("ssh: cert has type %d", cert.CertType) - } - if !c.IsUserAuthority(cert.SignatureKey) { - return nil, fmt.Errorf("ssh: certificate signed by unrecognized authority") - } - - if err := c.CheckCert(conn.User(), cert); err != nil { - return nil, err - } - - return &cert.Permissions, nil -} - -// CheckCert checks CriticalOptions, ValidPrincipals, revocation, timestamp and -// the signature of the certificate. -func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { - if c.IsRevoked != nil && c.IsRevoked(cert) { - return fmt.Errorf("ssh: certificate serial %d revoked", cert.Serial) - } - - for opt := range cert.CriticalOptions { - // sourceAddressCriticalOption will be enforced by - // serverAuthenticate - if opt == sourceAddressCriticalOption { - continue - } - - found := false - for _, supp := range c.SupportedCriticalOptions { - if supp == opt { - found = true - break - } - } - if !found { - return fmt.Errorf("ssh: unsupported critical option %q in certificate", opt) - } - } - - if len(cert.ValidPrincipals) > 0 { - // By default, certs are valid for all users/hosts. - found := false - for _, p := range cert.ValidPrincipals { - if p == principal { - found = true - break - } - } - if !found { - return fmt.Errorf("ssh: principal %q not in the set of valid principals for given certificate: %q", principal, cert.ValidPrincipals) - } - } - - clock := c.Clock - if clock == nil { - clock = time.Now - } - - unixNow := clock().Unix() - if after := int64(cert.ValidAfter); after < 0 || unixNow < int64(cert.ValidAfter) { - return fmt.Errorf("ssh: cert is not yet valid") - } - if before := int64(cert.ValidBefore); cert.ValidBefore != uint64(CertTimeInfinity) && (unixNow >= before || before < 0) { - return fmt.Errorf("ssh: cert has expired") - } - if err := cert.SignatureKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil { - return fmt.Errorf("ssh: certificate signature does not verify") - } - - return nil -} - -// SignCert sets c.SignatureKey to the authority's public key and stores a -// Signature, by authority, in the certificate. -func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { - c.Nonce = make([]byte, 32) - if _, err := io.ReadFull(rand, c.Nonce); err != nil { - return err - } - c.SignatureKey = authority.PublicKey() - - sig, err := authority.Sign(rand, c.bytesForSigning()) - if err != nil { - return err - } - c.Signature = sig - return nil -} - -var certAlgoNames = map[string]string{ - KeyAlgoRSA: CertAlgoRSAv01, - KeyAlgoDSA: CertAlgoDSAv01, - KeyAlgoECDSA256: CertAlgoECDSA256v01, - KeyAlgoECDSA384: CertAlgoECDSA384v01, - KeyAlgoECDSA521: CertAlgoECDSA521v01, - KeyAlgoED25519: CertAlgoED25519v01, -} - -// certToPrivAlgo returns the underlying algorithm for a certificate algorithm. -// Panics if a non-certificate algorithm is passed. -func certToPrivAlgo(algo string) string { - for privAlgo, pubAlgo := range certAlgoNames { - if pubAlgo == algo { - return privAlgo - } - } - panic("unknown cert algorithm") -} - -func (cert *Certificate) bytesForSigning() []byte { - c2 := *cert - c2.Signature = nil - out := c2.Marshal() - // Drop trailing signature length. - return out[:len(out)-4] -} - -// Marshal serializes c into OpenSSH's wire format. It is part of the -// PublicKey interface. -func (c *Certificate) Marshal() []byte { - generic := genericCertData{ - Serial: c.Serial, - CertType: c.CertType, - KeyId: c.KeyId, - ValidPrincipals: marshalStringList(c.ValidPrincipals), - ValidAfter: uint64(c.ValidAfter), - ValidBefore: uint64(c.ValidBefore), - CriticalOptions: marshalTuples(c.CriticalOptions), - Extensions: marshalTuples(c.Extensions), - Reserved: c.Reserved, - SignatureKey: c.SignatureKey.Marshal(), - } - if c.Signature != nil { - generic.Signature = Marshal(c.Signature) - } - genericBytes := Marshal(&generic) - keyBytes := c.Key.Marshal() - _, keyBytes, _ = parseString(keyBytes) - prefix := Marshal(&struct { - Name string - Nonce []byte - Key []byte `ssh:"rest"` - }{c.Type(), c.Nonce, keyBytes}) - - result := make([]byte, 0, len(prefix)+len(genericBytes)) - result = append(result, prefix...) - result = append(result, genericBytes...) - return result -} - -// Type returns the key name. It is part of the PublicKey interface. -func (c *Certificate) Type() string { - algo, ok := certAlgoNames[c.Key.Type()] - if !ok { - panic("unknown cert key type " + c.Key.Type()) - } - return algo -} - -// Verify verifies a signature against the certificate's public -// key. It is part of the PublicKey interface. -func (c *Certificate) Verify(data []byte, sig *Signature) error { - return c.Key.Verify(data, sig) -} - -func parseSignatureBody(in []byte) (out *Signature, rest []byte, ok bool) { - format, in, ok := parseString(in) - if !ok { - return - } - - out = &Signature{ - Format: string(format), - } - - if out.Blob, in, ok = parseString(in); !ok { - return - } - - return out, in, ok -} - -func parseSignature(in []byte) (out *Signature, rest []byte, ok bool) { - sigBytes, rest, ok := parseString(in) - if !ok { - return - } - - out, trailing, ok := parseSignatureBody(sigBytes) - if !ok || len(trailing) > 0 { - return nil, nil, false - } - return -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs_test.go deleted file mode 100644 index 6cc77c7505..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/certs_test.go +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "net" - "reflect" - "testing" - "time" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -// Cert generated by ssh-keygen 6.0p1 Debian-4. -// % ssh-keygen -s ca-key -I test user-key -const exampleSSHCert = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgb1srW/W3ZDjYAO45xLYAwzHBDLsJ4Ux6ICFIkTjb1LEAAAADAQABAAAAYQCkoR51poH0wE8w72cqSB8Sszx+vAhzcMdCO0wqHTj7UNENHWEXGrU0E0UQekD7U+yhkhtoyjbPOVIP7hNa6aRk/ezdh/iUnCIt4Jt1v3Z1h1P+hA4QuYFMHNB+rmjPwAcAAAAAAAAAAAAAAAEAAAAEdGVzdAAAAAAAAAAAAAAAAP//////////AAAAAAAAAIIAAAAVcGVybWl0LVgxMS1mb3J3YXJkaW5nAAAAAAAAABdwZXJtaXQtYWdlbnQtZm9yd2FyZGluZwAAAAAAAAAWcGVybWl0LXBvcnQtZm9yd2FyZGluZwAAAAAAAAAKcGVybWl0LXB0eQAAAAAAAAAOcGVybWl0LXVzZXItcmMAAAAAAAAAAAAAAHcAAAAHc3NoLXJzYQAAAAMBAAEAAABhANFS2kaktpSGc+CcmEKPyw9mJC4nZKxHKTgLVZeaGbFZOvJTNzBspQHdy7Q1uKSfktxpgjZnksiu/tFF9ngyY2KFoc+U88ya95IZUycBGCUbBQ8+bhDtw/icdDGQD5WnUwAAAG8AAAAHc3NoLXJzYQAAAGC8Y9Z2LQKhIhxf52773XaWrXdxP0t3GBVo4A10vUWiYoAGepr6rQIoGGXFxT4B9Gp+nEBJjOwKDXPrAevow0T9ca8gZN+0ykbhSrXLE5Ao48rqr3zP4O1/9P7e6gp0gw8=` - -func TestParseCert(t *testing.T) { - authKeyBytes := []byte(exampleSSHCert) - - key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - if len(rest) > 0 { - t.Errorf("rest: got %q, want empty", rest) - } - - if _, ok := key.(*Certificate); !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - - marshaled := MarshalAuthorizedKey(key) - // Before comparison, remove the trailing newline that - // MarshalAuthorizedKey adds. - marshaled = marshaled[:len(marshaled)-1] - if !bytes.Equal(authKeyBytes, marshaled) { - t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) - } -} - -// Cert generated by ssh-keygen OpenSSH_6.8p1 OS X 10.10.3 -// % ssh-keygen -s ca -I testcert -O source-address=192.168.1.0/24 -O force-command=/bin/sleep user.pub -// user.pub key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMN -// Critical Options: -// force-command /bin/sleep -// source-address 192.168.1.0/24 -// Extensions: -// permit-X11-forwarding -// permit-agent-forwarding -// permit-port-forwarding -// permit-pty -// permit-user-rc -const exampleSSHCertWithOptions = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDyysCJY0XrO1n03EeRRoITnTPdjENFmWDs9X58PP3VUAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMNAAAAAAAAAAAAAAABAAAACHRlc3RjZXJ0AAAAAAAAAAAAAAAA//////////8AAABLAAAADWZvcmNlLWNvbW1hbmQAAAAOAAAACi9iaW4vc2xlZXAAAAAOc291cmNlLWFkZHJlc3MAAAASAAAADjE5Mi4xNjguMS4wLzI0AAAAggAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEAwU+c5ui5A8+J/CFpjW8wCa52bEODA808WWQDCSuTG/eMXNf59v9Y8Pk0F1E9dGCosSNyVcB/hacUrc6He+i97+HJCyKavBsE6GDxrjRyxYqAlfcOXi/IVmaUGiO8OQ39d4GHrjToInKvExSUeleQyH4Y4/e27T/pILAqPFL3fyrvMLT5qU9QyIt6zIpa7GBP5+urouNavMprV3zsfIqNBbWypinOQAw823a5wN+zwXnhZrgQiHZ/USG09Y6k98y1dTVz8YHlQVR4D3lpTAsKDKJ5hCH9WU4fdf+lU8OyNGaJ/vz0XNqxcToe1l4numLTnaoSuH89pHryjqurB7lJKwAAAQ8AAAAHc3NoLXJzYQAAAQCaHvUIoPL1zWUHIXLvu96/HU1s/i4CAW2IIEuGgxCUCiFj6vyTyYtgxQxcmbfZf6eaITlS6XJZa7Qq4iaFZh75C1DXTX8labXhRSD4E2t//AIP9MC1rtQC5xo6FmbQ+BoKcDskr+mNACcbRSxs3IL3bwCfWDnIw2WbVox9ZdcthJKk4UoCW4ix4QwdHw7zlddlz++fGEEVhmTbll1SUkycGApPFBsAYRTMupUJcYPIeReBI/m8XfkoMk99bV8ZJQTAd7OekHY2/48Ff53jLmyDjP7kNw1F8OaPtkFs6dGJXta4krmaekPy87j+35In5hFj7yoOqvSbmYUkeX70/GGQ` - -func TestParseCertWithOptions(t *testing.T) { - opts := map[string]string{ - "source-address": "192.168.1.0/24", - "force-command": "/bin/sleep", - } - exts := map[string]string{ - "permit-X11-forwarding": "", - "permit-agent-forwarding": "", - "permit-port-forwarding": "", - "permit-pty": "", - "permit-user-rc": "", - } - authKeyBytes := []byte(exampleSSHCertWithOptions) - - key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - if len(rest) > 0 { - t.Errorf("rest: got %q, want empty", rest) - } - cert, ok := key.(*Certificate) - if !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - if !reflect.DeepEqual(cert.CriticalOptions, opts) { - t.Errorf("unexpected critical options - got %v, want %v", cert.CriticalOptions, opts) - } - if !reflect.DeepEqual(cert.Extensions, exts) { - t.Errorf("unexpected Extensions - got %v, want %v", cert.Extensions, exts) - } - marshaled := MarshalAuthorizedKey(key) - // Before comparison, remove the trailing newline that - // MarshalAuthorizedKey adds. - marshaled = marshaled[:len(marshaled)-1] - if !bytes.Equal(authKeyBytes, marshaled) { - t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) - } -} - -func TestValidateCert(t *testing.T) { - key, _, _, _, err := ParseAuthorizedKey([]byte(exampleSSHCert)) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - validCert, ok := key.(*Certificate) - if !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - checker := CertChecker{} - checker.IsUserAuthority = func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), validCert.SignatureKey.Marshal()) - } - - if err := checker.CheckCert("user", validCert); err != nil { - t.Errorf("Unable to validate certificate: %v", err) - } - invalidCert := &Certificate{ - Key: testPublicKeys["rsa"], - SignatureKey: testPublicKeys["ecdsa"], - ValidBefore: CertTimeInfinity, - Signature: &Signature{}, - } - if err := checker.CheckCert("user", invalidCert); err == nil { - t.Error("Invalid cert signature passed validation") - } -} - -func TestValidateCertTime(t *testing.T) { - cert := Certificate{ - ValidPrincipals: []string{"user"}, - Key: testPublicKeys["rsa"], - ValidAfter: 50, - ValidBefore: 100, - } - - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - - for ts, ok := range map[int64]bool{ - 25: false, - 50: true, - 99: true, - 100: false, - 125: false, - } { - checker := CertChecker{ - Clock: func() time.Time { return time.Unix(ts, 0) }, - } - checker.IsUserAuthority = func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), - testPublicKeys["ecdsa"].Marshal()) - } - - if v := checker.CheckCert("user", &cert); (v == nil) != ok { - t.Errorf("Authenticate(%d): %v", ts, v) - } - } -} - -// TODO(hanwen): tests for -// -// host keys: -// * fallbacks - -func TestHostKeyCert(t *testing.T) { - cert := &Certificate{ - ValidPrincipals: []string{"hostname", "hostname.domain", "otherhost"}, - Key: testPublicKeys["rsa"], - ValidBefore: CertTimeInfinity, - CertType: HostCert, - } - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - - checker := &CertChecker{ - IsHostAuthority: func(p PublicKey, addr string) bool { - return addr == "hostname:22" && bytes.Equal(testPublicKeys["ecdsa"].Marshal(), p.Marshal()) - }, - } - - certSigner, err := NewCertSigner(cert, testSigners["rsa"]) - if err != nil { - t.Errorf("NewCertSigner: %v", err) - } - - for _, test := range []struct { - addr string - succeed bool - }{ - {addr: "hostname:22", succeed: true}, - {addr: "otherhost:22", succeed: false}, // The certificate is valid for 'otherhost' as hostname, but we only recognize the authority of the signer for the address 'hostname:22' - {addr: "lasthost:22", succeed: false}, - } { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - errc := make(chan error) - - go func() { - conf := ServerConfig{ - NoClientAuth: true, - } - conf.AddHostKey(certSigner) - _, _, _, err := NewServerConn(c1, &conf) - errc <- err - }() - - config := &ClientConfig{ - User: "user", - HostKeyCallback: checker.CheckHostKey, - } - _, _, _, err = NewClientConn(c2, test.addr, config) - - if (err == nil) != test.succeed { - t.Fatalf("NewClientConn(%q): %v", test.addr, err) - } - - err = <-errc - if (err == nil) != test.succeed { - t.Fatalf("NewServerConn(%q): %v", test.addr, err) - } - } -} - -func TestCertTypes(t *testing.T) { - var testVars = []struct { - name string - keys func() Signer - }{ - { - name: CertAlgoECDSA256v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap256"]) - return s - }, - }, - { - name: CertAlgoECDSA384v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap384"]) - return s - }, - }, - { - name: CertAlgoECDSA521v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap521"]) - return s - }, - }, - { - name: CertAlgoED25519v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ed25519"]) - return s - }, - }, - { - name: CertAlgoRSAv01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["rsa"]) - return s - }, - }, - { - name: CertAlgoDSAv01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["dsa"]) - return s - }, - }, - } - - k, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatalf("error generating host key: %v", err) - } - - signer, err := NewSignerFromKey(k) - if err != nil { - t.Fatalf("error generating signer for ssh listener: %v", err) - } - - conf := &ServerConfig{ - PublicKeyCallback: func(c ConnMetadata, k PublicKey) (*Permissions, error) { - return new(Permissions), nil - }, - } - conf.AddHostKey(signer) - - for _, m := range testVars { - t.Run(m.name, func(t *testing.T) { - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, conf) - - priv := m.keys() - if err != nil { - t.Fatalf("error generating ssh pubkey: %v", err) - } - - cert := &Certificate{ - CertType: UserCert, - Key: priv.PublicKey(), - } - cert.SignCert(rand.Reader, priv) - - certSigner, err := NewCertSigner(cert, priv) - if err != nil { - t.Fatalf("error generating cert signer: %v", err) - } - - config := &ClientConfig{ - User: "user", - HostKeyCallback: func(h string, r net.Addr, k PublicKey) error { return nil }, - Auth: []AuthMethod{PublicKeys(certSigner)}, - } - - _, _, _, err = NewClientConn(c2, "", config) - if err != nil { - t.Fatalf("error connecting: %v", err) - } - }) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/channel.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/channel.go deleted file mode 100644 index c0834c00df..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/channel.go +++ /dev/null @@ -1,633 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "encoding/binary" - "errors" - "fmt" - "io" - "log" - "sync" -) - -const ( - minPacketLength = 9 - // channelMaxPacket contains the maximum number of bytes that will be - // sent in a single packet. As per RFC 4253, section 6.1, 32k is also - // the minimum. - channelMaxPacket = 1 << 15 - // We follow OpenSSH here. - channelWindowSize = 64 * channelMaxPacket -) - -// NewChannel represents an incoming request to a channel. It must either be -// accepted for use by calling Accept, or rejected by calling Reject. -type NewChannel interface { - // Accept accepts the channel creation request. It returns the Channel - // and a Go channel containing SSH requests. The Go channel must be - // serviced otherwise the Channel will hang. - Accept() (Channel, <-chan *Request, error) - - // Reject rejects the channel creation request. After calling - // this, no other methods on the Channel may be called. - Reject(reason RejectionReason, message string) error - - // ChannelType returns the type of the channel, as supplied by the - // client. - ChannelType() string - - // ExtraData returns the arbitrary payload for this channel, as supplied - // by the client. This data is specific to the channel type. - ExtraData() []byte -} - -// A Channel is an ordered, reliable, flow-controlled, duplex stream -// that is multiplexed over an SSH connection. -type Channel interface { - // Read reads up to len(data) bytes from the channel. - Read(data []byte) (int, error) - - // Write writes len(data) bytes to the channel. - Write(data []byte) (int, error) - - // Close signals end of channel use. No data may be sent after this - // call. - Close() error - - // CloseWrite signals the end of sending in-band - // data. Requests may still be sent, and the other side may - // still send data - CloseWrite() error - - // SendRequest sends a channel request. If wantReply is true, - // it will wait for a reply and return the result as a - // boolean, otherwise the return value will be false. Channel - // requests are out-of-band messages so they may be sent even - // if the data stream is closed or blocked by flow control. - // If the channel is closed before a reply is returned, io.EOF - // is returned. - SendRequest(name string, wantReply bool, payload []byte) (bool, error) - - // Stderr returns an io.ReadWriter that writes to this channel - // with the extended data type set to stderr. Stderr may - // safely be read and written from a different goroutine than - // Read and Write respectively. - Stderr() io.ReadWriter -} - -// Request is a request sent outside of the normal stream of -// data. Requests can either be specific to an SSH channel, or they -// can be global. -type Request struct { - Type string - WantReply bool - Payload []byte - - ch *channel - mux *mux -} - -// Reply sends a response to a request. It must be called for all requests -// where WantReply is true and is a no-op otherwise. The payload argument is -// ignored for replies to channel-specific requests. -func (r *Request) Reply(ok bool, payload []byte) error { - if !r.WantReply { - return nil - } - - if r.ch == nil { - return r.mux.ackRequest(ok, payload) - } - - return r.ch.ackRequest(ok) -} - -// RejectionReason is an enumeration used when rejecting channel creation -// requests. See RFC 4254, section 5.1. -type RejectionReason uint32 - -const ( - Prohibited RejectionReason = iota + 1 - ConnectionFailed - UnknownChannelType - ResourceShortage -) - -// String converts the rejection reason to human readable form. -func (r RejectionReason) String() string { - switch r { - case Prohibited: - return "administratively prohibited" - case ConnectionFailed: - return "connect failed" - case UnknownChannelType: - return "unknown channel type" - case ResourceShortage: - return "resource shortage" - } - return fmt.Sprintf("unknown reason %d", int(r)) -} - -func min(a uint32, b int) uint32 { - if a < uint32(b) { - return a - } - return uint32(b) -} - -type channelDirection uint8 - -const ( - channelInbound channelDirection = iota - channelOutbound -) - -// channel is an implementation of the Channel interface that works -// with the mux class. -type channel struct { - // R/O after creation - chanType string - extraData []byte - localId, remoteId uint32 - - // maxIncomingPayload and maxRemotePayload are the maximum - // payload sizes of normal and extended data packets for - // receiving and sending, respectively. The wire packet will - // be 9 or 13 bytes larger (excluding encryption overhead). - maxIncomingPayload uint32 - maxRemotePayload uint32 - - mux *mux - - // decided is set to true if an accept or reject message has been sent - // (for outbound channels) or received (for inbound channels). - decided bool - - // direction contains either channelOutbound, for channels created - // locally, or channelInbound, for channels created by the peer. - direction channelDirection - - // Pending internal channel messages. - msg chan interface{} - - // Since requests have no ID, there can be only one request - // with WantReply=true outstanding. This lock is held by a - // goroutine that has such an outgoing request pending. - sentRequestMu sync.Mutex - - incomingRequests chan *Request - - sentEOF bool - - // thread-safe data - remoteWin window - pending *buffer - extPending *buffer - - // windowMu protects myWindow, the flow-control window. - windowMu sync.Mutex - myWindow uint32 - - // writeMu serializes calls to mux.conn.writePacket() and - // protects sentClose and packetPool. This mutex must be - // different from windowMu, as writePacket can block if there - // is a key exchange pending. - writeMu sync.Mutex - sentClose bool - - // packetPool has a buffer for each extended channel ID to - // save allocations during writes. - packetPool map[uint32][]byte -} - -// writePacket sends a packet. If the packet is a channel close, it updates -// sentClose. This method takes the lock c.writeMu. -func (ch *channel) writePacket(packet []byte) error { - ch.writeMu.Lock() - if ch.sentClose { - ch.writeMu.Unlock() - return io.EOF - } - ch.sentClose = (packet[0] == msgChannelClose) - err := ch.mux.conn.writePacket(packet) - ch.writeMu.Unlock() - return err -} - -func (ch *channel) sendMessage(msg interface{}) error { - if debugMux { - log.Printf("send(%d): %#v", ch.mux.chanList.offset, msg) - } - - p := Marshal(msg) - binary.BigEndian.PutUint32(p[1:], ch.remoteId) - return ch.writePacket(p) -} - -// WriteExtended writes data to a specific extended stream. These streams are -// used, for example, for stderr. -func (ch *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) { - if ch.sentEOF { - return 0, io.EOF - } - // 1 byte message type, 4 bytes remoteId, 4 bytes data length - opCode := byte(msgChannelData) - headerLength := uint32(9) - if extendedCode > 0 { - headerLength += 4 - opCode = msgChannelExtendedData - } - - ch.writeMu.Lock() - packet := ch.packetPool[extendedCode] - // We don't remove the buffer from packetPool, so - // WriteExtended calls from different goroutines will be - // flagged as errors by the race detector. - ch.writeMu.Unlock() - - for len(data) > 0 { - space := min(ch.maxRemotePayload, len(data)) - if space, err = ch.remoteWin.reserve(space); err != nil { - return n, err - } - if want := headerLength + space; uint32(cap(packet)) < want { - packet = make([]byte, want) - } else { - packet = packet[:want] - } - - todo := data[:space] - - packet[0] = opCode - binary.BigEndian.PutUint32(packet[1:], ch.remoteId) - if extendedCode > 0 { - binary.BigEndian.PutUint32(packet[5:], uint32(extendedCode)) - } - binary.BigEndian.PutUint32(packet[headerLength-4:], uint32(len(todo))) - copy(packet[headerLength:], todo) - if err = ch.writePacket(packet); err != nil { - return n, err - } - - n += len(todo) - data = data[len(todo):] - } - - ch.writeMu.Lock() - ch.packetPool[extendedCode] = packet - ch.writeMu.Unlock() - - return n, err -} - -func (ch *channel) handleData(packet []byte) error { - headerLen := 9 - isExtendedData := packet[0] == msgChannelExtendedData - if isExtendedData { - headerLen = 13 - } - if len(packet) < headerLen { - // malformed data packet - return parseError(packet[0]) - } - - var extended uint32 - if isExtendedData { - extended = binary.BigEndian.Uint32(packet[5:]) - } - - length := binary.BigEndian.Uint32(packet[headerLen-4 : headerLen]) - if length == 0 { - return nil - } - if length > ch.maxIncomingPayload { - // TODO(hanwen): should send Disconnect? - return errors.New("ssh: incoming packet exceeds maximum payload size") - } - - data := packet[headerLen:] - if length != uint32(len(data)) { - return errors.New("ssh: wrong packet length") - } - - ch.windowMu.Lock() - if ch.myWindow < length { - ch.windowMu.Unlock() - // TODO(hanwen): should send Disconnect with reason? - return errors.New("ssh: remote side wrote too much") - } - ch.myWindow -= length - ch.windowMu.Unlock() - - if extended == 1 { - ch.extPending.write(data) - } else if extended > 0 { - // discard other extended data. - } else { - ch.pending.write(data) - } - return nil -} - -func (c *channel) adjustWindow(n uint32) error { - c.windowMu.Lock() - // Since myWindow is managed on our side, and can never exceed - // the initial window setting, we don't worry about overflow. - c.myWindow += uint32(n) - c.windowMu.Unlock() - return c.sendMessage(windowAdjustMsg{ - AdditionalBytes: uint32(n), - }) -} - -func (c *channel) ReadExtended(data []byte, extended uint32) (n int, err error) { - switch extended { - case 1: - n, err = c.extPending.Read(data) - case 0: - n, err = c.pending.Read(data) - default: - return 0, fmt.Errorf("ssh: extended code %d unimplemented", extended) - } - - if n > 0 { - err = c.adjustWindow(uint32(n)) - // sendWindowAdjust can return io.EOF if the remote - // peer has closed the connection, however we want to - // defer forwarding io.EOF to the caller of Read until - // the buffer has been drained. - if n > 0 && err == io.EOF { - err = nil - } - } - - return n, err -} - -func (c *channel) close() { - c.pending.eof() - c.extPending.eof() - close(c.msg) - close(c.incomingRequests) - c.writeMu.Lock() - // This is not necessary for a normal channel teardown, but if - // there was another error, it is. - c.sentClose = true - c.writeMu.Unlock() - // Unblock writers. - c.remoteWin.close() -} - -// responseMessageReceived is called when a success or failure message is -// received on a channel to check that such a message is reasonable for the -// given channel. -func (ch *channel) responseMessageReceived() error { - if ch.direction == channelInbound { - return errors.New("ssh: channel response message received on inbound channel") - } - if ch.decided { - return errors.New("ssh: duplicate response received for channel") - } - ch.decided = true - return nil -} - -func (ch *channel) handlePacket(packet []byte) error { - switch packet[0] { - case msgChannelData, msgChannelExtendedData: - return ch.handleData(packet) - case msgChannelClose: - ch.sendMessage(channelCloseMsg{PeersID: ch.remoteId}) - ch.mux.chanList.remove(ch.localId) - ch.close() - return nil - case msgChannelEOF: - // RFC 4254 is mute on how EOF affects dataExt messages but - // it is logical to signal EOF at the same time. - ch.extPending.eof() - ch.pending.eof() - return nil - } - - decoded, err := decode(packet) - if err != nil { - return err - } - - switch msg := decoded.(type) { - case *channelOpenFailureMsg: - if err := ch.responseMessageReceived(); err != nil { - return err - } - ch.mux.chanList.remove(msg.PeersID) - ch.msg <- msg - case *channelOpenConfirmMsg: - if err := ch.responseMessageReceived(); err != nil { - return err - } - if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { - return fmt.Errorf("ssh: invalid MaxPacketSize %d from peer", msg.MaxPacketSize) - } - ch.remoteId = msg.MyID - ch.maxRemotePayload = msg.MaxPacketSize - ch.remoteWin.add(msg.MyWindow) - ch.msg <- msg - case *windowAdjustMsg: - if !ch.remoteWin.add(msg.AdditionalBytes) { - return fmt.Errorf("ssh: invalid window update for %d bytes", msg.AdditionalBytes) - } - case *channelRequestMsg: - req := Request{ - Type: msg.Request, - WantReply: msg.WantReply, - Payload: msg.RequestSpecificData, - ch: ch, - } - - ch.incomingRequests <- &req - default: - ch.msg <- msg - } - return nil -} - -func (m *mux) newChannel(chanType string, direction channelDirection, extraData []byte) *channel { - ch := &channel{ - remoteWin: window{Cond: newCond()}, - myWindow: channelWindowSize, - pending: newBuffer(), - extPending: newBuffer(), - direction: direction, - incomingRequests: make(chan *Request, chanSize), - msg: make(chan interface{}, chanSize), - chanType: chanType, - extraData: extraData, - mux: m, - packetPool: make(map[uint32][]byte), - } - ch.localId = m.chanList.add(ch) - return ch -} - -var errUndecided = errors.New("ssh: must Accept or Reject channel") -var errDecidedAlready = errors.New("ssh: can call Accept or Reject only once") - -type extChannel struct { - code uint32 - ch *channel -} - -func (e *extChannel) Write(data []byte) (n int, err error) { - return e.ch.WriteExtended(data, e.code) -} - -func (e *extChannel) Read(data []byte) (n int, err error) { - return e.ch.ReadExtended(data, e.code) -} - -func (ch *channel) Accept() (Channel, <-chan *Request, error) { - if ch.decided { - return nil, nil, errDecidedAlready - } - ch.maxIncomingPayload = channelMaxPacket - confirm := channelOpenConfirmMsg{ - PeersID: ch.remoteId, - MyID: ch.localId, - MyWindow: ch.myWindow, - MaxPacketSize: ch.maxIncomingPayload, - } - ch.decided = true - if err := ch.sendMessage(confirm); err != nil { - return nil, nil, err - } - - return ch, ch.incomingRequests, nil -} - -func (ch *channel) Reject(reason RejectionReason, message string) error { - if ch.decided { - return errDecidedAlready - } - reject := channelOpenFailureMsg{ - PeersID: ch.remoteId, - Reason: reason, - Message: message, - Language: "en", - } - ch.decided = true - return ch.sendMessage(reject) -} - -func (ch *channel) Read(data []byte) (int, error) { - if !ch.decided { - return 0, errUndecided - } - return ch.ReadExtended(data, 0) -} - -func (ch *channel) Write(data []byte) (int, error) { - if !ch.decided { - return 0, errUndecided - } - return ch.WriteExtended(data, 0) -} - -func (ch *channel) CloseWrite() error { - if !ch.decided { - return errUndecided - } - ch.sentEOF = true - return ch.sendMessage(channelEOFMsg{ - PeersID: ch.remoteId}) -} - -func (ch *channel) Close() error { - if !ch.decided { - return errUndecided - } - - return ch.sendMessage(channelCloseMsg{ - PeersID: ch.remoteId}) -} - -// Extended returns an io.ReadWriter that sends and receives data on the given, -// SSH extended stream. Such streams are used, for example, for stderr. -func (ch *channel) Extended(code uint32) io.ReadWriter { - if !ch.decided { - return nil - } - return &extChannel{code, ch} -} - -func (ch *channel) Stderr() io.ReadWriter { - return ch.Extended(1) -} - -func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { - if !ch.decided { - return false, errUndecided - } - - if wantReply { - ch.sentRequestMu.Lock() - defer ch.sentRequestMu.Unlock() - } - - msg := channelRequestMsg{ - PeersID: ch.remoteId, - Request: name, - WantReply: wantReply, - RequestSpecificData: payload, - } - - if err := ch.sendMessage(msg); err != nil { - return false, err - } - - if wantReply { - m, ok := (<-ch.msg) - if !ok { - return false, io.EOF - } - switch m.(type) { - case *channelRequestFailureMsg: - return false, nil - case *channelRequestSuccessMsg: - return true, nil - default: - return false, fmt.Errorf("ssh: unexpected response to channel request: %#v", m) - } - } - - return false, nil -} - -// ackRequest either sends an ack or nack to the channel request. -func (ch *channel) ackRequest(ok bool) error { - if !ch.decided { - return errUndecided - } - - var msg interface{} - if !ok { - msg = channelRequestFailureMsg{ - PeersID: ch.remoteId, - } - } else { - msg = channelRequestSuccessMsg{ - PeersID: ch.remoteId, - } - } - return ch.sendMessage(msg) -} - -func (ch *channel) ChannelType() string { - return ch.chanType -} - -func (ch *channel) ExtraData() []byte { - return ch.extraData -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher.go deleted file mode 100644 index 009af61218..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher.go +++ /dev/null @@ -1,770 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "crypto/aes" - "crypto/cipher" - "crypto/des" - "crypto/rc4" - "crypto/subtle" - "encoding/binary" - "errors" - "fmt" - "hash" - "io" - "io/ioutil" - "math/bits" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/internal/chacha20" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/poly1305" -) - -const ( - packetSizeMultiple = 16 // TODO(huin) this should be determined by the cipher. - - // RFC 4253 section 6.1 defines a minimum packet size of 32768 that implementations - // MUST be able to process (plus a few more kilobytes for padding and mac). The RFC - // indicates implementations SHOULD be able to handle larger packet sizes, but then - // waffles on about reasonable limits. - // - // OpenSSH caps their maxPacket at 256kB so we choose to do - // the same. maxPacket is also used to ensure that uint32 - // length fields do not overflow, so it should remain well - // below 4G. - maxPacket = 256 * 1024 -) - -// noneCipher implements cipher.Stream and provides no encryption. It is used -// by the transport before the first key-exchange. -type noneCipher struct{} - -func (c noneCipher) XORKeyStream(dst, src []byte) { - copy(dst, src) -} - -func newAESCTR(key, iv []byte) (cipher.Stream, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - return cipher.NewCTR(c, iv), nil -} - -func newRC4(key, iv []byte) (cipher.Stream, error) { - return rc4.NewCipher(key) -} - -type cipherMode struct { - keySize int - ivSize int - create func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) -} - -func streamCipherMode(skip int, createFunc func(key, iv []byte) (cipher.Stream, error)) func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - return func(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - stream, err := createFunc(key, iv) - if err != nil { - return nil, err - } - - var streamDump []byte - if skip > 0 { - streamDump = make([]byte, 512) - } - - for remainingToDump := skip; remainingToDump > 0; { - dumpThisTime := remainingToDump - if dumpThisTime > len(streamDump) { - dumpThisTime = len(streamDump) - } - stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime]) - remainingToDump -= dumpThisTime - } - - mac := macModes[algs.MAC].new(macKey) - return &streamPacketCipher{ - mac: mac, - etm: macModes[algs.MAC].etm, - macResult: make([]byte, mac.Size()), - cipher: stream, - }, nil - } -} - -// cipherModes documents properties of supported ciphers. Ciphers not included -// are not supported and will not be negotiated, even if explicitly requested in -// ClientConfig.Crypto.Ciphers. -var cipherModes = map[string]*cipherMode{ - // Ciphers from RFC4344, which introduced many CTR-based ciphers. Algorithms - // are defined in the order specified in the RFC. - "aes128-ctr": {16, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - "aes192-ctr": {24, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - "aes256-ctr": {32, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - - // Ciphers from RFC4345, which introduces security-improved arcfour ciphers. - // They are defined in the order specified in the RFC. - "arcfour128": {16, 0, streamCipherMode(1536, newRC4)}, - "arcfour256": {32, 0, streamCipherMode(1536, newRC4)}, - - // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol. - // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and - // RC4) has problems with weak keys, and should be used with caution." - // RFC4345 introduces improved versions of Arcfour. - "arcfour": {16, 0, streamCipherMode(0, newRC4)}, - - // AEAD ciphers - gcmCipherID: {16, 12, newGCMCipher}, - chacha20Poly1305ID: {64, 0, newChaCha20Cipher}, - - // CBC mode is insecure and so is not included in the default config. - // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely - // needed, it's possible to specify a custom Config to enable it. - // You should expect that an active attacker can recover plaintext if - // you do. - aes128cbcID: {16, aes.BlockSize, newAESCBCCipher}, - - // 3des-cbc is insecure and is not included in the default - // config. - tripledescbcID: {24, des.BlockSize, newTripleDESCBCCipher}, -} - -// prefixLen is the length of the packet prefix that contains the packet length -// and number of padding bytes. -const prefixLen = 5 - -// streamPacketCipher is a packetCipher using a stream cipher. -type streamPacketCipher struct { - mac hash.Hash - cipher cipher.Stream - etm bool - - // The following members are to avoid per-packet allocations. - prefix [prefixLen]byte - seqNumBytes [4]byte - padding [2 * packetSizeMultiple]byte - packetData []byte - macResult []byte -} - -// readPacket reads and decrypt a single packet from the reader argument. -func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - if _, err := io.ReadFull(r, s.prefix[:]); err != nil { - return nil, err - } - - var encryptedPaddingLength [1]byte - if s.mac != nil && s.etm { - copy(encryptedPaddingLength[:], s.prefix[4:5]) - s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) - } else { - s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) - } - - length := binary.BigEndian.Uint32(s.prefix[0:4]) - paddingLength := uint32(s.prefix[4]) - - var macSize uint32 - if s.mac != nil { - s.mac.Reset() - binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) - s.mac.Write(s.seqNumBytes[:]) - if s.etm { - s.mac.Write(s.prefix[:4]) - s.mac.Write(encryptedPaddingLength[:]) - } else { - s.mac.Write(s.prefix[:]) - } - macSize = uint32(s.mac.Size()) - } - - if length <= paddingLength+1 { - return nil, errors.New("ssh: invalid packet length, packet too small") - } - - if length > maxPacket { - return nil, errors.New("ssh: invalid packet length, packet too large") - } - - // the maxPacket check above ensures that length-1+macSize - // does not overflow. - if uint32(cap(s.packetData)) < length-1+macSize { - s.packetData = make([]byte, length-1+macSize) - } else { - s.packetData = s.packetData[:length-1+macSize] - } - - if _, err := io.ReadFull(r, s.packetData); err != nil { - return nil, err - } - mac := s.packetData[length-1:] - data := s.packetData[:length-1] - - if s.mac != nil && s.etm { - s.mac.Write(data) - } - - s.cipher.XORKeyStream(data, data) - - if s.mac != nil { - if !s.etm { - s.mac.Write(data) - } - s.macResult = s.mac.Sum(s.macResult[:0]) - if subtle.ConstantTimeCompare(s.macResult, mac) != 1 { - return nil, errors.New("ssh: MAC failure") - } - } - - return s.packetData[:length-paddingLength-1], nil -} - -// writePacket encrypts and sends a packet of data to the writer argument -func (s *streamPacketCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - if len(packet) > maxPacket { - return errors.New("ssh: packet too large") - } - - aadlen := 0 - if s.mac != nil && s.etm { - // packet length is not encrypted for EtM modes - aadlen = 4 - } - - paddingLength := packetSizeMultiple - (prefixLen+len(packet)-aadlen)%packetSizeMultiple - if paddingLength < 4 { - paddingLength += packetSizeMultiple - } - - length := len(packet) + 1 + paddingLength - binary.BigEndian.PutUint32(s.prefix[:], uint32(length)) - s.prefix[4] = byte(paddingLength) - padding := s.padding[:paddingLength] - if _, err := io.ReadFull(rand, padding); err != nil { - return err - } - - if s.mac != nil { - s.mac.Reset() - binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) - s.mac.Write(s.seqNumBytes[:]) - - if s.etm { - // For EtM algorithms, the packet length must stay unencrypted, - // but the following data (padding length) must be encrypted - s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) - } - - s.mac.Write(s.prefix[:]) - - if !s.etm { - // For non-EtM algorithms, the algorithm is applied on unencrypted data - s.mac.Write(packet) - s.mac.Write(padding) - } - } - - if !(s.mac != nil && s.etm) { - // For EtM algorithms, the padding length has already been encrypted - // and the packet length must remain unencrypted - s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) - } - - s.cipher.XORKeyStream(packet, packet) - s.cipher.XORKeyStream(padding, padding) - - if s.mac != nil && s.etm { - // For EtM algorithms, packet and padding must be encrypted - s.mac.Write(packet) - s.mac.Write(padding) - } - - if _, err := w.Write(s.prefix[:]); err != nil { - return err - } - if _, err := w.Write(packet); err != nil { - return err - } - if _, err := w.Write(padding); err != nil { - return err - } - - if s.mac != nil { - s.macResult = s.mac.Sum(s.macResult[:0]) - if _, err := w.Write(s.macResult); err != nil { - return err - } - } - - return nil -} - -type gcmCipher struct { - aead cipher.AEAD - prefix [4]byte - iv []byte - buf []byte -} - -func newGCMCipher(key, iv, unusedMacKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - - aead, err := cipher.NewGCM(c) - if err != nil { - return nil, err - } - - return &gcmCipher{ - aead: aead, - iv: iv, - }, nil -} - -const gcmTagSize = 16 - -func (c *gcmCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - // Pad out to multiple of 16 bytes. This is different from the - // stream cipher because that encrypts the length too. - padding := byte(packetSizeMultiple - (1+len(packet))%packetSizeMultiple) - if padding < 4 { - padding += packetSizeMultiple - } - - length := uint32(len(packet) + int(padding) + 1) - binary.BigEndian.PutUint32(c.prefix[:], length) - if _, err := w.Write(c.prefix[:]); err != nil { - return err - } - - if cap(c.buf) < int(length) { - c.buf = make([]byte, length) - } else { - c.buf = c.buf[:length] - } - - c.buf[0] = padding - copy(c.buf[1:], packet) - if _, err := io.ReadFull(rand, c.buf[1+len(packet):]); err != nil { - return err - } - c.buf = c.aead.Seal(c.buf[:0], c.iv, c.buf, c.prefix[:]) - if _, err := w.Write(c.buf); err != nil { - return err - } - c.incIV() - - return nil -} - -func (c *gcmCipher) incIV() { - for i := 4 + 7; i >= 4; i-- { - c.iv[i]++ - if c.iv[i] != 0 { - break - } - } -} - -func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - if _, err := io.ReadFull(r, c.prefix[:]); err != nil { - return nil, err - } - length := binary.BigEndian.Uint32(c.prefix[:]) - if length > maxPacket { - return nil, errors.New("ssh: max packet length exceeded") - } - - if cap(c.buf) < int(length+gcmTagSize) { - c.buf = make([]byte, length+gcmTagSize) - } else { - c.buf = c.buf[:length+gcmTagSize] - } - - if _, err := io.ReadFull(r, c.buf); err != nil { - return nil, err - } - - plain, err := c.aead.Open(c.buf[:0], c.iv, c.buf, c.prefix[:]) - if err != nil { - return nil, err - } - c.incIV() - - padding := plain[0] - if padding < 4 { - // padding is a byte, so it automatically satisfies - // the maximum size, which is 255. - return nil, fmt.Errorf("ssh: illegal padding %d", padding) - } - - if int(padding+1) >= len(plain) { - return nil, fmt.Errorf("ssh: padding %d too large", padding) - } - plain = plain[1 : length-uint32(padding)] - return plain, nil -} - -// cbcCipher implements aes128-cbc cipher defined in RFC 4253 section 6.1 -type cbcCipher struct { - mac hash.Hash - macSize uint32 - decrypter cipher.BlockMode - encrypter cipher.BlockMode - - // The following members are to avoid per-packet allocations. - seqNumBytes [4]byte - packetData []byte - macResult []byte - - // Amount of data we should still read to hide which - // verification error triggered. - oracleCamouflage uint32 -} - -func newCBCCipher(c cipher.Block, key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - cbc := &cbcCipher{ - mac: macModes[algs.MAC].new(macKey), - decrypter: cipher.NewCBCDecrypter(c, iv), - encrypter: cipher.NewCBCEncrypter(c, iv), - packetData: make([]byte, 1024), - } - if cbc.mac != nil { - cbc.macSize = uint32(cbc.mac.Size()) - } - - return cbc, nil -} - -func newAESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - - cbc, err := newCBCCipher(c, key, iv, macKey, algs) - if err != nil { - return nil, err - } - - return cbc, nil -} - -func newTripleDESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - c, err := des.NewTripleDESCipher(key) - if err != nil { - return nil, err - } - - cbc, err := newCBCCipher(c, key, iv, macKey, algs) - if err != nil { - return nil, err - } - - return cbc, nil -} - -func maxUInt32(a, b int) uint32 { - if a > b { - return uint32(a) - } - return uint32(b) -} - -const ( - cbcMinPacketSizeMultiple = 8 - cbcMinPacketSize = 16 - cbcMinPaddingSize = 4 -) - -// cbcError represents a verification error that may leak information. -type cbcError string - -func (e cbcError) Error() string { return string(e) } - -func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - p, err := c.readPacketLeaky(seqNum, r) - if err != nil { - if _, ok := err.(cbcError); ok { - // Verification error: read a fixed amount of - // data, to make distinguishing between - // failing MAC and failing length check more - // difficult. - io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage)) - } - } - return p, err -} - -func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) { - blockSize := c.decrypter.BlockSize() - - // Read the header, which will include some of the subsequent data in the - // case of block ciphers - this is copied back to the payload later. - // How many bytes of payload/padding will be read with this first read. - firstBlockLength := uint32((prefixLen + blockSize - 1) / blockSize * blockSize) - firstBlock := c.packetData[:firstBlockLength] - if _, err := io.ReadFull(r, firstBlock); err != nil { - return nil, err - } - - c.oracleCamouflage = maxPacket + 4 + c.macSize - firstBlockLength - - c.decrypter.CryptBlocks(firstBlock, firstBlock) - length := binary.BigEndian.Uint32(firstBlock[:4]) - if length > maxPacket { - return nil, cbcError("ssh: packet too large") - } - if length+4 < maxUInt32(cbcMinPacketSize, blockSize) { - // The minimum size of a packet is 16 (or the cipher block size, whichever - // is larger) bytes. - return nil, cbcError("ssh: packet too small") - } - // The length of the packet (including the length field but not the MAC) must - // be a multiple of the block size or 8, whichever is larger. - if (length+4)%maxUInt32(cbcMinPacketSizeMultiple, blockSize) != 0 { - return nil, cbcError("ssh: invalid packet length multiple") - } - - paddingLength := uint32(firstBlock[4]) - if paddingLength < cbcMinPaddingSize || length <= paddingLength+1 { - return nil, cbcError("ssh: invalid packet length") - } - - // Positions within the c.packetData buffer: - macStart := 4 + length - paddingStart := macStart - paddingLength - - // Entire packet size, starting before length, ending at end of mac. - entirePacketSize := macStart + c.macSize - - // Ensure c.packetData is large enough for the entire packet data. - if uint32(cap(c.packetData)) < entirePacketSize { - // Still need to upsize and copy, but this should be rare at runtime, only - // on upsizing the packetData buffer. - c.packetData = make([]byte, entirePacketSize) - copy(c.packetData, firstBlock) - } else { - c.packetData = c.packetData[:entirePacketSize] - } - - n, err := io.ReadFull(r, c.packetData[firstBlockLength:]) - if err != nil { - return nil, err - } - c.oracleCamouflage -= uint32(n) - - remainingCrypted := c.packetData[firstBlockLength:macStart] - c.decrypter.CryptBlocks(remainingCrypted, remainingCrypted) - - mac := c.packetData[macStart:] - if c.mac != nil { - c.mac.Reset() - binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) - c.mac.Write(c.seqNumBytes[:]) - c.mac.Write(c.packetData[:macStart]) - c.macResult = c.mac.Sum(c.macResult[:0]) - if subtle.ConstantTimeCompare(c.macResult, mac) != 1 { - return nil, cbcError("ssh: MAC failure") - } - } - - return c.packetData[prefixLen:paddingStart], nil -} - -func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - effectiveBlockSize := maxUInt32(cbcMinPacketSizeMultiple, c.encrypter.BlockSize()) - - // Length of encrypted portion of the packet (header, payload, padding). - // Enforce minimum padding and packet size. - encLength := maxUInt32(prefixLen+len(packet)+cbcMinPaddingSize, cbcMinPaddingSize) - // Enforce block size. - encLength = (encLength + effectiveBlockSize - 1) / effectiveBlockSize * effectiveBlockSize - - length := encLength - 4 - paddingLength := int(length) - (1 + len(packet)) - - // Overall buffer contains: header, payload, padding, mac. - // Space for the MAC is reserved in the capacity but not the slice length. - bufferSize := encLength + c.macSize - if uint32(cap(c.packetData)) < bufferSize { - c.packetData = make([]byte, encLength, bufferSize) - } else { - c.packetData = c.packetData[:encLength] - } - - p := c.packetData - - // Packet header. - binary.BigEndian.PutUint32(p, length) - p = p[4:] - p[0] = byte(paddingLength) - - // Payload. - p = p[1:] - copy(p, packet) - - // Padding. - p = p[len(packet):] - if _, err := io.ReadFull(rand, p); err != nil { - return err - } - - if c.mac != nil { - c.mac.Reset() - binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) - c.mac.Write(c.seqNumBytes[:]) - c.mac.Write(c.packetData) - // The MAC is now appended into the capacity reserved for it earlier. - c.packetData = c.mac.Sum(c.packetData) - } - - c.encrypter.CryptBlocks(c.packetData[:encLength], c.packetData[:encLength]) - - if _, err := w.Write(c.packetData); err != nil { - return err - } - - return nil -} - -const chacha20Poly1305ID = "chacha20-poly1305@openssh.com" - -// chacha20Poly1305Cipher implements the chacha20-poly1305@openssh.com -// AEAD, which is described here: -// -// https://tools.ietf.org/html/draft-josefsson-ssh-chacha20-poly1305-openssh-00 -// -// the methods here also implement padding, which RFC4253 Section 6 -// also requires of stream ciphers. -type chacha20Poly1305Cipher struct { - lengthKey [8]uint32 - contentKey [8]uint32 - buf []byte -} - -func newChaCha20Cipher(key, unusedIV, unusedMACKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { - if len(key) != 64 { - panic(len(key)) - } - - c := &chacha20Poly1305Cipher{ - buf: make([]byte, 256), - } - - for i := range c.contentKey { - c.contentKey[i] = binary.LittleEndian.Uint32(key[i*4 : (i+1)*4]) - } - for i := range c.lengthKey { - c.lengthKey[i] = binary.LittleEndian.Uint32(key[(i+8)*4 : (i+9)*4]) - } - return c, nil -} - -func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)} - s := chacha20.New(c.contentKey, nonce) - var polyKey [32]byte - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip next 32 bytes - - encryptedLength := c.buf[:4] - if _, err := io.ReadFull(r, encryptedLength); err != nil { - return nil, err - } - - var lenBytes [4]byte - chacha20.New(c.lengthKey, nonce).XORKeyStream(lenBytes[:], encryptedLength) - - length := binary.BigEndian.Uint32(lenBytes[:]) - if length > maxPacket { - return nil, errors.New("ssh: invalid packet length, packet too large") - } - - contentEnd := 4 + length - packetEnd := contentEnd + poly1305.TagSize - if uint32(cap(c.buf)) < packetEnd { - c.buf = make([]byte, packetEnd) - copy(c.buf[:], encryptedLength) - } else { - c.buf = c.buf[:packetEnd] - } - - if _, err := io.ReadFull(r, c.buf[4:packetEnd]); err != nil { - return nil, err - } - - var mac [poly1305.TagSize]byte - copy(mac[:], c.buf[contentEnd:packetEnd]) - if !poly1305.Verify(&mac, c.buf[:contentEnd], &polyKey) { - return nil, errors.New("ssh: MAC failure") - } - - plain := c.buf[4:contentEnd] - s.XORKeyStream(plain, plain) - - padding := plain[0] - if padding < 4 { - // padding is a byte, so it automatically satisfies - // the maximum size, which is 255. - return nil, fmt.Errorf("ssh: illegal padding %d", padding) - } - - if int(padding)+1 >= len(plain) { - return nil, fmt.Errorf("ssh: padding %d too large", padding) - } - - plain = plain[1 : len(plain)-int(padding)] - - return plain, nil -} - -func (c *chacha20Poly1305Cipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, payload []byte) error { - nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)} - s := chacha20.New(c.contentKey, nonce) - var polyKey [32]byte - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip next 32 bytes - - // There is no blocksize, so fall back to multiple of 8 byte - // padding, as described in RFC 4253, Sec 6. - const packetSizeMultiple = 8 - - padding := packetSizeMultiple - (1+len(payload))%packetSizeMultiple - if padding < 4 { - padding += packetSizeMultiple - } - - // size (4 bytes), padding (1), payload, padding, tag. - totalLength := 4 + 1 + len(payload) + padding + poly1305.TagSize - if cap(c.buf) < totalLength { - c.buf = make([]byte, totalLength) - } else { - c.buf = c.buf[:totalLength] - } - - binary.BigEndian.PutUint32(c.buf, uint32(1+len(payload)+padding)) - chacha20.New(c.lengthKey, nonce).XORKeyStream(c.buf, c.buf[:4]) - c.buf[4] = byte(padding) - copy(c.buf[5:], payload) - packetEnd := 5 + len(payload) + padding - if _, err := io.ReadFull(rand, c.buf[5+len(payload):packetEnd]); err != nil { - return err - } - - s.XORKeyStream(c.buf[4:], c.buf[4:packetEnd]) - - var mac [poly1305.TagSize]byte - poly1305.Sum(&mac, c.buf[:packetEnd], &polyKey) - - copy(c.buf[packetEnd:], mac[:]) - - if _, err := w.Write(c.buf); err != nil { - return err - } - return nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher_test.go deleted file mode 100644 index a52d6e486a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/cipher_test.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "crypto" - "crypto/rand" - "testing" -) - -func TestDefaultCiphersExist(t *testing.T) { - for _, cipherAlgo := range supportedCiphers { - if _, ok := cipherModes[cipherAlgo]; !ok { - t.Errorf("supported cipher %q is unknown", cipherAlgo) - } - } - for _, cipherAlgo := range preferredCiphers { - if _, ok := cipherModes[cipherAlgo]; !ok { - t.Errorf("preferred cipher %q is unknown", cipherAlgo) - } - } -} - -func TestPacketCiphers(t *testing.T) { - defaultMac := "hmac-sha2-256" - defaultCipher := "aes128-ctr" - for cipher := range cipherModes { - t.Run("cipher="+cipher, - func(t *testing.T) { testPacketCipher(t, cipher, defaultMac) }) - } - for mac := range macModes { - t.Run("mac="+mac, - func(t *testing.T) { testPacketCipher(t, defaultCipher, mac) }) - } -} - -func testPacketCipher(t *testing.T, cipher, mac string) { - kr := &kexResult{Hash: crypto.SHA1} - algs := directionAlgorithms{ - Cipher: cipher, - MAC: mac, - Compression: "none", - } - client, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - } - server, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - } - - want := "bla bla" - input := []byte(want) - buf := &bytes.Buffer{} - if err := client.writePacket(0, buf, rand.Reader, input); err != nil { - t.Fatalf("writePacket(%q, %q): %v", cipher, mac, err) - } - - packet, err := server.readPacket(0, buf) - if err != nil { - t.Fatalf("readPacket(%q, %q): %v", cipher, mac, err) - } - - if string(packet) != want { - t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want) - } -} - -func TestCBCOracleCounterMeasure(t *testing.T) { - kr := &kexResult{Hash: crypto.SHA1} - algs := directionAlgorithms{ - Cipher: aes128cbcID, - MAC: "hmac-sha1", - Compression: "none", - } - client, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client): %v", err) - } - - want := "bla bla" - input := []byte(want) - buf := &bytes.Buffer{} - if err := client.writePacket(0, buf, rand.Reader, input); err != nil { - t.Errorf("writePacket: %v", err) - } - - packetSize := buf.Len() - buf.Write(make([]byte, 2*maxPacket)) - - // We corrupt each byte, but this usually will only test the - // 'packet too large' or 'MAC failure' cases. - lastRead := -1 - for i := 0; i < packetSize; i++ { - server, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client): %v", err) - } - - fresh := &bytes.Buffer{} - fresh.Write(buf.Bytes()) - fresh.Bytes()[i] ^= 0x01 - - before := fresh.Len() - _, err = server.readPacket(0, fresh) - if err == nil { - t.Errorf("corrupt byte %d: readPacket succeeded ", i) - continue - } - if _, ok := err.(cbcError); !ok { - t.Errorf("corrupt byte %d: got %v (%T), want cbcError", i, err, err) - continue - } - - after := fresh.Len() - bytesRead := before - after - if bytesRead < maxPacket { - t.Errorf("corrupt byte %d: read %d bytes, want more than %d", i, bytesRead, maxPacket) - continue - } - - if i > 0 && bytesRead != lastRead { - t.Errorf("corrupt byte %d: read %d bytes, want %d bytes read", i, bytesRead, lastRead) - } - lastRead = bytesRead - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client.go deleted file mode 100644 index ae6ca775ee..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client.go +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "errors" - "fmt" - "net" - "os" - "sync" - "time" -) - -// Client implements a traditional SSH client that supports shells, -// subprocesses, TCP port/streamlocal forwarding and tunneled dialing. -type Client struct { - Conn - - handleForwardsOnce sync.Once // guards calling (*Client).handleForwards - - forwards forwardList // forwarded tcpip connections from the remote side - mu sync.Mutex - channelHandlers map[string]chan NewChannel -} - -// HandleChannelOpen returns a channel on which NewChannel requests -// for the given type are sent. If the type already is being handled, -// nil is returned. The channel is closed when the connection is closed. -func (c *Client) HandleChannelOpen(channelType string) <-chan NewChannel { - c.mu.Lock() - defer c.mu.Unlock() - if c.channelHandlers == nil { - // The SSH channel has been closed. - c := make(chan NewChannel) - close(c) - return c - } - - ch := c.channelHandlers[channelType] - if ch != nil { - return nil - } - - ch = make(chan NewChannel, chanSize) - c.channelHandlers[channelType] = ch - return ch -} - -// NewClient creates a Client on top of the given connection. -func NewClient(c Conn, chans <-chan NewChannel, reqs <-chan *Request) *Client { - conn := &Client{ - Conn: c, - channelHandlers: make(map[string]chan NewChannel, 1), - } - - go conn.handleGlobalRequests(reqs) - go conn.handleChannelOpens(chans) - go func() { - conn.Wait() - conn.forwards.closeAll() - }() - return conn -} - -// NewClientConn establishes an authenticated SSH connection using c -// as the underlying transport. The Request and NewChannel channels -// must be serviced or the connection will hang. -func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan NewChannel, <-chan *Request, error) { - fullConf := *config - fullConf.SetDefaults() - if fullConf.HostKeyCallback == nil { - c.Close() - return nil, nil, nil, errors.New("ssh: must specify HostKeyCallback") - } - - conn := &connection{ - sshConn: sshConn{conn: c}, - } - - if err := conn.clientHandshake(addr, &fullConf); err != nil { - c.Close() - return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %v", err) - } - conn.mux = newMux(conn.transport) - return conn, conn.mux.incomingChannels, conn.mux.incomingRequests, nil -} - -// clientHandshake performs the client side key exchange. See RFC 4253 Section -// 7. -func (c *connection) clientHandshake(dialAddress string, config *ClientConfig) error { - if config.ClientVersion != "" { - c.clientVersion = []byte(config.ClientVersion) - } else { - c.clientVersion = []byte(packageVersion) - } - var err error - c.serverVersion, err = exchangeVersions(c.sshConn.conn, c.clientVersion) - if err != nil { - return err - } - - c.transport = newClientTransport( - newTransport(c.sshConn.conn, config.Rand, true /* is client */), - c.clientVersion, c.serverVersion, config, dialAddress, c.sshConn.RemoteAddr()) - if err := c.transport.waitSession(); err != nil { - return err - } - - c.sessionID = c.transport.getSessionID() - return c.clientAuthenticate(config) -} - -// verifyHostKeySignature verifies the host key obtained in the key -// exchange. -func verifyHostKeySignature(hostKey PublicKey, result *kexResult) error { - sig, rest, ok := parseSignatureBody(result.Signature) - if len(rest) > 0 || !ok { - return errors.New("ssh: signature parse error") - } - - return hostKey.Verify(result.H, sig) -} - -// NewSession opens a new Session for this client. (A session is a remote -// execution of a program.) -func (c *Client) NewSession() (*Session, error) { - ch, in, err := c.OpenChannel("session", nil) - if err != nil { - return nil, err - } - return newSession(ch, in) -} - -func (c *Client) handleGlobalRequests(incoming <-chan *Request) { - for r := range incoming { - // This handles keepalive messages and matches - // the behaviour of OpenSSH. - r.Reply(false, nil) - } -} - -// handleChannelOpens channel open messages from the remote side. -func (c *Client) handleChannelOpens(in <-chan NewChannel) { - for ch := range in { - c.mu.Lock() - handler := c.channelHandlers[ch.ChannelType()] - c.mu.Unlock() - - if handler != nil { - handler <- ch - } else { - ch.Reject(UnknownChannelType, fmt.Sprintf("unknown channel type: %v", ch.ChannelType())) - } - } - - c.mu.Lock() - for _, ch := range c.channelHandlers { - close(ch) - } - c.channelHandlers = nil - c.mu.Unlock() -} - -// Dial starts a client connection to the given SSH server. It is a -// convenience function that connects to the given network address, -// initiates the SSH handshake, and then sets up a Client. For access -// to incoming channels and requests, use net.Dial with NewClientConn -// instead. -func Dial(network, addr string, config *ClientConfig) (*Client, error) { - conn, err := net.DialTimeout(network, addr, config.Timeout) - if err != nil { - return nil, err - } - c, chans, reqs, err := NewClientConn(conn, addr, config) - if err != nil { - return nil, err - } - return NewClient(c, chans, reqs), nil -} - -// HostKeyCallback is the function type used for verifying server -// keys. A HostKeyCallback must return nil if the host key is OK, or -// an error to reject it. It receives the hostname as passed to Dial -// or NewClientConn. The remote address is the RemoteAddr of the -// net.Conn underlying the the SSH connection. -type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error - -// BannerCallback is the function type used for treat the banner sent by -// the server. A BannerCallback receives the message sent by the remote server. -type BannerCallback func(message string) error - -// A ClientConfig structure is used to configure a Client. It must not be -// modified after having been passed to an SSH function. -type ClientConfig struct { - // Config contains configuration that is shared between clients and - // servers. - Config - - // User contains the username to authenticate as. - User string - - // Auth contains possible authentication methods to use with the - // server. Only the first instance of a particular RFC 4252 method will - // be used during authentication. - Auth []AuthMethod - - // HostKeyCallback is called during the cryptographic - // handshake to validate the server's host key. The client - // configuration must supply this callback for the connection - // to succeed. The functions InsecureIgnoreHostKey or - // FixedHostKey can be used for simplistic host key checks. - HostKeyCallback HostKeyCallback - - // BannerCallback is called during the SSH dance to display a custom - // server's message. The client configuration can supply this callback to - // handle it as wished. The function BannerDisplayStderr can be used for - // simplistic display on Stderr. - BannerCallback BannerCallback - - // ClientVersion contains the version identification string that will - // be used for the connection. If empty, a reasonable default is used. - ClientVersion string - - // HostKeyAlgorithms lists the key types that the client will - // accept from the server as host key, in order of - // preference. If empty, a reasonable default is used. Any - // string returned from PublicKey.Type method may be used, or - // any of the CertAlgoXxxx and KeyAlgoXxxx constants. - HostKeyAlgorithms []string - - // Timeout is the maximum amount of time for the TCP connection to establish. - // - // A Timeout of zero means no timeout. - Timeout time.Duration -} - -// InsecureIgnoreHostKey returns a function that can be used for -// ClientConfig.HostKeyCallback to accept any host key. It should -// not be used for production code. -func InsecureIgnoreHostKey() HostKeyCallback { - return func(hostname string, remote net.Addr, key PublicKey) error { - return nil - } -} - -type fixedHostKey struct { - key PublicKey -} - -func (f *fixedHostKey) check(hostname string, remote net.Addr, key PublicKey) error { - if f.key == nil { - return fmt.Errorf("ssh: required host key was nil") - } - if !bytes.Equal(key.Marshal(), f.key.Marshal()) { - return fmt.Errorf("ssh: host key mismatch") - } - return nil -} - -// FixedHostKey returns a function for use in -// ClientConfig.HostKeyCallback to accept only a specific host key. -func FixedHostKey(key PublicKey) HostKeyCallback { - hk := &fixedHostKey{key} - return hk.check -} - -// BannerDisplayStderr returns a function that can be used for -// ClientConfig.BannerCallback to display banners on os.Stderr. -func BannerDisplayStderr() BannerCallback { - return func(banner string) error { - _, err := os.Stderr.WriteString(banner) - - return err - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth.go deleted file mode 100644 index 5f44b77403..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth.go +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" -) - -type authResult int - -const ( - authFailure authResult = iota - authPartialSuccess - authSuccess -) - -// clientAuthenticate authenticates with the remote server. See RFC 4252. -func (c *connection) clientAuthenticate(config *ClientConfig) error { - // initiate user auth session - if err := c.transport.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})); err != nil { - return err - } - packet, err := c.transport.readPacket() - if err != nil { - return err - } - var serviceAccept serviceAcceptMsg - if err := Unmarshal(packet, &serviceAccept); err != nil { - return err - } - - // during the authentication phase the client first attempts the "none" method - // then any untried methods suggested by the server. - tried := make(map[string]bool) - var lastMethods []string - - sessionID := c.transport.getSessionID() - for auth := AuthMethod(new(noneAuth)); auth != nil; { - ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand) - if err != nil { - return err - } - if ok == authSuccess { - // success - return nil - } else if ok == authFailure { - tried[auth.method()] = true - } - if methods == nil { - methods = lastMethods - } - lastMethods = methods - - auth = nil - - findNext: - for _, a := range config.Auth { - candidateMethod := a.method() - if tried[candidateMethod] { - continue - } - for _, meth := range methods { - if meth == candidateMethod { - auth = a - break findNext - } - } - } - } - return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", keys(tried)) -} - -func keys(m map[string]bool) []string { - s := make([]string, 0, len(m)) - - for key := range m { - s = append(s, key) - } - return s -} - -// An AuthMethod represents an instance of an RFC 4252 authentication method. -type AuthMethod interface { - // auth authenticates user over transport t. - // Returns true if authentication is successful. - // If authentication is not successful, a []string of alternative - // method names is returned. If the slice is nil, it will be ignored - // and the previous set of possible methods will be reused. - auth(session []byte, user string, p packetConn, rand io.Reader) (authResult, []string, error) - - // method returns the RFC 4252 method name. - method() string -} - -// "none" authentication, RFC 4252 section 5.2. -type noneAuth int - -func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - if err := c.writePacket(Marshal(&userAuthRequestMsg{ - User: user, - Service: serviceSSH, - Method: "none", - })); err != nil { - return authFailure, nil, err - } - - return handleAuthResponse(c) -} - -func (n *noneAuth) method() string { - return "none" -} - -// passwordCallback is an AuthMethod that fetches the password through -// a function call, e.g. by prompting the user. -type passwordCallback func() (password string, err error) - -func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - type passwordAuthMsg struct { - User string `sshtype:"50"` - Service string - Method string - Reply bool - Password string - } - - pw, err := cb() - // REVIEW NOTE: is there a need to support skipping a password attempt? - // The program may only find out that the user doesn't have a password - // when prompting. - if err != nil { - return authFailure, nil, err - } - - if err := c.writePacket(Marshal(&passwordAuthMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - Reply: false, - Password: pw, - })); err != nil { - return authFailure, nil, err - } - - return handleAuthResponse(c) -} - -func (cb passwordCallback) method() string { - return "password" -} - -// Password returns an AuthMethod using the given password. -func Password(secret string) AuthMethod { - return passwordCallback(func() (string, error) { return secret, nil }) -} - -// PasswordCallback returns an AuthMethod that uses a callback for -// fetching a password. -func PasswordCallback(prompt func() (secret string, err error)) AuthMethod { - return passwordCallback(prompt) -} - -type publickeyAuthMsg struct { - User string `sshtype:"50"` - Service string - Method string - // HasSig indicates to the receiver packet that the auth request is signed and - // should be used for authentication of the request. - HasSig bool - Algoname string - PubKey []byte - // Sig is tagged with "rest" so Marshal will exclude it during - // validateKey - Sig []byte `ssh:"rest"` -} - -// publicKeyCallback is an AuthMethod that uses a set of key -// pairs for authentication. -type publicKeyCallback func() ([]Signer, error) - -func (cb publicKeyCallback) method() string { - return "publickey" -} - -func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - // Authentication is performed by sending an enquiry to test if a key is - // acceptable to the remote. If the key is acceptable, the client will - // attempt to authenticate with the valid key. If not the client will repeat - // the process with the remaining keys. - - signers, err := cb() - if err != nil { - return authFailure, nil, err - } - var methods []string - for _, signer := range signers { - ok, err := validateKey(signer.PublicKey(), user, c) - if err != nil { - return authFailure, nil, err - } - if !ok { - continue - } - - pub := signer.PublicKey() - pubKey := pub.Marshal() - sign, err := signer.Sign(rand, buildDataSignedForAuth(session, userAuthRequestMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - }, []byte(pub.Type()), pubKey)) - if err != nil { - return authFailure, nil, err - } - - // manually wrap the serialized signature in a string - s := Marshal(sign) - sig := make([]byte, stringLength(len(s))) - marshalString(sig, s) - msg := publickeyAuthMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - HasSig: true, - Algoname: pub.Type(), - PubKey: pubKey, - Sig: sig, - } - p := Marshal(&msg) - if err := c.writePacket(p); err != nil { - return authFailure, nil, err - } - var success authResult - success, methods, err = handleAuthResponse(c) - if err != nil { - return authFailure, nil, err - } - - // If authentication succeeds or the list of available methods does not - // contain the "publickey" method, do not attempt to authenticate with any - // other keys. According to RFC 4252 Section 7, the latter can occur when - // additional authentication methods are required. - if success == authSuccess || !containsMethod(methods, cb.method()) { - return success, methods, err - } - } - - return authFailure, methods, nil -} - -func containsMethod(methods []string, method string) bool { - for _, m := range methods { - if m == method { - return true - } - } - - return false -} - -// validateKey validates the key provided is acceptable to the server. -func validateKey(key PublicKey, user string, c packetConn) (bool, error) { - pubKey := key.Marshal() - msg := publickeyAuthMsg{ - User: user, - Service: serviceSSH, - Method: "publickey", - HasSig: false, - Algoname: key.Type(), - PubKey: pubKey, - } - if err := c.writePacket(Marshal(&msg)); err != nil { - return false, err - } - - return confirmKeyAck(key, c) -} - -func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { - pubKey := key.Marshal() - algoname := key.Type() - - for { - packet, err := c.readPacket() - if err != nil { - return false, err - } - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return false, err - } - case msgUserAuthPubKeyOk: - var msg userAuthPubKeyOkMsg - if err := Unmarshal(packet, &msg); err != nil { - return false, err - } - if msg.Algo != algoname || !bytes.Equal(msg.PubKey, pubKey) { - return false, nil - } - return true, nil - case msgUserAuthFailure: - return false, nil - default: - return false, unexpectedMessageError(msgUserAuthSuccess, packet[0]) - } - } -} - -// PublicKeys returns an AuthMethod that uses the given key -// pairs. -func PublicKeys(signers ...Signer) AuthMethod { - return publicKeyCallback(func() ([]Signer, error) { return signers, nil }) -} - -// PublicKeysCallback returns an AuthMethod that runs the given -// function to obtain a list of key pairs. -func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMethod { - return publicKeyCallback(getSigners) -} - -// handleAuthResponse returns whether the preceding authentication request succeeded -// along with a list of remaining authentication methods to try next and -// an error if an unexpected response was received. -func handleAuthResponse(c packetConn) (authResult, []string, error) { - for { - packet, err := c.readPacket() - if err != nil { - return authFailure, nil, err - } - - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return authFailure, nil, err - } - case msgUserAuthFailure: - var msg userAuthFailureMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - if msg.PartialSuccess { - return authPartialSuccess, msg.Methods, nil - } - return authFailure, msg.Methods, nil - case msgUserAuthSuccess: - return authSuccess, nil, nil - default: - return authFailure, nil, unexpectedMessageError(msgUserAuthSuccess, packet[0]) - } - } -} - -func handleBannerResponse(c packetConn, packet []byte) error { - var msg userAuthBannerMsg - if err := Unmarshal(packet, &msg); err != nil { - return err - } - - transport, ok := c.(*handshakeTransport) - if !ok { - return nil - } - - if transport.bannerCallback != nil { - return transport.bannerCallback(msg.Message) - } - - return nil -} - -// KeyboardInteractiveChallenge should print questions, optionally -// disabling echoing (e.g. for passwords), and return all the answers. -// Challenge may be called multiple times in a single session. After -// successful authentication, the server may send a challenge with no -// questions, for which the user and instruction messages should be -// printed. RFC 4256 section 3.3 details how the UI should behave for -// both CLI and GUI environments. -type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error) - -// KeyboardInteractive returns an AuthMethod using a prompt/response -// sequence controlled by the server. -func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod { - return challenge -} - -func (cb KeyboardInteractiveChallenge) method() string { - return "keyboard-interactive" -} - -func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - type initiateMsg struct { - User string `sshtype:"50"` - Service string - Method string - Language string - Submethods string - } - - if err := c.writePacket(Marshal(&initiateMsg{ - User: user, - Service: serviceSSH, - Method: "keyboard-interactive", - })); err != nil { - return authFailure, nil, err - } - - for { - packet, err := c.readPacket() - if err != nil { - return authFailure, nil, err - } - - // like handleAuthResponse, but with less options. - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return authFailure, nil, err - } - continue - case msgUserAuthInfoRequest: - // OK - case msgUserAuthFailure: - var msg userAuthFailureMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - if msg.PartialSuccess { - return authPartialSuccess, msg.Methods, nil - } - return authFailure, msg.Methods, nil - case msgUserAuthSuccess: - return authSuccess, nil, nil - default: - return authFailure, nil, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) - } - - var msg userAuthInfoRequestMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - - // Manually unpack the prompt/echo pairs. - rest := msg.Prompts - var prompts []string - var echos []bool - for i := 0; i < int(msg.NumPrompts); i++ { - prompt, r, ok := parseString(rest) - if !ok || len(r) == 0 { - return authFailure, nil, errors.New("ssh: prompt format error") - } - prompts = append(prompts, string(prompt)) - echos = append(echos, r[0] != 0) - rest = r[1:] - } - - if len(rest) != 0 { - return authFailure, nil, errors.New("ssh: extra data following keyboard-interactive pairs") - } - - answers, err := cb(msg.User, msg.Instruction, prompts, echos) - if err != nil { - return authFailure, nil, err - } - - if len(answers) != len(prompts) { - return authFailure, nil, errors.New("ssh: not enough answers from keyboard-interactive callback") - } - responseLength := 1 + 4 - for _, a := range answers { - responseLength += stringLength(len(a)) - } - serialized := make([]byte, responseLength) - p := serialized - p[0] = msgUserAuthInfoResponse - p = p[1:] - p = marshalUint32(p, uint32(len(answers))) - for _, a := range answers { - p = marshalString(p, []byte(a)) - } - - if err := c.writePacket(serialized); err != nil { - return authFailure, nil, err - } - } -} - -type retryableAuthMethod struct { - authMethod AuthMethod - maxTries int -} - -func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader) (ok authResult, methods []string, err error) { - for i := 0; r.maxTries <= 0 || i < r.maxTries; i++ { - ok, methods, err = r.authMethod.auth(session, user, c, rand) - if ok != authFailure || err != nil { // either success, partial success or error terminate - return ok, methods, err - } - } - return ok, methods, err -} - -func (r *retryableAuthMethod) method() string { - return r.authMethod.method() -} - -// RetryableAuthMethod is a decorator for other auth methods enabling them to -// be retried up to maxTries before considering that AuthMethod itself failed. -// If maxTries is <= 0, will retry indefinitely -// -// This is useful for interactive clients using challenge/response type -// authentication (e.g. Keyboard-Interactive, Password, etc) where the user -// could mistype their response resulting in the server issuing a -// SSH_MSG_USERAUTH_FAILURE (rfc4252 #8 [password] and rfc4256 #3.4 -// [keyboard-interactive]); Without this decorator, the non-retryable -// AuthMethod would be removed from future consideration, and never tried again -// (and so the user would never be able to retry their entry). -func RetryableAuthMethod(auth AuthMethod, maxTries int) AuthMethod { - return &retryableAuthMethod{authMethod: auth, maxTries: maxTries} -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth_test.go deleted file mode 100644 index 5fbb20d85f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_auth_test.go +++ /dev/null @@ -1,628 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "crypto/rand" - "errors" - "fmt" - "os" - "strings" - "testing" -) - -type keyboardInteractive map[string]string - -func (cr keyboardInteractive) Challenge(user string, instruction string, questions []string, echos []bool) ([]string, error) { - var answers []string - for _, q := range questions { - answers = append(answers, cr[q]) - } - return answers, nil -} - -// reused internally by tests -var clientPassword = "tiger" - -// tryAuth runs a handshake with a given config against an SSH server -// with config serverConfig -func tryAuth(t *testing.T, config *ClientConfig) error { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - certChecker := CertChecker{ - IsUserAuthority: func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), testPublicKeys["ecdsa"].Marshal()) - }, - UserKeyFallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { - if conn.User() == "testuser" && bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) { - return nil, nil - } - - return nil, fmt.Errorf("pubkey for %q not acceptable", conn.User()) - }, - IsRevoked: func(c *Certificate) bool { - return c.Serial == 666 - }, - } - - serverConfig := &ServerConfig{ - PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { - if conn.User() == "testuser" && string(pass) == clientPassword { - return nil, nil - } - return nil, errors.New("password auth failed") - }, - PublicKeyCallback: certChecker.Authenticate, - KeyboardInteractiveCallback: func(conn ConnMetadata, challenge KeyboardInteractiveChallenge) (*Permissions, error) { - ans, err := challenge("user", - "instruction", - []string{"question1", "question2"}, - []bool{true, true}) - if err != nil { - return nil, err - } - ok := conn.User() == "testuser" && ans[0] == "answer1" && ans[1] == "answer2" - if ok { - challenge("user", "motd", nil, nil) - return nil, nil - } - return nil, errors.New("keyboard-interactive failed") - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - go newServer(c1, serverConfig) - _, _, _, err = NewClientConn(c2, "", config) - return err -} - -func TestClientAuthPublicKey(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodPassword(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - Password(clientPassword), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodFallback(t *testing.T) { - var passwordCalled bool - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - PasswordCallback( - func() (string, error) { - passwordCalled = true - return "WRONG", nil - }), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - - if passwordCalled { - t.Errorf("password auth tried before public-key auth.") - } -} - -func TestAuthMethodWrongPassword(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - Password("wrong"), - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodKeyboardInteractive(t *testing.T) { - answers := keyboardInteractive(map[string]string{ - "question1": "answer1", - "question2": "answer2", - }) - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - KeyboardInteractive(answers.Challenge), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodWrongKeyboardInteractive(t *testing.T) { - answers := keyboardInteractive(map[string]string{ - "question1": "answer1", - "question2": "WRONG", - }) - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - KeyboardInteractive(answers.Challenge), - }, - } - - if err := tryAuth(t, config); err == nil { - t.Fatalf("wrong answers should not have authenticated with KeyboardInteractive") - } -} - -// the mock server will only authenticate ssh-rsa keys -func TestAuthMethodInvalidPublicKey(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["dsa"]), - }, - } - - if err := tryAuth(t, config); err == nil { - t.Fatalf("dsa private key should not have authenticated with rsa public key") - } -} - -// the client should authenticate with the second key -func TestAuthMethodRSAandDSA(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["dsa"], testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("client could not authenticate with rsa key: %v", err) - } -} - -func TestClientHMAC(t *testing.T) { - for _, mac := range supportedMACs { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - Config: Config{ - MACs: []string{mac}, - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("client could not authenticate with mac algo %s: %v", mac, err) - } - } -} - -// issue 4285. -func TestClientUnsupportedCipher(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(), - }, - Config: Config{ - Ciphers: []string{"aes128-cbc"}, // not currently supported - }, - } - if err := tryAuth(t, config); err == nil { - t.Errorf("expected no ciphers in common") - } -} - -func TestClientUnsupportedKex(t *testing.T) { - if os.Getenv("GO_BUILDER_NAME") != "" { - t.Skip("skipping known-flaky test on the Go build dashboard; see golang.org/issue/15198") - } - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(), - }, - Config: Config{ - KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, // not currently supported - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err == nil || !strings.Contains(err.Error(), "common algorithm") { - t.Errorf("got %v, expected 'common algorithm'", err) - } -} - -func TestClientLoginCert(t *testing.T) { - cert := &Certificate{ - Key: testPublicKeys["rsa"], - ValidBefore: CertTimeInfinity, - CertType: UserCert, - } - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - certSigner, err := NewCertSigner(cert, testSigners["rsa"]) - if err != nil { - t.Fatalf("NewCertSigner: %v", err) - } - - clientConfig := &ClientConfig{ - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - } - clientConfig.Auth = append(clientConfig.Auth, PublicKeys(certSigner)) - - // should succeed - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login failed: %v", err) - } - - // corrupted signature - cert.Signature.Blob[0]++ - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with corrupted sig") - } - - // revoked - cert.Serial = 666 - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("revoked cert login succeeded") - } - cert.Serial = 1 - - // sign with wrong key - cert.SignCert(rand.Reader, testSigners["dsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with non-authoritative key") - } - - // host cert - cert.CertType = HostCert - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with wrong type") - } - cert.CertType = UserCert - - // principal specified - cert.ValidPrincipals = []string{"user"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login failed: %v", err) - } - - // wrong principal specified - cert.ValidPrincipals = []string{"fred"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with wrong principal") - } - cert.ValidPrincipals = nil - - // added critical option - cert.CriticalOptions = map[string]string{"root-access": "yes"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with unrecognized critical option") - } - - // allowed source address - cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42/24,::42/120"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login with source-address failed: %v", err) - } - - // disallowed source address - cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42,::42"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login with source-address succeeded") - } -} - -func testPermissionsPassing(withPermissions bool, t *testing.T) { - serverConfig := &ServerConfig{ - PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { - if conn.User() == "nopermissions" { - return nil, nil - } - return &Permissions{}, nil - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - clientConfig := &ClientConfig{ - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if withPermissions { - clientConfig.User = "permissions" - } else { - clientConfig.User = "nopermissions" - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - serverConn, err := newServer(c1, serverConfig) - if err != nil { - t.Fatal(err) - } - if p := serverConn.Permissions; (p != nil) != withPermissions { - t.Fatalf("withPermissions is %t, but Permissions object is %#v", withPermissions, p) - } -} - -func TestPermissionsPassing(t *testing.T) { - testPermissionsPassing(true, t) -} - -func TestNoPermissionsPassing(t *testing.T) { - testPermissionsPassing(false, t) -} - -func TestRetryableAuth(t *testing.T) { - n := 0 - passwords := []string{"WRONG1", "WRONG2"} - - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - RetryableAuthMethod(PasswordCallback(func() (string, error) { - p := passwords[n] - n++ - return p, nil - }), 2), - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - if n != 2 { - t.Fatalf("Did not try all passwords") - } -} - -func ExampleRetryableAuthMethod(t *testing.T) { - user := "testuser" - NumberOfPrompts := 3 - - // Normally this would be a callback that prompts the user to answer the - // provided questions - Cb := func(user, instruction string, questions []string, echos []bool) (answers []string, err error) { - return []string{"answer1", "answer2"}, nil - } - - config := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - User: user, - Auth: []AuthMethod{ - RetryableAuthMethod(KeyboardInteractiveChallenge(Cb), NumberOfPrompts), - }, - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -// Test if username is received on server side when NoClientAuth is used -func TestClientAuthNone(t *testing.T) { - user := "testuser" - serverConfig := &ServerConfig{ - NoClientAuth: true, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - clientConfig := &ClientConfig{ - User: user, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - serverConn, err := newServer(c1, serverConfig) - if err != nil { - t.Fatalf("newServer: %v", err) - } - if serverConn.User() != user { - t.Fatalf("server: got %q, want %q", serverConn.User(), user) - } -} - -// Test if authentication attempts are limited on server when MaxAuthTries is set -func TestClientAuthMaxAuthTries(t *testing.T) { - user := "testuser" - - serverConfig := &ServerConfig{ - MaxAuthTries: 2, - PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { - if conn.User() == "testuser" && string(pass) == "right" { - return nil, nil - } - return nil, errors.New("password auth failed") - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - }) - - for tries := 2; tries < 4; tries++ { - n := tries - clientConfig := &ClientConfig{ - User: user, - Auth: []AuthMethod{ - RetryableAuthMethod(PasswordCallback(func() (string, error) { - n-- - if n == 0 { - return "right", nil - } - return "wrong", nil - }), tries), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go newServer(c1, serverConfig) - _, _, _, err = NewClientConn(c2, "", clientConfig) - if tries > 2 { - if err == nil { - t.Fatalf("client: got no error, want %s", expectedErr) - } else if err.Error() != expectedErr.Error() { - t.Fatalf("client: got %s, want %s", err, expectedErr) - } - } else { - if err != nil { - t.Fatalf("client: got %s, want no error", err) - } - } - } -} - -// Test if authentication attempts are correctly limited on server -// when more public keys are provided then MaxAuthTries -func TestClientAuthMaxAuthTriesPublicKey(t *testing.T) { - signers := []Signer{} - for i := 0; i < 6; i++ { - signers = append(signers, testSigners["dsa"]) - } - - validConfig := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(append([]Signer{testSigners["rsa"]}, signers...)...), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, validConfig); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - - expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - }) - invalidConfig := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(append(signers, testSigners["rsa"])...), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, invalidConfig); err == nil { - t.Fatalf("client: got no error, want %s", expectedErr) - } else if err.Error() != expectedErr.Error() { - t.Fatalf("client: got %s, want %s", err, expectedErr) - } -} - -// Test whether authentication errors are being properly logged if all -// authentication methods have been exhausted -func TestClientAuthErrorList(t *testing.T) { - publicKeyErr := errors.New("This is an error from PublicKeyCallback") - - clientConfig := &ClientConfig{ - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - serverConfig := &ServerConfig{ - PublicKeyCallback: func(_ ConnMetadata, _ PublicKey) (*Permissions, error) { - return nil, publicKeyErr - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - _, err = newServer(c1, serverConfig) - if err == nil { - t.Fatal("newServer: got nil, expected errors") - } - - authErrs, ok := err.(*ServerAuthError) - if !ok { - t.Fatalf("errors: got %T, want *ssh.ServerAuthError", err) - } - for i, e := range authErrs.Errors { - switch i { - case 0: - if e != ErrNoAuth { - t.Fatalf("errors: got error %v, want ErrNoAuth", e) - } - case 1: - if e != publicKeyErr { - t.Fatalf("errors: got %v, want %v", e, publicKeyErr) - } - default: - t.Fatalf("errors: got %v, expected 2 errors", authErrs.Errors) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_test.go deleted file mode 100644 index 81f9599e1d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/client_test.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2014 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 ssh - -import ( - "strings" - "testing" -) - -func TestClientVersion(t *testing.T) { - for _, tt := range []struct { - name string - version string - multiLine string - wantErr bool - }{ - { - name: "default version", - version: packageVersion, - }, - { - name: "custom version", - version: "SSH-2.0-CustomClientVersionString", - }, - { - name: "good multi line version", - version: packageVersion, - multiLine: strings.Repeat("ignored\r\n", 20), - }, - { - name: "bad multi line version", - version: packageVersion, - multiLine: "bad multi line version", - wantErr: true, - }, - { - name: "long multi line version", - version: packageVersion, - multiLine: strings.Repeat("long multi line version\r\n", 50)[:256], - wantErr: true, - }, - } { - t.Run(tt.name, func(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - go func() { - if tt.multiLine != "" { - c1.Write([]byte(tt.multiLine)) - } - NewClientConn(c1, "", &ClientConfig{ - ClientVersion: tt.version, - HostKeyCallback: InsecureIgnoreHostKey(), - }) - c1.Close() - }() - conf := &ServerConfig{NoClientAuth: true} - conf.AddHostKey(testSigners["rsa"]) - conn, _, _, err := NewServerConn(c2, conf) - if err == nil == tt.wantErr { - t.Fatalf("got err %v; wantErr %t", err, tt.wantErr) - } - if tt.wantErr { - // Don't verify the version on an expected error. - return - } - if got := string(conn.ClientVersion()); got != tt.version { - t.Fatalf("got %q; want %q", got, tt.version) - } - }) - } -} - -func TestHostKeyCheck(t *testing.T) { - for _, tt := range []struct { - name string - wantError string - key PublicKey - }{ - {"no callback", "must specify HostKeyCallback", nil}, - {"correct key", "", testSigners["rsa"].PublicKey()}, - {"mismatch", "mismatch", testSigners["ecdsa"].PublicKey()}, - } { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["rsa"]) - - go NewServerConn(c1, serverConf) - clientConf := ClientConfig{ - User: "user", - } - if tt.key != nil { - clientConf.HostKeyCallback = FixedHostKey(tt.key) - } - - _, _, _, err = NewClientConn(c2, "", &clientConf) - if err != nil { - if tt.wantError == "" || !strings.Contains(err.Error(), tt.wantError) { - t.Errorf("%s: got error %q, missing %q", tt.name, err.Error(), tt.wantError) - } - } else if tt.wantError != "" { - t.Errorf("%s: succeeded, but want error string %q", tt.name, tt.wantError) - } - } -} - -func TestBannerCallback(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serverConf := &ServerConfig{ - PasswordCallback: func(conn ConnMetadata, password []byte) (*Permissions, error) { - return &Permissions{}, nil - }, - BannerCallback: func(conn ConnMetadata) string { - return "Hello World" - }, - } - serverConf.AddHostKey(testSigners["rsa"]) - go NewServerConn(c1, serverConf) - - var receivedBanner string - var bannerCount int - clientConf := ClientConfig{ - Auth: []AuthMethod{ - Password("123"), - }, - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - BannerCallback: func(message string) error { - bannerCount++ - receivedBanner = message - return nil - }, - } - - _, _, _, err = NewClientConn(c2, "", &clientConf) - if err != nil { - t.Fatal(err) - } - - if bannerCount != 1 { - t.Errorf("got %d banners; want 1", bannerCount) - } - - expected := "Hello World" - if receivedBanner != expected { - t.Fatalf("got %s; want %s", receivedBanner, expected) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/common.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/common.go deleted file mode 100644 index 04f3620b3d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/common.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "crypto" - "crypto/rand" - "fmt" - "io" - "math" - "sync" - - _ "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" -) - -// These are string constants in the SSH protocol. -const ( - compressionNone = "none" - serviceUserAuth = "ssh-userauth" - serviceSSH = "ssh-connection" -) - -// supportedCiphers lists ciphers we support but might not recommend. -var supportedCiphers = []string{ - "aes128-ctr", "aes192-ctr", "aes256-ctr", - "aes128-gcm@openssh.com", - chacha20Poly1305ID, - "arcfour256", "arcfour128", "arcfour", - aes128cbcID, - tripledescbcID, -} - -// preferredCiphers specifies the default preference for ciphers. -var preferredCiphers = []string{ - "aes128-gcm@openssh.com", - chacha20Poly1305ID, - "aes128-ctr", "aes192-ctr", "aes256-ctr", -} - -// supportedKexAlgos specifies the supported key-exchange algorithms in -// preference order. -var supportedKexAlgos = []string{ - kexAlgoCurve25519SHA256, - // P384 and P521 are not constant-time yet, but since we don't - // reuse ephemeral keys, using them for ECDH should be OK. - kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, - kexAlgoDH14SHA1, kexAlgoDH1SHA1, -} - -// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods -// of authenticating servers) in preference order. -var supportedHostKeyAlgos = []string{ - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, - CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01, - - KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, - KeyAlgoRSA, KeyAlgoDSA, - - KeyAlgoED25519, -} - -// supportedMACs specifies a default set of MAC algorithms in preference order. -// This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed -// because they have reached the end of their useful life. -var supportedMACs = []string{ - "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96", -} - -var supportedCompressions = []string{compressionNone} - -// hashFuncs keeps the mapping of supported algorithms to their respective -// hashes needed for signature verification. -var hashFuncs = map[string]crypto.Hash{ - KeyAlgoRSA: crypto.SHA1, - KeyAlgoDSA: crypto.SHA1, - KeyAlgoECDSA256: crypto.SHA256, - KeyAlgoECDSA384: crypto.SHA384, - KeyAlgoECDSA521: crypto.SHA512, - CertAlgoRSAv01: crypto.SHA1, - CertAlgoDSAv01: crypto.SHA1, - CertAlgoECDSA256v01: crypto.SHA256, - CertAlgoECDSA384v01: crypto.SHA384, - CertAlgoECDSA521v01: crypto.SHA512, -} - -// unexpectedMessageError results when the SSH message that we received didn't -// match what we wanted. -func unexpectedMessageError(expected, got uint8) error { - return fmt.Errorf("ssh: unexpected message type %d (expected %d)", got, expected) -} - -// parseError results from a malformed SSH message. -func parseError(tag uint8) error { - return fmt.Errorf("ssh: parse error in message type %d", tag) -} - -func findCommon(what string, client []string, server []string) (common string, err error) { - for _, c := range client { - for _, s := range server { - if c == s { - return c, nil - } - } - } - return "", fmt.Errorf("ssh: no common algorithm for %s; client offered: %v, server offered: %v", what, client, server) -} - -type directionAlgorithms struct { - Cipher string - MAC string - Compression string -} - -// rekeyBytes returns a rekeying intervals in bytes. -func (a *directionAlgorithms) rekeyBytes() int64 { - // According to RFC4344 block ciphers should rekey after - // 2^(BLOCKSIZE/4) blocks. For all AES flavors BLOCKSIZE is - // 128. - switch a.Cipher { - case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcmCipherID, aes128cbcID: - return 16 * (1 << 32) - - } - - // For others, stick with RFC4253 recommendation to rekey after 1 Gb of data. - return 1 << 30 -} - -type algorithms struct { - kex string - hostKey string - w directionAlgorithms - r directionAlgorithms -} - -func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) { - result := &algorithms{} - - result.kex, err = findCommon("key exchange", clientKexInit.KexAlgos, serverKexInit.KexAlgos) - if err != nil { - return - } - - result.hostKey, err = findCommon("host key", clientKexInit.ServerHostKeyAlgos, serverKexInit.ServerHostKeyAlgos) - if err != nil { - return - } - - result.w.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer) - if err != nil { - return - } - - result.r.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient) - if err != nil { - return - } - - result.w.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer) - if err != nil { - return - } - - result.r.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient) - if err != nil { - return - } - - result.w.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer) - if err != nil { - return - } - - result.r.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient) - if err != nil { - return - } - - return result, nil -} - -// If rekeythreshold is too small, we can't make any progress sending -// stuff. -const minRekeyThreshold uint64 = 256 - -// Config contains configuration data common to both ServerConfig and -// ClientConfig. -type Config struct { - // Rand provides the source of entropy for cryptographic - // primitives. If Rand is nil, the cryptographic random reader - // in package crypto/rand will be used. - Rand io.Reader - - // The maximum number of bytes sent or received after which a - // new key is negotiated. It must be at least 256. If - // unspecified, a size suitable for the chosen cipher is used. - RekeyThreshold uint64 - - // The allowed key exchanges algorithms. If unspecified then a - // default set of algorithms is used. - KeyExchanges []string - - // The allowed cipher algorithms. If unspecified then a sensible - // default is used. - Ciphers []string - - // The allowed MAC algorithms. If unspecified then a sensible default - // is used. - MACs []string -} - -// SetDefaults sets sensible values for unset fields in config. This is -// exported for testing: Configs passed to SSH functions are copied and have -// default values set automatically. -func (c *Config) SetDefaults() { - if c.Rand == nil { - c.Rand = rand.Reader - } - if c.Ciphers == nil { - c.Ciphers = preferredCiphers - } - var ciphers []string - for _, c := range c.Ciphers { - if cipherModes[c] != nil { - // reject the cipher if we have no cipherModes definition - ciphers = append(ciphers, c) - } - } - c.Ciphers = ciphers - - if c.KeyExchanges == nil { - c.KeyExchanges = supportedKexAlgos - } - - if c.MACs == nil { - c.MACs = supportedMACs - } - - if c.RekeyThreshold == 0 { - // cipher specific default - } else if c.RekeyThreshold < minRekeyThreshold { - c.RekeyThreshold = minRekeyThreshold - } else if c.RekeyThreshold >= math.MaxInt64 { - // Avoid weirdness if somebody uses -1 as a threshold. - c.RekeyThreshold = math.MaxInt64 - } -} - -// buildDataSignedForAuth returns the data that is signed in order to prove -// possession of a private key. See RFC 4252, section 7. -func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { - data := struct { - Session []byte - Type byte - User string - Service string - Method string - Sign bool - Algo []byte - PubKey []byte - }{ - sessionID, - msgUserAuthRequest, - req.User, - req.Service, - req.Method, - true, - algo, - pubKey, - } - return Marshal(data) -} - -func appendU16(buf []byte, n uint16) []byte { - return append(buf, byte(n>>8), byte(n)) -} - -func appendU32(buf []byte, n uint32) []byte { - return append(buf, byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) -} - -func appendU64(buf []byte, n uint64) []byte { - return append(buf, - byte(n>>56), byte(n>>48), byte(n>>40), byte(n>>32), - byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) -} - -func appendInt(buf []byte, n int) []byte { - return appendU32(buf, uint32(n)) -} - -func appendString(buf []byte, s string) []byte { - buf = appendU32(buf, uint32(len(s))) - buf = append(buf, s...) - return buf -} - -func appendBool(buf []byte, b bool) []byte { - if b { - return append(buf, 1) - } - return append(buf, 0) -} - -// newCond is a helper to hide the fact that there is no usable zero -// value for sync.Cond. -func newCond() *sync.Cond { return sync.NewCond(new(sync.Mutex)) } - -// window represents the buffer available to clients -// wishing to write to a channel. -type window struct { - *sync.Cond - win uint32 // RFC 4254 5.2 says the window size can grow to 2^32-1 - writeWaiters int - closed bool -} - -// add adds win to the amount of window available -// for consumers. -func (w *window) add(win uint32) bool { - // a zero sized window adjust is a noop. - if win == 0 { - return true - } - w.L.Lock() - if w.win+win < win { - w.L.Unlock() - return false - } - w.win += win - // It is unusual that multiple goroutines would be attempting to reserve - // window space, but not guaranteed. Use broadcast to notify all waiters - // that additional window is available. - w.Broadcast() - w.L.Unlock() - return true -} - -// close sets the window to closed, so all reservations fail -// immediately. -func (w *window) close() { - w.L.Lock() - w.closed = true - w.Broadcast() - w.L.Unlock() -} - -// reserve reserves win from the available window capacity. -// If no capacity remains, reserve will block. reserve may -// return less than requested. -func (w *window) reserve(win uint32) (uint32, error) { - var err error - w.L.Lock() - w.writeWaiters++ - w.Broadcast() - for w.win == 0 && !w.closed { - w.Wait() - } - w.writeWaiters-- - if w.win < win { - win = w.win - } - w.win -= win - if w.closed { - err = io.EOF - } - w.L.Unlock() - return win, err -} - -// waitWriterBlocked waits until some goroutine is blocked for further -// writes. It is used in tests only. -func (w *window) waitWriterBlocked() { - w.Cond.L.Lock() - for w.writeWaiters == 0 { - w.Cond.Wait() - } - w.Cond.L.Unlock() -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/connection.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/connection.go deleted file mode 100644 index fd6b0681b5..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/connection.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "fmt" - "net" -) - -// OpenChannelError is returned if the other side rejects an -// OpenChannel request. -type OpenChannelError struct { - Reason RejectionReason - Message string -} - -func (e *OpenChannelError) Error() string { - return fmt.Sprintf("ssh: rejected: %s (%s)", e.Reason, e.Message) -} - -// ConnMetadata holds metadata for the connection. -type ConnMetadata interface { - // User returns the user ID for this connection. - User() string - - // SessionID returns the session hash, also denoted by H. - SessionID() []byte - - // ClientVersion returns the client's version string as hashed - // into the session ID. - ClientVersion() []byte - - // ServerVersion returns the server's version string as hashed - // into the session ID. - ServerVersion() []byte - - // RemoteAddr returns the remote address for this connection. - RemoteAddr() net.Addr - - // LocalAddr returns the local address for this connection. - LocalAddr() net.Addr -} - -// Conn represents an SSH connection for both server and client roles. -// Conn is the basis for implementing an application layer, such -// as ClientConn, which implements the traditional shell access for -// clients. -type Conn interface { - ConnMetadata - - // SendRequest sends a global request, and returns the - // reply. If wantReply is true, it returns the response status - // and payload. See also RFC4254, section 4. - SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) - - // OpenChannel tries to open an channel. If the request is - // rejected, it returns *OpenChannelError. On success it returns - // the SSH Channel and a Go channel for incoming, out-of-band - // requests. The Go channel must be serviced, or the - // connection will hang. - OpenChannel(name string, data []byte) (Channel, <-chan *Request, error) - - // Close closes the underlying network connection - Close() error - - // Wait blocks until the connection has shut down, and returns the - // error causing the shutdown. - Wait() error - - // TODO(hanwen): consider exposing: - // RequestKeyChange - // Disconnect -} - -// DiscardRequests consumes and rejects all requests from the -// passed-in channel. -func DiscardRequests(in <-chan *Request) { - for req := range in { - if req.WantReply { - req.Reply(false, nil) - } - } -} - -// A connection represents an incoming connection. -type connection struct { - transport *handshakeTransport - sshConn - - // The connection protocol. - *mux -} - -func (c *connection) Close() error { - return c.sshConn.conn.Close() -} - -// sshconn provides net.Conn metadata, but disallows direct reads and -// writes. -type sshConn struct { - conn net.Conn - - user string - sessionID []byte - clientVersion []byte - serverVersion []byte -} - -func dup(src []byte) []byte { - dst := make([]byte, len(src)) - copy(dst, src) - return dst -} - -func (c *sshConn) User() string { - return c.user -} - -func (c *sshConn) RemoteAddr() net.Addr { - return c.conn.RemoteAddr() -} - -func (c *sshConn) Close() error { - return c.conn.Close() -} - -func (c *sshConn) LocalAddr() net.Addr { - return c.conn.LocalAddr() -} - -func (c *sshConn) SessionID() []byte { - return dup(c.sessionID) -} - -func (c *sshConn) ClientVersion() []byte { - return dup(c.clientVersion) -} - -func (c *sshConn) ServerVersion() []byte { - return dup(c.serverVersion) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/doc.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/doc.go deleted file mode 100644 index 6eb34c58d0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2011 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 ssh implements an SSH client and server. - -SSH is a transport security protocol, an authentication protocol and a -family of application protocols. The most typical application level -protocol is a remote shell and this is specifically implemented. However, -the multiplexed nature of SSH is exposed to users that wish to support -others. - -References: - [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD - [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 - -This package does not fall under the stability promise of the Go language itself, -so its API may be changed when pressing needs arise. -*/ -package ssh diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/example_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/example_test.go deleted file mode 100644 index 26ef834646..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/example_test.go +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright 2011 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 ssh_test - -import ( - "bufio" - "bytes" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "os" - "path/filepath" - "strings" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal" -) - -func ExampleNewServerConn() { - // Public key authentication is done by comparing - // the public key of a received connection - // with the entries in the authorized_keys file. - authorizedKeysBytes, err := ioutil.ReadFile("authorized_keys") - if err != nil { - log.Fatalf("Failed to load authorized_keys, err: %v", err) - } - - authorizedKeysMap := map[string]bool{} - for len(authorizedKeysBytes) > 0 { - pubKey, _, _, rest, err := ssh.ParseAuthorizedKey(authorizedKeysBytes) - if err != nil { - log.Fatal(err) - } - - authorizedKeysMap[string(pubKey.Marshal())] = true - authorizedKeysBytes = rest - } - - // An SSH server is represented by a ServerConfig, which holds - // certificate details and handles authentication of ServerConns. - config := &ssh.ServerConfig{ - // Remove to disable password auth. - PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) { - // Should use constant-time compare (or better, salt+hash) in - // a production setting. - if c.User() == "testuser" && string(pass) == "tiger" { - return nil, nil - } - return nil, fmt.Errorf("password rejected for %q", c.User()) - }, - - // Remove to disable public key auth. - PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) { - if authorizedKeysMap[string(pubKey.Marshal())] { - return &ssh.Permissions{ - // Record the public key used for authentication. - Extensions: map[string]string{ - "pubkey-fp": ssh.FingerprintSHA256(pubKey), - }, - }, nil - } - return nil, fmt.Errorf("unknown public key for %q", c.User()) - }, - } - - privateBytes, err := ioutil.ReadFile("id_rsa") - if err != nil { - log.Fatal("Failed to load private key: ", err) - } - - private, err := ssh.ParsePrivateKey(privateBytes) - if err != nil { - log.Fatal("Failed to parse private key: ", err) - } - - config.AddHostKey(private) - - // Once a ServerConfig has been configured, connections can be - // accepted. - listener, err := net.Listen("tcp", "0.0.0.0:2022") - if err != nil { - log.Fatal("failed to listen for connection: ", err) - } - nConn, err := listener.Accept() - if err != nil { - log.Fatal("failed to accept incoming connection: ", err) - } - - // Before use, a handshake must be performed on the incoming - // net.Conn. - conn, chans, reqs, err := ssh.NewServerConn(nConn, config) - if err != nil { - log.Fatal("failed to handshake: ", err) - } - log.Printf("logged in with key %s", conn.Permissions.Extensions["pubkey-fp"]) - - // The incoming Request channel must be serviced. - go ssh.DiscardRequests(reqs) - - // Service the incoming Channel channel. - for newChannel := range chans { - // Channels have a type, depending on the application level - // protocol intended. In the case of a shell, the type is - // "session" and ServerShell may be used to present a simple - // terminal interface. - if newChannel.ChannelType() != "session" { - newChannel.Reject(ssh.UnknownChannelType, "unknown channel type") - continue - } - channel, requests, err := newChannel.Accept() - if err != nil { - log.Fatalf("Could not accept channel: %v", err) - } - - // Sessions have out-of-band requests such as "shell", - // "pty-req" and "env". Here we handle only the - // "shell" request. - go func(in <-chan *ssh.Request) { - for req := range in { - req.Reply(req.Type == "shell", nil) - } - }(requests) - - term := terminal.NewTerminal(channel, "> ") - - go func() { - defer channel.Close() - for { - line, err := term.ReadLine() - if err != nil { - break - } - fmt.Println(line) - } - }() - } -} - -func ExampleHostKeyCheck() { - // Every client must provide a host key check. Here is a - // simple-minded parse of OpenSSH's known_hosts file - host := "hostname" - file, err := os.Open(filepath.Join(os.Getenv("HOME"), ".ssh", "known_hosts")) - if err != nil { - log.Fatal(err) - } - defer file.Close() - - scanner := bufio.NewScanner(file) - var hostKey ssh.PublicKey - for scanner.Scan() { - fields := strings.Split(scanner.Text(), " ") - if len(fields) != 3 { - continue - } - if strings.Contains(fields[0], host) { - var err error - hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes()) - if err != nil { - log.Fatalf("error parsing %q: %v", fields[2], err) - } - break - } - } - - if hostKey == nil { - log.Fatalf("no hostkey for %s", host) - } - - config := ssh.ClientConfig{ - User: os.Getenv("USER"), - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - - _, err = ssh.Dial("tcp", host+":22", &config) - log.Println(err) -} - -func ExampleDial() { - var hostKey ssh.PublicKey - // An SSH client is represented with a ClientConn. - // - // To authenticate with the remote server you must pass at least one - // implementation of AuthMethod via the Auth field in ClientConfig, - // and provide a HostKeyCallback. - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("yourpassword"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - client, err := ssh.Dial("tcp", "yourserver.com:22", config) - if err != nil { - log.Fatal("Failed to dial: ", err) - } - - // Each ClientConn can support multiple interactive sessions, - // represented by a Session. - session, err := client.NewSession() - if err != nil { - log.Fatal("Failed to create session: ", err) - } - defer session.Close() - - // Once a Session is created, you can execute a single command on - // the remote side using the Run method. - var b bytes.Buffer - session.Stdout = &b - if err := session.Run("/usr/bin/whoami"); err != nil { - log.Fatal("Failed to run: " + err.Error()) - } - fmt.Println(b.String()) -} - -func ExamplePublicKeys() { - var hostKey ssh.PublicKey - // A public key may be used to authenticate against the remote - // server by using an unencrypted PEM-encoded private key file. - // - // If you have an encrypted private key, the crypto/x509 package - // can be used to decrypt it. - key, err := ioutil.ReadFile("/home/user/.ssh/id_rsa") - if err != nil { - log.Fatalf("unable to read private key: %v", err) - } - - // Create the Signer for this private key. - signer, err := ssh.ParsePrivateKey(key) - if err != nil { - log.Fatalf("unable to parse private key: %v", err) - } - - config := &ssh.ClientConfig{ - User: "user", - Auth: []ssh.AuthMethod{ - // Use the PublicKeys method for remote authentication. - ssh.PublicKeys(signer), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - - // Connect to the remote server and perform the SSH handshake. - client, err := ssh.Dial("tcp", "host.com:22", config) - if err != nil { - log.Fatalf("unable to connect: %v", err) - } - defer client.Close() -} - -func ExampleClient_Listen() { - var hostKey ssh.PublicKey - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("password"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - // Dial your ssh server. - conn, err := ssh.Dial("tcp", "localhost:22", config) - if err != nil { - log.Fatal("unable to connect: ", err) - } - defer conn.Close() - - // Request the remote side to open port 8080 on all interfaces. - l, err := conn.Listen("tcp", "0.0.0.0:8080") - if err != nil { - log.Fatal("unable to register tcp forward: ", err) - } - defer l.Close() - - // Serve HTTP with your SSH server acting as a reverse proxy. - http.Serve(l, http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { - fmt.Fprintf(resp, "Hello world!\n") - })) -} - -func ExampleSession_RequestPty() { - var hostKey ssh.PublicKey - // Create client config - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("password"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - // Connect to ssh server - conn, err := ssh.Dial("tcp", "localhost:22", config) - if err != nil { - log.Fatal("unable to connect: ", err) - } - defer conn.Close() - // Create a session - session, err := conn.NewSession() - if err != nil { - log.Fatal("unable to create session: ", err) - } - defer session.Close() - // Set up terminal modes - modes := ssh.TerminalModes{ - ssh.ECHO: 0, // disable echoing - ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud - ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud - } - // Request pseudo terminal - if err := session.RequestPty("xterm", 40, 80, modes); err != nil { - log.Fatal("request for pseudo terminal failed: ", err) - } - // Start remote shell - if err := session.Shell(); err != nil { - log.Fatal("failed to start shell: ", err) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake.go deleted file mode 100644 index 4f7912ecd6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake.go +++ /dev/null @@ -1,646 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "crypto/rand" - "errors" - "fmt" - "io" - "log" - "net" - "sync" -) - -// debugHandshake, if set, prints messages sent and received. Key -// exchange messages are printed as if DH were used, so the debug -// messages are wrong when using ECDH. -const debugHandshake = false - -// chanSize sets the amount of buffering SSH connections. This is -// primarily for testing: setting chanSize=0 uncovers deadlocks more -// quickly. -const chanSize = 16 - -// keyingTransport is a packet based transport that supports key -// changes. It need not be thread-safe. It should pass through -// msgNewKeys in both directions. -type keyingTransport interface { - packetConn - - // prepareKeyChange sets up a key change. The key change for a - // direction will be effected if a msgNewKeys message is sent - // or received. - prepareKeyChange(*algorithms, *kexResult) error -} - -// handshakeTransport implements rekeying on top of a keyingTransport -// and offers a thread-safe writePacket() interface. -type handshakeTransport struct { - conn keyingTransport - config *Config - - serverVersion []byte - clientVersion []byte - - // hostKeys is non-empty if we are the server. In that case, - // it contains all host keys that can be used to sign the - // connection. - hostKeys []Signer - - // hostKeyAlgorithms is non-empty if we are the client. In that case, - // we accept these key types from the server as host key. - hostKeyAlgorithms []string - - // On read error, incoming is closed, and readError is set. - incoming chan []byte - readError error - - mu sync.Mutex - writeError error - sentInitPacket []byte - sentInitMsg *kexInitMsg - pendingPackets [][]byte // Used when a key exchange is in progress. - - // If the read loop wants to schedule a kex, it pings this - // channel, and the write loop will send out a kex - // message. - requestKex chan struct{} - - // If the other side requests or confirms a kex, its kexInit - // packet is sent here for the write loop to find it. - startKex chan *pendingKex - - // data for host key checking - hostKeyCallback HostKeyCallback - dialAddress string - remoteAddr net.Addr - - // bannerCallback is non-empty if we are the client and it has been set in - // ClientConfig. In that case it is called during the user authentication - // dance to handle a custom server's message. - bannerCallback BannerCallback - - // Algorithms agreed in the last key exchange. - algorithms *algorithms - - readPacketsLeft uint32 - readBytesLeft int64 - - writePacketsLeft uint32 - writeBytesLeft int64 - - // The session ID or nil if first kex did not complete yet. - sessionID []byte -} - -type pendingKex struct { - otherInit []byte - done chan error -} - -func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, serverVersion []byte) *handshakeTransport { - t := &handshakeTransport{ - conn: conn, - serverVersion: serverVersion, - clientVersion: clientVersion, - incoming: make(chan []byte, chanSize), - requestKex: make(chan struct{}, 1), - startKex: make(chan *pendingKex, 1), - - config: config, - } - t.resetReadThresholds() - t.resetWriteThresholds() - - // We always start with a mandatory key exchange. - t.requestKex <- struct{}{} - return t -} - -func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ClientConfig, dialAddr string, addr net.Addr) *handshakeTransport { - t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) - t.dialAddress = dialAddr - t.remoteAddr = addr - t.hostKeyCallback = config.HostKeyCallback - t.bannerCallback = config.BannerCallback - if config.HostKeyAlgorithms != nil { - t.hostKeyAlgorithms = config.HostKeyAlgorithms - } else { - t.hostKeyAlgorithms = supportedHostKeyAlgos - } - go t.readLoop() - go t.kexLoop() - return t -} - -func newServerTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ServerConfig) *handshakeTransport { - t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) - t.hostKeys = config.hostKeys - go t.readLoop() - go t.kexLoop() - return t -} - -func (t *handshakeTransport) getSessionID() []byte { - return t.sessionID -} - -// waitSession waits for the session to be established. This should be -// the first thing to call after instantiating handshakeTransport. -func (t *handshakeTransport) waitSession() error { - p, err := t.readPacket() - if err != nil { - return err - } - if p[0] != msgNewKeys { - return fmt.Errorf("ssh: first packet should be msgNewKeys") - } - - return nil -} - -func (t *handshakeTransport) id() string { - if len(t.hostKeys) > 0 { - return "server" - } - return "client" -} - -func (t *handshakeTransport) printPacket(p []byte, write bool) { - action := "got" - if write { - action = "sent" - } - - if p[0] == msgChannelData || p[0] == msgChannelExtendedData { - log.Printf("%s %s data (packet %d bytes)", t.id(), action, len(p)) - } else { - msg, err := decode(p) - log.Printf("%s %s %T %v (%v)", t.id(), action, msg, msg, err) - } -} - -func (t *handshakeTransport) readPacket() ([]byte, error) { - p, ok := <-t.incoming - if !ok { - return nil, t.readError - } - return p, nil -} - -func (t *handshakeTransport) readLoop() { - first := true - for { - p, err := t.readOnePacket(first) - first = false - if err != nil { - t.readError = err - close(t.incoming) - break - } - if p[0] == msgIgnore || p[0] == msgDebug { - continue - } - t.incoming <- p - } - - // Stop writers too. - t.recordWriteError(t.readError) - - // Unblock the writer should it wait for this. - close(t.startKex) - - // Don't close t.requestKex; it's also written to from writePacket. -} - -func (t *handshakeTransport) pushPacket(p []byte) error { - if debugHandshake { - t.printPacket(p, true) - } - return t.conn.writePacket(p) -} - -func (t *handshakeTransport) getWriteError() error { - t.mu.Lock() - defer t.mu.Unlock() - return t.writeError -} - -func (t *handshakeTransport) recordWriteError(err error) { - t.mu.Lock() - defer t.mu.Unlock() - if t.writeError == nil && err != nil { - t.writeError = err - } -} - -func (t *handshakeTransport) requestKeyExchange() { - select { - case t.requestKex <- struct{}{}: - default: - // something already requested a kex, so do nothing. - } -} - -func (t *handshakeTransport) resetWriteThresholds() { - t.writePacketsLeft = packetRekeyThreshold - if t.config.RekeyThreshold > 0 { - t.writeBytesLeft = int64(t.config.RekeyThreshold) - } else if t.algorithms != nil { - t.writeBytesLeft = t.algorithms.w.rekeyBytes() - } else { - t.writeBytesLeft = 1 << 30 - } -} - -func (t *handshakeTransport) kexLoop() { - -write: - for t.getWriteError() == nil { - var request *pendingKex - var sent bool - - for request == nil || !sent { - var ok bool - select { - case request, ok = <-t.startKex: - if !ok { - break write - } - case <-t.requestKex: - break - } - - if !sent { - if err := t.sendKexInit(); err != nil { - t.recordWriteError(err) - break - } - sent = true - } - } - - if err := t.getWriteError(); err != nil { - if request != nil { - request.done <- err - } - break - } - - // We're not servicing t.requestKex, but that is OK: - // we never block on sending to t.requestKex. - - // We're not servicing t.startKex, but the remote end - // has just sent us a kexInitMsg, so it can't send - // another key change request, until we close the done - // channel on the pendingKex request. - - err := t.enterKeyExchange(request.otherInit) - - t.mu.Lock() - t.writeError = err - t.sentInitPacket = nil - t.sentInitMsg = nil - - t.resetWriteThresholds() - - // we have completed the key exchange. Since the - // reader is still blocked, it is safe to clear out - // the requestKex channel. This avoids the situation - // where: 1) we consumed our own request for the - // initial kex, and 2) the kex from the remote side - // caused another send on the requestKex channel, - clear: - for { - select { - case <-t.requestKex: - // - default: - break clear - } - } - - request.done <- t.writeError - - // kex finished. Push packets that we received while - // the kex was in progress. Don't look at t.startKex - // and don't increment writtenSinceKex: if we trigger - // another kex while we are still busy with the last - // one, things will become very confusing. - for _, p := range t.pendingPackets { - t.writeError = t.pushPacket(p) - if t.writeError != nil { - break - } - } - t.pendingPackets = t.pendingPackets[:0] - t.mu.Unlock() - } - - // drain startKex channel. We don't service t.requestKex - // because nobody does blocking sends there. - go func() { - for init := range t.startKex { - init.done <- t.writeError - } - }() - - // Unblock reader. - t.conn.Close() -} - -// The protocol uses uint32 for packet counters, so we can't let them -// reach 1<<32. We will actually read and write more packets than -// this, though: the other side may send more packets, and after we -// hit this limit on writing we will send a few more packets for the -// key exchange itself. -const packetRekeyThreshold = (1 << 31) - -func (t *handshakeTransport) resetReadThresholds() { - t.readPacketsLeft = packetRekeyThreshold - if t.config.RekeyThreshold > 0 { - t.readBytesLeft = int64(t.config.RekeyThreshold) - } else if t.algorithms != nil { - t.readBytesLeft = t.algorithms.r.rekeyBytes() - } else { - t.readBytesLeft = 1 << 30 - } -} - -func (t *handshakeTransport) readOnePacket(first bool) ([]byte, error) { - p, err := t.conn.readPacket() - if err != nil { - return nil, err - } - - if t.readPacketsLeft > 0 { - t.readPacketsLeft-- - } else { - t.requestKeyExchange() - } - - if t.readBytesLeft > 0 { - t.readBytesLeft -= int64(len(p)) - } else { - t.requestKeyExchange() - } - - if debugHandshake { - t.printPacket(p, false) - } - - if first && p[0] != msgKexInit { - return nil, fmt.Errorf("ssh: first packet should be msgKexInit") - } - - if p[0] != msgKexInit { - return p, nil - } - - firstKex := t.sessionID == nil - - kex := pendingKex{ - done: make(chan error, 1), - otherInit: p, - } - t.startKex <- &kex - err = <-kex.done - - if debugHandshake { - log.Printf("%s exited key exchange (first %v), err %v", t.id(), firstKex, err) - } - - if err != nil { - return nil, err - } - - t.resetReadThresholds() - - // By default, a key exchange is hidden from higher layers by - // translating it into msgIgnore. - successPacket := []byte{msgIgnore} - if firstKex { - // sendKexInit() for the first kex waits for - // msgNewKeys so the authentication process is - // guaranteed to happen over an encrypted transport. - successPacket = []byte{msgNewKeys} - } - - return successPacket, nil -} - -// sendKexInit sends a key change message. -func (t *handshakeTransport) sendKexInit() error { - t.mu.Lock() - defer t.mu.Unlock() - if t.sentInitMsg != nil { - // kexInits may be sent either in response to the other side, - // or because our side wants to initiate a key change, so we - // may have already sent a kexInit. In that case, don't send a - // second kexInit. - return nil - } - - msg := &kexInitMsg{ - KexAlgos: t.config.KeyExchanges, - CiphersClientServer: t.config.Ciphers, - CiphersServerClient: t.config.Ciphers, - MACsClientServer: t.config.MACs, - MACsServerClient: t.config.MACs, - CompressionClientServer: supportedCompressions, - CompressionServerClient: supportedCompressions, - } - io.ReadFull(rand.Reader, msg.Cookie[:]) - - if len(t.hostKeys) > 0 { - for _, k := range t.hostKeys { - msg.ServerHostKeyAlgos = append( - msg.ServerHostKeyAlgos, k.PublicKey().Type()) - } - } else { - msg.ServerHostKeyAlgos = t.hostKeyAlgorithms - } - packet := Marshal(msg) - - // writePacket destroys the contents, so save a copy. - packetCopy := make([]byte, len(packet)) - copy(packetCopy, packet) - - if err := t.pushPacket(packetCopy); err != nil { - return err - } - - t.sentInitMsg = msg - t.sentInitPacket = packet - - return nil -} - -func (t *handshakeTransport) writePacket(p []byte) error { - switch p[0] { - case msgKexInit: - return errors.New("ssh: only handshakeTransport can send kexInit") - case msgNewKeys: - return errors.New("ssh: only handshakeTransport can send newKeys") - } - - t.mu.Lock() - defer t.mu.Unlock() - if t.writeError != nil { - return t.writeError - } - - if t.sentInitMsg != nil { - // Copy the packet so the writer can reuse the buffer. - cp := make([]byte, len(p)) - copy(cp, p) - t.pendingPackets = append(t.pendingPackets, cp) - return nil - } - - if t.writeBytesLeft > 0 { - t.writeBytesLeft -= int64(len(p)) - } else { - t.requestKeyExchange() - } - - if t.writePacketsLeft > 0 { - t.writePacketsLeft-- - } else { - t.requestKeyExchange() - } - - if err := t.pushPacket(p); err != nil { - t.writeError = err - } - - return nil -} - -func (t *handshakeTransport) Close() error { - return t.conn.Close() -} - -func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { - if debugHandshake { - log.Printf("%s entered key exchange", t.id()) - } - - otherInit := &kexInitMsg{} - if err := Unmarshal(otherInitPacket, otherInit); err != nil { - return err - } - - magics := handshakeMagics{ - clientVersion: t.clientVersion, - serverVersion: t.serverVersion, - clientKexInit: otherInitPacket, - serverKexInit: t.sentInitPacket, - } - - clientInit := otherInit - serverInit := t.sentInitMsg - if len(t.hostKeys) == 0 { - clientInit, serverInit = serverInit, clientInit - - magics.clientKexInit = t.sentInitPacket - magics.serverKexInit = otherInitPacket - } - - var err error - t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit) - if err != nil { - return err - } - - // We don't send FirstKexFollows, but we handle receiving it. - // - // RFC 4253 section 7 defines the kex and the agreement method for - // first_kex_packet_follows. It states that the guessed packet - // should be ignored if the "kex algorithm and/or the host - // key algorithm is guessed wrong (server and client have - // different preferred algorithm), or if any of the other - // algorithms cannot be agreed upon". The other algorithms have - // already been checked above so the kex algorithm and host key - // algorithm are checked here. - if otherInit.FirstKexFollows && (clientInit.KexAlgos[0] != serverInit.KexAlgos[0] || clientInit.ServerHostKeyAlgos[0] != serverInit.ServerHostKeyAlgos[0]) { - // other side sent a kex message for the wrong algorithm, - // which we have to ignore. - if _, err := t.conn.readPacket(); err != nil { - return err - } - } - - kex, ok := kexAlgoMap[t.algorithms.kex] - if !ok { - return fmt.Errorf("ssh: unexpected key exchange algorithm %v", t.algorithms.kex) - } - - var result *kexResult - if len(t.hostKeys) > 0 { - result, err = t.server(kex, t.algorithms, &magics) - } else { - result, err = t.client(kex, t.algorithms, &magics) - } - - if err != nil { - return err - } - - if t.sessionID == nil { - t.sessionID = result.H - } - result.SessionID = t.sessionID - - if err := t.conn.prepareKeyChange(t.algorithms, result); err != nil { - return err - } - if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { - return err - } - if packet, err := t.conn.readPacket(); err != nil { - return err - } else if packet[0] != msgNewKeys { - return unexpectedMessageError(msgNewKeys, packet[0]) - } - - return nil -} - -func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { - var hostKey Signer - for _, k := range t.hostKeys { - if algs.hostKey == k.PublicKey().Type() { - hostKey = k - } - } - - r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey) - return r, err -} - -func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { - result, err := kex.Client(t.conn, t.config.Rand, magics) - if err != nil { - return nil, err - } - - hostKey, err := ParsePublicKey(result.HostKey) - if err != nil { - return nil, err - } - - if err := verifyHostKeySignature(hostKey, result); err != nil { - return nil, err - } - - err = t.hostKeyCallback(t.dialAddress, t.remoteAddr, hostKey) - if err != nil { - return nil, err - } - - return result, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake_test.go deleted file mode 100644 index 91d4935689..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/handshake_test.go +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "bytes" - "crypto/rand" - "errors" - "fmt" - "io" - "net" - "reflect" - "runtime" - "strings" - "sync" - "testing" -) - -type testChecker struct { - calls []string -} - -func (t *testChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { - if dialAddr == "bad" { - return fmt.Errorf("dialAddr is bad") - } - - if tcpAddr, ok := addr.(*net.TCPAddr); !ok || tcpAddr == nil { - return fmt.Errorf("testChecker: got %T want *net.TCPAddr", addr) - } - - t.calls = append(t.calls, fmt.Sprintf("%s %v %s %x", dialAddr, addr, key.Type(), key.Marshal())) - - return nil -} - -// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and -// therefore is buffered (net.Pipe deadlocks if both sides start with -// a write.) -func netPipe() (net.Conn, net.Conn, error) { - listener, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - listener, err = net.Listen("tcp", "[::1]:0") - if err != nil { - return nil, nil, err - } - } - defer listener.Close() - c1, err := net.Dial("tcp", listener.Addr().String()) - if err != nil { - return nil, nil, err - } - - c2, err := listener.Accept() - if err != nil { - c1.Close() - return nil, nil, err - } - - return c1, c2, nil -} - -// noiseTransport inserts ignore messages to check that the read loop -// and the key exchange filters out these messages. -type noiseTransport struct { - keyingTransport -} - -func (t *noiseTransport) writePacket(p []byte) error { - ignore := []byte{msgIgnore} - if err := t.keyingTransport.writePacket(ignore); err != nil { - return err - } - debug := []byte{msgDebug, 1, 2, 3} - if err := t.keyingTransport.writePacket(debug); err != nil { - return err - } - - return t.keyingTransport.writePacket(p) -} - -func addNoiseTransport(t keyingTransport) keyingTransport { - return &noiseTransport{t} -} - -// handshakePair creates two handshakeTransports connected with each -// other. If the noise argument is true, both transports will try to -// confuse the other side by sending ignore and debug messages. -func handshakePair(clientConf *ClientConfig, addr string, noise bool) (client *handshakeTransport, server *handshakeTransport, err error) { - a, b, err := netPipe() - if err != nil { - return nil, nil, err - } - - var trC, trS keyingTransport - - trC = newTransport(a, rand.Reader, true) - trS = newTransport(b, rand.Reader, false) - if noise { - trC = addNoiseTransport(trC) - trS = addNoiseTransport(trS) - } - clientConf.SetDefaults() - - v := []byte("version") - client = newClientTransport(trC, v, v, clientConf, addr, a.RemoteAddr()) - - serverConf := &ServerConfig{} - serverConf.AddHostKey(testSigners["ecdsa"]) - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.SetDefaults() - server = newServerTransport(trS, v, v, serverConf) - - if err := server.waitSession(); err != nil { - return nil, nil, fmt.Errorf("server.waitSession: %v", err) - } - if err := client.waitSession(); err != nil { - return nil, nil, fmt.Errorf("client.waitSession: %v", err) - } - - return client, server, nil -} - -func TestHandshakeBasic(t *testing.T) { - if runtime.GOOS == "plan9" { - t.Skip("see golang.org/issue/7237") - } - - checker := &syncChecker{ - waitCall: make(chan int, 10), - called: make(chan int, 10), - } - - checker.waitCall <- 1 - trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - - defer trC.Close() - defer trS.Close() - - // Let first kex complete normally. - <-checker.called - - clientDone := make(chan int, 0) - gotHalf := make(chan int, 0) - const N = 20 - - go func() { - defer close(clientDone) - // Client writes a bunch of stuff, and does a key - // change in the middle. This should not confuse the - // handshake in progress. We do this twice, so we test - // that the packet buffer is reset correctly. - for i := 0; i < N; i++ { - p := []byte{msgRequestSuccess, byte(i)} - if err := trC.writePacket(p); err != nil { - t.Fatalf("sendPacket: %v", err) - } - if (i % 10) == 5 { - <-gotHalf - // halfway through, we request a key change. - trC.requestKeyExchange() - - // Wait until we can be sure the key - // change has really started before we - // write more. - <-checker.called - } - if (i % 10) == 7 { - // write some packets until the kex - // completes, to test buffering of - // packets. - checker.waitCall <- 1 - } - } - }() - - // Server checks that client messages come in cleanly - i := 0 - err = nil - for ; i < N; i++ { - var p []byte - p, err = trS.readPacket() - if err != nil { - break - } - if (i % 10) == 5 { - gotHalf <- 1 - } - - want := []byte{msgRequestSuccess, byte(i)} - if bytes.Compare(p, want) != 0 { - t.Errorf("message %d: got %v, want %v", i, p, want) - } - } - <-clientDone - if err != nil && err != io.EOF { - t.Fatalf("server error: %v", err) - } - if i != N { - t.Errorf("received %d messages, want 10.", i) - } - - close(checker.called) - if _, ok := <-checker.called; ok { - // If all went well, we registered exactly 2 key changes: one - // that establishes the session, and one that we requested - // additionally. - t.Fatalf("got another host key checks after 2 handshakes") - } -} - -func TestForceFirstKex(t *testing.T) { - // like handshakePair, but must access the keyingTransport. - checker := &testChecker{} - clientConf := &ClientConfig{HostKeyCallback: checker.Check} - a, b, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - var trC, trS keyingTransport - - trC = newTransport(a, rand.Reader, true) - - // This is the disallowed packet: - trC.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})) - - // Rest of the setup. - trS = newTransport(b, rand.Reader, false) - clientConf.SetDefaults() - - v := []byte("version") - client := newClientTransport(trC, v, v, clientConf, "addr", a.RemoteAddr()) - - serverConf := &ServerConfig{} - serverConf.AddHostKey(testSigners["ecdsa"]) - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.SetDefaults() - server := newServerTransport(trS, v, v, serverConf) - - defer client.Close() - defer server.Close() - - // We setup the initial key exchange, but the remote side - // tries to send serviceRequestMsg in cleartext, which is - // disallowed. - - if err := server.waitSession(); err == nil { - t.Errorf("server first kex init should reject unexpected packet") - } -} - -func TestHandshakeAutoRekeyWrite(t *testing.T) { - checker := &syncChecker{ - called: make(chan int, 10), - waitCall: nil, - } - clientConf := &ClientConfig{HostKeyCallback: checker.Check} - clientConf.RekeyThreshold = 500 - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - input := make([]byte, 251) - input[0] = msgRequestSuccess - - done := make(chan int, 1) - const numPacket = 5 - go func() { - defer close(done) - j := 0 - for ; j < numPacket; j++ { - if p, err := trS.readPacket(); err != nil { - break - } else if !bytes.Equal(input, p) { - t.Errorf("got packet type %d, want %d", p[0], input[0]) - } - } - - if j != numPacket { - t.Errorf("got %d, want 5 messages", j) - } - }() - - <-checker.called - - for i := 0; i < numPacket; i++ { - p := make([]byte, len(input)) - copy(p, input) - if err := trC.writePacket(p); err != nil { - t.Errorf("writePacket: %v", err) - } - if i == 2 { - // Make sure the kex is in progress. - <-checker.called - } - - } - <-done -} - -type syncChecker struct { - waitCall chan int - called chan int -} - -func (c *syncChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { - c.called <- 1 - if c.waitCall != nil { - <-c.waitCall - } - return nil -} - -func TestHandshakeAutoRekeyRead(t *testing.T) { - sync := &syncChecker{ - called: make(chan int, 2), - waitCall: nil, - } - clientConf := &ClientConfig{ - HostKeyCallback: sync.Check, - } - clientConf.RekeyThreshold = 500 - - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - packet := make([]byte, 501) - packet[0] = msgRequestSuccess - if err := trS.writePacket(packet); err != nil { - t.Fatalf("writePacket: %v", err) - } - - // While we read out the packet, a key change will be - // initiated. - done := make(chan int, 1) - go func() { - defer close(done) - if _, err := trC.readPacket(); err != nil { - t.Fatalf("readPacket(client): %v", err) - } - - }() - - <-done - <-sync.called -} - -// errorKeyingTransport generates errors after a given number of -// read/write operations. -type errorKeyingTransport struct { - packetConn - readLeft, writeLeft int -} - -func (n *errorKeyingTransport) prepareKeyChange(*algorithms, *kexResult) error { - return nil -} - -func (n *errorKeyingTransport) getSessionID() []byte { - return nil -} - -func (n *errorKeyingTransport) writePacket(packet []byte) error { - if n.writeLeft == 0 { - n.Close() - return errors.New("barf") - } - - n.writeLeft-- - return n.packetConn.writePacket(packet) -} - -func (n *errorKeyingTransport) readPacket() ([]byte, error) { - if n.readLeft == 0 { - n.Close() - return nil, errors.New("barf") - } - - n.readLeft-- - return n.packetConn.readPacket() -} - -func TestHandshakeErrorHandlingRead(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, i, -1, false) - } -} - -func TestHandshakeErrorHandlingWrite(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, -1, i, false) - } -} - -func TestHandshakeErrorHandlingReadCoupled(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, i, -1, true) - } -} - -func TestHandshakeErrorHandlingWriteCoupled(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, -1, i, true) - } -} - -// testHandshakeErrorHandlingN runs handshakes, injecting errors. If -// handshakeTransport deadlocks, the go runtime will detect it and -// panic. -func testHandshakeErrorHandlingN(t *testing.T, readLimit, writeLimit int, coupled bool) { - msg := Marshal(&serviceRequestMsg{strings.Repeat("x", int(minRekeyThreshold)/4)}) - - a, b := memPipe() - defer a.Close() - defer b.Close() - - key := testSigners["ecdsa"] - serverConf := Config{RekeyThreshold: minRekeyThreshold} - serverConf.SetDefaults() - serverConn := newHandshakeTransport(&errorKeyingTransport{a, readLimit, writeLimit}, &serverConf, []byte{'a'}, []byte{'b'}) - serverConn.hostKeys = []Signer{key} - go serverConn.readLoop() - go serverConn.kexLoop() - - clientConf := Config{RekeyThreshold: 10 * minRekeyThreshold} - clientConf.SetDefaults() - clientConn := newHandshakeTransport(&errorKeyingTransport{b, -1, -1}, &clientConf, []byte{'a'}, []byte{'b'}) - clientConn.hostKeyAlgorithms = []string{key.PublicKey().Type()} - clientConn.hostKeyCallback = InsecureIgnoreHostKey() - go clientConn.readLoop() - go clientConn.kexLoop() - - var wg sync.WaitGroup - - for _, hs := range []packetConn{serverConn, clientConn} { - if !coupled { - wg.Add(2) - go func(c packetConn) { - for i := 0; ; i++ { - str := fmt.Sprintf("%08x", i) + strings.Repeat("x", int(minRekeyThreshold)/4-8) - err := c.writePacket(Marshal(&serviceRequestMsg{str})) - if err != nil { - break - } - } - wg.Done() - c.Close() - }(hs) - go func(c packetConn) { - for { - _, err := c.readPacket() - if err != nil { - break - } - } - wg.Done() - }(hs) - } else { - wg.Add(1) - go func(c packetConn) { - for { - _, err := c.readPacket() - if err != nil { - break - } - if err := c.writePacket(msg); err != nil { - break - } - - } - wg.Done() - }(hs) - } - } - wg.Wait() -} - -func TestDisconnect(t *testing.T) { - if runtime.GOOS == "plan9" { - t.Skip("see golang.org/issue/7237") - } - checker := &testChecker{} - trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - - defer trC.Close() - defer trS.Close() - - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - errMsg := &disconnectMsg{ - Reason: 42, - Message: "such is life", - } - trC.writePacket(Marshal(errMsg)) - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - - packet, err := trS.readPacket() - if err != nil { - t.Fatalf("readPacket 1: %v", err) - } - if packet[0] != msgRequestSuccess { - t.Errorf("got packet %v, want packet type %d", packet, msgRequestSuccess) - } - - _, err = trS.readPacket() - if err == nil { - t.Errorf("readPacket 2 succeeded") - } else if !reflect.DeepEqual(err, errMsg) { - t.Errorf("got error %#v, want %#v", err, errMsg) - } - - _, err = trS.readPacket() - if err == nil { - t.Errorf("readPacket 3 succeeded") - } -} - -func TestHandshakeRekeyDefault(t *testing.T) { - clientConf := &ClientConfig{ - Config: Config{ - Ciphers: []string{"aes128-ctr"}, - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - trC.Close() - - rgb := (1024 + trC.readBytesLeft) >> 30 - wgb := (1024 + trC.writeBytesLeft) >> 30 - - if rgb != 64 { - t.Errorf("got rekey after %dG read, want 64G", rgb) - } - if wgb != 64 { - t.Errorf("got rekey after %dG write, want 64G", wgb) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex.go deleted file mode 100644 index 2176a246a1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex.go +++ /dev/null @@ -1,540 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/subtle" - "errors" - "io" - "math/big" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/curve25519" -) - -const ( - kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" - kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" - kexAlgoECDH256 = "ecdh-sha2-nistp256" - kexAlgoECDH384 = "ecdh-sha2-nistp384" - kexAlgoECDH521 = "ecdh-sha2-nistp521" - kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org" -) - -// kexResult captures the outcome of a key exchange. -type kexResult struct { - // Session hash. See also RFC 4253, section 8. - H []byte - - // Shared secret. See also RFC 4253, section 8. - K []byte - - // Host key as hashed into H. - HostKey []byte - - // Signature of H. - Signature []byte - - // A cryptographic hash function that matches the security - // level of the key exchange algorithm. It is used for - // calculating H, and for deriving keys from H and K. - Hash crypto.Hash - - // The session ID, which is the first H computed. This is used - // to derive key material inside the transport. - SessionID []byte -} - -// handshakeMagics contains data that is always included in the -// session hash. -type handshakeMagics struct { - clientVersion, serverVersion []byte - clientKexInit, serverKexInit []byte -} - -func (m *handshakeMagics) write(w io.Writer) { - writeString(w, m.clientVersion) - writeString(w, m.serverVersion) - writeString(w, m.clientKexInit) - writeString(w, m.serverKexInit) -} - -// kexAlgorithm abstracts different key exchange algorithms. -type kexAlgorithm interface { - // Server runs server-side key agreement, signing the result - // with a hostkey. - Server(p packetConn, rand io.Reader, magics *handshakeMagics, s Signer) (*kexResult, error) - - // Client runs the client-side key agreement. Caller is - // responsible for verifying the host key signature. - Client(p packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) -} - -// dhGroup is a multiplicative group suitable for implementing Diffie-Hellman key agreement. -type dhGroup struct { - g, p, pMinus1 *big.Int -} - -func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) { - if theirPublic.Cmp(bigOne) <= 0 || theirPublic.Cmp(group.pMinus1) >= 0 { - return nil, errors.New("ssh: DH parameter out of bounds") - } - return new(big.Int).Exp(theirPublic, myPrivate, group.p), nil -} - -func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { - hashFunc := crypto.SHA1 - - var x *big.Int - for { - var err error - if x, err = rand.Int(randSource, group.pMinus1); err != nil { - return nil, err - } - if x.Sign() > 0 { - break - } - } - - X := new(big.Int).Exp(group.g, x, group.p) - kexDHInit := kexDHInitMsg{ - X: X, - } - if err := c.writePacket(Marshal(&kexDHInit)); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var kexDHReply kexDHReplyMsg - if err = Unmarshal(packet, &kexDHReply); err != nil { - return nil, err - } - - ki, err := group.diffieHellman(kexDHReply.Y, x) - if err != nil { - return nil, err - } - - h := hashFunc.New() - magics.write(h) - writeString(h, kexDHReply.HostKey) - writeInt(h, X) - writeInt(h, kexDHReply.Y) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: kexDHReply.HostKey, - Signature: kexDHReply.Signature, - Hash: crypto.SHA1, - }, nil -} - -func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - hashFunc := crypto.SHA1 - packet, err := c.readPacket() - if err != nil { - return - } - var kexDHInit kexDHInitMsg - if err = Unmarshal(packet, &kexDHInit); err != nil { - return - } - - var y *big.Int - for { - if y, err = rand.Int(randSource, group.pMinus1); err != nil { - return - } - if y.Sign() > 0 { - break - } - } - - Y := new(big.Int).Exp(group.g, y, group.p) - ki, err := group.diffieHellman(kexDHInit.X, y) - if err != nil { - return nil, err - } - - hostKeyBytes := priv.PublicKey().Marshal() - - h := hashFunc.New() - magics.write(h) - writeString(h, hostKeyBytes) - writeInt(h, kexDHInit.X) - writeInt(h, Y) - - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - H := h.Sum(nil) - - // H is already a hash, but the hostkey signing will apply its - // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, randSource, H) - if err != nil { - return nil, err - } - - kexDHReply := kexDHReplyMsg{ - HostKey: hostKeyBytes, - Y: Y, - Signature: sig, - } - packet = Marshal(&kexDHReply) - - err = c.writePacket(packet) - return &kexResult{ - H: H, - K: K, - HostKey: hostKeyBytes, - Signature: sig, - Hash: crypto.SHA1, - }, nil -} - -// ecdh performs Elliptic Curve Diffie-Hellman key exchange as -// described in RFC 5656, section 4. -type ecdh struct { - curve elliptic.Curve -} - -func (kex *ecdh) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { - ephKey, err := ecdsa.GenerateKey(kex.curve, rand) - if err != nil { - return nil, err - } - - kexInit := kexECDHInitMsg{ - ClientPubKey: elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y), - } - - serialized := Marshal(&kexInit) - if err := c.writePacket(serialized); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var reply kexECDHReplyMsg - if err = Unmarshal(packet, &reply); err != nil { - return nil, err - } - - x, y, err := unmarshalECKey(kex.curve, reply.EphemeralPubKey) - if err != nil { - return nil, err - } - - // generate shared secret - secret, _ := kex.curve.ScalarMult(x, y, ephKey.D.Bytes()) - - h := ecHash(kex.curve).New() - magics.write(h) - writeString(h, reply.HostKey) - writeString(h, kexInit.ClientPubKey) - writeString(h, reply.EphemeralPubKey) - K := make([]byte, intLength(secret)) - marshalInt(K, secret) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: reply.HostKey, - Signature: reply.Signature, - Hash: ecHash(kex.curve), - }, nil -} - -// unmarshalECKey parses and checks an EC key. -func unmarshalECKey(curve elliptic.Curve, pubkey []byte) (x, y *big.Int, err error) { - x, y = elliptic.Unmarshal(curve, pubkey) - if x == nil { - return nil, nil, errors.New("ssh: elliptic.Unmarshal failure") - } - if !validateECPublicKey(curve, x, y) { - return nil, nil, errors.New("ssh: public key not on curve") - } - return x, y, nil -} - -// validateECPublicKey checks that the point is a valid public key for -// the given curve. See [SEC1], 3.2.2 -func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { - if x.Sign() == 0 && y.Sign() == 0 { - return false - } - - if x.Cmp(curve.Params().P) >= 0 { - return false - } - - if y.Cmp(curve.Params().P) >= 0 { - return false - } - - if !curve.IsOnCurve(x, y) { - return false - } - - // We don't check if N * PubKey == 0, since - // - // - the NIST curves have cofactor = 1, so this is implicit. - // (We don't foresee an implementation that supports non NIST - // curves) - // - // - for ephemeral keys, we don't need to worry about small - // subgroup attacks. - return true -} - -func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var kexECDHInit kexECDHInitMsg - if err = Unmarshal(packet, &kexECDHInit); err != nil { - return nil, err - } - - clientX, clientY, err := unmarshalECKey(kex.curve, kexECDHInit.ClientPubKey) - if err != nil { - return nil, err - } - - // We could cache this key across multiple users/multiple - // connection attempts, but the benefit is small. OpenSSH - // generates a new key for each incoming connection. - ephKey, err := ecdsa.GenerateKey(kex.curve, rand) - if err != nil { - return nil, err - } - - hostKeyBytes := priv.PublicKey().Marshal() - - serializedEphKey := elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y) - - // generate shared secret - secret, _ := kex.curve.ScalarMult(clientX, clientY, ephKey.D.Bytes()) - - h := ecHash(kex.curve).New() - magics.write(h) - writeString(h, hostKeyBytes) - writeString(h, kexECDHInit.ClientPubKey) - writeString(h, serializedEphKey) - - K := make([]byte, intLength(secret)) - marshalInt(K, secret) - h.Write(K) - - H := h.Sum(nil) - - // H is already a hash, but the hostkey signing will apply its - // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, rand, H) - if err != nil { - return nil, err - } - - reply := kexECDHReplyMsg{ - EphemeralPubKey: serializedEphKey, - HostKey: hostKeyBytes, - Signature: sig, - } - - serialized := Marshal(&reply) - if err := c.writePacket(serialized); err != nil { - return nil, err - } - - return &kexResult{ - H: H, - K: K, - HostKey: reply.HostKey, - Signature: sig, - Hash: ecHash(kex.curve), - }, nil -} - -var kexAlgoMap = map[string]kexAlgorithm{} - -func init() { - // This is the group called diffie-hellman-group1-sha1 in RFC - // 4253 and Oakley Group 2 in RFC 2409. - p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF", 16) - kexAlgoMap[kexAlgoDH1SHA1] = &dhGroup{ - g: new(big.Int).SetInt64(2), - p: p, - pMinus1: new(big.Int).Sub(p, bigOne), - } - - // This is the group called diffie-hellman-group14-sha1 in RFC - // 4253 and Oakley Group 14 in RFC 3526. - p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) - - kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{ - g: new(big.Int).SetInt64(2), - p: p, - pMinus1: new(big.Int).Sub(p, bigOne), - } - - kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} - kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} - kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} - kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{} -} - -// curve25519sha256 implements the curve25519-sha256@libssh.org key -// agreement protocol, as described in -// https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt -type curve25519sha256 struct{} - -type curve25519KeyPair struct { - priv [32]byte - pub [32]byte -} - -func (kp *curve25519KeyPair) generate(rand io.Reader) error { - if _, err := io.ReadFull(rand, kp.priv[:]); err != nil { - return err - } - curve25519.ScalarBaseMult(&kp.pub, &kp.priv) - return nil -} - -// curve25519Zeros is just an array of 32 zero bytes so that we have something -// convenient to compare against in order to reject curve25519 points with the -// wrong order. -var curve25519Zeros [32]byte - -func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { - var kp curve25519KeyPair - if err := kp.generate(rand); err != nil { - return nil, err - } - if err := c.writePacket(Marshal(&kexECDHInitMsg{kp.pub[:]})); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var reply kexECDHReplyMsg - if err = Unmarshal(packet, &reply); err != nil { - return nil, err - } - if len(reply.EphemeralPubKey) != 32 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong length") - } - - var servPub, secret [32]byte - copy(servPub[:], reply.EphemeralPubKey) - curve25519.ScalarMult(&secret, &kp.priv, &servPub) - if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong order") - } - - h := crypto.SHA256.New() - magics.write(h) - writeString(h, reply.HostKey) - writeString(h, kp.pub[:]) - writeString(h, reply.EphemeralPubKey) - - ki := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: reply.HostKey, - Signature: reply.Signature, - Hash: crypto.SHA256, - }, nil -} - -func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - packet, err := c.readPacket() - if err != nil { - return - } - var kexInit kexECDHInitMsg - if err = Unmarshal(packet, &kexInit); err != nil { - return - } - - if len(kexInit.ClientPubKey) != 32 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong length") - } - - var kp curve25519KeyPair - if err := kp.generate(rand); err != nil { - return nil, err - } - - var clientPub, secret [32]byte - copy(clientPub[:], kexInit.ClientPubKey) - curve25519.ScalarMult(&secret, &kp.priv, &clientPub) - if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong order") - } - - hostKeyBytes := priv.PublicKey().Marshal() - - h := crypto.SHA256.New() - magics.write(h) - writeString(h, hostKeyBytes) - writeString(h, kexInit.ClientPubKey) - writeString(h, kp.pub[:]) - - ki := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - H := h.Sum(nil) - - sig, err := signAndMarshal(priv, rand, H) - if err != nil { - return nil, err - } - - reply := kexECDHReplyMsg{ - EphemeralPubKey: kp.pub[:], - HostKey: hostKeyBytes, - Signature: sig, - } - if err := c.writePacket(Marshal(&reply)); err != nil { - return nil, err - } - return &kexResult{ - H: H, - K: K, - HostKey: hostKeyBytes, - Signature: sig, - Hash: crypto.SHA256, - }, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex_test.go deleted file mode 100644 index 12ca0acd31..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/kex_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2013 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 ssh - -// Key exchange tests. - -import ( - "crypto/rand" - "reflect" - "testing" -) - -func TestKexes(t *testing.T) { - type kexResultErr struct { - result *kexResult - err error - } - - for name, kex := range kexAlgoMap { - a, b := memPipe() - - s := make(chan kexResultErr, 1) - c := make(chan kexResultErr, 1) - var magics handshakeMagics - go func() { - r, e := kex.Client(a, rand.Reader, &magics) - a.Close() - c <- kexResultErr{r, e} - }() - go func() { - r, e := kex.Server(b, rand.Reader, &magics, testSigners["ecdsa"]) - b.Close() - s <- kexResultErr{r, e} - }() - - clientRes := <-c - serverRes := <-s - if clientRes.err != nil { - t.Errorf("client: %v", clientRes.err) - } - if serverRes.err != nil { - t.Errorf("server: %v", serverRes.err) - } - if !reflect.DeepEqual(clientRes.result, serverRes.result) { - t.Errorf("kex %q: mismatch %#v, %#v", name, clientRes.result, serverRes.result) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys.go deleted file mode 100644 index a5d857662b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys.go +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright 2012 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 ssh - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/md5" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "encoding/asn1" - "encoding/base64" - "encoding/hex" - "encoding/pem" - "errors" - "fmt" - "io" - "math/big" - "strings" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" -) - -// These constants represent the algorithm names for key types supported by this -// package. -const ( - KeyAlgoRSA = "ssh-rsa" - KeyAlgoDSA = "ssh-dss" - KeyAlgoECDSA256 = "ecdsa-sha2-nistp256" - KeyAlgoECDSA384 = "ecdsa-sha2-nistp384" - KeyAlgoECDSA521 = "ecdsa-sha2-nistp521" - KeyAlgoED25519 = "ssh-ed25519" -) - -// parsePubKey parses a public key of the given algorithm. -// Use ParsePublicKey for keys with prepended algorithm. -func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) { - switch algo { - case KeyAlgoRSA: - return parseRSA(in) - case KeyAlgoDSA: - return parseDSA(in) - case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521: - return parseECDSA(in) - case KeyAlgoED25519: - return parseED25519(in) - case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: - cert, err := parseCert(in, certToPrivAlgo(algo)) - if err != nil { - return nil, nil, err - } - return cert, nil, nil - } - return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", algo) -} - -// parseAuthorizedKey parses a public key in OpenSSH authorized_keys format -// (see sshd(8) manual page) once the options and key type fields have been -// removed. -func parseAuthorizedKey(in []byte) (out PublicKey, comment string, err error) { - in = bytes.TrimSpace(in) - - i := bytes.IndexAny(in, " \t") - if i == -1 { - i = len(in) - } - base64Key := in[:i] - - key := make([]byte, base64.StdEncoding.DecodedLen(len(base64Key))) - n, err := base64.StdEncoding.Decode(key, base64Key) - if err != nil { - return nil, "", err - } - key = key[:n] - out, err = ParsePublicKey(key) - if err != nil { - return nil, "", err - } - comment = string(bytes.TrimSpace(in[i:])) - return out, comment, nil -} - -// ParseKnownHosts parses an entry in the format of the known_hosts file. -// -// The known_hosts format is documented in the sshd(8) manual page. This -// function will parse a single entry from in. On successful return, marker -// will contain the optional marker value (i.e. "cert-authority" or "revoked") -// or else be empty, hosts will contain the hosts that this entry matches, -// pubKey will contain the public key and comment will contain any trailing -// comment at the end of the line. See the sshd(8) manual page for the various -// forms that a host string can take. -// -// The unparsed remainder of the input will be returned in rest. This function -// can be called repeatedly to parse multiple entries. -// -// If no entries were found in the input then err will be io.EOF. Otherwise a -// non-nil err value indicates a parse error. -func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey, comment string, rest []byte, err error) { - for len(in) > 0 { - end := bytes.IndexByte(in, '\n') - if end != -1 { - rest = in[end+1:] - in = in[:end] - } else { - rest = nil - } - - end = bytes.IndexByte(in, '\r') - if end != -1 { - in = in[:end] - } - - in = bytes.TrimSpace(in) - if len(in) == 0 || in[0] == '#' { - in = rest - continue - } - - i := bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - // Strip out the beginning of the known_host key. - // This is either an optional marker or a (set of) hostname(s). - keyFields := bytes.Fields(in) - if len(keyFields) < 3 || len(keyFields) > 5 { - return "", nil, nil, "", nil, errors.New("ssh: invalid entry in known_hosts data") - } - - // keyFields[0] is either "@cert-authority", "@revoked" or a comma separated - // list of hosts - marker := "" - if keyFields[0][0] == '@' { - marker = string(keyFields[0][1:]) - keyFields = keyFields[1:] - } - - hosts := string(keyFields[0]) - // keyFields[1] contains the key type (e.g. “ssh-rsa”). - // However, that information is duplicated inside the - // base64-encoded key and so is ignored here. - - key := bytes.Join(keyFields[2:], []byte(" ")) - if pubKey, comment, err = parseAuthorizedKey(key); err != nil { - return "", nil, nil, "", nil, err - } - - return marker, strings.Split(hosts, ","), pubKey, comment, rest, nil - } - - return "", nil, nil, "", nil, io.EOF -} - -// ParseAuthorizedKeys parses a public key from an authorized_keys -// file used in OpenSSH according to the sshd(8) manual page. -func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) { - for len(in) > 0 { - end := bytes.IndexByte(in, '\n') - if end != -1 { - rest = in[end+1:] - in = in[:end] - } else { - rest = nil - } - - end = bytes.IndexByte(in, '\r') - if end != -1 { - in = in[:end] - } - - in = bytes.TrimSpace(in) - if len(in) == 0 || in[0] == '#' { - in = rest - continue - } - - i := bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { - return out, comment, options, rest, nil - } - - // No key type recognised. Maybe there's an options field at - // the beginning. - var b byte - inQuote := false - var candidateOptions []string - optionStart := 0 - for i, b = range in { - isEnd := !inQuote && (b == ' ' || b == '\t') - if (b == ',' && !inQuote) || isEnd { - if i-optionStart > 0 { - candidateOptions = append(candidateOptions, string(in[optionStart:i])) - } - optionStart = i + 1 - } - if isEnd { - break - } - if b == '"' && (i == 0 || (i > 0 && in[i-1] != '\\')) { - inQuote = !inQuote - } - } - for i < len(in) && (in[i] == ' ' || in[i] == '\t') { - i++ - } - if i == len(in) { - // Invalid line: unmatched quote - in = rest - continue - } - - in = in[i:] - i = bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { - options = candidateOptions - return out, comment, options, rest, nil - } - - in = rest - continue - } - - return nil, "", nil, nil, errors.New("ssh: no key found") -} - -// ParsePublicKey parses an SSH public key formatted for use in -// the SSH wire protocol according to RFC 4253, section 6.6. -func ParsePublicKey(in []byte) (out PublicKey, err error) { - algo, in, ok := parseString(in) - if !ok { - return nil, errShortRead - } - var rest []byte - out, rest, err = parsePubKey(in, string(algo)) - if len(rest) > 0 { - return nil, errors.New("ssh: trailing junk in public key") - } - - return out, err -} - -// MarshalAuthorizedKey serializes key for inclusion in an OpenSSH -// authorized_keys file. The return value ends with newline. -func MarshalAuthorizedKey(key PublicKey) []byte { - b := &bytes.Buffer{} - b.WriteString(key.Type()) - b.WriteByte(' ') - e := base64.NewEncoder(base64.StdEncoding, b) - e.Write(key.Marshal()) - e.Close() - b.WriteByte('\n') - return b.Bytes() -} - -// PublicKey is an abstraction of different types of public keys. -type PublicKey interface { - // Type returns the key's type, e.g. "ssh-rsa". - Type() string - - // Marshal returns the serialized key data in SSH wire format, - // with the name prefix. To unmarshal the returned data, use - // the ParsePublicKey function. - Marshal() []byte - - // Verify that sig is a signature on the given data using this - // key. This function will hash the data appropriately first. - Verify(data []byte, sig *Signature) error -} - -// CryptoPublicKey, if implemented by a PublicKey, -// returns the underlying crypto.PublicKey form of the key. -type CryptoPublicKey interface { - CryptoPublicKey() crypto.PublicKey -} - -// A Signer can create signatures that verify against a public key. -type Signer interface { - // PublicKey returns an associated PublicKey instance. - PublicKey() PublicKey - - // Sign returns raw signature for the given data. This method - // will apply the hash specified for the keytype to the data. - Sign(rand io.Reader, data []byte) (*Signature, error) -} - -type rsaPublicKey rsa.PublicKey - -func (r *rsaPublicKey) Type() string { - return "ssh-rsa" -} - -// parseRSA parses an RSA key according to RFC 4253, section 6.6. -func parseRSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - E *big.Int - N *big.Int - Rest []byte `ssh:"rest"` - } - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - if w.E.BitLen() > 24 { - return nil, nil, errors.New("ssh: exponent too large") - } - e := w.E.Int64() - if e < 3 || e&1 == 0 { - return nil, nil, errors.New("ssh: incorrect exponent") - } - - var key rsa.PublicKey - key.E = int(e) - key.N = w.N - return (*rsaPublicKey)(&key), w.Rest, nil -} - -func (r *rsaPublicKey) Marshal() []byte { - e := new(big.Int).SetInt64(int64(r.E)) - // RSA publickey struct layout should match the struct used by - // parseRSACert in the x/crypto/ssh/agent package. - wirekey := struct { - Name string - E *big.Int - N *big.Int - }{ - KeyAlgoRSA, - e, - r.N, - } - return Marshal(&wirekey) -} - -func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != r.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type()) - } - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), crypto.SHA1, digest, sig.Blob) -} - -func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*rsa.PublicKey)(r) -} - -type dsaPublicKey dsa.PublicKey - -func (k *dsaPublicKey) Type() string { - return "ssh-dss" -} - -func checkDSAParams(param *dsa.Parameters) error { - // SSH specifies FIPS 186-2, which only provided a single size - // (1024 bits) DSA key. FIPS 186-3 allows for larger key - // sizes, which would confuse SSH. - if l := param.P.BitLen(); l != 1024 { - return fmt.Errorf("ssh: unsupported DSA key size %d", l) - } - - return nil -} - -// parseDSA parses an DSA key according to RFC 4253, section 6.6. -func parseDSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - P, Q, G, Y *big.Int - Rest []byte `ssh:"rest"` - } - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - param := dsa.Parameters{ - P: w.P, - Q: w.Q, - G: w.G, - } - if err := checkDSAParams(¶m); err != nil { - return nil, nil, err - } - - key := &dsaPublicKey{ - Parameters: param, - Y: w.Y, - } - return key, w.Rest, nil -} - -func (k *dsaPublicKey) Marshal() []byte { - // DSA publickey struct layout should match the struct used by - // parseDSACert in the x/crypto/ssh/agent package. - w := struct { - Name string - P, Q, G, Y *big.Int - }{ - k.Type(), - k.P, - k.Q, - k.G, - k.Y, - } - - return Marshal(&w) -} - -func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - - // Per RFC 4253, section 6.6, - // The value for 'dss_signature_blob' is encoded as a string containing - // r, followed by s (which are 160-bit integers, without lengths or - // padding, unsigned, and in network byte order). - // For DSS purposes, sig.Blob should be exactly 40 bytes in length. - if len(sig.Blob) != 40 { - return errors.New("ssh: DSA signature parse error") - } - r := new(big.Int).SetBytes(sig.Blob[:20]) - s := new(big.Int).SetBytes(sig.Blob[20:]) - if dsa.Verify((*dsa.PublicKey)(k), digest, r, s) { - return nil - } - return errors.New("ssh: signature did not verify") -} - -func (k *dsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*dsa.PublicKey)(k) -} - -type dsaPrivateKey struct { - *dsa.PrivateKey -} - -func (k *dsaPrivateKey) PublicKey() PublicKey { - return (*dsaPublicKey)(&k.PrivateKey.PublicKey) -} - -func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - r, s, err := dsa.Sign(rand, k.PrivateKey, digest) - if err != nil { - return nil, err - } - - sig := make([]byte, 40) - rb := r.Bytes() - sb := s.Bytes() - - copy(sig[20-len(rb):20], rb) - copy(sig[40-len(sb):], sb) - - return &Signature{ - Format: k.PublicKey().Type(), - Blob: sig, - }, nil -} - -type ecdsaPublicKey ecdsa.PublicKey - -func (k *ecdsaPublicKey) Type() string { - return "ecdsa-sha2-" + k.nistID() -} - -func (k *ecdsaPublicKey) nistID() string { - switch k.Params().BitSize { - case 256: - return "nistp256" - case 384: - return "nistp384" - case 521: - return "nistp521" - } - panic("ssh: unsupported ecdsa key size") -} - -type ed25519PublicKey ed25519.PublicKey - -func (k ed25519PublicKey) Type() string { - return KeyAlgoED25519 -} - -func parseED25519(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - KeyBytes []byte - Rest []byte `ssh:"rest"` - } - - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - key := ed25519.PublicKey(w.KeyBytes) - - return (ed25519PublicKey)(key), w.Rest, nil -} - -func (k ed25519PublicKey) Marshal() []byte { - w := struct { - Name string - KeyBytes []byte - }{ - KeyAlgoED25519, - []byte(k), - } - return Marshal(&w) -} - -func (k ed25519PublicKey) Verify(b []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - - edKey := (ed25519.PublicKey)(k) - if ok := ed25519.Verify(edKey, b, sig.Blob); !ok { - return errors.New("ssh: signature did not verify") - } - - return nil -} - -func (k ed25519PublicKey) CryptoPublicKey() crypto.PublicKey { - return ed25519.PublicKey(k) -} - -func supportedEllipticCurve(curve elliptic.Curve) bool { - return curve == elliptic.P256() || curve == elliptic.P384() || curve == elliptic.P521() -} - -// ecHash returns the hash to match the given elliptic curve, see RFC -// 5656, section 6.2.1 -func ecHash(curve elliptic.Curve) crypto.Hash { - bitSize := curve.Params().BitSize - switch { - case bitSize <= 256: - return crypto.SHA256 - case bitSize <= 384: - return crypto.SHA384 - } - return crypto.SHA512 -} - -// parseECDSA parses an ECDSA key according to RFC 5656, section 3.1. -func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - Curve string - KeyBytes []byte - Rest []byte `ssh:"rest"` - } - - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - key := new(ecdsa.PublicKey) - - switch w.Curve { - case "nistp256": - key.Curve = elliptic.P256() - case "nistp384": - key.Curve = elliptic.P384() - case "nistp521": - key.Curve = elliptic.P521() - default: - return nil, nil, errors.New("ssh: unsupported curve") - } - - key.X, key.Y = elliptic.Unmarshal(key.Curve, w.KeyBytes) - if key.X == nil || key.Y == nil { - return nil, nil, errors.New("ssh: invalid curve point") - } - return (*ecdsaPublicKey)(key), w.Rest, nil -} - -func (k *ecdsaPublicKey) Marshal() []byte { - // See RFC 5656, section 3.1. - keyBytes := elliptic.Marshal(k.Curve, k.X, k.Y) - // ECDSA publickey struct layout should match the struct used by - // parseECDSACert in the x/crypto/ssh/agent package. - w := struct { - Name string - ID string - Key []byte - }{ - k.Type(), - k.nistID(), - keyBytes, - } - - return Marshal(&w) -} - -func (k *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - - h := ecHash(k.Curve).New() - h.Write(data) - digest := h.Sum(nil) - - // Per RFC 5656, section 3.1.2, - // The ecdsa_signature_blob value has the following specific encoding: - // mpint r - // mpint s - var ecSig struct { - R *big.Int - S *big.Int - } - - if err := Unmarshal(sig.Blob, &ecSig); err != nil { - return err - } - - if ecdsa.Verify((*ecdsa.PublicKey)(k), digest, ecSig.R, ecSig.S) { - return nil - } - return errors.New("ssh: signature did not verify") -} - -func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*ecdsa.PublicKey)(k) -} - -// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey, -// *ecdsa.PrivateKey or any other crypto.Signer and returns a -// corresponding Signer instance. ECDSA keys must use P-256, P-384 or -// P-521. DSA keys must use parameter size L1024N160. -func NewSignerFromKey(key interface{}) (Signer, error) { - switch key := key.(type) { - case crypto.Signer: - return NewSignerFromSigner(key) - case *dsa.PrivateKey: - return newDSAPrivateKey(key) - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } -} - -func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) { - if err := checkDSAParams(&key.PublicKey.Parameters); err != nil { - return nil, err - } - - return &dsaPrivateKey{key}, nil -} - -type wrappedSigner struct { - signer crypto.Signer - pubKey PublicKey -} - -// NewSignerFromSigner takes any crypto.Signer implementation and -// returns a corresponding Signer interface. This can be used, for -// example, with keys kept in hardware modules. -func NewSignerFromSigner(signer crypto.Signer) (Signer, error) { - pubKey, err := NewPublicKey(signer.Public()) - if err != nil { - return nil, err - } - - return &wrappedSigner{signer, pubKey}, nil -} - -func (s *wrappedSigner) PublicKey() PublicKey { - return s.pubKey -} - -func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - var hashFunc crypto.Hash - - switch key := s.pubKey.(type) { - case *rsaPublicKey, *dsaPublicKey: - hashFunc = crypto.SHA1 - case *ecdsaPublicKey: - hashFunc = ecHash(key.Curve) - case ed25519PublicKey: - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } - - var digest []byte - if hashFunc != 0 { - h := hashFunc.New() - h.Write(data) - digest = h.Sum(nil) - } else { - digest = data - } - - signature, err := s.signer.Sign(rand, digest, hashFunc) - if err != nil { - return nil, err - } - - // crypto.Signer.Sign is expected to return an ASN.1-encoded signature - // for ECDSA and DSA, but that's not the encoding expected by SSH, so - // re-encode. - switch s.pubKey.(type) { - case *ecdsaPublicKey, *dsaPublicKey: - type asn1Signature struct { - R, S *big.Int - } - asn1Sig := new(asn1Signature) - _, err := asn1.Unmarshal(signature, asn1Sig) - if err != nil { - return nil, err - } - - switch s.pubKey.(type) { - case *ecdsaPublicKey: - signature = Marshal(asn1Sig) - - case *dsaPublicKey: - signature = make([]byte, 40) - r := asn1Sig.R.Bytes() - s := asn1Sig.S.Bytes() - copy(signature[20-len(r):20], r) - copy(signature[40-len(s):40], s) - } - } - - return &Signature{ - Format: s.pubKey.Type(), - Blob: signature, - }, nil -} - -// NewPublicKey takes an *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey, -// or ed25519.PublicKey returns a corresponding PublicKey instance. -// ECDSA keys must use P-256, P-384 or P-521. -func NewPublicKey(key interface{}) (PublicKey, error) { - switch key := key.(type) { - case *rsa.PublicKey: - return (*rsaPublicKey)(key), nil - case *ecdsa.PublicKey: - if !supportedEllipticCurve(key.Curve) { - return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported") - } - return (*ecdsaPublicKey)(key), nil - case *dsa.PublicKey: - return (*dsaPublicKey)(key), nil - case ed25519.PublicKey: - return (ed25519PublicKey)(key), nil - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } -} - -// ParsePrivateKey returns a Signer from a PEM encoded private key. It supports -// the same keys as ParseRawPrivateKey. -func ParsePrivateKey(pemBytes []byte) (Signer, error) { - key, err := ParseRawPrivateKey(pemBytes) - if err != nil { - return nil, err - } - - return NewSignerFromKey(key) -} - -// ParsePrivateKeyWithPassphrase returns a Signer from a PEM encoded private -// key and passphrase. It supports the same keys as -// ParseRawPrivateKeyWithPassphrase. -func ParsePrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (Signer, error) { - key, err := ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase) - if err != nil { - return nil, err - } - - return NewSignerFromKey(key) -} - -// encryptedBlock tells whether a private key is -// encrypted by examining its Proc-Type header -// for a mention of ENCRYPTED -// according to RFC 1421 Section 4.6.1.1. -func encryptedBlock(block *pem.Block) bool { - return strings.Contains(block.Headers["Proc-Type"], "ENCRYPTED") -} - -// ParseRawPrivateKey returns a private key from a PEM encoded private key. It -// supports RSA (PKCS#1), DSA (OpenSSL), and ECDSA private keys. -func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) { - block, _ := pem.Decode(pemBytes) - if block == nil { - return nil, errors.New("ssh: no key found") - } - - if encryptedBlock(block) { - return nil, errors.New("ssh: cannot decode encrypted private keys") - } - - switch block.Type { - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(block.Bytes) - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(block.Bytes) - case "DSA PRIVATE KEY": - return ParseDSAPrivateKey(block.Bytes) - case "OPENSSH PRIVATE KEY": - return parseOpenSSHPrivateKey(block.Bytes) - default: - return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) - } -} - -// ParseRawPrivateKeyWithPassphrase returns a private key decrypted with -// passphrase from a PEM encoded private key. If wrong passphrase, return -// x509.IncorrectPasswordError. -func ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (interface{}, error) { - block, _ := pem.Decode(pemBytes) - if block == nil { - return nil, errors.New("ssh: no key found") - } - buf := block.Bytes - - if encryptedBlock(block) { - if x509.IsEncryptedPEMBlock(block) { - var err error - buf, err = x509.DecryptPEMBlock(block, passPhrase) - if err != nil { - if err == x509.IncorrectPasswordError { - return nil, err - } - return nil, fmt.Errorf("ssh: cannot decode encrypted private keys: %v", err) - } - } - } - - switch block.Type { - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(buf) - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(buf) - case "DSA PRIVATE KEY": - return ParseDSAPrivateKey(buf) - case "OPENSSH PRIVATE KEY": - return parseOpenSSHPrivateKey(buf) - default: - return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) - } -} - -// ParseDSAPrivateKey returns a DSA private key from its ASN.1 DER encoding, as -// specified by the OpenSSL DSA man page. -func ParseDSAPrivateKey(der []byte) (*dsa.PrivateKey, error) { - var k struct { - Version int - P *big.Int - Q *big.Int - G *big.Int - Pub *big.Int - Priv *big.Int - } - rest, err := asn1.Unmarshal(der, &k) - if err != nil { - return nil, errors.New("ssh: failed to parse DSA key: " + err.Error()) - } - if len(rest) > 0 { - return nil, errors.New("ssh: garbage after DSA key") - } - - return &dsa.PrivateKey{ - PublicKey: dsa.PublicKey{ - Parameters: dsa.Parameters{ - P: k.P, - Q: k.Q, - G: k.G, - }, - Y: k.Pub, - }, - X: k.Priv, - }, nil -} - -// Implemented based on the documentation at -// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key -func parseOpenSSHPrivateKey(key []byte) (crypto.PrivateKey, error) { - magic := append([]byte("openssh-key-v1"), 0) - if !bytes.Equal(magic, key[0:len(magic)]) { - return nil, errors.New("ssh: invalid openssh private key format") - } - remaining := key[len(magic):] - - var w struct { - CipherName string - KdfName string - KdfOpts string - NumKeys uint32 - PubKey []byte - PrivKeyBlock []byte - } - - if err := Unmarshal(remaining, &w); err != nil { - return nil, err - } - - if w.KdfName != "none" || w.CipherName != "none" { - return nil, errors.New("ssh: cannot decode encrypted private keys") - } - - pk1 := struct { - Check1 uint32 - Check2 uint32 - Keytype string - Rest []byte `ssh:"rest"` - }{} - - if err := Unmarshal(w.PrivKeyBlock, &pk1); err != nil { - return nil, err - } - - if pk1.Check1 != pk1.Check2 { - return nil, errors.New("ssh: checkint mismatch") - } - - // we only handle ed25519 and rsa keys currently - switch pk1.Keytype { - case KeyAlgoRSA: - // https://github.com/openssh/openssh-portable/blob/master/sshkey.c#L2760-L2773 - key := struct { - N *big.Int - E *big.Int - D *big.Int - Iqmp *big.Int - P *big.Int - Q *big.Int - Comment string - Pad []byte `ssh:"rest"` - }{} - - if err := Unmarshal(pk1.Rest, &key); err != nil { - return nil, err - } - - for i, b := range key.Pad { - if int(b) != i+1 { - return nil, errors.New("ssh: padding not as expected") - } - } - - pk := &rsa.PrivateKey{ - PublicKey: rsa.PublicKey{ - N: key.N, - E: int(key.E.Int64()), - }, - D: key.D, - Primes: []*big.Int{key.P, key.Q}, - } - - if err := pk.Validate(); err != nil { - return nil, err - } - - pk.Precompute() - - return pk, nil - case KeyAlgoED25519: - key := struct { - Pub []byte - Priv []byte - Comment string - Pad []byte `ssh:"rest"` - }{} - - if err := Unmarshal(pk1.Rest, &key); err != nil { - return nil, err - } - - if len(key.Priv) != ed25519.PrivateKeySize { - return nil, errors.New("ssh: private key unexpected length") - } - - for i, b := range key.Pad { - if int(b) != i+1 { - return nil, errors.New("ssh: padding not as expected") - } - } - - pk := ed25519.PrivateKey(make([]byte, ed25519.PrivateKeySize)) - copy(pk, key.Priv) - return &pk, nil - default: - return nil, errors.New("ssh: unhandled key type") - } -} - -// FingerprintLegacyMD5 returns the user presentation of the key's -// fingerprint as described by RFC 4716 section 4. -func FingerprintLegacyMD5(pubKey PublicKey) string { - md5sum := md5.Sum(pubKey.Marshal()) - hexarray := make([]string, len(md5sum)) - for i, c := range md5sum { - hexarray[i] = hex.EncodeToString([]byte{c}) - } - return strings.Join(hexarray, ":") -} - -// FingerprintSHA256 returns the user presentation of the key's -// fingerprint as unpadded base64 encoded sha256 hash. -// This format was introduced from OpenSSH 6.8. -// https://www.openssh.com/txt/release-6.8 -// https://tools.ietf.org/html/rfc4648#section-3.2 (unpadded base64 encoding) -func FingerprintSHA256(pubKey PublicKey) string { - sha256sum := sha256.Sum256(pubKey.Marshal()) - hash := base64.RawStdEncoding.EncodeToString(sha256sum[:]) - return "SHA256:" + hash -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys_test.go deleted file mode 100644 index 9353184059..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/keys_test.go +++ /dev/null @@ -1,500 +0,0 @@ -// Copyright 2014 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 ssh - -import ( - "bytes" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "fmt" - "reflect" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ed25519" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -func rawKey(pub PublicKey) interface{} { - switch k := pub.(type) { - case *rsaPublicKey: - return (*rsa.PublicKey)(k) - case *dsaPublicKey: - return (*dsa.PublicKey)(k) - case *ecdsaPublicKey: - return (*ecdsa.PublicKey)(k) - case ed25519PublicKey: - return (ed25519.PublicKey)(k) - case *Certificate: - return k - } - panic("unknown key type") -} - -func TestKeyMarshalParse(t *testing.T) { - for _, priv := range testSigners { - pub := priv.PublicKey() - roundtrip, err := ParsePublicKey(pub.Marshal()) - if err != nil { - t.Errorf("ParsePublicKey(%T): %v", pub, err) - } - - k1 := rawKey(pub) - k2 := rawKey(roundtrip) - - if !reflect.DeepEqual(k1, k2) { - t.Errorf("got %#v in roundtrip, want %#v", k2, k1) - } - } -} - -func TestUnsupportedCurves(t *testing.T) { - raw, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader) - if err != nil { - t.Fatalf("GenerateKey: %v", err) - } - - if _, err = NewSignerFromKey(raw); err == nil || !strings.Contains(err.Error(), "only P-256") { - t.Fatalf("NewPrivateKey should not succeed with P-224, got: %v", err) - } - - if _, err = NewPublicKey(&raw.PublicKey); err == nil || !strings.Contains(err.Error(), "only P-256") { - t.Fatalf("NewPublicKey should not succeed with P-224, got: %v", err) - } -} - -func TestNewPublicKey(t *testing.T) { - for _, k := range testSigners { - raw := rawKey(k.PublicKey()) - // Skip certificates, as NewPublicKey does not support them. - if _, ok := raw.(*Certificate); ok { - continue - } - pub, err := NewPublicKey(raw) - if err != nil { - t.Errorf("NewPublicKey(%#v): %v", raw, err) - } - if !reflect.DeepEqual(k.PublicKey(), pub) { - t.Errorf("NewPublicKey(%#v) = %#v, want %#v", raw, pub, k.PublicKey()) - } - } -} - -func TestKeySignVerify(t *testing.T) { - for _, priv := range testSigners { - pub := priv.PublicKey() - - data := []byte("sign me") - sig, err := priv.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("Sign(%T): %v", priv, err) - } - - if err := pub.Verify(data, sig); err != nil { - t.Errorf("publicKey.Verify(%T): %v", priv, err) - } - sig.Blob[5]++ - if err := pub.Verify(data, sig); err == nil { - t.Errorf("publicKey.Verify on broken sig did not fail") - } - } -} - -func TestParseRSAPrivateKey(t *testing.T) { - key := testPrivateKeys["rsa"] - - rsa, ok := key.(*rsa.PrivateKey) - if !ok { - t.Fatalf("got %T, want *rsa.PrivateKey", rsa) - } - - if err := rsa.Validate(); err != nil { - t.Errorf("Validate: %v", err) - } -} - -func TestParseECPrivateKey(t *testing.T) { - key := testPrivateKeys["ecdsa"] - - ecKey, ok := key.(*ecdsa.PrivateKey) - if !ok { - t.Fatalf("got %T, want *ecdsa.PrivateKey", ecKey) - } - - if !validateECPublicKey(ecKey.Curve, ecKey.X, ecKey.Y) { - t.Fatalf("public key does not validate.") - } -} - -// See Issue https://github.com/golang/go/issues/6650. -func TestParseEncryptedPrivateKeysFails(t *testing.T) { - const wantSubstring = "encrypted" - for i, tt := range testdata.PEMEncryptedKeys { - _, err := ParsePrivateKey(tt.PEMBytes) - if err == nil { - t.Errorf("#%d key %s: ParsePrivateKey successfully parsed, expected an error", i, tt.Name) - continue - } - - if !strings.Contains(err.Error(), wantSubstring) { - t.Errorf("#%d key %s: got error %q, want substring %q", i, tt.Name, err, wantSubstring) - } - } -} - -// Parse encrypted private keys with passphrase -func TestParseEncryptedPrivateKeysWithPassphrase(t *testing.T) { - data := []byte("sign me") - for _, tt := range testdata.PEMEncryptedKeys { - s, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte(tt.EncryptionKey)) - if err != nil { - t.Fatalf("ParsePrivateKeyWithPassphrase returned error: %s", err) - continue - } - sig, err := s.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("dsa.Sign: %v", err) - } - if err := s.PublicKey().Verify(data, sig); err != nil { - t.Errorf("Verify failed: %v", err) - } - } - - tt := testdata.PEMEncryptedKeys[0] - _, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte("incorrect")) - if err != x509.IncorrectPasswordError { - t.Fatalf("got %v want IncorrectPasswordError", err) - } -} - -func TestParseDSA(t *testing.T) { - // We actually exercise the ParsePrivateKey codepath here, as opposed to - // using the ParseRawPrivateKey+NewSignerFromKey path that testdata_test.go - // uses. - s, err := ParsePrivateKey(testdata.PEMBytes["dsa"]) - if err != nil { - t.Fatalf("ParsePrivateKey returned error: %s", err) - } - - data := []byte("sign me") - sig, err := s.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("dsa.Sign: %v", err) - } - - if err := s.PublicKey().Verify(data, sig); err != nil { - t.Errorf("Verify failed: %v", err) - } -} - -// Tests for authorized_keys parsing. - -// getTestKey returns a public key, and its base64 encoding. -func getTestKey() (PublicKey, string) { - k := testPublicKeys["rsa"] - - b := &bytes.Buffer{} - e := base64.NewEncoder(base64.StdEncoding, b) - e.Write(k.Marshal()) - e.Close() - - return k, b.String() -} - -func TestMarshalParsePublicKey(t *testing.T) { - pub, pubSerialized := getTestKey() - line := fmt.Sprintf("%s %s user@host", pub.Type(), pubSerialized) - - authKeys := MarshalAuthorizedKey(pub) - actualFields := strings.Fields(string(authKeys)) - if len(actualFields) == 0 { - t.Fatalf("failed authKeys: %v", authKeys) - } - - // drop the comment - expectedFields := strings.Fields(line)[0:2] - - if !reflect.DeepEqual(actualFields, expectedFields) { - t.Errorf("got %v, expected %v", actualFields, expectedFields) - } - - actPub, _, _, _, err := ParseAuthorizedKey([]byte(line)) - if err != nil { - t.Fatalf("cannot parse %v: %v", line, err) - } - if !reflect.DeepEqual(actPub, pub) { - t.Errorf("got %v, expected %v", actPub, pub) - } -} - -type testAuthResult struct { - pubKey PublicKey - options []string - comments string - rest string - ok bool -} - -func testAuthorizedKeys(t *testing.T, authKeys []byte, expected []testAuthResult) { - rest := authKeys - var values []testAuthResult - for len(rest) > 0 { - var r testAuthResult - var err error - r.pubKey, r.comments, r.options, rest, err = ParseAuthorizedKey(rest) - r.ok = (err == nil) - t.Log(err) - r.rest = string(rest) - values = append(values, r) - } - - if !reflect.DeepEqual(values, expected) { - t.Errorf("got %#v, expected %#v", values, expected) - } -} - -func TestAuthorizedKeyBasic(t *testing.T) { - pub, pubSerialized := getTestKey() - line := "ssh-rsa " + pubSerialized + " user@host" - testAuthorizedKeys(t, []byte(line), - []testAuthResult{ - {pub, nil, "user@host", "", true}, - }) -} - -func TestAuth(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithOptions := []string{ - `# comments to ignore before any keys...`, - ``, - `env="HOME=/home/root",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`, - `# comments to ignore, along with a blank line`, - ``, - `env="HOME=/home/root2" ssh-rsa ` + pubSerialized + ` user2@host2`, - ``, - `# more comments, plus a invalid entry`, - `ssh-rsa data-that-will-not-parse user@host3`, - } - for _, eol := range []string{"\n", "\r\n"} { - authOptions := strings.Join(authWithOptions, eol) - rest2 := strings.Join(authWithOptions[3:], eol) - rest3 := strings.Join(authWithOptions[6:], eol) - testAuthorizedKeys(t, []byte(authOptions), []testAuthResult{ - {pub, []string{`env="HOME=/home/root"`, "no-port-forwarding"}, "user@host", rest2, true}, - {pub, []string{`env="HOME=/home/root2"`}, "user2@host2", rest3, true}, - {nil, nil, "", "", false}, - }) - } -} - -func TestAuthWithQuotedSpaceInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedSpaceInEnv := []byte(`env="HOME=/home/root dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedSpaceInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/root dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) -} - -func TestAuthWithQuotedCommaInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedCommaInEnv := []byte(`env="HOME=/home/root,dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedCommaInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/root,dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) -} - -func TestAuthWithQuotedQuoteInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedQuoteInEnv := []byte(`env="HOME=/home/\"root dir",no-port-forwarding` + "\t" + `ssh-rsa` + "\t" + pubSerialized + ` user@host`) - authWithDoubleQuotedQuote := []byte(`no-port-forwarding,env="HOME=/home/ \"root dir\"" ssh-rsa ` + pubSerialized + "\t" + `user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedQuoteInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/\"root dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) - - testAuthorizedKeys(t, []byte(authWithDoubleQuotedQuote), []testAuthResult{ - {pub, []string{"no-port-forwarding", `env="HOME=/home/ \"root dir\""`}, "user@host", "", true}, - }) -} - -func TestAuthWithInvalidSpace(t *testing.T) { - _, pubSerialized := getTestKey() - authWithInvalidSpace := []byte(`env="HOME=/home/root dir", no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host -#more to follow but still no valid keys`) - testAuthorizedKeys(t, []byte(authWithInvalidSpace), []testAuthResult{ - {nil, nil, "", "", false}, - }) -} - -func TestAuthWithMissingQuote(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithMissingQuote := []byte(`env="HOME=/home/root,no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host -env="HOME=/home/root",shared-control ssh-rsa ` + pubSerialized + ` user@host`) - - testAuthorizedKeys(t, []byte(authWithMissingQuote), []testAuthResult{ - {pub, []string{`env="HOME=/home/root"`, `shared-control`}, "user@host", "", true}, - }) -} - -func TestInvalidEntry(t *testing.T) { - authInvalid := []byte(`ssh-rsa`) - _, _, _, _, err := ParseAuthorizedKey(authInvalid) - if err == nil { - t.Errorf("got valid entry for %q", authInvalid) - } -} - -var knownHostsParseTests = []struct { - input string - err string - - marker string - comment string - hosts []string - rest string -}{ - { - "", - "EOF", - - "", "", nil, "", - }, - { - "# Just a comment", - "EOF", - - "", "", nil, "", - }, - { - " \t ", - "EOF", - - "", "", nil, "", - }, - { - "localhost ssh-rsa {RSAPUB}", - "", - - "", "", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}", - "", - - "", "", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\n", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\n", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\nnext line", - "", - - "", "comment comment", []string{"localhost"}, "next line", - }, - { - "localhost,[host2:123]\tssh-rsa {RSAPUB}\tcomment comment", - "", - - "", "comment comment", []string{"localhost", "[host2:123]"}, "", - }, - { - "@marker \tlocalhost,[host2:123]\tssh-rsa {RSAPUB}", - "", - - "marker", "", []string{"localhost", "[host2:123]"}, "", - }, - { - "@marker \tlocalhost,[host2:123]\tssh-rsa aabbccdd", - "short read", - - "", "", nil, "", - }, -} - -func TestKnownHostsParsing(t *testing.T) { - rsaPub, rsaPubSerialized := getTestKey() - - for i, test := range knownHostsParseTests { - var expectedKey PublicKey - const rsaKeyToken = "{RSAPUB}" - - input := test.input - if strings.Contains(input, rsaKeyToken) { - expectedKey = rsaPub - input = strings.Replace(test.input, rsaKeyToken, rsaPubSerialized, -1) - } - - marker, hosts, pubKey, comment, rest, err := ParseKnownHosts([]byte(input)) - if err != nil { - if len(test.err) == 0 { - t.Errorf("#%d: unexpectedly failed with %q", i, err) - } else if !strings.Contains(err.Error(), test.err) { - t.Errorf("#%d: expected error containing %q, but got %q", i, test.err, err) - } - continue - } else if len(test.err) != 0 { - t.Errorf("#%d: succeeded but expected error including %q", i, test.err) - continue - } - - if !reflect.DeepEqual(expectedKey, pubKey) { - t.Errorf("#%d: expected key %#v, but got %#v", i, expectedKey, pubKey) - } - - if marker != test.marker { - t.Errorf("#%d: expected marker %q, but got %q", i, test.marker, marker) - } - - if comment != test.comment { - t.Errorf("#%d: expected comment %q, but got %q", i, test.comment, comment) - } - - if !reflect.DeepEqual(test.hosts, hosts) { - t.Errorf("#%d: expected hosts %#v, but got %#v", i, test.hosts, hosts) - } - - if rest := string(rest); rest != test.rest { - t.Errorf("#%d: expected remaining input to be %q, but got %q", i, test.rest, rest) - } - } -} - -func TestFingerprintLegacyMD5(t *testing.T) { - pub, _ := getTestKey() - fingerprint := FingerprintLegacyMD5(pub) - want := "fb:61:6d:1a:e3:f0:95:45:3c:a0:79:be:4a:93:63:66" // ssh-keygen -lf -E md5 rsa - if fingerprint != want { - t.Errorf("got fingerprint %q want %q", fingerprint, want) - } -} - -func TestFingerprintSHA256(t *testing.T) { - pub, _ := getTestKey() - fingerprint := FingerprintSHA256(pub) - want := "SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8" // ssh-keygen -lf rsa - if fingerprint != want { - t.Errorf("got fingerprint %q want %q", fingerprint, want) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts.go deleted file mode 100644 index 077964282c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts.go +++ /dev/null @@ -1,540 +0,0 @@ -// Copyright 2017 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 knownhosts implements a parser for the OpenSSH known_hosts -// host key database, and provides utility functions for writing -// OpenSSH compliant known_hosts files. -package knownhosts - -import ( - "bufio" - "bytes" - "crypto/hmac" - "crypto/rand" - "crypto/sha1" - "encoding/base64" - "errors" - "fmt" - "io" - "net" - "os" - "strings" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// See the sshd manpage -// (http://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT) for -// background. - -type addr struct{ host, port string } - -func (a *addr) String() string { - h := a.host - if strings.Contains(h, ":") { - h = "[" + h + "]" - } - return h + ":" + a.port -} - -type matcher interface { - match(addr) bool -} - -type hostPattern struct { - negate bool - addr addr -} - -func (p *hostPattern) String() string { - n := "" - if p.negate { - n = "!" - } - - return n + p.addr.String() -} - -type hostPatterns []hostPattern - -func (ps hostPatterns) match(a addr) bool { - matched := false - for _, p := range ps { - if !p.match(a) { - continue - } - if p.negate { - return false - } - matched = true - } - return matched -} - -// See -// https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/addrmatch.c -// The matching of * has no regard for separators, unlike filesystem globs -func wildcardMatch(pat []byte, str []byte) bool { - for { - if len(pat) == 0 { - return len(str) == 0 - } - if len(str) == 0 { - return false - } - - if pat[0] == '*' { - if len(pat) == 1 { - return true - } - - for j := range str { - if wildcardMatch(pat[1:], str[j:]) { - return true - } - } - return false - } - - if pat[0] == '?' || pat[0] == str[0] { - pat = pat[1:] - str = str[1:] - } else { - return false - } - } -} - -func (p *hostPattern) match(a addr) bool { - return wildcardMatch([]byte(p.addr.host), []byte(a.host)) && p.addr.port == a.port -} - -type keyDBLine struct { - cert bool - matcher matcher - knownKey KnownKey -} - -func serialize(k ssh.PublicKey) string { - return k.Type() + " " + base64.StdEncoding.EncodeToString(k.Marshal()) -} - -func (l *keyDBLine) match(a addr) bool { - return l.matcher.match(a) -} - -type hostKeyDB struct { - // Serialized version of revoked keys - revoked map[string]*KnownKey - lines []keyDBLine -} - -func newHostKeyDB() *hostKeyDB { - db := &hostKeyDB{ - revoked: make(map[string]*KnownKey), - } - - return db -} - -func keyEq(a, b ssh.PublicKey) bool { - return bytes.Equal(a.Marshal(), b.Marshal()) -} - -// IsAuthorityForHost can be used as a callback in ssh.CertChecker -func (db *hostKeyDB) IsHostAuthority(remote ssh.PublicKey, address string) bool { - h, p, err := net.SplitHostPort(address) - if err != nil { - return false - } - a := addr{host: h, port: p} - - for _, l := range db.lines { - if l.cert && keyEq(l.knownKey.Key, remote) && l.match(a) { - return true - } - } - return false -} - -// IsRevoked can be used as a callback in ssh.CertChecker -func (db *hostKeyDB) IsRevoked(key *ssh.Certificate) bool { - _, ok := db.revoked[string(key.Marshal())] - return ok -} - -const markerCert = "@cert-authority" -const markerRevoked = "@revoked" - -func nextWord(line []byte) (string, []byte) { - i := bytes.IndexAny(line, "\t ") - if i == -1 { - return string(line), nil - } - - return string(line[:i]), bytes.TrimSpace(line[i:]) -} - -func parseLine(line []byte) (marker, host string, key ssh.PublicKey, err error) { - if w, next := nextWord(line); w == markerCert || w == markerRevoked { - marker = w - line = next - } - - host, line = nextWord(line) - if len(line) == 0 { - return "", "", nil, errors.New("knownhosts: missing host pattern") - } - - // ignore the keytype as it's in the key blob anyway. - _, line = nextWord(line) - if len(line) == 0 { - return "", "", nil, errors.New("knownhosts: missing key type pattern") - } - - keyBlob, _ := nextWord(line) - - keyBytes, err := base64.StdEncoding.DecodeString(keyBlob) - if err != nil { - return "", "", nil, err - } - key, err = ssh.ParsePublicKey(keyBytes) - if err != nil { - return "", "", nil, err - } - - return marker, host, key, nil -} - -func (db *hostKeyDB) parseLine(line []byte, filename string, linenum int) error { - marker, pattern, key, err := parseLine(line) - if err != nil { - return err - } - - if marker == markerRevoked { - db.revoked[string(key.Marshal())] = &KnownKey{ - Key: key, - Filename: filename, - Line: linenum, - } - - return nil - } - - entry := keyDBLine{ - cert: marker == markerCert, - knownKey: KnownKey{ - Filename: filename, - Line: linenum, - Key: key, - }, - } - - if pattern[0] == '|' { - entry.matcher, err = newHashedHost(pattern) - } else { - entry.matcher, err = newHostnameMatcher(pattern) - } - - if err != nil { - return err - } - - db.lines = append(db.lines, entry) - return nil -} - -func newHostnameMatcher(pattern string) (matcher, error) { - var hps hostPatterns - for _, p := range strings.Split(pattern, ",") { - if len(p) == 0 { - continue - } - - var a addr - var negate bool - if p[0] == '!' { - negate = true - p = p[1:] - } - - if len(p) == 0 { - return nil, errors.New("knownhosts: negation without following hostname") - } - - var err error - if p[0] == '[' { - a.host, a.port, err = net.SplitHostPort(p) - if err != nil { - return nil, err - } - } else { - a.host, a.port, err = net.SplitHostPort(p) - if err != nil { - a.host = p - a.port = "22" - } - } - hps = append(hps, hostPattern{ - negate: negate, - addr: a, - }) - } - return hps, nil -} - -// KnownKey represents a key declared in a known_hosts file. -type KnownKey struct { - Key ssh.PublicKey - Filename string - Line int -} - -func (k *KnownKey) String() string { - return fmt.Sprintf("%s:%d: %s", k.Filename, k.Line, serialize(k.Key)) -} - -// KeyError is returned if we did not find the key in the host key -// database, or there was a mismatch. Typically, in batch -// applications, this should be interpreted as failure. Interactive -// applications can offer an interactive prompt to the user. -type KeyError struct { - // Want holds the accepted host keys. For each key algorithm, - // there can be one hostkey. If Want is empty, the host is - // unknown. If Want is non-empty, there was a mismatch, which - // can signify a MITM attack. - Want []KnownKey -} - -func (u *KeyError) Error() string { - if len(u.Want) == 0 { - return "knownhosts: key is unknown" - } - return "knownhosts: key mismatch" -} - -// RevokedError is returned if we found a key that was revoked. -type RevokedError struct { - Revoked KnownKey -} - -func (r *RevokedError) Error() string { - return "knownhosts: key is revoked" -} - -// check checks a key against the host database. This should not be -// used for verifying certificates. -func (db *hostKeyDB) check(address string, remote net.Addr, remoteKey ssh.PublicKey) error { - if revoked := db.revoked[string(remoteKey.Marshal())]; revoked != nil { - return &RevokedError{Revoked: *revoked} - } - - host, port, err := net.SplitHostPort(remote.String()) - if err != nil { - return fmt.Errorf("knownhosts: SplitHostPort(%s): %v", remote, err) - } - - hostToCheck := addr{host, port} - if address != "" { - // Give preference to the hostname if available. - host, port, err := net.SplitHostPort(address) - if err != nil { - return fmt.Errorf("knownhosts: SplitHostPort(%s): %v", address, err) - } - - hostToCheck = addr{host, port} - } - - return db.checkAddr(hostToCheck, remoteKey) -} - -// checkAddrs checks if we can find the given public key for any of -// the given addresses. If we only find an entry for the IP address, -// or only the hostname, then this still succeeds. -func (db *hostKeyDB) checkAddr(a addr, remoteKey ssh.PublicKey) error { - // TODO(hanwen): are these the right semantics? What if there - // is just a key for the IP address, but not for the - // hostname? - - // Algorithm => key. - knownKeys := map[string]KnownKey{} - for _, l := range db.lines { - if l.match(a) { - typ := l.knownKey.Key.Type() - if _, ok := knownKeys[typ]; !ok { - knownKeys[typ] = l.knownKey - } - } - } - - keyErr := &KeyError{} - for _, v := range knownKeys { - keyErr.Want = append(keyErr.Want, v) - } - - // Unknown remote host. - if len(knownKeys) == 0 { - return keyErr - } - - // If the remote host starts using a different, unknown key type, we - // also interpret that as a mismatch. - if known, ok := knownKeys[remoteKey.Type()]; !ok || !keyEq(known.Key, remoteKey) { - return keyErr - } - - return nil -} - -// The Read function parses file contents. -func (db *hostKeyDB) Read(r io.Reader, filename string) error { - scanner := bufio.NewScanner(r) - - lineNum := 0 - for scanner.Scan() { - lineNum++ - line := scanner.Bytes() - line = bytes.TrimSpace(line) - if len(line) == 0 || line[0] == '#' { - continue - } - - if err := db.parseLine(line, filename, lineNum); err != nil { - return fmt.Errorf("knownhosts: %s:%d: %v", filename, lineNum, err) - } - } - return scanner.Err() -} - -// New creates a host key callback from the given OpenSSH host key -// files. The returned callback is for use in -// ssh.ClientConfig.HostKeyCallback. By preference, the key check -// operates on the hostname if available, i.e. if a server changes its -// IP address, the host key check will still succeed, even though a -// record of the new IP address is not available. -func New(files ...string) (ssh.HostKeyCallback, error) { - db := newHostKeyDB() - for _, fn := range files { - f, err := os.Open(fn) - if err != nil { - return nil, err - } - defer f.Close() - if err := db.Read(f, fn); err != nil { - return nil, err - } - } - - var certChecker ssh.CertChecker - certChecker.IsHostAuthority = db.IsHostAuthority - certChecker.IsRevoked = db.IsRevoked - certChecker.HostKeyFallback = db.check - - return certChecker.CheckHostKey, nil -} - -// Normalize normalizes an address into the form used in known_hosts -func Normalize(address string) string { - host, port, err := net.SplitHostPort(address) - if err != nil { - host = address - port = "22" - } - entry := host - if port != "22" { - entry = "[" + entry + "]:" + port - } else if strings.Contains(host, ":") && !strings.HasPrefix(host, "[") { - entry = "[" + entry + "]" - } - return entry -} - -// Line returns a line to add append to the known_hosts files. -func Line(addresses []string, key ssh.PublicKey) string { - var trimmed []string - for _, a := range addresses { - trimmed = append(trimmed, Normalize(a)) - } - - return strings.Join(trimmed, ",") + " " + serialize(key) -} - -// HashHostname hashes the given hostname. The hostname is not -// normalized before hashing. -func HashHostname(hostname string) string { - // TODO(hanwen): check if we can safely normalize this always. - salt := make([]byte, sha1.Size) - - _, err := rand.Read(salt) - if err != nil { - panic(fmt.Sprintf("crypto/rand failure %v", err)) - } - - hash := hashHost(hostname, salt) - return encodeHash(sha1HashType, salt, hash) -} - -func decodeHash(encoded string) (hashType string, salt, hash []byte, err error) { - if len(encoded) == 0 || encoded[0] != '|' { - err = errors.New("knownhosts: hashed host must start with '|'") - return - } - components := strings.Split(encoded, "|") - if len(components) != 4 { - err = fmt.Errorf("knownhosts: got %d components, want 3", len(components)) - return - } - - hashType = components[1] - if salt, err = base64.StdEncoding.DecodeString(components[2]); err != nil { - return - } - if hash, err = base64.StdEncoding.DecodeString(components[3]); err != nil { - return - } - return -} - -func encodeHash(typ string, salt []byte, hash []byte) string { - return strings.Join([]string{"", - typ, - base64.StdEncoding.EncodeToString(salt), - base64.StdEncoding.EncodeToString(hash), - }, "|") -} - -// See https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/hostfile.c#120 -func hashHost(hostname string, salt []byte) []byte { - mac := hmac.New(sha1.New, salt) - mac.Write([]byte(hostname)) - return mac.Sum(nil) -} - -type hashedHost struct { - salt []byte - hash []byte -} - -const sha1HashType = "1" - -func newHashedHost(encoded string) (*hashedHost, error) { - typ, salt, hash, err := decodeHash(encoded) - if err != nil { - return nil, err - } - - // The type field seems for future algorithm agility, but it's - // actually hardcoded in openssh currently, see - // https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/hostfile.c#120 - if typ != sha1HashType { - return nil, fmt.Errorf("knownhosts: got hash type %s, must be '1'", typ) - } - - return &hashedHost{salt: salt, hash: hash}, nil -} - -func (h *hashedHost) match(a addr) bool { - return bytes.Equal(hashHost(Normalize(a.String()), h.salt), h.hash) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts_test.go deleted file mode 100644 index b8549ec484..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/knownhosts/knownhosts_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2017 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 knownhosts - -import ( - "bytes" - "fmt" - "net" - "reflect" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -const edKeyStr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBAarftlLeoyf+v+nVchEZII/vna2PCV8FaX4vsF5BX" -const alternateEdKeyStr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIXffBYeYL+WVzVru8npl5JHt2cjlr4ornFTWzoij9sx" -const ecKeyStr = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNLCu01+wpXe3xB5olXCN4SqU2rQu0qjSRKJO4Bg+JRCPU+ENcgdA5srTU8xYDz/GEa4dzK5ldPw4J/gZgSXCMs=" - -var ecKey, alternateEdKey, edKey ssh.PublicKey -var testAddr = &net.TCPAddr{ - IP: net.IP{198, 41, 30, 196}, - Port: 22, -} - -var testAddr6 = &net.TCPAddr{ - IP: net.IP{198, 41, 30, 196, - 1, 2, 3, 4, - 1, 2, 3, 4, - 1, 2, 3, 4, - }, - Port: 22, -} - -func init() { - var err error - ecKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(ecKeyStr)) - if err != nil { - panic(err) - } - edKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(edKeyStr)) - if err != nil { - panic(err) - } - alternateEdKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(alternateEdKeyStr)) - if err != nil { - panic(err) - } -} - -func testDB(t *testing.T, s string) *hostKeyDB { - db := newHostKeyDB() - if err := db.Read(bytes.NewBufferString(s), "testdb"); err != nil { - t.Fatalf("Read: %v", err) - } - - return db -} - -func TestRevoked(t *testing.T) { - db := testDB(t, "\n\n@revoked * "+edKeyStr+"\n") - want := &RevokedError{ - Revoked: KnownKey{ - Key: edKey, - Filename: "testdb", - Line: 3, - }, - } - if err := db.check("", &net.TCPAddr{ - Port: 42, - }, edKey); err == nil { - t.Fatal("no error for revoked key") - } else if !reflect.DeepEqual(want, err) { - t.Fatalf("got %#v, want %#v", want, err) - } -} - -func TestHostAuthority(t *testing.T) { - for _, m := range []struct { - authorityFor string - address string - - good bool - }{ - {authorityFor: "localhost", address: "localhost:22", good: true}, - {authorityFor: "localhost", address: "localhost", good: false}, - {authorityFor: "localhost", address: "localhost:1234", good: false}, - {authorityFor: "[localhost]:1234", address: "localhost:1234", good: true}, - {authorityFor: "[localhost]:1234", address: "localhost:22", good: false}, - {authorityFor: "[localhost]:1234", address: "localhost", good: false}, - } { - db := testDB(t, `@cert-authority `+m.authorityFor+` `+edKeyStr) - if ok := db.IsHostAuthority(db.lines[0].knownKey.Key, m.address); ok != m.good { - t.Errorf("IsHostAuthority: authority %s, address %s, wanted good = %v, got good = %v", - m.authorityFor, m.address, m.good, ok) - } - } -} - -func TestBracket(t *testing.T) { - db := testDB(t, `[git.eclipse.org]:29418,[198.41.30.196]:29418 `+edKeyStr) - - if err := db.check("git.eclipse.org:29418", &net.TCPAddr{ - IP: net.IP{198, 41, 30, 196}, - Port: 29418, - }, edKey); err != nil { - t.Errorf("got error %v, want none", err) - } - - if err := db.check("git.eclipse.org:29419", &net.TCPAddr{ - Port: 42, - }, edKey); err == nil { - t.Fatalf("no error for unknown address") - } else if ke, ok := err.(*KeyError); !ok { - t.Fatalf("got type %T, want *KeyError", err) - } else if len(ke.Want) > 0 { - t.Fatalf("got Want %v, want []", ke.Want) - } -} - -func TestNewKeyType(t *testing.T) { - str := fmt.Sprintf("%s %s", testAddr, edKeyStr) - db := testDB(t, str) - if err := db.check("", testAddr, ecKey); err == nil { - t.Fatalf("no error for unknown address") - } else if ke, ok := err.(*KeyError); !ok { - t.Fatalf("got type %T, want *KeyError", err) - } else if len(ke.Want) == 0 { - t.Fatalf("got empty KeyError.Want") - } -} - -func TestSameKeyType(t *testing.T) { - str := fmt.Sprintf("%s %s", testAddr, edKeyStr) - db := testDB(t, str) - if err := db.check("", testAddr, alternateEdKey); err == nil { - t.Fatalf("no error for unknown address") - } else if ke, ok := err.(*KeyError); !ok { - t.Fatalf("got type %T, want *KeyError", err) - } else if len(ke.Want) == 0 { - t.Fatalf("got empty KeyError.Want") - } else if got, want := ke.Want[0].Key.Marshal(), edKey.Marshal(); !bytes.Equal(got, want) { - t.Fatalf("got key %q, want %q", got, want) - } -} - -func TestIPAddress(t *testing.T) { - str := fmt.Sprintf("%s %s", testAddr, edKeyStr) - db := testDB(t, str) - if err := db.check("", testAddr, edKey); err != nil { - t.Errorf("got error %q, want none", err) - } -} - -func TestIPv6Address(t *testing.T) { - str := fmt.Sprintf("%s %s", testAddr6, edKeyStr) - db := testDB(t, str) - - if err := db.check("", testAddr6, edKey); err != nil { - t.Errorf("got error %q, want none", err) - } -} - -func TestBasic(t *testing.T) { - str := fmt.Sprintf("#comment\n\nserver.org,%s %s\notherhost %s", testAddr, edKeyStr, ecKeyStr) - db := testDB(t, str) - if err := db.check("server.org:22", testAddr, edKey); err != nil { - t.Errorf("got error %v, want none", err) - } - - want := KnownKey{ - Key: edKey, - Filename: "testdb", - Line: 3, - } - if err := db.check("server.org:22", testAddr, ecKey); err == nil { - t.Errorf("succeeded, want KeyError") - } else if ke, ok := err.(*KeyError); !ok { - t.Errorf("got %T, want *KeyError", err) - } else if len(ke.Want) != 1 { - t.Errorf("got %v, want 1 entry", ke) - } else if !reflect.DeepEqual(ke.Want[0], want) { - t.Errorf("got %v, want %v", ke.Want[0], want) - } -} - -func TestHostNamePrecedence(t *testing.T) { - var evilAddr = &net.TCPAddr{ - IP: net.IP{66, 66, 66, 66}, - Port: 22, - } - - str := fmt.Sprintf("server.org,%s %s\nevil.org,%s %s", testAddr, edKeyStr, evilAddr, ecKeyStr) - db := testDB(t, str) - - if err := db.check("server.org:22", evilAddr, ecKey); err == nil { - t.Errorf("check succeeded") - } else if _, ok := err.(*KeyError); !ok { - t.Errorf("got %T, want *KeyError", err) - } -} - -func TestDBOrderingPrecedenceKeyType(t *testing.T) { - str := fmt.Sprintf("server.org,%s %s\nserver.org,%s %s", testAddr, edKeyStr, testAddr, alternateEdKeyStr) - db := testDB(t, str) - - if err := db.check("server.org:22", testAddr, alternateEdKey); err == nil { - t.Errorf("check succeeded") - } else if _, ok := err.(*KeyError); !ok { - t.Errorf("got %T, want *KeyError", err) - } -} - -func TestNegate(t *testing.T) { - str := fmt.Sprintf("%s,!server.org %s", testAddr, edKeyStr) - db := testDB(t, str) - if err := db.check("server.org:22", testAddr, ecKey); err == nil { - t.Errorf("succeeded") - } else if ke, ok := err.(*KeyError); !ok { - t.Errorf("got error type %T, want *KeyError", err) - } else if len(ke.Want) != 0 { - t.Errorf("got expected keys %d (first of type %s), want []", len(ke.Want), ke.Want[0].Key.Type()) - } -} - -func TestWildcard(t *testing.T) { - str := fmt.Sprintf("server*.domain %s", edKeyStr) - db := testDB(t, str) - - want := &KeyError{ - Want: []KnownKey{{ - Filename: "testdb", - Line: 1, - Key: edKey, - }}, - } - - got := db.check("server.domain:22", &net.TCPAddr{}, ecKey) - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s, want %s", got, want) - } -} - -func TestLine(t *testing.T) { - for in, want := range map[string]string{ - "server.org": "server.org " + edKeyStr, - "server.org:22": "server.org " + edKeyStr, - "server.org:23": "[server.org]:23 " + edKeyStr, - "[c629:1ec4:102:304:102:304:102:304]:22": "[c629:1ec4:102:304:102:304:102:304] " + edKeyStr, - "[c629:1ec4:102:304:102:304:102:304]:23": "[c629:1ec4:102:304:102:304:102:304]:23 " + edKeyStr, - } { - if got := Line([]string{in}, edKey); got != want { - t.Errorf("Line(%q) = %q, want %q", in, got, want) - } - } -} - -func TestWildcardMatch(t *testing.T) { - for _, c := range []struct { - pat, str string - want bool - }{ - {"a?b", "abb", true}, - {"ab", "abc", false}, - {"abc", "ab", false}, - {"a*b", "axxxb", true}, - {"a*b", "axbxb", true}, - {"a*b", "axbxbc", false}, - {"a*?", "axbxc", true}, - {"a*b*", "axxbxxxxxx", true}, - {"a*b*c", "axxbxxxxxxc", true}, - {"a*b*?", "axxbxxxxxxc", true}, - {"a*b*z", "axxbxxbxxxz", true}, - {"a*b*z", "axxbxxzxxxz", true}, - {"a*b*z", "axxbxxzxxx", false}, - } { - got := wildcardMatch([]byte(c.pat), []byte(c.str)) - if got != c.want { - t.Errorf("wildcardMatch(%q, %q) = %v, want %v", c.pat, c.str, got, c.want) - } - - } -} - -// TODO(hanwen): test coverage for certificates. - -const testHostname = "hostname" - -// generated with keygen -H -f -const encodedTestHostnameHash = "|1|IHXZvQMvTcZTUU29+2vXFgx8Frs=|UGccIWfRVDwilMBnA3WJoRAC75Y=" - -func TestHostHash(t *testing.T) { - testHostHash(t, testHostname, encodedTestHostnameHash) -} - -func TestHashList(t *testing.T) { - encoded := HashHostname(testHostname) - testHostHash(t, testHostname, encoded) -} - -func testHostHash(t *testing.T, hostname, encoded string) { - typ, salt, hash, err := decodeHash(encoded) - if err != nil { - t.Fatalf("decodeHash: %v", err) - } - - if got := encodeHash(typ, salt, hash); got != encoded { - t.Errorf("got encoding %s want %s", got, encoded) - } - - if typ != sha1HashType { - t.Fatalf("got hash type %q, want %q", typ, sha1HashType) - } - - got := hashHost(hostname, salt) - if !bytes.Equal(got, hash) { - t.Errorf("got hash %x want %x", got, hash) - } -} - -func TestNormalize(t *testing.T) { - for in, want := range map[string]string{ - "127.0.0.1:22": "127.0.0.1", - "[127.0.0.1]:22": "127.0.0.1", - "[127.0.0.1]:23": "[127.0.0.1]:23", - "127.0.0.1:23": "[127.0.0.1]:23", - "[a.b.c]:22": "a.b.c", - "[abcd:abcd:abcd:abcd]": "[abcd:abcd:abcd:abcd]", - "[abcd:abcd:abcd:abcd]:22": "[abcd:abcd:abcd:abcd]", - "[abcd:abcd:abcd:abcd]:23": "[abcd:abcd:abcd:abcd]:23", - } { - got := Normalize(in) - if got != want { - t.Errorf("Normalize(%q) = %q, want %q", in, got, want) - } - } -} - -func TestHashedHostkeyCheck(t *testing.T) { - str := fmt.Sprintf("%s %s", HashHostname(testHostname), edKeyStr) - db := testDB(t, str) - if err := db.check(testHostname+":22", testAddr, edKey); err != nil { - t.Errorf("check(%s): %v", testHostname, err) - } - want := &KeyError{ - Want: []KnownKey{{ - Filename: "testdb", - Line: 1, - Key: edKey, - }}, - } - if got := db.check(testHostname+":22", testAddr, alternateEdKey); !reflect.DeepEqual(got, want) { - t.Errorf("got error %v, want %v", got, want) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mac.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mac.go deleted file mode 100644 index c07a06285e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mac.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012 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 ssh - -// Message authentication support - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/sha256" - "hash" -) - -type macMode struct { - keySize int - etm bool - new func(key []byte) hash.Hash -} - -// truncatingMAC wraps around a hash.Hash and truncates the output digest to -// a given size. -type truncatingMAC struct { - length int - hmac hash.Hash -} - -func (t truncatingMAC) Write(data []byte) (int, error) { - return t.hmac.Write(data) -} - -func (t truncatingMAC) Sum(in []byte) []byte { - out := t.hmac.Sum(in) - return out[:len(in)+t.length] -} - -func (t truncatingMAC) Reset() { - t.hmac.Reset() -} - -func (t truncatingMAC) Size() int { - return t.length -} - -func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() } - -var macModes = map[string]*macMode{ - "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash { - return hmac.New(sha256.New, key) - }}, - "hmac-sha2-256": {32, false, func(key []byte) hash.Hash { - return hmac.New(sha256.New, key) - }}, - "hmac-sha1": {20, false, func(key []byte) hash.Hash { - return hmac.New(sha1.New, key) - }}, - "hmac-sha1-96": {20, false, func(key []byte) hash.Hash { - return truncatingMAC{12, hmac.New(sha1.New, key)} - }}, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mempipe_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mempipe_test.go deleted file mode 100644 index 8697cd6140..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mempipe_test.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "io" - "sync" - "testing" -) - -// An in-memory packetConn. It is safe to call Close and writePacket -// from different goroutines. -type memTransport struct { - eof bool - pending [][]byte - write *memTransport - sync.Mutex - *sync.Cond -} - -func (t *memTransport) readPacket() ([]byte, error) { - t.Lock() - defer t.Unlock() - for { - if len(t.pending) > 0 { - r := t.pending[0] - t.pending = t.pending[1:] - return r, nil - } - if t.eof { - return nil, io.EOF - } - t.Cond.Wait() - } -} - -func (t *memTransport) closeSelf() error { - t.Lock() - defer t.Unlock() - if t.eof { - return io.EOF - } - t.eof = true - t.Cond.Broadcast() - return nil -} - -func (t *memTransport) Close() error { - err := t.write.closeSelf() - t.closeSelf() - return err -} - -func (t *memTransport) writePacket(p []byte) error { - t.write.Lock() - defer t.write.Unlock() - if t.write.eof { - return io.EOF - } - c := make([]byte, len(p)) - copy(c, p) - t.write.pending = append(t.write.pending, c) - t.write.Cond.Signal() - return nil -} - -func memPipe() (a, b packetConn) { - t1 := memTransport{} - t2 := memTransport{} - t1.write = &t2 - t2.write = &t1 - t1.Cond = sync.NewCond(&t1.Mutex) - t2.Cond = sync.NewCond(&t2.Mutex) - return &t1, &t2 -} - -func TestMemPipe(t *testing.T) { - a, b := memPipe() - if err := a.writePacket([]byte{42}); err != nil { - t.Fatalf("writePacket: %v", err) - } - if err := a.Close(); err != nil { - t.Fatal("Close: ", err) - } - p, err := b.readPacket() - if err != nil { - t.Fatal("readPacket: ", err) - } - if len(p) != 1 || p[0] != 42 { - t.Fatalf("got %v, want {42}", p) - } - p, err = b.readPacket() - if err != io.EOF { - t.Fatalf("got %v, %v, want EOF", p, err) - } -} - -func TestDoubleClose(t *testing.T) { - a, _ := memPipe() - err := a.Close() - if err != nil { - t.Errorf("Close: %v", err) - } - err = a.Close() - if err != io.EOF { - t.Errorf("expect EOF on double close.") - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages.go deleted file mode 100644 index 08d2811730..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages.go +++ /dev/null @@ -1,766 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "math/big" - "reflect" - "strconv" - "strings" -) - -// These are SSH message type numbers. They are scattered around several -// documents but many were taken from [SSH-PARAMETERS]. -const ( - msgIgnore = 2 - msgUnimplemented = 3 - msgDebug = 4 - msgNewKeys = 21 -) - -// SSH messages: -// -// These structures mirror the wire format of the corresponding SSH messages. -// They are marshaled using reflection with the marshal and unmarshal functions -// in this file. The only wrinkle is that a final member of type []byte with a -// ssh tag of "rest" receives the remainder of a packet when unmarshaling. - -// See RFC 4253, section 11.1. -const msgDisconnect = 1 - -// disconnectMsg is the message that signals a disconnect. It is also -// the error type returned from mux.Wait() -type disconnectMsg struct { - Reason uint32 `sshtype:"1"` - Message string - Language string -} - -func (d *disconnectMsg) Error() string { - return fmt.Sprintf("ssh: disconnect, reason %d: %s", d.Reason, d.Message) -} - -// See RFC 4253, section 7.1. -const msgKexInit = 20 - -type kexInitMsg struct { - Cookie [16]byte `sshtype:"20"` - KexAlgos []string - ServerHostKeyAlgos []string - CiphersClientServer []string - CiphersServerClient []string - MACsClientServer []string - MACsServerClient []string - CompressionClientServer []string - CompressionServerClient []string - LanguagesClientServer []string - LanguagesServerClient []string - FirstKexFollows bool - Reserved uint32 -} - -// See RFC 4253, section 8. - -// Diffie-Helman -const msgKexDHInit = 30 - -type kexDHInitMsg struct { - X *big.Int `sshtype:"30"` -} - -const msgKexECDHInit = 30 - -type kexECDHInitMsg struct { - ClientPubKey []byte `sshtype:"30"` -} - -const msgKexECDHReply = 31 - -type kexECDHReplyMsg struct { - HostKey []byte `sshtype:"31"` - EphemeralPubKey []byte - Signature []byte -} - -const msgKexDHReply = 31 - -type kexDHReplyMsg struct { - HostKey []byte `sshtype:"31"` - Y *big.Int - Signature []byte -} - -// See RFC 4253, section 10. -const msgServiceRequest = 5 - -type serviceRequestMsg struct { - Service string `sshtype:"5"` -} - -// See RFC 4253, section 10. -const msgServiceAccept = 6 - -type serviceAcceptMsg struct { - Service string `sshtype:"6"` -} - -// See RFC 4252, section 5. -const msgUserAuthRequest = 50 - -type userAuthRequestMsg struct { - User string `sshtype:"50"` - Service string - Method string - Payload []byte `ssh:"rest"` -} - -// Used for debug printouts of packets. -type userAuthSuccessMsg struct { -} - -// See RFC 4252, section 5.1 -const msgUserAuthFailure = 51 - -type userAuthFailureMsg struct { - Methods []string `sshtype:"51"` - PartialSuccess bool -} - -// See RFC 4252, section 5.1 -const msgUserAuthSuccess = 52 - -// See RFC 4252, section 5.4 -const msgUserAuthBanner = 53 - -type userAuthBannerMsg struct { - Message string `sshtype:"53"` - // unused, but required to allow message parsing - Language string -} - -// See RFC 4256, section 3.2 -const msgUserAuthInfoRequest = 60 -const msgUserAuthInfoResponse = 61 - -type userAuthInfoRequestMsg struct { - User string `sshtype:"60"` - Instruction string - DeprecatedLanguage string - NumPrompts uint32 - Prompts []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpen = 90 - -type channelOpenMsg struct { - ChanType string `sshtype:"90"` - PeersID uint32 - PeersWindow uint32 - MaxPacketSize uint32 - TypeSpecificData []byte `ssh:"rest"` -} - -const msgChannelExtendedData = 95 -const msgChannelData = 94 - -// Used for debug print outs of packets. -type channelDataMsg struct { - PeersID uint32 `sshtype:"94"` - Length uint32 - Rest []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpenConfirm = 91 - -type channelOpenConfirmMsg struct { - PeersID uint32 `sshtype:"91"` - MyID uint32 - MyWindow uint32 - MaxPacketSize uint32 - TypeSpecificData []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpenFailure = 92 - -type channelOpenFailureMsg struct { - PeersID uint32 `sshtype:"92"` - Reason RejectionReason - Message string - Language string -} - -const msgChannelRequest = 98 - -type channelRequestMsg struct { - PeersID uint32 `sshtype:"98"` - Request string - WantReply bool - RequestSpecificData []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.4. -const msgChannelSuccess = 99 - -type channelRequestSuccessMsg struct { - PeersID uint32 `sshtype:"99"` -} - -// See RFC 4254, section 5.4. -const msgChannelFailure = 100 - -type channelRequestFailureMsg struct { - PeersID uint32 `sshtype:"100"` -} - -// See RFC 4254, section 5.3 -const msgChannelClose = 97 - -type channelCloseMsg struct { - PeersID uint32 `sshtype:"97"` -} - -// See RFC 4254, section 5.3 -const msgChannelEOF = 96 - -type channelEOFMsg struct { - PeersID uint32 `sshtype:"96"` -} - -// See RFC 4254, section 4 -const msgGlobalRequest = 80 - -type globalRequestMsg struct { - Type string `sshtype:"80"` - WantReply bool - Data []byte `ssh:"rest"` -} - -// See RFC 4254, section 4 -const msgRequestSuccess = 81 - -type globalRequestSuccessMsg struct { - Data []byte `ssh:"rest" sshtype:"81"` -} - -// See RFC 4254, section 4 -const msgRequestFailure = 82 - -type globalRequestFailureMsg struct { - Data []byte `ssh:"rest" sshtype:"82"` -} - -// See RFC 4254, section 5.2 -const msgChannelWindowAdjust = 93 - -type windowAdjustMsg struct { - PeersID uint32 `sshtype:"93"` - AdditionalBytes uint32 -} - -// See RFC 4252, section 7 -const msgUserAuthPubKeyOk = 60 - -type userAuthPubKeyOkMsg struct { - Algo string `sshtype:"60"` - PubKey []byte -} - -// typeTags returns the possible type bytes for the given reflect.Type, which -// should be a struct. The possible values are separated by a '|' character. -func typeTags(structType reflect.Type) (tags []byte) { - tagStr := structType.Field(0).Tag.Get("sshtype") - - for _, tag := range strings.Split(tagStr, "|") { - i, err := strconv.Atoi(tag) - if err == nil { - tags = append(tags, byte(i)) - } - } - - return tags -} - -func fieldError(t reflect.Type, field int, problem string) error { - if problem != "" { - problem = ": " + problem - } - return fmt.Errorf("ssh: unmarshal error for field %s of type %s%s", t.Field(field).Name, t.Name(), problem) -} - -var errShortRead = errors.New("ssh: short read") - -// Unmarshal parses data in SSH wire format into a structure. The out -// argument should be a pointer to struct. If the first member of the -// struct has the "sshtype" tag set to a '|'-separated set of numbers -// in decimal, the packet must start with one of those numbers. In -// case of error, Unmarshal returns a ParseError or -// UnexpectedMessageError. -func Unmarshal(data []byte, out interface{}) error { - v := reflect.ValueOf(out).Elem() - structType := v.Type() - expectedTypes := typeTags(structType) - - var expectedType byte - if len(expectedTypes) > 0 { - expectedType = expectedTypes[0] - } - - if len(data) == 0 { - return parseError(expectedType) - } - - if len(expectedTypes) > 0 { - goodType := false - for _, e := range expectedTypes { - if e > 0 && data[0] == e { - goodType = true - break - } - } - if !goodType { - return fmt.Errorf("ssh: unexpected message type %d (expected one of %v)", data[0], expectedTypes) - } - data = data[1:] - } - - var ok bool - for i := 0; i < v.NumField(); i++ { - field := v.Field(i) - t := field.Type() - switch t.Kind() { - case reflect.Bool: - if len(data) < 1 { - return errShortRead - } - field.SetBool(data[0] != 0) - data = data[1:] - case reflect.Array: - if t.Elem().Kind() != reflect.Uint8 { - return fieldError(structType, i, "array of unsupported type") - } - if len(data) < t.Len() { - return errShortRead - } - for j, n := 0, t.Len(); j < n; j++ { - field.Index(j).Set(reflect.ValueOf(data[j])) - } - data = data[t.Len():] - case reflect.Uint64: - var u64 uint64 - if u64, data, ok = parseUint64(data); !ok { - return errShortRead - } - field.SetUint(u64) - case reflect.Uint32: - var u32 uint32 - if u32, data, ok = parseUint32(data); !ok { - return errShortRead - } - field.SetUint(uint64(u32)) - case reflect.Uint8: - if len(data) < 1 { - return errShortRead - } - field.SetUint(uint64(data[0])) - data = data[1:] - case reflect.String: - var s []byte - if s, data, ok = parseString(data); !ok { - return fieldError(structType, i, "") - } - field.SetString(string(s)) - case reflect.Slice: - switch t.Elem().Kind() { - case reflect.Uint8: - if structType.Field(i).Tag.Get("ssh") == "rest" { - field.Set(reflect.ValueOf(data)) - data = nil - } else { - var s []byte - if s, data, ok = parseString(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(s)) - } - case reflect.String: - var nl []string - if nl, data, ok = parseNameList(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(nl)) - default: - return fieldError(structType, i, "slice of unsupported type") - } - case reflect.Ptr: - if t == bigIntType { - var n *big.Int - if n, data, ok = parseInt(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(n)) - } else { - return fieldError(structType, i, "pointer to unsupported type") - } - default: - return fieldError(structType, i, fmt.Sprintf("unsupported type: %v", t)) - } - } - - if len(data) != 0 { - return parseError(expectedType) - } - - return nil -} - -// Marshal serializes the message in msg to SSH wire format. The msg -// argument should be a struct or pointer to struct. If the first -// member has the "sshtype" tag set to a number in decimal, that -// number is prepended to the result. If the last of member has the -// "ssh" tag set to "rest", its contents are appended to the output. -func Marshal(msg interface{}) []byte { - out := make([]byte, 0, 64) - return marshalStruct(out, msg) -} - -func marshalStruct(out []byte, msg interface{}) []byte { - v := reflect.Indirect(reflect.ValueOf(msg)) - msgTypes := typeTags(v.Type()) - if len(msgTypes) > 0 { - out = append(out, msgTypes[0]) - } - - for i, n := 0, v.NumField(); i < n; i++ { - field := v.Field(i) - switch t := field.Type(); t.Kind() { - case reflect.Bool: - var v uint8 - if field.Bool() { - v = 1 - } - out = append(out, v) - case reflect.Array: - if t.Elem().Kind() != reflect.Uint8 { - panic(fmt.Sprintf("array of non-uint8 in field %d: %T", i, field.Interface())) - } - for j, l := 0, t.Len(); j < l; j++ { - out = append(out, uint8(field.Index(j).Uint())) - } - case reflect.Uint32: - out = appendU32(out, uint32(field.Uint())) - case reflect.Uint64: - out = appendU64(out, uint64(field.Uint())) - case reflect.Uint8: - out = append(out, uint8(field.Uint())) - case reflect.String: - s := field.String() - out = appendInt(out, len(s)) - out = append(out, s...) - case reflect.Slice: - switch t.Elem().Kind() { - case reflect.Uint8: - if v.Type().Field(i).Tag.Get("ssh") != "rest" { - out = appendInt(out, field.Len()) - } - out = append(out, field.Bytes()...) - case reflect.String: - offset := len(out) - out = appendU32(out, 0) - if n := field.Len(); n > 0 { - for j := 0; j < n; j++ { - f := field.Index(j) - if j != 0 { - out = append(out, ',') - } - out = append(out, f.String()...) - } - // overwrite length value - binary.BigEndian.PutUint32(out[offset:], uint32(len(out)-offset-4)) - } - default: - panic(fmt.Sprintf("slice of unknown type in field %d: %T", i, field.Interface())) - } - case reflect.Ptr: - if t == bigIntType { - var n *big.Int - nValue := reflect.ValueOf(&n) - nValue.Elem().Set(field) - needed := intLength(n) - oldLength := len(out) - - if cap(out)-len(out) < needed { - newOut := make([]byte, len(out), 2*(len(out)+needed)) - copy(newOut, out) - out = newOut - } - out = out[:oldLength+needed] - marshalInt(out[oldLength:], n) - } else { - panic(fmt.Sprintf("pointer to unknown type in field %d: %T", i, field.Interface())) - } - } - } - - return out -} - -var bigOne = big.NewInt(1) - -func parseString(in []byte) (out, rest []byte, ok bool) { - if len(in) < 4 { - return - } - length := binary.BigEndian.Uint32(in) - in = in[4:] - if uint32(len(in)) < length { - return - } - out = in[:length] - rest = in[length:] - ok = true - return -} - -var ( - comma = []byte{','} - emptyNameList = []string{} -) - -func parseNameList(in []byte) (out []string, rest []byte, ok bool) { - contents, rest, ok := parseString(in) - if !ok { - return - } - if len(contents) == 0 { - out = emptyNameList - return - } - parts := bytes.Split(contents, comma) - out = make([]string, len(parts)) - for i, part := range parts { - out[i] = string(part) - } - return -} - -func parseInt(in []byte) (out *big.Int, rest []byte, ok bool) { - contents, rest, ok := parseString(in) - if !ok { - return - } - out = new(big.Int) - - if len(contents) > 0 && contents[0]&0x80 == 0x80 { - // This is a negative number - notBytes := make([]byte, len(contents)) - for i := range notBytes { - notBytes[i] = ^contents[i] - } - out.SetBytes(notBytes) - out.Add(out, bigOne) - out.Neg(out) - } else { - // Positive number - out.SetBytes(contents) - } - ok = true - return -} - -func parseUint32(in []byte) (uint32, []byte, bool) { - if len(in) < 4 { - return 0, nil, false - } - return binary.BigEndian.Uint32(in), in[4:], true -} - -func parseUint64(in []byte) (uint64, []byte, bool) { - if len(in) < 8 { - return 0, nil, false - } - return binary.BigEndian.Uint64(in), in[8:], true -} - -func intLength(n *big.Int) int { - length := 4 /* length bytes */ - if n.Sign() < 0 { - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bitLen := nMinus1.BitLen() - if bitLen%8 == 0 { - // The number will need 0xff padding - length++ - } - length += (bitLen + 7) / 8 - } else if n.Sign() == 0 { - // A zero is the zero length string - } else { - bitLen := n.BitLen() - if bitLen%8 == 0 { - // The number will need 0x00 padding - length++ - } - length += (bitLen + 7) / 8 - } - - return length -} - -func marshalUint32(to []byte, n uint32) []byte { - binary.BigEndian.PutUint32(to, n) - return to[4:] -} - -func marshalUint64(to []byte, n uint64) []byte { - binary.BigEndian.PutUint64(to, n) - return to[8:] -} - -func marshalInt(to []byte, n *big.Int) []byte { - lengthBytes := to - to = to[4:] - length := 0 - - if n.Sign() < 0 { - // A negative number has to be converted to two's-complement - // form. So we'll subtract 1 and invert. If the - // most-significant-bit isn't set then we'll need to pad the - // beginning with 0xff in order to keep the number negative. - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bytes := nMinus1.Bytes() - for i := range bytes { - bytes[i] ^= 0xff - } - if len(bytes) == 0 || bytes[0]&0x80 == 0 { - to[0] = 0xff - to = to[1:] - length++ - } - nBytes := copy(to, bytes) - to = to[nBytes:] - length += nBytes - } else if n.Sign() == 0 { - // A zero is the zero length string - } else { - bytes := n.Bytes() - if len(bytes) > 0 && bytes[0]&0x80 != 0 { - // We'll have to pad this with a 0x00 in order to - // stop it looking like a negative number. - to[0] = 0 - to = to[1:] - length++ - } - nBytes := copy(to, bytes) - to = to[nBytes:] - length += nBytes - } - - lengthBytes[0] = byte(length >> 24) - lengthBytes[1] = byte(length >> 16) - lengthBytes[2] = byte(length >> 8) - lengthBytes[3] = byte(length) - return to -} - -func writeInt(w io.Writer, n *big.Int) { - length := intLength(n) - buf := make([]byte, length) - marshalInt(buf, n) - w.Write(buf) -} - -func writeString(w io.Writer, s []byte) { - var lengthBytes [4]byte - lengthBytes[0] = byte(len(s) >> 24) - lengthBytes[1] = byte(len(s) >> 16) - lengthBytes[2] = byte(len(s) >> 8) - lengthBytes[3] = byte(len(s)) - w.Write(lengthBytes[:]) - w.Write(s) -} - -func stringLength(n int) int { - return 4 + n -} - -func marshalString(to []byte, s []byte) []byte { - to[0] = byte(len(s) >> 24) - to[1] = byte(len(s) >> 16) - to[2] = byte(len(s) >> 8) - to[3] = byte(len(s)) - to = to[4:] - copy(to, s) - return to[len(s):] -} - -var bigIntType = reflect.TypeOf((*big.Int)(nil)) - -// Decode a packet into its corresponding message. -func decode(packet []byte) (interface{}, error) { - var msg interface{} - switch packet[0] { - case msgDisconnect: - msg = new(disconnectMsg) - case msgServiceRequest: - msg = new(serviceRequestMsg) - case msgServiceAccept: - msg = new(serviceAcceptMsg) - case msgKexInit: - msg = new(kexInitMsg) - case msgKexDHInit: - msg = new(kexDHInitMsg) - case msgKexDHReply: - msg = new(kexDHReplyMsg) - case msgUserAuthRequest: - msg = new(userAuthRequestMsg) - case msgUserAuthSuccess: - return new(userAuthSuccessMsg), nil - case msgUserAuthFailure: - msg = new(userAuthFailureMsg) - case msgUserAuthPubKeyOk: - msg = new(userAuthPubKeyOkMsg) - case msgGlobalRequest: - msg = new(globalRequestMsg) - case msgRequestSuccess: - msg = new(globalRequestSuccessMsg) - case msgRequestFailure: - msg = new(globalRequestFailureMsg) - case msgChannelOpen: - msg = new(channelOpenMsg) - case msgChannelData: - msg = new(channelDataMsg) - case msgChannelOpenConfirm: - msg = new(channelOpenConfirmMsg) - case msgChannelOpenFailure: - msg = new(channelOpenFailureMsg) - case msgChannelWindowAdjust: - msg = new(windowAdjustMsg) - case msgChannelEOF: - msg = new(channelEOFMsg) - case msgChannelClose: - msg = new(channelCloseMsg) - case msgChannelRequest: - msg = new(channelRequestMsg) - case msgChannelSuccess: - msg = new(channelRequestSuccessMsg) - case msgChannelFailure: - msg = new(channelRequestFailureMsg) - default: - return nil, unexpectedMessageError(0, packet[0]) - } - if err := Unmarshal(packet, msg); err != nil { - return nil, err - } - return msg, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages_test.go deleted file mode 100644 index e79076412a..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/messages_test.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "math/big" - "math/rand" - "reflect" - "testing" - "testing/quick" -) - -var intLengthTests = []struct { - val, length int -}{ - {0, 4 + 0}, - {1, 4 + 1}, - {127, 4 + 1}, - {128, 4 + 2}, - {-1, 4 + 1}, -} - -func TestIntLength(t *testing.T) { - for _, test := range intLengthTests { - v := new(big.Int).SetInt64(int64(test.val)) - length := intLength(v) - if length != test.length { - t.Errorf("For %d, got length %d but expected %d", test.val, length, test.length) - } - } -} - -type msgAllTypes struct { - Bool bool `sshtype:"21"` - Array [16]byte - Uint64 uint64 - Uint32 uint32 - Uint8 uint8 - String string - Strings []string - Bytes []byte - Int *big.Int - Rest []byte `ssh:"rest"` -} - -func (t *msgAllTypes) Generate(rand *rand.Rand, size int) reflect.Value { - m := &msgAllTypes{} - m.Bool = rand.Intn(2) == 1 - randomBytes(m.Array[:], rand) - m.Uint64 = uint64(rand.Int63n(1<<63 - 1)) - m.Uint32 = uint32(rand.Intn((1 << 31) - 1)) - m.Uint8 = uint8(rand.Intn(1 << 8)) - m.String = string(m.Array[:]) - m.Strings = randomNameList(rand) - m.Bytes = m.Array[:] - m.Int = randomInt(rand) - m.Rest = m.Array[:] - return reflect.ValueOf(m) -} - -func TestMarshalUnmarshal(t *testing.T) { - rand := rand.New(rand.NewSource(0)) - iface := &msgAllTypes{} - ty := reflect.ValueOf(iface).Type() - - n := 100 - if testing.Short() { - n = 5 - } - for j := 0; j < n; j++ { - v, ok := quick.Value(ty, rand) - if !ok { - t.Errorf("failed to create value") - break - } - - m1 := v.Elem().Interface() - m2 := iface - - marshaled := Marshal(m1) - if err := Unmarshal(marshaled, m2); err != nil { - t.Errorf("Unmarshal %#v: %s", m1, err) - break - } - - if !reflect.DeepEqual(v.Interface(), m2) { - t.Errorf("got: %#v\nwant:%#v\n%x", m2, m1, marshaled) - break - } - } -} - -func TestUnmarshalEmptyPacket(t *testing.T) { - var b []byte - var m channelRequestSuccessMsg - if err := Unmarshal(b, &m); err == nil { - t.Fatalf("unmarshal of empty slice succeeded") - } -} - -func TestUnmarshalUnexpectedPacket(t *testing.T) { - type S struct { - I uint32 `sshtype:"43"` - S string - B bool - } - - s := S{11, "hello", true} - packet := Marshal(s) - packet[0] = 42 - roundtrip := S{} - err := Unmarshal(packet, &roundtrip) - if err == nil { - t.Fatal("expected error, not nil") - } -} - -func TestMarshalPtr(t *testing.T) { - s := struct { - S string - }{"hello"} - - m1 := Marshal(s) - m2 := Marshal(&s) - if !bytes.Equal(m1, m2) { - t.Errorf("got %q, want %q for marshaled pointer", m2, m1) - } -} - -func TestBareMarshalUnmarshal(t *testing.T) { - type S struct { - I uint32 - S string - B bool - } - - s := S{42, "hello", true} - packet := Marshal(s) - roundtrip := S{} - Unmarshal(packet, &roundtrip) - - if !reflect.DeepEqual(s, roundtrip) { - t.Errorf("got %#v, want %#v", roundtrip, s) - } -} - -func TestBareMarshal(t *testing.T) { - type S2 struct { - I uint32 - } - s := S2{42} - packet := Marshal(s) - i, rest, ok := parseUint32(packet) - if len(rest) > 0 || !ok { - t.Errorf("parseInt(%q): parse error", packet) - } - if i != s.I { - t.Errorf("got %d, want %d", i, s.I) - } -} - -func TestUnmarshalShortKexInitPacket(t *testing.T) { - // This used to panic. - // Issue 11348 - packet := []byte{0x14, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xff, 0xff, 0xff} - kim := &kexInitMsg{} - if err := Unmarshal(packet, kim); err == nil { - t.Error("truncated packet unmarshaled without error") - } -} - -func TestMarshalMultiTag(t *testing.T) { - var res struct { - A uint32 `sshtype:"1|2"` - } - - good1 := struct { - A uint32 `sshtype:"1"` - }{ - 1, - } - good2 := struct { - A uint32 `sshtype:"2"` - }{ - 1, - } - - if e := Unmarshal(Marshal(good1), &res); e != nil { - t.Errorf("error unmarshaling multipart tag: %v", e) - } - - if e := Unmarshal(Marshal(good2), &res); e != nil { - t.Errorf("error unmarshaling multipart tag: %v", e) - } - - bad1 := struct { - A uint32 `sshtype:"3"` - }{ - 1, - } - if e := Unmarshal(Marshal(bad1), &res); e == nil { - t.Errorf("bad struct unmarshaled without error") - } -} - -func randomBytes(out []byte, rand *rand.Rand) { - for i := 0; i < len(out); i++ { - out[i] = byte(rand.Int31()) - } -} - -func randomNameList(rand *rand.Rand) []string { - ret := make([]string, rand.Int31()&15) - for i := range ret { - s := make([]byte, 1+(rand.Int31()&15)) - for j := range s { - s[j] = 'a' + uint8(rand.Int31()&15) - } - ret[i] = string(s) - } - return ret -} - -func randomInt(rand *rand.Rand) *big.Int { - return new(big.Int).SetInt64(int64(int32(rand.Uint32()))) -} - -func (*kexInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { - ki := &kexInitMsg{} - randomBytes(ki.Cookie[:], rand) - ki.KexAlgos = randomNameList(rand) - ki.ServerHostKeyAlgos = randomNameList(rand) - ki.CiphersClientServer = randomNameList(rand) - ki.CiphersServerClient = randomNameList(rand) - ki.MACsClientServer = randomNameList(rand) - ki.MACsServerClient = randomNameList(rand) - ki.CompressionClientServer = randomNameList(rand) - ki.CompressionServerClient = randomNameList(rand) - ki.LanguagesClientServer = randomNameList(rand) - ki.LanguagesServerClient = randomNameList(rand) - if rand.Int31()&1 == 1 { - ki.FirstKexFollows = true - } - return reflect.ValueOf(ki) -} - -func (*kexDHInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { - dhi := &kexDHInitMsg{} - dhi.X = randomInt(rand) - return reflect.ValueOf(dhi) -} - -var ( - _kexInitMsg = new(kexInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() - _kexDHInitMsg = new(kexDHInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() - - _kexInit = Marshal(_kexInitMsg) - _kexDHInit = Marshal(_kexDHInitMsg) -) - -func BenchmarkMarshalKexInitMsg(b *testing.B) { - for i := 0; i < b.N; i++ { - Marshal(_kexInitMsg) - } -} - -func BenchmarkUnmarshalKexInitMsg(b *testing.B) { - m := new(kexInitMsg) - for i := 0; i < b.N; i++ { - Unmarshal(_kexInit, m) - } -} - -func BenchmarkMarshalKexDHInitMsg(b *testing.B) { - for i := 0; i < b.N; i++ { - Marshal(_kexDHInitMsg) - } -} - -func BenchmarkUnmarshalKexDHInitMsg(b *testing.B) { - m := new(kexDHInitMsg) - for i := 0; i < b.N; i++ { - Unmarshal(_kexDHInit, m) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux.go deleted file mode 100644 index f19016270e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "encoding/binary" - "fmt" - "io" - "log" - "sync" - "sync/atomic" -) - -// debugMux, if set, causes messages in the connection protocol to be -// logged. -const debugMux = false - -// chanList is a thread safe channel list. -type chanList struct { - // protects concurrent access to chans - sync.Mutex - - // chans are indexed by the local id of the channel, which the - // other side should send in the PeersId field. - chans []*channel - - // This is a debugging aid: it offsets all IDs by this - // amount. This helps distinguish otherwise identical - // server/client muxes - offset uint32 -} - -// Assigns a channel ID to the given channel. -func (c *chanList) add(ch *channel) uint32 { - c.Lock() - defer c.Unlock() - for i := range c.chans { - if c.chans[i] == nil { - c.chans[i] = ch - return uint32(i) + c.offset - } - } - c.chans = append(c.chans, ch) - return uint32(len(c.chans)-1) + c.offset -} - -// getChan returns the channel for the given ID. -func (c *chanList) getChan(id uint32) *channel { - id -= c.offset - - c.Lock() - defer c.Unlock() - if id < uint32(len(c.chans)) { - return c.chans[id] - } - return nil -} - -func (c *chanList) remove(id uint32) { - id -= c.offset - c.Lock() - if id < uint32(len(c.chans)) { - c.chans[id] = nil - } - c.Unlock() -} - -// dropAll forgets all channels it knows, returning them in a slice. -func (c *chanList) dropAll() []*channel { - c.Lock() - defer c.Unlock() - var r []*channel - - for _, ch := range c.chans { - if ch == nil { - continue - } - r = append(r, ch) - } - c.chans = nil - return r -} - -// mux represents the state for the SSH connection protocol, which -// multiplexes many channels onto a single packet transport. -type mux struct { - conn packetConn - chanList chanList - - incomingChannels chan NewChannel - - globalSentMu sync.Mutex - globalResponses chan interface{} - incomingRequests chan *Request - - errCond *sync.Cond - err error -} - -// When debugging, each new chanList instantiation has a different -// offset. -var globalOff uint32 - -func (m *mux) Wait() error { - m.errCond.L.Lock() - defer m.errCond.L.Unlock() - for m.err == nil { - m.errCond.Wait() - } - return m.err -} - -// newMux returns a mux that runs over the given connection. -func newMux(p packetConn) *mux { - m := &mux{ - conn: p, - incomingChannels: make(chan NewChannel, chanSize), - globalResponses: make(chan interface{}, 1), - incomingRequests: make(chan *Request, chanSize), - errCond: newCond(), - } - if debugMux { - m.chanList.offset = atomic.AddUint32(&globalOff, 1) - } - - go m.loop() - return m -} - -func (m *mux) sendMessage(msg interface{}) error { - p := Marshal(msg) - if debugMux { - log.Printf("send global(%d): %#v", m.chanList.offset, msg) - } - return m.conn.writePacket(p) -} - -func (m *mux) SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) { - if wantReply { - m.globalSentMu.Lock() - defer m.globalSentMu.Unlock() - } - - if err := m.sendMessage(globalRequestMsg{ - Type: name, - WantReply: wantReply, - Data: payload, - }); err != nil { - return false, nil, err - } - - if !wantReply { - return false, nil, nil - } - - msg, ok := <-m.globalResponses - if !ok { - return false, nil, io.EOF - } - switch msg := msg.(type) { - case *globalRequestFailureMsg: - return false, msg.Data, nil - case *globalRequestSuccessMsg: - return true, msg.Data, nil - default: - return false, nil, fmt.Errorf("ssh: unexpected response to request: %#v", msg) - } -} - -// ackRequest must be called after processing a global request that -// has WantReply set. -func (m *mux) ackRequest(ok bool, data []byte) error { - if ok { - return m.sendMessage(globalRequestSuccessMsg{Data: data}) - } - return m.sendMessage(globalRequestFailureMsg{Data: data}) -} - -func (m *mux) Close() error { - return m.conn.Close() -} - -// loop runs the connection machine. It will process packets until an -// error is encountered. To synchronize on loop exit, use mux.Wait. -func (m *mux) loop() { - var err error - for err == nil { - err = m.onePacket() - } - - for _, ch := range m.chanList.dropAll() { - ch.close() - } - - close(m.incomingChannels) - close(m.incomingRequests) - close(m.globalResponses) - - m.conn.Close() - - m.errCond.L.Lock() - m.err = err - m.errCond.Broadcast() - m.errCond.L.Unlock() - - if debugMux { - log.Println("loop exit", err) - } -} - -// onePacket reads and processes one packet. -func (m *mux) onePacket() error { - packet, err := m.conn.readPacket() - if err != nil { - return err - } - - if debugMux { - if packet[0] == msgChannelData || packet[0] == msgChannelExtendedData { - log.Printf("decoding(%d): data packet - %d bytes", m.chanList.offset, len(packet)) - } else { - p, _ := decode(packet) - log.Printf("decoding(%d): %d %#v - %d bytes", m.chanList.offset, packet[0], p, len(packet)) - } - } - - switch packet[0] { - case msgChannelOpen: - return m.handleChannelOpen(packet) - case msgGlobalRequest, msgRequestSuccess, msgRequestFailure: - return m.handleGlobalPacket(packet) - } - - // assume a channel packet. - if len(packet) < 5 { - return parseError(packet[0]) - } - id := binary.BigEndian.Uint32(packet[1:]) - ch := m.chanList.getChan(id) - if ch == nil { - return fmt.Errorf("ssh: invalid channel %d", id) - } - - return ch.handlePacket(packet) -} - -func (m *mux) handleGlobalPacket(packet []byte) error { - msg, err := decode(packet) - if err != nil { - return err - } - - switch msg := msg.(type) { - case *globalRequestMsg: - m.incomingRequests <- &Request{ - Type: msg.Type, - WantReply: msg.WantReply, - Payload: msg.Data, - mux: m, - } - case *globalRequestSuccessMsg, *globalRequestFailureMsg: - m.globalResponses <- msg - default: - panic(fmt.Sprintf("not a global message %#v", msg)) - } - - return nil -} - -// handleChannelOpen schedules a channel to be Accept()ed. -func (m *mux) handleChannelOpen(packet []byte) error { - var msg channelOpenMsg - if err := Unmarshal(packet, &msg); err != nil { - return err - } - - if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { - failMsg := channelOpenFailureMsg{ - PeersID: msg.PeersID, - Reason: ConnectionFailed, - Message: "invalid request", - Language: "en_US.UTF-8", - } - return m.sendMessage(failMsg) - } - - c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData) - c.remoteId = msg.PeersID - c.maxRemotePayload = msg.MaxPacketSize - c.remoteWin.add(msg.PeersWindow) - m.incomingChannels <- c - return nil -} - -func (m *mux) OpenChannel(chanType string, extra []byte) (Channel, <-chan *Request, error) { - ch, err := m.openChannel(chanType, extra) - if err != nil { - return nil, nil, err - } - - return ch, ch.incomingRequests, nil -} - -func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) { - ch := m.newChannel(chanType, channelOutbound, extra) - - ch.maxIncomingPayload = channelMaxPacket - - open := channelOpenMsg{ - ChanType: chanType, - PeersWindow: ch.myWindow, - MaxPacketSize: ch.maxIncomingPayload, - TypeSpecificData: extra, - PeersID: ch.localId, - } - if err := m.sendMessage(open); err != nil { - return nil, err - } - - switch msg := (<-ch.msg).(type) { - case *channelOpenConfirmMsg: - return ch, nil - case *channelOpenFailureMsg: - return nil, &OpenChannelError{msg.Reason, msg.Message} - default: - return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux_test.go deleted file mode 100644 index d88b64e43b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/mux_test.go +++ /dev/null @@ -1,501 +0,0 @@ -// Copyright 2013 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 ssh - -import ( - "io" - "io/ioutil" - "sync" - "testing" -) - -func muxPair() (*mux, *mux) { - a, b := memPipe() - - s := newMux(a) - c := newMux(b) - - return s, c -} - -// Returns both ends of a channel, and the mux for the the 2nd -// channel. -func channelPair(t *testing.T) (*channel, *channel, *mux) { - c, s := muxPair() - - res := make(chan *channel, 1) - go func() { - newCh, ok := <-s.incomingChannels - if !ok { - t.Fatalf("No incoming channel") - } - if newCh.ChannelType() != "chan" { - t.Fatalf("got type %q want chan", newCh.ChannelType()) - } - ch, _, err := newCh.Accept() - if err != nil { - t.Fatalf("Accept %v", err) - } - res <- ch.(*channel) - }() - - ch, err := c.openChannel("chan", nil) - if err != nil { - t.Fatalf("OpenChannel: %v", err) - } - - return <-res, ch, c -} - -// Test that stderr and stdout can be addressed from different -// goroutines. This is intended for use with the race detector. -func TestMuxChannelExtendedThreadSafety(t *testing.T) { - writer, reader, mux := channelPair(t) - defer writer.Close() - defer reader.Close() - defer mux.Close() - - var wr, rd sync.WaitGroup - magic := "hello world" - - wr.Add(2) - go func() { - io.WriteString(writer, magic) - wr.Done() - }() - go func() { - io.WriteString(writer.Stderr(), magic) - wr.Done() - }() - - rd.Add(2) - go func() { - c, err := ioutil.ReadAll(reader) - if string(c) != magic { - t.Fatalf("stdout read got %q, want %q (error %s)", c, magic, err) - } - rd.Done() - }() - go func() { - c, err := ioutil.ReadAll(reader.Stderr()) - if string(c) != magic { - t.Fatalf("stderr read got %q, want %q (error %s)", c, magic, err) - } - rd.Done() - }() - - wr.Wait() - writer.CloseWrite() - rd.Wait() -} - -func TestMuxReadWrite(t *testing.T) { - s, c, mux := channelPair(t) - defer s.Close() - defer c.Close() - defer mux.Close() - - magic := "hello world" - magicExt := "hello stderr" - go func() { - _, err := s.Write([]byte(magic)) - if err != nil { - t.Fatalf("Write: %v", err) - } - _, err = s.Extended(1).Write([]byte(magicExt)) - if err != nil { - t.Fatalf("Write: %v", err) - } - }() - - var buf [1024]byte - n, err := c.Read(buf[:]) - if err != nil { - t.Fatalf("server Read: %v", err) - } - got := string(buf[:n]) - if got != magic { - t.Fatalf("server: got %q want %q", got, magic) - } - - n, err = c.Extended(1).Read(buf[:]) - if err != nil { - t.Fatalf("server Read: %v", err) - } - - got = string(buf[:n]) - if got != magicExt { - t.Fatalf("server: got %q want %q", got, magic) - } -} - -func TestMuxChannelOverflow(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - writer.Write(make([]byte, 1)) - wDone <- 1 - }() - writer.remoteWin.waitWriterBlocked() - - // Send 1 byte. - packet := make([]byte, 1+4+4+1) - packet[0] = msgChannelData - marshalUint32(packet[1:], writer.remoteId) - marshalUint32(packet[5:], uint32(1)) - packet[9] = 42 - - if err := writer.mux.conn.writePacket(packet); err != nil { - t.Errorf("could not send packet") - } - if _, err := reader.SendRequest("hello", true, nil); err == nil { - t.Errorf("SendRequest succeeded.") - } - <-wDone -} - -func TestMuxChannelCloseWriteUnblock(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - if _, err := writer.Write(make([]byte, 1)); err != io.EOF { - t.Errorf("got %v, want EOF for unblock write", err) - } - wDone <- 1 - }() - - writer.remoteWin.waitWriterBlocked() - reader.Close() - <-wDone -} - -func TestMuxConnectionCloseWriteUnblock(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - if _, err := writer.Write(make([]byte, 1)); err != io.EOF { - t.Errorf("got %v, want EOF for unblock write", err) - } - wDone <- 1 - }() - - writer.remoteWin.waitWriterBlocked() - mux.Close() - <-wDone -} - -func TestMuxReject(t *testing.T) { - client, server := muxPair() - defer server.Close() - defer client.Close() - - go func() { - ch, ok := <-server.incomingChannels - if !ok { - t.Fatalf("Accept") - } - if ch.ChannelType() != "ch" || string(ch.ExtraData()) != "extra" { - t.Fatalf("unexpected channel: %q, %q", ch.ChannelType(), ch.ExtraData()) - } - ch.Reject(RejectionReason(42), "message") - }() - - ch, err := client.openChannel("ch", []byte("extra")) - if ch != nil { - t.Fatal("openChannel not rejected") - } - - ocf, ok := err.(*OpenChannelError) - if !ok { - t.Errorf("got %#v want *OpenChannelError", err) - } else if ocf.Reason != 42 || ocf.Message != "message" { - t.Errorf("got %#v, want {Reason: 42, Message: %q}", ocf, "message") - } - - want := "ssh: rejected: unknown reason 42 (message)" - if err.Error() != want { - t.Errorf("got %q, want %q", err.Error(), want) - } -} - -func TestMuxChannelRequest(t *testing.T) { - client, server, mux := channelPair(t) - defer server.Close() - defer client.Close() - defer mux.Close() - - var received int - var wg sync.WaitGroup - wg.Add(1) - go func() { - for r := range server.incomingRequests { - received++ - r.Reply(r.Type == "yes", nil) - } - wg.Done() - }() - _, err := client.SendRequest("yes", false, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - ok, err := client.SendRequest("yes", true, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - - if !ok { - t.Errorf("SendRequest(yes): %v", ok) - - } - - ok, err = client.SendRequest("no", true, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - if ok { - t.Errorf("SendRequest(no): %v", ok) - - } - - client.Close() - wg.Wait() - - if received != 3 { - t.Errorf("got %d requests, want %d", received, 3) - } -} - -func TestMuxGlobalRequest(t *testing.T) { - clientMux, serverMux := muxPair() - defer serverMux.Close() - defer clientMux.Close() - - var seen bool - go func() { - for r := range serverMux.incomingRequests { - seen = seen || r.Type == "peek" - if r.WantReply { - err := r.Reply(r.Type == "yes", - append([]byte(r.Type), r.Payload...)) - if err != nil { - t.Errorf("AckRequest: %v", err) - } - } - } - }() - - _, _, err := clientMux.SendRequest("peek", false, nil) - if err != nil { - t.Errorf("SendRequest: %v", err) - } - - ok, data, err := clientMux.SendRequest("yes", true, []byte("a")) - if !ok || string(data) != "yesa" || err != nil { - t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", - ok, data, err) - } - if ok, data, err := clientMux.SendRequest("yes", true, []byte("a")); !ok || string(data) != "yesa" || err != nil { - t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", - ok, data, err) - } - - if ok, data, err := clientMux.SendRequest("no", true, []byte("a")); ok || string(data) != "noa" || err != nil { - t.Errorf("SendRequest(\"no\", true, \"a\"): %v %v %v", - ok, data, err) - } - - if !seen { - t.Errorf("never saw 'peek' request") - } -} - -func TestMuxGlobalRequestUnblock(t *testing.T) { - clientMux, serverMux := muxPair() - defer serverMux.Close() - defer clientMux.Close() - - result := make(chan error, 1) - go func() { - _, _, err := clientMux.SendRequest("hello", true, nil) - result <- err - }() - - <-serverMux.incomingRequests - serverMux.conn.Close() - err := <-result - - if err != io.EOF { - t.Errorf("want EOF, got %v", io.EOF) - } -} - -func TestMuxChannelRequestUnblock(t *testing.T) { - a, b, connB := channelPair(t) - defer a.Close() - defer b.Close() - defer connB.Close() - - result := make(chan error, 1) - go func() { - _, err := a.SendRequest("hello", true, nil) - result <- err - }() - - <-b.incomingRequests - connB.conn.Close() - err := <-result - - if err != io.EOF { - t.Errorf("want EOF, got %v", err) - } -} - -func TestMuxCloseChannel(t *testing.T) { - r, w, mux := channelPair(t) - defer mux.Close() - defer r.Close() - defer w.Close() - - result := make(chan error, 1) - go func() { - var b [1024]byte - _, err := r.Read(b[:]) - result <- err - }() - if err := w.Close(); err != nil { - t.Errorf("w.Close: %v", err) - } - - if _, err := w.Write([]byte("hello")); err != io.EOF { - t.Errorf("got err %v, want io.EOF after Close", err) - } - - if err := <-result; err != io.EOF { - t.Errorf("got %v (%T), want io.EOF", err, err) - } -} - -func TestMuxCloseWriteChannel(t *testing.T) { - r, w, mux := channelPair(t) - defer mux.Close() - - result := make(chan error, 1) - go func() { - var b [1024]byte - _, err := r.Read(b[:]) - result <- err - }() - if err := w.CloseWrite(); err != nil { - t.Errorf("w.CloseWrite: %v", err) - } - - if _, err := w.Write([]byte("hello")); err != io.EOF { - t.Errorf("got err %v, want io.EOF after CloseWrite", err) - } - - if err := <-result; err != io.EOF { - t.Errorf("got %v (%T), want io.EOF", err, err) - } -} - -func TestMuxInvalidRecord(t *testing.T) { - a, b := muxPair() - defer a.Close() - defer b.Close() - - packet := make([]byte, 1+4+4+1) - packet[0] = msgChannelData - marshalUint32(packet[1:], 29348723 /* invalid channel id */) - marshalUint32(packet[5:], 1) - packet[9] = 42 - - a.conn.writePacket(packet) - go a.SendRequest("hello", false, nil) - // 'a' wrote an invalid packet, so 'b' has exited. - req, ok := <-b.incomingRequests - if ok { - t.Errorf("got request %#v after receiving invalid packet", req) - } -} - -func TestZeroWindowAdjust(t *testing.T) { - a, b, mux := channelPair(t) - defer a.Close() - defer b.Close() - defer mux.Close() - - go func() { - io.WriteString(a, "hello") - // bogus adjust. - a.sendMessage(windowAdjustMsg{}) - io.WriteString(a, "world") - a.Close() - }() - - want := "helloworld" - c, _ := ioutil.ReadAll(b) - if string(c) != want { - t.Errorf("got %q want %q", c, want) - } -} - -func TestMuxMaxPacketSize(t *testing.T) { - a, b, mux := channelPair(t) - defer a.Close() - defer b.Close() - defer mux.Close() - - large := make([]byte, a.maxRemotePayload+1) - packet := make([]byte, 1+4+4+1+len(large)) - packet[0] = msgChannelData - marshalUint32(packet[1:], a.remoteId) - marshalUint32(packet[5:], uint32(len(large))) - packet[9] = 42 - - if err := a.mux.conn.writePacket(packet); err != nil { - t.Errorf("could not send packet") - } - - go a.SendRequest("hello", false, nil) - - _, ok := <-b.incomingRequests - if ok { - t.Errorf("connection still alive after receiving large packet.") - } -} - -// Don't ship code with debug=true. -func TestDebug(t *testing.T) { - if debugMux { - t.Error("mux debug switched on") - } - if debugHandshake { - t.Error("handshake debug switched on") - } - if debugTransport { - t.Error("transport debug switched on") - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/server.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/server.go deleted file mode 100644 index d0f4825319..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/server.go +++ /dev/null @@ -1,593 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" - "net" - "strings" -) - -// The Permissions type holds fine-grained permissions that are -// specific to a user or a specific authentication method for a user. -// The Permissions value for a successful authentication attempt is -// available in ServerConn, so it can be used to pass information from -// the user-authentication phase to the application layer. -type Permissions struct { - // CriticalOptions indicate restrictions to the default - // permissions, and are typically used in conjunction with - // user certificates. The standard for SSH certificates - // defines "force-command" (only allow the given command to - // execute) and "source-address" (only allow connections from - // the given address). The SSH package currently only enforces - // the "source-address" critical option. It is up to server - // implementations to enforce other critical options, such as - // "force-command", by checking them after the SSH handshake - // is successful. In general, SSH servers should reject - // connections that specify critical options that are unknown - // or not supported. - CriticalOptions map[string]string - - // Extensions are extra functionality that the server may - // offer on authenticated connections. Lack of support for an - // extension does not preclude authenticating a user. Common - // extensions are "permit-agent-forwarding", - // "permit-X11-forwarding". The Go SSH library currently does - // not act on any extension, and it is up to server - // implementations to honor them. Extensions can be used to - // pass data from the authentication callbacks to the server - // application layer. - Extensions map[string]string -} - -// ServerConfig holds server specific configuration data. -type ServerConfig struct { - // Config contains configuration shared between client and server. - Config - - hostKeys []Signer - - // NoClientAuth is true if clients are allowed to connect without - // authenticating. - NoClientAuth bool - - // MaxAuthTries specifies the maximum number of authentication attempts - // permitted per connection. If set to a negative number, the number of - // attempts are unlimited. If set to zero, the number of attempts are limited - // to 6. - MaxAuthTries int - - // PasswordCallback, if non-nil, is called when a user - // attempts to authenticate using a password. - PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) - - // PublicKeyCallback, if non-nil, is called when a client - // offers a public key for authentication. It must return a nil error - // if the given public key can be used to authenticate the - // given user. For example, see CertChecker.Authenticate. A - // call to this function does not guarantee that the key - // offered is in fact used to authenticate. To record any data - // depending on the public key, store it inside a - // Permissions.Extensions entry. - PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) - - // KeyboardInteractiveCallback, if non-nil, is called when - // keyboard-interactive authentication is selected (RFC - // 4256). The client object's Challenge function should be - // used to query the user. The callback may offer multiple - // Challenge rounds. To avoid information leaks, the client - // should be presented a challenge even if the user is - // unknown. - KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error) - - // AuthLogCallback, if non-nil, is called to log all authentication - // attempts. - AuthLogCallback func(conn ConnMetadata, method string, err error) - - // ServerVersion is the version identification string to announce in - // the public handshake. - // If empty, a reasonable default is used. - // Note that RFC 4253 section 4.2 requires that this string start with - // "SSH-2.0-". - ServerVersion string - - // BannerCallback, if present, is called and the return string is sent to - // the client after key exchange completed but before authentication. - BannerCallback func(conn ConnMetadata) string -} - -// AddHostKey adds a private key as a host key. If an existing host -// key exists with the same algorithm, it is overwritten. Each server -// config must have at least one host key. -func (s *ServerConfig) AddHostKey(key Signer) { - for i, k := range s.hostKeys { - if k.PublicKey().Type() == key.PublicKey().Type() { - s.hostKeys[i] = key - return - } - } - - s.hostKeys = append(s.hostKeys, key) -} - -// cachedPubKey contains the results of querying whether a public key is -// acceptable for a user. -type cachedPubKey struct { - user string - pubKeyData []byte - result error - perms *Permissions -} - -const maxCachedPubKeys = 16 - -// pubKeyCache caches tests for public keys. Since SSH clients -// will query whether a public key is acceptable before attempting to -// authenticate with it, we end up with duplicate queries for public -// key validity. The cache only applies to a single ServerConn. -type pubKeyCache struct { - keys []cachedPubKey -} - -// get returns the result for a given user/algo/key tuple. -func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) { - for _, k := range c.keys { - if k.user == user && bytes.Equal(k.pubKeyData, pubKeyData) { - return k, true - } - } - return cachedPubKey{}, false -} - -// add adds the given tuple to the cache. -func (c *pubKeyCache) add(candidate cachedPubKey) { - if len(c.keys) < maxCachedPubKeys { - c.keys = append(c.keys, candidate) - } -} - -// ServerConn is an authenticated SSH connection, as seen from the -// server -type ServerConn struct { - Conn - - // If the succeeding authentication callback returned a - // non-nil Permissions pointer, it is stored here. - Permissions *Permissions -} - -// NewServerConn starts a new SSH server with c as the underlying -// transport. It starts with a handshake and, if the handshake is -// unsuccessful, it closes the connection and returns an error. The -// Request and NewChannel channels must be serviced, or the connection -// will hang. -// -// The returned error may be of type *ServerAuthError for -// authentication errors. -func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error) { - fullConf := *config - fullConf.SetDefaults() - if fullConf.MaxAuthTries == 0 { - fullConf.MaxAuthTries = 6 - } - - s := &connection{ - sshConn: sshConn{conn: c}, - } - perms, err := s.serverHandshake(&fullConf) - if err != nil { - c.Close() - return nil, nil, nil, err - } - return &ServerConn{s, perms}, s.mux.incomingChannels, s.mux.incomingRequests, nil -} - -// signAndMarshal signs the data with the appropriate algorithm, -// and serializes the result in SSH wire format. -func signAndMarshal(k Signer, rand io.Reader, data []byte) ([]byte, error) { - sig, err := k.Sign(rand, data) - if err != nil { - return nil, err - } - - return Marshal(sig), nil -} - -// handshake performs key exchange and user authentication. -func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) { - if len(config.hostKeys) == 0 { - return nil, errors.New("ssh: server has no host keys") - } - - if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil && config.KeyboardInteractiveCallback == nil { - return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") - } - - if config.ServerVersion != "" { - s.serverVersion = []byte(config.ServerVersion) - } else { - s.serverVersion = []byte(packageVersion) - } - var err error - s.clientVersion, err = exchangeVersions(s.sshConn.conn, s.serverVersion) - if err != nil { - return nil, err - } - - tr := newTransport(s.sshConn.conn, config.Rand, false /* not client */) - s.transport = newServerTransport(tr, s.clientVersion, s.serverVersion, config) - - if err := s.transport.waitSession(); err != nil { - return nil, err - } - - // We just did the key change, so the session ID is established. - s.sessionID = s.transport.getSessionID() - - var packet []byte - if packet, err = s.transport.readPacket(); err != nil { - return nil, err - } - - var serviceRequest serviceRequestMsg - if err = Unmarshal(packet, &serviceRequest); err != nil { - return nil, err - } - if serviceRequest.Service != serviceUserAuth { - return nil, errors.New("ssh: requested service '" + serviceRequest.Service + "' before authenticating") - } - serviceAccept := serviceAcceptMsg{ - Service: serviceUserAuth, - } - if err := s.transport.writePacket(Marshal(&serviceAccept)); err != nil { - return nil, err - } - - perms, err := s.serverAuthenticate(config) - if err != nil { - return nil, err - } - s.mux = newMux(s.transport) - return perms, err -} - -func isAcceptableAlgo(algo string) bool { - switch algo { - case KeyAlgoRSA, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: - return true - } - return false -} - -func checkSourceAddress(addr net.Addr, sourceAddrs string) error { - if addr == nil { - return errors.New("ssh: no address known for client, but source-address match required") - } - - tcpAddr, ok := addr.(*net.TCPAddr) - if !ok { - return fmt.Errorf("ssh: remote address %v is not an TCP address when checking source-address match", addr) - } - - for _, sourceAddr := range strings.Split(sourceAddrs, ",") { - if allowedIP := net.ParseIP(sourceAddr); allowedIP != nil { - if allowedIP.Equal(tcpAddr.IP) { - return nil - } - } else { - _, ipNet, err := net.ParseCIDR(sourceAddr) - if err != nil { - return fmt.Errorf("ssh: error parsing source-address restriction %q: %v", sourceAddr, err) - } - - if ipNet.Contains(tcpAddr.IP) { - return nil - } - } - } - - return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr) -} - -// ServerAuthError represents server authentication errors and is -// sometimes returned by NewServerConn. It appends any authentication -// errors that may occur, and is returned if all of the authentication -// methods provided by the user failed to authenticate. -type ServerAuthError struct { - // Errors contains authentication errors returned by the authentication - // callback methods. The first entry is typically ErrNoAuth. - Errors []error -} - -func (l ServerAuthError) Error() string { - var errs []string - for _, err := range l.Errors { - errs = append(errs, err.Error()) - } - return "[" + strings.Join(errs, ", ") + "]" -} - -// ErrNoAuth is the error value returned if no -// authentication method has been passed yet. This happens as a normal -// part of the authentication loop, since the client first tries -// 'none' authentication to discover available methods. -// It is returned in ServerAuthError.Errors from NewServerConn. -var ErrNoAuth = errors.New("ssh: no auth passed yet") - -func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) { - sessionID := s.transport.getSessionID() - var cache pubKeyCache - var perms *Permissions - - authFailures := 0 - var authErrs []error - var displayedBanner bool - -userAuthLoop: - for { - if authFailures >= config.MaxAuthTries && config.MaxAuthTries > 0 { - discMsg := &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - } - - if err := s.transport.writePacket(Marshal(discMsg)); err != nil { - return nil, err - } - - return nil, discMsg - } - - var userAuthReq userAuthRequestMsg - if packet, err := s.transport.readPacket(); err != nil { - if err == io.EOF { - return nil, &ServerAuthError{Errors: authErrs} - } - return nil, err - } else if err = Unmarshal(packet, &userAuthReq); err != nil { - return nil, err - } - - if userAuthReq.Service != serviceSSH { - return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service) - } - - s.user = userAuthReq.User - - if !displayedBanner && config.BannerCallback != nil { - displayedBanner = true - msg := config.BannerCallback(s) - if msg != "" { - bannerMsg := &userAuthBannerMsg{ - Message: msg, - } - if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil { - return nil, err - } - } - } - - perms = nil - authErr := ErrNoAuth - - switch userAuthReq.Method { - case "none": - if config.NoClientAuth { - authErr = nil - } - - // allow initial attempt of 'none' without penalty - if authFailures == 0 { - authFailures-- - } - case "password": - if config.PasswordCallback == nil { - authErr = errors.New("ssh: password auth not configured") - break - } - payload := userAuthReq.Payload - if len(payload) < 1 || payload[0] != 0 { - return nil, parseError(msgUserAuthRequest) - } - payload = payload[1:] - password, payload, ok := parseString(payload) - if !ok || len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - - perms, authErr = config.PasswordCallback(s, password) - case "keyboard-interactive": - if config.KeyboardInteractiveCallback == nil { - authErr = errors.New("ssh: keyboard-interactive auth not configubred") - break - } - - prompter := &sshClientKeyboardInteractive{s} - perms, authErr = config.KeyboardInteractiveCallback(s, prompter.Challenge) - case "publickey": - if config.PublicKeyCallback == nil { - authErr = errors.New("ssh: publickey auth not configured") - break - } - payload := userAuthReq.Payload - if len(payload) < 1 { - return nil, parseError(msgUserAuthRequest) - } - isQuery := payload[0] == 0 - payload = payload[1:] - algoBytes, payload, ok := parseString(payload) - if !ok { - return nil, parseError(msgUserAuthRequest) - } - algo := string(algoBytes) - if !isAcceptableAlgo(algo) { - authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) - break - } - - pubKeyData, payload, ok := parseString(payload) - if !ok { - return nil, parseError(msgUserAuthRequest) - } - - pubKey, err := ParsePublicKey(pubKeyData) - if err != nil { - return nil, err - } - - candidate, ok := cache.get(s.user, pubKeyData) - if !ok { - candidate.user = s.user - candidate.pubKeyData = pubKeyData - candidate.perms, candidate.result = config.PublicKeyCallback(s, pubKey) - if candidate.result == nil && candidate.perms != nil && candidate.perms.CriticalOptions != nil && candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" { - candidate.result = checkSourceAddress( - s.RemoteAddr(), - candidate.perms.CriticalOptions[sourceAddressCriticalOption]) - } - cache.add(candidate) - } - - if isQuery { - // The client can query if the given public key - // would be okay. - - if len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - - if candidate.result == nil { - okMsg := userAuthPubKeyOkMsg{ - Algo: algo, - PubKey: pubKeyData, - } - if err = s.transport.writePacket(Marshal(&okMsg)); err != nil { - return nil, err - } - continue userAuthLoop - } - authErr = candidate.result - } else { - sig, payload, ok := parseSignature(payload) - if !ok || len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - // Ensure the public key algo and signature algo - // are supported. Compare the private key - // algorithm name that corresponds to algo with - // sig.Format. This is usually the same, but - // for certs, the names differ. - if !isAcceptableAlgo(sig.Format) { - break - } - signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) - - if err := pubKey.Verify(signedData, sig); err != nil { - return nil, err - } - - authErr = candidate.result - perms = candidate.perms - } - default: - authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method) - } - - authErrs = append(authErrs, authErr) - - if config.AuthLogCallback != nil { - config.AuthLogCallback(s, userAuthReq.Method, authErr) - } - - if authErr == nil { - break userAuthLoop - } - - authFailures++ - - var failureMsg userAuthFailureMsg - if config.PasswordCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "password") - } - if config.PublicKeyCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "publickey") - } - if config.KeyboardInteractiveCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive") - } - - if len(failureMsg.Methods) == 0 { - return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") - } - - if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil { - return nil, err - } - } - - if err := s.transport.writePacket([]byte{msgUserAuthSuccess}); err != nil { - return nil, err - } - return perms, nil -} - -// sshClientKeyboardInteractive implements a ClientKeyboardInteractive by -// asking the client on the other side of a ServerConn. -type sshClientKeyboardInteractive struct { - *connection -} - -func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) (answers []string, err error) { - if len(questions) != len(echos) { - return nil, errors.New("ssh: echos and questions must have equal length") - } - - var prompts []byte - for i := range questions { - prompts = appendString(prompts, questions[i]) - prompts = appendBool(prompts, echos[i]) - } - - if err := c.transport.writePacket(Marshal(&userAuthInfoRequestMsg{ - Instruction: instruction, - NumPrompts: uint32(len(questions)), - Prompts: prompts, - })); err != nil { - return nil, err - } - - packet, err := c.transport.readPacket() - if err != nil { - return nil, err - } - if packet[0] != msgUserAuthInfoResponse { - return nil, unexpectedMessageError(msgUserAuthInfoResponse, packet[0]) - } - packet = packet[1:] - - n, packet, ok := parseUint32(packet) - if !ok || int(n) != len(questions) { - return nil, parseError(msgUserAuthInfoResponse) - } - - for i := uint32(0); i < n; i++ { - ans, rest, ok := parseString(packet) - if !ok { - return nil, parseError(msgUserAuthInfoResponse) - } - - answers = append(answers, string(ans)) - packet = rest - } - if len(packet) != 0 { - return nil, errors.New("ssh: junk at end of message") - } - - return answers, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session.go deleted file mode 100644 index d3321f6b78..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session.go +++ /dev/null @@ -1,647 +0,0 @@ -// Copyright 2011 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 ssh - -// Session implements an interactive session described in -// "RFC 4254, section 6". - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "sync" -) - -type Signal string - -// POSIX signals as listed in RFC 4254 Section 6.10. -const ( - SIGABRT Signal = "ABRT" - SIGALRM Signal = "ALRM" - SIGFPE Signal = "FPE" - SIGHUP Signal = "HUP" - SIGILL Signal = "ILL" - SIGINT Signal = "INT" - SIGKILL Signal = "KILL" - SIGPIPE Signal = "PIPE" - SIGQUIT Signal = "QUIT" - SIGSEGV Signal = "SEGV" - SIGTERM Signal = "TERM" - SIGUSR1 Signal = "USR1" - SIGUSR2 Signal = "USR2" -) - -var signals = map[Signal]int{ - SIGABRT: 6, - SIGALRM: 14, - SIGFPE: 8, - SIGHUP: 1, - SIGILL: 4, - SIGINT: 2, - SIGKILL: 9, - SIGPIPE: 13, - SIGQUIT: 3, - SIGSEGV: 11, - SIGTERM: 15, -} - -type TerminalModes map[uint8]uint32 - -// POSIX terminal mode flags as listed in RFC 4254 Section 8. -const ( - tty_OP_END = 0 - VINTR = 1 - VQUIT = 2 - VERASE = 3 - VKILL = 4 - VEOF = 5 - VEOL = 6 - VEOL2 = 7 - VSTART = 8 - VSTOP = 9 - VSUSP = 10 - VDSUSP = 11 - VREPRINT = 12 - VWERASE = 13 - VLNEXT = 14 - VFLUSH = 15 - VSWTCH = 16 - VSTATUS = 17 - VDISCARD = 18 - IGNPAR = 30 - PARMRK = 31 - INPCK = 32 - ISTRIP = 33 - INLCR = 34 - IGNCR = 35 - ICRNL = 36 - IUCLC = 37 - IXON = 38 - IXANY = 39 - IXOFF = 40 - IMAXBEL = 41 - ISIG = 50 - ICANON = 51 - XCASE = 52 - ECHO = 53 - ECHOE = 54 - ECHOK = 55 - ECHONL = 56 - NOFLSH = 57 - TOSTOP = 58 - IEXTEN = 59 - ECHOCTL = 60 - ECHOKE = 61 - PENDIN = 62 - OPOST = 70 - OLCUC = 71 - ONLCR = 72 - OCRNL = 73 - ONOCR = 74 - ONLRET = 75 - CS7 = 90 - CS8 = 91 - PARENB = 92 - PARODD = 93 - TTY_OP_ISPEED = 128 - TTY_OP_OSPEED = 129 -) - -// A Session represents a connection to a remote command or shell. -type Session struct { - // Stdin specifies the remote process's standard input. - // If Stdin is nil, the remote process reads from an empty - // bytes.Buffer. - Stdin io.Reader - - // Stdout and Stderr specify the remote process's standard - // output and error. - // - // If either is nil, Run connects the corresponding file - // descriptor to an instance of ioutil.Discard. There is a - // fixed amount of buffering that is shared for the two streams. - // If either blocks it may eventually cause the remote - // command to block. - Stdout io.Writer - Stderr io.Writer - - ch Channel // the channel backing this session - started bool // true once Start, Run or Shell is invoked. - copyFuncs []func() error - errors chan error // one send per copyFunc - - // true if pipe method is active - stdinpipe, stdoutpipe, stderrpipe bool - - // stdinPipeWriter is non-nil if StdinPipe has not been called - // and Stdin was specified by the user; it is the write end of - // a pipe connecting Session.Stdin to the stdin channel. - stdinPipeWriter io.WriteCloser - - exitStatus chan error -} - -// SendRequest sends an out-of-band channel request on the SSH channel -// underlying the session. -func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { - return s.ch.SendRequest(name, wantReply, payload) -} - -func (s *Session) Close() error { - return s.ch.Close() -} - -// RFC 4254 Section 6.4. -type setenvRequest struct { - Name string - Value string -} - -// Setenv sets an environment variable that will be applied to any -// command executed by Shell or Run. -func (s *Session) Setenv(name, value string) error { - msg := setenvRequest{ - Name: name, - Value: value, - } - ok, err := s.ch.SendRequest("env", true, Marshal(&msg)) - if err == nil && !ok { - err = errors.New("ssh: setenv failed") - } - return err -} - -// RFC 4254 Section 6.2. -type ptyRequestMsg struct { - Term string - Columns uint32 - Rows uint32 - Width uint32 - Height uint32 - Modelist string -} - -// RequestPty requests the association of a pty with the session on the remote host. -func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error { - var tm []byte - for k, v := range termmodes { - kv := struct { - Key byte - Val uint32 - }{k, v} - - tm = append(tm, Marshal(&kv)...) - } - tm = append(tm, tty_OP_END) - req := ptyRequestMsg{ - Term: term, - Columns: uint32(w), - Rows: uint32(h), - Width: uint32(w * 8), - Height: uint32(h * 8), - Modelist: string(tm), - } - ok, err := s.ch.SendRequest("pty-req", true, Marshal(&req)) - if err == nil && !ok { - err = errors.New("ssh: pty-req failed") - } - return err -} - -// RFC 4254 Section 6.5. -type subsystemRequestMsg struct { - Subsystem string -} - -// RequestSubsystem requests the association of a subsystem with the session on the remote host. -// A subsystem is a predefined command that runs in the background when the ssh session is initiated -func (s *Session) RequestSubsystem(subsystem string) error { - msg := subsystemRequestMsg{ - Subsystem: subsystem, - } - ok, err := s.ch.SendRequest("subsystem", true, Marshal(&msg)) - if err == nil && !ok { - err = errors.New("ssh: subsystem request failed") - } - return err -} - -// RFC 4254 Section 6.7. -type ptyWindowChangeMsg struct { - Columns uint32 - Rows uint32 - Width uint32 - Height uint32 -} - -// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns. -func (s *Session) WindowChange(h, w int) error { - req := ptyWindowChangeMsg{ - Columns: uint32(w), - Rows: uint32(h), - Width: uint32(w * 8), - Height: uint32(h * 8), - } - _, err := s.ch.SendRequest("window-change", false, Marshal(&req)) - return err -} - -// RFC 4254 Section 6.9. -type signalMsg struct { - Signal string -} - -// Signal sends the given signal to the remote process. -// sig is one of the SIG* constants. -func (s *Session) Signal(sig Signal) error { - msg := signalMsg{ - Signal: string(sig), - } - - _, err := s.ch.SendRequest("signal", false, Marshal(&msg)) - return err -} - -// RFC 4254 Section 6.5. -type execMsg struct { - Command string -} - -// Start runs cmd on the remote host. Typically, the remote -// server passes cmd to the shell for interpretation. -// A Session only accepts one call to Run, Start or Shell. -func (s *Session) Start(cmd string) error { - if s.started { - return errors.New("ssh: session already started") - } - req := execMsg{ - Command: cmd, - } - - ok, err := s.ch.SendRequest("exec", true, Marshal(&req)) - if err == nil && !ok { - err = fmt.Errorf("ssh: command %v failed", cmd) - } - if err != nil { - return err - } - return s.start() -} - -// Run runs cmd on the remote host. Typically, the remote -// server passes cmd to the shell for interpretation. -// A Session only accepts one call to Run, Start, Shell, Output, -// or CombinedOutput. -// -// The returned error is nil if the command runs, has no problems -// copying stdin, stdout, and stderr, and exits with a zero exit -// status. -// -// If the remote server does not send an exit status, an error of type -// *ExitMissingError is returned. If the command completes -// unsuccessfully or is interrupted by a signal, the error is of type -// *ExitError. Other error types may be returned for I/O problems. -func (s *Session) Run(cmd string) error { - err := s.Start(cmd) - if err != nil { - return err - } - return s.Wait() -} - -// Output runs cmd on the remote host and returns its standard output. -func (s *Session) Output(cmd string) ([]byte, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - var b bytes.Buffer - s.Stdout = &b - err := s.Run(cmd) - return b.Bytes(), err -} - -type singleWriter struct { - b bytes.Buffer - mu sync.Mutex -} - -func (w *singleWriter) Write(p []byte) (int, error) { - w.mu.Lock() - defer w.mu.Unlock() - return w.b.Write(p) -} - -// CombinedOutput runs cmd on the remote host and returns its combined -// standard output and standard error. -func (s *Session) CombinedOutput(cmd string) ([]byte, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - if s.Stderr != nil { - return nil, errors.New("ssh: Stderr already set") - } - var b singleWriter - s.Stdout = &b - s.Stderr = &b - err := s.Run(cmd) - return b.b.Bytes(), err -} - -// Shell starts a login shell on the remote host. A Session only -// accepts one call to Run, Start, Shell, Output, or CombinedOutput. -func (s *Session) Shell() error { - if s.started { - return errors.New("ssh: session already started") - } - - ok, err := s.ch.SendRequest("shell", true, nil) - if err == nil && !ok { - return errors.New("ssh: could not start shell") - } - if err != nil { - return err - } - return s.start() -} - -func (s *Session) start() error { - s.started = true - - type F func(*Session) - for _, setupFd := range []F{(*Session).stdin, (*Session).stdout, (*Session).stderr} { - setupFd(s) - } - - s.errors = make(chan error, len(s.copyFuncs)) - for _, fn := range s.copyFuncs { - go func(fn func() error) { - s.errors <- fn() - }(fn) - } - return nil -} - -// Wait waits for the remote command to exit. -// -// The returned error is nil if the command runs, has no problems -// copying stdin, stdout, and stderr, and exits with a zero exit -// status. -// -// If the remote server does not send an exit status, an error of type -// *ExitMissingError is returned. If the command completes -// unsuccessfully or is interrupted by a signal, the error is of type -// *ExitError. Other error types may be returned for I/O problems. -func (s *Session) Wait() error { - if !s.started { - return errors.New("ssh: session not started") - } - waitErr := <-s.exitStatus - - if s.stdinPipeWriter != nil { - s.stdinPipeWriter.Close() - } - var copyError error - for range s.copyFuncs { - if err := <-s.errors; err != nil && copyError == nil { - copyError = err - } - } - if waitErr != nil { - return waitErr - } - return copyError -} - -func (s *Session) wait(reqs <-chan *Request) error { - wm := Waitmsg{status: -1} - // Wait for msg channel to be closed before returning. - for msg := range reqs { - switch msg.Type { - case "exit-status": - wm.status = int(binary.BigEndian.Uint32(msg.Payload)) - case "exit-signal": - var sigval struct { - Signal string - CoreDumped bool - Error string - Lang string - } - if err := Unmarshal(msg.Payload, &sigval); err != nil { - return err - } - - // Must sanitize strings? - wm.signal = sigval.Signal - wm.msg = sigval.Error - wm.lang = sigval.Lang - default: - // This handles keepalives and matches - // OpenSSH's behaviour. - if msg.WantReply { - msg.Reply(false, nil) - } - } - } - if wm.status == 0 { - return nil - } - if wm.status == -1 { - // exit-status was never sent from server - if wm.signal == "" { - // signal was not sent either. RFC 4254 - // section 6.10 recommends against this - // behavior, but it is allowed, so we let - // clients handle it. - return &ExitMissingError{} - } - wm.status = 128 - if _, ok := signals[Signal(wm.signal)]; ok { - wm.status += signals[Signal(wm.signal)] - } - } - - return &ExitError{wm} -} - -// ExitMissingError is returned if a session is torn down cleanly, but -// the server sends no confirmation of the exit status. -type ExitMissingError struct{} - -func (e *ExitMissingError) Error() string { - return "wait: remote command exited without exit status or exit signal" -} - -func (s *Session) stdin() { - if s.stdinpipe { - return - } - var stdin io.Reader - if s.Stdin == nil { - stdin = new(bytes.Buffer) - } else { - r, w := io.Pipe() - go func() { - _, err := io.Copy(w, s.Stdin) - w.CloseWithError(err) - }() - stdin, s.stdinPipeWriter = r, w - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.ch, stdin) - if err1 := s.ch.CloseWrite(); err == nil && err1 != io.EOF { - err = err1 - } - return err - }) -} - -func (s *Session) stdout() { - if s.stdoutpipe { - return - } - if s.Stdout == nil { - s.Stdout = ioutil.Discard - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.Stdout, s.ch) - return err - }) -} - -func (s *Session) stderr() { - if s.stderrpipe { - return - } - if s.Stderr == nil { - s.Stderr = ioutil.Discard - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.Stderr, s.ch.Stderr()) - return err - }) -} - -// sessionStdin reroutes Close to CloseWrite. -type sessionStdin struct { - io.Writer - ch Channel -} - -func (s *sessionStdin) Close() error { - return s.ch.CloseWrite() -} - -// StdinPipe returns a pipe that will be connected to the -// remote command's standard input when the command starts. -func (s *Session) StdinPipe() (io.WriteCloser, error) { - if s.Stdin != nil { - return nil, errors.New("ssh: Stdin already set") - } - if s.started { - return nil, errors.New("ssh: StdinPipe after process started") - } - s.stdinpipe = true - return &sessionStdin{s.ch, s.ch}, nil -} - -// StdoutPipe returns a pipe that will be connected to the -// remote command's standard output when the command starts. -// There is a fixed amount of buffering that is shared between -// stdout and stderr streams. If the StdoutPipe reader is -// not serviced fast enough it may eventually cause the -// remote command to block. -func (s *Session) StdoutPipe() (io.Reader, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - if s.started { - return nil, errors.New("ssh: StdoutPipe after process started") - } - s.stdoutpipe = true - return s.ch, nil -} - -// StderrPipe returns a pipe that will be connected to the -// remote command's standard error when the command starts. -// There is a fixed amount of buffering that is shared between -// stdout and stderr streams. If the StderrPipe reader is -// not serviced fast enough it may eventually cause the -// remote command to block. -func (s *Session) StderrPipe() (io.Reader, error) { - if s.Stderr != nil { - return nil, errors.New("ssh: Stderr already set") - } - if s.started { - return nil, errors.New("ssh: StderrPipe after process started") - } - s.stderrpipe = true - return s.ch.Stderr(), nil -} - -// newSession returns a new interactive session on the remote host. -func newSession(ch Channel, reqs <-chan *Request) (*Session, error) { - s := &Session{ - ch: ch, - } - s.exitStatus = make(chan error, 1) - go func() { - s.exitStatus <- s.wait(reqs) - }() - - return s, nil -} - -// An ExitError reports unsuccessful completion of a remote command. -type ExitError struct { - Waitmsg -} - -func (e *ExitError) Error() string { - return e.Waitmsg.String() -} - -// Waitmsg stores the information about an exited remote command -// as reported by Wait. -type Waitmsg struct { - status int - signal string - msg string - lang string -} - -// ExitStatus returns the exit status of the remote command. -func (w Waitmsg) ExitStatus() int { - return w.status -} - -// Signal returns the exit signal of the remote command if -// it was terminated violently. -func (w Waitmsg) Signal() string { - return w.signal -} - -// Msg returns the exit message given by the remote command -func (w Waitmsg) Msg() string { - return w.msg -} - -// Lang returns the language tag. See RFC 3066 -func (w Waitmsg) Lang() string { - return w.lang -} - -func (w Waitmsg) String() string { - str := fmt.Sprintf("Process exited with status %v", w.status) - if w.signal != "" { - str += fmt.Sprintf(" from signal %v", w.signal) - } - if w.msg != "" { - str += fmt.Sprintf(". Reason was: %v", w.msg) - } - return str -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session_test.go deleted file mode 100644 index 7e42bbdb1d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/session_test.go +++ /dev/null @@ -1,774 +0,0 @@ -// Copyright 2011 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 ssh - -// Session tests. - -import ( - "bytes" - crypto_rand "crypto/rand" - "errors" - "io" - "io/ioutil" - "math/rand" - "net" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal" -) - -type serverType func(Channel, <-chan *Request, *testing.T) - -// dial constructs a new test server and returns a *ClientConn. -func dial(handler serverType, t *testing.T) *Client { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - go func() { - defer c1.Close() - conf := ServerConfig{ - NoClientAuth: true, - } - conf.AddHostKey(testSigners["rsa"]) - - _, chans, reqs, err := NewServerConn(c1, &conf) - if err != nil { - t.Fatalf("Unable to handshake: %v", err) - } - go DiscardRequests(reqs) - - for newCh := range chans { - if newCh.ChannelType() != "session" { - newCh.Reject(UnknownChannelType, "unknown channel type") - continue - } - - ch, inReqs, err := newCh.Accept() - if err != nil { - t.Errorf("Accept: %v", err) - continue - } - go func() { - handler(ch, inReqs, t) - }() - } - }() - - config := &ClientConfig{ - User: "testuser", - HostKeyCallback: InsecureIgnoreHostKey(), - } - - conn, chans, reqs, err := NewClientConn(c2, "", config) - if err != nil { - t.Fatalf("unable to dial remote side: %v", err) - } - - return NewClient(conn, chans, reqs) -} - -// Test a simple string is returned to session.Stdout. -func TestSessionShell(t *testing.T) { - conn := dial(shellHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - stdout := new(bytes.Buffer) - session.Stdout = stdout - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %s", err) - } - if err := session.Wait(); err != nil { - t.Fatalf("Remote command did not exit cleanly: %v", err) - } - actual := stdout.String() - if actual != "golang" { - t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) - } -} - -// TODO(dfc) add support for Std{in,err}Pipe when the Server supports it. - -// Test a simple string is returned via StdoutPipe. -func TestSessionStdoutPipe(t *testing.T) { - conn := dial(shellHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("Unable to request StdoutPipe(): %v", err) - } - var buf bytes.Buffer - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - done := make(chan bool, 1) - go func() { - if _, err := io.Copy(&buf, stdout); err != nil { - t.Errorf("Copy of stdout failed: %v", err) - } - done <- true - }() - if err := session.Wait(); err != nil { - t.Fatalf("Remote command did not exit cleanly: %v", err) - } - <-done - actual := buf.String() - if actual != "golang" { - t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) - } -} - -// Test that a simple string is returned via the Output helper, -// and that stderr is discarded. -func TestSessionOutput(t *testing.T) { - conn := dial(fixedOutputHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - buf, err := session.Output("") // cmd is ignored by fixedOutputHandler - if err != nil { - t.Error("Remote command did not exit cleanly:", err) - } - w := "this-is-stdout." - g := string(buf) - if g != w { - t.Error("Remote command did not return expected string:") - t.Logf("want %q", w) - t.Logf("got %q", g) - } -} - -// Test that both stdout and stderr are returned -// via the CombinedOutput helper. -func TestSessionCombinedOutput(t *testing.T) { - conn := dial(fixedOutputHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - buf, err := session.CombinedOutput("") // cmd is ignored by fixedOutputHandler - if err != nil { - t.Error("Remote command did not exit cleanly:", err) - } - const stdout = "this-is-stdout." - const stderr = "this-is-stderr." - g := string(buf) - if g != stdout+stderr && g != stderr+stdout { - t.Error("Remote command did not return expected string:") - t.Logf("want %q, or %q", stdout+stderr, stderr+stdout) - t.Logf("got %q", g) - } -} - -// Test non-0 exit status is returned correctly. -func TestExitStatusNonZero(t *testing.T) { - conn := dial(exitStatusNonZeroHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.ExitStatus() != 15 { - t.Fatalf("expected command to exit with 15 but got %v", e.ExitStatus()) - } -} - -// Test 0 exit status is returned correctly. -func TestExitStatusZero(t *testing.T) { - conn := dial(exitStatusZeroHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err != nil { - t.Fatalf("expected nil but got %v", err) - } -} - -// Test exit signal and status are both returned correctly. -func TestExitSignalAndStatus(t *testing.T) { - conn := dial(exitSignalAndStatusHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "TERM" || e.ExitStatus() != 15 { - t.Fatalf("expected command to exit with signal TERM and status 15 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -// Test exit signal and status are both returned correctly. -func TestKnownExitSignalOnly(t *testing.T) { - conn := dial(exitSignalHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "TERM" || e.ExitStatus() != 143 { - t.Fatalf("expected command to exit with signal TERM and status 143 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -// Test exit signal and status are both returned correctly. -func TestUnknownExitSignal(t *testing.T) { - conn := dial(exitSignalUnknownHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "SYS" || e.ExitStatus() != 128 { - t.Fatalf("expected command to exit with signal SYS and status 128 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -func TestExitWithoutStatusOrSignal(t *testing.T) { - conn := dial(exitWithoutSignalOrStatus, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - if _, ok := err.(*ExitMissingError); !ok { - t.Fatalf("got %T want *ExitMissingError", err) - } -} - -// windowTestBytes is the number of bytes that we'll send to the SSH server. -const windowTestBytes = 16000 * 200 - -// TestServerWindow writes random data to the server. The server is expected to echo -// the same data back, which is compared against the original. -func TestServerWindow(t *testing.T) { - origBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) - io.CopyN(origBuf, crypto_rand.Reader, windowTestBytes) - origBytes := origBuf.Bytes() - - conn := dial(echoHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - result := make(chan []byte) - - go func() { - defer close(result) - echoedBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) - serverStdout, err := session.StdoutPipe() - if err != nil { - t.Errorf("StdoutPipe failed: %v", err) - return - } - n, err := copyNRandomly("stdout", echoedBuf, serverStdout, windowTestBytes) - if err != nil && err != io.EOF { - t.Errorf("Read only %d bytes from server, expected %d: %v", n, windowTestBytes, err) - } - result <- echoedBuf.Bytes() - }() - - serverStdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("StdinPipe failed: %v", err) - } - written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes) - if err != nil { - t.Fatalf("failed to copy origBuf to serverStdin: %v", err) - } - if written != windowTestBytes { - t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes) - } - - echoedBytes := <-result - - if !bytes.Equal(origBytes, echoedBytes) { - t.Fatalf("Echoed buffer differed from original, orig %d, echoed %d", len(origBytes), len(echoedBytes)) - } -} - -// Verify the client can handle a keepalive packet from the server. -func TestClientHandlesKeepalives(t *testing.T) { - conn := dial(channelKeepaliveSender, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err != nil { - t.Fatalf("expected nil but got: %v", err) - } -} - -type exitStatusMsg struct { - Status uint32 -} - -type exitSignalMsg struct { - Signal string - CoreDumped bool - Errmsg string - Lang string -} - -func handleTerminalRequests(in <-chan *Request) { - for req := range in { - ok := false - switch req.Type { - case "shell": - ok = true - if len(req.Payload) > 0 { - // We don't accept any commands, only the default shell. - ok = false - } - case "env": - ok = true - } - req.Reply(ok, nil) - } -} - -func newServerShell(ch Channel, in <-chan *Request, prompt string) *terminal.Terminal { - term := terminal.NewTerminal(ch, prompt) - go handleTerminalRequests(in) - return term -} - -func exitStatusZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - // this string is returned to stdout - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(0, ch, t) -} - -func exitStatusNonZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(15, ch, t) -} - -func exitSignalAndStatusHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(15, ch, t) - sendSignal("TERM", ch, t) -} - -func exitSignalHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendSignal("TERM", ch, t) -} - -func exitSignalUnknownHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendSignal("SYS", ch, t) -} - -func exitWithoutSignalOrStatus(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) -} - -func shellHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - // this string is returned to stdout - shell := newServerShell(ch, in, "golang") - readLine(shell, t) - sendStatus(0, ch, t) -} - -// Ignores the command, writes fixed strings to stderr and stdout. -// Strings are "this-is-stdout." and "this-is-stderr.". -func fixedOutputHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - _, err := ch.Read(nil) - - req, ok := <-in - if !ok { - t.Fatalf("error: expected channel request, got: %#v", err) - return - } - - // ignore request, always send some text - req.Reply(true, nil) - - _, err = io.WriteString(ch, "this-is-stdout.") - if err != nil { - t.Fatalf("error writing on server: %v", err) - } - _, err = io.WriteString(ch.Stderr(), "this-is-stderr.") - if err != nil { - t.Fatalf("error writing on server: %v", err) - } - sendStatus(0, ch, t) -} - -func readLine(shell *terminal.Terminal, t *testing.T) { - if _, err := shell.ReadLine(); err != nil && err != io.EOF { - t.Errorf("unable to read line: %v", err) - } -} - -func sendStatus(status uint32, ch Channel, t *testing.T) { - msg := exitStatusMsg{ - Status: status, - } - if _, err := ch.SendRequest("exit-status", false, Marshal(&msg)); err != nil { - t.Errorf("unable to send status: %v", err) - } -} - -func sendSignal(signal string, ch Channel, t *testing.T) { - sig := exitSignalMsg{ - Signal: signal, - CoreDumped: false, - Errmsg: "Process terminated", - Lang: "en-GB-oed", - } - if _, err := ch.SendRequest("exit-signal", false, Marshal(&sig)); err != nil { - t.Errorf("unable to send signal: %v", err) - } -} - -func discardHandler(ch Channel, t *testing.T) { - defer ch.Close() - io.Copy(ioutil.Discard, ch) -} - -func echoHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - if n, err := copyNRandomly("echohandler", ch, ch, windowTestBytes); err != nil { - t.Errorf("short write, wrote %d, expected %d: %v ", n, windowTestBytes, err) - } -} - -// copyNRandomly copies n bytes from src to dst. It uses a variable, and random, -// buffer size to exercise more code paths. -func copyNRandomly(title string, dst io.Writer, src io.Reader, n int) (int, error) { - var ( - buf = make([]byte, 32*1024) - written int - remaining = n - ) - for remaining > 0 { - l := rand.Intn(1 << 15) - if remaining < l { - l = remaining - } - nr, er := src.Read(buf[:l]) - nw, ew := dst.Write(buf[:nr]) - remaining -= nw - written += nw - if ew != nil { - return written, ew - } - if nr != nw { - return written, io.ErrShortWrite - } - if er != nil && er != io.EOF { - return written, er - } - } - return written, nil -} - -func channelKeepaliveSender(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - if _, err := ch.SendRequest("keepalive@openssh.com", true, nil); err != nil { - t.Errorf("unable to send channel keepalive request: %v", err) - } - sendStatus(0, ch, t) -} - -func TestClientWriteEOF(t *testing.T) { - conn := dial(simpleEchoHandler, t) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - stdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("StdinPipe failed: %v", err) - } - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("StdoutPipe failed: %v", err) - } - - data := []byte(`0000`) - _, err = stdin.Write(data) - if err != nil { - t.Fatalf("Write failed: %v", err) - } - stdin.Close() - - res, err := ioutil.ReadAll(stdout) - if err != nil { - t.Fatalf("Read failed: %v", err) - } - - if !bytes.Equal(data, res) { - t.Fatalf("Read differed from write, wrote: %v, read: %v", data, res) - } -} - -func simpleEchoHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - data, err := ioutil.ReadAll(ch) - if err != nil { - t.Errorf("handler read error: %v", err) - } - _, err = ch.Write(data) - if err != nil { - t.Errorf("handler write error: %v", err) - } -} - -func TestSessionID(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serverID := make(chan []byte, 1) - clientID := make(chan []byte, 1) - - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["ecdsa"]) - clientConf := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - User: "user", - } - - go func() { - conn, chans, reqs, err := NewServerConn(c1, serverConf) - if err != nil { - t.Fatalf("server handshake: %v", err) - } - serverID <- conn.SessionID() - go DiscardRequests(reqs) - for ch := range chans { - ch.Reject(Prohibited, "") - } - }() - - go func() { - conn, chans, reqs, err := NewClientConn(c2, "", clientConf) - if err != nil { - t.Fatalf("client handshake: %v", err) - } - clientID <- conn.SessionID() - go DiscardRequests(reqs) - for ch := range chans { - ch.Reject(Prohibited, "") - } - }() - - s := <-serverID - c := <-clientID - if bytes.Compare(s, c) != 0 { - t.Errorf("server session ID (%x) != client session ID (%x)", s, c) - } else if len(s) == 0 { - t.Errorf("client and server SessionID were empty.") - } -} - -type noReadConn struct { - readSeen bool - net.Conn -} - -func (c *noReadConn) Close() error { - return nil -} - -func (c *noReadConn) Read(b []byte) (int, error) { - c.readSeen = true - return 0, errors.New("noReadConn error") -} - -func TestInvalidServerConfiguration(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serveConn := noReadConn{Conn: c1} - serverConf := &ServerConfig{} - - NewServerConn(&serveConn, serverConf) - if serveConn.readSeen { - t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing host key") - } - - serverConf.AddHostKey(testSigners["ecdsa"]) - - NewServerConn(&serveConn, serverConf) - if serveConn.readSeen { - t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing authentication method") - } -} - -func TestHostKeyAlgorithms(t *testing.T) { - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.AddHostKey(testSigners["ecdsa"]) - - connect := func(clientConf *ClientConfig, want string) { - var alg string - clientConf.HostKeyCallback = func(h string, a net.Addr, key PublicKey) error { - alg = key.Type() - return nil - } - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, serverConf) - _, _, _, err = NewClientConn(c2, "", clientConf) - if err != nil { - t.Fatalf("NewClientConn: %v", err) - } - if alg != want { - t.Errorf("selected key algorithm %s, want %s", alg, want) - } - } - - // By default, we get the preferred algorithm, which is ECDSA 256. - - clientConf := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - } - connect(clientConf, KeyAlgoECDSA256) - - // Client asks for RSA explicitly. - clientConf.HostKeyAlgorithms = []string{KeyAlgoRSA} - connect(clientConf, KeyAlgoRSA) - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, serverConf) - clientConf.HostKeyAlgorithms = []string{"nonexistent-hostkey-algo"} - _, _, _, err = NewClientConn(c2, "", clientConf) - if err == nil { - t.Fatal("succeeded connecting with unknown hostkey algorithm") - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/streamlocal.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/streamlocal.go deleted file mode 100644 index b171b330bc..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/streamlocal.go +++ /dev/null @@ -1,116 +0,0 @@ -package ssh - -import ( - "errors" - "io" - "net" -) - -// streamLocalChannelOpenDirectMsg is a struct used for SSH_MSG_CHANNEL_OPEN message -// with "direct-streamlocal@openssh.com" string. -// -// See openssh-portable/PROTOCOL, section 2.4. connection: Unix domain socket forwarding -// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL#L235 -type streamLocalChannelOpenDirectMsg struct { - socketPath string - reserved0 string - reserved1 uint32 -} - -// forwardedStreamLocalPayload is a struct used for SSH_MSG_CHANNEL_OPEN message -// with "forwarded-streamlocal@openssh.com" string. -type forwardedStreamLocalPayload struct { - SocketPath string - Reserved0 string -} - -// streamLocalChannelForwardMsg is a struct used for SSH2_MSG_GLOBAL_REQUEST message -// with "streamlocal-forward@openssh.com"/"cancel-streamlocal-forward@openssh.com" string. -type streamLocalChannelForwardMsg struct { - socketPath string -} - -// ListenUnix is similar to ListenTCP but uses a Unix domain socket. -func (c *Client) ListenUnix(socketPath string) (net.Listener, error) { - c.handleForwardsOnce.Do(c.handleForwards) - m := streamLocalChannelForwardMsg{ - socketPath, - } - // send message - ok, _, err := c.SendRequest("streamlocal-forward@openssh.com", true, Marshal(&m)) - if err != nil { - return nil, err - } - if !ok { - return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer") - } - ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"}) - - return &unixListener{socketPath, c, ch}, nil -} - -func (c *Client) dialStreamLocal(socketPath string) (Channel, error) { - msg := streamLocalChannelOpenDirectMsg{ - socketPath: socketPath, - } - ch, in, err := c.OpenChannel("direct-streamlocal@openssh.com", Marshal(&msg)) - if err != nil { - return nil, err - } - go DiscardRequests(in) - return ch, err -} - -type unixListener struct { - socketPath string - - conn *Client - in <-chan forward -} - -// Accept waits for and returns the next connection to the listener. -func (l *unixListener) Accept() (net.Conn, error) { - s, ok := <-l.in - if !ok { - return nil, io.EOF - } - ch, incoming, err := s.newCh.Accept() - if err != nil { - return nil, err - } - go DiscardRequests(incoming) - - return &chanConn{ - Channel: ch, - laddr: &net.UnixAddr{ - Name: l.socketPath, - Net: "unix", - }, - raddr: &net.UnixAddr{ - Name: "@", - Net: "unix", - }, - }, nil -} - -// Close closes the listener. -func (l *unixListener) Close() error { - // this also closes the listener. - l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"}) - m := streamLocalChannelForwardMsg{ - l.socketPath, - } - ok, _, err := l.conn.SendRequest("cancel-streamlocal-forward@openssh.com", true, Marshal(&m)) - if err == nil && !ok { - err = errors.New("ssh: cancel-streamlocal-forward@openssh.com failed") - } - return err -} - -// Addr returns the listener's network address. -func (l *unixListener) Addr() net.Addr { - return &net.UnixAddr{ - Name: l.socketPath, - Net: "unix", - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip.go deleted file mode 100644 index 80d35f5ec1..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip.go +++ /dev/null @@ -1,474 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "errors" - "fmt" - "io" - "math/rand" - "net" - "strconv" - "strings" - "sync" - "time" -) - -// Listen requests the remote peer open a listening socket on -// addr. Incoming connections will be available by calling Accept on -// the returned net.Listener. The listener must be serviced, or the -// SSH connection may hang. -// N must be "tcp", "tcp4", "tcp6", or "unix". -func (c *Client) Listen(n, addr string) (net.Listener, error) { - switch n { - case "tcp", "tcp4", "tcp6": - laddr, err := net.ResolveTCPAddr(n, addr) - if err != nil { - return nil, err - } - return c.ListenTCP(laddr) - case "unix": - return c.ListenUnix(addr) - default: - return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) - } -} - -// Automatic port allocation is broken with OpenSSH before 6.0. See -// also https://bugzilla.mindrot.org/show_bug.cgi?id=2017. In -// particular, OpenSSH 5.9 sends a channelOpenMsg with port number 0, -// rather than the actual port number. This means you can never open -// two different listeners with auto allocated ports. We work around -// this by trying explicit ports until we succeed. - -const openSSHPrefix = "OpenSSH_" - -var portRandomizer = rand.New(rand.NewSource(time.Now().UnixNano())) - -// isBrokenOpenSSHVersion returns true if the given version string -// specifies a version of OpenSSH that is known to have a bug in port -// forwarding. -func isBrokenOpenSSHVersion(versionStr string) bool { - i := strings.Index(versionStr, openSSHPrefix) - if i < 0 { - return false - } - i += len(openSSHPrefix) - j := i - for ; j < len(versionStr); j++ { - if versionStr[j] < '0' || versionStr[j] > '9' { - break - } - } - version, _ := strconv.Atoi(versionStr[i:j]) - return version < 6 -} - -// autoPortListenWorkaround simulates automatic port allocation by -// trying random ports repeatedly. -func (c *Client) autoPortListenWorkaround(laddr *net.TCPAddr) (net.Listener, error) { - var sshListener net.Listener - var err error - const tries = 10 - for i := 0; i < tries; i++ { - addr := *laddr - addr.Port = 1024 + portRandomizer.Intn(60000) - sshListener, err = c.ListenTCP(&addr) - if err == nil { - laddr.Port = addr.Port - return sshListener, err - } - } - return nil, fmt.Errorf("ssh: listen on random port failed after %d tries: %v", tries, err) -} - -// RFC 4254 7.1 -type channelForwardMsg struct { - addr string - rport uint32 -} - -// handleForwards starts goroutines handling forwarded connections. -// It's called on first use by (*Client).ListenTCP to not launch -// goroutines until needed. -func (c *Client) handleForwards() { - go c.forwards.handleChannels(c.HandleChannelOpen("forwarded-tcpip")) - go c.forwards.handleChannels(c.HandleChannelOpen("forwarded-streamlocal@openssh.com")) -} - -// ListenTCP requests the remote peer open a listening socket -// on laddr. Incoming connections will be available by calling -// Accept on the returned net.Listener. -func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) { - c.handleForwardsOnce.Do(c.handleForwards) - if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) { - return c.autoPortListenWorkaround(laddr) - } - - m := channelForwardMsg{ - laddr.IP.String(), - uint32(laddr.Port), - } - // send message - ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m)) - if err != nil { - return nil, err - } - if !ok { - return nil, errors.New("ssh: tcpip-forward request denied by peer") - } - - // If the original port was 0, then the remote side will - // supply a real port number in the response. - if laddr.Port == 0 { - var p struct { - Port uint32 - } - if err := Unmarshal(resp, &p); err != nil { - return nil, err - } - laddr.Port = int(p.Port) - } - - // Register this forward, using the port number we obtained. - ch := c.forwards.add(laddr) - - return &tcpListener{laddr, c, ch}, nil -} - -// forwardList stores a mapping between remote -// forward requests and the tcpListeners. -type forwardList struct { - sync.Mutex - entries []forwardEntry -} - -// forwardEntry represents an established mapping of a laddr on a -// remote ssh server to a channel connected to a tcpListener. -type forwardEntry struct { - laddr net.Addr - c chan forward -} - -// forward represents an incoming forwarded tcpip connection. The -// arguments to add/remove/lookup should be address as specified in -// the original forward-request. -type forward struct { - newCh NewChannel // the ssh client channel underlying this forward - raddr net.Addr // the raddr of the incoming connection -} - -func (l *forwardList) add(addr net.Addr) chan forward { - l.Lock() - defer l.Unlock() - f := forwardEntry{ - laddr: addr, - c: make(chan forward, 1), - } - l.entries = append(l.entries, f) - return f.c -} - -// See RFC 4254, section 7.2 -type forwardedTCPPayload struct { - Addr string - Port uint32 - OriginAddr string - OriginPort uint32 -} - -// parseTCPAddr parses the originating address from the remote into a *net.TCPAddr. -func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) { - if port == 0 || port > 65535 { - return nil, fmt.Errorf("ssh: port number out of range: %d", port) - } - ip := net.ParseIP(string(addr)) - if ip == nil { - return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr) - } - return &net.TCPAddr{IP: ip, Port: int(port)}, nil -} - -func (l *forwardList) handleChannels(in <-chan NewChannel) { - for ch := range in { - var ( - laddr net.Addr - raddr net.Addr - err error - ) - switch channelType := ch.ChannelType(); channelType { - case "forwarded-tcpip": - var payload forwardedTCPPayload - if err = Unmarshal(ch.ExtraData(), &payload); err != nil { - ch.Reject(ConnectionFailed, "could not parse forwarded-tcpip payload: "+err.Error()) - continue - } - - // RFC 4254 section 7.2 specifies that incoming - // addresses should list the address, in string - // format. It is implied that this should be an IP - // address, as it would be impossible to connect to it - // otherwise. - laddr, err = parseTCPAddr(payload.Addr, payload.Port) - if err != nil { - ch.Reject(ConnectionFailed, err.Error()) - continue - } - raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort) - if err != nil { - ch.Reject(ConnectionFailed, err.Error()) - continue - } - - case "forwarded-streamlocal@openssh.com": - var payload forwardedStreamLocalPayload - if err = Unmarshal(ch.ExtraData(), &payload); err != nil { - ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error()) - continue - } - laddr = &net.UnixAddr{ - Name: payload.SocketPath, - Net: "unix", - } - raddr = &net.UnixAddr{ - Name: "@", - Net: "unix", - } - default: - panic(fmt.Errorf("ssh: unknown channel type %s", channelType)) - } - if ok := l.forward(laddr, raddr, ch); !ok { - // Section 7.2, implementations MUST reject spurious incoming - // connections. - ch.Reject(Prohibited, "no forward for address") - continue - } - - } -} - -// remove removes the forward entry, and the channel feeding its -// listener. -func (l *forwardList) remove(addr net.Addr) { - l.Lock() - defer l.Unlock() - for i, f := range l.entries { - if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() { - l.entries = append(l.entries[:i], l.entries[i+1:]...) - close(f.c) - return - } - } -} - -// closeAll closes and clears all forwards. -func (l *forwardList) closeAll() { - l.Lock() - defer l.Unlock() - for _, f := range l.entries { - close(f.c) - } - l.entries = nil -} - -func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool { - l.Lock() - defer l.Unlock() - for _, f := range l.entries { - if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() { - f.c <- forward{newCh: ch, raddr: raddr} - return true - } - } - return false -} - -type tcpListener struct { - laddr *net.TCPAddr - - conn *Client - in <-chan forward -} - -// Accept waits for and returns the next connection to the listener. -func (l *tcpListener) Accept() (net.Conn, error) { - s, ok := <-l.in - if !ok { - return nil, io.EOF - } - ch, incoming, err := s.newCh.Accept() - if err != nil { - return nil, err - } - go DiscardRequests(incoming) - - return &chanConn{ - Channel: ch, - laddr: l.laddr, - raddr: s.raddr, - }, nil -} - -// Close closes the listener. -func (l *tcpListener) Close() error { - m := channelForwardMsg{ - l.laddr.IP.String(), - uint32(l.laddr.Port), - } - - // this also closes the listener. - l.conn.forwards.remove(l.laddr) - ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m)) - if err == nil && !ok { - err = errors.New("ssh: cancel-tcpip-forward failed") - } - return err -} - -// Addr returns the listener's network address. -func (l *tcpListener) Addr() net.Addr { - return l.laddr -} - -// Dial initiates a connection to the addr from the remote host. -// The resulting connection has a zero LocalAddr() and RemoteAddr(). -func (c *Client) Dial(n, addr string) (net.Conn, error) { - var ch Channel - switch n { - case "tcp", "tcp4", "tcp6": - // Parse the address into host and numeric port. - host, portString, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - port, err := strconv.ParseUint(portString, 10, 16) - if err != nil { - return nil, err - } - ch, err = c.dial(net.IPv4zero.String(), 0, host, int(port)) - if err != nil { - return nil, err - } - // Use a zero address for local and remote address. - zeroAddr := &net.TCPAddr{ - IP: net.IPv4zero, - Port: 0, - } - return &chanConn{ - Channel: ch, - laddr: zeroAddr, - raddr: zeroAddr, - }, nil - case "unix": - var err error - ch, err = c.dialStreamLocal(addr) - if err != nil { - return nil, err - } - return &chanConn{ - Channel: ch, - laddr: &net.UnixAddr{ - Name: "@", - Net: "unix", - }, - raddr: &net.UnixAddr{ - Name: addr, - Net: "unix", - }, - }, nil - default: - return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) - } -} - -// DialTCP connects to the remote address raddr on the network net, -// which must be "tcp", "tcp4", or "tcp6". If laddr is not nil, it is used -// as the local address for the connection. -func (c *Client) DialTCP(n string, laddr, raddr *net.TCPAddr) (net.Conn, error) { - if laddr == nil { - laddr = &net.TCPAddr{ - IP: net.IPv4zero, - Port: 0, - } - } - ch, err := c.dial(laddr.IP.String(), laddr.Port, raddr.IP.String(), raddr.Port) - if err != nil { - return nil, err - } - return &chanConn{ - Channel: ch, - laddr: laddr, - raddr: raddr, - }, nil -} - -// RFC 4254 7.2 -type channelOpenDirectMsg struct { - raddr string - rport uint32 - laddr string - lport uint32 -} - -func (c *Client) dial(laddr string, lport int, raddr string, rport int) (Channel, error) { - msg := channelOpenDirectMsg{ - raddr: raddr, - rport: uint32(rport), - laddr: laddr, - lport: uint32(lport), - } - ch, in, err := c.OpenChannel("direct-tcpip", Marshal(&msg)) - if err != nil { - return nil, err - } - go DiscardRequests(in) - return ch, err -} - -type tcpChan struct { - Channel // the backing channel -} - -// chanConn fulfills the net.Conn interface without -// the tcpChan having to hold laddr or raddr directly. -type chanConn struct { - Channel - laddr, raddr net.Addr -} - -// LocalAddr returns the local network address. -func (t *chanConn) LocalAddr() net.Addr { - return t.laddr -} - -// RemoteAddr returns the remote network address. -func (t *chanConn) RemoteAddr() net.Addr { - return t.raddr -} - -// SetDeadline sets the read and write deadlines associated -// with the connection. -func (t *chanConn) SetDeadline(deadline time.Time) error { - if err := t.SetReadDeadline(deadline); err != nil { - return err - } - return t.SetWriteDeadline(deadline) -} - -// SetReadDeadline sets the read deadline. -// A zero value for t means Read will not time out. -// After the deadline, the error from Read will implement net.Error -// with Timeout() == true. -func (t *chanConn) SetReadDeadline(deadline time.Time) error { - // for compatibility with previous version, - // the error message contains "tcpChan" - return errors.New("ssh: tcpChan: deadline not supported") -} - -// SetWriteDeadline exists to satisfy the net.Conn interface -// but is not implemented by this type. It always returns an error. -func (t *chanConn) SetWriteDeadline(deadline time.Time) error { - return errors.New("ssh: tcpChan: deadline not supported") -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip_test.go deleted file mode 100644 index f1265cb496..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/tcpip_test.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014 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 ssh - -import ( - "testing" -) - -func TestAutoPortListenBroken(t *testing.T) { - broken := "SSH-2.0-OpenSSH_5.9hh11" - works := "SSH-2.0-OpenSSH_6.1" - if !isBrokenOpenSSHVersion(broken) { - t.Errorf("version %q not marked as broken", broken) - } - if isBrokenOpenSSHVersion(works) { - t.Errorf("version %q marked as broken", works) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal.go deleted file mode 100644 index 9a887598ff..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal.go +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright 2011 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 terminal - -import ( - "bytes" - "io" - "sync" - "unicode/utf8" -) - -// EscapeCodes contains escape sequences that can be written to the terminal in -// order to achieve different styles of text. -type EscapeCodes struct { - // Foreground colors - Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte - - // Reset all attributes - Reset []byte -} - -var vt100EscapeCodes = EscapeCodes{ - Black: []byte{keyEscape, '[', '3', '0', 'm'}, - Red: []byte{keyEscape, '[', '3', '1', 'm'}, - Green: []byte{keyEscape, '[', '3', '2', 'm'}, - Yellow: []byte{keyEscape, '[', '3', '3', 'm'}, - Blue: []byte{keyEscape, '[', '3', '4', 'm'}, - Magenta: []byte{keyEscape, '[', '3', '5', 'm'}, - Cyan: []byte{keyEscape, '[', '3', '6', 'm'}, - White: []byte{keyEscape, '[', '3', '7', 'm'}, - - Reset: []byte{keyEscape, '[', '0', 'm'}, -} - -// Terminal contains the state for running a VT100 terminal that is capable of -// reading lines of input. -type Terminal struct { - // AutoCompleteCallback, if non-null, is called for each keypress with - // the full input line and the current position of the cursor (in - // bytes, as an index into |line|). If it returns ok=false, the key - // press is processed normally. Otherwise it returns a replacement line - // and the new cursor position. - AutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool) - - // Escape contains a pointer to the escape codes for this terminal. - // It's always a valid pointer, although the escape codes themselves - // may be empty if the terminal doesn't support them. - Escape *EscapeCodes - - // lock protects the terminal and the state in this object from - // concurrent processing of a key press and a Write() call. - lock sync.Mutex - - c io.ReadWriter - prompt []rune - - // line is the current line being entered. - line []rune - // pos is the logical position of the cursor in line - pos int - // echo is true if local echo is enabled - echo bool - // pasteActive is true iff there is a bracketed paste operation in - // progress. - pasteActive bool - - // cursorX contains the current X value of the cursor where the left - // edge is 0. cursorY contains the row number where the first row of - // the current line is 0. - cursorX, cursorY int - // maxLine is the greatest value of cursorY so far. - maxLine int - - termWidth, termHeight int - - // outBuf contains the terminal data to be sent. - outBuf []byte - // remainder contains the remainder of any partial key sequences after - // a read. It aliases into inBuf. - remainder []byte - inBuf [256]byte - - // history contains previously entered commands so that they can be - // accessed with the up and down keys. - history stRingBuffer - // historyIndex stores the currently accessed history entry, where zero - // means the immediately previous entry. - historyIndex int - // When navigating up and down the history it's possible to return to - // the incomplete, initial line. That value is stored in - // historyPending. - historyPending string -} - -// NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is -// a local terminal, that terminal must first have been put into raw mode. -// prompt is a string that is written at the start of each input line (i.e. -// "> "). -func NewTerminal(c io.ReadWriter, prompt string) *Terminal { - return &Terminal{ - Escape: &vt100EscapeCodes, - c: c, - prompt: []rune(prompt), - termWidth: 80, - termHeight: 24, - echo: true, - historyIndex: -1, - } -} - -const ( - keyCtrlD = 4 - keyCtrlU = 21 - keyEnter = '\r' - keyEscape = 27 - keyBackspace = 127 - keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota - keyUp - keyDown - keyLeft - keyRight - keyAltLeft - keyAltRight - keyHome - keyEnd - keyDeleteWord - keyDeleteLine - keyClearScreen - keyPasteStart - keyPasteEnd -) - -var ( - crlf = []byte{'\r', '\n'} - pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'} - pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'} -) - -// bytesToKey tries to parse a key sequence from b. If successful, it returns -// the key and the remainder of the input. Otherwise it returns utf8.RuneError. -func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { - if len(b) == 0 { - return utf8.RuneError, nil - } - - if !pasteActive { - switch b[0] { - case 1: // ^A - return keyHome, b[1:] - case 5: // ^E - return keyEnd, b[1:] - case 8: // ^H - return keyBackspace, b[1:] - case 11: // ^K - return keyDeleteLine, b[1:] - case 12: // ^L - return keyClearScreen, b[1:] - case 23: // ^W - return keyDeleteWord, b[1:] - } - } - - if b[0] != keyEscape { - if !utf8.FullRune(b) { - return utf8.RuneError, b - } - r, l := utf8.DecodeRune(b) - return r, b[l:] - } - - if !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' { - switch b[2] { - case 'A': - return keyUp, b[3:] - case 'B': - return keyDown, b[3:] - case 'C': - return keyRight, b[3:] - case 'D': - return keyLeft, b[3:] - case 'H': - return keyHome, b[3:] - case 'F': - return keyEnd, b[3:] - } - } - - if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' { - switch b[5] { - case 'C': - return keyAltRight, b[6:] - case 'D': - return keyAltLeft, b[6:] - } - } - - if !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) { - return keyPasteStart, b[6:] - } - - if pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) { - return keyPasteEnd, b[6:] - } - - // If we get here then we have a key that we don't recognise, or a - // partial sequence. It's not clear how one should find the end of a - // sequence without knowing them all, but it seems that [a-zA-Z~] only - // appears at the end of a sequence. - for i, c := range b[0:] { - if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' { - return keyUnknown, b[i+1:] - } - } - - return utf8.RuneError, b -} - -// queue appends data to the end of t.outBuf -func (t *Terminal) queue(data []rune) { - t.outBuf = append(t.outBuf, []byte(string(data))...) -} - -var eraseUnderCursor = []rune{' ', keyEscape, '[', 'D'} -var space = []rune{' '} - -func isPrintable(key rune) bool { - isInSurrogateArea := key >= 0xd800 && key <= 0xdbff - return key >= 32 && !isInSurrogateArea -} - -// moveCursorToPos appends data to t.outBuf which will move the cursor to the -// given, logical position in the text. -func (t *Terminal) moveCursorToPos(pos int) { - if !t.echo { - return - } - - x := visualLength(t.prompt) + pos - y := x / t.termWidth - x = x % t.termWidth - - up := 0 - if y < t.cursorY { - up = t.cursorY - y - } - - down := 0 - if y > t.cursorY { - down = y - t.cursorY - } - - left := 0 - if x < t.cursorX { - left = t.cursorX - x - } - - right := 0 - if x > t.cursorX { - right = x - t.cursorX - } - - t.cursorX = x - t.cursorY = y - t.move(up, down, left, right) -} - -func (t *Terminal) move(up, down, left, right int) { - movement := make([]rune, 3*(up+down+left+right)) - m := movement - for i := 0; i < up; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'A' - m = m[3:] - } - for i := 0; i < down; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'B' - m = m[3:] - } - for i := 0; i < left; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'D' - m = m[3:] - } - for i := 0; i < right; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'C' - m = m[3:] - } - - t.queue(movement) -} - -func (t *Terminal) clearLineToRight() { - op := []rune{keyEscape, '[', 'K'} - t.queue(op) -} - -const maxLineLength = 4096 - -func (t *Terminal) setLine(newLine []rune, newPos int) { - if t.echo { - t.moveCursorToPos(0) - t.writeLine(newLine) - for i := len(newLine); i < len(t.line); i++ { - t.writeLine(space) - } - t.moveCursorToPos(newPos) - } - t.line = newLine - t.pos = newPos -} - -func (t *Terminal) advanceCursor(places int) { - t.cursorX += places - t.cursorY += t.cursorX / t.termWidth - if t.cursorY > t.maxLine { - t.maxLine = t.cursorY - } - t.cursorX = t.cursorX % t.termWidth - - if places > 0 && t.cursorX == 0 { - // Normally terminals will advance the current position - // when writing a character. But that doesn't happen - // for the last character in a line. However, when - // writing a character (except a new line) that causes - // a line wrap, the position will be advanced two - // places. - // - // So, if we are stopping at the end of a line, we - // need to write a newline so that our cursor can be - // advanced to the next line. - t.outBuf = append(t.outBuf, '\r', '\n') - } -} - -func (t *Terminal) eraseNPreviousChars(n int) { - if n == 0 { - return - } - - if t.pos < n { - n = t.pos - } - t.pos -= n - t.moveCursorToPos(t.pos) - - copy(t.line[t.pos:], t.line[n+t.pos:]) - t.line = t.line[:len(t.line)-n] - if t.echo { - t.writeLine(t.line[t.pos:]) - for i := 0; i < n; i++ { - t.queue(space) - } - t.advanceCursor(n) - t.moveCursorToPos(t.pos) - } -} - -// countToLeftWord returns then number of characters from the cursor to the -// start of the previous word. -func (t *Terminal) countToLeftWord() int { - if t.pos == 0 { - return 0 - } - - pos := t.pos - 1 - for pos > 0 { - if t.line[pos] != ' ' { - break - } - pos-- - } - for pos > 0 { - if t.line[pos] == ' ' { - pos++ - break - } - pos-- - } - - return t.pos - pos -} - -// countToRightWord returns then number of characters from the cursor to the -// start of the next word. -func (t *Terminal) countToRightWord() int { - pos := t.pos - for pos < len(t.line) { - if t.line[pos] == ' ' { - break - } - pos++ - } - for pos < len(t.line) { - if t.line[pos] != ' ' { - break - } - pos++ - } - return pos - t.pos -} - -// visualLength returns the number of visible glyphs in s. -func visualLength(runes []rune) int { - inEscapeSeq := false - length := 0 - - for _, r := range runes { - switch { - case inEscapeSeq: - if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') { - inEscapeSeq = false - } - case r == '\x1b': - inEscapeSeq = true - default: - length++ - } - } - - return length -} - -// handleKey processes the given key and, optionally, returns a line of text -// that the user has entered. -func (t *Terminal) handleKey(key rune) (line string, ok bool) { - if t.pasteActive && key != keyEnter { - t.addKeyToLine(key) - return - } - - switch key { - case keyBackspace: - if t.pos == 0 { - return - } - t.eraseNPreviousChars(1) - case keyAltLeft: - // move left by a word. - t.pos -= t.countToLeftWord() - t.moveCursorToPos(t.pos) - case keyAltRight: - // move right by a word. - t.pos += t.countToRightWord() - t.moveCursorToPos(t.pos) - case keyLeft: - if t.pos == 0 { - return - } - t.pos-- - t.moveCursorToPos(t.pos) - case keyRight: - if t.pos == len(t.line) { - return - } - t.pos++ - t.moveCursorToPos(t.pos) - case keyHome: - if t.pos == 0 { - return - } - t.pos = 0 - t.moveCursorToPos(t.pos) - case keyEnd: - if t.pos == len(t.line) { - return - } - t.pos = len(t.line) - t.moveCursorToPos(t.pos) - case keyUp: - entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1) - if !ok { - return "", false - } - if t.historyIndex == -1 { - t.historyPending = string(t.line) - } - t.historyIndex++ - runes := []rune(entry) - t.setLine(runes, len(runes)) - case keyDown: - switch t.historyIndex { - case -1: - return - case 0: - runes := []rune(t.historyPending) - t.setLine(runes, len(runes)) - t.historyIndex-- - default: - entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1) - if ok { - t.historyIndex-- - runes := []rune(entry) - t.setLine(runes, len(runes)) - } - } - case keyEnter: - t.moveCursorToPos(len(t.line)) - t.queue([]rune("\r\n")) - line = string(t.line) - ok = true - t.line = t.line[:0] - t.pos = 0 - t.cursorX = 0 - t.cursorY = 0 - t.maxLine = 0 - case keyDeleteWord: - // Delete zero or more spaces and then one or more characters. - t.eraseNPreviousChars(t.countToLeftWord()) - case keyDeleteLine: - // Delete everything from the current cursor position to the - // end of line. - for i := t.pos; i < len(t.line); i++ { - t.queue(space) - t.advanceCursor(1) - } - t.line = t.line[:t.pos] - t.moveCursorToPos(t.pos) - case keyCtrlD: - // Erase the character under the current position. - // The EOF case when the line is empty is handled in - // readLine(). - if t.pos < len(t.line) { - t.pos++ - t.eraseNPreviousChars(1) - } - case keyCtrlU: - t.eraseNPreviousChars(t.pos) - case keyClearScreen: - // Erases the screen and moves the cursor to the home position. - t.queue([]rune("\x1b[2J\x1b[H")) - t.queue(t.prompt) - t.cursorX, t.cursorY = 0, 0 - t.advanceCursor(visualLength(t.prompt)) - t.setLine(t.line, t.pos) - default: - if t.AutoCompleteCallback != nil { - prefix := string(t.line[:t.pos]) - suffix := string(t.line[t.pos:]) - - t.lock.Unlock() - newLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key) - t.lock.Lock() - - if completeOk { - t.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos])) - return - } - } - if !isPrintable(key) { - return - } - if len(t.line) == maxLineLength { - return - } - t.addKeyToLine(key) - } - return -} - -// addKeyToLine inserts the given key at the current position in the current -// line. -func (t *Terminal) addKeyToLine(key rune) { - if len(t.line) == cap(t.line) { - newLine := make([]rune, len(t.line), 2*(1+len(t.line))) - copy(newLine, t.line) - t.line = newLine - } - t.line = t.line[:len(t.line)+1] - copy(t.line[t.pos+1:], t.line[t.pos:]) - t.line[t.pos] = key - if t.echo { - t.writeLine(t.line[t.pos:]) - } - t.pos++ - t.moveCursorToPos(t.pos) -} - -func (t *Terminal) writeLine(line []rune) { - for len(line) != 0 { - remainingOnLine := t.termWidth - t.cursorX - todo := len(line) - if todo > remainingOnLine { - todo = remainingOnLine - } - t.queue(line[:todo]) - t.advanceCursor(visualLength(line[:todo])) - line = line[todo:] - } -} - -// writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n. -func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) { - for len(buf) > 0 { - i := bytes.IndexByte(buf, '\n') - todo := len(buf) - if i >= 0 { - todo = i - } - - var nn int - nn, err = w.Write(buf[:todo]) - n += nn - if err != nil { - return n, err - } - buf = buf[todo:] - - if i >= 0 { - if _, err = w.Write(crlf); err != nil { - return n, err - } - n++ - buf = buf[1:] - } - } - - return n, nil -} - -func (t *Terminal) Write(buf []byte) (n int, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - if t.cursorX == 0 && t.cursorY == 0 { - // This is the easy case: there's nothing on the screen that we - // have to move out of the way. - return writeWithCRLF(t.c, buf) - } - - // We have a prompt and possibly user input on the screen. We - // have to clear it first. - t.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */) - t.cursorX = 0 - t.clearLineToRight() - - for t.cursorY > 0 { - t.move(1 /* up */, 0, 0, 0) - t.cursorY-- - t.clearLineToRight() - } - - if _, err = t.c.Write(t.outBuf); err != nil { - return - } - t.outBuf = t.outBuf[:0] - - if n, err = writeWithCRLF(t.c, buf); err != nil { - return - } - - t.writeLine(t.prompt) - if t.echo { - t.writeLine(t.line) - } - - t.moveCursorToPos(t.pos) - - if _, err = t.c.Write(t.outBuf); err != nil { - return - } - t.outBuf = t.outBuf[:0] - return -} - -// ReadPassword temporarily changes the prompt and reads a password, without -// echo, from the terminal. -func (t *Terminal) ReadPassword(prompt string) (line string, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - oldPrompt := t.prompt - t.prompt = []rune(prompt) - t.echo = false - - line, err = t.readLine() - - t.prompt = oldPrompt - t.echo = true - - return -} - -// ReadLine returns a line of input from the terminal. -func (t *Terminal) ReadLine() (line string, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - return t.readLine() -} - -func (t *Terminal) readLine() (line string, err error) { - // t.lock must be held at this point - - if t.cursorX == 0 && t.cursorY == 0 { - t.writeLine(t.prompt) - t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - } - - lineIsPasted := t.pasteActive - - for { - rest := t.remainder - lineOk := false - for !lineOk { - var key rune - key, rest = bytesToKey(rest, t.pasteActive) - if key == utf8.RuneError { - break - } - if !t.pasteActive { - if key == keyCtrlD { - if len(t.line) == 0 { - return "", io.EOF - } - } - if key == keyPasteStart { - t.pasteActive = true - if len(t.line) == 0 { - lineIsPasted = true - } - continue - } - } else if key == keyPasteEnd { - t.pasteActive = false - continue - } - if !t.pasteActive { - lineIsPasted = false - } - line, lineOk = t.handleKey(key) - } - if len(rest) > 0 { - n := copy(t.inBuf[:], rest) - t.remainder = t.inBuf[:n] - } else { - t.remainder = nil - } - t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - if lineOk { - if t.echo { - t.historyIndex = -1 - t.history.Add(line) - } - if lineIsPasted { - err = ErrPasteIndicator - } - return - } - - // t.remainder is a slice at the beginning of t.inBuf - // containing a partial key sequence - readBuf := t.inBuf[len(t.remainder):] - var n int - - t.lock.Unlock() - n, err = t.c.Read(readBuf) - t.lock.Lock() - - if err != nil { - return - } - - t.remainder = t.inBuf[:n+len(t.remainder)] - } -} - -// SetPrompt sets the prompt to be used when reading subsequent lines. -func (t *Terminal) SetPrompt(prompt string) { - t.lock.Lock() - defer t.lock.Unlock() - - t.prompt = []rune(prompt) -} - -func (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) { - // Move cursor to column zero at the start of the line. - t.move(t.cursorY, 0, t.cursorX, 0) - t.cursorX, t.cursorY = 0, 0 - t.clearLineToRight() - for t.cursorY < numPrevLines { - // Move down a line - t.move(0, 1, 0, 0) - t.cursorY++ - t.clearLineToRight() - } - // Move back to beginning. - t.move(t.cursorY, 0, 0, 0) - t.cursorX, t.cursorY = 0, 0 - - t.queue(t.prompt) - t.advanceCursor(visualLength(t.prompt)) - t.writeLine(t.line) - t.moveCursorToPos(t.pos) -} - -func (t *Terminal) SetSize(width, height int) error { - t.lock.Lock() - defer t.lock.Unlock() - - if width == 0 { - width = 1 - } - - oldWidth := t.termWidth - t.termWidth, t.termHeight = width, height - - switch { - case width == oldWidth: - // If the width didn't change then nothing else needs to be - // done. - return nil - case len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0: - // If there is nothing on current line and no prompt printed, - // just do nothing - return nil - case width < oldWidth: - // Some terminals (e.g. xterm) will truncate lines that were - // too long when shinking. Others, (e.g. gnome-terminal) will - // attempt to wrap them. For the former, repainting t.maxLine - // works great, but that behaviour goes badly wrong in the case - // of the latter because they have doubled every full line. - - // We assume that we are working on a terminal that wraps lines - // and adjust the cursor position based on every previous line - // wrapping and turning into two. This causes the prompt on - // xterms to move upwards, which isn't great, but it avoids a - // huge mess with gnome-terminal. - if t.cursorX >= t.termWidth { - t.cursorX = t.termWidth - 1 - } - t.cursorY *= 2 - t.clearAndRepaintLinePlusNPrevious(t.maxLine * 2) - case width > oldWidth: - // If the terminal expands then our position calculations will - // be wrong in the future because we think the cursor is - // |t.pos| chars into the string, but there will be a gap at - // the end of any wrapped line. - // - // But the position will actually be correct until we move, so - // we can move back to the beginning and repaint everything. - t.clearAndRepaintLinePlusNPrevious(t.maxLine) - } - - _, err := t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - return err -} - -type pasteIndicatorError struct{} - -func (pasteIndicatorError) Error() string { - return "terminal: ErrPasteIndicator not correctly handled" -} - -// ErrPasteIndicator may be returned from ReadLine as the error, in addition -// to valid line data. It indicates that bracketed paste mode is enabled and -// that the returned line consists only of pasted data. Programs may wish to -// interpret pasted data more literally than typed data. -var ErrPasteIndicator = pasteIndicatorError{} - -// SetBracketedPasteMode requests that the terminal bracket paste operations -// with markers. Not all terminals support this but, if it is supported, then -// enabling this mode will stop any autocomplete callback from running due to -// pastes. Additionally, any lines that are completely pasted will be returned -// from ReadLine with the error set to ErrPasteIndicator. -func (t *Terminal) SetBracketedPasteMode(on bool) { - if on { - io.WriteString(t.c, "\x1b[?2004h") - } else { - io.WriteString(t.c, "\x1b[?2004l") - } -} - -// stRingBuffer is a ring buffer of strings. -type stRingBuffer struct { - // entries contains max elements. - entries []string - max int - // head contains the index of the element most recently added to the ring. - head int - // size contains the number of elements in the ring. - size int -} - -func (s *stRingBuffer) Add(a string) { - if s.entries == nil { - const defaultNumEntries = 100 - s.entries = make([]string, defaultNumEntries) - s.max = defaultNumEntries - } - - s.head = (s.head + 1) % s.max - s.entries[s.head] = a - if s.size < s.max { - s.size++ - } -} - -// NthPreviousEntry returns the value passed to the nth previous call to Add. -// If n is zero then the immediately prior value is returned, if one, then the -// next most recent, and so on. If such an element doesn't exist then ok is -// false. -func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { - if n >= s.size { - return "", false - } - index := s.head - n - if index < 0 { - index += s.max - } - return s.entries[index], true -} - -// readPasswordLine reads from reader until it finds \n or io.EOF. -// The slice returned does not include the \n. -// readPasswordLine also ignores any \r it finds. -func readPasswordLine(reader io.Reader) ([]byte, error) { - var buf [1]byte - var ret []byte - - for { - n, err := reader.Read(buf[:]) - if n > 0 { - switch buf[0] { - case '\n': - return ret, nil - case '\r': - // remove \r from passwords on Windows - default: - ret = append(ret, buf[0]) - } - continue - } - if err != nil { - if err == io.EOF && len(ret) > 0 { - return ret, nil - } - return ret, err - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal_test.go deleted file mode 100644 index d9b77c1c5e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/terminal_test.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2011 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. - -// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd windows plan9 solaris - -package terminal - -import ( - "bytes" - "io" - "os" - "runtime" - "testing" -) - -type MockTerminal struct { - toSend []byte - bytesPerRead int - received []byte -} - -func (c *MockTerminal) Read(data []byte) (n int, err error) { - n = len(data) - if n == 0 { - return - } - if n > len(c.toSend) { - n = len(c.toSend) - } - if n == 0 { - return 0, io.EOF - } - if c.bytesPerRead > 0 && n > c.bytesPerRead { - n = c.bytesPerRead - } - copy(data, c.toSend[:n]) - c.toSend = c.toSend[n:] - return -} - -func (c *MockTerminal) Write(data []byte) (n int, err error) { - c.received = append(c.received, data...) - return len(data), nil -} - -func TestClose(t *testing.T) { - c := &MockTerminal{} - ss := NewTerminal(c, "> ") - line, err := ss.ReadLine() - if line != "" { - t.Errorf("Expected empty line but got: %s", line) - } - if err != io.EOF { - t.Errorf("Error should have been EOF but got: %s", err) - } -} - -var keyPressTests = []struct { - in string - line string - err error - throwAwayLines int -}{ - { - err: io.EOF, - }, - { - in: "\r", - line: "", - }, - { - in: "foo\r", - line: "foo", - }, - { - in: "a\x1b[Cb\r", // right - line: "ab", - }, - { - in: "a\x1b[Db\r", // left - line: "ba", - }, - { - in: "a\177b\r", // backspace - line: "b", - }, - { - in: "\x1b[A\r", // up - }, - { - in: "\x1b[B\r", // down - }, - { - in: "line\x1b[A\x1b[B\r", // up then down - line: "line", - }, - { - in: "line1\rline2\x1b[A\r", // recall previous line. - line: "line1", - throwAwayLines: 1, - }, - { - // recall two previous lines and append. - in: "line1\rline2\rline3\x1b[A\x1b[Axxx\r", - line: "line1xxx", - throwAwayLines: 2, - }, - { - // Ctrl-A to move to beginning of line followed by ^K to kill - // line. - in: "a b \001\013\r", - line: "", - }, - { - // Ctrl-A to move to beginning of line, Ctrl-E to move to end, - // finally ^K to kill nothing. - in: "a b \001\005\013\r", - line: "a b ", - }, - { - in: "\027\r", - line: "", - }, - { - in: "a\027\r", - line: "", - }, - { - in: "a \027\r", - line: "", - }, - { - in: "a b\027\r", - line: "a ", - }, - { - in: "a b \027\r", - line: "a ", - }, - { - in: "one two thr\x1b[D\027\r", - line: "one two r", - }, - { - in: "\013\r", - line: "", - }, - { - in: "a\013\r", - line: "a", - }, - { - in: "ab\x1b[D\013\r", - line: "a", - }, - { - in: "Ξεσκεπάζω\r", - line: "Ξεσκεπάζω", - }, - { - in: "£\r\x1b[A\177\r", // non-ASCII char, enter, up, backspace. - line: "", - throwAwayLines: 1, - }, - { - in: "£\r££\x1b[A\x1b[B\177\r", // non-ASCII char, enter, 2x non-ASCII, up, down, backspace, enter. - line: "£", - throwAwayLines: 1, - }, - { - // Ctrl-D at the end of the line should be ignored. - in: "a\004\r", - line: "a", - }, - { - // a, b, left, Ctrl-D should erase the b. - in: "ab\x1b[D\004\r", - line: "a", - }, - { - // a, b, c, d, left, left, ^U should erase to the beginning of - // the line. - in: "abcd\x1b[D\x1b[D\025\r", - line: "cd", - }, - { - // Bracketed paste mode: control sequences should be returned - // verbatim in paste mode. - in: "abc\x1b[200~de\177f\x1b[201~\177\r", - line: "abcde\177", - }, - { - // Enter in bracketed paste mode should still work. - in: "abc\x1b[200~d\refg\x1b[201~h\r", - line: "efgh", - throwAwayLines: 1, - }, - { - // Lines consisting entirely of pasted data should be indicated as such. - in: "\x1b[200~a\r", - line: "a", - err: ErrPasteIndicator, - }, -} - -func TestKeyPresses(t *testing.T) { - for i, test := range keyPressTests { - for j := 1; j < len(test.in); j++ { - c := &MockTerminal{ - toSend: []byte(test.in), - bytesPerRead: j, - } - ss := NewTerminal(c, "> ") - for k := 0; k < test.throwAwayLines; k++ { - _, err := ss.ReadLine() - if err != nil { - t.Errorf("Throwaway line %d from test %d resulted in error: %s", k, i, err) - } - } - line, err := ss.ReadLine() - if line != test.line { - t.Errorf("Line resulting from test %d (%d bytes per read) was '%s', expected '%s'", i, j, line, test.line) - break - } - if err != test.err { - t.Errorf("Error resulting from test %d (%d bytes per read) was '%v', expected '%v'", i, j, err, test.err) - break - } - } - } -} - -func TestPasswordNotSaved(t *testing.T) { - c := &MockTerminal{ - toSend: []byte("password\r\x1b[A\r"), - bytesPerRead: 1, - } - ss := NewTerminal(c, "> ") - pw, _ := ss.ReadPassword("> ") - if pw != "password" { - t.Fatalf("failed to read password, got %s", pw) - } - line, _ := ss.ReadLine() - if len(line) > 0 { - t.Fatalf("password was saved in history") - } -} - -var setSizeTests = []struct { - width, height int -}{ - {40, 13}, - {80, 24}, - {132, 43}, -} - -func TestTerminalSetSize(t *testing.T) { - for _, setSize := range setSizeTests { - c := &MockTerminal{ - toSend: []byte("password\r\x1b[A\r"), - bytesPerRead: 1, - } - ss := NewTerminal(c, "> ") - ss.SetSize(setSize.width, setSize.height) - pw, _ := ss.ReadPassword("Password: ") - if pw != "password" { - t.Fatalf("failed to read password, got %s", pw) - } - if string(c.received) != "Password: \r\n" { - t.Errorf("failed to set the temporary prompt expected %q, got %q", "Password: ", c.received) - } - } -} - -func TestReadPasswordLineEnd(t *testing.T) { - var tests = []struct { - input string - want string - }{ - {"\n", ""}, - {"\r\n", ""}, - {"test\r\n", "test"}, - {"testtesttesttes\n", "testtesttesttes"}, - {"testtesttesttes\r\n", "testtesttesttes"}, - {"testtesttesttesttest\n", "testtesttesttesttest"}, - {"testtesttesttesttest\r\n", "testtesttesttesttest"}, - } - for _, test := range tests { - buf := new(bytes.Buffer) - if _, err := buf.WriteString(test.input); err != nil { - t.Fatal(err) - } - - have, err := readPasswordLine(buf) - if err != nil { - t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) - continue - } - if string(have) != test.want { - t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) - continue - } - - if _, err = buf.WriteString(test.input); err != nil { - t.Fatal(err) - } - have, err = readPasswordLine(buf) - if err != nil { - t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) - continue - } - if string(have) != test.want { - t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) - continue - } - } -} - -func TestMakeRawState(t *testing.T) { - fd := int(os.Stdout.Fd()) - if !IsTerminal(fd) { - t.Skip("stdout is not a terminal; skipping test") - } - - st, err := GetState(fd) - if err != nil { - t.Fatalf("failed to get terminal state from GetState: %s", err) - } - - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skip("MakeRaw not allowed on iOS; skipping test") - } - - defer Restore(fd, st) - raw, err := MakeRaw(fd) - if err != nil { - t.Fatalf("failed to get terminal state from MakeRaw: %s", err) - } - - if *st != *raw { - t.Errorf("states do not match; was %v, expected %v", raw, st) - } -} - -func TestOutputNewlines(t *testing.T) { - // \n should be changed to \r\n in terminal output. - buf := new(bytes.Buffer) - term := NewTerminal(buf, ">") - - term.Write([]byte("1\n2\n")) - output := string(buf.Bytes()) - const expected = "1\r\n2\r\n" - - if output != expected { - t.Errorf("incorrect output: was %q, expected %q", output, expected) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util.go deleted file mode 100644 index 5ef998e923..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2011 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. - -// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd - -// Package terminal provides support functions for dealing with terminals, as -// commonly found on UNIX systems. -// -// Putting a terminal into raw mode is the most common requirement: -// -// oldState, err := terminal.MakeRaw(0) -// if err != nil { -// panic(err) -// } -// defer terminal.Restore(0, oldState) -package terminal - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" -) - -// State contains the state of a terminal. -type State struct { - termios unix.Termios -} - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd int) bool { - _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - return err == nil -} - -// MakeRaw put the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -func MakeRaw(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - if err != nil { - return nil, err - } - - oldState := State{termios: *termios} - - // This attempts to replicate the behaviour documented for cfmakeraw in - // the termios(3) manpage. - termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON - termios.Oflag &^= unix.OPOST - termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN - termios.Cflag &^= unix.CSIZE | unix.PARENB - termios.Cflag |= unix.CS8 - termios.Cc[unix.VMIN] = 1 - termios.Cc[unix.VTIME] = 0 - if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil { - return nil, err - } - - return &oldState, nil -} - -// GetState returns the current state of a terminal which may be useful to -// restore the terminal after a signal. -func GetState(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - if err != nil { - return nil, err - } - - return &State{termios: *termios}, nil -} - -// Restore restores the terminal connected to the given file descriptor to a -// previous state. -func Restore(fd int, state *State) error { - return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios) -} - -// GetSize returns the dimensions of the given terminal. -func GetSize(fd int) (width, height int, err error) { - ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) - if err != nil { - return -1, -1, err - } - return int(ws.Col), int(ws.Row), nil -} - -// passwordReader is an io.Reader that reads from a specific file descriptor. -type passwordReader int - -func (r passwordReader) Read(buf []byte) (int, error) { - return unix.Read(int(r), buf) -} - -// ReadPassword reads a line of input from a terminal without local echo. This -// is commonly used for inputting passwords and other sensitive data. The slice -// returned does not include the \n. -func ReadPassword(fd int) ([]byte, error) { - termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - if err != nil { - return nil, err - } - - newState := *termios - newState.Lflag &^= unix.ECHO - newState.Lflag |= unix.ICANON | unix.ISIG - newState.Iflag |= unix.ICRNL - if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil { - return nil, err - } - - defer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios) - - return readPasswordLine(passwordReader(fd)) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_bsd.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_bsd.go deleted file mode 100644 index ae5629856d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_bsd.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013 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. - -// +build darwin dragonfly freebsd netbsd openbsd - -package terminal - -import "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA -const ioctlWriteTermios = unix.TIOCSETA diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_linux.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_linux.go deleted file mode 100644 index c504081ae6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_linux.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 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 terminal - -import "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - -const ioctlReadTermios = unix.TCGETS -const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_plan9.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_plan9.go deleted file mode 100644 index 799f049f04..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_plan9.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016 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 terminal provides support functions for dealing with terminals, as -// commonly found on UNIX systems. -// -// Putting a terminal into raw mode is the most common requirement: -// -// oldState, err := terminal.MakeRaw(0) -// if err != nil { -// panic(err) -// } -// defer terminal.Restore(0, oldState) -package terminal - -import ( - "fmt" - "runtime" -) - -type State struct{} - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd int) bool { - return false -} - -// MakeRaw put the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -func MakeRaw(fd int) (*State, error) { - return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) -} - -// GetState returns the current state of a terminal which may be useful to -// restore the terminal after a signal. -func GetState(fd int) (*State, error) { - return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) -} - -// Restore restores the terminal connected to the given file descriptor to a -// previous state. -func Restore(fd int, state *State) error { - return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) -} - -// GetSize returns the dimensions of the given terminal. -func GetSize(fd int) (width, height int, err error) { - return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) -} - -// ReadPassword reads a line of input from a terminal without local echo. This -// is commonly used for inputting passwords and other sensitive data. The slice -// returned does not include the \n. -func ReadPassword(fd int) ([]byte, error) { - return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_solaris.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_solaris.go deleted file mode 100644 index e200ed9ba0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_solaris.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2015 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. - -// +build solaris - -package terminal - -import ( - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" - "io" - "syscall" -) - -// State contains the state of a terminal. -type State struct { - termios unix.Termios -} - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd int) bool { - _, err := unix.IoctlGetTermio(fd, unix.TCGETA) - return err == nil -} - -// ReadPassword reads a line of input from a terminal without local echo. This -// is commonly used for inputting passwords and other sensitive data. The slice -// returned does not include the \n. -func ReadPassword(fd int) ([]byte, error) { - // see also: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c - val, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - oldState := *val - - newState := oldState - newState.Lflag &^= syscall.ECHO - newState.Lflag |= syscall.ICANON | syscall.ISIG - newState.Iflag |= syscall.ICRNL - err = unix.IoctlSetTermios(fd, unix.TCSETS, &newState) - if err != nil { - return nil, err - } - - defer unix.IoctlSetTermios(fd, unix.TCSETS, &oldState) - - var buf [16]byte - var ret []byte - for { - n, err := syscall.Read(fd, buf[:]) - if err != nil { - return nil, err - } - if n == 0 { - if len(ret) == 0 { - return nil, io.EOF - } - break - } - if buf[n-1] == '\n' { - n-- - } - ret = append(ret, buf[:n]...) - if n < len(buf) { - break - } - } - - return ret, nil -} - -// MakeRaw puts the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -// see http://cr.illumos.org/~webrev/andy_js/1060/ -func MakeRaw(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - - oldState := State{termios: *termios} - - termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON - termios.Oflag &^= unix.OPOST - termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN - termios.Cflag &^= unix.CSIZE | unix.PARENB - termios.Cflag |= unix.CS8 - termios.Cc[unix.VMIN] = 1 - termios.Cc[unix.VTIME] = 0 - - if err := unix.IoctlSetTermios(fd, unix.TCSETS, termios); err != nil { - return nil, err - } - - return &oldState, nil -} - -// Restore restores the terminal connected to the given file descriptor to a -// previous state. -func Restore(fd int, oldState *State) error { - return unix.IoctlSetTermios(fd, unix.TCSETS, &oldState.termios) -} - -// GetState returns the current state of a terminal which may be useful to -// restore the terminal after a signal. -func GetState(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - - return &State{termios: *termios}, nil -} - -// GetSize returns the dimensions of the given terminal. -func GetSize(fd int) (width, height int, err error) { - ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) - if err != nil { - return 0, 0, err - } - return int(ws.Col), int(ws.Row), nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_windows.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_windows.go deleted file mode 100644 index f85634fb47..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/terminal/util_windows.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2011 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. - -// +build windows - -// Package terminal provides support functions for dealing with terminals, as -// commonly found on UNIX systems. -// -// Putting a terminal into raw mode is the most common requirement: -// -// oldState, err := terminal.MakeRaw(0) -// if err != nil { -// panic(err) -// } -// defer terminal.Restore(0, oldState) -package terminal - -import ( - "os" - - "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -type State struct { - mode uint32 -} - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd int) bool { - var st uint32 - err := windows.GetConsoleMode(windows.Handle(fd), &st) - return err == nil -} - -// MakeRaw put the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -func MakeRaw(fd int) (*State, error) { - var st uint32 - if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { - return nil, err - } - raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) - if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { - return nil, err - } - return &State{st}, nil -} - -// GetState returns the current state of a terminal which may be useful to -// restore the terminal after a signal. -func GetState(fd int) (*State, error) { - var st uint32 - if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { - return nil, err - } - return &State{st}, nil -} - -// Restore restores the terminal connected to the given file descriptor to a -// previous state. -func Restore(fd int, state *State) error { - return windows.SetConsoleMode(windows.Handle(fd), state.mode) -} - -// GetSize returns the dimensions of the given terminal. -func GetSize(fd int) (width, height int, err error) { - var info windows.ConsoleScreenBufferInfo - if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { - return 0, 0, err - } - return int(info.Size.X), int(info.Size.Y), nil -} - -// ReadPassword reads a line of input from a terminal without local echo. This -// is commonly used for inputting passwords and other sensitive data. The slice -// returned does not include the \n. -func ReadPassword(fd int) ([]byte, error) { - var st uint32 - if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { - return nil, err - } - old := st - - st &^= (windows.ENABLE_ECHO_INPUT) - st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) - if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil { - return nil, err - } - - defer windows.SetConsoleMode(windows.Handle(fd), old) - - var h windows.Handle - p, _ := windows.GetCurrentProcess() - if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil { - return nil, err - } - - f := os.NewFile(uintptr(h), "stdin") - defer f.Close() - return readPasswordLine(f) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/agent_unix_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/agent_unix_test.go deleted file mode 100644 index 62c884ff19..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/agent_unix_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2014 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd - -package test - -import ( - "bytes" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/agent" -) - -func TestAgentForward(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - keyring := agent.NewKeyring() - if err := keyring.Add(agent.AddedKey{PrivateKey: testPrivateKeys["dsa"]}); err != nil { - t.Fatalf("Error adding key: %s", err) - } - if err := keyring.Add(agent.AddedKey{ - PrivateKey: testPrivateKeys["dsa"], - ConfirmBeforeUse: true, - LifetimeSecs: 3600, - }); err != nil { - t.Fatalf("Error adding key with constraints: %s", err) - } - pub := testPublicKeys["dsa"] - - sess, err := conn.NewSession() - if err != nil { - t.Fatalf("NewSession: %v", err) - } - if err := agent.RequestAgentForwarding(sess); err != nil { - t.Fatalf("RequestAgentForwarding: %v", err) - } - - if err := agent.ForwardToAgent(conn, keyring); err != nil { - t.Fatalf("SetupForwardKeyring: %v", err) - } - out, err := sess.CombinedOutput("ssh-add -L") - if err != nil { - t.Fatalf("running ssh-add: %v, out %s", err, out) - } - key, _, _, _, err := ssh.ParseAuthorizedKey(out) - if err != nil { - t.Fatalf("ParseAuthorizedKey(%q): %v", out, err) - } - - if !bytes.Equal(key.Marshal(), pub.Marshal()) { - t.Fatalf("got key %s, want %s", ssh.MarshalAuthorizedKey(key), ssh.MarshalAuthorizedKey(pub)) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/banner_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/banner_test.go deleted file mode 100644 index d3b21ac763..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/banner_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2014 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd - -package test - -import ( - "testing" -) - -func TestBannerCallbackAgainstOpenSSH(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - - clientConf := clientConfig() - - var receivedBanner string - clientConf.BannerCallback = func(message string) error { - receivedBanner = message - return nil - } - - conn := server.Dial(clientConf) - defer conn.Close() - - expected := "Server Banner" - if receivedBanner != expected { - t.Fatalf("got %v; want %v", receivedBanner, expected) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/cert_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/cert_test.go deleted file mode 100644 index cccd0e4aa3..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/cert_test.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2014 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd - -package test - -import ( - "bytes" - "crypto/rand" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// Test both logging in with a cert, and also that the certificate presented by an OpenSSH host can be validated correctly -func TestCertLogin(t *testing.T) { - s := newServer(t) - defer s.Shutdown() - - // Use a key different from the default. - clientKey := testSigners["dsa"] - caAuthKey := testSigners["ecdsa"] - cert := &ssh.Certificate{ - Key: clientKey.PublicKey(), - ValidPrincipals: []string{username()}, - CertType: ssh.UserCert, - ValidBefore: ssh.CertTimeInfinity, - } - if err := cert.SignCert(rand.Reader, caAuthKey); err != nil { - t.Fatalf("SetSignature: %v", err) - } - - certSigner, err := ssh.NewCertSigner(cert, clientKey) - if err != nil { - t.Fatalf("NewCertSigner: %v", err) - } - - conf := &ssh.ClientConfig{ - User: username(), - HostKeyCallback: (&ssh.CertChecker{ - IsHostAuthority: func(pk ssh.PublicKey, addr string) bool { - return bytes.Equal(pk.Marshal(), testPublicKeys["ca"].Marshal()) - }, - }).CheckHostKey, - } - conf.Auth = append(conf.Auth, ssh.PublicKeys(certSigner)) - - for _, test := range []struct { - addr string - succeed bool - }{ - {addr: "host.example.com:22", succeed: true}, - {addr: "host.example.com:10000", succeed: true}, // non-standard port must be OK - {addr: "host.example.com", succeed: false}, // port must be specified - {addr: "host.ex4mple.com:22", succeed: false}, // wrong host - } { - client, err := s.TryDialWithAddr(conf, test.addr) - - // Always close client if opened successfully - if err == nil { - client.Close() - } - - // Now evaluate whether the test failed or passed - if test.succeed { - if err != nil { - t.Fatalf("TryDialWithAddr: %v", err) - } - } else { - if err == nil { - t.Fatalf("TryDialWithAddr, unexpected success") - } - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/dial_unix_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/dial_unix_test.go deleted file mode 100644 index 091e48cc1d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/dial_unix_test.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2012 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. - -// +build !windows - -package test - -// direct-tcpip and direct-streamlocal functional tests - -import ( - "fmt" - "io" - "io/ioutil" - "net" - "strings" - "testing" -) - -type dialTester interface { - TestServerConn(t *testing.T, c net.Conn) - TestClientConn(t *testing.T, c net.Conn) -} - -func testDial(t *testing.T, n, listenAddr string, x dialTester) { - server := newServer(t) - defer server.Shutdown() - sshConn := server.Dial(clientConfig()) - defer sshConn.Close() - - l, err := net.Listen(n, listenAddr) - if err != nil { - t.Fatalf("Listen: %v", err) - } - defer l.Close() - - testData := fmt.Sprintf("hello from %s, %s", n, listenAddr) - go func() { - for { - c, err := l.Accept() - if err != nil { - break - } - x.TestServerConn(t, c) - - io.WriteString(c, testData) - c.Close() - } - }() - - conn, err := sshConn.Dial(n, l.Addr().String()) - if err != nil { - t.Fatalf("Dial: %v", err) - } - x.TestClientConn(t, conn) - defer conn.Close() - b, err := ioutil.ReadAll(conn) - if err != nil { - t.Fatalf("ReadAll: %v", err) - } - t.Logf("got %q", string(b)) - if string(b) != testData { - t.Fatalf("expected %q, got %q", testData, string(b)) - } -} - -type tcpDialTester struct { - listenAddr string -} - -func (x *tcpDialTester) TestServerConn(t *testing.T, c net.Conn) { - host := strings.Split(x.listenAddr, ":")[0] - prefix := host + ":" - if !strings.HasPrefix(c.LocalAddr().String(), prefix) { - t.Fatalf("expected to start with %q, got %q", prefix, c.LocalAddr().String()) - } - if !strings.HasPrefix(c.RemoteAddr().String(), prefix) { - t.Fatalf("expected to start with %q, got %q", prefix, c.RemoteAddr().String()) - } -} - -func (x *tcpDialTester) TestClientConn(t *testing.T, c net.Conn) { - // we use zero addresses. see *Client.Dial. - if c.LocalAddr().String() != "0.0.0.0:0" { - t.Fatalf("expected \"0.0.0.0:0\", got %q", c.LocalAddr().String()) - } - if c.RemoteAddr().String() != "0.0.0.0:0" { - t.Fatalf("expected \"0.0.0.0:0\", got %q", c.RemoteAddr().String()) - } -} - -func TestDialTCP(t *testing.T) { - x := &tcpDialTester{ - listenAddr: "127.0.0.1:0", - } - testDial(t, "tcp", x.listenAddr, x) -} - -type unixDialTester struct { - listenAddr string -} - -func (x *unixDialTester) TestServerConn(t *testing.T, c net.Conn) { - if c.LocalAddr().String() != x.listenAddr { - t.Fatalf("expected %q, got %q", x.listenAddr, c.LocalAddr().String()) - } - if c.RemoteAddr().String() != "@" { - t.Fatalf("expected \"@\", got %q", c.RemoteAddr().String()) - } -} - -func (x *unixDialTester) TestClientConn(t *testing.T, c net.Conn) { - if c.RemoteAddr().String() != x.listenAddr { - t.Fatalf("expected %q, got %q", x.listenAddr, c.RemoteAddr().String()) - } - if c.LocalAddr().String() != "@" { - t.Fatalf("expected \"@\", got %q", c.LocalAddr().String()) - } -} - -func TestDialUnix(t *testing.T) { - addr, cleanup := newTempSocket(t) - defer cleanup() - x := &unixDialTester{ - listenAddr: addr, - } - testDial(t, "unix", x.listenAddr, x) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/doc.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/doc.go deleted file mode 100644 index 444b29966b..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2012 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 test contains integration tests for the -// golang.org/x/crypto/ssh package. -package test diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/forward_unix_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/forward_unix_test.go deleted file mode 100644 index ea81937803..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/forward_unix_test.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2012 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd - -package test - -import ( - "bytes" - "io" - "io/ioutil" - "math/rand" - "net" - "testing" - "time" -) - -type closeWriter interface { - CloseWrite() error -} - -func testPortForward(t *testing.T, n, listenAddr string) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - sshListener, err := conn.Listen(n, listenAddr) - if err != nil { - t.Fatal(err) - } - - go func() { - sshConn, err := sshListener.Accept() - if err != nil { - t.Fatalf("listen.Accept failed: %v", err) - } - - _, err = io.Copy(sshConn, sshConn) - if err != nil && err != io.EOF { - t.Fatalf("ssh client copy: %v", err) - } - sshConn.Close() - }() - - forwardedAddr := sshListener.Addr().String() - netConn, err := net.Dial(n, forwardedAddr) - if err != nil { - t.Fatalf("net dial failed: %v", err) - } - - readChan := make(chan []byte) - go func() { - data, _ := ioutil.ReadAll(netConn) - readChan <- data - }() - - // Invent some data. - data := make([]byte, 100*1000) - for i := range data { - data[i] = byte(i % 255) - } - - var sent []byte - for len(sent) < 1000*1000 { - // Send random sized chunks - m := rand.Intn(len(data)) - n, err := netConn.Write(data[:m]) - if err != nil { - break - } - sent = append(sent, data[:n]...) - } - if err := netConn.(closeWriter).CloseWrite(); err != nil { - t.Errorf("netConn.CloseWrite: %v", err) - } - - read := <-readChan - - if len(sent) != len(read) { - t.Fatalf("got %d bytes, want %d", len(read), len(sent)) - } - if bytes.Compare(sent, read) != 0 { - t.Fatalf("read back data does not match") - } - - if err := sshListener.Close(); err != nil { - t.Fatalf("sshListener.Close: %v", err) - } - - // Check that the forward disappeared. - netConn, err = net.Dial(n, forwardedAddr) - if err == nil { - netConn.Close() - t.Errorf("still listening to %s after closing", forwardedAddr) - } -} - -func TestPortForwardTCP(t *testing.T) { - testPortForward(t, "tcp", "localhost:0") -} - -func TestPortForwardUnix(t *testing.T) { - addr, cleanup := newTempSocket(t) - defer cleanup() - testPortForward(t, "unix", addr) -} - -func testAcceptClose(t *testing.T, n, listenAddr string) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - - sshListener, err := conn.Listen(n, listenAddr) - if err != nil { - t.Fatal(err) - } - - quit := make(chan error, 1) - go func() { - for { - c, err := sshListener.Accept() - if err != nil { - quit <- err - break - } - c.Close() - } - }() - sshListener.Close() - - select { - case <-time.After(1 * time.Second): - t.Errorf("timeout: listener did not close.") - case err := <-quit: - t.Logf("quit as expected (error %v)", err) - } -} - -func TestAcceptCloseTCP(t *testing.T) { - testAcceptClose(t, "tcp", "localhost:0") -} - -func TestAcceptCloseUnix(t *testing.T) { - addr, cleanup := newTempSocket(t) - defer cleanup() - testAcceptClose(t, "unix", addr) -} - -// Check that listeners exit if the underlying client transport dies. -func testPortForwardConnectionClose(t *testing.T, n, listenAddr string) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - - sshListener, err := conn.Listen(n, listenAddr) - if err != nil { - t.Fatal(err) - } - - quit := make(chan error, 1) - go func() { - for { - c, err := sshListener.Accept() - if err != nil { - quit <- err - break - } - c.Close() - } - }() - - // It would be even nicer if we closed the server side, but it - // is more involved as the fd for that side is dup()ed. - server.clientConn.Close() - - select { - case <-time.After(1 * time.Second): - t.Errorf("timeout: listener did not close.") - case err := <-quit: - t.Logf("quit as expected (error %v)", err) - } -} - -func TestPortForwardConnectionCloseTCP(t *testing.T) { - testPortForwardConnectionClose(t, "tcp", "localhost:0") -} - -func TestPortForwardConnectionCloseUnix(t *testing.T) { - addr, cleanup := newTempSocket(t) - defer cleanup() - testPortForwardConnectionClose(t, "unix", addr) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/multi_auth_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/multi_auth_test.go deleted file mode 100644 index c6617b6cf9..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/multi_auth_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2017 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. - -// Tests for ssh client multi-auth -// -// These tests run a simple go ssh client against OpenSSH server -// over unix domain sockets. The tests use multiple combinations -// of password, keyboard-interactive and publickey authentication -// methods. -// -// A wrapper library for making sshd PAM authentication use test -// passwords is required in ./sshd_test_pw.so. If the library does -// not exist these tests will be skipped. See compile instructions -// (for linux) in file ./sshd_test_pw.c. - -// +build linux - -package test - -import ( - "fmt" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -// test cases -type multiAuthTestCase struct { - authMethods []string - expectedPasswordCbs int - expectedKbdIntCbs int -} - -// test context -type multiAuthTestCtx struct { - password string - numPasswordCbs int - numKbdIntCbs int -} - -// create test context -func newMultiAuthTestCtx(t *testing.T) *multiAuthTestCtx { - password, err := randomPassword() - if err != nil { - t.Fatalf("Failed to generate random test password: %s", err.Error()) - } - - return &multiAuthTestCtx{ - password: password, - } -} - -// password callback -func (ctx *multiAuthTestCtx) passwordCb() (secret string, err error) { - ctx.numPasswordCbs++ - return ctx.password, nil -} - -// keyboard-interactive callback -func (ctx *multiAuthTestCtx) kbdIntCb(user, instruction string, questions []string, echos []bool) (answers []string, err error) { - if len(questions) == 0 { - return nil, nil - } - - ctx.numKbdIntCbs++ - if len(questions) == 1 { - return []string{ctx.password}, nil - } - - return nil, fmt.Errorf("unsupported keyboard-interactive flow") -} - -// TestMultiAuth runs several subtests for different combinations of password, keyboard-interactive and publickey authentication methods -func TestMultiAuth(t *testing.T) { - testCases := []multiAuthTestCase{ - // Test password,publickey authentication, assert that password callback is called 1 time - multiAuthTestCase{ - authMethods: []string{"password", "publickey"}, - expectedPasswordCbs: 1, - }, - // Test keyboard-interactive,publickey authentication, assert that keyboard-interactive callback is called 1 time - multiAuthTestCase{ - authMethods: []string{"keyboard-interactive", "publickey"}, - expectedKbdIntCbs: 1, - }, - // Test publickey,password authentication, assert that password callback is called 1 time - multiAuthTestCase{ - authMethods: []string{"publickey", "password"}, - expectedPasswordCbs: 1, - }, - // Test publickey,keyboard-interactive authentication, assert that keyboard-interactive callback is called 1 time - multiAuthTestCase{ - authMethods: []string{"publickey", "keyboard-interactive"}, - expectedKbdIntCbs: 1, - }, - // Test password,password authentication, assert that password callback is called 2 times - multiAuthTestCase{ - authMethods: []string{"password", "password"}, - expectedPasswordCbs: 2, - }, - } - - for _, testCase := range testCases { - t.Run(strings.Join(testCase.authMethods, ","), func(t *testing.T) { - ctx := newMultiAuthTestCtx(t) - - server := newServerForConfig(t, "MultiAuth", map[string]string{"AuthMethods": strings.Join(testCase.authMethods, ",")}) - defer server.Shutdown() - - clientConfig := clientConfig() - server.setTestPassword(clientConfig.User, ctx.password) - - publicKeyAuthMethod := clientConfig.Auth[0] - clientConfig.Auth = nil - for _, authMethod := range testCase.authMethods { - switch authMethod { - case "publickey": - clientConfig.Auth = append(clientConfig.Auth, publicKeyAuthMethod) - case "password": - clientConfig.Auth = append(clientConfig.Auth, - ssh.RetryableAuthMethod(ssh.PasswordCallback(ctx.passwordCb), 5)) - case "keyboard-interactive": - clientConfig.Auth = append(clientConfig.Auth, - ssh.RetryableAuthMethod(ssh.KeyboardInteractive(ctx.kbdIntCb), 5)) - default: - t.Fatalf("Unknown authentication method %s", authMethod) - } - } - - conn := server.Dial(clientConfig) - defer conn.Close() - - if ctx.numPasswordCbs != testCase.expectedPasswordCbs { - t.Fatalf("passwordCallback was called %d times, expected %d times", ctx.numPasswordCbs, testCase.expectedPasswordCbs) - } - - if ctx.numKbdIntCbs != testCase.expectedKbdIntCbs { - t.Fatalf("keyboardInteractiveCallback was called %d times, expected %d times", ctx.numKbdIntCbs, testCase.expectedKbdIntCbs) - } - }) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/session_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/session_test.go deleted file mode 100644 index 2cefe67594..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/session_test.go +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright 2012 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. - -// +build !windows - -package test - -// Session functional tests. - -import ( - "bytes" - "errors" - "fmt" - "io" - "strings" - "testing" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" -) - -func TestRunCommandSuccess(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - err = session.Run("true") - if err != nil { - t.Fatalf("session failed: %v", err) - } -} - -func TestHostKeyCheck(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - - conf := clientConfig() - hostDB := hostKeyDB() - conf.HostKeyCallback = hostDB.Check - - // change the keys. - hostDB.keys[ssh.KeyAlgoRSA][25]++ - hostDB.keys[ssh.KeyAlgoDSA][25]++ - hostDB.keys[ssh.KeyAlgoECDSA256][25]++ - - conn, err := server.TryDial(conf) - if err == nil { - conn.Close() - t.Fatalf("dial should have failed.") - } else if !strings.Contains(err.Error(), "host key mismatch") { - t.Fatalf("'host key mismatch' not found in %v", err) - } -} - -func TestRunCommandStdin(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - - r, w := io.Pipe() - defer r.Close() - defer w.Close() - session.Stdin = r - - err = session.Run("true") - if err != nil { - t.Fatalf("session failed: %v", err) - } -} - -func TestRunCommandStdinError(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - - r, w := io.Pipe() - defer r.Close() - session.Stdin = r - pipeErr := errors.New("closing write end of pipe") - w.CloseWithError(pipeErr) - - err = session.Run("true") - if err != pipeErr { - t.Fatalf("expected %v, found %v", pipeErr, err) - } -} - -func TestRunCommandFailed(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - err = session.Run(`bash -c "kill -9 $$"`) - if err == nil { - t.Fatalf("session succeeded: %v", err) - } -} - -func TestRunCommandWeClosed(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - err = session.Shell() - if err != nil { - t.Fatalf("shell failed: %v", err) - } - err = session.Close() - if err != nil { - t.Fatalf("shell failed: %v", err) - } -} - -func TestFuncLargeRead(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("unable to create new session: %s", err) - } - - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("unable to acquire stdout pipe: %s", err) - } - - err = session.Start("dd if=/dev/urandom bs=2048 count=1024") - if err != nil { - t.Fatalf("unable to execute remote command: %s", err) - } - - buf := new(bytes.Buffer) - n, err := io.Copy(buf, stdout) - if err != nil { - t.Fatalf("error reading from remote stdout: %s", err) - } - - if n != 2048*1024 { - t.Fatalf("Expected %d bytes but read only %d from remote command", 2048, n) - } -} - -func TestKeyChange(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conf := clientConfig() - hostDB := hostKeyDB() - conf.HostKeyCallback = hostDB.Check - conf.RekeyThreshold = 1024 - conn := server.Dial(conf) - defer conn.Close() - - for i := 0; i < 4; i++ { - session, err := conn.NewSession() - if err != nil { - t.Fatalf("unable to create new session: %s", err) - } - - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("unable to acquire stdout pipe: %s", err) - } - - err = session.Start("dd if=/dev/urandom bs=1024 count=1") - if err != nil { - t.Fatalf("unable to execute remote command: %s", err) - } - buf := new(bytes.Buffer) - n, err := io.Copy(buf, stdout) - if err != nil { - t.Fatalf("error reading from remote stdout: %s", err) - } - - want := int64(1024) - if n != want { - t.Fatalf("Expected %d bytes but read only %d from remote command", want, n) - } - } - - if changes := hostDB.checkCount; changes < 4 { - t.Errorf("got %d key changes, want 4", changes) - } -} - -func TestInvalidTerminalMode(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - - if err = session.RequestPty("vt100", 80, 40, ssh.TerminalModes{255: 1984}); err == nil { - t.Fatalf("req-pty failed: successful request with invalid mode") - } -} - -func TestValidTerminalMode(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("unable to acquire stdout pipe: %s", err) - } - - stdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("unable to acquire stdin pipe: %s", err) - } - - tm := ssh.TerminalModes{ssh.ECHO: 0} - if err = session.RequestPty("xterm", 80, 40, tm); err != nil { - t.Fatalf("req-pty failed: %s", err) - } - - err = session.Shell() - if err != nil { - t.Fatalf("session failed: %s", err) - } - - stdin.Write([]byte("stty -a && exit\n")) - - var buf bytes.Buffer - if _, err := io.Copy(&buf, stdout); err != nil { - t.Fatalf("reading failed: %s", err) - } - - if sttyOutput := buf.String(); !strings.Contains(sttyOutput, "-echo ") { - t.Fatalf("terminal mode failure: expected -echo in stty output, got %s", sttyOutput) - } -} - -func TestWindowChange(t *testing.T) { - server := newServer(t) - defer server.Shutdown() - conn := server.Dial(clientConfig()) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatalf("session failed: %v", err) - } - defer session.Close() - - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("unable to acquire stdout pipe: %s", err) - } - - stdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("unable to acquire stdin pipe: %s", err) - } - - tm := ssh.TerminalModes{ssh.ECHO: 0} - if err = session.RequestPty("xterm", 80, 40, tm); err != nil { - t.Fatalf("req-pty failed: %s", err) - } - - if err := session.WindowChange(100, 100); err != nil { - t.Fatalf("window-change failed: %s", err) - } - - err = session.Shell() - if err != nil { - t.Fatalf("session failed: %s", err) - } - - stdin.Write([]byte("stty size && exit\n")) - - var buf bytes.Buffer - if _, err := io.Copy(&buf, stdout); err != nil { - t.Fatalf("reading failed: %s", err) - } - - if sttyOutput := buf.String(); !strings.Contains(sttyOutput, "100 100") { - t.Fatalf("terminal WindowChange failure: expected \"100 100\" stty output, got %s", sttyOutput) - } -} - -func testOneCipher(t *testing.T, cipher string, cipherOrder []string) { - server := newServer(t) - defer server.Shutdown() - conf := clientConfig() - conf.Ciphers = []string{cipher} - // Don't fail if sshd doesn't have the cipher. - conf.Ciphers = append(conf.Ciphers, cipherOrder...) - conn, err := server.TryDial(conf) - if err != nil { - t.Fatalf("TryDial: %v", err) - } - defer conn.Close() - - numBytes := 4096 - - // Exercise sending data to the server - if _, _, err := conn.Conn.SendRequest("drop-me", false, make([]byte, numBytes)); err != nil { - t.Fatalf("SendRequest: %v", err) - } - - // Exercise receiving data from the server - session, err := conn.NewSession() - if err != nil { - t.Fatalf("NewSession: %v", err) - } - - out, err := session.Output(fmt.Sprintf("dd if=/dev/zero of=/dev/stdout bs=%d count=1", numBytes)) - if err != nil { - t.Fatalf("Output: %v", err) - } - - if len(out) != numBytes { - t.Fatalf("got %d bytes, want %d bytes", len(out), numBytes) - } -} - -var deprecatedCiphers = []string{ - "aes128-cbc", "3des-cbc", - "arcfour128", "arcfour256", -} - -func TestCiphers(t *testing.T) { - var config ssh.Config - config.SetDefaults() - cipherOrder := append(config.Ciphers, deprecatedCiphers...) - - for _, ciph := range cipherOrder { - t.Run(ciph, func(t *testing.T) { - testOneCipher(t, ciph, cipherOrder) - }) - } -} - -func TestMACs(t *testing.T) { - var config ssh.Config - config.SetDefaults() - macOrder := config.MACs - - for _, mac := range macOrder { - server := newServer(t) - defer server.Shutdown() - conf := clientConfig() - conf.MACs = []string{mac} - // Don't fail if sshd doesn't have the MAC. - conf.MACs = append(conf.MACs, macOrder...) - if conn, err := server.TryDial(conf); err == nil { - conn.Close() - } else { - t.Fatalf("failed for MAC %q", mac) - } - } -} - -func TestKeyExchanges(t *testing.T) { - var config ssh.Config - config.SetDefaults() - kexOrder := config.KeyExchanges - for _, kex := range kexOrder { - server := newServer(t) - defer server.Shutdown() - conf := clientConfig() - // Don't fail if sshd doesn't have the kex. - conf.KeyExchanges = append([]string{kex}, kexOrder...) - conn, err := server.TryDial(conf) - if err == nil { - conn.Close() - } else { - t.Errorf("failed for kex %q", kex) - } - } -} - -func TestClientAuthAlgorithms(t *testing.T) { - for _, key := range []string{ - "rsa", - "dsa", - "ecdsa", - "ed25519", - } { - server := newServer(t) - conf := clientConfig() - conf.SetDefaults() - conf.Auth = []ssh.AuthMethod{ - ssh.PublicKeys(testSigners[key]), - } - - conn, err := server.TryDial(conf) - if err == nil { - conn.Close() - } else { - t.Errorf("failed for key %q", key) - } - - server.Shutdown() - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/sshd_test_pw.c b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/sshd_test_pw.c deleted file mode 100644 index 2794a563a4..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/sshd_test_pw.c +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2017 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. - -// sshd_test_pw.c -// Wrapper to inject test password data for sshd PAM authentication -// -// This wrapper implements custom versions of getpwnam, getpwnam_r, -// getspnam and getspnam_r. These functions first call their real -// libc versions, then check if the requested user matches test user -// specified in env variable TEST_USER and if so replace the password -// with crypted() value of TEST_PASSWD env variable. -// -// Compile: -// gcc -Wall -shared -o sshd_test_pw.so -fPIC sshd_test_pw.c -// -// Compile with debug: -// gcc -DVERBOSE -Wall -shared -o sshd_test_pw.so -fPIC sshd_test_pw.c -// -// Run sshd: -// LD_PRELOAD="sshd_test_pw.so" TEST_USER="..." TEST_PASSWD="..." sshd ... - -// +build ignore - -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include - -#ifdef VERBOSE -#define DEBUG(X...) fprintf(stderr, X) -#else -#define DEBUG(X...) while (0) { } -#endif - -/* crypt() password */ -static char * -pwhash(char *passwd) { - return strdup(crypt(passwd, "$6$")); -} - -/* Pointers to real functions in libc */ -static struct passwd * (*real_getpwnam)(const char *) = NULL; -static int (*real_getpwnam_r)(const char *, struct passwd *, char *, size_t, struct passwd **) = NULL; -static struct spwd * (*real_getspnam)(const char *) = NULL; -static int (*real_getspnam_r)(const char *, struct spwd *, char *, size_t, struct spwd **) = NULL; - -/* Cached test user and test password */ -static char *test_user = NULL; -static char *test_passwd_hash = NULL; - -static void -init(void) { - /* Fetch real libc function pointers */ - real_getpwnam = dlsym(RTLD_NEXT, "getpwnam"); - real_getpwnam_r = dlsym(RTLD_NEXT, "getpwnam_r"); - real_getspnam = dlsym(RTLD_NEXT, "getspnam"); - real_getspnam_r = dlsym(RTLD_NEXT, "getspnam_r"); - - /* abort if env variables are not defined */ - if (getenv("TEST_USER") == NULL || getenv("TEST_PASSWD") == NULL) { - fprintf(stderr, "env variables TEST_USER and TEST_PASSWD are missing\n"); - abort(); - } - - /* Fetch test user and test password from env */ - test_user = strdup(getenv("TEST_USER")); - test_passwd_hash = pwhash(getenv("TEST_PASSWD")); - - DEBUG("sshd_test_pw init():\n"); - DEBUG("\treal_getpwnam: %p\n", real_getpwnam); - DEBUG("\treal_getpwnam_r: %p\n", real_getpwnam_r); - DEBUG("\treal_getspnam: %p\n", real_getspnam); - DEBUG("\treal_getspnam_r: %p\n", real_getspnam_r); - DEBUG("\tTEST_USER: '%s'\n", test_user); - DEBUG("\tTEST_PASSWD: '%s'\n", getenv("TEST_PASSWD")); - DEBUG("\tTEST_PASSWD_HASH: '%s'\n", test_passwd_hash); -} - -static int -is_test_user(const char *name) { - if (test_user != NULL && strcmp(test_user, name) == 0) - return 1; - return 0; -} - -/* getpwnam */ - -struct passwd * -getpwnam(const char *name) { - struct passwd *pw; - - DEBUG("sshd_test_pw getpwnam(%s)\n", name); - - if (real_getpwnam == NULL) - init(); - if ((pw = real_getpwnam(name)) == NULL) - return NULL; - - if (is_test_user(name)) - pw->pw_passwd = strdup(test_passwd_hash); - - return pw; -} - -/* getpwnam_r */ - -int -getpwnam_r(const char *name, - struct passwd *pwd, - char *buf, - size_t buflen, - struct passwd **result) { - int r; - - DEBUG("sshd_test_pw getpwnam_r(%s)\n", name); - - if (real_getpwnam_r == NULL) - init(); - if ((r = real_getpwnam_r(name, pwd, buf, buflen, result)) != 0 || *result == NULL) - return r; - - if (is_test_user(name)) - pwd->pw_passwd = strdup(test_passwd_hash); - - return 0; -} - -/* getspnam */ - -struct spwd * -getspnam(const char *name) { - struct spwd *sp; - - DEBUG("sshd_test_pw getspnam(%s)\n", name); - - if (real_getspnam == NULL) - init(); - if ((sp = real_getspnam(name)) == NULL) - return NULL; - - if (is_test_user(name)) - sp->sp_pwdp = strdup(test_passwd_hash); - - return sp; -} - -/* getspnam_r */ - -int -getspnam_r(const char *name, - struct spwd *spbuf, - char *buf, - size_t buflen, - struct spwd **spbufp) { - int r; - - DEBUG("sshd_test_pw getspnam_r(%s)\n", name); - - if (real_getspnam_r == NULL) - init(); - if ((r = real_getspnam_r(name, spbuf, buf, buflen, spbufp)) != 0) - return r; - - if (is_test_user(name)) - spbuf->sp_pwdp = strdup(test_passwd_hash); - - return r; -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/test_unix_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/test_unix_test.go deleted file mode 100644 index ec1aab5bcb..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/test_unix_test.go +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright 2012 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. - -// +build darwin dragonfly freebsd linux netbsd openbsd plan9 - -package test - -// functional test harness for unix. - -import ( - "bytes" - "crypto/rand" - "encoding/base64" - "fmt" - "io/ioutil" - "log" - "net" - "os" - "os/exec" - "os/user" - "path/filepath" - "testing" - "text/template" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -const ( - defaultSshdConfig = ` -Protocol 2 -Banner {{.Dir}}/banner -HostKey {{.Dir}}/id_rsa -HostKey {{.Dir}}/id_dsa -HostKey {{.Dir}}/id_ecdsa -HostCertificate {{.Dir}}/id_rsa-cert.pub -Pidfile {{.Dir}}/sshd.pid -#UsePrivilegeSeparation no -KeyRegenerationInterval 3600 -ServerKeyBits 768 -SyslogFacility AUTH -LogLevel DEBUG2 -LoginGraceTime 120 -PermitRootLogin no -StrictModes no -RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile {{.Dir}}/authorized_keys -TrustedUserCAKeys {{.Dir}}/id_ecdsa.pub -IgnoreRhosts yes -RhostsRSAAuthentication no -HostbasedAuthentication no -PubkeyAcceptedKeyTypes=* -` - multiAuthSshdConfigTail = ` -UsePAM yes -PasswordAuthentication yes -ChallengeResponseAuthentication yes -AuthenticationMethods {{.AuthMethods}} -` -) - -var configTmpl = map[string]*template.Template{ - "default": template.Must(template.New("").Parse(defaultSshdConfig)), - "MultiAuth": template.Must(template.New("").Parse(defaultSshdConfig + multiAuthSshdConfigTail))} - -type server struct { - t *testing.T - cleanup func() // executed during Shutdown - configfile string - cmd *exec.Cmd - output bytes.Buffer // holds stderr from sshd process - - testUser string // test username for sshd - testPasswd string // test password for sshd - sshdTestPwSo string // dynamic library to inject a custom password into sshd - - // Client half of the network connection. - clientConn net.Conn -} - -func username() string { - var username string - if user, err := user.Current(); err == nil { - username = user.Username - } else { - // user.Current() currently requires cgo. If an error is - // returned attempt to get the username from the environment. - log.Printf("user.Current: %v; falling back on $USER", err) - username = os.Getenv("USER") - } - if username == "" { - panic("Unable to get username") - } - return username -} - -type storedHostKey struct { - // keys map from an algorithm string to binary key data. - keys map[string][]byte - - // checkCount counts the Check calls. Used for testing - // rekeying. - checkCount int -} - -func (k *storedHostKey) Add(key ssh.PublicKey) { - if k.keys == nil { - k.keys = map[string][]byte{} - } - k.keys[key.Type()] = key.Marshal() -} - -func (k *storedHostKey) Check(addr string, remote net.Addr, key ssh.PublicKey) error { - k.checkCount++ - algo := key.Type() - - if k.keys == nil || bytes.Compare(key.Marshal(), k.keys[algo]) != 0 { - return fmt.Errorf("host key mismatch. Got %q, want %q", key, k.keys[algo]) - } - return nil -} - -func hostKeyDB() *storedHostKey { - keyChecker := &storedHostKey{} - keyChecker.Add(testPublicKeys["ecdsa"]) - keyChecker.Add(testPublicKeys["rsa"]) - keyChecker.Add(testPublicKeys["dsa"]) - return keyChecker -} - -func clientConfig() *ssh.ClientConfig { - config := &ssh.ClientConfig{ - User: username(), - Auth: []ssh.AuthMethod{ - ssh.PublicKeys(testSigners["user"]), - }, - HostKeyCallback: hostKeyDB().Check, - HostKeyAlgorithms: []string{ // by default, don't allow certs as this affects the hostKeyDB checker - ssh.KeyAlgoECDSA256, ssh.KeyAlgoECDSA384, ssh.KeyAlgoECDSA521, - ssh.KeyAlgoRSA, ssh.KeyAlgoDSA, - ssh.KeyAlgoED25519, - }, - } - return config -} - -// unixConnection creates two halves of a connected net.UnixConn. It -// is used for connecting the Go SSH client with sshd without opening -// ports. -func unixConnection() (*net.UnixConn, *net.UnixConn, error) { - dir, err := ioutil.TempDir("", "unixConnection") - if err != nil { - return nil, nil, err - } - defer os.Remove(dir) - - addr := filepath.Join(dir, "ssh") - listener, err := net.Listen("unix", addr) - if err != nil { - return nil, nil, err - } - defer listener.Close() - c1, err := net.Dial("unix", addr) - if err != nil { - return nil, nil, err - } - - c2, err := listener.Accept() - if err != nil { - c1.Close() - return nil, nil, err - } - - return c1.(*net.UnixConn), c2.(*net.UnixConn), nil -} - -func (s *server) TryDial(config *ssh.ClientConfig) (*ssh.Client, error) { - return s.TryDialWithAddr(config, "") -} - -// addr is the user specified host:port. While we don't actually dial it, -// we need to know this for host key matching -func (s *server) TryDialWithAddr(config *ssh.ClientConfig, addr string) (*ssh.Client, error) { - sshd, err := exec.LookPath("sshd") - if err != nil { - s.t.Skipf("skipping test: %v", err) - } - - c1, c2, err := unixConnection() - if err != nil { - s.t.Fatalf("unixConnection: %v", err) - } - - s.cmd = exec.Command(sshd, "-f", s.configfile, "-i", "-e") - f, err := c2.File() - if err != nil { - s.t.Fatalf("UnixConn.File: %v", err) - } - defer f.Close() - s.cmd.Stdin = f - s.cmd.Stdout = f - s.cmd.Stderr = &s.output - - if s.sshdTestPwSo != "" { - if s.testUser == "" { - s.t.Fatal("user missing from sshd_test_pw.so config") - } - if s.testPasswd == "" { - s.t.Fatal("password missing from sshd_test_pw.so config") - } - s.cmd.Env = append(os.Environ(), - fmt.Sprintf("LD_PRELOAD=%s", s.sshdTestPwSo), - fmt.Sprintf("TEST_USER=%s", s.testUser), - fmt.Sprintf("TEST_PASSWD=%s", s.testPasswd)) - } - - if err := s.cmd.Start(); err != nil { - s.t.Fail() - s.Shutdown() - s.t.Fatalf("s.cmd.Start: %v", err) - } - s.clientConn = c1 - conn, chans, reqs, err := ssh.NewClientConn(c1, addr, config) - if err != nil { - return nil, err - } - return ssh.NewClient(conn, chans, reqs), nil -} - -func (s *server) Dial(config *ssh.ClientConfig) *ssh.Client { - conn, err := s.TryDial(config) - if err != nil { - s.t.Fail() - s.Shutdown() - s.t.Fatalf("ssh.Client: %v", err) - } - return conn -} - -func (s *server) Shutdown() { - if s.cmd != nil && s.cmd.Process != nil { - // Don't check for errors; if it fails it's most - // likely "os: process already finished", and we don't - // care about that. Use os.Interrupt, so child - // processes are killed too. - s.cmd.Process.Signal(os.Interrupt) - s.cmd.Wait() - } - if s.t.Failed() { - // log any output from sshd process - s.t.Logf("sshd: %s", s.output.String()) - } - s.cleanup() -} - -func writeFile(path string, contents []byte) { - f, err := os.OpenFile(path, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0600) - if err != nil { - panic(err) - } - defer f.Close() - if _, err := f.Write(contents); err != nil { - panic(err) - } -} - -// generate random password -func randomPassword() (string, error) { - b := make([]byte, 12) - _, err := rand.Read(b) - if err != nil { - return "", err - } - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// setTestPassword is used for setting user and password data for sshd_test_pw.so -// This function also checks that ./sshd_test_pw.so exists and if not calls s.t.Skip() -func (s *server) setTestPassword(user, passwd string) error { - wd, _ := os.Getwd() - wrapper := filepath.Join(wd, "sshd_test_pw.so") - if _, err := os.Stat(wrapper); err != nil { - s.t.Skip(fmt.Errorf("sshd_test_pw.so is not available")) - return err - } - - s.sshdTestPwSo = wrapper - s.testUser = user - s.testPasswd = passwd - return nil -} - -// newServer returns a new mock ssh server. -func newServer(t *testing.T) *server { - return newServerForConfig(t, "default", map[string]string{}) -} - -// newServerForConfig returns a new mock ssh server. -func newServerForConfig(t *testing.T, config string, configVars map[string]string) *server { - if testing.Short() { - t.Skip("skipping test due to -short") - } - u, err := user.Current() - if err != nil { - t.Fatalf("user.Current: %v", err) - } - if u.Name == "root" { - t.Skip("skipping test because current user is root") - } - dir, err := ioutil.TempDir("", "sshtest") - if err != nil { - t.Fatal(err) - } - f, err := os.Create(filepath.Join(dir, "sshd_config")) - if err != nil { - t.Fatal(err) - } - if _, ok := configTmpl[config]; ok == false { - t.Fatal(fmt.Errorf("Invalid server config '%s'", config)) - } - configVars["Dir"] = dir - err = configTmpl[config].Execute(f, configVars) - if err != nil { - t.Fatal(err) - } - f.Close() - - writeFile(filepath.Join(dir, "banner"), []byte("Server Banner")) - - for k, v := range testdata.PEMBytes { - filename := "id_" + k - writeFile(filepath.Join(dir, filename), v) - writeFile(filepath.Join(dir, filename+".pub"), ssh.MarshalAuthorizedKey(testPublicKeys[k])) - } - - for k, v := range testdata.SSHCertificates { - filename := "id_" + k + "-cert.pub" - writeFile(filepath.Join(dir, filename), v) - } - - var authkeys bytes.Buffer - for k := range testdata.PEMBytes { - authkeys.Write(ssh.MarshalAuthorizedKey(testPublicKeys[k])) - } - writeFile(filepath.Join(dir, "authorized_keys"), authkeys.Bytes()) - - return &server{ - t: t, - configfile: f.Name(), - cleanup: func() { - if err := os.RemoveAll(dir); err != nil { - t.Error(err) - } - }, - } -} - -func newTempSocket(t *testing.T) (string, func()) { - dir, err := ioutil.TempDir("", "socket") - if err != nil { - t.Fatal(err) - } - deferFunc := func() { os.RemoveAll(dir) } - addr := filepath.Join(dir, "sock") - return addr, deferFunc -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/testdata_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/testdata_test.go deleted file mode 100644 index f68d85f37c..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/test/testdata_test.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2014 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. - -// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places: -// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three -// instances. - -package test - -import ( - "crypto/rand" - "fmt" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh" - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -var ( - testPrivateKeys map[string]interface{} - testSigners map[string]ssh.Signer - testPublicKeys map[string]ssh.PublicKey -) - -func init() { - var err error - - n := len(testdata.PEMBytes) - testPrivateKeys = make(map[string]interface{}, n) - testSigners = make(map[string]ssh.Signer, n) - testPublicKeys = make(map[string]ssh.PublicKey, n) - for t, k := range testdata.PEMBytes { - testPrivateKeys[t], err = ssh.ParseRawPrivateKey(k) - if err != nil { - panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err)) - } - testSigners[t], err = ssh.NewSignerFromKey(testPrivateKeys[t]) - if err != nil { - panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err)) - } - testPublicKeys[t] = testSigners[t].PublicKey() - } - - // Create a cert and sign it for use in tests. - testCert := &ssh.Certificate{ - Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage - ValidAfter: 0, // unix epoch - ValidBefore: ssh.CertTimeInfinity, // The end of currently representable time. - Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - Key: testPublicKeys["ecdsa"], - SignatureKey: testPublicKeys["rsa"], - Permissions: ssh.Permissions{ - CriticalOptions: map[string]string{}, - Extensions: map[string]string{}, - }, - } - testCert.SignCert(rand.Reader, testSigners["rsa"]) - testPrivateKeys["cert"] = testPrivateKeys["ecdsa"] - testSigners["cert"], err = ssh.NewCertSigner(testCert, testSigners["ecdsa"]) - if err != nil { - panic(fmt.Sprintf("Unable to create certificate signer: %v", err)) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/doc.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/doc.go deleted file mode 100644 index ae7bd8b89e..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2014 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. - -// This package contains test data shared between the various subpackages of -// the golang.org/x/crypto/ssh package. Under no circumstance should -// this data be used for production code. -package testdata diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/keys.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/keys.go deleted file mode 100644 index 521b6be97f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata/keys.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2014 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 testdata - -var PEMBytes = map[string][]byte{ - "dsa": []byte(`-----BEGIN DSA PRIVATE KEY----- -MIIBuwIBAAKBgQD6PDSEyXiI9jfNs97WuM46MSDCYlOqWw80ajN16AohtBncs1YB -lHk//dQOvCYOsYaE+gNix2jtoRjwXhDsc25/IqQbU1ahb7mB8/rsaILRGIbA5WH3 -EgFtJmXFovDz3if6F6TzvhFpHgJRmLYVR8cqsezL3hEZOvvs2iH7MorkxwIVAJHD -nD82+lxh2fb4PMsIiaXudAsBAoGAQRf7Q/iaPRn43ZquUhd6WwvirqUj+tkIu6eV -2nZWYmXLlqFQKEy4Tejl7Wkyzr2OSYvbXLzo7TNxLKoWor6ips0phYPPMyXld14r -juhT24CrhOzuLMhDduMDi032wDIZG4Y+K7ElU8Oufn8Sj5Wge8r6ANmmVgmFfynr -FhdYCngCgYEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFz -DQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYj -nOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4CFEx4UAfY -Fmsr0W6fHB9nhS4/UXM8 ------END DSA PRIVATE KEY----- -`), - "ecdsa": []byte(`-----BEGIN EC PRIVATE KEY----- -MHcCAQEEINGWx0zo6fhJ/0EAfrPzVFyFC9s18lBt3cRoEDhS3ARooAoGCCqGSM49 -AwEHoUQDQgAEi9Hdw6KvZcWxfg2IDhA7UkpDtzzt6ZqJXSsFdLd+Kx4S3Sx4cVO+ -6/ZOXRnPmNAlLUqjShUsUBBngG0u2fqEqA== ------END EC PRIVATE KEY----- -`), - "ecdsap256": []byte(`-----BEGIN EC PRIVATE KEY----- -MHcCAQEEIAPCE25zK0PQSnsgVcEbM1mbKTASH4pqb5QJajplDwDZoAoGCCqGSM49 -AwEHoUQDQgAEWy8TxGcIHRh5XGpO4dFVfDjeNY+VkgubQrf/eyFJZHxAn1SKraXU -qJUjTKj1z622OxYtJ5P7s9CfAEVsTzLCzg== ------END EC PRIVATE KEY----- -`), - "ecdsap384": []byte(`-----BEGIN EC PRIVATE KEY----- -MIGkAgEBBDBWfSnMuNKq8J9rQLzzEkx3KAoEohSXqhE/4CdjEYtoU2i22HW80DDS -qQhYNHRAduygBwYFK4EEACKhZANiAAQWaDMAd0HUd8ZiXCX7mYDDnC54gwH/nG43 -VhCUEYmF7HMZm/B9Yn3GjFk3qYEDEvuF/52+NvUKBKKaLbh32AWxMv0ibcoba4cz -hL9+hWYhUD9XIUlzMWiZ2y6eBE9PdRI= ------END EC PRIVATE KEY----- -`), - "ecdsap521": []byte(`-----BEGIN EC PRIVATE KEY----- -MIHcAgEBBEIBrkYpQcy8KTVHNiAkjlFZwee90224Bu6wz94R4OBo+Ts0eoAQG7SF -iaygEDMUbx6kTgXTBcKZ0jrWPKakayNZ/kigBwYFK4EEACOhgYkDgYYABADFuvLV -UoaCDGHcw5uNfdRIsvaLKuWSpLsl48eWGZAwdNG432GDVKduO+pceuE+8XzcyJb+ -uMv+D2b11Q/LQUcHJwE6fqbm8m3EtDKPsoKs0u/XUJb0JsH4J8lkZzbUTjvGYamn -FFlRjzoB3Oxu8UQgb+MWPedtH9XYBbg9biz4jJLkXQ== ------END EC PRIVATE KEY----- -`), - "rsa": []byte(`-----BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2 -a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8 -Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQIDAQAB -AoGAJMCk5vqfSRzyXOTXLGIYCuR4Kj6pdsbNSeuuRGfYBeR1F2c/XdFAg7D/8s5R -38p/Ih52/Ty5S8BfJtwtvgVY9ecf/JlU/rl/QzhG8/8KC0NG7KsyXklbQ7gJT8UT -Ojmw5QpMk+rKv17ipDVkQQmPaj+gJXYNAHqImke5mm/K/h0CQQDciPmviQ+DOhOq -2ZBqUfH8oXHgFmp7/6pXw80DpMIxgV3CwkxxIVx6a8lVH9bT/AFySJ6vXq4zTuV9 -6QmZcZzDAkEA2j/UXJPIs1fQ8z/6sONOkU/BjtoePFIWJlRxdN35cZjXnBraX5UR -fFHkePv4YwqmXNqrBOvSu+w2WdSDci+IKwJAcsPRc/jWmsrJW1q3Ha0hSf/WG/Bu -X7MPuXaKpP/DkzGoUmb8ks7yqj6XWnYkPNLjCc8izU5vRwIiyWBRf4mxMwJBAILa -NDvRS0rjwt6lJGv7zPZoqDc65VfrK2aNyHx2PgFyzwrEOtuF57bu7pnvEIxpLTeM -z26i6XVMeYXAWZMTloMCQBbpGgEERQpeUknLBqUHhg/wXF6+lFA+vEGnkY+Dwab2 -KCXFGd+SQ5GdUcEMe9isUH6DYj/6/yCDoFrXXmpQb+M= ------END RSA PRIVATE KEY----- -`), - "ed25519": []byte(`-----BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW -QyNTUxOQAAACA+3f7hS7g5UWwXOGVTrMfhmxyrjqz7Sxxbx7I1j8DvvwAAAJhAFfkOQBX5 -DgAAAAtzc2gtZWQyNTUxOQAAACA+3f7hS7g5UWwXOGVTrMfhmxyrjqz7Sxxbx7I1j8Dvvw -AAAEAaYmXltfW6nhRo3iWGglRB48lYq0z0Q3I3KyrdutEr6j7d/uFLuDlRbBc4ZVOsx+Gb -HKuOrPtLHFvHsjWPwO+/AAAAE2dhcnRvbm1AZ2FydG9ubS14cHMBAg== ------END OPENSSH PRIVATE KEY----- -`), - "rsa-openssh-format": []byte(`-----BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn -NhAAAAAwEAAQAAAIEAwa48yfWFi3uIdqzuf9X7C2Zxfea/Iaaw0zIwHudpF8U92WVIiC5l -oEuW1+OaVi3UWfIEjWMV1tHGysrHOwtwc34BPCJqJknUQO/KtDTBTJ4Pryhw1bWPC999Lz -a+yrCTdNQYBzoROXKExZgPFh9pTMi5wqpHDuOQ2qZFIEI3lT0AAAIQWL0H31i9B98AAAAH -c3NoLXJzYQAAAIEAwa48yfWFi3uIdqzuf9X7C2Zxfea/Iaaw0zIwHudpF8U92WVIiC5loE -uW1+OaVi3UWfIEjWMV1tHGysrHOwtwc34BPCJqJknUQO/KtDTBTJ4Pryhw1bWPC999Lza+ -yrCTdNQYBzoROXKExZgPFh9pTMi5wqpHDuOQ2qZFIEI3lT0AAAADAQABAAAAgCThyTGsT4 -IARDxVMhWl6eiB2ZrgFgWSeJm/NOqtppWgOebsIqPMMg4UVuVFsl422/lE3RkPhVkjGXgE -pWvZAdCnmLmApK8wK12vF334lZhZT7t3Z9EzJps88PWEHo7kguf285HcnUM7FlFeissJdk -kXly34y7/3X/a6Tclm+iABAAAAQE0xR/KxZ39slwfMv64Rz7WKk1PPskaryI29aHE3mKHk -pY2QA+P3QlrKxT/VWUMjHUbNNdYfJm48xu0SGNMRdKMAAABBAORh2NP/06JUV3J9W/2Hju -X1ViJuqqcQnJPVzpgSL826EC2xwOECTqoY8uvFpUdD7CtpksIxNVqRIhuNOlz0lqEAAABB -ANkaHTTaPojClO0dKJ/Zjs7pWOCGliebBYprQ/Y4r9QLBkC/XaWMS26gFIrjgC7D2Rv+rZ -wSD0v0RcmkITP1ZR0AAAAYcHF1ZXJuYUBMdWNreUh5ZHJvLmxvY2FsAQID ------END OPENSSH PRIVATE KEY-----`), - "user": []byte(`-----BEGIN EC PRIVATE KEY----- -MHcCAQEEILYCAeq8f7V4vSSypRw7pxy8yz3V5W4qg8kSC3zJhqpQoAoGCCqGSM49 -AwEHoUQDQgAEYcO2xNKiRUYOLEHM7VYAp57HNyKbOdYtHD83Z4hzNPVC4tM5mdGD -PLL8IEwvYu2wq+lpXfGQnNMbzYf9gspG0w== ------END EC PRIVATE KEY----- -`), - "ca": []byte(`-----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAvg9dQ9IRG59lYJb+GESfKWTch4yBpr7Ydw1jkK6vvtrx9jLo -5hkA8X6+ElRPRqTAZSlN5cBm6YCAcQIOsmXDUn6Oj1lVPQAoOjTBTvsjM3NjGhvv -52kHTY0nsMsBeY9q5DTtlzmlYkVUq2a6Htgf2mNi01dIw5fJ7uTTo8EbNf7O0i3u -c9a8P19HaZl5NKiWN4EIZkfB2WdXYRJCVBsGgQj3dE/GrEmH9QINq1A+GkNvK96u -vZm8H1jjmuqzHplWa7lFeXcx8FTVTbVb/iJrZ2Lc/JvIPitKZWhqbR59yrGjpwEp -Id7bo4WhO5L3OB0fSIJYvfu+o4WYnt4f3UzecwIDAQABAoIBABRD9yHgKErVuC2Q -bA+SYZY8VvdtF/X7q4EmQFORDNRA7EPgMc03JU6awRGbQ8i4kHs46EFzPoXvWcKz -AXYsO6N0Myc900Tp22A5d9NAHATEbPC/wdje7hRq1KyZONMJY9BphFv3nZbY5apR -Dc90JBFZP5RhXjTc3n9GjvqLAKfFEKVmPRCvqxCOZunw6XR+SgIQLJo36nsIsbhW -QUXIVaCI6cXMN8bRPm8EITdBNZu06Fpu4ZHm6VaxlXN9smERCDkgBSNXNWHKxmmA -c3Glo2DByUr2/JFBOrLEe9fkYgr24KNCQkHVcSaFxEcZvTggr7StjKISVHlCNEaB -7Q+kPoECgYEA3zE9FmvFGoQCU4g4Nl3dpQHs6kaAW8vJlrmq3xsireIuaJoa2HMe -wYdIvgCnK9DIjyxd5OWnE4jXtAEYPsyGD32B5rSLQrRO96lgb3f4bESCLUb3Bsn/ -sdgeE3p1xZMA0B59htqCrvVgN9k8WxyevBxYl3/gSBm/p8OVH1RTW/ECgYEA2f9Z -95OLj0KQHQtxQXf+I3VjhCw3LkLW39QZOXVI0QrCJfqqP7uxsJXH9NYX0l0GFTcR -kRrlyoaSU1EGQosZh+n1MvplGBTkTSV47/bPsTzFpgK2NfEZuFm9RoWgltS+nYeH -Y2k4mnAN3PhReCMwuprmJz8GRLsO3Cs2s2YylKMCgYEA2UX+uO/q7jgqZ5UJW+ue -1H5+W0aMuFA3i7JtZEnvRaUVFqFGlwXin/WJ2+WY1++k/rPrJ+Rk9IBXtBUIvEGw -FC5TIfsKQsJyyWgqx/jbbtJ2g4s8+W/1qfTAuqeRNOg5d2DnRDs90wJuS4//0JaY -9HkHyVwkQyxFxhSA/AHEMJECgYA2MvyFR1O9bIk0D3I7GsA+xKLXa77Ua53MzIjw -9i4CezBGDQpjCiFli/fI8am+jY5DnAtsDknvjoG24UAzLy5L0mk6IXMdB6SzYYut -7ak5oahqW+Y9hxIj+XvLmtGQbphtxhJtLu35x75KoBpxSh6FZpmuTEccs31AVCYn -eFM/DQKBgQDOPUwbLKqVi6ddFGgrV9MrWw+SWsDa43bPuyvYppMM3oqesvyaX1Dt -qDvN7owaNxNM4OnfKcZr91z8YPVCFo4RbBif3DXRzjNNBlxEjHBtuMOikwvsmucN -vIrbeEpjTiUMTEAr6PoTiVHjsfS8WAM6MDlF5M+2PNswDsBpa2yLgA== ------END RSA PRIVATE KEY----- -`), -} - -var SSHCertificates = map[string][]byte{ - // The following are corresponding certificates for the private keys above, signed by the CA key - // Generated by the following commands: - // - // 1. Assumes "rsa" key above in file named "rsa", write out the public key to "rsa.pub": - // ssh-keygen -y -f rsa > rsa.pu - // - // 2. Assumes "ca" key above in file named "ca", sign a cert for "rsa.pub": - // ssh-keygen -s ca -h -n host.example.com -V +500w -I host.example.com-key rsa.pub - "rsa": []byte(`ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgLjYqmmuTSEmjVhSfLQphBSTJMLwIZhRgmpn8FHKLiEIAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQAAAAAAAAAAAAAAAgAAABRob3N0LmV4YW1wbGUuY29tLWtleQAAABQAAAAQaG9zdC5leGFtcGxlLmNvbQAAAABZHN8UAAAAAGsjIYUAAAAAAAAAAAAAAAAAAAEXAAAAB3NzaC1yc2EAAAADAQABAAABAQC+D11D0hEbn2Vglv4YRJ8pZNyHjIGmvth3DWOQrq++2vH2MujmGQDxfr4SVE9GpMBlKU3lwGbpgIBxAg6yZcNSfo6PWVU9ACg6NMFO+yMzc2MaG+/naQdNjSewywF5j2rkNO2XOaViRVSrZroe2B/aY2LTV0jDl8nu5NOjwRs1/s7SLe5z1rw/X0dpmXk0qJY3gQhmR8HZZ1dhEkJUGwaBCPd0T8asSYf1Ag2rUD4aQ28r3q69mbwfWOOa6rMemVZruUV5dzHwVNVNtVv+ImtnYtz8m8g+K0plaGptHn3KsaOnASkh3tujhaE7kvc4HR9Igli9+76jhZie3h/dTN5zAAABDwAAAAdzc2gtcnNhAAABALeDea+60H6xJGhktAyosHaSY7AYzLocaqd8hJQjEIDifBwzoTlnBmcK9CxGhKuaoJFThdCLdaevCeOSuquh8HTkf+2ebZZc/G5T+2thPvPqmcuEcmMosWo+SIjYhbP3S6KD49aLC1X0kz8IBQeauFvURhkZ5ZjhA1L4aQYt9NjL73nqOl8PplRui+Ov5w8b4ldul4zOvYAFrzfcP6wnnXk3c1Zzwwf5wynD5jakO8GpYKBuhM7Z4crzkKSQjU3hla7xqgfomC5Gz4XbR2TNjcQiRrJQ0UlKtX3X3ObRCEhuvG0Kzjklhv+Ddw6txrhKjMjiSi/Yyius/AE8TmC1p4U= host.example.com -`), -} - -var PEMEncryptedKeys = []struct { - Name string - EncryptionKey string - PEMBytes []byte -}{ - 0: { - Name: "rsa-encrypted", - EncryptionKey: "r54-G0pher_t3st$", - PEMBytes: []byte(`-----BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,3E1714DE130BC5E81327F36564B05462 - -MqW88sud4fnWk/Jk3fkjh7ydu51ZkHLN5qlQgA4SkAXORPPMj2XvqZOv1v2LOgUV -dUevUn8PZK7a9zbZg4QShUSzwE5k6wdB7XKPyBgI39mJ79GBd2U4W3h6KT6jIdWA -goQpluxkrzr2/X602IaxLEre97FT9mpKC6zxKCLvyFWVIP9n3OSFS47cTTXyFr+l -7PdRhe60nn6jSBgUNk/Q1lAvEQ9fufdPwDYY93F1wyJ6lOr0F1+mzRrMbH67NyKs -rG8J1Fa7cIIre7ueKIAXTIne7OAWqpU9UDgQatDtZTbvA7ciqGsSFgiwwW13N+Rr -hN8MkODKs9cjtONxSKi05s206A3NDU6STtZ3KuPDjFE1gMJODotOuqSM+cxKfyFq -wxpk/CHYCDdMAVBSwxb/vraOHamylL4uCHpJdBHypzf2HABt+lS8Su23uAmL87DR -yvyCS/lmpuNTndef6qHPRkoW2EV3xqD3ovosGf7kgwGJUk2ZpCLVteqmYehKlZDK -r/Jy+J26ooI2jIg9bjvD1PZq+Mv+2dQ1RlDrPG3PB+rEixw6vBaL9x3jatCd4ej7 -XG7lb3qO9xFpLsx89tkEcvpGR+broSpUJ6Mu5LBCVmrvqHjvnDhrZVz1brMiQtU9 -iMZbgXqDLXHd6ERWygk7OTU03u+l1gs+KGMfmS0h0ZYw6KGVLgMnsoxqd6cFSKNB -8Ohk9ZTZGCiovlXBUepyu8wKat1k8YlHSfIHoRUJRhhcd7DrmojC+bcbMIZBU22T -Pl2ftVRGtcQY23lYd0NNKfebF7ncjuLWQGy+vZW+7cgfI6wPIbfYfP6g7QAutk6W -KQx0AoX5woZ6cNxtpIrymaVjSMRRBkKQrJKmRp3pC/lul5E5P2cueMs1fj4OHTbJ -lAUv88ywr+R+mRgYQlFW/XQ653f6DT4t6+njfO9oBcPrQDASZel3LjXLpjjYG/N5 -+BWnVexuJX9ika8HJiFl55oqaKb+WknfNhk5cPY+x7SDV9ywQeMiDZpr0ffeYAEP -LlwwiWRDYpO+uwXHSFF3+JjWwjhs8m8g99iFb7U93yKgBB12dCEPPa2ZeH9wUHMJ -sreYhNuq6f4iWWSXpzN45inQqtTi8jrJhuNLTT543ErW7DtntBO2rWMhff3aiXbn -Uy3qzZM1nPbuCGuBmP9L2dJ3Z5ifDWB4JmOyWY4swTZGt9AVmUxMIKdZpRONx8vz -I9u9nbVPGZBcou50Pa0qTLbkWsSL94MNXrARBxzhHC9Zs6XNEtwN7mOuii7uMkVc -adrxgknBH1J1N+NX/eTKzUwJuPvDtA+Z5ILWNN9wpZT/7ed8zEnKHPNUexyeT5g3 -uw9z9jH7ffGxFYlx87oiVPHGOrCXYZYW5uoZE31SCBkbtNuffNRJRKIFeipmpJ3P -7bpAG+kGHMelQH6b+5K1Qgsv4tpuSyKeTKpPFH9Av5nN4P1ZBm9N80tzbNWqjSJm -S7rYdHnuNEVnUGnRmEUMmVuYZnNBEVN/fP2m2SEwXcP3Uh7TiYlcWw10ygaGmOr7 -MvMLGkYgQ4Utwnd98mtqa0jr0hK2TcOSFir3AqVvXN3XJj4cVULkrXe4Im1laWgp ------END RSA PRIVATE KEY----- -`), - }, - - 1: { - Name: "dsa-encrypted", - EncryptionKey: "qG0pher-dsa_t3st$", - PEMBytes: []byte(`-----BEGIN DSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,7CE7A6E4A647DC01AF860210B15ADE3E - -hvnBpI99Hceq/55pYRdOzBLntIEis02JFNXuLEydWL+RJBFDn7tA+vXec0ERJd6J -G8JXlSOAhmC2H4uK3q2xR8/Y3yL95n6OIcjvCBiLsV+o3jj1MYJmErxP6zRtq4w3 -JjIjGHWmaYFSxPKQ6e8fs74HEqaeMV9ONUoTtB+aISmgaBL15Fcoayg245dkBvVl -h5Kqspe7yvOBmzA3zjRuxmSCqKJmasXM7mqs3vIrMxZE3XPo1/fWKcPuExgpVQoT -HkJZEoIEIIPnPMwT2uYbFJSGgPJVMDT84xz7yvjCdhLmqrsXgs5Qw7Pw0i0c0BUJ -b7fDJ2UhdiwSckWGmIhTLlJZzr8K+JpjCDlP+REYBI5meB7kosBnlvCEHdw2EJkH -0QDc/2F4xlVrHOLbPRFyu1Oi2Gvbeoo9EsM/DThpd1hKAlb0sF5Y0y0d+owv0PnE -R/4X3HWfIdOHsDUvJ8xVWZ4BZk9Zk9qol045DcFCehpr/3hslCrKSZHakLt9GI58 -vVQJ4L0aYp5nloLfzhViZtKJXRLkySMKdzYkIlNmW1oVGl7tce5UCNI8Nok4j6yn -IiHM7GBn+0nJoKTXsOGMIBe3ulKlKVxLjEuk9yivh/8= ------END DSA PRIVATE KEY----- -`), - }, -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata_test.go deleted file mode 100644 index 933e7ca87f..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2014 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. - -// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places: -// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three -// instances. - -package ssh - -import ( - "crypto/rand" - "fmt" - - "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/testdata" -) - -var ( - testPrivateKeys map[string]interface{} - testSigners map[string]Signer - testPublicKeys map[string]PublicKey -) - -func init() { - var err error - - n := len(testdata.PEMBytes) - testPrivateKeys = make(map[string]interface{}, n) - testSigners = make(map[string]Signer, n) - testPublicKeys = make(map[string]PublicKey, n) - for t, k := range testdata.PEMBytes { - testPrivateKeys[t], err = ParseRawPrivateKey(k) - if err != nil { - panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err)) - } - testSigners[t], err = NewSignerFromKey(testPrivateKeys[t]) - if err != nil { - panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err)) - } - testPublicKeys[t] = testSigners[t].PublicKey() - } - - // Create a cert and sign it for use in tests. - testCert := &Certificate{ - Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage - ValidAfter: 0, // unix epoch - ValidBefore: CertTimeInfinity, // The end of currently representable time. - Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - Key: testPublicKeys["ecdsa"], - SignatureKey: testPublicKeys["rsa"], - Permissions: Permissions{ - CriticalOptions: map[string]string{}, - Extensions: map[string]string{}, - }, - } - testCert.SignCert(rand.Reader, testSigners["rsa"]) - testPrivateKeys["cert"] = testPrivateKeys["ecdsa"] - testSigners["cert"], err = NewCertSigner(testCert, testSigners["ecdsa"]) - if err != nil { - panic(fmt.Sprintf("Unable to create certificate signer: %v", err)) - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport.go deleted file mode 100644 index f6fae1db46..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bufio" - "bytes" - "errors" - "io" - "log" -) - -// debugTransport if set, will print packet types as they go over the -// wire. No message decoding is done, to minimize the impact on timing. -const debugTransport = false - -const ( - gcmCipherID = "aes128-gcm@openssh.com" - aes128cbcID = "aes128-cbc" - tripledescbcID = "3des-cbc" -) - -// packetConn represents a transport that implements packet based -// operations. -type packetConn interface { - // Encrypt and send a packet of data to the remote peer. - writePacket(packet []byte) error - - // Read a packet from the connection. The read is blocking, - // i.e. if error is nil, then the returned byte slice is - // always non-empty. - readPacket() ([]byte, error) - - // Close closes the write-side of the connection. - Close() error -} - -// transport is the keyingTransport that implements the SSH packet -// protocol. -type transport struct { - reader connectionState - writer connectionState - - bufReader *bufio.Reader - bufWriter *bufio.Writer - rand io.Reader - isClient bool - io.Closer -} - -// packetCipher represents a combination of SSH encryption/MAC -// protocol. A single instance should be used for one direction only. -type packetCipher interface { - // writePacket encrypts the packet and writes it to w. The - // contents of the packet are generally scrambled. - writePacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error - - // readPacket reads and decrypts a packet of data. The - // returned packet may be overwritten by future calls of - // readPacket. - readPacket(seqnum uint32, r io.Reader) ([]byte, error) -} - -// connectionState represents one side (read or write) of the -// connection. This is necessary because each direction has its own -// keys, and can even have its own algorithms -type connectionState struct { - packetCipher - seqNum uint32 - dir direction - pendingKeyChange chan packetCipher -} - -// prepareKeyChange sets up key material for a keychange. The key changes in -// both directions are triggered by reading and writing a msgNewKey packet -// respectively. -func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error { - ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult) - if err != nil { - return err - } - t.reader.pendingKeyChange <- ciph - - ciph, err = newPacketCipher(t.writer.dir, algs.w, kexResult) - if err != nil { - return err - } - t.writer.pendingKeyChange <- ciph - - return nil -} - -func (t *transport) printPacket(p []byte, write bool) { - if len(p) == 0 { - return - } - who := "server" - if t.isClient { - who = "client" - } - what := "read" - if write { - what = "write" - } - - log.Println(what, who, p[0]) -} - -// Read and decrypt next packet. -func (t *transport) readPacket() (p []byte, err error) { - for { - p, err = t.reader.readPacket(t.bufReader) - if err != nil { - break - } - if len(p) == 0 || (p[0] != msgIgnore && p[0] != msgDebug) { - break - } - } - if debugTransport { - t.printPacket(p, false) - } - - return p, err -} - -func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { - packet, err := s.packetCipher.readPacket(s.seqNum, r) - s.seqNum++ - if err == nil && len(packet) == 0 { - err = errors.New("ssh: zero length packet") - } - - if len(packet) > 0 { - switch packet[0] { - case msgNewKeys: - select { - case cipher := <-s.pendingKeyChange: - s.packetCipher = cipher - default: - return nil, errors.New("ssh: got bogus newkeys message") - } - - case msgDisconnect: - // Transform a disconnect message into an - // error. Since this is lowest level at which - // we interpret message types, doing it here - // ensures that we don't have to handle it - // elsewhere. - var msg disconnectMsg - if err := Unmarshal(packet, &msg); err != nil { - return nil, err - } - return nil, &msg - } - } - - // The packet may point to an internal buffer, so copy the - // packet out here. - fresh := make([]byte, len(packet)) - copy(fresh, packet) - - return fresh, err -} - -func (t *transport) writePacket(packet []byte) error { - if debugTransport { - t.printPacket(packet, true) - } - return t.writer.writePacket(t.bufWriter, t.rand, packet) -} - -func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error { - changeKeys := len(packet) > 0 && packet[0] == msgNewKeys - - err := s.packetCipher.writePacket(s.seqNum, w, rand, packet) - if err != nil { - return err - } - if err = w.Flush(); err != nil { - return err - } - s.seqNum++ - if changeKeys { - select { - case cipher := <-s.pendingKeyChange: - s.packetCipher = cipher - default: - panic("ssh: no key material for msgNewKeys") - } - } - return err -} - -func newTransport(rwc io.ReadWriteCloser, rand io.Reader, isClient bool) *transport { - t := &transport{ - bufReader: bufio.NewReader(rwc), - bufWriter: bufio.NewWriter(rwc), - rand: rand, - reader: connectionState{ - packetCipher: &streamPacketCipher{cipher: noneCipher{}}, - pendingKeyChange: make(chan packetCipher, 1), - }, - writer: connectionState{ - packetCipher: &streamPacketCipher{cipher: noneCipher{}}, - pendingKeyChange: make(chan packetCipher, 1), - }, - Closer: rwc, - } - t.isClient = isClient - - if isClient { - t.reader.dir = serverKeys - t.writer.dir = clientKeys - } else { - t.reader.dir = clientKeys - t.writer.dir = serverKeys - } - - return t -} - -type direction struct { - ivTag []byte - keyTag []byte - macKeyTag []byte -} - -var ( - serverKeys = direction{[]byte{'B'}, []byte{'D'}, []byte{'F'}} - clientKeys = direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}} -) - -// setupKeys sets the cipher and MAC keys from kex.K, kex.H and sessionId, as -// described in RFC 4253, section 6.4. direction should either be serverKeys -// (to setup server->client keys) or clientKeys (for client->server keys). -func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) { - cipherMode := cipherModes[algs.Cipher] - macMode := macModes[algs.MAC] - - iv := make([]byte, cipherMode.ivSize) - key := make([]byte, cipherMode.keySize) - macKey := make([]byte, macMode.keySize) - - generateKeyMaterial(iv, d.ivTag, kex) - generateKeyMaterial(key, d.keyTag, kex) - generateKeyMaterial(macKey, d.macKeyTag, kex) - - return cipherModes[algs.Cipher].create(key, iv, macKey, algs) -} - -// generateKeyMaterial fills out with key material generated from tag, K, H -// and sessionId, as specified in RFC 4253, section 7.2. -func generateKeyMaterial(out, tag []byte, r *kexResult) { - var digestsSoFar []byte - - h := r.Hash.New() - for len(out) > 0 { - h.Reset() - h.Write(r.K) - h.Write(r.H) - - if len(digestsSoFar) == 0 { - h.Write(tag) - h.Write(r.SessionID) - } else { - h.Write(digestsSoFar) - } - - digest := h.Sum(nil) - n := copy(out, digest) - out = out[n:] - if len(out) > 0 { - digestsSoFar = append(digestsSoFar, digest...) - } - } -} - -const packageVersion = "SSH-2.0-Go" - -// Sends and receives a version line. The versionLine string should -// be US ASCII, start with "SSH-2.0-", and should not include a -// newline. exchangeVersions returns the other side's version line. -func exchangeVersions(rw io.ReadWriter, versionLine []byte) (them []byte, err error) { - // Contrary to the RFC, we do not ignore lines that don't - // start with "SSH-2.0-" to make the library usable with - // nonconforming servers. - for _, c := range versionLine { - // The spec disallows non US-ASCII chars, and - // specifically forbids null chars. - if c < 32 { - return nil, errors.New("ssh: junk character in version line") - } - } - if _, err = rw.Write(append(versionLine, '\r', '\n')); err != nil { - return - } - - them, err = readVersion(rw) - return them, err -} - -// maxVersionStringBytes is the maximum number of bytes that we'll -// accept as a version string. RFC 4253 section 4.2 limits this at 255 -// chars -const maxVersionStringBytes = 255 - -// Read version string as specified by RFC 4253, section 4.2. -func readVersion(r io.Reader) ([]byte, error) { - versionString := make([]byte, 0, 64) - var ok bool - var buf [1]byte - - for length := 0; length < maxVersionStringBytes; length++ { - _, err := io.ReadFull(r, buf[:]) - if err != nil { - return nil, err - } - // The RFC says that the version should be terminated with \r\n - // but several SSH servers actually only send a \n. - if buf[0] == '\n' { - if !bytes.HasPrefix(versionString, []byte("SSH-")) { - // RFC 4253 says we need to ignore all version string lines - // except the one containing the SSH version (provided that - // all the lines do not exceed 255 bytes in total). - versionString = versionString[:0] - continue - } - ok = true - break - } - - // non ASCII chars are disallowed, but we are lenient, - // since Go doesn't use null-terminated strings. - - // The RFC allows a comment after a space, however, - // all of it (version and comments) goes into the - // session hash. - versionString = append(versionString, buf[0]) - } - - if !ok { - return nil, errors.New("ssh: overflow reading version string") - } - - // There might be a '\r' on the end which we should remove. - if len(versionString) > 0 && versionString[len(versionString)-1] == '\r' { - versionString = versionString[:len(versionString)-1] - } - return versionString, nil -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport_test.go deleted file mode 100644 index 8445e1e561..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/ssh/transport_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2011 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 ssh - -import ( - "bytes" - "crypto/rand" - "encoding/binary" - "strings" - "testing" -) - -func TestReadVersion(t *testing.T) { - longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] - multiLineVersion := strings.Repeat("ignored\r\n", 20) + "SSH-2.0-bla\r\n" - cases := map[string]string{ - "SSH-2.0-bla\r\n": "SSH-2.0-bla", - "SSH-2.0-bla\n": "SSH-2.0-bla", - multiLineVersion: "SSH-2.0-bla", - longVersion + "\r\n": longVersion, - } - - for in, want := range cases { - result, err := readVersion(bytes.NewBufferString(in)) - if err != nil { - t.Errorf("readVersion(%q): %s", in, err) - } - got := string(result) - if got != want { - t.Errorf("got %q, want %q", got, want) - } - } -} - -func TestReadVersionError(t *testing.T) { - longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] - multiLineVersion := strings.Repeat("ignored\r\n", 50) + "SSH-2.0-bla\r\n" - cases := []string{ - longVersion + "too-long\r\n", - multiLineVersion, - } - for _, in := range cases { - if _, err := readVersion(bytes.NewBufferString(in)); err == nil { - t.Errorf("readVersion(%q) should have failed", in) - } - } -} - -func TestExchangeVersionsBasic(t *testing.T) { - v := "SSH-2.0-bla" - buf := bytes.NewBufferString(v + "\r\n") - them, err := exchangeVersions(buf, []byte("xyz")) - if err != nil { - t.Errorf("exchangeVersions: %v", err) - } - - if want := "SSH-2.0-bla"; string(them) != want { - t.Errorf("got %q want %q for our version", them, want) - } -} - -func TestExchangeVersions(t *testing.T) { - cases := []string{ - "not\x000allowed", - "not allowed\x01\r\n", - } - for _, c := range cases { - buf := bytes.NewBufferString("SSH-2.0-bla\r\n") - if _, err := exchangeVersions(buf, []byte(c)); err == nil { - t.Errorf("exchangeVersions(%q): should have failed", c) - } - } -} - -type closerBuffer struct { - bytes.Buffer -} - -func (b *closerBuffer) Close() error { - return nil -} - -func TestTransportMaxPacketWrite(t *testing.T) { - buf := &closerBuffer{} - tr := newTransport(buf, rand.Reader, true) - huge := make([]byte, maxPacket+1) - err := tr.writePacket(huge) - if err == nil { - t.Errorf("transport accepted write for a huge packet.") - } -} - -func TestTransportMaxPacketReader(t *testing.T) { - var header [5]byte - huge := make([]byte, maxPacket+128) - binary.BigEndian.PutUint32(header[0:], uint32(len(huge))) - // padding. - header[4] = 0 - - buf := &closerBuffer{} - buf.Write(header[:]) - buf.Write(huge) - - tr := newTransport(buf, rand.Reader, true) - _, err := tr.readPacket() - if err == nil { - t.Errorf("transport succeeded reading huge packet.") - } else if !strings.Contains(err.Error(), "large") { - t.Errorf("got %q, should mention %q", err.Error(), "large") - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/cipher.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/cipher.go deleted file mode 100644 index ce223b2c2d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/cipher.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2015 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 tea implements the TEA algorithm, as defined in Needham and -// Wheeler's 1994 technical report, “TEA, a Tiny Encryption Algorithm”. See -// http://www.cix.co.uk/~klockstone/tea.pdf for details. -package tea - -import ( - "crypto/cipher" - "encoding/binary" - "errors" -) - -const ( - // BlockSize is the size of a TEA block, in bytes. - BlockSize = 8 - - // KeySize is the size of a TEA key, in bytes. - KeySize = 16 - - // delta is the TEA key schedule constant. - delta = 0x9e3779b9 - - // numRounds is the standard number of rounds in TEA. - numRounds = 64 -) - -// tea is an instance of the TEA cipher with a particular key. -type tea struct { - key [16]byte - rounds int -} - -// NewCipher returns an instance of the TEA cipher with the standard number of -// rounds. The key argument must be 16 bytes long. -func NewCipher(key []byte) (cipher.Block, error) { - return NewCipherWithRounds(key, numRounds) -} - -// NewCipherWithRounds returns an instance of the TEA cipher with a given -// number of rounds, which must be even. The key argument must be 16 bytes -// long. -func NewCipherWithRounds(key []byte, rounds int) (cipher.Block, error) { - if len(key) != 16 { - return nil, errors.New("tea: incorrect key size") - } - - if rounds&1 != 0 { - return nil, errors.New("tea: odd number of rounds specified") - } - - c := &tea{ - rounds: rounds, - } - copy(c.key[:], key) - - return c, nil -} - -// BlockSize returns the TEA block size, which is eight bytes. It is necessary -// to satisfy the Block interface in the package "crypto/cipher". -func (*tea) BlockSize() int { - return BlockSize -} - -// Encrypt encrypts the 8 byte buffer src using the key in t and stores the -// result in dst. Note that for amounts of data larger than a block, it is not -// safe to just call Encrypt on successive blocks; instead, use an encryption -// mode like CBC (see crypto/cipher/cbc.go). -func (t *tea) Encrypt(dst, src []byte) { - e := binary.BigEndian - v0, v1 := e.Uint32(src), e.Uint32(src[4:]) - k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:]) - - sum := uint32(0) - delta := uint32(delta) - - for i := 0; i < t.rounds/2; i++ { - sum += delta - v0 += ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1) - v1 += ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3) - } - - e.PutUint32(dst, v0) - e.PutUint32(dst[4:], v1) -} - -// Decrypt decrypts the 8 byte buffer src using the key in t and stores the -// result in dst. -func (t *tea) Decrypt(dst, src []byte) { - e := binary.BigEndian - v0, v1 := e.Uint32(src), e.Uint32(src[4:]) - k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:]) - - delta := uint32(delta) - sum := delta * uint32(t.rounds/2) // in general, sum = delta * n - - for i := 0; i < t.rounds/2; i++ { - v1 -= ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3) - v0 -= ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1) - sum -= delta - } - - e.PutUint32(dst, v0) - e.PutUint32(dst[4:], v1) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/tea_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/tea_test.go deleted file mode 100644 index eb98d1e0e0..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/tea/tea_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2015 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 tea - -import ( - "bytes" - "testing" -) - -// A sample test key for when we just want to initialize a cipher -var testKey = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF} - -// Test that the block size for tea is correct -func TestBlocksize(t *testing.T) { - c, err := NewCipher(testKey) - if err != nil { - t.Fatalf("NewCipher returned error: %s", err) - } - - if result := c.BlockSize(); result != BlockSize { - t.Errorf("cipher.BlockSize returned %d, but expected %d", result, BlockSize) - } -} - -// Test that invalid key sizes return an error -func TestInvalidKeySize(t *testing.T) { - var key [KeySize + 1]byte - - if _, err := NewCipher(key[:]); err == nil { - t.Errorf("invalid key size %d didn't result in an error.", len(key)) - } - - if _, err := NewCipher(key[:KeySize-1]); err == nil { - t.Errorf("invalid key size %d didn't result in an error.", KeySize-1) - } -} - -// Test Vectors -type teaTest struct { - rounds int - key []byte - plaintext []byte - ciphertext []byte -} - -var teaTests = []teaTest{ - // These were sourced from https://github.com/froydnj/ironclad/blob/master/testing/test-vectors/tea.testvec - { - numRounds, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x41, 0xea, 0x3a, 0x0a, 0x94, 0xba, 0xa9, 0x40}, - }, - { - numRounds, - []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - []byte{0x31, 0x9b, 0xbe, 0xfb, 0x01, 0x6a, 0xbd, 0xb2}, - }, - { - 16, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0xed, 0x28, 0x5d, 0xa1, 0x45, 0x5b, 0x33, 0xc1}, - }, -} - -// Test encryption -func TestCipherEncrypt(t *testing.T) { - // Test encryption with standard 64 rounds - for i, test := range teaTests { - c, err := NewCipherWithRounds(test.key, test.rounds) - if err != nil { - t.Fatalf("#%d: NewCipher returned error: %s", i, err) - } - - var ciphertext [BlockSize]byte - c.Encrypt(ciphertext[:], test.plaintext) - - if !bytes.Equal(ciphertext[:], test.ciphertext) { - t.Errorf("#%d: incorrect ciphertext. Got %x, wanted %x", i, ciphertext, test.ciphertext) - } - - var plaintext2 [BlockSize]byte - c.Decrypt(plaintext2[:], ciphertext[:]) - - if !bytes.Equal(plaintext2[:], test.plaintext) { - t.Errorf("#%d: incorrect plaintext. Got %x, wanted %x", i, plaintext2, test.plaintext) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish.go deleted file mode 100644 index 802efa1971..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish.go +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2011 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 twofish implements Bruce Schneier's Twofish encryption algorithm. -package twofish - -// Twofish is defined in https://www.schneier.com/paper-twofish-paper.pdf [TWOFISH] - -// This code is a port of the LibTom C implementation. -// See http://libtom.org/?page=features&newsitems=5&whatfile=crypt. -// LibTomCrypt is free for all purposes under the public domain. -// It was heavily inspired by the go blowfish package. - -import "strconv" - -// BlockSize is the constant block size of Twofish. -const BlockSize = 16 - -const mdsPolynomial = 0x169 // x^8 + x^6 + x^5 + x^3 + 1, see [TWOFISH] 4.2 -const rsPolynomial = 0x14d // x^8 + x^6 + x^3 + x^2 + 1, see [TWOFISH] 4.3 - -// A Cipher is an instance of Twofish encryption using a particular key. -type Cipher struct { - s [4][256]uint32 - k [40]uint32 -} - -type KeySizeError int - -func (k KeySizeError) Error() string { - return "crypto/twofish: invalid key size " + strconv.Itoa(int(k)) -} - -// NewCipher creates and returns a Cipher. -// The key argument should be the Twofish key, 16, 24 or 32 bytes. -func NewCipher(key []byte) (*Cipher, error) { - keylen := len(key) - - if keylen != 16 && keylen != 24 && keylen != 32 { - return nil, KeySizeError(keylen) - } - - // k is the number of 64 bit words in key - k := keylen / 8 - - // Create the S[..] words - var S [4 * 4]byte - for i := 0; i < k; i++ { - // Computes [y0 y1 y2 y3] = rs . [x0 x1 x2 x3 x4 x5 x6 x7] - for j, rsRow := range rs { - for k, rsVal := range rsRow { - S[4*i+j] ^= gfMult(key[8*i+k], rsVal, rsPolynomial) - } - } - } - - // Calculate subkeys - c := new(Cipher) - var tmp [4]byte - for i := byte(0); i < 20; i++ { - // A = h(p * 2x, Me) - for j := range tmp { - tmp[j] = 2 * i - } - A := h(tmp[:], key, 0) - - // B = rolc(h(p * (2x + 1), Mo), 8) - for j := range tmp { - tmp[j] = 2*i + 1 - } - B := h(tmp[:], key, 1) - B = rol(B, 8) - - c.k[2*i] = A + B - - // K[2i+1] = (A + 2B) <<< 9 - c.k[2*i+1] = rol(2*B+A, 9) - } - - // Calculate sboxes - switch k { - case 2: - for i := range c.s[0] { - c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][byte(i)]^S[0]]^S[4]], 0) - c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][byte(i)]^S[1]]^S[5]], 1) - c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][byte(i)]^S[2]]^S[6]], 2) - c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][byte(i)]^S[3]]^S[7]], 3) - } - case 3: - for i := range c.s[0] { - c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]], 0) - c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[1]]^S[5]]^S[9]], 1) - c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]], 2) - c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[3]]^S[7]]^S[11]], 3) - } - default: - for i := range c.s[0] { - c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]]^S[12]], 0) - c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[1]]^S[5]]^S[9]]^S[13]], 1) - c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]]^S[14]], 2) - c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][sbox[1][byte(i)]^S[3]]^S[7]]^S[11]]^S[15]], 3) - } - } - - return c, nil -} - -// BlockSize returns the Twofish block size, 16 bytes. -func (c *Cipher) BlockSize() int { return BlockSize } - -// store32l stores src in dst in little-endian form. -func store32l(dst []byte, src uint32) { - dst[0] = byte(src) - dst[1] = byte(src >> 8) - dst[2] = byte(src >> 16) - dst[3] = byte(src >> 24) - return -} - -// load32l reads a little-endian uint32 from src. -func load32l(src []byte) uint32 { - return uint32(src[0]) | uint32(src[1])<<8 | uint32(src[2])<<16 | uint32(src[3])<<24 -} - -// rol returns x after a left circular rotation of y bits. -func rol(x, y uint32) uint32 { - return (x << (y & 31)) | (x >> (32 - (y & 31))) -} - -// ror returns x after a right circular rotation of y bits. -func ror(x, y uint32) uint32 { - return (x >> (y & 31)) | (x << (32 - (y & 31))) -} - -// The RS matrix. See [TWOFISH] 4.3 -var rs = [4][8]byte{ - {0x01, 0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E}, - {0xA4, 0x56, 0x82, 0xF3, 0x1E, 0xC6, 0x68, 0xE5}, - {0x02, 0xA1, 0xFC, 0xC1, 0x47, 0xAE, 0x3D, 0x19}, - {0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E, 0x03}, -} - -// sbox tables -var sbox = [2][256]byte{ - { - 0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38, - 0x0d, 0xc6, 0x35, 0x98, 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, 0x94, 0x48, - 0xf2, 0xd0, 0x8b, 0x30, 0x84, 0x54, 0xdf, 0x23, 0x19, 0x5b, 0x3d, 0x59, 0xf3, 0xae, 0xa2, 0x82, - 0x63, 0x01, 0x83, 0x2e, 0xd9, 0x51, 0x9b, 0x7c, 0xa6, 0xeb, 0xa5, 0xbe, 0x16, 0x0c, 0xe3, 0x61, - 0xc0, 0x8c, 0x3a, 0xf5, 0x73, 0x2c, 0x25, 0x0b, 0xbb, 0x4e, 0x89, 0x6b, 0x53, 0x6a, 0xb4, 0xf1, - 0xe1, 0xe6, 0xbd, 0x45, 0xe2, 0xf4, 0xb6, 0x66, 0xcc, 0x95, 0x03, 0x56, 0xd4, 0x1c, 0x1e, 0xd7, - 0xfb, 0xc3, 0x8e, 0xb5, 0xe9, 0xcf, 0xbf, 0xba, 0xea, 0x77, 0x39, 0xaf, 0x33, 0xc9, 0x62, 0x71, - 0x81, 0x79, 0x09, 0xad, 0x24, 0xcd, 0xf9, 0xd8, 0xe5, 0xc5, 0xb9, 0x4d, 0x44, 0x08, 0x86, 0xe7, - 0xa1, 0x1d, 0xaa, 0xed, 0x06, 0x70, 0xb2, 0xd2, 0x41, 0x7b, 0xa0, 0x11, 0x31, 0xc2, 0x27, 0x90, - 0x20, 0xf6, 0x60, 0xff, 0x96, 0x5c, 0xb1, 0xab, 0x9e, 0x9c, 0x52, 0x1b, 0x5f, 0x93, 0x0a, 0xef, - 0x91, 0x85, 0x49, 0xee, 0x2d, 0x4f, 0x8f, 0x3b, 0x47, 0x87, 0x6d, 0x46, 0xd6, 0x3e, 0x69, 0x64, - 0x2a, 0xce, 0xcb, 0x2f, 0xfc, 0x97, 0x05, 0x7a, 0xac, 0x7f, 0xd5, 0x1a, 0x4b, 0x0e, 0xa7, 0x5a, - 0x28, 0x14, 0x3f, 0x29, 0x88, 0x3c, 0x4c, 0x02, 0xb8, 0xda, 0xb0, 0x17, 0x55, 0x1f, 0x8a, 0x7d, - 0x57, 0xc7, 0x8d, 0x74, 0xb7, 0xc4, 0x9f, 0x72, 0x7e, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, - 0x6e, 0x50, 0xde, 0x68, 0x65, 0xbc, 0xdb, 0xf8, 0xc8, 0xa8, 0x2b, 0x40, 0xdc, 0xfe, 0x32, 0xa4, - 0xca, 0x10, 0x21, 0xf0, 0xd3, 0x5d, 0x0f, 0x00, 0x6f, 0x9d, 0x36, 0x42, 0x4a, 0x5e, 0xc1, 0xe0, - }, - { - 0x75, 0xf3, 0xc6, 0xf4, 0xdb, 0x7b, 0xfb, 0xc8, 0x4a, 0xd3, 0xe6, 0x6b, 0x45, 0x7d, 0xe8, 0x4b, - 0xd6, 0x32, 0xd8, 0xfd, 0x37, 0x71, 0xf1, 0xe1, 0x30, 0x0f, 0xf8, 0x1b, 0x87, 0xfa, 0x06, 0x3f, - 0x5e, 0xba, 0xae, 0x5b, 0x8a, 0x00, 0xbc, 0x9d, 0x6d, 0xc1, 0xb1, 0x0e, 0x80, 0x5d, 0xd2, 0xd5, - 0xa0, 0x84, 0x07, 0x14, 0xb5, 0x90, 0x2c, 0xa3, 0xb2, 0x73, 0x4c, 0x54, 0x92, 0x74, 0x36, 0x51, - 0x38, 0xb0, 0xbd, 0x5a, 0xfc, 0x60, 0x62, 0x96, 0x6c, 0x42, 0xf7, 0x10, 0x7c, 0x28, 0x27, 0x8c, - 0x13, 0x95, 0x9c, 0xc7, 0x24, 0x46, 0x3b, 0x70, 0xca, 0xe3, 0x85, 0xcb, 0x11, 0xd0, 0x93, 0xb8, - 0xa6, 0x83, 0x20, 0xff, 0x9f, 0x77, 0xc3, 0xcc, 0x03, 0x6f, 0x08, 0xbf, 0x40, 0xe7, 0x2b, 0xe2, - 0x79, 0x0c, 0xaa, 0x82, 0x41, 0x3a, 0xea, 0xb9, 0xe4, 0x9a, 0xa4, 0x97, 0x7e, 0xda, 0x7a, 0x17, - 0x66, 0x94, 0xa1, 0x1d, 0x3d, 0xf0, 0xde, 0xb3, 0x0b, 0x72, 0xa7, 0x1c, 0xef, 0xd1, 0x53, 0x3e, - 0x8f, 0x33, 0x26, 0x5f, 0xec, 0x76, 0x2a, 0x49, 0x81, 0x88, 0xee, 0x21, 0xc4, 0x1a, 0xeb, 0xd9, - 0xc5, 0x39, 0x99, 0xcd, 0xad, 0x31, 0x8b, 0x01, 0x18, 0x23, 0xdd, 0x1f, 0x4e, 0x2d, 0xf9, 0x48, - 0x4f, 0xf2, 0x65, 0x8e, 0x78, 0x5c, 0x58, 0x19, 0x8d, 0xe5, 0x98, 0x57, 0x67, 0x7f, 0x05, 0x64, - 0xaf, 0x63, 0xb6, 0xfe, 0xf5, 0xb7, 0x3c, 0xa5, 0xce, 0xe9, 0x68, 0x44, 0xe0, 0x4d, 0x43, 0x69, - 0x29, 0x2e, 0xac, 0x15, 0x59, 0xa8, 0x0a, 0x9e, 0x6e, 0x47, 0xdf, 0x34, 0x35, 0x6a, 0xcf, 0xdc, - 0x22, 0xc9, 0xc0, 0x9b, 0x89, 0xd4, 0xed, 0xab, 0x12, 0xa2, 0x0d, 0x52, 0xbb, 0x02, 0x2f, 0xa9, - 0xd7, 0x61, 0x1e, 0xb4, 0x50, 0x04, 0xf6, 0xc2, 0x16, 0x25, 0x86, 0x56, 0x55, 0x09, 0xbe, 0x91, - }, -} - -// gfMult returns a·b in GF(2^8)/p -func gfMult(a, b byte, p uint32) byte { - B := [2]uint32{0, uint32(b)} - P := [2]uint32{0, p} - var result uint32 - - // branchless GF multiplier - for i := 0; i < 7; i++ { - result ^= B[a&1] - a >>= 1 - B[1] = P[B[1]>>7] ^ (B[1] << 1) - } - result ^= B[a&1] - return byte(result) -} - -// mdsColumnMult calculates y{col} where [y0 y1 y2 y3] = MDS · [x0] -func mdsColumnMult(in byte, col int) uint32 { - mul01 := in - mul5B := gfMult(in, 0x5B, mdsPolynomial) - mulEF := gfMult(in, 0xEF, mdsPolynomial) - - switch col { - case 0: - return uint32(mul01) | uint32(mul5B)<<8 | uint32(mulEF)<<16 | uint32(mulEF)<<24 - case 1: - return uint32(mulEF) | uint32(mulEF)<<8 | uint32(mul5B)<<16 | uint32(mul01)<<24 - case 2: - return uint32(mul5B) | uint32(mulEF)<<8 | uint32(mul01)<<16 | uint32(mulEF)<<24 - case 3: - return uint32(mul5B) | uint32(mul01)<<8 | uint32(mulEF)<<16 | uint32(mul5B)<<24 - } - - panic("unreachable") -} - -// h implements the S-box generation function. See [TWOFISH] 4.3.5 -func h(in, key []byte, offset int) uint32 { - var y [4]byte - for x := range y { - y[x] = in[x] - } - switch len(key) / 8 { - case 4: - y[0] = sbox[1][y[0]] ^ key[4*(6+offset)+0] - y[1] = sbox[0][y[1]] ^ key[4*(6+offset)+1] - y[2] = sbox[0][y[2]] ^ key[4*(6+offset)+2] - y[3] = sbox[1][y[3]] ^ key[4*(6+offset)+3] - fallthrough - case 3: - y[0] = sbox[1][y[0]] ^ key[4*(4+offset)+0] - y[1] = sbox[1][y[1]] ^ key[4*(4+offset)+1] - y[2] = sbox[0][y[2]] ^ key[4*(4+offset)+2] - y[3] = sbox[0][y[3]] ^ key[4*(4+offset)+3] - fallthrough - case 2: - y[0] = sbox[1][sbox[0][sbox[0][y[0]]^key[4*(2+offset)+0]]^key[4*(0+offset)+0]] - y[1] = sbox[0][sbox[0][sbox[1][y[1]]^key[4*(2+offset)+1]]^key[4*(0+offset)+1]] - y[2] = sbox[1][sbox[1][sbox[0][y[2]]^key[4*(2+offset)+2]]^key[4*(0+offset)+2]] - y[3] = sbox[0][sbox[1][sbox[1][y[3]]^key[4*(2+offset)+3]]^key[4*(0+offset)+3]] - } - // [y0 y1 y2 y3] = MDS . [x0 x1 x2 x3] - var mdsMult uint32 - for i := range y { - mdsMult ^= mdsColumnMult(y[i], i) - } - return mdsMult -} - -// Encrypt encrypts a 16-byte block from src to dst, which may overlap. -// Note that for amounts of data larger than a block, -// it is not safe to just call Encrypt on successive blocks; -// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go). -func (c *Cipher) Encrypt(dst, src []byte) { - S1 := c.s[0] - S2 := c.s[1] - S3 := c.s[2] - S4 := c.s[3] - - // Load input - ia := load32l(src[0:4]) - ib := load32l(src[4:8]) - ic := load32l(src[8:12]) - id := load32l(src[12:16]) - - // Pre-whitening - ia ^= c.k[0] - ib ^= c.k[1] - ic ^= c.k[2] - id ^= c.k[3] - - for i := 0; i < 8; i++ { - k := c.k[8+i*4 : 12+i*4] - t2 := S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)] - t1 := S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2 - ic = ror(ic^(t1+k[0]), 1) - id = rol(id, 1) ^ (t2 + t1 + k[1]) - - t2 = S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)] - t1 = S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2 - ia = ror(ia^(t1+k[2]), 1) - ib = rol(ib, 1) ^ (t2 + t1 + k[3]) - } - - // Output with "undo last swap" - ta := ic ^ c.k[4] - tb := id ^ c.k[5] - tc := ia ^ c.k[6] - td := ib ^ c.k[7] - - store32l(dst[0:4], ta) - store32l(dst[4:8], tb) - store32l(dst[8:12], tc) - store32l(dst[12:16], td) -} - -// Decrypt decrypts a 16-byte block from src to dst, which may overlap. -func (c *Cipher) Decrypt(dst, src []byte) { - S1 := c.s[0] - S2 := c.s[1] - S3 := c.s[2] - S4 := c.s[3] - - // Load input - ta := load32l(src[0:4]) - tb := load32l(src[4:8]) - tc := load32l(src[8:12]) - td := load32l(src[12:16]) - - // Undo undo final swap - ia := tc ^ c.k[6] - ib := td ^ c.k[7] - ic := ta ^ c.k[4] - id := tb ^ c.k[5] - - for i := 8; i > 0; i-- { - k := c.k[4+i*4 : 8+i*4] - t2 := S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)] - t1 := S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2 - ia = rol(ia, 1) ^ (t1 + k[2]) - ib = ror(ib^(t2+t1+k[3]), 1) - - t2 = S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)] - t1 = S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2 - ic = rol(ic, 1) ^ (t1 + k[0]) - id = ror(id^(t2+t1+k[1]), 1) - } - - // Undo pre-whitening - ia ^= c.k[0] - ib ^= c.k[1] - ic ^= c.k[2] - id ^= c.k[3] - - store32l(dst[0:4], ia) - store32l(dst[4:8], ib) - store32l(dst[8:12], ic) - store32l(dst[12:16], id) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish_test.go deleted file mode 100644 index ed6a1a8fdb..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/twofish/twofish_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2011 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 twofish - -import ( - "bytes" - "testing" -) - -var qbox = [2][4][16]byte{ - { - {0x8, 0x1, 0x7, 0xD, 0x6, 0xF, 0x3, 0x2, 0x0, 0xB, 0x5, 0x9, 0xE, 0xC, 0xA, 0x4}, - {0xE, 0xC, 0xB, 0x8, 0x1, 0x2, 0x3, 0x5, 0xF, 0x4, 0xA, 0x6, 0x7, 0x0, 0x9, 0xD}, - {0xB, 0xA, 0x5, 0xE, 0x6, 0xD, 0x9, 0x0, 0xC, 0x8, 0xF, 0x3, 0x2, 0x4, 0x7, 0x1}, - {0xD, 0x7, 0xF, 0x4, 0x1, 0x2, 0x6, 0xE, 0x9, 0xB, 0x3, 0x0, 0x8, 0x5, 0xC, 0xA}, - }, - { - {0x2, 0x8, 0xB, 0xD, 0xF, 0x7, 0x6, 0xE, 0x3, 0x1, 0x9, 0x4, 0x0, 0xA, 0xC, 0x5}, - {0x1, 0xE, 0x2, 0xB, 0x4, 0xC, 0x3, 0x7, 0x6, 0xD, 0xA, 0x5, 0xF, 0x9, 0x0, 0x8}, - {0x4, 0xC, 0x7, 0x5, 0x1, 0x6, 0x9, 0xA, 0x0, 0xE, 0xD, 0x8, 0x2, 0xB, 0x3, 0xF}, - {0xB, 0x9, 0x5, 0x1, 0xC, 0x3, 0xD, 0xE, 0x6, 0x4, 0x7, 0xF, 0x2, 0x0, 0x8, 0xA}, - }, -} - -// genSbox generates the variable sbox -func genSbox(qi int, x byte) byte { - a0, b0 := x/16, x%16 - for i := 0; i < 2; i++ { - a1 := a0 ^ b0 - b1 := (a0 ^ ((b0 << 3) | (b0 >> 1)) ^ (a0 << 3)) & 15 - a0 = qbox[qi][2*i][a1] - b0 = qbox[qi][2*i+1][b1] - } - return (b0 << 4) + a0 -} - -func TestSbox(t *testing.T) { - for n := range sbox { - for m := range sbox[n] { - if genSbox(n, byte(m)) != sbox[n][m] { - t.Errorf("#%d|%d: sbox value = %d want %d", n, m, sbox[n][m], genSbox(n, byte(m))) - } - } - } -} - -var testVectors = []struct { - key []byte - dec []byte - enc []byte -}{ - // These tests are extracted from LibTom - { - []byte{0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32, 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A}, - []byte{0xD4, 0x91, 0xDB, 0x16, 0xE7, 0xB1, 0xC3, 0x9E, 0x86, 0xCB, 0x08, 0x6B, 0x78, 0x9F, 0x54, 0x19}, - []byte{0x01, 0x9F, 0x98, 0x09, 0xDE, 0x17, 0x11, 0x85, 0x8F, 0xAA, 0xC3, 0xA3, 0xBA, 0x20, 0xFB, 0xC3}, - }, - { - []byte{0x88, 0xB2, 0xB2, 0x70, 0x6B, 0x10, 0x5E, 0x36, 0xB4, 0x46, 0xBB, 0x6D, 0x73, 0x1A, 0x1E, 0x88, - 0xEF, 0xA7, 0x1F, 0x78, 0x89, 0x65, 0xBD, 0x44}, - []byte{0x39, 0xDA, 0x69, 0xD6, 0xBA, 0x49, 0x97, 0xD5, 0x85, 0xB6, 0xDC, 0x07, 0x3C, 0xA3, 0x41, 0xB2}, - []byte{0x18, 0x2B, 0x02, 0xD8, 0x14, 0x97, 0xEA, 0x45, 0xF9, 0xDA, 0xAC, 0xDC, 0x29, 0x19, 0x3A, 0x65}, - }, - { - []byte{0xD4, 0x3B, 0xB7, 0x55, 0x6E, 0xA3, 0x2E, 0x46, 0xF2, 0xA2, 0x82, 0xB7, 0xD4, 0x5B, 0x4E, 0x0D, - 0x57, 0xFF, 0x73, 0x9D, 0x4D, 0xC9, 0x2C, 0x1B, 0xD7, 0xFC, 0x01, 0x70, 0x0C, 0xC8, 0x21, 0x6F}, - []byte{0x90, 0xAF, 0xE9, 0x1B, 0xB2, 0x88, 0x54, 0x4F, 0x2C, 0x32, 0xDC, 0x23, 0x9B, 0x26, 0x35, 0xE6}, - []byte{0x6C, 0xB4, 0x56, 0x1C, 0x40, 0xBF, 0x0A, 0x97, 0x05, 0x93, 0x1C, 0xB6, 0xD4, 0x08, 0xE7, 0xFA}, - }, - // These tests are derived from https://www.schneier.com/code/ecb_ival.txt - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32, 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A}, - }, - { - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - }, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0xCF, 0xD1, 0xD2, 0xE5, 0xA9, 0xBE, 0x9C, 0xDF, 0x50, 0x1F, 0x13, 0xB8, 0x92, 0xBD, 0x22, 0x48}, - }, - { - []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, - }, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x37, 0x52, 0x7B, 0xE0, 0x05, 0x23, 0x34, 0xB8, 0x9F, 0x0C, 0xFC, 0xCA, 0xE8, 0x7C, 0xFA, 0x20}, - }, -} - -func TestCipher(t *testing.T) { - for n, tt := range testVectors { - // Test if the plaintext (dec) is encrypts to the given - // ciphertext (enc) using the given key. Test also if enc can - // be decrypted again into dec. - c, err := NewCipher(tt.key) - if err != nil { - t.Errorf("#%d: NewCipher: %v", n, err) - return - } - - buf := make([]byte, 16) - c.Encrypt(buf, tt.dec) - if !bytes.Equal(buf, tt.enc) { - t.Errorf("#%d: encrypt = %x want %x", n, buf, tt.enc) - } - c.Decrypt(buf, tt.enc) - if !bytes.Equal(buf, tt.dec) { - t.Errorf("#%d: decrypt = %x want %x", n, buf, tt.dec) - } - - // Test that 16 zero bytes, encrypted 1000 times then decrypted - // 1000 times results in zero bytes again. - zero := make([]byte, 16) - buf = make([]byte, 16) - for i := 0; i < 1000; i++ { - c.Encrypt(buf, buf) - } - for i := 0; i < 1000; i++ { - c.Decrypt(buf, buf) - } - if !bytes.Equal(buf, zero) { - t.Errorf("#%d: encrypt/decrypt 1000: have %x want %x", n, buf, zero) - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/block.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/block.go deleted file mode 100644 index fcb4e4d000..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/block.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2009 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. - -/* - Implementation adapted from Needham and Wheeler's paper: - http://www.cix.co.uk/~klockstone/xtea.pdf - - A precalculated look up table is used during encryption/decryption for values that are based purely on the key. -*/ - -package xtea - -// XTEA is based on 64 rounds. -const numRounds = 64 - -// blockToUint32 reads an 8 byte slice into two uint32s. -// The block is treated as big endian. -func blockToUint32(src []byte) (uint32, uint32) { - r0 := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) - r1 := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) - return r0, r1 -} - -// uint32ToBlock writes two uint32s into an 8 byte data block. -// Values are written as big endian. -func uint32ToBlock(v0, v1 uint32, dst []byte) { - dst[0] = byte(v0 >> 24) - dst[1] = byte(v0 >> 16) - dst[2] = byte(v0 >> 8) - dst[3] = byte(v0) - dst[4] = byte(v1 >> 24) - dst[5] = byte(v1 >> 16) - dst[6] = byte(v1 >> 8) - dst[7] = byte(v1 >> 0) -} - -// encryptBlock encrypts a single 8 byte block using XTEA. -func encryptBlock(c *Cipher, dst, src []byte) { - v0, v1 := blockToUint32(src) - - // Two rounds of XTEA applied per loop - for i := 0; i < numRounds; { - v0 += ((v1<<4 ^ v1>>5) + v1) ^ c.table[i] - i++ - v1 += ((v0<<4 ^ v0>>5) + v0) ^ c.table[i] - i++ - } - - uint32ToBlock(v0, v1, dst) -} - -// decryptBlock decrypts a single 8 byte block using XTEA. -func decryptBlock(c *Cipher, dst, src []byte) { - v0, v1 := blockToUint32(src) - - // Two rounds of XTEA applied per loop - for i := numRounds; i > 0; { - i-- - v1 -= ((v0<<4 ^ v0>>5) + v0) ^ c.table[i] - i-- - v0 -= ((v1<<4 ^ v1>>5) + v1) ^ c.table[i] - } - - uint32ToBlock(v0, v1, dst) -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/cipher.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/cipher.go deleted file mode 100644 index 29a91ca495..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/cipher.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2009 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 xtea implements XTEA encryption, as defined in Needham and Wheeler's -// 1997 technical report, "Tea extensions." -package xtea - -// For details, see http://www.cix.co.uk/~klockstone/xtea.pdf - -import "strconv" - -// The XTEA block size in bytes. -const BlockSize = 8 - -// A Cipher is an instance of an XTEA cipher using a particular key. -type Cipher struct { - // table contains a series of precalculated values that are used each round. - table [64]uint32 -} - -type KeySizeError int - -func (k KeySizeError) Error() string { - return "crypto/xtea: invalid key size " + strconv.Itoa(int(k)) -} - -// NewCipher creates and returns a new Cipher. -// The key argument should be the XTEA key. -// XTEA only supports 128 bit (16 byte) keys. -func NewCipher(key []byte) (*Cipher, error) { - k := len(key) - switch k { - default: - return nil, KeySizeError(k) - case 16: - break - } - - c := new(Cipher) - initCipher(c, key) - - return c, nil -} - -// BlockSize returns the XTEA block size, 8 bytes. -// It is necessary to satisfy the Block interface in the -// package "crypto/cipher". -func (c *Cipher) BlockSize() int { return BlockSize } - -// Encrypt encrypts the 8 byte buffer src using the key and stores the result in dst. -// Note that for amounts of data larger than a block, -// it is not safe to just call Encrypt on successive blocks; -// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go). -func (c *Cipher) Encrypt(dst, src []byte) { encryptBlock(c, dst, src) } - -// Decrypt decrypts the 8 byte buffer src using the key and stores the result in dst. -func (c *Cipher) Decrypt(dst, src []byte) { decryptBlock(c, dst, src) } - -// initCipher initializes the cipher context by creating a look up table -// of precalculated values that are based on the key. -func initCipher(c *Cipher, key []byte) { - // Load the key into four uint32s - var k [4]uint32 - for i := 0; i < len(k); i++ { - j := i << 2 // Multiply by 4 - k[i] = uint32(key[j+0])<<24 | uint32(key[j+1])<<16 | uint32(key[j+2])<<8 | uint32(key[j+3]) - } - - // Precalculate the table - const delta = 0x9E3779B9 - var sum uint32 - - // Two rounds of XTEA applied per loop - for i := 0; i < numRounds; { - c.table[i] = sum + k[sum&3] - i++ - sum += delta - c.table[i] = sum + k[(sum>>11)&3] - i++ - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/xtea_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/xtea_test.go deleted file mode 100644 index be711bf5af..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xtea/xtea_test.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2009 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 xtea - -import ( - "testing" -) - -// A sample test key for when we just want to initialize a cipher -var testKey = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF} - -// Test that the block size for XTEA is correct -func TestBlocksize(t *testing.T) { - if BlockSize != 8 { - t.Errorf("BlockSize constant - expected 8, got %d", BlockSize) - return - } - - c, err := NewCipher(testKey) - if err != nil { - t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err) - return - } - - result := c.BlockSize() - if result != 8 { - t.Errorf("BlockSize function - expected 8, got %d", result) - return - } -} - -// A series of test values to confirm that the Cipher.table array was initialized correctly -var testTable = []uint32{ - 0x00112233, 0x6B1568B8, 0xE28CE030, 0xC5089E2D, 0xC5089E2D, 0x1EFBD3A2, 0xA7845C2A, 0x78EF0917, - 0x78EF0917, 0x172682D0, 0x5B6AC714, 0x822AC955, 0x3DE68511, 0xDC1DFECA, 0x2062430E, 0x3611343F, - 0xF1CCEFFB, 0x900469B4, 0xD448ADF8, 0x2E3BE36D, 0xB6C46BF5, 0x994029F2, 0x994029F2, 0xF3335F67, - 0x6AAAD6DF, 0x4D2694DC, 0x4D2694DC, 0xEB5E0E95, 0x2FA252D9, 0x4551440A, 0x121E10D6, 0xB0558A8F, - 0xE388BDC3, 0x0A48C004, 0xC6047BC0, 0x643BF579, 0xA88039BD, 0x02736F32, 0x8AFBF7BA, 0x5C66A4A7, - 0x5C66A4A7, 0xC76AEB2C, 0x3EE262A4, 0x215E20A1, 0x215E20A1, 0x7B515616, 0x03D9DE9E, 0x1988CFCF, - 0xD5448B8B, 0x737C0544, 0xB7C04988, 0xDE804BC9, 0x9A3C0785, 0x3873813E, 0x7CB7C582, 0xD6AAFAF7, - 0x4E22726F, 0x309E306C, 0x309E306C, 0x8A9165E1, 0x1319EE69, 0xF595AC66, 0xF595AC66, 0x4F88E1DB, -} - -// Test that the cipher context is initialized correctly -func TestCipherInit(t *testing.T) { - c, err := NewCipher(testKey) - if err != nil { - t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err) - return - } - - for i := 0; i < len(c.table); i++ { - if c.table[i] != testTable[i] { - t.Errorf("NewCipher() failed to initialize Cipher.table[%d] correctly. Expected %08X, got %08X", i, testTable[i], c.table[i]) - break - } - } -} - -// Test that invalid key sizes return an error -func TestInvalidKeySize(t *testing.T) { - // Test a long key - key := []byte{ - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, - } - - _, err := NewCipher(key) - if err == nil { - t.Errorf("Invalid key size %d didn't result in an error.", len(key)) - } - - // Test a short key - key = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77} - - _, err = NewCipher(key) - if err == nil { - t.Errorf("Invalid key size %d didn't result in an error.", len(key)) - } -} - -// Test that we can correctly decode some bytes we have encoded -func TestEncodeDecode(t *testing.T) { - original := []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF} - input := original - output := make([]byte, BlockSize) - - c, err := NewCipher(testKey) - if err != nil { - t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err) - return - } - - // Encrypt the input block - c.Encrypt(output, input) - - // Check that the output does not match the input - differs := false - for i := 0; i < len(input); i++ { - if output[i] != input[i] { - differs = true - break - } - } - if differs == false { - t.Error("Cipher.Encrypt: Failed to encrypt the input block.") - return - } - - // Decrypt the block we just encrypted - input = output - output = make([]byte, BlockSize) - c.Decrypt(output, input) - - // Check that the output from decrypt matches our initial input - for i := 0; i < len(input); i++ { - if output[i] != original[i] { - t.Errorf("Decrypted byte %d differed. Expected %02X, got %02X\n", i, original[i], output[i]) - return - } - } -} - -// Test Vectors -type CryptTest struct { - key []byte - plainText []byte - cipherText []byte -} - -var CryptTests = []CryptTest{ - // These were sourced from http://www.freemedialibrary.com/index.php/XTEA_test_vectors - { - []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}, - []byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48}, - []byte{0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5}, - }, - { - []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}, - []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41}, - []byte{0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8}, - }, - { - []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}, - []byte{0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f}, - []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41}, - }, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48}, - []byte{0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5}, - }, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41}, - []byte{0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d}, - }, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55}, - []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41}, - }, - - // These vectors are from http://wiki.secondlife.com/wiki/XTEA_Strong_Encryption_Implementation#Bouncy_Castle_C.23_API - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0xDE, 0xE9, 0xD4, 0xD8, 0xF7, 0x13, 0x1E, 0xD9}, - }, - { - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}, - []byte{0x06, 0x5C, 0x1B, 0x89, 0x75, 0xC6, 0xA8, 0x16}, - }, - { - []byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A}, - []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - []byte{0x1F, 0xF9, 0xA0, 0x26, 0x1A, 0xC6, 0x42, 0x64}, - }, - { - []byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A}, - []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}, - []byte{0x8C, 0x67, 0x15, 0x5B, 0x2E, 0xF9, 0x1E, 0xAD}, - }, -} - -// Test encryption -func TestCipherEncrypt(t *testing.T) { - for i, tt := range CryptTests { - c, err := NewCipher(tt.key) - if err != nil { - t.Errorf("NewCipher(%d bytes), vector %d = %s", len(tt.key), i, err) - continue - } - - out := make([]byte, len(tt.plainText)) - c.Encrypt(out, tt.plainText) - - for j := 0; j < len(out); j++ { - if out[j] != tt.cipherText[j] { - t.Errorf("Cipher.Encrypt %d: out[%d] = %02X, expected %02X", i, j, out[j], tt.cipherText[j]) - break - } - } - } -} - -// Test decryption -func TestCipherDecrypt(t *testing.T) { - for i, tt := range CryptTests { - c, err := NewCipher(tt.key) - if err != nil { - t.Errorf("NewCipher(%d bytes), vector %d = %s", len(tt.key), i, err) - continue - } - - out := make([]byte, len(tt.cipherText)) - c.Decrypt(out, tt.cipherText) - - for j := 0; j < len(out); j++ { - if out[j] != tt.plainText[j] { - t.Errorf("Cipher.Decrypt %d: out[%d] = %02X, expected %02X", i, j, out[j], tt.plainText[j]) - break - } - } - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts.go deleted file mode 100644 index 78c4d4964d..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2012 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 xts implements the XTS cipher mode as specified in IEEE P1619/D16. -// -// XTS mode is typically used for disk encryption, which presents a number of -// novel problems that make more common modes inapplicable. The disk is -// conceptually an array of sectors and we must be able to encrypt and decrypt -// a sector in isolation. However, an attacker must not be able to transpose -// two sectors of plaintext by transposing their ciphertext. -// -// XTS wraps a block cipher with Rogaway's XEX mode in order to build a -// tweakable block cipher. This allows each sector to have a unique tweak and -// effectively create a unique key for each sector. -// -// XTS does not provide any authentication. An attacker can manipulate the -// ciphertext and randomise a block (16 bytes) of the plaintext. -// -// (Note: this package does not implement ciphertext-stealing so sectors must -// be a multiple of 16 bytes.) -package xts - -import ( - "crypto/cipher" - "encoding/binary" - "errors" -) - -// Cipher contains an expanded key structure. It doesn't contain mutable state -// and therefore can be used concurrently. -type Cipher struct { - k1, k2 cipher.Block -} - -// blockSize is the block size that the underlying cipher must have. XTS is -// only defined for 16-byte ciphers. -const blockSize = 16 - -// NewCipher creates a Cipher given a function for creating the underlying -// block cipher (which must have a block size of 16 bytes). The key must be -// twice the length of the underlying cipher's key. -func NewCipher(cipherFunc func([]byte) (cipher.Block, error), key []byte) (c *Cipher, err error) { - c = new(Cipher) - if c.k1, err = cipherFunc(key[:len(key)/2]); err != nil { - return - } - c.k2, err = cipherFunc(key[len(key)/2:]) - - if c.k1.BlockSize() != blockSize { - err = errors.New("xts: cipher does not have a block size of 16") - } - - return -} - -// Encrypt encrypts a sector of plaintext and puts the result into ciphertext. -// Plaintext and ciphertext must overlap entirely or not at all. -// Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes. -func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) { - if len(ciphertext) < len(plaintext) { - panic("xts: ciphertext is smaller than plaintext") - } - if len(plaintext)%blockSize != 0 { - panic("xts: plaintext is not a multiple of the block size") - } - - var tweak [blockSize]byte - binary.LittleEndian.PutUint64(tweak[:8], sectorNum) - - c.k2.Encrypt(tweak[:], tweak[:]) - - for len(plaintext) > 0 { - for j := range tweak { - ciphertext[j] = plaintext[j] ^ tweak[j] - } - c.k1.Encrypt(ciphertext, ciphertext) - for j := range tweak { - ciphertext[j] ^= tweak[j] - } - plaintext = plaintext[blockSize:] - ciphertext = ciphertext[blockSize:] - - mul2(&tweak) - } -} - -// Decrypt decrypts a sector of ciphertext and puts the result into plaintext. -// Plaintext and ciphertext must overlap entirely or not at all. -// Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes. -func (c *Cipher) Decrypt(plaintext, ciphertext []byte, sectorNum uint64) { - if len(plaintext) < len(ciphertext) { - panic("xts: plaintext is smaller than ciphertext") - } - if len(ciphertext)%blockSize != 0 { - panic("xts: ciphertext is not a multiple of the block size") - } - - var tweak [blockSize]byte - binary.LittleEndian.PutUint64(tweak[:8], sectorNum) - - c.k2.Encrypt(tweak[:], tweak[:]) - - for len(ciphertext) > 0 { - for j := range tweak { - plaintext[j] = ciphertext[j] ^ tweak[j] - } - c.k1.Decrypt(plaintext, plaintext) - for j := range tweak { - plaintext[j] ^= tweak[j] - } - plaintext = plaintext[blockSize:] - ciphertext = ciphertext[blockSize:] - - mul2(&tweak) - } -} - -// mul2 multiplies tweak by 2 in GF(2¹²⁸) with an irreducible polynomial of -// x¹²⁸ + x⁷ + x² + x + 1. -func mul2(tweak *[blockSize]byte) { - var carryIn byte - for j := range tweak { - carryOut := tweak[j] >> 7 - tweak[j] = (tweak[j] << 1) + carryIn - carryIn = carryOut - } - if carryIn != 0 { - // If we have a carry bit then we need to subtract a multiple - // of the irreducible polynomial (x¹²⁸ + x⁷ + x² + x + 1). - // By dropping the carry bit, we're subtracting the x^128 term - // so all that remains is to subtract x⁷ + x² + x + 1. - // Subtraction (and addition) in this representation is just - // XOR. - tweak[0] ^= 1<<7 | 1<<2 | 1<<1 | 1 - } -} diff --git a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts_test.go b/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts_test.go deleted file mode 100644 index 96d3b6cbc6..0000000000 --- a/vendor/gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/xts/xts_test.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2012 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 xts - -import ( - "bytes" - "crypto/aes" - "encoding/hex" - "testing" -) - -// These test vectors have been taken from IEEE P1619/D16, Annex B. -var xtsTestVectors = []struct { - key string - sector uint64 - plaintext string - ciphertext string -}{ - { - "0000000000000000000000000000000000000000000000000000000000000000", - 0, - "0000000000000000000000000000000000000000000000000000000000000000", - "917cf69ebd68b2ec9b9fe9a3eadda692cd43d2f59598ed858c02c2652fbf922e", - }, { - "1111111111111111111111111111111122222222222222222222222222222222", - 0x3333333333, - "4444444444444444444444444444444444444444444444444444444444444444", - "c454185e6a16936e39334038acef838bfb186fff7480adc4289382ecd6d394f0", - }, { - "fffefdfcfbfaf9f8f7f6f5f4f3f2f1f022222222222222222222222222222222", - 0x3333333333, - "4444444444444444444444444444444444444444444444444444444444444444", - "af85336b597afc1a900b2eb21ec949d292df4c047e0b21532186a5971a227a89", - }, { - "2718281828459045235360287471352631415926535897932384626433832795", - 0, - "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", - "27a7479befa1d476489f308cd4cfa6e2a96e4bbe3208ff25287dd3819616e89cc78cf7f5e543445f8333d8fa7f56000005279fa5d8b5e4ad40e736ddb4d35412328063fd2aab53e5ea1e0a9f332500a5df9487d07a5c92cc512c8866c7e860ce93fdf166a24912b422976146ae20ce846bb7dc9ba94a767aaef20c0d61ad02655ea92dc4c4e41a8952c651d33174be51a10c421110e6d81588ede82103a252d8a750e8768defffed9122810aaeb99f9172af82b604dc4b8e51bcb08235a6f4341332e4ca60482a4ba1a03b3e65008fc5da76b70bf1690db4eae29c5f1badd03c5ccf2a55d705ddcd86d449511ceb7ec30bf12b1fa35b913f9f747a8afd1b130e94bff94effd01a91735ca1726acd0b197c4e5b03393697e126826fb6bbde8ecc1e08298516e2c9ed03ff3c1b7860f6de76d4cecd94c8119855ef5297ca67e9f3e7ff72b1e99785ca0a7e7720c5b36dc6d72cac9574c8cbbc2f801e23e56fd344b07f22154beba0f08ce8891e643ed995c94d9a69c9f1b5f499027a78572aeebd74d20cc39881c213ee770b1010e4bea718846977ae119f7a023ab58cca0ad752afe656bb3c17256a9f6e9bf19fdd5a38fc82bbe872c5539edb609ef4f79c203ebb140f2e583cb2ad15b4aa5b655016a8449277dbd477ef2c8d6c017db738b18deb4a427d1923ce3ff262735779a418f20a282df920147beabe421ee5319d0568", - }, { - "2718281828459045235360287471352631415926535897932384626433832795", - 1, - "27a7479befa1d476489f308cd4cfa6e2a96e4bbe3208ff25287dd3819616e89cc78cf7f5e543445f8333d8fa7f56000005279fa5d8b5e4ad40e736ddb4d35412328063fd2aab53e5ea1e0a9f332500a5df9487d07a5c92cc512c8866c7e860ce93fdf166a24912b422976146ae20ce846bb7dc9ba94a767aaef20c0d61ad02655ea92dc4c4e41a8952c651d33174be51a10c421110e6d81588ede82103a252d8a750e8768defffed9122810aaeb99f9172af82b604dc4b8e51bcb08235a6f4341332e4ca60482a4ba1a03b3e65008fc5da76b70bf1690db4eae29c5f1badd03c5ccf2a55d705ddcd86d449511ceb7ec30bf12b1fa35b913f9f747a8afd1b130e94bff94effd01a91735ca1726acd0b197c4e5b03393697e126826fb6bbde8ecc1e08298516e2c9ed03ff3c1b7860f6de76d4cecd94c8119855ef5297ca67e9f3e7ff72b1e99785ca0a7e7720c5b36dc6d72cac9574c8cbbc2f801e23e56fd344b07f22154beba0f08ce8891e643ed995c94d9a69c9f1b5f499027a78572aeebd74d20cc39881c213ee770b1010e4bea718846977ae119f7a023ab58cca0ad752afe656bb3c17256a9f6e9bf19fdd5a38fc82bbe872c5539edb609ef4f79c203ebb140f2e583cb2ad15b4aa5b655016a8449277dbd477ef2c8d6c017db738b18deb4a427d1923ce3ff262735779a418f20a282df920147beabe421ee5319d0568", - "264d3ca8512194fec312c8c9891f279fefdd608d0c027b60483a3fa811d65ee59d52d9e40ec5672d81532b38b6b089ce951f0f9c35590b8b978d175213f329bb1c2fd30f2f7f30492a61a532a79f51d36f5e31a7c9a12c286082ff7d2394d18f783e1a8e72c722caaaa52d8f065657d2631fd25bfd8e5baad6e527d763517501c68c5edc3cdd55435c532d7125c8614deed9adaa3acade5888b87bef641c4c994c8091b5bcd387f3963fb5bc37aa922fbfe3df4e5b915e6eb514717bdd2a74079a5073f5c4bfd46adf7d282e7a393a52579d11a028da4d9cd9c77124f9648ee383b1ac763930e7162a8d37f350b2f74b8472cf09902063c6b32e8c2d9290cefbd7346d1c779a0df50edcde4531da07b099c638e83a755944df2aef1aa31752fd323dcb710fb4bfbb9d22b925bc3577e1b8949e729a90bbafeacf7f7879e7b1147e28ba0bae940db795a61b15ecf4df8db07b824bb062802cc98a9545bb2aaeed77cb3fc6db15dcd7d80d7d5bc406c4970a3478ada8899b329198eb61c193fb6275aa8ca340344a75a862aebe92eee1ce032fd950b47d7704a3876923b4ad62844bf4a09c4dbe8b4397184b7471360c9564880aedddb9baa4af2e75394b08cd32ff479c57a07d3eab5d54de5f9738b8d27f27a9f0ab11799d7b7ffefb2704c95c6ad12c39f1e867a4b7b1d7818a4b753dfd2a89ccb45e001a03a867b187f225dd", - }, { - "27182818284590452353602874713526624977572470936999595749669676273141592653589793238462643383279502884197169399375105820974944592", - 0xff, - "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", - "1c3b3a102f770386e4836c99e370cf9bea00803f5e482357a4ae12d414a3e63b5d31e276f8fe4a8d66b317f9ac683f44680a86ac35adfc3345befecb4bb188fd5776926c49a3095eb108fd1098baec70aaa66999a72a82f27d848b21d4a741b0c5cd4d5fff9dac89aeba122961d03a757123e9870f8acf1000020887891429ca2a3e7a7d7df7b10355165c8b9a6d0a7de8b062c4500dc4cd120c0f7418dae3d0b5781c34803fa75421c790dfe1de1834f280d7667b327f6c8cd7557e12ac3a0f93ec05c52e0493ef31a12d3d9260f79a289d6a379bc70c50841473d1a8cc81ec583e9645e07b8d9670655ba5bbcfecc6dc3966380ad8fecb17b6ba02469a020a84e18e8f84252070c13e9f1f289be54fbc481457778f616015e1327a02b140f1505eb309326d68378f8374595c849d84f4c333ec4423885143cb47bd71c5edae9be69a2ffeceb1bec9de244fbe15992b11b77c040f12bd8f6a975a44a0f90c29a9abc3d4d893927284c58754cce294529f8614dcd2aba991925fedc4ae74ffac6e333b93eb4aff0479da9a410e4450e0dd7ae4c6e2910900575da401fc07059f645e8b7e9bfdef33943054ff84011493c27b3429eaedb4ed5376441a77ed43851ad77f16f541dfd269d50d6a5f14fb0aab1cbb4c1550be97f7ab4066193c4caa773dad38014bd2092fa755c824bb5e54c4f36ffda9fcea70b9c6e693e148c151", - }, -} - -func fromHex(s string) []byte { - ret, err := hex.DecodeString(s) - if err != nil { - panic("xts: invalid hex in test") - } - return ret -} - -func TestXTS(t *testing.T) { - for i, test := range xtsTestVectors { - c, err := NewCipher(aes.NewCipher, fromHex(test.key)) - if err != nil { - t.Errorf("#%d: failed to create cipher: %s", i, err) - continue - } - plaintext := fromHex(test.plaintext) - ciphertext := make([]byte, len(plaintext)) - c.Encrypt(ciphertext, plaintext, test.sector) - - expectedCiphertext := fromHex(test.ciphertext) - if !bytes.Equal(ciphertext, expectedCiphertext) { - t.Errorf("#%d: encrypted failed, got: %x, want: %x", i, ciphertext, expectedCiphertext) - continue - } - - decrypted := make([]byte, len(ciphertext)) - c.Decrypt(decrypted, ciphertext, test.sector) - if !bytes.Equal(decrypted, plaintext) { - t.Errorf("#%d: decryption failed, got: %x, want: %x", i, decrypted, plaintext) - } - } -} - -func TestShorterCiphertext(t *testing.T) { - // Decrypt used to panic if the input was shorter than the output. See - // https://go-review.googlesource.com/c/39954/ - c, err := NewCipher(aes.NewCipher, make([]byte, 32)) - if err != nil { - t.Fatalf("NewCipher failed: %s", err) - } - - plaintext := make([]byte, 32) - encrypted := make([]byte, 48) - decrypted := make([]byte, 48) - - c.Encrypt(encrypted, plaintext, 0) - c.Decrypt(decrypted, encrypted[:len(plaintext)], 0) - - if !bytes.Equal(plaintext, decrypted[:len(plaintext)]) { - t.Errorf("En/Decryption is not inverse") - } -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/LICENSE b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/LICENSE deleted file mode 100644 index cb7829a2c5..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2017 Denis Subbotin -Copyright (c) 2017 Nika Jones -Copyright (c) 2017 Philip Schlump - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/README.md b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/README.md deleted file mode 100644 index f9923c1245..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# base58 A Fast Implementation of Base58 encoding used in Bitcoin - -Fast implementation of base58 encoding in Go (Golang). - -Base algorithm is copied from https://github.com/trezor/trezor-crypto/blob/master/base58.c - -To import library - -```go - import ( - "github.com/mr-tron/base58/base58" - ) -``` - -# Example - -```go - -package main - -import ( - "fmt" - "os" - - "github.com/mr-tron/base58/base58" -) - -func main() { - - exampleBase58Encoded := []string{ - "1QCaxc8hutpdZ62iKZsn1TCG3nh7uPZojq", - "1DhRmSGnhPjUaVPAj48zgPV9e2oRhAQFUb", - "17LN2oPYRYsXS9TdYdXCCDvF2FegshLDU2", - "14h2bDLZSuvRFhUL45VjPHJcW667mmRAAn", - } - - // If a base58 string is on the command line, then use that instead of the 4 exampels above. - if len(os.Args) > 1 { - exampleBase58Encoded = os.Args[1:] - } - - for _, vv := range exampleBase58Encoded { - num, err := base58.Decode(vv) - if err != nil { - fmt.Printf("Demo %d, got error %s\n", err) - continue - } - chk := base58.Encode(num) - if vv == string(chk) { - fmt.Printf ( "Successfully decoded then re-encoded %s\n", vv ) - } else { - fmt.Printf ( "Failed on %s\n", vv ) - } - } -} - -``` diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_2_test.go b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_2_test.go deleted file mode 100644 index ac7f7b00d5..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_2_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package base58 - -import "testing" - -func TestBase58_test2(t *testing.T) { - - testAddr := []string{ - "1QCaxc8hutpdZ62iKZsn1TCG3nh7uPZojq", - "1DhRmSGnhPjUaVPAj48zgPV9e2oRhAQFUb", - "17LN2oPYRYsXS9TdYdXCCDvF2FegshLDU2", - "14h2bDLZSuvRFhUL45VjPHJcW667mmRAAn", - } - - for ii, vv := range testAddr { - // num := Base58Decode([]byte(vv)) - // chk := Base58Encode(num) - num, err := FastBase58Decoding(vv) - if err != nil { - t.Errorf("Test %d, expected success, got error %s\n", ii, err) - } - chk := FastBase58Encoding(num) - if vv != string(chk) { - t.Errorf("Test %d, expected=%s got=%s Address did base58 encode/decode correctly.", ii, vv, chk) - } - } -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_test.go b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_test.go deleted file mode 100644 index 3dcfbf4cba..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58/base58_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package base58 - -import ( - "crypto/rand" - "encoding/hex" - "testing" -) - -type testValues struct { - dec []byte - enc string -} - -var n = 5000000 -var testPairs = make([]testValues, 0, n) - -func initTestPairs() { - if len(testPairs) > 0 { - return - } - // pre-make the test pairs, so it doesn't take up benchmark time... - data := make([]byte, 32) - for i := 0; i < n; i++ { - rand.Read(data) - testPairs = append(testPairs, testValues{dec: data, enc: FastBase58Encoding(data)}) - } -} - -func randAlphabet() *Alphabet { - // Permutes [0, 127] and returns the first 58 elements. - // Like (math/rand).Perm but using crypto/rand. - var randomness [128]byte - rand.Read(randomness[:]) - - var bts [128]byte - for i, r := range randomness { - j := int(r) % (i + 1) - bts[i] = bts[j] - bts[j] = byte(i) - } - return NewAlphabet(string(bts[:58])) -} - -func TestFastEqTrivialEncodingAndDecoding(t *testing.T) { - for k := 0; k < 10; k++ { - testEncDecLoop(t, randAlphabet()) - } - testEncDecLoop(t, BTCAlphabet) - testEncDecLoop(t, FlickrAlphabet) -} - -func testEncDecLoop(t *testing.T, alph *Alphabet) { - for j := 1; j < 256; j++ { - var b = make([]byte, j) - for i := 0; i < 100; i++ { - rand.Read(b) - fe := FastBase58EncodingAlphabet(b, alph) - te := TrivialBase58EncodingAlphabet(b, alph) - - if fe != te { - t.Errorf("encoding err: %#v", hex.EncodeToString(b)) - } - - fd, ferr := FastBase58DecodingAlphabet(fe, alph) - if ferr != nil { - t.Errorf("fast error: %v", ferr) - } - td, terr := TrivialBase58DecodingAlphabet(te, alph) - if terr != nil { - t.Errorf("trivial error: %v", terr) - } - - if hex.EncodeToString(b) != hex.EncodeToString(td) { - t.Errorf("decoding err: %s != %s", hex.EncodeToString(b), hex.EncodeToString(td)) - } - if hex.EncodeToString(b) != hex.EncodeToString(fd) { - t.Errorf("decoding err: %s != %s", hex.EncodeToString(b), hex.EncodeToString(fd)) - } - } - } -} - -func BenchmarkTrivialBase58Encoding(b *testing.B) { - initTestPairs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - TrivialBase58Encoding([]byte(testPairs[i].dec)) - } -} - -func BenchmarkFastBase58Encoding(b *testing.B) { - initTestPairs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - FastBase58Encoding(testPairs[i].dec) - } -} - -func BenchmarkTrivialBase58Decoding(b *testing.B) { - initTestPairs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - TrivialBase58Decoding(testPairs[i].enc) - } -} - -func BenchmarkFastBase58Decoding(b *testing.B) { - initTestPairs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - FastBase58Decoding(testPairs[i].enc) - } -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/.gitignore b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/.gitignore deleted file mode 100644 index 573c0c4f25..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cli diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/cli.go b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/cli.go deleted file mode 100644 index 2fee32b0e6..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/example/cli/cli.go +++ /dev/null @@ -1,37 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" -) - -func main() { - - exampleBase58Encoded := []string{ - "1QCaxc8hutpdZ62iKZsn1TCG3nh7uPZojq", - "1DhRmSGnhPjUaVPAj48zgPV9e2oRhAQFUb", - "17LN2oPYRYsXS9TdYdXCCDvF2FegshLDU2", - "14h2bDLZSuvRFhUL45VjPHJcW667mmRAAn", - } - - // If a base58 string is on the command line, then use that instead of the 4 exampels above. - if len(os.Args) > 1 { - exampleBase58Encoded = os.Args[1:] - } - - for _, vv := range exampleBase58Encoded { - num, err := base58.Decode(vv) - if err != nil { - fmt.Printf("Demo %d, got error %s\n", err) - continue - } - chk := base58.Encode(num) - if vv == string(chk) { - fmt.Printf("Successfully decoded then re-encoded %s\n", vv) - } else { - fmt.Printf("Failed on %s\n", vv) - } - } -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/exchangerates/exchange_rates.go b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/exchangerates/exchange_rates.go deleted file mode 100644 index 0ec68f05f2..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/exchangerates/exchange_rates.go +++ /dev/null @@ -1,337 +0,0 @@ -package exchangerates - -import ( - "encoding/json" - "errors" - "net" - "net/http" - "reflect" - "strconv" - "sync" - "time" - - "strings" - - exchange "github.com/OpenBazaar/spvwallet/exchangerates" - "golang.org/x/net/proxy" -) - -type ExchangeRateProvider struct { - fetchUrl string - cache map[string]float64 - client *http.Client - decoder ExchangeRateDecoder - bitcoinProvider *exchange.BitcoinPriceFetcher -} - -type ExchangeRateDecoder interface { - decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) -} - -type OpenBazaarDecoder struct{} -type KrakenDecoder struct{} -type PoloniexDecoder struct{} -type BitfinexDecoder struct{} -type BittrexDecoder struct{} - -type ZcashPriceFetcher struct { - sync.Mutex - cache map[string]float64 - providers []*ExchangeRateProvider -} - -func NewZcashPriceFetcher(dialer proxy.Dialer) *ZcashPriceFetcher { - bp := exchange.NewBitcoinPriceFetcher(dialer) - z := ZcashPriceFetcher{ - cache: make(map[string]float64), - } - dial := net.Dial - if dialer != nil { - dial = dialer.Dial - } - tbTransport := &http.Transport{Dial: dial} - client := &http.Client{Transport: tbTransport, Timeout: time.Minute} - - z.providers = []*ExchangeRateProvider{ - {"https://ticker.openbazaar.org/api", z.cache, client, OpenBazaarDecoder{}, nil}, - {"https://bittrex.com/api/v1.1/public/getticker?market=btc-zec", z.cache, client, BittrexDecoder{}, bp}, - {"https://api.bitfinex.com/v1/pubticker/zecbtc", z.cache, client, BitfinexDecoder{}, bp}, - {"https://poloniex.com/public?command=returnTicker", z.cache, client, PoloniexDecoder{}, bp}, - {"https://api.kraken.com/0/public/Ticker?pair=ZECXBT", z.cache, client, KrakenDecoder{}, bp}, - } - go z.run() - return &z -} - -func (z *ZcashPriceFetcher) GetExchangeRate(currencyCode string) (float64, error) { - currencyCode = NormalizeCurrencyCode(currencyCode) - - z.Lock() - defer z.Unlock() - price, ok := z.cache[currencyCode] - if !ok { - return 0, errors.New("Currency not tracked") - } - return price, nil -} - -func (z *ZcashPriceFetcher) GetLatestRate(currencyCode string) (float64, error) { - currencyCode = NormalizeCurrencyCode(currencyCode) - - z.fetchCurrentRates() - z.Lock() - defer z.Unlock() - price, ok := z.cache[currencyCode] - if !ok { - return 0, errors.New("Currency not tracked") - } - return price, nil -} - -func (z *ZcashPriceFetcher) GetAllRates(cacheOK bool) (map[string]float64, error) { - if !cacheOK { - err := z.fetchCurrentRates() - if err != nil { - return nil, err - } - } - z.Lock() - defer z.Unlock() - return z.cache, nil -} - -func (z *ZcashPriceFetcher) UnitsPerCoin() int { - return exchange.SatoshiPerBTC -} - -func (z *ZcashPriceFetcher) fetchCurrentRates() error { - z.Lock() - defer z.Unlock() - for _, provider := range z.providers { - err := provider.fetch() - if err == nil { - return nil - } - } - return errors.New("All exchange rate API queries failed") -} - -func (z *ZcashPriceFetcher) run() { - z.fetchCurrentRates() - ticker := time.NewTicker(time.Minute * 15) - for range ticker.C { - z.fetchCurrentRates() - } -} - -func (provider *ExchangeRateProvider) fetch() (err error) { - if len(provider.fetchUrl) == 0 { - err = errors.New("Provider has no fetchUrl") - return err - } - resp, err := provider.client.Get(provider.fetchUrl) - if err != nil { - return err - } - decoder := json.NewDecoder(resp.Body) - var dataMap interface{} - err = decoder.Decode(&dataMap) - if err != nil { - return err - } - return provider.decoder.decode(dataMap, provider.cache, provider.bitcoinProvider) -} - -func (b OpenBazaarDecoder) decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) { - data, ok := dat.(map[string]interface{}) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - - zec, ok := data["ZEC"] - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed, missing 'ZEC' field") - } - val, ok := zec.(map[string]interface{}) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - zecRate, ok := val["last"].(float64) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed, missing 'last' (float) field") - } - for k, v := range data { - if k != "timestamp" { - val, ok := v.(map[string]interface{}) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - price, ok := val["last"].(float64) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed, missing 'last' (float) field") - } - cache[k] = price * (1 / zecRate) - } - } - return nil -} - -func (b KrakenDecoder) decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) { - rates, err := bp.GetAllRates(false) - if err != nil { - return err - } - obj, ok := dat.(map[string]interface{}) - if !ok { - return errors.New("KrackenDecoder type assertion failure") - } - result, ok := obj["result"] - if !ok { - return errors.New("KrakenDecoder: field `result` not found") - } - resultMap, ok := result.(map[string]interface{}) - if !ok { - return errors.New("KrackenDecoder type assertion failure") - } - pair, ok := resultMap["BCHXBT"] - if !ok { - return errors.New("KrakenDecoder: field `BCHXBT` not found") - } - pairMap, ok := pair.(map[string]interface{}) - if !ok { - return errors.New("KrackenDecoder type assertion failure") - } - c, ok := pairMap["c"] - if !ok { - return errors.New("KrakenDecoder: field `c` not found") - } - cList, ok := c.([]interface{}) - if !ok { - return errors.New("KrackenDecoder type assertion failure") - } - rateStr, ok := cList[0].(string) - if !ok { - return errors.New("KrackenDecoder type assertion failure") - } - price, err := strconv.ParseFloat(rateStr, 64) - if err != nil { - return err - } - rate := price - - if rate == 0 { - return errors.New("Bitcoin-ZCash price data not available") - } - for k, v := range rates { - cache[k] = v * rate - } - return nil -} - -func (b BitfinexDecoder) decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) { - rates, err := bp.GetAllRates(false) - if err != nil { - return err - } - obj, ok := dat.(map[string]interface{}) - if !ok { - return errors.New("BitfinexDecoder type assertion failure") - } - r, ok := obj["last_price"] - if !ok { - return errors.New("BitfinexDecoder: field `last_price` not found") - } - rateStr, ok := r.(string) - if !ok { - return errors.New("BitfinexDecoder type assertion failure") - } - price, err := strconv.ParseFloat(rateStr, 64) - if err != nil { - return err - } - rate := price - - if rate == 0 { - return errors.New("Bitcoin-ZCash price data not available") - } - for k, v := range rates { - cache[k] = v * rate - } - return nil -} - -func (b BittrexDecoder) decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) { - rates, err := bp.GetAllRates(false) - if err != nil { - return err - } - obj, ok := dat.(map[string]interface{}) - if !ok { - return errors.New("BittrexDecoder type assertion failure") - } - result, ok := obj["result"] - if !ok { - return errors.New("BittrexDecoder: field `result` not found") - } - resultMap, ok := result.(map[string]interface{}) - if !ok { - return errors.New("BittrexDecoder type assertion failure") - } - exRate, ok := resultMap["Last"] - if !ok { - return errors.New("BittrexDecoder: field `Last` not found") - } - rate, ok := exRate.(float64) - if !ok { - return errors.New("BittrexDecoder type assertion failure") - } - - if rate == 0 { - return errors.New("Bitcoin-ZCash price data not available") - } - for k, v := range rates { - cache[k] = v * rate - } - return nil -} - -func (b PoloniexDecoder) decode(dat interface{}, cache map[string]float64, bp *exchange.BitcoinPriceFetcher) (err error) { - rates, err := bp.GetAllRates(false) - if err != nil { - return err - } - data, ok := dat.(map[string]interface{}) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - var rate float64 - v, ok := data["BTC_ZEC"] - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - val, ok := v.(map[string]interface{}) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed") - } - s, ok := val["last"].(string) - if !ok { - return errors.New(reflect.TypeOf(b).Name() + ".decode: Type assertion failed, missing 'last' (string) field") - } - price, err := strconv.ParseFloat(s, 64) - if err != nil { - return err - } - rate = price - if rate == 0 { - return errors.New("Bitcoin-Zcash price data not available") - } - for k, v := range rates { - cache[k] = v * rate - } - return nil -} - -// NormalizeCurrencyCode standardizes the format for the given currency code -func NormalizeCurrencyCode(currencyCode string) string { - return strings.ToUpper(currencyCode) -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/main.go b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/main.go deleted file mode 100644 index fd46f655e8..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/main.go +++ /dev/null @@ -1,112 +0,0 @@ -package main - -import ( - "bytes" - "crypto/sha256" - "encoding/hex" - "flag" - "fmt" - "io" - "io/ioutil" - "os" - - "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" -) - -func checkSum(b []byte) []byte { - sh1, sh2 := sha256.New(), sha256.New() - sh1.Write(b) - sh2.Write(sh1.Sum(nil)) - return sh2.Sum(nil) -} - -func main() { - var ( - err error - bin []byte - - help = flag.Bool("h", false, "display this message") - lnBreak = flag.Int("b", 76, "break encoded string into num character lines. Use 0 to disable line wrapping") - input = flag.String("i", "-", `input file (use: "-" for stdin)`) - output = flag.String("o", "-", `output file (use: "-" for stdout)`) - decode = flag.Bool("d", false, `decode input`) - check = flag.Bool("k", false, `use sha256 check`) - useError = flag.Bool("e", false, `write error to stderr`) - ) - - flag.Parse() - - if *help { - flag.Usage() - os.Exit(0) - } - - fin, fout := os.Stdin, os.Stdout - if *input != "-" { - if fin, err = os.Open(*input); err != nil { - fmt.Fprintf(os.Stderr, "input file err: %v\n", err) - os.Exit(1) - } - } - - if *output != "-" { - if fout, err = os.Create(*output); err != nil { - fmt.Fprintf(os.Stderr, "output file err: %v\n", err) - os.Exit(1) - } - } - - if bin, err = ioutil.ReadAll(fin); err != nil { - fmt.Fprintf(os.Stderr, "read input err: %v\n", err) - os.Exit(1) - } - - if *decode { - decoded, err := base58.FastBase58Decoding(string(bin)) - if err != nil { - fmt.Fprintf(os.Stderr, "decode input err: %v\n", err) - os.Exit(1) - } - - var checkResult bool - if *check { - chk := len(decoded) - 4 - decodedCk := decoded[chk:] - decoded = decoded[:chk] - sum := checkSum(decoded) - checkResult = hex.EncodeToString(sum[:4]) == hex.EncodeToString(decodedCk) - } - - io.Copy(fout, bytes.NewReader(decoded)) - - if *check && !checkResult { - if *useError { - fmt.Fprintf(os.Stderr, "%t", false) - } - os.Exit(3) - } - - os.Exit(0) - } - - if *check { - sum := checkSum(bin) - bin = append(bin, sum[:4]...) - } - - encoded := base58.FastBase58Encoding(bin) - - if *lnBreak > 0 { - lines := (len(encoded) / *lnBreak) + 1 - for i := 0; i < lines; i++ { - start := i * *lnBreak - end := start + *lnBreak - if i == lines-1 { - fmt.Fprintln(fout, encoded[start:]) - return - } - fmt.Fprintln(fout, encoded[start:end]) - } - } - fmt.Fprintln(fout, encoded) -} diff --git a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/package.json b/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/package.json deleted file mode 100644 index 9d16cf88ea..0000000000 --- a/vendor/gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "mr-tron", - "bugs": { - "url": "github.com/mr-tron/base58/issues" - }, - "gx": { - "dvcsimport": "github.com/mr-tron/base58" - }, - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-base58-fast", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.1" -} - diff --git a/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/.travis.yml b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/.travis.yml new file mode 100644 index 0000000000..3196115f36 --- /dev/null +++ b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/LICENSE b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/LICENSE rename to vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/LICENSE diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/Makefile b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/Makefile similarity index 100% rename from vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/Makefile rename to vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/Makefile diff --git a/vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/README.md b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/README.md similarity index 100% rename from vendor/gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex/README.md rename to vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/README.md diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/codecov.yml b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/codecov.yml rename to vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/codecov.yml diff --git a/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/multiplex.go b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/multiplex.go new file mode 100644 index 0000000000..d46e67431c --- /dev/null +++ b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/multiplex.go @@ -0,0 +1,454 @@ +package multiplex + +import ( + "bufio" + "context" + "encoding/binary" + "errors" + "fmt" + "io" + "net" + "sync" + "time" + + pool "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("mplex") + +var MaxMessageSize = 1 << 20 + +// Max time to block waiting for a slow reader to read from a stream before +// resetting it. Preferably, we'd have some form of back-pressure mechanism but +// we don't have that in this protocol. +var ReceiveTimeout = 5 * time.Second + +// ErrShutdown is returned when operating on a shutdown session +var ErrShutdown = errors.New("session shut down") + +// ErrTwoInitiators is returned when both sides think they're the initiator +var ErrTwoInitiators = errors.New("two initiators") + +// ErrInvalidState is returned when the other side does something it shouldn't. +// In this case, we close the connection to be safe. +var ErrInvalidState = errors.New("received an unexpected message from the peer") + +// +1 for initiator +const ( + newStreamTag = 0 + messageTag = 2 + closeTag = 4 + resetTag = 6 +) + +// Multiplex is a mplex session. +type Multiplex struct { + con net.Conn + buf *bufio.Reader + nextID uint64 + initiator bool + + closed chan struct{} + shutdown chan struct{} + shutdownErr error + shutdownLock sync.Mutex + + wrTkn chan struct{} + + nstreams chan *Stream + + channels map[streamID]*Stream + chLock sync.Mutex +} + +// NewMultiplex creates a new multiplexer session. +func NewMultiplex(con net.Conn, initiator bool) *Multiplex { + mp := &Multiplex{ + con: con, + initiator: initiator, + buf: bufio.NewReader(con), + channels: make(map[streamID]*Stream), + closed: make(chan struct{}), + shutdown: make(chan struct{}), + wrTkn: make(chan struct{}, 1), + nstreams: make(chan *Stream, 16), + } + + go mp.handleIncoming() + + mp.wrTkn <- struct{}{} + + return mp +} + +func (mp *Multiplex) newStream(id streamID, name string) (s *Stream) { + s = &Stream{ + id: id, + name: name, + dataIn: make(chan []byte, 8), + reset: make(chan struct{}), + mp: mp, + } + + s.closedLocal, s.doCloseLocal = context.WithCancel(context.Background()) + return +} + +// Accept accepts the next stream from the connection. +func (m *Multiplex) Accept() (*Stream, error) { + select { + case s, ok := <-m.nstreams: + if !ok { + return nil, errors.New("multiplex closed") + } + return s, nil + case <-m.closed: + return nil, m.shutdownErr + } +} + +// Close closes the session. +func (mp *Multiplex) Close() error { + mp.closeNoWait() + + // Wait for the receive loop to finish. + <-mp.closed + + return nil +} + +func (mp *Multiplex) closeNoWait() { + mp.shutdownLock.Lock() + select { + case <-mp.shutdown: + default: + mp.con.Close() + close(mp.shutdown) + } + mp.shutdownLock.Unlock() +} + +// IsClosed returns true if the session is closed. +func (mp *Multiplex) IsClosed() bool { + select { + case <-mp.closed: + return true + default: + return false + } +} + +func (mp *Multiplex) sendMsg(ctx context.Context, header uint64, data []byte) error { + select { + case tkn := <-mp.wrTkn: + defer func() { mp.wrTkn <- tkn }() + case <-ctx.Done(): + return ctx.Err() + } + + dl, hasDl := ctx.Deadline() + if hasDl { + if err := mp.con.SetWriteDeadline(dl); err != nil { + return err + } + } + buf := pool.Get(len(data) + 20) + defer pool.Put(buf) + + n := 0 + n += binary.PutUvarint(buf[n:], header) + n += binary.PutUvarint(buf[n:], uint64(len(data))) + n += copy(buf[n:], data) + + written, err := mp.con.Write(buf[:n]) + if err != nil && written > 0 { + // Bail. We've written partial message and can't do anything + // about this. + mp.con.Close() + return err + } + + if hasDl { + // only return this error if we don't *already* have an error from the write. + if err2 := mp.con.SetWriteDeadline(time.Time{}); err == nil && err2 != nil { + return err2 + } + } + + return err +} + +func (mp *Multiplex) nextChanID() uint64 { + out := mp.nextID + mp.nextID++ + return out +} + +// NewStream creates a new stream. +func (mp *Multiplex) NewStream() (*Stream, error) { + return mp.NewNamedStream("") +} + +// NewNamedStream creates a new named stream. +func (mp *Multiplex) NewNamedStream(name string) (*Stream, error) { + mp.chLock.Lock() + + // We could call IsClosed but this is faster (given that we already have + // the lock). + if mp.channels == nil { + mp.chLock.Unlock() + return nil, ErrShutdown + } + + sid := mp.nextChanID() + header := (sid << 3) | newStreamTag + + if name == "" { + name = fmt.Sprint(sid) + } + s := mp.newStream(streamID{ + id: sid, + initiator: true, + }, name) + mp.channels[s.id] = s + mp.chLock.Unlock() + + err := mp.sendMsg(context.Background(), header, []byte(name)) + if err != nil { + return nil, err + } + + return s, nil +} + +func (mp *Multiplex) cleanup() { + mp.closeNoWait() + mp.chLock.Lock() + defer mp.chLock.Unlock() + for _, msch := range mp.channels { + msch.clLock.Lock() + if !msch.closedRemote { + msch.closedRemote = true + // Cancel readers + close(msch.reset) + } + + msch.doCloseLocal() + msch.clLock.Unlock() + } + // Don't remove this nil assignment. We check if this is nil to check if + // the connection is closed when we already have the lock (faster than + // checking if the stream is closed). + mp.channels = nil + if mp.shutdownErr == nil { + mp.shutdownErr = ErrShutdown + } + close(mp.closed) +} + +func (mp *Multiplex) handleIncoming() { + defer mp.cleanup() + + recvTimeout := time.NewTimer(0) + defer recvTimeout.Stop() + + if !recvTimeout.Stop() { + <-recvTimeout.C + } + + for { + chID, tag, err := mp.readNextHeader() + if err != nil { + mp.shutdownErr = err + return + } + + remoteIsInitiator := tag&1 == 0 + ch := streamID{ + // true if *I'm* the initiator. + initiator: !remoteIsInitiator, + id: chID, + } + // Rounds up the tag: + // 0 -> 0 + // 1 -> 2 + // 2 -> 2 + // 3 -> 4 + // etc... + tag += (tag & 1) + + b, err := mp.readNext() + if err != nil { + mp.shutdownErr = err + return + } + + mp.chLock.Lock() + msch, ok := mp.channels[ch] + mp.chLock.Unlock() + + switch tag { + case newStreamTag: + if ok { + log.Debugf("received NewStream message for existing stream: %d", ch) + mp.shutdownErr = ErrInvalidState + return + } + + name := string(b) + pool.Put(b) + + msch = mp.newStream(ch, name) + mp.chLock.Lock() + mp.channels[ch] = msch + mp.chLock.Unlock() + select { + case mp.nstreams <- msch: + case <-mp.shutdown: + return + } + + case resetTag: + if !ok { + // This is *ok*. We forget the stream on reset. + continue + } + msch.clLock.Lock() + + // Honestly, this check should never be true... It means we've leaked. + // However, this is an error on *our* side so we shouldn't just bail. + isClosed := msch.isClosed() + if isClosed && msch.closedRemote { + msch.clLock.Unlock() + log.Errorf("leaked a completely closed stream") + continue + } + + if !msch.closedRemote { + close(msch.reset) + } + msch.closedRemote = true + msch.doCloseLocal() + + msch.clLock.Unlock() + + mp.chLock.Lock() + delete(mp.channels, ch) + mp.chLock.Unlock() + case closeTag: + if !ok { + continue + } + + msch.clLock.Lock() + + if msch.closedRemote { + msch.clLock.Unlock() + // Technically a bug on the other side. We + // should consider killing the connection. + continue + } + + close(msch.dataIn) + msch.closedRemote = true + + cleanup := msch.isClosed() + + msch.clLock.Unlock() + + if cleanup { + mp.chLock.Lock() + delete(mp.channels, ch) + mp.chLock.Unlock() + } + case messageTag: + if !ok { + // reset stream, return b + pool.Put(b) + + // This is a perfectly valid case when we reset + // and forget about the stream. + log.Debugf("message for non-existant stream, dropping data: %d", ch) + go mp.sendMsg(context.Background(), ch.header(resetTag), nil) + continue + } + + msch.clLock.Lock() + remoteClosed := msch.closedRemote + msch.clLock.Unlock() + if remoteClosed { + // closed stream, return b + pool.Put(b) + + log.Errorf("Received data from remote after stream was closed by them. (len = %d)", len(b)) + go mp.sendMsg(context.Background(), msch.id.header(resetTag), nil) + continue + } + + recvTimeout.Reset(ReceiveTimeout) + select { + case msch.dataIn <- b: + case <-msch.reset: + pool.Put(b) + case <-recvTimeout.C: + pool.Put(b) + log.Warningf("timed out receiving message into stream queue.") + // Do not do this asynchronously. Otherwise, we + // could drop a message, then receive a message, + // then reset. + msch.Reset() + continue + case <-mp.shutdown: + pool.Put(b) + return + } + if !recvTimeout.Stop() { + <-recvTimeout.C + } + default: + log.Debugf("message with unknown header on stream %s", ch) + if ok { + msch.Reset() + } + } + } +} + +func (mp *Multiplex) readNextHeader() (uint64, uint64, error) { + h, err := binary.ReadUvarint(mp.buf) + if err != nil { + return 0, 0, err + } + + // get channel ID + ch := h >> 3 + + rem := h & 7 + + return ch, rem, nil +} + +func (mp *Multiplex) readNext() ([]byte, error) { + // get length + l, err := binary.ReadUvarint(mp.buf) + if err != nil { + return nil, err + } + + if l > uint64(MaxMessageSize) { + return nil, fmt.Errorf("message size too large!") + } + + if l == 0 { + return nil, nil + } + + buf := pool.Get(int(l)) + n, err := io.ReadFull(mp.buf, buf) + if err != nil { + return nil, err + } + + return buf[:n], nil +} diff --git a/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/package.json b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/package.json new file mode 100644 index 0000000000..3184646f71 --- /dev/null +++ b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/package.json @@ -0,0 +1,35 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-mplex" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-mplex" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "Stebalien", + "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", + "name": "go-buffer-pool", + "version": "0.1.3" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "MIT", + "name": "go-mplex", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.35" +} + diff --git a/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/stream.go b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/stream.go new file mode 100644 index 0000000000..b4a43589af --- /dev/null +++ b/vendor/gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex/stream.go @@ -0,0 +1,240 @@ +package multiplex + +import ( + "context" + "errors" + "io" + "sync" + "time" + + pool "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool" + streammux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" +) + +// streamID is a convenience type for operating on stream IDs +type streamID struct { + id uint64 + initiator bool +} + +// header computes the header for the given tag +func (id *streamID) header(tag uint64) uint64 { + header := id.id<<3 | tag + if !id.initiator { + header-- + } + return header +} + +type Stream struct { + id streamID + name string + dataIn chan []byte + mp *Multiplex + + extra []byte + + // exbuf is for holding the reference to the beginning of the extra slice + // for later memory pool freeing + exbuf []byte + + wDeadline time.Time + rDeadline time.Time + + clLock sync.Mutex + closedRemote bool + + // Closed when the connection is reset. + reset chan struct{} + + // Closed when the writer is closed (reset will also be closed) + closedLocal context.Context + doCloseLocal context.CancelFunc +} + +func (s *Stream) Name() string { + return s.name +} + +func (s *Stream) waitForData(ctx context.Context) error { + if !s.rDeadline.IsZero() { + dctx, cancel := context.WithDeadline(ctx, s.rDeadline) + defer cancel() + ctx = dctx + } + + select { + case <-s.reset: + // This is the only place where it's safe to return these. + s.returnBuffers() + return streammux.ErrReset + case read, ok := <-s.dataIn: + if !ok { + return io.EOF + } + s.extra = read + s.exbuf = read + return nil + case <-ctx.Done(): + return ctx.Err() + } +} + +func (s *Stream) returnBuffers() { + if s.exbuf != nil { + pool.Put(s.exbuf) + s.exbuf = nil + s.extra = nil + } + for { + select { + case read, ok := <-s.dataIn: + if !ok { + return + } + if read == nil { + continue + } + pool.Put(read) + default: + return + } + } +} + +func (s *Stream) Read(b []byte) (int, error) { + if s.extra == nil { + err := s.waitForData(context.Background()) + if err != nil { + return 0, err + } + } + n := copy(b, s.extra) + if n < len(s.extra) { + s.extra = s.extra[n:] + } else { + if s.exbuf != nil { + pool.Put(s.exbuf) + } + s.extra = nil + s.exbuf = nil + } + return n, nil +} + +func (s *Stream) Write(b []byte) (int, error) { + var written int + for written < len(b) { + wl := len(b) - written + if wl > MaxMessageSize { + wl = MaxMessageSize + } + + n, err := s.write(b[written : written+wl]) + if err != nil { + return written, err + } + + written += n + } + + return written, nil +} + +func (s *Stream) write(b []byte) (int, error) { + if s.isClosed() { + return 0, errors.New("cannot write to closed stream") + } + + wDeadlineCtx, cleanup := func(s *Stream) (context.Context, context.CancelFunc) { + if s.wDeadline.IsZero() { + return s.closedLocal, nil + } else { + return context.WithDeadline(s.closedLocal, s.wDeadline) + } + }(s) + + err := s.mp.sendMsg(wDeadlineCtx, s.id.header(messageTag), b) + + if cleanup != nil { + cleanup() + } + + if err != nil { + if err == context.Canceled { + err = errors.New("cannot write to closed stream") + } + return 0, err + } + + return len(b), nil +} + +func (s *Stream) isClosed() bool { + return s.closedLocal.Err() != nil +} + +func (s *Stream) Close() error { + err := s.mp.sendMsg(context.Background(), s.id.header(closeTag), nil) + + if s.isClosed() { + return nil + } + + s.clLock.Lock() + remote := s.closedRemote + s.clLock.Unlock() + + s.doCloseLocal() + + if remote { + s.mp.chLock.Lock() + delete(s.mp.channels, s.id) + s.mp.chLock.Unlock() + } + + return err +} + +func (s *Stream) Reset() error { + s.clLock.Lock() + isClosed := s.isClosed() + if s.closedRemote && isClosed { + s.clLock.Unlock() + return nil + } + + if !s.closedRemote { + close(s.reset) + // We generally call this to tell the other side to go away. No point in waiting around. + go s.mp.sendMsg(context.Background(), s.id.header(resetTag), nil) + } + + s.doCloseLocal() + + s.closedRemote = true + + s.clLock.Unlock() + + s.mp.chLock.Lock() + delete(s.mp.channels, s.id) + s.mp.chLock.Unlock() + + return nil +} + +func (s *Stream) SetDeadline(t time.Time) error { + s.rDeadline = t + s.wDeadline = t + return nil +} + +func (s *Stream) SetReadDeadline(t time.Time) error { + s.rDeadline = t + return nil +} + +func (s *Stream) SetWriteDeadline(t time.Time) error { + s.wDeadline = t + return nil +} diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/.travis.yml b/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/.travis.yml deleted file mode 100644 index e1be0bfa30..0000000000 --- a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/interface.go b/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/interface.go deleted file mode 100644 index ca852183fb..0000000000 --- a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -package ifconnmgr - -import ( - "context" - "time" - - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -// ConnManager tracks connections to peers, and allows consumers to associate metadata -// with each peer. -// -// It enables connections to be trimmed based on implementation-defined heuristics. -type ConnManager interface { - - // TagPeer tags a peer with a string, associating a weight with the tag. - TagPeer(peer.ID, string, int) - - // Untag removes the tagged value from the peer. - UntagPeer(p peer.ID, tag string) - - // GetTagInfo returns the metadata associated with the peer, - // or nil if no metadata has been recorded for the peer. - GetTagInfo(p peer.ID) *TagInfo - - // TrimOpenConns terminates open connections based on an implementation-defined - // heuristic. - TrimOpenConns(ctx context.Context) - - // Notifee returns an implementation that can be called back to inform of - // opened and closed connections. - Notifee() inet.Notifiee -} - -// TagInfo stores metadata associated with a peer. -type TagInfo struct { - FirstSeen time.Time - Value int - - // Tags maps tag ids to the numerical values. - Tags map[string]int - - // Conns maps connection ids (such as remote multiaddr) to their creation time. - Conns map[string]time.Time -} diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/null.go b/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/null.go deleted file mode 100644 index 19afb46828..0000000000 --- a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/null.go +++ /dev/null @@ -1,26 +0,0 @@ -package ifconnmgr - -import ( - "context" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -type NullConnMgr struct{} - -func (_ NullConnMgr) TagPeer(peer.ID, string, int) {} -func (_ NullConnMgr) UntagPeer(peer.ID, string) {} -func (_ NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return &TagInfo{} } -func (_ NullConnMgr) TrimOpenConns(context.Context) {} -func (_ NullConnMgr) Notifee() inet.Notifiee { return &cmNotifee{} } - -type cmNotifee struct{} - -func (nn *cmNotifee) Connected(n inet.Network, c inet.Conn) {} -func (nn *cmNotifee) Disconnected(n inet.Network, c inet.Conn) {} -func (nn *cmNotifee) Listen(n inet.Network, addr ma.Multiaddr) {} -func (nn *cmNotifee) ListenClose(n inet.Network, addr ma.Multiaddr) {} -func (nn *cmNotifee) OpenedStream(inet.Network, inet.Stream) {} -func (nn *cmNotifee) ClosedStream(inet.Network, inet.Stream) {} diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/package.json b/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/package.json deleted file mode 100644 index 0406725271..0000000000 --- a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-interface-connmgr" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-interface-connmgr" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "", - "name": "go-libp2p-interface-connmgr", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.0.21" -} - diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/LICENSE b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/LICENSE new file mode 100644 index 0000000000..3f05397b70 --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 libp2p + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/README.md b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/README.md new file mode 100644 index 0000000000..963d21c751 --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/README.md @@ -0,0 +1,28 @@ +# go-libp2p-discovery + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) + +> Interfaces for active peer discovery + +This package contains interfaces and utilities for active peer discovery. +Peers providing a service use the interface to advertise their presence in some namespace. +Vice versa, peers seeking a service use the interface to discover peers that have previously advertised +as service providers. +The package also includes a baseline implementation for discovery through [Content Routing](https://github.com/libp2p/go-libp2p-routing). + +## Documenation + +See https://godoc.org/github.com/libp2p/go-libp2p-discovery. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-discovery/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +## License + +MIT diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/interface.go b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/interface.go new file mode 100644 index 0000000000..02291bf477 --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/interface.go @@ -0,0 +1,26 @@ +package discovery + +import ( + "context" + "time" + + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// Advertiser is an interface for advertising services +type Advertiser interface { + // Advertise advertises a service + Advertise(ctx context.Context, ns string, opts ...Option) (time.Duration, error) +} + +// Discoverer is an interface for peer discovery +type Discoverer interface { + // FindPeers discovers peers providing a service + FindPeers(ctx context.Context, ns string, opts ...Option) (<-chan pstore.PeerInfo, error) +} + +// Discovery is an interface that combines service advertisement and peer discovery +type Discovery interface { + Advertiser + Discoverer +} diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/options.go b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/options.go new file mode 100644 index 0000000000..f59e56cad6 --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/options.go @@ -0,0 +1,42 @@ +package discovery + +import ( + "time" +) + +// Option is a single discovery option +type Option func(opts *Options) error + +// Options is a set of discovery options +type Options struct { + Ttl time.Duration + Limit int + // Other (implementation-specific) options + Other map[interface{}]interface{} +} + +// Apply applies the given options to this Options +func (opts *Options) Apply(options ...Option) error { + for _, o := range options { + if err := o(opts); err != nil { + return err + } + } + return nil +} + +// TTL is an option that provides a hint for the duration of an advertisement +func TTL(ttl time.Duration) Option { + return func(opts *Options) error { + opts.Ttl = ttl + return nil + } +} + +// Limit is an option that provides an upper bound on the peer count for discovery +func Limit(limit int) Option { + return func(opts *Options) error { + opts.Limit = limit + return nil + } +} diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/package.json b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/package.json new file mode 100644 index 0000000000..b7343330aa --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/package.json @@ -0,0 +1,68 @@ +{ + "author": "vyzo", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-discovery" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-libp2p-discovery", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.0.14" +} + diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/routing.go b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/routing.go new file mode 100644 index 0000000000..8a874c228a --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/routing.go @@ -0,0 +1,71 @@ +package discovery + +import ( + "context" + "time" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// RoutingDiscovery is an implementation of discovery using ContentRouting +// Namespaces are translated to Cids using the SHA256 hash. +type RoutingDiscovery struct { + routing.ContentRouting +} + +func NewRoutingDiscovery(router routing.ContentRouting) *RoutingDiscovery { + return &RoutingDiscovery{router} +} + +func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...Option) (time.Duration, error) { + cid, err := nsToCid(ns) + if err != nil { + return 0, err + } + + // this context requires a timeout; it determines how long the DHT looks for + // closest peers to the key/CID before it goes on to provide the record to them. + // Not setting a timeout here will make the DHT wander forever. + pctx, cancel := context.WithTimeout(ctx, 60*time.Second) + defer cancel() + + err = d.Provide(pctx, cid, true) + if err != nil { + return 0, err + } + + // the DHT provider record validity is 24hrs, but it is recommnded to republish every 6hrs + return 6 * time.Hour, nil +} + +func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, opts ...Option) (<-chan pstore.PeerInfo, error) { + var options Options + err := options.Apply(opts...) + if err != nil { + return nil, err + } + + limit := options.Limit + if limit == 0 { + limit = 100 // that's just arbitrary, but FindProvidersAsync needs a count + } + + cid, err := nsToCid(ns) + if err != nil { + return nil, err + } + + return d.FindProvidersAsync(ctx, cid, limit), nil +} + +func nsToCid(ns string) (cid.Cid, error) { + h, err := mh.Sum([]byte(ns), mh.SHA2_256, -1) + if err != nil { + return cid.Undef, err + } + + return cid.NewCidV1(cid.Raw, h), nil +} diff --git a/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/util.go b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/util.go new file mode 100644 index 0000000000..17280078c9 --- /dev/null +++ b/vendor/gx/ipfs/QmWXhsJTd4eTVAy9n8mDYiFmcMv1VHJ73qGkkeDHZfDhui/go-libp2p-discovery/util.go @@ -0,0 +1,56 @@ +package discovery + +import ( + "context" + "time" + + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("discovery") + +// FindPeers is a utility function that synchonously collects peers from a Discoverer +func FindPeers(ctx context.Context, d Discoverer, ns string, limit int) ([]pstore.PeerInfo, error) { + res := make([]pstore.PeerInfo, 0, limit) + + ch, err := d.FindPeers(ctx, ns, Limit(limit)) + if err != nil { + return nil, err + } + + for pi := range ch { + res = append(res, pi) + } + + return res, nil +} + +// Advertise is a utility function that persistently advertises a service through an Advertiser +func Advertise(ctx context.Context, a Advertiser, ns string) { + go func() { + for { + ttl, err := a.Advertise(ctx, ns) + if err != nil { + log.Debugf("Error advertising %s: %s", ns, err.Error()) + if ctx.Err() != nil { + return + } + + select { + case <-time.After(2 * time.Minute): + continue + case <-ctx.Done(): + return + } + } + + wait := 7 * ttl / 8 + select { + case <-time.After(wait): + case <-ctx.Done(): + return + } + } + }() +} diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/.travis.yml b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/.travis.yml similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/.travis.yml rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/.travis.yml diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/LICENSE b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/LICENSE similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/LICENSE rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/LICENSE diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/Makefile b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/Makefile similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/Makefile rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/Makefile diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/README.md b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/README.md similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/README.md rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/README.md diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/codecov.yml b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/codecov.yml rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/codecov.yml diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/gen.go b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/gen.go similarity index 92% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/gen.go rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/gen.go index 487cfd778d..23a4171371 100644 --- a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/gen.go +++ b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/gen.go @@ -8,11 +8,11 @@ import ( "sync" "testing" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - ptest "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/test" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + ptest "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/test" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // ZeroLocalTCPAddress is the "zero" tcp local multiaddr. This means: diff --git a/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/identity.go b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/identity.go new file mode 100644 index 0000000000..0e86810213 --- /dev/null +++ b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/identity.go @@ -0,0 +1,60 @@ +package testutil + +import ( + "testing" + + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +type Identity interface { + Address() ma.Multiaddr + ID() peer.ID + PrivateKey() ci.PrivKey + PublicKey() ci.PubKey +} + +// TODO add a cheaper way to generate identities + +func RandIdentity() (Identity, error) { + p, err := RandPeerNetParams() + if err != nil { + return nil, err + } + return &identity{*p}, nil +} + +func RandIdentityOrFatal(t *testing.T) Identity { + p, err := RandPeerNetParams() + if err != nil { + t.Fatal(err) + } + return &identity{*p} +} + +// identity is a temporary shim to delay binding of PeerNetParams. +type identity struct { + PeerNetParams +} + +func (p *identity) ID() peer.ID { + return p.PeerNetParams.ID +} + +func (p *identity) Address() ma.Multiaddr { + return p.Addr +} + +func (p *identity) PrivateKey() ci.PrivKey { + return p.PrivKey +} + +func (p *identity) PublicKey() ci.PubKey { + return p.PubKey +} + +// NewIdentity constructs a new identity object with specific parameters +func NewIdentity(ID peer.ID, addr ma.Multiaddr, privk ci.PrivKey, pubk ci.PubKey) Identity { + return &identity{PeerNetParams{ID: ID, Addr: addr, PrivKey: privk, PubKey: pubk}} +} diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/latency_config.go b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/latency_config.go similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/latency_config.go rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/latency_config.go diff --git a/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/package.json b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/package.json new file mode 100644 index 0000000000..b81b72f01c --- /dev/null +++ b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/package.json @@ -0,0 +1,47 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-testutil" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-testutil", + "goversion": "1.7" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "MIT", + "name": "go-testutil", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.2.19" +} + diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/rand.go b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/rand.go similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/rand.go rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/rand.go diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/util.go b/vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/util.go similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/util.go rename to vendor/gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil/util.go diff --git a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/package.json b/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/package.json deleted file mode 100644 index 70836f33e3..0000000000 --- a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-blockservice" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-blockservice" - }, - "gxDependencies": [ - { - "author": "why", - "hash": "QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj", - "name": "go-bitswap", - "version": "1.1.13" - }, - { - "author": "hsanjuan", - "hash": "QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb", - "name": "go-ipfs-exchange-offline", - "version": "0.1.3" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "hsanjuan", - "hash": "QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR", - "name": "go-ipfs-blockstore", - "version": "0.1.4" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "why", - "hash": "QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT", - "name": "go-verifcid", - "version": "0.1.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-blockservice", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.13" -} - diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/.travis.yml b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/.travis.yml new file mode 100644 index 0000000000..9a93b1f2c0 --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: +- '1.11.x' +install: +- make deps +script: +- make test + +after_success: +- bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx \ No newline at end of file diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/LICENSE b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/LICENSE new file mode 100644 index 0000000000..cea85a4707 --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Hector Sanjuan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/Makefile b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/Makefile new file mode 100644 index 0000000000..64d2bd587b --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/Makefile @@ -0,0 +1,17 @@ +all: deps +clean: rwundo +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go +deps: gx + gx --verbose install --global + gx-go rewrite +test: deps + go test -v -race -covermode atomic -coverprofile=coverage.txt . +rw: + gx-go rewrite +rwundo: + gx-go rewrite --undo +publish: rwundo + gx publish +.PHONY: all gx deps test rw rwundo publish clean diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/README.md b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/README.md new file mode 100644 index 0000000000..0ca9e9aafd --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/README.md @@ -0,0 +1,70 @@ +# go-libp2p-gostream + +[![Build Status](https://travis-ci.org/hsanjuan/go-libp2p-gostream.svg?branch=master)](https://travis-ci.org/hsanjuan/go-libp2p-gostream) +[![codecov](https://codecov.io/gh/hsanjuan/go-libp2p-gostream/branch/master/graph/badge.svg)](https://codecov.io/gh/hsanjuan/go-libp2p-gostream) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg)](https://github.com/RichardLitt/standard-readme) + + +> Go "net" wrappers for LibP2P + +Package `gostream` allows to replace the standard net stack in Go with [LibP2P](https://github.com/libp2p/libp2p) streams. + +Given a libp2p.Host, `gostream` provides Dial() and Listen() methods which return implementations of net.Conn and net.Listener. + +Instead of the regular "host:port" addressing, `gostream` uses a Peer ID, and rather than a raw TCP connection, gostream will use libp2p's net.Stream. This means your connections will take advantage of LibP2P's multi-routes, NAT transversal and stream multiplexing. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Contribute](#contribute) +- [License](#license) + +## Install + +This package uses [`gx`](https://github.com/whyrusleeping/gx-go) for dependencies and should be imported with `gx` on other projects: + +``` +$ gx import github.com/hsanjuan/go-libp2p-gostream +``` + +The code can be downloaded and tested with: + +``` +$ go get -u -d github.com/hsanjuan/go-libp2p-gostream +$ cd $GOPATH/src/github.com/hsanjuan/go-libp2p-gostream +$ make test +``` + +## Usage + +Documentation can be read at [Godoc](https://godoc.org/github.com/hsanjuan/go-libp2p-gostream). The important bits follow. + +A simple communication between peers -one acting as server and the other as client- would work like: + +```go +go func() { + listener, _ := Listen(srvHost, tag) + defer listener.Close() + servConn, _ := listener.Accept() + defer servConn.Close() + reader := bufio.NewReader(servConn) + msg, _ := reader.ReadString('\n') + fmt.Println(msg) + servConn.Write([]byte("answer!\n")) +}() +clientConn, _ := Dial(clientHost, srvHost.ID(), tag) +clientConn.Write([]byte("question?\n")) +resp, _ := ioutil.ReadAll(clientConn) +fmt.Println(resp) +``` + +Note error handling above is ommited. + +## Contribute + +PRs accepted. + +## License + +MIT © Hector Sanjuan diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/addr.go b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/addr.go new file mode 100644 index 0000000000..4cb1de6efa --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/addr.go @@ -0,0 +1,14 @@ +package gostream + +import peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + +// addr implements net.Addr and holds a libp2p peer ID. +type addr struct{ id peer.ID } + +// Network returns the name of the network that this address belongs to +// (libp2p). +func (a *addr) Network() string { return Network } + +// String returns the peer ID of this address in string form +// (B58-encoded). +func (a *addr) String() string { return a.id.Pretty() } diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/conn.go b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/conn.go new file mode 100644 index 0000000000..fc7c10385b --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/conn.go @@ -0,0 +1,90 @@ +package gostream + +import ( + "context" + "net" + "time" + + pnet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" +) + +// conn is an implementation of net.Conn which wraps +// libp2p streams. +type conn struct { + s pnet.Stream +} + +// newConn creates a conn given a libp2p stream +func newConn(s pnet.Stream) net.Conn { + return &conn{s} +} + +// Read reads data from the connection. +func (c *conn) Read(b []byte) (n int, err error) { + return c.s.Read(b) +} + +// Write writes data to the connection. +func (c *conn) Write(b []byte) (n int, err error) { + return c.s.Write(b) +} + +// Close closes the connection. +// Any blocked Read or Write operations will be unblocked and return errors. +func (c *conn) Close() error { + if err := c.s.Close(); err != nil { + c.s.Reset() + return err + } + go pnet.AwaitEOF(c.s) + return nil +} + +// LocalAddr returns the local network address. +func (c *conn) LocalAddr() net.Addr { + return &addr{c.s.Conn().LocalPeer()} +} + +// RemoteAddr returns the remote network address. +func (c *conn) RemoteAddr() net.Addr { + return &addr{c.s.Conn().RemotePeer()} +} + +// SetDeadline sets the read and write deadlines associated +// with the connection. It is equivalent to calling both +// SetReadDeadline and SetWriteDeadline. +// See https://golang.org/pkg/net/#Conn for more details. +func (c *conn) SetDeadline(t time.Time) error { + return c.s.SetDeadline(t) +} + +// SetReadDeadline sets the deadline for future Read calls. +// A zero value for t means Read will not time out. +func (c *conn) SetReadDeadline(t time.Time) error { + return c.s.SetReadDeadline(t) +} + +// SetWriteDeadline sets the deadline for future Write calls. +// Even if write times out, it may return n > 0, indicating that +// some of the data was successfully written. +// A zero value for t means Write will not time out. +func (c *conn) SetWriteDeadline(t time.Time) error { + return c.s.SetWriteDeadline(t) +} + +// Dial opens a stream to the destination address +// (which should parseable to a peer ID) using the given +// host and returns it as a standard net.Conn. +func Dial(h host.Host, pid peer.ID, tag protocol.ID) (net.Conn, error) { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) + defer cancel() + + s, err := h.NewStream(ctx, pid, tag) + if err != nil { + return nil, err + } + return newConn(s), nil +} diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/coverage.out b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/coverage.out new file mode 100644 index 0000000000..77b128ca5a --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/coverage.out @@ -0,0 +1,37 @@ +mode: count +github.com/hsanjuan/go-libp2p-http/addr.go:8.33,8.52 1 0 +github.com/hsanjuan/go-libp2p-http/addr.go:9.33,9.57 1 1 +github.com/hsanjuan/go-libp2p-http/conn.go:17.38,19.2 1 2 +github.com/hsanjuan/go-libp2p-http/conn.go:22.50,24.2 1 3 +github.com/hsanjuan/go-libp2p-http/conn.go:27.51,29.2 1 2 +github.com/hsanjuan/go-libp2p-http/conn.go:33.30,35.2 1 2 +github.com/hsanjuan/go-libp2p-http/conn.go:38.37,40.2 1 0 +github.com/hsanjuan/go-libp2p-http/conn.go:43.38,45.2 1 1 +github.com/hsanjuan/go-libp2p-http/conn.go:51.47,53.2 1 0 +github.com/hsanjuan/go-libp2p-http/conn.go:57.51,59.2 1 0 +github.com/hsanjuan/go-libp2p-http/conn.go:65.52,67.2 1 0 +github.com/hsanjuan/go-libp2p-http/listener.go:25.47,26.9 1 2 +github.com/hsanjuan/go-libp2p-http/listener.go:27.2,28.25 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:29.2,30.26 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:36.34,40.2 3 2 +github.com/hsanjuan/go-libp2p-http/listener.go:43.36,45.2 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:49.48,59.54 3 1 +github.com/hsanjuan/go-libp2p-http/listener.go:67.2,67.15 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:59.54,60.10 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:61.3,61.24 0 1 +github.com/hsanjuan/go-libp2p-http/listener.go:62.3,63.13 1 0 +github.com/hsanjuan/go-libp2p-http/listener.go:73.58,78.16 4 1 +github.com/hsanjuan/go-libp2p-http/listener.go:82.2,83.16 2 1 +github.com/hsanjuan/go-libp2p-http/listener.go:86.2,86.24 1 1 +github.com/hsanjuan/go-libp2p-http/listener.go:78.16,80.3 1 0 +github.com/hsanjuan/go-libp2p-http/listener.go:83.16,85.3 1 0 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:16.76,17.19 1 1 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:21.2,22.16 2 1 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:26.2,27.16 2 1 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:30.2,33.16 3 1 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:37.2,38.37 2 1 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:17.19,19.3 1 0 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:22.16,24.3 1 0 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:27.16,29.3 1 0 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:33.16,35.3 1 0 +github.com/hsanjuan/go-libp2p-http/roundtripper.go:51.46,53.2 1 1 diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/gostream.go b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/gostream.go new file mode 100644 index 0000000000..a15125be32 --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/gostream.go @@ -0,0 +1,19 @@ +// Package gostream allows to replace the standard net stack in Go +// with [LibP2P](https://github.com/libp2p/libp2p) streams. +// +// Given a libp2p.Host, gostream provides Dial() and Listen() methods which +// return implementations of net.Conn and net.Listener. +// +// Instead of the regular "host:port" addressing, `gostream` uses a Peer ID, +// and rather than a raw TCP connection, gostream will use libp2p's net.Stream. +// This means your connections will take advantage of LibP2P's multi-routes, +// NAT transversal and stream multiplexing. +// +// Note that LibP2P hosts cannot dial to themselves, so there is no possibility +// of using the same Host as server and as client. +package gostream + +// Network is the "net.Addr.Network()" name returned by +// addresses used by gostream connections. In turn, the "net.Addr.String()" will +// be a peer ID. +var Network = "libp2p" diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/listener.go b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/listener.go new file mode 100644 index 0000000000..033de65fa8 --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/listener.go @@ -0,0 +1,71 @@ +package gostream + +import ( + "context" + "net" + + pnet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" +) + +// listener is an implementation of net.Listener which handles +// http-tagged streams from a libp2p connection. +// A listener can be built with Listen() +type listener struct { + host host.Host + ctx context.Context + tag protocol.ID + cancel func() + streamCh chan pnet.Stream +} + +// Accept returns the next a connection to this listener. +// It blocks if there are no connections. Under the hood, +// connections are libp2p streams. +func (l *listener) Accept() (net.Conn, error) { + select { + case s := <-l.streamCh: + return newConn(s), nil + case <-l.ctx.Done(): + return nil, l.ctx.Err() + } +} + +// Close terminates this listener. It will no longer handle any +// incoming streams +func (l *listener) Close() error { + l.cancel() + l.host.RemoveStreamHandler(l.tag) + return nil +} + +// Addr returns the address for this listener, which is its libp2p Peer ID. +func (l *listener) Addr() net.Addr { + return &addr{l.host.ID()} +} + +// Listen provides a standard net.Listener ready to accept "connections". +// Under the hood, these connections are libp2p streams tagged with the +// given protocol.ID. +func Listen(h host.Host, tag protocol.ID) (net.Listener, error) { + ctx, cancel := context.WithCancel(context.Background()) + + l := &listener{ + host: h, + ctx: ctx, + cancel: cancel, + tag: tag, + streamCh: make(chan pnet.Stream), + } + + h.SetStreamHandler(tag, func(s pnet.Stream) { + select { + case l.streamCh <- s: + case <-ctx.Done(): + s.Reset() + } + }) + + return l, nil +} diff --git a/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/package.json b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/package.json new file mode 100644 index 0000000000..5e8b5b0d78 --- /dev/null +++ b/vendor/gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream/package.json @@ -0,0 +1,24 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/hsanjuan/go-libp2p-gostream" + }, + "gx": { + "dvcsimport": "github.com/hsanjuan/go-libp2p-gostream" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-gostream", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.0.29" +} + diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/.travis.yml b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/.travis.yml rename to vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/.travis.yml diff --git a/vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/LICENSE b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo/LICENSE rename to vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/LICENSE diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/Makefile b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/Makefile similarity index 100% rename from vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/Makefile rename to vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/Makefile diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/README.md b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/README.md similarity index 100% rename from vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/README.md rename to vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/README.md diff --git a/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/interface.go b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/interface.go new file mode 100644 index 0000000000..d2c02dc147 --- /dev/null +++ b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/interface.go @@ -0,0 +1,37 @@ +// Package exchange defines the IPFS exchange interface +package exchange + +import ( + "context" + "io" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" +) + +// Interface defines the functionality of the IPFS block exchange protocol. +type Interface interface { // type Exchanger interface + Fetcher + + // TODO Should callers be concerned with whether the block was made + // available on the network? + HasBlock(blocks.Block) error + + IsOnline() bool + + io.Closer +} + +// Fetcher is an object that can be used to retrieve blocks +type Fetcher interface { + // GetBlock returns the block associated with a given key. + GetBlock(context.Context, cid.Cid) (blocks.Block, error) + GetBlocks(context.Context, []cid.Cid) (<-chan blocks.Block, error) +} + +// SessionExchange is an exchange.Interface which supports +// sessions. +type SessionExchange interface { + Interface + NewSession(context.Context) Fetcher +} diff --git a/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/package.json b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/package.json new file mode 100644 index 0000000000..c5f83220d5 --- /dev/null +++ b/vendor/gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface/package.json @@ -0,0 +1,30 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-exchange-interface" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-exchange-interface" + }, + "gxDependencies": [ + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipfs-exchange-interface", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.3" +} + diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/.travis.yml b/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/.travis.yml deleted file mode 100644 index 752dd5fe3a..0000000000 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/null.go b/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/null.go deleted file mode 100644 index 3a9b2aafdf..0000000000 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/null.go +++ /dev/null @@ -1,54 +0,0 @@ -package routinghelpers - -import ( - "context" - - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" -) - -// Null is a router that doesn't do anything. -type Null struct{} - -// PutValue always returns ErrNotSupported -func (nr Null) PutValue(context.Context, string, []byte, ...ropts.Option) error { - return routing.ErrNotSupported -} - -// GetValue always returns ErrNotFound -func (nr Null) GetValue(context.Context, string, ...ropts.Option) ([]byte, error) { - return nil, routing.ErrNotFound -} - -// SearchValue always returns ErrNotFound -func (nr Null) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { - return nil, routing.ErrNotFound -} - -// Provide always returns ErrNotSupported -func (nr Null) Provide(context.Context, cid.Cid, bool) error { - return routing.ErrNotSupported -} - -// FindProvidersAsync always returns a closed channel -func (nr Null) FindProvidersAsync(context.Context, cid.Cid, int) <-chan pstore.PeerInfo { - ch := make(chan pstore.PeerInfo) - close(ch) - return ch -} - -// FindPeer always returns ErrNotFound -func (nr Null) FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) { - return pstore.PeerInfo{}, routing.ErrNotFound -} - -// Bootstrap always succeeds instantly -func (nr Null) Bootstrap(context.Context) error { - return nil -} - -var _ routing.IpfsRouting = Null{} diff --git a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/package.json b/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/package.json deleted file mode 100644 index aa6fc1abfc..0000000000 --- a/vendor/gx/ipfs/QmX3syBjwRd12qJGaKbFBWFfrBinKsaTC43ry3PsgiXCLK/go-libp2p-routing-helpers/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "author": "Stebalien", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-routing-helpers" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-routing-helpers" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "hash": "QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c", - "name": "go-libp2p-routing", - "version": "2.7.1" - }, - { - "author": "hashicorp", - "hash": "Qmbg4PQLEvf2XW8vrai9STFDerV7kttkfKcVdkoRf9Z7Xu", - "name": "go-errwrap", - "version": "0.1.0" - }, - { - "author": "hashicorp", - "hash": "QmfGQp6VVqdPCDyzEM6EGwMY74YPabTSEoQWHUxZuCSWj3", - "name": "go-multierror", - "version": "0.1.0" - }, - { - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", - "name": "go-libp2p-record", - "version": "4.1.8" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-libp2p-routing-helpers", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.3.8" -} - diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/.travis.yml b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/.travis.yml new file mode 100644 index 0000000000..400a0053c1 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/LICENSE b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/LICENSE new file mode 100644 index 0000000000..14121ca71d --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Protocol Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/Makefile b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/Makefile new file mode 100644 index 0000000000..89fc88d7f4 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/Makefile @@ -0,0 +1,16 @@ +all: deps +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go +deps: gx + gx --verbose install --global + gx-go rewrite +test: deps + gx test -v -race -coverprofile=coverage.txt -covermode=atomic . +rw: + gx-go rewrite +rwundo: + gx-go rewrite --undo +publish: rwundo + gx publish +.PHONY: all gx deps test rw rwundo publish diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/block.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/block.go new file mode 100644 index 0000000000..685c96ba05 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/block.go @@ -0,0 +1,36 @@ +package iface + +import ( + "context" + "io" + + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" +) + +// BlockStat contains information about a block +type BlockStat interface { + // Size is the size of a block + Size() int + + // Path returns path to the block + Path() ResolvedPath +} + +// BlockAPI specifies the interface to the block layer +type BlockAPI interface { + // Put imports raw block data, hashing it using specified settings. + Put(context.Context, io.Reader, ...options.BlockPutOption) (BlockStat, error) + + // Get attempts to resolve the path and return a reader for data in the block + Get(context.Context, Path) (io.Reader, error) + + // Rm removes the block specified by the path from local blockstore. + // By default an error will be returned if the block can't be found locally. + // + // NOTE: If the specified block is pinned it won't be removed and no error + // will be returned + Rm(context.Context, Path, ...options.BlockRmOption) error + + // Stat returns information on + Stat(context.Context, Path) (BlockStat, error) +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/coreapi.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/coreapi.go similarity index 78% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/coreapi.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/coreapi.go index b744a207a5..d3471ac670 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/coreapi.go +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/coreapi.go @@ -5,7 +5,9 @@ package iface import ( "context" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // CoreAPI defines an unified interface to IPFS for Go programs @@ -17,7 +19,7 @@ type CoreAPI interface { Block() BlockAPI // Dag returns an implementation of Dag API - Dag() DagAPI + Dag() APIDagService // Name returns an implementation of Name API Name() NameAPI @@ -46,4 +48,8 @@ type CoreAPI interface { // ResolveNode resolves the path (if not resolved already) using Unixfs // resolver, gets and returns the resolved Node ResolveNode(context.Context, Path) (ipld.Node, error) + + // WithOptions creates new instance of CoreAPI based on this instance with + // a set of options applied + WithOptions(...options.ApiOption) (CoreAPI, error) } diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dag.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dag.go new file mode 100644 index 0000000000..6d20d68e16 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dag.go @@ -0,0 +1,13 @@ +package iface + +import ( + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// APIDagService extends ipld.DAGService +type APIDagService interface { + ipld.DAGService + + // Pinning returns special NodeAdder which recursively pins added nodes + Pinning() ipld.NodeAdder +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dht.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dht.go new file mode 100644 index 0000000000..356574c626 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/dht.go @@ -0,0 +1,26 @@ +package iface + +import ( + "context" + + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// DhtAPI specifies the interface to the DHT +// Note: This API will likely get deprecated in near future, see +// https://github.com/ipfs/interface-ipfs-core/issues/249 for more context. +type DhtAPI interface { + // FindPeer queries the DHT for all of the multiaddresses associated with a + // Peer ID + FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) + + // FindProviders finds peers in the DHT who can provide a specific value + // given a key. + FindProviders(context.Context, Path, ...options.DhtFindProvidersOption) (<-chan pstore.PeerInfo, error) + + // Provide announces to the network that you are providing given values + Provide(context.Context, Path, ...options.DhtProvideOption) error +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/errors.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/errors.go new file mode 100644 index 0000000000..e0bd7805d8 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/errors.go @@ -0,0 +1,10 @@ +package iface + +import "errors" + +var ( + ErrIsDir = errors.New("this dag node is a directory") + ErrNotFile = errors.New("this dag node is not a regular file") + ErrOffline = errors.New("this action must be run in online mode, try running 'ipfs daemon' first") + ErrNotSupported = errors.New("operation not supported") +) diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/key.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/key.go new file mode 100644 index 0000000000..e732fc634e --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/key.go @@ -0,0 +1,41 @@ +package iface + +import ( + "context" + + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// Key specifies the interface to Keys in KeyAPI Keystore +type Key interface { + // Key returns key name + Name() string + + // Path returns key path + Path() Path + + // ID returns key PeerID + ID() peer.ID +} + +// KeyAPI specifies the interface to Keystore +type KeyAPI interface { + // Generate generates new key, stores it in the keystore under the specified + // name and returns a base58 encoded multihash of it's public key + Generate(ctx context.Context, name string, opts ...options.KeyGenerateOption) (Key, error) + + // Rename renames oldName key to newName. Returns the key and whether another + // key was overwritten, or an error + Rename(ctx context.Context, oldName string, newName string, opts ...options.KeyRenameOption) (Key, bool, error) + + // List lists keys stored in keystore + List(ctx context.Context) ([]Key, error) + + // Self returns the 'main' node key + Self(ctx context.Context) (Key, error) + + // Remove removes keys from keystore. Returns ipns path of the removed key + Remove(ctx context.Context, name string) (Key, error) +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/name.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/name.go new file mode 100644 index 0000000000..9f249a1285 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/name.go @@ -0,0 +1,46 @@ +package iface + +import ( + "context" + "errors" + + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" +) + +var ErrResolveFailed = errors.New("could not resolve name") + +// IpnsEntry specifies the interface to IpnsEntries +type IpnsEntry interface { + // Name returns IpnsEntry name + Name() string + // Value returns IpnsEntry value + Value() Path +} + +type IpnsResult struct { + Path + Err error +} + +// NameAPI specifies the interface to IPNS. +// +// IPNS is a PKI namespace, where names are the hashes of public keys, and the +// private key enables publishing new (signed) values. In both publish and +// resolve, the default name used is the node's own PeerID, which is the hash of +// its public key. +// +// You can use .Key API to list and generate more names and their respective keys. +type NameAPI interface { + // Publish announces new IPNS name + Publish(ctx context.Context, path Path, opts ...options.NamePublishOption) (IpnsEntry, error) + + // Resolve attempts to resolve the newest version of the specified name + Resolve(ctx context.Context, name string, opts ...options.NameResolveOption) (Path, error) + + // Search is a version of Resolve which outputs paths as they are discovered, + // reducing the time to first entry + // + // Note: by default, all paths read from the channel are considered unsafe, + // except the latest (last path in channel read buffer). + Search(ctx context.Context, name string, opts ...options.NameResolveOption) (<-chan IpnsResult, error) +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/object.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/object.go similarity index 92% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/object.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/object.go index 229f69869e..0c172de4af 100644 --- a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/object.go +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/object.go @@ -4,10 +4,10 @@ import ( "context" "io" - options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // ObjectStat provides information about dag nodes diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/block.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/block.go new file mode 100644 index 0000000000..b7484340bd --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/block.go @@ -0,0 +1,126 @@ +package options + +import ( + "fmt" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +type BlockPutSettings struct { + Codec string + MhType uint64 + MhLength int + Pin bool +} + +type BlockRmSettings struct { + Force bool +} + +type BlockPutOption func(*BlockPutSettings) error +type BlockRmOption func(*BlockRmSettings) error + +func BlockPutOptions(opts ...BlockPutOption) (*BlockPutSettings, cid.Prefix, error) { + options := &BlockPutSettings{ + Codec: "", + MhType: mh.SHA2_256, + MhLength: -1, + Pin: false, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, cid.Prefix{}, err + } + } + + var pref cid.Prefix + pref.Version = 1 + + if options.Codec == "" { + if options.MhType != mh.SHA2_256 || (options.MhLength != -1 && options.MhLength != 32) { + options.Codec = "protobuf" + } else { + options.Codec = "v0" + } + } + + if options.Codec == "v0" && options.MhType == mh.SHA2_256 { + pref.Version = 0 + } + + formatval, ok := cid.Codecs[options.Codec] + if !ok { + return nil, cid.Prefix{}, fmt.Errorf("unrecognized format: %s", options.Codec) + } + + if options.Codec == "v0" { + if options.MhType != mh.SHA2_256 || (options.MhLength != -1 && options.MhLength != 32) { + return nil, cid.Prefix{}, fmt.Errorf("only sha2-255-32 is allowed with CIDv0") + } + } + + pref.Codec = formatval + + pref.MhType = options.MhType + pref.MhLength = options.MhLength + + return options, pref, nil +} + +func BlockRmOptions(opts ...BlockRmOption) (*BlockRmSettings, error) { + options := &BlockRmSettings{ + Force: false, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + return options, nil +} + +type blockOpts struct{} + +var Block blockOpts + +// Format is an option for Block.Put which specifies the multicodec to use to +// serialize the object. Default is "v0" +func (blockOpts) Format(codec string) BlockPutOption { + return func(settings *BlockPutSettings) error { + settings.Codec = codec + return nil + } +} + +// Hash is an option for Block.Put which specifies the multihash settings to use +// when hashing the object. Default is mh.SHA2_256 (0x12). +// If mhLen is set to -1, default length for the hash will be used +func (blockOpts) Hash(mhType uint64, mhLen int) BlockPutOption { + return func(settings *BlockPutSettings) error { + settings.MhType = mhType + settings.MhLength = mhLen + return nil + } +} + +// Pin is an option for Block.Put which specifies whether to (recursively) pin +// added blocks +func (blockOpts) Pin(pin bool) BlockPutOption { + return func(settings *BlockPutSettings) error { + settings.Pin = pin + return nil + } +} + +// Force is an option for Block.Rm which, when set to true, will ignore +// non-existing blocks +func (blockOpts) Force(force bool) BlockRmOption { + return func(settings *BlockRmSettings) error { + settings.Force = force + return nil + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/dht.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/dht.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/dht.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/dht.go diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/global.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/global.go new file mode 100644 index 0000000000..90e2586f10 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/global.go @@ -0,0 +1,47 @@ +package options + +type ApiSettings struct { + Offline bool + FetchBlocks bool +} + +type ApiOption func(*ApiSettings) error + +func ApiOptions(opts ...ApiOption) (*ApiSettings, error) { + options := &ApiSettings{ + Offline: false, + FetchBlocks: true, + } + + return ApiOptionsTo(options, opts...) +} + +func ApiOptionsTo(options *ApiSettings, opts ...ApiOption) (*ApiSettings, error) { + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + return options, nil +} + +type apiOpts struct{} + +var Api apiOpts + +func (apiOpts) Offline(offline bool) ApiOption { + return func(settings *ApiSettings) error { + settings.Offline = offline + return nil + } +} + +// FetchBlocks when set to false prevents api from fetching blocks from the +// network while allowing other services such as IPNS to still be online +func (apiOpts) FetchBlocks(fetch bool) ApiOption { + return func(settings *ApiSettings) error { + settings.FetchBlocks = fetch + return nil + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/key.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/key.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/key.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/key.go diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/name.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/name.go new file mode 100644 index 0000000000..77774c12fc --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/name.go @@ -0,0 +1,122 @@ +package options + +import ( + "time" + + ropts "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys" +) + +const ( + DefaultNameValidTime = 24 * time.Hour +) + +type NamePublishSettings struct { + ValidTime time.Duration + Key string + + TTL *time.Duration + + AllowOffline bool +} + +type NameResolveSettings struct { + Cache bool + + ResolveOpts []ropts.ResolveOpt +} + +type NamePublishOption func(*NamePublishSettings) error +type NameResolveOption func(*NameResolveSettings) error + +func NamePublishOptions(opts ...NamePublishOption) (*NamePublishSettings, error) { + options := &NamePublishSettings{ + ValidTime: DefaultNameValidTime, + Key: "self", + + AllowOffline: false, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +func NameResolveOptions(opts ...NameResolveOption) (*NameResolveSettings, error) { + options := &NameResolveSettings{ + Cache: true, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +type nameOpts struct{} + +var Name nameOpts + +// ValidTime is an option for Name.Publish which specifies for how long the +// entry will remain valid. Default value is 24h +func (nameOpts) ValidTime(validTime time.Duration) NamePublishOption { + return func(settings *NamePublishSettings) error { + settings.ValidTime = validTime + return nil + } +} + +// Key is an option for Name.Publish which specifies the key to use for +// publishing. Default value is "self" which is the node's own PeerID. +// The key parameter must be either PeerID or keystore key alias. +// +// You can use KeyAPI to list and generate more names and their respective keys. +func (nameOpts) Key(key string) NamePublishOption { + return func(settings *NamePublishSettings) error { + settings.Key = key + return nil + } +} + +// AllowOffline is an option for Name.Publish which specifies whether to allow +// publishing when the node is offline. Default value is false +func (nameOpts) AllowOffline(allow bool) NamePublishOption { + return func(settings *NamePublishSettings) error { + settings.AllowOffline = allow + return nil + } +} + +// TTL is an option for Name.Publish which specifies the time duration the +// published record should be cached for (caution: experimental). +func (nameOpts) TTL(ttl time.Duration) NamePublishOption { + return func(settings *NamePublishSettings) error { + settings.TTL = &ttl + return nil + } +} + +// Cache is an option for Name.Resolve which specifies if cache should be used. +// Default value is true +func (nameOpts) Cache(cache bool) NameResolveOption { + return func(settings *NameResolveSettings) error { + settings.Cache = cache + return nil + } +} + +// +func (nameOpts) ResolveOption(opt ropts.ResolveOpt) NameResolveOption { + return func(settings *NameResolveSettings) error { + settings.ResolveOpts = append(settings.ResolveOpts, opt) + return nil + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/namesys/opts/opts.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys/opts.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/namesys/opts/opts.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/namesys/opts.go diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/object.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/object.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/object.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/object.go diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/pin.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/pin.go new file mode 100644 index 0000000000..cc4a8ef296 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/pin.go @@ -0,0 +1,161 @@ +package options + +type PinAddSettings struct { + Recursive bool +} + +type PinLsSettings struct { + Type string +} + +// PinRmSettings represents the settings of pin rm command +type PinRmSettings struct { + Recursive bool +} + +type PinUpdateSettings struct { + Unpin bool +} + +type PinAddOption func(*PinAddSettings) error + +// PinRmOption pin rm option func +type PinRmOption func(*PinRmSettings) error + +// PinLsOption pin ls option func +type PinLsOption func(*PinLsSettings) error +type PinUpdateOption func(*PinUpdateSettings) error + +func PinAddOptions(opts ...PinAddOption) (*PinAddSettings, error) { + options := &PinAddSettings{ + Recursive: true, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +// PinRmOptions pin rm options +func PinRmOptions(opts ...PinRmOption) (*PinRmSettings, error) { + options := &PinRmSettings{ + Recursive: true, + } + + for _, opt := range opts { + if err := opt(options); err != nil { + return nil, err + } + } + + return options, nil +} + +func PinLsOptions(opts ...PinLsOption) (*PinLsSettings, error) { + options := &PinLsSettings{ + Type: "all", + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +func PinUpdateOptions(opts ...PinUpdateOption) (*PinUpdateSettings, error) { + options := &PinUpdateSettings{ + Unpin: true, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +type pinType struct{} + +type pinOpts struct { + Type pinType +} + +var Pin pinOpts + +// All is an option for Pin.Ls which will make it return all pins. It is +// the default +func (pinType) All() PinLsOption { + return Pin.pinType("all") +} + +// Recursive is an option for Pin.Ls which will make it only return recursive +// pins +func (pinType) Recursive() PinLsOption { + return Pin.pinType("recursive") +} + +// Direct is an option for Pin.Ls which will make it only return direct (non +// recursive) pins +func (pinType) Direct() PinLsOption { + return Pin.pinType("direct") +} + +// Indirect is an option for Pin.Ls which will make it only return indirect pins +// (objects referenced by other recursively pinned objects) +func (pinType) Indirect() PinLsOption { + return Pin.pinType("indirect") +} + +// Recursive is an option for Pin.Add which specifies whether to pin an entire +// object tree or just one object. Default: true +func (pinOpts) Recursive(recursive bool) PinAddOption { + return func(settings *PinAddSettings) error { + settings.Recursive = recursive + return nil + } +} + +// RmRecursive is an option for Pin.Rm +func (pinOpts) RmRecursive(recursive bool) PinRmOption { + return func(settings *PinRmSettings) error { + settings.Recursive = recursive + return nil + } +} + +// Type is an option for Pin.Ls which allows to specify which pin types should +// be returned +// +// Supported values: +// * "direct" - directly pinned objects +// * "recursive" - roots of recursive pins +// * "indirect" - indirectly pinned objects (referenced by recursively pinned +// objects) +// * "all" - all pinned objects (default) +func (pinOpts) pinType(t string) PinLsOption { + return func(settings *PinLsSettings) error { + settings.Type = t + return nil + } +} + +// Unpin is an option for Pin.Update which specifies whether to remove the old pin. +// Default is true. +func (pinOpts) Unpin(unpin bool) PinUpdateOption { + return func(settings *PinUpdateSettings) error { + settings.Unpin = unpin + return nil + } +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/pubsub.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/pubsub.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/options/pubsub.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/pubsub.go diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/unixfs.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/unixfs.go new file mode 100644 index 0000000000..0dcd2d0a1e --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options/unixfs.go @@ -0,0 +1,319 @@ +package options + +import ( + "errors" + "fmt" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +type Layout int + +const ( + BalancedLayout Layout = iota + TrickleLayout +) + +type UnixfsAddSettings struct { + CidVersion int + MhType uint64 + + Inline bool + InlineLimit int + RawLeaves bool + RawLeavesSet bool + + Chunker string + Layout Layout + + Pin bool + OnlyHash bool + FsCache bool + NoCopy bool + + Wrap bool + Hidden bool + StdinName string + + Events chan<- interface{} + Silent bool + Progress bool +} + +type UnixfsLsSettings struct { + ResolveChildren bool +} + +type UnixfsAddOption func(*UnixfsAddSettings) error +type UnixfsLsOption func(*UnixfsLsSettings) error + +func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix, error) { + options := &UnixfsAddSettings{ + CidVersion: -1, + MhType: mh.SHA2_256, + + Inline: false, + InlineLimit: 32, + RawLeaves: false, + RawLeavesSet: false, + + Chunker: "size-262144", + Layout: BalancedLayout, + + Pin: false, + OnlyHash: false, + FsCache: false, + NoCopy: false, + + Wrap: false, + Hidden: false, + StdinName: "", + + Events: nil, + Silent: false, + Progress: false, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, cid.Prefix{}, err + } + } + + // nocopy -> rawblocks + if options.NoCopy && !options.RawLeaves { + // fixed? + if options.RawLeavesSet { + return nil, cid.Prefix{}, fmt.Errorf("nocopy option requires '--raw-leaves' to be enabled as well") + } + + // No, satisfy mandatory constraint. + options.RawLeaves = true + } + + // (hash != "sha2-256") -> CIDv1 + if options.MhType != mh.SHA2_256 { + switch options.CidVersion { + case 0: + return nil, cid.Prefix{}, errors.New("CIDv0 only supports sha2-256") + case 1, -1: + options.CidVersion = 1 + default: + return nil, cid.Prefix{}, fmt.Errorf("unknown CID version: %d", options.CidVersion) + } + } else { + if options.CidVersion < 0 { + // Default to CIDv0 + options.CidVersion = 0 + } + } + + // cidV1 -> raw blocks (by default) + if options.CidVersion > 0 && !options.RawLeavesSet { + options.RawLeaves = true + } + + prefix, err := dag.PrefixForCidVersion(options.CidVersion) + if err != nil { + return nil, cid.Prefix{}, err + } + + prefix.MhType = options.MhType + prefix.MhLength = -1 + + return options, prefix, nil +} + +func UnixfsLsOptions(opts ...UnixfsLsOption) (*UnixfsLsSettings, error) { + options := &UnixfsLsSettings{ + ResolveChildren: true, + } + + for _, opt := range opts { + err := opt(options) + if err != nil { + return nil, err + } + } + + return options, nil +} + +type unixfsOpts struct{} + +var Unixfs unixfsOpts + +// CidVersion specifies which CID version to use. Defaults to 0 unless an option +// that depends on CIDv1 is passed. +func (unixfsOpts) CidVersion(version int) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.CidVersion = version + return nil + } +} + +// Hash function to use. Implies CIDv1 if not set to sha2-256 (default). +// +// Table of functions is declared in https://github.com/multiformats/go-multihash/blob/master/multihash.go +func (unixfsOpts) Hash(mhtype uint64) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.MhType = mhtype + return nil + } +} + +// RawLeaves specifies whether to use raw blocks for leaves (data nodes with no +// links) instead of wrapping them with unixfs structures. +func (unixfsOpts) RawLeaves(enable bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.RawLeaves = enable + settings.RawLeavesSet = true + return nil + } +} + +// Inline tells the adder to inline small blocks into CIDs +func (unixfsOpts) Inline(enable bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Inline = enable + return nil + } +} + +// InlineLimit sets the amount of bytes below which blocks will be encoded +// directly into CID instead of being stored and addressed by it's hash. +// Specifying this option won't enable block inlining. For that use `Inline` +// option. Default: 32 bytes +// +// Note that while there is no hard limit on the number of bytes, it should be +// kept at a reasonably low value, such as 64; implementations may choose to +// reject anything larger. +func (unixfsOpts) InlineLimit(limit int) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.InlineLimit = limit + return nil + } +} + +// Chunker specifies settings for the chunking algorithm to use. +// +// Default: size-262144, formats: +// size-[bytes] - Simple chunker splitting data into blocks of n bytes +// rabin-[min]-[avg]-[max] - Rabin chunker +func (unixfsOpts) Chunker(chunker string) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Chunker = chunker + return nil + } +} + +// Layout tells the adder how to balance data between leaves. +// options.BalancedLayout is the default, it's optimized for static seekable +// files. +// options.TrickleLayout is optimized for streaming data, +func (unixfsOpts) Layout(layout Layout) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Layout = layout + return nil + } +} + +// Pin tells the adder to pin the file root recursively after adding +func (unixfsOpts) Pin(pin bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Pin = pin + return nil + } +} + +// HashOnly will make the adder calculate data hash without storing it in the +// blockstore or announcing it to the network +func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.OnlyHash = hashOnly + return nil + } +} + +// Wrap tells the adder to wrap the added file structure with an additional +// directory. +func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Wrap = wrap + return nil + } +} + +// Hidden enables adding of hidden files (files prefixed with '.') +func (unixfsOpts) Hidden(hidden bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Hidden = hidden + return nil + } +} + +// StdinName is the name set for files which don specify FilePath as +// os.Stdin.Name() +func (unixfsOpts) StdinName(name string) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.StdinName = name + return nil + } +} + +// Events specifies channel which will be used to report events about ongoing +// Add operation. +// +// Note that if this channel blocks it may slowdown the adder +func (unixfsOpts) Events(sink chan<- interface{}) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Events = sink + return nil + } +} + +// Silent reduces event output +func (unixfsOpts) Silent(silent bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Silent = silent + return nil + } +} + +// Progress tells the adder whether to enable progress events +func (unixfsOpts) Progress(enable bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.Progress = enable + return nil + } +} + +// FsCache tells the adder to check the filestore for pre-existing blocks +// +// Experimental +func (unixfsOpts) FsCache(enable bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.FsCache = enable + return nil + } +} + +// NoCopy tells the adder to add the files using filestore. Implies RawLeaves. +// +// Experimental +func (unixfsOpts) Nocopy(enable bool) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.NoCopy = enable + return nil + } +} + +func (unixfsOpts) ResolveChildren(resolve bool) UnixfsLsOption { + return func(settings *UnixfsLsSettings) error { + settings.ResolveChildren = resolve + return nil + } +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/package.json b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/package.json new file mode 100644 index 0000000000..3e50b56583 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/package.json @@ -0,0 +1,96 @@ +{ + "author": "magik6k", + "bugs": { + "url": "https://github.com/ipfs/interface-go-ipfs-core" + }, + "gx": { + "dvcsimport": "github.com/ipfs/interface-go-ipfs-core" + }, + "gxDependencies": [ + { + "author": "magik6k", + "hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb", + "name": "go-ipfs-files", + "version": "2.0.6" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "why", + "hash": "QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR", + "name": "go-path", + "version": "1.1.39" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "whyrusleeping", + "hash": "QmVwsD9oGSAKcCoD4BGi3Hx8XRo4jNy6aMzsjDHVTgYv2D", + "name": "go-ipld-cbor", + "version": "1.5.10" + }, + { + "author": "why", + "hash": "QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri", + "name": "go-merkledag", + "version": "1.1.37" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "why", + "hash": "QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ", + "name": "go-unixfs", + "version": "1.3.12" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + } + ], + "gxVersion": "0.14.0", + "language": "go", + "license": "", + "name": "interface-go-ipfs-core", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.11" +} + diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/path.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/path.go new file mode 100644 index 0000000000..42fb3730bb --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/path.go @@ -0,0 +1,182 @@ +package iface + +import ( + ipfspath "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +//TODO: merge with ipfspath so we don't depend on it + +// Path is a generic wrapper for paths used in the API. A path can be resolved +// to a CID using one of Resolve functions in the API. +// +// Paths must be prefixed with a valid prefix: +// +// * /ipfs - Immutable unixfs path (files) +// * /ipld - Immutable ipld path (data) +// * /ipns - Mutable names. Usually resolves to one of the immutable paths +//TODO: /local (MFS) +type Path interface { + // String returns the path as a string. + String() string + + // Namespace returns the first component of the path. + // + // For example path "/ipfs/QmHash", calling Namespace() will return "ipfs" + Namespace() string + + // Mutable returns false if the data pointed to by this path in guaranteed + // to not change. + // + // Note that resolved mutable path can be immutable. + Mutable() bool +} + +// ResolvedPath is a path which was resolved to the last resolvable node +type ResolvedPath interface { + // Cid returns the CID of the node referenced by the path. Remainder of the + // path is guaranteed to be within the node. + // + // Examples: + // If you have 3 linked objects: QmRoot -> A -> B: + // + // cidB := {"foo": {"bar": 42 }} + // cidA := {"B": {"/": cidB }} + // cidRoot := {"A": {"/": cidA }} + // + // And resolve paths: + // + // * "/ipfs/${cidRoot}" + // * Calling Cid() will return `cidRoot` + // * Calling Root() will return `cidRoot` + // * Calling Remainder() will return `` + // + // * "/ipfs/${cidRoot}/A" + // * Calling Cid() will return `cidA` + // * Calling Root() will return `cidRoot` + // * Calling Remainder() will return `` + // + // * "/ipfs/${cidRoot}/A/B/foo" + // * Calling Cid() will return `cidB` + // * Calling Root() will return `cidRoot` + // * Calling Remainder() will return `foo` + // + // * "/ipfs/${cidRoot}/A/B/foo/bar" + // * Calling Cid() will return `cidB` + // * Calling Root() will return `cidRoot` + // * Calling Remainder() will return `foo/bar` + Cid() cid.Cid + + // Root returns the CID of the root object of the path + // + // Example: + // If you have 3 linked objects: QmRoot -> A -> B, and resolve path + // "/ipfs/QmRoot/A/B", the Root method will return the CID of object QmRoot + // + // For more examples see the documentation of Cid() method + Root() cid.Cid + + // Remainder returns unresolved part of the path + // + // Example: + // If you have 2 linked objects: QmRoot -> A, where A is a CBOR node + // containing the following data: + // + // {"foo": {"bar": 42 }} + // + // When resolving "/ipld/QmRoot/A/foo/bar", Remainder will return "foo/bar" + // + // For more examples see the documentation of Cid() method + Remainder() string + + Path +} + +// path implements coreiface.Path +type path struct { + path ipfspath.Path +} + +// resolvedPath implements coreiface.resolvedPath +type resolvedPath struct { + path + cid cid.Cid + root cid.Cid + remainder string +} + +// Join appends provided segments to the base path +func Join(base Path, a ...string) Path { + s := ipfspath.Join(append([]string{base.String()}, a...)) + return &path{path: ipfspath.FromString(s)} +} + +// IpfsPath creates new /ipfs path from the provided CID +func IpfsPath(c cid.Cid) ResolvedPath { + return &resolvedPath{ + path: path{ipfspath.Path("/ipfs/" + c.String())}, + cid: c, + root: c, + remainder: "", + } +} + +// IpldPath creates new /ipld path from the provided CID +func IpldPath(c cid.Cid) ResolvedPath { + return &resolvedPath{ + path: path{ipfspath.Path("/ipld/" + c.String())}, + cid: c, + root: c, + remainder: "", + } +} + +// ParsePath parses string path to a Path +func ParsePath(p string) (Path, error) { + pp, err := ipfspath.ParsePath(p) + if err != nil { + return nil, err + } + + return &path{path: pp}, nil +} + +// NewResolvedPath creates new ResolvedPath. This function performs no checks +// and is intended to be used by resolver implementations. Incorrect inputs may +// cause panics. Handle with care. +func NewResolvedPath(ipath ipfspath.Path, c cid.Cid, root cid.Cid, remainder string) ResolvedPath { + return &resolvedPath{ + path: path{ipath}, + cid: c, + root: root, + remainder: remainder, + } +} + +func (p *path) String() string { + return p.path.String() +} + +func (p *path) Namespace() string { + if len(p.path.Segments()) < 1 { + panic("path without namespace") //this shouldn't happen under any scenario + } + return p.path.Segments()[0] +} + +func (p *path) Mutable() bool { + //TODO: MFS: check for /local + return p.Namespace() == "ipns" +} + +func (p *resolvedPath) Cid() cid.Cid { + return p.cid +} + +func (p *resolvedPath) Root() cid.Cid { + return p.root +} + +func (p *resolvedPath) Remainder() string { + return p.remainder +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pin.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pin.go new file mode 100644 index 0000000000..65c613d166 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pin.go @@ -0,0 +1,54 @@ +package iface + +import ( + "context" + + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" +) + +// Pin holds information about pinned resource +type Pin interface { + // Path to the pinned object + Path() ResolvedPath + + // Type of the pin + Type() string +} + +// PinStatus holds information about pin health +type PinStatus interface { + // Ok indicates whether the pin has been verified to be correct + Ok() bool + + // BadNodes returns any bad (usually missing) nodes from the pin + BadNodes() []BadPinNode +} + +// BadPinNode is a node that has been marked as bad by Pin.Verify +type BadPinNode interface { + // Path is the path of the node + Path() ResolvedPath + + // Err is the reason why the node has been marked as bad + Err() error +} + +// PinAPI specifies the interface to pining +type PinAPI interface { + // Add creates new pin, be default recursive - pinning the whole referenced + // tree + Add(context.Context, Path, ...options.PinAddOption) error + + // Ls returns list of pinned objects on this node + Ls(context.Context, ...options.PinLsOption) ([]Pin, error) + + // Rm removes pin for object specified by the path + Rm(context.Context, Path, ...options.PinRmOption) error + + // Update changes one pin to another, skipping checks for matching paths in + // the old tree + Update(ctx context.Context, from Path, to Path, opts ...options.PinUpdateOption) error + + // Verify verifies the integrity of pinned objects + Verify(context.Context) (<-chan PinStatus, error) +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pubsub.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pubsub.go new file mode 100644 index 0000000000..bd84902da2 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/pubsub.go @@ -0,0 +1,48 @@ +package iface + +import ( + "context" + "io" + + options "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// PubSubSubscription is an active PubSub subscription +type PubSubSubscription interface { + io.Closer + + // Next return the next incoming message + Next(context.Context) (PubSubMessage, error) +} + +// PubSubMessage is a single PubSub message +type PubSubMessage interface { + // From returns id of a peer from which the message has arrived + From() peer.ID + + // Data returns the message body + Data() []byte + + // Seq returns message identifier + Seq() []byte + + // Topics returns list of topics this message was set to + Topics() []string +} + +// PubSubAPI specifies the interface to PubSub +type PubSubAPI interface { + // Ls lists subscribed topics by name + Ls(context.Context) ([]string, error) + + // Peers list peers we are currently pubsubbing with + Peers(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error) + + // Publish a message to a given pubsub topic + Publish(context.Context, string, []byte) error + + // Subscribe to messages on a given topic + Subscribe(context.Context, string, ...options.PubSubSubscribeOption) (PubSubSubscription, error) +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/swarm.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/swarm.go new file mode 100644 index 0000000000..09260f1197 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/swarm.go @@ -0,0 +1,57 @@ +package iface + +import ( + "context" + "errors" + "time" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + net "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +var ( + ErrNotConnected = errors.New("not connected") + ErrConnNotFound = errors.New("conn not found") +) + +// ConnectionInfo contains information about a peer +type ConnectionInfo interface { + // ID returns PeerID + ID() peer.ID + + // Address returns the multiaddress via which we are connected with the peer + Address() ma.Multiaddr + + // Direction returns which way the connection was established + Direction() net.Direction + + // Latency returns last known round trip time to the peer + Latency() (time.Duration, error) + + // Streams returns list of streams established with the peer + Streams() ([]protocol.ID, error) +} + +// SwarmAPI specifies the interface to libp2p swarm +type SwarmAPI interface { + // Connect to a given peer + Connect(context.Context, pstore.PeerInfo) error + + // Disconnect from a given address + Disconnect(context.Context, ma.Multiaddr) error + + // Peers returns the list of peers we are connected to + Peers(context.Context) ([]ConnectionInfo, error) + + // KnownAddrs returns the list of all addresses this node is aware of + KnownAddrs(context.Context) (map[peer.ID][]ma.Multiaddr, error) + + // LocalAddrs returns the list of announced listening addresses + LocalAddrs(context.Context) ([]ma.Multiaddr, error) + + // ListenAddrs returns the list of all listening addresses + ListenAddrs(context.Context) ([]ma.Multiaddr, error) +} diff --git a/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/unixfs.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/unixfs.go new file mode 100644 index 0000000000..bbad1ea838 --- /dev/null +++ b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/unixfs.go @@ -0,0 +1,55 @@ +package iface + +import ( + "context" + "gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/options" + + "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" +) + +type AddEvent struct { + Name string + Path ResolvedPath `json:",omitempty"` + Bytes int64 `json:",omitempty"` + Size string `json:",omitempty"` +} + +type FileType int32 + +const ( + TRaw = FileType(unixfs.TRaw) + TFile = FileType(unixfs.TFile) + TDirectory = FileType(unixfs.TDirectory) + TMetadata = FileType(unixfs.TMetadata) + TSymlink = FileType(unixfs.TSymlink) + THAMTShard = FileType(unixfs.THAMTShard) +) + +type LsLink struct { + Link *ipld.Link + Size uint64 + Type FileType + + Err error +} + +// UnixfsAPI is the basic interface to immutable files in IPFS +// NOTE: This API is heavily WIP, things are guaranteed to break frequently +type UnixfsAPI interface { + // Add imports the data from the reader into merkledag file + // + // TODO: a long useful comment on how to use this for many different scenarios + Add(context.Context, files.Node, ...options.UnixfsAddOption) (ResolvedPath, error) + + // Get returns a read-only handle to a file tree referenced by a path + // + // Note that some implementations of this API may apply the specified context + // to operations performed on the returned file + Get(context.Context, Path) (files.Node, error) + + // Ls returns the list of links in a directory. Links aren't guaranteed to be + // returned in order + Ls(context.Context, Path, ...options.UnixfsLsOption) (<-chan LsLink, error) +} diff --git a/vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/util.go b/vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/util.go similarity index 100% rename from vendor/github.com/ipfs/go-ipfs/core/coreapi/interface/util.go rename to vendor/gx/ipfs/QmXLwxifxwfc2bAwq6rdjbYqAsGzWsDE9RM5TWMGtykyj6/interface-go-ipfs-core/util.go diff --git a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/.travis.yml b/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/.travis.yml deleted file mode 100644 index b65c7a9f1e..0000000000 --- a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: -- 1.5 -- tip -matrix: - allow_failures: - - go: tip diff --git a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/chain.go b/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/chain.go deleted file mode 100644 index 006583eaed..0000000000 --- a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/chain.go +++ /dev/null @@ -1,92 +0,0 @@ -package xhandler - -import ( - "context" - "net/http" -) - -// Chain is an helper to chain middleware handlers together for an easier -// management. -type Chain []func(next HandlerC) HandlerC - -// UseC appends a context-aware handler to the middleware chain. -func (c *Chain) UseC(f func(next HandlerC) HandlerC) { - *c = append(*c, f) -} - -// Use appends a standard http.Handler to the middleware chain without -// lossing track of the context when inserted between two context aware handlers. -// -// Caveat: the f function will be called on each request so you are better to put -// any initialization sequence outside of this function. -func (c *Chain) Use(f func(next http.Handler) http.Handler) { - xf := func(next HandlerC) HandlerC { - return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { - n := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - next.ServeHTTPC(ctx, w, r) - }) - f(n).ServeHTTP(w, r) - }) - } - *c = append(*c, xf) -} - -// Handler wraps the provided final handler with all the middleware appended to -// the chain and return a new standard http.Handler instance. -// The context.Background() context is injected automatically. -func (c Chain) Handler(xh HandlerC) http.Handler { - ctx := context.Background() - return c.HandlerCtx(ctx, xh) -} - -// HandlerFC is an helper to provide a function (HandlerFuncC) to Handler(). -// -// HandlerFC is equivalent to: -// c.Handler(xhandler.HandlerFuncC(xhc)) -func (c Chain) HandlerFC(xhf HandlerFuncC) http.Handler { - ctx := context.Background() - return c.HandlerCtx(ctx, HandlerFuncC(xhf)) -} - -// HandlerH is an helper to provide a standard http handler (http.HandlerFunc) -// to Handler(). Your final handler won't have access the context though. -func (c Chain) HandlerH(h http.Handler) http.Handler { - ctx := context.Background() - return c.HandlerCtx(ctx, HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { - h.ServeHTTP(w, r) - })) -} - -// HandlerF is an helper to provide a standard http handler function -// (http.HandlerFunc) to Handler(). Your final handler won't have access -// the context though. -func (c Chain) HandlerF(hf http.HandlerFunc) http.Handler { - ctx := context.Background() - return c.HandlerCtx(ctx, HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { - hf(w, r) - })) -} - -// HandlerCtx wraps the provided final handler with all the middleware appended to -// the chain and return a new standard http.Handler instance. -func (c Chain) HandlerCtx(ctx context.Context, xh HandlerC) http.Handler { - return New(ctx, c.HandlerC(xh)) -} - -// HandlerC wraps the provided final handler with all the middleware appended to -// the chain and returns a HandlerC instance. -func (c Chain) HandlerC(xh HandlerC) HandlerC { - for i := len(c) - 1; i >= 0; i-- { - xh = c[i](xh) - } - return xh -} - -// HandlerCF wraps the provided final handler func with all the middleware appended to -// the chain and returns a HandlerC instance. -// -// HandlerCF is equivalent to: -// c.HandlerC(xhandler.HandlerFuncC(xhc)) -func (c Chain) HandlerCF(xhc HandlerFuncC) HandlerC { - return c.HandlerC(HandlerFuncC(xhc)) -} diff --git a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/package.json b/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/package.json deleted file mode 100644 index d4de640b98..0000000000 --- a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "rs", - "bugs": { - "url": "https://github.com/rs/xhandler/issues" - }, - "gx": { - "dvcsimport": "github.com/rs/xhandler" - }, - "gxDependencies": [ - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "xhandler", - "version": "0.0.0" -} - diff --git a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/xhandler.go b/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/xhandler.go deleted file mode 100644 index ddacdcc994..0000000000 --- a/vendor/gx/ipfs/QmXMPT8tVwqKHZKWxnrfbYqUEaDJ5SF3Yh3fnFthaSrU37/xhandler/xhandler.go +++ /dev/null @@ -1,41 +0,0 @@ -// Package xhandler provides a bridge between http.Handler and net/context. -// -// xhandler enforces net/context in your handlers without sacrificing -// compatibility with existing http.Handlers nor imposing a specific router. -// -// Thanks to net/context deadline management, xhandler is able to enforce -// a per request deadline and will cancel the context in when the client close -// the connection unexpectedly. -// -// You may create net/context aware middlewares pretty much the same way as -// you would do with http.Handler. -package xhandler - -import ( - "context" - "net/http" -) - -// HandlerC is a net/context aware http.Handler -type HandlerC interface { - ServeHTTPC(context.Context, http.ResponseWriter, *http.Request) -} - -// HandlerFuncC type is an adapter to allow the use of ordinary functions -// as a xhandler.Handler. If f is a function with the appropriate signature, -// xhandler.HandlerFuncC(f) is a xhandler.Handler object that calls f. -type HandlerFuncC func(context.Context, http.ResponseWriter, *http.Request) - -// ServeHTTPC calls f(ctx, w, r). -func (f HandlerFuncC) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request) { - f(ctx, w, r) -} - -// New creates a conventional http.Handler injecting the provided root -// context to sub handlers. This handler is used as a bridge between conventional -// http.Handler and context aware handlers. -func New(ctx context.Context, h HandlerC) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - h.ServeHTTPC(ctx, w, r) - }) -} diff --git a/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/.travis.yml b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/.travis.yml new file mode 100644 index 0000000000..90a67c7500 --- /dev/null +++ b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/.travis.yml @@ -0,0 +1,21 @@ +sudo: false + +language: go +go: + - 1.11 + +install: + - go get github.com/whyrusleeping/gx + - go get github.com/whyrusleeping/gx-go +script: + - make test + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: +email: false diff --git a/vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/LICENSE b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface/LICENSE rename to vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/LICENSE diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/Makefile b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/Makefile similarity index 100% rename from vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/Makefile rename to vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/Makefile diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/README.md b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/README.md similarity index 100% rename from vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/README.md rename to vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/README.md diff --git a/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/key.go b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/key.go new file mode 100644 index 0000000000..b57756f09a --- /dev/null +++ b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/key.go @@ -0,0 +1,36 @@ +// Package dshelp provides utilities for parsing and creating +// datastore keys used by go-ipfs +package dshelp + +import ( + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +// NewKeyFromBinary creates a new key from a byte slice. +func NewKeyFromBinary(rawKey []byte) datastore.Key { + buf := make([]byte, 1+base32.RawStdEncoding.EncodedLen(len(rawKey))) + buf[0] = '/' + base32.RawStdEncoding.Encode(buf[1:], rawKey) + return datastore.RawKey(string(buf)) +} + +// BinaryFromDsKey returns the byte slice corresponding to the given Key. +func BinaryFromDsKey(k datastore.Key) ([]byte, error) { + return base32.RawStdEncoding.DecodeString(k.String()[1:]) +} + +// CidToDsKey creates a Key from the given Cid. +func CidToDsKey(k cid.Cid) datastore.Key { + return NewKeyFromBinary(k.Bytes()) +} + +// DsKeyToCid converts the given Key to its corresponding Cid. +func DsKeyToCid(dsKey datastore.Key) (cid.Cid, error) { + kb, err := BinaryFromDsKey(dsKey) + if err != nil { + return cid.Cid{}, err + } + return cid.Cast(kb) +} diff --git a/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/package.json b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/package.json new file mode 100644 index 0000000000..85b7a86ef4 --- /dev/null +++ b/vendor/gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help/package.json @@ -0,0 +1,36 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-ds-help" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-ds-help" + }, + "gxDependencies": [ + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", + "name": "base32", + "version": "0.0.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-ipfs-ds-help", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.7" +} + diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/.travis.yml b/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/.travis.yml deleted file mode 100644 index 545066eb23..0000000000 --- a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: required -dist: trusty -language: go - -os: -- linux -- osx - -osx_image: xcode7.2 - -go: -- 1.6 -- 1.5 - -env: -- ARCH=x86_64 -- ARCH=i686 - -script: -- diff -au <(gofmt -d .) <(printf "") -- go test -race -v ./... diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/README.md b/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/README.md deleted file mode 100644 index 95016018e7..0000000000 --- a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# sha256-simd - -Accelerate SHA256 computations in pure Go using AVX512 and AVX2 for Intel and ARM64 for ARM. On AVX512 it provides an up to 8x improvement (over 3 GB/s per core) in comparison to AVX2. - -## Introduction - -This package is designed as a replacement for `crypto/sha256`. For Intel CPUs it has two flavors for AVX512 and AVX2 (AVX/SSE are also supported). For ARM CPUs with the Cryptography Extensions, advantage is taken of the SHA2 instructions resulting in a massive performance improvement. - -This package uses Golang assembly. The AVX512 version is based on the Intel's "multi-buffer crypto library for IPSec" whereas the other Intel implementations are described in "Fast SHA-256 Implementations on Intel Architecture Processors" by J. Guilford et al. - -## New: Support for AVX512 - -We have added support for AVX512 which results in an up to 8x performance improvement over AVX2 (3.0 GHz Xeon Platinum 8124M CPU): - -``` -$ benchcmp avx2.txt avx512.txt -benchmark AVX2 MB/s AVX512 MB/s speedup -BenchmarkHash5M 448.62 3498.20 7.80x -``` - -The original code was developed by Intel as part of the [multi-buffer crypto library](https://github.com/intel/intel-ipsec-mb) for IPSec or more specifically this [AVX512](https://github.com/intel/intel-ipsec-mb/blob/master/avx512/sha256_x16_avx512.asm) implementation. The key idea behind it is to process a total of 16 checksums in parallel by “transposing” 16 (independent) messages of 64 bytes between a total of 16 ZMM registers (each 64 bytes wide). - -Transposing the input messages means that in order to take full advantage of the speedup you need to have a (server) workload where multiple threads are doing SHA256 calculations in parallel. Unfortunately for this algorithm it is not possible for two message blocks processed in parallel to be dependent on one another — because then the (interim) result of the first part of the message has to be an input into the processing of the second part of the message. - -Whereas the original Intel C implementation requires some sort of explicit scheduling of messages to be processed in parallel, for Golang it makes sense to take advantage of channels in order to group messages together and use channels as well for sending back the results (thereby effectively decoupling the calculations). We have implemented a fairly simple scheduling mechanism that seems to work well in practice. - -Due to this differrent way of scheduling, we decided to use an explicit method to instantiate the AVX512 version. Essentially one or more AVX512 processing servers ([`Avx512Server`](https://github.com/minio/sha256-simd/blob/master/sha256blockAvx512_amd64.go#L294)) have to be created whereby each server can hash over 3 GB/s on a single core. An `hash.Hash` object ([`Avx512Digest`](https://github.com/minio/sha256-simd/blob/master/sha256blockAvx512_amd64.go#L45)) is then instantiated using one of these servers and used in the regular fashion: - -```go -import "github.com/minio/sha256-simd" - -func main() { - server := sha256.NewAvx512Server() - h512 := sha256.NewAvx512(server) - h512.Write(fileBlock) - digest := h512.Sum([]byte{}) -} -``` - -Note that, because of the scheduling overhead, for small messages (< 1 MB) you will be better off using the regular SHA256 hashing (but those are typically not performance critical anyway). Some other tips to get the best performance: -* Have many go routines doing SHA256 calculations in parallel. -* Try to Write() messages in multiples of 64 bytes. -* Try to keep the overall length of messages to a roughly similar size ie. 5 MB (this way all 16 ‘lanes’ in the AVX512 computations are contributing as much as possible). - -More detailed information can be found in this [blog](https://blog.minio.io/accelerate-sha256-up-to-8x-over-3-gb-s-per-core-with-avx512-a0b1d64f78f) post including scaling across cores. - -## Drop-In Replacement - -The following code snippet shows how you can use `github.com/minio/sha256-simd`. This will automatically select the fastest method for the architecture on which it will be executed. - -```go -import "github.com/minio/sha256-simd" - -func main() { - ... - shaWriter := sha256.New() - io.Copy(shaWriter, file) - ... -} -``` - -## Performance - -Below is the speed in MB/s for a single core (ranked fast to slow) for blocks larger than 1 MB. - -| Processor | SIMD | Speed (MB/s) | -| --------------------------------- | ------- | ------------:| -| 3.0 GHz Intel Xeon Platinum 8124M | AVX512 | 3498 | -| 1.2 GHz ARM Cortex-A53 | ARM64 | 638 | -| 3.0 GHz Intel Xeon Platinum 8124M | AVX2 | 449 | -| 3.1 GHz Intel Core i7 | AVX | 362 | -| 3.1 GHz Intel Core i7 | SSE | 299 | - -## asm2plan9s - -In order to be able to work more easily with AVX512/AVX2 instructions, a separate tool was developed to convert SIMD instructions into the corresponding BYTE sequence as accepted by Go assembly. See [asm2plan9s](https://github.com/minio/asm2plan9s) for more information. - -## Why and benefits - -One of the most performance sensitive parts of the [Minio](https://github.com/minio/minio) object storage server is related to SHA256 hash sums calculations. For instance during multi part uploads each part that is uploaded needs to be verified for data integrity by the server. - -Other applications that can benefit from enhanced SHA256 performance are deduplication in storage systems, intrusion detection, version control systems, integrity checking, etc. - -## ARM SHA Extensions - -The 64-bit ARMv8 core has introduced new instructions for SHA1 and SHA2 acceleration as part of the [Cryptography Extensions](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0501f/CHDFJBCJ.html). Below you can see a small excerpt highlighting one of the rounds as is done for the SHA256 calculation process (for full code see [sha256block_arm64.s](https://github.com/minio/sha256-simd/blob/master/sha256block_arm64.s)). - - ``` - sha256h q2, q3, v9.4s - sha256h2 q3, q4, v9.4s - sha256su0 v5.4s, v6.4s - rev32 v8.16b, v8.16b - add v9.4s, v7.4s, v18.4s - mov v4.16b, v2.16b - sha256h q2, q3, v10.4s - sha256h2 q3, q4, v10.4s - sha256su0 v6.4s, v7.4s - sha256su1 v5.4s, v7.4s, v8.4s - ``` - -### Detailed benchmarks - -Benchmarks generated on a 1.2 Ghz Quad-Core ARM Cortex A53 equipped [Pine64](https://www.pine64.com/). - -``` -minio@minio-arm:$ benchcmp golang.txt arm64.txt -benchmark golang arm64 speedup -BenchmarkHash8Bytes-4 0.68 MB/s 5.70 MB/s 8.38x -BenchmarkHash1K-4 5.65 MB/s 326.30 MB/s 57.75x -BenchmarkHash8K-4 6.00 MB/s 570.63 MB/s 95.11x -BenchmarkHash1M-4 6.05 MB/s 638.23 MB/s 105.49x -``` - -## License - -Released under the Apache License v2.0. You can find the complete text in the file LICENSE. - -## Contributing - -Contributions are welcome, please send PRs for any enhancements. diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/package.json b/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/package.json deleted file mode 100644 index 734c6dd33b..0000000000 --- a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "minio", - "bugs": { - "url": "github.com/minio/sha256-simd/issues" - }, - "gx": { - "dvcsimport": "github.com/minio/sha256-simd" - }, - "gxVersion": "0.12.1", - "language": "go", - "license": "Apache-2.0", - "name": "sha256-simd", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.1" -} - diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/.travis.yml b/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/.travis.yml deleted file mode 100644 index 19c1a11da6..0000000000 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -sudo: false - -go: - - 1.9.x - - tip - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/package.json b/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/package.json deleted file mode 100644 index d7ae49a10f..0000000000 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-secio" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-secio" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf", - "name": "go-msgio", - "version": "0.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N", - "name": "go-crypto", - "version": "0.2.1" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "minio", - "hash": "QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU", - "name": "sha256-simd", - "version": "0.1.1" - }, - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "Stebalien", - "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", - "name": "go-buffer-pool", - "version": "0.1.3" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-secio", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.17" -} - diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/transport.go b/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/transport.go deleted file mode 100644 index 769a1c1fad..0000000000 --- a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/transport.go +++ /dev/null @@ -1,81 +0,0 @@ -// Package secio is used to encrypt `go-libp2p-conn` connections. Connections wrapped by secio use secure sessions provided by this package to encrypt all traffic. A TLS-like handshake is used to setup the communication channel. -package secio - -import ( - "context" - "net" - "time" - - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - cs "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" -) - -// ID is secio's protocol ID (used when negotiating with multistream) -const ID = "/secio/1.0.0" - -// SessionGenerator constructs secure communication sessions for a peer. -type Transport struct { - LocalID peer.ID - PrivateKey ci.PrivKey -} - -func New(sk ci.PrivKey) (*Transport, error) { - id, err := peer.IDFromPrivateKey(sk) - if err != nil { - return nil, err - } - return &Transport{ - LocalID: id, - PrivateKey: sk, - }, nil -} - -var _ cs.Transport = (*Transport)(nil) - -func (sg *Transport) SecureInbound(ctx context.Context, insecure net.Conn) (cs.Conn, error) { - return newSecureSession(ctx, sg.LocalID, sg.PrivateKey, insecure, "") -} -func (sg *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (cs.Conn, error) { - return newSecureSession(ctx, sg.LocalID, sg.PrivateKey, insecure, p) -} - -func (s *secureSession) SetReadDeadline(t time.Time) error { - return s.insecure.SetReadDeadline(t) -} - -func (s *secureSession) SetWriteDeadline(t time.Time) error { - return s.insecure.SetWriteDeadline(t) -} - -func (s *secureSession) SetDeadline(t time.Time) error { - return s.insecure.SetDeadline(t) -} - -func (s *secureSession) RemoteAddr() net.Addr { - return s.insecure.RemoteAddr() -} - -func (s *secureSession) LocalAddr() net.Addr { - return s.insecure.LocalAddr() -} - -// LocalPeer retrieves the local peer. -func (s *secureSession) LocalPeer() peer.ID { - return s.localPeer -} - -// LocalPrivateKey retrieves the local peer's PrivateKey -func (s *secureSession) LocalPrivateKey() ci.PrivKey { - return s.localKey -} - -// RemotePeer retrieves the remote peer. -func (s *secureSession) RemotePeer() peer.ID { - return s.remotePeer -} - -// RemotePublicKey retrieves the remote public key. -func (s *secureSession) RemotePublicKey() ci.PubKey { - return s.remote.permanentPubKey -} diff --git a/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/.travis.yml b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/.travis.yml new file mode 100644 index 0000000000..2650fe6e65 --- /dev/null +++ b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/LICENSE b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/LICENSE rename to vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/LICENSE diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/Makefile b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/Makefile similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/Makefile rename to vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/Makefile diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/README.md b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/README.md similarity index 100% rename from vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/README.md rename to vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/README.md diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/codecov.yml b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/codecov.yml rename to vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/codecov.yml diff --git a/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/interface.go b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/interface.go new file mode 100644 index 0000000000..7492af6523 --- /dev/null +++ b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/interface.go @@ -0,0 +1,46 @@ +package ifconnmgr + +import ( + "context" + "time" + + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +// ConnManager tracks connections to peers, and allows consumers to associate metadata +// with each peer. +// +// It enables connections to be trimmed based on implementation-defined heuristics. +type ConnManager interface { + + // TagPeer tags a peer with a string, associating a weight with the tag. + TagPeer(peer.ID, string, int) + + // Untag removes the tagged value from the peer. + UntagPeer(p peer.ID, tag string) + + // GetTagInfo returns the metadata associated with the peer, + // or nil if no metadata has been recorded for the peer. + GetTagInfo(p peer.ID) *TagInfo + + // TrimOpenConns terminates open connections based on an implementation-defined + // heuristic. + TrimOpenConns(ctx context.Context) + + // Notifee returns an implementation that can be called back to inform of + // opened and closed connections. + Notifee() inet.Notifiee +} + +// TagInfo stores metadata associated with a peer. +type TagInfo struct { + FirstSeen time.Time + Value int + + // Tags maps tag ids to the numerical values. + Tags map[string]int + + // Conns maps connection ids (such as remote multiaddr) to their creation time. + Conns map[string]time.Time +} diff --git a/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/null.go b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/null.go new file mode 100644 index 0000000000..db56dbfdf1 --- /dev/null +++ b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/null.go @@ -0,0 +1,26 @@ +package ifconnmgr + +import ( + "context" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +type NullConnMgr struct{} + +func (_ NullConnMgr) TagPeer(peer.ID, string, int) {} +func (_ NullConnMgr) UntagPeer(peer.ID, string) {} +func (_ NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return &TagInfo{} } +func (_ NullConnMgr) TrimOpenConns(context.Context) {} +func (_ NullConnMgr) Notifee() inet.Notifiee { return &cmNotifee{} } + +type cmNotifee struct{} + +func (nn *cmNotifee) Connected(n inet.Network, c inet.Conn) {} +func (nn *cmNotifee) Disconnected(n inet.Network, c inet.Conn) {} +func (nn *cmNotifee) Listen(n inet.Network, addr ma.Multiaddr) {} +func (nn *cmNotifee) ListenClose(n inet.Network, addr ma.Multiaddr) {} +func (nn *cmNotifee) OpenedStream(inet.Network, inet.Stream) {} +func (nn *cmNotifee) ClosedStream(inet.Network, inet.Stream) {} diff --git a/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/package.json b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/package.json new file mode 100644 index 0000000000..2d90568e78 --- /dev/null +++ b/vendor/gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr/package.json @@ -0,0 +1,36 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-interface-connmgr" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-interface-connmgr" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "", + "name": "go-libp2p-interface-connmgr", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.0.32" +} + diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/.travis.yml b/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/.travis.yml deleted file mode 100644 index 58353d7a4c..0000000000 --- a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -language: go - -go: - - 1.9.x - -before_install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/README.md b/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/README.md deleted file mode 100644 index 035fd0b1f8..0000000000 --- a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/README.md +++ /dev/null @@ -1,34 +0,0 @@ -go-addr-util -================== - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://github.com/libp2p/libp2p) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-addr-util/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-addr-util?branch=master) -[![Travis CI](https://travis-ci.org/libp2p/go-addr-util.svg?branch=master)](https://travis-ci.org/libp2p/go-addr-util) - -> Address utilities for libp2p swarm. - -## Table of Contents - -- [Install](#install) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -make install -``` - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-addr-util/issues)! - -Check out our [contributing document](https://github.com/libp2p/community/blob/master/CONTRIBUTE.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/addr.go b/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/addr.go deleted file mode 100644 index 5d02fe9446..0000000000 --- a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/addr.go +++ /dev/null @@ -1,197 +0,0 @@ -package addrutil - -import ( - "context" - "fmt" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -var log = logging.Logger("addrutil") - -// FilterAddrs is a filter that removes certain addresses, according the given filters. -// if all filters return true, the address is kept. -func FilterAddrs(a []ma.Multiaddr, filters ...func(ma.Multiaddr) bool) []ma.Multiaddr { - b := make([]ma.Multiaddr, 0, len(a)) - for _, addr := range a { - good := true - for _, filter := range filters { - good = good && filter(addr) - } - if good { - b = append(b, addr) - } - } - return b -} - -// AddrOverNonLocalIP returns whether the addr uses a non-local ip link -func AddrOverNonLocalIP(a ma.Multiaddr) bool { - split := ma.Split(a) - if len(split) < 1 { - return false - } - if manet.IsIP6LinkLocal(split[0]) { - return false - } - return true -} - -// ResolveUnspecifiedAddress expands an unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to -// use the known local interfaces. If ifaceAddr is nil, we request interface addresses -// from the network stack. (this is so you can provide a cached value if resolving many addrs) -func ResolveUnspecifiedAddress(resolve ma.Multiaddr, ifaceAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) { - // split address into its components - split := ma.Split(resolve) - - // if first component (ip) is not unspecified, use it as is. - if !manet.IsIPUnspecified(split[0]) { - return []ma.Multiaddr{resolve}, nil - } - - out := make([]ma.Multiaddr, 0, len(ifaceAddrs)) - for _, ia := range ifaceAddrs { - // must match the first protocol to be resolve. - if ia.Protocols()[0].Code != resolve.Protocols()[0].Code { - continue - } - - split[0] = ia - joined := ma.Join(split...) - out = append(out, joined) - log.Debug("adding resolved addr:", resolve, joined, out) - } - if len(out) < 1 { - return nil, fmt.Errorf("failed to resolve: %s", resolve) - } - return out, nil -} - -// ResolveUnspecifiedAddresses expands unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to -// use the known local interfaces. -func ResolveUnspecifiedAddresses(unspecAddrs, ifaceAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) { - - // todo optimize: only fetch these if we have a "any" addr. - if len(ifaceAddrs) < 1 { - var err error - ifaceAddrs, err = InterfaceAddresses() - if err != nil { - return nil, err - } - // log.Debug("InterfaceAddresses:", ifaceAddrs) - } - - var outputAddrs []ma.Multiaddr - for _, a := range unspecAddrs { - // unspecified? - resolved, err := ResolveUnspecifiedAddress(a, ifaceAddrs) - if err != nil { - continue // optimistic. if we cant resolve anything, we'll know at the bottom. - } - // log.Debug("resolved:", a, resolved) - outputAddrs = append(outputAddrs, resolved...) - } - - if len(outputAddrs) < 1 { - return nil, fmt.Errorf("failed to specify addrs: %s", unspecAddrs) - } - - log.Event(context.TODO(), "interfaceListenAddresses", func() logging.Loggable { - var addrs []string - for _, addr := range outputAddrs { - addrs = append(addrs, addr.String()) - } - return logging.Metadata{"addresses": addrs} - }()) - - log.Debug("ResolveUnspecifiedAddresses:", unspecAddrs, ifaceAddrs, outputAddrs) - return outputAddrs, nil -} - -// InterfaceAddresses returns a list of addresses associated with local machine -// Note: we do not return link local addresses. IP loopback is ok, because we -// may be connecting to other nodes in the same machine. -func InterfaceAddresses() ([]ma.Multiaddr, error) { - maddrs, err := manet.InterfaceMultiaddrs() - if err != nil { - return nil, err - } - log.Debug("InterfaceAddresses: from manet:", maddrs) - - var out []ma.Multiaddr - for _, a := range maddrs { - if !AddrOverNonLocalIP(a) { - // log.Debug("InterfaceAddresses: skipping unusable:", a) - continue - } - - out = append(out, a) - } - - log.Debug("InterfaceAddresses: usable:", out) - return out, nil -} - -// AddrInList returns whether or not an address is part of a list. -// this is useful to check if NAT is happening (or other bugs?) -func AddrInList(addr ma.Multiaddr, list []ma.Multiaddr) bool { - for _, addr2 := range list { - if addr.Equal(addr2) { - return true - } - } - return false -} - -// AddrIsShareableOnWAN returns whether the given address should be shareable on the -// wide area network (wide internet). -func AddrIsShareableOnWAN(addr ma.Multiaddr) bool { - s := ma.Split(addr) - if len(s) < 1 { - return false - } - a := s[0] - if manet.IsIPLoopback(a) || manet.IsIP6LinkLocal(a) || manet.IsIPUnspecified(a) { - return false - } - return manet.IsThinWaist(a) -} - -// WANShareableAddrs filters addresses based on whether they're shareable on WAN -func WANShareableAddrs(inp []ma.Multiaddr) []ma.Multiaddr { - return FilterAddrs(inp, AddrIsShareableOnWAN) -} - -// Subtract filters out all addrs in b from a -func Subtract(a, b []ma.Multiaddr) []ma.Multiaddr { - return FilterAddrs(a, func(m ma.Multiaddr) bool { - for _, bb := range b { - if m.Equal(bb) { - return false - } - } - return true - }) -} - -// CheckNATWarning checks if our observed addresses differ. if so, -// informs the user that certain things might not work yet -func CheckNATWarning(observed, expected ma.Multiaddr, listen []ma.Multiaddr) { - if observed.Equal(expected) { - return - } - - if !AddrInList(observed, listen) { // probably a nat - log.Warningf(natWarning, observed, listen) - } -} - -const natWarning = `Remote peer observed our address to be: %s -The local addresses are: %s -Thus, connection is going through NAT, and other connections may fail. - -IPFS NAT traversal is still under development. Please bug us on github or irc to fix this. -Baby steps: http://jbenet.static.s3.amazonaws.com/271dfcf/baby-steps.gif -` diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/filter.go b/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/filter.go deleted file mode 100644 index 63c68d62f6..0000000000 --- a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/filter.go +++ /dev/null @@ -1,31 +0,0 @@ -package addrutil - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - mafmt "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" -) - -// SubtractFilter returns a filter func that filters all of the given addresses -func SubtractFilter(addrs ...ma.Multiaddr) func(ma.Multiaddr) bool { - addrmap := make(map[string]bool, len(addrs)) - for _, a := range addrs { - addrmap[string(a.Bytes())] = true - } - - return func(a ma.Multiaddr) bool { - return !addrmap[string(a.Bytes())] - } -} - -// IsFDCostlyTransport returns true for transports that require a new file -// descriptor per connection created -func IsFDCostlyTransport(a ma.Multiaddr) bool { - return mafmt.TCP.Matches(a) -} - -// FilterNeg returns a negated version of the passed in filter -func FilterNeg(f func(ma.Multiaddr) bool) func(ma.Multiaddr) bool { - return func(a ma.Multiaddr) bool { - return !f(a) - } -} diff --git a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/package.json b/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/package.json deleted file mode 100644 index bbf38c5cbc..0000000000 --- a/vendor/gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-addr-util/issues" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-addr-util" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "jbenet", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "MIT", - "name": "go-addr-util", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.7" -} - diff --git a/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/.travis.yml b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/.travis.yml new file mode 100644 index 0000000000..90a67c7500 --- /dev/null +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/.travis.yml @@ -0,0 +1,21 @@ +sudo: false + +language: go +go: + - 1.11 + +install: + - go get github.com/whyrusleeping/gx + - go get github.com/whyrusleeping/gx-go +script: + - make test + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: +email: false diff --git a/vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/LICENSE b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay/LICENSE rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/LICENSE diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/Makefile b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/Makefile similarity index 100% rename from vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/Makefile rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/Makefile diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/README.md b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/README.md similarity index 100% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/README.md rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/README.md diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/arc_cache.go b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/arc_cache.go similarity index 97% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/arc_cache.go rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/arc_cache.go index 0ac3957755..b642d9f978 100644 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/arc_cache.go +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/arc_cache.go @@ -3,9 +3,9 @@ package blockstore import ( "context" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" ) diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/blockstore.go b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/blockstore.go similarity index 93% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/blockstore.go rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/blockstore.go index 23bba9983f..cc9c2067b6 100644 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/blockstore.go +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/blockstore.go @@ -8,13 +8,13 @@ import ( "sync" "sync/atomic" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsns "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/namespace" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsns "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/namespace" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + dshelp "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("blockstore") diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/bloom_cache.go b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/bloom_cache.go similarity index 97% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/bloom_cache.go rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/bloom_cache.go index 0714de0381..cde5edf812 100644 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/bloom_cache.go +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/bloom_cache.go @@ -6,9 +6,9 @@ import ( "sync/atomic" "time" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" bloom "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" ) diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/caching.go b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/caching.go similarity index 100% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/caching.go rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/caching.go diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/idstore.go b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/idstore.go similarity index 89% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/idstore.go rename to vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/idstore.go index 9560fc9fad..6ba824142c 100644 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/idstore.go +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/idstore.go @@ -3,9 +3,9 @@ package blockstore import ( "context" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // idstore wraps a BlockStore to add support for identity hashes diff --git a/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/package.json b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/package.json new file mode 100644 index 0000000000..6a40ca76d9 --- /dev/null +++ b/vendor/gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore/package.json @@ -0,0 +1,65 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-blockstore" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-blockstore" + }, + "gxDependencies": [ + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "ipfs", + "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", + "name": "go-metrics-interface", + "version": "0.2.0" + }, + { + "author": "hashicorp", + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "hector", + "hash": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", + "name": "go-ipfs-ds-help", + "version": "0.1.7" + }, + { + "author": "kubuxu", + "hash": "QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf", + "name": "bbloom", + "version": "0.1.2" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipfs-blockstore", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.8" +} + diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/.travis.yml b/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/.travis.yml deleted file mode 100644 index e31ed20cfb..0000000000 --- a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/interface.go b/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/interface.go deleted file mode 100644 index 04dc35749d..0000000000 --- a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/interface.go +++ /dev/null @@ -1,216 +0,0 @@ -package net - -import ( - "context" - "io" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" -) - -// MessageSizeMax is a soft (recommended) maximum for network messages. -// One can write more, as the interface is a stream. But it is useful -// to bunch it up into multiple read/writes when the whole message is -// a single, large serialized object. -const MessageSizeMax = 1 << 22 // 4 MB - -// Stream represents a bidirectional channel between two agents in -// the IPFS network. "agent" is as granular as desired, potentially -// being a "request -> reply" pair, or whole protocols. -// Streams are backed by stream-muxer streams underneath the hood. -type Stream interface { - smux.Stream - - Protocol() protocol.ID - SetProtocol(protocol.ID) - - // Stat returns metadata pertaining to this stream. - Stat() Stat - - // Conn returns the connection this stream is part of. - Conn() Conn -} - -// Direction represents which peer in a stream initiated a connection. -type Direction int - -const ( - // DirUnknown is the default direction. - DirUnknown Direction = iota - // DirInbound is for when the remote peer initiated a connection. - DirInbound - // DirOutbound is for when the local peer initiated a connection. - DirOutbound -) - -// Stat stores metadata pertaining to a given Stream/Conn. -type Stat struct { - Direction Direction - Extra map[interface{}]interface{} -} - -// StreamHandler is the type of function used to listen for -// streams opened by the remote side. -type StreamHandler func(Stream) - -// ConnSecurity is the interface that one can mix into a connection interface to -// give it the security methods. -type ConnSecurity interface { - // LocalPeer returns our peer ID - LocalPeer() peer.ID - - // LocalPrivateKey returns our private key - LocalPrivateKey() ic.PrivKey - - // RemotePeer returns the peer ID of the remote peer. - RemotePeer() peer.ID - - // RemotePublicKey returns the public key of the remote peer. - RemotePublicKey() ic.PubKey -} - -// ConnMultiaddrs is an interface mixin for connection types that provide multiaddr -// addresses for the endpoints. -type ConnMultiaddrs interface { - // LocalMultiaddr returns the local Multiaddr associated - // with this connection - LocalMultiaddr() ma.Multiaddr - - // RemoteMultiaddr returns the remote Multiaddr associated - // with this connection - RemoteMultiaddr() ma.Multiaddr -} - -// Conn is a connection to a remote peer. It multiplexes streams. -// Usually there is no need to use a Conn directly, but it may -// be useful to get information about the peer on the other side: -// stream.Conn().RemotePeer() -type Conn interface { - io.Closer - - ConnSecurity - ConnMultiaddrs - - // NewStream constructs a new Stream over this conn. - NewStream() (Stream, error) - - // GetStreams returns all open streams over this conn. - GetStreams() []Stream - - // Stat stores metadata pertaining to this conn. - Stat() Stat -} - -// ConnHandler is the type of function used to listen for -// connections opened by the remote side. -type ConnHandler func(Conn) - -// Network is the interface used to connect to the outside world. -// It dials and listens for connections. it uses a Swarm to pool -// connnections (see swarm pkg, and peerstream.Swarm). Connections -// are encrypted with a TLS-like protocol. -type Network interface { - Dialer - io.Closer - - // SetStreamHandler sets the handler for new streams opened by the - // remote side. This operation is threadsafe. - SetStreamHandler(StreamHandler) - - // SetConnHandler sets the handler for new connections opened by the - // remote side. This operation is threadsafe. - SetConnHandler(ConnHandler) - - // NewStream returns a new stream to given peer p. - // If there is no connection to p, attempts to create one. - NewStream(context.Context, peer.ID) (Stream, error) - - // Listen tells the network to start listening on given multiaddrs. - Listen(...ma.Multiaddr) error - - // ListenAddresses returns a list of addresses at which this network listens. - ListenAddresses() []ma.Multiaddr - - // InterfaceListenAddresses returns a list of addresses at which this network - // listens. It expands "any interface" addresses (/ip4/0.0.0.0, /ip6/::) to - // use the known local interfaces. - InterfaceListenAddresses() ([]ma.Multiaddr, error) - - // Process returns the network's Process - Process() goprocess.Process -} - -// Dialer represents a service that can dial out to peers -// (this is usually just a Network, but other services may not need the whole -// stack, and thus it becomes easier to mock) -type Dialer interface { - - // Peerstore returns the internal peerstore - // This is useful to tell the dialer about a new address for a peer. - // Or use one of the public keys found out over the network. - Peerstore() pstore.Peerstore - - // LocalPeer returns the local peer associated with this network - LocalPeer() peer.ID - - // DialPeer establishes a connection to a given peer - DialPeer(context.Context, peer.ID) (Conn, error) - - // ClosePeer closes the connection to a given peer - ClosePeer(peer.ID) error - - // Connectedness returns a state signaling connection capabilities - Connectedness(peer.ID) Connectedness - - // Peers returns the peers connected - Peers() []peer.ID - - // Conns returns the connections in this Netowrk - Conns() []Conn - - // ConnsToPeer returns the connections in this Netowrk for given peer. - ConnsToPeer(p peer.ID) []Conn - - // Notify/StopNotify register and unregister a notifiee for signals - Notify(Notifiee) - StopNotify(Notifiee) -} - -// Connectedness signals the capacity for a connection with a given node. -// It is used to signal to services and other peers whether a node is reachable. -type Connectedness int - -const ( - // NotConnected means no connection to peer, and no extra information (default) - NotConnected Connectedness = iota - - // Connected means has an open, live connection to peer - Connected - - // CanConnect means recently connected to peer, terminated gracefully - CanConnect - - // CannotConnect means recently attempted connecting but failed to connect. - // (should signal "made effort, failed") - CannotConnect -) - -// Notifiee is an interface for an object wishing to receive -// notifications from a Network. -type Notifiee interface { - Listen(Network, ma.Multiaddr) // called when network starts listening on an addr - ListenClose(Network, ma.Multiaddr) // called when network stops listening on an addr - Connected(Network, Conn) // called when a connection opened - Disconnected(Network, Conn) // called when a connection closed - OpenedStream(Network, Stream) // called when a stream opened - ClosedStream(Network, Stream) // called when a stream closed - - // TODO - // PeerConnected(Network, peer.ID) // called when a peer connected - // PeerDisconnected(Network, peer.ID) // called when a peer disconnected -} diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/package.json b/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/package.json deleted file mode 100644 index 0b524e1c3a..0000000000 --- a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-net" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-net" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "", - "name": "go-libp2p-net", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.15" -} - diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/.travis.yml b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/.travis.yml deleted file mode 100644 index 1985a1da72..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -env: - - IPFS_REUSEPORT=false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/LICENSE b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/LICENSE deleted file mode 100644 index 0e323020a6..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Protocol Labs, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/README.md b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/README.md deleted file mode 100644 index ab05d8da56..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# go-libp2p-kad-dht - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://github.com/libp2p/libp2p) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-kad-dht?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p-kad-dht) -[![Build Status](https://travis-ci.org/libp2p/go-libp2p-kad-dht.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-kad-dht) - -> A Kademlia DHT implemention on go-libp2p - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -go get github.com/libp2p/go-libp2p-kad-dht -``` - -## Usage - -Go to https://godoc.org/github.com/libp2p/go-libp2p-kad-dht. - -## Contribute - -Contributions welcome. Please check out [the issues](https://github.com/libp2p/go-libp2p-kad-dht/issues). - -Check out our [contributing document](https://github.com/libp2p/community/blob/master/CONTRIBUTE.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © Protocol Labs Inc. diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht.go deleted file mode 100644 index c00699f207..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht.go +++ /dev/null @@ -1,374 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after kademlia with Coral and S/Kademlia modifications. -package dht - -import ( - "bytes" - "context" - "errors" - "fmt" - "sync" - "time" - - routing "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing" - pb "gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb" - providers "gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/providers" - - host "gx/ipfs/QmNmJZL7FQySMtE2BQuLMuZg2EB2CLEunJJUSVSc9YnnbV/go-libp2p-host" - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - kb "gx/ipfs/QmTH6VLu3WXfbH3nuLdmscgPWuiPZv3GMJ2YCdzBS5z91T/go-libp2p-kbucket" - record "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record" - recpb "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record/pb" - ds "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - ci "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto" - cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var log = logging.Logger("dht") - -var ProtocolDHT protocol.ID = "/ipfs/kad/1.0.0" -var ProtocolDHTOld protocol.ID = "/ipfs/dht" - -// NumBootstrapQueries defines the number of random dht queries to do to -// collect members of the routing table. -const NumBootstrapQueries = 5 - -// IpfsDHT is an implementation of Kademlia with Coral and S/Kademlia modifications. -// It is used to implement the base IpfsRouting module. -type IpfsDHT struct { - host host.Host // the network services we need - self peer.ID // Local peer (yourself) - peerstore pstore.Peerstore // Peer Registry - - datastore ds.Datastore // Local data - - routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes - providers *providers.ProviderManager - - birth time.Time // When this peer started up - - Validator record.Validator // record validator funcs - Selector record.Selector // record selection funcs - - ctx context.Context - proc goprocess.Process - - strmap map[peer.ID]*messageSender - smlk sync.Mutex - - plk sync.Mutex -} - -// NewDHT creates a new DHT object with the given peer as the 'local' host -func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht := NewDHTClient(ctx, h, dstore) - - h.SetStreamHandler(ProtocolDHT, dht.handleNewStream) - h.SetStreamHandler(ProtocolDHTOld, dht.handleNewStream) - - return dht -} - -// NewDHTClient creates a new DHT object with the given peer as the 'local' host -func NewDHTClient(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - dht := makeDHT(ctx, h, dstore) - - // register for network notifs. - dht.host.Network().Notify((*netNotifiee)(dht)) - - dht.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { - // remove ourselves from network notifs. - dht.host.Network().StopNotify((*netNotifiee)(dht)) - return nil - }) - - dht.proc.AddChild(dht.providers.Process()) - - dht.Validator["pk"] = record.PublicKeyValidator - dht.Selector["pk"] = record.PublicKeySelector - - return dht -} - -func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { - rt := kb.NewRoutingTable(KValue, kb.ConvertPeerID(h.ID()), time.Minute, h.Peerstore()) - - cmgr := h.ConnManager() - rt.PeerAdded = func(p peer.ID) { - cmgr.TagPeer(p, "kbucket", 5) - } - rt.PeerRemoved = func(p peer.ID) { - cmgr.UntagPeer(p, "kbucket") - } - - return &IpfsDHT{ - datastore: dstore, - self: h.ID(), - peerstore: h.Peerstore(), - host: h, - strmap: make(map[peer.ID]*messageSender), - ctx: ctx, - providers: providers.NewProviderManager(ctx, h.ID(), dstore), - birth: time.Now(), - routingTable: rt, - - Validator: make(record.Validator), - Selector: make(record.Selector), - } -} - -// putValueToPeer stores the given key/value pair at the peer 'p' -func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, - key string, rec *recpb.Record) error { - - pmes := pb.NewMessage(pb.Message_PUT_VALUE, key, 0) - pmes.Record = rec - rpmes, err := dht.sendRequest(ctx, p, pmes) - switch err { - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), key) - fallthrough - default: - return err - case nil: - break - } - - if err != nil { - return err - } - - if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { - return errors.New("value not put correctly") - } - return nil -} - -var errInvalidRecord = errors.New("received invalid record") - -// getValueOrPeers queries a particular peer p for the value for -// key. It returns either the value or a list of closer peers. -// NOTE: It will update the dht's peerstore with any new addresses -// it finds for the given peer. -func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID, key string) (*recpb.Record, []*pstore.PeerInfo, error) { - - pmes, err := dht.getValueSingle(ctx, p, key) - if err != nil { - return nil, nil, err - } - - // Perhaps we were given closer peers - peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) - - if record := pmes.GetRecord(); record != nil { - // Success! We were given the value - log.Debug("getValueOrPeers: got value") - - // make sure record is valid. - err = dht.verifyRecordOnline(ctx, record) - if err != nil { - log.Info("Received invalid record! (discarded)") - // return a sentinal to signify an invalid record was received - err = errInvalidRecord - record = new(recpb.Record) - } - return record, peers, err - } - - if len(peers) > 0 { - log.Debug("getValueOrPeers: peers") - return nil, peers, nil - } - - log.Warning("getValueOrPeers: routing.ErrNotFound") - return nil, nil, routing.ErrNotFound -} - -// getValueSingle simply performs the get value RPC with the given parameters -func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, key string) (*pb.Message, error) { - meta := logging.LoggableMap{ - "key": key, - "peer": p, - } - - eip := log.EventBegin(ctx, "getValueSingle", meta) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_VALUE, key, 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// getLocal attempts to retrieve the value from the datastore -func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) { - log.Debugf("getLocal %s", key) - - v, err := dht.datastore.Get(mkDsKey(key)) - if err != nil { - return nil, err - } - log.Debugf("found %s in local datastore") - - byt, ok := v.([]byte) - if !ok { - return nil, errors.New("value stored in datastore not []byte") - } - rec := new(recpb.Record) - err = proto.Unmarshal(byt, rec) - if err != nil { - return nil, err - } - - err = dht.verifyRecordLocally(rec) - if err != nil { - log.Debugf("local record verify failed: %s (discarded)", err) - return nil, err - } - - return rec, nil -} - -// getOwnPrivateKey attempts to load the local peers private -// key from the peerstore. -func (dht *IpfsDHT) getOwnPrivateKey() (ci.PrivKey, error) { - sk := dht.peerstore.PrivKey(dht.self) - if sk == nil { - log.Warningf("%s dht cannot get own private key!", dht.self) - return nil, fmt.Errorf("cannot get private key to sign record!") - } - return sk, nil -} - -// putLocal stores the key value pair in the datastore -func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error { - data, err := proto.Marshal(rec) - if err != nil { - return err - } - - return dht.datastore.Put(mkDsKey(key), data) -} - -// Update signals the routingTable to Update its last-seen status -// on the given peer. -func (dht *IpfsDHT) Update(ctx context.Context, p peer.ID) { - log.Event(ctx, "updatePeer", p) - dht.routingTable.Update(p) -} - -// FindLocal looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in. -func (dht *IpfsDHT) FindLocal(id peer.ID) pstore.PeerInfo { - p := dht.routingTable.Find(id) - if p != "" { - return dht.peerstore.PeerInfo(p) - } - return pstore.PeerInfo{} -} - -// findPeerSingle asks peer 'p' if they know where the peer with id 'id' is -func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findPeerSingle", p, id) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_FIND_NODE, string(id), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), id) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key *cid.Cid) (*pb.Message, error) { - eip := log.EventBegin(ctx, "findProvidersSingle", p, key) - defer eip.Done() - - pmes := pb.NewMessage(pb.Message_GET_PROVIDERS, key.KeyString(), 0) - resp, err := dht.sendRequest(ctx, p, pmes) - switch err { - case nil: - return resp, nil - case ErrReadTimeout: - log.Warningf("read timeout: %s %s", p.Pretty(), key) - fallthrough - default: - eip.SetError(err) - return nil, err - } -} - -// nearestPeersToQuery returns the routing tables closest peers. -func (dht *IpfsDHT) nearestPeersToQuery(pmes *pb.Message, count int) []peer.ID { - closer := dht.routingTable.NearestPeers(kb.ConvertKey(pmes.GetKey()), count) - return closer -} - -// betterPeerToQuery returns nearestPeersToQuery, but iff closer than self. -func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) []peer.ID { - closer := dht.nearestPeersToQuery(pmes, count) - - // no node? nil - if closer == nil { - log.Warning("no closer peers to send:", p) - return nil - } - - filtered := make([]peer.ID, 0, len(closer)) - for _, clp := range closer { - - // == to self? thats bad - if clp == dht.self { - log.Warning("attempted to return self! this shouldn't happen...") - return nil - } - // Dont send a peer back themselves - if clp == p { - continue - } - - filtered = append(filtered, clp) - } - - // ok seems like closer nodes - return filtered -} - -// Context return dht's context -func (dht *IpfsDHT) Context() context.Context { - return dht.ctx -} - -// Process return dht's process -func (dht *IpfsDHT) Process() goprocess.Process { - return dht.proc -} - -// Close calls Process Close -func (dht *IpfsDHT) Close() error { - return dht.proc.Close() -} - -func mkDsKey(s string) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_bootstrap.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_bootstrap.go deleted file mode 100644 index 41d1f3cf29..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_bootstrap.go +++ /dev/null @@ -1,190 +0,0 @@ -// Package dht implements a distributed hash table that satisfies the ipfs routing -// interface. This DHT is modeled after kademlia with Coral and S/Kademlia modifications. -package dht - -import ( - "context" - "crypto/rand" - "fmt" - "sync" - "time" - - u "gx/ipfs/QmNiJuT8Ja3hMVpBHXv3Q6dwmperaQ6JjLtpMQgMCD7xvx/go-ipfs-util" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - routing "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" -) - -// BootstrapConfig specifies parameters used bootstrapping the DHT. -// -// Note there is a tradeoff between the bootstrap period and the -// number of queries. We could support a higher period with less -// queries. -type BootstrapConfig struct { - Queries int // how many queries to run per period - Period time.Duration // how often to run periodi cbootstrap. - Timeout time.Duration // how long to wait for a bootstrao query to run -} - -var DefaultBootstrapConfig = BootstrapConfig{ - // For now, this is set to 1 query. - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. Once we are more certain - // of our implementation's robustness, we should lower this down to 8 or 4. - Queries: 1, - - // For now, this is set to 1 minute, which is a medium period. We are - // We are currently more interested in ensuring we have a properly formed - // DHT than making sure our dht minimizes traffic. - Period: time.Duration(5 * time.Minute), - - Timeout: time.Duration(10 * time.Second), -} - -// Bootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// As opposed to BootstrapWithConfig, Bootstrap satisfies the routing interface -func (dht *IpfsDHT) Bootstrap(ctx context.Context) error { - proc, err := dht.BootstrapWithConfig(DefaultBootstrapConfig) - if err != nil { - return err - } - - // wait till ctx or dht.Context exits. - // we have to do it this way to satisfy the Routing interface (contexts) - go func() { - defer proc.Close() - select { - case <-ctx.Done(): - case <-dht.Context().Done(): - } - }() - - return nil -} - -// BootstrapWithConfig ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// BootstrapWithConfig returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapWithConfig(cfg BootstrapConfig) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - - proc := periodicproc.Tick(cfg.Period, dht.bootstrapWorker(cfg)) - - return proc, nil -} - -// SignalBootstrap ensures the dht routing table remains healthy as peers come and go. -// it builds up a list of peers by requesting random peer IDs. The Bootstrap -// process will run a number of queries each time, and run every time signal fires. -// These parameters are configurable. -// -// SignalBootstrap returns a process, so the user can stop it. -func (dht *IpfsDHT) BootstrapOnSignal(cfg BootstrapConfig, signal <-chan time.Time) (goprocess.Process, error) { - if cfg.Queries <= 0 { - return nil, fmt.Errorf("invalid number of queries: %d", cfg.Queries) - } - - if signal == nil { - return nil, fmt.Errorf("invalid signal: %v", signal) - } - - proc := periodicproc.Ticker(signal, dht.bootstrapWorker(cfg)) - - return proc, nil -} - -func (dht *IpfsDHT) bootstrapWorker(cfg BootstrapConfig) func(worker goprocess.Process) { - return func(worker goprocess.Process) { - // it would be useful to be able to send out signals of when we bootstrap, too... - // maybe this is a good case for whole module event pub/sub? - - ctx := dht.Context() - if err := dht.runBootstrap(ctx, cfg); err != nil { - log.Warning(err) - // A bootstrapping error is important to notice but not fatal. - } - } -} - -// runBootstrap builds up list of peers by requesting random peer IDs -func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error { - bslog := func(msg string) { - log.Debugf("DHT %s dhtRunBootstrap %s -- routing table size: %d", dht.self, msg, dht.routingTable.Size()) - } - bslog("start") - defer bslog("end") - defer log.EventBegin(ctx, "dhtRunBootstrap").Done() - - var merr u.MultiErr - - randomID := func() peer.ID { - // 16 random bytes is not a valid peer id. it may be fine becuase - // the dht will rehash to its own keyspace anyway. - id := make([]byte, 16) - rand.Read(id) - id = u.Hash(id) - return peer.ID(id) - } - - // bootstrap sequentially, as results will compound - ctx, cancel := context.WithTimeout(ctx, cfg.Timeout) - defer cancel() - runQuery := func(ctx context.Context, id peer.ID) { - p, err := dht.FindPeer(ctx, id) - if err == routing.ErrNotFound { - // this isn't an error. this is precisely what we expect. - } else if err != nil { - merr = append(merr, err) - } else { - // woah, actually found a peer with that ID? this shouldn't happen normally - // (as the ID we use is not a real ID). this is an odd error worth logging. - err := fmt.Errorf("Bootstrap peer error: Actually FOUND peer. (%s, %s)", id, p) - log.Warningf("%s", err) - merr = append(merr, err) - } - } - - sequential := true - if sequential { - // these should be parallel normally. but can make them sequential for debugging. - // note that the core/bootstrap context deadline should be extended too for that. - for i := 0; i < cfg.Queries; i++ { - id := randomID() - log.Debugf("Bootstrapping query (%d/%d) to random ID: %s", i+1, cfg.Queries, id) - runQuery(ctx, id) - } - - } else { - // note on parallelism here: the context is passed in to the queries, so they - // **should** exit when it exceeds, making this function exit on ctx cancel. - // normally, we should be selecting on ctx.Done() here too, but this gets - // complicated to do with WaitGroup, and doesnt wait for the children to exit. - var wg sync.WaitGroup - for i := 0; i < cfg.Queries; i++ { - wg.Add(1) - go func() { - defer wg.Done() - - id := randomID() - log.Debugf("Bootstrapping query (%d/%d) to random ID: %s", i+1, cfg.Queries, id) - runQuery(ctx, id) - }() - } - wg.Wait() - } - - if len(merr) > 0 { - return merr - } - return nil -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_net.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_net.go deleted file mode 100644 index d9b3e51371..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/dht_net.go +++ /dev/null @@ -1,314 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "sync" - "time" - - ctxio "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io" - inet "gx/ipfs/QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG/go-libp2p-net" - pb "gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb" - ggio "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" -) - -var dhtReadMessageTimeout = time.Minute -var ErrReadTimeout = fmt.Errorf("timed out reading response") - -// handleNewStream implements the inet.StreamHandler -func (dht *IpfsDHT) handleNewStream(s inet.Stream) { - go dht.handleNewMessage(s) -} - -func (dht *IpfsDHT) handleNewMessage(s inet.Stream) { - defer s.Close() - - ctx := dht.Context() - cr := ctxio.NewReader(ctx, s) // ok to use. we defer close stream in this func - cw := ctxio.NewWriter(ctx, s) // ok to use. we defer close stream in this func - r := ggio.NewDelimitedReader(cr, inet.MessageSizeMax) - w := ggio.NewDelimitedWriter(cw) - mPeer := s.Conn().RemotePeer() - - for { - // receive msg - pmes := new(pb.Message) - if err := r.ReadMsg(pmes); err != nil { - s.Reset() - log.Debugf("Error unmarshaling data: %s", err) - return - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, mPeer, pmes) - - // get handler for this msg type. - handler := dht.handlerForMsgType(pmes.GetType()) - if handler == nil { - s.Reset() - log.Debug("got back nil handler from handlerForMsgType") - return - } - - // dispatch handler. - rpmes, err := handler(ctx, mPeer, pmes) - if err != nil { - s.Reset() - log.Debugf("handle message error: %s", err) - return - } - - // if nil response, return it before serializing - if rpmes == nil { - log.Debug("got back nil response from request") - continue - } - - // send out response msg - if err := w.WriteMsg(rpmes); err != nil { - s.Reset() - log.Debugf("send response error: %s", err) - return - } - } -} - -// sendRequest sends out a request, but also makes sure to -// measure the RTT for latency measurements. -func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return nil, err - } - - start := time.Now() - - rpmes, err := ms.SendRequest(ctx, pmes) - if err != nil { - return nil, err - } - - // update the peer (on valid msgs only) - dht.updateFromMessage(ctx, p, rpmes) - - dht.peerstore.RecordLatency(p, time.Since(start)) - log.Event(ctx, "dhtReceivedMessage", dht.self, p, rpmes) - return rpmes, nil -} - -// sendMessage sends out a message -func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { - ms, err := dht.messageSenderForPeer(p) - if err != nil { - return err - } - - if err := ms.SendMessage(ctx, pmes); err != nil { - return err - } - log.Event(ctx, "dhtSentMessage", dht.self, p, pmes) - return nil -} - -func (dht *IpfsDHT) updateFromMessage(ctx context.Context, p peer.ID, mes *pb.Message) error { - dht.Update(ctx, p) - return nil -} - -func (dht *IpfsDHT) messageSenderForPeer(p peer.ID) (*messageSender, error) { - dht.smlk.Lock() - ms, ok := dht.strmap[p] - if ok { - dht.smlk.Unlock() - return ms, nil - } - ms = &messageSender{p: p, dht: dht} - dht.strmap[p] = ms - dht.smlk.Unlock() - - if err := ms.prepOrInvalidate(); err != nil { - dht.smlk.Lock() - defer dht.smlk.Unlock() - - if msCur, ok := dht.strmap[p]; ok { - // Changed. Use the new one, old one is invalid and - // not in the map so we can just throw it away. - if ms != msCur { - return msCur, nil - } - // Not changed, remove the now invalid stream from the - // map. - delete(dht.strmap, p) - } - // Invalid but not in map. Must have been removed by a disconnect. - return nil, err - } - // All ready to go. - return ms, nil -} - -type messageSender struct { - s inet.Stream - r ggio.ReadCloser - w ggio.WriteCloser - lk sync.Mutex - p peer.ID - dht *IpfsDHT - - invalid bool - singleMes int -} - -// invalidate is called before this messageSender is removed from the strmap. -// It prevents the messageSender from being reused/reinitialized and then -// forgotten (leaving the stream open). -func (ms *messageSender) invalidate() { - ms.invalid = true - if ms.s != nil { - ms.s.Reset() - ms.s = nil - } -} - -func (ms *messageSender) prepOrInvalidate() error { - ms.lk.Lock() - defer ms.lk.Unlock() - if err := ms.prep(); err != nil { - ms.invalidate() - return err - } - return nil -} - -func (ms *messageSender) prep() error { - if ms.invalid { - return fmt.Errorf("message sender has been invalidated") - } - if ms.s != nil { - return nil - } - - nstr, err := ms.dht.host.NewStream(ms.dht.ctx, ms.p, ProtocolDHT, ProtocolDHTOld) - if err != nil { - return err - } - - ms.r = ggio.NewDelimitedReader(nstr, inet.MessageSizeMax) - ms.w = ggio.NewDelimitedWriter(nstr) - ms.s = nstr - - return nil -} - -// streamReuseTries is the number of times we will try to reuse a stream to a -// given peer before giving up and reverting to the old one-message-per-stream -// behaviour. -const streamReuseTries = 3 - -func (ms *messageSender) SendMessage(ctx context.Context, pmes *pb.Message) error { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return err - } - - if err := ms.w.WriteMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - ms.s.Close() - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return nil - } -} - -func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb.Message, error) { - ms.lk.Lock() - defer ms.lk.Unlock() - retry := false - for { - if err := ms.prep(); err != nil { - return nil, err - } - - if err := ms.w.WriteMsg(pmes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error writing message, bailing: ", err) - return nil, err - } else { - log.Info("error writing message, trying again: ", err) - retry = true - continue - } - } - - mes := new(pb.Message) - if err := ms.ctxReadMsg(ctx, mes); err != nil { - ms.s.Reset() - ms.s = nil - - if retry { - log.Info("error reading message, bailing: ", err) - return nil, err - } else { - log.Info("error reading message, trying again: ", err) - retry = true - continue - } - } - - log.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) - - if ms.singleMes > streamReuseTries { - ms.s.Close() - ms.s = nil - } else if retry { - ms.singleMes++ - } - - return mes, nil - } -} - -func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { - errc := make(chan error, 1) - go func(r ggio.ReadCloser) { - errc <- r.ReadMsg(mes) - }(ms.r) - - t := time.NewTimer(dhtReadMessageTimeout) - defer t.Stop() - - select { - case err := <-errc: - return err - case <-ctx.Done(): - return ctx.Err() - case <-t.C: - return ErrReadTimeout - } -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/handlers.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/handlers.go deleted file mode 100644 index 24c863e1a2..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/handlers.go +++ /dev/null @@ -1,335 +0,0 @@ -package dht - -import ( - "context" - "errors" - "fmt" - "time" - - u "gx/ipfs/QmNiJuT8Ja3hMVpBHXv3Q6dwmperaQ6JjLtpMQgMCD7xvx/go-ipfs-util" - recpb "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record/pb" - ds "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - pb "gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb" - proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" - lgbl "gx/ipfs/Qmf9JgVLz46pxPXwG2eWSJpkqVCcjD4rp7zCRi2KP6GTNB/go-libp2p-loggables" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -// The number of closer peers to send on requests. -var CloserPeerCount = KValue - -// dhthandler specifies the signature of functions that handle DHT messages. -type dhtHandler func(context.Context, peer.ID, *pb.Message) (*pb.Message, error) - -func (dht *IpfsDHT) handlerForMsgType(t pb.Message_MessageType) dhtHandler { - switch t { - case pb.Message_GET_VALUE: - return dht.handleGetValue - case pb.Message_PUT_VALUE: - return dht.handlePutValue - case pb.Message_FIND_NODE: - return dht.handleFindPeer - case pb.Message_ADD_PROVIDER: - return dht.handleAddProvider - case pb.Message_GET_PROVIDERS: - return dht.handleGetProviders - case pb.Message_PING: - return dht.handlePing - default: - return nil - } -} - -func (dht *IpfsDHT) handleGetValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - eip := log.EventBegin(ctx, "handleGetValue", p) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - log.Debugf("%s handleGetValue for key: %s", dht.self, pmes.GetKey()) - - // setup response - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - - // first, is there even a key? - k := pmes.GetKey() - if k == "" { - return nil, errors.New("handleGetValue but no key was provided") - // TODO: send back an error response? could be bad, but the other node's hanging. - } - - rec, err := dht.checkLocalDatastore(k) - if err != nil { - return nil, err - } - resp.Record = rec - - // Find closest peer on given cluster to desired key and reply with that info - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if len(closer) > 0 { - closerinfos := pstore.PeerInfos(dht.peerstore, closer) - for _, pi := range closerinfos { - log.Debugf("handleGetValue returning closer peer: '%s'", pi.ID) - if len(pi.Addrs) < 1 { - log.Warningf(`no addresses on peer being sent! - [local:%s] - [sending:%s] - [remote:%s]`, dht.self, pi.ID, p) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), closerinfos) - } - - return resp, nil -} - -func (dht *IpfsDHT) checkLocalDatastore(k string) (*recpb.Record, error) { - log.Debugf("%s handleGetValue looking into ds", dht.self) - dskey := convertToDsKey(k) - iVal, err := dht.datastore.Get(dskey) - log.Debugf("%s handleGetValue looking into ds GOT %v", dht.self, iVal) - - if err == ds.ErrNotFound { - return nil, nil - } - - // if we got an unexpected error, bail. - if err != nil { - return nil, err - } - - // if we have the value, send it back - log.Debugf("%s handleGetValue success!", dht.self) - - byts, ok := iVal.([]byte) - if !ok { - return nil, fmt.Errorf("datastore had non byte-slice value for %v", dskey) - } - - rec := new(recpb.Record) - err = proto.Unmarshal(byts, rec) - if err != nil { - log.Debug("failed to unmarshal DHT record from datastore") - return nil, err - } - - // if its our record, dont bother checking the times on it - if peer.ID(rec.GetAuthor()) == dht.self { - return rec, nil - } - - var recordIsBad bool - recvtime, err := u.ParseRFC3339(rec.GetTimeReceived()) - if err != nil { - log.Info("either no receive time set on record, or it was invalid: ", err) - recordIsBad = true - } - - if time.Now().Sub(recvtime) > MaxRecordAge { - log.Debug("old record found, tossing.") - recordIsBad = true - } - - // NOTE: We do not verify the record here beyond checking these timestamps. - // we put the burden of checking the records on the requester as checking a record - // may be computationally expensive - - if recordIsBad { - err := dht.datastore.Delete(dskey) - if err != nil { - log.Error("Failed to delete bad record from datastore: ", err) - } - - return nil, nil // can treat this as not having the record at all - } - - return rec, nil -} - -// Cleans the record (to avoid storing arbitrary data). -func cleanRecord(rec *recpb.Record) { - rec.XXX_unrecognized = nil - rec.TimeReceived = nil - - // Only include the author if there's a signature (otherwise, it's - // unvalidated and could be anything). - if len(rec.Signature) == 0 { - rec.Author = nil - } -} - -// Store a value in this peer local storage -func (dht *IpfsDHT) handlePutValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { - eip := log.EventBegin(ctx, "handlePutValue", p) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - dskey := convertToDsKey(pmes.GetKey()) - - rec := pmes.GetRecord() - if rec == nil { - log.Infof("Got nil record from: %s", p.Pretty()) - return nil, errors.New("nil record") - } - cleanRecord(rec) - - if err = dht.verifyRecordLocally(rec); err != nil { - log.Warningf("Bad dht record in PUT from: %s. %s", peer.ID(pmes.GetRecord().GetAuthor()), err) - return nil, err - } - - // record the time we receive every record - rec.TimeReceived = proto.String(u.FormatRFC3339(time.Now())) - - data, err := proto.Marshal(rec) - if err != nil { - return nil, err - } - - err = dht.datastore.Put(dskey, data) - log.Debugf("%s handlePutValue %v", dht.self, dskey) - return pmes, err -} - -func (dht *IpfsDHT) handlePing(_ context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - log.Debugf("%s Responding to ping from %s!\n", dht.self, p) - return pmes, nil -} - -func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - defer log.EventBegin(ctx, "handleFindPeer", p).Done() - resp := pb.NewMessage(pmes.GetType(), "", pmes.GetClusterLevel()) - var closest []peer.ID - - // if looking for self... special case where we send it on CloserPeers. - if peer.ID(pmes.GetKey()) == dht.self { - closest = []peer.ID{dht.self} - } else { - closest = dht.betterPeersToQuery(pmes, p, CloserPeerCount) - } - - if closest == nil { - log.Infof("%s handleFindPeer %s: could not find anything.", dht.self, p) - return resp, nil - } - - closestinfos := pstore.PeerInfos(dht.peerstore, closest) - // possibly an over-allocation but this array is temporary anyways. - withAddresses := make([]pstore.PeerInfo, 0, len(closestinfos)) - for _, pi := range closestinfos { - if len(pi.Addrs) > 0 { - withAddresses = append(withAddresses, pi) - log.Debugf("handleFindPeer: sending back '%s'", pi.ID) - } - } - - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), withAddresses) - return resp, nil -} - -func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - lm := make(lgbl.DeferredMap) - lm["peer"] = func() interface{} { return p.Pretty() } - eip := log.EventBegin(ctx, "handleGetProviders", lm) - defer eip.Done() - - resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - eip.SetError(err) - return nil, err - } - - lm["key"] = func() interface{} { return c.String() } - - // debug logging niceness. - reqDesc := fmt.Sprintf("%s handleGetProviders(%s, %s): ", dht.self, p, c) - log.Debugf("%s begin", reqDesc) - defer log.Debugf("%s end", reqDesc) - - // check if we have this value, to add ourselves as provider. - has, err := dht.datastore.Has(convertToDsKey(c.KeyString())) - if err != nil && err != ds.ErrNotFound { - log.Debugf("unexpected datastore error: %v\n", err) - has = false - } - - // setup providers - providers := dht.providers.GetProviders(ctx, c) - if has { - providers = append(providers, dht.self) - log.Debugf("%s have the value. added self as provider", reqDesc) - } - - if providers != nil && len(providers) > 0 { - infos := pstore.PeerInfos(dht.peerstore, providers) - resp.ProviderPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d providers: %s", reqDesc, len(providers), infos) - } - - // Also send closer peers. - closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) - if closer != nil { - infos := pstore.PeerInfos(dht.peerstore, closer) - resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) - log.Debugf("%s have %d closer peers: %s", reqDesc, len(closer), infos) - } - - return resp, nil -} - -func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { - lm := make(lgbl.DeferredMap) - lm["peer"] = func() interface{} { return p.Pretty() } - eip := log.EventBegin(ctx, "handleAddProvider", lm) - defer eip.Done() - - c, err := cid.Cast([]byte(pmes.GetKey())) - if err != nil { - eip.SetError(err) - return nil, err - } - - lm["key"] = func() interface{} { return c.String() } - - log.Debugf("%s adding %s as a provider for '%s'\n", dht.self, p, c) - - // add provider should use the address given in the message - pinfos := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - for _, pi := range pinfos { - if pi.ID != p { - // we should ignore this provider reccord! not from originator. - // (we chould sign them and check signature later...) - log.Debugf("handleAddProvider received provider %s from %s. Ignore.", pi.ID, p) - continue - } - - if len(pi.Addrs) < 1 { - log.Debugf("%s got no valid addresses for provider %s. Ignore.", dht.self, p) - continue - } - - log.Infof("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) - if pi.ID != dht.self { // dont add own addrs. - // add the received addresses to our peerstore. - dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL) - } - dht.providers.AddProvider(ctx, c, p) - } - - return nil, nil -} - -func convertToDsKey(s string) ds.Key { - return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/lookup.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/lookup.go deleted file mode 100644 index 2d6338c074..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/lookup.go +++ /dev/null @@ -1,151 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "strings" - - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - kb "gx/ipfs/QmTH6VLu3WXfbH3nuLdmscgPWuiPZv3GMJ2YCdzBS5z91T/go-libp2p-kbucket" - notif "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing/notifications" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" -) - -// Required in order for proper JSON marshaling -func pointerizePeerInfos(pis []pstore.PeerInfo) []*pstore.PeerInfo { - out := make([]*pstore.PeerInfo, len(pis)) - for i, p := range pis { - np := p - out[i] = &np - } - return out -} - -func toPeerInfos(ps []peer.ID) []*pstore.PeerInfo { - out := make([]*pstore.PeerInfo, len(ps)) - for i, p := range ps { - out[i] = &pstore.PeerInfo{ID: p} - } - return out -} - -func tryFormatLoggableKey(k string) (string, error) { - if len(k) == 0 { - return "", fmt.Errorf("loggableKey is empty") - } - var proto, cstr string - if k[0] == '/' { - // it's a path (probably) - protoEnd := strings.IndexByte(k[1:], '/') - if protoEnd < 0 { - return k, fmt.Errorf("loggableKey starts with '/' but is not a path: %x", k) - } - proto = k[1 : protoEnd+1] - cstr = k[protoEnd+2:] - } else { - proto = "provider" - cstr = k - } - - c, err := cid.Cast([]byte(cstr)) - if err != nil { - return "", fmt.Errorf("loggableKey could not cast key to a CID: %x %v", k, err) - } - return fmt.Sprintf("/%s/%s", proto, c.String()), nil -} - -func loggableKey(k string) logging.LoggableMap { - newKey, err := tryFormatLoggableKey(k) - if err != nil { - log.Error(err) - } else { - k = newKey - } - - return logging.LoggableMap{ - "key": k, - } -} - -// Kademlia 'node lookup' operation. Returns a channel of the K closest peers -// to the given key -func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error) { - e := log.EventBegin(ctx, "getClosestPeers", loggableKey(key)) - tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - if len(tablepeers) == 0 { - return nil, kb.ErrLookupFailure - } - - out := make(chan peer.ID, KValue) - - // since the query doesnt actually pass our context down - // we have to hack this here. whyrusleeping isnt a huge fan of goprocess - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - closer, err := dht.closerPeersSingle(ctx, key, p) - if err != nil { - log.Debugf("error getting closer peers: %s", err) - return nil, err - } - - peerinfos := toPeerInfos(closer) - - // For DHT query command - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peerinfos, // todo: remove need for this pointerize thing - }) - - return &dhtQueryResult{closerPeers: peerinfos}, nil - }) - - go func() { - defer close(out) - defer e.Done() - // run it! - res, err := query.Run(ctx, tablepeers) - if err != nil { - log.Debugf("closestPeers query run error: %s", err) - } - - if res != nil && res.finalSet != nil { - sorted := kb.SortClosestPeers(res.finalSet.Peers(), kb.ConvertKey(key)) - if len(sorted) > KValue { - sorted = sorted[:KValue] - } - - for _, p := range sorted { - out <- p - } - } - }() - - return out, nil -} - -func (dht *IpfsDHT) closerPeersSingle(ctx context.Context, key string, p peer.ID) ([]peer.ID, error) { - pmes, err := dht.findPeerSingle(ctx, p, peer.ID(key)) - if err != nil { - return nil, err - } - - closer := pmes.GetCloserPeers() - out := make([]peer.ID, 0, len(closer)) - for _, pbp := range closer { - pid := peer.ID(pbp.GetId()) - if pid != dht.self { // dont add self - dht.peerstore.AddAddrs(pid, pbp.Addresses(), pstore.TempAddrTTL) - out = append(out, pid) - } - } - return out, nil -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/notif.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/notif.go deleted file mode 100644 index 44a1b6b495..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/notif.go +++ /dev/null @@ -1,118 +0,0 @@ -package dht - -import ( - mstream "gx/ipfs/QmTnsezaB1wWNRHeHnYrm8K4d5i9wtyj3GsqjC3Rt5b5v5/go-multistream" - ma "gx/ipfs/QmWWQ2Txc2c6tqjsBpzg5Ar652cHPGNsQQp2SejkNmkUMb/go-multiaddr" - inet "gx/ipfs/QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG/go-libp2p-net" -) - -// netNotifiee defines methods to be used with the IpfsDHT -type netNotifiee IpfsDHT - -var dhtProtocols = []string{string(ProtocolDHT), string(ProtocolDHTOld)} - -func (nn *netNotifiee) DHT() *IpfsDHT { - return (*IpfsDHT)(nn) -} - -func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - protos, err := dht.peerstore.SupportsProtocols(p, dhtProtocols...) - if err == nil && len(protos) != 0 { - // We lock here for consistency with the lock in testConnection. - // This probably isn't necessary because (dis)connect - // notifications are serialized but it's nice to be consistent. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } - return - } - - // Note: Unfortunately, the peerstore may not yet now that this peer is - // a DHT server. So, if it didn't return a positive response above, test - // manually. - go nn.testConnection(v) -} - -func (nn *netNotifiee) testConnection(v inet.Conn) { - dht := nn.DHT() - p := v.RemotePeer() - - // Forcibly use *this* connection. Otherwise, if we have two connections, we could: - // 1. Test it twice. - // 2. Have it closed from under us leaving the second (open) connection untested. - s, err := v.NewStream() - if err != nil { - // Connection error - return - } - defer s.Close() - - selected, err := mstream.SelectOneOf(dhtProtocols, s) - if err != nil { - // Doesn't support the protocol - return - } - // Remember this choice (makes subsequent negotiations faster) - dht.peerstore.AddProtocols(p, selected) - - // We lock here as we race with disconnect. If we didn't lock, we could - // finish processing a connect after handling the associated disconnect - // event and add the peer to the routing table after removing it. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - dht.Update(dht.Context(), p) - } -} - -func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) { - dht := nn.DHT() - select { - case <-dht.Process().Closing(): - return - default: - } - - p := v.RemotePeer() - - // Lock and check to see if we're still connected. We lock to make sure - // we don't concurrently process a connect event. - dht.plk.Lock() - defer dht.plk.Unlock() - if dht.host.Network().Connectedness(p) == inet.Connected { - // We're still connected. - return - } - - dht.routingTable.Remove(p) - - dht.smlk.Lock() - defer dht.smlk.Unlock() - ms, ok := dht.strmap[p] - if !ok { - return - } - delete(dht.strmap, p) - - // Do this asynchronously as ms.lk can block for a while. - go func() { - ms.lk.Lock() - defer ms.lk.Unlock() - ms.invalidate() - }() -} - -func (nn *netNotifiee) OpenedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) ClosedStream(n inet.Network, v inet.Stream) {} -func (nn *netNotifiee) Listen(n inet.Network, a ma.Multiaddr) {} -func (nn *netNotifiee) ListenClose(n inet.Network, a ma.Multiaddr) {} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/package.json b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/package.json deleted file mode 100644 index 8a4e3017d4..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/package.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-kad-dht" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-kad-dht", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8", - "name": "go-log", - "version": "1.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo", - "name": "go-libp2p-crypto", - "version": "1.5.0" - }, - { - "author": "whyrusleeping", - "hash": "QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS", - "name": "go-libp2p-peer", - "version": "2.2.3" - }, - { - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "hash": "QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "cheggaaa", - "hash": "QmeWjRodbcZFKe5tMN7poEx3izym6osrLSnTLf9UjJZBbs", - "name": "pb", - "version": "1.0.3" - }, - { - "author": "jbenet", - "hash": "QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W", - "name": "go-context", - "version": "1.0.0" - }, - { - "author": "jbenet", - "hash": "QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9", - "name": "go-datastore", - "version": "2.4.0" - }, - { - "author": "hashicorp", - "hash": "QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy", - "name": "golang-lru", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH", - "name": "go-libp2p-peerstore", - "version": "1.4.15" - }, - { - "author": "whyrusleeping", - "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", - "name": "base32", - "version": "0.0.2" - }, - { - "author": "whyrusleeping", - "hash": "QmVvkK7s5imCiq3JVbL3pGfnhcCnf3LrFJPF4GE2sAoGZf", - "name": "go-testutil", - "version": "1.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ", - "name": "go-libp2p-record", - "version": "3.0.2" - }, - { - "author": "whyrusleeping", - "hash": "QmTH6VLu3WXfbH3nuLdmscgPWuiPZv3GMJ2YCdzBS5z91T", - "name": "go-libp2p-kbucket", - "version": "2.1.17" - }, - { - "author": "whyrusleeping", - "hash": "QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7", - "name": "go-libp2p-routing", - "version": "2.2.21" - }, - { - "author": "whyrusleeping", - "hash": "QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq", - "name": "go-todocounter", - "version": "1.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY", - "name": "go-cid", - "version": "0.7.20" - }, - { - "author": "whyrusleeping", - "hash": "Qmf9JgVLz46pxPXwG2eWSJpkqVCcjD4rp7zCRi2KP6GTNB", - "name": "go-libp2p-loggables", - "version": "1.1.13" - }, - { - "author": "whyrusleeping", - "hash": "QmNmJZL7FQySMtE2BQuLMuZg2EB2CLEunJJUSVSc9YnnbV", - "name": "go-libp2p-host", - "version": "2.1.5" - }, - { - "author": "whyrusleeping", - "hash": "QmNh1kGFFdsPu79KNSaL4NUKUPb4Eiz4KHdMtFY6664RDp", - "name": "go-libp2p", - "version": "5.0.14" - }, - { - "author": "whyrusleeping", - "hash": "QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG", - "name": "go-libp2p-net", - "version": "2.0.5" - }, - { - "author": "whyrusleeping", - "hash": "QmNiJuT8Ja3hMVpBHXv3Q6dwmperaQ6JjLtpMQgMCD7xvx", - "name": "go-ipfs-util", - "version": "1.2.7" - }, - { - "author": "whyrusleeping", - "hash": "QmTnsezaB1wWNRHeHnYrm8K4d5i9wtyj3GsqjC3Rt5b5v5", - "name": "go-multistream", - "version": "0.3.6" - }, - { - "author": "whyrusleeping", - "hash": "QmYVR3C8DWPHdHxvLtNFYfjsXgaRAdh6hPMNH3KiwCgu4o", - "name": "go-libp2p-netutil", - "version": "0.3.9" - }, - { - "author": "multiformats", - "hash": "QmWWQ2Txc2c6tqjsBpzg5Ar652cHPGNsQQp2SejkNmkUMb", - "name": "go-multiaddr", - "version": "1.2.6" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "mr-tron", - "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", - "name": "go-base58-fast", - "version": "0.1.1" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-kad-dht", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.18" -} - diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/Makefile b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/Makefile deleted file mode 100644 index 08ac883d0d..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -PB = $(wildcard *.proto) -GO = $(PB:.proto=.pb.go) - -all: $(GO) - -%.pb.go: %.proto - protoc --gogo_out=. --proto_path=../../../../../../:/usr/local/opt/protobuf/include:. $< - -clean: - rm -f *.pb.go - rm -f *.go diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.pb.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.pb.go deleted file mode 100644 index abf1ef5548..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.pb.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: dht.proto -// DO NOT EDIT! - -/* -Package dht_pb is a generated protocol buffer package. - -It is generated from these files: - dht.proto - -It has these top-level messages: - Message -*/ -package dht_pb - -import proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" -import fmt "fmt" -import math "math" -import record_pb "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record/pb" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Message_MessageType int32 - -const ( - Message_PUT_VALUE Message_MessageType = 0 - Message_GET_VALUE Message_MessageType = 1 - Message_ADD_PROVIDER Message_MessageType = 2 - Message_GET_PROVIDERS Message_MessageType = 3 - Message_FIND_NODE Message_MessageType = 4 - Message_PING Message_MessageType = 5 -) - -var Message_MessageType_name = map[int32]string{ - 0: "PUT_VALUE", - 1: "GET_VALUE", - 2: "ADD_PROVIDER", - 3: "GET_PROVIDERS", - 4: "FIND_NODE", - 5: "PING", -} -var Message_MessageType_value = map[string]int32{ - "PUT_VALUE": 0, - "GET_VALUE": 1, - "ADD_PROVIDER": 2, - "GET_PROVIDERS": 3, - "FIND_NODE": 4, - "PING": 5, -} - -func (x Message_MessageType) Enum() *Message_MessageType { - p := new(Message_MessageType) - *p = x - return p -} -func (x Message_MessageType) String() string { - return proto.EnumName(Message_MessageType_name, int32(x)) -} -func (x *Message_MessageType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Message_MessageType_value, data, "Message_MessageType") - if err != nil { - return err - } - *x = Message_MessageType(value) - return nil -} - -type Message_ConnectionType int32 - -const ( - // sender does not have a connection to peer, and no extra information (default) - Message_NOT_CONNECTED Message_ConnectionType = 0 - // sender has a live connection to peer - Message_CONNECTED Message_ConnectionType = 1 - // sender recently connected to peer - Message_CAN_CONNECT Message_ConnectionType = 2 - // sender recently tried to connect to peer repeatedly but failed to connect - // ("try" here is loose, but this should signal "made strong effort, failed") - Message_CANNOT_CONNECT Message_ConnectionType = 3 -) - -var Message_ConnectionType_name = map[int32]string{ - 0: "NOT_CONNECTED", - 1: "CONNECTED", - 2: "CAN_CONNECT", - 3: "CANNOT_CONNECT", -} -var Message_ConnectionType_value = map[string]int32{ - "NOT_CONNECTED": 0, - "CONNECTED": 1, - "CAN_CONNECT": 2, - "CANNOT_CONNECT": 3, -} - -func (x Message_ConnectionType) Enum() *Message_ConnectionType { - p := new(Message_ConnectionType) - *p = x - return p -} -func (x Message_ConnectionType) String() string { - return proto.EnumName(Message_ConnectionType_name, int32(x)) -} -func (x *Message_ConnectionType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Message_ConnectionType_value, data, "Message_ConnectionType") - if err != nil { - return err - } - *x = Message_ConnectionType(value) - return nil -} - -type Message struct { - // defines what type of message it is. - Type *Message_MessageType `protobuf:"varint,1,opt,name=type,enum=dht.pb.Message_MessageType" json:"type,omitempty"` - // defines what coral cluster level this query/response belongs to. - ClusterLevelRaw *int32 `protobuf:"varint,10,opt,name=clusterLevelRaw" json:"clusterLevelRaw,omitempty"` - // Used to specify the key associated with this message. - // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` - // Used to return a value - // PUT_VALUE, GET_VALUE - Record *record_pb.Record `protobuf:"bytes,3,opt,name=record" json:"record,omitempty"` - // Used to return peers closer to a key in a query - // GET_VALUE, GET_PROVIDERS, FIND_NODE - CloserPeers []*Message_Peer `protobuf:"bytes,8,rep,name=closerPeers" json:"closerPeers,omitempty"` - // Used to return Providers - // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - ProviderPeers []*Message_Peer `protobuf:"bytes,9,rep,name=providerPeers" json:"providerPeers,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} - -func (m *Message) GetType() Message_MessageType { - if m != nil && m.Type != nil { - return *m.Type - } - return Message_PUT_VALUE -} - -func (m *Message) GetClusterLevelRaw() int32 { - if m != nil && m.ClusterLevelRaw != nil { - return *m.ClusterLevelRaw - } - return 0 -} - -func (m *Message) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *Message) GetRecord() *record_pb.Record { - if m != nil { - return m.Record - } - return nil -} - -func (m *Message) GetCloserPeers() []*Message_Peer { - if m != nil { - return m.CloserPeers - } - return nil -} - -func (m *Message) GetProviderPeers() []*Message_Peer { - if m != nil { - return m.ProviderPeers - } - return nil -} - -type Message_Peer struct { - // ID of a given peer. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - // multiaddrs for a given peer - Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"` - // used to signal the sender's connection capabilities to the peer - Connection *Message_ConnectionType `protobuf:"varint,3,opt,name=connection,enum=dht.pb.Message_ConnectionType" json:"connection,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Message_Peer) Reset() { *m = Message_Peer{} } -func (m *Message_Peer) String() string { return proto.CompactTextString(m) } -func (*Message_Peer) ProtoMessage() {} - -func (m *Message_Peer) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} - -func (m *Message_Peer) GetAddrs() [][]byte { - if m != nil { - return m.Addrs - } - return nil -} - -func (m *Message_Peer) GetConnection() Message_ConnectionType { - if m != nil && m.Connection != nil { - return *m.Connection - } - return Message_NOT_CONNECTED -} - -func init() { - proto.RegisterType((*Message)(nil), "dht.pb.Message") - proto.RegisterType((*Message_Peer)(nil), "dht.pb.Message.Peer") - proto.RegisterEnum("dht.pb.Message_MessageType", Message_MessageType_name, Message_MessageType_value) - proto.RegisterEnum("dht.pb.Message_ConnectionType", Message_ConnectionType_name, Message_ConnectionType_value) -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.proto b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.proto deleted file mode 100644 index 66fad98034..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/dht.proto +++ /dev/null @@ -1,70 +0,0 @@ -// In order to re-generate the golang packages for `Message` you will need... -// 1. Protobuf binary (tested with protoc 3.0.0). - https://github.com/gogo/protobuf/releases -// 2. Gogo Protobuf (tested with gogo 0.3). - https://github.com/gogo/protobuf -// 3. To have cloned `libp2p/go-libp2p-{record,kad-dht}` under the same directory. -// Now from `libp2p/go-libp2p-kad-dht/pb` you can run... -// `protoc --gogo_out=. --proto_path=../../go-libp2p-record/pb/ --proto_path=./ dht.proto` - -syntax = "proto2"; -package dht.pb; - -import "record.proto"; - -message Message { - enum MessageType { - PUT_VALUE = 0; - GET_VALUE = 1; - ADD_PROVIDER = 2; - GET_PROVIDERS = 3; - FIND_NODE = 4; - PING = 5; - } - - enum ConnectionType { - // sender does not have a connection to peer, and no extra information (default) - NOT_CONNECTED = 0; - - // sender has a live connection to peer - CONNECTED = 1; - - // sender recently connected to peer - CAN_CONNECT = 2; - - // sender recently tried to connect to peer repeatedly but failed to connect - // ("try" here is loose, but this should signal "made strong effort, failed") - CANNOT_CONNECT = 3; - } - - message Peer { - // ID of a given peer. - optional string id = 1; - - // multiaddrs for a given peer - repeated bytes addrs = 2; - - // used to signal the sender's connection capabilities to the peer - optional ConnectionType connection = 3; - } - - // defines what type of message it is. - optional MessageType type = 1; - - // defines what coral cluster level this query/response belongs to. - optional int32 clusterLevelRaw = 10; - - // Used to specify the key associated with this message. - // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - optional string key = 2; - - // Used to return a value - // PUT_VALUE, GET_VALUE - optional record.pb.Record record = 3; - - // Used to return peers closer to a key in a query - // GET_VALUE, GET_PROVIDERS, FIND_NODE - repeated Peer closerPeers = 8; - - // Used to return Providers - // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS - repeated Peer providerPeers = 9; -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/message.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/message.go deleted file mode 100644 index 76ee4d933a..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb/message.go +++ /dev/null @@ -1,184 +0,0 @@ -package dht_pb - -import ( - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" - ma "gx/ipfs/QmWWQ2Txc2c6tqjsBpzg5Ar652cHPGNsQQp2SejkNmkUMb/go-multiaddr" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - inet "gx/ipfs/QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG/go-libp2p-net" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" -) - -var log = logging.Logger("dht.pb") - -type PeerRoutingInfo struct { - pstore.PeerInfo - inet.Connectedness -} - -// NewMessage constructs a new dht message with given type, key, and level -func NewMessage(typ Message_MessageType, key string, level int) *Message { - m := &Message{ - Type: &typ, - Key: &key, - } - m.SetClusterLevel(level) - return m -} - -func peerRoutingInfoToPBPeer(p PeerRoutingInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - s := string(p.ID) - pbp.Id = &s - c := ConnectionType(p.Connectedness) - pbp.Connection = &c - return pbp -} - -func peerInfoToPBPeer(p pstore.PeerInfo) *Message_Peer { - pbp := new(Message_Peer) - - pbp.Addrs = make([][]byte, len(p.Addrs)) - for i, maddr := range p.Addrs { - pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. - } - s := string(p.ID) - pbp.Id = &s - return pbp -} - -// PBPeerToPeer turns a *Message_Peer into its pstore.PeerInfo counterpart -func PBPeerToPeerInfo(pbp *Message_Peer) *pstore.PeerInfo { - return &pstore.PeerInfo{ - ID: peer.ID(pbp.GetId()), - Addrs: pbp.Addresses(), - } -} - -// RawPeerInfosToPBPeers converts a slice of Peers into a slice of *Message_Peers, -// ready to go out on the wire. -func RawPeerInfosToPBPeers(peers []pstore.PeerInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerInfoToPBPeer(p) - } - return pbpeers -} - -// PeersToPBPeers converts given []peer.Peer into a set of []*Message_Peer, -// which can be written to a message and sent out. the key thing this function -// does (in addition to PeersToPBPeers) is set the ConnectionType with -// information from the given inet.Network. -func PeerInfosToPBPeers(n inet.Network, peers []pstore.PeerInfo) []*Message_Peer { - pbps := RawPeerInfosToPBPeers(peers) - for i, pbp := range pbps { - c := ConnectionType(n.Connectedness(peers[i].ID)) - pbp.Connection = &c - } - return pbps -} - -func PeerRoutingInfosToPBPeers(peers []PeerRoutingInfo) []*Message_Peer { - pbpeers := make([]*Message_Peer, len(peers)) - for i, p := range peers { - pbpeers[i] = peerRoutingInfoToPBPeer(p) - } - return pbpeers -} - -// PBPeersToPeerInfos converts given []*Message_Peer into []pstore.PeerInfo -// Invalid addresses will be silently omitted. -func PBPeersToPeerInfos(pbps []*Message_Peer) []*pstore.PeerInfo { - peers := make([]*pstore.PeerInfo, 0, len(pbps)) - for _, pbp := range pbps { - peers = append(peers, PBPeerToPeerInfo(pbp)) - } - return peers -} - -// Addresses returns a multiaddr associated with the Message_Peer entry -func (m *Message_Peer) Addresses() []ma.Multiaddr { - if m == nil { - return nil - } - - maddrs := make([]ma.Multiaddr, 0, len(m.Addrs)) - for _, addr := range m.Addrs { - maddr, err := ma.NewMultiaddrBytes(addr) - if err != nil { - log.Warningf("error decoding Multiaddr for peer: %s", m.GetId()) - continue - } - - maddrs = append(maddrs, maddr) - } - return maddrs -} - -// GetClusterLevel gets and adjusts the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) GetClusterLevel() int { - level := m.GetClusterLevelRaw() - 1 - if level < 0 { - return 0 - } - return int(level) -} - -// SetClusterLevel adjusts and sets the cluster level on the message. -// a +/- 1 adjustment is needed to distinguish a valid first level (1) and -// default "no value" protobuf behavior (0) -func (m *Message) SetClusterLevel(level int) { - lvl := int32(level) - m.ClusterLevelRaw = &lvl -} - -// Loggable turns a Message into machine-readable log output -func (m *Message) Loggable() map[string]interface{} { - return map[string]interface{}{ - "message": map[string]string{ - "type": m.Type.String(), - "key": b58.Encode([]byte(m.GetKey())), - }, - } -} - -// ConnectionType returns a Message_ConnectionType associated with the -// inet.Connectedness. -func ConnectionType(c inet.Connectedness) Message_ConnectionType { - switch c { - default: - return Message_NOT_CONNECTED - case inet.NotConnected: - return Message_NOT_CONNECTED - case inet.Connected: - return Message_CONNECTED - case inet.CanConnect: - return Message_CAN_CONNECT - case inet.CannotConnect: - return Message_CANNOT_CONNECT - } -} - -// Connectedness returns an inet.Connectedness associated with the -// Message_ConnectionType. -func Connectedness(c Message_ConnectionType) inet.Connectedness { - switch c { - default: - return inet.NotConnected - case Message_NOT_CONNECTED: - return inet.NotConnected - case Message_CONNECTED: - return inet.Connected - case Message_CAN_CONNECT: - return inet.CanConnect - case Message_CANNOT_CONNECT: - return inet.CannotConnect - } -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/providers/providers.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/providers/providers.go deleted file mode 100644 index 72ae14f7d6..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/providers/providers.go +++ /dev/null @@ -1,358 +0,0 @@ -package providers - -import ( - "context" - "encoding/binary" - "fmt" - "strings" - "time" - - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - lru "gx/ipfs/QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy/golang-lru" - ds "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore" - autobatch "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore/autobatch" - dsq "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore/query" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" - base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" -) - -var batchBufferSize = 256 - -var log = logging.Logger("providers") - -var lruCacheSize = 256 -var ProvideValidity = time.Hour * 24 -var defaultCleanupInterval = time.Hour - -type ProviderManager struct { - // all non channel fields are meant to be accessed only within - // the run method - providers *lru.Cache - lpeer peer.ID - dstore ds.Datastore - - newprovs chan *addProv - getprovs chan *getProv - period time.Duration - proc goprocess.Process - - cleanupInterval time.Duration -} - -type providerSet struct { - providers []peer.ID - set map[peer.ID]time.Time -} - -type addProv struct { - k *cid.Cid - val peer.ID -} - -type getProv struct { - k *cid.Cid - resp chan []peer.ID -} - -func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager { - pm := new(ProviderManager) - pm.getprovs = make(chan *getProv) - pm.newprovs = make(chan *addProv) - pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) - cache, err := lru.New(lruCacheSize) - if err != nil { - panic(err) //only happens if negative value is passed to lru constructor - } - pm.providers = cache - - pm.proc = goprocessctx.WithContext(ctx) - pm.cleanupInterval = defaultCleanupInterval - pm.proc.Go(func(p goprocess.Process) { pm.run() }) - - return pm -} - -const providersKeyPrefix = "/providers/" - -func mkProvKey(k *cid.Cid) string { - return providersKeyPrefix + base32.RawStdEncoding.EncodeToString(k.Bytes()) -} - -func (pm *ProviderManager) Process() goprocess.Process { - return pm.proc -} - -func (pm *ProviderManager) providersForKey(k *cid.Cid) ([]peer.ID, error) { - pset, err := pm.getProvSet(k) - if err != nil { - return nil, err - } - return pset.providers, nil -} - -func (pm *ProviderManager) getProvSet(k *cid.Cid) (*providerSet, error) { - cached, ok := pm.providers.Get(k.KeyString()) - if ok { - return cached.(*providerSet), nil - } - - pset, err := loadProvSet(pm.dstore, k) - if err != nil { - return nil, err - } - - if len(pset.providers) > 0 { - pm.providers.Add(k.KeyString(), pset) - } - - return pset, nil -} - -func loadProvSet(dstore ds.Datastore, k *cid.Cid) (*providerSet, error) { - res, err := dstore.Query(dsq.Query{Prefix: mkProvKey(k)}) - if err != nil { - return nil, err - } - - out := newProviderSet() - for { - e, ok := res.NextSync() - if !ok { - break - } - if e.Error != nil { - log.Error("got an error: ", e.Error) - continue - } - - lix := strings.LastIndex(e.Key, "/") - - decstr, err := base32.RawStdEncoding.DecodeString(e.Key[lix+1:]) - if err != nil { - log.Error("base32 decoding error: ", err) - continue - } - - pid := peer.ID(decstr) - - t, err := readTimeValue(e.Value) - if err != nil { - log.Warning("parsing providers record from disk: ", err) - continue - } - - out.setVal(pid, t) - } - - return out, nil -} - -func readTimeValue(i interface{}) (time.Time, error) { - data, ok := i.([]byte) - if !ok { - return time.Time{}, fmt.Errorf("data was not a []byte") - } - - nsec, _ := binary.Varint(data) - - return time.Unix(0, nsec), nil -} - -func (pm *ProviderManager) addProv(k *cid.Cid, p peer.ID) error { - iprovs, ok := pm.providers.Get(k.KeyString()) - if !ok { - stored, err := loadProvSet(pm.dstore, k) - if err != nil { - return err - } - iprovs = stored - pm.providers.Add(k.KeyString(), iprovs) - } - provs := iprovs.(*providerSet) - now := time.Now() - provs.setVal(p, now) - - return writeProviderEntry(pm.dstore, k, p, now) -} - -func writeProviderEntry(dstore ds.Datastore, k *cid.Cid, p peer.ID, t time.Time) error { - dsk := mkProvKey(k) + "/" + base32.RawStdEncoding.EncodeToString([]byte(p)) - - buf := make([]byte, 16) - n := binary.PutVarint(buf, t.UnixNano()) - - return dstore.Put(ds.NewKey(dsk), buf[:n]) -} - -func (pm *ProviderManager) deleteProvSet(k *cid.Cid) error { - pm.providers.Remove(k.KeyString()) - - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: true, - Prefix: mkProvKey(k), - }) - if err != nil { - return err - } - - entries, err := res.Rest() - if err != nil { - return err - } - - for _, e := range entries { - err := pm.dstore.Delete(ds.NewKey(e.Key)) - if err != nil { - log.Error("deleting provider set: ", err) - } - } - return nil -} - -func (pm *ProviderManager) getProvKeys() (func() (*cid.Cid, bool), error) { - res, err := pm.dstore.Query(dsq.Query{ - KeysOnly: false, - Prefix: providersKeyPrefix, - }) - if err != nil { - return nil, err - } - - iter := func() (*cid.Cid, bool) { - for e := range res.Next() { - parts := strings.Split(e.Key, "/") - if len(parts) != 4 { - log.Warningf("incorrectly formatted provider entry in datastore: %s", e.Key) - continue - } - decoded, err := base32.RawStdEncoding.DecodeString(parts[2]) - if err != nil { - log.Warning("error decoding base32 provider key: %s: %s", parts[2], err) - continue - } - - c, err := cid.Cast(decoded) - if err != nil { - log.Warning("error casting key to cid from datastore key: %s", err) - continue - } - - return c, true - } - return nil, false - } - - return iter, nil -} - -func (pm *ProviderManager) run() { - tick := time.NewTicker(pm.cleanupInterval) - for { - select { - case np := <-pm.newprovs: - err := pm.addProv(np.k, np.val) - if err != nil { - log.Error("error adding new providers: ", err) - } - case gp := <-pm.getprovs: - provs, err := pm.providersForKey(gp.k) - if err != nil && err != ds.ErrNotFound { - log.Error("error reading providers: ", err) - } - - gp.resp <- provs - case <-tick.C: - keys, err := pm.getProvKeys() - if err != nil { - log.Error("Error loading provider keys: ", err) - continue - } - now := time.Now() - for { - k, ok := keys() - if !ok { - break - } - - provs, err := pm.getProvSet(k) - if err != nil { - log.Error("error loading known provset: ", err) - continue - } - for p, t := range provs.set { - if now.Sub(t) > ProvideValidity { - delete(provs.set, p) - } - } - // have we run out of providers? - if len(provs.set) == 0 { - provs.providers = nil - err := pm.deleteProvSet(k) - if err != nil { - log.Error("error deleting provider set: ", err) - } - } else if len(provs.set) < len(provs.providers) { - // We must have modified the providers set, recompute. - provs.providers = make([]peer.ID, 0, len(provs.set)) - for p := range provs.set { - provs.providers = append(provs.providers, p) - } - } - } - case <-pm.proc.Closing(): - tick.Stop() - return - } - } -} - -func (pm *ProviderManager) AddProvider(ctx context.Context, k *cid.Cid, val peer.ID) { - prov := &addProv{ - k: k, - val: val, - } - select { - case pm.newprovs <- prov: - case <-ctx.Done(): - } -} - -func (pm *ProviderManager) GetProviders(ctx context.Context, k *cid.Cid) []peer.ID { - gp := &getProv{ - k: k, - resp: make(chan []peer.ID, 1), // buffered to prevent sender from blocking - } - select { - case <-ctx.Done(): - return nil - case pm.getprovs <- gp: - } - select { - case <-ctx.Done(): - return nil - case peers := <-gp.resp: - return peers - } -} - -func newProviderSet() *providerSet { - return &providerSet{ - set: make(map[peer.ID]time.Time), - } -} - -func (ps *providerSet) Add(p peer.ID) { - ps.setVal(p, time.Now()) -} - -func (ps *providerSet) setVal(p peer.ID, t time.Time) { - _, found := ps.set[p] - if !found { - ps.providers = append(ps.providers, p) - } - - ps.set[p] = t -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/query.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/query.go deleted file mode 100644 index bbfeffd65a..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/query.go +++ /dev/null @@ -1,299 +0,0 @@ -package dht - -import ( - "context" - "sync" - - u "gx/ipfs/QmNiJuT8Ja3hMVpBHXv3Q6dwmperaQ6JjLtpMQgMCD7xvx/go-ipfs-util" - todoctr "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter" - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ctxproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" - routing "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing" - notif "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing/notifications" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - queue "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore/queue" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - pset "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer/peerset" -) - -var maxQueryConcurrency = AlphaValue - -type dhtQuery struct { - dht *IpfsDHT - key string // the key we're querying for - qfunc queryFunc // the function to execute per peer - concurrency int // the concurrency parameter -} - -type dhtQueryResult struct { - value []byte // GetValue - peer *pstore.PeerInfo // FindPeer - providerPeers []pstore.PeerInfo // GetProviders - closerPeers []*pstore.PeerInfo // * - success bool - - finalSet *pset.PeerSet -} - -// constructs query -func (dht *IpfsDHT) newQuery(k string, f queryFunc) *dhtQuery { - return &dhtQuery{ - key: k, - dht: dht, - qfunc: f, - concurrency: maxQueryConcurrency, - } -} - -// QueryFunc is a function that runs a particular query with a given peer. -// It returns either: -// - the value -// - a list of peers potentially better able to serve the query -// - an error -type queryFunc func(context.Context, peer.ID) (*dhtQueryResult, error) - -// Run runs the query at hand. pass in a list of peers to use first. -func (q *dhtQuery) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - runner := newQueryRunner(q) - return runner.Run(ctx, peers) -} - -type dhtQueryRunner struct { - query *dhtQuery // query to run - peersSeen *pset.PeerSet // all peers queried. prevent querying same peer 2x - peersToQuery *queue.ChanQueue // peers remaining to be queried - peersRemaining todoctr.Counter // peersToQuery + currently processing - - result *dhtQueryResult // query result - errs u.MultiErr // result errors. maybe should be a map[peer.ID]error - - rateLimit chan struct{} // processing semaphore - log logging.EventLogger - - runCtx context.Context - - proc process.Process - sync.RWMutex -} - -func newQueryRunner(q *dhtQuery) *dhtQueryRunner { - proc := process.WithParent(process.Background()) - ctx := ctxproc.OnClosingContext(proc) - return &dhtQueryRunner{ - query: q, - peersToQuery: queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))), - peersRemaining: todoctr.NewSyncCounter(), - peersSeen: pset.New(), - rateLimit: make(chan struct{}, q.concurrency), - proc: proc, - } -} - -func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { - r.log = log - r.runCtx = ctx - - if len(peers) == 0 { - log.Warning("Running query with no peers!") - return nil, nil - } - - // setup concurrency rate limiting - for i := 0; i < r.query.concurrency; i++ { - r.rateLimit <- struct{}{} - } - - // add all the peers we got first. - for _, p := range peers { - r.addPeerToQuery(p) - } - - // go do this thing. - // do it as a child proc to make sure Run exits - // ONLY AFTER spawn workers has exited. - r.proc.Go(r.spawnWorkers) - - // so workers are working. - - // wait until they're done. - err := routing.ErrNotFound - - // now, if the context finishes, close the proc. - // we have to do it here because the logic before is setup, which - // should run without closing the proc. - ctxproc.CloseAfterContext(r.proc, ctx) - - select { - case <-r.peersRemaining.Done(): - r.proc.Close() - r.RLock() - defer r.RUnlock() - - err = routing.ErrNotFound - - // if every query to every peer failed, something must be very wrong. - if len(r.errs) > 0 && len(r.errs) == r.peersSeen.Size() { - log.Debugf("query errs: %s", r.errs) - err = r.errs[0] - } - - case <-r.proc.Closed(): - r.RLock() - defer r.RUnlock() - err = context.DeadlineExceeded - } - - if r.result != nil && r.result.success { - return r.result, nil - } - - return &dhtQueryResult{ - finalSet: r.peersSeen, - }, err -} - -func (r *dhtQueryRunner) addPeerToQuery(next peer.ID) { - // if new peer is ourselves... - if next == r.query.dht.self { - r.log.Debug("addPeerToQuery skip self") - return - } - - if !r.peersSeen.TryAdd(next) { - return - } - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.AddingPeer, - ID: next, - }) - - r.peersRemaining.Increment(1) - select { - case r.peersToQuery.EnqChan <- next: - case <-r.proc.Closing(): - } -} - -func (r *dhtQueryRunner) spawnWorkers(proc process.Process) { - for { - - select { - case <-r.peersRemaining.Done(): - return - - case <-r.proc.Closing(): - return - - case <-r.rateLimit: - select { - case p, more := <-r.peersToQuery.DeqChan: - if !more { - return // channel closed. - } - - // do it as a child func to make sure Run exits - // ONLY AFTER spawn workers has exited. - proc.Go(func(proc process.Process) { - r.queryPeer(proc, p) - }) - case <-r.proc.Closing(): - return - case <-r.peersRemaining.Done(): - return - } - } - } -} - -func (r *dhtQueryRunner) queryPeer(proc process.Process, p peer.ID) { - // ok let's do this! - - // create a context from our proc. - ctx := ctxproc.OnClosingContext(proc) - - // make sure we do this when we exit - defer func() { - // signal we're done proccessing peer p - r.peersRemaining.Decrement(1) - r.rateLimit <- struct{}{} - }() - - // make sure we're connected to the peer. - // FIXME abstract away into the network layer - if conns := r.query.dht.host.Network().ConnsToPeer(p); len(conns) == 0 { - log.Debug("not connected. dialing.") - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.DialingPeer, - ID: p, - }) - // while we dial, we do not take up a rate limit. this is to allow - // forward progress during potentially very high latency dials. - r.rateLimit <- struct{}{} - - pi := pstore.PeerInfo{ID: p} - - if err := r.query.dht.host.Connect(ctx, pi); err != nil { - log.Debugf("Error connecting: %s", err) - - notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - ID: p, - }) - - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - <-r.rateLimit // need to grab it again, as we deferred. - return - } - <-r.rateLimit // need to grab it again, as we deferred. - log.Debugf("connected. dial success.") - } - - // finally, run the query against this peer - res, err := r.query.qfunc(ctx, p) - - if err != nil { - log.Debugf("ERROR worker for: %v %v", p, err) - r.Lock() - r.errs = append(r.errs, err) - r.Unlock() - - } else if res.success { - log.Debugf("SUCCESS worker for: %v %s", p, res) - r.Lock() - r.result = res - r.Unlock() - go r.proc.Close() // signal to everyone that we're done. - // must be async, as we're one of the children, and Close blocks. - - } else if len(res.closerPeers) > 0 { - log.Debugf("PEERS CLOSER -- worker for: %v (%d closer peers)", p, len(res.closerPeers)) - for _, next := range res.closerPeers { - if next.ID == r.query.dht.self { // dont add self. - log.Debugf("PEERS CLOSER -- worker for: %v found self", p) - continue - } - - // add their addresses to the dialer's peerstore - r.query.dht.peerstore.AddAddrs(next.ID, next.Addrs, pstore.TempAddrTTL) - r.addPeerToQuery(next.ID) - log.Debugf("PEERS CLOSER -- worker for: %v added %v (%v)", p, next.ID, next.Addrs) - } - } else { - log.Debugf("QUERY worker for: %v - not found, and no closer peers.", p) - } -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/records.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/records.go deleted file mode 100644 index 2146d4a9ac..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/records.go +++ /dev/null @@ -1,159 +0,0 @@ -package dht - -import ( - "context" - "fmt" - "time" - - ctxfrac "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/frac" - routing "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing" - record "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record" - recpb "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record/pb" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - ci "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto" -) - -// MaxRecordAge specifies the maximum time that any node will hold onto a record -// from the time its received. This does not apply to any other forms of validity that -// the record may contain. -// For example, a record may contain an ipns entry with an EOL saying its valid -// until the year 2020 (a great time in the future). For that record to stick around -// it must be rebroadcasted more frequently than once every 'MaxRecordAge' -const MaxRecordAge = time.Hour * 36 - -func (dht *IpfsDHT) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { - log.Debugf("getPublicKey for: %s", p) - - // try extracting from identity. - pk := p.ExtractPublicKey() - if pk != nil { - return pk, nil - } - - // check locally. - pk = dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - // ok, try the node itself. if they're overwhelmed or slow we can move on. - ctxT, cancelFunc := ctxfrac.WithDeadlineFraction(ctx, 0.3) - defer cancelFunc() - if pk, err := dht.getPublicKeyFromNode(ctx, p); err == nil { - err := dht.peerstore.AddPubKey(p, pk) - if err != nil { - return pk, err - } - return pk, nil - } - - // last ditch effort: let's try the dht. - log.Debugf("pk for %s not in peerstore, and peer failed. Trying DHT.", p) - pkkey := routing.KeyForPublicKey(p) - - val, err := dht.GetValue(ctxT, pkkey) - if err != nil { - log.Warning("Failed to find requested public key.") - return nil, err - } - - pk, err = ci.UnmarshalPublicKey(val) - if err != nil { - log.Debugf("Failed to unmarshal public key: %s", err) - return nil, err - } - - return pk, dht.peerstore.AddPubKey(p, pk) -} - -func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.PubKey, error) { - - // check locally, just in case... - pk := dht.peerstore.PubKey(p) - if pk != nil { - return pk, nil - } - - pkkey := routing.KeyForPublicKey(p) - pmes, err := dht.getValueSingle(ctx, p, pkkey) - if err != nil { - return nil, err - } - - // node doesn't have key :( - record := pmes.GetRecord() - if record == nil { - return nil, fmt.Errorf("Node not responding with its public key: %s", p) - } - - // Success! We were given the value. we don't need to check - // validity because a) we can't. b) we know the hash of the - // key we're looking for. - val := record.GetValue() - log.Debug("DHT got a value from other peer") - - pk, err = ci.UnmarshalPublicKey(val) - if err != nil { - return nil, err - } - - id, err := peer.IDFromPublicKey(pk) - if err != nil { - return nil, err - } - if id != p { - return nil, fmt.Errorf("public key does not match id: %s", p) - } - - // ok! it's valid. we got it! - log.Debugf("DHT got public key from node itself.") - return pk, nil -} - -// verifyRecordLocally attempts to verify a record. if we do not have the public -// key, we fail. we do not search the dht. -func (dht *IpfsDHT) verifyRecordLocally(r *recpb.Record) error { - if r == nil { - log.Error("nil record passed into verifyRecordLocally") - return fmt.Errorf("nil record") - } - - if len(r.Signature) > 0 { - // First, validate the signature - p := peer.ID(r.GetAuthor()) - pk := dht.peerstore.PubKey(p) - if pk == nil { - return fmt.Errorf("do not have public key for %s", p) - } - - if err := record.CheckRecordSig(r, pk); err != nil { - return err - } - } - - return dht.Validator.VerifyRecord(r) -} - -// verifyRecordOnline verifies a record, searching the DHT for the public key -// if necessary. The reason there is a distinction in the functions is that -// retrieving arbitrary public keys from the DHT as a result of passively -// receiving records (e.g. through a PUT_VALUE or ADD_PROVIDER) can cause a -// massive amplification attack on the dht. Use with care. -func (dht *IpfsDHT) verifyRecordOnline(ctx context.Context, r *recpb.Record) error { - - if len(r.Signature) > 0 { - // get the public key, search for it if necessary. - p := peer.ID(r.GetAuthor()) - pk, err := dht.GetPublicKey(ctx, p) - if err != nil { - return err - } - - err = record.CheckRecordSig(r, pk) - if err != nil { - return err - } - } - - return dht.Validator.VerifyRecord(r) -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/routing.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/routing.go deleted file mode 100644 index 5783497c34..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/routing.go +++ /dev/null @@ -1,576 +0,0 @@ -package dht - -import ( - "bytes" - "context" - "fmt" - "runtime" - "sync" - "time" - - logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log" - kb "gx/ipfs/QmTH6VLu3WXfbH3nuLdmscgPWuiPZv3GMJ2YCdzBS5z91T/go-libp2p-kbucket" - routing "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing" - notif "gx/ipfs/QmTiWLZ6Fo5j4KcTVutZJ5KWRRJrbxzmxA4td8NfEdrPh7/go-libp2p-routing/notifications" - record "gx/ipfs/QmUpttFinNDmNPgFwKN8sZK6BUtBmA68Y4KdSBDXa8t9sJ/go-libp2p-record" - pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore" - inet "gx/ipfs/QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG/go-libp2p-net" - pb "gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/pb" - peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer" - pset "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer/peerset" - cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" -) - -// asyncQueryBuffer is the size of buffered channels in async queries. This -// buffer allows multiple queries to execute simultaneously, return their -// results and continue querying closer peers. Note that different query -// results will wait for the channel to drain. -var asyncQueryBuffer = 10 - -// This file implements the Routing interface for the IpfsDHT struct. - -// Basic Put/Get - -// PutValue adds value corresponding to given Key. -// This is the top level "Store" operation of the DHT -func (dht *IpfsDHT) PutValue(ctx context.Context, key string, value []byte) (err error) { - eip := log.EventBegin(ctx, "PutValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - log.Debugf("PutValue %s", key) - sk, err := dht.getOwnPrivateKey() - if err != nil { - return err - } - - sign, err := dht.Validator.IsSigned(key) - if err != nil { - return err - } - - rec, err := record.MakePutRecord(sk, key, value, sign) - if err != nil { - log.Debug("creation of record failed!") - return err - } - - err = dht.putLocal(key, rec) - if err != nil { - return err - } - - pchan, err := dht.GetClosestPeers(ctx, key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range pchan { - wg.Add(1) - go func(p peer.ID) { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - defer wg.Done() - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.Value, - ID: p, - }) - - err := dht.putValueToPeer(ctx, p, key, rec) - if err != nil { - log.Debugf("failed putting value to peer: %s", err) - } - }(p) - } - wg.Wait() - return nil -} - -// GetValue searches for the value corresponding to given Key. -func (dht *IpfsDHT) GetValue(ctx context.Context, key string) (_ []byte, err error) { - eip := log.EventBegin(ctx, "GetValue") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - vals, err := dht.GetValues(ctx, key, 16) - if err != nil { - return nil, err - } - - recs := make([][]byte, 0, len(vals)) - for _, v := range vals { - if v.Val != nil { - recs = append(recs, v.Val) - } - } - - i, err := dht.Selector.BestRecord(key, recs) - if err != nil { - return nil, err - } - - best := recs[i] - log.Debugf("GetValue %v %v", key, best) - if best == nil { - log.Errorf("GetValue yielded correct record with nil value.") - return nil, routing.ErrNotFound - } - - fixupRec, err := record.MakePutRecord(dht.peerstore.PrivKey(dht.self), key, best, true) - if err != nil { - // probably shouldnt actually 'error' here as we have found a value we like, - // but this call failing probably isnt something we want to ignore - return nil, err - } - - for _, v := range vals { - // if someone sent us a different 'less-valid' record, lets correct them - if !bytes.Equal(v.Val, best) { - go func(v routing.RecvdVal) { - if v.From == dht.self { - err := dht.putLocal(key, fixupRec) - if err != nil { - log.Error("Error correcting local dht entry:", err) - } - return - } - ctx, cancel := context.WithTimeout(dht.Context(), time.Second*30) - defer cancel() - err := dht.putValueToPeer(ctx, v.From, key, fixupRec) - if err != nil { - log.Error("Error correcting DHT entry: ", err) - } - }(v) - } - } - - return best, nil -} - -func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []routing.RecvdVal, err error) { - eip := log.EventBegin(ctx, "GetValues") - defer func() { - eip.Append(loggableKey(key)) - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - vals := make([]routing.RecvdVal, 0, nvals) - var valslock sync.Mutex - - // If we have it local, dont bother doing an RPC! - lrec, err := dht.getLocal(key) - if err == nil { - // TODO: this is tricky, we dont always want to trust our own value - // what if the authoritative source updated it? - log.Debug("have it locally") - vals = append(vals, routing.RecvdVal{ - Val: lrec.GetValue(), - From: dht.self, - }) - - if nvals <= 1 { - return vals, nil - } - } else if nvals == 0 { - return nil, err - } - - // get closest peers in the routing table - rtp := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) - log.Debugf("peers in rt: %d %s", len(rtp), rtp) - if len(rtp) == 0 { - log.Warning("No peers from routing table!") - return nil, kb.ErrLookupFailure - } - - // setup the Query - parent := ctx - query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - rec, peers, err := dht.getValueOrPeers(ctx, p, key) - switch err { - case routing.ErrNotFound: - // in this case, they responded with nothing, - // still send a notification so listeners can know the - // request has completed 'successfully' - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - }) - return nil, err - default: - return nil, err - - case nil, errInvalidRecord: - // in either of these cases, we want to keep going - } - - res := &dhtQueryResult{closerPeers: peers} - - if rec.GetValue() != nil || err == errInvalidRecord { - rv := routing.RecvdVal{ - Val: rec.GetValue(), - From: p, - } - valslock.Lock() - vals = append(vals, rv) - - // If weve collected enough records, we're done - if len(vals) >= nvals { - res.success = true - } - valslock.Unlock() - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: peers, - }) - - return res, nil - }) - - // run it! - _, err = query.Run(ctx, rtp) - if len(vals) == 0 { - if err != nil { - return nil, err - } - } - - return vals, nil -} - -// Value provider layer of indirection. -// This is what DSHTs (Coral and MainlineDHT) do to store large values in a DHT. - -// Provide makes this node announce that it can provide a value for the given key -func (dht *IpfsDHT) Provide(ctx context.Context, key *cid.Cid, brdcst bool) (err error) { - eip := log.EventBegin(ctx, "Provide", key, logging.LoggableMap{"broadcast": brdcst}) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // add self locally - dht.providers.AddProvider(ctx, key, dht.self) - if !brdcst { - return nil - } - - peers, err := dht.GetClosestPeers(ctx, key.KeyString()) - if err != nil { - return err - } - - mes, err := dht.makeProvRecord(key) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - for p := range peers { - wg.Add(1) - go func(p peer.ID) { - defer wg.Done() - log.Debugf("putProvider(%s, %s)", key, p) - err := dht.sendMessage(ctx, p, mes) - if err != nil { - log.Debug(err) - } - }(p) - } - wg.Wait() - return nil -} -func (dht *IpfsDHT) makeProvRecord(skey *cid.Cid) (*pb.Message, error) { - pi := pstore.PeerInfo{ - ID: dht.self, - Addrs: dht.host.Addrs(), - } - - // // only share WAN-friendly addresses ?? - // pi.Addrs = addrutil.WANShareableAddrs(pi.Addrs) - if len(pi.Addrs) < 1 { - return nil, fmt.Errorf("no known addresses for self. cannot put provider.") - } - - pmes := pb.NewMessage(pb.Message_ADD_PROVIDER, skey.KeyString(), 0) - pmes.ProviderPeers = pb.RawPeerInfosToPBPeers([]pstore.PeerInfo{pi}) - return pmes, nil -} - -// FindProviders searches until the context expires. -func (dht *IpfsDHT) FindProviders(ctx context.Context, c *cid.Cid) ([]pstore.PeerInfo, error) { - var providers []pstore.PeerInfo - for p := range dht.FindProvidersAsync(ctx, c, KValue) { - providers = append(providers, p) - } - return providers, nil -} - -// FindProvidersAsync is the same thing as FindProviders, but returns a channel. -// Peers will be returned on the channel as soon as they are found, even before -// the search query completes. -func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key *cid.Cid, count int) <-chan pstore.PeerInfo { - log.Event(ctx, "findProviders", key) - peerOut := make(chan pstore.PeerInfo, count) - go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) - return peerOut -} - -func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key *cid.Cid, count int, peerOut chan pstore.PeerInfo) { - defer log.EventBegin(ctx, "findProvidersAsync", key).Done() - defer close(peerOut) - - ps := pset.NewLimited(count) - provs := dht.providers.GetProviders(ctx, key) - for _, p := range provs { - // NOTE: Assuming that this list of peers is unique - if ps.TryAdd(p) { - pi := dht.peerstore.PeerInfo(p) - select { - case peerOut <- pi: - case <-ctx.Done(): - return - } - } - - // If we have enough peers locally, dont bother with remote RPC - // TODO: is this a DOS vector? - if ps.Size() >= count { - return - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(key.KeyString(), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - pmes, err := dht.findProvidersSingle(ctx, p, key) - if err != nil { - return nil, err - } - - log.Debugf("%d provider entries", len(pmes.GetProviderPeers())) - provs := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) - log.Debugf("%d provider entries decoded", len(provs)) - - // Add unique providers from request, up to 'count' - for _, prov := range provs { - if prov.ID != dht.self { - dht.peerstore.AddAddrs(prov.ID, prov.Addrs, pstore.TempAddrTTL) - } - log.Debugf("got provider: %s", prov) - if ps.TryAdd(prov.ID) { - log.Debugf("using provider: %s", prov) - select { - case peerOut <- *prov: - case <-ctx.Done(): - log.Debug("context timed out sending more providers") - return nil, ctx.Err() - } - } - if ps.Size() >= count { - log.Debugf("got enough providers (%d/%d)", ps.Size(), count) - return &dhtQueryResult{success: true}, nil - } - } - - // Give closer peers back to the query to be queried - closer := pmes.GetCloserPeers() - clpeers := pb.PBPeersToPeerInfos(closer) - log.Debugf("got closer peers: %d %s", len(clpeers), clpeers) - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeers, - }) - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - peers := dht.routingTable.NearestPeers(kb.ConvertKey(key.KeyString()), AlphaValue) - _, err := query.Run(ctx, peers) - if err != nil { - log.Debugf("Query error: %s", err) - // Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032 - if fmt.Sprint(err) == "" { - log.Error("reproduced bug 3032:") - log.Errorf("Errors type information: %#v", err) - log.Errorf("go version: %s", runtime.Version()) - log.Error("please report this information to: https://github.com/ipfs/go-ipfs/issues/3032") - - // replace problematic error with something that won't crash the daemon - err = fmt.Errorf("") - } - notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ - Type: notif.QueryError, - Extra: err.Error(), - }) - } -} - -// FindPeer searches for a peer with given ID. -func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (_ pstore.PeerInfo, err error) { - eip := log.EventBegin(ctx, "FindPeer", id) - defer func() { - if err != nil { - eip.SetError(err) - } - eip.Done() - }() - - // Check if were already connected to them - if pi := dht.FindLocal(id); pi.ID != "" { - return pi, nil - } - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return pstore.PeerInfo{}, kb.ErrLookupFailure - } - - // Sanity... - for _, p := range peers { - if p == id { - log.Debug("found target peer in list of closest peers...") - return dht.peerstore.PeerInfo(p), nil - } - } - - // setup the Query - parent := ctx - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.SendingQuery, - ID: p, - }) - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - closer := pmes.GetCloserPeers() - clpeerInfos := pb.PBPeersToPeerInfos(closer) - - // see if we got the peer here - for _, npi := range clpeerInfos { - if npi.ID == id { - return &dhtQueryResult{ - peer: npi, - success: true, - }, nil - } - } - - notif.PublishQueryEvent(parent, ¬if.QueryEvent{ - Type: notif.PeerResponse, - ID: p, - Responses: clpeerInfos, - }) - - return &dhtQueryResult{closerPeers: clpeerInfos}, nil - }) - - // run it! - result, err := query.Run(ctx, peers) - if err != nil { - return pstore.PeerInfo{}, err - } - - log.Debugf("FindPeer %v %v", id, result.success) - if result.peer.ID == "" { - return pstore.PeerInfo{}, routing.ErrNotFound - } - - return *result.peer, nil -} - -// FindPeersConnectedToPeer searches for peers directly connected to a given peer. -func (dht *IpfsDHT) FindPeersConnectedToPeer(ctx context.Context, id peer.ID) (<-chan *pstore.PeerInfo, error) { - - peerchan := make(chan *pstore.PeerInfo, asyncQueryBuffer) - peersSeen := make(map[peer.ID]struct{}) - - peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) - if len(peers) == 0 { - return nil, kb.ErrLookupFailure - } - - // setup the Query - query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { - - pmes, err := dht.findPeerSingle(ctx, p, id) - if err != nil { - return nil, err - } - - var clpeers []*pstore.PeerInfo - closer := pmes.GetCloserPeers() - for _, pbp := range closer { - pi := pb.PBPeerToPeerInfo(pbp) - - // skip peers already seen - if _, found := peersSeen[pi.ID]; found { - continue - } - peersSeen[pi.ID] = struct{}{} - - // if peer is connected, send it to our client. - if pb.Connectedness(*pbp.Connection) == inet.Connected { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case peerchan <- pi: - } - } - - // if peer is the peer we're looking for, don't bother querying it. - // TODO maybe query it? - if pb.Connectedness(*pbp.Connection) != inet.Connected { - clpeers = append(clpeers, pi) - } - } - - return &dhtQueryResult{closerPeers: clpeers}, nil - }) - - // run it! run it asynchronously to gen peers as results are found. - // this does no error checking - go func() { - if _, err := query.Run(ctx, peers); err != nil { - log.Debug(err) - } - - // close the peerchan channel when done. - close(peerchan) - }() - - return peerchan, nil -} diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/util.go b/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/util.go deleted file mode 100644 index a605759a95..0000000000 --- a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/util.go +++ /dev/null @@ -1,39 +0,0 @@ -package dht - -import ( - "sync" -) - -// Pool size is the number of nodes used for group find/set RPC calls -var PoolSize = 6 - -// K is the maximum number of requests to perform before returning failure. -var KValue = 20 - -// Alpha is the concurrency factor for asynchronous requests. -var AlphaValue = 3 - -// A counter for incrementing a variable across multiple threads -type counter struct { - n int - mut sync.Mutex -} - -func (c *counter) Increment() { - c.mut.Lock() - c.n++ - c.mut.Unlock() -} - -func (c *counter) Decrement() { - c.mut.Lock() - c.n-- - c.mut.Unlock() -} - -func (c *counter) Size() (s int) { - c.mut.Lock() - s = c.n - c.mut.Unlock() - return -} diff --git a/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/.travis.yml b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/.travis.yml new file mode 100644 index 0000000000..58d60ddf4a --- /dev/null +++ b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/LICENSE b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/LICENSE rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/LICENSE diff --git a/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/Makefile b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/Makefile new file mode 100644 index 0000000000..5c9960908c --- /dev/null +++ b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/Makefile @@ -0,0 +1,13 @@ +all: deps + +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/README.md b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/README.md similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/README.md rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/README.md diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/codecov.yml b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/codecov.yml rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/codecov.yml diff --git a/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/interface.go b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/interface.go new file mode 100644 index 0000000000..f0609ad066 --- /dev/null +++ b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/interface.go @@ -0,0 +1,220 @@ +package net + +import ( + "context" + "errors" + "io" + + "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// MessageSizeMax is a soft (recommended) maximum for network messages. +// One can write more, as the interface is a stream. But it is useful +// to bunch it up into multiple read/writes when the whole message is +// a single, large serialized object. +const MessageSizeMax = 1 << 22 // 4 MB + +// Stream represents a bidirectional channel between two agents in +// the IPFS network. "agent" is as granular as desired, potentially +// being a "request -> reply" pair, or whole protocols. +// Streams are backed by stream-muxer streams underneath the hood. +type Stream interface { + smux.Stream + + Protocol() protocol.ID + SetProtocol(protocol.ID) + + // Stat returns metadata pertaining to this stream. + Stat() Stat + + // Conn returns the connection this stream is part of. + Conn() Conn +} + +// Direction represents which peer in a stream initiated a connection. +type Direction int + +const ( + // DirUnknown is the default direction. + DirUnknown Direction = iota + // DirInbound is for when the remote peer initiated a connection. + DirInbound + // DirOutbound is for when the local peer initiated a connection. + DirOutbound +) + +// Stat stores metadata pertaining to a given Stream/Conn. +type Stat struct { + Direction Direction + Extra map[interface{}]interface{} +} + +// StreamHandler is the type of function used to listen for +// streams opened by the remote side. +type StreamHandler func(Stream) + +// ConnSecurity is the interface that one can mix into a connection interface to +// give it the security methods. +type ConnSecurity interface { + // LocalPeer returns our peer ID + LocalPeer() peer.ID + + // LocalPrivateKey returns our private key + LocalPrivateKey() ic.PrivKey + + // RemotePeer returns the peer ID of the remote peer. + RemotePeer() peer.ID + + // RemotePublicKey returns the public key of the remote peer. + RemotePublicKey() ic.PubKey +} + +// ConnMultiaddrs is an interface mixin for connection types that provide multiaddr +// addresses for the endpoints. +type ConnMultiaddrs interface { + // LocalMultiaddr returns the local Multiaddr associated + // with this connection + LocalMultiaddr() ma.Multiaddr + + // RemoteMultiaddr returns the remote Multiaddr associated + // with this connection + RemoteMultiaddr() ma.Multiaddr +} + +// Conn is a connection to a remote peer. It multiplexes streams. +// Usually there is no need to use a Conn directly, but it may +// be useful to get information about the peer on the other side: +// stream.Conn().RemotePeer() +type Conn interface { + io.Closer + + ConnSecurity + ConnMultiaddrs + + // NewStream constructs a new Stream over this conn. + NewStream() (Stream, error) + + // GetStreams returns all open streams over this conn. + GetStreams() []Stream + + // Stat stores metadata pertaining to this conn. + Stat() Stat +} + +// ConnHandler is the type of function used to listen for +// connections opened by the remote side. +type ConnHandler func(Conn) + +// Network is the interface used to connect to the outside world. +// It dials and listens for connections. it uses a Swarm to pool +// connnections (see swarm pkg, and peerstream.Swarm). Connections +// are encrypted with a TLS-like protocol. +type Network interface { + Dialer + io.Closer + + // SetStreamHandler sets the handler for new streams opened by the + // remote side. This operation is threadsafe. + SetStreamHandler(StreamHandler) + + // SetConnHandler sets the handler for new connections opened by the + // remote side. This operation is threadsafe. + SetConnHandler(ConnHandler) + + // NewStream returns a new stream to given peer p. + // If there is no connection to p, attempts to create one. + NewStream(context.Context, peer.ID) (Stream, error) + + // Listen tells the network to start listening on given multiaddrs. + Listen(...ma.Multiaddr) error + + // ListenAddresses returns a list of addresses at which this network listens. + ListenAddresses() []ma.Multiaddr + + // InterfaceListenAddresses returns a list of addresses at which this network + // listens. It expands "any interface" addresses (/ip4/0.0.0.0, /ip6/::) to + // use the known local interfaces. + InterfaceListenAddresses() ([]ma.Multiaddr, error) + + // Process returns the network's Process + Process() goprocess.Process +} + +// There are no addresses associated with a peer when they were needed. +var ErrNoRemoteAddrs = errors.New("no remote addresses") + +// Dialer represents a service that can dial out to peers +// (this is usually just a Network, but other services may not need the whole +// stack, and thus it becomes easier to mock) +type Dialer interface { + + // Peerstore returns the internal peerstore + // This is useful to tell the dialer about a new address for a peer. + // Or use one of the public keys found out over the network. + Peerstore() pstore.Peerstore + + // LocalPeer returns the local peer associated with this network + LocalPeer() peer.ID + + // DialPeer establishes a connection to a given peer + DialPeer(context.Context, peer.ID) (Conn, error) + + // ClosePeer closes the connection to a given peer + ClosePeer(peer.ID) error + + // Connectedness returns a state signaling connection capabilities + Connectedness(peer.ID) Connectedness + + // Peers returns the peers connected + Peers() []peer.ID + + // Conns returns the connections in this Netowrk + Conns() []Conn + + // ConnsToPeer returns the connections in this Netowrk for given peer. + ConnsToPeer(p peer.ID) []Conn + + // Notify/StopNotify register and unregister a notifiee for signals + Notify(Notifiee) + StopNotify(Notifiee) +} + +// Connectedness signals the capacity for a connection with a given node. +// It is used to signal to services and other peers whether a node is reachable. +type Connectedness int + +const ( + // NotConnected means no connection to peer, and no extra information (default) + NotConnected Connectedness = iota + + // Connected means has an open, live connection to peer + Connected + + // CanConnect means recently connected to peer, terminated gracefully + CanConnect + + // CannotConnect means recently attempted connecting but failed to connect. + // (should signal "made effort, failed") + CannotConnect +) + +// Notifiee is an interface for an object wishing to receive +// notifications from a Network. +type Notifiee interface { + Listen(Network, ma.Multiaddr) // called when network starts listening on an addr + ListenClose(Network, ma.Multiaddr) // called when network stops listening on an addr + Connected(Network, Conn) // called when a connection opened + Disconnected(Network, Conn) // called when a connection closed + OpenedStream(Network, Stream) // called when a stream opened + ClosedStream(Network, Stream) // called when a stream closed + + // TODO + // PeerConnected(Network, peer.ID) // called when a peer connected + // PeerDisconnected(Network, peer.ID) // called when a peer disconnected +} diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/notifiee.go b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/notifiee.go similarity index 95% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/notifiee.go rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/notifiee.go index 765ab766c1..bab6709d71 100644 --- a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/notifiee.go +++ b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/notifiee.go @@ -1,7 +1,7 @@ package net import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // NotifyBundle implements Notifiee by calling any of the functions set on it, diff --git a/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/package.json b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/package.json new file mode 100644 index 0000000000..efac1a003c --- /dev/null +++ b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/package.json @@ -0,0 +1,60 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-net" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-net" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "", + "name": "go-libp2p-net", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.0.30" +} + diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/stream_util.go b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/stream_util.go similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/stream_util.go rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/stream_util.go diff --git a/vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/timeouts.go b/vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/timeouts.go similarity index 100% rename from vendor/gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net/timeouts.go rename to vendor/gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net/timeouts.go diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/codec.go b/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/codec.go deleted file mode 100644 index 21f082cca5..0000000000 --- a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/codec.go +++ /dev/null @@ -1,35 +0,0 @@ -package pnet - -import ( - "fmt" - "io" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - bmux "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/mux" -) - -var ( - pathPSKv1 = []byte("/key/swarm/psk/1.0.0/") - headerPSKv1 = mc.Header(pathPSKv1) -) - -func decodeV1PSK(in io.Reader) (*[32]byte, error) { - var err error - in, err = mc.WrapTransformPathToHeader(in) - if err != nil { - return nil, err - } - err = mc.ConsumeHeader(in, headerPSKv1) - if err != nil { - return nil, fmt.Errorf("psk header error: %s", err.Error()) - } - - in, err = mc.WrapTransformPathToHeader(in) - if err != nil { - return nil, fmt.Errorf("wrapping error: %s", err.Error()) - } - out := [32]byte{} - - err = bmux.AllBasesMux().Decoder(in).Decode(out[:]) - return &out, err -} diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/package.json b/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/package.json deleted file mode 100644 index 78313aebe3..0000000000 --- a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": "libp2p", - "bugs": { - "URL": "https://github.com/libp2p/go-libp2p-pnet/issues", - "url": "https://github.com/libp2p/go-libp2p-pnet/issues" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-pnet" - }, - "gxDependencies": [ - { - "author": "libp2p", - "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", - "name": "go-libp2p-interface-pnet", - "version": "3.0.0" - }, - { - "author": "multiformats", - "hash": "QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z", - "name": "go-multicodec", - "version": "0.1.7" - }, - { - "author": "davidlazar", - "hash": "QmNi5J1mEQKAKWbPRBEMKKYVNok9EN4MsGM4YUqPvraPEX", - "name": "go-crypto-dav", - "version": "0.2.2" - }, - { - "author": "Stebalien", - "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", - "name": "go-buffer-pool", - "version": "0.1.3" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "MIT", - "name": "go-libp2p-pnet", - "releaseCmd": "git commit -a -m \"gx release $VERSION\"", - "version": "3.0.4" -} - diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/README.md b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/README.md deleted file mode 100644 index e37179fd47..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# go-libp2p-pubsub - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://github.com/libp2p/libp2p) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) - -> A pubsub system with flooding and gossiping variants. - -PubSub is a work in progress, with floodsub as an initial protocol, followed by gossipsub ([spec](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub), [gossipsub.go](https://github.com/libp2p/go-libp2p-pubsub/blob/master/gossipsub.go)). - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contribute](#contribute) -- [License](#license) - -## Install - -``` -go get github.com/libp2p/go-libp2p-pubsub -``` - -## Usage - -To be used for messaging in p2p instrastructure (as part of libp2p) such as IPFS, Ethereum, other blockchains, etc. - -## Implementations - -See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations). - -## Contribute - -Contributions welcome. Please check out [the issues](https://github.com/libp2p/go-libp2p-pubsub/issues). - -Check out our [contributing document](https://github.com/libp2p/community/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/comm.go b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/comm.go deleted file mode 100644 index 8aec7ff181..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/comm.go +++ /dev/null @@ -1,135 +0,0 @@ -package pubsub - -import ( - "bufio" - "context" - "io" - - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" - - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -// get the initial RPC containing all of our subscriptions to send to new peers -func (p *PubSub) getHelloPacket() *RPC { - var rpc RPC - for t := range p.myTopics { - as := &pb.RPC_SubOpts{ - Topicid: proto.String(t), - Subscribe: proto.Bool(true), - } - rpc.Subscriptions = append(rpc.Subscriptions, as) - } - return &rpc -} - -func (p *PubSub) handleNewStream(s inet.Stream) { - r := ggio.NewDelimitedReader(s, 1<<20) - for { - rpc := new(RPC) - err := r.ReadMsg(&rpc.RPC) - if err != nil { - if err != io.EOF { - s.Reset() - log.Infof("error reading rpc from %s: %s", s.Conn().RemotePeer(), err) - } else { - // Just be nice. They probably won't read this - // but it doesn't hurt to send it. - s.Close() - } - select { - case p.peerDead <- s.Conn().RemotePeer(): - case <-p.ctx.Done(): - } - return - } - - rpc.from = s.Conn().RemotePeer() - select { - case p.incoming <- rpc: - case <-p.ctx.Done(): - // Close is useless because the other side isn't reading. - s.Reset() - return - } - } -} - -func (p *PubSub) handleSendingMessages(ctx context.Context, s inet.Stream, outgoing <-chan *RPC) { - bufw := bufio.NewWriter(s) - wc := ggio.NewDelimitedWriter(bufw) - - writeMsg := func(msg proto.Message) error { - err := wc.WriteMsg(msg) - if err != nil { - return err - } - - return bufw.Flush() - } - - defer inet.FullClose(s) - for { - select { - case rpc, ok := <-outgoing: - if !ok { - return - } - - err := writeMsg(&rpc.RPC) - if err != nil { - s.Reset() - log.Infof("writing message to %s: %s", s.Conn().RemotePeer(), err) - select { - case p.peerDead <- s.Conn().RemotePeer(): - case <-ctx.Done(): - } - return - } - case <-ctx.Done(): - return - } - } -} - -func rpcWithSubs(subs ...*pb.RPC_SubOpts) *RPC { - return &RPC{ - RPC: pb.RPC{ - Subscriptions: subs, - }, - } -} - -func rpcWithMessages(msgs ...*pb.Message) *RPC { - return &RPC{RPC: pb.RPC{Publish: msgs}} -} - -func rpcWithControl(msgs []*pb.Message, - ihave []*pb.ControlIHave, - iwant []*pb.ControlIWant, - graft []*pb.ControlGraft, - prune []*pb.ControlPrune) *RPC { - return &RPC{ - RPC: pb.RPC{ - Publish: msgs, - Control: &pb.ControlMessage{ - Ihave: ihave, - Iwant: iwant, - Graft: graft, - Prune: prune, - }, - }, - } -} - -func copyRPC(rpc *RPC) *RPC { - res := new(RPC) - *res = *rpc - if rpc.Control != nil { - res.Control = new(pb.ControlMessage) - *res.Control = *rpc.Control - } - return res -} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/notify.go b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/notify.go deleted file mode 100644 index 0f9f05b6e7..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/notify.go +++ /dev/null @@ -1,41 +0,0 @@ -package pubsub - -import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -var _ inet.Notifiee = (*PubSubNotif)(nil) - -type PubSubNotif PubSub - -func (p *PubSubNotif) OpenedStream(n inet.Network, s inet.Stream) { -} - -func (p *PubSubNotif) ClosedStream(n inet.Network, s inet.Stream) { -} - -func (p *PubSubNotif) Connected(n inet.Network, c inet.Conn) { - go func() { - s, err := p.host.NewStream(p.ctx, c.RemotePeer(), p.rt.Protocols()...) - if err != nil { - log.Warning("opening new stream to peer: ", err, c.LocalPeer(), c.RemotePeer()) - return - } - - select { - case p.newPeers <- s: - case <-p.ctx.Done(): - s.Reset() - } - }() -} - -func (p *PubSubNotif) Disconnected(n inet.Network, c inet.Conn) { -} - -func (p *PubSubNotif) Listen(n inet.Network, _ ma.Multiaddr) { -} - -func (p *PubSubNotif) ListenClose(n inet.Network, _ ma.Multiaddr) { -} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/package.json b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/package.json deleted file mode 100644 index b3ff404611..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-pubsub" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-pubsub" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b", - "name": "timecache", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc", - "name": "go-libp2p-host", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "Qmcwep23T9AwwbuQRRhVyjk9PBRbMFCyGKCKGZfTPteiFU", - "name": "go-libp2p-blankhost", - "version": "0.3.15" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp", - "name": "go-libp2p-swarm", - "version": "3.0.22" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - } - ], - "gxVersion": "0.9.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-pubsub", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.11.3" -} - diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pubsub.go b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pubsub.go deleted file mode 100644 index 487911efee..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pubsub.go +++ /dev/null @@ -1,908 +0,0 @@ -package pubsub - -import ( - "context" - "encoding/binary" - "fmt" - "math/rand" - "sync/atomic" - "time" - - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" - - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - timecache "gx/ipfs/QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b/timecache" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" -) - -const ( - defaultValidateTimeout = 150 * time.Millisecond - defaultValidateConcurrency = 100 - defaultValidateThrottle = 8192 -) - -var log = logging.Logger("pubsub") - -type PubSub struct { - // atomic counter for seqnos - // NOTE: Must be declared at the top of the struct as we perform atomic - // operations on this field. - // - // See: https://golang.org/pkg/sync/atomic/#pkg-note-BUG - counter uint64 - - host host.Host - - rt PubSubRouter - - // incoming messages from other peers - incoming chan *RPC - - // messages we are publishing out to our peers - publish chan *Message - - // addSub is a control channel for us to add and remove subscriptions - addSub chan *addSubReq - - // get list of topics we are subscribed to - getTopics chan *topicReq - - // get chan of peers we are connected to - getPeers chan *listPeerReq - - // send subscription here to cancel it - cancelCh chan *Subscription - - // a notification channel for incoming streams from other peers - newPeers chan inet.Stream - - // a notification channel for when our peers die - peerDead chan peer.ID - - // The set of topics we are subscribed to - myTopics map[string]map[*Subscription]struct{} - - // topics tracks which topics each of our peers are subscribed to - topics map[string]map[peer.ID]struct{} - - // sendMsg handles messages that have been validated - sendMsg chan *sendReq - - // addVal handles validator registration requests - addVal chan *addValReq - - // rmVal handles validator unregistration requests - rmVal chan *rmValReq - - // topicVals tracks per topic validators - topicVals map[string]*topicVal - - // validateThrottle limits the number of active validation goroutines - validateThrottle chan struct{} - - // eval thunk in event loop - eval chan func() - - peers map[peer.ID]chan *RPC - seenMessages *timecache.TimeCache - - // key for signing messages; nil when signing is disabled (default for now) - signKey crypto.PrivKey - // source ID for signed messages; corresponds to signKey - signID peer.ID - // strict mode rejects all unsigned messages prior to validation - signStrict bool - - ctx context.Context -} - -// PubSubRouter is the message router component of PubSub -type PubSubRouter interface { - // Protocols returns the list of protocols supported by the router. - Protocols() []protocol.ID - // Attach is invoked by the PubSub constructor to attach the router to a - // freshly initialized PubSub instance. - Attach(*PubSub) - // AddPeer notifies the router that a new peer has been connected. - AddPeer(peer.ID, protocol.ID) - // RemovePeer notifies the router that a peer has been disconnected. - RemovePeer(peer.ID) - // HandleRPC is invoked to process control messages in the RPC envelope. - // It is invoked after subscriptions and payload messages have been processed. - HandleRPC(*RPC) - // Publish is invoked to forward a new message that has been validated. - Publish(peer.ID, *pb.Message) - // Join notifies the router that we want to receive and forward messages in a topic. - // It is invoked after the subscription announcement. - Join(topic string) - // Leave notifies the router that we are no longer interested in a topic. - // It is invoked after the unsubscription announcement. - Leave(topic string) -} - -type Message struct { - *pb.Message -} - -func (m *Message) GetFrom() peer.ID { - return peer.ID(m.Message.GetFrom()) -} - -type RPC struct { - pb.RPC - - // unexported on purpose, not sending this over the wire - from peer.ID -} - -type Option func(*PubSub) error - -// NewPubSub returns a new PubSub management object -func NewPubSub(ctx context.Context, h host.Host, rt PubSubRouter, opts ...Option) (*PubSub, error) { - ps := &PubSub{ - host: h, - ctx: ctx, - rt: rt, - signID: h.ID(), - signKey: h.Peerstore().PrivKey(h.ID()), - incoming: make(chan *RPC, 32), - publish: make(chan *Message), - newPeers: make(chan inet.Stream), - peerDead: make(chan peer.ID), - cancelCh: make(chan *Subscription), - getPeers: make(chan *listPeerReq), - addSub: make(chan *addSubReq), - getTopics: make(chan *topicReq), - sendMsg: make(chan *sendReq, 32), - addVal: make(chan *addValReq), - rmVal: make(chan *rmValReq), - validateThrottle: make(chan struct{}, defaultValidateThrottle), - eval: make(chan func()), - myTopics: make(map[string]map[*Subscription]struct{}), - topics: make(map[string]map[peer.ID]struct{}), - peers: make(map[peer.ID]chan *RPC), - topicVals: make(map[string]*topicVal), - seenMessages: timecache.NewTimeCache(time.Second * 120), - counter: uint64(time.Now().UnixNano()), - } - - for _, opt := range opts { - err := opt(ps) - if err != nil { - return nil, err - } - } - - if ps.signStrict && ps.signKey == nil { - return nil, fmt.Errorf("strict signature verification enabled but message signing is disabled") - } - - rt.Attach(ps) - - for _, id := range rt.Protocols() { - h.SetStreamHandler(id, ps.handleNewStream) - } - h.Network().Notify((*PubSubNotif)(ps)) - - go ps.processLoop(ctx) - - return ps, nil -} - -// WithValidateThrottle sets the upper bound on the number of active validation -// goroutines. -func WithValidateThrottle(n int) Option { - return func(ps *PubSub) error { - ps.validateThrottle = make(chan struct{}, n) - return nil - } -} - -// WithMessageSigning enables or disables message signing (enabled by default). -func WithMessageSigning(enabled bool) Option { - return func(p *PubSub) error { - if enabled { - p.signKey = p.host.Peerstore().PrivKey(p.signID) - if p.signKey == nil { - return fmt.Errorf("can't sign for peer %s: no private key", p.signID) - } - } else { - p.signKey = nil - } - return nil - } -} - -// WithMessageAuthor sets the author for outbound messages to the given peer ID -// (defaults to the host's ID). If message signing is enabled, the private key -// must be available in the host's peerstore. -func WithMessageAuthor(author peer.ID) Option { - return func(p *PubSub) error { - if author == "" { - author = p.host.ID() - } - if p.signKey != nil { - newSignKey := p.host.Peerstore().PrivKey(author) - if newSignKey == nil { - return fmt.Errorf("can't sign for peer %s: no private key", p.signID) - } - p.signKey = newSignKey - } - p.signID = author - return nil - } -} - -// WithStrictSignatureVerification enforces message signing. If set, unsigned -// messages will be discarded. -// -// This currently defaults to false but, as we transition to signing by default, -// will eventually default to true. -func WithStrictSignatureVerification(required bool) Option { - return func(p *PubSub) error { - p.signStrict = required - return nil - } -} - -// processLoop handles all inputs arriving on the channels -func (p *PubSub) processLoop(ctx context.Context) { - defer func() { - // Clean up go routines. - for _, ch := range p.peers { - close(ch) - } - p.peers = nil - p.topics = nil - }() - for { - select { - case s := <-p.newPeers: - pid := s.Conn().RemotePeer() - ch, ok := p.peers[pid] - if ok { - log.Error("already have connection to peer: ", pid) - close(ch) - } - - messages := make(chan *RPC, 32) - go p.handleSendingMessages(ctx, s, messages) - messages <- p.getHelloPacket() - - p.peers[pid] = messages - - p.rt.AddPeer(pid, s.Protocol()) - - case pid := <-p.peerDead: - ch, ok := p.peers[pid] - if ok { - close(ch) - } - - delete(p.peers, pid) - for _, t := range p.topics { - delete(t, pid) - } - - p.rt.RemovePeer(pid) - - case treq := <-p.getTopics: - var out []string - for t := range p.myTopics { - out = append(out, t) - } - treq.resp <- out - case sub := <-p.cancelCh: - p.handleRemoveSubscription(sub) - case sub := <-p.addSub: - p.handleAddSubscription(sub) - case preq := <-p.getPeers: - tmap, ok := p.topics[preq.topic] - if preq.topic != "" && !ok { - preq.resp <- nil - continue - } - var peers []peer.ID - for p := range p.peers { - if preq.topic != "" { - _, ok := tmap[p] - if !ok { - continue - } - } - peers = append(peers, p) - } - preq.resp <- peers - case rpc := <-p.incoming: - p.handleIncomingRPC(rpc) - - case msg := <-p.publish: - vals := p.getValidators(msg) - p.pushMsg(vals, p.host.ID(), msg) - - case req := <-p.sendMsg: - p.publishMessage(req.from, req.msg.Message) - - case req := <-p.addVal: - p.addValidator(req) - - case req := <-p.rmVal: - p.rmValidator(req) - - case thunk := <-p.eval: - thunk() - - case <-ctx.Done(): - log.Info("pubsub processloop shutting down") - return - } - } -} - -// handleRemoveSubscription removes Subscription sub from bookeeping. -// If this was the last Subscription for a given topic, it will also announce -// that this node is not subscribing to this topic anymore. -// Only called from processLoop. -func (p *PubSub) handleRemoveSubscription(sub *Subscription) { - subs := p.myTopics[sub.topic] - - if subs == nil { - return - } - - sub.err = fmt.Errorf("subscription cancelled by calling sub.Cancel()") - close(sub.ch) - delete(subs, sub) - - if len(subs) == 0 { - delete(p.myTopics, sub.topic) - p.announce(sub.topic, false) - p.rt.Leave(sub.topic) - } -} - -// handleAddSubscription adds a Subscription for a particular topic. If it is -// the first Subscription for the topic, it will announce that this node -// subscribes to the topic. -// Only called from processLoop. -func (p *PubSub) handleAddSubscription(req *addSubReq) { - sub := req.sub - subs := p.myTopics[sub.topic] - - // announce we want this topic - if len(subs) == 0 { - p.announce(sub.topic, true) - p.rt.Join(sub.topic) - } - - // make new if not there - if subs == nil { - p.myTopics[sub.topic] = make(map[*Subscription]struct{}) - subs = p.myTopics[sub.topic] - } - - sub.ch = make(chan *Message, 32) - sub.cancelCh = p.cancelCh - - p.myTopics[sub.topic][sub] = struct{}{} - - req.resp <- sub -} - -// announce announces whether or not this node is interested in a given topic -// Only called from processLoop. -func (p *PubSub) announce(topic string, sub bool) { - subopt := &pb.RPC_SubOpts{ - Topicid: &topic, - Subscribe: &sub, - } - - out := rpcWithSubs(subopt) - for pid, peer := range p.peers { - select { - case peer <- out: - default: - log.Infof("Can't send announce message to peer %s: queue full; scheduling retry", pid) - go p.announceRetry(pid, topic, sub) - } - } -} - -func (p *PubSub) announceRetry(pid peer.ID, topic string, sub bool) { - time.Sleep(time.Duration(1+rand.Intn(1000)) * time.Millisecond) - - retry := func() { - _, ok := p.myTopics[topic] - if (ok && sub) || (!ok && !sub) { - p.doAnnounceRetry(pid, topic, sub) - } - } - - select { - case p.eval <- retry: - case <-p.ctx.Done(): - } -} - -func (p *PubSub) doAnnounceRetry(pid peer.ID, topic string, sub bool) { - peer, ok := p.peers[pid] - if !ok { - return - } - - subopt := &pb.RPC_SubOpts{ - Topicid: &topic, - Subscribe: &sub, - } - - out := rpcWithSubs(subopt) - select { - case peer <- out: - default: - log.Infof("Can't send announce message to peer %s: queue full; scheduling retry", pid) - go p.announceRetry(pid, topic, sub) - } -} - -// notifySubs sends a given message to all corresponding subscribers. -// Only called from processLoop. -func (p *PubSub) notifySubs(msg *pb.Message) { - for _, topic := range msg.GetTopicIDs() { - subs := p.myTopics[topic] - for f := range subs { - select { - case f.ch <- &Message{msg}: - default: - log.Infof("Can't deliver message to subscription for topic %s; subscriber too slow", topic) - } - } - } -} - -// seenMessage returns whether we already saw this message before -func (p *PubSub) seenMessage(id string) bool { - return p.seenMessages.Has(id) -} - -// markSeen marks a message as seen such that seenMessage returns `true' for the given id -func (p *PubSub) markSeen(id string) { - p.seenMessages.Add(id) -} - -// subscribedToMessage returns whether we are subscribed to one of the topics -// of a given message -func (p *PubSub) subscribedToMsg(msg *pb.Message) bool { - if len(p.myTopics) == 0 { - return false - } - - for _, t := range msg.GetTopicIDs() { - if _, ok := p.myTopics[t]; ok { - return true - } - } - return false -} - -func (p *PubSub) handleIncomingRPC(rpc *RPC) { - for _, subopt := range rpc.GetSubscriptions() { - t := subopt.GetTopicid() - if subopt.GetSubscribe() { - tmap, ok := p.topics[t] - if !ok { - tmap = make(map[peer.ID]struct{}) - p.topics[t] = tmap - } - - tmap[rpc.from] = struct{}{} - } else { - tmap, ok := p.topics[t] - if !ok { - continue - } - delete(tmap, rpc.from) - } - } - - for _, pmsg := range rpc.GetPublish() { - if !p.subscribedToMsg(pmsg) { - log.Warning("received message we didn't subscribe to. Dropping.") - continue - } - - msg := &Message{pmsg} - vals := p.getValidators(msg) - p.pushMsg(vals, rpc.from, msg) - } - - p.rt.HandleRPC(rpc) -} - -// msgID returns a unique ID of the passed Message -func msgID(pmsg *pb.Message) string { - return string(pmsg.GetFrom()) + string(pmsg.GetSeqno()) -} - -// pushMsg pushes a message performing validation as necessary -func (p *PubSub) pushMsg(vals []*topicVal, src peer.ID, msg *Message) { - // reject unsigned messages when strict before we even process the id - if p.signStrict && msg.Signature == nil { - log.Debugf("dropping unsigned message from %s", src) - return - } - - id := msgID(msg.Message) - if p.seenMessage(id) { - return - } - p.markSeen(id) - - if len(vals) > 0 || msg.Signature != nil { - // validation is asynchronous and globally throttled with the throttleValidate semaphore. - // the purpose of the global throttle is to bound the goncurrency possible from incoming - // network traffic; each validator also has an individual throttle to preclude - // slow (or faulty) validators from starving other topics; see validate below. - select { - case p.validateThrottle <- struct{}{}: - go func() { - p.validate(vals, src, msg) - <-p.validateThrottle - }() - default: - log.Warningf("message validation throttled; dropping message from %s", src) - } - return - } - - p.publishMessage(src, msg.Message) -} - -// validate performs validation and only sends the message if all validators succeed -func (p *PubSub) validate(vals []*topicVal, src peer.ID, msg *Message) { - if msg.Signature != nil { - if !p.validateSignature(msg) { - log.Warningf("message signature validation failed; dropping message from %s", src) - return - } - } - - if len(vals) > 0 { - if !p.validateTopic(vals, msg) { - log.Warningf("message validation failed; dropping message from %s", src) - return - } - } - - // all validators were successful, send the message - p.sendMsg <- &sendReq{ - from: src, - msg: msg, - } -} - -func (p *PubSub) validateSignature(msg *Message) bool { - err := verifyMessageSignature(msg.Message) - if err != nil { - log.Debugf("signature verification error: %s", err.Error()) - return false - } - - return true -} - -func (p *PubSub) validateTopic(vals []*topicVal, msg *Message) bool { - if len(vals) == 1 { - return p.validateSingleTopic(vals[0], msg) - } - - ctx, cancel := context.WithCancel(p.ctx) - defer cancel() - - rch := make(chan bool, len(vals)) - rcount := 0 - throttle := false - -loop: - for _, val := range vals { - rcount++ - - select { - case val.validateThrottle <- struct{}{}: - go func(val *topicVal) { - rch <- val.validateMsg(ctx, msg) - <-val.validateThrottle - }(val) - - default: - log.Debugf("validation throttled for topic %s", val.topic) - throttle = true - break loop - } - } - - if throttle { - return false - } - - for i := 0; i < rcount; i++ { - valid := <-rch - if !valid { - return false - } - } - - return true -} - -// fast path for single topic validation that avoids the extra goroutine -func (p *PubSub) validateSingleTopic(val *topicVal, msg *Message) bool { - select { - case val.validateThrottle <- struct{}{}: - ctx, cancel := context.WithCancel(p.ctx) - defer cancel() - - res := val.validateMsg(ctx, msg) - <-val.validateThrottle - - return res - - default: - log.Debugf("validation throttled for topic %s", val.topic) - return false - } -} - -func (p *PubSub) publishMessage(from peer.ID, pmsg *pb.Message) { - p.notifySubs(pmsg) - p.rt.Publish(from, pmsg) -} - -// getValidators returns all validators that apply to a given message -func (p *PubSub) getValidators(msg *Message) []*topicVal { - var vals []*topicVal - - for _, topic := range msg.GetTopicIDs() { - val, ok := p.topicVals[topic] - if !ok { - continue - } - - vals = append(vals, val) - } - - return vals -} - -type addSubReq struct { - sub *Subscription - resp chan *Subscription -} - -type SubOpt func(sub *Subscription) error - -// Subscribe returns a new Subscription for the given topic -func (p *PubSub) Subscribe(topic string, opts ...SubOpt) (*Subscription, error) { - td := pb.TopicDescriptor{Name: &topic} - - return p.SubscribeByTopicDescriptor(&td, opts...) -} - -// SubscribeByTopicDescriptor lets you subscribe a topic using a pb.TopicDescriptor -func (p *PubSub) SubscribeByTopicDescriptor(td *pb.TopicDescriptor, opts ...SubOpt) (*Subscription, error) { - if td.GetAuth().GetMode() != pb.TopicDescriptor_AuthOpts_NONE { - return nil, fmt.Errorf("auth mode not yet supported") - } - - if td.GetEnc().GetMode() != pb.TopicDescriptor_EncOpts_NONE { - return nil, fmt.Errorf("encryption mode not yet supported") - } - - sub := &Subscription{ - topic: td.GetName(), - } - - for _, opt := range opts { - err := opt(sub) - if err != nil { - return nil, err - } - } - - out := make(chan *Subscription, 1) - p.addSub <- &addSubReq{ - sub: sub, - resp: out, - } - - return <-out, nil -} - -type topicReq struct { - resp chan []string -} - -// GetTopics returns the topics this node is subscribed to -func (p *PubSub) GetTopics() []string { - out := make(chan []string, 1) - p.getTopics <- &topicReq{resp: out} - return <-out -} - -// Publish publishes data under the given topic -func (p *PubSub) Publish(topic string, data []byte) error { - seqno := p.nextSeqno() - m := &pb.Message{ - Data: data, - TopicIDs: []string{topic}, - From: []byte(p.host.ID()), - Seqno: seqno, - } - if p.signKey != nil { - m.From = []byte(p.signID) - err := signMessage(p.signID, p.signKey, m) - if err != nil { - return err - } - } - p.publish <- &Message{m} - return nil -} - -func (p *PubSub) nextSeqno() []byte { - seqno := make([]byte, 8) - counter := atomic.AddUint64(&p.counter, 1) - binary.BigEndian.PutUint64(seqno, counter) - return seqno -} - -type listPeerReq struct { - resp chan []peer.ID - topic string -} - -// sendReq is a request to call publishMessage. -// It is issued after message validation is done. -type sendReq struct { - from peer.ID - msg *Message -} - -// ListPeers returns a list of peers we are connected to. -func (p *PubSub) ListPeers(topic string) []peer.ID { - out := make(chan []peer.ID) - p.getPeers <- &listPeerReq{ - resp: out, - topic: topic, - } - return <-out -} - -// per topic validators -type addValReq struct { - topic string - validate Validator - timeout time.Duration - throttle int - resp chan error -} - -type rmValReq struct { - topic string - resp chan error -} - -type topicVal struct { - topic string - validate Validator - validateTimeout time.Duration - validateThrottle chan struct{} -} - -// Validator is a function that validates a message -type Validator func(context.Context, *Message) bool - -// ValidatorOpt is an option for RegisterTopicValidator -type ValidatorOpt func(addVal *addValReq) error - -// WithValidatorTimeout is an option that sets the topic validator timeout -func WithValidatorTimeout(timeout time.Duration) ValidatorOpt { - return func(addVal *addValReq) error { - addVal.timeout = timeout - return nil - } -} - -// WithValidatorConcurrency is an option that sets topic validator throttle -func WithValidatorConcurrency(n int) ValidatorOpt { - return func(addVal *addValReq) error { - addVal.throttle = n - return nil - } -} - -// RegisterTopicValidator registers a validator for topic -func (p *PubSub) RegisterTopicValidator(topic string, val Validator, opts ...ValidatorOpt) error { - addVal := &addValReq{ - topic: topic, - validate: val, - resp: make(chan error, 1), - } - - for _, opt := range opts { - err := opt(addVal) - if err != nil { - return err - } - } - - p.addVal <- addVal - return <-addVal.resp -} - -func (ps *PubSub) addValidator(req *addValReq) { - topic := req.topic - - _, ok := ps.topicVals[topic] - if ok { - req.resp <- fmt.Errorf("Duplicate validator for topic %s", topic) - return - } - - val := &topicVal{ - topic: topic, - validate: req.validate, - validateTimeout: defaultValidateTimeout, - validateThrottle: make(chan struct{}, defaultValidateConcurrency), - } - - if req.timeout > 0 { - val.validateTimeout = req.timeout - } - - if req.throttle > 0 { - val.validateThrottle = make(chan struct{}, req.throttle) - } - - ps.topicVals[topic] = val - req.resp <- nil -} - -// UnregisterTopicValidator removes a validator from a topic -// returns an error if there was no validator registered with the topic -func (p *PubSub) UnregisterTopicValidator(topic string) error { - rmVal := &rmValReq{ - topic: topic, - resp: make(chan error, 1), - } - - p.rmVal <- rmVal - return <-rmVal.resp -} - -func (ps *PubSub) rmValidator(req *rmValReq) { - topic := req.topic - - _, ok := ps.topicVals[topic] - if ok { - delete(ps.topicVals, topic) - req.resp <- nil - } else { - req.resp <- fmt.Errorf("No validator for topic %s", topic) - } -} - -func (val *topicVal) validateMsg(ctx context.Context, msg *Message) bool { - vctx, cancel := context.WithTimeout(ctx, val.validateTimeout) - defer cancel() - - valid := val.validate(vctx, msg) - if !valid { - log.Debugf("validation failed for topic %s", val.topic) - } - - return valid -} diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/sign.go b/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/sign.go deleted file mode 100644 index 98b57176e3..0000000000 --- a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/sign.go +++ /dev/null @@ -1,103 +0,0 @@ -package pubsub - -import ( - "fmt" - - pb "gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb" - - crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -const SignPrefix = "libp2p-pubsub:" - -func verifyMessageSignature(m *pb.Message) error { - pubk, err := messagePubKey(m) - if err != nil { - return err - } - - xm := *m - xm.Signature = nil - xm.Key = nil - bytes, err := xm.Marshal() - if err != nil { - return err - } - - bytes = withSignPrefix(bytes) - - valid, err := pubk.Verify(bytes, m.Signature) - if err != nil { - return err - } - - if !valid { - return fmt.Errorf("invalid signature") - } - - return nil -} - -func messagePubKey(m *pb.Message) (crypto.PubKey, error) { - var pubk crypto.PubKey - - pid, err := peer.IDFromBytes(m.From) - if err != nil { - return nil, err - } - - if m.Key == nil { - // no attached key, it must be extractable from the source ID - pubk, err = pid.ExtractPublicKey() - if err != nil { - return nil, fmt.Errorf("cannot extract signing key: %s", err.Error()) - } - if pubk == nil { - return nil, fmt.Errorf("cannot extract signing key") - } - } else { - pubk, err = crypto.UnmarshalPublicKey(m.Key) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal signing key: %s", err.Error()) - } - - // verify that the source ID matches the attached key - if !pid.MatchesPublicKey(pubk) { - return nil, fmt.Errorf("bad signing key; source ID %s doesn't match key", pid) - } - } - - return pubk, nil -} - -func signMessage(pid peer.ID, key crypto.PrivKey, m *pb.Message) error { - bytes, err := m.Marshal() - if err != nil { - return err - } - - bytes = withSignPrefix(bytes) - - sig, err := key.Sign(bytes) - if err != nil { - return err - } - - m.Signature = sig - - pk, _ := pid.ExtractPublicKey() - if pk == nil { - pubk, err := key.GetPublic().Bytes() - if err != nil { - return err - } - m.Key = pubk - } - - return nil -} - -func withSignPrefix(bytes []byte) []byte { - return append([]byte(SignPrefix), bytes...) -} diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/.travis.yml b/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/.travis.yml deleted file mode 100644 index 5f6ed69ee1..0000000000 --- a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -os: - - linux - - osx - -language: go -sudo: false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/addrs.go b/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/addrs.go deleted file mode 100644 index 810f994bdd..0000000000 --- a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/addrs.go +++ /dev/null @@ -1,73 +0,0 @@ -package websocket - -import ( - "fmt" - "net" - "net/url" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -// Addr is an implementation of net.Addr for WebSocket. -type Addr struct { - *url.URL -} - -var _ net.Addr = (*Addr)(nil) - -// Network returns the network type for a WebSocket, "websocket". -func (addr *Addr) Network() string { - return "websocket" -} - -// NewAddr creates a new Addr using the given host string -func NewAddr(host string) *Addr { - return &Addr{ - URL: &url.URL{ - Host: host, - }, - } -} - -func ConvertWebsocketMultiaddrToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { - _, host, err := manet.DialArgs(maddr) - if err != nil { - return nil, err - } - - return NewAddr(host), nil -} - -func ParseWebsocketNetAddr(a net.Addr) (ma.Multiaddr, error) { - wsa, ok := a.(*Addr) - if !ok { - return nil, fmt.Errorf("not a websocket address") - } - - tcpaddr, err := net.ResolveTCPAddr("tcp", wsa.Host) - if err != nil { - return nil, err - } - - tcpma, err := manet.FromNetAddr(tcpaddr) - if err != nil { - return nil, err - } - - wsma, err := ma.NewMultiaddr("/ws") - if err != nil { - return nil, err - } - - return tcpma.Encapsulate(wsma), nil -} - -func parseMultiaddr(a ma.Multiaddr) (string, error) { - _, host, err := manet.DialArgs(a) - if err != nil { - return "", err - } - - return "ws://" + host, nil -} diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/listener.go b/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/listener.go deleted file mode 100644 index 9e257c4079..0000000000 --- a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/listener.go +++ /dev/null @@ -1,86 +0,0 @@ -package websocket - -import ( - "context" - "fmt" - "net" - "net/http" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -type listener struct { - net.Listener - - laddr ma.Multiaddr - - closed chan struct{} - incoming chan *Conn -} - -func (l *listener) serve() { - defer close(l.closed) - http.Serve(l.Listener, l) -} - -func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) { - c, err := upgrader.Upgrade(w, r, nil) - if err != nil { - http.Error(w, "Failed to upgrade websocket", 400) - return - } - - ctx, cancel := context.WithCancel(context.Background()) - - var cnCh <-chan bool - if cn, ok := w.(http.CloseNotifier); ok { - cnCh = cn.CloseNotify() - } - - wscon := NewConn(c, cancel) - // Just to make sure. - defer wscon.Close() - - select { - case l.incoming <- wscon: - case <-l.closed: - c.Close() - return - case <-cnCh: - return - } - - // wait until conn gets closed, otherwise the handler closes it early - select { - case <-ctx.Done(): - case <-l.closed: - c.Close() - return - case <-cnCh: - return - } -} - -func (l *listener) Accept() (manet.Conn, error) { - select { - case c, ok := <-l.incoming: - if !ok { - return nil, fmt.Errorf("listener is closed") - } - - mnc, err := manet.WrapNetConn(c) - if err != nil { - c.Close() - return nil, err - } - - return mnc, nil - case <-l.closed: - return nil, fmt.Errorf("listener is closed") - } -} - -func (l *listener) Multiaddr() ma.Multiaddr { - return l.laddr -} diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/package.json b/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/package.json deleted file mode 100644 index 5b877bf73d..0000000000 --- a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-ws-transport/issues" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-ws-transport" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE", - "name": "mafmt", - "version": "1.2.8" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "gorilla", - "hash": "QmZH5VXfAJouGMyCCHTRPGCT3e5MG9Lu78Ln3YAYW1XTts", - "name": "websocket", - "version": "0.0.1" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc", - "name": "go-smux-multiplex", - "version": "3.0.16" - }, - { - "author": "steb", - "hash": "QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx", - "name": "go-libp2p-transport-upgrader", - "version": "0.1.16" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-ws-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.15" -} - diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/.travis.yml b/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/.travis.yml deleted file mode 100644 index ba01644e97..0000000000 --- a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - tip - - 1.6 - -script: - - go get github.com/whyrusleeping/gx - - go get github.com/whyrusleeping/gx-go - - gx --verbose install - - gx-go rewrite - - go test ./... - # - go test -race -cpu=5 ./... diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/Makefile b/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/Makefile deleted file mode 100644 index 03b2d8a0e8..0000000000 --- a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - -build: deps - go build ./... - -test: deps - go test ./... - -test_race: deps - go test -race -cpu 5 ./... - -gx-bins: - go get github.com/whyrusleeping/gx - go get github.com/whyrusleeping/gx-go - -deps: gx-bins - gx --verbose install --global - gx-go rewrite - -clean: gx-bins - gx-go rewrite --undo diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/muxer.go b/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/muxer.go deleted file mode 100644 index b9df2c514c..0000000000 --- a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/muxer.go +++ /dev/null @@ -1,45 +0,0 @@ -package streammux - -import ( - "io" - "net" - "time" -) - -// Stream is a bidirectional io pipe within a connection -type Stream interface { - io.Reader - io.Writer - io.Closer - - Reset() error - - SetDeadline(time.Time) error - SetReadDeadline(time.Time) error - SetWriteDeadline(time.Time) error -} - -// NoOpHandler do nothing. close streams as soon as they are opened. -var NoOpHandler = func(s Stream) { s.Close() } - -// Conn is a stream-multiplexing connection to a remote peer. -type Conn interface { - io.Closer - - // IsClosed returns whether a connection is fully closed, so it can - // be garbage collected. - IsClosed() bool - - // OpenStream creates a new stream. - OpenStream() (Stream, error) - - // AcceptStream accepts a stream opened by the other side. - AcceptStream() (Stream, error) -} - -// Transport constructs go-stream-muxer compatible connections. -type Transport interface { - - // NewConn constructs a new connection - NewConn(c net.Conn, isServer bool) (Conn, error) -} diff --git a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/package.json b/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/package.json deleted file mode 100644 index 0fc9c8cb62..0000000000 --- a/vendor/gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-stream-muxer" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-stream-muxer" - }, - "gxVersion": "0.7.0", - "language": "go", - "license": "", - "name": "go-stream-muxer", - "version": "3.0.0" -} - diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/.travis.yml b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/.travis.yml deleted file mode 100644 index ddf35b20bb..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -os: - - linux - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -sudo: false #docker containers for CI - -env: GOTFLAGS="-race -cpu 5" diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/README.md b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/README.md deleted file mode 100644 index 2da195ad6d..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# go-multicodec - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) -[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![Travis CI](https://img.shields.io/travis/multiformats/go-multicodec.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multicodec) -[![codecov.io](https://img.shields.io/codecov/c/github/multiformats/go-multicodec.svg?style=flat-square&branch=master)](https://codecov.io/github/multiformats/go-multicodec?branch=master) -[![GoDoc](https://godoc.org/github.com/multiformats/go-multicodec?status.svg)](https://godoc.org/github.com/multiformats/go-multicodec) - -> [multicodec](https://github.com/multiformats/multicodec) implementation in Go. - -### Supported codecs - -- `/cbor` -- `/json` -- `/msgio` -- `/msgpack` -- `/protobuf` - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Maintainers](#maintainers) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -go get github.com/multiformats/go-multicodec -``` - -## Usage - -Look at the Godocs: - -- https://godoc.org/github.com/multiformats/go-multicodec - -```go -import ( - "os" - "io" - - cbor "github.com/multiformats/go-multicodec/cbor" - json "github.com/multiformats/go-multicodec/json" -) - -func main() { - dec := cbor.Multicodec().Decoder(os.Stdin) - enc := json.Multicodec(false).Encoder(os.Stdout) - - for { - var item interface{} - - if err := dec.Decode(&item); err == io.EOF { - break - } else if err != nil { - panic(err) - } - - if err := enc.Encode(&item); err != nil { - panic(err) - } - } -} -``` - -## Maintainers - -Captain: [@jbenet](https://github.com/jbenet). - -## Contribute - -Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multicodec/issues). - -Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/b64/codec.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/b64/codec.go deleted file mode 100644 index e452ca9188..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/b64/codec.go +++ /dev/null @@ -1,64 +0,0 @@ -package b64 - -import ( - "encoding/base64" - "io" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - base "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base" -) - -var ( - HeaderPath = "/base64/" - Header = mc.Header([]byte(HeaderPath)) - multic = mc.NewMulticodecFromCodec(Codec(), Header) -) - -type codec struct{} - -type decoder struct { - r io.Reader -} - -func (d decoder) Decode(v interface{}) error { - out, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - - _, err := d.r.Read(out) - - return err -} - -func (codec) Decoder(r io.Reader) mc.Decoder { - return decoder{base64.NewDecoder(base64.StdEncoding, r)} -} - -type encoder struct { - w io.WriteCloser -} - -func (e encoder) Encode(v interface{}) error { - slice, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - _, err := e.w.Write(slice) - if err != nil { - return err - } - return e.w.Close() -} - -func (codec) Encoder(w io.Writer) mc.Encoder { - return encoder{base64.NewEncoder(base64.StdEncoding, w)} -} - -func Codec() mc.Codec { - return codec{} -} - -func Multicodec() mc.Multicodec { - return multic -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/bin/codec.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/bin/codec.go deleted file mode 100644 index 17a0171dec..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/bin/codec.go +++ /dev/null @@ -1,64 +0,0 @@ -package bin - -import ( - "io" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - base "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base" -) - -var ( - HeaderPath = "/bin/" - Header = mc.Header([]byte(HeaderPath)) - multic = mc.NewMulticodecFromCodec(Codec(), Header) -) - -type codec struct{} - -func (codec) Header() []byte { - return Header -} - -type decoder struct { - r io.Reader -} - -func (d decoder) Decode(v interface{}) error { - slice, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - - _, err := d.r.Read(slice) - return err -} - -func (codec) Decoder(r io.Reader) mc.Decoder { - return decoder{r} -} - -type encoder struct { - w io.Writer -} - -func (e encoder) Encode(v interface{}) error { - slice, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - - _, err := e.w.Write(slice) - return err -} - -func (codec) Encoder(w io.Writer) mc.Encoder { - return encoder{w} -} - -func Codec() mc.Codec { - return codec{} -} - -func Multicodec() mc.Multicodec { - return multic -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/hex/codec.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/hex/codec.go deleted file mode 100644 index 48bb956dfe..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/hex/codec.go +++ /dev/null @@ -1,69 +0,0 @@ -package bin - -import ( - "encoding/hex" - "io" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - base "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base" -) - -var ( - HeaderPath = "/base16/" - Header = mc.Header([]byte(HeaderPath)) - multic = mc.NewMulticodecFromCodec(Codec(), Header) -) - -type codec struct{} - -type decoder struct { - r io.Reader -} - -func (d decoder) Decode(v interface{}) error { - out, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - - buf := make([]byte, hex.EncodedLen(len(out))) - _, err := d.r.Read(buf) - if err != nil { - return err - } - _, err = hex.Decode(out, buf) - return err -} - -func (codec) Decoder(r io.Reader) mc.Decoder { - return decoder{r} -} - -type encoder struct { - w io.Writer -} - -func (e encoder) Encode(v interface{}) error { - slice, ok := v.([]byte) - if !ok { - return base.ErrExpectedByteSlice - } - - buf := make([]byte, hex.EncodedLen(len(slice))) - hex.Encode(buf, slice) - - _, err := e.w.Write(buf) - return err -} - -func (codec) Encoder(w io.Writer) mc.Encoder { - return encoder{w} -} - -func Codec() mc.Codec { - return codec{} -} - -func Multicodec() mc.Multicodec { - return multic -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/mux/mux.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/mux/mux.go deleted file mode 100644 index 19f928a08b..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/mux/mux.go +++ /dev/null @@ -1,20 +0,0 @@ -package basemux - -import ( - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - mux "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux" - - b64 "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/b64" - bin "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/bin" - hex "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/hex" -) - -func AllBasesMux() *mux.Multicodec { - m := mux.MuxMulticodec([]mc.Multicodec{ - hex.Multicodec(), - b64.Multicodec(), - bin.Multicodec(), - }, mux.SelectFirst) - m.Wrap = false - return m -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/json/json.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/json/json.go deleted file mode 100644 index cd88083841..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/json/json.go +++ /dev/null @@ -1,145 +0,0 @@ -package mc_json - -import ( - "bytes" - "encoding/json" - "io" - - msgio "gx/ipfs/QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf/go-msgio" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" -) - -var HeaderPath string -var Header []byte -var HeaderMsgioPath string -var HeaderMsgio []byte - -func init() { - HeaderPath = "/json" - HeaderMsgioPath = "/json/msgio" - Header = mc.Header([]byte(HeaderPath)) - HeaderMsgio = mc.Header([]byte(HeaderMsgioPath)) -} - -type codec struct { - mc bool - msgio bool -} - -func Codec(msgio bool) mc.Codec { - return &codec{mc: false, msgio: msgio} -} - -func Multicodec(msgio bool) mc.Multicodec { - return &codec{mc: true, msgio: msgio} -} - -func (c *codec) Encoder(w io.Writer) mc.Encoder { - buf := bytes.NewBuffer(nil) - return &encoder{ - w: w, - c: c, - buf: buf, - enc: json.NewEncoder(buf), - } -} - -func (c *codec) Decoder(r io.Reader) mc.Decoder { - return &decoder{ - r: r, - c: c, - } -} - -func (c *codec) Header() []byte { - if c.msgio { - return HeaderMsgio - } - return Header -} - -type encoder struct { - w io.Writer - c *codec - enc *json.Encoder - buf *bytes.Buffer -} - -type decoder struct { - r io.Reader - c *codec -} - -func (c *encoder) Encode(v interface{}) error { - defer c.buf.Reset() - w := c.w - - if c.c.mc { - // if multicodec, write the header first - if _, err := c.w.Write(c.c.Header()); err != nil { - return err - } - } - if c.c.msgio { - w = msgio.NewWriter(w) - } - - // recast to deal with map[interface{}]interface{} case - vr, err := recast(v) - if err != nil { - return err - } - - if err := c.enc.Encode(vr); err != nil { - return err - } - - _, err = io.Copy(w, c.buf) - return err -} - -func (c *decoder) Decode(v interface{}) error { - r := c.r - - if c.c.mc { - // if multicodec, consume the header first - if err := mc.ConsumeHeader(c.r, c.c.Header()); err != nil { - return err - } - } - if c.c.msgio { - // need to make a new one per read. - var err error - r, err = msgio.LimitedReader(c.r) - if err != nil { - return err - } - } - - return json.NewDecoder(r).Decode(v) -} - -func recast(v interface{}) (cv interface{}, err error) { - switch v.(type) { - case map[interface{}]interface{}: - vmi := v.(map[interface{}]interface{}) - vms := make(map[string]interface{}, len(vmi)) - for k, v2 := range vmi { - ks, ok := k.(string) - if !ok { - return v, mc.ErrType - } - - rv2, err := recast(v2) - if err != nil { - return v, err - } - - vms[ks] = rv2 - } - return vms, nil - default: - return v, nil // hope for the best. - } -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/all.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/all.go deleted file mode 100644 index 814fc988f7..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/all.go +++ /dev/null @@ -1,15 +0,0 @@ -package muxcodec - -import ( - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" - cbor "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/cbor" - json "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/json" -) - -func StandardMux() *Multicodec { - return MuxMulticodec([]mc.Multicodec{ - cbor.Multicodec(), - json.Multicodec(false), - json.Multicodec(true), - }, SelectFirst) -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/mux.go b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/mux.go deleted file mode 100644 index e8035a36a3..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/mux/mux.go +++ /dev/null @@ -1,120 +0,0 @@ -package muxcodec - -import ( - "bytes" - "fmt" - "io" - - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" -) - -var ( - ErrNoCodec = fmt.Errorf("no suitable codec") -) - -var Header []byte - -func init() { - Header = mc.Header([]byte("/multicodec")) -} - -// SelectCodec is a function that selects which codecs are able to -// marshal a given datastructure, and orders them (to be tried first). -type SelectCodec func(v interface{}, codecs []mc.Multicodec) mc.Multicodec - -// SelectFirst is the default SelectCodec function. selects the first -// codec given. -func SelectFirst(v interface{}, codecs []mc.Multicodec) mc.Multicodec { - return codecs[0] -} - -// MuxMulticodec returns a multicodec that muxes between given codecs. -// It uses the given SelectCodec function when marshaling, to select -// the best codec to use. -func MuxMulticodec(codecs []mc.Multicodec, sel SelectCodec) *Multicodec { - if sel == nil { - sel = SelectFirst - } - return &Multicodec{codecs, sel, true, nil} -} - -type Multicodec struct { - Codecs []mc.Multicodec // subcodecs to use - Select SelectCodec // pick a subcodec for encoding - Wrap bool // whether to wrap with own header - Last mc.Multicodec // the last subcodec used -} - -func (c *Multicodec) Encoder(w io.Writer) mc.Encoder { - return &encoder{w, c} -} - -func (c *Multicodec) Decoder(r io.Reader) mc.Decoder { - return &decoder{r, c} -} - -func (c *Multicodec) Header() []byte { - return Header -} - -type encoder struct { - w io.Writer - c *Multicodec -} - -type decoder struct { - r io.Reader - c *Multicodec -} - -func (c *encoder) Encode(v interface{}) error { - subc := c.c.Select(v, c.c.Codecs) - if subc == nil { - return ErrNoCodec - } - - if c.c.Wrap { // write multicodec header. - if _, err := c.w.Write(c.c.Header()); err != nil { - return err - } - } - - c.c.Last = subc - return subc.Encoder(c.w).Encode(v) -} - -func (c *decoder) Decode(v interface{}) error { - if c.c.Wrap { // read multicodec header. - if err := mc.ConsumeHeader(c.r, c.c.Header()); err != nil { - return err - } - } - - // get next header, to select codec - hdr, err := mc.ReadHeader(c.r) - if err != nil { - return err - } - - // "unwind" the read as subc consumes header - r := mc.WrapHeaderReader(hdr, c.r) - - subc := CodecWithHeader(hdr, c.c.Codecs) - if subc == nil { - return fmt.Errorf("no codec for %s", hdr) - } - - c.c.Last = subc - return subc.Decoder(r).Decode(v) -} - -func CodecWithHeader(hdr []byte, codecs []mc.Multicodec) mc.Multicodec { - // we'll look through the list. should be small. - // if huge, consider a map. - for _, c := range codecs { - if bytes.Equal(hdr, c.Header()) { - return c - } - } - return nil -} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/package.json b/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/package.json deleted file mode 100644 index 7f56abf24b..0000000000 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "author": "multiformats", - "bugs": { - "url": "https://github.com/multiformats/go-multicodec/issues" - }, - "gx": { - "dvcsimport": "github.com/multiformats/go-multicodec" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf", - "name": "go-msgio", - "version": "0.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd", - "name": "cbor", - "version": "0.2.3" - }, - { - "author": "ugorji", - "hash": "QmVTAmbCaPqdfbmpWDCJMQNFxbyJoG2USFsumXmTWY5LFp", - "name": "go-codec", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "MIT", - "name": "go-multicodec", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.7" -} - diff --git a/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/.travis.yml b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/.travis.yml new file mode 100644 index 0000000000..84756a1052 --- /dev/null +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/.travis.yml @@ -0,0 +1,20 @@ +os: + - linux + - osx + +language: go + +sudo: false + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/LICENSE b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/LICENSE rename to vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/LICENSE diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/Makefile b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/Makefile similarity index 100% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/Makefile rename to vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/Makefile diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/README.md b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/README.md similarity index 100% rename from vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/README.md rename to vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/README.md diff --git a/vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/codecov.yml b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmY4Q5JC4vxLEi8EpVxJM4rcRryEVtH1zRKVTAm6BKV1pg/go-libp2p-pnet/codecov.yml rename to vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/codecov.yml diff --git a/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/package.json b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/package.json new file mode 100644 index 0000000000..a9b6b699d6 --- /dev/null +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/package.json @@ -0,0 +1,36 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-peer" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-peer" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "mr-tron", + "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", + "name": "go-base58-fast", + "version": "0.1.1" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-peer", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.1.2" +} + diff --git a/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer.go b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer.go new file mode 100644 index 0000000000..46d494925a --- /dev/null +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer.go @@ -0,0 +1,230 @@ +// Package peer implements an object used to represent peers in the ipfs network. +package peer + +import ( + "encoding/hex" + "errors" + "fmt" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +var ( + // ErrEmptyPeerID is an error for empty peer ID. + ErrEmptyPeerID = errors.New("empty peer ID") + // ErrNoPublicKey is an error for peer IDs that don't embed public keys + ErrNoPublicKey = errors.New("public key is not embedded in peer ID") +) + +// AdvancedEnableInlining enables automatically inlining keys shorter than +// 42 bytes into the peer ID (using the "identity" multihash function). +// +// WARNING: This flag will likely be set to false in the future and eventually +// be removed in favor of using a hash function specified by the key itself. +// See: https://github.com/libp2p/specs/issues/138 +// +// DO NOT change this flag unless you know what you're doing. +// +// This currently defaults to true for backwards compatibility but will likely +// be set to false by default when an upgrade path is determined. +var AdvancedEnableInlining = true + +const maxInlineKeyLength = 42 + +// ID is a libp2p peer identity. +type ID string + +// Pretty returns a b58-encoded string of the ID +func (id ID) Pretty() string { + return IDB58Encode(id) +} + +// Loggable returns a pretty peerID string in loggable JSON format +func (id ID) Loggable() map[string]interface{} { + return map[string]interface{}{ + "peerID": id.Pretty(), + } +} + +// String prints out the peer. +// +// TODO(brian): ensure correctness at ID generation and +// enforce this by only exposing functions that generate +// IDs safely. Then any peer.ID type found in the +// codebase is known to be correct. +func (id ID) String() string { + pid := id.Pretty() + if len(pid) <= 10 { + return fmt.Sprintf("", pid) + } + return fmt.Sprintf("", pid[:2], pid[len(pid)-6:]) +} + +// MatchesPrivateKey tests whether this ID was derived from sk +func (id ID) MatchesPrivateKey(sk ic.PrivKey) bool { + return id.MatchesPublicKey(sk.GetPublic()) +} + +// MatchesPublicKey tests whether this ID was derived from pk +// OpenBazaar: test both inline and and hashes pubkeys. +func (id ID) MatchesPublicKey(pk ic.PubKey) bool { + oid, err := IDFromPublicKey(pk) + if err != nil { + return false + } + iid, err := InlineIDFromPublicKey(pk) + if err != nil { + return false + } + return oid == id || iid == id +} + +// ExtractPublicKey attempts to extract the public key from an ID +// +// This method returns ErrNoPublicKey if the peer ID looks valid but it can't extract +// the public key. +func (id ID) ExtractPublicKey() (ic.PubKey, error) { + decoded, err := mh.Decode([]byte(id)) + if err != nil { + return nil, err + } + if decoded.Code != mh.ID { + return nil, ErrNoPublicKey + } + pk, err := ic.UnmarshalPublicKey(decoded.Digest) + if err != nil { + return nil, err + } + return pk, nil +} + +// Validate check if ID is empty or not +func (id ID) Validate() error { + if id == ID("") { + return ErrEmptyPeerID + } + + return nil +} + +// IDFromString cast a string to ID type, and validate +// the id to make sure it is a multihash. +func IDFromString(s string) (ID, error) { + if _, err := mh.Cast([]byte(s)); err != nil { + return ID(""), err + } + return ID(s), nil +} + +// IDFromBytes cast a string to ID type, and validate +// the id to make sure it is a multihash. +func IDFromBytes(b []byte) (ID, error) { + if _, err := mh.Cast(b); err != nil { + return ID(""), err + } + return ID(b), nil +} + +// IDB58Decode returns a b58-decoded Peer +func IDB58Decode(s string) (ID, error) { + m, err := mh.FromB58String(s) + if err != nil { + return "", err + } + return ID(m), err +} + +// IDB58Encode returns b58-encoded string +func IDB58Encode(id ID) string { + return b58.Encode([]byte(id)) +} + +// IDHexDecode returns a hex-decoded Peer +func IDHexDecode(s string) (ID, error) { + m, err := mh.FromHexString(s) + if err != nil { + return "", err + } + return ID(m), err +} + +// IDHexEncode returns hex-encoded string +func IDHexEncode(id ID) string { + return hex.EncodeToString([]byte(id)) +} + +// IDFromPublicKey returns the Peer ID corresponding to pk +func IDFromPublicKey(pk ic.PubKey) (ID, error) { + b, err := pk.Bytes() + if err != nil { + return "", err + } + var alg uint64 = mh.SHA2_256 + if AdvancedEnableInlining && len(b) <= maxInlineKeyLength { + alg = mh.ID + } + // OpenBazaar: handle the Sum error + hash, err := mh.Sum(b, alg, -1) + if err != nil { + return "", err + } + return ID(hash), nil +} + +// HashedIDFromPublicKey will always return the SHA256 hash of +// the pubkey bytes. +// OpenBazaar: temporary helper to isolate the +// hash-producing ID behavior. +func HashedIDFromPublicKey(pk ic.PubKey) (ID, error) { + b, err := pk.Bytes() + if err != nil { + return "", err + } + hash, err := mh.Sum(b, mh.SHA2_256, -1) + if err != nil { + return "", err + } + return ID(hash), nil +} + +// InlineIDFromPublicKey will always return the new inline ID format +// of the pubkey bytes. +// OpenBazaar: temporary helper function to +// remain forward compatible with inline keys +func InlineIDFromPublicKey(pk ic.PubKey) (ID, error) { + b, err := pk.Bytes() + if err != nil { + return "", err + } + hash, err := mh.Sum(b, mh.SHA2_256, -1) + if err != nil { + return "", err + } + return ID(hash), nil +} + +// AlternativeIDFromPublicKey returns SHA256 hash ID when AdvancedEnableInlining +// is true, and returns new InlineID otherwise. +// OpenBazaar: This allows legacy IDs +// to be compared after they are no longer available by the default IDFromPublicKey +// function. +func AlternativeIDFromPublicKey(pubkey ic.PubKey) (ID, error) { + if AdvancedEnableInlining { + return HashedIDFromPublicKey(pubkey) + } + return InlineIDFromPublicKey(pubkey) +} + +// IDFromPrivateKey returns the Peer ID corresponding to sk +func IDFromPrivateKey(sk ic.PrivKey) (ID, error) { + return IDFromPublicKey(sk.GetPublic()) +} + +// IDSlice for sorting peers +type IDSlice []ID + +func (es IDSlice) Len() int { return len(es) } +func (es IDSlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } +func (es IDSlice) Less(i, j int) bool { return string(es[i]) < string(es[j]) } diff --git a/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer_serde.go b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer_serde.go new file mode 100644 index 0000000000..7f1b3e6a65 --- /dev/null +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peer_serde.go @@ -0,0 +1,75 @@ +// This file contains Protobuf and JSON serialization/deserialization methods for peer IDs. +package peer + +import ( + "encoding" + "encoding/json" +) + +// Interface assertions commented out to avoid introducing hard dependencies to protobuf. +// var _ proto.Marshaler = (*ID)(nil) +// var _ proto.Unmarshaler = (*ID)(nil) +var _ json.Marshaler = (*ID)(nil) +var _ json.Unmarshaler = (*ID)(nil) + +var _ encoding.BinaryMarshaler = (*ID)(nil) +var _ encoding.BinaryUnmarshaler = (*ID)(nil) +var _ encoding.TextMarshaler = (*ID)(nil) +var _ encoding.TextUnmarshaler = (*ID)(nil) + +func (id ID) Marshal() ([]byte, error) { + return []byte(id), nil +} + +// BinaryMarshal returns the byte representation of the peer ID. +func (id ID) MarshalBinary() ([]byte, error) { + return id.Marshal() +} + +func (id ID) MarshalTo(data []byte) (n int, err error) { + return copy(data, []byte(id)), nil +} + +func (id *ID) Unmarshal(data []byte) (err error) { + *id, err = IDFromBytes(data) + return err +} + +// BinaryUnmarshal sets the ID from its binary representation. +func (id *ID) UnmarshalBinary(data []byte) error { + return id.Unmarshal(data) +} + +// Implements Gogo's proto.Sizer, but we omit the compile-time assertion to avoid introducing a hard +// dependency on gogo. +func (id ID) Size() int { + return len([]byte(id)) +} + +func (id ID) MarshalJSON() ([]byte, error) { + return json.Marshal(IDB58Encode(id)) +} + +func (id *ID) UnmarshalJSON(data []byte) (err error) { + var v string + if err = json.Unmarshal(data, &v); err != nil { + return err + } + *id, err = IDB58Decode(v) + return err +} + +// TextMarshal returns the text encoding of the ID. +func (id ID) MarshalText() ([]byte, error) { + return []byte(IDB58Encode(id)), nil +} + +// TextUnmarshal restores the ID from its text encoding. +func (id *ID) UnmarshalText(data []byte) error { + pid, err := IDB58Decode(string(data)) + if err != nil { + return err + } + *id = pid + return nil +} diff --git a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset/peerset.go b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset/peerset.go similarity index 95% rename from vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset/peerset.go rename to vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset/peerset.go index 3572e02a8a..6d8214376c 100644 --- a/vendor/gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer/peerset/peerset.go +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset/peerset.go @@ -3,7 +3,7 @@ package peerset import ( "sync" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // PeerSet is a threadsafe set of peers diff --git a/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/test/utils.go b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/test/utils.go new file mode 100644 index 0000000000..4e48fe8a99 --- /dev/null +++ b/vendor/gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/test/utils.go @@ -0,0 +1,39 @@ +package testutil + +import ( + "io" + "math/rand" + "sync/atomic" + "time" + + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +var generatedPairs int64 = 0 + +func RandPeerID() (peer.ID, error) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + buf := make([]byte, 16) + if _, err := io.ReadFull(r, buf); err != nil { + return "", err + } + h, _ := mh.Sum(buf, mh.SHA2_256, -1) + return peer.ID(h), nil +} + +func RandTestKeyPair(bits int) (ci.PrivKey, ci.PubKey, error) { + seed := time.Now().UnixNano() + + // workaround for low time resolution + seed += atomic.AddInt64(&generatedPairs, 1) << 32 + + r := rand.New(rand.NewSource(seed)) + return ci.GenerateKeyPairWithReader(ci.RSA, bits, r) +} + +func SeededTestKeyPair(seed int64) (ci.PrivKey, ci.PubKey, error) { + r := rand.New(rand.NewSource(seed)) + return ci.GenerateKeyPairWithReader(ci.RSA, 512, r) +} diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/.travis.yml b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/.travis.yml rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/.travis.yml diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/LICENSE b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/LICENSE rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/LICENSE diff --git a/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/README.md b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/README.md new file mode 100644 index 0000000000..1295df70e4 --- /dev/null +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/README.md @@ -0,0 +1,177 @@ +# Terminal progress bar for Go + +Simple progress bar for console programs. + +Please check the new version https://github.com/cheggaaa/pb/tree/v2 (currently, it's beta) + +## Installation + +``` +go get gopkg.in/cheggaaa/pb.v1 +``` + +## Usage + +```Go +package main + +import ( + "gopkg.in/cheggaaa/pb.v1" + "time" +) + +func main() { + count := 100000 + bar := pb.StartNew(count) + for i := 0; i < count; i++ { + bar.Increment() + time.Sleep(time.Millisecond) + } + bar.FinishPrint("The End!") +} + +``` + +Result will be like this: + +``` +> go run test.go +37158 / 100000 [================>_______________________________] 37.16% 1m11s +``` + +## Customization + +```Go +// create bar +bar := pb.New(count) + +// refresh info every second (default 200ms) +bar.SetRefreshRate(time.Second) + +// show percents (by default already true) +bar.ShowPercent = true + +// show bar (by default already true) +bar.ShowBar = true + +// no counters +bar.ShowCounters = false + +// show "time left" +bar.ShowTimeLeft = true + +// show average speed +bar.ShowSpeed = true + +// sets the width of the progress bar +bar.SetWidth(80) + +// sets the width of the progress bar, but if terminal size smaller will be ignored +bar.SetMaxWidth(80) + +// convert output to readable format (like KB, MB) +bar.SetUnits(pb.U_BYTES) + +// and start +bar.Start() +``` + +## Progress bar for IO Operations + +```go +// create and start bar +bar := pb.New(myDataLen).SetUnits(pb.U_BYTES) +bar.Start() + +// my io.Reader +r := myReader + +// my io.Writer +w := myWriter + +// create proxy reader +reader := bar.NewProxyReader(r) + +// and copy from pb reader +io.Copy(w, reader) + +``` + +```go +// create and start bar +bar := pb.New(myDataLen).SetUnits(pb.U_BYTES) +bar.Start() + +// my io.Reader +r := myReader + +// my io.Writer +w := myWriter + +// create multi writer +writer := io.MultiWriter(w, bar) + +// and copy +io.Copy(writer, r) + +bar.Finish() +``` + +## Custom Progress Bar Look-and-feel + +```go +bar.Format("<.- >") +``` + +## Multiple Progress Bars (experimental and unstable) + +Do not print to terminal while pool is active. + +```go +package main + +import ( + "math/rand" + "sync" + "time" + + "gopkg.in/cheggaaa/pb.v1" +) + +func main() { + // create bars + first := pb.New(200).Prefix("First ") + second := pb.New(200).Prefix("Second ") + third := pb.New(200).Prefix("Third ") + // start pool + pool, err := pb.StartPool(first, second, third) + if err != nil { + panic(err) + } + // update bars + wg := new(sync.WaitGroup) + for _, bar := range []*pb.ProgressBar{first, second, third} { + wg.Add(1) + go func(cb *pb.ProgressBar) { + for n := 0; n < 200; n++ { + cb.Increment() + time.Sleep(time.Millisecond * time.Duration(rand.Intn(100))) + } + cb.Finish() + wg.Done() + }(bar) + } + wg.Wait() + // close pool + pool.Stop() +} +``` + +The result will be as follows: + +``` +$ go run example/multiple.go +First 34 / 200 [=========>---------------------------------------------] 17.00% 00m08s +Second 42 / 200 [===========>------------------------------------------] 21.00% 00m06s +Third 36 / 200 [=========>---------------------------------------------] 18.00% 00m08s +``` diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/format.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/format.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/format.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/format.go diff --git a/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/package.json b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/package.json new file mode 100644 index 0000000000..6c95882ade --- /dev/null +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/package.json @@ -0,0 +1,36 @@ +{ + "author": "cheggaaa", + "bugs": { + "url": "https://github.com/cheggaaa/pb/issues" + }, + "gx": { + "dvcsimport": "github.com/cheggaaa/pb" + }, + "gxDependencies": [ + { + "author": "mattn", + "hash": "QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq", + "name": "go-colorable", + "version": "0.2.0" + }, + { + "author": "mattn", + "hash": "QmNu2sEu7LuoBQbnSoy8u6wk6oWwFX8L5nVVUZoK7J67oQ", + "name": "go-runewidth", + "version": "0.0.1" + }, + { + "author": "fatih", + "hash": "QmWsJXti4Nft4vXR8brjG2fJCUDWeJpwNVngyU42pByJxN", + "name": "color", + "version": "0.0.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "BSD-3-Clause", + "name": "pb", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.0" +} + diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb.go similarity index 99% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb.go index 8289ab0fb3..e03291b896 100644 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb.go +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb.go @@ -13,7 +13,7 @@ import ( ) // Current version -const Version = "1.0.25" +const Version = "1.0.27" const ( // Default refresh rate - 200ms @@ -159,12 +159,16 @@ func (pb *ProgressBar) Add64(add int64) int64 { // Set prefix string func (pb *ProgressBar) Prefix(prefix string) *ProgressBar { + pb.mu.Lock() + defer pb.mu.Unlock() pb.prefix = prefix return pb } // Set postfix string func (pb *ProgressBar) Postfix(postfix string) *ProgressBar { + pb.mu.Lock() + defer pb.mu.Unlock() pb.postfix = postfix return pb } @@ -273,6 +277,8 @@ func (pb *ProgressBar) NewProxyReader(r io.Reader) *Reader { } func (pb *ProgressBar) write(total, current int64) { + pb.mu.Lock() + defer pb.mu.Unlock() width := pb.GetWidth() var percentBox, countersBox, timeLeftBox, timeSpentBox, speedBox, barBox, end, out string @@ -300,12 +306,10 @@ func (pb *ProgressBar) write(total, current int64) { } // time left - pb.mu.Lock() currentFromStart := current - pb.startValue fromStart := time.Now().Sub(pb.startTime) lastChangeTime := pb.changeTime fromChange := lastChangeTime.Sub(pb.startTime) - pb.mu.Unlock() if pb.ShowElapsedTime { timeSpentBox = fmt.Sprintf(" %s ", (fromStart/time.Second)*time.Second) @@ -394,13 +398,12 @@ func (pb *ProgressBar) write(total, current int64) { // check len out = pb.prefix + timeSpentBox + countersBox + barBox + percentBox + speedBox + timeLeftBox + pb.postfix + if cl := escapeAwareRuneCountInString(out); cl < width { end = strings.Repeat(" ", width-cl) } // and print! - pb.mu.Lock() - defer pb.mu.Unlock() pb.lastPrint = out + end isFinish := pb.isFinish diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_appengine.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_appengine.go similarity index 91% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_appengine.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_appengine.go index d85dbc3b2b..17168f39a6 100644 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_appengine.go +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_appengine.go @@ -1,4 +1,4 @@ -// +build appengine +// +build appengine js package pb diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_win.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_win.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pb_win.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_win.go diff --git a/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_x.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_x.go new file mode 100644 index 0000000000..57beeaea8f --- /dev/null +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pb_x.go @@ -0,0 +1,118 @@ +// +build linux darwin freebsd netbsd openbsd solaris dragonfly +// +build !appengine !js + +package pb + +import ( + "errors" + "fmt" + "os" + "os/signal" + "sync" + "syscall" + + "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" +) + +var ErrPoolWasStarted = errors.New("Bar pool was started") + +var ( + echoLockMutex sync.Mutex + origTermStatePtr *unix.Termios + tty *os.File + istty bool +) + +func init() { + echoLockMutex.Lock() + defer echoLockMutex.Unlock() + + var err error + tty, err = os.Open("/dev/tty") + istty = true + if err != nil { + tty = os.Stdin + istty = false + } +} + +// terminalWidth returns width of the terminal. +func terminalWidth() (int, error) { + if !istty { + return 0, errors.New("Not Supported") + } + echoLockMutex.Lock() + defer echoLockMutex.Unlock() + + fd := int(tty.Fd()) + + ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) + if err != nil { + return 0, err + } + + return int(ws.Col), nil +} + +func lockEcho() (shutdownCh chan struct{}, err error) { + echoLockMutex.Lock() + defer echoLockMutex.Unlock() + if istty { + if origTermStatePtr != nil { + return shutdownCh, ErrPoolWasStarted + } + + fd := int(tty.Fd()) + + origTermStatePtr, err = unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { + return nil, fmt.Errorf("Can't get terminal settings: %v", err) + } + + oldTermios := *origTermStatePtr + newTermios := oldTermios + newTermios.Lflag &^= syscall.ECHO + newTermios.Lflag |= syscall.ICANON | syscall.ISIG + newTermios.Iflag |= syscall.ICRNL + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newTermios); err != nil { + return nil, fmt.Errorf("Can't set terminal settings: %v", err) + } + + } + shutdownCh = make(chan struct{}) + go catchTerminate(shutdownCh) + return +} + +func unlockEcho() error { + echoLockMutex.Lock() + defer echoLockMutex.Unlock() + if istty { + if origTermStatePtr == nil { + return nil + } + + fd := int(tty.Fd()) + + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, origTermStatePtr); err != nil { + return fmt.Errorf("Can't set terminal settings: %v", err) + } + + } + origTermStatePtr = nil + + return nil +} + +// listen exit signals and restore terminal state +func catchTerminate(shutdownCh chan struct{}) { + sig := make(chan os.Signal, 1) + signal.Notify(sig, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGKILL) + defer signal.Stop(sig) + select { + case <-shutdownCh: + unlockEcho() + case <-sig: + unlockEcho() + } +} diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool.go similarity index 97% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool.go index f44baa01fc..392e7599c5 100644 --- a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool.go +++ b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool.go @@ -90,7 +90,9 @@ func (p *Pool) writer() { // Restore terminal state and close pool func (p *Pool) Stop() error { p.finishOnce.Do(func() { - close(p.shutdownCh) + if p.shutdownCh != nil { + close(p.shutdownCh) + } }) // Wait for the worker to complete diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool_win.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool_win.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool_win.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool_win.go diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool_x.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool_x.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/pool_x.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/pool_x.go diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/reader.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/reader.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/reader.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/reader.go diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/runecount.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/runecount.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/runecount.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/runecount.go diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/termios_bsd.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/termios_bsd.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/termios_bsd.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/termios_bsd.go diff --git a/vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/termios_sysv.go b/vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/termios_sysv.go similarity index 100% rename from vendor/gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb/termios_sysv.go rename to vendor/gx/ipfs/QmYWB8oH6o7qftxoyqTTZhzLrhKCVT7NYahECQTwTtqbgj/pb/termios_sysv.go diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/.travis.yml b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/.travis.yml rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/.travis.yml diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/LICENSE b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/LICENSE rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/LICENSE diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/Makefile b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/Makefile similarity index 100% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/Makefile rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/Makefile diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/README.md b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/README.md similarity index 100% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/README.md rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/README.md diff --git a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks.go b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/blocks.go similarity index 91% rename from vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks.go rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/blocks.go index 106a93d0aa..b3d4dd0368 100644 --- a/vendor/gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format/blocks.go +++ b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/blocks.go @@ -7,9 +7,9 @@ import ( "errors" "fmt" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // ErrWrongHash is returned when the Cid of a block is not the expected diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/codecov.yml b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/codecov.yml rename to vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/codecov.yml diff --git a/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/package.json b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/package.json new file mode 100644 index 0000000000..970ac559b1 --- /dev/null +++ b/vendor/gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format/package.json @@ -0,0 +1,36 @@ +{ + "author": "stebalien", + "bugs": { + "url": "https://github.com/ipfs/go-block-format" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-block-format" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "", + "name": "go-block-format", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.2" +} + diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/.travis.yml b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/.travis.yml rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/.travis.yml diff --git a/vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/LICENSE b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help/LICENSE rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/LICENSE diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/Makefile b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/Makefile similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/Makefile rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/Makefile diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/README.md b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/README.md similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/README.md rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/README.md diff --git a/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/package.json b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/package.json new file mode 100644 index 0000000000..d53c0e7b79 --- /dev/null +++ b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/package.json @@ -0,0 +1,47 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-chunker" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-chunker" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmZooytqEoUwQjv7KzH4d3xyJnyvD3AWJaCDMYt5pbCtua", + "name": "chunker", + "version": "0.0.1" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "Stebalien", + "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", + "name": "go-buffer-pool", + "version": "0.1.3" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipfs-chunker", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.6" +} + diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/parse.go b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/parse.go similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/parse.go rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/parse.go diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/rabin.go b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/rabin.go similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/rabin.go rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/rabin.go diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/splitting.go b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/splitting.go similarity index 97% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/splitting.go rename to vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/splitting.go index 87da263457..4a984bebbd 100644 --- a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/splitting.go +++ b/vendor/gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker/splitting.go @@ -8,7 +8,7 @@ import ( "io" pool "gx/ipfs/QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa/go-buffer-pool" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("chunk") diff --git a/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/.travis.yml b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/.travis.yml new file mode 100644 index 0000000000..c9285beae0 --- /dev/null +++ b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/LICENSE b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/LICENSE rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/LICENSE diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/Makefile b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/Makefile similarity index 100% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/Makefile rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/Makefile diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/README.md b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/README.md similarity index 100% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/README.md rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/README.md diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/codecov.yml b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/codecov.yml rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/codecov.yml diff --git a/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/helpers.go b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/helpers.go new file mode 100644 index 0000000000..af49935d66 --- /dev/null +++ b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/helpers.go @@ -0,0 +1,11 @@ +package host + +import pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + +// PeerInfoFromHost returns a PeerInfo struct with the Host's ID and all of its Addrs. +func PeerInfoFromHost(h Host) *pstore.PeerInfo { + return &pstore.PeerInfo{ + ID: h.ID(), + Addrs: h.Addrs(), + } +} diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/host.go b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/host.go similarity index 87% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/host.go rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/host.go index b91a3957f2..a4f7de8e53 100644 --- a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/host.go +++ b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/host.go @@ -3,12 +3,12 @@ package host import ( "context" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" msmux "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" ) diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/match.go b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/match.go similarity index 100% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/match.go rename to vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/match.go diff --git a/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/package.json b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/package.json new file mode 100644 index 0000000000..c242c30d9d --- /dev/null +++ b/vendor/gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host/package.json @@ -0,0 +1,66 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-host" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-host" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmcrrEpx3VMUbrbgVroH3YiYyUS5c4YAykzyPJWKspUYLa", + "name": "go-semver", + "version": "0.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "why", + "hash": "QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd", + "name": "go-libp2p-interface-connmgr", + "version": "0.0.32" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "", + "name": "go-libp2p-host", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.0.26" +} + diff --git a/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/README.md b/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/README.md similarity index 100% rename from vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/README.md rename to vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/README.md diff --git a/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/onion_transport.go b/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/onion_transport.go similarity index 94% rename from vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/onion_transport.go rename to vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/onion_transport.go index b99b1c8f29..74baf73b78 100644 --- a/vendor/gx/ipfs/QmVSfWChGxC5AkUhM6ZyZxbcBmZoPrUmrPuW6BnHU3YDA9/go-onion-transport/onion_transport.go +++ b/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/onion_transport.go @@ -6,7 +6,7 @@ import ( "encoding/base32" "encoding/pem" "fmt" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" "io/ioutil" "net" "os" @@ -18,13 +18,15 @@ import ( "github.com/yawning/bulb/utils/pkcs1" "golang.org/x/net/proxy" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" + "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" ) +var TorDialer proxy.Dialer + // IsValidOnionMultiAddr is used to validate that a multiaddr // is representing a Tor onion service func IsValidOnionMultiAddr(a ma.Multiaddr) bool { @@ -69,8 +71,6 @@ func IsValidOnionMultiAddr(a ma.Multiaddr) bool { return true } -var TorDialer proxy.Dialer - // OnionTransport implements go-libp2p-transport's Transport interface type OnionTransport struct { controlConn *bulb.Conn @@ -118,7 +118,13 @@ func NewOnionTransport(controlNet, controlAddr, controlPass string, auth *proxy. return nil, err } o.keys = keys - TorDialer, _ = o.controlConn.Dialer(o.auth) + + dialer, err := conn.Dialer(auth) + if err != nil { + return nil, err + } + TorDialer = dialer + return &o, nil } diff --git a/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/package.json b/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/package.json new file mode 100644 index 0000000000..10fcb9bef0 --- /dev/null +++ b/vendor/gx/ipfs/QmYv2MbwHn7qcvAPFisZ94w85crQVpwUuv8G7TuUeBnfPb/go-onion-transport/package.json @@ -0,0 +1,45 @@ +{ + "author": "chris", + "bugs": { + "url": "https://github.com/OpenBazaar/go-onion-transport" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + } + ], + "gxVersion": "0.11.0", + "language": "English", + "license": "", + "name": "go-onion-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.1" +} + diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/.travis.yml b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/.travis.yml rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/.travis.yml diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/LICENSE b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/LICENSE rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/LICENSE diff --git a/vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/Makefile b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/Makefile similarity index 100% rename from vendor/gx/ipfs/QmY1y2M1aCcVhy8UuTbZJBvuFbegZm47f9cDAdgxiehQfx/go-libp2p-kad-dht/Makefile rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/Makefile diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/README.md b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/README.md similarity index 100% rename from vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/README.md rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/README.md diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/codecov.yml b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/codecov.yml similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/codecov.yml rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/codecov.yml diff --git a/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications/query.go b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications/query.go new file mode 100644 index 0000000000..2efb9c88ec --- /dev/null +++ b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications/query.go @@ -0,0 +1,121 @@ +package notifications + +import ( + "context" + "encoding/json" + "sync" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +type QueryEventType int + +// Number of events to buffer. +var QueryEventBufferSize = 16 + +const ( + SendingQuery QueryEventType = iota + PeerResponse + FinalPeer + QueryError + Provider + Value + AddingPeer + DialingPeer +) + +type QueryEvent struct { + ID peer.ID + Type QueryEventType + Responses []*pstore.PeerInfo + Extra string +} + +type routingQueryKey struct{} +type eventChannel struct { + mu sync.Mutex + ctx context.Context + ch chan<- *QueryEvent +} + +// waitThenClose is spawned in a goroutine when the channel is registered. This +// safely cleans up the channel when the context has been canceled. +func (e *eventChannel) waitThenClose() { + <-e.ctx.Done() + e.mu.Lock() + close(e.ch) + // 1. Signals that we're done. + // 2. Frees memory (in case we end up hanging on to this for a while). + e.ch = nil + e.mu.Unlock() +} + +// send sends an event on the event channel, aborting if either the passed or +// the internal context expire. +func (e *eventChannel) send(ctx context.Context, ev *QueryEvent) { + e.mu.Lock() + // Closed. + if e.ch == nil { + e.mu.Unlock() + return + } + // in case the passed context is unrelated, wait on both. + select { + case e.ch <- ev: + case <-e.ctx.Done(): + case <-ctx.Done(): + } + e.mu.Unlock() +} + +func RegisterForQueryEvents(ctx context.Context) (context.Context, <-chan *QueryEvent) { + ch := make(chan *QueryEvent, QueryEventBufferSize) + ech := &eventChannel{ch: ch, ctx: ctx} + go ech.waitThenClose() + return context.WithValue(ctx, routingQueryKey{}, ech), ch +} + +func PublishQueryEvent(ctx context.Context, ev *QueryEvent) { + ich := ctx.Value(routingQueryKey{}) + if ich == nil { + return + } + + // We *want* to panic here. + ech := ich.(*eventChannel) + ech.send(ctx, ev) +} + +func (qe *QueryEvent) MarshalJSON() ([]byte, error) { + return json.Marshal(map[string]interface{}{ + "ID": peer.IDB58Encode(qe.ID), + "Type": int(qe.Type), + "Responses": qe.Responses, + "Extra": qe.Extra, + }) +} + +func (qe *QueryEvent) UnmarshalJSON(b []byte) error { + temp := struct { + ID string + Type int + Responses []*pstore.PeerInfo + Extra string + }{} + err := json.Unmarshal(b, &temp) + if err != nil { + return err + } + if len(temp.ID) > 0 { + pid, err := peer.IDB58Decode(temp.ID) + if err != nil { + return err + } + qe.ID = pid + } + qe.Type = QueryEventType(temp.Type) + qe.Responses = temp.Responses + qe.Extra = temp.Extra + return nil +} diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options/options.go b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options/options.go similarity index 100% rename from vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options/options.go rename to vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options/options.go diff --git a/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/package.json b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/package.json new file mode 100644 index 0000000000..da12cf8cc0 --- /dev/null +++ b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/package.json @@ -0,0 +1,42 @@ +{ + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-routing" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-routing", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-routing", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.7.13" +} + diff --git a/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/routing.go b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/routing.go new file mode 100644 index 0000000000..ce2bd5088b --- /dev/null +++ b/vendor/gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/routing.go @@ -0,0 +1,124 @@ +// package routing defines the interface for a routing system used by ipfs. +package routing + +import ( + "context" + "errors" + + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// ErrNotFound is returned when the router fails to find the requested record. +var ErrNotFound = errors.New("routing: not found") + +// ErrNotSupported is returned when the router doesn't support the given record +// type/operation. +var ErrNotSupported = errors.New("routing: operation or key not supported") + +// ContentRouting is a value provider layer of indirection. It is used to find +// information about who has what content. +type ContentRouting interface { + // Provide adds the given cid to the content routing system. If 'true' is + // passed, it also announces it, otherwise it is just kept in the local + // accounting of which objects are being provided. + Provide(context.Context, cid.Cid, bool) error + + // Search for peers who are able to provide a given key + FindProvidersAsync(context.Context, cid.Cid, int) <-chan pstore.PeerInfo +} + +// PeerRouting is a way to find information about certain peers. +// This can be implemented by a simple lookup table, a tracking server, +// or even a DHT. +type PeerRouting interface { + // Find specific Peer + // FindPeer searches for a peer with given ID, returns a pstore.PeerInfo + // with relevant addresses. + FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) +} + +// ValueStore is a basic Put/Get interface. +type ValueStore interface { + + // PutValue adds value corresponding to given Key. + PutValue(context.Context, string, []byte, ...ropts.Option) error + + // GetValue searches for the value corresponding to given Key. + GetValue(context.Context, string, ...ropts.Option) ([]byte, error) + + // SearchValue searches for better and better values from this value + // store corresponding to the given Key. By default implementations must + // stop the search after a good value is found. A 'good' value is a value + // that would be returned from GetValue. + // + // Useful when you want a result *now* but still want to hear about + // better/newer results. + // + // Implementations of this methods won't return ErrNotFound. When a value + // couldn't be found, the channel will get closed without passing any results + SearchValue(context.Context, string, ...ropts.Option) (<-chan []byte, error) +} + +// IpfsRouting is the combination of different routing types that IPFS uses. +// It can be satisfied by a single item (such as a DHT) or multiple different +// pieces that are more optimized to each task. +type IpfsRouting interface { + ContentRouting + PeerRouting + ValueStore + + // Bootstrap allows callers to hint to the routing system to get into a + // Boostrapped state and remain there. It is not a synchronous call. + Bootstrap(context.Context) error + + // TODO expose io.Closer or plain-old Close error +} + +// PubKeyFetcher is an interfaces that should be implemented by value stores +// that can optimize retrieval of public keys. +// +// TODO(steb): Consider removing, see #22. +type PubKeyFetcher interface { + // GetPublicKey returns the public key for the given peer. + GetPublicKey(context.Context, peer.ID) (ci.PubKey, error) +} + +// KeyForPublicKey returns the key used to retrieve public keys +// from a value store. +func KeyForPublicKey(id peer.ID) string { + return "/pk/" + string(id) +} + +// GetPublicKey retrieves the public key associated with the given peer ID from +// the value store. +// +// If the ValueStore is also a PubKeyFetcher, this method will call GetPublicKey +// (which may be better optimized) instead of GetValue. +func GetPublicKey(r ValueStore, ctx context.Context, p peer.ID) (ci.PubKey, error) { + switch k, err := p.ExtractPublicKey(); err { + case peer.ErrNoPublicKey: + // check the datastore + case nil: + return k, nil + default: + return nil, err + } + + if dht, ok := r.(PubKeyFetcher); ok { + // If we have a DHT as our routing system, use optimized fetcher + return dht.GetPublicKey(ctx, p) + } + key := KeyForPublicKey(p) + pkval, err := r.GetValue(ctx, key) + if err != nil { + return nil, err + } + + // get PublicKey from node.Data + return ci.UnmarshalPublicKey(pkval) +} diff --git a/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/.travis.yml b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/.travis.yml new file mode 100644 index 0000000000..cfe2014c2c --- /dev/null +++ b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: flase + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/LICENSE b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/LICENSE rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/LICENSE diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/Makefile b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/Makefile similarity index 100% rename from vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/Makefile rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/Makefile diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/README.md b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/README.md similarity index 100% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/README.md rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/README.md diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/codecov.yml b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/codecov.yml similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/codecov.yml rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/codecov.yml diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/mapping.go b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/mapping.go similarity index 95% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/mapping.go rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/mapping.go index 15e56ce396..31494112a5 100644 --- a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/mapping.go +++ b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/mapping.go @@ -6,8 +6,8 @@ import ( "time" "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) // Mapping represents a port mapping in a NAT. diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/nat.go b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/nat.go similarity index 97% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/nat.go rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/nat.go index b0cb7abe95..dafe8ee0cb 100644 --- a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/nat.go +++ b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/nat.go @@ -12,9 +12,9 @@ import ( nat "gx/ipfs/QmPfFaAVvKzacBFh2UBqUzczkPNQxGcLyAXKKD1hjC22re/go-nat" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" periodic "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) var ( diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/notifier.go b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/notifier.go similarity index 100% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/notifier.go rename to vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/notifier.go diff --git a/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/package.json b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/package.json new file mode 100644 index 0000000000..bac323f363 --- /dev/null +++ b/vendor/gx/ipfs/QmZ1zCb95y9oHaJRMQmbXh3FgUuwz1V2mbCXBztnhehJkL/go-libp2p-nat/package.json @@ -0,0 +1,53 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-nat" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-nat" + }, + "gxDependencies": [ + { + "author": "fd", + "hash": "QmPfFaAVvKzacBFh2UBqUzczkPNQxGcLyAXKKD1hjC22re", + "name": "go-nat", + "version": "1.0.0" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG", + "name": "go-notifier", + "version": "1.0.0" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "", + "name": "go-libp2p-nat", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.8.12" +} + diff --git a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_client.go b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_client.go similarity index 80% rename from vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_client.go rename to vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_client.go index 4fc73884e3..48d5848405 100644 --- a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_client.go +++ b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_client.go @@ -4,14 +4,14 @@ import ( "context" "time" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("mockrouter") diff --git a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_server.go b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_server.go similarity index 79% rename from vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_server.go rename to vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_server.go index e5e95e4424..7e16448631 100644 --- a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/centralized_server.go +++ b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/centralized_server.go @@ -6,14 +6,14 @@ import ( "sync" "time" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dssync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - - offline "gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dssync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + + offline "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline" ) // server is the mockrouting.Client's private interface to the routing server diff --git a/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/interface.go b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/interface.go new file mode 100644 index 0000000000..d548bee8f9 --- /dev/null +++ b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock/interface.go @@ -0,0 +1,59 @@ +// Package mockrouting provides a virtual routing server. To use it, +// create a virtual routing server and use the Client() method to get a +// routing client (IpfsRouting). The server quacks like a DHT but is +// really a local in-memory hash table. +package mockrouting + +import ( + "context" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + delay "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" + "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" +) + +// MockValidator is a record validator that always returns success. +type MockValidator struct{} + +func (MockValidator) Validate(_ string, _ []byte) error { return nil } +func (MockValidator) Select(_ string, _ [][]byte) (int, error) { return 0, nil } + +// Server provides mockrouting Clients +type Server interface { + Client(p testutil.Identity) Client + ClientWithDatastore(context.Context, testutil.Identity, ds.Datastore) Client +} + +// Client implements IpfsRouting +type Client interface { + routing.IpfsRouting +} + +// NewServer returns a mockrouting Server +func NewServer() Server { + return NewServerWithDelay(DelayConfig{ + ValueVisibility: delay.Fixed(0), + Query: delay.Fixed(0), + }) +} + +// NewServerWithDelay returns a mockrouting Server with a delay! +func NewServerWithDelay(conf DelayConfig) Server { + return &s{ + providers: make(map[string]map[peer.ID]providerRecord), + delayConf: conf, + } +} + +// DelayConfig can be used to configured the fake delays of a mock server. +// Use with NewServerWithDelay(). +type DelayConfig struct { + // ValueVisibility is the time it takes for a value to be visible in the network + // FIXME there _must_ be a better term for this + ValueVisibility delay.D + + // Query is the time it takes to receive a response from a routing query + Query delay.D +} diff --git a/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/none/none_client.go b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/none/none_client.go new file mode 100644 index 0000000000..3b4dc2f992 --- /dev/null +++ b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/none/none_client.go @@ -0,0 +1,57 @@ +// Package nilrouting implements a routing client that does nothing. +package nilrouting + +import ( + "context" + "errors" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + p2phost "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" +) + +type nilclient struct { +} + +func (c *nilclient) PutValue(_ context.Context, _ string, _ []byte, _ ...ropts.Option) error { + return nil +} + +func (c *nilclient) GetValue(_ context.Context, _ string, _ ...ropts.Option) ([]byte, error) { + return nil, errors.New("tried GetValue from nil routing") +} + +func (c *nilclient) SearchValue(_ context.Context, _ string, _ ...ropts.Option) (<-chan []byte, error) { + return nil, errors.New("tried SearchValue from nil routing") +} + +func (c *nilclient) FindPeer(_ context.Context, _ peer.ID) (pstore.PeerInfo, error) { + return pstore.PeerInfo{}, nil +} + +func (c *nilclient) FindProvidersAsync(_ context.Context, _ cid.Cid, _ int) <-chan pstore.PeerInfo { + out := make(chan pstore.PeerInfo) + defer close(out) + return out +} + +func (c *nilclient) Provide(_ context.Context, _ cid.Cid, _ bool) error { + return nil +} + +func (c *nilclient) Bootstrap(_ context.Context) error { + return nil +} + +// ConstructNilRouting creates an IpfsRouting client which does nothing. +func ConstructNilRouting(_ context.Context, _ p2phost.Host, _ ds.Batching, _ record.Validator) (routing.IpfsRouting, error) { + return &nilclient{}, nil +} + +// ensure nilclient satisfies interface +var _ routing.IpfsRouting = &nilclient{} diff --git a/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline/offline.go b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline/offline.go new file mode 100644 index 0000000000..e328fe39c8 --- /dev/null +++ b/vendor/gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/offline/offline.go @@ -0,0 +1,128 @@ +// Package offline implements IpfsRouting with a client which +// is only able to perform offline operations. +package offline + +import ( + "bytes" + "context" + "errors" + "time" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dshelp "gx/ipfs/QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847/go-ipfs-ds-help" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + pb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +// ErrOffline is returned when trying to perform operations that +// require connectivity. +var ErrOffline = errors.New("routing system in offline mode") + +// NewOfflineRouter returns an IpfsRouting implementation which only performs +// offline operations. It allows to Put and Get signed dht +// records to and from the local datastore. +func NewOfflineRouter(dstore ds.Datastore, validator record.Validator) routing.IpfsRouting { + return &offlineRouting{ + datastore: dstore, + validator: validator, + } +} + +// offlineRouting implements the IpfsRouting interface, +// but only provides the capability to Put and Get signed dht +// records to and from the local datastore. +type offlineRouting struct { + datastore ds.Datastore + validator record.Validator +} + +func (c *offlineRouting) PutValue(ctx context.Context, key string, val []byte, _ ...ropts.Option) error { + if err := c.validator.Validate(key, val); err != nil { + return err + } + if old, err := c.GetValue(ctx, key); err == nil { + // be idempotent to be nice. + if bytes.Equal(old, val) { + return nil + } + // check to see if the older record is better + i, err := c.validator.Select(key, [][]byte{val, old}) + if err != nil { + // this shouldn't happen for validated records. + return err + } + if i != 0 { + return errors.New("can't replace a newer record with an older one") + } + } + rec := record.MakePutRecord(key, val) + data, err := proto.Marshal(rec) + if err != nil { + return err + } + + return c.datastore.Put(dshelp.NewKeyFromBinary([]byte(key)), data) +} + +func (c *offlineRouting) GetValue(ctx context.Context, key string, _ ...ropts.Option) ([]byte, error) { + buf, err := c.datastore.Get(dshelp.NewKeyFromBinary([]byte(key))) + if err != nil { + return nil, err + } + + rec := new(pb.Record) + err = proto.Unmarshal(buf, rec) + if err != nil { + return nil, err + } + val := rec.GetValue() + + err = c.validator.Validate(key, val) + if err != nil { + return nil, err + } + return val, nil +} + +func (c *offlineRouting) SearchValue(ctx context.Context, key string, _ ...ropts.Option) (<-chan []byte, error) { + out := make(chan []byte, 1) + go func() { + defer close(out) + v, err := c.GetValue(ctx, key) + if err == nil { + out <- v + } + }() + return out, nil +} + +func (c *offlineRouting) FindPeer(ctx context.Context, pid peer.ID) (pstore.PeerInfo, error) { + return pstore.PeerInfo{}, ErrOffline +} + +func (c *offlineRouting) FindProvidersAsync(ctx context.Context, k cid.Cid, max int) <-chan pstore.PeerInfo { + out := make(chan pstore.PeerInfo) + close(out) + return out +} + +func (c *offlineRouting) Provide(_ context.Context, k cid.Cid, _ bool) error { + return ErrOffline +} + +func (c *offlineRouting) Ping(ctx context.Context, p peer.ID) (time.Duration, error) { + return 0, ErrOffline +} + +func (c *offlineRouting) Bootstrap(context.Context) error { + return nil +} + +// ensure offlineRouting matches the IpfsRouting interface +var _ routing.IpfsRouting = &offlineRouting{} diff --git a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/README.md b/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/README.md deleted file mode 100644 index ab42dc2174..0000000000 --- a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# go-conn-security - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/libp2p/go-conn-security?status.svg)](https://godoc.org/github.com/libp2p/go-conn-security) -[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-conn-security/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-conn-security?branch=master) -[![Build Status](https://travis-ci.org/libp2p/go-conn-security.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security) - -> Stream security transport interfaces - -This package defines the interfaces that must be fulfilled by libp2p network security transports. Security transports take go `net.Conn` connections and upgrade them to encrypted and authenticated connections. - -Known libp2p security transports include: - -* [go-libp2p-secio](https://github.com/libp2p/go-libp2p-secio) - -## Install - -`go-conn-security` is a standard Go module which can be installed with: - -```sh -go get github.com/libp2p/go-conn-security -``` - -Note that `go-conn-security` is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section). - -## Usage - -This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project it is recommended that you: - -```sh -go get -u github.com/whyrusleeping/gx -go get -u github.com/whyrusleeping/gx-go -cd -gx init -gx import github.com/libp2p/go-conn-security -gx install --global -gx-go --rewrite -``` - -Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information. - -For more information about how `go-conn-security` is used in the libp2p context, you can see the [go-libp2p-conn](https://github.com/libp2p/go-libp2p-conn) module. - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-conn-security/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/libp2p/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License - -MIT diff --git a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/interface.go b/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/interface.go deleted file mode 100644 index 90923e2702..0000000000 --- a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/interface.go +++ /dev/null @@ -1,25 +0,0 @@ -package connsec - -import ( - "context" - "net" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" -) - -// A Transport turns inbound and outbound unauthenticated, -// plain-text connections into authenticated, encrypted connections. -type Transport interface { - // SecureInbound secures an inbound connection. - SecureInbound(ctx context.Context, insecure net.Conn) (Conn, error) - - // SecureOutbound secures an outbound connection. - SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (Conn, error) -} - -// Conn is an authenticated, encrypted connection. -type Conn interface { - net.Conn - inet.ConnSecurity -} diff --git a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/package.json b/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/package.json deleted file mode 100644 index ded8501aa5..0000000000 --- a/vendor/gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "Stebalien", - "bugs": { - "url": "https://github.com/libp2p/go-conn-security" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-conn-security" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-conn-security", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.15" -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.gxignore b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.gxignore deleted file mode 100644 index 39217cdd19..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.gxignore +++ /dev/null @@ -1 +0,0 @@ -Godeps/* \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.travis.yml b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.travis.yml deleted file mode 100644 index 0e8f3f6c19..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -env: - - PROTOBUF_VERSION=2.5.0 - - PROTOBUF_VERSION=2.6.1 - - PROTOBUF_VERSION=3.0.0-alpha-3 - -before_install: - - ./install-protobuf.sh - - PATH=/home/travis/bin:$PATH protoc --version - -script: - - PATH=/home/travis/bin:$PATH make all - -language: go - -go: - - 1.2.2 - - 1.3.3 - - 1.4.2 - - 1.5 diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/CONTRIBUTORS b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/CONTRIBUTORS deleted file mode 100644 index 32c30b8a58..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -This is a list of contributors to the GoGo protobuf repository. - -# Names should be added to this file like so: -# Name - -# Please keep the list sorted. - -Walter Schulze - -The contributors to the Go protobuf repository: - -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/LICENSE b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/LICENSE deleted file mode 100644 index 335e38e19b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/LICENSE +++ /dev/null @@ -1,36 +0,0 @@ -Extensions for Protocol Buffers to create more go like structures. - -Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -http://github.com/gogo/protobuf/gogoproto - -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Makefile deleted file mode 100644 index dbeecda8d8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Makefile +++ /dev/null @@ -1,117 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.PHONY: nuke regenerate tests clean install gofmt vet - -all: clean install regenerate install tests errcheck vet - -install: - go install ./proto - go install ./gogoproto - go install ./jsonpb - go install ./protoc-gen-gogo - go install ./protoc-gen-gofast - go install ./protoc-gen-gogofast - go install ./protoc-gen-gogofaster - go install ./protoc-gen-gogoslick - go install ./protoc-min-version - go install ./protoc-gen-combo - -clean: - go clean ./... - -nuke: - go clean -i ./... - -gofmt: - gofmt -l -s -w . - -regenerate: - make -C protoc-gen-gogo/descriptor regenerate - make -C protoc-gen-gogo/plugin regenerate - make -C gogoproto regenerate - make -C proto/testdata regenerate - make -C jsonpb/jsonpb_test_proto regenerate - make -C test regenerate - make -C test/example regenerate - make -C test/unrecognized regenerate - make -C test/group regenerate - make -C test/unrecognizedgroup regenerate - make -C test/enumstringer regenerate - make -C test/unmarshalmerge regenerate - make -C test/moredefaults regenerate - make -C test/issue8 regenerate - make -C test/enumprefix regenerate - make -C test/packed regenerate - make -C test/tags regenerate - make -C test/oneof regenerate - make -C test/oneof3 regenerate - make -C test/theproto3 regenerate - make -C test/mapsproto2 regenerate - make -C test/issue42order regenerate - make -C proto generate-test-pbs - make -C test/importdedup regenerate - make -C test/custombytesnonstruct regenerate - make -C test/required regenerate - make -C test/casttype regenerate - make -C test/castvalue regenerate - make -C vanity/test regenerate - make -C test/sizeunderscore regenerate - make -C test/issue34 regenerate - make -C test/empty-issue70 regenerate - make -C test/indeximport-issue72 regenerate - make -C test/fuzztests regenerate - make -C test/oneofembed regenerate - make -C test/asymetric-issue125 regenerate - make gofmt - -tests: - go build ./test/enumprefix - go test ./... - -vet: - go vet ./... - go tool vet --shadow . - -errcheck: - go get -u github.com/kisielk/errcheck - errcheck ./test/... - -drone: - sudo apt-get install protobuf-compiler - (cd $(GOPATH)/src/github.com/gogo/protobuf && make all) - -testall: - make -C protoc-gen-gogo/testdata test - make -C vanity/test test - make tests - -bench: - (cd test/mixbench && go build .) - (cd test/mixbench && ./mixbench) - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/README b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/README deleted file mode 100644 index bcb93c52a2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/README +++ /dev/null @@ -1,175 +0,0 @@ -GoGoProtobuf http://github.com/gogo/protobuf extends -GoProtobuf http://github.com/golang/protobuf - -Go support for Protocol Buffers - Google's data interchange format -Copyright 2010 The Go Authors. -https://github.com/golang/protobuf - -This package and the code it generates requires at least Go 1.4. - -This software implements Go bindings for protocol buffers. For -information about protocol buffers themselves, see - https://developers.google.com/protocol-buffers/ - -## Installation ## - -To use this software, you must: -- Install the standard C++ implementation of protocol buffers from - https://developers.google.com/protocol-buffers/ -- Of course, install the Go compiler and tools from - https://golang.org/ - See - https://golang.org/doc/install - for details or, if you are using gccgo, follow the instructions at - https://golang.org/doc/install/gccgo -- Grab the code from the repository and install the proto package. - The simplest way is to run - go get -u github.com/golang/protobuf/{proto,protoc-gen-go} - The compiler plugin, protoc-gen-go, will be installed in $GOBIN, - defaulting to $GOPATH/bin. It must be in your $PATH for the protocol - compiler, protoc, to find it. - -This software has two parts: a 'protocol compiler plugin' that -generates Go source files that, once compiled, can access and manage -protocol buffers; and a library that implements run-time support for -encoding (marshaling), decoding (unmarshaling), and accessing protocol -buffers. - -There is support for gRPC in Go using protocol buffers. -See the note at the bottom of this file for details. - -There are no insertion points in the plugin. - -GoGoProtobuf provides extensions for protocol buffers and GoProtobuf -see http://github.com/gogo/protobuf/gogoproto/doc.go - -## Using protocol buffers with Go ## - -Once the software is installed, there are two steps to using it. -First you must compile the protocol buffer definitions and then import -them, with the support library, into your program. - -To compile the protocol buffer definition, run protoc with the --gogo_out -parameter set to the directory you want to output the Go code to. - - protoc --gogo_out=. *.proto - -The generated files will be suffixed .pb.go. See the Test code below -for an example using such a file. - -The package comment for the proto library contains text describing -the interface provided in Go for protocol buffers. Here is an edited -version. - -If you are using any gogo.proto extensions you will need to specify the -proto_path to include the descriptor.proto and gogo.proto. -gogo.proto is located in github.com/gogo/protobuf/gogoproto -This should be fine, since your import is the same. -descriptor.proto is located in either github.com/gogo/protobuf/protobuf -or code.google.com/p/protobuf/trunk/src/ -Its import is google/protobuf/descriptor.proto so it might need some help. - - protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto - -========== - -The proto package converts data structures to and from the -wire format of protocol buffers. It works in concert with the -Go source code generated for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - Helpers for getting values are superseded by the - GetFoo methods and their use is deprecated. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed with the enum's type name. Enum types have - a String method, and a Enum method to assist in message construction. - - Nested groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -Consider file test.proto, containing - - package example; - - enum FOO { X = 17; }; - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - } - -To create and play with a Test object from the example package, - - package main - - import ( - "log" - - "github.com/gogo/protobuf/proto" - "path/to/example" - ) - - func main() { - test := &example.Test { - Label: proto.String("hello"), - Type: proto.Int32(17), - Optionalgroup: &example.Test_OptionalGroup { - RequiredField: proto.String("good bye"), - }, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &example.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // etc. - } - - -gRPC Support -============ -If a proto file specifies RPC services, protoc-gen-go can be instructed to -generate code compatible with gRPC (http://www.grpc.io/). To do this, pass -the `plugins` parameter to protoc-gen-go; the usual way is to insert it into -the --go_out argument to protoc: - - protoc --gogo_out=plugins=grpc:. *.proto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Readme.md b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Readme.md deleted file mode 100644 index 094e74395b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/Readme.md +++ /dev/null @@ -1,52 +0,0 @@ -# Protocol Buffers for Go with Gadgets - -Drone.io Basic Tests: [![Build Status](https://drone.io/github.com/gogo/protobuf/status.png)](https://drone.io/github.com/gogo/protobuf/latest) - -Travis CI Matrix Builds: [![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) - -### Getting Started (Give me the speed I don't care about the rest) - -Install the protoc-gen-gofast binary - - go get github.com/gogo/protobuf/protoc-gen-gofast - -Use it to generate faster marshaling and unmarshaling go code for you protocol buffers. - - protoc --gofast_out=. myproto.proto - -### Getting started (I have heard about fields without pointers and more code generation) - -Other binaries are also included: - - protoc-gen-gogofast (same as gofast, but imports gogoprotobuf) - protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields) - protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods) - -### Getting started (I want more customization power over fields, speed, other serialization formats and tests, etc.) - -Please visit the [homepage](http://gogo.github.io) for more documentation. - -### Installation - -To install it, you must first have Go (at least version 1.2.2) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Go 1.2.2, 1.3.3, 1.4.2 and 1.5 are continiuosly tested. - -Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf). -Most versions from 2.3.1 should not give any problems, but 2.5.0, 2.6.1 and 3 alpha are continiously tested. - -Finally run: - - go get github.com/gogo/protobuf/proto - go get github.com/gogo/protobuf/protoc-gen-gogo - go get github.com/gogo/protobuf/gogoproto - -### Proto3 - -Proto3 is supported, but most of the new native types are not supported yet. -[See Proto3 Issue](https://github.com/gogo/protobuf/issues/57) for more details. - -### GRPC - -It works the same as golang/protobuf, simply specify the plugin. -Here is an example using gofast: - - protoc --gofast_out=plugins=grpc:. my.proto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec.go deleted file mode 100644 index d167dc5f82..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package codec - -import ( - "github.com/gogo/protobuf/proto" -) - -type Codec interface { - Marshal(v interface{}) ([]byte, error) - Unmarshal(data []byte, v interface{}) error - String() string -} - -type marshaler interface { - MarshalTo(data []byte) (n int, err error) - Size() (n int) -} - -type codec struct { - buf []byte -} - -func (this *codec) String() string { - return "proto" -} - -func New(size int) Codec { - return &codec{make([]byte, size)} -} - -func (this *codec) Marshal(v interface{}) ([]byte, error) { - if m, ok := v.(marshaler); ok { - n := m.Size() - if n > len(this.buf) { - this.buf = make([]byte, n) - } - _, err := m.MarshalTo(this.buf) - if err != nil { - return nil, err - } - return this.buf[:n], nil - } - return proto.Marshal(v.(proto.Message)) -} - -func (this *codec) Unmarshal(data []byte, v interface{}) error { - return proto.Unmarshal(data, v.(proto.Message)) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec_test.go deleted file mode 100644 index ce108cfd3f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/codec/codec_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package codec - -import ( - "github.com/gogo/protobuf/test" - "math/rand" - "testing" - "time" -) - -func TestCodec(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - in := test.NewPopulatedNinOptStruct(r, true) - c := New(r.Intn(1024)) - data, err := c.Marshal(in) - if err != nil { - t.Fatal(err) - } - out := &test.NinOptStruct{} - err = c.Unmarshal(data, out) - if err != nil { - t.Fatal(err) - } - if err := in.VerboseEqual(out); err != nil { - t.Fatal(err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/Makefile deleted file mode 100644 index 557f294933..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../:../protobuf/:. *.proto - -restore: - cp gogo.pb.golden gogo.pb.go - -preserve: - cp gogo.pb.go gogo.pb.golden diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/doc.go deleted file mode 100644 index f0424d4f8a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/doc.go +++ /dev/null @@ -1,168 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package gogoproto provides extensions for protocol buffers to achieve: - - - fast marshalling and unmarshalling. - - peace of mind by optionally generating test and benchmark code. - - more canonical Go structures. - - less typing by optionally generating extra helper code. - - goprotobuf compatibility - -More Canonical Go Structures - -A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. -You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. -Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. - - - nullable, if false, a field is generated without a pointer (see warning below). - - embed, if true, the field is generated as an embedded field. - - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 - - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. - - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. - - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - -Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -for a quicker overview. - -The following message: - - package test; - - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -Will generate a go struct which looks a lot like this: - - type A struct { - Description string - Number int64 - Id github_com_gogo_protobuf_test_custom.Uuid - } - -You will see there are no pointers, since all fields are non-nullable. -You will also see a custom type which marshals to a string. -Be warned it is your responsibility to test your custom types thoroughly. -You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. - -Next we will embed the message A in message B. - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -See below that A is embedded in B. - - type B struct { - A - G []github_com_gogo_protobuf_test_custom.Uint128 - } - -Also see the repeated custom type. - - type Uint128 [2]uint64 - -Next we will create a custom name for one of our fields. - - message C { - optional int64 size = 1 [(gogoproto.customname) = "MySize"]; - } - -See below that the field's name is MySize and not Size. - - type C struct { - MySize *int64 - } - -The is useful when having a protocol buffer message with a field name which conflicts with a generated method. -As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. -Using customname you can fix this error without changing the field name. -This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. - -Gogoprotobuf also has some more subtle changes, these could be changed back: - - - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. - -Gogoprotobuf also has lost some features which should be brought back with time: - - - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go - -Why does nullable break protocol buffer specifications: - -The protocol buffer specification states, somewhere, that you should be able to tell whether a -field is set or unset. With the option nullable=false this feature is lost, -since your non-nullable fields will always be set. It can be seen as a layer on top of -protocol buffers, where before and after marshalling all non-nullable fields are set -and they cannot be unset. - -Goprotobuf Compatibility: - -Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. -Gogoprotobuf generates the same code as goprotobuf if no extensions are used. -The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: - - - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. - - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix - - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. - - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face - - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. - - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension - - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. - -Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - - github.com/gogo/protobuf/plugin/ - -If you do not use any of these extension the code that is generated -will be the same as if goprotobuf has generated it. - -The most complete way to see examples is to look at - - github.com/gogo/protobuf/test/thetest.proto - -Gogoprototest is a seperate project, -because we want to keep gogoprotobuf independant of goprotobuf, -but we still want to test it thoroughly. - -*/ -package gogoproto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.pb.go deleted file mode 100644 index 9f1f5312cc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.pb.go +++ /dev/null @@ -1,512 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogo.proto -// DO NOT EDIT! - -/* -Package gogoproto is a generated protocol buffer package. - -It is generated from these files: - gogo.proto - -It has these top-level messages: -*/ -package gogoproto - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62001, - Name: "gogoproto.goproto_enum_prefix", - Tag: "varint,62001,opt,name=goproto_enum_prefix", -} - -var E_GoprotoEnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62021, - Name: "gogoproto.goproto_enum_stringer", - Tag: "varint,62021,opt,name=goproto_enum_stringer", -} - -var E_EnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62022, - Name: "gogoproto.enum_stringer", - Tag: "varint,62022,opt,name=enum_stringer", -} - -var E_GoprotoGettersAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63001, - Name: "gogoproto.goproto_getters_all", - Tag: "varint,63001,opt,name=goproto_getters_all", -} - -var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63002, - Name: "gogoproto.goproto_enum_prefix_all", - Tag: "varint,63002,opt,name=goproto_enum_prefix_all", -} - -var E_GoprotoStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63003, - Name: "gogoproto.goproto_stringer_all", - Tag: "varint,63003,opt,name=goproto_stringer_all", -} - -var E_VerboseEqualAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63004, - Name: "gogoproto.verbose_equal_all", - Tag: "varint,63004,opt,name=verbose_equal_all", -} - -var E_FaceAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63005, - Name: "gogoproto.face_all", - Tag: "varint,63005,opt,name=face_all", -} - -var E_GostringAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63006, - Name: "gogoproto.gostring_all", - Tag: "varint,63006,opt,name=gostring_all", -} - -var E_PopulateAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63007, - Name: "gogoproto.populate_all", - Tag: "varint,63007,opt,name=populate_all", -} - -var E_StringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63008, - Name: "gogoproto.stringer_all", - Tag: "varint,63008,opt,name=stringer_all", -} - -var E_OnlyoneAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63009, - Name: "gogoproto.onlyone_all", - Tag: "varint,63009,opt,name=onlyone_all", -} - -var E_EqualAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63013, - Name: "gogoproto.equal_all", - Tag: "varint,63013,opt,name=equal_all", -} - -var E_DescriptionAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63014, - Name: "gogoproto.description_all", - Tag: "varint,63014,opt,name=description_all", -} - -var E_TestgenAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63015, - Name: "gogoproto.testgen_all", - Tag: "varint,63015,opt,name=testgen_all", -} - -var E_BenchgenAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63016, - Name: "gogoproto.benchgen_all", - Tag: "varint,63016,opt,name=benchgen_all", -} - -var E_MarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63017, - Name: "gogoproto.marshaler_all", - Tag: "varint,63017,opt,name=marshaler_all", -} - -var E_UnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63018, - Name: "gogoproto.unmarshaler_all", - Tag: "varint,63018,opt,name=unmarshaler_all", -} - -var E_SizerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63020, - Name: "gogoproto.sizer_all", - Tag: "varint,63020,opt,name=sizer_all", -} - -var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63021, - Name: "gogoproto.goproto_enum_stringer_all", - Tag: "varint,63021,opt,name=goproto_enum_stringer_all", -} - -var E_EnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63022, - Name: "gogoproto.enum_stringer_all", - Tag: "varint,63022,opt,name=enum_stringer_all", -} - -var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63023, - Name: "gogoproto.unsafe_marshaler_all", - Tag: "varint,63023,opt,name=unsafe_marshaler_all", -} - -var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63024, - Name: "gogoproto.unsafe_unmarshaler_all", - Tag: "varint,63024,opt,name=unsafe_unmarshaler_all", -} - -var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63025, - Name: "gogoproto.goproto_extensions_map_all", - Tag: "varint,63025,opt,name=goproto_extensions_map_all", -} - -var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63026, - Name: "gogoproto.goproto_unrecognized_all", - Tag: "varint,63026,opt,name=goproto_unrecognized_all", -} - -var E_GogoprotoImport = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63027, - Name: "gogoproto.gogoproto_import", - Tag: "varint,63027,opt,name=gogoproto_import", -} - -var E_GoprotoGetters = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64001, - Name: "gogoproto.goproto_getters", - Tag: "varint,64001,opt,name=goproto_getters", -} - -var E_GoprotoStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64003, - Name: "gogoproto.goproto_stringer", - Tag: "varint,64003,opt,name=goproto_stringer", -} - -var E_VerboseEqual = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64004, - Name: "gogoproto.verbose_equal", - Tag: "varint,64004,opt,name=verbose_equal", -} - -var E_Face = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64005, - Name: "gogoproto.face", - Tag: "varint,64005,opt,name=face", -} - -var E_Gostring = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64006, - Name: "gogoproto.gostring", - Tag: "varint,64006,opt,name=gostring", -} - -var E_Populate = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64007, - Name: "gogoproto.populate", - Tag: "varint,64007,opt,name=populate", -} - -var E_Stringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 67008, - Name: "gogoproto.stringer", - Tag: "varint,67008,opt,name=stringer", -} - -var E_Onlyone = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64009, - Name: "gogoproto.onlyone", - Tag: "varint,64009,opt,name=onlyone", -} - -var E_Equal = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64013, - Name: "gogoproto.equal", - Tag: "varint,64013,opt,name=equal", -} - -var E_Description = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64014, - Name: "gogoproto.description", - Tag: "varint,64014,opt,name=description", -} - -var E_Testgen = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64015, - Name: "gogoproto.testgen", - Tag: "varint,64015,opt,name=testgen", -} - -var E_Benchgen = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64016, - Name: "gogoproto.benchgen", - Tag: "varint,64016,opt,name=benchgen", -} - -var E_Marshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64017, - Name: "gogoproto.marshaler", - Tag: "varint,64017,opt,name=marshaler", -} - -var E_Unmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64018, - Name: "gogoproto.unmarshaler", - Tag: "varint,64018,opt,name=unmarshaler", -} - -var E_Sizer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64020, - Name: "gogoproto.sizer", - Tag: "varint,64020,opt,name=sizer", -} - -var E_UnsafeMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64023, - Name: "gogoproto.unsafe_marshaler", - Tag: "varint,64023,opt,name=unsafe_marshaler", -} - -var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64024, - Name: "gogoproto.unsafe_unmarshaler", - Tag: "varint,64024,opt,name=unsafe_unmarshaler", -} - -var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64025, - Name: "gogoproto.goproto_extensions_map", - Tag: "varint,64025,opt,name=goproto_extensions_map", -} - -var E_GoprotoUnrecognized = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64026, - Name: "gogoproto.goproto_unrecognized", - Tag: "varint,64026,opt,name=goproto_unrecognized", -} - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65001, - Name: "gogoproto.nullable", - Tag: "varint,65001,opt,name=nullable", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65002, - Name: "gogoproto.embed", - Tag: "varint,65002,opt,name=embed", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65003, - Name: "gogoproto.customtype", - Tag: "bytes,65003,opt,name=customtype", -} - -var E_Customname = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65004, - Name: "gogoproto.customname", - Tag: "bytes,65004,opt,name=customname", -} - -var E_Jsontag = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65005, - Name: "gogoproto.jsontag", - Tag: "bytes,65005,opt,name=jsontag", -} - -var E_Moretags = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65006, - Name: "gogoproto.moretags", - Tag: "bytes,65006,opt,name=moretags", -} - -var E_Casttype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65007, - Name: "gogoproto.casttype", - Tag: "bytes,65007,opt,name=casttype", -} - -var E_Castkey = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65008, - Name: "gogoproto.castkey", - Tag: "bytes,65008,opt,name=castkey", -} - -var E_Castvalue = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65009, - Name: "gogoproto.castvalue", - Tag: "bytes,65009,opt,name=castvalue", -} - -func init() { - proto.RegisterExtension(E_GoprotoEnumPrefix) - proto.RegisterExtension(E_GoprotoEnumStringer) - proto.RegisterExtension(E_EnumStringer) - proto.RegisterExtension(E_GoprotoGettersAll) - proto.RegisterExtension(E_GoprotoEnumPrefixAll) - proto.RegisterExtension(E_GoprotoStringerAll) - proto.RegisterExtension(E_VerboseEqualAll) - proto.RegisterExtension(E_FaceAll) - proto.RegisterExtension(E_GostringAll) - proto.RegisterExtension(E_PopulateAll) - proto.RegisterExtension(E_StringerAll) - proto.RegisterExtension(E_OnlyoneAll) - proto.RegisterExtension(E_EqualAll) - proto.RegisterExtension(E_DescriptionAll) - proto.RegisterExtension(E_TestgenAll) - proto.RegisterExtension(E_BenchgenAll) - proto.RegisterExtension(E_MarshalerAll) - proto.RegisterExtension(E_UnmarshalerAll) - proto.RegisterExtension(E_SizerAll) - proto.RegisterExtension(E_GoprotoEnumStringerAll) - proto.RegisterExtension(E_EnumStringerAll) - proto.RegisterExtension(E_UnsafeMarshalerAll) - proto.RegisterExtension(E_UnsafeUnmarshalerAll) - proto.RegisterExtension(E_GoprotoExtensionsMapAll) - proto.RegisterExtension(E_GoprotoUnrecognizedAll) - proto.RegisterExtension(E_GogoprotoImport) - proto.RegisterExtension(E_GoprotoGetters) - proto.RegisterExtension(E_GoprotoStringer) - proto.RegisterExtension(E_VerboseEqual) - proto.RegisterExtension(E_Face) - proto.RegisterExtension(E_Gostring) - proto.RegisterExtension(E_Populate) - proto.RegisterExtension(E_Stringer) - proto.RegisterExtension(E_Onlyone) - proto.RegisterExtension(E_Equal) - proto.RegisterExtension(E_Description) - proto.RegisterExtension(E_Testgen) - proto.RegisterExtension(E_Benchgen) - proto.RegisterExtension(E_Marshaler) - proto.RegisterExtension(E_Unmarshaler) - proto.RegisterExtension(E_Sizer) - proto.RegisterExtension(E_UnsafeMarshaler) - proto.RegisterExtension(E_UnsafeUnmarshaler) - proto.RegisterExtension(E_GoprotoExtensionsMap) - proto.RegisterExtension(E_GoprotoUnrecognized) - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) - proto.RegisterExtension(E_Customname) - proto.RegisterExtension(E_Jsontag) - proto.RegisterExtension(E_Moretags) - proto.RegisterExtension(E_Casttype) - proto.RegisterExtension(E_Castkey) - proto.RegisterExtension(E_Castvalue) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.proto deleted file mode 100644 index 84310e8fdb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.proto +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/helper.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/helper.go deleted file mode 100644 index b1889f258c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/helper.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package gogoproto - -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import proto "github.com/gogo/protobuf/proto" - -func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Embed, false) -} - -func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Nullable, true) -} - -func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCustomType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastKey(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastValue(field) - if len(typ) > 0 { - return true - } - return false -} - -func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customtype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastType(field *google_protobuf.FieldDescriptorProto) string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Casttype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castkey) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castvalue) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { - name := GetCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Jsontag) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Moretags) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool - -func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) -} - -func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) -} - -func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) -} - -func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) -} - -func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) -} - -func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) -} - -func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) -} - -func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) -} - -func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) -} - -func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) -} - -func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) -} - -func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) -} - -func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) -} - -func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) -} - -func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) -} - -func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) -} - -func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) -} - -func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) -} - -func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) -} - -func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) -} - -func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) -} - -func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - if IsProto3(file) { - return false - } - return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) -} - -func IsProto3(file *google_protobuf.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { - return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/install-protobuf.sh b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/install-protobuf.sh deleted file mode 100644 index be08aa2acd..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/install-protobuf.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -die() { - echo "$@" >&2 - exit 1 -} - -case "$PROTOBUF_VERSION" in -2*) - basename=protobuf-$PROTOBUF_VERSION - ;; -3*) - basename=protobuf-cpp-$PROTOBUF_VERSION - ;; -*) - die "unknown protobuf version: $PROTOBUF_VERSION" - ;; -esac - -wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz -tar xzf $basename.tar.gz - -cd protobuf-$PROTOBUF_VERSION - -./configure --prefix=/home/travis && make -j2 && make install diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/full.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/full.go deleted file mode 100644 index 19330329fc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/full.go +++ /dev/null @@ -1,96 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "github.com/gogo/protobuf/proto" - "io" -) - -func NewFullWriter(w io.Writer) WriteCloser { - return &fullWriter{w, nil} -} - -type fullWriter struct { - w io.Writer - buffer []byte -} - -func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n := m.Size() - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - _, err = this.w.Write(data) - return err -} - -func (this *fullWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type fullReader struct { - r io.Reader - buf []byte -} - -func NewFullReader(r io.Reader, maxSize int) ReadCloser { - return &fullReader{r, make([]byte, maxSize)} -} - -func (this *fullReader) ReadMsg(msg proto.Message) error { - length, err := this.r.Read(this.buf) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *fullReader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io.go deleted file mode 100644 index 463cea2afb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io.go +++ /dev/null @@ -1,57 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "github.com/gogo/protobuf/proto" - "io" -) - -type Writer interface { - WriteMsg(proto.Message) error -} - -type WriteCloser interface { - Writer - io.Closer -} - -type Reader interface { - ReadMsg(msg proto.Message) error -} - -type ReadCloser interface { - Reader - io.Closer -} - -type marshaler interface { - MarshalTo(data []byte) (n int, err error) - Size() (n int) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io_test.go deleted file mode 100644 index 603c10c6ea..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/io_test.go +++ /dev/null @@ -1,221 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io_test - -import ( - "bytes" - "encoding/binary" - "github.com/gogo/protobuf/io" - "github.com/gogo/protobuf/test" - goio "io" - "math/rand" - "testing" - "time" -) - -func iotest(writer io.WriteCloser, reader io.ReadCloser) error { - size := 1000 - msgs := make([]*test.NinOptNative, size) - r := rand.New(rand.NewSource(time.Now().UnixNano())) - for i := range msgs { - msgs[i] = test.NewPopulatedNinOptNative(r, true) - //issue 31 - if i == 5 { - msgs[i] = &test.NinOptNative{} - } - //issue 31 - if i == 999 { - msgs[i] = &test.NinOptNative{} - } - err := writer.WriteMsg(msgs[i]) - if err != nil { - return err - } - } - if err := writer.Close(); err != nil { - return err - } - i := 0 - for { - msg := &test.NinOptNative{} - if err := reader.ReadMsg(msg); err != nil { - if err == goio.EOF { - break - } - return err - } - if err := msg.VerboseEqual(msgs[i]); err != nil { - return err - } - i++ - } - if i != size { - panic("not enough messages read") - } - if err := reader.Close(); err != nil { - return err - } - return nil -} - -type buffer struct { - *bytes.Buffer - closed bool -} - -func (this *buffer) Close() error { - this.closed = true - return nil -} - -func newBuffer() *buffer { - return &buffer{bytes.NewBuffer(nil), false} -} - -func TestBigUint32Normal(t *testing.T) { - buf := newBuffer() - writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) - reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 1024*1024) - if err := iotest(writer, reader); err != nil { - t.Error(err) - } - if !buf.closed { - t.Fatalf("did not close buffer") - } -} - -func TestBigUint32MaxSize(t *testing.T) { - buf := newBuffer() - writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) - reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 20) - if err := iotest(writer, reader); err != goio.ErrShortBuffer { - t.Error(err) - } else { - t.Logf("%s", err) - } -} - -func TestLittleUint32Normal(t *testing.T) { - buf := newBuffer() - writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) - reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 1024*1024) - if err := iotest(writer, reader); err != nil { - t.Error(err) - } - if !buf.closed { - t.Fatalf("did not close buffer") - } -} - -func TestLittleUint32MaxSize(t *testing.T) { - buf := newBuffer() - writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) - reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 20) - if err := iotest(writer, reader); err != goio.ErrShortBuffer { - t.Error(err) - } else { - t.Logf("%s", err) - } -} - -func TestVarintNormal(t *testing.T) { - buf := newBuffer() - writer := io.NewDelimitedWriter(buf) - reader := io.NewDelimitedReader(buf, 1024*1024) - if err := iotest(writer, reader); err != nil { - t.Error(err) - } - if !buf.closed { - t.Fatalf("did not close buffer") - } -} - -func TestVarintNoClose(t *testing.T) { - buf := bytes.NewBuffer(nil) - writer := io.NewDelimitedWriter(buf) - reader := io.NewDelimitedReader(buf, 1024*1024) - if err := iotest(writer, reader); err != nil { - t.Error(err) - } -} - -//issue 32 -func TestVarintMaxSize(t *testing.T) { - buf := newBuffer() - writer := io.NewDelimitedWriter(buf) - reader := io.NewDelimitedReader(buf, 20) - if err := iotest(writer, reader); err != goio.ErrShortBuffer { - t.Error(err) - } else { - t.Logf("%s", err) - } -} - -func TestVarintError(t *testing.T) { - buf := newBuffer() - buf.Write([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}) - reader := io.NewDelimitedReader(buf, 1024*1024) - msg := &test.NinOptNative{} - err := reader.ReadMsg(msg) - if err == nil { - t.Fatalf("Expected error") - } -} - -func TestFull(t *testing.T) { - buf := newBuffer() - writer := io.NewFullWriter(buf) - reader := io.NewFullReader(buf, 1024*1024) - r := rand.New(rand.NewSource(time.Now().UnixNano())) - msgIn := test.NewPopulatedNinOptNative(r, true) - if err := writer.WriteMsg(msgIn); err != nil { - panic(err) - } - if err := writer.Close(); err != nil { - panic(err) - } - msgOut := &test.NinOptNative{} - if err := reader.ReadMsg(msgOut); err != nil { - panic(err) - } - if err := msgIn.VerboseEqual(msgOut); err != nil { - panic(err) - } - if err := reader.ReadMsg(msgOut); err != nil { - if err != goio.EOF { - panic(err) - } - } - if err := reader.Close(); err != nil { - panic(err) - } - if !buf.closed { - t.Fatalf("did not close buffer") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/uint32.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/uint32.go deleted file mode 100644 index bc6f284dcf..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/uint32.go +++ /dev/null @@ -1,120 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "encoding/binary" - "github.com/gogo/protobuf/proto" - "io" -) - -func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { - return &uint32Writer{w, byteOrder, nil} -} - -func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { - return &uint32Writer{w, byteOrder, make([]byte, size)} -} - -type uint32Writer struct { - w io.Writer - byteOrder binary.ByteOrder - buffer []byte -} - -func (this *uint32Writer) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n := m.Size() - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - length := uint32(len(data)) - if err := binary.Write(this.w, this.byteOrder, &length); err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *uint32Writer) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type uint32Reader struct { - r io.Reader - byteOrder binary.ByteOrder - lenBuf []byte - buf []byte - maxSize int -} - -func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { - return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} -} - -func (this *uint32Reader) ReadMsg(msg proto.Message) error { - if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { - return err - } - length32 := this.byteOrder.Uint32(this.lenBuf) - length := int(length32) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if length >= len(this.buf) { - this.buf = make([]byte, length) - } - _, err := io.ReadFull(this.r, this.buf[:length]) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *uint32Reader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/varint.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/varint.go deleted file mode 100644 index 4e3569cac1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/io/varint.go +++ /dev/null @@ -1,128 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "bufio" - "encoding/binary" - "errors" - "github.com/gogo/protobuf/proto" - "io" -) - -var ( - errSmallBuffer = errors.New("Buffer Too Small") - errLargeValue = errors.New("Value is Larger than 64 bits") -) - -func NewDelimitedWriter(w io.Writer) WriteCloser { - return &varintWriter{w, make([]byte, 10), nil} -} - -type varintWriter struct { - w io.Writer - lenBuf []byte - buffer []byte -} - -func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n := m.Size() - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - length := uint64(len(data)) - n := binary.PutUvarint(this.lenBuf, length) - _, err = this.w.Write(this.lenBuf[:n]) - if err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *varintWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { - var closer io.Closer - if c, ok := r.(io.Closer); ok { - closer = c - } - return &varintReader{bufio.NewReader(r), nil, maxSize, closer} -} - -type varintReader struct { - r *bufio.Reader - buf []byte - maxSize int - closer io.Closer -} - -func (this *varintReader) ReadMsg(msg proto.Message) error { - length64, err := binary.ReadUvarint(this.r) - if err != nil { - return err - } - length := int(length64) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if len(this.buf) < length { - this.buf = make([]byte, length) - } - buf := this.buf[:length] - if _, err := io.ReadFull(this.r, buf); err != nil { - return err - } - return proto.Unmarshal(buf, msg) -} - -func (this *varintReader) Close() error { - if this.closer != nil { - return this.closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb.go deleted file mode 100644 index 6ad28cb5e0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb.go +++ /dev/null @@ -1,583 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package jsonpb provides marshaling/unmarshaling functionality between -protocol buffer and JSON objects. - -Compared to encoding/json, this library: - - encodes int64, uint64 as strings - - optionally encodes enums as integers -*/ -package jsonpb - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/gogo/protobuf/proto" -) - -var ( - byteArrayType = reflect.TypeOf([]byte{}) -) - -// Marshaler is a configurable object for converting between -// protocol buffer objects and a JSON representation for them -type Marshaler struct { - // Whether to render enum values as integers, as opposed to string values. - EnumsAsInts bool - - // A string to indent each level by. The presence of this field will - // also cause a space to appear between the field separator and - // value, and for newlines to be appear between fields and array - // elements. - Indent string -} - -// Marshal marshals a protocol buffer into JSON. -func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { - writer := &errWriter{writer: out} - return m.marshalObject(writer, pb, "") -} - -// MarshalToString converts a protocol buffer object to JSON string. -func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { - var buf bytes.Buffer - if err := m.Marshal(&buf, pb); err != nil { - return "", err - } - return buf.String(), nil -} - -type int32Slice []int32 - -// For sorting extensions ids to ensure stable output. -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// marshalObject writes a struct to the Writer. -func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent string) error { - out.write("{") - if m.Indent != "" { - out.write("\n") - } - - s := reflect.ValueOf(v).Elem() - firstField := true - for i := 0; i < s.NumField(); i++ { - value := s.Field(i) - valueField := s.Type().Field(i) - if strings.HasPrefix(valueField.Name, "XXX_") { - continue - } - - // TODO: proto3 objects should have default values omitted. - - // IsNil will panic on most value kinds. - switch value.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - if value.IsNil() { - continue - } - } - - // Oneof fields need special handling. - if valueField.Tag.Get("protobuf_oneof") != "" { - // value is an interface containing &T{real_value}. - sv := value.Elem().Elem() // interface -> *T -> T - value = sv.Field(0) - valueField = sv.Type().Field(0) - } - prop := jsonProperties(valueField) - if !firstField { - m.writeSep(out) - } - // If the map value is a cast type, it may not implement proto.Message, therefore - // allow the struct tag to declare the underlying message type. Instead of changing - // the signatures of the child types (and because prop.mvalue is not public), use - // CustomType as a passer. - if value.Kind() == reflect.Map { - if tag := valueField.Tag.Get("protobuf"); tag != "" { - for _, v := range strings.Split(tag, ",") { - if !strings.HasPrefix(v, "castvaluetype=") { - continue - } - v = strings.TrimPrefix(v, "castvaluetype=") - prop.CustomType = v - break - } - } - } - if err := m.marshalField(out, prop, value, indent); err != nil { - return err - } - firstField = false - } - - // Handle proto2 extensions. - if ep, ok := v.(extendableProto); ok { - extensions := proto.RegisteredExtensions(v) - extensionMap := ep.ExtensionMap() - // Sort extensions for stable output. - ids := make([]int32, 0, len(extensionMap)) - for id := range extensionMap { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - for _, id := range ids { - desc := extensions[id] - if desc == nil { - // unknown extension - continue - } - ext, extErr := proto.GetExtension(ep, desc) - if extErr != nil { - return extErr - } - value := reflect.ValueOf(ext) - var prop proto.Properties - prop.Parse(desc.Tag) - prop.OrigName = fmt.Sprintf("[%s]", desc.Name) - if !firstField { - m.writeSep(out) - } - if err := m.marshalField(out, &prop, value, indent); err != nil { - return err - } - firstField = false - } - - } - - if m.Indent != "" { - out.write("\n") - out.write(indent) - } - out.write("}") - return out.err -} - -func (m *Marshaler) writeSep(out *errWriter) { - if m.Indent != "" { - out.write(",\n") - } else { - out.write(",") - } -} - -// marshalField writes field description and value to the Writer. -func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - if m.Indent != "" { - out.write(indent) - out.write(m.Indent) - } - out.write(`"`) - out.write(prop.OrigName) - out.write(`":`) - if m.Indent != "" { - out.write(" ") - } - if err := m.marshalValue(out, prop, v, indent); err != nil { - return err - } - return nil -} - -// marshalValue writes the value to the Writer. -func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - - v = reflect.Indirect(v) - - // Handle repeated elements. - if v.Type() != byteArrayType && v.Kind() == reflect.Slice { - out.write("[") - comma := "" - for i := 0; i < v.Len(); i++ { - sliceVal := v.Index(i) - out.write(comma) - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - m.marshalValue(out, prop, sliceVal, indent+m.Indent) - comma = "," - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write("]") - return out.err - } - - // Handle enumerations. - if !m.EnumsAsInts && prop.Enum != "" { - // Unknown enum values will are stringified by the proto library as their - // value. Such values should _not_ be quoted or they will be interpreted - // as an enum string instead of their value. - enumStr := v.Interface().(fmt.Stringer).String() - var valStr string - if v.Kind() == reflect.Ptr { - valStr = strconv.Itoa(int(v.Elem().Int())) - } else { - valStr = strconv.Itoa(int(v.Int())) - } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - enumStr = string(data) - enumStr, err = strconv.Unquote(enumStr) - if err != nil { - return err - } - } - - isKnownEnum := enumStr != valStr - - if isKnownEnum { - out.write(`"`) - } - out.write(enumStr) - if isKnownEnum { - out.write(`"`) - } - return out.err - } - - // Handle nested messages. - if v.Kind() == reflect.Struct { - i := v - if v.CanAddr() { - i = v.Addr() - } else { - i = reflect.New(v.Type()) - i.Elem().Set(v) - } - iface := i.Interface() - if iface == nil { - out.write(`null`) - return out.err - } - pm, ok := iface.(proto.Message) - if !ok { - if prop.CustomType == "" { - return fmt.Errorf("%v does not implement proto.Message", v.Type()) - } - t := proto.MessageType(prop.CustomType) - if t == nil || !i.Type().ConvertibleTo(t) { - return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) - } - pm = i.Convert(t).Interface().(proto.Message) - } - return m.marshalObject(out, pm, indent+m.Indent) - } - - // Handle maps. - // Since Go randomizes map iteration, we sort keys for stable output. - if v.Kind() == reflect.Map { - out.write(`{`) - keys := v.MapKeys() - sort.Sort(mapKeys(keys)) - for i, k := range keys { - if i > 0 { - out.write(`,`) - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - - b, err := json.Marshal(k.Interface()) - if err != nil { - return err - } - s := string(b) - - // If the JSON is not a string value, encode it again to make it one. - if !strings.HasPrefix(s, `"`) { - b, err := json.Marshal(s) - if err != nil { - return err - } - s = string(b) - } - - out.write(s) - out.write(`:`) - if m.Indent != "" { - out.write(` `) - } - - if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { - return err - } - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write(`}`) - return out.err - } - - // Default handling defers to the encoding/json library. - b, err := json.Marshal(v.Interface()) - if err != nil { - return err - } - needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) - if needToQuote { - out.write(`"`) - } - out.write(string(b)) - if needToQuote { - out.write(`"`) - } - return out.err -} - -// Unmarshal unmarshals a JSON object stream into a protocol -// buffer. This function is lenient and will decode any options -// permutations of the related Marshaler. -func Unmarshal(r io.Reader, pb proto.Message) error { - inputValue := json.RawMessage{} - if err := json.NewDecoder(r).Decode(&inputValue); err != nil { - return err - } - return unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue) -} - -// UnmarshalString will populate the fields of a protocol buffer based -// on a JSON string. This function is lenient and will decode any options -// permutations of the related Marshaler. -func UnmarshalString(str string, pb proto.Message) error { - return Unmarshal(strings.NewReader(str), pb) -} - -// unmarshalValue converts/copies a value into the target. -func unmarshalValue(target reflect.Value, inputValue json.RawMessage) error { - targetType := target.Type() - - // Allocate memory for pointer fields. - if targetType.Kind() == reflect.Ptr { - target.Set(reflect.New(targetType.Elem())) - return unmarshalValue(target.Elem(), inputValue) - } - - // Handle nested messages. - if targetType.Kind() == reflect.Struct { - var jsonFields map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &jsonFields); err != nil { - return err - } - - sprops := proto.GetProperties(targetType) - for i := 0; i < target.NumField(); i++ { - ft := target.Type().Field(i) - if strings.HasPrefix(ft.Name, "XXX_") { - continue - } - fieldName := jsonProperties(ft).OrigName - - valueForField, ok := jsonFields[fieldName] - if !ok { - continue - } - delete(jsonFields, fieldName) - - // Handle enums, which have an underlying type of int32, - // and may appear as strings. We do this while handling - // the struct so we have access to the enum info. - // The case of an enum appearing as a number is handled - // by the recursive call to unmarshalValue. - if enum := sprops.Prop[i].Enum; valueForField[0] == '"' && enum != "" { - vmap := proto.EnumValueMap(enum) - // Don't need to do unquoting; valid enum names - // are from a limited character set. - s := valueForField[1 : len(valueForField)-1] - n, ok := vmap[string(s)] - if !ok { - return fmt.Errorf("unknown value %q for enum %s", s, enum) - } - f := target.Field(i) - if f.Kind() == reflect.Ptr { // proto2 - f.Set(reflect.New(f.Type().Elem())) - f = f.Elem() - } - f.SetInt(int64(n)) - continue - } - - if err := unmarshalValue(target.Field(i), valueForField); err != nil { - return err - } - } - // Check for any oneof fields. - for fname, raw := range jsonFields { - if oop, ok := sprops.OneofTypes[fname]; ok { - nv := reflect.New(oop.Type.Elem()) - target.Field(oop.Field).Set(nv) - if err := unmarshalValue(nv.Elem().Field(0), raw); err != nil { - return err - } - delete(jsonFields, fname) - } - } - if len(jsonFields) > 0 { - // Pick any field to be the scapegoat. - var f string - for fname := range jsonFields { - f = fname - break - } - return fmt.Errorf("unknown field %q in %v", f, targetType) - } - return nil - } - - // Handle arrays (which aren't encoded bytes) - if targetType != byteArrayType && targetType.Kind() == reflect.Slice { - var slc []json.RawMessage - if err := json.Unmarshal(inputValue, &slc); err != nil { - return err - } - len := len(slc) - target.Set(reflect.MakeSlice(targetType, len, len)) - for i := 0; i < len; i++ { - if err := unmarshalValue(target.Index(i), slc[i]); err != nil { - return err - } - } - return nil - } - - // Handle maps (whose keys are always strings) - if targetType.Kind() == reflect.Map { - var mp map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &mp); err != nil { - return err - } - target.Set(reflect.MakeMap(targetType)) - for ks, raw := range mp { - // Unmarshal map key. The core json library already decoded the key into a - // string, so we handle that specially. Other types were quoted post-serialization. - var k reflect.Value - if targetType.Key().Kind() == reflect.String { - k = reflect.ValueOf(ks) - } else { - k = reflect.New(targetType.Key()).Elem() - if err := unmarshalValue(k, json.RawMessage(ks)); err != nil { - return err - } - } - - if !k.Type().AssignableTo(targetType.Key()) { - k = k.Convert(targetType.Key()) - } - - // Unmarshal map value. - v := reflect.New(targetType.Elem()).Elem() - if err := unmarshalValue(v, raw); err != nil { - return err - } - target.SetMapIndex(k, v) - } - return nil - } - - // 64-bit integers can be encoded as strings. In this case we drop - // the quotes and proceed as normal. - isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 - if isNum && strings.HasPrefix(string(inputValue), `"`) { - inputValue = inputValue[1 : len(inputValue)-1] - } - - // Use the encoding/json for parsing other value types. - return json.Unmarshal(inputValue, target.Addr().Interface()) -} - -// jsonProperties returns parsed proto.Properties for the field. -func jsonProperties(f reflect.StructField) *proto.Properties { - var prop proto.Properties - prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) - return &prop -} - -// extendableProto is an interface implemented by any protocol buffer that may be extended. -type extendableProto interface { - proto.Message - ExtensionRangeArray() []proto.ExtensionRange - ExtensionMap() map[int32]proto.Extension -} - -// Writer wrapper inspired by https://blog.golang.org/errors-are-values -type errWriter struct { - writer io.Writer - err error -} - -func (w *errWriter) write(str string) { - if w.err != nil { - return - } - _, w.err = w.writer.Write([]byte(str)) -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. -type mapKeys []reflect.Value - -func (s mapKeys) Len() int { return len(s) } -func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s mapKeys) Less(i, j int) bool { - return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test.go deleted file mode 100644 index 9e62387b02..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test.go +++ /dev/null @@ -1,391 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package jsonpb - -import ( - "reflect" - "testing" - - pb "github.com/gogo/protobuf/jsonpb/jsonpb_test_proto" - "github.com/gogo/protobuf/proto" - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" -) - -var ( - marshaler = Marshaler{} - - marshalerAllOptions = Marshaler{ - Indent: " ", - } - - simpleObject = &pb.Simple{ - OInt32: proto.Int32(-32), - OInt64: proto.Int64(-6400000000), - OUint32: proto.Uint32(32), - OUint64: proto.Uint64(6400000000), - OSint32: proto.Int32(-13), - OSint64: proto.Int64(-2600000000), - OFloat: proto.Float32(3.14), - ODouble: proto.Float64(6.02214179e23), - OBool: proto.Bool(true), - OString: proto.String("hello \"there\""), - OBytes: []byte("beep boop"), - } - - simpleObjectJSON = `{` + - `"o_bool":true,` + - `"o_int32":-32,` + - `"o_int64":"-6400000000",` + - `"o_uint32":32,` + - `"o_uint64":"6400000000",` + - `"o_sint32":-13,` + - `"o_sint64":"-2600000000",` + - `"o_float":3.14,` + - `"o_double":6.02214179e+23,` + - `"o_string":"hello \"there\"",` + - `"o_bytes":"YmVlcCBib29w"` + - `}` - - simpleObjectPrettyJSON = `{ - "o_bool": true, - "o_int32": -32, - "o_int64": "-6400000000", - "o_uint32": 32, - "o_uint64": "6400000000", - "o_sint32": -13, - "o_sint64": "-2600000000", - "o_float": 3.14, - "o_double": 6.02214179e+23, - "o_string": "hello \"there\"", - "o_bytes": "YmVlcCBib29w" -}` - - repeatsObject = &pb.Repeats{ - RBool: []bool{true, false, true}, - RInt32: []int32{-3, -4, -5}, - RInt64: []int64{-123456789, -987654321}, - RUint32: []uint32{1, 2, 3}, - RUint64: []uint64{6789012345, 3456789012}, - RSint32: []int32{-1, -2, -3}, - RSint64: []int64{-6789012345, -3456789012}, - RFloat: []float32{3.14, 6.28}, - RDouble: []float64{299792458, 6.62606957e-34}, - RString: []string{"happy", "days"}, - RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, - } - - repeatsObjectJSON = `{` + - `"r_bool":[true,false,true],` + - `"r_int32":[-3,-4,-5],` + - `"r_int64":["-123456789","-987654321"],` + - `"r_uint32":[1,2,3],` + - `"r_uint64":["6789012345","3456789012"],` + - `"r_sint32":[-1,-2,-3],` + - `"r_sint64":["-6789012345","-3456789012"],` + - `"r_float":[3.14,6.28],` + - `"r_double":[2.99792458e+08,6.62606957e-34],` + - `"r_string":["happy","days"],` + - `"r_bytes":["c2tpdHRsZXM=","bSZtJ3M="]` + - `}` - - repeatsObjectPrettyJSON = `{ - "r_bool": [ - true, - false, - true - ], - "r_int32": [ - -3, - -4, - -5 - ], - "r_int64": [ - "-123456789", - "-987654321" - ], - "r_uint32": [ - 1, - 2, - 3 - ], - "r_uint64": [ - "6789012345", - "3456789012" - ], - "r_sint32": [ - -1, - -2, - -3 - ], - "r_sint64": [ - "-6789012345", - "-3456789012" - ], - "r_float": [ - 3.14, - 6.28 - ], - "r_double": [ - 2.99792458e+08, - 6.62606957e-34 - ], - "r_string": [ - "happy", - "days" - ], - "r_bytes": [ - "c2tpdHRsZXM=", - "bSZtJ3M=" - ] -}` - - innerSimple = &pb.Simple{OInt32: proto.Int32(-32)} - innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)} - innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}} - innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}} - complexObject = &pb.Widget{ - Color: pb.Widget_GREEN.Enum(), - RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE}, - Simple: innerSimple, - RSimple: []*pb.Simple{innerSimple, innerSimple2}, - Repeats: innerRepeats, - RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2}, - } - - complexObjectJSON = `{"color":"GREEN",` + - `"r_color":["RED","GREEN","BLUE"],` + - `"simple":{"o_int32":-32},` + - `"r_simple":[{"o_int32":-32},{"o_int64":"25"}],` + - `"repeats":{"r_string":["roses","red"]},` + - `"r_repeats":[{"r_string":["roses","red"]},{"r_string":["violets","blue"]}]` + - `}` - - complexObjectPrettyJSON = `{ - "color": "GREEN", - "r_color": [ - "RED", - "GREEN", - "BLUE" - ], - "simple": { - "o_int32": -32 - }, - "r_simple": [ - { - "o_int32": -32 - }, - { - "o_int64": "25" - } - ], - "repeats": { - "r_string": [ - "roses", - "red" - ] - }, - "r_repeats": [ - { - "r_string": [ - "roses", - "red" - ] - }, - { - "r_string": [ - "violets", - "blue" - ] - } - ] -}` - - colorPrettyJSON = `{ - "color": 2 -}` - - colorListPrettyJSON = `{ - "color": 1000, - "r_color": [ - "RED" - ] -}` - - nummyPrettyJSON = `{ - "nummy": { - "1": 2, - "3": 4 - } -}` - - objjyPrettyJSON = `{ - "objjy": { - "1": { - "dub": 1 - } - } -}` - realNumber = &pb.Real{Value: proto.Float64(3.14159265359)} - realNumberName = "Pi" - complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)} - realNumberJSON = `{` + - `"value":3.14159265359,` + - `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` + - `"[jsonpb.name]":"Pi"` + - `}` -) - -func init() { - if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { - panic(err) - } - if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { - panic(err) - } -} - -var marshalingTests = []struct { - desc string - marshaler Marshaler - pb proto.Message - json string -}{ - {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, - {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, - {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, - {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, - {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, - {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, - {"enum-string flat object", Marshaler{}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, - {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, - {"unknown enum value object", marshalerAllOptions, - &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, - {"proto3 object with empty value", marshaler, &pb.Simple3{}, `{"dub":0}`}, - {"map", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`}, - {"map", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON}, - {"map", marshaler, - &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, - `{"strry":{"\"one\"":"two","three":"four"}}`}, - {"map", marshaler, - &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, - {"map", marshalerAllOptions, - &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON}, - {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, - `{"buggy":{"1234":"yup"}}`}, - {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, - {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, - `{"m_int64_str":{"213":"cat"}}`}, - {"proto2 map", marshaler, - &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, - `{"m_bool_simple":{"true":{"o_int32":1}}}`}, - {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, - {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{Title: "Grand Poobah"}}, `{"title":"Grand Poobah"}`}, - {"proto2 extension", marshaler, realNumber, realNumberJSON}, -} - -func TestMarshaling(t *testing.T) { - for _, tt := range marshalingTests { - json, err := tt.marshaler.MarshalToString(tt.pb) - if err != nil { - t.Errorf("%s: marshaling error: %v", tt.desc, err) - } else if tt.json != json { - t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) - } - } -} - -var unmarshalingTests = []struct { - desc string - json string - pb proto.Message -}{ - {"simple flat object", simpleObjectJSON, simpleObject}, - {"simple pretty object", simpleObjectPrettyJSON, simpleObject}, - {"repeated fields flat object", repeatsObjectJSON, repeatsObject}, - {"repeated fields pretty object", repeatsObjectPrettyJSON, repeatsObject}, - {"nested message/enum flat object", complexObjectJSON, complexObject}, - {"nested message/enum pretty object", complexObjectPrettyJSON, complexObject}, - {"enum-string object", `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, - {"enum-value object", "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, - {"proto3 enum string", `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"proto3 enum value", `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"unknown enum value object", - "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}", - &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}}, - {"unquoted int64 object", `{"o_int64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, - {"unquoted uint64 object", `{"o_uint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, - {"map", `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, - {"map", `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, - {"map", `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, - {"oneof", `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{Salary: 31000}}}, -} - -func TestUnmarshaling(t *testing.T) { - for _, tt := range unmarshalingTests { - // Make a new instance of the type of our expected object. - p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) - - err := UnmarshalString(tt.json, p) - if err != nil { - t.Error(err) - continue - } - - // For easier diffs, compare text strings of the protos. - exp := proto.MarshalTextString(tt.pb) - act := proto.MarshalTextString(p) - if string(exp) != string(act) { - t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) - } - } -} - -var unmarshalingShouldError = []struct { - desc string - in string - pb proto.Message -}{ - {"a value", "666", new(pb.Simple)}, - {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, - {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)}, -} - -func TestUnmarshalingBadInput(t *testing.T) { - for _, tt := range unmarshalingShouldError { - err := UnmarshalString(tt.in, tt.pb) - if err == nil { - t.Errorf("an error was expected when parsing %q instead of an object", tt.desc) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/Makefile deleted file mode 100644 index 395c3add23..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2015 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc-min-version --version="3.0.0" --gogo_out=. *.proto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go deleted file mode 100644 index 46d74dc807..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: more_test_objects.proto -// DO NOT EDIT! - -/* -Package jsonpb is a generated protocol buffer package. - -It is generated from these files: - more_test_objects.proto - test_objects.proto - -It has these top-level messages: - Simple3 - Mappy - Simple - Repeats - Widget - Maps - MsgWithOneof - Real - Complex -*/ -package jsonpb - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Simple3 struct { - Dub float64 `protobuf:"fixed64,1,opt,name=dub,proto3" json:"dub,omitempty"` -} - -func (m *Simple3) Reset() { *m = Simple3{} } -func (m *Simple3) String() string { return proto.CompactTextString(m) } -func (*Simple3) ProtoMessage() {} - -type Mappy struct { - Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (m *Mappy) Reset() { *m = Mappy{} } -func (m *Mappy) String() string { return proto.CompactTextString(m) } -func (*Mappy) ProtoMessage() {} - -func (m *Mappy) GetNummy() map[int64]int32 { - if m != nil { - return m.Nummy - } - return nil -} - -func (m *Mappy) GetStrry() map[string]string { - if m != nil { - return m.Strry - } - return nil -} - -func (m *Mappy) GetObjjy() map[int32]*Simple3 { - if m != nil { - return m.Objjy - } - return nil -} - -func (m *Mappy) GetBuggy() map[int64]string { - if m != nil { - return m.Buggy - } - return nil -} - -func (m *Mappy) GetBooly() map[bool]bool { - if m != nil { - return m.Booly - } - return nil -} - -func init() { - proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") - proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto deleted file mode 100644 index 6535791632..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package jsonpb; - -message Simple3 { - double dub = 1; -} - -message Mappy { - map nummy = 1; - map strry = 2; - map objjy = 3; - map buggy = 4; - map booly = 5; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go deleted file mode 100644 index bb278ef7b6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go +++ /dev/null @@ -1,510 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test_objects.proto -// DO NOT EDIT! - -package jsonpb - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Widget_Color int32 - -const ( - Widget_RED Widget_Color = 0 - Widget_GREEN Widget_Color = 1 - Widget_BLUE Widget_Color = 2 -) - -var Widget_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Widget_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Widget_Color) Enum() *Widget_Color { - p := new(Widget_Color) - *p = x - return p -} -func (x Widget_Color) String() string { - return proto.EnumName(Widget_Color_name, int32(x)) -} -func (x *Widget_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") - if err != nil { - return err - } - *x = Widget_Color(value) - return nil -} - -// Test message for holding primitive types. -type Simple struct { - OBool *bool `protobuf:"varint,1,opt,name=o_bool" json:"o_bool,omitempty"` - OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32" json:"o_int32,omitempty"` - OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64" json:"o_int64,omitempty"` - OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32" json:"o_uint32,omitempty"` - OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64" json:"o_uint64,omitempty"` - OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32" json:"o_sint32,omitempty"` - OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64" json:"o_sint64,omitempty"` - OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float" json:"o_float,omitempty"` - ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double" json:"o_double,omitempty"` - OString *string `protobuf:"bytes,10,opt,name=o_string" json:"o_string,omitempty"` - OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes" json:"o_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Simple) Reset() { *m = Simple{} } -func (m *Simple) String() string { return proto.CompactTextString(m) } -func (*Simple) ProtoMessage() {} - -func (m *Simple) GetOBool() bool { - if m != nil && m.OBool != nil { - return *m.OBool - } - return false -} - -func (m *Simple) GetOInt32() int32 { - if m != nil && m.OInt32 != nil { - return *m.OInt32 - } - return 0 -} - -func (m *Simple) GetOInt64() int64 { - if m != nil && m.OInt64 != nil { - return *m.OInt64 - } - return 0 -} - -func (m *Simple) GetOUint32() uint32 { - if m != nil && m.OUint32 != nil { - return *m.OUint32 - } - return 0 -} - -func (m *Simple) GetOUint64() uint64 { - if m != nil && m.OUint64 != nil { - return *m.OUint64 - } - return 0 -} - -func (m *Simple) GetOSint32() int32 { - if m != nil && m.OSint32 != nil { - return *m.OSint32 - } - return 0 -} - -func (m *Simple) GetOSint64() int64 { - if m != nil && m.OSint64 != nil { - return *m.OSint64 - } - return 0 -} - -func (m *Simple) GetOFloat() float32 { - if m != nil && m.OFloat != nil { - return *m.OFloat - } - return 0 -} - -func (m *Simple) GetODouble() float64 { - if m != nil && m.ODouble != nil { - return *m.ODouble - } - return 0 -} - -func (m *Simple) GetOString() string { - if m != nil && m.OString != nil { - return *m.OString - } - return "" -} - -func (m *Simple) GetOBytes() []byte { - if m != nil { - return m.OBytes - } - return nil -} - -// Test message for holding repeated primitives. -type Repeats struct { - RBool []bool `protobuf:"varint,1,rep,name=r_bool" json:"r_bool,omitempty"` - RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32" json:"r_int32,omitempty"` - RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64" json:"r_int64,omitempty"` - RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32" json:"r_uint32,omitempty"` - RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64" json:"r_uint64,omitempty"` - RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32" json:"r_sint32,omitempty"` - RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64" json:"r_sint64,omitempty"` - RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float" json:"r_float,omitempty"` - RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double" json:"r_double,omitempty"` - RString []string `protobuf:"bytes,10,rep,name=r_string" json:"r_string,omitempty"` - RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes" json:"r_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Repeats) Reset() { *m = Repeats{} } -func (m *Repeats) String() string { return proto.CompactTextString(m) } -func (*Repeats) ProtoMessage() {} - -func (m *Repeats) GetRBool() []bool { - if m != nil { - return m.RBool - } - return nil -} - -func (m *Repeats) GetRInt32() []int32 { - if m != nil { - return m.RInt32 - } - return nil -} - -func (m *Repeats) GetRInt64() []int64 { - if m != nil { - return m.RInt64 - } - return nil -} - -func (m *Repeats) GetRUint32() []uint32 { - if m != nil { - return m.RUint32 - } - return nil -} - -func (m *Repeats) GetRUint64() []uint64 { - if m != nil { - return m.RUint64 - } - return nil -} - -func (m *Repeats) GetRSint32() []int32 { - if m != nil { - return m.RSint32 - } - return nil -} - -func (m *Repeats) GetRSint64() []int64 { - if m != nil { - return m.RSint64 - } - return nil -} - -func (m *Repeats) GetRFloat() []float32 { - if m != nil { - return m.RFloat - } - return nil -} - -func (m *Repeats) GetRDouble() []float64 { - if m != nil { - return m.RDouble - } - return nil -} - -func (m *Repeats) GetRString() []string { - if m != nil { - return m.RString - } - return nil -} - -func (m *Repeats) GetRBytes() [][]byte { - if m != nil { - return m.RBytes - } - return nil -} - -// Test message for holding enums and nested messages. -type Widget struct { - Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` - RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` - Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` - RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple" json:"r_simple,omitempty"` - Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` - RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats" json:"r_repeats,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Widget) Reset() { *m = Widget{} } -func (m *Widget) String() string { return proto.CompactTextString(m) } -func (*Widget) ProtoMessage() {} - -func (m *Widget) GetColor() Widget_Color { - if m != nil && m.Color != nil { - return *m.Color - } - return Widget_RED -} - -func (m *Widget) GetRColor() []Widget_Color { - if m != nil { - return m.RColor - } - return nil -} - -func (m *Widget) GetSimple() *Simple { - if m != nil { - return m.Simple - } - return nil -} - -func (m *Widget) GetRSimple() []*Simple { - if m != nil { - return m.RSimple - } - return nil -} - -func (m *Widget) GetRepeats() *Repeats { - if m != nil { - return m.Repeats - } - return nil -} - -func (m *Widget) GetRRepeats() []*Repeats { - if m != nil { - return m.RRepeats - } - return nil -} - -type Maps struct { - MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Maps) Reset() { *m = Maps{} } -func (m *Maps) String() string { return proto.CompactTextString(m) } -func (*Maps) ProtoMessage() {} - -func (m *Maps) GetMInt64Str() map[int64]string { - if m != nil { - return m.MInt64Str - } - return nil -} - -func (m *Maps) GetMBoolSimple() map[bool]*Simple { - if m != nil { - return m.MBoolSimple - } - return nil -} - -type MsgWithOneof struct { - // Types that are valid to be assigned to Union: - // *MsgWithOneof_Title - // *MsgWithOneof_Salary - Union isMsgWithOneof_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } -func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } -func (*MsgWithOneof) ProtoMessage() {} - -type isMsgWithOneof_Union interface { - isMsgWithOneof_Union() -} - -type MsgWithOneof_Title struct { - Title string `protobuf:"bytes,1,opt,name=title,oneof"` -} -type MsgWithOneof_Salary struct { - Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` -} - -func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} - -func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *MsgWithOneof) GetTitle() string { - if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { - return x.Title - } - return "" -} - -func (m *MsgWithOneof) GetSalary() int64 { - if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { - return x.Salary - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, []interface{}{ - (*MsgWithOneof_Title)(nil), - (*MsgWithOneof_Salary)(nil), - } -} - -func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*MsgWithOneof) - // union - switch x := m.Union.(type) { - case *MsgWithOneof_Title: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Title) - case *MsgWithOneof_Salary: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Salary)) - case nil: - default: - return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) - } - return nil -} - -func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*MsgWithOneof) - switch tag { - case 1: // union.title - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_Title{x} - return true, err - case 2: // union.salary - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &MsgWithOneof_Salary{int64(x)} - return true, err - default: - return false, nil - } -} - -type Real struct { - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Real) Reset() { *m = Real{} } -func (m *Real) String() string { return proto.CompactTextString(m) } -func (*Real) ProtoMessage() {} - -var extRange_Real = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Real) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Real -} -func (m *Real) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -func (m *Real) GetValue() float64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type Complex struct { - Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Complex) Reset() { *m = Complex{} } -func (m *Complex) String() string { return proto.CompactTextString(m) } -func (*Complex) ProtoMessage() {} - -var extRange_Complex = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Complex -} -func (m *Complex) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -func (m *Complex) GetImaginary() float64 { - if m != nil && m.Imaginary != nil { - return *m.Imaginary - } - return 0 -} - -var E_Complex_RealExtension = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*Complex)(nil), - Field: 123, - Name: "jsonpb.Complex.real_extension", - Tag: "bytes,123,opt,name=real_extension", -} - -var E_Name = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*string)(nil), - Field: 124, - Name: "jsonpb.name", - Tag: "bytes,124,opt,name=name", -} - -func init() { - proto.RegisterType((*Simple)(nil), "jsonpb.Simple") - proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") - proto.RegisterType((*Widget)(nil), "jsonpb.Widget") - proto.RegisterType((*Maps)(nil), "jsonpb.Maps") - proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") - proto.RegisterType((*Real)(nil), "jsonpb.Real") - proto.RegisterType((*Complex)(nil), "jsonpb.Complex") - proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) - proto.RegisterExtension(E_Complex_RealExtension) - proto.RegisterExtension(E_Name) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.proto deleted file mode 100644 index 77f7fba9ee..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/jsonpb/jsonpb_test_proto/test_objects.proto +++ /dev/null @@ -1,110 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package jsonpb; - -// Test message for holding primitive types. -message Simple { - optional bool o_bool = 1; - optional int32 o_int32 = 2; - optional int64 o_int64 = 3; - optional uint32 o_uint32 = 4; - optional uint64 o_uint64 = 5; - optional sint32 o_sint32 = 6; - optional sint64 o_sint64 = 7; - optional float o_float = 8; - optional double o_double = 9; - optional string o_string = 10; - optional bytes o_bytes = 11; -} - -// Test message for holding repeated primitives. -message Repeats { - repeated bool r_bool = 1; - repeated int32 r_int32 = 2; - repeated int64 r_int64 = 3; - repeated uint32 r_uint32 = 4; - repeated uint64 r_uint64 = 5; - repeated sint32 r_sint32 = 6; - repeated sint64 r_sint64 = 7; - repeated float r_float = 8; - repeated double r_double = 9; - repeated string r_string = 10; - repeated bytes r_bytes = 11; -} - -// Test message for holding enums and nested messages. -message Widget { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color color = 1; - repeated Color r_color = 2; - - optional Simple simple = 10; - repeated Simple r_simple = 11; - - optional Repeats repeats = 20; - repeated Repeats r_repeats = 21; -} - -message Maps { - map m_int64_str = 1; - map m_bool_simple = 2; -} - -message MsgWithOneof { - oneof union { - string title = 1; - int64 salary = 2; - } -} - -message Real { - optional double value = 1; - extensions 100 to max; -} - -extend Real { - optional string name = 124; -} - -message Complex { - extend Real { - optional Complex real_extension = 123; - } - optional double imaginary = 1; - extensions 100 to max; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/package.json b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/package.json deleted file mode 100644 index 4be9830b08..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "gogo-protobuf", - "author": "whyrusleeping", - "version": "0.0.0", - "language": "go", - "issues_url": "", - "gx": { - "dvcsimport": "github.com/gogo/protobuf" - } -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/defaultcheck/defaultcheck.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/defaultcheck/defaultcheck.go deleted file mode 100644 index 690ad0df3c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/defaultcheck/defaultcheck.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The defaultcheck plugin is used to check whether nullable is not used incorrectly. -For instance: -An error is caused if a nullable field: - - has a default value, - - is an enum which does not start at zero, - - is used for an extension, - - is used for a native proto3 type, - - is used for a repeated native type. - -An error is also caused if a field with a default value is used in a message: - - which is a face. - - without getters. - -It is enabled by the following extensions: - - - nullable - -For incorrect usage of nullable with tests see: - - github.com/gogo/protobuf/test/nullableconflict - -*/ -package defaultcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "defaultcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - for _, msg := range file.Messages() { - getters := gogoproto.HasGoGetters(file.FileDescriptorProto, msg.DescriptorProto) - face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) - for _, field := range msg.GetField() { - if len(field.GetDefaultValue()) > 0 { - if !getters { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value and not have a getter method", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if face { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value be in a face", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - } - if gogoproto.IsNullable(field) { - continue - } - if len(field.GetDefaultValue()) > 0 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and have a default value", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if !field.IsMessage() && !gogoproto.IsCustomType(field) { - if field.IsRepeated() { - fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a repeated non-nullable native type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - } else if proto3 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v is a native type and in proto3 syntax with nullable=false there exists conflicting implementations when encoding zero values", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if field.IsBytes() { - fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a non-nullable bytes type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - } - } - if !field.IsEnum() { - continue - } - enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) - if len(enum.Value) == 0 || enum.Value[0].GetNumber() != 0 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and be an enum type %v which does not start with zero", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name), enum.GetName()) - os.Exit(1) - } - } - } - for _, e := range file.GetExtension() { - if !gogoproto.IsNullable(e) { - fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be nullable %v", generator.CamelCase(e.GetName()), generator.CamelCase(*e.Name)) - os.Exit(1) - } - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/description.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/description.go deleted file mode 100644 index 002e2ebc5c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/description.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The description (experimental) plugin generates a Description method for each message. -The Description method returns a populated google_protobuf.FileDescriptorSet struct. -This contains the description of the files used to generate this message. - -It is enabled by the following extensions: - - - description - - description_all - -The description plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the description plugin, will generate the following code: - - func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { - return ExampleDescription() - } - -and the following test code: - - func TestDescription(t *testing9.T) { - ExampleDescription() - } - -The hope is to use this struct in some way instead of reflect. -This package is subject to change, since a use has not been figured out yet. - -*/ -package description - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type plugin struct { - *generator.Generator - used bool -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "description" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.used = false - localName := generator.FileName(file) - for _, message := range file.Messages() { - if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.used = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) Description() (desc *descriptor.FileDescriptorSet) {`) - p.In() - p.P(`return `, localName, `Description()`) - p.Out() - p.P(`}`) - } - - if p.used { - - p.P(`func `, localName, `Description() (desc *descriptor.FileDescriptorSet) {`) - p.In() - //Don't generate SourceCodeInfo, since it will create too much code. - - ss := make([]*descriptor.SourceCodeInfo, 0) - for _, f := range p.Generator.AllFiles().GetFile() { - ss = append(ss, f.SourceCodeInfo) - f.SourceCodeInfo = nil - } - s := fmt.Sprintf("%#v", p.Generator.AllFiles()) - for i, f := range p.Generator.AllFiles().GetFile() { - f.SourceCodeInfo = ss[i] - } - p.P(`return `, s) - p.Out() - p.P(`}`) - } -} - -func (this *plugin) GenerateImports(file *generator.FileDescriptor) { - if this.used { - this.P(`import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"`) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/descriptiontest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/descriptiontest.go deleted file mode 100644 index 7feaf32091..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/description/descriptiontest.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package description - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) || - !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - used = true - } - - if used { - localName := generator.FileName(file) - p.P(`func Test`, localName, `Description(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(localName, `Description()`) - p.Out() - p.P(`}`) - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/embedcheck/embedcheck.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/embedcheck/embedcheck.go deleted file mode 100644 index 460dc77523..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/embedcheck/embedcheck.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The embedcheck plugin is used to check whether embed is not used incorrectly. -For instance: -An embedded message has a generated string method, but the is a member of a message which does not. -This causes a warning. -An error is caused by a namespace conflict. - -It is enabled by the following extensions: - - - embed - - embed_all - -For incorrect usage of embed with tests see: - - github.com/gogo/protobuf/test/embedconflict - -*/ -package embedcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "embedcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -var overwriters []map[string]gogoproto.EnableFunc = []map[string]gogoproto.EnableFunc{ - { - "stringer": gogoproto.IsStringer, - }, - { - "gostring": gogoproto.HasGoString, - }, - { - "equal": gogoproto.HasEqual, - }, - { - "verboseequal": gogoproto.HasVerboseEqual, - }, - { - "size": gogoproto.IsSizer, - }, - { - "unmarshaler": gogoproto.IsUnmarshaler, - "unsafe_unmarshaler": gogoproto.IsUnsafeUnmarshaler, - }, - { - "marshaler": gogoproto.IsMarshaler, - "unsafe_marshaler": gogoproto.IsUnsafeMarshaler, - }, -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, msg := range file.Messages() { - for _, os := range overwriters { - possible := true - for _, overwriter := range os { - if overwriter(file.FileDescriptorProto, msg.DescriptorProto) { - possible = false - } - } - if possible { - p.checkOverwrite(msg, os) - } - } - p.checkNameSpace(msg) - for _, field := range msg.GetField() { - if gogoproto.IsEmbed(field) && gogoproto.IsCustomName(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v with custom name %v cannot be embedded", *field.Name, gogoproto.GetCustomName(field)) - os.Exit(1) - } - } - p.checkRepeated(msg) - } - for _, e := range file.GetExtension() { - if gogoproto.IsEmbed(e) { - fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be embedded", generator.CamelCase(*e.Name)) - os.Exit(1) - } - } -} - -func (p *plugin) checkNameSpace(message *generator.Descriptor) map[string]bool { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - names := make(map[string]bool) - for _, field := range message.Field { - fieldname := generator.CamelCase(*field.Name) - if field.IsMessage() && gogoproto.IsEmbed(field) { - desc := p.ObjectNamed(field.GetTypeName()) - moreNames := p.checkNameSpace(desc.(*generator.Descriptor)) - for another := range moreNames { - if names[another] { - fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) - os.Exit(1) - } - names[another] = true - } - } else { - if names[fieldname] { - fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) - os.Exit(1) - } - names[fieldname] = true - } - } - return names -} - -func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[string]gogoproto.EnableFunc) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - names := []string{} - for name := range enablers { - names = append(names, name) - } - for _, field := range message.Field { - if field.IsMessage() && gogoproto.IsEmbed(field) { - fieldname := generator.CamelCase(*field.Name) - desc := p.ObjectNamed(field.GetTypeName()) - msg := desc.(*generator.Descriptor) - for errStr, enabled := range enablers { - if enabled(msg.File(), msg.DescriptorProto) { - fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname) - } - } - p.checkOverwrite(msg, enablers) - } - } -} - -func (p *plugin) checkRepeated(message *generator.Descriptor) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - for _, field := range message.Field { - if !gogoproto.IsEmbed(field) { - continue - } - if field.IsBytes() { - fieldname := generator.CamelCase(*field.Name) - fmt.Fprintf(os.Stderr, "ERROR: found embedded bytes field %s in message %s\n", fieldname, ccTypeName) - os.Exit(1) - } - if !field.IsRepeated() { - continue - } - fieldname := generator.CamelCase(*field.Name) - fmt.Fprintf(os.Stderr, "ERROR: found repeated embedded field %s in message %s\n", fieldname, ccTypeName) - os.Exit(1) - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/enumstringer/enumstringer.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/enumstringer/enumstringer.go deleted file mode 100644 index 7feb8be18f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/enumstringer/enumstringer.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The enumstringer (experimental) plugin generates a String method for each enum. - -It is enabled by the following extensions: - - - enum_stringer - - enum_stringer_all - -This package is subject to change. - -*/ -package enumstringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type enumstringer struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewEnumStringer() *enumstringer { - return &enumstringer{} -} - -func (p *enumstringer) Name() string { - return "enumstringer" -} - -func (p *enumstringer) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *enumstringer) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - strconvPkg := p.NewImport("strconv") - - for _, enum := range file.Enums() { - if !gogoproto.IsEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { - continue - } - if gogoproto.IsGoEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { - panic("old enum string method needs to be disabled, please use gogoproto.old_enum_stringer or gogoproto.old_enum_string_all and set it to false") - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(enum.TypeName()) - p.P("func (x ", ccTypeName, ") String() string {") - p.In() - p.P(`s, ok := `, ccTypeName, `_name[int32(x)]`) - p.P(`if ok {`) - p.In() - p.P(`return s`) - p.Out() - p.P(`}`) - p.P(`return `, strconvPkg.Use(), `.Itoa(int(x))`) - p.Out() - p.P(`}`) - } - - if !p.atleastOne { - return - } - -} - -func init() { - generator.RegisterPlugin(NewEnumStringer()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equal.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equal.go deleted file mode 100644 index 8c7cd6beeb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equal.go +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The equal plugin generates an Equal and a VerboseEqual method for each message. -These equal methods are quite obvious. -The only difference is that VerboseEqual returns a non nil error if it is not equal. -This error contains more detail on exactly which part of the message was not equal to the other message. -The idea is that this is useful for debugging. - -Equal is enabled using the following extensions: - - - equal - - equal_all - -While VerboseEqual is enable dusing the following extensions: - - - verbose_equal - - verbose_equal_all - -The equal plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.equal_all) = true; - option (gogoproto.verbose_equal_all) = true; - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the equal plugin, will generate the following code: - - func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt2.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - return fmt2.Errorf("that is not of type *B") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt2.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt2.Errorf("that is type *B but is not nil && this == nil") - } - if !this.A.Equal(&that1.A) { - return fmt2.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if len(this.G) != len(that1.G) { - return fmt2.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return fmt2.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt2.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil - } - - func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(&that1.A) { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true - } - -and the following test code: - - func TestBVerboseEqual(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto2.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } - -*/ -package equal - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type plugin struct { - *generator.Generator - generator.PluginImports - fmtPkg generator.Single - bytesPkg generator.Single -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "equal" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.fmtPkg = p.NewImport("fmt") - p.bytesPkg = p.NewImport("bytes") - - for _, msg := range file.Messages() { - if msg.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, msg.DescriptorProto) { - p.generateMessage(file, msg, true) - } - if gogoproto.HasEqual(file.FileDescriptorProto, msg.DescriptorProto) { - p.generateMessage(file, msg, false) - } - } -} - -func (p *plugin) generateNullableField(fieldname string, verbose bool) { - p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) - p.In() - p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", *this.`, fieldname, `, *that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that.`, fieldname, ` != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`} else if that1.`, fieldname, ` != nil {`) -} - -func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { - p.P(`if that == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.P(``) - p.P(`that1, ok := that.(*`, ccTypeName, `)`) - p.P(`if !ok {`) - p.In() - p.P(`that2, ok := that.(`, ccTypeName, `)`) - p.P(`if ok {`) - p.In() - p.P(`that1 = &that2`) - p.Out() - p.P(`} else {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is not of type *`, ccTypeName, `")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`if that1 == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`} else if this == nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is not nil && this == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) -} - -func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, verbose bool) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - fieldname := p.GetOneOfFieldName(message, field) - repeated := field.IsRepeated() - ctype := gogoproto.IsCustomType(field) - nullable := gogoproto.IsNullable(field) - // oneof := field.OneofIndex != nil - if !repeated { - if ctype { - if nullable { - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if !this.`, fieldname, `.Equal(*that1.`, fieldname, `) {`) - } else { - p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } else { - if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } else { - p.P(`if !this.`, fieldname, `.Equal(&that1.`, fieldname, `) {`) - } - } else if field.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - } else if field.IsString() { - if nullable && !proto3 { - p.generateNullableField(fieldname, verbose) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - } - } else { - if nullable && !proto3 { - p.generateNullableField(fieldname, verbose) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - } - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - } else { - p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", len(this.`, fieldname, `), len(that1.`, fieldname, `))`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.P(`for i := range this.`, fieldname, ` {`) - p.In() - if ctype { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - if p.IsMap(field) { - m := p.GoMapType(nil, field) - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - mapValue := m.ValueAliasField - if mapValue.IsMessage() || p.IsGroup(mapValue) { - if nullable && valuegoTyp == valuegoAliasTyp { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - // Equal() has a pointer receiver, but map value is a value type - a := `this.` + fieldname + `[i]` - b := `that1.` + fieldname + `[i]` - if valuegoTyp != valuegoAliasTyp { - // cast back to the type that has the generated methods on it - a = `(` + valuegoTyp + `)(` + a + `)` - b = `(` + valuegoTyp + `)(` + b + `)` - } - p.P(`a := `, a) - p.P(`b := `, b) - if nullable { - p.P(`if !a.Equal(b) {`) - } else { - p.P(`if !(&a).Equal(&b) {`) - } - } - } else if mapValue.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) - } else if mapValue.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } - } else if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - p.P(`if !this.`, fieldname, `[i].Equal(&that1.`, fieldname, `[i]) {`) - } - } else if field.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) - } else if field.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", i, this.`, fieldname, `[i], i, that1.`, fieldname, `[i])`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } -} - -func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor, verbose bool) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if verbose { - p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) - } else { - p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) - } - p.In() - p.generateMsgNullAndTypeCheck(ccTypeName, verbose) - oneofs := make(map[string]struct{}) - - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if oneof { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` == nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that1.`, fieldname, ` != nil")`) - } else { - p.P(`return false`) - } - p.Out() - if verbose { - p.P(`} else if err := this.`, fieldname, `.VerboseEqual(that1.`, fieldname, `); err != nil {`) - } else { - p.P(`} else if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } - p.In() - if verbose { - p.P(`return err`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } else { - p.generateField(file, message, field, verbose) - } - } - if message.DescriptorProto.HasExtension() { - fieldname := "XXX_extensions" - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`for k, v := range this.`, fieldname, ` {`) - p.In() - p.P(`if v2, ok := that1.`, fieldname, `[k]; ok {`) - p.In() - p.P(`if !v.Equal(&v2) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", k, this.`, fieldname, `[k], k, that1.`, fieldname, `[k])`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In that", k)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - p.P(`for k, _ := range that1.`, fieldname, ` {`) - p.In() - p.P(`if _, ok := this.`, fieldname, `[k]; !ok {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In this", k)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } else { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - fieldname := "XXX_unrecognized" - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - - //Generate Equal methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, field := range m.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - if verbose { - p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) - } else { - p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) - } - p.In() - - p.generateMsgNullAndTypeCheck(ccTypeName, verbose) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) - p.generateField(file, message, field, verbose) - - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equaltest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equaltest.go deleted file mode 100644 index 2fec835515..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/equal/equaltest.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package equal - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `VerboseEqual(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/face.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/face.go deleted file mode 100644 index 06529a30f1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/face.go +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The face plugin generates a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. -This interface contains getters for each of the fields in the struct. -The specified struct is also generated with the getters. -This means that getters should be turned off so as not to conflict with face getters. -This allows it to satisfy its own face. - -It is enabled by the following extensions: - - - face - - face_all - -Turn off getters by using the following extensions: - - - getters - - getters_all - -The face plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message A { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the face plugin, will generate the following code: - - type AFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDescription() string - GetNumber() int64 - GetId() github_com_gogo_protobuf_test_custom.Uuid - } - - func (this *A) Proto() github_com_gogo_protobuf_proto.Message { - return this - } - - func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAFromFace(this) - } - - func (this *A) GetDescription() string { - return this.Description - } - - func (this *A) GetNumber() int64 { - return this.Number - } - - func (this *A) GetId() github_com_gogo_protobuf_test_custom.Uuid { - return this.Id - } - - func NewAFromFace(that AFace) *A { - this := &A{} - this.Description = that.GetDescription() - this.Number = that.GetNumber() - this.Id = that.GetId() - return this - } - -and the following test code: - - func TestAFace(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) - p := NewPopulatedA(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } - } - -The struct A, representing the message, will also be generated just like always. -As you can see A satisfies its own Face, AFace. - -Creating another struct which satisfies AFace is very easy. -Simply create all these methods specified in AFace. -Implementing The Proto method is done with the helper function NewAFromFace: - - func (this *MyStruct) Proto() proto.Message { - return NewAFromFace(this) - } - -just the like TestProto method which is used to test the NewAFromFace function. - -*/ -package face - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type plugin struct { - *generator.Generator - generator.PluginImports -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "face" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if message.DescriptorProto.HasExtension() { - panic("face does not support message with extensions") - } - if gogoproto.HasGoGetters(file.FileDescriptorProto, message.DescriptorProto) { - panic("face requires getters to be disabled please use gogoproto.getters or gogoproto.getters_all and set it to false") - } - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`type `, ccTypeName, `Face interface{`) - p.In() - p.P(`Proto() `, protoPkg.Use(), `.Message`) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - if p.IsMap(field) { - m := p.GoMapType(nil, field) - goTyp = m.GoType - } - p.P(`Get`, fieldname, `() `, goTyp) - } - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) Proto() `, protoPkg.Use(), `.Message {`) - p.In() - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) TestProto() `, protoPkg.Use(), `.Message {`) - p.In() - p.P(`return New`, ccTypeName, `FromFace(this)`) - p.Out() - p.P(`}`) - p.P(``) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - if generator.IsMap(file.FileDescriptorProto, field) { - m := p.GoMapType(nil, field) - goTyp = m.GoType - } - p.P(`func (this *`, ccTypeName, `) Get`, fieldname, `() `, goTyp, `{`) - p.In() - p.P(` return this.`, fieldname) - p.Out() - p.P(`}`) - p.P(``) - } - p.P(``) - p.P(`func New`, ccTypeName, `FromFace(that `, ccTypeName, `Face) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - p.P(`this.`, fieldname, ` = that.Get`, fieldname, `()`) - } - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/facetest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/facetest.go deleted file mode 100644 index 305e092ef7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/face/facetest.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package face - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `Face(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`msg := p.TestProto()`) - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("%#v !Face Equal %#v", msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostring.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostring.go deleted file mode 100644 index 4374ce4ba0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostring.go +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The gostring plugin generates a GoString method for each message. -The GoString method is called whenever you use a fmt.Printf as such: - - fmt.Printf("%#v", mymessage) - -or whenever you actually call GoString() -The output produced by the GoString method can be copied from the output into code and used to set a variable. -It is totally valid Go Code and is populated exactly as the struct that was printed out. - -It is enabled by the following extensions: - - - gostring - - gostring_all - -The gostring plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.gostring_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the gostring plugin, will generate the following code: - - func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s - } - -and the following test code: - - func TestAGoString(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt2.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } - } - -Typically fmt.Printf("%#v") will stop to print when it reaches a pointer and -not print their values, while the generated GoString method will always print all values, recursively. - -*/ -package gostring - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "strconv" - "strings" -) - -type gostring struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewGoString() *gostring { - return &gostring{} -} - -func (p *gostring) Name() string { - return "gostring" -} - -func (p *gostring) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *gostring) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - fmtPkg := p.NewImport("fmt") - stringsPkg := p.NewImport("strings") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - sortPkg := p.NewImport("sort") - strconvPkg := p.NewImport("strconv") - reflectPkg := p.NewImport("reflect") - sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") - - for _, message := range file.Messages() { - if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - packageName := file.PackageName() - - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) GoString() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - - p.P(`s := make([]string, 0, `, strconv.Itoa(len(message.Field)+4), `)`) - p.P(`s = append(s, "&`, packageName, ".", ccTypeName, `{")`) - - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - fieldname := p.GetFieldName(message, field) - oneof := field.OneofIndex != nil - if oneof { - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - p.Out() - p.P(`}`) - } else if generator.IsMap(file.FileDescriptorProto, field) { - m := p.GoMapType(nil, field) - mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField - keysName := `keysFor` + fieldname - keygoTyp, _ := p.GoType(nil, keyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, keyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - keyCapTyp := generator.CamelCase(keygoTyp) - p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) - p.P(`for k, _ := range this.`, fieldname, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(keysName, ` = append(`, keysName, `, k)`) - } else { - p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) - } - p.Out() - p.P(`}`) - p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) - mapName := `mapStringFor` + fieldname - p.P(mapName, ` := "`, mapgoTyp, `{"`) - p.P(`for _, k := range `, keysName, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[k])`) - } else { - p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) - } - p.Out() - p.P(`}`) - p.P(mapName, ` += "}"`) - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`) - p.Out() - p.P(`}`) - } else if field.IsMessage() || p.IsGroup(field) { - if nullable || repeated { - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - } - if nullable { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } else if repeated { - p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`, ",`&`,``,1)", ` + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(this.`, fieldname, `.GoString()`, ",`&`,``,1)", ` + ",\n")`) - } - if nullable || repeated { - p.Out() - p.P(`}`) - } - } else { - if !proto3 && (nullable || repeated) { - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - } - if field.IsEnum() { - if nullable && !repeated && !proto3 { - goTyp, _ := p.GoType(message, field) - p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, packageName, ".", generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } - } else { - if nullable && !repeated && !proto3 { - goTyp, _ := p.GoType(message, field) - p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } - } - if !proto3 && (nullable || repeated) { - p.Out() - p.P(`}`) - } - } - } - if message.DescriptorProto.HasExtension() { - p.P(`if this.XXX_extensions != nil {`) - p.In() - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`s = append(s, "XXX_extensions: " + extensionToGoString`, p.localName, `(this.XXX_extensions) + ",\n")`) - } else { - p.P(`s = append(s, "XXX_extensions: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_extensions) + ",\n")`) - } - p.Out() - p.P(`}`) - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if this.XXX_unrecognized != nil {`) - p.In() - p.P(`s = append(s, "XXX_unrecognized:" + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_unrecognized) + ",\n")`) - p.Out() - p.P(`}`) - } - - p.P(`s = append(s, "}")`) - //outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") - p.P(`return `, stringsPkg.Use(), `.Join(s, "")`) - p.Out() - p.P(`}`) - - //Generate GoString methods for oneof fields - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (this *`, ccTypeName, `) GoString() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - outFlds := []string{} - fieldname := p.GetOneOfFieldName(message, field) - if field.IsMessage() || p.IsGroup(field) { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`}, "") - outFlds = append(outFlds, tmp) - } else { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, ")"}, "") - outFlds = append(outFlds, tmp) - } - outStr := strings.Join([]string{"s := ", stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n"}, "") - outStr += strings.Join(outFlds, ",\n") - outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") - p.P(outStr) - p.P(`return s`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`func valueToGoString`, p.localName, `(v interface{}, typ string) string {`) - p.In() - p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) - p.P(`if rv.IsNil() {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) - p.P(`return `, fmtPkg.Use(), `.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)`) - p.Out() - p.P(`}`) - - p.P(`func extensionToGoString`, p.localName, `(e map[int32]`, protoPkg.Use(), `.Extension) string {`) - p.In() - p.P(`if e == nil { return "nil" }`) - p.P(`s := "map[int32]proto.Extension{"`) - p.P(`keys := make([]int, 0, len(e))`) - p.P(`for k := range e {`) - p.In() - p.P(`keys = append(keys, int(k))`) - p.Out() - p.P(`}`) - p.P(sortPkg.Use(), `.Ints(keys)`) - p.P(`ss := []string{}`) - p.P(`for _, k := range keys {`) - p.In() - p.P(`ss = append(ss, `, strconvPkg.Use(), `.Itoa(k) + ": " + e[int32(k)].GoString())`) - p.Out() - p.P(`}`) - p.P(`s+=`, stringsPkg.Use(), `.Join(ss, ",") + "}"`) - p.P(`return s`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewGoString()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostringtest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostringtest.go deleted file mode 100644 index 5397749056..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/gostring/gostringtest.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package gostring - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - fmtPkg := imports.NewImport("fmt") - parserPkg := imports.NewImport("go/parser") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `GoString(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`s1 := p.GoString()`) - p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%#v", p)`) - p.P(`if s1 != s2 {`) - p.In() - p.P(`t.Fatalf("GoString want %v got %v", s1, s2)`) - p.Out() - p.P(`}`) - p.P(`_, err := `, parserPkg.Use(), `.ParseExpr(s1)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/grpc/grpc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/grpc/grpc.go deleted file mode 100644 index d769adc9a6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/grpc/grpc.go +++ /dev/null @@ -1,439 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Package grpc outputs gRPC service descriptions in Go code. -// It runs as a plugin for the Go protocol buffer compiler plugin. -// It is linked in to protoc-gen-go. -package grpc - -import ( - "fmt" - "path" - "strconv" - "strings" - - pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -// Paths for packages used by code generated in this file, -// relative to the import_prefix of the generator.Generator. -const ( - contextPkgPath = "golang.org/x/net/context" - grpcPkgPath = "google.golang.org/grpc" -) - -func init() { - generator.RegisterPlugin(new(grpc)) -} - -// grpc is an implementation of the Go protocol buffer compiler's -// plugin architecture. It generates bindings for gRPC support. -type grpc struct { - gen *generator.Generator -} - -// Name returns the name of this plugin, "grpc". -func (g *grpc) Name() string { - return "grpc" -} - -// The names for packages imported in the generated code. -// They may vary from the final path component of the import path -// if the name is used by other packages. -var ( - contextPkg string - grpcPkg string -) - -// Init initializes the plugin. -func (g *grpc) Init(gen *generator.Generator) { - g.gen = gen - contextPkg = generator.RegisterUniquePackageName("context", nil) - grpcPkg = generator.RegisterUniquePackageName("grpc", nil) -} - -// Given a type name defined in a .proto, return its object. -// Also record that we're using it, to guarantee the associated import. -func (g *grpc) objectNamed(name string) generator.Object { - g.gen.RecordTypeUse(name) - return g.gen.ObjectNamed(name) -} - -// Given a type name defined in a .proto, return its name as we will print it. -func (g *grpc) typeName(str string) string { - return g.gen.TypeName(g.objectNamed(str)) -} - -// P forwards to g.gen.P. -func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } - -// Generate generates code for the services in the given file. -func (g *grpc) Generate(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ ", contextPkg, ".Context") - g.P("var _ ", grpcPkg, ".ClientConn") - g.P() - for i, service := range file.FileDescriptorProto.Service { - g.generateService(file, service, i) - } -} - -// GenerateImports generates the import declaration for this file. -func (g *grpc) GenerateImports(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - g.P("import (") - g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) - g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) - g.P(")") - g.P() -} - -// reservedClientName records whether a client name is reserved on the client side. -var reservedClientName = map[string]bool{ -// TODO: do we need any in gRPC? -} - -func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } - -// generateService generates all the code for the named service. -func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { - path := fmt.Sprintf("6,%d", index) // 6 means service. - - origServName := service.GetName() - fullServName := file.GetPackage() + "." + origServName - servName := generator.CamelCase(origServName) - - g.P() - g.P("// Client API for ", servName, " service") - g.P() - - // Client interface. - g.P("type ", servName, "Client interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateClientSignature(servName, method)) - } - g.P("}") - g.P() - - // Client structure. - g.P("type ", unexport(servName), "Client struct {") - g.P("cc *", grpcPkg, ".ClientConn") - g.P("}") - g.P() - - // NewClient factory. - g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") - g.P("return &", unexport(servName), "Client{cc}") - g.P("}") - g.P() - - var methodIndex, streamIndex int - serviceDescVar := "_" + servName + "_serviceDesc" - // Client method implementations. - for _, method := range service.Method { - var descExpr string - if !method.GetServerStreaming() && !method.GetClientStreaming() { - // Unary RPC method - descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) - methodIndex++ - } else { - // Streaming RPC method - descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) - streamIndex++ - } - g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) - } - - g.P("// Server API for ", servName, " service") - g.P() - - // Server interface. - serverType := servName + "Server" - g.P("type ", serverType, " interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateServerSignature(servName, method)) - } - g.P("}") - g.P() - - // Server registration. - g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") - g.P("s.RegisterService(&", serviceDescVar, `, srv)`) - g.P("}") - g.P() - - // Server handler implementations. - var handlerNames []string - for _, method := range service.Method { - hname := g.generateServerMethod(servName, method) - handlerNames = append(handlerNames, hname) - } - - // Service descriptor. - g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") - g.P("ServiceName: ", strconv.Quote(fullServName), ",") - g.P("HandlerType: (*", serverType, ")(nil),") - g.P("Methods: []", grpcPkg, ".MethodDesc{") - for i, method := range service.Method { - if method.GetServerStreaming() || method.GetClientStreaming() { - continue - } - g.P("{") - g.P("MethodName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - g.P("},") - } - g.P("},") - g.P("Streams: []", grpcPkg, ".StreamDesc{") - for i, method := range service.Method { - if !method.GetServerStreaming() && !method.GetClientStreaming() { - continue - } - g.P("{") - g.P("StreamName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - if method.GetServerStreaming() { - g.P("ServerStreams: true,") - } - if method.GetClientStreaming() { - g.P("ClientStreams: true,") - } - g.P("},") - } - g.P("},") - g.P("}") - g.P() -} - -// generateClientSignature returns the client-side signature for a method. -func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - reqArg := ", in *" + g.typeName(method.GetInputType()) - if method.GetClientStreaming() { - reqArg = "" - } - respName := "*" + g.typeName(method.GetOutputType()) - if method.GetServerStreaming() || method.GetClientStreaming() { - respName = servName + "_" + generator.CamelCase(origMethName) + "Client" - } - return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) -} - -func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { - sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) - methName := generator.CamelCase(method.GetName()) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("out := new(", outType, ")") - // TODO: Pass descExpr to Invoke. - g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) - g.P("if err != nil { return nil, err }") - g.P("return out, nil") - g.P("}") - g.P() - return - } - streamType := unexport(servName) + methName + "Client" - g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) - g.P("if err != nil { return nil, err }") - g.P("x := &", streamType, "{stream}") - if !method.GetClientStreaming() { - g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - } - g.P("return x, nil") - g.P("}") - g.P() - - genSend := method.GetClientStreaming() - genRecv := method.GetServerStreaming() - genCloseAndRecv := !method.GetServerStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Client interface {") - if genSend { - g.P("Send(*", inType, ") error") - } - if genRecv { - g.P("Recv() (*", outType, ", error)") - } - if genCloseAndRecv { - g.P("CloseAndRecv() (*", outType, ", error)") - } - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", inType, ") error {") - g.P("return x.ClientStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - if genCloseAndRecv { - g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } -} - -// generateServerSignature returns the server-side signature for a method. -func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - - var reqArgs []string - ret := "error" - if !method.GetServerStreaming() && !method.GetClientStreaming() { - reqArgs = append(reqArgs, contextPkg+".Context") - ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" - } - if !method.GetClientStreaming() { - reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) - } - if method.GetServerStreaming() || method.GetClientStreaming() { - reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") - } - - return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret -} - -func (g *grpc) generateServerMethod(servName string, method *pb.MethodDescriptorProto) string { - methName := generator.CamelCase(method.GetName()) - hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error) (interface{}, error) {") - g.P("in := new(", inType, ")") - g.P("if err := dec(in); err != nil { return nil, err }") - g.P("out, err := srv.(", servName, "Server).", methName, "(ctx, in)") - g.P("if err != nil { return nil, err }") - g.P("return out, nil") - g.P("}") - g.P() - return hname - } - streamType := unexport(servName) + methName + "Server" - g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") - if !method.GetClientStreaming() { - g.P("m := new(", inType, ")") - g.P("if err := stream.RecvMsg(m); err != nil { return err }") - g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") - } else { - g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") - } - g.P("}") - g.P() - - genSend := method.GetServerStreaming() - genSendAndClose := !method.GetServerStreaming() - genRecv := method.GetClientStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Server interface {") - if genSend { - g.P("Send(*", outType, ") error") - } - if genSendAndClose { - g.P("SendAndClose(*", outType, ") error") - } - if genRecv { - g.P("Recv() (*", inType, ", error)") - } - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genSendAndClose { - g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") - g.P("m := new(", inType, ")") - g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - - return hname -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/marshalto/marshalto.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/marshalto/marshalto.go deleted file mode 100644 index 60362c5eeb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/marshalto/marshalto.go +++ /dev/null @@ -1,1271 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The marshalto plugin generates a Marshal and MarshalTo method for each message. -The `Marshal() ([]byte, error)` method results in the fact that the message -implements the Marshaler interface. -This allows proto.Marshal to be faster by calling the generated Marshal method rather than using reflect to Marshal the struct. - -If is enabled by the following extensions: - - - marshaler - - marshaler_all - -Or the following extensions: - - - unsafe_marshaler - - unsafe_marshaler_all - -That is if you want to use the unsafe package in your generated code. -The speed up using the unsafe package is not very significant. - -The generation of marshalling tests are enabled using one of the following extensions: - - - testgen - - testgen_all - -And benchmarks given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - -option (gogoproto.marshaler_all) = true; - -message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -given to the marshalto plugin, will generate the following code: - - func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil - } - - func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.G) > 0 { - for _, msg := range m.G { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil - } - -As shown above Marshal calculates the size of the not yet marshalled message -and allocates the appropriate buffer. -This is followed by calling the MarshalTo method which requires a preallocated buffer. -The MarshalTo method allows a user to rather preallocated a reusable buffer. - -The Size method is generated using the size plugin and the gogoproto.sizer, gogoproto.sizer_all extensions. -The user can also using the generated Size method to check that his reusable buffer is still big enough. - -The generated tests and benchmarks will keep you safe and show that this is really a significant speed improvement. - -*/ -package marshalto - -import ( - "fmt" - "sort" - "strconv" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type NumGen interface { - Next() string - Current() string -} - -type numGen struct { - index int -} - -func NewNumGen() NumGen { - return &numGen{0} -} - -func (this *numGen) Next() string { - this.index++ - return this.Current() -} - -func (this *numGen) Current() string { - return strconv.Itoa(this.index) -} - -type marshalto struct { - *generator.Generator - generator.PluginImports - atleastOne bool - unsafePkg generator.Single - errorsPkg generator.Single - protoPkg generator.Single - sortKeysPkg generator.Single - mathPkg generator.Single - localName string - unsafe bool -} - -func NewMarshal() *marshalto { - return &marshalto{} -} - -func NewUnsafeMarshal() *marshalto { - return &marshalto{unsafe: true} -} - -func (p *marshalto) Name() string { - if p.unsafe { - return "unsafemarshaler" - } - return "marshalto" -} - -func (p *marshalto) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *marshalto) callFixed64(varName ...string) { - p.P(`i = encodeFixed64`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) callFixed32(varName ...string) { - p.P(`i = encodeFixed32`, p.localName, `(data, i, uint32(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) callVarint(varName ...string) { - p.P(`i = encodeVarint`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) encodeVarint(varName string) { - p.P(`for `, varName, ` >= 1<<7 {`) - p.In() - p.P(`data[i] = uint8(uint64(`, varName, `)&0x7f|0x80)`) - p.P(varName, ` >>= 7`) - p.P(`i++`) - p.Out() - p.P(`}`) - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) -} - -func (p *marshalto) encodeFixed64(varName string) { - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 32)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 40)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 48)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 56)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed64(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) - p.P(`i+=8`) -} - -func (p *marshalto) encodeFixed32(varName string) { - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed32(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) - p.P(`i+=4`) -} - -func (p *marshalto) encodeKey(fieldNumber int32, wireType int) { - x := uint32(fieldNumber)<<3 | uint32(wireType) - i := 0 - keybuf := make([]byte, 0) - for i = 0; x > 127; i++ { - keybuf = append(keybuf, 0x80|uint8(x&0x7F)) - x >>= 7 - } - keybuf = append(keybuf, uint8(x)) - for _, b := range keybuf { - p.P(`data[i] = `, fmt.Sprintf("%#v", b)) - p.P(`i++`) - } -} - -func keySize(fieldNumber int32, wireType int) int { - x := uint32(fieldNumber)<<3 | uint32(wireType) - size := 0 - for size = 0; x > 127; size++ { - x >>= 7 - } - size++ - return size -} - -func wireToType(wire string) int { - switch wire { - case "fixed64": - return proto.WireFixed64 - case "fixed32": - return proto.WireFixed32 - case "varint": - return proto.WireVarint - case "bytes": - return proto.WireBytes - case "group": - return proto.WireBytes - case "zigzag32": - return proto.WireVarint - case "zigzag64": - return proto.WireVarint - } - panic("unreachable") -} - -func (p *marshalto) mapField(numGen NumGen, fieldTyp descriptor.FieldDescriptorProto_Type, varName string) { - switch fieldTyp { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - p.callFixed64(p.mathPkg.Use(), `.Float64bits(`, varName, `)`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - p.callFixed32(p.mathPkg.Use(), `.Float32bits(`, varName, `)`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - p.callVarint(varName) - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.callFixed64(varName) - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.callFixed32(varName) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`if `, varName, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - p.callVarint(`len(`, varName, `)`) - p.P(`i+=copy(data[i:], `, varName, `)`) - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.callVarint(`(uint32(`, varName, `) << 1) ^ uint32((`, varName, ` >> 31))`) - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.callVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - p.callVarint(varName, `.Size()`) - p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } -} - -type orderFields []*descriptor.FieldDescriptorProto - -func (this orderFields) Len() int { - return len(this) -} - -func (this orderFields) Less(i, j int) bool { - return this[i].GetNumber() < this[j].GetNumber() -} - -func (this orderFields) Swap(i, j int) { - this[i], this[j] = this[j], this[i] -} - -func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - fieldname := p.GetOneOfFieldName(message, field) - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - required := field.IsRequired() - if required && nullable { - p.P(`if m.`, fieldname, `== nil {`) - p.In() - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.P(`return 0, new(`, p.protoPkg.Use(), `.RequiredNotSetError)`) - } else { - p.P(`return 0, `, p.protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) - } - p.Out() - p.P(`} else {`) - } else if repeated { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - } else if ((!proto3 || field.IsMessage()) && nullable) || - (*field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field)) { - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - } - packed := field.IsPacked() - wireType := field.WireType() - fieldNumber := field.GetNumber() - if packed { - wireType = proto.WireBytes - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(num)`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(num)`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(m.`+fieldname, `)`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(m.`+fieldname, `)`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(*m.`+fieldname, `)`) - } - } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`*m.`+fieldname, `float64`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(num)`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(num)`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(m.`+fieldname, `)`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(m.`+fieldname, `)`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(*m.`+fieldname, `)`) - } - } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`*m.`+fieldname, "float32") - } - } - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - if packed { - jvar := "j" + numGen.Next() - p.P(`data`, numGen.Next(), ` := make([]byte, len(m.`, fieldname, `)*10)`) - p.P(`var `, jvar, ` int`) - if *field.Type == descriptor.FieldDescriptorProto_TYPE_INT64 || - *field.Type == descriptor.FieldDescriptorProto_TYPE_INT32 { - p.P(`for _, num1 := range m.`, fieldname, ` {`) - p.In() - p.P(`num := uint64(num1)`) - } else { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - } - p.P(`for num >= 1<<7 {`) - p.In() - p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(uint64(num)&0x7f|0x80)`) - p.P(`num >>= 7`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(num)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i += copy(data[i:], data`, numGen.Current(), `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`*m.`, fieldname) - } - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("*m." + fieldname) - } - } else { - typeName := "int64" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED64 { - typeName = "uint64" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("*m."+fieldname, typeName) - } - } - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("*m." + fieldname) - } - } else { - typeName := "int32" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED32 { - typeName = "uint32" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("*m."+fieldname, typeName) - } - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.P(`if b {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`if b {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - } else { - p.encodeKey(fieldNumber, wireType) - p.P(`if *m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - if repeated { - p.P(`for _, s := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`l = len(s)`) - p.encodeVarint("l") - p.P(`i+=copy(data[i:], s)`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(*m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], *m.`, fieldname, `)`) - } - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("marshaler does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if generator.IsMap(file.FileDescriptorProto, field) { - m := p.GoMapType(nil, field) - _, keywire := p.GoType(nil, m.KeyField) - valuegoTyp, valuewire := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - keyKeySize := keySize(1, wireToType(keywire)) - valueKeySize := keySize(2, wireToType(valuewire)) - p.P(`for k, _ := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - sum := []string{strconv.Itoa(keyKeySize)} - switch m.KeyField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, `8`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, `4`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(k))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(k))`) - } - p.P(`v := m.`, fieldname, `[k]`) - accessor := `v` - sum = append(sum, strconv.Itoa(valueKeySize)) - switch m.ValueField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, strconv.Itoa(8)) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, strconv.Itoa(4)) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if nullable { - p.P(`if v == nil {`) - p.In() - p.P(`return 0, `, p.errorsPkg.Use(), `.New("proto: map has nil element")`) - p.Out() - p.P(`}`) - } - if valuegoTyp != valuegoAliasTyp { - if nullable { - // cast back to the type that has the generated methods on it - accessor = `((` + valuegoTyp + `)(` + accessor + `))` - } else { - accessor = `((*` + valuegoTyp + `)(&` + accessor + `))` - } - } else if !nullable { - accessor = `(&v)` - } - p.P(`msgSize := `, accessor, `.Size()`) - sum = append(sum, `msgSize + sov`+p.localName+`(uint64(msgSize))`) - } - p.P(`mapSize := `, strings.Join(sum, " + ")) - p.callVarint("mapSize") - p.encodeKey(1, wireToType(keywire)) - p.mapField(numGen, m.KeyField.GetType(), "k") - p.encodeKey(2, wireToType(valuewire)) - p.mapField(numGen, m.ValueField.GetType(), accessor) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, msg := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint("msg.Size()") - p.P(`n, err := msg.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname, `.Size()`) - p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } - case descriptor.FieldDescriptorProto_TYPE_BYTES: - if !gogoproto.IsCustomType(field) { - if repeated { - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint("len(b)") - p.P(`i+=copy(data[i:], b)`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - } - } else { - if repeated { - p.P(`for _, msg := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`msg.Size()`) - p.P(`n, err := msg.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname, `.Size()`) - p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32: - if packed { - datavar := "data" + numGen.Next() - jvar := "j" + numGen.Next() - p.P(datavar, ` := make([]byte, len(m.`, fieldname, ")*5)") - p.P(`var `, jvar, ` int`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - xvar := "x" + numGen.Next() - p.P(xvar, ` := (uint32(num) << 1) ^ uint32((num >> 31))`) - p.P(`for `, xvar, ` >= 1<<7 {`) - p.In() - p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) - p.P(jvar, `++`) - p.P(xvar, ` >>= 7`) - p.Out() - p.P(`}`) - p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`x`, numGen.Next(), ` := (uint32(num) << 1) ^ uint32((num >> 31))`) - p.encodeVarint("x" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(*m.`, fieldname, `) << 1) ^ uint32((*m.`, fieldname, ` >> 31))`) - } - case descriptor.FieldDescriptorProto_TYPE_SINT64: - if packed { - jvar := "j" + numGen.Next() - xvar := "x" + numGen.Next() - datavar := "data" + numGen.Next() - p.P(`var `, jvar, ` int`) - p.P(datavar, ` := make([]byte, len(m.`, fieldname, `)*10)`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(xvar, ` := (uint64(num) << 1) ^ uint64((num >> 63))`) - p.P(`for `, xvar, ` >= 1<<7 {`) - p.In() - p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) - p.P(jvar, `++`) - p.P(xvar, ` >>= 7`) - p.Out() - p.P(`}`) - p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`x`, numGen.Next(), ` := (uint64(num) << 1) ^ uint64((num >> 63))`) - p.encodeVarint("x" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(*m.`, fieldname, `) << 1) ^ uint64((*m.`, fieldname, ` >> 63))`) - } - default: - panic("not implemented") - } - if (required && nullable) || - ((!proto3 || field.IsMessage()) && nullable) || - repeated || - (*field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field)) { - p.Out() - p.P(`}`) - } -} - -func (p *marshalto) Generate(file *generator.FileDescriptor) { - numGen := NewNumGen() - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - - p.mathPkg = p.NewImport("math") - p.sortKeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") - p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - p.unsafePkg = p.NewImport("unsafe") - p.errorsPkg = p.NewImport("errors") - - for _, message := range file.Messages() { - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } - } - p.atleastOne = true - - p.P(`func (m *`, ccTypeName, `) Marshal() (data []byte, err error) {`) - p.In() - p.P(`size := m.Size()`) - p.P(`data = make([]byte, size)`) - p.P(`n, err := m.MarshalTo(data)`) - p.P(`if err != nil {`) - p.In() - p.P(`return nil, err`) - p.Out() - p.P(`}`) - p.P(`return data[:n], nil`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) - p.In() - p.P(`var i int`) - p.P(`_ = i`) - p.P(`var l int`) - p.P(`_ = l`) - fields := orderFields(message.GetField()) - sort.Sort(fields) - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.generateField(proto3, numGen, file, message, field) - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; !ok { - oneofs[fieldname] = struct{}{} - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - p.P(`nn`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=nn`, numGen.Current()) - p.Out() - p.P(`}`) - } - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if len(m.XXX_extensions) > 0 {`) - p.In() - p.P(`n, err := `, p.protoPkg.Use(), `.EncodeExtensionMap(m.XXX_extensions, data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - p.Out() - p.P(`}`) - } else { - p.P(`if m.XXX_extensions != nil {`) - p.In() - p.P(`i+=copy(data[i:], m.XXX_extensions)`) - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if m.XXX_unrecognized != nil {`) - p.In() - p.P(`i+=copy(data[i:], m.XXX_unrecognized)`) - p.Out() - p.P(`}`) - } - - p.P(`return i, nil`) - p.Out() - p.P(`}`) - p.P() - - //Generate MarshalTo methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, field := range m.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) - p.In() - p.P(`i := 0`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) - p.generateField(false, numGen, file, message, field) - p.P(`return i, nil`) - p.Out() - p.P(`}`) - } - } - - if p.atleastOne { - p.P(`func encodeFixed64`, p.localName, `(data []byte, offset int, v uint64) int {`) - p.In() - p.P(`data[offset] = uint8(v)`) - p.P(`data[offset+1] = uint8(v >> 8)`) - p.P(`data[offset+2] = uint8(v >> 16)`) - p.P(`data[offset+3] = uint8(v >> 24)`) - p.P(`data[offset+4] = uint8(v >> 32)`) - p.P(`data[offset+5] = uint8(v >> 40)`) - p.P(`data[offset+6] = uint8(v >> 48)`) - p.P(`data[offset+7] = uint8(v >> 56)`) - p.P(`return offset+8`) - p.Out() - p.P(`}`) - - p.P(`func encodeFixed32`, p.localName, `(data []byte, offset int, v uint32) int {`) - p.In() - p.P(`data[offset] = uint8(v)`) - p.P(`data[offset+1] = uint8(v >> 8)`) - p.P(`data[offset+2] = uint8(v >> 16)`) - p.P(`data[offset+3] = uint8(v >> 24)`) - p.P(`return offset+4`) - p.Out() - p.P(`}`) - - p.P(`func encodeVarint`, p.localName, `(data []byte, offset int, v uint64) int {`) - p.In() - p.P(`for v >= 1<<7 {`) - p.In() - p.P(`data[offset] = uint8(v&0x7f|0x80)`) - p.P(`v >>= 7`) - p.P(`offset++`) - p.Out() - p.P(`}`) - p.P(`data[offset] = uint8(v)`) - p.P(`return offset+1`) - p.Out() - p.P(`}`) - } - -} - -func init() { - generator.RegisterPlugin(NewMarshal()) - generator.RegisterPlugin(NewUnsafeMarshal()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/oneofcheck/oneofcheck.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/oneofcheck/oneofcheck.go deleted file mode 100644 index cd0d19a77c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/oneofcheck/oneofcheck.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The oneofcheck plugin is used to check whether oneof is not used incorrectly. -For instance: -An error is caused if a oneof field: - - is used in a face - - is an embedded field - -*/ -package oneofcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "oneofcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, msg := range file.Messages() { - face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) - for _, field := range msg.GetField() { - if field.OneofIndex == nil { - continue - } - if face { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in a face and oneof\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if gogoproto.IsEmbed(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and an embedded field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if !gogoproto.IsNullable(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and a non-nullable field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if gogoproto.IsUnion(file.FileDescriptorProto, msg.DescriptorProto) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and in an union (deprecated)\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - } - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/populate/populate.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/populate/populate.go deleted file mode 100644 index 70597db3aa..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/populate/populate.go +++ /dev/null @@ -1,774 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The populate plugin generates a NewPopulated function. -This function returns a newly populated structure. - -It is enabled by the following extensions: - - - populate - - populate_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.populate_all) = true; - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the populate plugin, will generate code the following code: - - func NewPopulatedB(r randyExample, easy bool) *B { - this := &B{} - v2 := NewPopulatedA(r, easy) - this.A = *v2 - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) - for i := 0; i < v3; i++ { - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.G[i] = *v4 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 3) - } - return this - } - -The idea that is useful for testing. -Most of the other plugins' generated test code uses it. -You will still be able to use the generated test code of other packages -if you turn off the popluate plugin and write your own custom NewPopulated function. - -If the easy flag is not set the XXX_unrecognized and XXX_extensions fields are also populated. -These have caused problems with JSON marshalling and unmarshalling tests. - -*/ -package populate - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" - "math" - "strconv" - "strings" -) - -type VarGen interface { - Next() string - Current() string -} - -type varGen struct { - index int64 -} - -func NewVarGen() VarGen { - return &varGen{0} -} - -func (this *varGen) Next() string { - this.index++ - return fmt.Sprintf("v%d", this.index) -} - -func (this *varGen) Current() string { - return fmt.Sprintf("v%d", this.index) -} - -type plugin struct { - *generator.Generator - generator.PluginImports - varGen VarGen - atleastOne bool - localName string -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "populate" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func value(typeName string, fieldType descriptor.FieldDescriptorProto_Type) string { - switch fieldType { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - return typeName + "(r.Float64())" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - return typeName + "(r.Float32())" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64, - descriptor.FieldDescriptorProto_TYPE_SINT64: - return typeName + "(r.Int63())" - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64: - return typeName + "(uint64(r.Uint32()))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - return typeName + "(r.Int31())" - case descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32: - return typeName + "(r.Uint32())" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - return typeName + `(bool(r.Intn(2) == 0))` - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE, - descriptor.FieldDescriptorProto_TYPE_BYTES: - } - panic(fmt.Errorf("unexpected type %v", typeName)) -} - -func negative(fieldType descriptor.FieldDescriptorProto_Type) bool { - switch fieldType { - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_BOOL: - return false - } - return true -} - -func getFuncName(goTypName string) string { - funcName := "NewPopulated" + goTypName - goTypNames := strings.Split(goTypName, ".") - if len(goTypNames) == 2 { - funcName = goTypNames[0] + ".NewPopulated" + goTypNames[1] - } else if len(goTypNames) != 1 { - panic(fmt.Errorf("unreachable: too many dots in %v", goTypName)) - } - return funcName -} - -func getFuncCall(goTypName string) string { - funcName := getFuncName(goTypName) - funcCall := funcName + "(r, easy)" - return funcCall -} - -func getCustomFuncCall(goTypName string) string { - funcName := getFuncName(goTypName) - funcCall := funcName + "(r)" - return funcCall -} - -func (p *plugin) getEnumVal(field *descriptor.FieldDescriptorProto, goTyp string) string { - enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) - l := len(enum.Value) - values := make([]string, l) - for i := range enum.Value { - values[i] = strconv.Itoa(int(*enum.Value[i].Number)) - } - arr := "[]int32{" + strings.Join(values, ",") + "}" - val := strings.Join([]string{generator.GoTypeToName(goTyp), `(`, arr, `[r.Intn(`, fmt.Sprintf("%d", l), `)])`}, "") - return val -} - -func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - goTyp, _ := p.GoType(message, field) - fieldname := p.GetOneOfFieldName(message, field) - goTypName := generator.GoTypeToName(goTyp) - if p.IsMap(field) { - m := p.GoMapType(nil, field) - keygoTyp, _ := p.GoType(nil, m.KeyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - keytypName := generator.GoTypeToName(keygoTyp) - keygoAliasTyp = generator.GoTypeToName(keygoAliasTyp) - valuetypAliasName := generator.GoTypeToName(valuegoAliasTyp) - - nullable, valuegoTyp, valuegoAliasTyp := generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, m.GoType, `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - keyval := "" - if m.KeyField.IsString() { - keyval = fmt.Sprintf("randString%v(r)", p.localName) - } else { - keyval = value(keytypName, m.KeyField.GetType()) - } - if keygoAliasTyp != keygoTyp { - keyval = keygoAliasTyp + `(` + keyval + `)` - } - if m.ValueField.IsMessage() || p.IsGroup(field) { - s := `this.` + fieldname + `[` + keyval + `] = ` - goTypName := generator.GoTypeToName(valuegoTyp) - funcCall := getFuncCall(goTypName) - if !nullable { - funcCall = `*` + funcCall - } - if valuegoTyp != valuegoAliasTyp { - funcCall = `(` + valuegoAliasTyp + `)(` + funcCall + `)` - } - s += funcCall - p.P(s) - } else if m.ValueField.IsEnum() { - s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + p.getEnumVal(m.ValueField, valuegoTyp) - p.P(s) - } else if m.ValueField.IsBytes() { - count := p.varGen.Next() - p.P(count, ` := r.Intn(100)`) - p.P(p.varGen.Next(), ` := `, keyval) - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = make(`, valuegoTyp, `, `, count, `)`) - p.P(`for i := 0; i < `, count, `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `][i] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - } else if m.ValueField.IsString() { - s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + fmt.Sprintf("randString%v(r)", p.localName) - p.P(s) - } else { - p.P(p.varGen.Next(), ` := `, keyval) - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = `, value(valuetypAliasName, m.ValueField.GetType())) - if negative(m.ValueField.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] *= -1`) - p.Out() - p.P(`}`) - } - } - p.Out() - p.P(`}`) - } else if field.IsMessage() || p.IsGroup(field) { - funcCall := getFuncCall(goTypName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, `[i] = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) - } - p.Out() - p.P(`}`) - } else { - if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, ` = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) - } - } - } else { - if field.IsEnum() { - val := p.getEnumVal(field, goTyp) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, val) - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, val) - } else { - p.P(p.varGen.Next(), ` := `, val) - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } else if gogoproto.IsCustomType(field) { - funcCall := getCustomFuncCall(goTypName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) - p.Out() - p.P(`}`) - } else if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, ` = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) - } - } else if field.IsBytes() { - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, `[i] = make([]byte,`, p.varGen.Current(), `)`) - p.P(`for j := 0; j < `, p.varGen.Current(), `; j++ {`) - p.In() - p.P(`this.`, fieldname, `[i][j] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } else { - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - } - } else if field.IsString() { - val := fmt.Sprintf("randString%v(r)", p.localName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, val) - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, val) - } else { - p.P(p.varGen.Next(), `:= `, val) - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } else { - typName := generator.GoTypeToName(goTyp) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, `[i] *= -1`) - p.Out() - p.P(`}`) - } - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, ` *= -1`) - p.Out() - p.P(`}`) - } - } else { - p.P(p.varGen.Next(), ` := `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(p.varGen.Current(), ` *= -1`) - p.Out() - p.P(`}`) - } - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } - } -} - -func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { - if field.IsMessage() || p.IsGroup(field) || p.IsMap(field) { - var fieldMessage *generator.Descriptor - if p.IsMap(field) { - m := p.GoMapType(nil, field) - if !m.ValueField.IsMessage() { - return nil - } - fieldMessage = p.ObjectNamed(m.ValueField.GetTypeName()).(*generator.Descriptor) - } else { - fieldMessage = p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) - } - fieldTypeName := generator.CamelCaseSlice(fieldMessage.TypeName()) - for _, message := range visited { - messageTypeName := generator.CamelCaseSlice(message.TypeName()) - if fieldTypeName == messageTypeName { - for _, e := range excludes { - if fieldTypeName == generator.CamelCaseSlice(e.TypeName()) { - return nil - } - } - return fieldMessage - } - } - for _, f := range fieldMessage.Field { - visited = append(visited, fieldMessage) - loopTo := p.hasLoop(f, visited, excludes) - if loopTo != nil { - return loopTo - } - } - } - return nil -} - -func (p *plugin) loops(field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { - //fmt.Fprintf(os.Stderr, "loops %v %v\n", field.GetTypeName(), generator.CamelCaseSlice(message.TypeName())) - excludes := []*generator.Descriptor{} - loops := 0 - for { - visited := []*generator.Descriptor{} - loopTo := p.hasLoop(field, visited, excludes) - if loopTo == nil { - break - } - //fmt.Fprintf(os.Stderr, "loopTo %v\n", generator.CamelCaseSlice(loopTo.TypeName())) - excludes = append(excludes, loopTo) - loops++ - } - return loops -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.atleastOne = false - p.PluginImports = generator.NewPluginImports(p.Generator) - p.varGen = NewVarGen() - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - - p.localName = generator.FileName(file) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - - for _, message := range file.Messages() { - if !gogoproto.HasPopulate(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - loopLevels := make([]int, len(message.Field)) - maxLoopLevel := 0 - for i, field := range message.Field { - loopLevels[i] = p.loops(field, message) - if loopLevels[i] > maxLoopLevel { - maxLoopLevel = loopLevels[i] - } - } - ranTotal := 0 - for i := range loopLevels { - ranTotal += int(math.Pow10(maxLoopLevel - loopLevels[i])) - } - p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - if gogoproto.IsUnion(message.File(), message.DescriptorProto) && len(message.Field) > 0 { - p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`) - p.P(`switch fieldNum {`) - k := 0 - for i, field := range message.Field { - is := []string{} - ran := int(math.Pow10(maxLoopLevel - loopLevels[i])) - for j := 0; j < ran; j++ { - is = append(is, fmt.Sprintf("%d", j+k)) - } - k += ran - p.P(`case `, strings.Join(is, ","), `:`) - p.In() - p.GenerateField(file, message, field) - p.Out() - } - p.P(`}`) - } else { - var maxFieldNumber int32 - oneofs := make(map[string]struct{}) - for fieldIndex, field := range message.Field { - if field.GetNumber() > maxFieldNumber { - maxFieldNumber = field.GetNumber() - } - oneof := field.OneofIndex != nil - if !oneof { - if field.IsRequired() || (!gogoproto.IsNullable(field) && !field.IsRepeated()) || (proto3 && !field.IsMessage()) { - p.GenerateField(file, message, field) - } else { - if loopLevels[fieldIndex] > 0 { - p.P(`if r.Intn(10) == 0 {`) - } else { - p.P(`if r.Intn(10) != 0 {`) - } - p.In() - p.GenerateField(file, message, field) - p.Out() - p.P(`}`) - } - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - fieldNumbers := []int32{} - for _, f := range message.Field { - fname := p.GetFieldName(message, f) - if fname == fieldname { - fieldNumbers = append(fieldNumbers, f.GetNumber()) - } - } - - p.P(`oneofNumber_`, fieldname, ` := `, fmt.Sprintf("%#v", fieldNumbers), `[r.Intn(`, strconv.Itoa(len(fieldNumbers)), `)]`) - p.P(`switch oneofNumber_`, fieldname, ` {`) - for _, f := range message.Field { - fname := p.GetFieldName(message, f) - if fname != fieldname { - continue - } - p.P(`case `, strconv.Itoa(int(f.GetNumber())), `:`) - p.In() - ccTypeName := p.OneOfTypeName(message, f) - p.P(`this.`, fname, ` = NewPopulated`, ccTypeName, `(r, easy)`) - p.Out() - } - p.P(`}`) - } - } - if message.DescriptorProto.HasExtension() { - p.P(`if !easy && r.Intn(10) != 0 {`) - p.In() - p.P(`l := r.Intn(5)`) - p.P(`for i := 0; i < l; i++ {`) - p.In() - if len(message.DescriptorProto.GetExtensionRange()) > 1 { - p.P(`eIndex := r.Intn(`, strconv.Itoa(len(message.DescriptorProto.GetExtensionRange())), `)`) - p.P(`fieldNumber := 0`) - p.P(`switch eIndex {`) - for i, e := range message.DescriptorProto.GetExtensionRange() { - p.P(`case `, strconv.Itoa(i), `:`) - p.In() - p.P(`fieldNumber = r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) - p.Out() - if e.GetEnd() > maxFieldNumber { - maxFieldNumber = e.GetEnd() - } - } - p.P(`}`) - } else { - e := message.DescriptorProto.GetExtensionRange()[0] - p.P(`fieldNumber := r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) - if e.GetEnd() > maxFieldNumber { - maxFieldNumber = e.GetEnd() - } - } - p.P(`wire := r.Intn(4)`) - p.P(`if wire == 3 { wire = 5 }`) - p.P(`data := randField`, p.localName, `(nil, r, fieldNumber, wire)`) - p.P(protoPkg.Use(), `.SetRawExtension(this, int32(fieldNumber), data)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - if maxFieldNumber < (1 << 10) { - p.P(`if !easy && r.Intn(10) != 0 {`) - p.In() - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`this.XXX_unrecognized = randUnrecognized`, p.localName, `(r, `, strconv.Itoa(int(maxFieldNumber+1)), `)`) - } - p.Out() - p.P(`}`) - } - } - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - - //Generate NewPopulated functions for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, f := range m.Field { - oneof := f.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, f) - p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) - p.GenerateField(file, message, f) - p.P(`return this`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`type randy`, p.localName, ` interface {`) - p.In() - p.P(`Float32() float32`) - p.P(`Float64() float64`) - p.P(`Int63() int64`) - p.P(`Int31() int32`) - p.P(`Uint32() uint32`) - p.P(`Intn(n int) int`) - p.Out() - p.P(`}`) - - p.P(`func randUTF8Rune`, p.localName, `(r randy`, p.localName, `) rune {`) - p.In() - p.P(`ru := r.Intn(62)`) - p.P(`if ru < 10 {`) - p.In() - p.P(`return rune(ru+48)`) - p.Out() - p.P(`} else if ru < 36 {`) - p.In() - p.P(`return rune(ru+55)`) - p.Out() - p.P(`}`) - p.P(`return rune(ru+61)`) - p.Out() - p.P(`}`) - - p.P(`func randString`, p.localName, `(r randy`, p.localName, `) string {`) - p.In() - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`tmps := make([]rune, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`tmps[i] = randUTF8Rune`, p.localName, `(r)`) - p.Out() - p.P(`}`) - p.P(`return string(tmps)`) - p.Out() - p.P(`}`) - - p.P(`func randUnrecognized`, p.localName, `(r randy`, p.localName, `, maxFieldNumber int) (data []byte) {`) - p.In() - p.P(`l := r.Intn(5)`) - p.P(`for i := 0; i < l; i++ {`) - p.In() - p.P(`wire := r.Intn(4)`) - p.P(`if wire == 3 { wire = 5 }`) - p.P(`fieldNumber := maxFieldNumber + r.Intn(100)`) - p.P(`data = randField`, p.localName, `(data, r, fieldNumber, wire)`) - p.Out() - p.P(`}`) - p.P(`return data`) - p.Out() - p.P(`}`) - - p.P(`func randField`, p.localName, `(data []byte, r randy`, p.localName, `, fieldNumber int, wire int) []byte {`) - p.In() - p.P(`key := uint32(fieldNumber)<<3 | uint32(wire)`) - p.P(`switch wire {`) - p.P(`case 0:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(p.varGen.Next(), ` := r.Int63()`) - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(p.varGen.Current(), ` *= -1`) - p.Out() - p.P(`}`) - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(`, p.varGen.Current(), `))`) - p.Out() - p.P(`case 1:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) - p.Out() - p.P(`case 2:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`ll := r.Intn(100)`) - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(ll))`) - p.P(`for j := 0; j < ll; j++ {`) - p.In() - p.P(`data = append(data, byte(r.Intn(256)))`) - p.Out() - p.P(`}`) - p.Out() - p.P(`default:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) - p.Out() - p.P(`}`) - p.P(`return data`) - p.Out() - p.P(`}`) - - p.P(`func encodeVarintPopulate`, p.localName, `(data []byte, v uint64) []byte {`) - p.In() - p.P(`for v >= 1<<7 {`) - p.In() - p.P(`data = append(data, uint8(uint64(v)&0x7f|0x80))`) - p.P(`v >>= 7`) - p.Out() - p.P(`}`) - p.P(`data = append(data, uint8(v))`) - p.P(`return data`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/size.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/size.go deleted file mode 100644 index b657611b3d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/size.go +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The size plugin generates a Size method for each message. -This is useful with the MarshalTo method generated by the marshalto plugin and the -gogoproto.marshaler and gogoproto.marshaler_all extensions. - -It is enabled by the following extensions: - - - sizer - - sizer_all - -The size plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -And a benchmark given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.sizer_all) = true; - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the size plugin, will generate the following code: - - func (m *B) Size() (n int) { - var l int - _ = l - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - if len(m.G) > 0 { - for _, e := range m.G { - l = e.Size() - n += 1 + l + sovExample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n - } - -and the following test code: - - func TestBSize(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedB(popr, true) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - } - - func BenchmarkBSize(b *testing5.B) { - popr := math_rand5.New(math_rand5.NewSource(616)) - total := 0 - pops := make([]*B, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) - } - -The sovExample function is a size of varint function for the example.pb.go file. - -*/ -package size - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" - "strconv" - "strings" -) - -type size struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewSize() *size { - return &size{} -} - -func (p *size) Name() string { - return "size" -} - -func (p *size) Init(g *generator.Generator) { - p.Generator = g -} - -func wireToType(wire string) int { - switch wire { - case "fixed64": - return proto.WireFixed64 - case "fixed32": - return proto.WireFixed32 - case "varint": - return proto.WireVarint - case "bytes": - return proto.WireBytes - case "group": - return proto.WireBytes - case "zigzag32": - return proto.WireVarint - case "zigzag64": - return proto.WireVarint - } - panic("unreachable") -} - -func keySize(fieldNumber int32, wireType int) int { - x := uint32(fieldNumber)<<3 | uint32(wireType) - size := 0 - for size = 0; x > 127; size++ { - x >>= 7 - } - size++ - return size -} - -func (p *size) sizeVarint() { - p.P(` - func sov`, p.localName, `(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n - }`) -} - -func (p *size) sizeZigZag() { - p.P(`func soz`, p.localName, `(x uint64) (n int) { - return sov`, p.localName, `(uint64((x << 1) ^ uint64((int64(x) >> 63)))) - }`) -} - -func (p *size) generateField(proto3 bool, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - fieldname := p.GetOneOfFieldName(message, field) - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - if repeated { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - } else if ((!proto3 || field.IsMessage()) && nullable) || (!gogoproto.IsCustomType(field) && *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES) { - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - } - packed := field.IsPacked() - _, wire := p.GoType(message, field) - wireType := wireToType(wire) - fieldNumber := field.GetNumber() - if packed { - wireType = proto.WireBytes - } - key := keySize(fieldNumber, wireType) - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*8))`, `+len(m.`, fieldname, `)*8`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+8), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+8)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+8)) - } else { - p.P(`n+=`, strconv.Itoa(key+8)) - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*4))`, `+len(m.`, fieldname, `)*4`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+4), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+4)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+4)) - } else { - p.P(`n+=`, strconv.Itoa(key+4)) - } - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - if packed { - p.P(`l = 0`) - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`l+=sov`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(*m.`, fieldname, `))`) - } else { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)))`, `+len(m.`, fieldname, `)*1`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+1), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+1)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+1)) - } else { - p.P(`n+=`, strconv.Itoa(key+1)) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - if repeated { - p.P(`for _, s := range m.`, fieldname, ` { `) - p.In() - p.P(`l = len(s)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`if l > 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`l=len(*m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } else { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("size does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if generator.IsMap(file.FileDescriptorProto, field) { - m := p.GoMapType(nil, field) - _, keywire := p.GoType(nil, m.KeyAliasField) - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, valuewire := p.GoType(nil, m.ValueAliasField) - _, fieldwire := p.GoType(nil, field) - - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - fieldKeySize := keySize(field.GetNumber(), wireToType(fieldwire)) - keyKeySize := keySize(1, wireToType(keywire)) - valueKeySize := keySize(2, wireToType(valuewire)) - p.P(`for k, v := range m.`, fieldname, ` { `) - p.In() - p.P(`_ = k`) - p.P(`_ = v`) - sum := []string{strconv.Itoa(keyKeySize)} - switch m.KeyField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, `8`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, `4`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(k))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(k))`) - } - sum = append(sum, strconv.Itoa(valueKeySize)) - switch m.ValueField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, strconv.Itoa(8)) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, strconv.Itoa(4)) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if nullable { - p.P(`l = 0`) - p.P(`if v != nil {`) - p.In() - if valuegoTyp != valuegoAliasTyp { - p.P(`l = ((`, valuegoTyp, `)(v)).Size()`) - } else { - p.P(`l = v.Size()`) - } - p.Out() - p.P(`}`) - } else { - if valuegoTyp != valuegoAliasTyp { - p.P(`l = ((*`, valuegoTyp, `)(&v)).Size()`) - } else { - p.P(`l = v.Size()`) - } - } - sum = append(sum, `l+sov`+p.localName+`(uint64(l))`) - } - p.P(`mapEntrySize := `, strings.Join(sum, "+")) - p.P(`n+=mapEntrySize+`, fieldKeySize, `+sov`, p.localName, `(uint64(mapEntrySize))`) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` { `) - p.In() - p.P(`l=e.Size()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=m.`, fieldname, `.Size()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - case descriptor.FieldDescriptorProto_TYPE_BYTES: - if !gogoproto.IsCustomType(field) { - if repeated { - p.P(`for _, b := range m.`, fieldname, ` { `) - p.In() - p.P(`l = len(b)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`if l > 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - } else { - if repeated { - p.P(`for _, e := range m.`, fieldname, ` { `) - p.In() - p.P(`l=e.Size()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=m.`, fieldname, `.Size()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - if packed { - p.P(`l = 0`) - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`l+=soz`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(*m.`, fieldname, `))`) - } else { - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) - } - default: - panic("not implemented") - } - if ((!proto3 || field.IsMessage()) && nullable) || repeated || (!gogoproto.IsCustomType(field) && *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES) { - p.Out() - p.P(`}`) - } -} - -func (p *size) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - if !gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (m *`, ccTypeName, `) Size() (n int) {`) - p.In() - p.P(`var l int`) - p.P(`_ = l`) - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.generateField(proto3, file, message, field) - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - p.P(`n+=m.`, fieldname, `.Size()`) - p.Out() - p.P(`}`) - } - } - if message.DescriptorProto.HasExtension() { - p.P(`if m.XXX_extensions != nil {`) - p.In() - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`n += `, protoPkg.Use(), `.SizeOfExtensionMap(m.XXX_extensions)`) - } else { - p.P(`n+=len(m.XXX_extensions)`) - } - p.Out() - p.P(`}`) - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if m.XXX_unrecognized != nil {`) - p.In() - p.P(`n+=len(m.XXX_unrecognized)`) - p.Out() - p.P(`}`) - } - p.P(`return n`) - p.Out() - p.P(`}`) - p.P() - - //Generate Size methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, f := range m.Field { - oneof := f.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, f) - p.P(`func (m *`, ccTypeName, `) Size() (n int) {`) - p.In() - p.P(`var l int`) - p.P(`_ = l`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) - p.generateField(false, file, message, f) - p.P(`return n`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.sizeVarint() - p.sizeZigZag() - -} - -func init() { - generator.RegisterPlugin(NewSize()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/sizetest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/sizetest.go deleted file mode 100644 index 0851a29a47..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/size/sizetest.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package size - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `Size(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`size2 := `, protoPkg.Use(), `.Size(p)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`size := p.Size()`) - p.P(`if len(data) != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))`) - p.Out() - p.P(`}`) - p.P(`if size2 != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)`) - p.Out() - p.P(`}`) - p.P(`size3 := `, protoPkg.Use(), `.Size(p)`) - p.P(`if size3 != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - - if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Benchmark`, ccTypeName, `Size(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`pops := make([]*`, ccTypeName, `, 1000)`) - p.P(`for i := 0; i < 1000; i++ {`) - p.In() - p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) - p.Out() - p.P(`}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`total += pops[i%1000].Size()`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringer.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringer.go deleted file mode 100644 index b6360485ca..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringer.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The stringer plugin generates a String method for each message. - -It is enabled by the following extensions: - - - stringer - - stringer_all - -The stringer plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.goproto_stringer_all) = false; - option (gogoproto.stringer_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the stringer stringer, will generate the following code: - - func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s - } - -and the following test code: - - func TestAStringer(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt1.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } - } - -Typically fmt.Printf("%v") will stop to print when it reaches a pointer and -not print their values, while the generated String method will always print all values, recursively. - -*/ -package stringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "strings" -) - -type stringer struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewStringer() *stringer { - return &stringer{} -} - -func (p *stringer) Name() string { - return "stringer" -} - -func (p *stringer) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *stringer) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - fmtPkg := p.NewImport("fmt") - stringsPkg := p.NewImport("strings") - reflectPkg := p.NewImport("reflect") - sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") - for _, message := range file.Messages() { - if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.EnabledGoStringer(file.FileDescriptorProto, message.DescriptorProto) { - panic("old string method needs to be disabled, please use gogoproto.goproto_stringer or gogoproto.goproto_stringer_all and set it to false") - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) String() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - for _, field := range message.Field { - if !generator.IsMap(file.FileDescriptorProto, field) { - continue - } - fieldname := p.GetFieldName(message, field) - - m := p.GoMapType(nil, field) - mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField - keysName := `keysFor` + fieldname - keygoTyp, _ := p.GoType(nil, keyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, keyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - keyCapTyp := generator.CamelCase(keygoTyp) - p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) - p.P(`for k, _ := range this.`, fieldname, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(keysName, ` = append(`, keysName, `, k)`) - } else { - p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) - } - p.Out() - p.P(`}`) - p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) - mapName := `mapStringFor` + fieldname - p.P(mapName, ` := "`, mapgoTyp, `{"`) - p.P(`for _, k := range `, keysName, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[k])`) - } else { - p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) - } - p.Out() - p.P(`}`) - p.P(mapName, ` += "}"`) - } - p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - fieldname := p.GetFieldName(message, field) - oneof := field.OneofIndex != nil - if oneof { - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } else if generator.IsMap(file.FileDescriptorProto, field) { - mapName := `mapStringFor` + fieldname - p.P("`", fieldname, ":`", ` + `, mapName, " + `,", "`,") - } else if field.IsMessage() || p.IsGroup(field) { - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - msgnames := strings.Split(msgname, ".") - typeName := msgnames[len(msgnames)-1] - if nullable { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") - } else if repeated { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(this.`, fieldname, `.String(), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") - } - } else { - if nullable && !repeated && !proto3 { - p.P("`", fieldname, ":`", ` + valueToString`, p.localName, `(this.`, fieldname, ") + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P("`XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`,") - } else { - p.P("`XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`,") - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P("`XXX_unrecognized:` + ", fmtPkg.Use(), `.Sprintf("%v", this.XXX_unrecognized) + `, "`,`,") - } - p.P("`}`,") - p.P(`}`, `,""`, ")") - p.P(`return s`) - p.Out() - p.P(`}`) - - //Generate String methods for oneof fields - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (this *`, ccTypeName, `) String() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") - fieldname := p.GetOneOfFieldName(message, field) - if field.IsMessage() || p.IsGroup(field) { - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - msgnames := strings.Split(msgname, ".") - typeName := msgnames[len(msgnames)-1] - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } - p.P("`}`,") - p.P(`}`, `,""`, ")") - p.P(`return s`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`func valueToString`, p.localName, `(v interface{}) string {`) - p.In() - p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) - p.P(`if rv.IsNil() {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) - p.P(`return `, fmtPkg.Use(), `.Sprintf("*%v", pv)`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewStringer()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringertest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringertest.go deleted file mode 100644 index df615ba784..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/stringer/stringertest.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package stringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - fmtPkg := imports.NewImport("fmt") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `Stringer(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`s1 := p.String()`) - p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%v", p)`) - p.P(`if s1 != s2 {`) - p.In() - p.P(`t.Fatalf("String want %v got %v", s1, s2)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/testgen/testgen.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/testgen/testgen.go deleted file mode 100644 index de6c7217db..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/testgen/testgen.go +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The testgen plugin generates Test and Benchmark functions for each message. - -Tests are enabled using the following extensions: - - - testgen - - testgen_all - -Benchmarks are enabled using the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.testgen_all) = true; - option (gogoproto.benchgen_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the testgen plugin, will generate the following test code: - - func TestAProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - - func BenchmarkAProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) - } - - func BenchmarkAProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &A{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) - } - - - func TestAJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedA(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } - } - - func TestAProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - - func TestAProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - -Other registered tests are also generated. -Tests are registered to this test plugin by calling the following function. - - func RegisterTestPlugin(newFunc NewTestPlugin) - -where NewTestPlugin is: - - type NewTestPlugin func(g *generator.Generator) TestPlugin - -and TestPlugin is an interface: - - type TestPlugin interface { - Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) - } - -Plugins that use this interface include: - - - populate - - gostring - - equal - - union - - and more - -Please look at these plugins as examples of how to create your own. -A good idea is to let each plugin generate its own tests. - -*/ -package testgen - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type TestPlugin interface { - Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) -} - -type NewTestPlugin func(g *generator.Generator) TestPlugin - -var testplugins = make([]NewTestPlugin, 0) - -func RegisterTestPlugin(newFunc NewTestPlugin) { - testplugins = append(testplugins, newFunc) -} - -type plugin struct { - *generator.Generator - generator.PluginImports - tests []TestPlugin -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "testgen" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g - p.tests = make([]TestPlugin, 0, len(testplugins)) - for i := range testplugins { - p.tests = append(p.tests, testplugins[i](g)) - } -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - atLeastOne := false - for i := range p.tests { - used := p.tests[i].Generate(p.PluginImports, file) - if used { - atLeastOne = true - } - } - if atLeastOne { - p.P(`//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) - } -} - -type testProto struct { - *generator.Generator -} - -func newProto(g *generator.Generator) TestPlugin { - return &testProto{g} -} - -func (p *testProto) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `Proto(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`littlefuzz := make([]byte, len(data))`) - p.P(`copy(littlefuzz, data)`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.P(`if len(littlefuzz) > 0 {`) - p.In() - p.P(`fuzzamount := 100`) - p.P(`for i := 0; i < fuzzamount; i++ {`) - p.In() - p.P(`littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))`) - p.P(`littlefuzz = append(littlefuzz, byte(popr.Intn(256)))`) - p.Out() - p.P(`}`) - p.P(`// shouldn't panic`) - p.P(`_ = `, protoPkg.Use(), `.Unmarshal(littlefuzz, msg)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) || gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`func Test`, ccTypeName, `MarshalTo(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`size := p.Size()`) - p.P(`data := make([]byte, size)`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - p.P(`_, err := p.MarshalTo(data)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - } - - if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Benchmark`, ccTypeName, `ProtoMarshal(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`pops := make([]*`, ccTypeName, `, 10000)`) - p.P(`for i := 0; i < 10000; i++ {`) - p.In() - p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) - p.Out() - p.P(`}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`data, err := `, protoPkg.Use(), `.Marshal(pops[i%10000])`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`total += len(data)`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - - p.P(`func Benchmark`, ccTypeName, `ProtoUnmarshal(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`datas := make([][]byte, 10000)`) - p.P(`for i := 0; i < 10000; i++ {`) - p.In() - p.P(`data, err := `, protoPkg.Use(), `.Marshal(NewPopulated`, ccTypeName, `(popr, false))`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`datas[i] = data`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`total += len(datas[i%10000])`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(datas[i%10000], msg); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - } - } - return used -} - -type testJson struct { - *generator.Generator -} - -func newJson(g *generator.Generator) TestPlugin { - return &testJson{g} -} - -func (p *testJson) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - jsonPkg := imports.NewImport("github.com/gogo/protobuf/jsonpb") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `JSON(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`marshaler := `, jsonPkg.Use(), `.Marshaler{}`) - p.P(`jsondata, err := marshaler.MarshalToString(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`err = `, jsonPkg.Use(), `.UnmarshalString(jsondata, msg)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - } - return used -} - -type testText struct { - *generator.Generator -} - -func newText(g *generator.Generator) TestPlugin { - return &testText{g} -} - -func (p *testText) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - //fmtPkg := imports.NewImport("fmt") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `ProtoText(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`data := `, protoPkg.Use(), `.MarshalTextString(p)`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - - p.P(`func Test`, ccTypeName, `ProtoCompactText(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`data := `, protoPkg.Use(), `.CompactTextString(p)`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - - } - } - return used -} - -func init() { - RegisterTestPlugin(newProto) - RegisterTestPlugin(newJson) - RegisterTestPlugin(newText) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/union.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/union.go deleted file mode 100644 index 684047770e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/union.go +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The onlyone plugin generates code for the onlyone extension. -All fields must be nullable and only one of the fields may be set, like a union. -Two methods are generated - - GetValue() interface{} - -and - - SetValue(v interface{}) (set bool) - -These provide easier interaction with a onlyone. - -The onlyone extension is not called union as this causes compile errors in the C++ generated code. -There can only be one ;) - -It is enabled by the following extensions: - - - onlyone - - onlyone_all - -The onlyone plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Lets look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message U { - option (gogoproto.onlyone) = true; - optional A A = 1; - optional B B = 2; - } - -given to the onlyone plugin, will generate code which looks a lot like this: - - func (this *U) GetValue() interface{} { - if this.A != nil { - return this.A - } - if this.B != nil { - return this.B - } - return nil - } - - func (this *U) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *A: - this.A = vt - case *B: - this.B = vt - default: - return false - } - return true - } - -and the following test code: - - func TestUUnion(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr) - v := p.GetValue() - msg := &U{} - if !msg.SetValue(v) { - t.Fatalf("Union: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !Union Equal %#v", msg, p) - } - } - -*/ -package union - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type union struct { - *generator.Generator - generator.PluginImports -} - -func NewUnion() *union { - return &union{} -} - -func (p *union) Name() string { - return "union" -} - -func (p *union) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *union) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - - for _, message := range file.Messages() { - if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.HasExtension() { - panic("onlyone does not currently support extensions") - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) GetValue() interface{} {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - if fieldname == "Value" { - panic("cannot have a onlyone message " + ccTypeName + " with a field named Value") - } - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return this.`, fieldname) - p.Out() - p.P(`}`) - } - p.P(`return nil`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) SetValue(value interface{}) bool {`) - p.In() - p.P(`switch vt := value.(type) {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - p.P(`case `, goTyp, `:`) - p.In() - p.P(`this.`, fieldname, ` = vt`) - p.Out() - } - p.P(`default:`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - if field.IsMessage() { - goTyp, _ := p.GoType(message, field) - obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) - - if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) { - p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`) - p.P(`if set := this.`, fieldname, `.SetValue(value); set {`) - p.In() - p.P(`return true`) - p.Out() - p.P(`}`) - p.P(`this.`, fieldname, ` = nil`) - } - } - } - p.P(`return false`) - p.Out() - p.P(`}`) - p.P(`return true`) - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewUnion()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/uniontest.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/uniontest.go deleted file mode 100644 index 75e68ed57f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/union/uniontest.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package union - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) || - !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - used = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - - p.P(`func Test`, ccTypeName, `OnlyOne(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`v := p.GetValue()`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if !msg.SetValue(v) {`) - p.In() - p.P(`t.Fatalf("OnlyOne: Could not set Value")`) - p.Out() - p.P(`}`) - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("%#v !OnlyOne Equal %#v", msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/unmarshal/unmarshal.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/unmarshal/unmarshal.go deleted file mode 100644 index acb32d9db0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/plugin/unmarshal/unmarshal.go +++ /dev/null @@ -1,1323 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -The unmarshal plugin generates a Unmarshal method for each message. -The `Unmarshal([]byte) error` method results in the fact that the message -implements the Unmarshaler interface. -The allows proto.Unmarshal to be faster by calling the generated Unmarshal method rather than using reflect. - -If is enabled by the following extensions: - - - unmarshaler - - unmarshaler_all - -Or the following extensions: - - - unsafe_unmarshaler - - unsafe_unmarshaler_all - -That is if you want to use the unsafe package in your generated code. -The speed up using the unsafe package is not very significant. - -The generation of unmarshalling tests are enabled using one of the following extensions: - - - testgen - - testgen_all - -And benchmarks given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.unmarshaler_all) = true; - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the unmarshal plugin, will generate the following code: - - func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return proto.ErrWrongType - } - var msglen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return proto.ErrWrongType - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) - if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skip(data[iNdEx:]) - if err != nil { - return err - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - return nil - } - -Remember when using this code to call proto.Unmarshal. -This will call m.Reset and invoke the generated Unmarshal method for you. -If you call m.Unmarshal without m.Reset you could be merging protocol buffers. - -*/ -package unmarshal - -import ( - "fmt" - "strconv" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type unmarshal struct { - *generator.Generator - unsafe bool - generator.PluginImports - atleastOne bool - ioPkg generator.Single - mathPkg generator.Single - unsafePkg generator.Single - localName string -} - -func NewUnmarshal() *unmarshal { - return &unmarshal{} -} - -func NewUnsafeUnmarshal() *unmarshal { - return &unmarshal{unsafe: true} -} - -func (p *unmarshal) Name() string { - if p.unsafe { - return "unsafeunmarshaler" - } - return "unmarshal" -} - -func (p *unmarshal) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *unmarshal) decodeVarint(varName string, typName string) { - p.P(`for shift := uint(0); ; shift += 7 {`) - p.In() - p.P(`if shift >= 64 {`) - p.In() - p.P(`return ErrIntOverflow` + p.localName) - p.Out() - p.P(`}`) - p.P(`if iNdEx >= l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`b := data[iNdEx]`) - p.P(`iNdEx++`) - p.P(varName, ` |= (`, typName, `(b) & 0x7F) << shift`) - p.P(`if b < 0x80 {`) - p.In() - p.P(`break`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) -} - -func (p *unmarshal) decodeFixed32(varName string, typeName string) { - p.P(`if (iNdEx+4) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`iNdEx += 4`) - p.P(varName, ` = `, typeName, `(data[iNdEx-4])`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 8`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 16`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 24`) -} - -func (p *unmarshal) unsafeFixed32(varName string, typeName string) { - p.P(`if iNdEx + 4 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) - p.P(`iNdEx += 4`) -} - -func (p *unmarshal) decodeFixed64(varName string, typeName string) { - p.P(`if (iNdEx+8) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`iNdEx += 8`) - p.P(varName, ` = `, typeName, `(data[iNdEx-8])`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-7]) << 8`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-6]) << 16`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-5]) << 24`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-4]) << 32`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 40`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 48`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 56`) -} - -func (p *unmarshal) unsafeFixed64(varName string, typeName string) { - p.P(`if iNdEx + 8 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) - p.P(`iNdEx += 8`) -} - -func (p *unmarshal) mapField(varName string, field *descriptor.FieldDescriptorProto) { - switch field.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - p.P(`var `, varName, `temp uint64`) - p.decodeFixed64(varName+"temp", "uint64") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - p.P(`var `, varName, `temp uint32`) - p.decodeFixed32(varName+"temp", "uint32") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_INT64: - p.P(`var `, varName, ` int64`) - p.decodeVarint(varName, "int64") - case descriptor.FieldDescriptorProto_TYPE_UINT64: - p.P(`var `, varName, ` uint64`) - p.decodeVarint(varName, "uint64") - case descriptor.FieldDescriptorProto_TYPE_INT32: - p.P(`var `, varName, ` int32`) - p.decodeVarint(varName, "int32") - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - p.P(`var `, varName, ` uint64`) - p.decodeFixed64(varName, "uint64") - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - p.P(`var `, varName, ` uint32`) - p.decodeFixed32(varName, "uint32") - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`var `, varName, `temp int`) - p.decodeVarint(varName+"temp", "int") - p.P(varName, ` := bool(`, varName, `temp != 0)`) - case descriptor.FieldDescriptorProto_TYPE_STRING: - p.P(`var stringLen`, varName, ` uint64`) - p.decodeVarint("stringLen"+varName, "uint64") - p.P(`intStringLen`, varName, ` := int(stringLen`, varName, `)`) - p.P(`if intStringLen`, varName, ` < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName) - p.P(`if postStringIndex`, varName, ` > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - cast, _ := p.GoType(nil, field) - cast = strings.Replace(cast, "*", "", 1) - p.P(varName, ` := `, cast, `(data[iNdEx:postStringIndex`, varName, `])`) - p.P(`iNdEx = postStringIndex`, varName) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - p.P(`var mapmsglen int`) - p.decodeVarint("mapmsglen", "int") - p.P(`if mapmsglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postmsgIndex := iNdEx + mapmsglen`) - p.P(`if mapmsglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`if postmsgIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - p.P(varName, ` := &`, msgname, `{}`) - p.P(`if err := `, varName, `.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`iNdEx = postmsgIndex`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`var mapbyteLen uint64`) - p.decodeVarint("mapbyteLen", "uint64") - p.P(`intMapbyteLen := int(mapbyteLen)`) - p.P(`if intMapbyteLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postbytesIndex := iNdEx + intMapbyteLen`) - p.P(`if postbytesIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` := make([]byte, mapbyteLen)`) - p.P(`copy(`, varName, `, data[iNdEx:postbytesIndex])`) - p.P(`iNdEx = postbytesIndex`) - case descriptor.FieldDescriptorProto_TYPE_UINT32: - p.P(`var `, varName, ` uint32`) - p.decodeVarint(varName, "uint32") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) - p.P(`var `, varName, ` `, typName) - p.decodeVarint(varName, typName) - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.P(`var `, varName, ` int32`) - p.decodeFixed32(varName, "int32") - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.P(`var `, varName, ` int64`) - p.decodeFixed64(varName, "int64") - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.P(`var `, varName, `temp int32`) - p.decodeVarint(varName+"temp", "int32") - p.P(varName, `temp = int32((uint32(`, varName, `temp) >> 1) ^ uint32(((`, varName, `temp&1)<<31)>>31))`) - p.P(varName, ` := int32(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.P(`var `, varName, `temp uint64`) - p.decodeVarint(varName+"temp", "uint64") - p.P(varName, `temp = (`, varName, `temp >> 1) ^ uint64((int64(`, varName, `temp&1)<<63)>>63)`) - p.P(varName, ` := int64(`, varName, `temp)`) - } -} - -func (p *unmarshal) noStarOrSliceType(msg *generator.Descriptor, field *descriptor.FieldDescriptorProto) string { - typ, _ := p.GoType(msg, field) - if typ[0] == '*' { - return typ[1:] - } - if typ[0] == '[' && typ[1] == ']' { - return typ[2:] - } - return typ -} - -func (p *unmarshal) field(file *descriptor.FileDescriptorProto, msg *generator.Descriptor, field *descriptor.FieldDescriptorProto, fieldname string, proto3 bool) { - repeated := field.IsRepeated() - nullable := gogoproto.IsNullable(field) - typ := p.noStarOrSliceType(msg, field) - oneof := field.OneofIndex != nil - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint64`) - p.decodeFixed64("v", "uint64") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } - } else { - if oneof { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint32`) - p.decodeFixed32("v", "uint32") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } - } else { - if oneof { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "float32") - } else { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_INT64: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_UINT64: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_INT32: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "uint64") - } else { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "uint32") - } else { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`var v int`) - p.decodeVarint("v", "int") - if oneof { - p.P(`b := `, typ, `(v != 0)`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{b}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v != 0))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(v != 0)`) - } else { - p.P(`b := `, typ, `(v != 0)`) - p.P(`m.`, fieldname, ` = &b`) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - p.P(`var stringLen uint64`) - p.decodeVarint("stringLen", "uint64") - p.P(`intStringLen := int(stringLen)`) - p.P(`if intStringLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + intStringLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(data[iNdEx:postIndex])}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(data[iNdEx:postIndex]))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(data[iNdEx:postIndex])`) - } else { - p.P(`s := `, typ, `(data[iNdEx:postIndex])`) - p.P(`m.`, fieldname, ` = &s`) - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("unmarshaler does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - p.P(`var msglen int`) - p.decodeVarint("msglen", "int") - p.P(`if msglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + msglen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if oneof { - p.P(`v := &`, msgname, `{}`) - p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if generator.IsMap(file, field) { - m := p.GoMapType(nil, field) - - keygoTyp, _ := p.GoType(nil, m.KeyField) - keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) - // keys may not be pointers - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - - // if the map type is an alias and key or values are aliases (type Foo map[Bar]Baz), - // we need to explicitly record their use here. - p.RecordTypeUse(m.KeyAliasField.GetTypeName()) - p.RecordTypeUse(m.ValueAliasField.GetTypeName()) - - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - p.P(`var keykey uint64`) - p.decodeVarint("keykey", "uint64") - p.mapField("mapkey", m.KeyAliasField) - p.P(`var valuekey uint64`) - p.decodeVarint("valuekey", "uint64") - p.mapField("mapvalue", m.ValueAliasField) - p.P(`if m.`, fieldname, ` == nil {`) - p.In() - p.P(`m.`, fieldname, ` = make(`, m.GoType, `)`) - p.Out() - p.P(`}`) - s := `m.` + fieldname - if keygoTyp == keygoAliasTyp { - s += `[mapkey]` - } else { - s += `[` + keygoAliasTyp + `(mapkey)]` - } - v := `mapvalue` - if m.ValueField.IsMessage() && !nullable { - v = `*` + v - } - if valuegoTyp != valuegoAliasTyp { - v = `((` + valuegoAliasTyp + `)(` + v + `))` - } - p.P(s, ` = `, v) - } else if repeated { - if nullable { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, msgname, `{})`) - } else { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, msgname, `{})`) - } - p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`if m.`, fieldname, ` == nil {`) - p.In() - p.P(`m.`, fieldname, ` = &`, msgname, `{}`) - p.Out() - p.P(`}`) - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else { - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`var byteLen int`) - p.decodeVarint("byteLen", "int") - p.P(`if byteLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + byteLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if !gogoproto.IsCustomType(field) { - if oneof { - p.P(`v := make([]byte, postIndex-iNdEx)`) - p.P(`copy(v, data[iNdEx:postIndex])`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, make([]byte, postIndex-iNdEx))`) - p.P(`copy(m.`, fieldname, `[len(m.`, fieldname, `)-1], data[iNdEx:postIndex])`) - } else { - p.P(`m.`, fieldname, ` = append([]byte{}`, `, data[iNdEx:postIndex]...)`) - } - } else { - _, ctyp, err := generator.GetCustomType(field) - if err != nil { - panic(err) - } - if oneof { - p.P(`var vv `, ctyp) - p.P(`v := &vv`) - p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{*v}`) - } else if repeated { - p.P(`var v `, ctyp) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`var v `, ctyp) - p.P(`m.`, fieldname, ` = &v`) - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else { - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_UINT32: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_ENUM: - typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) - if oneof { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typName) - } else { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "int32") - } else { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "int64") - } else { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`v = `, typ, `((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = v`) - } else { - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.P(`var v uint64`) - p.decodeVarint("v", "uint64") - p.P(`v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(v)}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(v)`) - } else { - p.P(`v2 := `, typ, `(v)`) - p.P(`m.`, fieldname, ` = &v2`) - } - default: - panic("not implemented") - } -} - -func (p *unmarshal) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - if p.unsafe { - p.localName += "Unsafe" - } - - p.ioPkg = p.NewImport("io") - p.mathPkg = p.NewImport("math") - p.unsafePkg = p.NewImport("unsafe") - fmtPkg := p.NewImport("fmt") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - - // build a map required field_id -> bitmask offset - rfMap := make(map[int32]uint) - rfNextId := uint(0) - for _, field := range message.Field { - if field.IsRequired() { - rfMap[field.GetNumber()] = rfNextId - rfNextId++ - } - } - rfCount := len(rfMap) - - p.P(`func (m *`, ccTypeName, `) Unmarshal(data []byte) error {`) - p.In() - if rfCount > 0 { - p.P(`var hasFields [`, strconv.Itoa(1+(rfCount-1)/64), `]uint64`) - } - p.P(`l := len(data)`) - p.P(`iNdEx := 0`) - p.P(`for iNdEx < l {`) - p.In() - p.P(`preIndex := iNdEx`) - p.P(`var wire uint64`) - p.decodeVarint("wire", "uint64") - p.P(`fieldNum := int32(wire >> 3)`) - if len(message.Field) > 0 || !message.IsGroup() { - p.P(`wireType := int(wire & 0x7)`) - } - if !message.IsGroup() { - p.P(`if wireType == `, strconv.Itoa(proto.WireEndGroup), ` {`) - p.In() - p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: wiretype end group for non-group")`) - p.Out() - p.P(`}`) - } - p.P(`if fieldNum <= 0 {`) - p.In() - p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: illegal tag %d (wire type %d)", fieldNum, wire)`) - p.Out() - p.P(`}`) - p.P(`switch fieldNum {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - errFieldname := fieldname - if field.OneofIndex != nil { - errFieldname = p.GetOneOfFieldName(message, field) - } - packed := field.IsPacked() - p.P(`case `, strconv.Itoa(int(field.GetNumber())), `:`) - p.In() - wireType := field.WireType() - if packed { - p.P(`if wireType == `, strconv.Itoa(proto.WireBytes), `{`) - p.In() - p.P(`var packedLen int`) - p.decodeVarint("packedLen", "int") - p.P(`if packedLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + packedLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`for iNdEx < postIndex {`) - p.In() - p.field(file.FileDescriptorProto, message, field, fieldname, false) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if wireType == `, strconv.Itoa(wireType), `{`) - p.In() - p.field(file.FileDescriptorProto, message, field, fieldname, false) - p.Out() - p.P(`} else {`) - p.In() - p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) - p.Out() - p.P(`}`) - } else { - p.P(`if wireType != `, strconv.Itoa(wireType), `{`) - p.In() - p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) - p.Out() - p.P(`}`) - p.field(file.FileDescriptorProto, message, field, fieldname, proto3) - } - - if field.IsRequired() { - fieldBit, ok := rfMap[field.GetNumber()] - if !ok { - panic("field is required, but no bit registered") - } - p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `)`) - } - } - p.Out() - p.P(`default:`) - p.In() - if message.DescriptorProto.HasExtension() { - c := []string{} - for _, erange := range message.GetExtensionRange() { - c = append(c, `((fieldNum >= `+strconv.Itoa(int(erange.GetStart()))+") && (fieldNum<"+strconv.Itoa(int(erange.GetEnd()))+`))`) - } - p.P(`if `, strings.Join(c, "||"), `{`) - p.In() - p.P(`var sizeOfWire int`) - p.P(`for {`) - p.In() - p.P(`sizeOfWire++`) - p.P(`wire >>= 7`) - p.P(`if wire == 0 {`) - p.In() - p.P(`break`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`iNdEx-=sizeOfWire`) - p.P(`skippy, err := skip`, p.localName+`(data[iNdEx:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if m.XXX_extensions == nil {`) - p.In() - p.P(`m.XXX_extensions = make(map[int32]`, protoPkg.Use(), `.Extension)`) - p.Out() - p.P(`}`) - p.P(`m.XXX_extensions[int32(fieldNum)] = `, protoPkg.Use(), `.NewExtension(data[iNdEx:iNdEx+skippy])`) - } else { - p.P(`m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...)`) - } - p.P(`iNdEx += skippy`) - p.Out() - p.P(`} else {`) - p.In() - } - p.P(`iNdEx=preIndex`) - p.P(`skippy, err := skip`, p.localName, `(data[iNdEx:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)`) - } - p.P(`iNdEx += skippy`) - p.Out() - if message.DescriptorProto.HasExtension() { - p.Out() - p.P(`}`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - for _, field := range message.Field { - if !field.IsRequired() { - continue - } - - fieldBit, ok := rfMap[field.GetNumber()] - if !ok { - panic("field is required, but no bit registered") - } - - p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `) == 0 {`) - p.In() - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.P(`return new(`, protoPkg.Use(), `.RequiredNotSetError)`) - } else { - p.P(`return `, protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) - } - p.Out() - p.P(`}`) - } - p.P() - p.P(`if iNdEx > l {`) - p.In() - p.P(`return ` + p.ioPkg.Use() + `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`return nil`) - p.Out() - p.P(`}`) - } - if !p.atleastOne { - return - } - - p.P(`func skip` + p.localName + `(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLength` + p.localName + ` - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skip` + p.localName + `(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, ` + fmtPkg.Use() + `.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") - } - - var ( - ErrInvalidLength` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: integer overflow") - ) - `) -} - -func init() { - generator.RegisterPlugin(NewUnmarshal()) - generator.RegisterPlugin(NewUnsafeUnmarshal()) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/Makefile deleted file mode 100644 index 23a6b17344..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -install: - go install - -test: install generate-test-pbs - go test - - -generate-test-pbs: - make install - make -C testdata - protoc-min-version --version="3.0.0" --proto_path=.:../../../../ --gogo_out=. proto3_proto/proto3.proto - make diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/all_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/all_test.go deleted file mode 100644 index dc76331729..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/all_test.go +++ /dev/null @@ -1,2169 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "math/rand" - "reflect" - "runtime/debug" - "strings" - "testing" - "time" - - . "github.com/gogo/protobuf/proto" - . "github.com/gogo/protobuf/proto/testdata" -) - -var globalO *Buffer - -func old() *Buffer { - if globalO == nil { - globalO = NewBuffer(nil) - } - globalO.Reset() - return globalO -} - -func equalbytes(b1, b2 []byte, t *testing.T) { - if len(b1) != len(b2) { - t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) - return - } - for i := 0; i < len(b1); i++ { - if b1[i] != b2[i] { - t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) - } - } -} - -func initGoTestField() *GoTestField { - f := new(GoTestField) - f.Label = String("label") - f.Type = String("type") - return f -} - -// These are all structurally equivalent but the tag numbers differ. -// (It's remarkable that required, optional, and repeated all have -// 8 letters.) -func initGoTest_RequiredGroup() *GoTest_RequiredGroup { - return &GoTest_RequiredGroup{ - RequiredField: String("required"), - } -} - -func initGoTest_OptionalGroup() *GoTest_OptionalGroup { - return &GoTest_OptionalGroup{ - RequiredField: String("optional"), - } -} - -func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { - return &GoTest_RepeatedGroup{ - RequiredField: String("repeated"), - } -} - -func initGoTest(setdefaults bool) *GoTest { - pb := new(GoTest) - if setdefaults { - pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) - pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) - pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) - pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) - pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) - pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) - pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) - pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) - pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) - pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) - pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted - pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) - pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) - } - - pb.Kind = GoTest_TIME.Enum() - pb.RequiredField = initGoTestField() - pb.F_BoolRequired = Bool(true) - pb.F_Int32Required = Int32(3) - pb.F_Int64Required = Int64(6) - pb.F_Fixed32Required = Uint32(32) - pb.F_Fixed64Required = Uint64(64) - pb.F_Uint32Required = Uint32(3232) - pb.F_Uint64Required = Uint64(6464) - pb.F_FloatRequired = Float32(3232) - pb.F_DoubleRequired = Float64(6464) - pb.F_StringRequired = String("string") - pb.F_BytesRequired = []byte("bytes") - pb.F_Sint32Required = Int32(-32) - pb.F_Sint64Required = Int64(-64) - pb.Requiredgroup = initGoTest_RequiredGroup() - - return pb -} - -func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { - data := b.Bytes() - ld := len(data) - ls := len(s) / 2 - - fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) - - // find the interesting spot - n - n := ls - if ld < ls { - n = ld - } - j := 0 - for i := 0; i < n; i++ { - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - if data[i] == bs { - continue - } - n = i - break - } - l := n - 10 - if l < 0 { - l = 0 - } - h := n + 10 - - // find the interesting spot - n - fmt.Printf("is[%d]:", l) - for i := l; i < h; i++ { - if i >= ld { - fmt.Printf(" --") - continue - } - fmt.Printf(" %.2x", data[i]) - } - fmt.Printf("\n") - - fmt.Printf("sb[%d]:", l) - for i := l; i < h; i++ { - if i >= ls { - fmt.Printf(" --") - continue - } - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - fmt.Printf(" %.2x", bs) - } - fmt.Printf("\n") - - t.Fail() - - // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) - // Print the output in a partially-decoded format; can - // be helpful when updating the test. It produces the output - // that is pasted, with minor edits, into the argument to verify(). - // data := b.Bytes() - // nesting := 0 - // for b.Len() > 0 { - // start := len(data) - b.Len() - // var u uint64 - // u, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // wire := u & 0x7 - // tag := u >> 3 - // switch wire { - // case WireVarint: - // v, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed32: - // v, err := DecodeFixed32(b) - // if err != nil { - // fmt.Printf("decode error on fixed32:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed64: - // v, err := DecodeFixed64(b) - // if err != nil { - // fmt.Printf("decode error on fixed64:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireBytes: - // nb, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // after_tag := len(data) - b.Len() - // str := make([]byte, nb) - // _, err = b.Read(str) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", - // data[start:after_tag], str, tag, wire) - // case WireStartGroup: - // nesting++ - // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // case WireEndGroup: - // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // nesting-- - // default: - // fmt.Printf("unrecognized wire type %d\n", wire) - // return - // } - // } -} - -func hex(c uint8) uint8 { - if '0' <= c && c <= '9' { - return c - '0' - } - if 'a' <= c && c <= 'f' { - return 10 + c - 'a' - } - if 'A' <= c && c <= 'F' { - return 10 + c - 'A' - } - return 0 -} - -func equal(b []byte, s string, t *testing.T) bool { - if 2*len(b) != len(s) { - // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) - fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) - return false - } - for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { - x := hex(s[j])*16 + hex(s[j+1]) - if b[i] != x { - // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) - fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) - return false - } - } - return true -} - -func overify(t *testing.T, pb *GoTest, expected string) { - o := old() - err := o.Marshal(pb) - if err != nil { - fmt.Printf("overify marshal-1 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 1", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = o.Unmarshal(pbd) - if err != nil { - t.Fatalf("overify unmarshal err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - o.Reset() - err = o.Marshal(pbd) - if err != nil { - t.Errorf("overify marshal-2 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 2", o.Bytes()) - t.Fatalf("string = %s", expected) - } -} - -// Simple tests for numeric encode/decode primitives (varint, etc.) -func TestNumericPrimitives(t *testing.T) { - for i := uint64(0); i < 1e6; i += 111 { - o := old() - if o.EncodeVarint(i) != nil { - t.Error("EncodeVarint") - break - } - x, e := o.DecodeVarint() - if e != nil { - t.Fatal("DecodeVarint") - } - if x != i { - t.Fatal("varint decode fail:", i, x) - } - - o = old() - if o.EncodeFixed32(i) != nil { - t.Fatal("encFixed32") - } - x, e = o.DecodeFixed32() - if e != nil { - t.Fatal("decFixed32") - } - if x != i { - t.Fatal("fixed32 decode fail:", i, x) - } - - o = old() - if o.EncodeFixed64(i*1234567) != nil { - t.Error("encFixed64") - break - } - x, e = o.DecodeFixed64() - if e != nil { - t.Error("decFixed64") - break - } - if x != i*1234567 { - t.Error("fixed64 decode fail:", i*1234567, x) - break - } - - o = old() - i32 := int32(i - 12345) - if o.EncodeZigzag32(uint64(i32)) != nil { - t.Fatal("EncodeZigzag32") - } - x, e = o.DecodeZigzag32() - if e != nil { - t.Fatal("DecodeZigzag32") - } - if x != uint64(uint32(i32)) { - t.Fatal("zigzag32 decode fail:", i32, x) - } - - o = old() - i64 := int64(i - 12345) - if o.EncodeZigzag64(uint64(i64)) != nil { - t.Fatal("EncodeZigzag64") - } - x, e = o.DecodeZigzag64() - if e != nil { - t.Fatal("DecodeZigzag64") - } - if x != uint64(i64) { - t.Fatal("zigzag64 decode fail:", i64, x) - } - } -} - -// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. -type fakeMarshaler struct { - b []byte - err error -} - -func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } -func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } -func (f *fakeMarshaler) ProtoMessage() {} -func (f *fakeMarshaler) Reset() {} - -type msgWithFakeMarshaler struct { - M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` -} - -func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } -func (m *msgWithFakeMarshaler) ProtoMessage() {} -func (m *msgWithFakeMarshaler) Reset() {} - -// Simple tests for proto messages that implement the Marshaler interface. -func TestMarshalerEncoding(t *testing.T) { - tests := []struct { - name string - m Message - want []byte - wantErr error - }{ - { - name: "Marshaler that fails", - m: &fakeMarshaler{ - err: errors.New("some marshal err"), - b: []byte{5, 6, 7}, - }, - // Since there's an error, nothing should be written to buffer. - want: nil, - wantErr: errors.New("some marshal err"), - }, - { - name: "Marshaler that fails with RequiredNotSetError", - m: &msgWithFakeMarshaler{ - M: &fakeMarshaler{ - err: &RequiredNotSetError{}, - b: []byte{5, 6, 7}, - }, - }, - // Since there's an error that can be continued after, - // the buffer should be written. - want: []byte{ - 10, 3, // for &msgWithFakeMarshaler - 5, 6, 7, // for &fakeMarshaler - }, - wantErr: &RequiredNotSetError{}, - }, - { - name: "Marshaler that succeeds", - m: &fakeMarshaler{ - b: []byte{0, 1, 2, 3, 4, 127, 255}, - }, - want: []byte{0, 1, 2, 3, 4, 127, 255}, - wantErr: nil, - }, - } - for _, test := range tests { - b := NewBuffer(nil) - err := b.Marshal(test.m) - if _, ok := err.(*RequiredNotSetError); ok { - // We're not in package proto, so we can only assert the type in this case. - err = &RequiredNotSetError{} - } - if !reflect.DeepEqual(test.wantErr, err) { - t.Errorf("%s: got err %v wanted %v", test.name, err, test.wantErr) - } - if !reflect.DeepEqual(test.want, b.Bytes()) { - t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) - } - } -} - -// Simple tests for bytes -func TestBytesPrimitives(t *testing.T) { - o := old() - bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} - if o.EncodeRawBytes(bytes) != nil { - t.Error("EncodeRawBytes") - } - decb, e := o.DecodeRawBytes(false) - if e != nil { - t.Error("DecodeRawBytes") - } - equalbytes(bytes, decb, t) -} - -// Simple tests for strings -func TestStringPrimitives(t *testing.T) { - o := old() - s := "now is the time" - if o.EncodeStringBytes(s) != nil { - t.Error("enc_string") - } - decs, e := o.DecodeStringBytes() - if e != nil { - t.Error("dec_string") - } - if s != decs { - t.Error("string encode/decode fail:", s, decs) - } -} - -// Do we catch the "required bit not set" case? -func TestRequiredBit(t *testing.T) { - o := old() - pb := new(GoTest) - err := o.Marshal(pb) - if err == nil { - t.Error("did not catch missing required fields") - } else if strings.Index(err.Error(), "Kind") < 0 { - t.Error("wrong error type:", err) - } -} - -// Check that all fields are nil. -// Clearly silly, and a residue from a more interesting test with an earlier, -// different initialization property, but it once caught a compiler bug so -// it lives. -func checkInitialized(pb *GoTest, t *testing.T) { - if pb.F_BoolDefaulted != nil { - t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) - } - if pb.F_Int32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) - } - if pb.F_Int64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) - } - if pb.F_Fixed32Defaulted != nil { - t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) - } - if pb.F_Fixed64Defaulted != nil { - t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) - } - if pb.F_Uint32Defaulted != nil { - t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) - } - if pb.F_Uint64Defaulted != nil { - t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) - } - if pb.F_FloatDefaulted != nil { - t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) - } - if pb.F_DoubleDefaulted != nil { - t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) - } - if pb.F_StringDefaulted != nil { - t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) - } - if pb.F_BytesDefaulted != nil { - t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) - } - if pb.F_Sint32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) - } - if pb.F_Sint64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) - } -} - -// Does Reset() reset? -func TestReset(t *testing.T) { - pb := initGoTest(true) - // muck with some values - pb.F_BoolDefaulted = Bool(false) - pb.F_Int32Defaulted = Int32(237) - pb.F_Int64Defaulted = Int64(12346) - pb.F_Fixed32Defaulted = Uint32(32000) - pb.F_Fixed64Defaulted = Uint64(666) - pb.F_Uint32Defaulted = Uint32(323232) - pb.F_Uint64Defaulted = nil - pb.F_FloatDefaulted = nil - pb.F_DoubleDefaulted = Float64(0) - pb.F_StringDefaulted = String("gotcha") - pb.F_BytesDefaulted = []byte("asdfasdf") - pb.F_Sint32Defaulted = Int32(123) - pb.F_Sint64Defaulted = Int64(789) - pb.Reset() - checkInitialized(pb, t) -} - -// All required fields set, no defaults provided. -func TestEncodeDecode1(t *testing.T) { - pb := initGoTest(false) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 0x20 - "714000000000000000"+ // field 14, encoding 1, value 0x40 - "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 - "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" - "b304"+ // field 70, encoding 3, start group - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // field 70, encoding 4, end group - "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f") // field 103, encoding 0, 0x7f zigzag64 -} - -// All required fields set, defaults provided. -func TestEncodeDecode2(t *testing.T) { - pb := initGoTest(true) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All default fields set to their default value by hand -func TestEncodeDecode3(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolDefaulted = Bool(true) - pb.F_Int32Defaulted = Int32(32) - pb.F_Int64Defaulted = Int64(64) - pb.F_Fixed32Defaulted = Uint32(320) - pb.F_Fixed64Defaulted = Uint64(640) - pb.F_Uint32Defaulted = Uint32(3200) - pb.F_Uint64Defaulted = Uint64(6400) - pb.F_FloatDefaulted = Float32(314159) - pb.F_DoubleDefaulted = Float64(271828) - pb.F_StringDefaulted = String("hello, \"world!\"\n") - pb.F_BytesDefaulted = []byte("Bignose") - pb.F_Sint32Defaulted = Int32(-32) - pb.F_Sint64Defaulted = Int64(-64) - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all non-defaulted optional fields have values. -func TestEncodeDecode4(t *testing.T) { - pb := initGoTest(true) - pb.Table = String("hello") - pb.Param = Int32(7) - pb.OptionalField = initGoTestField() - pb.F_BoolOptional = Bool(true) - pb.F_Int32Optional = Int32(32) - pb.F_Int64Optional = Int64(64) - pb.F_Fixed32Optional = Uint32(3232) - pb.F_Fixed64Optional = Uint64(6464) - pb.F_Uint32Optional = Uint32(323232) - pb.F_Uint64Optional = Uint64(646464) - pb.F_FloatOptional = Float32(32.) - pb.F_DoubleOptional = Float64(64.) - pb.F_StringOptional = String("hello") - pb.F_BytesOptional = []byte("Bignose") - pb.F_Sint32Optional = Int32(-32) - pb.F_Sint64Optional = Int64(-64) - pb.Optionalgroup = initGoTest_OptionalGroup() - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" - "1807"+ // field 3, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "f00101"+ // field 30, encoding 0, value 1 - "f80120"+ // field 31, encoding 0, value 32 - "800240"+ // field 32, encoding 0, value 64 - "8d02a00c0000"+ // field 33, encoding 5, value 3232 - "91024019000000000000"+ // field 34, encoding 1, value 6464 - "9802a0dd13"+ // field 35, encoding 0, value 323232 - "a002c0ba27"+ // field 36, encoding 0, value 646464 - "ad0200000042"+ // field 37, encoding 5, value 32.0 - "b1020000000000005040"+ // field 38, encoding 1, value 64.0 - "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "d305"+ // start group field 90 level 1 - "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" - "d405"+ // end group field 90 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" - "f0123f"+ // field 302, encoding 0, value 63 - "f8127f"+ // field 303, encoding 0, value 127 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestEncodeDecode5(t *testing.T) { - pb := initGoTest(true) - pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} - pb.F_BoolRepeated = []bool{false, true} - pb.F_Int32Repeated = []int32{32, 33} - pb.F_Int64Repeated = []int64{64, 65} - pb.F_Fixed32Repeated = []uint32{3232, 3333} - pb.F_Fixed64Repeated = []uint64{6464, 6565} - pb.F_Uint32Repeated = []uint32{323232, 333333} - pb.F_Uint64Repeated = []uint64{646464, 656565} - pb.F_FloatRepeated = []float32{32., 33.} - pb.F_DoubleRepeated = []float64{64., 65.} - pb.F_StringRepeated = []string{"hello", "sailor"} - pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} - pb.F_Sint32Repeated = []int32{32, -32} - pb.F_Sint64Repeated = []int64{64, -64} - pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "a00100"+ // field 20, encoding 0, value 0 - "a00101"+ // field 20, encoding 0, value 1 - "a80120"+ // field 21, encoding 0, value 32 - "a80121"+ // field 21, encoding 0, value 33 - "b00140"+ // field 22, encoding 0, value 64 - "b00141"+ // field 22, encoding 0, value 65 - "bd01a00c0000"+ // field 23, encoding 5, value 3232 - "bd01050d0000"+ // field 23, encoding 5, value 3333 - "c1014019000000000000"+ // field 24, encoding 1, value 6464 - "c101a519000000000000"+ // field 24, encoding 1, value 6565 - "c801a0dd13"+ // field 25, encoding 0, value 323232 - "c80195ac14"+ // field 25, encoding 0, value 333333 - "d001c0ba27"+ // field 26, encoding 0, value 646464 - "d001b58928"+ // field 26, encoding 0, value 656565 - "dd0100000042"+ // field 27, encoding 5, value 32.0 - "dd0100000442"+ // field 27, encoding 5, value 33.0 - "e1010000000000005040"+ // field 28, encoding 1, value 64.0 - "e1010000000000405040"+ // field 28, encoding 1, value 65.0 - "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" - "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ca0c03"+"626967"+ // field 201, encoding 2, string "big" - "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" - "d00c40"+ // field 202, encoding 0, value 32 - "d00c3f"+ // field 202, encoding 0, value -32 - "d80c8001"+ // field 203, encoding 0, value 64 - "d80c7f"+ // field 203, encoding 0, value -64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, all packed repeated fields given two values. -func TestEncodeDecode6(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolRepeatedPacked = []bool{false, true} - pb.F_Int32RepeatedPacked = []int32{32, 33} - pb.F_Int64RepeatedPacked = []int64{64, 65} - pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} - pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} - pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} - pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} - pb.F_FloatRepeatedPacked = []float32{32., 33.} - pb.F_DoubleRepeatedPacked = []float64{64., 65.} - pb.F_Sint32RepeatedPacked = []int32{32, -32} - pb.F_Sint64RepeatedPacked = []int64{64, -64} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 - "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 - "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 - "aa0308"+ // field 53, encoding 2, 8 bytes - "a00c0000050d0000"+ // value 3232, value 3333 - "b20310"+ // field 54, encoding 2, 16 bytes - "4019000000000000a519000000000000"+ // value 6464, value 6565 - "ba0306"+ // field 55, encoding 2, 6 bytes - "a0dd1395ac14"+ // value 323232, value 333333 - "c20306"+ // field 56, encoding 2, 6 bytes - "c0ba27b58928"+ // value 646464, value 656565 - "ca0308"+ // field 57, encoding 2, 8 bytes - "0000004200000442"+ // value 32.0, value 33.0 - "d20310"+ // field 58, encoding 2, 16 bytes - "00000000000050400000000000405040"+ // value 64.0, value 65.0 - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "b21f02"+ // field 502, encoding 2, 2 bytes - "403f"+ // value 32, value -32 - "ba1f03"+ // field 503, encoding 2, 3 bytes - "80017f") // value 64, value -64 -} - -// Test that we can encode empty bytes fields. -func TestEncodeDecodeBytes1(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRequired = []byte{} - pb.F_BytesRepeated = [][]byte{{}} - pb.F_BytesOptional = []byte{} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { - t.Error("required empty bytes field is incorrect") - } - if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { - t.Error("repeated empty bytes field is incorrect") - } - if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { - t.Error("optional empty bytes field is incorrect") - } -} - -// Test that we encode nil-valued fields of a repeated bytes field correctly. -// Since entries in a repeated field cannot be nil, nil must mean empty value. -func TestEncodeDecodeBytes2(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRepeated = [][]byte{nil} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { - t.Error("Unexpected value for repeated bytes field") - } -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestSkippingUnrecognizedFields(t *testing.T) { - o := old() - pb := initGoTestField() - - // Marshal it normally. - o.Marshal(pb) - - // Now new a GoSkipTest record. - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - // Marshal it into same buffer. - o.Marshal(skip) - - pbd := new(GoTestField) - o.Unmarshal(pbd) - - // The __unrecognized field should be a marshaling of GoSkipTest - skipd := new(GoSkipTest) - - o.SetBuf(pbd.XXX_unrecognized) - o.Unmarshal(skipd) - - if *skipd.SkipInt32 != *skip.SkipInt32 { - t.Error("skip int32", skipd.SkipInt32) - } - if *skipd.SkipFixed32 != *skip.SkipFixed32 { - t.Error("skip fixed32", skipd.SkipFixed32) - } - if *skipd.SkipFixed64 != *skip.SkipFixed64 { - t.Error("skip fixed64", skipd.SkipFixed64) - } - if *skipd.SkipString != *skip.SkipString { - t.Error("skip string", *skipd.SkipString) - } - if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { - t.Error("skip group int32", skipd.Skipgroup.GroupInt32) - } - if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { - t.Error("skip group string", *skipd.Skipgroup.GroupString) - } -} - -// Check that unrecognized fields of a submessage are preserved. -func TestSubmessageUnrecognizedFields(t *testing.T) { - nm := &NewMessage{ - Nested: &NewMessage_Nested{ - Name: String("Nigel"), - FoodGroup: String("carbs"), - }, - } - b, err := Marshal(nm) - if err != nil { - t.Fatalf("Marshal of NewMessage: %v", err) - } - - // Unmarshal into an OldMessage. - om := new(OldMessage) - if err := Unmarshal(b, om); err != nil { - t.Fatalf("Unmarshal to OldMessage: %v", err) - } - exp := &OldMessage{ - Nested: &OldMessage_Nested{ - Name: String("Nigel"), - // normal protocol buffer users should not do this - XXX_unrecognized: []byte("\x12\x05carbs"), - }, - } - if !Equal(om, exp) { - t.Errorf("om = %v, want %v", om, exp) - } - - // Clone the OldMessage. - om = Clone(om).(*OldMessage) - if !Equal(om, exp) { - t.Errorf("Clone(om) = %v, want %v", om, exp) - } - - // Marshal the OldMessage, then unmarshal it into an empty NewMessage. - if b, err = Marshal(om); err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - t.Logf("Marshal(%v) -> %q", om, b) - nm2 := new(NewMessage) - if err := Unmarshal(b, nm2); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - if !Equal(nm, nm2) { - t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) - } -} - -// Check that an int32 field can be upgraded to an int64 field. -func TestNegativeInt32(t *testing.T) { - om := &OldMessage{ - Num: Int32(-1), - } - b, err := Marshal(om) - if err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - - // Check the size. It should be 11 bytes; - // 1 for the field/wire type, and 10 for the negative number. - if len(b) != 11 { - t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) - } - - // Unmarshal into a NewMessage. - nm := new(NewMessage) - if err := Unmarshal(b, nm); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - want := &NewMessage{ - Num: Int64(-1), - } - if !Equal(nm, want) { - t.Errorf("nm = %v, want %v", nm, want) - } -} - -// Check that we can grow an array (repeated field) to have many elements. -// This test doesn't depend only on our encoding; for variety, it makes sure -// we create, encode, and decode the correct contents explicitly. It's therefore -// a bit messier. -// This test also uses (and hence tests) the Marshal/Unmarshal functions -// instead of the methods. -func TestBigRepeated(t *testing.T) { - pb := initGoTest(true) - - // Create the arrays - const N = 50 // Internally the library starts much smaller. - pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) - pb.F_Sint64Repeated = make([]int64, N) - pb.F_Sint32Repeated = make([]int32, N) - pb.F_BytesRepeated = make([][]byte, N) - pb.F_StringRepeated = make([]string, N) - pb.F_DoubleRepeated = make([]float64, N) - pb.F_FloatRepeated = make([]float32, N) - pb.F_Uint64Repeated = make([]uint64, N) - pb.F_Uint32Repeated = make([]uint32, N) - pb.F_Fixed64Repeated = make([]uint64, N) - pb.F_Fixed32Repeated = make([]uint32, N) - pb.F_Int64Repeated = make([]int64, N) - pb.F_Int32Repeated = make([]int32, N) - pb.F_BoolRepeated = make([]bool, N) - pb.RepeatedField = make([]*GoTestField, N) - - // Fill in the arrays with checkable values. - igtf := initGoTestField() - igtrg := initGoTest_RepeatedGroup() - for i := 0; i < N; i++ { - pb.Repeatedgroup[i] = igtrg - pb.F_Sint64Repeated[i] = int64(i) - pb.F_Sint32Repeated[i] = int32(i) - s := fmt.Sprint(i) - pb.F_BytesRepeated[i] = []byte(s) - pb.F_StringRepeated[i] = s - pb.F_DoubleRepeated[i] = float64(i) - pb.F_FloatRepeated[i] = float32(i) - pb.F_Uint64Repeated[i] = uint64(i) - pb.F_Uint32Repeated[i] = uint32(i) - pb.F_Fixed64Repeated[i] = uint64(i) - pb.F_Fixed32Repeated[i] = uint32(i) - pb.F_Int64Repeated[i] = int64(i) - pb.F_Int32Repeated[i] = int32(i) - pb.F_BoolRepeated[i] = i%2 == 0 - pb.RepeatedField[i] = igtf - } - - // Marshal. - buf, _ := Marshal(pb) - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - Unmarshal(buf, pbd) - - // Check the checkable values - for i := uint64(0); i < N; i++ { - if pbd.Repeatedgroup[i] == nil { // TODO: more checking? - t.Error("pbd.Repeatedgroup bad") - } - var x uint64 - x = uint64(pbd.F_Sint64Repeated[i]) - if x != i { - t.Error("pbd.F_Sint64Repeated bad", x, i) - } - x = uint64(pbd.F_Sint32Repeated[i]) - if x != i { - t.Error("pbd.F_Sint32Repeated bad", x, i) - } - s := fmt.Sprint(i) - equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) - if pbd.F_StringRepeated[i] != s { - t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) - } - x = uint64(pbd.F_DoubleRepeated[i]) - if x != i { - t.Error("pbd.F_DoubleRepeated bad", x, i) - } - x = uint64(pbd.F_FloatRepeated[i]) - if x != i { - t.Error("pbd.F_FloatRepeated bad", x, i) - } - x = pbd.F_Uint64Repeated[i] - if x != i { - t.Error("pbd.F_Uint64Repeated bad", x, i) - } - x = uint64(pbd.F_Uint32Repeated[i]) - if x != i { - t.Error("pbd.F_Uint32Repeated bad", x, i) - } - x = pbd.F_Fixed64Repeated[i] - if x != i { - t.Error("pbd.F_Fixed64Repeated bad", x, i) - } - x = uint64(pbd.F_Fixed32Repeated[i]) - if x != i { - t.Error("pbd.F_Fixed32Repeated bad", x, i) - } - x = uint64(pbd.F_Int64Repeated[i]) - if x != i { - t.Error("pbd.F_Int64Repeated bad", x, i) - } - x = uint64(pbd.F_Int32Repeated[i]) - if x != i { - t.Error("pbd.F_Int32Repeated bad", x, i) - } - if pbd.F_BoolRepeated[i] != (i%2 == 0) { - t.Error("pbd.F_BoolRepeated bad", x, i) - } - if pbd.RepeatedField[i] == nil { // TODO: more checking? - t.Error("pbd.RepeatedField bad") - } - } -} - -// Verify we give a useful message when decoding to the wrong structure type. -func TestTypeMismatch(t *testing.T) { - pb1 := initGoTest(true) - - // Marshal - o := old() - o.Marshal(pb1) - - // Now Unmarshal it to the wrong type. - pb2 := initGoTestField() - err := o.Unmarshal(pb2) - if err == nil { - t.Error("expected error, got no error") - } else if !strings.Contains(err.Error(), "bad wiretype") { - t.Error("expected bad wiretype error, got", err) - } -} - -func encodeDecode(t *testing.T, in, out Message, msg string) { - buf, err := Marshal(in) - if err != nil { - t.Fatalf("failed marshaling %v: %v", msg, err) - } - if err := Unmarshal(buf, out); err != nil { - t.Fatalf("failed unmarshaling %v: %v", msg, err) - } -} - -func TestPackedNonPackedDecoderSwitching(t *testing.T) { - np, p := new(NonPackedTest), new(PackedTest) - - // non-packed -> packed - np.A = []int32{0, 1, 1, 2, 3, 5} - encodeDecode(t, np, p, "non-packed -> packed") - if !reflect.DeepEqual(np.A, p.B) { - t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) - } - - // packed -> non-packed - np.Reset() - p.B = []int32{3, 1, 4, 1, 5, 9} - encodeDecode(t, p, np, "packed -> non-packed") - if !reflect.DeepEqual(p.B, np.A) { - t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) - } -} - -func TestProto1RepeatedGroup(t *testing.T) { - pb := &MessageList{ - Message: []*MessageList_Message{ - { - Name: String("blah"), - Count: Int32(7), - }, - // NOTE: pb.Message[1] is a nil - nil, - }, - } - - o := old() - err := o.Marshal(pb) - if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { - t.Fatalf("unexpected or no error when marshaling: %v", err) - } -} - -// Test that enums work. Checks for a bug introduced by making enums -// named types instead of int32: newInt32FromUint64 would crash with -// a type mismatch in reflect.PointTo. -func TestEnum(t *testing.T) { - pb := new(GoEnum) - pb.Foo = FOO_FOO1.Enum() - o := old() - if err := o.Marshal(pb); err != nil { - t.Fatal("error encoding enum:", err) - } - pb1 := new(GoEnum) - if err := o.Unmarshal(pb1); err != nil { - t.Fatal("error decoding enum:", err) - } - if *pb1.Foo != FOO_FOO1 { - t.Error("expected 7 but got ", *pb1.Foo) - } -} - -// Enum types have String methods. Check that enum fields can be printed. -// We don't care what the value actually is, just as long as it doesn't crash. -func TestPrintingNilEnumFields(t *testing.T) { - pb := new(GoEnum) - _ = fmt.Sprintf("%+v", pb) -} - -// Verify that absent required fields cause Marshal/Unmarshal to return errors. -func TestRequiredFieldEnforcement(t *testing.T) { - pb := new(GoTestField) - _, err := Marshal(pb) - if err == nil { - t.Error("marshal: expected error, got nil") - } else if strings.Index(err.Error(), "Label") < 0 { - t.Errorf("marshal: bad error type: %v", err) - } - - // A slightly sneaky, yet valid, proto. It encodes the same required field twice, - // so simply counting the required fields is insufficient. - // field 1, encoding 2, value "hi" - buf := []byte("\x0A\x02hi\x0A\x02hi") - err = Unmarshal(buf, pb) - if err == nil { - t.Error("unmarshal: expected error, got nil") - } else if strings.Index(err.Error(), "{Unknown}") < 0 { - t.Errorf("unmarshal: bad error type: %v", err) - } -} - -func TestTypedNilMarshal(t *testing.T) { - // A typed nil should return ErrNil and not crash. - _, err := Marshal((*GoEnum)(nil)) - if err != ErrNil { - t.Errorf("Marshal: got err %v, want ErrNil", err) - } -} - -// A type that implements the Marshaler interface, but is not nillable. -type nonNillableInt uint64 - -func (nni nonNillableInt) Marshal() ([]byte, error) { - return EncodeVarint(uint64(nni)), nil -} - -type NNIMessage struct { - nni nonNillableInt -} - -func (*NNIMessage) Reset() {} -func (*NNIMessage) String() string { return "" } -func (*NNIMessage) ProtoMessage() {} - -// A type that implements the Marshaler interface and is nillable. -type nillableMessage struct { - x uint64 -} - -func (nm *nillableMessage) Marshal() ([]byte, error) { - return EncodeVarint(nm.x), nil -} - -type NMMessage struct { - nm *nillableMessage -} - -func (*NMMessage) Reset() {} -func (*NMMessage) String() string { return "" } -func (*NMMessage) ProtoMessage() {} - -// Verify a type that uses the Marshaler interface, but has a nil pointer. -func TestNilMarshaler(t *testing.T) { - // Try a struct with a Marshaler field that is nil. - // It should be directly marshable. - nmm := new(NMMessage) - if _, err := Marshal(nmm); err != nil { - t.Error("unexpected error marshaling nmm: ", err) - } - - // Try a struct with a Marshaler field that is not nillable. - nnim := new(NNIMessage) - nnim.nni = 7 - var _ Marshaler = nnim.nni // verify it is truly a Marshaler - if _, err := Marshal(nnim); err != nil { - t.Error("unexpected error marshaling nnim: ", err) - } -} - -func TestAllSetDefaults(t *testing.T) { - // Exercise SetDefaults with all scalar field types. - m := &Defaults{ - // NaN != NaN, so override that here. - F_Nan: Float32(1.7), - } - expected := &Defaults{ - F_Bool: Bool(true), - F_Int32: Int32(32), - F_Int64: Int64(64), - F_Fixed32: Uint32(320), - F_Fixed64: Uint64(640), - F_Uint32: Uint32(3200), - F_Uint64: Uint64(6400), - F_Float: Float32(314159), - F_Double: Float64(271828), - F_String: String(`hello, "world!"` + "\n"), - F_Bytes: []byte("Bignose"), - F_Sint32: Int32(-32), - F_Sint64: Int64(-64), - F_Enum: Defaults_GREEN.Enum(), - F_Pinf: Float32(float32(math.Inf(1))), - F_Ninf: Float32(float32(math.Inf(-1))), - F_Nan: Float32(1.7), - StrZero: String(""), - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultsWithSetField(t *testing.T) { - // Check that a set value is not overridden. - m := &Defaults{ - F_Int32: Int32(12), - } - SetDefaults(m) - if v := m.GetF_Int32(); v != 12 { - t.Errorf("m.FInt32 = %v, want 12", v) - } -} - -func TestSetDefaultsWithSubMessage(t *testing.T) { - m := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("gopher"), - }, - } - expected := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("gopher"), - Port: Int32(4000), - }, - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { - m := &MyMessage{ - RepInner: []*InnerMessage{{}}, - } - expected := &MyMessage{ - RepInner: []*InnerMessage{{ - Port: Int32(4000), - }}, - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { - m := &MyMessage{ - Pet: []string{"turtle", "wombat"}, - } - expected := Clone(m) - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestMaximumTagNumber(t *testing.T) { - m := &MaxTag{ - LastField: String("natural goat essence"), - } - buf, err := Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal failed: %v", err) - } - m2 := new(MaxTag) - if err := Unmarshal(buf, m2); err != nil { - t.Fatalf("proto.Unmarshal failed: %v", err) - } - if got, want := m2.GetLastField(), *m.LastField; got != want { - t.Errorf("got %q, want %q", got, want) - } -} - -func TestJSON(t *testing.T) { - m := &MyMessage{ - Count: Int32(4), - Pet: []string{"bunny", "kitty"}, - Inner: &InnerMessage{ - Host: String("cauchy"), - }, - Bikeshed: MyMessage_GREEN.Enum(), - } - const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` - - b, err := json.Marshal(m) - if err != nil { - t.Fatalf("json.Marshal failed: %v", err) - } - s := string(b) - if s != expected { - t.Errorf("got %s\nwant %s", s, expected) - } - - received := new(MyMessage) - if err := json.Unmarshal(b, received); err != nil { - t.Fatalf("json.Unmarshal failed: %v", err) - } - if !Equal(received, m) { - t.Fatalf("got %s, want %s", received, m) - } - - // Test unmarshalling of JSON with symbolic enum name. - const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` - received.Reset() - if err := json.Unmarshal([]byte(old), received); err != nil { - t.Fatalf("json.Unmarshal failed: %v", err) - } - if !Equal(received, m) { - t.Fatalf("got %s, want %s", received, m) - } -} - -func TestBadWireType(t *testing.T) { - b := []byte{7<<3 | 6} // field 7, wire type 6 - pb := new(OtherMessage) - if err := Unmarshal(b, pb); err == nil { - t.Errorf("Unmarshal did not fail") - } else if !strings.Contains(err.Error(), "unknown wire type") { - t.Errorf("wrong error: %v", err) - } -} - -func TestBytesWithInvalidLength(t *testing.T) { - // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. - b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} - Unmarshal(b, new(MyMessage)) -} - -func TestLengthOverflow(t *testing.T) { - // Overflowing a length should not panic. - b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} - Unmarshal(b, new(MyMessage)) -} - -func TestVarintOverflow(t *testing.T) { - // Overflowing a 64-bit length should not be allowed. - b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} - if err := Unmarshal(b, new(MyMessage)); err == nil { - t.Fatalf("Overflowed uint64 length without error") - } -} - -func TestUnmarshalFuzz(t *testing.T) { - const N = 1000 - seed := time.Now().UnixNano() - t.Logf("RNG seed is %d", seed) - rng := rand.New(rand.NewSource(seed)) - buf := make([]byte, 20) - for i := 0; i < N; i++ { - for j := range buf { - buf[j] = byte(rng.Intn(256)) - } - fuzzUnmarshal(t, buf) - } -} - -func TestMergeMessages(t *testing.T) { - pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} - data, err := Marshal(pb) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - pb1 := new(MessageList) - if err := Unmarshal(data, pb1); err != nil { - t.Fatalf("first Unmarshal: %v", err) - } - if err := Unmarshal(data, pb1); err != nil { - t.Fatalf("second Unmarshal: %v", err) - } - if len(pb1.Message) != 1 { - t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) - } - - pb2 := new(MessageList) - if err := UnmarshalMerge(data, pb2); err != nil { - t.Fatalf("first UnmarshalMerge: %v", err) - } - if err := UnmarshalMerge(data, pb2); err != nil { - t.Fatalf("second UnmarshalMerge: %v", err) - } - if len(pb2.Message) != 2 { - t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) - } -} - -func TestExtensionMarshalOrder(t *testing.T) { - m := &MyMessage{Count: Int(123)} - if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { - t.Fatalf("SetExtension: %v", err) - } - if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { - t.Fatalf("SetExtension: %v", err) - } - if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { - t.Fatalf("SetExtension: %v", err) - } - - // Serialize m several times, and check we get the same bytes each time. - var orig []byte - for i := 0; i < 100; i++ { - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if i == 0 { - orig = b - continue - } - if !bytes.Equal(b, orig) { - t.Errorf("Bytes differ on attempt #%d", i) - } - } -} - -// Many extensions, because small maps might not iterate differently on each iteration. -var exts = []*ExtensionDesc{ - E_X201, - E_X202, - E_X203, - E_X204, - E_X205, - E_X206, - E_X207, - E_X208, - E_X209, - E_X210, - E_X211, - E_X212, - E_X213, - E_X214, - E_X215, - E_X216, - E_X217, - E_X218, - E_X219, - E_X220, - E_X221, - E_X222, - E_X223, - E_X224, - E_X225, - E_X226, - E_X227, - E_X228, - E_X229, - E_X230, - E_X231, - E_X232, - E_X233, - E_X234, - E_X235, - E_X236, - E_X237, - E_X238, - E_X239, - E_X240, - E_X241, - E_X242, - E_X243, - E_X244, - E_X245, - E_X246, - E_X247, - E_X248, - E_X249, - E_X250, -} - -func TestMessageSetMarshalOrder(t *testing.T) { - m := &MyMessageSet{} - for _, x := range exts { - if err := SetExtension(m, x, &Empty{}); err != nil { - t.Fatalf("SetExtension: %v", err) - } - } - - buf, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - // Serialize m several times, and check we get the same bytes each time. - for i := 0; i < 10; i++ { - b1, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if !bytes.Equal(b1, buf) { - t.Errorf("Bytes differ on re-Marshal #%d", i) - } - - m2 := &MyMessageSet{} - if err := Unmarshal(buf, m2); err != nil { - t.Errorf("Unmarshal: %v", err) - } - b2, err := Marshal(m2) - if err != nil { - t.Errorf("re-Marshal: %v", err) - } - if !bytes.Equal(b2, buf) { - t.Errorf("Bytes differ on round-trip #%d", i) - } - } -} - -func TestUnmarshalMergesMessages(t *testing.T) { - // If a nested message occurs twice in the input, - // the fields should be merged when decoding. - a := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("polhode"), - Port: Int32(1234), - }, - } - aData, err := Marshal(a) - if err != nil { - t.Fatalf("Marshal(a): %v", err) - } - b := &OtherMessage{ - Weight: Float32(1.2), - Inner: &InnerMessage{ - Host: String("herpolhode"), - Connected: Bool(true), - }, - } - bData, err := Marshal(b) - if err != nil { - t.Fatalf("Marshal(b): %v", err) - } - want := &OtherMessage{ - Key: Int64(123), - Weight: Float32(1.2), - Inner: &InnerMessage{ - Host: String("herpolhode"), - Port: Int32(1234), - Connected: Bool(true), - }, - } - got := new(OtherMessage) - if err := Unmarshal(append(aData, bData...), got); err != nil { - t.Fatalf("Unmarshal: %v", err) - } - if !Equal(got, want) { - t.Errorf("\n got %v\nwant %v", got, want) - } -} - -func TestEncodingSizes(t *testing.T) { - tests := []struct { - m Message - n int - }{ - {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, - {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, - {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, - {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, - } - for _, test := range tests { - b, err := Marshal(test.m) - if err != nil { - t.Errorf("Marshal(%v): %v", test.m, err) - continue - } - if len(b) != test.n { - t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) - } - } -} - -func TestRequiredNotSetError(t *testing.T) { - pb := initGoTest(false) - pb.RequiredField.Label = nil - pb.F_Int32Required = nil - pb.F_Int64Required = nil - - expected := "0807" + // field 1, encoding 0, value 7 - "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) - "5001" + // field 10, encoding 0, value 1 - "6d20000000" + // field 13, encoding 5, value 0x20 - "714000000000000000" + // field 14, encoding 1, value 0x40 - "78a019" + // field 15, encoding 0, value 0xca0 = 3232 - "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 - "8d0100004a45" + // field 17, encoding 5, value 3232.0 - "9101000000000040b940" + // field 18, encoding 1, value 6464.0 - "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" - "b304" + // field 70, encoding 3, start group - "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" - "b404" + // field 70, encoding 4, end group - "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" - "b0063f" + // field 102, encoding 0, 0x3f zigzag32 - "b8067f" // field 103, encoding 0, 0x7f zigzag64 - - o := old() - bytes, err := Marshal(pb) - if _, ok := err.(*RequiredNotSetError); !ok { - fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("expected = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-1 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 1", bytes) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = Unmarshal(bytes, pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { - t.Errorf("unmarshal wrong err msg: %v", err) - } - bytes, err = Marshal(pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-2 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 2", bytes) - t.Fatalf("string = %s", expected) - } -} - -func fuzzUnmarshal(t *testing.T, data []byte) { - defer func() { - if e := recover(); e != nil { - t.Errorf("These bytes caused a panic: %+v", data) - t.Logf("Stack:\n%s", debug.Stack()) - t.FailNow() - } - }() - - pb := new(MyMessage) - Unmarshal(data, pb) -} - -func TestMapFieldMarshal(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - } - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - // b should be the concatenation of these three byte sequences in some order. - parts := []string{ - "\n\a\b\x01\x12\x03Rob", - "\n\a\b\x04\x12\x03Ian", - "\n\b\b\x08\x12\x04Dave", - } - ok := false - for i := range parts { - for j := range parts { - if j == i { - continue - } - for k := range parts { - if k == i || k == j { - continue - } - try := parts[i] + parts[j] + parts[k] - if bytes.Equal(b, []byte(try)) { - ok = true - break - } - } - } - } - if !ok { - t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) - } - t.Logf("FYI b: %q", b) - - (new(Buffer)).DebugPrint("Dump of b", b) -} - -func TestMapFieldRoundTrips(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - MsgMapping: map[int64]*FloatingPoint{ - 0x7001: {F: Float64(2.0)}, - }, - ByteMapping: map[bool][]byte{ - false: []byte("that's not right!"), - true: []byte("aye, 'tis true!"), - }, - } - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - t.Logf("FYI b: %q", b) - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v", err) - } - for _, pair := range [][2]interface{}{ - {m.NameMapping, m2.NameMapping}, - {m.MsgMapping, m2.MsgMapping}, - {m.ByteMapping, m2.ByteMapping}, - } { - if !reflect.DeepEqual(pair[0], pair[1]) { - t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) - } - } -} - -func TestMapFieldWithNil(t *testing.T) { - m := &MessageWithMap{ - MsgMapping: map[int64]*FloatingPoint{ - 1: nil, - }, - } - b, err := Marshal(m) - if err == nil { - t.Fatalf("Marshal of bad map should have failed, got these bytes: %v", b) - } -} - -func TestOneof(t *testing.T) { - m := &Communique{} - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal of empty message with oneof: %v", err) - } - if len(b) != 0 { - t.Errorf("Marshal of empty message yielded too many bytes: %v", b) - } - - m = &Communique{ - Union: &Communique_Name{"Barry"}, - } - - // Round-trip. - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof: %v", err) - } - if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) - t.Errorf("Incorrect marshal of message with oneof: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof: %v", err) - } - if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { - t.Errorf("After round trip, Union = %+v", m.Union) - } - if name := m.GetName(); name != "Barry" { - t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") - } - - // Let's try with a message in the oneof. - m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof set to message: %v", err) - } - if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) - t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof set to message: %v", err) - } - ss, ok := m.Union.(*Communique_Msg) - if !ok || ss.Msg.GetStringField() != "deep deep string" { - t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) - } -} - -func TestInefficientPackedBool(t *testing.T) { - // https://github.com/golang/protobuf/issues/76 - inp := []byte{ - 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes - // Usually a bool should take a single byte, - // but it is permitted to be any varint. - 0xb9, 0x30, - } - if err := Unmarshal(inp, new(MoreRepeated)); err != nil { - t.Error(err) - } -} - -// Benchmarks - -func testMsg() *GoTest { - pb := initGoTest(true) - const N = 1000 // Internally the library starts much smaller. - pb.F_Int32Repeated = make([]int32, N) - pb.F_DoubleRepeated = make([]float64, N) - for i := 0; i < N; i++ { - pb.F_Int32Repeated[i] = int32(i) - pb.F_DoubleRepeated[i] = float64(i) - } - return pb -} - -func bytesMsg() *GoTest { - pb := initGoTest(true) - buf := make([]byte, 4000) - for i := range buf { - buf[i] = byte(i) - } - pb.F_BytesDefaulted = buf - return pb -} - -func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { - d, _ := marshal(pb) - b.SetBytes(int64(len(d))) - b.ResetTimer() - for i := 0; i < b.N; i++ { - marshal(pb) - } -} - -func benchmarkBufferMarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - p.Reset() - err := p.Marshal(pb0) - return p.Bytes(), err - }) -} - -func benchmarkSize(b *testing.B, pb Message) { - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - Size(pb) - return nil, nil - }) -} - -func newOf(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - return reflect.New(in.Type().Elem()).Interface().(Message) -} - -func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { - d, _ := Marshal(pb) - b.SetBytes(int64(len(d))) - pbd := newOf(pb) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - unmarshal(d, pbd) - } -} - -func benchmarkBufferUnmarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { - p.SetBuf(d) - return p.Unmarshal(pb0) - }) -} - -// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} - -func BenchmarkMarshal(b *testing.B) { - benchmarkMarshal(b, testMsg(), Marshal) -} - -func BenchmarkBufferMarshal(b *testing.B) { - benchmarkBufferMarshal(b, testMsg()) -} - -func BenchmarkSize(b *testing.B) { - benchmarkSize(b, testMsg()) -} - -func BenchmarkUnmarshal(b *testing.B) { - benchmarkUnmarshal(b, testMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshal(b *testing.B) { - benchmarkBufferUnmarshal(b, testMsg()) -} - -func BenchmarkMarshalBytes(b *testing.B) { - benchmarkMarshal(b, bytesMsg(), Marshal) -} - -func BenchmarkBufferMarshalBytes(b *testing.B) { - benchmarkBufferMarshal(b, bytesMsg()) -} - -func BenchmarkSizeBytes(b *testing.B) { - benchmarkSize(b, bytesMsg()) -} - -func BenchmarkUnmarshalBytes(b *testing.B) { - benchmarkUnmarshal(b, bytesMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshalBytes(b *testing.B) { - benchmarkBufferUnmarshal(b, bytesMsg()) -} - -func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { - b.StopTimer() - pb := initGoTestField() - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - pbd := new(GoTestField) - p := NewBuffer(nil) - p.Marshal(pb) - p.Marshal(skip) - p2 := NewBuffer(nil) - - b.StartTimer() - for i := 0; i < b.N; i++ { - p2.SetBuf(p.Bytes()) - p2.Unmarshal(pbd) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone.go deleted file mode 100644 index 79edb86119..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone.go +++ /dev/null @@ -1,228 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol buffer deep copy and merge. -// TODO: RawMessage. - -package proto - -import ( - "log" - "reflect" - "strings" -) - -// Clone returns a deep copy of a protocol buffer. -func Clone(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - - out := reflect.New(in.Type().Elem()) - // out is empty so a merge is a deep copy. - mergeStruct(out.Elem(), in.Elem()) - return out.Interface().(Message) -} - -// Merge merges src into dst. -// Required and optional fields that are set in src will be set to that value in dst. -// Elements of repeated fields will be appended. -// Merge panics if src and dst are not the same type, or if dst is nil. -func Merge(dst, src Message) { - in := reflect.ValueOf(src) - out := reflect.ValueOf(dst) - if out.IsNil() { - panic("proto: nil destination") - } - if in.Type() != out.Type() { - // Explicit test prior to mergeStruct so that mistyped nils will fail - panic("proto: type mismatch") - } - if in.IsNil() { - // Merging nil into non-nil is a quiet no-op - return - } - mergeStruct(out.Elem(), in.Elem()) -} - -func mergeStruct(out, in reflect.Value) { - sprop := GetProperties(in.Type()) - for i := 0; i < in.NumField(); i++ { - f := in.Type().Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) - } - - if emIn, ok := in.Addr().Interface().(extensionsMap); ok { - emOut := out.Addr().Interface().(extensionsMap) - mergeExtension(emOut.ExtensionMap(), emIn.ExtensionMap()) - } else if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { - emOut := out.Addr().Interface().(extensionsBytes) - bIn := emIn.GetExtensions() - bOut := emOut.GetExtensions() - *bOut = append(*bOut, *bIn...) - } - - uf := in.FieldByName("XXX_unrecognized") - if !uf.IsValid() { - return - } - uin := uf.Bytes() - if len(uin) > 0 { - out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) - } -} - -// mergeAny performs a merge between two values of the same type. -// viaPtr indicates whether the values were indirected through a pointer (implying proto2). -// prop is set if this is a struct field (it may be nil). -func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { - if in.Type() == protoMessageType { - if !in.IsNil() { - if out.IsNil() { - out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) - } else { - Merge(out.Interface().(Message), in.Interface().(Message)) - } - } - return - } - switch in.Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - if !viaPtr && isProto3Zero(in) { - return - } - out.Set(in) - case reflect.Interface: - // Probably a oneof field; copy non-nil values. - if in.IsNil() { - return - } - // Allocate destination if it is not set, or set to a different type. - // Otherwise we will merge as normal. - if out.IsNil() || out.Elem().Type() != in.Elem().Type() { - out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) - } - mergeAny(out.Elem(), in.Elem(), false, nil) - case reflect.Map: - if in.Len() == 0 { - return - } - if out.IsNil() { - out.Set(reflect.MakeMap(in.Type())) - } - // For maps with value types of *T or []byte we need to deep copy each value. - elemKind := in.Type().Elem().Kind() - for _, key := range in.MapKeys() { - var val reflect.Value - switch elemKind { - case reflect.Ptr: - val = reflect.New(in.Type().Elem().Elem()) - mergeAny(val, in.MapIndex(key), false, nil) - case reflect.Slice: - val = in.MapIndex(key) - val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) - default: - val = in.MapIndex(key) - } - out.SetMapIndex(key, val) - } - case reflect.Ptr: - if in.IsNil() { - return - } - if out.IsNil() { - out.Set(reflect.New(in.Elem().Type())) - } - mergeAny(out.Elem(), in.Elem(), true, nil) - case reflect.Slice: - if in.IsNil() { - return - } - if in.Type().Elem().Kind() == reflect.Uint8 { - // []byte is a scalar bytes field, not a repeated field. - - // Edge case: if this is in a proto3 message, a zero length - // bytes field is considered the zero value, and should not - // be merged. - if prop != nil && prop.proto3 && in.Len() == 0 { - return - } - - // Make a deep copy. - // Append to []byte{} instead of []byte(nil) so that we never end up - // with a nil result. - out.SetBytes(append([]byte{}, in.Bytes()...)) - return - } - n := in.Len() - if out.IsNil() { - out.Set(reflect.MakeSlice(in.Type(), 0, n)) - } - switch in.Type().Elem().Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - out.Set(reflect.AppendSlice(out, in)) - default: - for i := 0; i < n; i++ { - x := reflect.Indirect(reflect.New(in.Type().Elem())) - mergeAny(x, in.Index(i), false, nil) - out.Set(reflect.Append(out, x)) - } - } - case reflect.Struct: - mergeStruct(out, in) - default: - // unknown type, so not a protocol buffer - log.Printf("proto: don't know how to copy %v", in) - } -} - -func mergeExtension(out, in map[int32]Extension) { - for extNum, eIn := range in { - eOut := Extension{desc: eIn.desc} - if eIn.value != nil { - v := reflect.New(reflect.TypeOf(eIn.value)).Elem() - mergeAny(v, reflect.ValueOf(eIn.value), false, nil) - eOut.value = v.Interface() - } - if eIn.enc != nil { - eOut.enc = make([]byte, len(eIn.enc)) - copy(eOut.enc, eIn.enc) - } - - out[extNum] = eOut - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone_test.go deleted file mode 100644 index f065210b89..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/clone_test.go +++ /dev/null @@ -1,267 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/gogo/protobuf/proto" - - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -var cloneTestMessage = &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &pb.InnerMessage{ - Host: proto.String("niles"), - Port: proto.Int32(9099), - Connected: proto.Bool(true), - }, - Others: []*pb.OtherMessage{ - { - Value: []byte("some bytes"), - }, - }, - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, -} - -func init() { - ext := &pb.Ext{ - Data: proto.String("extension"), - } - if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { - panic("SetExtension: " + err.Error()) - } -} - -func TestClone(t *testing.T) { - m := proto.Clone(cloneTestMessage).(*pb.MyMessage) - if !proto.Equal(m, cloneTestMessage) { - t.Errorf("Clone(%v) = %v", cloneTestMessage, m) - } - - // Verify it was a deep copy. - *m.Inner.Port++ - if proto.Equal(m, cloneTestMessage) { - t.Error("Mutating clone changed the original") - } - // Byte fields and repeated fields should be copied. - if &m.Pet[0] == &cloneTestMessage.Pet[0] { - t.Error("Pet: repeated field not copied") - } - if &m.Others[0] == &cloneTestMessage.Others[0] { - t.Error("Others: repeated field not copied") - } - if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { - t.Error("Others[0].Value: bytes field not copied") - } - if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { - t.Error("RepBytes: repeated field not copied") - } - if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { - t.Error("RepBytes[0]: bytes field not copied") - } -} - -func TestCloneNil(t *testing.T) { - var m *pb.MyMessage - if c := proto.Clone(m); !proto.Equal(m, c) { - t.Errorf("Clone(%v) = %v", m, c) - } -} - -var mergeTests = []struct { - src, dst, want proto.Message -}{ - { - src: &pb.MyMessage{ - Count: proto.Int32(42), - }, - dst: &pb.MyMessage{ - Name: proto.String("Dave"), - }, - want: &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - }, - }, - { - src: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("hey"), - Connected: proto.Bool(true), - }, - Pet: []string{"horsey"}, - Others: []*pb.OtherMessage{ - { - Value: []byte("some bytes"), - }, - }, - }, - dst: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("niles"), - Port: proto.Int32(9099), - }, - Pet: []string{"bunny", "kitty"}, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(31415926535), - }, - { - // Explicitly test a src=nil field - Inner: nil, - }, - }, - }, - want: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("hey"), - Connected: proto.Bool(true), - Port: proto.Int32(9099), - }, - Pet: []string{"bunny", "kitty", "horsey"}, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(31415926535), - }, - {}, - { - Value: []byte("some bytes"), - }, - }, - }, - }, - { - src: &pb.MyMessage{ - RepBytes: [][]byte{[]byte("wow")}, - }, - dst: &pb.MyMessage{ - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham")}, - }, - want: &pb.MyMessage{ - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, - }, - }, - // Check that a scalar bytes field replaces rather than appends. - { - src: &pb.OtherMessage{Value: []byte("foo")}, - dst: &pb.OtherMessage{Value: []byte("bar")}, - want: &pb.OtherMessage{Value: []byte("foo")}, - }, - { - src: &pb.MessageWithMap{ - NameMapping: map[int32]string{6: "Nigel"}, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4001: {F: proto.Float64(2.0)}, - }, - ByteMapping: map[bool][]byte{true: []byte("wowsa")}, - }, - dst: &pb.MessageWithMap{ - NameMapping: map[int32]string{ - 6: "Bruce", // should be overwritten - 7: "Andrew", - }, - }, - want: &pb.MessageWithMap{ - NameMapping: map[int32]string{ - 6: "Nigel", - 7: "Andrew", - }, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4001: {F: proto.Float64(2.0)}, - }, - ByteMapping: map[bool][]byte{true: []byte("wowsa")}, - }, - }, - // proto3 shouldn't merge zero values, - // in the same way that proto2 shouldn't merge nils. - { - src: &proto3pb.Message{ - Name: "Aaron", - Data: []byte(""), // zero value, but not nil - }, - dst: &proto3pb.Message{ - HeightInCm: 176, - Data: []byte("texas!"), - }, - want: &proto3pb.Message{ - Name: "Aaron", - HeightInCm: 176, - Data: []byte("texas!"), - }, - }, - // Oneof fields should merge by assignment. - { - src: &pb.Communique{ - Union: &pb.Communique_Number{Number: 41}, - }, - dst: &pb.Communique{ - Union: &pb.Communique_Name{Name: "Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Number{Number: 41}, - }, - }, - // Oneof nil is the same as not set. - { - src: &pb.Communique{}, - dst: &pb.Communique{ - Union: &pb.Communique_Name{Name: "Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Name{Name: "Bobby Tables"}, - }, - }, -} - -func TestMerge(t *testing.T) { - for _, m := range mergeTests { - got := proto.Clone(m.dst) - proto.Merge(got, m.src) - if !proto.Equal(got, m.want) { - t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode.go deleted file mode 100644 index cb5b213f9b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode.go +++ /dev/null @@ -1,872 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for decoding protocol buffer data to construct in-memory representations. - */ - -import ( - "errors" - "fmt" - "io" - "os" - "reflect" -) - -// errOverflow is returned when an integer is too large to be represented. -var errOverflow = errors.New("proto: integer overflow") - -// ErrInternalBadWireType is returned by generated code when an incorrect -// wire type is encountered. It does not get returned to user code. -var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") - -// The fundamental decoders that interpret bytes on the wire. -// Those that take integer types all return uint64 and are -// therefore of type valueDecoder. - -// DecodeVarint reads a varint-encoded integer from the slice. -// It returns the integer and the number of bytes consumed, or -// zero if there is not enough. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func DecodeVarint(buf []byte) (x uint64, n int) { - // x, n already 0 - for shift := uint(0); shift < 64; shift += 7 { - if n >= len(buf) { - return 0, 0 - } - b := uint64(buf[n]) - n++ - x |= (b & 0x7F) << shift - if (b & 0x80) == 0 { - return x, n - } - } - - // The number is too large to represent in a 64-bit value. - return 0, 0 -} - -// DecodeVarint reads a varint-encoded integer from the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) DecodeVarint() (x uint64, err error) { - // x, err already 0 - - i := p.index - l := len(p.buf) - - for shift := uint(0); shift < 64; shift += 7 { - if i >= l { - err = io.ErrUnexpectedEOF - return - } - b := p.buf[i] - i++ - x |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - p.index = i - return - } - } - - // The number is too large to represent in a 64-bit value. - err = errOverflow - return -} - -// DecodeFixed64 reads a 64-bit integer from the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) DecodeFixed64() (x uint64, err error) { - // x, err already 0 - i := p.index + 8 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-8]) - x |= uint64(p.buf[i-7]) << 8 - x |= uint64(p.buf[i-6]) << 16 - x |= uint64(p.buf[i-5]) << 24 - x |= uint64(p.buf[i-4]) << 32 - x |= uint64(p.buf[i-3]) << 40 - x |= uint64(p.buf[i-2]) << 48 - x |= uint64(p.buf[i-1]) << 56 - return -} - -// DecodeFixed32 reads a 32-bit integer from the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) DecodeFixed32() (x uint64, err error) { - // x, err already 0 - i := p.index + 4 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-4]) - x |= uint64(p.buf[i-3]) << 8 - x |= uint64(p.buf[i-2]) << 16 - x |= uint64(p.buf[i-1]) << 24 - return -} - -// DecodeZigzag64 reads a zigzag-encoded 64-bit integer -// from the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) DecodeZigzag64() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) - return -} - -// DecodeZigzag32 reads a zigzag-encoded 32-bit integer -// from the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) DecodeZigzag32() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) - return -} - -// These are not ValueDecoders: they produce an array of bytes or a string. -// bytes, embedded messages - -// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { - n, err := p.DecodeVarint() - if err != nil { - return nil, err - } - - nb := int(n) - if nb < 0 { - return nil, fmt.Errorf("proto: bad byte length %d", nb) - } - end := p.index + nb - if end < p.index || end > len(p.buf) { - return nil, io.ErrUnexpectedEOF - } - - if !alloc { - // todo: check if can get more uses of alloc=false - buf = p.buf[p.index:end] - p.index += nb - return - } - - buf = make([]byte, nb) - copy(buf, p.buf[p.index:]) - p.index += nb - return -} - -// DecodeStringBytes reads an encoded string from the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) DecodeStringBytes() (s string, err error) { - buf, err := p.DecodeRawBytes(false) - if err != nil { - return - } - return string(buf), nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -// If the protocol buffer has extensions, and the field matches, add it as an extension. -// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. -func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { - oi := o.index - - err := o.skip(t, tag, wire) - if err != nil { - return err - } - - if !unrecField.IsValid() { - return nil - } - - ptr := structPointer_Bytes(base, unrecField) - - // Add the skipped field to struct field - obuf := o.buf - - o.buf = *ptr - o.EncodeVarint(uint64(tag<<3 | wire)) - *ptr = append(o.buf, obuf[oi:o.index]...) - - o.buf = obuf - - return nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -func (o *Buffer) skip(t reflect.Type, tag, wire int) error { - - var u uint64 - var err error - - switch wire { - case WireVarint: - _, err = o.DecodeVarint() - case WireFixed64: - _, err = o.DecodeFixed64() - case WireBytes: - _, err = o.DecodeRawBytes(false) - case WireFixed32: - _, err = o.DecodeFixed32() - case WireStartGroup: - for { - u, err = o.DecodeVarint() - if err != nil { - break - } - fwire := int(u & 0x7) - if fwire == WireEndGroup { - break - } - ftag := int(u >> 3) - err = o.skip(t, ftag, fwire) - if err != nil { - break - } - } - default: - err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) - } - return err -} - -// Unmarshaler is the interface representing objects that can -// unmarshal themselves. The method should reset the receiver before -// decoding starts. The argument points to data that may be -// overwritten, so implementations should not keep references to the -// buffer. -type Unmarshaler interface { - Unmarshal([]byte) error -} - -// Unmarshal parses the protocol buffer representation in buf and places the -// decoded result in pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// Unmarshal resets pb before starting to unmarshal, so any -// existing data in pb is always removed. Use UnmarshalMerge -// to preserve and append to existing data. -func Unmarshal(buf []byte, pb Message) error { - pb.Reset() - return UnmarshalMerge(buf, pb) -} - -// UnmarshalMerge parses the protocol buffer representation in buf and -// writes the decoded result to pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// UnmarshalMerge merges into existing data in pb. -// Most code should use Unmarshal instead. -func UnmarshalMerge(buf []byte, pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - return u.Unmarshal(buf) - } - return NewBuffer(buf).Unmarshal(pb) -} - -// DecodeMessage reads a count-delimited message from the Buffer. -func (p *Buffer) DecodeMessage(pb Message) error { - enc, err := p.DecodeRawBytes(false) - if err != nil { - return err - } - return NewBuffer(enc).Unmarshal(pb) -} - -// DecodeGroup reads a tag-delimited group from the Buffer. -func (p *Buffer) DecodeGroup(pb Message) error { - typ, base, err := getbase(pb) - if err != nil { - return err - } - return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) -} - -// Unmarshal parses the protocol buffer representation in the -// Buffer and places the decoded result in pb. If the struct -// underlying pb does not match the data in the buffer, the results can be -// unpredictable. -func (p *Buffer) Unmarshal(pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - err := u.Unmarshal(p.buf[p.index:]) - p.index = len(p.buf) - return err - } - - typ, base, err := getbase(pb) - if err != nil { - return err - } - - err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) - - if collectStats { - stats.Decode++ - } - - return err -} - -// unmarshalType does the work of unmarshaling a structure. -func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { - var state errorState - required, reqFields := prop.reqCount, uint64(0) - - var err error - for err == nil && o.index < len(o.buf) { - oi := o.index - var u uint64 - u, err = o.DecodeVarint() - if err != nil { - break - } - wire := int(u & 0x7) - if wire == WireEndGroup { - if is_group { - return nil // input is satisfied - } - return fmt.Errorf("proto: %s: wiretype end group for non-group", st) - } - tag := int(u >> 3) - if tag <= 0 { - return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) - } - fieldnum, ok := prop.decoderTags.get(tag) - if !ok { - // Maybe it's an extension? - if prop.extendable { - if e := structPointer_Interface(base, st).(extendableProto); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - if ee, eok := e.(extensionsMap); eok { - ext := ee.ExtensionMap()[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - ee.ExtensionMap()[int32(tag)] = ext - } else if ee, eok := e.(extensionsBytes); eok { - ext := ee.GetExtensions() - *ext = append(*ext, o.buf[oi:o.index]...) - } - } - continue - } - } - // Maybe it's a oneof? - if prop.oneofUnmarshaler != nil { - m := structPointer_Interface(base, st).(Message) - // First return value indicates whether tag is a oneof field. - ok, err = prop.oneofUnmarshaler(m, tag, wire, o) - if err == ErrInternalBadWireType { - // Map the error to something more descriptive. - // Do the formatting here to save generated code space. - err = fmt.Errorf("bad wiretype for oneof field in %T", m) - } - if ok { - continue - } - } - err = o.skipAndSave(st, tag, wire, base, prop.unrecField) - continue - } - p := prop.Prop[fieldnum] - - if p.dec == nil { - fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) - continue - } - dec := p.dec - if wire != WireStartGroup && wire != p.WireType { - if wire == WireBytes && p.packedDec != nil { - // a packable field - dec = p.packedDec - } else { - err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) - continue - } - } - decErr := dec(o, p, base) - if decErr != nil && !state.shouldContinue(decErr, p) { - err = decErr - } - if err == nil && p.Required { - // Successfully decoded a required field. - if tag <= 64 { - // use bitmap for fields 1-64 to catch field reuse. - var mask uint64 = 1 << uint64(tag-1) - if reqFields&mask == 0 { - // new required field - reqFields |= mask - required-- - } - } else { - // This is imprecise. It can be fooled by a required field - // with a tag > 64 that is encoded twice; that's very rare. - // A fully correct implementation would require allocating - // a data structure, which we would like to avoid. - required-- - } - } - } - if err == nil { - if is_group { - return io.ErrUnexpectedEOF - } - if state.err != nil { - return state.err - } - if required > 0 { - // Not enough information to determine the exact field. If we use extra - // CPU, we could determine the field only if the missing required field - // has a tag <= 64 and we check reqFields. - return &RequiredNotSetError{"{Unknown}"} - } - } - return err -} - -// Individual type decoders -// For each, -// u is the decoded value, -// v is a pointer to the field (pointer) in the struct - -// Sizes of the pools to allocate inside the Buffer. -// The goal is modest amortization and allocation -// on at least 16-byte boundaries. -const ( - boolPoolSize = 16 - uint32PoolSize = 8 - uint64PoolSize = 4 -) - -// Decode a bool. -func (o *Buffer) dec_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - if len(o.bools) == 0 { - o.bools = make([]bool, boolPoolSize) - } - o.bools[0] = u != 0 - *structPointer_Bool(base, p.field) = &o.bools[0] - o.bools = o.bools[1:] - return nil -} - -func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - *structPointer_BoolVal(base, p.field) = u != 0 - return nil -} - -// Decode an int32. -func (o *Buffer) dec_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) - return nil -} - -func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) - return nil -} - -// Decode an int64. -func (o *Buffer) dec_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, u) - return nil -} - -func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, u) - return nil -} - -// Decode a string. -func (o *Buffer) dec_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_String(base, p.field) = &s - return nil -} - -func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_StringVal(base, p.field) = s - return nil -} - -// Decode a slice of bytes ([]byte). -func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - *structPointer_Bytes(base, p.field) = b - return nil -} - -// Decode a slice of bools ([]bool). -func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - v := structPointer_BoolSlice(base, p.field) - *v = append(*v, u != 0) - return nil -} - -// Decode a slice of bools ([]bool) in packed format. -func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { - v := structPointer_BoolSlice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded bools - fin := o.index + nb - if fin < o.index { - return errOverflow - } - - y := *v - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - y = append(y, u != 0) - } - - *v = y - return nil -} - -// Decode a slice of int32s ([]int32). -func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - structPointer_Word32Slice(base, p.field).Append(uint32(u)) - return nil -} - -// Decode a slice of int32s ([]int32) in packed format. -func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int32s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(uint32(u)) - } - return nil -} - -// Decode a slice of int64s ([]int64). -func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - - structPointer_Word64Slice(base, p.field).Append(u) - return nil -} - -// Decode a slice of int64s ([]int64) in packed format. -func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int64s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(u) - } - return nil -} - -// Decode a slice of strings ([]string). -func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - v := structPointer_StringSlice(base, p.field) - *v = append(*v, s) - return nil -} - -// Decode a slice of slice of bytes ([][]byte). -func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - v := structPointer_BytesSlice(base, p.field) - *v = append(*v, b) - return nil -} - -// Decode a map field. -func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - oi := o.index // index at the end of this map entry - o.index -= len(raw) // move buffer back to start of map entry - - mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V - if mptr.Elem().IsNil() { - mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) - } - v := mptr.Elem() // map[K]V - - // Prepare addressable doubly-indirect placeholders for the key and value types. - // See enc_new_map for why. - keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K - keybase := toStructPointer(keyptr.Addr()) // **K - - var valbase structPointer - var valptr reflect.Value - switch p.mtype.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valptr = reflect.ValueOf(&dummy) // *[]byte - valbase = toStructPointer(valptr) // *[]byte - case reflect.Ptr: - // message; valptr is **Msg; need to allocate the intermediate pointer - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valptr.Set(reflect.New(valptr.Type().Elem())) - valbase = toStructPointer(valptr) - default: - // everything else - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valbase = toStructPointer(valptr.Addr()) // **V - } - - // Decode. - // This parses a restricted wire format, namely the encoding of a message - // with two fields. See enc_new_map for the format. - for o.index < oi { - // tagcode for key and value properties are always a single byte - // because they have tags 1 and 2. - tagcode := o.buf[o.index] - o.index++ - switch tagcode { - case p.mkeyprop.tagcode[0]: - if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { - return err - } - case p.mvalprop.tagcode[0]: - if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { - return err - } - default: - // TODO: Should we silently skip this instead? - return fmt.Errorf("proto: bad map data tag %d", raw[0]) - } - } - keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() || !valelem.IsValid() { - // We did not decode the key or the value in the map entry. - // Either way, it's an invalid map entry. - return fmt.Errorf("proto: bad map data: missing key/val") - } - - v.SetMapIndex(keyelem, valelem) - return nil -} - -// Decode a group. -func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - return o.unmarshalType(p.stype, p.sprop, true, bas) -} - -// Decode an embedded message. -func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := structPointer_Interface(bas, p.stype) - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of embedded messages. -func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, false, base) -} - -// Decode a slice of embedded groups. -func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, true, base) -} - -// Decode a slice of structs ([]*struct). -func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { - v := reflect.New(p.stype) - bas := toStructPointer(v) - structPointer_StructPointerSlice(base, p.field).Append(bas) - - if is_group { - err := o.unmarshalType(p.stype, p.sprop, is_group, bas) - return err - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := v.Interface() - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, bas) - - o.buf = obuf - o.index = oi - - return err -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode_gogo.go deleted file mode 100644 index 6a77aad766..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/decode_gogo.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "reflect" -) - -// Decode a reference to a struct pointer. -func (o *Buffer) dec_ref_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - panic("not supported, since this is a pointer receiver") - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - bas := structPointer_FieldPointer(base, p.field) - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of references to struct pointers ([]struct). -func (o *Buffer) dec_slice_ref_struct(p *Properties, is_group bool, base structPointer) error { - newBas := appendStructPointer(base, p.field, p.sstype) - - if is_group { - panic("not supported, maybe in future, if requested.") - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - panic("not supported, since this is not a pointer receiver.") - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, newBas) - - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of references to struct pointers. -func (o *Buffer) dec_slice_ref_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_ref_struct(p, false, base) -} - -func setPtrCustomType(base structPointer, f field, v interface{}) { - if v == nil { - return - } - structPointer_SetStructPointer(base, f, structPointer(reflect.ValueOf(v).Pointer())) -} - -func setCustomType(base structPointer, f field, value interface{}) { - if value == nil { - return - } - v := reflect.ValueOf(value).Elem() - t := reflect.TypeOf(value).Elem() - kind := t.Kind() - switch kind { - case reflect.Slice: - slice := reflect.MakeSlice(t, v.Len(), v.Cap()) - reflect.Copy(slice, v) - oldHeader := structPointer_GetSliceHeader(base, f) - oldHeader.Data = slice.Pointer() - oldHeader.Len = v.Len() - oldHeader.Cap = v.Cap() - default: - l := 1 - size := reflect.TypeOf(value).Elem().Size() - if kind == reflect.Array { - l = reflect.TypeOf(value).Elem().Len() - size = reflect.TypeOf(value).Size() - } - total := int(size) * l - structPointer_Copy(toStructPointer(reflect.ValueOf(value)), structPointer_Add(base, f), total) - } -} - -func (o *Buffer) dec_custom_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype.Elem()).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - setPtrCustomType(base, p.field, custom) - return nil -} - -func (o *Buffer) dec_custom_ref_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - if custom != nil { - setCustomType(base, p.field, custom) - } - return nil -} - -// Decode a slice of bytes ([]byte) into a slice of custom types. -func (o *Buffer) dec_custom_slice_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype.Elem()).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - newBas := appendStructPointer(base, p.field, p.ctype) - - setCustomType(newBas, 0, custom) - - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode.go deleted file mode 100644 index 7321e1aae1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode.go +++ /dev/null @@ -1,1335 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "errors" - "fmt" - "reflect" - "sort" -) - -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - return fmt.Sprintf("proto: required field %q not set", e.field) -} - -var ( - // errRepeatedHasNil is the error returned if Marshal is called with - // a struct with a repeated field containing a nil element. - errRepeatedHasNil = errors.New("proto: repeated field has nil element") - - // ErrNil is the error returned if Marshal is called with nil. - ErrNil = errors.New("proto: Marshal called with nil") -) - -// The fundamental encoders that put bytes on the wire. -// Those that take integer types all accept uint64 and are -// therefore of type valueEncoder. - -const maxVarintBytes = 10 // maximum length of a varint - -// EncodeVarint returns the varint encoding of x. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -// Not used by the package itself, but helpful to clients -// wishing to use the same encoding. -func EncodeVarint(x uint64) []byte { - var buf [maxVarintBytes]byte - var n int - for n = 0; x > 127; n++ { - buf[n] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - buf[n] = uint8(x) - n++ - return buf[0:n] -} - -// EncodeVarint writes a varint-encoded integer to the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) EncodeVarint(x uint64) error { - for x >= 1<<7 { - p.buf = append(p.buf, uint8(x&0x7f|0x80)) - x >>= 7 - } - p.buf = append(p.buf, uint8(x)) - return nil -} - -func sizeVarint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} - -// EncodeFixed64 writes a 64-bit integer to the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) EncodeFixed64(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24), - uint8(x>>32), - uint8(x>>40), - uint8(x>>48), - uint8(x>>56)) - return nil -} - -func sizeFixed64(x uint64) int { - return 8 -} - -// EncodeFixed32 writes a 32-bit integer to the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) EncodeFixed32(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24)) - return nil -} - -func sizeFixed32(x uint64) int { - return 4 -} - -// EncodeZigzag64 writes a zigzag-encoded 64-bit integer -// to the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) EncodeZigzag64(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -// EncodeZigzag32 writes a zigzag-encoded 32-bit integer -// to the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) EncodeZigzag32(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -func sizeZigzag32(x uint64) int { - return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) EncodeRawBytes(b []byte) error { - p.EncodeVarint(uint64(len(b))) - p.buf = append(p.buf, b...) - return nil -} - -func sizeRawBytes(b []byte) int { - return sizeVarint(uint64(len(b))) + - len(b) -} - -// EncodeStringBytes writes an encoded string to the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) EncodeStringBytes(s string) error { - p.EncodeVarint(uint64(len(s))) - p.buf = append(p.buf, s...) - return nil -} - -func sizeStringBytes(s string) int { - return sizeVarint(uint64(len(s))) + - len(s) -} - -// Marshaler is the interface representing objects that can marshal themselves. -type Marshaler interface { - Marshal() ([]byte, error) -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, returning the data. -func Marshal(pb Message) ([]byte, error) { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - return m.Marshal() - } - p := NewBuffer(nil) - err := p.Marshal(pb) - var state errorState - if err != nil && !state.shouldContinue(err, nil) { - return nil, err - } - if p.buf == nil && err == nil { - // Return a non-nil slice on success. - return []byte{}, nil - } - return p.buf, err -} - -// EncodeMessage writes the protocol buffer to the Buffer, -// prefixed by a varint-encoded length. -func (p *Buffer) EncodeMessage(pb Message) error { - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - var state errorState - err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) - } - return err -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, writing the result to the -// Buffer. -func (p *Buffer) Marshal(pb Message) error { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - data, err := m.Marshal() - if err != nil { - return err - } - p.buf = append(p.buf, data...) - return nil - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - err = p.enc_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - stats.Encode++ - } - - return err -} - -// Size returns the encoded size of a protocol buffer. -func Size(pb Message) (n int) { - // Can the object marshal itself? If so, Size is slow. - // TODO: add Size to Marshaler, or add a Sizer interface. - if m, ok := pb.(Marshaler); ok { - b, _ := m.Marshal() - return len(b) - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return 0 - } - if err == nil { - n = size_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - stats.Size++ - } - - return -} - -// Individual type encoders. - -// Encode a bool. -func (o *Buffer) enc_bool(p *Properties, base structPointer) error { - v := *structPointer_Bool(base, p.field) - if v == nil { - return ErrNil - } - x := 0 - if *v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - if !v { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, 1) - return nil -} - -func size_bool(p *Properties, base structPointer) int { - v := *structPointer_Bool(base, p.field) - if v == nil { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -func size_proto3_bool(p *Properties, base structPointer) int { - v := *structPointer_BoolVal(base, p.field) - if !v && !p.oneof { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode an int32. -func (o *Buffer) enc_int32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a uint32. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := word32_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := word32_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode an int64. -func (o *Buffer) enc_int64(p *Properties, base structPointer) error { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return ErrNil - } - x := word64_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return 0 - } - x := word64_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -func size_proto3_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a string. -func (o *Buffer) enc_string(p *Properties, base structPointer) error { - v := *structPointer_String(base, p.field) - if v == nil { - return ErrNil - } - x := *v - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(x) - return nil -} - -func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - if v == "" { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_string(p *Properties, base structPointer) (n int) { - v := *structPointer_String(base, p.field) - if v == nil { - return 0 - } - x := *v - n += len(p.tagcode) - n += sizeStringBytes(x) - return -} - -func size_proto3_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - if v == "" && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeStringBytes(v) - return -} - -// All protocol buffer fields are nillable, but be careful. -func isNil(v reflect.Value) bool { - switch v.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() - } - return false -} - -// Encode a message struct. -func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return state.err - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -func size_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a group struct. -func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { - var state errorState - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return ErrNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - err := o.enc_struct(p.sprop, b) - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return state.err -} - -func size_struct_group(p *Properties, base structPointer) (n int) { - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return 0 - } - - n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) - n += size_struct(p.sprop, b) - n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return -} - -// Encode a slice of bools ([]bool). -func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - for _, x := range s { - o.buf = append(o.buf, p.tagcode...) - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_bool(p *Properties, base structPointer) int { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - return l * (len(p.tagcode) + 1) // each bool takes exactly one byte -} - -// Encode a slice of bools ([]bool) in packed format. -func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(l)) // each bool takes exactly one byte - for _, x := range s { - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_packed_bool(p *Properties, base structPointer) (n int) { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - n += len(p.tagcode) - n += sizeVarint(uint64(l)) - n += l // each bool takes exactly one byte - return -} - -// Encode a slice of bytes ([]byte). -func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func size_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -// Encode a slice of int32s ([]int32). -func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of int32s ([]int32) in packed format. -func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(buf, uint64(x)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - bufSize += p.valSize(uint64(x)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of uint32s ([]uint32). -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := s.Index(i) - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := s.Index(i) - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of uint32s ([]uint32) in packed format. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, uint64(s.Index(i))) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(uint64(s.Index(i))) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of int64s ([]int64). -func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, s.Index(i)) - } - return nil -} - -func size_slice_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - n += p.valSize(s.Index(i)) - } - return -} - -// Encode a slice of int64s ([]int64) in packed format. -func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, s.Index(i)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(s.Index(i)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of slice of bytes ([][]byte). -func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(ss[i]) - } - return nil -} - -func size_slice_slice_byte(p *Properties, base structPointer) (n int) { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return 0 - } - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeRawBytes(ss[i]) - } - return -} - -// Encode a slice of strings ([]string). -func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(ss[i]) - } - return nil -} - -func size_slice_string(p *Properties, base structPointer) (n int) { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeStringBytes(ss[i]) - } - return -} - -// Encode a slice of message structs ([]*struct). -func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - } - return state.err -} - -func size_slice_struct_message(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += len(p.tagcode) - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -// Encode a slice of group structs ([]*struct). -func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return errRepeatedHasNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - - err := o.enc_struct(p.sprop, b) - - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - } - return state.err -} - -func size_slice_struct_group(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) - n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return // return size up to this point - } - - n += size_struct(p.sprop, b) - } - return -} - -// Encode an extension map. -func (o *Buffer) enc_map(p *Properties, base structPointer) error { - v := *structPointer_ExtMap(base, p.field) - if err := encodeExtensionMap(v); err != nil { - return err - } - // Fast-path for common cases: zero or one extensions. - if len(v) <= 1 { - for _, e := range v { - o.buf = append(o.buf, e.enc...) - } - return nil - } - - // Sort keys to provide a deterministic encoding. - keys := make([]int, 0, len(v)) - for k := range v { - keys = append(keys, int(k)) - } - sort.Ints(keys) - - for _, k := range keys { - o.buf = append(o.buf, v[int32(k)].enc...) - } - return nil -} - -func size_map(p *Properties, base structPointer) int { - v := *structPointer_ExtMap(base, p.field) - return sizeExtensionMap(v) -} - -// Encode a map field. -func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { - var state errorState // XXX: or do we need to plumb this through? - - /* - A map defined as - map map_field = N; - is encoded in the same way as - message MapFieldEntry { - key_type key = 1; - value_type value = 2; - } - repeated MapFieldEntry map_field = N; - */ - - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - if v.Len() == 0 { - return nil - } - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - enc := func() error { - if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { - return err - } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil { - return err - } - return nil - } - - // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - - // The only illegal map entry values are nil message pointers. - if val.Kind() == reflect.Ptr && val.IsNil() { - return errors.New("proto: map has nil element") - } - - keycopy.Set(key) - valcopy.Set(val) - - o.buf = append(o.buf, p.tagcode...) - if err := o.enc_len_thing(enc, &state); err != nil { - return err - } - } - return nil -} - -func size_new_map(p *Properties, base structPointer) int { - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - n := 0 - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - keycopy.Set(key) - valcopy.Set(val) - - // Tag codes for key and val are the responsibility of the sub-sizer. - keysize := p.mkeyprop.size(p.mkeyprop, keybase) - valsize := p.mvalprop.size(p.mvalprop, valbase) - entry := keysize + valsize - // Add on tag code and length of map entry itself. - n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry - } - return n -} - -// mapEncodeScratch returns a new reflect.Value matching the map's value type, -// and a structPointer suitable for passing to an encoder or sizer. -func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { - // Prepare addressable doubly-indirect placeholders for the key and value types. - // This is needed because the element-type encoders expect **T, but the map iteration produces T. - - keycopy = reflect.New(mapType.Key()).Elem() // addressable K - keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K - keyptr.Set(keycopy.Addr()) // - keybase = toStructPointer(keyptr.Addr()) // **K - - // Value types are more varied and require special handling. - switch mapType.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte - valbase = toStructPointer(valcopy.Addr()) - case reflect.Ptr: - // message; the generated field type is map[K]*Msg (so V is *Msg), - // so we only need one level of indirection. - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valbase = toStructPointer(valcopy.Addr()) - default: - // everything else - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V - valptr.Set(valcopy.Addr()) // - valbase = toStructPointer(valptr.Addr()) // **V - } - return -} - -// Encode a struct. -func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { - var state errorState - // Encode fields in tag order so that decoders may use optimizations - // that depend on the ordering. - // https://developers.google.com/protocol-buffers/docs/encoding#order - for _, i := range prop.order { - p := prop.Prop[i] - if p.enc != nil { - err := p.enc(o, p, base) - if err != nil { - if err == ErrNil { - if p.Required && state.err == nil { - state.err = &RequiredNotSetError{p.Name} - } - } else if err == errRepeatedHasNil { - // Give more context to nil values in repeated fields. - return errors.New("repeated field " + p.OrigName + " has nil element") - } else if !state.shouldContinue(err, p) { - return err - } - } - } - } - - // Do oneof fields. - if prop.oneofMarshaler != nil { - m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err != nil { - return err - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - if len(v) > 0 { - o.buf = append(o.buf, v...) - } - } - - return state.err -} - -func size_struct(prop *StructProperties, base structPointer) (n int) { - for _, i := range prop.order { - p := prop.Prop[i] - if p.size != nil { - n += p.size(p, base) - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - n += len(v) - } - - // Factor in any oneof fields. - // TODO: This could be faster and use less reflection. - if prop.oneofMarshaler != nil { - sv := reflect.ValueOf(structPointer_Interface(base, prop.stype)).Elem() - for i := 0; i < prop.stype.NumField(); i++ { - fv := sv.Field(i) - if fv.Kind() != reflect.Interface || fv.IsNil() { - continue - } - if prop.stype.Field(i).Tag.Get("protobuf_oneof") == "" { - continue - } - spv := fv.Elem() // interface -> *T - sv := spv.Elem() // *T -> T - sf := sv.Type().Field(0) // StructField inside T - var prop Properties - prop.Init(sf.Type, "whatever", sf.Tag.Get("protobuf"), &sf) - n += prop.size(&prop, toStructPointer(spv)) - } - } - - return -} - -var zeroes [20]byte // longer than any conceivable sizeVarint - -// Encode a struct, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { - return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) -} - -// Encode something, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { - iLen := len(o.buf) - o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length - iMsg := len(o.buf) - err := enc() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - lMsg := len(o.buf) - iMsg - lLen := sizeVarint(uint64(lMsg)) - switch x := lLen - (iMsg - iLen); { - case x > 0: // actual length is x bytes larger than the space we reserved - // Move msg x bytes right. - o.buf = append(o.buf, zeroes[:x]...) - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - case x < 0: // actual length is x bytes smaller than the space we reserved - // Move msg x bytes left. - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - o.buf = o.buf[:len(o.buf)+x] // x is negative - } - // Encode the length in the reserved space. - o.buf = o.buf[:iLen] - o.EncodeVarint(uint64(lMsg)) - o.buf = o.buf[:len(o.buf)+lMsg] - return state.err -} - -// errorState maintains the first error that occurs and updates that error -// with additional context. -type errorState struct { - err error -} - -// shouldContinue reports whether encoding should continue upon encountering the -// given error. If the error is RequiredNotSetError, shouldContinue returns true -// and, if this is the first appearance of that error, remembers it for future -// reporting. -// -// If prop is not nil, it may update any error with additional context about the -// field with the error. -func (s *errorState) shouldContinue(err error, prop *Properties) bool { - // Ignore unset required fields. - reqNotSet, ok := err.(*RequiredNotSetError) - if !ok { - return false - } - if s.err == nil { - if prop != nil { - err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} - } - s.err = err - } - return true -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode_gogo.go deleted file mode 100644 index f77cfb1eea..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/encode_gogo.go +++ /dev/null @@ -1,354 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// http://github.com/golang/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "reflect" -) - -func NewRequiredNotSetError(field string) *RequiredNotSetError { - return &RequiredNotSetError{field} -} - -type Sizer interface { - Size() int -} - -func (o *Buffer) enc_ext_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, s...) - return nil -} - -func size_ext_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return 0 - } - n += len(s) - return -} - -// Encode a reference to bool pointer. -func (o *Buffer) enc_ref_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - x := 0 - if v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_bool(p *Properties, base structPointer) int { - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode a reference to int32 pointer. -func (o *Buffer) enc_ref_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func (o *Buffer) enc_ref_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a reference to an int64 pointer. -func (o *Buffer) enc_ref_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_ref_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a reference to a string pointer. -func (o *Buffer) enc_ref_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_ref_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - n += len(p.tagcode) - n += sizeStringBytes(v) - return -} - -// Encode a reference to a message struct. -func (o *Buffer) enc_ref_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetRefStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -//TODO this is only copied, please fix this -func size_ref_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetRefStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a slice of references to message struct pointers ([]struct). -func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) error { - var state errorState - ss := structPointer_GetStructPointer(base, p.field) - ss1 := structPointer_GetRefStructPointer(ss, field(0)) - size := p.stype.Size() - l := structPointer_Len(base, p.field) - for i := 0; i < l; i++ { - structp := structPointer_Add(ss1, field(uintptr(i)*size)) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - } - return state.err -} - -//TODO this is only copied, please fix this -func size_slice_ref_struct_message(p *Properties, base structPointer) (n int) { - ss := structPointer_GetStructPointer(base, p.field) - ss1 := structPointer_GetRefStructPointer(ss, field(0)) - size := p.stype.Size() - l := structPointer_Len(base, p.field) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := structPointer_Add(ss1, field(uintptr(i)*size)) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += len(p.tagcode) - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -func (o *Buffer) enc_custom_bytes(p *Properties, base structPointer) error { - i := structPointer_InterfaceRef(base, p.field, p.ctype) - if i == nil { - return ErrNil - } - custom := i.(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - if data == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_custom_bytes(p *Properties, base structPointer) (n int) { - n += len(p.tagcode) - i := structPointer_InterfaceRef(base, p.field, p.ctype) - if i == nil { - return 0 - } - custom := i.(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - return -} - -func (o *Buffer) enc_custom_ref_bytes(p *Properties, base structPointer) error { - custom := structPointer_InterfaceAt(base, p.field, p.ctype).(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - if data == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_custom_ref_bytes(p *Properties, base structPointer) (n int) { - n += len(p.tagcode) - i := structPointer_InterfaceAt(base, p.field, p.ctype) - if i == nil { - return 0 - } - custom := i.(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - return -} - -func (o *Buffer) enc_custom_slice_bytes(p *Properties, base structPointer) error { - inter := structPointer_InterfaceRef(base, p.field, p.ctype) - if inter == nil { - return ErrNil - } - slice := reflect.ValueOf(inter) - l := slice.Len() - for i := 0; i < l; i++ { - v := slice.Index(i) - custom := v.Interface().(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} - -func size_custom_slice_bytes(p *Properties, base structPointer) (n int) { - inter := structPointer_InterfaceRef(base, p.field, p.ctype) - if inter == nil { - return 0 - } - slice := reflect.ValueOf(inter) - l := slice.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - v := slice.Index(i) - custom := v.Interface().(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - } - return -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal.go deleted file mode 100644 index cc3f2c95a7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal.go +++ /dev/null @@ -1,266 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol buffer comparison. - -package proto - -import ( - "bytes" - "log" - "reflect" - "strings" -) - -/* -Equal returns true iff protocol buffers a and b are equal. -The arguments must both be pointers to protocol buffer structs. - -Equality is defined in this way: - - Two messages are equal iff they are the same type, - corresponding fields are equal, unknown field sets - are equal, and extensions sets are equal. - - Two set scalar fields are equal iff their values are equal. - If the fields are of a floating-point type, remember that - NaN != x for all x, including NaN. - - Two repeated fields are equal iff their lengths are the same, - and their corresponding elements are equal (a "bytes" field, - although represented by []byte, is not a repeated field) - - Two unset fields are equal. - - Two unknown field sets are equal if their current - encoded state is equal. - - Two extension sets are equal iff they have corresponding - elements that are pairwise equal. - - Every other combination of things are not equal. - -The return value is undefined if a and b are not protocol buffers. -*/ -func Equal(a, b Message) bool { - if a == nil || b == nil { - return a == b - } - v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) - if v1.Type() != v2.Type() { - return false - } - if v1.Kind() == reflect.Ptr { - if v1.IsNil() { - return v2.IsNil() - } - if v2.IsNil() { - return false - } - v1, v2 = v1.Elem(), v2.Elem() - } - if v1.Kind() != reflect.Struct { - return false - } - return equalStruct(v1, v2) -} - -// v1 and v2 are known to have the same type. -func equalStruct(v1, v2 reflect.Value) bool { - for i := 0; i < v1.NumField(); i++ { - f := v1.Type().Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - f1, f2 := v1.Field(i), v2.Field(i) - if f.Type.Kind() == reflect.Ptr { - if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { - // both unset - continue - } else if n1 != n2 { - // set/unset mismatch - return false - } - b1, ok := f1.Interface().(raw) - if ok { - b2 := f2.Interface().(raw) - // RawMessage - if !bytes.Equal(b1.Bytes(), b2.Bytes()) { - return false - } - continue - } - f1, f2 = f1.Elem(), f2.Elem() - } - if !equalAny(f1, f2) { - return false - } - } - - if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { - em2 := v2.FieldByName("XXX_extensions") - if !equalExtensions(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { - return false - } - } - - uf := v1.FieldByName("XXX_unrecognized") - if !uf.IsValid() { - return true - } - - u1 := uf.Bytes() - u2 := v2.FieldByName("XXX_unrecognized").Bytes() - if !bytes.Equal(u1, u2) { - return false - } - - return true -} - -// v1 and v2 are known to have the same type. -func equalAny(v1, v2 reflect.Value) bool { - if v1.Type() == protoMessageType { - m1, _ := v1.Interface().(Message) - m2, _ := v2.Interface().(Message) - return Equal(m1, m2) - } - switch v1.Kind() { - case reflect.Bool: - return v1.Bool() == v2.Bool() - case reflect.Float32, reflect.Float64: - return v1.Float() == v2.Float() - case reflect.Int32, reflect.Int64: - return v1.Int() == v2.Int() - case reflect.Interface: - // Probably a oneof field; compare the inner values. - n1, n2 := v1.IsNil(), v2.IsNil() - if n1 || n2 { - return n1 == n2 - } - e1, e2 := v1.Elem(), v2.Elem() - if e1.Type() != e2.Type() { - return false - } - return equalAny(e1, e2) - case reflect.Map: - if v1.Len() != v2.Len() { - return false - } - for _, key := range v1.MapKeys() { - val2 := v2.MapIndex(key) - if !val2.IsValid() { - // This key was not found in the second map. - return false - } - if !equalAny(v1.MapIndex(key), val2) { - return false - } - } - return true - case reflect.Ptr: - return equalAny(v1.Elem(), v2.Elem()) - case reflect.Slice: - if v1.Type().Elem().Kind() == reflect.Uint8 { - // short circuit: []byte - if v1.IsNil() != v2.IsNil() { - return false - } - return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) - } - - if v1.Len() != v2.Len() { - return false - } - for i := 0; i < v1.Len(); i++ { - if !equalAny(v1.Index(i), v2.Index(i)) { - return false - } - } - return true - case reflect.String: - return v1.Interface().(string) == v2.Interface().(string) - case reflect.Struct: - return equalStruct(v1, v2) - case reflect.Uint32, reflect.Uint64: - return v1.Uint() == v2.Uint() - } - - // unknown type, so not a protocol buffer - log.Printf("proto: don't know how to compare %v", v1) - return false -} - -// base is the struct type that the extensions are based on. -// em1 and em2 are extension maps. -func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { - if len(em1) != len(em2) { - return false - } - - for extNum, e1 := range em1 { - e2, ok := em2[extNum] - if !ok { - return false - } - - m1, m2 := e1.value, e2.value - - if m1 != nil && m2 != nil { - // Both are unencoded. - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2)) { - return false - } - continue - } - - // At least one is encoded. To do a semantically correct comparison - // we need to unmarshal them first. - var desc *ExtensionDesc - if m := extensionMaps[base]; m != nil { - desc = m[extNum] - } - if desc == nil { - log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) - continue - } - var err error - if m1 == nil { - m1, err = decodeExtension(e1.enc, desc) - } - if m2 == nil && err == nil { - m2, err = decodeExtension(e2.enc, desc) - } - if err != nil { - // The encoded form is invalid. - log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) - return false - } - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2)) { - return false - } - } - - return true -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal_test.go deleted file mode 100644 index 7cb36d3785..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/equal_test.go +++ /dev/null @@ -1,209 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - . "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -// Four identical base messages. -// The init function adds extensions to some of them. -var messageWithoutExtension = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension1a = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension1b = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension2 = &pb.MyMessage{Count: Int32(7)} - -// Two messages with non-message extensions. -var messageWithInt32Extension1 = &pb.MyMessage{Count: Int32(8)} -var messageWithInt32Extension2 = &pb.MyMessage{Count: Int32(8)} - -func init() { - ext1 := &pb.Ext{Data: String("Kirk")} - ext2 := &pb.Ext{Data: String("Picard")} - - // messageWithExtension1a has ext1, but never marshals it. - if err := SetExtension(messageWithExtension1a, pb.E_Ext_More, ext1); err != nil { - panic("SetExtension on 1a failed: " + err.Error()) - } - - // messageWithExtension1b is the unmarshaled form of messageWithExtension1a. - if err := SetExtension(messageWithExtension1b, pb.E_Ext_More, ext1); err != nil { - panic("SetExtension on 1b failed: " + err.Error()) - } - buf, err := Marshal(messageWithExtension1b) - if err != nil { - panic("Marshal of 1b failed: " + err.Error()) - } - messageWithExtension1b.Reset() - if err := Unmarshal(buf, messageWithExtension1b); err != nil { - panic("Unmarshal of 1b failed: " + err.Error()) - } - - // messageWithExtension2 has ext2. - if err := SetExtension(messageWithExtension2, pb.E_Ext_More, ext2); err != nil { - panic("SetExtension on 2 failed: " + err.Error()) - } - - if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(23)); err != nil { - panic("SetExtension on Int32-1 failed: " + err.Error()) - } - if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(24)); err != nil { - panic("SetExtension on Int32-2 failed: " + err.Error()) - } -} - -var EqualTests = []struct { - desc string - a, b Message - exp bool -}{ - {"different types", &pb.GoEnum{}, &pb.GoTestField{}, false}, - {"equal empty", &pb.GoEnum{}, &pb.GoEnum{}, true}, - {"nil vs nil", nil, nil, true}, - {"typed nil vs typed nil", (*pb.GoEnum)(nil), (*pb.GoEnum)(nil), true}, - {"typed nil vs empty", (*pb.GoEnum)(nil), &pb.GoEnum{}, false}, - {"different typed nil", (*pb.GoEnum)(nil), (*pb.GoTestField)(nil), false}, - - {"one set field, one unset field", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{}, false}, - {"one set field zero, one unset field", &pb.GoTest{Param: Int32(0)}, &pb.GoTest{}, false}, - {"different set fields", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("bar")}, false}, - {"equal set", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("foo")}, true}, - - {"repeated, one set", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{}, false}, - {"repeated, different length", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{F_Int32Repeated: []int32{2}}, false}, - {"repeated, different value", &pb.GoTest{F_Int32Repeated: []int32{2}}, &pb.GoTest{F_Int32Repeated: []int32{3}}, false}, - {"repeated, equal", &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, true}, - {"repeated, nil equal nil", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: nil}, true}, - {"repeated, nil equal empty", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: []int32{}}, true}, - {"repeated, empty equal nil", &pb.GoTest{F_Int32Repeated: []int32{}}, &pb.GoTest{F_Int32Repeated: nil}, true}, - - { - "nested, different", - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("foo")}}, - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("bar")}}, - false, - }, - { - "nested, equal", - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, - true, - }, - - {"bytes", &pb.OtherMessage{Value: []byte("foo")}, &pb.OtherMessage{Value: []byte("foo")}, true}, - {"bytes, empty", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: []byte{}}, true}, - {"bytes, empty vs nil", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: nil}, false}, - { - "repeated bytes", - &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, - &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, - true, - }, - - {"extension vs. no extension", messageWithoutExtension, messageWithExtension1a, false}, - {"extension vs. same extension", messageWithExtension1a, messageWithExtension1b, true}, - {"extension vs. different extension", messageWithExtension1a, messageWithExtension2, false}, - - {"int32 extension vs. itself", messageWithInt32Extension1, messageWithInt32Extension1, true}, - {"int32 extension vs. a different int32", messageWithInt32Extension1, messageWithInt32Extension2, false}, - - { - "message with group", - &pb.MyMessage{ - Count: Int32(1), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: Int32(5), - }, - }, - &pb.MyMessage{ - Count: Int32(1), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: Int32(5), - }, - }, - true, - }, - - { - "map same", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - true, - }, - { - "map different entry", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob"}}, - false, - }, - { - "map different key only", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{2: "Ken"}}, - false, - }, - { - "map different value only", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob"}}, - false, - }, - { - "oneof same", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - true, - }, - { - "oneof one nil", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{}, - false, - }, - { - "oneof different", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{Union: &pb.Communique_Name{Name: "Bobby Tables"}}, - false, - }, -} - -func TestEqual(t *testing.T) { - for _, tc := range EqualTests { - if res := Equal(tc.a, tc.b); res != tc.exp { - t.Errorf("%v: Equal(%v, %v) = %v, want %v", tc.desc, tc.a, tc.b, res, tc.exp) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions.go deleted file mode 100644 index 9a6374fdbd..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions.go +++ /dev/null @@ -1,519 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Types and routines for supporting protocol buffer extensions. - */ - -import ( - "errors" - "fmt" - "reflect" - "strconv" - "sync" -) - -// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. -var ErrMissingExtension = errors.New("proto: missing extension") - -// ExtensionRange represents a range of message extensions for a protocol buffer. -// Used in code generated by the protocol compiler. -type ExtensionRange struct { - Start, End int32 // both inclusive -} - -// extendableProto is an interface implemented by any protocol buffer that may be extended. -type extendableProto interface { - Message - ExtensionRangeArray() []ExtensionRange -} - -type extensionsMap interface { - extendableProto - ExtensionMap() map[int32]Extension -} - -type extensionsBytes interface { - extendableProto - GetExtensions() *[]byte -} - -var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() - -// ExtensionDesc represents an extension specification. -// Used in generated code from the protocol compiler. -type ExtensionDesc struct { - ExtendedType Message // nil pointer to the type that is being extended - ExtensionType interface{} // nil pointer to the extension type - Field int32 // field number - Name string // fully-qualified name of extension, for text formatting - Tag string // protobuf tag style -} - -func (ed *ExtensionDesc) repeated() bool { - t := reflect.TypeOf(ed.ExtensionType) - return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 -} - -// Extension represents an extension in a message. -type Extension struct { - // When an extension is stored in a message using SetExtension - // only desc and value are set. When the message is marshaled - // enc will be set to the encoded form of the message. - // - // When a message is unmarshaled and contains extensions, each - // extension will have only enc set. When such an extension is - // accessed using GetExtension (or GetExtensions) desc and value - // will be set. - desc *ExtensionDesc - value interface{} - enc []byte -} - -// SetRawExtension is for testing only. -func SetRawExtension(base extendableProto, id int32, b []byte) { - if ebase, ok := base.(extensionsMap); ok { - ebase.ExtensionMap()[id] = Extension{enc: b} - } else if ebase, ok := base.(extensionsBytes); ok { - clearExtension(base, id) - ext := ebase.GetExtensions() - *ext = append(*ext, b...) - } else { - panic("unreachable") - } -} - -// isExtensionField returns true iff the given field number is in an extension range. -func isExtensionField(pb extendableProto, field int32) bool { - for _, er := range pb.ExtensionRangeArray() { - if er.Start <= field && field <= er.End { - return true - } - } - return false -} - -// checkExtensionTypes checks that the given extension is valid for pb. -func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { - // Check the extended type. - if a, b := reflect.TypeOf(pb), reflect.TypeOf(extension.ExtendedType); a != b { - return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) - } - // Check the range. - if !isExtensionField(pb, extension.Field) { - return errors.New("proto: bad extension number; not in declared ranges") - } - return nil -} - -// extPropKey is sufficient to uniquely identify an extension. -type extPropKey struct { - base reflect.Type - field int32 -} - -var extProp = struct { - sync.RWMutex - m map[extPropKey]*Properties -}{ - m: make(map[extPropKey]*Properties), -} - -func extensionProperties(ed *ExtensionDesc) *Properties { - key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} - - extProp.RLock() - if prop, ok := extProp.m[key]; ok { - extProp.RUnlock() - return prop - } - extProp.RUnlock() - - extProp.Lock() - defer extProp.Unlock() - // Check again. - if prop, ok := extProp.m[key]; ok { - return prop - } - - prop := new(Properties) - prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) - extProp.m[key] = prop - return prop -} - -// encodeExtensionMap encodes any unmarshaled (unencoded) extensions in m. -func encodeExtensionMap(m map[int32]Extension) error { - for k, e := range m { - err := encodeExtension(&e) - if err != nil { - return err - } - m[k] = e - } - return nil -} - -func encodeExtension(e *Extension) error { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - return nil - } - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - p := NewBuffer(nil) - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err - } - e.enc = p.buf - return nil -} - -func sizeExtensionMap(m map[int32]Extension) (n int) { - for _, e := range m { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - n += len(e.enc) - continue - } - - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - n += props.size(props, toStructPointer(x)) - } - return -} - -// HasExtension returns whether the given extension is present in pb. -func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { - // TODO: Check types, field numbers, etc.? - if epb, doki := pb.(extensionsMap); doki { - _, ok := epb.ExtensionMap()[extension.Field] - return ok - } else if epb, doki := pb.(extensionsBytes); doki { - ext := epb.GetExtensions() - buf := *ext - o := 0 - for o < len(buf) { - tag, n := DecodeVarint(buf[o:]) - fieldNum := int32(tag >> 3) - if int32(fieldNum) == extension.Field { - return true - } - wireType := int(tag & 0x7) - o += n - l, err := size(buf[o:], wireType) - if err != nil { - return false - } - o += l - } - return false - } - panic("unreachable") -} - -func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { - ext := pb.GetExtensions() - for offset < len(*ext) { - tag, n1 := DecodeVarint((*ext)[offset:]) - fieldNum := int32(tag >> 3) - wireType := int(tag & 0x7) - n2, err := size((*ext)[offset+n1:], wireType) - if err != nil { - panic(err) - } - newOffset := offset + n1 + n2 - if fieldNum == theFieldNum { - *ext = append((*ext)[:offset], (*ext)[newOffset:]...) - return offset - } - offset = newOffset - } - return -1 -} - -func clearExtension(pb extendableProto, fieldNum int32) { - if epb, doki := pb.(extensionsMap); doki { - delete(epb.ExtensionMap(), fieldNum) - } else if epb, doki := pb.(extensionsBytes); doki { - offset := 0 - for offset != -1 { - offset = deleteExtension(epb, fieldNum, offset) - } - } else { - panic("unreachable") - } -} - -// ClearExtension removes the given extension from pb. -func ClearExtension(pb extendableProto, extension *ExtensionDesc) { - // TODO: Check types, field numbers, etc.? - clearExtension(pb, extension.Field) -} - -// GetExtension parses and returns the given extension of pb. -// If the extension is not present it returns ErrMissingExtension. -func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { - if err := checkExtensionTypes(pb, extension); err != nil { - return nil, err - } - - if epb, doki := pb.(extensionsMap); doki { - emap := epb.ExtensionMap() - e, ok := emap[extension.Field] - if !ok { - // defaultExtensionValue returns the default value or - // ErrMissingExtension if there is no default. - return defaultExtensionValue(extension) - } - if e.value != nil { - // Already decoded. Check the descriptor, though. - if e.desc != extension { - // This shouldn't happen. If it does, it means that - // GetExtension was called twice with two different - // descriptors with the same field number. - return nil, errors.New("proto: descriptor conflict") - } - return e.value, nil - } - - v, err := decodeExtension(e.enc, extension) - if err != nil { - return nil, err - } - - // Remember the decoded version and drop the encoded version. - // That way it is safe to mutate what we return. - e.value = v - e.desc = extension - e.enc = nil - emap[extension.Field] = e - return e.value, nil - } else if epb, doki := pb.(extensionsBytes); doki { - ext := epb.GetExtensions() - o := 0 - for o < len(*ext) { - tag, n := DecodeVarint((*ext)[o:]) - fieldNum := int32(tag >> 3) - wireType := int(tag & 0x7) - l, err := size((*ext)[o+n:], wireType) - if err != nil { - return nil, err - } - if int32(fieldNum) == extension.Field { - v, err := decodeExtension((*ext)[o:o+n+l], extension) - if err != nil { - return nil, err - } - return v, nil - } - o += n + l - } - return defaultExtensionValue(extension) - } - panic("unreachable") -} - -// defaultExtensionValue returns the default value for extension. -// If no default for an extension is defined ErrMissingExtension is returned. -func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { - t := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - - sf, _, err := fieldDefault(t, props) - if err != nil { - return nil, err - } - - if sf == nil || sf.value == nil { - // There is no default value. - return nil, ErrMissingExtension - } - - if t.Kind() != reflect.Ptr { - // We do not need to return a Ptr, we can directly return sf.value. - return sf.value, nil - } - - // We need to return an interface{} that is a pointer to sf.value. - value := reflect.New(t).Elem() - value.Set(reflect.New(value.Type().Elem())) - if sf.kind == reflect.Int32 { - // We may have an int32 or an enum, but the underlying data is int32. - // Since we can't set an int32 into a non int32 reflect.value directly - // set it as a int32. - value.Elem().SetInt(int64(sf.value.(int32))) - } else { - value.Elem().Set(reflect.ValueOf(sf.value)) - } - return value.Interface(), nil -} - -// decodeExtension decodes an extension encoded in b. -func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { - o := NewBuffer(b) - - t := reflect.TypeOf(extension.ExtensionType) - rep := extension.repeated() - - props := extensionProperties(extension) - - // t is a pointer to a struct, pointer to basic type or a slice. - // Allocate a "field" to store the pointer/slice itself; the - // pointer/slice will be stored here. We pass - // the address of this field to props.dec. - // This passes a zero field and a *t and lets props.dec - // interpret it as a *struct{ x t }. - value := reflect.New(t).Elem() - - for { - // Discard wire type and field number varint. It isn't needed. - if _, err := o.DecodeVarint(); err != nil { - return nil, err - } - - if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { - return nil, err - } - - if !rep || o.index >= len(o.buf) { - break - } - } - return value.Interface(), nil -} - -// GetExtensions returns a slice of the extensions present in pb that are also listed in es. -// The returned slice has the same length as es; missing extensions will appear as nil elements. -func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, ok := pb.(extendableProto) - if !ok { - err = errors.New("proto: not an extendable proto") - return - } - extensions = make([]interface{}, len(es)) - for i, e := range es { - extensions[i], err = GetExtension(epb, e) - if err == ErrMissingExtension { - err = nil - } - if err != nil { - return - } - } - return -} - -// SetExtension sets the specified extension of pb to the specified value. -func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { - if err := checkExtensionTypes(pb, extension); err != nil { - return err - } - typ := reflect.TypeOf(extension.ExtensionType) - if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") - } - // nil extension values need to be caught early, because the - // encoder can't distinguish an ErrNil due to a nil extension - // from an ErrNil due to a missing field. Extensions are - // always optional, so the encoder would just swallow the error - // and drop all the extensions from the encoded message. - if reflect.ValueOf(value).IsNil() { - return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) - } - return setExtension(pb, extension, value) -} - -func setExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { - if epb, doki := pb.(extensionsMap); doki { - epb.ExtensionMap()[extension.Field] = Extension{desc: extension, value: value} - } else if epb, doki := pb.(extensionsBytes); doki { - ClearExtension(pb, extension) - ext := epb.GetExtensions() - et := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - p := NewBuffer(nil) - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err - } - *ext = append(*ext, p.buf...) - } - return nil -} - -// A global registry of extensions. -// The generated code will register the generated descriptors by calling RegisterExtension. - -var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) - -// RegisterExtension is called from the generated code. -func RegisterExtension(desc *ExtensionDesc) { - st := reflect.TypeOf(desc.ExtendedType).Elem() - m := extensionMaps[st] - if m == nil { - m = make(map[int32]*ExtensionDesc) - extensionMaps[st] = m - } - if _, ok := m[desc.Field]; ok { - panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) - } - m[desc.Field] = desc -} - -// RegisteredExtensions returns a map of the registered extensions of a -// protocol buffer struct, indexed by the extension number. -// The argument pb should be a nil pointer to the struct type. -func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { - return extensionMaps[reflect.TypeOf(pb).Elem()] -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_gogo.go deleted file mode 100644 index bd55fb68b6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_gogo.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "bytes" - "errors" - "fmt" - "reflect" - "sort" - "strings" -) - -func GetBoolExtension(pb extendableProto, extension *ExtensionDesc, ifnotset bool) bool { - if reflect.ValueOf(pb).IsNil() { - return ifnotset - } - value, err := GetExtension(pb, extension) - if err != nil { - return ifnotset - } - if value == nil { - return ifnotset - } - if value.(*bool) == nil { - return ifnotset - } - return *(value.(*bool)) -} - -func (this *Extension) Equal(that *Extension) bool { - return bytes.Equal(this.enc, that.enc) -} - -func SizeOfExtensionMap(m map[int32]Extension) (n int) { - return sizeExtensionMap(m) -} - -type sortableMapElem struct { - field int32 - ext Extension -} - -func newSortableExtensionsFromMap(m map[int32]Extension) sortableExtensions { - s := make(sortableExtensions, 0, len(m)) - for k, v := range m { - s = append(s, &sortableMapElem{field: k, ext: v}) - } - return s -} - -type sortableExtensions []*sortableMapElem - -func (this sortableExtensions) Len() int { return len(this) } - -func (this sortableExtensions) Swap(i, j int) { this[i], this[j] = this[j], this[i] } - -func (this sortableExtensions) Less(i, j int) bool { return this[i].field < this[j].field } - -func (this sortableExtensions) String() string { - sort.Sort(this) - ss := make([]string, len(this)) - for i := range this { - ss[i] = fmt.Sprintf("%d: %v", this[i].field, this[i].ext) - } - return "map[" + strings.Join(ss, ",") + "]" -} - -func StringFromExtensionsMap(m map[int32]Extension) string { - return newSortableExtensionsFromMap(m).String() -} - -func StringFromExtensionsBytes(ext []byte) string { - m, err := BytesToExtensionsMap(ext) - if err != nil { - panic(err) - } - return StringFromExtensionsMap(m) -} - -func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { - if err := encodeExtensionMap(m); err != nil { - return 0, err - } - keys := make([]int, 0, len(m)) - for k := range m { - keys = append(keys, int(k)) - } - sort.Ints(keys) - for _, k := range keys { - n += copy(data[n:], m[int32(k)].enc) - } - return n, nil -} - -func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { - if m[id].value == nil || m[id].desc == nil { - return m[id].enc, nil - } - if err := encodeExtensionMap(m); err != nil { - return nil, err - } - return m[id].enc, nil -} - -func size(buf []byte, wire int) (int, error) { - switch wire { - case WireVarint: - _, n := DecodeVarint(buf) - return n, nil - case WireFixed64: - return 8, nil - case WireBytes: - v, n := DecodeVarint(buf) - return int(v) + n, nil - case WireFixed32: - return 4, nil - case WireStartGroup: - offset := 0 - for { - u, n := DecodeVarint(buf[offset:]) - fwire := int(u & 0x7) - offset += n - if fwire == WireEndGroup { - return offset, nil - } - s, err := size(buf[offset:], wire) - if err != nil { - return 0, err - } - offset += s - } - } - return 0, fmt.Errorf("proto: can't get size for unknown wire type %d", wire) -} - -func BytesToExtensionsMap(buf []byte) (map[int32]Extension, error) { - m := make(map[int32]Extension) - i := 0 - for i < len(buf) { - tag, n := DecodeVarint(buf[i:]) - if n <= 0 { - return nil, fmt.Errorf("unable to decode varint") - } - fieldNum := int32(tag >> 3) - wireType := int(tag & 0x7) - l, err := size(buf[i+n:], wireType) - if err != nil { - return nil, err - } - end := i + int(l) + n - m[int32(fieldNum)] = Extension{enc: buf[i:end]} - i = end - } - return m, nil -} - -func NewExtension(e []byte) Extension { - ee := Extension{enc: make([]byte, len(e))} - copy(ee.enc, e) - return ee -} - -func (this Extension) GoString() string { - if this.enc == nil { - if err := encodeExtension(&this); err != nil { - panic(err) - } - } - return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) -} - -func SetUnsafeExtension(pb extendableProto, fieldNum int32, value interface{}) error { - typ := reflect.TypeOf(pb).Elem() - ext, ok := extensionMaps[typ] - if !ok { - return fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) - } - desc, ok := ext[fieldNum] - if !ok { - return errors.New("proto: bad extension number; not in declared ranges") - } - return setExtension(pb, desc, value) -} - -func GetUnsafeExtension(pb extendableProto, fieldNum int32) (interface{}, error) { - typ := reflect.TypeOf(pb).Elem() - ext, ok := extensionMaps[typ] - if !ok { - return nil, fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) - } - desc, ok := ext[fieldNum] - if !ok { - return nil, fmt.Errorf("unregistered field number %d", fieldNum) - } - return GetExtension(pb, desc) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_test.go deleted file mode 100644 index 86e3006d73..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/extensions_test.go +++ /dev/null @@ -1,292 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -func TestGetExtensionsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", ext1) - } - exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ - pb.E_Ext_More, - pb.E_Ext_Text, - }) - if err != nil { - t.Fatalf("GetExtensions() failed: %s", err) - } - if exts[0] != ext1 { - t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) - } - if exts[1] != nil { - t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) - } -} - -func TestGetExtensionStability(t *testing.T) { - check := func(m *pb.MyMessage) bool { - ext1, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - ext2, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - return ext1 == ext2 - } - msg := &pb.MyMessage{Count: proto.Int32(4)} - ext0 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { - t.Fatalf("Could not set ext1: %s", ext0) - } - if !check(msg) { - t.Errorf("GetExtension() not stable before marshaling") - } - bb, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Marshal() failed: %s", err) - } - msg1 := &pb.MyMessage{} - err = proto.Unmarshal(bb, msg1) - if err != nil { - t.Fatalf("Unmarshal() failed: %s", err) - } - if !check(msg1) { - t.Errorf("GetExtension() not stable after unmarshaling") - } -} - -func TestGetExtensionDefaults(t *testing.T) { - var setFloat64 float64 = 1 - var setFloat32 float32 = 2 - var setInt32 int32 = 3 - var setInt64 int64 = 4 - var setUint32 uint32 = 5 - var setUint64 uint64 = 6 - var setBool = true - var setBool2 = false - var setString = "Goodnight string" - var setBytes = []byte("Goodnight bytes") - var setEnum = pb.DefaultsMessage_TWO - - type testcase struct { - ext *proto.ExtensionDesc // Extension we are testing. - want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). - def interface{} // Expected value of extension after ClearExtension(). - } - tests := []testcase{ - {pb.E_NoDefaultDouble, setFloat64, nil}, - {pb.E_NoDefaultFloat, setFloat32, nil}, - {pb.E_NoDefaultInt32, setInt32, nil}, - {pb.E_NoDefaultInt64, setInt64, nil}, - {pb.E_NoDefaultUint32, setUint32, nil}, - {pb.E_NoDefaultUint64, setUint64, nil}, - {pb.E_NoDefaultSint32, setInt32, nil}, - {pb.E_NoDefaultSint64, setInt64, nil}, - {pb.E_NoDefaultFixed32, setUint32, nil}, - {pb.E_NoDefaultFixed64, setUint64, nil}, - {pb.E_NoDefaultSfixed32, setInt32, nil}, - {pb.E_NoDefaultSfixed64, setInt64, nil}, - {pb.E_NoDefaultBool, setBool, nil}, - {pb.E_NoDefaultBool, setBool2, nil}, - {pb.E_NoDefaultString, setString, nil}, - {pb.E_NoDefaultBytes, setBytes, nil}, - {pb.E_NoDefaultEnum, setEnum, nil}, - {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, - {pb.E_DefaultFloat, setFloat32, float32(3.14)}, - {pb.E_DefaultInt32, setInt32, int32(42)}, - {pb.E_DefaultInt64, setInt64, int64(43)}, - {pb.E_DefaultUint32, setUint32, uint32(44)}, - {pb.E_DefaultUint64, setUint64, uint64(45)}, - {pb.E_DefaultSint32, setInt32, int32(46)}, - {pb.E_DefaultSint64, setInt64, int64(47)}, - {pb.E_DefaultFixed32, setUint32, uint32(48)}, - {pb.E_DefaultFixed64, setUint64, uint64(49)}, - {pb.E_DefaultSfixed32, setInt32, int32(50)}, - {pb.E_DefaultSfixed64, setInt64, int64(51)}, - {pb.E_DefaultBool, setBool, true}, - {pb.E_DefaultBool, setBool2, true}, - {pb.E_DefaultString, setString, "Hello, string"}, - {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, - {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, - } - - checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { - val, err := proto.GetExtension(msg, test.ext) - if err != nil { - if valWant != nil { - return fmt.Errorf("GetExtension(): %s", err) - } - if want := proto.ErrMissingExtension; err != want { - return fmt.Errorf("Unexpected error: got %v, want %v", err, want) - } - return nil - } - - // All proto2 extension values are either a pointer to a value or a slice of values. - ty := reflect.TypeOf(val) - tyWant := reflect.TypeOf(test.ext.ExtensionType) - if got, want := ty, tyWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) - } - tye := ty.Elem() - tyeWant := tyWant.Elem() - if got, want := tye, tyeWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) - } - - // Check the name of the type of the value. - // If it is an enum it will be type int32 with the name of the enum. - if got, want := tye.Name(), tye.Name(); got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) - } - - // Check that value is what we expect. - // If we have a pointer in val, get the value it points to. - valExp := val - if ty.Kind() == reflect.Ptr { - valExp = reflect.ValueOf(val).Elem().Interface() - } - if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { - return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) - } - - return nil - } - - setTo := func(test testcase) interface{} { - setTo := reflect.ValueOf(test.want) - if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { - setTo = reflect.New(typ).Elem() - setTo.Set(reflect.New(setTo.Type().Elem())) - setTo.Elem().Set(reflect.ValueOf(test.want)) - } - return setTo.Interface() - } - - for _, test := range tests { - msg := &pb.DefaultsMessage{} - name := test.ext.Name - - // Check the initial value. - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - - // Set the per-type value and check value. - name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) - if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { - t.Errorf("%s: SetExtension(): %v", name, err) - continue - } - if err := checkVal(test, msg, test.want); err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Set and check the value. - name += " (cleared)" - proto.ClearExtension(msg, test.ext) - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - } -} - -func TestExtensionsRoundTrip(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{ - Data: proto.String("hi"), - } - ext2 := &pb.Ext{ - Data: proto.String("there"), - } - exists := proto.HasExtension(msg, pb.E_Ext_More) - if exists { - t.Error("Extension More present unexpectedly") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Error(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { - t.Error(err) - } - e, err := proto.GetExtension(msg, pb.E_Ext_More) - if err != nil { - t.Error(err) - } - x, ok := e.(*pb.Ext) - if !ok { - t.Errorf("e has type %T, expected testdata.Ext", e) - } else if *x.Data != "there" { - t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) - } - proto.ClearExtension(msg, pb.E_Ext_More) - if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { - t.Errorf("got %v, expected ErrMissingExtension", e) - } - if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { - t.Error("expected bad extension error, got nil") - } - if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { - t.Error("expected extension err") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { - t.Error("expected some sort of type mismatch error, got nil") - } -} - -func TestNilExtension(t *testing.T) { - msg := &pb.MyMessage{ - Count: proto.Int32(1), - } - if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { - t.Fatal(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { - t.Error("expected SetExtension to fail due to a nil extension") - } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { - t.Errorf("expected error %v, got %v", want, err) - } - // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update - // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib.go deleted file mode 100644 index 8ffa91a3e9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib.go +++ /dev/null @@ -1,883 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package proto converts data structures to and from the wire format of -protocol buffers. It works in concert with the Go source code generated -for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. - - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -The simplest way to describe this is to see an example. -Given file test.proto, containing - - package example; - - enum FOO { X = 17; } - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - oneof union { - int32 number = 6; - string name = 7; - } - } - -The resulting file, test.pb.go, is: - - package example - - import proto "github.com/gogo/protobuf/proto" - import math "math" - - type FOO int32 - const ( - FOO_X FOO = 17 - ) - var FOO_name = map[int32]string{ - 17: "X", - } - var FOO_value = map[string]int32{ - "X": 17, - } - - func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p - } - func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) - } - func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data) - if err != nil { - return err - } - *x = FOO(value) - return nil - } - - type Test struct { - Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` - Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` - Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` - Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - // Types that are valid to be assigned to Union: - // *Test_Number - // *Test_Name - Union isTest_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` - } - func (m *Test) Reset() { *m = Test{} } - func (m *Test) String() string { return proto.CompactTextString(m) } - func (*Test) ProtoMessage() {} - - type isTest_Union interface { - isTest_Union() - } - - type Test_Number struct { - Number int32 `protobuf:"varint,6,opt,name=number"` - } - type Test_Name struct { - Name string `protobuf:"bytes,7,opt,name=name"` - } - - func (*Test_Number) isTest_Union() {} - func (*Test_Name) isTest_Union() {} - - func (m *Test) GetUnion() isTest_Union { - if m != nil { - return m.Union - } - return nil - } - const Default_Test_Type int32 = 77 - - func (m *Test) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" - } - - func (m *Test) GetType() int32 { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_Test_Type - } - - func (m *Test) GetOptionalgroup() *Test_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil - } - - type Test_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` - } - func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } - func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } - - func (m *Test_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" - } - - func (m *Test) GetNumber() int32 { - if x, ok := m.GetUnion().(*Test_Number); ok { - return x.Number - } - return 0 - } - - func (m *Test) GetName() string { - if x, ok := m.GetUnion().(*Test_Name); ok { - return x.Name - } - return "" - } - - func init() { - proto.RegisterEnum("example.FOO", FOO_name, FOO_value) - } - -To create and play with a Test object: - - package main - - import ( - "log" - - "github.com/gogo/protobuf/proto" - pb "./example.pb" - ) - - func main() { - test := &pb.Test{ - Label: proto.String("hello"), - Type: proto.Int32(17), - Optionalgroup: &pb.Test_OptionalGroup{ - RequiredField: proto.String("good bye"), - }, - Union: &pb.Test_Name{"fred"}, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &pb.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // Use a type switch to determine which oneof was set. - switch u := test.Union.(type) { - case *pb.Test_Number: // u.Number contains the number. - case *pb.Test_Name: // u.Name contains the string. - } - // etc. - } -*/ -package proto - -import ( - "encoding/json" - "fmt" - "log" - "reflect" - "sort" - "strconv" - "sync" -) - -// Message is implemented by generated protocol buffer messages. -type Message interface { - Reset() - String() string - ProtoMessage() -} - -// Stats records allocation details about the protocol buffer encoders -// and decoders. Useful for tuning the library itself. -type Stats struct { - Emalloc uint64 // mallocs in encode - Dmalloc uint64 // mallocs in decode - Encode uint64 // number of encodes - Decode uint64 // number of decodes - Chit uint64 // number of cache hits - Cmiss uint64 // number of cache misses - Size uint64 // number of sizes -} - -// Set to true to enable stats collection. -const collectStats = false - -var stats Stats - -// GetStats returns a copy of the global Stats structure. -func GetStats() Stats { return stats } - -// A Buffer is a buffer manager for marshaling and unmarshaling -// protocol buffers. It may be reused between invocations to -// reduce memory usage. It is not necessary to use a Buffer; -// the global functions Marshal and Unmarshal create a -// temporary Buffer and are fine for most applications. -type Buffer struct { - buf []byte // encode/decode byte stream - index int // write point - - // pools of basic types to amortize allocation. - bools []bool - uint32s []uint32 - uint64s []uint64 - - // extra pools, only used with pointer_reflect.go - int32s []int32 - int64s []int64 - float32s []float32 - float64s []float64 -} - -// NewBuffer allocates a new Buffer and initializes its internal data to -// the contents of the argument slice. -func NewBuffer(e []byte) *Buffer { - return &Buffer{buf: e} -} - -// Reset resets the Buffer, ready for marshaling a new protocol buffer. -func (p *Buffer) Reset() { - p.buf = p.buf[0:0] // for reading/writing - p.index = 0 // for reading -} - -// SetBuf replaces the internal buffer with the slice, -// ready for unmarshaling the contents of the slice. -func (p *Buffer) SetBuf(s []byte) { - p.buf = s - p.index = 0 -} - -// Bytes returns the contents of the Buffer. -func (p *Buffer) Bytes() []byte { return p.buf } - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { - return &v -} - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -// Int is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it, but unlike Int32 -// its argument value is an int. -func Int(v int) *int32 { - p := new(int32) - *p = int32(v) - return p -} - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { - return &v -} - -// Float32 is a helper routine that allocates a new float32 value -// to store v and returns a pointer to it. -func Float32(v float32) *float32 { - return &v -} - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { - return &v -} - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { - return &v -} - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { - return &v -} - -// EnumName is a helper function to simplify printing protocol buffer enums -// by name. Given an enum map and a value, it returns a useful string. -func EnumName(m map[int32]string, v int32) string { - s, ok := m[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// UnmarshalJSONEnum is a helper function to simplify recovering enum int values -// from their JSON-encoded representation. Given a map from the enum's symbolic -// names to its int values, and a byte buffer containing the JSON-encoded -// value, it returns an int32 that can be cast to the enum type by the caller. -// -// The function can deal with both JSON representations, numeric and symbolic. -func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { - if data[0] == '"' { - // New style: enums are strings. - var repr string - if err := json.Unmarshal(data, &repr); err != nil { - return -1, err - } - val, ok := m[repr] - if !ok { - return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) - } - return val, nil - } - // Old style: enums are ints. - var val int32 - if err := json.Unmarshal(data, &val); err != nil { - return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) - } - return val, nil -} - -// DebugPrint dumps the encoded data in b in a debugging format with a header -// including the string s. Used in testing but made available for general debugging. -func (p *Buffer) DebugPrint(s string, b []byte) { - var u uint64 - - obuf := p.buf - index := p.index - p.buf = b - p.index = 0 - depth := 0 - - fmt.Printf("\n--- %s ---\n", s) - -out: - for { - for i := 0; i < depth; i++ { - fmt.Print(" ") - } - - index := p.index - if index == len(p.buf) { - break - } - - op, err := p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: fetching op err %v\n", index, err) - break out - } - tag := op >> 3 - wire := op & 7 - - switch wire { - default: - fmt.Printf("%3d: t=%3d unknown wire=%d\n", - index, tag, wire) - break out - - case WireBytes: - var r []byte - - r, err = p.DecodeRawBytes(false) - if err != nil { - break out - } - fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) - if len(r) <= 6 { - for i := 0; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } else { - for i := 0; i < 3; i++ { - fmt.Printf(" %.2x", r[i]) - } - fmt.Printf(" ..") - for i := len(r) - 3; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } - fmt.Printf("\n") - - case WireFixed32: - u, err = p.DecodeFixed32() - if err != nil { - fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) - - case WireFixed64: - u, err = p.DecodeFixed64() - if err != nil { - fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) - - case WireVarint: - u, err = p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) - - case WireStartGroup: - fmt.Printf("%3d: t=%3d start\n", index, tag) - depth++ - - case WireEndGroup: - depth-- - fmt.Printf("%3d: t=%3d end\n", index, tag) - } - } - - if depth != 0 { - fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) - } - fmt.Printf("\n") - - p.buf = obuf - p.index = index -} - -// SetDefaults sets unset protocol buffer fields to their default values. -// It only modifies fields that are both unset and have defined defaults. -// It recursively sets default values in any non-nil sub-messages. -func SetDefaults(pb Message) { - setDefaults(reflect.ValueOf(pb), true, false) -} - -// v is a pointer to a struct. -func setDefaults(v reflect.Value, recur, zeros bool) { - v = v.Elem() - - defaultMu.RLock() - dm, ok := defaults[v.Type()] - defaultMu.RUnlock() - if !ok { - dm = buildDefaultMessage(v.Type()) - defaultMu.Lock() - defaults[v.Type()] = dm - defaultMu.Unlock() - } - - for _, sf := range dm.scalars { - f := v.Field(sf.index) - if !f.IsNil() { - // field already set - continue - } - dv := sf.value - if dv == nil && !zeros { - // no explicit default, and don't want to set zeros - continue - } - fptr := f.Addr().Interface() // **T - // TODO: Consider batching the allocations we do here. - switch sf.kind { - case reflect.Bool: - b := new(bool) - if dv != nil { - *b = dv.(bool) - } - *(fptr.(**bool)) = b - case reflect.Float32: - f := new(float32) - if dv != nil { - *f = dv.(float32) - } - *(fptr.(**float32)) = f - case reflect.Float64: - f := new(float64) - if dv != nil { - *f = dv.(float64) - } - *(fptr.(**float64)) = f - case reflect.Int32: - // might be an enum - if ft := f.Type(); ft != int32PtrType { - // enum - f.Set(reflect.New(ft.Elem())) - if dv != nil { - f.Elem().SetInt(int64(dv.(int32))) - } - } else { - // int32 field - i := new(int32) - if dv != nil { - *i = dv.(int32) - } - *(fptr.(**int32)) = i - } - case reflect.Int64: - i := new(int64) - if dv != nil { - *i = dv.(int64) - } - *(fptr.(**int64)) = i - case reflect.String: - s := new(string) - if dv != nil { - *s = dv.(string) - } - *(fptr.(**string)) = s - case reflect.Uint8: - // exceptional case: []byte - var b []byte - if dv != nil { - db := dv.([]byte) - b = make([]byte, len(db)) - copy(b, db) - } else { - b = []byte{} - } - *(fptr.(*[]byte)) = b - case reflect.Uint32: - u := new(uint32) - if dv != nil { - *u = dv.(uint32) - } - *(fptr.(**uint32)) = u - case reflect.Uint64: - u := new(uint64) - if dv != nil { - *u = dv.(uint64) - } - *(fptr.(**uint64)) = u - default: - log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) - } - } - - for _, ni := range dm.nested { - f := v.Field(ni) - // f is *T or []*T or map[T]*T - switch f.Kind() { - case reflect.Ptr: - if f.IsNil() { - continue - } - setDefaults(f, recur, zeros) - - case reflect.Slice: - for i := 0; i < f.Len(); i++ { - e := f.Index(i) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - - case reflect.Map: - for _, k := range f.MapKeys() { - e := f.MapIndex(k) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - } - } -} - -var ( - // defaults maps a protocol buffer struct type to a slice of the fields, - // with its scalar fields set to their proto-declared non-zero default values. - defaultMu sync.RWMutex - defaults = make(map[reflect.Type]defaultMessage) - - int32PtrType = reflect.TypeOf((*int32)(nil)) -) - -// defaultMessage represents information about the default values of a message. -type defaultMessage struct { - scalars []scalarField - nested []int // struct field index of nested messages -} - -type scalarField struct { - index int // struct field index - kind reflect.Kind // element type (the T in *T or []T) - value interface{} // the proto-declared default value, or nil -} - -// t is a struct type. -func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { - sprop := GetProperties(t) - for _, prop := range sprop.Prop { - fi, ok := sprop.decoderTags.get(prop.Tag) - if !ok { - // XXX_unrecognized - continue - } - ft := t.Field(fi).Type - - sf, nested, err := fieldDefault(ft, prop) - switch { - case err != nil: - log.Print(err) - case nested: - dm.nested = append(dm.nested, fi) - case sf != nil: - sf.index = fi - dm.scalars = append(dm.scalars, *sf) - } - } - - return dm -} - -// fieldDefault returns the scalarField for field type ft. -// sf will be nil if the field can not have a default. -// nestedMessage will be true if this is a nested message. -// Note that sf.index is not set on return. -func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { - var canHaveDefault bool - switch ft.Kind() { - case reflect.Ptr: - if ft.Elem().Kind() == reflect.Struct { - nestedMessage = true - } else { - canHaveDefault = true // proto2 scalar field - } - - case reflect.Slice: - switch ft.Elem().Kind() { - case reflect.Ptr: - nestedMessage = true // repeated message - case reflect.Uint8: - canHaveDefault = true // bytes field - } - - case reflect.Map: - if ft.Elem().Kind() == reflect.Ptr { - nestedMessage = true // map with message values - } - } - - if !canHaveDefault { - if nestedMessage { - return nil, true, nil - } - return nil, false, nil - } - - // We now know that ft is a pointer or slice. - sf = &scalarField{kind: ft.Elem().Kind()} - - // scalar fields without defaults - if !prop.HasDefault { - return sf, false, nil - } - - // a scalar field: either *T or []byte - switch ft.Elem().Kind() { - case reflect.Bool: - x, err := strconv.ParseBool(prop.Default) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Float32: - x, err := strconv.ParseFloat(prop.Default, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) - } - sf.value = float32(x) - case reflect.Float64: - x, err := strconv.ParseFloat(prop.Default, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Int32: - x, err := strconv.ParseInt(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) - } - sf.value = int32(x) - case reflect.Int64: - x, err := strconv.ParseInt(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.String: - sf.value = prop.Default - case reflect.Uint8: - // []byte (not *uint8) - sf.value = []byte(prop.Default) - case reflect.Uint32: - x, err := strconv.ParseUint(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) - } - sf.value = uint32(x) - case reflect.Uint64: - x, err := strconv.ParseUint(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) - } - sf.value = x - default: - return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) - } - - return sf, false, nil -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. - -func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{ - vs: vs, - // default Less function: textual comparison - less: func(a, b reflect.Value) bool { - return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) - }, - } - - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; - // numeric keys are sorted numerically. - if len(vs) == 0 { - return s - } - switch vs[0].Kind() { - case reflect.Int32, reflect.Int64: - s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } - case reflect.Uint32, reflect.Uint64: - s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } - } - - return s -} - -type mapKeySorter struct { - vs []reflect.Value - less func(a, b reflect.Value) bool -} - -func (s mapKeySorter) Len() int { return len(s.vs) } -func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } -func (s mapKeySorter) Less(i, j int) bool { - return s.less(s.vs[i], s.vs[j]) -} - -// isProto3Zero reports whether v is a zero proto3 value. -func isProto3Zero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint32, reflect.Uint64: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.String: - return v.String() == "" - } - return false -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib_gogo.go deleted file mode 100644 index a6c2c06b23..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/lib_gogo.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "encoding/json" - "strconv" -) - -func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) { - s, ok := m[value] - if !ok { - s = strconv.Itoa(int(value)) - } - return json.Marshal(s) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set.go deleted file mode 100644 index e25e01e637..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set.go +++ /dev/null @@ -1,280 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Support for message sets. - */ - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" -) - -// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. -// A message type ID is required for storing a protocol buffer in a message set. -var errNoMessageTypeID = errors.New("proto does not have a message type ID") - -// The first two types (_MessageSet_Item and messageSet) -// model what the protocol compiler produces for the following protocol message: -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required string message = 3; -// }; -// } -// That is the MessageSet wire format. We can't use a proto to generate these -// because that would introduce a circular dependency between it and this package. - -type _MessageSet_Item struct { - TypeId *int32 `protobuf:"varint,2,req,name=type_id"` - Message []byte `protobuf:"bytes,3,req,name=message"` -} - -type messageSet struct { - Item []*_MessageSet_Item `protobuf:"group,1,rep"` - XXX_unrecognized []byte - // TODO: caching? -} - -// Make sure messageSet is a Message. -var _ Message = (*messageSet)(nil) - -// messageTypeIder is an interface satisfied by a protocol buffer type -// that may be stored in a MessageSet. -type messageTypeIder interface { - MessageTypeId() int32 -} - -func (ms *messageSet) find(pb Message) *_MessageSet_Item { - mti, ok := pb.(messageTypeIder) - if !ok { - return nil - } - id := mti.MessageTypeId() - for _, item := range ms.Item { - if *item.TypeId == id { - return item - } - } - return nil -} - -func (ms *messageSet) Has(pb Message) bool { - if ms.find(pb) != nil { - return true - } - return false -} - -func (ms *messageSet) Unmarshal(pb Message) error { - if item := ms.find(pb); item != nil { - return Unmarshal(item.Message, pb) - } - if _, ok := pb.(messageTypeIder); !ok { - return errNoMessageTypeID - } - return nil // TODO: return error instead? -} - -func (ms *messageSet) Marshal(pb Message) error { - msg, err := Marshal(pb) - if err != nil { - return err - } - if item := ms.find(pb); item != nil { - // reuse existing item - item.Message = msg - return nil - } - - mti, ok := pb.(messageTypeIder) - if !ok { - return errNoMessageTypeID - } - - mtid := mti.MessageTypeId() - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: &mtid, - Message: msg, - }) - return nil -} - -func (ms *messageSet) Reset() { *ms = messageSet{} } -func (ms *messageSet) String() string { return CompactTextString(ms) } -func (*messageSet) ProtoMessage() {} - -// Support for the message_set_wire_format message option. - -func skipVarint(buf []byte) []byte { - i := 0 - for ; buf[i]&0x80 != 0; i++ { - } - return buf[i+1:] -} - -// MarshalMessageSet encodes the extension map represented by m in the message set wire format. -// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSet(m map[int32]Extension) ([]byte, error) { - if err := encodeExtensionMap(m); err != nil { - return nil, err - } - - // Sort extension IDs to provide a deterministic encoding. - // See also enc_map in encode.go. - ids := make([]int, 0, len(m)) - for id := range m { - ids = append(ids, int(id)) - } - sort.Ints(ids) - - ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} - for _, id := range ids { - e := m[int32(id)] - // Remove the wire type and field number varint, as well as the length varint. - msg := skipVarint(skipVarint(e.enc)) - - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: Int32(int32(id)), - Message: msg, - }) - } - return Marshal(ms) -} - -// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSet(buf []byte, m map[int32]Extension) error { - ms := new(messageSet) - if err := Unmarshal(buf, ms); err != nil { - return err - } - for _, item := range ms.Item { - id := *item.TypeId - msg := item.Message - - // Restore wire type and field number varint, plus length varint. - // Be careful to preserve duplicate items. - b := EncodeVarint(uint64(id)<<3 | WireBytes) - if ext, ok := m[id]; ok { - // Existing data; rip off the tag and length varint - // so we join the new data correctly. - // We can assume that ext.enc is set because we are unmarshaling. - o := ext.enc[len(b):] // skip wire type and field number - _, n := DecodeVarint(o) // calculate length of length varint - o = o[n:] // skip length varint - msg = append(o, msg...) // join old data and new data - } - b = append(b, EncodeVarint(uint64(len(msg)))...) - b = append(b, msg...) - - m[id] = Extension{enc: b} - } - return nil -} - -// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. -// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSetJSON(m map[int32]Extension) ([]byte, error) { - var b bytes.Buffer - b.WriteByte('{') - - // Process the map in key order for deterministic output. - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) // int32Slice defined in text.go - - for i, id := range ids { - ext := m[id] - if i > 0 { - b.WriteByte(',') - } - - msd, ok := messageSetMap[id] - if !ok { - // Unknown type; we can't render it, so skip it. - continue - } - fmt.Fprintf(&b, `"[%s]":`, msd.name) - - x := ext.value - if x == nil { - x = reflect.New(msd.t.Elem()).Interface() - if err := Unmarshal(ext.enc, x.(Message)); err != nil { - return nil, err - } - } - d, err := json.Marshal(x) - if err != nil { - return nil, err - } - b.Write(d) - } - b.WriteByte('}') - return b.Bytes(), nil -} - -// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. -// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSetJSON(buf []byte, m map[int32]Extension) error { - // Common-case fast path. - if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { - return nil - } - - // This is fairly tricky, and it's not clear that it is needed. - return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") -} - -// A global registry of types that can be used in a MessageSet. - -var messageSetMap = make(map[int32]messageSetDesc) - -type messageSetDesc struct { - t reflect.Type // pointer to struct - name string -} - -// RegisterMessageSetType is called from the generated code. -func RegisterMessageSetType(m Message, fieldNum int32, name string) { - messageSetMap[fieldNum] = messageSetDesc{ - t: reflect.TypeOf(m), - name: name, - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set_test.go deleted file mode 100644 index ab8ac2f0eb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/message_set_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "bytes" - "testing" -) - -func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { - // Check that a repeated message set entry will be concatenated. - in := &messageSet{ - Item: []*_MessageSet_Item{ - {TypeId: Int32(12345), Message: []byte("hoo")}, - {TypeId: Int32(12345), Message: []byte("hah")}, - }, - } - b, err := Marshal(in) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - t.Logf("Marshaled bytes: %q", b) - - m := make(map[int32]Extension) - if err := UnmarshalMessageSet(b, m); err != nil { - t.Fatalf("UnmarshalMessageSet: %v", err) - } - ext, ok := m[12345] - if !ok { - t.Fatalf("Didn't retrieve extension 12345; map is %v", m) - } - // Skip wire type/field number and length varints. - got := skipVarint(skipVarint(ext.enc)) - if want := []byte("hoohah"); !bytes.Equal(got, want) { - t.Errorf("Combined extension is %q, want %q", got, want) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_reflect.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_reflect.go deleted file mode 100644 index 749919d250..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_reflect.go +++ /dev/null @@ -1,479 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build appengine - -// This file contains an implementation of proto field accesses using package reflect. -// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can -// be used on App Engine. - -package proto - -import ( - "math" - "reflect" -) - -// A structPointer is a pointer to a struct. -type structPointer struct { - v reflect.Value -} - -// toStructPointer returns a structPointer equivalent to the given reflect value. -// The reflect value must itself be a pointer to a struct. -func toStructPointer(v reflect.Value) structPointer { - return structPointer{v} -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p.v.IsNil() -} - -// Interface returns the struct pointer as an interface value. -func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { - return p.v.Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by the sequence of field indices -// passed to reflect's FieldByIndex. -type field []int - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return f.Index -} - -// invalidField is an invalid field identifier. -var invalidField = field(nil) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { return f != nil } - -// field returns the given field in the struct as a reflect value. -func structPointer_field(p structPointer, f field) reflect.Value { - // Special case: an extension map entry with a value of type T - // passes a *T to the struct-handling code with a zero field, - // expecting that it will be treated as equivalent to *struct{ X T }, - // which has the same memory layout. We have to handle that case - // specially, because reflect will panic if we call FieldByIndex on a - // non-struct. - if f == nil { - return p.v.Elem() - } - - return p.v.Elem().FieldByIndex(f) -} - -// ifield returns the given field in the struct as an interface value. -func structPointer_ifield(p structPointer, f field) interface{} { - return structPointer_field(p, f).Addr().Interface() -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return structPointer_ifield(p, f).(*[]byte) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return structPointer_ifield(p, f).(*[][]byte) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return structPointer_ifield(p, f).(**bool) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return structPointer_ifield(p, f).(*bool) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return structPointer_ifield(p, f).(*[]bool) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return structPointer_ifield(p, f).(**string) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return structPointer_ifield(p, f).(*string) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return structPointer_ifield(p, f).(*[]string) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return structPointer_ifield(p, f).(*map[int32]Extension) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return structPointer_field(p, f).Addr() -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - structPointer_field(p, f).Set(q.v) -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return structPointer{structPointer_field(p, f)} -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { - return structPointerSlice{structPointer_field(p, f)} -} - -// A structPointerSlice represents the address of a slice of pointers to structs -// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. -type structPointerSlice struct { - v reflect.Value -} - -func (p structPointerSlice) Len() int { return p.v.Len() } -func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } -func (p structPointerSlice) Append(q structPointer) { - p.v.Set(reflect.Append(p.v, q.v)) -} - -var ( - int32Type = reflect.TypeOf(int32(0)) - uint32Type = reflect.TypeOf(uint32(0)) - float32Type = reflect.TypeOf(float32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float64Type = reflect.TypeOf(float64(0)) -) - -// A word32 represents a field of type *int32, *uint32, *float32, or *enum. -// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. -type word32 struct { - v reflect.Value -} - -// IsNil reports whether p is nil. -func word32_IsNil(p word32) bool { - return p.v.IsNil() -} - -// Set sets p to point at a newly allocated word with bits set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - t := p.v.Type().Elem() - switch t { - case int32Type: - if len(o.int32s) == 0 { - o.int32s = make([]int32, uint32PoolSize) - } - o.int32s[0] = int32(x) - p.v.Set(reflect.ValueOf(&o.int32s[0])) - o.int32s = o.int32s[1:] - return - case uint32Type: - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - p.v.Set(reflect.ValueOf(&o.uint32s[0])) - o.uint32s = o.uint32s[1:] - return - case float32Type: - if len(o.float32s) == 0 { - o.float32s = make([]float32, uint32PoolSize) - } - o.float32s[0] = math.Float32frombits(x) - p.v.Set(reflect.ValueOf(&o.float32s[0])) - o.float32s = o.float32s[1:] - return - } - - // must be enum - p.v.Set(reflect.New(t)) - p.v.Elem().SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32_Get(p word32) uint32 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32{structPointer_field(p, f)} -} - -// A word32Val represents a field of type int32, uint32, float32, or enum. -// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. -type word32Val struct { - v reflect.Value -} - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - switch p.v.Type() { - case int32Type: - p.v.SetInt(int64(x)) - return - case uint32Type: - p.v.SetUint(uint64(x)) - return - case float32Type: - p.v.SetFloat(float64(math.Float32frombits(x))) - return - } - - // must be enum - p.v.SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32Val_Get(p word32Val) uint32 { - elem := p.v - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val{structPointer_field(p, f)} -} - -// A word32Slice is a slice of 32-bit values. -// That is, v.Type() is []int32, []uint32, []float32, or []enum. -type word32Slice struct { - v reflect.Value -} - -func (p word32Slice) Append(x uint32) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int32: - elem.SetInt(int64(int32(x))) - case reflect.Uint32: - elem.SetUint(uint64(x)) - case reflect.Float32: - elem.SetFloat(float64(math.Float32frombits(x))) - } -} - -func (p word32Slice) Len() int { - return p.v.Len() -} - -func (p word32Slice) Index(i int) uint32 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) word32Slice { - return word32Slice{structPointer_field(p, f)} -} - -// word64 is like word32 but for 64-bit values. -type word64 struct { - v reflect.Value -} - -func word64_Set(p word64, o *Buffer, x uint64) { - t := p.v.Type().Elem() - switch t { - case int64Type: - if len(o.int64s) == 0 { - o.int64s = make([]int64, uint64PoolSize) - } - o.int64s[0] = int64(x) - p.v.Set(reflect.ValueOf(&o.int64s[0])) - o.int64s = o.int64s[1:] - return - case uint64Type: - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - p.v.Set(reflect.ValueOf(&o.uint64s[0])) - o.uint64s = o.uint64s[1:] - return - case float64Type: - if len(o.float64s) == 0 { - o.float64s = make([]float64, uint64PoolSize) - } - o.float64s[0] = math.Float64frombits(x) - p.v.Set(reflect.ValueOf(&o.float64s[0])) - o.float64s = o.float64s[1:] - return - } - panic("unreachable") -} - -func word64_IsNil(p word64) bool { - return p.v.IsNil() -} - -func word64_Get(p word64) uint64 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64{structPointer_field(p, f)} -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val struct { - v reflect.Value -} - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - switch p.v.Type() { - case int64Type: - p.v.SetInt(int64(x)) - return - case uint64Type: - p.v.SetUint(x) - return - case float64Type: - p.v.SetFloat(math.Float64frombits(x)) - return - } - panic("unreachable") -} - -func word64Val_Get(p word64Val) uint64 { - elem := p.v - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val{structPointer_field(p, f)} -} - -type word64Slice struct { - v reflect.Value -} - -func (p word64Slice) Append(x uint64) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int64: - elem.SetInt(int64(int64(x))) - case reflect.Uint64: - elem.SetUint(uint64(x)) - case reflect.Float64: - elem.SetFloat(float64(math.Float64frombits(x))) - } -} - -func (p word64Slice) Len() int { - return p.v.Len() -} - -func (p word64Slice) Index(i int) uint64 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return uint64(elem.Uint()) - case reflect.Float64: - return math.Float64bits(float64(elem.Float())) - } - panic("unreachable") -} - -func structPointer_Word64Slice(p structPointer, f field) word64Slice { - return word64Slice{structPointer_field(p, f)} -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe.go deleted file mode 100644 index e9be0fe92e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe.go +++ /dev/null @@ -1,266 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build !appengine - -// This file contains the implementation of the proto field accesses using package unsafe. - -package proto - -import ( - "reflect" - "unsafe" -) - -// NOTE: These type_Foo functions would more idiomatically be methods, -// but Go does not allow methods on pointer types, and we must preserve -// some pointer type for the garbage collector. We use these -// funcs with clunky names as our poor approximation to methods. -// -// An alternative would be -// type structPointer struct { p unsafe.Pointer } -// but that does not registerize as well. - -// A structPointer is a pointer to a struct. -type structPointer unsafe.Pointer - -// toStructPointer returns a structPointer equivalent to the given reflect value. -func toStructPointer(v reflect.Value) structPointer { - return structPointer(unsafe.Pointer(v.Pointer())) -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p == nil -} - -// Interface returns the struct pointer, assumed to have element type t, -// as an interface value. -func structPointer_Interface(p structPointer, t reflect.Type) interface{} { - return reflect.NewAt(t, unsafe.Pointer(p)).Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by its byte offset from the start of the struct. -type field uintptr - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return field(f.Offset) -} - -// invalidField is an invalid field identifier. -const invalidField = ^field(0) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { - return f != ^field(0) -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { - return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). -type structPointerSlice []structPointer - -func (v *structPointerSlice) Len() int { return len(*v) } -func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } -func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } - -// A word32 is the address of a "pointer to 32-bit value" field. -type word32 **uint32 - -// IsNil reports whether *v is nil. -func word32_IsNil(p word32) bool { - return *p == nil -} - -// Set sets *v to point at a newly allocated word set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - *p = &o.uint32s[0] - o.uint32s = o.uint32s[1:] -} - -// Get gets the value pointed at by *v. -func word32_Get(p word32) uint32 { - return **p -} - -// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Val is the address of a 32-bit value field. -type word32Val *uint32 - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - *p = x -} - -// Get gets the value pointed at by p. -func word32Val_Get(p word32Val) uint32 { - return *p -} - -// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Slice is a slice of 32-bit values. -type word32Slice []uint32 - -func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } -func (v *word32Slice) Len() int { return len(*v) } -func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } - -// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) *word32Slice { - return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// word64 is like word32 but for 64-bit values. -type word64 **uint64 - -func word64_Set(p word64, o *Buffer, x uint64) { - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - *p = &o.uint64s[0] - o.uint64s = o.uint64s[1:] -} - -func word64_IsNil(p word64) bool { - return *p == nil -} - -func word64_Get(p word64) uint64 { - return **p -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val *uint64 - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - *p = x -} - -func word64Val_Get(p word64Val) uint64 { - return *p -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Slice is like word32Slice but for 64-bit values. -type word64Slice []uint64 - -func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } -func (v *word64Slice) Len() int { return len(*v) } -func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } - -func structPointer_Word64Slice(p structPointer, f field) *word64Slice { - return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe_gogo.go deleted file mode 100644 index 6bc85fa987..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/pointer_unsafe_gogo.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build !appengine - -// This file contains the implementation of the proto field accesses using package unsafe. - -package proto - -import ( - "reflect" - "unsafe" -) - -func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} { - point := unsafe.Pointer(uintptr(p) + uintptr(f)) - r := reflect.NewAt(t, point) - return r.Interface() -} - -func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} { - point := unsafe.Pointer(uintptr(p) + uintptr(f)) - r := reflect.NewAt(t, point) - if r.Elem().IsNil() { - return nil - } - return r.Elem().Interface() -} - -func copyUintPtr(oldptr, newptr uintptr, size int) { - oldbytes := make([]byte, 0) - oldslice := (*reflect.SliceHeader)(unsafe.Pointer(&oldbytes)) - oldslice.Data = oldptr - oldslice.Len = size - oldslice.Cap = size - newbytes := make([]byte, 0) - newslice := (*reflect.SliceHeader)(unsafe.Pointer(&newbytes)) - newslice.Data = newptr - newslice.Len = size - newslice.Cap = size - copy(newbytes, oldbytes) -} - -func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { - copyUintPtr(uintptr(oldptr), uintptr(newptr), size) -} - -func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { - size := typ.Elem().Size() - oldHeader := structPointer_GetSliceHeader(base, f) - newLen := oldHeader.Len + 1 - slice := reflect.MakeSlice(typ, newLen, newLen) - bas := toStructPointer(slice) - for i := 0; i < oldHeader.Len; i++ { - newElemptr := uintptr(bas) + uintptr(i)*size - oldElemptr := oldHeader.Data + uintptr(i)*size - copyUintPtr(oldElemptr, newElemptr, int(size)) - } - - oldHeader.Data = uintptr(bas) - oldHeader.Len = newLen - oldHeader.Cap = newLen - - return structPointer(unsafe.Pointer(uintptr(unsafe.Pointer(bas)) + uintptr(uintptr(newLen-1)*size))) -} - -func structPointer_FieldPointer(p structPointer, f field) structPointer { - return structPointer(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_GetRefStructPointer(p structPointer, f field) structPointer { - return structPointer((*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader { - return (*reflect.SliceHeader)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_Add(p structPointer, size field) structPointer { - return structPointer(unsafe.Pointer(uintptr(p) + uintptr(size))) -} - -func structPointer_Len(p structPointer, f field) int { - return len(*(*[]interface{})(unsafe.Pointer(structPointer_GetRefStructPointer(p, f)))) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties.go deleted file mode 100644 index 4711057e2b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties.go +++ /dev/null @@ -1,915 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "fmt" - "log" - "os" - "reflect" - "sort" - "strconv" - "strings" - "sync" -) - -const debug bool = false - -// Constants that identify the encoding of a value on the wire. -const ( - WireVarint = 0 - WireFixed64 = 1 - WireBytes = 2 - WireStartGroup = 3 - WireEndGroup = 4 - WireFixed32 = 5 -) - -const startSize = 10 // initial slice/string sizes - -// Encoders are defined in encode.go -// An encoder outputs the full representation of a field, including its -// tag and encoder type. -type encoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueEncoder encodes a single integer in a particular encoding. -type valueEncoder func(o *Buffer, x uint64) error - -// Sizers are defined in encode.go -// A sizer returns the encoded size of a field, including its tag and encoder -// type. -type sizer func(prop *Properties, base structPointer) int - -// A valueSizer returns the encoded size of a single integer in a particular -// encoding. -type valueSizer func(x uint64) int - -// Decoders are defined in decode.go -// A decoder creates a value from its wire representation. -// Unrecognized subelements are saved in unrec. -type decoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueDecoder decodes a single integer in a particular encoding. -type valueDecoder func(o *Buffer) (x uint64, err error) - -// A oneofMarshaler does the marshaling for all oneof fields in a message. -type oneofMarshaler func(Message, *Buffer) error - -// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. -type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) - -// tagMap is an optimization over map[int]int for typical protocol buffer -// use-cases. Encoded protocol buffers are often in tag order with small tag -// numbers. -type tagMap struct { - fastTags []int - slowTags map[int]int -} - -// tagMapFastLimit is the upper bound on the tag number that will be stored in -// the tagMap slice rather than its map. -const tagMapFastLimit = 1024 - -func (p *tagMap) get(t int) (int, bool) { - if t > 0 && t < tagMapFastLimit { - if t >= len(p.fastTags) { - return 0, false - } - fi := p.fastTags[t] - return fi, fi >= 0 - } - fi, ok := p.slowTags[t] - return fi, ok -} - -func (p *tagMap) put(t int, fi int) { - if t > 0 && t < tagMapFastLimit { - for len(p.fastTags) < t+1 { - p.fastTags = append(p.fastTags, -1) - } - p.fastTags[t] = fi - return - } - if p.slowTags == nil { - p.slowTags = make(map[int]int) - } - p.slowTags[t] = fi -} - -// StructProperties represents properties for all the fields of a struct. -// decoderTags and decoderOrigNames should only be used by the decoder. -type StructProperties struct { - Prop []*Properties // properties for each field - reqCount int // required count - decoderTags tagMap // map from proto tag to struct field number - decoderOrigNames map[string]int // map from original name to struct field number - order []int // list of struct field numbers in tag order - unrecField field // field id of the XXX_unrecognized []byte field - extendable bool // is this an extendable proto - - oneofMarshaler oneofMarshaler - oneofUnmarshaler oneofUnmarshaler - stype reflect.Type - - // OneofTypes contains information about the oneof fields in this message. - // It is keyed by the original name of a field. - OneofTypes map[string]*OneofProperties -} - -// OneofProperties represents information about a specific field in a oneof. -type OneofProperties struct { - Type reflect.Type // pointer to generated struct type for this oneof field - Field int // struct field number of the containing oneof in the message - Prop *Properties -} - -// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. -// See encode.go, (*Buffer).enc_struct. - -func (sp *StructProperties) Len() int { return len(sp.order) } -func (sp *StructProperties) Less(i, j int) bool { - return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag -} -func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } - -// Properties represents the protocol-specific behavior of a single struct field. -type Properties struct { - Name string // name of the field, for error messages - OrigName string // original name before protocol compiler (always set) - Wire string - WireType int - Tag int - Required bool - Optional bool - Repeated bool - Packed bool // relevant for repeated primitives only - Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only - oneof bool // whether this is a oneof field - - Default string // default value - HasDefault bool // whether an explicit default was provided - CustomType string - def_uint64 uint64 - - enc encoder - valEnc valueEncoder // set for bool and numeric types only - field field - tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) - tagbuf [8]byte - stype reflect.Type // set for struct types only - sstype reflect.Type // set for slices of structs types only - ctype reflect.Type // set for custom types only - sprop *StructProperties // set for struct types only - isMarshaler bool - isUnmarshaler bool - - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only - - size sizer - valSize valueSizer // set for bool and numeric types only - - dec decoder - valDec valueDecoder // set for bool and numeric types only - - // If this is a packable field, this will be the decoder for the packed version of the field. - packedDec decoder -} - -// String formats the properties in the protobuf struct field tag style. -func (p *Properties) String() string { - s := p.Wire - s = "," - s += strconv.Itoa(p.Tag) - if p.Required { - s += ",req" - } - if p.Optional { - s += ",opt" - } - if p.Repeated { - s += ",rep" - } - if p.Packed { - s += ",packed" - } - if p.OrigName != p.Name { - s += ",name=" + p.OrigName - } - if p.proto3 { - s += ",proto3" - } - if p.oneof { - s += ",oneof" - } - if len(p.Enum) > 0 { - s += ",enum=" + p.Enum - } - if p.HasDefault { - s += ",def=" + p.Default - } - return s -} - -// Parse populates p by parsing a string in the protobuf struct field tag style. -func (p *Properties) Parse(s string) { - // "bytes,49,opt,name=foo,def=hello!" - fields := strings.Split(s, ",") // breaks def=, but handled below. - if len(fields) < 2 { - fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) - return - } - - p.Wire = fields[0] - switch p.Wire { - case "varint": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeVarint - p.valDec = (*Buffer).DecodeVarint - p.valSize = sizeVarint - case "fixed32": - p.WireType = WireFixed32 - p.valEnc = (*Buffer).EncodeFixed32 - p.valDec = (*Buffer).DecodeFixed32 - p.valSize = sizeFixed32 - case "fixed64": - p.WireType = WireFixed64 - p.valEnc = (*Buffer).EncodeFixed64 - p.valDec = (*Buffer).DecodeFixed64 - p.valSize = sizeFixed64 - case "zigzag32": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag32 - p.valDec = (*Buffer).DecodeZigzag32 - p.valSize = sizeZigzag32 - case "zigzag64": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag64 - p.valDec = (*Buffer).DecodeZigzag64 - p.valSize = sizeZigzag64 - case "bytes", "group": - p.WireType = WireBytes - // no numeric converter for non-numeric types - default: - fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) - return - } - - var err error - p.Tag, err = strconv.Atoi(fields[1]) - if err != nil { - return - } - - for i := 2; i < len(fields); i++ { - f := fields[i] - switch { - case f == "req": - p.Required = true - case f == "opt": - p.Optional = true - case f == "rep": - p.Repeated = true - case f == "packed": - p.Packed = true - case strings.HasPrefix(f, "name="): - p.OrigName = f[5:] - case strings.HasPrefix(f, "enum="): - p.Enum = f[5:] - case f == "proto3": - p.proto3 = true - case f == "oneof": - p.oneof = true - case strings.HasPrefix(f, "def="): - p.HasDefault = true - p.Default = f[4:] // rest of string - if i+1 < len(fields) { - // Commas aren't escaped, and def is always last. - p.Default += "," + strings.Join(fields[i+1:], ",") - break - } - case strings.HasPrefix(f, "embedded="): - p.OrigName = strings.Split(f, "=")[1] - case strings.HasPrefix(f, "customtype="): - p.CustomType = strings.Split(f, "=")[1] - } - } -} - -func logNoSliceEnc(t1, t2 reflect.Type) { - fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) -} - -var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() - -// Initialize the fields for encoding and decoding. -func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - p.enc = nil - p.dec = nil - p.size = nil - if len(p.CustomType) > 0 { - p.setCustomEncAndDec(typ) - p.setTag(lockGetProp) - return - } - switch t1 := typ; t1.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) - - // proto3 scalar types - - case reflect.Bool: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_proto3_bool - } else { - p.enc = (*Buffer).enc_ref_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_ref_bool - } - case reflect.Int32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_int32 - } else { - p.enc = (*Buffer).enc_ref_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_ref_int32 - } - case reflect.Uint32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_proto3_uint32 - } else { - p.enc = (*Buffer).enc_ref_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_ref_uint32 - } - case reflect.Int64, reflect.Uint64: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - } else { - p.enc = (*Buffer).enc_ref_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_ref_int64 - } - case reflect.Float32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_uint32 - } else { - p.enc = (*Buffer).enc_ref_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_ref_uint32 - } - case reflect.Float64: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - } else { - p.enc = (*Buffer).enc_ref_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_ref_int64 - } - case reflect.String: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_proto3_string - } else { - p.enc = (*Buffer).enc_ref_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_ref_string - } - case reflect.Struct: - p.stype = typ - p.isMarshaler = isMarshaler(typ) - p.isUnmarshaler = isUnmarshaler(typ) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_ref_struct_message - p.dec = (*Buffer).dec_ref_struct_message - p.size = size_ref_struct_message - } else { - fmt.Fprintf(os.Stderr, "proto: no coders for struct %T\n", typ) - } - - case reflect.Ptr: - switch t2 := t1.Elem(); t2.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) - break - case reflect.Bool: - p.enc = (*Buffer).enc_bool - p.dec = (*Buffer).dec_bool - p.size = size_bool - case reflect.Int32: - p.enc = (*Buffer).enc_int32 - p.dec = (*Buffer).dec_int32 - p.size = size_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_uint32 - p.dec = (*Buffer).dec_int32 // can reuse - p.size = size_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_int64 - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_int32 - p.size = size_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_int64 // can just treat them as bits - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.String: - p.enc = (*Buffer).enc_string - p.dec = (*Buffer).dec_string - p.size = size_string - case reflect.Struct: - p.stype = t1.Elem() - p.isMarshaler = isMarshaler(t1) - p.isUnmarshaler = isUnmarshaler(t1) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_struct_message - p.dec = (*Buffer).dec_struct_message - p.size = size_struct_message - } else { - p.enc = (*Buffer).enc_struct_group - p.dec = (*Buffer).dec_struct_group - p.size = size_struct_group - } - } - - case reflect.Slice: - switch t2 := t1.Elem(); t2.Kind() { - default: - logNoSliceEnc(t1, t2) - break - case reflect.Bool: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_bool - p.size = size_slice_packed_bool - } else { - p.enc = (*Buffer).enc_slice_bool - p.size = size_slice_bool - } - p.dec = (*Buffer).dec_slice_bool - p.packedDec = (*Buffer).dec_slice_packed_bool - case reflect.Int32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int32 - p.size = size_slice_packed_int32 - } else { - p.enc = (*Buffer).enc_slice_int32 - p.size = size_slice_int32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Uint32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Int64, reflect.Uint64: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_byte - p.dec = (*Buffer).dec_slice_byte - p.size = size_slice_byte - // This is a []byte, which is either a bytes field, - // or the value of a map field. In the latter case, - // we always encode an empty []byte, so we should not - // use the proto3 enc/size funcs. - // f == nil iff this is the key/value of a map field. - if p.proto3 && f != nil { - p.enc = (*Buffer).enc_proto3_slice_byte - p.size = size_proto3_slice_byte - } - case reflect.Float32, reflect.Float64: - switch t2.Bits() { - case 32: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case 64: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - default: - logNoSliceEnc(t1, t2) - break - } - case reflect.String: - p.enc = (*Buffer).enc_slice_string - p.dec = (*Buffer).dec_slice_string - p.size = size_slice_string - case reflect.Ptr: - switch t3 := t2.Elem(); t3.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) - break - case reflect.Struct: - p.stype = t2.Elem() - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_slice_struct_message - p.dec = (*Buffer).dec_slice_struct_message - p.size = size_slice_struct_message - } else { - p.enc = (*Buffer).enc_slice_struct_group - p.dec = (*Buffer).dec_slice_struct_group - p.size = size_slice_struct_group - } - } - case reflect.Slice: - switch t2.Elem().Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) - break - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_slice_byte - p.dec = (*Buffer).dec_slice_slice_byte - p.size = size_slice_slice_byte - } - case reflect.Struct: - p.setSliceOfNonPointerStructs(t1) - } - - case reflect.Map: - p.enc = (*Buffer).enc_new_map - p.dec = (*Buffer).dec_new_map - p.size = size_new_map - - p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} - vtype := p.mtype.Elem() - if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { - // The value type is not a message (*T) or bytes ([]byte), - // so we need encoders for the pointer to this type. - vtype = reflect.PtrTo(vtype) - } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) - } - p.setTag(lockGetProp) -} - -func (p *Properties) setTag(lockGetProp bool) { - // precalculate tag code - wire := p.WireType - if p.Packed { - wire = WireBytes - } - x := uint32(p.Tag)<<3 | uint32(wire) - i := 0 - for i = 0; x > 127; i++ { - p.tagbuf[i] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - p.tagbuf[i] = uint8(x) - p.tagcode = p.tagbuf[0 : i+1] - - if p.stype != nil { - if lockGetProp { - p.sprop = GetProperties(p.stype) - } else { - p.sprop = getPropertiesLocked(p.stype) - } - } -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() -) - -// isMarshaler reports whether type t implements Marshaler. -func isMarshaler(t reflect.Type) bool { - return t.Implements(marshalerType) -} - -// isUnmarshaler reports whether type t implements Unmarshaler. -func isUnmarshaler(t reflect.Type) bool { - return t.Implements(unmarshalerType) -} - -// Init populates the properties from a protocol buffer struct tag. -func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { - p.init(typ, name, tag, f, true) -} - -func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { - // "bytes,49,opt,def=hello!" - p.Name = name - p.OrigName = name - if f != nil { - p.field = toField(f) - } - if tag == "" { - return - } - p.Parse(tag) - p.setEncAndDec(typ, f, lockGetProp) -} - -var ( - propertiesMu sync.RWMutex - propertiesMap = make(map[reflect.Type]*StructProperties) -) - -// GetProperties returns the list of properties for the type represented by t. -// t must represent a generated struct type of a protocol message. -func GetProperties(t reflect.Type) *StructProperties { - if t.Kind() != reflect.Struct { - panic("proto: type must have kind struct") - } - - // Most calls to GetProperties in a long-running program will be - // retrieving details for types we have seen before. - propertiesMu.RLock() - sprop, ok := propertiesMap[t] - propertiesMu.RUnlock() - if ok { - if collectStats { - stats.Chit++ - } - return sprop - } - - propertiesMu.Lock() - sprop = getPropertiesLocked(t) - propertiesMu.Unlock() - return sprop -} - -// getPropertiesLocked requires that propertiesMu is held. -func getPropertiesLocked(t reflect.Type) *StructProperties { - if prop, ok := propertiesMap[t]; ok { - if collectStats { - stats.Chit++ - } - return prop - } - if collectStats { - stats.Cmiss++ - } - - prop := new(StructProperties) - // in case of recursive protos, fill this in now. - propertiesMap[t] = prop - - // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) - prop.unrecField = invalidField - prop.Prop = make([]*Properties, t.NumField()) - prop.order = make([]int, t.NumField()) - - isOneofMessage := false - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - p := new(Properties) - name := f.Name - p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - - if f.Name == "XXX_extensions" { // special case - if len(f.Tag.Get("protobuf")) > 0 { - p.enc = (*Buffer).enc_ext_slice_byte - p.dec = nil // not needed - p.size = size_ext_slice_byte - } else { - p.enc = (*Buffer).enc_map - p.dec = nil // not needed - p.size = size_map - } - } - if f.Name == "XXX_unrecognized" { // special case - prop.unrecField = toField(&f) - } - oneof := f.Tag.Get("protobuf_oneof") != "" // special case - if oneof { - isOneofMessage = true - } - prop.Prop[i] = p - prop.order[i] = i - if debug { - print(i, " ", f.Name, " ", t.String(), " ") - if p.Tag > 0 { - print(p.String()) - } - print("\n") - } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && !oneof { - fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") - } - } - - // Re-order prop.order. - sort.Sort(prop) - - type oneofMessage interface { - XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), []interface{}) - } - if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { - var oots []interface{} - prop.oneofMarshaler, prop.oneofUnmarshaler, oots = om.XXX_OneofFuncs() - prop.stype = t - - // Interpret oneof metadata. - prop.OneofTypes = make(map[string]*OneofProperties) - for _, oot := range oots { - oop := &OneofProperties{ - Type: reflect.ValueOf(oot).Type(), // *T - Prop: new(Properties), - } - sft := oop.Type.Elem().Field(0) - oop.Prop.Name = sft.Name - oop.Prop.Parse(sft.Tag.Get("protobuf")) - // There will be exactly one interface field that - // this new value is assignable to. - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type.Kind() != reflect.Interface { - continue - } - if !oop.Type.AssignableTo(f.Type) { - continue - } - oop.Field = i - break - } - prop.OneofTypes[oop.Prop.OrigName] = oop - } - } - - // build required counts - // build tags - reqCount := 0 - prop.decoderOrigNames = make(map[string]int) - for i, p := range prop.Prop { - if strings.HasPrefix(p.Name, "XXX_") { - // Internal fields should not appear in tags/origNames maps. - // They are handled specially when encoding and decoding. - continue - } - if p.Required { - reqCount++ - } - prop.decoderTags.put(p.Tag, i) - prop.decoderOrigNames[p.OrigName] = i - } - prop.reqCount = reqCount - - return prop -} - -// Return the Properties object for the x[0]'th field of the structure. -func propByIndex(t reflect.Type, x []int) *Properties { - if len(x) != 1 { - fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) - return nil - } - prop := GetProperties(t) - return prop.Prop[x[0]] -} - -// Get the address and type of a pointer to a struct from an interface. -func getbase(pb Message) (t reflect.Type, b structPointer, err error) { - if pb == nil { - err = ErrNil - return - } - // get the reflect type of the pointer to the struct. - t = reflect.TypeOf(pb) - // get the address of the struct. - value := reflect.ValueOf(pb) - b = toStructPointer(value) - return -} - -// A global registry of enum types. -// The generated code will register the generated maps by calling RegisterEnum. - -var enumValueMaps = make(map[string]map[string]int32) -var enumStringMaps = make(map[string]map[int32]string) - -// RegisterEnum is called from the generated code to install the enum descriptor -// maps into the global table to aid parsing text format protocol buffers. -func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { - if _, ok := enumValueMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumValueMaps[typeName] = valueMap - if _, ok := enumStringMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumStringMaps[typeName] = unusedNameMap -} - -// EnumValueMap returns the mapping from names to integers of the -// enum type enumType, or a nil if not found. -func EnumValueMap(enumType string) map[string]int32 { - return enumValueMaps[enumType] -} - -// A registry of all linked message types. -// The string is a fully-qualified proto name ("pkg.Message"). -var ( - protoTypes = make(map[string]reflect.Type) - revProtoTypes = make(map[reflect.Type]string) -) - -// RegisterType is called from generated code and maps from the fully qualified -// proto name to the type (pointer to struct) of the protocol buffer. -func RegisterType(x Message, name string) { - if _, ok := protoTypes[name]; ok { - // TODO: Some day, make this a panic. - log.Printf("proto: duplicate proto type registered: %s", name) - return - } - t := reflect.TypeOf(x) - protoTypes[name] = t - revProtoTypes[t] = name -} - -// MessageName returns the fully-qualified proto name for the given message type. -func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } - -// MessageType returns the message type (pointer to struct) for a named message. -func MessageType(name string) reflect.Type { return protoTypes[name] } diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties_gogo.go deleted file mode 100644 index 8daf9f7768..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/properties_gogo.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "fmt" - "os" - "reflect" -) - -func (p *Properties) setCustomEncAndDec(typ reflect.Type) { - p.ctype = typ - if p.Repeated { - p.enc = (*Buffer).enc_custom_slice_bytes - p.dec = (*Buffer).dec_custom_slice_bytes - p.size = size_custom_slice_bytes - } else if typ.Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_custom_bytes - p.dec = (*Buffer).dec_custom_bytes - p.size = size_custom_bytes - } else { - p.enc = (*Buffer).enc_custom_ref_bytes - p.dec = (*Buffer).dec_custom_ref_bytes - p.size = size_custom_ref_bytes - } -} - -func (p *Properties) setSliceOfNonPointerStructs(typ reflect.Type) { - t2 := typ.Elem() - p.sstype = typ - p.stype = t2 - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - p.enc = (*Buffer).enc_slice_ref_struct_message - p.dec = (*Buffer).dec_slice_ref_struct_message - p.size = size_slice_ref_struct_message - if p.Wire != "bytes" { - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T \n", typ, t2) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.pb.go deleted file mode 100644 index 0de701e889..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.pb.go +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3_proto/proto3.proto -// DO NOT EDIT! - -/* -Package proto3_proto is a generated protocol buffer package. - -It is generated from these files: - proto3_proto/proto3.proto - -It has these top-level messages: - Message - Nested - MessageWithMap -*/ -package proto3_proto - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import testdata "github.com/gogo/protobuf/proto/testdata" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Message_Humour int32 - -const ( - Message_UNKNOWN Message_Humour = 0 - Message_PUNS Message_Humour = 1 - Message_SLAPSTICK Message_Humour = 2 - Message_BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -func (x Message_Humour) String() string { - return proto.EnumName(Message_Humour_name, int32(x)) -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} - -func (m *Message) GetNested() *Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *Message) GetTerrain() map[string]*Nested { - if m != nil { - return m.Terrain - } - return nil -} - -func (m *Message) GetProto2Field() *testdata.SubDefaults { - if m != nil { - return m.Proto2Field - } - return nil -} - -func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults { - if m != nil { - return m.Proto2Value - } - return nil -} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (m *Nested) String() string { return proto.CompactTextString(m) } -func (*Nested) ProtoMessage() {} - -type MessageWithMap struct { - ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func init() { - proto.RegisterType((*Message)(nil), "proto3_proto.Message") - proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") - proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") - proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.proto deleted file mode 100644 index ca670015a2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_proto/proto3.proto +++ /dev/null @@ -1,68 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package proto3_proto; - -import "github.com/gogo/protobuf/proto/testdata/test.proto"; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - testdata.SubDefaults proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -message MessageWithMap { - map byte_mapping = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_test.go deleted file mode 100644 index 6f9cddc3fa..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/proto3_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/proto/proto3_proto" - tpb "github.com/gogo/protobuf/proto/testdata" -) - -func TestProto3ZeroValues(t *testing.T) { - tests := []struct { - desc string - m proto.Message - }{ - {"zero message", &pb.Message{}}, - {"empty bytes field", &pb.Message{Data: []byte{}}}, - } - for _, test := range tests { - b, err := proto.Marshal(test.m) - if err != nil { - t.Errorf("%s: proto.Marshal: %v", test.desc, err) - continue - } - if len(b) > 0 { - t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) - } - } -} - -func TestRoundTripProto3(t *testing.T) { - m := &pb.Message{ - Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" - Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 - HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 - Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" - ResultCount: 47, // (0 | 7<<3): 0x38 0x2f - TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 - Score: 8.1, // (5 | 9<<3): 0x4d <8.1> - - Key: []uint64{1, 0xdeadbeef}, - Nested: &pb.Nested{ - Bunny: "Monty", - }, - } - t.Logf(" m: %v", m) - - b, err := proto.Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal: %v", err) - } - t.Logf(" b: %q", b) - - m2 := new(pb.Message) - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatalf("proto.Unmarshal: %v", err) - } - t.Logf("m2: %v", m2) - - if !proto.Equal(m, m2) { - t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) - } -} - -func TestProto3SetDefaults(t *testing.T) { - in := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: new(tpb.SubDefaults), - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": new(tpb.SubDefaults), - }, - } - - got := proto.Clone(in).(*pb.Message) - proto.SetDefaults(got) - - // There are no defaults in proto3. Everything should be the zero value, but - // we need to remember to set defaults for nested proto2 messages. - want := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": {N: proto.Int64(7)}, - }, - } - - if !proto.Equal(got, want) { - t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size2_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size2_test.go deleted file mode 100644 index a2729c39a1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size2_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "testing" -) - -// This is a separate file and package from size_test.go because that one uses -// generated messages and thus may not be in package proto without having a circular -// dependency, whereas this file tests unexported details of size.go. - -func TestVarintSize(t *testing.T) { - // Check the edge cases carefully. - testCases := []struct { - n uint64 - size int - }{ - {0, 1}, - {1, 1}, - {127, 1}, - {128, 2}, - {16383, 2}, - {16384, 3}, - {1<<63 - 1, 9}, - {1 << 63, 10}, - } - for _, tc := range testCases { - size := sizeVarint(tc.n) - if size != tc.size { - t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size_test.go deleted file mode 100644 index f4b8b8e3a0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/size_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "log" - "strings" - "testing" - - . "github.com/gogo/protobuf/proto" - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} - -// messageWithExtension2 is in equal_test.go. -var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} - -func init() { - if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { - log.Panicf("SetExtension: %v", err) - } - if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { - log.Panicf("SetExtension: %v", err) - } - - // Force messageWithExtension3 to have the extension encoded. - Marshal(messageWithExtension3) - -} - -var SizeTests = []struct { - desc string - pb Message -}{ - {"empty", &pb.OtherMessage{}}, - // Basic types. - {"bool", &pb.Defaults{F_Bool: Bool(true)}}, - {"int32", &pb.Defaults{F_Int32: Int32(12)}}, - {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, - {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, - {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, - {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, - {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, - {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, - {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, - {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, - {"float", &pb.Defaults{F_Float: Float32(12.6)}}, - {"double", &pb.Defaults{F_Double: Float64(13.9)}}, - {"string", &pb.Defaults{F_String: String("niles")}}, - {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, - {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, - {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, - {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, - {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, - // Repeated. - {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, - {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, - {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, - {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, - {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, - {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ - // Need enough large numbers to verify that the header is counting the number of bytes - // for the field, not the number of elements. - 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, - 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, - }}}, - {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, - {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, - // Nested. - {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, - {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, - // Other things. - {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, - {"extension (unencoded)", messageWithExtension1}, - {"extension (encoded)", messageWithExtension3}, - // proto3 message - {"proto3 empty", &proto3pb.Message{}}, - {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, - {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, - {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, - {"proto3 float", &proto3pb.Message{Score: 12.6}}, - {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, - {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, - {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, - {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: {}}}}, - - {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, - {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: {F: Float64(2.0)}}}}, - {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, - {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: {}}}}, - - {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, - {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, - {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, - - {"oneof not set", &pb.Communique{}}, - {"oneof zero int32", &pb.Communique{Union: &pb.Communique_Number{Number: 0}}}, - {"oneof int32", &pb.Communique{Union: &pb.Communique_Number{Number: 3}}}, - {"oneof string", &pb.Communique{Union: &pb.Communique_Name{Name: "Rhythmic Fman"}}}, -} - -func TestSize(t *testing.T) { - for _, tc := range SizeTests { - size := Size(tc.pb) - b, err := Marshal(tc.pb) - if err != nil { - t.Errorf("%v: Marshal failed: %v", tc.desc, err) - continue - } - if size != len(b) { - t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) - t.Logf("%v: bytes: %#v", tc.desc, b) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/skip_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/skip_gogo.go deleted file mode 100644 index 4fe7e0815c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/skip_gogo.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "fmt" - "io" -) - -func Skip(data []byte) (n int, err error) { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for { - if index >= l { - return 0, io.ErrUnexpectedEOF - } - index++ - if data[index-1] < 0x80 { - break - } - } - return index, nil - case 1: - index += 8 - return index, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if index >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[index] - index++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - index += length - return index, nil - case 3: - for { - var innerWire uint64 - var start int = index - for shift := uint(0); ; shift += 7 { - if index >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[index] - index++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := Skip(data[start:]) - if err != nil { - return 0, err - } - index = start + next - } - return index, nil - case 4: - return index, nil - case 5: - index += 4 - return index, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/Makefile deleted file mode 100644 index 31d83277cc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -all: regenerate - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - protoc-min-version --version="3.0.0" --gogo_out=. test.proto - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/golden_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/golden_test.go deleted file mode 100644 index 8e84515377..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/golden_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Verify that the compiler output for test.proto is unchanged. - -package testdata - -import ( - "crypto/sha1" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "testing" -) - -// sum returns in string form (for easy comparison) the SHA-1 hash of the named file. -func sum(t *testing.T, name string) string { - data, err := ioutil.ReadFile(name) - if err != nil { - t.Fatal(err) - } - t.Logf("sum(%q): length is %d", name, len(data)) - hash := sha1.New() - _, err = hash.Write(data) - if err != nil { - t.Fatal(err) - } - return fmt.Sprintf("% x", hash.Sum(nil)) -} - -func run(t *testing.T, name string, args ...string) { - cmd := exec.Command(name, args...) - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - err := cmd.Run() - if err != nil { - t.Fatal(err) - } -} - -func TestGolden(t *testing.T) { - // Compute the original checksum. - goldenSum := sum(t, "test.pb.go") - // Run the proto compiler. - run(t, "protoc", "--gogo_out="+os.TempDir(), "test.proto") - newFile := filepath.Join(os.TempDir(), "test.pb.go") - defer os.Remove(newFile) - // Compute the new checksum. - newSum := sum(t, newFile) - // Verify - if newSum != goldenSum { - run(t, "diff", "-u", "test.pb.go", newFile) - t.Fatal("Code generated by protoc-gen-go has changed; update test.pb.go") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go deleted file mode 100644 index e92056955e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go +++ /dev/null @@ -1,2985 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test.proto -// DO NOT EDIT! - -/* -Package testdata is a generated protocol buffer package. - -It is generated from these files: - test.proto - -It has these top-level messages: - GoEnum - GoTestField - GoTest - GoSkipTest - NonPackedTest - PackedTest - MaxTag - OldMessage - NewMessage - InnerMessage - OtherMessage - MyMessage - Ext - DefaultsMessage - MyMessageSet - Empty - MessageList - Strings - Defaults - SubDefaults - RepeatedEnum - MoreRepeated - GroupOld - GroupNew - FloatingPoint - MessageWithMap - Communique -*/ -package testdata - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type FOO int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} - -// An enum, for completeness. -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - // Basic types - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - // Groupings - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - // Table types - GoTest_TABLE GoTest_KIND = 11 - // Functions - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} - -type DefaultsMessage_DefaultsEnum int32 - -const ( - DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 - DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 - DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 -) - -var DefaultsMessage_DefaultsEnum_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", -} -var DefaultsMessage_DefaultsEnum_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, -} - -func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { - p := new(DefaultsMessage_DefaultsEnum) - *p = x - return p -} -func (x DefaultsMessage_DefaultsEnum) String() string { - return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) -} -func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") - if err != nil { - return err - } - *x = DefaultsMessage_DefaultsEnum(value) - return nil -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return FOO_FOO1 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req,name=Label" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req,name=Type" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - // Some typical parameters - Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt,name=Table" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt,name=Param" json:"Param,omitempty"` - // Required, repeated and optional foreign fields. - RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField" json:"OptionalField,omitempty"` - // Required fields of all basic types - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"` - // Repeated fields of all basic types - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"` - // Optional fields of all basic types - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"` - // Default-valued fields of all basic types - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - // Packed repeated fields (no string or bytes). - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return GoTest_VOID -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -// Required, repeated, and optional groups. -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } -func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RequiredGroup) ProtoMessage() {} - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } -func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RepeatedGroup) ProtoMessage() {} - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } -func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_OptionalGroup) ProtoMessage() {} - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } -func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest_SkipGroup) ProtoMessage() {} - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - // Maximum possible tag number. - LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *OldMessage) GetNum() int32 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - // This is an int32 in OldMessage. - Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *NewMessage) GetNum() int64 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner" json:"rep_inner,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"` - // This field becomes [][]byte in the generated code. - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (m *MyMessage) String() string { return proto.CompactTextString(m) } -func (*MyMessage) ProtoMessage() {} - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} -func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetRepInner() []*InnerMessage { - if m != nil { - return m.RepInner - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return MyMessage_RED -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } -func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*MyMessage_SomeGroup) ProtoMessage() {} - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", -} - -type DefaultsMessage struct { - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } -func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } -func (*DefaultsMessage) ProtoMessage() {} - -var extRange_DefaultsMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_DefaultsMessage -} -func (m *DefaultsMessage) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type MyMessageSet struct { - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } -func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } -func (*MyMessageSet) ProtoMessage() {} - -func (m *MyMessageSet) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(m.ExtensionMap()) -} -func (m *MyMessageSet) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) -} -func (m *MyMessageSet) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(m.XXX_extensions) -} -func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) -} - -// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*MyMessageSet)(nil) -var _ proto.Unmarshaler = (*MyMessageSet)(nil) - -var extRange_MyMessageSet = []proto.ExtensionRange{ - {100, 2147483646}, -} - -func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessageSet -} -func (m *MyMessageSet) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type Empty struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep,name=Message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } -func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } -func (*MessageList_Message) ProtoMessage() {} - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,name=F_String,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - // More fields with crazy defaults. - F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,def=nan" json:"F_Nan,omitempty"` - // Sub-message. - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - // Redundant but explicit defaults. - StrZero *string `protobuf:"bytes,19,opt,name=str_zero,def=" json:"str_zero,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -func (m *Defaults) GetStrZero() string { - if m != nil && m.StrZero != nil { - return *m.StrZero - } - return "" -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"` - Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed" json:"int64s_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetInt64SPacked() []int64 { - if m != nil { - return m.Int64SPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -func (m *MoreRepeated) GetFixeds() []uint32 { - if m != nil { - return m.Fixeds - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,101,opt,name=G" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } -func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } -func (*GroupOld_G) ProtoMessage() {} - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,101,opt,name=G" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } -func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } -func (*GroupNew_G) ProtoMessage() {} - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } -func (*FloatingPoint) ProtoMessage() {} - -func (m *FloatingPoint) GetF() float64 { - if m != nil && m.F != nil { - return *m.F - } - return 0 -} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} - -func (m *MessageWithMap) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func (m *MessageWithMap) GetStrToStr() map[string]string { - if m != nil { - return m.StrToStr - } - return nil -} - -type Communique struct { - MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry" json:"make_me_cry,omitempty"` - // This is a oneof, called "union". - // - // Types that are valid to be assigned to Union: - // *Communique_Number - // *Communique_Name - // *Communique_Data - // *Communique_TempC - // *Communique_Col - // *Communique_Msg - Union isCommunique_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique) Reset() { *m = Communique{} } -func (m *Communique) String() string { return proto.CompactTextString(m) } -func (*Communique) ProtoMessage() {} - -type isCommunique_Union interface { - isCommunique_Union() -} - -type Communique_Number struct { - Number int32 `protobuf:"varint,5,opt,name=number,oneof"` -} -type Communique_Name struct { - Name string `protobuf:"bytes,6,opt,name=name,oneof"` -} -type Communique_Data struct { - Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` -} -type Communique_TempC struct { - TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,oneof"` -} -type Communique_Col struct { - Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` -} -type Communique_Msg struct { - Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Col) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} - -func (m *Communique) GetUnion() isCommunique_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - -func (m *Communique) GetNumber() int32 { - if x, ok := m.GetUnion().(*Communique_Number); ok { - return x.Number - } - return 0 -} - -func (m *Communique) GetName() string { - if x, ok := m.GetUnion().(*Communique_Name); ok { - return x.Name - } - return "" -} - -func (m *Communique) GetData() []byte { - if x, ok := m.GetUnion().(*Communique_Data); ok { - return x.Data - } - return nil -} - -func (m *Communique) GetTempC() float64 { - if x, ok := m.GetUnion().(*Communique_TempC); ok { - return x.TempC - } - return 0 -} - -func (m *Communique) GetCol() MyMessage_Color { - if x, ok := m.GetUnion().(*Communique_Col); ok { - return x.Col - } - return MyMessage_RED -} - -func (m *Communique) GetMsg() *Strings { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, []interface{}{ - (*Communique_Number)(nil), - (*Communique_Name)(nil), - (*Communique_Data)(nil), - (*Communique_TempC)(nil), - (*Communique_Col)(nil), - (*Communique_Msg)(nil), - } -} - -func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Number)) - case *Communique_Name: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Name) - case *Communique_Data: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Data) - case *Communique_TempC: - _ = b.EncodeVarint(8<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.TempC)) - case *Communique_Col: - _ = b.EncodeVarint(9<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Col)) - case *Communique_Msg: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Communique.Union has unexpected type %T", x) - } - return nil -} - -func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Communique) - switch tag { - case 5: // union.number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Number{int32(x)} - return true, err - case 6: // union.name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Communique_Name{x} - return true, err - case 7: // union.data - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Communique_Data{x} - return true, err - case 8: // union.temp_c - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Communique_TempC{math.Float64frombits(x)} - return true, err - case 9: // union.col - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Col{MyMessage_Color(x)} - return true, err - case 10: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Strings) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - default: - return false, nil - } -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", -} - -var E_NoDefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "testdata.no_default_double", - Tag: "fixed64,101,opt,name=no_default_double", -} - -var E_NoDefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 102, - Name: "testdata.no_default_float", - Tag: "fixed32,102,opt,name=no_default_float", -} - -var E_NoDefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 103, - Name: "testdata.no_default_int32", - Tag: "varint,103,opt,name=no_default_int32", -} - -var E_NoDefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 104, - Name: "testdata.no_default_int64", - Tag: "varint,104,opt,name=no_default_int64", -} - -var E_NoDefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 105, - Name: "testdata.no_default_uint32", - Tag: "varint,105,opt,name=no_default_uint32", -} - -var E_NoDefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 106, - Name: "testdata.no_default_uint64", - Tag: "varint,106,opt,name=no_default_uint64", -} - -var E_NoDefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 107, - Name: "testdata.no_default_sint32", - Tag: "zigzag32,107,opt,name=no_default_sint32", -} - -var E_NoDefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 108, - Name: "testdata.no_default_sint64", - Tag: "zigzag64,108,opt,name=no_default_sint64", -} - -var E_NoDefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 109, - Name: "testdata.no_default_fixed32", - Tag: "fixed32,109,opt,name=no_default_fixed32", -} - -var E_NoDefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 110, - Name: "testdata.no_default_fixed64", - Tag: "fixed64,110,opt,name=no_default_fixed64", -} - -var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 111, - Name: "testdata.no_default_sfixed32", - Tag: "fixed32,111,opt,name=no_default_sfixed32", -} - -var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 112, - Name: "testdata.no_default_sfixed64", - Tag: "fixed64,112,opt,name=no_default_sfixed64", -} - -var E_NoDefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 113, - Name: "testdata.no_default_bool", - Tag: "varint,113,opt,name=no_default_bool", -} - -var E_NoDefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 114, - Name: "testdata.no_default_string", - Tag: "bytes,114,opt,name=no_default_string", -} - -var E_NoDefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 115, - Name: "testdata.no_default_bytes", - Tag: "bytes,115,opt,name=no_default_bytes", -} - -var E_NoDefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 116, - Name: "testdata.no_default_enum", - Tag: "varint,116,opt,name=no_default_enum,enum=testdata.DefaultsMessage_DefaultsEnum", -} - -var E_DefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 201, - Name: "testdata.default_double", - Tag: "fixed64,201,opt,name=default_double,def=3.1415", -} - -var E_DefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 202, - Name: "testdata.default_float", - Tag: "fixed32,202,opt,name=default_float,def=3.14", -} - -var E_DefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 203, - Name: "testdata.default_int32", - Tag: "varint,203,opt,name=default_int32,def=42", -} - -var E_DefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 204, - Name: "testdata.default_int64", - Tag: "varint,204,opt,name=default_int64,def=43", -} - -var E_DefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 205, - Name: "testdata.default_uint32", - Tag: "varint,205,opt,name=default_uint32,def=44", -} - -var E_DefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 206, - Name: "testdata.default_uint64", - Tag: "varint,206,opt,name=default_uint64,def=45", -} - -var E_DefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 207, - Name: "testdata.default_sint32", - Tag: "zigzag32,207,opt,name=default_sint32,def=46", -} - -var E_DefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 208, - Name: "testdata.default_sint64", - Tag: "zigzag64,208,opt,name=default_sint64,def=47", -} - -var E_DefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 209, - Name: "testdata.default_fixed32", - Tag: "fixed32,209,opt,name=default_fixed32,def=48", -} - -var E_DefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 210, - Name: "testdata.default_fixed64", - Tag: "fixed64,210,opt,name=default_fixed64,def=49", -} - -var E_DefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 211, - Name: "testdata.default_sfixed32", - Tag: "fixed32,211,opt,name=default_sfixed32,def=50", -} - -var E_DefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 212, - Name: "testdata.default_sfixed64", - Tag: "fixed64,212,opt,name=default_sfixed64,def=51", -} - -var E_DefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 213, - Name: "testdata.default_bool", - Tag: "varint,213,opt,name=default_bool,def=1", -} - -var E_DefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 214, - Name: "testdata.default_string", - Tag: "bytes,214,opt,name=default_string,def=Hello, string", -} - -var E_DefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 215, - Name: "testdata.default_bytes", - Tag: "bytes,215,opt,name=default_bytes,def=Hello, bytes", -} - -var E_DefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 216, - Name: "testdata.default_enum", - Tag: "varint,216,opt,name=default_enum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", -} - -var E_X201 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 201, - Name: "testdata.x201", - Tag: "bytes,201,opt,name=x201", -} - -var E_X202 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 202, - Name: "testdata.x202", - Tag: "bytes,202,opt,name=x202", -} - -var E_X203 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 203, - Name: "testdata.x203", - Tag: "bytes,203,opt,name=x203", -} - -var E_X204 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 204, - Name: "testdata.x204", - Tag: "bytes,204,opt,name=x204", -} - -var E_X205 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 205, - Name: "testdata.x205", - Tag: "bytes,205,opt,name=x205", -} - -var E_X206 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 206, - Name: "testdata.x206", - Tag: "bytes,206,opt,name=x206", -} - -var E_X207 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 207, - Name: "testdata.x207", - Tag: "bytes,207,opt,name=x207", -} - -var E_X208 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 208, - Name: "testdata.x208", - Tag: "bytes,208,opt,name=x208", -} - -var E_X209 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 209, - Name: "testdata.x209", - Tag: "bytes,209,opt,name=x209", -} - -var E_X210 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 210, - Name: "testdata.x210", - Tag: "bytes,210,opt,name=x210", -} - -var E_X211 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 211, - Name: "testdata.x211", - Tag: "bytes,211,opt,name=x211", -} - -var E_X212 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 212, - Name: "testdata.x212", - Tag: "bytes,212,opt,name=x212", -} - -var E_X213 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 213, - Name: "testdata.x213", - Tag: "bytes,213,opt,name=x213", -} - -var E_X214 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 214, - Name: "testdata.x214", - Tag: "bytes,214,opt,name=x214", -} - -var E_X215 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 215, - Name: "testdata.x215", - Tag: "bytes,215,opt,name=x215", -} - -var E_X216 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 216, - Name: "testdata.x216", - Tag: "bytes,216,opt,name=x216", -} - -var E_X217 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 217, - Name: "testdata.x217", - Tag: "bytes,217,opt,name=x217", -} - -var E_X218 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 218, - Name: "testdata.x218", - Tag: "bytes,218,opt,name=x218", -} - -var E_X219 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 219, - Name: "testdata.x219", - Tag: "bytes,219,opt,name=x219", -} - -var E_X220 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 220, - Name: "testdata.x220", - Tag: "bytes,220,opt,name=x220", -} - -var E_X221 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 221, - Name: "testdata.x221", - Tag: "bytes,221,opt,name=x221", -} - -var E_X222 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 222, - Name: "testdata.x222", - Tag: "bytes,222,opt,name=x222", -} - -var E_X223 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 223, - Name: "testdata.x223", - Tag: "bytes,223,opt,name=x223", -} - -var E_X224 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 224, - Name: "testdata.x224", - Tag: "bytes,224,opt,name=x224", -} - -var E_X225 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 225, - Name: "testdata.x225", - Tag: "bytes,225,opt,name=x225", -} - -var E_X226 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 226, - Name: "testdata.x226", - Tag: "bytes,226,opt,name=x226", -} - -var E_X227 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 227, - Name: "testdata.x227", - Tag: "bytes,227,opt,name=x227", -} - -var E_X228 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 228, - Name: "testdata.x228", - Tag: "bytes,228,opt,name=x228", -} - -var E_X229 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 229, - Name: "testdata.x229", - Tag: "bytes,229,opt,name=x229", -} - -var E_X230 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 230, - Name: "testdata.x230", - Tag: "bytes,230,opt,name=x230", -} - -var E_X231 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 231, - Name: "testdata.x231", - Tag: "bytes,231,opt,name=x231", -} - -var E_X232 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 232, - Name: "testdata.x232", - Tag: "bytes,232,opt,name=x232", -} - -var E_X233 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 233, - Name: "testdata.x233", - Tag: "bytes,233,opt,name=x233", -} - -var E_X234 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 234, - Name: "testdata.x234", - Tag: "bytes,234,opt,name=x234", -} - -var E_X235 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 235, - Name: "testdata.x235", - Tag: "bytes,235,opt,name=x235", -} - -var E_X236 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 236, - Name: "testdata.x236", - Tag: "bytes,236,opt,name=x236", -} - -var E_X237 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 237, - Name: "testdata.x237", - Tag: "bytes,237,opt,name=x237", -} - -var E_X238 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 238, - Name: "testdata.x238", - Tag: "bytes,238,opt,name=x238", -} - -var E_X239 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 239, - Name: "testdata.x239", - Tag: "bytes,239,opt,name=x239", -} - -var E_X240 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 240, - Name: "testdata.x240", - Tag: "bytes,240,opt,name=x240", -} - -var E_X241 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 241, - Name: "testdata.x241", - Tag: "bytes,241,opt,name=x241", -} - -var E_X242 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 242, - Name: "testdata.x242", - Tag: "bytes,242,opt,name=x242", -} - -var E_X243 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 243, - Name: "testdata.x243", - Tag: "bytes,243,opt,name=x243", -} - -var E_X244 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 244, - Name: "testdata.x244", - Tag: "bytes,244,opt,name=x244", -} - -var E_X245 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 245, - Name: "testdata.x245", - Tag: "bytes,245,opt,name=x245", -} - -var E_X246 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 246, - Name: "testdata.x246", - Tag: "bytes,246,opt,name=x246", -} - -var E_X247 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 247, - Name: "testdata.x247", - Tag: "bytes,247,opt,name=x247", -} - -var E_X248 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 248, - Name: "testdata.x248", - Tag: "bytes,248,opt,name=x248", -} - -var E_X249 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 249, - Name: "testdata.x249", - Tag: "bytes,249,opt,name=x249", -} - -var E_X250 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 250, - Name: "testdata.x250", - Tag: "bytes,250,opt,name=x250", -} - -func init() { - proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") - proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") - proto.RegisterType((*GoTest)(nil), "testdata.GoTest") - proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") - proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") - proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") - proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") - proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") - proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") - proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") - proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") - proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") - proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") - proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") - proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") - proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") - proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") - proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") - proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") - proto.RegisterType((*Ext)(nil), "testdata.Ext") - proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") - proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") - proto.RegisterType((*Empty)(nil), "testdata.Empty") - proto.RegisterType((*MessageList)(nil), "testdata.MessageList") - proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") - proto.RegisterType((*Strings)(nil), "testdata.Strings") - proto.RegisterType((*Defaults)(nil), "testdata.Defaults") - proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") - proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") - proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") - proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") - proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") - proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") - proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") - proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") - proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") - proto.RegisterType((*Communique)(nil), "testdata.Communique") - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) - proto.RegisterExtension(E_NoDefaultDouble) - proto.RegisterExtension(E_NoDefaultFloat) - proto.RegisterExtension(E_NoDefaultInt32) - proto.RegisterExtension(E_NoDefaultInt64) - proto.RegisterExtension(E_NoDefaultUint32) - proto.RegisterExtension(E_NoDefaultUint64) - proto.RegisterExtension(E_NoDefaultSint32) - proto.RegisterExtension(E_NoDefaultSint64) - proto.RegisterExtension(E_NoDefaultFixed32) - proto.RegisterExtension(E_NoDefaultFixed64) - proto.RegisterExtension(E_NoDefaultSfixed32) - proto.RegisterExtension(E_NoDefaultSfixed64) - proto.RegisterExtension(E_NoDefaultBool) - proto.RegisterExtension(E_NoDefaultString) - proto.RegisterExtension(E_NoDefaultBytes) - proto.RegisterExtension(E_NoDefaultEnum) - proto.RegisterExtension(E_DefaultDouble) - proto.RegisterExtension(E_DefaultFloat) - proto.RegisterExtension(E_DefaultInt32) - proto.RegisterExtension(E_DefaultInt64) - proto.RegisterExtension(E_DefaultUint32) - proto.RegisterExtension(E_DefaultUint64) - proto.RegisterExtension(E_DefaultSint32) - proto.RegisterExtension(E_DefaultSint64) - proto.RegisterExtension(E_DefaultFixed32) - proto.RegisterExtension(E_DefaultFixed64) - proto.RegisterExtension(E_DefaultSfixed32) - proto.RegisterExtension(E_DefaultSfixed64) - proto.RegisterExtension(E_DefaultBool) - proto.RegisterExtension(E_DefaultString) - proto.RegisterExtension(E_DefaultBytes) - proto.RegisterExtension(E_DefaultEnum) - proto.RegisterExtension(E_X201) - proto.RegisterExtension(E_X202) - proto.RegisterExtension(E_X203) - proto.RegisterExtension(E_X204) - proto.RegisterExtension(E_X205) - proto.RegisterExtension(E_X206) - proto.RegisterExtension(E_X207) - proto.RegisterExtension(E_X208) - proto.RegisterExtension(E_X209) - proto.RegisterExtension(E_X210) - proto.RegisterExtension(E_X211) - proto.RegisterExtension(E_X212) - proto.RegisterExtension(E_X213) - proto.RegisterExtension(E_X214) - proto.RegisterExtension(E_X215) - proto.RegisterExtension(E_X216) - proto.RegisterExtension(E_X217) - proto.RegisterExtension(E_X218) - proto.RegisterExtension(E_X219) - proto.RegisterExtension(E_X220) - proto.RegisterExtension(E_X221) - proto.RegisterExtension(E_X222) - proto.RegisterExtension(E_X223) - proto.RegisterExtension(E_X224) - proto.RegisterExtension(E_X225) - proto.RegisterExtension(E_X226) - proto.RegisterExtension(E_X227) - proto.RegisterExtension(E_X228) - proto.RegisterExtension(E_X229) - proto.RegisterExtension(E_X230) - proto.RegisterExtension(E_X231) - proto.RegisterExtension(E_X232) - proto.RegisterExtension(E_X233) - proto.RegisterExtension(E_X234) - proto.RegisterExtension(E_X235) - proto.RegisterExtension(E_X236) - proto.RegisterExtension(E_X237) - proto.RegisterExtension(E_X238) - proto.RegisterExtension(E_X239) - proto.RegisterExtension(E_X240) - proto.RegisterExtension(E_X241) - proto.RegisterExtension(E_X242) - proto.RegisterExtension(E_X243) - proto.RegisterExtension(E_X244) - proto.RegisterExtension(E_X245) - proto.RegisterExtension(E_X246) - proto.RegisterExtension(E_X247) - proto.RegisterExtension(E_X248) - proto.RegisterExtension(E_X249) - proto.RegisterExtension(E_X250) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go.golden b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go.golden deleted file mode 100644 index 0387853d56..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.pb.go.golden +++ /dev/null @@ -1,1737 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test.proto -// DO NOT EDIT! - -package testdata - -import proto "github.com/gogo/protobuf/proto" -import json "encoding/json" -import math "math" - -import () - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -type FOO int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x FOO) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} - -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - GoTest_TABLE GoTest_KIND = 11 - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x GoTest_KIND) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x MyMessage_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x Defaults_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return 0 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"` - RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"` - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"` - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"` - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"` - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return 0 -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"` - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (m *MyMessage) String() string { return proto.CompactTextString(m) } -func (*MyMessage) ProtoMessage() {} - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} -func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return 0 -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", -} - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"` - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,1,opt" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,1,opt" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", -} - -func init() { - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.proto deleted file mode 100644 index 3d1cbb675d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/testdata/test.proto +++ /dev/null @@ -1,494 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A feature-rich test file for the protocol compiler and libraries. - -syntax = "proto2"; - -package testdata; - -enum FOO { FOO1 = 1; }; - -message GoEnum { - required FOO foo = 1; -} - -message GoTestField { - required string Label = 1; - required string Type = 2; -} - -message GoTest { - // An enum, for completeness. - enum KIND { - VOID = 0; - - // Basic types - BOOL = 1; - BYTES = 2; - FINGERPRINT = 3; - FLOAT = 4; - INT = 5; - STRING = 6; - TIME = 7; - - // Groupings - TUPLE = 8; - ARRAY = 9; - MAP = 10; - - // Table types - TABLE = 11; - - // Functions - FUNCTION = 12; // last tag - }; - - // Some typical parameters - required KIND Kind = 1; - optional string Table = 2; - optional int32 Param = 3; - - // Required, repeated and optional foreign fields. - required GoTestField RequiredField = 4; - repeated GoTestField RepeatedField = 5; - optional GoTestField OptionalField = 6; - - // Required fields of all basic types - required bool F_Bool_required = 10; - required int32 F_Int32_required = 11; - required int64 F_Int64_required = 12; - required fixed32 F_Fixed32_required = 13; - required fixed64 F_Fixed64_required = 14; - required uint32 F_Uint32_required = 15; - required uint64 F_Uint64_required = 16; - required float F_Float_required = 17; - required double F_Double_required = 18; - required string F_String_required = 19; - required bytes F_Bytes_required = 101; - required sint32 F_Sint32_required = 102; - required sint64 F_Sint64_required = 103; - - // Repeated fields of all basic types - repeated bool F_Bool_repeated = 20; - repeated int32 F_Int32_repeated = 21; - repeated int64 F_Int64_repeated = 22; - repeated fixed32 F_Fixed32_repeated = 23; - repeated fixed64 F_Fixed64_repeated = 24; - repeated uint32 F_Uint32_repeated = 25; - repeated uint64 F_Uint64_repeated = 26; - repeated float F_Float_repeated = 27; - repeated double F_Double_repeated = 28; - repeated string F_String_repeated = 29; - repeated bytes F_Bytes_repeated = 201; - repeated sint32 F_Sint32_repeated = 202; - repeated sint64 F_Sint64_repeated = 203; - - // Optional fields of all basic types - optional bool F_Bool_optional = 30; - optional int32 F_Int32_optional = 31; - optional int64 F_Int64_optional = 32; - optional fixed32 F_Fixed32_optional = 33; - optional fixed64 F_Fixed64_optional = 34; - optional uint32 F_Uint32_optional = 35; - optional uint64 F_Uint64_optional = 36; - optional float F_Float_optional = 37; - optional double F_Double_optional = 38; - optional string F_String_optional = 39; - optional bytes F_Bytes_optional = 301; - optional sint32 F_Sint32_optional = 302; - optional sint64 F_Sint64_optional = 303; - - // Default-valued fields of all basic types - optional bool F_Bool_defaulted = 40 [default=true]; - optional int32 F_Int32_defaulted = 41 [default=32]; - optional int64 F_Int64_defaulted = 42 [default=64]; - optional fixed32 F_Fixed32_defaulted = 43 [default=320]; - optional fixed64 F_Fixed64_defaulted = 44 [default=640]; - optional uint32 F_Uint32_defaulted = 45 [default=3200]; - optional uint64 F_Uint64_defaulted = 46 [default=6400]; - optional float F_Float_defaulted = 47 [default=314159.]; - optional double F_Double_defaulted = 48 [default=271828.]; - optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; - optional sint32 F_Sint32_defaulted = 402 [default = -32]; - optional sint64 F_Sint64_defaulted = 403 [default = -64]; - - // Packed repeated fields (no string or bytes). - repeated bool F_Bool_repeated_packed = 50 [packed=true]; - repeated int32 F_Int32_repeated_packed = 51 [packed=true]; - repeated int64 F_Int64_repeated_packed = 52 [packed=true]; - repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; - repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; - repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; - repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; - repeated float F_Float_repeated_packed = 57 [packed=true]; - repeated double F_Double_repeated_packed = 58 [packed=true]; - repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; - repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; - - // Required, repeated, and optional groups. - required group RequiredGroup = 70 { - required string RequiredField = 71; - }; - - repeated group RepeatedGroup = 80 { - required string RequiredField = 81; - }; - - optional group OptionalGroup = 90 { - required string RequiredField = 91; - }; -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -message GoSkipTest { - required int32 skip_int32 = 11; - required fixed32 skip_fixed32 = 12; - required fixed64 skip_fixed64 = 13; - required string skip_string = 14; - required group SkipGroup = 15 { - required int32 group_int32 = 16; - required string group_string = 17; - } -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -message NonPackedTest { - repeated int32 a = 1; -} - -message PackedTest { - repeated int32 b = 1 [packed=true]; -} - -message MaxTag { - // Maximum possible tag number. - optional string last_field = 536870911; -} - -message OldMessage { - message Nested { - optional string name = 1; - } - optional Nested nested = 1; - - optional int32 num = 2; -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -message NewMessage { - message Nested { - optional string name = 1; - optional string food_group = 2; - } - optional Nested nested = 1; - - // This is an int32 in OldMessage. - optional int64 num = 2; -} - -// Smaller tests for ASCII formatting. - -message InnerMessage { - required string host = 1; - optional int32 port = 2 [default=4000]; - optional bool connected = 3; -} - -message OtherMessage { - optional int64 key = 1; - optional bytes value = 2; - optional float weight = 3; - optional InnerMessage inner = 4; -} - -message MyMessage { - required int32 count = 1; - optional string name = 2; - optional string quote = 3; - repeated string pet = 4; - optional InnerMessage inner = 5; - repeated OtherMessage others = 6; - repeated InnerMessage rep_inner = 12; - - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color bikeshed = 7; - - optional group SomeGroup = 8 { - optional int32 group_field = 9; - } - - // This field becomes [][]byte in the generated code. - repeated bytes rep_bytes = 10; - - optional double bigfloat = 11; - - extensions 100 to max; -} - -message Ext { - extend MyMessage { - optional Ext more = 103; - optional string text = 104; - optional int32 number = 105; - } - - optional string data = 1; -} - -extend MyMessage { - repeated string greeting = 106; -} - -message DefaultsMessage { - enum DefaultsEnum { - ZERO = 0; - ONE = 1; - TWO = 2; - }; - extensions 100 to max; -} - -extend DefaultsMessage { - optional double no_default_double = 101; - optional float no_default_float = 102; - optional int32 no_default_int32 = 103; - optional int64 no_default_int64 = 104; - optional uint32 no_default_uint32 = 105; - optional uint64 no_default_uint64 = 106; - optional sint32 no_default_sint32 = 107; - optional sint64 no_default_sint64 = 108; - optional fixed32 no_default_fixed32 = 109; - optional fixed64 no_default_fixed64 = 110; - optional sfixed32 no_default_sfixed32 = 111; - optional sfixed64 no_default_sfixed64 = 112; - optional bool no_default_bool = 113; - optional string no_default_string = 114; - optional bytes no_default_bytes = 115; - optional DefaultsMessage.DefaultsEnum no_default_enum = 116; - - optional double default_double = 201 [default = 3.1415]; - optional float default_float = 202 [default = 3.14]; - optional int32 default_int32 = 203 [default = 42]; - optional int64 default_int64 = 204 [default = 43]; - optional uint32 default_uint32 = 205 [default = 44]; - optional uint64 default_uint64 = 206 [default = 45]; - optional sint32 default_sint32 = 207 [default = 46]; - optional sint64 default_sint64 = 208 [default = 47]; - optional fixed32 default_fixed32 = 209 [default = 48]; - optional fixed64 default_fixed64 = 210 [default = 49]; - optional sfixed32 default_sfixed32 = 211 [default = 50]; - optional sfixed64 default_sfixed64 = 212 [default = 51]; - optional bool default_bool = 213 [default = true]; - optional string default_string = 214 [default = "Hello, string"]; - optional bytes default_bytes = 215 [default = "Hello, bytes"]; - optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; -} - -message MyMessageSet { - option message_set_wire_format = true; - extensions 100 to max; -} - -message Empty { -} - -extend MyMessageSet { - optional Empty x201 = 201; - optional Empty x202 = 202; - optional Empty x203 = 203; - optional Empty x204 = 204; - optional Empty x205 = 205; - optional Empty x206 = 206; - optional Empty x207 = 207; - optional Empty x208 = 208; - optional Empty x209 = 209; - optional Empty x210 = 210; - optional Empty x211 = 211; - optional Empty x212 = 212; - optional Empty x213 = 213; - optional Empty x214 = 214; - optional Empty x215 = 215; - optional Empty x216 = 216; - optional Empty x217 = 217; - optional Empty x218 = 218; - optional Empty x219 = 219; - optional Empty x220 = 220; - optional Empty x221 = 221; - optional Empty x222 = 222; - optional Empty x223 = 223; - optional Empty x224 = 224; - optional Empty x225 = 225; - optional Empty x226 = 226; - optional Empty x227 = 227; - optional Empty x228 = 228; - optional Empty x229 = 229; - optional Empty x230 = 230; - optional Empty x231 = 231; - optional Empty x232 = 232; - optional Empty x233 = 233; - optional Empty x234 = 234; - optional Empty x235 = 235; - optional Empty x236 = 236; - optional Empty x237 = 237; - optional Empty x238 = 238; - optional Empty x239 = 239; - optional Empty x240 = 240; - optional Empty x241 = 241; - optional Empty x242 = 242; - optional Empty x243 = 243; - optional Empty x244 = 244; - optional Empty x245 = 245; - optional Empty x246 = 246; - optional Empty x247 = 247; - optional Empty x248 = 248; - optional Empty x249 = 249; - optional Empty x250 = 250; -} - -message MessageList { - repeated group Message = 1 { - required string name = 2; - required int32 count = 3; - } -} - -message Strings { - optional string string_field = 1; - optional bytes bytes_field = 2; -} - -message Defaults { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - } - - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - optional bool F_Bool = 1 [default=true]; - optional int32 F_Int32 = 2 [default=32]; - optional int64 F_Int64 = 3 [default=64]; - optional fixed32 F_Fixed32 = 4 [default=320]; - optional fixed64 F_Fixed64 = 5 [default=640]; - optional uint32 F_Uint32 = 6 [default=3200]; - optional uint64 F_Uint64 = 7 [default=6400]; - optional float F_Float = 8 [default=314159.]; - optional double F_Double = 9 [default=271828.]; - optional string F_String = 10 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes = 11 [default="Bignose"]; - optional sint32 F_Sint32 = 12 [default=-32]; - optional sint64 F_Sint64 = 13 [default=-64]; - optional Color F_Enum = 14 [default=GREEN]; - - // More fields with crazy defaults. - optional float F_Pinf = 15 [default=inf]; - optional float F_Ninf = 16 [default=-inf]; - optional float F_Nan = 17 [default=nan]; - - // Sub-message. - optional SubDefaults sub = 18; - - // Redundant but explicit defaults. - optional string str_zero = 19 [default=""]; -} - -message SubDefaults { - optional int64 n = 1 [default=7]; -} - -message RepeatedEnum { - enum Color { - RED = 1; - } - repeated Color color = 1; -} - -message MoreRepeated { - repeated bool bools = 1; - repeated bool bools_packed = 2 [packed=true]; - repeated int32 ints = 3; - repeated int32 ints_packed = 4 [packed=true]; - repeated int64 int64s_packed = 7 [packed=true]; - repeated string strings = 5; - repeated fixed32 fixeds = 6; -} - -// GroupOld and GroupNew have the same wire format. -// GroupNew has a new field inside a group. - -message GroupOld { - optional group G = 101 { - optional int32 x = 2; - } -} - -message GroupNew { - optional group G = 101 { - optional int32 x = 2; - optional int32 y = 3; - } -} - -message FloatingPoint { - required double f = 1; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; - map str_to_str = 4; -} - -message Communique { - optional bool make_me_cry = 1; - - // This is a oneof, called "union". - oneof union { - int32 number = 5; - string name = 6; - bytes data = 7; - double temp_c = 8; - MyMessage.Color col = 9; - Strings msg = 10; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text.go deleted file mode 100644 index 7c9ae90f95..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text.go +++ /dev/null @@ -1,793 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for writing the text protocol buffer format. - -import ( - "bufio" - "bytes" - "encoding" - "errors" - "fmt" - "io" - "log" - "math" - "reflect" - "sort" - "strings" -) - -var ( - newline = []byte("\n") - spaces = []byte(" ") - gtNewline = []byte(">\n") - endBraceNewline = []byte("}\n") - backslashN = []byte{'\\', 'n'} - backslashR = []byte{'\\', 'r'} - backslashT = []byte{'\\', 't'} - backslashDQ = []byte{'\\', '"'} - backslashBS = []byte{'\\', '\\'} - posInf = []byte("inf") - negInf = []byte("-inf") - nan = []byte("nan") -) - -type writer interface { - io.Writer - WriteByte(byte) error -} - -// textWriter is an io.Writer that tracks its indentation level. -type textWriter struct { - ind int - complete bool // if the current position is a complete line - compact bool // whether to write out as a one-liner - w writer -} - -func (w *textWriter) WriteString(s string) (n int, err error) { - if !strings.Contains(s, "\n") { - if !w.compact && w.complete { - w.writeIndent() - } - w.complete = false - return io.WriteString(w.w, s) - } - // WriteString is typically called without newlines, so this - // codepath and its copy are rare. We copy to avoid - // duplicating all of Write's logic here. - return w.Write([]byte(s)) -} - -func (w *textWriter) Write(p []byte) (n int, err error) { - newlines := bytes.Count(p, newline) - if newlines == 0 { - if !w.compact && w.complete { - w.writeIndent() - } - n, err = w.w.Write(p) - w.complete = false - return n, err - } - - frags := bytes.SplitN(p, newline, newlines+1) - if w.compact { - for i, frag := range frags { - if i > 0 { - if err := w.w.WriteByte(' '); err != nil { - return n, err - } - n++ - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - } - return n, nil - } - - for i, frag := range frags { - if w.complete { - w.writeIndent() - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - if i+1 < len(frags) { - if err := w.w.WriteByte('\n'); err != nil { - return n, err - } - n++ - } - } - w.complete = len(frags[len(frags)-1]) == 0 - return n, nil -} - -func (w *textWriter) WriteByte(c byte) error { - if w.compact && c == '\n' { - c = ' ' - } - if !w.compact && w.complete { - w.writeIndent() - } - err := w.w.WriteByte(c) - w.complete = c == '\n' - return err -} - -func (w *textWriter) indent() { w.ind++ } - -func (w *textWriter) unindent() { - if w.ind == 0 { - log.Printf("proto: textWriter unindented too far") - return - } - w.ind-- -} - -func writeName(w *textWriter, props *Properties) error { - if _, err := w.WriteString(props.OrigName); err != nil { - return err - } - if props.Wire != "group" { - return w.WriteByte(':') - } - return nil -} - -// raw is the interface satisfied by RawMessage. -type raw interface { - Bytes() []byte -} - -func writeStruct(w *textWriter, sv reflect.Value) error { - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < sv.NumField(); i++ { - fv := sv.Field(i) - props := sprops.Prop[i] - name := st.Field(i).Name - - if strings.HasPrefix(name, "XXX_") { - // There are two XXX_ fields: - // XXX_unrecognized []byte - // XXX_extensions map[int32]proto.Extension - // The first is handled here; - // the second is handled at the bottom of this function. - if name == "XXX_unrecognized" && !fv.IsNil() { - if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Field not filled in. This could be an optional field or - // a required field that wasn't filled in. Either way, there - // isn't anything we can show for it. - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - // Repeated field that is empty, or a bytes field that is unused. - continue - } - - if props.Repeated && fv.Kind() == reflect.Slice { - // Repeated field. - for j := 0; j < fv.Len(); j++ { - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - v := fv.Index(j) - if v.Kind() == reflect.Ptr && v.IsNil() { - // A nil message in a repeated field is not valid, - // but we can handle that more gracefully than panicking. - if _, err := w.Write([]byte("\n")); err != nil { - return err - } - continue - } - if len(props.Enum) > 0 { - if err := writeEnum(w, v, props); err != nil { - return err - } - } else if err := writeAny(w, v, props); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Map { - // Map fields are rendered as a repeated struct with key/value fields. - keys := fv.MapKeys() - sort.Sort(mapKeys(keys)) - for _, key := range keys { - val := fv.MapIndex(key) - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - // open struct - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - // key - if _, err := w.WriteString("key:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := writeAny(w, key, props.mkeyprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - // nil values aren't legal, but we can avoid panicking because of them. - if val.Kind() != reflect.Ptr || !val.IsNil() { - // value - if _, err := w.WriteString("value:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := writeAny(w, val, props.mvalprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - // close struct - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { - // empty bytes field - continue - } - if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { - // proto3 non-repeated scalar field; skip if zero value - if isProto3Zero(fv) { - continue - } - } - - if fv.Kind() == reflect.Interface { - // Check if it is a oneof. - if st.Field(i).Tag.Get("protobuf_oneof") != "" { - // fv is nil, or holds a pointer to generated struct. - // That generated struct has exactly one field, - // which has a protobuf struct tag. - if fv.IsNil() { - continue - } - inner := fv.Elem().Elem() // interface -> *T -> T - tag := inner.Type().Field(0).Tag.Get("protobuf") - props.Parse(tag) // Overwrite the outer props. - // Write the value in the oneof, not the oneof itself. - fv = inner.Field(0) - - // Special case to cope with malformed messages gracefully: - // If the value in the oneof is a nil pointer, don't panic - // in writeAny. - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Use errors.New so writeAny won't render quotes. - msg := errors.New("/* nil */") - fv = reflect.ValueOf(&msg).Elem() - } - } - } - - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if b, ok := fv.Interface().(raw); ok { - if err := writeRaw(w, b.Bytes()); err != nil { - return err - } - continue - } - - if len(props.Enum) > 0 { - if err := writeEnum(w, fv, props); err != nil { - return err - } - } else if err := writeAny(w, fv, props); err != nil { - return err - } - - if err := w.WriteByte('\n'); err != nil { - return err - } - } - - // Extensions (the XXX_extensions field). - pv := sv - if pv.CanAddr() { - pv = sv.Addr() - } else { - pv = reflect.New(sv.Type()) - pv.Elem().Set(sv) - } - if pv.Type().Implements(extendableProtoType) { - if err := writeExtensions(w, pv); err != nil { - return err - } - } - - return nil -} - -// writeRaw writes an uninterpreted raw message. -func writeRaw(w *textWriter, b []byte) error { - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if err := writeUnknownStruct(w, b); err != nil { - return err - } - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - return nil -} - -// writeAny writes an arbitrary field. -func writeAny(w *textWriter, v reflect.Value, props *Properties) error { - v = reflect.Indirect(v) - - if props != nil && len(props.CustomType) > 0 { - custom, ok := v.Interface().(Marshaler) - if ok { - data, err := custom.Marshal() - if err != nil { - return err - } - if err := writeString(w, string(data)); err != nil { - return err - } - return nil - } - } - - // Floats have special cases. - if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { - x := v.Float() - var b []byte - switch { - case math.IsInf(x, 1): - b = posInf - case math.IsInf(x, -1): - b = negInf - case math.IsNaN(x): - b = nan - } - if b != nil { - _, err := w.Write(b) - return err - } - // Other values are handled below. - } - - // We don't attempt to serialise every possible value type; only those - // that can occur in protocol buffers. - switch v.Kind() { - case reflect.Slice: - // Should only be a []byte; repeated fields are handled in writeStruct. - if err := writeString(w, string(v.Bytes())); err != nil { - return err - } - case reflect.String: - if err := writeString(w, v.String()); err != nil { - return err - } - case reflect.Struct: - // Required/optional group/message. - var bra, ket byte = '<', '>' - if props != nil && props.Wire == "group" { - bra, ket = '{', '}' - } - if err := w.WriteByte(bra); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if tm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() - if err != nil { - return err - } - if _, err = w.Write(text); err != nil { - return err - } - } else if err := writeStruct(w, v); err != nil { - return err - } - w.unindent() - if err := w.WriteByte(ket); err != nil { - return err - } - default: - _, err := fmt.Fprint(w, v.Interface()) - return err - } - return nil -} - -// equivalent to C's isprint. -func isprint(c byte) bool { - return c >= 0x20 && c < 0x7f -} - -// writeString writes a string in the protocol buffer text format. -// It is similar to strconv.Quote except we don't use Go escape sequences, -// we treat the string as a byte sequence, and we use octal escapes. -// These differences are to maintain interoperability with the other -// languages' implementations of the text format. -func writeString(w *textWriter, s string) error { - // use WriteByte here to get any needed indent - if err := w.WriteByte('"'); err != nil { - return err - } - // Loop over the bytes, not the runes. - for i := 0; i < len(s); i++ { - var err error - // Divergence from C++: we don't escape apostrophes. - // There's no need to escape them, and the C++ parser - // copes with a naked apostrophe. - switch c := s[i]; c { - case '\n': - _, err = w.w.Write(backslashN) - case '\r': - _, err = w.w.Write(backslashR) - case '\t': - _, err = w.w.Write(backslashT) - case '"': - _, err = w.w.Write(backslashDQ) - case '\\': - _, err = w.w.Write(backslashBS) - default: - if isprint(c) { - err = w.w.WriteByte(c) - } else { - _, err = fmt.Fprintf(w.w, "\\%03o", c) - } - } - if err != nil { - return err - } - } - return w.WriteByte('"') -} - -func writeUnknownStruct(w *textWriter, data []byte) (err error) { - if !w.compact { - if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { - return err - } - } - b := NewBuffer(data) - for b.index < len(b.buf) { - x, err := b.DecodeVarint() - if err != nil { - _, ferr := fmt.Fprintf(w, "/* %v */\n", err) - return ferr - } - wire, tag := x&7, x>>3 - if wire == WireEndGroup { - w.unindent() - if _, werr := w.Write(endBraceNewline); werr != nil { - return werr - } - continue - } - if _, ferr := fmt.Fprint(w, tag); ferr != nil { - return ferr - } - if wire != WireStartGroup { - if err := w.WriteByte(':'); err != nil { - return err - } - } - if !w.compact || wire == WireStartGroup { - if err := w.WriteByte(' '); err != nil { - return err - } - } - switch wire { - case WireBytes: - buf, e := b.DecodeRawBytes(false) - if e == nil { - _, err = fmt.Fprintf(w, "%q", buf) - } else { - _, err = fmt.Fprintf(w, "/* %v */", e) - } - case WireFixed32: - x, err = b.DecodeFixed32() - err = writeUnknownInt(w, x, err) - case WireFixed64: - x, err = b.DecodeFixed64() - err = writeUnknownInt(w, x, err) - case WireStartGroup: - err = w.WriteByte('{') - w.indent() - case WireVarint: - x, err = b.DecodeVarint() - err = writeUnknownInt(w, x, err) - default: - _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) - } - if err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - return nil -} - -func writeUnknownInt(w *textWriter, x uint64, err error) error { - if err == nil { - _, err = fmt.Fprint(w, x) - } else { - _, err = fmt.Fprintf(w, "/* %v */", err) - } - return err -} - -type int32Slice []int32 - -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// writeExtensions writes all the extensions in pv. -// pv is assumed to be a pointer to a protocol message struct that is extendable. -func writeExtensions(w *textWriter, pv reflect.Value) error { - emap := extensionMaps[pv.Type().Elem()] - ep := pv.Interface().(extendableProto) - - // Order the extensions by ID. - // This isn't strictly necessary, but it will give us - // canonical output, which will also make testing easier. - var m map[int32]Extension - if em, ok := ep.(extensionsMap); ok { - m = em.ExtensionMap() - } else if em, ok := ep.(extensionsBytes); ok { - eb := em.GetExtensions() - var err error - m, err = BytesToExtensionsMap(*eb) - if err != nil { - return err - } - } - - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - - for _, extNum := range ids { - ext := m[extNum] - var desc *ExtensionDesc - if emap != nil { - desc = emap[extNum] - } - if desc == nil { - // Unknown extension. - if err := writeUnknownStruct(w, ext.enc); err != nil { - return err - } - continue - } - - pb, err := GetExtension(ep, desc) - if err != nil { - return fmt.Errorf("failed getting extension: %v", err) - } - - // Repeated extensions will appear as a slice. - if !desc.repeated() { - if err := writeExtension(w, desc.Name, pb); err != nil { - return err - } - } else { - v := reflect.ValueOf(pb) - for i := 0; i < v.Len(); i++ { - if err := writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { - return err - } - } - } - } - return nil -} - -func writeExtension(w *textWriter, name string, pb interface{}) error { - if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := writeAny(w, reflect.ValueOf(pb), nil); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - return nil -} - -func (w *textWriter) writeIndent() { - if !w.complete { - return - } - remain := w.ind * 2 - for remain > 0 { - n := remain - if n > len(spaces) { - n = len(spaces) - } - w.w.Write(spaces[:n]) - remain -= n - } - w.complete = false -} - -func marshalText(w io.Writer, pb Message, compact bool) error { - val := reflect.ValueOf(pb) - if pb == nil || val.IsNil() { - w.Write([]byte("")) - return nil - } - var bw *bufio.Writer - ww, ok := w.(writer) - if !ok { - bw = bufio.NewWriter(w) - ww = bw - } - aw := &textWriter{ - w: ww, - complete: true, - compact: compact, - } - - if tm, ok := pb.(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() - if err != nil { - return err - } - if _, err = aw.Write(text); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil - } - // Dereference the received pointer so we don't have outer < and >. - v := reflect.Indirect(val) - if err := writeStruct(aw, v); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil -} - -// MarshalText writes a given protocol buffer in text format. -// The only errors returned are from w. -func MarshalText(w io.Writer, pb Message) error { - return marshalText(w, pb, false) -} - -// MarshalTextString is the same as MarshalText, but returns the string directly. -func MarshalTextString(pb Message) string { - var buf bytes.Buffer - marshalText(&buf, pb, false) - return buf.String() -} - -// CompactText writes a given protocol buffer in compact text format (one line). -func CompactText(w io.Writer, pb Message) error { return marshalText(w, pb, true) } - -// CompactTextString is the same as CompactText, but returns the string directly. -func CompactTextString(pb Message) string { - var buf bytes.Buffer - marshalText(&buf, pb, true) - return buf.String() -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_gogo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_gogo.go deleted file mode 100644 index cdb23373c3..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_gogo.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "fmt" - "reflect" -) - -func writeEnum(w *textWriter, v reflect.Value, props *Properties) error { - m, ok := enumStringMaps[props.Enum] - if !ok { - if err := writeAny(w, v, props); err != nil { - return err - } - } - key := int32(0) - if v.Kind() == reflect.Ptr { - key = int32(v.Elem().Int()) - } else { - key = int32(v.Int()) - } - s, ok := m[key] - if !ok { - if err := writeAny(w, v, props); err != nil { - return err - } - } - _, err := fmt.Fprint(w, s) - return err -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser.go deleted file mode 100644 index f3909695ed..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser.go +++ /dev/null @@ -1,841 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for parsing the Text protocol buffer format. -// TODO: message sets. - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "unicode/utf8" -) - -type ParseError struct { - Message string - Line int // 1-based line number - Offset int // 0-based byte offset from start of input -} - -func (p *ParseError) Error() string { - if p.Line == 1 { - // show offset only for first line - return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) - } - return fmt.Sprintf("line %d: %v", p.Line, p.Message) -} - -type token struct { - value string - err *ParseError - line int // line number - offset int // byte number from start of input, not start of line - unquoted string // the unquoted version of value, if it was a quoted string -} - -func (t *token) String() string { - if t.err == nil { - return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) - } - return fmt.Sprintf("parse error: %v", t.err) -} - -type textParser struct { - s string // remaining input - done bool // whether the parsing is finished (success or error) - backed bool // whether back() was called - offset, line int - cur token -} - -func newTextParser(s string) *textParser { - p := new(textParser) - p.s = s - p.line = 1 - p.cur.line = 1 - return p -} - -func (p *textParser) errorf(format string, a ...interface{}) *ParseError { - pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} - p.cur.err = pe - p.done = true - return pe -} - -// Numbers and identifiers are matched by [-+._A-Za-z0-9] -func isIdentOrNumberChar(c byte) bool { - switch { - case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': - return true - case '0' <= c && c <= '9': - return true - } - switch c { - case '-', '+', '.', '_': - return true - } - return false -} - -func isWhitespace(c byte) bool { - switch c { - case ' ', '\t', '\n', '\r': - return true - } - return false -} - -func (p *textParser) skipWhitespace() { - i := 0 - for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { - if p.s[i] == '#' { - // comment; skip to end of line or input - for i < len(p.s) && p.s[i] != '\n' { - i++ - } - if i == len(p.s) { - break - } - } - if p.s[i] == '\n' { - p.line++ - } - i++ - } - p.offset += i - p.s = p.s[i:len(p.s)] - if len(p.s) == 0 { - p.done = true - } -} - -func (p *textParser) advance() { - // Skip whitespace - p.skipWhitespace() - if p.done { - return - } - - // Start of non-whitespace - p.cur.err = nil - p.cur.offset, p.cur.line = p.offset, p.line - p.cur.unquoted = "" - switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',': - // Single symbol - p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] - case '"', '\'': - // Quoted string - i := 1 - for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { - if p.s[i] == '\\' && i+1 < len(p.s) { - // skip escaped char - i++ - } - i++ - } - if i >= len(p.s) || p.s[i] != p.s[0] { - p.errorf("unmatched quote") - return - } - unq, err := unquoteC(p.s[1:i], rune(p.s[0])) - if err != nil { - p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) - return - } - p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] - p.cur.unquoted = unq - default: - i := 0 - for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { - i++ - } - if i == 0 { - p.errorf("unexpected byte %#x", p.s[0]) - return - } - p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] - } - p.offset += len(p.cur.value) -} - -var ( - errBadUTF8 = errors.New("proto: bad UTF-8") - errBadHex = errors.New("proto: bad hexadecimal") -) - -func unquoteC(s string, quote rune) (string, error) { - // This is based on C++'s tokenizer.cc. - // Despite its name, this is *not* parsing C syntax. - // For instance, "\0" is an invalid quoted string. - - // Avoid allocation in trivial cases. - simple := true - for _, r := range s { - if r == '\\' || r == quote { - simple = false - break - } - } - if simple { - return s, nil - } - - buf := make([]byte, 0, 3*len(s)/2) - for len(s) > 0 { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", errBadUTF8 - } - s = s[n:] - if r != '\\' { - if r < utf8.RuneSelf { - buf = append(buf, byte(r)) - } else { - buf = append(buf, string(r)...) - } - continue - } - - ch, tail, err := unescape(s) - if err != nil { - return "", err - } - buf = append(buf, ch...) - s = tail - } - return string(buf), nil -} - -func unescape(s string) (ch string, tail string, err error) { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", "", errBadUTF8 - } - s = s[n:] - switch r { - case 'a': - return "\a", s, nil - case 'b': - return "\b", s, nil - case 'f': - return "\f", s, nil - case 'n': - return "\n", s, nil - case 'r': - return "\r", s, nil - case 't': - return "\t", s, nil - case 'v': - return "\v", s, nil - case '?': - return "?", s, nil // trigraph workaround - case '\'', '"', '\\': - return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': - if len(s) < 2 { - return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) - } - base := 8 - ss := s[:2] - s = s[2:] - if r == 'x' || r == 'X' { - base = 16 - } else { - ss = string(r) + ss - } - i, err := strconv.ParseUint(ss, base, 8) - if err != nil { - return "", "", err - } - return string([]byte{byte(i)}), s, nil - case 'u', 'U': - n := 4 - if r == 'U' { - n = 8 - } - if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) - } - - bs := make([]byte, n/2) - for i := 0; i < n; i += 2 { - a, ok1 := unhex(s[i]) - b, ok2 := unhex(s[i+1]) - if !ok1 || !ok2 { - return "", "", errBadHex - } - bs[i/2] = a<<4 | b - } - s = s[n:] - return string(bs), s, nil - } - return "", "", fmt.Errorf(`unknown escape \%c`, r) -} - -// Adapted from src/pkg/strconv/quote.go. -func unhex(b byte) (v byte, ok bool) { - switch { - case '0' <= b && b <= '9': - return b - '0', true - case 'a' <= b && b <= 'f': - return b - 'a' + 10, true - case 'A' <= b && b <= 'F': - return b - 'A' + 10, true - } - return 0, false -} - -// Back off the parser by one token. Can only be done between calls to next(). -// It makes the next advance() a no-op. -func (p *textParser) back() { p.backed = true } - -// Advances the parser and returns the new current token. -func (p *textParser) next() *token { - if p.backed || p.done { - p.backed = false - return &p.cur - } - p.advance() - if p.done { - p.cur.value = "" - } else if len(p.cur.value) > 0 && p.cur.value[0] == '"' { - // Look for multiple quoted strings separated by whitespace, - // and concatenate them. - cat := p.cur - for { - p.skipWhitespace() - if p.done || p.s[0] != '"' { - break - } - p.advance() - if p.cur.err != nil { - return &p.cur - } - cat.value += " " + p.cur.value - cat.unquoted += p.cur.unquoted - } - p.done = false // parser may have seen EOF, but we want to return cat - p.cur = cat - } - return &p.cur -} - -func (p *textParser) consumeToken(s string) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != s { - p.back() - return p.errorf("expected %q, found %q", s, tok.value) - } - return nil -} - -// Return a RequiredNotSetError indicating which required field was not set. -func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < st.NumField(); i++ { - if !isNil(sv.Field(i)) { - continue - } - - props := sprops.Prop[i] - if props.Required { - return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} - } - } - return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen -} - -// Returns the index in the struct for the named field, as well as the parsed tag properties. -func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { - i, ok := sprops.decoderOrigNames[name] - if ok { - return i, sprops.Prop[i], true - } - return -1, nil, false -} - -// Consume a ':' from the input stream (if the next token is a colon), -// returning an error if a colon is needed but not present. -func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ":" { - // Colon is optional when the field is a group or message. - needColon := true - switch props.Wire { - case "group": - needColon = false - case "bytes": - // A "bytes" field is either a message, a string, or a repeated field; - // those three become *T, *string and []T respectively, so we can check for - // this field being a pointer to a non-string. - if typ.Kind() == reflect.Ptr { - // *T or *string - if typ.Elem().Kind() == reflect.String { - break - } - } else if typ.Kind() == reflect.Slice { - // []T or []*T - if typ.Elem().Kind() != reflect.Ptr { - break - } - } else if typ.Kind() == reflect.String { - // The proto3 exception is for a string field, - // which requires a colon. - break - } - needColon = false - } - if needColon { - return p.errorf("expected ':', found %q", tok.value) - } - p.back() - } - return nil -} - -func (p *textParser) readStruct(sv reflect.Value, terminator string) error { - st := sv.Type() - sprops := GetProperties(st) - reqCount := sprops.reqCount - var reqFieldErr error - fieldSet := make(map[string]bool) - // A struct is a sequence of "name: value", terminated by one of - // '>' or '}', or the end of the input. A name may also be - // "[extension]". - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - if tok.value == "[" { - // Looks like an extension. - // - // TODO: Check whether we need to handle - // namespace rooted names (e.g. ".something.Foo"). - tok = p.next() - if tok.err != nil { - return tok.err - } - var desc *ExtensionDesc - // This could be faster, but it's functional. - // TODO: Do something smarter than a linear scan. - for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == tok.value { - desc = d - break - } - } - if desc == nil { - return p.errorf("unrecognized extension %q", tok.value) - } - // Check the extension terminator. - tok = p.next() - if tok.err != nil { - return tok.err - } - if tok.value != "]" { - return p.errorf("unrecognized extension terminator %q", tok.value) - } - - props := &Properties{} - props.Parse(desc.Tag) - - typ := reflect.TypeOf(desc.ExtensionType) - if err := p.checkForColon(props, typ); err != nil { - return err - } - - rep := desc.repeated() - - // Read the extension structure, and set it in - // the value we're constructing. - var ext reflect.Value - if !rep { - ext = reflect.New(typ).Elem() - } else { - ext = reflect.New(typ.Elem()).Elem() - } - if err := p.readAny(ext, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - ep := sv.Addr().Interface().(extendableProto) - if !rep { - SetExtension(ep, desc, ext.Interface()) - } else { - old, err := GetExtension(ep, desc) - var sl reflect.Value - if err == nil { - sl = reflect.ValueOf(old) // existing slice - } else { - sl = reflect.MakeSlice(typ, 0, 1) - } - sl = reflect.Append(sl, ext) - SetExtension(ep, desc, sl.Interface()) - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - continue - } - - // This is a normal, non-extension field. - name := tok.value - var dst reflect.Value - fi, props, ok := structFieldByName(sprops, name) - if ok { - dst = sv.Field(fi) - } else if oop, ok := sprops.OneofTypes[name]; ok { - // It is a oneof. - props = oop.Prop - nv := reflect.New(oop.Type.Elem()) - dst = nv.Elem().Field(0) - sv.Field(oop.Field).Set(nv) - } - if !dst.IsValid() { - return p.errorf("unknown field name %q in %v", name, st) - } - - if dst.Kind() == reflect.Map { - // Consume any colon. - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Construct the map if it doesn't already exist. - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - key := reflect.New(dst.Type().Key()).Elem() - val := reflect.New(dst.Type().Elem()).Elem() - - // The map entry should be this sequence of tokens: - // < key : KEY value : VALUE > - // Technically the "key" and "value" could come in any order, - // but in practice they won't. - - tok := p.next() - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - if err := p.consumeToken("key"); err != nil { - return err - } - if err := p.consumeToken(":"); err != nil { - return err - } - if err := p.readAny(key, props.mkeyprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - if err := p.consumeToken("value"); err != nil { - return err - } - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { - return err - } - if err := p.readAny(val, props.mvalprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - if err := p.consumeToken(terminator); err != nil { - return err - } - - dst.SetMapIndex(key, val) - continue - } - - // Check that it's not already set if it's not a repeated field. - if !props.Repeated && fieldSet[name] { - return p.errorf("non-repeated field %q was repeated", name) - } - - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Parse into the field. - fieldSet[name] = true - if err := p.readAny(dst, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } else if props.Required { - reqCount-- - } - - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - - } - - if reqCount > 0 { - return p.missingRequiredFieldError(sv) - } - return reqFieldErr -} - -// consumeOptionalSeparator consumes an optional semicolon or comma. -// It is used in readStruct to provide backward compatibility. -func (p *textParser) consumeOptionalSeparator() error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ";" && tok.value != "," { - p.back() - } - return nil -} - -func (p *textParser) readAny(v reflect.Value, props *Properties) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "" { - return p.errorf("unexpected EOF") - } - if len(props.CustomType) > 0 { - if props.Repeated { - t := reflect.TypeOf(v.Interface()) - if t.Kind() == reflect.Slice { - tc := reflect.TypeOf(new(Marshaler)) - ok := t.Elem().Implements(tc.Elem()) - if ok { - fv := v - flen := fv.Len() - if flen == fv.Cap() { - nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) - reflect.Copy(nav, fv) - fv.Set(nav) - } - fv.SetLen(flen + 1) - - // Read one. - p.back() - return p.readAny(fv.Index(flen), props) - } - } - } - if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { - custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) - err := custom.Unmarshal([]byte(tok.unquoted)) - if err != nil { - return p.errorf("%v %v: %v", err, v.Type(), tok.value) - } - v.Set(reflect.ValueOf(custom)) - } else { - custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) - err := custom.Unmarshal([]byte(tok.unquoted)) - if err != nil { - return p.errorf("%v %v: %v", err, v.Type(), tok.value) - } - v.Set(reflect.Indirect(reflect.ValueOf(custom))) - } - return nil - } - switch fv := v; fv.Kind() { - case reflect.Slice: - at := v.Type() - if at.Elem().Kind() == reflect.Uint8 { - // Special case for []byte - if tok.value[0] != '"' && tok.value[0] != '\'' { - // Deliberately written out here, as the error after - // this switch statement would write "invalid []byte: ...", - // which is not as user-friendly. - return p.errorf("invalid string: %v", tok.value) - } - bytes := []byte(tok.unquoted) - fv.Set(reflect.ValueOf(bytes)) - return nil - } - // Repeated field. - if tok.value == "[" { - // Repeated field with list notation, like [1,2,3]. - for { - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - err := p.readAny(fv.Index(fv.Len()-1), props) - if err != nil { - return err - } - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "]" { - break - } - if tok.value != "," { - return p.errorf("Expected ']' or ',' found %q", tok.value) - } - } - return nil - } - // One value of the repeated field. - p.back() - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - return p.readAny(fv.Index(fv.Len()-1), props) - case reflect.Bool: - // Either "true", "false", 1 or 0. - switch tok.value { - case "true", "1": - fv.SetBool(true) - return nil - case "false", "0": - fv.SetBool(false) - return nil - } - case reflect.Float32, reflect.Float64: - v := tok.value - // Ignore 'f' for compatibility with output generated by C++, but don't - // remove 'f' when the value is "-inf" or "inf". - if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { - v = v[:len(v)-1] - } - if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { - fv.SetFloat(f) - return nil - } - case reflect.Int32: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - fv.SetInt(x) - return nil - } - - if len(props.Enum) == 0 { - break - } - m, ok := enumValueMaps[props.Enum] - if !ok { - break - } - x, ok := m[tok.value] - if !ok { - break - } - fv.SetInt(int64(x)) - return nil - case reflect.Int64: - if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { - fv.SetInt(x) - return nil - } - - case reflect.Ptr: - // A basic field (indirected through pointer), or a repeated message/group - p.back() - fv.Set(reflect.New(fv.Type().Elem())) - return p.readAny(fv.Elem(), props) - case reflect.String: - if tok.value[0] == '"' || tok.value[0] == '\'' { - fv.SetString(tok.unquoted) - return nil - } - case reflect.Struct: - var terminator string - switch tok.value { - case "{": - terminator = "}" - case "<": - terminator = ">" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - // TODO: Handle nested messages which implement encoding.TextUnmarshaler. - return p.readStruct(fv, terminator) - case reflect.Uint32: - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(uint64(x)) - return nil - } - case reflect.Uint64: - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - fv.SetUint(x) - return nil - } - } - return p.errorf("invalid %v: %v", v.Type(), tok.value) -} - -// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb -// before starting to unmarshal, so any existing data in pb is always removed. -// If a required field is not set and no other error occurs, -// UnmarshalText returns *RequiredNotSetError. -func UnmarshalText(s string, pb Message) error { - if um, ok := pb.(encoding.TextUnmarshaler); ok { - err := um.UnmarshalText([]byte(s)) - return err - } - pb.Reset() - v := reflect.ValueOf(pb) - if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { - return pe - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser_test.go deleted file mode 100644 index 664846c403..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,532 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "math" - "reflect" - "testing" - - . "github.com/gogo/protobuf/proto" - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" - . "github.com/gogo/protobuf/proto/testdata" -) - -type UnmarshalTextTest struct { - in string - err string // if "", no error expected - out *MyMessage -} - -func buildExtStructTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - SetExtension(msg, E_Ext_More, &Ext{ - Data: String("Hello, world!"), - }) - return UnmarshalTextTest{in: text, out: msg} -} - -func buildExtDataTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - SetExtension(msg, E_Ext_Text, String("Hello, world!")) - SetExtension(msg, E_Ext_Number, Int32(1729)) - return UnmarshalTextTest{in: text, out: msg} -} - -func buildExtRepStringTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { - panic(err) - } - return UnmarshalTextTest{in: text, out: msg} -} - -var unMarshalTextTests = []UnmarshalTextTest{ - // Basic - { - in: " count:42\n name:\"Dave\" ", - out: &MyMessage{ - Count: Int32(42), - Name: String("Dave"), - }, - }, - - // Empty quoted string - { - in: `count:42 name:""`, - out: &MyMessage{ - Count: Int32(42), - Name: String(""), - }, - }, - - // Quoted string concatenation - { - in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string with escaped apostrophe - { - in: `count:42 name: "HOLIDAY - New Year\'s Day"`, - out: &MyMessage{ - Count: Int32(42), - Name: String("HOLIDAY - New Year's Day"), - }, - }, - - // Quoted string with single quote - { - in: `count:42 name: 'Roger "The Ramster" Ramjet'`, - out: &MyMessage{ - Count: Int32(42), - Name: String(`Roger "The Ramster" Ramjet`), - }, - }, - - // Quoted string with all the accepted special characters from the C++ test - { - in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", - out: &MyMessage{ - Count: Int32(42), - Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), - }, - }, - - // Quoted string with quoted backslash - { - in: `count:42 name: "\\'xyz"`, - out: &MyMessage{ - Count: Int32(42), - Name: String(`\'xyz`), - }, - }, - - // Quoted string with UTF-8 bytes. - { - in: "count:42 name: '\303\277\302\201\xAB'", - out: &MyMessage{ - Count: Int32(42), - Name: String("\303\277\302\201\xAB"), - }, - }, - - // Bad quoted string - { - in: `inner: < host: "\0" >` + "\n", - err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, - }, - - // Number too large for int64 - { - in: "count: 1 others { key: 123456789012345678901 }", - err: "line 1.23: invalid int64: 123456789012345678901", - }, - - // Number too large for int32 - { - in: "count: 1234567890123", - err: "line 1.7: invalid int32: 1234567890123", - }, - - // Number in hexadecimal - { - in: "count: 0x2beef", - out: &MyMessage{ - Count: Int32(0x2beef), - }, - }, - - // Number in octal - { - in: "count: 024601", - out: &MyMessage{ - Count: Int32(024601), - }, - }, - - // Floating point number with "f" suffix - { - in: "count: 4 others:< weight: 17.0f >", - out: &MyMessage{ - Count: Int32(4), - Others: []*OtherMessage{ - { - Weight: Float32(17), - }, - }, - }, - }, - - // Floating point positive infinity - { - in: "count: 4 bigfloat: inf", - out: &MyMessage{ - Count: Int32(4), - Bigfloat: Float64(math.Inf(1)), - }, - }, - - // Floating point negative infinity - { - in: "count: 4 bigfloat: -inf", - out: &MyMessage{ - Count: Int32(4), - Bigfloat: Float64(math.Inf(-1)), - }, - }, - - // Number too large for float32 - { - in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", - err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", - }, - - // Number posing as a quoted string - { - in: `inner: < host: 12 >` + "\n", - err: `line 1.15: invalid string: 12`, - }, - - // Quoted string posing as int32 - { - in: `count: "12"`, - err: `line 1.7: invalid int32: "12"`, - }, - - // Quoted string posing a float32 - { - in: `others:< weight: "17.4" >`, - err: `line 1.17: invalid float32: "17.4"`, - }, - - // Enum - { - in: `count:42 bikeshed: BLUE`, - out: &MyMessage{ - Count: Int32(42), - Bikeshed: MyMessage_BLUE.Enum(), - }, - }, - - // Repeated field - { - in: `count:42 pet: "horsey" pet:"bunny"`, - out: &MyMessage{ - Count: Int32(42), - Pet: []string{"horsey", "bunny"}, - }, - }, - - // Repeated field with list notation - { - in: `count:42 pet: ["horsey", "bunny"]`, - out: &MyMessage{ - Count: Int32(42), - Pet: []string{"horsey", "bunny"}, - }, - }, - - // Repeated message with/without colon and <>/{} - { - in: `count:42 others:{} others{} others:<> others:{}`, - out: &MyMessage{ - Count: Int32(42), - Others: []*OtherMessage{ - {}, - {}, - {}, - {}, - }, - }, - }, - - // Missing colon for inner message - { - in: `count:42 inner < host: "cauchy.syd" >`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("cauchy.syd"), - }, - }, - }, - - // Missing colon for string field - { - in: `name "Dave"`, - err: `line 1.5: expected ':', found "\"Dave\""`, - }, - - // Missing colon for int32 field - { - in: `count 42`, - err: `line 1.6: expected ':', found "42"`, - }, - - // Missing required field - { - in: `name: "Pawel"`, - err: `proto: required field "testdata.MyMessage.count" not set`, - out: &MyMessage{ - Name: String("Pawel"), - }, - }, - - // Repeated non-repeated field - { - in: `name: "Rob" name: "Russ"`, - err: `line 1.12: non-repeated field "name" was repeated`, - }, - - // Group - { - in: `count: 17 SomeGroup { group_field: 12 }`, - out: &MyMessage{ - Count: Int32(17), - Somegroup: &MyMessage_SomeGroup{ - GroupField: Int32(12), - }, - }, - }, - - // Semicolon between fields - { - in: `count:3;name:"Calvin"`, - out: &MyMessage{ - Count: Int32(3), - Name: String("Calvin"), - }, - }, - // Comma between fields - { - in: `count:4,name:"Ezekiel"`, - out: &MyMessage{ - Count: Int32(4), - Name: String("Ezekiel"), - }, - }, - - // Extension - buildExtStructTest(`count: 42 [testdata.Ext.more]:`), - buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), - buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), - buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), - - // Big all-in-one - { - in: "count:42 # Meaning\n" + - `name:"Dave" ` + - `quote:"\"I didn't want to go.\"" ` + - `pet:"bunny" ` + - `pet:"kitty" ` + - `pet:"horsey" ` + - `inner:<` + - ` host:"footrest.syd" ` + - ` port:7001 ` + - ` connected:true ` + - `> ` + - `others:<` + - ` key:3735928559 ` + - ` value:"\x01A\a\f" ` + - `> ` + - `others:<` + - " weight:58.9 # Atomic weight of Co\n" + - ` inner:<` + - ` host:"lesha.mtv" ` + - ` port:8002 ` + - ` >` + - `>`, - out: &MyMessage{ - Count: Int32(42), - Name: String("Dave"), - Quote: String(`"I didn't want to go."`), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &InnerMessage{ - Host: String("footrest.syd"), - Port: Int32(7001), - Connected: Bool(true), - }, - Others: []*OtherMessage{ - { - Key: Int64(3735928559), - Value: []byte{0x1, 'A', '\a', '\f'}, - }, - { - Weight: Float32(58.9), - Inner: &InnerMessage{ - Host: String("lesha.mtv"), - Port: Int32(8002), - }, - }, - }, - }, - }, -} - -func TestUnmarshalText(t *testing.T) { - for i, test := range unMarshalTextTests { - pb := new(MyMessage) - err := UnmarshalText(test.in, pb) - if test.err == "" { - // We don't expect failure. - if err != nil { - t.Errorf("Test %d: Unexpected error: %v", i, err) - } else if !reflect.DeepEqual(pb, test.out) { - t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", - i, pb, test.out) - } - } else { - // We do expect failure. - if err == nil { - t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) - } else if err.Error() != test.err { - t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", - i, err.Error(), test.err) - } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { - t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", - i, pb, test.out) - } - } - } -} - -func TestUnmarshalTextCustomMessage(t *testing.T) { - msg := &textMessage{} - if err := UnmarshalText("custom", msg); err != nil { - t.Errorf("Unexpected error from custom unmarshal: %v", err) - } - if UnmarshalText("not custom", msg) == nil { - t.Errorf("Didn't get expected error from custom unmarshal") - } -} - -// Regression test; this caused a panic. -func TestRepeatedEnum(t *testing.T) { - pb := new(RepeatedEnum) - if err := UnmarshalText("color: RED", pb); err != nil { - t.Fatal(err) - } - exp := &RepeatedEnum{ - Color: []RepeatedEnum_Color{RepeatedEnum_RED}, - } - if !Equal(pb, exp) { - t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) - } -} - -func TestProto3TextParsing(t *testing.T) { - m := new(proto3pb.Message) - const in = `name: "Wallace" true_scotsman: true` - want := &proto3pb.Message{ - Name: "Wallace", - TrueScotsman: true, - } - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -func TestMapParsing(t *testing.T) { - m := new(MessageWithMap) - const in = `name_mapping: name_mapping:` + - `msg_mapping:,>` + // separating commas are okay - `msg_mapping>` + // no colon after "value" - `byte_mapping:` - want := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Beatles", - 1234: "Feist", - }, - MsgMapping: map[int64]*FloatingPoint{ - -4: {F: Float64(2.0)}, - -2: {F: Float64(4.0)}, - }, - ByteMapping: map[bool][]byte{ - true: []byte("so be it"), - }, - } - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -func TestOneofParsing(t *testing.T) { - const in = `name:"Shrek"` - m := new(Communique) - want := &Communique{Union: &Communique_Name{"Shrek"}} - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -var benchInput string - -func init() { - benchInput = "count: 4\n" - for i := 0; i < 1000; i++ { - benchInput += "pet: \"fido\"\n" - } - - // Check it is valid input. - pb := new(MyMessage) - err := UnmarshalText(benchInput, pb) - if err != nil { - panic("Bad benchmark input: " + err.Error()) - } -} - -func BenchmarkUnmarshalText(b *testing.B) { - pb := new(MyMessage) - for i := 0; i < b.N; i++ { - UnmarshalText(benchInput, pb) - } - b.SetBytes(int64(len(benchInput))) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_test.go deleted file mode 100644 index 6524048428..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/proto/text_test.go +++ /dev/null @@ -1,474 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "errors" - "io/ioutil" - "math" - "strings" - "testing" - - "github.com/gogo/protobuf/proto" - - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -// textMessage implements the methods that allow it to marshal and unmarshal -// itself as text. -type textMessage struct { -} - -func (*textMessage) MarshalText() ([]byte, error) { - return []byte("custom"), nil -} - -func (*textMessage) UnmarshalText(bytes []byte) error { - if string(bytes) != "custom" { - return errors.New("expected 'custom'") - } - return nil -} - -func (*textMessage) Reset() {} -func (*textMessage) String() string { return "" } -func (*textMessage) ProtoMessage() {} - -func newTestMessage() *pb.MyMessage { - msg := &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - Quote: proto.String(`"I didn't want to go."`), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &pb.InnerMessage{ - Host: proto.String("footrest.syd"), - Port: proto.Int32(7001), - Connected: proto.Bool(true), - }, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(0xdeadbeef), - Value: []byte{1, 65, 7, 12}, - }, - { - Weight: proto.Float32(6.022), - Inner: &pb.InnerMessage{ - Host: proto.String("lesha.mtv"), - Port: proto.Int32(8002), - }, - }, - }, - Bikeshed: pb.MyMessage_BLUE.Enum(), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(8), - }, - // One normally wouldn't do this. - // This is an undeclared tag 13, as a varint (wire type 0) with value 4. - XXX_unrecognized: []byte{13<<3 | 0, 4}, - } - ext := &pb.Ext{ - Data: proto.String("Big gobs for big rats"), - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { - panic(err) - } - greetings := []string{"adg", "easy", "cow"} - if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { - panic(err) - } - - // Add an unknown extension. We marshal a pb.Ext, and fake the ID. - b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) - if err != nil { - panic(err) - } - b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) - proto.SetRawExtension(msg, 201, b) - - // Extensions can be plain fields, too, so let's test that. - b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) - proto.SetRawExtension(msg, 202, b) - - return msg -} - -const text = `count: 42 -name: "Dave" -quote: "\"I didn't want to go.\"" -pet: "bunny" -pet: "kitty" -pet: "horsey" -inner: < - host: "footrest.syd" - port: 7001 - connected: true -> -others: < - key: 3735928559 - value: "\001A\007\014" -> -others: < - weight: 6.022 - inner: < - host: "lesha.mtv" - port: 8002 - > -> -bikeshed: BLUE -SomeGroup { - group_field: 8 -} -/* 2 unknown bytes */ -13: 4 -[testdata.Ext.more]: < - data: "Big gobs for big rats" -> -[testdata.greeting]: "adg" -[testdata.greeting]: "easy" -[testdata.greeting]: "cow" -/* 13 unknown bytes */ -201: "\t3G skiing" -/* 3 unknown bytes */ -202: 19 -` - -func TestMarshalText(t *testing.T) { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, newTestMessage()); err != nil { - t.Fatalf("proto.MarshalText: %v", err) - } - s := buf.String() - if s != text { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) - } -} - -func TestMarshalTextCustomMessage(t *testing.T) { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, &textMessage{}); err != nil { - t.Fatalf("proto.MarshalText: %v", err) - } - s := buf.String() - if s != "custom" { - t.Errorf("Got %q, expected %q", s, "custom") - } -} -func TestMarshalTextNil(t *testing.T) { - want := "" - tests := []proto.Message{nil, (*pb.MyMessage)(nil)} - for i, test := range tests { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, test); err != nil { - t.Fatal(err) - } - if got := buf.String(); got != want { - t.Errorf("%d: got %q want %q", i, got, want) - } - } -} - -func TestMarshalTextUnknownEnum(t *testing.T) { - // The Color enum only specifies values 0-2. - m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} - got := m.String() - const want = `bikeshed:3 ` - if got != want { - t.Errorf("\n got %q\nwant %q", got, want) - } -} - -func TestTextOneof(t *testing.T) { - tests := []struct { - m proto.Message - want string - }{ - // zero message - {&pb.Communique{}, ``}, - // scalar field - {&pb.Communique{Union: &pb.Communique_Number{Number: 4}}, `number:4`}, - // message field - {&pb.Communique{Union: &pb.Communique_Msg{ - Msg: &pb.Strings{StringField: proto.String("why hello!")}, - }}, `msg:`}, - // bad oneof (should not panic) - {&pb.Communique{Union: &pb.Communique_Msg{Msg: nil}}, `msg:/* nil */`}, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} - -func BenchmarkMarshalTextBuffered(b *testing.B) { - buf := new(bytes.Buffer) - m := newTestMessage() - for i := 0; i < b.N; i++ { - buf.Reset() - proto.MarshalText(buf, m) - } -} - -func BenchmarkMarshalTextUnbuffered(b *testing.B) { - w := ioutil.Discard - m := newTestMessage() - for i := 0; i < b.N; i++ { - proto.MarshalText(w, m) - } -} - -func compact(src string) string { - // s/[ \n]+/ /g; s/ $//; - dst := make([]byte, len(src)) - space, comment := false, false - j := 0 - for i := 0; i < len(src); i++ { - if strings.HasPrefix(src[i:], "/*") { - comment = true - i++ - continue - } - if comment && strings.HasPrefix(src[i:], "*/") { - comment = false - i++ - continue - } - if comment { - continue - } - c := src[i] - if c == ' ' || c == '\n' { - space = true - continue - } - if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { - space = false - } - if c == '{' { - space = false - } - if space { - dst[j] = ' ' - j++ - space = false - } - dst[j] = c - j++ - } - if space { - dst[j] = ' ' - j++ - } - return string(dst[0:j]) -} - -var compactText = compact(text) - -func TestCompactText(t *testing.T) { - s := proto.CompactTextString(newTestMessage()) - if s != compactText { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) - } -} - -func TestStringEscaping(t *testing.T) { - testCases := []struct { - in *pb.Strings - out string - }{ - { - // Test data from C++ test (TextFormatTest.StringEscape). - // Single divergence: we don't escape apostrophes. - &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, - "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", - }, - { - // Test data from the same C++ test. - &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, - "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", - }, - { - // Some UTF-8. - &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, - `string_field: "\000\001\377\201"` + "\n", - }, - } - - for i, tc := range testCases { - var buf bytes.Buffer - if err := proto.MarshalText(&buf, tc.in); err != nil { - t.Errorf("proto.MarsalText: %v", err) - continue - } - s := buf.String() - if s != tc.out { - t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) - continue - } - - // Check round-trip. - pb := new(pb.Strings) - if err := proto.UnmarshalText(s, pb); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pb, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) - } - } -} - -// A limitedWriter accepts some output before it fails. -// This is a proxy for something like a nearly-full or imminently-failing disk, -// or a network connection that is about to die. -type limitedWriter struct { - b bytes.Buffer - limit int -} - -var outOfSpace = errors.New("proto: insufficient space") - -func (w *limitedWriter) Write(p []byte) (n int, err error) { - var avail = w.limit - w.b.Len() - if avail <= 0 { - return 0, outOfSpace - } - if len(p) <= avail { - return w.b.Write(p) - } - n, _ = w.b.Write(p[:avail]) - return n, outOfSpace -} - -func TestMarshalTextFailing(t *testing.T) { - // Try lots of different sizes to exercise more error code-paths. - for lim := 0; lim < len(text); lim++ { - buf := new(limitedWriter) - buf.limit = lim - err := proto.MarshalText(buf, newTestMessage()) - // We expect a certain error, but also some partial results in the buffer. - if err != outOfSpace { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) - } - s := buf.b.String() - x := text[:buf.limit] - if s != x { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) - } - } -} - -func TestFloats(t *testing.T) { - tests := []struct { - f float64 - want string - }{ - {0, "0"}, - {4.7, "4.7"}, - {math.Inf(1), "inf"}, - {math.Inf(-1), "-inf"}, - {math.NaN(), "nan"}, - } - for _, test := range tests { - msg := &pb.FloatingPoint{F: &test.f} - got := strings.TrimSpace(msg.String()) - want := `f:` + test.want - if got != want { - t.Errorf("f=%f: got %q, want %q", test.f, got, want) - } - } -} - -func TestRepeatedNilText(t *testing.T) { - m := &pb.MessageList{ - Message: []*pb.MessageList_Message{ - nil, - { - Name: proto.String("Horse"), - }, - nil, - }, - } - want := `Message -Message { - name: "Horse" -} -Message -` - if s := proto.MarshalTextString(m); s != want { - t.Errorf(" got: %s\nwant: %s", s, want) - } -} - -func TestProto3Text(t *testing.T) { - tests := []struct { - m proto.Message - want string - }{ - // zero message - {&proto3pb.Message{}, ``}, - // zero message except for an empty byte slice - {&proto3pb.Message{Data: []byte{}}, ``}, - // trivial case - {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, - // empty map - {&pb.MessageWithMap{}, ``}, - // non-empty map; map format is the same as a repeated struct, - // and they are sorted by key (numerically for numeric keys). - { - &pb.MessageWithMap{NameMapping: map[int32]string{ - -1: "Negatory", - 7: "Lucky", - 1234: "Feist", - 6345789: "Otis", - }}, - `name_mapping: ` + - `name_mapping: ` + - `name_mapping: ` + - `name_mapping:`, - }, - // map with nil value; not well-defined, but we shouldn't crash - { - &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, - `msg_mapping:`, - }, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/compiler/plugin.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/compiler/plugin.proto deleted file mode 100644 index 5116167e08..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/compiler/plugin.proto +++ /dev/null @@ -1,150 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to -// change. -// -// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is -// just a program that reads a CodeGeneratorRequest from stdin and writes a -// CodeGeneratorResponse to stdout. -// -// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead -// of dealing with the raw protocol defined here. -// -// A plugin executable needs only to be placed somewhere in the path. The -// plugin should be named "protoc-gen-$NAME", and will then be used when the -// flag "--${NAME}_out" is passed to protoc. - -syntax = "proto2"; -package google.protobuf.compiler; -option java_package = "com.google.protobuf.compiler"; -option java_outer_classname = "PluginProtos"; - -option go_package = "plugin_go"; - -import "google/protobuf/descriptor.proto"; - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -message CodeGeneratorRequest { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - repeated string file_to_generate = 1; - - // The generator parameter passed on the command-line. - optional string parameter = 2; - - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - repeated FileDescriptorProto proto_file = 15; -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -message CodeGeneratorResponse { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - optional string error = 1; - - // Represents a single generated file. - message File { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - optional string name = 1; - - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - optional string insertion_point = 2; - - // The file contents. - optional string content = 15; - } - repeated File file = 15; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/descriptor.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/descriptor.proto deleted file mode 100644 index 14594a8c6e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protobuf/google/protobuf/descriptor.proto +++ /dev/null @@ -1,779 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - -syntax = "proto2"; - -package google.protobuf; -option go_package = "descriptor"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; // Tag-delimited aggregate. - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - // TODO(sanjay): Should we add LABEL_MAP? - }; - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - - optional FieldOptions options = 8; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default=false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default=false]; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; - - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. - // This increases generated code size, potentially substantially for large - // protos, which may harm a memory-constrained application. - // - In the full runtime this is a speed optimization, as the - // AbstractMessage base class includes reflection-based implementations of - // these methods. - // - In the lite runtime, setting this option changes the semantics of - // equals() and hashCode() to more closely match those of the full runtime; - // the generated methods compute their results based on field values rather - // than object identity. (Implementations should not assume that hashcodes - // will be consistent across runtimes or versions of the protocol compiler.) - optional bool java_generate_equals_and_hash = 20 [default=false]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default=SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - optional string go_package = 11; - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default=false]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - - // Whether the nano proto compiler should generate in the deprecated non-nano - // suffixed package. - optional bool javanano_use_deprecated_package = 38; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - optional bool packed = 2; - - - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). By default these types are - // represented as JavaScript strings. This avoids loss of precision that can - // happen when a large value is converted to a floating point JavaScript - // numbers. Specifying JS_NUMBER for the jstype causes the generated - // JavaScript code to use the JavaScript "number" type instead of strings. - // This option is an enum to permit additional types to be added, - // e.g. goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outher message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default=false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default=false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-combo/combo.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-combo/combo.go deleted file mode 100644 index 4865e436c4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-combo/combo.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "bufio" - "bytes" - "flag" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "strings" - - "github.com/gogo/protobuf/version" -) - -type MixMatch struct { - Old []string - Filename string - Args []string - Plugins string -} - -func (this MixMatch) Gen(folder string, news []string) { - if err := os.MkdirAll(folder, 0777); err != nil { - panic(err) - } - data, err := ioutil.ReadFile(this.Filename) - if err != nil { - panic(err) - } - content := string(data) - for i, old := range this.Old { - if !strings.Contains(content, old) { - panic(fmt.Errorf("could not find string {%s} to replace with {%s}", old, news[i])) - } - content = strings.Replace(content, old, news[i], 1) - if strings.Contains(content, old) && old != news[i] { - panic(fmt.Errorf("found another string {%s} after it was replaced with {%s}", old, news[i])) - } - } - if err := ioutil.WriteFile(filepath.Join(folder, this.Filename), []byte(content), 0666); err != nil { - panic(err) - } - args := append([]string{"--gogo_out=" + this.Plugins + "."}, this.Args...) - args = append(args, filepath.Join(folder, this.Filename)) - var regenerate = exec.Command("protoc", args...) - out, err := regenerate.CombinedOutput() - - failed := false - scanner := bufio.NewScanner(bytes.NewReader(out)) - for scanner.Scan() { - text := scanner.Text() - fmt.Println("protoc-gen-combo: ", text) - if !strings.Contains(text, "WARNING") { - failed = true - } - } - - if err != nil { - fmt.Print("protoc-gen-combo: error: ", err) - failed = true - } - - if failed { - os.Exit(1) - } -} - -var min = flag.String("version", "2.3.0", "minimum protoc version") -var proto_path = flag.String("proto_path", ".", "") -var def = flag.Bool("default", true, "generate the case where everything is false") -var plugins = flag.String("plugins", "", "--gogo_out=plugins=:.") - -func main() { - flag.Parse() - if !version.AtLeast(*min) { - fmt.Printf("protoc version not high enough to parse this proto file\n") - return - } - args := flag.Args() - filename := args[0] - args = append([]string{"--proto_path=" + *proto_path}) - if _, err := exec.LookPath("protoc"); err != nil { - panic("cannot find protoc in PATH") - } - pluginStr := "" - if len(*plugins) > 0 { - pluginStr = "plugins=" + *plugins + ":" - } - m := MixMatch{ - Old: []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }, - Filename: filename, - Args: args, - Plugins: pluginStr, - } - if *def { - m.Gen("./combos/neither/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - } - m.Gen("./combos/marshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unmarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/both/", []string{ - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unsafemarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = true;", - }) - m.Gen("./combos/unsafeunmarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = true;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unsafeboth/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = true;", - "option (gogoproto.unsafe_marshaler_all) = true;", - }) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gofast/main.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gofast/main.go deleted file mode 100644 index b8ee60f7ac..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gofast/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "github.com/gogo/protobuf/vanity" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - files := req.GetProtoFile() - - vanity.ForEachFile(files, vanity.TurnOffGogoImport) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/Makefile deleted file mode 100644 index a42cc3717f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -test: - cd testdata && make test diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile deleted file mode 100644 index d80ceffee2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go deleted file mode 100644 index 0eeadb3f7e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go +++ /dev/null @@ -1,1825 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: descriptor.proto -// DO NOT EDIT! - -/* -Package descriptor is a generated protocol buffer package. - -It is generated from these files: - descriptor.proto - -It has these top-level messages: - FileDescriptorSet - FileDescriptorProto - DescriptorProto - FieldDescriptorProto - OneofDescriptorProto - EnumDescriptorProto - EnumValueDescriptorProto - ServiceDescriptorProto - MethodDescriptorProto - FileOptions - MessageOptions - FieldOptions - EnumOptions - EnumValueOptions - ServiceOptions - MethodOptions - UninterpretedOption - SourceCodeInfo -*/ -package descriptor - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type FieldDescriptorProto_Type int32 - -const ( - // 0 is reserved for errors. - // Order is weird for historical reasons. - FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 - FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 - FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 - FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 - FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 - FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 - FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 - FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 - FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 - // New in version 2. - FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 - FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 - FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 - FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 - FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 - FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 - FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 -) - -var FieldDescriptorProto_Type_name = map[int32]string{ - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", -} -var FieldDescriptorProto_Type_value = map[string]int32{ - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, -} - -func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { - p := new(FieldDescriptorProto_Type) - *p = x - return p -} -func (x FieldDescriptorProto_Type) String() string { - return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) -} -func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") - if err != nil { - return err - } - *x = FieldDescriptorProto_Type(value) - return nil -} - -type FieldDescriptorProto_Label int32 - -const ( - // 0 is reserved for errors - FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 - FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 - FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 -) - -var FieldDescriptorProto_Label_name = map[int32]string{ - 1: "LABEL_OPTIONAL", - 2: "LABEL_REQUIRED", - 3: "LABEL_REPEATED", -} -var FieldDescriptorProto_Label_value = map[string]int32{ - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3, -} - -func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { - p := new(FieldDescriptorProto_Label) - *p = x - return p -} -func (x FieldDescriptorProto_Label) String() string { - return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) -} -func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") - if err != nil { - return err - } - *x = FieldDescriptorProto_Label(value) - return nil -} - -// Generated classes can be optimized for speed or code size. -type FileOptions_OptimizeMode int32 - -const ( - FileOptions_SPEED FileOptions_OptimizeMode = 1 - // etc. - FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 - FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 -) - -var FileOptions_OptimizeMode_name = map[int32]string{ - 1: "SPEED", - 2: "CODE_SIZE", - 3: "LITE_RUNTIME", -} -var FileOptions_OptimizeMode_value = map[string]int32{ - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3, -} - -func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { - p := new(FileOptions_OptimizeMode) - *p = x - return p -} -func (x FileOptions_OptimizeMode) String() string { - return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) -} -func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") - if err != nil { - return err - } - *x = FileOptions_OptimizeMode(value) - return nil -} - -type FieldOptions_CType int32 - -const ( - // Default mode. - FieldOptions_STRING FieldOptions_CType = 0 - FieldOptions_CORD FieldOptions_CType = 1 - FieldOptions_STRING_PIECE FieldOptions_CType = 2 -) - -var FieldOptions_CType_name = map[int32]string{ - 0: "STRING", - 1: "CORD", - 2: "STRING_PIECE", -} -var FieldOptions_CType_value = map[string]int32{ - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2, -} - -func (x FieldOptions_CType) Enum() *FieldOptions_CType { - p := new(FieldOptions_CType) - *p = x - return p -} -func (x FieldOptions_CType) String() string { - return proto.EnumName(FieldOptions_CType_name, int32(x)) -} -func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") - if err != nil { - return err - } - *x = FieldOptions_CType(value) - return nil -} - -type FieldOptions_JSType int32 - -const ( - // Use the default type. - FieldOptions_JS_NORMAL FieldOptions_JSType = 0 - // Use JavaScript strings. - FieldOptions_JS_STRING FieldOptions_JSType = 1 - // Use JavaScript numbers. - FieldOptions_JS_NUMBER FieldOptions_JSType = 2 -) - -var FieldOptions_JSType_name = map[int32]string{ - 0: "JS_NORMAL", - 1: "JS_STRING", - 2: "JS_NUMBER", -} -var FieldOptions_JSType_value = map[string]int32{ - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2, -} - -func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { - p := new(FieldOptions_JSType) - *p = x - return p -} -func (x FieldOptions_JSType) String() string { - return proto.EnumName(FieldOptions_JSType_name, int32(x)) -} -func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") - if err != nil { - return err - } - *x = FieldOptions_JSType(value) - return nil -} - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -type FileDescriptorSet struct { - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } -func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorSet) ProtoMessage() {} - -func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { - if m != nil { - return m.File - } - return nil -} - -// Describes a complete .proto file. -type FileDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` - // Names of files imported by this file. - Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` - // Indexes of the public imported files in the dependency list above. - PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency" json:"public_dependency,omitempty"` - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency" json:"weak_dependency,omitempty"` - // All top-level definitions in this file. - MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type" json:"message_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type" json:"enum_type,omitempty"` - Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` - Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info" json:"source_code_info,omitempty"` - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } -func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorProto) ProtoMessage() {} - -func (m *FileDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FileDescriptorProto) GetPackage() string { - if m != nil && m.Package != nil { - return *m.Package - } - return "" -} - -func (m *FileDescriptorProto) GetDependency() []string { - if m != nil { - return m.Dependency - } - return nil -} - -func (m *FileDescriptorProto) GetPublicDependency() []int32 { - if m != nil { - return m.PublicDependency - } - return nil -} - -func (m *FileDescriptorProto) GetWeakDependency() []int32 { - if m != nil { - return m.WeakDependency - } - return nil -} - -func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { - if m != nil { - return m.MessageType - } - return nil -} - -func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { - if m != nil { - return m.Service - } - return nil -} - -func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *FileDescriptorProto) GetOptions() *FileOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { - if m != nil { - return m.SourceCodeInfo - } - return nil -} - -func (m *FileDescriptorProto) GetSyntax() string { - if m != nil && m.Syntax != nil { - return *m.Syntax - } - return "" -} - -// Describes a message type. -type DescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` - NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type" json:"nested_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type" json:"enum_type,omitempty"` - ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range" json:"extension_range,omitempty"` - OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl" json:"oneof_decl,omitempty"` - Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` - ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range" json:"reserved_range,omitempty"` - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name" json:"reserved_name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } -func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto) ProtoMessage() {} - -func (m *DescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *DescriptorProto) GetField() []*FieldDescriptorProto { - if m != nil { - return m.Field - } - return nil -} - -func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *DescriptorProto) GetNestedType() []*DescriptorProto { - if m != nil { - return m.NestedType - } - return nil -} - -func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { - if m != nil { - return m.ExtensionRange - } - return nil -} - -func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { - if m != nil { - return m.OneofDecl - } - return nil -} - -func (m *DescriptorProto) GetOptions() *MessageOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { - if m != nil { - return m.ReservedRange - } - return nil -} - -func (m *DescriptorProto) GetReservedName() []string { - if m != nil { - return m.ReservedName - } - return nil -} - -type DescriptorProto_ExtensionRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } -func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ExtensionRange) ProtoMessage() {} - -func (m *DescriptorProto_ExtensionRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -// Range of reserved tag numbers. Reserved tag numbers may not be used by -// fields or extension ranges in the same message. Reserved ranges may -// not overlap. -type DescriptorProto_ReservedRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } -func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ReservedRange) ProtoMessage() {} - -func (m *DescriptorProto_ReservedRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ReservedRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -// Describes a field within a message. -type FieldDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` - Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - TypeName *string `protobuf:"bytes,6,opt,name=type_name" json:"type_name,omitempty"` - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - DefaultValue *string `protobuf:"bytes,7,opt,name=default_value" json:"default_value,omitempty"` - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index" json:"oneof_index,omitempty"` - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - JsonName *string `protobuf:"bytes,10,opt,name=json_name" json:"json_name,omitempty"` - Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } -func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FieldDescriptorProto) ProtoMessage() {} - -func (m *FieldDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FieldDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { - if m != nil && m.Label != nil { - return *m.Label - } - return FieldDescriptorProto_LABEL_OPTIONAL -} - -func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return FieldDescriptorProto_TYPE_DOUBLE -} - -func (m *FieldDescriptorProto) GetTypeName() string { - if m != nil && m.TypeName != nil { - return *m.TypeName - } - return "" -} - -func (m *FieldDescriptorProto) GetExtendee() string { - if m != nil && m.Extendee != nil { - return *m.Extendee - } - return "" -} - -func (m *FieldDescriptorProto) GetDefaultValue() string { - if m != nil && m.DefaultValue != nil { - return *m.DefaultValue - } - return "" -} - -func (m *FieldDescriptorProto) GetOneofIndex() int32 { - if m != nil && m.OneofIndex != nil { - return *m.OneofIndex - } - return 0 -} - -func (m *FieldDescriptorProto) GetJsonName() string { - if m != nil && m.JsonName != nil { - return *m.JsonName - } - return "" -} - -func (m *FieldDescriptorProto) GetOptions() *FieldOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a oneof. -type OneofDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } -func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*OneofDescriptorProto) ProtoMessage() {} - -func (m *OneofDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -// Describes an enum type. -type EnumDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } -func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumDescriptorProto) ProtoMessage() {} - -func (m *EnumDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { - if m != nil { - return m.Value - } - return nil -} - -func (m *EnumDescriptorProto) GetOptions() *EnumOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a value within an enum. -type EnumValueDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } -func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumValueDescriptorProto) ProtoMessage() {} - -func (m *EnumValueDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumValueDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a service. -type ServiceDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } -func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*ServiceDescriptorProto) ProtoMessage() {} - -func (m *ServiceDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { - if m != nil { - return m.Method - } - return nil -} - -func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a method of a service. -type MethodDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - InputType *string `protobuf:"bytes,2,opt,name=input_type" json:"input_type,omitempty"` - OutputType *string `protobuf:"bytes,3,opt,name=output_type" json:"output_type,omitempty"` - Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` - // Identifies if client streams multiple client messages - ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,def=0" json:"client_streaming,omitempty"` - // Identifies if server streams multiple server messages - ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,def=0" json:"server_streaming,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } -func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*MethodDescriptorProto) ProtoMessage() {} - -const Default_MethodDescriptorProto_ClientStreaming bool = false -const Default_MethodDescriptorProto_ServerStreaming bool = false - -func (m *MethodDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MethodDescriptorProto) GetInputType() string { - if m != nil && m.InputType != nil { - return *m.InputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOutputType() string { - if m != nil && m.OutputType != nil { - return *m.OutputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOptions() *MethodOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *MethodDescriptorProto) GetClientStreaming() bool { - if m != nil && m.ClientStreaming != nil { - return *m.ClientStreaming - } - return Default_MethodDescriptorProto_ClientStreaming -} - -func (m *MethodDescriptorProto) GetServerStreaming() bool { - if m != nil && m.ServerStreaming != nil { - return *m.ServerStreaming - } - return Default_MethodDescriptorProto_ServerStreaming -} - -type FileOptions struct { - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - JavaPackage *string `protobuf:"bytes,1,opt,name=java_package" json:"java_package,omitempty"` - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname" json:"java_outer_classname,omitempty"` - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,def=0" json:"java_multiple_files,omitempty"` - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. - // This increases generated code size, potentially substantially for large - // protos, which may harm a memory-constrained application. - // - In the full runtime this is a speed optimization, as the - // AbstractMessage base class includes reflection-based implementations of - // these methods. - // - In the lite runtime, setting this option changes the semantics of - // equals() and hashCode() to more closely match those of the full runtime; - // the generated methods compute their results based on field values rather - // than object identity. (Implementations should not assume that hashcodes - // will be consistent across runtimes or versions of the protocol compiler.) - JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,def=0" json:"java_generate_equals_and_hash,omitempty"` - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,def=0" json:"java_string_check_utf8,omitempty"` - OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - GoPackage *string `protobuf:"bytes,11,opt,name=go_package" json:"go_package,omitempty"` - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,def=0" json:"cc_generic_services,omitempty"` - JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,def=0" json:"java_generic_services,omitempty"` - PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,def=0" json:"py_generic_services,omitempty"` - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,def=0" json:"cc_enable_arenas,omitempty"` - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix" json:"objc_class_prefix,omitempty"` - // Namespace for generated classes; defaults to the package. - CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace" json:"csharp_namespace,omitempty"` - // Whether the nano proto compiler should generate in the deprecated non-nano - // suffixed package. - JavananoUseDeprecatedPackage *bool `protobuf:"varint,38,opt,name=javanano_use_deprecated_package" json:"javanano_use_deprecated_package,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileOptions) Reset() { *m = FileOptions{} } -func (m *FileOptions) String() string { return proto.CompactTextString(m) } -func (*FileOptions) ProtoMessage() {} - -var extRange_FileOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FileOptions -} -func (m *FileOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_FileOptions_JavaMultipleFiles bool = false -const Default_FileOptions_JavaGenerateEqualsAndHash bool = false -const Default_FileOptions_JavaStringCheckUtf8 bool = false -const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED -const Default_FileOptions_CcGenericServices bool = false -const Default_FileOptions_JavaGenericServices bool = false -const Default_FileOptions_PyGenericServices bool = false -const Default_FileOptions_Deprecated bool = false -const Default_FileOptions_CcEnableArenas bool = false - -func (m *FileOptions) GetJavaPackage() string { - if m != nil && m.JavaPackage != nil { - return *m.JavaPackage - } - return "" -} - -func (m *FileOptions) GetJavaOuterClassname() string { - if m != nil && m.JavaOuterClassname != nil { - return *m.JavaOuterClassname - } - return "" -} - -func (m *FileOptions) GetJavaMultipleFiles() bool { - if m != nil && m.JavaMultipleFiles != nil { - return *m.JavaMultipleFiles - } - return Default_FileOptions_JavaMultipleFiles -} - -func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { - if m != nil && m.JavaGenerateEqualsAndHash != nil { - return *m.JavaGenerateEqualsAndHash - } - return Default_FileOptions_JavaGenerateEqualsAndHash -} - -func (m *FileOptions) GetJavaStringCheckUtf8() bool { - if m != nil && m.JavaStringCheckUtf8 != nil { - return *m.JavaStringCheckUtf8 - } - return Default_FileOptions_JavaStringCheckUtf8 -} - -func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { - if m != nil && m.OptimizeFor != nil { - return *m.OptimizeFor - } - return Default_FileOptions_OptimizeFor -} - -func (m *FileOptions) GetGoPackage() string { - if m != nil && m.GoPackage != nil { - return *m.GoPackage - } - return "" -} - -func (m *FileOptions) GetCcGenericServices() bool { - if m != nil && m.CcGenericServices != nil { - return *m.CcGenericServices - } - return Default_FileOptions_CcGenericServices -} - -func (m *FileOptions) GetJavaGenericServices() bool { - if m != nil && m.JavaGenericServices != nil { - return *m.JavaGenericServices - } - return Default_FileOptions_JavaGenericServices -} - -func (m *FileOptions) GetPyGenericServices() bool { - if m != nil && m.PyGenericServices != nil { - return *m.PyGenericServices - } - return Default_FileOptions_PyGenericServices -} - -func (m *FileOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FileOptions_Deprecated -} - -func (m *FileOptions) GetCcEnableArenas() bool { - if m != nil && m.CcEnableArenas != nil { - return *m.CcEnableArenas - } - return Default_FileOptions_CcEnableArenas -} - -func (m *FileOptions) GetObjcClassPrefix() string { - if m != nil && m.ObjcClassPrefix != nil { - return *m.ObjcClassPrefix - } - return "" -} - -func (m *FileOptions) GetCsharpNamespace() string { - if m != nil && m.CsharpNamespace != nil { - return *m.CsharpNamespace - } - return "" -} - -func (m *FileOptions) GetJavananoUseDeprecatedPackage() bool { - if m != nil && m.JavananoUseDeprecatedPackage != nil { - return *m.JavananoUseDeprecatedPackage - } - return false -} - -func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MessageOptions struct { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,def=0" json:"message_set_wire_format,omitempty"` - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - MapEntry *bool `protobuf:"varint,7,opt,name=map_entry" json:"map_entry,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageOptions) Reset() { *m = MessageOptions{} } -func (m *MessageOptions) String() string { return proto.CompactTextString(m) } -func (*MessageOptions) ProtoMessage() {} - -var extRange_MessageOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MessageOptions -} -func (m *MessageOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_MessageOptions_MessageSetWireFormat bool = false -const Default_MessageOptions_NoStandardDescriptorAccessor bool = false -const Default_MessageOptions_Deprecated bool = false - -func (m *MessageOptions) GetMessageSetWireFormat() bool { - if m != nil && m.MessageSetWireFormat != nil { - return *m.MessageSetWireFormat - } - return Default_MessageOptions_MessageSetWireFormat -} - -func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { - if m != nil && m.NoStandardDescriptorAccessor != nil { - return *m.NoStandardDescriptorAccessor - } - return Default_MessageOptions_NoStandardDescriptorAccessor -} - -func (m *MessageOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MessageOptions_Deprecated -} - -func (m *MessageOptions) GetMapEntry() bool { - if m != nil && m.MapEntry != nil { - return *m.MapEntry - } - return false -} - -func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type FieldOptions struct { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). By default these types are - // represented as JavaScript strings. This avoids loss of precision that can - // happen when a large value is converted to a floating point JavaScript - // numbers. Specifying JS_NUMBER for the jstype causes the generated - // JavaScript code to use the JavaScript "number" type instead of strings. - // This option is an enum to permit additional types to be added, - // e.g. goog.math.Integer. - Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outher message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // For Google-internal migration only. Do not use. - Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FieldOptions) Reset() { *m = FieldOptions{} } -func (m *FieldOptions) String() string { return proto.CompactTextString(m) } -func (*FieldOptions) ProtoMessage() {} - -var extRange_FieldOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FieldOptions -} -func (m *FieldOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING -const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL -const Default_FieldOptions_Lazy bool = false -const Default_FieldOptions_Deprecated bool = false -const Default_FieldOptions_Weak bool = false - -func (m *FieldOptions) GetCtype() FieldOptions_CType { - if m != nil && m.Ctype != nil { - return *m.Ctype - } - return Default_FieldOptions_Ctype -} - -func (m *FieldOptions) GetPacked() bool { - if m != nil && m.Packed != nil { - return *m.Packed - } - return false -} - -func (m *FieldOptions) GetJstype() FieldOptions_JSType { - if m != nil && m.Jstype != nil { - return *m.Jstype - } - return Default_FieldOptions_Jstype -} - -func (m *FieldOptions) GetLazy() bool { - if m != nil && m.Lazy != nil { - return *m.Lazy - } - return Default_FieldOptions_Lazy -} - -func (m *FieldOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FieldOptions_Deprecated -} - -func (m *FieldOptions) GetWeak() bool { - if m != nil && m.Weak != nil { - return *m.Weak - } - return Default_FieldOptions_Weak -} - -func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumOptions struct { - // Set this option to true to allow mapping different tag names to the same - // value. - AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias" json:"allow_alias,omitempty"` - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumOptions) Reset() { *m = EnumOptions{} } -func (m *EnumOptions) String() string { return proto.CompactTextString(m) } -func (*EnumOptions) ProtoMessage() {} - -var extRange_EnumOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumOptions -} -func (m *EnumOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_EnumOptions_Deprecated bool = false - -func (m *EnumOptions) GetAllowAlias() bool { - if m != nil && m.AllowAlias != nil { - return *m.AllowAlias - } - return false -} - -func (m *EnumOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumOptions_Deprecated -} - -func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumValueOptions struct { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } -func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } -func (*EnumValueOptions) ProtoMessage() {} - -var extRange_EnumValueOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumValueOptions -} -func (m *EnumValueOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_EnumValueOptions_Deprecated bool = false - -func (m *EnumValueOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumValueOptions_Deprecated -} - -func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type ServiceOptions struct { - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } -func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } -func (*ServiceOptions) ProtoMessage() {} - -var extRange_ServiceOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ServiceOptions -} -func (m *ServiceOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_ServiceOptions_Deprecated bool = false - -func (m *ServiceOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_ServiceOptions_Deprecated -} - -func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MethodOptions struct { - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option" json:"uninterpreted_option,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MethodOptions) Reset() { *m = MethodOptions{} } -func (m *MethodOptions) String() string { return proto.CompactTextString(m) } -func (*MethodOptions) ProtoMessage() {} - -var extRange_MethodOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MethodOptions -} -func (m *MethodOptions) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -const Default_MethodOptions_Deprecated bool = false - -func (m *MethodOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MethodOptions_Deprecated -} - -func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -type UninterpretedOption struct { - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value" json:"identifier_value,omitempty"` - PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value" json:"positive_int_value,omitempty"` - NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value" json:"negative_int_value,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value" json:"double_value,omitempty"` - StringValue []byte `protobuf:"bytes,7,opt,name=string_value" json:"string_value,omitempty"` - AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value" json:"aggregate_value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } -func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption) ProtoMessage() {} - -func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { - if m != nil { - return m.Name - } - return nil -} - -func (m *UninterpretedOption) GetIdentifierValue() string { - if m != nil && m.IdentifierValue != nil { - return *m.IdentifierValue - } - return "" -} - -func (m *UninterpretedOption) GetPositiveIntValue() uint64 { - if m != nil && m.PositiveIntValue != nil { - return *m.PositiveIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetNegativeIntValue() int64 { - if m != nil && m.NegativeIntValue != nil { - return *m.NegativeIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetDoubleValue() float64 { - if m != nil && m.DoubleValue != nil { - return *m.DoubleValue - } - return 0 -} - -func (m *UninterpretedOption) GetStringValue() []byte { - if m != nil { - return m.StringValue - } - return nil -} - -func (m *UninterpretedOption) GetAggregateValue() string { - if m != nil && m.AggregateValue != nil { - return *m.AggregateValue - } - return "" -} - -// The name of the uninterpreted option. Each string represents a segment in -// a dot-separated name. is_extension is true iff a segment represents an -// extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". -type UninterpretedOption_NamePart struct { - NamePart *string `protobuf:"bytes,1,req,name=name_part" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension" json:"is_extension,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } -func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption_NamePart) ProtoMessage() {} - -func (m *UninterpretedOption_NamePart) GetNamePart() string { - if m != nil && m.NamePart != nil { - return *m.NamePart - } - return "" -} - -func (m *UninterpretedOption_NamePart) GetIsExtension() bool { - if m != nil && m.IsExtension != nil { - return *m.IsExtension - } - return false -} - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -type SourceCodeInfo struct { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } -func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo) ProtoMessage() {} - -func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { - if m != nil { - return m.Location - } - return nil -} - -type SourceCodeInfo_Location struct { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments" json:"leading_comments,omitempty"` - TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments" json:"trailing_comments,omitempty"` - LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments" json:"leading_detached_comments,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } -func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo_Location) ProtoMessage() {} - -func (m *SourceCodeInfo_Location) GetPath() []int32 { - if m != nil { - return m.Path - } - return nil -} - -func (m *SourceCodeInfo_Location) GetSpan() []int32 { - if m != nil { - return m.Span - } - return nil -} - -func (m *SourceCodeInfo_Location) GetLeadingComments() string { - if m != nil && m.LeadingComments != nil { - return *m.LeadingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetTrailingComments() string { - if m != nil && m.TrailingComments != nil { - return *m.TrailingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { - if m != nil { - return m.LeadingDetachedComments - } - return nil -} - -func init() { - proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") - proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") - proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") - proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") - proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") - proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") - proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") - proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") - proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") - proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") - proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") - proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") - proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") - proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") - proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") - proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") - proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") - proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") - proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") - proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") - proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") - proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) - proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) - proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) - proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/gostring.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/gostring.go deleted file mode 100644 index 76e2c95f9b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/gostring.go +++ /dev/null @@ -1,635 +0,0 @@ -package descriptor - -import fmt "fmt" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -func (this *FileDescriptorSet) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&descriptor.FileDescriptorSet{") - if this.File != nil { - s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FileDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&descriptor.FileDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Package != nil { - s = append(s, "Package: "+valueToGoStringDescriptor(this.Package, "string")+",\n") - } - if this.Dependency != nil { - s = append(s, "Dependency: "+fmt.Sprintf("%#v", this.Dependency)+",\n") - } - if this.PublicDependency != nil { - s = append(s, "PublicDependency: "+fmt.Sprintf("%#v", this.PublicDependency)+",\n") - } - if this.WeakDependency != nil { - s = append(s, "WeakDependency: "+fmt.Sprintf("%#v", this.WeakDependency)+",\n") - } - if this.MessageType != nil { - s = append(s, "MessageType: "+fmt.Sprintf("%#v", this.MessageType)+",\n") - } - if this.EnumType != nil { - s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") - } - if this.Service != nil { - s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n") - } - if this.Extension != nil { - s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.SourceCodeInfo != nil { - s = append(s, "SourceCodeInfo: "+fmt.Sprintf("%#v", this.SourceCodeInfo)+",\n") - } - if this.Syntax != nil { - s = append(s, "Syntax: "+valueToGoStringDescriptor(this.Syntax, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&descriptor.DescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Field != nil { - s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") - } - if this.Extension != nil { - s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") - } - if this.NestedType != nil { - s = append(s, "NestedType: "+fmt.Sprintf("%#v", this.NestedType)+",\n") - } - if this.EnumType != nil { - s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") - } - if this.ExtensionRange != nil { - s = append(s, "ExtensionRange: "+fmt.Sprintf("%#v", this.ExtensionRange)+",\n") - } - if this.OneofDecl != nil { - s = append(s, "OneofDecl: "+fmt.Sprintf("%#v", this.OneofDecl)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.ReservedRange != nil { - s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") - } - if this.ReservedName != nil { - s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DescriptorProto_ExtensionRange) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.DescriptorProto_ExtensionRange{") - if this.Start != nil { - s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") - } - if this.End != nil { - s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DescriptorProto_ReservedRange) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.DescriptorProto_ReservedRange{") - if this.Start != nil { - s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") - } - if this.End != nil { - s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FieldDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&descriptor.FieldDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") - } - if this.Label != nil { - s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "descriptor.FieldDescriptorProto_Label")+",\n") - } - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "descriptor.FieldDescriptorProto_Type")+",\n") - } - if this.TypeName != nil { - s = append(s, "TypeName: "+valueToGoStringDescriptor(this.TypeName, "string")+",\n") - } - if this.Extendee != nil { - s = append(s, "Extendee: "+valueToGoStringDescriptor(this.Extendee, "string")+",\n") - } - if this.DefaultValue != nil { - s = append(s, "DefaultValue: "+valueToGoStringDescriptor(this.DefaultValue, "string")+",\n") - } - if this.OneofIndex != nil { - s = append(s, "OneofIndex: "+valueToGoStringDescriptor(this.OneofIndex, "int32")+",\n") - } - if this.JsonName != nil { - s = append(s, "JsonName: "+valueToGoStringDescriptor(this.JsonName, "string")+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OneofDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&descriptor.OneofDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnumDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&descriptor.EnumDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnumValueDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&descriptor.EnumValueDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ServiceDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&descriptor.ServiceDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.Method != nil { - s = append(s, "Method: "+fmt.Sprintf("%#v", this.Method)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MethodDescriptorProto) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&descriptor.MethodDescriptorProto{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") - } - if this.InputType != nil { - s = append(s, "InputType: "+valueToGoStringDescriptor(this.InputType, "string")+",\n") - } - if this.OutputType != nil { - s = append(s, "OutputType: "+valueToGoStringDescriptor(this.OutputType, "string")+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.ClientStreaming != nil { - s = append(s, "ClientStreaming: "+valueToGoStringDescriptor(this.ClientStreaming, "bool")+",\n") - } - if this.ServerStreaming != nil { - s = append(s, "ServerStreaming: "+valueToGoStringDescriptor(this.ServerStreaming, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FileOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&descriptor.FileOptions{") - if this.JavaPackage != nil { - s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") - } - if this.JavaOuterClassname != nil { - s = append(s, "JavaOuterClassname: "+valueToGoStringDescriptor(this.JavaOuterClassname, "string")+",\n") - } - if this.JavaMultipleFiles != nil { - s = append(s, "JavaMultipleFiles: "+valueToGoStringDescriptor(this.JavaMultipleFiles, "bool")+",\n") - } - if this.JavaGenerateEqualsAndHash != nil { - s = append(s, "JavaGenerateEqualsAndHash: "+valueToGoStringDescriptor(this.JavaGenerateEqualsAndHash, "bool")+",\n") - } - if this.JavaStringCheckUtf8 != nil { - s = append(s, "JavaStringCheckUtf8: "+valueToGoStringDescriptor(this.JavaStringCheckUtf8, "bool")+",\n") - } - if this.OptimizeFor != nil { - s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "descriptor.FileOptions_OptimizeMode")+",\n") - } - if this.GoPackage != nil { - s = append(s, "GoPackage: "+valueToGoStringDescriptor(this.GoPackage, "string")+",\n") - } - if this.CcGenericServices != nil { - s = append(s, "CcGenericServices: "+valueToGoStringDescriptor(this.CcGenericServices, "bool")+",\n") - } - if this.JavaGenericServices != nil { - s = append(s, "JavaGenericServices: "+valueToGoStringDescriptor(this.JavaGenericServices, "bool")+",\n") - } - if this.PyGenericServices != nil { - s = append(s, "PyGenericServices: "+valueToGoStringDescriptor(this.PyGenericServices, "bool")+",\n") - } - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.CcEnableArenas != nil { - s = append(s, "CcEnableArenas: "+valueToGoStringDescriptor(this.CcEnableArenas, "bool")+",\n") - } - if this.ObjcClassPrefix != nil { - s = append(s, "ObjcClassPrefix: "+valueToGoStringDescriptor(this.ObjcClassPrefix, "string")+",\n") - } - if this.CsharpNamespace != nil { - s = append(s, "CsharpNamespace: "+valueToGoStringDescriptor(this.CsharpNamespace, "string")+",\n") - } - if this.JavananoUseDeprecatedPackage != nil { - s = append(s, "JavananoUseDeprecatedPackage: "+valueToGoStringDescriptor(this.JavananoUseDeprecatedPackage, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&descriptor.MessageOptions{") - if this.MessageSetWireFormat != nil { - s = append(s, "MessageSetWireFormat: "+valueToGoStringDescriptor(this.MessageSetWireFormat, "bool")+",\n") - } - if this.NoStandardDescriptorAccessor != nil { - s = append(s, "NoStandardDescriptorAccessor: "+valueToGoStringDescriptor(this.NoStandardDescriptorAccessor, "bool")+",\n") - } - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.MapEntry != nil { - s = append(s, "MapEntry: "+valueToGoStringDescriptor(this.MapEntry, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FieldOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&descriptor.FieldOptions{") - if this.Ctype != nil { - s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "descriptor.FieldOptions_CType")+",\n") - } - if this.Packed != nil { - s = append(s, "Packed: "+valueToGoStringDescriptor(this.Packed, "bool")+",\n") - } - if this.Jstype != nil { - s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "descriptor.FieldOptions_JSType")+",\n") - } - if this.Lazy != nil { - s = append(s, "Lazy: "+valueToGoStringDescriptor(this.Lazy, "bool")+",\n") - } - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.Weak != nil { - s = append(s, "Weak: "+valueToGoStringDescriptor(this.Weak, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnumOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&descriptor.EnumOptions{") - if this.AllowAlias != nil { - s = append(s, "AllowAlias: "+valueToGoStringDescriptor(this.AllowAlias, "bool")+",\n") - } - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnumValueOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.EnumValueOptions{") - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ServiceOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.ServiceOptions{") - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MethodOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.MethodOptions{") - if this.Deprecated != nil { - s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") - } - if this.UninterpretedOption != nil { - s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UninterpretedOption) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&descriptor.UninterpretedOption{") - if this.Name != nil { - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - } - if this.IdentifierValue != nil { - s = append(s, "IdentifierValue: "+valueToGoStringDescriptor(this.IdentifierValue, "string")+",\n") - } - if this.PositiveIntValue != nil { - s = append(s, "PositiveIntValue: "+valueToGoStringDescriptor(this.PositiveIntValue, "uint64")+",\n") - } - if this.NegativeIntValue != nil { - s = append(s, "NegativeIntValue: "+valueToGoStringDescriptor(this.NegativeIntValue, "int64")+",\n") - } - if this.DoubleValue != nil { - s = append(s, "DoubleValue: "+valueToGoStringDescriptor(this.DoubleValue, "float64")+",\n") - } - if this.StringValue != nil { - s = append(s, "StringValue: "+valueToGoStringDescriptor(this.StringValue, "byte")+",\n") - } - if this.AggregateValue != nil { - s = append(s, "AggregateValue: "+valueToGoStringDescriptor(this.AggregateValue, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UninterpretedOption_NamePart) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&descriptor.UninterpretedOption_NamePart{") - if this.NamePart != nil { - s = append(s, "NamePart: "+valueToGoStringDescriptor(this.NamePart, "string")+",\n") - } - if this.IsExtension != nil { - s = append(s, "IsExtension: "+valueToGoStringDescriptor(this.IsExtension, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SourceCodeInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&descriptor.SourceCodeInfo{") - if this.Location != nil { - s = append(s, "Location: "+fmt.Sprintf("%#v", this.Location)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SourceCodeInfo_Location) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&descriptor.SourceCodeInfo_Location{") - if this.Path != nil { - s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") - } - if this.Span != nil { - s = append(s, "Span: "+fmt.Sprintf("%#v", this.Span)+",\n") - } - if this.LeadingComments != nil { - s = append(s, "LeadingComments: "+valueToGoStringDescriptor(this.LeadingComments, "string")+",\n") - } - if this.TrailingComments != nil { - s = append(s, "TrailingComments: "+valueToGoStringDescriptor(this.TrailingComments, "string")+",\n") - } - if this.LeadingDetachedComments != nil { - s = append(s, "LeadingDetachedComments: "+fmt.Sprintf("%#v", this.LeadingDetachedComments)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringDescriptor(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringDescriptor(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go deleted file mode 100644 index cf88f3cc50..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package descriptor - -import ( - "strings" -) - -func (msg *DescriptorProto) GetMapFields() (*FieldDescriptorProto, *FieldDescriptorProto) { - if !msg.GetOptions().GetMapEntry() { - return nil, nil - } - return msg.GetField()[0], msg.GetField()[1] -} - -func dotToUnderscore(r rune) rune { - if r == '.' { - return '_' - } - return r -} - -func (field *FieldDescriptorProto) WireType() (wire int) { - switch *field.Type { - case FieldDescriptorProto_TYPE_DOUBLE: - return 1 - case FieldDescriptorProto_TYPE_FLOAT: - return 5 - case FieldDescriptorProto_TYPE_INT64: - return 0 - case FieldDescriptorProto_TYPE_UINT64: - return 0 - case FieldDescriptorProto_TYPE_INT32: - return 0 - case FieldDescriptorProto_TYPE_UINT32: - return 0 - case FieldDescriptorProto_TYPE_FIXED64: - return 1 - case FieldDescriptorProto_TYPE_FIXED32: - return 5 - case FieldDescriptorProto_TYPE_BOOL: - return 0 - case FieldDescriptorProto_TYPE_STRING: - return 2 - case FieldDescriptorProto_TYPE_GROUP: - return 2 - case FieldDescriptorProto_TYPE_MESSAGE: - return 2 - case FieldDescriptorProto_TYPE_BYTES: - return 2 - case FieldDescriptorProto_TYPE_ENUM: - return 0 - case FieldDescriptorProto_TYPE_SFIXED32: - return 5 - case FieldDescriptorProto_TYPE_SFIXED64: - return 1 - case FieldDescriptorProto_TYPE_SINT32: - return 0 - case FieldDescriptorProto_TYPE_SINT64: - return 0 - } - panic("unreachable") -} - -func (field *FieldDescriptorProto) GetKeyUint64() (x uint64) { - packed := field.IsPacked() - wireType := field.WireType() - fieldNumber := field.GetNumber() - if packed { - wireType = 2 - } - x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) - return x -} - -func (field *FieldDescriptorProto) GetKey() []byte { - x := field.GetKeyUint64() - i := 0 - keybuf := make([]byte, 0) - for i = 0; x > 127; i++ { - keybuf = append(keybuf, 0x80|uint8(x&0x7F)) - x >>= 7 - } - keybuf = append(keybuf, uint8(x)) - return keybuf -} - -func (desc *FileDescriptorSet) GetField(packageName, messageName, fieldName string) *FieldDescriptorProto { - msg := desc.GetMessage(packageName, messageName) - if msg == nil { - return nil - } - for _, field := range msg.GetField() { - if field.GetName() == fieldName { - return field - } - } - return nil -} - -func (file *FileDescriptorProto) GetMessage(typeName string) *DescriptorProto { - for _, msg := range file.GetMessageType() { - if msg.GetName() == typeName { - return msg - } - for _, nes := range msg.GetNestedType() { - if nes.GetName() == typeName { - return nes - } - if msg.GetName()+"."+nes.GetName() == typeName { - return nes - } - } - } - return nil -} - -func (desc *FileDescriptorSet) GetMessage(packageName string, typeName string) *DescriptorProto { - for _, file := range desc.GetFile() { - if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { - continue - } - for _, msg := range file.GetMessageType() { - if msg.GetName() == typeName { - return msg - } - } - for _, msg := range file.GetMessageType() { - for _, nes := range msg.GetNestedType() { - if nes.GetName() == typeName { - return nes - } - if msg.GetName()+"."+nes.GetName() == typeName { - return nes - } - } - } - } - return nil -} - -func (desc *FileDescriptorSet) IsProto3(packageName string, typeName string) bool { - for _, file := range desc.GetFile() { - if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { - continue - } - for _, msg := range file.GetMessageType() { - if msg.GetName() == typeName { - return file.GetSyntax() == "proto3" - } - } - for _, msg := range file.GetMessageType() { - for _, nes := range msg.GetNestedType() { - if nes.GetName() == typeName { - return file.GetSyntax() == "proto3" - } - if msg.GetName()+"."+nes.GetName() == typeName { - return file.GetSyntax() == "proto3" - } - } - } - } - return false -} - -func (msg *DescriptorProto) IsExtendable() bool { - return len(msg.GetExtensionRange()) > 0 -} - -func (desc *FileDescriptorSet) FindExtension(packageName string, typeName string, fieldName string) (extPackageName string, field *FieldDescriptorProto) { - parent := desc.GetMessage(packageName, typeName) - if parent == nil { - return "", nil - } - if !parent.IsExtendable() { - return "", nil - } - extendee := "." + packageName + "." + typeName - for _, file := range desc.GetFile() { - for _, ext := range file.GetExtension() { - if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { - if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { - continue - } - } else { - if ext.GetExtendee() != extendee { - continue - } - } - if ext.GetName() == fieldName { - return file.GetPackage(), ext - } - } - } - return "", nil -} - -func (desc *FileDescriptorSet) FindExtensionByFieldNumber(packageName string, typeName string, fieldNum int32) (extPackageName string, field *FieldDescriptorProto) { - parent := desc.GetMessage(packageName, typeName) - if parent == nil { - return "", nil - } - if !parent.IsExtendable() { - return "", nil - } - extendee := "." + packageName + "." + typeName - for _, file := range desc.GetFile() { - for _, ext := range file.GetExtension() { - if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { - if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { - continue - } - } else { - if ext.GetExtendee() != extendee { - continue - } - } - if ext.GetNumber() == fieldNum { - return file.GetPackage(), ext - } - } - } - return "", nil -} - -func (desc *FileDescriptorSet) FindMessage(packageName string, typeName string, fieldName string) (msgPackageName string, msgName string) { - parent := desc.GetMessage(packageName, typeName) - if parent == nil { - return "", "" - } - field := parent.GetFieldDescriptor(fieldName) - if field == nil { - var extPackageName string - extPackageName, field = desc.FindExtension(packageName, typeName, fieldName) - if field == nil { - return "", "" - } - packageName = extPackageName - } - typeNames := strings.Split(field.GetTypeName(), ".") - if len(typeNames) == 1 { - msg := desc.GetMessage(packageName, typeName) - if msg == nil { - return "", "" - } - return packageName, msg.GetName() - } - if len(typeNames) > 2 { - for i := 1; i < len(typeNames)-1; i++ { - packageName = strings.Join(typeNames[1:len(typeNames)-i], ".") - typeName = strings.Join(typeNames[len(typeNames)-i:], ".") - msg := desc.GetMessage(packageName, typeName) - if msg != nil { - typeNames := strings.Split(msg.GetName(), ".") - if len(typeNames) == 1 { - return packageName, msg.GetName() - } - return strings.Join(typeNames[1:len(typeNames)-1], "."), typeNames[len(typeNames)-1] - } - } - } - return "", "" -} - -func (msg *DescriptorProto) GetFieldDescriptor(fieldName string) *FieldDescriptorProto { - for _, field := range msg.GetField() { - if field.GetName() == fieldName { - return field - } - } - return nil -} - -func (desc *FileDescriptorSet) GetEnum(packageName string, typeName string) *EnumDescriptorProto { - for _, file := range desc.GetFile() { - if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { - continue - } - for _, enum := range file.GetEnumType() { - if enum.GetName() == typeName { - return enum - } - } - } - return nil -} - -func (f *FieldDescriptorProto) IsEnum() bool { - return *f.Type == FieldDescriptorProto_TYPE_ENUM -} - -func (f *FieldDescriptorProto) IsMessage() bool { - return *f.Type == FieldDescriptorProto_TYPE_MESSAGE -} - -func (f *FieldDescriptorProto) IsBytes() bool { - return *f.Type == FieldDescriptorProto_TYPE_BYTES -} - -func (f *FieldDescriptorProto) IsRepeated() bool { - return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REPEATED -} - -func (f *FieldDescriptorProto) IsString() bool { - return *f.Type == FieldDescriptorProto_TYPE_STRING -} - -func (f *FieldDescriptorProto) IsRequired() bool { - return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REQUIRED -} - -func (f *FieldDescriptorProto) IsPacked() bool { - return f.Options != nil && f.GetOptions().GetPacked() -} - -func (m *DescriptorProto) HasExtension() bool { - return len(m.ExtensionRange) > 0 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/doc.go deleted file mode 100644 index 15c7cf43c2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/doc.go +++ /dev/null @@ -1,51 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* - A plugin for the Google protocol buffer compiler to generate Go code. - Run it by building this program and putting it in your path with the name - protoc-gen-gogo - That word 'gogo' at the end becomes part of the option string set for the - protocol compiler, so once the protocol compiler (protoc) is installed - you can run - protoc --gogo_out=output_directory input_directory/file.proto - to generate Go bindings for the protocol defined by file.proto. - With that input, the output will be written to - output_directory/go_package/file.pb.go - - The generated code is documented in the package comment for - the library. - - See the README and documentation for protocol buffers to learn more: - https://developers.google.com/protocol-buffers/ - -*/ -package documentation diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/generator.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/generator.go deleted file mode 100644 index 83f1758afb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/generator.go +++ /dev/null @@ -1,2900 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* - The code generator for the plugin for the Google protocol buffer compiler. - It generates Go code from the protocol buffer description files read by the - main routine. -*/ -package generator - -import ( - "bufio" - "bytes" - "fmt" - "go/parser" - "go/printer" - "go/token" - "log" - "os" - "path" - "sort" - "strconv" - "strings" - "unicode" - "unicode/utf8" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" -) - -// A Plugin provides functionality to add to the output during Go code generation, -// such as to produce RPC stubs. -type Plugin interface { - // Name identifies the plugin. - Name() string - // Init is called once after data structures are built but before - // code generation begins. - Init(g *Generator) - // Generate produces the code generated by the plugin for this file, - // except for the imports, by calling the generator's methods P, In, and Out. - Generate(file *FileDescriptor) - // GenerateImports produces the import declarations for this file. - // It is called after Generate. - GenerateImports(file *FileDescriptor) -} - -type pluginSlice []Plugin - -func (ps pluginSlice) Len() int { - return len(ps) -} - -func (ps pluginSlice) Less(i, j int) bool { - return ps[i].Name() < ps[j].Name() -} - -func (ps pluginSlice) Swap(i, j int) { - ps[i], ps[j] = ps[j], ps[i] -} - -var plugins pluginSlice - -// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. -// It is typically called during initialization. -func RegisterPlugin(p Plugin) { - plugins = append(plugins, p) -} - -// Each type we import as a protocol buffer (other than FileDescriptorProto) needs -// a pointer to the FileDescriptorProto that represents it. These types achieve that -// wrapping by placing each Proto inside a struct with the pointer to its File. The -// structs have the same names as their contents, with "Proto" removed. -// FileDescriptor is used to store the things that it points to. - -// The file and package name method are common to messages and enums. -type common struct { - file *descriptor.FileDescriptorProto // File this object comes from. -} - -// PackageName is name in the package clause in the generated file. -func (c *common) PackageName() string { return uniquePackageOf(c.file) } - -func (c *common) File() *descriptor.FileDescriptorProto { return c.file } - -func fileIsProto3(file *descriptor.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func (c *common) proto3() bool { return fileIsProto3(c.file) } - -// Descriptor represents a protocol buffer message. -type Descriptor struct { - common - *descriptor.DescriptorProto - parent *Descriptor // The containing message, if any. - nested []*Descriptor // Inner messages, if any. - enums []*EnumDescriptor // Inner enums, if any. - ext []*ExtensionDescriptor // Extensions, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or another message. - path string // The SourceCodeInfo path as comma-separated integers. - group bool -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (d *Descriptor) TypeName() []string { - if d.typename != nil { - return d.typename - } - n := 0 - for parent := d; parent != nil; parent = parent.parent { - n++ - } - s := make([]string, n, n) - for parent := d; parent != nil; parent = parent.parent { - n-- - s[n] = parent.GetName() - } - d.typename = s - return s -} - -func (d *Descriptor) allowOneof() bool { - return true -} - -// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type EnumDescriptor struct { - common - *descriptor.EnumDescriptorProto - parent *Descriptor // The containing message, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or a message. - path string // The SourceCodeInfo path as comma-separated integers. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *EnumDescriptor) TypeName() (s []string) { - if e.typename != nil { - return e.typename - } - name := e.GetName() - if e.parent == nil { - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - e.typename = s - return s -} - -// Everything but the last element of the full type name, CamelCased. -// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . -func (e *EnumDescriptor) prefix() string { - if e.parent == nil { - // If the enum is not part of a message, the prefix is just the type name. - return CamelCase(*e.Name) + "_" - } - typeName := e.TypeName() - return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" -} - -// The integer value of the named constant in this enumerated type. -func (e *EnumDescriptor) integerValueAsString(name string) string { - for _, c := range e.Value { - if c.GetName() == name { - return fmt.Sprint(c.GetNumber()) - } - } - log.Fatal("cannot find value for enum constant") - return "" -} - -// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type ExtensionDescriptor struct { - common - *descriptor.FieldDescriptorProto - parent *Descriptor // The containing message, if any. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *ExtensionDescriptor) TypeName() (s []string) { - name := e.GetName() - if e.parent == nil { - // top-level extension - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - return s -} - -// DescName returns the variable name used for the generated descriptor. -func (e *ExtensionDescriptor) DescName() string { - // The full type name. - typeName := e.TypeName() - // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. - for i, s := range typeName { - typeName[i] = CamelCase(s) - } - return "E_" + strings.Join(typeName, "_") -} - -// ImportedDescriptor describes a type that has been publicly imported from another file. -type ImportedDescriptor struct { - common - o Object -} - -func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } - -// FileDescriptor describes an protocol buffer descriptor file (.proto). -// It includes slices of all the messages and enums defined within it. -// Those slices are constructed by WrapTypes. -type FileDescriptor struct { - *descriptor.FileDescriptorProto - desc []*Descriptor // All the messages defined in this file. - enum []*EnumDescriptor // All the enums defined in this file. - ext []*ExtensionDescriptor // All the top-level extensions defined in this file. - imp []*ImportedDescriptor // All types defined in files publicly imported by this file. - - // Comments, stored as a map of path (comma-separated integers) to the comment. - comments map[string]*descriptor.SourceCodeInfo_Location - - // The full list of symbols that are exported, - // as a map from the exported object to its symbols. - // This is used for supporting public imports. - exported map[Object][]symbol - - index int // The index of this file in the list of files to generate code for - - proto3 bool // whether to generate proto3 code for this file -} - -// PackageName is the package name we'll use in the generated code to refer to this file. -func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } - -// goPackageName returns the Go package name to use in the -// generated Go file. The result explicit reports whether the name -// came from an option go_package statement. If explicit is false, -// the name was derived from the protocol buffer's package statement -// or the input file name. -func (d *FileDescriptor) goPackageName() (name string, explicit bool) { - // Does the file have a "go_package" option? - if opts := d.Options; opts != nil { - if pkg := opts.GetGoPackage(); pkg != "" { - return pkg, true - } - } - - // Does the file have a package clause? - if pkg := d.GetPackage(); pkg != "" { - return pkg, false - } - // Use the file base name. - return baseName(d.GetName()), false -} - -func (d *FileDescriptor) addExport(obj Object, sym symbol) { - d.exported[obj] = append(d.exported[obj], sym) -} - -// symbol is an interface representing an exported Go symbol. -type symbol interface { - // GenerateAlias should generate an appropriate alias - // for the symbol from the named package. - GenerateAlias(g *Generator, pkg string) -} - -type messageSymbol struct { - sym string - hasExtensions, isMessageSet bool - hasOneof bool - getters []getterSymbol -} - -type getterSymbol struct { - name string - typ string - typeName string // canonical name in proto world; empty for proto.Message and similar - genType bool // whether typ contains a generated type (message/group/enum) -} - -func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { - remoteSym := pkg + "." + ms.sym - - g.P("type ", ms.sym, " ", remoteSym) - g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") - g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") - g.P("func (*", ms.sym, ") ProtoMessage() {}") - if ms.hasExtensions { - g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", - "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") - g.P("func (m *", ms.sym, ") ExtensionMap() map[int32]", g.Pkg["proto"], ".Extension ", - "{ return (*", remoteSym, ")(m).ExtensionMap() }") - if ms.isMessageSet { - g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", - "{ return (*", remoteSym, ")(m).Marshal() }") - g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", - "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") - } - } - if ms.hasOneof { - // Oneofs and public imports do not mix well. - // We can make them work okay for the binary format, - // but they're going to break weirdly for text/JSON. - enc := "_" + ms.sym + "_OneofMarshaler" - dec := "_" + ms.sym + "_OneofUnmarshaler" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", nil") - g.P("}") - - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("enc, _, _ := m0.XXX_OneofFuncs()") - g.P("return enc(m0, b)") - g.P("}") - - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, dec, _ := m0.XXX_OneofFuncs()") - g.P("return dec(m0, tag, wire, b)") - g.P("}") - } - for _, get := range ms.getters { - - if get.typeName != "" { - g.RecordTypeUse(get.typeName) - } - typ := get.typ - val := "(*" + remoteSym + ")(m)." + get.name + "()" - if get.genType { - // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) - // or "map[t]*pkg.T" (map to message/enum). - // The first two of those might have a "[]" prefix if it is repeated. - // Drop any package qualifier since we have hoisted the type into this package. - rep := strings.HasPrefix(typ, "[]") - if rep { - typ = typ[2:] - } - isMap := strings.HasPrefix(typ, "map[") - star := typ[0] == '*' - if !isMap { // map types handled lower down - typ = typ[strings.Index(typ, ".")+1:] - } - if star { - typ = "*" + typ - } - if rep { - // Go does not permit conversion between slice types where both - // element types are named. That means we need to generate a bit - // of code in this situation. - // typ is the element type. - // val is the expression to get the slice from the imported type. - - ctyp := typ // conversion type expression; "Foo" or "(*Foo)" - if star { - ctyp = "(" + typ + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") - g.In() - g.P("o := ", val) - g.P("if o == nil {") - g.In() - g.P("return nil") - g.Out() - g.P("}") - g.P("s := make([]", typ, ", len(o))") - g.P("for i, x := range o {") - g.In() - g.P("s[i] = ", ctyp, "(x)") - g.Out() - g.P("}") - g.P("return s") - g.Out() - g.P("}") - continue - } - if isMap { - // Split map[keyTyp]valTyp. - bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") - keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] - // Drop any package qualifier. - // Only the value type may be foreign. - star := valTyp[0] == '*' - valTyp = valTyp[strings.Index(valTyp, ".")+1:] - if star { - valTyp = "*" + valTyp - } - - typ := "map[" + keyTyp + "]" + valTyp - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") - g.P("o := ", val) - g.P("if o == nil { return nil }") - g.P("s := make(", typ, ", len(o))") - g.P("for k, v := range o {") - g.P("s[k] = (", valTyp, ")(v)") - g.P("}") - g.P("return s") - g.P("}") - continue - } - // Convert imported type into the forwarding type. - val = "(" + typ + ")(" + val + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") - } - -} - -type enumSymbol struct { - name string - proto3 bool // Whether this came from a proto3 file. -} - -func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { - s := es.name - g.P("type ", s, " ", pkg, ".", s) - g.P("var ", s, "_name = ", pkg, ".", s, "_name") - g.P("var ", s, "_value = ", pkg, ".", s, "_value") - g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") - if !es.proto3 { - g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") - g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") - } -} - -type constOrVarSymbol struct { - sym string - typ string // either "const" or "var" - cast string // if non-empty, a type cast is required (used for enums) -} - -func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { - v := pkg + "." + cs.sym - if cs.cast != "" { - v = cs.cast + "(" + v + ")" - } - g.P(cs.typ, " ", cs.sym, " = ", v) -} - -// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. -type Object interface { - PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. - TypeName() []string - File() *descriptor.FileDescriptorProto -} - -// Each package name we generate must be unique. The package we're generating -// gets its own name but every other package must have a unique name that does -// not conflict in the code we generate. These names are chosen globally (although -// they don't have to be, it simplifies things to do them globally). -func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { - s, ok := uniquePackageName[fd] - if !ok { - log.Fatal("internal error: no package name defined for " + fd.GetName()) - } - return s -} - -// Generator is the type whose methods generate the output, stored in the associated response structure. -type Generator struct { - *bytes.Buffer - - Request *plugin.CodeGeneratorRequest // The input. - Response *plugin.CodeGeneratorResponse // The output. - - Param map[string]string // Command-line parameters. - PackageImportPath string // Go import path of the package we're generating code for - ImportPrefix string // String to prefix to imported package file names. - ImportMap map[string]string // Mapping from import name to generated name - - Pkg map[string]string // The names under which we import support packages - - packageName string // What we're calling ourselves. - allFiles []*FileDescriptor // All files in the tree - allFilesByName map[string]*FileDescriptor // All files by filename. - genFiles []*FileDescriptor // Those files we will generate output for. - file *FileDescriptor // The file we are compiling now. - usedPackages map[string]bool // Names of packages used in current file. - typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. - init []string // Lines to emit in the init function. - indent string - writeOutput bool - - customImports []string - writtenImports map[string]bool // For de-duplicating written imports -} - -// New creates a new generator and allocates the request and response protobufs. -func New() *Generator { - g := new(Generator) - g.Buffer = new(bytes.Buffer) - g.Request = new(plugin.CodeGeneratorRequest) - g.Response = new(plugin.CodeGeneratorResponse) - g.writtenImports = make(map[string]bool) - uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - pkgNamesInUse = make(map[string][]*FileDescriptor) - return g -} - -// Error reports a problem, including an error, and exits the program. -func (g *Generator) Error(err error, msgs ...string) { - s := strings.Join(msgs, " ") + ":" + err.Error() - log.Print("protoc-gen-gogo: error:", s) - os.Exit(1) -} - -// Fail reports a problem and exits the program. -func (g *Generator) Fail(msgs ...string) { - s := strings.Join(msgs, " ") - log.Print("protoc-gen-gogo: error:", s) - os.Exit(1) -} - -// CommandLineParameters breaks the comma-separated list of key=value pairs -// in the parameter (a member of the request protobuf) into a key/value map. -// It then sets file name mappings defined by those entries. -func (g *Generator) CommandLineParameters(parameter string) { - g.Param = make(map[string]string) - for _, p := range strings.Split(parameter, ",") { - if i := strings.Index(p, "="); i < 0 { - g.Param[p] = "" - } else { - g.Param[p[0:i]] = p[i+1:] - } - } - - g.ImportMap = make(map[string]string) - pluginList := "none" // Default list of plugin names to enable (empty means all). - for k, v := range g.Param { - switch k { - case "import_prefix": - g.ImportPrefix = v - case "import_path": - g.PackageImportPath = v - case "plugins": - pluginList = v - default: - if len(k) > 0 && k[0] == 'M' { - g.ImportMap[k[1:]] = v - } - } - } - - if pluginList == "" { - return - } - if pluginList == "none" { - pluginList = "" - } - gogoPluginNames := []string{"unmarshal", "unsafeunmarshaler", "union", "stringer", "size", "populate", "marshalto", "unsafemarshaler", "gostring", "face", "equal", "enumstringer", "embedcheck", "description", "defaultcheck", "oneofcheck"} - pluginList = strings.Join(append(gogoPluginNames, pluginList), "+") - if pluginList != "" { - // Amend the set of plugins. - enabled := make(map[string]bool) - for _, name := range strings.Split(pluginList, "+") { - enabled[name] = true - } - var nplugins pluginSlice - for _, p := range plugins { - if enabled[p.Name()] { - nplugins = append(nplugins, p) - } - } - sort.Sort(nplugins) - plugins = nplugins - } -} - -// DefaultPackageName returns the package name printed for the object. -// If its file is in a different package, it returns the package name we're using for this file, plus ".". -// Otherwise it returns the empty string. -func (g *Generator) DefaultPackageName(obj Object) string { - pkg := obj.PackageName() - if pkg == g.packageName { - return "" - } - return pkg + "." -} - -// For each input file, the unique package name to use, underscored. -var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - -// Package names already registered. Key is the name from the .proto file; -// value is the name that appears in the generated code. -var pkgNamesInUse = make(map[string][]*FileDescriptor) - -// Create and remember a guaranteed unique package name for this file descriptor. -// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and -// has no file descriptor. -func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { - // Convert dots to underscores before finding a unique alias. - pkg = strings.Map(badToUnderscore, pkg) - - var i = -1 - var ptr *FileDescriptor = nil - for i, ptr = range pkgNamesInUse[pkg] { - if ptr == f { - if i == 0 { - return pkg - } - return pkg + strconv.Itoa(i) - } - } - - pkgNamesInUse[pkg] = append(pkgNamesInUse[pkg], f) - i += 1 - - if i > 0 { - pkg = pkg + strconv.Itoa(i) - } - - if f != nil { - uniquePackageName[f.FileDescriptorProto] = pkg - } - return pkg -} - -var isGoKeyword = map[string]bool{ - "break": true, - "case": true, - "chan": true, - "const": true, - "continue": true, - "default": true, - "else": true, - "defer": true, - "fallthrough": true, - "for": true, - "func": true, - "go": true, - "goto": true, - "if": true, - "import": true, - "interface": true, - "map": true, - "package": true, - "range": true, - "return": true, - "select": true, - "struct": true, - "switch": true, - "type": true, - "var": true, -} - -// defaultGoPackage returns the package name to use, -// derived from the import path of the package we're building code for. -func (g *Generator) defaultGoPackage() string { - p := g.PackageImportPath - if i := strings.LastIndex(p, "/"); i >= 0 { - p = p[i+1:] - } - if p == "" { - return "" - } - - p = strings.Map(badToUnderscore, p) - // Identifier must not be keyword: insert _. - if isGoKeyword[p] { - p = "_" + p - } - // Identifier must not begin with digit: insert _. - if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { - p = "_" + p - } - return p -} - -// SetPackageNames sets the package name for this run. -// The package name must agree across all files being generated. -// It also defines unique package names for all imported files. -func (g *Generator) SetPackageNames() { - // Register the name for this package. It will be the first name - // registered so is guaranteed to be unmodified. - pkg, explicit := g.genFiles[0].goPackageName() - - // Check all files for an explicit go_package option. - for _, f := range g.genFiles { - thisPkg, thisExplicit := f.goPackageName() - if thisExplicit { - if !explicit { - // Let this file's go_package option serve for all input files. - pkg, explicit = thisPkg, true - } else if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - // If we don't have an explicit go_package option but we have an - // import path, use that. - if !explicit { - p := g.defaultGoPackage() - if p != "" { - pkg, explicit = p, true - } - } - - // If there was no go_package and no import path to use, - // double-check that all the inputs have the same implicit - // Go package name. - if !explicit { - for _, f := range g.genFiles { - thisPkg, _ := f.goPackageName() - if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) - - // Register the support package names. They might collide with the - // name of a package we import. - g.Pkg = map[string]string{ - "fmt": RegisterUniquePackageName("fmt", nil), - "math": RegisterUniquePackageName("math", nil), - "proto": RegisterUniquePackageName("proto", nil), - } - -AllFiles: - for _, f := range g.allFiles { - for _, genf := range g.genFiles { - if f == genf { - // In this package already. - uniquePackageName[f.FileDescriptorProto] = g.packageName - continue AllFiles - } - } - // The file is a dependency, so we want to ignore its go_package option - // because that is only relevant for its specific generated output. - pkg := f.GetPackage() - if pkg == "" { - pkg = baseName(*f.Name) - } - RegisterUniquePackageName(pkg, f) - } -} - -// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos -// and FileDescriptorProtos into file-referenced objects within the Generator. -// It also creates the list of files to generate and so should be called before GenerateAllFiles. -func (g *Generator) WrapTypes() { - g.allFiles = make([]*FileDescriptor, len(g.Request.ProtoFile)) - g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) - for i, f := range g.Request.ProtoFile { - // We must wrap the descriptors before we wrap the enums - descs := wrapDescriptors(f) - g.buildNestedDescriptors(descs) - enums := wrapEnumDescriptors(f, descs) - g.buildNestedEnums(descs, enums) - exts := wrapExtensions(f) - fd := &FileDescriptor{ - FileDescriptorProto: f, - desc: descs, - enum: enums, - ext: exts, - exported: make(map[Object][]symbol), - proto3: fileIsProto3(f), - } - extractComments(fd) - g.allFiles[i] = fd - g.allFilesByName[f.GetName()] = fd - } - for _, fd := range g.allFiles { - fd.imp = wrapImported(fd.FileDescriptorProto, g) - } - - g.genFiles = make([]*FileDescriptor, len(g.Request.FileToGenerate)) - for i, fileName := range g.Request.FileToGenerate { - g.genFiles[i] = g.allFilesByName[fileName] - if g.genFiles[i] == nil { - g.Fail("could not find file named", fileName) - } - g.genFiles[i].index = i - } - g.Response.File = make([]*plugin.CodeGeneratorResponse_File, len(g.genFiles)) -} - -// Scan the descriptors in this file. For each one, build the slice of nested descriptors -func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { - for _, desc := range descs { - if len(desc.NestedType) != 0 { - for _, nest := range descs { - if nest.parent == desc { - desc.nested = append(desc.nested, nest) - } - } - if len(desc.nested) != len(desc.NestedType) { - g.Fail("internal error: nesting failure for", desc.GetName()) - } - } - } -} - -func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { - for _, desc := range descs { - if len(desc.EnumType) != 0 { - for _, enum := range enums { - if enum.parent == desc { - desc.enums = append(desc.enums, enum) - } - } - if len(desc.enums) != len(desc.EnumType) { - g.Fail("internal error: enum nesting failure for", desc.GetName()) - } - } - } -} - -// Construct the Descriptor -func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { - d := &Descriptor{ - common: common{file}, - DescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - d.path = fmt.Sprintf("%d,%d", messagePath, index) - } else { - d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) - } - - // The only way to distinguish a group from a message is whether - // the containing message has a TYPE_GROUP field that matches. - if parent != nil { - parts := d.TypeName() - if file.Package != nil { - parts = append([]string{*file.Package}, parts...) - } - exp := "." + strings.Join(parts, ".") - for _, field := range parent.Field { - if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { - d.group = true - break - } - } - } - - d.ext = make([]*ExtensionDescriptor, len(desc.Extension)) - for i, field := range desc.Extension { - d.ext[i] = &ExtensionDescriptor{common{file}, field, d} - } - - return d -} - -// Return a slice of all the Descriptors defined within this file -func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { - sl := make([]*Descriptor, 0, len(file.MessageType)+10) - for i, desc := range file.MessageType { - sl = wrapThisDescriptor(sl, desc, nil, file, i) - } - return sl -} - -// Wrap this Descriptor, recursively -func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { - sl = append(sl, newDescriptor(desc, parent, file, index)) - me := sl[len(sl)-1] - for i, nested := range desc.NestedType { - sl = wrapThisDescriptor(sl, nested, me, file, i) - } - return sl -} - -// Construct the EnumDescriptor -func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { - ed := &EnumDescriptor{ - common: common{file}, - EnumDescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - ed.path = fmt.Sprintf("%d,%d", enumPath, index) - } else { - ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) - } - return ed -} - -// Return a slice of all the EnumDescriptors defined within this file -func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { - sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) - // Top-level enums. - for i, enum := range file.EnumType { - sl = append(sl, newEnumDescriptor(enum, nil, file, i)) - } - // Enums within messages. Enums within embedded messages appear in the outer-most message. - for _, nested := range descs { - for i, enum := range nested.EnumType { - sl = append(sl, newEnumDescriptor(enum, nested, file, i)) - } - } - return sl -} - -// Return a slice of all the top-level ExtensionDescriptors defined within this file. -func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { - sl := make([]*ExtensionDescriptor, len(file.Extension)) - for i, field := range file.Extension { - sl[i] = &ExtensionDescriptor{common{file}, field, nil} - } - return sl -} - -// Return a slice of all the types that are publicly imported into this file. -func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { - for _, index := range file.PublicDependency { - df := g.fileByName(file.Dependency[index]) - for _, d := range df.desc { - if d.GetOptions().GetMapEntry() { - continue - } - sl = append(sl, &ImportedDescriptor{common{file}, d}) - } - for _, e := range df.enum { - sl = append(sl, &ImportedDescriptor{common{file}, e}) - } - for _, ext := range df.ext { - sl = append(sl, &ImportedDescriptor{common{file}, ext}) - } - } - return -} - -func extractComments(file *FileDescriptor) { - file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) - for _, loc := range file.GetSourceCodeInfo().GetLocation() { - if loc.LeadingComments == nil { - continue - } - var p []string - for _, n := range loc.Path { - p = append(p, strconv.Itoa(int(n))) - } - file.comments[strings.Join(p, ",")] = loc - } -} - -// BuildTypeNameMap builds the map from fully qualified type names to objects. -// The key names for the map come from the input data, which puts a period at the beginning. -// It should be called after SetPackageNames and before GenerateAllFiles. -func (g *Generator) BuildTypeNameMap() { - g.typeNameToObject = make(map[string]Object) - for _, f := range g.allFiles { - // The names in this loop are defined by the proto world, not us, so the - // package name may be empty. If so, the dotted package name of X will - // be ".X"; otherwise it will be ".pkg.X". - dottedPkg := "." + f.GetPackage() - if dottedPkg != "." { - dottedPkg += "." - } - for _, enum := range f.enum { - name := dottedPkg + dottedSlice(enum.TypeName()) - g.typeNameToObject[name] = enum - } - for _, desc := range f.desc { - name := dottedPkg + dottedSlice(desc.TypeName()) - g.typeNameToObject[name] = desc - } - } -} - -// ObjectNamed, given a fully-qualified input type name as it appears in the input data, -// returns the descriptor for the message or enum with that name. -func (g *Generator) ObjectNamed(typeName string) Object { - o, ok := g.typeNameToObject[typeName] - if !ok { - g.Fail("can't find object with type", typeName) - } - - // If the file of this object isn't a direct dependency of the current file, - // or in the current file, then this object has been publicly imported into - // a dependency of the current file. - // We should return the ImportedDescriptor object for it instead. - direct := *o.File().Name == *g.file.Name - if !direct { - for _, dep := range g.file.Dependency { - if *g.fileByName(dep).Name == *o.File().Name { - direct = true - break - } - } - } - if !direct { - found := false - Loop: - for _, dep := range g.file.Dependency { - df := g.fileByName(*g.fileByName(dep).Name) - for _, td := range df.imp { - if td.o == o { - // Found it! - o = td - found = true - break Loop - } - } - } - if !found { - log.Printf("protoc-gen-gogo: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) - } - } - - return o -} - -// P prints the arguments to the generated output. It handles strings and int32s, plus -// handling indirections because they may be *string, etc. -func (g *Generator) P(str ...interface{}) { - if !g.writeOutput { - return - } - g.WriteString(g.indent) - for _, v := range str { - switch s := v.(type) { - case string: - g.WriteString(s) - case *string: - g.WriteString(*s) - case bool: - fmt.Fprintf(g, "%t", s) - case *bool: - fmt.Fprintf(g, "%t", *s) - case int: - fmt.Fprintf(g, "%d", s) - case *int32: - fmt.Fprintf(g, "%d", *s) - case *int64: - fmt.Fprintf(g, "%d", *s) - case float64: - fmt.Fprintf(g, "%g", s) - case *float64: - fmt.Fprintf(g, "%g", *s) - default: - g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) - } - } - g.WriteByte('\n') -} - -// addInitf stores the given statement to be printed inside the file's init function. -// The statement is given as a format specifier and arguments. -func (g *Generator) addInitf(stmt string, a ...interface{}) { - g.init = append(g.init, fmt.Sprintf(stmt, a...)) -} - -func (g *Generator) PrintImport(alias, pkg string) { - statement := "import " + alias + " " + strconv.Quote(pkg) - if g.writtenImports[statement] { - return - } - g.P(statement) - g.writtenImports[statement] = true -} - -// In Indents the output one tab stop. -func (g *Generator) In() { g.indent += "\t" } - -// Out unindents the output one tab stop. -func (g *Generator) Out() { - if len(g.indent) > 0 { - g.indent = g.indent[1:] - } -} - -// GenerateAllFiles generates the output for all the files we're outputting. -func (g *Generator) GenerateAllFiles() { - // Initialize the plugins - for _, p := range plugins { - p.Init(g) - } - // Generate the output. The generator runs for every file, even the files - // that we don't generate output for, so that we can collate the full list - // of exported symbols to support public imports. - genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) - for _, file := range g.genFiles { - genFileMap[file] = true - } - i := 0 - for _, file := range g.allFiles { - g.Reset() - g.writeOutput = genFileMap[file] - g.generate(file) - if !g.writeOutput { - continue - } - g.Response.File[i] = new(plugin.CodeGeneratorResponse_File) - g.Response.File[i].Name = proto.String(goFileName(*file.Name)) - g.Response.File[i].Content = proto.String(g.String()) - i++ - } -} - -// Run all the plugins associated with the file. -func (g *Generator) runPlugins(file *FileDescriptor) { - for _, p := range plugins { - p.Generate(file) - } -} - -// FileOf return the FileDescriptor for this FileDescriptorProto. -func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { - for _, file := range g.allFiles { - if file.FileDescriptorProto == fd { - return file - } - } - g.Fail("could not find file in table:", fd.GetName()) - return nil -} - -// Fill the response protocol buffer with the generated output for all the files we're -// supposed to generate. -func (g *Generator) generate(file *FileDescriptor) { - g.customImports = make([]string, 0) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - // Reset on each file - g.writtenImports = make(map[string]bool) - - for _, td := range g.file.imp { - g.generateImported(td) - } - for _, enum := range g.file.enum { - g.generateEnum(enum) - } - for _, desc := range g.file.desc { - // Don't generate virtual messages for maps. - if desc.GetOptions().GetMapEntry() { - continue - } - g.generateMessage(desc) - } - for _, ext := range g.file.ext { - g.generateExtension(ext) - } - g.generateInitFunction() - - // Run the plugins before the imports so we know which imports are necessary. - g.runPlugins(file) - - // Generate header and imports last, though they appear first in the output. - rem := g.Buffer - g.Buffer = new(bytes.Buffer) - g.generateHeader() - g.generateImports() - if !g.writeOutput { - return - } - g.Write(rem.Bytes()) - - // Reformat generated code. - fset := token.NewFileSet() - raw := g.Bytes() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) - if err != nil { - // Print out the bad code with line numbers. - // This should never happen in practice, but it can while changing generated code, - // so consider this a debugging aid. - var src bytes.Buffer - s := bufio.NewScanner(bytes.NewReader(raw)) - for line := 1; s.Scan(); line++ { - fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) - } - if serr := s.Err(); serr != nil { - g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(raw)) - } else { - g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) - } - } - g.Reset() - err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) - if err != nil { - g.Fail("generated Go source code could not be reformatted:", err.Error()) - } -} - -// Generate the header, including package definition -func (g *Generator) generateHeader() { - g.P("// Code generated by protoc-gen-gogo.") - g.P("// source: ", *g.file.Name) - g.P("// DO NOT EDIT!") - g.P() - - name := g.file.PackageName() - - if g.file.index == 0 { - // Generate package docs for the first file in the package. - g.P("/*") - g.P("Package ", name, " is a generated protocol buffer package.") - g.P() - if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { - // not using g.PrintComments because this is a /* */ comment block. - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - line = strings.TrimPrefix(line, " ") - // ensure we don't escape from the block comment - line = strings.Replace(line, "*/", "* /", -1) - g.P(line) - } - g.P() - } - var topMsgs []string - g.P("It is generated from these files:") - for _, f := range g.genFiles { - g.P("\t", f.Name) - for _, msg := range f.desc { - if msg.parent != nil { - continue - } - topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) - } - } - g.P() - g.P("It has these top-level messages:") - for _, msg := range topMsgs { - g.P("\t", msg) - } - g.P("*/") - } - - g.P("package ", name) - g.P() -} - -// PrintComments prints any comments from the source .proto file. -// The path is a comma-separated list of integers. -// It returns an indication of whether any comments were printed. -// See descriptor.proto for its format. -func (g *Generator) PrintComments(path string) bool { - if !g.writeOutput { - return false - } - if loc, ok := g.file.comments[path]; ok { - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - g.P("// ", strings.TrimPrefix(line, " ")) - } - return true - } - return false -} - -// Comments returns any comments from the source .proto file and empty string if comments not found. -// The path is a comma-separated list of intergers. -// See descriptor.proto for its format. -func (g *Generator) Comments(path string) string { - loc, ok := g.file.comments[path] - if !ok { - return "" - } - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - return text -} - -func (g *Generator) fileByName(filename string) *FileDescriptor { - return g.allFilesByName[filename] -} - -// weak returns whether the ith import of the current file is a weak import. -func (g *Generator) weak(i int32) bool { - for _, j := range g.file.WeakDependency { - if j == i { - return true - } - } - return false -} - -// Generate the imports -func (g *Generator) generateImports() { - // We almost always need a proto import. Rather than computing when we - // do, which is tricky when there's a plugin, just import it and - // reference it later. The same argument applies to the fmt and math packages. - if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/gogo/protobuf/proto") - } else { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/golang/protobuf/proto") - } - g.PrintImport(g.Pkg["fmt"], "fmt") - g.PrintImport(g.Pkg["math"], "math") - - for i, s := range g.file.Dependency { - fd := g.fileByName(s) - // Do not import our own package. - if fd.PackageName() == g.packageName { - continue - } - filename := goFileName(s) - // By default, import path is the dirname of the Go filename. - importPath := path.Dir(filename) - if substitution, ok := g.ImportMap[s]; ok { - importPath = substitution - } - importPath = g.ImportPrefix + importPath - // Skip weak imports. - if g.weak(int32(i)) { - g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) - continue - } - // We need to import all the dependencies, even if we don't reference them, - // because other code and tools depend on having the full transitive closure - // of protocol buffer types in the binary. - if _, ok := g.usedPackages[fd.PackageName()]; ok { - g.PrintImport(fd.PackageName(), importPath) - } else { - g.P("import _ ", strconv.Quote(importPath)) - } - } - g.P() - for _, s := range g.customImports { - s1 := strings.Map(badToUnderscore, s) - g.PrintImport(s1, s) - } - g.P() - // TODO: may need to worry about uniqueness across plugins - for _, p := range plugins { - p.GenerateImports(g.file) - g.P() - } - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ = ", g.Pkg["proto"], ".Marshal") - g.P("var _ = ", g.Pkg["fmt"], ".Errorf") - g.P("var _ = ", g.Pkg["math"], ".Inf") - g.P() -} - -func (g *Generator) generateImported(id *ImportedDescriptor) { - // Don't generate public import symbols for files that we are generating - // code for, since those symbols will already be in this package. - // We can't simply avoid creating the ImportedDescriptor objects, - // because g.genFiles isn't populated at that stage. - tn := id.TypeName() - sn := tn[len(tn)-1] - df := g.FileOf(id.o.File()) - filename := *df.Name - for _, fd := range g.genFiles { - if *fd.Name == filename { - g.P("// Ignoring public import of ", sn, " from ", filename) - g.P() - return - } - } - g.P("// ", sn, " from public import ", filename) - g.usedPackages[df.PackageName()] = true - - for _, sym := range df.exported[id.o] { - sym.GenerateAlias(g, df.PackageName()) - } - - g.P() -} - -// Generate the enum definitions for this EnumDescriptor. -func (g *Generator) generateEnum(enum *EnumDescriptor) { - // The full type name - typeName := enum.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - ccPrefix := enum.prefix() - - g.PrintComments(enum.path) - if !gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - ccPrefix = "" - } - g.P("type ", ccTypeName, " int32") - g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) - g.P("const (") - g.In() - for i, e := range enum.Value { - g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) - - name := ccPrefix + *e.Name - g.P(name, " ", ccTypeName, " = ", e.Number) - g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) - } - g.Out() - g.P(")") - g.P("var ", ccTypeName, "_name = map[int32]string{") - g.In() - generated := make(map[int32]bool) // avoid duplicate values - for _, e := range enum.Value { - duplicate := "" - if _, present := generated[*e.Number]; present { - duplicate = "// Duplicate value: " - } - g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") - generated[*e.Number] = true - } - g.Out() - g.P("}") - g.P("var ", ccTypeName, "_value = map[string]int32{") - g.In() - for _, e := range enum.Value { - g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") - } - g.Out() - g.P("}") - - if !enum.proto3() { - g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") - g.In() - g.P("p := new(", ccTypeName, ")") - g.P("*p = x") - g.P("return p") - g.Out() - g.P("}") - } - - if gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { - g.P("func (x ", ccTypeName, ") String() string {") - g.In() - g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") - g.Out() - g.P("}") - } - - if !enum.proto3() && !gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { - g.P("func (x ", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalJSONEnum(", ccTypeName, "_name, int32(x))") - g.Out() - g.P("}") - } - if !enum.proto3() { - g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") - g.In() - g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) - g.P("if err != nil {") - g.In() - g.P("return err") - g.Out() - g.P("}") - g.P("*x = ", ccTypeName, "(value)") - g.P("return nil") - g.Out() - g.P("}") - } - g.P() -} - -// The tag is a string like "varint,2,opt,name=fieldname,def=7" that -// identifies details of the field for the protocol buffer marshaling and unmarshaling -// code. The fields are: -// wire encoding -// protocol tag number -// opt,req,rep for optional, required, or repeated -// packed whether the encoding is "packed" (optional; repeated primitives only) -// name= the original declared name -// enum= the name of the enum type if it is an enum-typed field. -// proto3 if this field is in a proto3 message -// def= string representation of the default value, if any. -// The default value must be in a representation that can be used at run-time -// to generate the default value. Thus bools become 0 and 1, for instance. -func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { - optrepreq := "" - switch { - case isOptional(field): - optrepreq = "opt" - case isRequired(field): - optrepreq = "req" - case isRepeated(field): - optrepreq = "rep" - } - var defaultValue string - if dv := field.DefaultValue; dv != nil { // set means an explicit default - defaultValue = *dv - // Some types need tweaking. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if defaultValue == "true" { - defaultValue = "1" - } else { - defaultValue = "0" - } - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - // Nothing to do. Quoting is done for the whole tag. - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // For enums we need to provide the integer constant. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - // It is an enum that was publicly imported. - // We need the underlying type. - obj = id.o - } - enum, ok := obj.(*EnumDescriptor) - if !ok { - log.Printf("obj is a %T", obj) - if id, ok := obj.(*ImportedDescriptor); ok { - log.Printf("id.o is a %T", id.o) - } - g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) - } - defaultValue = enum.integerValueAsString(defaultValue) - } - defaultValue = ",def=" + defaultValue - } - enum := "" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { - // We avoid using obj.PackageName(), because we want to use the - // original (proto-world) package name. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - obj = id.o - } - enum = ",enum=" - if pkg := obj.File().GetPackage(); pkg != "" { - enum += pkg + "." - } - enum += CamelCaseSlice(obj.TypeName()) - } - packed := "" - if field.Options != nil && field.Options.GetPacked() { - packed = ",packed" - } - fieldName := field.GetName() - name := fieldName - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - // We must use the type name for groups instead of - // the field name to preserve capitalization. - // type_name in FieldDescriptorProto is fully-qualified, - // but we only want the local part. - name = *field.TypeName - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[i+1:] - } - } - name = ",name=" + name - - embed := "" - if gogoproto.IsEmbed(field) { - embed = ",embedded=" + fieldName - } - - ctype := "" - if gogoproto.IsCustomType(field) { - ctype = ",customtype=" + gogoproto.GetCustomType(field) - } - - casttype := "" - if gogoproto.IsCastType(field) { - casttype = ",casttype=" + gogoproto.GetCastType(field) - } - - castkey := "" - if gogoproto.IsCastKey(field) { - castkey = ",castkey=" + gogoproto.GetCastKey(field) - } - - castvalue := "" - if gogoproto.IsCastValue(field) { - castvalue = ",castvalue=" + gogoproto.GetCastValue(field) - // record the original message type for jsonpb reconstruction - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - valueField := d.Field[1] - if valueField.IsMessage() { - castvalue += ",castvaluetype=" + strings.TrimPrefix(valueField.GetTypeName(), ".") - } - } - } - - if message.proto3() { - // We only need the extra tag for []byte fields; - // no need to add noise for the others. - if *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && - *field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP && - !field.IsRepeated() { - name += ",proto3" - } - } - oneof := "" - if field.OneofIndex != nil { - oneof = ",oneof" - } - return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s", - wiretype, - field.GetNumber(), - optrepreq, - packed, - name, - enum, - oneof, - defaultValue, - embed, - ctype, - casttype, - castkey, - castvalue)) -} - -func needsStar(field *descriptor.FieldDescriptorProto, proto3 bool, allowOneOf bool) bool { - if isRepeated(field) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { - return false - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field) { - return false - } - if !gogoproto.IsNullable(field) { - return false - } - if field.OneofIndex != nil && allowOneOf && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { - return false - } - if proto3 && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { - return false - } - return true -} - -// TypeName is the printed name appropriate for an item. If the object is in the current file, -// TypeName drops the package name and underscores the rest. -// Otherwise the object is from another package; and the result is the underscored -// package name followed by the item name. -// The result always has an initial capital. -func (g *Generator) TypeName(obj Object) string { - return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) -} - -// TypeNameWithPackage is like TypeName, but always includes the package -// name even if the object is in our own package. -func (g *Generator) TypeNameWithPackage(obj Object) string { - return obj.PackageName() + CamelCaseSlice(obj.TypeName()) -} - -// GoType returns a string representing the type name, and the wire type -func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { - // TODO: Options. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - typ, wire = "float64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - typ, wire = "float32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_INT64: - typ, wire = "int64", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - typ, wire = "uint64", "varint" - case descriptor.FieldDescriptorProto_TYPE_INT32: - typ, wire = "int32", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - typ, wire = "uint32", "varint" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - typ, wire = "uint64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - typ, wire = "uint32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - typ, wire = "bool", "varint" - case descriptor.FieldDescriptorProto_TYPE_STRING: - typ, wire = "string", "bytes" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "group" - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "bytes" - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typ, wire = "[]byte", "bytes" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "varint" - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - typ, wire = "int32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - typ, wire = "int64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - typ, wire = "int32", "zigzag32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - typ, wire = "int64", "zigzag64" - default: - g.Fail("unknown type for", field.GetName()) - } - switch { - case gogoproto.IsCustomType(field) && gogoproto.IsCastType(field): - g.Fail(field.GetName() + " cannot be custom type and cast type") - case gogoproto.IsCustomType(field): - var packageName string - var err error - packageName, typ, err = getCustomType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - case gogoproto.IsCastType(field): - var packageName string - var err error - packageName, typ, err = getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - } - if needsStar(field, g.file.proto3, message != nil && message.allowOneof()) { - typ = "*" + typ - } - if isRepeated(field) { - typ = "[]" + typ - } - return -} - -// GoMapDescriptor is a full description of the map output struct. -type GoMapDescriptor struct { - GoType string - - KeyField *descriptor.FieldDescriptorProto - KeyAliasField *descriptor.FieldDescriptorProto - KeyTag string - - ValueField *descriptor.FieldDescriptorProto - ValueAliasField *descriptor.FieldDescriptorProto - ValueTag string -} - -func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorProto) *GoMapDescriptor { - if d == nil { - byName := g.ObjectNamed(field.GetTypeName()) - desc, ok := byName.(*Descriptor) - if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { - g.Fail(fmt.Sprintf("field %s is not a map", field.GetTypeName())) - return nil - } - d = desc - } - - m := &GoMapDescriptor{ - KeyField: d.Field[0], - ValueField: d.Field[1], - } - - // Figure out the Go types and tags for the key and value types. - m.KeyAliasField, m.ValueAliasField = g.GetMapKeyField(field, m.KeyField), g.GetMapValueField(field, m.ValueField) - keyType, keyWire := g.GoType(d, m.KeyAliasField) - valType, valWire := g.GoType(d, m.ValueAliasField) - - m.KeyTag, m.ValueTag = g.goTag(d, m.KeyField, keyWire), g.goTag(d, m.ValueField, valWire) - - if gogoproto.IsCastType(field) { - var packageName string - var err error - packageName, typ, err := getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - m.GoType = typ - return m - } - - // We don't use stars, except for message-typed values. - // Message and enum types are the only two possibly foreign types used in maps, - // so record their use. They are not permitted as map keys. - keyType = strings.TrimPrefix(keyType, "*") - switch *m.ValueAliasField.Type { - case descriptor.FieldDescriptorProto_TYPE_ENUM: - valType = strings.TrimPrefix(valType, "*") - g.RecordTypeUse(m.ValueAliasField.GetTypeName()) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if !gogoproto.IsNullable(m.ValueAliasField) { - valType = strings.TrimPrefix(valType, "*") - } - g.RecordTypeUse(m.ValueAliasField.GetTypeName()) - default: - valType = strings.TrimPrefix(valType, "*") - } - - m.GoType = fmt.Sprintf("map[%s]%s", keyType, valType) - return m -} - -func (g *Generator) RecordTypeUse(t string) { - if obj, ok := g.typeNameToObject[t]; ok { - // Call ObjectNamed to get the true object to record the use. - obj = g.ObjectNamed(t) - g.usedPackages[obj.PackageName()] = true - } -} - -// Method names that may be generated. Fields with these names get an -// underscore appended. -var methodNames = [...]string{ - "Reset", - "String", - "ProtoMessage", - "Marshal", - "Unmarshal", - "ExtensionRangeArray", - "ExtensionMap", - "Descriptor", - "Size", - "MarshalTo", - "Equal", - "VerboseEqual", - "GoString", -} - -// Generate the type and default constant definitions for this Descriptor. -func (g *Generator) generateMessage(message *Descriptor) { - // The full type name - typeName := message.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - - usedNames := make(map[string]bool) - for _, n := range methodNames { - usedNames[n] = true - } - fieldNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - - oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto - oneofDisc := make(map[int32]string) // name of discriminator method - oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star - oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer - - g.PrintComments(message.path) - g.P("type ", ccTypeName, " struct {") - g.In() - - // allocNames finds a conflict-free variation of the given strings, - // consistently mutating their suffixes. - // It returns the same number of strings. - allocNames := func(ns ...string) []string { - Loop: - for { - for _, n := range ns { - if usedNames[n] { - for i := range ns { - ns[i] += "_" - } - continue Loop - } - } - for _, n := range ns { - usedNames[n] = true - } - return ns - } - } - - for i, field := range message.Field { - // Allocate the getter and the field at the same time so name - // collisions create field/method consistent names. - // TODO: This allocation occurs based on the order of the fields - // in the proto file, meaning that a change in the field - // ordering can change generated Method/Field names. - base := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - base = gogoproto.GetCustomName(field) - } - ns := allocNames(base, "Get"+base) - fieldName, fieldGetterName := ns[0], ns[1] - typename, wiretype := g.GoType(message, field) - jsonName := *field.Name - jsonTag := jsonName + ",omitempty" - repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated()) - if !gogoproto.IsNullable(field) && !repeatedNativeType { - jsonTag = jsonName - } - gogoJsonTag := gogoproto.GetJsonTag(field) - if gogoJsonTag != nil { - jsonTag = *gogoJsonTag - } - gogoMoreTags := gogoproto.GetMoreTags(field) - moreTags := "" - if gogoMoreTags != nil { - moreTags = " " + *gogoMoreTags - } - tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags) - fieldNames[field] = fieldName - fieldGetterNames[field] = fieldGetterName - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) { - fieldName = "" - } - - oneof := field.OneofIndex != nil && message.allowOneof() - if oneof && oneofFieldName[*field.OneofIndex] == "" { - odp := message.OneofDecl[int(*field.OneofIndex)] - fname := allocNames(CamelCase(odp.GetName()))[0] - - // This is the first field of a oneof we haven't seen before. - // Generate the union field. - com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) - if com { - g.P("//") - } - g.P("// Types that are valid to be assigned to ", fname, ":") - // Generate the rest of this comment later, - // when we've computed any disambiguation. - oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() - - dname := "is" + ccTypeName + "_" + fname - oneofFieldName[*field.OneofIndex] = fname - oneofDisc[*field.OneofIndex] = dname - tag := `protobuf_oneof:"` + odp.GetName() + `"` - g.P(fname, " ", dname, " `", tag, "`") - } - - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - m := g.GoMapType(d, field) - typename = m.GoType - mapFieldTypes[field] = typename // record for the getter generation - - tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag) - } - } - - fieldTypes[field] = typename - - if oneof { - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - for { - ok := true - for _, desc := range message.nested { - if CamelCaseSlice(desc.TypeName()) == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if CamelCaseSlice(enum.TypeName()) == tname { - ok = false - break - } - } - if !ok { - tname += "_" - continue - } - break - } - - oneofTypeName[field] = tname - continue - } - - g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) - g.P(fieldName, "\t", typename, "\t`", tag, "`") - g.RecordTypeUse(field.GetTypeName()) - } - if len(message.ExtensionRange) > 0 { - if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P("XXX_extensions\t\tmap[int32]", g.Pkg["proto"], ".Extension `json:\"-\"`") - } else { - g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`") - } - } - if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) && !message.proto3() { - g.P("XXX_unrecognized\t[]byte `json:\"-\"`") - } - g.Out() - g.P("}") - - // Update g.Buffer to list valid oneof types. - // We do this down here, after we've disambiguated the oneof type names. - // We go in reverse order of insertion point to avoid invalidating offsets. - for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { - ip := oneofInsertPoints[oi] - all := g.Buffer.Bytes() - rem := all[ip:] - g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem - for _, field := range message.Field { - if field.OneofIndex == nil || *field.OneofIndex != oi { - continue - } - g.P("//\t*", oneofTypeName[field]) - } - g.Buffer.Write(rem) - } - - // Reset, String and ProtoMessage methods. - g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") - if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") - } - g.P("func (*", ccTypeName, ") ProtoMessage() {}") - - // Extension support methods - var hasExtensions, isMessageSet bool - if len(message.ExtensionRange) > 0 { - hasExtensions = true - // message_set_wire_format only makes sense when extensions are defined. - if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { - isMessageSet = true - g.P() - g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(m.ExtensionMap())") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, m.ExtensionMap())") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(m.XXX_extensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, m.XXX_extensions)") - g.Out() - g.P("}") - g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") - g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") - g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") - } - - g.P() - g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") - g.In() - for _, r := range message.ExtensionRange { - end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends - g.P("{", r.Start, ", ", end, "},") - } - g.Out() - g.P("}") - g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") - g.In() - g.P("return extRange_", ccTypeName) - g.Out() - g.P("}") - if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P("func (m *", ccTypeName, ") ExtensionMap() map[int32]", g.Pkg["proto"], ".Extension {") - g.In() - g.P("if m.XXX_extensions == nil {") - g.In() - g.P("m.XXX_extensions = make(map[int32]", g.Pkg["proto"], ".Extension)") - g.Out() - g.P("}") - g.P("return m.XXX_extensions") - g.Out() - g.P("}") - } else { - g.P("func (m *", ccTypeName, ") GetExtensions() *[]byte {") - g.In() - g.P("if m.XXX_extensions == nil {") - g.In() - g.P("m.XXX_extensions = make([]byte, 0)") - g.Out() - g.P("}") - g.P("return &m.XXX_extensions") - g.Out() - g.P("}") - } - } - - // Default constants - defNames := make(map[*descriptor.FieldDescriptorProto]string) - for _, field := range message.Field { - def := field.GetDefaultValue() - if def == "" { - continue - } - if !gogoproto.IsNullable(field) { - g.Fail("illegal default value: ", field.GetName(), " in ", message.GetName(), " is not nullable and is thus not allowed to have a default value") - } - fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) - defNames[field] = fieldname - typename, _ := g.GoType(message, field) - if typename[0] == '*' { - typename = typename[1:] - } - kind := "const " - switch { - case typename == "bool": - case typename == "string": - def = strconv.Quote(def) - case typename == "[]byte": - def = "[]byte(" + strconv.Quote(def) + ")" - kind = "var " - case def == "inf", def == "-inf", def == "nan": - // These names are known to, and defined by, the protocol language. - switch def { - case "inf": - def = "math.Inf(1)" - case "-inf": - def = "math.Inf(-1)" - case "nan": - def = "math.NaN()" - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { - def = "float32(" + def + ")" - } - kind = "var " - case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: - // Must be an enum. Need to construct the prefixed name. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate constant for %s", fieldname) - continue - } - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - def = g.DefaultPackageName(obj) + enum.prefix() + def - } else { - def = g.DefaultPackageName(obj) + def - } - } - g.P(kind, fieldname, " ", typename, " = ", def) - g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) - } - g.P() - - // Oneof per-field types, discriminants and getters. - if message.allowOneof() { - // Generate unexported named types for the discriminant interfaces. - // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug - // that was triggered by using anonymous interfaces here. - // TODO: Revisit this and consider reverting back to anonymous interfaces. - for oi := range message.OneofDecl { - dname := oneofDisc[int32(oi)] - g.P("type ", dname, " interface {") - g.In() - g.P(dname, "()") - if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Equal(interface{}) bool`) - } - if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`VerboseEqual(interface{}) error`) - } - if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || - gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`MarshalTo([]byte) (int, error)`) - } - if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Size() int`) - } - g.Out() - g.P("}") - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - _, wiretype := g.GoType(message, field) - tag := "protobuf:" + g.goTag(message, field, wiretype) - g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") - g.RecordTypeUse(field.GetTypeName()) - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") - } - g.P() - for oi := range message.OneofDecl { - fname := oneofFieldName[int32(oi)] - g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") - g.P("if m != nil { return m.", fname, " }") - g.P("return nil") - g.P("}") - } - g.P() - } - - // Field getters - var getters []getterSymbol - for _, field := range message.Field { - oneof := field.OneofIndex != nil && message.allowOneof() - if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsEmbed(field) || gogoproto.IsCustomType(field) { - continue - } - fname := fieldNames[field] - typename, _ := g.GoType(message, field) - if t, ok := mapFieldTypes[field]; ok { - typename = t - } - mname := fieldGetterNames[field] - star := "" - if (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && - needsStar(field, g.file.proto3, message != nil && message.allowOneof()) && typename[0] == '*' { - typename = typename[1:] - star = "*" - } - - // In proto3, only generate getters for message fields and oneof fields. - if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof { - continue - } - - // Only export getter symbols for basic types, - // and for messages and enums in the same package. - // Groups are not exported. - // Foreign types can't be hoisted through a public import because - // the importer may not already be importing the defining .proto. - // As an example, imagine we have an import tree like this: - // A.proto -> B.proto -> C.proto - // If A publicly imports B, we need to generate the getters from B in A's output, - // but if one such getter returns something from C then we cannot do that - // because A is not importing C already. - var getter, genType bool - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP: - getter = false - case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: - // Only export getter if its return type is in this package. - getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() - genType = true - default: - getter = true - } - if getter { - getters = append(getters, getterSymbol{ - name: mname, - typ: typename, - typeName: field.GetTypeName(), - genType: genType, - }) - } - - g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") - g.In() - def, hasDef := defNames[field] - typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typeDefaultIsNil = !hasDef - case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: - typeDefaultIsNil = gogoproto.IsNullable(field) - } - if isRepeated(field) { - typeDefaultIsNil = true - } - if typeDefaultIsNil && !oneof { - // A bytes field with no explicit default needs less generated code, - // as does a message or group field, or a repeated field. - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - g.P("return nil") - g.Out() - g.P("}") - g.P() - continue - } - if !gogoproto.IsNullable(field) { - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - } else if !oneof { - g.P("if m != nil && m." + fname + " != nil {") - g.In() - g.P("return " + star + "m." + fname) - g.Out() - g.P("}") - } else { - uname := oneofFieldName[*field.OneofIndex] - tname := oneofTypeName[field] - g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") - g.P("return x.", fname) - g.P("}") - } - if hasDef { - if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { - g.P("return " + def) - } else { - // The default is a []byte var. - // Make a copy when returning it to be safe. - g.P("return append([]byte(nil), ", def, "...)") - } - } else { - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if field.OneofIndex != nil { - g.P(`return nil`) - } else { - goTyp, _ := g.GoType(message, field) - goTypName := GoTypeToName(goTyp) - g.P("return ", goTypName, "{}") - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - g.P("return false") - case descriptor.FieldDescriptorProto_TYPE_STRING: - g.P(`return ""`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - // This is only possible for oneof fields. - g.P("return nil") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // The default default for an enum is the first value in the enum, - // not zero. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate getter for %s", field.GetName()) - continue - } - if len(enum.Value) == 0 { - g.P("return 0 // empty enum") - } else { - first := enum.Value[0].GetName() - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) - } else { - g.P("return ", g.DefaultPackageName(obj)+first) - } - } - default: - g.P("return 0") - } - } - g.Out() - g.P("}") - g.P() - } - - if !message.group { - ms := &messageSymbol{ - sym: ccTypeName, - hasExtensions: hasExtensions, - isMessageSet: isMessageSet, - hasOneof: len(message.OneofDecl) > 0, - getters: getters, - } - g.file.addExport(message, ms) - } - - // Oneof functions - if len(message.OneofDecl) > 0 && message.allowOneof() { - fieldWire := make(map[*descriptor.FieldDescriptorProto]string) - - // method - enc := "_" + ccTypeName + "_OneofMarshaler" - dec := "_" + ccTypeName + "_OneofUnmarshaler" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - - g.P("// XXX_OneofFuncs is for the internal use of the proto package.") - g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", []interface{}{") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("(*", oneofTypeName[field], ")(nil),") - } - g.P("}") - g.P("}") - g.P() - - // marshaler - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - var wire, pre, post string - val := "x." + fieldNames[field] // overridden for TYPE_BOOL - canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" - post = "))" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" - post = ")))" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - pre, post = "b.EncodeFixed64(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - pre, post = "b.EncodeFixed32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - // bool needs special handling. - g.P("t := uint64(0)") - g.P("if ", val, " { t = 1 }") - val = "t" - wire = "WireVarint" - pre, post = "b.EncodeVarint(", ")" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - pre, post = "b.EncodeStringBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - pre, post = "b.Marshal(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - pre, post = "b.EncodeMessage(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - pre, post = "b.EncodeRawBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - pre, post = "b.EncodeZigzag32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - pre, post = "b.EncodeZigzag64(uint64(", "))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - fieldWire[field] = wire - g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { - g.P(`data, err := `, val, `.Marshal()`) - g.P(`if err != nil {`) - g.In() - g.P(`return err`) - g.Out() - g.P(`}`) - val = "data" - } - if !canFail { - g.P("_ = ", pre, val, post) - } else { - g.P("if err := ", pre, val, post, "; err != nil {") - g.In() - g.P("return err") - g.Out() - g.P("}") - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") - } - } - g.P("case nil:") - g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) - g.P("}") - } - g.P("return nil") - g.P("}") - g.P() - - // unmarshaler - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - g.P("switch tag {") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - odp := message.OneofDecl[int(*field.OneofIndex)] - g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) - g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") - g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") - g.P("}") - lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP - var dec, cast, cast2 string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" - case descriptor.FieldDescriptorProto_TYPE_INT64: - dec, cast = "b.DecodeVarint()", "int64" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - dec = "b.DecodeVarint()" - case descriptor.FieldDescriptorProto_TYPE_INT32: - dec, cast = "b.DecodeVarint()", "int32" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - dec = "b.DecodeFixed64()" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - dec, cast = "b.DecodeFixed32()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - dec = "b.DecodeVarint()" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_STRING: - dec = "b.DecodeStringBytes()" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeGroup(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeMessage(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_BYTES: - dec = "b.DecodeRawBytes(true)" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - dec, cast = "b.DecodeVarint()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - dec, cast = "b.DecodeVarint()", fieldTypes[field] - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - dec, cast = "b.DecodeFixed32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - dec, cast = "b.DecodeFixed64()", "int64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - dec, cast = "b.DecodeZigzag32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - dec, cast = "b.DecodeZigzag64()", "int64" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P(lhs, " := ", dec) - val := "x" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { - g.P(`if err != nil {`) - g.In() - g.P(`return true, err`) - g.Out() - g.P(`}`) - _, ctyp, err := GetCustomType(field) - if err != nil { - panic(err) - } - g.P(`var cc `, ctyp) - g.P(`c := &cc`) - g.P(`err = c.Unmarshal(`, val, `)`) - val = "*c" - } - if cast != "" { - val = cast + "(" + val + ")" - } - if cast2 != "" { - val = cast2 + "(" + val + ")" - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - val += " != 0" - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - val = "msg" - } - if gogoproto.IsCastType(field) { - _, typ, err := getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - val = typ + "(" + val + ")" - } - g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") - g.P("return true, err") - } - g.P("default: return false, nil") - g.P("}") - g.P("}") - g.P() - } - - for _, ext := range message.ext { - g.generateExtension(ext) - } - - fullName := strings.Join(message.TypeName(), ".") - if g.file.Package != nil { - fullName = *g.file.Package + "." + fullName - } - - g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) -} - -func (g *Generator) generateExtension(ext *ExtensionDescriptor) { - ccTypeName := ext.DescName() - - extObj := g.ObjectNamed(*ext.Extendee) - var extDesc *Descriptor - if id, ok := extObj.(*ImportedDescriptor); ok { - // This is extending a publicly imported message. - // We need the underlying type for goTag. - extDesc = id.o.(*Descriptor) - } else { - extDesc = extObj.(*Descriptor) - } - extendedType := "*" + g.TypeName(extObj) // always use the original - field := ext.FieldDescriptorProto - fieldType, wireType := g.GoType(ext.parent, field) - tag := g.goTag(extDesc, field, wireType) - g.RecordTypeUse(*ext.Extendee) - if n := ext.FieldDescriptorProto.TypeName; n != nil { - // foreign extension type - g.RecordTypeUse(*n) - } - - typeName := ext.TypeName() - - // Special case for proto2 message sets: If this extension is extending - // proto2_bridge.MessageSet, and its final name component is "message_set_extension", - // then drop that last component. - mset := false - if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { - typeName = typeName[:len(typeName)-1] - mset = true - } - - // For text formatting, the package must be exactly what the .proto file declares, - // ignoring overrides such as the go_package option, and with no dot/underscore mapping. - extName := strings.Join(typeName, ".") - if g.file.Package != nil { - extName = *g.file.Package + "." + extName - } - - g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") - g.In() - g.P("ExtendedType: (", extendedType, ")(nil),") - g.P("ExtensionType: (", fieldType, ")(nil),") - g.P("Field: ", field.Number, ",") - g.P(`Name: "`, extName, `",`) - g.P("Tag: ", tag, ",") - - g.Out() - g.P("}") - g.P() - - if mset { - // Generate a bit more code to register with message_set.go. - g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) - } - - g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) -} - -func (g *Generator) generateInitFunction() { - for _, enum := range g.file.enum { - g.generateEnumRegistration(enum) - } - for _, d := range g.file.desc { - for _, ext := range d.ext { - g.generateExtensionRegistration(ext) - } - } - for _, ext := range g.file.ext { - g.generateExtensionRegistration(ext) - } - if len(g.init) == 0 { - return - } - g.P("func init() {") - g.In() - for _, l := range g.init { - g.P(l) - } - g.Out() - g.P("}") - g.init = nil -} - -func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { - // // We always print the full (proto-world) package name here. - pkg := enum.File().GetPackage() - if pkg != "" { - pkg += "." - } - // The full type name - typeName := enum.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) -} - -func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { - g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) -} - -// And now lots of helper functions. - -// Is c an ASCII lower-case letter? -func isASCIILower(c byte) bool { - return 'a' <= c && c <= 'z' -} - -// Is c an ASCII digit? -func isASCIIDigit(c byte) bool { - return '0' <= c && c <= '9' -} - -// CamelCase returns the CamelCased name. -// If there is an interior underscore followed by a lower case letter, -// drop the underscore and convert the letter to upper case. -// There is a remote possibility of this rewrite causing a name collision, -// but it's so remote we're prepared to pretend it's nonexistent - since the -// C++ generator lowercases names, it's extremely unlikely to have two fields -// with different capitalizations. -// In short, _my_field_name_2 becomes XMyFieldName_2. -func CamelCase(s string) string { - if s == "" { - return "" - } - t := make([]byte, 0, 32) - i := 0 - if s[0] == '_' { - // Need a capital letter; drop the '_'. - t = append(t, 'X') - i++ - } - // Invariant: if the next letter is lower case, it must be converted - // to upper case. - // That is, we process a word at a time, where words are marked by _ or - // upper case letter. Digits are treated as words. - for ; i < len(s); i++ { - c := s[i] - if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { - continue // Skip the underscore in s. - } - if isASCIIDigit(c) { - t = append(t, c) - continue - } - // Assume we have a letter now - if not, it's a bogus identifier. - // The next word is a sequence of characters that must start upper case. - if isASCIILower(c) { - c ^= ' ' // Make it a capital letter. - } - t = append(t, c) // Guaranteed not lower case. - // Accept lower case sequence that follows. - for i+1 < len(s) && isASCIILower(s[i+1]) { - i++ - t = append(t, s[i]) - } - } - return string(t) -} - -// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to -// be joined with "_". -func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } - -// dottedSlice turns a sliced name into a dotted name. -func dottedSlice(elem []string) string { return strings.Join(elem, ".") } - -// Given a .proto file name, return the output name for the generated Go program. -func goFileName(name string) string { - ext := path.Ext(name) - if ext == ".proto" || ext == ".protodevel" { - name = name[0 : len(name)-len(ext)] - } - return name + ".pb.go" -} - -// Is this field optional? -func isOptional(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL -} - -// Is this field required? -func isRequired(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED -} - -// Is this field repeated? -func isRepeated(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED -} - -// badToUnderscore is the mapping function used to generate Go names from package names, -// which can be dotted in the input .proto file. It replaces non-identifier characters such as -// dot or dash with underscore. -func badToUnderscore(r rune) rune { - if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { - return r - } - return '_' -} - -// baseName returns the last path element of the name, with the last dotted suffix removed. -func baseName(name string) string { - // First, find the last element - if i := strings.LastIndex(name, "/"); i >= 0 { - name = name[i+1:] - } - // Now drop the suffix - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[0:i] - } - return name -} - -// The SourceCodeInfo message describes the location of elements of a parsed -// .proto file by way of a "path", which is a sequence of integers that -// describe the route from a FileDescriptorProto to the relevant submessage. -// The path alternates between a field number of a repeated field, and an index -// into that repeated field. The constants below define the field numbers that -// are used. -// -// See descriptor.proto for more information about this. -const ( - // tag numbers in FileDescriptorProto - packagePath = 2 // package - messagePath = 4 // message_type - enumPath = 5 // enum_type - // tag numbers in DescriptorProto - messageFieldPath = 2 // field - messageMessagePath = 3 // nested_type - messageEnumPath = 4 // enum_type - messageOneofPath = 8 // oneof_decl - // tag numbers in EnumDescriptorProto - enumValuePath = 2 // value -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/helper.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/helper.go deleted file mode 100644 index 048cd9b369..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/helper.go +++ /dev/null @@ -1,454 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package generator - -import ( - "bytes" - "go/parser" - "go/printer" - "go/token" - "strings" - - "path" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" -) - -func (d *FileDescriptor) Messages() []*Descriptor { - return d.desc -} - -func (d *FileDescriptor) Enums() []*EnumDescriptor { - return d.enum -} - -func (d *Descriptor) IsGroup() bool { - return d.group -} - -func (g *Generator) IsGroup(field *descriptor.FieldDescriptorProto) bool { - if d, ok := g.typeNameToObject[field.GetTypeName()].(*Descriptor); ok { - return d.IsGroup() - } - return false -} - -func (g *Generator) TypeNameByObject(typeName string) Object { - o, ok := g.typeNameToObject[typeName] - if !ok { - g.Fail("can't find object with type", typeName) - } - return o -} - -func (g *Generator) OneOfTypeName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - typeName := message.TypeName() - ccTypeName := CamelCaseSlice(typeName) - fieldName := g.GetOneOfFieldName(message, field) - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - ok := true - for _, desc := range message.nested { - if strings.Join(desc.TypeName(), "_") == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if strings.Join(enum.TypeName(), "_") == tname { - ok = false - break - } - } - if !ok { - tname += "_" - } - return tname -} - -type PluginImports interface { - NewImport(pkg string) Single - GenerateImports(file *FileDescriptor) -} - -type pluginImports struct { - generator *Generator - singles []Single -} - -func NewPluginImports(generator *Generator) *pluginImports { - return &pluginImports{generator, make([]Single, 0)} -} - -func (this *pluginImports) NewImport(pkg string) Single { - imp := newImportedPackage(this.generator.ImportPrefix, pkg) - this.singles = append(this.singles, imp) - return imp -} - -func (this *pluginImports) GenerateImports(file *FileDescriptor) { - for _, s := range this.singles { - if s.IsUsed() { - this.generator.PrintImport(s.Name(), s.Location()) - } - } -} - -type Single interface { - Use() string - IsUsed() bool - Name() string - Location() string -} - -type importedPackage struct { - used bool - pkg string - name string - importPrefix string -} - -func newImportedPackage(importPrefix, pkg string) *importedPackage { - return &importedPackage{ - pkg: pkg, - importPrefix: importPrefix, - } -} - -func (this *importedPackage) Use() string { - if !this.used { - this.name = RegisterUniquePackageName(this.pkg, nil) - this.used = true - } - return this.name -} - -func (this *importedPackage) IsUsed() bool { - return this.used -} - -func (this *importedPackage) Name() string { - return this.name -} - -func (this *importedPackage) Location() string { - return this.importPrefix + this.pkg -} - -func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - goTyp, _ := g.GoType(message, field) - fieldname := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - fieldname = gogoproto.GetCustomName(field) - } - if gogoproto.IsEmbed(field) { - fieldname = EmbedFieldName(goTyp) - } - if field.OneofIndex != nil { - fieldname = message.OneofDecl[int(*field.OneofIndex)].GetName() - fieldname = CamelCase(fieldname) - } - for _, f := range methodNames { - if f == fieldname { - return fieldname + "_" - } - } - return fieldname -} - -func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - goTyp, _ := g.GoType(message, field) - fieldname := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - fieldname = gogoproto.GetCustomName(field) - } - if gogoproto.IsEmbed(field) { - fieldname = EmbedFieldName(goTyp) - } - for _, f := range methodNames { - if f == fieldname { - return fieldname + "_" - } - } - return fieldname -} - -func GetMap(file *descriptor.FileDescriptorProto, field *descriptor.FieldDescriptorProto) *descriptor.DescriptorProto { - if !field.IsMessage() { - return nil - } - typeName := strings.TrimPrefix(field.GetTypeName(), "."+file.GetPackage()+".") - if strings.Contains(typeName, "Map") && !strings.HasSuffix(typeName, "Entry") { - typeName += "." + CamelCase(field.GetName()) + "Entry" - } - return file.GetMessage(typeName) -} - -func IsMap(file *descriptor.FileDescriptorProto, field *descriptor.FieldDescriptorProto) bool { - msg := GetMap(file, field) - if msg == nil { - return false - } - return msg.GetOptions().GetMapEntry() -} - -func (g *Generator) IsMap(field *descriptor.FieldDescriptorProto) bool { - if !field.IsMessage() { - return false - } - byName := g.ObjectNamed(field.GetTypeName()) - desc, ok := byName.(*Descriptor) - if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { - return false - } - return true -} - -func (g *Generator) GetMapKeyField(field, keyField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { - if !gogoproto.IsCastKey(field) { - return keyField - } - keyField = proto.Clone(keyField).(*descriptor.FieldDescriptorProto) - if keyField.Options == nil { - keyField.Options = &descriptor.FieldOptions{} - } - keyType := gogoproto.GetCastKey(field) - if err := proto.SetExtension(keyField.Options, gogoproto.E_Casttype, &keyType); err != nil { - g.Fail(err.Error()) - } - return keyField -} - -func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { - if !gogoproto.IsCastValue(field) && gogoproto.IsNullable(field) { - return valField - } - valField = proto.Clone(valField).(*descriptor.FieldDescriptorProto) - if valField.Options == nil { - valField.Options = &descriptor.FieldOptions{} - } - if valType := gogoproto.GetCastValue(field); len(valType) > 0 { - if err := proto.SetExtension(valField.Options, gogoproto.E_Casttype, &valType); err != nil { - g.Fail(err.Error()) - } - } - - nullable := gogoproto.IsNullable(field) - if err := proto.SetExtension(valField.Options, gogoproto.E_Nullable, &nullable); err != nil { - g.Fail(err.Error()) - } - return valField -} - -// GoMapValueTypes returns the map value Go type and the alias map value Go type (for casting), taking into -// account whether the map is nullable or the value is a message. -func GoMapValueTypes(mapField, valueField *descriptor.FieldDescriptorProto, goValueType, goValueAliasType string) (nullable bool, outGoType string, outGoAliasType string) { - nullable = gogoproto.IsNullable(mapField) && valueField.IsMessage() - if nullable { - // ensure the non-aliased Go value type is a pointer for consistency - if strings.HasPrefix(goValueType, "*") { - outGoType = goValueType - } else { - outGoType = "*" + goValueType - } - outGoAliasType = goValueAliasType - } else { - outGoType = strings.Replace(goValueType, "*", "", 1) - outGoAliasType = strings.Replace(goValueAliasType, "*", "", 1) - } - return -} - -func GoTypeToName(goTyp string) string { - return strings.Replace(strings.Replace(goTyp, "*", "", -1), "[]", "", -1) -} - -func EmbedFieldName(goTyp string) string { - goTyp = GoTypeToName(goTyp) - goTyps := strings.Split(goTyp, ".") - if len(goTyps) == 1 { - return goTyp - } - if len(goTyps) == 2 { - return goTyps[1] - } - panic("unreachable") -} - -func (g *Generator) GeneratePlugin(p Plugin) { - p.Init(g) - // Generate the output. The generator runs for every file, even the files - // that we don't generate output for, so that we can collate the full list - // of exported symbols to support public imports. - genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) - for _, file := range g.genFiles { - genFileMap[file] = true - } - i := 0 - for _, file := range g.allFiles { - g.Reset() - g.writeOutput = genFileMap[file] - g.generatePlugin(file, p) - if !g.writeOutput { - continue - } - g.Response.File[i] = new(plugin.CodeGeneratorResponse_File) - g.Response.File[i].Name = proto.String(goFileName(*file.Name)) - g.Response.File[i].Content = proto.String(g.String()) - i++ - } -} - -func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) { - g.file = g.FileOf(file) -} - -func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) { - g.writtenImports = make(map[string]bool) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - - // Run the plugins before the imports so we know which imports are necessary. - p.Generate(file) - - // Generate header and imports last, though they appear first in the output. - rem := g.Buffer - g.Buffer = new(bytes.Buffer) - g.generateHeader() - p.GenerateImports(g.file) - g.generateImports() - if !g.writeOutput { - return - } - g.Write(rem.Bytes()) - - // Reformat generated code. - contents := string(g.Buffer.Bytes()) - fset := token.NewFileSet() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) - if err != nil { - g.Fail("bad Go source code was generated:", contents, err.Error()) - return - } - g.Reset() - err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) - if err != nil { - g.Fail("generated Go source code could not be reformatted:", err.Error()) - } -} - -func GetCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - return getCustomType(field) -} - -func getCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Customtype) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func splitCPackageType(ctype string) (packageName string, typ string) { - ss := strings.Split(ctype, ".") - if len(ss) == 1 { - return "", ctype - } - packageName = strings.Join(ss[0:len(ss)-1], ".") - typeName := ss[len(ss)-1] - importStr := strings.Map(badToUnderscore, packageName) - typ = importStr + "." + typeName - return packageName, typ -} - -func getCastType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Casttype) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func getCastKey(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Castkey) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func getCastValue(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Castvalue) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func FileName(file *FileDescriptor) string { - fname := path.Base(file.FileDescriptorProto.GetName()) - fname = strings.Replace(fname, ".proto", "", -1) - fname = strings.Replace(fname, "-", "_", -1) - return CamelCase(fname) -} - -func (g *Generator) AllFiles() *descriptor.FileDescriptorSet { - set := &descriptor.FileDescriptorSet{} - set.File = make([]*descriptor.FileDescriptorProto, len(g.allFiles)) - for i := range g.allFiles { - set.File[i] = g.allFiles[i].FileDescriptorProto - } - return set -} - -func (d *Descriptor) Path() string { - return d.path -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/name_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/name_test.go deleted file mode 100644 index f926918e4d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/generator/name_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2013 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package generator - -import ( - "testing" -) - -func TestCamelCase(t *testing.T) { - tests := []struct { - in, want string - }{ - {"one", "One"}, - {"one_two", "OneTwo"}, - {"_my_field_name_2", "XMyFieldName_2"}, - {"Something_Capped", "Something_Capped"}, - {"my_Name", "My_Name"}, - {"OneTwo", "OneTwo"}, - {"_", "X"}, - {"_a_", "XA_"}, - } - for _, tc := range tests { - if got := CamelCase(tc.in); got != tc.want { - t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want) - } - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/main.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/main.go deleted file mode 100644 index dd8e795030..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/main.go +++ /dev/null @@ -1,57 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate -// Go code. Run it by building this program and putting it in your path with -// the name -// protoc-gen-gogo -// That word 'gogo' at the end becomes part of the option string set for the -// protocol compiler, so once the protocol compiler (protoc) is installed -// you can run -// protoc --gogo_out=output_directory input_directory/file.proto -// to generate Go bindings for the protocol defined by file.proto. -// With that input, the output will be written to -// output_directory/file.pb.go -// -// The generated code is documented in the package comment for -// the library. -// -// See the README and documentation for protocol buffers to learn more: -// https://developers.google.com/protocol-buffers/ -package main - -import ( - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - command.Write(command.Generate(command.Read())) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/Makefile deleted file mode 100644 index 546287cef8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/compiler/plugin.proto -# Also we need to fix an import. -regenerate: - protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. -I=../../protobuf/google/protobuf/compiler/:../../protobuf/ ../../protobuf/google/protobuf/compiler/plugin.proto - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/plugin.pb.go deleted file mode 100644 index 8e8ebf7069..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogo/plugin/plugin.pb.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: plugin.proto -// DO NOT EDIT! - -/* -Package plugin_go is a generated protocol buffer package. - -It is generated from these files: - plugin.proto - -It has these top-level messages: - CodeGeneratorRequest - CodeGeneratorResponse -*/ -package plugin_go - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -type CodeGeneratorRequest struct { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate" json:"file_to_generate,omitempty"` - // The generator parameter passed on the command-line. - Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file" json:"proto_file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } -func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorRequest) ProtoMessage() {} - -func (m *CodeGeneratorRequest) GetFileToGenerate() []string { - if m != nil { - return m.FileToGenerate - } - return nil -} - -func (m *CodeGeneratorRequest) GetParameter() string { - if m != nil && m.Parameter != nil { - return *m.Parameter - } - return "" -} - -func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { - if m != nil { - return m.ProtoFile - } - return nil -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -type CodeGeneratorResponse struct { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } -func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse) ProtoMessage() {} - -func (m *CodeGeneratorResponse) GetError() string { - if m != nil && m.Error != nil { - return *m.Error - } - return "" -} - -func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { - if m != nil { - return m.File - } - return nil -} - -// Represents a single generated file. -type CodeGeneratorResponse_File struct { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point" json:"insertion_point,omitempty"` - // The file contents. - Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } -func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse_File) ProtoMessage() {} - -func (m *CodeGeneratorResponse_File) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { - if m != nil && m.InsertionPoint != nil { - return *m.InsertionPoint - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetContent() string { - if m != nil && m.Content != nil { - return *m.Content - } - return "" -} - -func init() { - proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") - proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") - proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofast/main.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofast/main.go deleted file mode 100644 index a3dff9b252..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofast/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "github.com/gogo/protobuf/vanity" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - files := req.GetProtoFile() - files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofaster/main.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofaster/main.go deleted file mode 100644 index f7dc56b5d2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogofaster/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "github.com/gogo/protobuf/vanity" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - files := req.GetProtoFile() - files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) - vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogoslick/main.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogoslick/main.go deleted file mode 100644 index 192a974e67..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-gen-gogoslick/main.go +++ /dev/null @@ -1,59 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "github.com/gogo/protobuf/vanity" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - files := req.GetProtoFile() - files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) - vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) - - vanity.ForEachFile(files, vanity.TurnOffGoEnumPrefixAll) - vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) - vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) - - vanity.ForEachFile(files, vanity.TurnOnEqualAll) - vanity.ForEachFile(files, vanity.TurnOnGoStringAll) - vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) - vanity.ForEachFile(files, vanity.TurnOnStringerAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-min-version/minversion.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-min-version/minversion.go deleted file mode 100644 index 3f61d0da2b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/protoc-min-version/minversion.go +++ /dev/null @@ -1,65 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "fmt" - "github.com/gogo/protobuf/version" - "os" - "os/exec" - "strings" -) - -func filter(ss []string, flag string) ([]string, string) { - s := make([]string, 0, len(ss)) - var v string - for i := range ss { - if strings.Contains(ss[i], flag) { - vs := strings.Split(ss[i], "=") - v = vs[1] - continue - } - s = append(s, ss[i]) - } - return s, v -} - -func main() { - args, min := filter(os.Args[1:], "-version") - if !version.AtLeast(min) { - fmt.Printf("protoc version not high enough to parse this proto file\n") - return - } - gen := exec.Command("protoc", args...) - out, err := gen.CombinedOutput() - if err != nil { - fmt.Printf("%s\n", string(out)) - panic(err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/sortkeys/sortkeys.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/sortkeys/sortkeys.go deleted file mode 100644 index c52878dd59..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/sortkeys/sortkeys.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package sortkeys - -import ( - "sort" -) - -func Strings(l []string) { - sort.Strings(l) -} - -func Float64s(l []float64) { - sort.Float64s(l) -} - -func Float32s(l []float32) { - sort.Sort(Float32Slice(l)) -} - -func Int64s(l []int64) { - sort.Sort(Int64Slice(l)) -} - -func Int32s(l []int32) { - sort.Sort(Int32Slice(l)) -} - -func Uint64s(l []uint64) { - sort.Sort(Uint64Slice(l)) -} - -func Uint32s(l []uint32) { - sort.Sort(Uint32Slice(l)) -} - -func Bools(l []bool) { - sort.Sort(BoolSlice(l)) -} - -type BoolSlice []bool - -func (p BoolSlice) Len() int { return len(p) } -func (p BoolSlice) Less(i, j int) bool { return p[j] } -func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int64Slice []int64 - -func (p Int64Slice) Len() int { return len(p) } -func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int32Slice []int32 - -func (p Int32Slice) Len() int { return len(p) } -func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint64Slice []uint64 - -func (p Uint64Slice) Len() int { return len(p) } -func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint32Slice []uint32 - -func (p Uint32Slice) Len() int { return len(p) } -func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Float32Slice []float32 - -func (p Float32Slice) Len() int { return len(p) } -func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/.gitignore b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/.gitignore deleted file mode 100644 index 773a6df9ba..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.dat diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/Makefile deleted file mode 100644 index edcbe5048e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc --gogo_out=. --proto_path=../:../../../../:../protobuf/:. thetest.proto - protoc-gen-combo --default=false --proto_path=../:../../../../:../protobuf/:. thetest.proto - cp uuid.go ./combos/both/ - cp uuid.go ./combos/marshaler/ - cp uuid.go ./combos/unmarshaler/ - cp uuid.go ./combos/unsafeboth/ - cp uuid.go ./combos/unsafemarshaler/ - cp uuid.go ./combos/unsafeunmarshaler/ - cp bug_test.go ./combos/both/ - cp bug_test.go ./combos/marshaler/ - cp bug_test.go ./combos/unmarshaler/ - cp bug_test.go ./combos/unsafeboth/ - cp bug_test.go ./combos/unsafemarshaler/ - cp bug_test.go ./combos/unsafeunmarshaler/ diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/Makefile deleted file mode 100644 index 9e101c8808..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. asym.proto) \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.pb.go deleted file mode 100644 index 6314d1d4a4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.pb.go +++ /dev/null @@ -1,601 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: asym.proto -// DO NOT EDIT! - -/* -Package asym is a generated protocol buffer package. - -It is generated from these files: - asym.proto - -It has these top-level messages: - M - MyType -*/ -package asym - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type M struct { - Arr []MyType `protobuf:"bytes,1,rep,name=arr,customtype=MyType" json:"arr"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *M) Reset() { *m = M{} } -func (m *M) String() string { return proto.CompactTextString(m) } -func (*M) ProtoMessage() {} - -type MyType struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyType) Reset() { *m = MyType{} } -func (m *MyType) String() string { return proto.CompactTextString(m) } -func (*MyType) ProtoMessage() {} - -func init() { - proto.RegisterType((*M)(nil), "asym.M") - proto.RegisterType((*MyType)(nil), "asym.MyType") -} -func (this *M) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *M") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *M but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *M but is not nil && this == nil") - } - if len(this.Arr) != len(that1.Arr) { - return fmt.Errorf("Arr this(%v) Not Equal that(%v)", len(this.Arr), len(that1.Arr)) - } - for i := range this.Arr { - if !this.Arr[i].Equal(that1.Arr[i]) { - return fmt.Errorf("Arr this[%v](%v) Not Equal that[%v](%v)", i, this.Arr[i], i, that1.Arr[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *M) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Arr) != len(that1.Arr) { - return false - } - for i := range this.Arr { - if !this.Arr[i].Equal(that1.Arr[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyType) - if !ok { - that2, ok := that.(MyType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyType but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyType) - if !ok { - that2, ok := that.(MyType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *M) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *M) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Arr) > 0 { - for _, msg := range m.Arr { - data[i] = 0xa - i++ - i = encodeVarintAsym(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Asym(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Asym(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintAsym(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedM(r randyAsym, easy bool) *M { - this := &M{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.Arr = make([]MyType, v1) - for i := 0; i < v1; i++ { - v2 := NewPopulatedMyType(r) - this.Arr[i] = *v2 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAsym(r, 2) - } - return this -} - -type randyAsym interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAsym(r randyAsym) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAsym(r randyAsym) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneAsym(r) - } - return string(tmps) -} -func randUnrecognizedAsym(r randyAsym, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldAsym(data, r, fieldNumber, wire) - } - return data -} -func randFieldAsym(data []byte, r randyAsym, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateAsym(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateAsym(data, uint64(v4)) - case 1: - data = encodeVarintPopulateAsym(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateAsym(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateAsym(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateAsym(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateAsym(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *M) Size() (n int) { - var l int - _ = l - if len(m.Arr) > 0 { - for _, e := range m.Arr { - l = e.Size() - n += 1 + l + sovAsym(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAsym(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAsym(x uint64) (n int) { - return sovAsym(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *M) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: M: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAsym - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v MyType - m.Arr = append(m.Arr, v) - if err := m.Arr[len(m.Arr)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsym(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAsym(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAsym(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthAsym - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAsym(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAsym = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAsym = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.proto deleted file mode 100644 index b73fe1ebae..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package asym; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; - -message M { - repeated bytes arr = 1 [(gogoproto.customtype) = "MyType", (gogoproto.nullable) = false]; -} - -message MyType { - option (gogoproto.marshaler) = false; - option (gogoproto.sizer) = false; - option (gogoproto.populate) = false; - option (gogoproto.testgen) = false; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym_test.go deleted file mode 100644 index bc7532ec13..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asym_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package asym - -import ( - "testing" -) - -func TestAsym(t *testing.T) { - m := &M{[]MyType{{}, {}}, nil} - if err := m.VerboseEqual(m); err != nil { - t.Fatalf("should be equal: %v", err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asympb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asympb_test.go deleted file mode 100644 index 39a886bb7b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/asympb_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: asym.proto -// DO NOT EDIT! - -/* -Package asym is a generated protocol buffer package. - -It is generated from these files: - asym.proto - -It has these top-level messages: - M - MyType -*/ -package asym - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/pop.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/pop.go deleted file mode 100644 index f745a70748..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/asymetric-issue125/pop.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package asym - -func NewPopulatedMyType(r randyAsym) *MyType { - this := &MyType{} - return this -} - -func (m MyType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyType) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/Makefile deleted file mode 100644 index f3f1a492c7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. casttype.proto diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/casttype.proto deleted file mode 100644 index 1293244446..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.pb.go deleted file mode 100644 index e3b14ec405..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.pb.go +++ /dev/null @@ -1,2949 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/both/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyBytes != nil { - data[i] = 0x2a - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) - i += copy(data[i:], m.MyBytes) - } - if m.NormalBytes != nil { - data[i] = 0x32 - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) - i += copy(data[i:], m.NormalBytes) - } - if len(m.MyUint64S) > 0 { - for _, num := range m.MyUint64S { - data[i] = 0x38 - i++ - i = encodeVarintCasttype(data, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - data[i] = 0x42 - i++ - v := m.MyMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyCustomMap) > 0 { - for k := range m.MyCustomMap { - data[i] = 0x4a - i++ - v := m.MyCustomMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyNullableMap) > 0 { - for k := range m.MyNullableMap { - data[i] = 0x52 - i++ - v := m.MyNullableMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.MyEmbeddedMap) > 0 { - for k := range m.MyEmbeddedMap { - data[i] = 0x5a - i++ - v := m.MyEmbeddedMap[k] - msgSize := (&v).Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64((&v).Size())) - n2, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttype(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttype - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttype(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.proto deleted file mode 100644 index e935b68631..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttypepb_test.go deleted file mode 100644 index 813ff31888..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/both/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/both/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.pb.go deleted file mode 100644 index 677c46928b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.pb.go +++ /dev/null @@ -1,2153 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyBytes != nil { - data[i] = 0x2a - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) - i += copy(data[i:], m.MyBytes) - } - if m.NormalBytes != nil { - data[i] = 0x32 - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) - i += copy(data[i:], m.NormalBytes) - } - if len(m.MyUint64S) > 0 { - for _, num := range m.MyUint64S { - data[i] = 0x38 - i++ - i = encodeVarintCasttype(data, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - data[i] = 0x42 - i++ - v := m.MyMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyCustomMap) > 0 { - for k := range m.MyCustomMap { - data[i] = 0x4a - i++ - v := m.MyCustomMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyNullableMap) > 0 { - for k := range m.MyNullableMap { - data[i] = 0x52 - i++ - v := m.MyNullableMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.MyEmbeddedMap) > 0 { - for k := range m.MyEmbeddedMap { - data[i] = 0x5a - i++ - v := m.MyEmbeddedMap[k] - msgSize := (&v).Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64((&v).Size())) - n2, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.proto deleted file mode 100644 index 6f3d12a212..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttypepb_test.go deleted file mode 100644 index a7de054969..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/marshaler/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.pb.go deleted file mode 100644 index 6b15702ee6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.pb.go +++ /dev/null @@ -1,1965 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/neither/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/neither/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.proto deleted file mode 100644 index 1293244446..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttypepb_test.go deleted file mode 100644 index 0f1fb92617..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/neither/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/neither/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.pb.go deleted file mode 100644 index f98a8b8589..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.pb.go +++ /dev/null @@ -1,2761 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttype(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttype - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttype(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.proto deleted file mode 100644 index 32e333e7df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go deleted file mode 100644 index 4b331acdc3..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.pb.go deleted file mode 100644 index 706cca7fe8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.pb.go +++ /dev/null @@ -1,2949 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyBytes != nil { - data[i] = 0x2a - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) - i += copy(data[i:], m.MyBytes) - } - if m.NormalBytes != nil { - data[i] = 0x32 - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) - i += copy(data[i:], m.NormalBytes) - } - if len(m.MyUint64S) > 0 { - for _, num := range m.MyUint64S { - data[i] = 0x38 - i++ - i = encodeVarintCasttype(data, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - data[i] = 0x42 - i++ - v := m.MyMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyCustomMap) > 0 { - for k := range m.MyCustomMap { - data[i] = 0x4a - i++ - v := m.MyCustomMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyNullableMap) > 0 { - for k := range m.MyNullableMap { - data[i] = 0x52 - i++ - v := m.MyNullableMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.MyEmbeddedMap) > 0 { - for k := range m.MyEmbeddedMap { - data[i] = 0x5a - i++ - v := m.MyEmbeddedMap[k] - msgSize := (&v).Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64((&v).Size())) - n2, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttypeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttypeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttypeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.proto deleted file mode 100644 index 5153d1339c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go deleted file mode 100644 index 5709d6ab65..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go deleted file mode 100644 index a3ae46314d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go +++ /dev/null @@ -1,2153 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyBytes != nil { - data[i] = 0x2a - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) - i += copy(data[i:], m.MyBytes) - } - if m.NormalBytes != nil { - data[i] = 0x32 - i++ - i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) - i += copy(data[i:], m.NormalBytes) - } - if len(m.MyUint64S) > 0 { - for _, num := range m.MyUint64S { - data[i] = 0x38 - i++ - i = encodeVarintCasttype(data, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - data[i] = 0x42 - i++ - v := m.MyMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyCustomMap) > 0 { - for k := range m.MyCustomMap { - data[i] = 0x4a - i++ - v := m.MyCustomMap[k] - mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintCasttype(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(v)) - } - } - if len(m.MyNullableMap) > 0 { - for k := range m.MyNullableMap { - data[i] = 0x52 - i++ - v := m.MyNullableMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.MyEmbeddedMap) > 0 { - for k := range m.MyEmbeddedMap { - data[i] = 0x5a - i++ - v := m.MyEmbeddedMap[k] - msgSize := (&v).Size() - mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) - i = encodeVarintCasttype(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCasttype(data, i, uint64((&v).Size())) - n2, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.proto deleted file mode 100644 index f2d86edb89..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go deleted file mode 100644 index 31bb75e7be..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go deleted file mode 100644 index 50be2ce9d9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go +++ /dev/null @@ -1,2761 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` - MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,5,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,6,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,7,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,8,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,9,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,10,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,11,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "casttype.Castaway") - proto.RegisterType((*Wilson)(nil), "casttype.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/casttype.proto"), - Package: func(v string) *string { return &v }("casttype"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32Ptr"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }, {Name: func(v string) *string { return &v }("MyUint64Ptr"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyUint64"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyBytes"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }, {Name: func(v string) *string { return &v }("NormalBytes"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("MyUint64s"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyMap"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyCustomMap"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyCustomMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyNullableMap"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyNullableMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMap"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Castaway.MyEmbeddedMapEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65008: proto.NewExtension([]byte{0x82, 0xdf, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x79, 0x70, 0x65})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("MyMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyCustomMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyNullableMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MyEmbeddedMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".casttype.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) - } - } else if this.Int32Ptr != nil { - return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") - } else if that1.Int32Ptr != nil { - return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) - } - } else if this.MyUint64Ptr != nil { - return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") - } else if that1.MyUint64Ptr != nil { - return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) - } - if this.MyUint64 != that1.MyUint64 { - return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) - } - } - if len(this.MyMap) != len(that1.MyMap) { - return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if !bytes.Equal(this.MyBytes, that1.MyBytes) { - return false - } - if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { - return false - } - if len(this.MyUint64S) != len(that1.MyUint64S) { - return false - } - for i := range this.MyUint64S { - if this.MyUint64S[i] != that1.MyUint64S[i] { - return false - } - } - if len(this.MyMap) != len(that1.MyMap) { - return false - } - for i := range this.MyMap { - if this.MyMap[i] != that1.MyMap[i] { - return false - } - } - if len(this.MyCustomMap) != len(that1.MyCustomMap) { - return false - } - for i := range this.MyCustomMap { - if this.MyCustomMap[i] != that1.MyCustomMap[i] { - return false - } - } - if len(this.MyNullableMap) != len(that1.MyNullableMap) { - return false - } - for i := range this.MyNullableMap { - if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { - return false - } - } - if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { - return false - } - for i := range this.MyEmbeddedMap { - a := this.MyEmbeddedMap[i] - b := that1.MyEmbeddedMap[i] - if !(&a).Equal(&b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes - GetNormalBytes() []byte - GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType - GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson - GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { - return this.MyBytes -} - -func (this *Castaway) GetNormalBytes() []byte { - return this.NormalBytes -} - -func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64S -} - -func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { - return this.MyMap -} - -func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyCustomMap -} - -func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { - return this.MyNullableMap -} - -func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { - return this.MyEmbeddedMap -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyBytes = that.GetMyBytes() - this.NormalBytes = that.GetNormalBytes() - this.MyUint64S = that.GetMyUint64S() - this.MyMap = that.GetMyMap() - this.MyCustomMap = that.GetMyCustomMap() - this.MyNullableMap = that.GetMyNullableMap() - this.MyEmbeddedMap = that.GetMyEmbeddedMap() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&casttype.Castaway{") - if this.Int32Ptr != nil { - s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") - } - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - if this.MyUint64Ptr != nil { - s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") - } - s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") - if this.MyBytes != nil { - s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") - } - if this.NormalBytes != nil { - s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") - } - if this.MyUint64S != nil { - s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v3) - for i := 0; i < v3; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.NormalBytes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v5) - for i := 0; i < v5; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v6; i++ { - v7 := randStringCasttype(r) - this.MyMap[v7] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - for i := 0; i < v8; i++ { - v9 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v9] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v10; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v11; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 12) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Int64 = &v12 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) - } - return this -} - -type randyCasttype interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCasttype(r randyCasttype) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCasttype(r randyCasttype) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneCasttype(r) - } - return string(tmps) -} -func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCasttype(data, r, fieldNumber, wire) - } - return data -} -func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCasttype(data, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v14)) - case 1: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCasttype(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCasttype(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCasttype(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCasttype(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if m.Int32Ptr != nil { - n += 1 + sovCasttype(uint64(*m.Int32Ptr)) - } - n += 1 + sovCasttype(uint64(m.Int32)) - if m.MyUint64Ptr != nil { - n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) - } - n += 1 + sovCasttype(uint64(m.MyUint64)) - if m.MyBytes != nil { - l = len(m.MyBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if m.NormalBytes != nil { - l = len(m.NormalBytes) - n += 1 + l + sovCasttype(uint64(l)) - } - if len(m.MyUint64S) > 0 { - for _, e := range m.MyUint64S { - n += 1 + sovCasttype(uint64(e)) - } - } - if len(m.MyMap) > 0 { - for k, v := range m.MyMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyCustomMap) > 0 { - for k, v := range m.MyCustomMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyNullableMap) > 0 { - for k, v := range m.MyNullableMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if len(m.MyEmbeddedMap) > 0 { - for k, v := range m.MyEmbeddedMap { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) - n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttypeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttypeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttypeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto deleted file mode 100644 index 97ca5ac0d9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package casttype; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Castaway { - optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; - optional int64 Int32 = 2 [(gogoproto.nullable) = false, (gogoproto.casttype) = "int32"]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.nullable) = false, (gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional bytes MyBytes = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 6; - repeated uint64 MyUint64s = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 9 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 10 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 11 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go deleted file mode 100644 index 94f8558454..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/mytypes.go deleted file mode 100644 index d314cbf821..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/casttype/mytypes.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package casttype - -import ( - "encoding/json" -) - -type MyInt32Type int32 - -type MyUint64Type uint64 - -type Bytes []byte - -func (this Bytes) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(this)) -} - -func (this *Bytes) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - *this = *v - return nil -} - -type MyStringType string - -type MyMapType map[string]uint64 diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/Makefile deleted file mode 100644 index e9894788c0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - rm -rf combos - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto - protoc-gen-combo --default=false --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. castvalue.proto - cp mytypes.go ./combos/both/ || true - cp mytypes.go ./combos/marshaler/ || true - cp mytypes.go ./combos/unmarshaler/ || true - cp mytypes.go ./combos/unsafeboth/ || true - cp mytypes.go ./combos/unsafemarshaler/ || true - cp mytypes.go ./combos/unsafeunmarshaler/ || true diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.pb.go deleted file mode 100644 index 703b2235db..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.pb.go +++ /dev/null @@ -1,1562 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.proto deleted file mode 100644 index 15997ce0ac..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvaluepb_test.go deleted file mode 100644 index 2c97a9d054..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.pb.go deleted file mode 100644 index 64de877f26..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.pb.go +++ /dev/null @@ -1,2123 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/both/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := ((*Wilson)(&v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) - n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k := range m.CastMapValueMessageNullable { - data[i] = 0x12 - i++ - v := m.CastMapValueMessageNullable[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := ((*Wilson)(v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) - n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalue(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalue(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalue(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalue - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalue(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.proto deleted file mode 100644 index 557d20f188..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvaluepb_test.go deleted file mode 100644 index 2ce3ed65bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/both/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/both/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.pb.go deleted file mode 100644 index c5f55b2a94..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.pb.go +++ /dev/null @@ -1,1683 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := ((*Wilson)(&v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) - n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k := range m.CastMapValueMessageNullable { - data[i] = 0x12 - i++ - v := m.CastMapValueMessageNullable[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := ((*Wilson)(v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) - n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.proto deleted file mode 100644 index 5660ae6af5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go deleted file mode 100644 index 302a1f3afe..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/marshaler/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go deleted file mode 100644 index 3603ab4518..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go +++ /dev/null @@ -1,2002 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalue(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalue(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalue(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalue - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalue(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.proto deleted file mode 100644 index a677196f2c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go deleted file mode 100644 index fc745be764..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unmarshaler/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go deleted file mode 100644 index 20899d96e7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go +++ /dev/null @@ -1,2123 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := ((*Wilson)(&v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) - n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k := range m.CastMapValueMessageNullable { - data[i] = 0x12 - i++ - v := m.CastMapValueMessageNullable[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := ((*Wilson)(v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) - n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalueUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalueUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalueUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.proto deleted file mode 100644 index 9fb02befa7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go deleted file mode 100644 index 2fc91d01e6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeboth/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go deleted file mode 100644 index 9e47423758..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go +++ /dev/null @@ -1,1683 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := ((*Wilson)(&v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) - n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k := range m.CastMapValueMessageNullable { - data[i] = 0x12 - i++ - v := m.CastMapValueMessageNullable[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := ((*Wilson)(v)).Size() - mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) - i = encodeVarintCastvalue(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) - n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto deleted file mode 100644 index 1ada55aa0b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go deleted file mode 100644 index 368eb54de4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go deleted file mode 100644 index c644780e59..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go +++ /dev/null @@ -1,2002 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Castaway struct { - CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wilson) Reset() { *m = Wilson{} } -func (*Wilson) ProtoMessage() {} - -func init() { - proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") - proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") -} -func (this *Castaway) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/castvalue.proto"), - Package: func(v string) *string { return &v }("castvalue"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Castaway"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessage"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullable"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Castaway.CastMapValueMessageNullableEntry"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65009: proto.NewExtension([]byte{0x8a, 0xdf, 0x1f, 0x8, 0x4d, 0x79, 0x57, 0x69, 0x6c, 0x73, 0x6f, 0x6e})}}, - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("CastMapValueMessageEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("CastMapValueMessageNullableEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".castvalue.Wilson"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("Wilson"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int64"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Castaway) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Castaway") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Castaway but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Castaway but is not nil && this == nil") - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCastvalue(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCastvalue(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCastvalue(x uint64) (n int) { - return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalueUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalueUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalueUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto deleted file mode 100644 index e7e6dac351..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package castvalue; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go deleted file mode 100644 index 21bb4cf4e7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/mytypes.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/mytypes.go deleted file mode 100644 index 9892212c4c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/castvalue/mytypes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package castvalue - -type MyWilson Wilson diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.pb.go deleted file mode 100644 index ee85f44e6a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.pb.go +++ /dev/null @@ -1,36005 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/both/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.Field1))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.Field2))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f1 := math.Float64bits(num) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f2 := math.Float32bits(num) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f5 := math.Float64bits(num) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f6 := math.Float32bits(num) - data[i] = uint8(f6) - i++ - data[i] = uint8(f6 >> 8) - i++ - data[i] = uint8(f6 >> 16) - i++ - data[i] = uint8(f6 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x7 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x7 >= 1<<7 { - data[i] = uint8(uint64(x7)&0x7f | 0x80) - x7 >>= 7 - i++ - } - data[i] = uint8(x7) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x8 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x8 >= 1<<7 { - data[i] = uint8(uint64(x8)&0x7f | 0x80) - x8 >>= 7 - i++ - } - data[i] = uint8(x8) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f9 := math.Float64bits(num) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f10 := math.Float32bits(num) - data[i] = uint8(f10) - i++ - data[i] = uint8(f10 >> 8) - i++ - data[i] = uint8(f10 >> 16) - i++ - data[i] = uint8(f10 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data12 := make([]byte, len(m.Field3)*10) - var j11 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field4) > 0 { - data14 := make([]byte, len(m.Field4)*10) - var j13 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - data14[j13] = uint8(num) - j13++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j13)) - i += copy(data[i:], data14[:j13]) - } - if len(m.Field5) > 0 { - data16 := make([]byte, len(m.Field5)*10) - var j15 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - data16[j15] = uint8(num) - j15++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j15)) - i += copy(data[i:], data16[:j15]) - } - if len(m.Field6) > 0 { - data18 := make([]byte, len(m.Field6)*10) - var j17 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data18[j17] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j17++ - } - data18[j17] = uint8(num) - j17++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j17)) - i += copy(data[i:], data18[:j17]) - } - if len(m.Field7) > 0 { - data19 := make([]byte, len(m.Field7)*5) - var j20 int - for _, num := range m.Field7 { - x21 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x21 >= 1<<7 { - data19[j20] = uint8(uint64(x21)&0x7f | 0x80) - j20++ - x21 >>= 7 - } - data19[j20] = uint8(x21) - j20++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j20)) - i += copy(data[i:], data19[:j20]) - } - if len(m.Field8) > 0 { - var j22 int - data24 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x23 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x23 >= 1<<7 { - data24[j22] = uint8(uint64(x23)&0x7f | 0x80) - j22++ - x23 >>= 7 - } - data24[j22] = uint8(x23) - j22++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j22)) - i += copy(data[i:], data24[:j22]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f25 := math.Float64bits(num) - data[i] = uint8(f25) - i++ - data[i] = uint8(f25 >> 8) - i++ - data[i] = uint8(f25 >> 16) - i++ - data[i] = uint8(f25 >> 24) - i++ - data[i] = uint8(f25 >> 32) - i++ - data[i] = uint8(f25 >> 40) - i++ - data[i] = uint8(f25 >> 48) - i++ - data[i] = uint8(f25 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f26 := math.Float32bits(num) - data[i] = uint8(f26) - i++ - data[i] = uint8(f26 >> 8) - i++ - data[i] = uint8(f26 >> 16) - i++ - data[i] = uint8(f26 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data28 := make([]byte, len(m.Field3)*10) - var j27 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data28[j27] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j27++ - } - data28[j27] = uint8(num) - j27++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j27)) - i += copy(data[i:], data28[:j27]) - } - if len(m.Field4) > 0 { - data30 := make([]byte, len(m.Field4)*10) - var j29 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data30[j29] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j29++ - } - data30[j29] = uint8(num) - j29++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j29)) - i += copy(data[i:], data30[:j29]) - } - if len(m.Field5) > 0 { - data32 := make([]byte, len(m.Field5)*10) - var j31 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data32[j31] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j31++ - } - data32[j31] = uint8(num) - j31++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j31)) - i += copy(data[i:], data32[:j31]) - } - if len(m.Field6) > 0 { - data34 := make([]byte, len(m.Field6)*10) - var j33 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data34[j33] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j33++ - } - data34[j33] = uint8(num) - j33++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j33)) - i += copy(data[i:], data34[:j33]) - } - if len(m.Field7) > 0 { - data35 := make([]byte, len(m.Field7)*5) - var j36 int - for _, num := range m.Field7 { - x37 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x37 >= 1<<7 { - data35[j36] = uint8(uint64(x37)&0x7f | 0x80) - j36++ - x37 >>= 7 - } - data35[j36] = uint8(x37) - j36++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j36)) - i += copy(data[i:], data35[:j36]) - } - if len(m.Field8) > 0 { - var j38 int - data40 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x39 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x39 >= 1<<7 { - data40[j38] = uint8(uint64(x39)&0x7f | 0x80) - j38++ - x39 >>= 7 - } - data40[j38] = uint8(x39) - j38++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j38)) - i += copy(data[i:], data40[:j38]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.Field1))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.Field2))) - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n41, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n42, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n43, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n44, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n45, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n46, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f47 := math.Float64bits(num) - data[i] = uint8(f47) - i++ - data[i] = uint8(f47 >> 8) - i++ - data[i] = uint8(f47 >> 16) - i++ - data[i] = uint8(f47 >> 24) - i++ - data[i] = uint8(f47 >> 32) - i++ - data[i] = uint8(f47 >> 40) - i++ - data[i] = uint8(f47 >> 48) - i++ - data[i] = uint8(f47 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f48 := math.Float32bits(num) - data[i] = uint8(f48) - i++ - data[i] = uint8(f48 >> 8) - i++ - data[i] = uint8(f48 >> 16) - i++ - data[i] = uint8(f48 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x49 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x49 >= 1<<7 { - data[i] = uint8(uint64(x49)&0x7f | 0x80) - x49 >>= 7 - i++ - } - data[i] = uint8(x49) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f50 := math.Float64bits(num) - data[i] = uint8(f50) - i++ - data[i] = uint8(f50 >> 8) - i++ - data[i] = uint8(f50 >> 16) - i++ - data[i] = uint8(f50 >> 24) - i++ - data[i] = uint8(f50 >> 32) - i++ - data[i] = uint8(f50 >> 40) - i++ - data[i] = uint8(f50 >> 48) - i++ - data[i] = uint8(f50 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f51 := math.Float32bits(num) - data[i] = uint8(f51) - i++ - data[i] = uint8(f51 >> 8) - i++ - data[i] = uint8(f51 >> 16) - i++ - data[i] = uint8(f51 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x52 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x52 >= 1<<7 { - data[i] = uint8(uint64(x52)&0x7f | 0x80) - x52 >>= 7 - i++ - } - data[i] = uint8(x52) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n53, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n54, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n55, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n56, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n57, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n58, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n59, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n60, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n61, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n62, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n63, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n64, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n65, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n66, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n67, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n68, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n69, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n70, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n71, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n72, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n73, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n74, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n75, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n76, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n77, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n78, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n79, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n80, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n81, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n81 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n82, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n83, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n84, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Timer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Timer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time1)) - data[i] = 0x11 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time2)) - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OtherExtenable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.M != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.M.Size())) - n85, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.EnumField != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.EnumField)) - } - if m.NNM != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n86, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n87, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n88, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n89, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n89 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n90, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n90 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n91, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.FieldA))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.FieldB))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.FieldA))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.FieldB))) - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) - } - if m.FielL != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - f92 := math.Float64bits(num) - data[i] = uint8(f92) - i++ - data[i] = uint8(f92 >> 8) - i++ - data[i] = uint8(f92 >> 16) - i++ - data[i] = uint8(f92 >> 24) - i++ - data[i] = uint8(f92 >> 32) - i++ - data[i] = uint8(f92 >> 40) - i++ - data[i] = uint8(f92 >> 48) - i++ - data[i] = uint8(f92 >> 56) - i++ - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - f93 := math.Float32bits(num) - data[i] = uint8(f93) - i++ - data[i] = uint8(f93 >> 8) - i++ - data[i] = uint8(f93 >> 16) - i++ - data[i] = uint8(f93 >> 24) - i++ - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x94 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x94 >= 1<<7 { - data[i] = uint8(uint64(x94)&0x7f | 0x80) - x94 >>= 7 - i++ - } - data[i] = uint8(x94) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x95 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x95 >= 1<<7 { - data[i] = uint8(uint64(x95)&0x7f | 0x80) - x95 >>= 7 - i++ - } - data[i] = uint8(x95) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.FieldA))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.FieldB))) - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n96, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n96 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n97, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n97 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n98, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n98 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n99, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n99 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n100, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n100 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n101, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n101 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n102 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - m.Time1 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time1 = int64(data[iNdEx-8]) - m.Time1 |= int64(data[iNdEx-7]) << 8 - m.Time1 |= int64(data[iNdEx-6]) << 16 - m.Time1 |= int64(data[iNdEx-5]) << 24 - m.Time1 |= int64(data[iNdEx-4]) << 32 - m.Time1 |= int64(data[iNdEx-3]) << 40 - m.Time1 |= int64(data[iNdEx-2]) << 48 - m.Time1 |= int64(data[iNdEx-1]) << 56 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - m.Time2 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time2 = int64(data[iNdEx-8]) - m.Time2 |= int64(data[iNdEx-7]) << 8 - m.Time2 |= int64(data[iNdEx-6]) << 16 - m.Time2 |= int64(data[iNdEx-5]) << 24 - m.Time2 |= int64(data[iNdEx-4]) << 32 - m.Time2 |= int64(data[iNdEx-3]) << 40 - m.Time2 |= int64(data[iNdEx-2]) << 48 - m.Time2 |= int64(data[iNdEx-1]) << 56 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldA = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldB = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - m.FieldI = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldI = uint32(data[iNdEx-4]) - m.FieldI |= uint32(data[iNdEx-3]) << 8 - m.FieldI |= uint32(data[iNdEx-2]) << 16 - m.FieldI |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - m.FieldJ = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldJ = int32(data[iNdEx-4]) - m.FieldJ |= int32(data[iNdEx-3]) << 8 - m.FieldJ |= int32(data[iNdEx-2]) << 16 - m.FieldJ |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - m.FieldK = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldK = uint64(data[iNdEx-8]) - m.FieldK |= uint64(data[iNdEx-7]) << 8 - m.FieldK |= uint64(data[iNdEx-6]) << 16 - m.FieldK |= uint64(data[iNdEx-5]) << 24 - m.FieldK |= uint64(data[iNdEx-4]) << 32 - m.FieldK |= uint64(data[iNdEx-3]) << 40 - m.FieldK |= uint64(data[iNdEx-2]) << 48 - m.FieldK |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - m.FieldL = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldL = int64(data[iNdEx-8]) - m.FieldL |= int64(data[iNdEx-7]) << 8 - m.FieldL |= int64(data[iNdEx-6]) << 16 - m.FieldL |= int64(data[iNdEx-5]) << 24 - m.FieldL |= int64(data[iNdEx-4]) << 32 - m.FieldL |= int64(data[iNdEx-3]) << 40 - m.FieldL |= int64(data[iNdEx-2]) << 48 - m.FieldL |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetest(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetest - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetest(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.proto deleted file mode 100644 index 2de4c5add5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetestpb_test.go deleted file mode 100644 index 44770b1c32..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/thetestpb_test.go +++ /dev/null @@ -1,14646 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/both/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/both/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.pb.go deleted file mode 100644 index 6763b7d4d9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.pb.go +++ /dev/null @@ -1,24851 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/marshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.Field1))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.Field2))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f1 := math.Float64bits(num) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f2 := math.Float32bits(num) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f5 := math.Float64bits(num) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f6 := math.Float32bits(num) - data[i] = uint8(f6) - i++ - data[i] = uint8(f6 >> 8) - i++ - data[i] = uint8(f6 >> 16) - i++ - data[i] = uint8(f6 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x7 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x7 >= 1<<7 { - data[i] = uint8(uint64(x7)&0x7f | 0x80) - x7 >>= 7 - i++ - } - data[i] = uint8(x7) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x8 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x8 >= 1<<7 { - data[i] = uint8(uint64(x8)&0x7f | 0x80) - x8 >>= 7 - i++ - } - data[i] = uint8(x8) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f9 := math.Float64bits(num) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f10 := math.Float32bits(num) - data[i] = uint8(f10) - i++ - data[i] = uint8(f10 >> 8) - i++ - data[i] = uint8(f10 >> 16) - i++ - data[i] = uint8(f10 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data12 := make([]byte, len(m.Field3)*10) - var j11 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field4) > 0 { - data14 := make([]byte, len(m.Field4)*10) - var j13 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - data14[j13] = uint8(num) - j13++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j13)) - i += copy(data[i:], data14[:j13]) - } - if len(m.Field5) > 0 { - data16 := make([]byte, len(m.Field5)*10) - var j15 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - data16[j15] = uint8(num) - j15++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j15)) - i += copy(data[i:], data16[:j15]) - } - if len(m.Field6) > 0 { - data18 := make([]byte, len(m.Field6)*10) - var j17 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data18[j17] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j17++ - } - data18[j17] = uint8(num) - j17++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j17)) - i += copy(data[i:], data18[:j17]) - } - if len(m.Field7) > 0 { - data19 := make([]byte, len(m.Field7)*5) - var j20 int - for _, num := range m.Field7 { - x21 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x21 >= 1<<7 { - data19[j20] = uint8(uint64(x21)&0x7f | 0x80) - j20++ - x21 >>= 7 - } - data19[j20] = uint8(x21) - j20++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j20)) - i += copy(data[i:], data19[:j20]) - } - if len(m.Field8) > 0 { - var j22 int - data24 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x23 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x23 >= 1<<7 { - data24[j22] = uint8(uint64(x23)&0x7f | 0x80) - j22++ - x23 >>= 7 - } - data24[j22] = uint8(x23) - j22++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j22)) - i += copy(data[i:], data24[:j22]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f25 := math.Float64bits(num) - data[i] = uint8(f25) - i++ - data[i] = uint8(f25 >> 8) - i++ - data[i] = uint8(f25 >> 16) - i++ - data[i] = uint8(f25 >> 24) - i++ - data[i] = uint8(f25 >> 32) - i++ - data[i] = uint8(f25 >> 40) - i++ - data[i] = uint8(f25 >> 48) - i++ - data[i] = uint8(f25 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f26 := math.Float32bits(num) - data[i] = uint8(f26) - i++ - data[i] = uint8(f26 >> 8) - i++ - data[i] = uint8(f26 >> 16) - i++ - data[i] = uint8(f26 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data28 := make([]byte, len(m.Field3)*10) - var j27 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data28[j27] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j27++ - } - data28[j27] = uint8(num) - j27++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j27)) - i += copy(data[i:], data28[:j27]) - } - if len(m.Field4) > 0 { - data30 := make([]byte, len(m.Field4)*10) - var j29 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data30[j29] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j29++ - } - data30[j29] = uint8(num) - j29++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j29)) - i += copy(data[i:], data30[:j29]) - } - if len(m.Field5) > 0 { - data32 := make([]byte, len(m.Field5)*10) - var j31 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data32[j31] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j31++ - } - data32[j31] = uint8(num) - j31++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j31)) - i += copy(data[i:], data32[:j31]) - } - if len(m.Field6) > 0 { - data34 := make([]byte, len(m.Field6)*10) - var j33 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data34[j33] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j33++ - } - data34[j33] = uint8(num) - j33++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j33)) - i += copy(data[i:], data34[:j33]) - } - if len(m.Field7) > 0 { - data35 := make([]byte, len(m.Field7)*5) - var j36 int - for _, num := range m.Field7 { - x37 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x37 >= 1<<7 { - data35[j36] = uint8(uint64(x37)&0x7f | 0x80) - j36++ - x37 >>= 7 - } - data35[j36] = uint8(x37) - j36++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j36)) - i += copy(data[i:], data35[:j36]) - } - if len(m.Field8) > 0 { - var j38 int - data40 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x39 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x39 >= 1<<7 { - data40[j38] = uint8(uint64(x39)&0x7f | 0x80) - j38++ - x39 >>= 7 - } - data40[j38] = uint8(x39) - j38++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j38)) - i += copy(data[i:], data40[:j38]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.Field1))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.Field2))) - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n41, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n42, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n43, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n44, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n45, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n46, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f47 := math.Float64bits(num) - data[i] = uint8(f47) - i++ - data[i] = uint8(f47 >> 8) - i++ - data[i] = uint8(f47 >> 16) - i++ - data[i] = uint8(f47 >> 24) - i++ - data[i] = uint8(f47 >> 32) - i++ - data[i] = uint8(f47 >> 40) - i++ - data[i] = uint8(f47 >> 48) - i++ - data[i] = uint8(f47 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f48 := math.Float32bits(num) - data[i] = uint8(f48) - i++ - data[i] = uint8(f48 >> 8) - i++ - data[i] = uint8(f48 >> 16) - i++ - data[i] = uint8(f48 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x49 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x49 >= 1<<7 { - data[i] = uint8(uint64(x49)&0x7f | 0x80) - x49 >>= 7 - i++ - } - data[i] = uint8(x49) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f50 := math.Float64bits(num) - data[i] = uint8(f50) - i++ - data[i] = uint8(f50 >> 8) - i++ - data[i] = uint8(f50 >> 16) - i++ - data[i] = uint8(f50 >> 24) - i++ - data[i] = uint8(f50 >> 32) - i++ - data[i] = uint8(f50 >> 40) - i++ - data[i] = uint8(f50 >> 48) - i++ - data[i] = uint8(f50 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f51 := math.Float32bits(num) - data[i] = uint8(f51) - i++ - data[i] = uint8(f51 >> 8) - i++ - data[i] = uint8(f51 >> 16) - i++ - data[i] = uint8(f51 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x52 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x52 >= 1<<7 { - data[i] = uint8(uint64(x52)&0x7f | 0x80) - x52 >>= 7 - i++ - } - data[i] = uint8(x52) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n53, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n54, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n55, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n56, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n57, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n58, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n59, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n60, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n61, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n62, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n63, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n64, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n65, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n66, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n67, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n68, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n69, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n70, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n71, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n72, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n73, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n74, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n75, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n76, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n77, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n78, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n79, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n80, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n81, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n81 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n82, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n83, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n84, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Timer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Timer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time1)) - data[i] = 0x11 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time2)) - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OtherExtenable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.M != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.M.Size())) - n85, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.EnumField != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.EnumField)) - } - if m.NNM != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n86, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n87, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n88, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n89, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n89 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n90, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n90 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n91, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(m.FieldA))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(m.FieldB))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.FieldA))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.FieldB))) - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) - } - if m.FielL != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - f92 := math.Float64bits(num) - data[i] = uint8(f92) - i++ - data[i] = uint8(f92 >> 8) - i++ - data[i] = uint8(f92 >> 16) - i++ - data[i] = uint8(f92 >> 24) - i++ - data[i] = uint8(f92 >> 32) - i++ - data[i] = uint8(f92 >> 40) - i++ - data[i] = uint8(f92 >> 48) - i++ - data[i] = uint8(f92 >> 56) - i++ - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - f93 := math.Float32bits(num) - data[i] = uint8(f93) - i++ - data[i] = uint8(f93 >> 8) - i++ - data[i] = uint8(f93 >> 16) - i++ - data[i] = uint8(f93 >> 24) - i++ - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x94 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x94 >= 1<<7 { - data[i] = uint8(uint64(x94)&0x7f | 0x80) - x94 >>= 7 - i++ - } - data[i] = uint8(x94) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x95 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x95 >= 1<<7 { - data[i] = uint8(uint64(x95)&0x7f | 0x80) - x95 >>= 7 - i++ - } - data[i] = uint8(x95) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(*m.FieldA))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(*m.FieldB))) - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n96, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n96 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n97, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n97 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n98, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n98 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n99, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n99 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n100, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n100 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n101, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n101 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n102 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.proto deleted file mode 100644 index f427444140..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetestpb_test.go deleted file mode 100644 index 7152ec3ed1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/thetestpb_test.go +++ /dev/null @@ -1,14646 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/marshaler/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.pb.go deleted file mode 100644 index bead68a4da..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.pb.go +++ /dev/null @@ -1,31992 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - m.Time1 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time1 = int64(data[iNdEx-8]) - m.Time1 |= int64(data[iNdEx-7]) << 8 - m.Time1 |= int64(data[iNdEx-6]) << 16 - m.Time1 |= int64(data[iNdEx-5]) << 24 - m.Time1 |= int64(data[iNdEx-4]) << 32 - m.Time1 |= int64(data[iNdEx-3]) << 40 - m.Time1 |= int64(data[iNdEx-2]) << 48 - m.Time1 |= int64(data[iNdEx-1]) << 56 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - m.Time2 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time2 = int64(data[iNdEx-8]) - m.Time2 |= int64(data[iNdEx-7]) << 8 - m.Time2 |= int64(data[iNdEx-6]) << 16 - m.Time2 |= int64(data[iNdEx-5]) << 24 - m.Time2 |= int64(data[iNdEx-4]) << 32 - m.Time2 |= int64(data[iNdEx-3]) << 40 - m.Time2 |= int64(data[iNdEx-2]) << 48 - m.Time2 |= int64(data[iNdEx-1]) << 56 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldA = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldB = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - m.FieldI = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldI = uint32(data[iNdEx-4]) - m.FieldI |= uint32(data[iNdEx-3]) << 8 - m.FieldI |= uint32(data[iNdEx-2]) << 16 - m.FieldI |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - m.FieldJ = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldJ = int32(data[iNdEx-4]) - m.FieldJ |= int32(data[iNdEx-3]) << 8 - m.FieldJ |= int32(data[iNdEx-2]) << 16 - m.FieldJ |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - m.FieldK = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldK = uint64(data[iNdEx-8]) - m.FieldK |= uint64(data[iNdEx-7]) << 8 - m.FieldK |= uint64(data[iNdEx-6]) << 16 - m.FieldK |= uint64(data[iNdEx-5]) << 24 - m.FieldK |= uint64(data[iNdEx-4]) << 32 - m.FieldK |= uint64(data[iNdEx-3]) << 40 - m.FieldK |= uint64(data[iNdEx-2]) << 48 - m.FieldK |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - m.FieldL = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldL = int64(data[iNdEx-8]) - m.FieldL |= int64(data[iNdEx-7]) << 8 - m.FieldL |= int64(data[iNdEx-6]) << 16 - m.FieldL |= int64(data[iNdEx-5]) << 24 - m.FieldL |= int64(data[iNdEx-4]) << 32 - m.FieldL |= int64(data[iNdEx-3]) << 40 - m.FieldL |= int64(data[iNdEx-2]) << 48 - m.FieldL |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetest(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetest - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetest(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.proto deleted file mode 100644 index 6ff32bfdf2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetestpb_test.go deleted file mode 100644 index 5ea90c5ea0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/thetestpb_test.go +++ /dev/null @@ -1,12938 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unmarshaler/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.pb.go deleted file mode 100644 index bb42aa0990..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.pb.go +++ /dev/null @@ -1,35191 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x1 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x1 >= 1<<7 { - data[i] = uint8(uint64(x1)&0x7f | 0x80) - x1 >>= 7 - i++ - } - data[i] = uint8(x1) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x2 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x2 >= 1<<7 { - data[i] = uint8(uint64(x2)&0x7f | 0x80) - x2 >>= 7 - i++ - } - data[i] = uint8(x2) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data6 := make([]byte, len(m.Field3)*10) - var j5 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field4) > 0 { - data8 := make([]byte, len(m.Field4)*10) - var j7 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field5) > 0 { - data10 := make([]byte, len(m.Field5)*10) - var j9 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field6) > 0 { - data12 := make([]byte, len(m.Field6)*10) - var j11 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field7) > 0 { - data13 := make([]byte, len(m.Field7)*5) - var j14 int - for _, num := range m.Field7 { - x15 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x15 >= 1<<7 { - data13[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data13[j14] = uint8(x15) - j14++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j14)) - i += copy(data[i:], data13[:j14]) - } - if len(m.Field8) > 0 { - var j16 int - data18 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x17 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x17 >= 1<<7 { - data18[j16] = uint8(uint64(x17)&0x7f | 0x80) - j16++ - x17 >>= 7 - } - data18[j16] = uint8(x17) - j16++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j16)) - i += copy(data[i:], data18[:j16]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data20 := make([]byte, len(m.Field3)*10) - var j19 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data20[j19] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j19++ - } - data20[j19] = uint8(num) - j19++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j19)) - i += copy(data[i:], data20[:j19]) - } - if len(m.Field4) > 0 { - data22 := make([]byte, len(m.Field4)*10) - var j21 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - data22[j21] = uint8(num) - j21++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j21)) - i += copy(data[i:], data22[:j21]) - } - if len(m.Field5) > 0 { - data24 := make([]byte, len(m.Field5)*10) - var j23 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data24[j23] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j23++ - } - data24[j23] = uint8(num) - j23++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j23)) - i += copy(data[i:], data24[:j23]) - } - if len(m.Field6) > 0 { - data26 := make([]byte, len(m.Field6)*10) - var j25 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data26[j25] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j25++ - } - data26[j25] = uint8(num) - j25++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j25)) - i += copy(data[i:], data26[:j25]) - } - if len(m.Field7) > 0 { - data27 := make([]byte, len(m.Field7)*5) - var j28 int - for _, num := range m.Field7 { - x29 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x29 >= 1<<7 { - data27[j28] = uint8(uint64(x29)&0x7f | 0x80) - j28++ - x29 >>= 7 - } - data27[j28] = uint8(x29) - j28++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j28)) - i += copy(data[i:], data27[:j28]) - } - if len(m.Field8) > 0 { - var j30 int - data32 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x31 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x31 >= 1<<7 { - data32[j30] = uint8(uint64(x31)&0x7f | 0x80) - j30++ - x31 >>= 7 - } - data32[j30] = uint8(x31) - j30++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j30)) - i += copy(data[i:], data32[:j30]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n33, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n33 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n34, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n34 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n35, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n36, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n37, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n37 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n38, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x39 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x39 >= 1<<7 { - data[i] = uint8(uint64(x39)&0x7f | 0x80) - x39 >>= 7 - i++ - } - data[i] = uint8(x39) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x40 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x40 >= 1<<7 { - data[i] = uint8(uint64(x40)&0x7f | 0x80) - x40 >>= 7 - i++ - } - data[i] = uint8(x40) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n41, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n42, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n43, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n44, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n45, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n46, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n47, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n48, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n48 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n49, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n49 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n50, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n50 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n51, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n51 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n52, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n53, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n54, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n55, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n56, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n57, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n58, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n59, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n60, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n61, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n62, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n63, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n64, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n65, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n66, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n67, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n68, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n69, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n70, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n71, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n72, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Timer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Timer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 - i += 8 - data[i] = 0x11 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 - i += 8 - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OtherExtenable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.M != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.M.Size())) - n73, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.EnumField != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.EnumField)) - } - if m.NNM != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n74, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n75, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 - i += 8 - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n76, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n77, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n78, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n79, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL - i += 8 - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI - i += 4 - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ - i += 4 - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK - i += 8 - } - if m.FielL != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL - i += 8 - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x80 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x80 >= 1<<7 { - data[i] = uint8(uint64(x80)&0x7f | 0x80) - x80 >>= 7 - i++ - } - data[i] = uint8(x80) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x81 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x81 >= 1<<7 { - data[i] = uint8(uint64(x81)&0x7f | 0x80) - x81 >>= 7 - i++ - } - data[i] = uint8(x81) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n82, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n83, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n84, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n85, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n86, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n87, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = append(m.FieldA, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = append(m.FieldB, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetestUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetestUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetestUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.proto deleted file mode 100644 index 175ec64d0a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetestpb_test.go deleted file mode 100644 index 3324305a2d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/thetestpb_test.go +++ /dev/null @@ -1,14646 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeboth/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.pb.go deleted file mode 100644 index 468b2789a0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.pb.go +++ /dev/null @@ -1,24542 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafemarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x1 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x1 >= 1<<7 { - data[i] = uint8(uint64(x1)&0x7f | 0x80) - x1 >>= 7 - i++ - } - data[i] = uint8(x1) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x2 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x2 >= 1<<7 { - data[i] = uint8(uint64(x2)&0x7f | 0x80) - x2 >>= 7 - i++ - } - data[i] = uint8(x2) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data6 := make([]byte, len(m.Field3)*10) - var j5 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field4) > 0 { - data8 := make([]byte, len(m.Field4)*10) - var j7 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field5) > 0 { - data10 := make([]byte, len(m.Field5)*10) - var j9 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field6) > 0 { - data12 := make([]byte, len(m.Field6)*10) - var j11 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field7) > 0 { - data13 := make([]byte, len(m.Field7)*5) - var j14 int - for _, num := range m.Field7 { - x15 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x15 >= 1<<7 { - data13[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data13[j14] = uint8(x15) - j14++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j14)) - i += copy(data[i:], data13[:j14]) - } - if len(m.Field8) > 0 { - var j16 int - data18 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x17 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x17 >= 1<<7 { - data18[j16] = uint8(uint64(x17)&0x7f | 0x80) - j16++ - x17 >>= 7 - } - data18[j16] = uint8(x17) - j16++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j16)) - i += copy(data[i:], data18[:j16]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data20 := make([]byte, len(m.Field3)*10) - var j19 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data20[j19] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j19++ - } - data20[j19] = uint8(num) - j19++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j19)) - i += copy(data[i:], data20[:j19]) - } - if len(m.Field4) > 0 { - data22 := make([]byte, len(m.Field4)*10) - var j21 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - data22[j21] = uint8(num) - j21++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j21)) - i += copy(data[i:], data22[:j21]) - } - if len(m.Field5) > 0 { - data24 := make([]byte, len(m.Field5)*10) - var j23 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data24[j23] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j23++ - } - data24[j23] = uint8(num) - j23++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j23)) - i += copy(data[i:], data24[:j23]) - } - if len(m.Field6) > 0 { - data26 := make([]byte, len(m.Field6)*10) - var j25 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data26[j25] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j25++ - } - data26[j25] = uint8(num) - j25++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j25)) - i += copy(data[i:], data26[:j25]) - } - if len(m.Field7) > 0 { - data27 := make([]byte, len(m.Field7)*5) - var j28 int - for _, num := range m.Field7 { - x29 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x29 >= 1<<7 { - data27[j28] = uint8(uint64(x29)&0x7f | 0x80) - j28++ - x29 >>= 7 - } - data27[j28] = uint8(x29) - j28++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j28)) - i += copy(data[i:], data27[:j28]) - } - if len(m.Field8) > 0 { - var j30 int - data32 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x31 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x31 >= 1<<7 { - data32[j30] = uint8(uint64(x31)&0x7f | 0x80) - j30++ - x31 >>= 7 - } - data32[j30] = uint8(x31) - j30++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j30)) - i += copy(data[i:], data32[:j30]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n33, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n33 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n34, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n34 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n35, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n36, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n37, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n37 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n38, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x39 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x39 >= 1<<7 { - data[i] = uint8(uint64(x39)&0x7f | 0x80) - x39 >>= 7 - i++ - } - data[i] = uint8(x39) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x40 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x40 >= 1<<7 { - data[i] = uint8(uint64(x40)&0x7f | 0x80) - x40 >>= 7 - i++ - } - data[i] = uint8(x40) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n41, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n42, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n43, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n44, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n45, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n46, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n47, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n48, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n48 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n49, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n49 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n50, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n50 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n51, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n51 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n52, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n53, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n54, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n55, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n56, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n57, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n58, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n59, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n60, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n61, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n62, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n63, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n64, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n65, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n66, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n67, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n68, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n69, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n70, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n71, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n72, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Timer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Timer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 - i += 8 - data[i] = 0x11 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 - i += 8 - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OtherExtenable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.M != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.M.Size())) - n73, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - if len(m.XXX_extensions) > 0 { - n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) - if err != nil { - return 0, err - } - i += n - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.EnumField != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.EnumField)) - } - if m.NNM != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n74, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n75, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 - i += 8 - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n76, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n77, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n78, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n79, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL - i += 8 - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI - i += 4 - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ - i += 4 - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK - i += 8 - } - if m.FielL != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL - i += 8 - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x80 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x80 >= 1<<7 { - data[i] = uint8(uint64(x80)&0x7f | 0x80) - x80 >>= 7 - i++ - } - data[i] = uint8(x80) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x81 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x81 >= 1<<7 { - data[i] = uint8(uint64(x81)&0x7f | 0x80) - x81 >>= 7 - i++ - } - data[i] = uint8(x81) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n82, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n83, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n84, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n85, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n86, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n87, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.proto deleted file mode 100644 index f8fda9c30d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetestpb_test.go deleted file mode 100644 index d3b89c5de1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/thetestpb_test.go +++ /dev/null @@ -1,14646 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafemarshaler/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/bug_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/bug_test.go deleted file mode 100644 index 8792724854..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/bug_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "fmt" - "math" - "testing" - - "github.com/gogo/protobuf/proto" -) - -//http://code.google.com/p/goprotobuf/issues/detail?id=39 -func TestBugUint32VarintSize(t *testing.T) { - temp := uint32(math.MaxUint32) - n := &NinOptNative{} - n.Field5 = &temp - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != 6 { - t.Fatalf("data should be length 6, but its %#v", data) - } -} - -func TestBugZeroLengthSliceSize(t *testing.T) { - n := &NinRepPackedNative{ - Field8: []int64{}, - } - size := n.Size() - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v", len(data), size) - } -} - -//http://code.google.com/p/goprotobuf/issues/detail?id=40 -func TestBugPackedProtoSize(t *testing.T) { - n := &NinRepPackedNative{ - Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, - Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, - Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, - Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, - Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, - } - size := proto.Size(n) - data, err := proto.Marshal(n) - if err != nil { - panic(err) - } - if len(data) != size { - t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) - } -} - -func testSize(m interface { - proto.Message - Size() int -}, desc string, expected int) ([]byte, error) { - data, err := proto.Marshal(m) - if err != nil { - return nil, err - } - protoSize := proto.Size(m) - mSize := m.Size() - lenData := len(data) - if protoSize != mSize || protoSize != lenData || mSize != lenData { - return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) - } - if got := protoSize; got != expected { - return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) - } - if got := mSize; got != expected { - return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) - } - if got := lenData; got != expected { - return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) - } - return data, nil -} - -func TestInt32Int64Compatibility(t *testing.T) { - - //test nullable int32 and int64 - - data1, err := testSize(&NinOptNative{ - Field3: proto.Int32(-1), - }, "nullable", 11) - if err != nil { - t.Error(err) - } - //change marshaled data1 to unmarshal into 4th field which is an int64 - data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - u1 := &NinOptNative{} - if err := proto.Unmarshal(data1, u1); err != nil { - t.Error(err) - } - if !u1.Equal(&NinOptNative{ - Field4: proto.Int64(-1), - }) { - t.Error("nullable unmarshaled int32 is not the same int64") - } - - //test non-nullable int32 and int64 - - data2, err := testSize(&NidOptNative{ - Field3: -1, - }, "non nullable", 67) - if err != nil { - t.Error(err) - } - //change marshaled data2 to unmarshal into 4th field which is an int64 - field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) - for i, c := range data2 { - if c == field4 { - data2[i] = field3 - } else if c == field3 { - data2[i] = field4 - } - } - u2 := &NidOptNative{} - if err := proto.Unmarshal(data2, u2); err != nil { - t.Error(err) - } - if !u2.Equal(&NidOptNative{ - Field4: -1, - }) { - t.Error("non nullable unmarshaled int32 is not the same int64") - } - - //test packed repeated int32 and int64 - - m4 := &NinRepPackedNative{ - Field3: []int32{-1}, - } - data4, err := testSize(m4, "packed", 12) - if err != nil { - t.Error(err) - } - u4 := &NinRepPackedNative{} - if err := proto.Unmarshal(data4, u4); err != nil { - t.Error(err) - } - if err := u4.VerboseEqual(m4); err != nil { - t.Fatalf("%#v", u4) - } - - //test repeated int32 and int64 - - if _, err := testSize(&NinRepNative{ - Field3: []int32{-1}, - }, "repeated", 11); err != nil { - t.Error(err) - } - - t.Logf("tested all") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.pb.go deleted file mode 100644 index 7dab56ff7e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.pb.go +++ /dev/null @@ -1,31488 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension) - } - m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[iNdEx : iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = append(m.FieldA, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = append(m.FieldB, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetestUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetestUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetestUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.proto deleted file mode 100644 index 82048fe2df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go deleted file mode 100644 index e04277d93b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go +++ /dev/null @@ -1,12938 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/combos/unsafeunmarshaler/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom-dash-type/customdash.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom-dash-type/customdash.go deleted file mode 100644 index 8f202fcece..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom-dash-type/customdash.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* - Package custom contains custom types for test and example purposes. - These types are used by the test structures generated by gogoprotobuf. -*/ -package custom - -import ( - "bytes" - "encoding/json" -) - -type Bytes []byte - -func (b Bytes) Marshal() ([]byte, error) { - buffer := make([]byte, len(b)) - _, err := b.MarshalTo(buffer) - return buffer, err -} - -func (b Bytes) MarshalTo(data []byte) (n int, err error) { - copy(data, b) - return len(b), nil -} - -func (b *Bytes) Unmarshal(data []byte) error { - if data == nil { - b = nil - return nil - } - pb := make([]byte, len(data)) - copy(pb, data) - *b = pb - return nil -} - -func (b Bytes) MarshalJSON() ([]byte, error) { - data, err := b.Marshal() - if err != nil { - return nil, err - } - return json.Marshal(data) -} - -func (b *Bytes) Size() int { - return len(*b) -} - -func (b *Bytes) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return b.Unmarshal(*v) -} - -func (this Bytes) Equal(that Bytes) bool { - return bytes.Equal(this, that) -} - -type randy interface { - Intn(n int) int -} - -func NewPopulatedBytes(r randy) *Bytes { - l := r.Intn(100) - data := Bytes(make([]byte, l)) - for i := 0; i < l; i++ { - data[i] = byte(r.Intn(255)) - } - return &data -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom.go deleted file mode 100644 index 62f18c00ba..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* - Package custom contains custom types for test and example purposes. - These types are used by the test structures generated by gogoprotobuf. -*/ -package custom - -import ( - "encoding/json" - "errors" - "unsafe" -) - -type Uint128 [2]uint64 - -func (u Uint128) Marshal() ([]byte, error) { - buffer := make([]byte, 16) - _, err := u.MarshalTo(buffer) - return buffer, err -} - -func (u Uint128) MarshalTo(data []byte) (n int, err error) { - PutLittleEndianUint128(data, 0, u) - return 16, nil -} - -func GetLittleEndianUint64(b []byte, offset int) uint64 { - return *(*uint64)(unsafe.Pointer(&b[offset])) -} - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -func PutLittleEndianUint128(buffer []byte, offset int, v [2]uint64) { - PutLittleEndianUint64(buffer, offset, v[0]) - PutLittleEndianUint64(buffer, offset+8, v[1]) -} - -func GetLittleEndianUint128(buffer []byte, offset int) (value [2]uint64) { - value[0] = GetLittleEndianUint64(buffer, offset) - value[1] = GetLittleEndianUint64(buffer, offset+8) - return -} - -func (u *Uint128) Unmarshal(data []byte) error { - if data == nil { - u = nil - return nil - } - if len(data) == 0 { - pu := Uint128{} - *u = pu - return nil - } - if len(data) != 16 { - return errors.New("Uint128: invalid length") - } - pu := Uint128(GetLittleEndianUint128(data, 0)) - *u = pu - return nil -} - -func (u Uint128) MarshalJSON() ([]byte, error) { - data, err := u.Marshal() - if err != nil { - return nil, err - } - return json.Marshal(data) -} - -func (u *Uint128) Size() int { - return 16 -} - -func (u *Uint128) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return u.Unmarshal(*v) -} - -func (this Uint128) Equal(that Uint128) bool { - return this == that -} - -type randy interface { - Intn(n int) int -} - -func NewPopulatedUint128(r randy) *Uint128 { - data := make([]byte, 16) - for i := 0; i < 16; i++ { - data[i] = byte(r.Intn(255)) - } - u := Uint128(GetLittleEndianUint128(data, 0)) - return &u -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom_test.go deleted file mode 100644 index d1e4fcc291..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custom/custom_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package custom - -import ( - "testing" -) - -func TestUint128(t *testing.T) { - var uint128a = Uint128{0, 1} - buf := make([]byte, 16) - PutLittleEndianUint128(buf, 0, uint128a) - uint128b := GetLittleEndianUint128(buf, 0) - if !uint128a.Equal(uint128b) { - t.Fatalf("%v != %v", uint128a, uint128b) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/Makefile deleted file mode 100644 index e6a2cc3c9f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go deleted file mode 100644 index 680529cfd1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go +++ /dev/null @@ -1,6 +0,0 @@ -package custombytesnonstruct - -import testing "testing" - -func TestCustomBytesNonStruct(t *testing.T) { -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/customtype.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/customtype.go deleted file mode 100644 index 8f0ed3aeef..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/customtype.go +++ /dev/null @@ -1,8 +0,0 @@ -package custombytesnonstruct - -type CustomType int - -func (c *CustomType) Unmarshal(data []byte) error { - data[0] = 42 - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.pb.go deleted file mode 100644 index 6d18cc0e31..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.pb.go +++ /dev/null @@ -1,259 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* - Package custombytesnonstruct is a generated protocol buffer package. - - It is generated from these files: - proto.proto - - It has these top-level messages: - Object -*/ -package custombytesnonstruct - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Object struct { - CustomField1 *CustomType `protobuf:"bytes,1,opt,name=CustomField1,customtype=CustomType" json:"CustomField1,omitempty"` - CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,customtype=CustomType" json:"CustomField2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object) Reset() { *m = Object{} } -func (m *Object) String() string { return proto.CompactTextString(m) } -func (*Object) ProtoMessage() {} - -func init() { - proto.RegisterType((*Object)(nil), "custombytesnonstruct.Object") -} -func (m *Object) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Object: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomField1", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v CustomType - m.CustomField1 = &v - if err := m.CustomField1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomField2", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v CustomType - m.CustomField2 = append(m.CustomField2, v) - if err := m.CustomField2[len(m.CustomField2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.proto deleted file mode 100644 index a0f0016dae..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/custombytesnonstruct/proto.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto2"; -package custombytesnonstruct; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.unmarshaler_all) = true; - -message Object { - optional bytes CustomField1 = 1 [(gogoproto.customtype) = "CustomType"]; - repeated bytes CustomField2 = 2 [(gogoproto.customtype) = "CustomType"]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/dash-filename.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/dash-filename.proto deleted file mode 100644 index 1ae5aa6f35..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/dash-filename.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto2"; -package dashfilename; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; - -message test { - -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/df_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/df_test.go deleted file mode 100644 index 2f54a98fd4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/df_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package dashfilename - -import ( - "os" - "os/exec" - "testing" -) - -//Issue 16 : https://github.com/gogo/protobuf/issues/detail?id=16 -func TestDashFilename(t *testing.T) { - name := "dash-filename" - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") - data, err := cmd.CombinedOutput() - if err != nil { - t.Fatalf("err = %v: %s", err, string(data)) - } - if err := os.Remove(name + ".pb.go"); err != nil { - panic(err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/doc.go deleted file mode 100644 index b288f33e75..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/dashfilename/doc.go +++ /dev/null @@ -1 +0,0 @@ -package dashfilename diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/df.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/df.proto deleted file mode 100644 index 359458e913..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/df.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.face_all) = true; -option (gogoproto.goproto_getters_all) = false; - -message A { - optional int64 Field1 = 1 [default=1234]; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/dg.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/dg.proto deleted file mode 100644 index 80e7cac84d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/dg.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message A { - optional int64 Field1 = 1 [default=1234]; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/doc.go deleted file mode 100644 index 9762d20388..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/doc.go +++ /dev/null @@ -1 +0,0 @@ -package defaultcheck diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc.proto deleted file mode 100644 index a7c7bfec8e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc.proto +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message A { - optional int64 Field1 = 1 [default = 1234, (gogoproto.nullable) = false];; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc_test.go deleted file mode 100644 index 8426c5f10a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nc_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package defaultcheck - -import ( - "os" - "os/exec" - "strings" - "testing" -) - -func testDefaultConflict(t *testing.T, name string) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove(name + ".pb.go"); err != nil { - t.Error(err) - } - } - t.Logf("received expected error = %v and output = %v", err, string(data)) -} - -func TestNullableDefault(t *testing.T) { - testDefaultConflict(t, "nc") -} - -func TestNullableExtension(t *testing.T) { - testDefaultConflict(t, "nx") -} - -func TestNullableEnum(t *testing.T) { - testDefaultConflict(t, "ne") -} - -func TestFaceDefault(t *testing.T) { - testDefaultConflict(t, "df") -} - -func TestNoGettersDefault(t *testing.T) { - testDefaultConflict(t, "dg") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/ne.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/ne.proto deleted file mode 100644 index 9266fed073..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/ne.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -enum E { - P = 10; - Q = 11; -} - -message A { - optional E Field1 = 1 [(gogoproto.nullable) = false]; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nx.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nx.proto deleted file mode 100644 index 20b3d95a80..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/defaultconflict/nx.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message A { - extensions 1 to max; -} - -extend A { - optional int64 Field1 = 1 [(gogoproto.nullable) = false]; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/.gitignore b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/.gitignore deleted file mode 100644 index c61a5e8b01..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pb.go diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/doc.go deleted file mode 100644 index 484e948312..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/doc.go +++ /dev/null @@ -1 +0,0 @@ -package embedconflict diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/eb.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/eb.proto deleted file mode 100644 index 73bbe26164..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/eb.proto +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message TakesLongTooDebug { - optional bytes Field1 = 1; - optional bytes Field2 = 2 [(gogoproto.nullable)=false, (gogoproto.embed)=true]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec.proto deleted file mode 100644 index b209290395..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message A { - optional int64 Field1 = 1; - optional B B = 2 [(gogoproto.embed) = true]; -} - -message B { - optional double Field1 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec_test.go deleted file mode 100644 index 5ace369dad..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ec_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package embedconflict - -import ( - "os" - "os/exec" - "strings" - "testing" -) - -func TestEmbedConflict(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ec.proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove("ec.pb.go"); err != nil { - t.Error(err) - } - } - t.Logf("received expected error = %v and output = %v", err, string(data)) -} - -func TestEmbedMarshaler(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "em.proto") - data, err := cmd.CombinedOutput() - dataStr := string(data) - t.Logf("received error = %v and output = %v", err, dataStr) - if !strings.Contains(dataStr, "WARNING: found non-") || !strings.Contains(dataStr, "unsafe_marshaler") { - t.Errorf("Expected WARNING: found non-[marshaler unsafe_marshaler] C with embedded marshaler D") - } - if err := os.Remove("em.pb.go"); err != nil { - t.Error(err) - } -} - -func TestEmbedExtend(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ee.proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove("ee.pb.go"); err != nil { - t.Error(err) - } - } - t.Logf("received expected error = %v and output = %v", err, string(data)) -} - -func TestCustomName(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "en.proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove("en.pb.go"); err != nil { - t.Error(err) - } - } - t.Logf("received expected error = %v and output = %v", err, string(data)) -} - -func TestRepeatedEmbed(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "er.proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove("er.pb.go"); err != nil { - t.Error(err) - } - } - dataStr := string(data) - t.Logf("received error = %v and output = %v", err, dataStr) - warning := "ERROR: found repeated embedded field B in message A" - if !strings.Contains(dataStr, warning) { - t.Errorf("Expected " + warning) - } -} - -func TestTakesTooLongToDebug(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "eb.proto") - data, err := cmd.CombinedOutput() - if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { - t.Errorf("Expected error, got: %s", data) - if err := os.Remove("eb.pb.go"); err != nil { - t.Error(err) - } - } - dataStr := string(data) - t.Logf("received error = %v and output = %v", err, dataStr) - warning := "ERROR: found embedded bytes field" - if !strings.Contains(dataStr, warning) { - t.Errorf("Expected " + warning) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ee.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ee.proto deleted file mode 100644 index 0bc805fd3f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/ee.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message E { - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend E { - optional int64 Field1 = 100 [(gogoproto.embed) = true]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/em.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/em.proto deleted file mode 100644 index 990ec76789..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/em.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message C { - optional int64 Field1 = 1; - optional D D = 2 [(gogoproto.embed) = true]; -} - -message D { - option (gogoproto.marshaler) = true; - optional double Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/en.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/en.proto deleted file mode 100644 index 18b65c4946..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/en.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message F { - optional G G = 2 [(gogoproto.embed) = true, (gogoproto.customname) = "G"]; -} - -message G { - optional int64 Field1 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/er.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/er.proto deleted file mode 100644 index 2c647d8f1b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/embedconflict/er.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package embedconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message A { - optional int64 Field1 = 1; - repeated B B = 2 [(gogoproto.embed) = true]; -} - -message B { - optional double Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/Makefile deleted file mode 100644 index 43928f03bd..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. empty.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.pb.go deleted file mode 100644 index 3d922f4356..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.pb.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: empty.proto -// DO NOT EDIT! - -/* -Package empty is a generated protocol buffer package. - -It is generated from these files: - empty.proto - -It has these top-level messages: - TestRequest -*/ -package empty - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TestRequest struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *TestRequest) Reset() { *m = TestRequest{} } -func (m *TestRequest) String() string { return proto.CompactTextString(m) } -func (*TestRequest) ProtoMessage() {} - -func init() { - proto.RegisterType((*TestRequest)(nil), "empty.TestRequest") -} -func (m *TestRequest) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEmpty - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TestRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipEmpty(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEmpty - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEmpty(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthEmpty - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEmpty(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.proto deleted file mode 100644 index eeda2d1be6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax="proto2"; - -package empty; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.unmarshaler_all) = true; - -message TestRequest { - -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty_test.go deleted file mode 100644 index fa821d932f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/empty-issue70/empty_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package empty - -import ( - "testing" -) - -func TestEmpty(t *testing.T) { - -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/Makefile deleted file mode 100644 index d5fc83d83a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumprefix.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.pb.go deleted file mode 100644 index 3a48e0b030..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.pb.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumprefix.proto -// DO NOT EDIT! - -/* - Package enumprefix is a generated protocol buffer package. - - It is generated from these files: - enumprefix.proto - - It has these top-level messages: - MyMessage -*/ -package enumprefix - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import test "github.com/gogo/protobuf/test" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MyMessage struct { - TheField test.TheTestEnum `protobuf:"varint,1,opt,name=TheField,enum=test.TheTestEnum" json:"TheField"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (m *MyMessage) String() string { return proto.CompactTextString(m) } -func (*MyMessage) ProtoMessage() {} - -func (m *MyMessage) GetTheField() test.TheTestEnum { - if m != nil { - return m.TheField - } - return test.A -} - -func init() { - proto.RegisterType((*MyMessage)(nil), "enumprefix.MyMessage") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.proto deleted file mode 100644 index 121001d526..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumprefix/enumprefix.proto +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package enumprefix; - -import "github.com/gogo/protobuf/test/thetest.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message MyMessage { - optional test.TheTestEnum TheField = 1 [(gogoproto.nullable) = false]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/Makefile deleted file mode 100644 index 4327b48e75..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumstringer.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.pb.go deleted file mode 100644 index 729c9fbf77..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.pb.go +++ /dev/null @@ -1,556 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumstringer.proto -// DO NOT EDIT! - -/* -Package enumstringer is a generated protocol buffer package. - -It is generated from these files: - enumstringer.proto - -It has these top-level messages: - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum -*/ -package enumstringer - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - TheTestEnum_A TheTestEnum = 0 - TheTestEnum_B TheTestEnum = 1 - TheTestEnum_C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (m *NidOptEnum) String() string { return proto.CompactTextString(m) } -func (*NidOptEnum) ProtoMessage() {} - -func (m *NidOptEnum) GetField1() TheTestEnum { - if m != nil { - return m.Field1 - } - return TheTestEnum_A -} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (m *NinOptEnum) String() string { return proto.CompactTextString(m) } -func (*NinOptEnum) ProtoMessage() {} - -func (m *NinOptEnum) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return TheTestEnum_A -} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (m *NidRepEnum) String() string { return proto.CompactTextString(m) } -func (*NidRepEnum) ProtoMessage() {} - -func (m *NidRepEnum) GetField1() []TheTestEnum { - if m != nil { - return m.Field1 - } - return nil -} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (m *NinRepEnum) String() string { return proto.CompactTextString(m) } -func (*NinRepEnum) ProtoMessage() {} - -func (m *NinRepEnum) GetField1() []TheTestEnum { - if m != nil { - return m.Field1 - } - return nil -} - -func init() { - proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum") - proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value) -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedNidOptEnum(r randyEnumstringer, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyEnumstringer, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v1 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyEnumstringer, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v2) - for i := 0; i < v2; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyEnumstringer, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v3) - for i := 0; i < v3; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -type randyEnumstringer interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEnumstringer(r randyEnumstringer) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEnumstringer(r randyEnumstringer) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneEnumstringer(r) - } - return string(tmps) -} -func randUnrecognizedEnumstringer(r randyEnumstringer, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldEnumstringer(data, r, fieldNumber, wire) - } - return data -} -func randFieldEnumstringer(data []byte, r randyEnumstringer, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateEnumstringer(data, uint64(v5)) - case 1: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateEnumstringer(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateEnumstringer(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.proto deleted file mode 100644 index f44f02fbb0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringer.proto +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package enumstringer; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_enum_stringer_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringerpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringerpb_test.go deleted file mode 100644 index aea552af8c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/enumstringerpb_test.go +++ /dev/null @@ -1,451 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumstringer.proto -// DO NOT EDIT! - -/* -Package enumstringer is a generated protocol buffer package. - -It is generated from these files: - enumstringer.proto - -It has these top-level messages: - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum -*/ -package enumstringer - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/string.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/string.go deleted file mode 100644 index c9ebfa45e1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/enumstringer/string.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package enumstringer - -func (this TheTestEnum) String() string { - switch this { - case 0: - return "a" - case 1: - return "blabla" - case 2: - return "z" - } - return "3" -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/Makefile deleted file mode 100644 index c323d9ee70..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. example.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.pb.go deleted file mode 100644 index 579b600ef8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.pb.go +++ /dev/null @@ -1,3239 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: example.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - example.proto - - It has these top-level messages: - A - B - C - U - E - R - CastType -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type A struct { - Description string `protobuf:"bytes,1,opt,name=Description" json:"Description"` - Number int64 `protobuf:"varint,2,opt,name=Number" json:"Number"` - Id github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" json:"Id"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} - -type B struct { - A `protobuf:"bytes,1,opt,name=A,embedded=A" json:"A"` - G []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=G,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"G"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *B) Reset() { *m = B{} } -func (*B) ProtoMessage() {} - -type C struct { - MySize *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *C) Reset() { *m = C{} } -func (*C) ProtoMessage() {} - -func (m *C) GetMySize() int64 { - if m != nil && m.MySize != nil { - return *m.MySize - } - return 0 -} - -type U struct { - A *A `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *B `protobuf:"bytes,2,opt,name=B" json:"B,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *U) Reset() { *m = U{} } -func (*U) ProtoMessage() {} - -func (m *U) GetA() *A { - if m != nil { - return m.A - } - return nil -} - -func (m *U) GetB() *B { - if m != nil { - return m.B - } - return nil -} - -type E struct { - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *E) Reset() { *m = E{} } -func (*E) ProtoMessage() {} - -var extRange_E = []proto.ExtensionRange{ - {1, 536870911}, -} - -func (*E) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_E -} -func (m *E) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type R struct { - Recognized *uint32 `protobuf:"varint,1,opt,name=recognized" json:"recognized,omitempty"` -} - -func (m *R) Reset() { *m = R{} } -func (*R) ProtoMessage() {} - -func (m *R) GetRecognized() uint32 { - if m != nil && m.Recognized != nil { - return *m.Recognized - } - return 0 -} - -type CastType struct { - Int32 *int32 `protobuf:"varint,1,opt,name=Int32,casttype=int32" json:"Int32,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CastType) Reset() { *m = CastType{} } -func (*CastType) ProtoMessage() {} - -func (m *CastType) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "test.A") - proto.RegisterType((*B)(nil), "test.B") - proto.RegisterType((*C)(nil), "test.C") - proto.RegisterType((*U)(nil), "test.U") - proto.RegisterType((*E)(nil), "test.E") - proto.RegisterType((*R)(nil), "test.R") - proto.RegisterType((*CastType)(nil), "test.CastType") -} -func (this *B) Description() (desc *descriptor.FileDescriptorSet) { - return ExampleDescription() -} -func ExampleDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("example.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("A"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Description"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x75, 0x69, 0x64})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x0}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("B"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.A"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("G"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64014: proto.NewExtension([]byte{0xf0, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("C"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("size"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x4d, 0x79, 0x53, 0x69, 0x7a, 0x65})}}, - }}, - }, {Name: func(v string) *string { return &v }("U"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.A"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.B"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("E"), - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1), - End: func(v int32) *int32 { return &v }(536870912), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("R"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("recognized"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Int32"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x5, 0x69, 0x6e, 0x74, 0x33, 0x32})}}, - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1})}}, - }}, - } -} -func (this *A) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *A") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *A but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *A but is not nil && this == nil") - } - if this.Description != that1.Description { - return fmt.Errorf("Description this(%v) Not Equal that(%v)", this.Description, that1.Description) - } - if this.Number != that1.Number { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Description != that1.Description { - return false - } - if this.Number != that1.Number { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *B") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *B but is not nil && this == nil") - } - if !this.A.Equal(&that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if len(this.G) != len(that1.G) { - return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(&that1.A) { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *C) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *C") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *C but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *C but is not nil && this == nil") - } - if this.MySize != nil && that1.MySize != nil { - if *this.MySize != *that1.MySize { - return fmt.Errorf("MySize this(%v) Not Equal that(%v)", *this.MySize, *that1.MySize) - } - } else if this.MySize != nil { - return fmt.Errorf("this.MySize == nil && that.MySize != nil") - } else if that1.MySize != nil { - return fmt.Errorf("MySize this(%v) Not Equal that(%v)", this.MySize, that1.MySize) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *C) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MySize != nil && that1.MySize != nil { - if *this.MySize != *that1.MySize { - return false - } - } else if this.MySize != nil { - return false - } else if that1.MySize != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *U) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *U") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *U but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *U but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if !this.B.Equal(that1.B) { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *U) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if !this.B.Equal(that1.B) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *E) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*E) - if !ok { - that2, ok := that.(E) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *E") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *E but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *E but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *E) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*E) - if !ok { - that2, ok := that.(E) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *R) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*R) - if !ok { - that2, ok := that.(R) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *R") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *R but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *R but is not nil && this == nil") - } - if this.Recognized != nil && that1.Recognized != nil { - if *this.Recognized != *that1.Recognized { - return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", *this.Recognized, *that1.Recognized) - } - } else if this.Recognized != nil { - return fmt.Errorf("this.Recognized == nil && that.Recognized != nil") - } else if that1.Recognized != nil { - return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", this.Recognized, that1.Recognized) - } - return nil -} -func (this *R) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*R) - if !ok { - that2, ok := that.(R) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Recognized != nil && that1.Recognized != nil { - if *this.Recognized != *that1.Recognized { - return false - } - } else if this.Recognized != nil { - return false - } else if that1.Recognized != nil { - return false - } - return true -} -func (this *CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CastType) - if !ok { - that2, ok := that.(CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CastType but is not nil && this == nil") - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", *this.Int32, *that1.Int32) - } - } else if this.Int32 != nil { - return fmt.Errorf("this.Int32 == nil && that.Int32 != nil") - } else if that1.Int32 != nil { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CastType) - if !ok { - that2, ok := that.(CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return false - } - } else if this.Int32 != nil { - return false - } else if that1.Int32 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type AFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDescription() string - GetNumber() int64 - GetId() github_com_gogo_protobuf_test.Uuid -} - -func (this *A) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAFromFace(this) -} - -func (this *A) GetDescription() string { - return this.Description -} - -func (this *A) GetNumber() int64 { - return this.Number -} - -func (this *A) GetId() github_com_gogo_protobuf_test.Uuid { - return this.Id -} - -func NewAFromFace(that AFace) *A { - this := &A{} - this.Description = that.GetDescription() - this.Number = that.GetNumber() - this.Id = that.GetId() - return this -} - -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.A{") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.B{") - s = append(s, "A: "+strings.Replace(this.A.GoString(), `&`, ``, 1)+",\n") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *C) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.C{") - if this.MySize != nil { - s = append(s, "MySize: "+valueToGoStringExample(this.MySize, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *U) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.U{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *E) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.E{") - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *R) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.R{") - if this.Recognized != nil { - s = append(s, "Recognized: "+valueToGoStringExample(this.Recognized, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CastType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CastType{") - if this.Int32 != nil { - s = append(s, "Int32: "+valueToGoStringExample(this.Int32, "int32")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringExample(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringExample(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(len(m.Description))) - i += copy(data[i:], m.Description) - data[i] = 0x10 - i++ - i = encodeVarintExample(data, i, uint64(m.Number)) - data[i] = 0x1a - i++ - i = encodeVarintExample(data, i, uint64(m.Id.Size())) - n1, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.G) > 0 { - for _, msg := range m.G { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *C) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *C) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MySize != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.MySize)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *U) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *U) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n3, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.B != nil { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(m.B.Size())) - n4, err := m.B.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *E) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *E) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *R) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *R) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Recognized != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.Recognized)) - } - return i, nil -} - -func (m *CastType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CastType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32 != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Example(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Example(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintExample(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedA(r randyExample, easy bool) *A { - this := &A{} - this.Description = randStringExample(r) - this.Number = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Number *= -1 - } - v1 := github_com_gogo_protobuf_test.NewPopulatedUuid(r) - this.Id = *v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 4) - } - return this -} - -func NewPopulatedB(r randyExample, easy bool) *B { - this := &B{} - v2 := NewPopulatedA(r, easy) - this.A = *v2 - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) - for i := 0; i < v3; i++ { - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.G[i] = *v4 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 3) - } - return this -} - -func NewPopulatedC(r randyExample, easy bool) *C { - this := &C{} - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.MySize = &v5 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 2) - } - return this -} - -func NewPopulatedU(r randyExample, easy bool) *U { - this := &U{} - fieldNum := r.Intn(2) - switch fieldNum { - case 0: - this.A = NewPopulatedA(r, easy) - case 1: - this.B = NewPopulatedB(r, easy) - } - return this -} - -func NewPopulatedE(r randyExample, easy bool) *E { - this := &E{} - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(536870911) + 1 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldExample(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - return this -} - -func NewPopulatedR(r randyExample, easy bool) *R { - this := &R{} - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Recognized = &v6 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedCastType(r randyExample, easy bool) *CastType { - this := &CastType{} - if r.Intn(10) != 0 { - v7 := int32(r.Int63()) - if r.Intn(2) == 0 { - v7 *= -1 - } - this.Int32 = &v7 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 2) - } - return this -} - -type randyExample interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneExample(r randyExample) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringExample(r randyExample) string { - v8 := r.Intn(100) - tmps := make([]rune, v8) - for i := 0; i < v8; i++ { - tmps[i] = randUTF8RuneExample(r) - } - return string(tmps) -} -func randUnrecognizedExample(r randyExample, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldExample(data, r, fieldNumber, wire) - } - return data -} -func randFieldExample(data []byte, r randyExample, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateExample(data, uint64(key)) - v9 := r.Int63() - if r.Intn(2) == 0 { - v9 *= -1 - } - data = encodeVarintPopulateExample(data, uint64(v9)) - case 1: - data = encodeVarintPopulateExample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateExample(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateExample(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateExample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateExample(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Description) - n += 1 + l + sovExample(uint64(l)) - n += 1 + sovExample(uint64(m.Number)) - l = m.Id.Size() - n += 1 + l + sovExample(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *B) Size() (n int) { - var l int - _ = l - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - if len(m.G) > 0 { - for _, e := range m.G { - l = e.Size() - n += 1 + l + sovExample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *C) Size() (n int) { - var l int - _ = l - if m.MySize != nil { - n += 1 + sovExample(uint64(*m.MySize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *U) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovExample(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *E) Size() (n int) { - var l int - _ = l - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *R) Size() (n int) { - var l int - _ = l - if m.Recognized != nil { - n += 1 + sovExample(uint64(*m.Recognized)) - } - return n -} - -func (m *CastType) Size() (n int) { - var l int - _ = l - if m.Int32 != nil { - n += 1 + sovExample(uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovExample(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozExample(x uint64) (n int) { - return sovExample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *B) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&B{`, - `A:` + strings.Replace(strings.Replace(this.A.String(), "A", "A", 1), `&`, ``, 1) + `,`, - `G:` + fmt.Sprintf("%v", this.G) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *C) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&C{`, - `MySize:` + valueToStringExample(this.MySize) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *U) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&U{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, - `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *E) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&E{`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *R) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&R{`, - `Recognized:` + valueToStringExample(this.Recognized) + `,`, - `}`, - }, "") - return s -} -func (this *CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CastType{`, - `Int32:` + valueToStringExample(this.Int32) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringExample(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *U) GetValue() interface{} { - if this.A != nil { - return this.A - } - if this.B != nil { - return this.B - } - return nil -} - -func (this *U) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *A: - this.A = vt - case *B: - this.B = vt - default: - return false - } - return true -} -func (m *A) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Number |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field G", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.G = append(m.G, v) - if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *C) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: C: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MySize", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MySize = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *U) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: U: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &A{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.B == nil { - m.B = &B{} - } - if err := m.B.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *E) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: E: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: E: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - if (fieldNum >= 1) && (fieldNum < 536870912) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_extensions = append(m.XXX_extensions, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *R) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: R: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: R: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Recognized", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Recognized = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CastType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CastType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CastType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipExample(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthExample - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipExample(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.proto deleted file mode 100644 index b69ea876e5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.gostring_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; - -message A { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable) = false]; -} - -message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message C { - optional int64 size = 1 [(gogoproto.customname) = "MySize"]; -} - -message U { - option (gogoproto.onlyone) = true; - optional A A = 1; - optional B B = 2; -} - -message E { - option (gogoproto.goproto_extensions_map) = false; - extensions 1 to max; -} - -message R { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 recognized = 1; -} - -message CastType { - optional int64 Int32 = 1 [(gogoproto.casttype)="int32"]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example_test.go deleted file mode 100644 index 79ef9476bb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/example_test.go +++ /dev/null @@ -1,35 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import "testing" - -func TestGetterExists(t *testing.T) { - _ = (&CastType{}).GetInt32() -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/examplepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/examplepb_test.go deleted file mode 100644 index 32d07332af..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/example/examplepb_test.go +++ /dev/null @@ -1,1672 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: example.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - example.proto - -It has these top-level messages: - A - B - C - U - E - R - CastType -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &A{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkBProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*B, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedB(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &B{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*C, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedC(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedC(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &C{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*U, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedU(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &U{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestEProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkEProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*E, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedE(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkEProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedE(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &E{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*R, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedR(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedR(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &R{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CastType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CastType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &E{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &E{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &R{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &R{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestExampleDescription(t *testing.T) { - ExampleDescription() -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestEVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestEGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkASize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkBSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*B, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*C, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedC(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*U, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestESize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkESize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*E, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedE(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*R, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedR(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CastType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestEStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestRStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCastTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, true) - v := p.GetValue() - msg := &U{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/extension_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/extension_test.go deleted file mode 100644 index 141bd0bbff..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/extension_test.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "github.com/gogo/protobuf/proto" - "math" - math_rand "math/rand" - "testing" - "time" -) - -//func SetRawExtension(base extendableProto, id int32, b []byte) { -//func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { -//func ClearExtension(pb extendableProto, extension *ExtensionDesc) { -//func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { -//func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { -//func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { - -type extendable interface { - proto.Message - ExtensionRangeArray() []proto.ExtensionRange -} - -func check(t *testing.T, m extendable, fieldA float64, ext *proto.ExtensionDesc) { - if !proto.HasExtension(m, ext) { - t.Fatalf("expected extension to be set") - } - fieldA2Interface, err := proto.GetExtension(m, ext) - if err != nil { - panic(err) - } - fieldA2 := fieldA2Interface.(*float64) - if fieldA != *fieldA2 { - t.Fatalf("Expected %f got %f", fieldA, *fieldA2) - } - fieldA3Interface, err := proto.GetUnsafeExtension(m, ext.Field) - if err != nil { - panic(err) - } - fieldA3 := fieldA3Interface.(*float64) - if fieldA != *fieldA3 { - t.Fatalf("Expected %f got %f", fieldA, *fieldA3) - } - proto.ClearExtension(m, ext) - if proto.HasExtension(m, ext) { - t.Fatalf("expected extension to be cleared") - } -} - -var fieldA float64 -var fieldABytes []byte -var extr = math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - -func init() { - fieldA = float64(1.1) - fieldABits := math.Float64bits(fieldA) - x := uint64(uint32(100)<<3 | uint32(proto.WireFixed64)) - fieldABytes = encodeVarintPopulateThetest(nil, x) - fieldABytes = append(fieldABytes, uint8(fieldABits)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>8)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>16)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>24)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>32)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>40)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>48)) - fieldABytes = append(fieldABytes, uint8(fieldABits>>56)) -} - -func TestExtensionsMyExtendable(t *testing.T) { - m := NewPopulatedMyExtendable(extr, false) - err := proto.SetExtension(m, E_FieldA, &fieldA) - if err != nil { - panic(err) - } - check(t, m, fieldA, E_FieldA) - proto.SetRawExtension(m, 100, fieldABytes) - check(t, m, fieldA, E_FieldA) -} - -func TestExtensionsNoExtensionsMapSetExtension(t *testing.T) { - m := NewPopulatedNoExtensionsMap(extr, false) - err := proto.SetExtension(m, E_FieldA1, &fieldA) - if err != nil { - panic(err) - } - check(t, m, fieldA, E_FieldA1) -} - -func TestExtensionsNoExtensionsMapSetRawExtension(t *testing.T) { - m := NewPopulatedNoExtensionsMap(extr, false) - proto.SetRawExtension(m, 100, fieldABytes) - check(t, m, fieldA, E_FieldA1) -} - -func TestUnsafeExtension(t *testing.T) { - m := NewPopulatedMyExtendable(extr, false) - err := proto.SetUnsafeExtension(m, E_FieldA.Field, &fieldA) - if err != nil { - panic(err) - } - check(t, m, fieldA, E_FieldA) -} - -//See another version of this test in proto/extensions_test.go -func TestGetExtensionStability(t *testing.T) { - check := func(m *NoExtensionsMap) bool { - ext1, err := proto.GetExtension(m, E_FieldB1) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - ext2, err := proto.GetExtension(m, E_FieldB1) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - return ext1.(*NinOptNative).Equal(ext2) - } - msg := &NoExtensionsMap{Field1: proto.Int64(2)} - ext0 := &NinOptNative{Field1: proto.Float64(1)} - if err := proto.SetExtension(msg, E_FieldB1, ext0); err != nil { - t.Fatalf("Could not set ext1: %s", ext0) - } - if !check(msg) { - t.Errorf("GetExtension() not stable before marshaling") - } - bb, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Marshal() failed: %s", err) - } - msg1 := &NoExtensionsMap{} - err = proto.Unmarshal(bb, msg1) - if err != nil { - t.Fatalf("Unmarshal() failed: %s", err) - } - if !check(msg1) { - t.Errorf("GetExtension() not stable after unmarshaling") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/Makefile deleted file mode 100644 index 2299ee10df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogofast - protoc --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. fuzz.proto \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.pb.go deleted file mode 100644 index 82dc1413b1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.pb.go +++ /dev/null @@ -1,2886 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: fuzz.proto -// DO NOT EDIT! - -/* - Package fuzztests is a generated protocol buffer package. - - It is generated from these files: - fuzz.proto - - It has these top-level messages: - Nil - NinRepPackedNative - NinOptNative - NinOptStruct -*/ -package fuzztests - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (m *Nil) String() string { return proto.CompactTextString(m) } -func (*Nil) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } -func (*NinRepPackedNative) ProtoMessage() {} - -func (m *NinRepPackedNative) GetField1() []float64 { - if m != nil { - return m.Field1 - } - return nil -} - -func (m *NinRepPackedNative) GetField2() []float32 { - if m != nil { - return m.Field2 - } - return nil -} - -func (m *NinRepPackedNative) GetField3() []int32 { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinRepPackedNative) GetField4() []int64 { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinRepPackedNative) GetField5() []uint32 { - if m != nil { - return m.Field5 - } - return nil -} - -func (m *NinRepPackedNative) GetField6() []uint64 { - if m != nil { - return m.Field6 - } - return nil -} - -func (m *NinRepPackedNative) GetField7() []int32 { - if m != nil { - return m.Field7 - } - return nil -} - -func (m *NinRepPackedNative) GetField8() []int64 { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinRepPackedNative) GetField9() []uint32 { - if m != nil { - return m.Field9 - } - return nil -} - -func (m *NinRepPackedNative) GetField10() []int32 { - if m != nil { - return m.Field10 - } - return nil -} - -func (m *NinRepPackedNative) GetField11() []uint64 { - if m != nil { - return m.Field11 - } - return nil -} - -func (m *NinRepPackedNative) GetField12() []int64 { - if m != nil { - return m.Field12 - } - return nil -} - -func (m *NinRepPackedNative) GetField13() []bool { - if m != nil { - return m.Field13 - } - return nil -} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (m *NinOptNative) String() string { return proto.CompactTextString(m) } -func (*NinOptNative) ProtoMessage() {} - -func (m *NinOptNative) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return 0 -} - -func (m *NinOptNative) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return 0 -} - -func (m *NinOptNative) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return 0 -} - -func (m *NinOptNative) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return 0 -} - -func (m *NinOptNative) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return 0 -} - -func (m *NinOptNative) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return 0 -} - -func (m *NinOptNative) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return 0 -} - -func (m *NinOptNative) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return 0 -} - -func (m *NinOptNative) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return 0 -} - -func (m *NinOptNative) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return 0 -} - -func (m *NinOptNative) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return 0 -} - -func (m *NinOptNative) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return 0 -} - -func (m *NinOptNative) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return false -} - -func (m *NinOptNative) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return "" -} - -func (m *NinOptNative) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NinOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (m *NinOptStruct) String() string { return proto.CompactTextString(m) } -func (*NinOptStruct) ProtoMessage() {} - -func (m *NinOptStruct) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return 0 -} - -func (m *NinOptStruct) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return 0 -} - -func (m *NinOptStruct) GetField3() *NinOptNative { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinOptStruct) GetField4() *NinOptNative { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinOptStruct) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return 0 -} - -func (m *NinOptStruct) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return 0 -} - -func (m *NinOptStruct) GetField8() *NinOptNative { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinOptStruct) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return false -} - -func (m *NinOptStruct) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return "" -} - -func (m *NinOptStruct) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -func init() { - proto.RegisterType((*Nil)(nil), "fuzztests.Nil") - proto.RegisterType((*NinRepPackedNative)(nil), "fuzztests.NinRepPackedNative") - proto.RegisterType((*NinOptNative)(nil), "fuzztests.NinOptNative") - proto.RegisterType((*NinOptStruct)(nil), "fuzztests.NinOptStruct") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&fuzztests.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&fuzztests.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&fuzztests.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringFuzz(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringFuzz(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringFuzz(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringFuzz(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringFuzz(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringFuzz(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringFuzz(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringFuzz(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&fuzztests.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringFuzz(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringFuzz(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f1 := math.Float64bits(num) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f2 := math.Float32bits(num) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data4 := make([]byte, len(m.Field3)*10) - var j3 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - data4[j3] = uint8(num) - j3++ - } - data[i] = 0x1a - i++ - i = encodeVarintFuzz(data, i, uint64(j3)) - i += copy(data[i:], data4[:j3]) - } - if len(m.Field4) > 0 { - data6 := make([]byte, len(m.Field4)*10) - var j5 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x22 - i++ - i = encodeVarintFuzz(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field5) > 0 { - data8 := make([]byte, len(m.Field5)*10) - var j7 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x2a - i++ - i = encodeVarintFuzz(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field6) > 0 { - data10 := make([]byte, len(m.Field6)*10) - var j9 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x32 - i++ - i = encodeVarintFuzz(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field7) > 0 { - data11 := make([]byte, len(m.Field7)*5) - var j12 int - for _, num := range m.Field7 { - x13 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x13 >= 1<<7 { - data11[j12] = uint8(uint64(x13)&0x7f | 0x80) - j12++ - x13 >>= 7 - } - data11[j12] = uint8(x13) - j12++ - } - data[i] = 0x3a - i++ - i = encodeVarintFuzz(data, i, uint64(j12)) - i += copy(data[i:], data11[:j12]) - } - if len(m.Field8) > 0 { - var j14 int - data16 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x15 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x15 >= 1<<7 { - data16[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data16[j14] = uint8(x15) - j14++ - } - data[i] = 0x42 - i++ - i = encodeVarintFuzz(data, i, uint64(j14)) - i += copy(data[i:], data16[:j14]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintFuzz(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Fuzz(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Fuzz(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Fuzz(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Fuzz(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field3.Size())) - n17, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field4.Size())) - n18, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field8.Size())) - n19, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Fuzz(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Fuzz(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintFuzz(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovFuzz(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovFuzz(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovFuzz(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovFuzz(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozFuzz(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozFuzz(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovFuzz(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozFuzz(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFuzz(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozFuzz(x uint64) (n int) { - return sovFuzz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NinOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFuzz(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFuzz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFuzz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFuzz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthFuzz - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFuzz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipFuzz(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthFuzz = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFuzz = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.proto deleted file mode 100644 index 9002ab7125..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz.proto +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -syntax = "proto2"; -package fuzztests; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.gostring_all) = true; - -message Nil { - -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NinOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NinOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz_test.go deleted file mode 100644 index 5308e7f621..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/fuzztests/fuzz_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package fuzztests - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestFuzzUnrecognized(t *testing.T) { - msg := &Nil{} - input := []byte{0x8, 0xaf, 0x81, 0xc9, 0xb3, 0x97, 0xd1, 0xb5, 0xc2, 0x4f, 0x1a, 0x4a, 0x52, 0x48, 0x4e, 0x44, 0x65, 0x51, 0x4b, 0x46, 0x44, 0x33, 0x5a, 0x44, 0x72, 0x38, 0x58, 0x4c, 0x58, 0x70, 0x59, 0x45, 0x71, 0x45, 0x4f, 0x6d, 0x45, 0x4d, 0x54, 0x59, 0x4c, 0x6b, 0x55, 0x7a, 0x6f, 0x6b, 0x5a, 0x69, 0x56, 0x64, 0x46, 0x45, 0x56, 0x4d, 0x70, 0x6a, 0x39, 0x7a, 0x4b, 0x43, 0x4d, 0x6d, 0x76, 0x63, 0x46, 0x4f, 0x31, 0x4a, 0x5a, 0x6b, 0x66, 0x4a, 0x75, 0x51, 0x38, 0x54, 0x54, 0x30, 0x53, 0x61, 0x36, 0x6e, 0x4f, 0x6b, 0x35, 0x54, 0x95, 0x0, 0x0, 0x0, 0x0, 0x12, 0x38, 0x52, 0x36, 0x66, 0x76, 0x41, 0x74, 0x73, 0x7a, 0x39, 0x43, 0x6a, 0x4f, 0x64, 0x59, 0x77, 0x33, 0x30, 0x36, 0x58, 0x75, 0x65, 0x46, 0x4b, 0x46, 0x55, 0x56, 0x71, 0x6d, 0x49, 0x73, 0x4a, 0x4b, 0x78, 0x76, 0x41, 0x65, 0x42, 0x61, 0x5a, 0x30, 0x41, 0x37, 0x45, 0x76, 0x72, 0x31, 0x30, 0x4e, 0x78, 0x6d, 0x33, 0x63, 0x65, 0x66, 0x6b, 0x30} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatal("expected error") - } -} - -func DisabledTestFuzzPackedIsNotIdempotent(t *testing.T) { - msg := &NinRepPackedNative{} - //original := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51, 0x71, 0x44, 0x65, 0x6f, 0x53, 0x30, 0x44, 0x6a, 0x58, 0x7a, 0x1b, 0x65, 0x62, 0x9c, 0x95, 0xc5, 0x41, 0xcb, 0x48, 0xa, 0x47, 0xf6, 0xd8, 0xd2, 0xd5, 0x8d, 0x6, 0x69, 0x8f, 0xbe, 0x7c, 0xf3, 0xe9, 0x79, 0x3c, 0xca, 0x6, 0x5b} - input := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatal("expected error") - } -} - -func DisabledTestFuzzFieldOrder(t *testing.T) { - msg := &NinOptStruct{} - input := []byte{0x52, 0x57, 0x52, 0x6a, 0x33, 0x56, 0x43, 0x76, 0x32, 0x54, 0x49, 0x4a, 0x55, 0x66, 0x39, 0x52, 0x32, 0x32, 0x73, 0x69, 0x4f, 0x67, 0x66, 0x79, 0x4b, 0x79, 0x5a, 0x55, 0x42, 0x53, 0x38, 0x68, 0x6c, 0x46, 0x79, 0x6b, 0x54, 0x43, 0x63, 0x66, 0x30, 0x6a, 0x33, 0x35, 0x33, 0x7a, 0x41, 0x66, 0x68, 0x57, 0x61, 0x78, 0x51, 0x37, 0x76, 0x52, 0x78, 0x34, 0x56, 0x43, 0x54, 0x31, 0x73, 0x6a, 0x77, 0x63, 0x45, 0x62, 0x62, 0x67, 0x34, 0x6f, 0x64, 0x35, 0x6c, 0x41, 0x45, 0x50, 0x64, 0x6f, 0x46, 0x38, 0x41, 0x4b, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30} - if err := proto.Unmarshal(input, msg); err != nil { - t.Fatal(err) - } -} - -func TestFuzzSint64Overflow(t *testing.T) { - msg := &NinOptNative{} - //original := []byte{0x9, 0x65, 0xb4, 0xfd, 0xbc, 0x5, 0xc7, 0xee, 0x3f, 0x15, 0x48, 0xec, 0x67, 0x3f, 0x18, 0xca, 0xa4, 0xe0, 0xa9, 0x5, 0x20, 0x8e, 0xb7, 0x9f, 0xf5, 0xcf, 0xe9, 0xea, 0xad, 0xfd, 0x1, 0x28, 0xc9, 0xf1, 0xbc, 0x88, 0xc, 0x30, 0xeb, 0x99, 0xbd, 0xa8, 0xe, 0x38, 0xc0, 0xd4, 0xb7, 0xba, 0x7, 0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16, 0x9d, 0x59, 0xf9, 0x31, 0xe0, 0x99, 0x0, 0x0, 0x0, 0x0, 0x61, 0x59, 0x5b, 0xb5, 0x57, 0x56, 0x93, 0x70, 0xde, 0x68, 0x0, 0x72, 0x40, 0x64, 0x5a, 0x5a, 0x61, 0x57, 0x78, 0x68, 0x53, 0x65, 0x66, 0x67, 0x38, 0x38, 0x61, 0x48, 0x44, 0x32, 0x6c, 0x36, 0x50, 0x31, 0x4d, 0x43, 0x39, 0x31, 0x6d, 0x37, 0x34, 0x32, 0x48, 0x6b, 0x4d, 0x70, 0x31, 0x45, 0x73, 0x48, 0x71, 0x4a, 0x69, 0x37, 0x56, 0x53, 0x44, 0x6b, 0x48, 0x45, 0x50, 0x4b, 0x7a, 0x52, 0x49, 0x4c, 0x50, 0x69, 0x44, 0x72, 0x42, 0x56, 0x50, 0x78, 0x62, 0x56, 0x55, 0x7a, 0x5b, 0xb3, 0x6c, 0x59, 0x4c, 0xf1, 0x31, 0xeb, 0xb6, 0x25, 0x1a, 0x26, 0x67, 0x66, 0x97, 0x79, 0xb8, 0x37, 0x8, 0xe1, 0x32, 0x45, 0x6e, 0x6, 0x90, 0x4f, 0xde, 0x26, 0x7a, 0xc6, 0x29, 0x65, 0x4a, 0x69, 0xa7, 0x21, 0xfb, 0x42, 0xda, 0x43, 0x89, 0x27, 0x70, 0x71, 0xde, 0x66, 0xa4, 0x75, 0x2b, 0x5c, 0x96, 0x9f, 0x25, 0x3b, 0xc1, 0x64, 0x14, 0x4, 0x60, 0x8c, 0x58, 0x7e, 0xa1, 0x59, 0x7b, 0x47, 0x18, 0xc, 0x5b, 0x18, 0x63, 0x9, 0xb4, 0xc9, 0x7, 0xf9, 0xae, 0x33, 0xae, 0x2, 0x4a, 0x8b, 0x34, 0x92, 0x40, 0xb, 0xd7, 0x80, 0x60, 0xdb, 0x44, 0x5} - input := []byte{0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16} - if err := proto.Unmarshal(input, msg); err != nil { - return - } -} - -func DisabledTestFuzzOverrideField(t *testing.T) { - msg := &NinOptNative{} - //original := []byte{0x9, 0x73, 0x78, 0x5a, 0xf2, 0xb4, 0x66, 0xe8, 0x3f, 0x15, 0x71, 0xdc, 0x4, 0x3f, 0x18, 0xe5, 0x8e, 0xab, 0xdb, 0x3, 0x20, 0xbe, 0xed, 0xe6, 0xc0, 0xb9, 0xb8, 0xa7, 0xb5, 0x12, 0x28, 0xcb, 0x8c, 0x91, 0xef, 0xc, 0x30, 0x9a, 0xc1, 0xc3, 0xc0, 0xf, 0x38, 0xe8, 0x9b, 0xf0, 0xca, 0x5, 0x40, 0xd2, 0xd7, 0xdd, 0xa3, 0xea, 0xab, 0xec, 0xc2, 0xaa, 0x1, 0x4d, 0xc9, 0x15, 0x0, 0xea, 0x55, 0x72, 0x3e, 0x92, 0xa8, 0x59, 0x3e, 0x87, 0x7d, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x61, 0xca, 0xe7, 0xdb, 0x57, 0xa1, 0xb6, 0x41, 0xf4, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea, 0x82, 0x1, 0x23, 0xed, 0x7a, 0x3, 0x78, 0xee, 0x56, 0x46, 0xd0, 0xe1, 0x17, 0x18, 0x30, 0x9d, 0x2f, 0xac, 0x1c, 0xa, 0x30, 0xa9, 0x8d, 0x10, 0xed, 0xb5, 0x44, 0x36, 0x5e, 0x84, 0x73, 0x5d, 0x38, 0x51, 0x2b, 0x6e, 0xc6, 0xb5} - input := []byte{0x4d, 0xc9, 0x15, 0x0, 0xea, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea} - if err := proto.Unmarshal(input, msg); err != nil { - panic(err) - } - output, err := proto.Marshal(msg) - if err != nil { - t.Fatal(err) - } - if len(input) != len(output) { - t.Logf("%#v", msg) - msg2 := &NinOptNative{} - if err := proto.Unmarshal(output, msg2); err == nil { - t.Logf("%#v", msg2) - } - t.Errorf("expected %#v got %#v", input, output) - } -} - -//Generated code is correct, non generated returns an incorrect error -func DisabledTestFuzzBadWireType(t *testing.T) { - msg := &NinRepPackedNative{} - //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd30000'0000") - input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatalf("expected bad wiretype for Field4 error got %#v", msg) - } else { - t.Log(err) - } -} - -func TestFuzzIntegerOverflow(t *testing.T) { - msg := &Nil{} - //input := []byte("\x1500000\x8b\x9b\xa3\xa8\xb6\xe1\xe1\xfe\u061c0") - input := []byte{0x15, 0x30, 0x30, 0x30, 0x30, 0x30, 0x8b, 0x9b, 0xa3, 0xa8, 0xb6, 0xe1, 0xe1, 0xfe, 0xd8, 0x9c, 0x30} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatalf("expected integer overflow error %#v", msg) - } else { - t.Log(err) - } -} - -//Generated code is correct, non generated returns an incorrect error -func DisabledTestFuzzUnexpectedEOF(t *testing.T) { - msg := &NinRepPackedNative{} - //input := []byte("j\x16000000000000000000" + "00\xb90") - input := []byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatalf("expected unexpected eof error got %#v", msg) - } else { - t.Log(err) - } -} - -//Generated code is correct, non generated returns an incorrect error -func DisabledTestFuzzCantSkipWireType(t *testing.T) { - msg := &NinRepPackedNative{} - //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd3000\xa80\xa7000") - input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30} - if err := proto.Unmarshal(input, msg); err == nil { - t.Fatalf("expected cant skip wiretype error got %#v", msg) - } else { - t.Log(err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/Makefile deleted file mode 100644 index f2cc2bdfcd..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. group.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.pb.go deleted file mode 100644 index e367ac84f2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.pb.go +++ /dev/null @@ -1,1670 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: group.proto -// DO NOT EDIT! - -/* -Package group is a generated protocol buffer package. - -It is generated from these files: - group.proto - -It has these top-level messages: - Groups1 - Groups2 -*/ -package group - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Groups1 struct { - G []*Groups1_G `protobuf:"group,1,rep,name=G" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups1) Reset() { *m = Groups1{} } -func (*Groups1) ProtoMessage() {} - -type Groups1_G struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups1_G) Reset() { *m = Groups1_G{} } -func (*Groups1_G) ProtoMessage() {} - -type Groups2 struct { - G *Groups2_G `protobuf:"group,1,opt,name=G" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups2) Reset() { *m = Groups2{} } -func (*Groups2) ProtoMessage() {} - -type Groups2_G struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups2_G) Reset() { *m = Groups2_G{} } -func (*Groups2_G) ProtoMessage() {} - -func init() { - proto.RegisterType((*Groups1)(nil), "group.Groups1") - proto.RegisterType((*Groups1_G)(nil), "group.Groups1.G") - proto.RegisterType((*Groups2)(nil), "group.Groups2") - proto.RegisterType((*Groups2_G)(nil), "group.Groups2.G") -} -func (this *Groups1) Description() (desc *descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups1_G) Description() (desc *descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups2) Description() (desc *descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups2_G) Description() (desc *descriptor.FileDescriptorSet) { - return GroupDescription() -} -func GroupDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("group.proto"), - Package: func(v string) *string { return &v }("group"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Groups1"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("g"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(10), - TypeName: func(v string) *string { return &v }(".group.Groups1.G"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("G"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Groups2"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("g"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(10), - TypeName: func(v string) *string { return &v }(".group.Groups2.G"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("G"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x0})}}, - }}, - } -} -func (this *Groups1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups1) - if !ok { - that2, ok := that.(Groups1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups1 but is not nil && this == nil") - } - if len(this.G) != len(that1.G) { - return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups1) - if !ok { - that2, ok := that.(Groups1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups1_G) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups1_G) - if !ok { - that2, ok := that.(Groups1_G) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups1_G") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups1_G but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups1_G but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups1_G) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups1_G) - if !ok { - that2, ok := that.(Groups1_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups2) - if !ok { - that2, ok := that.(Groups2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups2 but is not nil && this == nil") - } - if !this.G.Equal(that1.G) { - return fmt.Errorf("G this(%v) Not Equal that(%v)", this.G, that1.G) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups2) - if !ok { - that2, ok := that.(Groups2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.G.Equal(that1.G) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups2_G) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups2_G) - if !ok { - that2, ok := that.(Groups2_G) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups2_G") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups2_G but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups2_G but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups2_G) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups2_G) - if !ok { - that2, ok := that.(Groups2_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups1) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&group.Groups1{") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups1_G) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&group.Groups1_G{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringGroup(this.Field2, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups2) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&group.Groups2{") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups2_G) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&group.Groups2_G{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringGroup(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringGroup(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedGroups1(r randyGroup, easy bool) *Groups1 { - this := &Groups1{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.G = make([]*Groups1_G, v1) - for i := 0; i < v1; i++ { - this.G[i] = NewPopulatedGroups1_G(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGroup(r, 2) - } - return this -} - -func NewPopulatedGroups1_G(r randyGroup, easy bool) *Groups1_G { - this := &Groups1_G{} - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float64(r.Float64()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGroup(r, 3) - } - return this -} - -func NewPopulatedGroups2(r randyGroup, easy bool) *Groups2 { - this := &Groups2{} - if r.Intn(10) != 0 { - this.G = NewPopulatedGroups2_G(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGroup(r, 2) - } - return this -} - -func NewPopulatedGroups2_G(r randyGroup, easy bool) *Groups2_G { - this := &Groups2_G{} - if r.Intn(10) != 0 { - v4 := int64(r.Int63()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field1 = &v4 - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.Field2 = make([]float64, v5) - for i := 0; i < v5; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGroup(r, 3) - } - return this -} - -type randyGroup interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneGroup(r randyGroup) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringGroup(r randyGroup) string { - v6 := r.Intn(100) - tmps := make([]rune, v6) - for i := 0; i < v6; i++ { - tmps[i] = randUTF8RuneGroup(r) - } - return string(tmps) -} -func randUnrecognizedGroup(r randyGroup, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldGroup(data, r, fieldNumber, wire) - } - return data -} -func randFieldGroup(data []byte, r randyGroup, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateGroup(data, uint64(key)) - v7 := r.Int63() - if r.Intn(2) == 0 { - v7 *= -1 - } - data = encodeVarintPopulateGroup(data, uint64(v7)) - case 1: - data = encodeVarintPopulateGroup(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateGroup(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateGroup(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateGroup(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateGroup(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (this *Groups1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Groups1{`, - `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups1_G", "Groups1_G", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Groups1_G) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Groups1_G{`, - `Field1:` + valueToStringGroup(this.Field1) + `,`, - `Field2:` + valueToStringGroup(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Groups2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Groups2{`, - `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups2_G", "Groups2_G", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Groups2_G) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Groups2_G{`, - `Field1:` + valueToStringGroup(this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringGroup(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.proto deleted file mode 100644 index c97e2611df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/group.proto +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package group; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; - -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = false; - -message Groups1 { - repeated group G = 1 { - optional int64 Field1 = 1; - optional double Field2 = 2; - } -} - -message Groups2 { - optional group G = 1 { - optional int64 Field1 = 1; - repeated double Field2 = 2; - } -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/grouppb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/grouppb_test.go deleted file mode 100644 index 1f9d30c524..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/group/grouppb_test.go +++ /dev/null @@ -1,541 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: group.proto -// DO NOT EDIT! - -/* -Package group is a generated protocol buffer package. - -It is generated from these files: - group.proto - -It has these top-level messages: - Groups1 - Groups2 -*/ -package group - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestGroups1Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups1_GJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups2JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups2_GJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups1ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1_GProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1_GProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2_GProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2_GProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroupDescription(t *testing.T) { - GroupDescription() -} -func TestGroups1VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups1_GVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups2VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups2_GVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups1GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups1_GGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups2GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups2_GGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups1Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups1_GStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups2Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups2_GStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/Makefile deleted file mode 100644 index cf46ccc1df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. subpkg/subproto.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/importdedup_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/importdedup_test.go deleted file mode 100644 index 9c5e67fdd0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/importdedup_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package importdedup - -import testing "testing" - -func TestImportDedup(t *testing.T) { -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.pb.go deleted file mode 100644 index 32564e770b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.pb.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package importdedup is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Object -*/ -package importdedup - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" - -import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Object struct { - CustomField *github_com_gogo_protobuf_test_importdedup_subpkg.CustomType `protobuf:"bytes,1,opt,name=CustomField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"` - SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject" json:"SubObject,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object) Reset() { *m = Object{} } -func (m *Object) String() string { return proto.CompactTextString(m) } -func (*Object) ProtoMessage() {} - -func (m *Object) GetSubObject() *subpkg.SubObject { - if m != nil { - return m.SubObject - } - return nil -} - -func init() { - proto.RegisterType((*Object)(nil), "importdedup.Object") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.proto deleted file mode 100644 index 494accb88a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/proto.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package importdedup; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto"; - -message Object { - optional bytes CustomField = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importdedup/subpkg.CustomType"]; - optional subpkg.SubObject SubObject = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/customtype.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/customtype.go deleted file mode 100644 index 9a7965769d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/customtype.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package subpkg - -type CustomType struct{} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.pb.go deleted file mode 100644 index f7535acfe6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.pb.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: subpkg/subproto.proto -// DO NOT EDIT! - -/* -Package subpkg is a generated protocol buffer package. - -It is generated from these files: - subpkg/subproto.proto - -It has these top-level messages: - SubObject -*/ -package subpkg - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type SubObject struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubObject) Reset() { *m = SubObject{} } -func (m *SubObject) String() string { return proto.CompactTextString(m) } -func (*SubObject) ProtoMessage() {} - -func init() { - proto.RegisterType((*SubObject)(nil), "subpkg.SubObject") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.proto deleted file mode 100644 index 6ff53e9eb4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/importdedup/subpkg/subproto.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package subpkg; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message SubObject { - -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/Makefile deleted file mode 100644 index e83a2f2141..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (cd index && protoc --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. index.proto) - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. indeximport.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.pb.go deleted file mode 100644 index a916e9e041..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.pb.go +++ /dev/null @@ -1,497 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: index.proto -// DO NOT EDIT! - -/* - Package index is a generated protocol buffer package. - - It is generated from these files: - index.proto - - It has these top-level messages: - IndexQuery -*/ -package index - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type IndexQuery struct { - Key *string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *IndexQuery) Reset() { *m = IndexQuery{} } -func (m *IndexQuery) String() string { return proto.CompactTextString(m) } -func (*IndexQuery) ProtoMessage() {} - -func (m *IndexQuery) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *IndexQuery) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -func init() { - proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") -} -func (this *IndexQuery) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IndexQuery) - if !ok { - that2, ok := that.(IndexQuery) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Key != nil && that1.Key != nil { - if *this.Key != *that1.Key { - return false - } - } else if this.Key != nil { - return false - } else if that1.Key != nil { - return false - } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *IndexQuery) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *IndexQuery) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key != nil { - data[i] = 0xa - i++ - i = encodeVarintIndex(data, i, uint64(len(*m.Key))) - i += copy(data[i:], *m.Key) - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintIndex(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Index(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Index(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIndex(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { - this := &IndexQuery{} - if r.Intn(10) != 0 { - v1 := randStringIndex(r) - this.Key = &v1 - } - if r.Intn(10) != 0 { - v2 := randStringIndex(r) - this.Value = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIndex(r, 3) - } - return this -} - -type randyIndex interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIndex(r randyIndex) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringIndex(r randyIndex) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneIndex(r) - } - return string(tmps) -} -func randUnrecognizedIndex(r randyIndex, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldIndex(data, r, fieldNumber, wire) - } - return data -} -func randFieldIndex(data []byte, r randyIndex, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateIndex(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateIndex(data, uint64(v4)) - case 1: - data = encodeVarintPopulateIndex(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateIndex(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateIndex(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateIndex(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateIndex(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *IndexQuery) Size() (n int) { - var l int - _ = l - if m.Key != nil { - l = len(*m.Key) - n += 1 + l + sovIndex(uint64(l)) - } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovIndex(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovIndex(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIndex(x uint64) (n int) { - return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IndexQuery) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IndexQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIndex - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Key = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIndex - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Value = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIndex(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIndex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIndex(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthIndex - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIndex(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.proto deleted file mode 100644 index 4d8811bc4e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/index.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package index; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message IndexQuery { - optional string Key = 1; - optional string Value = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/indexpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/indexpb_test.go deleted file mode 100644 index 7e915f6b83..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/index/indexpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: index.proto -// DO NOT EDIT! - -/* -Package index is a generated protocol buffer package. - -It is generated from these files: - index.proto - -It has these top-level messages: - IndexQuery -*/ -package index - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestIndexQueryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIndexQueryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQuerySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.pb.go deleted file mode 100644 index c04565e80b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.pb.go +++ /dev/null @@ -1,448 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: indeximport.proto -// DO NOT EDIT! - -/* - Package indeximport is a generated protocol buffer package. - - It is generated from these files: - indeximport.proto - - It has these top-level messages: - IndexQueries -*/ -package indeximport - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import index "github.com/gogo/protobuf/test/indeximport-issue72/index" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type IndexQueries struct { - Queries []*index.IndexQuery `protobuf:"bytes,1,rep,name=Queries" json:"Queries,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *IndexQueries) Reset() { *m = IndexQueries{} } -func (m *IndexQueries) String() string { return proto.CompactTextString(m) } -func (*IndexQueries) ProtoMessage() {} - -func (m *IndexQueries) GetQueries() []*index.IndexQuery { - if m != nil { - return m.Queries - } - return nil -} - -func init() { - proto.RegisterType((*IndexQueries)(nil), "indeximport.IndexQueries") -} -func (this *IndexQueries) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IndexQueries) - if !ok { - that2, ok := that.(IndexQueries) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Queries) != len(that1.Queries) { - return false - } - for i := range this.Queries { - if !this.Queries[i].Equal(that1.Queries[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *IndexQueries) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *IndexQueries) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Queries) > 0 { - for _, msg := range m.Queries { - data[i] = 0xa - i++ - i = encodeVarintIndeximport(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Indeximport(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Indeximport(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIndeximport(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { - this := &IndexQueries{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.Queries = make([]*index.IndexQuery, v1) - for i := 0; i < v1; i++ { - this.Queries[i] = index.NewPopulatedIndexQuery(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIndeximport(r, 2) - } - return this -} - -type randyIndeximport interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIndeximport(r randyIndeximport) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringIndeximport(r randyIndeximport) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneIndeximport(r) - } - return string(tmps) -} -func randUnrecognizedIndeximport(r randyIndeximport, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldIndeximport(data, r, fieldNumber, wire) - } - return data -} -func randFieldIndeximport(data []byte, r randyIndeximport, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateIndeximport(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateIndeximport(data, uint64(v3)) - case 1: - data = encodeVarintPopulateIndeximport(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateIndeximport(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateIndeximport(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateIndeximport(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateIndeximport(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *IndexQueries) Size() (n int) { - var l int - _ = l - if len(m.Queries) > 0 { - for _, e := range m.Queries { - l = e.Size() - n += 1 + l + sovIndeximport(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovIndeximport(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIndeximport(x uint64) (n int) { - return sovIndeximport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IndexQueries) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndeximport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IndexQueries: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexQueries: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndeximport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIndeximport - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Queries = append(m.Queries, &index.IndexQuery{}) - if err := m.Queries[len(m.Queries)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIndeximport(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIndeximport - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIndeximport(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndeximport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndeximport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndeximport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthIndeximport - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndeximport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIndeximport(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthIndeximport = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIndeximport = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.proto deleted file mode 100644 index 1b789cb8b3..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximport.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package indeximport; - -import "github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message IndexQueries { - repeated index.IndexQuery Queries = 1; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximportpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximportpb_test.go deleted file mode 100644 index 99d0592bbe..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/indeximport-issue72/indeximportpb_test.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: indeximport.proto -// DO NOT EDIT! - -/* -Package indeximport is a generated protocol buffer package. - -It is generated from these files: - indeximport.proto - -It has these top-level messages: - IndexQueries -*/ -package indeximport - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/test/indeximport-issue72/index" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestIndexQueriesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueriesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIndexQueriesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/Makefile deleted file mode 100644 index e6a2cc3c9f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/issue34_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/issue34_test.go deleted file mode 100644 index c246136ef2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/issue34_test.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package issue34 - -import ( - "bytes" - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestZeroLengthOptionalBytes(t *testing.T) { - roundtrip := func(f *Foo) *Foo { - data, err := proto.Marshal(f) - if err != nil { - panic(err) - } - newF := &Foo{} - err = proto.Unmarshal(data, newF) - if err != nil { - panic(err) - } - return newF - } - - f := &Foo{} - roundtrippedF := roundtrip(f) - if roundtrippedF.Bar != nil { - t.Fatalf("should be nil") - } - - f.Bar = []byte{} - roundtrippedF = roundtrip(f) - if roundtrippedF.Bar == nil { - t.Fatalf("should not be nil") - } - if len(roundtrippedF.Bar) != 0 { - t.Fatalf("should be empty") - } -} - -func TestRepeatedOptional(t *testing.T) { - repeated := &FooWithRepeated{Bar: [][]byte{[]byte("a"), []byte("b")}} - data, err := proto.Marshal(repeated) - if err != nil { - panic(err) - } - optional := &Foo{} - err = proto.Unmarshal(data, optional) - if err != nil { - panic(err) - } - - if !bytes.Equal(optional.Bar, []byte("b")) { - t.Fatalf("should return the last entry") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.pb.go deleted file mode 100644 index e57768e801..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.pb.go +++ /dev/null @@ -1,327 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package issue34 is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo - FooWithRepeated -*/ -package issue34 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Foo struct { - Bar []byte `protobuf:"bytes,1,opt,name=bar" json:"bar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Foo) Reset() { *m = Foo{} } -func (m *Foo) String() string { return proto.CompactTextString(m) } -func (*Foo) ProtoMessage() {} - -func (m *Foo) GetBar() []byte { - if m != nil { - return m.Bar - } - return nil -} - -type FooWithRepeated struct { - Bar [][]byte `protobuf:"bytes,1,rep,name=bar" json:"bar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FooWithRepeated) Reset() { *m = FooWithRepeated{} } -func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) } -func (*FooWithRepeated) ProtoMessage() {} - -func (m *FooWithRepeated) GetBar() [][]byte { - if m != nil { - return m.Bar - } - return nil -} - -func init() { - proto.RegisterType((*Foo)(nil), "issue34.Foo") - proto.RegisterType((*FooWithRepeated)(nil), "issue34.FooWithRepeated") -} -func (m *Foo) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Foo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bar = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FooWithRepeated) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FooWithRepeated: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FooWithRepeated: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bar = append(m.Bar, make([]byte, postIndex-iNdEx)) - copy(m.Bar[len(m.Bar)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.proto deleted file mode 100644 index 2a2d0b1337..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue34/proto.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto2"; - -package issue34; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.unmarshaler_all) = true; - -message Foo { - optional bytes bar = 1; -} - -message FooWithRepeated { - repeated bytes bar = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/Makefile deleted file mode 100644 index 0f09007f75..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. issue42.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.pb.go deleted file mode 100644 index e812047948..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.pb.go +++ /dev/null @@ -1,604 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: issue42.proto -// DO NOT EDIT! - -/* - Package issue42 is a generated protocol buffer package. - - It is generated from these files: - issue42.proto - - It has these top-level messages: - UnorderedFields - OrderedFields -*/ -package issue42 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type UnorderedFields struct { - A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` - B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnorderedFields) Reset() { *m = UnorderedFields{} } -func (m *UnorderedFields) String() string { return proto.CompactTextString(m) } -func (*UnorderedFields) ProtoMessage() {} - -func (m *UnorderedFields) GetA() int64 { - if m != nil && m.A != nil { - return *m.A - } - return 0 -} - -func (m *UnorderedFields) GetB() uint64 { - if m != nil && m.B != nil { - return *m.B - } - return 0 -} - -type OrderedFields struct { - B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` - A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrderedFields) Reset() { *m = OrderedFields{} } -func (m *OrderedFields) String() string { return proto.CompactTextString(m) } -func (*OrderedFields) ProtoMessage() {} - -func (m *OrderedFields) GetB() uint64 { - if m != nil && m.B != nil { - return *m.B - } - return 0 -} - -func (m *OrderedFields) GetA() int64 { - if m != nil && m.A != nil { - return *m.A - } - return 0 -} - -func init() { - proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields") - proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields") -} -func (m *UnorderedFields) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnorderedFields) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.B != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Issue42(data, i, uint64(*m.B)) - } - if m.A != nil { - data[i] = 0x50 - i++ - i = encodeVarintIssue42(data, i, uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrderedFields) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrderedFields) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.B != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Issue42(data, i, uint64(*m.B)) - } - if m.A != nil { - data[i] = 0x50 - i++ - i = encodeVarintIssue42(data, i, uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Issue42(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Issue42(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIssue42(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { - this := &UnorderedFields{} - if r.Intn(10) != 0 { - v1 := uint64(uint64(r.Uint32())) - this.B = &v1 - } - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.A = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) - } - return this -} - -func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { - this := &OrderedFields{} - if r.Intn(10) != 0 { - v3 := uint64(uint64(r.Uint32())) - this.B = &v3 - } - if r.Intn(10) != 0 { - v4 := int64(r.Int63()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.A = &v4 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) - } - return this -} - -type randyIssue42 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIssue42(r randyIssue42) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringIssue42(r randyIssue42) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneIssue42(r) - } - return string(tmps) -} -func randUnrecognizedIssue42(r randyIssue42, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldIssue42(data, r, fieldNumber, wire) - } - return data -} -func randFieldIssue42(data []byte, r randyIssue42, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateIssue42(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateIssue42(data, uint64(v6)) - case 1: - data = encodeVarintPopulateIssue42(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateIssue42(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateIssue42(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateIssue42(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateIssue42(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *UnorderedFields) Size() (n int) { - var l int - _ = l - if m.B != nil { - n += 9 - } - if m.A != nil { - n += 1 + sovIssue42(uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrderedFields) Size() (n int) { - var l int - _ = l - if m.B != nil { - n += 9 - } - if m.A != nil { - n += 1 + sovIssue42(uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovIssue42(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue42(x uint64) (n int) { - return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UnorderedFields) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnorderedFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.B = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.A = &v - default: - iNdEx = preIndex - skippy, err := skipIssue42(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrderedFields) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrderedFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.B = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.A = &v - default: - iNdEx = preIndex - skippy, err := skipIssue42(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue42(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthIssue42 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIssue42(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.proto deleted file mode 100644 index abaf4a63a2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/issue42.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package issue42; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.sizer_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; - -message UnorderedFields { - optional int64 A = 10; - optional fixed64 B = 1; -} - -message OrderedFields { - optional fixed64 B = 1; - optional int64 A = 10; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/order_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/order_test.go deleted file mode 100644 index 04f9251b44..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue42order/order_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package issue42 - -import ( - "bytes" - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - time "time" -) - -func TestIssue42Order(t *testing.T) { - unordered := NewPopulatedUnorderedFields(math_rand.New(math_rand.NewSource(time.Now().UnixNano())), false) - udata, err := proto.Marshal(unordered) - if err != nil { - t.Fatal(err) - } - ordered := &OrderedFields{} - if err := proto.Unmarshal(udata, ordered); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(ordered) - if err != nil { - t.Fatal(err) - } - if !bytes.Equal(udata, data) { - t.Fatalf("expected data to be marshaled in the same order, please sort fields before marshaling") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/Makefile deleted file mode 100644 index e6a2cc3c9f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.pb.go deleted file mode 100644 index 31ecdb5df7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.pb.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo -*/ -package proto - -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Foo struct { - Bar *uint64 `protobuf:"varint,1,req,name=bar" json:"bar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Foo) Reset() { *m = Foo{} } -func (m *Foo) String() string { return proto1.CompactTextString(m) } -func (*Foo) ProtoMessage() {} - -func (m *Foo) GetBar() uint64 { - if m != nil && m.Bar != nil { - return *m.Bar - } - return 0 -} - -func init() { - proto1.RegisterType((*Foo)(nil), "proto.Foo") -} -func (this *Foo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bar != nil && that1.Bar != nil { - if *this.Bar != *that1.Bar { - return false - } - } else if this.Bar != nil { - return false - } else if that1.Bar != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedFoo(r randyProto, easy bool) *Foo { - this := &Foo{} - v1 := uint64(uint64(r.Uint32())) - this.Bar = &v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedProto(r, 2) - } - return this -} - -type randyProto interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneProto(r randyProto) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringProto(r randyProto) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneProto(r) - } - return string(tmps) -} -func randUnrecognizedProto(r randyProto, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldProto(data, r, fieldNumber, wire) - } - return data -} -func randFieldProto(data []byte, r randyProto, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateProto(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateProto(data, uint64(v3)) - case 1: - data = encodeVarintPopulateProto(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateProto(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateProto(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateProto(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateProto(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Foo) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Foo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bar = &v - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipProto(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.proto deleted file mode 100644 index 61d23946ba..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/proto.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto2"; - -package proto; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; - -message Foo { - required uint64 bar = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/protopb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/protopb_test.go deleted file mode 100644 index fd9207b394..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/issue8/protopb_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo -*/ -package proto - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFooProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFooProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFooProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/Makefile deleted file mode 100644 index 96f71ef189..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - cp header.proto mapsproto2.proto - cat ../theproto3/maps.proto >> mapsproto2.proto - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. mapsproto2.proto \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go deleted file mode 100644 index 33aee3c95a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go +++ /dev/null @@ -1,5051 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/both/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(*m.F))) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.F = &v2 - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.proto deleted file mode 100644 index d9457a061d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go deleted file mode 100644 index f98394b228..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/both/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go deleted file mode 100644 index 82540c3d35..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go +++ /dev/null @@ -1,3209 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(*m.F))) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto deleted file mode 100644 index ef160d90b7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go deleted file mode 100644 index 859636bbc2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go deleted file mode 100644 index cc96aece3e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go +++ /dev/null @@ -1,2847 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/neither/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/neither/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.proto deleted file mode 100644 index 3de81b0c53..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go deleted file mode 100644 index 3689d61946..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/neither/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go deleted file mode 100644 index 5ae0f12954..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,4689 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.F = &v2 - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto deleted file mode 100644 index a96a89711f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go deleted file mode 100644 index fc2dcab059..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go deleted file mode 100644 index 2b6077ce0f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go +++ /dev/null @@ -1,5045 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.F - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.F = &v - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto deleted file mode 100644 index 808804de51..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go deleted file mode 100644 index 00c0e131ac..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go deleted file mode 100644 index 082e69d944..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,3211 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.F - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v.Size())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto deleted file mode 100644 index a7ef7fac0d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go deleted file mode 100644 index 0176d59b47..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go deleted file mode 100644 index 0a60e359df..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,4682 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -func (x MapEnum) Enum() *MapEnum { - p := new(MapEnum) - *p = x - return p -} -func (x MapEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MapEnum_name, int32(x)) -} -func (x *MapEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") - if err != nil { - return err - } - *x = MapEnum(value) - return nil -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/mapsproto2.proto"), - Package: func(v string) *string { return &v }("proto2.maps"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) - } - } else if this.F != nil { - return fmt.Errorf("this.F == nil && that.F != nil") - } else if that1.F != nil { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&proto2_maps.FloatingPoint{") - if this.F != nil { - s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -type randyMapsproto2 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMapsproto2(r randyMapsproto2) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMapsproto2(r randyMapsproto2) string { - v34 := r.Intn(100) - tmps := make([]rune, v34) - for i := 0; i < v34; i++ { - tmps[i] = randUTF8RuneMapsproto2(r) - } - return string(tmps) -} -func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMapsproto2(data, r, fieldNumber, wire) - } - return data -} -func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - v35 := r.Int63() - if r.Intn(2) == 0 { - v35 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v35)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMapsproto2(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMapsproto2(x uint64) (n int) { - return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + valueToStringMapsproto2(this.F) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMapsproto2(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.F = &v - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto deleted file mode 100644 index 2a99f0e1eb..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go deleted file mode 100644 index 554caefd05..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/doc.go deleted file mode 100644 index 4276bac39f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/doc.go +++ /dev/null @@ -1 +0,0 @@ -package mapsproto2 diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/header.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/header.proto deleted file mode 100644 index dbdc990e09..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/header.proto +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/mapsproto2.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/mapsproto2.proto deleted file mode 100644 index 3de81b0c53..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mapsproto2/mapsproto2.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package proto2.maps; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshal.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshal.txt deleted file mode 100644 index b35291ce9a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshal.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 1000000 1912 ns/op 194.48 MB/s -BenchmarkNinOptNativeProtoMarshal-4 1000000 2207 ns/op 154.04 MB/s -BenchmarkNidRepNativeProtoMarshal-4 50000 36321 ns/op 195.12 MB/s -BenchmarkNinRepNativeProtoMarshal-4 50000 36979 ns/op 191.65 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 50000 29607 ns/op 115.41 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 50000 29781 ns/op 114.73 MB/s -BenchmarkNidOptStructProtoMarshal-4 500000 6986 ns/op 201.40 MB/s -BenchmarkNinOptStructProtoMarshal-4 500000 7044 ns/op 180.14 MB/s -BenchmarkNidRepStructProtoMarshal-4 50000 40141 ns/op 219.87 MB/s -BenchmarkNinRepStructProtoMarshal-4 50000 40930 ns/op 215.63 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 500000 4595 ns/op 163.62 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 500000 4502 ns/op 158.37 MB/s -BenchmarkNidNestedStructProtoMarshal-4 10000 171850 ns/op 215.28 MB/s -BenchmarkNinNestedStructProtoMarshal-4 10000 150174 ns/op 246.19 MB/s -BenchmarkNidOptCustomProtoMarshal-4 1000000 1867 ns/op 38.02 MB/s -BenchmarkNinOptCustomProtoMarshal-4 1000000 1799 ns/op 37.24 MB/s -BenchmarkNidRepCustomProtoMarshal-4 500000 4120 ns/op 43.93 MB/s -BenchmarkNinRepCustomProtoMarshal-4 500000 4059 ns/op 44.58 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 1000000 1316 ns/op 23.54 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 1000000 1945 ns/op 57.06 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 1000000 2861 ns/op 84.22 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 1000000 2490 ns/op 52.60 MB/s -BenchmarkTreeProtoMarshal-4 1000000 2293 ns/op 109.89 MB/s -BenchmarkOrBranchProtoMarshal-4 500000 4401 ns/op 124.74 MB/s -BenchmarkAndBranchProtoMarshal-4 500000 4394 ns/op 124.93 MB/s -BenchmarkLeafProtoMarshal-4 1000000 1696 ns/op 142.68 MB/s -BenchmarkDeepTreeProtoMarshal-4 500000 3740 ns/op 79.40 MB/s -BenchmarkADeepBranchProtoMarshal-4 500000 4677 ns/op 71.41 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 500000 6597 ns/op 96.25 MB/s -BenchmarkDeepLeafProtoMarshal-4 500000 3179 ns/op 91.21 MB/s -BenchmarkNilProtoMarshal-4 1000000 1326 ns/op 26.39 MB/s -BenchmarkNidOptEnumProtoMarshal-4 1000000 1360 ns/op 27.20 MB/s -BenchmarkNinOptEnumProtoMarshal-4 1000000 1360 ns/op 26.46 MB/s -BenchmarkNidRepEnumProtoMarshal-4 1000000 1314 ns/op 32.72 MB/s -BenchmarkNinRepEnumProtoMarshal-4 1000000 1311 ns/op 32.78 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 1000000 1349 ns/op 26.67 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 1000000 1369 ns/op 26.29 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 1000000 1341 ns/op 26.84 MB/s -BenchmarkTimerProtoMarshal-4 1000000 1604 ns/op 65.45 MB/s -BenchmarkMyExtendableProtoMarshal-4 1000000 1545 ns/op 51.75 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 2704 ns/op 58.04 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 500000 4177 ns/op 108.92 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 1000000 2473 ns/op 95.43 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 1000000 1616 ns/op 131.14 MB/s -BenchmarkNestedScopeProtoMarshal-4 500000 4058 ns/op 110.14 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 500000 2863 ns/op 118.72 MB/s -BenchmarkCustomContainerProtoMarshal-4 1000000 2289 ns/op 47.17 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 152.674s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshaler.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshaler.txt deleted file mode 100644 index 08a35975d4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/marshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 5000000 558 ns/op 665.90 MB/s -BenchmarkNinOptNativeProtoMarshal-4 5000000 632 ns/op 537.89 MB/s -BenchmarkNidRepNativeProtoMarshal-4 200000 9070 ns/op 781.29 MB/s -BenchmarkNinRepNativeProtoMarshal-4 200000 8943 ns/op 792.42 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 200000 8142 ns/op 419.65 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 200000 8114 ns/op 421.11 MB/s -BenchmarkNidOptStructProtoMarshal-4 1000000 2018 ns/op 697.03 MB/s -BenchmarkNinOptStructProtoMarshal-4 1000000 1919 ns/op 661.19 MB/s -BenchmarkNidRepStructProtoMarshal-4 100000 11442 ns/op 771.31 MB/s -BenchmarkNinRepStructProtoMarshal-4 200000 10742 ns/op 821.60 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1203 ns/op 624.73 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1135 ns/op 627.68 MB/s -BenchmarkNidNestedStructProtoMarshal-4 50000 56182 ns/op 658.50 MB/s -BenchmarkNinNestedStructProtoMarshal-4 50000 49802 ns/op 742.37 MB/s -BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 233.89 MB/s -BenchmarkNinOptCustomProtoMarshal-4 10000000 280 ns/op 238.94 MB/s -BenchmarkNidRepCustomProtoMarshal-4 5000000 604 ns/op 299.21 MB/s -BenchmarkNinRepCustomProtoMarshal-4 5000000 599 ns/op 301.77 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 196 ns/op 158.04 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 5000000 384 ns/op 288.81 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 662 ns/op 363.93 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 502 ns/op 260.48 MB/s -BenchmarkTreeProtoMarshal-4 5000000 558 ns/op 451.53 MB/s -BenchmarkOrBranchProtoMarshal-4 2000000 992 ns/op 553.08 MB/s -BenchmarkAndBranchProtoMarshal-4 2000000 998 ns/op 550.04 MB/s -BenchmarkLeafProtoMarshal-4 5000000 523 ns/op 462.20 MB/s -BenchmarkDeepTreeProtoMarshal-4 5000000 691 ns/op 429.41 MB/s -BenchmarkADeepBranchProtoMarshal-4 2000000 787 ns/op 424.31 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 1000000 1329 ns/op 477.67 MB/s -BenchmarkDeepLeafProtoMarshal-4 5000000 639 ns/op 453.35 MB/s -BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.92 MB/s -BenchmarkNidOptEnumProtoMarshal-4 10000000 216 ns/op 170.86 MB/s -BenchmarkNinOptEnumProtoMarshal-4 10000000 209 ns/op 171.60 MB/s -BenchmarkNidRepEnumProtoMarshal-4 10000000 237 ns/op 180.80 MB/s -BenchmarkNinRepEnumProtoMarshal-4 10000000 235 ns/op 182.93 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.51 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 211 ns/op 170.44 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 214 ns/op 167.95 MB/s -BenchmarkTimerProtoMarshal-4 5000000 344 ns/op 305.21 MB/s -BenchmarkMyExtendableProtoMarshal-4 5000000 695 ns/op 115.09 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 1295 ns/op 121.15 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 2000000 906 ns/op 501.69 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 537 ns/op 438.85 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 479 ns/op 442.52 MB/s -BenchmarkNestedScopeProtoMarshal-4 2000000 862 ns/op 518.19 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 2000000 758 ns/op 448.10 MB/s -BenchmarkCustomContainerProtoMarshal-4 5000000 390 ns/op 276.58 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 190.796s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/mixbench.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/mixbench.go deleted file mode 100644 index 32aed64230..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/mixbench.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "fmt" - "io/ioutil" - "os" - "os/exec" - "strings" -) - -type MixMatch struct { - Old []string - New []string -} - -func (this *MixMatch) Regenerate() { - fmt.Printf("mixbench\n") - uuidData, err := ioutil.ReadFile("../uuid.go") - if err != nil { - panic(err) - } - if err := ioutil.WriteFile("./testdata/uuid.go", uuidData, 0666); err != nil { - panic(err) - } - data, err := ioutil.ReadFile("../thetest.proto") - if err != nil { - panic(err) - } - content := string(data) - for i, old := range this.Old { - content = strings.Replace(content, old, this.New[i], -1) - } - if err := ioutil.WriteFile("./testdata/thetest.proto", []byte(content), 0666); err != nil { - panic(err) - } - var regenerate = exec.Command("protoc", "--gogo_out=.", "-I=../../:../../protobuf/:../../../../../:.", "./testdata/thetest.proto") - fmt.Printf("regenerating\n") - out, err := regenerate.CombinedOutput() - fmt.Printf("regenerate output: %v\n", string(out)) - if err != nil { - panic(err) - } -} - -func (this *MixMatch) Bench(rgx string, outFileName string) { - if err := os.MkdirAll("./testdata", 0777); err != nil { - panic(err) - } - this.Regenerate() - var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, "./testdata/") - fmt.Printf("benching\n") - out, err := test.CombinedOutput() - fmt.Printf("bench output: %v\n", string(out)) - if err != nil { - panic(err) - } - if err := ioutil.WriteFile(outFileName, out, 0666); err != nil { - panic(err) - } - if err := os.RemoveAll("./testdata"); err != nil { - panic(err) - } -} - -func NewMixMatch(marshaler, unmarshaler, unsafe_marshaler, unsafe_unmarshaler bool) *MixMatch { - mm := &MixMatch{} - if marshaler { - mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.marshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.marshaler_all) = false;") - } - if unmarshaler { - mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = false;") - } - if unsafe_marshaler { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = false;") - } - if unsafe_unmarshaler { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = false;") - } - return mm -} - -func main() { - NewMixMatch(true, true, false, false).Bench("ProtoMarshal", "marshaler.txt") - NewMixMatch(false, false, false, false).Bench("ProtoMarshal", "marshal.txt") - NewMixMatch(false, false, true, true).Bench("ProtoMarshal", "unsafe_marshaler.txt") - NewMixMatch(true, true, false, false).Bench("ProtoUnmarshal", "unmarshaler.txt") - NewMixMatch(false, false, false, false).Bench("ProtoUnmarshal", "unmarshal.txt") - NewMixMatch(false, false, true, true).Bench("ProtoUnmarshal", "unsafe_unmarshaler.txt") - fmt.Println("Running benchcmp will show the performance difference between using reflect and generated code for marshalling and unmarshalling of protocol buffers") - fmt.Println("$GOROOT/misc/benchcmp marshal.txt marshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unmarshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp marshal.txt unsafe_marshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unsafe_unmarshaler.txt") -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshal.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshal.txt deleted file mode 100644 index 2b958fd93d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshal.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 1000000 2006 ns/op 185.44 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1960 ns/op 173.41 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 50000 36241 ns/op 195.55 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 50000 35648 ns/op 198.80 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 18641 ns/op 183.30 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 18398 ns/op 185.72 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 500000 5938 ns/op 236.92 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 5871 ns/op 216.14 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 50000 46237 ns/op 190.88 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 50000 39915 ns/op 221.12 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 500000 3946 ns/op 190.56 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 500000 3997 ns/op 178.35 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 207132 ns/op 178.61 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 170116 ns/op 217.33 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 1000000 2321 ns/op 30.58 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 1000000 1947 ns/op 34.40 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 200000 7884 ns/op 22.96 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 200000 7926 ns/op 22.83 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 1000000 1242 ns/op 24.94 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 1000000 1550 ns/op 71.58 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 1000000 2209 ns/op 109.07 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 1000000 1954 ns/op 67.02 MB/s -BenchmarkTreeProtoUnmarshal-4 1000000 1785 ns/op 141.12 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 2769 ns/op 198.23 MB/s -BenchmarkAndBranchProtoUnmarshal-4 500000 2680 ns/op 204.84 MB/s -BenchmarkLeafProtoUnmarshal-4 1000000 1407 ns/op 171.92 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 2387 ns/op 124.40 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 2621 ns/op 127.39 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 500000 3853 ns/op 164.79 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 2027 ns/op 143.02 MB/s -BenchmarkNilProtoUnmarshal-4 1000000 1472 ns/op 23.78 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 1000000 1597 ns/op 23.16 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 1000000 1557 ns/op 23.12 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 1000000 1746 ns/op 24.62 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 1000000 1779 ns/op 24.16 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 1000000 1607 ns/op 22.39 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 1000000 1545 ns/op 23.29 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 1000000 1578 ns/op 22.81 MB/s -BenchmarkTimerProtoUnmarshal-4 1000000 1572 ns/op 66.79 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 2610 ns/op 30.64 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 500000 3792 ns/op 41.40 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 500000 2987 ns/op 152.29 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1898 ns/op 124.30 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 1000000 1326 ns/op 159.87 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 2956 ns/op 151.20 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 2244 ns/op 151.45 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 1000000 2652 ns/op 40.71 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 167.715s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshaler.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshaler.txt deleted file mode 100644 index 9c78ef06a2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unmarshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 2000000 792 ns/op 469.35 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1167 ns/op 291.16 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 100000 25302 ns/op 280.09 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 100000 25069 ns/op 282.70 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 16569 ns/op 206.22 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 16323 ns/op 209.33 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 1000000 3107 ns/op 452.75 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 3262 ns/op 388.98 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 100000 26090 ns/op 338.28 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 100000 26086 ns/op 338.34 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1785 ns/op 421.14 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1838 ns/op 387.83 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 119933 ns/op 308.47 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 106914 ns/op 345.81 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 5000000 485 ns/op 146.36 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 5000000 648 ns/op 103.26 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1743 ns/op 103.83 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1766 ns/op 102.44 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 187 ns/op 165.31 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 519 ns/op 213.49 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 971 ns/op 247.99 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 801 ns/op 163.54 MB/s -BenchmarkTreeProtoUnmarshal-4 2000000 789 ns/op 319.14 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.47 MB/s -BenchmarkAndBranchProtoUnmarshal-4 1000000 1552 ns/op 353.60 MB/s -BenchmarkLeafProtoUnmarshal-4 5000000 654 ns/op 369.63 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 1219 ns/op 243.63 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 1504 ns/op 222.02 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.88 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 1083 ns/op 267.74 MB/s -BenchmarkNilProtoUnmarshal-4 5000000 401 ns/op 87.26 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 5000000 412 ns/op 89.66 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 5000000 451 ns/op 79.80 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 5000000 670 ns/op 64.12 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.40 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 450 ns/op 79.88 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.15 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 448 ns/op 80.24 MB/s -BenchmarkTimerProtoUnmarshal-4 5000000 575 ns/op 182.50 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 1450 ns/op 55.14 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2567 ns/op 61.15 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1889 ns/op 240.85 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1080 ns/op 218.42 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 693 ns/op 305.86 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 1843 ns/op 242.49 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1342 ns/op 253.25 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 2000000 831 ns/op 129.82 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 170.829s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_marshaler.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_marshaler.txt deleted file mode 100644 index 8cbf22f4fc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_marshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 5000000 531 ns/op 700.19 MB/s -BenchmarkNinOptNativeProtoMarshal-4 5000000 594 ns/op 572.27 MB/s -BenchmarkNidRepNativeProtoMarshal-4 200000 8087 ns/op 876.29 MB/s -BenchmarkNinRepNativeProtoMarshal-4 500000 8344 ns/op 849.34 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 200000 7595 ns/op 449.89 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 500000 7342 ns/op 465.38 MB/s -BenchmarkNidOptStructProtoMarshal-4 1000000 1928 ns/op 729.46 MB/s -BenchmarkNinOptStructProtoMarshal-4 1000000 1859 ns/op 682.32 MB/s -BenchmarkNidRepStructProtoMarshal-4 100000 10993 ns/op 802.82 MB/s -BenchmarkNinRepStructProtoMarshal-4 200000 10088 ns/op 874.84 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1179 ns/op 637.53 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1077 ns/op 661.58 MB/s -BenchmarkNidNestedStructProtoMarshal-4 50000 53464 ns/op 691.97 MB/s -BenchmarkNinNestedStructProtoMarshal-4 50000 47677 ns/op 775.46 MB/s -BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 234.13 MB/s -BenchmarkNinOptCustomProtoMarshal-4 10000000 284 ns/op 235.56 MB/s -BenchmarkNidRepCustomProtoMarshal-4 5000000 598 ns/op 302.19 MB/s -BenchmarkNinRepCustomProtoMarshal-4 5000000 593 ns/op 304.87 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 190 ns/op 162.47 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 5000000 374 ns/op 296.15 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 652 ns/op 369.55 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 474 ns/op 275.97 MB/s -BenchmarkTreeProtoMarshal-4 5000000 567 ns/op 444.16 MB/s -BenchmarkOrBranchProtoMarshal-4 1000000 1007 ns/op 544.72 MB/s -BenchmarkAndBranchProtoMarshal-4 1000000 1061 ns/op 517.27 MB/s -BenchmarkLeafProtoMarshal-4 5000000 511 ns/op 473.41 MB/s -BenchmarkDeepTreeProtoMarshal-4 5000000 716 ns/op 414.59 MB/s -BenchmarkADeepBranchProtoMarshal-4 2000000 811 ns/op 411.60 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 1000000 1324 ns/op 479.34 MB/s -BenchmarkDeepLeafProtoMarshal-4 5000000 636 ns/op 455.66 MB/s -BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.91 MB/s -BenchmarkNidOptEnumProtoMarshal-4 10000000 211 ns/op 174.55 MB/s -BenchmarkNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.24 MB/s -BenchmarkNidRepEnumProtoMarshal-4 10000000 231 ns/op 185.80 MB/s -BenchmarkNinRepEnumProtoMarshal-4 10000000 230 ns/op 186.79 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 208 ns/op 172.65 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.15 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.99 MB/s -BenchmarkTimerProtoMarshal-4 5000000 320 ns/op 327.65 MB/s -BenchmarkMyExtendableProtoMarshal-4 5000000 702 ns/op 113.85 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 1329 ns/op 118.07 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 2000000 904 ns/op 502.96 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 542 ns/op 434.70 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 465 ns/op 455.00 MB/s -BenchmarkNestedScopeProtoMarshal-4 2000000 857 ns/op 521.49 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 5000000 734 ns/op 462.95 MB/s -BenchmarkCustomContainerProtoMarshal-4 5000000 378 ns/op 285.67 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 192.235s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_unmarshaler.txt b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_unmarshaler.txt deleted file mode 100644 index 9a85e9361b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/mixbench/unsafe_unmarshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 2000000 760 ns/op 488.86 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1130 ns/op 300.67 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 100000 23698 ns/op 299.05 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 100000 23400 ns/op 302.86 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 15286 ns/op 223.53 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 15375 ns/op 222.23 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 1000000 3019 ns/op 466.02 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 3169 ns/op 400.35 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 100000 25167 ns/op 350.69 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 100000 25199 ns/op 350.25 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1714 ns/op 438.65 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1793 ns/op 397.49 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 115531 ns/op 320.22 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 109260 ns/op 338.39 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 5000000 487 ns/op 145.63 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 5000000 644 ns/op 103.94 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1733 ns/op 104.42 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1734 ns/op 104.34 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 186 ns/op 166.02 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 512 ns/op 216.66 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 954 ns/op 252.56 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 788 ns/op 166.15 MB/s -BenchmarkTreeProtoUnmarshal-4 2000000 790 ns/op 318.98 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.43 MB/s -BenchmarkAndBranchProtoUnmarshal-4 1000000 1554 ns/op 353.09 MB/s -BenchmarkLeafProtoUnmarshal-4 5000000 642 ns/op 376.78 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 1236 ns/op 240.13 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 1493 ns/op 223.62 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.81 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 1068 ns/op 271.46 MB/s -BenchmarkNilProtoUnmarshal-4 5000000 396 ns/op 88.30 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 5000000 410 ns/op 90.10 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 5000000 448 ns/op 80.25 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 5000000 672 ns/op 63.91 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.38 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 446 ns/op 80.63 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.09 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 449 ns/op 80.08 MB/s -BenchmarkTimerProtoUnmarshal-4 5000000 554 ns/op 189.24 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 1445 ns/op 55.36 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2544 ns/op 61.70 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1847 ns/op 246.34 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1071 ns/op 220.23 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 688 ns/op 308.09 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 1803 ns/op 247.86 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1330 ns/op 255.61 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 2000000 803 ns/op 134.48 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 168.327s diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/Makefile deleted file mode 100644 index c7bd303232..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. md.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.pb.go deleted file mode 100644 index fe38b69806..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.pb.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: md.proto -// DO NOT EDIT! - -/* - Package moredefaults is a generated protocol buffer package. - - It is generated from these files: - md.proto - - It has these top-level messages: - MoreDefaultsB - MoreDefaultsA -*/ -package moredefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/example" - -import bytes "bytes" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MoreDefaultsB struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreDefaultsB) Reset() { *m = MoreDefaultsB{} } -func (m *MoreDefaultsB) String() string { return proto.CompactTextString(m) } -func (*MoreDefaultsB) ProtoMessage() {} - -func (m *MoreDefaultsB) GetField1() string { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return "" -} - -type MoreDefaultsA struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,def=1234" json:"Field1,omitempty"` - Field2 int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2"` - B1 *MoreDefaultsB `protobuf:"bytes,3,opt,name=B1" json:"B1,omitempty"` - B2 MoreDefaultsB `protobuf:"bytes,4,opt,name=B2" json:"B2"` - A1 *test.A `protobuf:"bytes,5,opt,name=A1" json:"A1,omitempty"` - A2 test.A `protobuf:"bytes,6,opt,name=A2" json:"A2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreDefaultsA) Reset() { *m = MoreDefaultsA{} } -func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) } -func (*MoreDefaultsA) ProtoMessage() {} - -const Default_MoreDefaultsA_Field1 int64 = 1234 - -func (m *MoreDefaultsA) GetField1() int64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_MoreDefaultsA_Field1 -} - -func (m *MoreDefaultsA) GetField2() int64 { - if m != nil { - return m.Field2 - } - return 0 -} - -func (m *MoreDefaultsA) GetB1() *MoreDefaultsB { - if m != nil { - return m.B1 - } - return nil -} - -func (m *MoreDefaultsA) GetB2() MoreDefaultsB { - if m != nil { - return m.B2 - } - return MoreDefaultsB{} -} - -func (m *MoreDefaultsA) GetA1() *test.A { - if m != nil { - return m.A1 - } - return nil -} - -func (m *MoreDefaultsA) GetA2() test.A { - if m != nil { - return m.A2 - } - return test.A{} -} - -func init() { - proto.RegisterType((*MoreDefaultsB)(nil), "moredefaults.MoreDefaultsB") - proto.RegisterType((*MoreDefaultsA)(nil), "moredefaults.MoreDefaultsA") -} -func (this *MoreDefaultsB) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MoreDefaultsB) - if !ok { - that2, ok := that.(MoreDefaultsB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MoreDefaultsA) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MoreDefaultsA) - if !ok { - that2, ok := that.(MoreDefaultsA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.B1.Equal(that1.B1) { - return false - } - if !this.B2.Equal(&that1.B2) { - return false - } - if !this.A1.Equal(that1.A1) { - return false - } - if !this.A2.Equal(&that1.A2) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedMoreDefaultsB(r randyMd, easy bool) *MoreDefaultsB { - this := &MoreDefaultsB{} - if r.Intn(10) != 0 { - v1 := randStringMd(r) - this.Field1 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMd(r, 2) - } - return this -} - -func NewPopulatedMoreDefaultsA(r randyMd, easy bool) *MoreDefaultsA { - this := &MoreDefaultsA{} - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - this.Field2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - if r.Intn(10) != 0 { - this.B1 = NewPopulatedMoreDefaultsB(r, easy) - } - v3 := NewPopulatedMoreDefaultsB(r, easy) - this.B2 = *v3 - if r.Intn(10) != 0 { - this.A1 = test.NewPopulatedA(r, easy) - } - v4 := test.NewPopulatedA(r, easy) - this.A2 = *v4 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMd(r, 7) - } - return this -} - -type randyMd interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMd(r randyMd) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMd(r randyMd) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneMd(r) - } - return string(tmps) -} -func randUnrecognizedMd(r randyMd, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMd(data, r, fieldNumber, wire) - } - return data -} -func randFieldMd(data []byte, r randyMd, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMd(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateMd(data, uint64(v6)) - case 1: - data = encodeVarintPopulateMd(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMd(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMd(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMd(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMd(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.proto deleted file mode 100644 index 55a0d18804..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package moredefaults; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/gogo/protobuf/test/example/example.proto"; - -option (gogoproto.goproto_getters_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; - -message MoreDefaultsB { - optional string Field1 = 1; -} - -message MoreDefaultsA { - optional int64 Field1 = 1 [default=1234]; - optional int64 Field2 = 2 [(gogoproto.nullable) = false]; - optional MoreDefaultsB B1 = 3; - optional MoreDefaultsB B2 = 4 [(gogoproto.nullable) = false]; - optional test.A A1 = 5; - optional test.A A2 = 6 [(gogoproto.nullable) = false]; -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md_test.go deleted file mode 100644 index 7b7a08ed39..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/md_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package moredefaults - -import ( - "testing" - - test "github.com/gogo/protobuf/test/example" -) - -func TestDefaults(t *testing.T) { - b := MoreDefaultsB{} - aa := test.A{} - a := &MoreDefaultsA{} - b2 := a.GetB2() - a2 := a.GetA2() - if a.GetField1() != 1234 { - t.Fatalf("Field1 wrong") - } - if a.GetField2() != 0 { - t.Fatalf("Field2 wrong") - } - if a.GetB1() != nil { - t.Fatalf("B1 wrong") - } - if b2.GetField1() != b.GetField1() { - t.Fatalf("B2 wrong") - } - if a.GetA1() != nil { - t.Fatalf("A1 wrong") - } - if a2.GetNumber() != aa.GetNumber() { - t.Fatalf("A2 wrong") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/mdpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/mdpb_test.go deleted file mode 100644 index 85fe264056..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/moredefaults/mdpb_test.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: md.proto -// DO NOT EDIT! - -/* -Package moredefaults is a generated protocol buffer package. - -It is generated from these files: - md.proto - -It has these top-level messages: - MoreDefaultsB - MoreDefaultsA -*/ -package moredefaults - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/example" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMoreDefaultsBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMoreDefaultsAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMoreDefaultsBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/Makefile deleted file mode 100644 index b73c7581b1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="2.6.0" --proto_path=../../../../../:../../protobuf/:. one.proto \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.pb.go deleted file mode 100644 index 0582684fb7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.pb.go +++ /dev/null @@ -1,6302 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/both/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.proto deleted file mode 100644 index 9f36cf7222..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/onepb_test.go deleted file mode 100644 index 562e89e48c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/both/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/both/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.pb.go deleted file mode 100644 index e29dbdd71d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.pb.go +++ /dev/null @@ -1,5387 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.proto deleted file mode 100644 index 30e171ade2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/onepb_test.go deleted file mode 100644 index eac19ae2ae..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.pb.go deleted file mode 100644 index 64073781e9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.pb.go +++ /dev/null @@ -1,5007 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/neither/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.proto deleted file mode 100644 index 0c88ac86a0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/onepb_test.go deleted file mode 100644 index fdbacc0764..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/neither/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.pb.go deleted file mode 100644 index 872034872c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,5922 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.proto deleted file mode 100644 index aa2637f50b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/onepb_test.go deleted file mode 100644 index fd53b248e0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.pb.go deleted file mode 100644 index dac856c25d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.pb.go +++ /dev/null @@ -1,6272 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.One = &TwoOneofs_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.One = &TwoOneofs_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.proto deleted file mode 100644 index 9d6230ad65..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/onepb_test.go deleted file mode 100644 index 469b47d654..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeboth/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.pb.go deleted file mode 100644 index 8449c43ce8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.pb.go +++ /dev/null @@ -1,5397 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.proto deleted file mode 100644 index 66b1233b13..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go deleted file mode 100644 index ca2ff28749..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go deleted file mode 100644 index d8917fe907..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go +++ /dev/null @@ -1,5883 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type AllTypesOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *AllTypesOneOf_Field1 - // *AllTypesOneOf_Field2 - // *AllTypesOneOf_Field3 - // *AllTypesOneOf_Field4 - // *AllTypesOneOf_Field5 - // *AllTypesOneOf_Field6 - // *AllTypesOneOf_Field7 - // *AllTypesOneOf_Field8 - // *AllTypesOneOf_Field9 - // *AllTypesOneOf_Field10 - // *AllTypesOneOf_Field11 - // *AllTypesOneOf_Field12 - // *AllTypesOneOf_Field13 - // *AllTypesOneOf_Field14 - // *AllTypesOneOf_Field15 - // *AllTypesOneOf_SubMessage - TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } -func (*AllTypesOneOf) ProtoMessage() {} - -type isAllTypesOneOf_TestOneof interface { - isAllTypesOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type AllTypesOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` -} -type AllTypesOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} -func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} - -func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *AllTypesOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *AllTypesOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *AllTypesOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *AllTypesOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *AllTypesOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *AllTypesOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *AllTypesOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *AllTypesOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *AllTypesOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *AllTypesOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *AllTypesOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *AllTypesOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *AllTypesOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *AllTypesOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *AllTypesOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *AllTypesOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, []interface{}{ - (*AllTypesOneOf_Field1)(nil), - (*AllTypesOneOf_Field2)(nil), - (*AllTypesOneOf_Field3)(nil), - (*AllTypesOneOf_Field4)(nil), - (*AllTypesOneOf_Field5)(nil), - (*AllTypesOneOf_Field6)(nil), - (*AllTypesOneOf_Field7)(nil), - (*AllTypesOneOf_Field8)(nil), - (*AllTypesOneOf_Field9)(nil), - (*AllTypesOneOf_Field10)(nil), - (*AllTypesOneOf_Field11)(nil), - (*AllTypesOneOf_Field12)(nil), - (*AllTypesOneOf_Field13)(nil), - (*AllTypesOneOf_Field14)(nil), - (*AllTypesOneOf_Field15)(nil), - (*AllTypesOneOf_SubMessage)(nil), - } -} - -func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *AllTypesOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *AllTypesOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *AllTypesOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *AllTypesOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *AllTypesOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *AllTypesOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *AllTypesOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *AllTypesOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *AllTypesOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *AllTypesOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *AllTypesOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AllTypesOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &AllTypesOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &AllTypesOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &AllTypesOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &AllTypesOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &AllTypesOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &AllTypesOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &AllTypesOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &AllTypesOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -type TwoOneofs struct { - // Types that are valid to be assigned to One: - // *TwoOneofs_Field1 - // *TwoOneofs_Field2 - // *TwoOneofs_Field3 - One isTwoOneofs_One `protobuf_oneof:"one"` - // Types that are valid to be assigned to Two: - // *TwoOneofs_Field34 - // *TwoOneofs_Field35 - // *TwoOneofs_SubMessage2 - Two isTwoOneofs_Two `protobuf_oneof:"two"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } -func (*TwoOneofs) ProtoMessage() {} - -type isTwoOneofs_One interface { - isTwoOneofs_One() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} -type isTwoOneofs_Two interface { - isTwoOneofs_Two() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type TwoOneofs_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` -} -type TwoOneofs_SubMessage2 struct { - SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,oneof"` -} - -func (*TwoOneofs_Field1) isTwoOneofs_One() {} -func (*TwoOneofs_Field2) isTwoOneofs_One() {} -func (*TwoOneofs_Field3) isTwoOneofs_One() {} -func (*TwoOneofs_Field34) isTwoOneofs_Two() {} -func (*TwoOneofs_Field35) isTwoOneofs_Two() {} -func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} - -func (m *TwoOneofs) GetOne() isTwoOneofs_One { - if m != nil { - return m.One - } - return nil -} -func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { - if m != nil { - return m.Two - } - return nil -} - -func (m *TwoOneofs) GetField1() float64 { - if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *TwoOneofs) GetField2() float32 { - if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *TwoOneofs) GetField3() int32 { - if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *TwoOneofs) GetField34() string { - if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { - return x.Field34 - } - return "" -} - -func (m *TwoOneofs) GetField35() []byte { - if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { - return x.Field35 - } - return nil -} - -func (m *TwoOneofs) GetSubMessage2() *Subby { - if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { - return x.SubMessage2 - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, []interface{}{ - (*TwoOneofs_Field1)(nil), - (*TwoOneofs_Field2)(nil), - (*TwoOneofs_Field3)(nil), - (*TwoOneofs_Field34)(nil), - (*TwoOneofs_Field35)(nil), - (*TwoOneofs_SubMessage2)(nil), - } -} - -func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *TwoOneofs_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *TwoOneofs_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case nil: - default: - return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field34) - case *TwoOneofs_Field35: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field35) - case *TwoOneofs_SubMessage2: - _ = b.EncodeVarint(36<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage2); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) - } - return nil -} - -func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TwoOneofs) - switch tag { - case 1: // one.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.One = &TwoOneofs_Field1{math.Float64frombits(x)} - return true, err - case 2: // one.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // one.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.One = &TwoOneofs_Field3{int32(x)} - return true, err - case 34: // two.Field34 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Two = &TwoOneofs_Field34{x} - return true, err - case 35: // two.Field35 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Two = &TwoOneofs_Field35{x} - return true, err - case 36: // two.sub_message2 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.Two = &TwoOneofs_SubMessage2{msg} - return true, err - default: - return false, nil - } -} - -type CustomOneof struct { - // Types that are valid to be assigned to Custom: - // *CustomOneof_Stringy - // *CustomOneof_CustomType - // *CustomOneof_CastType - // *CustomOneof_MyCustomName - Custom isCustomOneof_Custom `protobuf_oneof:"custom"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomOneof) Reset() { *m = CustomOneof{} } -func (*CustomOneof) ProtoMessage() {} - -type isCustomOneof_Custom interface { - isCustomOneof_Custom() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type CustomOneof_Stringy struct { - Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` -} -type CustomOneof_CastType struct { - CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` -} - -func (*CustomOneof_Stringy) isCustomOneof_Custom() {} -func (*CustomOneof_CustomType) isCustomOneof_Custom() {} -func (*CustomOneof_CastType) isCustomOneof_Custom() {} -func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} - -func (m *CustomOneof) GetCustom() isCustomOneof_Custom { - if m != nil { - return m.Custom - } - return nil -} - -func (m *CustomOneof) GetStringy() string { - if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { - return x.Stringy - } - return "" -} - -func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { - if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { - return x.CastType - } - return 0 -} - -func (m *CustomOneof) GetMyCustomName() int64 { - if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { - return x.MyCustomName - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, []interface{}{ - (*CustomOneof_Stringy)(nil), - (*CustomOneof_CustomType)(nil), - (*CustomOneof_CastType)(nil), - (*CustomOneof_MyCustomName)(nil), - } -} - -func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Stringy) - case *CustomOneof_CustomType: - _ = b.EncodeVarint(35<<3 | proto.WireBytes) - data, err := x.CustomType.Marshal() - if err != nil { - return err - } - _ = b.EncodeRawBytes(data) - case *CustomOneof_CastType: - _ = b.EncodeVarint(36<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - _ = b.EncodeVarint(37<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.MyCustomName)) - case nil: - default: - return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) - } - return nil -} - -func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CustomOneof) - switch tag { - case 34: // custom.Stringy - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Custom = &CustomOneof_Stringy{x} - return true, err - case 35: // custom.CustomType - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - var cc github_com_gogo_protobuf_test_custom.Uint128 - c := &cc - err = c.Unmarshal(x) - m.Custom = &CustomOneof_CustomType{*c} - return true, err - case 36: // custom.CastType - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} - return true, err - case 37: // custom.CustomName - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Custom = &CustomOneof_MyCustomName{int64(x)} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") - proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") - proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllTypesOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }, {Name: func(v string) *string { return &v }("TwoOneofs"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field34"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field35"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("sub_message2"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(1), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("one")}, {Name: func(v string) *string { return &v }("two")}}, - }, {Name: func(v string) *string { return &v }("CustomOneof"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Stringy"), - Number: func(v int32) *int32 { return &v }(34), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CustomType"), - Number: func(v int32) *int32 { return &v }(35), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }, {Name: func(v string) *string { return &v }("CastType"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65007: proto.NewExtension([]byte{0xfa, 0xde, 0x1f, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x79, 0x70, 0x65})}}, - }, {Name: func(v string) *string { return &v }("CustomName"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0xc, 0x4d, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65})}}, - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("custom")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) - } - } else if this.Sub != nil { - return fmt.Errorf("this.Sub == nil && that.Sub != nil") - } else if that1.Sub != nil { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.One = &TwoOneofs_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.One = &TwoOneofs_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.proto deleted file mode 100644 index cef2b7f2d5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go deleted file mode 100644 index 9ea42ecfbf..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/doc.go deleted file mode 100644 index b9f2ff1767..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/doc.go +++ /dev/null @@ -1 +0,0 @@ -package one diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/one.proto deleted file mode 100644 index 0c88ac86a0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof/one.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/Makefile deleted file mode 100644 index 70da5300ef..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. one.proto \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.pb.go deleted file mode 100644 index e89e932861..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.pb.go +++ /dev/null @@ -1,4086 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/both/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/both/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.proto deleted file mode 100644 index 5c91b6c72c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/onepb_test.go deleted file mode 100644 index f08f66feed..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/both/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/both/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.pb.go deleted file mode 100644 index f20a2ab038..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.pb.go +++ /dev/null @@ -1,3521 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/marshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(m.Field1))) - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(m.Field2))) - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.proto deleted file mode 100644 index e8f562ebdf..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/onepb_test.go deleted file mode 100644 index 3b3602c5ee..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.pb.go deleted file mode 100644 index bf3b3f4c16..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.pb.go +++ /dev/null @@ -1,3314 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/neither/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.proto deleted file mode 100644 index c3cdff7e5e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/onepb_test.go deleted file mode 100644 index 96aaadb947..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/neither/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.pb.go deleted file mode 100644 index d5b8ed19c8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,3879 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.proto deleted file mode 100644 index 87d6062402..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/onepb_test.go deleted file mode 100644 index 26c71b4ed5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.pb.go deleted file mode 100644 index d59af60656..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.pb.go +++ /dev/null @@ -1,4064 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.proto deleted file mode 100644 index 112cabc202..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/onepb_test.go deleted file mode 100644 index baf9b22bb7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeboth/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go deleted file mode 100644 index 4a5e7ab8f1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go +++ /dev/null @@ -1,3529 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.proto deleted file mode 100644 index 2cc1141812..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go deleted file mode 100644 index 34f6ec41f4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go deleted file mode 100644 index 634a24aa97..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go +++ /dev/null @@ -1,3850 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} - -type SampleOneOf struct { - // Types that are valid to be assigned to TestOneof: - // *SampleOneOf_Field1 - // *SampleOneOf_Field2 - // *SampleOneOf_Field3 - // *SampleOneOf_Field4 - // *SampleOneOf_Field5 - // *SampleOneOf_Field6 - // *SampleOneOf_Field7 - // *SampleOneOf_Field8 - // *SampleOneOf_Field9 - // *SampleOneOf_Field10 - // *SampleOneOf_Field11 - // *SampleOneOf_Field12 - // *SampleOneOf_Field13 - // *SampleOneOf_Field14 - // *SampleOneOf_Field15 - // *SampleOneOf_SubMessage - TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` -} - -func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } -func (*SampleOneOf) ProtoMessage() {} - -type isSampleOneOf_TestOneof interface { - isSampleOneOf_TestOneof() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type SampleOneOf_Field1 struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` -} -type SampleOneOf_SubMessage struct { - SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,oneof"` -} - -func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} -func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} - -func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { - if m != nil { - return m.TestOneof - } - return nil -} - -func (m *SampleOneOf) GetField1() float64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { - return x.Field1 - } - return 0 -} - -func (m *SampleOneOf) GetField2() float32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { - return x.Field2 - } - return 0 -} - -func (m *SampleOneOf) GetField3() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { - return x.Field3 - } - return 0 -} - -func (m *SampleOneOf) GetField4() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { - return x.Field4 - } - return 0 -} - -func (m *SampleOneOf) GetField5() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { - return x.Field5 - } - return 0 -} - -func (m *SampleOneOf) GetField6() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { - return x.Field6 - } - return 0 -} - -func (m *SampleOneOf) GetField7() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { - return x.Field7 - } - return 0 -} - -func (m *SampleOneOf) GetField8() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { - return x.Field8 - } - return 0 -} - -func (m *SampleOneOf) GetField9() uint32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { - return x.Field9 - } - return 0 -} - -func (m *SampleOneOf) GetField10() int32 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { - return x.Field10 - } - return 0 -} - -func (m *SampleOneOf) GetField11() uint64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { - return x.Field11 - } - return 0 -} - -func (m *SampleOneOf) GetField12() int64 { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { - return x.Field12 - } - return 0 -} - -func (m *SampleOneOf) GetField13() bool { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { - return x.Field13 - } - return false -} - -func (m *SampleOneOf) GetField14() string { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { - return x.Field14 - } - return "" -} - -func (m *SampleOneOf) GetField15() []byte { - if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { - return x.Field15 - } - return nil -} - -func (m *SampleOneOf) GetSubMessage() *Subby { - if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { - return x.SubMessage - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, []interface{}{ - (*SampleOneOf_Field1)(nil), - (*SampleOneOf_Field2)(nil), - (*SampleOneOf_Field3)(nil), - (*SampleOneOf_Field4)(nil), - (*SampleOneOf_Field5)(nil), - (*SampleOneOf_Field6)(nil), - (*SampleOneOf_Field7)(nil), - (*SampleOneOf_Field8)(nil), - (*SampleOneOf_Field9)(nil), - (*SampleOneOf_Field10)(nil), - (*SampleOneOf_Field11)(nil), - (*SampleOneOf_Field12)(nil), - (*SampleOneOf_Field13)(nil), - (*SampleOneOf_Field14)(nil), - (*SampleOneOf_Field15)(nil), - (*SampleOneOf_SubMessage)(nil), - } -} - -func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - _ = b.EncodeVarint(1<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.Field1)) - case *SampleOneOf_Field2: - _ = b.EncodeVarint(2<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) - case *SampleOneOf_Field3: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Field7)) - case *SampleOneOf_Field8: - _ = b.EncodeVarint(8<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.Field8)) - case *SampleOneOf_Field9: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field9)) - case *SampleOneOf_Field10: - _ = b.EncodeVarint(10<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.Field10)) - case *SampleOneOf_Field11: - _ = b.EncodeVarint(11<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field11)) - case *SampleOneOf_Field12: - _ = b.EncodeVarint(12<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.Field12)) - case *SampleOneOf_Field13: - t := uint64(0) - if x.Field13 { - t = 1 - } - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *SampleOneOf_Field14: - _ = b.EncodeVarint(14<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Field14) - case *SampleOneOf_Field15: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Field15) - case *SampleOneOf_SubMessage: - _ = b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SubMessage); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) - } - return nil -} - -func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SampleOneOf) - switch tag { - case 1: // test_oneof.Field1 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} - return true, err - case 2: // test_oneof.Field2 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} - return true, err - case 3: // test_oneof.Field3 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field3{int32(x)} - return true, err - case 4: // test_oneof.Field4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field4{int64(x)} - return true, err - case 5: // test_oneof.Field5 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field5{uint32(x)} - return true, err - case 6: // test_oneof.Field6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field6{x} - return true, err - case 7: // test_oneof.Field7 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.TestOneof = &SampleOneOf_Field7{int32(x)} - return true, err - case 8: // test_oneof.Field8 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.TestOneof = &SampleOneOf_Field8{int64(x)} - return true, err - case 9: // test_oneof.Field9 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field9{uint32(x)} - return true, err - case 10: // test_oneof.Field10 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.TestOneof = &SampleOneOf_Field10{int32(x)} - return true, err - case 11: // test_oneof.Field11 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field11{x} - return true, err - case 12: // test_oneof.Field12 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.TestOneof = &SampleOneOf_Field12{int64(x)} - return true, err - case 13: // test_oneof.Field13 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.TestOneof = &SampleOneOf_Field13{x != 0} - return true, err - case 14: // test_oneof.Field14 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.TestOneof = &SampleOneOf_Field14{x} - return true, err - case 15: // test_oneof.Field15 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.TestOneof = &SampleOneOf_Field15{x} - return true, err - case 16: // test_oneof.sub_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Subby) - err := b.DecodeMessage(msg) - m.TestOneof = &SampleOneOf_SubMessage{msg} - return true, err - default: - return false, nil - } -} - -func init() { - proto.RegisterType((*Subby)(nil), "one.Subby") - proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") -} -func (this *Subby) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/one.proto"), - Package: func(v string) *string { return &v }("one"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Subby"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("sub"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("SampleOneOf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - OneofIndex: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("sub_message"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".one.Subby"), - OneofIndex: func(v int32) *int32 { return &v }(0), - }}, - OneofDecl: []*descriptor.OneofDescriptorProto{{Name: func(v string) *string { return &v }("test_oneof")}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (this *Subby) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Subby") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Subby but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Subby but is not nil && this == nil") - } - if this.Sub != that1.Sub { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - return nil -} -func (this *Subby) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto deleted file mode 100644 index d9b60c9a90..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go deleted file mode 100644 index e92034197c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/doc.go deleted file mode 100644 index e668df5e0e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/doc.go +++ /dev/null @@ -1 +0,0 @@ -package oneof3 diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/one.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/one.proto deleted file mode 100644 index c3cdff7e5e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneof3/one.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package one; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/Makefile deleted file mode 100644 index e1c8814720..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2015 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc-min-version --proto_path=../../../../../:../../protobuf/:. --version="3.0.0" --gogo_out=. *.proto - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.pb.go deleted file mode 100644 index 6c9e063dd7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.pb.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: oneofembed.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - oneofembed.proto - -It has these top-level messages: - Foo - Bar -*/ -package proto - -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Foo struct { - *Bar `protobuf:"bytes,1,opt,name=bar,embedded=bar" json:"bar,omitempty"` -} - -func (m *Foo) Reset() { *m = Foo{} } -func (m *Foo) String() string { return proto1.CompactTextString(m) } -func (*Foo) ProtoMessage() {} - -type Bar struct { - // Types that are valid to be assigned to Pick: - // *Bar_A - // *Bar_B - Pick isBar_Pick `protobuf_oneof:"pick"` -} - -func (m *Bar) Reset() { *m = Bar{} } -func (m *Bar) String() string { return proto1.CompactTextString(m) } -func (*Bar) ProtoMessage() {} - -type isBar_Pick interface { - isBar_Pick() - Equal(interface{}) bool -} - -type Bar_A struct { - A bool `protobuf:"varint,11,opt,name=a,proto3,oneof"` -} -type Bar_B struct { - B bool `protobuf:"varint,12,opt,name=b,proto3,oneof"` -} - -func (*Bar_A) isBar_Pick() {} -func (*Bar_B) isBar_Pick() {} - -func (m *Bar) GetPick() isBar_Pick { - if m != nil { - return m.Pick - } - return nil -} - -func (m *Bar) GetA() bool { - if x, ok := m.GetPick().(*Bar_A); ok { - return x.A - } - return false -} - -func (m *Bar) GetB() bool { - if x, ok := m.GetPick().(*Bar_B); ok { - return x.B - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Bar) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), []interface{}) { - return _Bar_OneofMarshaler, _Bar_OneofUnmarshaler, []interface{}{ - (*Bar_A)(nil), - (*Bar_B)(nil), - } -} - -func _Bar_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { - m := msg.(*Bar) - // pick - switch x := m.Pick.(type) { - case *Bar_A: - t := uint64(0) - if x.A { - t = 1 - } - _ = b.EncodeVarint(11<<3 | proto1.WireVarint) - _ = b.EncodeVarint(t) - case *Bar_B: - t := uint64(0) - if x.B { - t = 1 - } - _ = b.EncodeVarint(12<<3 | proto1.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("Bar.Pick has unexpected type %T", x) - } - return nil -} - -func _Bar_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { - m := msg.(*Bar) - switch tag { - case 11: // pick.a - if wire != proto1.WireVarint { - return true, proto1.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Pick = &Bar_A{x != 0} - return true, err - case 12: // pick.b - if wire != proto1.WireVarint { - return true, proto1.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Pick = &Bar_B{x != 0} - return true, err - default: - return false, nil - } -} - -func init() { - proto1.RegisterType((*Foo)(nil), "proto.Foo") - proto1.RegisterType((*Bar)(nil), "proto.Bar") -} -func (this *Foo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Bar.Equal(that1.Bar) { - return false - } - return true -} -func (this *Bar) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar) - if !ok { - that2, ok := that.(Bar) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Pick == nil { - if this.Pick != nil { - return false - } - } else if this.Pick == nil { - return false - } else if !this.Pick.Equal(that1.Pick) { - return false - } - return true -} -func (this *Bar_A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar_A) - if !ok { - that2, ok := that.(Bar_A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.A != that1.A { - return false - } - return true -} -func (this *Bar_B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar_B) - if !ok { - that2, ok := that.(Bar_B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.B != that1.B { - return false - } - return true -} -func NewPopulatedFoo(r randyOneofembed, easy bool) *Foo { - this := &Foo{} - if r.Intn(10) != 0 { - this.Bar = NewPopulatedBar(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBar(r randyOneofembed, easy bool) *Bar { - this := &Bar{} - oneofNumber_Pick := []int32{11, 12}[r.Intn(2)] - switch oneofNumber_Pick { - case 11: - this.Pick = NewPopulatedBar_A(r, easy) - case 12: - this.Pick = NewPopulatedBar_B(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBar_A(r randyOneofembed, easy bool) *Bar_A { - this := &Bar_A{} - this.A = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedBar_B(r randyOneofembed, easy bool) *Bar_B { - this := &Bar_B{} - this.B = bool(bool(r.Intn(2) == 0)) - return this -} - -type randyOneofembed interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOneofembed(r randyOneofembed) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOneofembed(r randyOneofembed) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneOneofembed(r) - } - return string(tmps) -} -func randUnrecognizedOneofembed(r randyOneofembed, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOneofembed(data, r, fieldNumber, wire) - } - return data -} -func randFieldOneofembed(data []byte, r randyOneofembed, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - data = encodeVarintPopulateOneofembed(data, uint64(v2)) - case 1: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOneofembed(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOneofembed(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.proto deleted file mode 100644 index cf8e5ed003..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembed.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package proto; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message Foo { - Bar bar = 1 [(gogoproto.embed) = true]; -} - -message Bar { - oneof pick { - bool a = 11; - bool b = 12; - } -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembedpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembedpb_test.go deleted file mode 100644 index 25ca293cf4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/oneofembed/oneofembedpb_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: oneofembed.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - oneofembed.proto - -It has these top-level messages: - Foo - Bar -*/ -package proto - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFooProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBarProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBarJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFooProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFooProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBarProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBarProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/Makefile deleted file mode 100644 index 63c75abf35..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. packed.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/doc.go deleted file mode 100644 index e20ab1e955..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/doc.go +++ /dev/null @@ -1 +0,0 @@ -package packed diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.pb.go deleted file mode 100644 index 77cfe872f6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.pb.go +++ /dev/null @@ -1,3379 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: packed.proto -// DO NOT EDIT! - -/* - Package packed is a generated protocol buffer package. - - It is generated from these files: - packed.proto - - It has these top-level messages: - NinRepNative - NinRepPackedNative - NinRepNativeUnsafe - NinRepPackedNativeUnsafe -*/ -package packed - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (m *NinRepNative) String() string { return proto.CompactTextString(m) } -func (*NinRepNative) ProtoMessage() {} - -func (m *NinRepNative) GetField1() []float64 { - if m != nil { - return m.Field1 - } - return nil -} - -func (m *NinRepNative) GetField2() []float32 { - if m != nil { - return m.Field2 - } - return nil -} - -func (m *NinRepNative) GetField3() []int32 { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinRepNative) GetField4() []int64 { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinRepNative) GetField5() []uint32 { - if m != nil { - return m.Field5 - } - return nil -} - -func (m *NinRepNative) GetField6() []uint64 { - if m != nil { - return m.Field6 - } - return nil -} - -func (m *NinRepNative) GetField7() []int32 { - if m != nil { - return m.Field7 - } - return nil -} - -func (m *NinRepNative) GetField8() []int64 { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinRepNative) GetField9() []uint32 { - if m != nil { - return m.Field9 - } - return nil -} - -func (m *NinRepNative) GetField10() []int32 { - if m != nil { - return m.Field10 - } - return nil -} - -func (m *NinRepNative) GetField11() []uint64 { - if m != nil { - return m.Field11 - } - return nil -} - -func (m *NinRepNative) GetField12() []int64 { - if m != nil { - return m.Field12 - } - return nil -} - -func (m *NinRepNative) GetField13() []bool { - if m != nil { - return m.Field13 - } - return nil -} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } -func (*NinRepPackedNative) ProtoMessage() {} - -func (m *NinRepPackedNative) GetField1() []float64 { - if m != nil { - return m.Field1 - } - return nil -} - -func (m *NinRepPackedNative) GetField2() []float32 { - if m != nil { - return m.Field2 - } - return nil -} - -func (m *NinRepPackedNative) GetField3() []int32 { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinRepPackedNative) GetField4() []int64 { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinRepPackedNative) GetField5() []uint32 { - if m != nil { - return m.Field5 - } - return nil -} - -func (m *NinRepPackedNative) GetField6() []uint64 { - if m != nil { - return m.Field6 - } - return nil -} - -func (m *NinRepPackedNative) GetField7() []int32 { - if m != nil { - return m.Field7 - } - return nil -} - -func (m *NinRepPackedNative) GetField8() []int64 { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinRepPackedNative) GetField9() []uint32 { - if m != nil { - return m.Field9 - } - return nil -} - -func (m *NinRepPackedNative) GetField10() []int32 { - if m != nil { - return m.Field10 - } - return nil -} - -func (m *NinRepPackedNative) GetField11() []uint64 { - if m != nil { - return m.Field11 - } - return nil -} - -func (m *NinRepPackedNative) GetField12() []int64 { - if m != nil { - return m.Field12 - } - return nil -} - -func (m *NinRepPackedNative) GetField13() []bool { - if m != nil { - return m.Field13 - } - return nil -} - -type NinRepNativeUnsafe struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNativeUnsafe) Reset() { *m = NinRepNativeUnsafe{} } -func (m *NinRepNativeUnsafe) String() string { return proto.CompactTextString(m) } -func (*NinRepNativeUnsafe) ProtoMessage() {} - -func (m *NinRepNativeUnsafe) GetField1() []float64 { - if m != nil { - return m.Field1 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField2() []float32 { - if m != nil { - return m.Field2 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField3() []int32 { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField4() []int64 { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField5() []uint32 { - if m != nil { - return m.Field5 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField6() []uint64 { - if m != nil { - return m.Field6 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField7() []int32 { - if m != nil { - return m.Field7 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField8() []int64 { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField9() []uint32 { - if m != nil { - return m.Field9 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField10() []int32 { - if m != nil { - return m.Field10 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField11() []uint64 { - if m != nil { - return m.Field11 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField12() []int64 { - if m != nil { - return m.Field12 - } - return nil -} - -func (m *NinRepNativeUnsafe) GetField13() []bool { - if m != nil { - return m.Field13 - } - return nil -} - -type NinRepPackedNativeUnsafe struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNativeUnsafe) Reset() { *m = NinRepPackedNativeUnsafe{} } -func (m *NinRepPackedNativeUnsafe) String() string { return proto.CompactTextString(m) } -func (*NinRepPackedNativeUnsafe) ProtoMessage() {} - -func (m *NinRepPackedNativeUnsafe) GetField1() []float64 { - if m != nil { - return m.Field1 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField2() []float32 { - if m != nil { - return m.Field2 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField3() []int32 { - if m != nil { - return m.Field3 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField4() []int64 { - if m != nil { - return m.Field4 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField5() []uint32 { - if m != nil { - return m.Field5 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField6() []uint64 { - if m != nil { - return m.Field6 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField7() []int32 { - if m != nil { - return m.Field7 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField8() []int64 { - if m != nil { - return m.Field8 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField9() []uint32 { - if m != nil { - return m.Field9 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField10() []int32 { - if m != nil { - return m.Field10 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField11() []uint64 { - if m != nil { - return m.Field11 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField12() []int64 { - if m != nil { - return m.Field12 - } - return nil -} - -func (m *NinRepPackedNativeUnsafe) GetField13() []bool { - if m != nil { - return m.Field13 - } - return nil -} - -func init() { - proto.RegisterType((*NinRepNative)(nil), "packed.NinRepNative") - proto.RegisterType((*NinRepPackedNative)(nil), "packed.NinRepPackedNative") - proto.RegisterType((*NinRepNativeUnsafe)(nil), "packed.NinRepNativeUnsafe") - proto.RegisterType((*NinRepPackedNativeUnsafe)(nil), "packed.NinRepPackedNativeUnsafe") -} -func NewPopulatedNinRepNative(r randyPacked, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v1 := r.Intn(100) - this.Field1 = make([]float64, v1) - for i := 0; i < v1; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(100) - this.Field2 = make([]float32, v2) - for i := 0; i < v2; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v3 := r.Intn(100) - this.Field3 = make([]int32, v3) - for i := 0; i < v3; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(100) - this.Field4 = make([]int64, v4) - for i := 0; i < v4; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.Field5 = make([]uint32, v5) - for i := 0; i < v5; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(100) - this.Field6 = make([]uint64, v6) - for i := 0; i < v6; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(100) - this.Field7 = make([]int32, v7) - for i := 0; i < v7; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(100) - this.Field8 = make([]int64, v8) - for i := 0; i < v8; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(100) - this.Field9 = make([]uint32, v9) - for i := 0; i < v9; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(100) - this.Field10 = make([]int32, v10) - for i := 0; i < v10; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(100) - this.Field11 = make([]uint64, v11) - for i := 0; i < v11; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(100) - this.Field12 = make([]int64, v12) - for i := 0; i < v12; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(100) - this.Field13 = make([]bool, v13) - for i := 0; i < v13; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPacked(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyPacked, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v14 := r.Intn(100) - this.Field1 = make([]float64, v14) - for i := 0; i < v14; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(100) - this.Field2 = make([]float32, v15) - for i := 0; i < v15; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field3 = make([]int32, v16) - for i := 0; i < v16; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field4 = make([]int64, v17) - for i := 0; i < v17; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field5 = make([]uint32, v18) - for i := 0; i < v18; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field6 = make([]uint64, v19) - for i := 0; i < v19; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field7 = make([]int32, v20) - for i := 0; i < v20; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field8 = make([]int64, v21) - for i := 0; i < v21; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field9 = make([]uint32, v22) - for i := 0; i < v22; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field10 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field11 = make([]uint64, v24) - for i := 0; i < v24; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field12 = make([]int64, v25) - for i := 0; i < v25; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field13 = make([]bool, v26) - for i := 0; i < v26; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPacked(r, 14) - } - return this -} - -func NewPopulatedNinRepNativeUnsafe(r randyPacked, easy bool) *NinRepNativeUnsafe { - this := &NinRepNativeUnsafe{} - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field1 = make([]float64, v27) - for i := 0; i < v27; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field2 = make([]float32, v28) - for i := 0; i < v28; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field3 = make([]int32, v29) - for i := 0; i < v29; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(100) - this.Field4 = make([]int64, v30) - for i := 0; i < v30; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field5 = make([]uint32, v31) - for i := 0; i < v31; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(100) - this.Field6 = make([]uint64, v32) - for i := 0; i < v32; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field7 = make([]int32, v33) - for i := 0; i < v33; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field8 = make([]int64, v34) - for i := 0; i < v34; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field9 = make([]uint32, v35) - for i := 0; i < v35; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field10 = make([]int32, v36) - for i := 0; i < v36; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field11 = make([]uint64, v37) - for i := 0; i < v37; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field12 = make([]int64, v38) - for i := 0; i < v38; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field13 = make([]bool, v39) - for i := 0; i < v39; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPacked(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNativeUnsafe(r randyPacked, easy bool) *NinRepPackedNativeUnsafe { - this := &NinRepPackedNativeUnsafe{} - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field1 = make([]float64, v40) - for i := 0; i < v40; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field2 = make([]float32, v41) - for i := 0; i < v41; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field3 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field4 = make([]int64, v43) - for i := 0; i < v43; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field5 = make([]uint32, v44) - for i := 0; i < v44; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field6 = make([]uint64, v45) - for i := 0; i < v45; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(100) - this.Field7 = make([]int32, v46) - for i := 0; i < v46; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field8 = make([]int64, v47) - for i := 0; i < v47; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(100) - this.Field9 = make([]uint32, v48) - for i := 0; i < v48; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field10 = make([]int32, v49) - for i := 0; i < v49; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field11 = make([]uint64, v50) - for i := 0; i < v50; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field12 = make([]int64, v51) - for i := 0; i < v51; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field13 = make([]bool, v52) - for i := 0; i < v52; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPacked(r, 14) - } - return this -} - -type randyPacked interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RunePacked(r randyPacked) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringPacked(r randyPacked) string { - v53 := r.Intn(100) - tmps := make([]rune, v53) - for i := 0; i < v53; i++ { - tmps[i] = randUTF8RunePacked(r) - } - return string(tmps) -} -func randUnrecognizedPacked(r randyPacked, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldPacked(data, r, fieldNumber, wire) - } - return data -} -func randFieldPacked(data []byte, r randyPacked, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulatePacked(data, uint64(key)) - v54 := r.Int63() - if r.Intn(2) == 0 { - v54 *= -1 - } - data = encodeVarintPopulatePacked(data, uint64(v54)) - case 1: - data = encodeVarintPopulatePacked(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulatePacked(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulatePacked(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulatePacked(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulatePacked(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - default: - iNdEx = preIndex - skippy, err := skipPacked(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipPacked(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPacked(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthPacked - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPacked(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthPacked = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPacked = fmt.Errorf("proto: integer overflow") -) - -func (m *NinRepNativeUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNativeUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - default: - iNdEx = preIndex - skippy, err := skipPackedUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPackedUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNativeUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNativeUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipPackedUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPackedUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPackedUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthPackedUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPackedUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthPackedUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPackedUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.proto deleted file mode 100644 index 29f0e6c87b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package packed; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.populate_all) = true; - -message NinRepNative { - option (gogoproto.unmarshaler) = true; - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; -} - -message NinRepPackedNative { - option (gogoproto.unmarshaler) = true; - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NinRepNativeUnsafe { - option (gogoproto.unsafe_unmarshaler) = true; - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; -} - -message NinRepPackedNativeUnsafe { - option (gogoproto.unsafe_unmarshaler) = true; - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed_test.go deleted file mode 100644 index dcad5ad9c1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/packed/packed_test.go +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package packed - -import ( - "bytes" - "fmt" - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - "time" -) - -/* -https://github.com/gogo/protobuf/issues/detail?id=21 -https://developers.google.com/protocol-buffers/docs/proto#options -In 2.3.0 and later, this change is safe, as parsers for packable fields will always accept both formats, -*/ -func TestSafeIssue21(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedNinRepNative(popr, true) - data1, err := proto.Marshal(msg1) - if err != nil { - panic(err) - } - packedmsg := &NinRepPackedNative{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - panic(err) - } - if len(packedmsg.XXX_unrecognized) != 0 { - t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") - } - if err := VerboseEqual(msg1, packedmsg); err != nil { - t.Fatalf("%v", err) - } -} - -func TestUnsafeIssue21(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) - data1, err := proto.Marshal(msg1) - if err != nil { - panic(err) - } - packedmsg := &NinRepPackedNativeUnsafe{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - panic(err) - } - if len(packedmsg.XXX_unrecognized) != 0 { - t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") - } - if err := VerboseEqualUnsafe(msg1, packedmsg); err != nil { - t.Fatalf("%v", err) - } -} - -func VerboseEqual(this *NinRepNative, that *NinRepPackedNative) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } else if this == nil { - return fmt.Errorf("that != nil && this == nil") - } - - if len(this.Field1) != len(that.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) - } - } - if len(this.Field2) != len(that.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) - } - } - if len(this.Field3) != len(that.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) - } - } - if len(this.Field4) != len(that.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) - } - } - if len(this.Field5) != len(that.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) - } - } - if len(this.Field6) != len(that.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) - } - } - if len(this.Field7) != len(that.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) - } - } - if len(this.Field8) != len(that.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) - } - } - if len(this.Field9) != len(that.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) - } - } - if len(this.Field10) != len(that.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) - } - } - if len(this.Field11) != len(that.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) - } - } - if len(this.Field12) != len(that.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) - } - } - if len(this.Field13) != len(that.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) - } - return nil -} - -func VerboseEqualUnsafe(this *NinRepNativeUnsafe, that *NinRepPackedNativeUnsafe) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } else if this == nil { - return fmt.Errorf("that != nil && this == nil") - } - - if len(this.Field1) != len(that.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) - } - } - if len(this.Field2) != len(that.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) - } - } - if len(this.Field3) != len(that.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) - } - } - if len(this.Field4) != len(that.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) - } - } - if len(this.Field5) != len(that.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) - } - } - if len(this.Field6) != len(that.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) - } - } - if len(this.Field7) != len(that.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) - } - } - if len(this.Field8) != len(that.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) - } - } - if len(this.Field9) != len(that.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) - } - } - if len(this.Field10) != len(that.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) - } - } - if len(this.Field11) != len(that.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) - } - } - if len(this.Field12) != len(that.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) - } - } - if len(this.Field13) != len(that.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/Makefile deleted file mode 100644 index 37eaecf3ca..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. requiredexample.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.pb.go deleted file mode 100644 index 05461b87f1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.pb.go +++ /dev/null @@ -1,2161 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: requiredexample.proto -// DO NOT EDIT! - -/* - Package required is a generated protocol buffer package. - - It is generated from these files: - requiredexample.proto - - It has these top-level messages: - RequiredExample - NidOptNative - NinOptNative - NestedNinOptNative -*/ -package required - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type RequiredExample struct { - TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"` - TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"` - TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RequiredExample) Reset() { *m = RequiredExample{} } -func (m *RequiredExample) String() string { return proto.CompactTextString(m) } -func (*RequiredExample) ProtoMessage() {} - -func (m *RequiredExample) GetTheRequiredString() string { - if m != nil && m.TheRequiredString != nil { - return *m.TheRequiredString - } - return "" -} - -func (m *RequiredExample) GetTheOptionalString() string { - if m != nil && m.TheOptionalString != nil { - return *m.TheOptionalString - } - return "" -} - -func (m *RequiredExample) GetTheRepeatedStrings() []string { - if m != nil { - return m.TheRepeatedStrings - } - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,req,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,req,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,req,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,req,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (m *NidOptNative) String() string { return proto.CompactTextString(m) } -func (*NidOptNative) ProtoMessage() {} - -func (m *NidOptNative) GetField1() float64 { - if m != nil { - return m.Field1 - } - return 0 -} - -func (m *NidOptNative) GetField2() float32 { - if m != nil { - return m.Field2 - } - return 0 -} - -func (m *NidOptNative) GetField3() int32 { - if m != nil { - return m.Field3 - } - return 0 -} - -func (m *NidOptNative) GetField4() int64 { - if m != nil { - return m.Field4 - } - return 0 -} - -func (m *NidOptNative) GetField5() uint32 { - if m != nil { - return m.Field5 - } - return 0 -} - -func (m *NidOptNative) GetField6() uint64 { - if m != nil { - return m.Field6 - } - return 0 -} - -func (m *NidOptNative) GetField7() int32 { - if m != nil { - return m.Field7 - } - return 0 -} - -func (m *NidOptNative) GetField8() int64 { - if m != nil { - return m.Field8 - } - return 0 -} - -func (m *NidOptNative) GetField9() uint32 { - if m != nil { - return m.Field9 - } - return 0 -} - -func (m *NidOptNative) GetField10() int32 { - if m != nil { - return m.Field10 - } - return 0 -} - -func (m *NidOptNative) GetField11() uint64 { - if m != nil { - return m.Field11 - } - return 0 -} - -func (m *NidOptNative) GetField12() int64 { - if m != nil { - return m.Field12 - } - return 0 -} - -func (m *NidOptNative) GetField13() bool { - if m != nil { - return m.Field13 - } - return false -} - -func (m *NidOptNative) GetField14() string { - if m != nil { - return m.Field14 - } - return "" -} - -func (m *NidOptNative) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,req,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,req,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,req,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,req,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (m *NinOptNative) String() string { return proto.CompactTextString(m) } -func (*NinOptNative) ProtoMessage() {} - -func (m *NinOptNative) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return 0 -} - -func (m *NinOptNative) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return 0 -} - -func (m *NinOptNative) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return 0 -} - -func (m *NinOptNative) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return 0 -} - -func (m *NinOptNative) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return 0 -} - -func (m *NinOptNative) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return 0 -} - -func (m *NinOptNative) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return 0 -} - -func (m *NinOptNative) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return 0 -} - -func (m *NinOptNative) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return 0 -} - -func (m *NinOptNative) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return 0 -} - -func (m *NinOptNative) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return 0 -} - -func (m *NinOptNative) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return 0 -} - -func (m *NinOptNative) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return false -} - -func (m *NinOptNative) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return "" -} - -func (m *NinOptNative) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type NestedNinOptNative struct { - NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts" json:"NestedNinOpts,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} } -func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) } -func (*NestedNinOptNative) ProtoMessage() {} - -func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative { - if m != nil { - return m.NestedNinOpts - } - return nil -} - -func init() { - proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample") - proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative") - proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative") -} -func (m *RequiredExample) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *RequiredExample) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TheRequiredString == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") - } else { - data[i] = 0xa - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheRequiredString))) - i += copy(data[i:], *m.TheRequiredString) - } - if m.TheOptionalString != nil { - data[i] = 0x12 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheOptionalString))) - i += copy(data[i:], *m.TheOptionalString) - } - if len(m.TheRepeatedStrings) > 0 { - for _, s := range m.TheRepeatedStrings { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(m.Field1))) - data[i] = 0x15 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(m.Field2))) - data[i] = 0x18 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Requiredexample(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } else { - data[i] = 0x9 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(*m.Field1))) - } - if m.Field2 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } else { - data[i] = 0x15 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(*m.Field2))) - } - if m.Field3 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } else { - data[i] = 0x18 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field3)) - } - if m.Field4 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } else { - data[i] = 0x20 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field4)) - } - if m.Field5 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } else { - data[i] = 0x28 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field5)) - } - if m.Field6 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } else { - data[i] = 0x30 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field6)) - } - if m.Field7 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } else { - data[i] = 0x38 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } else { - data[i] = 0x40 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } else { - data[i] = 0x4d - i++ - i = encodeFixed32Requiredexample(data, i, uint32(*m.Field9)) - } - if m.Field10 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } else { - data[i] = 0x55 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(*m.Field10)) - } - if m.Field11 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } else { - data[i] = 0x59 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(*m.Field11)) - } - if m.Field12 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } else { - data[i] = 0x61 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(*m.Field12)) - } - if m.Field13 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } else { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } else { - data[i] = 0x72 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } else { - data[i] = 0x7a - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NestedNinOpts) > 0 { - for _, msg := range m.NestedNinOpts { - data[i] = 0xa - i++ - i = encodeVarintRequiredexample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Requiredexample(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Requiredexample(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintRequiredexample(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample { - this := &RequiredExample{} - v1 := randStringRequiredexample(r) - this.TheRequiredString = &v1 - if r.Intn(10) != 0 { - v2 := randStringRequiredexample(r) - this.TheOptionalString = &v2 - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.TheRepeatedStrings = make([]string, v3) - for i := 0; i < v3; i++ { - this.TheRepeatedStrings[i] = randStringRequiredexample(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4) - } - return this -} - -func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringRequiredexample(r) - v4 := r.Intn(100) - this.Field15 = make([]byte, v4) - for i := 0; i < v4; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative { - this := &NinOptNative{} - v5 := float64(r.Float64()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field1 = &v5 - v6 := float32(r.Float32()) - if r.Intn(2) == 0 { - v6 *= -1 - } - this.Field2 = &v6 - v7 := int32(r.Int31()) - if r.Intn(2) == 0 { - v7 *= -1 - } - this.Field3 = &v7 - v8 := int64(r.Int63()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field4 = &v8 - v9 := uint32(r.Uint32()) - this.Field5 = &v9 - v10 := uint64(uint64(r.Uint32())) - this.Field6 = &v10 - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field7 = &v11 - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Field8 = &v12 - v13 := uint32(r.Uint32()) - this.Field9 = &v13 - v14 := int32(r.Int31()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Field10 = &v14 - v15 := uint64(uint64(r.Uint32())) - this.Field11 = &v15 - v16 := int64(r.Int63()) - if r.Intn(2) == 0 { - v16 *= -1 - } - this.Field12 = &v16 - v17 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v17 - v18 := randStringRequiredexample(r) - this.Field14 = &v18 - v19 := r.Intn(100) - this.Field15 = make([]byte, v19) - for i := 0; i < v19; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) - } - return this -} - -func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative { - this := &NestedNinOptNative{} - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.NestedNinOpts = make([]*NinOptNative, v20) - for i := 0; i < v20; i++ { - this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2) - } - return this -} - -type randyRequiredexample interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneRequiredexample(r randyRequiredexample) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringRequiredexample(r randyRequiredexample) string { - v21 := r.Intn(100) - tmps := make([]rune, v21) - for i := 0; i < v21; i++ { - tmps[i] = randUTF8RuneRequiredexample(r) - } - return string(tmps) -} -func randUnrecognizedRequiredexample(r randyRequiredexample, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldRequiredexample(data, r, fieldNumber, wire) - } - return data -} -func randFieldRequiredexample(data []byte, r randyRequiredexample, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateRequiredexample(data, uint64(key)) - v22 := r.Int63() - if r.Intn(2) == 0 { - v22 *= -1 - } - data = encodeVarintPopulateRequiredexample(data, uint64(v22)) - case 1: - data = encodeVarintPopulateRequiredexample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateRequiredexample(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateRequiredexample(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateRequiredexample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateRequiredexample(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *RequiredExample) Size() (n int) { - var l int - _ = l - if m.TheRequiredString != nil { - l = len(*m.TheRequiredString) - n += 1 + l + sovRequiredexample(uint64(l)) - } - if m.TheOptionalString != nil { - l = len(*m.TheOptionalString) - n += 1 + l + sovRequiredexample(uint64(l)) - } - if len(m.TheRepeatedStrings) > 0 { - for _, s := range m.TheRepeatedStrings { - l = len(s) - n += 1 + l + sovRequiredexample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovRequiredexample(uint64(m.Field3)) - n += 1 + sovRequiredexample(uint64(m.Field4)) - n += 1 + sovRequiredexample(uint64(m.Field5)) - n += 1 + sovRequiredexample(uint64(m.Field6)) - n += 1 + sozRequiredexample(uint64(m.Field7)) - n += 1 + sozRequiredexample(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovRequiredexample(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovRequiredexample(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovRequiredexample(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovRequiredexample(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovRequiredexample(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovRequiredexample(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozRequiredexample(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozRequiredexample(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovRequiredexample(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovRequiredexample(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedNinOptNative) Size() (n int) { - var l int - _ = l - if len(m.NestedNinOpts) > 0 { - for _, e := range m.NestedNinOpts { - l = e.Size() - n += 1 + l + sovRequiredexample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRequiredexample(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRequiredexample(x uint64) (n int) { - return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RequiredExample) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequiredExample: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.TheRequiredString = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.TheOptionalString = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRequiredexample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptNative) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000004) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000008) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000010) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000020) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - hasFields[0] |= uint64(0x00000040) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - hasFields[0] |= uint64(0x00000080) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000100) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000200) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - hasFields[0] |= uint64(0x00000400) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - hasFields[0] |= uint64(0x00000800) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - hasFields[0] |= uint64(0x00001000) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00002000) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - hasFields[0] |= uint64(0x00004000) - default: - iNdEx = preIndex - skippy, err := skipRequiredexample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - hasFields[0] |= uint64(0x00000004) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - hasFields[0] |= uint64(0x00000008) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - hasFields[0] |= uint64(0x00000010) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - hasFields[0] |= uint64(0x00000020) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - hasFields[0] |= uint64(0x00000040) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - hasFields[0] |= uint64(0x00000080) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - hasFields[0] |= uint64(0x00000100) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - hasFields[0] |= uint64(0x00000200) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - hasFields[0] |= uint64(0x00000400) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - hasFields[0] |= uint64(0x00000800) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - hasFields[0] |= uint64(0x00001000) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00002000) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - hasFields[0] |= uint64(0x00004000) - default: - iNdEx = preIndex - skippy, err := skipRequiredexample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{}) - if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRequiredexample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRequiredexample(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthRequiredexample - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRequiredexample(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.proto deleted file mode 100644 index a86feb416b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexample.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto2"; -package required; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; - -message RequiredExample { - required string theRequiredString = 1; - optional string theOptionalString = 2; - repeated string theRepeatedStrings = 3; -} - -message NidOptNative { - required double Field1 = 1 [(gogoproto.nullable) = false]; - required float Field2 = 2 [(gogoproto.nullable) = false]; - required int32 Field3 = 3 [(gogoproto.nullable) = false]; - required int64 Field4 = 4 [(gogoproto.nullable) = false]; - required uint32 Field5 = 5 [(gogoproto.nullable) = false]; - required uint64 Field6 = 6 [(gogoproto.nullable) = false]; - required sint32 Field7 = 7 [(gogoproto.nullable) = false]; - required sint64 Field8 = 8 [(gogoproto.nullable) = false]; - required fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - required sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - required fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - required sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - required bool Field13 = 13 [(gogoproto.nullable) = false]; - required string Field14 = 14 [(gogoproto.nullable) = false]; - required bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - required double Field1 = 1; - required float Field2 = 2; - required int32 Field3 = 3; - required int64 Field4 = 4; - required uint32 Field5 = 5; - required uint64 Field6 = 6; - required sint32 Field7 = 7; - required sint64 Field8 = 8; - required fixed32 Field9 = 9; - required sfixed32 Field10 = 10; - required fixed64 Field11 = 11; - required sfixed64 Field12 = 12; - required bool Field13 = 13; - required string Field14 = 14; - required bytes Field15 = 15; -} - -message NestedNinOptNative { - repeated NinOptNative NestedNinOpts = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexamplepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexamplepb_test.go deleted file mode 100644 index af5bd7c95a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/required/requiredexamplepb_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package required - -import ( - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/test" - "math/rand" - "reflect" - "strconv" - "testing" - "time" -) - -func TestMarshalToErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { - data := RequiredExample{} - buf, err := proto.Marshal(&data) - if err == nil { - t.Fatalf("err == nil; was %v instead", err) - } - if err.Error() != `proto: required field "theRequiredString" not set` { - t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) - } - if len(buf) != 0 { - t.Fatalf(`len(buf) != 0; was %d instead`, len(buf)) - } -} - -func TestMarshalToSucceedsWhenRequiredFieldIsPresent(t *testing.T) { - data := RequiredExample{ - TheRequiredString: proto.String("present"), - } - buf, err := proto.Marshal(&data) - if err != nil { - t.Fatalf("err != nil; was %v instead", err) - } - if len(buf) == 0 { - t.Fatalf(`len(buf) == 0; expected nonzero`) - } -} - -func TestUnmarshalErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { - missingRequiredField := []byte{0x12, 0x8, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c} - data := RequiredExample{} - err := proto.Unmarshal(missingRequiredField, &data) - if err == nil { - t.Fatalf("err == nil; was %v instead", err) - } - if err.Error() != `proto: required field "theRequiredString" not set` { - t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) - } -} - -func TestUnmarshalSucceedsWhenRequiredIsNotPresent(t *testing.T) { - dataOut := RequiredExample{ - TheRequiredString: proto.String("present"), - } - encodedMessage, err := proto.Marshal(&dataOut) - if err != nil { - t.Fatalf("Unexpected error when marshalling dataOut: %v", err) - } - dataIn := RequiredExample{} - err = proto.Unmarshal(encodedMessage, &dataIn) - if err != nil { - t.Fatalf("err != nil; was %v instead", err) - } -} - -func TestUnmarshalPopulatedOptionalFieldsAsRequiredSucceeds(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - dataOut := test.NewPopulatedNidOptNative(r, true) - encodedMessage, err := proto.Marshal(dataOut) - if err != nil { - t.Fatalf("Unexpected error when marshalling dataOut: %v", err) - } - dataIn := NidOptNative{} - err = proto.Unmarshal(encodedMessage, &dataIn) - if err != nil { - t.Fatalf("err != nil; was %v instead", err) - } -} - -func TestUnmarshalPartiallyPopulatedOptionalFieldsFails(t *testing.T) { - // Fill in all fields, then randomly remove one. - dataOut := &test.NinOptNative{ - Field1: proto.Float64(0), - Field2: proto.Float32(0), - Field3: proto.Int32(0), - Field4: proto.Int64(0), - Field5: proto.Uint32(0), - Field6: proto.Uint64(0), - Field7: proto.Int32(0), - Field8: proto.Int64(0), - Field9: proto.Uint32(0), - Field10: proto.Int32(0), - Field11: proto.Uint64(0), - Field12: proto.Int64(0), - Field13: proto.Bool(false), - Field14: proto.String("0"), - Field15: []byte("0"), - } - r := rand.New(rand.NewSource(time.Now().UnixNano())) - fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) - field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) - fieldType := field.Type() - field.Set(reflect.Zero(fieldType)) - encodedMessage, err := proto.Marshal(dataOut) - if err != nil { - t.Fatalf("Unexpected error when marshalling dataOut: %v", err) - } - dataIn := NidOptNative{} - err = proto.Unmarshal(encodedMessage, &dataIn) - if err.Error() != `proto: required field "`+fieldName+`" not set` { - t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) - } -} - -func TestMarshalFailsWithoutAllFieldsSet(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - dataOut := NewPopulatedNinOptNative(r, true) - fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) - field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) - fieldType := field.Type() - field.Set(reflect.Zero(fieldType)) - encodedMessage, err := proto.Marshal(dataOut) - if err.Error() != `proto: required field "`+fieldName+`" not set` { - t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) - } - if len(encodedMessage) > 0 { - t.Fatalf("Got some bytes from marshal, expected none.") - } -} - -func TestMissingFieldsOnRepeatedNestedTypes(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - dataOut := &NestedNinOptNative{ - NestedNinOpts: []*NinOptNative{ - NewPopulatedNinOptNative(r, true), - NewPopulatedNinOptNative(r, true), - NewPopulatedNinOptNative(r, true), - }, - } - middle := dataOut.GetNestedNinOpts()[1] - fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) - field := reflect.ValueOf(middle).Elem().FieldByName(fieldName) - fieldType := field.Type() - field.Set(reflect.Zero(fieldType)) - encodedMessage, err := proto.Marshal(dataOut) - if err.Error() != `proto: required field "`+fieldName+`" not set` { - t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) - } - if len(encodedMessage) > 0 { - t.Fatalf("Got some bytes from marshal, expected none.") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/Makefile deleted file mode 100644 index 4cc62baaad..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. sizeunderscore.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.pb.go deleted file mode 100644 index 60f1ad3f63..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.pb.go +++ /dev/null @@ -1,543 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: sizeunderscore.proto -// DO NOT EDIT! - -/* - Package sizeunderscore is a generated protocol buffer package. - - It is generated from these files: - sizeunderscore.proto - - It has these top-level messages: - SizeMessage -*/ -package sizeunderscore - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type SizeMessage struct { - Size_ *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` - Equal_ *bool `protobuf:"varint,2,opt,name=Equal" json:"Equal,omitempty"` - String_ *string `protobuf:"bytes,3,opt,name=String" json:"String,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SizeMessage) Reset() { *m = SizeMessage{} } -func (m *SizeMessage) String() string { return proto.CompactTextString(m) } -func (*SizeMessage) ProtoMessage() {} - -func (m *SizeMessage) GetSize_() int64 { - if m != nil && m.Size_ != nil { - return *m.Size_ - } - return 0 -} - -func (m *SizeMessage) GetEqual_() bool { - if m != nil && m.Equal_ != nil { - return *m.Equal_ - } - return false -} - -func (m *SizeMessage) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func init() { - proto.RegisterType((*SizeMessage)(nil), "sizeunderscore.SizeMessage") -} -func (this *SizeMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SizeMessage) - if !ok { - that2, ok := that.(SizeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Size_ != nil && that1.Size_ != nil { - if *this.Size_ != *that1.Size_ { - return false - } - } else if this.Size_ != nil { - return false - } else if that1.Size_ != nil { - return false - } - if this.Equal_ != nil && that1.Equal_ != nil { - if *this.Equal_ != *that1.Equal_ { - return false - } - } else if this.Equal_ != nil { - return false - } else if that1.Equal_ != nil { - return false - } - if this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return false - } - } else if this.String_ != nil { - return false - } else if that1.String_ != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *SizeMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SizeMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Size_ != nil { - data[i] = 0x8 - i++ - i = encodeVarintSizeunderscore(data, i, uint64(*m.Size_)) - } - if m.Equal_ != nil { - data[i] = 0x10 - i++ - if *m.Equal_ { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.String_ != nil { - data[i] = 0x1a - i++ - i = encodeVarintSizeunderscore(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Sizeunderscore(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Sizeunderscore(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintSizeunderscore(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSizeMessage(r randySizeunderscore, easy bool) *SizeMessage { - this := &SizeMessage{} - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Size_ = &v1 - } - if r.Intn(10) != 0 { - v2 := bool(bool(r.Intn(2) == 0)) - this.Equal_ = &v2 - } - if r.Intn(10) != 0 { - v3 := randStringSizeunderscore(r) - this.String_ = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedSizeunderscore(r, 4) - } - return this -} - -type randySizeunderscore interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneSizeunderscore(r randySizeunderscore) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringSizeunderscore(r randySizeunderscore) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneSizeunderscore(r) - } - return string(tmps) -} -func randUnrecognizedSizeunderscore(r randySizeunderscore, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldSizeunderscore(data, r, fieldNumber, wire) - } - return data -} -func randFieldSizeunderscore(data []byte, r randySizeunderscore, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateSizeunderscore(data, uint64(v5)) - case 1: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateSizeunderscore(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateSizeunderscore(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *SizeMessage) Size() (n int) { - var l int - _ = l - if m.Size_ != nil { - n += 1 + sovSizeunderscore(uint64(*m.Size_)) - } - if m.Equal_ != nil { - n += 2 - } - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovSizeunderscore(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSizeunderscore(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozSizeunderscore(x uint64) (n int) { - return sovSizeunderscore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SizeMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SizeMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Size_ = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Equal_ = &b - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSizeunderscore - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSizeunderscore(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSizeunderscore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSizeunderscore(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthSizeunderscore - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSizeunderscore(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthSizeunderscore = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSizeunderscore = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.proto deleted file mode 100644 index 75db22ff01..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscore.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto2"; -package sizeunderscore; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.equal_all) = true; - -message SizeMessage { - optional int64 size = 1; - optional bool Equal = 2; - optional string String = 3; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscorepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscorepb_test.go deleted file mode 100644 index 06916fa1c5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/sizeunderscore/sizeunderscorepb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: sizeunderscore.proto -// DO NOT EDIT! - -/* -Package sizeunderscore is a generated protocol buffer package. - -It is generated from these files: - sizeunderscore.proto - -It has these top-level messages: - SizeMessage -*/ -package sizeunderscore - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSizeMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSizeMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSizeMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/Makefile deleted file mode 100644 index ade15ceab8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. tags.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/doc.go deleted file mode 100644 index 2eee961847..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/doc.go +++ /dev/null @@ -1 +0,0 @@ -package tags diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.pb.go deleted file mode 100644 index 8b8febc4ad..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.pb.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: tags.proto -// DO NOT EDIT! - -/* -Package tags is a generated protocol buffer package. - -It is generated from these files: - tags.proto - -It has these top-level messages: - Outside - Inside -*/ -package tags - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Outside struct { - *Inside `protobuf:"bytes,1,opt,name=Inside,embedded=Inside" json:""` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"MyField2" xml:",comment"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Outside) Reset() { *m = Outside{} } -func (m *Outside) String() string { return proto.CompactTextString(m) } -func (*Outside) ProtoMessage() {} - -func (m *Outside) GetField2() string { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return "" -} - -type Inside struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"MyField1" xml:",chardata"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Inside) Reset() { *m = Inside{} } -func (m *Inside) String() string { return proto.CompactTextString(m) } -func (*Inside) ProtoMessage() {} - -func (m *Inside) GetField1() string { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return "" -} - -func init() { - proto.RegisterType((*Outside)(nil), "tags.Outside") - proto.RegisterType((*Inside)(nil), "tags.Inside") -} -func NewPopulatedOutside(r randyTags, easy bool) *Outside { - this := &Outside{} - if r.Intn(10) != 0 { - this.Inside = NewPopulatedInside(r, easy) - } - if r.Intn(10) != 0 { - v1 := randStringTags(r) - this.Field2 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTags(r, 3) - } - return this -} - -func NewPopulatedInside(r randyTags, easy bool) *Inside { - this := &Inside{} - if r.Intn(10) != 0 { - v2 := randStringTags(r) - this.Field1 = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTags(r, 2) - } - return this -} - -type randyTags interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTags(r randyTags) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTags(r randyTags) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneTags(r) - } - return string(tmps) -} -func randUnrecognizedTags(r randyTags, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTags(data, r, fieldNumber, wire) - } - return data -} -func randFieldTags(data []byte, r randyTags, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTags(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateTags(data, uint64(v4)) - case 1: - data = encodeVarintPopulateTags(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTags(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTags(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTags(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTags(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.proto deleted file mode 100644 index e5b3a4faa1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package tags; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.populate_all) = true; - -message Outside { - optional Inside Inside = 1 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; - optional string Field2 = 2 [(gogoproto.jsontag) = "MyField2", (gogoproto.moretags) = "xml:\",comment\""]; -} - -message Inside { - optional string Field1 = 1 [(gogoproto.jsontag) = "MyField1", (gogoproto.moretags) = "xml:\",chardata\""]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags_test.go deleted file mode 100644 index 0ab3ba34ec..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/tags/tags_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package tags - -import ( - "bytes" - "encoding/json" - "encoding/xml" - math_rand "math/rand" - "testing" - "time" -) - -type MyJson struct { - MyField1 string - MyField2 string -} - -func NewPopulatedMyJson(r randyTags) *MyJson { - this := &MyJson{} - if r.Intn(10) != 0 { - this.MyField1 = randStringTags(r) - } - if r.Intn(10) != 0 { - this.MyField2 = randStringTags(r) - } - return this -} - -func TestJson(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedMyJson(popr) - data, err := json.Marshal(msg1) - if err != nil { - panic(err) - } - outside := &Outside{} - err = json.Unmarshal(data, outside) - if err != nil { - panic(err) - } - if outside.GetField1() != msg1.MyField1 { - t.Fatalf("proto field1 %s != %s", outside.GetField1(), msg1.MyField1) - } - if outside.GetField2() != msg1.MyField2 { - t.Fatalf("proto field2 %s != %s", outside.GetField2(), msg1.MyField2) - } - data2, err := json.Marshal(outside) - if err != nil { - panic(err) - } - msg2 := &MyJson{} - err = json.Unmarshal(data2, msg2) - if err != nil { - panic(err) - } - if msg2.MyField1 != msg1.MyField1 { - t.Fatalf("proto field1 %s != %s", msg2.MyField1, msg1.MyField1) - } - if msg2.MyField2 != msg1.MyField2 { - t.Fatalf("proto field2 %s != %s", msg2.MyField2, msg1.MyField2) - } -} - -func TestXml(t *testing.T) { - s := "Field1Value" - field1 := "Field1Value" - field2 := "Field2Value" - msg1 := &Outside{} - err := xml.Unmarshal([]byte(s), msg1) - if err != nil { - panic(err) - } - msg2 := &Outside{ - Inside: &Inside{ - Field1: &field1, - }, - Field2: &field2, - } - if msg1.GetField1() != msg2.GetField1() { - t.Fatalf("field1 expected %s got %s", msg2.GetField1(), msg1.GetField1()) - } - if err != nil { - panic(err) - } - data, err := xml.Marshal(msg2) - if err != nil { - panic(err) - } - if !bytes.Equal(data, []byte(s)) { - t.Fatalf("expected %s got %s", s, string(data)) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/Makefile deleted file mode 100644 index dbfcda56f2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf/gogoproto -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - cp header.proto theproto3.proto - cat maps.proto >> theproto3.proto - cat footer.proto >> theproto3.proto - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. theproto3.proto \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.pb.go deleted file mode 100644 index 23e91d455d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.pb.go +++ /dev/null @@ -1,8969 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/both/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/both/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if m.Data != nil { - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(m.Score))) - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n4, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - return i, nil -} - -func (m *MessageWithMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NameMapping) > 0 { - for k := range m.NameMapping { - data[i] = 0xa - i++ - v := m.NameMapping[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MsgMapping) > 0 { - for k := range m.MsgMapping { - data[i] = 0x12 - i++ - v := m.MsgMapping[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - data[i] = 0x1a - i++ - v := m.ByteMapping[k] - mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - return i, nil -} - -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != 0 { - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(m.F))) - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Score = float32(math.Float32frombits(v)) - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - m.Terrain[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - m.Proto2Value[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - m.NameMapping[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - m.MsgMapping[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - m.ByteMapping[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.F = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.proto deleted file mode 100644 index 5c080ded5c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3pb_test.go deleted file mode 100644 index ecf95df231..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/both/theproto3pb_test.go +++ /dev/null @@ -1,1231 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/both/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.pb.go deleted file mode 100644 index 5189779773..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.pb.go +++ /dev/null @@ -1,6193 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/marshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/marshaler/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if m.Data != nil { - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(m.Score))) - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n4, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - return i, nil -} - -func (m *MessageWithMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NameMapping) > 0 { - for k := range m.NameMapping { - data[i] = 0xa - i++ - v := m.NameMapping[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MsgMapping) > 0 { - for k := range m.MsgMapping { - data[i] = 0x12 - i++ - v := m.MsgMapping[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - data[i] = 0x1a - i++ - v := m.ByteMapping[k] - mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - return i, nil -} - -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != 0 { - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(m.F))) - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.proto deleted file mode 100644 index 37cd6281e6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go deleted file mode 100644 index d8bbad6f79..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go +++ /dev/null @@ -1,1231 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.pb.go deleted file mode 100644 index 8c8d134d39..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.pb.go +++ /dev/null @@ -1,5597 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/neither/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/neither/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.proto deleted file mode 100644 index 8ceec9aad5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3pb_test.go deleted file mode 100644 index 26c4780ad2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/neither/theproto3pb_test.go +++ /dev/null @@ -1,1091 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/neither/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go deleted file mode 100644 index 25a89eb97b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go +++ /dev/null @@ -1,8373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/unmarshaler/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Score = float32(math.Float32frombits(v)) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - m.Terrain[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - m.Proto2Value[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - m.NameMapping[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - m.MsgMapping[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - m.ByteMapping[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.F = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.proto deleted file mode 100644 index 3b3dd59c61..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go deleted file mode 100644 index e18bd4b8f6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go +++ /dev/null @@ -1,1091 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go deleted file mode 100644 index 72bff19838..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go +++ /dev/null @@ -1,8958 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" -import errors "errors" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/unsafeboth/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if m.Data != nil { - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Score - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n4, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - return i, nil -} - -func (m *MessageWithMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NameMapping) > 0 { - for k := range m.NameMapping { - data[i] = 0xa - i++ - v := m.NameMapping[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MsgMapping) > 0 { - for k := range m.MsgMapping { - data[i] = 0x12 - i++ - v := m.MsgMapping[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - data[i] = 0x1a - i++ - v := m.ByteMapping[k] - mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - return i, nil -} - -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != 0 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.F - i += 8 - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - m.Terrain[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - m.Proto2Value[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - m.NameMapping[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - m.MsgMapping[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - m.ByteMapping[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.proto deleted file mode 100644 index 5f2886b6b7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go deleted file mode 100644 index eb8b7b794a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go +++ /dev/null @@ -1,1231 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go deleted file mode 100644 index 29b9b066f8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go +++ /dev/null @@ -1,6196 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafemarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" -import errors "errors" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/unsafemarshaler/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x1}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if m.Data != nil { - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Score - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n4, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(v))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(v))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToEnumMap) > 0 { - for k := range m.StringToEnumMap { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - v := m.StringToEnumMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.StringToMsgMap) > 0 { - for k := range m.StringToMsgMap { - data[i] = 0x8a - i++ - data[i] = 0x1 - i++ - v := m.StringToMsgMap[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - return i, nil -} - -func (m *MessageWithMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NameMapping) > 0 { - for k := range m.NameMapping { - data[i] = 0xa - i++ - v := m.NameMapping[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MsgMapping) > 0 { - for k := range m.MsgMapping { - data[i] = 0x12 - i++ - v := m.MsgMapping[k] - if v == nil { - return 0, errors.New("proto: map has nil element") - } - msgSize := v.Size() - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(v.Size())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - data[i] = 0x1a - i++ - v := m.ByteMapping[k] - mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - return i, nil -} - -func (m *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != 0 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.F - i += 8 - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto deleted file mode 100644 index 0c47048ce3..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go deleted file mode 100644 index b5296e4d15..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go +++ /dev/null @@ -1,1231 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/nilmaps_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/nilmaps_test.go deleted file mode 100644 index fba3d6597c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/nilmaps_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package theproto3 - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - if _, err := proto.Marshal(m); err == nil { - t.Fatalf("expected error") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go deleted file mode 100644 index 05ef13f42e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go +++ /dev/null @@ -1,8360 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/combos/both" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type MapEnum int32 - -const ( - MA MapEnum = 0 - MB MapEnum = 1 - MC MapEnum = 2 -) - -var MapEnum_name = map[int32]string{ - 0: "MA", - 1: "MB", - 2: "MC", -} -var MapEnum_value = map[string]int32{ - "MA": 0, - "MB": 1, - "MC": 2, -} - -type Message_Humour int32 - -const ( - UNKNOWN Message_Humour = 0 - PUNS Message_Humour = 1 - SLAPSTICK Message_Humour = 2 - BILL_BAILEY Message_Humour = 3 -) - -var Message_Humour_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PUNS", - 2: "SLAPSTICK", - 3: "BILL_BAILEY", -} -var Message_Humour_value = map[string]int32{ - "UNKNOWN": 0, - "PUNS": 1, - "SLAPSTICK": 2, - "BILL_BAILEY": 3, -} - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,proto3" json:"height_in_cm,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - ResultCount int64 `protobuf:"varint,7,opt,name=result_count,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (*Message) ProtoMessage() {} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} - -type AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` - StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *AllMaps) Reset() { *m = AllMaps{} } -func (*AllMaps) ProtoMessage() {} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (*MessageWithMap) ProtoMessage() {} - -type FloatingPoint struct { - F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (*FloatingPoint) ProtoMessage() {} - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/test/combos/both/thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }, {Name: func(v string) *string { return &v }("combos/unsafeunmarshaler/theproto3.proto"), - Package: func(v string) *string { return &v }("theproto3"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto", "github.com/gogo/protobuf/test/combos/both/thetest.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Message"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("hilarity"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Humour"), - }, {Name: func(v string) *string { return &v }("height_in_cm"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("data"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("result_count"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("true_scotsman"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("score"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("nested"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }, {Name: func(v string) *string { return &v }("terrain"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.TerrainEntry"), - }, {Name: func(v string) *string { return &v }("proto2_field"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("proto2_value"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Message.Proto2ValueEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("TerrainEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.Nested"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Proto2ValueEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Humour"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("UNKNOWN"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("PUNS"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("SLAPSTICK"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("BILL_BAILEY"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("Nested"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("bunny"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("AllMaps"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToDoubleMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToFloatMap"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToFloatMapEntry"), - }, {Name: func(v string) *string { return &v }("Int32Map"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int32MapEntry"), - }, {Name: func(v string) *string { return &v }("Int64Map"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Int64MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint32Map"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Uint64Map"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Uint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint32Map"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sint64Map"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sint64MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed32Map"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed32Map"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed32MapEntry"), - }, {Name: func(v string) *string { return &v }("Fixed64Map"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Fixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("Sfixed64Map"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.Sfixed64MapEntry"), - }, {Name: func(v string) *string { return &v }("BoolMap"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.BoolMapEntry"), - }, {Name: func(v string) *string { return &v }("StringMap"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToBytesMap"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToBytesMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToEnumMap"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToEnumMapEntry"), - }, {Name: func(v string) *string { return &v }("StringToMsgMap"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.AllMaps.StringToMsgMapEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Int64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Uint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sint64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Fixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("BoolMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".theproto3.MapEnum"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("MessageWithMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_mapping"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.NameMappingEntry"), - }, {Name: func(v string) *string { return &v }("msg_mapping"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.MsgMappingEntry"), - }, {Name: func(v string) *string { return &v }("byte_mapping"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.MessageWithMap.ByteMappingEntry"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NameMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("MsgMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".theproto3.FloatingPoint"), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("ByteMappingEntry"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("FloatingPoint"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("MB"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("MC"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x1})}}, - Syntax: func(v string) *string { return &v }("proto3"), - }}, - } -} -func (x MapEnum) String() string { - s, ok := MapEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Message_Humour) String() string { - s, ok := Message_Humour_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Message) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Message") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Message but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Message but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Hilarity != that1.Hilarity { - return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) - } - if this.HeightInCm != that1.HeightInCm { - return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ResultCount != that1.ResultCount { - return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) - } - if this.TrueScotsman != that1.TrueScotsman { - return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) - } - if this.Score != that1.Score { - return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) - } - if len(this.Key) != len(that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) - } - } - if !this.Nested.Equal(that1.Nested) { - return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) - } - if len(this.Terrain) != len(that1.Terrain) { - return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) - } - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type MessageWithMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(100) - this.Key = make([]uint64, v2) - for i := 0; i < v2; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - if r.Intn(10) != 0 { - this.Nested = NewPopulatedNested(r, easy) - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Terrain = make(map[int64]*Nested) - for i := 0; i < v3; i++ { - this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) - } - } - if r.Intn(10) != 0 { - this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.Proto2Value = make(map[int64]*test.NinOptEnum) - for i := 0; i < v4; i++ { - this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { - this := &Nested{} - this.Bunny = randStringTheproto3(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v5; i++ { - v6 := randStringTheproto3(r) - this.StringToDoubleMap[v6] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v6] *= -1 - } - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v7; i++ { - v8 := randStringTheproto3(r) - this.StringToFloatMap[v8] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v8] *= -1 - } - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v9; i++ { - v10 := int32(r.Int31()) - this.Int32Map[v10] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v10] *= -1 - } - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v11; i++ { - v12 := int64(r.Int63()) - this.Int64Map[v12] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v12] *= -1 - } - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v13; i++ { - v14 := uint32(r.Uint32()) - this.Uint32Map[v14] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v15; i++ { - v16 := uint64(uint64(r.Uint32())) - this.Uint64Map[v16] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v17; i++ { - v18 := int32(r.Int31()) - this.Sint32Map[v18] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v18] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v19; i++ { - v20 := int64(r.Int63()) - this.Sint64Map[v20] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v20] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v21; i++ { - v22 := uint32(r.Uint32()) - this.Fixed32Map[v22] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v23; i++ { - v24 := int32(r.Int31()) - this.Sfixed32Map[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v24] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v25; i++ { - v26 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v27; i++ { - v28 := int64(r.Int63()) - this.Sfixed64Map[v28] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v28] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v29; i++ { - v30 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v31; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v32; i++ { - v33 := r.Intn(100) - v34 := randStringTheproto3(r) - this.StringToBytesMap[v34] = make([]byte, v33) - for i := 0; i < v33; i++ { - this.StringToBytesMap[v34][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v35; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v36; i++ { - this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { - this := &MessageWithMap{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v37; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v38; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v39; i++ { - v40 := r.Intn(100) - v41 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v41] = make([]byte, v40) - for i := 0; i < v40; i++ { - this.ByteMapping[v41][i] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { - this := &FloatingPoint{} - this.F = float64(r.Float64()) - if r.Intn(2) == 0 { - this.F *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTheproto3 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTheproto3(r randyTheproto3) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTheproto3(r randyTheproto3) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneTheproto3(r) - } - return string(tmps) -} -func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTheproto3(data, r, fieldNumber, wire) - } - return data -} -func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v43)) - case 1: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTheproto3(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTheproto3(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTheproto3(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Message) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.Hilarity != 0 { - n += 1 + sovTheproto3(uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - n += 1 + sovTheproto3(uint64(m.HeightInCm)) - } - if m.Data != nil { - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if m.Proto2Field != nil { - l = m.Proto2Field.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Proto2Value) > 0 { - for k, v := range m.Proto2Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Nested) Size() (n int) { - var l int - _ = l - l = len(m.Bunny) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToEnumMap) > 0 { - for k, v := range m.StringToEnumMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.StringToMsgMap) > 0 { - for k, v := range m.StringToMsgMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MessageWithMap) Size() (n int) { - var l int - _ = l - if len(m.NameMapping) > 0 { - for k, v := range m.NameMapping { - _ = k - _ = v - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.MsgMapping) > 0 { - for k, v := range m.MsgMapping { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != 0 { - n += 9 - } - return n -} - -func sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *MessageWithMap) String() string { - if this == nil { - return "nil" - } - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - m.Terrain[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - m.Proto2Value[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - m.StringToDoubleMap[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - m.StringToFloatMap[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - m.Int32Map[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - m.Int64Map[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - m.Uint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - m.Uint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - m.Sint32Map[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - m.Sint64Map[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - m.Fixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - m.Sfixed32Map[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - m.Fixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - m.Sfixed64Map[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - m.BoolMap[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - m.StringMap[mapkey] = mapvalue - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - m.StringToBytesMap[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - m.StringToEnumMap[mapkey] = mapvalue - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - m.StringToMsgMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - m.NameMapping[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - m.MsgMapping[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - m.ByteMapping[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto deleted file mode 100644 index 65d257e91d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go deleted file mode 100644 index 0c0d1be08a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go +++ /dev/null @@ -1,1091 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - MessageWithMap - FloatingPoint -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMessageWithMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/doc.go deleted file mode 100644 index e559a27ba3..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/doc.go +++ /dev/null @@ -1 +0,0 @@ -package theproto3 diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/footer.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/footer.proto deleted file mode 100644 index 53f5cd5cb4..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/footer.proto +++ /dev/null @@ -1,10 +0,0 @@ - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/header.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/header.proto deleted file mode 100644 index b5435da1b7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/header.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/maps.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/maps.proto deleted file mode 100644 index be9df05dd9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/maps.proto +++ /dev/null @@ -1,26 +0,0 @@ - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/theproto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/theproto3.proto deleted file mode 100644 index 8ceec9aad5..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/theproto3/theproto3.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.pb.go deleted file mode 100644 index f89c0a2a19..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.pb.go +++ /dev/null @@ -1,20838 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import strconv "strconv" - -import bytes "bytes" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TheTestEnum int32 - -const ( - A TheTestEnum = 0 - B TheTestEnum = 1 - C TheTestEnum = 2 -) - -var TheTestEnum_name = map[int32]string{ - 0: "A", - 1: "B", - 2: "C", -} -var TheTestEnum_value = map[string]int32{ - "A": 0, - "B": 1, - "C": 2, -} - -func (x TheTestEnum) Enum() *TheTestEnum { - p := new(TheTestEnum) - *p = x - return p -} -func (x TheTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) -} -func (x *TheTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") - if err != nil { - return err - } - *x = TheTestEnum(value) - return nil -} - -type AnotherTestEnum int32 - -const ( - D AnotherTestEnum = 10 - E AnotherTestEnum = 11 -) - -var AnotherTestEnum_name = map[int32]string{ - 10: "D", - 11: "E", -} -var AnotherTestEnum_value = map[string]int32{ - "D": 10, - "E": 11, -} - -func (x AnotherTestEnum) Enum() *AnotherTestEnum { - p := new(AnotherTestEnum) - *p = x - return p -} -func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) -} -func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") - if err != nil { - return err - } - *x = AnotherTestEnum(value) - return nil -} - -type NestedDefinition_NestedEnum int32 - -const ( - TYPE_NESTED NestedDefinition_NestedEnum = 1 -) - -var NestedDefinition_NestedEnum_name = map[int32]string{ - 1: "TYPE_NESTED", -} -var NestedDefinition_NestedEnum_value = map[string]int32{ - "TYPE_NESTED": 1, -} - -func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { - p := new(NestedDefinition_NestedEnum) - *p = x - return p -} -func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) -} -func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") - if err != nil { - return err - } - *x = NestedDefinition_NestedEnum(value) - return nil -} - -type NidOptNative struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNative) Reset() { *m = NidOptNative{} } -func (*NidOptNative) ProtoMessage() {} - -type NinOptNative struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNative) Reset() { *m = NinOptNative{} } -func (*NinOptNative) ProtoMessage() {} - -type NidRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNative) Reset() { *m = NidRepNative{} } -func (*NidRepNative) ProtoMessage() {} - -type NinRepNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNative) Reset() { *m = NinRepNative{} } -func (*NinRepNative) ProtoMessage() {} - -type NidRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } -func (*NidRepPackedNative) ProtoMessage() {} - -type NinRepPackedNative struct { - Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } -func (*NinRepPackedNative) ProtoMessage() {} - -type NidOptStruct struct { - Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } -func (*NidOptStruct) ProtoMessage() {} - -type NinOptStruct struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } -func (*NinOptStruct) ProtoMessage() {} - -type NidRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } -func (*NidRepStruct) ProtoMessage() {} - -type NinRepStruct struct { - Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } -func (*NinRepStruct) ProtoMessage() {} - -type NidEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } -func (*NidEmbeddedStruct) ProtoMessage() {} - -type NinEmbeddedStruct struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } -func (*NinEmbeddedStruct) ProtoMessage() {} - -type NidNestedStruct struct { - Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } -func (*NidNestedStruct) ProtoMessage() {} - -type NinNestedStruct struct { - Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } -func (*NinNestedStruct) ProtoMessage() {} - -type NidOptCustom struct { - Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } -func (*NidOptCustom) ProtoMessage() {} - -type CustomDash struct { - Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomDash) Reset() { *m = CustomDash{} } -func (*CustomDash) ProtoMessage() {} - -type NinOptCustom struct { - Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } -func (*NinOptCustom) ProtoMessage() {} - -type NidRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } -func (*NidRepCustom) ProtoMessage() {} - -type NinRepCustom struct { - Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } -func (*NinRepCustom) ProtoMessage() {} - -type NinOptNativeUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } -func (*NinOptNativeUnion) ProtoMessage() {} - -type NinOptStructUnion struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } -func (*NinOptStructUnion) ProtoMessage() {} - -type NinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } -func (*NinEmbeddedStructUnion) ProtoMessage() {} - -type NinNestedStructUnion struct { - Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } -func (*NinNestedStructUnion) ProtoMessage() {} - -type Tree struct { - Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (*Tree) ProtoMessage() {} - -type OrBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OrBranch) Reset() { *m = OrBranch{} } -func (*OrBranch) ProtoMessage() {} - -type AndBranch struct { - Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndBranch) Reset() { *m = AndBranch{} } -func (*AndBranch) ProtoMessage() {} - -type Leaf struct { - Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Leaf) Reset() { *m = Leaf{} } -func (*Leaf) ProtoMessage() {} - -type DeepTree struct { - Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepTree) Reset() { *m = DeepTree{} } -func (*DeepTree) ProtoMessage() {} - -type ADeepBranch struct { - Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } -func (*ADeepBranch) ProtoMessage() {} - -type AndDeepBranch struct { - Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } -func (*AndDeepBranch) ProtoMessage() {} - -type DeepLeaf struct { - Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } -func (*DeepLeaf) ProtoMessage() {} - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} - -type NidOptEnum struct { - Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } -func (*NidOptEnum) ProtoMessage() {} - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -type Timer struct { - Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (*Timer) ProtoMessage() {} - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} - -var extRange_MyExtendable = []proto.ExtensionRange{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} -func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} -func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } -func (*NestedDefinition) ProtoMessage() {} - -type NestedDefinition_NestedMessage struct { - NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } -func (*NestedDefinition_NestedMessage) ProtoMessage() {} - -type NestedDefinition_NestedMessage_NestedNestedMsg struct { - NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { - *m = NestedDefinition_NestedMessage_NestedNestedMsg{} -} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} - -type NestedScope struct { - A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NestedScope) Reset() { *m = NestedScope{} } -func (*NestedScope) ProtoMessage() {} - -type NinOptNativeDefault struct { - Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } -func (*NinOptNativeDefault) ProtoMessage() {} - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomContainer) Reset() { *m = CustomContainer{} } -func (*CustomContainer) ProtoMessage() {} - -type CustomNameNidOptNative struct { - FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } -func (*CustomNameNidOptNative) ProtoMessage() {} - -type CustomNameNinOptNative struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } -func (*CustomNameNinOptNative) ProtoMessage() {} - -type CustomNameNinRepNative struct { - FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } -func (*CustomNameNinRepNative) ProtoMessage() {} - -type CustomNameNinStruct struct { - FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } -func (*CustomNameNinStruct) ProtoMessage() {} - -type CustomNameCustomType struct { - FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } -func (*CustomNameCustomType) ProtoMessage() {} - -type CustomNameNinEmbeddedStructUnion struct { - *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } -func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} - -type CustomNameEnum struct { - FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } -func (*CustomNameEnum) ProtoMessage() {} - -type NoExtensionsMap struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } -func (*NoExtensionsMap) ProtoMessage() {} - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *Unrecognized) Reset() { *m = Unrecognized{} } -func (*Unrecognized) ProtoMessage() {} - -type UnrecognizedWithInner struct { - Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } -func (*UnrecognizedWithInner) ProtoMessage() {} - -type UnrecognizedWithInner_Inner struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } -func (*UnrecognizedWithInner_Inner) ProtoMessage() {} - -type UnrecognizedWithEmbed struct { - UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` - Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } -func (*UnrecognizedWithEmbed) ProtoMessage() {} - -type UnrecognizedWithEmbed_Embedded struct { - Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` -} - -func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } -func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) - proto.RegisterExtension(E_FieldA) - proto.RegisterExtension(E_FieldB) - proto.RegisterExtension(E_FieldC) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("thetest.proto"), - Package: func(v string) *string { return &v }("test"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NinRepPackedNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }}, - }, {Name: func(v string) *string { return &v }("NidOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - }, {Name: func(v string) *string { return &v }("NidEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }, {Name: func(v string) *string { return &v }("NidNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidRepStruct"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinNestedStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStruct"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinRepStruct"), - }}, - }, {Name: func(v string) *string { return &v }("NidOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomDash"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NidRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepCustom"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinOptStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("NinNestedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNativeUnion"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptStructUnion"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStructUnion"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Tree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Or"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.OrBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Leaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OrBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Leaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("StrValue"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepTree"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.ADeepBranch"), - }, {Name: func(v string) *string { return &v }("And"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.AndDeepBranch"), - }, {Name: func(v string) *string { return &v }("Leaf"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepLeaf"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("ADeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Down"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("AndDeepBranch"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Left"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Right"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.DeepTree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("DeepLeaf"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Tree"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.Tree"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("Nil")}, {Name: func(v string) *string { return &v }("NidOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NidRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("NinRepEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - DefaultValue: func(v string) *string { return &v }("C"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - }}, - }, {Name: func(v string) *string { return &v }("AnotherNinOptEnumDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.AnotherTestEnum"), - DefaultValue: func(v string) *string { return &v }("E"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Timer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Time1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Time2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Data"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("MyExtendable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OtherExtenable"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("M"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.MyExtendable"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(14), - End: func(v int32) *int32 { return &v }(17), - }, {Start: func(v int32) *int32 { return &v }(10), - End: func(v int32) *int32 { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("NestedDefinition"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("EnumField"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("NM"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedMessage"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedField1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - }, {Name: func(v string) *string { return &v }("NNM"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedMsg"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("NestedNestedField1"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("NestedEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_NESTED"), - Number: func(v int32) *int32 { return &v }(1), - }}, - }}, - }, {Name: func(v string) *string { return &v }("NestedScope"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage.NestedNestedMsg"), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedEnum"), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NestedDefinition.NestedMessage"), - }}, - }, {Name: func(v string) *string { return &v }("NinOptNativeDefault"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - DefaultValue: func(v string) *string { return &v }("1234.1234"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("true"), - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - DefaultValue: func(v string) *string { return &v }("1234"), - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64001: proto.NewExtension([]byte{0x88, 0xa0, 0x1f, 0x1}), 64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("CustomContainer"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("CustomStruct"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptCustom"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNidOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinOptNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x5, 0x46, 0x69, 0x65, 0x6c, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinRepNative"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(18), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field9"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(7), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field10"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(15), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }, {Name: func(v string) *string { return &v }("Field11"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(6), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4b})}}, - }, {Name: func(v string) *string { return &v }("Field12"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(16), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4c})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinStruct"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45})}}, - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(17), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x46})}}, - }, {Name: func(v string) *string { return &v }("Field8"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47})}}, - }, {Name: func(v string) *string { return &v }("Field13"), - Number: func(v int32) *int32 { return &v }(13), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48})}}, - }, {Name: func(v string) *string { return &v }("Field14"), - Number: func(v int32) *int32 { return &v }(14), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49})}}, - }, {Name: func(v string) *string { return &v }("Field15"), - Number: func(v int32) *int32 { return &v }(15), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameCustomType"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Id"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }, {Name: func(v string) *string { return &v }("Ids"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x4, 0x55, 0x75, 0x69, 0x64}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43})}}, - }, {Name: func(v string) *string { return &v }("Values"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65003: proto.NewExtension([]byte{0xda, 0xde, 0x1f, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38}), 65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44})}}, - }}, - }, {Name: func(v string) *string { return &v }("CustomNameNinEmbeddedStructUnion"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NidOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field200"), - Number: func(v int32) *int32 { return &v }(200), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field210"), - Number: func(v int32) *int32 { return &v }(210), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64009: proto.NewExtension([]byte{0xc8, 0xa0, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("CustomNameEnum"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x41})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".test.TheTestEnum"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65004: proto.NewExtension([]byte{0xe2, 0xde, 0x1f, 0x6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42})}}, - }}, - }, {Name: func(v string) *string { return &v }("NoExtensionsMap"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(100), - End: func(v int32) *int32 { return &v }(200), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64005: proto.NewExtension([]byte{0xa8, 0xa0, 0x1f, 0x0}), 64025: proto.NewExtension([]byte{0xc8, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("Unrecognized"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithInner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithInner.Inner"), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Inner"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }, {Name: func(v string) *string { return &v }("UnrecognizedWithEmbed"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("embedded"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.UnrecognizedWithEmbed.Embedded"), - Options: &descriptor.FieldOptions{XXX_extensions: map[int32]proto.Extension{65001: proto.NewExtension([]byte{0xc8, 0xde, 0x1f, 0x0}), 65002: proto.NewExtension([]byte{0xd0, 0xde, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Embedded"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }}, - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("TheTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("AnotherTestEnum"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("E"), - Number: func(v int32) *int32 { return &v }(11), - }}, - Options: &descriptor.EnumOptions{XXX_extensions: map[int32]proto.Extension{62001: proto.NewExtension([]byte{0x88, 0xa3, 0x1e, 0x0})}}, - }}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("FieldA"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldB"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldC"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.MyExtendable"), - }, {Name: func(v string) *string { return &v }("FieldA1"), - Number: func(v int32) *int32 { return &v }(100), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldB1"), - Number: func(v int32) *int32 { return &v }(101), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinOptNative"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }, {Name: func(v string) *string { return &v }("FieldC1"), - Number: func(v int32) *int32 { return &v }(102), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".test.NinEmbeddedStruct"), - Extendee: func(v string) *string { return &v }(".test.NoExtensionsMap"), - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x0}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}}, - }}, - } -} -func (x TheTestEnum) String() string { - s, ok := TheTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x AnotherTestEnum) String() string { - s, ok := AnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x NestedDefinition_NestedEnum) String() string { - s, ok := NestedDefinition_NestedEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *NidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Timer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Timer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Timer but is not nil && this == nil") - } - if this.Time1 != that1.Time1 { - return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) - } - if this.Time2 != that1.Time2 { - return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Timer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyExtendable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OtherExtenable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OtherExtenable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if !this.M.Equal(that1.M) { - return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) - } - } else { - return fmt.Errorf("XXX_extensions[%v] Not In that", k) - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return fmt.Errorf("XXX_extensions[%v] Not In this", k) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OtherExtenable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - for k, v := range this.XXX_extensions { - if v2, ok := that1.XXX_extensions[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range that1.XXX_extensions { - if _, ok := this.XXX_extensions[k]; !ok { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) - } - } else if this.EnumField != nil { - return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") - } else if that1.EnumField != nil { - return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !this.NM.Equal(that1.NM) { - return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NidRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinRepEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type TimerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+strings.Replace(fmt.Sprintf("%#v", this.Field3), `&`, ``, 1)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+strings.Replace(fmt.Sprintf("%#v", this.Field4), `&`, ``, 1)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+strings.Replace(fmt.Sprintf("%#v", this.Field8), `&`, ``, 1)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+strings.Replace(fmt.Sprintf("%#v", this.Field2), `&`, ``, 1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinNestedStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidOptCustom{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomDash) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomDash{") - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinOptCustom{") - if this.Id != nil { - s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepCustom) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NinRepCustom{") - if this.Id != nil { - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptNativeUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&test.NinOptStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinNestedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinNestedStructUnion{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Tree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Tree{") - if this.Or != nil { - s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OrBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.OrBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Leaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Leaf{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepTree) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.DeepTree{") - if this.Down != nil { - s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") - } - if this.And != nil { - s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") - } - if this.Leaf != nil { - s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ADeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ADeepBranch{") - s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AndDeepBranch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.AndDeepBranch{") - s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeepLeaf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.DeepLeaf{") - s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nil) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.Nil{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptEnum{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AnotherNinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Timer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.Timer{") - s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") - s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MyExtendable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.MyExtendable{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OtherExtenable) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.OtherExtenable{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") - } - if this.M != nil { - s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.NestedDefinition{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.EnumField != nil { - s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringThetest(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(100) - this.Field1 = make([]float64, v17) - for i := 0; i < v17; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(100) - this.Field2 = make([]float32, v18) - for i := 0; i < v18; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(100) - this.Field3 = make([]int32, v19) - for i := 0; i < v19; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(100) - this.Field4 = make([]int64, v20) - for i := 0; i < v20; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field5 = make([]uint32, v21) - for i := 0; i < v21; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Field6 = make([]uint64, v22) - for i := 0; i < v22; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field7 = make([]int32, v23) - for i := 0; i < v23; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(100) - this.Field8 = make([]int64, v24) - for i := 0; i < v24; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field9 = make([]uint32, v25) - for i := 0; i < v25; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(100) - this.Field10 = make([]int32, v26) - for i := 0; i < v26; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v27 := r.Intn(100) - this.Field11 = make([]uint64, v27) - for i := 0; i < v27; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(100) - this.Field12 = make([]int64, v28) - for i := 0; i < v28; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Field13 = make([]bool, v29) - for i := 0; i < v29; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.Field14 = make([]string, v30) - for i := 0; i < v30; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Field15 = make([][]byte, v31) - for i := 0; i < v31; i++ { - v32 := r.Intn(100) - this.Field15[i] = make([]byte, v32) - for j := 0; j < v32; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { - this := &NinRepNative{} - if r.Intn(10) != 0 { - v33 := r.Intn(100) - this.Field1 = make([]float64, v33) - for i := 0; i < v33; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v34 := r.Intn(100) - this.Field2 = make([]float32, v34) - for i := 0; i < v34; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v35 := r.Intn(100) - this.Field3 = make([]int32, v35) - for i := 0; i < v35; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Field4 = make([]int64, v36) - for i := 0; i < v36; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(100) - this.Field5 = make([]uint32, v37) - for i := 0; i < v37; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(100) - this.Field6 = make([]uint64, v38) - for i := 0; i < v38; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(100) - this.Field7 = make([]int32, v39) - for i := 0; i < v39; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(100) - this.Field8 = make([]int64, v40) - for i := 0; i < v40; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Field9 = make([]uint32, v41) - for i := 0; i < v41; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(100) - this.Field10 = make([]int32, v42) - for i := 0; i < v42; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Field11 = make([]uint64, v43) - for i := 0; i < v43; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(100) - this.Field12 = make([]int64, v44) - for i := 0; i < v44; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(100) - this.Field13 = make([]bool, v45) - for i := 0; i < v45; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Field14 = make([]string, v46) - for i := 0; i < v46; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(100) - this.Field15 = make([][]byte, v47) - for i := 0; i < v47; i++ { - v48 := r.Intn(100) - this.Field15[i] = make([]byte, v48) - for j := 0; j < v48; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { - this := &NidRepPackedNative{} - if r.Intn(10) != 0 { - v49 := r.Intn(100) - this.Field1 = make([]float64, v49) - for i := 0; i < v49; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(100) - this.Field2 = make([]float32, v50) - for i := 0; i < v50; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(100) - this.Field3 = make([]int32, v51) - for i := 0; i < v51; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(100) - this.Field4 = make([]int64, v52) - for i := 0; i < v52; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(100) - this.Field5 = make([]uint32, v53) - for i := 0; i < v53; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(100) - this.Field6 = make([]uint64, v54) - for i := 0; i < v54; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(100) - this.Field7 = make([]int32, v55) - for i := 0; i < v55; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(100) - this.Field8 = make([]int64, v56) - for i := 0; i < v56; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(100) - this.Field9 = make([]uint32, v57) - for i := 0; i < v57; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(100) - this.Field10 = make([]int32, v58) - for i := 0; i < v58; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(100) - this.Field11 = make([]uint64, v59) - for i := 0; i < v59; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(100) - this.Field12 = make([]int64, v60) - for i := 0; i < v60; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(100) - this.Field13 = make([]bool, v61) - for i := 0; i < v61; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { - this := &NinRepPackedNative{} - if r.Intn(10) != 0 { - v62 := r.Intn(100) - this.Field1 = make([]float64, v62) - for i := 0; i < v62; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(100) - this.Field2 = make([]float32, v63) - for i := 0; i < v63; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(100) - this.Field3 = make([]int32, v64) - for i := 0; i < v64; i++ { - this.Field3[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(100) - this.Field4 = make([]int64, v65) - for i := 0; i < v65; i++ { - this.Field4[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v66 := r.Intn(100) - this.Field5 = make([]uint32, v66) - for i := 0; i < v66; i++ { - this.Field5[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(100) - this.Field6 = make([]uint64, v67) - for i := 0; i < v67; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(100) - this.Field7 = make([]int32, v68) - for i := 0; i < v68; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(100) - this.Field8 = make([]int64, v69) - for i := 0; i < v69; i++ { - this.Field8[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(100) - this.Field9 = make([]uint32, v70) - for i := 0; i < v70; i++ { - this.Field9[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(100) - this.Field10 = make([]int32, v71) - for i := 0; i < v71; i++ { - this.Field10[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v72 := r.Intn(100) - this.Field11 = make([]uint64, v72) - for i := 0; i < v72; i++ { - this.Field11[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v73 := r.Intn(100) - this.Field12 = make([]int64, v73) - for i := 0; i < v73; i++ { - this.Field12[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v74 := r.Intn(100) - this.Field13 = make([]bool, v74) - for i := 0; i < v74; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 14) - } - return this -} - -func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - v75 := NewPopulatedNidOptNative(r, easy) - this.Field3 = *v75 - v76 := NewPopulatedNinOptNative(r, easy) - this.Field4 = *v76 - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - v77 := NewPopulatedNidOptNative(r, easy) - this.Field8 = *v77 - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(100) - this.Field1 = make([]float64, v86) - for i := 0; i < v86; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v87 := r.Intn(100) - this.Field2 = make([]float32, v87) - for i := 0; i < v87; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v88 := r.Intn(10) - this.Field3 = make([]NidOptNative, v88) - for i := 0; i < v88; i++ { - v89 := NewPopulatedNidOptNative(r, easy) - this.Field3[i] = *v89 - } - } - if r.Intn(10) != 0 { - v90 := r.Intn(10) - this.Field4 = make([]NinOptNative, v90) - for i := 0; i < v90; i++ { - v91 := NewPopulatedNinOptNative(r, easy) - this.Field4[i] = *v91 - } - } - if r.Intn(10) != 0 { - v92 := r.Intn(100) - this.Field6 = make([]uint64, v92) - for i := 0; i < v92; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v93 := r.Intn(100) - this.Field7 = make([]int32, v93) - for i := 0; i < v93; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v94 := r.Intn(10) - this.Field8 = make([]NidOptNative, v94) - for i := 0; i < v94; i++ { - v95 := NewPopulatedNidOptNative(r, easy) - this.Field8[i] = *v95 - } - } - if r.Intn(10) != 0 { - v96 := r.Intn(100) - this.Field13 = make([]bool, v96) - for i := 0; i < v96; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v97 := r.Intn(10) - this.Field14 = make([]string, v97) - for i := 0; i < v97; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(100) - this.Field15 = make([][]byte, v98) - for i := 0; i < v98; i++ { - v99 := r.Intn(100) - this.Field15[i] = make([]byte, v99) - for j := 0; j < v99; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { - this := &NinRepStruct{} - if r.Intn(10) != 0 { - v100 := r.Intn(100) - this.Field1 = make([]float64, v100) - for i := 0; i < v100; i++ { - this.Field1[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v101 := r.Intn(100) - this.Field2 = make([]float32, v101) - for i := 0; i < v101; i++ { - this.Field2[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v102 := r.Intn(10) - this.Field3 = make([]*NidOptNative, v102) - for i := 0; i < v102; i++ { - this.Field3[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v103 := r.Intn(10) - this.Field4 = make([]*NinOptNative, v103) - for i := 0; i < v103; i++ { - this.Field4[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v104 := r.Intn(100) - this.Field6 = make([]uint64, v104) - for i := 0; i < v104; i++ { - this.Field6[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v105 := r.Intn(100) - this.Field7 = make([]int32, v105) - for i := 0; i < v105; i++ { - this.Field7[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v106 := r.Intn(10) - this.Field8 = make([]*NidOptNative, v106) - for i := 0; i < v106; i++ { - this.Field8[i] = NewPopulatedNidOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v107 := r.Intn(100) - this.Field13 = make([]bool, v107) - for i := 0; i < v107; i++ { - this.Field13[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v108 := r.Intn(10) - this.Field14 = make([]string, v108) - for i := 0; i < v108; i++ { - this.Field14[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(100) - this.Field15 = make([][]byte, v109) - for i := 0; i < v109; i++ { - v110 := r.Intn(100) - this.Field15[i] = make([]byte, v110) - for j := 0; j < v110; j++ { - this.Field15[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - v111 := NewPopulatedNidOptNative(r, easy) - this.Field200 = *v111 - this.Field210 = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - if r.Intn(10) != 0 { - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field200 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v112 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v112 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 211) - } - return this -} - -func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { - this := &NidNestedStruct{} - v113 := NewPopulatedNidOptStruct(r, easy) - this.Field1 = *v113 - if r.Intn(10) != 0 { - v114 := r.Intn(10) - this.Field2 = make([]NidRepStruct, v114) - for i := 0; i < v114; i++ { - v115 := NewPopulatedNidRepStruct(r, easy) - this.Field2[i] = *v115 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { - this := &NinNestedStruct{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedNinOptStruct(r, easy) - } - if r.Intn(10) != 0 { - v116 := r.Intn(10) - this.Field2 = make([]*NinRepStruct, v116) - for i := 0; i < v116; i++ { - this.Field2[i] = NewPopulatedNinRepStruct(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { - this := &NidOptCustom{} - v117 := NewPopulatedUuid(r) - this.Id = *v117 - v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value = *v118 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { - this := &CustomDash{} - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { - this := &NinOptCustom{} - if r.Intn(10) != 0 { - this.Id = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { - this := &NidRepCustom{} - if r.Intn(10) != 0 { - v119 := r.Intn(10) - this.Id = make([]Uuid, v119) - for i := 0; i < v119; i++ { - v120 := NewPopulatedUuid(r) - this.Id[i] = *v120 - } - } - if r.Intn(10) != 0 { - v121 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) - for i := 0; i < v121; i++ { - v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v122 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { - this := &NinRepCustom{} - if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Id = make([]Uuid, v123) - for i := 0; i < v123; i++ { - v124 := NewPopulatedUuid(r) - this.Id[i] = *v124 - } - } - if r.Intn(10) != 0 { - v125 := r.Intn(10) - this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) - for i := 0; i < v125; i++ { - v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Value[i] = *v126 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v127 := float64(r.Float64()) - if r.Intn(2) == 0 { - v127 *= -1 - } - this.Field1 = &v127 - case 1: - v128 := float32(r.Float32()) - if r.Intn(2) == 0 { - v128 *= -1 - } - this.Field2 = &v128 - case 2: - v129 := int32(r.Int31()) - if r.Intn(2) == 0 { - v129 *= -1 - } - this.Field3 = &v129 - case 3: - v130 := int64(r.Int63()) - if r.Intn(2) == 0 { - v130 *= -1 - } - this.Field4 = &v130 - case 4: - v131 := uint32(r.Uint32()) - this.Field5 = &v131 - case 5: - v132 := uint64(uint64(r.Uint32())) - this.Field6 = &v132 - case 6: - v133 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v133 - case 7: - v134 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v153) - for i := 0; i < v153; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v154 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v154) - for i := 0; i < v154; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v155 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v155 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v156 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v156 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v157 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v157 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedTimer(r randyThetest, easy bool) *Timer { - this := &Timer{} - this.Time1 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time1 *= -1 - } - this.Time2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time2 *= -1 - } - v158 := r.Intn(100) - this.Data = make([]byte, v158) - for i := 0; i < v158; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { - this := &MyExtendable{} - if r.Intn(10) != 0 { - v159 := int64(r.Int63()) - if r.Intn(2) == 0 { - v159 *= -1 - } - this.Field1 = &v159 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - v160 := int64(r.Int63()) - if r.Intn(2) == 0 { - v160 *= -1 - } - this.Field2 = &v160 - } - if r.Intn(10) != 0 { - v161 := int64(r.Int63()) - if r.Intn(2) == 0 { - v161 *= -1 - } - this.Field13 = &v161 - } - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - eIndex := r.Intn(2) - fieldNumber := 0 - switch eIndex { - case 0: - fieldNumber = r.Intn(3) + 14 - case 1: - fieldNumber = r.Intn(3) + 10 - } - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - v162 := int64(r.Int63()) - if r.Intn(2) == 0 { - v162 *= -1 - } - this.Field1 = &v162 - } - if r.Intn(10) != 0 { - v163 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v163 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - if r.Intn(10) != 0 { - v164 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v164 - } - if r.Intn(10) != 0 { - this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if r.Intn(10) != 0 { - v165 := randStringThetest(r) - this.NestedNestedField1 = &v165 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 11) - } - return this -} - -func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { - this := &NestedScope{} - if r.Intn(10) != 0 { - this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) - } - if r.Intn(10) != 0 { - v166 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v166 - } - if r.Intn(10) != 0 { - this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { - this := &NinOptNativeDefault{} - if r.Intn(10) != 0 { - v167 := float64(r.Float64()) - if r.Intn(2) == 0 { - v167 *= -1 - } - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := float32(r.Float32()) - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := int32(r.Int31()) - if r.Intn(2) == 0 { - v169 *= -1 - } - this.Field3 = &v169 - } - if r.Intn(10) != 0 { - v170 := int64(r.Int63()) - if r.Intn(2) == 0 { - v170 *= -1 - } - this.Field4 = &v170 - } - if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Field5 = &v171 - } - if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.Field6 = &v172 - } - if r.Intn(10) != 0 { - v173 := int32(r.Int31()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field7 = &v173 - } - if r.Intn(10) != 0 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field8 = &v174 - } - if r.Intn(10) != 0 { - v175 := uint32(r.Uint32()) - this.Field9 = &v175 - } - if r.Intn(10) != 0 { - v176 := int32(r.Int31()) - if r.Intn(2) == 0 { - v176 *= -1 - } - this.Field10 = &v176 - } - if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.Field11 = &v177 - } - if r.Intn(10) != 0 { - v178 := int64(r.Int63()) - if r.Intn(2) == 0 { - v178 *= -1 - } - this.Field12 = &v178 - } - if r.Intn(10) != 0 { - v179 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v179 - } - if r.Intn(10) != 0 { - v180 := randStringThetest(r) - this.Field14 = &v180 - } - if r.Intn(10) != 0 { - v181 := r.Intn(100) - this.Field15 = make([]byte, v181) - for i := 0; i < v181; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { - this := &CustomContainer{} - v182 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v182 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA *= -1 - } - this.FieldB = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB *= -1 - } - this.FieldC = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC *= -1 - } - this.FieldD = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD *= -1 - } - this.FieldE = uint32(r.Uint32()) - this.FieldF = uint64(uint64(r.Uint32())) - this.FieldG = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG *= -1 - } - this.FieldH = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH *= -1 - } - this.FieldI = uint32(r.Uint32()) - this.FieldJ = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ *= -1 - } - this.FieldK = uint64(uint64(r.Uint32())) - this.FieldL = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL *= -1 - } - this.FieldM = bool(bool(r.Intn(2) == 0)) - this.FieldN = randStringThetest(r) - v183 := r.Intn(100) - this.FieldO = make([]byte, v183) - for i := 0; i < v183; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - if r.Intn(10) != 0 { - v184 := float64(r.Float64()) - if r.Intn(2) == 0 { - v184 *= -1 - } - this.FieldA = &v184 - } - if r.Intn(10) != 0 { - v185 := float32(r.Float32()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.FieldB = &v185 - } - if r.Intn(10) != 0 { - v186 := int32(r.Int31()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.FieldC = &v186 - } - if r.Intn(10) != 0 { - v187 := int64(r.Int63()) - if r.Intn(2) == 0 { - v187 *= -1 - } - this.FieldD = &v187 - } - if r.Intn(10) != 0 { - v188 := uint32(r.Uint32()) - this.FieldE = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.FieldF = &v189 - } - if r.Intn(10) != 0 { - v190 := int32(r.Int31()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.FieldG = &v190 - } - if r.Intn(10) != 0 { - v191 := int64(r.Int63()) - if r.Intn(2) == 0 { - v191 *= -1 - } - this.FieldH = &v191 - } - if r.Intn(10) != 0 { - v192 := uint32(r.Uint32()) - this.FieldI = &v192 - } - if r.Intn(10) != 0 { - v193 := int32(r.Int31()) - if r.Intn(2) == 0 { - v193 *= -1 - } - this.FieldJ = &v193 - } - if r.Intn(10) != 0 { - v194 := uint64(uint64(r.Uint32())) - this.FieldK = &v194 - } - if r.Intn(10) != 0 { - v195 := int64(r.Int63()) - if r.Intn(2) == 0 { - v195 *= -1 - } - this.FielL = &v195 - } - if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v196 - } - if r.Intn(10) != 0 { - v197 := randStringThetest(r) - this.FieldN = &v197 - } - if r.Intn(10) != 0 { - v198 := r.Intn(100) - this.FieldO = make([]byte, v198) - for i := 0; i < v198; i++ { - this.FieldO[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.FieldA = make([]float64, v199) - for i := 0; i < v199; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v200 := r.Intn(100) - this.FieldB = make([]float32, v200) - for i := 0; i < v200; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v201 := r.Intn(100) - this.FieldC = make([]int32, v201) - for i := 0; i < v201; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v202 := r.Intn(100) - this.FieldD = make([]int64, v202) - for i := 0; i < v202; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v203 := r.Intn(100) - this.FieldE = make([]uint32, v203) - for i := 0; i < v203; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v204 := r.Intn(100) - this.FieldF = make([]uint64, v204) - for i := 0; i < v204; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v205 := r.Intn(100) - this.FieldG = make([]int32, v205) - for i := 0; i < v205; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v206 := r.Intn(100) - this.FieldH = make([]int64, v206) - for i := 0; i < v206; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v207 := r.Intn(100) - this.FieldI = make([]uint32, v207) - for i := 0; i < v207; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.FieldJ = make([]int32, v208) - for i := 0; i < v208; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v209 := r.Intn(100) - this.FieldK = make([]uint64, v209) - for i := 0; i < v209; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldL = make([]int64, v210) - for i := 0; i < v210; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v211 := r.Intn(100) - this.FieldM = make([]bool, v211) - for i := 0; i < v211; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldN = make([]string, v212) - for i := 0; i < v212; i++ { - this.FieldN[i] = randStringThetest(r) - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(100) - this.FieldO = make([][]byte, v213) - for i := 0; i < v213; i++ { - v214 := r.Intn(100) - this.FieldO[i] = make([]byte, v214) - for j := 0; j < v214; j++ { - this.FieldO[i][j] = byte(r.Intn(256)) - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - if r.Intn(10) != 0 { - v215 := float64(r.Float64()) - if r.Intn(2) == 0 { - v215 *= -1 - } - this.FieldA = &v215 - } - if r.Intn(10) != 0 { - v216 := float32(r.Float32()) - if r.Intn(2) == 0 { - v216 *= -1 - } - this.FieldB = &v216 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldD = make([]*NinOptNative, v217) - for i := 0; i < v217; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v218 := uint64(uint64(r.Uint32())) - this.FieldE = &v218 - } - if r.Intn(10) != 0 { - v219 := int32(r.Int31()) - if r.Intn(2) == 0 { - v219 *= -1 - } - this.FieldF = &v219 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v220 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v220 - } - if r.Intn(10) != 0 { - v221 := randStringThetest(r) - this.FieldI = &v221 - } - if r.Intn(10) != 0 { - v222 := r.Intn(100) - this.FieldJ = make([]byte, v222) - for i := 0; i < v222; i++ { - this.FieldJ[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { - this := &CustomNameCustomType{} - if r.Intn(10) != 0 { - this.FieldA = NewPopulatedUuid(r) - } - if r.Intn(10) != 0 { - this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldC = make([]Uuid, v223) - for i := 0; i < v223; i++ { - v224 := NewPopulatedUuid(r) - this.FieldC[i] = *v224 - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v225) - for i := 0; i < v225; i++ { - v226 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v226 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 5) - } - return this -} - -func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.FieldA = NewPopulatedNinOptNative(r, easy) - case 2: - v227 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v227 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v228 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v228 - } - if r.Intn(10) != 0 { - v229 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v229) - for i := 0; i < v229; i++ { - this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { - this := &NoExtensionsMap{} - if r.Intn(10) != 0 { - v230 := int64(r.Int63()) - if r.Intn(2) == 0 { - v230 *= -1 - } - this.Field1 = &v230 - } - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(100) + 100 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldThetest(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v231 := randStringThetest(r) - this.Field1 = &v231 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v232 := r.Intn(10) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v232) - for i := 0; i < v232; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v233 := randStringThetest(r) - this.Field2 = &v233 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - if r.Intn(10) != 0 { - v234 := uint32(r.Uint32()) - this.Field1 = &v234 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v235 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v235 - if r.Intn(10) != 0 { - v236 := randStringThetest(r) - this.Field2 = &v236 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - if r.Intn(10) != 0 { - v237 := uint32(r.Uint32()) - this.Field1 = &v237 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyThetest interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneThetest(r randyThetest) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringThetest(r randyThetest) string { - v238 := r.Intn(100) - tmps := make([]rune, v238) - for i := 0; i < v238; i++ { - tmps[i] = randUTF8RuneThetest(r) - } - return string(tmps) -} -func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldThetest(data, r, fieldNumber, wire) - } - return data -} -func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateThetest(data, uint64(key)) - v239 := r.Int63() - if r.Intn(2) == 0 { - v239 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v239)) - case 1: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateThetest(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateThetest(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateThetest(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateThetest(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.Field3)) - n += 1 + sovThetest(uint64(m.Field4)) - n += 1 + sovThetest(uint64(m.Field5)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - n += 1 + sozThetest(uint64(m.Field8)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field5) > 0 { - for _, e := range m.Field5 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field9) > 0 { - n += 5 * len(m.Field9) - } - if len(m.Field10) > 0 { - n += 5 * len(m.Field10) - } - if len(m.Field11) > 0 { - n += 9 * len(m.Field11) - } - if len(m.Field12) > 0 { - n += 9 * len(m.Field12) - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozThetest(uint64(e)) - } - n += 1 + sovThetest(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptStruct) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 1 + sovThetest(uint64(m.Field6)) - n += 1 + sozThetest(uint64(m.Field7)) - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - n += 2 - l = len(m.Field14) - n += 1 + l + sovThetest(uint64(l)) - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepStruct) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 9 * len(m.Field1) - } - if len(m.Field2) > 0 { - n += 5 * len(m.Field2) - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field4) > 0 { - for _, e := range m.Field4 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field6) > 0 { - for _, e := range m.Field6 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field7) > 0 { - for _, e := range m.Field7 { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.Field8) > 0 { - for _, e := range m.Field8 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field13) > 0 { - n += 2 * len(m.Field13) - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - n += 3 - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStruct) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidNestedStruct) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Field2) > 0 { - for _, e := range m.Field2 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptCustom) Size() (n int) { - var l int - _ = l - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomDash) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptCustom) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepCustom) Size() (n int) { - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field200 != nil { - l = m.Field200.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.Field210 != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinNestedStructUnion) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field2 != nil { - l = m.Field2.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tree) Size() (n int) { - var l int - _ = l - if m.Or != nil { - l = m.Or.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Leaf) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Value)) - l = len(m.StrValue) - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepTree) Size() (n int) { - var l int - _ = l - if m.Down != nil { - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.And != nil { - l = m.And.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.Leaf != nil { - l = m.Leaf.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ADeepBranch) Size() (n int) { - var l int - _ = l - l = m.Down.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndDeepBranch) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovThetest(uint64(l)) - l = m.Right.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeepLeaf) Size() (n int) { - var l int - _ = l - l = m.Tree.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptEnum) Size() (n int) { - var l int - _ = l - n += 1 + sovThetest(uint64(m.Field1)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepEnum) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnum) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnotherNinOptEnumDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Timer) Size() (n int) { - var l int - _ = l - n += 9 - n += 9 - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MyExtendable) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OtherExtenable) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field13 != nil { - n += 1 + sovThetest(uint64(*m.Field13)) - } - if m.M != nil { - l = m.M.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_extensions != nil { - n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.EnumField != nil { - n += 1 + sovThetest(uint64(*m.EnumField)) - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.NM != nil { - l = m.NM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage) Size() (n int) { - var l int - _ = l - if m.NestedField1 != nil { - n += 9 - } - if m.NNM != nil { - l = m.NNM.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { - var l int - _ = l - if m.NestedNestedField1 != nil { - l = len(*m.NestedNestedField1) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NestedScope) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.B != nil { - n += 1 + sovThetest(uint64(*m.B)) - } - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNativeDefault) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovThetest(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovThetest(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovThetest(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozThetest(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozThetest(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovThetest(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomContainer) Size() (n int) { - var l int - _ = l - l = m.CustomStruct.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNidOptNative) Size() (n int) { - var l int - _ = l - n += 9 - n += 5 - n += 1 + sovThetest(uint64(m.FieldC)) - n += 1 + sovThetest(uint64(m.FieldD)) - n += 1 + sovThetest(uint64(m.FieldE)) - n += 1 + sovThetest(uint64(m.FieldF)) - n += 1 + sozThetest(uint64(m.FieldG)) - n += 1 + sozThetest(uint64(m.FieldH)) - n += 5 - n += 5 - n += 9 - n += 9 - n += 2 - l = len(m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinOptNative) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - n += 1 + sovThetest(uint64(*m.FieldC)) - } - if m.FieldD != nil { - n += 1 + sovThetest(uint64(*m.FieldD)) - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sovThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - n += 1 + sozThetest(uint64(*m.FieldG)) - } - if m.FieldH != nil { - n += 1 + sozThetest(uint64(*m.FieldH)) - } - if m.FieldI != nil { - n += 5 - } - if m.FieldJ != nil { - n += 5 - } - if m.FieldK != nil { - n += 9 - } - if m.FielL != nil { - n += 9 - } - if m.FieldM != nil { - n += 2 - } - if m.FieldN != nil { - l = len(*m.FieldN) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldO != nil { - l = len(m.FieldO) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinRepNative) Size() (n int) { - var l int - _ = l - if len(m.FieldA) > 0 { - n += 9 * len(m.FieldA) - } - if len(m.FieldB) > 0 { - n += 5 * len(m.FieldB) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldE) > 0 { - for _, e := range m.FieldE { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldF) > 0 { - for _, e := range m.FieldF { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.FieldG) > 0 { - for _, e := range m.FieldG { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldH) > 0 { - for _, e := range m.FieldH { - n += 1 + sozThetest(uint64(e)) - } - } - if len(m.FieldI) > 0 { - n += 5 * len(m.FieldI) - } - if len(m.FieldJ) > 0 { - n += 5 * len(m.FieldJ) - } - if len(m.FieldK) > 0 { - n += 9 * len(m.FieldK) - } - if len(m.FieldL) > 0 { - n += 9 * len(m.FieldL) - } - if len(m.FieldM) > 0 { - n += 2 * len(m.FieldM) - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - l = len(s) - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - l = len(b) - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinStruct) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 9 - } - if m.FieldB != nil { - n += 5 - } - if m.FieldC != nil { - l = m.FieldC.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.FieldE != nil { - n += 1 + sovThetest(uint64(*m.FieldE)) - } - if m.FieldF != nil { - n += 1 + sozThetest(uint64(*m.FieldF)) - } - if m.FieldG != nil { - l = m.FieldG.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldH != nil { - n += 2 - } - if m.FieldI != nil { - l = len(*m.FieldI) - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldJ != nil { - l = len(m.FieldJ) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameCustomType) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - l = m.FieldA.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - l = m.FieldB.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.FieldC) > 0 { - for _, e := range m.FieldC { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if len(m.FieldD) > 0 { - for _, e := range m.FieldD { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { - var l int - _ = l - if m.NidOptNative != nil { - l = m.NidOptNative.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.FieldA != nil { - l = m.FieldA.Size() - n += 2 + l + sovThetest(uint64(l)) - } - if m.FieldB != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomNameEnum) Size() (n int) { - var l int - _ = l - if m.FieldA != nil { - n += 1 + sovThetest(uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, e := range m.FieldB { - n += 1 + sovThetest(uint64(e)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NoExtensionsMap) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Unrecognized) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovThetest(uint64(l)) - } - return n -} - -func (m *UnrecognizedWithInner) Size() (n int) { - var l int - _ = l - if len(m.Embedded) > 0 { - for _, e := range m.Embedded { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithInner_Inner) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func (m *UnrecognizedWithEmbed) Size() (n int) { - var l int - _ = l - l = m.UnrecognizedWithEmbed_Embedded.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.Field2 != nil { - l = len(*m.Field2) - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovThetest(uint64(*m.Field1)) - } - return n -} - -func sovThetest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozThetest(x uint64) (n int) { - return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNative{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepPackedNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepPackedNative{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStruct{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepStruct{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, - `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStruct{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidNestedStruct{`, - `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, - `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStruct{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomDash) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomDash{`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptCustom{`, - `Id:` + valueToStringThetest(this.Id) + `,`, - `Value:` + valueToStringThetest(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepCustom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepCustom{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptStructUnion{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, - `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, - `Field210:` + valueToStringThetest(this.Field210) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinNestedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinNestedStructUnion{`, - `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, - `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, - `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Tree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Tree{`, - `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OrBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OrBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Leaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Leaf{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepTree) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepTree{`, - `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, - `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, - `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ADeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ADeepBranch{`, - `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AndDeepBranch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AndDeepBranch{`, - `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DeepLeaf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeepLeaf{`, - `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepEnum{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnum{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AnotherNinOptEnumDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Timer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timer{`, - `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, - `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MyExtendable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyExtendable{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OtherExtenable) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OtherExtenable{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `EnumField:` + valueToStringThetest(this.EnumField) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, - `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, - `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, - `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NestedScope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NestedScope{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, - `B:` + valueToStringThetest(this.B) + `,`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNativeDefault) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNativeDefault{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `Field4:` + valueToStringThetest(this.Field4) + `,`, - `Field5:` + valueToStringThetest(this.Field5) + `,`, - `Field6:` + valueToStringThetest(this.Field6) + `,`, - `Field7:` + valueToStringThetest(this.Field7) + `,`, - `Field8:` + valueToStringThetest(this.Field8) + `,`, - `Field9:` + valueToStringThetest(this.Field9) + `,`, - `Field10:` + valueToStringThetest(this.Field10) + `,`, - `Field11:` + valueToStringThetest(this.Field11) + `,`, - `Field12:` + valueToStringThetest(this.Field12) + `,`, - `Field13:` + valueToStringThetest(this.Field13) + `,`, - `Field14:` + valueToStringThetest(this.Field14) + `,`, - `Field15:` + valueToStringThetest(this.Field15) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomContainer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomContainer{`, - `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNidOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNidOptNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinOptNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinOptNative{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + valueToStringThetest(this.FieldC) + `,`, - `FieldD:` + valueToStringThetest(this.FieldD) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + valueToStringThetest(this.FieldG) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `FieldK:` + valueToStringThetest(this.FieldK) + `,`, - `FielL:` + valueToStringThetest(this.FielL) + `,`, - `FieldM:` + valueToStringThetest(this.FieldM) + `,`, - `FieldN:` + valueToStringThetest(this.FieldN) + `,`, - `FieldO:` + valueToStringThetest(this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinRepNative) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinRepNative{`, - `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, - `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, - `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, - `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, - `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, - `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, - `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, - `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, - `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, - `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, - `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinStruct) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinStruct{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldE:` + valueToStringThetest(this.FieldE) + `,`, - `FieldF:` + valueToStringThetest(this.FieldF) + `,`, - `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldH:` + valueToStringThetest(this.FieldH) + `,`, - `FieldI:` + valueToStringThetest(this.FieldI) + `,`, - `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameCustomType{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, - `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameNinEmbeddedStructUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, - `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, - `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, - `FieldB:` + valueToStringThetest(this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomNameEnum) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomNameEnum{`, - `FieldA:` + valueToStringThetest(this.FieldA) + `,`, - `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NoExtensionsMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NoExtensionsMap{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Unrecognized) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unrecognized{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner{`, - `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithInner_Inner) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed{`, - `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UnrecognizedWithEmbed_Embedded) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `}`, - }, "") - return s -} -func valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.proto deleted file mode 100644 index b632a33db1..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetest.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message NidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptNative { - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional sint64 Field8 = 8; - optional fixed32 Field9 = 9; - optional sfixed32 Field10 = 10; - optional fixed64 Field11 = 11; - optional sfixed64 Field12 = 12; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepNative { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated int32 Field3 = 3; - repeated int64 Field4 = 4; - repeated uint32 Field5 = 5; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated sint64 Field8 = 8; - repeated fixed32 Field9 = 9; - repeated sfixed32 Field10 = 10; - repeated fixed64 Field11 = 11; - repeated sfixed64 Field12 = 12; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidRepPackedNative { - repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; - repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; - repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; - repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; - repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; - repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; - repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; - repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; - repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; -} - -message NinRepPackedNative { - repeated double Field1 = 1 [packed = true]; - repeated float Field2 = 2 [packed = true]; - repeated int32 Field3 = 3 [packed = true]; - repeated int64 Field4 = 4 [packed = true]; - repeated uint32 Field5 = 5 [packed = true]; - repeated uint64 Field6 = 6 [packed = true]; - repeated sint32 Field7 = 7 [packed = true]; - repeated sint64 Field8 = 8 [packed = true]; - repeated fixed32 Field9 = 9 [packed = true]; - repeated sfixed32 Field10 = 10 [packed = true]; - repeated fixed64 Field11 = 11 [packed = true]; - repeated sfixed64 Field12 = 12 [packed = true]; - repeated bool Field13 = 13 [packed = true]; -} - -message NidOptStruct { - optional double Field1 = 1 [(gogoproto.nullable) = false]; - optional float Field2 = 2 [(gogoproto.nullable) = false]; - optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; - optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - optional bool Field13 = 13 [(gogoproto.nullable) = false]; - optional string Field14 = 14 [(gogoproto.nullable) = false]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinOptStruct { - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional NidOptNative Field8 = 8; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NidRepStruct { - repeated double Field1 = 1 [(gogoproto.nullable) = false]; - repeated float Field2 = 2 [(gogoproto.nullable) = false]; - repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; - repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; - repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; - repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; - repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; - repeated bool Field13 = 13 [(gogoproto.nullable) = false]; - repeated string Field14 = 14 [(gogoproto.nullable) = false]; - repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; -} - -message NinRepStruct { - repeated double Field1 = 1; - repeated float Field2 = 2; - repeated NidOptNative Field3 = 3; - repeated NinOptNative Field4 = 4; - repeated uint64 Field6 = 6; - repeated sint32 Field7 = 7; - repeated NidOptNative Field8 = 8; - repeated bool Field13 = 13; - repeated string Field14 = 14; - repeated bytes Field15 = 15; -} - -message NidEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; - optional bool Field210 = 210 [(gogoproto.nullable) = false]; -} - -message NinEmbeddedStruct { - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NidOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NidNestedStruct { - optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; - repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; -} - -message NinNestedStruct { - optional NinOptStruct Field1 = 1; - repeated NinRepStruct Field2 = 2; -} - -message NidOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message CustomDash { - optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; -} - -message NinOptCustom { - optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NidRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message NinRepCustom { - repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; - repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message NinOptNativeUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional int32 Field3 = 3; - optional int64 Field4 = 4; - optional uint32 Field5 = 5; - optional uint64 Field6 = 6; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinOptStructUnion { - option (gogoproto.onlyone) = true; - optional double Field1 = 1; - optional float Field2 = 2; - optional NidOptNative Field3 = 3; - optional NinOptNative Field4 = 4; - optional uint64 Field6 = 6; - optional sint32 Field7 = 7; - optional bool Field13 = 13; - optional string Field14 = 14; - optional bytes Field15 = 15; -} - -message NinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200; - optional bool Field210 = 210; -} - -message NinNestedStructUnion { - option (gogoproto.onlyone) = true; - optional NinOptNativeUnion Field1 = 1; - optional NinOptStructUnion Field2 = 2; - optional NinEmbeddedStructUnion Field3 = 3; -} - -message Tree { - option (gogoproto.onlyone) = true; - optional OrBranch Or = 1; - optional AndBranch And = 2; - optional Leaf Leaf = 3; -} - -message OrBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message AndBranch { - optional Tree Left = 1 [(gogoproto.nullable) = false]; - optional Tree Right = 2 [(gogoproto.nullable) = false]; -} - -message Leaf { - optional int64 Value = 1 [(gogoproto.nullable) = false]; - optional string StrValue = 2 [(gogoproto.nullable) = false]; -} - -message DeepTree { - option (gogoproto.onlyone) = true; - optional ADeepBranch Down = 1; - optional AndDeepBranch And = 2; - optional DeepLeaf Leaf = 3; -} - -message ADeepBranch { - optional DeepTree Down = 2 [(gogoproto.nullable) = false]; -} - -message AndDeepBranch { - optional DeepTree Left = 1 [(gogoproto.nullable) = false]; - optional DeepTree Right = 2 [(gogoproto.nullable) = false]; -} - -message DeepLeaf { - optional Tree Tree = 1 [(gogoproto.nullable) = false]; -} - -message Nil { - -} - -enum TheTestEnum { - A = 0; - B = 1; - C = 2; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; -} - -message Timer { - optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; - optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; - optional bytes Data = 3 [(gogoproto.nullable) = false]; -} - -message MyExtendable { - option (gogoproto.face) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend MyExtendable { - optional double FieldA = 100; - optional NinOptNative FieldB = 101; - optional NinEmbeddedStruct FieldC = 102; -} - -message OtherExtenable { - option (gogoproto.face) = false; - optional int64 Field2 = 2; - extensions 14 to 16; - optional int64 Field13 = 13; - extensions 10 to 12; - optional MyExtendable M = 1; -} - -message NestedDefinition { - optional int64 Field1 = 1; - message NestedMessage { - optional fixed64 NestedField1 = 1; - optional NestedNestedMsg NNM = 2; - message NestedNestedMsg { - optional string NestedNestedField1 = 10; - } - } - enum NestedEnum { - TYPE_NESTED = 1; - } - optional NestedEnum EnumField = 2; - optional NestedMessage.NestedNestedMsg NNM = 3; - optional NestedMessage NM = 4; -} - -message NestedScope { - optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; - optional NestedDefinition.NestedEnum B = 2; - optional NestedDefinition.NestedMessage C = 3; -} - -message NinOptNativeDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional double Field1 = 1 [default = 1234.1234]; - optional float Field2 = 2 [default = 1234.1234]; - optional int32 Field3 = 3 [default = 1234]; - optional int64 Field4 = 4 [default = 1234]; - optional uint32 Field5 = 5 [default = 1234]; - optional uint64 Field6 = 6 [default = 1234]; - optional sint32 Field7 = 7 [default = 1234]; - optional sint64 Field8 = 8 [default = 1234]; - optional fixed32 Field9 = 9 [default = 1234]; - optional sfixed32 Field10 = 10 [default = 1234]; - optional fixed64 Field11 = 11 [default = 1234]; - optional sfixed64 Field12 = 12 [default = 1234]; - optional bool Field13 = 13 [default = true]; - optional string Field14 = 14 [default = "1234"]; - optional bytes Field15 = 15; -} - -message CustomContainer { - optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; -} - -message CustomNameNidOptNative { - optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; - optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinOptNative { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinRepNative { - repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; - repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; - repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; - repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; - repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; - repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; - repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; - repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; - repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; - repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; - repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; - repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; -} - -message CustomNameNinStruct { - optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; - optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; - optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; - repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; - optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; - optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; - optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; - optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; - optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; - optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; -} - -message CustomNameCustomType { - optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; - optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; - repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message CustomNameNinEmbeddedStructUnion { - option (gogoproto.onlyone) = true; - optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; - optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; - optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; -} - -message CustomNameEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; - repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; -} - -message NoExtensionsMap { - option (gogoproto.face) = false; - option (gogoproto.goproto_extensions_map) = false; - optional int64 Field1 = 1; - extensions 100 to 199; -} - -extend NoExtensionsMap { - optional double FieldA1 = 100; - optional NinOptNative FieldB1 = 101; - optional NinEmbeddedStruct FieldC1 = 102; -} - -message Unrecognized { - option (gogoproto.goproto_unrecognized) = false; - optional string Field1 = 1; -} - -message UnrecognizedWithInner { - message Inner { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - repeated Inner embedded = 1; - optional string Field2 = 2; -} - -message UnrecognizedWithEmbed { - message Embedded { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 Field1 = 1; - } - - optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - optional string Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetestpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetestpb_test.go deleted file mode 100644 index c59d2ccc0c..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/thetestpb_test.go +++ /dev/null @@ -1,12938 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/Makefile deleted file mode 100644 index 66ea13efbe..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unmarshalmerge.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.pb.go deleted file mode 100644 index 32679a6a92..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.pb.go +++ /dev/null @@ -1,1649 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unmarshalmerge.proto -// DO NOT EDIT! - -/* - Package unmarshalmerge is a generated protocol buffer package. - - It is generated from these files: - unmarshalmerge.proto - - It has these top-level messages: - Big - BigUnsafe - Sub - IntMerge -*/ -package unmarshalmerge - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Big struct { - Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` - Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Big) Reset() { *m = Big{} } -func (*Big) ProtoMessage() {} - -func (m *Big) GetSub() *Sub { - if m != nil { - return m.Sub - } - return nil -} - -func (m *Big) GetNumber() int64 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -type BigUnsafe struct { - Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` - Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *BigUnsafe) Reset() { *m = BigUnsafe{} } -func (*BigUnsafe) ProtoMessage() {} - -func (m *BigUnsafe) GetSub() *Sub { - if m != nil { - return m.Sub - } - return nil -} - -func (m *BigUnsafe) GetNumber() int64 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -type Sub struct { - SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber" json:"SubNumber,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Sub) Reset() { *m = Sub{} } -func (*Sub) ProtoMessage() {} - -func (m *Sub) GetSubNumber() int64 { - if m != nil && m.SubNumber != nil { - return *m.SubNumber - } - return 0 -} - -type IntMerge struct { - Int64 int64 `protobuf:"varint,1,req,name=Int64" json:"Int64"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32" json:"Int32"` - Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32" json:"Sint32"` - Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64" json:"Sint64"` - Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64" json:"Uint64"` - Uint32 uint32 `protobuf:"varint,6,req,name=Uint32" json:"Uint32"` - Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64" json:"Fixed64"` - Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32" json:"Fixed32"` - Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32" json:"Sfixed32"` - Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64" json:"Sfixed64"` - Bool bool `protobuf:"varint,11,opt,name=Bool" json:"Bool"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *IntMerge) Reset() { *m = IntMerge{} } -func (*IntMerge) ProtoMessage() {} - -func (m *IntMerge) GetInt64() int64 { - if m != nil { - return m.Int64 - } - return 0 -} - -func (m *IntMerge) GetInt32() int32 { - if m != nil { - return m.Int32 - } - return 0 -} - -func (m *IntMerge) GetSint32() int32 { - if m != nil { - return m.Sint32 - } - return 0 -} - -func (m *IntMerge) GetSint64() int64 { - if m != nil { - return m.Sint64 - } - return 0 -} - -func (m *IntMerge) GetUint64() uint64 { - if m != nil { - return m.Uint64 - } - return 0 -} - -func (m *IntMerge) GetUint32() uint32 { - if m != nil { - return m.Uint32 - } - return 0 -} - -func (m *IntMerge) GetFixed64() uint64 { - if m != nil { - return m.Fixed64 - } - return 0 -} - -func (m *IntMerge) GetFixed32() uint32 { - if m != nil { - return m.Fixed32 - } - return 0 -} - -func (m *IntMerge) GetSfixed32() int32 { - if m != nil { - return m.Sfixed32 - } - return 0 -} - -func (m *IntMerge) GetSfixed64() int64 { - if m != nil { - return m.Sfixed64 - } - return 0 -} - -func (m *IntMerge) GetBool() bool { - if m != nil { - return m.Bool - } - return false -} - -func init() { - proto.RegisterType((*Big)(nil), "unmarshalmerge.Big") - proto.RegisterType((*BigUnsafe)(nil), "unmarshalmerge.BigUnsafe") - proto.RegisterType((*Sub)(nil), "unmarshalmerge.Sub") - proto.RegisterType((*IntMerge)(nil), "unmarshalmerge.IntMerge") -} -func (this *Big) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Big) - if !ok { - that2, ok := that.(Big) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Big") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Big but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Big but is not nil && this == nil") - } - if !this.Sub.Equal(that1.Sub) { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) - } - } else if this.Number != nil { - return fmt.Errorf("this.Number == nil && that.Number != nil") - } else if that1.Number != nil { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Big) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Big) - if !ok { - that2, ok := that.(Big) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Sub.Equal(that1.Sub) { - return false - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return false - } - } else if this.Number != nil { - return false - } else if that1.Number != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BigUnsafe) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*BigUnsafe) - if !ok { - that2, ok := that.(BigUnsafe) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *BigUnsafe") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *BigUnsafe but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *BigUnsafe but is not nil && this == nil") - } - if !this.Sub.Equal(that1.Sub) { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) - } - } else if this.Number != nil { - return fmt.Errorf("this.Number == nil && that.Number != nil") - } else if that1.Number != nil { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *BigUnsafe) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*BigUnsafe) - if !ok { - that2, ok := that.(BigUnsafe) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Sub.Equal(that1.Sub) { - return false - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return false - } - } else if this.Number != nil { - return false - } else if that1.Number != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Sub) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Sub) - if !ok { - that2, ok := that.(Sub) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Sub") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Sub but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Sub but is not nil && this == nil") - } - if this.SubNumber != nil && that1.SubNumber != nil { - if *this.SubNumber != *that1.SubNumber { - return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", *this.SubNumber, *that1.SubNumber) - } - } else if this.SubNumber != nil { - return fmt.Errorf("this.SubNumber == nil && that.SubNumber != nil") - } else if that1.SubNumber != nil { - return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", this.SubNumber, that1.SubNumber) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Sub) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Sub) - if !ok { - that2, ok := that.(Sub) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.SubNumber != nil && that1.SubNumber != nil { - if *this.SubNumber != *that1.SubNumber { - return false - } - } else if this.SubNumber != nil { - return false - } else if that1.SubNumber != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *IntMerge) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IntMerge) - if !ok { - that2, ok := that.(IntMerge) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IntMerge") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IntMerge but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IntMerge but is not nil && this == nil") - } - if this.Int64 != that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.Sint32 != that1.Sint32 { - return fmt.Errorf("Sint32 this(%v) Not Equal that(%v)", this.Sint32, that1.Sint32) - } - if this.Sint64 != that1.Sint64 { - return fmt.Errorf("Sint64 this(%v) Not Equal that(%v)", this.Sint64, that1.Sint64) - } - if this.Uint64 != that1.Uint64 { - return fmt.Errorf("Uint64 this(%v) Not Equal that(%v)", this.Uint64, that1.Uint64) - } - if this.Uint32 != that1.Uint32 { - return fmt.Errorf("Uint32 this(%v) Not Equal that(%v)", this.Uint32, that1.Uint32) - } - if this.Fixed64 != that1.Fixed64 { - return fmt.Errorf("Fixed64 this(%v) Not Equal that(%v)", this.Fixed64, that1.Fixed64) - } - if this.Fixed32 != that1.Fixed32 { - return fmt.Errorf("Fixed32 this(%v) Not Equal that(%v)", this.Fixed32, that1.Fixed32) - } - if this.Sfixed32 != that1.Sfixed32 { - return fmt.Errorf("Sfixed32 this(%v) Not Equal that(%v)", this.Sfixed32, that1.Sfixed32) - } - if this.Sfixed64 != that1.Sfixed64 { - return fmt.Errorf("Sfixed64 this(%v) Not Equal that(%v)", this.Sfixed64, that1.Sfixed64) - } - if this.Bool != that1.Bool { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *IntMerge) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IntMerge) - if !ok { - that2, ok := that.(IntMerge) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != that1.Int64 { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.Sint32 != that1.Sint32 { - return false - } - if this.Sint64 != that1.Sint64 { - return false - } - if this.Uint64 != that1.Uint64 { - return false - } - if this.Uint32 != that1.Uint32 { - return false - } - if this.Fixed64 != that1.Fixed64 { - return false - } - if this.Fixed32 != that1.Fixed32 { - return false - } - if this.Sfixed32 != that1.Sfixed32 { - return false - } - if this.Sfixed64 != that1.Sfixed64 { - return false - } - if this.Bool != that1.Bool { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Big) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unmarshalmerge.Big{") - if this.Sub != nil { - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BigUnsafe) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unmarshalmerge.BigUnsafe{") - if this.Sub != nil { - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Sub) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unmarshalmerge.Sub{") - if this.SubNumber != nil { - s = append(s, "SubNumber: "+valueToGoStringUnmarshalmerge(this.SubNumber, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IntMerge) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&unmarshalmerge.IntMerge{") - s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - s = append(s, "Sint32: "+fmt.Sprintf("%#v", this.Sint32)+",\n") - s = append(s, "Sint64: "+fmt.Sprintf("%#v", this.Sint64)+",\n") - s = append(s, "Uint64: "+fmt.Sprintf("%#v", this.Uint64)+",\n") - s = append(s, "Uint32: "+fmt.Sprintf("%#v", this.Uint32)+",\n") - s = append(s, "Fixed64: "+fmt.Sprintf("%#v", this.Fixed64)+",\n") - s = append(s, "Fixed32: "+fmt.Sprintf("%#v", this.Fixed32)+",\n") - s = append(s, "Sfixed32: "+fmt.Sprintf("%#v", this.Sfixed32)+",\n") - s = append(s, "Sfixed64: "+fmt.Sprintf("%#v", this.Sfixed64)+",\n") - s = append(s, "Bool: "+fmt.Sprintf("%#v", this.Bool)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnmarshalmerge(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnmarshalmerge(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func NewPopulatedBig(r randyUnmarshalmerge, easy bool) *Big { - this := &Big{} - if r.Intn(10) != 0 { - this.Sub = NewPopulatedSub(r, easy) - } - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Number = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) - } - return this -} - -func NewPopulatedBigUnsafe(r randyUnmarshalmerge, easy bool) *BigUnsafe { - this := &BigUnsafe{} - if r.Intn(10) != 0 { - this.Sub = NewPopulatedSub(r, easy) - } - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Number = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) - } - return this -} - -func NewPopulatedSub(r randyUnmarshalmerge, easy bool) *Sub { - this := &Sub{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.SubNumber = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 2) - } - return this -} - -func NewPopulatedIntMerge(r randyUnmarshalmerge, easy bool) *IntMerge { - this := &IntMerge{} - this.Int64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64 *= -1 - } - this.Int32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - this.Sint32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32 *= -1 - } - this.Sint64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64 *= -1 - } - this.Uint64 = uint64(uint64(r.Uint32())) - this.Uint32 = uint32(r.Uint32()) - this.Fixed64 = uint64(uint64(r.Uint32())) - this.Fixed32 = uint32(r.Uint32()) - this.Sfixed32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32 *= -1 - } - this.Sfixed64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64 *= -1 - } - this.Bool = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 12) - } - return this -} - -type randyUnmarshalmerge interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUnmarshalmerge(r randyUnmarshalmerge) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUnmarshalmerge(r randyUnmarshalmerge) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneUnmarshalmerge(r) - } - return string(tmps) -} -func randUnrecognizedUnmarshalmerge(r randyUnmarshalmerge, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldUnmarshalmerge(data, r, fieldNumber, wire) - } - return data -} -func randFieldUnmarshalmerge(data []byte, r randyUnmarshalmerge, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateUnmarshalmerge(data, uint64(v5)) - case 1: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateUnmarshalmerge(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateUnmarshalmerge(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (this *Big) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Big{`, - `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, - `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BigUnsafe) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BigUnsafe{`, - `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, - `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Sub) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Sub{`, - `SubNumber:` + valueToStringUnmarshalmerge(this.SubNumber) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *IntMerge) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IntMerge{`, - `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `Sint32:` + fmt.Sprintf("%v", this.Sint32) + `,`, - `Sint64:` + fmt.Sprintf("%v", this.Sint64) + `,`, - `Uint64:` + fmt.Sprintf("%v", this.Uint64) + `,`, - `Uint32:` + fmt.Sprintf("%v", this.Uint32) + `,`, - `Fixed64:` + fmt.Sprintf("%v", this.Fixed64) + `,`, - `Fixed32:` + fmt.Sprintf("%v", this.Fixed32) + `,`, - `Sfixed32:` + fmt.Sprintf("%v", this.Sfixed32) + `,`, - `Sfixed64:` + fmt.Sprintf("%v", this.Sfixed64) + `,`, - `Bool:` + fmt.Sprintf("%v", this.Bool) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringUnmarshalmerge(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Big) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Big: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Big: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnmarshalmerge - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sub == nil { - m.Sub = &Sub{} - } - if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Number = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sub) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sub: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubNumber", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.SubNumber = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntMerge) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntMerge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntMerge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Sint32 = v - hasFields[0] |= uint64(0x00000002) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Sint64 = int64(v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) - } - m.Uint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Uint64 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) - } - m.Uint32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Uint32 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000004) - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64", wireType) - } - m.Fixed64 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Fixed64 = uint64(data[iNdEx-8]) - m.Fixed64 |= uint64(data[iNdEx-7]) << 8 - m.Fixed64 |= uint64(data[iNdEx-6]) << 16 - m.Fixed64 |= uint64(data[iNdEx-5]) << 24 - m.Fixed64 |= uint64(data[iNdEx-4]) << 32 - m.Fixed64 |= uint64(data[iNdEx-3]) << 40 - m.Fixed64 |= uint64(data[iNdEx-2]) << 48 - m.Fixed64 |= uint64(data[iNdEx-1]) << 56 - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32", wireType) - } - m.Fixed32 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Fixed32 = uint32(data[iNdEx-4]) - m.Fixed32 |= uint32(data[iNdEx-3]) << 8 - m.Fixed32 |= uint32(data[iNdEx-2]) << 16 - m.Fixed32 |= uint32(data[iNdEx-1]) << 24 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32", wireType) - } - m.Sfixed32 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Sfixed32 = int32(data[iNdEx-4]) - m.Sfixed32 |= int32(data[iNdEx-3]) << 8 - m.Sfixed32 |= int32(data[iNdEx-2]) << 16 - m.Sfixed32 |= int32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000008) - case 10: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64", wireType) - } - m.Sfixed64 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Sfixed64 = int64(data[iNdEx-8]) - m.Sfixed64 |= int64(data[iNdEx-7]) << 8 - m.Sfixed64 |= int64(data[iNdEx-6]) << 16 - m.Sfixed64 |= int64(data[iNdEx-5]) << 24 - m.Sfixed64 |= int64(data[iNdEx-4]) << 32 - m.Sfixed64 |= int64(data[iNdEx-3]) << 40 - m.Sfixed64 |= int64(data[iNdEx-2]) << 48 - m.Sfixed64 |= int64(data[iNdEx-1]) << 56 - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bool = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnmarshalmerge(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnmarshalmerge - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnmarshalmerge(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnmarshalmerge = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow") -) - -func (m *BigUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BigUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BigUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnmarshalmergeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sub == nil { - m.Sub = &Sub{} - } - if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Number = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmergeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmergeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnmarshalmergeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnmarshalmergeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnmarshalmergeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnmarshalmergeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnmarshalmergeUnsafe = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.proto deleted file mode 100644 index b2ca42c122..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package unmarshalmerge; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.goproto_stringer_all) = false; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; - -message Big { - option (gogoproto.unmarshaler) = true; - optional Sub Sub = 1; - optional int64 Number = 2; -} - -message BigUnsafe { - option (gogoproto.unsafe_unmarshaler) = true; - optional Sub Sub = 1; - optional int64 Number = 2; -} - -message Sub { - option (gogoproto.unmarshaler) = true; - optional int64 SubNumber = 1; -} - -message IntMerge { - option (gogoproto.unmarshaler) = true; - required int64 Int64 = 1 [(gogoproto.nullable) = false]; - optional int32 Int32 = 2 [(gogoproto.nullable) = false]; - required sint32 Sint32 = 3 [(gogoproto.nullable) = false]; - optional sint64 Sint64 = 4 [(gogoproto.nullable) = false]; - optional uint64 Uint64 = 5 [(gogoproto.nullable) = false]; - required uint32 Uint32 = 6 [(gogoproto.nullable) = false]; - optional fixed64 Fixed64 = 7 [(gogoproto.nullable) = false]; - optional fixed32 Fixed32 = 8 [(gogoproto.nullable) = false]; - required sfixed32 Sfixed32 = 9 [(gogoproto.nullable) = false]; - optional sfixed64 Sfixed64 = 10 [(gogoproto.nullable) = false]; - optional bool Bool = 11 [(gogoproto.nullable) = false]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge_test.go deleted file mode 100644 index 58505b7bdc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmerge_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package unmarshalmerge - -import ( - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - "time" -) - -func TestUnmarshalMerge(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, true) - if p.GetSub() == nil { - p.Sub = &Sub{SubNumber: proto.Int64(12345)} - } - data, err := proto.Marshal(p) - if err != nil { - t.Fatal(err) - } - s := &Sub{} - b := &Big{ - Sub: s, - } - err = proto.UnmarshalMerge(data, b) - if err != nil { - t.Fatal(err) - } - if s.GetSubNumber() != p.GetSub().GetSubNumber() { - t.Fatalf("should have unmarshaled subnumber into sub") - } -} - -func TestUnsafeUnmarshalMerge(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, true) - if p.GetSub() == nil { - p.Sub = &Sub{SubNumber: proto.Int64(12345)} - } - data, err := proto.Marshal(p) - if err != nil { - t.Fatal(err) - } - s := &Sub{} - b := &BigUnsafe{ - Sub: s, - } - err = proto.UnmarshalMerge(data, b) - if err != nil { - t.Fatal(err) - } - - if s.GetSubNumber() != p.GetSub().GetSubNumber() { - t.Fatalf("should have unmarshaled subnumber into sub") - } -} - -func TestInt64Merge(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, true) - p2 := NewPopulatedIntMerge(popr, true) - data, err := proto.Marshal(p2) - if err != nil { - t.Fatal(err) - } - if err := proto.UnmarshalMerge(data, p); err != nil { - t.Fatal(err) - } - if !p.Equal(p2) { - t.Fatalf("exptected %#v but got %#v", p2, p) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmergepb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmergepb_test.go deleted file mode 100644 index 1f353a97ea..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unmarshalmerge/unmarshalmergepb_test.go +++ /dev/null @@ -1,700 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unmarshalmerge.proto -// DO NOT EDIT! - -/* -Package unmarshalmerge is a generated protocol buffer package. - -It is generated from these files: - unmarshalmerge.proto - -It has these top-level messages: - Big - BigUnsafe - Sub - IntMerge -*/ -package unmarshalmerge - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestBigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Big, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedBig(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBigProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Big{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBigUnsafeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*BigUnsafe, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedBigUnsafe(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &BigUnsafe{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestSubProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkSubProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Sub, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSub(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkSubProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Sub{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestIntMergeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkIntMergeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*IntMerge, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedIntMerge(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkIntMergeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &IntMerge{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBigUnsafeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIntMergeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Big{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Big{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigUnsafeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigUnsafeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIntMergeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIntMergeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Big{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBigUnsafeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIntMergeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBigGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBigUnsafeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestIntMergeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBigStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBigUnsafeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSubStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIntMergeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/Makefile deleted file mode 100644 index bb731f099f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognized.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/oldnew_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/oldnew_test.go deleted file mode 100644 index 4a5a532a1b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/oldnew_test.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package unrecognized - -import ( - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - time "time" -) - -func TestNewOld(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - newer := NewPopulatedA(popr, true) - data1, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - older := &OldA{} - if err := proto.Unmarshal(data1, older); err != nil { - panic(err) - } - data2, err := proto.Marshal(older) - if err != nil { - panic(err) - } - bluer := &A{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := newer.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) - } -} - -func TestOldNew(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldA(popr, true) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - newer := &A{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - bluer := &OldA{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := older.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) - } -} - -func TestOldNewOldNew(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldA(popr, true) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - newer := &A{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - bluer := &OldA{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := older.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) - } - - data3, err := proto.Marshal(bluer) - if err != nil { - panic(err) - } - purple := &A{} - if err := proto.Unmarshal(data3, purple); err != nil { - panic(err) - } - data4, err := proto.Marshal(purple) - if err != nil { - panic(err) - } - magenta := &OldA{} - if err := proto.Unmarshal(data4, magenta); err != nil { - panic(err) - } - if err := older.VerboseEqual(magenta); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) - } -} - -func TestOldUToU(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldU(popr, true) - // need optional field to be always initialized, to check it's lost in this test - older.Field1 = proto.String(randStringUnrecognized(popr)) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - - newer := &U{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - - older2 := &OldU{} - if err := proto.Unmarshal(data2, older2); err != nil { - panic(err) - } - - // check that Field1 is lost - if older2.Field1 != nil { - t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) - } - - // now restore Field1 and messages should be equal now - older2.Field1 = older.Field1 - if err := older.VerboseEqual(older2); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) - } -} - -func TestOldUnoM(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldUnoM(popr, true) - // need optional field to be always initialized, to check it's lost in this test - older.Field1 = proto.String(randStringUnrecognized(popr)) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - - newer := &UnoM{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - - older2 := &OldUnoM{} - if err := proto.Unmarshal(data2, older2); err != nil { - panic(err) - } - - // check that Field1 is lost - if older2.Field1 != nil { - t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) - } - - // now restore Field1 and messages should be equal now - older2.Field1 = older.Field1 - if err := older.VerboseEqual(older2); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.pb.go deleted file mode 100644 index ab5ffbd788..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.pb.go +++ /dev/null @@ -1,4848 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognized.proto -// DO NOT EDIT! - -/* - Package unrecognized is a generated protocol buffer package. - - It is generated from these files: - unrecognized.proto - - It has these top-level messages: - A - B - D - C - U - UnoM - OldA - OldB - OldC - OldU - OldUnoM -*/ -package unrecognized - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type A struct { - Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` - B []*B `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} - -type B struct { - C *C `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` - D *D `protobuf:"bytes,2,opt,name=D" json:"D,omitempty"` - F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *B) Reset() { *m = B{} } -func (*B) ProtoMessage() {} - -type D struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *D) Reset() { *m = D{} } -func (*D) ProtoMessage() {} - -type C struct { - Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field4 *float64 `protobuf:"fixed64,4,opt,name=Field4" json:"Field4,omitempty"` - Field5 [][]byte `protobuf:"bytes,5,rep,name=Field5" json:"Field5,omitempty"` - Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *C) Reset() { *m = C{} } -func (*C) ProtoMessage() {} - -type U struct { - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` -} - -func (m *U) Reset() { *m = U{} } -func (*U) ProtoMessage() {} - -type UnoM struct { - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` -} - -func (m *UnoM) Reset() { *m = UnoM{} } -func (*UnoM) ProtoMessage() {} - -type OldA struct { - Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` - B []*OldB `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` -} - -func (m *OldA) Reset() { *m = OldA{} } -func (*OldA) ProtoMessage() {} - -type OldB struct { - C *OldC `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` - F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldB) Reset() { *m = OldB{} } -func (*OldB) ProtoMessage() {} - -type OldC struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` - Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` - Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldC) Reset() { *m = OldC{} } -func (*OldC) ProtoMessage() {} - -type OldU struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldU) Reset() { *m = OldU{} } -func (*OldU) ProtoMessage() {} - -type OldUnoM struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldUnoM) Reset() { *m = OldUnoM{} } -func (*OldUnoM) ProtoMessage() {} - -func init() { - proto.RegisterType((*A)(nil), "unrecognized.A") - proto.RegisterType((*B)(nil), "unrecognized.B") - proto.RegisterType((*D)(nil), "unrecognized.D") - proto.RegisterType((*C)(nil), "unrecognized.C") - proto.RegisterType((*U)(nil), "unrecognized.U") - proto.RegisterType((*UnoM)(nil), "unrecognized.UnoM") - proto.RegisterType((*OldA)(nil), "unrecognized.OldA") - proto.RegisterType((*OldB)(nil), "unrecognized.OldB") - proto.RegisterType((*OldC)(nil), "unrecognized.OldC") - proto.RegisterType((*OldU)(nil), "unrecognized.OldU") - proto.RegisterType((*OldUnoM)(nil), "unrecognized.OldUnoM") -} -func (this *A) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *B) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *D) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *C) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *U) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *UnoM) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldA) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldB) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldC) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldU) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldUnoM) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func UnrecognizedDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("unrecognized.proto"), - Package: func(v string) *string { return &v }("unrecognized"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("A"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.B"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("B"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.C"), - }, {Name: func(v string) *string { return &v }("D"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.D"), - }, {Name: func(v string) *string { return &v }("F"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.OldC"), - }}, - }, {Name: func(v string) *string { return &v }("D"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - }, {Name: func(v string) *string { return &v }("C"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field4"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field5"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("U"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("UnoM"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(13), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64017: proto.NewExtension([]byte{0x88, 0xa1, 0x1f, 0x0}), 64018: proto.NewExtension([]byte{0x90, 0xa1, 0x1f, 0x0}), 64020: proto.NewExtension([]byte{0xa0, 0xa1, 0x1f, 0x0}), 64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OldA"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("B"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.OldB"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64026: proto.NewExtension([]byte{0xd0, 0xa1, 0x1f, 0x0})}}, - }, {Name: func(v string) *string { return &v }("OldB"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("C"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.OldC"), - }, {Name: func(v string) *string { return &v }("F"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognized.OldC"), - }}, - }, {Name: func(v string) *string { return &v }("OldC"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field6"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field7"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("OldU"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("OldUnoM"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64017: proto.NewExtension([]byte{0x88, 0xa1, 0x1f, 0x0}), 64018: proto.NewExtension([]byte{0x90, 0xa1, 0x1f, 0x0}), 64020: proto.NewExtension([]byte{0xa0, 0xa1, 0x1f, 0x0})}}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x1}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1})}}, - }}, - } -} -func (this *A) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *A") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *A but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *A but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.B) != len(that1.B) { - return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) - } - } - return nil -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.B) != len(that1.B) { - return false - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return false - } - } - return true -} -func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *B") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *B but is not nil && this == nil") - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !this.D.Equal(that1.D) { - return fmt.Errorf("D this(%v) Not Equal that(%v)", this.D, that1.D) - } - if !this.F.Equal(that1.F) { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !this.D.Equal(that1.D) { - return false - } - if !this.F.Equal(that1.F) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *D) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*D) - if !ok { - that2, ok := that.(D) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *D") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *D but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *D but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *D) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*D) - if !ok { - that2, ok := that.(D) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *C) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *C") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *C but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *C but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if !bytes.Equal(this.Field5[i], that1.Field5[i]) { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *C) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if !bytes.Equal(this.Field5[i], that1.Field5[i]) { - return false - } - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *U) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *U") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *U but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *U but is not nil && this == nil") - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *U) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - return true -} -func (this *UnoM) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnoM) - if !ok { - that2, ok := that.(UnoM) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnoM") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnoM but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnoM but is not nil && this == nil") - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *UnoM) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnoM) - if !ok { - that2, ok := that.(UnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - return true -} -func (this *OldA) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldA) - if !ok { - that2, ok := that.(OldA) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldA") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldA but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldA but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.B) != len(that1.B) { - return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) - } - } - return nil -} -func (this *OldA) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldA) - if !ok { - that2, ok := that.(OldA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.B) != len(that1.B) { - return false - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return false - } - } - return true -} -func (this *OldB) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldB) - if !ok { - that2, ok := that.(OldB) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldB") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldB but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldB but is not nil && this == nil") - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !this.F.Equal(that1.F) { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldB) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldB) - if !ok { - that2, ok := that.(OldB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !this.F.Equal(that1.F) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldC) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldC) - if !ok { - that2, ok := that.(OldC) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldC") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldC but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldC but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldC) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldC) - if !ok { - that2, ok := that.(OldC) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldU) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldU) - if !ok { - that2, ok := that.(OldU) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldU") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldU but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldU but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldU) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldU) - if !ok { - that2, ok := that.(OldU) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldUnoM) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldUnoM) - if !ok { - that2, ok := that.(OldUnoM) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldUnoM") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldUnoM but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldUnoM but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldUnoM) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldUnoM) - if !ok { - that2, ok := that.(OldUnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.A{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognized.B{") - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.D != nil { - s = append(s, "D: "+fmt.Sprintf("%#v", this.D)+",\n") - } - if this.F != nil { - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *D) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unrecognized.D{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *C) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&unrecognized.C{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringUnrecognized(this.Field4, "float64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *U) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.U{") - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnoM) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.UnoM{") - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldA) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldA{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldB) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldB{") - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.F != nil { - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldC) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&unrecognized.OldC{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldU) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldU{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldUnoM) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldUnoM{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnrecognized(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnrecognized(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - for _, msg := range m.B { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field1 != nil { - data[i] = 0x10 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.C != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) - n1, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.D != nil { - data[i] = 0x12 - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.D.Size())) - n2, err := m.D.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.F != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) - n3, err := m.F.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *D) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *D) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *C) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *C) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field2 != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) - i += copy(data[i:], *m.Field3) - } - if m.Field4 != nil { - data[i] = 0x21 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(*m.Field4))) - } - if len(m.Field5) > 0 { - for _, b := range m.Field5 { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x3d - i++ - f4 := math.Float32bits(num) - data[i] = uint8(f4) - i++ - data[i] = uint8(f4 >> 8) - i++ - data[i] = uint8(f4 >> 16) - i++ - data[i] = uint8(f4 >> 24) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *U) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *U) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x11 - i++ - f5 := math.Float64bits(num) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field3)) - } - return i, nil -} - -func (m *OldA) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldA) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - for _, msg := range m.B { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field1 != nil { - data[i] = 0x10 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *OldB) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldB) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.C != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) - n6, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.F != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) - n7, err := m.F.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OldC) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldC) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - if m.Field2 != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(*m.Field2))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) - i += copy(data[i:], *m.Field3) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x3d - i++ - f8 := math.Float32bits(num) - data[i] = uint8(f8) - i++ - data[i] = uint8(f8 >> 8) - i++ - data[i] = uint8(f8 >> 16) - i++ - data[i] = uint8(f8 >> 24) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OldU) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldU) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x11 - i++ - f9 := math.Float64bits(num) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Unrecognized(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Unrecognized(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintUnrecognized(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedA(r randyUnrecognized, easy bool) *A { - this := &A{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.B = make([]*B, v1) - for i := 0; i < v1; i++ { - this.B[i] = NewPopulatedB(r, easy) - } - } - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedB(r randyUnrecognized, easy bool) *B { - this := &B{} - if r.Intn(10) != 0 { - this.C = NewPopulatedC(r, easy) - } - if r.Intn(10) != 0 { - this.D = NewPopulatedD(r, easy) - } - if r.Intn(10) != 0 { - this.F = NewPopulatedOldC(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) - } - return this -} - -func NewPopulatedD(r randyUnrecognized, easy bool) *D { - this := &D{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field1 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 2) - } - return this -} - -func NewPopulatedC(r randyUnrecognized, easy bool) *C { - this := &C{} - if r.Intn(10) != 0 { - v4 := float64(r.Float64()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field2 = &v4 - } - if r.Intn(10) != 0 { - v5 := randStringUnrecognized(r) - this.Field3 = &v5 - } - if r.Intn(10) != 0 { - v6 := float64(r.Float64()) - if r.Intn(2) == 0 { - v6 *= -1 - } - this.Field4 = &v6 - } - if r.Intn(10) != 0 { - v7 := r.Intn(100) - this.Field5 = make([][]byte, v7) - for i := 0; i < v7; i++ { - v8 := r.Intn(100) - this.Field5[i] = make([]byte, v8) - for j := 0; j < v8; j++ { - this.Field5[i][j] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field6 = &v9 - } - if r.Intn(10) != 0 { - v10 := r.Intn(100) - this.Field7 = make([]float32, v10) - for i := 0; i < v10; i++ { - this.Field7[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) - } - return this -} - -func NewPopulatedU(r randyUnrecognized, easy bool) *U { - this := &U{} - if r.Intn(10) != 0 { - v11 := r.Intn(100) - this.Field2 = make([]float64, v11) - for i := 0; i < v11; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v12 := uint32(r.Uint32()) - this.Field3 = &v12 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnoM(r randyUnrecognized, easy bool) *UnoM { - this := &UnoM{} - if r.Intn(10) != 0 { - v13 := r.Intn(100) - this.Field2 = make([]float64, v13) - for i := 0; i < v13; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v14 := uint32(r.Uint32()) - this.Field3 = &v14 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOldA(r randyUnrecognized, easy bool) *OldA { - this := &OldA{} - if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.B = make([]*OldB, v15) - for i := 0; i < v15; i++ { - this.B[i] = NewPopulatedOldB(r, easy) - } - } - if r.Intn(10) != 0 { - v16 := int64(r.Int63()) - if r.Intn(2) == 0 { - v16 *= -1 - } - this.Field1 = &v16 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOldB(r randyUnrecognized, easy bool) *OldB { - this := &OldB{} - if r.Intn(10) != 0 { - this.C = NewPopulatedOldC(r, easy) - } - if r.Intn(10) != 0 { - this.F = NewPopulatedOldC(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) - } - return this -} - -func NewPopulatedOldC(r randyUnrecognized, easy bool) *OldC { - this := &OldC{} - if r.Intn(10) != 0 { - v17 := int64(r.Int63()) - if r.Intn(2) == 0 { - v17 *= -1 - } - this.Field1 = &v17 - } - if r.Intn(10) != 0 { - v18 := float64(r.Float64()) - if r.Intn(2) == 0 { - v18 *= -1 - } - this.Field2 = &v18 - } - if r.Intn(10) != 0 { - v19 := randStringUnrecognized(r) - this.Field3 = &v19 - } - if r.Intn(10) != 0 { - v20 := int64(r.Int63()) - if r.Intn(2) == 0 { - v20 *= -1 - } - this.Field6 = &v20 - } - if r.Intn(10) != 0 { - v21 := r.Intn(100) - this.Field7 = make([]float32, v21) - for i := 0; i < v21; i++ { - this.Field7[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field7[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) - } - return this -} - -func NewPopulatedOldU(r randyUnrecognized, easy bool) *OldU { - this := &OldU{} - if r.Intn(10) != 0 { - v22 := randStringUnrecognized(r) - this.Field1 = &v22 - } - if r.Intn(10) != 0 { - v23 := r.Intn(100) - this.Field2 = make([]float64, v23) - for i := 0; i < v23; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) - } - return this -} - -func NewPopulatedOldUnoM(r randyUnrecognized, easy bool) *OldUnoM { - this := &OldUnoM{} - if r.Intn(10) != 0 { - v24 := randStringUnrecognized(r) - this.Field1 = &v24 - } - if r.Intn(10) != 0 { - v25 := r.Intn(100) - this.Field2 = make([]float64, v25) - for i := 0; i < v25; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) - } - return this -} - -type randyUnrecognized interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUnrecognized(r randyUnrecognized) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUnrecognized(r randyUnrecognized) string { - v26 := r.Intn(100) - tmps := make([]rune, v26) - for i := 0; i < v26; i++ { - tmps[i] = randUTF8RuneUnrecognized(r) - } - return string(tmps) -} -func randUnrecognizedUnrecognized(r randyUnrecognized, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldUnrecognized(data, r, fieldNumber, wire) - } - return data -} -func randFieldUnrecognized(data []byte, r randyUnrecognized, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateUnrecognized(data, uint64(key)) - v27 := r.Int63() - if r.Intn(2) == 0 { - v27 *= -1 - } - data = encodeVarintPopulateUnrecognized(data, uint64(v27)) - case 1: - data = encodeVarintPopulateUnrecognized(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateUnrecognized(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateUnrecognized(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateUnrecognized(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateUnrecognized(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *A) Size() (n int) { - var l int - _ = l - if len(m.B) > 0 { - for _, e := range m.B { - l = e.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - } - if m.Field1 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field1)) - } - return n -} - -func (m *B) Size() (n int) { - var l int - _ = l - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.D != nil { - l = m.D.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *D) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *C) Size() (n int) { - var l int - _ = l - if m.Field2 != nil { - n += 9 - } - if m.Field3 != nil { - l = len(*m.Field3) - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.Field4 != nil { - n += 9 - } - if len(m.Field5) > 0 { - for _, b := range m.Field5 { - l = len(b) - n += 1 + l + sovUnrecognized(uint64(l)) - } - } - if m.Field6 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - n += 5 * len(m.Field7) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *U) Size() (n int) { - var l int - _ = l - if len(m.Field2) > 0 { - n += 9 * len(m.Field2) - } - if m.Field3 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field3)) - } - return n -} - -func (m *OldA) Size() (n int) { - var l int - _ = l - if len(m.B) > 0 { - for _, e := range m.B { - l = e.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - } - if m.Field1 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field1)) - } - return n -} - -func (m *OldB) Size() (n int) { - var l int - _ = l - if m.C != nil { - l = m.C.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OldC) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field1)) - } - if m.Field2 != nil { - n += 9 - } - if m.Field3 != nil { - l = len(*m.Field3) - n += 1 + l + sovUnrecognized(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovUnrecognized(uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - n += 5 * len(m.Field7) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OldU) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = len(*m.Field1) - n += 1 + l + sovUnrecognized(uint64(l)) - } - if len(m.Field2) > 0 { - n += 9 * len(m.Field2) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovUnrecognized(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozUnrecognized(x uint64) (n int) { - return sovUnrecognized(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *B) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&B{`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "C", "C", 1) + `,`, - `D:` + strings.Replace(fmt.Sprintf("%v", this.D), "D", "D", 1) + `,`, - `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *D) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&D{`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *C) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&C{`, - `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, - `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, - `Field4:` + valueToStringUnrecognized(this.Field4) + `,`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *U) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&U{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *UnoM) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnoM{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *OldA) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldA{`, - `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "OldB", "OldB", 1) + `,`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *OldB) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldB{`, - `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "OldC", "OldC", 1) + `,`, - `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldC) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldC{`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, - `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, - `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldU) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldU{`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldUnoM) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldUnoM{`, - `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringUnrecognized(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *A) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = append(m.B, &B{}) - if err := m.B[len(m.B)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &C{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.D == nil { - m.D = &D{} - } - if err := m.D.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.F == nil { - m.F = &OldC{} - } - if err := m.F.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *D) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: D: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: D: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *C) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: C: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field3 = &s - iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field4 = &v2 - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field5 = append(m.Field5, make([]byte, postIndex-iNdEx)) - copy(m.Field5[len(m.Field5)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *U) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: U: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldA) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldA: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldA: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = append(m.B, &OldB{}) - if err := m.B[len(m.B)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldB) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &OldC{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.F == nil { - m.F = &OldC{} - } - if err := m.F.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldC) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldC: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field3 = &s - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldU) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldU: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldU: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnrecognized(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnrecognized - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnrecognized(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnrecognized = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnrecognized = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.proto deleted file mode 100644 index 626ac84a22..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognized.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package unrecognized; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; - -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; - -message A { - option (gogoproto.goproto_unrecognized) = false; - optional int64 Field1 = 2; - repeated B B = 1; -} - -message B { - optional C C = 1; - optional D D = 2; - optional OldC F = 5; -} - -message D { - optional int64 Field1 = 1; -} - -message C { - optional double Field2 = 2; - optional string Field3 = 3; - optional double Field4 = 4; - repeated bytes Field5 = 5; - optional int64 Field6 = 6; - repeated float Field7 = 7; -} - -message U { - // unserializing U as OldU must leave Field1 unset - option (gogoproto.goproto_unrecognized) = false; - repeated double Field2 = 2; - optional uint32 Field3 = 3; -} - -message UnoM { - // disable marshal/unmarshal generation here - // to check that reflection based code handles missing XXX_unrecognized field coorectly - option (gogoproto.sizer) = false; - option (gogoproto.marshaler) = false; - option (gogoproto.unmarshaler) = false; - // unserializing U as OldU must leave Field1 unset - option (gogoproto.goproto_unrecognized) = false; - - repeated double Field2 = 2; - optional uint32 Field3 = 3; -} - -message OldA { - // OldA == A, so removing unrecognized should not affect anything, tests must pass - option (gogoproto.goproto_unrecognized) = false; - optional int64 Field1 = 2; - repeated OldB B = 1; -} - -message OldB { - optional OldC C = 1; - optional OldC F = 5; -} - -message OldC { - optional int64 Field1 = 1; - optional double Field2 = 2; - optional string Field3 = 3; - optional int64 Field6 = 6; - repeated float Field7 = 7; -} - -message OldU { - optional string Field1 = 1; - repeated double Field2 = 2; -} - -message OldUnoM { - // disable marshal/unmarshal generation here - // to check that reflection based code handles missing XXX_unrecognized field coorectly - option (gogoproto.sizer) = false; - option (gogoproto.marshaler) = false; - option (gogoproto.unmarshaler) = false; - - optional string Field1 = 1; - repeated double Field2 = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognizedpb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognizedpb_test.go deleted file mode 100644 index 1a4f253a58..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognized/unrecognizedpb_test.go +++ /dev/null @@ -1,1882 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognized.proto -// DO NOT EDIT! - -/* -Package unrecognized is a generated protocol buffer package. - -It is generated from these files: - unrecognized.proto - -It has these top-level messages: - A - B - D - C - U - UnoM - OldA - OldB - OldC - OldU - OldUnoM -*/ -package unrecognized - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnoMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldUnoMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &D{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &D{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedDescription(t *testing.T) { - UnrecognizedDescription() -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnoMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldUnoMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnoMGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldUnoMGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnoMStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldUnoMStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/Makefile deleted file mode 100644 index 71dee0d8da..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Extensions for Protocol Buffers to create more go like structures. -# -# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognizedgroup.proto) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/oldnew_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/oldnew_test.go deleted file mode 100644 index 7c88d8510e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/oldnew_test.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package unrecognizedgroup - -import ( - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - time "time" -) - -func TestNewOld(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - newer := NewPopulatedNewNoGroup(popr, true) - data1, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - older := &OldWithGroup{} - if err := proto.Unmarshal(data1, older); err != nil { - panic(err) - } - data2, err := proto.Marshal(older) - if err != nil { - panic(err) - } - bluer := &NewNoGroup{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := newer.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) - } -} - -func TestOldNew(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldWithGroup(popr, true) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - newer := &NewNoGroup{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - bluer := &OldWithGroup{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := older.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) - } -} - -func TestOldNewOldNew(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - older := NewPopulatedOldWithGroup(popr, true) - data1, err := proto.Marshal(older) - if err != nil { - panic(err) - } - newer := &NewNoGroup{} - if err := proto.Unmarshal(data1, newer); err != nil { - panic(err) - } - data2, err := proto.Marshal(newer) - if err != nil { - panic(err) - } - bluer := &OldWithGroup{} - if err := proto.Unmarshal(data2, bluer); err != nil { - panic(err) - } - if err := older.VerboseEqual(bluer); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) - } - - data3, err := proto.Marshal(bluer) - if err != nil { - panic(err) - } - purple := &NewNoGroup{} - if err := proto.Unmarshal(data3, purple); err != nil { - panic(err) - } - data4, err := proto.Marshal(purple) - if err != nil { - panic(err) - } - magenta := &OldWithGroup{} - if err := proto.Unmarshal(data4, magenta); err != nil { - panic(err) - } - if err := older.VerboseEqual(magenta); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go deleted file mode 100644 index 2be4e7d663..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go +++ /dev/null @@ -1,2443 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognizedgroup.proto -// DO NOT EDIT! - -/* - Package unrecognizedgroup is a generated protocol buffer package. - - It is generated from these files: - unrecognizedgroup.proto - - It has these top-level messages: - NewNoGroup - A - OldWithGroup -*/ -package unrecognizedgroup - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type NewNoGroup struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` - A *A `protobuf:"bytes,5,opt,name=A" json:"A,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewNoGroup) Reset() { *m = NewNoGroup{} } -func (*NewNoGroup) ProtoMessage() {} - -type A struct { - AField *int64 `protobuf:"varint,1,opt,name=AField" json:"AField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} - -type OldWithGroup struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Group1 *OldWithGroup_Group1 `protobuf:"group,2,opt,name=Group1" json:"group1,omitempty"` - Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` - Group2 *OldWithGroup_Group2 `protobuf:"group,4,opt,name=Group2" json:"group2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldWithGroup) Reset() { *m = OldWithGroup{} } -func (*OldWithGroup) ProtoMessage() {} - -type OldWithGroup_Group1 struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 *int32 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` - Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldWithGroup_Group1) Reset() { *m = OldWithGroup_Group1{} } -func (*OldWithGroup_Group1) ProtoMessage() {} - -type OldWithGroup_Group2 struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldWithGroup_Group2) Reset() { *m = OldWithGroup_Group2{} } -func (*OldWithGroup_Group2) ProtoMessage() {} - -func init() { - proto.RegisterType((*NewNoGroup)(nil), "unrecognizedgroup.NewNoGroup") - proto.RegisterType((*A)(nil), "unrecognizedgroup.A") - proto.RegisterType((*OldWithGroup)(nil), "unrecognizedgroup.OldWithGroup") - proto.RegisterType((*OldWithGroup_Group1)(nil), "unrecognizedgroup.OldWithGroup.Group1") - proto.RegisterType((*OldWithGroup_Group2)(nil), "unrecognizedgroup.OldWithGroup.Group2") -} -func (this *NewNoGroup) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *A) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup_Group1) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup_Group2) Description() (desc *descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func UnrecognizedgroupDescription() (desc *descriptor.FileDescriptorSet) { - return &descriptor.FileDescriptorSet{File: []*descriptor.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"), - Package: func(v string) *string { return &v }("google.protobuf"), - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"), - }}, - }, {Name: func(v string) *string { return &v }("FileDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("package"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("dependency"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("public_dependency"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("weak_dependency"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("message_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("service"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("source_code_info"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"), - }, {Name: func(v string) *string { return &v }("syntax"), - Number: func(v int32) *int32 { return &v }(12), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("DescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("field"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"), - }, {Name: func(v string) *string { return &v }("nested_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"), - }, {Name: func(v string) *string { return &v }("enum_type"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"), - }, {Name: func(v string) *string { return &v }("extension_range"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"), - }, {Name: func(v string) *string { return &v }("oneof_decl"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("reserved_range"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ReservedRange"), - }, {Name: func(v string) *string { return &v }("reserved_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }, {Name: func(v string) *string { return &v }("ReservedRange"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("end"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }}, - }}, - }, {Name: func(v string) *string { return &v }("FieldDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("label"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"), - }, {Name: func(v string) *string { return &v }("type"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"), - }, {Name: func(v string) *string { return &v }("type_name"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("extendee"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("default_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("oneof_index"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("json_name"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("TYPE_FLOAT"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("TYPE_INT64"), - Number: func(v int32) *int32 { return &v }(3), - }, {Name: func(v string) *string { return &v }("TYPE_UINT64"), - Number: func(v int32) *int32 { return &v }(4), - }, {Name: func(v string) *string { return &v }("TYPE_INT32"), - Number: func(v int32) *int32 { return &v }(5), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED64"), - Number: func(v int32) *int32 { return &v }(6), - }, {Name: func(v string) *string { return &v }("TYPE_FIXED32"), - Number: func(v int32) *int32 { return &v }(7), - }, {Name: func(v string) *string { return &v }("TYPE_BOOL"), - Number: func(v int32) *int32 { return &v }(8), - }, {Name: func(v string) *string { return &v }("TYPE_STRING"), - Number: func(v int32) *int32 { return &v }(9), - }, {Name: func(v string) *string { return &v }("TYPE_GROUP"), - Number: func(v int32) *int32 { return &v }(10), - }, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"), - Number: func(v int32) *int32 { return &v }(11), - }, {Name: func(v string) *string { return &v }("TYPE_BYTES"), - Number: func(v int32) *int32 { return &v }(12), - }, {Name: func(v string) *string { return &v }("TYPE_UINT32"), - Number: func(v int32) *int32 { return &v }(13), - }, {Name: func(v string) *string { return &v }("TYPE_ENUM"), - Number: func(v int32) *int32 { return &v }(14), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"), - Number: func(v int32) *int32 { return &v }(15), - }, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"), - Number: func(v int32) *int32 { return &v }(16), - }, {Name: func(v string) *string { return &v }("TYPE_SINT32"), - Number: func(v int32) *int32 { return &v }(17), - }, {Name: func(v string) *string { return &v }("TYPE_SINT64"), - Number: func(v int32) *int32 { return &v }(18), - }}, - }, {Name: func(v string) *string { return &v }("Label"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LABEL_REPEATED"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - }, {Name: func(v string) *string { return &v }("OneofDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }, {Name: func(v string) *string { return &v }("EnumDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("value"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("number"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"), - }}, - }, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("method"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"), - }}, - }, {Name: func(v string) *string { return &v }("MethodDescriptorProto"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("input_type"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("output_type"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("options"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"), - }, {Name: func(v string) *string { return &v }("client_streaming"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("server_streaming"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }}, - }, {Name: func(v string) *string { return &v }("FileOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_outer_classname"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("java_multiple_files"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"), - Number: func(v int32) *int32 { return &v }(20), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_string_check_utf8"), - Number: func(v int32) *int32 { return &v }(27), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("optimize_for"), - Number: func(v int32) *int32 { return &v }(9), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"), - DefaultValue: func(v string) *string { return &v }("SPEED"), - }, {Name: func(v string) *string { return &v }("go_package"), - Number: func(v int32) *int32 { return &v }(11), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("cc_generic_services"), - Number: func(v int32) *int32 { return &v }(16), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("java_generic_services"), - Number: func(v int32) *int32 { return &v }(17), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("py_generic_services"), - Number: func(v int32) *int32 { return &v }(18), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(23), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("cc_enable_arenas"), - Number: func(v int32) *int32 { return &v }(31), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("objc_class_prefix"), - Number: func(v int32) *int32 { return &v }(36), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("csharp_namespace"), - Number: func(v int32) *int32 { return &v }(37), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("javanano_use_deprecated_package"), - Number: func(v int32) *int32 { return &v }(38), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("CODE_SIZE"), - Number: func(v int32) *int32 { return &v }(2), - }, {Name: func(v string) *string { return &v }("LITE_RUNTIME"), - Number: func(v int32) *int32 { return &v }(3), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MessageOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("map_entry"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("FieldOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"), - DefaultValue: func(v string) *string { return &v }("STRING"), - }, {Name: func(v string) *string { return &v }("packed"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("jstype"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(14), - TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.JSType"), - DefaultValue: func(v string) *string { return &v }("JS_NORMAL"), - }, {Name: func(v string) *string { return &v }("lazy"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("weak"), - Number: func(v int32) *int32 { return &v }(10), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - EnumType: []*descriptor.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("CORD"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("STRING_PIECE"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }, {Name: func(v string) *string { return &v }("JSType"), - Value: []*descriptor.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("JS_NORMAL"), - Number: func(v int32) *int32 { return &v }(0), - }, {Name: func(v string) *string { return &v }("JS_STRING"), - Number: func(v int32) *int32 { return &v }(1), - }, {Name: func(v string) *string { return &v }("JS_NUMBER"), - Number: func(v int32) *int32 { return &v }(2), - }}, - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }, {Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("EnumValueOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("ServiceOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("MethodOptions"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"), - Number: func(v int32) *int32 { return &v }(33), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - DefaultValue: func(v string) *string { return &v }("false"), - }, {Name: func(v string) *string { return &v }("uninterpreted_option"), - Number: func(v int32) *int32 { return &v }(999), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"), - }}, - ExtensionRange: []*descriptor.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000), - End: func(v int32) *int32 { return &v }(536870912), - }}, - }, {Name: func(v string) *string { return &v }("UninterpretedOption"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"), - }, {Name: func(v string) *string { return &v }("identifier_value"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("positive_int_value"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(4), - }, {Name: func(v string) *string { return &v }("negative_int_value"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("double_value"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("string_value"), - Number: func(v int32) *int32 { return &v }(7), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(12), - }, {Name: func(v string) *string { return &v }("aggregate_value"), - Number: func(v int32) *int32 { return &v }(8), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("is_extension"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(2), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - }}, - }}, - }, {Name: func(v string) *string { return &v }("SourceCodeInfo"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Location"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("span"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - Options: &descriptor.FieldOptions{Packed: func(v bool) *bool { return &v }(true), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("leading_comments"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("trailing_comments"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }, {Name: func(v string) *string { return &v }("leading_detached_comments"), - Number: func(v int32) *int32 { return &v }(6), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - }}, - }}, - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"), - OptimizeFor: func(v descriptor.FileOptions_OptimizeMode) *descriptor.FileOptions_OptimizeMode { return &v }(1), - GoPackage: func(v string) *string { return &v }("descriptor"), - ObjcClassPrefix: func(v string) *string { return &v }("GPB"), - CsharpNamespace: func(v string) *string { return &v }("Google.Protobuf.Reflection"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"), - Package: func(v string) *string { return &v }("gogoproto"), - Dependency: []string{"google/protobuf/descriptor.proto"}, - Extension: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"), - Number: func(v int32) *int32 { return &v }(62001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer"), - Number: func(v int32) *int32 { return &v }(62021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer"), - Number: func(v int32) *int32 { return &v }(62022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters_all"), - Number: func(v int32) *int32 { return &v }(63001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"), - Number: func(v int32) *int32 { return &v }(63002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer_all"), - Number: func(v int32) *int32 { return &v }(63003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal_all"), - Number: func(v int32) *int32 { return &v }(63004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("face_all"), - Number: func(v int32) *int32 { return &v }(63005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gostring_all"), - Number: func(v int32) *int32 { return &v }(63006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("populate_all"), - Number: func(v int32) *int32 { return &v }(63007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("stringer_all"), - Number: func(v int32) *int32 { return &v }(63008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("onlyone_all"), - Number: func(v int32) *int32 { return &v }(63009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("equal_all"), - Number: func(v int32) *int32 { return &v }(63013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("description_all"), - Number: func(v int32) *int32 { return &v }(63014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("testgen_all"), - Number: func(v int32) *int32 { return &v }(63015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("benchgen_all"), - Number: func(v int32) *int32 { return &v }(63016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("marshaler_all"), - Number: func(v int32) *int32 { return &v }(63017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("sizer_all"), - Number: func(v int32) *int32 { return &v }(63020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63021), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("enum_stringer_all"), - Number: func(v int32) *int32 { return &v }(63022), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"), - Number: func(v int32) *int32 { return &v }(63023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"), - Number: func(v int32) *int32 { return &v }(63024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"), - Number: func(v int32) *int32 { return &v }(63025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"), - Number: func(v int32) *int32 { return &v }(63026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("gogoproto_import"), - Number: func(v int32) *int32 { return &v }(63027), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"), - }, {Name: func(v string) *string { return &v }("goproto_getters"), - Number: func(v int32) *int32 { return &v }(64001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_stringer"), - Number: func(v int32) *int32 { return &v }(64003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("verbose_equal"), - Number: func(v int32) *int32 { return &v }(64004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("face"), - Number: func(v int32) *int32 { return &v }(64005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("gostring"), - Number: func(v int32) *int32 { return &v }(64006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("populate"), - Number: func(v int32) *int32 { return &v }(64007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("stringer"), - Number: func(v int32) *int32 { return &v }(67008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("onlyone"), - Number: func(v int32) *int32 { return &v }(64009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("equal"), - Number: func(v int32) *int32 { return &v }(64013), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("description"), - Number: func(v int32) *int32 { return &v }(64014), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("testgen"), - Number: func(v int32) *int32 { return &v }(64015), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("benchgen"), - Number: func(v int32) *int32 { return &v }(64016), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("marshaler"), - Number: func(v int32) *int32 { return &v }(64017), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unmarshaler"), - Number: func(v int32) *int32 { return &v }(64018), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("sizer"), - Number: func(v int32) *int32 { return &v }(64020), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_marshaler"), - Number: func(v int32) *int32 { return &v }(64023), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"), - Number: func(v int32) *int32 { return &v }(64024), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_extensions_map"), - Number: func(v int32) *int32 { return &v }(64025), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("goproto_unrecognized"), - Number: func(v int32) *int32 { return &v }(64026), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"), - }, {Name: func(v string) *string { return &v }("nullable"), - Number: func(v int32) *int32 { return &v }(65001), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("embed"), - Number: func(v int32) *int32 { return &v }(65002), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(8), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customtype"), - Number: func(v int32) *int32 { return &v }(65003), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("customname"), - Number: func(v int32) *int32 { return &v }(65004), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("jsontag"), - Number: func(v int32) *int32 { return &v }(65005), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("moretags"), - Number: func(v int32) *int32 { return &v }(65006), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("casttype"), - Number: func(v int32) *int32 { return &v }(65007), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castkey"), - Number: func(v int32) *int32 { return &v }(65008), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }, {Name: func(v string) *string { return &v }("castvalue"), - Number: func(v int32) *int32 { return &v }(65009), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(9), - Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"), - }}, - Options: &descriptor.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"), - JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"), - XXX_extensions: map[int32]proto.Extension{}, - }, - }, {Name: func(v string) *string { return &v }("unrecognizedgroup.proto"), - Package: func(v string) *string { return &v }("unrecognizedgroup"), - Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"}, - MessageType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("NewNoGroup"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("A"), - Number: func(v int32) *int32 { return &v }(5), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(11), - TypeName: func(v string) *string { return &v }(".unrecognizedgroup.A"), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64017: proto.NewExtension([]byte{0x88, 0xa1, 0x1f, 0x1}), 64018: proto.NewExtension([]byte{0x90, 0xa1, 0x1f, 0x1}), 64020: proto.NewExtension([]byte{0xa0, 0xa1, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("A"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("AField"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }}, - Options: &descriptor.MessageOptions{XXX_extensions: map[int32]proto.Extension{64017: proto.NewExtension([]byte{0x88, 0xa1, 0x1f, 0x1}), 64018: proto.NewExtension([]byte{0x90, 0xa1, 0x1f, 0x1}), 64020: proto.NewExtension([]byte{0xa0, 0xa1, 0x1f, 0x1})}}, - }, {Name: func(v string) *string { return &v }("OldWithGroup"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("group1"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(10), - TypeName: func(v string) *string { return &v }(".unrecognizedgroup.OldWithGroup.Group1"), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }, {Name: func(v string) *string { return &v }("group2"), - Number: func(v int32) *int32 { return &v }(4), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(10), - TypeName: func(v string) *string { return &v }(".unrecognizedgroup.OldWithGroup.Group2"), - }}, - NestedType: []*descriptor.DescriptorProto{{Name: func(v string) *string { return &v }("Group1"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(5), - }, {Name: func(v string) *string { return &v }("Field3"), - Number: func(v int32) *int32 { return &v }(3), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }, {Name: func(v string) *string { return &v }("Group2"), - Field: []*descriptor.FieldDescriptorProto{{Name: func(v string) *string { return &v }("Field1"), - Number: func(v int32) *int32 { return &v }(1), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(1), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(3), - }, {Name: func(v string) *string { return &v }("Field2"), - Number: func(v int32) *int32 { return &v }(2), - Label: func(v descriptor.FieldDescriptorProto_Label) *descriptor.FieldDescriptorProto_Label { return &v }(3), - Type: func(v descriptor.FieldDescriptorProto_Type) *descriptor.FieldDescriptorProto_Type { return &v }(1), - }}, - }}, - }}, - Options: &descriptor.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1})}}, - }}, - } -} -func (this *NewNoGroup) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NewNoGroup) - if !ok { - that2, ok := that.(NewNoGroup) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NewNoGroup") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NewNoGroup but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NewNoGroup but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NewNoGroup) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NewNoGroup) - if !ok { - that2, ok := that.(NewNoGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !this.A.Equal(that1.A) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *A) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *A") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *A but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *A but is not nil && this == nil") - } - if this.AField != nil && that1.AField != nil { - if *this.AField != *that1.AField { - return fmt.Errorf("AField this(%v) Not Equal that(%v)", *this.AField, *that1.AField) - } - } else if this.AField != nil { - return fmt.Errorf("this.AField == nil && that.AField != nil") - } else if that1.AField != nil { - return fmt.Errorf("AField this(%v) Not Equal that(%v)", this.AField, that1.AField) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.AField != nil && that1.AField != nil { - if *this.AField != *that1.AField { - return false - } - } else if this.AField != nil { - return false - } else if that1.AField != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup) - if !ok { - that2, ok := that.(OldWithGroup) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Group1.Equal(that1.Group1) { - return fmt.Errorf("Group1 this(%v) Not Equal that(%v)", this.Group1, that1.Group1) - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if !this.Group2.Equal(that1.Group2) { - return fmt.Errorf("Group2 this(%v) Not Equal that(%v)", this.Group2, that1.Group2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup) - if !ok { - that2, ok := that.(OldWithGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !this.Group1.Equal(that1.Group1) { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !this.Group2.Equal(that1.Group2) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup_Group1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup_Group1) - if !ok { - that2, ok := that.(OldWithGroup_Group1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup_Group1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup_Group1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup_Group1 but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup_Group1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup_Group1) - if !ok { - that2, ok := that.(OldWithGroup_Group1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup_Group2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup_Group2) - if !ok { - that2, ok := that.(OldWithGroup_Group2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup_Group2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup_Group2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup_Group2 but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup_Group2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup_Group2) - if !ok { - that2, ok := that.(OldWithGroup_Group2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NewNoGroup) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognizedgroup.NewNoGroup{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unrecognizedgroup.A{") - if this.AField != nil { - s = append(s, "AField: "+valueToGoStringUnrecognizedgroup(this.AField, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&unrecognizedgroup.OldWithGroup{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Group1 != nil { - s = append(s, "Group1: "+fmt.Sprintf("%#v", this.Group1)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Group2 != nil { - s = append(s, "Group2: "+fmt.Sprintf("%#v", this.Group2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup_Group1) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognizedgroup.OldWithGroup_Group1{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognizedgroup(this.Field2, "int32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup_Group2) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognizedgroup.OldWithGroup_Group2{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnrecognizedgroup(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnrecognizedgroup(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *NewNoGroup) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NewNoGroup) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognizedgroup(data, i, uint64(*m.Field1)) - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x19 - i++ - f1 := math.Float64bits(num) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if m.A != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognizedgroup(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.AField != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognizedgroup(data, i, uint64(*m.AField)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Unrecognizedgroup(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Unrecognizedgroup(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintUnrecognizedgroup(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNewNoGroup(r randyUnrecognizedgroup, easy bool) *NewNoGroup { - this := &NewNoGroup{} - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Field1 = &v1 - } - if r.Intn(10) != 0 { - v2 := r.Intn(100) - this.Field3 = make([]float64, v2) - for i := 0; i < v2; i++ { - this.Field3[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - this.A = NewPopulatedA(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 6) - } - return this -} - -func NewPopulatedA(r randyUnrecognizedgroup, easy bool) *A { - this := &A{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.AField = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 2) - } - return this -} - -func NewPopulatedOldWithGroup(r randyUnrecognizedgroup, easy bool) *OldWithGroup { - this := &OldWithGroup{} - if r.Intn(10) != 0 { - v4 := int64(r.Int63()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field1 = &v4 - } - if r.Intn(10) != 0 { - this.Group1 = NewPopulatedOldWithGroup_Group1(r, easy) - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.Field3 = make([]float64, v5) - for i := 0; i < v5; i++ { - this.Field3[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - this.Group2 = NewPopulatedOldWithGroup_Group2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 5) - } - return this -} - -func NewPopulatedOldWithGroup_Group1(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group1 { - this := &OldWithGroup_Group1{} - if r.Intn(10) != 0 { - v6 := int64(r.Int63()) - if r.Intn(2) == 0 { - v6 *= -1 - } - this.Field1 = &v6 - } - if r.Intn(10) != 0 { - v7 := int32(r.Int31()) - if r.Intn(2) == 0 { - v7 *= -1 - } - this.Field2 = &v7 - } - if r.Intn(10) != 0 { - v8 := r.Intn(100) - this.Field3 = make([]float64, v8) - for i := 0; i < v8; i++ { - this.Field3[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field3[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 4) - } - return this -} - -func NewPopulatedOldWithGroup_Group2(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group2 { - this := &OldWithGroup_Group2{} - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field1 = &v9 - } - if r.Intn(10) != 0 { - v10 := r.Intn(100) - this.Field2 = make([]float64, v10) - for i := 0; i < v10; i++ { - this.Field2[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field2[i] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 3) - } - return this -} - -type randyUnrecognizedgroup interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUnrecognizedgroup(r randyUnrecognizedgroup) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUnrecognizedgroup(r randyUnrecognizedgroup) string { - v11 := r.Intn(100) - tmps := make([]rune, v11) - for i := 0; i < v11; i++ { - tmps[i] = randUTF8RuneUnrecognizedgroup(r) - } - return string(tmps) -} -func randUnrecognizedUnrecognizedgroup(r randyUnrecognizedgroup, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldUnrecognizedgroup(data, r, fieldNumber, wire) - } - return data -} -func randFieldUnrecognizedgroup(data []byte, r randyUnrecognizedgroup, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) - v12 := r.Int63() - if r.Intn(2) == 0 { - v12 *= -1 - } - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(v12)) - case 1: - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateUnrecognizedgroup(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *NewNoGroup) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 1 + sovUnrecognizedgroup(uint64(*m.Field1)) - } - if len(m.Field3) > 0 { - n += 9 * len(m.Field3) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovUnrecognizedgroup(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *A) Size() (n int) { - var l int - _ = l - if m.AField != nil { - n += 1 + sovUnrecognizedgroup(uint64(*m.AField)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovUnrecognizedgroup(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozUnrecognizedgroup(x uint64) (n int) { - return sovUnrecognizedgroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *NewNoGroup) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NewNoGroup{`, - `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `AField:` + valueToStringUnrecognizedgroup(this.AField) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldWithGroup) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldWithGroup{`, - `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, - `Group1:` + strings.Replace(fmt.Sprintf("%v", this.Group1), "OldWithGroup_Group1", "OldWithGroup_Group1", 1) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `Group2:` + strings.Replace(fmt.Sprintf("%v", this.Group2), "OldWithGroup_Group2", "OldWithGroup_Group2", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldWithGroup_Group1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldWithGroup_Group1{`, - `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, - `Field2:` + valueToStringUnrecognizedgroup(this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OldWithGroup_Group2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OldWithGroup_Group2{`, - `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringUnrecognizedgroup(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *NewNoGroup) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NewNoGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NewNoGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field3 = append(m.Field3, v2) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &A{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUnrecognizedgroup(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *A) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AField", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AField = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognizedgroup(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnrecognizedgroup(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnrecognizedgroup - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnrecognizedgroup(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnrecognizedgroup = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnrecognizedgroup = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.proto deleted file mode 100644 index 0a33cbc9fe..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgroup.proto +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package unrecognizedgroup; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; - -message NewNoGroup { - option (gogoproto.unmarshaler) = true; - option (gogoproto.marshaler) = true; - option (gogoproto.sizer) = true; - optional int64 Field1 = 1; - repeated double Field3 = 3; - optional A A = 5; -} - -message A { - option (gogoproto.unmarshaler) = true; - option (gogoproto.marshaler) = true; - option (gogoproto.sizer) = true; - optional int64 AField = 1; -} - -message OldWithGroup { - optional int64 Field1 = 1; - optional group Group1 = 2 { - optional int64 Field1 = 1; - optional int32 Field2 = 2; - repeated double Field3 = 3; - } - repeated double Field3 = 3; - optional group Group2 = 4 { - optional int64 Field1 = 1; - repeated double Field2 = 2; - } -} - diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go deleted file mode 100644 index 6e34155314..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go +++ /dev/null @@ -1,768 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognizedgroup.proto -// DO NOT EDIT! - -/* -Package unrecognizedgroup is a generated protocol buffer package. - -It is generated from these files: - unrecognizedgroup.proto - -It has these top-level messages: - NewNoGroup - A - OldWithGroup -*/ -package unrecognizedgroup - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNewNoGroupProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group1Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroup_Group1JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroup_Group2JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNewNoGroupProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNewNoGroupProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group1ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group1ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group2ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedgroupDescription(t *testing.T) { - UnrecognizedgroupDescription() -} -func TestNewNoGroupVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroupVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroup_Group1VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroup_Group2VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNewNoGroupGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroupGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroup_Group1GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroup_Group2GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNewNoGroupSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNewNoGroupStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroupStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroup_Group1Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroup_Group2Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid.go deleted file mode 100644 index 4c071114bc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid.go +++ /dev/null @@ -1,122 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - "bytes" - "encoding/json" -) - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -type Uuid []byte - -func (uuid Uuid) Marshal() ([]byte, error) { - if len(uuid) == 0 { - return nil, nil - } - return []byte(uuid), nil -} - -func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { - if len(uuid) == 0 { - return 0, nil - } - copy(data, uuid) - return 16, nil -} - -func (uuid *Uuid) Unmarshal(data []byte) error { - if len(data) == 0 { - uuid = nil - return nil - } - id := Uuid(make([]byte, 16)) - copy(id, data) - *uuid = id - return nil -} - -func (uuid *Uuid) Size() int { - if uuid == nil { - return 0 - } - if len(*uuid) == 0 { - return 0 - } - return 16 -} - -func (uuid Uuid) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(uuid)) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return uuid.Unmarshal(*v) -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -type int63 interface { - Int63() int64 -} - -func NewPopulatedUuid(r int63) *Uuid { - u := RandV4(r) - return &u -} - -func RandV4(r int63) Uuid { - uuid := make(Uuid, 16) - uuid.RandV4(r) - return uuid -} - -func (uuid Uuid) RandV4(r int63) { - PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) - PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) - uuid[6] = (uuid[6] & 0xf) | 0x40 - uuid[8] = (uuid[8] & 0x3f) | 0x80 -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid_test.go deleted file mode 100644 index 93927452f9..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/test/uuid_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package test - -import ( - "github.com/gogo/protobuf/proto" - "testing" -) - -func TestBugUuid(t *testing.T) { - u := &CustomContainer{CustomStruct: NidOptCustom{Id: Uuid{}}} - data, err := proto.Marshal(u) - if err != nil { - panic(err) - } - u2 := &CustomContainer{} - err = proto.Unmarshal(data, u2) - if err != nil { - panic(err) - } - t.Logf("%+v", u2) - if u2.CustomStruct.Id != nil { - t.Fatalf("should be nil") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/command/command.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/command/command.go deleted file mode 100644 index 2c6191477a..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/command/command.go +++ /dev/null @@ -1,151 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package command - -import ( - "io/ioutil" - "os" - - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" - - _ "github.com/gogo/protobuf/plugin/grpc" - - _ "github.com/gogo/protobuf/plugin/defaultcheck" - _ "github.com/gogo/protobuf/plugin/description" - _ "github.com/gogo/protobuf/plugin/embedcheck" - _ "github.com/gogo/protobuf/plugin/enumstringer" - _ "github.com/gogo/protobuf/plugin/equal" - _ "github.com/gogo/protobuf/plugin/face" - _ "github.com/gogo/protobuf/plugin/gostring" - _ "github.com/gogo/protobuf/plugin/marshalto" - _ "github.com/gogo/protobuf/plugin/oneofcheck" - _ "github.com/gogo/protobuf/plugin/populate" - _ "github.com/gogo/protobuf/plugin/size" - _ "github.com/gogo/protobuf/plugin/stringer" - _ "github.com/gogo/protobuf/plugin/union" - _ "github.com/gogo/protobuf/plugin/unmarshal" - - "github.com/gogo/protobuf/plugin/testgen" - - "go/format" - "strings" -) - -func Read() *plugin.CodeGeneratorRequest { - g := generator.New() - data, err := ioutil.ReadAll(os.Stdin) - if err != nil { - g.Error(err, "reading input") - } - - if err := proto.Unmarshal(data, g.Request); err != nil { - g.Error(err, "parsing input proto") - } - - if len(g.Request.FileToGenerate) == 0 { - g.Fail("no files to generate") - } - return g.Request -} - -func Generate(req *plugin.CodeGeneratorRequest) *plugin.CodeGeneratorResponse { - // Begin by allocating a generator. The request and response structures are stored there - // so we can do error handling easily - the response structure contains the field to - // report failure. - g := generator.New() - g.Request = req - - g.CommandLineParameters(g.Request.GetParameter()) - - // Create a wrapped version of the Descriptors and EnumDescriptors that - // point to the file that defines them. - g.WrapTypes() - - g.SetPackageNames() - g.BuildTypeNameMap() - - g.GenerateAllFiles() - - gtest := generator.New() - - data, err := proto.Marshal(req) - if err != nil { - g.Error(err, "failed to marshal modified proto") - } - if err := proto.Unmarshal(data, gtest.Request); err != nil { - g.Error(err, "parsing modified proto") - } - - if len(gtest.Request.FileToGenerate) == 0 { - gtest.Fail("no files to generate") - } - - gtest.CommandLineParameters(gtest.Request.GetParameter()) - - // Create a wrapped version of the Descriptors and EnumDescriptors that - // point to the file that defines them. - gtest.WrapTypes() - - gtest.SetPackageNames() - gtest.BuildTypeNameMap() - - gtest.GeneratePlugin(testgen.NewPlugin()) - - for i := 0; i < len(gtest.Response.File); i++ { - if strings.Contains(*gtest.Response.File[i].Content, `//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) { - gtest.Response.File[i].Name = proto.String(strings.Replace(*gtest.Response.File[i].Name, ".pb.go", "pb_test.go", -1)) - g.Response.File = append(g.Response.File, gtest.Response.File[i]) - } - } - - for i := 0; i < len(g.Response.File); i++ { - formatted, err := format.Source([]byte(g.Response.File[i].GetContent())) - if err != nil { - g.Error(err, "go format error") - } - fmts := string(formatted) - g.Response.File[i].Content = &fmts - } - return g.Response -} - -func Write(resp *plugin.CodeGeneratorResponse) { - g := generator.New() - // Send back the results. - data, err := proto.Marshal(resp) - if err != nil { - g.Error(err, "failed to marshal output proto") - } - _, err = os.Stdout.Write(data) - if err != nil { - g.Error(err, "failed to write output proto") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/enum.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/enum.go deleted file mode 100644 index 13d0897441..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/enum.go +++ /dev/null @@ -1,78 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func EnumHasBoolExtension(enum *descriptor.EnumDescriptorProto, extension *proto.ExtensionDesc) bool { - if enum.Options == nil { - return false - } - value, err := proto.GetExtension(enum.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolEnumOption(extension *proto.ExtensionDesc, value bool) func(enum *descriptor.EnumDescriptorProto) { - return func(enum *descriptor.EnumDescriptorProto) { - if EnumHasBoolExtension(enum, extension) { - return - } - if enum.Options == nil { - enum.Options = &descriptor.EnumOptions{} - } - if err := proto.SetExtension(enum.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoEnumPrefix(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_GoprotoEnumPrefix, false)(enum) -} - -func TurnOffGoEnumStringer(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_GoprotoEnumStringer, false)(enum) -} - -func TurnOnEnumStringer(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_EnumStringer, true)(enum) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/field.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/field.go deleted file mode 100644 index a484d1e1c7..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/field.go +++ /dev/null @@ -1,83 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func FieldHasBoolExtension(field *descriptor.FieldDescriptorProto, extension *proto.ExtensionDesc) bool { - if field.Options == nil { - return false - } - value, err := proto.GetExtension(field.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolFieldOption(extension *proto.ExtensionDesc, value bool) func(field *descriptor.FieldDescriptorProto) { - return func(field *descriptor.FieldDescriptorProto) { - if FieldHasBoolExtension(field, extension) { - return - } - if field.Options == nil { - field.Options = &descriptor.FieldOptions{} - } - if err := proto.SetExtension(field.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffNullable(field *descriptor.FieldDescriptorProto) { - if field.IsRepeated() && !field.IsMessage() { - return - } - SetBoolFieldOption(gogoproto.E_Nullable, false)(field) -} - -func TurnOffNullableForNativeTypesWithoutDefaultsOnly(field *descriptor.FieldDescriptorProto) { - if field.IsRepeated() || field.IsMessage() { - return - } - if field.DefaultValue != nil { - return - } - SetBoolFieldOption(gogoproto.E_Nullable, false)(field) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/file.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/file.go deleted file mode 100644 index cfe18f208b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/file.go +++ /dev/null @@ -1,170 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "strings" -) - -func NotInPackageGoogleProtobuf(file *descriptor.FileDescriptorProto) bool { - return !strings.HasPrefix(file.GetPackage(), "google.protobuf") -} - -func FilterFiles(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto) bool) []*descriptor.FileDescriptorProto { - filtered := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i := range files { - if !f(files[i]) { - continue - } - filtered = append(filtered, files[i]) - } - return filtered -} - -func FileHasBoolExtension(file *descriptor.FileDescriptorProto, extension *proto.ExtensionDesc) bool { - if file.Options == nil { - return false - } - value, err := proto.GetExtension(file.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolFileOption(extension *proto.ExtensionDesc, value bool) func(file *descriptor.FileDescriptorProto) { - return func(file *descriptor.FileDescriptorProto) { - if FileHasBoolExtension(file, extension) { - return - } - if file.Options == nil { - file.Options = &descriptor.FileOptions{} - } - if err := proto.SetExtension(file.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoGettersAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoGettersAll, false)(file) -} - -func TurnOffGoEnumPrefixAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoEnumPrefixAll, false)(file) -} - -func TurnOffGoStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoStringerAll, false)(file) -} - -func TurnOnVerboseEqualAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_VerboseEqualAll, true)(file) -} - -func TurnOnFaceAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_FaceAll, true)(file) -} - -func TurnOnGoStringAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GostringAll, true)(file) -} - -func TurnOnPopulateAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_PopulateAll, true)(file) -} - -func TurnOnStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_StringerAll, true)(file) -} - -func TurnOnEqualAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_EqualAll, true)(file) -} - -func TurnOnDescriptionAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_DescriptionAll, true)(file) -} - -func TurnOnTestGenAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_TestgenAll, true)(file) -} - -func TurnOnBenchGenAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_BenchgenAll, true)(file) -} - -func TurnOnMarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_MarshalerAll, true)(file) -} - -func TurnOnUnmarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnmarshalerAll, true)(file) -} - -func TurnOnSizerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_SizerAll, true)(file) -} - -func TurnOffGoEnumStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoEnumStringerAll, false)(file) -} - -func TurnOnEnumStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_EnumStringerAll, true)(file) -} - -func TurnOnUnsafeUnmarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnsafeUnmarshalerAll, true)(file) -} - -func TurnOnUnsafeMarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnsafeMarshalerAll, true)(file) -} - -func TurnOffGoExtensionsMapAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoExtensionsMapAll, false)(file) -} - -func TurnOffGoUnrecognizedAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoUnrecognizedAll, false)(file) -} - -func TurnOffGogoImport(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GogoprotoImport, false)(file) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/foreach.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/foreach.go deleted file mode 100644 index 0133c9d2bd..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/foreach.go +++ /dev/null @@ -1,125 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -func ForEachFile(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto)) { - for _, file := range files { - f(file) - } -} - -func OnlyProto2(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { - outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i, file := range files { - if file.GetSyntax() == "proto3" { - continue - } - outs = append(outs, files[i]) - } - return outs -} - -func OnlyProto3(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { - outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i, file := range files { - if file.GetSyntax() != "proto3" { - continue - } - outs = append(outs, files[i]) - } - return outs -} - -func ForEachMessageInFiles(files []*descriptor.FileDescriptorProto, f func(msg *descriptor.DescriptorProto)) { - for _, file := range files { - ForEachMessage(file.MessageType, f) - } -} - -func ForEachMessage(msgs []*descriptor.DescriptorProto, f func(msg *descriptor.DescriptorProto)) { - for _, msg := range msgs { - f(msg) - ForEachMessage(msg.NestedType, f) - } -} - -func ForEachFieldInFilesExcludingExtensions(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, file := range files { - ForEachFieldExcludingExtensions(file.MessageType, f) - } -} - -func ForEachFieldInFiles(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, file := range files { - for _, ext := range file.Extension { - f(ext) - } - ForEachField(file.MessageType, f) - } -} - -func ForEachFieldExcludingExtensions(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.Field { - f(field) - } - ForEachField(msg.NestedType, f) - } -} - -func ForEachField(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.Field { - f(field) - } - for _, ext := range msg.Extension { - f(ext) - } - ForEachField(msg.NestedType, f) - } -} - -func ForEachEnumInFiles(files []*descriptor.FileDescriptorProto, f func(enum *descriptor.EnumDescriptorProto)) { - for _, file := range files { - for _, enum := range file.EnumType { - f(enum) - } - } -} - -func ForEachEnum(msgs []*descriptor.DescriptorProto, f func(field *descriptor.EnumDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.EnumType { - f(field) - } - ForEachEnum(msg.NestedType, f) - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/msg.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/msg.go deleted file mode 100644 index 3954a1869b..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/msg.go +++ /dev/null @@ -1,138 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func MessageHasBoolExtension(msg *descriptor.DescriptorProto, extension *proto.ExtensionDesc) bool { - if msg.Options == nil { - return false - } - value, err := proto.GetExtension(msg.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolMessageOption(extension *proto.ExtensionDesc, value bool) func(msg *descriptor.DescriptorProto) { - return func(msg *descriptor.DescriptorProto) { - if MessageHasBoolExtension(msg, extension) { - return - } - if msg.Options == nil { - msg.Options = &descriptor.MessageOptions{} - } - if err := proto.SetExtension(msg.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoGetters(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoGetters, false)(msg) -} - -func TurnOffGoStringer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoStringer, false)(msg) -} - -func TurnOnVerboseEqual(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_VerboseEqual, true)(msg) -} - -func TurnOnFace(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Face, true)(msg) -} - -func TurnOnGoString(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Face, true)(msg) -} - -func TurnOnPopulate(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Populate, true)(msg) -} - -func TurnOnStringer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Stringer, true)(msg) -} - -func TurnOnEqual(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Equal, true)(msg) -} - -func TurnOnDescription(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Description, true)(msg) -} - -func TurnOnTestGen(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Testgen, true)(msg) -} - -func TurnOnBenchGen(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Benchgen, true)(msg) -} - -func TurnOnMarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Marshaler, true)(msg) -} - -func TurnOnUnmarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Unmarshaler, true)(msg) -} - -func TurnOnSizer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Sizer, true)(msg) -} - -func TurnOnUnsafeUnmarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_UnsafeUnmarshaler, true)(msg) -} - -func TurnOnUnsafeMarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_UnsafeMarshaler, true)(msg) -} - -func TurnOffGoExtensionsMap(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoExtensionsMap, false)(msg) -} - -func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoUnrecognized, false)(msg) -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/Makefile b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/Makefile deleted file mode 100644 index 846b74fd91..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogofast - protoc --gogofast_out=./fast/ vanity.proto - protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ gogovanity.proto - protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ proto3.proto - go install github.com/gogo/protobuf/protoc-gen-gogofaster - protoc --gogofaster_out=./faster/ vanity.proto - protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ gogovanity.proto - protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ proto3.proto - go install github.com/gogo/protobuf/protoc-gen-gogoslick - protoc --gogoslick_out=./slick/ vanity.proto - protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ gogovanity.proto - protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ proto3.proto - -test: - go install github.com/gogo/protobuf/protoc-gen-gofast - protoc --gofast_out=./gofast/ vanity.proto - go test ./... diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/doc.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/doc.go deleted file mode 100644 index 56e5404079..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/doc.go +++ /dev/null @@ -1 +0,0 @@ -package test diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/gogovanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/gogovanity.pb.go deleted file mode 100644 index 714f68bbdf..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/gogovanity.pb.go +++ /dev/null @@ -1,385 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type B struct { - String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` - Int64 *int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64,omitempty"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *B) Reset() { *m = B{} } -func (m *B) String() string { return proto.CompactTextString(m) } -func (*B) ProtoMessage() {} - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil && m.Int64 != nil { - return *m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - if m.Int64 != nil { - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int64)) - } - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - if m.Int64 != nil { - n += 1 + sovGogovanity(uint64(*m.Int64)) - } - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/proto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/proto3.pb.go deleted file mode 100644 index ea1015fb0f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/proto3.pb.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (m *Aproto3) String() string { return proto.CompactTextString(m) } -func (*Aproto3) ProtoMessage() {} - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (m *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/vanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/vanity.pb.go deleted file mode 100644 index 0de7bd21e6..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/fast/vanity.pb.go +++ /dev/null @@ -1,355 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type A struct { - Strings *string `protobuf:"bytes,1,opt,name=Strings" json:"Strings,omitempty"` - Int *int64 `protobuf:"varint,2,req,name=Int" json:"Int,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *A) Reset() { *m = A{} } -func (m *A) String() string { return proto.CompactTextString(m) } -func (*A) ProtoMessage() {} - -func (m *A) GetStrings() string { - if m != nil && m.Strings != nil { - return *m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil && m.Int != nil { - return *m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Strings != nil { - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(*m.Strings))) - i += copy(data[i:], *m.Strings) - } - if m.Int == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } else { - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(*m.Int)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - if m.Strings != nil { - l = len(*m.Strings) - n += 1 + l + sovVanity(uint64(l)) - } - if m.Int != nil { - n += 1 + sovVanity(uint64(*m.Int)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Strings = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int = &v - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/gogovanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/gogovanity.pb.go deleted file mode 100644 index 4c41cc0ba0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/gogovanity.pb.go +++ /dev/null @@ -1,372 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type B struct { - String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` - Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` -} - -func (m *B) Reset() { *m = B{} } -func (m *B) String() string { return proto.CompactTextString(m) } -func (*B) ProtoMessage() {} - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil { - return m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(m.Int64)) - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - n += 1 + sovGogovanity(uint64(m.Int64)) - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/proto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/proto3.pb.go deleted file mode 100644 index ea1015fb0f..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/proto3.pb.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (m *Aproto3) String() string { return proto.CompactTextString(m) } -func (*Aproto3) ProtoMessage() {} - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (m *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/vanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/vanity.pb.go deleted file mode 100644 index eda3bdd478..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/faster/vanity.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type A struct { - Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` - Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` -} - -func (m *A) Reset() { *m = A{} } -func (m *A) String() string { return proto.CompactTextString(m) } -func (*A) ProtoMessage() {} - -func (m *A) GetStrings() string { - if m != nil { - return m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil { - return m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(m.Strings))) - i += copy(data[i:], m.Strings) - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(m.Int)) - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Strings) - n += 1 + l + sovVanity(uint64(l)) - n += 1 + sovVanity(uint64(m.Int)) - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strings = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - m.Int = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gofast/.gitignore b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gofast/.gitignore deleted file mode 100644 index 9b0b440dc0..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gofast/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pb.go \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gogovanity.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gogovanity.proto deleted file mode 100644 index 5d75ec6b0d..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/gogovanity.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package vanity; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message B { - optional string String = 1 [(gogoproto.nullable) = true]; - optional int64 Int64 = 2; - optional int32 Int32 = 3 [default = 1234]; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/proto3.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/proto3.proto deleted file mode 100644 index 429b6fda11..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/proto3.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package vanity; - -message Aproto3 { - string B = 1; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/gogovanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/gogovanity.pb.go deleted file mode 100644 index 827f87bba8..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/gogovanity.pb.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type B struct { - String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` - Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` -} - -func (m *B) Reset() { *m = B{} } -func (*B) ProtoMessage() {} - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil { - return m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return false - } - } else if this.String_ != nil { - return false - } else if that1.String_ != nil { - return false - } - if this.Int64 != that1.Int64 { - return false - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return false - } - } else if this.Int32 != nil { - return false - } else if that1.Int32 != nil { - return false - } - return true -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&vanity.B{") - if this.String_ != nil { - s = append(s, "String_: "+valueToGoStringGogovanity(this.String_, "string")+",\n") - } - s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") - if this.Int32 != nil { - s = append(s, "Int32: "+valueToGoStringGogovanity(this.Int32, "int32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringGogovanity(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringGogovanity(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(m.Int64)) - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - n += 1 + sovGogovanity(uint64(m.Int64)) - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *B) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&B{`, - `String_:` + valueToStringGogovanity(this.String_) + `,`, - `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, - `Int32:` + valueToStringGogovanity(this.Int32) + `,`, - `}`, - }, "") - return s -} -func valueToStringGogovanity(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/proto3.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/proto3.pb.go deleted file mode 100644 index ddd53c09cc..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/proto3.pb.go +++ /dev/null @@ -1,382 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (*Aproto3) ProtoMessage() {} - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (this *Aproto3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Aproto3) - if !ok { - that2, ok := that.(Aproto3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.B != that1.B { - return false - } - return true -} -func (this *Aproto3) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&vanity.Aproto3{") - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringProto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringProto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Aproto3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Aproto3{`, - `B:` + fmt.Sprintf("%v", this.B) + `,`, - `}`, - }, "") - return s -} -func valueToStringProto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/vanity.pb.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/vanity.pb.go deleted file mode 100644 index 5b4ff38fde..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/slick/vanity.pb.go +++ /dev/null @@ -1,426 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type A struct { - Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` - Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} - -func (m *A) GetStrings() string { - if m != nil { - return m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil { - return m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Strings != that1.Strings { - return false - } - if this.Int != that1.Int { - return false - } - return true -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&vanity.A{") - s = append(s, "Strings: "+fmt.Sprintf("%#v", this.Strings)+",\n") - s = append(s, "Int: "+fmt.Sprintf("%#v", this.Int)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringVanity(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringVanity(e map[int32]github_com_gogo_protobuf_proto.Extension) string { - if e == nil { - return "nil" - } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) - } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) - } - s += strings.Join(ss, ",") + "}" - return s -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(m.Strings))) - i += copy(data[i:], m.Strings) - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(m.Int)) - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Strings) - n += 1 + l + sovVanity(uint64(l)) - n += 1 + sovVanity(uint64(m.Int)) - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, - `Int:` + fmt.Sprintf("%v", this.Int) + `,`, - `}`, - }, "") - return s -} -func valueToStringVanity(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strings = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - m.Int = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity.proto b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity.proto deleted file mode 100644 index 0811538069..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package vanity; - -message A { - optional string Strings = 1; - required int64 Int = 2; -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity_test.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity_test.go deleted file mode 100644 index 688fdc327e..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/vanity/test/vanity_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package test - -import ( - fast "github.com/gogo/protobuf/vanity/test/fast" - faster "github.com/gogo/protobuf/vanity/test/faster" - slick "github.com/gogo/protobuf/vanity/test/slick" - "testing" -) - -func TestFast(t *testing.T) { - _ = (&fast.A{}).Marshal - _ = (&fast.A{}).MarshalTo - _ = (&fast.A{}).Unmarshal - _ = (&fast.A{}).Size - - _ = (&fast.B{}).Marshal - _ = (&fast.B{}).MarshalTo - _ = (&fast.B{}).Unmarshal - _ = (&fast.B{}).Size -} - -func TestFaster(t *testing.T) { - _ = (&faster.A{}).Marshal - _ = (&faster.A{}).MarshalTo - _ = (&faster.A{}).Unmarshal - _ = (&faster.A{}).Size - - _ = (&faster.A{}).Strings == "" - - _ = (&faster.B{}).Marshal - _ = (&faster.B{}).MarshalTo - _ = (&faster.B{}).Unmarshal - _ = (&faster.B{}).Size - - _ = (&faster.B{}).String_ == nil - _ = (&faster.B{}).Int64 == 0 - _ = (&faster.B{}).Int32 == nil - if (&faster.B{}).GetInt32() != 1234 { - t.Fatalf("expected default") - } -} - -func TestSlick(t *testing.T) { - _ = (&slick.A{}).Marshal - _ = (&slick.A{}).MarshalTo - _ = (&slick.A{}).Unmarshal - _ = (&slick.A{}).Size - - _ = (&slick.A{}).Strings == "" - - _ = (&slick.A{}).GoString - _ = (&slick.A{}).String - - _ = (&slick.B{}).Marshal - _ = (&slick.B{}).MarshalTo - _ = (&slick.B{}).Unmarshal - _ = (&slick.B{}).Size - - _ = (&slick.B{}).String_ == nil - _ = (&slick.B{}).Int64 == 0 - _ = (&slick.B{}).Int32 == nil - if (&slick.B{}).GetInt32() != 1234 { - t.Fatalf("expected default") - } -} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/version/version.go b/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/version/version.go deleted file mode 100644 index 05c49b40b2..0000000000 --- a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/version/version.go +++ /dev/null @@ -1,78 +0,0 @@ -// Extensions for Protocol Buffers to create more go like structures. -// -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package version - -import ( - "fmt" - "os/exec" - "strconv" - "strings" -) - -func Get() string { - versionBytes, _ := exec.Command("protoc", "--version").CombinedOutput() - version := strings.TrimSpace(string(versionBytes)) - versions := strings.Split(version, " ") - if len(versions) != 2 { - panic("version string returned from protoc is seperated with a space: " + version) - } - return versions[1] -} - -func parseVersion(version string) (int, error) { - versions := strings.Split(version, ".") - if len(versions) != 3 { - return 0, fmt.Errorf("version does not have 3 numbers seperated by dots: %s", version) - } - n := 0 - for _, v := range versions { - i, err := strconv.Atoi(v) - if err != nil { - return 0, err - } - n = n*10 + i - } - return n, nil -} - -func less(this, that string) bool { - thisNum, err := parseVersion(this) - if err != nil { - panic(err) - } - thatNum, err := parseVersion(that) - if err != nil { - panic(err) - } - return thisNum <= thatNum -} - -func AtLeast(v string) bool { - return less(v, Get()) -} diff --git a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/.travis.yml b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/.travis.yml similarity index 100% rename from vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/.travis.yml rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/.travis.yml diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/LICENSE b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/LICENSE rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/LICENSE diff --git a/vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/Makefile b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/Makefile similarity index 100% rename from vendor/gx/ipfs/QmSbrWdBtHgfYjeRcLotTrPXFkxY4GHMJZVxS6MQvzsYmf/go-ipld-cbor/Makefile rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/Makefile diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/README.md b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/README.md similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/README.md rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/README.md diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/batch.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/batch.go new file mode 100644 index 0000000000..60f3ca3358 --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/batch.go @@ -0,0 +1,295 @@ +package format + +import ( + "context" + "errors" + "runtime" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +// ParallelBatchCommits is the number of batch commits that can be in-flight before blocking. +// TODO(ipfs/go-ipfs#4299): Experiment with multiple datastores, storage +// devices, and CPUs to find the right value/formula. +var ParallelBatchCommits = runtime.NumCPU() * 2 + +// ErrNotCommited is returned when closing a batch that hasn't been successfully +// committed. +var ErrNotCommited = errors.New("error: batch not commited") + +// ErrClosed is returned when operating on a batch that has already been closed. +var ErrClosed = errors.New("error: batch closed") + +// NewBatch returns a node buffer (Batch) that buffers nodes internally and +// commits them to the underlying DAGService in batches. Use this if you intend +// to add or remove a lot of nodes all at once. +// +// If the passed context is canceled, any in-progress commits are aborted. +// +func NewBatch(ctx context.Context, na NodeAdder, opts ...BatchOption) *Batch { + ctx, cancel := context.WithCancel(ctx) + bopts := defaultBatchOptions + for _, o := range opts { + o(&bopts) + } + return &Batch{ + na: na, + ctx: ctx, + cancel: cancel, + commitResults: make(chan error, ParallelBatchCommits), + opts: bopts, + } +} + +// Batch is a buffer for batching adds to a dag. +type Batch struct { + na NodeAdder + + ctx context.Context + cancel func() + + activeCommits int + err error + commitResults chan error + + nodes []Node + size int + + opts batchOptions +} + +func (t *Batch) processResults() { + for t.activeCommits > 0 { + select { + case err := <-t.commitResults: + t.activeCommits-- + if err != nil { + t.setError(err) + return + } + default: + return + } + } +} + +func (t *Batch) asyncCommit() { + numBlocks := len(t.nodes) + if numBlocks == 0 { + return + } + if t.activeCommits >= ParallelBatchCommits { + select { + case err := <-t.commitResults: + t.activeCommits-- + + if err != nil { + t.setError(err) + return + } + case <-t.ctx.Done(): + t.setError(t.ctx.Err()) + return + } + } + go func(ctx context.Context, b []Node, result chan error, na NodeAdder) { + select { + case result <- na.AddMany(ctx, b): + case <-ctx.Done(): + } + }(t.ctx, t.nodes, t.commitResults, t.na) + + t.activeCommits++ + t.nodes = make([]Node, 0, numBlocks) + t.size = 0 + + return +} + +// Add adds a node to the batch and commits the batch if necessary. +func (t *Batch) Add(ctx context.Context, nd Node) error { + return t.AddMany(ctx, []Node{nd}) +} + +// AddMany many calls Add for every given Node, thus batching and +// commiting them as needed. +func (t *Batch) AddMany(ctx context.Context, nodes []Node) error { + if t.err != nil { + return t.err + } + // Not strictly necessary but allows us to catch errors early. + t.processResults() + + if t.err != nil { + return t.err + } + + t.nodes = append(t.nodes, nodes...) + for _, nd := range nodes { + t.size += len(nd.RawData()) + } + + if t.size > t.opts.maxSize || len(t.nodes) > t.opts.maxNodes { + t.asyncCommit() + } + return t.err +} + +// Commit commits batched nodes. +func (t *Batch) Commit() error { + if t.err != nil { + return t.err + } + + t.asyncCommit() + +loop: + for t.activeCommits > 0 { + select { + case err := <-t.commitResults: + t.activeCommits-- + if err != nil { + t.setError(err) + break loop + } + case <-t.ctx.Done(): + t.setError(t.ctx.Err()) + break loop + } + } + + return t.err +} + +func (t *Batch) setError(err error) { + t.err = err + + t.cancel() + + // Drain as much as we can without blocking. +loop: + for { + select { + case <-t.commitResults: + default: + break loop + } + } + + // Be nice and cleanup. These can take a *lot* of memory. + t.commitResults = nil + t.na = nil + t.ctx = nil + t.nodes = nil + t.size = 0 + t.activeCommits = 0 +} + +// BatchOption provides a way of setting internal options of +// a Batch. +// +// See this post about the "functional options" pattern: +// http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis +type BatchOption func(o *batchOptions) + +type batchOptions struct { + maxSize int + maxNodes int +} + +var defaultBatchOptions = batchOptions{ + maxSize: 8 << 20, + + // By default, only batch up to 128 nodes at a time. + // The current implementation of flatfs opens this many file + // descriptors at the same time for the optimized batch write. + maxNodes: 128, +} + +// MaxSizeBatchOption sets the maximum size of a Batch. +func MaxSizeBatchOption(size int) BatchOption { + return func(o *batchOptions) { + o.maxSize = size + } +} + +// MaxNodesBatchOption sets the maximum number of nodes in a Batch. +func MaxNodesBatchOption(num int) BatchOption { + return func(o *batchOptions) { + o.maxNodes = num + } +} + +// BufferedDAG implements DAGService using a Batch NodeAdder to wrap add +// operations in the given DAGService. It will trigger Commit() before any +// non-Add operations, but otherwise calling Commit() is left to the user. +type BufferedDAG struct { + ds DAGService + b *Batch +} + +// NewBufferedDAG creates a BufferedDAG using the given DAGService and the +// given options for the Batch NodeAdder. +func NewBufferedDAG(ctx context.Context, ds DAGService, opts ...BatchOption) *BufferedDAG { + return &BufferedDAG{ + ds: ds, + b: NewBatch(ctx, ds, opts...), + } +} + +// Commit calls commit on the Batch. +func (bd *BufferedDAG) Commit() error { + return bd.b.Commit() +} + +// Add adds a new node using Batch. +func (bd *BufferedDAG) Add(ctx context.Context, n Node) error { + return bd.b.Add(ctx, n) +} + +// AddMany adds many nodes using Batch. +func (bd *BufferedDAG) AddMany(ctx context.Context, nds []Node) error { + return bd.b.AddMany(ctx, nds) +} + +// Get commits and gets a node from the DAGService. +func (bd *BufferedDAG) Get(ctx context.Context, c cid.Cid) (Node, error) { + err := bd.b.Commit() + if err != nil { + return nil, err + } + return bd.ds.Get(ctx, c) +} + +// GetMany commits and gets nodes from the DAGService. +func (bd *BufferedDAG) GetMany(ctx context.Context, cs []cid.Cid) <-chan *NodeOption { + err := bd.b.Commit() + if err != nil { + ch := make(chan *NodeOption, 1) + defer close(ch) + ch <- &NodeOption{ + Node: nil, + Err: err, + } + return ch + } + return bd.ds.GetMany(ctx, cs) +} + +// Remove commits and removes a node from the DAGService. +func (bd *BufferedDAG) Remove(ctx context.Context, c cid.Cid) error { + err := bd.b.Commit() + if err != nil { + return err + } + return bd.ds.Remove(ctx, c) +} + +// RemoveMany commits and removes nodes from the DAGService. +func (bd *BufferedDAG) RemoveMany(ctx context.Context, cs []cid.Cid) error { + err := bd.b.Commit() + if err != nil { + return err + } + return bd.ds.RemoveMany(ctx, cs) +} diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/codecov.yml b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/codecov.yml rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/codecov.yml diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/coding.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/coding.go new file mode 100644 index 0000000000..36d74fe356 --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/coding.go @@ -0,0 +1,62 @@ +package format + +import ( + "fmt" + "sync" + + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" +) + +// DecodeBlockFunc functions decode blocks into nodes. +type DecodeBlockFunc func(block blocks.Block) (Node, error) + +type BlockDecoder interface { + Register(codec uint64, decoder DecodeBlockFunc) + Decode(blocks.Block) (Node, error) +} +type safeBlockDecoder struct { + // Can be replaced with an RCU if necessary. + lock sync.RWMutex + decoders map[uint64]DecodeBlockFunc +} + +// Register registers decoder for all blocks with the passed codec. +// +// This will silently replace any existing registered block decoders. +func (d *safeBlockDecoder) Register(codec uint64, decoder DecodeBlockFunc) { + d.lock.Lock() + defer d.lock.Unlock() + d.decoders[codec] = decoder +} + +func (d *safeBlockDecoder) Decode(block blocks.Block) (Node, error) { + // Short-circuit by cast if we already have a Node. + if node, ok := block.(Node); ok { + return node, nil + } + + ty := block.Cid().Type() + + d.lock.RLock() + decoder, ok := d.decoders[ty] + d.lock.RUnlock() + + if ok { + return decoder(block) + } else { + // TODO: get the *long* name for this format + return nil, fmt.Errorf("unrecognized object type: %d", ty) + } +} + +var DefaultBlockDecoder BlockDecoder = &safeBlockDecoder{decoders: make(map[uint64]DecodeBlockFunc)} + +// Decode decodes the given block using the default BlockDecoder. +func Decode(block blocks.Block) (Node, error) { + return DefaultBlockDecoder.Decode(block) +} + +// Register registers block decoders with the default BlockDecoder. +func Register(codec uint64, decoder DecodeBlockFunc) { + DefaultBlockDecoder.Register(codec, decoder) +} diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/daghelpers.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/daghelpers.go new file mode 100644 index 0000000000..ef0ab2bcae --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/daghelpers.go @@ -0,0 +1,118 @@ +package format + +import ( + "context" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +// GetLinks returns the CIDs of the children of the given node. Prefer this +// method over looking up the node itself and calling `Links()` on it as this +// method may be able to use a link cache. +func GetLinks(ctx context.Context, ng NodeGetter, c cid.Cid) ([]*Link, error) { + if c.Type() == cid.Raw { + return nil, nil + } + if gl, ok := ng.(LinkGetter); ok { + return gl.GetLinks(ctx, c) + } + node, err := ng.Get(ctx, c) + if err != nil { + return nil, err + } + return node.Links(), nil +} + +// GetDAG will fill out all of the links of the given Node. +// It returns an array of NodePromise with the linked nodes all in the proper +// order. +func GetDAG(ctx context.Context, ds NodeGetter, root Node) []*NodePromise { + var cids []cid.Cid + for _, lnk := range root.Links() { + cids = append(cids, lnk.Cid) + } + + return GetNodes(ctx, ds, cids) +} + +// GetNodes returns an array of 'FutureNode' promises, with each corresponding +// to the key with the same index as the passed in keys +func GetNodes(ctx context.Context, ds NodeGetter, keys []cid.Cid) []*NodePromise { + + // Early out if no work to do + if len(keys) == 0 { + return nil + } + + promises := make([]*NodePromise, len(keys)) + for i := range keys { + promises[i] = NewNodePromise(ctx) + } + + dedupedKeys := dedupeKeys(keys) + go func() { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + nodechan := ds.GetMany(ctx, dedupedKeys) + + for count := 0; count < len(keys); { + select { + case opt, ok := <-nodechan: + if !ok { + for _, p := range promises { + p.Fail(ErrNotFound) + } + return + } + + if opt.Err != nil { + for _, p := range promises { + p.Fail(opt.Err) + } + return + } + + nd := opt.Node + c := nd.Cid() + for i, lnk_c := range keys { + if c.Equals(lnk_c) { + count++ + promises[i].Send(nd) + } + } + case <-ctx.Done(): + return + } + } + }() + return promises +} + +func Copy(ctx context.Context, from, to DAGService, root cid.Cid) error { + node, err := from.Get(ctx, root) + if err != nil { + return err + } + links := node.Links() + for _, link := range links { + err := Copy(ctx, from, to, link.Cid) + if err != nil { + return err + } + } + err = to.Add(ctx, node) + if err != nil { + return err + } + return nil +} + +// Remove duplicates from a list of keys +func dedupeKeys(cids []cid.Cid) []cid.Cid { + set := cid.NewSet() + for _, c := range cids { + set.Add(c) + } + return set.Keys() +} diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/format.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/format.go new file mode 100644 index 0000000000..98711492ba --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/format.go @@ -0,0 +1,90 @@ +package format + +import ( + "context" + "fmt" + + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +type Resolver interface { + // Resolve resolves a path through this node, stopping at any link boundary + // and returning the object found as well as the remaining path to traverse + Resolve(path []string) (interface{}, []string, error) + + // Tree lists all paths within the object under 'path', and up to the given depth. + // To list the entire object (similar to `find .`) pass "" and -1 + Tree(path string, depth int) []string +} + +// Node is the base interface all IPLD nodes must implement. +// +// Nodes are **Immutable** and all methods defined on the interface are +// **Thread Safe**. +type Node interface { + blocks.Block + Resolver + + // ResolveLink is a helper function that calls resolve and asserts the + // output is a link + ResolveLink(path []string) (*Link, []string, error) + + // Copy returns a deep copy of this node + Copy() Node + + // Links is a helper function that returns all links within this object + Links() []*Link + + // TODO: not sure if stat deserves to stay + Stat() (*NodeStat, error) + + // Size returns the size in bytes of the serialized object + Size() (uint64, error) +} + +// Link represents an IPFS Merkle DAG Link between Nodes. +type Link struct { + // utf string name. should be unique per object + Name string // utf8 + + // cumulative size of target object + Size uint64 + + // multihash of the target object + Cid cid.Cid +} + +// NodeStat is a statistics object for a Node. Mostly sizes. +type NodeStat struct { + Hash string + NumLinks int // number of links in link table + BlockSize int // size of the raw, encoded data + LinksSize int // size of the links segment + DataSize int // size of the data segment + CumulativeSize int // cumulative size of object and its references +} + +func (ns NodeStat) String() string { + f := "NodeStat{NumLinks: %d, BlockSize: %d, LinksSize: %d, DataSize: %d, CumulativeSize: %d}" + return fmt.Sprintf(f, ns.NumLinks, ns.BlockSize, ns.LinksSize, ns.DataSize, ns.CumulativeSize) +} + +// MakeLink creates a link to the given node +func MakeLink(n Node) (*Link, error) { + s, err := n.Size() + if err != nil { + return nil, err + } + + return &Link{ + Size: s, + Cid: n.Cid(), + }, nil +} + +// GetNode returns the MDAG Node that this link points to +func (l *Link) GetNode(ctx context.Context, serv NodeGetter) (Node, error) { + return serv.Get(ctx, l.Cid) +} diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/merkledag.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/merkledag.go new file mode 100644 index 0000000000..93de7fa97e --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/merkledag.go @@ -0,0 +1,67 @@ +package format + +import ( + "context" + "fmt" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +var ErrNotFound = fmt.Errorf("merkledag: not found") + +// Either a node or an error. +type NodeOption struct { + Node Node + Err error +} + +// The basic Node resolution service. +type NodeGetter interface { + // Get retrieves nodes by CID. Depending on the NodeGetter + // implementation, this may involve fetching the Node from a remote + // machine; consider setting a deadline in the context. + Get(context.Context, cid.Cid) (Node, error) + + // GetMany returns a channel of NodeOptions given a set of CIDs. + GetMany(context.Context, []cid.Cid) <-chan *NodeOption +} + +// NodeAdder adds nodes to a DAG. +type NodeAdder interface { + // Add adds a node to this DAG. + Add(context.Context, Node) error + + // AddMany adds many nodes to this DAG. + // + // Consider using the Batch NodeAdder (`NewBatch`) if you make + // extensive use of this function. + AddMany(context.Context, []Node) error +} + +// NodeGetters can optionally implement this interface to make finding linked +// objects faster. +type LinkGetter interface { + NodeGetter + + // TODO(ipfs/go-ipld-format#9): This should return []cid.Cid + + // GetLinks returns the children of the node refered to by the given + // CID. + GetLinks(ctx context.Context, nd cid.Cid) ([]*Link, error) +} + +// DAGService is an IPFS Merkle DAG service. +type DAGService interface { + NodeGetter + NodeAdder + + // Remove removes a node from this DAG. + // + // Remove returns no error if the requested node is not present in this DAG. + Remove(context.Context, cid.Cid) error + + // RemoveMany removes many nodes from this DAG. + // + // It returns success even if the nodes were not present in the DAG. + RemoveMany(context.Context, []cid.Cid) error +} diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/navipld.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/navipld.go new file mode 100644 index 0000000000..89d23b43ec --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/navipld.go @@ -0,0 +1,149 @@ +package format + +import ( + "context" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +// NavigableIPLDNode implements the `NavigableNode` interface wrapping +// an IPLD `Node` and providing support for node promises. +type NavigableIPLDNode struct { + node Node + + // The CID of each child of the node. + childCIDs []cid.Cid + + // Node promises for child nodes requested. + childPromises []*NodePromise + // TODO: Consider encapsulating it in a single structure alongside `childCIDs`. + + nodeGetter NodeGetter + // TODO: Should this be stored in the `Walker`'s context to avoid passing + // it along to every node? It seems like a structure that doesn't need + // to be replicated (the entire DAG will use the same `NodeGetter`). +} + +// NewNavigableIPLDNode returns a `NavigableIPLDNode` wrapping the provided +// `node`. +func NewNavigableIPLDNode(node Node, nodeGetter NodeGetter) *NavigableIPLDNode { + nn := &NavigableIPLDNode{ + node: node, + nodeGetter: nodeGetter, + } + + nn.childCIDs = getLinkCids(node) + nn.childPromises = make([]*NodePromise, len(nn.childCIDs)) + + return nn +} + +// FetchChild implements the `NavigableNode` interface using node promises +// to preload the following child nodes to `childIndex` leaving them ready +// for subsequent `FetchChild` calls. +func (nn *NavigableIPLDNode) FetchChild(ctx context.Context, childIndex uint) (NavigableNode, error) { + // This function doesn't check that `childIndex` is valid, that's + // the `Walker` responsibility. + + // If we drop to <= preloadSize/2 preloading nodes, preload the next 10. + for i := childIndex; i < childIndex+preloadSize/2 && i < uint(len(nn.childPromises)); i++ { + // TODO: Check if canceled. + if nn.childPromises[i] == nil { + nn.preload(ctx, i) + break + } + } + + child, err := nn.getPromiseValue(ctx, childIndex) + + switch err { + case nil: + case context.DeadlineExceeded, context.Canceled: + if ctx.Err() != nil { + return nil, ctx.Err() + } + + // In this case, the context used to *preload* the node (in a previous + // `FetchChild` call) has been canceled. We need to retry the load with + // the current context and we might as well preload some extra nodes + // while we're at it. + nn.preload(ctx, childIndex) + child, err = nn.getPromiseValue(ctx, childIndex) + if err != nil { + return nil, err + } + default: + return nil, err + } + + return NewNavigableIPLDNode(child, nn.nodeGetter), nil +} + +// Number of nodes to preload every time a child is requested. +// TODO: Give more visibility to this constant, it could be an attribute +// set in the `Walker` context that gets passed in `FetchChild`. +const preloadSize = 10 + +// Preload at most `preloadSize` child nodes from `beg` through promises +// created using this `ctx`. +func (nn *NavigableIPLDNode) preload(ctx context.Context, beg uint) { + end := beg + preloadSize + if end >= uint(len(nn.childCIDs)) { + end = uint(len(nn.childCIDs)) + } + + copy(nn.childPromises[beg:], GetNodes(ctx, nn.nodeGetter, nn.childCIDs[beg:end])) +} + +// Fetch the actual node (this is the blocking part of the mechanism) +// and invalidate the promise. `preload` should always be called first +// for the `childIndex` being fetch. +// +// TODO: Include `preload` into the beginning of this function? +// (And collapse the two calls in `FetchChild`). +func (nn *NavigableIPLDNode) getPromiseValue(ctx context.Context, childIndex uint) (Node, error) { + value, err := nn.childPromises[childIndex].Get(ctx) + nn.childPromises[childIndex] = nil + return value, err +} + +// Get the CID of all the links of this `node`. +func getLinkCids(node Node) []cid.Cid { + links := node.Links() + out := make([]cid.Cid, 0, len(links)) + + for _, l := range links { + out = append(out, l.Cid) + } + return out +} + +// GetIPLDNode returns the IPLD `Node` wrapped into this structure. +func (nn *NavigableIPLDNode) GetIPLDNode() Node { + return nn.node +} + +// ChildTotal implements the `NavigableNode` returning the number +// of links (of child nodes) in this node. +func (nn *NavigableIPLDNode) ChildTotal() uint { + return uint(len(nn.GetIPLDNode().Links())) +} + +// ExtractIPLDNode is a helper function that takes a `NavigableNode` +// and returns the IPLD `Node` wrapped inside. Used in the `Visitor` +// function. +// TODO: Check for errors to avoid a panic? +func ExtractIPLDNode(node NavigableNode) Node { + return node.(*NavigableIPLDNode).GetIPLDNode() +} + +// TODO: `Cleanup` is not supported at the moment in the `Walker`. +// +// Called in `Walker.up()` when the node is not part of the path anymore. +//func (nn *NavigableIPLDNode) Cleanup() { +// // TODO: Ideally this would be the place to issue a context `cancel()` +// // but since the DAG reader uses multiple contexts in the same session +// // (through `Read` and `CtxReadFull`) we would need to store an array +// // with the multiple contexts in `NavigableIPLDNode` with its corresponding +// // cancel functions. +//} diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/package.json b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/package.json new file mode 100644 index 0000000000..ca1ff9b5b8 --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/package.json @@ -0,0 +1,36 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ipld-format" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipld-format" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "", + "name": "go-ipld-format", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.8.1" +} + diff --git a/vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/promise.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/promise.go similarity index 100% rename from vendor/gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format/promise.go rename to vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/promise.go diff --git a/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/walker.go b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/walker.go new file mode 100644 index 0000000000..81380936b3 --- /dev/null +++ b/vendor/gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format/walker.go @@ -0,0 +1,436 @@ +package format + +import ( + "context" + "errors" +) + +// Walker provides methods to move through a DAG of nodes that implement +// the `NavigableNode` interface. It uses iterative algorithms (instead +// of recursive ones) that expose the `path` of nodes from the root to +// the `ActiveNode` it currently points to. +// +// It provides multiple ways to walk through the DAG (e.g. `Iterate` +// and `Seek`). When using them, you provide a Visitor function that +// will be called for each node the Walker traverses. The Visitor can +// read data from those nodes and, optionally, direct the movement of +// the Walker by calling `Pause` (to stop traversing and return) or +// `NextChild` (to skip a child and its descendants). See the DAG reader +// in `github.com/ipfs/go-unixfs/io/dagreader.go` for a usage example. +// TODO: This example isn't merged yet. +type Walker struct { + + // Sequence of nodes in the DAG from the root to the `ActiveNode`, each + // position in the slice being the parent of the next one. The `ActiveNode` + // resides in the position indexed by `currentDepth` (the slice may contain + // more elements past that point but they should be ignored since the slice + // is not truncated to leverage the already allocated space). + // + // Every time `down` is called the `currentDepth` increases and the child + // of the `ActiveNode` is inserted after it (effectively becoming the new + // `ActiveNode`). + // + // The slice must *always* have a length bigger than zero with the root + // of the DAG at the first position (empty DAGs are not valid). + path []NavigableNode + + // Depth of the `ActiveNode`. It grows downwards, root being 0, its child 1, + // and so on. It controls the effective length of `path` and `childIndex`. + // + // A currentDepth of -1 signals the start case of a new `Walker` that hasn't + // moved yet. Although this state is an invalid index to the slices, it + // allows to centralize all the visit calls in the `down` move (starting at + // zero would require a special visit case inside every walk operation like + // `Iterate()` and `Seek`). This value should never be returned to after + // the first `down` movement, moving up from the root should always return + // `errUpOnRoot`. + currentDepth int + + // This slice has the index of the child each node in `path` is pointing + // to. The child index in the node can be set past all of its child nodes + // (having a value equal to `ChildTotal`) to signal it has visited (or + // skipped) all of them. A leaf node with no children that has its index + // in zero would also comply with this format. + // + // Complement to `path`, not only do we need to know which nodes have been + // traversed to reach the `ActiveNode` but also which child nodes they are + // to correctly have the active path of the DAG. (Reword this paragraph.) + childIndex []uint + + // Flag to signal that a pause in the current walk operation has been + // requested by the user inside `Visitor`. + pauseRequested bool + + // Used to pass information from the central `Walker` structure to the + // distributed `NavigableNode`s (to have a centralized configuration + // structure to control the behavior of all of them), e.g., to tell + // the `NavigableIPLDNode` which context should be used to load node + // promises (but this could later be used in more elaborate ways). + ctx context.Context +} + +// `Walker` implementation details: +// +// The `Iterate` and `Seek` walk operations are implemented through two +// basic move methods `up` and `down`, that change which node is the +// `ActiveNode` (modifying the `path` that leads to it). The `NextChild` +// method allows to change which child the `ActiveNode` is pointing to +// in order to change the direction of the descent. +// +// The `down` method is the analogous of a recursive call and the one in +// charge of visiting (possible new) nodes (through `Visitor`) and performing +// some user-defined logic. A `Pause` method is available to interrupt the +// current walk operation after visiting a node. +// +// Key terms and concepts: +// * Walk operation (e.g., `Iterate`). +// * Move methods: `up` and `down`. +// * Active node. +// * Path to the active node. + +// Function called each time a node is arrived upon in a walk operation +// through the `down` method (not when going back `up`). It is the main +// API to implement DAG functionality (e.g., read and seek a file DAG) +// on top of the `Walker` structure. +// +// Its argument is the current `node` being visited (the `ActiveNode`). +// Any error it returns (apart from the internal `errPauseWalkOperation`) +// will be forwarded to the caller of the walk operation (pausing it). +// +// Any of the exported methods of this API should be allowed to be called +// from within this method, e.g., `NextChild`. +// TODO: Check that. Can `ResetPosition` be called without breaking +// the `Walker` integrity? +type Visitor func(node NavigableNode) error + +// NavigableNode is the interface the nodes of a DAG need to implement in +// order to be traversed by the `Walker`. +type NavigableNode interface { + + // FetchChild returns the child of this node pointed to by `childIndex`. + // A `Context` stored in the `Walker` is passed (`ctx`) that may contain + // configuration attributes stored by the user before initiating the + // walk operation. + FetchChild(ctx context.Context, childIndex uint) (NavigableNode, error) + + // ChildTotal returns the number of children of the `ActiveNode`. + ChildTotal() uint + + // TODO: Evaluate providing the `Cleanup` and `Reset` methods. + + // Cleanup is an optional method that is called by the `Walker` when + // this node leaves the active `path`, i.e., when this node is the + // `ActiveNode` and the `up` movement is called. + //Cleanup() + // Allow this method to return an error? That would imply + // modifying the `Walker` API, `up()` would now return an error + // different than `errUpOnRoot`. + + // Reset is an optional function that is called by the `Walker` when + // `ResetPosition` is called, it is only applied to the root node + // of the DAG. + //Reset() +} + +// NewWalker creates a new `Walker` structure from a `root` +// NavigableNode. +func NewWalker(ctx context.Context, root NavigableNode) *Walker { + return &Walker{ + ctx: ctx, + + path: []NavigableNode{root}, + childIndex: []uint{0}, + + currentDepth: -1, + // Starting position, "on top" of the root node, see `currentDepth`. + } +} + +// ActiveNode returns the `NavigableNode` that `Walker` is pointing +// to at the moment. It changes when `up` or `down` is called. +func (w *Walker) ActiveNode() NavigableNode { + return w.path[w.currentDepth] + // TODO: Add a check for the initial state of `currentDepth` -1? +} + +// ErrDownNoChild signals there is no child at `ActiveChildIndex` in the +// `ActiveNode` to go down to. +var ErrDownNoChild = errors.New("can't go down, the child does not exist") + +// errUpOnRoot signals the end of the DAG after returning to the root. +var errUpOnRoot = errors.New("can't go up, already on root") + +// EndOfDag wraps the `errUpOnRoot` and signals to the user that the +// entire DAG has been iterated. +var EndOfDag = errors.New("end of DAG") + +// ErrNextNoChild signals the end of this parent child nodes. +var ErrNextNoChild = errors.New("can't go to the next child, no more child nodes in this parent") + +// errPauseWalkOperation signals the pause of the walk operation. +var errPauseWalkOperation = errors.New("pause in the current walk operation") + +// ErrNilVisitor signals the lack of a `Visitor` function. +var ErrNilVisitor = errors.New("no Visitor function specified") + +// Iterate the DAG through the DFS pre-order walk algorithm, going down +// as much as possible, then `NextChild` to the other siblings, and then up +// (to go down again). The position is saved throughout iterations (and +// can be previously set in `Seek`) allowing `Iterate` to be called +// repeatedly (after a `Pause`) to continue the iteration. +// +// This function returns the errors received from `down` (generated either +// inside the `Visitor` call or any other errors while fetching the child +// nodes), the rest of the move errors are handled within the function and +// are not returned. +func (w *Walker) Iterate(visitor Visitor) error { + + // Iterate until either: the end of the DAG (`errUpOnRoot`), a `Pause` + // is requested (`errPauseWalkOperation`) or an error happens (while + // going down). + for { + + // First, go down as much as possible. + for { + err := w.down(visitor) + + if err == ErrDownNoChild { + break + // Can't keep going down from this node, try to move Next. + } + + if err == errPauseWalkOperation { + return nil + // Pause requested, `errPauseWalkOperation` is just an internal + // error to signal to pause, don't pass it along. + } + + if err != nil { + return err + // `down` is the only movement that can return *any* error. + } + } + + // Can't move down anymore, turn to the next child in the `ActiveNode` + // to go down a different path. If there are no more child nodes + // available, go back up. + for { + err := w.NextChild() + if err == nil { + break + // No error, it turned to the next child. Try to go down again. + } + + // It can't go Next (`ErrNextNoChild`), try to move up. + err = w.up() + if err != nil { + // Can't move up, on the root again (`errUpOnRoot`). + return EndOfDag + } + + // Moved up, try `NextChild` again. + } + + // Turned to the next child (after potentially many up moves), + // try going down again. + } +} + +// Seek a specific node in a downwards manner. The `Visitor` should be +// used to steer the seek selecting at each node which child will the +// seek continue to (extending the `path` in that direction) or pause it +// (if the desired node has been found). The seek always starts from +// the root. It modifies the position so it shouldn't be used in-between +// `Iterate` calls (it can be used to set the position *before* iterating). +// If the visitor returns any non-`nil` errors the seek will stop. +// +// TODO: The seek could be extended to seek from the current position. +// (Is there something in the logic that would prevent it at the moment?) +func (w *Walker) Seek(visitor Visitor) error { + + if visitor == nil { + return ErrNilVisitor + // Although valid, there is no point in calling `Seek` without + // any extra logic, it would just go down to the leftmost leaf, + // so this would probably be a user error. + } + + // Go down until it the desired node is found (that will be signaled + // pausing the seek with `errPauseWalkOperation`) or a leaf node is + // reached (end of the DAG). + for { + err := w.down(visitor) + + if err == errPauseWalkOperation { + return nil + // Found the node, `errPauseWalkOperation` is just an internal + // error to signal to pause, don't pass it along. + } + + if err == ErrDownNoChild { + return nil + // Can't keep going down from this node, either at a leaf node + // or the `Visitor` has moved the child index past the + // available index (probably because none indicated that the + // target node could be down from there). + } + + if err != nil { + return err + // `down()` is the only movement that can return *any* error. + } + } + // TODO: Copied from the first part of `Iterate()` (although conceptually + // different from it). Could this be encapsulated in a function to avoid + // repeating code? The way the pause signal is handled it wouldn't seem + // very useful: the `errPauseWalkOperation` needs to be processed at this + // depth to return from the function (and pause the seek, returning + // from another function here wouldn't cause it to stop). +} + +// Go down one level in the DAG to the child of the `ActiveNode` +// pointed to by `ActiveChildIndex` and perform some logic on it by +// through the user-specified `visitor`. +// +// This should always be the first move in any walk operation +// (to visit the root node and move the `currentDepth` away +// from the negative value). +func (w *Walker) down(visitor Visitor) error { + child, err := w.fetchChild() + if err != nil { + return err + } + + w.extendPath(child) + + return w.visitActiveNode(visitor) +} + +// Fetch the child from the `ActiveNode` through the `FetchChild` +// method of the `NavigableNode` interface. +func (w *Walker) fetchChild() (NavigableNode, error) { + if w.currentDepth == -1 { + // First time `down()` is called, `currentDepth` is -1, + // return the root node. Don't check available child nodes + // (as the `Walker` is not actually on any node just yet + // and `ActiveChildIndex` is of no use yet). + return w.path[0], nil + } + + // Check if the child to fetch exists. + if w.ActiveChildIndex() >= w.ActiveNode().ChildTotal() { + return nil, ErrDownNoChild + } + + return w.ActiveNode().FetchChild(w.ctx, w.ActiveChildIndex()) + + // TODO: Maybe call `extendPath` here and hide it away + // from `down`. +} + +// Increase the `currentDepth` and extend the `path` to the fetched +// `child` node (which now becomes the new `ActiveNode`) +func (w *Walker) extendPath(child NavigableNode) { + w.currentDepth++ + + // Extend the slices if needed (doubling its capacity). + if w.currentDepth >= len(w.path) { + w.path = append(w.path, make([]NavigableNode, len(w.path))...) + w.childIndex = append(w.childIndex, make([]uint, len(w.childIndex))...) + // TODO: Check the performance of this grow mechanism. + } + + // `child` now becomes the `ActiveNode()`. + w.path[w.currentDepth] = child + w.childIndex[w.currentDepth] = 0 +} + +// Call the `Visitor` on the `ActiveNode`. This function should only be +// called from `down`. This is a wrapper function to `Visitor` to process +// the `Pause` signal and do other minor checks (taking this logic away +// from `down`). +func (w *Walker) visitActiveNode(visitor Visitor) error { + if visitor == nil { + return nil + // No need to check `pauseRequested` as `Pause` should + // only be called from within the `Visitor`. + } + + err := visitor(w.ActiveNode()) + + if w.pauseRequested { + // If a pause was requested make sure an error is returned + // that will cause the current walk operation to return. If + // `Visitor` didn't return an error set an artificial one + // generated by the `Walker`. + if err == nil { + err = errPauseWalkOperation + } + + w.pauseRequested = false + } + + return err +} + +// Go up from the `ActiveNode`. The only possible error this method +// can return is to signal it's already at the root and can't go up. +func (w *Walker) up() error { + if w.currentDepth < 1 { + return errUpOnRoot + } + + w.currentDepth-- + + // w.ActiveNode().Cleanup() + // If `Cleanup` is supported this would be the place to call it. + + return nil +} + +// NextChild increases the child index of the `ActiveNode` to point +// to the next child (which may exist or may be the end of the available +// child nodes). +// +// This method doesn't change the `ActiveNode`, it just changes where +// is it pointing to next, it could be interpreted as "turn to the next +// child". +func (w *Walker) NextChild() error { + w.incrementActiveChildIndex() + + if w.ActiveChildIndex() == w.ActiveNode().ChildTotal() { + return ErrNextNoChild + // At the end of the available children, signal it. + } + + return nil +} + +// incrementActiveChildIndex increments the child index of the `ActiveNode` to +// point to the next child (if it exists) or to the position past all of +// the child nodes (`ChildTotal`) to signal that all of its children have +// been visited/skipped (if already at that last position, do nothing). +func (w *Walker) incrementActiveChildIndex() { + if w.ActiveChildIndex()+1 <= w.ActiveNode().ChildTotal() { + w.childIndex[w.currentDepth]++ + } +} + +// ActiveChildIndex returns the index of the child the `ActiveNode()` +// is pointing to. +func (w *Walker) ActiveChildIndex() uint { + return w.childIndex[w.currentDepth] +} + +// SetContext changes the internal `Walker` (that is provided to the +// `NavigableNode`s when calling `FetchChild`) with the one passed +// as argument. +func (w *Walker) SetContext(ctx context.Context) { + w.ctx = ctx +} + +// Pause the current walk operation. This function must be called from +// within the `Visitor` function. +func (w *Walker) Pause() { + w.pauseRequested = true +} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/.travis.yml b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/.travis.yml deleted file mode 100644 index c942e028fd..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go -go: 1.9 -matrix: - include: - - os: osx -notifications: - email: false - slack: - secure: X7uBLWYbuUhf8QFE16CoS5z7WvFR8EN9j6cEectMW6mKZ3vwXGwVXRIPsgUq/606DsQdCCx34MR8MRWYGlu6TBolbSe9y0EP0i46yipPz22YtuT7umcVUbGEyx8MZKgG0v1u/zA0O4aCsOBpGAA3gxz8h3JlEHDt+hv6U8xRsSllVLzLSNb5lwxDtcfEDxVVqP47GMEgjLPM28Pyt5qwjk7o5a4YSVzkfdxBXxd3gWzFUWzJ5E3cTacli50dK4GVfiLcQY2aQYoYO7AAvDnvP+TPfjDkBlUEE4MUz5CDIN51Xb+WW33sX7g+r3Bj7V5IRcF973RiYkpEh+3eoiPnyWyxhDZBYilty3b+Hysp6d4Ov/3I3ll7Bcny5+cYjakjkMH3l9w3gs6Y82GlpSLSJshKWS8vPRsxFe0Pstj6QSJXTd9EBaFr+l1ScXjJv/Sya9j8N9FfTuOTESWuaL1auX4Y7zEEVHlA8SCNOO8K0eTfxGZnC/YcIHsR8rePEAcFxfOYQppkyLF/XvAtnb/LMUuu0g4y2qNdme6Oelvyar1tFEMRtbl4mRCdu/krXBFtkrsfUaVY6WTPdvXAGotsFJ0wuA53zGVhlcd3+xAlSlR3c1QX95HIMeivJKb5L4nTjP+xnrmQNtnVk+tG4LSH2ltuwcZSSczModtcBmRefrk= - -env: - global: - - secure: CRkV2+/jlO0gXzzS50XGxfMS117FNwiVjxNY/LeWq06RKD+dDCPxTJl3JCNe3l0cYEPAglV2uMMYukDiTqJ7e+HI4nh4N4mv6lwx39N8dAvJe1x5ITS2T4qk4kTjuQb1Q1vw/ZOxoQqmvNKj2uRmBdJ/HHmysbRJ1OzCWML3OXdUwJf0AYlJzTjpMfkOKr7sTtE4rwyyQtd4tKH1fGdurgI9ZuFd9qvYxK2qcJhsQ6CNqMXt+7FkVkN1rIPmofjjBTNryzUr4COFXuWH95aDAif19DeBW4lbNgo1+FpDsrgmqtuhl6NAuptI8q/imow2KXBYJ8JPXsxW8DVFj0IIp0RCd3GjaEnwBEbxAyiIHLfW7AudyTS/dJOvZffPqXnuJ8xj3OPIdNe4xY0hWl8Ju2HhKfLOAHq7VadHZWd3IHLil70EiL4/JLD1rNbMImUZisFaA8pyrcIvYYebjOnk4TscwKFLedClRSX1XsMjWWd0oykQtrdkHM2IxknnBpaLu7mFnfE07f6dkG0nlpyu4SCLey7hr5FdcEmljA0nIxTSYDg6035fQkBEAbe7hlESOekkVNT9IZPwG+lmt3vU4ofi6NqNbJecOuSB+h36IiZ9s4YQtxYNnLgW14zjuFGGyT5smc3IjBT7qngDjKIgyrSVoRkY/8udy9qbUgvBeW8= - -before_script: -- go get github.com/mattn/goveralls -script: -- bash contrib/cover.sh $HOME/build coverage.out || travis_terminate 1 -- goveralls -service=travis-ci -coverprofile=coverage.out || true -- goveralls -coverprofile=coverage.out -service=travis-ci diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/README.md b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/README.md deleted file mode 100644 index cfaac7b5bd..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/README.md +++ /dev/null @@ -1,706 +0,0 @@ -# BadgerDB [![GoDoc](https://godoc.org/github.com/dgraph-io/badger?status.svg)](https://godoc.org/github.com/dgraph-io/badger) [![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger)](https://goreportcard.com/report/github.com/dgraph-io/badger) [![Build Status](https://teamcity.dgraph.io/guestAuth/app/rest/builds/buildType:(id:Badger_UnitTests)/statusIcon.svg)](https://teamcity.dgraph.io/viewLog.html?buildTypeId=Badger_UnitTests&buildId=lastFinished&guest=1) ![Appveyor](https://ci.appveyor.com/api/projects/status/github/dgraph-io/badger?branch=master&svg=true) [![Coverage Status](https://coveralls.io/repos/github/dgraph-io/badger/badge.svg?branch=master)](https://coveralls.io/github/dgraph-io/badger?branch=master) - -![Badger mascot](images/diggy-shadow.png) - -BadgerDB is an embeddable, persistent, simple and fast key-value (KV) database -written in pure Go. It's meant to be a performant alternative to non-Go-based -key-value stores like [RocksDB](https://github.com/facebook/rocksdb). - -## Project Status -Badger v1.0 was released in Nov 2017. Check the [Changelog] for the full details. - -[Changelog]:https://github.com/dgraph-io/badger/blob/master/CHANGELOG.md - -We introduced transactions in [v0.9.0] which involved a major API change. If you have a Badger -datastore prior to that, please use [v0.8.1], but we strongly urge you to upgrade. Upgrading from -both v0.8 and v0.9 will require you to [take backups](#database-backup) and restore using the new -version. - -[v1.0.1]: //github.com/dgraph-io/badger/tree/v1.0.1 -[v0.8.1]: //github.com/dgraph-io/badger/tree/v0.8.1 -[v0.9.0]: //github.com/dgraph-io/badger/tree/v0.9.0 - -## Table of Contents - * [Getting Started](#getting-started) - + [Installing](#installing) - + [Opening a database](#opening-a-database) - + [Transactions](#transactions) - - [Read-only transactions](#read-only-transactions) - - [Read-write transactions](#read-write-transactions) - - [Managing transactions manually](#managing-transactions-manually) - + [Using key/value pairs](#using-keyvalue-pairs) - + [Monotonically increasing integers](#monotonically-increasing-integers) - * [Merge Operations](#merge-operations) - + [Setting Time To Live(TTL) and User Metadata on Keys](#setting-time-to-livettl-and-user-metadata-on-keys) - + [Iterating over keys](#iterating-over-keys) - - [Prefix scans](#prefix-scans) - - [Key-only iteration](#key-only-iteration) - + [Garbage Collection](#garbage-collection) - + [Database backup](#database-backup) - + [Memory usage](#memory-usage) - + [Statistics](#statistics) - * [Resources](#resources) - + [Blog Posts](#blog-posts) - * [Contact](#contact) - * [Design](#design) - + [Comparisons](#comparisons) - + [Benchmarks](#benchmarks) - * [Other Projects Using Badger](#other-projects-using-badger) - * [Frequently Asked Questions](#frequently-asked-questions) - -## Getting Started - -### Installing -To start using Badger, install Go 1.8 or above and run `go get`: - -```sh -$ go get github.com/dgraph-io/badger/... -``` - -This will retrieve the library and install the `badger_info` command line -utility into your `$GOBIN` path. - - -### Opening a database -The top-level object in Badger is a `DB`. It represents multiple files on disk -in specific directories, which contain the data for a single database. - -To open your database, use the `badger.Open()` function, with the appropriate -options. The `Dir` and `ValueDir` options are mandatory and must be -specified by the client. They can be set to the same value to simplify things. - -```go -package main - -import ( - "log" - - "github.com/dgraph-io/badger" -) - -func main() { - // Open the Badger database located in the /tmp/badger directory. - // It will be created if it doesn't exist. - opts := badger.DefaultOptions - opts.Dir = "/tmp/badger" - opts.ValueDir = "/tmp/badger" - db, err := badger.Open(opts) - if err != nil { - log.Fatal(err) - } - defer db.Close() -  // Your code here… -} -``` - -Please note that Badger obtains a lock on the directories so multiple processes -cannot open the same database at the same time. - -### Transactions - -#### Read-only transactions -To start a read-only transaction, you can use the `DB.View()` method: - -```go -err := db.View(func(txn *badger.Txn) error { -  // Your code here… -  return nil -}) -``` - -You cannot perform any writes or deletes within this transaction. Badger -ensures that you get a consistent view of the database within this closure. Any -writes that happen elsewhere after the transaction has started, will not be -seen by calls made within the closure. - -#### Read-write transactions -To start a read-write transaction, you can use the `DB.Update()` method: - -```go -err := db.Update(func(txn *badger.Txn) error { -  // Your code here… -  return nil -}) -``` - -All database operations are allowed inside a read-write transaction. - -Always check the returned error value. If you return an error -within your closure it will be passed through. - -An `ErrConflict` error will be reported in case of a conflict. Depending on the state -of your application, you have the option to retry the operation if you receive -this error. - -An `ErrTxnTooBig` will be reported in case the number of pending writes/deletes in -the transaction exceed a certain limit. In that case, it is best to commit the -transaction and start a new transaction immediately. Here is an example (we are -not checking for errors in some places for simplicity): - -```go -updates := make(map[string]string) -txn := db.NewTransaction(true) -for k,v := range updates { - if err := txn.Set([]byte(k),[]byte(v)); err == ErrTxnTooBig { - _ = txn.Commit() - txn = db.NewTransaction(..) - _ = txn.Set([]byte(k),[]byte(v)) - } -} -_ = txn.Commit() -``` - -#### Managing transactions manually -The `DB.View()` and `DB.Update()` methods are wrappers around the -`DB.NewTransaction()` and `Txn.Commit()` methods (or `Txn.Discard()` in case of -read-only transactions). These helper methods will start the transaction, -execute a function, and then safely discard your transaction if an error is -returned. This is the recommended way to use Badger transactions. - -However, sometimes you may want to manually create and commit your -transactions. You can use the `DB.NewTransaction()` function directly, which -takes in a boolean argument to specify whether a read-write transaction is -required. For read-write transactions, it is necessary to call `Txn.Commit()` -to ensure the transaction is committed. For read-only transactions, calling -`Txn.Discard()` is sufficient. `Txn.Commit()` also calls `Txn.Discard()` -internally to cleanup the transaction, so just calling `Txn.Commit()` is -sufficient for read-write transaction. However, if your code doesn’t call -`Txn.Commit()` for some reason (for e.g it returns prematurely with an error), -then please make sure you call `Txn.Discard()` in a `defer` block. Refer to the -code below. - -```go -// Start a writable transaction. -txn := db.NewTransaction(true) -defer txn.Discard() - -// Use the transaction... -err := txn.Set([]byte("answer"), []byte("42")) -if err != nil { - return err -} - -// Commit the transaction and check for error. -if err := txn.Commit(nil); err != nil { - return err -} -``` - -The first argument to `DB.NewTransaction()` is a boolean stating if the transaction -should be writable. - -Badger allows an optional callback to the `Txn.Commit()` method. Normally, the -callback can be set to `nil`, and the method will return after all the writes -have succeeded. However, if this callback is provided, the `Txn.Commit()` -method returns as soon as it has checked for any conflicts. The actual writing -to the disk happens asynchronously, and the callback is invoked once the -writing has finished, or an error has occurred. This can improve the throughput -of the application in some cases. But it also means that a transaction is not -durable until the callback has been invoked with a `nil` error value. - -### Using key/value pairs -To save a key/value pair, use the `Txn.Set()` method: - -```go -err := db.Update(func(txn *badger.Txn) error { - err := txn.Set([]byte("answer"), []byte("42")) - return err -}) -``` - -This will set the value of the `"answer"` key to `"42"`. To retrieve this -value, we can use the `Txn.Get()` method: - -```go -err := db.View(func(txn *badger.Txn) error { - item, err := txn.Get([]byte("answer")) - handle(err) - - var valNot, valCopy []byte - err := item.Value(func(val []byte) error { - // This func with val would only be called if item.Value encounters no error. - - // Accessing val here is valid. - fmt.Printf("The answer is: %s\n", val) - - // Copying or parsing val is valid. - valCopy = append([]byte{}, val...) - - // Assigning val slice to another variable is NOT OK. - valNot = val // Do not do this. - return nil - }) - handle(err) - - // DO NOT access val here. It is the most common cause of bugs. - fmt.Printf("NEVER do this. %s\n", valNot) - - // You must copy it to use it outside item.Value(...). - fmt.Printf("The answer is: %s\n", valCopy) - - // Alternatively, you could also use item.ValueCopy(). - valCopy, err = item.ValueCopy(nil) - handle(err) - fmt.Printf("The answer is: %s\n", valCopy) - - return nil -}) -``` - -`Txn.Get()` returns `ErrKeyNotFound` if the value is not found. - -Please note that values returned from `Get()` are only valid while the -transaction is open. If you need to use a value outside of the transaction -then you must use `copy()` to copy it to another byte slice. - -Use the `Txn.Delete()` method to delete a key. - -### Monotonically increasing integers - -To get unique monotonically increasing integers with strong durability, you can -use the `DB.GetSequence` method. This method returns a `Sequence` object, which -is thread-safe and can be used concurrently via various goroutines. - -Badger would lease a range of integers to hand out from memory, with the -bandwidth provided to `DB.GetSequence`. The frequency at which disk writes are -done is determined by this lease bandwidth and the frequency of `Next` -invocations. Setting a bandwith too low would do more disk writes, setting it -too high would result in wasted integers if Badger is closed or crashes. -To avoid wasted integers, call `Release` before closing Badger. - -```go -seq, err := db.GetSequence(key, 1000) -defer seq.Release() -for { - num, err := seq.Next() -} -``` - -### Merge Operations -Badger provides support for unordered merge operations. You can define a func -of type `MergeFunc` which takes in an existing value, and a value to be -_merged_ with it. It returns a new value which is the result of the _merge_ -operation. All values are specified in byte arrays. For e.g., here is a merge -function (`add`) which adds a `uint64` value to an existing `uint64` value. - -```Go -func uint64ToBytes(i uint64) []byte { - var buf [8]byte - binary.BigEndian.PutUint64(buf[:], i) - return buf[:] -} - -func bytesToUint64(b []byte) uint64 { - return binary.BigEndian.Uint64(b) -} - -// Merge function to add two uint64 numbers -func add(existing, new []byte) []byte { - return uint64ToBytes(bytesToUint64(existing) + bytesToUint64(new)) -} -``` - -This function can then be passed to the `DB.GetMergeOperator()` method, along -with a key, and a duration value. The duration specifies how often the merge -function is run on values that have been added using the `MergeOperator.Add()` -method. - -`MergeOperator.Get()` method can be used to retrieve the cumulative value of the key -associated with the merge operation. - -```Go -key := []byte("merge") -m := db.GetMergeOperator(key, add, 200*time.Millisecond) -defer m.Stop() - -m.Add(uint64ToBytes(1)) -m.Add(uint64ToBytes(2)) -m.Add(uint64ToBytes(3)) - -res, err := m.Get() // res should have value 6 encoded -fmt.Println(bytesToUint64(res)) -``` - -### Setting Time To Live(TTL) and User Metadata on Keys -Badger allows setting an optional Time to Live (TTL) value on keys. Once the TTL has -elapsed, the key will no longer be retrievable and will be eligible for garbage -collection. A TTL can be set as a `time.Duration` value using the `Txn.SetWithTTL()` -API method. - -An optional user metadata value can be set on each key. A user metadata value -is represented by a single byte. It can be used to set certain bits along -with the key to aid in interpreting or decoding the key-value pair. User -metadata can be set using the `Txn.SetWithMeta()` API method. - -`Txn.SetEntry()` can be used to set the key, value, user metatadata and TTL, -all at once. - -### Iterating over keys -To iterate over keys, we can use an `Iterator`, which can be obtained using the -`Txn.NewIterator()` method. Iteration happens in byte-wise lexicographical sorting -order. - - -```go -err := db.View(func(txn *badger.Txn) error { - opts := badger.DefaultIteratorOptions - opts.PrefetchSize = 10 - it := txn.NewIterator(opts) - defer it.Close() - for it.Rewind(); it.Valid(); it.Next() { - item := it.Item() - k := item.Key() - err := item.Value(func(v []byte) error { - fmt.Printf("key=%s, value=%s\n", k, v) - return nil - }) - if err != nil { - return err - } - } - return nil -}) -``` - -The iterator allows you to move to a specific point in the list of keys and move -forward or backward through the keys one at a time. - -By default, Badger prefetches the values of the next 100 items. You can adjust -that with the `IteratorOptions.PrefetchSize` field. However, setting it to -a value higher than GOMAXPROCS (which we recommend to be 128 or higher) -shouldn’t give any additional benefits. You can also turn off the fetching of -values altogether. See section below on key-only iteration. - -#### Prefix scans -To iterate over a key prefix, you can combine `Seek()` and `ValidForPrefix()`: - -```go -db.View(func(txn *badger.Txn) error { - it := txn.NewIterator(badger.DefaultIteratorOptions) - defer it.Close() - prefix := []byte("1234") - for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { - item := it.Item() - k := item.Key() - err := item.Value(func(v []byte) error { - fmt.Printf("key=%s, value=%s\n", k, v) - return nil - }) - if err != nil { - return err - } - } - return nil -}) -``` - -#### Key-only iteration -Badger supports a unique mode of iteration called _key-only_ iteration. It is -several order of magnitudes faster than regular iteration, because it involves -access to the LSM-tree only, which is usually resident entirely in RAM. To -enable key-only iteration, you need to set the `IteratorOptions.PrefetchValues` -field to `false`. This can also be used to do sparse reads for selected keys -during an iteration, by calling `item.Value()` only when required. - -```go -err := db.View(func(txn *badger.Txn) error { - opts := badger.DefaultIteratorOptions - opts.PrefetchValues = false - it := txn.NewIterator(opts) - defer it.Close() - for it.Rewind(); it.Valid(); it.Next() { - item := it.Item() - k := item.Key() - fmt.Printf("key=%s\n", k) - } - return nil -}) -``` - -### Garbage Collection -Badger values need to be garbage collected, because of two reasons: - -* Badger keeps values separately from the LSM tree. This means that the compaction operations -that clean up the LSM tree do not touch the values at all. Values need to be cleaned up -separately. - -* Concurrent read/write transactions could leave behind multiple values for a single key, because they -are stored with different versions. These could accumulate, and take up unneeded space beyond the -time these older versions are needed. - -Badger relies on the client to perform garbage collection at a time of their choosing. It provides -the following methods, which can be invoked at an appropriate time: - -* `DB.PurgeOlderVersions()`: Is no longer needed since v1.5.0. Badger's LSM tree automatically discards older/invalid versions of keys. -* `DB.RunValueLogGC()`: This method is designed to do garbage collection while - Badger is online. Along with randomly picking a file, it uses statistics generated by the - LSM-tree compactions to pick files that are likely to lead to maximum space - reclamation. - -It is recommended that this method be called during periods of low activity in -your system, or periodically. One call would only result in removal of at max -one log file. As an optimization, you could also immediately re-run it whenever -it returns nil error (indicating a successful value log GC). - -```go -ticker := time.NewTicker(5 * time.Minute) -defer ticker.Stop() -for range ticker.C { -again: - err := db.RunValueLogGC(0.7) - if err == nil { - goto again - } -} -``` - -### Database backup -There are two public API methods `DB.Backup()` and `DB.Load()` which can be -used to do online backups and restores. Badger v0.9 provides a CLI tool -`badger`, which can do offline backup/restore. Make sure you have `$GOPATH/bin` -in your PATH to use this tool. - -The command below will create a version-agnostic backup of the database, to a -file `badger.bak` in the current working directory - -``` -badger backup --dir -``` - -To restore `badger.bak` in the current working directory to a new database: - -``` -badger restore --dir -``` - -See `badger --help` for more details. - -If you have a Badger database that was created using v0.8 (or below), you can -use the `badger_backup` tool provided in v0.8.1, and then restore it using the -command above to upgrade your database to work with the latest version. - -``` -badger_backup --dir --backup-file badger.bak -``` - -### Memory usage -Badger's memory usage can be managed by tweaking several options available in -the `Options` struct that is passed in when opening the database using -`DB.Open`. - -- `Options.ValueLogLoadingMode` can be set to `options.FileIO` (instead of the - default `options.MemoryMap`) to avoid memory-mapping log files. This can be - useful in environments with low RAM. -- Number of memtables (`Options.NumMemtables`) - - If you modify `Options.NumMemtables`, also adjust `Options.NumLevelZeroTables` and - `Options.NumLevelZeroTablesStall` accordingly. -- Number of concurrent compactions (`Options.NumCompactors`) -- Mode in which LSM tree is loaded (`Options.TableLoadingMode`) -- Size of table (`Options.MaxTableSize`) -- Size of value log file (`Options.ValueLogFileSize`) - -If you want to decrease the memory usage of Badger instance, tweak these -options (ideally one at a time) until you achieve the desired -memory usage. - -### Statistics -Badger records metrics using the [expvar] package, which is included in the Go -standard library. All the metrics are documented in [y/metrics.go][metrics] -file. - -`expvar` package adds a handler in to the default HTTP server (which has to be -started explicitly), and serves up the metrics at the `/debug/vars` endpoint. -These metrics can then be collected by a system like [Prometheus], to get -better visibility into what Badger is doing. - -[expvar]: https://golang.org/pkg/expvar/ -[metrics]: https://github.com/dgraph-io/badger/blob/master/y/metrics.go -[Prometheus]: https://prometheus.io/ - -## Resources - -### Blog Posts -1. [Introducing Badger: A fast key-value store written natively in -Go](https://open.dgraph.io/post/badger/) -2. [Make Badger crash resilient with ALICE](https://blog.dgraph.io/post/alice/) -3. [Badger vs LMDB vs BoltDB: Benchmarking key-value databases in Go](https://blog.dgraph.io/post/badger-lmdb-boltdb/) -4. [Concurrent ACID Transactions in Badger](https://blog.dgraph.io/post/badger-txn/) - -## Design -Badger was written with these design goals in mind: - -- Write a key-value database in pure Go. -- Use latest research to build the fastest KV database for data sets spanning terabytes. -- Optimize for SSDs. - -Badger’s design is based on a paper titled _[WiscKey: Separating Keys from -Values in SSD-conscious Storage][wisckey]_. - -[wisckey]: https://www.usenix.org/system/files/conference/fast16/fast16-papers-lu.pdf - -### Comparisons -| Feature | Badger | RocksDB | BoltDB | -| ------- | ------ | ------- | ------ | -| Design | LSM tree with value log | LSM tree only | B+ tree | -| High Read throughput | Yes | No | Yes | -| High Write throughput | Yes | Yes | No | -| Designed for SSDs | Yes (with latest research 1) | Not specifically 2 | No | -| Embeddable | Yes | Yes | Yes | -| Sorted KV access | Yes | Yes | Yes | -| Pure Go (no Cgo) | Yes | No | Yes | -| Transactions | Yes, ACID, concurrent with SSI3 | Yes (but non-ACID) | Yes, ACID | -| Snapshots | Yes | Yes | Yes | -| TTL support | Yes | Yes | No | - -1 The [WISCKEY paper][wisckey] (on which Badger is based) saw big -wins with separating values from keys, significantly reducing the write -amplification compared to a typical LSM tree. - -2 RocksDB is an SSD optimized version of LevelDB, which was designed specifically for rotating disks. -As such RocksDB's design isn't aimed at SSDs. - -3 SSI: Serializable Snapshot Isolation. For more details, see the blog post [Concurrent ACID Transactions in Badger](https://blog.dgraph.io/post/badger-txn/) - -### Benchmarks -We have run comprehensive benchmarks against RocksDB, Bolt and LMDB. The -benchmarking code, and the detailed logs for the benchmarks can be found in the -[badger-bench] repo. More explanation, including graphs can be found the blog posts (linked -above). - -[badger-bench]: https://github.com/dgraph-io/badger-bench - -## Other Projects Using Badger -Below is a list of known projects that use Badger: - -* [0-stor](https://github.com/zero-os/0-stor) - Single device object store. -* [Dgraph](https://github.com/dgraph-io/dgraph) - Distributed graph database. -* [Dispatch Protocol](https://github.com/dispatchlabs/disgo) - Blockchain protocol for distributed application data analytics. -* [Sandglass](https://github.com/celrenheit/sandglass) - distributed, horizontally scalable, persistent, time sorted message queue. -* [Usenet Express](https://usenetexpress.com/) - Serving over 300TB of data with Badger. -* [go-ipfs](https://github.com/ipfs/go-ipfs) - Go client for the InterPlanetary File System (IPFS), a new hypermedia distribution protocol. -* [gorush](https://github.com/appleboy/gorush) - A push notification server written in Go. -* [emitter](https://github.com/emitter-io/emitter) - Scalable, low latency, distributed pub/sub broker with message storage, uses MQTT, gossip and badger. -* [GarageMQ](https://github.com/valinurovam/garagemq) - AMQP server written in Go. - -If you are using Badger in a project please send a pull request to add it to the list. - -## Frequently Asked Questions -- **My writes are getting stuck. Why?** - -**Update: With the new `Value(func(v []byte))` API, this deadlock can no longer -happen.** - -The following is true for users on Badger v1.x. - -This can happen if a long running iteration with `Prefetch` is set to false, but -a `Item::Value` call is made internally in the loop. That causes Badger to -acquire read locks over the value log files to avoid value log GC removing the -file from underneath. As a side effect, this also blocks a new value log GC -file from being created, when the value log file boundary is hit. - -Please see Github issues [#293](https://github.com/dgraph-io/badger/issues/293) -and [#315](https://github.com/dgraph-io/badger/issues/315). - -There are multiple workarounds during iteration: - -1. Use `Item::ValueCopy` instead of `Item::Value` when retrieving value. -1. Set `Prefetch` to true. Badger would then copy over the value and release the - file lock immediately. -1. When `Prefetch` is false, don't call `Item::Value` and do a pure key-only - iteration. This might be useful if you just want to delete a lot of keys. -1. Do the writes in a separate transaction after the reads. - -- **My writes are really slow. Why?** - -Are you creating a new transaction for every single key update, and waiting for -it to `Commit` fully before creating a new one? This will lead to very low -throughput. To get best write performance, batch up multiple writes inside a -transaction using single `DB.Update()` call. You could also have multiple such -`DB.Update()` calls being made concurrently from multiple goroutines. - -The way to achieve the highest write throughput via Badger, is to do serial -writes and use callbacks in `txn.Commit`, like so: - -```go -che := make(chan error, 1) -storeErr := func(err error) { - if err == nil { - return - } - select { - case che <- err: - default: - } -} - -getErr := func() error { - select { - case err := <-che: - return err - default: - return nil - } -} - -var wg sync.WaitGroup -for _, kv := range kvs { - wg.Add(1) - txn := db.NewTransaction(true) - handle(txn.Set(kv.Key, kv.Value)) - handle(txn.Commit(func(err error) { - storeErr(err) - wg.Done() - })) -} -wg.Wait() -return getErr() -``` - -In this code, we passed a callback function to `txn.Commit`, which can pick up -and return the first error encountered, if any. Callbacks can be made to do more -things, like retrying commits etc. - -- **I don't see any disk write. Why?** - -If you're using Badger with `SyncWrites=false`, then your writes might not be written to value log -and won't get synced to disk immediately. Writes to LSM tree are done inmemory first, before they -get compacted to disk. The compaction would only happen once `MaxTableSize` has been reached. So, if -you're doing a few writes and then checking, you might not see anything on disk. Once you `Close` -the database, you'll see these writes on disk. - -- **Reverse iteration doesn't give me the right results.** - -Just like forward iteration goes to the first key which is equal or greater than the SEEK key, reverse iteration goes to the first key which is equal or lesser than the SEEK key. Therefore, SEEK key would not be part of the results. You can typically add a `0xff` byte as a suffix to the SEEK key to include it in the results. See the following issues: [#436](https://github.com/dgraph-io/badger/issues/436) and [#347](https://github.com/dgraph-io/badger/issues/347). - -- **Which instances should I use for Badger?** - -We recommend using instances which provide local SSD storage, without any limit -on the maximum IOPS. In AWS, these are storage optimized instances like i3. They -provide local SSDs which clock 100K IOPS over 4KB blocks easily. - -- **I'm getting a closed channel error. Why?** - -``` -panic: close of closed channel -panic: send on closed channel -``` - -If you're seeing panics like above, this would be because you're operating on a closed DB. This can happen, if you call `Close()` before sending a write, or multiple times. You should ensure that you only call `Close()` once, and all your read/write operations finish before closing. - -- **Are there any Go specific settings that I should use?** - -We *highly* recommend setting a high number for GOMAXPROCS, which allows Go to -observe the full IOPS throughput provided by modern SSDs. In Dgraph, we have set -it to 128. For more details, [see this -thread](https://groups.google.com/d/topic/golang-nuts/jPb_h3TvlKE/discussion). - -- **Are there any linux specific settings that I should use?** - -We recommend setting max file descriptors to a high number depending upon the expected size of you data. - -## Contact -- Please use [discuss.dgraph.io](https://discuss.dgraph.io) for questions, feature requests and discussions. -- Please use [Github issue tracker](https://github.com/dgraph-io/badger/issues) for filing bugs or feature requests. -- Join [![Slack Status](http://slack.dgraph.io/badge.svg)](http://slack.dgraph.io). -- Follow us on Twitter [@dgraphlabs](https://twitter.com/dgraphlabs). - diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/backup.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/backup.go deleted file mode 100644 index 606db0112a..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/backup.go +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "bufio" - "encoding/binary" - "io" - "log" - "sync" - - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" - - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos" -) - -func writeTo(entry *protos.KVPair, w io.Writer) error { - if err := binary.Write(w, binary.LittleEndian, uint64(entry.Size())); err != nil { - return err - } - buf, err := entry.Marshal() - if err != nil { - return err - } - _, err = w.Write(buf) - return err -} - -// Backup dumps a protobuf-encoded list of all entries in the database into the -// given writer, that are newer than the specified version. It returns a -// timestamp indicating when the entries were dumped which can be passed into a -// later invocation to generate an incremental dump, of entries that have been -// added/modified since the last invocation of DB.Backup() -// -// This can be used to backup the data in a database at a given point in time. -func (db *DB) Backup(w io.Writer, since uint64) (uint64, error) { - var tsNew uint64 - err := db.View(func(txn *Txn) error { - opts := DefaultIteratorOptions - opts.AllVersions = true - it := txn.NewIterator(opts) - defer it.Close() - - for it.Rewind(); it.Valid(); it.Next() { - item := it.Item() - if item.Version() < since { - // Ignore versions less than given timestamp - continue - } - valCopy, err := item.ValueCopy(nil) - if err != nil { - log.Printf("Key [%x]. Error while fetching value [%v]\n", item.Key(), err) - continue - } - - entry := &protos.KVPair{ - Key: y.Copy(item.Key()), - Value: valCopy, - UserMeta: []byte{item.UserMeta()}, - Version: item.Version(), - ExpiresAt: item.ExpiresAt(), - } - - // Write entries to disk - if err := writeTo(entry, w); err != nil { - return err - } - } - tsNew = txn.readTs - return nil - }) - return tsNew, err -} - -// Load reads a protobuf-encoded list of all entries from a reader and writes -// them to the database. This can be used to restore the database from a backup -// made by calling DB.Backup(). -// -// DB.Load() should be called on a database that is not running any other -// concurrent transactions while it is running. -func (db *DB) Load(r io.Reader) error { - br := bufio.NewReaderSize(r, 16<<10) - unmarshalBuf := make([]byte, 1<<10) - var entries []*Entry - var wg sync.WaitGroup - errChan := make(chan error, 1) - - // func to check for pending error before sending off a batch for writing - batchSetAsyncIfNoErr := func(entries []*Entry) error { - select { - case err := <-errChan: - return err - default: - wg.Add(1) - return db.batchSetAsync(entries, func(err error) { - defer wg.Done() - if err != nil { - select { - case errChan <- err: - default: - } - } - }) - } - } - - for { - var sz uint64 - err := binary.Read(br, binary.LittleEndian, &sz) - if err == io.EOF { - break - } else if err != nil { - return err - } - - if cap(unmarshalBuf) < int(sz) { - unmarshalBuf = make([]byte, sz) - } - - e := &protos.KVPair{} - if _, err = io.ReadFull(br, unmarshalBuf[:sz]); err != nil { - return err - } - if err = e.Unmarshal(unmarshalBuf[:sz]); err != nil { - return err - } - entries = append(entries, &Entry{ - Key: y.KeyWithTs(e.Key, e.Version), - Value: e.Value, - UserMeta: e.UserMeta[0], - ExpiresAt: e.ExpiresAt, - }) - // Update nextTxnTs, memtable stores this timestamp in badger head - // when flushed. - if e.Version >= db.orc.nextTxnTs { - db.orc.nextTxnTs = e.Version + 1 - } - - if len(entries) == 1000 { - if err := batchSetAsyncIfNoErr(entries); err != nil { - return err - } - entries = make([]*Entry, 0, 1000) - } - } - - if len(entries) > 0 { - if err := batchSetAsyncIfNoErr(entries); err != nil { - return err - } - } - wg.Wait() - - select { - case err := <-errChan: - return err - default: - // Mark all versions done up until nextTxnTs. - db.orc.txnMark.Done(db.orc.nextTxnTs - 1) - return nil - } -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/errors.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/errors.go deleted file mode 100644 index 901b2ed793..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/errors.go +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" -) - -var ( - // ErrValueLogSize is returned when opt.ValueLogFileSize option is not within the valid - // range. - ErrValueLogSize = errors.New("Invalid ValueLogFileSize, must be between 1MB and 2GB") - - // ErrValueThreshold is returned when ValueThreshold is set to a value close to or greater than - // uint16. - ErrValueThreshold = errors.New("Invalid ValueThreshold, must be lower than uint16.") - - // ErrKeyNotFound is returned when key isn't found on a txn.Get. - ErrKeyNotFound = errors.New("Key not found") - - // ErrTxnTooBig is returned if too many writes are fit into a single transaction. - ErrTxnTooBig = errors.New("Txn is too big to fit into one request") - - // ErrConflict is returned when a transaction conflicts with another transaction. This can happen if - // the read rows had been updated concurrently by another transaction. - ErrConflict = errors.New("Transaction Conflict. Please retry") - - // ErrReadOnlyTxn is returned if an update function is called on a read-only transaction. - ErrReadOnlyTxn = errors.New("No sets or deletes are allowed in a read-only transaction") - - // ErrDiscardedTxn is returned if a previously discarded transaction is re-used. - ErrDiscardedTxn = errors.New("This transaction has been discarded. Create a new one") - - // ErrEmptyKey is returned if an empty key is passed on an update function. - ErrEmptyKey = errors.New("Key cannot be empty") - - // ErrInvalidKey is returned if the key has a special !badger! prefix, - // reserved for internal usage. - ErrInvalidKey = errors.New("Key is using a reserved !badger! prefix") - - // ErrRetry is returned when a log file containing the value is not found. - // This usually indicates that it may have been garbage collected, and the - // operation needs to be retried. - ErrRetry = errors.New("Unable to find log file. Please retry") - - // ErrThresholdZero is returned if threshold is set to zero, and value log GC is called. - // In such a case, GC can't be run. - ErrThresholdZero = errors.New( - "Value log GC can't run because threshold is set to zero") - - // ErrNoRewrite is returned if a call for value log GC doesn't result in a log file rewrite. - ErrNoRewrite = errors.New( - "Value log GC attempt didn't result in any cleanup") - - // ErrRejected is returned if a value log GC is called either while another GC is running, or - // after DB::Close has been called. - ErrRejected = errors.New("Value log GC request rejected") - - // ErrInvalidRequest is returned if the user request is invalid. - ErrInvalidRequest = errors.New("Invalid request") - - // ErrManagedTxn is returned if the user tries to use an API which isn't - // allowed due to external management of transactions, when using ManagedDB. - ErrManagedTxn = errors.New( - "Invalid API request. Not allowed to perform this action using ManagedDB") - - // ErrInvalidDump if a data dump made previously cannot be loaded into the database. - ErrInvalidDump = errors.New("Data dump cannot be read") - - // ErrZeroBandwidth is returned if the user passes in zero bandwidth for sequence. - ErrZeroBandwidth = errors.New("Bandwidth must be greater than zero") - - // ErrInvalidLoadingMode is returned when opt.ValueLogLoadingMode option is not - // within the valid range - ErrInvalidLoadingMode = errors.New("Invalid ValueLogLoadingMode, must be FileIO or MemoryMap") - - // ErrReplayNeeded is returned when opt.ReadOnly is set but the - // database requires a value log replay. - ErrReplayNeeded = errors.New("Database was not properly closed, cannot open read-only") - - // ErrWindowsNotSupported is returned when opt.ReadOnly is used on Windows - ErrWindowsNotSupported = errors.New("Read-only mode is not supported on Windows") - - // ErrTruncateNeeded is returned when the value log gets corrupt, and requires truncation of - // corrupt data to allow Badger to run properly. - ErrTruncateNeeded = errors.New("Value log truncate required to run DB. This might result in data loss.") - - // ErrBlockedWrites is returned if the user called DropAll. During the process of dropping all - // data from Badger, we stop accepting new writes, by returning this error. - ErrBlockedWrites = errors.New("Writes are blocked possibly due to DropAll") -) diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/iterator.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/iterator.go deleted file mode 100644 index 0b056d7951..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/iterator.go +++ /dev/null @@ -1,634 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "bytes" - "fmt" - "hash/crc32" - "sync" - "sync/atomic" - "time" - - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options" - - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -type prefetchStatus uint8 - -const ( - prefetched prefetchStatus = iota + 1 -) - -// Item is returned during iteration. Both the Key() and Value() output is only valid until -// iterator.Next() is called. -type Item struct { - status prefetchStatus - err error - wg sync.WaitGroup - db *DB - key []byte - vptr []byte - meta byte // We need to store meta to know about bitValuePointer. - userMeta byte - expiresAt uint64 - val []byte - slice *y.Slice // Used only during prefetching. - next *Item - version uint64 - txn *Txn -} - -// String returns a string representation of Item -func (item *Item) String() string { - return fmt.Sprintf("key=%q, version=%d, meta=%x", item.Key(), item.Version(), item.meta) -} - -// Deprecated -// ToString returns a string representation of Item -func (item *Item) ToString() string { - return item.String() -} - -// Key returns the key. -// -// Key is only valid as long as item is valid, or transaction is valid. If you need to use it -// outside its validity, please use KeyCopy -func (item *Item) Key() []byte { - return item.key -} - -// KeyCopy returns a copy of the key of the item, writing it to dst slice. -// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and -// returned. -func (item *Item) KeyCopy(dst []byte) []byte { - return y.SafeCopy(dst, item.key) -} - -// Version returns the commit timestamp of the item. -func (item *Item) Version() uint64 { - return item.version -} - -// Value retrieves the value of the item from the value log. -// -// This method must be called within a transaction. Calling it outside a -// transaction is considered undefined behavior. If an iterator is being used, -// then Item.Value() is defined in the current iteration only, because items are -// reused. -// -// If you need to use a value outside a transaction, please use Item.ValueCopy -// instead, or copy it yourself. Value might change once discard or commit is called. -// Use ValueCopy if you want to do a Set after Get. -func (item *Item) Value(fn func(val []byte) error) error { - item.wg.Wait() - if item.status == prefetched { - if item.err == nil && fn != nil { - fn(item.val) - } - return item.err - } - buf, cb, err := item.yieldItemValue() - defer runCallback(cb) - if err != nil { - return err - } - if fn != nil { - return fn(buf) - } - return nil -} - -// ValueCopy returns a copy of the value of the item from the value log, writing it to dst slice. -// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and -// returned. Tip: It might make sense to reuse the returned slice as dst argument for the next call. -// -// This function is useful in long running iterate/update transactions to avoid a write deadlock. -// See Github issue: https://github.com/dgraph-io/badger/issues/315 -func (item *Item) ValueCopy(dst []byte) ([]byte, error) { - item.wg.Wait() - if item.status == prefetched { - return y.SafeCopy(dst, item.val), item.err - } - buf, cb, err := item.yieldItemValue() - defer runCallback(cb) - return y.SafeCopy(dst, buf), err -} - -func (item *Item) hasValue() bool { - if item.meta == 0 && item.vptr == nil { - // key not found - return false - } - return true -} - -// IsDeletedOrExpired returns true if item contains deleted or expired value. -func (item *Item) IsDeletedOrExpired() bool { - return isDeletedOrExpired(item.meta, item.expiresAt) -} - -func (item *Item) DiscardEarlierVersions() bool { - return item.meta&bitDiscardEarlierVersions > 0 -} - -func (item *Item) yieldItemValue() ([]byte, func(), error) { - key := item.Key() // No need to copy. - for { - if !item.hasValue() { - return nil, nil, nil - } - - if item.slice == nil { - item.slice = new(y.Slice) - } - - if (item.meta & bitValuePointer) == 0 { - val := item.slice.Resize(len(item.vptr)) - copy(val, item.vptr) - return val, nil, nil - } - - var vp valuePointer - vp.Decode(item.vptr) - result, cb, err := item.db.vlog.Read(vp, item.slice) - if err != ErrRetry { - return result, cb, err - } - if bytes.HasPrefix(key, badgerMove) { - // err == ErrRetry - // Error is retry even after checking the move keyspace. So, let's - // just assume that value is not present. - return nil, cb, nil - } - - // The value pointer is pointing to a deleted value log. Look for the - // move key and read that instead. - runCallback(cb) - // Do not put badgerMove on the left in append. It seems to cause some sort of manipulation. - key = append([]byte{}, badgerMove...) - key = append(key, y.KeyWithTs(item.Key(), item.Version())...) - // Note that we can't set item.key to move key, because that would - // change the key user sees before and after this call. Also, this move - // logic is internal logic and should not impact the external behavior - // of the retrieval. - vs, err := item.db.get(key) - if err != nil { - return nil, nil, err - } - if vs.Version != item.Version() { - return nil, nil, nil - } - // Bug fix: Always copy the vs.Value into vptr here. Otherwise, when item is reused this - // slice gets overwritten. - item.vptr = y.SafeCopy(item.vptr, vs.Value) - item.meta &^= bitValuePointer // Clear the value pointer bit. - if vs.Meta&bitValuePointer > 0 { - item.meta |= bitValuePointer // This meta would only be about value pointer. - } - } -} - -func runCallback(cb func()) { - if cb != nil { - cb() - } -} - -func (item *Item) prefetchValue() { - val, cb, err := item.yieldItemValue() - defer runCallback(cb) - - item.err = err - item.status = prefetched - if val == nil { - return - } - if item.db.opt.ValueLogLoadingMode == options.MemoryMap { - buf := item.slice.Resize(len(val)) - copy(buf, val) - item.val = buf - } else { - item.val = val - } -} - -// EstimatedSize returns approximate size of the key-value pair. -// -// This can be called while iterating through a store to quickly estimate the -// size of a range of key-value pairs (without fetching the corresponding -// values). -func (item *Item) EstimatedSize() int64 { - if !item.hasValue() { - return 0 - } - if (item.meta & bitValuePointer) == 0 { - return int64(len(item.key) + len(item.vptr)) - } - var vp valuePointer - vp.Decode(item.vptr) - return int64(vp.Len) // includes key length. -} - -// ValueSize returns the exact size of the value. -// -// This can be called to quickly estimate the size of a value without fetching -// it. -func (item *Item) ValueSize() int64 { - if !item.hasValue() { - return 0 - } - if (item.meta & bitValuePointer) == 0 { - return int64(len(item.vptr)) - } - var vp valuePointer - vp.Decode(item.vptr) - - klen := int64(len(item.key) + 8) // 8 bytes for timestamp. - return int64(vp.Len) - klen - headerBufSize - crc32.Size -} - -// UserMeta returns the userMeta set by the user. Typically, this byte, optionally set by the user -// is used to interpret the value. -func (item *Item) UserMeta() byte { - return item.userMeta -} - -// ExpiresAt returns a Unix time value indicating when the item will be -// considered expired. 0 indicates that the item will never expire. -func (item *Item) ExpiresAt() uint64 { - return item.expiresAt -} - -// TODO: Switch this to use linked list container in Go. -type list struct { - head *Item - tail *Item -} - -func (l *list) push(i *Item) { - i.next = nil - if l.tail == nil { - l.head = i - l.tail = i - return - } - l.tail.next = i - l.tail = i -} - -func (l *list) pop() *Item { - if l.head == nil { - return nil - } - i := l.head - if l.head == l.tail { - l.tail = nil - l.head = nil - } else { - l.head = i.next - } - i.next = nil - return i -} - -// IteratorOptions is used to set options when iterating over Badger key-value -// stores. -// -// This package provides DefaultIteratorOptions which contains options that -// should work for most applications. Consider using that as a starting point -// before customizing it for your own needs. -type IteratorOptions struct { - // Indicates whether we should prefetch values during iteration and store them. - PrefetchValues bool - // How many KV pairs to prefetch while iterating. Valid only if PrefetchValues is true. - PrefetchSize int - Reverse bool // Direction of iteration. False is forward, true is backward. - AllVersions bool // Fetch all valid versions of the same key. - - internalAccess bool // Used to allow internal access to badger keys. -} - -// DefaultIteratorOptions contains default options when iterating over Badger key-value stores. -var DefaultIteratorOptions = IteratorOptions{ - PrefetchValues: true, - PrefetchSize: 100, - Reverse: false, - AllVersions: false, -} - -// Iterator helps iterating over the KV pairs in a lexicographically sorted order. -type Iterator struct { - iitr *y.MergeIterator - txn *Txn - readTs uint64 - - opt IteratorOptions - item *Item - data list - waste list - - lastKey []byte // Used to skip over multiple versions of the same key. - - closed bool -} - -// NewIterator returns a new iterator. Depending upon the options, either only keys, or both -// key-value pairs would be fetched. The keys are returned in lexicographically sorted order. -// Using prefetch is recommended if you're doing a long running iteration, for performance. -// -// Multiple Iterators: -// For a read-only txn, multiple iterators can be running simultaneously. However, for a read-write -// txn, only one can be running at one time to avoid race conditions, because Txn is thread-unsafe. -func (txn *Txn) NewIterator(opt IteratorOptions) *Iterator { - if txn.discarded { - panic("Transaction has already been discarded") - } - // Do not change the order of the next if. We must track the number of running iterators. - if atomic.AddInt32(&txn.numIterators, 1) > 1 && txn.update { - atomic.AddInt32(&txn.numIterators, -1) - panic("Only one iterator can be active at one time, for a RW txn.") - } - - tables, decr := txn.db.getMemTables() - defer decr() - txn.db.vlog.incrIteratorCount() - var iters []y.Iterator - if itr := txn.newPendingWritesIterator(opt.Reverse); itr != nil { - iters = append(iters, itr) - } - for i := 0; i < len(tables); i++ { - iters = append(iters, tables[i].NewUniIterator(opt.Reverse)) - } - iters = txn.db.lc.appendIterators(iters, opt.Reverse) // This will increment references. - res := &Iterator{ - txn: txn, - iitr: y.NewMergeIterator(iters, opt.Reverse), - opt: opt, - readTs: txn.readTs, - } - return res -} - -func (it *Iterator) newItem() *Item { - item := it.waste.pop() - if item == nil { - item = &Item{slice: new(y.Slice), db: it.txn.db, txn: it.txn} - } - return item -} - -// Item returns pointer to the current key-value pair. -// This item is only valid until it.Next() gets called. -func (it *Iterator) Item() *Item { - tx := it.txn - tx.addReadKey(it.item.Key()) - return it.item -} - -// Valid returns false when iteration is done. -func (it *Iterator) Valid() bool { return it.item != nil } - -// ValidForPrefix returns false when iteration is done -// or when the current key is not prefixed by the specified prefix. -func (it *Iterator) ValidForPrefix(prefix []byte) bool { - return it.item != nil && bytes.HasPrefix(it.item.key, prefix) -} - -// Close would close the iterator. It is important to call this when you're done with iteration. -func (it *Iterator) Close() { - if it.closed { - return - } - it.closed = true - - it.iitr.Close() - // It is important to wait for the fill goroutines to finish. Otherwise, we might leave zombie - // goroutines behind, which are waiting to acquire file read locks after DB has been closed. - waitFor := func(l list) { - item := l.pop() - for item != nil { - item.wg.Wait() - item = l.pop() - } - } - waitFor(it.waste) - waitFor(it.data) - - // TODO: We could handle this error. - _ = it.txn.db.vlog.decrIteratorCount() - atomic.AddInt32(&it.txn.numIterators, -1) -} - -// Next would advance the iterator by one. Always check it.Valid() after a Next() -// to ensure you have access to a valid it.Item(). -func (it *Iterator) Next() { - // Reuse current item - it.item.wg.Wait() // Just cleaner to wait before pushing to avoid doing ref counting. - it.waste.push(it.item) - - // Set next item to current - it.item = it.data.pop() - - for it.iitr.Valid() { - if it.parseItem() { - // parseItem calls one extra next. - // This is used to deal with the complexity of reverse iteration. - break - } - } -} - -func isDeletedOrExpired(meta byte, expiresAt uint64) bool { - if meta&bitDelete > 0 { - return true - } - if expiresAt == 0 { - return false - } - return expiresAt <= uint64(time.Now().Unix()) -} - -// parseItem is a complex function because it needs to handle both forward and reverse iteration -// implementation. We store keys such that their versions are sorted in descending order. This makes -// forward iteration efficient, but revese iteration complicated. This tradeoff is better because -// forward iteration is more common than reverse. -// -// This function advances the iterator. -func (it *Iterator) parseItem() bool { - mi := it.iitr - key := mi.Key() - - setItem := func(item *Item) { - if it.item == nil { - it.item = item - } else { - it.data.push(item) - } - } - - // Skip badger keys. - if !it.opt.internalAccess && bytes.HasPrefix(key, badgerPrefix) { - mi.Next() - return false - } - - // Skip any versions which are beyond the readTs. - version := y.ParseTs(key) - if version > it.readTs { - mi.Next() - return false - } - - if it.opt.AllVersions { - // Return deleted or expired values also, otherwise user can't figure out - // whether the key was deleted. - item := it.newItem() - it.fill(item) - setItem(item) - mi.Next() - return true - } - - // If iterating in forward direction, then just checking the last key against current key would - // be sufficient. - if !it.opt.Reverse { - if y.SameKey(it.lastKey, key) { - mi.Next() - return false - } - // Only track in forward direction. - // We should update lastKey as soon as we find a different key in our snapshot. - // Consider keys: a 5, b 7 (del), b 5. When iterating, lastKey = a. - // Then we see b 7, which is deleted. If we don't store lastKey = b, we'll then return b 5, - // which is wrong. Therefore, update lastKey here. - it.lastKey = y.SafeCopy(it.lastKey, mi.Key()) - } - -FILL: - // If deleted, advance and return. - vs := mi.Value() - if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { - mi.Next() - return false - } - - item := it.newItem() - it.fill(item) - // fill item based on current cursor position. All Next calls have returned, so reaching here - // means no Next was called. - - mi.Next() // Advance but no fill item yet. - if !it.opt.Reverse || !mi.Valid() { // Forward direction, or invalid. - setItem(item) - return true - } - - // Reverse direction. - nextTs := y.ParseTs(mi.Key()) - mik := y.ParseKey(mi.Key()) - if nextTs <= it.readTs && bytes.Equal(mik, item.key) { - // This is a valid potential candidate. - goto FILL - } - // Ignore the next candidate. Return the current one. - setItem(item) - return true -} - -func (it *Iterator) fill(item *Item) { - vs := it.iitr.Value() - item.meta = vs.Meta - item.userMeta = vs.UserMeta - item.expiresAt = vs.ExpiresAt - - item.version = y.ParseTs(it.iitr.Key()) - item.key = y.SafeCopy(item.key, y.ParseKey(it.iitr.Key())) - - item.vptr = y.SafeCopy(item.vptr, vs.Value) - item.val = nil - if it.opt.PrefetchValues { - item.wg.Add(1) - go func() { - // FIXME we are not handling errors here. - item.prefetchValue() - item.wg.Done() - }() - } -} - -func (it *Iterator) prefetch() { - prefetchSize := 2 - if it.opt.PrefetchValues && it.opt.PrefetchSize > 1 { - prefetchSize = it.opt.PrefetchSize - } - - i := it.iitr - var count int - it.item = nil - for i.Valid() { - if !it.parseItem() { - continue - } - count++ - if count == prefetchSize { - break - } - } -} - -// Seek would seek to the provided key if present. If absent, it would seek to the next smallest key -// greater than provided if iterating in the forward direction. Behavior would be reversed is -// iterating backwards. -func (it *Iterator) Seek(key []byte) { - for i := it.data.pop(); i != nil; i = it.data.pop() { - i.wg.Wait() - it.waste.push(i) - } - - it.lastKey = it.lastKey[:0] - if len(key) == 0 { - it.iitr.Rewind() - it.prefetch() - return - } - - if !it.opt.Reverse { - key = y.KeyWithTs(key, it.txn.readTs) - } else { - key = y.KeyWithTs(key, 0) - } - it.iitr.Seek(key) - it.prefetch() -} - -// Rewind would rewind the iterator cursor all the way to zero-th position, which would be the -// smallest key if iterating forward, and largest if iterating backward. It does not keep track of -// whether the cursor started with a Seek(). -func (it *Iterator) Rewind() { - i := it.data.pop() - for i != nil { - i.wg.Wait() // Just cleaner to wait before pushing. No ref counting needed. - it.waste.push(i) - i = it.data.pop() - } - - it.lastKey = it.lastKey[:0] - it.iitr.Rewind() - it.prefetch() -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/managed_db.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/managed_db.go deleted file mode 100644 index f9d698508e..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/managed_db.go +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "math" - "sync" - "sync/atomic" - "time" - - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -// OpenManaged returns a new DB, which allows more control over setting -// transaction timestamps, by setting managedDB=true. -// -// This is only useful for databases built on top of Badger (like Dgraph), and -// can be ignored by most users. -func OpenManaged(opts Options) (*DB, error) { - opts.managedTxns = true - return Open(opts) -} - -// NewTransactionAt follows the same logic as DB.NewTransaction(), but uses the -// provided read timestamp. -// -// This is only useful for databases built on top of Badger (like Dgraph), and -// can be ignored by most users. -func (db *DB) NewTransactionAt(readTs uint64, update bool) *Txn { - if !db.opt.managedTxns { - panic("Cannot use NewTransactionAt with managedDB=false. Use NewTransaction instead.") - } - txn := db.NewTransaction(update) - txn.readTs = readTs - return txn -} - -// CommitAt commits the transaction, following the same logic as Commit(), but -// at the given commit timestamp. This will panic if not used with managed transactions. -// -// This is only useful for databases built on top of Badger (like Dgraph), and -// can be ignored by most users. -func (txn *Txn) CommitAt(commitTs uint64, callback func(error)) error { - if !txn.db.opt.managedTxns { - panic("Cannot use CommitAt with managedDB=false. Use Commit instead.") - } - txn.commitTs = commitTs - return txn.Commit(callback) -} - -// SetDiscardTs sets a timestamp at or below which, any invalid or deleted -// versions can be discarded from the LSM tree, and thence from the value log to -// reclaim disk space. Can only be used with managed transactions. -func (db *DB) SetDiscardTs(ts uint64) { - if !db.opt.managedTxns { - panic("Cannot use SetDiscardTs with managedDB=false.") - } - db.orc.setDiscardTs(ts) -} - -var errDone = errors.New("Done deleting keys") - -// DropAll would drop all the data stored in Badger. It does this in the following way. -// - Stop accepting new writes. -// - Pause the compactions. -// - Pick all tables from all levels, create a changeset to delete all these -// tables and apply it to manifest. DO not pick up the latest table from level -// 0, to preserve the (persistent) badgerHead key. -// - Iterate over the KVs in Level 0, and run deletes on them via transactions. -// - The deletions are done at the same timestamp as the latest version of the -// key. Thus, we could write the keys back at the same timestamp as before. -// -// DropAll is only available with managed transactions. -func (db *DB) DropAll() error { - if !db.opt.managedTxns { - panic("DropAll is only available with managedDB=true.") - } - // Stop accepting new writes. - atomic.StoreInt32(&db.blockWrites, 1) - - // Wait for writeCh to reach size of zero. This is not ideal, but a very - // simple way to allow writeCh to flush out, before we proceed. - tick := time.NewTicker(100 * time.Millisecond) - for range tick.C { - if len(db.writeCh) == 0 { - break - } - } - tick.Stop() - - // Stop the compactions. - if db.closers.compactors != nil { - db.closers.compactors.SignalAndWait() - } - - _, err := db.lc.deleteLSMTree() - // Allow writes so that we can run transactions. Ideally, the user must ensure that they're not - // doing more writes concurrently while this operation is happening. - atomic.StoreInt32(&db.blockWrites, 0) - // Need compactions to happen so deletes below can be flushed out. - if db.closers.compactors != nil { - db.closers.compactors = y.NewCloser(1) - db.lc.startCompact(db.closers.compactors) - } - if err != nil { - return err - } - - type KV struct { - key []byte - version uint64 - } - - var kvs []KV - getKeys := func() error { - txn := db.NewTransactionAt(math.MaxUint64, false) - defer txn.Discard() - - opts := DefaultIteratorOptions - opts.PrefetchValues = false - itr := txn.NewIterator(opts) - defer itr.Close() - - for itr.Rewind(); itr.Valid(); itr.Next() { - item := itr.Item() - kvs = append(kvs, KV{item.KeyCopy(nil), item.Version()}) - } - return nil - } - if err := getKeys(); err != nil { - return err - } - - var wg sync.WaitGroup - errCh := make(chan error, 1) - for _, kv := range kvs { - wg.Add(1) - txn := db.NewTransactionAt(math.MaxUint64, true) - if err := txn.Delete(kv.key); err != nil { - return err - } - if err := txn.CommitAt(kv.version, func(rerr error) { - if rerr != nil { - select { - case errCh <- rerr: - default: - } - } - wg.Done() - }); err != nil { - return err - } - } - wg.Wait() - select { - case err := <-errCh: - return err - default: - return nil - } -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options.go deleted file mode 100644 index cd1f91464b..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options.go +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options" -) - -// NOTE: Keep the comments in the following to 75 chars width, so they -// format nicely in godoc. - -// Options are params for creating DB object. -// -// This package provides DefaultOptions which contains options that should -// work for most applications. Consider using that as a starting point before -// customizing it for your own needs. -type Options struct { - // 1. Mandatory flags - // ------------------- - // Directory to store the data in. Should exist and be writable. - Dir string - // Directory to store the value log in. Can be the same as Dir. Should - // exist and be writable. - ValueDir string - - // 2. Frequently modified flags - // ----------------------------- - // Sync all writes to disk. Setting this to false would achieve better - // performance, but may cause data to be lost. - SyncWrites bool - - // How should LSM tree be accessed. - TableLoadingMode options.FileLoadingMode - - // How should value log be accessed. - ValueLogLoadingMode options.FileLoadingMode - - // How many versions to keep per key. - NumVersionsToKeep int - - // 3. Flags that user might want to review - // ---------------------------------------- - // The following affect all levels of LSM tree. - MaxTableSize int64 // Each table (or file) is at most this size. - LevelSizeMultiplier int // Equals SizeOf(Li+1)/SizeOf(Li). - MaxLevels int // Maximum number of levels of compaction. - // If value size >= this threshold, only store value offsets in tree. - ValueThreshold int - // Maximum number of tables to keep in memory, before stalling. - NumMemtables int - // The following affect how we handle LSM tree L0. - // Maximum number of Level 0 tables before we start compacting. - NumLevelZeroTables int - - // If we hit this number of Level 0 tables, we will stall until L0 is - // compacted away. - NumLevelZeroTablesStall int - - // Maximum total size for L1. - LevelOneSize int64 - - // Size of single value log file. - ValueLogFileSize int64 - - // Max number of entries a value log file can hold (approximately). A value log file would be - // determined by the smaller of its file size and max entries. - ValueLogMaxEntries uint32 - - // Number of compaction workers to run concurrently. - NumCompactors int - - // Transaction start and commit timestamps are managed by end-user. - // This is only useful for databases built on top of Badger (like Dgraph). - // Not recommended for most users. - managedTxns bool - - // 4. Flags for testing purposes - // ------------------------------ - DoNotCompact bool // Stops LSM tree from compactions. - - maxBatchCount int64 // max entries in batch - maxBatchSize int64 // max batch size in bytes - - // Open the DB as read-only. With this set, multiple processes can - // open the same Badger DB. Note: if the DB being opened had crashed - // before and has vlog data to be replayed, ReadOnly will cause Open - // to fail with an appropriate message. - ReadOnly bool - - // Truncate value log to delete corrupt data, if any. Would not truncate if ReadOnly is set. - Truncate bool -} - -// DefaultOptions sets a list of recommended options for good performance. -// Feel free to modify these to suit your needs. -var DefaultOptions = Options{ - DoNotCompact: false, - LevelOneSize: 256 << 20, - LevelSizeMultiplier: 10, - TableLoadingMode: options.LoadToRAM, - ValueLogLoadingMode: options.MemoryMap, - // table.MemoryMap to mmap() the tables. - // table.Nothing to not preload the tables. - MaxLevels: 7, - MaxTableSize: 64 << 20, - NumCompactors: 3, - NumLevelZeroTables: 5, - NumLevelZeroTablesStall: 10, - NumMemtables: 5, - SyncWrites: true, - NumVersionsToKeep: 1, - // Nothing to read/write value log using standard File I/O - // MemoryMap to mmap() the value log files - // (2^30 - 1)*2 when mmapping < 2^31 - 1, max int32. - // -1 so 2*ValueLogFileSize won't overflow on 32-bit systems. - ValueLogFileSize: 1<<30 - 1, - - ValueLogMaxEntries: 1000000, - ValueThreshold: 32, - Truncate: false, -} - -// LSMOnlyOptions follows from DefaultOptions, but sets a higher ValueThreshold -// so values would be colocated with the LSM tree, with value log largely acting -// as a write-ahead log only. These options would reduce the disk usage of value -// log, and make Badger act more like a typical LSM tree. -var LSMOnlyOptions = Options{} - -func init() { - LSMOnlyOptions = DefaultOptions - - LSMOnlyOptions.ValueThreshold = 65500 // Max value length which fits in uint16. - // Let's not set any other options, because they can cause issues with the - // size of key-value a user can pass to Badger. For e.g., if we set - // ValueLogFileSize to 64MB, a user can't pass a value more than that. - // Setting it to ValueLogMaxEntries to 1000, can generate too many files. - // These options are better configured on a usage basis, than broadly here. - // The ValueThreshold is the most important setting a user needs to do to - // achieve a heavier usage of LSM tree. - // NOTE: If a user does not want to set 64KB as the ValueThreshold because - // of performance reasons, 1KB would be a good option too, allowing - // values smaller than 1KB to be colocated with the keys in the LSM tree. -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/package.json b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/package.json deleted file mode 100644 index 58af7eeb12..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "author": "dgraph-io", - "bugs": { - "url": "https://github.com/dgraph-io/badger" - }, - "gx": { - "dvcsimport": "github.com/dgraph-io/badger" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy", - "name": "errors", - "version": "0.0.1" - }, - { - "author": "magik6k", - "hash": "Qmbvv2urkn5Wtwws4yzjE85qRjB293EodchZofJsrTRuvN", - "name": "go-lz4", - "version": "1.0.0" - }, - { - "author": "kubuxu", - "hash": "QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf", - "name": "bbloom", - "version": "0.1.2" - }, - { - "author": "kubuxu", - "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", - "name": "sys", - "version": "0.2.0" - }, - { - "author": "whyrusleeping", - "hash": "QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn", - "name": "go-net", - "version": "0.2.0" - }, - { - "author": "why", - "hash": "QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx", - "name": "protobuf", - "version": "3.6.0" - }, - { - "author": "magik6k", - "hash": "QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP", - "name": "go-farm", - "version": "1.0.0" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "Apache 2.0", - "name": "badger", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.9.0" -} - diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.pb.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.pb.go deleted file mode 100644 index 6c383fc202..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.pb.go +++ /dev/null @@ -1,497 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: backup.proto - -/* - Package protos is a generated protocol buffer package. - - It is generated from these files: - backup.proto - manifest.proto - - It has these top-level messages: - KVPair - ManifestChangeSet - ManifestChange -*/ -package protos - -import proto "gx/ipfs/QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type KVPair struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - UserMeta []byte `protobuf:"bytes,3,opt,name=userMeta,proto3" json:"userMeta,omitempty"` - Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` - ExpiresAt uint64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` -} - -func (m *KVPair) Reset() { *m = KVPair{} } -func (m *KVPair) String() string { return proto.CompactTextString(m) } -func (*KVPair) ProtoMessage() {} -func (*KVPair) Descriptor() ([]byte, []int) { return fileDescriptorBackup, []int{0} } - -func (m *KVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *KVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *KVPair) GetUserMeta() []byte { - if m != nil { - return m.UserMeta - } - return nil -} - -func (m *KVPair) GetVersion() uint64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *KVPair) GetExpiresAt() uint64 { - if m != nil { - return m.ExpiresAt - } - return 0 -} - -func init() { - proto.RegisterType((*KVPair)(nil), "protos.KVPair") -} -func (m *KVPair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KVPair) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBackup(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBackup(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if len(m.UserMeta) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBackup(dAtA, i, uint64(len(m.UserMeta))) - i += copy(dAtA[i:], m.UserMeta) - } - if m.Version != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBackup(dAtA, i, uint64(m.Version)) - } - if m.ExpiresAt != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBackup(dAtA, i, uint64(m.ExpiresAt)) - } - return i, nil -} - -func encodeFixed64Backup(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Backup(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintBackup(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *KVPair) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovBackup(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovBackup(uint64(l)) - } - l = len(m.UserMeta) - if l > 0 { - n += 1 + l + sovBackup(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovBackup(uint64(m.Version)) - } - if m.ExpiresAt != 0 { - n += 1 + sovBackup(uint64(m.ExpiresAt)) - } - return n -} - -func sovBackup(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozBackup(x uint64) (n int) { - return sovBackup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KVPair) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBackup - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBackup - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserMeta", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBackup - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserMeta = append(m.UserMeta[:0], dAtA[iNdEx:postIndex]...) - if m.UserMeta == nil { - m.UserMeta = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - m.ExpiresAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBackup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresAt |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBackup(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBackup - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBackup(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBackup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBackup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBackup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthBackup - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBackup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBackup(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthBackup = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBackup = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("backup.proto", fileDescriptorBackup) } - -var fileDescriptorBackup = []byte{ - // 167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x4a, 0x4c, 0xce, - 0x2e, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, 0xad, 0x8c, - 0x5c, 0x6c, 0xde, 0x61, 0x01, 0x89, 0x99, 0x45, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12, - 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, - 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2, 0x11, 0x92, 0xe2, 0xe2, 0x28, 0x2d, 0x4e, 0x2d, 0xf2, 0x4d, - 0x2d, 0x49, 0x94, 0x60, 0x06, 0x4b, 0xc0, 0xf9, 0x42, 0x12, 0x5c, 0xec, 0x65, 0xa9, 0x45, 0xc5, - 0x99, 0xf9, 0x79, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x30, 0xae, 0x90, 0x2c, 0x17, 0x57, - 0x6a, 0x45, 0x41, 0x66, 0x51, 0x6a, 0x71, 0x7c, 0x62, 0x89, 0x04, 0x2b, 0x58, 0x92, 0x13, 0x2a, - 0xe2, 0x58, 0xe2, 0x24, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, - 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0x04, 0x71, 0xa1, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xe7, - 0x3f, 0x3f, 0x95, 0xb8, 0x00, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.proto b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.proto deleted file mode 100644 index 0f4e3d61ee..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/backup.proto +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 Dgraph Labs, Inc. and Contributors - * - * 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. - */ - -// Use protos/gen.sh to generate .pb.go files. -syntax = "proto3"; - -package protos; - -message KVPair { - bytes key = 1; - bytes value = 2; - bytes userMeta = 3; - uint64 version = 4; - uint64 expires_at = 5; -} \ No newline at end of file diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/gen.sh b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/gen.sh deleted file mode 100644 index 15bb38eb97..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/gen.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# You might need to go get -v github.com/gogo/protobuf/... - -protos=${GOPATH-$HOME/go}/src/github.com/dgraph-io/badger/protos -pushd $protos > /dev/null -protoc --gofast_out=plugins=grpc:. -I=. *.proto diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.pb.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.pb.go deleted file mode 100644 index 627e2660d4..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.pb.go +++ /dev/null @@ -1,534 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: manifest.proto - -package protos - -import proto "gx/ipfs/QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type ManifestChange_Operation int32 - -const ( - ManifestChange_CREATE ManifestChange_Operation = 0 - ManifestChange_DELETE ManifestChange_Operation = 1 -) - -var ManifestChange_Operation_name = map[int32]string{ - 0: "CREATE", - 1: "DELETE", -} -var ManifestChange_Operation_value = map[string]int32{ - "CREATE": 0, - "DELETE": 1, -} - -func (x ManifestChange_Operation) String() string { - return proto.EnumName(ManifestChange_Operation_name, int32(x)) -} -func (ManifestChange_Operation) EnumDescriptor() ([]byte, []int) { - return fileDescriptorManifest, []int{1, 0} -} - -type ManifestChangeSet struct { - // A set of changes that are applied atomically. - Changes []*ManifestChange `protobuf:"bytes,1,rep,name=changes" json:"changes,omitempty"` -} - -func (m *ManifestChangeSet) Reset() { *m = ManifestChangeSet{} } -func (m *ManifestChangeSet) String() string { return proto.CompactTextString(m) } -func (*ManifestChangeSet) ProtoMessage() {} -func (*ManifestChangeSet) Descriptor() ([]byte, []int) { return fileDescriptorManifest, []int{0} } - -func (m *ManifestChangeSet) GetChanges() []*ManifestChange { - if m != nil { - return m.Changes - } - return nil -} - -type ManifestChange struct { - Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` - Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=protos.ManifestChange_Operation" json:"Op,omitempty"` - Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"` -} - -func (m *ManifestChange) Reset() { *m = ManifestChange{} } -func (m *ManifestChange) String() string { return proto.CompactTextString(m) } -func (*ManifestChange) ProtoMessage() {} -func (*ManifestChange) Descriptor() ([]byte, []int) { return fileDescriptorManifest, []int{1} } - -func (m *ManifestChange) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *ManifestChange) GetOp() ManifestChange_Operation { - if m != nil { - return m.Op - } - return ManifestChange_CREATE -} - -func (m *ManifestChange) GetLevel() uint32 { - if m != nil { - return m.Level - } - return 0 -} - -func init() { - proto.RegisterType((*ManifestChangeSet)(nil), "protos.ManifestChangeSet") - proto.RegisterType((*ManifestChange)(nil), "protos.ManifestChange") - proto.RegisterEnum("protos.ManifestChange_Operation", ManifestChange_Operation_name, ManifestChange_Operation_value) -} -func (m *ManifestChangeSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ManifestChangeSet) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Changes) > 0 { - for _, msg := range m.Changes { - dAtA[i] = 0xa - i++ - i = encodeVarintManifest(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *ManifestChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ManifestChange) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintManifest(dAtA, i, uint64(m.Id)) - } - if m.Op != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintManifest(dAtA, i, uint64(m.Op)) - } - if m.Level != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintManifest(dAtA, i, uint64(m.Level)) - } - return i, nil -} - -func encodeFixed64Manifest(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Manifest(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintManifest(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ManifestChangeSet) Size() (n int) { - var l int - _ = l - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovManifest(uint64(l)) - } - } - return n -} - -func (m *ManifestChange) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovManifest(uint64(m.Id)) - } - if m.Op != 0 { - n += 1 + sovManifest(uint64(m.Op)) - } - if m.Level != 0 { - n += 1 + sovManifest(uint64(m.Level)) - } - return n -} - -func sovManifest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozManifest(x uint64) (n int) { - return sovManifest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ManifestChangeSet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ManifestChangeSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ManifestChangeSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthManifest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &ManifestChange{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipManifest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthManifest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ManifestChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ManifestChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ManifestChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - m.Op = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Op |= (ManifestChange_Operation(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - m.Level = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowManifest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Level |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipManifest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthManifest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipManifest(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowManifest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowManifest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowManifest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthManifest - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowManifest - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipManifest(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthManifest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowManifest = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("manifest.proto", fileDescriptorManifest) } - -var fileDescriptorManifest = []byte{ - // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x4d, 0xcc, 0xcb, - 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, - 0xae, 0x5c, 0x82, 0xbe, 0x50, 0x19, 0xe7, 0x8c, 0xc4, 0xbc, 0xf4, 0xd4, 0xe0, 0xd4, 0x12, 0x21, - 0x03, 0x2e, 0xf6, 0x64, 0x30, 0xa7, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x0c, 0xa2, - 0xab, 0x58, 0x0f, 0x55, 0x6d, 0x10, 0x4c, 0x99, 0x52, 0x2f, 0x23, 0x17, 0x1f, 0xaa, 0x9c, 0x10, - 0x1f, 0x17, 0x93, 0x67, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4b, 0x10, 0x93, 0x67, 0x8a, 0x90, - 0x01, 0x17, 0x93, 0x7f, 0x81, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x02, 0x76, 0xf3, 0xf4, - 0xfc, 0x0b, 0x52, 0x8b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x82, 0x98, 0xfc, 0x0b, 0x84, 0x44, 0xb8, - 0x58, 0x7d, 0x52, 0xcb, 0x52, 0x73, 0x24, 0x98, 0x15, 0x18, 0x35, 0x78, 0x83, 0x20, 0x1c, 0x25, - 0x65, 0x2e, 0x4e, 0xb8, 0x32, 0x21, 0x2e, 0x2e, 0x36, 0xe7, 0x20, 0x57, 0xc7, 0x10, 0x57, 0x01, - 0x06, 0x10, 0xdb, 0xc5, 0xd5, 0xc7, 0x35, 0xc4, 0x55, 0x80, 0xd1, 0x49, 0xe0, 0xc4, 0x23, 0x39, - 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x09, 0xe2, - 0x61, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x6f, 0x23, 0xc9, 0x09, 0x01, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.proto b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.proto deleted file mode 100644 index 295c63a482..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/protos/manifest.proto +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017 Dgraph Labs, Inc. and Contributors - * - * 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. - */ - -// Use protos/gen.sh to generate .pb.go files. -syntax = "proto3"; - -package protos; - -message ManifestChangeSet { - // A set of changes that are applied atomically. - repeated ManifestChange changes = 1; -} - -message ManifestChange { - uint64 Id = 1; - enum Operation { - CREATE = 0; - DELETE = 1; - } - Operation Op = 2; - uint32 Level = 3; // Only used for CREATE -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/builder.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/builder.go deleted file mode 100644 index 06d7899917..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/builder.go +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 table - -import ( - "bytes" - "encoding/binary" - "io" - "math" - - "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -var ( - restartInterval = 100 // Might want to change this to be based on total size instead of numKeys. -) - -func newBuffer(sz int) *bytes.Buffer { - b := new(bytes.Buffer) - b.Grow(sz) - return b -} - -type header struct { - plen uint16 // Overlap with base key. - klen uint16 // Length of the diff. - vlen uint16 // Length of value. - prev uint32 // Offset for the previous key-value pair. The offset is relative to block base offset. -} - -// Encode encodes the header. -func (h header) Encode(b []byte) { - binary.BigEndian.PutUint16(b[0:2], h.plen) - binary.BigEndian.PutUint16(b[2:4], h.klen) - binary.BigEndian.PutUint16(b[4:6], h.vlen) - binary.BigEndian.PutUint32(b[6:10], h.prev) -} - -// Decode decodes the header. -func (h *header) Decode(buf []byte) int { - h.plen = binary.BigEndian.Uint16(buf[0:2]) - h.klen = binary.BigEndian.Uint16(buf[2:4]) - h.vlen = binary.BigEndian.Uint16(buf[4:6]) - h.prev = binary.BigEndian.Uint32(buf[6:10]) - return h.Size() -} - -// Size returns size of the header. Currently it's just a constant. -func (h header) Size() int { return 10 } - -// Builder is used in building a table. -type Builder struct { - counter int // Number of keys written for the current block. - - // Typically tens or hundreds of meg. This is for one single file. - buf *bytes.Buffer - - baseKey []byte // Base key for the current block. - baseOffset uint32 // Offset for the current block. - - restarts []uint32 // Base offsets of every block. - - // Tracks offset for the previous key-value pair. Offset is relative to block base offset. - prevOffset uint32 - - keyBuf *bytes.Buffer - keyCount int -} - -// NewTableBuilder makes a new TableBuilder. -func NewTableBuilder() *Builder { - return &Builder{ - keyBuf: newBuffer(1 << 20), - buf: newBuffer(1 << 20), - prevOffset: math.MaxUint32, // Used for the first element! - } -} - -// Close closes the TableBuilder. -func (b *Builder) Close() {} - -// Empty returns whether it's empty. -func (b *Builder) Empty() bool { return b.buf.Len() == 0 } - -// keyDiff returns a suffix of newKey that is different from b.baseKey. -func (b Builder) keyDiff(newKey []byte) []byte { - var i int - for i = 0; i < len(newKey) && i < len(b.baseKey); i++ { - if newKey[i] != b.baseKey[i] { - break - } - } - return newKey[i:] -} - -func (b *Builder) addHelper(key []byte, v y.ValueStruct) { - // Add key to bloom filter. - if len(key) > 0 { - var klen [2]byte - keyNoTs := y.ParseKey(key) - binary.BigEndian.PutUint16(klen[:], uint16(len(keyNoTs))) - b.keyBuf.Write(klen[:]) - b.keyBuf.Write(keyNoTs) - b.keyCount++ - } - - // diffKey stores the difference of key with baseKey. - var diffKey []byte - if len(b.baseKey) == 0 { - // Make a copy. Builder should not keep references. Otherwise, caller has to be very careful - // and will have to make copies of keys every time they add to builder, which is even worse. - b.baseKey = append(b.baseKey[:0], key...) - diffKey = key - } else { - diffKey = b.keyDiff(key) - } - - h := header{ - plen: uint16(len(key) - len(diffKey)), - klen: uint16(len(diffKey)), - vlen: uint16(v.EncodedSize()), - prev: b.prevOffset, // prevOffset is the location of the last key-value added. - } - b.prevOffset = uint32(b.buf.Len()) - b.baseOffset // Remember current offset for the next Add call. - - // Layout: header, diffKey, value. - var hbuf [10]byte - h.Encode(hbuf[:]) - b.buf.Write(hbuf[:]) - b.buf.Write(diffKey) // We only need to store the key difference. - - v.EncodeTo(b.buf) - b.counter++ // Increment number of keys added for this current block. -} - -func (b *Builder) finishBlock() { - // When we are at the end of the block and Valid=false, and the user wants to do a Prev, - // we need a dummy header to tell us the offset of the previous key-value pair. - b.addHelper([]byte{}, y.ValueStruct{}) -} - -// Add adds a key-value pair to the block. -// If doNotRestart is true, we will not restart even if b.counter >= restartInterval. -func (b *Builder) Add(key []byte, value y.ValueStruct) error { - if b.counter >= restartInterval { - b.finishBlock() - // Start a new block. Initialize the block. - b.restarts = append(b.restarts, uint32(b.buf.Len())) - b.counter = 0 - b.baseKey = []byte{} - b.baseOffset = uint32(b.buf.Len()) - b.prevOffset = math.MaxUint32 // First key-value pair of block has header.prev=MaxInt. - } - b.addHelper(key, value) - return nil // Currently, there is no meaningful error. -} - -// TODO: vvv this was the comment on ReachedCapacity. -// FinalSize returns the *rough* final size of the array, counting the header which is not yet written. -// TODO: Look into why there is a discrepancy. I suspect it is because of Write(empty, empty) -// at the end. The diff can vary. - -// ReachedCapacity returns true if we... roughly (?) reached capacity? -func (b *Builder) ReachedCapacity(cap int64) bool { - estimateSz := b.buf.Len() + 8 /* empty header */ + 4*len(b.restarts) + 8 // 8 = end of buf offset + len(restarts). - return int64(estimateSz) > cap -} - -// blockIndex generates the block index for the table. -// It is mainly a list of all the block base offsets. -func (b *Builder) blockIndex() []byte { - // Store the end offset, so we know the length of the final block. - b.restarts = append(b.restarts, uint32(b.buf.Len())) - - // Add 4 because we want to write out number of restarts at the end. - sz := 4*len(b.restarts) + 4 - out := make([]byte, sz) - buf := out - for _, r := range b.restarts { - binary.BigEndian.PutUint32(buf[:4], r) - buf = buf[4:] - } - binary.BigEndian.PutUint32(buf[:4], uint32(len(b.restarts))) - return out -} - -// Finish finishes the table by appending the index. -func (b *Builder) Finish() []byte { - bf, _ := bbloom.New(float64(b.keyCount), 0.01) - var klen [2]byte - key := make([]byte, 1024) - for { - if _, err := b.keyBuf.Read(klen[:]); err == io.EOF { - break - } else if err != nil { - y.Check(err) - } - kl := int(binary.BigEndian.Uint16(klen[:])) - if cap(key) < kl { - key = make([]byte, 2*int(kl)) // 2 * uint16 will overflow - } - key = key[:kl] - y.Check2(b.keyBuf.Read(key)) - bf.Add(key) - } - - b.finishBlock() // This will never start a new block. - index := b.blockIndex() - b.buf.Write(index) - - // Write bloom filter. - bdata, _ := bf.JSONMarshal() - n, err := b.buf.Write(bdata) - y.Check(err) - var buf [4]byte - binary.BigEndian.PutUint32(buf[:], uint32(n)) - b.buf.Write(buf[:]) - - return b.buf.Bytes() -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/iterator.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/iterator.go deleted file mode 100644 index 43b281d3d2..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/iterator.go +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 table - -import ( - "bytes" - "io" - "math" - "sort" - - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -type blockIterator struct { - data []byte - pos uint32 - err error - baseKey []byte - - key []byte - val []byte - init bool - - last header // The last header we saw. -} - -func (itr *blockIterator) Reset() { - itr.pos = 0 - itr.err = nil - itr.baseKey = []byte{} - itr.key = []byte{} - itr.val = []byte{} - itr.init = false - itr.last = header{} -} - -func (itr *blockIterator) Init() { - if !itr.init { - itr.Next() - } -} - -func (itr *blockIterator) Valid() bool { - return itr != nil && itr.err == nil -} - -func (itr *blockIterator) Error() error { - return itr.err -} - -func (itr *blockIterator) Close() {} - -var ( - origin = 0 - current = 1 -) - -// Seek brings us to the first block element that is >= input key. -func (itr *blockIterator) Seek(key []byte, whence int) { - itr.err = nil - - switch whence { - case origin: - itr.Reset() - case current: - } - - var done bool - for itr.Init(); itr.Valid(); itr.Next() { - k := itr.Key() - if y.CompareKeys(k, key) >= 0 { - // We are done as k is >= key. - done = true - break - } - } - if !done { - itr.err = io.EOF - } -} - -func (itr *blockIterator) SeekToFirst() { - itr.err = nil - itr.Init() -} - -// SeekToLast brings us to the last element. Valid should return true. -func (itr *blockIterator) SeekToLast() { - itr.err = nil - for itr.Init(); itr.Valid(); itr.Next() { - } - itr.Prev() -} - -// parseKV would allocate a new byte slice for key and for value. -func (itr *blockIterator) parseKV(h header) { - if cap(itr.key) < int(h.plen+h.klen) { - sz := int(h.plen) + int(h.klen) // Convert to int before adding to avoid uint16 overflow. - itr.key = make([]byte, 2*sz) - } - itr.key = itr.key[:h.plen+h.klen] - copy(itr.key, itr.baseKey[:h.plen]) - copy(itr.key[h.plen:], itr.data[itr.pos:itr.pos+uint32(h.klen)]) - itr.pos += uint32(h.klen) - - if itr.pos+uint32(h.vlen) > uint32(len(itr.data)) { - itr.err = errors.Errorf("Value exceeded size of block: %d %d %d %d %v", - itr.pos, h.klen, h.vlen, len(itr.data), h) - return - } - itr.val = y.SafeCopy(itr.val, itr.data[itr.pos:itr.pos+uint32(h.vlen)]) - itr.pos += uint32(h.vlen) -} - -func (itr *blockIterator) Next() { - itr.init = true - itr.err = nil - if itr.pos >= uint32(len(itr.data)) { - itr.err = io.EOF - return - } - - var h header - itr.pos += uint32(h.Decode(itr.data[itr.pos:])) - itr.last = h // Store the last header. - - if h.klen == 0 && h.plen == 0 { - // Last entry in the table. - itr.err = io.EOF - return - } - - // Populate baseKey if it isn't set yet. This would only happen for the first Next. - if len(itr.baseKey) == 0 { - // This should be the first Next() for this block. Hence, prefix length should be zero. - y.AssertTrue(h.plen == 0) - itr.baseKey = itr.data[itr.pos : itr.pos+uint32(h.klen)] - } - itr.parseKV(h) -} - -func (itr *blockIterator) Prev() { - if !itr.init { - return - } - itr.err = nil - if itr.last.prev == math.MaxUint32 { - // This is the first element of the block! - itr.err = io.EOF - itr.pos = 0 - return - } - - // Move back using current header's prev. - itr.pos = itr.last.prev - - var h header - y.AssertTruef(itr.pos < uint32(len(itr.data)), "%d %d", itr.pos, len(itr.data)) - itr.pos += uint32(h.Decode(itr.data[itr.pos:])) - itr.parseKV(h) - itr.last = h -} - -func (itr *blockIterator) Key() []byte { - if itr.err != nil { - return nil - } - return itr.key -} - -func (itr *blockIterator) Value() []byte { - if itr.err != nil { - return nil - } - return itr.val -} - -// Iterator is an iterator for a Table. -type Iterator struct { - t *Table - bpos int - bi *blockIterator - err error - - // Internally, Iterator is bidirectional. However, we only expose the - // unidirectional functionality for now. - reversed bool -} - -// NewIterator returns a new iterator of the Table -func (t *Table) NewIterator(reversed bool) *Iterator { - t.IncrRef() // Important. - ti := &Iterator{t: t, reversed: reversed} - ti.next() - return ti -} - -// Close closes the iterator (and it must be called). -func (itr *Iterator) Close() error { - return itr.t.DecrRef() -} - -func (itr *Iterator) reset() { - itr.bpos = 0 - itr.err = nil -} - -// Valid follows the y.Iterator interface -func (itr *Iterator) Valid() bool { - return itr.err == nil -} - -func (itr *Iterator) seekToFirst() { - numBlocks := len(itr.t.blockIndex) - if numBlocks == 0 { - itr.err = io.EOF - return - } - itr.bpos = 0 - block, err := itr.t.block(itr.bpos) - if err != nil { - itr.err = err - return - } - itr.bi = block.NewIterator() - itr.bi.SeekToFirst() - itr.err = itr.bi.Error() -} - -func (itr *Iterator) seekToLast() { - numBlocks := len(itr.t.blockIndex) - if numBlocks == 0 { - itr.err = io.EOF - return - } - itr.bpos = numBlocks - 1 - block, err := itr.t.block(itr.bpos) - if err != nil { - itr.err = err - return - } - itr.bi = block.NewIterator() - itr.bi.SeekToLast() - itr.err = itr.bi.Error() -} - -func (itr *Iterator) seekHelper(blockIdx int, key []byte) { - itr.bpos = blockIdx - block, err := itr.t.block(blockIdx) - if err != nil { - itr.err = err - return - } - itr.bi = block.NewIterator() - itr.bi.Seek(key, origin) - itr.err = itr.bi.Error() -} - -// seekFrom brings us to a key that is >= input key. -func (itr *Iterator) seekFrom(key []byte, whence int) { - itr.err = nil - switch whence { - case origin: - itr.reset() - case current: - } - - idx := sort.Search(len(itr.t.blockIndex), func(idx int) bool { - ko := itr.t.blockIndex[idx] - return y.CompareKeys(ko.key, key) > 0 - }) - if idx == 0 { - // The smallest key in our table is already strictly > key. We can return that. - // This is like a SeekToFirst. - itr.seekHelper(0, key) - return - } - - // block[idx].smallest is > key. - // Since idx>0, we know block[idx-1].smallest is <= key. - // There are two cases. - // 1) Everything in block[idx-1] is strictly < key. In this case, we should go to the first - // element of block[idx]. - // 2) Some element in block[idx-1] is >= key. We should go to that element. - itr.seekHelper(idx-1, key) - if itr.err == io.EOF { - // Case 1. Need to visit block[idx]. - if idx == len(itr.t.blockIndex) { - // If idx == len(itr.t.blockIndex), then input key is greater than ANY element of table. - // There's nothing we can do. Valid() should return false as we seek to end of table. - return - } - // Since block[idx].smallest is > key. This is essentially a block[idx].SeekToFirst. - itr.seekHelper(idx, key) - } - // Case 2: No need to do anything. We already did the seek in block[idx-1]. -} - -// seek will reset iterator and seek to >= key. -func (itr *Iterator) seek(key []byte) { - itr.seekFrom(key, origin) -} - -// seekForPrev will reset iterator and seek to <= key. -func (itr *Iterator) seekForPrev(key []byte) { - // TODO: Optimize this. We shouldn't have to take a Prev step. - itr.seekFrom(key, origin) - if !bytes.Equal(itr.Key(), key) { - itr.prev() - } -} - -func (itr *Iterator) next() { - itr.err = nil - - if itr.bpos >= len(itr.t.blockIndex) { - itr.err = io.EOF - return - } - - if itr.bi == nil { - block, err := itr.t.block(itr.bpos) - if err != nil { - itr.err = err - return - } - itr.bi = block.NewIterator() - itr.bi.SeekToFirst() - itr.err = itr.bi.Error() - return - } - - itr.bi.Next() - if !itr.bi.Valid() { - itr.bpos++ - itr.bi = nil - itr.next() - return - } -} - -func (itr *Iterator) prev() { - itr.err = nil - if itr.bpos < 0 { - itr.err = io.EOF - return - } - - if itr.bi == nil { - block, err := itr.t.block(itr.bpos) - if err != nil { - itr.err = err - return - } - itr.bi = block.NewIterator() - itr.bi.SeekToLast() - itr.err = itr.bi.Error() - return - } - - itr.bi.Prev() - if !itr.bi.Valid() { - itr.bpos-- - itr.bi = nil - itr.prev() - return - } -} - -// Key follows the y.Iterator interface -func (itr *Iterator) Key() []byte { - return itr.bi.Key() -} - -// Value follows the y.Iterator interface -func (itr *Iterator) Value() (ret y.ValueStruct) { - ret.Decode(itr.bi.Value()) - return -} - -// Next follows the y.Iterator interface -func (itr *Iterator) Next() { - if !itr.reversed { - itr.next() - } else { - itr.prev() - } -} - -// Rewind follows the y.Iterator interface -func (itr *Iterator) Rewind() { - if !itr.reversed { - itr.seekToFirst() - } else { - itr.seekToLast() - } -} - -// Seek follows the y.Iterator interface -func (itr *Iterator) Seek(key []byte) { - if !itr.reversed { - itr.seek(key) - } else { - itr.seekForPrev(key) - } -} - -// ConcatIterator concatenates the sequences defined by several iterators. (It only works with -// TableIterators, probably just because it's faster to not be so generic.) -type ConcatIterator struct { - idx int // Which iterator is active now. - cur *Iterator - iters []*Iterator // Corresponds to tables. - tables []*Table // Disregarding reversed, this is in ascending order. - reversed bool -} - -// NewConcatIterator creates a new concatenated iterator -func NewConcatIterator(tbls []*Table, reversed bool) *ConcatIterator { - iters := make([]*Iterator, len(tbls)) - for i := 0; i < len(tbls); i++ { - iters[i] = tbls[i].NewIterator(reversed) - } - return &ConcatIterator{ - reversed: reversed, - iters: iters, - tables: tbls, - idx: -1, // Not really necessary because s.it.Valid()=false, but good to have. - } -} - -func (s *ConcatIterator) setIdx(idx int) { - s.idx = idx - if idx < 0 || idx >= len(s.iters) { - s.cur = nil - } else { - s.cur = s.iters[s.idx] - } -} - -// Rewind implements y.Interface -func (s *ConcatIterator) Rewind() { - if len(s.iters) == 0 { - return - } - if !s.reversed { - s.setIdx(0) - } else { - s.setIdx(len(s.iters) - 1) - } - s.cur.Rewind() -} - -// Valid implements y.Interface -func (s *ConcatIterator) Valid() bool { - return s.cur != nil && s.cur.Valid() -} - -// Key implements y.Interface -func (s *ConcatIterator) Key() []byte { - return s.cur.Key() -} - -// Value implements y.Interface -func (s *ConcatIterator) Value() y.ValueStruct { - return s.cur.Value() -} - -// Seek brings us to element >= key if reversed is false. Otherwise, <= key. -func (s *ConcatIterator) Seek(key []byte) { - var idx int - if !s.reversed { - idx = sort.Search(len(s.tables), func(i int) bool { - return y.CompareKeys(s.tables[i].Biggest(), key) >= 0 - }) - } else { - n := len(s.tables) - idx = n - 1 - sort.Search(n, func(i int) bool { - return y.CompareKeys(s.tables[n-1-i].Smallest(), key) <= 0 - }) - } - if idx >= len(s.tables) || idx < 0 { - s.setIdx(-1) - return - } - // For reversed=false, we know s.tables[i-1].Biggest() < key. Thus, the - // previous table cannot possibly contain key. - s.setIdx(idx) - s.cur.Seek(key) -} - -// Next advances our concat iterator. -func (s *ConcatIterator) Next() { - s.cur.Next() - if s.cur.Valid() { - // Nothing to do. Just stay with the current table. - return - } - for { // In case there are empty tables. - if !s.reversed { - s.setIdx(s.idx + 1) - } else { - s.setIdx(s.idx - 1) - } - if s.cur == nil { - // End of list. Valid will become false. - return - } - s.cur.Rewind() - if s.cur.Valid() { - break - } - } -} - -// Close implements y.Interface. -func (s *ConcatIterator) Close() error { - for _, it := range s.iters { - if err := it.Close(); err != nil { - return errors.Wrap(err, "ConcatIterator") - } - } - return nil -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/table.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/table.go deleted file mode 100644 index b8b4af07e7..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table/table.go +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 table - -import ( - "encoding/binary" - "fmt" - "os" - "path" - "path/filepath" - "strconv" - "strings" - "sync" - "sync/atomic" - - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf/bbloom" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -const fileSuffix = ".sst" - -type keyOffset struct { - key []byte - offset int - len int -} - -// Table represents a loaded table file with the info we have about it -type Table struct { - sync.Mutex - - fd *os.File // Own fd. - tableSize int // Initialized in OpenTable, using fd.Stat(). - - blockIndex []keyOffset - ref int32 // For file garbage collection. Atomic. - - loadingMode options.FileLoadingMode - mmap []byte // Memory mapped. - - // The following are initialized once and const. - smallest, biggest []byte // Smallest and largest keys. - id uint64 // file id, part of filename - - bf bbloom.Bloom -} - -// IncrRef increments the refcount (having to do with whether the file should be deleted) -func (t *Table) IncrRef() { - atomic.AddInt32(&t.ref, 1) -} - -// DecrRef decrements the refcount and possibly deletes the table -func (t *Table) DecrRef() error { - newRef := atomic.AddInt32(&t.ref, -1) - if newRef == 0 { - // We can safely delete this file, because for all the current files, we always have - // at least one reference pointing to them. - - // It's necessary to delete windows files - if t.loadingMode == options.MemoryMap { - y.Munmap(t.mmap) - } - if err := t.fd.Truncate(0); err != nil { - // This is very important to let the FS know that the file is deleted. - return err - } - filename := t.fd.Name() - if err := t.fd.Close(); err != nil { - return err - } - if err := os.Remove(filename); err != nil { - return err - } - } - return nil -} - -type block struct { - offset int - data []byte -} - -func (b block) NewIterator() *blockIterator { - return &blockIterator{data: b.data} -} - -// OpenTable assumes file has only one table and opens it. Takes ownership of fd upon function -// entry. Returns a table with one reference count on it (decrementing which may delete the file! -// -- consider t.Close() instead). The fd has to writeable because we call Truncate on it before -// deleting. -func OpenTable(fd *os.File, loadingMode options.FileLoadingMode) (*Table, error) { - fileInfo, err := fd.Stat() - if err != nil { - // It's OK to ignore fd.Close() errs in this function because we have only read - // from the file. - _ = fd.Close() - return nil, y.Wrap(err) - } - - filename := fileInfo.Name() - id, ok := ParseFileID(filename) - if !ok { - _ = fd.Close() - return nil, errors.Errorf("Invalid filename: %s", filename) - } - t := &Table{ - fd: fd, - ref: 1, // Caller is given one reference. - id: id, - loadingMode: loadingMode, - } - - t.tableSize = int(fileInfo.Size()) - - if loadingMode == options.MemoryMap { - t.mmap, err = y.Mmap(fd, false, fileInfo.Size()) - if err != nil { - _ = fd.Close() - return nil, y.Wrapf(err, "Unable to map file") - } - } else if loadingMode == options.LoadToRAM { - err = t.loadToRAM() - if err != nil { - _ = fd.Close() - return nil, y.Wrap(err) - } - } - - if err := t.readIndex(); err != nil { - return nil, y.Wrap(err) - } - - it := t.NewIterator(false) - defer it.Close() - it.Rewind() - if it.Valid() { - t.smallest = it.Key() - } - - it2 := t.NewIterator(true) - defer it2.Close() - it2.Rewind() - if it2.Valid() { - t.biggest = it2.Key() - } - return t, nil -} - -// Close closes the open table. (Releases resources back to the OS.) -func (t *Table) Close() error { - if t.loadingMode == options.MemoryMap { - y.Munmap(t.mmap) - } - - return t.fd.Close() -} - -func (t *Table) read(off int, sz int) ([]byte, error) { - if len(t.mmap) > 0 { - if len(t.mmap[off:]) < sz { - return nil, y.ErrEOF - } - return t.mmap[off : off+sz], nil - } - - res := make([]byte, sz) - nbr, err := t.fd.ReadAt(res, int64(off)) - y.NumReads.Add(1) - y.NumBytesRead.Add(int64(nbr)) - return res, err -} - -func (t *Table) readNoFail(off int, sz int) []byte { - res, err := t.read(off, sz) - y.Check(err) - return res -} - -func (t *Table) readIndex() error { - readPos := t.tableSize - - // Read bloom filter. - readPos -= 4 - buf := t.readNoFail(readPos, 4) - bloomLen := int(binary.BigEndian.Uint32(buf)) - readPos -= bloomLen - data := t.readNoFail(readPos, bloomLen) - t.bf = *bbloom.JSONUnmarshal(data) - - readPos -= 4 - buf = t.readNoFail(readPos, 4) - restartsLen := int(binary.BigEndian.Uint32(buf)) - - readPos -= 4 * restartsLen - buf = t.readNoFail(readPos, 4*restartsLen) - - offsets := make([]int, restartsLen) - for i := 0; i < restartsLen; i++ { - offsets[i] = int(binary.BigEndian.Uint32(buf[:4])) - buf = buf[4:] - } - - // The last offset stores the end of the last block. - for i := 0; i < len(offsets); i++ { - var o int - if i == 0 { - o = 0 - } else { - o = offsets[i-1] - } - - ko := keyOffset{ - offset: o, - len: offsets[i] - o, - } - t.blockIndex = append(t.blockIndex, ko) - } - - che := make(chan error, len(t.blockIndex)) - blocks := make(chan int, len(t.blockIndex)) - - for i := 0; i < len(t.blockIndex); i++ { - blocks <- i - } - - for i := 0; i < 64; i++ { // Run 64 goroutines. - go func() { - var h header - - for index := range blocks { - ko := &t.blockIndex[index] - - offset := ko.offset - buf, err := t.read(offset, h.Size()) - if err != nil { - che <- errors.Wrap(err, "While reading first header in block") - continue - } - - h.Decode(buf) - y.AssertTruef(h.plen == 0, "Key offset: %+v, h.plen = %d", *ko, h.plen) - - offset += h.Size() - buf = make([]byte, h.klen) - var out []byte - if out, err = t.read(offset, int(h.klen)); err != nil { - che <- errors.Wrap(err, "While reading first key in block") - continue - } - y.AssertTrue(len(buf) == copy(buf, out)) - - ko.key = buf - che <- nil - } - }() - } - close(blocks) // to stop reading goroutines - - var readError error - for i := 0; i < len(t.blockIndex); i++ { - if err := <-che; err != nil && readError == nil { - readError = err - } - } - if readError != nil { - return readError - } - - return nil -} - -func (t *Table) block(idx int) (block, error) { - y.AssertTruef(idx >= 0, "idx=%d", idx) - if idx >= len(t.blockIndex) { - return block{}, errors.New("block out of index") - } - - ko := t.blockIndex[idx] - blk := block{ - offset: ko.offset, - } - var err error - blk.data, err = t.read(blk.offset, ko.len) - return blk, err -} - -// Size is its file size in bytes -func (t *Table) Size() int64 { return int64(t.tableSize) } - -// Smallest is its smallest key, or nil if there are none -func (t *Table) Smallest() []byte { return t.smallest } - -// Biggest is its biggest key, or nil if there are none -func (t *Table) Biggest() []byte { return t.biggest } - -// Filename is NOT the file name. Just kidding, it is. -func (t *Table) Filename() string { return t.fd.Name() } - -// ID is the table's ID number (used to make the file name). -func (t *Table) ID() uint64 { return t.id } - -// DoesNotHave returns true if (but not "only if") the table does not have the key. It does a -// bloom filter lookup. -func (t *Table) DoesNotHave(key []byte) bool { return !t.bf.Has(key) } - -// ParseFileID reads the file id out of a filename. -func ParseFileID(name string) (uint64, bool) { - name = path.Base(name) - if !strings.HasSuffix(name, fileSuffix) { - return 0, false - } - // suffix := name[len(fileSuffix):] - name = strings.TrimSuffix(name, fileSuffix) - id, err := strconv.Atoi(name) - if err != nil { - return 0, false - } - y.AssertTrue(id >= 0) - return uint64(id), true -} - -// IDToFilename does the inverse of ParseFileID -func IDToFilename(id uint64) string { - return fmt.Sprintf("%06d", id) + fileSuffix -} - -// NewFilename should be named TableFilepath -- it combines the dir with the ID to make a table -// filepath. -func NewFilename(id uint64, dir string) string { - return filepath.Join(dir, IDToFilename(id)) -} - -func (t *Table) loadToRAM() error { - t.mmap = make([]byte, t.tableSize) - read, err := t.fd.ReadAt(t.mmap, 0) - if err != nil || read != t.tableSize { - return y.Wrapf(err, "Unable to load file in memory. Table file: %s", t.Filename()) - } - y.NumReads.Add(1) - y.NumBytesRead.Add(int64(read)) - return nil -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/transaction.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/transaction.go deleted file mode 100644 index 5c27718161..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/transaction.go +++ /dev/null @@ -1,693 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "bytes" - "context" - "encoding/hex" - "math" - "sort" - "strconv" - "sync" - "sync/atomic" - "time" - - farm "gx/ipfs/QmRFFHk2jw9tgjxv12bCuuTnSbVXxEvYQkuNCLMEv9eUwP/go-farm" - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -type oracle struct { - // A 64-bit integer must be at the top for memory alignment. See issue #311. - refCount int64 - isManaged bool // Does not change value, so no locking required. - - sync.Mutex // For nextTxnTs and commits. - // writeChLock lock is for ensuring that transactions go to the write - // channel in the same order as their commit timestamps. - writeChLock sync.Mutex - nextTxnTs uint64 - - // Used to block NewTransaction, so all previous commits are visible to a new read. - txnMark y.WaterMark - - // Either of these is used to determine which versions can be permanently - // discarded during compaction. - discardTs uint64 // Used by ManagedDB. - readMark y.WaterMark // Used by DB. - - // commits stores a key fingerprint and latest commit counter for it. - // refCount is used to clear out commits map to avoid a memory blowup. - commits map[uint64]uint64 -} - -func newOracle(opt Options) *oracle { - orc := &oracle{ - isManaged: opt.managedTxns, - commits: make(map[uint64]uint64), - // We're not initializing nextTxnTs and readOnlyTs. It would be done after replay in Open. - readMark: y.WaterMark{Name: "badger.PendingReads"}, - txnMark: y.WaterMark{Name: "badger.TxnTimestamp"}, - } - orc.readMark.Init() - orc.txnMark.Init() - return orc -} - -func (o *oracle) addRef() { - atomic.AddInt64(&o.refCount, 1) -} - -func (o *oracle) decrRef() { - if atomic.AddInt64(&o.refCount, -1) != 0 { - return - } - - // Clear out commits maps to release memory. - o.Lock() - defer o.Unlock() - // Avoids the race where something new is added to commitsMap - // after we check refCount and before we take Lock. - if atomic.LoadInt64(&o.refCount) != 0 { - return - } - if len(o.commits) >= 1000 { // If the map is still small, let it slide. - o.commits = make(map[uint64]uint64) - } -} - -func (o *oracle) readTs() uint64 { - if o.isManaged { - return math.MaxUint64 - } - - var readTs uint64 - o.Lock() - readTs = o.nextTxnTs - 1 - o.readMark.Begin(readTs) - o.Unlock() - - // Wait for all txns which have no conflicts, have been assigned a commit - // timestamp and are going through the write to value log and LSM tree - // process. Not waiting here could mean that some txns which have been - // committed would not be read. - y.Check(o.txnMark.WaitForMark(context.Background(), readTs)) - return readTs -} - -func (o *oracle) nextTs() uint64 { - o.Lock() - defer o.Unlock() - return o.nextTxnTs -} - -// Any deleted or invalid versions at or below ts would be discarded during -// compaction to reclaim disk space in LSM tree and thence value log. -func (o *oracle) setDiscardTs(ts uint64) { - o.Lock() - defer o.Unlock() - o.discardTs = ts -} - -func (o *oracle) discardAtOrBelow() uint64 { - if o.isManaged { - o.Lock() - defer o.Unlock() - return o.discardTs - } - return o.readMark.DoneUntil() -} - -// hasConflict must be called while having a lock. -func (o *oracle) hasConflict(txn *Txn) bool { - if len(txn.reads) == 0 { - return false - } - for _, ro := range txn.reads { - // A commit at the read timestamp is expected. - // But, any commit after the read timestamp should cause a conflict. - if ts, has := o.commits[ro]; has && ts > txn.readTs { - return true - } - } - return false -} - -func (o *oracle) newCommitTs(txn *Txn) uint64 { - o.Lock() - defer o.Unlock() - - if o.hasConflict(txn) { - return 0 - } - - var ts uint64 - if !o.isManaged { - // This is the general case, when user doesn't specify the read and commit ts. - ts = o.nextTxnTs - o.nextTxnTs++ - o.txnMark.Begin(ts) - - } else { - // If commitTs is set, use it instead. - ts = txn.commitTs - } - - for _, w := range txn.writes { - o.commits[w] = ts // Update the commitTs. - } - return ts -} - -func (o *oracle) doneCommit(cts uint64) { - if o.isManaged { - // No need to update anything. - return - } - o.txnMark.Done(cts) -} - -// Txn represents a Badger transaction. -type Txn struct { - readTs uint64 - commitTs uint64 - - update bool // update is used to conditionally keep track of reads. - reads []uint64 // contains fingerprints of keys read. - writes []uint64 // contains fingerprints of keys written. - - pendingWrites map[string]*Entry // cache stores any writes done by txn. - - db *DB - discarded bool - - size int64 - count int64 - numIterators int32 -} - -type pendingWritesIterator struct { - entries []*Entry - nextIdx int - readTs uint64 - reversed bool -} - -func (pi *pendingWritesIterator) Next() { - pi.nextIdx++ -} - -func (pi *pendingWritesIterator) Rewind() { - pi.nextIdx = 0 -} - -func (pi *pendingWritesIterator) Seek(key []byte) { - key = y.ParseKey(key) - pi.nextIdx = sort.Search(len(pi.entries), func(idx int) bool { - cmp := bytes.Compare(pi.entries[idx].Key, key) - if !pi.reversed { - return cmp >= 0 - } - return cmp <= 0 - }) -} - -func (pi *pendingWritesIterator) Key() []byte { - y.AssertTrue(pi.Valid()) - entry := pi.entries[pi.nextIdx] - return y.KeyWithTs(entry.Key, pi.readTs) -} - -func (pi *pendingWritesIterator) Value() y.ValueStruct { - y.AssertTrue(pi.Valid()) - entry := pi.entries[pi.nextIdx] - return y.ValueStruct{ - Value: entry.Value, - Meta: entry.meta, - UserMeta: entry.UserMeta, - ExpiresAt: entry.ExpiresAt, - Version: pi.readTs, - } -} - -func (pi *pendingWritesIterator) Valid() bool { - return pi.nextIdx < len(pi.entries) -} - -func (pi *pendingWritesIterator) Close() error { - return nil -} - -func (txn *Txn) newPendingWritesIterator(reversed bool) *pendingWritesIterator { - if !txn.update || len(txn.pendingWrites) == 0 { - return nil - } - entries := make([]*Entry, 0, len(txn.pendingWrites)) - for _, e := range txn.pendingWrites { - entries = append(entries, e) - } - // Number of pending writes per transaction shouldn't be too big in general. - sort.Slice(entries, func(i, j int) bool { - cmp := bytes.Compare(entries[i].Key, entries[j].Key) - if !reversed { - return cmp < 0 - } - return cmp > 0 - }) - return &pendingWritesIterator{ - readTs: txn.readTs, - entries: entries, - reversed: reversed, - } -} - -func (txn *Txn) checkSize(e *Entry) error { - count := txn.count + 1 - // Extra bytes for version in key. - size := txn.size + int64(e.estimateSize(txn.db.opt.ValueThreshold)) + 10 - if count >= txn.db.opt.maxBatchCount || size >= txn.db.opt.maxBatchSize { - return ErrTxnTooBig - } - txn.count, txn.size = count, size - return nil -} - -// Set adds a key-value pair to the database. -// -// It will return ErrReadOnlyTxn if update flag was set to false when creating the -// transaction. -// -// The current transaction keeps a reference to the key and val byte slice -// arguments. Users must not modify key and val until the end of the transaction. -func (txn *Txn) Set(key, val []byte) error { - e := &Entry{ - Key: key, - Value: val, - } - return txn.SetEntry(e) -} - -// SetWithMeta adds a key-value pair to the database, along with a metadata -// byte. -// -// This byte is stored alongside the key, and can be used as an aid to -// interpret the value or store other contextual bits corresponding to the -// key-value pair. -// -// The current transaction keeps a reference to the key and val byte slice -// arguments. Users must not modify key and val until the end of the transaction. -func (txn *Txn) SetWithMeta(key, val []byte, meta byte) error { - e := &Entry{Key: key, Value: val, UserMeta: meta} - return txn.SetEntry(e) -} - -// SetWithDiscard acts like SetWithMeta, but adds a marker to discard earlier -// versions of the key. -// -// This method is only useful if you have set a higher limit for -// options.NumVersionsToKeep. The default setting is 1, in which case, this -// function doesn't add any more benefit than just calling the normal -// SetWithMeta (or Set) function. If however, you have a higher setting for -// NumVersionsToKeep (in Dgraph, we set it to infinity), you can use this method -// to indicate that all the older versions can be discarded and removed during -// compactions. -// -// The current transaction keeps a reference to the key and val byte slice -// arguments. Users must not modify key and val until the end of the -// transaction. -func (txn *Txn) SetWithDiscard(key, val []byte, meta byte) error { - e := &Entry{ - Key: key, - Value: val, - UserMeta: meta, - meta: bitDiscardEarlierVersions, - } - return txn.SetEntry(e) -} - -// SetWithTTL adds a key-value pair to the database, along with a time-to-live -// (TTL) setting. A key stored with a TTL would automatically expire after the -// time has elapsed , and be eligible for garbage collection. -// -// The current transaction keeps a reference to the key and val byte slice -// arguments. Users must not modify key and val until the end of the -// transaction. -func (txn *Txn) SetWithTTL(key, val []byte, dur time.Duration) error { - expire := time.Now().Add(dur).Unix() - e := &Entry{Key: key, Value: val, ExpiresAt: uint64(expire)} - return txn.SetEntry(e) -} - -func exceedsSize(prefix string, max int64, key []byte) error { - return errors.Errorf("%s with size %d exceeded %d limit. %s:\n%s", - prefix, len(key), max, prefix, hex.Dump(key[:1<<10])) -} - -func (txn *Txn) modify(e *Entry) error { - const maxKeySize = 65000 - - switch { - case !txn.update: - return ErrReadOnlyTxn - case txn.discarded: - return ErrDiscardedTxn - case len(e.Key) == 0: - return ErrEmptyKey - case bytes.HasPrefix(e.Key, badgerPrefix): - return ErrInvalidKey - case len(e.Key) > maxKeySize: - // Key length can't be more than uint16, as determined by table::header. To - // keep things safe and allow badger move prefix and a timestamp suffix, let's - // cut it down to 65000, instead of using 65536. - return exceedsSize("Key", maxKeySize, e.Key) - case int64(len(e.Value)) > txn.db.opt.ValueLogFileSize: - return exceedsSize("Value", txn.db.opt.ValueLogFileSize, e.Value) - } - - if err := txn.checkSize(e); err != nil { - return err - } - fp := farm.Fingerprint64(e.Key) // Avoid dealing with byte arrays. - txn.writes = append(txn.writes, fp) - txn.pendingWrites[string(e.Key)] = e - return nil -} - -// SetEntry takes an Entry struct and adds the key-value pair in the struct, -// along with other metadata to the database. -// -// The current transaction keeps a reference to the entry passed in argument. -// Users must not modify the entry until the end of the transaction. -func (txn *Txn) SetEntry(e *Entry) error { - return txn.modify(e) -} - -// Delete deletes a key. -// -// This is done by adding a delete marker for the key at commit timestamp. Any -// reads happening before this timestamp would be unaffected. Any reads after -// this commit would see the deletion. -// -// The current transaction keeps a reference to the key byte slice argument. -// Users must not modify the key until the end of the transaction. -func (txn *Txn) Delete(key []byte) error { - e := &Entry{ - Key: key, - meta: bitDelete, - } - return txn.modify(e) -} - -// Get looks for key and returns corresponding Item. -// If key is not found, ErrKeyNotFound is returned. -func (txn *Txn) Get(key []byte) (item *Item, rerr error) { - if len(key) == 0 { - return nil, ErrEmptyKey - } else if txn.discarded { - return nil, ErrDiscardedTxn - } - - item = new(Item) - if txn.update { - if e, has := txn.pendingWrites[string(key)]; has && bytes.Equal(key, e.Key) { - if isDeletedOrExpired(e.meta, e.ExpiresAt) { - return nil, ErrKeyNotFound - } - // Fulfill from cache. - item.meta = e.meta - item.val = e.Value - item.userMeta = e.UserMeta - item.key = key - item.status = prefetched - item.version = txn.readTs - item.expiresAt = e.ExpiresAt - // We probably don't need to set db on item here. - return item, nil - } - // Only track reads if this is update txn. No need to track read if txn serviced it - // internally. - txn.addReadKey(key) - } - - seek := y.KeyWithTs(key, txn.readTs) - vs, err := txn.db.get(seek) - if err != nil { - return nil, errors.Wrapf(err, "DB::Get key: %q", key) - } - if vs.Value == nil && vs.Meta == 0 { - return nil, ErrKeyNotFound - } - if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { - return nil, ErrKeyNotFound - } - - item.key = key - item.version = vs.Version - item.meta = vs.Meta - item.userMeta = vs.UserMeta - item.db = txn.db - item.vptr = vs.Value // TODO: Do we need to copy this over? - item.txn = txn - item.expiresAt = vs.ExpiresAt - return item, nil -} - -func (txn *Txn) addReadKey(key []byte) { - if txn.update { - fp := farm.Fingerprint64(key) - txn.reads = append(txn.reads, fp) - } -} - -// Discard discards a created transaction. This method is very important and must be called. Commit -// method calls this internally, however, calling this multiple times doesn't cause any issues. So, -// this can safely be called via a defer right when transaction is created. -// -// NOTE: If any operations are run on a discarded transaction, ErrDiscardedTxn is returned. -func (txn *Txn) Discard() { - if txn.discarded { // Avoid a re-run. - return - } - if atomic.LoadInt32(&txn.numIterators) > 0 { - panic("Unclosed iterator at time of Txn.Discard.") - } - txn.discarded = true - if !txn.db.orc.isManaged { - txn.db.orc.readMark.Done(txn.readTs) - } - if txn.update { - txn.db.orc.decrRef() - } -} - -func (txn *Txn) commitAndSend() (func() error, error) { - orc := txn.db.orc - // Ensure that the order in which we get the commit timestamp is the same as - // the order in which we push these updates to the write channel. So, we - // acquire a writeChLock before getting a commit timestamp, and only release - // it after pushing the entries to it. - orc.writeChLock.Lock() - defer orc.writeChLock.Unlock() - - commitTs := orc.newCommitTs(txn) - if commitTs == 0 { - return nil, ErrConflict - } - - // The following debug information is what led to determining the cause of - // bank txn violation bug, and it took a whole bunch of effort to narrow it - // down to here. So, keep this around for at least a couple of months. - // var b strings.Builder - // fmt.Fprintf(&b, "Read: %d. Commit: %d. reads: %v. writes: %v. Keys: ", - // txn.readTs, commitTs, txn.reads, txn.writes) - entries := make([]*Entry, 0, len(txn.pendingWrites)+1) - for _, e := range txn.pendingWrites { - // fmt.Fprintf(&b, "[%q : %q], ", e.Key, e.Value) - - // Suffix the keys with commit ts, so the key versions are sorted in - // descending order of commit timestamp. - e.Key = y.KeyWithTs(e.Key, commitTs) - e.meta |= bitTxn - entries = append(entries, e) - } - // log.Printf("%s\n", b.String()) - e := &Entry{ - Key: y.KeyWithTs(txnKey, commitTs), - Value: []byte(strconv.FormatUint(commitTs, 10)), - meta: bitFinTxn, - } - entries = append(entries, e) - - req, err := txn.db.sendToWriteCh(entries) - if err != nil { - orc.doneCommit(commitTs) - return nil, err - } - ret := func() error { - err := req.Wait() - // Wait before marking commitTs as done. - // We can't defer doneCommit above, because it is being called from a - // callback here. - orc.doneCommit(commitTs) - return err - } - return ret, nil -} - -// Commit commits the transaction, following these steps: -// -// 1. If there are no writes, return immediately. -// -// 2. Check if read rows were updated since txn started. If so, return ErrConflict. -// -// 3. If no conflict, generate a commit timestamp and update written rows' commit ts. -// -// 4. Batch up all writes, write them to value log and LSM tree. -// -// 5. If callback is provided, Badger will return immediately after checking -// for conflicts. Writes to the database will happen in the background. If -// there is a conflict, an error will be returned and the callback will not -// run. If there are no conflicts, the callback will be called in the -// background upon successful completion of writes or any error during write. -// -// If error is nil, the transaction is successfully committed. In case of a non-nil error, the LSM -// tree won't be updated, so there's no need for any rollback. -func (txn *Txn) Commit(callback func(error)) error { - if txn.commitTs == 0 && txn.db.opt.managedTxns { - panic("Commit cannot be called with managedDB=true. Use CommitAt.") - } - if txn.discarded { - return ErrDiscardedTxn - } - defer txn.Discard() - if len(txn.writes) == 0 { - return nil // Nothing to do. - } - - txnCb, err := txn.commitAndSend() - if err != nil { - return err - } - - if callback == nil { - // If batchSet failed, LSM would not have been updated. So, no need to rollback anything. - - // TODO: What if some of the txns successfully make it to value log, but others fail. - // Nothing gets updated to LSM, until a restart happens. - return txnCb() - } - - // TODO: Avoid creating a goroutine per txn. We should instead send these - // over to a channel, which can run them via a single goroutine. This would - // also ensure that the callbacks are run serially, which makes it easier - // for the users to write thread-unsafe callbacks. - go func() { - err := txnCb() - callback(err) - }() - return nil -} - -// ReadTs returns the read timestamp of the transaction. -func (txn *Txn) ReadTs() uint64 { - return txn.readTs -} - -// NewTransaction creates a new transaction. Badger supports concurrent execution of transactions, -// providing serializable snapshot isolation, avoiding write skews. Badger achieves this by tracking -// the keys read and at Commit time, ensuring that these read keys weren't concurrently modified by -// another transaction. -// -// For read-only transactions, set update to false. In this mode, we don't track the rows read for -// any changes. Thus, any long running iterations done in this mode wouldn't pay this overhead. -// -// Running transactions concurrently is OK. However, a transaction itself isn't thread safe, and -// should only be run serially. It doesn't matter if a transaction is created by one goroutine and -// passed down to other, as long as the Txn APIs are called serially. -// -// When you create a new transaction, it is absolutely essential to call -// Discard(). This should be done irrespective of what the update param is set -// to. Commit API internally runs Discard, but running it twice wouldn't cause -// any issues. -// -// txn := db.NewTransaction(false) -// defer txn.Discard() -// // Call various APIs. -func (db *DB) NewTransaction(update bool) *Txn { - if db.opt.ReadOnly && update { - // DB is read-only, force read-only transaction. - update = false - } - - txn := &Txn{ - update: update, - db: db, - count: 1, // One extra entry for BitFin. - size: int64(len(txnKey) + 10), // Some buffer for the extra entry. - } - if update { - txn.pendingWrites = make(map[string]*Entry) - txn.db.orc.addRef() - } - // It is important that the oracle addRef happens BEFORE we retrieve a read - // timestamp. Otherwise, it is possible that the oracle commit map would - // become nil after we get the read timestamp. - // The sequence of events can be: - // 1. This txn gets a read timestamp. - // 2. Another txn working on the same keyset commits them, and decrements - // the reference to oracle. - // 3. Oracle ref reaches zero, resetting commit map. - // 4. This txn increments the oracle reference. - // 5. Now this txn would go on to commit the keyset, and no conflicts - // would be detected. - // See issue: https://github.com/dgraph-io/badger/issues/574 - txn.readTs = db.orc.readTs() - return txn -} - -// View executes a function creating and managing a read-only transaction for the user. Error -// returned by the function is relayed by the View method. -// If View is used with managed transactions, it would assume a read timestamp of MaxUint64. -func (db *DB) View(fn func(txn *Txn) error) error { - var txn *Txn - if db.opt.managedTxns { - txn = db.NewTransactionAt(math.MaxUint64, false) - } else { - txn = db.NewTransaction(false) - } - defer txn.Discard() - - return fn(txn) -} - -// Update executes a function, creating and managing a read-write transaction -// for the user. Error returned by the function is relayed by the Update method. -// Update cannot be used with managed transactions. -func (db *DB) Update(fn func(txn *Txn) error) error { - if db.opt.managedTxns { - panic("Update can only be used with managedDB=false.") - } - txn := db.NewTransaction(true) - defer txn.Discard() - - if err := fn(txn); err != nil { - return err - } - - return txn.Commit(nil) -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/util.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/util.go deleted file mode 100644 index 2888c15db0..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/util.go +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "io/ioutil" - "math/rand" - "sync/atomic" - "time" - - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/table" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -// summary is produced when DB is closed. Currently it is used only for testing. -type summary struct { - fileIDs map[uint64]bool -} - -func (s *levelsController) getSummary() *summary { - out := &summary{ - fileIDs: make(map[uint64]bool), - } - for _, l := range s.levels { - l.getSummary(out) - } - return out -} - -func (s *levelHandler) getSummary(sum *summary) { - s.RLock() - defer s.RUnlock() - for _, t := range s.tables { - sum.fileIDs[t.ID()] = true - } -} - -func (s *DB) validate() error { return s.lc.validate() } - -func (s *levelsController) validate() error { - for _, l := range s.levels { - if err := l.validate(); err != nil { - return errors.Wrap(err, "Levels Controller") - } - } - return nil -} - -// Check does some sanity check on one level of data or in-memory index. -func (s *levelHandler) validate() error { - if s.level == 0 { - return nil - } - - s.RLock() - defer s.RUnlock() - 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) - } - - if y.CompareKeys(s.tables[j-1].Biggest(), s.tables[j].Smallest()) >= 0 { - return errors.Errorf( - "Inter: %q vs %q: level=%d j=%d numTables=%d", - string(s.tables[j-1].Biggest()), string(s.tables[j].Smallest()), s.level, j, numTables) - } - - if y.CompareKeys(s.tables[j].Smallest(), s.tables[j].Biggest()) > 0 { - return errors.Errorf( - "Intra: %q vs %q: level=%d j=%d numTables=%d", - s.tables[j].Smallest(), s.tables[j].Biggest(), s.level, j, numTables) - } - } - return nil -} - -// func (s *KV) debugPrintMore() { s.lc.debugPrintMore() } - -// // debugPrintMore shows key ranges of each level. -// func (s *levelsController) debugPrintMore() { -// s.Lock() -// defer s.Unlock() -// for i := 0; i < s.kv.opt.MaxLevels; i++ { -// s.levels[i].debugPrintMore() -// } -// } - -// func (s *levelHandler) debugPrintMore() { -// s.RLock() -// defer s.RUnlock() -// s.elog.Printf("Level %d:", s.level) -// for _, t := range s.tables { -// y.Printf(" [%s, %s]", t.Smallest(), t.Biggest()) -// } -// y.Printf("\n") -// } - -// reserveFileID reserves a unique file id. -func (s *levelsController) reserveFileID() uint64 { - id := atomic.AddUint64(&s.nextFileID, 1) - return id - 1 -} - -func getIDMap(dir string) map[uint64]struct{} { - fileInfos, err := ioutil.ReadDir(dir) - y.Check(err) - idMap := make(map[uint64]struct{}) - for _, info := range fileInfos { - if info.IsDir() { - continue - } - fileID, ok := table.ParseFileID(info.Name()) - if !ok { - continue - } - idMap[fileID] = struct{}{} - } - return idMap -} - -func init() { - rand.Seed(time.Now().UnixNano()) -} diff --git a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/value.go b/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/value.go deleted file mode 100644 index 26bcb87f28..0000000000 --- a/vendor/gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/value.go +++ /dev/null @@ -1,1258 +0,0 @@ -/* - * Copyright 2017 Dgraph Labs, Inc. and Contributors - * - * 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 badger - -import ( - "bufio" - "bytes" - "encoding/binary" - "fmt" - "hash/crc32" - "io" - "io/ioutil" - "log" - "math" - "math/rand" - "os" - "sort" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/options" - - "gx/ipfs/QmRvYNctevGUW52urgmoFZscT6buMKqhHezLUS64WepGWn/go-net/trace" - "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" - "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger/y" -) - -// Values have their first byte being byteData or byteDelete. This helps us distinguish between -// a key that has never been seen and a key that has been explicitly deleted. -const ( - bitDelete byte = 1 << 0 // Set if the key has been deleted. - bitValuePointer byte = 1 << 1 // Set if the value is NOT stored directly next to key. - bitDiscardEarlierVersions byte = 1 << 2 // Set if earlier versions can be discarded. - - // The MSB 2 bits are for transactions. - bitTxn byte = 1 << 6 // Set if the entry is part of a txn. - bitFinTxn byte = 1 << 7 // Set if the entry is to indicate end of txn in value log. - - mi int64 = 1 << 20 -) - -type logFile struct { - path string - // This is a lock on the log file. It guards the fd’s value, the file’s - // existence and the file’s memory map. - // - // Use shared ownership when reading/writing the file or memory map, use - // exclusive ownership to open/close the descriptor, unmap or remove the file. - lock sync.RWMutex - fd *os.File - fid uint32 - fmap []byte - size uint32 - loadingMode options.FileLoadingMode -} - -// openReadOnly assumes that we have a write lock on logFile. -func (lf *logFile) openReadOnly() error { - var err error - lf.fd, err = os.OpenFile(lf.path, os.O_RDONLY, 0666) - if err != nil { - return errors.Wrapf(err, "Unable to open %q as RDONLY.", lf.path) - } - - fi, err := lf.fd.Stat() - if err != nil { - return errors.Wrapf(err, "Unable to check stat for %q", lf.path) - } - y.AssertTrue(fi.Size() <= math.MaxUint32) - lf.size = uint32(fi.Size()) - - if err = lf.mmap(fi.Size()); err != nil { - _ = lf.fd.Close() - return y.Wrapf(err, "Unable to map file") - } - - return nil -} - -func (lf *logFile) mmap(size int64) (err error) { - if lf.loadingMode != options.MemoryMap { - // Nothing to do - return nil - } - lf.fmap, err = y.Mmap(lf.fd, false, size) - if err == nil { - err = y.Madvise(lf.fmap, false) // Disable readahead - } - return err -} - -func (lf *logFile) munmap() (err error) { - if lf.loadingMode != options.MemoryMap { - // Nothing to do - return nil - } - if err := y.Munmap(lf.fmap); err != nil { - return errors.Wrapf(err, "Unable to munmap value log: %q", lf.path) - } - return nil -} - -// Acquire lock on mmap/file if you are calling this -func (lf *logFile) read(p valuePointer, s *y.Slice) (buf []byte, err error) { - var nbr int64 - offset := p.Offset - if lf.loadingMode == options.FileIO { - buf = s.Resize(int(p.Len)) - var n int - n, err = lf.fd.ReadAt(buf, int64(offset)) - nbr = int64(n) - } else { - // Do not convert size to uint32, because the lf.fmap can be of size - // 4GB, which overflows the uint32 during conversion to make the size 0, - // causing the read to fail with ErrEOF. See issue #585. - size := int64(len(lf.fmap)) - valsz := p.Len - if int64(offset) >= size || int64(offset+valsz) > size { - err = y.ErrEOF - } else { - buf = lf.fmap[offset : offset+valsz] - nbr = int64(valsz) - } - } - y.NumReads.Add(1) - y.NumBytesRead.Add(nbr) - return buf, err -} - -func (lf *logFile) doneWriting(offset uint32) error { - // Sync before acquiring lock. (We call this from write() and thus know we have shared access - // to the fd.) - if err := lf.fd.Sync(); err != nil { - return errors.Wrapf(err, "Unable to sync value log: %q", lf.path) - } - // Close and reopen the file read-only. Acquire lock because fd will become invalid for a bit. - // Acquiring the lock is bad because, while we don't hold the lock for a long time, it forces - // one batch of readers wait for the preceding batch of readers to finish. - // - // If there's a benefit to reopening the file read-only, it might be on Windows. I don't know - // what the benefit is. Consider keeping the file read-write, or use fcntl to change - // permissions. - lf.lock.Lock() - defer lf.lock.Unlock() - if err := lf.munmap(); err != nil { - return err - } - // TODO: Confirm if we need to run a file sync after truncation. - // Truncation must run after unmapping, otherwise Windows would crap itself. - if err := lf.fd.Truncate(int64(offset)); err != nil { - return errors.Wrapf(err, "Unable to truncate file: %q", lf.path) - } - if err := lf.fd.Close(); err != nil { - return errors.Wrapf(err, "Unable to close value log: %q", lf.path) - } - - return lf.openReadOnly() -} - -// You must hold lf.lock to sync() -func (lf *logFile) sync() error { - return lf.fd.Sync() -} - -var errStop = errors.New("Stop iteration") -var errTruncate = errors.New("Do truncate") - -type logEntry func(e Entry, vp valuePointer) error - -type safeRead struct { - k []byte - v []byte - - recordOffset uint32 -} - -func (r *safeRead) Entry(reader *bufio.Reader) (*Entry, error) { - var hbuf [headerBufSize]byte - var err error - - hash := crc32.New(y.CastagnoliCrcTable) - tee := io.TeeReader(reader, hash) - if _, err = io.ReadFull(tee, hbuf[:]); err != nil { - return nil, err - } - - var h header - h.Decode(hbuf[:]) - if h.klen > uint32(1<<16) { // Key length must be below uint16. - return nil, errTruncate - } - kl := int(h.klen) - if cap(r.k) < kl { - r.k = make([]byte, 2*kl) - } - vl := int(h.vlen) - if cap(r.v) < vl { - r.v = make([]byte, 2*vl) - } - - e := &Entry{} - e.offset = r.recordOffset - e.Key = r.k[:kl] - e.Value = r.v[:vl] - - if _, err = io.ReadFull(tee, e.Key); err != nil { - if err == io.EOF { - err = errTruncate - } - return nil, err - } - if _, err = io.ReadFull(tee, e.Value); err != nil { - if err == io.EOF { - err = errTruncate - } - return nil, err - } - var crcBuf [4]byte - if _, err = io.ReadFull(reader, crcBuf[:]); err != nil { - if err == io.EOF { - err = errTruncate - } - return nil, err - } - crc := binary.BigEndian.Uint32(crcBuf[:]) - if crc != hash.Sum32() { - return nil, errTruncate - } - e.meta = h.meta - e.UserMeta = h.userMeta - e.ExpiresAt = h.expiresAt - return e, nil -} - -// iterate iterates over log file. It doesn't not allocate new memory for every kv pair. -// Therefore, the kv pair is only valid for the duration of fn call. -func (vlog *valueLog) iterate(lf *logFile, offset uint32, fn logEntry) (uint32, error) { - fi, err := lf.fd.Stat() - if err != nil { - return 0, err - } - if int64(offset) == fi.Size() { - // We're at the end of the file already. No need to do anything. - return offset, nil - } - if vlog.opt.ReadOnly { - // We're not at the end of the file. We'd need to replay the entries, or - // possibly truncate the file. - return 0, ErrReplayNeeded - } - - // We're not at the end of the file. Let's Seek to the offset and start reading. - if _, err := lf.fd.Seek(int64(offset), io.SeekStart); err != nil { - return 0, y.Wrap(err) - } - - reader := bufio.NewReader(lf.fd) - read := &safeRead{ - k: make([]byte, 10), - v: make([]byte, 10), - recordOffset: offset, - } - - var lastCommit uint64 - var validEndOffset uint32 - for { - e, err := read.Entry(reader) - if err == io.EOF { - break - } else if err == io.ErrUnexpectedEOF || err == errTruncate { - break - } else if err != nil { - return 0, err - } else if e == nil { - continue - } - - var vp valuePointer - vp.Len = uint32(headerBufSize + len(e.Key) + len(e.Value) + crc32.Size) - read.recordOffset += vp.Len - - vp.Offset = e.offset - vp.Fid = lf.fid - - if e.meta&bitTxn > 0 { - txnTs := y.ParseTs(e.Key) - if lastCommit == 0 { - lastCommit = txnTs - } - if lastCommit != txnTs { - break - } - - } else if e.meta&bitFinTxn > 0 { - txnTs, err := strconv.ParseUint(string(e.Value), 10, 64) - if err != nil || lastCommit != txnTs { - break - } - // Got the end of txn. Now we can store them. - lastCommit = 0 - validEndOffset = read.recordOffset - - } else { - if lastCommit != 0 { - // This is most likely an entry which was moved as part of GC. - // We shouldn't get this entry in the middle of a transaction. - break - } - validEndOffset = read.recordOffset - } - - if err := fn(*e, vp); err != nil { - if err == errStop { - break - } - return 0, y.Wrap(err) - } - } - return validEndOffset, nil -} - -func (vlog *valueLog) rewrite(f *logFile, tr trace.Trace) error { - maxFid := atomic.LoadUint32(&vlog.maxFid) - y.AssertTruef(uint32(f.fid) < maxFid, "fid to move: %d. Current max fid: %d", f.fid, maxFid) - tr.LazyPrintf("Rewriting fid: %d", f.fid) - - wb := make([]*Entry, 0, 1000) - var size int64 - - y.AssertTrue(vlog.kv != nil) - var count, moved int - fe := func(e Entry) error { - count++ - if count%100000 == 0 { - tr.LazyPrintf("Processing entry %d", count) - } - - vs, err := vlog.kv.get(e.Key) - if err != nil { - return err - } - if discardEntry(e, vs) { - return nil - } - - // Value is still present in value log. - if len(vs.Value) == 0 { - return errors.Errorf("Empty value: %+v", vs) - } - var vp valuePointer - vp.Decode(vs.Value) - - if vp.Fid > f.fid { - return nil - } - if vp.Offset > e.offset { - return nil - } - if vp.Fid == f.fid && vp.Offset == e.offset { - moved++ - // This new entry only contains the key, and a pointer to the value. - ne := new(Entry) - ne.meta = 0 // Remove all bits. Different keyspace doesn't need these bits. - ne.UserMeta = e.UserMeta - - // Create a new key in a separate keyspace, prefixed by moveKey. We are not - // allowed to rewrite an older version of key in the LSM tree, because then this older - // version would be at the top of the LSM tree. To work correctly, reads expect the - // latest versions to be at the top, and the older versions at the bottom. - if bytes.HasPrefix(e.Key, badgerMove) { - ne.Key = append([]byte{}, e.Key...) - } else { - ne.Key = append([]byte{}, badgerMove...) - ne.Key = append(ne.Key, e.Key...) - } - - ne.Value = append([]byte{}, e.Value...) - wb = append(wb, ne) - size += int64(e.estimateSize(vlog.opt.ValueThreshold)) - if size >= 64*mi { - tr.LazyPrintf("request has %d entries, size %d", len(wb), size) - if err := vlog.kv.batchSet(wb); err != nil { - return err - } - size = 0 - wb = wb[:0] - } - } else { - log.Printf("WARNING: This entry should have been caught. %+v\n", e) - } - return nil - } - - _, err := vlog.iterate(f, 0, func(e Entry, vp valuePointer) error { - return fe(e) - }) - if err != nil { - return err - } - - tr.LazyPrintf("request has %d entries, size %d", len(wb), size) - batchSize := 1024 - var loops int - for i := 0; i < len(wb); { - loops++ - if batchSize == 0 { - log.Printf("WARNING: We shouldn't reach batch size of zero.") - return ErrNoRewrite - } - end := i + batchSize - if end > len(wb) { - end = len(wb) - } - if err := vlog.kv.batchSet(wb[i:end]); err != nil { - if err == ErrTxnTooBig { - // Decrease the batch size to half. - batchSize = batchSize / 2 - tr.LazyPrintf("Dropped batch size to %d", batchSize) - continue - } - return err - } - i += batchSize - } - tr.LazyPrintf("Processed %d entries in %d loops", len(wb), loops) - tr.LazyPrintf("Total entries: %d. Moved: %d", count, moved) - tr.LazyPrintf("Removing fid: %d", f.fid) - var deleteFileNow bool - // Entries written to LSM. Remove the older file now. - { - vlog.filesLock.Lock() - // Just a sanity-check. - if _, ok := vlog.filesMap[f.fid]; !ok { - vlog.filesLock.Unlock() - return errors.Errorf("Unable to find fid: %d", f.fid) - } - if vlog.numActiveIterators == 0 { - delete(vlog.filesMap, f.fid) - deleteFileNow = true - } else { - vlog.filesToBeDeleted = append(vlog.filesToBeDeleted, f.fid) - } - vlog.filesLock.Unlock() - } - - if deleteFileNow { - vlog.deleteLogFile(f) - } - - return nil -} - -func (vlog *valueLog) deleteMoveKeysFor(fid uint32, tr trace.Trace) error { - db := vlog.kv - var result []*Entry - var count, pointers uint64 - tr.LazyPrintf("Iterating over move keys to find invalids for fid: %d", fid) - err := db.View(func(txn *Txn) error { - opt := DefaultIteratorOptions - opt.internalAccess = true - opt.PrefetchValues = false - itr := txn.NewIterator(opt) - defer itr.Close() - - for itr.Seek(badgerMove); itr.ValidForPrefix(badgerMove); itr.Next() { - count++ - item := itr.Item() - if item.meta&bitValuePointer == 0 { - continue - } - pointers++ - var vp valuePointer - vp.Decode(item.vptr) - if vp.Fid == fid { - e := &Entry{Key: y.KeyWithTs(item.Key(), item.Version()), meta: bitDelete} - result = append(result, e) - } - } - return nil - }) - if err != nil { - tr.LazyPrintf("Got error while iterating move keys: %v", err) - tr.SetError() - return err - } - tr.LazyPrintf("Num total move keys: %d. Num pointers: %d", count, pointers) - tr.LazyPrintf("Number of invalid move keys found: %d", len(result)) - batchSize := 10240 - for i := 0; i < len(result); { - end := i + batchSize - if end > len(result) { - end = len(result) - } - if err := db.batchSet(result[i:end]); err != nil { - if err == ErrTxnTooBig { - batchSize /= 2 - tr.LazyPrintf("Dropped batch size to %d", batchSize) - continue - } - tr.LazyPrintf("Error while doing batchSet: %v", err) - tr.SetError() - return err - } - i += batchSize - } - tr.LazyPrintf("Move keys deletion done.") - return nil -} - -func (vlog *valueLog) incrIteratorCount() { - atomic.AddInt32(&vlog.numActiveIterators, 1) -} - -func (vlog *valueLog) decrIteratorCount() error { - num := atomic.AddInt32(&vlog.numActiveIterators, -1) - if num != 0 { - return nil - } - - vlog.filesLock.Lock() - lfs := make([]*logFile, 0, len(vlog.filesToBeDeleted)) - for _, id := range vlog.filesToBeDeleted { - lfs = append(lfs, vlog.filesMap[id]) - delete(vlog.filesMap, id) - } - vlog.filesToBeDeleted = nil - vlog.filesLock.Unlock() - - for _, lf := range lfs { - if err := vlog.deleteLogFile(lf); err != nil { - return err - } - } - return nil -} - -func (vlog *valueLog) deleteLogFile(lf *logFile) error { - path := vlog.fpath(lf.fid) - if err := lf.munmap(); err != nil { - _ = lf.fd.Close() - return err - } - if err := lf.fd.Close(); err != nil { - return err - } - return os.Remove(path) -} - -// lfDiscardStats keeps track of the amount of data that could be discarded for -// a given logfile. -type lfDiscardStats struct { - sync.Mutex - m map[uint32]int64 -} - -type valueLog struct { - buf bytes.Buffer - dirPath string - elog trace.EventLog - - // guards our view of which files exist, which to be deleted, how many active iterators - filesLock sync.RWMutex - filesMap map[uint32]*logFile - filesToBeDeleted []uint32 - // A refcount of iterators -- when this hits zero, we can delete the filesToBeDeleted. - numActiveIterators int32 - - kv *DB - maxFid uint32 // accessed via atomics. - writableLogOffset uint32 // read by read, written by write. Must access via atomics. - numEntriesWritten uint32 - opt Options - - garbageCh chan struct{} - lfDiscardStats *lfDiscardStats -} - -func vlogFilePath(dirPath string, fid uint32) string { - return fmt.Sprintf("%s%s%06d.vlog", dirPath, string(os.PathSeparator), fid) -} - -func (vlog *valueLog) fpath(fid uint32) string { - return vlogFilePath(vlog.dirPath, fid) -} - -func (vlog *valueLog) openOrCreateFiles(readOnly bool) error { - files, err := ioutil.ReadDir(vlog.dirPath) - if err != nil { - return errors.Wrapf(err, "Error while opening value log") - } - - found := make(map[uint64]struct{}) - var maxFid uint32 // Beware len(files) == 0 case, this starts at 0. - for _, file := range files { - if !strings.HasSuffix(file.Name(), ".vlog") { - continue - } - fsz := len(file.Name()) - fid, err := strconv.ParseUint(file.Name()[:fsz-5], 10, 32) - if err != nil { - return errors.Wrapf(err, "Error while parsing value log id for file: %q", file.Name()) - } - if _, ok := found[fid]; ok { - return errors.Errorf("Found the same value log file twice: %d", fid) - } - found[fid] = struct{}{} - - lf := &logFile{ - fid: uint32(fid), - path: vlog.fpath(uint32(fid)), - loadingMode: vlog.opt.ValueLogLoadingMode, - } - vlog.filesMap[uint32(fid)] = lf - if uint32(fid) > maxFid { - maxFid = uint32(fid) - } - } - vlog.maxFid = uint32(maxFid) - - // Open all previous log files as read only. Open the last log file - // as read write (unless the DB is read only). - for fid, lf := range vlog.filesMap { - if fid == maxFid { - var flags uint32 - if vlog.opt.SyncWrites { - flags |= y.Sync - } - if readOnly { - flags |= y.ReadOnly - } - if lf.fd, err = y.OpenExistingFile(vlog.fpath(fid), flags); err != nil { - return errors.Wrapf(err, "Unable to open value log file") - } - } else { - if err := lf.openReadOnly(); err != nil { - return err - } - } - } - - // If no files are found, then create a new file. - if len(vlog.filesMap) == 0 { - // We already set vlog.maxFid above - _, err := vlog.createVlogFile(0) - if err != nil { - return err - } - } - return nil -} - -func (vlog *valueLog) createVlogFile(fid uint32) (*logFile, error) { - path := vlog.fpath(fid) - lf := &logFile{fid: fid, path: path, loadingMode: vlog.opt.ValueLogLoadingMode} - // writableLogOffset is only written by write func, by read by Read func. - // To avoid a race condition, all reads and updates to this variable must be - // done via atomics. - atomic.StoreUint32(&vlog.writableLogOffset, 0) - vlog.numEntriesWritten = 0 - - var err error - if lf.fd, err = y.CreateSyncedFile(path, vlog.opt.SyncWrites); err != nil { - return nil, errors.Wrapf(err, "Unable to create value log file") - } - - if err = syncDir(vlog.dirPath); err != nil { - return nil, errors.Wrapf(err, "Unable to sync value log file dir") - } - - vlog.filesLock.Lock() - vlog.filesMap[fid] = lf - vlog.filesLock.Unlock() - - return lf, nil -} - -func (vlog *valueLog) Open(kv *DB, opt Options) error { - vlog.dirPath = opt.ValueDir - vlog.opt = opt - vlog.kv = kv - vlog.filesMap = make(map[uint32]*logFile) - if err := vlog.openOrCreateFiles(kv.opt.ReadOnly); err != nil { - return errors.Wrapf(err, "Unable to open value log") - } - - vlog.elog = trace.NewEventLog("Badger", "Valuelog") - vlog.garbageCh = make(chan struct{}, 1) // Only allow one GC at a time. - vlog.lfDiscardStats = &lfDiscardStats{m: make(map[uint32]int64)} - return nil -} - -func (vlog *valueLog) Close() error { - vlog.elog.Printf("Stopping garbage collection of values.") - defer vlog.elog.Finish() - - var err error - for id, f := range vlog.filesMap { - f.lock.Lock() // We won’t release the lock. - if munmapErr := f.munmap(); munmapErr != nil && err == nil { - err = munmapErr - } - - maxFid := atomic.LoadUint32(&vlog.maxFid) - if !vlog.opt.ReadOnly && id == maxFid { - // truncate writable log file to correct offset. - if truncErr := f.fd.Truncate( - int64(vlog.woffset())); truncErr != nil && err == nil { - err = truncErr - } - } - - if closeErr := f.fd.Close(); closeErr != nil && err == nil { - err = closeErr - } - } - return err -} - -// sortedFids returns the file id's not pending deletion, sorted. Assumes we have shared access to -// filesMap. -func (vlog *valueLog) sortedFids() []uint32 { - toBeDeleted := make(map[uint32]struct{}) - for _, fid := range vlog.filesToBeDeleted { - toBeDeleted[fid] = struct{}{} - } - ret := make([]uint32, 0, len(vlog.filesMap)) - for fid := range vlog.filesMap { - if _, ok := toBeDeleted[fid]; !ok { - ret = append(ret, fid) - } - } - sort.Slice(ret, func(i, j int) bool { - return ret[i] < ret[j] - }) - return ret -} - -// Replay replays the value log. The kv provided is only valid for the lifetime of function call. -func (vlog *valueLog) Replay(ptr valuePointer, fn logEntry) error { - fid := ptr.Fid - offset := ptr.Offset + ptr.Len - vlog.elog.Printf("Seeking at value pointer: %+v\n", ptr) - - fids := vlog.sortedFids() - - for _, id := range fids { - if id < fid { - continue - } - of := offset - if id > fid { - of = 0 - } - lf := vlog.filesMap[id] - vlog.elog.Printf("Iterating file id: %d", id) - now := time.Now() - fi, err := lf.fd.Stat() - if err != nil { - return err - } - validEndOffset, err := vlog.iterate(lf, of, fn) - if err != nil { - return errors.Wrapf(err, "Unable to replay value log: %q", lf.path) - } - if int64(validEndOffset) != fi.Size() { - y.AssertTrue(int64(validEndOffset) <= fi.Size()) - switch { - case !vlog.opt.Truncate: - return ErrTruncateNeeded - case len(lf.fmap) > 0: - // Only truncate if the file isn't mmaped. Otherwise, Windows would puke. - return ErrTruncateNeeded - default: - if err := lf.fd.Truncate(int64(validEndOffset)); err != nil { - return errors.Wrapf(err, "Unable to truncate file: %q", lf.path) - } - } - } - vlog.elog.Printf("Iteration took: %s\n", time.Since(now)) - if err != nil { - return errors.Wrapf(err, "Unable to replay value log: %q", lf.path) - } - } - - // Seek to the end to start writing. - var err error - last := vlog.filesMap[vlog.maxFid] - lastOffset, err := last.fd.Seek(0, io.SeekEnd) - atomic.AddUint32(&vlog.writableLogOffset, uint32(lastOffset)) - return errors.Wrapf(err, "Unable to seek to end of value log: %q", last.path) -} - -type request struct { - // Input values - Entries []*Entry - // Output values and wait group stuff below - Ptrs []valuePointer - Wg sync.WaitGroup - Err error -} - -func (req *request) Wait() error { - req.Wg.Wait() - req.Entries = nil - err := req.Err - requestPool.Put(req) - return err -} - -// sync is thread-unsafe and should not be called concurrently with write. -func (vlog *valueLog) sync() error { - if vlog.opt.SyncWrites { - return nil - } - - vlog.filesLock.RLock() - if len(vlog.filesMap) == 0 { - vlog.filesLock.RUnlock() - return nil - } - maxFid := atomic.LoadUint32(&vlog.maxFid) - curlf := vlog.filesMap[maxFid] - curlf.lock.RLock() - vlog.filesLock.RUnlock() - - dirSyncCh := make(chan error) - go func() { dirSyncCh <- syncDir(vlog.opt.ValueDir) }() - err := curlf.sync() - curlf.lock.RUnlock() - dirSyncErr := <-dirSyncCh - if err != nil { - err = dirSyncErr - } - return err -} - -func (vlog *valueLog) woffset() uint32 { - return atomic.LoadUint32(&vlog.writableLogOffset) -} - -// write is thread-unsafe by design and should not be called concurrently. -func (vlog *valueLog) write(reqs []*request) error { - vlog.filesLock.RLock() - maxFid := atomic.LoadUint32(&vlog.maxFid) - curlf := vlog.filesMap[maxFid] - vlog.filesLock.RUnlock() - - toDisk := func() error { - if vlog.buf.Len() == 0 { - return nil - } - vlog.elog.Printf("Flushing %d blocks of total size: %d", len(reqs), vlog.buf.Len()) - n, err := curlf.fd.Write(vlog.buf.Bytes()) - if err != nil { - return errors.Wrapf(err, "Unable to write to value log file: %q", curlf.path) - } - y.NumWrites.Add(1) - y.NumBytesWritten.Add(int64(n)) - vlog.elog.Printf("Done") - atomic.AddUint32(&vlog.writableLogOffset, uint32(n)) - vlog.buf.Reset() - - if vlog.woffset() > uint32(vlog.opt.ValueLogFileSize) || - vlog.numEntriesWritten > vlog.opt.ValueLogMaxEntries { - var err error - if err = curlf.doneWriting(vlog.writableLogOffset); err != nil { - return err - } - - newid := atomic.AddUint32(&vlog.maxFid, 1) - y.AssertTruef(newid > 0, "newid has overflown uint32: %v", newid) - newlf, err := vlog.createVlogFile(newid) - if err != nil { - return err - } - - if err = newlf.mmap(2 * vlog.opt.ValueLogFileSize); err != nil { - return err - } - - curlf = newlf - } - return nil - } - - for i := range reqs { - b := reqs[i] - b.Ptrs = b.Ptrs[:0] - for j := range b.Entries { - e := b.Entries[j] - var p valuePointer - - p.Fid = curlf.fid - // Use the offset including buffer length so far. - p.Offset = vlog.woffset() + uint32(vlog.buf.Len()) - plen, err := encodeEntry(e, &vlog.buf) // Now encode the entry into buffer. - if err != nil { - return err - } - p.Len = uint32(plen) - b.Ptrs = append(b.Ptrs, p) - } - vlog.numEntriesWritten += uint32(len(b.Entries)) - // We write to disk here so that all entries that are part of the same transaction are - // written to the same vlog file. - writeNow := - vlog.woffset()+uint32(vlog.buf.Len()) > uint32(vlog.opt.ValueLogFileSize) || - vlog.numEntriesWritten > uint32(vlog.opt.ValueLogMaxEntries) - if writeNow { - if err := toDisk(); err != nil { - return err - } - } - } - return toDisk() - - // Acquire mutex locks around this manipulation, so that the reads don't try to use - // an invalid file descriptor. -} - -// Gets the logFile and acquires and RLock() for the mmap. You must call RUnlock on the file -// (if non-nil) -func (vlog *valueLog) getFileRLocked(fid uint32) (*logFile, error) { - vlog.filesLock.RLock() - defer vlog.filesLock.RUnlock() - ret, ok := vlog.filesMap[fid] - if !ok { - // log file has gone away, will need to retry the operation. - return nil, ErrRetry - } - ret.lock.RLock() - return ret, nil -} - -// Read reads the value log at a given location. -// TODO: Make this read private. -func (vlog *valueLog) Read(vp valuePointer, s *y.Slice) ([]byte, func(), error) { - // Check for valid offset if we are reading to writable log. - maxFid := atomic.LoadUint32(&vlog.maxFid) - if vp.Fid == maxFid && vp.Offset >= vlog.woffset() { - return nil, nil, errors.Errorf( - "Invalid value pointer offset: %d greater than current offset: %d", - vp.Offset, vlog.woffset()) - } - - buf, cb, err := vlog.readValueBytes(vp, s) - if err != nil { - return nil, cb, err - } - var h header - h.Decode(buf) - n := uint32(headerBufSize) + h.klen - return buf[n : n+h.vlen], cb, nil -} - -func (vlog *valueLog) readValueBytes(vp valuePointer, s *y.Slice) ([]byte, func(), error) { - lf, err := vlog.getFileRLocked(vp.Fid) - if err != nil { - return nil, nil, err - } - - buf, err := lf.read(vp, s) - if vlog.opt.ValueLogLoadingMode == options.MemoryMap { - return buf, lf.lock.RUnlock, err - } - // If we are using File I/O we unlock the file immediately - // and return an empty function as callback. - lf.lock.RUnlock() - return buf, nil, err -} - -// Test helper -func valueBytesToEntry(buf []byte) (e Entry) { - var h header - h.Decode(buf) - n := uint32(headerBufSize) - - e.Key = buf[n : n+h.klen] - n += h.klen - e.meta = h.meta - e.UserMeta = h.userMeta - e.Value = buf[n : n+h.vlen] - return -} - -func (vlog *valueLog) pickLog(head valuePointer, tr trace.Trace) (files []*logFile) { - vlog.filesLock.RLock() - defer vlog.filesLock.RUnlock() - fids := vlog.sortedFids() - if len(fids) <= 1 { - tr.LazyPrintf("Only one or less value log file.") - return nil - } else if head.Fid == 0 { - tr.LazyPrintf("Head pointer is at zero.") - return nil - } - - // Pick a candidate that contains the largest amount of discardable data - candidate := struct { - fid uint32 - discard int64 - }{math.MaxUint32, 0} - vlog.lfDiscardStats.Lock() - for _, fid := range fids { - if fid >= head.Fid { - break - } - if vlog.lfDiscardStats.m[fid] > candidate.discard { - candidate.fid = fid - candidate.discard = vlog.lfDiscardStats.m[fid] - } - } - vlog.lfDiscardStats.Unlock() - - if candidate.fid != math.MaxUint32 { // Found a candidate - tr.LazyPrintf("Found candidate via discard stats: %v", candidate) - files = append(files, vlog.filesMap[candidate.fid]) - } else { - tr.LazyPrintf("Could not find candidate via discard stats. Randomly picking one.") - } - - // Fallback to randomly picking a log file - var idxHead int - for i, fid := range fids { - if fid == head.Fid { - idxHead = i - break - } - } - if idxHead == 0 { // Not found or first file - tr.LazyPrintf("Could not find any file.") - return nil - } - idx := rand.Intn(idxHead) // Don’t include head.Fid. We pick a random file before it. - if idx > 0 { - idx = rand.Intn(idx + 1) // Another level of rand to favor smaller fids. - } - tr.LazyPrintf("Randomly chose fid: %d", fids[idx]) - files = append(files, vlog.filesMap[fids[idx]]) - return files -} - -func discardEntry(e Entry, vs y.ValueStruct) bool { - if vs.Version != y.ParseTs(e.Key) { - // Version not found. Discard. - return true - } - if isDeletedOrExpired(vs.Meta, vs.ExpiresAt) { - return true - } - if (vs.Meta & bitValuePointer) == 0 { - // Key also stores the value in LSM. Discard. - return true - } - if (vs.Meta & bitFinTxn) > 0 { - // Just a txn finish entry. Discard. - return true - } - return false -} - -func (vlog *valueLog) doRunGC(lf *logFile, discardRatio float64, tr trace.Trace) (err error) { - // Update stats before exiting - defer func() { - if err == nil { - vlog.lfDiscardStats.Lock() - delete(vlog.lfDiscardStats.m, lf.fid) - vlog.lfDiscardStats.Unlock() - } - }() - - type reason struct { - total float64 - discard float64 - count int - } - - fi, err := lf.fd.Stat() - if err != nil { - tr.LazyPrintf("Error while finding file size: %v", err) - tr.SetError() - return err - } - - // Set up the sampling window sizes. - sizeWindow := float64(fi.Size()) * 0.1 // 10% of the file as window. - countWindow := int(float64(vlog.opt.ValueLogMaxEntries) * 0.01) // 1% of num entries. - tr.LazyPrintf("Size window: %5.2f. Count window: %d.", sizeWindow, countWindow) - - // Pick a random start point for the log. - skipFirstM := float64(rand.Int63n(fi.Size())) // Pick a random starting location. - skipFirstM -= sizeWindow // Avoid hitting EOF by moving back by window. - skipFirstM /= float64(mi) // Convert to MBs. - tr.LazyPrintf("Skip first %5.2f MB of file of size: %d MB", skipFirstM, fi.Size()/mi) - var skipped float64 - - var r reason - start := time.Now() - y.AssertTrue(vlog.kv != nil) - s := new(y.Slice) - var numIterations int - _, err = vlog.iterate(lf, 0, func(e Entry, vp valuePointer) error { - numIterations++ - esz := float64(vp.Len) / (1 << 20) // in MBs. - if skipped < skipFirstM { - skipped += esz - return nil - } - - // Sample until we reach the window sizes or exceed 10 seconds. - if r.count > countWindow { - tr.LazyPrintf("Stopping sampling after %d entries.", countWindow) - return errStop - } - if r.total > sizeWindow { - tr.LazyPrintf("Stopping sampling after reaching window size.") - return errStop - } - if time.Since(start) > 10*time.Second { - tr.LazyPrintf("Stopping sampling after 10 seconds.") - return errStop - } - r.total += esz - r.count++ - - vs, err := vlog.kv.get(e.Key) - if err != nil { - return err - } - if discardEntry(e, vs) { - r.discard += esz - return nil - } - - // Value is still present in value log. - y.AssertTrue(len(vs.Value) > 0) - vp.Decode(vs.Value) - - if vp.Fid > lf.fid { - // Value is present in a later log. Discard. - r.discard += esz - return nil - } - if vp.Offset > e.offset { - // Value is present in a later offset, but in the same log. - r.discard += esz - return nil - } - if vp.Fid == lf.fid && vp.Offset == e.offset { - // This is still the active entry. This would need to be rewritten. - - } else { - vlog.elog.Printf("Reason=%+v\n", r) - - buf, cb, err := vlog.readValueBytes(vp, s) - if err != nil { - return errStop - } - ne := valueBytesToEntry(buf) - ne.offset = vp.Offset - ne.print("Latest Entry Header in LSM") - e.print("Latest Entry in Log") - runCallback(cb) - return errors.Errorf("This shouldn't happen. Latest Pointer:%+v. Meta:%v.", - vp, vs.Meta) - } - return nil - }) - - if err != nil { - tr.LazyPrintf("Error while iterating for RunGC: %v", err) - tr.SetError() - return err - } - tr.LazyPrintf("Fid: %d. Skipped: %5.2fMB Num iterations: %d. Data status=%+v\n", - lf.fid, skipped, numIterations, r) - - // If we couldn't sample at least a 1000 KV pairs or at least 75% of the window size, - // and what we can discard is below the threshold, we should skip the rewrite. - if (r.count < countWindow && r.total < sizeWindow*0.75) || r.discard < discardRatio*r.total { - tr.LazyPrintf("Skipping GC on fid: %d", lf.fid) - return ErrNoRewrite - } - if err = vlog.rewrite(lf, tr); err != nil { - return err - } - tr.LazyPrintf("Done rewriting.") - return nil -} - -func (vlog *valueLog) waitOnGC(lc *y.Closer) { - defer lc.Done() - - <-lc.HasBeenClosed() // Wait for lc to be closed. - - // Block any GC in progress to finish, and don't allow any more writes to runGC by filling up - // the channel of size 1. - vlog.garbageCh <- struct{}{} -} - -func (vlog *valueLog) runGC(discardRatio float64, head valuePointer) error { - select { - case vlog.garbageCh <- struct{}{}: - // Pick a log file for GC. - tr := trace.New("Badger.ValueLog", "GC") - tr.SetMaxEvents(100) - defer func() { - tr.Finish() - <-vlog.garbageCh - }() - - var err error - files := vlog.pickLog(head, tr) - if len(files) == 0 { - tr.LazyPrintf("PickLog returned zero results.") - return ErrNoRewrite - } - tried := make(map[uint32]bool) - for _, lf := range files { - if _, done := tried[lf.fid]; done { - continue - } - tried[lf.fid] = true - err = vlog.doRunGC(lf, discardRatio, tr) - if err == nil { - return vlog.deleteMoveKeysFor(lf.fid, tr) - } - } - return err - default: - return ErrRejected - } -} - -func (vlog *valueLog) updateGCStats(stats map[uint32]int64) { - vlog.lfDiscardStats.Lock() - for fid, sz := range stats { - vlog.lfDiscardStats.m[fid] += sz - } - vlog.lfDiscardStats.Unlock() -} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/.travis.yml b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/.travis.yml new file mode 100644 index 0000000000..c9285beae0 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/LICENSE b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr/LICENSE rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/LICENSE diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/Makefile b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/Makefile similarity index 100% rename from vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/Makefile rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/Makefile diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/README.md b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/README.md new file mode 100644 index 0000000000..548af69dbb --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/README.md @@ -0,0 +1,37 @@ +go-libp2p-circuit +================== + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](https://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23libp2p) +[![Coverage Status](https://img.shields.io/codecov/c/github/libp2p/go-libp2p-circuit.svg?style=flat-square&branch=master)](https://codecov.io/github/libp2p/go-libp2p-circuit?branch=master) +[![Travis CI](https://travis-ci.org/libp2p/go-libp2p-circuit.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-circuit) + +> The libp2p relay allows peers to relay connections on behalf of others. + + +## Table of Contents + +- [Install](#install) +- [Contribute](#contribute) +- [License](#license) + +## Install + +```sh +go get -u github.com/libp2p/go-libp2p-circuit +``` + +## Usage + +Refer to the [relay example](https://github.com/libp2p/go-libp2p-examples/tree/master/relay) in the `go-libp2p-examples` repository for usage instructions. + +## Contribute + +PRs are welcome! + +Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +MIT © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/codecov.yml b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/codecov.yml rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/codecov.yml diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/conn.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/conn.go new file mode 100644 index 0000000000..069b14387b --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/conn.go @@ -0,0 +1,59 @@ +package relay + +import ( + "fmt" + "net" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +type Conn struct { + inet.Stream + remote pstore.PeerInfo +} + +type NetAddr struct { + Relay string + Remote string +} + +func (n *NetAddr) Network() string { + return "libp2p-circuit-relay" +} + +func (n *NetAddr) String() string { + return fmt.Sprintf("relay[%s-%s]", n.Remote, n.Relay) +} + +func (c *Conn) RemoteAddr() net.Addr { + return &NetAddr{ + Relay: c.Conn().RemotePeer().Pretty(), + Remote: c.remote.ID.Pretty(), + } +} + +// TODO: is it okay to cast c.Conn().RemotePeer() into a multiaddr? might be "user input" +func (c *Conn) RemoteMultiaddr() ma.Multiaddr { + proto := ma.ProtocolWithCode(ma.P_P2P).Name + peerid := c.Conn().RemotePeer().Pretty() + p2paddr := ma.StringCast(fmt.Sprintf("/%s/%s", proto, peerid)) + + circaddr := ma.Cast(ma.CodeToVarint(P_CIRCUIT)) + return p2paddr.Encapsulate(circaddr) +} + +func (c *Conn) LocalMultiaddr() ma.Multiaddr { + return c.Conn().LocalMultiaddr() +} + +func (c *Conn) LocalAddr() net.Addr { + na, err := manet.ToNetAddr(c.Conn().LocalMultiaddr()) + if err != nil { + log.Error("failed to convert local multiaddr to net addr:", err) + return nil + } + return na +} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/dial.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/dial.go new file mode 100644 index 0000000000..a1dde9a695 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/dial.go @@ -0,0 +1,89 @@ +package relay + +import ( + "context" + "fmt" + "math/rand" + + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +func (d *RelayTransport) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (tpt.Conn, error) { + c, err := d.Relay().Dial(ctx, a, p) + if err != nil { + return nil, err + } + return d.upgrader.UpgradeOutbound(ctx, d, c, p) +} + +func (r *Relay) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (*Conn, error) { + if !r.Matches(a) { + return nil, fmt.Errorf("%s is not a relay address", a) + } + parts := ma.Split(a) + + spl := ma.Cast(ma.CodeToVarint(P_CIRCUIT)) + + var relayaddr, destaddr ma.Multiaddr + for i, p := range parts { + if p.Equal(spl) { + relayaddr = ma.Join(parts[:i]...) + destaddr = ma.Join(parts[i+1:]...) + break + } + } + + dinfo := &pstore.PeerInfo{ID: p, Addrs: []ma.Multiaddr{}} + if len(destaddr.Bytes()) > 0 { + dinfo.Addrs = append(dinfo.Addrs, destaddr) + } + + if len(relayaddr.Bytes()) == 0 { + // unspecific relay address, try dialing using known hop relays + return r.tryDialRelays(ctx, *dinfo) + } + + var rinfo *pstore.PeerInfo + rinfo, err := pstore.InfoFromP2pAddr(relayaddr) + if err != nil { + return nil, fmt.Errorf("error parsing multiaddr '%s': %s", relayaddr.String(), err) + } + + return r.DialPeer(ctx, *rinfo, *dinfo) +} + +func (r *Relay) tryDialRelays(ctx context.Context, dinfo pstore.PeerInfo) (*Conn, error) { + var relays []peer.ID + r.mx.Lock() + for p := range r.relays { + relays = append(relays, p) + } + r.mx.Unlock() + + // shuffle list of relays, avoid overloading a specific relay + for i := range relays { + j := rand.Intn(i + 1) + relays[i], relays[j] = relays[j], relays[i] + } + + for _, relay := range relays { + if len(r.host.Network().ConnsToPeer(relay)) == 0 { + continue + } + + rctx, cancel := context.WithTimeout(ctx, HopConnectTimeout) + c, err := r.DialPeer(rctx, pstore.PeerInfo{ID: relay}, dinfo) + cancel() + + if err == nil { + return c, nil + } + + log.Debugf("error opening relay connection through %s: %s", dinfo.ID, err.Error()) + } + + return nil, fmt.Errorf("Failed to dial through %d known relay hosts", len(relays)) +} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/listen.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/listen.go new file mode 100644 index 0000000000..a4ab91bc1b --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/listen.go @@ -0,0 +1,58 @@ +package relay + +import ( + "net" + + pb "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +var _ manet.Listener = (*RelayListener)(nil) + +type RelayListener Relay + +func (l *RelayListener) Relay() *Relay { + return (*Relay)(l) +} + +func (r *Relay) Listener() *RelayListener { + // TODO: Only allow one! + return (*RelayListener)(r) +} + +func (l *RelayListener) Accept() (manet.Conn, error) { + select { + case c := <-l.incoming: + err := l.Relay().writeResponse(c.Stream, pb.CircuitRelay_SUCCESS) + if err != nil { + log.Debugf("error writing relay response: %s", err.Error()) + c.Stream.Reset() + return nil, err + } + + // TODO: Pretty print. + log.Infof("accepted relay connection: %q", c) + + return c, nil + case <-l.ctx.Done(): + return nil, l.ctx.Err() + } +} + +func (l *RelayListener) Addr() net.Addr { + return &NetAddr{ + Relay: "any", + Remote: "any", + } +} + +func (l *RelayListener) Multiaddr() ma.Multiaddr { + return ma.Cast(ma.CodeToVarint(P_CIRCUIT)) +} + +func (l *RelayListener) Close() error { + // TODO: noop? + return nil +} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/notify.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/notify.go new file mode 100644 index 0000000000..11b70add46 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/notify.go @@ -0,0 +1,54 @@ +package relay + +import ( + "context" + "time" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +var _ inet.Notifiee = (*RelayNotifiee)(nil) + +type RelayNotifiee Relay + +func (r *Relay) Notifiee() inet.Notifiee { + return (*RelayNotifiee)(r) +} + +func (n *RelayNotifiee) Relay() *Relay { + return (*Relay)(n) +} + +func (n *RelayNotifiee) Listen(net inet.Network, a ma.Multiaddr) {} +func (n *RelayNotifiee) ListenClose(net inet.Network, a ma.Multiaddr) {} +func (n *RelayNotifiee) OpenedStream(net inet.Network, s inet.Stream) {} +func (n *RelayNotifiee) ClosedStream(net inet.Network, s inet.Stream) {} + +func (n *RelayNotifiee) Connected(s inet.Network, c inet.Conn) { + if n.Relay().Matches(c.RemoteMultiaddr()) { + return + } + + go func(id peer.ID) { + ctx, cancel := context.WithTimeout(n.ctx, time.Second) + defer cancel() + + canhop, err := n.Relay().CanHop(ctx, id) + if err != nil { + log.Debugf("Error testing relay hop: %s", err.Error()) + return + } + + if canhop { + log.Debugf("Discovered hop relay %s", id.Pretty()) + n.mx.Lock() + n.relays[id] = struct{}{} + n.mx.Unlock() + n.host.ConnManager().TagPeer(id, "relay-hop", 2) + } + }(c.RemotePeer()) +} + +func (n *RelayNotifiee) Disconnected(s inet.Network, c inet.Conn) {} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/package.json b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/package.json new file mode 100644 index 0000000000..fd712f9c28 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/package.json @@ -0,0 +1,89 @@ +{ + "author": "vyzo", + "bugs": { + "url": "github.com/libp2p/go-libp2p-circuit" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-circuit" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-circuit", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.3.14" +} + diff --git a/vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/Makefile b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG/go-libp2p-pubsub/pb/Makefile rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/Makefile diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/relay.pb.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/relay.pb.go similarity index 92% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/relay.pb.go rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/relay.pb.go index cac0166dd6..095745d49a 100644 --- a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/relay.pb.go +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/relay.pb.go @@ -3,13 +3,13 @@ package relay_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import github_com_gogo_protobuf_proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - -import io "io" +import ( + fmt "fmt" + github_com_gogo_protobuf_proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -61,6 +61,7 @@ var CircuitRelay_Status_name = map[int32]string{ 390: "STOP_RELAY_REFUSED", 400: "MALFORMED_MESSAGE", } + var CircuitRelay_Status_value = map[string]int32{ "SUCCESS": 100, "HOP_SRC_ADDR_TOO_LONG": 220, @@ -85,9 +86,11 @@ func (x CircuitRelay_Status) Enum() *CircuitRelay_Status { *p = x return p } + func (x CircuitRelay_Status) String() string { return proto.EnumName(CircuitRelay_Status_name, int32(x)) } + func (x *CircuitRelay_Status) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(CircuitRelay_Status_value, data, "CircuitRelay_Status") if err != nil { @@ -96,8 +99,9 @@ func (x *CircuitRelay_Status) UnmarshalJSON(data []byte) error { *x = CircuitRelay_Status(value) return nil } + func (CircuitRelay_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_relay_cd6009b961688bf5, []int{0, 0} + return fileDescriptor_9f69a7d5a802d584, []int{0, 0} } type CircuitRelay_Type int32 @@ -115,6 +119,7 @@ var CircuitRelay_Type_name = map[int32]string{ 3: "STATUS", 4: "CAN_HOP", } + var CircuitRelay_Type_value = map[string]int32{ "HOP": 1, "STOP": 2, @@ -127,9 +132,11 @@ func (x CircuitRelay_Type) Enum() *CircuitRelay_Type { *p = x return p } + func (x CircuitRelay_Type) String() string { return proto.EnumName(CircuitRelay_Type_name, int32(x)) } + func (x *CircuitRelay_Type) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(CircuitRelay_Type_value, data, "CircuitRelay_Type") if err != nil { @@ -138,8 +145,9 @@ func (x *CircuitRelay_Type) UnmarshalJSON(data []byte) error { *x = CircuitRelay_Type(value) return nil } + func (CircuitRelay_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_relay_cd6009b961688bf5, []int{0, 1} + return fileDescriptor_9f69a7d5a802d584, []int{0, 1} } type CircuitRelay struct { @@ -156,7 +164,7 @@ func (m *CircuitRelay) Reset() { *m = CircuitRelay{} } func (m *CircuitRelay) String() string { return proto.CompactTextString(m) } func (*CircuitRelay) ProtoMessage() {} func (*CircuitRelay) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_cd6009b961688bf5, []int{0} + return fileDescriptor_9f69a7d5a802d584, []int{0} } func (m *CircuitRelay) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -173,8 +181,8 @@ func (m *CircuitRelay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *CircuitRelay) XXX_Merge(src proto.Message) { - xxx_messageInfo_CircuitRelay.Merge(dst, src) +func (m *CircuitRelay) XXX_Merge(src proto.Message) { + xxx_messageInfo_CircuitRelay.Merge(m, src) } func (m *CircuitRelay) XXX_Size() int { return m.Size() @@ -225,7 +233,7 @@ func (m *CircuitRelay_Peer) Reset() { *m = CircuitRelay_Peer{} } func (m *CircuitRelay_Peer) String() string { return proto.CompactTextString(m) } func (*CircuitRelay_Peer) ProtoMessage() {} func (*CircuitRelay_Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_cd6009b961688bf5, []int{0, 0} + return fileDescriptor_9f69a7d5a802d584, []int{0, 0} } func (m *CircuitRelay_Peer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,8 +250,8 @@ func (m *CircuitRelay_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (dst *CircuitRelay_Peer) XXX_Merge(src proto.Message) { - xxx_messageInfo_CircuitRelay_Peer.Merge(dst, src) +func (m *CircuitRelay_Peer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CircuitRelay_Peer.Merge(m, src) } func (m *CircuitRelay_Peer) XXX_Size() int { return m.Size() @@ -269,11 +277,48 @@ func (m *CircuitRelay_Peer) GetAddrs() [][]byte { } func init() { - proto.RegisterType((*CircuitRelay)(nil), "relay.pb.CircuitRelay") - proto.RegisterType((*CircuitRelay_Peer)(nil), "relay.pb.CircuitRelay.Peer") proto.RegisterEnum("relay.pb.CircuitRelay_Status", CircuitRelay_Status_name, CircuitRelay_Status_value) proto.RegisterEnum("relay.pb.CircuitRelay_Type", CircuitRelay_Type_name, CircuitRelay_Type_value) + proto.RegisterType((*CircuitRelay)(nil), "relay.pb.CircuitRelay") + proto.RegisterType((*CircuitRelay_Peer)(nil), "relay.pb.CircuitRelay.Peer") } + +func init() { proto.RegisterFile("relay.proto", fileDescriptor_9f69a7d5a802d584) } + +var fileDescriptor_9f69a7d5a802d584 = []byte{ + // 473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x6f, 0xd3, 0x3e, + 0x18, 0xc7, 0x65, 0x27, 0xbf, 0x76, 0x7a, 0x5a, 0x4d, 0xfe, 0x59, 0x63, 0x64, 0x9d, 0x56, 0xaa, + 0x9e, 0x7a, 0x40, 0x45, 0x4c, 0xe2, 0x05, 0x98, 0xc4, 0xdd, 0x2a, 0xd2, 0x38, 0xb2, 0x5d, 0x24, + 0x4e, 0x56, 0x69, 0x72, 0xa8, 0x84, 0xd4, 0x2a, 0xcd, 0x0e, 0xbd, 0xc3, 0xb8, 0x21, 0x8e, 0xbc, + 0x1c, 0xe0, 0xc4, 0x91, 0x17, 0xc0, 0x3f, 0xf5, 0x65, 0xc0, 0x05, 0xd9, 0x5d, 0x33, 0x44, 0x37, + 0x89, 0xa3, 0x9f, 0xef, 0xe7, 0xe3, 0x3c, 0xf9, 0x26, 0xd0, 0x28, 0xf2, 0x17, 0x93, 0x55, 0x7f, + 0x51, 0xcc, 0xcb, 0x39, 0xdd, 0xbb, 0x3a, 0x3c, 0xef, 0xbe, 0xae, 0x41, 0x33, 0x9c, 0x15, 0xd3, + 0x8b, 0x59, 0x29, 0xed, 0x8c, 0x3e, 0x00, 0xbf, 0x5c, 0x2d, 0xf2, 0x00, 0x75, 0x50, 0x6f, 0xff, + 0xf4, 0xb8, 0xbf, 0x25, 0xfb, 0x7f, 0x52, 0x7d, 0xbd, 0x5a, 0xe4, 0xd2, 0x81, 0xf4, 0x11, 0xd4, + 0x97, 0xc5, 0x34, 0xcd, 0xf3, 0x22, 0xc0, 0x1d, 0xd4, 0x6b, 0xdc, 0xea, 0x58, 0x44, 0x6e, 0x59, + 0xab, 0x65, 0xcb, 0xd2, 0x69, 0xde, 0x3f, 0x68, 0x57, 0x2c, 0x7d, 0x08, 0xfe, 0x74, 0x9e, 0xe5, + 0x81, 0xef, 0xd6, 0x3b, 0xb9, 0xc5, 0x51, 0xe5, 0xa4, 0xbc, 0x58, 0x4a, 0x87, 0xb6, 0xee, 0x83, + 0xef, 0xd4, 0x7d, 0xc0, 0xb3, 0x2c, 0x40, 0x1d, 0xdc, 0x6b, 0x4a, 0x3c, 0xcb, 0xe8, 0x01, 0xfc, + 0x37, 0xc9, 0xb2, 0x62, 0x19, 0xe0, 0x8e, 0xd7, 0x6b, 0xca, 0xcd, 0xa1, 0xfb, 0xd1, 0x83, 0xda, + 0x46, 0xa7, 0x0d, 0xa8, 0xab, 0x71, 0x18, 0x72, 0xa5, 0x48, 0x46, 0x5b, 0x70, 0xe7, 0x5c, 0xa4, + 0x46, 0xc9, 0xd0, 0xb0, 0x28, 0x92, 0x46, 0x0b, 0x61, 0x62, 0x91, 0x9c, 0x91, 0x2f, 0x68, 0x9b, + 0x45, 0x4a, 0xff, 0x95, 0x7d, 0x45, 0xb4, 0x0d, 0x47, 0x5b, 0x6f, 0x34, 0x8e, 0xf5, 0xd0, 0x01, + 0xc3, 0xe4, 0x29, 0x8b, 0x87, 0x11, 0xf9, 0x59, 0xe5, 0xd6, 0xdd, 0xcd, 0x7f, 0x21, 0x7a, 0x17, + 0xa8, 0xcd, 0x13, 0x61, 0x42, 0x91, 0x24, 0x46, 0x0b, 0x8b, 0x92, 0x97, 0x98, 0x1e, 0xc2, 0xff, + 0x36, 0x08, 0x59, 0xa2, 0x4d, 0x34, 0x64, 0xb1, 0x9b, 0xbf, 0xc2, 0xf4, 0x04, 0x82, 0x6a, 0x2e, + 0x52, 0x9e, 0xb8, 0xab, 0x95, 0x96, 0x9c, 0x8d, 0xc8, 0x25, 0xa6, 0x47, 0x70, 0x50, 0xc5, 0x2a, + 0xe5, 0xec, 0x89, 0x91, 0x3c, 0x66, 0xcf, 0xc8, 0x1b, 0x4c, 0x8f, 0xe1, 0xb0, 0x8a, 0xdc, 0xd0, + 0x3e, 0x4d, 0xf1, 0x78, 0x40, 0xde, 0xb9, 0x50, 0xe9, 0x1b, 0x0b, 0x78, 0x7f, 0x1d, 0xee, 0x36, + 0xf0, 0x01, 0xd3, 0x7b, 0xd0, 0xaa, 0xcc, 0xdd, 0x57, 0xfc, 0x76, 0x0d, 0xdc, 0xdc, 0xc1, 0x77, + 0x6c, 0x3b, 0x70, 0xc0, 0x66, 0x29, 0xc9, 0x07, 0x63, 0xc5, 0x23, 0x72, 0xe9, 0xd9, 0x0e, 0x46, + 0x2c, 0x1e, 0x08, 0x39, 0xe2, 0x91, 0x19, 0x71, 0xa5, 0xd8, 0x19, 0x27, 0x6f, 0xbd, 0xee, 0x29, + 0xf8, 0xf6, 0x0f, 0xa5, 0x75, 0xf0, 0xce, 0x45, 0x4a, 0x10, 0xdd, 0x03, 0xdf, 0xde, 0x40, 0x30, + 0x05, 0xa8, 0x29, 0xcd, 0xf4, 0x58, 0x11, 0xcf, 0x7e, 0xe0, 0x90, 0x25, 0xc6, 0x22, 0xfe, 0xe3, + 0xe6, 0xa7, 0x75, 0x1b, 0x7d, 0x5e, 0xb7, 0xd1, 0x8f, 0x75, 0x1b, 0xfd, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0x6b, 0x22, 0x33, 0xbb, 0x2f, 0x03, 0x00, 0x00, +} + func (m *CircuitRelay) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -372,6 +417,9 @@ func encodeVarintRelay(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *CircuitRelay) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != nil { @@ -395,6 +443,9 @@ func (m *CircuitRelay) Size() (n int) { } func (m *CircuitRelay_Peer) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Id != nil { @@ -441,7 +492,7 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -469,7 +520,7 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (CircuitRelay_Type(b) & 0x7F) << shift + v |= CircuitRelay_Type(b&0x7F) << shift if b < 0x80 { break } @@ -489,7 +540,7 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -498,6 +549,9 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRelay } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -522,7 +576,7 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -531,6 +585,9 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRelay } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -555,7 +612,7 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (CircuitRelay_Status(b) & 0x7F) << shift + v |= CircuitRelay_Status(b&0x7F) << shift if b < 0x80 { break } @@ -570,6 +627,9 @@ func (m *CircuitRelay) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRelay } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRelay + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -599,7 +659,7 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -627,7 +687,7 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -636,6 +696,9 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRelay } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -659,7 +722,7 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -668,6 +731,9 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRelay } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -683,6 +749,9 @@ func (m *CircuitRelay_Peer) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthRelay } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRelay + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -753,10 +822,13 @@ func skipRelay(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthRelay } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthRelay + } return iNdEx, nil case 3: for { @@ -785,6 +857,9 @@ func skipRelay(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthRelay + } } return iNdEx, nil case 4: @@ -803,39 +878,3 @@ var ( ErrInvalidLengthRelay = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRelay = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("relay.proto", fileDescriptor_relay_cd6009b961688bf5) } - -var fileDescriptor_relay_cd6009b961688bf5 = []byte{ - // 473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x6f, 0xd3, 0x3e, - 0x18, 0xc7, 0x65, 0x27, 0xbf, 0x76, 0x7a, 0x5a, 0x4d, 0xfe, 0x59, 0x63, 0x64, 0x9d, 0x56, 0xaa, - 0x9e, 0x7a, 0x40, 0x45, 0x4c, 0xe2, 0x05, 0x98, 0xc4, 0xdd, 0x2a, 0xd2, 0x38, 0xb2, 0x5d, 0x24, - 0x4e, 0x56, 0x69, 0x72, 0xa8, 0x84, 0xd4, 0x2a, 0xcd, 0x0e, 0xbd, 0xc3, 0xb8, 0x21, 0x8e, 0xbc, - 0x1c, 0xe0, 0xc4, 0x91, 0x17, 0xc0, 0x3f, 0xf5, 0x65, 0xc0, 0x05, 0xd9, 0x5d, 0x33, 0x44, 0x37, - 0x89, 0xa3, 0x9f, 0xef, 0xe7, 0xe3, 0x3c, 0xf9, 0x26, 0xd0, 0x28, 0xf2, 0x17, 0x93, 0x55, 0x7f, - 0x51, 0xcc, 0xcb, 0x39, 0xdd, 0xbb, 0x3a, 0x3c, 0xef, 0xbe, 0xae, 0x41, 0x33, 0x9c, 0x15, 0xd3, - 0x8b, 0x59, 0x29, 0xed, 0x8c, 0x3e, 0x00, 0xbf, 0x5c, 0x2d, 0xf2, 0x00, 0x75, 0x50, 0x6f, 0xff, - 0xf4, 0xb8, 0xbf, 0x25, 0xfb, 0x7f, 0x52, 0x7d, 0xbd, 0x5a, 0xe4, 0xd2, 0x81, 0xf4, 0x11, 0xd4, - 0x97, 0xc5, 0x34, 0xcd, 0xf3, 0x22, 0xc0, 0x1d, 0xd4, 0x6b, 0xdc, 0xea, 0x58, 0x44, 0x6e, 0x59, - 0xab, 0x65, 0xcb, 0xd2, 0x69, 0xde, 0x3f, 0x68, 0x57, 0x2c, 0x7d, 0x08, 0xfe, 0x74, 0x9e, 0xe5, - 0x81, 0xef, 0xd6, 0x3b, 0xb9, 0xc5, 0x51, 0xe5, 0xa4, 0xbc, 0x58, 0x4a, 0x87, 0xb6, 0xee, 0x83, - 0xef, 0xd4, 0x7d, 0xc0, 0xb3, 0x2c, 0x40, 0x1d, 0xdc, 0x6b, 0x4a, 0x3c, 0xcb, 0xe8, 0x01, 0xfc, - 0x37, 0xc9, 0xb2, 0x62, 0x19, 0xe0, 0x8e, 0xd7, 0x6b, 0xca, 0xcd, 0xa1, 0xfb, 0xd1, 0x83, 0xda, - 0x46, 0xa7, 0x0d, 0xa8, 0xab, 0x71, 0x18, 0x72, 0xa5, 0x48, 0x46, 0x5b, 0x70, 0xe7, 0x5c, 0xa4, - 0x46, 0xc9, 0xd0, 0xb0, 0x28, 0x92, 0x46, 0x0b, 0x61, 0x62, 0x91, 0x9c, 0x91, 0x2f, 0x68, 0x9b, - 0x45, 0x4a, 0xff, 0x95, 0x7d, 0x45, 0xb4, 0x0d, 0x47, 0x5b, 0x6f, 0x34, 0x8e, 0xf5, 0xd0, 0x01, - 0xc3, 0xe4, 0x29, 0x8b, 0x87, 0x11, 0xf9, 0x59, 0xe5, 0xd6, 0xdd, 0xcd, 0x7f, 0x21, 0x7a, 0x17, - 0xa8, 0xcd, 0x13, 0x61, 0x42, 0x91, 0x24, 0x46, 0x0b, 0x8b, 0x92, 0x97, 0x98, 0x1e, 0xc2, 0xff, - 0x36, 0x08, 0x59, 0xa2, 0x4d, 0x34, 0x64, 0xb1, 0x9b, 0xbf, 0xc2, 0xf4, 0x04, 0x82, 0x6a, 0x2e, - 0x52, 0x9e, 0xb8, 0xab, 0x95, 0x96, 0x9c, 0x8d, 0xc8, 0x25, 0xa6, 0x47, 0x70, 0x50, 0xc5, 0x2a, - 0xe5, 0xec, 0x89, 0x91, 0x3c, 0x66, 0xcf, 0xc8, 0x1b, 0x4c, 0x8f, 0xe1, 0xb0, 0x8a, 0xdc, 0xd0, - 0x3e, 0x4d, 0xf1, 0x78, 0x40, 0xde, 0xb9, 0x50, 0xe9, 0x1b, 0x0b, 0x78, 0x7f, 0x1d, 0xee, 0x36, - 0xf0, 0x01, 0xd3, 0x7b, 0xd0, 0xaa, 0xcc, 0xdd, 0x57, 0xfc, 0x76, 0x0d, 0xdc, 0xdc, 0xc1, 0x77, - 0x6c, 0x3b, 0x70, 0xc0, 0x66, 0x29, 0xc9, 0x07, 0x63, 0xc5, 0x23, 0x72, 0xe9, 0xd9, 0x0e, 0x46, - 0x2c, 0x1e, 0x08, 0x39, 0xe2, 0x91, 0x19, 0x71, 0xa5, 0xd8, 0x19, 0x27, 0x6f, 0xbd, 0xee, 0x29, - 0xf8, 0xf6, 0x0f, 0xa5, 0x75, 0xf0, 0xce, 0x45, 0x4a, 0x10, 0xdd, 0x03, 0xdf, 0xde, 0x40, 0x30, - 0x05, 0xa8, 0x29, 0xcd, 0xf4, 0x58, 0x11, 0xcf, 0x7e, 0xe0, 0x90, 0x25, 0xc6, 0x22, 0xfe, 0xe3, - 0xe6, 0xa7, 0x75, 0x1b, 0x7d, 0x5e, 0xb7, 0xd1, 0x8f, 0x75, 0x1b, 0xfd, 0x0e, 0x00, 0x00, 0xff, - 0xff, 0x6b, 0x22, 0x33, 0xbb, 0x2f, 0x03, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/relay.proto b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/relay.proto similarity index 100% rename from vendor/gx/ipfs/QmVYDvJjiKb9iFEyHxx4i1TJSRBLkQhGb5Fc8XpmDuNCEA/go-libp2p-circuit/pb/relay.proto rename to vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb/relay.proto diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/relay.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/relay.go new file mode 100644 index 0000000000..32d7d0ae47 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/relay.go @@ -0,0 +1,456 @@ +package relay + +import ( + "context" + "fmt" + "io" + "sync" + "time" + + pb "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" +) + +var log = logging.Logger("relay") + +const ProtoID = "/libp2p/circuit/relay/0.1.0" + +const maxMessageSize = 4096 + +var RelayAcceptTimeout = time.Minute +var HopConnectTimeout = 10 * time.Second + +type Relay struct { + host host.Host + upgrader *tptu.Upgrader + ctx context.Context + self peer.ID + + active bool + hop bool + discovery bool + + incoming chan *Conn + + relays map[peer.ID]struct{} + mx sync.Mutex + + liveHops map[peer.ID]map[peer.ID]int + lhCount uint64 + lhLk sync.Mutex +} + +type RelayOpt int + +var ( + OptActive = RelayOpt(0) + OptHop = RelayOpt(1) + OptDiscovery = RelayOpt(2) +) + +type RelayError struct { + Code pb.CircuitRelay_Status +} + +func (e RelayError) Error() string { + return fmt.Sprintf("error opening relay circuit: %s (%d)", pb.CircuitRelay_Status_name[int32(e.Code)], e.Code) +} + +func NewRelay(ctx context.Context, h host.Host, upgrader *tptu.Upgrader, opts ...RelayOpt) (*Relay, error) { + r := &Relay{ + upgrader: upgrader, + host: h, + ctx: ctx, + self: h.ID(), + incoming: make(chan *Conn), + relays: make(map[peer.ID]struct{}), + liveHops: make(map[peer.ID]map[peer.ID]int), + } + + for _, opt := range opts { + switch opt { + case OptActive: + r.active = true + case OptHop: + r.hop = true + case OptDiscovery: + r.discovery = true + default: + return nil, fmt.Errorf("unrecognized option: %d", opt) + } + } + + h.SetStreamHandler(ProtoID, r.handleNewStream) + + if r.discovery { + h.Network().Notify(r.Notifiee()) + } + + return r, nil +} + +func (r *Relay) addLiveHop(from, to peer.ID) { + r.lhLk.Lock() + defer r.lhLk.Unlock() + + trg, ok := r.liveHops[from] + if !ok { + trg = make(map[peer.ID]int) + r.liveHops[from] = trg + } + trg[to]++ + r.lhCount++ +} + +func (r *Relay) rmLiveHop(from, to peer.ID) { + r.lhLk.Lock() + defer r.lhLk.Unlock() + + trg, ok := r.liveHops[from] + if !ok { + return + } + var count int + if count, ok = trg[to]; !ok { + return + } + count-- + + r.lhCount-- + if count <= 0 { + delete(trg, to) + if len(trg) == 0 { + delete(r.liveHops, from) + } + } else { + trg[to] = count + } +} + +func (r *Relay) GetActiveHops() uint64 { + r.lhLk.Lock() + defer r.lhLk.Unlock() + + return r.lhCount +} + +func (r *Relay) DialPeer(ctx context.Context, relay pstore.PeerInfo, dest pstore.PeerInfo) (*Conn, error) { + + log.Debugf("dialing peer %s through relay %s", dest.ID, relay.ID) + + if len(relay.Addrs) > 0 { + r.host.Peerstore().AddAddrs(relay.ID, relay.Addrs, pstore.TempAddrTTL) + } + + s, err := r.host.NewStream(ctx, relay.ID, ProtoID) + if err != nil { + return nil, err + } + + rd := newDelimitedReader(s, maxMessageSize) + wr := newDelimitedWriter(s) + + var msg pb.CircuitRelay + + msg.Type = pb.CircuitRelay_HOP.Enum() + msg.SrcPeer = peerInfoToPeer(r.host.Peerstore().PeerInfo(r.self)) + msg.DstPeer = peerInfoToPeer(dest) + + err = wr.WriteMsg(&msg) + if err != nil { + s.Reset() + return nil, err + } + + msg.Reset() + + err = rd.ReadMsg(&msg) + if err != nil { + s.Reset() + return nil, err + } + + if msg.GetType() != pb.CircuitRelay_STATUS { + s.Reset() + return nil, fmt.Errorf("unexpected relay response; not a status message (%d)", msg.GetType()) + } + + if msg.GetCode() != pb.CircuitRelay_SUCCESS { + s.Reset() + return nil, RelayError{msg.GetCode()} + } + + return &Conn{Stream: s, remote: dest}, nil +} + +func (r *Relay) Matches(addr ma.Multiaddr) bool { + // TODO: Look at the prefix transport as well. + _, err := addr.ValueForProtocol(P_CIRCUIT) + return err == nil +} + +func (r *Relay) CanHop(ctx context.Context, id peer.ID) (bool, error) { + s, err := r.host.NewStream(ctx, id, ProtoID) + if err != nil { + return false, err + } + + rd := newDelimitedReader(s, maxMessageSize) + wr := newDelimitedWriter(s) + + var msg pb.CircuitRelay + + msg.Type = pb.CircuitRelay_CAN_HOP.Enum() + + if err := wr.WriteMsg(&msg); err != nil { + s.Reset() + return false, err + } + + msg.Reset() + + if err := rd.ReadMsg(&msg); err != nil { + s.Reset() + return false, err + } + if err := inet.FullClose(s); err != nil { + return false, err + } + + if msg.GetType() != pb.CircuitRelay_STATUS { + return false, fmt.Errorf("unexpected relay response; not a status message (%d)", msg.GetType()) + } + + return msg.GetCode() == pb.CircuitRelay_SUCCESS, nil +} + +func (r *Relay) handleNewStream(s inet.Stream) { + log.Infof("new relay stream from: %s", s.Conn().RemotePeer()) + + rd := newDelimitedReader(s, maxMessageSize) + + var msg pb.CircuitRelay + + err := rd.ReadMsg(&msg) + if err != nil { + r.handleError(s, pb.CircuitRelay_MALFORMED_MESSAGE) + return + } + + switch msg.GetType() { + case pb.CircuitRelay_HOP: + r.handleHopStream(s, &msg) + case pb.CircuitRelay_STOP: + r.handleStopStream(s, &msg) + case pb.CircuitRelay_CAN_HOP: + r.handleCanHop(s, &msg) + default: + log.Warningf("unexpected relay handshake: %d", msg.GetType()) + r.handleError(s, pb.CircuitRelay_MALFORMED_MESSAGE) + } +} + +func (r *Relay) handleHopStream(s inet.Stream, msg *pb.CircuitRelay) { + if !r.hop { + r.handleError(s, pb.CircuitRelay_HOP_CANT_SPEAK_RELAY) + return + } + + src, err := peerToPeerInfo(msg.GetSrcPeer()) + if err != nil { + r.handleError(s, pb.CircuitRelay_HOP_SRC_MULTIADDR_INVALID) + return + } + + if src.ID != s.Conn().RemotePeer() { + r.handleError(s, pb.CircuitRelay_HOP_SRC_MULTIADDR_INVALID) + return + } + + dst, err := peerToPeerInfo(msg.GetDstPeer()) + if err != nil { + r.handleError(s, pb.CircuitRelay_HOP_DST_MULTIADDR_INVALID) + return + } + + if dst.ID == r.self { + r.handleError(s, pb.CircuitRelay_HOP_CANT_RELAY_TO_SELF) + return + } + + // open stream + ctp := r.host.Network().ConnsToPeer(dst.ID) + + if len(ctp) == 0 && !r.active { + r.handleError(s, pb.CircuitRelay_HOP_NO_CONN_TO_DST) + return + } + + if len(dst.Addrs) > 0 { + r.host.Peerstore().AddAddrs(dst.ID, dst.Addrs, pstore.TempAddrTTL) + } + + ctx, cancel := context.WithTimeout(r.ctx, HopConnectTimeout) + defer cancel() + + bs, err := r.host.NewStream(ctx, dst.ID, ProtoID) + if err != nil { + log.Debugf("error opening relay stream to %s: %s", dst.ID.Pretty(), err.Error()) + r.handleError(s, pb.CircuitRelay_HOP_CANT_DIAL_DST) + return + } + + // stop handshake + rd := newDelimitedReader(bs, maxMessageSize) + wr := newDelimitedWriter(bs) + + msg.Type = pb.CircuitRelay_STOP.Enum() + + err = wr.WriteMsg(msg) + if err != nil { + log.Debugf("error writing stop handshake: %s", err.Error()) + bs.Reset() + r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) + return + } + + msg.Reset() + + err = rd.ReadMsg(msg) + if err != nil { + log.Debugf("error reading stop response: %s", err.Error()) + bs.Reset() + r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) + return + } + + if msg.GetType() != pb.CircuitRelay_STATUS { + log.Debugf("unexpected relay stop response: not a status message (%d)", msg.GetType()) + bs.Reset() + r.handleError(s, pb.CircuitRelay_HOP_CANT_OPEN_DST_STREAM) + return + } + + if msg.GetCode() != pb.CircuitRelay_SUCCESS { + log.Debugf("relay stop failure: %d", msg.GetCode()) + bs.Reset() + r.handleError(s, msg.GetCode()) + return + } + + err = r.writeResponse(s, pb.CircuitRelay_SUCCESS) + if err != nil { + log.Debugf("error writing relay response: %s", err.Error()) + bs.Reset() + s.Reset() + return + } + + // relay connection + log.Infof("relaying connection between %s and %s", src.ID.Pretty(), dst.ID.Pretty()) + + r.addLiveHop(src.ID, dst.ID) + + // Don't reset streams after finishing or the other side will get an + // error, not an EOF. + go func() { + defer r.rmLiveHop(src.ID, dst.ID) + + count, err := io.Copy(s, bs) + if err != nil { + log.Debugf("relay copy error: %s", err) + // Reset both. + s.Reset() + bs.Reset() + } else { + // propagate the close + s.Close() + } + log.Debugf("relayed %d bytes from %s to %s", count, dst.ID.Pretty(), src.ID.Pretty()) + }() + + go func() { + count, err := io.Copy(bs, s) + if err != nil { + log.Debugf("relay copy error: %s", err) + // Reset both. + bs.Reset() + s.Reset() + } else { + // propagate the close + bs.Close() + } + log.Debugf("relayed %d bytes from %s to %s", count, src.ID.Pretty(), dst.ID.Pretty()) + }() +} + +func (r *Relay) handleStopStream(s inet.Stream, msg *pb.CircuitRelay) { + src, err := peerToPeerInfo(msg.GetSrcPeer()) + if err != nil { + r.handleError(s, pb.CircuitRelay_STOP_SRC_MULTIADDR_INVALID) + return + } + + dst, err := peerToPeerInfo(msg.GetDstPeer()) + if err != nil || dst.ID != r.self { + r.handleError(s, pb.CircuitRelay_STOP_DST_MULTIADDR_INVALID) + return + } + + log.Infof("relay connection from: %s", src.ID) + + if len(src.Addrs) > 0 { + r.host.Peerstore().AddAddrs(src.ID, src.Addrs, pstore.TempAddrTTL) + } + + select { + case r.incoming <- &Conn{Stream: s, remote: src}: + case <-time.After(RelayAcceptTimeout): + r.handleError(s, pb.CircuitRelay_STOP_RELAY_REFUSED) + } +} + +func (r *Relay) handleCanHop(s inet.Stream, msg *pb.CircuitRelay) { + var err error + + if r.hop { + err = r.writeResponse(s, pb.CircuitRelay_SUCCESS) + } else { + err = r.writeResponse(s, pb.CircuitRelay_HOP_CANT_SPEAK_RELAY) + } + + if err != nil { + s.Reset() + log.Debugf("error writing relay response: %s", err.Error()) + } else { + inet.FullClose(s) + } +} + +func (r *Relay) handleError(s inet.Stream, code pb.CircuitRelay_Status) { + log.Warningf("relay error: %s (%d)", pb.CircuitRelay_Status_name[int32(code)], code) + err := r.writeResponse(s, code) + if err != nil { + s.Reset() + log.Debugf("error writing relay response: %s", err.Error()) + } else { + inet.FullClose(s) + } +} + +func (r *Relay) writeResponse(s inet.Stream, code pb.CircuitRelay_Status) error { + wr := newDelimitedWriter(s) + + var msg pb.CircuitRelay + msg.Type = pb.CircuitRelay_STATUS.Enum() + msg.Code = code.Enum() + + return wr.WriteMsg(&msg) +} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/transport.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/transport.go new file mode 100644 index 0000000000..898ea81cdd --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/transport.go @@ -0,0 +1,80 @@ +package relay + +import ( + "context" + "fmt" + + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" +) + +const P_CIRCUIT = 290 + +var Protocol = ma.Protocol{ + Code: P_CIRCUIT, + Size: 0, + Name: "p2p-circuit", + VCode: ma.CodeToVarint(P_CIRCUIT), +} + +func init() { + ma.AddProtocol(Protocol) +} + +var _ tpt.Transport = (*RelayTransport)(nil) + +type RelayTransport Relay + +func (t *RelayTransport) Relay() *Relay { + return (*Relay)(t) +} + +func (r *Relay) Transport() *RelayTransport { + return (*RelayTransport)(r) +} + +func (t *RelayTransport) Listen(laddr ma.Multiaddr) (tpt.Listener, error) { + // TODO: Ensure we have a connection to the relay, if specified. Also, + // make sure the multiaddr makes sense. + if !t.Relay().Matches(laddr) { + return nil, fmt.Errorf("%s is not a relay address", laddr) + } + return t.upgrader.UpgradeListener(t, t.Relay().Listener()), nil +} + +func (t *RelayTransport) CanDial(raddr ma.Multiaddr) bool { + return t.Relay().Matches(raddr) +} + +func (t *RelayTransport) Proxy() bool { + return true +} + +func (t *RelayTransport) Protocols() []int { + return []int{P_CIRCUIT} +} + +// AddRelayTransport constructs a relay and adds it as a transport to the host network. +func AddRelayTransport(ctx context.Context, h host.Host, upgrader *tptu.Upgrader, opts ...RelayOpt) error { + n, ok := h.Network().(tpt.Network) + if !ok { + return fmt.Errorf("%v is not a transport network", h.Network()) + } + + r, err := NewRelay(ctx, h, upgrader, opts...) + if err != nil { + return err + } + + // There's no nice way to handle these errors as we have no way to tear + // down the relay. + // TODO + if err := n.AddTransport(r.Transport()); err != nil { + log.Error("failed to add relay transport:", err) + } else if err := n.Listen(r.Listener().Multiaddr()); err != nil { + log.Error("failed to listen on relay transport:", err) + } + return nil +} diff --git a/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/util.go b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/util.go new file mode 100644 index 0000000000..f881c6bcd5 --- /dev/null +++ b/vendor/gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/util.go @@ -0,0 +1,97 @@ +package relay + +import ( + "encoding/binary" + "errors" + "io" + + pb "gx/ipfs/QmZBfqr863PYD7BKbmCFSNmzsqYmtr2DKgzubsQaiTQkMc/go-libp2p-circuit/pb" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +func peerToPeerInfo(p *pb.CircuitRelay_Peer) (pstore.PeerInfo, error) { + if p == nil { + return pstore.PeerInfo{}, errors.New("nil peer") + } + + id, err := peer.IDFromBytes(p.Id) + if err != nil { + return pstore.PeerInfo{}, err + } + + addrs := make([]ma.Multiaddr, 0, len(p.Addrs)) + for _, addrBytes := range p.Addrs { + a, err := ma.NewMultiaddrBytes(addrBytes) + if err == nil { + addrs = append(addrs, a) + } + } + + return pstore.PeerInfo{ID: id, Addrs: addrs}, nil +} + +func peerInfoToPeer(pi pstore.PeerInfo) *pb.CircuitRelay_Peer { + addrs := make([][]byte, len(pi.Addrs)) + for i, addr := range pi.Addrs { + addrs[i] = addr.Bytes() + } + + p := new(pb.CircuitRelay_Peer) + p.Id = []byte(pi.ID) + p.Addrs = addrs + + return p +} + +type delimitedReader struct { + r io.Reader + buf []byte +} + +// The gogo protobuf NewDelimitedReader is buffered, which may eat up stream data. +// So we need to implement a compatible delimited reader that reads unbuffered. +// There is a slowdown from unbuffered reading: when reading the message +// it can take multiple single byte Reads to read the length and another Read +// to read the message payload. +// However, this is not critical performance degradation as +// - the reader is utilized to read one (dialer, stop) or two messages (hop) during +// the handshake, so it's a drop in the water for the connection lifetime. +// - messages are small (max 4k) and the length fits in a couple of bytes, +// so overall we have at most three reads per message. +func newDelimitedReader(r io.Reader, maxSize int) *delimitedReader { + return &delimitedReader{r: r, buf: make([]byte, maxSize)} +} + +func (d *delimitedReader) ReadByte() (byte, error) { + buf := d.buf[:1] + _, err := d.r.Read(buf) + return buf[0], err +} + +func (d *delimitedReader) ReadMsg(msg proto.Message) error { + mlen, err := binary.ReadUvarint(d) + if err != nil { + return err + } + + if uint64(len(d.buf)) < mlen { + return errors.New("Message too large") + } + + buf := d.buf[:mlen] + _, err = io.ReadFull(d.r, buf) + if err != nil { + return err + } + + return proto.Unmarshal(buf, msg) +} + +func newDelimitedWriter(w io.Writer) ggio.WriteCloser { + return ggio.NewDelimitedWriter(w) +} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/log.go b/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/log.go deleted file mode 100644 index ac6ce85cde..0000000000 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/log.go +++ /dev/null @@ -1,401 +0,0 @@ -// Package log is the logging library used by IPFS -// (https://github.com/ipfs/go-ipfs). It uses a modified version of -// https://godoc.org/github.com/whyrusleeping/go-logging . -package log - -import ( - "bytes" - "context" - "encoding/json" - "path" - "runtime" - "time" - - writer "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" - - opentrace "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" - otExt "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go/ext" -) - -var log = Logger("eventlog") - -// StandardLogger provides API compatibility with standard printf loggers -// eg. go-logging -type StandardLogger interface { - Debug(args ...interface{}) - Debugf(format string, args ...interface{}) - Error(args ...interface{}) - Errorf(format string, args ...interface{}) - Fatal(args ...interface{}) - Fatalf(format string, args ...interface{}) - Info(args ...interface{}) - Infof(format string, args ...interface{}) - Panic(args ...interface{}) - Panicf(format string, args ...interface{}) - Warning(args ...interface{}) - Warningf(format string, args ...interface{}) -} - -// EventLogger extends the StandardLogger interface to allow for log items -// containing structured metadata -type EventLogger interface { - StandardLogger - - // Event merges structured data from the provided inputs into a single - // machine-readable log event. - // - // If the context contains metadata, a copy of this is used as the base - // metadata accumulator. - // - // If one or more loggable objects are provided, these are deep-merged into base blob. - // - // Next, the event name is added to the blob under the key "event". If - // the key "event" already exists, it will be over-written. - // - // Finally the timestamp and package name are added to the accumulator and - // the metadata is logged. - // DEPRECATED - Event(ctx context.Context, event string, m ...Loggable) - - // DEPRECATED - EventBegin(ctx context.Context, event string, m ...Loggable) *EventInProgress - - // Start starts an opentracing span with `name`, using - // any Span found within `ctx` as a ChildOfRef. If no such parent could be - // found, Start creates a root (parentless) Span. - // - // The return value is a context.Context object built around the - // returned Span. - // - // Example usage: - // - // SomeFunction(ctx context.Context, ...) { - // ctx := log.Start(ctx, "SomeFunction") - // defer log.Finish(ctx) - // ... - // } - Start(ctx context.Context, name string) context.Context - - // StartFromParentState starts an opentracing span with `name`, using - // any Span found within `ctx` as a ChildOfRef. If no such parent could be - // found, StartSpanFromParentState creates a root (parentless) Span. - // - // StartFromParentState will attempt to deserialize a SpanContext from `parent`, - // using any Span found within to continue the trace - // - // The return value is a context.Context object built around the - // returned Span. - // - // An error is returned when `parent` cannot be deserialized to a SpanContext - // - // Example usage: - // - // SomeFunction(ctx context.Context, bParent []byte) { - // ctx := log.StartFromParentState(ctx, "SomeFunction", bParent) - // defer log.Finish(ctx) - // ... - // } - StartFromParentState(ctx context.Context, name string, parent []byte) (context.Context, error) - - // Finish completes the span associated with `ctx`. - // - // Finish() must be the last call made to any span instance, and to do - // otherwise leads to undefined behavior. - // Finish will do its best to notify (log) when used in correctly - // .e.g called twice, or called on a spanless `ctx` - Finish(ctx context.Context) - - // FinishWithErr completes the span associated with `ctx` and also calls - // SetErr if `err` is non-nil - // - // FinishWithErr() must be the last call made to any span instance, and to do - // otherwise leads to undefined behavior. - // FinishWithErr will do its best to notify (log) when used in correctly - // .e.g called twice, or called on a spanless `ctx` - FinishWithErr(ctx context.Context, err error) - - // SetErr tags the span associated with `ctx` to reflect an error occured, and - // logs the value `err` under key `error`. - SetErr(ctx context.Context, err error) - - // LogKV records key:value logging data about an event stored in `ctx` - // Eexample: - // log.LogKV( - // "error", "resolve failure", - // "type", "cache timeout", - // "waited.millis", 1500) - LogKV(ctx context.Context, alternatingKeyValues ...interface{}) - - // SetTag tags key `k` and value `v` on the span associated with `ctx` - SetTag(ctx context.Context, key string, value interface{}) - - // SetTags tags keys from the `tags` maps on the span associated with `ctx` - // Example: - // log.SetTags(ctx, map[string]{ - // "type": bizStruct, - // "request": req, - // }) - SetTags(ctx context.Context, tags map[string]interface{}) - - // SerializeContext takes the SpanContext instance stored in `ctx` and Seralizes - // it to bytes. An error is returned if the `ctx` cannot be serialized to - // a bytes array - SerializeContext(ctx context.Context) ([]byte, error) -} - -// Logger retrieves an event logger by name -func Logger(system string) EventLogger { - - // TODO if we would like to adjust log levels at run-time. Store this event - // logger in a map (just like the util.Logger impl) - if len(system) == 0 { - setuplog := getLogger("setup-logger") - setuplog.Warning("Missing name parameter") - system = "undefined" - } - - logger := getLogger(system) - - return &eventLogger{system: system, StandardLogger: logger} -} - -// eventLogger implements the EventLogger and wraps a go-logging Logger -type eventLogger struct { - StandardLogger - - system string - // TODO add log-level -} - -func (el *eventLogger) Start(ctx context.Context, operationName string) context.Context { - span, ctx := opentrace.StartSpanFromContext(ctx, operationName) - span.SetTag("system", el.system) - return ctx -} - -func (el *eventLogger) StartFromParentState(ctx context.Context, operationName string, parent []byte) (context.Context, error) { - sc, err := deserializeContext(parent) - if err != nil { - return nil, err - } - - //TODO RPCServerOption is probably not the best tag, as this is likely from a peer - span, ctx := opentrace.StartSpanFromContext(ctx, operationName, otExt.RPCServerOption(sc)) - span.SetTag("system", el.system) - return ctx, nil -} - -func (el *eventLogger) SerializeContext(ctx context.Context) ([]byte, error) { - gTracer := opentrace.GlobalTracer() - b := make([]byte, 0) - carrier := bytes.NewBuffer(b) - span := opentrace.SpanFromContext(ctx) - if err := gTracer.Inject(span.Context(), opentrace.Binary, carrier); err != nil { - return nil, err - } - return carrier.Bytes(), nil -} - -func (el *eventLogger) LogKV(ctx context.Context, alternatingKeyValues ...interface{}) { - span := opentrace.SpanFromContext(ctx) - if span == nil { - _, file, line, _ := runtime.Caller(1) - log.Errorf("LogKV with no Span in context called on %s:%d", path.Base(file), line) - return - } - span.LogKV(alternatingKeyValues...) -} - -func (el *eventLogger) SetTag(ctx context.Context, k string, v interface{}) { - span := opentrace.SpanFromContext(ctx) - if span == nil { - _, file, line, _ := runtime.Caller(1) - log.Errorf("SetTag with no Span in context called on %s:%d", path.Base(file), line) - return - } - span.SetTag(k, v) -} - -func (el *eventLogger) SetTags(ctx context.Context, tags map[string]interface{}) { - span := opentrace.SpanFromContext(ctx) - if span == nil { - _, file, line, _ := runtime.Caller(1) - log.Errorf("SetTags with no Span in context called on %s:%d", path.Base(file), line) - return - } - for k, v := range tags { - span.SetTag(k, v) - } -} - -func (el *eventLogger) SetErr(ctx context.Context, err error) { - span := opentrace.SpanFromContext(ctx) - if span == nil { - _, file, line, _ := runtime.Caller(1) - log.Errorf("SetErr with no Span in context called on %s:%d", path.Base(file), line) - return - } - if err == nil { - return - } - - otExt.Error.Set(span, true) - span.LogKV("error", err.Error()) -} - -func (el *eventLogger) Finish(ctx context.Context) { - span := opentrace.SpanFromContext(ctx) - if span == nil { - _, file, line, _ := runtime.Caller(1) - log.Errorf("Finish with no Span in context called on %s:%d", path.Base(file), line) - return - } - span.Finish() -} - -func (el *eventLogger) FinishWithErr(ctx context.Context, err error) { - el.SetErr(ctx, err) - el.Finish(ctx) -} - -func deserializeContext(bCtx []byte) (opentrace.SpanContext, error) { - gTracer := opentrace.GlobalTracer() - carrier := bytes.NewReader(bCtx) - spanContext, err := gTracer.Extract(opentrace.Binary, carrier) - if err != nil { - log.Warning("Failed to deserialize context %s", err) - return nil, err - } - return spanContext, nil -} - -// DEPRECATED use `Start` -func (el *eventLogger) EventBegin(ctx context.Context, event string, metadata ...Loggable) *EventInProgress { - ctx = el.Start(ctx, event) - - for _, m := range metadata { - for l, v := range m.Loggable() { - el.LogKV(ctx, l, v) - } - } - - eip := &EventInProgress{} - eip.doneFunc = func(additional []Loggable) { - // anything added during the operation - // e.g. deprecated methods event.Append(...) or event.SetError(...) - for _, m := range eip.loggables { - for l, v := range m.Loggable() { - el.LogKV(ctx, l, v) - } - } - el.Finish(ctx) - } - return eip -} - -type activeEventKeyType struct{} - -var activeEventKey = activeEventKeyType{} - -// DEPRECATED use `Start` -func (el *eventLogger) Event(ctx context.Context, event string, metadata ...Loggable) { - - // short circuit if theres nothing to write to - if !writer.WriterGroup.Active() { - return - } - - // Collect loggables for later logging - var loggables []Loggable - - // get any existing metadata from the context - existing, err := MetadataFromContext(ctx) - if err != nil { - existing = Metadata{} - } - loggables = append(loggables, existing) - - for _, datum := range metadata { - loggables = append(loggables, datum) - } - - e := entry{ - loggables: loggables, - system: el.system, - event: event, - } - - accum := Metadata{} - for _, loggable := range e.loggables { - accum = DeepMerge(accum, loggable.Loggable()) - } - - // apply final attributes to reserved keys - // TODO accum["level"] = level - accum["event"] = e.event - accum["system"] = e.system - accum["time"] = FormatRFC3339(time.Now()) - - var buf bytes.Buffer - encoder := json.NewEncoder(&buf) - encoder.SetEscapeHTML(false) - encoder.SetIndent("", " ") - err = encoder.Encode(accum) - if err != nil { - el.Errorf("ERROR FORMATTING EVENT ENTRY: %s", err) - return - } - - writer.WriterGroup.Write(buf.Bytes()) -} - -// DEPRECATED -// EventInProgress represent and event which is happening -type EventInProgress struct { - loggables []Loggable - doneFunc func([]Loggable) -} - -// DEPRECATED use `LogKV` or `SetTag` -// Append adds loggables to be included in the call to Done -func (eip *EventInProgress) Append(l Loggable) { - eip.loggables = append(eip.loggables, l) -} - -// DEPRECATED use `SetError(ctx, error)` -// SetError includes the provided error -func (eip *EventInProgress) SetError(err error) { - eip.loggables = append(eip.loggables, LoggableMap{ - "error": err.Error(), - }) -} - -// DEPRECATED use `Finish` -// Done creates a new Event entry that includes the duration and appended -// loggables. -func (eip *EventInProgress) Done() { - eip.doneFunc(eip.loggables) // create final event with extra data -} - -// DEPRECATED use `FinishWithErr` -// DoneWithErr creates a new Event entry that includes the duration and appended -// loggables. DoneWithErr accepts an error, if err is non-nil, it is set on -// the EventInProgress. Otherwise the logic is the same as the `Done()` method -func (eip *EventInProgress) DoneWithErr(err error) { - if err != nil { - eip.SetError(err) - } - eip.doneFunc(eip.loggables) -} - -// DEPRECATED use `Finish` -// Close is an alias for done -func (eip *EventInProgress) Close() error { - eip.Done() - return nil -} - -// FormatRFC3339 returns the given time in UTC with RFC3999Nano format. -func FormatRFC3339(t time.Time) string { - return t.UTC().Format(time.RFC3339Nano) -} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/package.json b/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/package.json deleted file mode 100644 index f3625603ac..0000000000 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/ipfs/go-log" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-log" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmcaSwFc5RBg8yCq54QURwEU4nwjfCpjbpmaAm4VbdGLKv", - "name": "go-logging", - "version": "0.0.0" - }, - { - "author": "frist", - "hash": "QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo", - "name": "opentracing-go", - "version": "0.0.3" - }, - { - "author": "mattn", - "hash": "QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq", - "name": "go-colorable", - "version": "0.2.0" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-log", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.5.7" -} - diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/tracer.go b/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/tracer.go deleted file mode 100644 index 9c4358fa5e..0000000000 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/tracer.go +++ /dev/null @@ -1,280 +0,0 @@ -package loggabletracer - -import ( - "time" - - opentracing "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" - writer "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" -) - -// Tracer extends the opentracing.Tracer interface with methods to -// probe implementation state, for use by loggabletracer consumers. -type Tracer interface { - opentracing.Tracer - - // Options gets the Options used in New() or NewWithOptions(). - Options() Options -} - -// Options allows creating a customized Tracer via NewWithOptions. The object -// must not be updated when there is an active tracer using it. -type Options struct { - // ShouldSample is a function which is called when creating a new Span and - // determines whether that Span is sampled. The randomized TraceID is supplied - // to allow deterministic sampling decisions to be made across different nodes. - // For example, - // - // func(traceID uint64) { return traceID % 64 == 0 } - // - // samples every 64th trace on average. - ShouldSample func(traceID uint64) bool - // TrimUnsampledSpans turns potentially expensive operations on unsampled - // Spans into no-ops. More precisely, tags and log events are silently - // discarded. If NewSpanEventListener is set, the callbacks will still fire. - TrimUnsampledSpans bool - // Recorder receives Spans which have been finished. - Recorder SpanRecorder - // NewSpanEventListener can be used to enhance the tracer by effectively - // attaching external code to trace events. See NetTraceIntegrator for a - // practical example, and event.go for the list of possible events. - NewSpanEventListener func() func(SpanEvent) - // DropAllLogs turns log events on all Spans into no-ops. - // If NewSpanEventListener is set, the callbacks will still fire. - DropAllLogs bool - // MaxLogsPerSpan limits the number of Logs in a span (if set to a nonzero - // value). If a span has more logs than this value, logs are dropped as - // necessary (and replaced with a log describing how many were dropped). - // - // About half of the MaxLogPerSpan logs kept are the oldest logs, and about - // half are the newest logs. - // - // If NewSpanEventListener is set, the callbacks will still fire for all log - // events. This value is ignored if DropAllLogs is true. - MaxLogsPerSpan int - // DebugAssertSingleGoroutine internally records the ID of the goroutine - // creating each Span and verifies that no operation is carried out on - // it on a different goroutine. - // Provided strictly for development purposes. - // Passing Spans between goroutine without proper synchronization often - // results in use-after-Finish() errors. For a simple example, consider the - // following pseudocode: - // - // func (s *Server) Handle(req http.Request) error { - // sp := s.StartSpan("server") - // defer sp.Finish() - // wait := s.queueProcessing(opentracing.ContextWithSpan(context.Background(), sp), req) - // select { - // case resp := <-wait: - // return resp.Error - // case <-time.After(10*time.Second): - // sp.LogEvent("timed out waiting for processing") - // return ErrTimedOut - // } - // } - // - // This looks reasonable at first, but a request which spends more than ten - // seconds in the queue is abandoned by the main goroutine and its trace - // finished, leading to use-after-finish when the request is finally - // processed. Note also that even joining on to a finished Span via - // StartSpanWithOptions constitutes an illegal operation. - // - // Code bases which do not require (or decide they do not want) Spans to - // be passed across goroutine boundaries can run with this flag enabled in - // tests to increase their chances of spotting wrong-doers. - DebugAssertSingleGoroutine bool - // DebugAssertUseAfterFinish is provided strictly for development purposes. - // When set, it attempts to exacerbate issues emanating from use of Spans - // after calling Finish by running additional assertions. - DebugAssertUseAfterFinish bool - // EnableSpanPool enables the use of a pool, so that the tracer reuses spans - // after Finish has been called on it. Adds a slight performance gain as it - // reduces allocations. However, if you have any use-after-finish race - // conditions the code may panic. - EnableSpanPool bool -} - -// DefaultOptions returns an Options object with a 1 in 64 sampling rate and -// all options disabled. A Recorder needs to be set manually before using the -// returned object with a Tracer. -func DefaultOptions() Options { - return Options{ - ShouldSample: func(traceID uint64) bool { return traceID%64 == 0 }, - MaxLogsPerSpan: 100, - } -} - -// NewWithOptions creates a customized Tracer. -func NewWithOptions(opts Options) opentracing.Tracer { - rval := &LoggableTracer{options: opts} - rval.accessorPropagator = &accessorPropagator{rval} - return rval -} - -// New creates and returns a standard Tracer which defers completed Spans to -// `recorder`. -// Spans created by this Tracer support the ext.SamplingPriority tag: Setting -// ext.SamplingPriority causes the Span to be Sampled from that point on. -func New(recorder SpanRecorder) opentracing.Tracer { - opts := DefaultOptions() - opts.Recorder = recorder - return NewWithOptions(opts) -} - -// Implements the `Tracer` interface. -type LoggableTracer struct { - options Options - textPropagator *textMapPropagator - binaryPropagator *binaryPropagator - accessorPropagator *accessorPropagator -} - -func (t *LoggableTracer) StartSpan( - operationName string, - opts ...opentracing.StartSpanOption, -) opentracing.Span { - - if !writer.WriterGroup.Active() { - return opentracing.NoopTracer.StartSpan(opentracing.NoopTracer{}, operationName) - } - - sso := opentracing.StartSpanOptions{} - for _, o := range opts { - o.Apply(&sso) - } - return t.StartSpanWithOptions(operationName, sso) -} - -func (t *LoggableTracer) getSpan() *spanImpl { - if t.options.EnableSpanPool { - sp := spanPool.Get().(*spanImpl) - sp.reset() - return sp - } - return &spanImpl{} -} - -func (t *LoggableTracer) StartSpanWithOptions( - operationName string, - opts opentracing.StartSpanOptions, -) opentracing.Span { - if !writer.WriterGroup.Active() { - return opentracing.NoopTracer.StartSpan(opentracing.NoopTracer{}, operationName) - } - // Start time. - startTime := opts.StartTime - if startTime.IsZero() { - startTime = time.Now() - } - - // Tags. - tags := opts.Tags - - // Build the new span. This is the only allocation: We'll return this as - // an opentracing.Span. - sp := t.getSpan() - // Look for a parent in the list of References. - // - // TODO: would be nice if loggabletracer did something with all - // References, not just the first one. -ReferencesLoop: - for _, ref := range opts.References { - switch ref.Type { - case opentracing.ChildOfRef, - opentracing.FollowsFromRef: - - refCtx, ok := ref.ReferencedContext.(SpanContext) - if !ok { - // Could be a noopSpanContext - // Ignore that parent. - continue - } - sp.raw.Context.TraceID = refCtx.TraceID - sp.raw.Context.SpanID = randomID() - sp.raw.Context.Sampled = refCtx.Sampled - sp.raw.ParentSpanID = refCtx.SpanID - - if l := len(refCtx.Baggage); l > 0 { - sp.raw.Context.Baggage = make(map[string]string, l) - for k, v := range refCtx.Baggage { - sp.raw.Context.Baggage[k] = v - } - } - break ReferencesLoop - } - } - if sp.raw.Context.TraceID == 0 { - // No parent Span found; allocate new trace and span ids and determine - // the Sampled status. - sp.raw.Context.TraceID, sp.raw.Context.SpanID = randomID2() - sp.raw.Context.Sampled = t.options.ShouldSample(sp.raw.Context.TraceID) - } - - return t.startSpanInternal( - sp, - operationName, - startTime, - tags, - ) -} - -func (t *LoggableTracer) startSpanInternal( - sp *spanImpl, - operationName string, - startTime time.Time, - tags opentracing.Tags, -) opentracing.Span { - sp.tracer = t - if t.options.NewSpanEventListener != nil { - sp.event = t.options.NewSpanEventListener() - } - sp.raw.Operation = operationName - sp.raw.Start = startTime - sp.raw.Duration = -1 - sp.raw.Tags = tags - if t.options.DebugAssertSingleGoroutine { - sp.SetTag(debugGoroutineIDTag, curGoroutineID()) - } - defer sp.onCreate(operationName) - return sp -} - -type delegatorType struct{} - -// Delegator is the format to use for DelegatingCarrier. -var Delegator delegatorType - -func (t *LoggableTracer) Inject(sc opentracing.SpanContext, format interface{}, carrier interface{}) error { - if !writer.WriterGroup.Active() { - return opentracing.NoopTracer.Inject(opentracing.NoopTracer{}, sc, format, carrier) - } - switch format { - case opentracing.TextMap, opentracing.HTTPHeaders: - return t.textPropagator.Inject(sc, carrier) - case opentracing.Binary: - return t.binaryPropagator.Inject(sc, carrier) - } - if _, ok := format.(delegatorType); ok { - return t.accessorPropagator.Inject(sc, carrier) - } - return opentracing.ErrUnsupportedFormat -} - -func (t *LoggableTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error) { - if !writer.WriterGroup.Active() { - return opentracing.NoopTracer.Extract(opentracing.NoopTracer{}, format, carrier) - } - switch format { - case opentracing.TextMap, opentracing.HTTPHeaders: - return t.textPropagator.Extract(carrier) - case opentracing.Binary: - return t.binaryPropagator.Extract(carrier) - } - if _, ok := format.(delegatorType); ok { - return t.accessorPropagator.Extract(carrier) - } - return nil, opentracing.ErrUnsupportedFormat -} - -func (t *LoggableTracer) Options() Options { - return t.options -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/file.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/file.go deleted file mode 100644 index c5e8203364..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/file.go +++ /dev/null @@ -1,62 +0,0 @@ -package files - -import ( - "errors" - "io" - "os" -) - -var ( - ErrNotDirectory = errors.New("Couldn't call NextFile(), this isn't a directory") - ErrNotReader = errors.New("This file is a directory, can't use Reader functions") -) - -// File is an interface that provides functionality for handling -// files/directories as values that can be supplied to commands. For -// directories, child files are accessed serially by calling `NextFile()`. -type File interface { - // Files implement ReadCloser, but can only be read from or closed if - // they are not directories - io.ReadCloser - - // FileName returns a filename associated with this file - FileName() string - - // FullPath returns the full path used when adding with this file - FullPath() string - - // IsDirectory returns true if the File is a directory (and therefore - // supports calling `NextFile`) and false if the File is a normal file - // (and therefor supports calling `Read` and `Close`) - IsDirectory() bool - - // NextFile returns the next child file available (if the File is a - // directory). It will return (nil, io.EOF) if no more files are - // available. If the file is a regular file (not a directory), NextFile - // will return a non-nil error. - NextFile() (File, error) -} - -type StatFile interface { - File - - Stat() os.FileInfo -} - -type PeekFile interface { - SizeFile - - Peek(n int) File - Length() int -} - -type SizeFile interface { - File - - Size() (int64, error) -} - -type FileInfo interface { - AbsPath() string - Stat() os.FileInfo -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden.go deleted file mode 100644 index b0360685b0..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !windows - -package files - -import ( - "path/filepath" - "strings" -) - -func IsHidden(f File) bool { - - fName := filepath.Base(f.FileName()) - - if strings.HasPrefix(fName, ".") && len(fName) > 1 { - return true - } - - return false -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden_windows.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden_windows.go deleted file mode 100644 index 272d86aa38..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/is_hidden_windows.go +++ /dev/null @@ -1,30 +0,0 @@ -// +build windows - -package files - -import ( - "path/filepath" - "strings" - - windows "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" -) - -func IsHidden(f File) bool { - - fName := filepath.Base(f.FileName()) - - if strings.HasPrefix(fName, ".") && len(fName) > 1 { - return true - } - - p, e := windows.UTF16PtrFromString(f.FullPath()) - if e != nil { - return false - } - - attrs, e := windows.GetFileAttributes(p) - if e != nil { - return false - } - return attrs&windows.FILE_ATTRIBUTE_HIDDEN != 0 -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/linkfile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/linkfile.go deleted file mode 100644 index 18466f4bd5..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/linkfile.go +++ /dev/null @@ -1,50 +0,0 @@ -package files - -import ( - "io" - "os" - "strings" -) - -type Symlink struct { - name string - path string - Target string - stat os.FileInfo - - reader io.Reader -} - -func NewLinkFile(name, path, target string, stat os.FileInfo) File { - return &Symlink{ - name: name, - path: path, - Target: target, - stat: stat, - reader: strings.NewReader(target), - } -} - -func (lf *Symlink) IsDirectory() bool { - return false -} - -func (lf *Symlink) NextFile() (File, error) { - return nil, io.EOF -} - -func (f *Symlink) FileName() string { - return f.name -} - -func (f *Symlink) Close() error { - return nil -} - -func (f *Symlink) FullPath() string { - return f.path -} - -func (f *Symlink) Read(b []byte) (int, error) { - return f.reader.Read(b) -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multifilereader.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multifilereader.go deleted file mode 100644 index 4833e8d18c..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multifilereader.go +++ /dev/null @@ -1,124 +0,0 @@ -package files - -import ( - "bytes" - "fmt" - "io" - "mime/multipart" - "net/textproto" - "net/url" - "sync" -) - -// MultiFileReader reads from a `commands.File` (which can be a directory of files -// or a regular file) as HTTP multipart encoded data. -type MultiFileReader struct { - io.Reader - - files []File - currentFile io.Reader - buf bytes.Buffer - mpWriter *multipart.Writer - closed bool - mutex *sync.Mutex - - // if true, the data will be type 'multipart/form-data' - // if false, the data will be type 'multipart/mixed' - form bool -} - -// NewMultiFileReader constructs a MultiFileReader. `file` can be any `commands.File`. -// If `form` is set to true, the multipart data will have a Content-Type of 'multipart/form-data', -// if `form` is false, the Content-Type will be 'multipart/mixed'. -func NewMultiFileReader(file File, form bool) *MultiFileReader { - mfr := &MultiFileReader{ - files: []File{file}, - form: form, - mutex: &sync.Mutex{}, - } - mfr.mpWriter = multipart.NewWriter(&mfr.buf) - - return mfr -} - -func (mfr *MultiFileReader) Read(buf []byte) (written int, err error) { - mfr.mutex.Lock() - defer mfr.mutex.Unlock() - - // if we are closed and the buffer is flushed, end reading - if mfr.closed && mfr.buf.Len() == 0 { - return 0, io.EOF - } - - // if the current file isn't set, advance to the next file - if mfr.currentFile == nil { - var file File - for file == nil { - if len(mfr.files) == 0 { - mfr.mpWriter.Close() - mfr.closed = true - return mfr.buf.Read(buf) - } - - nextfile, err := mfr.files[len(mfr.files)-1].NextFile() - if err == io.EOF { - mfr.files = mfr.files[:len(mfr.files)-1] - continue - } else if err != nil { - return 0, err - } - - file = nextfile - } - - // handle starting a new file part - if !mfr.closed { - - var contentType string - if _, ok := file.(*Symlink); ok { - contentType = "application/symlink" - } else if file.IsDirectory() { - mfr.files = append(mfr.files, file) - contentType = "application/x-directory" - } else { - // otherwise, use the file as a reader to read its contents - contentType = "application/octet-stream" - } - - mfr.currentFile = file - - // write the boundary and headers - header := make(textproto.MIMEHeader) - filename := url.QueryEscape(file.FileName()) - header.Set("Content-Disposition", fmt.Sprintf("file; filename=\"%s\"", filename)) - - header.Set("Content-Type", contentType) - if rf, ok := file.(*ReaderFile); ok { - header.Set("abspath", rf.AbsPath()) - } - - _, err := mfr.mpWriter.CreatePart(header) - if err != nil { - return 0, err - } - } - } - - // if the buffer has something in it, read from it - if mfr.buf.Len() > 0 { - return mfr.buf.Read(buf) - } - - // otherwise, read from file data - written, err = mfr.currentFile.Read(buf) - if err == io.EOF { - mfr.currentFile = nil - return written, nil - } - return written, err -} - -// Boundary returns the boundary string to be used to separate files in the multipart data -func (mfr *MultiFileReader) Boundary() string { - return mfr.mpWriter.Boundary() -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multipartfile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multipartfile.go deleted file mode 100644 index 8a4b0b2a55..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/multipartfile.go +++ /dev/null @@ -1,118 +0,0 @@ -package files - -import ( - "io" - "io/ioutil" - "mime" - "mime/multipart" - "net/url" -) - -const ( - multipartFormdataType = "multipart/form-data" - multipartMixedType = "multipart/mixed" - - applicationDirectory = "application/x-directory" - applicationSymlink = "application/symlink" - applicationFile = "application/octet-stream" - - contentTypeHeader = "Content-Type" -) - -// MultipartFile implements File, and is created from a `multipart.Part`. -// It can be either a directory or file (checked by calling `IsDirectory()`). -type MultipartFile struct { - File - - Part *multipart.Part - Reader *multipart.Reader - Mediatype string -} - -func NewFileFromPart(part *multipart.Part) (File, error) { - f := &MultipartFile{ - Part: part, - } - - contentType := part.Header.Get(contentTypeHeader) - switch contentType { - case applicationSymlink: - out, err := ioutil.ReadAll(part) - if err != nil { - return nil, err - } - - return &Symlink{ - Target: string(out), - name: f.FileName(), - }, nil - case "": // default to application/octet-stream - fallthrough - case applicationFile: - return &ReaderFile{ - reader: part, - filename: f.FileName(), - abspath: part.Header.Get("abspath"), - fullpath: f.FullPath(), - }, nil - } - - var err error - f.Mediatype, _, err = mime.ParseMediaType(contentType) - if err != nil { - return nil, err - } - - return f, nil -} - -func (f *MultipartFile) IsDirectory() bool { - return f.Mediatype == multipartFormdataType || f.Mediatype == applicationDirectory -} - -func (f *MultipartFile) NextFile() (File, error) { - if !f.IsDirectory() { - return nil, ErrNotDirectory - } - if f.Reader != nil { - part, err := f.Reader.NextPart() - if err != nil { - return nil, err - } - - return NewFileFromPart(part) - } - - return nil, io.EOF -} - -func (f *MultipartFile) FileName() string { - if f == nil || f.Part == nil { - return "" - } - - filename, err := url.QueryUnescape(f.Part.FileName()) - if err != nil { - // if there is a unescape error, just treat the name as unescaped - return f.Part.FileName() - } - return filename -} - -func (f *MultipartFile) FullPath() string { - return f.FileName() -} - -func (f *MultipartFile) Read(p []byte) (int, error) { - if f.IsDirectory() { - return 0, ErrNotReader - } - return f.Part.Read(p) -} - -func (f *MultipartFile) Close() error { - if f.IsDirectory() { - return ErrNotReader - } - return f.Part.Close() -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/package.json b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/package.json deleted file mode 100644 index 167621a743..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "magik6k", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-files" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-files" - }, - "gxDependencies": [ - { - "author": "The Go Authors", - "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", - "name": "sys", - "version": "0.2.0" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "", - "name": "go-ipfs-files", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.0.1" -} - diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/readerfile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/readerfile.go deleted file mode 100644 index 863641479d..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/readerfile.go +++ /dev/null @@ -1,70 +0,0 @@ -package files - -import ( - "errors" - "io" - "os" - "path/filepath" -) - -// ReaderFile is a implementation of File created from an `io.Reader`. -// ReaderFiles are never directories, and can be read from and closed. -type ReaderFile struct { - filename string - fullpath string - abspath string - reader io.ReadCloser - stat os.FileInfo -} - -func NewReaderFile(filename, path string, reader io.ReadCloser, stat os.FileInfo) *ReaderFile { - return &ReaderFile{filename, path, path, reader, stat} -} - -func NewReaderPathFile(filename, path string, reader io.ReadCloser, stat os.FileInfo) (*ReaderFile, error) { - abspath, err := filepath.Abs(path) - if err != nil { - return nil, err - } - - return &ReaderFile{filename, path, abspath, reader, stat}, nil -} - -func (f *ReaderFile) IsDirectory() bool { - return false -} - -func (f *ReaderFile) NextFile() (File, error) { - return nil, ErrNotDirectory -} - -func (f *ReaderFile) FileName() string { - return f.filename -} - -func (f *ReaderFile) FullPath() string { - return f.fullpath -} - -func (f *ReaderFile) AbsPath() string { - return f.abspath -} - -func (f *ReaderFile) Read(p []byte) (int, error) { - return f.reader.Read(p) -} - -func (f *ReaderFile) Close() error { - return f.reader.Close() -} - -func (f *ReaderFile) Stat() os.FileInfo { - return f.stat -} - -func (f *ReaderFile) Size() (int64, error) { - if f.stat == nil { - return 0, errors.New("File size unknown") - } - return f.stat.Size(), nil -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/serialfile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/serialfile.go deleted file mode 100644 index 15e6c90518..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/serialfile.go +++ /dev/null @@ -1,153 +0,0 @@ -package files - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - "syscall" -) - -// serialFile implements File, and reads from a path on the OS filesystem. -// No more than one file will be opened at a time (directories will advance -// to the next file when NextFile() is called). -type serialFile struct { - name string - path string - files []os.FileInfo - stat os.FileInfo - current *File - handleHiddenFiles bool -} - -func NewSerialFile(name, path string, hidden bool, stat os.FileInfo) (File, error) { - switch mode := stat.Mode(); { - case mode.IsRegular(): - file, err := os.Open(path) - if err != nil { - return nil, err - } - return NewReaderPathFile(name, path, file, stat) - case mode.IsDir(): - // for directories, stat all of the contents first, so we know what files to - // open when NextFile() is called - contents, err := ioutil.ReadDir(path) - if err != nil { - return nil, err - } - return &serialFile{name, path, contents, stat, nil, hidden}, nil - case mode&os.ModeSymlink != 0: - target, err := os.Readlink(path) - if err != nil { - return nil, err - } - return NewLinkFile(name, path, target, stat), nil - default: - return nil, fmt.Errorf("Unrecognized file type for %s: %s", name, mode.String()) - } -} - -func (f *serialFile) IsDirectory() bool { - // non-directories get created as a ReaderFile, so serialFiles should only - // represent directories - return true -} - -func (f *serialFile) NextFile() (File, error) { - // if a file was opened previously, close it - err := f.Close() - if err != nil { - switch err2 := err.(type) { - case *os.PathError: - if err2.Err != os.ErrClosed { - return nil, err - } - default: - return nil, err - } - } - - // if there aren't any files left in the root directory, we're done - if len(f.files) == 0 { - return nil, io.EOF - } - - stat := f.files[0] - f.files = f.files[1:] - - for !f.handleHiddenFiles && strings.HasPrefix(stat.Name(), ".") { - if len(f.files) == 0 { - return nil, io.EOF - } - - stat = f.files[0] - f.files = f.files[1:] - } - - // open the next file - fileName := filepath.ToSlash(filepath.Join(f.name, stat.Name())) - filePath := filepath.ToSlash(filepath.Join(f.path, stat.Name())) - - // recursively call the constructor on the next file - // if it's a regular file, we will open it as a ReaderFile - // if it's a directory, files in it will be opened serially - sf, err := NewSerialFile(fileName, filePath, f.handleHiddenFiles, stat) - if err != nil { - return nil, err - } - - f.current = &sf - - return sf, nil -} - -func (f *serialFile) FileName() string { - return f.name -} - -func (f *serialFile) FullPath() string { - return f.path -} - -func (f *serialFile) Read(p []byte) (int, error) { - return 0, io.EOF -} - -func (f *serialFile) Close() error { - // close the current file if there is one - if f.current != nil { - err := (*f.current).Close() - // ignore EINVAL error, the file might have already been closed - if err != nil && err != syscall.EINVAL { - return err - } - } - - return nil -} - -func (f *serialFile) Stat() os.FileInfo { - return f.stat -} - -func (f *serialFile) Size() (int64, error) { - if !f.stat.IsDir() { - return f.stat.Size(), nil - } - - var du int64 - err := filepath.Walk(f.FullPath(), func(p string, fi os.FileInfo, err error) error { - if err != nil { - return err - } - - if fi != nil && fi.Mode().IsRegular() { - du += fi.Size() - } - return nil - }) - - return du, err -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/slicefile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/slicefile.go deleted file mode 100644 index 8d18dcaa37..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/slicefile.go +++ /dev/null @@ -1,76 +0,0 @@ -package files - -import ( - "errors" - "io" -) - -// SliceFile implements File, and provides simple directory handling. -// It contains children files, and is created from a `[]File`. -// SliceFiles are always directories, and can't be read from or closed. -type SliceFile struct { - filename string - path string - files []File - n int -} - -func NewSliceFile(filename, path string, files []File) *SliceFile { - return &SliceFile{filename, path, files, 0} -} - -func (f *SliceFile) IsDirectory() bool { - return true -} - -func (f *SliceFile) NextFile() (File, error) { - if f.n >= len(f.files) { - return nil, io.EOF - } - file := f.files[f.n] - f.n++ - return file, nil -} - -func (f *SliceFile) FileName() string { - return f.filename -} - -func (f *SliceFile) FullPath() string { - return f.path -} - -func (f *SliceFile) Read(p []byte) (int, error) { - return 0, io.EOF -} - -func (f *SliceFile) Close() error { - return ErrNotReader -} - -func (f *SliceFile) Peek(n int) File { - return f.files[n] -} - -func (f *SliceFile) Length() int { - return len(f.files) -} - -func (f *SliceFile) Size() (int64, error) { - var size int64 - - for _, file := range f.files { - sizeFile, ok := file.(SizeFile) - if !ok { - return 0, errors.New("Could not get size of child file") - } - - s, err := sizeFile.Size() - if err != nil { - return 0, err - } - size += s - } - - return size, nil -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/webfile.go b/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/webfile.go deleted file mode 100644 index fcf4412ea4..0000000000 --- a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/webfile.go +++ /dev/null @@ -1,68 +0,0 @@ -package files - -import ( - "io" - "net/http" - "net/url" - "path/filepath" -) - -// WebFile is an implementation of File which reads it -// from a Web URL (http). A GET request will be performed -// against the source when calling Read(). -type WebFile struct { - body io.ReadCloser - url *url.URL -} - -// NewWebFile creates a WebFile with the given URL, which -// will be used to perform the GET request on Read(). -func NewWebFile(url *url.URL) *WebFile { - return &WebFile{ - url: url, - } -} - -// Read reads the File from it's web location. On the first -// call to Read, a GET request will be performed against the -// WebFile's URL, using Go's default HTTP client. Any further -// reads will keep reading from the HTTP Request body. -func (wf *WebFile) Read(b []byte) (int, error) { - if wf.body == nil { - resp, err := http.Get(wf.url.String()) - if err != nil { - return 0, err - } - wf.body = resp.Body - } - return wf.body.Read(b) -} - -// Close closes the WebFile (or the request body). -func (wf *WebFile) Close() error { - if wf.body == nil { - return nil - } - return wf.body.Close() -} - -// FullPath returns the "Host+Path" for this WebFile. -func (wf *WebFile) FullPath() string { - return wf.url.Host + wf.url.Path -} - -// FileName returns the last element of the URL -// path for this file. -func (wf *WebFile) FileName() string { - return filepath.Base(wf.url.Path) -} - -// IsDirectory returns false. -func (wf *WebFile) IsDirectory() bool { - return false -} - -// NextFile always returns an ErrNotDirectory error. -func (wf *WebFile) NextFile() (File, error) { - return nil, ErrNotDirectory -} diff --git a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/package.json b/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/package.json deleted file mode 100644 index ef5e93f6c2..0000000000 --- a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/whyrusleeping/go-sysinfo/issues" - }, - "gx": { - "dvcsimport": "github.com/whyrusleeping/go-sysinfo" - }, - "gxDependencies": [ - { - "author": "dustin", - "hash": "QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K", - "name": "go-humanize", - "version": "0.0.0" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "go-sysinfo", - "version": "0.0.0" -} diff --git a/vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/LICENSE b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files/LICENSE rename to vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/LICENSE diff --git a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/README.md b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/README.md similarity index 100% rename from vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/README.md rename to vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/README.md diff --git a/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/package.json b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/package.json new file mode 100644 index 0000000000..f14cb1476d --- /dev/null +++ b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/package.json @@ -0,0 +1,36 @@ +{ + "author": "stebalien", + "bugs": { + "url": "https://github.com/libp2p/go-conn-security" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-conn-security-multistream" + }, + "gxDependencies": [ + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-conn-security-multistream", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.26" +} + diff --git a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/ssms.go b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/ssms.go similarity index 94% rename from vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/ssms.go rename to vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/ssms.go index 54d6a4fbaf..26cf6a49df 100644 --- a/vendor/gx/ipfs/QmVCtDMyervzvQTi3yZrfTLXtXSuUYQaowCG9hJdHu6gAM/go-conn-security-multistream/ssms.go +++ b/vendor/gx/ipfs/QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z/go-conn-security-multistream/ssms.go @@ -5,8 +5,8 @@ import ( "fmt" "net" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - connsec "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" + connsec "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" mss "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" ) diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/.travis.yml b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/.travis.yml new file mode 100644 index 0000000000..0b8d9efcc9 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/.travis.yml @@ -0,0 +1,17 @@ +os: + - linux + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +sudo: false #docker containers for CI + +env: GOTFLAGS="-race -cpu 5" diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/LICENSE b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/LICENSE rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/LICENSE diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/Makefile b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/Makefile similarity index 100% rename from vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/Makefile rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/Makefile diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/README.md b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/README.md new file mode 100644 index 0000000000..7a555e99c7 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/README.md @@ -0,0 +1,91 @@ +# Deprecated + +**NOTE:** *Multicodec* is not deprecated, just this library. + +This library has been deprecated to reduce confusion concerning the multicodec project. It is *not* an implementation of multicodec as it exists today (as described in the [project's README](https://github.com/multiformats/multicodec)). Instead, it's closer to the *multistream* protocol but we already have an actively used `go-multistream` repository (for multistream-select). + +*This library will not be maintained.* + +--- + +# go-multicodec + + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) +[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![Travis CI](https://img.shields.io/travis/multiformats/go-multicodec.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multicodec) +[![codecov.io](https://img.shields.io/codecov/c/github/multiformats/go-multicodec.svg?style=flat-square&branch=master)](https://codecov.io/github/multiformats/go-multicodec?branch=master) +[![GoDoc](https://godoc.org/github.com/multiformats/go-multicodec?status.svg)](https://godoc.org/github.com/multiformats/go-multicodec) + +> [multicodec](https://github.com/multiformats/multicodec) implementation in Go. + +### Supported codecs + +- `/cbor` +- `/json` +- `/msgio` +- `/msgpack` +- `/protobuf` + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Maintainers](#maintainers) +- [Contribute](#contribute) +- [License](#license) + +## Install + +```sh +go get github.com/multiformats/go-multicodec +``` + +## Usage + +Look at the Godocs: + +- https://godoc.org/github.com/multiformats/go-multicodec + +```go +import ( + "os" + "io" + + cbor "github.com/multiformats/go-multicodec/cbor" + json "github.com/multiformats/go-multicodec/json" +) + +func main() { + dec := cbor.Multicodec().Decoder(os.Stdin) + enc := json.Multicodec(false).Encoder(os.Stdout) + + for { + var item interface{} + + if err := dec.Decode(&item); err == io.EOF { + break + } else if err != nil { + panic(err) + } + + if err := enc.Encode(&item); err != nil { + panic(err) + } + } +} +``` + +## Contribute + +Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multicodec/issues). + +Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/b64/codec.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/b64/codec.go new file mode 100644 index 0000000000..e1228f071a --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/b64/codec.go @@ -0,0 +1,64 @@ +package b64 + +import ( + "encoding/base64" + "io" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + base "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base" +) + +var ( + HeaderPath = "/base64/" + Header = mc.Header([]byte(HeaderPath)) + multic = mc.NewMulticodecFromCodec(Codec(), Header) +) + +type codec struct{} + +type decoder struct { + r io.Reader +} + +func (d decoder) Decode(v interface{}) error { + out, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + + _, err := d.r.Read(out) + + return err +} + +func (codec) Decoder(r io.Reader) mc.Decoder { + return decoder{base64.NewDecoder(base64.StdEncoding, r)} +} + +type encoder struct { + w io.WriteCloser +} + +func (e encoder) Encode(v interface{}) error { + slice, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + _, err := e.w.Write(slice) + if err != nil { + return err + } + return e.w.Close() +} + +func (codec) Encoder(w io.Writer) mc.Encoder { + return encoder{base64.NewEncoder(base64.StdEncoding, w)} +} + +func Codec() mc.Codec { + return codec{} +} + +func Multicodec() mc.Multicodec { + return multic +} diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/bin/codec.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/bin/codec.go new file mode 100644 index 0000000000..d1d46dedec --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/bin/codec.go @@ -0,0 +1,64 @@ +package bin + +import ( + "io" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + base "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base" +) + +var ( + HeaderPath = "/bin/" + Header = mc.Header([]byte(HeaderPath)) + multic = mc.NewMulticodecFromCodec(Codec(), Header) +) + +type codec struct{} + +func (codec) Header() []byte { + return Header +} + +type decoder struct { + r io.Reader +} + +func (d decoder) Decode(v interface{}) error { + slice, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + + _, err := d.r.Read(slice) + return err +} + +func (codec) Decoder(r io.Reader) mc.Decoder { + return decoder{r} +} + +type encoder struct { + w io.Writer +} + +func (e encoder) Encode(v interface{}) error { + slice, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + + _, err := e.w.Write(slice) + return err +} + +func (codec) Encoder(w io.Writer) mc.Encoder { + return encoder{w} +} + +func Codec() mc.Codec { + return codec{} +} + +func Multicodec() mc.Multicodec { + return multic +} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/errors.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/errors.go similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/base/errors.go rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/errors.go diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/hex/codec.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/hex/codec.go new file mode 100644 index 0000000000..f6f7a6c3f1 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/hex/codec.go @@ -0,0 +1,69 @@ +package bin + +import ( + "encoding/hex" + "io" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + base "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base" +) + +var ( + HeaderPath = "/base16/" + Header = mc.Header([]byte(HeaderPath)) + multic = mc.NewMulticodecFromCodec(Codec(), Header) +) + +type codec struct{} + +type decoder struct { + r io.Reader +} + +func (d decoder) Decode(v interface{}) error { + out, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + + buf := make([]byte, hex.EncodedLen(len(out))) + _, err := d.r.Read(buf) + if err != nil { + return err + } + _, err = hex.Decode(out, buf) + return err +} + +func (codec) Decoder(r io.Reader) mc.Decoder { + return decoder{r} +} + +type encoder struct { + w io.Writer +} + +func (e encoder) Encode(v interface{}) error { + slice, ok := v.([]byte) + if !ok { + return base.ErrExpectedByteSlice + } + + buf := make([]byte, hex.EncodedLen(len(slice))) + hex.Encode(buf, slice) + + _, err := e.w.Write(buf) + return err +} + +func (codec) Encoder(w io.Writer) mc.Encoder { + return encoder{w} +} + +func Codec() mc.Codec { + return codec{} +} + +func Multicodec() mc.Multicodec { + return multic +} diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/mux/mux.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/mux/mux.go new file mode 100644 index 0000000000..5a98a09ed8 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/mux/mux.go @@ -0,0 +1,20 @@ +package basemux + +import ( + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + mux "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux" + + b64 "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/b64" + bin "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/bin" + hex "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/base/hex" +) + +func AllBasesMux() *mux.Multicodec { + m := mux.MuxMulticodec([]mc.Multicodec{ + hex.Multicodec(), + b64.Multicodec(), + bin.Multicodec(), + }, mux.SelectFirst) + m.Wrap = false + return m +} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/cbor/cbor.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/cbor/cbor.go similarity index 95% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/cbor/cbor.go rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/cbor/cbor.go index 0916b42d13..3f7bb2d955 100644 --- a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/cbor/cbor.go +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/cbor/cbor.go @@ -5,7 +5,7 @@ import ( cbor "gx/ipfs/QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd/cbor/go" - mc "gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec" + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" ) var HeaderPath string diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/coding.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/coding.go similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/coding.go rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/coding.go diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/header.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/header.go similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/header.go rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/header.go diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/json/json.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/json/json.go new file mode 100644 index 0000000000..2f27c402ae --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/json/json.go @@ -0,0 +1,176 @@ +package mc_json + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + + msgio "gx/ipfs/QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf/go-msgio" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" +) + +var HeaderPath string +var Header []byte +var HeaderMsgioPath string +var HeaderMsgio []byte + +func init() { + HeaderPath = "/json" + HeaderMsgioPath = "/json/msgio" + Header = mc.Header([]byte(HeaderPath)) + HeaderMsgio = mc.Header([]byte(HeaderMsgioPath)) +} + +type codec struct { + mc bool + msgio bool +} + +func Codec(msgio bool) mc.Codec { + return &codec{mc: false, msgio: msgio} +} + +func Multicodec(msgio bool) mc.Multicodec { + return &codec{mc: true, msgio: msgio} +} + +func (c *codec) Encoder(w io.Writer) mc.Encoder { + buf := bytes.NewBuffer(nil) + return &encoder{ + w: w, + c: c, + buf: buf, + enc: json.NewEncoder(buf), + } +} + +func (c *codec) Decoder(r io.Reader) mc.Decoder { + if !c.mc && !c.msgio { + // shortcut. + return json.NewDecoder(r) + } + return &decoder{ + r: r, + c: c, + } +} + +func (c *codec) Header() []byte { + if c.msgio { + return HeaderMsgio + } + return Header +} + +type encoder struct { + w io.Writer + c *codec + enc *json.Encoder + buf *bytes.Buffer +} + +type decoder struct { + remainder bytes.Buffer + r io.Reader + c *codec +} + +func (c *encoder) Encode(v interface{}) error { + defer c.buf.Reset() + w := c.w + + if c.c.mc { + // if multicodec, write the header first + if _, err := c.w.Write(c.c.Header()); err != nil { + return err + } + } + if c.c.msgio { + w = msgio.NewWriter(w) + } + + // recast to deal with map[interface{}]interface{} case + vr, err := recast(v) + if err != nil { + return err + } + + if err := c.enc.Encode(vr); err != nil { + return err + } + + _, err = io.Copy(w, c.buf) + return err +} + +func (c *decoder) Decode(v interface{}) error { + // Pick up any leftover bytes from last time. + r := io.MultiReader(&c.remainder, c.r) + + if c.c.mc { + // if multicodec, consume the header first + if err := mc.ConsumeHeader(r, c.c.Header()); err != nil { + return err + } + } + if c.c.msgio { + // Might as well read everything up-front to save read calls. + reader := msgio.NewReader(r) + msg, err := reader.ReadMsg() + if err != nil { + return err + } + err = json.Unmarshal(msg, v) + reader.ReleaseMsg(msg) + return err + } + + jDecoder := json.NewDecoder(r) + err := jDecoder.Decode(v) + + // Put back any additional bytes read. + var buf bytes.Buffer + + // First the ones in the decoder. + io.Copy(&buf, jDecoder.Buffered()) + + // Then any still in the current remainder. + io.Copy(&buf, &c.remainder) + + // Save them for next time. + c.remainder = buf + + var oneByte [1]byte + io.MultiReader(&c.remainder, c.r).Read(oneByte[:]) + if oneByte[0] != '\n' { + return fmt.Errorf("expected newline after json") + } + + return err +} + +func recast(v interface{}) (cv interface{}, err error) { + switch v.(type) { + case map[interface{}]interface{}: + vmi := v.(map[interface{}]interface{}) + vms := make(map[string]interface{}, len(vmi)) + for k, v2 := range vmi { + ks, ok := k.(string) + if !ok { + return v, mc.ErrType + } + + rv2, err := recast(v2) + if err != nil { + return v, err + } + + vms[ks] = rv2 + } + return vms, nil + default: + return v, nil // hope for the best. + } +} diff --git a/vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/multicodec.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/multicodec.go similarity index 100% rename from vendor/gx/ipfs/QmYMiyZRYDmhMr2phMc4FGrYbsyzvR751BgeobnWroiq2z/go-multicodec/multicodec.go rename to vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/multicodec.go diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/all.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/all.go new file mode 100644 index 0000000000..cf7f4130f4 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/all.go @@ -0,0 +1,15 @@ +package muxcodec + +import ( + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" + cbor "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/cbor" + json "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/json" +) + +func StandardMux() *Multicodec { + return MuxMulticodec([]mc.Multicodec{ + cbor.Multicodec(), + json.Multicodec(false), + json.Multicodec(true), + }, SelectFirst) +} diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/mux.go b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/mux.go new file mode 100644 index 0000000000..8242f4f4e7 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/mux/mux.go @@ -0,0 +1,120 @@ +package muxcodec + +import ( + "bytes" + "fmt" + "io" + + mc "gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec" +) + +var ( + ErrNoCodec = fmt.Errorf("no suitable codec") +) + +var Header []byte + +func init() { + Header = mc.Header([]byte("/multicodec")) +} + +// SelectCodec is a function that selects which codecs are able to +// marshal a given datastructure, and orders them (to be tried first). +type SelectCodec func(v interface{}, codecs []mc.Multicodec) mc.Multicodec + +// SelectFirst is the default SelectCodec function. selects the first +// codec given. +func SelectFirst(v interface{}, codecs []mc.Multicodec) mc.Multicodec { + return codecs[0] +} + +// MuxMulticodec returns a multicodec that muxes between given codecs. +// It uses the given SelectCodec function when marshaling, to select +// the best codec to use. +func MuxMulticodec(codecs []mc.Multicodec, sel SelectCodec) *Multicodec { + if sel == nil { + sel = SelectFirst + } + return &Multicodec{codecs, sel, true, nil} +} + +type Multicodec struct { + Codecs []mc.Multicodec // subcodecs to use + Select SelectCodec // pick a subcodec for encoding + Wrap bool // whether to wrap with own header + Last mc.Multicodec // the last subcodec used +} + +func (c *Multicodec) Encoder(w io.Writer) mc.Encoder { + return &encoder{w, c} +} + +func (c *Multicodec) Decoder(r io.Reader) mc.Decoder { + return &decoder{r, c} +} + +func (c *Multicodec) Header() []byte { + return Header +} + +type encoder struct { + w io.Writer + c *Multicodec +} + +type decoder struct { + r io.Reader + c *Multicodec +} + +func (c *encoder) Encode(v interface{}) error { + subc := c.c.Select(v, c.c.Codecs) + if subc == nil { + return ErrNoCodec + } + + if c.c.Wrap { // write multicodec header. + if _, err := c.w.Write(c.c.Header()); err != nil { + return err + } + } + + c.c.Last = subc + return subc.Encoder(c.w).Encode(v) +} + +func (c *decoder) Decode(v interface{}) error { + if c.c.Wrap { // read multicodec header. + if err := mc.ConsumeHeader(c.r, c.c.Header()); err != nil { + return err + } + } + + // get next header, to select codec + hdr, err := mc.ReadHeader(c.r) + if err != nil { + return err + } + + // "unwind" the read as subc consumes header + r := mc.WrapHeaderReader(hdr, c.r) + + subc := CodecWithHeader(hdr, c.c.Codecs) + if subc == nil { + return fmt.Errorf("no codec for %s", hdr) + } + + c.c.Last = subc + return subc.Decoder(r).Decode(v) +} + +func CodecWithHeader(hdr []byte, codecs []mc.Multicodec) mc.Multicodec { + // we'll look through the list. should be small. + // if huge, consider a map. + for _, c := range codecs { + if bytes.Equal(hdr, c.Header()) { + return c + } + } + return nil +} diff --git a/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/package.json b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/package.json new file mode 100644 index 0000000000..bd7967b2e2 --- /dev/null +++ b/vendor/gx/ipfs/QmZb2Hc6sQeFpmnSuFLYH2eWjaMcPPtzDzXY1PkMM1sjnP/go-multicodec/package.json @@ -0,0 +1,42 @@ +{ + "author": "multiformats", + "bugs": { + "url": "https://github.com/multiformats/go-multicodec/issues" + }, + "gx": { + "dvcsimport": "github.com/multiformats/go-multicodec" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmcxL9MDzSU5Mj1GcWZD8CXkAFuJXjdbjotZ93o371bKSf", + "name": "go-msgio", + "version": "0.0.6" + }, + { + "author": "whyrusleeping", + "hash": "QmcRKRQjNc2JZPHApR32fbkZVd6WXG2Ch9Kcy7sPxuAJgd", + "name": "cbor", + "version": "0.2.3" + }, + { + "author": "ugorji", + "hash": "QmVTAmbCaPqdfbmpWDCJMQNFxbyJoG2USFsumXmTWY5LFp", + "name": "go-codec", + "version": "2017.10.18" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-multicodec", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.8" +} + diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/.travis.yml b/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/.travis.yml deleted file mode 100644 index c0724130e4..0000000000 --- a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - - osx - -language: go - -go: - - 1.9 - -install: true - -before_install: - - make deps - -script: - - go vet - - $GOPATH/bin/goveralls -service="travis-ci" - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/Makefile b/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/Makefile deleted file mode 100644 index c00be60a97..0000000000 --- a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -all: deps - -gx: - go get github.com/whyrusleeping/gx - go get github.com/whyrusleeping/gx-go - -covertools: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover - -deps: gx covertools - gx --verbose install --global - gx-go rewrite - -publish: - gx-go rewrite --undo - diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/package.json b/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/package.json deleted file mode 100644 index f3acd870bd..0000000000 --- a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-addr" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-addr" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.11.0", - "language": "go", - "license": "", - "name": "go-ipfs-addr", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.25" -} - diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/.travis.yml b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/.travis.yml new file mode 100644 index 0000000000..58d60ddf4a --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/LICENSE b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/LICENSE new file mode 100644 index 0000000000..3f05397b70 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 libp2p + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/Makefile b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/Makefile new file mode 100644 index 0000000000..3c64b37d6e --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/Makefile @@ -0,0 +1,7 @@ +gx: + go get -u github.com/whyrusleeping/gx + go get -u github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/README.md b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/README.md new file mode 100644 index 0000000000..75740d928d --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/README.md @@ -0,0 +1,25 @@ +# go-libp2p-autonat + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) + +> Ambient NAT discovery + +This package provides an ambient NAT autodiscovery service. +It allows peers to figure out their NAT dialability situation by using test dial backs through peers providing the AutoNAT service. + +## Documentation + +See https://godoc.org/github.com/libp2p/go-libp2p-autonat + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-discovery/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +## License + +MIT diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/autonat.go b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/autonat.go new file mode 100644 index 0000000000..492b7a9e47 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/autonat.go @@ -0,0 +1,217 @@ +package autonat + +import ( + "context" + "errors" + "math/rand" + "sync" + "time" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +// NATStatus is the state of NAT as detected by the ambient service. +type NATStatus int + +const ( + // NAT status is unknown; this means that the ambient service has not been + // able to decide the presence of NAT in the most recent attempt to test + // dial through known autonat peers. initial state. + NATStatusUnknown NATStatus = iota + // NAT status is publicly dialable + NATStatusPublic + // NAT status is private network + NATStatusPrivate +) + +var ( + AutoNATBootDelay = 15 * time.Second + AutoNATRetryInterval = 90 * time.Second + AutoNATRefreshInterval = 15 * time.Minute + AutoNATRequestTimeout = 60 * time.Second +) + +// AutoNAT is the interface for ambient NAT autodiscovery +type AutoNAT interface { + // Status returns the current NAT status + Status() NATStatus + // PublicAddr returns the public dial address when NAT status is public and an + // error otherwise + PublicAddr() (ma.Multiaddr, error) +} + +// AmbientAutoNAT is the implementation of ambient NAT autodiscovery +type AmbientAutoNAT struct { + ctx context.Context + host host.Host + + getAddrs GetAddrs + + mx sync.Mutex + peers map[peer.ID][]ma.Multiaddr + status NATStatus + addr ma.Multiaddr + // Reflects the confidence on of the NATStatus being private, as a single + // dialback may fail for reasons unrelated to NAT. + // If it is <3, then multiple autoNAT peers may be contacted for dialback + // If only a single autoNAT peer is known, then the confidence increases + // for each failure until it reaches 3. + confidence int +} + +// NewAutoNAT creates a new ambient NAT autodiscovery instance attached to a host +// If getAddrs is nil, h.Addrs will be used +func NewAutoNAT(ctx context.Context, h host.Host, getAddrs GetAddrs) AutoNAT { + if getAddrs == nil { + getAddrs = h.Addrs + } + + as := &AmbientAutoNAT{ + ctx: ctx, + host: h, + getAddrs: getAddrs, + peers: make(map[peer.ID][]ma.Multiaddr), + status: NATStatusUnknown, + } + + h.Network().Notify(as) + go as.background() + + return as +} + +func (as *AmbientAutoNAT) Status() NATStatus { + return as.status +} + +func (as *AmbientAutoNAT) PublicAddr() (ma.Multiaddr, error) { + as.mx.Lock() + defer as.mx.Unlock() + + if as.status != NATStatusPublic { + return nil, errors.New("NAT Status is not public") + } + + return as.addr, nil +} + +func (as *AmbientAutoNAT) background() { + // wait a bit for the node to come online and establish some connections + // before starting autodetection + select { + case <-time.After(AutoNATBootDelay): + case <-as.ctx.Done(): + return + } + + for { + as.autodetect() + + delay := AutoNATRefreshInterval + if as.status == NATStatusUnknown { + delay = AutoNATRetryInterval + } + + select { + case <-time.After(delay): + case <-as.ctx.Done(): + return + } + } +} + +func (as *AmbientAutoNAT) autodetect() { + peers := as.getPeers() + + if len(peers) == 0 { + log.Debugf("skipping NAT auto detection; no autonat peers") + return + } + + cli := NewAutoNATClient(as.host, as.getAddrs) + failures := 0 + + for _, pi := range peers { + ctx, cancel := context.WithTimeout(as.ctx, AutoNATRequestTimeout) + as.host.Peerstore().AddAddrs(pi.ID, pi.Addrs, pstore.TempAddrTTL) + a, err := cli.DialBack(ctx, pi.ID) + cancel() + + switch { + case err == nil: + log.Debugf("NAT status is public; address through %s: %s", pi.ID.Pretty(), a.String()) + as.mx.Lock() + as.addr = a + as.status = NATStatusPublic + as.confidence = 0 + as.mx.Unlock() + return + + case IsDialError(err): + log.Debugf("dial error through %s: %s", pi.ID.Pretty(), err.Error()) + failures++ + if failures >= 3 || as.confidence >= 3 { // 3 times is enemy action + log.Debugf("NAT status is private") + as.mx.Lock() + as.status = NATStatusPrivate + as.confidence = 3 + as.mx.Unlock() + return + } + + default: + log.Debugf("Error dialing through %s: %s", pi.ID.Pretty(), err.Error()) + } + } + + as.mx.Lock() + if failures > 0 { + as.status = NATStatusPrivate + as.confidence++ + log.Debugf("NAT status is private") + } else { + as.status = NATStatusUnknown + as.confidence = 0 + log.Debugf("NAT status is unknown") + } + as.mx.Unlock() +} + +func (as *AmbientAutoNAT) getPeers() []pstore.PeerInfo { + as.mx.Lock() + defer as.mx.Unlock() + + if len(as.peers) == 0 { + return nil + } + + var connected, others []pstore.PeerInfo + + for p, addrs := range as.peers { + if as.host.Network().Connectedness(p) == inet.Connected { + connected = append(connected, pstore.PeerInfo{ID: p, Addrs: addrs}) + } else { + others = append(others, pstore.PeerInfo{ID: p, Addrs: addrs}) + } + } + + shufflePeers(connected) + + if len(connected) < 3 { + shufflePeers(others) + return append(connected, others...) + } else { + return connected + } +} + +func shufflePeers(peers []pstore.PeerInfo) { + for i := range peers { + j := rand.Intn(i + 1) + peers[i], peers[j] = peers[j], peers[i] + } +} diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/client.go b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/client.go new file mode 100644 index 0000000000..41b97a93d2 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/client.go @@ -0,0 +1,106 @@ +package autonat + +import ( + "context" + "fmt" + + pb "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" +) + +// AutoNATClient is a stateless client interface to AutoNAT peers +type AutoNATClient interface { + // DialBack requests from a peer providing AutoNAT services to test dial back + // and report the address on a successful connection. + DialBack(ctx context.Context, p peer.ID) (ma.Multiaddr, error) +} + +// AutoNATError is the class of errors signalled by AutoNAT services +type AutoNATError struct { + Status pb.Message_ResponseStatus + Text string +} + +// GetAddrs is a function that returns the addresses to dial back +type GetAddrs func() []ma.Multiaddr + +// NewAutoNATClient creates a fresh instance of an AutoNATClient +// If getAddrs is nil, h.Addrs will be used +func NewAutoNATClient(h host.Host, getAddrs GetAddrs) AutoNATClient { + if getAddrs == nil { + getAddrs = h.Addrs + } + return &client{h: h, getAddrs: getAddrs} +} + +type client struct { + h host.Host + getAddrs GetAddrs +} + +func (c *client) DialBack(ctx context.Context, p peer.ID) (ma.Multiaddr, error) { + s, err := c.h.NewStream(ctx, p, AutoNATProto) + if err != nil { + return nil, err + } + defer s.Close() + + r := ggio.NewDelimitedReader(s, inet.MessageSizeMax) + w := ggio.NewDelimitedWriter(s) + + req := newDialMessage(pstore.PeerInfo{ID: c.h.ID(), Addrs: c.getAddrs()}) + err = w.WriteMsg(req) + if err != nil { + return nil, err + } + + var res pb.Message + err = r.ReadMsg(&res) + if err != nil { + return nil, err + } + + if res.GetType() != pb.Message_DIAL_RESPONSE { + return nil, fmt.Errorf("Unexpected response: %s", res.GetType().String()) + } + + status := res.GetDialResponse().GetStatus() + switch status { + case pb.Message_OK: + addr := res.GetDialResponse().GetAddr() + return ma.NewMultiaddrBytes(addr) + + default: + return nil, AutoNATError{Status: status, Text: res.GetDialResponse().GetStatusText()} + } +} + +func (e AutoNATError) Error() string { + return fmt.Sprintf("AutoNAT error: %s (%s)", e.Text, e.Status.String()) +} + +func (e AutoNATError) IsDialError() bool { + return e.Status == pb.Message_E_DIAL_ERROR +} + +func (e AutoNATError) IsDialRefused() bool { + return e.Status == pb.Message_E_DIAL_REFUSED +} + +// IsDialError returns true if the AutoNAT peer signalled an error dialing back +func IsDialError(e error) bool { + ae, ok := e.(AutoNATError) + return ok && ae.IsDialError() +} + +// IsDialRefused returns true if the AutoNAT peer signalled refusal to dial back +func IsDialRefused(e error) bool { + ae, ok := e.(AutoNATError) + return ok && ae.IsDialRefused() +} diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/notify.go b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/notify.go new file mode 100644 index 0000000000..ff850dcea5 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/notify.go @@ -0,0 +1,41 @@ +package autonat + +import ( + "time" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" +) + +var _ inet.Notifiee = (*AmbientAutoNAT)(nil) + +var AutoNATIdentifyDelay = 5 * time.Second + +func (as *AmbientAutoNAT) Listen(net inet.Network, a ma.Multiaddr) {} +func (as *AmbientAutoNAT) ListenClose(net inet.Network, a ma.Multiaddr) {} +func (as *AmbientAutoNAT) OpenedStream(net inet.Network, s inet.Stream) {} +func (as *AmbientAutoNAT) ClosedStream(net inet.Network, s inet.Stream) {} + +func (as *AmbientAutoNAT) Connected(net inet.Network, c inet.Conn) { + p := c.RemotePeer() + + go func() { + // add some delay for identify + time.Sleep(AutoNATIdentifyDelay) + + protos, err := as.host.Peerstore().SupportsProtocols(p, AutoNATProto) + if err != nil { + log.Debugf("error retrieving supported protocols for peer %s: %s", p, err) + return + } + + if len(protos) > 0 { + log.Infof("Discovered AutoNAT peer %s", p.Pretty()) + as.mx.Lock() + as.peers[p] = as.host.Peerstore().Addrs(p) + as.mx.Unlock() + } + }() +} + +func (as *AmbientAutoNAT) Disconnected(net inet.Network, c inet.Conn) {} diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/package.json b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/package.json new file mode 100644 index 0000000000..f64a7ac373 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/package.json @@ -0,0 +1,69 @@ +{ + "author": "vyzo", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-autonat" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmcBTHN7uAMBdkzRoQ3n9cE7tGu8Ubd9zmahjskjTRw4Uf", + "name": "go-libp2p-blankhost", + "version": "0.3.26" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-libp2p-autonat", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.0.12" +} + diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/Makefile b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/Makefile new file mode 100644 index 0000000000..dd21e878f8 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/Makefile @@ -0,0 +1,6 @@ +pbgos := $(patsubst %.proto,%.pb.go,$(wildcard *.proto)) + +all: $(pbgos) + +%.pb.go: %.proto + protoc --gogofast_out=. --proto_path=$(GOPATH)/src:. $< diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.pb.go b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.pb.go new file mode 100644 index 0000000000..d6f9623d75 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.pb.go @@ -0,0 +1,1242 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: autonat.proto + +package autonat_pb + +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Message_MessageType int32 + +const ( + Message_DIAL Message_MessageType = 0 + Message_DIAL_RESPONSE Message_MessageType = 1 +) + +var Message_MessageType_name = map[int32]string{ + 0: "DIAL", + 1: "DIAL_RESPONSE", +} + +var Message_MessageType_value = map[string]int32{ + "DIAL": 0, + "DIAL_RESPONSE": 1, +} + +func (x Message_MessageType) Enum() *Message_MessageType { + p := new(Message_MessageType) + *p = x + return p +} + +func (x Message_MessageType) String() string { + return proto.EnumName(Message_MessageType_name, int32(x)) +} + +func (x *Message_MessageType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Message_MessageType_value, data, "Message_MessageType") + if err != nil { + return err + } + *x = Message_MessageType(value) + return nil +} + +func (Message_MessageType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0, 0} +} + +type Message_ResponseStatus int32 + +const ( + Message_OK Message_ResponseStatus = 0 + Message_E_DIAL_ERROR Message_ResponseStatus = 100 + Message_E_DIAL_REFUSED Message_ResponseStatus = 101 + Message_E_BAD_REQUEST Message_ResponseStatus = 200 + Message_E_INTERNAL_ERROR Message_ResponseStatus = 300 +) + +var Message_ResponseStatus_name = map[int32]string{ + 0: "OK", + 100: "E_DIAL_ERROR", + 101: "E_DIAL_REFUSED", + 200: "E_BAD_REQUEST", + 300: "E_INTERNAL_ERROR", +} + +var Message_ResponseStatus_value = map[string]int32{ + "OK": 0, + "E_DIAL_ERROR": 100, + "E_DIAL_REFUSED": 101, + "E_BAD_REQUEST": 200, + "E_INTERNAL_ERROR": 300, +} + +func (x Message_ResponseStatus) Enum() *Message_ResponseStatus { + p := new(Message_ResponseStatus) + *p = x + return p +} + +func (x Message_ResponseStatus) String() string { + return proto.EnumName(Message_ResponseStatus_name, int32(x)) +} + +func (x *Message_ResponseStatus) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Message_ResponseStatus_value, data, "Message_ResponseStatus") + if err != nil { + return err + } + *x = Message_ResponseStatus(value) + return nil +} + +func (Message_ResponseStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0, 1} +} + +type Message struct { + Type *Message_MessageType `protobuf:"varint,1,opt,name=type,enum=autonat.pb.Message_MessageType" json:"type,omitempty"` + Dial *Message_Dial `protobuf:"bytes,2,opt,name=dial" json:"dial,omitempty"` + DialResponse *Message_DialResponse `protobuf:"bytes,3,opt,name=dialResponse" json:"dialResponse,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetType() Message_MessageType { + if m != nil && m.Type != nil { + return *m.Type + } + return Message_DIAL +} + +func (m *Message) GetDial() *Message_Dial { + if m != nil { + return m.Dial + } + return nil +} + +func (m *Message) GetDialResponse() *Message_DialResponse { + if m != nil { + return m.DialResponse + } + return nil +} + +type Message_PeerInfo struct { + Id []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message_PeerInfo) Reset() { *m = Message_PeerInfo{} } +func (m *Message_PeerInfo) String() string { return proto.CompactTextString(m) } +func (*Message_PeerInfo) ProtoMessage() {} +func (*Message_PeerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0, 0} +} +func (m *Message_PeerInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message_PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message_PeerInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message_PeerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_PeerInfo.Merge(m, src) +} +func (m *Message_PeerInfo) XXX_Size() int { + return m.Size() +} +func (m *Message_PeerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_Message_PeerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_Message_PeerInfo proto.InternalMessageInfo + +func (m *Message_PeerInfo) GetId() []byte { + if m != nil { + return m.Id + } + return nil +} + +func (m *Message_PeerInfo) GetAddrs() [][]byte { + if m != nil { + return m.Addrs + } + return nil +} + +type Message_Dial struct { + Peer *Message_PeerInfo `protobuf:"bytes,1,opt,name=peer" json:"peer,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message_Dial) Reset() { *m = Message_Dial{} } +func (m *Message_Dial) String() string { return proto.CompactTextString(m) } +func (*Message_Dial) ProtoMessage() {} +func (*Message_Dial) Descriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0, 1} +} +func (m *Message_Dial) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message_Dial) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message_Dial.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message_Dial) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Dial.Merge(m, src) +} +func (m *Message_Dial) XXX_Size() int { + return m.Size() +} +func (m *Message_Dial) XXX_DiscardUnknown() { + xxx_messageInfo_Message_Dial.DiscardUnknown(m) +} + +var xxx_messageInfo_Message_Dial proto.InternalMessageInfo + +func (m *Message_Dial) GetPeer() *Message_PeerInfo { + if m != nil { + return m.Peer + } + return nil +} + +type Message_DialResponse struct { + Status *Message_ResponseStatus `protobuf:"varint,1,opt,name=status,enum=autonat.pb.Message_ResponseStatus" json:"status,omitempty"` + StatusText *string `protobuf:"bytes,2,opt,name=statusText" json:"statusText,omitempty"` + Addr []byte `protobuf:"bytes,3,opt,name=addr" json:"addr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message_DialResponse) Reset() { *m = Message_DialResponse{} } +func (m *Message_DialResponse) String() string { return proto.CompactTextString(m) } +func (*Message_DialResponse) ProtoMessage() {} +func (*Message_DialResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a04e278ef61ac07a, []int{0, 2} +} +func (m *Message_DialResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message_DialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message_DialResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message_DialResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_DialResponse.Merge(m, src) +} +func (m *Message_DialResponse) XXX_Size() int { + return m.Size() +} +func (m *Message_DialResponse) XXX_DiscardUnknown() { + xxx_messageInfo_Message_DialResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_Message_DialResponse proto.InternalMessageInfo + +func (m *Message_DialResponse) GetStatus() Message_ResponseStatus { + if m != nil && m.Status != nil { + return *m.Status + } + return Message_OK +} + +func (m *Message_DialResponse) GetStatusText() string { + if m != nil && m.StatusText != nil { + return *m.StatusText + } + return "" +} + +func (m *Message_DialResponse) GetAddr() []byte { + if m != nil { + return m.Addr + } + return nil +} + +func init() { + proto.RegisterEnum("autonat.pb.Message_MessageType", Message_MessageType_name, Message_MessageType_value) + proto.RegisterEnum("autonat.pb.Message_ResponseStatus", Message_ResponseStatus_name, Message_ResponseStatus_value) + proto.RegisterType((*Message)(nil), "autonat.pb.Message") + proto.RegisterType((*Message_PeerInfo)(nil), "autonat.pb.Message.PeerInfo") + proto.RegisterType((*Message_Dial)(nil), "autonat.pb.Message.Dial") + proto.RegisterType((*Message_DialResponse)(nil), "autonat.pb.Message.DialResponse") +} + +func init() { proto.RegisterFile("autonat.proto", fileDescriptor_a04e278ef61ac07a) } + +var fileDescriptor_a04e278ef61ac07a = []byte{ + // 372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xcf, 0x8a, 0xda, 0x50, + 0x14, 0xc6, 0xbd, 0x31, 0xb5, 0xf6, 0x18, 0xc3, 0xed, 0xa1, 0x85, 0x20, 0x25, 0x0d, 0x59, 0x49, + 0x29, 0x22, 0x76, 0x53, 0xba, 0x53, 0x72, 0x0b, 0xd2, 0x56, 0xed, 0x49, 0x5c, 0x87, 0x94, 0xdc, + 0x0e, 0x01, 0x31, 0x21, 0x89, 0x30, 0x6e, 0xe6, 0x89, 0x66, 0x3b, 0xef, 0xe0, 0x72, 0x1e, 0x61, + 0xf0, 0x49, 0x86, 0x5c, 0xa3, 0xa3, 0xe0, 0xac, 0xce, 0x1f, 0x7e, 0xdf, 0x39, 0x1f, 0x1f, 0x74, + 0xa3, 0x4d, 0x99, 0xae, 0xa3, 0x72, 0x90, 0xe5, 0x69, 0x99, 0x22, 0x9c, 0xc6, 0x7f, 0xee, 0x83, + 0x0e, 0x6f, 0xff, 0xc8, 0xa2, 0x88, 0x6e, 0x24, 0x7e, 0x03, 0xbd, 0xdc, 0x66, 0xd2, 0x62, 0x0e, + 0xeb, 0x9b, 0xa3, 0xcf, 0x83, 0x17, 0x6c, 0x50, 0x23, 0xc7, 0x1a, 0x6c, 0x33, 0x49, 0x0a, 0xc6, + 0xaf, 0xa0, 0xc7, 0x49, 0xb4, 0xb2, 0x34, 0x87, 0xf5, 0x3b, 0x23, 0xeb, 0x9a, 0xc8, 0x4b, 0xa2, + 0x15, 0x29, 0x0a, 0x3d, 0x30, 0xaa, 0x4a, 0xb2, 0xc8, 0xd2, 0x75, 0x21, 0xad, 0xa6, 0x52, 0x39, + 0xaf, 0xaa, 0x6a, 0x8e, 0x2e, 0x54, 0xbd, 0x21, 0xb4, 0x17, 0x52, 0xe6, 0xd3, 0xf5, 0xff, 0x14, + 0x4d, 0xd0, 0x92, 0x58, 0x59, 0x36, 0x48, 0x4b, 0x62, 0xfc, 0x00, 0x6f, 0xa2, 0x38, 0xce, 0x0b, + 0x4b, 0x73, 0x9a, 0x7d, 0x83, 0x0e, 0x43, 0xef, 0x3b, 0xe8, 0xd5, 0x3d, 0x1c, 0x82, 0x9e, 0x49, + 0x99, 0x2b, 0xbe, 0x33, 0xfa, 0x74, 0xed, 0xef, 0xf1, 0x32, 0x29, 0xb2, 0x77, 0x07, 0xc6, 0xb9, + 0x13, 0xfc, 0x01, 0xad, 0xa2, 0x8c, 0xca, 0x4d, 0x51, 0xc7, 0xe4, 0x5e, 0xbb, 0x71, 0xa4, 0x7d, + 0x45, 0x52, 0xad, 0x40, 0x1b, 0xe0, 0xd0, 0x05, 0xf2, 0xb6, 0x54, 0x89, 0xbd, 0xa3, 0xb3, 0x0d, + 0x22, 0xe8, 0x95, 0x5d, 0x95, 0x8a, 0x41, 0xaa, 0x77, 0xbf, 0x40, 0xe7, 0x2c, 0x74, 0x6c, 0x83, + 0xee, 0x4d, 0xc7, 0xbf, 0x79, 0x03, 0xdf, 0x43, 0xb7, 0xea, 0x42, 0x12, 0xfe, 0x62, 0x3e, 0xf3, + 0x05, 0x67, 0x6e, 0x02, 0xe6, 0xe5, 0x67, 0x6c, 0x81, 0x36, 0xff, 0xc5, 0x1b, 0xc8, 0xc1, 0x10, + 0xa1, 0xc2, 0x05, 0xd1, 0x9c, 0x78, 0x8c, 0x08, 0x66, 0xbd, 0x21, 0xf1, 0x73, 0xe9, 0x0b, 0x8f, + 0x4b, 0x44, 0xe8, 0x8a, 0x70, 0x32, 0xf6, 0x42, 0x12, 0x7f, 0x97, 0xc2, 0x0f, 0xf8, 0x8e, 0xe1, + 0x47, 0xe0, 0x22, 0x9c, 0xce, 0x02, 0x41, 0xb3, 0x93, 0xfa, 0x5e, 0x9b, 0x18, 0xbb, 0xbd, 0xcd, + 0x1e, 0xf7, 0x36, 0x7b, 0xda, 0xdb, 0xec, 0x39, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xe2, 0x93, 0x4e, + 0x61, 0x02, 0x00, 0x00, +} + +func (m *Message) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintAutonat(dAtA, i, uint64(*m.Type)) + } + if m.Dial != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAutonat(dAtA, i, uint64(m.Dial.Size())) + n1, err := m.Dial.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.DialResponse != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAutonat(dAtA, i, uint64(m.DialResponse.Size())) + n2, err := m.DialResponse.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Message_PeerInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message_PeerInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAutonat(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + dAtA[i] = 0x12 + i++ + i = encodeVarintAutonat(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Message_Dial) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message_Dial) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Peer != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAutonat(dAtA, i, uint64(m.Peer.Size())) + n3, err := m.Peer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Message_DialResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message_DialResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintAutonat(dAtA, i, uint64(*m.Status)) + } + if m.StatusText != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAutonat(dAtA, i, uint64(len(*m.StatusText))) + i += copy(dAtA[i:], *m.StatusText) + } + if m.Addr != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAutonat(dAtA, i, uint64(len(m.Addr))) + i += copy(dAtA[i:], m.Addr) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintAutonat(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != nil { + n += 1 + sovAutonat(uint64(*m.Type)) + } + if m.Dial != nil { + l = m.Dial.Size() + n += 1 + l + sovAutonat(uint64(l)) + } + if m.DialResponse != nil { + l = m.DialResponse.Size() + n += 1 + l + sovAutonat(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message_PeerInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = len(m.Id) + n += 1 + l + sovAutonat(uint64(l)) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + l = len(b) + n += 1 + l + sovAutonat(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message_Dial) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Peer != nil { + l = m.Peer.Size() + n += 1 + l + sovAutonat(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message_DialResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != nil { + n += 1 + sovAutonat(uint64(*m.Status)) + } + if m.StatusText != nil { + l = len(*m.StatusText) + n += 1 + l + sovAutonat(uint64(l)) + } + if m.Addr != nil { + l = len(m.Addr) + n += 1 + l + sovAutonat(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAutonat(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAutonat(x uint64) (n int) { + return sovAutonat(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Message_MessageType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Message_MessageType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dial", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dial == nil { + m.Dial = &Message_Dial{} + } + if err := m.Dial.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DialResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DialResponse == nil { + m.DialResponse = &Message_DialResponse{} + } + if err := m.DialResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAutonat(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Message_PeerInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PeerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PeerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx)) + copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAutonat(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Message_Dial) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Dial: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dial: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Peer == nil { + m.Peer = &Message_PeerInfo{} + } + if err := m.Peer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAutonat(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Message_DialResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DialResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DialResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v Message_ResponseStatus + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Message_ResponseStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusText", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.StatusText = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAutonat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAutonat + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAutonat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addr = append(m.Addr[:0], dAtA[iNdEx:postIndex]...) + if m.Addr == nil { + m.Addr = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAutonat(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthAutonat + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAutonat(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAutonat + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAutonat + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAutonat + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAutonat + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthAutonat + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAutonat + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAutonat(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthAutonat + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAutonat = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAutonat = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.proto b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.proto new file mode 100644 index 0000000000..7107e1c07f --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb/autonat.proto @@ -0,0 +1,35 @@ +package autonat.pb; + +message Message { + enum MessageType { + DIAL = 0; + DIAL_RESPONSE = 1; + } + + enum ResponseStatus { + OK = 0; + E_DIAL_ERROR = 100; + E_DIAL_REFUSED = 101; + E_BAD_REQUEST = 200; + E_INTERNAL_ERROR = 300; + } + + message PeerInfo { + optional bytes id = 1; + repeated bytes addrs = 2; + } + + message Dial { + optional PeerInfo peer = 1; + } + + message DialResponse { + optional ResponseStatus status = 1; + optional string statusText = 2; + optional bytes addr = 3; + } + + optional MessageType type = 1; + optional Dial dial = 2; + optional DialResponse dialResponse = 3; +} diff --git a/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/proto.go b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/proto.go new file mode 100644 index 0000000000..3e83c0ea98 --- /dev/null +++ b/vendor/gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/proto.go @@ -0,0 +1,26 @@ +package autonat + +import ( + pb "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb" + + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +const AutoNATProto = "/libp2p/autonat/1.0.0" + +var log = logging.Logger("autonat") + +func newDialMessage(pi pstore.PeerInfo) *pb.Message { + msg := new(pb.Message) + msg.Type = pb.Message_DIAL.Enum() + msg.Dial = new(pb.Message_Dial) + msg.Dial.Peer = new(pb.Message_PeerInfo) + msg.Dial.Peer.Id = []byte(pi.ID) + msg.Dial.Peer.Addrs = make([][]byte, len(pi.Addrs)) + for i, addr := range pi.Addrs { + msg.Dial.Peer.Addrs[i] = addr.Bytes() + } + + return msg +} diff --git a/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/.travis.yml b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/.travis.yml new file mode 100644 index 0000000000..9d9d5648bc --- /dev/null +++ b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +language: go + +go: + - 1.11.x + +before_install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/LICENSE b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/LICENSE rename to vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/LICENSE diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/Makefile b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/Makefile similarity index 100% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/Makefile rename to vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/Makefile diff --git a/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/README.md b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/README.md new file mode 100644 index 0000000000..617ea6af7b --- /dev/null +++ b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/README.md @@ -0,0 +1,34 @@ +go-addr-util +================== + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) +[![codecov](https://codecov.io/gh/libp2p/go-addr-util/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-addr-util) +[![Travis CI](https://travis-ci.org/libp2p/go-addr-util.svg?branch=master)](https://travis-ci.org/libp2p/go-addr-util) + +> Address utilities for libp2p swarm. + +## Table of Contents + +- [Install](#install) +- [Contribute](#contribute) +- [License](#license) + +## Install + +```sh +make install +``` + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-addr-util/issues)! + +Check out our [contributing document](https://github.com/libp2p/community/blob/master/CONTRIBUTE.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/addr.go b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/addr.go new file mode 100644 index 0000000000..fb47064db5 --- /dev/null +++ b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/addr.go @@ -0,0 +1,197 @@ +package addrutil + +import ( + "context" + "fmt" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +var log = logging.Logger("addrutil") + +// FilterAddrs is a filter that removes certain addresses, according to the given filters. +// If all filters return true, the address is kept. +func FilterAddrs(a []ma.Multiaddr, filters ...func(ma.Multiaddr) bool) []ma.Multiaddr { + b := make([]ma.Multiaddr, 0, len(a)) + for _, addr := range a { + good := true + for _, filter := range filters { + good = good && filter(addr) + } + if good { + b = append(b, addr) + } + } + return b +} + +// AddrOverNonLocalIP returns whether the addr uses a non-local ip link +func AddrOverNonLocalIP(a ma.Multiaddr) bool { + split := ma.Split(a) + if len(split) < 1 { + return false + } + if manet.IsIP6LinkLocal(split[0]) { + return false + } + return true +} + +// ResolveUnspecifiedAddress expands an unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to +// use the known local interfaces. If ifaceAddr is nil, we request interface addresses +// from the network stack. (this is so you can provide a cached value if resolving many addrs) +func ResolveUnspecifiedAddress(resolve ma.Multiaddr, ifaceAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) { + // split address into its components + split := ma.Split(resolve) + + // if first component (ip) is not unspecified, use it as is. + if !manet.IsIPUnspecified(split[0]) { + return []ma.Multiaddr{resolve}, nil + } + + out := make([]ma.Multiaddr, 0, len(ifaceAddrs)) + for _, ia := range ifaceAddrs { + // must match the first protocol to be resolve. + if ia.Protocols()[0].Code != resolve.Protocols()[0].Code { + continue + } + + split[0] = ia + joined := ma.Join(split...) + out = append(out, joined) + log.Debug("adding resolved addr:", resolve, joined, out) + } + if len(out) < 1 { + return nil, fmt.Errorf("failed to resolve: %s", resolve) + } + return out, nil +} + +// ResolveUnspecifiedAddresses expands unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to +// use the known local interfaces. +func ResolveUnspecifiedAddresses(unspecAddrs, ifaceAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) { + + // todo optimize: only fetch these if we have a "any" addr. + if len(ifaceAddrs) < 1 { + var err error + ifaceAddrs, err = InterfaceAddresses() + if err != nil { + return nil, err + } + // log.Debug("InterfaceAddresses:", ifaceAddrs) + } + + var outputAddrs []ma.Multiaddr + for _, a := range unspecAddrs { + // unspecified? + resolved, err := ResolveUnspecifiedAddress(a, ifaceAddrs) + if err != nil { + continue // optimistic. if we cant resolve anything, we'll know at the bottom. + } + // log.Debug("resolved:", a, resolved) + outputAddrs = append(outputAddrs, resolved...) + } + + if len(outputAddrs) < 1 { + return nil, fmt.Errorf("failed to specify addrs: %s", unspecAddrs) + } + + log.Event(context.TODO(), "interfaceListenAddresses", func() logging.Loggable { + var addrs []string + for _, addr := range outputAddrs { + addrs = append(addrs, addr.String()) + } + return logging.Metadata{"addresses": addrs} + }()) + + log.Debug("ResolveUnspecifiedAddresses:", unspecAddrs, ifaceAddrs, outputAddrs) + return outputAddrs, nil +} + +// InterfaceAddresses returns a list of addresses associated with local machine +// Note: we do not return link local addresses. IP loopback is ok, because we +// may be connecting to other nodes in the same machine. +func InterfaceAddresses() ([]ma.Multiaddr, error) { + maddrs, err := manet.InterfaceMultiaddrs() + if err != nil { + return nil, err + } + log.Debug("InterfaceAddresses: from manet:", maddrs) + + var out []ma.Multiaddr + for _, a := range maddrs { + if !AddrOverNonLocalIP(a) { + // log.Debug("InterfaceAddresses: skipping unusable:", a) + continue + } + + out = append(out, a) + } + + log.Debug("InterfaceAddresses: usable:", out) + return out, nil +} + +// AddrInList returns whether or not an address is part of a list. +// this is useful to check if NAT is happening (or other bugs?) +func AddrInList(addr ma.Multiaddr, list []ma.Multiaddr) bool { + for _, addr2 := range list { + if addr.Equal(addr2) { + return true + } + } + return false +} + +// AddrIsShareableOnWAN returns whether the given address should be shareable on the +// wide area network (wide internet). +func AddrIsShareableOnWAN(addr ma.Multiaddr) bool { + s := ma.Split(addr) + if len(s) < 1 { + return false + } + a := s[0] + if manet.IsIPLoopback(a) || manet.IsIP6LinkLocal(a) || manet.IsIPUnspecified(a) { + return false + } + return manet.IsThinWaist(a) +} + +// WANShareableAddrs filters addresses based on whether they're shareable on WAN +func WANShareableAddrs(inp []ma.Multiaddr) []ma.Multiaddr { + return FilterAddrs(inp, AddrIsShareableOnWAN) +} + +// Subtract filters out all addrs in b from a +func Subtract(a, b []ma.Multiaddr) []ma.Multiaddr { + return FilterAddrs(a, func(m ma.Multiaddr) bool { + for _, bb := range b { + if m.Equal(bb) { + return false + } + } + return true + }) +} + +// CheckNATWarning checks if our observed addresses differ. if so, +// informs the user that certain things might not work yet +func CheckNATWarning(observed, expected ma.Multiaddr, listen []ma.Multiaddr) { + if observed.Equal(expected) { + return + } + + if !AddrInList(observed, listen) { // probably a nat + log.Warningf(natWarning, observed, listen) + } +} + +const natWarning = `Remote peer observed our address to be: %s +The local addresses are: %s +Thus, connection is going through NAT, and other connections may fail. + +IPFS NAT traversal is still under development. Please bug us on github or irc to fix this. +Baby steps: http://jbenet.static.s3.amazonaws.com/271dfcf/baby-steps.gif +` diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/codecov.yml b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/codecov.yml rename to vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/codecov.yml diff --git a/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/filter.go b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/filter.go new file mode 100644 index 0000000000..a1fbd34ee6 --- /dev/null +++ b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/filter.go @@ -0,0 +1,31 @@ +package addrutil + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + mafmt "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" +) + +// SubtractFilter returns a filter func that filters all of the given addresses +func SubtractFilter(addrs ...ma.Multiaddr) func(ma.Multiaddr) bool { + addrmap := make(map[string]bool, len(addrs)) + for _, a := range addrs { + addrmap[string(a.Bytes())] = true + } + + return func(a ma.Multiaddr) bool { + return !addrmap[string(a.Bytes())] + } +} + +// IsFDCostlyTransport returns true for transports that require a new file +// descriptor per connection created +func IsFDCostlyTransport(a ma.Multiaddr) bool { + return mafmt.TCP.Matches(a) +} + +// FilterNeg returns a negated version of the passed in filter +func FilterNeg(f func(ma.Multiaddr) bool) func(ma.Multiaddr) bool { + return func(a ma.Multiaddr) bool { + return !f(a) + } +} diff --git a/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/package.json b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/package.json new file mode 100644 index 0000000000..55abab9944 --- /dev/null +++ b/vendor/gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util/package.json @@ -0,0 +1,41 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-addr-util/issues" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-addr-util" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "jbenet", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "MIT", + "name": "go-addr-util", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.11" +} + diff --git a/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/LICENSE b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/LICENSE new file mode 100644 index 0000000000..3f05397b70 --- /dev/null +++ b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 libp2p + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/README.md b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/README.md new file mode 100644 index 0000000000..6ba59127b2 --- /dev/null +++ b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/README.md @@ -0,0 +1,24 @@ +# go-libp2p-autonat-svc + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) + +> AutoNAT service implementation + +This package provides an implementation of the AutoNATService; see [autonat](https://github.com/libp2p/go-libp2p-autonat). + +## Documentation + +See https://godoc.org/github.com/libp2p/go-libp2p-autonat-svc. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-discovery/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +## License + +MIT diff --git a/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/package.json b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/package.json new file mode 100644 index 0000000000..039f4354ac --- /dev/null +++ b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/package.json @@ -0,0 +1,22 @@ +{ + "author": "vyzo", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-autonat-svc" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-libp2p-autonat-svc", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.0.13" +} + diff --git a/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/proto.go b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/proto.go new file mode 100644 index 0000000000..8017d4fc39 --- /dev/null +++ b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/proto.go @@ -0,0 +1,24 @@ +package autonat + +import ( + pb "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("autonat-svc") + +func newDialResponseOK(addr ma.Multiaddr) *pb.Message_DialResponse { + dr := new(pb.Message_DialResponse) + dr.Status = pb.Message_OK.Enum() + dr.Addr = addr.Bytes() + return dr +} + +func newDialResponseError(status pb.Message_ResponseStatus, text string) *pb.Message_DialResponse { + dr := new(pb.Message_DialResponse) + dr.Status = status.Enum() + dr.StatusText = &text + return dr +} diff --git a/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/svc.go b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/svc.go new file mode 100644 index 0000000000..ad23218360 --- /dev/null +++ b/vendor/gx/ipfs/QmZpe6RmiGLMD7boFBEP9hNkhdPQVkdjNSWPGccYk2GoFy/go-libp2p-autonat-svc/svc.go @@ -0,0 +1,216 @@ +package autonat + +import ( + "context" + "sync" + "time" + + pb "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat/pb" + + libp2p "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + autonat "gx/ipfs/QmZjvy5eqc1T9VbFe5KBiDryUJSRNbSbHZD7JMc6CeUXuu/go-libp2p-autonat" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" +) + +const P_CIRCUIT = 290 + +var ( + AutoNATServiceDialTimeout = 42 * time.Second + AutoNATServiceResetInterval = 1 * time.Minute + + AutoNATServiceThrottle = 3 +) + +// AutoNATService provides NAT autodetection services to other peers +type AutoNATService struct { + ctx context.Context + dialer host.Host + + // rate limiter + mx sync.Mutex + reqs map[peer.ID]int +} + +// NewAutoNATService creates a new AutoNATService instance attached to a host +func NewAutoNATService(ctx context.Context, h host.Host, opts ...libp2p.Option) (*AutoNATService, error) { + opts = append(opts, libp2p.NoListenAddrs) + dialer, err := libp2p.New(ctx, opts...) + if err != nil { + return nil, err + } + + as := &AutoNATService{ + ctx: ctx, + dialer: dialer, + reqs: make(map[peer.ID]int), + } + h.SetStreamHandler(autonat.AutoNATProto, as.handleStream) + + go as.resetRateLimiter() + + return as, nil +} + +func (as *AutoNATService) handleStream(s inet.Stream) { + defer s.Close() + + pid := s.Conn().RemotePeer() + log.Debugf("New stream from %s", pid.Pretty()) + + r := ggio.NewDelimitedReader(s, inet.MessageSizeMax) + w := ggio.NewDelimitedWriter(s) + + var req pb.Message + var res pb.Message + + err := r.ReadMsg(&req) + if err != nil { + log.Debugf("Error reading message from %s: %s", pid.Pretty(), err.Error()) + s.Reset() + return + } + + t := req.GetType() + if t != pb.Message_DIAL { + log.Debugf("Unexpected message from %s: %s (%d)", pid.Pretty(), t.String(), t) + s.Reset() + return + } + + dr := as.handleDial(pid, s.Conn().RemoteMultiaddr(), req.GetDial().GetPeer()) + res.Type = pb.Message_DIAL_RESPONSE.Enum() + res.DialResponse = dr + + err = w.WriteMsg(&res) + if err != nil { + log.Debugf("Error writing response to %s: %s", pid.Pretty(), err.Error()) + s.Reset() + return + } +} + +func (as *AutoNATService) handleDial(p peer.ID, obsaddr ma.Multiaddr, mpi *pb.Message_PeerInfo) *pb.Message_DialResponse { + if mpi == nil { + return newDialResponseError(pb.Message_E_BAD_REQUEST, "missing peer info") + } + + mpid := mpi.GetId() + if mpid != nil { + mp, err := peer.IDFromBytes(mpid) + if err != nil { + return newDialResponseError(pb.Message_E_BAD_REQUEST, "bad peer id") + } + + if mp != p { + return newDialResponseError(pb.Message_E_BAD_REQUEST, "peer id mismatch") + } + } + + addrs := make([]ma.Multiaddr, 0) + seen := make(map[string]struct{}) + + // add observed addr to the list of addresses to dial + if !as.skipDial(obsaddr) { + addrs = append(addrs, obsaddr) + seen[obsaddr.String()] = struct{}{} + } + + for _, maddr := range mpi.GetAddrs() { + addr, err := ma.NewMultiaddrBytes(maddr) + if err != nil { + log.Debugf("Error parsing multiaddr: %s", err.Error()) + continue + } + + if as.skipDial(addr) { + continue + } + + str := addr.String() + _, ok := seen[str] + if ok { + continue + } + + addrs = append(addrs, addr) + seen[str] = struct{}{} + } + + if len(addrs) == 0 { + return newDialResponseError(pb.Message_E_DIAL_ERROR, "no dialable addresses") + } + + return as.doDial(pstore.PeerInfo{ID: p, Addrs: addrs}) +} + +func (as *AutoNATService) skipDial(addr ma.Multiaddr) bool { + // skip relay addresses + _, err := addr.ValueForProtocol(P_CIRCUIT) + if err == nil { + return true + } + + // skip private network (unroutable) addresses + if !manet.IsPublicAddr(addr) { + return true + } + + return false +} + +func (as *AutoNATService) doDial(pi pstore.PeerInfo) *pb.Message_DialResponse { + // rate limit check + as.mx.Lock() + count := as.reqs[pi.ID] + if count >= AutoNATServiceThrottle { + as.mx.Unlock() + return newDialResponseError(pb.Message_E_DIAL_REFUSED, "too many dials") + } + as.reqs[pi.ID] = count + 1 + as.mx.Unlock() + + ctx, cancel := context.WithTimeout(as.ctx, AutoNATServiceDialTimeout) + defer cancel() + + err := as.dialer.Connect(ctx, pi) + if err != nil { + log.Debugf("error dialing %s: %s", pi.ID.Pretty(), err.Error()) + // wait for the context to timeout to avoid leaking timing information + // this renders the service ineffective as a port scanner + <-ctx.Done() + return newDialResponseError(pb.Message_E_DIAL_ERROR, "dial failed") + } + + conns := as.dialer.Network().ConnsToPeer(pi.ID) + if len(conns) == 0 { + log.Errorf("supposedly connected to %s, but no connection to peer", pi.ID.Pretty()) + return newDialResponseError(pb.Message_E_INTERNAL_ERROR, "internal service error") + } + + ra := conns[0].RemoteMultiaddr() + as.dialer.Network().ClosePeer(pi.ID) + return newDialResponseOK(ra) +} + +func (as *AutoNATService) resetRateLimiter() { + ticker := time.NewTicker(AutoNATServiceResetInterval) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + as.mx.Lock() + as.reqs = make(map[peer.ID]int) + as.mx.Unlock() + + case <-as.ctx.Done(): + return + } + } +} diff --git a/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_test.go b/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_test.go deleted file mode 100644 index c3a3074565..0000000000 --- a/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_test.go +++ /dev/null @@ -1,335 +0,0 @@ -package keccakpg - -import ( - "bytes" - "hash" - "math/rand" - "testing" -) - -type test struct { - length int - input []byte - output []byte -} - -var tests = []test{ - { - 28, - []byte{}, - []byte{ - 0xf7, 0x18, 0x37, 0x50, 0x2b, 0xa8, 0xe1, 0x08, - 0x37, 0xbd, 0xd8, 0xd3, 0x65, 0xad, 0xb8, 0x55, - 0x91, 0x89, 0x56, 0x02, 0xfc, 0x55, 0x2b, 0x48, - 0xb7, 0x39, 0x0a, 0xbd, - }, - }, { - 28, - []byte("Keccak-224 Test Hash"), - []byte{ - 0x30, 0x04, 0x5b, 0x34, 0x94, 0x6e, 0x1b, 0x2e, - 0x09, 0x16, 0x13, 0x36, 0x2f, 0xd2, 0x2a, 0xa0, - 0x8e, 0x2b, 0xea, 0xfe, 0xc5, 0xe8, 0xda, 0xee, - 0x42, 0xc2, 0xe6, 0x65}, - }, { - 32, - []byte{}, - []byte{ - 0xc5, 0xd2, 0x46, 0x01, 0x86, 0xf7, 0x23, 0x3c, - 0x92, 0x7e, 0x7d, 0xb2, 0xdc, 0xc7, 0x03, 0xc0, - 0xe5, 0x00, 0xb6, 0x53, 0xca, 0x82, 0x27, 0x3b, - 0x7b, 0xfa, 0xd8, 0x04, 0x5d, 0x85, 0xa4, 0x70, - }, - }, { - 32, - []byte("Keccak-256 Test Hash"), - []byte{ - 0xa8, 0xd7, 0x1b, 0x07, 0xf4, 0xaf, 0x26, 0xa4, - 0xff, 0x21, 0x02, 0x7f, 0x62, 0xff, 0x60, 0x26, - 0x7f, 0xf9, 0x55, 0xc9, 0x63, 0xf0, 0x42, 0xc4, - 0x6d, 0xa5, 0x2e, 0xe3, 0xcf, 0xaf, 0x3d, 0x3c}, - }, { - 48, - []byte{}, - []byte{ - 0x2c, 0x23, 0x14, 0x6a, 0x63, 0xa2, 0x9a, 0xcf, - 0x99, 0xe7, 0x3b, 0x88, 0xf8, 0xc2, 0x4e, 0xaa, - 0x7d, 0xc6, 0x0a, 0xa7, 0x71, 0x78, 0x0c, 0xcc, - 0x00, 0x6a, 0xfb, 0xfa, 0x8f, 0xe2, 0x47, 0x9b, - 0x2d, 0xd2, 0xb2, 0x13, 0x62, 0x33, 0x74, 0x41, - 0xac, 0x12, 0xb5, 0x15, 0x91, 0x19, 0x57, 0xff, - }, - }, { - 48, - []byte("Keccak-384 Test Hash"), - []byte{ - 0xe2, 0x13, 0xfd, 0x74, 0xaf, 0x0c, 0x5f, 0xf9, - 0x1b, 0x42, 0x3c, 0x8b, 0xce, 0xec, 0xd7, 0x01, - 0xf8, 0xdd, 0x64, 0xec, 0x18, 0xfd, 0x6f, 0x92, - 0x60, 0xfc, 0x9e, 0xc1, 0xed, 0xbd, 0x22, 0x30, - 0xa6, 0x90, 0x86, 0x65, 0xbc, 0xd9, 0xfb, 0xf4, - 0x1a, 0x99, 0xa1, 0x8a, 0x7d, 0x9e, 0x44, 0x6e}, - }, { - 64, - []byte{}, - []byte{ - 0x0e, 0xab, 0x42, 0xde, 0x4c, 0x3c, 0xeb, 0x92, - 0x35, 0xfc, 0x91, 0xac, 0xff, 0xe7, 0x46, 0xb2, - 0x9c, 0x29, 0xa8, 0xc3, 0x66, 0xb7, 0xc6, 0x0e, - 0x4e, 0x67, 0xc4, 0x66, 0xf3, 0x6a, 0x43, 0x04, - 0xc0, 0x0f, 0xa9, 0xca, 0xf9, 0xd8, 0x79, 0x76, - 0xba, 0x46, 0x9b, 0xcb, 0xe0, 0x67, 0x13, 0xb4, - 0x35, 0xf0, 0x91, 0xef, 0x27, 0x69, 0xfb, 0x16, - 0x0c, 0xda, 0xb3, 0x3d, 0x36, 0x70, 0x68, 0x0e, - }, - }, { - 64, - []byte("Keccak-512 Test Hash"), - []byte{ - 0x96, 0xee, 0x47, 0x18, 0xdc, 0xba, 0x3c, 0x74, - 0x61, 0x9b, 0xa1, 0xfa, 0x7f, 0x57, 0xdf, 0xe7, - 0x76, 0x9d, 0x3f, 0x66, 0x98, 0xa8, 0xb3, 0x3f, - 0xa1, 0x01, 0x83, 0x89, 0x70, 0xa1, 0x31, 0xe6, - 0x21, 0xcc, 0xfd, 0x05, 0xfe, 0xff, 0xbc, 0x11, - 0x80, 0xf2, 0x63, 0xc2, 0x7f, 0x1a, 0xda, 0xb4, - 0x60, 0x95, 0xd6, 0xf1, 0x25, 0x33, 0x14, 0x72, - 0x4b, 0x5c, 0xbf, 0x78, 0x28, 0x65, 0x8e, 0x6a, - }, - }, -} - -func TestKeccak(t *testing.T) { - for i := range tests { - var h hash.Hash - - switch tests[i].length { - case 28: - h = New224() - case 32: - h = New256() - case 48: - h = New384() - case 64: - h = New512() - default: - panic("invalid testcase") - } - - h.Write(tests[i].input) - - d := h.Sum(nil) - if !bytes.Equal(d, tests[i].output) { - t.Errorf("testcase %d: expected %x got %x", i, tests[i].output, d) - } - } -} - -type testcase struct { - msg []byte - output224 []byte - output256 []byte - output384 []byte - output512 []byte -} - -func TestKeccakShort224(t *testing.T) { - for i := range tstShort { - h := New224() - h.Write(tstShort[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstShort[i].output224) { - t.Errorf("testcase Short224 %d: expected %x got %x", i, tstShort[i].output224, d) - } - } -} - -func TestKeccakShort256(t *testing.T) { - for i := range tstShort { - h := New256() - h.Write(tstShort[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstShort[i].output256) { - t.Errorf("testcase Short256 %d: expected %x got %x", i, tstShort[i].output256, d) - } - } -} - -func TestKeccakShort384(t *testing.T) { - for i := range tstShort { - h := New384() - h.Write(tstShort[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstShort[i].output384) { - t.Errorf("testcase Short384 %d: expected %x got %x", i, tstShort[i].output384, d) - } - } -} - -func TestKeccakShort512(t *testing.T) { - for i := range tstShort { - h := New512() - h.Write(tstShort[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstShort[i].output512) { - t.Errorf("testcase Short512 %d: expected %x got %x", i, tstShort[i].output512, d) - } - } -} - -func TestKeccakLong224(t *testing.T) { - for i := range tstLong { - h := New224() - h.Write(tstLong[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstLong[i].output224) { - t.Errorf("testcase Long224 %d: expected %x got %x", i, tstLong[i].output224, d) - } - } -} - -func TestKeccakLong256(t *testing.T) { - for i := range tstLong { - h := New256() - h.Write(tstLong[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstLong[i].output256) { - t.Errorf("testcase Long256 %d: expected %x got %x", i, tstLong[i].output256, d) - } - } -} - -func TestKeccakLong384(t *testing.T) { - for i := range tstLong { - h := New384() - h.Write(tstLong[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstLong[i].output384) { - t.Errorf("testcase Long384 %d: expected %x got %x", i, tstLong[i].output384, d) - } - } -} - -func TestKeccakLong512(t *testing.T) { - for i := range tstLong { - h := New512() - h.Write(tstLong[i].msg) - d := h.Sum(nil) - if !bytes.Equal(d, tstLong[i].output512) { - t.Errorf("testcase Long512 %d: expected %x got %x", i, tstLong[i].output512, d) - } - } -} - -const BUF_SIZE = 1048576 - -var buf = func() []byte { - result := make([]byte, BUF_SIZE) - rand.Seed(0xDEADBEEF) - for i := range result { - result[i] = byte(rand.Int()) - } - return result -}() - -func BenchmarkKeccak224Write1MiB(b *testing.B) { - for i := 0; i < b.N; i++ { - b.StopTimer() - h := New224() - b.StartTimer() - h.Write(buf) - } -} - -func BenchmarkKeccak224Sum(b *testing.B) { - b.StopTimer() - h := New224() - h.Write(buf) - b.StartTimer() - for i := 0; i < b.N; i++ { - b.StopTimer() - h0 := h - b.StartTimer() - h0.Sum(nil) - } -} - -func BenchmarkKeccak224Real(b *testing.B) { - b.StopTimer() - b.SetBytes(int64(b.N*8)) - bs := make([]byte, 8, 8) - h := New224() - b.StartTimer() - for i := 0; i < b.N; i++ { - h.Reset() - bs[0], bs[1], bs[2], bs[3], bs[4], bs[5], bs[6], bs[7] = byte(i), byte(i>>8), byte(i>>16), byte(i>>24), byte(i>>32), byte(i>>40), byte(i>>48), byte(i>>56) - h.Write(bs) - h.Sum(nil) - } -} - -func BenchmarkKeccak256Write1MiB(b *testing.B) { - for i := 0; i < b.N; i++ { - b.StopTimer() - h := New224() - b.StartTimer() - h.Write(buf) - } -} - -func BenchmarkKeccak256Sum(b *testing.B) { - b.StopTimer() - h := New256() - h.Write(buf) - b.StartTimer() - for i := 0; i < b.N; i++ { - b.StopTimer() - h1 := h - b.StartTimer() - h1.Sum(nil) - } -} - -func BenchmarkKeccak384Write1MiB(b *testing.B) { - for i := 0; i < b.N; i++ { - b.StopTimer() - h := New384() - b.StartTimer() - h.Write(buf) - } -} - -func BenchmarkKeccak384Sum(b *testing.B) { - b.StopTimer() - h := New384() - h.Write(buf) - b.StartTimer() - for i := 0; i < b.N; i++ { - b.StopTimer() - h0 := h - b.StartTimer() - h0.Sum(nil) - } -} - -func BenchmarkKeccak512Write1MiB(b *testing.B) { - for i := 0; i < b.N; i++ { - b.StopTimer() - h := New512() - b.StartTimer() - h.Write(buf) - } -} - -func BenchmarkKeccak512Sum(b *testing.B) { - b.StopTimer() - h := New512() - h.Write(buf) - b.StartTimer() - for i := 0; i < b.N; i++ { - b.StopTimer() - h0 := h - b.StartTimer() - h0.Sum(nil) - } -} - diff --git a/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_vectors_test.go b/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_vectors_test.go deleted file mode 100644 index 84fb33cb75..0000000000 --- a/vendor/gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg/keccak_vectors_test.go +++ /dev/null @@ -1,1929 +0,0 @@ -package keccakpg - -// extracted from ShortMsgKAT_{224,256,384,512}.txt -var tstShort = []testcase{ - testcase{ - msg: []byte{0xcc}, - output224: []byte{0xa9, 0xca, 0xb5, 0x9e, 0xb4, 0xa, 0x10, 0xb2, 0x46, 0x29, 0xf, 0x2d, 0x60, 0x86, 0xe3, 0x2e, 0x36, 0x89, 0xfa, 0xf1, 0xd2, 0x6b, 0x47, 0xc, 0x89, 0x9f, 0x28, 0x2}, - output256: []byte{0xee, 0xad, 0x6d, 0xbf, 0xc7, 0x34, 0xa, 0x56, 0xca, 0xed, 0xc0, 0x44, 0x69, 0x6a, 0x16, 0x88, 0x70, 0x54, 0x9a, 0x6a, 0x7f, 0x6f, 0x56, 0x96, 0x1e, 0x84, 0xa5, 0x4b, 0xd9, 0x97, 0xb, 0x8a}, - output384: []byte{0x1b, 0x84, 0xe6, 0x2a, 0x46, 0xe5, 0xa2, 0x1, 0x86, 0x17, 0x54, 0xaf, 0x5d, 0xc9, 0x5c, 0x4a, 0x1a, 0x69, 0xca, 0xf4, 0xa7, 0x96, 0xae, 0x40, 0x56, 0x80, 0x16, 0x1e, 0x29, 0x57, 0x26, 0x41, 0xf5, 0xfa, 0x1e, 0x86, 0x41, 0xd7, 0x95, 0x83, 0x36, 0xee, 0x7b, 0x11, 0xc5, 0x8f, 0x73, 0xe9}, - output512: []byte{0x86, 0x30, 0xc1, 0x3c, 0xbd, 0x6, 0x6e, 0xa7, 0x4b, 0xbe, 0x7f, 0xe4, 0x68, 0xfe, 0xc1, 0xde, 0xe1, 0xe, 0xdc, 0x12, 0x54, 0xfb, 0x4c, 0x1b, 0x7c, 0x5f, 0xd6, 0x9b, 0x64, 0x6e, 0x44, 0x16, 0xb, 0x8c, 0xe0, 0x1d, 0x5, 0xa0, 0x90, 0x8c, 0xa7, 0x90, 0xdf, 0xb0, 0x80, 0xf4, 0xb5, 0x13, 0xbc, 0x3b, 0x62, 0x25, 0xec, 0xe7, 0xa8, 0x10, 0x37, 0x14, 0x41, 0xa5, 0xac, 0x66, 0x6e, 0xb9}}, - testcase{ - msg: []byte{0x41, 0xfb}, - output224: []byte{0x61, 0x5b, 0xa3, 0x67, 0xaf, 0xdc, 0x35, 0xaa, 0xc3, 0x97, 0xbc, 0x7e, 0xb5, 0xd5, 0x8d, 0x10, 0x6a, 0x73, 0x4b, 0x24, 0x98, 0x6d, 0x5d, 0x97, 0x8f, 0xef, 0xd6, 0x2c}, - output256: []byte{0xa8, 0xea, 0xce, 0xda, 0x4d, 0x47, 0xb3, 0x28, 0x1a, 0x79, 0x5a, 0xd9, 0xe1, 0xea, 0x21, 0x22, 0xb4, 0x7, 0xba, 0xf9, 0xaa, 0xbc, 0xb9, 0xe1, 0x8b, 0x57, 0x17, 0xb7, 0x87, 0x35, 0x37, 0xd2}, - output384: []byte{0x49, 0x5c, 0xce, 0x27, 0x14, 0xcd, 0x72, 0xc8, 0xc5, 0x3c, 0x33, 0x63, 0xd2, 0x2c, 0x58, 0xb5, 0x59, 0x60, 0xfe, 0x26, 0xbe, 0xb, 0xf3, 0xbb, 0xc7, 0xa3, 0x31, 0x6d, 0xd5, 0x63, 0xad, 0x1d, 0xb8, 0x41, 0xe, 0x75, 0xee, 0xfe, 0xa6, 0x55, 0xe3, 0x9d, 0x46, 0x70, 0xec, 0xb, 0x17, 0x92}, - output512: []byte{0x55, 0x1d, 0xa6, 0x23, 0x6f, 0x8b, 0x96, 0xfc, 0xe9, 0xf9, 0x7f, 0x11, 0x90, 0xe9, 0x1, 0x32, 0x4f, 0xb, 0x45, 0xe0, 0x6d, 0xbb, 0xb5, 0xcd, 0xb8, 0x35, 0x5d, 0x6e, 0xd1, 0xdc, 0x34, 0xb3, 0xf0, 0xea, 0xe7, 0xdc, 0xb6, 0x86, 0x22, 0xff, 0x23, 0x2f, 0xa3, 0xce, 0xce, 0xd, 0x46, 0x16, 0xcd, 0xeb, 0x39, 0x31, 0xf9, 0x38, 0x3, 0x66, 0x2a, 0x28, 0xdf, 0x1c, 0xd5, 0x35, 0xb7, 0x31}}, - testcase{ - msg: []byte{0x1f, 0x87, 0x7c}, - output224: []byte{0x6f, 0x9d, 0x28, 0x98, 0xef, 0xd0, 0x96, 0xba, 0xaa, 0xaa, 0xb2, 0xe9, 0x74, 0x82, 0xdd, 0xb6, 0x38, 0x9b, 0x8e, 0x6c, 0xaa, 0x96, 0x4b, 0x7a, 0xe, 0x34, 0x7e, 0x13}, - output256: []byte{0x62, 0x7d, 0x7b, 0xc1, 0x49, 0x1b, 0x2a, 0xb1, 0x27, 0x28, 0x28, 0x27, 0xb8, 0xde, 0x2d, 0x27, 0x6b, 0x13, 0xd7, 0xd7, 0xf, 0xb4, 0xc5, 0x95, 0x7f, 0xdf, 0x20, 0x65, 0x5b, 0xc7, 0xac, 0x30}, - output384: []byte{0xb0, 0x66, 0x5c, 0x34, 0x5f, 0x45, 0xe6, 0xde, 0x14, 0x5b, 0x1, 0x90, 0x33, 0x5e, 0xf5, 0xd5, 0xaa, 0x59, 0xe0, 0xb4, 0x9f, 0xc1, 0x42, 0x5d, 0x5e, 0xae, 0x73, 0x55, 0xea, 0x44, 0x22, 0x84, 0xcb, 0x8a, 0x21, 0x52, 0xd5, 0x65, 0xeb, 0xdf, 0x28, 0x10, 0xec, 0xca, 0xb1, 0x5a, 0xf0, 0x4f}, - output512: []byte{0xeb, 0x7f, 0x2a, 0x98, 0xe0, 0xa, 0xf3, 0x7d, 0x96, 0x4f, 0x7d, 0x8c, 0x44, 0xc1, 0xfb, 0x6e, 0x11, 0x4d, 0x8e, 0xe2, 0x1a, 0x7b, 0x97, 0x6a, 0xe7, 0x36, 0x53, 0x9e, 0xfd, 0xc1, 0xe3, 0xfe, 0x43, 0xbe, 0xce, 0xf5, 0x1, 0x51, 0x71, 0xe6, 0xda, 0x30, 0x16, 0x8c, 0xae, 0x99, 0xa8, 0x2c, 0x53, 0xfa, 0x99, 0x4, 0x27, 0x74, 0xef, 0x98, 0x2c, 0x1, 0x62, 0x6a, 0x54, 0xf, 0x8, 0xc0}}, - testcase{ - msg: []byte{0xc1, 0xec, 0xfd, 0xfc}, - output224: []byte{0xe4, 0x5, 0x86, 0x9d, 0xa1, 0x46, 0x4a, 0x70, 0x57, 0x0, 0xa3, 0xcb, 0xce, 0x13, 0x1a, 0xab, 0xee, 0xba, 0x9c, 0x8d, 0x2f, 0xe6, 0x57, 0x6b, 0x21, 0xbc, 0xbe, 0x16}, - output256: []byte{0xb1, 0x49, 0xe7, 0x66, 0xd7, 0x61, 0x2e, 0xaf, 0x7d, 0x55, 0xf7, 0x4e, 0x1a, 0x4f, 0xdd, 0x63, 0x70, 0x9a, 0x81, 0x15, 0xb1, 0x4f, 0x61, 0xfc, 0xd2, 0x2a, 0xa4, 0xab, 0xc8, 0xb8, 0xe1, 0x22}, - output384: []byte{0xf1, 0x85, 0xb, 0x2a, 0xbb, 0x24, 0xf3, 0xfd, 0x68, 0x3c, 0x70, 0x15, 0x82, 0x78, 0x9d, 0x9e, 0x92, 0xb6, 0xa4, 0x5f, 0x9c, 0x34, 0x5f, 0x9d, 0xae, 0x7f, 0x79, 0x97, 0xc8, 0xc9, 0x10, 0xe8, 0x80, 0x3, 0xe5, 0x92, 0xe5, 0x92, 0x81, 0xcf, 0x92, 0xc9, 0x2d, 0x6b, 0x51, 0xa1, 0xaf, 0xd1}, - output512: []byte{0x95, 0x2d, 0x4c, 0xa, 0x6f, 0xe, 0xf5, 0xce, 0x43, 0x8c, 0x52, 0xe3, 0xed, 0xd3, 0x45, 0xea, 0x0, 0xf9, 0x1c, 0xf5, 0xda, 0x80, 0x97, 0xc1, 0x16, 0x8a, 0x16, 0x6, 0x9e, 0x95, 0x8f, 0xc0, 0x5b, 0xad, 0x90, 0xa0, 0xc5, 0xfb, 0x4d, 0xd9, 0xec, 0x28, 0xe8, 0x4b, 0x22, 0x6b, 0x94, 0xa8, 0x47, 0xd6, 0xbb, 0x89, 0x23, 0x56, 0x92, 0xef, 0x4c, 0x97, 0x12, 0xf0, 0xc7, 0x3, 0xf, 0xae}}, - testcase{ - msg: []byte{0x21, 0xf1, 0x34, 0xac, 0x57}, - output224: []byte{0x55, 0x73, 0xda, 0x2b, 0x2, 0x21, 0x6a, 0x86, 0x3, 0x89, 0xa5, 0x81, 0xf6, 0xe9, 0xfb, 0x8d, 0x80, 0x5e, 0x9e, 0x2, 0xf6, 0xfa, 0x91, 0x17, 0x1, 0xee, 0xe2, 0x98}, - output256: []byte{0x67, 0xf0, 0x55, 0x44, 0xdb, 0xe9, 0x7d, 0x5d, 0x64, 0x17, 0xc1, 0xb1, 0xea, 0x9b, 0xc0, 0xe3, 0xa9, 0x9a, 0x54, 0x13, 0x81, 0xd1, 0xcd, 0x9b, 0x8, 0xa9, 0x76, 0x56, 0x87, 0xeb, 0x5b, 0xb4}, - output384: []byte{0x68, 0xd4, 0x37, 0x32, 0x7f, 0x15, 0x82, 0x87, 0xc3, 0x4, 0xbb, 0xaf, 0x36, 0xf7, 0x82, 0xf4, 0x97, 0xda, 0x2c, 0x48, 0xa, 0x1f, 0xbb, 0x26, 0x86, 0x82, 0x36, 0x22, 0x18, 0x64, 0x1f, 0x90, 0x70, 0xa0, 0x14, 0x91, 0x9a, 0xd7, 0x33, 0x1c, 0x49, 0xbe, 0xef, 0xcc, 0xb4, 0x37, 0xfe, 0x9a}, - output512: []byte{0x2e, 0x76, 0xd9, 0x3a, 0xff, 0xd6, 0x2b, 0x92, 0xfc, 0x4f, 0x29, 0xcb, 0x83, 0xef, 0xbe, 0x4b, 0xa2, 0x1d, 0x88, 0x42, 0x6a, 0xa7, 0xf0, 0x75, 0xbf, 0xc2, 0x9, 0x60, 0xea, 0x25, 0x87, 0x87, 0x89, 0x81, 0x72, 0xe1, 0x70, 0x45, 0xaf, 0x43, 0xab, 0x1f, 0xe4, 0x45, 0x53, 0x2b, 0xe0, 0x18, 0x5f, 0xbe, 0xa8, 0x4d, 0x9b, 0xe7, 0x88, 0xb0, 0x5f, 0x14, 0xdb, 0xf4, 0x85, 0x6a, 0x52, 0x54}}, - testcase{ - msg: []byte{0xc6, 0xf5, 0xb, 0xb7, 0x4e, 0x29}, - output224: []byte{0x16, 0x3c, 0x90, 0x60, 0x16, 0x3a, 0xa6, 0x6b, 0x8b, 0x7c, 0xc, 0xfa, 0xa6, 0x5d, 0x93, 0x4b, 0xff, 0x21, 0x9b, 0xcb, 0xc2, 0x67, 0x18, 0x7c, 0xab, 0xa0, 0x4, 0x2f}, - output256: []byte{0x92, 0x30, 0x62, 0xc4, 0xe6, 0xf0, 0x57, 0x59, 0x72, 0x20, 0xd1, 0x82, 0xdb, 0xb1, 0xe, 0x81, 0xcd, 0x25, 0xf6, 0xb, 0x54, 0x0, 0x5b, 0x2a, 0x75, 0xdd, 0x33, 0xd6, 0xda, 0xc5, 0x18, 0xd0}, - output384: []byte{0x3, 0x56, 0x6e, 0xc0, 0x3, 0xff, 0x55, 0x18, 0x4f, 0xc, 0x85, 0xbe, 0xeb, 0xc6, 0xd1, 0xec, 0xf5, 0xe5, 0xd0, 0x82, 0xd8, 0xd4, 0x1, 0x37, 0x24, 0x6f, 0x8f, 0xd4, 0x2b, 0xce, 0x9, 0x7c, 0x9, 0x41, 0x88, 0x45, 0xef, 0x60, 0x28, 0x6f, 0xdd, 0x89, 0x4a, 0x0, 0xfd, 0x2d, 0x65, 0x89}, - output512: []byte{0x40, 0xfa, 0x80, 0x74, 0xe1, 0xe5, 0x9, 0xb2, 0x6, 0x44, 0x8f, 0xbe, 0x75, 0x7d, 0x94, 0x94, 0xb9, 0xb5, 0x1e, 0x8d, 0x6e, 0x67, 0x4a, 0x67, 0xf5, 0x3c, 0x11, 0xef, 0x92, 0xe9, 0x6c, 0x3e, 0xa0, 0x8b, 0x95, 0xeb, 0xd4, 0x17, 0x2b, 0x2, 0x0, 0x10, 0xcd, 0x6c, 0xf2, 0x95, 0x39, 0xa3, 0x4d, 0x6b, 0xfa, 0x0, 0x2a, 0x20, 0x42, 0x78, 0x7a, 0xa8, 0xd8, 0x79, 0xa0, 0xf5, 0xb5, 0x4c}}, - testcase{ - msg: []byte{0x11, 0x97, 0x13, 0xcc, 0x83, 0xee, 0xef}, - output224: []byte{0xcf, 0xc0, 0x4c, 0x6f, 0x84, 0x63, 0xdd, 0xab, 0x24, 0xcd, 0xf8, 0xb8, 0x65, 0x2b, 0xd1, 0x1d, 0xf2, 0x3d, 0xd1, 0xb9, 0x5f, 0x11, 0x83, 0x28, 0xdd, 0x1, 0x58, 0xe}, - output256: []byte{0xfe, 0xb8, 0x40, 0x5d, 0xcd, 0x31, 0x5d, 0x48, 0xc6, 0xcb, 0xf7, 0xa3, 0x50, 0x49, 0x96, 0xde, 0x8e, 0x25, 0xcc, 0x22, 0x56, 0x6e, 0xfe, 0xc6, 0x74, 0x33, 0x71, 0x2e, 0xda, 0x99, 0x89, 0x4f}, - output384: []byte{0x79, 0xd, 0x70, 0xf, 0xa3, 0x4d, 0x6a, 0x83, 0x5b, 0xe3, 0x11, 0xb6, 0x39, 0x47, 0x47, 0x80, 0x14, 0x8a, 0x2f, 0x8, 0x7a, 0xc2, 0xfa, 0x86, 0xe8, 0xa1, 0xa4, 0x33, 0xec, 0x7a, 0x4, 0xfc, 0xbf, 0xc5, 0x28, 0x4a, 0x3e, 0x18, 0x8b, 0x7d, 0x91, 0xc6, 0xd0, 0x94, 0xea, 0xfb, 0xee, 0xcb}, - output512: []byte{0xd1, 0x11, 0x67, 0x86, 0xa3, 0xc1, 0xea, 0x46, 0xa8, 0xf2, 0x2d, 0x82, 0xab, 0xb4, 0xc5, 0xd0, 0x6d, 0xc0, 0x69, 0x1b, 0x2e, 0x74, 0x7a, 0xc9, 0x72, 0x6d, 0xb, 0x29, 0xe, 0x69, 0x59, 0xf7, 0xb2, 0x34, 0x28, 0x51, 0x9a, 0x65, 0x6b, 0x23, 0x76, 0x95, 0xe5, 0x64, 0x3, 0x85, 0x5e, 0xc4, 0xc9, 0x8d, 0xb0, 0xcf, 0x87, 0xf3, 0x1b, 0x6c, 0xea, 0xbf, 0x2b, 0x9b, 0x85, 0x89, 0xb7, 0x13}}, - testcase{ - msg: []byte{0x4a, 0x4f, 0x20, 0x24, 0x84, 0x51, 0x25, 0x26}, - output224: []byte{0x7a, 0x5c, 0x2c, 0xb3, 0xf9, 0x99, 0xdd, 0x0, 0xef, 0xf7, 0x39, 0x99, 0x63, 0x31, 0x4c, 0xa6, 0x47, 0xdd, 0xe, 0x5a, 0xe1, 0xbd, 0xde, 0xc6, 0x11, 0xf8, 0x33, 0x8d}, - output256: []byte{0xe6, 0x20, 0xd8, 0xf2, 0x98, 0x2b, 0x24, 0xfe, 0xda, 0xaa, 0x3b, 0xaa, 0x9b, 0x46, 0xc3, 0xf9, 0xce, 0x20, 0x4e, 0xe3, 0x56, 0x66, 0x65, 0x53, 0xec, 0xb3, 0x5e, 0x15, 0xc3, 0xff, 0x9b, 0xf9}, - output384: []byte{0x63, 0x8e, 0x65, 0x75, 0x8a, 0x29, 0x7c, 0xb0, 0x9d, 0xed, 0x1a, 0xc5, 0xb9, 0xe8, 0xf7, 0x79, 0x80, 0x20, 0x0, 0xab, 0x79, 0x1f, 0x67, 0xf3, 0x3c, 0x60, 0xbe, 0x36, 0x44, 0x37, 0x93, 0xad, 0xcc, 0x8a, 0x4a, 0x58, 0xe9, 0x86, 0x88, 0x15, 0x7a, 0x41, 0x78, 0x4f, 0x2, 0xa4, 0xbc, 0xb2}, - output512: []byte{0xf3, 0x26, 0xc7, 0xc1, 0x26, 0xdd, 0xc2, 0x77, 0x92, 0x27, 0x60, 0xfe, 0xef, 0x77, 0xc9, 0xba, 0xb6, 0xfb, 0x5d, 0x34, 0x30, 0xf6, 0x52, 0x59, 0x37, 0x3, 0xd7, 0xc5, 0xe3, 0x1, 0x35, 0xcd, 0xb, 0x5, 0x75, 0x25, 0x75, 0x9, 0xa6, 0x24, 0x18, 0x43, 0x30, 0xd6, 0xab, 0x1f, 0x50, 0x8a, 0x66, 0x63, 0x91, 0xb5, 0xd4, 0x69, 0x4, 0x26, 0xb4, 0xe0, 0x53, 0x1, 0x89, 0x1d, 0xf8, 0x97}}, - testcase{ - msg: []byte{0x1f, 0x66, 0xab, 0x41, 0x85, 0xed, 0x9b, 0x63, 0x75}, - output224: []byte{0xa5, 0xa7, 0x58, 0x6, 0x8, 0x3a, 0xa9, 0x30, 0x70, 0x74, 0xef, 0x8f, 0xbd, 0x7d, 0xf5, 0x92, 0x98, 0x5e, 0x5f, 0x71, 0x46, 0x11, 0xe8, 0x12, 0x21, 0x6c, 0x4, 0x49}, - output256: []byte{0x9e, 0x3, 0xf7, 0xc9, 0xa3, 0xd0, 0x55, 0xec, 0xa1, 0xd7, 0x86, 0xed, 0x6f, 0xb6, 0x24, 0xd9, 0x3f, 0x1c, 0xf0, 0xac, 0x27, 0xf9, 0xc2, 0xb6, 0xc0, 0x5e, 0x50, 0x9f, 0xac, 0x9e, 0x7f, 0xca}, - output384: []byte{0x30, 0x8e, 0xc6, 0xf2, 0xee, 0x3f, 0x6e, 0x1, 0xfb, 0x3a, 0xa0, 0x6e, 0xb7, 0xc8, 0xca, 0xdd, 0x19, 0x93, 0x54, 0x75, 0x1b, 0x69, 0xfd, 0x4b, 0xa4, 0xd4, 0x67, 0x18, 0x58, 0xf2, 0x8b, 0xb4, 0x5c, 0x94, 0xe7, 0x12, 0xad, 0x9d, 0x35, 0x6f, 0xcb, 0x44, 0x30, 0x67, 0xef, 0x5a, 0xca, 0x2d}, - output512: []byte{0x1f, 0x5b, 0x8a, 0x6e, 0x8d, 0x94, 0xf5, 0xe2, 0x53, 0x5d, 0x46, 0x84, 0x2b, 0x9c, 0xed, 0x46, 0x7c, 0x39, 0xc2, 0xdb, 0x32, 0x39, 0x63, 0xd3, 0xf3, 0xd9, 0x37, 0xe9, 0xdd, 0xa7, 0x6f, 0xbc, 0x17, 0x7, 0x2d, 0xda, 0x2a, 0xb4, 0x77, 0x1c, 0xd7, 0xa6, 0x45, 0x14, 0x5a, 0x2a, 0xec, 0x1b, 0x57, 0x49, 0xbf, 0x9e, 0xfe, 0xc, 0xde, 0x0, 0x6c, 0xc3, 0xef, 0x89, 0x36, 0x43, 0x8e, 0xd}}, - testcase{ - msg: []byte{0xee, 0xd7, 0x42, 0x22, 0x27, 0x61, 0x3b, 0x6f, 0x53, 0xc9}, - output224: []byte{0xac, 0x78, 0xfc, 0x53, 0xa1, 0xdb, 0x90, 0xa6, 0x34, 0xf1, 0xaa, 0xaf, 0x90, 0x11, 0x9c, 0x88, 0x9c, 0x8c, 0x24, 0xb5, 0x9b, 0x98, 0xb7, 0x36, 0x60, 0x29, 0xcc, 0x73}, - output256: []byte{0xca, 0xad, 0x8e, 0x1e, 0xd5, 0x46, 0x63, 0x7, 0x48, 0xa1, 0x2f, 0x53, 0x51, 0xb5, 0x18, 0xa9, 0xa4, 0x31, 0xcd, 0xa6, 0xba, 0x56, 0xcb, 0xfc, 0x3c, 0xcb, 0xdd, 0x8a, 0xae, 0x50, 0x92, 0xf7}, - output384: []byte{0xa8, 0x8f, 0x2f, 0xd1, 0x12, 0xe5, 0xf1, 0x1e, 0x77, 0x5a, 0xa7, 0x85, 0x8a, 0x3a, 0x52, 0x2, 0xe8, 0xfc, 0xd2, 0x59, 0xf5, 0xd1, 0x12, 0xba, 0xa6, 0xf5, 0x68, 0x24, 0xd, 0x2e, 0xcc, 0x4, 0x7e, 0xad, 0x88, 0x50, 0x9e, 0x4b, 0x8a, 0x74, 0x7d, 0x37, 0x7, 0x51, 0xff, 0xb2, 0xfd, 0xc0}, - output512: []byte{0x2a, 0xee, 0xe7, 0xa7, 0x20, 0xc0, 0x30, 0xa8, 0x20, 0xcd, 0x7b, 0xaa, 0x85, 0x70, 0xd7, 0x2c, 0xb9, 0xb, 0x7a, 0x23, 0x8c, 0x38, 0xc3, 0x58, 0x67, 0x63, 0x58, 0xa7, 0xae, 0x9a, 0x5c, 0xf2, 0x66, 0x35, 0xb2, 0x32, 0xd, 0x61, 0xc1, 0x28, 0x48, 0x99, 0xe6, 0x54, 0xf0, 0xbf, 0xdd, 0xa, 0x3a, 0x9c, 0x34, 0x3f, 0xfb, 0xd1, 0x18, 0x38, 0xb5, 0x74, 0x65, 0xe6, 0xc3, 0xad, 0x3a, 0x57}}, - testcase{ - msg: []byte{0xea, 0xee, 0xd5, 0xcd, 0xff, 0xd8, 0x9d, 0xec, 0xe4, 0x55, 0xf1}, - output224: []byte{0x67, 0x2c, 0xa6, 0x82, 0x66, 0x86, 0xbe, 0xdb, 0x25, 0x85, 0x32, 0x83, 0xd, 0x60, 0x6b, 0x25, 0x8c, 0x6d, 0xe6, 0x1, 0x54, 0xec, 0x9, 0x57, 0xcd, 0x8b, 0x85, 0x8b}, - output256: []byte{0xd6, 0x17, 0x8, 0xbd, 0xb3, 0x21, 0x1a, 0x9a, 0xab, 0x28, 0xd4, 0xdf, 0x1, 0xdf, 0xa4, 0xb2, 0x9e, 0xd4, 0x2, 0x85, 0x84, 0x4d, 0x84, 0x10, 0x42, 0x25, 0x7e, 0x97, 0x48, 0x86, 0x17, 0xb0}, - output384: []byte{0xa2, 0x2a, 0x31, 0x34, 0x9d, 0x78, 0x16, 0x54, 0x5b, 0xe3, 0x1b, 0x80, 0xe9, 0x92, 0xbd, 0xbb, 0x62, 0xa2, 0x94, 0x80, 0x91, 0x7c, 0xea, 0xbd, 0xa, 0xf5, 0xf2, 0xfa, 0xfb, 0xf2, 0x76, 0xd4, 0xc2, 0x9b, 0x63, 0xa0, 0x49, 0x10, 0xb8, 0x30, 0xb8, 0x75, 0x7c, 0x81, 0xe2, 0x23, 0xb7, 0xf9}, - output512: []byte{0x7b, 0x1c, 0x1b, 0xef, 0x3b, 0x4d, 0xeb, 0x4b, 0x48, 0x12, 0xc8, 0x1a, 0x6e, 0x7b, 0x3f, 0x2c, 0x66, 0xfa, 0x95, 0x15, 0x7f, 0xa3, 0xb9, 0xd2, 0x95, 0x9d, 0xc5, 0x6b, 0x8a, 0xdd, 0x10, 0x1, 0x70, 0xd3, 0xc8, 0xd1, 0x74, 0x5f, 0xd2, 0x30, 0xa3, 0x1f, 0x89, 0xfa, 0x17, 0x88, 0x9c, 0x4c, 0x58, 0x94, 0x6b, 0x5d, 0x74, 0x6e, 0x47, 0xb7, 0x1e, 0xd0, 0x39, 0x4b, 0x66, 0xd1, 0xbd, 0xb2}}, - testcase{ - msg: []byte{0x5b, 0xe4, 0x3c, 0x90, 0xf2, 0x29, 0x2, 0xe4, 0xfe, 0x8e, 0xd2, 0xd3}, - output224: []byte{0xd9, 0x8c, 0xa0, 0x7e, 0x17, 0x2b, 0xb, 0xc5, 0x3d, 0x67, 0x9d, 0x2f, 0x8d, 0x0, 0x2c, 0x63, 0xfd, 0x24, 0xa6, 0x30, 0x7f, 0x2b, 0x7e, 0x1e, 0xee, 0xf2, 0x8b, 0xe0}, - output256: []byte{0xf, 0x53, 0xbe, 0x55, 0x99, 0x7, 0x80, 0xb3, 0xfa, 0xd9, 0x87, 0xf, 0x4, 0xf7, 0xd8, 0x15, 0x3c, 0x3a, 0xe6, 0x5, 0xc0, 0x57, 0xc8, 0x5a, 0xbb, 0x5d, 0x71, 0x76, 0x50, 0x43, 0xaa, 0xa8}, - output384: []byte{0x36, 0xca, 0x9c, 0xc3, 0x29, 0xf9, 0xa0, 0xf, 0xaa, 0x5f, 0x4f, 0x21, 0x17, 0xa, 0x1, 0x77, 0x42, 0x17, 0x4d, 0x3c, 0xf0, 0x3c, 0x8, 0x4a, 0xeb, 0x75, 0x9f, 0x6f, 0xa0, 0x39, 0x3, 0x49, 0xe1, 0xb5, 0x2, 0xe4, 0x35, 0xcf, 0xfb, 0xb, 0xce, 0x4e, 0xd4, 0x6c, 0x0, 0x12, 0xa6, 0x5c}, - output512: []byte{0xee, 0x41, 0x40, 0x1a, 0xf5, 0x9, 0xd6, 0xfc, 0x9, 0x44, 0xcd, 0x4a, 0xb, 0xb2, 0x9d, 0x2d, 0xce, 0xd, 0xcc, 0x86, 0x26, 0x6, 0xe6, 0x69, 0xe3, 0x13, 0x81, 0xe5, 0xd6, 0xce, 0xcb, 0x46, 0x31, 0x43, 0x64, 0x5d, 0x69, 0x6d, 0x14, 0xe4, 0x1, 0x69, 0xcd, 0xc7, 0x1c, 0x75, 0x68, 0x6d, 0x6e, 0x87, 0x32, 0xb4, 0x32, 0x9, 0x26, 0x26, 0x42, 0x1c, 0xc6, 0xcc, 0x19, 0x6f, 0x80, 0xbf}}, - testcase{ - msg: []byte{0xa7, 0x46, 0x27, 0x32, 0x28, 0x12, 0x2f, 0x38, 0x1c, 0x3b, 0x46, 0xe4, 0xf1}, - output224: []byte{0xf1, 0x22, 0xbe, 0x39, 0xc9, 0x1a, 0x6c, 0x17, 0xcd, 0x59, 0x0, 0xf5, 0x31, 0xe6, 0x80, 0xd5, 0x4c, 0xed, 0xef, 0xd4, 0xf0, 0xe3, 0xd1, 0x13, 0xd2, 0x65, 0x43, 0xd4}, - output256: []byte{0x32, 0x21, 0x5a, 0xe8, 0x82, 0x4, 0xa7, 0x82, 0xb6, 0x2d, 0x18, 0x10, 0xd9, 0x45, 0xde, 0x49, 0x94, 0x8d, 0xe4, 0x58, 0x60, 0xf, 0x5e, 0x1e, 0x38, 0x96, 0xce, 0xca, 0x2e, 0xd3, 0x29, 0x2b}, - output384: []byte{0x3d, 0xa5, 0x49, 0x76, 0xb2, 0x91, 0xdf, 0x77, 0xf1, 0xb, 0xf9, 0x5e, 0x9b, 0x7e, 0xf9, 0xfb, 0x2f, 0x88, 0xde, 0x7, 0x5d, 0xdf, 0x66, 0x50, 0xba, 0x78, 0x85, 0x90, 0xf4, 0xe2, 0xe3, 0xc8, 0x30, 0xd3, 0xb7, 0xdf, 0xc0, 0x19, 0x36, 0x56, 0xb0, 0xa1, 0x85, 0xe3, 0xaa, 0xd9, 0xaa, 0x5a}, - output512: []byte{0x9b, 0x53, 0xb4, 0x10, 0xb9, 0xf5, 0xdc, 0xe9, 0xa, 0x77, 0x24, 0x4d, 0xb4, 0x7, 0xa3, 0xd0, 0xf4, 0x89, 0x8d, 0x11, 0x2d, 0x0, 0x44, 0xa8, 0xf6, 0x6a, 0xf9, 0x33, 0xe2, 0x66, 0x66, 0xde, 0x63, 0xeb, 0xd2, 0xa4, 0x32, 0x2d, 0x8f, 0xe5, 0x25, 0xab, 0x35, 0x4c, 0xe9, 0x67, 0x6b, 0x6a, 0x14, 0xd0, 0xce, 0x6b, 0x3d, 0x24, 0xe6, 0xcd, 0x58, 0x32, 0xbe, 0xa0, 0xc5, 0x15, 0x3c, 0xef}}, - testcase{ - msg: []byte{0x3c, 0x58, 0x71, 0xcd, 0x61, 0x9c, 0x69, 0xa6, 0x3b, 0x54, 0xe, 0xb5, 0xa6, 0x25}, - output224: []byte{0x2a, 0x26, 0xd2, 0xad, 0x20, 0x15, 0xc6, 0x7c, 0xab, 0xb7, 0x89, 0x5e, 0xc5, 0xfa, 0x25, 0x47, 0x3d, 0x4d, 0x14, 0x33, 0xfa, 0xe9, 0x2b, 0x9b, 0x2c, 0xda, 0x31, 0xf0}, - output256: []byte{0x95, 0x10, 0xda, 0x68, 0xe5, 0x8e, 0xbb, 0x8d, 0x2a, 0xb9, 0xde, 0x84, 0x85, 0xbb, 0x40, 0x8e, 0x35, 0x82, 0x99, 0xa9, 0xc0, 0x11, 0xae, 0x85, 0x44, 0xb0, 0xd0, 0xfa, 0xf9, 0xd4, 0xa4, 0xea}, - output384: []byte{0xd2, 0x1a, 0x7c, 0xf2, 0x52, 0x35, 0x8a, 0x11, 0x59, 0xa5, 0x59, 0x34, 0x45, 0x6e, 0x67, 0xd9, 0xe1, 0xda, 0x53, 0x8d, 0x4e, 0x9f, 0x9f, 0x1a, 0xce, 0x2f, 0xd7, 0x5f, 0x30, 0x74, 0xb2, 0x7a, 0xe2, 0xb3, 0x56, 0x14, 0x4b, 0xda, 0x7b, 0xa0, 0xb1, 0xec, 0xa1, 0xaa, 0x20, 0x1b, 0x20, 0xde}, - output512: []byte{0x2b, 0x53, 0xfe, 0x65, 0x83, 0xfc, 0x24, 0xee, 0x8a, 0x63, 0x80, 0x10, 0x67, 0xe4, 0xd3, 0xbd, 0x6e, 0x69, 0x34, 0xef, 0x16, 0xbc, 0x82, 0x2f, 0xc3, 0xa6, 0x9f, 0x4e, 0xe1, 0x3a, 0x40, 0x4d, 0x9a, 0x3c, 0xe2, 0xbb, 0x4a, 0x12, 0xc7, 0x73, 0x82, 0xbf, 0xde, 0x4d, 0x84, 0x3f, 0x87, 0xfd, 0x6, 0xed, 0x8a, 0xec, 0xc2, 0x34, 0xa3, 0xa2, 0x4c, 0xed, 0xfe, 0x60, 0xbf, 0xc0, 0x69, 0x33}}, - testcase{ - msg: []byte{0xfa, 0x22, 0x87, 0x4b, 0xcc, 0x6, 0x88, 0x79, 0xe8, 0xef, 0x11, 0xa6, 0x9f, 0x7, 0x22}, - output224: []byte{0xa6, 0x9e, 0x4e, 0xc1, 0x64, 0x8c, 0xbb, 0xd5, 0x95, 0x55, 0x8e, 0xe4, 0xea, 0x34, 0x5e, 0x41, 0x96, 0xc2, 0x88, 0x1e, 0x85, 0xe8, 0x53, 0x73, 0x9b, 0x1f, 0x46, 0x4}, - output256: []byte{0xf2, 0xb, 0x3b, 0xcf, 0x74, 0x3a, 0xa6, 0xfa, 0x8, 0x40, 0x38, 0x52, 0x7, 0x91, 0xc3, 0x64, 0xcb, 0x6d, 0x3d, 0x1d, 0xd7, 0x58, 0x41, 0xf8, 0xd7, 0x2, 0x1c, 0xd9, 0x83, 0x22, 0xbd, 0x8f}, - output384: []byte{0x8a, 0xc, 0x63, 0x31, 0x42, 0x93, 0x75, 0xf0, 0x52, 0x96, 0xa, 0xff, 0xf6, 0xd5, 0xfe, 0x33, 0x75, 0x9f, 0x97, 0x14, 0x5d, 0x60, 0xb2, 0x62, 0xbe, 0xde, 0x86, 0xd5, 0x25, 0x49, 0x94, 0x55, 0x8f, 0xc1, 0x80, 0xa, 0xdd, 0x9, 0xd6, 0x88, 0x7c, 0x27, 0x5f, 0x4d, 0xd3, 0x53, 0x1c, 0xb0}, - output512: []byte{0x80, 0x94, 0x6c, 0xa6, 0x8e, 0x8c, 0x16, 0xa9, 0x66, 0x7c, 0xd8, 0x33, 0x9d, 0x1c, 0x5b, 0x0, 0xf1, 0xe0, 0xd4, 0x1, 0xd0, 0xec, 0xc7, 0x94, 0x58, 0x75, 0x47, 0x94, 0x83, 0x8f, 0x3a, 0xe2, 0x94, 0x9a, 0x8c, 0xc5, 0xfe, 0x55, 0x84, 0x3, 0x3b, 0xca, 0x9c, 0x5b, 0xe6, 0x2c, 0x7c, 0x8, 0xf4, 0x2, 0xef, 0x2, 0xf7, 0x27, 0xce, 0xfa, 0x43, 0xbb, 0xd3, 0x74, 0xc2, 0xa6, 0x7c, 0x52}}, - testcase{ - msg: []byte{0x52, 0xa6, 0x8, 0xab, 0x21, 0xcc, 0xdd, 0x8a, 0x44, 0x57, 0xa5, 0x7e, 0xde, 0x78, 0x21, 0x76}, - output224: []byte{0x56, 0x79, 0xcd, 0x50, 0x9c, 0x51, 0x20, 0xaf, 0x54, 0x79, 0x5c, 0xf4, 0x77, 0x14, 0x96, 0x41, 0xcf, 0x27, 0xb2, 0xeb, 0xb6, 0xa5, 0xf9, 0x3, 0x40, 0x70, 0x4e, 0x57}, - output256: []byte{0xe, 0x32, 0xde, 0xfa, 0x20, 0x71, 0xf0, 0xb5, 0xac, 0xe, 0x6a, 0x10, 0x8b, 0x84, 0x2e, 0xd0, 0xf1, 0xd3, 0x24, 0x97, 0x12, 0xf5, 0x8e, 0xe0, 0xdd, 0xf9, 0x56, 0xfe, 0x33, 0x2a, 0x5f, 0x95}, - output384: []byte{0x18, 0x42, 0x2a, 0xc1, 0xd3, 0xa1, 0xe5, 0x4b, 0xad, 0x87, 0x68, 0x83, 0xd2, 0xd6, 0xdd, 0x65, 0xf6, 0x5c, 0x1d, 0x5f, 0x33, 0xa7, 0x12, 0x5c, 0xc4, 0xc1, 0x86, 0x40, 0x5a, 0x12, 0xed, 0x64, 0xba, 0x96, 0x67, 0x2e, 0xed, 0xda, 0x8c, 0x5a, 0x63, 0x31, 0xd2, 0x86, 0x83, 0xf4, 0x88, 0xeb}, - output512: []byte{0x4b, 0x39, 0xd3, 0xda, 0x5b, 0xcd, 0xf4, 0xd9, 0xb7, 0x69, 0x1, 0x59, 0x95, 0x64, 0x43, 0x11, 0xc1, 0x4c, 0x43, 0x5b, 0xf7, 0x2b, 0x10, 0x9, 0xd6, 0xdd, 0x71, 0xb0, 0x1a, 0x63, 0xb9, 0x7c, 0xfb, 0x59, 0x64, 0x18, 0xe8, 0xe4, 0x23, 0x42, 0xd1, 0x17, 0xe0, 0x74, 0x71, 0xa8, 0x91, 0x43, 0x14, 0xba, 0x7b, 0xe, 0x26, 0x4d, 0xad, 0xf0, 0xce, 0xa3, 0x81, 0x86, 0x8c, 0xbd, 0x43, 0xd1}}, - testcase{ - msg: []byte{0x82, 0xe1, 0x92, 0xe4, 0x4, 0x3d, 0xdc, 0xd1, 0x2e, 0xcf, 0x52, 0x96, 0x9d, 0xf, 0x80, 0x7e, 0xed}, - output224: []byte{0x45, 0x55, 0x84, 0xa1, 0xa3, 0xbb, 0xfb, 0xb9, 0x77, 0xae, 0x8, 0xdd, 0xee, 0x93, 0xda, 0x5a, 0xca, 0xe0, 0xf2, 0xf4, 0xc3, 0xcd, 0xaa, 0xf0, 0x89, 0x72, 0x8a, 0xae}, - output256: []byte{0x92, 0x4, 0x55, 0x6, 0x77, 0xb9, 0xaa, 0x77, 0xe, 0x6e, 0x93, 0xe3, 0x19, 0xb9, 0x95, 0x85, 0x40, 0xd5, 0x4f, 0xf4, 0xdc, 0xcb, 0x6, 0x3c, 0x85, 0x61, 0x30, 0x2c, 0xd8, 0xaf, 0xf6, 0x76}, - output384: []byte{0x4a, 0x59, 0xda, 0x5, 0xc6, 0xe0, 0x35, 0xd5, 0x9d, 0x93, 0xf5, 0x59, 0xd4, 0xa1, 0x30, 0xd3, 0xed, 0x91, 0xc2, 0x2e, 0xad, 0xa5, 0x3f, 0xd6, 0x79, 0xfb, 0xb, 0xf, 0x31, 0x39, 0x8a, 0x6f, 0xf8, 0x3a, 0x5a, 0x97, 0x39, 0xbf, 0xd4, 0xe9, 0x5f, 0x57, 0x31, 0x8f, 0xcc, 0xb8, 0x16, 0xf0}, - output512: []byte{0xc3, 0x7c, 0x9d, 0xc2, 0xe2, 0xd, 0x8e, 0x2f, 0xa, 0xe5, 0x88, 0xd7, 0xd4, 0x5a, 0x80, 0x7c, 0xcf, 0xa0, 0x0, 0xfc, 0x94, 0x8a, 0xc4, 0x2a, 0x8e, 0xd6, 0x3b, 0xb1, 0x4f, 0x31, 0x8f, 0xc3, 0xd4, 0xb9, 0x63, 0xf7, 0x30, 0x59, 0x80, 0xe6, 0xa0, 0xfd, 0x23, 0x16, 0xb5, 0x5b, 0x63, 0x14, 0x23, 0x73, 0xb1, 0xa2, 0x90, 0x2, 0x26, 0x48, 0x55, 0xc7, 0x16, 0xc5, 0xc9, 0xf1, 0x7f, 0x4c}}, - testcase{ - msg: []byte{0x75, 0x68, 0x3d, 0xcb, 0x55, 0x61, 0x40, 0xc5, 0x22, 0x54, 0x3b, 0xb6, 0xe9, 0x9, 0x8b, 0x21, 0xa2, 0x1e}, - output224: []byte{0xbb, 0x77, 0x9e, 0x72, 0x67, 0xca, 0xf0, 0xe8, 0x91, 0x54, 0x7e, 0xe3, 0xe3, 0xba, 0xbf, 0x17, 0x83, 0x76, 0x71, 0xcf, 0x73, 0x1e, 0xd5, 0x63, 0x34, 0xf6, 0x1c, 0xc3}, - output256: []byte{0xa6, 0xd5, 0x44, 0x4c, 0xb7, 0xaa, 0x61, 0xf5, 0x10, 0x6c, 0xde, 0xdb, 0x39, 0xd5, 0xe1, 0xdd, 0x7d, 0x60, 0x8f, 0x10, 0x27, 0x98, 0xd7, 0xe8, 0x18, 0xac, 0x87, 0x28, 0x91, 0x23, 0xa1, 0xdb}, - output384: []byte{0x98, 0xe6, 0xbc, 0xca, 0x5f, 0x2b, 0xb3, 0xc, 0x55, 0x47, 0x0, 0x20, 0x2e, 0x6, 0x4, 0xf7, 0xc8, 0x6b, 0x49, 0x41, 0xf0, 0x34, 0x53, 0x25, 0x10, 0xc, 0x83, 0xb1, 0x23, 0x4c, 0x45, 0x85, 0x6d, 0xfa, 0x76, 0x1e, 0x70, 0xdc, 0xd9, 0x72, 0xec, 0xb1, 0x24, 0x7a, 0xea, 0xc2, 0x92, 0x59}, - output512: []byte{0x90, 0x73, 0xc6, 0x25, 0x55, 0xe6, 0x9, 0x5f, 0x17, 0xdf, 0x71, 0xad, 0x2, 0xba, 0xbb, 0x91, 0x0, 0x28, 0x86, 0x33, 0x89, 0x84, 0x89, 0xb2, 0x1c, 0x90, 0x6a, 0x31, 0x90, 0x87, 0x5b, 0xae, 0xac, 0xcc, 0x83, 0xbe, 0x80, 0xab, 0xd1, 0x14, 0x66, 0xfe, 0xc3, 0x71, 0xba, 0x2c, 0x46, 0x23, 0xd0, 0x7f, 0x1, 0x31, 0xde, 0xfa, 0xec, 0x13, 0xa8, 0xc7, 0x32, 0xa9, 0xf8, 0x41, 0x71, 0x63}}, - testcase{ - msg: []byte{0x6, 0xe4, 0xef, 0xe4, 0x50, 0x35, 0xe6, 0x1f, 0xaa, 0xf4, 0x28, 0x7b, 0x4d, 0x8d, 0x1f, 0x12, 0xca, 0x97, 0xe5}, - output224: []byte{0xe7, 0xb1, 0x81, 0xda, 0xec, 0x13, 0x2d, 0x3b, 0x6c, 0x9d, 0xfb, 0xf6, 0x18, 0x41, 0x13, 0x5b, 0x87, 0xfb, 0x99, 0x5b, 0xe2, 0x9, 0x57, 0xb8, 0xcd, 0x9, 0x5e, 0x2b}, - output256: []byte{0x57, 0x96, 0xb9, 0x93, 0xd0, 0xbd, 0x12, 0x57, 0xcf, 0x26, 0x78, 0x2b, 0x4e, 0x58, 0xfa, 0xfb, 0x22, 0xb0, 0x98, 0x6d, 0x88, 0x68, 0x4a, 0xb5, 0xa2, 0xe6, 0xce, 0xc6, 0x70, 0x62, 0x75, 0xf9}, - output384: []byte{0xd3, 0xc3, 0xd7, 0x6b, 0x3d, 0x39, 0x26, 0xfd, 0x4c, 0xc4, 0xc0, 0x5a, 0x8, 0x7c, 0x2d, 0x76, 0x99, 0x29, 0x98, 0xa5, 0xcd, 0x8c, 0x13, 0xfa, 0x3d, 0x23, 0x3e, 0xe, 0xcb, 0x2a, 0xd8, 0xb8, 0x1b, 0xa4, 0xbe, 0x58, 0x1e, 0x2, 0xbe, 0x91, 0xc7, 0xf8, 0x2c, 0xca, 0xc9, 0x0, 0x13, 0xa0}, - output512: []byte{0x23, 0xe9, 0x35, 0x28, 0x56, 0x71, 0x8e, 0x1e, 0x2d, 0x68, 0xa2, 0x1d, 0x56, 0xd9, 0x31, 0x17, 0xce, 0xd7, 0x62, 0x8e, 0x98, 0x4f, 0xf0, 0x4e, 0xd8, 0xc0, 0xcb, 0x9b, 0x10, 0x53, 0x9e, 0x4e, 0xde, 0x28, 0x4f, 0x94, 0xfa, 0x71, 0xbf, 0x4b, 0x83, 0xbb, 0xb4, 0x93, 0x43, 0x5f, 0xd6, 0xbe, 0x26, 0xed, 0xdb, 0x9, 0xde, 0xac, 0x39, 0x68, 0xe, 0x6b, 0x5, 0xac, 0xc8, 0x7b, 0x8c, 0x4e}}, - testcase{ - msg: []byte{0xe2, 0x61, 0x93, 0x98, 0x9d, 0x6, 0x56, 0x8f, 0xe6, 0x88, 0xe7, 0x55, 0x40, 0xae, 0xa0, 0x67, 0x47, 0xd9, 0xf8, 0x51}, - output224: []byte{0x44, 0x72, 0x96, 0x46, 0xa0, 0x5a, 0xd0, 0x50, 0x3a, 0x87, 0x6b, 0x44, 0x8f, 0x88, 0xf1, 0x77, 0xa0, 0xa2, 0x63, 0xab, 0x74, 0x6c, 0xa6, 0xe3, 0x6, 0x76, 0xad, 0xb2}, - output256: []byte{0xcf, 0xbe, 0x73, 0xc6, 0x58, 0x5b, 0xe6, 0x20, 0x4d, 0xd4, 0x73, 0xab, 0xe3, 0x56, 0xb5, 0x39, 0x47, 0x71, 0x74, 0xc4, 0xb7, 0x70, 0xbf, 0xc9, 0x1e, 0x9f, 0xdb, 0xcb, 0xc5, 0x70, 0x86, 0xe6}, - output384: []byte{0x7c, 0x53, 0xda, 0x6, 0x0, 0x58, 0x18, 0x3c, 0xa6, 0x20, 0x4e, 0x77, 0xf0, 0x70, 0x9a, 0xeb, 0xef, 0x73, 0x55, 0x7c, 0x8f, 0x5e, 0x45, 0xc1, 0x95, 0xb7, 0xe9, 0x41, 0x6e, 0x72, 0x61, 0x36, 0x5d, 0x3, 0xb8, 0xa2, 0xd6, 0xc0, 0x1a, 0x10, 0x26, 0x55, 0x34, 0x4e, 0x72, 0x54, 0x75, 0xc4}, - output512: []byte{0x90, 0x9d, 0x75, 0x34, 0x26, 0xb1, 0xde, 0xe0, 0x9f, 0xc4, 0x74, 0xf1, 0x8c, 0xf8, 0x10, 0xd5, 0xd5, 0xaa, 0xdb, 0xf8, 0xa0, 0x9a, 0xf4, 0x95, 0xbf, 0x6c, 0x22, 0xac, 0xa0, 0xc6, 0x73, 0x2, 0x1b, 0xfc, 0x5d, 0x2a, 0xd9, 0x4f, 0x50, 0xb2, 0x4e, 0x15, 0x69, 0xe9, 0x56, 0x69, 0x4b, 0x21, 0xcf, 0x2c, 0xc8, 0xb4, 0xf3, 0xc7, 0xee, 0x4c, 0xf1, 0x95, 0xe4, 0x42, 0x4c, 0xc4, 0x15, 0xdd}}, - testcase{ - msg: []byte{0xd8, 0xdc, 0x8f, 0xde, 0xfb, 0xdc, 0xe9, 0xd4, 0x4e, 0x4c, 0xba, 0xfe, 0x78, 0x44, 0x7b, 0xae, 0x3b, 0x54, 0x36, 0x10, 0x2a}, - output224: []byte{0x5, 0xe1, 0x57, 0x93, 0xe4, 0x17, 0xdd, 0x4e, 0x2, 0xcd, 0x6c, 0x56, 0x36, 0xd4, 0x2c, 0x16, 0x38, 0xc1, 0x64, 0xd7, 0xb, 0x79, 0xf7, 0x17, 0xf2, 0x5d, 0x1a, 0x15}, - output256: []byte{0x31, 0xc8, 0x0, 0x6b, 0xe, 0xc3, 0x5e, 0x69, 0x6, 0x74, 0x29, 0x7c, 0xb2, 0x74, 0x76, 0xdb, 0x60, 0x66, 0xb5, 0xfa, 0x98, 0x25, 0xc6, 0x7, 0x28, 0xe9, 0xe0, 0xbb, 0x33, 0x8f, 0xb7, 0xc3}, - output384: []byte{0x24, 0x15, 0xc1, 0xd0, 0x53, 0xca, 0x20, 0x7c, 0x17, 0xd9, 0x9d, 0x2, 0xdb, 0xd1, 0x77, 0xcd, 0x1a, 0xa7, 0xf0, 0xb, 0xd, 0xc, 0xa2, 0xcf, 0x30, 0xb4, 0xd2, 0x9, 0x8e, 0xea, 0x1a, 0x4, 0xa6, 0x8e, 0x5b, 0x1c, 0x6d, 0xf2, 0xfb, 0x25, 0xec, 0xe1, 0x57, 0xc4, 0x23, 0xee, 0x8a, 0xb7}, - output512: []byte{0x4, 0x6c, 0x60, 0x19, 0xfc, 0x4d, 0x62, 0x8a, 0xe0, 0xda, 0x70, 0x92, 0xf9, 0x91, 0xf, 0x26, 0x9b, 0x85, 0x3d, 0x3b, 0x57, 0x5, 0x20, 0x39, 0xad, 0x13, 0x75, 0xc6, 0x65, 0x40, 0x5f, 0x9f, 0xd7, 0x9d, 0x57, 0x57, 0x9f, 0x42, 0xc4, 0xff, 0xf2, 0x49, 0xbb, 0x85, 0xae, 0x65, 0x11, 0x3a, 0x9f, 0x42, 0x76, 0xce, 0xde, 0x73, 0xe9, 0xcc, 0xb0, 0xc2, 0x47, 0x53, 0x93, 0x5a, 0x0, 0x6e}}, - testcase{ - msg: []byte{0x57, 0x8, 0x5f, 0xd7, 0xe1, 0x42, 0x16, 0xab, 0x10, 0x2d, 0x83, 0x17, 0xb0, 0xcb, 0x33, 0x8a, 0x78, 0x6d, 0x5f, 0xc3, 0x2d, 0x8f}, - output224: []byte{0x2c, 0x40, 0x77, 0xa8, 0x85, 0x89, 0x66, 0xef, 0x79, 0xaa, 0xc3, 0xec, 0x6d, 0x82, 0x85, 0x5e, 0xad, 0x22, 0x86, 0x7b, 0xa4, 0x5d, 0x61, 0x7a, 0x68, 0xcb, 0x92, 0x6e}, - output256: []byte{0x3b, 0x8f, 0xa3, 0x90, 0x4f, 0xe1, 0xb8, 0x37, 0x56, 0x5a, 0x50, 0xd0, 0xfb, 0xf0, 0x3e, 0x48, 0x7d, 0x6d, 0x72, 0xfc, 0x3c, 0xea, 0x41, 0xad, 0xcc, 0xe3, 0x3d, 0xf1, 0xb8, 0x35, 0xd2, 0x47}, - output384: []byte{0x90, 0xda, 0x42, 0xb0, 0xc3, 0x14, 0x44, 0x5e, 0xaf, 0xd8, 0x65, 0x6b, 0x26, 0x64, 0x4a, 0xdd, 0xed, 0xdc, 0x71, 0x3e, 0xab, 0x36, 0x28, 0x9b, 0xff, 0xc6, 0xed, 0x4a, 0x85, 0xbe, 0x66, 0xa1, 0xf, 0x5a, 0xcd, 0x6b, 0x3c, 0x61, 0xe9, 0xc3, 0x6a, 0x17, 0xc2, 0x62, 0x60, 0x87, 0x2d, 0xc8}, - output512: []byte{0x51, 0xc9, 0x9, 0xa6, 0x52, 0x89, 0x49, 0xba, 0xdd, 0xaf, 0x1b, 0xa0, 0xb1, 0x54, 0xea, 0x9c, 0x33, 0xfd, 0xe5, 0x7, 0x43, 0x59, 0x50, 0x5b, 0x76, 0xd4, 0xb7, 0xed, 0x54, 0x35, 0x2d, 0xd8, 0x93, 0xd4, 0xb, 0x14, 0x2a, 0x5f, 0x80, 0x2f, 0x37, 0x8c, 0xba, 0x7b, 0x8c, 0x37, 0x82, 0xec, 0xf2, 0xa0, 0x48, 0x54, 0x2b, 0xe6, 0xc5, 0x93, 0x68, 0x22, 0x21, 0x48, 0x46, 0xa8, 0xd5, 0xe4}}, - testcase{ - msg: []byte{0xa0, 0x54, 0x4, 0xdf, 0x5d, 0xbb, 0x57, 0x69, 0x7e, 0x2c, 0x16, 0xfa, 0x29, 0xde, 0xfa, 0xc8, 0xab, 0x35, 0x60, 0xd6, 0x12, 0x6f, 0xa0}, - output224: []byte{0x2e, 0x89, 0x7b, 0x47, 0x9f, 0xbc, 0xbf, 0x42, 0xd2, 0x13, 0x9f, 0x67, 0x68, 0xdf, 0x14, 0x7a, 0x3b, 0x85, 0xc3, 0x6a, 0x5b, 0x3f, 0x3c, 0x6, 0x6e, 0xb0, 0x56, 0x5e}, - output256: []byte{0x37, 0xfe, 0xbc, 0x4d, 0xf9, 0xd5, 0xd, 0xae, 0xab, 0xd0, 0xca, 0xa6, 0x57, 0x88, 0x12, 0xa6, 0x87, 0xe5, 0x5f, 0x1a, 0xc0, 0xb1, 0x9, 0xd2, 0x51, 0x28, 0x10, 0xd0, 0x5, 0x48, 0xc8, 0x5b}, - output384: []byte{0xee, 0x20, 0x9e, 0x98, 0xa7, 0x5a, 0x67, 0xb0, 0x90, 0x8, 0x20, 0x2c, 0xad, 0x38, 0x9, 0x17, 0xeb, 0x1f, 0x92, 0xc5, 0xdb, 0x4e, 0x8f, 0x2c, 0x64, 0x90, 0xa, 0xf8, 0xc6, 0x3, 0xd2, 0x65, 0xca, 0xb3, 0x17, 0xbf, 0x7b, 0x8e, 0x22, 0x51, 0xe4, 0x79, 0xf8, 0x81, 0x8d, 0x30, 0x22, 0xca}, - output512: []byte{0xef, 0xc8, 0x91, 0x7e, 0x12, 0x47, 0x74, 0x2a, 0x2d, 0x4e, 0xc2, 0x9a, 0xfe, 0xdd, 0xf1, 0xe6, 0xec, 0xe3, 0x77, 0xb3, 0xd8, 0xac, 0x6e, 0x58, 0xc9, 0x85, 0x1c, 0xe9, 0xc9, 0x9b, 0xd5, 0x99, 0xad, 0xeb, 0xfe, 0xd6, 0x57, 0xba, 0xac, 0xd1, 0x79, 0x3f, 0xc9, 0x1b, 0x4, 0xdf, 0x29, 0x57, 0xbf, 0x6f, 0x18, 0x88, 0x86, 0x92, 0x86, 0x0, 0x2d, 0xc4, 0xad, 0x9a, 0xc7, 0xf7, 0x67, 0x93}}, - testcase{ - msg: []byte{0xae, 0xcb, 0xb0, 0x27, 0x59, 0xf7, 0x43, 0x3d, 0x6f, 0xcb, 0x6, 0x96, 0x3c, 0x74, 0x6, 0x1c, 0xd8, 0x3b, 0x5b, 0x3f, 0xfa, 0x6f, 0x13, 0xc6}, - output224: []byte{0xba, 0x76, 0xff, 0xef, 0xd0, 0x6, 0xb8, 0x1e, 0xf5, 0x99, 0x1e, 0x69, 0x7d, 0x4, 0x25, 0x62, 0x1b, 0x16, 0x81, 0x8e, 0xa2, 0x7c, 0x11, 0x5, 0x6e, 0x0, 0x90, 0x4e}, - output256: []byte{0x23, 0x29, 0x81, 0xb, 0x5a, 0x47, 0x35, 0xbc, 0xd4, 0x9c, 0x10, 0xe6, 0x45, 0x6c, 0xb, 0x1d, 0xed, 0x5e, 0xac, 0x25, 0x8a, 0xf4, 0x7c, 0xbb, 0x79, 0x7c, 0xa1, 0x62, 0xab, 0x6d, 0x1b, 0xa8}, - output384: []byte{0x11, 0x98, 0xef, 0xa5, 0x7e, 0x1a, 0x78, 0x84, 0xda, 0xc8, 0x27, 0xe6, 0x83, 0x25, 0x55, 0x75, 0x51, 0xe, 0x1f, 0x92, 0x2, 0x4a, 0x13, 0x51, 0x44, 0x65, 0x9b, 0xe8, 0x7b, 0xbf, 0xd, 0x6, 0x3e, 0xd2, 0x6c, 0x98, 0x76, 0x47, 0xb9, 0x23, 0xa0, 0x91, 0xcf, 0x11, 0x68, 0x3, 0x16, 0xfe}, - output512: []byte{0xfc, 0xef, 0x88, 0xbc, 0xc7, 0xef, 0x70, 0xd8, 0xc3, 0x97, 0x34, 0x29, 0xac, 0x51, 0x39, 0x15, 0x5f, 0x9b, 0xa6, 0x43, 0xb4, 0x31, 0x1, 0x3f, 0x18, 0x17, 0xec, 0xd2, 0xff, 0x3a, 0xb2, 0x87, 0x88, 0xf, 0x9e, 0xa5, 0x4d, 0xf7, 0x50, 0x3c, 0xb3, 0xf7, 0x3d, 0x7c, 0xf2, 0xb8, 0x7d, 0x2e, 0x9b, 0xdb, 0xd2, 0x3, 0x37, 0x8f, 0xae, 0x74, 0xca, 0x4b, 0xd2, 0x66, 0x7a, 0x4a, 0xa7, 0x6}}, - testcase{ - msg: []byte{0xaa, 0xfd, 0xc9, 0x24, 0x3d, 0x3d, 0x4a, 0x9, 0x65, 0x58, 0xa3, 0x60, 0xcc, 0x27, 0xc8, 0xd8, 0x62, 0xf0, 0xbe, 0x73, 0xdb, 0x5e, 0x88, 0xaa, 0x55}, - output224: []byte{0x1c, 0x1e, 0x75, 0x8d, 0x87, 0x39, 0x9a, 0x36, 0xbf, 0x7c, 0x8a, 0x2e, 0x6a, 0x55, 0xce, 0x6a, 0x4f, 0xc, 0x49, 0x87, 0x37, 0x95, 0x69, 0x59, 0x95, 0x9f, 0xd2, 0xac}, - output256: []byte{0x6f, 0xff, 0xa0, 0x70, 0xb8, 0x65, 0xbe, 0x3e, 0xe7, 0x66, 0xdc, 0x2d, 0xb4, 0x9b, 0x6a, 0xa5, 0x5c, 0x36, 0x9f, 0x7d, 0xe3, 0x70, 0x3a, 0xda, 0x26, 0x12, 0xd7, 0x54, 0x14, 0x5c, 0x1, 0xe6}, - output384: []byte{0x4, 0x35, 0xe5, 0x4c, 0x1, 0x6c, 0x7, 0x91, 0x67, 0x7d, 0xdb, 0xc6, 0xba, 0xdd, 0x55, 0xd1, 0x46, 0x75, 0x42, 0x96, 0xb3, 0x11, 0x32, 0xb0, 0xb1, 0xc0, 0xb5, 0xce, 0x4a, 0xed, 0xb0, 0x3a, 0xea, 0xa9, 0xa2, 0xdc, 0x51, 0x57, 0xd7, 0xaf, 0x20, 0xb8, 0xe3, 0x6d, 0x75, 0xe1, 0xcc, 0x0}, - output512: []byte{0x47, 0xb, 0xdd, 0x8d, 0x70, 0x98, 0x75, 0xc8, 0xe6, 0xf8, 0x85, 0x91, 0xb9, 0x7d, 0x64, 0x86, 0xc5, 0xf0, 0x3b, 0x54, 0xbf, 0xc9, 0x5, 0x75, 0x74, 0x83, 0xe0, 0x13, 0xf6, 0x3a, 0x6c, 0x56, 0x98, 0x4d, 0x45, 0x18, 0xd4, 0x5c, 0x2d, 0x22, 0x98, 0xea, 0xdb, 0x44, 0xaf, 0x3a, 0xc, 0x35, 0xa7, 0x6b, 0x57, 0x3d, 0x45, 0x2f, 0x57, 0x47, 0x84, 0x4d, 0x3a, 0xd8, 0xf8, 0x4a, 0x2e, 0x85}}, - testcase{ - msg: []byte{0x7b, 0xc8, 0x48, 0x67, 0xf6, 0xf9, 0xe9, 0xfd, 0xc3, 0xe1, 0x4, 0x6c, 0xae, 0x3a, 0x52, 0xc7, 0x7e, 0xd4, 0x85, 0x86, 0xe, 0xe2, 0x60, 0xe3, 0xb, 0x15}, - output224: []byte{0xdd, 0xea, 0x76, 0x40, 0x9c, 0x61, 0xf6, 0xd1, 0x87, 0x3f, 0x1, 0xa3, 0x42, 0x51, 0xc7, 0x4c, 0x37, 0xb3, 0x4f, 0x28, 0xf7, 0xf4, 0x82, 0xa8, 0x43, 0x95, 0xb5, 0xf3}, - output256: []byte{0xb3, 0x7, 0x61, 0xc0, 0x53, 0xe9, 0x26, 0xf1, 0x50, 0xb9, 0xdc, 0xe7, 0xe0, 0x5, 0xb4, 0xd8, 0x78, 0x11, 0xcc, 0xfb, 0x9e, 0x3b, 0x6e, 0xdb, 0x2, 0x21, 0x2, 0x2f, 0x1, 0x71, 0x1c, 0xf0}, - output384: []byte{0x88, 0xd8, 0x98, 0xed, 0x7e, 0x6e, 0x54, 0xa6, 0x83, 0x81, 0x2b, 0x37, 0x2f, 0x67, 0x8a, 0x5f, 0xd7, 0x3b, 0xcf, 0x31, 0x60, 0xa9, 0x69, 0xfe, 0x45, 0x84, 0x65, 0x1a, 0xdb, 0x32, 0x55, 0xf9, 0xad, 0xcc, 0x8b, 0x85, 0xdc, 0xca, 0x5c, 0x3b, 0xf8, 0xeb, 0xa3, 0xa1, 0xb6, 0x9d, 0x9b, 0x90}, - output512: []byte{0x42, 0x9f, 0xd4, 0x38, 0xb3, 0x90, 0xad, 0x2, 0x24, 0x2, 0x89, 0x75, 0x46, 0x7e, 0xc2, 0x28, 0xf9, 0xad, 0xcd, 0xe7, 0x1e, 0x17, 0x38, 0x0, 0x5e, 0x37, 0x17, 0xc5, 0x8f, 0x72, 0x7a, 0xa2, 0xb7, 0xc6, 0x17, 0x80, 0xbf, 0xc, 0x5f, 0x8b, 0x76, 0x6c, 0xc6, 0xd3, 0x45, 0x51, 0xd8, 0x7d, 0x22, 0xa1, 0x30, 0xb8, 0xc2, 0x15, 0x61, 0x42, 0x4, 0xe6, 0x7, 0xaa, 0x82, 0xff, 0x84, 0x69}}, - testcase{ - msg: []byte{0xfa, 0xc5, 0x23, 0x57, 0x5a, 0x99, 0xec, 0x48, 0x27, 0x9a, 0x7a, 0x45, 0x9e, 0x98, 0xff, 0x90, 0x19, 0x18, 0xa4, 0x75, 0x3, 0x43, 0x27, 0xef, 0xb5, 0x58, 0x43}, - output224: []byte{0x77, 0x7c, 0x52, 0x3c, 0xf4, 0x2d, 0x0, 0x6, 0xed, 0x1f, 0x88, 0xf1, 0xbd, 0xc, 0x3a, 0x5e, 0xf2, 0x18, 0x14, 0x72, 0x37, 0x94, 0xb8, 0x46, 0x1a, 0x37, 0x5c, 0x3a}, - output256: []byte{0x4, 0xf1, 0xb3, 0xc1, 0xe2, 0x5b, 0xa5, 0xd0, 0x12, 0xe2, 0x2a, 0xd1, 0x44, 0xe5, 0xa8, 0x71, 0x9d, 0x94, 0x32, 0x2d, 0x5, 0xad, 0x9e, 0xf6, 0x1e, 0x7d, 0xb4, 0x9b, 0x59, 0x95, 0x9b, 0x3a}, - output384: []byte{0x7a, 0xc3, 0x43, 0xa9, 0x36, 0x9f, 0xa7, 0xbf, 0x45, 0xaf, 0xed, 0x43, 0x8, 0x4d, 0xc1, 0xe2, 0x75, 0xab, 0x1b, 0x70, 0x3, 0x4c, 0xfa, 0xac, 0xd4, 0xf3, 0xcb, 0x5e, 0x5e, 0x22, 0x1, 0xcf, 0xbd, 0x1c, 0xff, 0xf8, 0x3b, 0xaa, 0xd3, 0x89, 0x7a, 0x4c, 0xb8, 0xa0, 0xde, 0x5c, 0x35, 0xc4}, - output512: []byte{0x79, 0xa, 0x1, 0xa, 0xeb, 0x6f, 0x13, 0xe0, 0x19, 0xa1, 0xdc, 0x35, 0x57, 0x4b, 0x12, 0x19, 0xe7, 0x4f, 0xf5, 0xdb, 0x6f, 0xbd, 0x87, 0x46, 0x73, 0x36, 0x64, 0xff, 0xdb, 0xcf, 0xe1, 0xcc, 0x6e, 0x8a, 0xb3, 0x91, 0x17, 0xe3, 0x24, 0x4c, 0x4f, 0xa3, 0xc0, 0xa9, 0x62, 0xc9, 0xf5, 0x0, 0x30, 0xae, 0xf8, 0x8e, 0x19, 0x3e, 0x7e, 0xd, 0x4c, 0x47, 0x47, 0x34, 0x5f, 0x30, 0xcb, 0x54}}, - testcase{ - msg: []byte{0xf, 0x8b, 0x2d, 0x8f, 0xcf, 0xd9, 0xd6, 0x8c, 0xff, 0xc1, 0x7c, 0xcf, 0xb1, 0x17, 0x70, 0x9b, 0x53, 0xd2, 0x64, 0x62, 0xa3, 0xf3, 0x46, 0xfb, 0x7c, 0x79, 0xb8, 0x5e}, - output224: []byte{0x8d, 0x74, 0x74, 0xed, 0x6d, 0xea, 0x46, 0x26, 0xad, 0x3c, 0x1d, 0x6, 0xd2, 0xad, 0x5b, 0x19, 0x8c, 0xaa, 0xd0, 0x7b, 0x12, 0x7, 0x7c, 0x68, 0xc, 0xf6, 0xd8, 0x9b}, - output256: []byte{0xae, 0xef, 0x4b, 0x4d, 0xa4, 0x20, 0x83, 0x4f, 0xfc, 0xed, 0x26, 0xdb, 0x29, 0x12, 0x48, 0xfb, 0x2d, 0x1, 0xe7, 0x65, 0xe2, 0xb0, 0x56, 0x40, 0x57, 0xf8, 0xe6, 0xc2, 0x3, 0xa, 0xc3, 0x7f}, - output384: []byte{0x58, 0x87, 0x7b, 0x8d, 0xd9, 0x8c, 0x51, 0x33, 0x9e, 0x43, 0x2, 0xab, 0xe9, 0x5c, 0xf5, 0x76, 0x62, 0xcf, 0x5, 0xaa, 0x1, 0x93, 0x81, 0x61, 0xcb, 0xfb, 0x5d, 0xdd, 0xa7, 0x24, 0x51, 0x7f, 0xc, 0x0, 0x2d, 0x54, 0xb5, 0x4e, 0xea, 0x7e, 0xbd, 0x64, 0xe2, 0x9, 0xda, 0xeb, 0x8f, 0x1}, - output512: []byte{0xaa, 0xf7, 0xa3, 0x91, 0x60, 0x2, 0x70, 0xf7, 0xb5, 0xa2, 0xa3, 0xbb, 0xc7, 0x47, 0x4a, 0xc4, 0x15, 0x4e, 0xbe, 0xac, 0x3, 0xa7, 0x90, 0xa5, 0x7f, 0xda, 0xd9, 0x6c, 0xea, 0x2d, 0x4, 0x3c, 0x9f, 0xa5, 0xf6, 0x91, 0x67, 0x90, 0xb9, 0x2f, 0x80, 0x32, 0xd6, 0x68, 0xed, 0x9a, 0x7, 0x11, 0x2d, 0xc5, 0xb2, 0x37, 0x3e, 0xc8, 0x16, 0xaa, 0xbc, 0xa6, 0xf5, 0x77, 0xce, 0x60, 0x41, 0x5e}}, - testcase{ - msg: []byte{0xa9, 0x63, 0xc3, 0xe8, 0x95, 0xff, 0x5a, 0xb, 0xe4, 0x82, 0x44, 0x0, 0x51, 0x8d, 0x81, 0x41, 0x2f, 0x87, 0x5f, 0xa5, 0x5, 0x21, 0xe2, 0x6e, 0x85, 0xea, 0xc9, 0xc, 0x4}, - output224: []byte{0xf5, 0x25, 0xd4, 0x51, 0x5d, 0x3c, 0xa5, 0x4a, 0x2f, 0xab, 0x9c, 0x67, 0x9e, 0x93, 0x56, 0x1f, 0xe1, 0x51, 0xea, 0x9, 0x60, 0x75, 0x13, 0x52, 0xcd, 0x7f, 0x59, 0x1a}, - output256: []byte{0x3, 0xd2, 0x6a, 0xee, 0xb4, 0xa7, 0xbd, 0xdd, 0xbf, 0xf7, 0xcf, 0xf6, 0x67, 0x19, 0x8c, 0x42, 0x59, 0x41, 0xa2, 0x77, 0x69, 0x22, 0xdf, 0x2b, 0xec, 0x54, 0x5f, 0x53, 0x4, 0xe2, 0xc6, 0x1c}, - output384: []byte{0x1c, 0xd6, 0x38, 0x12, 0x87, 0x18, 0xbe, 0x35, 0x13, 0x85, 0xe7, 0xa1, 0x56, 0xc3, 0xf0, 0xee, 0x8b, 0x21, 0xd, 0x15, 0x65, 0x87, 0x6f, 0x8e, 0xd4, 0x6c, 0x22, 0x7b, 0x93, 0xd, 0x18, 0x8f, 0xe8, 0xca, 0x27, 0x76, 0xf, 0xe1, 0x89, 0xd3, 0xb1, 0x36, 0x83, 0x65, 0x61, 0xe9, 0xa0, 0xee}, - output512: []byte{0x3e, 0x28, 0x80, 0xa9, 0x74, 0xe5, 0xf, 0x98, 0xbd, 0x6c, 0xc0, 0xf9, 0xd7, 0x69, 0xaf, 0x34, 0x8c, 0xe3, 0xb7, 0xe8, 0xfa, 0x38, 0xcf, 0xc, 0xa2, 0xda, 0x5f, 0xd7, 0x4, 0xc9, 0xc0, 0xe5, 0x7d, 0x55, 0x0, 0xbe, 0xa3, 0xcb, 0x74, 0x77, 0x92, 0x7f, 0x9c, 0x39, 0x4a, 0xa3, 0xf9, 0xbb, 0xc0, 0x18, 0x24, 0x35, 0x2, 0x91, 0xb9, 0xa0, 0xa0, 0xcb, 0xf0, 0x94, 0xbb, 0x37, 0xda, 0x55}}, - testcase{ - msg: []byte{0x3, 0xa1, 0x86, 0x88, 0xb1, 0xc, 0xc0, 0xed, 0xf8, 0x3a, 0xdf, 0xa, 0x84, 0x80, 0x8a, 0x97, 0x18, 0x38, 0x3c, 0x40, 0x70, 0xc6, 0xc4, 0xf2, 0x95, 0x9, 0x86, 0x99, 0xac, 0x2c}, - output224: []byte{0x9a, 0x84, 0x55, 0xf4, 0x1f, 0x69, 0x3b, 0x91, 0xb3, 0xde, 0x46, 0xbf, 0x66, 0xff, 0x9, 0xd4, 0x2d, 0xc3, 0x0, 0xb8, 0x56, 0xb1, 0xdc, 0x2d, 0xfd, 0x12, 0x55, 0x5c}, - output256: []byte{0x43, 0x5c, 0xfc, 0xd, 0x1a, 0xfd, 0x8d, 0x55, 0x9, 0xa9, 0xcc, 0xbf, 0x49, 0x70, 0x65, 0x75, 0x3, 0x86, 0x85, 0xbf, 0x8, 0xdb, 0x54, 0x9d, 0x97, 0x14, 0x54, 0x82, 0x40, 0x46, 0x3e, 0xe9}, - output384: []byte{0xb4, 0xdb, 0xdf, 0xd9, 0x92, 0x2a, 0xfd, 0x1c, 0xe4, 0x6f, 0xf1, 0xcb, 0x27, 0xc3, 0xe, 0x2a, 0xea, 0xa9, 0x67, 0x63, 0x1a, 0x4, 0x0, 0x1c, 0x7e, 0xf2, 0xb5, 0xea, 0xbd, 0x3c, 0x6, 0x78, 0xc0, 0xff, 0x21, 0x9b, 0xe7, 0xb9, 0xfa, 0x4, 0xcf, 0x83, 0xdd, 0x40, 0xbc, 0x1b, 0x33, 0xb6}, - output512: []byte{0x48, 0xe5, 0x5e, 0x3, 0x40, 0xf2, 0x4, 0x66, 0x88, 0x1a, 0x73, 0x2a, 0xa8, 0x84, 0x59, 0xad, 0x4b, 0xcd, 0xef, 0x36, 0x4c, 0x3b, 0xd0, 0x45, 0xae, 0x9, 0x9f, 0x95, 0x3d, 0x89, 0xf1, 0x59, 0x57, 0xae, 0xf2, 0x4, 0x26, 0x5c, 0x39, 0x15, 0xba, 0x42, 0xfe, 0x42, 0x35, 0x19, 0x6b, 0xe3, 0xd0, 0xf5, 0x64, 0x67, 0x62, 0x27, 0xc3, 0xc0, 0xde, 0xac, 0xfb, 0xaf, 0x68, 0xf9, 0xe7, 0x17}}, - testcase{ - msg: []byte{0x84, 0xfb, 0x51, 0xb5, 0x17, 0xdf, 0x6c, 0x5a, 0xcc, 0xb5, 0xd0, 0x22, 0xf8, 0xf2, 0x8d, 0xa0, 0x9b, 0x10, 0x23, 0x2d, 0x42, 0x32, 0xf, 0xfc, 0x32, 0xdb, 0xec, 0xc3, 0x83, 0x5b, 0x29}, - output224: []byte{0x81, 0xaf, 0x3a, 0x7a, 0x5b, 0xd4, 0xc1, 0xf9, 0x48, 0xd6, 0xaf, 0x4b, 0x96, 0xf9, 0x3c, 0x3b, 0xc, 0xf9, 0xc0, 0xe7, 0xa6, 0xda, 0x6f, 0xcd, 0x71, 0xee, 0xc7, 0xf6}, - output256: []byte{0xd4, 0x77, 0xfb, 0x2, 0xca, 0xaa, 0x95, 0xb3, 0x28, 0xe, 0xc8, 0xee, 0x88, 0x2c, 0x29, 0xd9, 0xe8, 0xa6, 0x54, 0xb2, 0x1e, 0xf1, 0x78, 0xe0, 0xf9, 0x75, 0x71, 0xbf, 0x9d, 0x4d, 0x3c, 0x1c}, - output384: []byte{0x50, 0x3d, 0xca, 0xa4, 0xad, 0xda, 0x5a, 0x94, 0x20, 0xb2, 0xe4, 0x36, 0xdd, 0x62, 0xd9, 0xab, 0x2e, 0x2, 0x54, 0x29, 0x5c, 0x29, 0x82, 0xef, 0x67, 0xfc, 0xe4, 0xf, 0x11, 0x7a, 0x24, 0x0, 0xab, 0x49, 0x2f, 0x7b, 0xd5, 0xd1, 0x33, 0xc6, 0xec, 0x22, 0x32, 0x26, 0x8b, 0xc2, 0x7b, 0x42}, - output512: []byte{0x9d, 0x80, 0x98, 0xd8, 0xd6, 0xed, 0xbb, 0xaa, 0x2b, 0xcf, 0xc6, 0xfb, 0x2f, 0x89, 0xc3, 0xea, 0xc6, 0x7f, 0xec, 0x25, 0xcd, 0xfe, 0x75, 0xaa, 0x7b, 0xd5, 0x70, 0xa6, 0x48, 0xe8, 0xc8, 0x94, 0x5f, 0xf2, 0xec, 0x28, 0xf, 0x6d, 0xcf, 0x73, 0x38, 0x61, 0x9, 0x15, 0x5c, 0x5b, 0xbc, 0x44, 0x4c, 0x70, 0x7b, 0xb4, 0x2e, 0xab, 0x87, 0x3f, 0x5f, 0x74, 0x76, 0x65, 0x7b, 0x1b, 0xc1, 0xa8}}, - testcase{ - msg: []byte{0x9f, 0x2f, 0xcc, 0x7c, 0x90, 0xde, 0x9, 0xd, 0x6b, 0x87, 0xcd, 0x7e, 0x97, 0x18, 0xc1, 0xea, 0x6c, 0xb2, 0x11, 0x18, 0xfc, 0x2d, 0x5d, 0xe9, 0xf9, 0x7e, 0x5d, 0xb6, 0xac, 0x1e, 0x9c, 0x10}, - output224: []byte{0xa2, 0x7a, 0x5, 0x1a, 0x36, 0xa1, 0x50, 0x19, 0x74, 0xad, 0x8e, 0x98, 0x73, 0xe9, 0xdf, 0x23, 0x1a, 0xa9, 0xad, 0x90, 0xec, 0x1d, 0x7a, 0x8b, 0xbf, 0x8f, 0x63, 0x9a}, - output256: []byte{0x24, 0xdd, 0x2e, 0xe0, 0x24, 0x82, 0x14, 0x4f, 0x53, 0x9f, 0x81, 0xd, 0x2c, 0xaa, 0x8a, 0x7b, 0x75, 0xd0, 0xfa, 0x33, 0x65, 0x7e, 0x47, 0x93, 0x21, 0x22, 0xd2, 0x73, 0xc3, 0xf6, 0xf6, 0xd1}, - output384: []byte{0x64, 0xd1, 0x1a, 0xdc, 0x77, 0xaf, 0x5c, 0x56, 0x8f, 0x37, 0xe4, 0x4e, 0xfa, 0xc5, 0xfd, 0x3, 0xc4, 0x60, 0x39, 0x1a, 0xa8, 0x33, 0xab, 0xec, 0x4e, 0x46, 0x42, 0x37, 0xa8, 0x93, 0x7e, 0xed, 0xd2, 0x3e, 0xc5, 0x13, 0xdd, 0x2a, 0x71, 0xd0, 0x32, 0x9b, 0xea, 0xa8, 0xbe, 0xf3, 0x95, 0xc9}, - output512: []byte{0x1e, 0xaf, 0xed, 0xce, 0x72, 0x92, 0xba, 0x73, 0xb8, 0xa, 0xe6, 0x15, 0x17, 0x45, 0xf4, 0x3a, 0xc9, 0x5b, 0xfc, 0x9f, 0x31, 0x69, 0x4d, 0x42, 0x24, 0x73, 0xab, 0xca, 0x2e, 0x69, 0xd6, 0x95, 0xcb, 0x65, 0x44, 0xdb, 0x65, 0x50, 0x60, 0x78, 0xcb, 0x20, 0xdb, 0xe0, 0x76, 0x2f, 0x84, 0xaa, 0x6a, 0xfd, 0x14, 0xa6, 0xa, 0xb5, 0x97, 0x95, 0x5b, 0xe7, 0x3f, 0x3f, 0x5c, 0x50, 0xf7, 0xa8}}, - testcase{ - msg: []byte{0xde, 0x8f, 0x1b, 0x3f, 0xaa, 0x4b, 0x70, 0x40, 0xed, 0x45, 0x63, 0xc3, 0xb8, 0xe5, 0x98, 0x25, 0x31, 0x78, 0xe8, 0x7e, 0x4d, 0xd, 0xf7, 0x5e, 0x4f, 0xf2, 0xf2, 0xde, 0xdd, 0x5a, 0xb, 0xe0, 0x46}, - output224: []byte{0xf2, 0x17, 0x81, 0x2e, 0x36, 0x2e, 0xc6, 0x4d, 0x4d, 0xc5, 0xea, 0xcf, 0xab, 0xc1, 0x65, 0x18, 0x4b, 0xfa, 0x45, 0x6e, 0x5c, 0x32, 0xc2, 0xc7, 0x90, 0x2, 0x53, 0xd0}, - output256: []byte{0xe7, 0x8c, 0x42, 0x1e, 0x62, 0x13, 0xaf, 0xf8, 0xde, 0x1f, 0x2, 0x57, 0x59, 0xa4, 0xf2, 0xc9, 0x43, 0xdb, 0x62, 0xbb, 0xde, 0x35, 0x9c, 0x87, 0x37, 0xe1, 0x9b, 0x37, 0x76, 0xed, 0x2d, 0xd2}, - output384: []byte{0xcf, 0x38, 0x76, 0x49, 0x73, 0xf1, 0xec, 0x1c, 0x34, 0xb5, 0x43, 0x3a, 0xe7, 0x5a, 0x3a, 0xad, 0x1a, 0xae, 0xf6, 0xab, 0x19, 0x78, 0x50, 0xc5, 0x6c, 0x86, 0x17, 0xbc, 0xd6, 0xa8, 0x82, 0xf6, 0x66, 0x68, 0x83, 0xac, 0x17, 0xb2, 0xdc, 0xcd, 0xba, 0xa6, 0x47, 0x7, 0x5d, 0x9, 0x72, 0xb5}, - output512: []byte{0x9a, 0x76, 0x88, 0xe3, 0x1a, 0xaf, 0x40, 0xc1, 0x55, 0x75, 0xfc, 0x58, 0xc6, 0xb3, 0x92, 0x67, 0xaa, 0xd3, 0x72, 0x2e, 0x69, 0x6e, 0x51, 0x8a, 0x99, 0x45, 0xcf, 0x7f, 0x7c, 0xf, 0xea, 0x84, 0xcb, 0x3c, 0xb2, 0xe9, 0xf0, 0x38, 0x4a, 0x6b, 0x5d, 0xc6, 0x71, 0xad, 0xe7, 0xfb, 0x4d, 0x2b, 0x27, 0x1, 0x11, 0x73, 0xf3, 0xee, 0xea, 0xf1, 0x7c, 0xb4, 0x51, 0xcf, 0x26, 0x54, 0x20, 0x31}}, - testcase{ - msg: []byte{0x62, 0xf1, 0x54, 0xec, 0x39, 0x4d, 0xb, 0xc7, 0x57, 0xd0, 0x45, 0xc7, 0x98, 0xc8, 0xb8, 0x7a, 0x0, 0xe0, 0x65, 0x5d, 0x4, 0x81, 0xa7, 0xd2, 0xd9, 0xfb, 0x58, 0xd9, 0x3a, 0xed, 0xc6, 0x76, 0xb5, 0xa0}, - output224: []byte{0x5c, 0xa9, 0x2b, 0x5f, 0x58, 0x30, 0xe1, 0xe5, 0xf8, 0xdf, 0x43, 0x91, 0x33, 0x9d, 0xf7, 0xdf, 0x1f, 0x23, 0xbb, 0x31, 0xaa, 0x5, 0x43, 0x7c, 0x10, 0x3f, 0x16, 0x52}, - output256: []byte{0xcc, 0xe3, 0xe3, 0xd4, 0x98, 0x32, 0x8a, 0x4d, 0x9c, 0x5b, 0x4d, 0xbf, 0x9a, 0x12, 0x9, 0x62, 0x8a, 0xb8, 0x26, 0x21, 0xad, 0x1a, 0xd, 0xa, 0x18, 0x68, 0x3, 0x62, 0x88, 0x9e, 0x61, 0x64}, - output384: []byte{0x88, 0x2b, 0xff, 0x90, 0x4b, 0xff, 0x10, 0x31, 0x13, 0x95, 0x3, 0xbf, 0x6e, 0x2, 0x74, 0xc7, 0xa3, 0x92, 0x8c, 0x2d, 0x73, 0xbf, 0x47, 0x4a, 0x65, 0xb9, 0x7c, 0x22, 0xf6, 0x5f, 0x32, 0xbe, 0x26, 0xad, 0x1c, 0x5f, 0x7e, 0x4f, 0xa3, 0x5d, 0x5b, 0x62, 0x53, 0xaa, 0x40, 0x76, 0x36, 0x1a}, - output512: []byte{0xad, 0xa5, 0xca, 0x56, 0x30, 0x66, 0x0, 0x3, 0xc4, 0xd1, 0x61, 0x49, 0xf2, 0x35, 0xfa, 0xeb, 0x78, 0x13, 0x2f, 0x7f, 0x77, 0x3a, 0x63, 0x1f, 0x82, 0xc, 0xc5, 0xc6, 0x54, 0xb0, 0x8e, 0xab, 0x42, 0x6, 0xbb, 0x4e, 0xa1, 0x38, 0x9d, 0x1c, 0xf7, 0x4d, 0x3b, 0x60, 0xb8, 0x6e, 0x48, 0x4c, 0x90, 0xc8, 0x17, 0xcd, 0xb5, 0xdd, 0x5d, 0xbf, 0x32, 0x71, 0x63, 0xb4, 0x64, 0x6f, 0x72, 0x13}}, - testcase{ - msg: []byte{0xb2, 0xdc, 0xfe, 0x9f, 0xf1, 0x9e, 0x2b, 0x23, 0xce, 0x7d, 0xa2, 0xa4, 0x20, 0x7d, 0x3e, 0x5e, 0xc7, 0xc6, 0x11, 0x2a, 0x8a, 0x22, 0xae, 0xc9, 0x67, 0x5a, 0x88, 0x63, 0x78, 0xe1, 0x4e, 0x5b, 0xfb, 0xad, 0x4e}, - output224: []byte{0x9f, 0x1, 0xf0, 0x7d, 0x93, 0xf, 0x40, 0xa2, 0x64, 0x7, 0x76, 0x1, 0x4, 0xef, 0xd1, 0xd, 0x44, 0x36, 0x29, 0x5f, 0x6b, 0x8c, 0x41, 0xfe, 0x2a, 0x4e, 0x9, 0xea}, - output256: []byte{0xf8, 0x71, 0xdb, 0x93, 0xc5, 0xc9, 0x2e, 0xcd, 0x65, 0xd4, 0xed, 0xb9, 0x6f, 0xcb, 0x12, 0xe4, 0x72, 0x9b, 0xc2, 0xa1, 0x89, 0x9f, 0x7f, 0xb0, 0x29, 0xf5, 0xb, 0xff, 0x43, 0x1c, 0xbb, 0x72}, - output384: []byte{0x80, 0x44, 0x8b, 0x7a, 0x76, 0xe0, 0xf0, 0x66, 0x60, 0x48, 0xc0, 0x21, 0x65, 0xa4, 0xfa, 0x8d, 0xfd, 0x25, 0xa, 0x22, 0x7c, 0xcd, 0xd4, 0x47, 0x1c, 0x37, 0x3, 0xd0, 0x77, 0x62, 0x36, 0x2d, 0xc1, 0xdf, 0x55, 0xfe, 0xc2, 0x9e, 0x2a, 0x31, 0xfe, 0x70, 0x95, 0x83, 0x74, 0x27, 0x1d, 0xd7}, - output512: []byte{0x71, 0xa0, 0x80, 0x1d, 0x32, 0x58, 0x79, 0x80, 0xb0, 0x99, 0x63, 0xa0, 0xf5, 0x47, 0xb8, 0xb6, 0xee, 0x3b, 0xad, 0xe2, 0x24, 0x67, 0x1b, 0xf4, 0x4f, 0x12, 0xe3, 0xda, 0x4f, 0x21, 0x77, 0x8b, 0xac, 0x37, 0xfc, 0xc7, 0x3e, 0xf4, 0x5f, 0xee, 0x1c, 0x96, 0x68, 0x8b, 0xaf, 0x90, 0x20, 0xf4, 0x87, 0xb1, 0xa1, 0x6e, 0x3a, 0xc9, 0x1b, 0x50, 0x48, 0x45, 0xd6, 0xfb, 0xa8, 0x79, 0x13, 0x4f}}, - testcase{ - msg: []byte{0x47, 0xf5, 0x69, 0x7a, 0xc8, 0xc3, 0x14, 0x9, 0xc0, 0x86, 0x88, 0x27, 0x34, 0x7a, 0x61, 0x3a, 0x35, 0x62, 0x4, 0x1c, 0x63, 0x3c, 0xf1, 0xf1, 0xf8, 0x68, 0x65, 0xa5, 0x76, 0xe0, 0x28, 0x35, 0xed, 0x2c, 0x24, 0x92}, - output224: []byte{0x22, 0xa3, 0xfe, 0xd1, 0xf4, 0xe2, 0x98, 0xc3, 0x7a, 0x1d, 0x7b, 0xa0, 0xc8, 0xe, 0x99, 0x4b, 0x11, 0xd9, 0x5f, 0x29, 0xf, 0x39, 0x45, 0xa3, 0xce, 0xb2, 0xe2, 0xe6}, - output256: []byte{0x4e, 0xb1, 0x43, 0x47, 0x74, 0x31, 0xdf, 0x1, 0x93, 0x11, 0xae, 0xd9, 0x36, 0xca, 0xb9, 0x1a, 0x91, 0x2e, 0xc1, 0xe6, 0x86, 0x8b, 0x71, 0xe9, 0xed, 0xdb, 0x77, 0x74, 0x8, 0xd4, 0xaf, 0x34}, - output384: []byte{0x62, 0x68, 0xcd, 0x6b, 0x41, 0xf4, 0xc5, 0x12, 0x3e, 0xc4, 0xd5, 0x4d, 0x1e, 0x69, 0x43, 0xab, 0xb3, 0x2d, 0xbe, 0x7b, 0xff, 0xb8, 0xeb, 0x95, 0xe4, 0xfc, 0xee, 0x5c, 0x12, 0xd4, 0x64, 0x7b, 0xe1, 0x43, 0xc2, 0x7f, 0x12, 0x81, 0xcd, 0xd2, 0x75, 0x90, 0x49, 0x20, 0x44, 0x15, 0x8, 0xda}, - output512: []byte{0xeb, 0xa6, 0x78, 0xb7, 0xa0, 0xe5, 0x66, 0x9d, 0xc7, 0xfa, 0x5e, 0xca, 0x5d, 0x5f, 0x19, 0xfe, 0x62, 0x5e, 0x11, 0x3e, 0x50, 0x28, 0xda, 0x5e, 0xfb, 0x13, 0x89, 0x23, 0xcd, 0x44, 0x47, 0x57, 0xb0, 0x60, 0x78, 0xe0, 0xba, 0x6, 0x4b, 0x36, 0xc7, 0x2c, 0xa2, 0x18, 0x7a, 0xb9, 0xdd, 0x31, 0xdd, 0xa6, 0xf2, 0x46, 0x68, 0xf4, 0x6c, 0x32, 0xf8, 0xec, 0x21, 0xac, 0x59, 0xaa, 0xfa, 0x24}}, - testcase{ - msg: []byte{0x51, 0x2a, 0x6d, 0x29, 0x2e, 0x67, 0xec, 0xb2, 0xfe, 0x48, 0x6b, 0xfe, 0x92, 0x66, 0x9, 0x53, 0xa7, 0x54, 0x84, 0xff, 0x4c, 0x4f, 0x2e, 0xca, 0x2b, 0xa, 0xf0, 0xed, 0xcd, 0xd4, 0x33, 0x9c, 0x6b, 0x2e, 0xe4, 0xe5, 0x42}, - output224: []byte{0x35, 0xf1, 0xab, 0x12, 0x63, 0x21, 0x1f, 0x73, 0x8d, 0x3f, 0x97, 0xd0, 0xe4, 0x84, 0xc, 0x38, 0x7e, 0x9, 0x36, 0x9f, 0x23, 0xbf, 0x92, 0x39, 0x15, 0xd, 0x3, 0x6}, - output256: []byte{0x9a, 0xc, 0x1d, 0x50, 0xa5, 0x9d, 0xbf, 0x65, 0x7f, 0x67, 0x13, 0xc7, 0x95, 0xed, 0x14, 0xe1, 0xf2, 0x3b, 0x4e, 0xaa, 0x13, 0x7c, 0x55, 0x40, 0xaa, 0xcd, 0xb0, 0xa7, 0xe3, 0x2c, 0x29, 0xfc}, - output384: []byte{0xc7, 0x3d, 0x18, 0xde, 0x7, 0xa6, 0x5a, 0xcc, 0x7e, 0x2d, 0x8b, 0x2a, 0x51, 0x0, 0x2a, 0xe2, 0x8c, 0xbc, 0x4b, 0xa, 0x6e, 0xe7, 0xf8, 0x1a, 0x6b, 0x48, 0x3f, 0x81, 0xa6, 0xdf, 0x8f, 0xf6, 0xb3, 0x3f, 0x63, 0x2a, 0x6e, 0x63, 0x12, 0x88, 0x8c, 0xa7, 0x14, 0x82, 0x1c, 0xb, 0x13, 0xdf}, - output512: []byte{0x12, 0xdf, 0x92, 0xd8, 0x89, 0xd7, 0xba, 0xd, 0xf0, 0x5b, 0xcd, 0x2, 0xd9, 0xde, 0x58, 0xc9, 0x7f, 0x48, 0x13, 0x12, 0x69, 0x67, 0xff, 0x78, 0xbd, 0xf7, 0x59, 0xc6, 0x6c, 0x4c, 0xbe, 0x9d, 0xf6, 0x8a, 0xb3, 0x1a, 0x2, 0x56, 0xc7, 0x76, 0x73, 0xb, 0xb2, 0x5d, 0xee, 0xcf, 0x91, 0xf0, 0x99, 0x78, 0x68, 0xac, 0x8b, 0xb8, 0x6d, 0xf7, 0xa0, 0xfc, 0x11, 0xc, 0xb0, 0xa4, 0xde, 0x5d}}, - testcase{ - msg: []byte{0x97, 0x3c, 0xf2, 0xb4, 0xdc, 0xf0, 0xbf, 0xa8, 0x72, 0xb4, 0x11, 0x94, 0xcb, 0x5, 0xbb, 0x4e, 0x16, 0x76, 0xa, 0x18, 0x40, 0xd8, 0x34, 0x33, 0x1, 0x80, 0x25, 0x76, 0x19, 0x7e, 0xc1, 0x9e, 0x2a, 0x14, 0x93, 0xd8, 0xf4, 0xfb}, - output224: []byte{0x34, 0xcc, 0x70, 0x8b, 0x87, 0x4d, 0x40, 0x47, 0x8e, 0x82, 0x32, 0x4b, 0xf3, 0xaa, 0x32, 0xfe, 0x9f, 0x85, 0xaf, 0xf8, 0xc6, 0xb, 0x4b, 0xad, 0xf9, 0x70, 0x3, 0xe3}, - output256: []byte{0xba, 0x6, 0x2e, 0x5d, 0x37, 0x2, 0x16, 0xd1, 0x19, 0x85, 0xc4, 0xca, 0x7a, 0x26, 0x58, 0xdd, 0xc7, 0x32, 0x8b, 0x4b, 0xe4, 0xb4, 0xa, 0x52, 0xdd, 0x8f, 0xa3, 0xca, 0x66, 0x2f, 0x9, 0xd1}, - output384: []byte{0x3a, 0xb, 0xea, 0x62, 0xf4, 0x2f, 0x9c, 0xee, 0xdb, 0x34, 0x8f, 0x6e, 0x16, 0x13, 0xf0, 0x3, 0x56, 0xed, 0x97, 0x66, 0xa5, 0xc1, 0x9f, 0xc, 0x2e, 0xeb, 0x5, 0xc7, 0x4d, 0xe6, 0x9d, 0x39, 0x43, 0xe1, 0x6c, 0xf7, 0x22, 0x81, 0xfd, 0xd9, 0x27, 0x15, 0xfa, 0x3d, 0x51, 0x51, 0x59, 0x31}, - output512: []byte{0xb8, 0xc7, 0xce, 0x2b, 0xe4, 0xcb, 0x32, 0xc1, 0x40, 0xe7, 0x5b, 0x75, 0x47, 0x42, 0x48, 0xc1, 0xdd, 0x77, 0xd1, 0x9b, 0xc, 0xbc, 0xa3, 0x1a, 0x3e, 0xcc, 0x2a, 0x35, 0xc5, 0x32, 0xe4, 0xfa, 0x3e, 0xd4, 0xab, 0xbc, 0xda, 0x27, 0xaa, 0x68, 0xa9, 0xdd, 0xa0, 0x6b, 0x24, 0x54, 0x43, 0xe5, 0x90, 0x3a, 0x65, 0x65, 0x2a, 0x94, 0xed, 0x3a, 0xf1, 0x50, 0x65, 0xd3, 0xe7, 0x73, 0x6e, 0x47}}, - testcase{ - msg: []byte{0x80, 0xbe, 0xeb, 0xcd, 0x2e, 0x3f, 0x8a, 0x94, 0x51, 0xd4, 0x49, 0x99, 0x61, 0xc9, 0x73, 0x1a, 0xe6, 0x67, 0xcd, 0xc2, 0x4e, 0xa0, 0x20, 0xce, 0x3b, 0x9a, 0xa4, 0xbb, 0xc0, 0xa7, 0xf7, 0x9e, 0x30, 0xa9, 0x34, 0x46, 0x7d, 0xa4, 0xb0}, - output224: []byte{0x5f, 0x33, 0x9b, 0x2f, 0x87, 0xe7, 0xf6, 0x95, 0xb2, 0x36, 0x26, 0x7c, 0x81, 0x9b, 0xa1, 0x70, 0x5d, 0x97, 0x64, 0x4a, 0xd7, 0x2e, 0x8, 0x71, 0xc7, 0xe3, 0xa9, 0x13}, - output256: []byte{0x3a, 0x8, 0x3a, 0xe1, 0x63, 0xdf, 0x42, 0xbd, 0x51, 0xb9, 0xc6, 0x64, 0xbe, 0xe9, 0xdc, 0x43, 0x62, 0xf1, 0x6e, 0x63, 0x38, 0x3d, 0xf1, 0x64, 0x73, 0xdf, 0x71, 0xbe, 0x6d, 0xd4, 0xc, 0x1c}, - output384: []byte{0x10, 0x92, 0xf6, 0x39, 0x55, 0xf3, 0xdf, 0xef, 0x13, 0x22, 0xcf, 0x95, 0x16, 0xf2, 0x15, 0x40, 0x21, 0x55, 0x52, 0xbc, 0x57, 0x9, 0xcc, 0xda, 0x17, 0xad, 0x27, 0x6e, 0xca, 0xa0, 0x91, 0xa7, 0x84, 0x51, 0xfe, 0x99, 0x25, 0x79, 0x1b, 0x8a, 0x91, 0x91, 0xb5, 0xd4, 0x20, 0x10, 0x15, 0x6f}, - output512: []byte{0xa0, 0xae, 0x9d, 0xfb, 0x56, 0x83, 0x1f, 0xe4, 0xa3, 0x22, 0x3c, 0x50, 0x1b, 0x69, 0x7b, 0xd8, 0x24, 0x3c, 0x47, 0x1e, 0x83, 0x43, 0xac, 0xfd, 0x37, 0xa6, 0xb5, 0x87, 0xfe, 0xac, 0x74, 0x57, 0x1c, 0x23, 0xde, 0xeb, 0xc9, 0xb9, 0x4a, 0x54, 0xa, 0x2, 0xf1, 0xb1, 0xe2, 0x25, 0x1e, 0x1, 0x22, 0x9c, 0x9d, 0x58, 0xc4, 0x27, 0x9f, 0x15, 0x5d, 0x55, 0x66, 0xfb, 0x18, 0xe8, 0x12, 0x95}}, - testcase{ - msg: []byte{0x7a, 0xba, 0xa1, 0x2e, 0xc2, 0xa7, 0x34, 0x76, 0x74, 0xe4, 0x44, 0x14, 0xa, 0xe0, 0xfb, 0x65, 0x9d, 0x8, 0xe1, 0xc6, 0x6d, 0xec, 0xd8, 0xd6, 0xea, 0xe9, 0x25, 0xfa, 0x45, 0x1d, 0x65, 0xf3, 0xc0, 0x30, 0x8e, 0x29, 0x44, 0x6b, 0x8e, 0xd3}, - output224: []byte{0x8e, 0x20, 0xd5, 0xc8, 0x3c, 0xda, 0x82, 0x26, 0xb5, 0x8c, 0xef, 0xd7, 0x4c, 0x29, 0x3c, 0xa7, 0x57, 0x9c, 0xbb, 0x39, 0x49, 0xca, 0x9e, 0xb2, 0xf6, 0x15, 0x65, 0xb8}, - output256: []byte{0x48, 0x76, 0xe2, 0x73, 0xac, 0x0, 0x94, 0x25, 0x76, 0xd9, 0x60, 0x8d, 0x5b, 0x63, 0xec, 0xc9, 0xa3, 0xe7, 0x5d, 0x5e, 0xc, 0x42, 0xc6, 0xab, 0xdb, 0xcd, 0xe0, 0x37, 0x78, 0x5a, 0xf9, 0xa7}, - output384: []byte{0x8c, 0xd0, 0x22, 0x97, 0x1d, 0x57, 0x69, 0x76, 0x1b, 0x8e, 0x96, 0xb4, 0x42, 0x44, 0x4f, 0xa1, 0x85, 0xf, 0x12, 0x1, 0xaa, 0xb0, 0xac, 0x9f, 0x6e, 0x84, 0x4, 0xe2, 0xb3, 0xea, 0x1d, 0x93, 0x62, 0x44, 0xee, 0xdc, 0x79, 0x57, 0xc8, 0xb, 0x7f, 0xae, 0x60, 0xb3, 0xf2, 0x16, 0xc6, 0xa0}, - output512: []byte{0x63, 0x1e, 0x78, 0x47, 0x12, 0x4a, 0x70, 0xfe, 0x6e, 0xb2, 0x93, 0xa4, 0x4a, 0x25, 0xc5, 0x6, 0x0, 0xb5, 0xe7, 0xe9, 0x75, 0xca, 0x9f, 0xab, 0x5a, 0xe6, 0x4a, 0xb8, 0x6c, 0x7e, 0x42, 0xc9, 0x12, 0xdd, 0x6e, 0xc0, 0x93, 0xf0, 0x1a, 0x8d, 0xeb, 0xc6, 0xe1, 0xf5, 0xe4, 0x87, 0xaf, 0x97, 0xdc, 0x3f, 0xd6, 0xc5, 0x30, 0x2, 0x76, 0x50, 0x50, 0xbe, 0x96, 0x3f, 0xfc, 0xd4, 0xd9, 0x89}}, - testcase{ - msg: []byte{0xc8, 0x8d, 0xee, 0x99, 0x27, 0x67, 0x9b, 0x8a, 0xf4, 0x22, 0xab, 0xcb, 0xac, 0xf2, 0x83, 0xb9, 0x4, 0xff, 0x31, 0xe1, 0xca, 0xc5, 0x8c, 0x78, 0x19, 0x80, 0x9f, 0x65, 0xd5, 0x80, 0x7d, 0x46, 0x72, 0x3b, 0x20, 0xf6, 0x7b, 0xa6, 0x10, 0xc2, 0xb7}, - output224: []byte{0x60, 0x62, 0x55, 0x34, 0x88, 0x12, 0xcf, 0xb5, 0x8, 0x2f, 0x4d, 0x4b, 0xb6, 0xbb, 0xc2, 0xfe, 0xef, 0x4, 0x4e, 0x38, 0x1f, 0xeb, 0xe, 0x34, 0x60, 0x61, 0xaa, 0x4f}, - output256: []byte{0x47, 0x97, 0xba, 0x1c, 0x7a, 0xb7, 0x19, 0x70, 0x50, 0xd6, 0xb2, 0xe5, 0x6, 0xf2, 0xdf, 0x45, 0x50, 0xe4, 0xb6, 0x73, 0xdf, 0x78, 0xf1, 0x8c, 0x46, 0x54, 0x24, 0xe4, 0x8d, 0xf5, 0xe9, 0x97}, - output384: []byte{0xb6, 0x57, 0x5d, 0x53, 0xd3, 0x53, 0x36, 0x5, 0x21, 0xb2, 0xa, 0xa1, 0xf9, 0x93, 0xf6, 0xe2, 0xb5, 0xa2, 0x62, 0xd1, 0xf5, 0x8, 0x78, 0x9d, 0x5c, 0xe2, 0x46, 0x9e, 0x9f, 0x3f, 0x33, 0xcc, 0xe8, 0x84, 0x8d, 0xf6, 0x90, 0xcc, 0xb0, 0xd6, 0x76, 0xfb, 0x94, 0x9e, 0xb1, 0x71, 0xa7, 0xd7}, - output512: []byte{0xb9, 0x89, 0x26, 0x3b, 0xb4, 0xe0, 0x42, 0x4f, 0x95, 0xfd, 0xc9, 0xa4, 0x9c, 0x83, 0xa3, 0x76, 0x9f, 0xbf, 0x31, 0xdc, 0xed, 0xda, 0x7e, 0x0, 0x5a, 0xb5, 0xf2, 0x2f, 0x43, 0xd2, 0x71, 0x8d, 0xeb, 0xd3, 0x90, 0x85, 0x97, 0x1f, 0x7e, 0xb7, 0x82, 0x2c, 0x9f, 0xa0, 0xf6, 0x7f, 0x77, 0x6c, 0xec, 0x4e, 0x35, 0xa9, 0xa8, 0xb8, 0xc8, 0x35, 0xef, 0x4e, 0x9e, 0xbd, 0xa1, 0x92, 0x2e, 0x4d}}, - testcase{ - msg: []byte{0x1, 0xe4, 0x3f, 0xe3, 0x50, 0xfc, 0xec, 0x45, 0xe, 0xc9, 0xb1, 0x2, 0x5, 0x3e, 0x6b, 0x5d, 0x56, 0xe0, 0x98, 0x96, 0xe0, 0xdd, 0xd9, 0x7, 0x4f, 0xe1, 0x38, 0xe6, 0x3, 0x82, 0x10, 0x27, 0xc, 0x83, 0x4c, 0xe6, 0xea, 0xdc, 0x2b, 0xb8, 0x6b, 0xf6}, - output224: []byte{0xc8, 0x85, 0x27, 0x4c, 0xc3, 0xbf, 0x11, 0x9, 0x95, 0xfe, 0xf1, 0x15, 0x4a, 0x86, 0x77, 0x2f, 0x28, 0xb4, 0x1e, 0x74, 0x5e, 0x86, 0xe9, 0x35, 0xb4, 0xe3, 0xa0, 0x3f}, - output256: []byte{0x41, 0xc9, 0x1b, 0xe9, 0x8c, 0x58, 0x13, 0xa4, 0xc5, 0xd8, 0xae, 0x7c, 0x29, 0xb9, 0x91, 0x9c, 0x1c, 0xc9, 0x5b, 0x4a, 0x5, 0xf8, 0x24, 0x33, 0x94, 0x8c, 0xb9, 0x9d, 0x9a, 0x6d, 0x3, 0x9c}, - output384: []byte{0x73, 0x58, 0xc6, 0xa0, 0xae, 0x58, 0xef, 0xa1, 0x4f, 0x65, 0xb8, 0xe1, 0x62, 0xf0, 0x7e, 0xf2, 0xd0, 0xad, 0x8d, 0xd2, 0x0, 0x6a, 0x98, 0x29, 0x33, 0x7, 0xb7, 0x6b, 0x3b, 0xa9, 0xe7, 0x1c, 0x30, 0x8a, 0x66, 0x94, 0xf0, 0xb5, 0x6d, 0xe8, 0xd5, 0x9e, 0x58, 0x53, 0x6c, 0x35, 0x13, 0xe8}, - output512: []byte{0xff, 0x6a, 0xdc, 0xb9, 0xe1, 0x54, 0x67, 0x98, 0xd3, 0x96, 0xdb, 0x78, 0x45, 0x2d, 0xf1, 0xa3, 0x75, 0xb6, 0x5e, 0xe3, 0xd5, 0x4f, 0xcc, 0x91, 0x5a, 0x8c, 0xa3, 0xda, 0x69, 0x3e, 0x24, 0x93, 0x19, 0x99, 0xb0, 0xfc, 0x8a, 0x4e, 0xb9, 0x2f, 0x6f, 0xf8, 0x5e, 0x42, 0xbb, 0x4c, 0xfd, 0x9c, 0xe7, 0xd7, 0x86, 0x3e, 0xee, 0x70, 0x9c, 0x9e, 0xf3, 0x76, 0x42, 0xb6, 0x96, 0x17, 0x44, 0x74}}, - testcase{ - msg: []byte{0x33, 0x70, 0x23, 0x37, 0xa, 0x48, 0xb6, 0x2e, 0xe4, 0x35, 0x46, 0xf1, 0x7c, 0x4e, 0xf2, 0xbf, 0x8d, 0x7e, 0xcd, 0x1d, 0x49, 0xf9, 0xb, 0xab, 0x60, 0x4b, 0x83, 0x9c, 0x2e, 0x6e, 0x5b, 0xd2, 0x15, 0x40, 0xd2, 0x9b, 0xa2, 0x7a, 0xb8, 0xe3, 0x9, 0xa4, 0xb7}, - output224: []byte{0xef, 0xa7, 0xf7, 0xe7, 0xbf, 0xfa, 0x6a, 0x5e, 0x7f, 0x7d, 0x1c, 0x24, 0xe7, 0xa0, 0xa9, 0xdc, 0x9a, 0x6f, 0x72, 0xb3, 0xe9, 0x55, 0xa, 0xa, 0xaa, 0x6, 0xcc, 0xe6}, - output256: []byte{0xee, 0x35, 0x42, 0x90, 0xe3, 0xf9, 0xce, 0x91, 0x23, 0xc4, 0x9b, 0xa6, 0x16, 0xe1, 0xa2, 0x68, 0x4a, 0x90, 0xf3, 0xdd, 0xd8, 0x4e, 0x73, 0xa1, 0xd2, 0xc2, 0x32, 0xf7, 0x40, 0x41, 0x2b, 0x18}, - output384: []byte{0x18, 0x3, 0xc, 0x2b, 0x5e, 0xa2, 0x3b, 0x6c, 0x66, 0xbd, 0xaf, 0x18, 0xa, 0x41, 0x17, 0x33, 0x94, 0x54, 0x2, 0x15, 0xca, 0x48, 0xfb, 0x3e, 0x75, 0x84, 0x33, 0xff, 0x98, 0x84, 0xef, 0xb9, 0xe5, 0x6d, 0x29, 0x22, 0xba, 0x53, 0x20, 0xba, 0x84, 0xbe, 0x36, 0xe6, 0xef, 0xe6, 0xb8, 0x9d}, - output512: []byte{0x10, 0x51, 0xb7, 0xff, 0x77, 0x27, 0x4b, 0x78, 0x4e, 0x7f, 0xb7, 0x82, 0x3e, 0x75, 0x6f, 0xc, 0x43, 0x55, 0x4, 0x7e, 0x48, 0x97, 0x75, 0xbb, 0xed, 0xaa, 0x7c, 0xe5, 0xa7, 0x5e, 0xfa, 0xc3, 0x31, 0x49, 0x2c, 0x1, 0x6c, 0xe0, 0x2e, 0xb2, 0xbe, 0x8b, 0xa2, 0xfe, 0x6b, 0x73, 0x5b, 0x9a, 0x14, 0x84, 0xe7, 0x3a, 0xc0, 0x6d, 0xe5, 0x73, 0xc5, 0xd0, 0xb4, 0xa5, 0x88, 0x22, 0xa3, 0x6a}}, - testcase{ - msg: []byte{0x68, 0x92, 0x54, 0xf, 0x96, 0x4c, 0x8c, 0x74, 0xbd, 0x2d, 0xb0, 0x2c, 0xa, 0xd8, 0x84, 0x51, 0xc, 0xb3, 0x8a, 0xfd, 0x44, 0x38, 0xaf, 0x31, 0xfc, 0x91, 0x27, 0x56, 0xf3, 0xef, 0xec, 0x6b, 0x32, 0xb5, 0x8e, 0xbc, 0x38, 0xfc, 0x2a, 0x6b, 0x91, 0x35, 0x96, 0xa8}, - output224: []byte{0xac, 0xa7, 0xdc, 0xcc, 0x6b, 0x80, 0x9d, 0x51, 0x1f, 0x4c, 0x24, 0x8c, 0xaa, 0x5d, 0x13, 0x74, 0xe7, 0x34, 0xc1, 0xed, 0x6b, 0x99, 0x57, 0x60, 0xcc, 0x3c, 0x56, 0xd2}, - output256: []byte{0xfb, 0xec, 0xb, 0x6d, 0x71, 0x69, 0x6e, 0xed, 0xe9, 0x0, 0xb7, 0x7a, 0xa6, 0xd7, 0xd2, 0x5f, 0x4a, 0xb4, 0x5d, 0xf8, 0x96, 0x1c, 0xa9, 0xc8, 0xb3, 0xf4, 0xf9, 0xb5, 0x1a, 0xf9, 0x83, 0xab}, - output384: []byte{0x6f, 0x9f, 0x90, 0x16, 0xac, 0x3b, 0x6a, 0x59, 0x78, 0xa5, 0xdc, 0x8c, 0x75, 0x6, 0xc8, 0xb4, 0xd2, 0x87, 0x42, 0x25, 0x3b, 0xc5, 0x42, 0xe7, 0x9d, 0x95, 0x82, 0x44, 0x17, 0xaa, 0x54, 0x29, 0x91, 0xee, 0xf7, 0xe2, 0xb9, 0xc5, 0x8c, 0xdb, 0xc, 0x93, 0x61, 0x6a, 0xe9, 0xc1, 0xf8, 0x8f}, - output512: []byte{0x56, 0x39, 0xa2, 0x82, 0x42, 0x97, 0xca, 0x9, 0x9e, 0xcf, 0x2a, 0x81, 0xee, 0xf1, 0x75, 0x3f, 0x63, 0x14, 0xcb, 0x66, 0x3d, 0x86, 0xf, 0x5, 0xa3, 0x9e, 0x3e, 0x80, 0x1f, 0xf8, 0x20, 0x60, 0xbb, 0xa1, 0x6, 0x28, 0xe2, 0xc0, 0xd9, 0xe0, 0xa8, 0x4d, 0xd0, 0x5e, 0xd6, 0x37, 0xfc, 0xb, 0x65, 0xba, 0x3, 0xbb, 0x66, 0xe4, 0x6f, 0xb2, 0x56, 0xf2, 0xa5, 0xb2, 0x8d, 0x3f, 0x41, 0xd2}}, - testcase{ - msg: []byte{0xf5, 0x96, 0x1d, 0xfd, 0x2b, 0x1f, 0xff, 0xfd, 0xa4, 0xff, 0xbf, 0x30, 0x56, 0xc, 0x16, 0x5b, 0xfe, 0xda, 0xb8, 0xce, 0xb, 0xe5, 0x25, 0x84, 0x5d, 0xeb, 0x8d, 0xc6, 0x10, 0x4, 0xb7, 0xdb, 0x38, 0x46, 0x72, 0x5, 0xf5, 0xdc, 0xfb, 0x34, 0xa2, 0xac, 0xfe, 0x96, 0xc0}, - output224: []byte{0x6f, 0x1e, 0xf5, 0x5c, 0xcc, 0x6e, 0xf9, 0xb6, 0x8d, 0xe5, 0x4c, 0x14, 0x44, 0x84, 0x87, 0x90, 0x10, 0x22, 0x45, 0x2a, 0xb7, 0x61, 0xf8, 0x46, 0x44, 0xe9, 0xa1, 0x27}, - output256: []byte{0x9d, 0x24, 0xae, 0xea, 0x8, 0xf9, 0xa4, 0xb5, 0xfb, 0x8b, 0x6d, 0xe8, 0x5a, 0x22, 0x96, 0xf5, 0xf4, 0x10, 0x8d, 0xdd, 0x1e, 0xea, 0x4f, 0x8e, 0xe5, 0x88, 0x19, 0xcf, 0x84, 0xed, 0xb7, 0x65}, - output384: []byte{0x42, 0x44, 0x21, 0xbb, 0x93, 0x99, 0xbd, 0x44, 0xab, 0x76, 0x50, 0x2, 0x73, 0xd7, 0xf1, 0xe1, 0x42, 0x1a, 0x2b, 0xfd, 0xe1, 0xa1, 0xc1, 0x30, 0xc0, 0xb3, 0x47, 0x44, 0x9, 0xd8, 0xae, 0x92, 0xb3, 0xe3, 0x85, 0x39, 0xcf, 0xb0, 0x9e, 0xd1, 0xd2, 0x3c, 0x62, 0xbb, 0x32, 0xb9, 0x36, 0x4b}, - output512: []byte{0x97, 0xf9, 0xd6, 0x42, 0x50, 0x7e, 0x6d, 0xd1, 0x79, 0xd5, 0x6f, 0x4b, 0x81, 0x5e, 0x92, 0xd0, 0xd4, 0x86, 0x82, 0x6f, 0x27, 0x3e, 0xc7, 0x11, 0xb8, 0xf9, 0xcb, 0x76, 0xaf, 0xc7, 0x9f, 0x90, 0x8, 0x16, 0xfd, 0xbc, 0x13, 0xdd, 0x3a, 0x59, 0xfb, 0xec, 0xba, 0x1f, 0x3b, 0x69, 0x53, 0xf8, 0x79, 0xf2, 0x7c, 0x89, 0x87, 0xb2, 0x4c, 0x6f, 0xf8, 0x55, 0x7a, 0x2c, 0x83, 0x40, 0x76, 0xb9}}, - testcase{ - msg: []byte{0xca, 0x6, 0x1a, 0x2e, 0xb6, 0xce, 0xed, 0x88, 0x81, 0xce, 0x20, 0x57, 0x17, 0x2d, 0x86, 0x9d, 0x73, 0xa1, 0x95, 0x1e, 0x63, 0xd5, 0x72, 0x61, 0x38, 0x4b, 0x80, 0xce, 0xb5, 0x45, 0x1e, 0x77, 0xb0, 0x6c, 0xf0, 0xf5, 0xa0, 0xea, 0x15, 0xca, 0x90, 0x7e, 0xe1, 0xc2, 0x7e, 0xba}, - output224: []byte{0xb2, 0x97, 0xf6, 0x1f, 0xf0, 0x60, 0x21, 0xbf, 0xe1, 0xb9, 0xd3, 0x50, 0xb3, 0xf5, 0x4d, 0x81, 0xb, 0xc1, 0x6a, 0xde, 0x17, 0x0, 0x1b, 0xae, 0x1b, 0x4c, 0xd4, 0xa2}, - output256: []byte{0x73, 0x20, 0x34, 0xca, 0xe3, 0xff, 0x11, 0x16, 0xf0, 0x7f, 0xc1, 0x8b, 0x5a, 0x26, 0xef, 0x8f, 0xaf, 0x3f, 0xe7, 0x5d, 0x3d, 0xbc, 0xa0, 0x5e, 0x48, 0x79, 0x53, 0x65, 0xe0, 0xa1, 0x7c, 0x40}, - output384: []byte{0xd0, 0x7a, 0x2c, 0xac, 0xee, 0xa8, 0x69, 0x27, 0x4b, 0xae, 0xec, 0xda, 0x43, 0xb6, 0x2, 0x9, 0x30, 0xef, 0x38, 0x3a, 0x89, 0x7c, 0x72, 0xa7, 0xac, 0x7f, 0xbd, 0x8f, 0xf5, 0xce, 0xa7, 0xf8, 0xbe, 0x65, 0x58, 0x44, 0xd9, 0xf9, 0xbd, 0x2b, 0x49, 0x88, 0x80, 0xfa, 0x15, 0x27, 0xd9, 0x4f}, - output512: []byte{0xaf, 0xef, 0x2a, 0xf5, 0xa0, 0x1b, 0x89, 0xbe, 0x19, 0xa, 0xe, 0x6e, 0x79, 0x6a, 0xa5, 0x1f, 0x1f, 0x8c, 0x35, 0x67, 0x72, 0xc6, 0xfc, 0x77, 0x31, 0xf0, 0x8a, 0xab, 0x8b, 0xd8, 0x1a, 0xee, 0x12, 0x87, 0xc7, 0xd, 0x56, 0x4f, 0x4f, 0x16, 0x9e, 0x37, 0xb0, 0x7f, 0x28, 0x20, 0x2a, 0x85, 0xf4, 0x68, 0x28, 0x1b, 0x4c, 0xdc, 0x12, 0x73, 0xcf, 0x61, 0xeb, 0x30, 0xe3, 0xbd, 0xce, 0xe1}}, - testcase{ - msg: []byte{0x17, 0x43, 0xa7, 0x72, 0x51, 0xd6, 0x92, 0x42, 0x75, 0xc, 0x4f, 0x11, 0x40, 0x53, 0x2c, 0xd3, 0xc3, 0x3f, 0x9b, 0x5c, 0xcd, 0xf7, 0x51, 0x4e, 0x85, 0x84, 0xd4, 0xa5, 0xf9, 0xfb, 0xd7, 0x30, 0xbc, 0xf8, 0x4d, 0xd, 0x47, 0x26, 0x36, 0x4b, 0x9b, 0xf9, 0x5a, 0xb2, 0x51, 0xd9, 0xbb}, - output224: []byte{0xbe, 0x9a, 0x75, 0x43, 0x6c, 0x39, 0x88, 0xfb, 0x2f, 0xe2, 0x1d, 0xc, 0x10, 0xea, 0xd9, 0xb9, 0xc8, 0x7, 0xde, 0x2e, 0x13, 0xa9, 0xbd, 0x84, 0x37, 0xf1, 0x33, 0x32}, - output256: []byte{0xde, 0xac, 0x52, 0x18, 0x5, 0xbc, 0x6a, 0x97, 0xc0, 0x87, 0xe, 0x9e, 0x22, 0x5d, 0x1c, 0x4b, 0x2f, 0xd8, 0xf3, 0xa9, 0xa7, 0xf6, 0xb3, 0x9e, 0x35, 0x7c, 0x26, 0x41, 0x48, 0x21, 0xe2, 0xdd}, - output384: []byte{0x25, 0xd7, 0xab, 0x5e, 0x93, 0x8, 0x19, 0xcf, 0x5f, 0x59, 0xac, 0xd2, 0x54, 0x26, 0x91, 0xad, 0x66, 0x48, 0x1d, 0xa5, 0x47, 0xea, 0xa9, 0xc2, 0xad, 0xd7, 0xc8, 0xea, 0x69, 0xa4, 0x75, 0xf4, 0x16, 0xc4, 0x30, 0xea, 0x1d, 0xe8, 0x40, 0x97, 0x4e, 0x32, 0x36, 0xa6, 0x25, 0x20, 0x91, 0x1f}, - output512: []byte{0xf4, 0x67, 0xcc, 0xa6, 0x7c, 0x38, 0x7f, 0xfc, 0x9f, 0x1b, 0x17, 0x3a, 0x8, 0x4c, 0x45, 0x10, 0x95, 0xd0, 0x1a, 0xd0, 0xbf, 0x39, 0x53, 0xac, 0x10, 0x3a, 0x76, 0xf0, 0xf1, 0xbc, 0x86, 0x16, 0x73, 0x5, 0xa9, 0x26, 0xa9, 0x41, 0xa5, 0x34, 0x17, 0xf1, 0x61, 0x1a, 0x50, 0x5a, 0xaa, 0x20, 0x5b, 0xcf, 0xcc, 0xbf, 0xd3, 0x43, 0x46, 0x5d, 0xad, 0x8a, 0x6c, 0x1e, 0x80, 0x60, 0x9a, 0x9d}}, - testcase{ - msg: []byte{0xd8, 0xfa, 0xba, 0x1f, 0x51, 0x94, 0xc4, 0xdb, 0x5f, 0x17, 0x6f, 0xab, 0xff, 0xf8, 0x56, 0x92, 0x4e, 0xf6, 0x27, 0xa3, 0x7c, 0xd0, 0x8c, 0xf5, 0x56, 0x8, 0xbb, 0xa8, 0xf1, 0xe3, 0x24, 0xd7, 0xc7, 0xf1, 0x57, 0x29, 0x8e, 0xab, 0xc4, 0xdc, 0xe7, 0xd8, 0x9c, 0xe5, 0x16, 0x24, 0x99, 0xf9}, - output224: []byte{0x43, 0x4, 0x58, 0x2c, 0x38, 0x92, 0x94, 0x2b, 0x19, 0x60, 0x82, 0x2c, 0x96, 0x57, 0x88, 0xb2, 0x2d, 0xe1, 0x9f, 0x1c, 0x6d, 0x5e, 0x20, 0x44, 0x76, 0xad, 0xfd, 0x26}, - output256: []byte{0xad, 0x55, 0x53, 0x73, 0x47, 0xb2, 0xd, 0x9f, 0xca, 0x2, 0x68, 0x3e, 0x6d, 0xe1, 0x3, 0x2e, 0xc1, 0xe, 0xb8, 0x4d, 0xa4, 0xcb, 0xd5, 0x1, 0xe4, 0x97, 0x44, 0xa6, 0x66, 0x29, 0x2e, 0xdf}, - output384: []byte{0x36, 0xa6, 0xbf, 0x2d, 0x4e, 0xb3, 0xcc, 0x6f, 0xb7, 0x97, 0x91, 0x4e, 0x73, 0x4b, 0x2c, 0xa8, 0x70, 0x2c, 0xa7, 0xcc, 0x6d, 0x53, 0x9b, 0x4d, 0xdb, 0x23, 0x3e, 0xfa, 0xfc, 0xf0, 0x68, 0x71, 0x2e, 0x84, 0x53, 0x64, 0xa4, 0xa9, 0x29, 0xd3, 0x1a, 0x44, 0xc, 0x7d, 0xaf, 0x8b, 0x13, 0x4c}, - output512: []byte{0x4b, 0x38, 0x9a, 0x2a, 0xd, 0xf5, 0xe2, 0x95, 0xea, 0x94, 0x44, 0xf2, 0x73, 0x9b, 0x54, 0x92, 0xf2, 0x90, 0xc4, 0x46, 0x7b, 0xb, 0x4c, 0xdc, 0x1c, 0xc9, 0xed, 0x2c, 0xef, 0xa7, 0xa9, 0xe5, 0x27, 0xe0, 0x62, 0x7c, 0xda, 0xf0, 0xbd, 0xa5, 0x8f, 0x17, 0xd1, 0x3f, 0x94, 0xaf, 0x7d, 0x2d, 0xef, 0xf6, 0xfc, 0x5d, 0x53, 0xdd, 0x91, 0x57, 0x67, 0x44, 0x75, 0x52, 0x7f, 0xbb, 0x4f, 0x86}}, - testcase{ - msg: []byte{0xbe, 0x96, 0x84, 0xbe, 0x70, 0x34, 0x8, 0x60, 0x37, 0x3c, 0x9c, 0x48, 0x2b, 0xa5, 0x17, 0xe8, 0x99, 0xfc, 0x81, 0xba, 0xaa, 0x12, 0xe5, 0xc6, 0xd7, 0x72, 0x79, 0x75, 0xd1, 0xd4, 0x1b, 0xa8, 0xbe, 0xf7, 0x88, 0xcd, 0xb5, 0xcf, 0x46, 0x6, 0xc9, 0xc1, 0xc7, 0xf6, 0x1a, 0xed, 0x59, 0xf9, 0x7d}, - output224: []byte{0x4, 0x80, 0xef, 0x85, 0x19, 0xc3, 0x2f, 0x89, 0xc6, 0x5b, 0x8d, 0xd4, 0x50, 0x2, 0x5e, 0xc4, 0x9c, 0xbd, 0xad, 0xa6, 0xc4, 0xcf, 0xcf, 0xc6, 0xfb, 0x4f, 0x1c, 0x61}, - output256: []byte{0xb1, 0xf9, 0x90, 0x20, 0x4b, 0xf6, 0x30, 0x56, 0x9a, 0x3e, 0xdc, 0x63, 0x48, 0x64, 0x27, 0x47, 0x86, 0xf4, 0xc, 0xe1, 0xc5, 0x71, 0x65, 0xee, 0x32, 0xd0, 0xe2, 0x9f, 0x5d, 0xc, 0x68, 0x51}, - output384: []byte{0xb6, 0x9d, 0x40, 0xa9, 0x2, 0x7, 0xed, 0xb2, 0xc, 0x0, 0x68, 0xf4, 0x2, 0x0, 0x8c, 0xe, 0x64, 0x30, 0xb, 0x89, 0xa1, 0xb6, 0xaf, 0x79, 0x30, 0x70, 0x8b, 0x26, 0x3c, 0x79, 0xa, 0x8, 0x7f, 0x3a, 0xdb, 0xb4, 0xc8, 0x42, 0x95, 0xd2, 0x33, 0x92, 0xe0, 0x69, 0x2f, 0x35, 0xbd, 0xbc}, - output512: []byte{0x65, 0x90, 0xff, 0xfb, 0x73, 0x11, 0xab, 0x7d, 0xab, 0x37, 0xf, 0xb5, 0x18, 0xcc, 0xc1, 0x9b, 0xaa, 0x9a, 0xf7, 0xc8, 0x41, 0x79, 0xad, 0xb0, 0x2, 0xf8, 0xfa, 0xcd, 0x3c, 0x44, 0xaf, 0x28, 0x30, 0xa8, 0x4d, 0xf1, 0xe2, 0xc2, 0x40, 0x23, 0x68, 0xcc, 0x36, 0x61, 0x4a, 0x6e, 0xa2, 0x29, 0x3, 0x6, 0x3e, 0x57, 0xd0, 0xe, 0xc5, 0x11, 0xa4, 0x6a, 0x9a, 0x3, 0xfe, 0x38, 0x19, 0xf7}}, - testcase{ - msg: []byte{0x7e, 0x15, 0xd2, 0xb9, 0xea, 0x74, 0xca, 0x60, 0xf6, 0x6c, 0x8d, 0xfa, 0xb3, 0x77, 0xd9, 0x19, 0x8b, 0x7b, 0x16, 0xde, 0xb6, 0xa1, 0xba, 0xe, 0xa3, 0xc7, 0xee, 0x20, 0x42, 0xf8, 0x9d, 0x37, 0x86, 0xe7, 0x79, 0xcf, 0x5, 0x3c, 0x77, 0x78, 0x5a, 0xa9, 0xe6, 0x92, 0xf8, 0x21, 0xf1, 0x4a, 0x7f, 0x51}, - output224: []byte{0xb, 0xde, 0x9c, 0xd5, 0xd, 0x70, 0xf0, 0xe, 0xed, 0x97, 0xcc, 0xe4, 0xc, 0x3d, 0xf2, 0x2b, 0xb4, 0x90, 0x4c, 0x8, 0xc4, 0x17, 0x7c, 0x3a, 0x95, 0x98, 0x5d, 0x97}, - output256: []byte{0xfa, 0x46, 0xc, 0xd5, 0x1b, 0xc6, 0x11, 0x78, 0x6d, 0x36, 0x4f, 0xca, 0xbe, 0x39, 0x5, 0x2b, 0xcd, 0x5f, 0x0, 0x9e, 0xdf, 0xa8, 0x1f, 0x47, 0x1, 0xc5, 0xb2, 0x2b, 0x72, 0x9b, 0x0, 0x16}, - output384: []byte{0xcd, 0xdb, 0x88, 0x3b, 0x9e, 0xad, 0xc5, 0x9d, 0x28, 0x94, 0x17, 0x8b, 0x3b, 0xa6, 0xf6, 0x1e, 0x5e, 0x11, 0xc2, 0xc4, 0x15, 0xc8, 0x9e, 0x55, 0x4e, 0x20, 0xa1, 0x7e, 0x49, 0x9, 0xf8, 0xd9, 0x60, 0xf0, 0x2a, 0xa8, 0xe, 0x1a, 0x51, 0x29, 0xae, 0xeb, 0xf2, 0xcf, 0x97, 0x57, 0x11, 0xa4}, - output512: []byte{0x89, 0x57, 0x96, 0xb2, 0xa0, 0x82, 0x4c, 0x55, 0xf0, 0x30, 0xd8, 0x2e, 0x79, 0x49, 0x25, 0xc3, 0x8d, 0x84, 0x59, 0xf3, 0x8c, 0xf8, 0x48, 0x51, 0x9f, 0x12, 0xf, 0xf6, 0xa9, 0xd5, 0xa0, 0x3e, 0xbf, 0x0, 0x6c, 0x3e, 0xa5, 0x2, 0x1e, 0x8f, 0x3b, 0x34, 0x8, 0xff, 0x12, 0xf0, 0x1b, 0xcd, 0xdf, 0x7a, 0x8, 0x5b, 0xa0, 0xa9, 0xa5, 0x89, 0x44, 0xfe, 0xc1, 0xf5, 0x54, 0x83, 0x6d, 0xf8}}, - testcase{ - msg: []byte{0x9a, 0x21, 0x9b, 0xe4, 0x37, 0x13, 0xbd, 0x57, 0x80, 0x15, 0xe9, 0xfd, 0xa6, 0x6c, 0xf, 0x2d, 0x83, 0xca, 0xc5, 0x63, 0xb7, 0x76, 0xab, 0x9f, 0x38, 0xf3, 0xe4, 0xf7, 0xef, 0x22, 0x9c, 0xb4, 0x43, 0x30, 0x4f, 0xba, 0x40, 0x1e, 0xfb, 0x2b, 0xdb, 0xd7, 0xec, 0xe9, 0x39, 0x10, 0x22, 0x98, 0x65, 0x1c, 0x86}, - output224: []byte{0x3b, 0xf3, 0xad, 0xdb, 0x76, 0x1a, 0xb3, 0x2a, 0x38, 0xb7, 0xb4, 0x70, 0x47, 0xad, 0x45, 0xb6, 0x8e, 0xdf, 0xd8, 0x8e, 0xd4, 0x75, 0x22, 0x74, 0x47, 0xea, 0x1b, 0x1e}, - output256: []byte{0xf7, 0xb0, 0xfe, 0x5a, 0x69, 0xff, 0x44, 0x6, 0xd, 0x4f, 0x6a, 0xd2, 0x48, 0x6e, 0x6c, 0xde, 0x9e, 0xd6, 0x79, 0xaf, 0x9a, 0xa1, 0xad, 0xa6, 0x13, 0xe4, 0xcc, 0x39, 0x24, 0x42, 0xbe, 0xb5}, - output384: []byte{0xfb, 0xe0, 0x5, 0x6d, 0x65, 0xaf, 0x27, 0x9e, 0xff, 0x15, 0x73, 0xf1, 0x69, 0x80, 0x9a, 0x5, 0xb6, 0xa5, 0x21, 0x12, 0xb6, 0x62, 0xd0, 0x7c, 0xdd, 0x25, 0x70, 0xbe, 0x5e, 0x19, 0x8a, 0x28, 0xd1, 0xea, 0x49, 0xcb, 0xea, 0xf0, 0xc0, 0x5e, 0x76, 0xa9, 0xf0, 0x9b, 0xaf, 0x6d, 0x1f, 0x34}, - output512: []byte{0xe4, 0xbb, 0xd5, 0x4b, 0xfb, 0x99, 0xd3, 0x45, 0x47, 0x1f, 0x8a, 0xb9, 0x42, 0x71, 0xb4, 0xb7, 0x48, 0xf5, 0xce, 0x70, 0xc2, 0x1c, 0x28, 0xae, 0x65, 0x59, 0xe0, 0x3e, 0xe7, 0x89, 0xa, 0x2c, 0x81, 0x40, 0x43, 0xe6, 0x24, 0xa6, 0xbd, 0x29, 0x44, 0x35, 0x7, 0x56, 0xb3, 0x7f, 0xa8, 0x20, 0x8f, 0xc7, 0x47, 0x3a, 0x67, 0xb3, 0x10, 0xce, 0xeb, 0xc1, 0x7d, 0x96, 0x5e, 0xd6, 0x88, 0xb2}}, - testcase{ - msg: []byte{0xc8, 0xf2, 0xb6, 0x93, 0xbd, 0xd, 0x75, 0xef, 0x99, 0xca, 0xeb, 0xdc, 0x22, 0xad, 0xf4, 0x8, 0x8a, 0x95, 0xa3, 0x54, 0x2f, 0x63, 0x72, 0x3, 0xe2, 0x83, 0xbb, 0xc3, 0x26, 0x87, 0x80, 0xe7, 0x87, 0xd6, 0x8d, 0x28, 0xcc, 0x38, 0x97, 0x45, 0x2f, 0x6a, 0x22, 0xaa, 0x85, 0x73, 0xcc, 0xeb, 0xf2, 0x45, 0x97, 0x2a}, - output224: []byte{0x61, 0x82, 0x61, 0x4c, 0x82, 0x57, 0xeb, 0x5, 0xe9, 0xac, 0x9, 0x50, 0xe1, 0x5e, 0x60, 0x44, 0x87, 0x2e, 0x5c, 0xa, 0xb2, 0xaf, 0x45, 0x40, 0x76, 0x4c, 0xa0, 0xc8}, - output256: []byte{0x24, 0x20, 0x4d, 0x49, 0x1f, 0x20, 0x25, 0x34, 0x85, 0x9f, 0xc0, 0xa2, 0x8, 0x23, 0x71, 0x84, 0x47, 0x1a, 0x2d, 0x80, 0x1f, 0xb3, 0xb9, 0x34, 0xd0, 0x96, 0x8d, 0xd, 0x84, 0x3d, 0x3, 0x45}, - output384: []byte{0x26, 0x47, 0x3d, 0xe6, 0x84, 0xcf, 0x58, 0xd5, 0x59, 0xc7, 0xc0, 0xcf, 0xd3, 0x60, 0xa9, 0xaf, 0xfd, 0xf3, 0x39, 0x0, 0xfd, 0x69, 0xa3, 0xa9, 0x46, 0x58, 0x14, 0x84, 0xb9, 0x3e, 0xf6, 0xfe, 0x6f, 0xfa, 0xc4, 0x61, 0xb4, 0x55, 0x1e, 0x13, 0x6b, 0xea, 0xc6, 0x4c, 0xc3, 0x3a, 0x4c, 0x15}, - output512: []byte{0x80, 0xd8, 0x62, 0xad, 0x5, 0x42, 0x8a, 0x29, 0x92, 0x13, 0xe6, 0x5b, 0x50, 0x31, 0x4, 0x63, 0xfd, 0x22, 0xc5, 0x5, 0xe6, 0x93, 0xdd, 0x47, 0x19, 0xe0, 0xa1, 0x20, 0xee, 0xaa, 0x35, 0xc5, 0xfc, 0x16, 0x8, 0xa0, 0x8d, 0x22, 0xe2, 0xcc, 0xdd, 0xec, 0xa4, 0x98, 0x78, 0xbc, 0x26, 0xab, 0xe5, 0x5a, 0x3c, 0x9a, 0x54, 0x63, 0x47, 0x43, 0x9a, 0x94, 0x2e, 0xd0, 0xc1, 0xa6, 0xa2, 0x3e}}, - testcase{ - msg: []byte{0xec, 0xf, 0x99, 0x71, 0x10, 0x16, 0xc6, 0xa2, 0xa0, 0x7a, 0xd8, 0xd, 0x16, 0x42, 0x75, 0x6, 0xce, 0x6f, 0x44, 0x10, 0x59, 0xfd, 0x26, 0x94, 0x42, 0xba, 0xaa, 0x28, 0xc6, 0xca, 0x3, 0x7b, 0x22, 0xee, 0xac, 0x49, 0xd5, 0xd8, 0x94, 0xc0, 0xbf, 0x66, 0x21, 0x9f, 0x2c, 0x8, 0xe9, 0xd0, 0xe8, 0xab, 0x21, 0xde, 0x52}, - output224: []byte{0xb, 0x5d, 0xc7, 0x22, 0xee, 0xa2, 0xc3, 0x48, 0x32, 0x5f, 0xd9, 0xb3, 0xd7, 0xf0, 0x8f, 0x36, 0x5b, 0x71, 0xd5, 0xb5, 0x82, 0xc2, 0x7b, 0xeb, 0x79, 0xb5, 0x1d, 0x5d}, - output256: []byte{0x81, 0x14, 0x7c, 0xba, 0x6, 0x47, 0xee, 0xe7, 0x8c, 0x47, 0x84, 0x87, 0x4c, 0x5, 0x57, 0x62, 0x1a, 0x13, 0x8c, 0xa7, 0x81, 0xfb, 0x6f, 0x5d, 0xcd, 0xd, 0x9c, 0x60, 0x9a, 0xf5, 0x6f, 0x35}, - output384: []byte{0x46, 0x2a, 0xd9, 0x7b, 0xb0, 0x15, 0x6a, 0x5d, 0xa3, 0xdd, 0xe, 0x9e, 0x5b, 0xf0, 0x6d, 0x31, 0x2, 0x4f, 0xe4, 0x3b, 0xb8, 0xc, 0x1, 0x8f, 0x68, 0x58, 0xee, 0x43, 0x32, 0xf2, 0xeb, 0x5a, 0x78, 0xad, 0xa0, 0x6c, 0xb5, 0x5d, 0xdc, 0x17, 0x2a, 0xd8, 0x7f, 0x88, 0xe2, 0x6d, 0x24, 0x51}, - output512: []byte{0x2, 0x1b, 0x3b, 0x39, 0x2d, 0xec, 0xcb, 0x90, 0x75, 0x55, 0x9f, 0x88, 0xc0, 0xc2, 0x29, 0x2, 0x6a, 0x20, 0x48, 0xce, 0xf8, 0xee, 0xb2, 0xd4, 0xf9, 0x48, 0x3, 0xdc, 0xf2, 0xda, 0xa, 0x73, 0xe0, 0x4, 0xd7, 0xf1, 0x4e, 0x9f, 0xd6, 0x62, 0x67, 0xb, 0x59, 0x22, 0x9a, 0xb3, 0x88, 0x3c, 0x34, 0xf, 0x4e, 0x3a, 0x8c, 0x42, 0x62, 0x4c, 0xcb, 0x90, 0xbe, 0xc1, 0x15, 0x6f, 0x95, 0xd4}}, - testcase{ - msg: []byte{0xd, 0xc4, 0x51, 0x81, 0x33, 0x7c, 0xa3, 0x2a, 0x82, 0x22, 0xfe, 0x7a, 0x3b, 0xf4, 0x2f, 0xc9, 0xf8, 0x97, 0x44, 0x25, 0x9c, 0xff, 0x65, 0x35, 0x4, 0xd6, 0x5, 0x1f, 0xe8, 0x4b, 0x1a, 0x7f, 0xfd, 0x20, 0xcb, 0x47, 0xd4, 0x69, 0x6c, 0xe2, 0x12, 0xa6, 0x86, 0xbb, 0x9b, 0xe9, 0xa8, 0xab, 0x1c, 0x69, 0x7b, 0x6d, 0x6a, 0x33}, - output224: []byte{0x29, 0xc2, 0xb8, 0x17, 0xc7, 0x5b, 0x64, 0x17, 0xbc, 0x89, 0xc2, 0x62, 0xaf, 0x9d, 0x58, 0xf0, 0xc1, 0x8f, 0xbd, 0x99, 0x1f, 0x59, 0xf4, 0x18, 0x1f, 0x23, 0x70, 0x38}, - output256: []byte{0x5b, 0x6d, 0x7e, 0xda, 0x55, 0x95, 0x74, 0xfa, 0xe8, 0x82, 0xe6, 0x26, 0x6f, 0x4c, 0x2b, 0xe3, 0x62, 0x13, 0x3e, 0x44, 0xb5, 0xa9, 0x47, 0xec, 0xb6, 0xe7, 0x5d, 0xb9, 0xfc, 0x85, 0x67, 0xe0}, - output384: []byte{0x9f, 0x89, 0xf, 0xa8, 0xa, 0x4c, 0x48, 0xb6, 0x71, 0x81, 0xe8, 0x9d, 0xbf, 0x15, 0x17, 0x5c, 0xe4, 0x8b, 0x21, 0xf9, 0xd0, 0x94, 0x5, 0x21, 0x8a, 0x8c, 0xe3, 0xc0, 0x75, 0x92, 0x82, 0x78, 0xe, 0x14, 0x2f, 0xc5, 0x98, 0x51, 0x15, 0x7d, 0x14, 0x50, 0x9f, 0xce, 0x79, 0xd1, 0xb1, 0x7f}, - output512: []byte{0x97, 0xbf, 0x33, 0xa5, 0x25, 0x4c, 0x8a, 0xca, 0x27, 0x48, 0x64, 0x28, 0x44, 0xb, 0x10, 0x34, 0xaa, 0xaf, 0xac, 0x8b, 0x49, 0x8e, 0xcb, 0x83, 0xc, 0x25, 0x81, 0xdc, 0x68, 0x51, 0x80, 0x79, 0xb6, 0x5f, 0xb0, 0xc5, 0x95, 0x99, 0x76, 0x93, 0xdd, 0xb8, 0xd6, 0x8d, 0x95, 0x64, 0xea, 0x98, 0xdc, 0x43, 0xcd, 0x28, 0x7e, 0x2e, 0x1, 0x8d, 0xb7, 0xdf, 0xaa, 0xaa, 0x20, 0x5c, 0x54, 0x7a}}, - testcase{ - msg: []byte{0xde, 0x28, 0x6b, 0xa4, 0x20, 0x6e, 0x8b, 0x0, 0x57, 0x14, 0xf8, 0xf, 0xb1, 0xcd, 0xfa, 0xeb, 0xde, 0x91, 0xd2, 0x9f, 0x84, 0x60, 0x3e, 0x4a, 0x3e, 0xbc, 0x4, 0x68, 0x6f, 0x99, 0xa4, 0x6c, 0x9e, 0x88, 0xb, 0x96, 0xc5, 0x74, 0x82, 0x55, 0x82, 0xe8, 0x81, 0x2a, 0x26, 0xe5, 0xa8, 0x57, 0xff, 0xc6, 0x57, 0x9f, 0x63, 0x74, 0x2f}, - output224: []byte{0x62, 0xc5, 0x87, 0x66, 0x94, 0xd8, 0x80, 0x7, 0x70, 0x9b, 0x50, 0x90, 0xe, 0xe2, 0xe6, 0xca, 0x95, 0x5, 0xcc, 0x90, 0x6, 0x7e, 0xfb, 0xf4, 0xc1, 0xd9, 0x5b, 0xb}, - output256: []byte{0x86, 0xf8, 0x7e, 0x75, 0xc8, 0x7f, 0x9b, 0xe3, 0x9e, 0x4a, 0xa6, 0xd0, 0xc5, 0xa3, 0x7a, 0x59, 0x64, 0xd6, 0xff, 0xdc, 0x46, 0x25, 0x25, 0xc0, 0x64, 0x2c, 0x9d, 0xb0, 0x10, 0xde, 0x38, 0xee}, - output384: []byte{0x2d, 0x9a, 0x34, 0x47, 0xd7, 0x72, 0x3d, 0x83, 0x7b, 0x87, 0x84, 0xfe, 0xaf, 0x3, 0xb8, 0xf9, 0x69, 0x4c, 0xde, 0x5f, 0xfb, 0x84, 0xc6, 0xa6, 0x62, 0x88, 0x95, 0xa3, 0x45, 0xbb, 0x8f, 0x3f, 0x5b, 0xa7, 0x25, 0x41, 0x69, 0x6, 0xde, 0x6, 0x3b, 0x1c, 0xef, 0xb7, 0x22, 0xc7, 0xe5, 0x6a}, - output512: []byte{0xc0, 0x5f, 0xd9, 0xc3, 0xfa, 0x73, 0xf8, 0x9, 0x56, 0xff, 0x1c, 0x3b, 0x89, 0x16, 0xe, 0xb5, 0x20, 0xca, 0x64, 0xe, 0x20, 0x1b, 0x3f, 0xe5, 0xe6, 0xe2, 0x96, 0x22, 0xe, 0x81, 0xb5, 0x9d, 0x53, 0x4, 0x76, 0x1, 0xd, 0x37, 0x84, 0xca, 0x8, 0x69, 0x2b, 0x8c, 0x71, 0x6a, 0x3b, 0xe9, 0x82, 0xb3, 0x74, 0x50, 0xa9, 0x6d, 0x30, 0xa4, 0x1, 0xd3, 0xba, 0x3c, 0x39, 0xd, 0x9d, 0xe3}}, - testcase{ - msg: []byte{0xee, 0xbc, 0xc1, 0x80, 0x57, 0x25, 0x2c, 0xbf, 0x3f, 0x9c, 0x7, 0xf, 0x1a, 0x73, 0x21, 0x33, 0x56, 0xd5, 0xd4, 0xbc, 0x19, 0xac, 0x2a, 0x41, 0x1e, 0xc8, 0xcd, 0xee, 0xe7, 0xa5, 0x71, 0xe2, 0xe2, 0xe, 0xaf, 0x61, 0xfd, 0xc, 0x33, 0xa0, 0xff, 0xeb, 0x29, 0x7d, 0xdb, 0x77, 0xa9, 0x7f, 0xa, 0x41, 0x53, 0x47, 0xdb, 0x66, 0xbc, 0xaf}, - output224: []byte{0xd3, 0x62, 0xbe, 0x78, 0x96, 0xb2, 0xac, 0x3c, 0xa4, 0xdc, 0x31, 0x61, 0xb7, 0xf6, 0xc5, 0xb3, 0xfb, 0xe6, 0x5f, 0x32, 0xd0, 0x40, 0x40, 0x2b, 0x8d, 0x30, 0x6b, 0x15}, - output256: []byte{0x95, 0x9f, 0xe0, 0x7, 0xb5, 0x7c, 0x29, 0x47, 0xc3, 0x6d, 0x1d, 0x66, 0xcc, 0x8, 0x8, 0xd8, 0xd, 0xb7, 0xdf, 0x45, 0xd6, 0x8a, 0x34, 0x85, 0x2b, 0x70, 0xd2, 0xdd, 0xa1, 0x92, 0xc2, 0x5c}, - output384: []byte{0xaf, 0x41, 0x50, 0x63, 0xa5, 0xe2, 0x5c, 0x6e, 0x55, 0xec, 0xa7, 0xf9, 0xbd, 0x1c, 0xb0, 0xc7, 0x1a, 0x7a, 0x5, 0x9b, 0x56, 0x97, 0x37, 0x3, 0x6b, 0x33, 0x9c, 0xa5, 0x59, 0xcc, 0x9c, 0x74, 0x66, 0xfa, 0x23, 0x9e, 0xa5, 0x7c, 0xfb, 0x5f, 0xcc, 0x50, 0x94, 0x48, 0x71, 0xc0, 0x8, 0xfb}, - output512: []byte{0xb9, 0x80, 0xe6, 0x57, 0xc1, 0x37, 0x26, 0xdb, 0xad, 0xb6, 0x57, 0xe, 0xa3, 0xa9, 0xe6, 0x33, 0x86, 0x9c, 0xad, 0xb7, 0x98, 0xeb, 0x35, 0xc4, 0x82, 0x69, 0x7a, 0x4, 0xcb, 0x71, 0x2f, 0x1c, 0x1e, 0x8c, 0x5d, 0xb, 0xd6, 0x7e, 0x43, 0xe5, 0x2d, 0xa2, 0x94, 0xe8, 0x2d, 0x5e, 0x80, 0xa6, 0x95, 0xa7, 0x4a, 0x3d, 0x27, 0xc0, 0xc6, 0x72, 0xad, 0xcf, 0xe2, 0xc9, 0x28, 0x85, 0x9a, 0x6d}}, - testcase{ - msg: []byte{0x41, 0x6b, 0x5c, 0xdc, 0x9f, 0xe9, 0x51, 0xbd, 0x36, 0x1b, 0xd7, 0xab, 0xfc, 0x12, 0xa, 0x50, 0x54, 0x75, 0x8e, 0xba, 0x88, 0xfd, 0xd6, 0x8f, 0xd8, 0x4e, 0x39, 0xd3, 0xb0, 0x9a, 0xc2, 0x54, 0x97, 0xd3, 0x6b, 0x43, 0xcb, 0xe7, 0xb8, 0x5a, 0x6a, 0x3c, 0xeb, 0xda, 0x8d, 0xb4, 0xe5, 0x54, 0x9c, 0x3e, 0xe5, 0x1b, 0xb6, 0xfc, 0xb6, 0xac, 0x1e}, - output224: []byte{0xd4, 0x20, 0xc7, 0xbd, 0xf8, 0xd8, 0x6d, 0x7b, 0x1c, 0xbd, 0x1a, 0xf7, 0x86, 0x8e, 0xbc, 0x4f, 0xf1, 0x72, 0x45, 0x59, 0x5b, 0x94, 0x95, 0x9a, 0x7, 0x14, 0x33, 0x3c}, - output256: []byte{0x1a, 0x93, 0x56, 0x7e, 0xeb, 0xc4, 0x1c, 0xc4, 0x4d, 0x93, 0x46, 0xcd, 0xe6, 0x46, 0x0, 0x5d, 0x3e, 0x82, 0xde, 0x8e, 0xee, 0xb1, 0x31, 0xe9, 0xc1, 0xf6, 0xd1, 0xe4, 0xaf, 0xd2, 0x60, 0xf7}, - output384: []byte{0x68, 0x11, 0xec, 0x7, 0xe6, 0xe8, 0x5a, 0x28, 0x9c, 0x88, 0x17, 0x22, 0xae, 0x84, 0xe6, 0xae, 0xf0, 0x1f, 0xd2, 0x76, 0x12, 0x94, 0xc6, 0xed, 0x98, 0x56, 0xd2, 0xf7, 0xea, 0x1c, 0x71, 0xa8, 0x9b, 0x2f, 0xcf, 0x4a, 0x9e, 0x56, 0x53, 0x33, 0x60, 0xea, 0x22, 0x31, 0x75, 0x61, 0xec, 0x5}, - output512: []byte{0x6a, 0xdf, 0xc5, 0x61, 0x83, 0x5f, 0xdd, 0xd7, 0xa, 0x9f, 0xeb, 0x57, 0xc5, 0x13, 0x16, 0x5d, 0x12, 0xae, 0xb3, 0x28, 0x3f, 0xd, 0xd7, 0x77, 0x4d, 0xd5, 0x88, 0x52, 0xda, 0x9e, 0x96, 0x9a, 0xbd, 0xaf, 0x20, 0xdd, 0x44, 0x85, 0x6f, 0xa6, 0xe, 0x11, 0xbd, 0xfa, 0x2d, 0xbb, 0x7e, 0x33, 0x47, 0x66, 0x9f, 0xff, 0x7a, 0x57, 0xa8, 0xd8, 0xd3, 0x74, 0x31, 0xc2, 0xb3, 0x9, 0x97, 0x2d}}, - testcase{ - msg: []byte{0x5c, 0x5f, 0xaf, 0x66, 0xf3, 0x2e, 0xf, 0x83, 0x11, 0xc3, 0x2e, 0x8d, 0xa8, 0x28, 0x4a, 0x4e, 0xd6, 0x8, 0x91, 0xa5, 0xa7, 0xe5, 0xf, 0xb2, 0x95, 0x6b, 0x3c, 0xba, 0xa7, 0x9f, 0xc6, 0x6c, 0xa3, 0x76, 0x46, 0xe, 0x10, 0x4, 0x15, 0x40, 0x1f, 0xc2, 0xb8, 0x51, 0x8c, 0x64, 0x50, 0x2f, 0x18, 0x7e, 0xa1, 0x4b, 0xfc, 0x95, 0x3, 0x75, 0x97, 0x5}, - output224: []byte{0x2e, 0x4, 0xda, 0xe6, 0xe3, 0xfd, 0xf2, 0xa4, 0x7f, 0xf4, 0xe, 0x6f, 0x3e, 0x61, 0xb3, 0x71, 0xf3, 0xe5, 0x1a, 0x58, 0x64, 0xa3, 0x1c, 0xc1, 0x1d, 0x12, 0x76, 0x20}, - output256: []byte{0x54, 0x9d, 0xb0, 0x56, 0xb6, 0x5e, 0xdf, 0x7d, 0x5, 0xbd, 0x66, 0x66, 0x1b, 0x6d, 0xa, 0x39, 0xb2, 0x9b, 0x82, 0x5b, 0xc8, 0x9, 0x10, 0xf8, 0xbf, 0x70, 0x60, 0xa5, 0x3b, 0xff, 0x68, 0xe1}, - output384: []byte{0x7c, 0x90, 0x26, 0x8e, 0x98, 0x1a, 0x3c, 0xf, 0xf1, 0x9e, 0x14, 0xce, 0x98, 0x30, 0xa1, 0xb9, 0xda, 0x5f, 0xc1, 0x83, 0x95, 0x8, 0x75, 0x96, 0x15, 0x82, 0x64, 0x44, 0x62, 0x5, 0x9d, 0xd2, 0xfa, 0xdc, 0xfa, 0x68, 0x75, 0xd, 0x7d, 0x2f, 0x44, 0xdf, 0xca, 0xb9, 0xff, 0xce, 0x58, 0x32}, - output512: []byte{0xe, 0x74, 0x59, 0xbd, 0xc8, 0x57, 0xb9, 0x49, 0xcc, 0x59, 0xa9, 0xc6, 0x49, 0xb9, 0x62, 0x52, 0x68, 0xbf, 0x9a, 0x11, 0xea, 0x81, 0xee, 0xef, 0xa4, 0xec, 0xdd, 0x41, 0xe, 0x2f, 0x6f, 0xd2, 0xc7, 0x82, 0x89, 0xc0, 0x13, 0x65, 0xf9, 0x90, 0x34, 0xff, 0x8f, 0xa8, 0xc1, 0x15, 0xdd, 0xce, 0xbe, 0xfa, 0x26, 0xa8, 0xd6, 0x46, 0x8f, 0x50, 0x30, 0xe6, 0x41, 0x74, 0x59, 0x50, 0x6, 0x1e}}, - testcase{ - msg: []byte{0x71, 0x67, 0xe1, 0xe0, 0x2b, 0xe1, 0xa7, 0xca, 0x69, 0xd7, 0x88, 0x66, 0x6f, 0x82, 0x3a, 0xe4, 0xee, 0xf3, 0x92, 0x71, 0xf3, 0xc2, 0x6a, 0x5c, 0xf7, 0xce, 0xe0, 0x5b, 0xca, 0x83, 0x16, 0x10, 0x66, 0xdc, 0x2e, 0x21, 0x7b, 0x33, 0xd, 0xf8, 0x21, 0x10, 0x37, 0x99, 0xdf, 0x6d, 0x74, 0x81, 0xe, 0xed, 0x36, 0x3a, 0xdc, 0x4a, 0xb9, 0x9f, 0x36, 0x4, 0x6a}, - output224: []byte{0x22, 0x81, 0x7a, 0x21, 0xcf, 0xce, 0xc4, 0xfd, 0x23, 0x48, 0xb6, 0xbe, 0x8a, 0x70, 0x42, 0xa3, 0x77, 0x54, 0xd7, 0x6a, 0x3f, 0x33, 0xa8, 0xf8, 0x18, 0x31, 0x2c, 0xc7}, - output256: []byte{0x79, 0x4a, 0xbf, 0xd7, 0xeb, 0x62, 0x2d, 0x56, 0x8, 0xc1, 0xc7, 0xb3, 0xf0, 0xa7, 0x82, 0x1a, 0x71, 0x90, 0xb, 0x71, 0x72, 0x84, 0x7f, 0xb0, 0x90, 0x7a, 0xa2, 0x89, 0x99, 0x72, 0x66, 0x3e}, - output384: []byte{0x64, 0xe9, 0xad, 0x35, 0x7b, 0x58, 0xc6, 0xfa, 0xd, 0x26, 0xd0, 0xd1, 0xf4, 0x8c, 0x4a, 0xb0, 0x57, 0xb9, 0xf8, 0x9, 0x65, 0xac, 0x38, 0x49, 0x4e, 0x88, 0xf5, 0x42, 0xba, 0x41, 0xd6, 0xb7, 0x98, 0xfc, 0x2d, 0xd8, 0x82, 0x90, 0xf8, 0xdd, 0xe7, 0x94, 0x8c, 0x19, 0xb5, 0xa1, 0xf2, 0x60}, - output512: []byte{0x2a, 0x8c, 0xe9, 0xdf, 0x40, 0x87, 0x9b, 0x24, 0xda, 0xdf, 0x61, 0xc9, 0x13, 0x1f, 0x69, 0x4e, 0x55, 0x31, 0xad, 0xe6, 0xb7, 0xab, 0x7, 0x1c, 0xa1, 0xa, 0xbd, 0xd3, 0xc2, 0xe4, 0xa2, 0x2c, 0x86, 0x8a, 0x52, 0x98, 0x6a, 0x32, 0x9f, 0x88, 0x1, 0x37, 0xee, 0x76, 0x10, 0x97, 0x70, 0x92, 0x7d, 0x26, 0x58, 0xe6, 0x3e, 0xb4, 0x86, 0xd8, 0x80, 0x29, 0xa, 0xc0, 0x78, 0x2c, 0xf5, 0xbf}}, - testcase{ - msg: []byte{0x2f, 0xda, 0x31, 0x1d, 0xbb, 0xa2, 0x73, 0x21, 0xc5, 0x32, 0x95, 0x10, 0xfa, 0xe6, 0x94, 0x8f, 0x3, 0x21, 0xb, 0x76, 0xd4, 0x3e, 0x74, 0x48, 0xd1, 0x68, 0x9a, 0x6, 0x38, 0x77, 0xb6, 0xd1, 0x4c, 0x4f, 0x6d, 0xe, 0xaa, 0x96, 0xc1, 0x50, 0x5, 0x13, 0x71, 0xf7, 0xdd, 0x8a, 0x41, 0x19, 0xf7, 0xda, 0x5c, 0x48, 0x3c, 0xc3, 0xe6, 0x72, 0x3c, 0x1, 0xfb, 0x7d}, - output224: []byte{0x68, 0xca, 0xf2, 0x20, 0x33, 0x17, 0xa8, 0xbe, 0xd3, 0xc, 0x17, 0x92, 0xe8, 0x88, 0x91, 0x1, 0x24, 0xf2, 0xf0, 0xee, 0x1d, 0x24, 0xd4, 0x72, 0x74, 0xbc, 0xc8, 0x56}, - output256: []byte{0x9c, 0xe8, 0x99, 0x58, 0xcb, 0xdd, 0xd8, 0xdc, 0xb2, 0x2f, 0x66, 0xe8, 0xcb, 0xa5, 0xf6, 0x9, 0x1a, 0x51, 0x95, 0x31, 0x89, 0x46, 0x48, 0x3, 0xbd, 0xc7, 0x73, 0xab, 0xc7, 0xfa, 0xa9, 0x6}, - output384: []byte{0x3d, 0x73, 0xb3, 0x3f, 0x0, 0x13, 0x87, 0xfd, 0x1e, 0x75, 0x20, 0x68, 0xaf, 0x39, 0x45, 0x4e, 0x47, 0x6b, 0x84, 0x7, 0x3, 0x8c, 0x77, 0x2d, 0x94, 0x40, 0x4, 0x58, 0xc9, 0x36, 0x64, 0xec, 0x52, 0x26, 0xad, 0x1b, 0xd3, 0xa1, 0x9a, 0x6d, 0x9a, 0x6f, 0xbd, 0x6e, 0x6a, 0x62, 0x69, 0x5c}, - output512: []byte{0xa8, 0x3c, 0xe5, 0xa6, 0xa5, 0x83, 0x76, 0xd5, 0x7d, 0xb4, 0xc5, 0x8d, 0xa1, 0xb4, 0x6c, 0x13, 0x1f, 0xf1, 0xbf, 0x8f, 0xf2, 0xde, 0x5e, 0x86, 0x17, 0xfb, 0x37, 0xe5, 0x9, 0x83, 0x98, 0xed, 0xb5, 0x3f, 0x98, 0x88, 0xb8, 0x75, 0x2a, 0x8a, 0xff, 0x19, 0x17, 0x8f, 0x2f, 0x6b, 0xd7, 0xa3, 0x3f, 0xd3, 0x6c, 0x59, 0xe4, 0xa6, 0x31, 0x90, 0x62, 0x80, 0x90, 0x7f, 0xc1, 0xc5, 0xab, 0x7}}, - testcase{ - msg: []byte{0x95, 0xd1, 0x47, 0x4a, 0x5a, 0xab, 0x5d, 0x24, 0x22, 0xac, 0xa6, 0xe4, 0x81, 0x18, 0x78, 0x33, 0xa6, 0x21, 0x2b, 0xd2, 0xd0, 0xf9, 0x14, 0x51, 0xa6, 0x7d, 0xd7, 0x86, 0xdf, 0xc9, 0x1d, 0xfe, 0xd5, 0x1b, 0x35, 0xf4, 0x7e, 0x1d, 0xeb, 0x8a, 0x8a, 0xb4, 0xb9, 0xcb, 0x67, 0xb7, 0x1, 0x79, 0xcc, 0x26, 0xf5, 0x53, 0xae, 0x7b, 0x56, 0x99, 0x69, 0xce, 0x15, 0x1b, 0x8d}, - output224: []byte{0x7b, 0xba, 0xc0, 0xc0, 0xf1, 0x92, 0xd2, 0xc4, 0x79, 0x34, 0x83, 0x58, 0xd2, 0x24, 0x7e, 0x4c, 0x8, 0x96, 0x6a, 0x51, 0x2f, 0x73, 0xd4, 0x4, 0x45, 0xb5, 0x2e, 0xc7}, - output256: []byte{0x6d, 0xa7, 0x33, 0x81, 0x7d, 0xc8, 0x26, 0xe8, 0xda, 0x77, 0x3b, 0xec, 0xa7, 0x33, 0x81, 0x31, 0xab, 0x73, 0x96, 0x41, 0x71, 0x4, 0xed, 0xa2, 0x59, 0x70, 0x98, 0xc, 0x4e, 0xb2, 0xa1, 0x5f}, - output384: []byte{0xfc, 0x61, 0x9c, 0xa9, 0x81, 0xc, 0xaa, 0xe3, 0x63, 0x9b, 0x3f, 0xc6, 0x61, 0x38, 0x8c, 0x45, 0x41, 0x67, 0x27, 0x1e, 0x65, 0xed, 0xa, 0x2e, 0x5e, 0x8b, 0xc7, 0x18, 0xad, 0x21, 0xb9, 0xed, 0xe8, 0x95, 0xa6, 0x58, 0xc9, 0x46, 0xdc, 0x2f, 0xb1, 0x5b, 0x33, 0x35, 0x4d, 0xfe, 0x40, 0x2a}, - output512: []byte{0x9e, 0xbf, 0xce, 0xa2, 0xdb, 0x16, 0x76, 0xee, 0xe6, 0xb1, 0x3, 0x11, 0x95, 0x43, 0xc6, 0x4, 0x9d, 0xeb, 0xd8, 0xfb, 0x8f, 0x1e, 0x1, 0xa5, 0xab, 0x5b, 0x34, 0x8e, 0x29, 0x19, 0xe1, 0x4c, 0x8c, 0xfe, 0x8e, 0x54, 0x2f, 0x2a, 0xb7, 0x47, 0xb0, 0xfd, 0x4a, 0x4c, 0x3e, 0xee, 0x40, 0x19, 0xbb, 0x4, 0x6e, 0x24, 0xbf, 0xe2, 0x9, 0x1f, 0xb9, 0xc6, 0x5d, 0xca, 0x52, 0x7b, 0x71, 0xad}}, - testcase{ - msg: []byte{0xc7, 0x1b, 0xd7, 0x94, 0x1f, 0x41, 0xdf, 0x4, 0x4a, 0x29, 0x27, 0xa8, 0xff, 0x55, 0xb4, 0xb4, 0x67, 0xc3, 0x3d, 0x8, 0x9f, 0x9, 0x88, 0xaa, 0x25, 0x3d, 0x29, 0x4a, 0xdd, 0xbd, 0xb3, 0x25, 0x30, 0xc0, 0xd4, 0x20, 0x8b, 0x10, 0xd9, 0x95, 0x98, 0x23, 0xf0, 0xc0, 0xf0, 0x73, 0x46, 0x84, 0x0, 0x6d, 0xf7, 0x9f, 0x70, 0x99, 0x87, 0xf, 0x6b, 0xf5, 0x32, 0x11, 0xa8, 0x8d}, - output224: []byte{0xd2, 0x26, 0xd9, 0xe1, 0xf3, 0x6e, 0xc4, 0x22, 0x26, 0x93, 0x69, 0x9b, 0x6d, 0x3, 0x83, 0xc1, 0x45, 0x2e, 0x39, 0x1c, 0x41, 0xef, 0xd7, 0x64, 0x52, 0x89, 0xf8, 0xe3}, - output256: []byte{0x66, 0xc9, 0xcd, 0xc8, 0xe8, 0xc6, 0xc9, 0x41, 0x7d, 0x7f, 0xfb, 0xef, 0x3b, 0x54, 0xb7, 0x2, 0xee, 0xe5, 0xf0, 0x1a, 0x9b, 0xda, 0x8d, 0xd4, 0xe2, 0x8f, 0xe3, 0x33, 0x5d, 0xeb, 0xbb, 0x51}, - output384: []byte{0x58, 0x43, 0x12, 0x3a, 0x28, 0xf0, 0xb5, 0xc, 0x8, 0x20, 0x23, 0xac, 0x43, 0xb7, 0x29, 0x9c, 0x4f, 0xe6, 0x73, 0x2, 0x53, 0x2d, 0xf4, 0x80, 0x5b, 0xe6, 0xde, 0xc3, 0xb8, 0x45, 0x15, 0xb1, 0xc6, 0xc9, 0x8f, 0x8a, 0x4e, 0x3d, 0x6c, 0xa8, 0x26, 0xda, 0x4a, 0x11, 0x30, 0xc, 0x3b, 0x9b}, - output512: []byte{0x97, 0xb0, 0x8b, 0xe7, 0x65, 0x3e, 0x9d, 0xf1, 0xb5, 0xaf, 0xa4, 0x59, 0xea, 0x75, 0xa, 0x3a, 0xc9, 0xbf, 0x35, 0x77, 0xbc, 0xc7, 0xe5, 0x34, 0x4f, 0xc8, 0x61, 0x18, 0x48, 0x80, 0x92, 0x6d, 0xef, 0x35, 0x4e, 0x4c, 0x65, 0xb2, 0xe, 0xc6, 0x6c, 0x47, 0xb7, 0xaf, 0xfd, 0x3e, 0x74, 0x93, 0x95, 0x8b, 0xab, 0xa, 0x90, 0x72, 0x4d, 0x3d, 0x8d, 0xd9, 0xe1, 0xd5, 0x61, 0xfa, 0x60, 0xc2}}, - testcase{ - msg: []byte{0xf5, 0x7c, 0x64, 0x0, 0x6d, 0x9e, 0xa7, 0x61, 0x89, 0x2e, 0x14, 0x5c, 0x99, 0xdf, 0x1b, 0x24, 0x64, 0x8, 0x83, 0xda, 0x79, 0xd9, 0xed, 0x52, 0x62, 0x85, 0x9d, 0xcd, 0xa8, 0xc3, 0xc3, 0x2e, 0x5, 0xb0, 0x3d, 0x98, 0x4f, 0x1a, 0xb4, 0xa2, 0x30, 0x24, 0x2a, 0xb6, 0xb7, 0x8d, 0x36, 0x8d, 0xc5, 0xaa, 0xa1, 0xe6, 0xd3, 0x49, 0x8d, 0x53, 0x37, 0x1e, 0x84, 0xb0, 0xc1, 0xd4, 0xba}, - output224: []byte{0x29, 0x4a, 0x1e, 0x5a, 0x6, 0x29, 0xa2, 0x73, 0x6f, 0x18, 0x86, 0x91, 0xa3, 0x5f, 0xe1, 0xab, 0xb5, 0x54, 0x72, 0x78, 0x5d, 0xaf, 0xf6, 0xcd, 0x88, 0xc6, 0xd5, 0x37}, - output256: []byte{0x24, 0xab, 0x37, 0xa9, 0x36, 0x74, 0xcc, 0xb1, 0xce, 0xec, 0x9e, 0x56, 0x81, 0xef, 0xc8, 0xbd, 0xf9, 0xfc, 0xc7, 0x72, 0x1c, 0xf1, 0xca, 0xc1, 0x75, 0xe0, 0xb2, 0xe, 0x46, 0x15, 0x75, 0xb8}, - output384: []byte{0x81, 0xed, 0xf0, 0x6e, 0x9b, 0x64, 0xf3, 0x1, 0x6b, 0x15, 0x47, 0x53, 0x5a, 0xba, 0x4d, 0xb0, 0x87, 0x60, 0xfd, 0x23, 0xe9, 0x58, 0x1, 0x63, 0x19, 0x2f, 0x66, 0x3f, 0xf6, 0x21, 0x6, 0x0, 0x10, 0x6, 0xa1, 0x39, 0x3c, 0xf2, 0xd, 0xe4, 0x65, 0x6d, 0xbc, 0xb0, 0x29, 0xfb, 0x63, 0x14}, - output512: []byte{0xef, 0x8a, 0xaf, 0x8, 0x15, 0x9b, 0xbc, 0xb8, 0x8e, 0xfa, 0xc4, 0x9a, 0x33, 0xa5, 0x24, 0x8b, 0x7e, 0xd0, 0x54, 0x49, 0x60, 0xd8, 0xdd, 0x54, 0xd7, 0x48, 0xa9, 0x1c, 0xd, 0x84, 0xc6, 0x9f, 0x30, 0x8b, 0xb5, 0x4c, 0xb5, 0xec, 0x97, 0xd3, 0xf8, 0x1c, 0xdf, 0x76, 0xe6, 0x8e, 0x3, 0x20, 0x81, 0x5b, 0x93, 0xf2, 0xa0, 0x9, 0x42, 0xf2, 0x16, 0x8c, 0xbc, 0x18, 0xe8, 0x37, 0x77, 0x8}}, - testcase{ - msg: []byte{0xe9, 0x26, 0xae, 0x8b, 0xa, 0xf6, 0xe5, 0x31, 0x76, 0xdb, 0xff, 0xcc, 0x2a, 0x6b, 0x88, 0xc6, 0xbd, 0x76, 0x5f, 0x93, 0x9d, 0x3d, 0x17, 0x8a, 0x9b, 0xde, 0x9e, 0xf3, 0xaa, 0x13, 0x1c, 0x61, 0xe3, 0x1c, 0x1e, 0x42, 0xcd, 0xfa, 0xf4, 0xb4, 0xdc, 0xde, 0x57, 0x9a, 0x37, 0xe1, 0x50, 0xef, 0xbe, 0xf5, 0x55, 0x5b, 0x4c, 0x1c, 0xb4, 0x4, 0x39, 0xd8, 0x35, 0xa7, 0x24, 0xe2, 0xfa, 0xe7}, - output224: []byte{0xc5, 0x33, 0xdc, 0xf8, 0x8c, 0xd1, 0xa5, 0xdf, 0xf2, 0x2b, 0x91, 0x4d, 0x38, 0x75, 0xbd, 0x57, 0xfc, 0x17, 0xb2, 0xe1, 0xf4, 0x74, 0xae, 0x36, 0xc, 0x38, 0x77, 0xd2}, - output256: []byte{0x57, 0x42, 0x71, 0xcd, 0x13, 0x95, 0x9e, 0x8d, 0xde, 0xae, 0x5b, 0xfb, 0xdb, 0x2, 0xa3, 0xfd, 0xf5, 0x4f, 0x2b, 0xab, 0xfd, 0xc, 0xbe, 0xb8, 0x93, 0x8, 0x2a, 0x97, 0x49, 0x57, 0xd0, 0xc1}, - output384: []byte{0x14, 0xaa, 0x67, 0x9b, 0xc, 0x11, 0xf9, 0xc3, 0x63, 0xf5, 0x49, 0x33, 0x2, 0x61, 0xb4, 0x5e, 0x1e, 0x90, 0xce, 0x31, 0xf4, 0xa1, 0xb0, 0xce, 0x5c, 0xb9, 0xeb, 0x81, 0xbd, 0x60, 0x79, 0xa3, 0x74, 0x2d, 0x86, 0x2, 0x35, 0x6c, 0x50, 0x98, 0x5d, 0xd, 0x3e, 0x54, 0xf, 0xdf, 0xdc, 0xfb}, - output512: []byte{0xc0, 0xa4, 0xd8, 0xdc, 0xa9, 0x67, 0x77, 0x2d, 0xbf, 0x6e, 0x55, 0x8, 0xc9, 0x13, 0xe7, 0xbe, 0xba, 0x1b, 0x74, 0x9a, 0x2b, 0x1a, 0xc9, 0x63, 0xd0, 0x67, 0x6e, 0x6f, 0x1d, 0xcd, 0x4e, 0xba, 0xa3, 0xf9, 0x9, 0xef, 0x87, 0xdd, 0x84, 0x98, 0x82, 0xdc, 0x82, 0x53, 0x34, 0x7a, 0x5f, 0x65, 0x20, 0xb5, 0xb9, 0xf5, 0x10, 0x97, 0x3f, 0x44, 0x39, 0x76, 0x45, 0x5f, 0x92, 0x3c, 0xfc, 0xb9}}, - testcase{ - msg: []byte{0x16, 0xe8, 0xb3, 0xd8, 0xf9, 0x88, 0xe9, 0xbb, 0x4, 0xde, 0x9c, 0x96, 0xf2, 0x62, 0x78, 0x11, 0xc9, 0x73, 0xce, 0x4a, 0x52, 0x96, 0xb4, 0x77, 0x2c, 0xa3, 0xee, 0xfe, 0xb8, 0xa, 0x65, 0x2b, 0xdf, 0x21, 0xf5, 0xd, 0xf7, 0x9f, 0x32, 0xdb, 0x23, 0xf9, 0xf7, 0x3d, 0x39, 0x3b, 0x2d, 0x57, 0xd9, 0xa0, 0x29, 0x7f, 0x7a, 0x2f, 0x2e, 0x79, 0xcf, 0xda, 0x39, 0xfa, 0x39, 0x3d, 0xf1, 0xac, 0x0}, - output224: []byte{0xc9, 0xb7, 0xad, 0x7a, 0x32, 0xb7, 0xd, 0xfb, 0x5a, 0x8a, 0x2f, 0xf9, 0xd9, 0x8b, 0x30, 0xe, 0x48, 0x4b, 0x99, 0x6e, 0xd7, 0x52, 0xa7, 0x32, 0xd8, 0x4d, 0xb6, 0xf7}, - output256: []byte{0x19, 0x47, 0xe9, 0x1, 0xfa, 0x59, 0xea, 0x78, 0x98, 0x45, 0x77, 0x5f, 0x2a, 0x4d, 0xb9, 0xb4, 0x84, 0x8f, 0x8a, 0x77, 0x60, 0x73, 0xd5, 0x3d, 0x84, 0xcb, 0xd5, 0xd9, 0x27, 0xa9, 0x6b, 0xff}, - output384: []byte{0xe4, 0x30, 0xce, 0x80, 0xbc, 0xc6, 0x1d, 0x87, 0xfd, 0xe0, 0xa2, 0x78, 0xcf, 0xf5, 0x4d, 0x73, 0xc, 0x3, 0xa0, 0x33, 0x77, 0xf4, 0xac, 0x10, 0xb9, 0x3e, 0xd5, 0x9c, 0x58, 0x80, 0x11, 0x7a, 0xcb, 0x20, 0xf1, 0x70, 0x5a, 0xef, 0xd2, 0x9b, 0xe0, 0x33, 0xd2, 0xf2, 0x2, 0x59, 0x46, 0x55}, - output512: []byte{0xcf, 0x3, 0xc9, 0x46, 0xeb, 0x70, 0x22, 0xf6, 0xf, 0xb5, 0x43, 0x94, 0x62, 0xac, 0x22, 0x68, 0x4e, 0x47, 0xea, 0xac, 0xbf, 0xfe, 0x19, 0xb7, 0x97, 0x76, 0xb, 0x4a, 0x24, 0xa5, 0x23, 0x8b, 0xe9, 0xd9, 0xe, 0x17, 0xd4, 0xe, 0xa6, 0xfe, 0x7b, 0x28, 0x85, 0xce, 0xf7, 0xdf, 0xb8, 0xbb, 0x48, 0x94, 0x1, 0xca, 0xa9, 0x4f, 0x2d, 0xd6, 0xe0, 0x45, 0x92, 0xe3, 0x3e, 0x76, 0xb9, 0xd1}}, - testcase{ - msg: []byte{0xfc, 0x42, 0x4e, 0xeb, 0x27, 0xc1, 0x8a, 0x11, 0xc0, 0x1f, 0x39, 0xc5, 0x55, 0xd8, 0xb7, 0x8a, 0x80, 0x5b, 0x88, 0xdb, 0xa1, 0xdc, 0x2a, 0x42, 0xed, 0x5e, 0x2c, 0xe, 0xc7, 0x37, 0xff, 0x68, 0xb2, 0x45, 0x6d, 0x80, 0xeb, 0x85, 0xe1, 0x17, 0x14, 0xfa, 0x3f, 0x8e, 0xab, 0xfb, 0x90, 0x6d, 0x3c, 0x17, 0x96, 0x4c, 0xb4, 0xf5, 0xe7, 0x6b, 0x29, 0xc1, 0x76, 0x5d, 0xb0, 0x3d, 0x91, 0xbe, 0x37, 0xfc}, - output224: []byte{0xcf, 0x64, 0x6d, 0x5e, 0x5c, 0x81, 0x81, 0x8c, 0x97, 0xa0, 0x1f, 0x39, 0x3f, 0x80, 0x33, 0xce, 0x3c, 0xb7, 0xcc, 0xd0, 0x7f, 0xda, 0xc9, 0x98, 0x87, 0x66, 0xbd, 0x1c}, - output256: []byte{0xc, 0x1b, 0x8c, 0x1a, 0xf2, 0x37, 0xe9, 0xc5, 0x50, 0x1b, 0x50, 0x31, 0x6a, 0x80, 0x86, 0x5a, 0xac, 0x8, 0xa3, 0x4a, 0xcf, 0x4f, 0x8b, 0xed, 0xd4, 0xa2, 0xd6, 0xe7, 0xb7, 0xbc, 0xbb, 0x85}, - output384: []byte{0xc9, 0xf7, 0x4a, 0xc4, 0x7f, 0x91, 0x46, 0xf0, 0x91, 0xde, 0x63, 0x9, 0x35, 0x7f, 0x3c, 0x2a, 0xf3, 0xa9, 0xc4, 0x47, 0x4c, 0xc0, 0x5, 0xae, 0xfa, 0xce, 0x3c, 0x7a, 0x55, 0x2b, 0x61, 0x27, 0xe3, 0x4e, 0xc8, 0x2c, 0x3a, 0xfc, 0xaa, 0xcd, 0xd8, 0x3e, 0x69, 0x5c, 0xb8, 0x62, 0x41, 0xe4}, - output512: []byte{0x2c, 0x35, 0xf1, 0xa5, 0x7a, 0x17, 0xcb, 0x29, 0x40, 0x3a, 0x2b, 0x40, 0xfc, 0x30, 0x7b, 0xde, 0x10, 0xba, 0x8f, 0x7f, 0xec, 0x7b, 0x94, 0xe1, 0xe4, 0x2e, 0xb4, 0xee, 0xb9, 0x52, 0xaa, 0xd0, 0xe, 0xc4, 0x6a, 0x26, 0x64, 0x6c, 0xd5, 0x1d, 0xb0, 0xc6, 0xb2, 0x38, 0x18, 0x9d, 0x7d, 0x47, 0xe, 0x21, 0xc2, 0x9b, 0xf8, 0x71, 0x4, 0x23, 0xcb, 0x56, 0x2, 0xca, 0xb7, 0x5e, 0x29, 0xe7}}, - testcase{ - msg: []byte{0xab, 0xe3, 0x47, 0x2b, 0x54, 0xe7, 0x27, 0x34, 0xbd, 0xba, 0x7d, 0x91, 0x58, 0x73, 0x64, 0x64, 0x25, 0x1c, 0x4f, 0x21, 0xb3, 0x3f, 0xbb, 0xc9, 0x2d, 0x7f, 0xac, 0x9a, 0x35, 0xc4, 0xe3, 0x32, 0x2f, 0xf0, 0x1d, 0x23, 0x80, 0xcb, 0xaa, 0x4e, 0xf8, 0xfb, 0x7, 0xd2, 0x1a, 0x21, 0x28, 0xb7, 0xb9, 0xf5, 0xb6, 0xd9, 0xf3, 0x4e, 0x13, 0xf3, 0x9c, 0x7f, 0xfc, 0x2e, 0x72, 0xe4, 0x78, 0x88, 0x59, 0x9b, 0xa5}, - output224: []byte{0xd4, 0x11, 0xe8, 0xa7, 0xcf, 0x50, 0xaa, 0xf9, 0x10, 0x76, 0xa8, 0xcc, 0x5f, 0x1, 0xbf, 0x5b, 0x6b, 0xb2, 0xcc, 0xae, 0x80, 0x46, 0xbf, 0x47, 0x87, 0x18, 0x91, 0xfd}, - output256: []byte{0xc4, 0x31, 0x56, 0x66, 0xc7, 0x1f, 0xea, 0x83, 0x4d, 0x8f, 0xf2, 0x7f, 0x2, 0x5f, 0x5c, 0xc3, 0x4f, 0x37, 0xc1, 0xaa, 0xe7, 0x86, 0x4, 0xa4, 0xb0, 0x8d, 0xac, 0x45, 0xde, 0xcd, 0x42, 0xbe}, - output384: []byte{0xc4, 0x2e, 0xcc, 0x88, 0x63, 0x7, 0x7a, 0xbf, 0xf6, 0x89, 0x41, 0x3c, 0xe3, 0x7b, 0x61, 0xf0, 0x43, 0x6d, 0xdb, 0x62, 0xe5, 0x6d, 0xe4, 0xe3, 0x33, 0x3c, 0x26, 0xd9, 0x5a, 0xee, 0x9e, 0x9c, 0xbe, 0x1d, 0x8a, 0xaa, 0x67, 0x44, 0xc0, 0xde, 0x6b, 0xa9, 0xcf, 0xf0, 0xff, 0x1, 0xa6, 0xbf}, - output512: []byte{0x50, 0x5e, 0x6e, 0x60, 0x7c, 0x90, 0xc5, 0x7b, 0xbe, 0x7c, 0xe5, 0x2b, 0xb4, 0x2d, 0xf3, 0xd9, 0xb, 0xc3, 0x2d, 0xe5, 0x54, 0x2, 0x57, 0x30, 0xc8, 0x4e, 0xd0, 0xf8, 0x9a, 0x1, 0x32, 0x88, 0x5d, 0x7a, 0x40, 0xfa, 0xdf, 0xf7, 0xa4, 0xb0, 0x1d, 0xe4, 0xd2, 0x97, 0x35, 0xae, 0xfe, 0xe, 0x4, 0x69, 0xf4, 0xf1, 0x72, 0xb6, 0x2a, 0xd, 0xab, 0xa8, 0x89, 0xe1, 0x52, 0x30, 0x8f, 0xc4}}, - testcase{ - msg: []byte{0x36, 0xf9, 0xf0, 0xa6, 0x5f, 0x2c, 0xa4, 0x98, 0xd7, 0x39, 0xb9, 0x44, 0xd6, 0xef, 0xf3, 0xda, 0x5e, 0xbb, 0xa5, 0x7e, 0x7d, 0x9c, 0x41, 0x59, 0x8a, 0x2b, 0xe, 0x43, 0x80, 0xf3, 0xcf, 0x4b, 0x47, 0x9e, 0xc2, 0x34, 0x8d, 0x1, 0x5f, 0xfe, 0x62, 0x56, 0x27, 0x35, 0x11, 0x15, 0x4a, 0xfc, 0xf3, 0xb4, 0xb4, 0xbf, 0x9, 0xd6, 0xc4, 0x74, 0x4f, 0xdd, 0xf, 0x62, 0xd7, 0x50, 0x79, 0xd4, 0x40, 0x70, 0x6b, 0x5}, - output224: []byte{0xe0, 0x94, 0xc0, 0x30, 0x3d, 0x18, 0x41, 0xc6, 0xe4, 0xc0, 0x86, 0x48, 0x57, 0xcf, 0x36, 0xcf, 0xc9, 0x80, 0xe3, 0xcb, 0x4d, 0x78, 0xf1, 0x8e, 0x30, 0x11, 0x17, 0xc4}, - output256: []byte{0x5f, 0xf8, 0x73, 0x4d, 0xb3, 0xf9, 0x97, 0x7e, 0xee, 0x9c, 0xf5, 0xe2, 0xcf, 0x72, 0x5c, 0x57, 0xaf, 0x9, 0x92, 0x64, 0x90, 0xc5, 0x5a, 0xbd, 0x9d, 0x0, 0xa4, 0x2e, 0x91, 0xa8, 0xc3, 0x44}, - output384: []byte{0xb1, 0x53, 0x92, 0x71, 0x8c, 0xbf, 0x4a, 0x7c, 0x7f, 0xad, 0x1c, 0x15, 0xe7, 0xf2, 0x6c, 0x44, 0x6e, 0x79, 0xd5, 0x42, 0x51, 0x40, 0x4e, 0x64, 0x6b, 0x4d, 0xca, 0x3d, 0x42, 0x14, 0x2e, 0xd5, 0x14, 0xd, 0xd, 0x30, 0xbd, 0x83, 0x6c, 0x7d, 0x51, 0x3c, 0xe6, 0xf5, 0xe1, 0x4, 0xd4, 0x2d}, - output512: []byte{0x7b, 0xe2, 0xc9, 0x54, 0x13, 0xc5, 0x89, 0xec, 0x5a, 0xd6, 0x9f, 0x8d, 0x80, 0xbf, 0xe9, 0xf2, 0x65, 0x40, 0xd5, 0xc1, 0x83, 0x2c, 0x7a, 0x49, 0xa3, 0x1a, 0x8f, 0x56, 0x55, 0xd9, 0xce, 0x8b, 0x47, 0xd9, 0x7c, 0x69, 0xcc, 0xcd, 0x69, 0x3c, 0x21, 0x19, 0x4, 0x14, 0x2a, 0x54, 0x3, 0xda, 0x7a, 0xd0, 0x9f, 0xbd, 0xb8, 0x25, 0x69, 0x8f, 0xe2, 0x1, 0x98, 0x8f, 0xcc, 0xcd, 0x2b, 0xb2}}, - testcase{ - msg: []byte{0xab, 0xc8, 0x77, 0x63, 0xca, 0xe1, 0xca, 0x98, 0xbd, 0x8c, 0x5b, 0x82, 0xca, 0xba, 0x54, 0xac, 0x83, 0x28, 0x6f, 0x87, 0xe9, 0x61, 0x1, 0x28, 0xae, 0x4d, 0xe6, 0x8a, 0xc9, 0x5d, 0xf5, 0xe3, 0x29, 0xc3, 0x60, 0x71, 0x7b, 0xd3, 0x49, 0xf2, 0x6b, 0x87, 0x25, 0x28, 0x49, 0x2c, 0xa7, 0xc9, 0x4c, 0x2c, 0x1e, 0x1e, 0xf5, 0x6b, 0x74, 0xdb, 0xb6, 0x5c, 0x2a, 0xc3, 0x51, 0x98, 0x1f, 0xdb, 0x31, 0xd0, 0x6c, 0x77, 0xa4}, - output224: []byte{0x51, 0x94, 0x8e, 0x17, 0x72, 0xc2, 0xc2, 0xee, 0x49, 0x15, 0x8d, 0x2, 0xa9, 0x75, 0xb2, 0x74, 0x77, 0xbd, 0x4, 0x12, 0x62, 0x95, 0x4c, 0x3e, 0x60, 0xf5, 0xac, 0xc2}, - output256: []byte{0x1e, 0x14, 0x1a, 0x17, 0x1c, 0xab, 0x8, 0x52, 0x52, 0xea, 0x4c, 0x2f, 0x8f, 0x1f, 0x10, 0x87, 0xdd, 0x85, 0xa7, 0x5a, 0xb3, 0xac, 0xd0, 0xb3, 0xc2, 0x8e, 0xaa, 0x57, 0x35, 0xd3, 0x49, 0xaf}, - output384: []byte{0xe0, 0x32, 0x94, 0xc6, 0x8e, 0xdf, 0x4e, 0x88, 0x26, 0xb6, 0x99, 0xab, 0xdd, 0xbe, 0xf7, 0x54, 0x67, 0xc4, 0x9c, 0xab, 0x56, 0xe0, 0x85, 0xe4, 0xb8, 0x3a, 0x58, 0xb2, 0xd9, 0xbd, 0xfa, 0xc9, 0xd5, 0x8b, 0x45, 0xaa, 0xcc, 0xe, 0xc0, 0xce, 0x2d, 0x6d, 0x79, 0x68, 0x6a, 0x41, 0xac, 0x13}, - output512: []byte{0x8a, 0xac, 0x92, 0x1, 0xd7, 0x6d, 0xf1, 0x34, 0x24, 0xa3, 0x25, 0x52, 0xf0, 0x43, 0x90, 0xe4, 0x99, 0xb6, 0x16, 0x87, 0x11, 0xb7, 0xc, 0x87, 0x57, 0x89, 0xdd, 0xaa, 0x9b, 0x11, 0x5f, 0x8b, 0x82, 0x59, 0xa6, 0xd, 0x17, 0x83, 0x5e, 0x25, 0x87, 0xf8, 0x90, 0x1c, 0x3c, 0xa7, 0x82, 0xda, 0x9a, 0xfb, 0x28, 0xba, 0x87, 0xb9, 0xfc, 0xbe, 0x5, 0xa4, 0x7a, 0x42, 0xf4, 0x8f, 0xcd, 0x48}}, - testcase{ - msg: []byte{0x94, 0xf7, 0xca, 0x8e, 0x1a, 0x54, 0x23, 0x4c, 0x6d, 0x53, 0xcc, 0x73, 0x4b, 0xb3, 0xd3, 0x15, 0xc, 0x8b, 0xa8, 0xc5, 0xf8, 0x80, 0xea, 0xb8, 0xd2, 0x5f, 0xed, 0x13, 0x79, 0x3a, 0x97, 0x1, 0xeb, 0xe3, 0x20, 0x50, 0x92, 0x86, 0xfd, 0x8e, 0x42, 0x2e, 0x93, 0x1d, 0x99, 0xc9, 0x8d, 0xa4, 0xdf, 0x7e, 0x70, 0xae, 0x44, 0x7b, 0xab, 0x8c, 0xff, 0xd9, 0x23, 0x82, 0xd8, 0xa7, 0x77, 0x60, 0xa2, 0x59, 0xfc, 0x4f, 0xbd, 0x72}, - output224: []byte{0x82, 0x14, 0xa2, 0xb0, 0xe8, 0xbb, 0x60, 0xcd, 0x3e, 0x4d, 0xfb, 0xd, 0x8, 0x55, 0xd0, 0xf6, 0xc4, 0xba, 0x6d, 0x27, 0x28, 0xd0, 0x68, 0x7b, 0xdf, 0x75, 0xf7, 0x9e}, - output256: []byte{0xef, 0x76, 0x3f, 0x22, 0xf3, 0x59, 0xdd, 0x7f, 0x5b, 0x3f, 0xe6, 0xa7, 0x45, 0xc4, 0x23, 0xd6, 0xb6, 0x41, 0xec, 0x7, 0xba, 0x52, 0x35, 0x23, 0x2a, 0x7, 0x1, 0x51, 0xf, 0x74, 0x42, 0x6e}, - output384: []byte{0xd5, 0x53, 0x9d, 0x7a, 0xef, 0xf9, 0xf7, 0x4d, 0xc7, 0x5b, 0x6e, 0x95, 0xea, 0xde, 0x6, 0x3b, 0xe4, 0x19, 0xb1, 0x5a, 0x41, 0x79, 0xcf, 0xd0, 0x6d, 0x4f, 0xd2, 0x74, 0x1e, 0x22, 0xb2, 0xa2, 0x43, 0x95, 0xaa, 0xa1, 0xc0, 0x24, 0x2c, 0x99, 0x5e, 0xb5, 0xea, 0x89, 0x13, 0x47, 0xb4, 0xdb}, - output512: []byte{0xaa, 0x52, 0x58, 0x7d, 0x84, 0x58, 0x63, 0x17, 0x2, 0x8f, 0xb7, 0xd3, 0xc2, 0x8, 0x92, 0xe0, 0x28, 0x8b, 0xfe, 0x2f, 0xea, 0xbd, 0x76, 0xd7, 0xf8, 0x91, 0x55, 0xff, 0xe9, 0xcc, 0xbf, 0x1a, 0x9, 0xfa, 0xf, 0xfb, 0x5, 0x53, 0xe8, 0x3f, 0x79, 0xae, 0x58, 0xbd, 0x30, 0xa3, 0x5f, 0xa5, 0x48, 0x92, 0xb6, 0xab, 0xa0, 0x9, 0x3a, 0x1, 0x24, 0x27, 0xdd, 0xab, 0x71, 0xcd, 0xf8, 0x19}}, - testcase{ - msg: []byte{0x13, 0xbd, 0x28, 0x11, 0xf6, 0xed, 0x2b, 0x6f, 0x4, 0xff, 0x38, 0x95, 0xac, 0xee, 0xd7, 0xbe, 0xf8, 0xdc, 0xd4, 0x5e, 0xb1, 0x21, 0x79, 0x1b, 0xc1, 0x94, 0xa0, 0xf8, 0x6, 0x20, 0x6b, 0xff, 0xc3, 0xb9, 0x28, 0x1c, 0x2b, 0x30, 0x8b, 0x1a, 0x72, 0x9c, 0xe0, 0x8, 0x11, 0x9d, 0xd3, 0x6, 0x6e, 0x93, 0x78, 0xac, 0xdc, 0xc5, 0xa, 0x98, 0xa8, 0x2e, 0x20, 0x73, 0x88, 0x0, 0xb6, 0xcd, 0xdb, 0xe5, 0xfe, 0x96, 0x94, 0xad, 0x6d}, - output224: []byte{0x8a, 0x2a, 0xe6, 0xb9, 0xaa, 0x7b, 0x1e, 0x8, 0xf8, 0xc7, 0xdc, 0x3b, 0xf5, 0xae, 0x87, 0x66, 0x60, 0xd3, 0xf, 0x79, 0x39, 0x17, 0x14, 0xa1, 0x75, 0x38, 0x10, 0x91}, - output256: []byte{0x6a, 0x76, 0x9f, 0x93, 0xf2, 0x55, 0xb0, 0x78, 0xfe, 0x73, 0xaf, 0xf6, 0x8f, 0x4, 0x22, 0xa2, 0x79, 0x93, 0x99, 0x20, 0xe4, 0x69, 0xb, 0x4a, 0xff, 0xe, 0x43, 0x3c, 0xfa, 0x3d, 0x3d, 0xf3}, - output384: []byte{0xb1, 0x15, 0xa9, 0x96, 0x8b, 0x5, 0x4c, 0x93, 0x4c, 0x39, 0x6d, 0x81, 0x88, 0xba, 0xc, 0x33, 0xa2, 0x3c, 0x71, 0x89, 0xce, 0x88, 0xb1, 0xde, 0x4a, 0x6, 0xcd, 0x31, 0x97, 0x92, 0xd2, 0x86, 0x47, 0xea, 0xe1, 0xd8, 0x8f, 0xb0, 0xb8, 0x74, 0x43, 0xe4, 0x62, 0x92, 0xa5, 0xc6, 0x45, 0xe8}, - output512: []byte{0x48, 0xfc, 0x28, 0x2f, 0x37, 0xa3, 0xe1, 0xfb, 0x5d, 0xf4, 0xd2, 0xda, 0x1f, 0x71, 0x97, 0xec, 0x89, 0x9a, 0xe5, 0x73, 0xca, 0x8, 0xdf, 0x55, 0xe, 0x61, 0xee, 0x84, 0x7e, 0xeb, 0x1d, 0x24, 0xc0, 0x74, 0xff, 0x46, 0xbc, 0xae, 0xe2, 0x24, 0xec, 0x7d, 0x8c, 0xea, 0x42, 0x56, 0x15, 0x4f, 0xc, 0x4d, 0x43, 0x4e, 0x68, 0x28, 0x34, 0xf6, 0xd8, 0x27, 0xbf, 0xbd, 0xf7, 0x51, 0x12, 0xf5}}, - testcase{ - msg: []byte{0x1e, 0xed, 0x9c, 0xba, 0x17, 0x9a, 0x0, 0x9e, 0xc2, 0xec, 0x55, 0x8, 0x77, 0x3d, 0xd3, 0x5, 0x47, 0x7c, 0xa1, 0x17, 0xe6, 0xd5, 0x69, 0xe6, 0x6b, 0x5f, 0x64, 0xc6, 0xbc, 0x64, 0x80, 0x1c, 0xe2, 0x5a, 0x84, 0x24, 0xce, 0x4a, 0x26, 0xd5, 0x75, 0xb8, 0xa6, 0xfb, 0x10, 0xea, 0xd3, 0xfd, 0x19, 0x92, 0xed, 0xdd, 0xee, 0xc2, 0xeb, 0xe7, 0x15, 0xd, 0xc9, 0x8f, 0x63, 0xad, 0xc3, 0x23, 0x7e, 0xf5, 0x7b, 0x91, 0x39, 0x7a, 0xa8, 0xa7}, - output224: []byte{0x70, 0x2b, 0x19, 0x6, 0xa6, 0x3d, 0xf, 0x92, 0x4a, 0xfe, 0xc3, 0xbb, 0x5e, 0x5c, 0x57, 0x42, 0xe8, 0x5f, 0x98, 0x34, 0xea, 0x6f, 0x53, 0x6, 0x64, 0x48, 0x11, 0xa1}, - output256: []byte{0xc0, 0x6d, 0xd4, 0x26, 0x16, 0x38, 0xc4, 0x4a, 0xfc, 0xb1, 0x86, 0xf0, 0xaf, 0x5d, 0xe2, 0xe, 0xa5, 0x3a, 0xa6, 0x33, 0x16, 0xfb, 0xb7, 0x17, 0x28, 0xf8, 0x74, 0xff, 0x3d, 0xac, 0xeb, 0xd}, - output384: []byte{0xc8, 0xfa, 0xef, 0x75, 0x7e, 0x6d, 0x7b, 0xa, 0xf4, 0x6d, 0xa1, 0xe5, 0x7c, 0x71, 0xab, 0xb4, 0xaa, 0xf7, 0xcc, 0x91, 0xc5, 0xcd, 0xc3, 0x3b, 0xa8, 0xa7, 0x38, 0x17, 0x2b, 0x95, 0xde, 0x8, 0x7e, 0xc4, 0xc9, 0x26, 0x92, 0xcb, 0x40, 0xee, 0x37, 0x87, 0xbc, 0xe3, 0x20, 0x6f, 0xb7, 0xea}, - output512: []byte{0x6b, 0x4b, 0xf, 0x12, 0x68, 0x63, 0x55, 0x2a, 0x6f, 0x40, 0xf4, 0x5e, 0x29, 0x5d, 0xc7, 0x9b, 0x9b, 0xa2, 0xa8, 0x8e, 0xa7, 0xc3, 0xb2, 0xf6, 0x7, 0xac, 0x1a, 0x84, 0x31, 0xa9, 0x78, 0x44, 0xc2, 0xa7, 0xb6, 0x64, 0x44, 0x3f, 0xb2, 0x3c, 0x5, 0x73, 0x9d, 0xf5, 0x49, 0x4f, 0xe9, 0x82, 0x4d, 0xb8, 0xb, 0x7f, 0x3e, 0x67, 0x87, 0x21, 0x42, 0xf1, 0x7e, 0x2c, 0x55, 0x44, 0xe1, 0xef}}, - testcase{ - msg: []byte{0xba, 0x5b, 0x67, 0xb5, 0xec, 0x3a, 0x3f, 0xfa, 0xe2, 0xc1, 0x9d, 0xd8, 0x17, 0x6a, 0x2e, 0xf7, 0x5c, 0xc, 0xd9, 0x3, 0x72, 0x5d, 0x45, 0xc9, 0xcb, 0x70, 0x9, 0xa9, 0x0, 0xc0, 0xb0, 0xca, 0x7a, 0x29, 0x67, 0xa9, 0x5a, 0xe6, 0x82, 0x69, 0xa6, 0xdb, 0xf8, 0x46, 0x6c, 0x7b, 0x68, 0x44, 0xa1, 0xd6, 0x8, 0xac, 0x66, 0x1f, 0x7e, 0xff, 0x0, 0x53, 0x8e, 0x32, 0x3d, 0xb5, 0xf2, 0xc6, 0x44, 0xb7, 0x8b, 0x2d, 0x48, 0xde, 0x1a, 0x8, 0xaa}, - output224: []byte{0xbf, 0x21, 0x1, 0x51, 0x12, 0x20, 0xb7, 0xdf, 0xe5, 0x4b, 0x12, 0x7c, 0x24, 0x76, 0xea, 0xad, 0xfd, 0x4e, 0xab, 0x7f, 0xd0, 0xf6, 0xbd, 0xd1, 0x93, 0x7, 0x8a, 0xc8}, - output256: []byte{0xb5, 0xd8, 0x4b, 0x18, 0x9, 0xe8, 0x3b, 0x5e, 0x75, 0xaa, 0x53, 0xbd, 0xee, 0x79, 0xe3, 0xa9, 0x7f, 0x3f, 0xe3, 0xa7, 0xd3, 0x16, 0x2e, 0xbd, 0x49, 0x8, 0x24, 0xf, 0xf6, 0x91, 0x31, 0xd8}, - output384: []byte{0xf4, 0xf2, 0x1b, 0xb7, 0x45, 0x93, 0xaa, 0x10, 0x7d, 0xc1, 0x95, 0xff, 0x52, 0xa3, 0xf9, 0x8, 0x16, 0xcc, 0xea, 0xe8, 0xd3, 0xeb, 0x9d, 0x45, 0x77, 0xb2, 0x8b, 0x49, 0xc3, 0x39, 0x83, 0x7a, 0x52, 0x70, 0xa, 0x62, 0xeb, 0x42, 0x1e, 0x8c, 0xa1, 0xc8, 0x7f, 0x45, 0x63, 0x10, 0xf6, 0x2c}, - output512: []byte{0x7e, 0xec, 0x7b, 0x73, 0x0, 0x56, 0xb1, 0xbd, 0x4f, 0x6f, 0xfc, 0x18, 0x6f, 0xb4, 0x55, 0x91, 0xe5, 0xc, 0xd9, 0x3c, 0xf6, 0xe4, 0xfc, 0x95, 0x88, 0x89, 0xf8, 0x2d, 0x3f, 0x32, 0xc5, 0xc7, 0x4d, 0x3, 0xa4, 0xbc, 0xf7, 0xd2, 0x75, 0x42, 0x98, 0xf1, 0x34, 0x69, 0x8a, 0xf4, 0x55, 0x9b, 0xe, 0x29, 0xba, 0xaa, 0x36, 0x5c, 0xc0, 0xd, 0xb0, 0xd5, 0x1d, 0x40, 0x71, 0x79, 0xc5, 0x6d}}, - testcase{ - msg: []byte{0xe, 0xfa, 0x26, 0xac, 0x56, 0x73, 0x16, 0x7d, 0xca, 0xca, 0xb8, 0x60, 0x93, 0x2e, 0xd6, 0x12, 0xf6, 0x5f, 0xf4, 0x9b, 0x80, 0xfa, 0x9a, 0xe6, 0x54, 0x65, 0xe5, 0x54, 0x2c, 0xb6, 0x20, 0x75, 0xdf, 0x1c, 0x5a, 0xe5, 0x4f, 0xba, 0x4d, 0xb8, 0x7, 0xbe, 0x25, 0xb0, 0x70, 0x3, 0x3e, 0xfa, 0x22, 0x3b, 0xdd, 0x5b, 0x1d, 0x3c, 0x94, 0xc6, 0xe1, 0x90, 0x9c, 0x2, 0xb6, 0x20, 0xd4, 0xb1, 0xb3, 0xa6, 0xc9, 0xfe, 0xd2, 0x4d, 0x70, 0x74, 0x96, 0x4}, - output224: []byte{0xb0, 0x7a, 0xdb, 0xed, 0x91, 0x27, 0x23, 0xa0, 0x7f, 0xa5, 0x35, 0x3f, 0x66, 0x5e, 0xc1, 0x4f, 0xf8, 0x2d, 0x85, 0xe9, 0xb, 0xe3, 0xe5, 0xa1, 0xf5, 0xc9, 0xf, 0xff}, - output256: []byte{0xca, 0xd7, 0xab, 0xb5, 0xbb, 0xa5, 0x90, 0x5b, 0x51, 0x81, 0xdd, 0x2d, 0xbc, 0x4e, 0x68, 0xcf, 0xd0, 0x1b, 0xa8, 0x65, 0x9f, 0x21, 0xc8, 0x29, 0xd, 0x3f, 0x83, 0x5c, 0x1a, 0x68, 0xbb, 0xe5}, - output384: []byte{0x83, 0x54, 0x45, 0x11, 0xa0, 0x7f, 0x60, 0x58, 0xd9, 0xfe, 0x5a, 0xad, 0x7e, 0xa8, 0x37, 0xa9, 0xe1, 0x80, 0xd8, 0xbb, 0xb8, 0x84, 0xc5, 0x65, 0xb, 0x79, 0x89, 0x42, 0x98, 0x3a, 0x60, 0x5a, 0x51, 0x4c, 0x21, 0xd8, 0xd6, 0x3d, 0xb0, 0xe2, 0x5a, 0xae, 0x51, 0xd2, 0x6f, 0x41, 0xb, 0xc5}, - output512: []byte{0x79, 0xcb, 0x92, 0x5a, 0xca, 0x7, 0x2e, 0xbb, 0x3b, 0x49, 0xa9, 0xd0, 0xe5, 0x9b, 0xb0, 0x7d, 0xd1, 0xc2, 0x23, 0xc1, 0xf2, 0x6c, 0x91, 0x76, 0x8b, 0x92, 0x94, 0x72, 0xc5, 0x1b, 0x97, 0x7f, 0x85, 0xc6, 0xce, 0xeb, 0x54, 0xbc, 0xe8, 0x9c, 0xf9, 0xff, 0x61, 0x55, 0xd7, 0xfe, 0x80, 0x91, 0x54, 0xf, 0x13, 0x48, 0xce, 0x95, 0x92, 0xa6, 0x40, 0x3f, 0x92, 0x10, 0x54, 0x77, 0x87, 0xe}}, - testcase{ - msg: []byte{0xbb, 0xfd, 0x93, 0x3d, 0x1f, 0xd7, 0xbf, 0x59, 0x4a, 0xc7, 0xf4, 0x35, 0x27, 0x7d, 0xc1, 0x7d, 0x8d, 0x5a, 0x5b, 0x8e, 0x4d, 0x13, 0xd9, 0x6d, 0x2f, 0x64, 0xe7, 0x71, 0xab, 0xbd, 0x51, 0xa5, 0xa8, 0xae, 0xa7, 0x41, 0xbe, 0xcc, 0xbd, 0xdb, 0x17, 0x7b, 0xce, 0xa0, 0x52, 0x43, 0xeb, 0xd0, 0x3, 0xcf, 0xde, 0xae, 0x87, 0x7c, 0xca, 0x4d, 0xa9, 0x46, 0x5, 0xb6, 0x76, 0x91, 0x91, 0x9d, 0x8b, 0x3, 0x3f, 0x77, 0xd3, 0x84, 0xca, 0x1, 0x59, 0x3c, 0x1b}, - output224: []byte{0xd1, 0x71, 0x8f, 0xd, 0x38, 0x7a, 0xc4, 0x27, 0x11, 0x1a, 0x7e, 0x90, 0xe5, 0x75, 0xde, 0x5f, 0x4, 0x77, 0x8e, 0xa2, 0xba, 0x14, 0x7a, 0x84, 0x51, 0x91, 0x4f, 0xf0}, - output256: []byte{0x83, 0xca, 0x9, 0xc1, 0xf4, 0x18, 0xb5, 0xda, 0xd0, 0xa7, 0xf6, 0x4a, 0x90, 0x4a, 0x2e, 0x7, 0xc3, 0x31, 0x4f, 0x7d, 0x2, 0xd9, 0x26, 0x22, 0xf8, 0xf4, 0x67, 0x4b, 0xc1, 0xf6, 0xaa, 0x3d}, - output384: []byte{0x8e, 0xcd, 0x84, 0x59, 0xfb, 0x90, 0x4d, 0x2e, 0xdd, 0xb1, 0x42, 0x7, 0x65, 0x9c, 0x2b, 0xf9, 0x6e, 0xfb, 0xd3, 0xe4, 0xc8, 0x98, 0x87, 0x36, 0xec, 0x75, 0x8, 0x8f, 0x1c, 0xc8, 0x11, 0x5d, 0x3f, 0xff, 0xc8, 0xce, 0xdf, 0x1c, 0x1, 0x72, 0x14, 0x69, 0xd2, 0x79, 0x68, 0xa6, 0x85, 0x6b}, - output512: []byte{0xb5, 0xd1, 0xed, 0x8f, 0x3, 0x90, 0x44, 0xbc, 0xfe, 0xf4, 0x1e, 0x99, 0xb2, 0xf5, 0x64, 0xf4, 0x59, 0x91, 0xb3, 0x29, 0xb5, 0x3, 0xfc, 0x91, 0xfa, 0x29, 0xd2, 0x40, 0x85, 0x12, 0xf8, 0x71, 0x1e, 0x9d, 0xb6, 0x6f, 0x8a, 0xe1, 0x72, 0x16, 0x46, 0x50, 0x54, 0x5a, 0xe9, 0xe3, 0xdb, 0x32, 0xaa, 0x36, 0x9e, 0xc4, 0x7e, 0x81, 0xa7, 0x71, 0x11, 0x27, 0x6e, 0x6c, 0xa3, 0x8e, 0x4d, 0x92}}, - testcase{ - msg: []byte{0x90, 0x7, 0x89, 0x99, 0xfd, 0x3c, 0x35, 0xb8, 0xaf, 0xbf, 0x40, 0x66, 0xcb, 0xde, 0x33, 0x58, 0x91, 0x36, 0x5f, 0xf, 0xc7, 0x5c, 0x12, 0x86, 0xcd, 0xd8, 0x8f, 0xa5, 0x1f, 0xab, 0x94, 0xf9, 0xb8, 0xde, 0xf7, 0xc9, 0xac, 0x58, 0x2a, 0x5d, 0xbc, 0xd9, 0x58, 0x17, 0xaf, 0xb7, 0xd1, 0xb4, 0x8f, 0x63, 0x70, 0x4e, 0x19, 0xc2, 0xba, 0xa4, 0xdf, 0x34, 0x7f, 0x48, 0xd4, 0xa6, 0xd6, 0x3, 0x1, 0x3c, 0x23, 0xf1, 0xe9, 0x61, 0x1d, 0x59, 0x5e, 0xba, 0xc3, 0x7c}, - output224: []byte{0xfa, 0xf7, 0xd7, 0x93, 0x2, 0x4e, 0x6d, 0x5, 0xe7, 0x7c, 0x52, 0x31, 0x71, 0x24, 0x78, 0x82, 0x2c, 0x91, 0x52, 0x92, 0xfc, 0xc1, 0x42, 0x7e, 0x6a, 0xcf, 0xd3, 0xcf}, - output256: []byte{0x33, 0xd, 0xe3, 0xee, 0x16, 0xae, 0xf6, 0x71, 0x14, 0x61, 0xa9, 0x94, 0x86, 0x3e, 0xed, 0x47, 0xaf, 0x71, 0xb3, 0x62, 0xd4, 0xc2, 0xf2, 0x43, 0x53, 0x4e, 0xf4, 0x32, 0xf6, 0x3a, 0x9, 0x1a}, - output384: []byte{0xbe, 0x60, 0x24, 0x6e, 0x27, 0x95, 0x9d, 0xc8, 0x6, 0x5c, 0x6d, 0x4d, 0xca, 0xc9, 0x3e, 0xb7, 0xf7, 0x14, 0x6b, 0x49, 0xc7, 0x59, 0xbf, 0x1d, 0xd5, 0xeb, 0xa4, 0x6a, 0x3e, 0xcf, 0x7, 0x47, 0x84, 0xa9, 0xdf, 0x18, 0xde, 0xab, 0x7a, 0x19, 0xaf, 0x7f, 0x62, 0x90, 0xcd, 0xac, 0xa8, 0x7b}, - output512: []byte{0x78, 0x2c, 0x0, 0x8a, 0x9e, 0xe3, 0xdd, 0xa0, 0xa1, 0x82, 0x26, 0x71, 0x85, 0xc9, 0x95, 0xa2, 0xaf, 0x73, 0x7b, 0xa8, 0xcb, 0x2f, 0x61, 0x79, 0xf2, 0xcd, 0xf5, 0x25, 0x5, 0xf8, 0xd9, 0x33, 0xe7, 0x12, 0xfc, 0x4e, 0x56, 0xd1, 0xe, 0x17, 0x5e, 0xc8, 0xcd, 0xd6, 0x2d, 0xe6, 0x52, 0x9c, 0xe1, 0xf0, 0x78, 0xbf, 0xa0, 0xdc, 0x7a, 0x52, 0x84, 0xf8, 0xc5, 0x65, 0x18, 0x2f, 0x85, 0xd9}}, - testcase{ - msg: []byte{0x64, 0x10, 0x5e, 0xca, 0x86, 0x35, 0x15, 0xc2, 0xe, 0x7c, 0xfb, 0xaa, 0xa, 0xb, 0x88, 0x9, 0x4, 0x61, 0x64, 0xf3, 0x74, 0xd6, 0x91, 0xcd, 0xbd, 0x65, 0x8, 0xaa, 0xab, 0xc1, 0x81, 0x9f, 0x9a, 0xc8, 0x4b, 0x52, 0xba, 0xfc, 0x1b, 0xf, 0xe7, 0xcd, 0xdb, 0xc5, 0x54, 0xb6, 0x8, 0xc0, 0x1c, 0x89, 0x4, 0xc6, 0x69, 0xd8, 0xdb, 0x31, 0x6a, 0x9, 0x53, 0xa4, 0xc6, 0x8e, 0xce, 0x32, 0x4e, 0xc5, 0xa4, 0x9f, 0xfd, 0xb5, 0x9a, 0x1b, 0xd6, 0xa2, 0x92, 0xaa, 0xe}, - output224: []byte{0xa3, 0x75, 0xd7, 0x56, 0xa8, 0xf3, 0x9c, 0x72, 0xf6, 0x7c, 0xa4, 0x89, 0xc9, 0x5f, 0x99, 0x35, 0xf, 0xfd, 0x5, 0x15, 0xb1, 0x51, 0xa3, 0xbf, 0xf2, 0x88, 0xca, 0xaa}, - output256: []byte{0xb5, 0x67, 0x51, 0x97, 0xe4, 0x9b, 0x35, 0x72, 0x18, 0xf7, 0x11, 0x8c, 0xd1, 0x5e, 0xe7, 0x73, 0xb3, 0x9b, 0xd5, 0x9b, 0x22, 0x4d, 0x9a, 0x45, 0xca, 0x71, 0xc6, 0xe3, 0x71, 0xd9, 0x38, 0xf1}, - output384: []byte{0x92, 0x35, 0xba, 0x18, 0xc5, 0x5e, 0x2c, 0xbc, 0xa0, 0xfb, 0x1d, 0xa3, 0xbc, 0x8d, 0xd, 0xfd, 0x84, 0x8c, 0xa0, 0xe5, 0x1d, 0xdc, 0x10, 0x20, 0xd4, 0xbe, 0xcc, 0xf, 0x13, 0x8d, 0xa1, 0x8, 0x79, 0x29, 0xfe, 0xc9, 0x3a, 0xf1, 0x6f, 0x5f, 0xb2, 0x9c, 0x4a, 0x77, 0x7d, 0xd9, 0x15, 0x48}, - output512: []byte{0x91, 0xa0, 0x24, 0x1e, 0xda, 0x8c, 0xa5, 0x97, 0xcb, 0xb0, 0xf7, 0x3, 0xab, 0x7d, 0xba, 0xaf, 0x85, 0x9c, 0xff, 0x77, 0xb2, 0x4, 0x1, 0xad, 0x46, 0x23, 0xc, 0xe3, 0xb2, 0xbe, 0xef, 0x66, 0x85, 0x77, 0x5d, 0xe3, 0x75, 0x76, 0x1, 0x4d, 0x8d, 0xa1, 0xba, 0x67, 0x2d, 0x47, 0xaa, 0xd9, 0x5f, 0xb5, 0x3c, 0x59, 0xb, 0x65, 0x6, 0x34, 0xce, 0xbb, 0x43, 0xa1, 0x75, 0x73, 0x85, 0x69}}, - testcase{ - msg: []byte{0xd4, 0x65, 0x4b, 0xe2, 0x88, 0xb9, 0xf3, 0xb7, 0x11, 0xc2, 0xd0, 0x20, 0x15, 0x97, 0x8a, 0x8c, 0xc5, 0x74, 0x71, 0xd5, 0x68, 0xa, 0x9, 0x2a, 0xa5, 0x34, 0xf7, 0x37, 0x2c, 0x71, 0xce, 0xaa, 0xb7, 0x25, 0xa3, 0x83, 0xc4, 0xfc, 0xf4, 0xd8, 0xde, 0xaa, 0x57, 0xfc, 0xa3, 0xce, 0x5, 0x6f, 0x31, 0x29, 0x61, 0xec, 0xcf, 0x9b, 0x86, 0xf1, 0x49, 0x81, 0xba, 0x5b, 0xed, 0x6a, 0xb5, 0xb4, 0x49, 0x8e, 0x1f, 0x6c, 0x82, 0xc6, 0xca, 0xe6, 0xfc, 0x14, 0x84, 0x5b, 0x3c, 0x8a}, - output224: []byte{0x1b, 0xd1, 0xb6, 0xf3, 0x14, 0x4a, 0x3d, 0xee, 0x93, 0xde, 0xa1, 0xdf, 0x3, 0xc0, 0xe9, 0x58, 0xf4, 0x85, 0xb8, 0xae, 0x16, 0x4d, 0xce, 0xe5, 0x5f, 0x97, 0x34, 0x13}, - output256: []byte{0xcd, 0x90, 0x38, 0xc1, 0x6, 0x6a, 0x59, 0x99, 0xd, 0xf5, 0x75, 0x21, 0x7, 0xb0, 0x66, 0xee, 0xbb, 0xe6, 0x72, 0xcb, 0xca, 0xf, 0x60, 0xd6, 0x87, 0xd0, 0x3a, 0x9d, 0x82, 0x19, 0x34, 0xbe}, - output384: []byte{0x8, 0x73, 0x9d, 0xd8, 0x66, 0xc6, 0x21, 0x6a, 0xdc, 0xa2, 0x6d, 0x61, 0x21, 0xe5, 0xd8, 0x1f, 0xdb, 0x1f, 0x7b, 0xcd, 0x48, 0x2, 0xc2, 0xb8, 0x11, 0xd7, 0x3c, 0x28, 0x22, 0x77, 0xd4, 0x1, 0x4b, 0x49, 0x36, 0xe5, 0x58, 0x9f, 0x62, 0x27, 0x9b, 0xb3, 0x30, 0x75, 0x70, 0x57, 0x95, 0xf8}, - output512: []byte{0x0, 0xb0, 0x2d, 0xbc, 0xb7, 0xa3, 0xbc, 0x11, 0x77, 0x1, 0xf2, 0xf1, 0x59, 0xfc, 0x44, 0x92, 0x92, 0x3c, 0x43, 0x7d, 0x33, 0x69, 0x83, 0x3a, 0x9b, 0xd0, 0x9e, 0x78, 0xe2, 0x60, 0xd4, 0x8d, 0x37, 0x16, 0x8d, 0x36, 0xc4, 0x97, 0x77, 0xb2, 0xe6, 0x8e, 0x6f, 0xe9, 0x84, 0x61, 0x6, 0xa6, 0xab, 0x87, 0x68, 0xc3, 0x97, 0x1f, 0xab, 0x31, 0xfd, 0x92, 0x2a, 0xac, 0xb8, 0x7d, 0x1c, 0xac}}, - testcase{ - msg: []byte{0x12, 0xd9, 0x39, 0x48, 0x88, 0x30, 0x5a, 0xc9, 0x6e, 0x65, 0xf2, 0xbf, 0xe, 0x1b, 0x18, 0xc2, 0x9c, 0x90, 0xfe, 0x9d, 0x71, 0x4d, 0xd5, 0x9f, 0x65, 0x1f, 0x52, 0xb8, 0x8b, 0x30, 0x8, 0xc5, 0x88, 0x43, 0x55, 0x48, 0x6, 0x6e, 0xa2, 0xfc, 0x4c, 0x10, 0x11, 0x18, 0xc9, 0x1f, 0x32, 0x55, 0x62, 0x24, 0xa5, 0x40, 0xde, 0x6e, 0xfd, 0xdb, 0xca, 0x29, 0x6e, 0xf1, 0xfb, 0x0, 0x34, 0x1f, 0x5b, 0x1, 0xfe, 0xcf, 0xc1, 0x46, 0xbd, 0xb2, 0x51, 0xb3, 0xbd, 0xad, 0x55, 0x6c, 0xd2}, - output224: []byte{0xbe, 0x88, 0xb4, 0x95, 0xd0, 0xcd, 0x90, 0x28, 0x1a, 0xf2, 0x9, 0x4b, 0x8d, 0x7e, 0x72, 0xeb, 0x41, 0x72, 0x88, 0xca, 0x16, 0xf7, 0x51, 0xc0, 0x96, 0x94, 0xb6, 0x82}, - output256: []byte{0xd3, 0x17, 0x2c, 0xa2, 0x63, 0xaf, 0xf2, 0xb9, 0xdb, 0x6f, 0xb1, 0x33, 0x37, 0xf2, 0x54, 0x3c, 0x5a, 0xf5, 0x11, 0x51, 0x80, 0x1a, 0x76, 0x19, 0x40, 0x12, 0xf7, 0x10, 0x30, 0x6c, 0x14, 0xf6}, - output384: []byte{0xd2, 0xa2, 0xe8, 0x58, 0xa5, 0xdd, 0x85, 0xd6, 0x2e, 0x6f, 0x51, 0xaf, 0x7e, 0x42, 0x35, 0x2a, 0xc0, 0xd7, 0xa6, 0x8a, 0x83, 0x54, 0x31, 0xbc, 0xca, 0x47, 0x55, 0x7e, 0x3b, 0x5c, 0x33, 0x73, 0xf4, 0xd, 0x3b, 0xaf, 0x85, 0xae, 0x41, 0x60, 0x12, 0xc7, 0xc9, 0x82, 0xb2, 0x32, 0x57, 0x90}, - output512: []byte{0x3d, 0xed, 0xf8, 0x19, 0xb3, 0x57, 0xdf, 0xab, 0x1c, 0x70, 0x92, 0xab, 0xd8, 0x72, 0xa1, 0x55, 0x4d, 0xd0, 0x96, 0x2e, 0x99, 0x44, 0xee, 0xf9, 0xf7, 0xf8, 0xbc, 0xe8, 0x30, 0xf2, 0xd7, 0x4f, 0x1d, 0x9b, 0xa2, 0xb7, 0x48, 0xbb, 0xc6, 0xee, 0xb, 0x76, 0x0, 0xbe, 0x8c, 0xb0, 0xff, 0xcb, 0x79, 0x92, 0x4d, 0x9f, 0x51, 0xcd, 0xb9, 0xb0, 0x6b, 0xd6, 0xfd, 0x37, 0xf3, 0x5, 0x2, 0x29}}, - testcase{ - msg: []byte{0x87, 0x1a, 0xd, 0x7a, 0x5f, 0x36, 0xc3, 0xda, 0x1d, 0xfc, 0xe5, 0x7a, 0xcd, 0x8a, 0xb8, 0x48, 0x7c, 0x27, 0x4f, 0xad, 0x33, 0x6b, 0xc1, 0x37, 0xeb, 0xd6, 0xff, 0x46, 0x58, 0xb5, 0x47, 0xc1, 0xdc, 0xfa, 0xb6, 0x5f, 0x3, 0x7a, 0xa5, 0x8f, 0x35, 0xef, 0x16, 0xaf, 0xf4, 0xab, 0xe7, 0x7b, 0xa6, 0x1f, 0x65, 0x82, 0x6f, 0x7b, 0xe6, 0x81, 0xb5, 0xb6, 0xd5, 0xa1, 0xea, 0x80, 0x85, 0xe2, 0xae, 0x9c, 0xd5, 0xcf, 0x9, 0x91, 0x87, 0x8a, 0x31, 0x1b, 0x54, 0x9a, 0x6d, 0x6a, 0xf2, 0x30}, - output224: []byte{0x7d, 0xac, 0x4, 0x62, 0x54, 0x80, 0x84, 0x64, 0x2, 0x46, 0x17, 0xd6, 0x3a, 0x3, 0x82, 0x67, 0xfe, 0x2c, 0xa6, 0x50, 0x52, 0xbd, 0xeb, 0x56, 0x9a, 0xa, 0x9c, 0x15}, - output256: []byte{0x9e, 0x3d, 0x4b, 0xcf, 0x58, 0xe, 0xec, 0xe3, 0x9b, 0xcf, 0x13, 0xe5, 0x71, 0x6e, 0x5b, 0xb8, 0xf5, 0xe8, 0xc3, 0xfc, 0x37, 0x23, 0xf6, 0x62, 0x46, 0xf8, 0x36, 0xd8, 0xdb, 0x12, 0x38, 0xf1}, - output384: []byte{0x29, 0x90, 0xd7, 0xea, 0x6, 0x8a, 0x3, 0x7, 0x4, 0x7b, 0x15, 0x1d, 0x5d, 0xd6, 0xb1, 0xb2, 0x35, 0x8a, 0x9e, 0xc8, 0xad, 0x9b, 0x6b, 0x82, 0x6c, 0xf1, 0xbe, 0xf3, 0x99, 0xd4, 0x88, 0xbd, 0x68, 0xd7, 0x7d, 0xf8, 0xbe, 0x99, 0xf7, 0xdf, 0x7a, 0xf1, 0x4a, 0xe0, 0xce, 0x63, 0x63, 0x79}, - output512: []byte{0x5f, 0xbe, 0x19, 0x45, 0x57, 0xb0, 0x42, 0x6f, 0x96, 0xba, 0x60, 0x71, 0x21, 0x76, 0xdf, 0x7, 0x3e, 0xaf, 0xe0, 0x4f, 0x2a, 0x50, 0x51, 0x54, 0x55, 0x41, 0x2e, 0xa3, 0xd8, 0xc, 0x11, 0x67, 0x58, 0xad, 0x95, 0x25, 0x98, 0xf4, 0x80, 0x31, 0x61, 0x21, 0x81, 0xd8, 0x2a, 0x16, 0xef, 0xe4, 0x66, 0x8f, 0xfb, 0x3b, 0xcc, 0xe9, 0x56, 0x3a, 0x77, 0x2f, 0xe4, 0x16, 0xff, 0x6d, 0xb3, 0xb3}}, - testcase{ - msg: []byte{0xe9, 0xb, 0x4f, 0xfe, 0xf4, 0xd4, 0x57, 0xbc, 0x77, 0x11, 0xff, 0x4a, 0xa7, 0x22, 0x31, 0xca, 0x25, 0xaf, 0x6b, 0x2e, 0x20, 0x6f, 0x8b, 0xf8, 0x59, 0xd8, 0x75, 0x8b, 0x89, 0xa7, 0xcd, 0x36, 0x10, 0x5d, 0xb2, 0x53, 0x8d, 0x6, 0xda, 0x83, 0xba, 0xd5, 0xf6, 0x63, 0xba, 0x11, 0xa5, 0xf6, 0xf6, 0x1f, 0x23, 0x6f, 0xd5, 0xf8, 0xd5, 0x3c, 0x5e, 0x89, 0xf1, 0x83, 0xa3, 0xce, 0xc6, 0x15, 0xb5, 0xc, 0x7c, 0x68, 0x1e, 0x77, 0x3d, 0x10, 0x9f, 0xf7, 0x49, 0x1b, 0x5c, 0xc2, 0x22, 0x96, 0xc5}, - output224: []byte{0x89, 0xf6, 0xb3, 0x20, 0xef, 0xab, 0xe4, 0x2c, 0xe1, 0x3c, 0x9e, 0x20, 0xe4, 0x82, 0x9f, 0x31, 0xa7, 0x84, 0x8e, 0xee, 0x3f, 0xc8, 0x54, 0xe6, 0x3, 0xfb, 0xd4, 0x6f}, - output256: []byte{0xed, 0xc2, 0xd3, 0xb4, 0x9c, 0x85, 0xb8, 0xdd, 0x75, 0xf7, 0xb5, 0x12, 0x8d, 0xa0, 0x4c, 0xd7, 0x6b, 0xf4, 0x87, 0x87, 0x79, 0xa0, 0x7, 0x7a, 0xf3, 0xf1, 0xd7, 0xfb, 0x44, 0xf1, 0x89, 0x31}, - output384: []byte{0x4b, 0x30, 0x87, 0xf8, 0x0, 0xe4, 0x8, 0x4d, 0x7f, 0x68, 0x57, 0x37, 0xac, 0x63, 0x5d, 0xb4, 0x59, 0xcf, 0x70, 0xc4, 0xfa, 0x86, 0x3c, 0x71, 0x1c, 0x11, 0x43, 0xcc, 0x10, 0xf0, 0xc4, 0xab, 0xa, 0x23, 0x70, 0xc0, 0x99, 0xfb, 0x28, 0x2f, 0x9c, 0x1c, 0xe5, 0xf0, 0x15, 0xbf, 0x3f, 0x79}, - output512: []byte{0x2e, 0x8a, 0xb1, 0x61, 0x98, 0x59, 0xc1, 0x14, 0x73, 0xdc, 0x7c, 0x47, 0x4c, 0xe8, 0xb0, 0xae, 0x44, 0xb1, 0xc3, 0x84, 0x17, 0x81, 0x6f, 0xd9, 0x5b, 0x9e, 0x6, 0x14, 0xf3, 0x1e, 0x51, 0xeb, 0xb1, 0xdd, 0x16, 0xd1, 0xcb, 0xb5, 0x84, 0xc4, 0xeb, 0xd2, 0x8a, 0xa9, 0x9f, 0x4a, 0x68, 0xe0, 0x9d, 0xfe, 0x3a, 0xd4, 0x62, 0x48, 0x7f, 0x26, 0x8, 0x12, 0x4b, 0x75, 0x28, 0x29, 0x30, 0x45}}, - testcase{ - msg: []byte{0xe7, 0x28, 0xde, 0x62, 0xd7, 0x58, 0x56, 0x50, 0xc, 0x4c, 0x77, 0xa4, 0x28, 0x61, 0x2c, 0xd8, 0x4, 0xf3, 0xc, 0x3f, 0x10, 0xd3, 0x6f, 0xb2, 0x19, 0xc5, 0xca, 0xa, 0xa3, 0x7, 0x26, 0xab, 0x19, 0xe, 0x5f, 0x3f, 0x27, 0x9e, 0x7, 0x33, 0xd7, 0x7e, 0x72, 0x67, 0xc1, 0x7b, 0xe2, 0x7d, 0x21, 0x65, 0xa, 0x9a, 0x4d, 0x1e, 0x32, 0xf6, 0x49, 0x62, 0x76, 0x38, 0xdb, 0xad, 0xa9, 0x70, 0x2c, 0x7c, 0xa3, 0x3, 0x26, 0x9e, 0xd1, 0x40, 0x14, 0xb2, 0xf3, 0xcf, 0x8b, 0x89, 0x4e, 0xac, 0x85, 0x54}, - output224: []byte{0xa8, 0x5, 0xdb, 0xd3, 0xb8, 0xdf, 0x5e, 0x3, 0xe0, 0x5e, 0xff, 0xfd, 0xe1, 0xb9, 0x4b, 0x35, 0xa2, 0x3c, 0x5d, 0x77, 0xc2, 0x79, 0x7d, 0x98, 0x4e, 0x56, 0x65, 0x6f}, - output256: []byte{0x80, 0xdc, 0xe7, 0xf0, 0x4d, 0xd6, 0xac, 0x17, 0xce, 0x70, 0x9b, 0x56, 0xcf, 0x6e, 0xa6, 0xc0, 0xa5, 0x71, 0x90, 0x64, 0x9b, 0xb1, 0x87, 0xb5, 0xe6, 0xd9, 0x5f, 0xa1, 0x81, 0x0, 0xc7, 0xac}, - output384: []byte{0x5d, 0x34, 0x7f, 0xdd, 0xb1, 0x18, 0xfd, 0x7d, 0xb2, 0x70, 0x89, 0x84, 0x7, 0x97, 0x9d, 0x2d, 0x15, 0x31, 0xd3, 0xff, 0x66, 0x42, 0xec, 0x4f, 0x22, 0x91, 0x7e, 0xbb, 0xed, 0xa6, 0xce, 0xe0, 0xfb, 0xd, 0xe1, 0x14, 0x32, 0xed, 0xdd, 0xfc, 0xbf, 0xe, 0x2a, 0xb9, 0xcf, 0xa6, 0x58, 0x4}, - output512: []byte{0xdb, 0x2d, 0x18, 0x2b, 0xdb, 0xac, 0x6a, 0xc8, 0x66, 0x53, 0x7e, 0x24, 0x71, 0x23, 0x32, 0xca, 0xe7, 0x4d, 0xc3, 0xd3, 0x61, 0x68, 0x98, 0x2e, 0x44, 0x53, 0xdd, 0x6e, 0x0, 0x96, 0x58, 0x34, 0x52, 0x55, 0x1, 0x3b, 0xc0, 0xa5, 0x4f, 0xca, 0x17, 0xae, 0xed, 0xcc, 0x4b, 0xeb, 0x79, 0xbd, 0xee, 0x19, 0x2c, 0xfa, 0xb5, 0x16, 0xd2, 0x45, 0x91, 0xc8, 0x69, 0x9f, 0x7c, 0x75, 0x81, 0x79}}, - testcase{ - msg: []byte{0x63, 0x48, 0xf2, 0x29, 0xe7, 0xb1, 0xdf, 0x3b, 0x77, 0xc, 0x77, 0x54, 0x4e, 0x51, 0x66, 0xe0, 0x81, 0x85, 0xf, 0xa1, 0xc6, 0xc8, 0x81, 0x69, 0xdb, 0x74, 0xc7, 0x6e, 0x42, 0xeb, 0x98, 0x3f, 0xac, 0xb2, 0x76, 0xad, 0x6a, 0xd, 0x1f, 0xa7, 0xb5, 0xd, 0x3e, 0x3b, 0x6f, 0xcd, 0x79, 0x9e, 0xc9, 0x74, 0x70, 0x92, 0xa, 0x7a, 0xbe, 0xd4, 0x7d, 0x28, 0x8f, 0xf8, 0x83, 0xe2, 0x4c, 0xa2, 0x1c, 0x7f, 0x80, 0x16, 0xb9, 0x3b, 0xb9, 0xb9, 0xe0, 0x78, 0xbd, 0xb9, 0x70, 0x3d, 0x2b, 0x78, 0x1b, 0x61, 0x6e}, - output224: []byte{0xf0, 0x57, 0x42, 0xcc, 0x1d, 0xb4, 0x22, 0xa3, 0x11, 0x3a, 0xc4, 0x96, 0x2, 0xe8, 0xd0, 0xdd, 0x6c, 0xb4, 0x72, 0xe7, 0xed, 0x26, 0xbc, 0xe4, 0xb, 0xba, 0x9, 0xbd}, - output256: []byte{0x49, 0xbb, 0xd5, 0x43, 0x5d, 0x27, 0x6, 0xf8, 0x5f, 0xe7, 0x7b, 0x84, 0xa5, 0xfa, 0x15, 0xdd, 0xd8, 0x25, 0x9e, 0x5d, 0x2c, 0x20, 0xfb, 0x94, 0x7f, 0x13, 0x93, 0x73, 0xe5, 0xc8, 0x61, 0x21}, - output384: []byte{0x95, 0x46, 0x37, 0xb8, 0x7f, 0xdc, 0xc4, 0x84, 0xf2, 0xb6, 0x1f, 0x7f, 0x42, 0x55, 0x80, 0x68, 0x2, 0x9f, 0x96, 0x9, 0x9c, 0x1d, 0x6b, 0x92, 0x46, 0x58, 0x50, 0x92, 0xea, 0xe6, 0x89, 0x24, 0xe5, 0x44, 0x1b, 0x45, 0x2, 0x72, 0x48, 0xa2, 0x72, 0x88, 0x33, 0x16, 0x9b, 0xfa, 0x50, 0x4}, - output512: []byte{0x90, 0xa2, 0xc0, 0x5f, 0x70, 0x1, 0xd9, 0x85, 0xb5, 0x87, 0xa0, 0x46, 0xb4, 0x88, 0xbf, 0x4e, 0xd2, 0x9d, 0x75, 0xcc, 0x3, 0xa7, 0x45, 0x73, 0x1b, 0x5b, 0xc, 0xe5, 0x1b, 0xb8, 0x63, 0x87, 0xc4, 0xce, 0x34, 0x1, 0x8a, 0x6d, 0x90, 0x6e, 0xb7, 0xbe, 0xb4, 0x1a, 0x9, 0xaf, 0xe9, 0xfe, 0xdd, 0x99, 0xaa, 0xcc, 0x41, 0xb4, 0x55, 0x6f, 0x75, 0x22, 0x9c, 0x86, 0x88, 0xc7, 0xfc, 0xa2}}, - testcase{ - msg: []byte{0x4b, 0x12, 0x7f, 0xde, 0x5d, 0xe7, 0x33, 0xa1, 0x68, 0xc, 0x27, 0x90, 0x36, 0x36, 0x27, 0xe6, 0x3a, 0xc8, 0xa3, 0xf1, 0xb4, 0x70, 0x7d, 0x98, 0x2c, 0xae, 0xa2, 0x58, 0x65, 0x5d, 0x9b, 0xf1, 0x8f, 0x89, 0xaf, 0xe5, 0x41, 0x27, 0x48, 0x2b, 0xa0, 0x1e, 0x8, 0x84, 0x55, 0x94, 0xb6, 0x71, 0x30, 0x6a, 0x2, 0x5c, 0x9a, 0x5c, 0x5b, 0x6f, 0x93, 0xb0, 0xa3, 0x95, 0x22, 0xdc, 0x87, 0x74, 0x37, 0xbe, 0x5c, 0x24, 0x36, 0xcb, 0xf3, 0x0, 0xce, 0x7a, 0xb6, 0x74, 0x79, 0x34, 0xfc, 0xfc, 0x30, 0xae, 0xaa, 0xf6}, - output224: []byte{0x45, 0x94, 0x5f, 0x86, 0x7b, 0x7e, 0x1e, 0x75, 0xee, 0x49, 0x6e, 0xf, 0xc4, 0xaa, 0xff, 0x71, 0xa0, 0xcc, 0x53, 0x98, 0x41, 0xd1, 0x53, 0x43, 0x9a, 0xed, 0x4d, 0xfc}, - output256: []byte{0x6b, 0x6c, 0x11, 0xf9, 0x73, 0x1d, 0x60, 0x78, 0x9d, 0x71, 0x3d, 0xaf, 0x53, 0xd2, 0xeb, 0x10, 0xab, 0x9c, 0xcf, 0x15, 0x43, 0xe, 0xa5, 0xd1, 0x24, 0x9b, 0xe0, 0x6e, 0xdf, 0xe2, 0xbf, 0xf6}, - output384: []byte{0x78, 0x72, 0x6e, 0x91, 0xac, 0x31, 0x1f, 0x4d, 0x10, 0x47, 0x6, 0x36, 0x2b, 0x3, 0x14, 0xc2, 0x43, 0xcd, 0x81, 0x64, 0x41, 0x25, 0x88, 0x1f, 0xbc, 0x3, 0x67, 0x2, 0x10, 0xc8, 0x9f, 0xb8, 0xe7, 0xbf, 0xf6, 0xc6, 0x1f, 0xf6, 0x8b, 0x23, 0x4c, 0x31, 0x71, 0xf1, 0x6b, 0x39, 0x8f, 0x36}, - output512: []byte{0xea, 0x39, 0x91, 0xc4, 0xa8, 0xa5, 0xf0, 0x14, 0x64, 0x2, 0xde, 0x4a, 0xe2, 0x35, 0x5, 0x4c, 0x78, 0xa4, 0x8d, 0xca, 0x34, 0xa, 0x7d, 0x4a, 0xd8, 0x75, 0x39, 0x95, 0xf8, 0x23, 0x47, 0xec, 0xfc, 0x0, 0x54, 0xd6, 0x4e, 0xb4, 0xf2, 0xa, 0xbc, 0x4f, 0x41, 0x5c, 0x54, 0x70, 0x1c, 0xbc, 0x61, 0xa7, 0xb2, 0x39, 0xa7, 0xc2, 0x21, 0xb8, 0x33, 0xd9, 0xea, 0x9f, 0x94, 0xb1, 0x54, 0xe8}}, - testcase{ - msg: []byte{0x8, 0x46, 0x1f, 0x0, 0x6c, 0xff, 0x4c, 0xc6, 0x4b, 0x75, 0x2c, 0x95, 0x72, 0x87, 0xe5, 0xa0, 0xfa, 0xab, 0xc0, 0x5c, 0x9b, 0xff, 0x89, 0xd2, 0x3f, 0xd9, 0x2, 0xd3, 0x24, 0xc7, 0x99, 0x3, 0xb4, 0x8f, 0xcb, 0x8f, 0x8f, 0x4b, 0x1, 0xf3, 0xe4, 0xdd, 0xb4, 0x83, 0x59, 0x3d, 0x25, 0xf0, 0x0, 0x38, 0x66, 0x98, 0xf5, 0xad, 0xe7, 0xfa, 0xad, 0xe9, 0x61, 0x5f, 0xdc, 0x50, 0xd3, 0x27, 0x85, 0xea, 0x51, 0xd4, 0x98, 0x94, 0xe4, 0x5b, 0xaa, 0x3d, 0xc7, 0x7, 0xe2, 0x24, 0x68, 0x8c, 0x64, 0x8, 0xb6, 0x8b, 0x11}, - output224: []byte{0x5a, 0x8a, 0xc7, 0x53, 0x3e, 0x13, 0x54, 0x6, 0x8b, 0x56, 0x4c, 0xcd, 0x21, 0x4e, 0xb2, 0xa2, 0xe0, 0x97, 0xdd, 0x60, 0xe0, 0x8b, 0xd6, 0x9f, 0xc7, 0x82, 0xb0, 0xaf}, - output256: []byte{0x7e, 0x73, 0x8e, 0x8e, 0xb3, 0xd4, 0x7d, 0x18, 0xe9, 0x7d, 0x87, 0xc7, 0xb3, 0xfc, 0x68, 0x1f, 0x86, 0x41, 0x78, 0x83, 0xce, 0xd9, 0x2b, 0xa9, 0x3c, 0x30, 0x77, 0x81, 0x2b, 0xbd, 0x17, 0xe7}, - output384: []byte{0x80, 0x76, 0x3f, 0xb5, 0x46, 0x88, 0xf1, 0x22, 0x26, 0x94, 0x30, 0x98, 0xa, 0xa3, 0xab, 0xe0, 0x90, 0x91, 0x2, 0xb, 0x8c, 0xfa, 0x6b, 0xde, 0xe, 0xdc, 0x2c, 0x63, 0xae, 0xd8, 0xb8, 0xba, 0x9, 0x7c, 0xdb, 0x79, 0xb8, 0xfc, 0x7f, 0x51, 0x17, 0x50, 0x8f, 0xca, 0x48, 0x64, 0xa1, 0x4d}, - output512: []byte{0x13, 0x13, 0x2, 0x3b, 0x75, 0x3e, 0xd1, 0x72, 0x7f, 0x13, 0xcc, 0x67, 0xa6, 0x4b, 0x98, 0x9a, 0x8b, 0xf6, 0x54, 0x83, 0x24, 0xdf, 0x98, 0x54, 0xd8, 0xd5, 0xa9, 0x63, 0xed, 0x3d, 0x86, 0x2, 0x57, 0xfe, 0x65, 0x22, 0xb9, 0xc6, 0xd6, 0xcb, 0x1b, 0xca, 0xdf, 0x32, 0x2c, 0x98, 0x56, 0x1, 0xba, 0x36, 0xf7, 0xe6, 0x71, 0x10, 0x19, 0x20, 0x94, 0xaa, 0x8f, 0x98, 0x69, 0xa4, 0x58, 0xa8}}, - testcase{ - msg: []byte{0x68, 0xc8, 0xf8, 0x84, 0x9b, 0x12, 0xe, 0x6e, 0xc, 0x99, 0x69, 0xa5, 0x86, 0x6a, 0xf5, 0x91, 0xa8, 0x29, 0xb9, 0x2f, 0x33, 0xcd, 0x9a, 0x4a, 0x31, 0x96, 0x95, 0x7a, 0x14, 0x8c, 0x49, 0x13, 0x8e, 0x1e, 0x2f, 0x5c, 0x76, 0x19, 0xa6, 0xd5, 0xed, 0xeb, 0xe9, 0x95, 0xac, 0xd8, 0x1e, 0xc8, 0xbb, 0x9c, 0x7b, 0x9c, 0xfc, 0xa6, 0x78, 0xd0, 0x81, 0xea, 0x9e, 0x25, 0xa7, 0x5d, 0x39, 0xdb, 0x4, 0xe1, 0x8d, 0x47, 0x59, 0x20, 0xce, 0x82, 0x8b, 0x94, 0xe7, 0x22, 0x41, 0xf2, 0x4d, 0xb7, 0x25, 0x46, 0xb3, 0x52, 0xa0, 0xe4}, - output224: []byte{0x5, 0x9f, 0x7e, 0xb9, 0x83, 0x36, 0x2f, 0xd4, 0x4e, 0x94, 0xe2, 0xbf, 0xd5, 0x9c, 0xce, 0xd4, 0x3c, 0xae, 0x95, 0x9c, 0x9a, 0x48, 0x3e, 0xbd, 0x5e, 0x6e, 0x20, 0x36}, - output256: []byte{0xa2, 0x78, 0xba, 0x93, 0xba, 0xd, 0x7c, 0xd2, 0x67, 0x7b, 0xe0, 0x8c, 0x9d, 0xfc, 0x5f, 0x51, 0x6a, 0x37, 0xf7, 0x22, 0xbb, 0x6, 0x56, 0x5f, 0xa2, 0x25, 0x0, 0xf6, 0x6f, 0xe0, 0x31, 0xa9}, - output384: []byte{0x80, 0x44, 0x75, 0x83, 0x26, 0x2d, 0xed, 0x3, 0x7d, 0xa8, 0x8f, 0x3b, 0x98, 0x69, 0x8b, 0xd8, 0xf7, 0xae, 0xd7, 0xd9, 0xbf, 0x4d, 0x99, 0xf8, 0x13, 0x2e, 0xc3, 0xe7, 0xd1, 0x6b, 0xb8, 0x44, 0xad, 0xad, 0x18, 0x87, 0x57, 0xce, 0xb3, 0x2b, 0x35, 0x9c, 0x56, 0xe5, 0x0, 0x7e, 0xa3, 0xe4}, - output512: []byte{0x9b, 0xca, 0x2a, 0x1a, 0x55, 0x46, 0xa1, 0x12, 0x75, 0xbf, 0x42, 0xf0, 0xb4, 0x84, 0x92, 0x86, 0x83, 0x59, 0xc7, 0x8d, 0x94, 0x78, 0x5a, 0xe, 0xe1, 0x2d, 0xc1, 0xc3, 0xd7, 0xa, 0x8e, 0x97, 0xeb, 0x46, 0x21, 0x48, 0xfa, 0xed, 0x1f, 0xfa, 0x4d, 0xab, 0xe, 0x91, 0x51, 0x9b, 0xd3, 0x6c, 0xc, 0x5c, 0x5f, 0xe7, 0xcf, 0xcf, 0xf3, 0xe1, 0x80, 0x68, 0x3, 0x18, 0xe1, 0xfc, 0xf7, 0x5b}}, - testcase{ - msg: []byte{0xb8, 0xd5, 0x64, 0x72, 0x95, 0x4e, 0x31, 0xfb, 0x54, 0xe2, 0x8f, 0xca, 0x74, 0x3f, 0x84, 0xd8, 0xdc, 0x34, 0x89, 0x1c, 0xb5, 0x64, 0xc6, 0x4b, 0x8, 0xf7, 0xb7, 0x16, 0x36, 0xde, 0xbd, 0x64, 0xca, 0x1e, 0xdb, 0xdb, 0xa7, 0xfc, 0x5c, 0x3e, 0x40, 0x4, 0x9c, 0xe9, 0x82, 0xbb, 0xa8, 0xc7, 0xe0, 0x70, 0x30, 0x34, 0xe3, 0x31, 0x38, 0x46, 0x95, 0xe9, 0xde, 0x76, 0xb5, 0x10, 0x4f, 0x2f, 0xbc, 0x45, 0x35, 0xec, 0xbe, 0xeb, 0xc3, 0x3b, 0xc2, 0x7f, 0x29, 0xf1, 0x8f, 0x6f, 0x27, 0xe8, 0x2, 0x3b, 0xf, 0xbb, 0x6f, 0x56, 0x3c}, - output224: []byte{0x22, 0xd6, 0x2a, 0xd2, 0x72, 0xfe, 0xfc, 0x89, 0xf7, 0x32, 0x56, 0xea, 0xac, 0xe0, 0xc, 0x7b, 0x8e, 0x99, 0x8f, 0xb3, 0x22, 0xc8, 0xeb, 0x67, 0xdc, 0x1e, 0xac, 0x6a}, - output256: []byte{0x9c, 0xa, 0x9f, 0xd, 0xa1, 0x13, 0xd3, 0x9f, 0x49, 0x1b, 0x7d, 0xa6, 0xc4, 0xda, 0x5d, 0x84, 0xfe, 0x1c, 0xc4, 0x63, 0x67, 0xe5, 0xac, 0xc4, 0x33, 0xca, 0x3e, 0x5, 0x0, 0x95, 0x17, 0x38}, - output384: []byte{0xe5, 0xfb, 0x4a, 0xe5, 0xdd, 0xfb, 0x4c, 0xe8, 0x22, 0x1d, 0xf4, 0xbe, 0x70, 0x24, 0xb, 0x76, 0x85, 0x1e, 0x55, 0xfa, 0xe8, 0x6b, 0xaf, 0x35, 0xba, 0xd9, 0xe7, 0x17, 0x9e, 0x24, 0xc9, 0x5d, 0xa6, 0xf0, 0xf0, 0x69, 0x5a, 0x8a, 0x52, 0x91, 0xa2, 0x39, 0x4b, 0x92, 0xa6, 0xff, 0x7b, 0x7c}, - output512: []byte{0x84, 0x92, 0xf5, 0xe6, 0x21, 0xe8, 0x2f, 0xdb, 0xff, 0x19, 0x76, 0xb1, 0xbe, 0xec, 0xff, 0x7d, 0x13, 0x78, 0x5, 0xb5, 0x73, 0x6a, 0xb4, 0x92, 0x16, 0x12, 0x2a, 0x95, 0x39, 0x6b, 0x86, 0x3a, 0x4, 0x81, 0x21, 0x2b, 0x6d, 0xab, 0xa8, 0xb0, 0x5e, 0x29, 0xe2, 0x87, 0xbb, 0xe, 0x2f, 0x58, 0x8f, 0x86, 0x40, 0x7c, 0x84, 0xdb, 0xfb, 0x89, 0x4e, 0x6a, 0xcf, 0xc6, 0xf6, 0xb2, 0xe5, 0x71}}, - testcase{ - msg: []byte{0xd, 0x58, 0xac, 0x66, 0x5f, 0xa8, 0x43, 0x42, 0xe6, 0xc, 0xef, 0xee, 0x31, 0xb1, 0xa4, 0xea, 0xcd, 0xb0, 0x92, 0xf1, 0x22, 0xdf, 0xc6, 0x83, 0x9, 0x7, 0x7a, 0xed, 0x1f, 0x3e, 0x52, 0x8f, 0x57, 0x88, 0x59, 0xee, 0x9e, 0x4c, 0xef, 0xb4, 0xa7, 0x28, 0xe9, 0x46, 0x32, 0x49, 0x27, 0xb6, 0x75, 0xcd, 0x4f, 0x4a, 0xc8, 0x4f, 0x64, 0xdb, 0x3d, 0xac, 0xfe, 0x85, 0xc, 0x1d, 0xd1, 0x87, 0x44, 0xc7, 0x4c, 0xec, 0xcd, 0x9f, 0xe4, 0xdc, 0x21, 0x40, 0x85, 0x10, 0x8f, 0x40, 0x4e, 0xab, 0x6d, 0x8f, 0x45, 0x2b, 0x54, 0x42, 0xa4, 0x7d}, - output224: []byte{0xa3, 0x96, 0xea, 0x90, 0x5e, 0xb6, 0x12, 0x55, 0x4b, 0xd0, 0xe, 0x4f, 0xc1, 0xbb, 0x4c, 0x52, 0x47, 0xd7, 0x3f, 0xde, 0x4b, 0xba, 0xf5, 0x38, 0xe, 0xd4, 0x2d, 0xd0}, - output256: []byte{0x6b, 0xed, 0x49, 0x6d, 0x2, 0xfe, 0x4c, 0xc2, 0x7d, 0x96, 0xdc, 0xee, 0xd1, 0x4a, 0x67, 0xda, 0x7b, 0xdf, 0x75, 0xe1, 0x9b, 0x62, 0x48, 0x96, 0xdf, 0xf6, 0xb0, 0xb6, 0x8e, 0x4f, 0xcc, 0x12}, - output384: []byte{0xce, 0x6b, 0x7, 0xc0, 0xc7, 0xda, 0x2f, 0xa1, 0xe6, 0xca, 0x5, 0xde, 0x6, 0x52, 0xfc, 0x9f, 0x1f, 0x45, 0x2f, 0xc2, 0x61, 0xe7, 0x3e, 0x52, 0x45, 0x7c, 0x72, 0xbf, 0xd, 0x51, 0xba, 0xc7, 0xd6, 0x61, 0x60, 0xcf, 0xf1, 0x6d, 0x6a, 0x3, 0x52, 0x79, 0x82, 0xe7, 0xd4, 0x39, 0x35, 0x7}, - output512: []byte{0xee, 0xbe, 0x4e, 0xc0, 0xfe, 0x3e, 0x2, 0x66, 0x52, 0x7f, 0x4d, 0x9f, 0x57, 0xa0, 0x17, 0x63, 0x7e, 0xab, 0x92, 0x37, 0x7d, 0x82, 0xb1, 0x58, 0x56, 0xa5, 0x5a, 0x22, 0xb0, 0x8, 0xdf, 0x67, 0xf2, 0x7a, 0xa5, 0xac, 0x4, 0xe1, 0xde, 0xee, 0xb2, 0xc8, 0x19, 0xce, 0x41, 0xdb, 0x7, 0xdb, 0xf6, 0xdc, 0xaf, 0x17, 0xa1, 0x92, 0xa4, 0x37, 0x1a, 0x1e, 0x92, 0xba, 0xdf, 0x1e, 0x63, 0x89}}, - testcase{ - msg: []byte{0x17, 0x55, 0xe2, 0xd2, 0xe5, 0xd1, 0xc1, 0xb0, 0x15, 0x64, 0x56, 0xb5, 0x39, 0x75, 0x3f, 0xf4, 0x16, 0x65, 0x1d, 0x44, 0x69, 0x8e, 0x87, 0x0, 0x2d, 0xcf, 0x61, 0xdc, 0xfa, 0x2b, 0x4e, 0x72, 0xf2, 0x64, 0xd9, 0xad, 0x59, 0x1d, 0xf1, 0xfd, 0xee, 0x7b, 0x41, 0xb2, 0xeb, 0x0, 0x28, 0x3c, 0x5a, 0xeb, 0xb3, 0x41, 0x13, 0x23, 0xb6, 0x72, 0xea, 0xa1, 0x45, 0xc5, 0x12, 0x51, 0x85, 0x10, 0x4f, 0x20, 0xf3, 0x35, 0x80, 0x4b, 0x2, 0x32, 0x5b, 0x6d, 0xea, 0x65, 0x60, 0x3f, 0x34, 0x9f, 0x4d, 0x5d, 0x8b, 0x78, 0x2d, 0xd3, 0x46, 0x9c, 0xcd}, - output224: []byte{0xd8, 0xb5, 0xb2, 0x4b, 0x9e, 0x92, 0x32, 0x6f, 0xde, 0x5d, 0xb1, 0x5, 0x8e, 0xed, 0xbe, 0xed, 0xb0, 0xb6, 0x59, 0x82, 0x92, 0x57, 0x34, 0xb6, 0xe2, 0x84, 0x40, 0x36}, - output256: []byte{0xec, 0xd2, 0xe3, 0xfa, 0xf4, 0xba, 0x4d, 0xd6, 0x7e, 0x5a, 0x86, 0x56, 0xce, 0xbe, 0xbd, 0xb2, 0x46, 0x11, 0x61, 0x16, 0x78, 0xe9, 0x2e, 0xb6, 0xf, 0x7c, 0xbd, 0x31, 0x11, 0xd0, 0xa3, 0x45}, - output384: []byte{0xfa, 0x76, 0xe0, 0x5f, 0x8d, 0x28, 0x32, 0xda, 0xdf, 0xeb, 0xa0, 0x10, 0x7a, 0x31, 0x37, 0xb7, 0xb9, 0xd4, 0xd1, 0x9a, 0x77, 0xa1, 0xe7, 0x8f, 0x8b, 0xbf, 0xec, 0xda, 0x7e, 0xf4, 0x64, 0x14, 0xc3, 0x63, 0x45, 0x3e, 0x8c, 0x49, 0x2, 0xc3, 0x2, 0xa4, 0xe1, 0x8c, 0xea, 0x4b, 0xa1, 0x57}, - output512: []byte{0x9e, 0x36, 0xe6, 0x29, 0x1b, 0xc2, 0x29, 0x6c, 0xb4, 0xba, 0x71, 0x10, 0x9c, 0xed, 0xcc, 0x2a, 0x3f, 0xb, 0x4f, 0x1a, 0xe5, 0xe5, 0x40, 0x6d, 0xc4, 0xb3, 0xe5, 0x94, 0x55, 0x1d, 0x5c, 0x70, 0xe6, 0xf8, 0x14, 0xd2, 0xc9, 0xb8, 0x41, 0x31, 0x3, 0xef, 0x7, 0x53, 0x58, 0x86, 0xb4, 0xac, 0x51, 0x8a, 0xaf, 0x7a, 0xed, 0x64, 0xab, 0xed, 0x7a, 0x5b, 0xa, 0x26, 0xf7, 0x17, 0x14, 0x25}}, - testcase{ - msg: []byte{0xb1, 0x80, 0xde, 0x1a, 0x61, 0x11, 0x11, 0xee, 0x75, 0x84, 0xba, 0x2c, 0x4b, 0x2, 0x5, 0x98, 0xcd, 0x57, 0x4a, 0xc7, 0x7e, 0x40, 0x4e, 0x85, 0x3d, 0x15, 0xa1, 0x1, 0xc6, 0xf5, 0xa2, 0xe5, 0xc8, 0x1, 0xd7, 0xd8, 0x5d, 0xc9, 0x52, 0x86, 0xa1, 0x80, 0x4c, 0x87, 0xb, 0xb9, 0xf0, 0xf, 0xd4, 0xdc, 0xb0, 0x3a, 0xa8, 0x32, 0x82, 0x75, 0x15, 0x88, 0x19, 0xdc, 0xad, 0x72, 0x53, 0xf3, 0xe3, 0xd2, 0x37, 0xae, 0xaa, 0x79, 0x79, 0x26, 0x8a, 0x5d, 0xb1, 0xc6, 0xce, 0x8, 0xa9, 0xec, 0x7c, 0x25, 0x79, 0x78, 0x3c, 0x8a, 0xfc, 0x1f, 0x91, 0xa7}, - output224: []byte{0xfd, 0xb9, 0x1, 0x5b, 0x20, 0xdb, 0x44, 0x6f, 0x79, 0x57, 0x5e, 0x6b, 0x8c, 0x73, 0xa9, 0x8e, 0xac, 0x73, 0x1c, 0xfe, 0x2e, 0x59, 0xbd, 0x46, 0xdb, 0xda, 0xe, 0x35}, - output256: []byte{0x63, 0x4a, 0x95, 0xa7, 0xe8, 0xba, 0x58, 0xf7, 0x81, 0x8a, 0x13, 0x90, 0x3e, 0xc8, 0xf3, 0x41, 0x1b, 0x6e, 0xcb, 0x7e, 0x38, 0x9e, 0xc9, 0xaa, 0x97, 0xc0, 0xec, 0xf8, 0x7f, 0xad, 0xd5, 0x88}, - output384: []byte{0x1b, 0x43, 0xb7, 0xb, 0x6b, 0xbb, 0xc7, 0x68, 0xc1, 0xf4, 0xb3, 0xce, 0x24, 0x16, 0x67, 0xad, 0xb5, 0x24, 0x6d, 0x29, 0x98, 0x17, 0x23, 0x84, 0x61, 0x68, 0xd2, 0x23, 0x4e, 0x19, 0xa5, 0x13, 0xb, 0x1f, 0x57, 0x6b, 0x49, 0x74, 0xc6, 0x13, 0x63, 0x9a, 0x44, 0x9e, 0x61, 0xb2, 0xca, 0x79}, - output512: []byte{0xf1, 0x8, 0x94, 0x83, 0xa0, 0xb, 0x26, 0x1, 0xbe, 0x9c, 0x16, 0x46, 0x9a, 0x9, 0xe, 0xfc, 0x49, 0xfc, 0xb7, 0xe, 0x62, 0xac, 0xf, 0xfe, 0xa2, 0xd1, 0xe5, 0x8, 0x8, 0x3c, 0xd5, 0xd4, 0x1d, 0xcf, 0x2d, 0xaa, 0xe1, 0xe0, 0xea, 0xc2, 0x17, 0x85, 0x9e, 0x5f, 0xea, 0xdd, 0xcb, 0x78, 0x2a, 0xc4, 0x71, 0xc0, 0x1d, 0x72, 0x66, 0x13, 0x61, 0x85, 0xd3, 0x7b, 0x56, 0x8e, 0x96, 0x6}}, - testcase{ - msg: []byte{0xcf, 0x35, 0x83, 0xcb, 0xdf, 0xd4, 0xcb, 0xc1, 0x70, 0x63, 0xb1, 0xe7, 0xd9, 0xb, 0x2, 0xf0, 0xe6, 0xe2, 0xee, 0x5, 0xf9, 0x9d, 0x77, 0xe2, 0x4e, 0x56, 0x3, 0x92, 0x53, 0x5e, 0x47, 0xe0, 0x50, 0x77, 0x15, 0x7f, 0x96, 0x81, 0x35, 0x44, 0xa1, 0x70, 0x46, 0x91, 0x4f, 0x9e, 0xfb, 0x64, 0x76, 0x2a, 0x23, 0xcf, 0x7a, 0x49, 0xfe, 0x52, 0xa0, 0xa4, 0xc0, 0x1c, 0x63, 0xc, 0xfe, 0x87, 0x27, 0xb8, 0x1f, 0xb9, 0x9a, 0x89, 0xff, 0x7c, 0xc1, 0x1d, 0xca, 0x51, 0x73, 0x5, 0x7e, 0x4, 0x17, 0xb8, 0xfe, 0x7a, 0x9e, 0xfb, 0xa6, 0xd9, 0x5c, 0x55, 0x5f}, - output224: []byte{0xdf, 0x1b, 0x47, 0xe7, 0x3e, 0x8c, 0xbd, 0x2c, 0xa8, 0x52, 0xcf, 0x58, 0xad, 0x68, 0xb5, 0xf8, 0xba, 0xa1, 0x16, 0x9c, 0x7, 0x95, 0x96, 0x10, 0x41, 0xe8, 0xa9, 0x18}, - output256: []byte{0xa0, 0xfe, 0x35, 0x2b, 0xa2, 0x38, 0x9b, 0x4, 0x30, 0xed, 0xbe, 0x12, 0x1, 0x3, 0x2e, 0xb0, 0x9c, 0x25, 0x55, 0x14, 0xc5, 0xc5, 0xb5, 0x29, 0xc4, 0xba, 0xaf, 0xce, 0xb1, 0xac, 0x98, 0x17}, - output384: []byte{0x93, 0x82, 0x52, 0x39, 0x3a, 0x53, 0x2d, 0x9e, 0x1f, 0x91, 0xd5, 0xc2, 0x22, 0xe2, 0xdf, 0x2c, 0xc7, 0xae, 0x10, 0x27, 0x5, 0xbf, 0xb8, 0x3f, 0xe3, 0xd, 0xca, 0xeb, 0xce, 0xa8, 0x2b, 0xff, 0x9b, 0xda, 0x7c, 0xa6, 0x70, 0x95, 0x43, 0x98, 0x59, 0x14, 0x66, 0x32, 0x49, 0x4d, 0x3c, 0xe4}, - output512: []byte{0xd0, 0x63, 0xea, 0x79, 0x4c, 0xfd, 0x2e, 0xd9, 0x24, 0x86, 0x65, 0xa6, 0x8, 0x4a, 0x7b, 0x99, 0x5, 0x1c, 0x10, 0x51, 0xe4, 0x1b, 0x7d, 0x9d, 0xcb, 0x15, 0x37, 0xa1, 0xc7, 0x9c, 0xba, 0x6d, 0xeb, 0x4d, 0x84, 0x4c, 0x6a, 0x61, 0x8e, 0x43, 0xc7, 0xca, 0x2, 0xd, 0x16, 0x97, 0x69, 0x99, 0x68, 0x4f, 0xeb, 0x8, 0x46, 0x16, 0xf7, 0x7, 0x20, 0x9f, 0x75, 0xc4, 0xbd, 0x58, 0x4d, 0x86}}, - testcase{ - msg: []byte{0x7, 0x2f, 0xc0, 0x23, 0x40, 0xef, 0x99, 0x11, 0x5b, 0xad, 0x72, 0xf9, 0x2c, 0x1, 0xe4, 0xc0, 0x93, 0xb9, 0x59, 0x9f, 0x6c, 0xfc, 0x45, 0xcb, 0x38, 0xe, 0xe6, 0x86, 0xcb, 0x5e, 0xb0, 0x19, 0xe8, 0x6, 0xab, 0x9b, 0xd5, 0x5e, 0x63, 0x4a, 0xb1, 0xa, 0xa6, 0x2a, 0x95, 0x10, 0xcc, 0x6, 0x72, 0xcd, 0x3e, 0xdd, 0xb5, 0x89, 0xc7, 0xdf, 0x2b, 0x67, 0xfc, 0xd3, 0x32, 0x9f, 0x61, 0xb1, 0xa4, 0x44, 0x1e, 0xca, 0x87, 0xa3, 0x3c, 0x8f, 0x55, 0xda, 0x4f, 0xbb, 0xad, 0x5c, 0xf2, 0xb2, 0x52, 0x7b, 0x8e, 0x98, 0x3b, 0xb3, 0x1a, 0x2f, 0xad, 0xec, 0x75, 0x23}, - output224: []byte{0x1e, 0x8a, 0x90, 0x91, 0x8d, 0x6e, 0xad, 0x31, 0xe4, 0x46, 0xd4, 0xee, 0x26, 0x73, 0x87, 0x1e, 0xcc, 0x5c, 0x7d, 0xa9, 0xb1, 0x8e, 0xd5, 0x11, 0xe1, 0x63, 0x2e, 0xd}, - output256: []byte{0x9a, 0xb, 0xfe, 0x14, 0xf9, 0xf3, 0x12, 0x7a, 0xca, 0x86, 0x77, 0x3a, 0x62, 0x9, 0x45, 0x73, 0x1d, 0xf7, 0x81, 0xa6, 0xd7, 0xdc, 0x82, 0x93, 0xc, 0xcd, 0xe2, 0xf6, 0x9d, 0xac, 0x8f, 0x94}, - output384: []byte{0x47, 0x63, 0x3a, 0xd0, 0xc8, 0xa, 0xf2, 0x6b, 0xf7, 0x4d, 0x95, 0x98, 0xdb, 0xd5, 0xbc, 0xf7, 0x7f, 0xc6, 0xbf, 0xf1, 0xbc, 0xa0, 0x15, 0xa6, 0x11, 0xd7, 0xb8, 0x24, 0xf, 0x59, 0x7d, 0x87, 0x67, 0xfb, 0x8b, 0xb, 0xf5, 0xc3, 0x33, 0x15, 0x65, 0x80, 0xaf, 0xee, 0x12, 0x1c, 0x29, 0x9c}, - output512: []byte{0x42, 0x4a, 0x86, 0xd7, 0x46, 0xc8, 0x7c, 0x85, 0xda, 0xbd, 0x1d, 0xae, 0x29, 0x8a, 0x48, 0x8e, 0x4c, 0xa2, 0x18, 0x3d, 0xe6, 0x92, 0xd1, 0xd0, 0x1c, 0x4b, 0x79, 0x94, 0xee, 0x51, 0x24, 0xf9, 0x0, 0x4b, 0xea, 0x84, 0x93, 0x3c, 0x31, 0x1c, 0xc3, 0x8e, 0xa6, 0xf6, 0x4, 0xa7, 0x76, 0x9e, 0xe1, 0x78, 0xe1, 0xec, 0x16, 0xa, 0x98, 0x91, 0xc4, 0x2c, 0x46, 0x2a, 0x13, 0xa6, 0x22, 0x86}}, - testcase{ - msg: []byte{0x76, 0xee, 0xcf, 0x95, 0x6a, 0x52, 0x64, 0x9f, 0x87, 0x75, 0x28, 0x14, 0x6d, 0xe3, 0x3d, 0xf2, 0x49, 0xcd, 0x80, 0xe, 0x21, 0x83, 0xf, 0x65, 0xe9, 0xf, 0xf, 0x25, 0xca, 0x9d, 0x65, 0x40, 0xfd, 0xe4, 0x6, 0x3, 0x23, 0xe, 0xca, 0x67, 0x60, 0xf1, 0x13, 0x9c, 0x7f, 0x26, 0x8d, 0xeb, 0xa2, 0x6, 0x6, 0x31, 0xee, 0xa9, 0x2b, 0x1f, 0xff, 0x5, 0xf9, 0x3f, 0xd5, 0x57, 0x2f, 0xbe, 0x29, 0x57, 0x9e, 0xcd, 0x48, 0xbc, 0x3a, 0x8d, 0x6c, 0x2e, 0xb4, 0xa6, 0xb2, 0x6e, 0x38, 0xd6, 0xc5, 0xfb, 0xf2, 0xc0, 0x80, 0x44, 0xae, 0xea, 0x47, 0xa, 0x8f, 0x2f, 0x26}, - output224: []byte{0x10, 0x60, 0xaf, 0xd1, 0xe1, 0xb9, 0xf7, 0xf4, 0x12, 0x91, 0xa4, 0x86, 0x17, 0x74, 0xb3, 0xb0, 0xc9, 0x5a, 0x81, 0x27, 0x88, 0xa4, 0x1d, 0x7e, 0xbe, 0xf4, 0xa8, 0x93}, - output256: []byte{0x19, 0xe5, 0x10, 0x1b, 0xde, 0x60, 0xb2, 0x0, 0xa8, 0xb1, 0x71, 0xe4, 0xc3, 0xea, 0x3d, 0xfd, 0x91, 0x3e, 0x10, 0x11, 0x1d, 0x96, 0xf9, 0x68, 0x2a, 0xcc, 0x74, 0x67, 0x28, 0x2b, 0x4e, 0x31}, - output384: []byte{0x4, 0x45, 0x63, 0x22, 0xe1, 0xbf, 0x27, 0x78, 0x5e, 0xdf, 0x3f, 0x59, 0x6d, 0xb3, 0x3e, 0x69, 0x3a, 0xad, 0xf7, 0x6d, 0x9d, 0x25, 0x93, 0x52, 0xd9, 0x7a, 0xcd, 0x56, 0x1b, 0xc4, 0x52, 0x36, 0x50, 0x6f, 0xba, 0x35, 0x30, 0x77, 0x22, 0x42, 0xcb, 0x36, 0x9a, 0x83, 0xa3, 0x8c, 0xd7, 0x49}, - output512: []byte{0xa9, 0x40, 0x3c, 0x26, 0xa9, 0x6d, 0xe2, 0xc3, 0xd3, 0x59, 0xee, 0x29, 0xf3, 0xfd, 0x1c, 0x58, 0x11, 0x54, 0x85, 0x2d, 0x19, 0xad, 0x12, 0x88, 0x4b, 0x79, 0xe7, 0x8, 0x2d, 0x2d, 0xa2, 0x2e, 0xc8, 0x35, 0x53, 0xba, 0xba, 0x2b, 0xdf, 0xf2, 0xa2, 0xfa, 0x15, 0x94, 0x7a, 0x8e, 0x6a, 0xcd, 0x5f, 0x5d, 0x11, 0x3e, 0xc0, 0x91, 0xbf, 0xd1, 0x96, 0x2a, 0xa, 0x10, 0x40, 0x1d, 0x2c, 0x98}}, - testcase{ - msg: []byte{0x7a, 0xdc, 0xb, 0x66, 0x93, 0xe6, 0x1c, 0x26, 0x9f, 0x27, 0x8e, 0x69, 0x44, 0xa5, 0xa2, 0xd8, 0x30, 0x9, 0x81, 0xe4, 0x0, 0x22, 0xf8, 0x39, 0xac, 0x64, 0x43, 0x87, 0xbf, 0xac, 0x90, 0x86, 0x65, 0x0, 0x85, 0xc2, 0xcd, 0xc5, 0x85, 0xfe, 0xa4, 0x7b, 0x9d, 0x2e, 0x52, 0xd6, 0x5a, 0x2b, 0x29, 0xa7, 0xdc, 0x37, 0x4, 0x1, 0xef, 0x5d, 0x60, 0xdd, 0xd, 0x21, 0xf9, 0xe2, 0xb9, 0xf, 0xae, 0x91, 0x93, 0x19, 0xb1, 0x4b, 0x8c, 0x55, 0x65, 0xb0, 0x42, 0x3c, 0xef, 0xb8, 0x27, 0xd5, 0xf1, 0x20, 0x33, 0x2, 0xa9, 0xd0, 0x15, 0x23, 0x49, 0x8a, 0x4d, 0xb1, 0x3, 0x74}, - output224: []byte{0xea, 0x91, 0xed, 0xc3, 0x93, 0x49, 0x1b, 0x4c, 0xbc, 0x3, 0x5b, 0x85, 0x38, 0xdf, 0x8, 0xe3, 0xc6, 0xb8, 0xca, 0xd1, 0x83, 0x38, 0x5, 0x3c, 0x81, 0xfe, 0x2e, 0x8}, - output256: []byte{0x4c, 0xc2, 0xaf, 0xf1, 0x41, 0x98, 0x7f, 0x4c, 0x2e, 0x68, 0x3f, 0xa2, 0xde, 0x30, 0x4, 0x2b, 0xac, 0xdc, 0xd0, 0x60, 0x87, 0xd7, 0xa7, 0xb0, 0x14, 0x99, 0x6e, 0x9c, 0xfe, 0xaa, 0x58, 0xce}, - output384: []byte{0xf8, 0xb1, 0xf2, 0xc3, 0x17, 0xb9, 0xd1, 0x89, 0x8c, 0x30, 0x5d, 0xec, 0x3c, 0x6c, 0xa, 0xc4, 0x5c, 0xfe, 0x7f, 0x99, 0x5e, 0x94, 0x49, 0x68, 0x20, 0x6c, 0x1c, 0x1b, 0x2c, 0x92, 0xbd, 0x1d, 0x4f, 0xa3, 0x92, 0xff, 0xaa, 0x60, 0x94, 0xc6, 0xaf, 0xf9, 0x5e, 0x47, 0xdc, 0x25, 0x9e, 0xe9}, - output512: []byte{0x3d, 0x23, 0x63, 0x2e, 0xe4, 0xc2, 0xd4, 0xf4, 0x11, 0x8a, 0x2, 0xa6, 0x77, 0xb5, 0xa3, 0x24, 0x27, 0xc7, 0x2b, 0xa5, 0x48, 0x99, 0xba, 0x2e, 0x6c, 0xcd, 0x22, 0xec, 0x3d, 0xef, 0xe0, 0xfc, 0xb0, 0x52, 0xe3, 0xf8, 0x3d, 0x35, 0x78, 0x6c, 0xea, 0x20, 0x80, 0xee, 0xd1, 0x48, 0xa0, 0xa9, 0x46, 0x28, 0xe7, 0x35, 0x20, 0x2e, 0x6b, 0x28, 0x9, 0x99, 0x4c, 0x5f, 0x5b, 0xda, 0xfd, 0xd6}}, - testcase{ - msg: []byte{0xe1, 0xff, 0xfa, 0x98, 0x26, 0xcc, 0xe8, 0xb8, 0x6b, 0xcc, 0xef, 0xb8, 0x79, 0x4e, 0x48, 0xc4, 0x6c, 0xdf, 0x37, 0x20, 0x13, 0xf7, 0x82, 0xec, 0xed, 0x1e, 0x37, 0x82, 0x69, 0xb7, 0xbe, 0x2b, 0x7b, 0xf5, 0x13, 0x74, 0x9, 0x22, 0x61, 0xae, 0x12, 0xe, 0x82, 0x2b, 0xe6, 0x85, 0xf2, 0xe7, 0xa8, 0x36, 0x64, 0xbc, 0xfb, 0xe3, 0x8f, 0xe8, 0x63, 0x3f, 0x24, 0xe6, 0x33, 0xff, 0xe1, 0x98, 0x8e, 0x1b, 0xc5, 0xac, 0xf5, 0x9a, 0x58, 0x70, 0x79, 0xa5, 0x7a, 0x91, 0xb, 0xda, 0x60, 0x6, 0xe, 0x85, 0xb5, 0xf5, 0xb6, 0xf7, 0x76, 0xf0, 0x52, 0x96, 0x39, 0xd9, 0xcc, 0xe4, 0xbd}, - output224: []byte{0xdf, 0x1a, 0xf1, 0x49, 0xe5, 0xc9, 0x2c, 0xb2, 0x91, 0x74, 0xc1, 0xed, 0xb6, 0xed, 0x89, 0x1e, 0xbc, 0xe4, 0x36, 0x60, 0x10, 0xdc, 0x7c, 0xbf, 0xc9, 0xb1, 0xd7, 0x57}, - output256: []byte{0x9a, 0x8c, 0xe8, 0x19, 0x89, 0x4e, 0xfc, 0xcc, 0x21, 0x53, 0xb2, 0x39, 0xc3, 0xad, 0xc3, 0xf0, 0x7d, 0x9, 0x68, 0xea, 0xc5, 0xec, 0x80, 0x80, 0xac, 0x1, 0x74, 0xf2, 0xd5, 0xe6, 0x95, 0x9c}, - output384: []byte{0x4f, 0x43, 0x91, 0x97, 0xc6, 0x64, 0x39, 0xba, 0xf6, 0x56, 0x18, 0xf8, 0x26, 0xe2, 0x99, 0xa3, 0x29, 0x38, 0xb, 0x55, 0x8a, 0x52, 0xb0, 0x71, 0x11, 0x82, 0x58, 0xb, 0xdb, 0xad, 0xba, 0xbb, 0x13, 0xad, 0x66, 0xd6, 0xf, 0xad, 0xdb, 0x9d, 0xed, 0x22, 0x6f, 0xb, 0x40, 0x1a, 0xa8, 0xbe}, - output512: []byte{0xd8, 0xfa, 0x88, 0x68, 0x84, 0xce, 0x57, 0x7a, 0x72, 0x82, 0xde, 0xce, 0xac, 0xf4, 0x78, 0x6e, 0x7c, 0x68, 0xfc, 0x69, 0xb1, 0x41, 0x13, 0x7f, 0xf5, 0xdc, 0x7c, 0xb3, 0xc5, 0xf8, 0xab, 0xc8, 0x45, 0x71, 0x6d, 0xd2, 0x73, 0x97, 0xe8, 0xbd, 0x5c, 0xe2, 0x45, 0x10, 0x7a, 0x98, 0x4a, 0x3f, 0x8b, 0x21, 0xf1, 0x9f, 0x99, 0xed, 0x40, 0x11, 0x86, 0x21, 0xdc, 0x85, 0x30, 0x3a, 0x30, 0xb4}}, - testcase{ - msg: []byte{0x69, 0xf9, 0xab, 0xba, 0x65, 0x59, 0x2e, 0xe0, 0x1d, 0xb4, 0xdc, 0xe5, 0x2d, 0xba, 0xb9, 0xb, 0x8, 0xfc, 0x4, 0x19, 0x36, 0x2, 0x79, 0x2e, 0xe4, 0xda, 0xa2, 0x63, 0x3, 0x3d, 0x59, 0x8, 0x15, 0x87, 0xb0, 0x9b, 0xbe, 0x49, 0xd0, 0xb4, 0x9c, 0x98, 0x25, 0xd2, 0x28, 0x40, 0xb2, 0xff, 0x5d, 0x9c, 0x51, 0x55, 0xf9, 0x75, 0xf8, 0xf2, 0xc2, 0xe7, 0xa9, 0xc, 0x75, 0xd2, 0xe4, 0xa8, 0x4, 0xf, 0xe3, 0x9f, 0x63, 0xbb, 0xaf, 0xb4, 0x3, 0xd9, 0xe2, 0x8c, 0xc3, 0xb8, 0x6e, 0x4, 0xe3, 0x94, 0xa9, 0xc9, 0xe8, 0x6, 0x5b, 0xd3, 0xc8, 0x5f, 0xa9, 0xf0, 0xc7, 0x89, 0x16, 0x0}, - output224: []byte{0x5f, 0x69, 0x84, 0x8, 0xbf, 0xf0, 0x24, 0x6b, 0x5, 0xba, 0xd9, 0x6c, 0xb3, 0x42, 0xb2, 0xfd, 0x2f, 0x11, 0xb6, 0x80, 0x4e, 0xf2, 0xfa, 0x7, 0xa8, 0x1b, 0x9, 0x20}, - output256: []byte{0x8b, 0x35, 0x76, 0x85, 0x25, 0xf5, 0x9a, 0xc7, 0x7d, 0x35, 0x52, 0x2a, 0xc8, 0x85, 0x83, 0x1a, 0x99, 0x47, 0x29, 0x9e, 0x11, 0x4a, 0x89, 0x56, 0xfe, 0x5b, 0xca, 0x10, 0x3d, 0xb7, 0xbb, 0x2c}, - output384: []byte{0x1c, 0x8b, 0x99, 0xbf, 0x6a, 0x3e, 0x80, 0xf0, 0xb8, 0xc6, 0x7f, 0xa9, 0xbb, 0xf0, 0x7d, 0x19, 0xc1, 0x5d, 0x48, 0x4c, 0xde, 0x38, 0xf8, 0xfa, 0xad, 0xb7, 0x48, 0xae, 0x2, 0x4a, 0x2, 0xe2, 0x9f, 0xd2, 0xd7, 0xbd, 0xce, 0x66, 0xd4, 0x6c, 0x1a, 0x52, 0x39, 0xd7, 0x45, 0x3f, 0xd3, 0xe3}, - output512: []byte{0xc7, 0x68, 0xcd, 0x31, 0x36, 0x2, 0xfa, 0xbb, 0x21, 0x93, 0xf9, 0xed, 0xbf, 0x66, 0x7b, 0x4c, 0xda, 0xbd, 0x57, 0xd5, 0xff, 0x60, 0xbd, 0xc2, 0x2b, 0xa7, 0xba, 0xd5, 0x31, 0x9e, 0xa0, 0x4e, 0x7c, 0xbe, 0xc5, 0xd4, 0xb4, 0xc4, 0x56, 0xa, 0xd5, 0x26, 0x9, 0xfd, 0xd2, 0x27, 0x50, 0xb6, 0x18, 0x95, 0x17, 0x96, 0x37, 0x6e, 0xd4, 0x1b, 0x2a, 0x8e, 0xaf, 0xfd, 0xd9, 0x92, 0x77, 0x22}}, - testcase{ - msg: []byte{0x38, 0xa1, 0xa, 0x35, 0x2c, 0xa5, 0xae, 0xdf, 0xa8, 0xe1, 0x9c, 0x64, 0x78, 0x7d, 0x8e, 0x9c, 0x3a, 0x75, 0xdb, 0xf3, 0xb8, 0x67, 0x4b, 0xfa, 0xb2, 0x9b, 0x5d, 0xbf, 0xc1, 0x5a, 0x63, 0xd1, 0xf, 0xae, 0x66, 0xcd, 0x1a, 0x6e, 0x6d, 0x24, 0x52, 0xd5, 0x57, 0x96, 0x7e, 0xaa, 0xd8, 0x9a, 0x4c, 0x98, 0x44, 0x97, 0x87, 0xb0, 0xb3, 0x16, 0x4c, 0xa5, 0xb7, 0x17, 0xa9, 0x3f, 0x24, 0xeb, 0xb, 0x50, 0x6c, 0xeb, 0x70, 0xcb, 0xbc, 0xb8, 0xd7, 0x2b, 0x2a, 0x72, 0x99, 0x3f, 0x90, 0x9a, 0xad, 0x92, 0xf0, 0x44, 0xe0, 0xb5, 0xa2, 0xc9, 0xac, 0x9c, 0xb1, 0x6a, 0xc, 0xa2, 0xf8, 0x1f, 0x49}, - output224: []byte{0xeb, 0xe6, 0xd6, 0x1e, 0x8a, 0x94, 0x6e, 0xd, 0x45, 0xd3, 0x88, 0x9f, 0x9e, 0x36, 0xa, 0xcd, 0x3a, 0x1a, 0x7d, 0x6c, 0x4b, 0x13, 0x7, 0x44, 0x8e, 0x6e, 0x73, 0x57}, - output256: []byte{0x95, 0x5f, 0x1f, 0x7e, 0x4e, 0x54, 0x66, 0xb, 0x26, 0xf3, 0x0, 0x86, 0xf2, 0xdd, 0xda, 0xed, 0xd3, 0x28, 0x13, 0x54, 0x7c, 0x1b, 0x95, 0xd3, 0x5, 0xd8, 0x82, 0x68, 0x2b, 0x4f, 0xf7, 0xa0}, - output384: []byte{0x46, 0xf8, 0x7b, 0xc0, 0x78, 0x49, 0xe9, 0x51, 0x4, 0xe6, 0x7c, 0xc3, 0xdc, 0x71, 0xbd, 0xc1, 0x9, 0xc1, 0x10, 0x2b, 0xfb, 0x1a, 0xcd, 0xfe, 0x2f, 0x6a, 0x23, 0x17, 0x3b, 0x52, 0xbf, 0x83, 0x6c, 0xe0, 0xc, 0xd7, 0xa5, 0xa5, 0xff, 0xe7, 0xd3, 0xbb, 0x8f, 0xab, 0x33, 0xde, 0xce, 0xdf}, - output512: []byte{0x85, 0x62, 0xce, 0x93, 0x99, 0x80, 0x66, 0x23, 0xb2, 0x69, 0x57, 0x12, 0x26, 0x6a, 0xf3, 0xd4, 0xc1, 0x4f, 0x77, 0xd2, 0x44, 0x91, 0x43, 0x37, 0x92, 0x46, 0x96, 0x2c, 0x22, 0x39, 0x8c, 0x81, 0x35, 0x44, 0xa7, 0xde, 0xe4, 0xc4, 0x84, 0x7f, 0x9, 0xd3, 0xcb, 0xe4, 0x37, 0x34, 0x9b, 0x7f, 0xc6, 0x73, 0x8a, 0xc9, 0x70, 0x75, 0xb5, 0xdd, 0x9e, 0x2a, 0xdd, 0x6e, 0xca, 0xa6, 0x10, 0xf4}}, - testcase{ - msg: []byte{0x6d, 0x8c, 0x6e, 0x44, 0x9b, 0xc1, 0x36, 0x34, 0xf1, 0x15, 0x74, 0x9c, 0x24, 0x8c, 0x17, 0xcd, 0x14, 0x8b, 0x72, 0x15, 0x7a, 0x2c, 0x37, 0xbf, 0x89, 0x69, 0xea, 0x83, 0xb4, 0xd6, 0xba, 0x8c, 0xe, 0xe2, 0x71, 0x1c, 0x28, 0xee, 0x11, 0x49, 0x5f, 0x43, 0x4, 0x95, 0x96, 0x52, 0xc, 0xe4, 0x36, 0x0, 0x4b, 0x2, 0x6b, 0x6c, 0x1f, 0x72, 0x92, 0xb9, 0xc4, 0x36, 0xb0, 0x55, 0xcb, 0xb7, 0x2d, 0x53, 0xd, 0x86, 0xd, 0x12, 0x76, 0xa1, 0x50, 0x2a, 0x51, 0x40, 0xe3, 0xc3, 0xf5, 0x4a, 0x93, 0x66, 0x3e, 0x4d, 0x20, 0xed, 0xec, 0x32, 0xd2, 0x84, 0xe2, 0x55, 0x64, 0xf6, 0x24, 0x95, 0x5b, 0x52}, - output224: []byte{0x1b, 0x7f, 0x6b, 0xcb, 0x22, 0x71, 0xac, 0x9c, 0x3b, 0x55, 0x8e, 0x95, 0xf8, 0x52, 0x85, 0xee, 0x75, 0x6b, 0x3, 0xb7, 0x67, 0xa0, 0x1a, 0xc5, 0x7d, 0x7c, 0x6e, 0x94}, - output256: []byte{0x8f, 0xac, 0x5a, 0x34, 0xeb, 0xaf, 0xa3, 0x8b, 0x55, 0x33, 0x36, 0x24, 0xa9, 0x51, 0x4f, 0xe9, 0x7d, 0x99, 0x56, 0xe7, 0x43, 0x9, 0xc5, 0x25, 0x2c, 0xd2, 0x9, 0xd, 0x3b, 0xbe, 0x2f, 0x9e}, - output384: []byte{0xfa, 0x12, 0xb9, 0xd0, 0x70, 0xf6, 0x97, 0xfd, 0x53, 0x91, 0xf3, 0xfc, 0x9c, 0x44, 0x5, 0x6c, 0xed, 0xa6, 0x3f, 0x3, 0x5d, 0x76, 0x66, 0x55, 0xaa, 0x7d, 0xa, 0x57, 0x5e, 0xd5, 0x5b, 0x15, 0xba, 0x6b, 0xaf, 0x56, 0x30, 0x9, 0x40, 0xb5, 0x65, 0xe3, 0x7a, 0x24, 0x8e, 0x2d, 0xca, 0xb8}, - output512: []byte{0x99, 0xad, 0xe7, 0xb1, 0x3e, 0x8e, 0x79, 0xae, 0xa6, 0xed, 0x1, 0xa2, 0x5e, 0x10, 0xe4, 0x1, 0xcd, 0x1d, 0x5, 0x58, 0x84, 0x57, 0x5e, 0xab, 0x3e, 0x66, 0xb2, 0x29, 0x4f, 0x3, 0xf8, 0xd5, 0xdb, 0xf7, 0x2a, 0xb1, 0xae, 0x39, 0x10, 0x31, 0x89, 0x38, 0x3e, 0xbf, 0xd2, 0xe4, 0x32, 0x58, 0x51, 0xc, 0x12, 0x4a, 0x89, 0x4a, 0x79, 0x3b, 0x20, 0x6f, 0xac, 0x75, 0x2c, 0x3, 0x57, 0x89}}, - testcase{ - msg: []byte{0x6e, 0xfc, 0xbc, 0xaf, 0x45, 0x1c, 0x12, 0x9d, 0xbe, 0x0, 0xb9, 0xce, 0xf0, 0xc3, 0x74, 0x9d, 0x3e, 0xe9, 0xd4, 0x1c, 0x7b, 0xd5, 0x0, 0xad, 0xe4, 0xc, 0xdc, 0x65, 0xde, 0xdb, 0xbb, 0xad, 0xb8, 0x85, 0xa5, 0xb1, 0x4b, 0x32, 0xa0, 0xc0, 0xd0, 0x87, 0x82, 0x52, 0x1, 0xe3, 0x3, 0x28, 0x8a, 0x73, 0x38, 0x42, 0xfa, 0x7e, 0x59, 0x9c, 0xc, 0x51, 0x4e, 0x7, 0x8f, 0x5, 0xc8, 0x21, 0xc7, 0xa4, 0x49, 0x8b, 0x1, 0xc4, 0x0, 0x32, 0xe9, 0xf1, 0x87, 0x2a, 0x1c, 0x92, 0x5f, 0xa1, 0x7c, 0xe2, 0x53, 0xe8, 0x93, 0x5e, 0x4c, 0x3c, 0x71, 0x28, 0x22, 0x42, 0xcb, 0x71, 0x6b, 0x20, 0x89, 0xcc, 0xc1}, - output224: []byte{0x43, 0x6d, 0x1b, 0xcd, 0x6b, 0x3d, 0xe2, 0x67, 0x7a, 0x72, 0xb9, 0x3e, 0x2c, 0xed, 0xb6, 0xc, 0x84, 0xa4, 0xfe, 0x12, 0x5a, 0x80, 0x2e, 0x29, 0x97, 0xeb, 0x2e, 0x67}, - output256: []byte{0x62, 0x3, 0x9e, 0xf, 0x53, 0x86, 0x94, 0x80, 0xf8, 0x8c, 0x87, 0xbb, 0x3d, 0x19, 0xa3, 0x1a, 0xad, 0x32, 0x87, 0x8f, 0x27, 0xf2, 0xc4, 0xe7, 0x8f, 0xf0, 0x2b, 0xbe, 0xa2, 0xb8, 0xb0, 0xb9}, - output384: []byte{0x53, 0x4, 0xd6, 0xdb, 0x27, 0x30, 0xfb, 0x7, 0xb8, 0x53, 0x48, 0xb0, 0x22, 0x6b, 0x1a, 0x81, 0xa5, 0x46, 0xba, 0x1f, 0xe2, 0x1, 0xec, 0xce, 0x1e, 0x55, 0x2d, 0xba, 0x6a, 0xfb, 0x84, 0xcc, 0xe7, 0xa6, 0xf9, 0x54, 0xe3, 0x10, 0xa, 0xe1, 0x72, 0x4b, 0x82, 0xcf, 0x1c, 0xbc, 0x41, 0x28}, - output512: []byte{0xd1, 0x28, 0x31, 0xba, 0x39, 0xdb, 0xcd, 0x41, 0xf5, 0x6b, 0xc7, 0xfc, 0x7, 0x1b, 0xda, 0xab, 0xfb, 0x6e, 0x75, 0x72, 0xd0, 0x8b, 0x2f, 0xda, 0x3b, 0xdd, 0xfc, 0x6f, 0xa5, 0x66, 0x2f, 0x4b, 0xdb, 0xfa, 0x43, 0x1c, 0xa2, 0xe3, 0x8b, 0x18, 0x17, 0x27, 0x9, 0x7, 0x2e, 0x50, 0x12, 0xd, 0xb6, 0xbe, 0x93, 0xe8, 0x6c, 0xb4, 0xac, 0xe3, 0xc1, 0x1d, 0xd0, 0xe1, 0xf3, 0xf5, 0xc7, 0x12}}, - testcase{ - msg: []byte{0x43, 0x3c, 0x53, 0x3, 0x13, 0x16, 0x24, 0xc0, 0x2, 0x1d, 0x86, 0x8a, 0x30, 0x82, 0x54, 0x75, 0xe8, 0xd0, 0xbd, 0x30, 0x52, 0xa0, 0x22, 0x18, 0x3, 0x98, 0xf4, 0xca, 0x44, 0x23, 0xb9, 0x82, 0x14, 0xb6, 0xbe, 0xaa, 0xc2, 0x1c, 0x88, 0x7, 0xa2, 0xc3, 0x3f, 0x8c, 0x93, 0xbd, 0x42, 0xb0, 0x92, 0xcc, 0x1b, 0x6, 0xce, 0xdf, 0x32, 0x24, 0xd5, 0xed, 0x1e, 0xc2, 0x97, 0x84, 0x44, 0x4f, 0x22, 0xe0, 0x8a, 0x55, 0xaa, 0x58, 0x54, 0x2b, 0x52, 0x4b, 0x2, 0xcd, 0x3d, 0x5d, 0x5f, 0x69, 0x7, 0xaf, 0xe7, 0x1c, 0x5d, 0x74, 0x62, 0x22, 0x4a, 0x3f, 0x9d, 0x9e, 0x53, 0xe7, 0xe0, 0x84, 0x6d, 0xcb, 0xb4, 0xce}, - output224: []byte{0x62, 0xb1, 0xf, 0x1b, 0x62, 0x36, 0xeb, 0xc2, 0xda, 0x72, 0x95, 0x77, 0x42, 0xa8, 0xd4, 0xe4, 0x8e, 0x21, 0x3b, 0x5f, 0x89, 0x34, 0x60, 0x4b, 0xfd, 0x4d, 0x2c, 0x3a}, - output256: []byte{0xce, 0x87, 0xa5, 0x17, 0x3b, 0xff, 0xd9, 0x23, 0x99, 0x22, 0x16, 0x58, 0xf8, 0x1, 0xd4, 0x5c, 0x29, 0x4d, 0x90, 0x6, 0xee, 0x9f, 0x3f, 0x9d, 0x41, 0x9c, 0x8d, 0x42, 0x77, 0x48, 0xdc, 0x41}, - output384: []byte{0x13, 0x51, 0x14, 0x50, 0x8d, 0xd6, 0x3e, 0x27, 0x9e, 0x70, 0x9c, 0x26, 0xf7, 0x81, 0x7c, 0x4, 0x82, 0x76, 0x6c, 0xde, 0x49, 0x13, 0x2e, 0x3e, 0xdf, 0x2e, 0xed, 0xd8, 0x99, 0x6f, 0x4e, 0x35, 0x96, 0xd1, 0x84, 0x10, 0xb, 0x38, 0x48, 0x68, 0x24, 0x9f, 0x1d, 0x8b, 0x8f, 0xda, 0xa2, 0xc9}, - output512: []byte{0x52, 0x7d, 0x28, 0xe3, 0x41, 0xe6, 0xb1, 0x4f, 0x46, 0x84, 0xad, 0xb4, 0xb8, 0x24, 0xc4, 0x96, 0xc6, 0x48, 0x2e, 0x51, 0x14, 0x95, 0x65, 0xd3, 0xd1, 0x72, 0x26, 0x82, 0x88, 0x84, 0x30, 0x6b, 0x51, 0xd6, 0x14, 0x8a, 0x72, 0x62, 0x2c, 0x2b, 0x75, 0xf5, 0xd3, 0x51, 0xb, 0x79, 0x9d, 0x8b, 0xdc, 0x3, 0xea, 0xed, 0xe4, 0x53, 0x67, 0x6a, 0x6e, 0xc8, 0xfe, 0x3, 0xa1, 0xad, 0xe, 0xab}}, - testcase{ - msg: []byte{0xa8, 0x73, 0xe0, 0xc6, 0x7c, 0xa6, 0x39, 0x2, 0x6b, 0x66, 0x83, 0x0, 0x8f, 0x7a, 0xa6, 0x32, 0x4d, 0x49, 0x79, 0x55, 0xe, 0x9b, 0xce, 0x6, 0x4c, 0xa1, 0xe1, 0xfb, 0x97, 0xa3, 0xb, 0x14, 0x7a, 0x24, 0xf3, 0xf6, 0x66, 0xc0, 0xa7, 0x2d, 0x71, 0x34, 0x8e, 0xde, 0x70, 0x1c, 0xf2, 0xd1, 0x7e, 0x22, 0x53, 0xc3, 0x4d, 0x1e, 0xc3, 0xb6, 0x47, 0xdb, 0xce, 0xf2, 0xf8, 0x79, 0xf4, 0xeb, 0x88, 0x1c, 0x48, 0x30, 0xb7, 0x91, 0x37, 0x8c, 0x90, 0x1e, 0xb7, 0x25, 0xea, 0x5c, 0x17, 0x23, 0x16, 0xc6, 0xd6, 0x6, 0xe0, 0xaf, 0x7d, 0xf4, 0xdf, 0x7f, 0x76, 0xe4, 0x90, 0xcd, 0x30, 0xb2, 0xba, 0xdf, 0x45, 0x68, 0x5f}, - output224: []byte{0x11, 0x86, 0xbe, 0xa0, 0x88, 0xd, 0xa, 0x96, 0xf6, 0xa5, 0x6b, 0xbb, 0x43, 0x1f, 0x4d, 0x26, 0x48, 0x38, 0xbb, 0x1, 0x80, 0xdc, 0xf6, 0x6e, 0xf0, 0xb5, 0x99, 0xca}, - output256: []byte{0x2e, 0xf8, 0x90, 0x7b, 0x60, 0x10, 0x86, 0x38, 0xe5, 0xe, 0xac, 0x53, 0x5c, 0xc4, 0x6c, 0xa0, 0x2e, 0x4, 0x58, 0x1d, 0xdb, 0x42, 0x35, 0xfb, 0xac, 0x5c, 0xb5, 0xc5, 0x35, 0x83, 0xe2, 0x4b}, - output384: []byte{0xd5, 0x60, 0xd5, 0x4a, 0x28, 0x81, 0xed, 0x47, 0xcc, 0x8c, 0x5a, 0xf9, 0x81, 0x8f, 0xee, 0xaf, 0x8, 0xb6, 0x21, 0xb1, 0xae, 0xd4, 0x56, 0x9d, 0x8, 0x80, 0x7a, 0xb, 0x61, 0xf9, 0x2, 0xc1, 0x69, 0x1d, 0x8b, 0x8, 0xff, 0x75, 0x59, 0xf, 0xea, 0xae, 0xd6, 0xe7, 0x5f, 0x4c, 0x9e, 0x3f}, - output512: []byte{0xca, 0xcd, 0xcf, 0x8b, 0xf8, 0x55, 0x4, 0xe, 0x97, 0x95, 0xc4, 0x22, 0x6, 0x9d, 0x8e, 0x37, 0xb6, 0x28, 0x60, 0x66, 0xa2, 0x19, 0x7a, 0x32, 0xb, 0xd9, 0x34, 0x6, 0x1f, 0x66, 0x99, 0x52, 0x27, 0xbe, 0x6b, 0x85, 0xfd, 0x92, 0x8b, 0x83, 0x4d, 0x3c, 0xa4, 0x5e, 0x1a, 0xc3, 0x84, 0x4d, 0x9d, 0xc6, 0x6d, 0x61, 0x58, 0x1e, 0x77, 0x99, 0xcc, 0xfd, 0xe0, 0x8, 0x63, 0x9a, 0xb3, 0xdd}}, - testcase{ - msg: []byte{0x0, 0x69, 0x17, 0xb6, 0x4f, 0x9d, 0xcd, 0xf1, 0xd2, 0xd8, 0x7c, 0x8a, 0x61, 0x73, 0xb6, 0x4f, 0x65, 0x87, 0x16, 0x8e, 0x80, 0xfa, 0xa8, 0xf, 0x82, 0xd8, 0x4f, 0x60, 0x30, 0x1e, 0x56, 0x1e, 0x31, 0x2d, 0x9f, 0xbc, 0xe6, 0x2f, 0x39, 0xa6, 0xfb, 0x47, 0x6e, 0x1, 0xe9, 0x25, 0xf2, 0x6b, 0xcc, 0x91, 0xde, 0x62, 0x14, 0x49, 0xbe, 0x65, 0x4, 0xc5, 0x4, 0x83, 0xa, 0xae, 0x39, 0x40, 0x96, 0xc8, 0xfc, 0x76, 0x94, 0x65, 0x10, 0x51, 0x36, 0x5d, 0x4e, 0xe9, 0x7, 0x1, 0x1, 0xec, 0x9b, 0x68, 0x8, 0x6f, 0x2e, 0xa8, 0xf8, 0xab, 0x7b, 0x81, 0x1e, 0xa8, 0xad, 0x93, 0x4d, 0x5c, 0x9b, 0x62, 0xc6, 0xa, 0x47, 0x71}, - output224: []byte{0x38, 0x3d, 0x2f, 0x41, 0xec, 0xfd, 0xa5, 0x99, 0x4e, 0x81, 0x54, 0x32, 0x99, 0x9d, 0x19, 0x2e, 0x1a, 0x28, 0x2f, 0xf5, 0x66, 0x31, 0x96, 0xa4, 0xa2, 0x68, 0xa6, 0x7d}, - output256: []byte{0xbe, 0x8b, 0x5b, 0xd3, 0x65, 0x18, 0xe9, 0xc5, 0xf4, 0xc7, 0x68, 0xfc, 0x2, 0x46, 0x1b, 0xb3, 0xd3, 0x9a, 0x5d, 0x0, 0xed, 0xef, 0x82, 0xce, 0xc7, 0xdf, 0x35, 0x1d, 0xf8, 0x2, 0x38, 0xe0}, - output384: []byte{0xfe, 0x5f, 0x30, 0xa3, 0x15, 0x58, 0x40, 0x92, 0xa2, 0x71, 0xfd, 0xbc, 0xf4, 0x34, 0x7a, 0x24, 0xd1, 0x4a, 0x1f, 0x98, 0xca, 0xdc, 0x88, 0xdf, 0x28, 0x8c, 0x36, 0xce, 0xa8, 0xf8, 0x9e, 0x90, 0x20, 0x1, 0x99, 0x33, 0xbc, 0xd4, 0xf5, 0xa7, 0x47, 0x9e, 0x3e, 0x4a, 0x57, 0x64, 0x4c, 0x49}, - output512: []byte{0xf4, 0x54, 0xa9, 0x53, 0x50, 0x1e, 0x19, 0x1a, 0x12, 0xa8, 0xc, 0x7a, 0x53, 0x98, 0xf0, 0x81, 0xce, 0xf7, 0x38, 0xe2, 0x5d, 0x48, 0xb0, 0x76, 0xa5, 0x2f, 0x77, 0xfb, 0x9, 0xef, 0xb, 0xc2, 0x32, 0x51, 0x16, 0x2, 0xb, 0xb0, 0x6c, 0x2c, 0x58, 0x5d, 0xa9, 0xf1, 0x15, 0xbd, 0x9d, 0x8f, 0x13, 0xb5, 0xe, 0x8e, 0x1f, 0xb1, 0x66, 0x44, 0x50, 0xfa, 0xe6, 0x90, 0xb7, 0x78, 0x34, 0x0}}, - testcase{ - msg: []byte{0xf1, 0x3c, 0x97, 0x2c, 0x52, 0xcb, 0x3c, 0xc4, 0xa4, 0xdf, 0x28, 0xc9, 0x7f, 0x2d, 0xf1, 0x1c, 0xe0, 0x89, 0xb8, 0x15, 0x46, 0x6b, 0xe8, 0x88, 0x63, 0x24, 0x3e, 0xb3, 0x18, 0xc2, 0xad, 0xb1, 0xa4, 0x17, 0xcb, 0x10, 0x41, 0x30, 0x85, 0x98, 0x54, 0x17, 0x20, 0x19, 0x7b, 0x9b, 0x1c, 0xb5, 0xba, 0x23, 0x18, 0xbd, 0x55, 0x74, 0xd1, 0xdf, 0x21, 0x74, 0xaf, 0x14, 0x88, 0x41, 0x49, 0xba, 0x9b, 0x2f, 0x44, 0x6d, 0x60, 0x9d, 0xf2, 0x40, 0xce, 0x33, 0x55, 0x99, 0x95, 0x7b, 0x8e, 0xc8, 0x8, 0x76, 0xd9, 0xa0, 0x85, 0xae, 0x8, 0x49, 0x7, 0xbc, 0x59, 0x61, 0xb2, 0xb, 0xf5, 0xf6, 0xca, 0x58, 0xd5, 0xda, 0xb3, 0x8a, 0xdb}, - output224: []byte{0xe2, 0x59, 0x4a, 0x63, 0x3b, 0x2d, 0xc6, 0x71, 0xfd, 0xd, 0xdf, 0xd3, 0xbf, 0x72, 0x38, 0x33, 0x2c, 0x42, 0x55, 0x20, 0x82, 0x7c, 0x52, 0x4f, 0xb0, 0xe1, 0x97, 0x78}, - output256: []byte{0x52, 0xcb, 0xc5, 0xdb, 0xe4, 0x9b, 0x0, 0x96, 0x63, 0xc4, 0x3f, 0x7, 0x9d, 0xd1, 0x80, 0xe3, 0x8a, 0x77, 0x53, 0x37, 0x78, 0x6, 0x2a, 0x72, 0xa2, 0x9e, 0x86, 0x4a, 0x58, 0x52, 0x29, 0x22}, - output384: []byte{0xa4, 0xe5, 0xee, 0x13, 0xf, 0xc1, 0x5, 0x81, 0x8c, 0xd1, 0xa0, 0xde, 0x74, 0xf1, 0x8, 0x5b, 0x9b, 0x4d, 0x93, 0x88, 0x9c, 0x50, 0x9d, 0xc3, 0xa2, 0x8, 0xb5, 0x23, 0xd, 0x39, 0xd8, 0xf3, 0x4, 0xbb, 0x40, 0x3f, 0x72, 0xbf, 0xc, 0xf5, 0xe0, 0x2c, 0x4c, 0x4a, 0x8, 0x31, 0xf3, 0x28}, - output512: []byte{0x5f, 0x96, 0x8c, 0xc6, 0xec, 0xf7, 0x1c, 0x58, 0x8a, 0x3c, 0x3b, 0xa6, 0x88, 0x58, 0xbb, 0xff, 0x96, 0x86, 0x1f, 0x66, 0xc0, 0x73, 0x3f, 0xd6, 0x1f, 0xa9, 0x1a, 0x47, 0x9a, 0x49, 0x61, 0x8d, 0xf2, 0x2d, 0x94, 0x90, 0x21, 0x9d, 0xf8, 0x0, 0x8d, 0xc7, 0x88, 0x40, 0xae, 0x2, 0x2c, 0x5d, 0x41, 0xaf, 0x2b, 0x89, 0xd, 0x2, 0x14, 0xe5, 0x62, 0xda, 0x8d, 0xf0, 0xcb, 0x3f, 0x85, 0x22}}, - testcase{ - msg: []byte{0xe3, 0x57, 0x80, 0xeb, 0x97, 0x99, 0xad, 0x4c, 0x77, 0x53, 0x5d, 0x4d, 0xdb, 0x68, 0x3c, 0xf3, 0x3e, 0xf3, 0x67, 0x71, 0x53, 0x27, 0xcf, 0x4c, 0x4a, 0x58, 0xed, 0x9c, 0xbd, 0xcd, 0xd4, 0x86, 0xf6, 0x69, 0xf8, 0x1, 0x89, 0xd5, 0x49, 0xa9, 0x36, 0x4f, 0xa8, 0x2a, 0x51, 0xa5, 0x26, 0x54, 0xec, 0x72, 0x1b, 0xb3, 0xaa, 0xb9, 0x5d, 0xce, 0xb4, 0xa8, 0x6a, 0x6a, 0xfa, 0x93, 0x82, 0x6d, 0xb9, 0x23, 0x51, 0x7e, 0x92, 0x8f, 0x33, 0xe3, 0xfb, 0xa8, 0x50, 0xd4, 0x56, 0x60, 0xef, 0x83, 0xb9, 0x87, 0x6a, 0xcc, 0xaf, 0xa2, 0xa9, 0x98, 0x7a, 0x25, 0x4b, 0x13, 0x7c, 0x6e, 0x14, 0xa, 0x21, 0x69, 0x1e, 0x10, 0x69, 0x41, 0x38, 0x48}, - output224: []byte{0x23, 0x47, 0x64, 0xaa, 0xe8, 0xc3, 0x9b, 0x15, 0x71, 0xd7, 0x74, 0x1b, 0xb1, 0x76, 0xff, 0x86, 0x24, 0x60, 0x70, 0xec, 0x9a, 0xc9, 0x7a, 0x1b, 0x2e, 0xb3, 0x54, 0x72}, - output256: []byte{0x3a, 0x8d, 0xfc, 0xfd, 0x1b, 0x36, 0x20, 0x3, 0xdd, 0xfa, 0x17, 0x91, 0x7, 0x27, 0x53, 0x9e, 0x64, 0xb1, 0x80, 0x21, 0xab, 0xba, 0x1, 0x8b, 0x5f, 0x58, 0xd7, 0x1f, 0x7a, 0x44, 0x97, 0x33}, - output384: []byte{0x9f, 0xb5, 0x70, 0x5, 0x2, 0xe0, 0x19, 0x26, 0x82, 0x4f, 0x46, 0xe9, 0xf6, 0x18, 0x94, 0xf9, 0x48, 0x7d, 0xbc, 0xf8, 0xae, 0x62, 0x17, 0x20, 0x3c, 0x85, 0x60, 0x6f, 0x97, 0x55, 0x66, 0x53, 0x93, 0x76, 0xd6, 0x23, 0x9d, 0xb0, 0x4a, 0xef, 0x9b, 0xf4, 0x8c, 0xa4, 0xf1, 0x91, 0xa9, 0xb}, - output512: []byte{0xe7, 0x14, 0x94, 0x61, 0xf9, 0xcd, 0x0, 0xb7, 0x1c, 0x21, 0x6c, 0x50, 0x4, 0x1b, 0x3e, 0xda, 0x97, 0x7, 0xd7, 0x36, 0xd, 0x4c, 0x21, 0x74, 0xc, 0x44, 0xc2, 0x12, 0x25, 0x6a, 0x31, 0xda, 0x39, 0x8f, 0xe0, 0x97, 0x8, 0xe4, 0x50, 0xea, 0x4e, 0x28, 0x26, 0xb7, 0xec, 0x20, 0xbe, 0xf7, 0x6c, 0xd2, 0xfb, 0xd9, 0xd0, 0x96, 0xaf, 0x6f, 0x77, 0xf8, 0x4a, 0xbc, 0x2e, 0x4f, 0xb0, 0x93}}, - testcase{ - msg: []byte{0x64, 0xec, 0x2, 0x1c, 0x95, 0x85, 0xe0, 0x1f, 0xfe, 0x6d, 0x31, 0xbb, 0x50, 0xd4, 0x4c, 0x79, 0xb6, 0x99, 0x3d, 0x72, 0x67, 0x81, 0x63, 0xdb, 0x47, 0x49, 0x47, 0xa0, 0x53, 0x67, 0x46, 0x19, 0xd1, 0x58, 0x1, 0x6a, 0xdb, 0x24, 0x3f, 0x5c, 0x8d, 0x50, 0xaa, 0x92, 0xf5, 0xa, 0xb3, 0x6e, 0x57, 0x9f, 0xf2, 0xda, 0xbb, 0x78, 0xa, 0x2b, 0x52, 0x93, 0x70, 0xda, 0xa2, 0x99, 0x20, 0x7c, 0xfb, 0xcd, 0xd3, 0xa9, 0xa2, 0x50, 0x6, 0xd1, 0x9c, 0x4f, 0x1f, 0xe3, 0x3e, 0x4b, 0x1e, 0xae, 0xc3, 0x15, 0xd8, 0xc6, 0xee, 0x1e, 0x73, 0x6, 0x23, 0xfd, 0x19, 0x41, 0x87, 0x5b, 0x92, 0x4e, 0xb5, 0x7d, 0x6d, 0xc, 0x2e, 0xdc, 0x4e, 0x78, 0xd6}, - output224: []byte{0xa6, 0x34, 0xd7, 0xeb, 0xaa, 0x2b, 0xc0, 0x4, 0x3e, 0xb5, 0xe2, 0x37, 0x69, 0xe, 0x38, 0xff, 0x1e, 0x5, 0xee, 0x5a, 0x4, 0x28, 0x82, 0xa2, 0x33, 0xa2, 0xd9, 0x2a}, - output256: []byte{0xfa, 0x22, 0x1d, 0xee, 0xe8, 0xe, 0x25, 0xe5, 0x3c, 0x6c, 0x44, 0x8a, 0xa2, 0x20, 0x28, 0xb7, 0x25, 0x1, 0xf0, 0x7d, 0x1f, 0xf2, 0xc3, 0xfc, 0x7f, 0x93, 0xaf, 0x98, 0x38, 0xb2, 0xd0, 0xa9}, - output384: []byte{0xf2, 0xe0, 0xff, 0x6c, 0xf4, 0x80, 0x1c, 0xff, 0x2e, 0xca, 0x17, 0x3, 0xe4, 0xe9, 0x56, 0xc0, 0x7, 0xa1, 0xf2, 0x70, 0x94, 0x30, 0xf1, 0xf7, 0xa0, 0xa4, 0xfd, 0xd1, 0x6a, 0x6, 0x35, 0x22, 0xa4, 0xdf, 0xb6, 0xc4, 0x1f, 0xa5, 0x29, 0xc2, 0xe3, 0x25, 0xf8, 0xcd, 0xd4, 0xf8, 0xda, 0x96}, - output512: []byte{0x77, 0x9, 0x74, 0x13, 0xca, 0xa5, 0xa2, 0xd3, 0x82, 0x59, 0xd4, 0x7e, 0xc0, 0x78, 0x87, 0x1f, 0xa0, 0x9e, 0xe5, 0x61, 0x4d, 0x4c, 0x14, 0xfe, 0xb7, 0xa9, 0x5c, 0x92, 0x1c, 0xa, 0xae, 0x93, 0xb8, 0x73, 0x7a, 0x6d, 0xc8, 0x9e, 0x57, 0x69, 0x3b, 0xe8, 0xa0, 0x71, 0x2, 0x6, 0x66, 0x4b, 0x80, 0xb6, 0x57, 0xa1, 0x7, 0x96, 0x5, 0xa0, 0xff, 0x96, 0x64, 0xbb, 0xcb, 0x7, 0x22, 0xd6}}, - testcase{ - msg: []byte{0x59, 0x54, 0xba, 0xb5, 0x12, 0xcf, 0x32, 0x7d, 0x66, 0xb5, 0xd9, 0xf2, 0x96, 0x18, 0x0, 0x80, 0x40, 0x26, 0x24, 0xad, 0x76, 0x28, 0x50, 0x6b, 0x55, 0x5e, 0xea, 0x83, 0x82, 0x56, 0x23, 0x24, 0xcf, 0x45, 0x2f, 0xba, 0x4a, 0x21, 0x30, 0xde, 0x3e, 0x16, 0x5d, 0x11, 0x83, 0x1a, 0x27, 0xd, 0x9c, 0xb9, 0x7c, 0xe8, 0xc2, 0xd3, 0x2a, 0x96, 0xf5, 0xd, 0x71, 0x60, 0xb, 0xb4, 0xca, 0x26, 0x8c, 0xf9, 0x8e, 0x90, 0xd6, 0x49, 0x6b, 0xa, 0x66, 0x19, 0xa5, 0xa8, 0xc6, 0x3d, 0xb6, 0xd8, 0xa0, 0x63, 0x4d, 0xfc, 0x6c, 0x7e, 0xc8, 0xea, 0x9c, 0x0, 0x6b, 0x6c, 0x45, 0x6f, 0x1b, 0x20, 0xcd, 0x19, 0xe7, 0x81, 0xaf, 0x20, 0x45, 0x4a, 0xc8, 0x80}, - output224: []byte{0xef, 0x3, 0xfb, 0xb1, 0xef, 0x32, 0x96, 0xee, 0xcf, 0xb9, 0x89, 0x9, 0xe4, 0x16, 0xd1, 0x13, 0xb5, 0x74, 0x1e, 0x44, 0x96, 0x2e, 0xc5, 0x79, 0x93, 0xc6, 0xda, 0x5d}, - output256: []byte{0xed, 0x9c, 0x8b, 0x87, 0xfc, 0xe2, 0x7b, 0xe4, 0xe9, 0x56, 0x10, 0xdb, 0x1d, 0xdd, 0xc, 0x3, 0x58, 0x47, 0xf4, 0x69, 0x9d, 0xfc, 0x8c, 0x3, 0x9a, 0x79, 0x8a, 0x30, 0x34, 0x3a, 0x60, 0x59}, - output384: []byte{0x62, 0x2, 0x9d, 0x96, 0x2d, 0x2e, 0x32, 0x36, 0x88, 0xdc, 0x58, 0x51, 0xc5, 0x49, 0xda, 0x39, 0xef, 0x49, 0xcb, 0x99, 0x4d, 0x2d, 0x6c, 0x51, 0xc5, 0x7b, 0x9b, 0xba, 0xb3, 0x75, 0xaa, 0x10, 0xbd, 0x6, 0x5, 0x20, 0x8d, 0x99, 0x46, 0xea, 0x47, 0x25, 0x73, 0x88, 0x2, 0x30, 0xdd, 0x2d}, - output512: []byte{0x55, 0xd8, 0xe5, 0x20, 0x23, 0x60, 0xd7, 0xd5, 0x84, 0x14, 0x19, 0x36, 0x2f, 0x86, 0x4c, 0xc9, 0x0, 0xe1, 0x1c, 0x58, 0x2f, 0xd0, 0xca, 0xb2, 0xff, 0x5f, 0x16, 0x80, 0xf6, 0xce, 0x92, 0x7b, 0x53, 0x79, 0xe2, 0x7a, 0x33, 0x5e, 0xba, 0xfe, 0x12, 0x86, 0xb9, 0xd4, 0xa1, 0x72, 0xab, 0x76, 0x1a, 0x36, 0xea, 0xde, 0x60, 0xf1, 0x4, 0x68, 0xea, 0xc4, 0xce, 0xaf, 0xbf, 0x63, 0xc7, 0xcc}}, - testcase{ - msg: []byte{0x3, 0xd9, 0xf9, 0x2b, 0x2c, 0x56, 0x57, 0x9, 0xa5, 0x68, 0x72, 0x4a, 0xa, 0xff, 0x90, 0xf8, 0xf3, 0x47, 0xf4, 0x3b, 0x2, 0x33, 0x8f, 0x94, 0xa0, 0x3e, 0xd3, 0x2e, 0x6f, 0x33, 0x66, 0x6f, 0xf5, 0x80, 0x2d, 0xa4, 0xc8, 0x1b, 0xdc, 0xe0, 0xd0, 0xe8, 0x6c, 0x4, 0xaf, 0xd4, 0xed, 0xc2, 0xfc, 0x8b, 0x41, 0x41, 0xc2, 0x97, 0x5b, 0x6f, 0x7, 0x63, 0x9b, 0x19, 0x94, 0xc9, 0x73, 0xd9, 0xa9, 0xaf, 0xce, 0x3d, 0x9d, 0x36, 0x58, 0x62, 0x0, 0x34, 0x98, 0x51, 0x3b, 0xfa, 0x16, 0x6d, 0x26, 0x29, 0xe3, 0x14, 0xd9, 0x74, 0x41, 0x66, 0x7b, 0x0, 0x74, 0x14, 0xe7, 0x39, 0xd7, 0xfe, 0xbf, 0xf, 0xe3, 0xc3, 0x2c, 0x17, 0xaa, 0x18, 0x8a, 0x86, 0x83}, - output224: []byte{0x21, 0xd, 0x24, 0x5c, 0xc8, 0xb5, 0xa7, 0xb4, 0xc1, 0xb1, 0x18, 0xa9, 0x89, 0xe, 0xcd, 0xdc, 0x34, 0xa6, 0x6e, 0xa9, 0x28, 0x5, 0xb7, 0xa7, 0xc1, 0x9a, 0x94, 0x4a}, - output256: []byte{0xa4, 0x85, 0xcc, 0x9c, 0xf4, 0xca, 0x4f, 0x65, 0x9f, 0x89, 0xa0, 0xb7, 0x91, 0xa4, 0x42, 0x39, 0x53, 0x42, 0x4a, 0xc5, 0x71, 0x46, 0xb8, 0x79, 0xd3, 0x85, 0xa9, 0xe4, 0x6, 0x2a, 0xfe, 0x52}, - output384: []byte{0x25, 0xe5, 0x46, 0xf7, 0x6e, 0xa9, 0xf9, 0x8e, 0x3, 0xe3, 0xb2, 0xf4, 0xab, 0x60, 0x81, 0x85, 0x7, 0x36, 0x58, 0xe7, 0xed, 0xa0, 0x77, 0x7b, 0xd5, 0xb0, 0x47, 0xa5, 0x90, 0x85, 0xc3, 0xc5, 0x0, 0x91, 0x63, 0x47, 0xd4, 0xf7, 0x7e, 0x38, 0xe3, 0x51, 0x59, 0xaf, 0x13, 0x3e, 0xd6, 0x38}, - output512: []byte{0xef, 0xfb, 0x3, 0xb4, 0x97, 0xad, 0xd6, 0x23, 0xa, 0xe, 0xd9, 0x91, 0x22, 0xea, 0x86, 0x81, 0x38, 0x64, 0x4a, 0xb8, 0x1e, 0x86, 0x14, 0x91, 0xe5, 0x26, 0xfa, 0xe3, 0x7c, 0x39, 0x87, 0x2c, 0xa7, 0x31, 0x80, 0x4a, 0x0, 0x4, 0x59, 0x98, 0x49, 0x47, 0x8a, 0x78, 0x7b, 0xc7, 0xfc, 0xe2, 0x19, 0x3, 0xed, 0x55, 0x1d, 0x7d, 0xb8, 0x81, 0xd2, 0xa2, 0xc3, 0x67, 0xb6, 0x16, 0x85, 0x47}}, - testcase{ - msg: []byte{0xf3, 0x1e, 0x8b, 0x4f, 0x9e, 0x6, 0x21, 0xd5, 0x31, 0xd2, 0x2a, 0x38, 0xb, 0xe5, 0xd9, 0xab, 0xd5, 0x6f, 0xae, 0xc5, 0x3c, 0xbd, 0x39, 0xb1, 0xfa, 0xb2, 0x30, 0xea, 0x67, 0x18, 0x44, 0x40, 0xe5, 0xb1, 0xd1, 0x54, 0x57, 0xbd, 0x25, 0xf5, 0x62, 0x4, 0xfa, 0x91, 0x7f, 0xa4, 0x8e, 0x66, 0x90, 0x16, 0xcb, 0x48, 0xc1, 0xff, 0xc1, 0xe1, 0xe4, 0x52, 0x74, 0xb3, 0xb4, 0x73, 0x79, 0xe0, 0xa, 0x43, 0x84, 0x3c, 0xf8, 0x60, 0x1a, 0x55, 0x51, 0x41, 0x1e, 0xc1, 0x25, 0x3, 0xe5, 0xaa, 0xc4, 0x3d, 0x86, 0x76, 0xa1, 0xb2, 0x29, 0x7e, 0xc7, 0xa0, 0x80, 0xd, 0xbf, 0xee, 0x4, 0x29, 0x2e, 0x93, 0x7f, 0x21, 0xc0, 0x5, 0xf1, 0x74, 0x11, 0x47, 0x30, 0x41}, - output224: []byte{0x51, 0x7b, 0xae, 0x1, 0x7, 0x15, 0xa0, 0x20, 0x43, 0x5c, 0xfd, 0xb5, 0x31, 0xb8, 0x56, 0xc5, 0x70, 0x4e, 0xe, 0xc6, 0x11, 0x36, 0xf, 0x60, 0xd5, 0xb7, 0x61, 0x61}, - output256: []byte{0x93, 0xcd, 0x43, 0x69, 0xa7, 0x79, 0x62, 0x39, 0xa5, 0xcd, 0xf7, 0x8b, 0xce, 0x22, 0xeb, 0xb2, 0x13, 0x7a, 0x63, 0x1c, 0x3a, 0x61, 0x3d, 0x5e, 0x35, 0x81, 0x6d, 0x2a, 0x64, 0xa3, 0x49, 0x47}, - output384: []byte{0xbe, 0xef, 0xce, 0xff, 0x9e, 0x2d, 0x8, 0x25, 0xd6, 0xe, 0xa2, 0xe, 0x52, 0x71, 0xbf, 0x49, 0xc4, 0xae, 0x3a, 0x5b, 0x54, 0xb5, 0x60, 0x50, 0x98, 0x8d, 0xd3, 0xdf, 0x5d, 0xb5, 0xeb, 0x4f, 0x10, 0x2, 0xef, 0xbf, 0xba, 0xed, 0x2f, 0xc7, 0x21, 0x79, 0xde, 0x44, 0x11, 0x69, 0x76, 0xb2}, - output512: []byte{0xa2, 0x26, 0x9a, 0x6e, 0xf2, 0xea, 0x8f, 0x1c, 0xf8, 0xbc, 0x33, 0x94, 0xd2, 0x76, 0x57, 0xb0, 0xdb, 0x99, 0x6c, 0x55, 0xe7, 0xc4, 0x77, 0x84, 0xc0, 0xb4, 0x51, 0x20, 0x2f, 0xc5, 0x27, 0x96, 0x79, 0xd7, 0x9e, 0x6, 0xf8, 0xdb, 0xaa, 0x9a, 0x63, 0x66, 0x5f, 0xd0, 0xe9, 0x14, 0xd1, 0x3c, 0x6e, 0x5, 0x6e, 0xa0, 0x6, 0xda, 0xaf, 0x4c, 0xb6, 0x1d, 0x26, 0x29, 0x46, 0x8e, 0x3d, 0x25}}, - testcase{ - msg: []byte{0x75, 0x8e, 0xa3, 0xfe, 0xa7, 0x38, 0x97, 0x3d, 0xb0, 0xb8, 0xbe, 0x7e, 0x59, 0x9b, 0xbe, 0xf4, 0x51, 0x93, 0x73, 0xd6, 0xe6, 0xdc, 0xd7, 0x19, 0x5e, 0xa8, 0x85, 0xfc, 0x99, 0x1d, 0x89, 0x67, 0x62, 0x99, 0x27, 0x59, 0xc2, 0xa0, 0x90, 0x2, 0x91, 0x2f, 0xb0, 0x8e, 0xc, 0xb5, 0xb7, 0x6f, 0x49, 0x16, 0x2a, 0xeb, 0x8c, 0xf8, 0x7b, 0x17, 0x2c, 0xf3, 0xad, 0x19, 0x2, 0x53, 0xdf, 0x61, 0x2f, 0x77, 0xb1, 0xf0, 0xc5, 0x32, 0xe3, 0xb5, 0xfc, 0x99, 0xc2, 0xd3, 0x1f, 0x8f, 0x65, 0x1, 0x16, 0x95, 0xa0, 0x87, 0xa3, 0x5e, 0xe4, 0xee, 0xe5, 0xe3, 0x34, 0xc3, 0x69, 0xd8, 0xee, 0x5d, 0x29, 0xf6, 0x95, 0x81, 0x5d, 0x86, 0x6d, 0xa9, 0x9d, 0xf3, 0xf7, 0x94, 0x3}, - output224: []byte{0x79, 0xd4, 0x78, 0xb4, 0xbc, 0x5e, 0x6f, 0xc2, 0xd4, 0x6, 0xbb, 0x1c, 0x38, 0x34, 0xa5, 0xce, 0x39, 0x7a, 0x88, 0xe8, 0x1, 0x35, 0xf5, 0x5d, 0x8f, 0xe3, 0x2c, 0x5e}, - output256: []byte{0x37, 0x51, 0xce, 0x8, 0x75, 0xd, 0x92, 0x7e, 0xb5, 0xc3, 0xae, 0x4c, 0xa6, 0x2a, 0x70, 0x3a, 0x48, 0x1d, 0x86, 0xa4, 0xfa, 0x1c, 0x1, 0x1e, 0x81, 0x2b, 0x4b, 0xc0, 0xa2, 0xfe, 0xf0, 0x8d}, - output384: []byte{0x7d, 0x18, 0x25, 0x4d, 0x46, 0xa1, 0x4d, 0x3, 0x83, 0xec, 0x56, 0xac, 0x9c, 0xa2, 0xfd, 0xa7, 0x88, 0x5a, 0xe6, 0x73, 0x46, 0x8c, 0x9f, 0x3b, 0x45, 0xba, 0x79, 0x2c, 0x2c, 0x23, 0xc9, 0xff, 0x82, 0x49, 0x1e, 0x6a, 0xec, 0xa1, 0x5d, 0x7, 0x6a, 0xd3, 0xa3, 0x43, 0x2c, 0xfa, 0x65, 0xc}, - output512: []byte{0x5a, 0x29, 0x70, 0xd5, 0xec, 0x34, 0x6a, 0x8e, 0x4e, 0x1d, 0x5d, 0x1e, 0x57, 0xdc, 0x22, 0xf6, 0x87, 0x5d, 0xdf, 0x1c, 0xe3, 0x62, 0x6b, 0x49, 0xa9, 0x11, 0x9, 0xe0, 0xde, 0x99, 0x10, 0x33, 0xe9, 0x32, 0xf8, 0x83, 0xb6, 0xa7, 0x95, 0x1, 0x6d, 0x50, 0x14, 0xe2, 0x68, 0x30, 0x4a, 0xbe, 0x2f, 0x75, 0x77, 0x50, 0x5a, 0xab, 0x0, 0x95, 0x69, 0x11, 0x78, 0x1f, 0x7, 0x5d, 0x11, 0x3a}}, - testcase{ - msg: []byte{0x47, 0xc6, 0xe0, 0xc2, 0xb7, 0x49, 0x48, 0x46, 0x59, 0x21, 0x86, 0x88, 0x4, 0xf0, 0xf7, 0xbd, 0x50, 0xdd, 0x32, 0x35, 0x83, 0xdc, 0x78, 0x4f, 0x99, 0x8a, 0x93, 0xcd, 0x1c, 0xa4, 0xc6, 0xef, 0x84, 0xd4, 0x1d, 0xc8, 0x1c, 0x2c, 0x40, 0xf3, 0x4b, 0x5b, 0xee, 0x6a, 0x93, 0x86, 0x7b, 0x3b, 0xdb, 0xa0, 0x5, 0x2c, 0x5f, 0x59, 0xe6, 0xf3, 0x65, 0x79, 0x18, 0xc3, 0x82, 0xe7, 0x71, 0xd3, 0x31, 0x9, 0x12, 0x2c, 0xc8, 0xbb, 0xe, 0x1e, 0x53, 0xc4, 0xe3, 0xd1, 0x3b, 0x43, 0xce, 0x44, 0x97, 0xf, 0x5e, 0xc, 0x7, 0x9d, 0x2a, 0xd7, 0xd7, 0xa3, 0x54, 0x9c, 0xd7, 0x57, 0x60, 0xc2, 0x1b, 0xb1, 0x5b, 0x44, 0x75, 0x89, 0xe8, 0x6e, 0x8d, 0x76, 0xb1, 0xe9, 0xce, 0xd2}, - output224: []byte{0xf7, 0xba, 0x7a, 0x56, 0xaf, 0xc1, 0xc5, 0x8e, 0x62, 0x84, 0x1c, 0x3b, 0x98, 0xf5, 0x67, 0x71, 0x99, 0xf2, 0x4b, 0x53, 0x4b, 0xd, 0x52, 0xd9, 0xa5, 0xc9, 0x54, 0x95}, - output256: []byte{0xa8, 0x8c, 0x7e, 0xf7, 0xb8, 0x9b, 0x7b, 0x6f, 0x75, 0xd8, 0x39, 0x22, 0xb8, 0xfd, 0x0, 0xf0, 0x34, 0xd7, 0x19, 0xf9, 0x7c, 0x67, 0x88, 0x41, 0x21, 0x43, 0x44, 0x47, 0xae, 0x9d, 0xd3, 0xb9}, - output384: []byte{0x1e, 0x3e, 0x0, 0x7c, 0xe3, 0x77, 0x92, 0xd8, 0xa4, 0x42, 0x3b, 0x79, 0x7e, 0x87, 0x6e, 0x89, 0x85, 0x95, 0x90, 0xde, 0xdd, 0x39, 0x71, 0x1a, 0xd0, 0xf1, 0xde, 0x2f, 0xd9, 0x25, 0xf4, 0x32, 0xb, 0x44, 0xbd, 0x57, 0xdd, 0xc7, 0x5, 0x4, 0x27, 0x94, 0x3e, 0x3c, 0x95, 0x7d, 0x4b, 0x6d}, - output512: []byte{0x2b, 0x43, 0x56, 0xa6, 0x4d, 0xf3, 0x19, 0x36, 0xb2, 0x7f, 0x45, 0x30, 0xf0, 0x76, 0xee, 0x73, 0xe7, 0x1e, 0x4e, 0x48, 0xab, 0xde, 0x4, 0xff, 0x1f, 0x54, 0x8e, 0x7, 0x27, 0xf4, 0xa5, 0x81, 0xb, 0x71, 0x87, 0x41, 0x87, 0xfd, 0x96, 0xed, 0x51, 0xd, 0xd, 0x68, 0x86, 0xaf, 0x11, 0x96, 0xa, 0xb, 0x3b, 0xad, 0x1e, 0xe7, 0x5d, 0xda, 0x4c, 0xdc, 0x14, 0x8e, 0x16, 0x2e, 0xda, 0xe9}}, - testcase{ - msg: []byte{0xf6, 0x90, 0xa1, 0x32, 0xab, 0x46, 0xb2, 0x8e, 0xdf, 0xa6, 0x47, 0x92, 0x83, 0xd6, 0x44, 0x4e, 0x37, 0x1c, 0x64, 0x59, 0x10, 0x8a, 0xfd, 0x9c, 0x35, 0xdb, 0xd2, 0x35, 0xe0, 0xb6, 0xb6, 0xff, 0x4c, 0x4e, 0xa5, 0x8e, 0x75, 0x54, 0xbd, 0x0, 0x24, 0x60, 0x43, 0x3b, 0x21, 0x64, 0xca, 0x51, 0xe8, 0x68, 0xf7, 0x94, 0x7d, 0x7d, 0x7a, 0xd, 0x79, 0x2e, 0x4a, 0xbf, 0xb, 0xe5, 0xf4, 0x50, 0x85, 0x3c, 0xc4, 0xd, 0x85, 0x48, 0x5b, 0x2b, 0x88, 0x57, 0xea, 0x31, 0xb5, 0xea, 0x6e, 0x4c, 0xcf, 0xa2, 0xf3, 0xa7, 0xef, 0x33, 0x80, 0x6, 0x6d, 0x7d, 0x89, 0x79, 0xfd, 0xac, 0x61, 0x8a, 0xad, 0x3d, 0x7e, 0x88, 0x6d, 0xea, 0x4f, 0x0, 0x5a, 0xe4, 0xad, 0x5, 0xe5, 0x6, 0x5f}, - output224: []byte{0x78, 0xa9, 0xb, 0x76, 0x9e, 0x9a, 0x32, 0x6c, 0x93, 0xd5, 0xa6, 0xa6, 0x10, 0x5a, 0xee, 0x3, 0x1d, 0xce, 0xb2, 0xc8, 0xd2, 0x22, 0xb3, 0x6e, 0x2, 0xf2, 0x7d, 0xb6}, - output256: []byte{0x2b, 0x4f, 0x8f, 0x9e, 0xf7, 0xd6, 0xed, 0x60, 0xbb, 0x48, 0x81, 0xe6, 0x35, 0xe0, 0xf8, 0x87, 0xa5, 0x1b, 0xc, 0x1a, 0x42, 0xba, 0xb0, 0x77, 0x97, 0x6b, 0x43, 0xd2, 0xc7, 0x15, 0xe1, 0x1a}, - output384: []byte{0xd1, 0xd2, 0x63, 0xb5, 0x31, 0x1b, 0x5, 0xc7, 0xb9, 0xf7, 0x78, 0x3e, 0x3a, 0xfd, 0x9a, 0x2e, 0x75, 0x79, 0x1c, 0xe0, 0x50, 0x3e, 0xd8, 0x20, 0x47, 0x4b, 0x35, 0x34, 0xd, 0x2c, 0xc8, 0x4b, 0x2, 0x70, 0x92, 0x1b, 0xbd, 0x96, 0x57, 0x22, 0x1, 0x1a, 0xa3, 0xc, 0xe4, 0x35, 0x29, 0x26}, - output512: []byte{0xed, 0xcb, 0x59, 0x98, 0x42, 0x67, 0xbb, 0x0, 0x40, 0x2a, 0x78, 0xf2, 0xca, 0x34, 0x5e, 0xf2, 0x49, 0x49, 0x56, 0x17, 0x2e, 0x10, 0x92, 0x7e, 0xe6, 0x3a, 0xff, 0x23, 0xd0, 0xc8, 0x34, 0xbc, 0xa5, 0xc, 0x47, 0xcd, 0xbf, 0xfd, 0x89, 0x95, 0x3, 0x63, 0x7, 0xe9, 0xed, 0x4b, 0x14, 0x3e, 0x85, 0x34, 0x50, 0x36, 0x7d, 0xe, 0x14, 0xaf, 0xc8, 0x49, 0x0, 0x73, 0x65, 0x3c, 0xd8, 0x50}}, - testcase{ - msg: []byte{0x58, 0xd6, 0xa9, 0x9b, 0xc6, 0x45, 0x88, 0x24, 0xb2, 0x56, 0x91, 0x67, 0x70, 0xa8, 0x41, 0x70, 0x40, 0x72, 0x1c, 0xcc, 0xfd, 0x4b, 0x79, 0xea, 0xcd, 0x8b, 0x65, 0xa3, 0x76, 0x7c, 0xe5, 0xba, 0x7e, 0x74, 0x10, 0x4c, 0x98, 0x5a, 0xc5, 0x6b, 0x8c, 0xc9, 0xae, 0xbd, 0x16, 0xfe, 0xbd, 0x4c, 0xda, 0x5a, 0xdb, 0x13, 0xb, 0xf, 0xf2, 0x32, 0x9c, 0xc8, 0xd6, 0x11, 0xeb, 0x14, 0xda, 0xc2, 0x68, 0xa2, 0xf9, 0xe6, 0x33, 0xc9, 0x9d, 0xe3, 0x39, 0x97, 0xfe, 0xa4, 0x1c, 0x52, 0xa7, 0xc5, 0xe1, 0x31, 0x7d, 0x5b, 0x5d, 0xae, 0xd3, 0x5e, 0xba, 0x7d, 0x5a, 0x60, 0xe4, 0x5d, 0x1f, 0xa7, 0xea, 0xab, 0xc3, 0x5f, 0x5c, 0x2b, 0xa, 0xf, 0x23, 0x79, 0x23, 0x19, 0x53, 0x32, 0x2c, 0x4e}, - output224: []byte{0x3d, 0x9d, 0x5c, 0x2f, 0xd2, 0xf6, 0xf, 0x4b, 0xb8, 0x9e, 0x11, 0xfd, 0x3b, 0xc2, 0xfb, 0xd6, 0x56, 0x2, 0xeb, 0x3f, 0x3f, 0x38, 0xd6, 0xfa, 0x3, 0xbd, 0xce, 0x2c}, - output256: []byte{0x58, 0x6c, 0xff, 0xdc, 0x43, 0x43, 0x13, 0xcc, 0x4e, 0x13, 0x3e, 0x85, 0xac, 0x88, 0xb3, 0xe5, 0xde, 0xa7, 0x18, 0x18, 0xab, 0xca, 0xc2, 0x36, 0xf0, 0xaa, 0xe4, 0x18, 0xf7, 0x2b, 0x6c, 0xde}, - output384: []byte{0xe4, 0x82, 0xb0, 0xc1, 0xb2, 0x5, 0x7f, 0x1b, 0x6b, 0x89, 0x7b, 0xdc, 0x23, 0xd, 0xca, 0x2b, 0x48, 0xff, 0xc0, 0xe4, 0x60, 0xa, 0xc4, 0xa, 0x44, 0xdc, 0xe0, 0x3e, 0x99, 0xa8, 0xd1, 0xdf, 0x94, 0x90, 0x8a, 0x9f, 0xeb, 0xa0, 0x40, 0x5d, 0xa7, 0x95, 0x69, 0xe7, 0x50, 0x59, 0xf9, 0xce}, - output512: []byte{0xd0, 0xb4, 0x53, 0xfb, 0xe7, 0x9, 0xc6, 0x91, 0x25, 0xdc, 0x8f, 0xe9, 0xe8, 0xae, 0x92, 0x45, 0x21, 0x16, 0x12, 0x97, 0x3, 0x73, 0xb4, 0x54, 0xf8, 0x65, 0x6a, 0x75, 0x5e, 0x84, 0x35, 0xb3, 0x21, 0xdd, 0x3a, 0x98, 0xf, 0xa2, 0x87, 0x19, 0x64, 0x17, 0x47, 0xe2, 0x54, 0xdc, 0x42, 0xc9, 0xbf, 0x1, 0x2b, 0x4d, 0x6d, 0xbd, 0x7e, 0xd1, 0x30, 0x20, 0xa8, 0x3b, 0x44, 0xc5, 0x4, 0xaa}}, - testcase{ - msg: []byte{0xbe, 0xfa, 0xb5, 0x74, 0x39, 0x6d, 0x7f, 0x8b, 0x67, 0x5, 0xe2, 0xd5, 0xb5, 0x8b, 0x2c, 0x1c, 0x82, 0xb, 0xb2, 0x4e, 0x3f, 0x4b, 0xae, 0x3e, 0x8f, 0xbc, 0xd3, 0x6d, 0xbf, 0x73, 0x4e, 0xe1, 0x4e, 0x5d, 0x6a, 0xb9, 0x72, 0xae, 0xdd, 0x35, 0x40, 0x23, 0x54, 0x66, 0xe8, 0x25, 0x85, 0xe, 0xe4, 0xc5, 0x12, 0xea, 0x97, 0x95, 0xab, 0xfd, 0x33, 0xf3, 0x30, 0xd9, 0xfd, 0x7f, 0x79, 0xe6, 0x2b, 0xbb, 0x63, 0xa6, 0xea, 0x85, 0xde, 0x15, 0xbe, 0xae, 0xea, 0x6f, 0x8d, 0x20, 0x4a, 0x28, 0x95, 0x60, 0x59, 0xe2, 0x63, 0x2d, 0x11, 0x86, 0x1d, 0xfb, 0xe, 0x65, 0xbc, 0x7, 0xac, 0x8a, 0x15, 0x93, 0x88, 0xd5, 0xc3, 0x27, 0x7e, 0x22, 0x72, 0x86, 0xf6, 0x5f, 0xf5, 0xe5, 0xb5, 0xae, 0xc1}, - output224: []byte{0xe1, 0xfa, 0xbe, 0x16, 0x15, 0x25, 0x60, 0x38, 0x7f, 0xad, 0xad, 0x33, 0x24, 0xcb, 0xb9, 0x4d, 0x8a, 0xf9, 0x68, 0x78, 0x6c, 0x3c, 0x99, 0x4c, 0x8f, 0x92, 0x6d, 0x32}, - output256: []byte{0x52, 0xd1, 0x4a, 0xb9, 0x6b, 0x24, 0xaa, 0x4a, 0x7a, 0x55, 0x72, 0x1a, 0xa8, 0x55, 0xb, 0x1f, 0xcc, 0xac, 0x36, 0x53, 0xc7, 0x82, 0x34, 0x78, 0x3f, 0x72, 0x95, 0xae, 0x5f, 0x39, 0xa1, 0x7a}, - output384: []byte{0xe5, 0x4b, 0xc3, 0xb2, 0x49, 0xdf, 0xf6, 0x37, 0x0, 0x1b, 0x58, 0xd1, 0x3c, 0xbf, 0x64, 0xf4, 0x53, 0xe0, 0x1a, 0xd6, 0x8a, 0x55, 0x4c, 0xa9, 0x94, 0xf7, 0x1e, 0xc7, 0x10, 0x21, 0x6e, 0xf9, 0x76, 0x9f, 0x1c, 0x8b, 0x46, 0x3d, 0xc7, 0xb4, 0xa9, 0xa, 0xc, 0xea, 0xce, 0xd4, 0x1e, 0x3d}, - output512: []byte{0xfe, 0x97, 0xc0, 0x11, 0xe5, 0x25, 0x11, 0xe, 0x3, 0x14, 0x9f, 0xac, 0x41, 0x79, 0x89, 0x1a, 0xfc, 0xb6, 0x30, 0x4e, 0x1c, 0xfd, 0x9d, 0x84, 0xcb, 0x73, 0x89, 0x75, 0x55, 0x54, 0xee, 0x72, 0x35, 0x71, 0xd7, 0x6b, 0x80, 0xb9, 0x33, 0x3a, 0x69, 0x58, 0x84, 0x19, 0x23, 0x40, 0xb3, 0xfe, 0x2, 0x2d, 0x4a, 0x23, 0x3b, 0x7a, 0xa8, 0xe8, 0xc7, 0x68, 0x67, 0x45, 0xcf, 0xe7, 0x5e, 0x67}}, - testcase{ - msg: []byte{0x8e, 0x58, 0x14, 0x4f, 0xa9, 0x17, 0x9d, 0x68, 0x64, 0x78, 0x62, 0x2c, 0xe4, 0x50, 0xc7, 0x48, 0x26, 0xc, 0x95, 0xd1, 0xba, 0x43, 0xb8, 0xf9, 0xb5, 0x9a, 0xbe, 0xca, 0x8d, 0x93, 0x48, 0x8d, 0xa7, 0x34, 0x63, 0xef, 0x40, 0x19, 0x8b, 0x4d, 0x16, 0xfb, 0xb, 0x7, 0x7, 0x20, 0x13, 0x47, 0xe0, 0x50, 0x6f, 0xf1, 0x9d, 0x1, 0xbe, 0xa0, 0xf4, 0x2b, 0x8a, 0xf9, 0xe7, 0x1a, 0x1f, 0x1b, 0xd1, 0x68, 0x78, 0x10, 0x69, 0xd4, 0xd3, 0x38, 0xfd, 0xef, 0x0, 0xbf, 0x41, 0x9f, 0xbb, 0x0, 0x30, 0x31, 0xdf, 0x67, 0x1f, 0x4a, 0x37, 0x97, 0x95, 0x64, 0xf6, 0x92, 0x82, 0xde, 0x9c, 0x65, 0x40, 0x78, 0x47, 0xdd, 0xd, 0xa5, 0x5, 0xab, 0x16, 0x41, 0xc0, 0x2d, 0xea, 0x4f, 0xd, 0x83, 0x49, 0x86}, - output224: []byte{0xce, 0xf8, 0x4f, 0x19, 0x66, 0x21, 0x5b, 0x15, 0x11, 0xf5, 0xe0, 0xdb, 0x56, 0x4d, 0x68, 0x27, 0x89, 0x81, 0x84, 0xfb, 0xcb, 0x88, 0xbe, 0x2, 0x13, 0xfc, 0x56, 0x3f}, - output256: []byte{0xb6, 0x34, 0x5e, 0xdd, 0x96, 0x60, 0x30, 0xcf, 0x70, 0xdf, 0xb5, 0xb7, 0x55, 0x2b, 0xc1, 0x41, 0xc4, 0x2e, 0xfe, 0x7a, 0x7e, 0x84, 0xf9, 0x57, 0xb1, 0xba, 0xf4, 0x67, 0x1b, 0xae, 0x43, 0x54}, - output384: []byte{0x1, 0xdc, 0x4c, 0xed, 0x46, 0x93, 0xb3, 0x68, 0x14, 0x44, 0x38, 0x57, 0x93, 0x1c, 0x5d, 0x3c, 0xee, 0x87, 0x62, 0xfd, 0xa0, 0x22, 0xf, 0x8e, 0x9e, 0x63, 0xab, 0x1e, 0xe9, 0xa7, 0x13, 0x5a, 0xde, 0x21, 0xc5, 0xab, 0x37, 0x91, 0x82, 0x13, 0x52, 0xff, 0xbc, 0x32, 0x2f, 0x3e, 0xd2, 0x8}, - output512: []byte{0x1b, 0xc4, 0xac, 0x8d, 0x97, 0x9c, 0xa6, 0x2a, 0x7f, 0xc8, 0x1c, 0x71, 0xc, 0xed, 0xf6, 0x5a, 0xf5, 0x6c, 0x9b, 0x65, 0x2e, 0xec, 0x35, 0x6a, 0xa9, 0x2d, 0xa9, 0x24, 0xd3, 0x70, 0xfd, 0xeb, 0xdf, 0x7, 0x6f, 0x91, 0xba, 0x4f, 0xe1, 0xec, 0x5c, 0xd7, 0x8f, 0xc4, 0xc8, 0x88, 0x5e, 0xa4, 0x30, 0x4b, 0xa2, 0xe8, 0xe6, 0x49, 0x44, 0xab, 0x4b, 0xf4, 0xd1, 0xb3, 0xd7, 0xde, 0xe7, 0x45}}, - testcase{ - msg: []byte{0xb5, 0x5c, 0x10, 0xea, 0xe0, 0xec, 0x68, 0x4c, 0x16, 0xd1, 0x34, 0x63, 0xf2, 0x92, 0x91, 0xbf, 0x26, 0xc8, 0x2e, 0x2f, 0xa0, 0x42, 0x2a, 0x99, 0xc7, 0x1d, 0xb4, 0xaf, 0x14, 0xdd, 0x9c, 0x7f, 0x33, 0xed, 0xa5, 0x2f, 0xd7, 0x3d, 0x1, 0x7c, 0xc0, 0xf2, 0xdb, 0xe7, 0x34, 0xd8, 0x31, 0xf0, 0xd8, 0x20, 0xd0, 0x6d, 0x5f, 0x89, 0xda, 0xcc, 0x48, 0x57, 0x39, 0x14, 0x4f, 0x8c, 0xfd, 0x47, 0x99, 0x22, 0x3b, 0x1a, 0xff, 0x90, 0x31, 0xa1, 0x5, 0xcb, 0x6a, 0x2, 0x9b, 0xa7, 0x1e, 0x6e, 0x58, 0x67, 0xd8, 0x5a, 0x55, 0x49, 0x91, 0xc3, 0x8d, 0xf3, 0xc9, 0xef, 0x8c, 0x1e, 0x1e, 0x9a, 0x76, 0x30, 0xbe, 0x61, 0xca, 0xab, 0xca, 0x69, 0x28, 0xc, 0x39, 0x9c, 0x1f, 0xb7, 0xa1, 0x2d, 0x12, 0xae, 0xfc}, - output224: []byte{0x8e, 0x4b, 0x5a, 0x2b, 0x79, 0xfc, 0x1e, 0x7d, 0x5, 0x26, 0xaa, 0xcb, 0x5b, 0x9a, 0xc0, 0x1a, 0x56, 0x96, 0x35, 0x64, 0x4c, 0x92, 0x49, 0xdf, 0xfe, 0xe3, 0xb9, 0x27}, - output256: []byte{0x3, 0x47, 0x90, 0x19, 0x65, 0xd3, 0x63, 0x50, 0x5, 0xe7, 0x5a, 0x10, 0x95, 0x69, 0x5c, 0xca, 0x5, 0xb, 0xc9, 0xed, 0x2d, 0x44, 0xc, 0x3, 0x72, 0xa3, 0x1b, 0x34, 0x85, 0x14, 0xa8, 0x89}, - output384: []byte{0x58, 0x7c, 0x81, 0x4, 0x93, 0x6b, 0xdd, 0x74, 0x70, 0x6, 0x66, 0x66, 0x38, 0x43, 0x74, 0x60, 0x15, 0x90, 0x6c, 0xf4, 0xc6, 0x81, 0xc2, 0xa6, 0xff, 0xdd, 0x7, 0xb7, 0x32, 0xe9, 0xe7, 0x78, 0x7b, 0x16, 0x5e, 0x11, 0x7d, 0xa3, 0x40, 0xbc, 0xe4, 0xe2, 0x73, 0x2, 0xba, 0x28, 0x82, 0x99}, - output512: []byte{0x76, 0xe9, 0x70, 0xe9, 0x44, 0x9d, 0x86, 0x80, 0x67, 0xcd, 0x23, 0xb1, 0xa2, 0x2, 0xcb, 0xdc, 0x99, 0x69, 0x3f, 0xf6, 0xfa, 0x74, 0xba, 0x64, 0x4e, 0xc4, 0x1c, 0xbf, 0x8f, 0xd1, 0x39, 0xcb, 0xf, 0x5d, 0x11, 0x6, 0xfc, 0xd6, 0xc8, 0x71, 0xc3, 0x15, 0xff, 0x41, 0xc3, 0xea, 0xf9, 0x9c, 0x63, 0x62, 0x88, 0xf0, 0xfc, 0xf6, 0xa4, 0xb, 0x48, 0xc, 0xb8, 0x81, 0xd8, 0x7e, 0x9, 0x8f}}, - testcase{ - msg: []byte{0x2e, 0xee, 0xa6, 0x93, 0xf5, 0x85, 0xf4, 0xed, 0x6f, 0x6f, 0x88, 0x65, 0xbb, 0xae, 0x47, 0xa6, 0x90, 0x8a, 0xec, 0xd7, 0xc4, 0x29, 0xe4, 0xbe, 0xc4, 0xf0, 0xde, 0x1d, 0xc, 0xa0, 0x18, 0x3f, 0xa2, 0x1, 0xa0, 0xcb, 0x14, 0xa5, 0x29, 0xb7, 0xd7, 0xac, 0xe, 0x6f, 0xf6, 0x60, 0x7a, 0x32, 0x43, 0xee, 0x9f, 0xb1, 0x1b, 0xcf, 0x3e, 0x23, 0x4, 0xfe, 0x75, 0xff, 0xcd, 0xdd, 0x6c, 0x5c, 0x2e, 0x2a, 0x4c, 0xd4, 0x5f, 0x63, 0xc9, 0x62, 0xd0, 0x10, 0x64, 0x50, 0x58, 0xd3, 0x65, 0x71, 0x40, 0x4a, 0x6d, 0x2b, 0x4f, 0x44, 0x75, 0x54, 0x34, 0xd7, 0x69, 0x98, 0xe8, 0x34, 0x9, 0xc3, 0x20, 0x5a, 0xa1, 0x61, 0x5d, 0xb4, 0x40, 0x57, 0xdb, 0x99, 0x12, 0x31, 0xd2, 0xcb, 0x42, 0x62, 0x45, 0x74, 0xf5, 0x45}, - output224: []byte{0xba, 0xff, 0x55, 0xcd, 0xad, 0x66, 0xaa, 0x77, 0xad, 0x67, 0x7e, 0x13, 0xa1, 0x38, 0xb2, 0xf1, 0x72, 0x86, 0xb5, 0x4, 0xea, 0x6b, 0x94, 0xef, 0xfd, 0x9d, 0x9a, 0x95}, - output256: []byte{0xf0, 0xbf, 0x71, 0x5, 0x87, 0xf, 0x23, 0x82, 0xb7, 0x68, 0x63, 0xbb, 0x97, 0xae, 0xe7, 0x9f, 0x95, 0xae, 0xe, 0x81, 0x42, 0x67, 0x5b, 0xbc, 0xcd, 0xb3, 0x47, 0x5b, 0xc, 0x99, 0x35, 0x2f}, - output384: []byte{0x51, 0x75, 0x33, 0x84, 0xc8, 0xf9, 0x58, 0x4b, 0xe3, 0xed, 0x45, 0x26, 0xb9, 0xb2, 0x9a, 0x97, 0xdc, 0x8a, 0x87, 0xd1, 0x95, 0xd0, 0x15, 0x5e, 0x74, 0x44, 0x95, 0xe, 0xea, 0x55, 0xab, 0xec, 0x5c, 0xd, 0x78, 0x14, 0xf1, 0xdf, 0xce, 0x5c, 0xa4, 0xbf, 0x1d, 0x50, 0xeb, 0xc7, 0x9, 0xad}, - output512: []byte{0x87, 0x16, 0x66, 0xb2, 0x30, 0xc5, 0xad, 0x75, 0xb9, 0x6d, 0x63, 0xbe, 0x22, 0x87, 0x6, 0x21, 0xc6, 0x8f, 0xd0, 0x89, 0x96, 0x55, 0xba, 0x7d, 0xc0, 0xe0, 0xe5, 0x29, 0x99, 0x15, 0xaf, 0x25, 0x2c, 0x22, 0x6d, 0xd7, 0x21, 0x76, 0x1, 0xd3, 0xa6, 0x88, 0xd, 0x55, 0xee, 0x5a, 0x20, 0xb1, 0x8, 0x20, 0xe2, 0x1c, 0x74, 0xf7, 0x30, 0xee, 0xa9, 0xd4, 0x7f, 0xe2, 0x6d, 0xeb, 0xe0, 0x6}}, - testcase{ - msg: []byte{0xda, 0xb1, 0x1d, 0xc0, 0xb0, 0x47, 0xdb, 0x4, 0x20, 0xa5, 0x85, 0xf5, 0x6c, 0x42, 0xd9, 0x31, 0x75, 0x56, 0x28, 0x52, 0x42, 0x84, 0x99, 0xf6, 0x6a, 0xd, 0xb8, 0x11, 0xfc, 0xdd, 0xda, 0xb2, 0xf7, 0xcd, 0xff, 0xed, 0x15, 0x43, 0xe5, 0xfb, 0x72, 0x11, 0xb, 0x64, 0x68, 0x6b, 0xc7, 0xb6, 0x88, 0x7a, 0x53, 0x8a, 0xd4, 0x4c, 0x5, 0xf, 0x1e, 0x42, 0x63, 0x1b, 0xc4, 0xec, 0x8a, 0x9f, 0x2a, 0x4, 0x71, 0x63, 0xd8, 0x22, 0xa3, 0x89, 0x89, 0xee, 0x4a, 0xab, 0x1, 0xb4, 0xc1, 0xf1, 0x61, 0xb0, 0x62, 0xd8, 0x73, 0xb1, 0xcf, 0xa3, 0x88, 0xfd, 0x30, 0x15, 0x14, 0xf6, 0x22, 0x24, 0x15, 0x7b, 0x9b, 0xef, 0x42, 0x3c, 0x77, 0x83, 0xb7, 0xaa, 0xc8, 0xd3, 0xd, 0x65, 0xcd, 0x1b, 0xba, 0x8d, 0x68, 0x9c, 0x2d}, - output224: []byte{0xb4, 0xef, 0xbe, 0x11, 0x67, 0x75, 0x5f, 0x5a, 0x75, 0xb7, 0x2c, 0xf1, 0x5e, 0x6, 0x1, 0x66, 0x2d, 0x3, 0x6a, 0x16, 0xca, 0xc8, 0x60, 0x2a, 0x90, 0x9f, 0xb3, 0x28}, - output256: []byte{0x63, 0x1c, 0x6f, 0x5a, 0xbe, 0x50, 0xb2, 0x7c, 0x9d, 0xea, 0x55, 0x7f, 0xc3, 0xfb, 0xd3, 0xfb, 0x25, 0x78, 0x1f, 0xcb, 0x1b, 0xbf, 0x9f, 0x2e, 0x1, 0xc, 0xca, 0x20, 0xec, 0x52, 0xdb, 0xc4}, - output384: []byte{0xbd, 0x1e, 0x1e, 0x9a, 0xe8, 0xb, 0x7f, 0xa7, 0x9a, 0xdb, 0xd4, 0x7d, 0x7a, 0x28, 0xba, 0x44, 0xf4, 0x87, 0x41, 0x8, 0xcd, 0x9b, 0xe5, 0xd3, 0x27, 0xcc, 0x93, 0xc6, 0xed, 0x4d, 0xac, 0xf8, 0xa9, 0xe2, 0xa3, 0x49, 0x1d, 0x41, 0x68, 0xbf, 0xfa, 0xe6, 0x3f, 0xb2, 0xf1, 0x7, 0xd, 0xe7}, - output512: []byte{0x7e, 0x3e, 0xf6, 0x25, 0x52, 0xb2, 0x8a, 0x2b, 0x18, 0xa7, 0x1c, 0xee, 0xf2, 0xdd, 0x86, 0x59, 0xc8, 0xbd, 0xf2, 0x91, 0x38, 0x5a, 0xd0, 0x2f, 0xed, 0x35, 0x37, 0x75, 0xe0, 0x15, 0x94, 0xf2, 0x7c, 0xc2, 0x8c, 0xc7, 0x86, 0x63, 0xe1, 0x7c, 0xb8, 0xb3, 0x9f, 0xd4, 0xea, 0x48, 0xd4, 0x94, 0xad, 0xb, 0xd7, 0xae, 0xe9, 0x27, 0x7e, 0xc9, 0xb2, 0x1e, 0x46, 0x52, 0x38, 0x12, 0x73, 0x6e}}, - testcase{ - msg: []byte{0x42, 0xe9, 0x9a, 0x2f, 0x80, 0xae, 0xe0, 0xe0, 0x1, 0x27, 0x9a, 0x24, 0x34, 0xf7, 0x31, 0xe0, 0x1d, 0x34, 0xa4, 0x4b, 0x1a, 0x81, 0x1, 0x72, 0x69, 0x21, 0xc0, 0x59, 0xc, 0x30, 0xf3, 0x12, 0xe, 0xb8, 0x30, 0x59, 0xf3, 0x25, 0xe8, 0x94, 0xa5, 0xac, 0x95, 0x9d, 0xca, 0x71, 0xce, 0x22, 0x14, 0x79, 0x99, 0x16, 0x42, 0x4e, 0x85, 0x9d, 0x27, 0xd7, 0x89, 0x43, 0x7b, 0x9d, 0x27, 0x24, 0xb, 0xf8, 0xc3, 0x5a, 0xdb, 0xaf, 0xce, 0xcc, 0x32, 0x2b, 0x48, 0xaa, 0x20, 0x5b, 0x29, 0x39, 0x62, 0xd8, 0x58, 0x65, 0x2a, 0xba, 0xcb, 0xd5, 0x88, 0xbc, 0xf6, 0xcb, 0xc3, 0x88, 0xd0, 0x99, 0x3b, 0xd6, 0x22, 0xf9, 0x6e, 0xd5, 0x46, 0x14, 0xc2, 0x5b, 0x6a, 0x9a, 0xa5, 0x27, 0x58, 0x9e, 0xaa, 0xff, 0xcf, 0x17, 0xdd, 0xf7}, - output224: []byte{0xfa, 0x4b, 0xb6, 0x8, 0xf8, 0xf6, 0x8, 0x41, 0xe1, 0x18, 0x9f, 0x87, 0x70, 0x5, 0x16, 0x95, 0xcd, 0xc9, 0x93, 0x5b, 0xda, 0x71, 0x87, 0xc3, 0x64, 0x19, 0x22, 0x8a}, - output256: []byte{0x37, 0x57, 0xa5, 0x3d, 0x19, 0x5b, 0x43, 0xb4, 0x3, 0xa7, 0x96, 0xa7, 0x4a, 0xaf, 0xb2, 0x6, 0x40, 0x72, 0xa6, 0x9e, 0x37, 0x2e, 0xe5, 0xb3, 0x6c, 0xc2, 0xb7, 0xa7, 0x91, 0xf7, 0x5c, 0x9f}, - output384: []byte{0x6b, 0x7c, 0x11, 0x44, 0xfa, 0x98, 0x42, 0x61, 0x37, 0x7d, 0xba, 0xac, 0xa7, 0x8a, 0x3, 0xae, 0x58, 0xb, 0x7f, 0x3a, 0x17, 0xd6, 0x9b, 0xa0, 0xd5, 0x6e, 0xe9, 0x8, 0xdd, 0x9e, 0xc9, 0xf8, 0x7e, 0xa3, 0xa, 0x76, 0x26, 0xed, 0x7c, 0xcf, 0x25, 0xb5, 0x3a, 0x69, 0x94, 0xe1, 0x21, 0xe8}, - output512: []byte{0xb, 0x87, 0xf6, 0xeb, 0xaa, 0x29, 0x3f, 0xf7, 0x9c, 0x87, 0x38, 0x20, 0x84, 0x6c, 0xf, 0xcc, 0x94, 0x3e, 0x3a, 0x83, 0xbd, 0x81, 0x11, 0x93, 0x1f, 0xf0, 0x3f, 0xf3, 0xb0, 0xbf, 0x78, 0x5c, 0x96, 0x1c, 0xa8, 0x4c, 0xf3, 0xfd, 0x40, 0xe0, 0xd8, 0x31, 0xdb, 0xae, 0xa5, 0x95, 0x49, 0x8f, 0xc1, 0x2d, 0xa8, 0x8c, 0xc5, 0x7, 0xde, 0x72, 0xa, 0x35, 0xc0, 0x1d, 0x73, 0xfc, 0x95, 0x95}}, - testcase{ - msg: []byte{0x3c, 0x9b, 0x46, 0x45, 0xc, 0xf, 0x2c, 0xae, 0x8e, 0x38, 0x23, 0xf8, 0xbd, 0xb4, 0x27, 0x7f, 0x31, 0xb7, 0x44, 0xce, 0x2e, 0xb1, 0x70, 0x54, 0xbd, 0xdc, 0x6d, 0xff, 0x36, 0xaf, 0x7f, 0x49, 0xfb, 0x8a, 0x23, 0x20, 0xcc, 0x3b, 0xdf, 0x8e, 0xa, 0x2e, 0xa2, 0x9a, 0xd3, 0xa5, 0x5d, 0xe1, 0x16, 0x5d, 0x21, 0x9a, 0xde, 0xdd, 0xb5, 0x17, 0x52, 0x53, 0xe2, 0xd1, 0x48, 0x9e, 0x9b, 0x6f, 0xdd, 0x2, 0xe2, 0xc3, 0xd3, 0xa4, 0xb5, 0x4d, 0x60, 0xe3, 0xa4, 0x73, 0x34, 0xc3, 0x79, 0x13, 0xc5, 0x69, 0x53, 0x78, 0xa6, 0x69, 0xe9, 0xb7, 0x2d, 0xec, 0x32, 0xaf, 0x54, 0x34, 0xf9, 0x3f, 0x46, 0x17, 0x6e, 0xbf, 0x4, 0x4c, 0x47, 0x84, 0x46, 0x7c, 0x70, 0x4, 0x70, 0xd0, 0xc0, 0xb4, 0xc, 0x8a, 0x8, 0x8c, 0x81, 0x58, 0x16}, - output224: []byte{0xb3, 0xa8, 0x77, 0x23, 0x15, 0x19, 0xc2, 0x4e, 0x2e, 0xfa, 0x42, 0x4e, 0x60, 0x57, 0x12, 0x8e, 0xa1, 0x5, 0xb5, 0x4c, 0x65, 0xe5, 0x80, 0x74, 0xb5, 0xb1, 0x58, 0x3c}, - output256: []byte{0xc, 0xc9, 0x3, 0xac, 0xbc, 0xed, 0x72, 0x4b, 0x22, 0x1d, 0x34, 0x87, 0x7d, 0x1d, 0x14, 0x27, 0x18, 0x2f, 0x94, 0x93, 0xa3, 0x3d, 0xf7, 0x75, 0x87, 0x20, 0xe8, 0xbf, 0xc7, 0xaf, 0x98, 0xee}, - output384: []byte{0x76, 0x41, 0x4f, 0x3b, 0x9e, 0x4f, 0xf8, 0xd1, 0x50, 0x28, 0xc, 0x8e, 0x44, 0xbc, 0x54, 0x5, 0x68, 0x49, 0xb2, 0x53, 0x51, 0x35, 0x2d, 0x9d, 0x9e, 0x98, 0x6b, 0x3e, 0xcb, 0x6e, 0xc0, 0x50, 0x54, 0x27, 0x9, 0xaf, 0xe0, 0x19, 0x79, 0xd2, 0xeb, 0x97, 0xe5, 0x1d, 0x41, 0x21, 0x7e, 0x6e}, - output512: []byte{0x68, 0x1b, 0xab, 0xbd, 0x2e, 0x35, 0x15, 0x1, 0xc2, 0x85, 0x81, 0x2e, 0x6, 0xf2, 0x9, 0x40, 0xfd, 0x86, 0x55, 0x16, 0xcf, 0x2, 0x8b, 0x47, 0x87, 0xd1, 0xff, 0xcc, 0xd0, 0xd5, 0x37, 0x70, 0x5e, 0x8e, 0x9b, 0x73, 0xc6, 0x8, 0xd5, 0xa8, 0xdc, 0x4f, 0x8, 0xee, 0xe0, 0x90, 0x2a, 0xc1, 0x29, 0x36, 0xdd, 0xb8, 0xc7, 0xb2, 0x92, 0x28, 0xc6, 0xaa, 0xf8, 0xd0, 0xb9, 0x9, 0xc3, 0xd}}, - testcase{ - msg: []byte{0xd1, 0xe6, 0x54, 0xb7, 0x7c, 0xb1, 0x55, 0xf5, 0xc7, 0x79, 0x71, 0xa6, 0x4d, 0xf9, 0xe5, 0xd3, 0x4c, 0x26, 0xa3, 0xca, 0xd6, 0xc7, 0xf6, 0xb3, 0x0, 0xd3, 0x9d, 0xeb, 0x19, 0x10, 0x9, 0x46, 0x91, 0xad, 0xaa, 0x9, 0x5b, 0xe4, 0xba, 0x5d, 0x86, 0x69, 0xa, 0x97, 0x64, 0x28, 0x63, 0x5d, 0x55, 0x26, 0xf3, 0xe9, 0x46, 0xf7, 0xdc, 0x3b, 0xd4, 0xdb, 0xc7, 0x89, 0x99, 0xe6, 0x53, 0x44, 0x11, 0x87, 0xa8, 0x1f, 0x9a, 0xdc, 0xd5, 0xa3, 0xc5, 0xf2, 0x54, 0xbc, 0x82, 0x56, 0xb0, 0x15, 0x8f, 0x54, 0x67, 0x3d, 0xcc, 0x12, 0x32, 0xf6, 0xe9, 0x18, 0xeb, 0xfc, 0x6c, 0x51, 0xce, 0x67, 0xea, 0xeb, 0x4, 0x2d, 0x9f, 0x57, 0xee, 0xc4, 0xbf, 0xe9, 0x10, 0xe1, 0x69, 0xaf, 0x78, 0xb3, 0xde, 0x48, 0xd1, 0x37, 0xdf, 0x4f, 0x28, 0x40}, - output224: []byte{0x9f, 0x38, 0x5c, 0xb, 0x64, 0x5d, 0xb8, 0xdb, 0x8b, 0x73, 0xc9, 0x8c, 0x40, 0xbe, 0x26, 0x4f, 0xfe, 0xe6, 0x15, 0x1c, 0x7b, 0x5a, 0x9, 0x64, 0xe6, 0x7d, 0xaa, 0x9f}, - output256: []byte{0xf2, 0x37, 0x50, 0xc3, 0x29, 0x73, 0xf2, 0x4c, 0x24, 0x22, 0xf4, 0xe2, 0xb4, 0x35, 0x89, 0xd9, 0xe7, 0x6d, 0x6a, 0x57, 0x59, 0x38, 0xe0, 0x1a, 0x96, 0xae, 0x8e, 0x73, 0xd0, 0x26, 0x56, 0x9c}, - output384: []byte{0x92, 0xac, 0x60, 0xe5, 0xdc, 0x49, 0x20, 0x10, 0xa4, 0x5f, 0x46, 0xae, 0xf0, 0x5f, 0x40, 0x3f, 0x75, 0x69, 0xe1, 0xb4, 0xe2, 0xd0, 0xc9, 0x9, 0xc8, 0x71, 0xa7, 0x83, 0xfc, 0x12, 0x45, 0x7d, 0xe2, 0x81, 0xaf, 0xf4, 0xc4, 0xce, 0xe0, 0x20, 0x7d, 0x20, 0xea, 0xf5, 0x46, 0x28, 0x50, 0x70}, - output512: []byte{0xc4, 0x6d, 0x22, 0x62, 0xf1, 0x86, 0x42, 0x1d, 0x7, 0xfd, 0x74, 0xf, 0x92, 0x23, 0x6, 0xd9, 0x9b, 0x1e, 0x38, 0x26, 0xf6, 0xa3, 0x24, 0x86, 0xbe, 0x5a, 0x91, 0xdc, 0x29, 0x8f, 0x17, 0x7f, 0x50, 0x91, 0x5e, 0x17, 0xeb, 0x4e, 0xa2, 0xe4, 0x54, 0x94, 0xc5, 0x1, 0x73, 0x6c, 0xef, 0xb0, 0xe2, 0x2a, 0xcd, 0x98, 0x9d, 0xa4, 0x1a, 0xc7, 0xbb, 0x7b, 0xe5, 0x6b, 0x4, 0xbf, 0xb5, 0xe1}}, - testcase{ - msg: []byte{0x62, 0x6f, 0x68, 0xc1, 0x8a, 0x69, 0xa6, 0x59, 0x1, 0x59, 0xa9, 0xc4, 0x6b, 0xe0, 0x3d, 0x59, 0x65, 0x69, 0x8f, 0x2d, 0xac, 0x3d, 0xe7, 0x79, 0xb8, 0x78, 0xb3, 0xd9, 0xc4, 0x21, 0xe0, 0xf2, 0x1b, 0x95, 0x5a, 0x16, 0xc7, 0x15, 0xc1, 0xec, 0x1e, 0x22, 0xce, 0x3e, 0xb6, 0x45, 0xb8, 0xb4, 0xf2, 0x63, 0xf6, 0x6, 0x60, 0xea, 0x30, 0x28, 0x98, 0x1e, 0xeb, 0xd6, 0xc8, 0xc3, 0xa3, 0x67, 0x28, 0x5b, 0x69, 0x1c, 0x8e, 0xe5, 0x69, 0x44, 0xa7, 0xcd, 0x12, 0x17, 0x99, 0x7e, 0x1d, 0x9c, 0x21, 0x62, 0xb, 0x53, 0x6b, 0xdb, 0xd5, 0xde, 0x89, 0x25, 0xff, 0x71, 0xde, 0xc6, 0xfb, 0xc0, 0x66, 0x24, 0xab, 0x6b, 0x21, 0xe3, 0x29, 0x81, 0x3d, 0xe9, 0xd, 0x1e, 0x57, 0x2d, 0xfb, 0x89, 0xa1, 0x81, 0x20, 0xc3, 0xf6, 0x6, 0x35, 0x5d, 0x25}, - output224: []byte{0xbd, 0x6c, 0x86, 0x59, 0x93, 0x8, 0x2e, 0xc7, 0xb3, 0x80, 0x8c, 0x13, 0xfd, 0x14, 0xf, 0xe0, 0xc0, 0x66, 0x7b, 0x3e, 0xe5, 0x1b, 0x9f, 0x8f, 0x1f, 0x4d, 0xff, 0xd8}, - output256: []byte{0x1e, 0xce, 0x87, 0xe4, 0x4a, 0x99, 0xf5, 0x9d, 0x26, 0x41, 0x14, 0x18, 0xfb, 0x87, 0x93, 0x68, 0x9f, 0xf8, 0xa9, 0xc6, 0xef, 0x75, 0x59, 0x90, 0x56, 0x8, 0x7d, 0x8c, 0x99, 0x5b, 0xce, 0x1e}, - output384: []byte{0x8f, 0x99, 0x3, 0x2c, 0xb4, 0x9b, 0xb0, 0x22, 0xee, 0x5f, 0xb3, 0x24, 0x46, 0xe1, 0xd3, 0x9a, 0xa0, 0xfc, 0xd7, 0x49, 0x74, 0x1e, 0x47, 0x96, 0x97, 0x9d, 0x4b, 0xea, 0x5a, 0xb1, 0xb0, 0x4d, 0x24, 0x15, 0x92, 0xec, 0x60, 0x58, 0xe5, 0x4b, 0x8e, 0xc9, 0xea, 0xb2, 0x74, 0xee, 0x63, 0x2d}, - output512: []byte{0xb, 0x3d, 0xbc, 0x77, 0x3, 0x32, 0x82, 0x3e, 0x68, 0x64, 0x70, 0xd8, 0x42, 0x10, 0x4d, 0x3b, 0x3c, 0x14, 0x52, 0xf6, 0x4f, 0x1b, 0xcc, 0x71, 0xc5, 0xf3, 0xfa, 0xd1, 0xc0, 0xd9, 0x3f, 0x21, 0xef, 0xbd, 0x48, 0xd7, 0x3c, 0x7d, 0x49, 0x9, 0x22, 0x7b, 0x6, 0xb0, 0x6d, 0x54, 0x5, 0x7a, 0x74, 0xe0, 0x3c, 0x36, 0xd9, 0xc1, 0x6, 0xeb, 0xa7, 0x94, 0x11, 0xf1, 0xe6, 0xe1, 0xcf, 0xfe}}, - testcase{ - msg: []byte{0x65, 0x1a, 0x6f, 0xb3, 0xc4, 0xb8, 0xc, 0x7c, 0x68, 0xc6, 0x1, 0x16, 0x75, 0xe6, 0x9, 0x4e, 0xb5, 0x6a, 0xbf, 0x5f, 0xc3, 0x5, 0x73, 0x24, 0xeb, 0xc6, 0x47, 0x78, 0x25, 0x6, 0x1f, 0x9f, 0x27, 0xe7, 0xa9, 0x46, 0x33, 0xab, 0xd1, 0xfa, 0x59, 0x8a, 0x74, 0x6e, 0x4a, 0x57, 0x7c, 0xaf, 0x52, 0x4c, 0x52, 0xec, 0x17, 0x88, 0x47, 0x1f, 0x92, 0xb8, 0xc3, 0x7f, 0x23, 0x79, 0x5c, 0xa1, 0x9d, 0x55, 0x9d, 0x44, 0x6c, 0xab, 0x16, 0xcb, 0xcd, 0xce, 0x90, 0xb7, 0x9f, 0xa1, 0x2, 0x6c, 0xee, 0x77, 0xbf, 0x4a, 0xb1, 0xb5, 0x3, 0xc5, 0xb9, 0x4c, 0x22, 0x56, 0xad, 0x75, 0xb3, 0xea, 0xc6, 0xfd, 0x5d, 0xcb, 0x96, 0xac, 0xa4, 0xb0, 0x3a, 0x83, 0x4b, 0xfb, 0x4e, 0x9a, 0xf9, 0x88, 0xce, 0xcb, 0xf2, 0xae, 0x59, 0x7c, 0xb9, 0x9, 0x79, 0x40}, - output224: []byte{0x8c, 0xa8, 0x44, 0xac, 0xfc, 0xaa, 0xbd, 0x3b, 0x96, 0x9f, 0x86, 0xc2, 0xf1, 0xec, 0xdf, 0x16, 0x20, 0x57, 0x4e, 0xc8, 0xc2, 0x44, 0x26, 0xbe, 0x2d, 0xcc, 0x1b, 0xb5}, - output256: []byte{0x71, 0xb4, 0xf9, 0xa, 0xc9, 0x21, 0x5d, 0x74, 0x74, 0xb1, 0x19, 0x7d, 0x1b, 0x8b, 0x24, 0x44, 0x9f, 0xd5, 0x7e, 0x9b, 0x5, 0x48, 0x3d, 0x32, 0xed, 0xbe, 0xbc, 0xb2, 0x1a, 0x82, 0xf8, 0x66}, - output384: []byte{0x8b, 0xb4, 0xf3, 0xcf, 0x3, 0x90, 0xa3, 0x1d, 0x68, 0x22, 0x13, 0xd2, 0x23, 0x54, 0xdf, 0xe7, 0xd5, 0x80, 0xc8, 0x11, 0x68, 0x22, 0x59, 0x87, 0x2f, 0x2a, 0x29, 0xa0, 0x8d, 0x37, 0x3f, 0xd9, 0x98, 0xf8, 0x42, 0x33, 0x4f, 0x64, 0xf8, 0x13, 0x49, 0x36, 0x4a, 0x93, 0xc, 0x82, 0xba, 0xd4}, - output512: []byte{0xca, 0x46, 0x27, 0x6b, 0xd, 0xc2, 0xec, 0x44, 0x24, 0xbb, 0x71, 0x36, 0xea, 0xe1, 0xaf, 0x20, 0x7b, 0xd6, 0xe5, 0xcd, 0x83, 0x36, 0x91, 0xc7, 0xd3, 0x7b, 0x2c, 0xae, 0xaf, 0x4f, 0x48, 0x4b, 0x96, 0xa3, 0x47, 0x6f, 0xc2, 0x5f, 0xeb, 0x20, 0x6a, 0xd3, 0x7c, 0xf9, 0x75, 0x38, 0x3d, 0xd5, 0x22, 0xca, 0xc, 0xc6, 0x20, 0xa, 0x38, 0x67, 0xfe, 0xe7, 0xf1, 0x78, 0xd6, 0x95, 0x3f, 0xef}}, - testcase{ - msg: []byte{0x8a, 0xaf, 0x7, 0x2f, 0xce, 0x8a, 0x2d, 0x96, 0xbc, 0x10, 0xb3, 0xc9, 0x1c, 0x80, 0x9e, 0xe9, 0x30, 0x72, 0xfb, 0x20, 0x5c, 0xa7, 0xf1, 0xa, 0xbd, 0x82, 0xec, 0xd8, 0x2c, 0xf0, 0x40, 0xb1, 0xbc, 0x49, 0xea, 0x13, 0xd1, 0x85, 0x78, 0x15, 0xc0, 0xe9, 0x97, 0x81, 0xde, 0x3a, 0xdb, 0xb5, 0x44, 0x3c, 0xe1, 0xc8, 0x97, 0xe5, 0x51, 0x88, 0xce, 0xaf, 0x22, 0x1a, 0xa9, 0x68, 0x16, 0x38, 0xde, 0x5, 0xae, 0x1b, 0x32, 0x29, 0x38, 0xf4, 0x6b, 0xce, 0x51, 0x54, 0x3b, 0x57, 0xec, 0xdb, 0x4c, 0x26, 0x62, 0x72, 0x25, 0x9d, 0x17, 0x98, 0xde, 0x13, 0xbe, 0x90, 0xe1, 0xe, 0xfe, 0xc2, 0xd0, 0x74, 0x84, 0xd9, 0xb2, 0x1a, 0x38, 0x70, 0xe2, 0xaa, 0x9e, 0x6, 0xc2, 0x1a, 0xa2, 0xd0, 0xc9, 0xcf, 0x42, 0x0, 0x80, 0xa8, 0xa, 0x91, 0xde, 0xe1, 0x6f}, - output224: []byte{0xe8, 0xd5, 0x49, 0xff, 0x8d, 0x53, 0x74, 0x5a, 0x4c, 0x5c, 0x75, 0xbd, 0xad, 0x92, 0x31, 0x40, 0x25, 0xda, 0x87, 0x7a, 0x77, 0xce, 0x49, 0xea, 0x13, 0x48, 0x40, 0xfa}, - output256: []byte{0x3b, 0x36, 0x78, 0xbb, 0x11, 0x6f, 0xad, 0xab, 0x48, 0x42, 0x91, 0xf0, 0xcf, 0x97, 0x26, 0x6, 0x52, 0x35, 0x1, 0xf5, 0xb4, 0x5d, 0x51, 0x6, 0x37, 0x97, 0x97, 0x29, 0x28, 0xe3, 0x33, 0xc0}, - output384: []byte{0xb, 0xb7, 0xda, 0xc5, 0x44, 0x56, 0x9e, 0x6e, 0xb7, 0x4a, 0xca, 0xb0, 0x1a, 0x84, 0x6f, 0x74, 0xad, 0x2a, 0xf, 0x31, 0xd8, 0xfa, 0xce, 0xe4, 0xd0, 0x9f, 0xa4, 0x9c, 0x81, 0xb9, 0x3b, 0xd8, 0x3b, 0x4f, 0x12, 0x9b, 0x96, 0xda, 0x4c, 0xe, 0xaf, 0x16, 0x5f, 0xde, 0x52, 0xef, 0x29, 0x5b}, - output512: []byte{0x81, 0x5b, 0x44, 0x66, 0x8b, 0xf3, 0x75, 0x1a, 0x33, 0x92, 0x94, 0xf, 0xca, 0x54, 0xc1, 0xe3, 0xe4, 0xef, 0x52, 0x27, 0xb0, 0x52, 0x33, 0x2a, 0xfe, 0x6e, 0xb7, 0xa1, 0xa, 0xc8, 0xad, 0x64, 0x38, 0xce, 0x8a, 0x2, 0x77, 0xaa, 0x14, 0xbc, 0xc4, 0x15, 0x90, 0xf6, 0xd6, 0xa1, 0xb, 0x6b, 0x1b, 0xab, 0xe6, 0xbb, 0x4f, 0x8d, 0x77, 0x7e, 0xa5, 0x76, 0xd6, 0x34, 0xb0, 0xbe, 0x41, 0xc0}}, - testcase{ - msg: []byte{0x53, 0xf9, 0x18, 0xfd, 0x0, 0xb1, 0x70, 0x1b, 0xd5, 0x4, 0xf8, 0xcd, 0xea, 0x80, 0x3a, 0xcc, 0xa2, 0x1a, 0xc1, 0x8c, 0x56, 0x4a, 0xb9, 0xc, 0x2a, 0x17, 0xda, 0x59, 0x2c, 0x7d, 0x69, 0x68, 0x8f, 0x65, 0x80, 0x57, 0x53, 0x95, 0x55, 0x1e, 0x8c, 0xd3, 0x3e, 0xf, 0xef, 0x8, 0xca, 0x6e, 0xd4, 0x58, 0x8d, 0x4d, 0x14, 0xb, 0x3e, 0x44, 0xc0, 0x32, 0x35, 0x5d, 0xf1, 0xc5, 0x31, 0x56, 0x4d, 0x7f, 0x48, 0x35, 0x75, 0x33, 0x44, 0x34, 0x5a, 0x67, 0x81, 0xe1, 0x1c, 0xd5, 0xe0, 0x95, 0xb7, 0x3d, 0xf5, 0xf8, 0x2c, 0x8a, 0xe3, 0xad, 0x0, 0x87, 0x79, 0x36, 0x89, 0x66, 0x71, 0xe9, 0x47, 0xcc, 0x52, 0xe2, 0xb2, 0x9d, 0xcd, 0x46, 0x3d, 0x90, 0xa0, 0xc9, 0x92, 0x91, 0x28, 0xda, 0x22, 0x2b, 0x5a, 0x21, 0x14, 0x50, 0xbb, 0xc0, 0xe0, 0x24, 0x48, 0xe2}, - output224: []byte{0xe6, 0xbd, 0x80, 0x78, 0x7f, 0x87, 0x4, 0xff, 0xf7, 0x31, 0x12, 0xe8, 0xb3, 0x68, 0xad, 0xfb, 0xa3, 0xa1, 0x10, 0x91, 0x62, 0xc7, 0x69, 0x49, 0x13, 0x49, 0xdc, 0xef}, - output256: []byte{0x40, 0x68, 0x24, 0x64, 0x95, 0xf5, 0x8, 0x89, 0x78, 0x13, 0x33, 0x29, 0x62, 0xd3, 0xae, 0xb, 0x84, 0x68, 0x50, 0x45, 0xe8, 0x32, 0xa9, 0xa3, 0x9a, 0xd5, 0xe9, 0x4c, 0x15, 0x4d, 0x26, 0x79}, - output384: []byte{0x10, 0xdd, 0x93, 0x48, 0xb2, 0xd9, 0x58, 0x89, 0xee, 0x61, 0x39, 0x7, 0x82, 0x4a, 0x10, 0xef, 0xc7, 0x8, 0xa1, 0x1, 0xa6, 0x76, 0x72, 0xfc, 0xa4, 0xc6, 0x53, 0x9f, 0x51, 0x56, 0xc7, 0xdf, 0x80, 0x5d, 0xbe, 0x66, 0x6f, 0xcf, 0x4c, 0xc5, 0x78, 0xf4, 0x21, 0xae, 0x3c, 0xf2, 0x71, 0x22}, - output512: []byte{0xf4, 0x77, 0x99, 0xa8, 0x54, 0x7f, 0xc9, 0xc0, 0x7d, 0xf, 0x80, 0x80, 0x29, 0xe7, 0x33, 0x56, 0x7, 0xd7, 0x22, 0x24, 0xbe, 0x28, 0x6e, 0x11, 0x86, 0x57, 0xbd, 0x13, 0xa2, 0xc5, 0x1d, 0x3, 0x74, 0x42, 0x6d, 0x9e, 0xeb, 0x76, 0x93, 0xbd, 0xe5, 0xec, 0x61, 0x81, 0x57, 0x4c, 0x14, 0x4, 0xdf, 0x29, 0xbf, 0x96, 0x94, 0x18, 0x62, 0xba, 0x1a, 0xa, 0x9a, 0x59, 0x3, 0x31, 0x94, 0x98}}, - testcase{ - msg: []byte{0xa6, 0x45, 0x99, 0xb8, 0xa6, 0x1b, 0x5c, 0xce, 0xc9, 0xe6, 0x7a, 0xed, 0x69, 0x44, 0x74, 0x59, 0xc8, 0xda, 0x3d, 0x1e, 0xc6, 0xc7, 0xc7, 0xc8, 0x2a, 0x74, 0x28, 0xb9, 0xb5, 0x84, 0xfa, 0x67, 0xe9, 0xf, 0x68, 0xe2, 0xc0, 0xf, 0xbb, 0xed, 0x46, 0x13, 0x66, 0x6e, 0x51, 0x68, 0xda, 0x4a, 0x16, 0xf3, 0x95, 0xf7, 0xa3, 0xc3, 0x83, 0x2b, 0x3b, 0x13, 0x4b, 0xfc, 0x9c, 0xba, 0xa9, 0x5d, 0x2a, 0xf, 0xe2, 0x52, 0xf4, 0x4a, 0xc6, 0x68, 0x1e, 0xb6, 0xd4, 0xa, 0xb9, 0x1c, 0x1d, 0x2, 0x82, 0xfe, 0xd6, 0x70, 0x1c, 0x57, 0x46, 0x3d, 0x3c, 0x5f, 0x2b, 0xb8, 0xc6, 0xa7, 0x30, 0x1f, 0xb4, 0x57, 0x6a, 0xa3, 0xb5, 0xf1, 0x55, 0x10, 0xdb, 0x89, 0x56, 0xff, 0x77, 0x47, 0x8c, 0x26, 0xa7, 0xc0, 0x9b, 0xea, 0x7b, 0x39, 0x8c, 0xfc, 0x83, 0x50, 0x3f, 0x53, 0x8e}, - output224: []byte{0xbd, 0x7d, 0x9e, 0x6c, 0xf9, 0xd2, 0xc1, 0x3, 0xf, 0x89, 0x25, 0x33, 0xe0, 0x1b, 0x72, 0xb5, 0x28, 0x8e, 0x17, 0x4b, 0x8, 0x64, 0xd8, 0x1d, 0x71, 0xf8, 0xc6, 0xe6}, - output256: []byte{0x82, 0x69, 0x62, 0x59, 0x53, 0x65, 0x20, 0xe5, 0xe4, 0xd4, 0x7e, 0x10, 0x6b, 0xd1, 0xdc, 0xb3, 0x97, 0x52, 0x9a, 0xaf, 0xb7, 0x58, 0x78, 0xf3, 0x32, 0xd2, 0xaf, 0x26, 0x84, 0x49, 0x3f, 0x1b}, - output384: []byte{0x44, 0x4b, 0x8a, 0x6f, 0x1e, 0xe1, 0x18, 0xde, 0x3f, 0xb3, 0xec, 0x76, 0xb2, 0xfb, 0xad, 0x9e, 0xf3, 0x19, 0x16, 0xe1, 0xf9, 0x90, 0x77, 0xde, 0xfc, 0x51, 0xc2, 0xe5, 0x9c, 0x8e, 0x6a, 0x3e, 0x20, 0x7b, 0xa4, 0x8e, 0x5e, 0xdd, 0x66, 0xc7, 0x2b, 0x5b, 0xeb, 0xa6, 0x74, 0x1, 0xd7, 0x94}, - output512: []byte{0x8a, 0xa, 0xe1, 0x2a, 0x9e, 0x79, 0x7f, 0xb7, 0xbd, 0x46, 0xcb, 0xb9, 0x10, 0x7, 0x6a, 0x32, 0x87, 0x3b, 0xff, 0xcb, 0x9a, 0xd9, 0x8b, 0x4f, 0xc3, 0x73, 0x16, 0xae, 0xd6, 0x81, 0xec, 0x49, 0xc6, 0x5a, 0xbb, 0xb9, 0x58, 0x64, 0x5, 0xff, 0x96, 0xcc, 0x80, 0xda, 0x4b, 0xb8, 0xfa, 0x73, 0xbe, 0x1b, 0xa9, 0xe7, 0x37, 0x59, 0x5b, 0x23, 0x7, 0xcf, 0x36, 0x9d, 0x61, 0xba, 0xf5, 0x9c}}, - testcase{ - msg: []byte{0xe, 0x3a, 0xb0, 0xe0, 0x54, 0x73, 0x9b, 0x0, 0xcd, 0xb6, 0xa8, 0x7b, 0xd1, 0x2c, 0xae, 0x2, 0x4b, 0x54, 0xcb, 0x5e, 0x55, 0xe, 0x6c, 0x42, 0x53, 0x60, 0xc2, 0xe8, 0x7e, 0x59, 0x40, 0x1f, 0x5e, 0xc2, 0x4e, 0xf0, 0x31, 0x48, 0x55, 0xf0, 0xf5, 0x6c, 0x47, 0x69, 0x5d, 0x56, 0xa7, 0xfb, 0x14, 0x17, 0x69, 0x3a, 0xf2, 0xa1, 0xed, 0x52, 0x91, 0xf2, 0xfe, 0xe9, 0x5f, 0x75, 0xee, 0xd5, 0x4a, 0x1b, 0x1c, 0x2e, 0x81, 0x22, 0x6f, 0xbf, 0xf6, 0xf6, 0x3a, 0xde, 0x58, 0x49, 0x11, 0xc7, 0x19, 0x67, 0xa8, 0xeb, 0x70, 0x93, 0x3b, 0xc3, 0xf5, 0xd1, 0x5b, 0xc9, 0x1b, 0x5c, 0x26, 0x44, 0xd9, 0x51, 0x6d, 0x3c, 0x3a, 0x8c, 0x15, 0x4e, 0xe4, 0x8e, 0x11, 0x8b, 0xd1, 0x44, 0x2c, 0x4, 0x3c, 0x7a, 0xd, 0xba, 0x5a, 0xc5, 0xb1, 0xd5, 0x36, 0xa, 0xae, 0x5b, 0x90, 0x65}, - output224: []byte{0xa5, 0x31, 0x2e, 0x8c, 0x7f, 0xa, 0x35, 0x94, 0xa8, 0xec, 0xd1, 0xab, 0xc5, 0xcb, 0xc1, 0x4b, 0x25, 0x85, 0xf0, 0xb1, 0xfe, 0x32, 0xa4, 0xe1, 0xfa, 0xa, 0x2e, 0x25}, - output256: []byte{0xb4, 0x94, 0x85, 0x26, 0x3, 0x39, 0x3b, 0x2b, 0x71, 0x84, 0x5b, 0xac, 0xbd, 0xce, 0x89, 0xfa, 0x14, 0x27, 0xdf, 0xe4, 0xaf, 0x9c, 0xdf, 0x92, 0x5d, 0x4f, 0x93, 0xfa, 0x83, 0xb9, 0x96, 0x6b}, - output384: []byte{0xf4, 0xd1, 0x7c, 0x62, 0x99, 0xba, 0xe7, 0xd0, 0xe6, 0xd1, 0x5a, 0x55, 0xb, 0x31, 0x1f, 0x30, 0xc1, 0xb0, 0x38, 0xae, 0xf5, 0x6f, 0xe3, 0x75, 0xf3, 0xb4, 0xba, 0xe1, 0x4f, 0x7e, 0xa4, 0x27, 0xc5, 0xaa, 0x98, 0x7e, 0xf9, 0x32, 0x85, 0x97, 0x5c, 0xe5, 0xf9, 0xe4, 0x6a, 0x3e, 0x4c, 0x20}, - output512: []byte{0xa3, 0xc6, 0xd5, 0x88, 0x72, 0xba, 0xfd, 0xed, 0xfd, 0xd5, 0xc, 0x3, 0x9, 0x8, 0x92, 0x40, 0xd6, 0x97, 0x7d, 0x4d, 0x3d, 0x59, 0xfb, 0x3f, 0x2b, 0xe1, 0x33, 0xc5, 0x7d, 0x2d, 0xfc, 0xfc, 0xc7, 0xc0, 0x27, 0x29, 0x6f, 0x74, 0xfe, 0x58, 0xb2, 0xa9, 0xa6, 0xcb, 0x7e, 0x5d, 0x70, 0x8, 0x89, 0x34, 0xd0, 0x51, 0xcb, 0xa5, 0x70, 0x1, 0xfe, 0x27, 0x96, 0x5c, 0xfa, 0x7, 0x1a, 0x6f}}, - testcase{ - msg: []byte{0xa6, 0x2f, 0xc5, 0x95, 0xb4, 0x9, 0x6e, 0x63, 0x36, 0xe5, 0x3f, 0xcd, 0xfc, 0x8d, 0x1c, 0xc1, 0x75, 0xd7, 0x1d, 0xac, 0x9d, 0x75, 0xa, 0x61, 0x33, 0xd2, 0x31, 0x99, 0xea, 0xac, 0x28, 0x82, 0x7, 0x94, 0x4c, 0xea, 0x6b, 0x16, 0xd2, 0x76, 0x31, 0x91, 0x5b, 0x46, 0x19, 0xf7, 0x43, 0xda, 0x2e, 0x30, 0xa0, 0xc0, 0xb, 0xbd, 0xb1, 0xbb, 0xb3, 0x5a, 0xb8, 0x52, 0xef, 0x3b, 0x9a, 0xec, 0x6b, 0xa, 0x8d, 0xcc, 0x6e, 0x9e, 0x1a, 0xba, 0xa3, 0xad, 0x62, 0xac, 0xa, 0x6c, 0x5d, 0xe7, 0x65, 0xde, 0x2c, 0x37, 0x11, 0xb7, 0x69, 0xe3, 0xfd, 0xe4, 0x4a, 0x74, 0x1, 0x6f, 0xff, 0x82, 0xac, 0x46, 0xfa, 0x8f, 0x17, 0x97, 0xd3, 0xb2, 0xa7, 0x26, 0xb6, 0x96, 0xe3, 0xde, 0xa5, 0x53, 0x4, 0x39, 0xac, 0xee, 0x3a, 0x45, 0xc2, 0xa5, 0x1b, 0xc3, 0x2d, 0xd0, 0x55, 0x65, 0xb}, - output224: []byte{0x2e, 0xd, 0x73, 0x93, 0x86, 0xaa, 0xaf, 0x37, 0x98, 0xe, 0xe4, 0x21, 0xaa, 0x8c, 0x19, 0xb1, 0x9a, 0xf5, 0x2e, 0x70, 0xf5, 0x9d, 0xc0, 0xa6, 0x98, 0x84, 0x71, 0xf5}, - output256: []byte{0xd8, 0xa6, 0x19, 0xc0, 0xdf, 0xbe, 0xd2, 0xa9, 0x49, 0x8a, 0x14, 0x7b, 0x53, 0xd7, 0xb3, 0x3d, 0xd6, 0x53, 0xd3, 0x90, 0xe5, 0xc0, 0xcd, 0x69, 0x1f, 0x2, 0xc8, 0x60, 0x88, 0x22, 0xd0, 0x6a}, - output384: []byte{0x39, 0xf9, 0x11, 0xe9, 0xcb, 0x27, 0x63, 0xc8, 0x91, 0x1a, 0xc3, 0x15, 0x30, 0x40, 0xe4, 0x8f, 0x40, 0x3a, 0xbf, 0xe3, 0x73, 0xe1, 0x4b, 0x70, 0x9a, 0x47, 0x68, 0x68, 0xd3, 0xab, 0x58, 0x41, 0xd1, 0x8, 0x8f, 0x83, 0x93, 0xdd, 0x72, 0x83, 0x5, 0xba, 0x34, 0x11, 0x38, 0x36, 0x5d, 0x27}, - output512: []byte{0x11, 0xe0, 0xe5, 0x21, 0xb5, 0x5f, 0x2, 0xbe, 0xfc, 0x72, 0x7, 0xc0, 0x64, 0x44, 0xfc, 0xc0, 0xc1, 0x6d, 0xcf, 0x6f, 0x34, 0x96, 0x29, 0x21, 0xb7, 0x9, 0xa3, 0x22, 0xf3, 0x5e, 0x21, 0x93, 0x47, 0x7b, 0xd, 0xfa, 0x21, 0xf2, 0x13, 0xf2, 0x9, 0x70, 0x5f, 0xf3, 0x95, 0x85, 0x31, 0xa7, 0x5d, 0x94, 0x34, 0x60, 0x75, 0xfe, 0xb2, 0x9a, 0x28, 0x8b, 0x62, 0xe2, 0x31, 0x5a, 0xe2, 0x70}}, - testcase{ - msg: []byte{0x2b, 0x6d, 0xb7, 0xce, 0xd8, 0x66, 0x5e, 0xbe, 0x9d, 0xeb, 0x8, 0x2, 0x95, 0x21, 0x84, 0x26, 0xbd, 0xaa, 0x7c, 0x6d, 0xa9, 0xad, 0xd2, 0x8, 0x89, 0x32, 0xcd, 0xff, 0xba, 0xa1, 0xc1, 0x41, 0x29, 0xbc, 0xcd, 0xd7, 0xf, 0x36, 0x9e, 0xfb, 0x14, 0x92, 0x85, 0x85, 0x8d, 0x2b, 0x1d, 0x15, 0x5d, 0x14, 0xde, 0x2f, 0xdb, 0x68, 0xa, 0x8b, 0x2, 0x72, 0x84, 0x5, 0x51, 0x82, 0xa0, 0xca, 0xe2, 0x75, 0x23, 0x4c, 0xc9, 0xc9, 0x28, 0x63, 0xc1, 0xb4, 0xab, 0x66, 0xf3, 0x4, 0xcf, 0x6, 0x21, 0xcd, 0x54, 0x56, 0x5f, 0x5b, 0xff, 0x46, 0x1d, 0x3b, 0x46, 0x1b, 0xd4, 0xd, 0xf2, 0x81, 0x98, 0xe3, 0x73, 0x25, 0x1, 0xb4, 0x86, 0xe, 0xad, 0xd5, 0x3, 0xd2, 0x6d, 0x6e, 0x69, 0x33, 0x8f, 0x4e, 0x4, 0x56, 0xe9, 0xe9, 0xba, 0xf3, 0xd8, 0x27, 0xae, 0x68, 0x5f, 0xb1, 0xd8, 0x17}, - output224: []byte{0xaf, 0x3e, 0xc, 0xc6, 0xe6, 0x45, 0x1, 0xf1, 0xf, 0xd3, 0x97, 0x22, 0xe8, 0x52, 0x35, 0x5f, 0xd6, 0xd8, 0xd, 0x32, 0x19, 0x6, 0x31, 0xe2, 0xf0, 0x6c, 0x22, 0xad}, - output256: []byte{0xd8, 0x2e, 0x25, 0x7d, 0x0, 0xd, 0xc9, 0xfa, 0x27, 0x9a, 0x0, 0xe2, 0x96, 0x1e, 0x32, 0x86, 0xd2, 0xfe, 0x1c, 0x2, 0xef, 0x59, 0x83, 0x3a, 0xb8, 0xa6, 0xa7, 0x10, 0x1b, 0xc2, 0x50, 0x54}, - output384: []byte{0x3a, 0xde, 0xb7, 0xee, 0xec, 0xf9, 0x6, 0x9f, 0x14, 0x3a, 0x10, 0x15, 0x1f, 0xd4, 0x50, 0x6a, 0xee, 0xf3, 0xa0, 0xef, 0x94, 0xca, 0x65, 0xd4, 0x44, 0x8a, 0xcf, 0x1e, 0x89, 0x2b, 0x8e, 0xbb, 0x8, 0x87, 0x63, 0x18, 0x4, 0xdd, 0x64, 0xe1, 0x53, 0xad, 0x41, 0xfa, 0xe0, 0x12, 0x7a, 0x85}, - output512: []byte{0xae, 0xbb, 0xa5, 0x7c, 0x8e, 0xd5, 0xaf, 0x6e, 0xc9, 0x3f, 0x4a, 0xa4, 0x57, 0x72, 0xff, 0x51, 0x67, 0xb7, 0xea, 0x88, 0xdf, 0xa7, 0x13, 0x64, 0xf3, 0x7d, 0x8f, 0xc5, 0xfd, 0xb7, 0xdc, 0x3b, 0x2c, 0x83, 0x31, 0xa0, 0x80, 0x23, 0xf2, 0x1d, 0x11, 0xb, 0x7d, 0x82, 0x1e, 0x2d, 0xc7, 0xe8, 0x60, 0x82, 0x62, 0x35, 0xe7, 0xe6, 0x29, 0x19, 0x12, 0xac, 0x52, 0x13, 0x84, 0x74, 0x73, 0x54}}, - testcase{ - msg: []byte{0x10, 0xdb, 0x50, 0x9b, 0x2c, 0xdc, 0xab, 0xa6, 0xc0, 0x62, 0xae, 0x33, 0xbe, 0x48, 0x11, 0x6a, 0x29, 0xeb, 0x18, 0xe3, 0x90, 0xe1, 0xbb, 0xad, 0xa5, 0xca, 0xa, 0x27, 0x18, 0xaf, 0xbc, 0xd2, 0x34, 0x31, 0x44, 0x1, 0x6, 0x59, 0x48, 0x93, 0x4, 0x3c, 0xc7, 0xf2, 0x62, 0x52, 0x81, 0xbf, 0x7d, 0xe2, 0x65, 0x58, 0x80, 0x96, 0x6a, 0x23, 0x70, 0x5f, 0xc, 0x51, 0x55, 0xc2, 0xf5, 0xcc, 0xa9, 0xf2, 0xc2, 0x14, 0x2e, 0x96, 0xd0, 0xa2, 0xe7, 0x63, 0xb7, 0x6, 0x86, 0xcd, 0x42, 0x1b, 0x5d, 0xb8, 0x12, 0xda, 0xce, 0xd0, 0xc6, 0xd6, 0x50, 0x35, 0xfd, 0xe5, 0x58, 0xe9, 0x4f, 0x26, 0xb3, 0xe6, 0xdd, 0xe5, 0xbd, 0x13, 0x98, 0xc, 0xc8, 0x2, 0x92, 0xb7, 0x23, 0x1, 0x3b, 0xd0, 0x33, 0x28, 0x45, 0x84, 0xbf, 0xf2, 0x76, 0x57, 0x87, 0x1b, 0xc, 0xf0, 0x7a, 0x84, 0x9f, 0x4a, 0xe2}, - output224: []byte{0xf0, 0x9, 0xe0, 0x5d, 0x1a, 0xfe, 0x2d, 0x33, 0xd2, 0xc5, 0xf4, 0x0, 0x8b, 0x46, 0xf3, 0x14, 0x68, 0xa7, 0xbf, 0x52, 0x99, 0xd4, 0xf0, 0xab, 0xe, 0xfe, 0x4f, 0xd3}, - output256: []byte{0x8d, 0x5b, 0x7d, 0xbf, 0x39, 0x47, 0x21, 0x9a, 0xcd, 0xb0, 0x4f, 0xb2, 0xe1, 0x1a, 0x84, 0xa3, 0x13, 0xc5, 0x4c, 0x22, 0xf2, 0xae, 0x85, 0x8d, 0xfc, 0x88, 0x87, 0xbf, 0x62, 0x65, 0xf5, 0xf3}, - output384: []byte{0x14, 0x83, 0x8, 0x77, 0xdf, 0xaf, 0xe6, 0xf8, 0x86, 0xa2, 0x2d, 0xe7, 0xce, 0x9a, 0x5f, 0xc7, 0x47, 0x33, 0xa8, 0xfc, 0x27, 0xec, 0xc5, 0x23, 0xb6, 0xb4, 0x52, 0x4e, 0x63, 0x12, 0xcb, 0xb2, 0x2b, 0x51, 0xd7, 0xeb, 0x9d, 0xda, 0xb3, 0x7b, 0xa5, 0x4b, 0xb2, 0xc0, 0xbf, 0xc3, 0x2a, 0x6f}, - output512: []byte{0x2d, 0xf1, 0xe0, 0x95, 0x40, 0xb5, 0x3a, 0x17, 0x22, 0x2d, 0xab, 0x66, 0x27, 0x5c, 0xeb, 0xec, 0xeb, 0x1f, 0x8a, 0x5d, 0xb2, 0x6b, 0xc, 0x41, 0xf9, 0x55, 0xfa, 0x5, 0x49, 0xf3, 0x36, 0x7e, 0x82, 0x29, 0x9e, 0xc, 0xd6, 0x73, 0x95, 0x8a, 0xf7, 0xdf, 0xa0, 0x4d, 0x74, 0x1a, 0xa6, 0x3b, 0xa2, 0xc1, 0xad, 0x35, 0x17, 0x64, 0xdc, 0x92, 0x28, 0xd2, 0x15, 0xf2, 0x2c, 0x24, 0xca, 0x58}}, - testcase{ - msg: []byte{0x93, 0x34, 0xde, 0x60, 0xc9, 0x97, 0xbd, 0xa6, 0x8, 0x61, 0x1, 0xa6, 0x31, 0x4f, 0x64, 0xe4, 0x45, 0x8f, 0x5f, 0xf9, 0x45, 0xc, 0x50, 0x9d, 0xf0, 0x6, 0xe8, 0xc5, 0x47, 0x98, 0x3c, 0x65, 0x1c, 0xa9, 0x78, 0x79, 0x17, 0x5a, 0xab, 0xa0, 0xc5, 0x39, 0xe8, 0x2d, 0x5, 0xc1, 0xe0, 0x2c, 0x48, 0x9, 0x75, 0xcb, 0xb3, 0x1, 0x18, 0x12, 0x10, 0x61, 0xb1, 0xeb, 0xac, 0x4f, 0x8d, 0x9a, 0x37, 0x81, 0xe2, 0xdb, 0x6b, 0x18, 0x4, 0x2e, 0x1, 0xec, 0xf9, 0x1, 0x7a, 0x64, 0xa0, 0xe5, 0x74, 0x47, 0xec, 0x7f, 0xcb, 0xe6, 0xa7, 0xf8, 0x25, 0x85, 0xf7, 0x40, 0x3e, 0xe2, 0x22, 0x3d, 0x52, 0xd3, 0x7b, 0x4b, 0xf4, 0x26, 0x42, 0x86, 0x13, 0xd6, 0xb4, 0x25, 0x79, 0x80, 0x97, 0x2a, 0xa, 0xca, 0xb5, 0x8, 0xa7, 0x62, 0xc, 0x1c, 0xb2, 0x8e, 0xb4, 0xe9, 0xd3, 0xf, 0xc4, 0x13, 0x61, 0xec}, - output224: []byte{0x76, 0x28, 0x1b, 0xd1, 0x61, 0x38, 0x43, 0xa3, 0xad, 0xbc, 0xbc, 0x78, 0xd1, 0x92, 0x3a, 0xfb, 0x5b, 0x8a, 0xa2, 0xdc, 0xbc, 0x48, 0x93, 0x4d, 0xee, 0xc8, 0x4a, 0xaa}, - output256: []byte{0x60, 0x7c, 0x3f, 0x31, 0x34, 0x2c, 0x3e, 0xe5, 0xc9, 0x3e, 0x55, 0x2a, 0x8d, 0xd7, 0x9f, 0xa8, 0x6d, 0xcc, 0xae, 0x2c, 0x1b, 0x58, 0xaa, 0xba, 0xc2, 0x5b, 0x59, 0x18, 0xac, 0xfa, 0x4d, 0xa5}, - output384: []byte{0xd1, 0x9, 0x53, 0x2b, 0xc4, 0x21, 0x73, 0x26, 0xb3, 0xd2, 0x5e, 0xd2, 0xd2, 0xf3, 0xf0, 0xd2, 0x48, 0x2c, 0xc5, 0xbd, 0xd0, 0x54, 0x21, 0x8f, 0xa8, 0xbe, 0xdb, 0x91, 0xcd, 0x81, 0x4f, 0x7f, 0xd6, 0x83, 0xaa, 0x2a, 0xfc, 0xb8, 0x34, 0x2c, 0xd3, 0x4c, 0xe5, 0x4d, 0x60, 0x7e, 0x3d, 0xa0}, - output512: []byte{0x82, 0x99, 0xcf, 0xce, 0xa5, 0xf0, 0xc, 0x93, 0xa5, 0xeb, 0x8a, 0x84, 0xa1, 0x36, 0x28, 0xa6, 0x8b, 0x26, 0x79, 0x6d, 0x53, 0xfb, 0x6a, 0x98, 0x6c, 0x95, 0xb0, 0xb1, 0xc2, 0x48, 0x92, 0xf, 0xb9, 0x46, 0xd8, 0xaf, 0x98, 0x34, 0x3d, 0x14, 0xef, 0xc7, 0x4a, 0x46, 0x11, 0xc5, 0x3c, 0xcc, 0x27, 0xc5, 0xf1, 0x4c, 0x72, 0x37, 0xaf, 0x28, 0x36, 0x43, 0x46, 0xca, 0x5c, 0xd7, 0xd, 0x1a}}, - testcase{ - msg: []byte{0xe8, 0x8a, 0xb0, 0x86, 0x89, 0x16, 0x93, 0xaa, 0x53, 0x5c, 0xeb, 0x20, 0xe6, 0x4c, 0x7a, 0xb9, 0x7c, 0x7d, 0xd3, 0x54, 0x8f, 0x37, 0x86, 0x33, 0x98, 0x97, 0xa5, 0xf0, 0xc3, 0x90, 0x31, 0x54, 0x9c, 0xa8, 0x70, 0x16, 0x6e, 0x47, 0x77, 0x43, 0xcc, 0xfb, 0xe0, 0x16, 0xb4, 0x42, 0x8d, 0x89, 0x73, 0x8e, 0x42, 0x6f, 0x5f, 0xfe, 0x81, 0x62, 0x61, 0x37, 0xf1, 0x7a, 0xec, 0xff, 0x61, 0xb7, 0x2d, 0xbe, 0xe2, 0xdc, 0x20, 0x96, 0x18, 0x80, 0xcf, 0xe2, 0x81, 0xdf, 0xab, 0x5e, 0xe3, 0x8b, 0x19, 0x21, 0x88, 0x14, 0x50, 0xe1, 0x60, 0x32, 0xde, 0x5e, 0x4d, 0x55, 0xad, 0x8d, 0x4f, 0xca, 0x60, 0x97, 0x21, 0xb0, 0x69, 0x2b, 0xac, 0x79, 0xbe, 0x5a, 0x6, 0xe1, 0x77, 0xfe, 0x8c, 0x80, 0xc0, 0xc8, 0x35, 0x19, 0xfb, 0x33, 0x47, 0xde, 0x9f, 0x43, 0xd5, 0x56, 0x1c, 0xb8, 0x10, 0x7b, 0x9b, 0x5e, 0xdc}, - output224: []byte{0xda, 0x7c, 0x79, 0xe0, 0x4f, 0xca, 0x2b, 0x69, 0xaa, 0xa5, 0x81, 0x99, 0xca, 0x69, 0x10, 0x5b, 0x6b, 0x18, 0xfe, 0x67, 0xe2, 0x9f, 0x38, 0x5, 0x1, 0xaa, 0x7f, 0xa8}, - output256: []byte{0x6, 0x56, 0xde, 0x9d, 0xcd, 0x7b, 0x71, 0x12, 0xa8, 0x6c, 0x7b, 0xa1, 0x99, 0x63, 0x7d, 0x2c, 0x1c, 0x9e, 0x9c, 0xfb, 0xb7, 0x13, 0xe4, 0xed, 0xe7, 0x9f, 0x88, 0x62, 0xee, 0x69, 0x99, 0x3f}, - output384: []byte{0xde, 0x64, 0xa3, 0x7a, 0x74, 0x56, 0x63, 0x8d, 0x3a, 0xca, 0x1b, 0x89, 0x5f, 0x4a, 0x88, 0xc2, 0x68, 0x17, 0x17, 0x79, 0x86, 0xa9, 0xf2, 0xf5, 0xb7, 0x7b, 0x49, 0xcf, 0xf2, 0xc3, 0xe4, 0x6b, 0xe2, 0xc4, 0x9a, 0xbe, 0x89, 0xd7, 0x41, 0x37, 0x5d, 0xb8, 0x7f, 0x4c, 0x89, 0x8f, 0x67, 0x62}, - output512: []byte{0xaf, 0x57, 0xbe, 0xa3, 0x57, 0xfc, 0xba, 0x5, 0x79, 0xc4, 0x20, 0x4c, 0xf, 0x8d, 0xff, 0x18, 0x1b, 0xc8, 0xa4, 0x73, 0x1, 0x4b, 0xae, 0x78, 0xdf, 0x76, 0x6, 0x9d, 0xe4, 0x78, 0xb2, 0xf2, 0xa3, 0x90, 0x32, 0x7a, 0x65, 0xbd, 0xd2, 0x4b, 0xe9, 0x26, 0x55, 0x1c, 0x78, 0xf7, 0xb, 0xd, 0x5f, 0x1c, 0x8f, 0x4b, 0x97, 0x9, 0x97, 0xd5, 0x57, 0xf0, 0x63, 0x36, 0xa3, 0x15, 0xa7, 0x49}}, - testcase{ - msg: []byte{0xfd, 0x19, 0xe0, 0x1a, 0x83, 0xeb, 0x6e, 0xc8, 0x10, 0xb9, 0x45, 0x82, 0xcb, 0x8f, 0xbf, 0xa2, 0xfc, 0xb9, 0x92, 0xb5, 0x36, 0x84, 0xfb, 0x74, 0x8d, 0x22, 0x64, 0xf0, 0x20, 0xd3, 0xb9, 0x60, 0xcb, 0x1d, 0x6b, 0x8c, 0x34, 0x8c, 0x2b, 0x54, 0xa9, 0xfc, 0xea, 0x72, 0x33, 0xc, 0x2a, 0xaa, 0x9a, 0x24, 0xec, 0xdb, 0x0, 0xc4, 0x36, 0xab, 0xc7, 0x2, 0x36, 0x1a, 0x82, 0xbb, 0x88, 0x28, 0xb8, 0x53, 0x69, 0xb8, 0xc7, 0x2e, 0xce, 0x0, 0x82, 0xfe, 0x6, 0x55, 0x71, 0x63, 0x89, 0x9c, 0x2a, 0xe, 0xfa, 0x46, 0x6c, 0x33, 0xc0, 0x43, 0x43, 0xa8, 0x39, 0x41, 0x70, 0x57, 0x39, 0x9a, 0x63, 0xa3, 0x92, 0x9b, 0xe1, 0xee, 0x48, 0x5, 0xd6, 0xce, 0x3e, 0x5d, 0xd, 0x9, 0x67, 0xfe, 0x90, 0x4, 0x69, 0x6a, 0x56, 0x63, 0xf4, 0xca, 0xc9, 0x17, 0x90, 0x6, 0xa2, 0xce, 0xb7, 0x55, 0x42, 0xd7, 0x5d, 0x68}, - output224: []byte{0x70, 0xec, 0xb2, 0x61, 0x75, 0x73, 0x71, 0xa2, 0x82, 0x90, 0x3c, 0x69, 0x67, 0x15, 0xdc, 0x3, 0xf1, 0x6, 0xa3, 0x39, 0xf0, 0x76, 0x20, 0x3b, 0xab, 0x43, 0x6e, 0x94}, - output256: []byte{0x4d, 0xdd, 0x62, 0x24, 0x85, 0x82, 0x99, 0xf3, 0x37, 0x8e, 0x3f, 0x5a, 0xe, 0xcc, 0x52, 0xfa, 0x4c, 0x41, 0x9c, 0x8e, 0xbb, 0x20, 0xf6, 0x35, 0xc4, 0xc4, 0x3f, 0x36, 0x32, 0x4e, 0xcb, 0x4e}, - output384: []byte{0x8d, 0x97, 0x43, 0x71, 0xc, 0x17, 0x1c, 0xd3, 0x99, 0xa0, 0xd7, 0x12, 0xe9, 0xd5, 0x33, 0x74, 0xed, 0x8e, 0xa, 0x97, 0x67, 0x2a, 0x40, 0x29, 0x4c, 0x74, 0xf0, 0xd5, 0x3, 0xf0, 0x29, 0x2d, 0x6f, 0x41, 0xd5, 0xce, 0xa0, 0x8f, 0xb3, 0xc6, 0x23, 0xc4, 0xeb, 0xa5, 0x68, 0x48, 0x77, 0xd}, - output512: []byte{0xb2, 0x99, 0xe4, 0x21, 0x6, 0x1e, 0xf2, 0x6c, 0x32, 0xbb, 0x4f, 0x50, 0xee, 0x66, 0x9d, 0x5, 0xfe, 0xb2, 0xcc, 0xba, 0x32, 0x97, 0x28, 0x9c, 0x30, 0xe6, 0x43, 0x40, 0x57, 0xb3, 0xea, 0x7f, 0x61, 0x7b, 0xbb, 0xf7, 0xa5, 0x55, 0x53, 0x28, 0xfc, 0x29, 0x1f, 0x79, 0x49, 0x87, 0x57, 0x7f, 0x45, 0x83, 0x50, 0xdf, 0x99, 0xaf, 0x3a, 0x57, 0x78, 0x30, 0xb, 0xe0, 0xbd, 0x80, 0x16, 0x4f}}, - testcase{ - msg: []byte{0x59, 0xae, 0x20, 0xb6, 0xf7, 0xe0, 0xb3, 0xc7, 0xa9, 0x89, 0xaf, 0xb2, 0x83, 0x24, 0xa4, 0xf, 0xca, 0x25, 0xd8, 0x65, 0x1c, 0xf1, 0xf4, 0x6a, 0xe3, 0x83, 0xef, 0x6d, 0x84, 0x41, 0x58, 0x7a, 0xa1, 0xc0, 0x4c, 0x3e, 0x3b, 0xf8, 0x8e, 0x81, 0x31, 0xce, 0x61, 0x45, 0xcf, 0xb8, 0x97, 0x3d, 0x96, 0x1e, 0x84, 0x32, 0xb2, 0x2, 0xfa, 0x5a, 0xf3, 0xe0, 0x9d, 0x62, 0x5f, 0xaa, 0xd8, 0x25, 0xbc, 0x19, 0xda, 0x9b, 0x5c, 0x6c, 0x20, 0xd0, 0x2a, 0xbd, 0xa2, 0xfc, 0xc5, 0x8b, 0x5b, 0xd3, 0xfe, 0x50, 0x7b, 0xf2, 0x1, 0x26, 0x3f, 0x30, 0x54, 0x38, 0x19, 0x51, 0xc, 0x12, 0xbc, 0x23, 0xe2, 0xdd, 0xb4, 0xf7, 0x11, 0xd0, 0x87, 0xa8, 0x6e, 0xdb, 0x1b, 0x35, 0x53, 0x13, 0x36, 0x3a, 0x2d, 0xe9, 0x96, 0xb8, 0x91, 0x2, 0x5e, 0x14, 0x70, 0x36, 0x8, 0x74, 0x1, 0xcc, 0xf3, 0xca, 0x78, 0x15, 0xbf, 0x3c, 0x49}, - output224: []byte{0x74, 0xd, 0x3c, 0xb4, 0x55, 0x13, 0x31, 0x73, 0xec, 0x65, 0x2a, 0xa0, 0x47, 0x9, 0xef, 0xf, 0x54, 0x9f, 0x19, 0xa9, 0xd4, 0xcc, 0x6b, 0xec, 0x9e, 0x87, 0x6b, 0x5a}, - output256: []byte{0xec, 0x9, 0x63, 0x14, 0xe2, 0xf7, 0x3b, 0x6a, 0x70, 0x27, 0xff, 0xfa, 0x2, 0x10, 0x4c, 0x2f, 0x6d, 0xd1, 0x87, 0xf2, 0xc, 0x74, 0x34, 0x45, 0xbe, 0xfd, 0x4b, 0x5c, 0x3, 0x4b, 0x32, 0x95}, - output384: []byte{0xfa, 0xe9, 0x98, 0xd1, 0x7, 0x4e, 0x30, 0xf2, 0xea, 0xa, 0x8b, 0x9f, 0xe2, 0x59, 0xfd, 0x2e, 0x2a, 0x36, 0x80, 0x49, 0x95, 0xeb, 0xe7, 0xe3, 0xa5, 0xad, 0x34, 0x86, 0x5b, 0x1a, 0x33, 0x16, 0x67, 0x52, 0x97, 0xfe, 0x8e, 0x33, 0xee, 0xf8, 0xad, 0xcc, 0x2, 0xbe, 0x8c, 0x47, 0x65, 0xbe}, - output512: []byte{0xcb, 0xdf, 0xb0, 0xd0, 0xe7, 0x20, 0xf8, 0x72, 0x59, 0xdd, 0xd, 0xb, 0x4e, 0x9c, 0x53, 0x19, 0xe7, 0xf8, 0x8a, 0xae, 0xf7, 0xf7, 0xab, 0x2f, 0xa1, 0xca, 0x63, 0x9a, 0xfa, 0x1, 0x60, 0x82, 0x2f, 0x96, 0xb3, 0xc3, 0x57, 0xa4, 0x89, 0x4c, 0xe5, 0x3c, 0xd7, 0x13, 0xfa, 0xb2, 0x3a, 0xd0, 0x52, 0xe8, 0x56, 0x5f, 0xa3, 0xb3, 0xa5, 0x23, 0xcb, 0x9c, 0xe3, 0x9a, 0x6b, 0xd5, 0x35, 0xcc}}, - testcase{ - msg: []byte{0x77, 0xee, 0x80, 0x4b, 0x9f, 0x32, 0x95, 0xab, 0x23, 0x62, 0x79, 0x8b, 0x72, 0xb0, 0xa1, 0xb2, 0xd3, 0x29, 0x1d, 0xce, 0xb8, 0x13, 0x98, 0x96, 0x35, 0x58, 0x30, 0xf3, 0x4b, 0x3b, 0x32, 0x85, 0x61, 0x53, 0x1f, 0x80, 0x79, 0xb7, 0x9a, 0x6e, 0x99, 0x80, 0x70, 0x51, 0x50, 0x86, 0x64, 0x2, 0xfd, 0xc1, 0x76, 0xc0, 0x58, 0x97, 0xe3, 0x59, 0xa6, 0xcb, 0x1a, 0x7a, 0xb0, 0x67, 0x38, 0x3e, 0xb4, 0x97, 0x18, 0x2a, 0x7e, 0x5a, 0xef, 0x70, 0x38, 0xe4, 0xc9, 0x6d, 0x13, 0x3b, 0x27, 0x82, 0x91, 0x74, 0x17, 0xe3, 0x91, 0x53, 0x5b, 0x5e, 0x1b, 0x51, 0xf4, 0x7d, 0x8e, 0xd7, 0xe4, 0xd4, 0x2, 0x5f, 0xe9, 0x8d, 0xc8, 0x7b, 0x9c, 0x16, 0x22, 0x61, 0x4b, 0xff, 0x3d, 0x10, 0x29, 0xe6, 0x8e, 0x37, 0x2d, 0xe7, 0x19, 0x80, 0x38, 0x57, 0xca, 0x52, 0x6, 0x7c, 0xdd, 0xaa, 0xd9, 0x58, 0x95, 0x1c, 0xb2, 0x6, 0x8c, 0xc6}, - output224: []byte{0x66, 0x38, 0x35, 0xa8, 0x1a, 0x2a, 0x38, 0xd5, 0xad, 0x3a, 0x37, 0xbd, 0x9b, 0xc9, 0x66, 0x18, 0xd2, 0x7c, 0xa3, 0x22, 0x86, 0xe9, 0x9, 0x18, 0x34, 0xa0, 0x87, 0x1a}, - output256: []byte{0xfe, 0x71, 0xd0, 0x1c, 0x2e, 0xe5, 0xe, 0x5, 0x4d, 0x6b, 0x7, 0x14, 0x7e, 0xf6, 0x29, 0x54, 0xfd, 0xe7, 0xe6, 0x95, 0x9d, 0x6e, 0xeb, 0xa6, 0x8e, 0x3c, 0x94, 0x10, 0x7e, 0xb0, 0x8, 0x4d}, - output384: []byte{0xa, 0xa9, 0xcc, 0xc3, 0xc9, 0xca, 0xe1, 0x60, 0x3d, 0x3d, 0xa5, 0xe9, 0x5f, 0x30, 0x4a, 0xdb, 0x8f, 0xa5, 0x75, 0x83, 0x39, 0x29, 0xb0, 0x9f, 0x7c, 0x10, 0x95, 0xd9, 0x68, 0xbe, 0xa0, 0x47, 0x1d, 0xfe, 0x8a, 0xaa, 0xd3, 0xad, 0x11, 0x26, 0x6d, 0xaa, 0xff, 0x95, 0xf6, 0x66, 0x7a, 0xbc}, - output512: []byte{0x5, 0x9a, 0x18, 0x1c, 0x83, 0xa2, 0x2b, 0xff, 0xa, 0xa9, 0xba, 0xa2, 0x2d, 0x87, 0x2b, 0xdf, 0x23, 0xcb, 0xe3, 0x41, 0x3, 0x2c, 0xf0, 0xbf, 0x57, 0x99, 0x7a, 0x4a, 0x19, 0x24, 0xd2, 0x4f, 0xba, 0xe9, 0xdc, 0xa1, 0x4b, 0x6d, 0x29, 0x6, 0x92, 0xb6, 0xa6, 0xb6, 0x34, 0x4c, 0xbe, 0x53, 0x17, 0x34, 0xf5, 0x8a, 0xd0, 0x22, 0x4c, 0x6e, 0x39, 0xbd, 0x1e, 0x87, 0xf8, 0x70, 0xaa, 0xd6}}, - testcase{ - msg: []byte{0xb7, 0x71, 0xd5, 0xce, 0xf5, 0xd1, 0xa4, 0x1a, 0x93, 0xd1, 0x56, 0x43, 0xd7, 0x18, 0x1d, 0x2a, 0x2e, 0xf0, 0xa8, 0xe8, 0x4d, 0x91, 0x81, 0x2f, 0x20, 0xed, 0x21, 0xf1, 0x47, 0xbe, 0xf7, 0x32, 0xbf, 0x3a, 0x60, 0xef, 0x40, 0x67, 0xc3, 0x73, 0x4b, 0x85, 0xbc, 0x8c, 0xd4, 0x71, 0x78, 0xf, 0x10, 0xdc, 0x9e, 0x82, 0x91, 0xb5, 0x83, 0x39, 0xa6, 0x77, 0xb9, 0x60, 0x21, 0x8f, 0x71, 0xe7, 0x93, 0xf2, 0x79, 0x7a, 0xea, 0x34, 0x94, 0x6, 0x51, 0x28, 0x29, 0x6, 0x5d, 0x37, 0xbb, 0x55, 0xea, 0x79, 0x6f, 0xa4, 0xf5, 0x6f, 0xd8, 0x89, 0x6b, 0x49, 0xb2, 0xcd, 0x19, 0xb4, 0x32, 0x15, 0xad, 0x96, 0x7c, 0x71, 0x2b, 0x24, 0xe5, 0x3, 0x2d, 0x6, 0x52, 0x32, 0xe0, 0x2c, 0x12, 0x74, 0x9, 0xd2, 0xed, 0x41, 0x46, 0xb9, 0xd7, 0x5d, 0x76, 0x3d, 0x52, 0xdb, 0x98, 0xd9, 0x49, 0xd3, 0xb0, 0xfe, 0xd6, 0xa8, 0x5, 0x2f, 0xbb}, - output224: []byte{0x25, 0x94, 0x15, 0x3a, 0xc2, 0xde, 0x68, 0x1f, 0x4d, 0xee, 0x34, 0xf, 0xa3, 0x44, 0xec, 0x38, 0x87, 0x73, 0xa3, 0x77, 0xd5, 0xb8, 0x9e, 0x50, 0x32, 0x54, 0xfd, 0x2e}, - output256: []byte{0xbd, 0x6f, 0x54, 0x92, 0x58, 0x2a, 0x7c, 0x1b, 0x11, 0x63, 0x4, 0xde, 0x28, 0x31, 0x4d, 0xf9, 0xff, 0xfe, 0x95, 0xb0, 0xda, 0x11, 0xaf, 0x52, 0xfe, 0x94, 0x40, 0xa7, 0x17, 0xa3, 0x48, 0x59}, - output384: []byte{0x8f, 0xfd, 0xf6, 0xa4, 0x75, 0x2d, 0x17, 0xd4, 0x96, 0xf8, 0xad, 0xee, 0x71, 0x16, 0xbd, 0x2a, 0xf0, 0xa4, 0xb7, 0x26, 0xbb, 0x3f, 0x4c, 0x5f, 0x85, 0xbe, 0x2c, 0x9d, 0xfc, 0x34, 0x5, 0x5a, 0x50, 0x9e, 0x4f, 0xe0, 0x16, 0x93, 0xd, 0x99, 0x51, 0xa7, 0x21, 0x25, 0x53, 0xe2, 0xe9, 0x8}, - output512: []byte{0x9e, 0xde, 0xeb, 0x10, 0xee, 0x1b, 0x7b, 0xb8, 0xf1, 0x6a, 0x28, 0xd, 0x8c, 0xc3, 0xed, 0xa5, 0xe9, 0x9, 0xc5, 0x54, 0x41, 0x9d, 0xdc, 0x52, 0x3b, 0x69, 0xec, 0xed, 0xf2, 0xad, 0xf3, 0xb3, 0xc9, 0xbc, 0x66, 0xfe, 0xf3, 0x65, 0x34, 0x24, 0x71, 0xc4, 0x58, 0x12, 0x6f, 0x8, 0x3a, 0x3b, 0x8e, 0x7c, 0xc, 0x9d, 0x9d, 0x77, 0xe9, 0xf9, 0x1, 0x96, 0xb7, 0x1f, 0x9a, 0xad, 0xf4, 0x92}}, - testcase{ - msg: []byte{0xb3, 0x2d, 0x95, 0xb0, 0xb9, 0xaa, 0xd2, 0xa8, 0x81, 0x6d, 0xe6, 0xd0, 0x6d, 0x1f, 0x86, 0x0, 0x85, 0x5, 0xbd, 0x8c, 0x14, 0x12, 0x4f, 0x6e, 0x9a, 0x16, 0x3b, 0x5a, 0x2a, 0xde, 0x55, 0xf8, 0x35, 0xd0, 0xec, 0x38, 0x80, 0xef, 0x50, 0x70, 0xd, 0x3b, 0x25, 0xe4, 0x2c, 0xc0, 0xaf, 0x5, 0xc, 0xcd, 0x1b, 0xe5, 0xe5, 0x55, 0xb2, 0x30, 0x87, 0xe0, 0x4d, 0x7b, 0xf9, 0x81, 0x36, 0x22, 0x78, 0xc, 0x73, 0x13, 0xa1, 0x95, 0x4f, 0x87, 0x40, 0xb6, 0xee, 0x2d, 0x3f, 0x71, 0xf7, 0x68, 0xdd, 0x41, 0x7f, 0x52, 0x4, 0x82, 0xbd, 0x3a, 0x8, 0xd4, 0xf2, 0x22, 0xb4, 0xee, 0x9d, 0xbd, 0x1, 0x54, 0x47, 0xb3, 0x35, 0x7, 0xdd, 0x50, 0xf3, 0xab, 0x42, 0x47, 0xc5, 0xde, 0x9a, 0x8a, 0xbd, 0x62, 0xa8, 0xde, 0xce, 0xa0, 0x1e, 0x3b, 0x87, 0xc8, 0xb9, 0x27, 0xf5, 0xb0, 0x8b, 0xeb, 0x37, 0x67, 0x4c, 0x6f, 0x8e, 0x38, 0xc, 0x4}, - output224: []byte{0x42, 0x27, 0x5c, 0x29, 0x69, 0x37, 0x74, 0x57, 0x58, 0xff, 0x2b, 0x7b, 0xee, 0x9a, 0x89, 0x71, 0x91, 0xae, 0x87, 0xe4, 0x2b, 0xd1, 0x1, 0x98, 0xd9, 0x46, 0x6c, 0x19}, - output256: []byte{0xe7, 0x17, 0xa7, 0x76, 0x94, 0x48, 0xab, 0xbe, 0x5f, 0xef, 0x81, 0x87, 0x95, 0x4a, 0x88, 0xac, 0x56, 0xde, 0xd1, 0xd2, 0x2e, 0x63, 0x94, 0xa, 0xb8, 0xd, 0x2, 0x95, 0x85, 0xa2, 0x19, 0x21}, - output384: []byte{0x27, 0x8e, 0x83, 0xcf, 0xf1, 0xff, 0x6c, 0xc4, 0xb3, 0xac, 0x41, 0xf3, 0x87, 0x9d, 0xa8, 0x7a, 0xe6, 0x3b, 0x53, 0x5b, 0x43, 0x81, 0x5e, 0x27, 0x36, 0x87, 0xa4, 0xcc, 0x51, 0x98, 0x55, 0xb4, 0x52, 0xcb, 0x6a, 0xf0, 0x19, 0x8b, 0xb9, 0xfd, 0xf, 0x3e, 0x43, 0x73, 0x9b, 0xc0, 0xcd, 0xd7}, - output512: []byte{0xa6, 0x5, 0x4f, 0xfc, 0x3d, 0x81, 0x59, 0x1b, 0xe9, 0x64, 0xc4, 0xb0, 0x4, 0xa3, 0xa2, 0x11, 0x42, 0x36, 0x5b, 0x59, 0xee, 0x98, 0xb2, 0x87, 0x3d, 0x48, 0x82, 0x93, 0xf9, 0x3a, 0x8d, 0x71, 0x54, 0xbf, 0x72, 0x10, 0x0, 0x12, 0xc6, 0xd, 0x3c, 0x94, 0x18, 0xf6, 0xaf, 0x8e, 0xa6, 0x63, 0x72, 0xcb, 0x47, 0x3, 0xf5, 0xf6, 0x38, 0x1d, 0xe6, 0xd4, 0xb9, 0xb9, 0x8c, 0xff, 0x1e, 0x90}}, - testcase{ - msg: []byte{0x4, 0x41, 0xe, 0x31, 0x8, 0x2a, 0x47, 0x58, 0x4b, 0x40, 0x6f, 0x5, 0x13, 0x98, 0xa6, 0xab, 0xe7, 0x4e, 0x4d, 0xa5, 0x9b, 0xb6, 0xf8, 0x5e, 0x6b, 0x49, 0xe8, 0xa1, 0xf7, 0xf2, 0xca, 0x0, 0xdf, 0xba, 0x54, 0x62, 0xc2, 0xcd, 0x2b, 0xfd, 0xe8, 0xb6, 0x4f, 0xb2, 0x1d, 0x70, 0xc0, 0x83, 0xf1, 0x13, 0x18, 0xb5, 0x6a, 0x52, 0xd0, 0x3b, 0x81, 0xca, 0xc5, 0xee, 0xc2, 0x9e, 0xb3, 0x1b, 0xd0, 0x7, 0x8b, 0x61, 0x56, 0x78, 0x6d, 0xa3, 0xd6, 0xd8, 0xc3, 0x30, 0x98, 0xc5, 0xc4, 0x7b, 0xb6, 0x7a, 0xc6, 0x4d, 0xb1, 0x41, 0x65, 0xaf, 0x65, 0xb4, 0x45, 0x44, 0xd8, 0x6, 0xdd, 0xe5, 0xf4, 0x87, 0xd5, 0x37, 0x3c, 0x7f, 0x97, 0x92, 0xc2, 0x99, 0xe9, 0x68, 0x6b, 0x7e, 0x58, 0x21, 0xe7, 0xc8, 0xe2, 0x45, 0x83, 0x15, 0xb9, 0x96, 0xb5, 0x67, 0x7d, 0x92, 0x6d, 0xac, 0x57, 0xb3, 0xf2, 0x2d, 0xa8, 0x73, 0xc6, 0x1, 0x1, 0x6a, 0xd}, - output224: []byte{0x14, 0x3f, 0x90, 0x55, 0xeb, 0x1f, 0x73, 0x67, 0x29, 0xc7, 0x77, 0x21, 0xfb, 0x65, 0xed, 0x5e, 0xe1, 0x42, 0xf6, 0xe9, 0x69, 0x13, 0x2f, 0xb2, 0x29, 0x89, 0xc1, 0x1f}, - output256: []byte{0xa9, 0x5d, 0x50, 0xb5, 0xb, 0x45, 0x45, 0xf0, 0x94, 0x74, 0x41, 0xdf, 0x74, 0xa1, 0xe9, 0xd7, 0x46, 0x22, 0xeb, 0x3b, 0xaa, 0x49, 0xc1, 0xbb, 0xfc, 0x3a, 0xc, 0xce, 0x66, 0x19, 0xc1, 0xaa}, - output384: []byte{0xaa, 0x4b, 0x5a, 0x5f, 0xb9, 0x4f, 0xe1, 0x95, 0x78, 0xf3, 0x33, 0x23, 0xba, 0x1e, 0xef, 0xc5, 0xb6, 0xed, 0x70, 0xb3, 0x4b, 0xc7, 0x1, 0x93, 0xf3, 0x86, 0xc9, 0x9f, 0x73, 0x86, 0x36, 0x11, 0xaf, 0x20, 0x58, 0x1b, 0x4b, 0x1b, 0x3e, 0xd7, 0x76, 0xdf, 0x9e, 0x23, 0x5d, 0x3d, 0x4e, 0x45}, - output512: []byte{0xb0, 0xe5, 0x4a, 0x12, 0xfd, 0xba, 0x7, 0x38, 0x89, 0x8f, 0x1b, 0xbf, 0xb, 0xa8, 0x1f, 0x81, 0xde, 0x77, 0x64, 0x8d, 0x8d, 0x14, 0xc2, 0xb, 0xdd, 0x5d, 0x90, 0xf3, 0x0, 0xd3, 0x82, 0xe0, 0x69, 0xf5, 0xdb, 0xa7, 0xee, 0xc6, 0xb2, 0x31, 0x68, 0xb0, 0x8, 0xb9, 0xf3, 0x9c, 0x2b, 0x93, 0xfd, 0x74, 0x2a, 0x59, 0x2, 0xa5, 0xe0, 0x27, 0x28, 0xf5, 0x77, 0x12, 0xd6, 0xa6, 0x1d, 0x4e}}, - testcase{ - msg: []byte{0x8b, 0x81, 0xe9, 0xba, 0xdd, 0xe0, 0x26, 0xf1, 0x4d, 0x95, 0xc0, 0x19, 0x97, 0x70, 0x24, 0xc9, 0xe1, 0x3d, 0xb7, 0xa5, 0xcd, 0x21, 0xf9, 0xe9, 0xfc, 0x49, 0x1d, 0x71, 0x61, 0x64, 0xbb, 0xac, 0xdc, 0x70, 0x60, 0xd8, 0x82, 0x61, 0x5d, 0x41, 0x14, 0x38, 0xae, 0xa0, 0x56, 0xc3, 0x40, 0xcd, 0xf9, 0x77, 0x78, 0x8f, 0x6e, 0x17, 0xd1, 0x18, 0xde, 0x55, 0x2, 0x68, 0x55, 0xf9, 0x32, 0x70, 0x47, 0x2d, 0x1f, 0xd1, 0x8b, 0x9e, 0x7e, 0x81, 0x2b, 0xae, 0x10, 0x7e, 0xd, 0xfd, 0xe7, 0x6, 0x33, 0x1, 0xb7, 0x1f, 0x6c, 0xfe, 0x4e, 0x22, 0x5c, 0xab, 0x3b, 0x23, 0x29, 0x5, 0xa5, 0x6e, 0x99, 0x4f, 0x8, 0xee, 0x28, 0x91, 0xba, 0x92, 0x2d, 0x49, 0xc3, 0xda, 0xfe, 0xb7, 0x5f, 0x7c, 0x69, 0x75, 0xc, 0xb6, 0x7d, 0x82, 0x2c, 0x96, 0x17, 0x6c, 0x46, 0xbd, 0x8a, 0x29, 0xf1, 0x70, 0x13, 0x73, 0xfb, 0x9, 0xa1, 0xa6, 0xe3, 0xc7, 0x15, 0x8f}, - output224: []byte{0x44, 0x9a, 0x3, 0x13, 0xcc, 0xab, 0x44, 0x27, 0x3, 0x2b, 0x6b, 0xe9, 0xd6, 0x6f, 0x82, 0x7f, 0xfb, 0x4c, 0x71, 0xb5, 0x38, 0xb2, 0x10, 0x4f, 0x9d, 0x14, 0xd1, 0x4a}, - output256: []byte{0xed, 0x53, 0xd7, 0x25, 0x95, 0xac, 0xe3, 0xa6, 0xd5, 0x16, 0x6a, 0x4e, 0xde, 0x41, 0xcc, 0xe3, 0x62, 0xd6, 0x44, 0xbd, 0xed, 0x77, 0x2b, 0xe6, 0x16, 0xb8, 0x7b, 0xcf, 0x67, 0x8a, 0x63, 0x64}, - output384: []byte{0x31, 0x74, 0xcf, 0x37, 0x54, 0xa6, 0xfe, 0x60, 0x36, 0x31, 0xec, 0xda, 0x48, 0x95, 0x17, 0x1a, 0x9d, 0xcf, 0x7a, 0xfb, 0x2, 0xeb, 0x72, 0xae, 0x27, 0xa, 0x9e, 0x3e, 0xbf, 0x2a, 0x65, 0xa7, 0x2c, 0x34, 0x36, 0xc2, 0x33, 0xfd, 0x4f, 0x17, 0xf7, 0xfb, 0xaf, 0xba, 0xc0, 0x68, 0xc, 0x63}, - output512: []byte{0x3c, 0xe9, 0x60, 0x77, 0xeb, 0x17, 0xc6, 0xa9, 0xc9, 0x5a, 0x9a, 0x47, 0x77, 0x48, 0x87, 0x6c, 0x64, 0x51, 0x9, 0x8d, 0xbe, 0xa2, 0xb3, 0x26, 0x1e, 0x6d, 0x75, 0xb6, 0x4a, 0x98, 0x8e, 0x1c, 0x75, 0xd7, 0xea, 0xc7, 0x3b, 0xc2, 0x40, 0x2a, 0xfc, 0x72, 0x65, 0x43, 0xe2, 0xa5, 0xbd, 0xb7, 0x66, 0x89, 0xc0, 0x93, 0x1f, 0xf7, 0x62, 0x81, 0x8d, 0xd2, 0xd3, 0xfe, 0x57, 0xa5, 0xf, 0xa9}}, - testcase{ - msg: []byte{0xfa, 0x6e, 0xed, 0x24, 0xda, 0x66, 0x66, 0xa2, 0x22, 0x8, 0x14, 0x6b, 0x19, 0xa5, 0x32, 0xc2, 0xec, 0x9b, 0xa9, 0x4f, 0x9, 0xf1, 0xde, 0xf1, 0xe7, 0xfc, 0x13, 0xc3, 0x99, 0xa4, 0x8e, 0x41, 0xac, 0xc2, 0xa5, 0x89, 0xd0, 0x99, 0x27, 0x62, 0x96, 0x34, 0x8f, 0x39, 0x62, 0x53, 0xb5, 0x7c, 0xb0, 0xe4, 0x2, 0x91, 0xbd, 0x28, 0x27, 0x73, 0x65, 0x6b, 0x6e, 0xd, 0x8b, 0xea, 0x1c, 0xda, 0x8, 0x4a, 0x37, 0x38, 0x81, 0x6a, 0x84, 0x4, 0x85, 0xfc, 0xf3, 0xfb, 0x30, 0x7f, 0x77, 0x7f, 0xa5, 0xfe, 0xac, 0x48, 0x69, 0x5c, 0x2a, 0xf4, 0x76, 0x97, 0x20, 0x25, 0x8c, 0x77, 0x94, 0x3f, 0xb4, 0x55, 0x6c, 0x36, 0x2d, 0x9c, 0xba, 0x8b, 0xf1, 0x3, 0xae, 0xb9, 0x3, 0x4b, 0xaa, 0x8e, 0xa8, 0xbf, 0xb9, 0xc4, 0xf8, 0xe6, 0x74, 0x2c, 0xe0, 0xd5, 0x2c, 0x49, 0xea, 0x8e, 0x97, 0x4f, 0x33, 0x96, 0x12, 0xe8, 0x30, 0xe9, 0xe7, 0xa9, 0xc2, 0x90, 0x65}, - output224: []byte{0x21, 0xe2, 0x76, 0x6, 0x44, 0xa1, 0x9e, 0xd1, 0x8e, 0xd0, 0xcd, 0x74, 0xc4, 0xe4, 0xc0, 0x71, 0xd7, 0x70, 0x13, 0x2a, 0xd2, 0x15, 0xeb, 0x6f, 0x7d, 0x42, 0xb0, 0x1d}, - output256: []byte{0x81, 0x4, 0x1, 0xb2, 0x47, 0xc2, 0x35, 0x29, 0xe2, 0x46, 0x55, 0xca, 0xb8, 0x6c, 0x42, 0xdf, 0x44, 0x8, 0x5d, 0xa7, 0x6c, 0xa0, 0x1c, 0x9a, 0x14, 0x61, 0x8e, 0x56, 0x3b, 0x7c, 0x41, 0xbe}, - output384: []byte{0x35, 0x48, 0x13, 0xd9, 0x82, 0x3d, 0x2f, 0x2, 0xd7, 0x5d, 0x13, 0x89, 0x3a, 0x6a, 0xbd, 0xb4, 0x4e, 0x9e, 0x99, 0x66, 0x65, 0x33, 0x42, 0x9c, 0xc6, 0xf7, 0xeb, 0x3f, 0xba, 0x10, 0xbf, 0x9e, 0xcd, 0x4a, 0x18, 0xbb, 0x9d, 0x51, 0x88, 0xe6, 0xe8, 0xf9, 0x1d, 0xfd, 0xdb, 0xe8, 0x40, 0x9a}, - output512: []byte{0xc9, 0xac, 0xd6, 0xd9, 0x8a, 0x34, 0x95, 0x12, 0xb9, 0x52, 0xd1, 0x51, 0xed, 0x50, 0x15, 0x62, 0xf0, 0x4e, 0xa4, 0xbb, 0x4b, 0x89, 0x65, 0x81, 0x25, 0x10, 0xb9, 0xb8, 0x42, 0x53, 0x1a, 0x2b, 0x41, 0xa0, 0x10, 0x8a, 0xc1, 0x29, 0xcf, 0x9c, 0x95, 0x17, 0xbe, 0x79, 0x9, 0x21, 0xdf, 0x64, 0xad, 0x1d, 0xfc, 0xb, 0x93, 0xdd, 0xba, 0x34, 0x15, 0xee, 0xba, 0xf0, 0xda, 0x72, 0xf6, 0xa0}}, - testcase{ - msg: []byte{0x9b, 0xb4, 0xaf, 0x1b, 0x4f, 0x9, 0xc0, 0x71, 0xce, 0x3c, 0xaf, 0xa9, 0x2e, 0x4e, 0xb7, 0x3c, 0xe8, 0xa6, 0xf5, 0xd8, 0x2a, 0x85, 0x73, 0x34, 0x40, 0x36, 0x8d, 0xee, 0x4e, 0xb1, 0xcb, 0xc7, 0xb5, 0x5a, 0xc1, 0x50, 0x77, 0x3b, 0x6f, 0xe4, 0x7d, 0xbe, 0x3, 0x6c, 0x45, 0x58, 0x2e, 0xd6, 0x7e, 0x23, 0xf4, 0xc7, 0x45, 0x85, 0xda, 0xb5, 0x9, 0xdf, 0x1b, 0x83, 0x61, 0x5, 0x64, 0x54, 0x56, 0x42, 0xb2, 0xb1, 0xec, 0x46, 0x3e, 0x18, 0x4, 0x8f, 0xc2, 0x34, 0x77, 0xc6, 0xb2, 0xaa, 0x3, 0x55, 0x94, 0xec, 0xd3, 0x37, 0x91, 0xaf, 0x6a, 0xf4, 0xcb, 0xc2, 0xa1, 0x16, 0x6a, 0xba, 0x8d, 0x62, 0x8c, 0x57, 0xe7, 0x7, 0xf0, 0xb0, 0xe8, 0x70, 0x7c, 0xaf, 0x91, 0xcd, 0x44, 0xbd, 0xb9, 0x15, 0xe0, 0x29, 0x6e, 0x1, 0x90, 0xd5, 0x6d, 0x33, 0xd8, 0xdd, 0xe1, 0xb, 0x5b, 0x60, 0x37, 0x78, 0x38, 0x97, 0x3c, 0x1d, 0x94, 0x3c, 0x22, 0xed, 0x33, 0x5e}, - output224: []byte{0xd5, 0x53, 0x4c, 0x72, 0xbe, 0x2e, 0x4b, 0x1f, 0xaa, 0xa8, 0x13, 0x11, 0x8b, 0xd, 0x29, 0xdb, 0xb8, 0x6f, 0x62, 0x40, 0x67, 0xea, 0x34, 0x51, 0x5a, 0xfa, 0x8, 0xbe}, - output256: []byte{0x9f, 0x1, 0xe6, 0x3f, 0x23, 0x55, 0x39, 0x3e, 0xcb, 0x19, 0x8, 0xd0, 0xca, 0xf3, 0x97, 0x18, 0x83, 0x30, 0x4, 0xa4, 0xbf, 0x37, 0xeb, 0xf4, 0xcf, 0x8d, 0x73, 0x19, 0xb6, 0x51, 0x72, 0xdf}, - output384: []byte{0xe2, 0xef, 0xdc, 0x50, 0x7, 0xe4, 0xc1, 0x3f, 0x81, 0x10, 0x43, 0xdb, 0x96, 0x7a, 0x42, 0x3d, 0xe0, 0x2a, 0xf4, 0x11, 0xb4, 0xa2, 0x51, 0xa2, 0x25, 0xca, 0xd0, 0x41, 0xe8, 0x3b, 0xd4, 0xdd, 0x89, 0xd8, 0xb2, 0x41, 0x98, 0xda, 0x0, 0x9, 0x6c, 0xfe, 0x2e, 0x1b, 0x3f, 0x5d, 0x19, 0x60}, - output512: []byte{0x26, 0xb4, 0xe5, 0xc4, 0xfa, 0x85, 0xcb, 0x33, 0x35, 0x94, 0x50, 0xe7, 0xf7, 0x15, 0x8f, 0xb6, 0xa0, 0x73, 0x99, 0x84, 0x56, 0x5e, 0x9d, 0x9e, 0xbe, 0x6a, 0xd6, 0x5b, 0x11, 0x82, 0x96, 0xe9, 0xc1, 0x9, 0x8c, 0x11, 0x54, 0x1c, 0x87, 0x1e, 0xb1, 0xb8, 0x98, 0x53, 0xf1, 0xfa, 0x73, 0xad, 0x87, 0x2, 0xeb, 0xf4, 0xfc, 0x9b, 0xe4, 0xd0, 0xab, 0x5, 0x7e, 0x43, 0x91, 0xdf, 0x96, 0x4e}}, - testcase{ - msg: []byte{0x21, 0x67, 0xf0, 0x21, 0x18, 0xcc, 0x62, 0x4, 0x3e, 0x90, 0x91, 0xa6, 0x47, 0xca, 0xdb, 0xed, 0x95, 0x61, 0x1a, 0x52, 0x1f, 0xe0, 0xd6, 0x4e, 0x85, 0x18, 0xf1, 0x6c, 0x80, 0x8a, 0xb2, 0x97, 0x72, 0x55, 0x98, 0xae, 0x29, 0x68, 0x80, 0xa7, 0x73, 0x60, 0x7a, 0x79, 0x8f, 0x7c, 0x3c, 0xfc, 0xe8, 0xd, 0x25, 0x1e, 0xbe, 0xc6, 0x88, 0x50, 0x15, 0xf9, 0xab, 0xf7, 0xea, 0xab, 0xae, 0x46, 0x79, 0x8f, 0x82, 0xcb, 0x59, 0x26, 0xde, 0x5c, 0x23, 0xf4, 0x4a, 0x3f, 0x9f, 0x95, 0x34, 0xb3, 0xc6, 0xf4, 0x5, 0xb5, 0x36, 0x4c, 0x2f, 0x8a, 0x8b, 0xdc, 0x5c, 0xa4, 0x9c, 0x74, 0x9b, 0xed, 0x8c, 0xe4, 0xba, 0x48, 0x89, 0x70, 0x62, 0xae, 0x84, 0x24, 0xca, 0x6d, 0xde, 0x5f, 0x55, 0xc0, 0xe4, 0x2a, 0x95, 0xd1, 0xe2, 0x92, 0xca, 0x54, 0xfb, 0x46, 0xa8, 0x4f, 0xbc, 0x9c, 0xd8, 0x7f, 0x2d, 0xc, 0x9e, 0x74, 0x48, 0xde, 0x30, 0x43, 0xae, 0x22, 0xfd, 0xd2, 0x29}, - output224: []byte{0xc0, 0xcd, 0x41, 0x3b, 0x1c, 0xe0, 0x0, 0xa1, 0xbb, 0xe3, 0xa2, 0xcd, 0x10, 0x3c, 0x7f, 0x8f, 0x95, 0x92, 0x5a, 0xc6, 0xc8, 0xa5, 0xc9, 0x22, 0xaf, 0xb5, 0xf9, 0x6d}, - output256: []byte{0x7e, 0xc1, 0x1d, 0xe7, 0xdb, 0x79, 0xa, 0x85, 0x2, 0x81, 0xf0, 0x43, 0x59, 0x27, 0x79, 0xb4, 0x9, 0x19, 0x5d, 0xb4, 0xec, 0xed, 0xee, 0xfb, 0xb9, 0x3b, 0xa6, 0x83, 0xd3, 0xbc, 0xa8, 0x51}, - output384: []byte{0xe4, 0x4c, 0x8, 0x56, 0xf0, 0xc2, 0x45, 0xe0, 0x2, 0xf9, 0x14, 0xcf, 0x30, 0xe, 0x98, 0xc4, 0x96, 0xe7, 0x25, 0xa4, 0xdb, 0x56, 0x1f, 0x29, 0x95, 0xad, 0x9c, 0x8b, 0x97, 0xf3, 0x41, 0xe1, 0x56, 0x25, 0xb5, 0x6b, 0x3, 0xd4, 0xd5, 0x88, 0x9, 0x27, 0xb8, 0x57, 0x4f, 0x5e, 0x5d, 0x74}, - output512: []byte{0x91, 0x3b, 0xba, 0x5c, 0xc, 0x13, 0xcc, 0x49, 0xd8, 0x31, 0x0, 0x14, 0xcf, 0x5a, 0xf1, 0xb6, 0x3b, 0xa3, 0xd5, 0xdb, 0x8a, 0x27, 0x69, 0x9f, 0xcf, 0xc5, 0x73, 0x68, 0x8f, 0xe, 0x82, 0x6f, 0xb5, 0xa7, 0xb5, 0xd1, 0xd, 0x3a, 0x1d, 0xe6, 0x93, 0xaa, 0x66, 0xe0, 0x8c, 0x9, 0x15, 0xe7, 0x27, 0x8f, 0x61, 0xb5, 0xfa, 0x30, 0xf1, 0x26, 0x3b, 0x13, 0x4f, 0x1, 0x6f, 0x74, 0x84, 0x1f}}, - testcase{ - msg: []byte{0x94, 0xb7, 0xfa, 0xb, 0xc1, 0xc4, 0x4e, 0x94, 0x9b, 0x1d, 0x76, 0x17, 0xd3, 0x1b, 0x47, 0x20, 0xcb, 0xe7, 0xca, 0x57, 0xc6, 0xfa, 0x4f, 0x40, 0x94, 0xd4, 0x76, 0x15, 0x67, 0xe3, 0x89, 0xec, 0xc6, 0x4f, 0x69, 0x68, 0xe4, 0x6, 0x4d, 0xf7, 0xd, 0xf8, 0x36, 0xa4, 0x7d, 0xc, 0x71, 0x33, 0x36, 0xb5, 0x2, 0x8b, 0x35, 0x93, 0xd, 0x29, 0xeb, 0x7a, 0x7f, 0x9a, 0x5a, 0xf9, 0xad, 0x5c, 0xf4, 0x41, 0x74, 0x5b, 0xae, 0xc9, 0xbb, 0x1, 0x4c, 0xee, 0xff, 0x5a, 0x41, 0xba, 0x5c, 0x1c, 0xe0, 0x85, 0xfe, 0xb9, 0x80, 0xba, 0xb9, 0xcf, 0x79, 0xf2, 0x15, 0x8e, 0x3, 0xef, 0x7e, 0x63, 0xe2, 0x9c, 0x38, 0xd7, 0x81, 0x6a, 0x84, 0xd4, 0xf7, 0x1e, 0xf, 0x54, 0x8b, 0x7f, 0xc3, 0x16, 0x8, 0x5a, 0xe3, 0x8a, 0x6, 0xf, 0xf9, 0xb8, 0xde, 0xc3, 0x6f, 0x91, 0xad, 0x9e, 0xbc, 0xa, 0x5b, 0x6c, 0x33, 0x8c, 0xbb, 0x8f, 0x66, 0x59, 0xd3, 0x42, 0xa2, 0x43, 0x68, 0xcf}, - output224: []byte{0x93, 0xc6, 0xbf, 0x58, 0x5e, 0x99, 0x4b, 0x16, 0x69, 0x18, 0x4a, 0xc7, 0x1d, 0xc8, 0xe7, 0x72, 0xb5, 0x34, 0x43, 0xe6, 0x68, 0xda, 0x7, 0x86, 0xd5, 0x28, 0x9, 0xb}, - output256: []byte{0xa7, 0x4a, 0xf9, 0xc5, 0x23, 0xb4, 0xa0, 0x8d, 0x9d, 0xb9, 0x69, 0x2e, 0xa8, 0x92, 0x55, 0x97, 0x7a, 0x59, 0x19, 0xb9, 0x29, 0x2b, 0x7c, 0xd0, 0xd9, 0x2c, 0x90, 0xc9, 0x7c, 0x98, 0xe2, 0x24}, - output384: []byte{0x5d, 0x29, 0xc, 0x5d, 0xff, 0x59, 0xa3, 0xa3, 0xdb, 0x8b, 0xc7, 0x32, 0xb, 0x8f, 0x64, 0xa4, 0xdb, 0xf6, 0x7c, 0xa4, 0xf5, 0xdf, 0x9a, 0x7, 0xf2, 0x35, 0xed, 0xb6, 0x46, 0x3, 0x45, 0xfc, 0x89, 0x71, 0x4, 0x4, 0x81, 0xc9, 0xa5, 0xd0, 0xf0, 0x9b, 0x62, 0x26, 0x2b, 0x9e, 0xd9, 0xf8}, - output512: []byte{0xe5, 0xd5, 0x3e, 0x81, 0x86, 0x62, 0x83, 0x17, 0x90, 0x12, 0xd9, 0x23, 0x93, 0x40, 0xb0, 0xcb, 0xfb, 0x8d, 0x7a, 0xeb, 0xce, 0xc, 0x82, 0x4d, 0xc6, 0x65, 0x3a, 0x65, 0x2b, 0xb1, 0xb5, 0x4e, 0x8, 0x83, 0x99, 0x1b, 0xe2, 0xc3, 0xe3, 0x9a, 0xd1, 0x11, 0xa7, 0xb2, 0x4e, 0x95, 0xda, 0xf6, 0xf7, 0xd9, 0xa3, 0x79, 0xd8, 0x84, 0xd6, 0x4f, 0x9c, 0x2a, 0xfd, 0x64, 0x5e, 0x1d, 0xb5, 0xe2}}, - testcase{ - msg: []byte{0xea, 0x40, 0xe8, 0x3c, 0xb1, 0x8b, 0x3a, 0x24, 0x2c, 0x1e, 0xcc, 0x6c, 0xcd, 0xb, 0x78, 0x53, 0xa4, 0x39, 0xda, 0xb2, 0xc5, 0x69, 0xcf, 0xc6, 0xdc, 0x38, 0xa1, 0x9f, 0x5c, 0x90, 0xac, 0xbf, 0x76, 0xae, 0xf9, 0xea, 0x37, 0x42, 0xff, 0x3b, 0x54, 0xef, 0x7d, 0x36, 0xeb, 0x7c, 0xe4, 0xff, 0x1c, 0x9a, 0xb3, 0xbc, 0x11, 0x9c, 0xff, 0x6b, 0xe9, 0x3c, 0x3, 0xe2, 0x8, 0x78, 0x33, 0x35, 0xc0, 0xab, 0x81, 0x37, 0xbe, 0x5b, 0x10, 0xcd, 0xc6, 0x6f, 0xf3, 0xf8, 0x9a, 0x1b, 0xdd, 0xc6, 0xa1, 0xee, 0xd7, 0x4f, 0x50, 0x4c, 0xbe, 0x72, 0x90, 0x69, 0xb, 0xb2, 0x95, 0xa8, 0x72, 0xb9, 0xe3, 0xfe, 0x2c, 0xee, 0x9e, 0x6c, 0x67, 0xc4, 0x1d, 0xb8, 0xef, 0xd7, 0xd8, 0x63, 0xcf, 0x10, 0xf8, 0x40, 0xfe, 0x61, 0x8e, 0x79, 0x36, 0xda, 0x3d, 0xca, 0x5c, 0xa6, 0xdf, 0x93, 0x3f, 0x24, 0xf6, 0x95, 0x4b, 0xa0, 0x80, 0x1a, 0x12, 0x94, 0xcd, 0x8d, 0x7e, 0x66, 0xdf, 0xaf, 0xec}, - output224: []byte{0xbf, 0xe1, 0x5b, 0xb5, 0x1f, 0x68, 0xf, 0x2f, 0x48, 0x9f, 0xf, 0xde, 0xb3, 0x2f, 0x27, 0x10, 0x90, 0xa0, 0x9d, 0x15, 0x63, 0xf2, 0x9f, 0xea, 0xf9, 0x21, 0x4, 0xe0}, - output256: []byte{0x34, 0x4d, 0x12, 0x9c, 0x22, 0x83, 0x59, 0x46, 0x3c, 0x40, 0x55, 0x5d, 0x94, 0x21, 0x3d, 0x1, 0x56, 0x27, 0xe5, 0x87, 0x1c, 0x4, 0xf1, 0x6, 0xa0, 0xfe, 0xef, 0x93, 0x61, 0xcd, 0xec, 0xb6}, - output384: []byte{0xfe, 0x68, 0x2, 0x50, 0xca, 0xb1, 0xfb, 0xdb, 0x6a, 0xc8, 0x80, 0xd, 0xdc, 0x28, 0xe7, 0x1, 0x0, 0xdf, 0x8d, 0xaa, 0xe3, 0x8d, 0xa2, 0x70, 0x4, 0x87, 0x2a, 0xb0, 0x5d, 0x40, 0xb1, 0x5a, 0xe9, 0x3e, 0xb4, 0x42, 0x66, 0xe3, 0x1, 0x4f, 0x9, 0x60, 0x3, 0x8b, 0x28, 0x25, 0x2c, 0x7b}, - output512: []byte{0x5d, 0xa8, 0x3b, 0x7e, 0x22, 0x19, 0x33, 0xcd, 0x67, 0xfa, 0x2a, 0xf8, 0xc9, 0x93, 0x4d, 0xb7, 0x4c, 0xe8, 0x22, 0x21, 0x2c, 0x99, 0xe0, 0xee, 0x1, 0xf5, 0x22, 0xb, 0x4f, 0xe1, 0xe9, 0xb0, 0x38, 0x8e, 0x42, 0xe3, 0x28, 0xa1, 0xd1, 0x74, 0xe6, 0x36, 0x8f, 0x57, 0x73, 0x85, 0x30, 0x42, 0x54, 0x3a, 0x9b, 0x49, 0x3a, 0x94, 0xb6, 0x25, 0x98, 0xb, 0x73, 0xdf, 0x3f, 0x3f, 0xcc, 0xbb}}, - testcase{ - msg: []byte{0x15, 0x7d, 0x5b, 0x7e, 0x45, 0x7, 0xf6, 0x6d, 0x9a, 0x26, 0x74, 0x76, 0xd3, 0x38, 0x31, 0xe7, 0xbb, 0x76, 0x8d, 0x4d, 0x4, 0xcc, 0x34, 0x38, 0xda, 0x12, 0xf9, 0x1, 0x2, 0x63, 0xea, 0x5f, 0xca, 0xfb, 0xde, 0x25, 0x79, 0xdb, 0x2f, 0x6b, 0x58, 0xf9, 0x11, 0xd5, 0x93, 0xd5, 0xf7, 0x9f, 0xb0, 0x5f, 0xe3, 0x59, 0x6e, 0x3f, 0xa8, 0xf, 0xf2, 0xf7, 0x61, 0xd1, 0xb0, 0xe5, 0x70, 0x80, 0x5, 0x5c, 0x11, 0x8c, 0x53, 0xe5, 0x3c, 0xdb, 0x63, 0x5, 0x52, 0x61, 0xd7, 0xc9, 0xb2, 0xb3, 0x9b, 0xd9, 0xa, 0xcc, 0x32, 0x52, 0xc, 0xbb, 0xdb, 0xda, 0x2c, 0x4f, 0xd8, 0x85, 0x6d, 0xbc, 0xee, 0x17, 0x31, 0x32, 0xa2, 0x67, 0x91, 0x98, 0xda, 0xf8, 0x30, 0x7, 0xa9, 0xb5, 0xc5, 0x15, 0x11, 0xae, 0x49, 0x76, 0x6c, 0x79, 0x2a, 0x29, 0x52, 0x3, 0x88, 0x44, 0x4e, 0xbe, 0xfe, 0x28, 0x25, 0x6f, 0xb3, 0x3d, 0x42, 0x60, 0x43, 0x9c, 0xba, 0x73, 0xa9, 0x47, 0x9e, 0xe0, 0xc, 0x63}, - output224: []byte{0x6d, 0x73, 0x5f, 0xb7, 0x57, 0x91, 0x35, 0xf6, 0x1b, 0x77, 0x1b, 0x2b, 0xb0, 0xd8, 0x15, 0x14, 0xcd, 0xe9, 0xc9, 0x77, 0xac, 0xcf, 0x6f, 0xea, 0xf6, 0xed, 0xeb, 0xf0}, - output256: []byte{0x4c, 0xe7, 0xc2, 0xb9, 0x35, 0xf2, 0x1f, 0xc3, 0x4c, 0x5e, 0x56, 0xd9, 0x40, 0xa5, 0x55, 0xc5, 0x93, 0x87, 0x2a, 0xec, 0x2f, 0x89, 0x6d, 0xe4, 0xe6, 0x8f, 0x2a, 0x1, 0x70, 0x60, 0xf5, 0x35}, - output384: []byte{0x51, 0x1b, 0x13, 0xe5, 0x3f, 0xd3, 0x53, 0xfa, 0x4d, 0x38, 0xef, 0xc, 0xf8, 0xf1, 0xaf, 0x30, 0xda, 0x55, 0x48, 0x28, 0xa5, 0xfd, 0x1c, 0x53, 0xec, 0x41, 0xf7, 0x3d, 0x9a, 0xca, 0x6c, 0x54, 0xac, 0x79, 0x72, 0xc9, 0x33, 0xaf, 0x4a, 0x2f, 0xc7, 0xab, 0x85, 0x2c, 0xa6, 0x3a, 0x1b, 0xa6}, - output512: []byte{0x72, 0xde, 0x91, 0x84, 0xbe, 0xb5, 0xc6, 0xa3, 0x7e, 0xa2, 0xc3, 0x95, 0x73, 0x4d, 0xd, 0x54, 0x12, 0x99, 0x1a, 0x57, 0xcf, 0xfc, 0xc1, 0x3f, 0xf9, 0xb5, 0xfa, 0xf, 0x20, 0x46, 0xee, 0x87, 0xc6, 0x18, 0x11, 0xfe, 0x8e, 0xf2, 0x47, 0x2, 0x39, 0xd5, 0x6, 0x6c, 0x22, 0x1, 0x73, 0xde, 0x5e, 0xbe, 0x41, 0x88, 0x5e, 0xd8, 0xac, 0xae, 0x39, 0x7f, 0xb3, 0x95, 0xe6, 0xca, 0x9a, 0xee}}, - testcase{ - msg: []byte{0x83, 0x6b, 0x34, 0xb5, 0x15, 0x47, 0x6f, 0x61, 0x3f, 0xe4, 0x47, 0xa4, 0xe0, 0xc3, 0xf3, 0xb8, 0xf2, 0x9, 0x10, 0xac, 0x89, 0xa3, 0x97, 0x70, 0x55, 0xc9, 0x60, 0xd2, 0xd5, 0xd2, 0xb7, 0x2b, 0xd8, 0xac, 0xc7, 0x15, 0xa9, 0x3, 0x53, 0x21, 0xb8, 0x67, 0x3, 0xa4, 0x11, 0xdd, 0xe0, 0x46, 0x6d, 0x58, 0xa5, 0x97, 0x69, 0x67, 0x2a, 0xa6, 0xa, 0xd5, 0x87, 0xb8, 0x48, 0x1d, 0xe4, 0xbb, 0xa5, 0x52, 0xa1, 0x64, 0x57, 0x79, 0x78, 0x95, 0x1, 0xec, 0x53, 0xd5, 0x40, 0xb9, 0x4, 0x82, 0x1f, 0x32, 0xb0, 0xbd, 0x18, 0x55, 0xb0, 0x4e, 0x48, 0x48, 0xf9, 0xf8, 0xcf, 0xe9, 0xeb, 0xd8, 0x91, 0x1b, 0xe9, 0x57, 0x81, 0xa7, 0x59, 0xd7, 0xad, 0x97, 0x24, 0xa7, 0x10, 0x2d, 0xbe, 0x57, 0x67, 0x76, 0xb7, 0xc6, 0x32, 0xbc, 0x39, 0xb9, 0xb5, 0xe1, 0x90, 0x57, 0xe2, 0x26, 0x55, 0x2a, 0x59, 0x94, 0xc1, 0xdb, 0xb3, 0xb5, 0xc7, 0x87, 0x1a, 0x11, 0xf5, 0x53, 0x70, 0x11, 0x4, 0x4c, 0x53}, - output224: []byte{0x6d, 0x93, 0x15, 0x31, 0x45, 0x90, 0x4c, 0xeb, 0xe0, 0xe8, 0xa6, 0x6c, 0x27, 0x2b, 0xed, 0xf4, 0xf0, 0xd0, 0xa3, 0xc5, 0x3a, 0xb3, 0x2, 0x64, 0x13, 0x54, 0x31, 0xa7}, - output256: []byte{0x24, 0xb6, 0x9d, 0x8a, 0xb3, 0x5b, 0xac, 0xcb, 0xd9, 0x2f, 0x94, 0xe1, 0xb7, 0xb, 0x7, 0xc4, 0xc0, 0xec, 0xf1, 0x4e, 0xae, 0xac, 0x4b, 0x6b, 0x85, 0x60, 0x96, 0x6d, 0x5b, 0xe0, 0x86, 0xf3}, - output384: []byte{0x55, 0x4c, 0xf0, 0xa, 0x9a, 0xaf, 0xe0, 0xdf, 0xc8, 0xd4, 0x9e, 0xa0, 0x32, 0x88, 0xb5, 0x2a, 0xed, 0x43, 0xa5, 0x10, 0x4e, 0x22, 0xb8, 0x38, 0xe4, 0xf, 0xde, 0x73, 0x58, 0x49, 0x1b, 0x57, 0x74, 0xdf, 0x45, 0x5c, 0xf2, 0xec, 0x73, 0xc5, 0x3a, 0x7b, 0x30, 0x62, 0x7a, 0x14, 0x2a, 0x41}, - output512: []byte{0xb6, 0x78, 0xfa, 0x76, 0x55, 0x58, 0x49, 0x70, 0xde, 0xdb, 0xbc, 0x73, 0xa1, 0x6d, 0x78, 0x40, 0x93, 0x5b, 0x10, 0x4d, 0x6, 0xdc, 0xb4, 0x68, 0xdd, 0xd9, 0x81, 0x4d, 0x6c, 0xf4, 0x43, 0xfa, 0x6f, 0x92, 0x45, 0x82, 0x4d, 0xbf, 0xf3, 0xab, 0x5f, 0xff, 0xef, 0x24, 0xb2, 0x9c, 0xb2, 0x97, 0x87, 0x96, 0xf3, 0x7e, 0x7b, 0x49, 0xb1, 0x68, 0x2d, 0x59, 0xf7, 0x9e, 0x3c, 0x16, 0x9e, 0x81}}, - testcase{ - msg: []byte{0xcc, 0x77, 0x84, 0xa4, 0x91, 0x2a, 0x7a, 0xb5, 0xad, 0x36, 0x20, 0xaa, 0xb2, 0x9b, 0xa8, 0x70, 0x77, 0xcd, 0x3c, 0xb8, 0x36, 0x36, 0xad, 0xc9, 0xf3, 0xdc, 0x94, 0xf5, 0x1e, 0xdf, 0x52, 0x1b, 0x21, 0x61, 0xef, 0x10, 0x8f, 0x21, 0xa0, 0xa2, 0x98, 0x55, 0x79, 0x81, 0xc0, 0xe5, 0x3c, 0xe6, 0xce, 0xd4, 0x5b, 0xdf, 0x78, 0x2c, 0x1e, 0xf2, 0x0, 0xd2, 0x9b, 0xab, 0x81, 0xdd, 0x64, 0x60, 0x58, 0x69, 0x64, 0xed, 0xab, 0x7c, 0xeb, 0xdb, 0xbe, 0xc7, 0x5f, 0xd7, 0x92, 0x50, 0x60, 0xf7, 0xda, 0x2b, 0x85, 0x3b, 0x2b, 0x8, 0x95, 0x88, 0xfa, 0xf, 0x8c, 0x16, 0xec, 0x64, 0x98, 0xb1, 0x4c, 0x55, 0xdc, 0xee, 0x33, 0x5c, 0xb3, 0xa9, 0x1d, 0x69, 0x8e, 0x4d, 0x39, 0x3a, 0xb8, 0xe8, 0xea, 0xc0, 0x82, 0x5f, 0x8a, 0xde, 0xbe, 0xee, 0x19, 0x6d, 0xf4, 0x12, 0x5, 0xc0, 0x11, 0x67, 0x4e, 0x53, 0x42, 0x6c, 0xaa, 0x45, 0x3f, 0x8d, 0xe1, 0xcb, 0xb5, 0x79, 0x32, 0xb0, 0xb7, 0x41, 0xd4, 0xc6}, - output224: []byte{0xaf, 0xe3, 0x5, 0x35, 0x67, 0x5a, 0x70, 0x21, 0xbf, 0x61, 0x89, 0x41, 0xd9, 0x4d, 0xdf, 0xfc, 0xce, 0xfc, 0xaa, 0x1e, 0xf0, 0x6c, 0xde, 0x30, 0x6d, 0x5d, 0x7a, 0x75}, - output256: []byte{0x19, 0xf3, 0x42, 0x15, 0x37, 0x3e, 0x8e, 0x80, 0xf6, 0x86, 0x95, 0x3e, 0x3, 0xca, 0x47, 0x2b, 0x50, 0x21, 0x67, 0x19, 0xcb, 0x51, 0x5e, 0x6, 0x67, 0xd4, 0xe6, 0x86, 0xe4, 0x5f, 0xcf, 0x7c}, - output384: []byte{0xc1, 0x3c, 0x17, 0x7e, 0x64, 0x53, 0xf7, 0x8e, 0x81, 0xbc, 0x4e, 0xfe, 0xa7, 0xa1, 0xe, 0x9c, 0xa0, 0x22, 0x73, 0xa6, 0xeb, 0x75, 0x74, 0x97, 0x36, 0x85, 0x39, 0xbf, 0x4a, 0xe1, 0xf1, 0xbb, 0xcb, 0xae, 0xf, 0xff, 0x5d, 0xad, 0x55, 0xed, 0xca, 0x61, 0xf4, 0x74, 0x97, 0x6c, 0xbf, 0x64}, - output512: []byte{0x66, 0xc6, 0x4d, 0x5b, 0x5, 0x85, 0xdd, 0x8c, 0x40, 0xbe, 0xcd, 0x45, 0x6e, 0x4b, 0x1, 0x88, 0x6, 0x1a, 0xe8, 0x5, 0x9f, 0x3, 0xe7, 0x9f, 0xe0, 0x4c, 0x40, 0x92, 0x54, 0x42, 0xba, 0x93, 0xb0, 0x52, 0xf5, 0x20, 0x87, 0xb3, 0xb, 0xdb, 0xfd, 0x48, 0x16, 0xbb, 0xd1, 0x48, 0x69, 0x6d, 0x4f, 0xa6, 0xc6, 0x1f, 0x21, 0x62, 0x53, 0xd7, 0xac, 0x17, 0x8b, 0x39, 0xec, 0x44, 0xc7, 0x70}}, - testcase{ - msg: []byte{0x76, 0x39, 0xb4, 0x61, 0xff, 0xf2, 0x70, 0xb2, 0x45, 0x5a, 0xc1, 0xd1, 0xaf, 0xce, 0x78, 0x29, 0x44, 0xae, 0xa5, 0xe9, 0x8, 0x7e, 0xb4, 0xa3, 0x9e, 0xb9, 0x6b, 0xb5, 0xc3, 0xba, 0xaf, 0xe, 0x86, 0x8c, 0x85, 0x26, 0xd3, 0x40, 0x4f, 0x94, 0x5, 0xe7, 0x9e, 0x77, 0xbf, 0xac, 0x5f, 0xfb, 0x89, 0xbf, 0x19, 0x57, 0xb5, 0x23, 0xe1, 0x7d, 0x34, 0x1d, 0x73, 0x23, 0xc3, 0x2, 0xea, 0x70, 0x83, 0x87, 0x2d, 0xd5, 0xe8, 0x70, 0x56, 0x94, 0xac, 0xdd, 0xa3, 0x6d, 0x5a, 0x1b, 0x89, 0x5a, 0xaa, 0x16, 0xec, 0xa6, 0x10, 0x4c, 0x82, 0x68, 0x85, 0x32, 0xc8, 0xbf, 0xe1, 0x79, 0xb, 0x5d, 0xc9, 0xf4, 0xec, 0x5f, 0xe9, 0x5b, 0xae, 0xd3, 0x7e, 0x1d, 0x28, 0x7b, 0xe7, 0x10, 0x43, 0x1f, 0x1e, 0x5e, 0x8e, 0xe1, 0x5, 0xbc, 0x42, 0xed, 0x37, 0xd7, 0x4b, 0x1e, 0x55, 0x98, 0x4b, 0xf1, 0xc0, 0x9f, 0xe6, 0xa1, 0xfa, 0x13, 0xef, 0x3b, 0x96, 0xfa, 0xea, 0xed, 0x6a, 0x2a, 0x19, 0x50, 0xa1, 0x21, 0x53}, - output224: []byte{0x91, 0x65, 0x1, 0x61, 0x48, 0x91, 0xbd, 0x99, 0x40, 0xa, 0x8a, 0xea, 0xab, 0xf6, 0x93, 0x26, 0xfa, 0x98, 0xb8, 0x33, 0xae, 0xd8, 0x23, 0x86, 0xab, 0x19, 0xe5, 0x7}, - output256: []byte{0x29, 0xb, 0xd4, 0x80, 0x8e, 0x56, 0x76, 0xeb, 0xc, 0x97, 0x80, 0x84, 0xe4, 0xcd, 0x68, 0xe7, 0x45, 0x3, 0x16, 0x59, 0xa2, 0x68, 0x7, 0xad, 0x61, 0x5b, 0x10, 0xcd, 0xa5, 0x89, 0xb9, 0x69}, - output384: []byte{0xc3, 0xe5, 0xdd, 0xf4, 0x57, 0x2a, 0x38, 0x6c, 0x99, 0xf9, 0x98, 0xe6, 0x8f, 0xcc, 0xc7, 0xf8, 0x58, 0x67, 0xa7, 0x3e, 0x13, 0xc2, 0x5, 0x8c, 0x18, 0x39, 0x1a, 0x92, 0x24, 0x16, 0xfd, 0x35, 0x2c, 0xa6, 0xb6, 0x59, 0xba, 0xd0, 0x21, 0xe0, 0xd9, 0xa0, 0x57, 0x89, 0xf5, 0x9d, 0x3c, 0x67}, - output512: []byte{0xa7, 0xbd, 0x50, 0x6d, 0xb9, 0xc0, 0x50, 0x9a, 0xd4, 0x74, 0x13, 0xaf, 0x4b, 0xe, 0x39, 0x48, 0xb4, 0x7c, 0x18, 0x27, 0x8f, 0x15, 0xf5, 0xb1, 0x9f, 0xbb, 0xb, 0x76, 0xe2, 0xc1, 0xc1, 0xf1, 0x9d, 0xb9, 0x43, 0x85, 0x28, 0xeb, 0x6d, 0x87, 0xb0, 0xb4, 0xa5, 0x9, 0x56, 0x7d, 0xb3, 0x9f, 0x32, 0x64, 0x1e, 0x29, 0x44, 0x36, 0x57, 0x80, 0x91, 0x42, 0x96, 0xcf, 0x3e, 0x48, 0xce, 0xcf}}, - testcase{ - msg: []byte{0xeb, 0x65, 0x13, 0xfc, 0x61, 0xb3, 0xc, 0xfb, 0xa5, 0x8d, 0x4d, 0x7e, 0x80, 0xf9, 0x4d, 0x14, 0x58, 0x90, 0x90, 0xcf, 0x1d, 0x80, 0xb1, 0xdf, 0x2e, 0x68, 0x8, 0x8d, 0xc6, 0x10, 0x49, 0x59, 0xba, 0xd, 0x58, 0x3d, 0x58, 0x5e, 0x95, 0x78, 0xab, 0xa, 0xec, 0xc, 0xf3, 0x6c, 0x48, 0x43, 0x5e, 0xb5, 0x2e, 0xd9, 0xab, 0x4b, 0xbc, 0xe7, 0xa5, 0xab, 0xe6, 0x79, 0xc9, 0x7a, 0xe2, 0xdb, 0xe3, 0x5e, 0x8c, 0xc1, 0xd4, 0x5b, 0x6, 0xdd, 0xa3, 0xcf, 0x41, 0x86, 0x65, 0xc5, 0x7c, 0xbe, 0xe4, 0xbb, 0xb4, 0x7f, 0xa4, 0xca, 0xf7, 0x8f, 0x4e, 0xe6, 0x56, 0xfe, 0xc2, 0x37, 0xfe, 0x4e, 0xeb, 0xba, 0xfa, 0x20, 0x6e, 0x1e, 0xf2, 0xbd, 0xe, 0xe4, 0xae, 0x71, 0xbd, 0xe, 0x9b, 0x2f, 0x54, 0xf9, 0x1d, 0xaa, 0xdf, 0x1f, 0xeb, 0xfd, 0x70, 0x32, 0x38, 0x1d, 0x63, 0x6b, 0x73, 0x3d, 0xcb, 0x3b, 0xf7, 0x6f, 0xb1, 0x4e, 0x23, 0xaf, 0xf1, 0xf6, 0x8e, 0xd3, 0xdb, 0xcf, 0x75, 0xc9, 0xb9, 0x9c, 0x6f, 0x26}, - output224: []byte{0x9c, 0x37, 0x59, 0x90, 0x5e, 0x47, 0xe4, 0x9c, 0xc7, 0x5, 0x7c, 0x92, 0x37, 0x54, 0x5d, 0x44, 0x4f, 0x75, 0x85, 0x35, 0xf9, 0x91, 0xf7, 0xe8, 0x72, 0x8f, 0x3a, 0x51}, - output256: []byte{0x70, 0x99, 0x9a, 0xb9, 0x81, 0x83, 0x9, 0xaf, 0xa8, 0xf1, 0xad, 0xc4, 0xfe, 0xa4, 0x7a, 0x7, 0x1a, 0x8a, 0xbd, 0x94, 0x1, 0x2f, 0x7c, 0xe2, 0x8c, 0xc7, 0x94, 0xa0, 0xd9, 0x97, 0xc5, 0xcb}, - output384: []byte{0x15, 0x74, 0x81, 0xd0, 0xa2, 0x4b, 0xa9, 0xfa, 0xfa, 0x18, 0x0, 0xc9, 0x71, 0x3e, 0x70, 0x29, 0x76, 0x16, 0x7f, 0xdd, 0xf5, 0x23, 0x67, 0xa7, 0x93, 0x2a, 0xa3, 0xcf, 0xf2, 0x2f, 0x4a, 0x2e, 0x19, 0xa0, 0x16, 0xc7, 0xba, 0xcb, 0xd9, 0x7c, 0xec, 0x3e, 0xa6, 0xb1, 0xe8, 0x7c, 0xb3, 0xd3}, - output512: []byte{0x2e, 0x68, 0x1f, 0x9d, 0xdb, 0xd7, 0xc7, 0x7e, 0xab, 0xd, 0x22, 0x5e, 0x2a, 0xd1, 0xf7, 0x22, 0x56, 0xbe, 0x23, 0x9d, 0xf2, 0x59, 0x33, 0xbc, 0xd6, 0xce, 0xdd, 0x75, 0x72, 0x69, 0xb3, 0x5e, 0x2a, 0x53, 0x52, 0xb3, 0x29, 0x8a, 0x4c, 0xda, 0x5, 0x42, 0xff, 0x7d, 0x3a, 0xdd, 0x2b, 0xc, 0xf4, 0x2f, 0x10, 0xfb, 0xe0, 0x5a, 0x67, 0xc8, 0x76, 0x3d, 0x54, 0xa7, 0x8a, 0x43, 0xae, 0xa7}}, - testcase{ - msg: []byte{0x15, 0x94, 0xd7, 0x4b, 0xf5, 0xdd, 0xe4, 0x44, 0x26, 0x5d, 0x4c, 0x4, 0xda, 0xd9, 0x72, 0x1f, 0xf3, 0xe3, 0x4c, 0xbf, 0x62, 0x2d, 0xaf, 0x34, 0x1f, 0xe1, 0x6b, 0x96, 0x43, 0x1f, 0x6c, 0x4d, 0xf1, 0xf7, 0x60, 0xd3, 0x4f, 0x29, 0x6e, 0xb9, 0x7d, 0x98, 0xd5, 0x60, 0xad, 0x52, 0x86, 0xfe, 0xc4, 0xdc, 0xe1, 0x72, 0x4f, 0x20, 0xb5, 0x4f, 0xd7, 0xdf, 0x51, 0xd4, 0xbf, 0x13, 0x7a, 0xdd, 0x65, 0x6c, 0x80, 0x54, 0x6f, 0xb1, 0xbf, 0x51, 0x6d, 0x62, 0xee, 0x82, 0xba, 0xa9, 0x92, 0x91, 0xe, 0xf4, 0xcc, 0x18, 0xb7, 0xf, 0x3f, 0x86, 0x98, 0x27, 0x6f, 0xcf, 0xb4, 0x4e, 0xe, 0xc5, 0x46, 0xc2, 0xc3, 0x9c, 0xfd, 0x8e, 0xe9, 0x10, 0x34, 0xff, 0x93, 0x3, 0x5, 0x8b, 0x42, 0x52, 0x46, 0x2f, 0x86, 0xc8, 0x23, 0xeb, 0x15, 0xbf, 0x48, 0x1e, 0x6b, 0x79, 0xcc, 0x3a, 0x2, 0x21, 0x85, 0x95, 0xb3, 0x65, 0x8e, 0x8b, 0x37, 0x38, 0x2b, 0xd5, 0x4, 0x8e, 0xae, 0xd5, 0xfd, 0x2, 0xc3, 0x79, 0x44, 0xe7, 0x3b}, - output224: []byte{0x73, 0x3a, 0xcd, 0xf9, 0xce, 0xd4, 0x7f, 0x2e, 0x43, 0x93, 0x6e, 0xd6, 0xc2, 0xac, 0xf, 0x82, 0x4f, 0x4f, 0x5b, 0x5d, 0x29, 0x42, 0x52, 0x2d, 0x4d, 0xe5, 0xf6, 0xfc}, - output256: []byte{0x83, 0x12, 0x0, 0x33, 0xb0, 0x14, 0xf, 0xe3, 0xe3, 0xe1, 0xcb, 0xfe, 0xbf, 0xf3, 0x23, 0xab, 0xc0, 0x85, 0x35, 0xc0, 0xaa, 0x1, 0x78, 0x3, 0xf5, 0xd2, 0xf4, 0xec, 0xb3, 0x5f, 0x5d, 0xfb}, - output384: []byte{0xbc, 0xdd, 0x36, 0xee, 0x35, 0xc2, 0xc7, 0x71, 0x85, 0x2e, 0x27, 0xdb, 0x2c, 0xdd, 0xab, 0xc1, 0x55, 0xab, 0x43, 0xd2, 0x8e, 0x62, 0x89, 0xf0, 0xab, 0xa4, 0xf9, 0x3e, 0x79, 0x3c, 0x99, 0x9f, 0x30, 0x83, 0x6c, 0x74, 0x83, 0xfb, 0xea, 0x5a, 0x73, 0xf4, 0xee, 0xb5, 0xd8, 0xd3, 0x2f, 0xe3}, - output512: []byte{0xfd, 0x9b, 0xe2, 0x47, 0x63, 0xf6, 0x82, 0x4, 0x32, 0x43, 0x52, 0x5e, 0x5e, 0x7, 0x80, 0x53, 0x4a, 0x82, 0xad, 0x5e, 0x83, 0xb6, 0x5e, 0xb4, 0xac, 0xaf, 0x53, 0x53, 0x31, 0x3a, 0x4c, 0xc7, 0xc5, 0xee, 0xa9, 0xda, 0x14, 0x1d, 0xe5, 0x70, 0x23, 0x2c, 0xb4, 0x12, 0x62, 0x87, 0xe5, 0xc7, 0x76, 0x57, 0xca, 0x8d, 0x6a, 0x16, 0xb5, 0xbe, 0x53, 0xf4, 0x70, 0x34, 0x3e, 0x72, 0x2f, 0xd6}}, - testcase{ - msg: []byte{0x4c, 0xfa, 0x12, 0x78, 0x90, 0x30, 0x26, 0xf6, 0x6f, 0xed, 0xd4, 0x13, 0x74, 0x55, 0x8b, 0xe1, 0xb5, 0x85, 0xd0, 0x3c, 0x5c, 0x55, 0xda, 0xc9, 0x43, 0x61, 0xdf, 0x28, 0x6d, 0x4b, 0xd3, 0x9c, 0x7c, 0xb8, 0x3, 0x7e, 0xd3, 0xb2, 0x67, 0xb0, 0x7c, 0x34, 0x66, 0x26, 0x44, 0x9d, 0xc, 0xc5, 0xb0, 0xdd, 0x2c, 0xf2, 0x21, 0xf7, 0xe4, 0xc3, 0x44, 0x9a, 0x4b, 0xe9, 0x99, 0x85, 0xd2, 0xd5, 0xe6, 0x7b, 0xff, 0x29, 0x23, 0x35, 0x7d, 0xde, 0xab, 0x5a, 0xbc, 0xb4, 0x61, 0x9f, 0x3a, 0x3a, 0x57, 0xb2, 0xcf, 0x92, 0x8a, 0x2, 0x2e, 0xb2, 0x76, 0x76, 0xc6, 0xcf, 0x80, 0x56, 0x89, 0x0, 0x4f, 0xca, 0x4d, 0x41, 0xea, 0x6c, 0x2d, 0xa, 0x47, 0x89, 0xc7, 0x60, 0x5f, 0x7b, 0xb8, 0x38, 0xdd, 0x88, 0x3b, 0x3a, 0xd3, 0xe6, 0x2, 0x7e, 0x77, 0x5b, 0xcf, 0x26, 0x28, 0x81, 0x42, 0x80, 0x99, 0xc7, 0xff, 0xf9, 0x5b, 0x14, 0xc0, 0x95, 0xea, 0x13, 0xe, 0xb, 0x99, 0x38, 0xa5, 0xe2, 0x2f, 0xc5, 0x26, 0x50, 0xf5, 0x91}, - output224: []byte{0x53, 0x4, 0x38, 0xb7, 0xa8, 0x6b, 0x16, 0x43, 0x4c, 0x82, 0x71, 0x3e, 0xf7, 0x39, 0x2d, 0x25, 0xc5, 0xcf, 0x81, 0x4c, 0x7c, 0x64, 0x8, 0x36, 0x8c, 0x4f, 0x2e, 0xaf}, - output256: []byte{0x55, 0x84, 0xbf, 0x3e, 0x93, 0xbc, 0x25, 0x94, 0x5c, 0x50, 0x8b, 0x91, 0x88, 0xd0, 0x50, 0x2c, 0x6e, 0x75, 0x5b, 0xbe, 0xba, 0xbf, 0xc8, 0xcb, 0x90, 0x7f, 0xa7, 0xa2, 0x52, 0xef, 0x46, 0x4a}, - output384: []byte{0xfa, 0x7f, 0x66, 0xd3, 0x7c, 0x1d, 0xc3, 0xe8, 0x1b, 0xf5, 0x5c, 0x44, 0x3a, 0xba, 0xd5, 0xcf, 0x79, 0xa3, 0xd9, 0x83, 0x4f, 0x77, 0xa2, 0x6, 0x29, 0x11, 0x38, 0xae, 0x31, 0x43, 0x8b, 0x98, 0x67, 0x37, 0xdc, 0x45, 0x99, 0xec, 0x5d, 0x10, 0xf7, 0xf0, 0x5, 0xd1, 0x83, 0x3b, 0x7d, 0x2e}, - output512: []byte{0x14, 0xea, 0x33, 0xbb, 0x33, 0xfd, 0xf0, 0x42, 0x6e, 0xd, 0xfb, 0x12, 0xde, 0x1c, 0x61, 0x3b, 0xa9, 0x71, 0x41, 0x45, 0x4c, 0x89, 0x71, 0xbc, 0xce, 0x25, 0xc6, 0xd8, 0x7a, 0x6c, 0x24, 0x3, 0xcc, 0xfa, 0xd1, 0xe8, 0xa6, 0xc1, 0x57, 0x54, 0xc3, 0xcc, 0x5a, 0xc1, 0x71, 0x8b, 0x7f, 0x7f, 0x1e, 0xc0, 0x3, 0xc1, 0xb9, 0x8d, 0x70, 0x96, 0x8c, 0x5d, 0xbb, 0x95, 0x54, 0xb, 0x4a, 0x17}}, - testcase{ - msg: []byte{0xd3, 0xe6, 0x5c, 0xb9, 0x2c, 0xfa, 0x79, 0x66, 0x2f, 0x6a, 0xf4, 0x93, 0xd6, 0x96, 0xa0, 0x7c, 0xcf, 0x32, 0xaa, 0xad, 0xcc, 0xef, 0xf0, 0x6e, 0x73, 0xe8, 0xd9, 0xf6, 0xf9, 0x9, 0x20, 0x9e, 0x66, 0x71, 0x5d, 0x6e, 0x97, 0x87, 0x88, 0xc4, 0x9e, 0xfb, 0x90, 0x87, 0xb1, 0x70, 0xec, 0xf3, 0xaa, 0x86, 0xd2, 0xd4, 0xd1, 0xa0, 0x65, 0xae, 0xe, 0xfc, 0x89, 0x24, 0xf3, 0x65, 0xd6, 0x76, 0xb3, 0xcb, 0x9e, 0x2b, 0xec, 0x91, 0x8f, 0xd9, 0x6d, 0xb, 0x43, 0xde, 0xe8, 0x37, 0x27, 0xc9, 0xa9, 0x3b, 0xf5, 0x6c, 0xa2, 0xb2, 0xe5, 0x9a, 0xdb, 0xa8, 0x56, 0x96, 0x54, 0x6a, 0x81, 0x50, 0x67, 0xfc, 0x7a, 0x78, 0x3, 0x96, 0x29, 0xd4, 0x94, 0x8d, 0x15, 0x7e, 0x7b, 0xd, 0x82, 0x6d, 0x1b, 0xf8, 0xe8, 0x12, 0x37, 0xba, 0xb7, 0x32, 0x13, 0x12, 0xfd, 0xaa, 0x4d, 0x52, 0x17, 0x44, 0xf9, 0x88, 0xdb, 0x6f, 0xdf, 0x4, 0x54, 0x9d, 0xf, 0xdc, 0xa3, 0x93, 0xd6, 0x39, 0xc7, 0x29, 0xaf, 0x71, 0x6e, 0x9c, 0x8b, 0xba, 0x48}, - output224: []byte{0x84, 0x94, 0x4e, 0xb0, 0x18, 0xf8, 0xa1, 0x24, 0xe3, 0xc9, 0x69, 0xc0, 0x37, 0x46, 0x4e, 0xe3, 0x2b, 0xac, 0xf8, 0xe5, 0x89, 0x1, 0xd2, 0xe2, 0x22, 0x91, 0xdf, 0x9a}, - output256: []byte{0xc2, 0x34, 0xb2, 0x52, 0xc2, 0x1e, 0xdb, 0x84, 0x26, 0x34, 0xcc, 0x12, 0x4d, 0xa5, 0xbe, 0xe8, 0xa4, 0x74, 0x9c, 0xff, 0xba, 0x13, 0x47, 0x23, 0xf7, 0x96, 0x3b, 0x3a, 0x97, 0x29, 0xc0, 0xb4}, - output384: []byte{0x8f, 0xe, 0x47, 0xed, 0x68, 0x6, 0x61, 0xf1, 0xac, 0xe9, 0xee, 0xee, 0x85, 0x5d, 0x93, 0x5f, 0xdf, 0xc6, 0x6b, 0x97, 0xc2, 0xe9, 0xa6, 0xfc, 0x73, 0x41, 0xf1, 0x4d, 0x93, 0x27, 0xc8, 0xe7, 0x2b, 0xca, 0x3f, 0xa6, 0x7e, 0x59, 0x80, 0x4c, 0xea, 0x41, 0xf0, 0x9e, 0x1c, 0x4f, 0x87, 0x15}, - output512: []byte{0x3b, 0x4b, 0x39, 0x55, 0x14, 0xe0, 0xca, 0xb0, 0x4f, 0xc9, 0xf9, 0xd6, 0xc3, 0x58, 0x0, 0x6c, 0xe0, 0x6c, 0x93, 0x83, 0x1e, 0x89, 0x48, 0xfb, 0x9b, 0xd2, 0xa8, 0x63, 0xf3, 0xfa, 0x6, 0x4e, 0x78, 0xeb, 0x57, 0xc7, 0x6d, 0xd2, 0xd0, 0x58, 0xd0, 0x9a, 0xb3, 0xd1, 0x5, 0xc2, 0x8c, 0x2d, 0xac, 0xae, 0xbd, 0x4a, 0x47, 0x3f, 0x1f, 0xa0, 0x23, 0x5, 0x3c, 0xc1, 0x53, 0x66, 0x8, 0x2f}}, - testcase{ - msg: []byte{0x84, 0x2c, 0xc5, 0x83, 0x50, 0x45, 0x39, 0x62, 0x2d, 0x7f, 0x71, 0xe7, 0xe3, 0x18, 0x63, 0xa2, 0xb8, 0x85, 0xc5, 0x6a, 0xb, 0xa6, 0x2d, 0xb4, 0xc2, 0xa3, 0xf2, 0xfd, 0x12, 0xe7, 0x96, 0x60, 0xdc, 0x72, 0x5, 0xca, 0x29, 0xa0, 0xdc, 0xa, 0x87, 0xdb, 0x4d, 0xc6, 0x2e, 0xe4, 0x7a, 0x41, 0xdb, 0x36, 0xb9, 0xdd, 0xb3, 0x29, 0x3b, 0x9a, 0xc4, 0xba, 0xae, 0x7d, 0xf5, 0xc6, 0xe7, 0x20, 0x1e, 0x17, 0xf7, 0x17, 0xab, 0x56, 0xe1, 0x2c, 0xad, 0x47, 0x6b, 0xe4, 0x96, 0x8, 0xad, 0x2d, 0x50, 0x30, 0x9e, 0x7d, 0x48, 0xd2, 0xd8, 0xde, 0x4f, 0xa5, 0x8a, 0xc3, 0xcf, 0xea, 0xfe, 0xee, 0x48, 0xc0, 0xa9, 0xee, 0xc8, 0x84, 0x98, 0xe3, 0xef, 0xc5, 0x1f, 0x54, 0xd3, 0x0, 0xd8, 0x28, 0xdd, 0xdc, 0xcb, 0x9d, 0xb, 0x6, 0xdd, 0x2, 0x1a, 0x29, 0xcf, 0x5c, 0xb5, 0xb2, 0x50, 0x69, 0x15, 0xbe, 0xb8, 0xa1, 0x19, 0x98, 0xb8, 0xb8, 0x86, 0xe0, 0xf9, 0xb7, 0xa8, 0xe, 0x97, 0xd9, 0x1a, 0x7d, 0x1, 0x27, 0xf, 0x9a, 0x77, 0x17}, - output224: []byte{0x13, 0x11, 0xda, 0x75, 0x7c, 0x40, 0x5f, 0x2a, 0xe, 0xab, 0x11, 0xb, 0xc, 0x51, 0x5f, 0x5, 0xfc, 0xd5, 0x9f, 0x54, 0x95, 0xa9, 0x70, 0x42, 0x52, 0xda, 0x5a, 0xb8}, - output256: []byte{0x64, 0x5f, 0x25, 0x45, 0x67, 0x52, 0x9, 0x1f, 0xff, 0xca, 0xad, 0xe8, 0x6, 0xc3, 0x4c, 0x79, 0xdf, 0xfe, 0x72, 0x14, 0xc, 0x7c, 0x75, 0xd6, 0xa6, 0xec, 0xfe, 0xed, 0xf6, 0xdb, 0x40, 0x1c}, - output384: []byte{0xf1, 0x5, 0x81, 0xe, 0x72, 0x4c, 0x2c, 0x55, 0x16, 0x2c, 0xf7, 0x17, 0x21, 0xe3, 0xf5, 0x98, 0x71, 0xf0, 0x60, 0x10, 0xbc, 0x7f, 0x5, 0x2a, 0xb2, 0x82, 0xbf, 0xb6, 0xd4, 0xa3, 0xbf, 0x18, 0x4b, 0x89, 0x2b, 0xaf, 0x8f, 0xad, 0xd0, 0x20, 0x70, 0xf6, 0x4b, 0x9e, 0x3, 0x6d, 0xc5, 0xf7}, - output512: []byte{0x2d, 0x7d, 0x28, 0xc4, 0x31, 0x1e, 0x4, 0x24, 0xd7, 0x1e, 0x7f, 0x9d, 0x26, 0x7a, 0x2e, 0x4, 0x8a, 0xa1, 0x75, 0x45, 0x5f, 0xcb, 0x72, 0x4c, 0xf0, 0xb1, 0x3d, 0xeb, 0xf4, 0x48, 0xb5, 0x9b, 0xf, 0x28, 0x26, 0x5b, 0xf, 0x1, 0xf, 0x4e, 0x4f, 0x40, 0x65, 0x0, 0x49, 0x4, 0xa7, 0xc2, 0x68, 0x7a, 0x5a, 0x1b, 0x30, 0xab, 0x59, 0x3b, 0xc4, 0x4f, 0x69, 0x8d, 0xff, 0x5d, 0xde, 0x33}}, - testcase{ - msg: []byte{0x6c, 0x4b, 0xa, 0x7, 0x19, 0x57, 0x3e, 0x57, 0x24, 0x86, 0x61, 0xe9, 0x8f, 0xeb, 0xe3, 0x26, 0x57, 0x1f, 0x9a, 0x1c, 0xa8, 0x13, 0xd3, 0x63, 0x85, 0x31, 0xae, 0x28, 0xb4, 0x86, 0xf, 0x23, 0xc3, 0xa3, 0xa8, 0xac, 0x1c, 0x25, 0x0, 0x34, 0xa6, 0x60, 0xe2, 0xd7, 0x1e, 0x16, 0xd3, 0xac, 0xc4, 0xbf, 0x9c, 0xe2, 0x15, 0xc6, 0xf1, 0x5b, 0x1c, 0xf, 0xc7, 0xe7, 0x7d, 0x3d, 0x27, 0x15, 0x7e, 0x66, 0xda, 0x9c, 0xee, 0xc9, 0x25, 0x8f, 0x8f, 0x2b, 0xf9, 0xe0, 0x2b, 0x4a, 0xc9, 0x37, 0x93, 0xdd, 0x6e, 0x29, 0xe3, 0x7, 0xed, 0xe3, 0x69, 0x5a, 0xd, 0xf6, 0x3c, 0xbd, 0xc0, 0xfc, 0x66, 0xfb, 0x77, 0x8, 0x13, 0xeb, 0x14, 0x9c, 0xa2, 0xa9, 0x16, 0x91, 0x1b, 0xee, 0x49, 0x2, 0xc4, 0x7c, 0x78, 0x2, 0xe6, 0x9e, 0x40, 0x5f, 0xe3, 0xc0, 0x4c, 0xeb, 0x55, 0x22, 0x79, 0x2a, 0x55, 0x3, 0xfa, 0x82, 0x9f, 0x70, 0x72, 0x72, 0x22, 0x66, 0x21, 0xf7, 0xc4, 0x88, 0xa7, 0x69, 0x8c, 0xd, 0x69, 0xaa, 0x56, 0x1b, 0xe9, 0xf3, 0x78}, - output224: []byte{0xb5, 0xfd, 0xae, 0xad, 0x7e, 0x68, 0x33, 0x3c, 0xed, 0xb5, 0xd4, 0xad, 0x63, 0x6a, 0xe7, 0x5, 0x9e, 0xb3, 0x13, 0x5, 0xe2, 0xc8, 0x31, 0x78, 0x7f, 0xd5, 0x12, 0x65}, - output256: []byte{0x2d, 0x7c, 0xac, 0x69, 0x7e, 0x74, 0x10, 0xc1, 0xf7, 0x73, 0x5d, 0xd6, 0x91, 0x62, 0x4a, 0x7d, 0x4, 0xfa, 0x51, 0x81, 0x58, 0x58, 0xe8, 0xba, 0x98, 0xb1, 0x9b, 0xd, 0xed, 0x6, 0x38, 0xb5}, - output384: []byte{0xcb, 0xb0, 0xfc, 0xe4, 0xaf, 0x36, 0xd1, 0x4b, 0x63, 0xbc, 0x72, 0xd3, 0x7f, 0xb4, 0x2, 0x83, 0x27, 0x84, 0x3f, 0xb2, 0x2e, 0xc0, 0x33, 0xbf, 0xc0, 0x68, 0xe7, 0xb0, 0x81, 0x28, 0x7e, 0x31, 0xe3, 0x45, 0x1d, 0x8a, 0x1d, 0x97, 0x69, 0x2b, 0x37, 0x9f, 0xf9, 0xe6, 0xac, 0xd4, 0x2, 0x40}, - output512: []byte{0xcb, 0x66, 0x5e, 0xc6, 0x9a, 0xbd, 0x75, 0x74, 0x3c, 0x87, 0x13, 0x3, 0x4e, 0x9e, 0x41, 0x73, 0x6f, 0x8c, 0x1c, 0xe2, 0xc7, 0x7a, 0x85, 0x18, 0xe5, 0x3, 0x88, 0xc4, 0x11, 0xe6, 0x28, 0x4d, 0x9a, 0xad, 0xcd, 0x4d, 0x3b, 0xd5, 0xa9, 0xeb, 0x74, 0x67, 0x23, 0x25, 0xe4, 0x1e, 0x8a, 0x67, 0xac, 0xf3, 0x80, 0xd1, 0xe8, 0xa6, 0x16, 0x84, 0xf0, 0xe5, 0x1, 0xf5, 0x66, 0x3a, 0x3, 0x1d}}, - testcase{ - msg: []byte{0x51, 0xb7, 0xdb, 0xb7, 0xce, 0x2f, 0xfe, 0xb4, 0x27, 0xa9, 0x1c, 0xcf, 0xe5, 0x21, 0x8f, 0xd4, 0xf, 0x9e, 0xb, 0x7e, 0x24, 0x75, 0x6d, 0x4c, 0x47, 0xcd, 0x55, 0x60, 0x60, 0x8, 0xbd, 0xc2, 0x7d, 0x16, 0x40, 0x9, 0x33, 0x90, 0x6f, 0xd9, 0xf3, 0xe, 0xff, 0xdd, 0x48, 0x80, 0x2, 0x2d, 0x8, 0x11, 0x55, 0x34, 0x2a, 0xf3, 0xfb, 0x6c, 0xd5, 0x36, 0x72, 0xab, 0x7f, 0xb5, 0xb3, 0xa3, 0xbc, 0xbe, 0x47, 0xbe, 0x1f, 0xd3, 0xa2, 0x27, 0x8c, 0xae, 0x8a, 0x5f, 0xd6, 0x1c, 0x14, 0x33, 0xf7, 0xd3, 0x50, 0x67, 0x5d, 0xd2, 0x18, 0x3, 0x74, 0x6c, 0xad, 0xca, 0x57, 0x41, 0x30, 0xf0, 0x12, 0x0, 0x2, 0x4c, 0x63, 0x40, 0xab, 0xc, 0xc2, 0xcf, 0x74, 0xf2, 0x23, 0x46, 0x69, 0xf3, 0x4e, 0x90, 0x9, 0xef, 0x2e, 0xb9, 0x48, 0x23, 0xd6, 0x2b, 0x31, 0x40, 0x7f, 0x4b, 0xa4, 0x6f, 0x1a, 0x1e, 0xec, 0x41, 0x64, 0x1e, 0x84, 0xd7, 0x77, 0x27, 0xb5, 0x9e, 0x74, 0x6b, 0x8a, 0x67, 0x1b, 0xef, 0x93, 0x6f, 0x5, 0xbe, 0x82, 0x7, 0x59, 0xfa}, - output224: []byte{0x29, 0x19, 0xfd, 0x6c, 0x37, 0x6a, 0xec, 0x9f, 0x50, 0x28, 0x93, 0xa9, 0x97, 0xb, 0x9a, 0xc6, 0x59, 0x18, 0x55, 0x22, 0x7c, 0xe, 0x13, 0x7b, 0xe0, 0x17, 0x5, 0xac}, - output256: []byte{0xf6, 0x64, 0xf6, 0x26, 0xbc, 0x6b, 0x7a, 0x8c, 0xf0, 0x3b, 0xe4, 0x29, 0x15, 0x5e, 0xe1, 0xf5, 0xcd, 0x6e, 0xcf, 0x14, 0x81, 0x6d, 0xe4, 0x9a, 0x5e, 0x22, 0x99, 0x3, 0xf8, 0x9a, 0x4d, 0xc6}, - output384: []byte{0x44, 0xe4, 0xf7, 0x7c, 0xd, 0x7b, 0xca, 0x6a, 0xd5, 0x7d, 0x33, 0x4f, 0x97, 0x4b, 0xda, 0x8d, 0xe2, 0xe0, 0x8e, 0x10, 0x4f, 0x14, 0xa8, 0x71, 0x32, 0x80, 0xce, 0x73, 0x89, 0x7a, 0x94, 0x5d, 0xc2, 0x3a, 0xd0, 0x58, 0x53, 0x3b, 0x85, 0x75, 0xd, 0x9d, 0xd9, 0xd2, 0xd7, 0xb5, 0xd1, 0xaf}, - output512: []byte{0x45, 0x15, 0xa1, 0x4, 0xfc, 0x68, 0x9, 0x4d, 0x24, 0x4b, 0x23, 0x4d, 0x9d, 0xc0, 0x6a, 0x2, 0x43, 0xb7, 0x1d, 0x41, 0x9d, 0x29, 0xa9, 0x5c, 0x46, 0xe3, 0xcb, 0xa6, 0xf5, 0x1e, 0x12, 0x1a, 0xbe, 0x4, 0x9b, 0x34, 0x53, 0x5d, 0xb3, 0xcc, 0xbf, 0x2a, 0xd6, 0x8d, 0x83, 0xfc, 0x36, 0x33, 0x1f, 0x61, 0x5b, 0x3e, 0x33, 0xde, 0xb3, 0x9a, 0x33, 0x81, 0xdf, 0xbc, 0xb7, 0x98, 0xfe, 0x4d}}, - testcase{ - msg: []byte{0x83, 0x59, 0x9d, 0x93, 0xf5, 0x56, 0x1e, 0x82, 0x1b, 0xd0, 0x1a, 0x47, 0x23, 0x86, 0xbc, 0x2f, 0xf4, 0xef, 0xbd, 0x4a, 0xed, 0x60, 0xd5, 0x82, 0x1e, 0x84, 0xaa, 0xe7, 0x4d, 0x80, 0x71, 0x2, 0x98, 0x10, 0xf5, 0xe2, 0x86, 0xf8, 0xf1, 0x76, 0x51, 0xcd, 0x27, 0xda, 0x7, 0xb1, 0xeb, 0x43, 0x82, 0xf7, 0x54, 0xcd, 0x1c, 0x95, 0x26, 0x87, 0x83, 0xad, 0x9, 0x22, 0xf, 0x55, 0x2, 0x84, 0x3, 0x70, 0xd4, 0x94, 0xbe, 0xb1, 0x71, 0x24, 0x22, 0xf, 0x6a, 0xfc, 0xe9, 0x1e, 0xc8, 0xa0, 0xf5, 0x52, 0x31, 0xf9, 0x65, 0x24, 0x33, 0xe5, 0xce, 0x34, 0x89, 0xb7, 0x27, 0x71, 0x6c, 0xf4, 0xae, 0xba, 0x7d, 0xcd, 0xa2, 0xc, 0xd2, 0x9a, 0xa9, 0xa8, 0x59, 0x20, 0x12, 0x53, 0xf9, 0x48, 0xdd, 0x94, 0x39, 0x5a, 0xba, 0x9e, 0x38, 0x52, 0xbd, 0x1d, 0x60, 0xdd, 0xa7, 0xae, 0x5d, 0xc0, 0x45, 0xb2, 0x83, 0xda, 0x0, 0x6e, 0x1c, 0xba, 0xd8, 0x3c, 0xc1, 0x32, 0x92, 0xa3, 0x15, 0xdb, 0x55, 0x53, 0x30, 0x5c, 0x62, 0x8d, 0xd0, 0x91, 0x14, 0x65, 0x97}, - output224: []byte{0x89, 0x10, 0xe7, 0xab, 0xc3, 0xda, 0xa5, 0x6, 0x97, 0x4e, 0xc1, 0x3e, 0x35, 0xc4, 0x31, 0x33, 0xeb, 0xfa, 0x91, 0xde, 0xec, 0x99, 0xbf, 0xad, 0x49, 0x54, 0x44, 0x7e}, - output256: []byte{0x6, 0x42, 0x5e, 0x83, 0xe4, 0xaf, 0x81, 0x7d, 0x73, 0x5e, 0x99, 0x62, 0xc0, 0xcd, 0xdc, 0xe2, 0xcd, 0x40, 0xa0, 0x87, 0xa6, 0xb0, 0xaf, 0x35, 0x99, 0x71, 0x9e, 0x41, 0x5a, 0xb9, 0xa7, 0x2a}, - output384: []byte{0x69, 0x13, 0x18, 0x4f, 0xae, 0x1e, 0xf9, 0xfa, 0x2d, 0x57, 0xb1, 0xb7, 0xbd, 0x58, 0x6d, 0x51, 0xde, 0x9a, 0x5f, 0x38, 0x70, 0x37, 0x26, 0x6e, 0x7b, 0x4a, 0x83, 0xf4, 0x36, 0x64, 0x98, 0xff, 0x86, 0xc8, 0x99, 0x34, 0xc0, 0x53, 0x32, 0xa7, 0xe6, 0x41, 0x14, 0x9e, 0xf6, 0x27, 0xfa, 0x34}, - output512: []byte{0xce, 0xe3, 0xe6, 0xa, 0x49, 0xf7, 0xca, 0xed, 0x93, 0x87, 0xf3, 0xea, 0x69, 0x95, 0x24, 0xc4, 0xcc, 0xaf, 0xd3, 0x7c, 0x1a, 0x7e, 0x60, 0xd2, 0xf0, 0xab, 0x3, 0x77, 0x20, 0x64, 0x9f, 0x10, 0x8c, 0xce, 0x87, 0x69, 0xf7, 0xb, 0xc, 0x5d, 0x4, 0x93, 0x59, 0xee, 0xb8, 0x21, 0x2, 0x2f, 0x17, 0xc4, 0xb5, 0xf6, 0x46, 0xb7, 0x50, 0xe3, 0x7, 0x5, 0x58, 0xec, 0x12, 0x70, 0x57, 0xf1}}, - testcase{ - msg: []byte{0x2b, 0xe9, 0xbf, 0x52, 0x6c, 0x9d, 0x5a, 0x75, 0xd5, 0x65, 0xdd, 0x11, 0xef, 0x63, 0xb9, 0x79, 0xd0, 0x68, 0x65, 0x9c, 0x7f, 0x2, 0x6c, 0x8, 0xbe, 0xa4, 0xaf, 0x16, 0x1d, 0x85, 0xa4, 0x62, 0xd8, 0xe, 0x45, 0x4, 0xe, 0x91, 0xf4, 0x16, 0x5c, 0x7, 0x4c, 0x43, 0xac, 0x66, 0x13, 0x80, 0x31, 0x1a, 0x8c, 0xbe, 0xd5, 0x9c, 0xc8, 0xe4, 0xc4, 0x51, 0x8e, 0x80, 0xcd, 0x2c, 0x78, 0xab, 0x1c, 0xab, 0xf6, 0x6b, 0xff, 0x83, 0xea, 0xb3, 0xa8, 0x1, 0x48, 0x55, 0x3, 0x7, 0x31, 0x9, 0x50, 0xd0, 0x34, 0xa6, 0x28, 0x6c, 0x93, 0xa1, 0xec, 0xe8, 0x92, 0x9e, 0x63, 0x85, 0xc5, 0xe3, 0xbb, 0x6e, 0xa8, 0xa7, 0xc0, 0xfb, 0x6d, 0x63, 0x32, 0xe3, 0x20, 0xe7, 0x1c, 0xc4, 0xeb, 0x46, 0x2a, 0x2a, 0x62, 0xe2, 0xbf, 0xe0, 0x8f, 0xc, 0xca, 0xd9, 0x3e, 0x61, 0xbe, 0xdb, 0x5d, 0xd0, 0xb7, 0x86, 0xa7, 0x28, 0xab, 0x66, 0x6f, 0x7, 0xe0, 0x57, 0x6d, 0x18, 0x9c, 0x92, 0xbf, 0x9f, 0xb2, 0xd, 0xca, 0x49, 0xac, 0x2d, 0x39, 0x56, 0xd4, 0x73, 0x85, 0xe2}, - output224: []byte{0xf8, 0xb4, 0xa4, 0xa6, 0xfb, 0xb8, 0xc8, 0x43, 0x27, 0x12, 0xb5, 0xb8, 0x15, 0xb3, 0x66, 0x85, 0xc8, 0x66, 0x56, 0xc3, 0xf6, 0x7d, 0x5, 0xbd, 0xbb, 0x44, 0xb4, 0x9a}, - output256: []byte{0xe8, 0xc3, 0x29, 0x14, 0x9b, 0x7, 0x5c, 0x45, 0x9e, 0x11, 0xc8, 0xac, 0x1e, 0x7e, 0x6a, 0xcf, 0xa5, 0x1c, 0xa9, 0x81, 0xc8, 0x9e, 0xc0, 0x76, 0x8e, 0xd7, 0x9d, 0x19, 0xf4, 0xe4, 0x84, 0xfb}, - output384: []byte{0xf0, 0x4f, 0xf5, 0xaa, 0xa6, 0x8f, 0x25, 0x58, 0x58, 0x6d, 0x27, 0x48, 0x58, 0x7d, 0xee, 0x3c, 0xf2, 0x8b, 0xac, 0xab, 0x5b, 0xe5, 0xf8, 0x87, 0xd2, 0x4a, 0x6, 0x83, 0x11, 0xba, 0x2d, 0x9e, 0x9b, 0xc0, 0x20, 0x6c, 0x27, 0x6, 0xb9, 0xc1, 0x9, 0xe7, 0x16, 0x2e, 0x3e, 0xcb, 0x63, 0x46}, - output512: []byte{0xe6, 0xed, 0x6f, 0x6, 0x9, 0x6, 0xd1, 0xa7, 0x72, 0xf4, 0x7e, 0x83, 0x90, 0x75, 0x7, 0xf8, 0x8a, 0x15, 0x1d, 0xe4, 0x1, 0xed, 0x79, 0xac, 0xb5, 0x6b, 0xe5, 0x7c, 0x25, 0x96, 0x79, 0x2d, 0xc0, 0xbc, 0x5a, 0x9d, 0xc1, 0x4, 0x5e, 0x37, 0xc6, 0xa3, 0x1d, 0xa1, 0xc3, 0x62, 0x0, 0x21, 0x4e, 0x4f, 0x56, 0x98, 0xaa, 0x27, 0x54, 0xee, 0xb2, 0xca, 0xec, 0xfc, 0x3, 0xbe, 0xc3, 0x9d}}, - testcase{ - msg: []byte{0xca, 0x76, 0xd3, 0xa1, 0x25, 0x95, 0xa8, 0x17, 0x68, 0x26, 0x17, 0x0, 0x68, 0x48, 0x67, 0x55, 0x47, 0xd3, 0xe8, 0xf5, 0xc, 0x22, 0x10, 0xf9, 0xaf, 0x90, 0x6c, 0xe, 0x7c, 0xe5, 0xb, 0x44, 0x60, 0x18, 0x6f, 0xe7, 0x4, 0x57, 0xa9, 0xe8, 0x79, 0xe7, 0x9f, 0xd4, 0xd1, 0xa6, 0x88, 0xc7, 0xa, 0x34, 0x73, 0x61, 0xc8, 0x47, 0xba, 0xd, 0xd6, 0xaa, 0x52, 0x93, 0x6e, 0xaf, 0x8e, 0x58, 0xa1, 0xbe, 0x2f, 0x5c, 0x1c, 0x70, 0x4e, 0x20, 0x14, 0x6d, 0x36, 0x6a, 0xeb, 0x38, 0x53, 0xbe, 0xd9, 0xde, 0x9b, 0xef, 0xe9, 0x56, 0x9a, 0xc8, 0xaa, 0xea, 0x37, 0xa9, 0xfb, 0x71, 0x39, 0xa1, 0xa1, 0xa7, 0xd5, 0xc7, 0x48, 0x60, 0x5a, 0x8d, 0xef, 0xb2, 0x97, 0x86, 0x9e, 0xbe, 0xdd, 0x71, 0xd6, 0x15, 0xa5, 0xda, 0x23, 0x49, 0x6d, 0x11, 0xe1, 0x1a, 0xbb, 0xb1, 0x26, 0xb2, 0x6, 0xfa, 0xa, 0x77, 0x97, 0xee, 0x7d, 0xe1, 0x17, 0x98, 0x60, 0x12, 0xd0, 0x36, 0x2d, 0xce, 0xf7, 0x75, 0xc2, 0xfe, 0x14, 0x5a, 0xda, 0x6b, 0xda, 0x1c, 0xcb, 0x32, 0x6b, 0xf6, 0x44}, - output224: []byte{0x92, 0x6f, 0xe0, 0x4, 0x4b, 0x12, 0x42, 0x2d, 0x3e, 0x4b, 0xfa, 0x52, 0xc5, 0x92, 0x52, 0xac, 0xc9, 0x1d, 0xbf, 0x9, 0xc4, 0x88, 0xae, 0x9d, 0x31, 0xc7, 0xeb, 0x63}, - output256: []byte{0xc8, 0x67, 0x68, 0xf6, 0xc3, 0x49, 0xeb, 0x32, 0x3b, 0xd8, 0x2d, 0xb1, 0x96, 0x76, 0xe1, 0xb, 0xd8, 0xae, 0x9f, 0x70, 0x57, 0x76, 0x35, 0x56, 0xbb, 0xb6, 0xd0, 0xb6, 0x71, 0xe6, 0xf, 0x2a}, - output384: []byte{0xd4, 0xb8, 0xcf, 0xb2, 0xfe, 0x5b, 0x63, 0xbb, 0x5b, 0xb6, 0x78, 0xb9, 0x8b, 0x46, 0x5a, 0x2d, 0xfd, 0x23, 0xdf, 0xf4, 0x98, 0xe7, 0x78, 0xee, 0x5, 0x35, 0xa5, 0xc0, 0x77, 0x70, 0x5a, 0xa2, 0xca, 0x2f, 0x3, 0x98, 0x32, 0xba, 0xea, 0xf, 0x73, 0x56, 0x9, 0xb3, 0xe4, 0xe1, 0x8c, 0xf7}, - output512: []byte{0x9e, 0xd4, 0xee, 0xe8, 0x7f, 0x56, 0xae, 0x27, 0x41, 0xe8, 0xe4, 0xd6, 0x56, 0x23, 0xe4, 0xd1, 0xfa, 0x3a, 0xa1, 0x11, 0xf6, 0x4a, 0x85, 0xf6, 0x6e, 0x99, 0x9, 0x3b, 0xae, 0xd9, 0x90, 0xfe, 0x1d, 0x78, 0x8d, 0x6a, 0x4b, 0xe1, 0xa7, 0x2a, 0x66, 0x15, 0x28, 0x1e, 0xb4, 0x5e, 0x1b, 0x6f, 0xb6, 0xa, 0xfe, 0xfd, 0xd9, 0x39, 0x87, 0xf7, 0x94, 0x8, 0x4b, 0xda, 0x96, 0x2f, 0xac, 0x7f}}, - testcase{ - msg: []byte{0xf7, 0x6b, 0x85, 0xdc, 0x67, 0x42, 0x10, 0x25, 0xd6, 0x4e, 0x93, 0x9, 0x6d, 0x1d, 0x71, 0x2b, 0x7b, 0xaf, 0x7f, 0xb0, 0x1, 0x71, 0x6f, 0x2, 0xd3, 0x3b, 0x21, 0x60, 0xc2, 0xc8, 0x82, 0xc3, 0x10, 0xef, 0x13, 0xa5, 0x76, 0xb1, 0xc2, 0xd3, 0xe, 0xf8, 0xf7, 0x8e, 0xf8, 0xd2, 0xf4, 0x65, 0x0, 0x71, 0x9, 0xaa, 0xd9, 0x3f, 0x74, 0xcb, 0x9e, 0x7d, 0x7b, 0xef, 0x7c, 0x95, 0x90, 0xe8, 0xaf, 0x3b, 0x26, 0x7c, 0x89, 0xc1, 0x5d, 0xb2, 0x38, 0x13, 0x8c, 0x45, 0x83, 0x3c, 0x98, 0xcc, 0x4a, 0x47, 0x1a, 0x78, 0x2, 0x72, 0x3e, 0xf4, 0xc7, 0x44, 0xa8, 0x53, 0xcf, 0x80, 0xa0, 0xc2, 0x56, 0x8d, 0xd4, 0xed, 0x58, 0xa2, 0xc9, 0x64, 0x48, 0x6, 0xf4, 0x21, 0x4, 0xce, 0xe5, 0x36, 0x28, 0xe5, 0xbd, 0xf7, 0xb6, 0x3b, 0xb, 0x33, 0x8e, 0x93, 0x1e, 0x31, 0xb8, 0x7c, 0x24, 0xb1, 0x46, 0xc6, 0xd0, 0x40, 0x60, 0x55, 0x67, 0xce, 0xef, 0x59, 0x60, 0xdf, 0x9e, 0x2, 0x2c, 0xb4, 0x69, 0xd4, 0xc7, 0x87, 0xf4, 0xcb, 0xa3, 0xc5, 0x44, 0xa1, 0xac, 0x91, 0xf9, 0x5f}, - output224: []byte{0xa4, 0xe4, 0xb4, 0xa5, 0x73, 0xf7, 0xb8, 0x86, 0x5d, 0x77, 0xd7, 0xe5, 0x7f, 0x7d, 0x84, 0xa, 0x55, 0x26, 0x1a, 0x96, 0xe5, 0xfe, 0xdd, 0x76, 0x3d, 0x8, 0x11, 0xf4}, - output256: []byte{0xd9, 0x7f, 0x46, 0xf3, 0xb7, 0xed, 0xbf, 0xb1, 0x6e, 0x52, 0xbf, 0xec, 0x7d, 0xba, 0x8, 0x15, 0xb9, 0x4d, 0x46, 0xe4, 0x25, 0x1e, 0x48, 0xa8, 0x53, 0xea, 0xbd, 0xf8, 0x76, 0x12, 0x77, 0x14}, - output384: []byte{0x25, 0xb7, 0x23, 0x7d, 0xa9, 0xd4, 0xd, 0xe0, 0x47, 0xd4, 0x1a, 0x30, 0xbd, 0x37, 0x15, 0x5c, 0xf, 0x10, 0x8d, 0x72, 0x96, 0xb0, 0x90, 0x79, 0x95, 0x7d, 0x4e, 0xe3, 0x12, 0x24, 0xa4, 0xba, 0x25, 0x6a, 0xf7, 0x56, 0xd1, 0x54, 0x87, 0x89, 0x10, 0xc1, 0x58, 0xe4, 0x91, 0x86, 0x72, 0x8b}, - output512: []byte{0x23, 0x13, 0x9b, 0xdd, 0x84, 0xe9, 0xf4, 0x3a, 0x6c, 0xc6, 0x15, 0xf0, 0xf0, 0x36, 0x19, 0x93, 0x28, 0xd3, 0x98, 0x7, 0xbe, 0xc9, 0xe7, 0x86, 0xd4, 0x25, 0x1b, 0x83, 0xb3, 0x8, 0x0, 0xf9, 0xdb, 0xe8, 0xed, 0xc0, 0xb9, 0x10, 0xfc, 0xd9, 0xd9, 0xf2, 0x4, 0xc2, 0xdd, 0xd4, 0xd3, 0xb9, 0x2b, 0xc2, 0x6a, 0xc, 0xfa, 0xab, 0xe7, 0x64, 0xbf, 0xb9, 0xa, 0x14, 0x44, 0x73, 0x3c, 0xd0}}, - testcase{ - msg: []byte{0x25, 0xb8, 0xc9, 0xc0, 0x32, 0xea, 0x6b, 0xcd, 0x73, 0x3f, 0xfc, 0x87, 0x18, 0xfb, 0xb2, 0xa5, 0x3, 0xa4, 0xea, 0x8f, 0x71, 0xde, 0xa1, 0x17, 0x61, 0x89, 0xf6, 0x94, 0x30, 0x4f, 0xf, 0xf6, 0x8e, 0x86, 0x2a, 0x81, 0x97, 0xb8, 0x39, 0x95, 0x75, 0x49, 0xef, 0x24, 0x3a, 0x52, 0x79, 0xfc, 0x26, 0x46, 0xbd, 0x4c, 0x0, 0x9b, 0x6d, 0x1e, 0xde, 0xbf, 0x24, 0x73, 0x81, 0x97, 0xab, 0xb4, 0xc9, 0x92, 0xf6, 0xb1, 0xdc, 0x9b, 0xa8, 0x91, 0xf5, 0x70, 0x87, 0x9a, 0xcc, 0xd5, 0xa6, 0xb1, 0x86, 0x91, 0xa9, 0x3c, 0x7d, 0xa, 0x8d, 0x38, 0xf9, 0x5b, 0x63, 0x9c, 0x1d, 0xae, 0xb4, 0x8c, 0x4c, 0x2f, 0x15, 0xcc, 0xf5, 0xb9, 0xd5, 0x8, 0xf8, 0x33, 0x3c, 0x32, 0xde, 0x78, 0x78, 0x1b, 0x41, 0x85, 0xf, 0x26, 0x1b, 0x85, 0x5c, 0x4b, 0xeb, 0xcc, 0x12, 0x5a, 0x38, 0xc, 0x54, 0xd5, 0x1, 0xc5, 0xd3, 0xbd, 0x7, 0xe6, 0xb5, 0x21, 0x2, 0x11, 0x60, 0x88, 0xe5, 0x3d, 0x76, 0x58, 0x3b, 0x1, 0x61, 0xe2, 0xa5, 0x8d, 0x7, 0x78, 0xf0, 0x91, 0x20, 0x6a, 0xab, 0xd5, 0xa1}, - output224: []byte{0xeb, 0xfd, 0x79, 0x6b, 0x29, 0xf6, 0x5, 0x99, 0x31, 0x73, 0x2f, 0x98, 0x60, 0x21, 0x85, 0xb6, 0x37, 0x7c, 0x4e, 0x6e, 0x40, 0xbd, 0x26, 0xc8, 0x10, 0xd6, 0xda, 0x96}, - output256: []byte{0x51, 0xd0, 0x8e, 0x0, 0xaa, 0xa2, 0x52, 0x81, 0x2d, 0x87, 0x33, 0x57, 0x10, 0x76, 0x16, 0x5, 0x5b, 0x1b, 0x8c, 0x5f, 0xb2, 0xac, 0x79, 0x17, 0xd0, 0xf9, 0x1, 0xdf, 0xb0, 0x1f, 0xac, 0x47}, - output384: []byte{0xf4, 0x1b, 0x2d, 0x2, 0xd3, 0x21, 0xf4, 0xba, 0x10, 0x6f, 0x93, 0x1e, 0xe2, 0x7d, 0x3f, 0x74, 0xe8, 0xd3, 0x97, 0xba, 0xce, 0xcb, 0xa, 0x1f, 0xa9, 0xb, 0xf5, 0xc8, 0x37, 0xac, 0xeb, 0x2e, 0xd8, 0xf0, 0xfe, 0xff, 0x7, 0xb7, 0xeb, 0xea, 0x6a, 0x88, 0xd0, 0xcc, 0x54, 0xae, 0x8e, 0x6a}, - output512: []byte{0xec, 0x69, 0x39, 0x70, 0x0, 0xae, 0xd6, 0x3c, 0xb7, 0xe8, 0x6b, 0x4f, 0xb0, 0xbf, 0xd3, 0xdc, 0xee, 0x8a, 0x6f, 0x6a, 0x1c, 0xfe, 0x1, 0xa3, 0x24, 0xda, 0x13, 0x48, 0x4b, 0x73, 0x59, 0x9f, 0xcd, 0x37, 0xad, 0x39, 0x26, 0x62, 0xd4, 0xc4, 0x1d, 0x90, 0xba, 0xca, 0x66, 0xbe, 0x4d, 0x6e, 0x34, 0x24, 0xef, 0xd3, 0x5d, 0x7f, 0xf4, 0xcb, 0x7, 0xcb, 0xdf, 0xbe, 0xbd, 0xdb, 0x7b, 0x50}}, - testcase{ - msg: []byte{0x21, 0xcf, 0xdc, 0x2a, 0x7c, 0xcb, 0x7f, 0x33, 0x1b, 0x3d, 0x2e, 0xef, 0xff, 0x37, 0xe4, 0x8a, 0xd9, 0xfa, 0x9c, 0x78, 0x8c, 0x3f, 0x3c, 0x20, 0xe, 0x1, 0x73, 0xd9, 0x99, 0x63, 0xe1, 0xcb, 0xca, 0x93, 0x62, 0x3b, 0x26, 0x4e, 0x92, 0x3, 0x94, 0xae, 0x48, 0xbb, 0x4c, 0x3a, 0x5b, 0xb9, 0x6f, 0xfb, 0xc8, 0xf0, 0xe5, 0x3f, 0x30, 0xe2, 0x29, 0x56, 0xad, 0xab, 0xc2, 0x76, 0x5f, 0x57, 0xfb, 0x76, 0x1e, 0x14, 0x7e, 0xcb, 0xf8, 0x56, 0x75, 0x33, 0xdb, 0x6e, 0x50, 0xc8, 0xa1, 0xf8, 0x94, 0x31, 0xa, 0x94, 0xed, 0xf8, 0x6, 0xdd, 0x8c, 0xa6, 0xa0, 0xe1, 0x41, 0xc0, 0xfa, 0x7c, 0x9f, 0xae, 0x6c, 0x6a, 0xe6, 0x5f, 0x18, 0xc9, 0x3a, 0x85, 0x29, 0xe6, 0xe5, 0xb5, 0x53, 0xbf, 0x55, 0xf2, 0x5b, 0xe2, 0xe8, 0xa, 0x98, 0x82, 0xbd, 0x37, 0xf1, 0x45, 0xfe, 0xcb, 0xeb, 0x3d, 0x44, 0x7a, 0x3c, 0x4e, 0x46, 0xc2, 0x15, 0x24, 0xcc, 0x55, 0xcd, 0xd6, 0x2f, 0x52, 0x1a, 0xb9, 0x2a, 0x8b, 0xa7, 0x2b, 0x89, 0x79, 0x96, 0xc4, 0x9b, 0xb2, 0x73, 0x19, 0x8b, 0x7b, 0x1c, 0x9e}, - output224: []byte{0x3f, 0xb7, 0x39, 0x2a, 0x66, 0x21, 0xb8, 0x52, 0x31, 0x2a, 0x37, 0x4c, 0x14, 0xa6, 0x79, 0xaf, 0xb0, 0xe3, 0xd2, 0xec, 0x6a, 0x2d, 0x14, 0x7b, 0xd5, 0xe8, 0x73, 0xf6}, - output256: []byte{0xc6, 0xa1, 0x88, 0xa6, 0xbd, 0xac, 0xa4, 0xdd, 0x7b, 0x1b, 0xc3, 0xe4, 0x10, 0x19, 0xaf, 0xe9, 0x34, 0x73, 0x6, 0x3f, 0x93, 0x2c, 0x16, 0x6e, 0x32, 0x42, 0xb7, 0xf5, 0x2a, 0x3c, 0x6f, 0x8e}, - output384: []byte{0x96, 0x73, 0xa1, 0xa3, 0x53, 0x5b, 0x89, 0x75, 0xca, 0xf, 0x51, 0x2c, 0xdb, 0xf, 0xdc, 0xdf, 0xb0, 0x17, 0x9c, 0xe2, 0x29, 0xe7, 0x56, 0xad, 0x70, 0xea, 0xf1, 0xe5, 0xc3, 0xe1, 0xa4, 0x13, 0x5e, 0x9f, 0xa7, 0x65, 0x3e, 0xdb, 0xdc, 0xa4, 0x97, 0x5a, 0xc1, 0x8b, 0x17, 0xa6, 0x62, 0xeb}, - output512: []byte{0x2e, 0xa3, 0xea, 0x0, 0xe6, 0xe9, 0x30, 0x5c, 0xed, 0xf, 0xc1, 0x60, 0xe0, 0x4, 0x26, 0x52, 0x21, 0x30, 0x6a, 0x2b, 0xe9, 0x61, 0x34, 0x74, 0x12, 0x68, 0x25, 0xaa, 0x3c, 0x31, 0x70, 0xae, 0x7, 0xe5, 0xea, 0x42, 0xf6, 0xb7, 0x4f, 0xb, 0x2c, 0x1b, 0xd2, 0xa6, 0xcd, 0x4d, 0x26, 0xeb, 0x1e, 0x4, 0xc6, 0x7c, 0x9a, 0x4a, 0xfe, 0xfc, 0x1d, 0xd0, 0xcb, 0x57, 0xc2, 0xa9, 0xf4, 0xc7}}, - testcase{ - msg: []byte{0x4e, 0x45, 0x2b, 0xa4, 0x21, 0x27, 0xdc, 0xc9, 0x56, 0xef, 0x4f, 0x8f, 0x35, 0xdd, 0x68, 0xcb, 0x22, 0x5f, 0xb7, 0x3b, 0x5b, 0xc7, 0xe1, 0xec, 0x5a, 0x89, 0x8b, 0xba, 0x29, 0x31, 0x56, 0x3e, 0x74, 0xfa, 0xff, 0x3b, 0x67, 0x31, 0x4f, 0x24, 0x1e, 0xc4, 0x9f, 0x4a, 0x70, 0x61, 0xe3, 0xbd, 0x2, 0x13, 0xae, 0x82, 0x6b, 0xab, 0x38, 0xf, 0x1f, 0x14, 0xfa, 0xab, 0x8b, 0xe, 0xfd, 0xdd, 0x5f, 0xd1, 0xbb, 0x49, 0x37, 0x38, 0x53, 0xa0, 0x8f, 0x30, 0x55, 0x3d, 0x5a, 0x55, 0xcc, 0xbb, 0xb8, 0x15, 0x3d, 0xe4, 0x70, 0x4f, 0x29, 0xca, 0x2b, 0xde, 0xef, 0x4, 0x19, 0x46, 0x8e, 0x5, 0xdd, 0x51, 0x55, 0x7c, 0xcc, 0x80, 0xc0, 0xa9, 0x61, 0x90, 0xbb, 0xcc, 0x4d, 0x77, 0xec, 0xff, 0x21, 0xc6, 0x6b, 0xdf, 0x48, 0x64, 0x59, 0xd4, 0x27, 0xf9, 0x86, 0x41, 0xf, 0x88, 0x3a, 0x80, 0xa5, 0xbc, 0xc3, 0x2c, 0x20, 0xf0, 0x47, 0x8b, 0xb9, 0xa9, 0x7a, 0x12, 0x6f, 0xc5, 0xf9, 0x54, 0x51, 0xe4, 0xf, 0x29, 0x2a, 0x46, 0x14, 0x93, 0xd, 0x5, 0x4c, 0x85, 0x1a, 0xcd, 0x1, 0x9c, 0xcf}, - output224: []byte{0x8b, 0x37, 0x50, 0x65, 0x5a, 0xf5, 0xec, 0xa1, 0xc, 0xc4, 0xf2, 0x91, 0x4, 0x35, 0x90, 0xe2, 0xd1, 0x97, 0x59, 0x25, 0x30, 0x47, 0xa4, 0xc1, 0xdb, 0xc8, 0x65, 0x77}, - output256: []byte{0x2b, 0x31, 0xfb, 0xc5, 0x65, 0x11, 0x1, 0x10, 0x1, 0x1a, 0xb2, 0xc8, 0xf6, 0xcc, 0x3d, 0xa8, 0xfb, 0x55, 0xd4, 0x1b, 0x1a, 0xe5, 0xe0, 0x43, 0x10, 0x28, 0x3f, 0x20, 0x7d, 0x39, 0x68, 0x2d}, - output384: []byte{0x32, 0x42, 0x9c, 0xb1, 0xb5, 0xda, 0xd6, 0x63, 0xa0, 0x66, 0x3e, 0x49, 0x3, 0x3d, 0xb2, 0x29, 0x9, 0x45, 0x1, 0x9d, 0xf7, 0xe7, 0x92, 0xcd, 0xff, 0x37, 0x23, 0xee, 0xdb, 0x88, 0xcd, 0x6, 0x3, 0xb3, 0xfa, 0xe0, 0x22, 0x8a, 0x18, 0x4f, 0x8e, 0xff, 0xac, 0x45, 0x11, 0x2f, 0x45, 0x3e}, - output512: []byte{0x6a, 0x7a, 0xdd, 0xb2, 0x8f, 0x4f, 0x2c, 0x23, 0xcf, 0xc, 0x26, 0x45, 0x79, 0xfb, 0xa5, 0xf8, 0x92, 0xe0, 0x10, 0x68, 0x9f, 0x83, 0x7b, 0x84, 0xd0, 0x6, 0xd9, 0x14, 0x2, 0xfb, 0xfe, 0x9b, 0xa4, 0x4b, 0x91, 0x26, 0xf8, 0xb5, 0xde, 0x1e, 0xc6, 0xbb, 0xe1, 0x94, 0xa3, 0xe3, 0x85, 0x42, 0x35, 0x5, 0x6a, 0x9, 0x90, 0x1d, 0x18, 0xe8, 0xd6, 0xf1, 0x72, 0x7d, 0xd4, 0x30, 0x21, 0x2a}}, - testcase{ - msg: []byte{0xfa, 0x85, 0x67, 0x1d, 0xf7, 0xda, 0xdf, 0x99, 0xa6, 0xff, 0xee, 0x97, 0xa3, 0xab, 0x99, 0x91, 0x67, 0x1f, 0x56, 0x29, 0x19, 0x50, 0x49, 0x88, 0x4, 0x97, 0x48, 0x78, 0x67, 0xa6, 0xc4, 0x46, 0xb6, 0x0, 0x87, 0xfa, 0xc9, 0xa0, 0xf2, 0xfc, 0xc8, 0xe3, 0xb2, 0x4e, 0x97, 0xe4, 0x23, 0x45, 0xb9, 0x3b, 0x5f, 0x7d, 0x36, 0x91, 0x82, 0x9d, 0x3f, 0x8c, 0xcd, 0x4b, 0xb3, 0x64, 0x11, 0xb8, 0x5f, 0xc2, 0x32, 0x8e, 0xb0, 0xc5, 0x1c, 0xb3, 0x15, 0x1f, 0x70, 0x86, 0xa, 0xd3, 0x24, 0x6c, 0xe0, 0x62, 0x3a, 0x8d, 0xc8, 0xb3, 0xc4, 0x9f, 0x95, 0x8f, 0x86, 0x90, 0xf8, 0xe3, 0x86, 0xe, 0x71, 0xeb, 0x2b, 0x14, 0x79, 0xa5, 0xce, 0xa0, 0xb3, 0xf8, 0xbe, 0xfd, 0x87, 0xac, 0xaf, 0x53, 0x62, 0x43, 0x5e, 0xae, 0xcc, 0xb5, 0x2f, 0x38, 0x61, 0x7b, 0xc6, 0xc5, 0xc2, 0xc6, 0xe2, 0x69, 0xea, 0xd1, 0xfb, 0xd6, 0x9e, 0x94, 0x1d, 0x4a, 0xd2, 0x1, 0x2d, 0xa2, 0xc5, 0xb2, 0x1b, 0xcf, 0xbf, 0x98, 0xe4, 0xa7, 0x7a, 0xb2, 0xaf, 0x1f, 0x3f, 0xda, 0x32, 0x33, 0xf0, 0x46, 0xd3, 0x8f, 0x1d, 0xc8}, - output224: []byte{0xd3, 0xa5, 0x0, 0x44, 0x77, 0xbb, 0xb2, 0x1c, 0xf7, 0xd0, 0xfc, 0xa8, 0x4e, 0x51, 0xa7, 0xa5, 0x7e, 0x93, 0xfa, 0xe7, 0x22, 0x25, 0x70, 0xc0, 0x1b, 0x0, 0xe8, 0x9a}, - output256: []byte{0x13, 0x51, 0xf5, 0xdb, 0xa4, 0x60, 0x98, 0xb9, 0xa7, 0x73, 0x38, 0x1d, 0x85, 0xd5, 0x2f, 0xad, 0x49, 0x1b, 0x3a, 0x82, 0xaf, 0x91, 0x7, 0xf1, 0x73, 0xdb, 0x81, 0xfb, 0x35, 0xed, 0x91, 0xd2}, - output384: []byte{0xe9, 0x1d, 0xee, 0xbc, 0xd7, 0x2b, 0xa1, 0x2e, 0x22, 0x15, 0x60, 0x2b, 0x48, 0x8d, 0xed, 0x20, 0x3a, 0x1e, 0x21, 0x1d, 0x63, 0x58, 0xca, 0xdc, 0x6f, 0x90, 0x6f, 0xbd, 0x89, 0xca, 0x92, 0x8f, 0x54, 0x12, 0x22, 0xcb, 0xd8, 0xfc, 0x9a, 0x20, 0xb5, 0x73, 0xef, 0x22, 0xfc, 0x17, 0x87, 0x78}, - output512: []byte{0x2c, 0xe, 0xe8, 0xa1, 0x65, 0xbf, 0x88, 0xc4, 0x4c, 0x86, 0x1, 0xc6, 0x37, 0x2e, 0x52, 0x2d, 0xa9, 0xec, 0xf4, 0x25, 0x44, 0xdc, 0xdc, 0x9, 0x86, 0x98, 0xf5, 0xd, 0xf8, 0xe7, 0xe, 0xb7, 0x44, 0xc, 0xab, 0x29, 0x53, 0xbb, 0x49, 0xc, 0xd2, 0xa5, 0xe0, 0x88, 0x7b, 0xee, 0xae, 0x34, 0x82, 0x19, 0x2d, 0xa9, 0x5e, 0x50, 0x98, 0xd3, 0xb3, 0x18, 0xf1, 0x6f, 0xc0, 0x8d, 0x1e, 0x1e}}, - testcase{ - msg: []byte{0xe9, 0x8, 0x47, 0xae, 0x67, 0x97, 0xfb, 0xc0, 0xb6, 0xb3, 0x6d, 0x6e, 0x58, 0x8c, 0xa, 0x74, 0x3d, 0x72, 0x57, 0x88, 0xca, 0x50, 0xb6, 0xd7, 0x92, 0x35, 0x2e, 0xa8, 0x29, 0x4f, 0x5b, 0xa6, 0x54, 0xa1, 0x53, 0x66, 0xb8, 0xe1, 0xb2, 0x88, 0xd8, 0x4f, 0x51, 0x78, 0x24, 0x8, 0x27, 0x97, 0x5a, 0x76, 0x3b, 0xc4, 0x5c, 0x7b, 0x4, 0x30, 0xe8, 0xa5, 0x59, 0xdf, 0x44, 0x88, 0x50, 0x5e, 0x0, 0x9c, 0x63, 0xda, 0x99, 0x4f, 0x14, 0x3, 0xf4, 0x7, 0x95, 0x82, 0x3, 0xce, 0xbb, 0x6e, 0x37, 0xd8, 0x9c, 0x94, 0xa5, 0xea, 0xcf, 0x60, 0x39, 0xa3, 0x27, 0xf6, 0xc4, 0xdb, 0xbc, 0x7a, 0x2a, 0x30, 0x7d, 0x97, 0x6a, 0xa3, 0x9e, 0x41, 0xaf, 0x65, 0x37, 0x24, 0x3f, 0xc2, 0x18, 0xdf, 0xa6, 0xab, 0x4d, 0xd8, 0x17, 0xb6, 0xa3, 0x97, 0xdf, 0x5c, 0xa6, 0x91, 0x7, 0xa9, 0x19, 0x87, 0x99, 0xed, 0x24, 0x86, 0x41, 0xb6, 0x3b, 0x42, 0xcb, 0x4c, 0x29, 0xbf, 0xdd, 0x79, 0x75, 0xac, 0x96, 0xed, 0xfc, 0x27, 0x4a, 0xc5, 0x62, 0xd0, 0x47, 0x4c, 0x60, 0x34, 0x7a, 0x7, 0x8c, 0xe4, 0xc2, 0x5e, 0x88}, - output224: []byte{0x75, 0xb7, 0x7c, 0x36, 0xe3, 0x94, 0x71, 0x1d, 0xfd, 0x35, 0xc1, 0x1a, 0xec, 0x8c, 0x3, 0x3d, 0xcd, 0x7c, 0x18, 0x71, 0x2f, 0x3b, 0x6, 0xd1, 0xfe, 0xdc, 0x10, 0x77}, - output256: []byte{0xdf, 0xfc, 0x70, 0xf, 0x3e, 0x4d, 0x84, 0xd9, 0x13, 0x1c, 0xbb, 0x1f, 0x98, 0xfb, 0x84, 0x3d, 0xba, 0xfc, 0xb2, 0xef, 0x94, 0xa5, 0x2e, 0x89, 0xd2, 0x4, 0xd4, 0x31, 0x45, 0x1a, 0x33, 0x31}, - output384: []byte{0x45, 0x29, 0xa, 0x24, 0x29, 0x1e, 0x81, 0xcc, 0xb8, 0xd7, 0x84, 0xb, 0x6c, 0x48, 0x12, 0xac, 0x98, 0x98, 0x3d, 0x7b, 0xd3, 0xaf, 0xe4, 0x6b, 0x42, 0x72, 0x96, 0xad, 0x63, 0x68, 0x62, 0xb9, 0xe0, 0x3e, 0xcf, 0x60, 0x5b, 0x11, 0x4c, 0xb4, 0x7c, 0x2, 0x7, 0x26, 0x7b, 0xc0, 0x59, 0x58}, - output512: []byte{0xdd, 0xd4, 0xff, 0x11, 0x72, 0x31, 0xec, 0xa0, 0x44, 0x5e, 0xad, 0xa7, 0xc7, 0xf1, 0xd8, 0x46, 0x86, 0x52, 0xd, 0xaa, 0x70, 0xe1, 0x60, 0xc8, 0x7d, 0xbb, 0xb3, 0xfb, 0x32, 0xbb, 0x9e, 0x2f, 0x4c, 0xc5, 0x3d, 0xb5, 0x41, 0x3d, 0x4e, 0x88, 0xde, 0x18, 0xa0, 0x11, 0x85, 0x70, 0x31, 0x8b, 0xd6, 0xd0, 0xe5, 0x26, 0x4d, 0x77, 0x93, 0x39, 0xac, 0x6f, 0x4f, 0x4a, 0x95, 0x54, 0x6a, 0x53}}, - testcase{ - msg: []byte{0xf6, 0xd5, 0xc2, 0xb6, 0xc9, 0x39, 0x54, 0xfc, 0x62, 0x76, 0x2, 0xc0, 0xc, 0x4c, 0xa9, 0xa7, 0xd3, 0xed, 0x12, 0xb2, 0x71, 0x73, 0xf0, 0xb2, 0xc9, 0xb0, 0xe4, 0xa5, 0x93, 0x93, 0x98, 0xa6, 0x65, 0xe6, 0x7e, 0x69, 0xd0, 0xb1, 0x2f, 0xb7, 0xe4, 0xce, 0xb2, 0x53, 0xe8, 0x8, 0x3d, 0x1c, 0xeb, 0x72, 0x4a, 0xc0, 0x7f, 0x0, 0x9f, 0x9, 0x4e, 0x42, 0xf2, 0xd6, 0xf2, 0x12, 0x94, 0x89, 0xe8, 0x46, 0xea, 0xff, 0x7, 0x0, 0xa8, 0xd4, 0x45, 0x3e, 0xf4, 0x53, 0xa3, 0xed, 0xdc, 0x18, 0xf4, 0x8, 0xc7, 0x7a, 0x83, 0x27, 0x56, 0x17, 0xfa, 0xbc, 0x4e, 0xa3, 0xa2, 0x83, 0x3a, 0xa7, 0x34, 0x6, 0xc0, 0xe9, 0x66, 0x27, 0x60, 0x79, 0xd3, 0x8e, 0x8e, 0x38, 0x53, 0x9a, 0x70, 0xe1, 0x94, 0xcc, 0x55, 0x13, 0xaa, 0xa4, 0x57, 0xc6, 0x99, 0x38, 0x3f, 0xd1, 0x90, 0xb, 0x1e, 0x72, 0xbd, 0xfb, 0x83, 0x5d, 0x1f, 0xd3, 0x21, 0xb3, 0x7b, 0xa8, 0x5, 0x49, 0xb0, 0x78, 0xa4, 0x9e, 0xa0, 0x81, 0x52, 0x86, 0x9a, 0x91, 0x8c, 0xa5, 0x7f, 0x5b, 0x54, 0xed, 0x71, 0xe4, 0xfd, 0x3a, 0xc5, 0xc0, 0x67, 0x29}, - output224: []byte{0xe5, 0x2d, 0xf7, 0xfd, 0xf9, 0x57, 0x26, 0x9c, 0xa0, 0xb0, 0xf4, 0x65, 0x53, 0xd5, 0x54, 0xfe, 0x2e, 0x63, 0x67, 0x1, 0x9b, 0x37, 0x9a, 0x1e, 0x4f, 0x4c, 0x7a, 0x9f}, - output256: []byte{0x26, 0x72, 0x6b, 0x52, 0x24, 0x2e, 0xf8, 0xec, 0xf4, 0xc6, 0x6a, 0xed, 0x9c, 0x4b, 0x46, 0xbf, 0x6f, 0x5d, 0x87, 0x4, 0x4a, 0xb, 0x99, 0xd4, 0xe4, 0xaf, 0x47, 0xdc, 0x36, 0xb, 0x9b, 0xe}, - output384: []byte{0xe6, 0xbb, 0x2f, 0xaf, 0x5a, 0xbb, 0x3e, 0xda, 0xff, 0xe9, 0xe4, 0x7f, 0x62, 0x58, 0x64, 0x9, 0xb4, 0x43, 0xe4, 0xc6, 0x98, 0x7, 0xd, 0x61, 0xfc, 0x8, 0x22, 0x61, 0x5, 0x32, 0x70, 0xec, 0xdc, 0x24, 0x84, 0xaa, 0x1, 0x45, 0xc8, 0x51, 0x3, 0x1e, 0x3c, 0x99, 0xde, 0xff, 0x23, 0x89}, - output512: []byte{0xa9, 0x74, 0x4e, 0xfa, 0x42, 0x88, 0x7d, 0xf2, 0x92, 0xfc, 0x9, 0xdf, 0xeb, 0x88, 0x5f, 0x1e, 0x80, 0x18, 0x55, 0xde, 0xd0, 0x9d, 0xc2, 0xf9, 0x7c, 0xbf, 0xcb, 0xd0, 0x19, 0x75, 0x18, 0x78, 0x61, 0x9d, 0xa1, 0xbc, 0x95, 0x73, 0x20, 0x1c, 0x7c, 0xc0, 0x50, 0xe2, 0xaa, 0x1d, 0x45, 0x3e, 0x95, 0x13, 0x66, 0xd8, 0x1c, 0x18, 0x8d, 0x32, 0x9b, 0x3c, 0xb8, 0x61, 0xc1, 0xd7, 0x8f, 0x92}}, - testcase{ - msg: []byte{0xcf, 0x85, 0x62, 0xb1, 0xbe, 0xd8, 0x98, 0x92, 0xd6, 0x7d, 0xda, 0xaf, 0x3d, 0xee, 0xb2, 0x82, 0x46, 0x45, 0x6e, 0x97, 0x23, 0x26, 0xdb, 0xcd, 0xb5, 0xcf, 0x3f, 0xb2, 0x89, 0xac, 0xa0, 0x1e, 0x68, 0xda, 0x5d, 0x59, 0x89, 0x6e, 0x3a, 0x61, 0x65, 0x35, 0x8b, 0x7, 0x1b, 0x30, 0x4d, 0x6a, 0xb3, 0xd0, 0x18, 0x94, 0x4b, 0xe5, 0x4, 0x9d, 0x5e, 0xe, 0x2b, 0xb8, 0x19, 0xac, 0xf6, 0x7a, 0x60, 0x6, 0x11, 0x10, 0x89, 0xe6, 0x76, 0x71, 0x32, 0xd7, 0x2d, 0xd8, 0x5b, 0xed, 0xdc, 0xbb, 0x2d, 0x64, 0x49, 0x6d, 0xb0, 0xcc, 0x92, 0x95, 0x5a, 0xb4, 0xc6, 0x23, 0x4f, 0x1e, 0xea, 0x24, 0xf2, 0xd5, 0x14, 0x83, 0xf2, 0xe2, 0x9, 0xe4, 0x58, 0x9b, 0xf9, 0x51, 0x9f, 0xac, 0x51, 0xb4, 0xd0, 0x61, 0xe8, 0x1, 0x12, 0x5e, 0x60, 0x5f, 0x80, 0x93, 0xbb, 0x69, 0x97, 0xbc, 0x16, 0x3d, 0x55, 0x15, 0x96, 0xfe, 0x4a, 0xb7, 0xcf, 0xae, 0x8f, 0xb9, 0xa9, 0xf, 0x69, 0x80, 0x48, 0xc, 0xe0, 0xc2, 0x29, 0xfd, 0x16, 0x75, 0x40, 0x9b, 0xd7, 0x88, 0x35, 0x4d, 0xaf, 0x31, 0x62, 0x40, 0xcf, 0xe0, 0xaf, 0x93, 0xeb}, - output224: []byte{0x41, 0x85, 0x3c, 0xd5, 0x46, 0x92, 0xdb, 0xd4, 0x78, 0xbb, 0x1e, 0x2d, 0x6c, 0xed, 0xcd, 0xa1, 0xd1, 0x39, 0xc8, 0x38, 0xac, 0x95, 0x6a, 0x37, 0xc8, 0x7f, 0x9, 0x8f}, - output256: []byte{0x25, 0xe5, 0x36, 0x31, 0x5f, 0x8, 0xa4, 0x9, 0x76, 0xad, 0xec, 0xb5, 0x47, 0x56, 0xeb, 0xc0, 0xb2, 0x24, 0xc3, 0x8f, 0xaf, 0x11, 0x50, 0x93, 0x71, 0xb5, 0xa6, 0x92, 0xa5, 0x26, 0x9a, 0xb5}, - output384: []byte{0x79, 0xb7, 0x92, 0xb3, 0x4d, 0xa4, 0x42, 0x5b, 0xb0, 0xb4, 0x21, 0x7a, 0xbe, 0x23, 0xe5, 0xdb, 0xe4, 0xe8, 0x7d, 0x39, 0x40, 0xe2, 0xf7, 0xba, 0x52, 0xca, 0x14, 0x66, 0x18, 0x58, 0xa, 0x62, 0x54, 0x5c, 0x44, 0xb8, 0x1e, 0x6, 0x62, 0xa, 0xf6, 0xe2, 0x73, 0x49, 0x90, 0x73, 0xe3, 0xa8}, - output512: []byte{0x89, 0xca, 0xe4, 0x62, 0x46, 0xef, 0xed, 0xad, 0x11, 0x47, 0xeb, 0x18, 0x68, 0xc2, 0x3a, 0x6b, 0xe5, 0x4f, 0x6b, 0xac, 0x75, 0xf0, 0xc9, 0x8a, 0x9a, 0xef, 0xc6, 0xbf, 0x3c, 0xcb, 0x89, 0xae, 0x1, 0x2f, 0x2e, 0x88, 0xa9, 0xc8, 0x38, 0xb5, 0x5e, 0x57, 0xb2, 0x32, 0xcb, 0x3c, 0x80, 0xbc, 0x3c, 0x2e, 0x9f, 0xb3, 0xfc, 0x97, 0x68, 0xc6, 0x22, 0x6e, 0x93, 0x28, 0x4e, 0x20, 0x8b, 0xf2}}, - testcase{ - msg: []byte{0x2a, 0xce, 0x31, 0xab, 0xb0, 0xa2, 0xe3, 0x26, 0x79, 0x44, 0xd2, 0xf7, 0x5e, 0x15, 0x59, 0x98, 0x5d, 0xb7, 0x35, 0x4c, 0x6e, 0x60, 0x5f, 0x18, 0xdc, 0x84, 0x70, 0x42, 0x3f, 0xca, 0x30, 0xb7, 0x33, 0x1d, 0x9b, 0x33, 0xc4, 0xa4, 0x32, 0x67, 0x83, 0xd1, 0xca, 0xae, 0x1b, 0x4f, 0x7, 0x6, 0xe, 0xff, 0x97, 0x8e, 0x47, 0x46, 0xbf, 0xc, 0x7e, 0x30, 0xcd, 0x61, 0x4, 0xb, 0xd5, 0xec, 0x27, 0x46, 0xb2, 0x98, 0x63, 0xeb, 0x7f, 0x10, 0x3e, 0xbd, 0xa6, 0x14, 0xc4, 0x29, 0x1a, 0x80, 0x5b, 0x6a, 0x4c, 0x82, 0x14, 0x23, 0x5, 0x64, 0xa0, 0x55, 0x7b, 0xc7, 0x10, 0x2e, 0xb, 0xd3, 0xed, 0x23, 0x71, 0x92, 0x52, 0xf7, 0x43, 0x5d, 0x64, 0xd2, 0x10, 0xee, 0x2a, 0xaf, 0xc5, 0x85, 0xbe, 0x90, 0x3f, 0xa4, 0x1e, 0x19, 0x68, 0xc5, 0xf, 0xd5, 0xd5, 0x36, 0x79, 0x26, 0xdf, 0x7a, 0x5, 0xe3, 0xa4, 0x2c, 0xf0, 0x7e, 0x65, 0x6f, 0xf9, 0x2d, 0xe7, 0x3b, 0x3, 0x6c, 0xf8, 0xb1, 0x98, 0x98, 0xc0, 0xcb, 0x34, 0x55, 0x7c, 0xc, 0x12, 0xc2, 0xd8, 0xb8, 0x4e, 0x91, 0x18, 0x1a, 0xf4, 0x67, 0xbc, 0x75, 0xa9, 0xd1}, - output224: []byte{0x1f, 0x27, 0x27, 0xd5, 0x13, 0x2c, 0x45, 0x3b, 0xd3, 0x21, 0xa9, 0xfc, 0x7a, 0xa4, 0x6f, 0xb8, 0xb3, 0x34, 0x1d, 0x90, 0x98, 0x8c, 0x41, 0xde, 0x84, 0x39, 0xd2, 0xf1}, - output256: []byte{0xab, 0x50, 0x45, 0x92, 0xad, 0x71, 0x84, 0xbe, 0x83, 0xcc, 0x65, 0x9e, 0xfb, 0x5d, 0x3d, 0xe8, 0x8b, 0xa0, 0x4b, 0x6, 0xb, 0x45, 0xd1, 0x6a, 0x76, 0xf0, 0x34, 0x8, 0xd, 0xde, 0x56, 0xc6}, - output384: []byte{0x9f, 0xa1, 0xd0, 0xac, 0x7c, 0x37, 0x83, 0x17, 0x31, 0xb7, 0x1c, 0x19, 0xac, 0x9e, 0x81, 0xea, 0x11, 0x50, 0x83, 0xac, 0xe6, 0xd9, 0x43, 0x49, 0xce, 0x89, 0xfd, 0xb7, 0x9b, 0x34, 0x62, 0xa7, 0x49, 0xd7, 0x6f, 0xdc, 0x93, 0x89, 0x2f, 0x2f, 0x16, 0xab, 0xf, 0x7e, 0x18, 0xcd, 0xb7, 0x9c}, - output512: []byte{0xe8, 0xa, 0x63, 0xfa, 0xf2, 0x48, 0xae, 0x76, 0x2d, 0x13, 0x88, 0x7a, 0xfe, 0x8e, 0x19, 0x54, 0xf9, 0x73, 0x27, 0xed, 0xd9, 0x64, 0x1c, 0xe5, 0x63, 0xf4, 0x14, 0x8f, 0x97, 0x96, 0x66, 0x98, 0x27, 0xb3, 0xa1, 0x2b, 0x6, 0xeb, 0xd7, 0x10, 0xd4, 0x17, 0x1b, 0x86, 0xe2, 0x1b, 0xc1, 0x33, 0x60, 0xa5, 0x41, 0x84, 0x53, 0x54, 0xe0, 0xf4, 0x93, 0x4e, 0x6f, 0xbb, 0xd7, 0xac, 0xbf, 0x2d}}, - testcase{ - msg: []byte{0xd, 0x8d, 0x9, 0xae, 0xd1, 0x9f, 0x10, 0x13, 0x96, 0x9c, 0xe5, 0xe7, 0xeb, 0x92, 0xf8, 0x3a, 0x20, 0x9a, 0xe7, 0x6b, 0xe3, 0x1c, 0x75, 0x48, 0x44, 0xea, 0x91, 0x16, 0xce, 0xb3, 0x9a, 0x22, 0xeb, 0xb6, 0x0, 0x30, 0x17, 0xbb, 0xcf, 0x26, 0x55, 0x5f, 0xa6, 0x62, 0x41, 0x85, 0x18, 0x7d, 0xb8, 0xf0, 0xcb, 0x35, 0x64, 0xb8, 0xb1, 0xc0, 0x6b, 0xf6, 0x85, 0xd4, 0x7f, 0x32, 0x86, 0xed, 0xa2, 0xb, 0x83, 0x35, 0x8f, 0x59, 0x9d, 0x20, 0x44, 0xbb, 0xf0, 0x58, 0x3f, 0xab, 0x8d, 0x78, 0xf8, 0x54, 0xfe, 0xa, 0x59, 0x61, 0x83, 0x23, 0xc, 0x5e, 0xf8, 0xe5, 0x44, 0x26, 0x75, 0xe, 0xaf, 0x2c, 0xc4, 0xe2, 0x9d, 0x3b, 0xdd, 0x3, 0x7e, 0x73, 0x4d, 0x86, 0x3c, 0x2b, 0xd9, 0x78, 0x9b, 0x4c, 0x24, 0x30, 0x96, 0x13, 0x8f, 0x76, 0x72, 0xc2, 0x32, 0x31, 0x4e, 0xff, 0xdf, 0xc6, 0x51, 0x34, 0x27, 0xe2, 0xda, 0x76, 0x91, 0x6b, 0x52, 0x48, 0x93, 0x3b, 0xe3, 0x12, 0xeb, 0x5d, 0xde, 0x4c, 0xf7, 0x8, 0x4, 0xfb, 0x25, 0x8a, 0xc5, 0xfb, 0x82, 0xd5, 0x8d, 0x8, 0x17, 0x7a, 0xc6, 0xf4, 0x75, 0x60, 0x17, 0xff, 0xf5}, - output224: []byte{0x5e, 0x74, 0x5f, 0x89, 0x66, 0xd9, 0x1e, 0xee, 0x1, 0x3b, 0x6, 0x12, 0x81, 0xbc, 0x20, 0xc7, 0x9b, 0x3, 0x23, 0x0, 0xa, 0x15, 0xbb, 0xde, 0x7e, 0xd, 0x25, 0xae}, - output256: []byte{0x5d, 0x8e, 0xe1, 0x33, 0xec, 0x44, 0x1a, 0x3d, 0xf5, 0xa, 0x52, 0x68, 0xa8, 0xf3, 0x93, 0xf1, 0x3f, 0x30, 0xf2, 0x3f, 0x22, 0x6a, 0xe3, 0xa1, 0x8e, 0xc3, 0x31, 0x84, 0x44, 0x2, 0xff, 0x54}, - output384: []byte{0x18, 0x7c, 0xdf, 0xdb, 0x37, 0x57, 0xd8, 0x0, 0x10, 0xd1, 0xe5, 0x31, 0x57, 0xa5, 0xcc, 0xb0, 0xfc, 0xc3, 0x49, 0x98, 0xef, 0xc6, 0xbb, 0x3c, 0xe2, 0xe6, 0x7, 0x68, 0xf5, 0xee, 0xaa, 0x59, 0x6, 0x56, 0xb4, 0x9c, 0xe, 0x3, 0x6a, 0x3f, 0x34, 0xc9, 0xef, 0x25, 0xf3, 0xbe, 0x58, 0x7a}, - output512: []byte{0x9, 0xc1, 0xc, 0x48, 0x18, 0xa6, 0x82, 0x1c, 0x17, 0xd, 0x67, 0x80, 0xd0, 0x6, 0xf7, 0xe8, 0x53, 0xe3, 0xf, 0xe2, 0xd9, 0xa4, 0xe9, 0x65, 0x45, 0x67, 0x37, 0x4, 0xec, 0xa, 0x1a, 0x3e, 0x35, 0x63, 0x75, 0x71, 0x59, 0x94, 0xe1, 0xac, 0x1d, 0x8c, 0xb0, 0xe5, 0x6d, 0xbd, 0xb2, 0xf7, 0x7d, 0xc5, 0x58, 0xed, 0x22, 0x8f, 0xb5, 0x6e, 0xe6, 0x22, 0x17, 0xe6, 0x34, 0x55, 0xfd, 0xb}}, - testcase{ - msg: []byte{0xc3, 0x23, 0x6b, 0x73, 0xde, 0xb7, 0x66, 0x2b, 0xf3, 0xf3, 0xda, 0xa5, 0x8f, 0x13, 0x7b, 0x35, 0x8b, 0xa6, 0x10, 0x56, 0xe, 0xf7, 0x45, 0x57, 0x85, 0xa9, 0xbe, 0xfd, 0xb0, 0x35, 0xa0, 0x66, 0xe9, 0x7, 0x4, 0xf9, 0x29, 0xbd, 0x96, 0x89, 0xce, 0xf0, 0xce, 0x3b, 0xda, 0x5a, 0xcf, 0x44, 0x80, 0xbc, 0xeb, 0x8d, 0x9, 0xd1, 0xb, 0x9, 0x8a, 0xd8, 0x50, 0xd, 0x9b, 0x60, 0x71, 0xdf, 0xc3, 0xa1, 0x4a, 0xf6, 0xc7, 0x75, 0x11, 0xd8, 0x1e, 0x3a, 0xa8, 0x84, 0x49, 0x86, 0xc3, 0xbe, 0xa6, 0xf4, 0x69, 0xf9, 0xe0, 0x21, 0x94, 0xc9, 0x28, 0x68, 0xcd, 0x5f, 0x51, 0x64, 0x62, 0x56, 0x79, 0x8f, 0xf0, 0x42, 0x49, 0x54, 0xc1, 0x43, 0x4b, 0xdf, 0xed, 0x9f, 0xac, 0xb3, 0x90, 0xb0, 0x7d, 0x34, 0x2e, 0x99, 0x29, 0x36, 0xe0, 0xf8, 0x8b, 0xfd, 0xe, 0x88, 0x4a, 0xd, 0xdb, 0x67, 0x9d, 0x5, 0x47, 0xcc, 0xde, 0xc6, 0x38, 0x42, 0x85, 0xa4, 0x54, 0x29, 0xd1, 0x15, 0xac, 0x7d, 0x23, 0x5a, 0x71, 0x72, 0x42, 0x2, 0x1d, 0x1d, 0xc3, 0x56, 0x41, 0xf5, 0xf0, 0xa4, 0x8e, 0x84, 0x45, 0xdb, 0xa5, 0x8e, 0x6c, 0xb2, 0xc8, 0xea}, - output224: []byte{0xcd, 0x2e, 0xeb, 0x7d, 0x48, 0xd0, 0x26, 0x9, 0x86, 0xba, 0xdf, 0x16, 0xf1, 0x5a, 0xa0, 0x9b, 0x52, 0x29, 0xb7, 0x83, 0xc, 0x73, 0xee, 0x95, 0xb8, 0xcb, 0xf8, 0x5a}, - output256: []byte{0x71, 0x2b, 0x1c, 0xc0, 0x4c, 0x0, 0x9b, 0x52, 0x3, 0x5c, 0xc4, 0x4c, 0x95, 0x5, 0xbb, 0x5c, 0xb5, 0x77, 0xba, 0xa, 0xd1, 0x73, 0x4e, 0xc2, 0x36, 0x20, 0xf5, 0x7e, 0xef, 0x3d, 0x37, 0xfb}, - output384: []byte{0x70, 0x43, 0xf5, 0x4f, 0x39, 0xb, 0x6a, 0xbd, 0xd, 0xff, 0x6, 0xf2, 0x66, 0xe0, 0xe7, 0xb3, 0xe4, 0x1f, 0x8d, 0x2e, 0x8d, 0xd4, 0x3f, 0x89, 0x9a, 0xc4, 0x56, 0x66, 0x24, 0x47, 0xa8, 0x23, 0xa5, 0x67, 0xb1, 0xb0, 0xfb, 0x8c, 0x2d, 0xf2, 0x4e, 0x5f, 0x66, 0x89, 0x6, 0xc, 0xdd, 0xb4}, - output512: []byte{0xd1, 0xca, 0xb5, 0x97, 0x9e, 0xb7, 0xf5, 0x3c, 0x97, 0xdc, 0xa5, 0xd7, 0x25, 0xd8, 0xb3, 0x30, 0x8, 0x90, 0x6d, 0x77, 0x59, 0xfd, 0x3e, 0xbb, 0x84, 0x1, 0xee, 0x2f, 0xff, 0x1, 0xdb, 0x89, 0x54, 0x95, 0xa0, 0xa0, 0x62, 0xd4, 0x7f, 0x25, 0x1b, 0xc3, 0xfc, 0x13, 0x98, 0x86, 0x7, 0xc6, 0x79, 0x89, 0x69, 0xd2, 0x13, 0xc9, 0x41, 0xef, 0xc1, 0x52, 0xe7, 0xdb, 0x1d, 0xa6, 0x8e, 0x72}}, - testcase{ - msg: []byte{0xb3, 0x9f, 0xeb, 0x82, 0x83, 0xea, 0xdc, 0x63, 0xe8, 0x18, 0x4b, 0x51, 0xdf, 0x5a, 0xe3, 0xfd, 0x41, 0xaa, 0xc8, 0xa9, 0x63, 0xbb, 0xb, 0xe1, 0xcd, 0x8, 0xaa, 0x58, 0x67, 0xd8, 0xd9, 0x10, 0xc6, 0x69, 0x22, 0x1e, 0x73, 0x24, 0x33, 0x60, 0x64, 0x6f, 0x65, 0x53, 0xd1, 0xca, 0x5, 0xa8, 0x4e, 0x8d, 0xc0, 0xde, 0x5, 0xb6, 0x41, 0x9e, 0xc3, 0x49, 0xca, 0x99, 0x44, 0x80, 0x19, 0x3d, 0x1, 0xc9, 0x25, 0x25, 0xf3, 0xfb, 0x3d, 0xce, 0xfb, 0x8, 0xaf, 0xc6, 0xd2, 0x69, 0x47, 0xbd, 0xbb, 0xfd, 0x85, 0x19, 0x3f, 0x53, 0xb5, 0x6, 0x9, 0xc6, 0x14, 0x9, 0x5, 0xc5, 0x3a, 0x66, 0x86, 0xb5, 0x8e, 0x53, 0xa3, 0x19, 0xa5, 0x7b, 0x96, 0x23, 0x31, 0xed, 0xe9, 0x81, 0x49, 0xaf, 0x3d, 0xe3, 0x11, 0x8a, 0x81, 0x9d, 0xa4, 0xd7, 0x67, 0x6, 0xa0, 0x42, 0x4b, 0x4e, 0x1d, 0x29, 0x10, 0xb0, 0xed, 0x26, 0xaf, 0x61, 0xd1, 0x50, 0xeb, 0xcb, 0x46, 0x59, 0x5d, 0x42, 0x66, 0xa0, 0xbd, 0x7f, 0x65, 0x1b, 0xa4, 0x7d, 0xc, 0x7f, 0x17, 0x9c, 0xa2, 0x85, 0x45, 0x0, 0x7d, 0x92, 0xe8, 0x41, 0x9d, 0x48, 0xfd, 0xfb, 0xd7, 0x44, 0xce}, - output224: []byte{0x33, 0x22, 0xfa, 0x72, 0x7a, 0x0, 0x89, 0xf5, 0x0, 0xa6, 0xa9, 0x9d, 0x67, 0x41, 0x9a, 0x76, 0xc7, 0xaf, 0x77, 0xef, 0x28, 0x93, 0xe8, 0xd3, 0x85, 0xb4, 0x27, 0x20}, - output256: []byte{0x94, 0x2e, 0x39, 0xe2, 0x30, 0xa2, 0x25, 0x1f, 0xfd, 0xb2, 0xf8, 0x52, 0x2, 0x87, 0x1c, 0x98, 0x59, 0x70, 0x8, 0x40, 0x1b, 0x32, 0x2f, 0xf9, 0x84, 0xc, 0xc9, 0xc, 0xc8, 0x5b, 0x33, 0x7d}, - output384: []byte{0xd0, 0xce, 0x2, 0x59, 0xaa, 0xee, 0xa5, 0xba, 0xef, 0xf5, 0x29, 0x29, 0x42, 0x3c, 0x3d, 0xa0, 0x7a, 0x8c, 0x75, 0x19, 0x5f, 0x86, 0xd7, 0x33, 0xa7, 0x18, 0xd1, 0xc4, 0x6a, 0x1e, 0x40, 0xaa, 0xd4, 0x4, 0x75, 0xc, 0x41, 0xd7, 0xa1, 0x58, 0xe7, 0x9f, 0x27, 0x88, 0x30, 0xb4, 0xc0, 0x7a}, - output512: []byte{0x96, 0xad, 0x16, 0x38, 0x69, 0xae, 0x2f, 0xfd, 0xb8, 0x9b, 0x96, 0xf4, 0xdc, 0x70, 0xe, 0xce, 0x27, 0xd1, 0xf4, 0xda, 0xaf, 0xbc, 0x5f, 0xb8, 0x1a, 0x8e, 0x95, 0x13, 0xc6, 0xea, 0x5e, 0x2b, 0x6a, 0x8b, 0xcc, 0xf4, 0xe4, 0x9a, 0x29, 0x4a, 0xf3, 0x26, 0xf8, 0x72, 0x74, 0x6, 0x61, 0x62, 0x9a, 0xb7, 0x80, 0x58, 0x11, 0x55, 0x81, 0xe, 0x49, 0x24, 0x24, 0xc2, 0x4f, 0x8d, 0x1d, 0xd3}}, - testcase{ - msg: []byte{0xa9, 0x83, 0xd5, 0x4f, 0x50, 0x38, 0x3, 0xe8, 0xc7, 0x99, 0x9f, 0x4e, 0xdb, 0xbe, 0x82, 0xe9, 0x8, 0x4f, 0x42, 0x21, 0x43, 0xa9, 0x32, 0xdd, 0xdd, 0xc4, 0x7a, 0x17, 0xb0, 0xb7, 0x56, 0x4a, 0x7f, 0x37, 0xa9, 0x9d, 0x7, 0x86, 0xe9, 0x94, 0x76, 0x42, 0x8d, 0x29, 0xe2, 0x9d, 0x3c, 0x19, 0x7a, 0x72, 0xbf, 0xab, 0x13, 0x42, 0xc1, 0x2a, 0xf, 0xc4, 0x78, 0x7f, 0xd7, 0x1, 0x7d, 0x7a, 0x61, 0x74, 0x4, 0x9e, 0xa4, 0x3b, 0x57, 0x79, 0x16, 0x9e, 0xf7, 0x47, 0x2b, 0xdb, 0xbd, 0x94, 0x1d, 0xcb, 0x82, 0xfc, 0x73, 0xaa, 0xc4, 0x5a, 0x8a, 0x94, 0xc9, 0xf2, 0xbd, 0x34, 0x77, 0xf6, 0x1f, 0xd3, 0xb7, 0x96, 0xf0, 0x2a, 0x1b, 0x82, 0x64, 0xa2, 0x14, 0xc6, 0xfe, 0xa7, 0x4b, 0x70, 0x51, 0xb2, 0x26, 0xc7, 0x22, 0x9, 0x9e, 0xc7, 0x88, 0x3a, 0x46, 0x2b, 0x83, 0xb6, 0xaf, 0xdd, 0x40, 0x9, 0x24, 0x8b, 0x8a, 0x23, 0x7f, 0x60, 0x5f, 0xe5, 0xa0, 0x8f, 0xe7, 0xd8, 0xb4, 0x53, 0x21, 0x42, 0x1e, 0xbb, 0xa6, 0x7b, 0xd7, 0xa, 0xb, 0x0, 0xdd, 0xbf, 0x94, 0xba, 0xab, 0x7f, 0x35, 0x9d, 0x5d, 0x1e, 0xea, 0x10, 0x5f, 0x28, 0xdc, 0xfb}, - output224: []byte{0x23, 0x4c, 0x1b, 0xc0, 0x3f, 0xd4, 0xc3, 0xd3, 0x8d, 0xd4, 0xc7, 0x36, 0xb5, 0x9a, 0x91, 0x7, 0x91, 0x12, 0x10, 0xd5, 0x4e, 0x98, 0xb3, 0xa3, 0x72, 0xf5, 0x72, 0x36}, - output256: []byte{0xb5, 0x42, 0xb6, 0xcd, 0x8e, 0xf2, 0xda, 0xb4, 0xed, 0x83, 0xb7, 0x7a, 0xc6, 0xdc, 0x52, 0xda, 0xf5, 0x54, 0xec, 0xda, 0x4e, 0xf7, 0xab, 0xa, 0x50, 0xe5, 0x46, 0xbe, 0xbe, 0x2d, 0x8e, 0x5a}, - output384: []byte{0xe4, 0x38, 0x5a, 0x3b, 0xe0, 0x11, 0xaf, 0x20, 0xfe, 0x45, 0x66, 0xc1, 0xce, 0xbf, 0x4a, 0xa6, 0x82, 0x70, 0xe4, 0x2b, 0xe5, 0xa, 0xaa, 0xae, 0x65, 0xf8, 0xf6, 0x5, 0xe9, 0x80, 0xb1, 0xd2, 0x73, 0x6f, 0xb0, 0xe7, 0x94, 0x33, 0xd, 0x76, 0x4c, 0xa9, 0x6b, 0xc6, 0x8b, 0x83, 0x60, 0xbc}, - output512: []byte{0xfd, 0x2e, 0x7a, 0x6e, 0x11, 0xe5, 0xd0, 0x2, 0x78, 0x9, 0x9e, 0xaf, 0x40, 0x30, 0x54, 0xd6, 0x17, 0xac, 0xac, 0x5b, 0xd3, 0xd0, 0xa4, 0x90, 0x81, 0x91, 0x78, 0x2c, 0x89, 0xf9, 0x21, 0x7a, 0x3f, 0x1, 0x18, 0xbc, 0x2b, 0x28, 0x4f, 0xdb, 0xce, 0x80, 0x3f, 0x66, 0xb7, 0x8d, 0xd7, 0x95, 0xeb, 0x18, 0xdc, 0x16, 0xba, 0x85, 0xe1, 0x9c, 0xb6, 0x39, 0x3d, 0xc5, 0x6c, 0x6, 0xec, 0xca}}, - testcase{ - msg: []byte{0xe4, 0xd1, 0xc1, 0x89, 0x7a, 0xa, 0x86, 0x6c, 0xe5, 0x64, 0x63, 0x5b, 0x74, 0x22, 0x2f, 0x96, 0x96, 0xbf, 0x2c, 0x7f, 0x64, 0xd, 0xd7, 0x8d, 0x7e, 0x2a, 0xca, 0x66, 0xe1, 0xb6, 0x1c, 0x64, 0x2b, 0xb0, 0x3e, 0xa7, 0x53, 0x6a, 0xae, 0x59, 0x78, 0x11, 0xe9, 0xbf, 0x4a, 0x7b, 0x45, 0x3e, 0xde, 0x31, 0xf9, 0x7b, 0x46, 0xa5, 0xf0, 0xef, 0x51, 0xa0, 0x71, 0xa2, 0xb3, 0x91, 0x8d, 0xf1, 0x6b, 0x15, 0x25, 0x19, 0xae, 0x37, 0x76, 0xf9, 0xf1, 0xed, 0xab, 0x4c, 0x2a, 0x37, 0x7c, 0x32, 0x92, 0xe9, 0x64, 0x8, 0x35, 0x9d, 0x36, 0x13, 0x84, 0x4d, 0x5e, 0xb3, 0x93, 0x0, 0x2, 0x83, 0xd5, 0xad, 0x34, 0x1, 0xa3, 0x18, 0xb1, 0x2f, 0xd1, 0x47, 0x4b, 0x86, 0x12, 0xf2, 0xbb, 0x50, 0xfb, 0x6a, 0x8b, 0x9e, 0x2, 0x3a, 0x54, 0xd7, 0xdd, 0xe2, 0x8c, 0x43, 0xd6, 0xd8, 0x85, 0x4c, 0x8d, 0x9d, 0x11, 0x55, 0x93, 0x5c, 0x19, 0x98, 0x11, 0xdb, 0xfc, 0x87, 0xe9, 0xe0, 0x7, 0x2e, 0x90, 0xeb, 0x88, 0x68, 0x1c, 0xc7, 0x52, 0x97, 0x14, 0xf8, 0xfb, 0x8a, 0x2c, 0x9d, 0x88, 0x56, 0x7a, 0xdf, 0xb9, 0x74, 0xee, 0x20, 0x5a, 0x9b, 0xf7, 0xb8, 0x48}, - output224: []byte{0xbf, 0x22, 0x9f, 0x40, 0x17, 0xe1, 0x67, 0x4d, 0x4c, 0xb8, 0x7b, 0x70, 0xd3, 0xd7, 0x77, 0xc7, 0x11, 0x4f, 0x8, 0x5d, 0x77, 0x21, 0x64, 0x37, 0xb8, 0x60, 0xd6, 0x41}, - output256: []byte{0xf7, 0xe9, 0xe8, 0x25, 0x72, 0x2e, 0x65, 0x54, 0xa8, 0x61, 0x9c, 0xca, 0x3e, 0x57, 0xf5, 0xb5, 0xe6, 0xb7, 0x34, 0x74, 0x31, 0xd5, 0x5c, 0xe1, 0x78, 0x37, 0x2c, 0x91, 0x7b, 0xfb, 0x3d, 0xc2}, - output384: []byte{0xc9, 0x79, 0xf0, 0x6, 0x56, 0xa0, 0x9e, 0x68, 0x48, 0x5c, 0xcf, 0x7, 0xfb, 0xbb, 0x91, 0x8, 0xb0, 0xc, 0x5f, 0xc1, 0x1d, 0x41, 0xf5, 0x96, 0x6f, 0xf0, 0x86, 0xf2, 0x6c, 0x71, 0x2, 0x47, 0x8e, 0xc1, 0x77, 0xee, 0x6d, 0x78, 0xc6, 0x23, 0xc3, 0x75, 0xa9, 0xe6, 0xf7, 0x61, 0x80, 0x9a}, - output512: []byte{0xae, 0x53, 0x77, 0x6d, 0x96, 0x9a, 0x9b, 0x28, 0x56, 0x41, 0x99, 0x8a, 0x9f, 0x2c, 0x70, 0xca, 0x71, 0x85, 0x6c, 0x95, 0x6a, 0x3c, 0x43, 0xa, 0x32, 0xa1, 0xe0, 0x3a, 0x8e, 0x8, 0xd5, 0x44, 0xf1, 0x65, 0x11, 0xa2, 0x7c, 0xfa, 0x59, 0xf6, 0xb8, 0x27, 0x5a, 0x23, 0x57, 0xf8, 0xef, 0xa6, 0x54, 0x4b, 0x1c, 0xd0, 0xc0, 0xa, 0x94, 0x60, 0xf4, 0x79, 0x54, 0xa1, 0x46, 0x42, 0x9e, 0x49}}, - testcase{ - msg: []byte{0xb1, 0xc, 0x59, 0x72, 0x3e, 0x3d, 0xca, 0xdd, 0x6d, 0x75, 0xdf, 0x87, 0xd0, 0xa1, 0x58, 0xe, 0x73, 0x13, 0x3a, 0x9b, 0x7d, 0x0, 0xcb, 0x95, 0xec, 0x19, 0xf5, 0x54, 0x70, 0x27, 0x32, 0x3b, 0xe7, 0x51, 0x58, 0xb1, 0x1f, 0x80, 0xb6, 0xe1, 0x42, 0xc6, 0xa7, 0x85, 0x31, 0x88, 0x6d, 0x90, 0x47, 0xb0, 0x8e, 0x55, 0x1e, 0x75, 0xe6, 0x26, 0x1e, 0x79, 0x78, 0x53, 0x66, 0xd7, 0x2, 0x4b, 0xd7, 0xcd, 0x9c, 0xf3, 0x22, 0xd9, 0xbe, 0x7d, 0x57, 0xfb, 0x66, 0x10, 0x69, 0xf2, 0x48, 0x1c, 0x7b, 0xb7, 0x59, 0xcd, 0x71, 0xb4, 0xb3, 0x6c, 0xa2, 0xbc, 0x2d, 0xf6, 0xd3, 0xa3, 0x28, 0xfa, 0xeb, 0xdb, 0x99, 0x5a, 0x97, 0x94, 0xa8, 0xd7, 0x21, 0x55, 0xed, 0x55, 0x1a, 0x1f, 0x87, 0xc8, 0xb, 0xf6, 0x5, 0x9b, 0x43, 0xfc, 0x76, 0x49, 0x0, 0xb1, 0x8a, 0x1c, 0x24, 0x41, 0xf7, 0x48, 0x77, 0x43, 0xcf, 0x84, 0xe5, 0x65, 0xf6, 0x1f, 0x8d, 0xd2, 0xec, 0xe6, 0xb6, 0xcc, 0xc9, 0x44, 0x40, 0x49, 0x19, 0x7a, 0xaa, 0xf5, 0x3e, 0x92, 0x6f, 0xbe, 0xe3, 0xbf, 0xca, 0x8b, 0xe5, 0x88, 0xec, 0x77, 0xf2, 0x9d, 0x21, 0x1b, 0xe8, 0x9d, 0xe1, 0x8b, 0x15, 0xf6}, - output224: []byte{0xf9, 0x5d, 0xe3, 0xf4, 0xe, 0x5f, 0xaf, 0x58, 0xd3, 0x32, 0xb, 0x5b, 0x24, 0xac, 0xec, 0x7d, 0xe6, 0xb4, 0xb7, 0xe5, 0x4c, 0x2f, 0x80, 0xf6, 0xd3, 0x14, 0xab, 0x5a}, - output256: []byte{0x14, 0xbb, 0x22, 0xb9, 0x8e, 0xaf, 0x41, 0xa4, 0xc2, 0x24, 0xfd, 0x3c, 0x37, 0x18, 0x8a, 0x75, 0x5f, 0x9b, 0x4, 0xf4, 0x6f, 0x3e, 0x23, 0xa6, 0x52, 0xda, 0x3d, 0xb9, 0xe2, 0x5d, 0x2f, 0x2c}, - output384: []byte{0x36, 0x13, 0x93, 0x36, 0x11, 0xd, 0x1d, 0x6c, 0x27, 0xe4, 0xcc, 0x1f, 0x26, 0xf4, 0x28, 0xeb, 0x8b, 0xdb, 0xcb, 0xa3, 0xaa, 0x9f, 0xfd, 0xce, 0xcf, 0x72, 0x0, 0x9f, 0xb4, 0x6b, 0xfa, 0xf9, 0xe3, 0x46, 0x4c, 0x48, 0xbe, 0xfa, 0x47, 0x45, 0xbe, 0x36, 0xc6, 0x97, 0xdd, 0x3b, 0xed, 0x8b}, - output512: []byte{0xd4, 0x74, 0x8c, 0x8e, 0x17, 0xf4, 0x11, 0x7b, 0xf2, 0xbf, 0x71, 0x55, 0x7a, 0xbb, 0x55, 0x92, 0x47, 0x55, 0x21, 0x26, 0xc3, 0x61, 0x92, 0xc5, 0xdf, 0x5c, 0x6c, 0x3e, 0x30, 0x7d, 0x87, 0x9b, 0x70, 0x3c, 0x3f, 0xcd, 0x70, 0x99, 0xdd, 0xab, 0x24, 0x3e, 0x2f, 0x1d, 0x5a, 0xe5, 0x6, 0x69, 0x90, 0xa7, 0xb3, 0x8d, 0x3f, 0x2c, 0xd7, 0xfb, 0x11, 0x5a, 0xa6, 0xd1, 0x35, 0xe7, 0x26, 0x1d}}, - testcase{ - msg: []byte{0xdb, 0x11, 0xf6, 0x9, 0xba, 0xba, 0x7b, 0xc, 0xa6, 0x34, 0x92, 0x6b, 0x1d, 0xd5, 0x39, 0xc8, 0xcb, 0xad, 0xa2, 0x49, 0x67, 0xd7, 0xad, 0xd4, 0xd9, 0x87, 0x6f, 0x77, 0xc2, 0xd8, 0xc, 0xf, 0x4d, 0xce, 0xfb, 0xd7, 0x12, 0x15, 0x48, 0x37, 0x35, 0x82, 0x70, 0x5c, 0xca, 0x24, 0x95, 0xbd, 0x2a, 0x43, 0x71, 0x6f, 0xe6, 0x4e, 0xd2, 0x6d, 0x5, 0x9c, 0xfb, 0x56, 0x6b, 0x33, 0x64, 0xbd, 0x49, 0xee, 0x7, 0x17, 0xbd, 0xd9, 0x81, 0xd, 0xd1, 0x4d, 0x8f, 0xad, 0x80, 0xdb, 0xbd, 0xc4, 0xca, 0xfb, 0x37, 0xcc, 0x60, 0xfb, 0xf, 0xe2, 0xa8, 0xf, 0xb4, 0x54, 0x1b, 0x8c, 0xa9, 0xd5, 0x9d, 0xce, 0x45, 0x77, 0x38, 0xa9, 0xd3, 0xd8, 0xf6, 0x41, 0xaf, 0x8c, 0x3f, 0xd6, 0xda, 0x16, 0x2d, 0xc1, 0x6f, 0xc0, 0x1a, 0xac, 0x52, 0x7a, 0x4a, 0x2, 0x55, 0xb4, 0xd2, 0x31, 0xc0, 0xbe, 0x50, 0xf4, 0x4f, 0xd, 0xb0, 0xb7, 0x13, 0xaf, 0x3, 0xd9, 0x68, 0xfe, 0x7f, 0xf, 0x61, 0xed, 0x8, 0x24, 0xc5, 0x5c, 0x4b, 0x52, 0x65, 0x54, 0x8f, 0xeb, 0xd6, 0xaa, 0xd5, 0xc5, 0xee, 0xdf, 0x63, 0xef, 0xe7, 0x93, 0x48, 0x9c, 0x39, 0xb8, 0xfd, 0x29, 0xd1, 0x4, 0xce}, - output224: []byte{0x4, 0xb3, 0xbb, 0xbd, 0xdf, 0xeb, 0xa4, 0x41, 0x0, 0x5a, 0x48, 0xce, 0xbd, 0xbb, 0x1c, 0x6b, 0x6a, 0x67, 0x4c, 0x2d, 0x9b, 0x22, 0x4d, 0xa2, 0x98, 0x44, 0x37, 0x4d}, - output256: []byte{0xeb, 0x56, 0x68, 0xf9, 0x94, 0x1c, 0x6, 0xe5, 0xe3, 0x8e, 0xa0, 0x1b, 0x7f, 0xa9, 0x80, 0x63, 0x8b, 0x95, 0x36, 0xca, 0x19, 0x39, 0x95, 0xc, 0x16, 0x29, 0xf8, 0x4a, 0x6e, 0xff, 0x38, 0x66}, - output384: []byte{0xce, 0x32, 0x68, 0xb8, 0xec, 0x92, 0x3b, 0x33, 0x31, 0xea, 0x2c, 0xf8, 0x51, 0x32, 0xc0, 0x73, 0x3c, 0xf8, 0xbf, 0x87, 0xda, 0xa5, 0x44, 0xf8, 0xee, 0x38, 0x6d, 0x5d, 0xe9, 0xfb, 0xd4, 0xd8, 0xad, 0x94, 0xe0, 0xb, 0x70, 0x5c, 0xa5, 0xb6, 0x1a, 0x3c, 0x17, 0x90, 0xb6, 0x50, 0x8, 0xc}, - output512: []byte{0xd8, 0xff, 0x4, 0x81, 0xa6, 0x38, 0x90, 0xf0, 0xe5, 0xa5, 0x36, 0xeb, 0xba, 0x2f, 0x25, 0x3f, 0xa2, 0xcf, 0xa1, 0x9c, 0xf, 0x35, 0x35, 0x87, 0xaf, 0x4b, 0xdc, 0x31, 0x90, 0xe4, 0xf8, 0xf5, 0x4d, 0x17, 0xd6, 0x65, 0xe8, 0xb2, 0x1, 0x11, 0x21, 0xd4, 0x44, 0xbf, 0xad, 0xff, 0xf3, 0xe1, 0x92, 0xd9, 0x7f, 0xa0, 0x3b, 0x84, 0x9d, 0x63, 0xf3, 0x6d, 0xb2, 0xf, 0x4c, 0xf8, 0x8a, 0x74}}, - testcase{ - msg: []byte{0xbe, 0xbd, 0x4f, 0x1a, 0x84, 0xfc, 0x8b, 0x15, 0xe4, 0x45, 0x2a, 0x54, 0xbd, 0x2, 0xd6, 0x9e, 0x30, 0x4b, 0x7f, 0x32, 0x61, 0x6a, 0xad, 0xd9, 0x5, 0x37, 0x93, 0x71, 0x6, 0xae, 0x4e, 0x28, 0xde, 0x9d, 0x8a, 0xab, 0x2, 0xd1, 0x9b, 0xc3, 0xe2, 0xfd, 0xe1, 0xd6, 0x51, 0x55, 0x9e, 0x29, 0x64, 0x53, 0xe4, 0xdb, 0xa9, 0x43, 0x70, 0xa1, 0x4d, 0xbb, 0xb2, 0xd1, 0xd4, 0xe2, 0x2, 0x23, 0x2, 0xee, 0x90, 0xe2, 0x8, 0x32, 0x1e, 0xfc, 0xd8, 0x52, 0x8a, 0xd8, 0x9e, 0x46, 0xdc, 0x83, 0x9e, 0xa9, 0xdf, 0x61, 0x8e, 0xa8, 0x39, 0x4a, 0x6b, 0xff, 0x30, 0x8e, 0x77, 0x26, 0xba, 0xe0, 0xc1, 0x9b, 0xcd, 0x4b, 0xe5, 0x2d, 0xa6, 0x25, 0x8e, 0x2e, 0xf4, 0xe9, 0x6a, 0xa2, 0x12, 0x44, 0x42, 0x9f, 0x49, 0xef, 0x5c, 0xb4, 0x86, 0xd7, 0xff, 0x35, 0xca, 0xc1, 0xba, 0xcb, 0x7e, 0x95, 0x71, 0x19, 0x44, 0xbc, 0xcb, 0x2a, 0xb3, 0x47, 0x0, 0xd4, 0x2d, 0x1e, 0xb3, 0x8b, 0x5d, 0x53, 0x6b, 0x94, 0x73, 0x48, 0xa4, 0x58, 0xed, 0xe3, 0xdc, 0x6b, 0xd6, 0xec, 0x54, 0x7b, 0x1b, 0xc, 0xae, 0x5b, 0x25, 0x7b, 0xe3, 0x6a, 0x71, 0x24, 0xe1, 0x6, 0xc, 0x17, 0xf, 0xfa}, - output224: []byte{0x6c, 0x18, 0x9, 0xcd, 0x88, 0xa0, 0xed, 0xb2, 0x11, 0x98, 0x63, 0x59, 0x49, 0x8e, 0xa, 0xc3, 0x7e, 0x25, 0xe8, 0xeb, 0x62, 0x94, 0x69, 0x38, 0xc3, 0x7d, 0x3c, 0x26}, - output256: []byte{0x91, 0x30, 0x14, 0xbb, 0x6e, 0x24, 0x3f, 0xac, 0x3a, 0x22, 0xa1, 0x85, 0xf8, 0x22, 0x7a, 0x68, 0xc2, 0x31, 0x1d, 0xc0, 0xb7, 0x18, 0xe2, 0x76, 0xbb, 0xbd, 0xb7, 0x3a, 0xf9, 0x8b, 0xe3, 0x5f}, - output384: []byte{0xdd, 0xc3, 0x98, 0x87, 0x9b, 0xd1, 0x6f, 0xb6, 0x81, 0xfa, 0xe1, 0x51, 0x2e, 0x3a, 0x1a, 0xe7, 0xed, 0x23, 0x62, 0xda, 0xd8, 0xbe, 0xe0, 0xd1, 0x2d, 0x22, 0x56, 0xb2, 0xd8, 0x56, 0x28, 0x20, 0x43, 0xdc, 0xc, 0xbb, 0xc0, 0xf6, 0x31, 0x97, 0xb7, 0x5e, 0x99, 0x82, 0xa1, 0xda, 0xa8, 0xae}, - output512: []byte{0x52, 0xd7, 0x71, 0xb5, 0x1, 0x6c, 0x6b, 0x1b, 0x93, 0xd3, 0xbf, 0x6a, 0x13, 0xf7, 0x18, 0xa7, 0xb4, 0x74, 0x1d, 0x52, 0x87, 0x98, 0x60, 0x93, 0x8, 0xb5, 0x4c, 0xea, 0x60, 0x37, 0x86, 0x2d, 0x92, 0x37, 0x51, 0xfd, 0xdc, 0xe1, 0x5, 0x80, 0xa7, 0xd6, 0x43, 0x1b, 0xf2, 0x8, 0xdf, 0x17, 0xc1, 0xb8, 0x25, 0xf7, 0xc7, 0x40, 0x1c, 0xcb, 0xd6, 0xd8, 0x6, 0xb7, 0x44, 0x24, 0x1a, 0xcf}}, - testcase{ - msg: []byte{0x5a, 0xca, 0x56, 0xa0, 0x3a, 0x13, 0x78, 0x4b, 0xdc, 0x32, 0x89, 0xd9, 0x36, 0x4f, 0x79, 0xe2, 0xa8, 0x5c, 0x12, 0x27, 0x6b, 0x49, 0xb9, 0x2d, 0xb0, 0xad, 0xaa, 0x4f, 0x20, 0x6d, 0x50, 0x28, 0xf2, 0x13, 0xf6, 0x78, 0xc3, 0x51, 0xe, 0x11, 0x1f, 0x9d, 0xc4, 0xc1, 0xc1, 0xf8, 0xb6, 0xac, 0xb1, 0x7a, 0x64, 0x13, 0xaa, 0x22, 0x76, 0x7, 0xc5, 0x15, 0xc6, 0x2a, 0x73, 0x38, 0x17, 0xba, 0x5e, 0x76, 0x2c, 0xc6, 0x74, 0x8e, 0x7e, 0xd, 0x68, 0x72, 0xc9, 0x84, 0xd7, 0x23, 0xc9, 0xbb, 0x3b, 0x11, 0x7e, 0xb8, 0x96, 0x31, 0x85, 0x30, 0xa, 0x80, 0xbf, 0xa6, 0x5c, 0xde, 0x49, 0x5d, 0x70, 0xa4, 0x6c, 0x44, 0x85, 0x86, 0x5, 0xfc, 0xcb, 0xed, 0x8, 0x6c, 0x2b, 0x45, 0xce, 0xf9, 0x63, 0xd3, 0x32, 0x94, 0xdb, 0xe9, 0x70, 0x6b, 0x13, 0xaf, 0x22, 0xf1, 0xb7, 0xc4, 0xcd, 0x5a, 0x0, 0x1c, 0xfe, 0xc2, 0x51, 0xfb, 0xa1, 0x8e, 0x72, 0x2c, 0x6e, 0x1c, 0x4b, 0x11, 0x66, 0x91, 0x8b, 0x4f, 0x6f, 0x48, 0xa9, 0x8b, 0x64, 0xb3, 0xc0, 0x7f, 0xc8, 0x6a, 0x6b, 0x17, 0xa6, 0xd0, 0x48, 0xa, 0xb7, 0x9d, 0x4e, 0x64, 0x15, 0xb5, 0x20, 0xf1, 0xc4, 0x84, 0xd6, 0x75, 0xb1}, - output224: []byte{0xd2, 0x74, 0x4a, 0x1b, 0xbb, 0x34, 0x71, 0x8f, 0xcb, 0xb6, 0x14, 0xc2, 0x1e, 0x1f, 0xcc, 0xd0, 0xff, 0x88, 0x61, 0x5c, 0xb8, 0x2a, 0xa0, 0x38, 0x3, 0xab, 0x94, 0x60}, - output256: []byte{0x2, 0x84, 0x41, 0x8c, 0x10, 0x19, 0xf, 0x41, 0x30, 0x42, 0xe3, 0xec, 0xeb, 0x39, 0x54, 0x97, 0x9b, 0x94, 0xaf, 0xbf, 0x2e, 0x54, 0x5f, 0xc7, 0xf8, 0xa3, 0xc7, 0xdb, 0x2c, 0x23, 0x59, 0x16}, - output384: []byte{0x35, 0xb, 0x4b, 0x27, 0x68, 0x2, 0xe, 0xaa, 0x95, 0x45, 0x2b, 0x90, 0x41, 0x44, 0x39, 0xa3, 0x8b, 0xe0, 0x36, 0x86, 0x13, 0x1d, 0x45, 0x61, 0x2c, 0x1b, 0x85, 0xfe, 0x6, 0xfd, 0x91, 0x96, 0xf2, 0x7d, 0x22, 0x1f, 0x4f, 0xf8, 0x32, 0x51, 0xaa, 0x8e, 0x69, 0xae, 0xf7, 0x2f, 0x90, 0x4d}, - output512: []byte{0x36, 0xd4, 0x72, 0xa8, 0xae, 0x13, 0xd1, 0xe7, 0xe, 0x1f, 0xd2, 0x75, 0x11, 0x7f, 0xfe, 0x34, 0x6, 0x3b, 0xef, 0xcc, 0xf6, 0x70, 0x6f, 0xab, 0x8, 0x16, 0xe1, 0xb8, 0x1f, 0x7f, 0xe7, 0xf2, 0xdd, 0xb2, 0xa1, 0x22, 0xf1, 0xf5, 0x2c, 0x99, 0x50, 0x64, 0x46, 0x59, 0x43, 0xf, 0x81, 0xbc, 0xed, 0xad, 0x5d, 0x83, 0x3d, 0xf4, 0x81, 0x4c, 0xf6, 0xa, 0xe6, 0xc5, 0x42, 0xcc, 0x44, 0x78}}, - testcase{ - msg: []byte{0xa5, 0xaa, 0xd0, 0xe4, 0x64, 0x6a, 0x32, 0xc8, 0x5c, 0xfc, 0xac, 0x73, 0xf0, 0x2f, 0xc5, 0x30, 0xf, 0x19, 0x82, 0xfa, 0xbb, 0x2f, 0x21, 0x79, 0xe2, 0x83, 0x3, 0xe4, 0x47, 0x85, 0x40, 0x94, 0xcd, 0xfc, 0x85, 0x43, 0x10, 0xe5, 0xc0, 0xf6, 0x9, 0x93, 0xce, 0xff, 0x54, 0xd8, 0x4d, 0x6b, 0x46, 0x32, 0x3d, 0x93, 0xa, 0xdb, 0x7, 0xc1, 0x75, 0x99, 0xb3, 0x5b, 0x50, 0x5f, 0x9, 0xe7, 0x84, 0xbc, 0xa5, 0x98, 0x5e, 0x1, 0x72, 0x25, 0x77, 0x97, 0xfb, 0x53, 0x64, 0x9e, 0x2e, 0x97, 0x23, 0xef, 0xd1, 0x68, 0x65, 0xc3, 0x1b, 0x5c, 0x3d, 0x51, 0x13, 0xb5, 0x8b, 0xb0, 0xbf, 0xc8, 0x92, 0xf, 0xab, 0xdd, 0xa0, 0x86, 0xd7, 0x53, 0x7e, 0x66, 0xd7, 0x9, 0xd0, 0x50, 0xbd, 0x14, 0xd0, 0xc9, 0x60, 0x87, 0x3f, 0x15, 0x6f, 0xad, 0x5b, 0x3d, 0x38, 0x40, 0xcd, 0xfc, 0xdc, 0x9b, 0xe6, 0xaf, 0x51, 0x9d, 0xb2, 0x62, 0xa2, 0x7f, 0x40, 0x89, 0x6a, 0xb2, 0x5c, 0xc3, 0x9f, 0x96, 0x98, 0x4d, 0x65, 0x6, 0x11, 0xc0, 0xd5, 0xa3, 0x8, 0xd, 0x5b, 0x3a, 0x1b, 0xf1, 0x86, 0xab, 0xd4, 0x29, 0x56, 0x58, 0x8b, 0x3b, 0x58, 0xcd, 0x94, 0x89, 0x70, 0xd2, 0x98, 0x77, 0x60, 0x60}, - output224: []byte{0xf6, 0x11, 0x5f, 0x63, 0x5d, 0x98, 0xb5, 0x72, 0xfd, 0x1b, 0xa8, 0x57, 0x63, 0xec, 0xcf, 0x8b, 0xf2, 0x73, 0xfb, 0xf7, 0xb9, 0x6f, 0xd, 0xb0, 0x12, 0xc, 0xa8, 0xad}, - output256: []byte{0x8f, 0xeb, 0xff, 0x80, 0x17, 0x87, 0xf5, 0x80, 0x3e, 0x15, 0x1d, 0xca, 0x34, 0x34, 0xa5, 0xcd, 0x44, 0xad, 0xb4, 0x9f, 0x1c, 0x2f, 0xfd, 0x5d, 0xc, 0xd0, 0x77, 0xa9, 0x7, 0x5a, 0x49, 0x2d}, - output384: []byte{0x4c, 0xd1, 0x36, 0x71, 0x12, 0xc4, 0xf, 0xb7, 0xe3, 0x91, 0x9d, 0xf2, 0x6, 0x97, 0xa4, 0xe1, 0xcd, 0xc5, 0x5f, 0xd0, 0xf0, 0x1b, 0xe3, 0x95, 0x3b, 0x19, 0x98, 0xb5, 0xfc, 0xb4, 0x73, 0xe7, 0x6e, 0x9e, 0x75, 0xd5, 0xd8, 0x2e, 0x29, 0x73, 0xb3, 0xdb, 0x89, 0x53, 0x85, 0x54, 0x93, 0x3b}, - output512: []byte{0xe5, 0x4, 0xad, 0x7f, 0x33, 0xd6, 0x5b, 0x8d, 0x34, 0x87, 0xb2, 0x88, 0x5, 0xd4, 0x78, 0x77, 0x8c, 0x90, 0x1c, 0xa, 0xff, 0x5f, 0x88, 0x9a, 0xe9, 0x5e, 0x29, 0x19, 0xb4, 0xf4, 0x31, 0xa8, 0x1, 0x16, 0xa8, 0x99, 0x34, 0x69, 0xe8, 0x22, 0x89, 0x5f, 0x3c, 0x21, 0xa4, 0x1d, 0x67, 0xaf, 0xda, 0x93, 0xa5, 0xb2, 0x9b, 0x62, 0x50, 0xf7, 0x63, 0x35, 0xa7, 0x6f, 0xe8, 0x91, 0x92, 0x74}}, - testcase{ - msg: []byte{0x6, 0xcb, 0xbe, 0x67, 0xe9, 0x4a, 0x97, 0x82, 0x3, 0xea, 0xd6, 0xc0, 0x57, 0xa1, 0xa5, 0xb0, 0x98, 0x47, 0x8b, 0x4b, 0x4c, 0xbe, 0xf5, 0xa9, 0x7e, 0x93, 0xc8, 0xe4, 0x2f, 0x55, 0x72, 0x71, 0x35, 0x75, 0xfc, 0x2a, 0x88, 0x45, 0x31, 0xd7, 0x62, 0x2f, 0x8f, 0x87, 0x93, 0x87, 0xa8, 0x59, 0xa8, 0xf, 0x10, 0xef, 0x2, 0x70, 0x8c, 0xd8, 0xf7, 0x41, 0x3a, 0xb3, 0x85, 0xaf, 0xc3, 0x57, 0x67, 0x8b, 0x95, 0x78, 0xc0, 0xeb, 0xf6, 0x41, 0xef, 0x7, 0x6a, 0x1a, 0x30, 0xf1, 0xf7, 0x53, 0x79, 0xe9, 0xdc, 0xb2, 0xa8, 0x85, 0xbd, 0xd2, 0x95, 0x90, 0x5e, 0xe8, 0xc, 0x1, 0x68, 0xa6, 0x2a, 0x95, 0x97, 0xd1, 0xc, 0xf1, 0x2d, 0xd2, 0xd8, 0xce, 0xe4, 0x66, 0x45, 0xc7, 0xe5, 0xa1, 0x41, 0xf6, 0xe0, 0xe2, 0x3a, 0xa4, 0x82, 0xab, 0xe5, 0x66, 0x1c, 0x16, 0xe6, 0x9e, 0xf1, 0xe2, 0x83, 0x71, 0xe2, 0xe2, 0x36, 0xc3, 0x59, 0xba, 0x4e, 0x92, 0xc2, 0x56, 0x26, 0xa7, 0xb7, 0xff, 0x13, 0xf6, 0xea, 0x4a, 0xe9, 0x6, 0xe1, 0xcf, 0xe1, 0x63, 0xe9, 0x17, 0x19, 0xb1, 0xf7, 0x50, 0xa9, 0x6c, 0xbd, 0xe5, 0xfb, 0xc9, 0x53, 0xd9, 0xe5, 0x76, 0xcd, 0x21, 0x6a, 0xfc, 0x90, 0x32, 0x3a}, - output224: []byte{0x5e, 0xe7, 0x3a, 0x4f, 0x13, 0xa0, 0x8a, 0x2d, 0x9b, 0x1e, 0x52, 0xdf, 0x88, 0x97, 0x2f, 0xfb, 0x9f, 0x3, 0xb8, 0x43, 0xa3, 0x87, 0xee, 0x52, 0xb0, 0xe, 0xdc, 0xee}, - output256: []byte{0xea, 0x75, 0x11, 0xb9, 0x93, 0xb7, 0x86, 0xdf, 0x59, 0xa3, 0xb3, 0xe0, 0xb3, 0xcd, 0x87, 0x6c, 0xf, 0x5, 0x6d, 0x6c, 0xa4, 0x3c, 0xc8, 0x9c, 0x51, 0xc1, 0xb2, 0x1c, 0xcd, 0xc7, 0x9b, 0x42}, - output384: []byte{0x87, 0x8a, 0xd5, 0x2f, 0xa0, 0x9f, 0xd4, 0xb6, 0x46, 0x50, 0x83, 0xc9, 0xc9, 0xe6, 0xa2, 0xdd, 0xb8, 0x13, 0x2, 0xe2, 0xdb, 0xc, 0xaa, 0x93, 0x4d, 0x3, 0xa1, 0x96, 0x97, 0x2a, 0xdd, 0xd4, 0xbb, 0x8f, 0xf8, 0x69, 0xbf, 0x0, 0x69, 0xe9, 0x70, 0xd6, 0xba, 0xeb, 0x5b, 0xba, 0x9b, 0x79}, - output512: []byte{0x1d, 0xca, 0x53, 0xbe, 0xa, 0x34, 0x11, 0x44, 0x47, 0xd1, 0xc1, 0x44, 0x3b, 0x92, 0xb6, 0x9d, 0xfd, 0xed, 0x70, 0x59, 0x56, 0xea, 0xe6, 0xb, 0xba, 0xb3, 0x91, 0x78, 0xcc, 0xb1, 0x1f, 0x52, 0x6a, 0x30, 0x2a, 0xae, 0x83, 0x72, 0x6, 0x52, 0xef, 0x4c, 0x5d, 0xd4, 0x50, 0xa3, 0x64, 0x7d, 0xf7, 0xb7, 0x7c, 0x46, 0x64, 0x71, 0x7d, 0x93, 0x5b, 0x4f, 0x5b, 0x20, 0xf2, 0x6, 0xfe, 0xfe}}, - testcase{ - msg: []byte{0xf1, 0xc5, 0x28, 0xcf, 0x77, 0x39, 0x87, 0x47, 0x7, 0xd4, 0xd8, 0xad, 0x5b, 0x98, 0xf7, 0xc7, 0x71, 0x69, 0xde, 0xb, 0x57, 0x18, 0x8d, 0xf2, 0x33, 0xb2, 0xdc, 0x8a, 0x5b, 0x31, 0xed, 0xa5, 0xdb, 0x42, 0x91, 0xdd, 0x9f, 0x68, 0xe6, 0xba, 0xd3, 0x7b, 0x8d, 0x7f, 0x6c, 0x9c, 0x0, 0x44, 0xb3, 0xbf, 0x74, 0xbb, 0xc3, 0xd7, 0xd1, 0x79, 0x8e, 0x13, 0x87, 0x9, 0xb0, 0xd7, 0x5e, 0x7c, 0x59, 0x3d, 0x3c, 0xcc, 0xdc, 0x1b, 0x20, 0xc7, 0x17, 0x4b, 0x4e, 0x69, 0x2a, 0xdd, 0x82, 0xa, 0xce, 0x26, 0x2d, 0x45, 0xcc, 0xfa, 0xe2, 0x7, 0x7e, 0x87, 0x87, 0x96, 0x34, 0x71, 0x68, 0x6, 0xa, 0x16, 0x2e, 0xcc, 0xa8, 0xc3, 0x8c, 0x1a, 0x88, 0x35, 0xb, 0xd6, 0x3b, 0xb5, 0x39, 0x13, 0x4f, 0x70, 0xf, 0xd4, 0xad, 0xdd, 0x59, 0x59, 0xe2, 0x55, 0x33, 0x7d, 0xaa, 0x6, 0xbc, 0x86, 0x35, 0x8f, 0xab, 0xcb, 0xef, 0xdf, 0xb5, 0xbc, 0x88, 0x97, 0x83, 0xd8, 0x43, 0xc0, 0x8a, 0xad, 0xc6, 0xc4, 0xf6, 0xc3, 0x6f, 0x65, 0xf1, 0x56, 0xe8, 0x51, 0xc9, 0xa0, 0xf9, 0x17, 0xe4, 0xa3, 0x67, 0xb5, 0xad, 0x93, 0xd8, 0x74, 0x81, 0x2a, 0x1d, 0xe6, 0xa7, 0xb9, 0x3c, 0xd5, 0x3a, 0xd9, 0x72, 0x32}, - output224: []byte{0x44, 0xbc, 0x64, 0x55, 0x9b, 0xdb, 0x91, 0xb, 0x70, 0x79, 0xe0, 0x26, 0x1f, 0xf8, 0xb4, 0x9d, 0xba, 0x14, 0x1b, 0x32, 0xec, 0xbc, 0xb7, 0xb, 0x3a, 0xbd, 0xfb, 0xf9}, - output256: []byte{0xba, 0xae, 0xcb, 0x6e, 0x9d, 0xb5, 0x79, 0x71, 0xd5, 0xc7, 0xf, 0x58, 0x19, 0xff, 0x89, 0xc5, 0x9, 0x32, 0x54, 0xde, 0x19, 0xef, 0x60, 0x59, 0xc4, 0x3c, 0xc0, 0xaf, 0xda, 0x7c, 0x5d, 0x34}, - output384: []byte{0x60, 0x7, 0x1a, 0x7e, 0x2e, 0xcf, 0xaf, 0x3b, 0x5b, 0x2e, 0x84, 0xa6, 0x77, 0xfb, 0x98, 0xe4, 0x4b, 0xd3, 0x72, 0x5a, 0xdd, 0xee, 0xc5, 0xc3, 0x7e, 0xc6, 0x20, 0x52, 0xd5, 0x7a, 0xf7, 0xb6, 0x87, 0xa0, 0x63, 0xfd, 0x39, 0xc8, 0xf6, 0xe8, 0x6f, 0x79, 0xd9, 0x7f, 0x24, 0x6c, 0x75, 0x7b}, - output512: []byte{0xcb, 0x1b, 0x3, 0xb1, 0x80, 0xe0, 0x40, 0x21, 0xe0, 0x9, 0x90, 0x50, 0xeb, 0x6b, 0x7e, 0xb9, 0x9, 0x2c, 0x5b, 0xd5, 0xc4, 0x45, 0xe9, 0xd3, 0x1e, 0xe3, 0x9c, 0x72, 0x4f, 0x3, 0x8e, 0x9f, 0x61, 0x9a, 0x96, 0xd3, 0xa2, 0x81, 0x2c, 0xa7, 0xf2, 0x8, 0xfe, 0xb2, 0xd0, 0x74, 0xc3, 0xf8, 0x17, 0x26, 0x2f, 0x75, 0x4, 0x70, 0x56, 0x23, 0xe6, 0x35, 0xb9, 0xf2, 0x73, 0xe3, 0x7a, 0x59}}, - testcase{ - msg: []byte{0x9d, 0x9f, 0x3a, 0x7e, 0xcd, 0x51, 0xb4, 0x1f, 0x65, 0x72, 0xfd, 0xd, 0x8, 0x81, 0xe3, 0x3, 0x90, 0xdf, 0xb7, 0x80, 0x99, 0x1d, 0xae, 0x7d, 0xb3, 0xb4, 0x76, 0x19, 0x13, 0x47, 0x18, 0xe6, 0xf9, 0x87, 0x81, 0xe, 0x54, 0x26, 0x19, 0xdf, 0xaa, 0x7b, 0x50, 0x5c, 0x76, 0xb7, 0x35, 0xc, 0x64, 0x32, 0xd8, 0xbf, 0x1c, 0xfe, 0xbd, 0xf1, 0x6, 0x9b, 0x90, 0xa3, 0x5f, 0xd, 0x4, 0xcb, 0xdf, 0x13, 0xb, 0xd, 0xfc, 0x78, 0x75, 0xf4, 0xa4, 0xe6, 0x2c, 0xdb, 0x8e, 0x52, 0x5a, 0xad, 0xd7, 0xce, 0x84, 0x25, 0x20, 0xa4, 0x82, 0xac, 0x18, 0xf0, 0x94, 0x42, 0xd7, 0x83, 0x5, 0xfe, 0x85, 0xa7, 0x4e, 0x39, 0xe7, 0x60, 0xa4, 0x83, 0x74, 0x82, 0xed, 0x2f, 0x43, 0x7d, 0xd1, 0x3b, 0x2e, 0xc1, 0x4, 0x2a, 0xfc, 0xf9, 0xde, 0xcd, 0xc3, 0xe8, 0x77, 0xe5, 0xf, 0xf4, 0x10, 0x6a, 0xd1, 0xa, 0x52, 0x52, 0x30, 0xd1, 0x19, 0x20, 0x32, 0x4a, 0x81, 0x9, 0x4d, 0xa3, 0x1d, 0xea, 0xb6, 0x47, 0x6a, 0xa4, 0x2f, 0x20, 0xc8, 0x48, 0x43, 0xcf, 0xc1, 0xc5, 0x85, 0x45, 0xee, 0x80, 0x35, 0x2b, 0xdd, 0x37, 0x40, 0xdd, 0x6a, 0x16, 0x79, 0x2a, 0xe2, 0xd8, 0x6f, 0x11, 0x64, 0x1b, 0xb7, 0x17, 0xc2}, - output224: []byte{0xde, 0x82, 0xad, 0xde, 0x82, 0x3c, 0x31, 0x2f, 0x83, 0xb3, 0xd4, 0xc0, 0xbd, 0x35, 0xaa, 0x3, 0x95, 0xab, 0x74, 0x7a, 0xbb, 0xc2, 0x2a, 0x70, 0x97, 0x3e, 0x2a, 0x6c}, - output256: []byte{0x56, 0xdb, 0x69, 0x43, 0xb, 0x8c, 0xa8, 0x52, 0x22, 0x1d, 0x55, 0xd7, 0xbb, 0xff, 0x47, 0x7d, 0xc8, 0x3f, 0x7c, 0xb4, 0x4a, 0xb4, 0x4d, 0xdd, 0x64, 0xc3, 0x1a, 0x52, 0xc4, 0x83, 0xdb, 0x4f}, - output384: []byte{0xeb, 0x92, 0x90, 0x23, 0xd6, 0x6a, 0xc2, 0xf, 0x11, 0xbf, 0x68, 0xeb, 0xc4, 0x30, 0x69, 0xd2, 0x7f, 0x35, 0x7, 0x7a, 0x68, 0xd2, 0x1f, 0xab, 0x30, 0x85, 0x4f, 0xfe, 0x53, 0xcb, 0xd7, 0x84, 0xd7, 0xb2, 0x57, 0x76, 0xd9, 0xf2, 0x66, 0xf1, 0x6, 0x43, 0x37, 0x51, 0xe6, 0xc3, 0x8a, 0x68}, - output512: []byte{0xf0, 0x48, 0x2f, 0x9, 0x8b, 0x93, 0x62, 0x4b, 0xcd, 0xe1, 0xaa, 0xb5, 0x80, 0x97, 0x19, 0x86, 0x49, 0xa8, 0xdc, 0x84, 0x42, 0x18, 0x26, 0xd1, 0xc1, 0x1, 0x1a, 0xd4, 0x1b, 0x94, 0x83, 0x84, 0xc8, 0xed, 0x5a, 0x97, 0xc6, 0x4c, 0x13, 0x4b, 0x38, 0xa0, 0x7, 0x58, 0x12, 0xa3, 0x5f, 0x9c, 0xe3, 0xcb, 0x20, 0x9, 0x72, 0xc2, 0xec, 0xdf, 0xc4, 0x8, 0x71, 0x41, 0x39, 0xb9, 0xbf, 0xf0}}, - testcase{ - msg: []byte{0x51, 0x79, 0x88, 0x87, 0x24, 0x81, 0x9f, 0xba, 0xd3, 0xaf, 0xa9, 0x27, 0xd3, 0x57, 0x77, 0x96, 0x66, 0xe, 0x6a, 0x81, 0xc5, 0x2d, 0x98, 0xe9, 0x30, 0x32, 0x61, 0xd5, 0xa4, 0xa8, 0x32, 0x32, 0xf6, 0xf7, 0x58, 0x93, 0x4d, 0x50, 0xaa, 0x83, 0xff, 0x9e, 0x20, 0xa5, 0x92, 0x6d, 0xfe, 0xba, 0xac, 0x49, 0x52, 0x9d, 0x0, 0x6e, 0xb9, 0x23, 0xc5, 0xae, 0x50, 0x48, 0xed, 0x54, 0x4e, 0xc4, 0x71, 0xed, 0x71, 0x91, 0xed, 0xf4, 0x63, 0x63, 0x38, 0x38, 0x24, 0xf9, 0x15, 0x76, 0x9b, 0x3e, 0x68, 0x80, 0x94, 0xc6, 0x82, 0xb0, 0x21, 0x51, 0xe5, 0xee, 0x1, 0xe5, 0x10, 0xb4, 0x31, 0xc8, 0x86, 0x5a, 0xff, 0x8b, 0x6b, 0x6f, 0x2f, 0x59, 0xcb, 0x6d, 0x12, 0x9d, 0xa7, 0x9e, 0x97, 0xc6, 0xd2, 0xb8, 0xfa, 0x6c, 0x6d, 0xa3, 0xf6, 0x3, 0x19, 0x9d, 0x2d, 0x1b, 0xca, 0xb5, 0x47, 0x68, 0x2a, 0x81, 0xcd, 0x6c, 0xf6, 0x5f, 0x65, 0x51, 0x12, 0x13, 0x91, 0xd7, 0x8b, 0xcc, 0x23, 0xb5, 0xbd, 0xe, 0x92, 0x2e, 0xc6, 0xd8, 0xbf, 0x97, 0xc9, 0x52, 0xe8, 0x4d, 0xd2, 0x8a, 0xef, 0x90, 0x9a, 0xba, 0x31, 0xed, 0xb9, 0x3, 0xb2, 0x8f, 0xbf, 0xc3, 0x3b, 0x77, 0x3, 0xcd, 0x99, 0x62, 0x15, 0xa1, 0x12, 0x38}, - output224: []byte{0xb1, 0xba, 0x91, 0xc, 0x9f, 0x5e, 0x12, 0x66, 0x7, 0xff, 0x25, 0x31, 0xaf, 0xfe, 0xcb, 0xa7, 0x91, 0x26, 0x1e, 0x35, 0x4e, 0x2c, 0x1a, 0x81, 0xfd, 0xa7, 0xa7, 0x56}, - output256: []byte{0xf8, 0x53, 0x8f, 0x59, 0x7f, 0x44, 0x63, 0xca, 0xd7, 0xa9, 0x19, 0x5, 0x74, 0x4b, 0x87, 0x15, 0x6d, 0xb3, 0x3c, 0x65, 0xba, 0x87, 0xb9, 0x12, 0x42, 0x7f, 0xec, 0x36, 0x69, 0xf4, 0x25, 0xd4}, - output384: []byte{0x6a, 0x51, 0x97, 0x5c, 0x9f, 0xfe, 0xe8, 0xb9, 0x41, 0x35, 0xa3, 0xbd, 0xa9, 0x54, 0xdf, 0xe1, 0x4e, 0x62, 0x67, 0xdb, 0xc9, 0x25, 0x3f, 0xb, 0xb0, 0x45, 0x15, 0xa6, 0xb7, 0x74, 0x5a, 0xec, 0x61, 0x1b, 0x7b, 0x66, 0xae, 0x57, 0xd3, 0xfd, 0x37, 0x70, 0xae, 0xd4, 0xf4, 0x12, 0xec, 0x84}, - output512: []byte{0xa3, 0x18, 0x84, 0x26, 0xce, 0xa0, 0xc1, 0x8c, 0xb6, 0x38, 0xbc, 0xc4, 0x5c, 0x43, 0x37, 0xc4, 0xb, 0xe4, 0x1f, 0x6e, 0x3, 0xcd, 0x2d, 0x7c, 0x4f, 0xee, 0x26, 0x2, 0x5c, 0x5c, 0xa2, 0x81, 0xcf, 0xbb, 0x3a, 0xd1, 0x55, 0x4d, 0x45, 0xed, 0xc2, 0xeb, 0x3, 0xe2, 0xeb, 0xe3, 0xde, 0x2, 0xf5, 0x7d, 0x36, 0xd5, 0xb6, 0xa8, 0x8a, 0x3c, 0x61, 0xa6, 0xaa, 0xed, 0xe6, 0x21, 0x80, 0xd0}}, - testcase{ - msg: []byte{0x57, 0x6e, 0xf3, 0x52, 0xd, 0x30, 0xb7, 0xa4, 0x89, 0x9b, 0x8c, 0xd, 0x5e, 0x35, 0x9e, 0x45, 0xc5, 0x18, 0x9a, 0xdd, 0x10, 0xe, 0x43, 0xbe, 0x42, 0x9a, 0x2, 0xfb, 0x3d, 0xe5, 0xff, 0x4f, 0x8f, 0xd0, 0xe7, 0x9d, 0x96, 0x63, 0xac, 0xca, 0x72, 0xcd, 0x29, 0xc9, 0x45, 0x82, 0xb1, 0x92, 0x92, 0xa5, 0x57, 0xc5, 0xb1, 0x31, 0x52, 0x97, 0xd1, 0x68, 0xfb, 0xb5, 0x4e, 0x9e, 0x2e, 0xcd, 0x13, 0x80, 0x9c, 0x2b, 0x5f, 0xce, 0x99, 0x8e, 0xdc, 0x65, 0x70, 0x54, 0x5e, 0x14, 0x99, 0xdb, 0xe7, 0xfb, 0x74, 0xd4, 0x7c, 0xd7, 0xf3, 0x58, 0x23, 0xb2, 0x12, 0xb0, 0x5b, 0xf3, 0xf5, 0xa7, 0x9c, 0xaa, 0x34, 0x22, 0x4f, 0xdd, 0x67, 0xd, 0x33, 0x5f, 0xcb, 0x10, 0x6f, 0x5d, 0x92, 0xc3, 0x94, 0x6f, 0x44, 0xd3, 0xaf, 0xcb, 0xae, 0x2e, 0x41, 0xac, 0x55, 0x4d, 0x8e, 0x67, 0x59, 0xf3, 0x32, 0xb7, 0x6b, 0xe8, 0x9a, 0x3, 0x24, 0xaa, 0x12, 0xc5, 0x48, 0x2d, 0x1e, 0xa3, 0xee, 0x89, 0xde, 0xd4, 0x93, 0x6f, 0x3e, 0x3c, 0x8, 0x4, 0x36, 0xf5, 0x39, 0xfa, 0x13, 0x7e, 0x74, 0xc6, 0xd3, 0x38, 0x9b, 0xdf, 0x5a, 0x45, 0x7, 0x4c, 0x47, 0xbc, 0x7b, 0x20, 0xb0, 0x94, 0x84, 0x7, 0xa6, 0x6d, 0x85, 0x5e, 0x2f}, - output224: []byte{0x3e, 0xf8, 0xd4, 0xa6, 0xbb, 0x8e, 0x17, 0x23, 0x74, 0xe8, 0x6, 0xe8, 0xd6, 0x5d, 0x5f, 0x81, 0xb3, 0xfd, 0xb3, 0x62, 0x99, 0xde, 0x1c, 0xc, 0xcc, 0x26, 0xdc, 0x65}, - output256: []byte{0x44, 0x7e, 0xda, 0x92, 0x3c, 0xfe, 0x11, 0x12, 0xa6, 0xf1, 0xa3, 0xe4, 0xc7, 0x35, 0xbf, 0x8e, 0xe9, 0xe4, 0xf2, 0xae, 0xe7, 0xde, 0x66, 0x6a, 0x47, 0x2f, 0xf8, 0xcf, 0xf, 0xc6, 0x53, 0x15}, - output384: []byte{0xd2, 0xdc, 0x49, 0xc0, 0x45, 0x53, 0xf0, 0x9a, 0x8c, 0x3d, 0x7d, 0xb5, 0x1d, 0xe8, 0x90, 0xa7, 0x1d, 0xbc, 0x10, 0xfe, 0x4e, 0x91, 0xc, 0x68, 0xba, 0x5c, 0xa5, 0xdd, 0xb3, 0x13, 0xd0, 0xa6, 0x83, 0x75, 0x27, 0x5c, 0x29, 0x1b, 0x4d, 0xeb, 0x41, 0xf4, 0x5e, 0x35, 0xa5, 0x58, 0xbf, 0x77}, - output512: []byte{0xb, 0x14, 0x69, 0x3e, 0x63, 0x20, 0x66, 0x8d, 0x64, 0xeb, 0xb3, 0xbf, 0x6e, 0xeb, 0x81, 0xaa, 0xfc, 0xdb, 0x73, 0x20, 0xec, 0xde, 0x80, 0xa2, 0x45, 0x78, 0x6d, 0x1b, 0xa, 0x80, 0x8a, 0x15, 0xc7, 0x17, 0xdc, 0x8e, 0x88, 0x13, 0xbf, 0x64, 0xbf, 0x4a, 0xa5, 0x7c, 0x29, 0xc3, 0x3e, 0x91, 0x3d, 0x6c, 0xe1, 0x87, 0x9e, 0x52, 0xe1, 0x91, 0x9f, 0xb8, 0x3e, 0x4a, 0x20, 0x8e, 0xda, 0xa4}}, - testcase{ - msg: []byte{0xd, 0xf2, 0x15, 0x2f, 0xa4, 0xf4, 0x35, 0x7c, 0x87, 0x41, 0x52, 0x9d, 0xd7, 0x7e, 0x78, 0x39, 0x25, 0xd3, 0xd7, 0x6e, 0x95, 0xba, 0xfa, 0x2b, 0x54, 0x2a, 0x2c, 0x33, 0xf3, 0xd1, 0xd1, 0x17, 0xd1, 0x59, 0xcf, 0x47, 0x3f, 0x82, 0x31, 0x3, 0x56, 0xfe, 0xe4, 0xc9, 0xa, 0x9e, 0x50, 0x5e, 0x70, 0xf8, 0xf2, 0x48, 0x59, 0x65, 0x63, 0x68, 0xba, 0x9, 0x38, 0x1f, 0xa2, 0x45, 0xeb, 0x6c, 0x3d, 0x76, 0x3f, 0x30, 0x93, 0xf0, 0xc8, 0x9b, 0x97, 0x2e, 0x66, 0xb5, 0x3d, 0x59, 0x40, 0x6d, 0x9f, 0x1, 0xae, 0xa0, 0x7f, 0x8b, 0x3b, 0x61, 0x5c, 0xac, 0x4e, 0xe4, 0xd0, 0x5f, 0x54, 0x2e, 0x7d, 0xd, 0xab, 0x45, 0xd6, 0x7c, 0xcc, 0xcd, 0x3a, 0x60, 0x6c, 0xcb, 0xeb, 0x31, 0xea, 0x1f, 0xa7, 0x0, 0x5b, 0xa0, 0x71, 0x76, 0xe6, 0xd, 0xab, 0x7d, 0x78, 0xf6, 0x81, 0xe, 0xf0, 0x86, 0xf4, 0x2f, 0x8, 0xe5, 0x95, 0xf0, 0xec, 0x21, 0x73, 0x72, 0xb9, 0x89, 0x70, 0xcc, 0x63, 0x21, 0x57, 0x6d, 0x92, 0xce, 0x38, 0xf7, 0xc3, 0x97, 0xa4, 0x3, 0xba, 0xda, 0x15, 0x48, 0xd2, 0x5, 0xc3, 0x43, 0xac, 0x9, 0xde, 0xca, 0x86, 0x32, 0x53, 0x73, 0xc3, 0xb7, 0x6d, 0x9f, 0x32, 0x2, 0x8f, 0xea, 0x8e, 0xb3, 0x25, 0x15}, - output224: []byte{0x1c, 0x89, 0xd6, 0x46, 0xb, 0x3f, 0x13, 0x58, 0x4b, 0xf8, 0x31, 0x9e, 0xe5, 0x38, 0xf2, 0x4c, 0x85, 0xc, 0xa7, 0x71, 0xa5, 0x1e, 0xcc, 0x54, 0x76, 0x52, 0xba, 0xe3}, - output256: []byte{0x74, 0xd9, 0x4c, 0x13, 0xaf, 0xea, 0x4d, 0xdd, 0x7, 0xa6, 0x37, 0xb6, 0x8b, 0x6f, 0xe0, 0x95, 0x1, 0x7c, 0x9, 0x2b, 0x3c, 0xdc, 0xcd, 0xc4, 0x98, 0xe2, 0x60, 0x35, 0xd8, 0x6d, 0x92, 0x1e}, - output384: []byte{0xaa, 0xb5, 0x74, 0x7d, 0x7d, 0xcc, 0x77, 0xba, 0xcd, 0xe8, 0x1a, 0x58, 0xc3, 0x77, 0x64, 0xf8, 0xf4, 0x1e, 0x8, 0xf2, 0x41, 0x3b, 0x40, 0xd4, 0xe6, 0xc7, 0x92, 0xce, 0xfe, 0x52, 0xe4, 0xe2, 0xa4, 0x6, 0x33, 0x87, 0x52, 0xd7, 0xad, 0x12, 0x69, 0xe7, 0xd5, 0x28, 0x4f, 0xcb, 0x74, 0x0}, - output512: []byte{0xa9, 0xab, 0xc3, 0xf5, 0x54, 0xc1, 0xe7, 0x17, 0x93, 0x5d, 0x28, 0xc2, 0x8e, 0x7c, 0x26, 0xaa, 0x9d, 0xc5, 0xbd, 0x6d, 0x7b, 0x2, 0xed, 0x7d, 0xc6, 0xaf, 0xe2, 0x1a, 0xe, 0xa0, 0x27, 0xa8, 0x80, 0x1a, 0xe0, 0x76, 0xf2, 0x87, 0x2d, 0x8, 0x63, 0x5e, 0xe8, 0x14, 0x20, 0x71, 0x18, 0x62, 0xed, 0xc4, 0xe4, 0x48, 0xc8, 0x55, 0x13, 0x28, 0x94, 0x38, 0xb3, 0xc8, 0xbe, 0x45, 0x6b, 0x5b}}, - testcase{ - msg: []byte{0x3e, 0x15, 0x35, 0xd, 0x87, 0xd6, 0xeb, 0xb5, 0xc8, 0xad, 0x99, 0xd4, 0x25, 0x15, 0xcf, 0xe1, 0x79, 0x80, 0x93, 0x3c, 0x7a, 0x8f, 0x6b, 0x8b, 0xbb, 0xf0, 0xa6, 0x37, 0x28, 0xce, 0xfa, 0xad, 0x20, 0x52, 0x62, 0x3c, 0xb, 0xd5, 0x93, 0x18, 0x39, 0x11, 0x2a, 0x48, 0x63, 0x3f, 0xb3, 0xc2, 0x0, 0x4e, 0x7, 0x49, 0xc8, 0x7a, 0x41, 0xb2, 0x6a, 0x8b, 0x48, 0x94, 0x55, 0x39, 0xd1, 0xff, 0x41, 0xa4, 0xb2, 0x69, 0x46, 0x2f, 0xd1, 0x99, 0xbf, 0xec, 0xd4, 0x53, 0x74, 0x75, 0x6f, 0x55, 0xa9, 0x11, 0x6e, 0x92, 0x9, 0x3a, 0xc9, 0x94, 0x51, 0xae, 0xfb, 0x2a, 0xf9, 0xfd, 0x32, 0xd6, 0xd7, 0xf5, 0xfb, 0xc7, 0xf7, 0xa5, 0x40, 0xd5, 0x9, 0x7c, 0x9, 0x6e, 0xbc, 0x3b, 0x3a, 0x72, 0x15, 0x41, 0xde, 0x7, 0x3a, 0x1c, 0xc0, 0x2f, 0x7f, 0xb0, 0xfb, 0x1b, 0x93, 0x27, 0xfb, 0xb, 0x12, 0x18, 0xca, 0x49, 0xc9, 0x48, 0x7a, 0xb5, 0x39, 0x66, 0x22, 0xa1, 0x3a, 0xe5, 0x46, 0xc9, 0x7a, 0xbd, 0xef, 0x6b, 0x56, 0x38, 0xd, 0xda, 0x70, 0x12, 0xa8, 0x38, 0x40, 0x91, 0xb6, 0x65, 0x6d, 0xa, 0xb2, 0x72, 0xd3, 0x63, 0xce, 0xa7, 0x81, 0x63, 0xff, 0x76, 0x5c, 0xdd, 0x13, 0xab, 0x17, 0x38, 0xb9, 0x40, 0xd1, 0x6c, 0xae}, - output224: []byte{0x99, 0x98, 0x17, 0x66, 0xcf, 0xe3, 0xb1, 0x88, 0x8f, 0x2a, 0x0, 0x8e, 0xfa, 0x10, 0x88, 0x1, 0x6c, 0xb2, 0x99, 0x93, 0x56, 0x7f, 0x9b, 0xb7, 0x4b, 0x5c, 0x4d, 0x3c}, - output256: []byte{0xcc, 0x11, 0x19, 0x6c, 0x9, 0x5b, 0xff, 0xa0, 0x90, 0xa0, 0x5b, 0xa0, 0xbc, 0x25, 0x5d, 0x38, 0xbd, 0xa7, 0x21, 0x8d, 0x93, 0x11, 0x14, 0x3f, 0x4f, 0x20, 0xb, 0x18, 0x52, 0xd1, 0xbb, 0xd}, - output384: []byte{0x72, 0xb5, 0x26, 0xd7, 0x4c, 0xf9, 0x52, 0x1e, 0x0, 0xd9, 0xd6, 0xbc, 0xdf, 0xc1, 0xfb, 0x17, 0x60, 0xc6, 0xac, 0xdf, 0x2d, 0xd7, 0x51, 0x71, 0x30, 0x5d, 0xb4, 0x5d, 0x38, 0x9, 0x8f, 0xf2, 0x3c, 0x5b, 0x8e, 0xd3, 0xc2, 0x1d, 0xa7, 0x3f, 0xfb, 0x8d, 0xf7, 0x21, 0x7c, 0xe4, 0x6d, 0xbb}, - output512: []byte{0x4, 0xdd, 0x83, 0xd2, 0xf, 0x58, 0xe8, 0x54, 0xd8, 0x57, 0xf2, 0x47, 0x20, 0xc5, 0xa, 0x4b, 0x5f, 0x83, 0xdb, 0xc8, 0xca, 0xbd, 0x46, 0xd, 0x37, 0x94, 0x17, 0xcd, 0x48, 0x13, 0x77, 0x2a, 0xa8, 0x55, 0x91, 0xb9, 0x4, 0x62, 0xf3, 0x4d, 0xb3, 0xfa, 0xa4, 0xdc, 0xae, 0x33, 0x5f, 0xb1, 0x25, 0x2b, 0xf4, 0x11, 0x62, 0xe2, 0x49, 0x75, 0xa0, 0xdb, 0xd3, 0x8, 0xc4, 0x1a, 0x4a, 0x6b}}, - testcase{ - msg: []byte{0xc3, 0x8d, 0x6b, 0xb, 0x75, 0x7c, 0xb5, 0x52, 0xbe, 0x40, 0x94, 0xe, 0xce, 0x0, 0x9, 0xef, 0x3b, 0xb, 0x59, 0x30, 0x7c, 0x14, 0x51, 0x68, 0x6f, 0x1a, 0x22, 0x70, 0x29, 0x22, 0x80, 0xd, 0x58, 0xbc, 0xe7, 0xa6, 0x36, 0xc1, 0x72, 0x7e, 0xe5, 0x47, 0xc0, 0x1b, 0x21, 0x47, 0x79, 0xe8, 0x98, 0xfc, 0xe, 0x56, 0xf, 0x8a, 0xe7, 0xf6, 0x1b, 0xef, 0x4d, 0x75, 0xea, 0xa6, 0x96, 0xb9, 0x21, 0xfd, 0x6b, 0x73, 0x5d, 0x17, 0x15, 0x35, 0xe9, 0xed, 0xd2, 0x67, 0xc1, 0x92, 0xb9, 0x98, 0x80, 0xc8, 0x79, 0x97, 0x71, 0x10, 0x2, 0x0, 0x90, 0x95, 0xd8, 0xa7, 0xa4, 0x37, 0xe2, 0x58, 0x10, 0x4a, 0x41, 0xa5, 0x5, 0xe5, 0xef, 0x71, 0xe5, 0x61, 0x3d, 0xdd, 0x20, 0x8, 0x19, 0x5f, 0xc, 0x57, 0x4e, 0x6b, 0xa3, 0xfe, 0x40, 0x9, 0x9c, 0xfa, 0x11, 0x6e, 0x5f, 0x1a, 0x2f, 0xa8, 0xa6, 0xda, 0x4, 0xba, 0xdc, 0xb4, 0xe2, 0xd5, 0xd0, 0xde, 0x31, 0xfd, 0xc4, 0x80, 0x8, 0x91, 0xc4, 0x57, 0x81, 0xa0, 0xaa, 0xc7, 0xc9, 0x7, 0xb5, 0x6d, 0x63, 0x1f, 0xca, 0x5c, 0xe8, 0xb2, 0xcd, 0xe6, 0x20, 0xd1, 0x1d, 0x17, 0x77, 0xed, 0x9f, 0xa6, 0x3, 0x54, 0x1d, 0xe7, 0x94, 0xdd, 0xc5, 0x75, 0x8f, 0xcd, 0x5f, 0xad, 0x78, 0xc0}, - output224: []byte{0x2, 0x15, 0xe9, 0x1e, 0xf9, 0x92, 0xdc, 0xc7, 0xe8, 0x2d, 0x16, 0xa2, 0xc9, 0xb2, 0x79, 0x21, 0xc1, 0x31, 0xc, 0x18, 0x2f, 0x59, 0xdf, 0x8b, 0xed, 0x51, 0x51, 0xe8}, - output256: []byte{0x8c, 0x8, 0x5b, 0x54, 0xc2, 0x13, 0x70, 0x43, 0x74, 0xdd, 0xd9, 0x20, 0xa4, 0x51, 0x68, 0x60, 0x8b, 0xe6, 0x5d, 0xfd, 0x3, 0x6a, 0x56, 0x26, 0x59, 0xf4, 0x71, 0x43, 0x60, 0x41, 0x44, 0xc2}, - output384: []byte{0x80, 0xc, 0xfa, 0x48, 0xb4, 0x64, 0x7f, 0x77, 0x83, 0xbc, 0xd4, 0x1b, 0x2c, 0xf, 0x7f, 0x7d, 0x4d, 0xf, 0xaa, 0x72, 0x48, 0x1a, 0x2a, 0x42, 0xc4, 0xe9, 0xc4, 0x3c, 0x9f, 0x62, 0xe2, 0x7a, 0xcb, 0x4d, 0xdb, 0x73, 0xe3, 0x18, 0x6, 0x1d, 0x39, 0x60, 0x59, 0xaa, 0xde, 0x41, 0x45, 0xe2}, - output512: []byte{0xce, 0x76, 0xb2, 0x5c, 0x92, 0x8c, 0xb7, 0x5c, 0x9, 0xc0, 0x67, 0x4e, 0x8f, 0xcd, 0x22, 0x8, 0x96, 0x54, 0x18, 0x2c, 0xd3, 0xd8, 0x4b, 0x85, 0xcc, 0x44, 0xb1, 0x86, 0xa8, 0xb1, 0xa7, 0xcc, 0x1b, 0xb6, 0x6f, 0x38, 0x9d, 0xa6, 0xd7, 0x44, 0xa2, 0x4a, 0x7b, 0x2, 0xbf, 0x5c, 0x85, 0x54, 0x2d, 0x1b, 0xa8, 0xef, 0xd, 0xb4, 0xa8, 0x6d, 0x2f, 0xc3, 0x94, 0x47, 0x1b, 0x39, 0x65, 0x19}}, - testcase{ - msg: []byte{0x8d, 0x2d, 0xe3, 0xf0, 0xb3, 0x7a, 0x63, 0x85, 0xc9, 0x7, 0x39, 0x80, 0x5b, 0x17, 0x0, 0x57, 0xf0, 0x91, 0xcd, 0xc, 0x7a, 0xb, 0xc9, 0x51, 0x54, 0xf, 0x26, 0xa5, 0xa7, 0x5b, 0x3e, 0x69, 0x46, 0x31, 0xbb, 0x64, 0xc7, 0x63, 0x5e, 0xed, 0x31, 0x6f, 0x51, 0x31, 0x8e, 0x9d, 0x8d, 0xe1, 0x3c, 0x70, 0xa2, 0xab, 0xa0, 0x4a, 0x14, 0x83, 0x68, 0x55, 0xf3, 0x5e, 0x48, 0x5, 0x28, 0xb7, 0x76, 0xd0, 0xa1, 0xe8, 0xa2, 0x3b, 0x54, 0x7c, 0x8b, 0x8d, 0x6a, 0xd, 0x9, 0xb2, 0x41, 0xd3, 0xbe, 0x93, 0x77, 0x16, 0xc, 0xca, 0x4e, 0x67, 0x93, 0xd0, 0xa, 0x51, 0x5d, 0xc2, 0x99, 0x2c, 0xb7, 0xfc, 0x74, 0x1d, 0xac, 0xa1, 0x71, 0x43, 0x1d, 0xa9, 0x9c, 0xce, 0x6f, 0x77, 0x89, 0xf1, 0x29, 0xe2, 0xac, 0x5c, 0xf6, 0x5b, 0x40, 0xd7, 0x3, 0x3, 0x5c, 0xd2, 0x18, 0x5b, 0xb9, 0x36, 0xc8, 0x20, 0x2, 0xda, 0xf8, 0xcb, 0xc2, 0x7a, 0x7a, 0x9e, 0x55, 0x4b, 0x6, 0x19, 0x66, 0x30, 0x44, 0x6a, 0x6f, 0xa, 0x14, 0xba, 0x15, 0x5e, 0xd2, 0x6d, 0x95, 0xbd, 0x62, 0x7b, 0x72, 0x5, 0xc0, 0x72, 0xd0, 0x2b, 0x60, 0xdb, 0xf, 0xd7, 0xe4, 0x9e, 0xa0, 0x58, 0xc2, 0xe0, 0xba, 0x20, 0x2d, 0xaf, 0xf0, 0xde, 0x91, 0xe8, 0x45, 0xcf, 0x79}, - output224: []byte{0xe5, 0x2e, 0xa6, 0x71, 0x4a, 0x39, 0x78, 0x81, 0xd, 0xc1, 0x9e, 0x99, 0x9c, 0x32, 0x51, 0x6d, 0x4a, 0xcf, 0xc, 0xbc, 0xd6, 0x7e, 0x91, 0x7a, 0x4f, 0xeb, 0x56, 0xd0}, - output256: []byte{0xd2, 0xe2, 0x33, 0x26, 0x4a, 0x37, 0x73, 0x49, 0x5f, 0xfd, 0x12, 0x15, 0x9e, 0xf7, 0xb6, 0x31, 0x66, 0xc, 0x1b, 0x3e, 0x53, 0xa3, 0xda, 0xf, 0x24, 0xae, 0x14, 0x46, 0x6f, 0x16, 0x77, 0x57}, - output384: []byte{0xf7, 0x82, 0xff, 0xd, 0xe7, 0xd5, 0x44, 0x2d, 0x56, 0x2c, 0xc5, 0x0, 0x25, 0x6e, 0xe4, 0xb5, 0xa0, 0xe, 0x88, 0x5c, 0x8c, 0xd8, 0x60, 0x9, 0xc5, 0x3f, 0x33, 0x7a, 0xe0, 0x3, 0x85, 0x4d, 0xe4, 0xb8, 0x97, 0x94, 0x28, 0x1a, 0x64, 0x37, 0x5e, 0x3f, 0x69, 0x6a, 0x41, 0x5b, 0x95, 0xd2}, - output512: []byte{0x2, 0xd1, 0x67, 0x19, 0x81, 0xc2, 0xe8, 0x5d, 0x4, 0x55, 0xee, 0x85, 0xf4, 0x1b, 0x8e, 0x9c, 0x32, 0xb1, 0xc8, 0x2, 0x21, 0xdd, 0x43, 0x2b, 0x8b, 0xcb, 0x5f, 0xce, 0xfe, 0x9, 0x96, 0xf3, 0x2f, 0xe9, 0xfc, 0x3e, 0xeb, 0x3f, 0x1f, 0x55, 0x7a, 0xe1, 0x63, 0x27, 0x50, 0xb9, 0x2d, 0x5, 0x23, 0x9a, 0xf8, 0x57, 0xc4, 0x2d, 0x59, 0xa3, 0xda, 0xeb, 0x96, 0x29, 0xe1, 0x15, 0x8b, 0xec}}, - testcase{ - msg: []byte{0xc4, 0x64, 0xbb, 0xda, 0xd2, 0x75, 0xc5, 0xd, 0xcd, 0x98, 0x3b, 0x65, 0xad, 0x10, 0x19, 0xb9, 0xff, 0x85, 0xa1, 0xe7, 0x1c, 0x80, 0x7f, 0x32, 0x4, 0xbb, 0x2c, 0x92, 0x1d, 0xc3, 0x1f, 0xbc, 0xd8, 0xc5, 0xfc, 0x45, 0x86, 0x8a, 0xe9, 0xef, 0x85, 0xb6, 0xc9, 0xb8, 0x3b, 0xba, 0x2a, 0x5a, 0x82, 0x22, 0x1, 0xed, 0x68, 0x58, 0x6e, 0xc5, 0xec, 0x27, 0xfb, 0x28, 0x57, 0xa5, 0xd1, 0xa2, 0xd0, 0x9d, 0x9, 0x11, 0x5f, 0x22, 0xdc, 0xc3, 0x9f, 0xe6, 0x1f, 0x5e, 0x1b, 0xa0, 0xff, 0x6e, 0x8b, 0x4a, 0xcb, 0x4c, 0x6d, 0xa7, 0x48, 0xbe, 0x7f, 0x3f, 0x8, 0x39, 0x73, 0x93, 0x94, 0xff, 0x7f, 0xa8, 0xe3, 0x9f, 0x7f, 0x7e, 0x84, 0xa3, 0x3c, 0x38, 0x66, 0x87, 0x5c, 0x1, 0xbc, 0xb1, 0x26, 0x3c, 0x94, 0x5, 0xd9, 0x19, 0x8, 0xe9, 0xe0, 0xb5, 0xe, 0x74, 0x59, 0xfa, 0xbb, 0x63, 0xd8, 0xc6, 0xbb, 0xb7, 0x3d, 0x8e, 0x34, 0x83, 0xc0, 0x99, 0xb5, 0x5b, 0xc3, 0xf, 0xf0, 0x92, 0xff, 0x68, 0xb6, 0xad, 0xed, 0xfd, 0x47, 0x7d, 0x63, 0x57, 0xc, 0x9f, 0x55, 0x15, 0x84, 0x7f, 0x36, 0xe2, 0x4b, 0xa0, 0xb7, 0x5, 0x55, 0x71, 0x30, 0xce, 0xc5, 0x7e, 0xba, 0xd1, 0xd0, 0xb3, 0x1a, 0x37, 0x8e, 0x91, 0x89, 0x4e, 0xe2, 0x6e, 0x3a, 0x4}, - output224: []byte{0x4c, 0x3d, 0x63, 0x21, 0x13, 0x3e, 0xf7, 0x48, 0x10, 0xe6, 0xd, 0x31, 0x90, 0xff, 0xf3, 0xcf, 0x20, 0xc8, 0x52, 0x1c, 0xae, 0xa6, 0xff, 0x78, 0x2d, 0x7e, 0x3b, 0xab}, - output256: []byte{0xff, 0xac, 0x7c, 0xa5, 0xfa, 0x6, 0x74, 0x19, 0xd1, 0xbd, 0xb0, 0xc, 0xe, 0x49, 0xc6, 0xe1, 0xa7, 0x48, 0x88, 0x9, 0x23, 0xa2, 0x3e, 0xd5, 0xdd, 0x67, 0xdd, 0xe6, 0x3d, 0x77, 0x7e, 0xdb}, - output384: []byte{0xde, 0x34, 0x50, 0x6a, 0xd6, 0x90, 0x85, 0xc6, 0x35, 0x7d, 0x62, 0xb0, 0xb1, 0x27, 0xce, 0x66, 0xe2, 0x5e, 0x8e, 0xc5, 0xfa, 0xca, 0x5b, 0xa8, 0x98, 0xc7, 0x5c, 0xa1, 0x9e, 0x9a, 0xf2, 0x4f, 0x2, 0x40, 0x67, 0x16, 0xc6, 0x1a, 0x71, 0xd6, 0x2b, 0xdc, 0x28, 0xd7, 0x18, 0xc1, 0x25, 0xdf}, - output512: []byte{0x6b, 0x8b, 0xc6, 0x21, 0x1f, 0xe5, 0x0, 0x1e, 0x7, 0xb7, 0xd2, 0xe, 0xc, 0x49, 0xd3, 0x14, 0x21, 0x1e, 0x38, 0x93, 0xa3, 0x9d, 0xa2, 0x41, 0xb8, 0x83, 0x9b, 0xb3, 0xa4, 0x94, 0xf9, 0xa2, 0xfd, 0x85, 0x61, 0x0, 0x9d, 0x22, 0xcc, 0xa1, 0x33, 0xa, 0x69, 0x36, 0x2b, 0x38, 0x6e, 0x71, 0x5f, 0x1d, 0xbe, 0x62, 0x91, 0xdb, 0xee, 0xcf, 0xad, 0xf1, 0x96, 0xda, 0x47, 0xe5, 0x31, 0x98}}, - testcase{ - msg: []byte{0x8b, 0x8d, 0x68, 0xbb, 0x8a, 0x75, 0x73, 0x2f, 0xe2, 0x72, 0x81, 0x5a, 0x68, 0xa1, 0xc9, 0xc5, 0xaa, 0x31, 0xb4, 0x1d, 0xed, 0xc8, 0x49, 0x3e, 0x76, 0x52, 0x5d, 0x1d, 0x1, 0x3d, 0x33, 0xce, 0xbd, 0x9e, 0x21, 0xa5, 0xbb, 0x95, 0xdb, 0x26, 0x16, 0x97, 0x6a, 0x8c, 0x7, 0xfc, 0xf4, 0x11, 0xf5, 0xf6, 0xbc, 0x6f, 0x7e, 0xb, 0x57, 0xac, 0xa7, 0x8c, 0xc2, 0x79, 0xa, 0x6f, 0x9b, 0x89, 0x88, 0x58, 0xac, 0x9c, 0x79, 0xb1, 0x65, 0xff, 0x24, 0xe6, 0x66, 0x77, 0x53, 0x1e, 0x39, 0xf5, 0x72, 0xbe, 0x5d, 0x81, 0xeb, 0x32, 0x64, 0x52, 0x41, 0x81, 0x11, 0x5f, 0x32, 0x78, 0x2, 0x57, 0xbf, 0xb9, 0xae, 0xec, 0x6a, 0xf1, 0x2a, 0xf2, 0x8e, 0x58, 0x7c, 0xac, 0x6, 0x8a, 0x1a, 0x29, 0x53, 0xb5, 0x9a, 0xd6, 0x80, 0xf4, 0xc2, 0x45, 0xb2, 0xe3, 0xec, 0x36, 0xf5, 0x99, 0x40, 0xd3, 0x7e, 0x1d, 0x3d, 0xb3, 0x8e, 0x13, 0xed, 0xb2, 0x9b, 0x5c, 0xf, 0x40, 0x4f, 0x6f, 0xf8, 0x7f, 0x80, 0xfc, 0x8b, 0xe7, 0xa2, 0x25, 0xff, 0x22, 0xfb, 0xb9, 0xc8, 0xb6, 0xb1, 0xd7, 0x33, 0xc, 0x57, 0x84, 0xd, 0x24, 0xbc, 0x75, 0xb0, 0x6b, 0x80, 0xd3, 0xd, 0xad, 0x68, 0x6, 0x54, 0x4d, 0x51, 0xa, 0xf6, 0xc4, 0x78, 0x5e, 0x82, 0x3a, 0xc3, 0xe0, 0xb8}, - output224: []byte{0xb9, 0xf0, 0x6, 0xdb, 0xf8, 0x53, 0xc0, 0x23, 0xde, 0xbe, 0x2f, 0x40, 0x3, 0x5a, 0x7e, 0x83, 0xc4, 0x9c, 0xde, 0x65, 0x6e, 0xc8, 0x6a, 0x46, 0x21, 0x95, 0xf, 0x3e}, - output256: []byte{0x5b, 0x2e, 0xca, 0x9, 0x20, 0xd3, 0x2b, 0x19, 0x64, 0xbb, 0xf5, 0x81, 0xa, 0x6e, 0x6e, 0x53, 0x67, 0x5e, 0xd1, 0xb8, 0x38, 0x97, 0xfd, 0x4, 0x60, 0xd, 0x72, 0xe0, 0x97, 0x84, 0x58, 0x59}, - output384: []byte{0x6f, 0x4f, 0xee, 0xdb, 0xa0, 0xab, 0xb4, 0xdb, 0xf8, 0x24, 0x30, 0x22, 0x50, 0xe6, 0xb6, 0x68, 0xcb, 0xff, 0xdc, 0xa0, 0xb8, 0xc3, 0x38, 0x23, 0x6f, 0xe0, 0x2a, 0x87, 0x79, 0xd8, 0xac, 0xa3, 0x91, 0xd8, 0xd1, 0x16, 0xb2, 0xbc, 0x43, 0xd4, 0xe, 0x73, 0x60, 0x96, 0x47, 0xa, 0xb, 0xc0}, - output512: []byte{0xd0, 0xe, 0x91, 0x9d, 0xaf, 0xff, 0x3d, 0x5e, 0x51, 0xad, 0x3a, 0x30, 0x46, 0xf5, 0xe5, 0x9d, 0x64, 0xb6, 0x9c, 0xbc, 0xda, 0x22, 0x3c, 0xb2, 0x8b, 0xc3, 0x70, 0x20, 0x1d, 0x2c, 0x72, 0x2b, 0xae, 0x74, 0xdf, 0xe0, 0x8, 0x6b, 0xe, 0xb4, 0x7b, 0xdc, 0xb6, 0x2f, 0xab, 0xee, 0x87, 0xc, 0x33, 0x40, 0xd4, 0x6e, 0x55, 0xd8, 0xcf, 0xed, 0xf2, 0xdd, 0x3c, 0xed, 0x8a, 0x8d, 0xb3, 0xf2}}, - testcase{ - msg: []byte{0x6b, 0x1, 0x87, 0x10, 0x44, 0x6f, 0x36, 0x8e, 0x74, 0x21, 0xf1, 0xbc, 0xc, 0xcf, 0x56, 0x2d, 0x9c, 0x18, 0x43, 0x84, 0x6b, 0xc8, 0xd9, 0x8d, 0x1c, 0x9b, 0xf7, 0xd9, 0xd6, 0xfc, 0xb4, 0x8b, 0xfc, 0x3b, 0xf8, 0x3b, 0x36, 0xd4, 0x4c, 0x4f, 0xa9, 0x34, 0x30, 0xaf, 0x75, 0xcd, 0x19, 0xb, 0xde, 0x36, 0xa7, 0xf9, 0x2f, 0x86, 0x7f, 0x58, 0xa8, 0x3, 0x90, 0xd, 0xf8, 0x1, 0x81, 0x50, 0x38, 0x4d, 0x85, 0xd8, 0x21, 0x32, 0xf1, 0x23, 0x0, 0x6a, 0xc2, 0xae, 0xba, 0x58, 0xe0, 0x2a, 0x3, 0x7f, 0xe6, 0xaf, 0xbd, 0x65, 0xec, 0xa7, 0xc4, 0x49, 0x77, 0xdd, 0x3d, 0xc7, 0x4f, 0x48, 0xb6, 0xe7, 0xa1, 0xbf, 0xd5, 0xcc, 0x4d, 0xcf, 0x24, 0xe4, 0xd5, 0x2e, 0x92, 0xbd, 0x44, 0x55, 0x84, 0x8e, 0x49, 0x28, 0xb0, 0xea, 0xc8, 0xb7, 0x47, 0x6f, 0xe3, 0xcc, 0x3, 0xe8, 0x62, 0xaa, 0x4d, 0xff, 0x44, 0x70, 0xdb, 0xfe, 0xd6, 0xde, 0x48, 0xe4, 0x10, 0xf2, 0x50, 0x96, 0x48, 0x7e, 0xcf, 0xc3, 0x2a, 0x27, 0x27, 0x7f, 0x3f, 0x50, 0x23, 0xb2, 0x72, 0x5a, 0xde, 0x46, 0x1b, 0x13, 0x55, 0x88, 0x95, 0x54, 0xa8, 0x83, 0x6c, 0x9c, 0xf5, 0x3b, 0xd7, 0x67, 0xf5, 0x73, 0x7d, 0x55, 0x18, 0x4e, 0xea, 0x1a, 0xb3, 0xf5, 0x3e, 0xdd, 0x9, 0x76, 0xc4, 0x85}, - output224: []byte{0xa, 0x5a, 0xa6, 0xbc, 0x56, 0x4b, 0x8c, 0xb2, 0xf5, 0xfd, 0x72, 0x55, 0x45, 0x5c, 0xe, 0x7a, 0x5d, 0xac, 0xe0, 0x5, 0xc, 0x3b, 0xbd, 0x25, 0x9f, 0xde, 0x2a, 0xb9}, - output256: []byte{0x68, 0xf4, 0x1f, 0xdf, 0xc7, 0x21, 0x7e, 0x89, 0x68, 0x7e, 0xd1, 0x18, 0xbc, 0x31, 0xac, 0x6e, 0xd2, 0xd9, 0xd1, 0xe1, 0xa2, 0xf1, 0xb2, 0xa, 0x2d, 0x42, 0x97, 0x29, 0xfa, 0x3, 0x51, 0x7b}, - output384: []byte{0xa0, 0x40, 0xce, 0x1c, 0xbb, 0x99, 0x67, 0x23, 0xcb, 0xcd, 0xbd, 0xff, 0x7a, 0x6a, 0x5f, 0x69, 0x28, 0x97, 0x37, 0x60, 0x95, 0x34, 0xc5, 0xaf, 0x36, 0xf6, 0xc4, 0x20, 0xa6, 0xad, 0xfd, 0x57, 0x7, 0x94, 0x7, 0x95, 0x9, 0xd0, 0x7e, 0x62, 0x56, 0x6c, 0x58, 0x6, 0x2d, 0x81, 0x86, 0xdb}, - output512: []byte{0xcf, 0x63, 0xf2, 0x8f, 0x10, 0x7a, 0x50, 0x9a, 0x41, 0x6f, 0x9a, 0x92, 0xc4, 0xe4, 0xdb, 0x4d, 0xbf, 0x0, 0xfb, 0x52, 0xc2, 0xe1, 0x6d, 0x8b, 0xb9, 0x69, 0x4e, 0x9, 0xf9, 0x14, 0x2a, 0x90, 0x4c, 0x34, 0xe1, 0xe9, 0x60, 0xbd, 0x97, 0xb8, 0xcf, 0xb2, 0xc5, 0x3e, 0x76, 0x60, 0xc7, 0x9b, 0x84, 0x1d, 0x15, 0x65, 0xcd, 0xab, 0x83, 0x29, 0x32, 0x34, 0x2, 0x6a, 0x23, 0xa5, 0x6d, 0x12}}, - testcase{ - msg: []byte{0xc9, 0x53, 0x4a, 0x24, 0x71, 0x4b, 0xd4, 0xbe, 0x37, 0xc8, 0x8a, 0x3d, 0xa1, 0x8, 0x2e, 0xda, 0x7c, 0xab, 0xd1, 0x54, 0xc3, 0x9, 0xd7, 0xbd, 0x67, 0xd, 0xcc, 0xd9, 0x5a, 0xa5, 0x35, 0x59, 0x44, 0x63, 0x5, 0x8a, 0x29, 0xf7, 0x90, 0x31, 0xd6, 0xec, 0xaa, 0x9f, 0x67, 0x5d, 0x12, 0x11, 0xe9, 0x35, 0x9b, 0xe8, 0x26, 0x69, 0xa7, 0x9c, 0x85, 0x5e, 0xa8, 0xd8, 0x9d, 0xd3, 0x8c, 0x2c, 0x76, 0x1d, 0xdd, 0xe, 0xc0, 0xce, 0x9e, 0x97, 0x59, 0x74, 0x32, 0xe9, 0xa1, 0xbe, 0xae, 0x6, 0x2c, 0xdd, 0x71, 0xed, 0xfd, 0xfd, 0x46, 0x41, 0x19, 0xbe, 0x9e, 0x69, 0xd1, 0x8a, 0x7a, 0x7f, 0xd7, 0xce, 0xe, 0x21, 0x6, 0xf0, 0xc8, 0xb0, 0xab, 0xf4, 0x71, 0x5e, 0x2c, 0xa4, 0x8e, 0xf9, 0xf4, 0x54, 0xdc, 0x20, 0x3c, 0x96, 0x65, 0x66, 0x53, 0xb7, 0x27, 0x8, 0x35, 0x13, 0xf8, 0xef, 0xb8, 0x6e, 0x49, 0xc5, 0x13, 0xbb, 0x75, 0x8b, 0x3b, 0x5, 0x2f, 0xe2, 0x1f, 0x1c, 0x5, 0xbb, 0x33, 0xc3, 0x71, 0x29, 0xd6, 0xcc, 0x81, 0xf1, 0xae, 0xf6, 0xad, 0xc4, 0x5b, 0xe, 0x88, 0x27, 0xa8, 0x30, 0xfe, 0x54, 0x5c, 0xf5, 0x7d, 0x9, 0x55, 0x80, 0x2c, 0x11, 0x7d, 0x23, 0xcc, 0xb5, 0x5e, 0xa2, 0x8f, 0x95, 0xc0, 0xd8, 0xc2, 0xf9, 0xc5, 0xa2, 0x42, 0xb3, 0x3f}, - output224: []byte{0x8c, 0xa4, 0xe0, 0x85, 0xf0, 0x49, 0x56, 0xb5, 0xb1, 0x65, 0x20, 0xe3, 0xa7, 0x67, 0xf8, 0xba, 0x93, 0x73, 0x64, 0xfe, 0x5f, 0x44, 0x60, 0x28, 0x8a, 0xd4, 0xf2, 0x31}, - output256: []byte{0xfa, 0x2f, 0x3d, 0xe3, 0x1e, 0x9c, 0xf2, 0x5a, 0xb9, 0xa9, 0x78, 0xc8, 0x2d, 0x60, 0x5a, 0x43, 0xee, 0x39, 0xb6, 0x8a, 0xc8, 0xe3, 0xf, 0x49, 0xf9, 0xd2, 0x9, 0xcb, 0x4e, 0x17, 0x2a, 0xb4}, - output384: []byte{0xff, 0x13, 0xc2, 0x9c, 0x5e, 0xd, 0x74, 0x6c, 0xa2, 0x7a, 0xee, 0x38, 0xb6, 0xb4, 0x9a, 0x13, 0xc1, 0xb3, 0xd7, 0xe, 0x62, 0x87, 0x54, 0x43, 0xbc, 0xfc, 0x22, 0xa2, 0x2e, 0x75, 0x3, 0x1e, 0x60, 0xd6, 0x8a, 0x91, 0x7e, 0x3a, 0xe1, 0xd4, 0x2d, 0x37, 0x4d, 0x44, 0xcd, 0xc9, 0xf4, 0xc8}, - output512: []byte{0xf2, 0x1b, 0x8d, 0x45, 0xb6, 0xa8, 0x57, 0xce, 0x66, 0x3c, 0x7, 0x4c, 0x18, 0xcc, 0x54, 0xd9, 0x14, 0xcd, 0xd5, 0xeb, 0xd, 0x96, 0x8e, 0x61, 0x53, 0xa5, 0xf7, 0x0, 0x69, 0x34, 0x5d, 0x20, 0x5d, 0xdf, 0x43, 0x70, 0xec, 0x47, 0x3f, 0xc8, 0xb, 0x5, 0xf9, 0x37, 0xd0, 0x14, 0xc0, 0xa4, 0x64, 0x58, 0x2c, 0xb4, 0xa7, 0x3b, 0x1b, 0x72, 0x4, 0x1c, 0x5c, 0x99, 0xf5, 0x76, 0xa4, 0x1e}}, - testcase{ - msg: []byte{0x7, 0x90, 0x6c, 0x87, 0x29, 0x7b, 0x86, 0x7a, 0xbf, 0x45, 0x76, 0xe9, 0xf3, 0xcc, 0x7f, 0x82, 0xf2, 0x2b, 0x15, 0x4a, 0xfc, 0xbf, 0x29, 0x3b, 0x93, 0x19, 0xf1, 0xb0, 0x58, 0x4d, 0xa6, 0xa4, 0xc, 0x27, 0xb3, 0x2e, 0xb, 0x1b, 0x7f, 0x41, 0x2c, 0x4f, 0x1b, 0x82, 0x48, 0xe, 0x70, 0xa9, 0x23, 0x5b, 0x12, 0xec, 0x27, 0x9, 0xa, 0x5a, 0x33, 0x17, 0x5a, 0x2b, 0xb2, 0x8d, 0x8a, 0xdc, 0x47, 0x5c, 0xef, 0xe3, 0x3f, 0x78, 0x3, 0xf8, 0xce, 0x27, 0x96, 0x72, 0x17, 0x38, 0x1f, 0x2, 0xe6, 0x7a, 0x3b, 0x4f, 0x84, 0xa7, 0x1f, 0x1c, 0x52, 0x28, 0xe0, 0xc2, 0xad, 0x97, 0x13, 0x73, 0xf6, 0xf6, 0x72, 0x62, 0x4f, 0xce, 0xa8, 0xd1, 0xa9, 0xf8, 0x51, 0x70, 0xfa, 0xd3, 0xf, 0xa0, 0xbb, 0xd2, 0x50, 0x35, 0xc3, 0xb4, 0x1a, 0x61, 0x75, 0xd4, 0x67, 0x99, 0x8b, 0xd1, 0x21, 0x5f, 0x6f, 0x38, 0x66, 0xf5, 0x38, 0x47, 0xf9, 0xcf, 0x68, 0xef, 0x3e, 0x2f, 0xbb, 0x54, 0xbc, 0x99, 0x4d, 0xe2, 0x30, 0x2b, 0x82, 0x9c, 0x5e, 0xea, 0x68, 0xec, 0x44, 0x1f, 0xcb, 0xaf, 0xd7, 0xd1, 0x6a, 0xe4, 0xfe, 0x9f, 0xff, 0x98, 0xbf, 0x0, 0xe5, 0xbc, 0x2a, 0xd5, 0x4d, 0xd9, 0x1f, 0xf9, 0xfd, 0xa4, 0xdd, 0x77, 0xb6, 0xc7, 0x54, 0xa9, 0x19, 0x55, 0xd1, 0xfb, 0xaa, 0xd0}, - output224: []byte{0xc0, 0xaa, 0x34, 0x39, 0x1c, 0xb3, 0x10, 0x4c, 0x41, 0x99, 0x5f, 0x3d, 0xe7, 0x82, 0xf0, 0x12, 0xd4, 0x21, 0x58, 0x5e, 0x53, 0x84, 0xe0, 0x47, 0xa9, 0x97, 0x6, 0x2f}, - output256: []byte{0xba, 0x2a, 0xf5, 0x6, 0xc1, 0xd, 0xa8, 0xd7, 0x75, 0x1e, 0x67, 0xed, 0x76, 0x6c, 0xfc, 0xd4, 0x7d, 0x4, 0x8d, 0x6e, 0xf9, 0x27, 0x7d, 0xbd, 0x2a, 0xbf, 0xe2, 0xfd, 0x5d, 0x78, 0x7b, 0x79}, - output384: []byte{0x3a, 0x44, 0x18, 0xa1, 0x68, 0x96, 0xad, 0xab, 0x7c, 0x6d, 0xc7, 0x83, 0xa0, 0xfc, 0x9f, 0x8d, 0x7e, 0x94, 0x99, 0x37, 0xbe, 0x1d, 0x68, 0xb5, 0xef, 0x2, 0x57, 0x4b, 0x2b, 0xc, 0x9b, 0xa9, 0x2, 0xfb, 0x9c, 0x15, 0xed, 0x64, 0xfc, 0x82, 0x5d, 0x59, 0x8a, 0xaf, 0xc1, 0xb2, 0x63, 0x47}, - output512: []byte{0x92, 0x28, 0x7f, 0x42, 0xab, 0x1a, 0x21, 0x23, 0x66, 0x9c, 0x4d, 0x35, 0xf1, 0x82, 0x57, 0xd3, 0xa5, 0x36, 0x44, 0x5f, 0xe, 0x4d, 0x2c, 0x80, 0x1e, 0x99, 0xf8, 0x52, 0x9c, 0xd9, 0xe2, 0xa7, 0x92, 0x5, 0x98, 0x2c, 0x28, 0xc, 0x7a, 0x6c, 0xdd, 0xde, 0xf2, 0x4c, 0xe9, 0x60, 0xec, 0x6c, 0xa9, 0xa3, 0x5f, 0x59, 0xa, 0xee, 0xbc, 0x40, 0x44, 0x8c, 0x38, 0x9e, 0x91, 0x5f, 0xc4, 0xe0}}, - testcase{ - msg: []byte{0x58, 0x8e, 0x94, 0xb9, 0x5, 0x4a, 0xbc, 0x21, 0x89, 0xdf, 0x69, 0xb8, 0xba, 0x34, 0x34, 0x1b, 0x77, 0xcd, 0xd5, 0x28, 0xe7, 0x86, 0xe, 0x5d, 0xef, 0xca, 0xa7, 0x9b, 0xc, 0x9a, 0x45, 0x2a, 0xd4, 0xb8, 0x2a, 0xa3, 0x6, 0xbe, 0x84, 0x53, 0x6e, 0xb7, 0xce, 0xdc, 0xbe, 0x5, 0x8d, 0x7b, 0x84, 0xa6, 0xae, 0xf8, 0x26, 0xb0, 0x28, 0xb8, 0xa0, 0x27, 0x1b, 0x69, 0xac, 0x36, 0x5, 0xa9, 0x63, 0x5e, 0xa9, 0xf5, 0xea, 0xa, 0xa7, 0x0, 0xf3, 0xeb, 0x78, 0x35, 0xbc, 0x54, 0x61, 0x1b, 0x92, 0x29, 0x64, 0x30, 0xc, 0x95, 0x3e, 0xfe, 0x74, 0x91, 0xe3, 0x67, 0x7c, 0x2c, 0xeb, 0xe0, 0x82, 0x2e, 0x95, 0x6c, 0xd1, 0x64, 0x33, 0xb0, 0x2c, 0x68, 0xc4, 0xa2, 0x32, 0x52, 0xc3, 0xf9, 0xe1, 0x51, 0xa4, 0x16, 0xb4, 0x96, 0x32, 0x57, 0xb7, 0x83, 0xe0, 0x38, 0xf6, 0xb4, 0xd5, 0xc9, 0xf1, 0x10, 0xf8, 0x71, 0x65, 0x2c, 0x7a, 0x64, 0x9a, 0x7b, 0xce, 0xdc, 0xbc, 0xcc, 0x6f, 0x2d, 0x7, 0x25, 0xbb, 0x90, 0x3c, 0xc1, 0x96, 0xba, 0x76, 0xc7, 0x6a, 0xa9, 0xf1, 0xa, 0x19, 0xb, 0x1d, 0x11, 0x68, 0x99, 0x3b, 0xaa, 0x9f, 0xfc, 0x96, 0xa1, 0x65, 0x52, 0x16, 0x77, 0x34, 0x58, 0xbe, 0xc7, 0x2b, 0xe, 0x39, 0xc9, 0xf2, 0xc1, 0x21, 0x37, 0x8f, 0xea, 0xb4, 0xe7, 0x6a}, - output224: []byte{0x33, 0xc1, 0x0, 0x10, 0xa0, 0xb8, 0x10, 0x38, 0x6a, 0xe6, 0x2f, 0x3f, 0x92, 0x7d, 0xea, 0xfc, 0xd, 0x5a, 0xf0, 0xaf, 0x3d, 0xc7, 0xa8, 0x35, 0x5c, 0xb7, 0x79, 0xcd}, - output256: []byte{0x3c, 0xd3, 0x3f, 0x88, 0x11, 0xaf, 0x12, 0x18, 0x3c, 0x53, 0xe9, 0x78, 0x52, 0x8f, 0x53, 0xae, 0x7d, 0x55, 0x94, 0x32, 0x72, 0x40, 0x29, 0xe5, 0x5f, 0xcf, 0xa9, 0xb9, 0x90, 0xb9, 0x17, 0x13}, - output384: []byte{0x17, 0xf8, 0x44, 0x11, 0xe6, 0xf, 0x6b, 0xd8, 0x56, 0xd0, 0x9c, 0xa, 0xcf, 0x31, 0x4e, 0x75, 0x46, 0x46, 0x6a, 0xb0, 0xc1, 0x61, 0x62, 0x84, 0xd2, 0x24, 0xd, 0x22, 0xbc, 0xcc, 0x72, 0x40, 0xe5, 0xa2, 0xd6, 0x56, 0xd3, 0x52, 0x57, 0xab, 0x49, 0x78, 0x1b, 0xda, 0xbe, 0xf6, 0xfc, 0xf9}, - output512: []byte{0x74, 0xa9, 0xd8, 0xf9, 0xf7, 0x29, 0x8, 0xc7, 0x50, 0x2d, 0x1c, 0x41, 0x21, 0x2c, 0xd8, 0x6c, 0xf4, 0x34, 0x47, 0x21, 0xa6, 0xf0, 0x2d, 0x39, 0x3, 0x46, 0xf2, 0xba, 0xec, 0x6e, 0x61, 0x37, 0x42, 0x1e, 0x65, 0x16, 0xc3, 0x23, 0x54, 0x43, 0xbc, 0x23, 0x37, 0xb3, 0xa7, 0x76, 0x30, 0x71, 0x2a, 0x12, 0xf1, 0x1b, 0x7b, 0xa2, 0x4b, 0x2d, 0x70, 0x85, 0x49, 0x9b, 0xa7, 0x4b, 0xcb, 0x90}}, - testcase{ - msg: []byte{0x8, 0x95, 0x9a, 0x7e, 0x4b, 0xaa, 0xe8, 0x74, 0x92, 0x88, 0x13, 0x36, 0x40, 0x71, 0x19, 0x4e, 0x29, 0x39, 0x77, 0x2f, 0x20, 0xdb, 0x7c, 0x31, 0x57, 0x7, 0x89, 0x87, 0xc5, 0x57, 0xc2, 0xa6, 0xd5, 0xab, 0xe6, 0x8d, 0x52, 0xe, 0xef, 0x3d, 0xc4, 0x91, 0x69, 0x2e, 0x1e, 0x21, 0xbc, 0xd8, 0x80, 0xad, 0xeb, 0xf6, 0x3b, 0xb4, 0x21, 0x3b, 0x50, 0x89, 0x7f, 0xa0, 0x5, 0x25, 0x6e, 0xd4, 0x1b, 0x56, 0x90, 0xf7, 0x8f, 0x52, 0x85, 0x5c, 0x8d, 0x91, 0x68, 0xa4, 0xb6, 0x66, 0xfc, 0xe2, 0xda, 0x2b, 0x45, 0x6d, 0x7a, 0x7e, 0x7c, 0x17, 0xab, 0x5f, 0x2f, 0xb1, 0xee, 0x90, 0xb7, 0x9e, 0x69, 0x87, 0x12, 0xe9, 0x63, 0x71, 0x59, 0x83, 0xfd, 0x7, 0x64, 0x1a, 0xe4, 0xb4, 0xe9, 0xdc, 0x73, 0x20, 0x3f, 0xac, 0x1a, 0xe1, 0x1f, 0xa1, 0xf8, 0xc7, 0x94, 0x1f, 0xcc, 0x82, 0xea, 0xb2, 0x47, 0xad, 0xdb, 0x56, 0xe2, 0x63, 0x84, 0x47, 0xe9, 0xd6, 0x9, 0xe6, 0x10, 0xb6, 0xc, 0xe0, 0x86, 0x65, 0x6a, 0xae, 0xbf, 0x1d, 0xa3, 0xc8, 0xa2, 0x31, 0xd7, 0xd9, 0x4e, 0x2f, 0xd0, 0xaf, 0xe4, 0x6b, 0x39, 0x1f, 0xf1, 0x4a, 0x72, 0xea, 0xeb, 0x3f, 0x44, 0xad, 0x4d, 0xf8, 0x58, 0x66, 0xde, 0xf4, 0x3d, 0x47, 0x81, 0xa0, 0xb3, 0x57, 0x8b, 0xc9, 0x96, 0xc8, 0x79, 0x70, 0xb1, 0x32}, - output224: []byte{0x84, 0x2a, 0x2e, 0x13, 0xd2, 0x72, 0x8c, 0xa5, 0x5b, 0x42, 0xd7, 0x84, 0xbb, 0x6b, 0xc4, 0xb8, 0x89, 0xe5, 0x67, 0x75, 0xad, 0x56, 0xbf, 0x75, 0x78, 0x9c, 0xc5, 0x7a}, - output256: []byte{0x3e, 0xcc, 0x9d, 0x27, 0x99, 0x40, 0x22, 0x4, 0x5c, 0xbe, 0xab, 0x4f, 0xc0, 0x41, 0xf1, 0x24, 0x19, 0xce, 0xc8, 0x6, 0xc, 0x8f, 0x6f, 0x9f, 0x3, 0x72, 0x88, 0x4d, 0xf6, 0x7, 0x4b, 0x5c}, - output384: []byte{0xe5, 0x77, 0xf7, 0x9b, 0xe, 0x5, 0x35, 0x5b, 0x8f, 0x63, 0xec, 0x1e, 0x63, 0x9b, 0xc5, 0xa5, 0x1a, 0x72, 0xbb, 0xb0, 0xab, 0xaf, 0xe7, 0x6d, 0x31, 0x33, 0xde, 0xc4, 0xda, 0x9b, 0xef, 0x9a, 0x36, 0x1f, 0x3e, 0x3c, 0xa, 0xdb, 0x4c, 0x7, 0xe2, 0x75, 0x7f, 0xe1, 0xd4, 0x79, 0xb, 0x9a}, - output512: []byte{0x74, 0x32, 0x86, 0x11, 0x32, 0xe6, 0x89, 0x4b, 0xb6, 0xae, 0x51, 0x15, 0x39, 0x81, 0x98, 0x31, 0x7e, 0x12, 0xcc, 0x73, 0xc0, 0xc5, 0xdf, 0xc6, 0x1c, 0xb1, 0x89, 0xff, 0x5a, 0xa9, 0xfb, 0xd, 0x62, 0x22, 0x4c, 0xbb, 0x1b, 0xfa, 0x8b, 0x10, 0x57, 0x84, 0x40, 0x57, 0x18, 0xe6, 0xf8, 0xe1, 0x5e, 0x4, 0x1d, 0xad, 0x80, 0xd1, 0x1a, 0xe5, 0x7, 0xb3, 0x3c, 0x15, 0xc6, 0xca, 0xc8, 0x24}}, - testcase{ - msg: []byte{0xcb, 0x2a, 0x23, 0x4f, 0x45, 0xe2, 0xec, 0xd5, 0x86, 0x38, 0x95, 0xa4, 0x51, 0xd3, 0x89, 0xa3, 0x69, 0xaa, 0xb9, 0x9c, 0xfe, 0xf0, 0xd5, 0xc9, 0xff, 0xca, 0x1e, 0x6e, 0x63, 0xf7, 0x63, 0xb5, 0xc1, 0x4f, 0xb9, 0xb4, 0x78, 0x31, 0x3c, 0x8e, 0x8c, 0xe, 0xfe, 0xb3, 0xac, 0x95, 0x0, 0xcf, 0x5f, 0xd9, 0x37, 0x91, 0xb7, 0x89, 0xe6, 0x7e, 0xac, 0x12, 0xfd, 0x3, 0x8e, 0x25, 0x47, 0xcc, 0x8e, 0xf, 0xc9, 0xdb, 0x59, 0x1f, 0x33, 0xa1, 0xe4, 0x90, 0x7c, 0x64, 0xa9, 0x22, 0xdd, 0xa2, 0x3e, 0xc9, 0x82, 0x73, 0x10, 0xb3, 0x6, 0x9, 0x85, 0x54, 0xa4, 0xa7, 0x8f, 0x5, 0x2, 0x62, 0xdb, 0x5b, 0x54, 0x5b, 0x15, 0x9e, 0x1f, 0xf1, 0xdc, 0xa6, 0xeb, 0x73, 0x4b, 0x87, 0x23, 0x43, 0xb8, 0x42, 0xc5, 0x7e, 0xaf, 0xcf, 0xda, 0x84, 0x5, 0xee, 0xdb, 0xb4, 0x8e, 0xf3, 0x2e, 0x99, 0x69, 0x6d, 0x13, 0x59, 0x79, 0x23, 0x5c, 0x3a, 0x5, 0x36, 0x4e, 0x37, 0x1c, 0x2d, 0x76, 0xf1, 0x90, 0x2f, 0x1d, 0x83, 0x14, 0x6d, 0xf9, 0x49, 0x5c, 0xa, 0x6c, 0x57, 0xd7, 0xbf, 0x9e, 0xe7, 0x7e, 0x80, 0xf9, 0x78, 0x7a, 0xee, 0x27, 0xbe, 0x1f, 0xe1, 0x26, 0xcd, 0xc9, 0xef, 0x89, 0x3a, 0x4a, 0x7d, 0xcb, 0xbc, 0x36, 0x7e, 0x40, 0xfe, 0x4e, 0x1e, 0xe9, 0xb, 0x42, 0xea, 0x25, 0xaf, 0x1}, - output224: []byte{0xa5, 0x76, 0x28, 0x1c, 0xfa, 0xa8, 0x9d, 0xce, 0xfb, 0x1d, 0x37, 0x77, 0x24, 0x0, 0xba, 0x4c, 0xab, 0xce, 0xef, 0x33, 0xcb, 0xa2, 0xf8, 0x33, 0x33, 0x6a, 0x74, 0xf2}, - output256: []byte{0x15, 0x1, 0x98, 0x8a, 0x55, 0x37, 0x2a, 0xc1, 0xb0, 0xb7, 0x88, 0x49, 0xf3, 0xb7, 0xe1, 0x7, 0xe0, 0xbf, 0x1f, 0x2c, 0xba, 0xf6, 0x70, 0xde, 0x7f, 0x15, 0xac, 0xbb, 0x1a, 0x0, 0xad, 0x3d}, - output384: []byte{0xf7, 0x81, 0x6, 0xf1, 0xe, 0x6c, 0x1f, 0x1c, 0xa5, 0x19, 0xf, 0xe5, 0x41, 0x34, 0x51, 0x45, 0xee, 0x25, 0xbc, 0x51, 0xd3, 0xc1, 0xcb, 0xaa, 0xa0, 0x4c, 0xd, 0xb2, 0xa3, 0xba, 0x25, 0x84, 0xdd, 0xd3, 0xf, 0x3a, 0x88, 0x9b, 0x94, 0xbb, 0xcb, 0x95, 0x73, 0xcd, 0x94, 0x17, 0x57, 0x4c}, - output512: []byte{0x6a, 0xf4, 0xff, 0x4c, 0x42, 0x30, 0x51, 0xe3, 0x30, 0x6a, 0xce, 0x81, 0x2e, 0x5c, 0xfa, 0x85, 0x53, 0x2b, 0x73, 0xde, 0xef, 0xd, 0xfe, 0x60, 0x1d, 0x26, 0x30, 0x63, 0x23, 0x89, 0xd0, 0xfa, 0xb2, 0xa1, 0x9, 0x21, 0x4d, 0x32, 0x50, 0x8d, 0x23, 0x91, 0x77, 0x56, 0x65, 0xb8, 0x7a, 0x94, 0xd1, 0xdf, 0x29, 0xdb, 0x12, 0x14, 0xcb, 0x48, 0xde, 0xc1, 0xd, 0xbd, 0x3d, 0x8c, 0xf5, 0x91}}, - testcase{ - msg: []byte{0xd1, 0x6b, 0xea, 0xdf, 0x2, 0xab, 0x1d, 0x4d, 0xc6, 0xf8, 0x8b, 0x8c, 0x45, 0x54, 0xc5, 0x1e, 0x86, 0x6d, 0xf8, 0x30, 0xb8, 0x9c, 0x6, 0xe7, 0x86, 0xa5, 0xf8, 0x75, 0x7e, 0x89, 0x9, 0x31, 0xa, 0xf5, 0x1c, 0x84, 0xe, 0xfe, 0x8d, 0x20, 0xb3, 0x53, 0x31, 0xf4, 0x35, 0x5d, 0x80, 0xf7, 0x32, 0x95, 0x97, 0x46, 0x53, 0xdd, 0xd6, 0x20, 0xcd, 0xde, 0x47, 0x30, 0xfb, 0x6c, 0x8d, 0xd, 0x2d, 0xcb, 0x2b, 0x45, 0xd9, 0x2d, 0x4f, 0xbd, 0xb5, 0x67, 0xc0, 0xa3, 0xe8, 0x6b, 0xd1, 0xa8, 0xa7, 0x95, 0xaf, 0x26, 0xfb, 0xf2, 0x9f, 0xc6, 0xc6, 0x59, 0x41, 0xcd, 0xdb, 0x9, 0xf, 0xf7, 0xcd, 0x23, 0xa, 0xc5, 0x26, 0x8a, 0xb4, 0x60, 0x6f, 0xcc, 0xba, 0x9e, 0xde, 0xd0, 0xa2, 0xb5, 0xd0, 0x14, 0xee, 0xc, 0x34, 0xf0, 0xb2, 0x88, 0x1a, 0xc0, 0x36, 0xe2, 0x4e, 0x15, 0x1b, 0xe8, 0x9e, 0xeb, 0x6c, 0xd9, 0xa7, 0xa7, 0x90, 0xaf, 0xcc, 0xff, 0x23, 0x4d, 0x7c, 0xb1, 0x1b, 0x99, 0xeb, 0xf5, 0x8c, 0xd0, 0xc5, 0x89, 0xf2, 0xb, 0xda, 0xc4, 0xf9, 0xf0, 0xe2, 0x8f, 0x75, 0xe3, 0xe0, 0x4e, 0x5b, 0x3d, 0xeb, 0xce, 0x60, 0x7a, 0x49, 0x6d, 0x84, 0x8d, 0x67, 0xfa, 0x7b, 0x49, 0x13, 0x2c, 0x71, 0xb8, 0x78, 0xfd, 0x55, 0x57, 0xe0, 0x82, 0xa1, 0x8e, 0xca, 0x1f, 0xbd, 0xa9, 0x4d, 0x4b}, - output224: []byte{0xb1, 0x57, 0x94, 0x76, 0x97, 0x2d, 0x42, 0xfa, 0x38, 0x8f, 0xee, 0xb8, 0x42, 0x48, 0x34, 0x67, 0x2c, 0x4d, 0x1a, 0x42, 0x25, 0xee, 0x2d, 0xb8, 0x9d, 0xea, 0x73, 0x59}, - output256: []byte{0x5c, 0x4e, 0x86, 0xa, 0x1, 0x75, 0xc9, 0x2c, 0x1e, 0x6a, 0xf2, 0xcb, 0xb3, 0x8, 0x41, 0x62, 0x40, 0x3c, 0xed, 0x7, 0x3f, 0xaa, 0xc9, 0x1, 0xd0, 0xd3, 0x58, 0xb6, 0xbf, 0x5e, 0xef, 0xa9}, - output384: []byte{0x6f, 0x42, 0xfa, 0xf8, 0x7d, 0xa6, 0x55, 0x16, 0xfc, 0xc, 0xca, 0x70, 0xa3, 0x85, 0xf2, 0x6e, 0xbd, 0xaa, 0x94, 0xdf, 0x64, 0xaa, 0x5e, 0x7a, 0x31, 0x19, 0xac, 0x18, 0xc6, 0x21, 0x4e, 0x3d, 0xb, 0x61, 0x15, 0x8f, 0xbd, 0x6c, 0x24, 0x87, 0xe0, 0xab, 0xfb, 0xc, 0x6c, 0x85, 0xef, 0x87}, - output512: []byte{0x46, 0x48, 0xd2, 0x63, 0xb6, 0x8, 0xcf, 0x28, 0xca, 0x65, 0xb2, 0x8a, 0x36, 0x1e, 0xbb, 0x0, 0xe0, 0x78, 0x4c, 0x65, 0xab, 0x1d, 0x55, 0xc4, 0x6a, 0x78, 0x57, 0x37, 0xb6, 0xc8, 0xd8, 0x3d, 0xd5, 0x2e, 0x33, 0x67, 0xd8, 0x98, 0x92, 0x1e, 0xa3, 0x6d, 0xad, 0xa4, 0x2d, 0x89, 0x38, 0x0, 0xd0, 0xbf, 0xcf, 0x86, 0x55, 0x4c, 0xdf, 0x5e, 0x76, 0x30, 0xd6, 0xa, 0x2e, 0x8e, 0xe2, 0x9f}}, - testcase{ - msg: []byte{0x8f, 0x65, 0xf6, 0xbc, 0x59, 0xa8, 0x57, 0x5, 0x1, 0x6e, 0x2b, 0xae, 0x7f, 0xe5, 0x79, 0x80, 0xde, 0x31, 0x27, 0xe5, 0xab, 0x27, 0x5f, 0x57, 0x3d, 0x33, 0x4f, 0x73, 0xf8, 0x60, 0x31, 0x6, 0xec, 0x35, 0x53, 0x1, 0x66, 0x8, 0xef, 0x2d, 0xd6, 0xe6, 0x9b, 0x24, 0xbe, 0xb, 0x71, 0x13, 0xbf, 0x6a, 0x76, 0xb, 0xa6, 0xe9, 0xce, 0x1c, 0x48, 0xf9, 0xe1, 0x86, 0x1, 0x2c, 0xf9, 0x6a, 0x1d, 0x48, 0x49, 0xd7, 0x5d, 0xf5, 0xbb, 0x83, 0x15, 0x38, 0x7f, 0xd7, 0x8e, 0x9e, 0x15, 0x3e, 0x76, 0xf8, 0xba, 0x7e, 0xc6, 0xc8, 0x84, 0x98, 0x10, 0xf5, 0x9f, 0xb4, 0xbb, 0x9b, 0x0, 0x43, 0x18, 0x21, 0xb, 0x37, 0xf1, 0x29, 0x95, 0x26, 0x86, 0x6f, 0x44, 0x5, 0x9e, 0x1, 0x7e, 0x22, 0xe9, 0x6c, 0xbe, 0x41, 0x86, 0x99, 0xd0, 0x14, 0xc6, 0xea, 0x1, 0xc9, 0xf0, 0x3, 0x8b, 0x10, 0x29, 0x98, 0x84, 0xdb, 0xec, 0x31, 0x99, 0xbb, 0x5, 0xad, 0xc9, 0x4e, 0x95, 0x5a, 0x15, 0x33, 0x21, 0x9c, 0x11, 0x15, 0xfe, 0xd0, 0xe5, 0xf2, 0x12, 0x28, 0xb0, 0x71, 0xf4, 0xd, 0xd5, 0x7c, 0x42, 0x40, 0xd9, 0x8d, 0x37, 0xb7, 0x3e, 0x41, 0x2f, 0xe0, 0xfa, 0x47, 0x3, 0x12, 0xd, 0x7c, 0xc, 0x67, 0x97, 0x2e, 0xd2, 0x33, 0xe5, 0xde, 0xb3, 0x0, 0xa2, 0x26, 0x5, 0x47, 0x2f, 0xa3, 0xa3, 0xba, 0x86}, - output224: []byte{0xa3, 0x2e, 0xc6, 0x96, 0x48, 0xb4, 0xfd, 0x9b, 0xa2, 0x43, 0x1e, 0xd0, 0xfe, 0xf0, 0x36, 0x18, 0x8c, 0x19, 0x78, 0x8d, 0x7d, 0xdf, 0xd, 0x25, 0xb6, 0xb0, 0x3e, 0xcd}, - output256: []byte{0x27, 0x2b, 0x4f, 0x68, 0x92, 0x63, 0x5, 0x7f, 0xbf, 0x76, 0x5, 0xaa, 0xa6, 0x7a, 0xf0, 0x12, 0xd7, 0x42, 0x26, 0x71, 0x64, 0xc4, 0xfa, 0xb6, 0x80, 0x35, 0xd9, 0x9c, 0x58, 0x29, 0xb4, 0xf0}, - output384: []byte{0x82, 0xfc, 0x97, 0xee, 0x34, 0xa8, 0xfc, 0xc2, 0x76, 0xae, 0x1c, 0x81, 0x30, 0x55, 0x5c, 0xc2, 0xd3, 0x39, 0xaa, 0x6c, 0xb3, 0x40, 0x3, 0x48, 0x83, 0x78, 0x85, 0x55, 0x29, 0xf9, 0xee, 0x3a, 0xf8, 0x19, 0xec, 0x10, 0x4d, 0xd2, 0xde, 0x30, 0xa, 0xb7, 0xdb, 0xc0, 0x4b, 0x2b, 0x40, 0x17}, - output512: []byte{0xdb, 0xd3, 0x73, 0x24, 0x40, 0x1, 0x5, 0x95, 0xab, 0x26, 0xf8, 0x4e, 0xfe, 0xb0, 0x77, 0x32, 0x22, 0x7a, 0x7b, 0x7b, 0x52, 0xd6, 0xff, 0x33, 0x9c, 0x7f, 0xf1, 0xb6, 0x44, 0x22, 0x49, 0x20, 0x2a, 0xe3, 0x3a, 0xa, 0xef, 0x51, 0x67, 0xf5, 0xb0, 0x47, 0x4d, 0x74, 0xa5, 0xb5, 0xc, 0xdb, 0x3, 0x3d, 0x6c, 0x5c, 0x72, 0x89, 0x4a, 0x36, 0x86, 0xfe, 0x6e, 0xcb, 0x36, 0xe3, 0x57, 0xf3}}, - testcase{ - msg: []byte{0x84, 0x89, 0x1e, 0x52, 0xe0, 0xd4, 0x51, 0x81, 0x32, 0x10, 0xc3, 0xfd, 0x63, 0x5b, 0x39, 0xa0, 0x3a, 0x6b, 0x7a, 0x73, 0x17, 0xb2, 0x21, 0xa7, 0xab, 0xc2, 0x70, 0xdf, 0xa9, 0x46, 0xc4, 0x26, 0x69, 0xaa, 0xcb, 0xbb, 0xdf, 0x80, 0x1e, 0x15, 0x84, 0xf3, 0x30, 0xe2, 0x8c, 0x72, 0x98, 0x47, 0xea, 0x14, 0x15, 0x2b, 0xd6, 0x37, 0xb3, 0xd0, 0xf2, 0xb3, 0x8b, 0x4b, 0xd5, 0xbf, 0x9c, 0x79, 0x1c, 0x58, 0x80, 0x62, 0x81, 0x10, 0x3a, 0x3e, 0xab, 0xba, 0xed, 0xe5, 0xe7, 0x11, 0xe5, 0x39, 0xe6, 0xa8, 0xb2, 0xcf, 0x29, 0x7c, 0xf3, 0x51, 0xc0, 0x78, 0xb4, 0xfa, 0x8f, 0x7f, 0x35, 0xcf, 0x61, 0xbe, 0xbf, 0x88, 0x14, 0xbf, 0x24, 0x8a, 0x1, 0xd4, 0x1e, 0x86, 0xc5, 0x71, 0x5e, 0xa4, 0xc, 0x63, 0xf7, 0x37, 0x53, 0x79, 0xa7, 0xeb, 0x1d, 0x78, 0xf2, 0x76, 0x22, 0xfb, 0x46, 0x8a, 0xb7, 0x84, 0xaa, 0xab, 0xa4, 0xe5, 0x34, 0xa6, 0xdf, 0xd1, 0xdf, 0x6f, 0xa1, 0x55, 0x11, 0x34, 0x1e, 0x72, 0x5e, 0xd2, 0xe8, 0x7f, 0x98, 0x73, 0x7c, 0xcb, 0x7b, 0x6a, 0x6d, 0xfa, 0xe4, 0x16, 0x47, 0x74, 0x72, 0xb0, 0x46, 0xbf, 0x18, 0x11, 0x18, 0x7d, 0x15, 0x1b, 0xfa, 0x9f, 0x7b, 0x2b, 0xf9, 0xac, 0xdb, 0x23, 0xa3, 0xbe, 0x50, 0x7c, 0xdf, 0x14, 0xcf, 0xdf, 0x51, 0x7d, 0x2c, 0xb5, 0xfb, 0x9e, 0x4a, 0xb6}, - output224: []byte{0x2b, 0x8c, 0xf4, 0xc8, 0xd9, 0xe6, 0x71, 0x7e, 0xbc, 0xe4, 0xf0, 0x58, 0x4a, 0xda, 0x59, 0xa8, 0xac, 0xdf, 0xab, 0x98, 0xad, 0x7e, 0x33, 0xf3, 0x55, 0xb7, 0x70, 0x95}, - output256: []byte{0x9b, 0x28, 0xe4, 0x2b, 0x67, 0xef, 0x32, 0xec, 0x80, 0xda, 0x10, 0xa0, 0x7b, 0x0, 0x4e, 0x1d, 0x71, 0xc6, 0xdc, 0xe7, 0x1d, 0x80, 0x13, 0xff, 0xa0, 0x30, 0x5d, 0xd, 0xc, 0xe0, 0x46, 0x9d}, - output384: []byte{0x75, 0xd1, 0x40, 0xbe, 0x47, 0xe1, 0x16, 0x21, 0x1f, 0x4f, 0x66, 0x8e, 0x5, 0xad, 0xd3, 0x6c, 0x83, 0xb3, 0xe4, 0x81, 0xdf, 0x9f, 0x28, 0x6, 0x4a, 0x41, 0x89, 0x83, 0x35, 0xd9, 0x7c, 0x80, 0x54, 0x71, 0x21, 0x4e, 0x29, 0xc0, 0xb8, 0x49, 0x87, 0x58, 0x45, 0xc9, 0xb8, 0xde, 0x25, 0xe3}, - output512: []byte{0xc2, 0x4d, 0x40, 0x54, 0x11, 0x8, 0x89, 0x29, 0xc, 0xbc, 0x40, 0xb8, 0x2a, 0xd8, 0x59, 0x92, 0x29, 0xd8, 0xe8, 0x6e, 0x4c, 0xe7, 0x6b, 0xdd, 0xbb, 0xb6, 0xf5, 0x38, 0x62, 0x23, 0x51, 0x2c, 0x9d, 0x7e, 0x0, 0x97, 0x3c, 0x70, 0x64, 0x42, 0xb2, 0xc8, 0xe, 0xdd, 0x20, 0x90, 0x40, 0x67, 0xaf, 0x8e, 0x4e, 0x68, 0x1a, 0xec, 0xbf, 0xad, 0xc6, 0xaa, 0x15, 0xa2, 0xeb, 0xfe, 0x7d, 0xdd}}, - testcase{ - msg: []byte{0xfd, 0xd7, 0xa9, 0x43, 0x3a, 0x3b, 0x4a, 0xfa, 0xbd, 0x7a, 0x3a, 0x5e, 0x34, 0x57, 0xe5, 0x6d, 0xeb, 0xf7, 0x8e, 0x84, 0xb7, 0xa0, 0xb0, 0xca, 0xe, 0x8c, 0x6d, 0x53, 0xbd, 0xc, 0x2d, 0xae, 0x31, 0xb2, 0x70, 0xc, 0x61, 0x28, 0x33, 0x4f, 0x43, 0x98, 0x1b, 0xe3, 0xb2, 0x13, 0xb1, 0xd7, 0xa1, 0x18, 0xd5, 0x9c, 0x7e, 0x6b, 0x64, 0x93, 0xa8, 0x6f, 0x86, 0x6a, 0x16, 0x35, 0xc1, 0x28, 0x59, 0xcf, 0xb9, 0xad, 0x17, 0x46, 0xa, 0x77, 0xb4, 0x52, 0x2a, 0x5c, 0x18, 0x83, 0xc3, 0xd6, 0xac, 0xc8, 0x6e, 0x61, 0x62, 0x66, 0x7e, 0xc4, 0x14, 0xe9, 0xa1, 0x4, 0xaa, 0x89, 0x20, 0x53, 0xa2, 0xb1, 0xd7, 0x21, 0x65, 0xa8, 0x55, 0xba, 0xcd, 0x8f, 0xaf, 0x80, 0x34, 0xa5, 0xdd, 0x9b, 0x71, 0x6f, 0x47, 0xa0, 0x81, 0x8c, 0x9, 0xbb, 0x6b, 0xaf, 0x22, 0xaa, 0x50, 0x3c, 0x6, 0xb4, 0xca, 0x26, 0x1f, 0x55, 0x77, 0x61, 0x98, 0x9d, 0x2a, 0xfb, 0xd8, 0x8b, 0x6a, 0x67, 0x8a, 0xd1, 0x28, 0xaf, 0x68, 0x67, 0x21, 0x7, 0xd0, 0xf1, 0xfc, 0x73, 0xc5, 0xca, 0x74, 0x4, 0x59, 0x29, 0x7b, 0x32, 0x92, 0xb2, 0x81, 0xe9, 0x3b, 0xce, 0xb7, 0x61, 0xbd, 0xe7, 0x22, 0x1c, 0x3a, 0x55, 0x70, 0x8e, 0x5e, 0xc8, 0x44, 0x72, 0xcd, 0xdc, 0xaa, 0x84, 0xec, 0xf2, 0x37, 0x23, 0xcc, 0x9, 0x91, 0x35, 0x5c, 0x62, 0x80}, - output224: []byte{0xe5, 0x83, 0x84, 0x94, 0x74, 0xf3, 0xc7, 0x59, 0xb7, 0xa3, 0x9, 0x3c, 0x7a, 0xba, 0xdd, 0x61, 0x42, 0x50, 0x73, 0xae, 0xa2, 0x67, 0x8e, 0x27, 0x82, 0x15, 0x70, 0x8d}, - output256: []byte{0xee, 0x53, 0xf8, 0x3d, 0x2e, 0x2c, 0xcc, 0x31, 0x5c, 0x63, 0x77, 0xea, 0xdd, 0xa5, 0xf4, 0x2f, 0x42, 0xf3, 0xaa, 0xdd, 0x66, 0x4e, 0x3e, 0x89, 0x5c, 0x37, 0xcb, 0xe9, 0xd0, 0xe9, 0xb9, 0xde}, - output384: []byte{0x1a, 0x4, 0xcd, 0x93, 0x74, 0x7c, 0xa5, 0x83, 0xa5, 0x8a, 0xb4, 0xa8, 0xc7, 0xc8, 0xc7, 0xa3, 0x3f, 0x2, 0x5e, 0xde, 0x1b, 0x2d, 0xd0, 0x80, 0xe5, 0xaf, 0xc, 0x4d, 0xc6, 0x3c, 0x87, 0x15, 0xe4, 0x36, 0xdd, 0x57, 0xff, 0x7f, 0x40, 0x1d, 0xec, 0xef, 0x81, 0x3f, 0x33, 0xd, 0x65, 0x88}, - output512: []byte{0x4a, 0x64, 0x4, 0xd2, 0x78, 0xa0, 0xba, 0x70, 0x48, 0x8c, 0x18, 0xd7, 0xd1, 0x86, 0x1c, 0xde, 0x26, 0xfd, 0x57, 0xd6, 0x6a, 0x9a, 0xff, 0xe7, 0x4f, 0x1e, 0x64, 0x6e, 0x61, 0x60, 0x3, 0xa5, 0x2f, 0xe4, 0x25, 0x20, 0x50, 0x4a, 0xc4, 0xac, 0xe5, 0xca, 0x66, 0x65, 0xcf, 0x91, 0x55, 0xf4, 0x4e, 0xca, 0xa0, 0x5d, 0x55, 0xf8, 0xf, 0xe9, 0x79, 0x4a, 0xde, 0x17, 0x87, 0x1c, 0x57, 0x28}}, - testcase{ - msg: []byte{0x70, 0xa4, 0xb, 0xfb, 0xef, 0x92, 0x27, 0x7a, 0x1a, 0xad, 0x72, 0xf6, 0xb7, 0x9d, 0x1, 0x77, 0x19, 0x7c, 0x4e, 0xbd, 0x43, 0x26, 0x68, 0xcf, 0xec, 0x5, 0xd0, 0x99, 0xac, 0xcb, 0x65, 0x10, 0x62, 0xb5, 0xdf, 0xf1, 0x56, 0xc0, 0xb2, 0x73, 0x36, 0x68, 0x7a, 0x94, 0xb2, 0x66, 0x79, 0xcf, 0xdd, 0x9d, 0xaf, 0x7a, 0xd2, 0x4, 0x33, 0x8d, 0xd9, 0xc4, 0xd1, 0x41, 0x14, 0x3, 0x3a, 0x5c, 0x22, 0x5b, 0xd1, 0x1f, 0x21, 0x7b, 0x5f, 0x47, 0x32, 0xda, 0x16, 0x7e, 0xe3, 0xf9, 0x39, 0x26, 0x2d, 0x40, 0x43, 0xfc, 0x9c, 0xba, 0x92, 0x30, 0x3b, 0x7b, 0x5e, 0x96, 0xae, 0xa1, 0x2a, 0xdd, 0xa6, 0x48, 0x59, 0xdf, 0x4b, 0x86, 0xe9, 0xee, 0xb, 0x58, 0xe3, 0x90, 0x91, 0xe6, 0xb1, 0x88, 0xb4, 0x8, 0xac, 0x94, 0xe1, 0x29, 0x4a, 0x89, 0x11, 0x24, 0x5e, 0xe3, 0x61, 0xe6, 0xe, 0x60, 0x1e, 0xff, 0x58, 0xd1, 0xd3, 0x76, 0x39, 0xf3, 0x75, 0x3b, 0xec, 0x80, 0xeb, 0xb4, 0xef, 0xde, 0x25, 0x81, 0x74, 0x36, 0x7, 0x66, 0x23, 0xfc, 0x65, 0x41, 0x5f, 0xe5, 0x1d, 0x1b, 0x2, 0x80, 0x36, 0x6d, 0x12, 0xc5, 0x54, 0xd8, 0x67, 0x43, 0xf3, 0xc3, 0xb6, 0x57, 0x2e, 0x40, 0x3, 0x61, 0xa6, 0x7, 0x26, 0x13, 0x14, 0x41, 0xba, 0x49, 0x3a, 0x83, 0xfb, 0xe9, 0xaf, 0xda, 0x90, 0xf7, 0xaf, 0x1a, 0xe7, 0x17, 0x23, 0x8d}, - output224: []byte{0x10, 0x79, 0x5d, 0x3a, 0xbc, 0xc0, 0x77, 0xf4, 0xa1, 0xf5, 0xb5, 0x65, 0x3c, 0x47, 0x8f, 0x9d, 0xb4, 0x21, 0x10, 0xea, 0x9f, 0x34, 0x92, 0x54, 0x70, 0xb3, 0xcd, 0x11}, - output256: []byte{0x21, 0xcc, 0xfd, 0xa6, 0x5c, 0x4b, 0x91, 0x53, 0x3, 0x1, 0x2b, 0x85, 0x2a, 0xb2, 0x94, 0x81, 0x3, 0xf, 0x87, 0x34, 0x7c, 0x29, 0x91, 0x7e, 0x21, 0xf2, 0x10, 0xf2, 0xbd, 0x5e, 0xfc, 0x9c}, - output384: []byte{0xfb, 0x6, 0x26, 0xf2, 0xb1, 0x89, 0x67, 0x9d, 0xd9, 0x98, 0xbc, 0x18, 0xf3, 0xd, 0xf8, 0x2d, 0x9, 0x7, 0xb6, 0x2a, 0xa7, 0x7c, 0x86, 0x69, 0xe2, 0x2b, 0x53, 0x86, 0xe, 0x39, 0x88, 0x50, 0x3d, 0x88, 0x48, 0x84, 0x16, 0x3a, 0x56, 0x17, 0x39, 0x25, 0x4c, 0xa1, 0x39, 0x29, 0xb6, 0x9b}, - output512: []byte{0xff, 0xfd, 0x1b, 0x1e, 0x31, 0x37, 0x7d, 0xff, 0x0, 0xb4, 0x92, 0x29, 0x5b, 0xcc, 0xc7, 0x35, 0x73, 0x3b, 0x2, 0x1f, 0x47, 0xbb, 0x4a, 0xfb, 0xa6, 0x54, 0x9e, 0xa6, 0xc1, 0xba, 0x38, 0x32, 0xe8, 0x58, 0x70, 0x99, 0xad, 0xc, 0xc2, 0x16, 0xaf, 0x58, 0x99, 0xac, 0x68, 0x3e, 0xb7, 0xc2, 0x46, 0x87, 0x1e, 0x21, 0xc3, 0xf, 0xee, 0xf9, 0xbc, 0xee, 0xdf, 0xc7, 0x8d, 0xc, 0x96, 0x6c}}, - testcase{ - msg: []byte{0x74, 0x35, 0x6e, 0x44, 0x9f, 0x4b, 0xf8, 0x64, 0x4f, 0x77, 0xb1, 0x4f, 0x4d, 0x67, 0xcb, 0x6b, 0xd9, 0xc1, 0xf5, 0xae, 0x35, 0x76, 0x21, 0xd5, 0xb8, 0x14, 0x7e, 0x56, 0x2b, 0x65, 0xc6, 0x65, 0x85, 0xca, 0xf2, 0xe4, 0x91, 0xb4, 0x85, 0x29, 0xa0, 0x1a, 0x34, 0xd2, 0x26, 0xd4, 0x36, 0x95, 0x91, 0x53, 0x81, 0x53, 0x80, 0xd5, 0x68, 0x9e, 0x30, 0xb3, 0x53, 0x57, 0xcd, 0xac, 0x6e, 0x8, 0xd3, 0xf2, 0xb0, 0xe8, 0x8e, 0x20, 0x6, 0x0, 0xd6, 0x2b, 0xd9, 0xf5, 0xea, 0xf4, 0x88, 0xdf, 0x86, 0xa4, 0x47, 0xe, 0xa2, 0x27, 0x0, 0x61, 0x82, 0xe4, 0x48, 0x9, 0x0, 0x98, 0x68, 0xc4, 0xc2, 0x80, 0xc4, 0x3d, 0x7d, 0x64, 0xa5, 0x26, 0x8f, 0xa7, 0x19, 0x7, 0x49, 0x60, 0x8, 0x7b, 0x3a, 0x6a, 0xbc, 0x83, 0x78, 0x82, 0xf8, 0x82, 0xc8, 0x37, 0x83, 0x45, 0x35, 0x92, 0x93, 0x89, 0xa1, 0x2b, 0x2c, 0x78, 0x18, 0x7e, 0x2e, 0xa0, 0x7e, 0xf8, 0xb8, 0xee, 0xf2, 0x7d, 0xc8, 0x50, 0x2, 0xc3, 0xae, 0x35, 0xf1, 0xa5, 0xb, 0xee, 0x6a, 0x1c, 0x48, 0xba, 0x7e, 0x17, 0x5f, 0x33, 0x16, 0x67, 0xb, 0x27, 0x98, 0x34, 0x72, 0xaa, 0x6a, 0x61, 0xee, 0xd0, 0xa6, 0x83, 0xa3, 0x9e, 0xe3, 0x23, 0x8, 0x6, 0x20, 0xea, 0x44, 0xa9, 0xf7, 0x44, 0x11, 0xae, 0x5c, 0xe9, 0x90, 0x30, 0x52, 0x8f, 0x9a, 0xb4, 0x9c, 0x79, 0xf2}, - output224: []byte{0x31, 0xa8, 0x43, 0xb4, 0xa9, 0xf3, 0x32, 0xf3, 0xb6, 0xb0, 0x99, 0x84, 0x35, 0x40, 0xaa, 0x70, 0x65, 0x1b, 0x26, 0xb8, 0xe, 0xb, 0xd7, 0x5b, 0x77, 0xf3, 0xaa, 0x9b}, - output256: []byte{0xf5, 0xbf, 0x70, 0x71, 0xd, 0xa4, 0x40, 0xed, 0xb4, 0x3a, 0xfd, 0x3e, 0xb7, 0x69, 0x81, 0x80, 0x31, 0x7f, 0xfe, 0xfa, 0x81, 0x40, 0x6b, 0xb4, 0xdf, 0x9c, 0x2b, 0xb8, 0xb0, 0xb1, 0xc0, 0x34}, - output384: []byte{0xcc, 0x2e, 0xf9, 0x60, 0x2f, 0x80, 0xd0, 0x73, 0x42, 0x95, 0xc7, 0xc1, 0x58, 0xec, 0x36, 0x66, 0x8, 0xcf, 0x60, 0xa4, 0x23, 0xd0, 0x83, 0x66, 0x44, 0xb6, 0x8, 0x31, 0xa9, 0x4e, 0x7e, 0xaf, 0x99, 0x4c, 0x81, 0xf1, 0x91, 0x74, 0xfd, 0x6c, 0xa7, 0x5b, 0xb2, 0x46, 0xbb, 0xcc, 0xa2, 0x0}, - output512: []byte{0x33, 0xc8, 0xf4, 0xe, 0x1b, 0xd1, 0xeb, 0x1a, 0x3a, 0x70, 0xd2, 0x7, 0x1d, 0x27, 0x46, 0xe, 0xf0, 0xf6, 0xb2, 0xd3, 0xec, 0xe3, 0x73, 0x74, 0x38, 0x42, 0xd6, 0xb9, 0x28, 0xf3, 0x77, 0x1e, 0x4b, 0x74, 0x46, 0xa9, 0xec, 0xfb, 0xbf, 0x55, 0x2c, 0x6, 0x4f, 0x6b, 0x26, 0x9, 0x54, 0x1, 0x9, 0x75, 0x81, 0xc3, 0x8b, 0x95, 0xe9, 0x55, 0x11, 0x19, 0xa1, 0xfd, 0xcb, 0x3d, 0x58, 0xe7}}, - testcase{ - msg: []byte{0x8c, 0x37, 0x98, 0xe5, 0x1b, 0xc6, 0x84, 0x82, 0xd7, 0x33, 0x7d, 0x3a, 0xbb, 0x75, 0xdc, 0x9f, 0xfe, 0x86, 0x7, 0x14, 0xa9, 0xad, 0x73, 0x55, 0x1e, 0x12, 0x0, 0x59, 0x86, 0xd, 0xde, 0x24, 0xab, 0x87, 0x32, 0x72, 0x22, 0xb6, 0x4c, 0xf7, 0x74, 0x41, 0x5a, 0x70, 0xf7, 0x24, 0xcd, 0xf2, 0x70, 0xde, 0x3f, 0xe4, 0x7d, 0xda, 0x7, 0xb6, 0x1c, 0x9e, 0xf2, 0xa3, 0x55, 0x1f, 0x45, 0xa5, 0x58, 0x48, 0x60, 0x24, 0x8f, 0xab, 0xde, 0x67, 0x6e, 0x1c, 0xd7, 0x5f, 0x63, 0x55, 0xaa, 0x3e, 0xae, 0xab, 0xe3, 0xb5, 0x1d, 0xc8, 0x13, 0xd9, 0xfb, 0x2e, 0xaa, 0x4f, 0xf, 0x1d, 0x9f, 0x83, 0x4d, 0x7c, 0xad, 0x9c, 0x7c, 0x69, 0x5a, 0xe8, 0x4b, 0x32, 0x93, 0x85, 0xbc, 0xb, 0xef, 0x89, 0x5b, 0x9f, 0x1e, 0xdf, 0x44, 0xa0, 0x3d, 0x4b, 0x41, 0xc, 0xc2, 0x3a, 0x79, 0xa6, 0xb6, 0x2e, 0x4f, 0x34, 0x6a, 0x5e, 0x8d, 0xd8, 0x51, 0xc2, 0x85, 0x79, 0x95, 0xdd, 0xbf, 0x5b, 0x2d, 0x71, 0x7a, 0xeb, 0x84, 0x73, 0x10, 0xe1, 0xf6, 0xa4, 0x6a, 0xc3, 0xd2, 0x6a, 0x7f, 0x9b, 0x44, 0x98, 0x5a, 0xf6, 0x56, 0xd2, 0xb7, 0xc9, 0x40, 0x6e, 0x8a, 0x9e, 0x8f, 0x47, 0xdc, 0xb4, 0xef, 0x6b, 0x83, 0xca, 0xac, 0xf9, 0xae, 0xfb, 0x61, 0x18, 0xbf, 0xcf, 0xf7, 0xe4, 0x4b, 0xef, 0x69, 0x37, 0xeb, 0xdd, 0xc8, 0x91, 0x86, 0x83, 0x9b, 0x77}, - output224: []byte{0x10, 0x29, 0xca, 0x11, 0x79, 0x57, 0xd8, 0xf, 0x3c, 0x85, 0x9e, 0x83, 0x94, 0xdd, 0x34, 0x96, 0x93, 0x31, 0xca, 0x3b, 0xce, 0xdc, 0x43, 0x6b, 0x1e, 0xab, 0x8, 0x49}, - output256: []byte{0xe8, 0x3e, 0xa2, 0x1f, 0x5b, 0xc0, 0x97, 0x69, 0x53, 0xaf, 0x86, 0x6, 0x9a, 0x10, 0xeb, 0x60, 0x24, 0xa1, 0xac, 0x59, 0xd6, 0x9, 0x68, 0x8e, 0x4a, 0x97, 0x59, 0xbb, 0x8b, 0x6c, 0x94, 0x41}, - output384: []byte{0xb5, 0xa7, 0x16, 0x1, 0x12, 0xe0, 0x82, 0x5a, 0x7c, 0x3, 0x64, 0x3b, 0xeb, 0x98, 0xb1, 0xfc, 0x25, 0x49, 0xb8, 0x1f, 0x1, 0xc3, 0xc4, 0x27, 0x1d, 0xff, 0x99, 0xbe, 0x57, 0xd4, 0x72, 0xa7, 0xfa, 0xd1, 0x33, 0x80, 0x8d, 0x7d, 0x2d, 0x41, 0x4d, 0x60, 0x11, 0xe9, 0xa2, 0xe8, 0xdf, 0xec}, - output512: []byte{0x2a, 0x11, 0xcb, 0x69, 0x21, 0xea, 0x66, 0x2a, 0x39, 0xdd, 0xee, 0x79, 0x82, 0xe3, 0xcf, 0x5b, 0x31, 0x71, 0x95, 0x66, 0x1d, 0x55, 0x5, 0xad, 0x4, 0xd1, 0x1e, 0xe2, 0x3e, 0x17, 0x8e, 0xd6, 0x5f, 0x3e, 0x6, 0xa7, 0xf0, 0x96, 0xf4, 0xea, 0xf1, 0xff, 0x6a, 0x9, 0x23, 0x9c, 0xf5, 0xa0, 0xa3, 0x9d, 0xc9, 0xf4, 0xc9, 0x2a, 0xf6, 0x3f, 0xdf, 0x72, 0x11, 0xe1, 0xcf, 0x46, 0x76, 0x53}}, - testcase{ - msg: []byte{0xfa, 0x56, 0xbf, 0x73, 0xc, 0x4f, 0x83, 0x95, 0x87, 0x51, 0x89, 0xc1, 0xc, 0x4f, 0xb2, 0x51, 0x60, 0x57, 0x57, 0xa8, 0xfe, 0xcc, 0x31, 0xf9, 0x73, 0x7e, 0x3c, 0x25, 0x3, 0xb0, 0x26, 0x8, 0xe6, 0x73, 0x1e, 0x85, 0xd7, 0xa3, 0x83, 0x93, 0xc6, 0x7d, 0xe5, 0x16, 0xb8, 0x53, 0x4, 0x82, 0x4b, 0xfb, 0x13, 0x5e, 0x33, 0xbf, 0x22, 0xb3, 0xa2, 0x3b, 0x91, 0x3b, 0xf6, 0xac, 0xd2, 0xb7, 0xab, 0x85, 0x19, 0x8b, 0x81, 0x87, 0xb2, 0xbc, 0xd4, 0x54, 0xd5, 0xe3, 0x31, 0x8c, 0xac, 0xb3, 0x2f, 0xd6, 0x26, 0x1c, 0x31, 0xae, 0x7f, 0x6c, 0x54, 0xef, 0x6a, 0x7a, 0x2a, 0x4c, 0x9f, 0x3e, 0xcb, 0x81, 0xce, 0x35, 0x55, 0xd4, 0xf0, 0xad, 0x46, 0x6d, 0xd4, 0xc1, 0x8, 0xa9, 0x3, 0x99, 0xd7, 0x0, 0x41, 0x99, 0x7c, 0x3b, 0x25, 0x34, 0x5a, 0x96, 0x53, 0xf3, 0xc9, 0xa6, 0x71, 0x1a, 0xb1, 0xb9, 0x1d, 0x6a, 0x9d, 0x22, 0x16, 0x44, 0x2d, 0xa2, 0xc9, 0x73, 0xcb, 0xd6, 0x85, 0xee, 0x76, 0x43, 0xbf, 0xd7, 0x73, 0x27, 0xa2, 0xf7, 0xae, 0x9c, 0xb2, 0x83, 0x62, 0xa, 0x8, 0x71, 0x6d, 0xfb, 0x46, 0x2e, 0x5c, 0x1d, 0x65, 0x43, 0x2c, 0xa9, 0xd5, 0x6a, 0x90, 0xe8, 0x11, 0x44, 0x3c, 0xd1, 0xec, 0xb8, 0xf0, 0xde, 0x17, 0x9c, 0x9c, 0xb4, 0x8b, 0xa4, 0xf6, 0xfe, 0xc3, 0x60, 0xc6, 0x6f, 0x25, 0x2f, 0x6e, 0x64, 0xed, 0xc9, 0x6b}, - output224: []byte{0x60, 0x96, 0xe9, 0x91, 0x4c, 0x1a, 0xc9, 0x3a, 0x68, 0x9, 0xde, 0x7a, 0xd9, 0x11, 0x19, 0xc6, 0x37, 0xb0, 0xb, 0xbd, 0x64, 0xdc, 0xc3, 0xe1, 0xfa, 0xc1, 0xe1, 0xed}, - output256: []byte{0xa2, 0xd9, 0x3c, 0x63, 0x67, 0xe1, 0x86, 0x28, 0x9, 0xd3, 0x67, 0xec, 0x37, 0xf9, 0xda, 0x44, 0xcb, 0x3a, 0x8b, 0x43, 0x19, 0xc6, 0xa0, 0x94, 0xc5, 0xe7, 0xd7, 0x26, 0x6f, 0xe3, 0xa5, 0x93}, - output384: []byte{0xe7, 0xb3, 0x11, 0x8d, 0x7f, 0xca, 0x9d, 0x29, 0x4f, 0x59, 0x6d, 0x82, 0xf, 0x46, 0x8c, 0xd9, 0x2, 0x79, 0x20, 0x77, 0x7a, 0x41, 0xa7, 0x6, 0xed, 0xe8, 0x77, 0xcb, 0xeb, 0x95, 0x17, 0xf2, 0x23, 0xb2, 0x68, 0xc5, 0xe8, 0x5, 0xa3, 0x74, 0x5, 0x18, 0x22, 0x69, 0x2e, 0x9a, 0xb4, 0x4b}, - output512: []byte{0x91, 0x96, 0xbb, 0xbd, 0x19, 0x45, 0x41, 0xff, 0xee, 0x7e, 0xdb, 0xab, 0x97, 0x7, 0x38, 0xbd, 0xd3, 0xaa, 0xdb, 0xd6, 0xb7, 0x3d, 0x1c, 0x85, 0xb5, 0x80, 0xaf, 0xac, 0x12, 0x32, 0xae, 0x80, 0x77, 0xf7, 0x43, 0xce, 0x8b, 0x5b, 0x6f, 0x2b, 0x41, 0x8b, 0x51, 0x34, 0xcc, 0xcd, 0x4f, 0x83, 0x64, 0x5e, 0x86, 0x31, 0x88, 0x5b, 0x14, 0xfb, 0xbc, 0xb9, 0x9, 0xa9, 0x83, 0x6c, 0x37, 0x4c}}, - testcase{ - msg: []byte{0xb6, 0x13, 0x4f, 0x9c, 0x3e, 0x91, 0xdd, 0x80, 0x0, 0x74, 0xd, 0x0, 0x9d, 0xd8, 0x6, 0x24, 0x8, 0x11, 0xd5, 0x1a, 0xb1, 0x54, 0x6a, 0x97, 0x4b, 0xcb, 0x18, 0xd3, 0x44, 0x64, 0x2b, 0xaa, 0x5c, 0xd5, 0x90, 0x3a, 0xf8, 0x4d, 0x58, 0xec, 0x5b, 0xa1, 0x73, 0x1, 0xd5, 0xec, 0xf, 0x10, 0xcc, 0xd0, 0x50, 0x9c, 0xbb, 0x3f, 0xd3, 0xff, 0xf9, 0x17, 0x2d, 0x19, 0x3a, 0xf0, 0xf7, 0x82, 0x25, 0x2f, 0xd1, 0x33, 0x8c, 0x72, 0x44, 0xd4, 0xe, 0xe, 0x42, 0x36, 0x22, 0x75, 0xb2, 0x2d, 0x1, 0xc4, 0xc3, 0x38, 0x9f, 0x19, 0xdd, 0x69, 0xbd, 0xf9, 0x58, 0xeb, 0xe2, 0x8e, 0x31, 0xa4, 0xff, 0xe2, 0xb5, 0xf1, 0x8a, 0x87, 0x83, 0x1c, 0xfb, 0x70, 0x95, 0xf5, 0x8a, 0x87, 0xc9, 0xfa, 0x21, 0xdb, 0x72, 0xba, 0x26, 0x93, 0x79, 0xb2, 0xdc, 0x23, 0x84, 0xb3, 0xda, 0x95, 0x3c, 0x79, 0x25, 0x76, 0x1f, 0xed, 0x32, 0x46, 0x20, 0xac, 0xea, 0x43, 0x5e, 0x52, 0xb4, 0x24, 0xa7, 0x72, 0x3f, 0x6a, 0x23, 0x57, 0x37, 0x41, 0x57, 0xa3, 0x4c, 0xd8, 0x25, 0x23, 0x51, 0xc2, 0x5a, 0x1b, 0x23, 0x28, 0x26, 0xce, 0xfe, 0x1b, 0xd3, 0xe7, 0xf, 0xfc, 0x15, 0xa3, 0x1e, 0x7c, 0x5, 0x98, 0x21, 0x9d, 0x7f, 0x0, 0x43, 0x62, 0x94, 0xd1, 0x18, 0x91, 0xb8, 0x24, 0x97, 0xbc, 0x78, 0xaa, 0x53, 0x63, 0x89, 0x2a, 0x24, 0x95, 0xdf, 0x8c, 0x1e, 0xef}, - output224: []byte{0xf5, 0x83, 0xf0, 0x7d, 0xf2, 0x32, 0x78, 0x87, 0xc6, 0xf1, 0xa, 0x9b, 0x1d, 0x50, 0x9a, 0x74, 0x4f, 0x3c, 0x29, 0x4a, 0x42, 0x27, 0x97, 0x6e, 0x3c, 0x37, 0x22, 0xe8}, - output256: []byte{0x3c, 0x64, 0x7b, 0x19, 0x5f, 0x22, 0xdc, 0x16, 0xd6, 0xde, 0xcc, 0x88, 0x73, 0x1, 0x7d, 0xf3, 0x69, 0xee, 0x1c, 0x46, 0x96, 0x34, 0x9, 0x34, 0xdb, 0x15, 0x8d, 0xc4, 0x5, 0x9c, 0x76, 0xdf}, - output384: []byte{0xc3, 0xfa, 0x6c, 0x9d, 0xf, 0xf2, 0x31, 0x19, 0x8a, 0xec, 0xa8, 0xe, 0xa4, 0x28, 0xac, 0x4b, 0x32, 0xc4, 0x81, 0xd3, 0x90, 0xce, 0x4a, 0x90, 0xd0, 0xf6, 0x5f, 0xf7, 0xd5, 0x8f, 0x69, 0x6c, 0x1f, 0xaa, 0xda, 0x16, 0x73, 0xd7, 0xe2, 0xd1, 0x61, 0x46, 0x2c, 0x95, 0xc2, 0xe2, 0xa3, 0x10}, - output512: []byte{0x19, 0x59, 0xca, 0xe3, 0x60, 0xf, 0x12, 0x8f, 0x72, 0xe1, 0x82, 0x1c, 0x33, 0x7d, 0x84, 0x1b, 0x14, 0xcb, 0xbf, 0xef, 0x3a, 0x6d, 0x22, 0x28, 0x6f, 0x18, 0xbd, 0xfc, 0x3e, 0xf6, 0x35, 0x28, 0xc1, 0x1b, 0xff, 0xa8, 0x41, 0xa6, 0xd2, 0x20, 0x8a, 0xfe, 0xb5, 0x66, 0x4d, 0x52, 0x4d, 0xe8, 0x30, 0x90, 0xab, 0xd, 0xb0, 0x7c, 0xd4, 0x7e, 0xf5, 0x2f, 0x4d, 0x2e, 0xaa, 0x84, 0x54, 0xce}}, - testcase{ - msg: []byte{0xc9, 0x41, 0xcd, 0xb9, 0xc2, 0x8a, 0xb0, 0xa7, 0x91, 0xf2, 0xe5, 0xc8, 0xe8, 0xbb, 0x52, 0x85, 0x6, 0x26, 0xaa, 0x89, 0x20, 0x5b, 0xec, 0x3a, 0x7e, 0x22, 0x68, 0x23, 0x13, 0xd1, 0x98, 0xb1, 0xfa, 0x33, 0xfc, 0x72, 0x95, 0x38, 0x13, 0x54, 0x85, 0x87, 0x58, 0xae, 0x6c, 0x8e, 0xc6, 0xfa, 0xc3, 0x24, 0x5c, 0x6e, 0x45, 0x4d, 0x16, 0xfa, 0x2f, 0x51, 0xc4, 0x16, 0x6f, 0xab, 0x51, 0xdf, 0x27, 0x28, 0x58, 0xf2, 0xd6, 0x3, 0x77, 0xc, 0x40, 0x98, 0x7f, 0x64, 0x44, 0x2d, 0x48, 0x7a, 0xf4, 0x9c, 0xd5, 0xc3, 0x99, 0x1c, 0xe8, 0x58, 0xea, 0x2a, 0x60, 0xda, 0xb6, 0xa6, 0x5a, 0x34, 0x41, 0x49, 0x65, 0x93, 0x39, 0x73, 0xac, 0x24, 0x57, 0x8, 0x9e, 0x35, 0x91, 0x60, 0xb7, 0xcd, 0xed, 0xc4, 0x2f, 0x29, 0xe1, 0xa, 0x91, 0x92, 0x17, 0x85, 0xf6, 0xb7, 0x22, 0x4e, 0xe0, 0xb3, 0x49, 0x39, 0x3c, 0xdc, 0xff, 0x61, 0x51, 0xb5, 0xb, 0x37, 0x7d, 0x60, 0x95, 0x59, 0x92, 0x3d, 0x9, 0x84, 0xcd, 0xa6, 0x0, 0x8, 0x29, 0xb9, 0x16, 0xab, 0x68, 0x96, 0x69, 0x3e, 0xf6, 0xa2, 0x19, 0x9b, 0x3c, 0x22, 0xf7, 0xdc, 0x55, 0x0, 0xa1, 0x5b, 0x82, 0x58, 0x42, 0xe, 0x31, 0x4c, 0x22, 0x2b, 0xc0, 0x0, 0xbc, 0x4e, 0x54, 0x13, 0xe6, 0xdd, 0x82, 0xc9, 0x93, 0xf8, 0x33, 0xf, 0x5c, 0x6d, 0x1b, 0xe4, 0xbc, 0x79, 0xf0, 0x8a, 0x1a, 0xa, 0x46}, - output224: []byte{0xa9, 0xf4, 0x3b, 0x96, 0x21, 0xfc, 0x59, 0x2, 0xdf, 0x24, 0x58, 0xfd, 0x53, 0xd0, 0xcd, 0xe9, 0xa, 0xae, 0x70, 0x0, 0x85, 0x5c, 0x67, 0xd8, 0x53, 0xc7, 0x93, 0x7a}, - output256: []byte{0x3b, 0xb3, 0x94, 0xd0, 0x56, 0xd9, 0x4f, 0xde, 0x68, 0x92, 0xc, 0xd3, 0x83, 0x37, 0x8e, 0xe3, 0xab, 0xcc, 0x44, 0xb7, 0x25, 0x9d, 0x3d, 0xb9, 0xcd, 0xa, 0x89, 0x7e, 0x2, 0x1f, 0x7e, 0x2e}, - output384: []byte{0xc4, 0xbd, 0x11, 0x57, 0xc0, 0x93, 0xac, 0xb2, 0x7b, 0xd3, 0xbd, 0x7f, 0x44, 0x4f, 0x83, 0x6b, 0xfc, 0xba, 0xd, 0xaf, 0xe1, 0x16, 0x75, 0x10, 0x4c, 0x64, 0x37, 0xe5, 0x98, 0x14, 0x42, 0xbe, 0x99, 0x9c, 0x86, 0xd, 0xd6, 0xe1, 0xb7, 0x5f, 0xaf, 0x6a, 0x55, 0x3e, 0x90, 0x7b, 0x61, 0xee}, - output512: []byte{0xa9, 0x13, 0xdd, 0xc5, 0xbb, 0x8, 0x9c, 0x12, 0x1f, 0xf0, 0x93, 0xbe, 0x52, 0x92, 0x25, 0x14, 0x8d, 0xf7, 0x87, 0xd4, 0x8f, 0x4f, 0x61, 0x69, 0x9e, 0xff, 0x9f, 0xc2, 0x91, 0x2, 0x82, 0xa8, 0x98, 0xa8, 0x1a, 0x38, 0xd6, 0x6b, 0xe9, 0xb0, 0x64, 0x28, 0xd6, 0x46, 0x6a, 0x61, 0x4c, 0xa8, 0x22, 0xa8, 0x72, 0xc1, 0xc2, 0xc4, 0xd5, 0x3, 0xd4, 0x34, 0xd3, 0xb1, 0xd6, 0x94, 0x21, 0x2}}, - testcase{ - msg: []byte{0x44, 0x99, 0xef, 0xff, 0xac, 0x4b, 0xce, 0xa5, 0x27, 0x47, 0xef, 0xd1, 0xe4, 0xf2, 0xb, 0x73, 0xe4, 0x87, 0x58, 0xbe, 0x91, 0x5c, 0x88, 0xa1, 0xff, 0xe5, 0x29, 0x9b, 0xb, 0x0, 0x58, 0x37, 0xa4, 0x6b, 0x2f, 0x20, 0xa9, 0xcb, 0x3c, 0x6e, 0x64, 0xa9, 0xe3, 0xc5, 0x64, 0xa2, 0x7c, 0xf, 0x1c, 0x6a, 0xd1, 0x96, 0x3, 0x73, 0x3, 0x6e, 0xc5, 0xbf, 0xe1, 0xa8, 0xfc, 0x6a, 0x43, 0x5c, 0x21, 0x85, 0xed, 0xf, 0x11, 0x4c, 0x50, 0xe8, 0xb3, 0xe4, 0xc7, 0xed, 0x96, 0xb0, 0x6a, 0x3, 0x68, 0x19, 0xc9, 0x46, 0x3e, 0x86, 0x4a, 0x58, 0xd6, 0x28, 0x6f, 0x78, 0x5e, 0x32, 0xa8, 0x4, 0x44, 0x3a, 0x56, 0xaf, 0xb, 0x4d, 0xf6, 0xab, 0xc5, 0x7e, 0xd5, 0xc2, 0xb1, 0x85, 0xdd, 0xee, 0x84, 0x89, 0xea, 0x8, 0xd, 0xee, 0xee, 0x66, 0xaa, 0x33, 0xc2, 0xe6, 0xda, 0xb3, 0x62, 0x51, 0xc4, 0x2, 0x68, 0x2b, 0x68, 0x24, 0x82, 0x1f, 0x99, 0x8c, 0x32, 0x16, 0x31, 0x64, 0x29, 0x8e, 0x1f, 0xaf, 0xd3, 0x1b, 0xab, 0xbc, 0xff, 0xb5, 0x94, 0xc9, 0x18, 0x88, 0xc6, 0x21, 0x90, 0x79, 0xd9, 0x7, 0xfd, 0xb4, 0x38, 0xed, 0x89, 0x52, 0x9d, 0x6d, 0x96, 0x21, 0x2f, 0xd5, 0x5a, 0xbe, 0x20, 0x39, 0x9d, 0xbe, 0xfd, 0x34, 0x22, 0x48, 0x50, 0x74, 0x36, 0x93, 0x1c, 0xde, 0xad, 0x49, 0x6e, 0xb6, 0xe4, 0xa8, 0x3, 0x58, 0xac, 0xc7, 0x86, 0x47, 0xd0, 0x43}, - output224: []byte{0xe9, 0x67, 0x5f, 0xaa, 0xc3, 0x7c, 0x93, 0xaa, 0x61, 0xff, 0x97, 0x30, 0x67, 0x9a, 0x3d, 0x12, 0x9, 0xad, 0xba, 0xd4, 0x65, 0x25, 0x82, 0xdf, 0xf5, 0xb1, 0xba, 0xaf}, - output256: []byte{0x43, 0x64, 0xf, 0x40, 0x86, 0x13, 0xcb, 0xf7, 0x39, 0x3d, 0x90, 0xb, 0x92, 0x1f, 0x22, 0xb8, 0x26, 0x35, 0x7f, 0x3b, 0x4f, 0xdf, 0xf7, 0x16, 0x8e, 0xc4, 0x5c, 0xbf, 0xb3, 0xef, 0x5e, 0xff}, - output384: []byte{0xd0, 0x99, 0xf3, 0xc8, 0x5, 0x2c, 0xaa, 0x2c, 0xf9, 0x75, 0x1b, 0x1e, 0xd2, 0xd4, 0x72, 0xc2, 0x1f, 0xed, 0x66, 0x78, 0x92, 0xbc, 0x1c, 0x41, 0x76, 0x0, 0xa4, 0xc9, 0x3e, 0xff, 0xe8, 0x8f, 0x1b, 0x17, 0xb3, 0x6d, 0x37, 0xe4, 0xd2, 0x6b, 0x9c, 0xd6, 0x5a, 0xcb, 0x13, 0xa6, 0xdb, 0x6f}, - output512: []byte{0xf1, 0xb, 0x91, 0x56, 0x4a, 0xd9, 0x3d, 0x73, 0x47, 0x43, 0x28, 0x19, 0x49, 0xba, 0xce, 0xf0, 0x65, 0xa6, 0x43, 0x2a, 0x45, 0x52, 0x36, 0xf1, 0xbf, 0x79, 0x8d, 0xe9, 0xae, 0xc6, 0xcc, 0xac, 0x9b, 0x8d, 0x37, 0x3b, 0x7, 0xc5, 0xac, 0xfb, 0xd6, 0x76, 0xef, 0x21, 0xe4, 0xa3, 0xa9, 0xe0, 0xf7, 0xc3, 0x8e, 0x87, 0x56, 0xd1, 0x77, 0xd0, 0xa5, 0xc2, 0x83, 0xd5, 0x20, 0x84, 0x4b, 0x4d}}, - testcase{ - msg: []byte{0xee, 0xcb, 0xb8, 0xfd, 0xfa, 0x4d, 0xa6, 0x21, 0x70, 0xfd, 0x6, 0x72, 0x7f, 0x69, 0x7d, 0x81, 0xf8, 0x3f, 0x60, 0x1f, 0xf6, 0x1e, 0x47, 0x81, 0x5, 0xd3, 0xcb, 0x75, 0x2, 0xf2, 0xc8, 0x9b, 0xf3, 0xe8, 0xf5, 0x6e, 0xdd, 0x46, 0x9d, 0x4, 0x98, 0x7, 0xa3, 0x88, 0x82, 0xa7, 0xee, 0xfb, 0xc8, 0x5f, 0xc9, 0xa9, 0x50, 0x95, 0x2e, 0x9f, 0xa8, 0x4b, 0x8a, 0xfe, 0xbd, 0x3c, 0xe7, 0x82, 0xd4, 0xda, 0x59, 0x80, 0x2, 0x82, 0x7b, 0x1e, 0xb9, 0x88, 0x82, 0xea, 0x1f, 0xa, 0x8f, 0x7a, 0xa9, 0xce, 0x1, 0x3a, 0x6e, 0x9b, 0xc4, 0x62, 0xfb, 0x66, 0xc8, 0xd4, 0xa1, 0x8d, 0xa2, 0x14, 0x1, 0xe1, 0xb9, 0x33, 0x56, 0xeb, 0x12, 0xf3, 0x72, 0x5b, 0x6d, 0xb1, 0x68, 0x4f, 0x23, 0x0, 0xa9, 0x8b, 0x9a, 0x11, 0x9e, 0x5d, 0x27, 0xff, 0x70, 0x4a, 0xff, 0xb6, 0x18, 0xe1, 0x27, 0x8, 0xe7, 0x7e, 0x6e, 0x5f, 0x34, 0x13, 0x9a, 0x5a, 0x41, 0x13, 0x1f, 0xd1, 0xd6, 0x33, 0x6c, 0x27, 0x2a, 0x8f, 0xc3, 0x70, 0x80, 0xf0, 0x41, 0xc7, 0x13, 0x41, 0xbe, 0xe6, 0xab, 0x55, 0xc, 0xb4, 0xa2, 0xa, 0x6d, 0xdb, 0x6a, 0x8e, 0x2, 0x99, 0xf2, 0xb1, 0x4b, 0xc7, 0x30, 0xc5, 0x4b, 0x8b, 0x1c, 0x1c, 0x48, 0x7b, 0x49, 0x4b, 0xdc, 0xcf, 0xd3, 0xa5, 0x35, 0x35, 0xab, 0x2f, 0x23, 0x15, 0x90, 0xbf, 0x2c, 0x40, 0x62, 0xfd, 0x2a, 0xd5, 0x8f, 0x90, 0x6a, 0x2d, 0xd}, - output224: []byte{0xcd, 0xb5, 0x0, 0x74, 0x8, 0x12, 0xa0, 0xd7, 0xc, 0x68, 0xd0, 0x9, 0x7d, 0xcc, 0x7a, 0xca, 0x86, 0xec, 0x6, 0x6c, 0x89, 0xd3, 0x66, 0x42, 0x87, 0x9a, 0x74, 0xa5}, - output256: []byte{0xcb, 0x37, 0x13, 0xa5, 0xd5, 0xab, 0xbc, 0x6a, 0xf7, 0x2f, 0x8b, 0x38, 0xa7, 0x1, 0xc7, 0x12, 0x69, 0xb3, 0xb5, 0x1c, 0x62, 0xec, 0x51, 0x16, 0xf9, 0x6a, 0xd0, 0xd4, 0x2a, 0x10, 0xfd, 0x90}, - output384: []byte{0x7a, 0x9f, 0xe1, 0x3f, 0xe3, 0x31, 0x81, 0x21, 0xba, 0xbb, 0x34, 0xa, 0x3b, 0x4, 0x5d, 0xc8, 0x9d, 0x1b, 0xe2, 0xd0, 0xec, 0x5, 0x80, 0x2c, 0x92, 0x54, 0xfe, 0xc3, 0x9e, 0xfc, 0xde, 0x16, 0x3c, 0x51, 0x4d, 0xcd, 0xba, 0x3f, 0xf9, 0x3f, 0x9b, 0x9, 0x74, 0x86, 0xc2, 0x1, 0x23, 0x85}, - output512: []byte{0xef, 0x26, 0xa1, 0xba, 0xf3, 0x3d, 0x4d, 0xe0, 0x47, 0xbd, 0xd2, 0xce, 0x34, 0x73, 0x6e, 0x4, 0x2e, 0xcd, 0x33, 0xaa, 0x56, 0x9f, 0xfc, 0xc, 0xb8, 0x1e, 0xcf, 0xa6, 0x6e, 0x9f, 0x87, 0xda, 0x8d, 0x2, 0x5e, 0xcb, 0xa2, 0x4b, 0xcb, 0x18, 0x7e, 0x42, 0x1, 0x4, 0x6f, 0xb9, 0x9a, 0x2, 0xdf, 0xa6, 0xf1, 0xbf, 0x88, 0xec, 0x2b, 0x88, 0xde, 0x21, 0x6c, 0xf7, 0x59, 0xfa, 0xc4, 0x1d}}, - testcase{ - msg: []byte{0xe6, 0x4f, 0x3e, 0x4a, 0xce, 0x5c, 0x84, 0x18, 0xd6, 0x5f, 0xec, 0x2b, 0xc5, 0xd2, 0xa3, 0x3, 0xdd, 0x45, 0x80, 0x34, 0x73, 0x6e, 0x3b, 0xd, 0xf7, 0x19, 0x9, 0x8b, 0xe7, 0xa2, 0x6, 0xde, 0xaf, 0x52, 0xd6, 0xba, 0x82, 0x31, 0x6c, 0xaf, 0x33, 0xe, 0xf8, 0x52, 0x37, 0x51, 0x88, 0xcd, 0xe2, 0xb3, 0x9c, 0xc9, 0x4a, 0xa4, 0x49, 0x57, 0x8a, 0x7e, 0x2a, 0x8e, 0x3f, 0x5a, 0x9d, 0x68, 0xe8, 0x16, 0xb8, 0xd1, 0x68, 0x89, 0xfb, 0xc0, 0xeb, 0xf0, 0x93, 0x9d, 0x4, 0xf6, 0x30, 0x33, 0xae, 0x9a, 0xe2, 0xbd, 0xab, 0x73, 0xb8, 0x8c, 0x26, 0xd6, 0xbd, 0x25, 0xee, 0x46, 0xe, 0xe1, 0xef, 0x58, 0xfb, 0xa, 0xfa, 0x92, 0xcc, 0x53, 0x9f, 0x8c, 0x76, 0xd3, 0xd0, 0x97, 0xe7, 0xa6, 0xa6, 0x3e, 0xbb, 0x9b, 0x58, 0x87, 0xed, 0xf3, 0xcf, 0x7, 0x60, 0x28, 0xc5, 0xbb, 0xd5, 0xb9, 0xdb, 0x32, 0x11, 0x37, 0x1a, 0xd3, 0xfe, 0x12, 0x1d, 0x4e, 0x9b, 0xf4, 0x42, 0x29, 0xf4, 0xe1, 0xec, 0xf5, 0xa0, 0xf9, 0xf0, 0xeb, 0xa4, 0xd5, 0xce, 0xb7, 0x28, 0x78, 0xab, 0x22, 0xc3, 0xf0, 0xeb, 0x5a, 0x62, 0x53, 0x23, 0xac, 0x66, 0xf7, 0x6, 0x1f, 0x4a, 0x81, 0xfa, 0xc8, 0x34, 0x47, 0x1e, 0xc, 0x59, 0x55, 0x3f, 0x10, 0x84, 0x75, 0xfe, 0x29, 0xd, 0x43, 0xe6, 0xa0, 0x55, 0xae, 0x3e, 0xe4, 0x6f, 0xb6, 0x74, 0x22, 0xf8, 0x14, 0xa6, 0x8c, 0x4b, 0xe3, 0xe8, 0xc9}, - output224: []byte{0x66, 0xf2, 0x5, 0xd7, 0x14, 0x79, 0x91, 0xa9, 0x40, 0xaf, 0xfb, 0x74, 0x1, 0xb6, 0x92, 0x27, 0x53, 0x38, 0x51, 0x9a, 0x97, 0x60, 0x8c, 0x58, 0x43, 0x62, 0xff, 0xee}, - output256: []byte{0xb3, 0x4, 0xfc, 0x4c, 0xa2, 0x21, 0x31, 0x85, 0x7d, 0x24, 0x2e, 0xb1, 0x2f, 0xe8, 0x99, 0xed, 0x9e, 0x6b, 0x55, 0x71, 0x7c, 0x33, 0x60, 0xf1, 0x13, 0x51, 0x2a, 0x84, 0x17, 0x4e, 0x6a, 0x77}, - output384: []byte{0x8a, 0xee, 0xde, 0x5d, 0x6e, 0x2f, 0x9f, 0x1c, 0x7a, 0x66, 0x44, 0xa8, 0xda, 0xf, 0x93, 0x57, 0x4d, 0xf8, 0xca, 0x33, 0xb2, 0xed, 0x9d, 0x36, 0x46, 0x15, 0xe1, 0xf9, 0xcf, 0x1a, 0x80, 0x13, 0x15, 0x41, 0x7, 0x33, 0x88, 0x1c, 0xe0, 0xda, 0xd2, 0xf6, 0xfb, 0x5a, 0x91, 0x6a, 0x97, 0xe1}, - output512: []byte{0xf8, 0xe0, 0x79, 0xa6, 0xdc, 0x5a, 0x6a, 0x7e, 0x7f, 0x32, 0xff, 0x7e, 0x80, 0x15, 0xd1, 0xb2, 0x6d, 0x43, 0xb5, 0x4f, 0x16, 0x6f, 0x21, 0x11, 0xcf, 0xb2, 0xb1, 0xeb, 0x23, 0x8c, 0xab, 0xee, 0x58, 0x63, 0xe, 0xf8, 0x45, 0xe0, 0xdb, 0x0, 0xdd, 0xf1, 0xd8, 0x0, 0xad, 0x67, 0xce, 0x7b, 0x2b, 0x65, 0x8b, 0x42, 0x11, 0x8c, 0xc1, 0x5c, 0x8e, 0xf3, 0xbc, 0x9f, 0xb2, 0x52, 0xdb, 0x64}}, - testcase{ - msg: []byte{0xd2, 0xcb, 0x2d, 0x73, 0x30, 0x33, 0xf9, 0xe9, 0x13, 0x95, 0x31, 0x28, 0x8, 0x38, 0x3c, 0xc4, 0xf0, 0xca, 0x97, 0x4e, 0x87, 0xec, 0x68, 0x40, 0xd, 0x52, 0xe9, 0x6b, 0x3f, 0xa6, 0x98, 0x4a, 0xc5, 0x8d, 0x9a, 0xd0, 0x93, 0x8d, 0xde, 0x5a, 0x97, 0x30, 0x8, 0xd8, 0x18, 0xc4, 0x96, 0x7, 0xd9, 0xde, 0x22, 0x84, 0xe7, 0x61, 0x8f, 0x1b, 0x8a, 0xed, 0x83, 0x72, 0xfb, 0xd5, 0x2e, 0xd5, 0x45, 0x57, 0xaf, 0x42, 0x20, 0xfa, 0xc0, 0x9d, 0xfa, 0x84, 0x43, 0x1, 0x16, 0x99, 0xb9, 0x7d, 0x74, 0x3f, 0x8f, 0x2b, 0x1a, 0xef, 0x35, 0x37, 0xeb, 0xb4, 0x5d, 0xcc, 0x9e, 0x13, 0xdf, 0xb4, 0x38, 0x42, 0x8e, 0xe1, 0x90, 0xa4, 0xef, 0xdb, 0x3c, 0xae, 0xb7, 0xf3, 0x93, 0x31, 0x17, 0xbf, 0x63, 0xab, 0xdc, 0x7e, 0x57, 0xbe, 0xb4, 0x17, 0x1c, 0x7e, 0x1a, 0xd2, 0x60, 0xab, 0x5, 0x87, 0x80, 0x6c, 0x4d, 0x13, 0x7b, 0x63, 0x16, 0xb5, 0xa, 0xbc, 0x9c, 0xce, 0xd, 0xff, 0x3a, 0xca, 0xda, 0x47, 0xbb, 0xb8, 0x6b, 0xe7, 0x77, 0xe6, 0x17, 0xbb, 0xe5, 0x78, 0xff, 0x45, 0x19, 0x84, 0x4d, 0xb3, 0x60, 0xe0, 0xa9, 0x6c, 0x67, 0x1, 0x29, 0xe, 0x76, 0xbb, 0x95, 0xd2, 0x6f, 0xf, 0x80, 0x4c, 0x8a, 0x4f, 0x27, 0x17, 0xea, 0xc4, 0xe7, 0xde, 0x9f, 0x2c, 0xff, 0x3b, 0xbc, 0x55, 0xa1, 0x7e, 0x77, 0x6c, 0xd, 0x2, 0x85, 0x60, 0x32, 0xa6, 0xcd, 0x10, 0xad, 0x28, 0x38}, - output224: []byte{0x90, 0x9f, 0xb2, 0x92, 0x77, 0xab, 0x2c, 0x4c, 0xe4, 0x27, 0x9c, 0x48, 0x5d, 0x4f, 0xba, 0x7e, 0x18, 0xff, 0x1a, 0x88, 0xc6, 0x6d, 0xaf, 0x7a, 0xcf, 0x63, 0x3, 0x10}, - output256: []byte{0xa3, 0xca, 0x83, 0xd, 0x47, 0x71, 0xc1, 0xba, 0xa7, 0xfa, 0xda, 0x76, 0xc5, 0xfc, 0xea, 0xdd, 0xf, 0x3c, 0xb9, 0x73, 0x6e, 0x19, 0xcf, 0xec, 0x52, 0xe9, 0xe7, 0x4f, 0x56, 0xbf, 0xdd, 0x55}, - output384: []byte{0x29, 0xe6, 0x2d, 0x8c, 0x1b, 0x71, 0xf8, 0x26, 0x54, 0x4a, 0xc, 0xbf, 0xcd, 0xd9, 0x9c, 0xf8, 0xaa, 0x1c, 0x97, 0xe1, 0x53, 0x6, 0x31, 0x20, 0xd2, 0x95, 0xed, 0xf6, 0x9e, 0x2e, 0xcb, 0x5a, 0x27, 0x83, 0xc6, 0x67, 0x60, 0xd0, 0xf8, 0x7b, 0xf9, 0x44, 0x51, 0x68, 0x24, 0xcc, 0xfc, 0xb1}, - output512: []byte{0xa5, 0xbf, 0xaa, 0x52, 0x49, 0x9a, 0x68, 0x8d, 0x9c, 0x8d, 0x3d, 0xdc, 0xb, 0xa0, 0x6d, 0xec, 0xdf, 0x38, 0x29, 0xbe, 0x5d, 0x44, 0x4a, 0xcf, 0xa4, 0x12, 0xf4, 0xc6, 0xe8, 0x63, 0xf4, 0x78, 0x6b, 0xe9, 0x93, 0x58, 0x5, 0x31, 0x7, 0x34, 0xe4, 0xf0, 0xaf, 0xfe, 0x5, 0x55, 0x89, 0x99, 0x80, 0x74, 0x8, 0xe9, 0x7e, 0x10, 0xf, 0xad, 0xd0, 0xc9, 0x3f, 0xf1, 0x60, 0xf8, 0xb1, 0x1b}}, - testcase{ - msg: []byte{0xf2, 0x99, 0x89, 0x55, 0x61, 0x3d, 0xd4, 0x14, 0xcc, 0x11, 0x1d, 0xf5, 0xce, 0x30, 0xa9, 0x95, 0xbb, 0x79, 0x2e, 0x26, 0xb, 0xe, 0x37, 0xa5, 0xb1, 0xd9, 0x42, 0xfe, 0x90, 0x17, 0x1a, 0x4a, 0xc2, 0xf6, 0x6d, 0x49, 0x28, 0xd7, 0xad, 0x37, 0x7f, 0x4d, 0x5, 0x54, 0xcb, 0xf4, 0xc5, 0x23, 0xd2, 0x1f, 0x6e, 0x5f, 0x37, 0x9d, 0x6f, 0x4b, 0x2, 0x8c, 0xdc, 0xb9, 0xb1, 0x75, 0x8d, 0x3b, 0x39, 0x66, 0x32, 0x42, 0xff, 0x3c, 0xb6, 0xed, 0xe6, 0xa3, 0x6a, 0x6f, 0x5, 0xdb, 0x3b, 0xc4, 0x1e, 0xd, 0x86, 0x1b, 0x38, 0x4b, 0x6d, 0xec, 0x58, 0xbb, 0x9, 0x6d, 0xa, 0x42, 0x2f, 0xd5, 0x42, 0xdf, 0x17, 0x5e, 0x1b, 0xe1, 0x57, 0x1f, 0xb5, 0x2a, 0xe6, 0x6f, 0x2d, 0x86, 0xa2, 0xf6, 0x82, 0x4a, 0x8c, 0xfa, 0xac, 0xba, 0xc4, 0xa7, 0x49, 0x2a, 0xd0, 0x43, 0x3e, 0xeb, 0x15, 0x45, 0x4a, 0xf8, 0xf3, 0x12, 0xb3, 0xb2, 0xa5, 0x77, 0x75, 0xe, 0x3e, 0xfb, 0xd3, 0x70, 0xe8, 0xa8, 0xca, 0xc1, 0x58, 0x25, 0x81, 0x97, 0x1f, 0xba, 0x3b, 0xa4, 0xbd, 0xd, 0x76, 0xe7, 0x18, 0xda, 0xcf, 0x84, 0x33, 0xd3, 0x3a, 0x59, 0xd2, 0x87, 0xf8, 0xcc, 0x92, 0x23, 0x4e, 0x7a, 0x27, 0x10, 0x41, 0xb5, 0x26, 0xe3, 0x89, 0xef, 0xb0, 0xe4, 0xb, 0x6a, 0x18, 0xb3, 0xaa, 0xf6, 0x58, 0xe8, 0x2e, 0xd1, 0xc7, 0x86, 0x31, 0xfd, 0x23, 0xb4, 0xc3, 0xeb, 0x27, 0xc3, 0xfa, 0xec, 0x86, 0x85}, - output224: []byte{0xed, 0x53, 0x5e, 0xc0, 0x75, 0xc9, 0x83, 0xa0, 0x8f, 0x7d, 0x7a, 0xd5, 0x71, 0x4e, 0xbc, 0x84, 0x6f, 0x25, 0xe8, 0x66, 0x14, 0x92, 0xb2, 0xb3, 0x19, 0x78, 0xed, 0xf2}, - output256: []byte{0xca, 0x15, 0x8c, 0x46, 0x37, 0xe, 0x64, 0xa9, 0xf0, 0x32, 0xf5, 0xba, 0x8e, 0x9, 0x14, 0x60, 0xfd, 0x55, 0x5e, 0xf7, 0x0, 0xed, 0xf7, 0x8, 0x7e, 0x56, 0xbe, 0xbf, 0xfa, 0x26, 0x1d, 0xe7}, - output384: []byte{0xeb, 0x2f, 0x1b, 0xf2, 0xd9, 0xee, 0x85, 0x7b, 0x18, 0x93, 0x18, 0xdf, 0xaf, 0x49, 0xdc, 0x3f, 0xad, 0x79, 0x50, 0x11, 0x89, 0xac, 0x9b, 0x57, 0x65, 0xdf, 0xb2, 0x34, 0xec, 0x4a, 0x62, 0xf0, 0xb0, 0xe3, 0x4e, 0x7a, 0xc3, 0xf4, 0x94, 0xd6, 0xf0, 0x5c, 0x7b, 0xb8, 0x6a, 0xe5, 0xcd, 0xa2}, - output512: []byte{0xcc, 0xea, 0x9f, 0xcf, 0x1a, 0xd9, 0x32, 0x70, 0xac, 0x46, 0x90, 0xe9, 0x6b, 0x87, 0x51, 0x22, 0xc5, 0xb5, 0xec, 0x20, 0xd2, 0xcc, 0x27, 0x7, 0x9c, 0xbf, 0x89, 0x31, 0x26, 0xc4, 0x4e, 0x2, 0x8, 0xa8, 0xbf, 0xa1, 0x39, 0x5, 0x7d, 0x72, 0xbd, 0x26, 0x38, 0x5, 0x9e, 0xc8, 0xda, 0x8a, 0x72, 0x4, 0x99, 0xaf, 0x9d, 0x4c, 0x11, 0x7f, 0x86, 0x79, 0x9d, 0x75, 0x15, 0xdf, 0xc6, 0xe0}}, - testcase{ - msg: []byte{0x44, 0x77, 0x97, 0xe2, 0x89, 0x9b, 0x72, 0xa3, 0x56, 0xba, 0x55, 0xbf, 0x4d, 0xf3, 0xac, 0xca, 0x6c, 0xdb, 0x10, 0x41, 0xeb, 0x47, 0x7b, 0xd1, 0x83, 0x4a, 0x9f, 0x9a, 0xcb, 0xc3, 0x40, 0xa2, 0x94, 0xd7, 0x29, 0xf2, 0xf9, 0x7d, 0xf3, 0xa6, 0x10, 0xbe, 0xf, 0xf1, 0x5e, 0xdb, 0x9c, 0x6d, 0x5d, 0xb4, 0x16, 0x44, 0xb9, 0x87, 0x43, 0x60, 0x14, 0xf, 0xc6, 0x4f, 0x52, 0xaa, 0x3, 0xf0, 0x28, 0x6c, 0x8a, 0x64, 0x6, 0x70, 0x6, 0x7a, 0x84, 0xe0, 0x17, 0x92, 0x6a, 0x70, 0x43, 0x8d, 0xb1, 0xbb, 0x36, 0x1d, 0xef, 0xee, 0x73, 0x17, 0x2, 0x14, 0x25, 0xf8, 0x82, 0x1d, 0xef, 0x26, 0xd1, 0xef, 0xd7, 0x7f, 0xc8, 0x53, 0xb8, 0x18, 0x54, 0x5d, 0x5, 0x5a, 0xdc, 0x92, 0x84, 0x79, 0x6e, 0x58, 0x3c, 0x76, 0xe6, 0xfe, 0x74, 0xc9, 0xac, 0x25, 0x87, 0xaa, 0x46, 0xaa, 0x8f, 0x88, 0x4, 0xf2, 0xfe, 0xb5, 0x83, 0x6c, 0xc4, 0xb3, 0xab, 0xab, 0xab, 0x84, 0x29, 0xa5, 0x78, 0x3e, 0x17, 0xd5, 0x99, 0x9f, 0x32, 0x24, 0x2e, 0xb5, 0x9e, 0xf3, 0xc, 0xd7, 0xad, 0xab, 0xc1, 0x6d, 0x72, 0xdb, 0xdb, 0x9, 0x76, 0x23, 0x4, 0x7c, 0x98, 0x98, 0x9f, 0x88, 0xd1, 0x4e, 0xaf, 0x2, 0xa7, 0x21, 0x2b, 0xe1, 0x6e, 0xc2, 0xd0, 0x79, 0x81, 0xaa, 0xa9, 0x99, 0x49, 0xdd, 0xf8, 0x9e, 0xcd, 0x90, 0x33, 0x3a, 0x77, 0xbc, 0x4e, 0x19, 0x88, 0xa8, 0x2a, 0xbf, 0x7c, 0x7c, 0xaf, 0x32, 0x91}, - output224: []byte{0x87, 0xf1, 0x5c, 0xc2, 0xae, 0xc2, 0x41, 0x68, 0xd8, 0xbb, 0xaf, 0x18, 0x88, 0x25, 0xf3, 0xbb, 0x1, 0x78, 0xcf, 0xb5, 0xc5, 0x89, 0x9f, 0x2f, 0xd0, 0x42, 0xce, 0x89}, - output256: []byte{0x59, 0x1, 0xcd, 0xa0, 0xcd, 0x15, 0x10, 0xdb, 0x54, 0x55, 0xd0, 0x72, 0xd2, 0x73, 0x7a, 0x67, 0x21, 0xad, 0x9e, 0xe3, 0x27, 0x29, 0x53, 0xa1, 0x9c, 0x7a, 0xb3, 0x78, 0xbf, 0x36, 0x46, 0xc5}, - output384: []byte{0x2a, 0x9c, 0xf2, 0xfd, 0x1, 0x2b, 0x2, 0x56, 0x16, 0x47, 0x8c, 0xef, 0x69, 0x71, 0xb6, 0xf9, 0xe4, 0x94, 0xa6, 0x3a, 0xab, 0x5f, 0x53, 0x31, 0xd, 0xde, 0x70, 0xfc, 0x6e, 0xd2, 0x7f, 0x1e, 0x2d, 0x78, 0x4, 0xae, 0xb8, 0xd2, 0x6, 0xf6, 0x41, 0xa7, 0x3e, 0x5, 0x4d, 0xa6, 0x20, 0xe6}, - output512: []byte{0x2e, 0xfc, 0x5d, 0xfe, 0x2, 0x8a, 0x35, 0x50, 0x3a, 0x25, 0xbd, 0xf8, 0xb2, 0x16, 0x4d, 0x86, 0xca, 0x74, 0x96, 0xb7, 0xc5, 0xde, 0xd0, 0x9c, 0x5d, 0x41, 0x4b, 0x69, 0x77, 0xad, 0xbb, 0x4a, 0x69, 0x88, 0xab, 0x99, 0x39, 0xd1, 0xec, 0x65, 0xf4, 0x6b, 0xcc, 0x99, 0xc1, 0xdc, 0xd5, 0xf1, 0x9e, 0x3, 0x5d, 0x8d, 0x3d, 0xc3, 0x87, 0x36, 0x12, 0x0, 0xe4, 0xda, 0x80, 0xc8, 0x6, 0x71}}, - testcase{ - msg: []byte{0x9f, 0x2c, 0x18, 0xad, 0xe9, 0xb3, 0x80, 0xc7, 0x84, 0xe1, 0x70, 0xfb, 0x76, 0x3e, 0x9a, 0xa2, 0x5, 0xf6, 0x43, 0x3, 0x6, 0x7e, 0xb1, 0xbc, 0xea, 0x93, 0xdf, 0x5d, 0xac, 0x4b, 0xf5, 0xa2, 0xe0, 0xb, 0x78, 0x19, 0x5f, 0x80, 0x8d, 0xf2, 0x4f, 0xc7, 0x6e, 0x26, 0xcb, 0x7b, 0xe3, 0x1d, 0xc3, 0x5f, 0x8, 0x44, 0xcd, 0xed, 0x15, 0x67, 0xbb, 0xa2, 0x98, 0x58, 0xcf, 0xfc, 0x97, 0xfb, 0x29, 0x1, 0x3, 0x31, 0xb0, 0x1d, 0x6a, 0x3f, 0xb3, 0x15, 0x9c, 0xc1, 0xb9, 0x73, 0xd2, 0x55, 0xda, 0x98, 0x43, 0xe3, 0x4a, 0xa, 0x40, 0x61, 0xca, 0xbd, 0xb9, 0xed, 0x37, 0xf2, 0x41, 0xbf, 0xab, 0xb3, 0xc2, 0xd, 0x32, 0x74, 0x3f, 0x40, 0x26, 0xb5, 0x9a, 0x4c, 0xcc, 0x38, 0x5a, 0x23, 0x1, 0xf8, 0x3c, 0xb, 0xa, 0x19, 0xb, 0xf, 0x2d, 0x1, 0xac, 0xb8, 0xf0, 0xd4, 0x11, 0x11, 0xe1, 0xf, 0x2f, 0x4e, 0x14, 0x93, 0x79, 0x27, 0x55, 0x99, 0xa5, 0x2d, 0xc0, 0x89, 0xb3, 0x5f, 0xdd, 0x52, 0x34, 0xb0, 0xcf, 0xb7, 0xb6, 0xd8, 0xae, 0xbd, 0x56, 0x3c, 0xa1, 0xfa, 0x65, 0x3c, 0x5c, 0x2, 0x1d, 0xfd, 0x6f, 0x59, 0x20, 0xe6, 0xf1, 0x8b, 0xfa, 0xfd, 0xbe, 0xcb, 0xf0, 0xab, 0x0, 0x28, 0x13, 0x33, 0xed, 0x50, 0xb9, 0xa9, 0x99, 0x54, 0x9c, 0x1c, 0x8f, 0x8c, 0x63, 0xd7, 0x62, 0x6c, 0x48, 0x32, 0x2e, 0x97, 0x91, 0xd5, 0xff, 0x72, 0x29, 0x40, 0x49, 0xbd, 0xe9, 0x1e, 0x73, 0xf8}, - output224: []byte{0x31, 0xbb, 0x87, 0x25, 0x45, 0x21, 0x7f, 0xdb, 0xf1, 0x10, 0x77, 0xe8, 0x6b, 0x1e, 0xe4, 0x51, 0x47, 0x5c, 0x31, 0xdc, 0x5e, 0xe, 0x63, 0x6e, 0xfb, 0xe5, 0x8, 0x25}, - output256: []byte{0xf6, 0x45, 0x62, 0xd6, 0x27, 0x3e, 0xfb, 0x5e, 0xbd, 0x2, 0x7e, 0xa, 0x6f, 0x38, 0xc3, 0xfb, 0x20, 0x4a, 0x6d, 0xbe, 0x89, 0x4e, 0xe0, 0x12, 0x0, 0xea, 0x24, 0x9b, 0x74, 0x7c, 0xfe, 0x66}, - output384: []byte{0x5f, 0x8e, 0x2d, 0xe7, 0x42, 0x3, 0x6b, 0x6a, 0xc4, 0xa7, 0xd8, 0x98, 0x7b, 0x47, 0xc4, 0xc7, 0xa1, 0xcc, 0xb7, 0x23, 0x9e, 0x1b, 0x3e, 0xef, 0xd1, 0x11, 0x6d, 0x63, 0x92, 0xc7, 0x91, 0x77, 0xd6, 0x8c, 0x66, 0x22, 0x1f, 0x31, 0xd0, 0xfa, 0xed, 0x91, 0x34, 0x42, 0x9b, 0x89, 0xbe, 0xea}, - output512: []byte{0xe8, 0xd, 0x7a, 0x93, 0x4f, 0xda, 0xf1, 0x7d, 0xb8, 0xdb, 0xb1, 0xdc, 0x6c, 0x42, 0xe9, 0xe, 0x13, 0x92, 0x11, 0xc2, 0xf5, 0x99, 0x89, 0xc, 0x6, 0xb1, 0x5d, 0x62, 0x48, 0xfd, 0xbe, 0x68, 0x2d, 0x77, 0xd4, 0xe0, 0x5f, 0x26, 0xd7, 0x28, 0x52, 0xf7, 0x49, 0x2b, 0xce, 0x11, 0x8c, 0xe7, 0xc3, 0x69, 0x50, 0xbd, 0x2c, 0x50, 0xf9, 0x69, 0x9b, 0xb4, 0x7d, 0x89, 0xc3, 0x11, 0x53, 0x77}}, - testcase{ - msg: []byte{0xae, 0x15, 0x9f, 0x3f, 0xa3, 0x36, 0x19, 0x0, 0x2a, 0xe6, 0xbc, 0xce, 0x8c, 0xbb, 0xdd, 0x7d, 0x28, 0xe5, 0xed, 0x9d, 0x61, 0x53, 0x45, 0x95, 0xc4, 0xc9, 0xf4, 0x3c, 0x40, 0x2a, 0x9b, 0xb3, 0x1f, 0x3b, 0x30, 0x1c, 0xbf, 0xd4, 0xa4, 0x3c, 0xe4, 0xc2, 0x4c, 0xd5, 0xc9, 0x84, 0x9c, 0xc6, 0x25, 0x9e, 0xca, 0x90, 0xe2, 0xa7, 0x9e, 0x1, 0xff, 0xba, 0xc0, 0x7b, 0xa0, 0xe1, 0x47, 0xfa, 0x42, 0x67, 0x6a, 0x1d, 0x66, 0x85, 0x70, 0xe0, 0x39, 0x63, 0x87, 0xb5, 0xbc, 0xd5, 0x99, 0xe8, 0xe6, 0x6a, 0xae, 0xd1, 0xb8, 0xa1, 0x91, 0xc5, 0xa4, 0x75, 0x47, 0xf6, 0x13, 0x73, 0x2, 0x1f, 0xa6, 0xde, 0xad, 0xcb, 0x55, 0x36, 0x3d, 0x23, 0x3c, 0x24, 0x44, 0xf, 0x2c, 0x73, 0xdb, 0xb5, 0x19, 0xf7, 0xc9, 0xfa, 0x5a, 0x89, 0x62, 0xef, 0xd5, 0xf6, 0x25, 0x2c, 0x4, 0x7, 0xf1, 0x90, 0xdf, 0xef, 0xad, 0x70, 0x7f, 0x3c, 0x70, 0x7, 0xd6, 0x9f, 0xf3, 0x6b, 0x84, 0x89, 0xa5, 0xb6, 0xb7, 0xc5, 0x57, 0xe7, 0x9d, 0xd4, 0xf5, 0xc, 0x6, 0x51, 0x1f, 0x59, 0x9f, 0x56, 0xc8, 0x96, 0xb3, 0x5c, 0x91, 0x7b, 0x63, 0xba, 0x35, 0xc6, 0xff, 0x80, 0x92, 0xba, 0xf7, 0xd1, 0x65, 0x8e, 0x77, 0xfc, 0x95, 0xd8, 0xa6, 0xa4, 0x3e, 0xeb, 0x4c, 0x1, 0xf3, 0x3f, 0x3, 0x87, 0x7f, 0x92, 0x77, 0x4b, 0xe8, 0x9c, 0x11, 0x14, 0xdd, 0x53, 0x1c, 0x1, 0x1e, 0x53, 0xa3, 0x4d, 0xc2, 0x48, 0xa2, 0xf0, 0xe6}, - output224: []byte{0x26, 0xd6, 0x9f, 0xa, 0xe8, 0xe4, 0xdc, 0x61, 0xc6, 0x35, 0x4f, 0xf5, 0x70, 0xfd, 0xd9, 0x13, 0xca, 0xf2, 0x1c, 0x18, 0x69, 0x7f, 0x3, 0x71, 0xf2, 0xd3, 0x23, 0xaf}, - output256: []byte{0xe7, 0xd7, 0xa1, 0x13, 0xb3, 0xa3, 0x31, 0x75, 0xd0, 0xab, 0xd2, 0xcf, 0x4f, 0x9a, 0xdd, 0x8e, 0x41, 0xdc, 0x86, 0xc9, 0x3c, 0x95, 0x52, 0xc5, 0xb3, 0x58, 0x82, 0x77, 0xfb, 0xca, 0xa2, 0x4a}, - output384: []byte{0xb0, 0xb1, 0xf4, 0x5, 0x84, 0x17, 0x51, 0x6a, 0x5c, 0x5a, 0x96, 0x83, 0xa5, 0xd7, 0x2b, 0x48, 0x9e, 0x6a, 0xd4, 0x22, 0x73, 0xd5, 0x91, 0x79, 0x1d, 0x2c, 0xda, 0x73, 0x60, 0xa4, 0x0, 0x8e, 0x86, 0xc8, 0x89, 0x93, 0x69, 0x94, 0x6f, 0x7a, 0xbf, 0xe2, 0x9b, 0xf9, 0x2c, 0x9c, 0xa9, 0x65}, - output512: []byte{0xc4, 0x14, 0xb2, 0x9f, 0xd0, 0x77, 0x20, 0xf4, 0x6c, 0x35, 0x1f, 0x5c, 0x80, 0xbe, 0x20, 0x94, 0xe9, 0x5d, 0x13, 0xad, 0x97, 0xbd, 0xd1, 0xf7, 0xc5, 0x20, 0x7b, 0x69, 0x56, 0x93, 0xcd, 0x5e, 0x1e, 0x1, 0x69, 0xb1, 0xaa, 0x2e, 0x27, 0x11, 0x15, 0xbd, 0x51, 0x71, 0xfe, 0xc5, 0x1d, 0x4, 0xb7, 0x1e, 0x3e, 0x7c, 0xe1, 0x61, 0x8f, 0xbf, 0xeb, 0x38, 0x2f, 0x56, 0xf6, 0x5f, 0x7e, 0xff}}, - testcase{ - msg: []byte{0x3b, 0x8e, 0x97, 0xc5, 0xff, 0xc2, 0xd6, 0xa4, 0xf, 0xa7, 0xde, 0x7f, 0xce, 0xfc, 0x90, 0xf3, 0xb1, 0x2c, 0x94, 0xe, 0x7a, 0xb4, 0x15, 0x32, 0x1e, 0x29, 0xee, 0x69, 0x2d, 0xfa, 0xc7, 0x99, 0xb0, 0x9, 0xc9, 0x9d, 0xcd, 0xdb, 0x70, 0x8f, 0xce, 0x5a, 0x17, 0x8c, 0x5c, 0x35, 0xee, 0x2b, 0x86, 0x17, 0x14, 0x3e, 0xdc, 0x4c, 0x40, 0xb4, 0xd3, 0x13, 0x66, 0x1f, 0x49, 0xab, 0xdd, 0x93, 0xce, 0xa7, 0x9d, 0x11, 0x75, 0x18, 0x80, 0x54, 0x96, 0xfe, 0x6a, 0xcf, 0x29, 0x2c, 0x4c, 0x2a, 0x1f, 0x76, 0xb4, 0x3, 0xa9, 0x7d, 0x7c, 0x39, 0x9d, 0xaf, 0x85, 0xb4, 0x6a, 0xd8, 0x4e, 0x16, 0x24, 0x6c, 0x67, 0xd6, 0x83, 0x67, 0x57, 0xbd, 0xe3, 0x36, 0xc2, 0x90, 0xd5, 0xd4, 0x1, 0xe6, 0xc1, 0x38, 0x6a, 0xb3, 0x27, 0x97, 0xaf, 0x6b, 0xb2, 0x51, 0xe9, 0xb2, 0xd8, 0xfe, 0x75, 0x4c, 0x47, 0x48, 0x2b, 0x72, 0xe0, 0xb3, 0x94, 0xea, 0xb7, 0x69, 0x16, 0x12, 0x6f, 0xd6, 0x8e, 0xa7, 0xd6, 0x5e, 0xb9, 0x3d, 0x59, 0xf5, 0xb4, 0xc5, 0xac, 0x40, 0xf7, 0xc3, 0xb3, 0x7e, 0x7f, 0x36, 0x94, 0xf2, 0x94, 0x24, 0xc2, 0x4a, 0xf8, 0xc8, 0xf0, 0xef, 0x59, 0xcd, 0x9d, 0xbf, 0x1d, 0x28, 0xe0, 0xe1, 0xf, 0x79, 0x9a, 0x6f, 0x78, 0xca, 0xd1, 0xd4, 0x5b, 0x9d, 0xb3, 0xd7, 0xde, 0xe4, 0xa7, 0x5, 0x9a, 0xbe, 0x99, 0x18, 0x27, 0x14, 0x98, 0x3b, 0x9c, 0x9d, 0x44, 0xd7, 0xf5, 0x64, 0x35, 0x96, 0xd4, 0xf3}, - output224: []byte{0x17, 0x53, 0x93, 0x53, 0x4d, 0x90, 0xb6, 0x14, 0xb1, 0x58, 0x10, 0x5c, 0x95, 0xe1, 0x8a, 0x10, 0x52, 0xa5, 0x6d, 0xe, 0x77, 0x5e, 0xa1, 0xcf, 0x51, 0xad, 0x58, 0x53}, - output256: []byte{0x3b, 0x40, 0xc1, 0x49, 0x3a, 0xf4, 0x11, 0xae, 0x78, 0x49, 0x90, 0x4d, 0x47, 0x8d, 0xf2, 0x40, 0x72, 0x54, 0xbf, 0x62, 0xb8, 0x8e, 0x9b, 0xff, 0xd7, 0xb4, 0x2b, 0xd2, 0xa6, 0xc, 0xe0, 0xfa}, - output384: []byte{0x91, 0x72, 0xaa, 0xd6, 0xc1, 0x5b, 0x4d, 0xcd, 0x79, 0xbb, 0xd8, 0x4f, 0xad, 0x6, 0x1, 0x11, 0x9d, 0x8b, 0x4e, 0x3a, 0xfe, 0xd1, 0x7b, 0x59, 0x4f, 0xf3, 0x84, 0x24, 0x15, 0x79, 0x85, 0xee, 0x27, 0xb6, 0x58, 0x26, 0xb9, 0x90, 0x54, 0x86, 0xe7, 0x67, 0xe8, 0x5a, 0xa0, 0x31, 0xe0, 0x7b}, - output512: []byte{0xa4, 0x67, 0x9a, 0x4c, 0xbe, 0xe6, 0x29, 0x22, 0x3, 0xba, 0xfb, 0xa8, 0x91, 0x32, 0x45, 0xf3, 0xe, 0x4, 0x6a, 0xba, 0x6c, 0x9, 0x37, 0xb4, 0x7, 0xc0, 0xb, 0x73, 0xd1, 0x7d, 0x8d, 0x69, 0x66, 0x90, 0xee, 0x25, 0xba, 0x1b, 0x39, 0xde, 0xb3, 0xdb, 0x93, 0x52, 0x5a, 0x8f, 0xbc, 0xfd, 0x88, 0x17, 0x3b, 0xa9, 0xc7, 0xa6, 0x5b, 0x44, 0x6, 0xd0, 0x55, 0xb, 0xa9, 0xb6, 0xcc, 0x7}}, - testcase{ - msg: []byte{0x34, 0x34, 0xec, 0x31, 0xb1, 0xf, 0xaf, 0xdb, 0xfe, 0xec, 0xd, 0xd6, 0xbd, 0x94, 0xe8, 0xf, 0x7b, 0xa9, 0xdc, 0xa1, 0x9e, 0xf0, 0x75, 0xf7, 0xeb, 0x1, 0x75, 0x12, 0xaf, 0x66, 0xd6, 0xa4, 0xbc, 0xf7, 0xd1, 0x6b, 0xa0, 0x81, 0x9a, 0x18, 0x92, 0xa6, 0x37, 0x2f, 0x9b, 0x35, 0xbc, 0xc7, 0xca, 0x81, 0x55, 0xee, 0x19, 0xe8, 0x42, 0x8b, 0xc2, 0x2d, 0x21, 0x48, 0x56, 0xed, 0x5f, 0xa9, 0x37, 0x4c, 0x3c, 0x9, 0xbd, 0xe1, 0x69, 0x60, 0x2c, 0xc2, 0x19, 0x67, 0x9f, 0x65, 0xa1, 0x56, 0x6f, 0xc7, 0x31, 0x6f, 0x4c, 0xc3, 0xb6, 0x31, 0xa1, 0x8f, 0xb4, 0x44, 0x9f, 0xa6, 0xaf, 0xa1, 0x6a, 0x3d, 0xb2, 0xbc, 0x42, 0x12, 0xef, 0xf5, 0x39, 0xc6, 0x7c, 0xf1, 0x84, 0x68, 0x8, 0x26, 0x53, 0x55, 0x89, 0xc7, 0x11, 0x1d, 0x73, 0xbf, 0xfc, 0xe4, 0x31, 0xb4, 0xc4, 0x4, 0x92, 0xe7, 0x63, 0xd9, 0x27, 0x95, 0x60, 0xaa, 0xa3, 0x8e, 0xb2, 0xdc, 0x14, 0xa2, 0x12, 0xd7, 0x23, 0xf9, 0x94, 0xa1, 0xfe, 0x65, 0x6f, 0xf4, 0xdd, 0x14, 0x55, 0x1c, 0xe4, 0xe7, 0xc6, 0x21, 0xb2, 0xaa, 0x56, 0x4, 0xa1, 0x0, 0x1, 0xb2, 0x87, 0x8a, 0x89, 0x7a, 0x28, 0xa0, 0x80, 0x95, 0xc3, 0x25, 0xe1, 0xa, 0x26, 0xd2, 0xfb, 0x1a, 0x75, 0xbf, 0xd6, 0x4c, 0x25, 0x3, 0x9, 0xbb, 0x55, 0xa4, 0x4f, 0x23, 0xbb, 0xac, 0xd, 0x55, 0x16, 0xa1, 0xc6, 0x87, 0xd3, 0xb4, 0x1e, 0xf2, 0xfb, 0xbf, 0x9c, 0xc5, 0x6d, 0x47, 0x39}, - output224: []byte{0x3d, 0xec, 0xd7, 0x1d, 0xa2, 0x26, 0x39, 0x98, 0x5c, 0xf2, 0x42, 0xf2, 0xfa, 0xe7, 0x17, 0x24, 0x59, 0x4, 0x2c, 0x82, 0x64, 0x95, 0xc8, 0xd8, 0xd9, 0x5c, 0x37, 0x19}, - output256: []byte{0xfe, 0xeb, 0x17, 0x2a, 0xea, 0xb2, 0xf0, 0xde, 0xb7, 0x48, 0xfb, 0x77, 0x80, 0x1c, 0xa2, 0x2d, 0x3c, 0xe9, 0x9b, 0x7a, 0x9f, 0x97, 0x89, 0xe4, 0x79, 0xb9, 0x3d, 0x1f, 0x4b, 0x1d, 0x22, 0x7f}, - output384: []byte{0xba, 0xfb, 0xb3, 0x32, 0x1c, 0x47, 0x98, 0x54, 0x8f, 0x5d, 0xd9, 0x83, 0xea, 0xc1, 0xe1, 0x6e, 0x1f, 0x3e, 0xf2, 0xba, 0x5c, 0x9d, 0x69, 0xa3, 0x40, 0xf6, 0xca, 0xbc, 0x9c, 0x7f, 0xe9, 0xf1, 0xfd, 0x95, 0xa6, 0x92, 0xb7, 0x38, 0x73, 0x42, 0x30, 0x49, 0x45, 0x67, 0x4d, 0x9d, 0x2e, 0x4a}, - output512: []byte{0x5f, 0x49, 0xd6, 0x59, 0x4d, 0xa9, 0x39, 0x98, 0x7d, 0x19, 0x6, 0x29, 0x4b, 0x33, 0xa0, 0x37, 0xf6, 0x3c, 0x79, 0xe0, 0x78, 0x53, 0x1d, 0xfa, 0x7e, 0x6c, 0xe6, 0x72, 0x79, 0xd4, 0xd5, 0xdb, 0xeb, 0x65, 0xf, 0xf8, 0x69, 0xf, 0x23, 0xb6, 0x3b, 0x7e, 0x9c, 0x48, 0xea, 0x87, 0x91, 0xb8, 0xf, 0xdb, 0x34, 0xef, 0x66, 0xdc, 0xf0, 0xce, 0xfe, 0x45, 0x84, 0x2e, 0xcf, 0xf4, 0xad, 0x1d}}, - testcase{ - msg: []byte{0x7c, 0x79, 0x53, 0xd8, 0x1c, 0x8d, 0x20, 0x8f, 0xd1, 0xc9, 0x76, 0x81, 0xd4, 0x8f, 0x49, 0xdd, 0x0, 0x34, 0x56, 0xde, 0x60, 0x47, 0x5b, 0x84, 0x7, 0xe, 0xf4, 0x84, 0x7c, 0x33, 0x3b, 0x74, 0x57, 0x5b, 0x1f, 0xc8, 0xd2, 0xa1, 0x86, 0x96, 0x44, 0x85, 0xa3, 0xb8, 0x63, 0x4f, 0xea, 0xa3, 0x59, 0x5a, 0xaa, 0x1a, 0x2f, 0x45, 0x95, 0xa7, 0xd6, 0xb6, 0x15, 0x35, 0x63, 0xde, 0xe3, 0x1b, 0xba, 0xc4, 0x43, 0xc8, 0xa3, 0x3e, 0xed, 0x6d, 0x5d, 0x95, 0x6a, 0x98, 0xa, 0x68, 0x36, 0x6c, 0x25, 0x27, 0xb5, 0x50, 0xee, 0x95, 0x2, 0x50, 0xdf, 0xb6, 0x91, 0xea, 0xcb, 0xd5, 0xd5, 0x6a, 0xe1, 0x4b, 0x97, 0x6, 0x68, 0xbe, 0x17, 0x4c, 0x89, 0xdf, 0x2f, 0xea, 0x43, 0xae, 0x52, 0xf1, 0x31, 0x42, 0x63, 0x9c, 0x88, 0x4f, 0xd6, 0x2a, 0x36, 0x83, 0xc0, 0xc3, 0x79, 0x2f, 0xf, 0x24, 0xab, 0x13, 0x18, 0xbc, 0xb2, 0x7e, 0x21, 0xf4, 0x73, 0x7f, 0xab, 0x62, 0xc7, 0x7e, 0xa3, 0x8b, 0xc8, 0xfd, 0x1c, 0xf4, 0x1f, 0x7d, 0xab, 0x64, 0xc1, 0x3f, 0xeb, 0xe7, 0x15, 0x2b, 0xf5, 0xbb, 0x7a, 0xb5, 0xa7, 0x8f, 0x53, 0x46, 0xd4, 0x3c, 0xc7, 0x41, 0xcb, 0x6f, 0x72, 0xb7, 0xb8, 0x98, 0xf, 0x26, 0x8b, 0x68, 0xbf, 0x62, 0xab, 0xdf, 0xb1, 0x57, 0x7a, 0x52, 0x43, 0x8f, 0xe1, 0x4b, 0x59, 0x14, 0x98, 0xcc, 0x95, 0xf0, 0x71, 0x22, 0x84, 0x60, 0xc7, 0xc5, 0xd5, 0xce, 0xb4, 0xa7, 0xbd, 0xe5, 0x88, 0xe7, 0xf2, 0x1c}, - output224: []byte{0x2d, 0xa, 0x56, 0x86, 0x4b, 0xbe, 0xc6, 0x44, 0x9f, 0xbf, 0x7b, 0x2e, 0xae, 0x53, 0xda, 0x46, 0x64, 0x71, 0x83, 0xb5, 0x6f, 0xa4, 0xed, 0xb1, 0x60, 0x2e, 0x51, 0x63}, - output256: []byte{0xb2, 0x40, 0xbc, 0x52, 0xb8, 0xaf, 0x1b, 0x50, 0x2e, 0x26, 0xbf, 0x1d, 0x5e, 0x75, 0xfe, 0x26, 0x63, 0xbf, 0xba, 0x50, 0x3f, 0xaf, 0x10, 0xf4, 0x67, 0x54, 0xdc, 0x3d, 0x23, 0xcb, 0x61, 0xc1}, - output384: []byte{0xa0, 0x55, 0xe0, 0xa9, 0xc4, 0x57, 0x5c, 0xd4, 0xd7, 0xad, 0x84, 0xa2, 0x40, 0x17, 0x6f, 0x21, 0xed, 0x68, 0xf4, 0x84, 0xa2, 0x69, 0xe0, 0xc9, 0xef, 0xfb, 0x6f, 0xa9, 0x37, 0x46, 0xe3, 0x1f, 0x64, 0xb0, 0xb9, 0xc, 0x51, 0x3d, 0x2b, 0x57, 0xec, 0x78, 0xe9, 0xe5, 0xba, 0x3b, 0xa9, 0x9c}, - output512: []byte{0xb7, 0x7f, 0xb7, 0x96, 0x69, 0xea, 0x52, 0xc7, 0x38, 0xe5, 0x8a, 0x9e, 0xf3, 0xed, 0x15, 0x1, 0xbb, 0xe7, 0x97, 0x44, 0x78, 0xaf, 0xb5, 0xa8, 0xbe, 0xd4, 0x45, 0x49, 0xd6, 0x23, 0x2f, 0xf8, 0xd7, 0xaa, 0x9e, 0xee, 0xaf, 0x2, 0xf6, 0x75, 0x53, 0x27, 0x95, 0x10, 0x93, 0x24, 0x31, 0x10, 0xd7, 0xbc, 0xfc, 0xe, 0x51, 0x29, 0x9d, 0xb7, 0x93, 0x85, 0x6b, 0x57, 0xa7, 0x7e, 0x84, 0x20}}, - testcase{ - msg: []byte{0x7a, 0x6a, 0x4f, 0x4f, 0xdc, 0x59, 0xa1, 0xd2, 0x23, 0x38, 0x1a, 0xe5, 0xaf, 0x49, 0x8d, 0x74, 0xb7, 0x25, 0x2e, 0xcf, 0x59, 0xe3, 0x89, 0xe4, 0x91, 0x30, 0xc7, 0xea, 0xee, 0x62, 0x6e, 0x7b, 0xd9, 0x89, 0x7e, 0xff, 0xd9, 0x20, 0x17, 0xf4, 0xcc, 0xde, 0x66, 0xb0, 0x44, 0x4, 0x62, 0xcd, 0xed, 0xfd, 0x35, 0x2d, 0x81, 0x53, 0xe6, 0xa4, 0xc8, 0xd7, 0xa0, 0x81, 0x2f, 0x70, 0x1c, 0xc7, 0x37, 0xb5, 0x17, 0x8c, 0x25, 0x56, 0xf0, 0x71, 0x11, 0x20, 0xe, 0xb6, 0x27, 0xdb, 0xc2, 0x99, 0xca, 0xa7, 0x92, 0xdf, 0xa5, 0x8f, 0x35, 0x93, 0x52, 0x99, 0xfa, 0x3a, 0x35, 0x19, 0xe9, 0xb0, 0x31, 0x66, 0xdf, 0xfa, 0x15, 0x91, 0x3, 0xff, 0xa3, 0x5e, 0x85, 0x77, 0xf7, 0xc0, 0xa8, 0x6c, 0x6b, 0x46, 0xfe, 0x13, 0xdb, 0x8e, 0x2c, 0xdd, 0x9d, 0xcf, 0xba, 0x85, 0xbd, 0xdd, 0xcc, 0xe0, 0xa7, 0xa8, 0xe1, 0x55, 0xf8, 0x1f, 0x71, 0x2d, 0x8e, 0x9f, 0xe6, 0x46, 0x15, 0x3d, 0x3d, 0x22, 0xc8, 0x11, 0xbd, 0x39, 0xf8, 0x30, 0x43, 0x3b, 0x22, 0x13, 0xdd, 0x46, 0x30, 0x19, 0x41, 0xb5, 0x92, 0x93, 0xfd, 0xa, 0x33, 0xe2, 0xb6, 0x3a, 0xdb, 0xd9, 0x52, 0x39, 0xbc, 0x1, 0x31, 0x5c, 0x46, 0xfd, 0xb6, 0x78, 0x87, 0x5b, 0x3c, 0x81, 0xe0, 0x53, 0xa4, 0xf, 0x58, 0x1c, 0xfb, 0xec, 0x24, 0xa1, 0x40, 0x4b, 0x16, 0x71, 0xa1, 0xb8, 0x8a, 0x6d, 0x6, 0x12, 0x2, 0x29, 0x51, 0x8f, 0xb1, 0x3a, 0x74, 0xca, 0xa, 0xc5, 0xae}, - output224: []byte{0xa0, 0xff, 0x9e, 0x11, 0xfb, 0xb4, 0x51, 0x94, 0x3a, 0x17, 0xe3, 0xac, 0x51, 0xd, 0xe0, 0xb5, 0x82, 0xbb, 0x7, 0x2b, 0x16, 0xdc, 0x4e, 0x3, 0xf9, 0xe4, 0x1, 0x9f}, - output256: []byte{0x3e, 0xba, 0xce, 0x41, 0xf5, 0x78, 0xfd, 0xe6, 0x60, 0x3e, 0x3, 0x2f, 0xc1, 0xc7, 0xcf, 0xee, 0xf1, 0xcb, 0x79, 0xfe, 0x93, 0x8a, 0x94, 0xd4, 0xc7, 0xb5, 0x8b, 0xb, 0xa4, 0xcb, 0x97, 0x20}, - output384: []byte{0x78, 0x8d, 0x19, 0xad, 0x68, 0xd1, 0xb2, 0x6c, 0xb0, 0x7, 0x83, 0x89, 0xb4, 0x5f, 0xb1, 0x8b, 0x3d, 0xa3, 0x5a, 0x57, 0xa1, 0xec, 0x91, 0x42, 0x73, 0x15, 0x8e, 0xad, 0x43, 0x74, 0x9b, 0xf1, 0xab, 0x49, 0xb1, 0xa6, 0x8d, 0x48, 0x31, 0xce, 0x19, 0x3f, 0x58, 0x52, 0xd2, 0xf, 0xd9, 0x6c}, - output512: []byte{0xca, 0xca, 0xf, 0xf4, 0x31, 0x7, 0xf7, 0x30, 0xa7, 0xfb, 0xe6, 0x86, 0x9f, 0xba, 0x5a, 0xf1, 0xe6, 0x26, 0xc9, 0x63, 0x3, 0xbe, 0x3b, 0xc9, 0x51, 0x55, 0x16, 0x41, 0x99, 0xc8, 0x89, 0x22, 0x19, 0x45, 0x11, 0xb2, 0x4c, 0x48, 0x91, 0x11, 0x86, 0xf6, 0x47, 0xca, 0x24, 0x64, 0x27, 0xf2, 0xce, 0x7b, 0xa7, 0x47, 0x27, 0x1c, 0xd8, 0xd7, 0xc5, 0xe1, 0xd1, 0x27, 0xc2, 0x1f, 0x1e, 0xaa}}, - testcase{ - msg: []byte{0xd9, 0xfa, 0xa1, 0x4c, 0xeb, 0xe9, 0xb7, 0xde, 0x55, 0x1b, 0x6c, 0x7, 0x65, 0x40, 0x9a, 0x33, 0x93, 0x85, 0x62, 0x1, 0x3b, 0x5e, 0x8e, 0xe, 0x1e, 0xa, 0x64, 0x18, 0xdf, 0x73, 0x99, 0xd0, 0xa6, 0xa7, 0x71, 0xfb, 0x81, 0xc3, 0xca, 0x9b, 0xd3, 0xbb, 0x8e, 0x29, 0x51, 0xb0, 0xbc, 0x79, 0x25, 0x25, 0xa2, 0x94, 0xeb, 0xd1, 0x8, 0x36, 0x88, 0x80, 0x6f, 0xe5, 0xe7, 0xf1, 0xe1, 0x7f, 0xd4, 0xe3, 0xa4, 0x1d, 0x0, 0xc8, 0x9e, 0x8f, 0xcf, 0x4a, 0x36, 0x3c, 0xae, 0xdb, 0x1a, 0xcb, 0x55, 0x8e, 0x3d, 0x56, 0x2f, 0x13, 0x2, 0xb3, 0xd8, 0x3b, 0xb8, 0x86, 0xed, 0x27, 0xb7, 0x60, 0x33, 0x79, 0x81, 0x31, 0xda, 0xb0, 0x5b, 0x42, 0x17, 0x38, 0x1e, 0xaa, 0xa7, 0xba, 0x15, 0xec, 0x82, 0xb, 0xb5, 0xc1, 0x3b, 0x51, 0x6d, 0xd6, 0x40, 0xea, 0xec, 0x5a, 0x27, 0xd0, 0x5f, 0xdf, 0xca, 0xf, 0x35, 0xb3, 0xa5, 0x31, 0x21, 0x46, 0x80, 0x6b, 0x4c, 0x2, 0x75, 0xbc, 0xd0, 0xaa, 0xa3, 0xb2, 0x1, 0x7f, 0x34, 0x69, 0x75, 0xdb, 0x56, 0x6f, 0x9b, 0x4d, 0x13, 0x7f, 0x4e, 0xe1, 0x6, 0x44, 0xc2, 0xa2, 0xda, 0x66, 0xde, 0xec, 0xa5, 0x34, 0x2e, 0x23, 0x64, 0x95, 0xc3, 0xc6, 0x28, 0x5, 0x28, 0xbf, 0xd3, 0x2e, 0x90, 0xaf, 0x4c, 0xd9, 0xbb, 0x90, 0x8f, 0x34, 0x1, 0x2b, 0x52, 0xb4, 0xbc, 0x56, 0xd4, 0x8c, 0xc8, 0xa6, 0xb5, 0x9b, 0xab, 0x1, 0x49, 0x88, 0xea, 0xbd, 0x12, 0xe1, 0xa0, 0xa1, 0xc2, 0xe1, 0x70, 0xe7}, - output224: []byte{0x4f, 0xef, 0xbe, 0x74, 0x64, 0x59, 0x49, 0xa1, 0x29, 0x1c, 0x6f, 0x6f, 0x5, 0xea, 0xf4, 0xb7, 0x80, 0xea, 0x1, 0xec, 0x5e, 0xa5, 0x10, 0x5e, 0xcd, 0xcb, 0x98, 0x4a}, - output256: []byte{0x65, 0xeb, 0x4b, 0xd5, 0xec, 0xca, 0x71, 0x64, 0xce, 0x9b, 0x66, 0x72, 0x7f, 0x11, 0x2c, 0x1a, 0xc6, 0x12, 0xd, 0xdd, 0x20, 0xd, 0xcb, 0x5c, 0xe7, 0x5b, 0x74, 0x87, 0x84, 0x3f, 0xcd, 0xb8}, - output384: []byte{0x9c, 0x8a, 0x4f, 0x5b, 0xe0, 0x1a, 0xd5, 0xae, 0x9, 0x46, 0xef, 0x7e, 0x9f, 0x5a, 0x82, 0x28, 0x7b, 0x63, 0x44, 0xb9, 0x66, 0xee, 0x28, 0xbd, 0xed, 0xfe, 0x4b, 0xd4, 0x3d, 0x84, 0xd, 0x23, 0x20, 0x54, 0xd5, 0xe2, 0x16, 0x71, 0x6e, 0xa4, 0xf8, 0xb, 0x45, 0x7c, 0xbc, 0x11, 0xd, 0x1a}, - output512: []byte{0xe5, 0x10, 0x6b, 0x2a, 0xd, 0x49, 0xd6, 0xd1, 0xe1, 0x3e, 0x33, 0x23, 0x23, 0x21, 0x1, 0xce, 0xa5, 0xda, 0x71, 0xca, 0xa2, 0x4e, 0x70, 0xef, 0xca, 0xc5, 0x7e, 0xc, 0xcf, 0x15, 0x6c, 0xdf, 0x4c, 0x24, 0x92, 0xb0, 0x3c, 0xe0, 0xe1, 0x34, 0x37, 0x1, 0x8d, 0xab, 0x76, 0xb9, 0xc9, 0x89, 0x88, 0x3b, 0xea, 0x69, 0xe8, 0x49, 0xf3, 0x3b, 0xb9, 0x37, 0xa3, 0x97, 0xb8, 0x4a, 0xda, 0x6a}}, - testcase{ - msg: []byte{0x2d, 0x84, 0x27, 0x43, 0x3d, 0xc, 0x61, 0xf2, 0xd9, 0x6c, 0xfe, 0x80, 0xcf, 0x1e, 0x93, 0x22, 0x65, 0xa1, 0x91, 0x36, 0x5c, 0x3b, 0x61, 0xaa, 0xa3, 0xd6, 0xdc, 0xc0, 0x39, 0xf6, 0xba, 0x2a, 0xd5, 0x2a, 0x6a, 0x8c, 0xc3, 0xf, 0xc1, 0xf, 0x70, 0x5e, 0x6b, 0x77, 0x5, 0x10, 0x59, 0x77, 0xfa, 0x49, 0x6c, 0x1c, 0x70, 0x8a, 0x27, 0x7a, 0x12, 0x43, 0x4, 0xf1, 0xfc, 0x40, 0x91, 0x1e, 0x74, 0x41, 0xd1, 0xb5, 0xe7, 0x7b, 0x95, 0x1a, 0xad, 0x7b, 0x1, 0xfd, 0x5d, 0xb1, 0xb3, 0x77, 0xd1, 0x65, 0xb0, 0x5b, 0xbf, 0x89, 0x80, 0x42, 0xe3, 0x96, 0x60, 0xca, 0xf8, 0xb2, 0x79, 0xfe, 0x52, 0x29, 0xd1, 0xa8, 0xdb, 0x86, 0xc0, 0x99, 0x9e, 0xd6, 0x5e, 0x53, 0xd0, 0x1c, 0xcb, 0xc4, 0xb4, 0x31, 0x73, 0xcc, 0xf9, 0x92, 0xb3, 0xa1, 0x45, 0x86, 0xf6, 0xba, 0x42, 0xf5, 0xfe, 0x30, 0xaf, 0xa8, 0xae, 0x40, 0xc5, 0xdf, 0x29, 0x96, 0x6f, 0x93, 0x46, 0xda, 0x5f, 0x8b, 0x35, 0xf1, 0x6a, 0x1d, 0xe3, 0xab, 0x6d, 0xe0, 0xf4, 0x77, 0xd8, 0xd8, 0x66, 0x9, 0x18, 0x6, 0xe, 0x88, 0xb9, 0xb9, 0xe9, 0xca, 0x6a, 0x42, 0x7, 0x3, 0x3b, 0x87, 0xa8, 0x12, 0xdb, 0xf5, 0x54, 0x4d, 0x39, 0xe4, 0x88, 0x20, 0x10, 0xf8, 0x2b, 0x6c, 0xe0, 0x5, 0xf8, 0xe8, 0xff, 0x6f, 0xe3, 0xc3, 0x80, 0x6b, 0xc2, 0xb7, 0x3c, 0x2b, 0x83, 0xaf, 0xb7, 0x4, 0x34, 0x56, 0x29, 0x30, 0x4f, 0x9f, 0x86, 0x35, 0x87, 0x12, 0xe9, 0xfa, 0xe3, 0xca, 0x3e}, - output224: []byte{0x7c, 0xc9, 0xee, 0xbb, 0xe0, 0xdf, 0x46, 0xa3, 0x98, 0x23, 0x3f, 0xa3, 0x12, 0x86, 0xf8, 0xa5, 0x30, 0x29, 0x2b, 0x53, 0xe4, 0x8b, 0xa5, 0x4b, 0x6a, 0xe4, 0x4, 0x72}, - output256: []byte{0xd7, 0x15, 0x5f, 0x6d, 0x3a, 0x90, 0x80, 0x1f, 0x5e, 0x54, 0x76, 0x89, 0x38, 0x9f, 0xf6, 0x2a, 0x60, 0x4c, 0x81, 0xb7, 0xc1, 0x58, 0x3d, 0x92, 0x4, 0xac, 0x6b, 0x1, 0x94, 0xf0, 0xe8, 0xdd}, - output384: []byte{0xa2, 0x9b, 0xcb, 0x89, 0xfd, 0x2b, 0x89, 0x0, 0x67, 0x82, 0x8, 0x8b, 0xf9, 0xa4, 0xab, 0x93, 0x9e, 0xab, 0xaf, 0xf6, 0xf4, 0xee, 0xfc, 0x31, 0xb0, 0x1a, 0x66, 0xb7, 0x3c, 0xdf, 0xb, 0x97, 0x7d, 0x94, 0x5e, 0x5, 0x1d, 0x7e, 0x9f, 0x2, 0xf1, 0x9c, 0xf3, 0x2a, 0xd4, 0xbe, 0xba, 0x6c}, - output512: []byte{0xfa, 0xee, 0x46, 0x2e, 0x4b, 0xce, 0xd1, 0x2a, 0xd5, 0x4d, 0x37, 0x57, 0xd6, 0x44, 0x39, 0x6e, 0xd9, 0x20, 0x30, 0x37, 0x74, 0x16, 0x61, 0xae, 0xa3, 0x2b, 0xcc, 0xad, 0xae, 0x56, 0x8c, 0x4b, 0xdc, 0x92, 0x5e, 0xda, 0x76, 0x61, 0xe, 0x96, 0x4f, 0xbe, 0x3f, 0xb2, 0x6b, 0x33, 0xbc, 0xb, 0xc1, 0x23, 0xdd, 0xf9, 0xb5, 0x28, 0x71, 0x53, 0x17, 0xce, 0x5c, 0x92, 0xe0, 0xa, 0xc9, 0x6f}}, - testcase{ - msg: []byte{0x5e, 0x19, 0xd9, 0x78, 0x87, 0xfc, 0xaa, 0xc0, 0x38, 0x7e, 0x22, 0xc6, 0xf8, 0x3, 0xc3, 0x4a, 0x3d, 0xac, 0xd2, 0x60, 0x41, 0x72, 0x43, 0x3f, 0x7a, 0x8a, 0x7a, 0x52, 0x6c, 0xa4, 0xa2, 0xa1, 0x27, 0x1e, 0xcf, 0xc5, 0xd5, 0xd7, 0xbe, 0x5a, 0xc0, 0xd8, 0x5d, 0x92, 0x10, 0x95, 0x35, 0xd, 0xfc, 0x65, 0x99, 0x7d, 0x44, 0x3c, 0x21, 0xc8, 0x9, 0x4e, 0xa, 0x3f, 0xef, 0xd2, 0x96, 0x1b, 0xcb, 0x94, 0xae, 0xd0, 0x32, 0x91, 0xae, 0x31, 0xc, 0xcd, 0xa7, 0x5d, 0x8a, 0xce, 0x4b, 0xc7, 0xd8, 0x9e, 0x7d, 0x3e, 0x5d, 0x16, 0x50, 0xbd, 0xa5, 0xd6, 0x68, 0xb8, 0xb5, 0xb, 0xfc, 0x8e, 0x60, 0x8e, 0x18, 0x4f, 0x4d, 0x3a, 0x9a, 0x2b, 0xad, 0xc4, 0xff, 0x5f, 0x7, 0xe0, 0xc0, 0xbc, 0x8a, 0x9f, 0x2e, 0xb, 0x2a, 0x26, 0xfd, 0x6d, 0x8c, 0x55, 0x0, 0x8, 0xfa, 0xaa, 0xb7, 0x5f, 0xd7, 0x1a, 0xf2, 0xa4, 0x24, 0xbe, 0xc9, 0xa7, 0xcd, 0x9d, 0x83, 0xfa, 0xd4, 0xc8, 0xe9, 0x31, 0x91, 0x15, 0x65, 0x6a, 0x87, 0x17, 0xd3, 0xb5, 0x23, 0xa6, 0x8f, 0xf8, 0x0, 0x42, 0x58, 0xb9, 0x99, 0xe, 0xd3, 0x62, 0x30, 0x84, 0x61, 0x80, 0x4b, 0xa3, 0xe3, 0xa7, 0xe9, 0x2d, 0x8f, 0x2f, 0xfa, 0xe5, 0xc2, 0xfb, 0xa5, 0x5b, 0xa5, 0xa3, 0xc2, 0x7c, 0xa, 0x2f, 0x71, 0xbd, 0x71, 0x1d, 0x2f, 0xe1, 0x79, 0x9c, 0x2a, 0xdb, 0x31, 0xb2, 0x0, 0x3, 0x54, 0x81, 0xe9, 0xee, 0x5c, 0x4a, 0xdf, 0x2a, 0xb9, 0xc0, 0xfa, 0x50, 0xb2, 0x39, 0x75, 0xcf}, - output224: []byte{0x3, 0xd7, 0x18, 0xda, 0x67, 0x7c, 0x40, 0x18, 0xe5, 0x22, 0x88, 0xbb, 0x30, 0xe4, 0xe6, 0xe7, 0x32, 0xa1, 0x61, 0x44, 0x93, 0x11, 0x76, 0xf0, 0xa8, 0xc7, 0x39, 0x70}, - output256: []byte{0xaa, 0x7a, 0xda, 0xf1, 0x6f, 0x39, 0xe3, 0x98, 0xb4, 0xab, 0xa, 0xda, 0x3, 0x77, 0x10, 0x55, 0x6b, 0x72, 0xb, 0x2, 0x48, 0xd8, 0x48, 0x17, 0xb2, 0xcf, 0xdf, 0x76, 0x0, 0x93, 0x35, 0x95}, - output384: []byte{0x61, 0xd3, 0xb1, 0x37, 0x28, 0x92, 0x56, 0x46, 0x47, 0x6d, 0x67, 0xc8, 0xd6, 0x26, 0xd2, 0xec, 0xe6, 0x9d, 0x9b, 0x42, 0x50, 0x3f, 0xa6, 0xa0, 0xdf, 0x2b, 0x24, 0xa5, 0xf2, 0xab, 0xf, 0xb7, 0xd7, 0x4c, 0x2f, 0x1f, 0x7f, 0x4, 0x30, 0x4c, 0x49, 0xac, 0x94, 0xbd, 0x4e, 0x93, 0xfd, 0xa4}, - output512: []byte{0xfb, 0xe2, 0x5b, 0x43, 0xe5, 0x40, 0x10, 0x4a, 0x3a, 0xad, 0xe8, 0x97, 0x83, 0x8c, 0x63, 0x51, 0x19, 0x28, 0xaf, 0x5a, 0xdd, 0x4f, 0x95, 0x2f, 0x1e, 0x6d, 0x4c, 0x39, 0xe7, 0xc, 0x92, 0x3d, 0xf1, 0x91, 0xfa, 0xa3, 0x6f, 0x46, 0xb2, 0x1f, 0x82, 0x7d, 0x9b, 0x43, 0x79, 0x96, 0xff, 0x72, 0x6, 0xf7, 0x33, 0x37, 0xcf, 0x20, 0xc6, 0xb0, 0xdb, 0x74, 0x8a, 0x70, 0x74, 0x55, 0xb4, 0x20}}, - testcase{ - msg: []byte{0xc8, 0xe9, 0x76, 0xab, 0x46, 0x38, 0x90, 0x93, 0x87, 0xce, 0x3b, 0x8d, 0x4e, 0x51, 0xc, 0x32, 0x30, 0xe5, 0x69, 0xe, 0x2, 0xc4, 0x50, 0x93, 0xb1, 0xd2, 0x97, 0x91, 0xa, 0xbc, 0x48, 0x1e, 0x56, 0xee, 0xa0, 0xf2, 0x96, 0xf9, 0x83, 0x79, 0xdf, 0xc9, 0x8, 0xa, 0xf6, 0x9e, 0x73, 0xb2, 0x39, 0x9d, 0x1c, 0x14, 0x3b, 0xee, 0x80, 0xae, 0x13, 0x28, 0x16, 0x2c, 0xe1, 0xba, 0x7f, 0x6a, 0x83, 0x74, 0x67, 0x9b, 0x20, 0xaa, 0xcd, 0x38, 0xe, 0xb4, 0xe6, 0x13, 0x82, 0xc9, 0x99, 0x98, 0x70, 0x4d, 0x62, 0x70, 0x1a, 0xfa, 0x91, 0x4f, 0x9a, 0x27, 0x5, 0xcd, 0xb0, 0x65, 0x88, 0x5f, 0x50, 0xd0, 0x86, 0xc3, 0xeb, 0x57, 0x53, 0x70, 0xc, 0x38, 0x71, 0x18, 0xbb, 0x14, 0x2f, 0x3e, 0x6d, 0xa1, 0xe9, 0x88, 0xdf, 0xb3, 0x1a, 0xc7, 0x5d, 0x73, 0x68, 0x93, 0x1e, 0x45, 0xd1, 0x39, 0x1a, 0x27, 0x4b, 0x22, 0xf8, 0x3c, 0xeb, 0x7, 0x2f, 0x9b, 0xca, 0xbc, 0xb, 0x21, 0x66, 0x85, 0xbf, 0xd7, 0x89, 0xf5, 0x2, 0x39, 0x71, 0x2, 0x4b, 0x18, 0x78, 0xa2, 0x5, 0x44, 0x25, 0x22, 0xf9, 0xea, 0x7d, 0x87, 0x97, 0xa4, 0x10, 0x2a, 0x3d, 0xf4, 0x17, 0x3, 0x76, 0x82, 0x51, 0xfd, 0x5e, 0x1, 0x7c, 0x85, 0xd1, 0x20, 0xa, 0x46, 0x41, 0x18, 0xaa, 0x35, 0x65, 0x4e, 0x7c, 0xa3, 0x9f, 0x3c, 0x37, 0x5b, 0x8e, 0xf8, 0xcb, 0xe7, 0x53, 0x4d, 0xbc, 0x64, 0xbc, 0x20, 0xbe, 0xfb, 0x41, 0x7c, 0xf6, 0xe, 0xc9, 0x2f, 0x63, 0xd9, 0xee, 0x73, 0x97}, - output224: []byte{0xa9, 0xab, 0xb4, 0x30, 0xfc, 0x1b, 0x3d, 0x8c, 0x6c, 0xde, 0xb5, 0x31, 0x98, 0x78, 0xe7, 0xb1, 0x2b, 0x11, 0x8e, 0x2e, 0x3, 0xf4, 0x5, 0x62, 0xa3, 0x76, 0x41, 0x8c}, - output256: []byte{0xb1, 0x95, 0x46, 0x3f, 0xe2, 0x2a, 0x16, 0x8, 0x2, 0xbe, 0xa, 0x4, 0x64, 0xee, 0x3a, 0xb4, 0xd2, 0xb1, 0x17, 0xde, 0x51, 0x7b, 0x33, 0x1c, 0x7b, 0xf0, 0x4c, 0x8b, 0xa9, 0xc, 0x61, 0x20}, - output384: []byte{0x58, 0x9a, 0xb9, 0x98, 0x1d, 0x9a, 0xbd, 0x1d, 0x71, 0x2d, 0x59, 0xc6, 0x86, 0x3d, 0x85, 0xb, 0xb1, 0xd4, 0x12, 0xd2, 0x4a, 0x96, 0x7d, 0x76, 0xcc, 0xe7, 0x8f, 0xfc, 0x99, 0x8f, 0x8c, 0x1, 0x6d, 0xd4, 0xb1, 0x15, 0xa1, 0xbc, 0x4d, 0xc4, 0x92, 0x48, 0xab, 0x5f, 0x75, 0x8c, 0x21, 0x5a}, - output512: []byte{0xa, 0x41, 0xa0, 0x4, 0x57, 0x3e, 0xa, 0x98, 0x3f, 0xe9, 0xc9, 0x3b, 0xd5, 0x74, 0x39, 0xa2, 0xc, 0x8f, 0x99, 0xb8, 0x0, 0xa6, 0xd, 0x4a, 0x7, 0x11, 0x7e, 0x8d, 0x9b, 0x25, 0xc0, 0xee, 0x38, 0xba, 0xb3, 0xcd, 0xb6, 0xfc, 0x92, 0x16, 0xb8, 0xe0, 0x7f, 0xc, 0xcd, 0xd0, 0x28, 0xc4, 0x18, 0xef, 0x97, 0xb6, 0xd7, 0xe1, 0x5d, 0xec, 0xde, 0x74, 0x25, 0x49, 0x76, 0x44, 0xe2, 0xe4}}, - testcase{ - msg: []byte{0x71, 0x45, 0xfa, 0x12, 0x4b, 0x74, 0x29, 0xa1, 0xfc, 0x22, 0x31, 0x23, 0x7a, 0x94, 0x9b, 0xa7, 0x20, 0x1b, 0xcc, 0x18, 0x22, 0xd3, 0x27, 0x2d, 0xe0, 0x5, 0xb6, 0x82, 0x39, 0x81, 0x96, 0xc2, 0x5f, 0x7e, 0x5c, 0xc2, 0xf2, 0x89, 0xfb, 0xf4, 0x44, 0x15, 0xf6, 0x99, 0xcb, 0x7f, 0xe6, 0x75, 0x77, 0x91, 0xb1, 0x44, 0x34, 0x10, 0x23, 0x4a, 0xe0, 0x61, 0xed, 0xf6, 0x23, 0x35, 0x9e, 0x2b, 0x4e, 0x32, 0xc1, 0x9b, 0xf8, 0x84, 0x50, 0x43, 0x2d, 0xd0, 0x1c, 0xaa, 0x5e, 0xb1, 0x6a, 0x1d, 0xc3, 0x78, 0xf3, 0x91, 0xca, 0x5e, 0x3c, 0x4e, 0x5f, 0x35, 0x67, 0x28, 0xbd, 0xdd, 0x49, 0x75, 0xdb, 0x7c, 0x89, 0xd, 0xa8, 0xbb, 0xc8, 0x4c, 0xc7, 0x3f, 0xf2, 0x44, 0x39, 0x4d, 0xd, 0x48, 0x95, 0x49, 0x78, 0x76, 0x5e, 0x4a, 0x0, 0xb5, 0x93, 0xf7, 0xf, 0x2c, 0xa0, 0x82, 0x67, 0x3a, 0x26, 0x1e, 0xd8, 0x8d, 0xbc, 0xef, 0x11, 0x27, 0x72, 0x8d, 0x8c, 0xd8, 0x9b, 0xc2, 0xc5, 0x97, 0xe9, 0x10, 0x2c, 0xed, 0x60, 0x10, 0xf6, 0x5f, 0xa7, 0x5a, 0x14, 0xeb, 0xe4, 0x67, 0xfa, 0x57, 0xce, 0x3b, 0xd4, 0x94, 0x8b, 0x68, 0x67, 0xd7, 0x4a, 0x9d, 0xf5, 0xc0, 0xec, 0x6f, 0x53, 0xc, 0xbf, 0x2e, 0xe6, 0x1c, 0xe6, 0xf0, 0x6b, 0xc8, 0xf2, 0x86, 0x4d, 0xff, 0x55, 0x83, 0x77, 0x6b, 0x31, 0xdf, 0x8c, 0x7f, 0xfc, 0xb6, 0x14, 0x28, 0xa5, 0x6b, 0xf7, 0xbd, 0x37, 0x18, 0x8b, 0x4a, 0x51, 0x23, 0xbb, 0xf3, 0x38, 0x39, 0x3a, 0xf4, 0x6e, 0xda, 0x85, 0xe6}, - output224: []byte{0x4a, 0x7a, 0x58, 0xb3, 0x37, 0x87, 0x21, 0x89, 0xa0, 0x6b, 0x53, 0xb6, 0xbc, 0xc5, 0xc, 0x29, 0xef, 0x9d, 0xb, 0xbc, 0x49, 0x18, 0x32, 0x90, 0x7a, 0xf1, 0x4e, 0xc8}, - output256: []byte{0x9f, 0x92, 0x96, 0xc5, 0x3e, 0x75, 0x3a, 0x4d, 0xe4, 0xe5, 0xc5, 0xa5, 0x47, 0xf5, 0x17, 0x63, 0xa9, 0x69, 0x3, 0xb0, 0x83, 0xfb, 0xc7, 0xa7, 0x82, 0x8e, 0xff, 0xe4, 0x76, 0x3a, 0x7c, 0xe6}, - output384: []byte{0xb3, 0xcc, 0x72, 0x24, 0xa1, 0xdd, 0x20, 0x8e, 0x73, 0x9c, 0x55, 0x28, 0x23, 0x9b, 0x8d, 0x33, 0x5a, 0x12, 0x9e, 0xe2, 0xe, 0x59, 0x10, 0x26, 0x21, 0x18, 0xe, 0x6b, 0x51, 0x71, 0x4e, 0xd, 0x60, 0x7, 0x8f, 0x4e, 0x73, 0x28, 0x72, 0x64, 0x34, 0xae, 0x41, 0xca, 0x27, 0x35, 0x15, 0xba}, - output512: []byte{0xff, 0x8, 0x15, 0x7, 0xf9, 0x79, 0xf6, 0x9c, 0x67, 0x43, 0xe4, 0x2e, 0xe7, 0x58, 0x85, 0x87, 0x13, 0xb5, 0x70, 0xcb, 0x48, 0xff, 0x85, 0xef, 0xd, 0x72, 0x8c, 0x4e, 0x1b, 0xb5, 0x45, 0x6d, 0x3, 0x5e, 0x49, 0x8c, 0x5, 0xea, 0x4c, 0xeb, 0xd8, 0x20, 0xe1, 0x34, 0xbb, 0x25, 0x2a, 0xc7, 0x6b, 0xa4, 0x94, 0x9a, 0x4f, 0xad, 0x76, 0x87, 0x1a, 0x99, 0x72, 0xae, 0x2f, 0xcc, 0xce, 0xea}}, - testcase{ - msg: []byte{0x7f, 0xdf, 0xad, 0xcc, 0x9d, 0x29, 0xba, 0xd2, 0x3a, 0xe0, 0x38, 0xc6, 0xc6, 0x5c, 0xda, 0x1a, 0xef, 0x75, 0x72, 0x21, 0xb8, 0x87, 0x2e, 0xd3, 0xd7, 0x5f, 0xf8, 0xdf, 0x7d, 0xa0, 0x62, 0x7d, 0x26, 0x6e, 0x22, 0x4e, 0x81, 0x2c, 0x39, 0xf7, 0x98, 0x3e, 0x45, 0x58, 0xbf, 0xd0, 0xa1, 0xf2, 0xbe, 0xf3, 0xfe, 0xb5, 0x6b, 0xa0, 0x91, 0x20, 0xef, 0x76, 0x29, 0x17, 0xb9, 0xc0, 0x93, 0x86, 0x79, 0x48, 0x54, 0x7a, 0xee, 0x98, 0x60, 0xd, 0x10, 0xd8, 0x7b, 0x20, 0x10, 0x68, 0x78, 0xa8, 0xd2, 0x2c, 0x64, 0x37, 0x8b, 0xf6, 0x34, 0xf7, 0xf7, 0x59, 0x0, 0xc0, 0x39, 0x86, 0xb0, 0x77, 0xb0, 0xbf, 0x8b, 0x74, 0xa, 0x82, 0x44, 0x7b, 0x61, 0xb9, 0x9f, 0xee, 0x53, 0x76, 0xc5, 0xeb, 0x66, 0x80, 0xec, 0x9e, 0x30, 0x88, 0xf0, 0xbd, 0xd0, 0xc5, 0x68, 0x83, 0x41, 0x3d, 0x60, 0xc1, 0x35, 0x7d, 0x3c, 0x81, 0x19, 0x50, 0xe5, 0x89, 0xe, 0x76, 0x0, 0x10, 0x3c, 0x91, 0x63, 0x41, 0xb8, 0xc, 0x74, 0x3c, 0x6a, 0x85, 0x2b, 0x7b, 0x4f, 0xb6, 0xc, 0x3b, 0xa2, 0x1f, 0x3b, 0xc1, 0x5b, 0x83, 0x82, 0x43, 0x7a, 0x68, 0x45, 0x47, 0x79, 0xcf, 0x3c, 0xd7, 0xf9, 0xf9, 0xc, 0xcc, 0x8e, 0xf2, 0x8d, 0xb, 0x70, 0x65, 0x35, 0xb1, 0xe4, 0x10, 0x8e, 0xb5, 0x62, 0x7b, 0xb4, 0x5d, 0x71, 0x9c, 0xb0, 0x46, 0x83, 0x9a, 0xee, 0x31, 0x1c, 0xa1, 0xab, 0xdc, 0x83, 0x19, 0xe0, 0x50, 0xd6, 0x79, 0x72, 0xcb, 0x35, 0xa6, 0xb1, 0x60, 0x1b, 0x25, 0xdb, 0xf4, 0x87}, - output224: []byte{0x80, 0x8e, 0x1, 0xcd, 0x27, 0x39, 0x19, 0xba, 0x1b, 0xff, 0x1, 0x1e, 0xe, 0x70, 0x94, 0xec, 0x6d, 0x5c, 0x49, 0x62, 0x91, 0x2b, 0x8, 0xf1, 0x19, 0x65, 0xab, 0x58}, - output256: []byte{0x51, 0xde, 0x40, 0x90, 0xae, 0xc3, 0x6f, 0x6c, 0x44, 0x64, 0x76, 0xc7, 0x9, 0x25, 0x32, 0x72, 0xca, 0xb5, 0x95, 0xd9, 0x88, 0x7c, 0xa5, 0xd5, 0x2a, 0x9b, 0x38, 0x8, 0x68, 0x54, 0xd5, 0x8f}, - output384: []byte{0xd3, 0x3a, 0xd2, 0xa7, 0x1c, 0x71, 0x2a, 0x6f, 0x8a, 0xd9, 0xac, 0x92, 0x39, 0x66, 0xb4, 0xdb, 0x8c, 0x48, 0x18, 0xc7, 0x9c, 0xc6, 0xf, 0x82, 0x75, 0x36, 0x7d, 0x24, 0x52, 0xcf, 0xd2, 0xf5, 0x54, 0x2f, 0xd1, 0x88, 0x8d, 0x64, 0xc9, 0xe9, 0x12, 0xb9, 0x2a, 0x18, 0x68, 0x42, 0xb0, 0x0}, - output512: []byte{0x3, 0x44, 0x4a, 0xe8, 0x31, 0x9e, 0xbd, 0x12, 0x1e, 0x77, 0x7, 0xb9, 0xcd, 0xfd, 0x1f, 0xdf, 0xd5, 0x2f, 0x3d, 0x6b, 0x3d, 0x4b, 0xcb, 0x27, 0x48, 0xaf, 0x42, 0x1a, 0x3c, 0x86, 0x66, 0xc2, 0x2d, 0x8c, 0xd, 0x8a, 0x9, 0x67, 0x67, 0xb1, 0xcd, 0x16, 0xa8, 0xd5, 0x47, 0x38, 0xc5, 0xf6, 0x7a, 0x6f, 0x9d, 0x48, 0xc9, 0x8, 0x27, 0xbe, 0x71, 0x69, 0x1a, 0x42, 0xbe, 0x87, 0x10, 0x8b}}, - testcase{ - msg: []byte{0x98, 0x86, 0x38, 0x21, 0x9f, 0xd3, 0x9, 0x54, 0x21, 0xf8, 0x26, 0xf5, 0x6e, 0x4f, 0x9, 0xe3, 0x56, 0x29, 0x6b, 0x62, 0x8c, 0x3c, 0xe6, 0x93, 0xc, 0x9f, 0x2e, 0x75, 0x8f, 0xd1, 0xa8, 0xc, 0x82, 0x73, 0xf2, 0xf6, 0x1e, 0x4d, 0xaa, 0xe6, 0x5c, 0x4f, 0x11, 0xd, 0x3e, 0x7c, 0xa0, 0x96, 0x5a, 0xc7, 0xd2, 0x4e, 0x34, 0xc0, 0xdc, 0x4b, 0xa2, 0xd6, 0xff, 0xb, 0xf5, 0xbb, 0xe9, 0x3b, 0x35, 0x85, 0xf3, 0x54, 0xd7, 0x54, 0x3c, 0xb5, 0x42, 0xa1, 0xaa, 0x54, 0x67, 0x4d, 0x37, 0x50, 0x77, 0xf2, 0xd3, 0x60, 0xa8, 0xf4, 0xd4, 0x2f, 0x3d, 0xb1, 0x31, 0xc3, 0xb7, 0xab, 0x73, 0x6, 0x26, 0x7b, 0xa1, 0x7, 0x65, 0x98, 0x64, 0xa9, 0xc, 0x8c, 0x90, 0x94, 0x60, 0xa7, 0x36, 0x21, 0xd1, 0xf5, 0xd9, 0xd3, 0xfd, 0x95, 0xbe, 0xb1, 0x9b, 0x23, 0xdb, 0x1c, 0xb6, 0xc0, 0xd0, 0xfb, 0xa9, 0x1d, 0x36, 0x89, 0x15, 0x29, 0xb8, 0xbd, 0x82, 0x63, 0xca, 0xa1, 0xba, 0xb5, 0x6a, 0x4a, 0xff, 0xae, 0xd4, 0x49, 0x62, 0xdf, 0x9, 0x6d, 0x8d, 0x5b, 0x1e, 0xb8, 0x45, 0xef, 0x31, 0x18, 0x8b, 0x3e, 0x10, 0xf1, 0xaf, 0x81, 0x1a, 0x13, 0xf1, 0x56, 0xbe, 0xb7, 0xa2, 0x88, 0xaa, 0xe5, 0x93, 0xeb, 0xd1, 0x47, 0x1b, 0x62, 0x4a, 0xa1, 0xa7, 0xc6, 0xad, 0xf0, 0x1e, 0x22, 0x0, 0xb3, 0xd7, 0x2d, 0x88, 0xa3, 0xae, 0xd3, 0x10, 0xc, 0x88, 0x23, 0x1e, 0x41, 0xef, 0xc3, 0x76, 0x90, 0x6f, 0xb, 0x58, 0xd, 0xc8, 0x95, 0xf0, 0x80, 0xfd, 0xa5, 0x74, 0x1d, 0xb1, 0xcb}, - output224: []byte{0xdc, 0xbc, 0xc3, 0xb, 0x69, 0x9, 0xfd, 0xf0, 0x6, 0x50, 0xf1, 0xa1, 0xc, 0xfb, 0xbd, 0x41, 0x94, 0x8, 0xf9, 0xd3, 0x7f, 0x37, 0x8c, 0x5c, 0xa6, 0x93, 0xb8, 0x3}, - output256: []byte{0x87, 0xa1, 0x74, 0x0, 0xf9, 0x19, 0xf2, 0xf5, 0x32, 0x32, 0xb2, 0x20, 0x5e, 0x1e, 0x8b, 0x14, 0xbd, 0x56, 0x98, 0xa7, 0x6e, 0x74, 0xb9, 0xbd, 0xd5, 0x63, 0x8a, 0x5c, 0x7b, 0xa5, 0xde, 0x1e}, - output384: []byte{0xc1, 0x2d, 0x45, 0xa, 0x2, 0xc, 0xde, 0x18, 0xc2, 0x43, 0x23, 0xfb, 0x4e, 0x3f, 0xb2, 0x32, 0x55, 0x71, 0x4b, 0x1d, 0x4c, 0xbf, 0x29, 0x71, 0x9f, 0x74, 0xda, 0x5e, 0x61, 0x51, 0xfa, 0xe9, 0x1, 0xdc, 0x21, 0xa6, 0x68, 0xa, 0xd1, 0x59, 0xff, 0xb2, 0xe7, 0xc0, 0xaa, 0xab, 0xdf, 0x5b}, - output512: []byte{0x5e, 0xe0, 0xa4, 0x45, 0x97, 0x24, 0x3, 0x7b, 0x73, 0x18, 0x81, 0x5a, 0x80, 0x14, 0x7c, 0x17, 0x2d, 0x6c, 0x8f, 0x88, 0x74, 0xc9, 0xa0, 0x5, 0x77, 0x6, 0xfb, 0x3e, 0x30, 0xf, 0xe9, 0x36, 0x81, 0x5f, 0x7, 0x67, 0x2e, 0x64, 0x47, 0xb7, 0x71, 0xde, 0x69, 0x9d, 0xfa, 0xdf, 0x34, 0x5c, 0x3b, 0xb5, 0x97, 0x4c, 0xf0, 0x19, 0x31, 0x5f, 0xad, 0xd5, 0x53, 0x4d, 0xff, 0x6a, 0x7, 0x9c}}, - testcase{ - msg: []byte{0x5a, 0xab, 0x62, 0x75, 0x6d, 0x30, 0x7a, 0x66, 0x9d, 0x14, 0x6a, 0xba, 0x98, 0x8d, 0x90, 0x74, 0xc5, 0xa1, 0x59, 0xb3, 0xde, 0x85, 0x15, 0x1a, 0x81, 0x9b, 0x11, 0x7c, 0xa1, 0xff, 0x65, 0x97, 0xf6, 0x15, 0x6e, 0x80, 0xfd, 0xd2, 0x8c, 0x9c, 0x31, 0x76, 0x83, 0x51, 0x64, 0xd3, 0x7d, 0xa7, 0xda, 0x11, 0xd9, 0x4e, 0x9, 0xad, 0xd7, 0x70, 0xb6, 0x8a, 0x6e, 0x8, 0x1c, 0xd2, 0x2c, 0xa0, 0xc0, 0x4, 0xbf, 0xe7, 0xcd, 0x28, 0x3b, 0xf4, 0x3a, 0x58, 0x8d, 0xa9, 0x1f, 0x50, 0x9b, 0x27, 0xa6, 0x58, 0x4c, 0x47, 0x4a, 0x4a, 0x2f, 0x3e, 0xe0, 0xf1, 0xf5, 0x64, 0x47, 0x37, 0x92, 0x40, 0xa5, 0xab, 0x1f, 0xb7, 0x7f, 0xdc, 0xa4, 0x9b, 0x30, 0x5f, 0x7, 0xba, 0x86, 0xb6, 0x27, 0x56, 0xfb, 0x9e, 0xfb, 0x4f, 0xc2, 0x25, 0xc8, 0x68, 0x45, 0xf0, 0x26, 0xea, 0x54, 0x20, 0x76, 0xb9, 0x1a, 0xb, 0xc2, 0xcd, 0xd1, 0x36, 0xe1, 0x22, 0xc6, 0x59, 0xbe, 0x25, 0x9d, 0x98, 0xe5, 0x84, 0x1d, 0xf4, 0xc2, 0xf6, 0x3, 0x30, 0xd4, 0xd8, 0xcd, 0xee, 0x7b, 0xf1, 0xa0, 0xa2, 0x44, 0x52, 0x4e, 0xec, 0xc6, 0x8f, 0xf2, 0xae, 0xf5, 0xbf, 0x0, 0x69, 0xc9, 0xe8, 0x7a, 0x11, 0xc6, 0xe5, 0x19, 0xde, 0x1a, 0x40, 0x62, 0xa1, 0xc, 0x83, 0x83, 0x73, 0x88, 0xf7, 0xef, 0x58, 0x59, 0x8a, 0x38, 0x46, 0xf4, 0x9d, 0x49, 0x96, 0x82, 0xb6, 0x83, 0xc4, 0xa0, 0x62, 0xb4, 0x21, 0x59, 0x4f, 0xaf, 0xbc, 0x13, 0x83, 0xc9, 0x43, 0xba, 0x83, 0xbd, 0xef, 0x51, 0x5e, 0xfc, 0xf1, 0xd}, - output224: []byte{0xbe, 0x7, 0x7f, 0x12, 0x76, 0x2e, 0xf5, 0x18, 0x59, 0xb6, 0xc5, 0x20, 0xb1, 0x92, 0x31, 0xe3, 0x4, 0x42, 0xac, 0x26, 0x8c, 0xe4, 0xfd, 0x47, 0x36, 0x6f, 0xf9, 0xf1}, - output256: []byte{0x97, 0x42, 0x53, 0x6c, 0x46, 0x1d, 0xc, 0x35, 0x3, 0xa6, 0xc9, 0x43, 0xfa, 0x81, 0x5, 0xdb, 0xcd, 0x1e, 0x54, 0x2f, 0x72, 0x8d, 0x71, 0xcc, 0xc0, 0x51, 0x7c, 0xff, 0xc2, 0x32, 0xea, 0x68}, - output384: []byte{0xe5, 0xb7, 0xa9, 0xb4, 0x1f, 0xa0, 0xce, 0xc3, 0x25, 0x2f, 0xf9, 0x50, 0x99, 0x52, 0x3d, 0xc8, 0x45, 0xc6, 0x9b, 0x67, 0xd, 0x8d, 0xfe, 0xba, 0x3e, 0x4a, 0xf6, 0xde, 0xc6, 0x59, 0xc4, 0xb2, 0xd4, 0xb0, 0x4f, 0x5f, 0x70, 0x62, 0x20, 0x94, 0x85, 0xa3, 0x7c, 0x54, 0x2c, 0xcb, 0xe7, 0xe6}, - output512: []byte{0x54, 0x8, 0x5a, 0x2f, 0x9c, 0x32, 0x7e, 0x5d, 0x8e, 0xe2, 0x25, 0xef, 0xf5, 0xbd, 0x2c, 0x28, 0x37, 0xe4, 0x4e, 0x80, 0x57, 0xcf, 0x16, 0x91, 0xe6, 0x20, 0x20, 0x50, 0x7, 0x9d, 0x26, 0x85, 0x10, 0x61, 0xc4, 0xda, 0x8d, 0x88, 0xfc, 0x19, 0x23, 0x7e, 0x5b, 0x65, 0x89, 0x50, 0xe6, 0x68, 0x66, 0xe9, 0x20, 0x19, 0xd9, 0xe4, 0x25, 0xe2, 0x41, 0x62, 0x40, 0xa5, 0x9d, 0x25, 0xa6, 0xcf}}, - testcase{ - msg: []byte{0x47, 0xb8, 0x21, 0x6a, 0xa0, 0xfb, 0xb5, 0xd6, 0x79, 0x66, 0xf2, 0xe8, 0x2c, 0x17, 0xc0, 0x7a, 0xa2, 0xd6, 0x32, 0x7e, 0x96, 0xfc, 0xd8, 0x3e, 0x3d, 0xe7, 0x33, 0x36, 0x89, 0xf3, 0xee, 0x79, 0x99, 0x4a, 0x1b, 0xf4, 0x50, 0x82, 0xc4, 0xd7, 0x25, 0xed, 0x8d, 0x41, 0x20, 0x5c, 0xb5, 0xbc, 0xdf, 0x5c, 0x34, 0x1f, 0x77, 0xfa, 0xcb, 0x1d, 0xa4, 0x6a, 0x5b, 0x9b, 0x2c, 0xbc, 0x49, 0xea, 0xdf, 0x78, 0x6b, 0xcd, 0x88, 0x1f, 0x37, 0x1a, 0x95, 0xfa, 0x17, 0xdf, 0x73, 0xf6, 0x6, 0x51, 0x9a, 0xea, 0xf, 0xf7, 0x9d, 0x5a, 0x11, 0x42, 0x7b, 0x98, 0xee, 0x7f, 0x13, 0xa5, 0xc0, 0x6, 0x37, 0xe2, 0x85, 0x41, 0x34, 0x69, 0x10, 0x59, 0x83, 0x91, 0x21, 0xfe, 0xa9, 0xab, 0xe2, 0xcd, 0x1b, 0xcb, 0xbb, 0xf2, 0x7c, 0x74, 0xca, 0xf3, 0x67, 0x8e, 0x5, 0xbf, 0xb1, 0xc9, 0x49, 0x89, 0x7e, 0xa0, 0x1f, 0x56, 0xff, 0xa4, 0xda, 0xfb, 0xe8, 0x64, 0x46, 0x11, 0x68, 0x5c, 0x61, 0x7a, 0x32, 0x6, 0xc7, 0xa7, 0x3, 0x6e, 0x4a, 0xc8, 0x16, 0x79, 0x9f, 0x69, 0x3d, 0xaf, 0xe7, 0xf1, 0x9f, 0x30, 0x3c, 0xe4, 0xeb, 0xa0, 0x9d, 0x21, 0xe0, 0x36, 0x10, 0x20, 0x1b, 0xfc, 0x66, 0x5b, 0x72, 0x40, 0xa, 0x54, 0x7a, 0x1e, 0x0, 0xfa, 0x9b, 0x7a, 0xd8, 0xd8, 0x4f, 0x84, 0xb3, 0x4a, 0xef, 0x11, 0x85, 0x15, 0xe7, 0x4d, 0xef, 0x11, 0xb9, 0x18, 0x8b, 0xd1, 0xe1, 0xf9, 0x7d, 0x9a, 0x12, 0xc3, 0x1, 0x32, 0xec, 0x28, 0x6, 0x33, 0x9b, 0xda, 0xda, 0xcd, 0xa2, 0xfd, 0x8b, 0x78}, - output224: []byte{0x25, 0xc4, 0x25, 0x26, 0x5a, 0xb0, 0x7d, 0xa, 0x8e, 0xc6, 0x59, 0xd4, 0xd5, 0xee, 0x61, 0x8b, 0xde, 0x87, 0x0, 0x3b, 0x72, 0x55, 0xff, 0x4b, 0x53, 0x15, 0xf1, 0xc7}, - output256: []byte{0xae, 0x3b, 0xf0, 0x93, 0x64, 0x97, 0xa2, 0x95, 0x5d, 0xf8, 0x74, 0xb7, 0xf2, 0x68, 0x53, 0x14, 0xc7, 0x60, 0x60, 0x30, 0xb9, 0xc6, 0xe7, 0xbf, 0xb8, 0xa8, 0xdf, 0xf9, 0x82, 0x59, 0x57, 0xb5}, - output384: []byte{0x5e, 0x2b, 0xa5, 0x38, 0x2c, 0x35, 0x7b, 0x5a, 0x19, 0x87, 0xbd, 0xab, 0x9a, 0x2a, 0xb, 0x5, 0x3e, 0xb7, 0x5e, 0xe7, 0x70, 0xe1, 0x99, 0x4e, 0x63, 0xf, 0x24, 0x1, 0x5a, 0xb1, 0x2, 0xe4, 0x82, 0xa9, 0x5a, 0x25, 0xb6, 0x8f, 0x5d, 0xe9, 0x9f, 0xe9, 0x74, 0x8f, 0xa4, 0x8f, 0xf6, 0x96}, - output512: []byte{0x3e, 0xa4, 0x9b, 0x6a, 0xbd, 0x39, 0xcd, 0xf0, 0x4b, 0xcc, 0xd6, 0x48, 0xfb, 0x7e, 0x1f, 0x8a, 0xe3, 0xda, 0xe9, 0xd3, 0xe3, 0xa5, 0xea, 0xb9, 0xce, 0x29, 0xbe, 0x35, 0x6d, 0xef, 0xbb, 0xbe, 0xb1, 0xbb, 0x93, 0xae, 0x40, 0xd3, 0x1c, 0xc1, 0xf0, 0x11, 0xdc, 0xc6, 0xc6, 0xac, 0x85, 0xb1, 0x2, 0xf2, 0x65, 0x4e, 0x2d, 0xbb, 0xac, 0x47, 0x33, 0x3b, 0xcd, 0xb4, 0x75, 0x8a, 0x1a, 0x28}}, - testcase{ - msg: []byte{0x8c, 0xff, 0x1f, 0x67, 0xfe, 0x53, 0xc0, 0x98, 0x89, 0x6d, 0x91, 0x36, 0x38, 0x9b, 0xd8, 0x88, 0x18, 0x16, 0xcc, 0xab, 0x34, 0x86, 0x2b, 0xb6, 0x7a, 0x65, 0x6e, 0x3d, 0x98, 0x89, 0x6f, 0x3c, 0xe6, 0xff, 0xd4, 0xda, 0x73, 0x97, 0x58, 0x9, 0xfc, 0xdf, 0x96, 0x66, 0x76, 0xd, 0x6e, 0x56, 0x1c, 0x55, 0x23, 0x8b, 0x20, 0x5d, 0x80, 0x49, 0xc1, 0xce, 0xde, 0xef, 0x37, 0x4d, 0x17, 0x35, 0xda, 0xa5, 0x33, 0x14, 0x7b, 0xfa, 0x96, 0xb, 0x2c, 0xce, 0x4a, 0x4f, 0x25, 0x41, 0x76, 0xbb, 0x4d, 0x1b, 0xd1, 0xe8, 0x96, 0x54, 0x43, 0x2b, 0x8d, 0xbe, 0x1a, 0x13, 0x5c, 0x42, 0x11, 0x5b, 0x39, 0x4b, 0x2, 0x48, 0x56, 0xa2, 0xa8, 0x3d, 0xc8, 0x5d, 0x67, 0x82, 0xbe, 0x4b, 0x44, 0x42, 0x39, 0x56, 0x7c, 0xce, 0xc4, 0xb1, 0x84, 0xd4, 0x54, 0x8e, 0xae, 0x3f, 0xf6, 0xa1, 0x92, 0xf3, 0x43, 0x29, 0x2b, 0xa2, 0xe3, 0x2a, 0xf, 0x26, 0x7f, 0x31, 0xcc, 0x26, 0x71, 0x9e, 0xb8, 0x52, 0x45, 0xd4, 0x15, 0xfb, 0x89, 0x7a, 0xc2, 0xda, 0x43, 0x3e, 0xe9, 0x1a, 0x99, 0x42, 0x4c, 0x9d, 0x7f, 0x17, 0x66, 0xa4, 0x41, 0x71, 0xd1, 0x65, 0x10, 0x1, 0xc3, 0x8f, 0xc7, 0x92, 0x94, 0xac, 0xcc, 0x68, 0xce, 0xb5, 0x66, 0x5d, 0x36, 0x21, 0x84, 0x54, 0xd3, 0xba, 0x16, 0x9a, 0xe0, 0x58, 0xa8, 0x31, 0x33, 0x8c, 0x17, 0x74, 0x36, 0x3, 0xf8, 0x1e, 0xe1, 0x73, 0xbf, 0xc0, 0x92, 0x74, 0x64, 0xf9, 0xbd, 0x72, 0x8d, 0xee, 0x94, 0xc6, 0xae, 0xab, 0x7a, 0xae, 0x6e, 0xe3, 0xa6, 0x27, 0xe8}, - output224: []byte{0x4, 0x6c, 0xf6, 0x2c, 0x41, 0xce, 0x9b, 0xf, 0x54, 0xb6, 0x67, 0x55, 0x80, 0x63, 0x2, 0x3f, 0x59, 0x88, 0x7b, 0xad, 0xa9, 0xcc, 0x28, 0x84, 0x14, 0xad, 0xee, 0x7f}, - output256: []byte{0x5f, 0xe0, 0x21, 0x6d, 0xcc, 0x1b, 0xdb, 0x48, 0xf3, 0x37, 0x5b, 0x91, 0x73, 0xb7, 0xb2, 0x32, 0x93, 0x9a, 0xa2, 0x17, 0x7c, 0x6d, 0x5, 0x6e, 0x90, 0x8c, 0x8f, 0x2b, 0x92, 0x93, 0xb0, 0x30}, - output384: []byte{0x4, 0x67, 0xc2, 0xb9, 0xf0, 0x2a, 0xf8, 0xce, 0xaf, 0x4f, 0x8f, 0xe8, 0x8d, 0x1d, 0xe3, 0xee, 0x3, 0xd7, 0x8e, 0xc2, 0x6e, 0xde, 0xe0, 0xe3, 0x4b, 0x6e, 0x7e, 0xe4, 0x9a, 0xc3, 0x57, 0xc3, 0x5a, 0x9a, 0xe3, 0x52, 0xff, 0x49, 0x32, 0xd7, 0x5e, 0x6, 0x17, 0xb8, 0xb0, 0xc6, 0x1c, 0x80}, - output512: []byte{0xb3, 0x85, 0x17, 0x90, 0xca, 0x47, 0x57, 0x5d, 0xbf, 0x98, 0x8f, 0x82, 0xc3, 0xb5, 0x1, 0xdc, 0x83, 0x90, 0xa8, 0xe8, 0x59, 0x86, 0x98, 0x16, 0x61, 0x67, 0x56, 0x7a, 0x3, 0x32, 0x91, 0x3c, 0xcc, 0x88, 0x68, 0x58, 0x4d, 0xb4, 0xac, 0xfb, 0x2c, 0x9d, 0xc0, 0xf0, 0xa6, 0x83, 0x32, 0x92, 0xf4, 0xdc, 0xed, 0xc4, 0x7c, 0xf0, 0x3, 0x21, 0x76, 0x89, 0xbc, 0x24, 0x22, 0xb5, 0x3b, 0x93}}, - testcase{ - msg: []byte{0xea, 0xcd, 0x7, 0x97, 0x1c, 0xff, 0x9b, 0x99, 0x39, 0x90, 0x3f, 0x8c, 0x1d, 0x8c, 0xbb, 0x5d, 0x4d, 0xb1, 0xb5, 0x48, 0xa8, 0x5d, 0x4, 0xe0, 0x37, 0x51, 0x4a, 0x58, 0x36, 0x4, 0xe7, 0x87, 0xf3, 0x29, 0x92, 0xbf, 0x21, 0x11, 0xb9, 0x7a, 0xc5, 0xe8, 0xa9, 0x38, 0x23, 0x35, 0x52, 0x73, 0x13, 0x21, 0x52, 0x2a, 0xb5, 0xe8, 0x58, 0x35, 0x61, 0x26, 0xb, 0x7d, 0x13, 0xeb, 0xee, 0xf7, 0x85, 0xb2, 0x3a, 0x41, 0xfd, 0x85, 0x76, 0xa6, 0xda, 0x76, 0x4a, 0x8e, 0xd6, 0xd8, 0x22, 0xd4, 0x95, 0x7a, 0x54, 0x5d, 0x52, 0x44, 0x75, 0x6c, 0x18, 0xaa, 0x80, 0xe1, 0xaa, 0xd4, 0xd1, 0xf9, 0xc2, 0xd, 0x25, 0x9d, 0xee, 0x17, 0x11, 0xe2, 0xcc, 0x8f, 0xd0, 0x13, 0x16, 0x9f, 0xb7, 0xcc, 0x4c, 0xe3, 0x8b, 0x36, 0x2f, 0x8e, 0x9, 0x36, 0xae, 0x91, 0x98, 0xb7, 0xe8, 0x38, 0xdc, 0xea, 0x4f, 0x7a, 0x5b, 0x94, 0x29, 0xbb, 0x3f, 0x6b, 0xbc, 0xf2, 0xdc, 0x92, 0x56, 0x5e, 0x36, 0x76, 0xc1, 0xc5, 0xe6, 0xeb, 0x3d, 0xd2, 0xa0, 0xf8, 0x6a, 0xa2, 0x3e, 0xdd, 0x3d, 0x8, 0x91, 0xf1, 0x97, 0x44, 0x76, 0x92, 0x79, 0x4b, 0x3d, 0xfa, 0x26, 0x96, 0x11, 0xad, 0x97, 0xf7, 0x2b, 0x79, 0x56, 0x2, 0xb4, 0xfd, 0xb1, 0x98, 0xf3, 0xfd, 0x3e, 0xb4, 0x1b, 0x41, 0x50, 0x64, 0x25, 0x6e, 0x34, 0x5e, 0x8d, 0x8c, 0x51, 0xc5, 0x55, 0xdc, 0x8a, 0x21, 0x90, 0x4a, 0x9b, 0xf, 0x1a, 0xd0, 0xef, 0xfa, 0xb7, 0x78, 0x6a, 0xac, 0x2d, 0xa3, 0xb1, 0x96, 0x50, 0x7e, 0x9f, 0x33, 0xca, 0x35, 0x64, 0x27}, - output224: []byte{0x37, 0xe3, 0x84, 0x40, 0x80, 0x98, 0x61, 0x79, 0xfd, 0xa9, 0x9e, 0x9b, 0x8c, 0x54, 0xe2, 0x94, 0x64, 0x30, 0x60, 0x79, 0x5b, 0x66, 0xe8, 0x10, 0xe3, 0xe2, 0x5d, 0x9e}, - output256: []byte{0xc3, 0x39, 0x90, 0x4e, 0xc8, 0x65, 0xf2, 0x4f, 0xb3, 0xf8, 0x8f, 0x14, 0x2a, 0x87, 0x86, 0xd7, 0x70, 0x93, 0x4e, 0x0, 0x6e, 0xae, 0xdd, 0xbf, 0x45, 0xac, 0xbb, 0x6b, 0x38, 0x43, 0x10, 0x21}, - output384: []byte{0x87, 0xf9, 0xec, 0xb9, 0x6, 0xc9, 0xd8, 0xaa, 0xfa, 0x8d, 0xc6, 0x2a, 0xf8, 0x58, 0xc9, 0x96, 0x9, 0xa8, 0xe9, 0x59, 0xb, 0xa5, 0xbc, 0x91, 0xa8, 0x92, 0x5, 0xde, 0x44, 0xf0, 0x6a, 0xe7, 0x97, 0x6a, 0x9b, 0xe9, 0x18, 0xaa, 0xfc, 0x91, 0x34, 0xde, 0x90, 0x29, 0x11, 0x71, 0x52, 0xa1}, - output512: []byte{0xa7, 0x10, 0xcb, 0x26, 0xc6, 0x32, 0xf2, 0x89, 0x50, 0x4c, 0xd0, 0x3, 0x9b, 0xa6, 0xab, 0x9b, 0x4d, 0x35, 0x24, 0xc5, 0x2b, 0x28, 0x6d, 0x46, 0x6e, 0x2f, 0x89, 0x39, 0xf8, 0x68, 0x4e, 0x3f, 0x18, 0xdc, 0xa2, 0x98, 0xa2, 0xba, 0x67, 0xeb, 0x71, 0x9, 0x97, 0xb7, 0xbb, 0x10, 0xae, 0x27, 0x94, 0x38, 0xb9, 0xb4, 0x86, 0x8d, 0xa, 0xdb, 0x24, 0x8f, 0x28, 0x2b, 0xb4, 0x40, 0xa1, 0x30}}, - testcase{ - msg: []byte{0x23, 0xac, 0x4e, 0x9a, 0x42, 0xc6, 0xef, 0x45, 0xc3, 0x33, 0x6c, 0xe6, 0xdf, 0xc2, 0xff, 0x7d, 0xe8, 0x88, 0x4c, 0xd2, 0x3d, 0xc9, 0x12, 0xfe, 0xf0, 0xf7, 0x75, 0x6c, 0x9, 0xd3, 0x35, 0xc1, 0x89, 0xf3, 0xad, 0x3a, 0x23, 0x69, 0x7a, 0xbd, 0xa8, 0x51, 0xa8, 0x18, 0x81, 0xa0, 0xc8, 0xcc, 0xaf, 0xc9, 0x80, 0xab, 0x2c, 0x70, 0x25, 0x64, 0xc2, 0xbe, 0x15, 0xfe, 0x4c, 0x4b, 0x9f, 0x10, 0xdf, 0xb2, 0x24, 0x8d, 0xd, 0xc, 0xb2, 0xe2, 0x88, 0x7f, 0xd4, 0x59, 0x8a, 0x1d, 0x4a, 0xcd, 0xa8, 0x97, 0x94, 0x4a, 0x2f, 0xfc, 0x58, 0xf, 0xf9, 0x27, 0x19, 0xc9, 0x5c, 0xf2, 0xaa, 0x42, 0xdc, 0x58, 0x46, 0x74, 0xcb, 0x5a, 0x9b, 0xc5, 0x76, 0x5b, 0x9d, 0x6d, 0xdf, 0x57, 0x89, 0x79, 0x1d, 0x15, 0xf8, 0xdd, 0x92, 0x5a, 0xa1, 0x2b, 0xff, 0xaf, 0xbc, 0xe6, 0x8, 0x27, 0xb4, 0x90, 0xbb, 0x7d, 0xf3, 0xdd, 0xa6, 0xf2, 0xa1, 0x43, 0xc8, 0xbf, 0x96, 0xab, 0xc9, 0x3, 0xd8, 0x3d, 0x59, 0xa7, 0x91, 0xe2, 0xd6, 0x28, 0x14, 0xa8, 0x9b, 0x80, 0x80, 0xa2, 0x80, 0x60, 0x56, 0x8c, 0xf2, 0x4a, 0x80, 0xae, 0x61, 0x17, 0x9f, 0xe8, 0x4e, 0xf, 0xfa, 0xd0, 0x3, 0x88, 0x17, 0x8c, 0xb6, 0xa6, 0x17, 0xd3, 0x7e, 0xfd, 0x54, 0xcc, 0x1, 0x97, 0xa, 0x4a, 0x41, 0xd1, 0xa8, 0xd3, 0xdd, 0xce, 0x46, 0xed, 0xbb, 0xa4, 0xab, 0x7c, 0x90, 0xad, 0x56, 0x53, 0x98, 0xd3, 0x76, 0xf4, 0x31, 0x18, 0x9c, 0xe8, 0xc1, 0xc3, 0x3e, 0x13, 0x2f, 0xea, 0xe6, 0xa8, 0xcd, 0x17, 0xa6, 0x1c, 0x63, 0x0, 0x12}, - output224: []byte{0x3b, 0x50, 0x3d, 0x61, 0x5e, 0x54, 0x13, 0x2b, 0x42, 0xca, 0xc1, 0xa0, 0x45, 0xa, 0xd, 0x7e, 0x2e, 0xdc, 0x63, 0xed, 0x87, 0xbf, 0x10, 0x9c, 0x50, 0x9c, 0x79, 0x87}, - output256: []byte{0x4c, 0xa8, 0xb7, 0xfe, 0xbd, 0xf0, 0xa8, 0x6, 0x2e, 0x9b, 0x76, 0x18, 0x5c, 0xf4, 0x16, 0x50, 0x71, 0xbb, 0x30, 0x92, 0x8c, 0x18, 0xf1, 0x43, 0x38, 0xc3, 0x5, 0x62, 0x67, 0x89, 0xc6, 0xd3}, - output384: []byte{0x51, 0xc, 0xb4, 0x84, 0xb6, 0xd4, 0xb4, 0x7a, 0x59, 0xf, 0x62, 0x11, 0xc7, 0xf3, 0x35, 0x92, 0x24, 0x6a, 0x2e, 0x5, 0xa1, 0xc6, 0x92, 0x58, 0xb6, 0xcf, 0x9a, 0x24, 0xc1, 0xa3, 0xaf, 0xc2, 0x52, 0x78, 0x41, 0xae, 0x3f, 0xcd, 0x55, 0x2e, 0x51, 0x3, 0xdd, 0x24, 0x74, 0x3a, 0xc6, 0xb3}, - output512: []byte{0x8f, 0x67, 0x7a, 0x80, 0x89, 0x5, 0x2b, 0x47, 0xbe, 0x60, 0xc0, 0xbb, 0x76, 0x66, 0xe4, 0x3, 0xa5, 0xda, 0xa5, 0xe2, 0x8a, 0x2b, 0x63, 0x2f, 0x2e, 0x49, 0x6c, 0x58, 0x7f, 0x1f, 0xdc, 0xa0, 0xee, 0x33, 0xd9, 0xe7, 0x8d, 0xaa, 0x4e, 0xf5, 0x75, 0xb1, 0x33, 0x89, 0x74, 0x8b, 0x8c, 0x24, 0x11, 0x0, 0x53, 0xb0, 0xb9, 0x6a, 0x8, 0x2c, 0x6, 0xc3, 0xf8, 0xe, 0xbe, 0x8d, 0xe9, 0x76}}, - testcase{ - msg: []byte{0x1, 0x72, 0xdf, 0x73, 0x22, 0x82, 0xc9, 0xd4, 0x88, 0x66, 0x9c, 0x35, 0x8e, 0x34, 0x92, 0x26, 0xc, 0xbe, 0x91, 0xc9, 0x5c, 0xfb, 0xc1, 0xe3, 0xfe, 0xa6, 0xc4, 0xb0, 0xec, 0x12, 0x9b, 0x45, 0xf2, 0x42, 0xac, 0xe0, 0x9f, 0x15, 0x2f, 0xc6, 0x23, 0x4e, 0x1b, 0xee, 0x8a, 0xab, 0x8c, 0xd5, 0x6e, 0x8b, 0x48, 0x6e, 0x1d, 0xcb, 0xa9, 0xc0, 0x54, 0x7, 0xc2, 0xf9, 0x5d, 0xa8, 0xd8, 0xf1, 0xc0, 0xaf, 0x78, 0xee, 0x2e, 0xd8, 0x2a, 0x3a, 0x79, 0xec, 0xc, 0xb0, 0x70, 0x93, 0x96, 0xee, 0x62, 0xaa, 0xdb, 0x84, 0xf8, 0xa4, 0xee, 0x8a, 0x7c, 0xcc, 0xa3, 0xc1, 0xee, 0x84, 0xe3, 0x2, 0xa0, 0x9e, 0xa8, 0x2, 0x20, 0x4a, 0xfe, 0xcf, 0x4, 0x9, 0x7e, 0x67, 0xd0, 0xf8, 0xe8, 0xa9, 0xd2, 0x65, 0x11, 0x26, 0xc0, 0xa5, 0x98, 0xa3, 0x70, 0x81, 0xe4, 0x2d, 0x16, 0x8b, 0xa, 0xe8, 0xa7, 0x19, 0x51, 0xc5, 0x24, 0x25, 0x9e, 0x4e, 0x20, 0x54, 0xe5, 0x35, 0xb7, 0x79, 0x67, 0x9b, 0xda, 0xde, 0x56, 0x6f, 0xe5, 0x57, 0x0, 0x85, 0x86, 0x18, 0xe6, 0x26, 0xb4, 0xa0, 0xfa, 0xf8, 0x95, 0xbc, 0xce, 0x90, 0x11, 0x50, 0x4a, 0x49, 0xe0, 0x5f, 0xd5, 0x61, 0x27, 0xea, 0xe3, 0xd1, 0xf8, 0x91, 0x7a, 0xfb, 0x54, 0x8e, 0xca, 0xda, 0xbd, 0xa1, 0x2, 0x1, 0x11, 0xfe, 0xc9, 0x31, 0x4c, 0x41, 0x34, 0x98, 0xa3, 0x60, 0xb0, 0x86, 0x40, 0x54, 0x9a, 0x22, 0xcb, 0x23, 0xc7, 0x31, 0xac, 0xe7, 0x43, 0x25, 0x2a, 0x82, 0x27, 0xa0, 0xd2, 0x68, 0x9d, 0x4c, 0x60, 0x1, 0x60, 0x66, 0x78, 0xdf, 0xb9, 0x21}, - output224: []byte{0xcb, 0x40, 0x83, 0x7d, 0xaf, 0x4a, 0x88, 0x25, 0x38, 0x46, 0x4d, 0xec, 0xa, 0x99, 0x9d, 0xa4, 0x82, 0xb4, 0xaa, 0xe0, 0x87, 0x8, 0xea, 0x6d, 0x5d, 0x7f, 0xf4, 0x61}, - output256: []byte{0x23, 0xd2, 0x61, 0x44, 0x20, 0x85, 0x9b, 0x2f, 0x13, 0xac, 0x8, 0x44, 0x53, 0xdd, 0x35, 0xc3, 0x3f, 0xe4, 0x7c, 0x89, 0x4d, 0xd5, 0xc, 0x8, 0x7f, 0xd1, 0x65, 0x3f, 0xca, 0xee, 0xa0, 0xb}, - output384: []byte{0x3, 0xf3, 0xbb, 0x45, 0xfd, 0x70, 0x96, 0x6a, 0xc5, 0xef, 0xd9, 0x59, 0x8c, 0x48, 0xe, 0xd6, 0x77, 0xc8, 0x6c, 0x7c, 0xf0, 0xb, 0x10, 0x26, 0x1a, 0xe6, 0x79, 0xc, 0x52, 0x79, 0xa5, 0xe4, 0x73, 0x86, 0xf3, 0xd3, 0x17, 0x26, 0xd9, 0xcb, 0x61, 0x9b, 0x92, 0xa7, 0x9c, 0xca, 0xe2, 0x5c}, - output512: []byte{0xce, 0x63, 0x1e, 0x6f, 0x2c, 0x2d, 0xc5, 0x73, 0x8c, 0xf, 0xa9, 0x58, 0x57, 0x17, 0x73, 0xb5, 0x8a, 0xf1, 0x30, 0xb9, 0x48, 0x24, 0x33, 0x14, 0x19, 0xee, 0x57, 0xe2, 0x69, 0x1c, 0xe5, 0xf2, 0x9d, 0xb3, 0xd8, 0xfe, 0x45, 0x6c, 0xd1, 0xe7, 0xcd, 0xc0, 0x7f, 0x61, 0x5, 0xfa, 0x1b, 0x6f, 0xd7, 0x29, 0xc2, 0xb4, 0x19, 0x0, 0x8c, 0xcd, 0x88, 0x91, 0x69, 0xc3, 0x38, 0x5d, 0xb1, 0xb9}}, - testcase{ - msg: []byte{0x38, 0x75, 0xb9, 0x24, 0xc, 0xf3, 0xe0, 0xa8, 0xb5, 0x9c, 0x65, 0x85, 0x40, 0xf2, 0x6a, 0x70, 0x1c, 0xf1, 0x88, 0x49, 0x6e, 0x2c, 0x21, 0x74, 0x78, 0x8b, 0x12, 0x6f, 0xd2, 0x94, 0x2, 0xd6, 0xa7, 0x54, 0x53, 0xba, 0x6, 0x35, 0x28, 0x4d, 0x8, 0x83, 0x5f, 0x40, 0x5, 0x1a, 0x2a, 0x96, 0x83, 0xdc, 0x92, 0xaf, 0xb9, 0x38, 0x37, 0x19, 0x19, 0x12, 0x31, 0x17, 0x3, 0x79, 0xba, 0x6f, 0x4a, 0xdc, 0x81, 0x6f, 0xec, 0xbb, 0xf, 0x9c, 0x44, 0x6b, 0x78, 0x5b, 0xf5, 0x20, 0x79, 0x68, 0x41, 0xe5, 0x88, 0x78, 0xb7, 0x3c, 0x58, 0xd3, 0xeb, 0xb0, 0x97, 0xce, 0x47, 0x61, 0xfd, 0xea, 0xbe, 0x15, 0xde, 0x2f, 0x31, 0x9d, 0xfb, 0xaf, 0x17, 0x42, 0xcd, 0xeb, 0x38, 0x95, 0x59, 0xc7, 0x88, 0x13, 0x1a, 0x67, 0x93, 0xe1, 0x93, 0x85, 0x66, 0x61, 0x37, 0x6c, 0x81, 0xce, 0x95, 0x68, 0xda, 0x19, 0xaa, 0x69, 0x25, 0xb4, 0x7f, 0xfd, 0x77, 0xa4, 0x3c, 0x7a, 0xe, 0x75, 0x8c, 0x37, 0xd6, 0x92, 0x54, 0x90, 0x9f, 0xf0, 0xfb, 0xd4, 0x15, 0xef, 0x8e, 0xb9, 0x37, 0xbc, 0xd4, 0x9f, 0x91, 0x46, 0x8b, 0x49, 0x97, 0x4c, 0x7, 0xdc, 0x81, 0x9a, 0xbd, 0x67, 0x39, 0x5d, 0xb0, 0xe0, 0x58, 0x74, 0xff, 0x83, 0xdd, 0xda, 0xb8, 0x95, 0x34, 0x4a, 0xbd, 0xe, 0x71, 0x11, 0xb2, 0xdf, 0x9e, 0x58, 0xd7, 0x6d, 0x85, 0xad, 0x98, 0x10, 0x6b, 0x36, 0x29, 0x58, 0x26, 0xbe, 0x4, 0xd4, 0x35, 0x61, 0x55, 0x95, 0x60, 0x5e, 0x4b, 0x4b, 0xb8, 0x24, 0xb3, 0x3c, 0x4a, 0xfe, 0xb5, 0xe7, 0xbb, 0xd, 0x19, 0xf9, 0x9}, - output224: []byte{0xea, 0xe9, 0x11, 0xe6, 0x66, 0x61, 0xdc, 0xd3, 0x47, 0x2b, 0x45, 0x8a, 0x48, 0xb7, 0x47, 0x30, 0x46, 0x89, 0x23, 0xc7, 0xab, 0xca, 0xc7, 0xf3, 0x11, 0xf0, 0x24, 0x63}, - output256: []byte{0x55, 0x90, 0xbb, 0x75, 0x24, 0x7d, 0x7c, 0xd0, 0xb3, 0x56, 0x20, 0xf0, 0x6, 0x2b, 0x90, 0xff, 0xb2, 0xa2, 0x4d, 0xe4, 0x12, 0x20, 0xed, 0x62, 0x9d, 0x9e, 0x9a, 0x7a, 0xbc, 0xad, 0xfb, 0x51}, - output384: []byte{0x68, 0xa4, 0x7c, 0x7d, 0x12, 0x4e, 0x8a, 0xea, 0x5c, 0xfe, 0xef, 0x7a, 0x9d, 0x8c, 0xa7, 0xaa, 0x8d, 0xf6, 0xee, 0xe6, 0x65, 0x2d, 0xe3, 0xa3, 0x85, 0x23, 0x1f, 0x29, 0xbc, 0x4b, 0x98, 0x3a, 0xec, 0x8a, 0xf2, 0xa6, 0x13, 0x29, 0xb6, 0x4b, 0xb5, 0x9a, 0x45, 0xb7, 0x7a, 0x38, 0xe4, 0xdf}, - output512: []byte{0xff, 0xf6, 0x77, 0xbb, 0x58, 0x90, 0x9c, 0x15, 0x8e, 0xa6, 0x77, 0xbe, 0x70, 0x42, 0x53, 0x50, 0x5b, 0x10, 0x6a, 0xf9, 0x34, 0xf6, 0x39, 0xab, 0xfe, 0xc6, 0x3b, 0xd0, 0xc6, 0x30, 0x97, 0xaa, 0x4b, 0xf0, 0x32, 0xfe, 0x92, 0x41, 0x49, 0xdd, 0x99, 0x1d, 0x33, 0x5e, 0x1c, 0x44, 0xc0, 0x22, 0xe, 0x4d, 0x13, 0xcb, 0xc4, 0x1b, 0x6a, 0x98, 0xfb, 0x5a, 0x5, 0xfa, 0xa3, 0xfe, 0x15, 0xb3}}, - testcase{ - msg: []byte{0x74, 0x7c, 0xc1, 0xa5, 0x9f, 0xef, 0xba, 0x94, 0xa9, 0xc7, 0x5b, 0xa8, 0x66, 0xc3, 0xd, 0xc5, 0xc1, 0xcb, 0xc, 0xf, 0x8e, 0x93, 0x61, 0xd9, 0x84, 0x84, 0x95, 0x6d, 0xd5, 0xd1, 0xa4, 0xf, 0x61, 0x84, 0xaf, 0xbe, 0x3d, 0xac, 0x9f, 0x76, 0x2, 0x8d, 0x1c, 0xae, 0xcc, 0xfb, 0xf6, 0x91, 0x99, 0xc6, 0xce, 0x2b, 0x4c, 0x9, 0x2a, 0x3f, 0x4d, 0x2a, 0x56, 0xfe, 0x5a, 0x33, 0xa0, 0x7, 0x57, 0xf4, 0xd7, 0xde, 0xe5, 0xdf, 0xb0, 0x52, 0x43, 0x11, 0xa9, 0x7a, 0xe0, 0x66, 0x8a, 0x47, 0x97, 0x1b, 0x95, 0x76, 0x6e, 0x2f, 0x6d, 0xd4, 0x8c, 0x3f, 0x57, 0x84, 0x1f, 0x91, 0xf0, 0x4a, 0x0, 0xad, 0x5e, 0xa7, 0xf, 0x2d, 0x47, 0x9a, 0x26, 0x20, 0xdc, 0x5c, 0xd7, 0x8e, 0xaa, 0xb3, 0xa3, 0xb0, 0x11, 0x71, 0x9b, 0x7e, 0x78, 0xd1, 0x9d, 0xdf, 0x70, 0xd9, 0x42, 0x37, 0x98, 0xaf, 0x77, 0x51, 0x7e, 0xbc, 0x55, 0x39, 0x2f, 0xcd, 0x1, 0xfc, 0x60, 0xd, 0x8d, 0x46, 0x6b, 0x9e, 0x7a, 0x7a, 0x85, 0xbf, 0x33, 0xf9, 0xcc, 0x54, 0x19, 0xe9, 0xbd, 0x87, 0x4d, 0xdf, 0xd6, 0x9, 0x81, 0x15, 0xd, 0xda, 0xf8, 0xd7, 0xfe, 0xba, 0xa4, 0x37, 0x4f, 0x8, 0x72, 0xa5, 0x62, 0x8d, 0x31, 0x80, 0x0, 0x31, 0x1e, 0x2f, 0x56, 0x55, 0x36, 0x5a, 0xd4, 0xd4, 0x7, 0xc2, 0xe, 0x5c, 0x4, 0xdf, 0x17, 0xa2, 0x22, 0xe7, 0xde, 0xec, 0x79, 0xc5, 0xab, 0x11, 0x16, 0xd8, 0x57, 0x2f, 0x91, 0xcd, 0x6, 0xe1, 0xcc, 0xc7, 0xce, 0xd5, 0x37, 0x36, 0xfc, 0x86, 0x7f, 0xd4, 0x9e, 0xce, 0xbe, 0x6b, 0xf8, 0x8, 0x2e, 0x8a}, - output224: []byte{0x30, 0x7d, 0x5a, 0x8b, 0xa5, 0x86, 0x5a, 0x4d, 0x28, 0x1a, 0xcb, 0x2f, 0x3c, 0x5e, 0xf1, 0x6e, 0x3b, 0x11, 0xbc, 0xd8, 0xc0, 0xf8, 0x2d, 0x22, 0xd4, 0x7c, 0x2c, 0xc8}, - output256: []byte{0xe5, 0x93, 0x24, 0x41, 0xb0, 0x12, 0xe5, 0x3, 0xb0, 0xb0, 0xc6, 0x10, 0x47, 0x3, 0xba, 0x2, 0x61, 0x3e, 0x47, 0x2a, 0xd6, 0x56, 0x55, 0xc0, 0x85, 0xb0, 0xad, 0xb0, 0x76, 0x56, 0xb2, 0x8f}, - output384: []byte{0xdd, 0x3b, 0xba, 0x1b, 0x4f, 0x84, 0x93, 0xe0, 0x63, 0x91, 0x51, 0xd9, 0x30, 0x38, 0x35, 0xf4, 0x92, 0x60, 0x6e, 0x2d, 0xb3, 0xaf, 0x34, 0xfe, 0x65, 0x15, 0x6a, 0x64, 0x27, 0x94, 0x19, 0x6d, 0x0, 0xa6, 0xc3, 0x4a, 0x3a, 0x5f, 0xea, 0x66, 0x20, 0x2c, 0x3b, 0x5a, 0x79, 0x98, 0xa, 0x8a}, - output512: []byte{0x45, 0x1e, 0xe5, 0x87, 0x22, 0x6c, 0x99, 0x98, 0x9f, 0x5e, 0xc1, 0x0, 0x50, 0x98, 0x3b, 0x1f, 0xd6, 0x61, 0x22, 0x8a, 0x4a, 0xb4, 0x86, 0x18, 0xf1, 0xd1, 0x17, 0x3c, 0x94, 0xfa, 0xc3, 0x9e, 0xcf, 0xd3, 0xc2, 0x6c, 0x16, 0x65, 0x36, 0x33, 0xb2, 0x60, 0x97, 0xe3, 0x1a, 0xf, 0x22, 0x13, 0xb4, 0xf1, 0x15, 0x3a, 0x57, 0xcb, 0x48, 0xa7, 0xd, 0x2a, 0xf1, 0xad, 0xeb, 0x1b, 0xbc, 0x6}}, - testcase{ - msg: []byte{0x57, 0xaf, 0x97, 0x1f, 0xcc, 0xae, 0xc9, 0x74, 0x35, 0xdc, 0x2e, 0xc9, 0xef, 0x4, 0x29, 0xbc, 0xed, 0xc6, 0xb6, 0x47, 0x72, 0x9e, 0xa1, 0x68, 0x85, 0x8a, 0x6e, 0x49, 0xac, 0x10, 0x71, 0xe7, 0x6, 0xf4, 0xa5, 0xa6, 0x45, 0xca, 0x14, 0xe8, 0xc7, 0x74, 0x6d, 0x65, 0x51, 0x16, 0x20, 0x68, 0x2c, 0x90, 0x6c, 0x8b, 0x86, 0xec, 0x90, 0x1f, 0x3d, 0xde, 0xd4, 0x16, 0x7b, 0x3f, 0x0, 0xb0, 0x6c, 0xbf, 0xac, 0x6a, 0xee, 0x37, 0x28, 0x5, 0x1b, 0x3e, 0x5f, 0xf1, 0xb, 0x4f, 0x9e, 0xd8, 0xbd, 0xb, 0x8d, 0xa9, 0x43, 0x3, 0xc8, 0x33, 0x75, 0x5b, 0x3c, 0xa3, 0xae, 0xdd, 0xf0, 0xb5, 0x4b, 0xc8, 0xd6, 0x63, 0x21, 0x38, 0xb5, 0xd2, 0x5b, 0xab, 0x3, 0xd1, 0x7b, 0x34, 0x58, 0xa9, 0xd7, 0x82, 0x10, 0x80, 0x6, 0xf5, 0xbb, 0x7d, 0xe7, 0x5b, 0x5c, 0xb, 0xa8, 0x54, 0xb4, 0x23, 0xd8, 0xbb, 0x80, 0x1e, 0x70, 0x1e, 0x99, 0xdc, 0x4f, 0xea, 0xad, 0x59, 0xbc, 0x1c, 0x71, 0x12, 0x45, 0x3b, 0x4, 0xd3, 0x3e, 0xa3, 0x63, 0x56, 0x39, 0xfb, 0x80, 0x2c, 0x73, 0xc2, 0xb7, 0x1d, 0x58, 0xa5, 0x6b, 0xbd, 0x67, 0x1b, 0x18, 0xfe, 0x34, 0xed, 0x2e, 0x3d, 0xca, 0x38, 0x82, 0x7d, 0x63, 0xfd, 0xb1, 0xd4, 0xfb, 0x32, 0x85, 0x40, 0x50, 0x4, 0xb2, 0xb3, 0xe2, 0x60, 0x81, 0xa8, 0xff, 0x8, 0xcd, 0x6d, 0x2b, 0x8, 0xf8, 0xe7, 0xb7, 0xe9, 0xa, 0x2a, 0xb1, 0xed, 0x7a, 0x41, 0xb1, 0xd0, 0x12, 0x85, 0x22, 0xc2, 0xf8, 0xbf, 0xf5, 0x6a, 0x7f, 0xe6, 0x79, 0x69, 0x42, 0x2c, 0xe8, 0x39, 0xa9, 0xd4, 0x60, 0x8f, 0x3}, - output224: []byte{0x58, 0x66, 0x6b, 0x32, 0x5d, 0x81, 0xcb, 0xe6, 0xa4, 0xbb, 0xad, 0x91, 0x72, 0xe, 0x2b, 0xa9, 0x3c, 0x70, 0xea, 0x11, 0x4e, 0x7f, 0x77, 0x32, 0x3c, 0x5b, 0xe4, 0x86}, - output256: []byte{0x21, 0xc0, 0xd8, 0x4e, 0xb7, 0xb6, 0x17, 0x74, 0xf9, 0x7d, 0xb5, 0xd9, 0xac, 0xf1, 0xdf, 0xfa, 0xfb, 0x66, 0x2c, 0x1, 0xed, 0x29, 0x1a, 0x44, 0x2b, 0xec, 0x6f, 0x14, 0xd1, 0x33, 0x46, 0x99}, - output384: []byte{0x50, 0xd3, 0xb0, 0x2a, 0xc7, 0xb9, 0x7, 0xb3, 0x10, 0xc1, 0xc0, 0x10, 0x5e, 0xb4, 0x7f, 0x6d, 0xcf, 0x3a, 0xf0, 0xe4, 0x73, 0x78, 0x5d, 0xaa, 0x54, 0xd8, 0x3, 0x7a, 0x9a, 0x3e, 0x74, 0xa5, 0xd1, 0xa4, 0x1d, 0x81, 0x12, 0x2, 0xf1, 0xe3, 0xc8, 0xa1, 0x40, 0x17, 0x3d, 0x92, 0xf6, 0xf}, - output512: []byte{0xf9, 0xd6, 0xad, 0x86, 0x86, 0x12, 0x5e, 0x71, 0xfe, 0x8, 0x56, 0xe8, 0x6, 0xd6, 0x8b, 0xa9, 0x7e, 0xf1, 0x23, 0x44, 0x39, 0x38, 0xd2, 0x82, 0x83, 0x38, 0x7f, 0x33, 0xe3, 0xac, 0x6e, 0x2a, 0x7d, 0xe0, 0x42, 0xa3, 0xee, 0x5f, 0x79, 0x94, 0xc1, 0xee, 0xcc, 0x5b, 0x6f, 0x22, 0xcb, 0xae, 0x13, 0x49, 0xca, 0xb2, 0xfb, 0x7a, 0xa, 0x1, 0x25, 0xec, 0x23, 0x20, 0x32, 0x8, 0x58, 0xd4}}, - testcase{ - msg: []byte{0x4, 0xe1, 0x6d, 0xed, 0xc1, 0x22, 0x79, 0x2, 0xba, 0xaf, 0x33, 0x2d, 0x3d, 0x8, 0x92, 0x36, 0x1, 0xbd, 0xd6, 0x4f, 0x57, 0x3f, 0xaa, 0x1b, 0xb7, 0x20, 0x19, 0x18, 0xcf, 0xe1, 0x6b, 0x1e, 0x10, 0x15, 0x1d, 0xae, 0x87, 0x5d, 0xa0, 0xc0, 0xd6, 0x3c, 0x59, 0xc3, 0xdd, 0x5, 0xc, 0x4c, 0x6a, 0x87, 0x40, 0x11, 0xb0, 0x18, 0x42, 0x1a, 0xfc, 0x46, 0x23, 0xab, 0x3, 0x81, 0x83, 0x1b, 0x2d, 0xa2, 0xa8, 0xba, 0x42, 0xc9, 0x6e, 0x4f, 0x70, 0x86, 0x4a, 0xc4, 0x4e, 0x10, 0x6f, 0x94, 0x31, 0x10, 0x51, 0xe7, 0x4c, 0x77, 0xc1, 0x29, 0x1b, 0xf5, 0xdb, 0x95, 0x39, 0xe6, 0x95, 0x67, 0xbf, 0x6a, 0x11, 0xcf, 0x69, 0x32, 0xbb, 0xba, 0xd3, 0x3f, 0x89, 0x46, 0xbf, 0x58, 0x14, 0xc0, 0x66, 0xd8, 0x51, 0x63, 0x3d, 0x1a, 0x51, 0x35, 0x10, 0x3, 0x9b, 0x34, 0x99, 0x39, 0xbf, 0xd4, 0x2b, 0x85, 0x8c, 0x21, 0x82, 0x7c, 0x8f, 0xf0, 0x5f, 0x1d, 0x9, 0xb1, 0xb0, 0x76, 0x5d, 0xc7, 0x8a, 0x13, 0x5b, 0x5c, 0xa4, 0xdf, 0xba, 0x8, 0x1, 0xbc, 0xad, 0xdf, 0xa1, 0x75, 0x62, 0x3c, 0x8b, 0x64, 0x7e, 0xac, 0xfb, 0x44, 0x44, 0xb8, 0x5a, 0x44, 0xf7, 0x38, 0x90, 0x60, 0x7d, 0x6, 0xd5, 0x7, 0xa4, 0xf8, 0x39, 0x36, 0x58, 0x78, 0x86, 0x69, 0xf6, 0xef, 0x4d, 0xeb, 0x58, 0xd0, 0x8c, 0x50, 0xca, 0x7, 0x56, 0xd5, 0xe2, 0xf4, 0x9d, 0x1a, 0x7a, 0xd7, 0x3e, 0xf, 0xb, 0x3d, 0x3b, 0x5f, 0x9, 0xa, 0xcf, 0x62, 0x2b, 0x18, 0x78, 0xc5, 0x91, 0x33, 0xe4, 0xa8, 0x48, 0xe0, 0x51, 0x53, 0x59, 0x2e, 0xa8, 0x1c, 0x6f, 0xbf}, - output224: []byte{0xbc, 0x29, 0x6f, 0xfd, 0x39, 0x38, 0x1c, 0xf1, 0xc9, 0x62, 0x28, 0xa9, 0xf3, 0x80, 0xf4, 0x1c, 0x87, 0x1b, 0x87, 0x88, 0xc6, 0x54, 0xed, 0x9b, 0x38, 0x4c, 0x17, 0xfe}, - output256: []byte{0xd, 0x1e, 0x6b, 0xb8, 0x81, 0x88, 0xb4, 0x9a, 0xf0, 0xa9, 0xa0, 0x5e, 0xb1, 0xaf, 0x94, 0x25, 0x5e, 0x67, 0x99, 0x51, 0x5a, 0x2f, 0x8e, 0xb4, 0x6a, 0xa6, 0xaf, 0x9a, 0x9d, 0xd5, 0xb9, 0xe0}, - output384: []byte{0xa6, 0xbb, 0xae, 0x1f, 0xf8, 0xe0, 0xd, 0xce, 0x34, 0xf6, 0x40, 0xce, 0xe2, 0xcd, 0xb5, 0xbc, 0xfe, 0x43, 0x82, 0x76, 0x1b, 0xe3, 0x6a, 0x94, 0xe, 0x50, 0xee, 0xc1, 0x2b, 0x5c, 0x2a, 0x2, 0xb2, 0xb6, 0xbe, 0x18, 0xa7, 0xc8, 0x7a, 0x36, 0xfd, 0x21, 0x94, 0xc4, 0xd2, 0x43, 0xec, 0x38}, - output512: []byte{0xf2, 0x6f, 0x32, 0x68, 0xfd, 0x62, 0xf, 0xc4, 0x76, 0xa4, 0x9a, 0xac, 0x3e, 0xd1, 0x58, 0x8, 0x64, 0x93, 0x4a, 0x2f, 0x6b, 0xa8, 0x81, 0xed, 0x8c, 0x8f, 0xb7, 0x57, 0xaa, 0xaa, 0x64, 0xbc, 0xdf, 0x50, 0x1e, 0x19, 0x13, 0xde, 0x60, 0xb, 0xbe, 0xf6, 0xf1, 0x2c, 0x94, 0x9f, 0xea, 0x8f, 0xd6, 0x8c, 0x64, 0x50, 0x86, 0xd5, 0xe3, 0xc, 0x92, 0x53, 0x58, 0x8f, 0xfb, 0xd1, 0x9b, 0xe5}}, - testcase{ - msg: []byte{0x7c, 0x81, 0x5c, 0x38, 0x4e, 0xee, 0xf, 0x28, 0x8e, 0xce, 0x27, 0xcc, 0xed, 0x52, 0xa0, 0x16, 0x3, 0x12, 0x7b, 0x7, 0x9c, 0x0, 0x73, 0x78, 0xbc, 0x5d, 0x1e, 0x6c, 0x5e, 0x9e, 0x6d, 0x1c, 0x73, 0x57, 0x23, 0xac, 0xbb, 0xd5, 0x80, 0x1a, 0xc4, 0x98, 0x54, 0xb2, 0xb5, 0x69, 0xd4, 0x47, 0x2d, 0x33, 0xf4, 0xb, 0xbb, 0x88, 0x82, 0x95, 0x62, 0x45, 0xc3, 0x66, 0xdc, 0x35, 0x82, 0xd7, 0x16, 0x96, 0xa9, 0x7a, 0x4e, 0x19, 0x55, 0x7e, 0x41, 0xe5, 0x4d, 0xee, 0x48, 0x2a, 0x14, 0x22, 0x90, 0x5, 0xf9, 0x3a, 0xfd, 0x2c, 0x4a, 0x7d, 0x86, 0x14, 0xd1, 0xa, 0x97, 0xa9, 0xdf, 0xa0, 0x7f, 0x7c, 0xd9, 0x46, 0xfa, 0x45, 0x26, 0x30, 0x63, 0xdd, 0xd2, 0x9d, 0xb8, 0xf9, 0xe3, 0x4d, 0xb6, 0xd, 0xaa, 0x32, 0x68, 0x4f, 0x0, 0x72, 0xea, 0x2a, 0x94, 0x26, 0xec, 0xeb, 0xfa, 0x52, 0x39, 0xfb, 0x67, 0xf2, 0x9c, 0x18, 0xcb, 0xaa, 0x2a, 0xf6, 0xed, 0x4b, 0xf4, 0x28, 0x39, 0x36, 0x82, 0x3a, 0xc1, 0x79, 0x1, 0x64, 0xfe, 0xc5, 0x45, 0x7a, 0x9c, 0xba, 0x7c, 0x76, 0x7c, 0xa5, 0x93, 0x92, 0xd9, 0x4c, 0xab, 0x74, 0x48, 0xf5, 0xe, 0xb3, 0x4e, 0x9a, 0x93, 0xa8, 0x0, 0x27, 0x47, 0x1c, 0xe5, 0x97, 0x36, 0xf0, 0x99, 0xc8, 0x86, 0xde, 0xa1, 0xab, 0x4c, 0xba, 0x4d, 0x89, 0xf5, 0xfc, 0x7a, 0xe2, 0xf2, 0x1c, 0xcd, 0x27, 0xf6, 0x11, 0xec, 0xa4, 0x62, 0x6b, 0x2d, 0x8, 0xdc, 0x22, 0x38, 0x2e, 0x92, 0xc1, 0xef, 0xb2, 0xf6, 0xaf, 0xdc, 0x8f, 0xdc, 0x3d, 0x21, 0x72, 0x60, 0x4f, 0x50, 0x35, 0xc4, 0x6b, 0x81, 0x97, 0xd3}, - output224: []byte{0xc, 0xce, 0xae, 0x71, 0x3e, 0x5e, 0x39, 0xbc, 0xef, 0xe7, 0xa2, 0x27, 0x30, 0x4, 0x81, 0x6f, 0xe0, 0x5, 0xd5, 0xed, 0xfb, 0x2a, 0x96, 0x5c, 0xc9, 0xac, 0x99, 0x48}, - output256: []byte{0x93, 0x5d, 0xed, 0x24, 0xf5, 0xce, 0xcc, 0x69, 0xe1, 0xf0, 0x12, 0xb6, 0xb, 0x78, 0x31, 0xab, 0xce, 0x7e, 0xf5, 0xe, 0xeb, 0xb, 0xea, 0x7f, 0x81, 0x6c, 0x3d, 0xbf, 0x2b, 0x4a, 0xbd, 0xc1}, - output384: []byte{0x7e, 0xd8, 0x3e, 0xb6, 0x59, 0x53, 0x6b, 0x36, 0x6, 0x17, 0x73, 0x7, 0x3b, 0x14, 0x8e, 0xd2, 0x11, 0x75, 0x12, 0x37, 0x2e, 0x49, 0xe0, 0xa3, 0xae, 0xe4, 0x8b, 0x96, 0x35, 0x3e, 0xc9, 0x36, 0xb3, 0x26, 0x88, 0xb1, 0x50, 0xc5, 0x85, 0x94, 0x4d, 0x20, 0x8, 0xf2, 0x13, 0x66, 0xb5, 0x31}, - output512: []byte{0x8, 0x8, 0x45, 0xd6, 0xfd, 0x22, 0xa0, 0xb, 0x30, 0xfa, 0x1, 0xa4, 0xb4, 0xf8, 0x1f, 0xdc, 0x7b, 0x46, 0xca, 0x4c, 0x6a, 0x67, 0x6a, 0xd5, 0x86, 0x3a, 0x9d, 0xbf, 0x66, 0x11, 0xba, 0x97, 0xf2, 0x4f, 0xb5, 0x9b, 0xb5, 0xba, 0xc4, 0xe3, 0x76, 0xb3, 0xb8, 0xb3, 0x35, 0x71, 0x66, 0x78, 0x28, 0x76, 0xb7, 0x1, 0x27, 0x3f, 0xf3, 0x51, 0xbc, 0x8c, 0x58, 0x5, 0x53, 0x27, 0x67, 0xd4}}, - testcase{ - msg: []byte{0xe2, 0x9d, 0x50, 0x51, 0x58, 0xdb, 0xdd, 0x93, 0x7d, 0x9e, 0x3d, 0x21, 0x45, 0x65, 0x8e, 0xe6, 0xf5, 0x99, 0x2a, 0x2f, 0xc7, 0x90, 0xf4, 0xf6, 0x8, 0xd9, 0xcd, 0xb4, 0x4a, 0x9, 0x1d, 0x5b, 0x94, 0xb8, 0x8e, 0x81, 0xfa, 0xc4, 0xfd, 0xf5, 0xc4, 0x94, 0x42, 0xf1, 0x3b, 0x91, 0x1c, 0x55, 0x88, 0x64, 0x69, 0x62, 0x95, 0x51, 0x18, 0x9e, 0xaf, 0xf6, 0x24, 0x88, 0xf1, 0xa4, 0x79, 0xb7, 0xdb, 0x11, 0xa1, 0x56, 0xe, 0x19, 0x8d, 0xdc, 0xcc, 0xcf, 0x50, 0x15, 0x90, 0x93, 0x42, 0x5f, 0xf7, 0xf1, 0xcb, 0x8d, 0x1d, 0x12, 0x46, 0xd0, 0x97, 0x87, 0x64, 0x8, 0x7d, 0x6b, 0xac, 0x25, 0x70, 0x26, 0xb0, 0x90, 0xef, 0xae, 0x8c, 0xec, 0x5f, 0x22, 0xb6, 0xf2, 0x1c, 0x59, 0xac, 0xe1, 0xac, 0x73, 0x86, 0xf5, 0xb8, 0x83, 0x7c, 0xa6, 0xa1, 0x2b, 0x6f, 0xbf, 0x55, 0x34, 0xdd, 0x5, 0x60, 0xef, 0x5, 0xca, 0x78, 0x10, 0x4d, 0x3b, 0x94, 0x3d, 0xdb, 0x22, 0xf, 0xea, 0xec, 0x89, 0xaa, 0x5e, 0x69, 0x2a, 0x0, 0xf8, 0x22, 0xa2, 0xab, 0x9a, 0x2f, 0xe6, 0x3, 0x50, 0xd7, 0x5e, 0x7b, 0xe1, 0x6f, 0xf2, 0x52, 0x6d, 0xc6, 0x43, 0x87, 0x25, 0x2, 0xd0, 0x1f, 0x42, 0xf1, 0x88, 0xab, 0xed, 0xa, 0x6e, 0x9a, 0x6f, 0x5f, 0xd0, 0xd1, 0xce, 0x7d, 0x57, 0x55, 0xc9, 0xff, 0xa6, 0x6b, 0xa, 0xf0, 0xb2, 0xb, 0xd8, 0x6, 0xf0, 0x8e, 0x6, 0x15, 0x66, 0x90, 0xd8, 0x1a, 0xc8, 0x11, 0x77, 0x8c, 0xa3, 0xda, 0xc2, 0xc2, 0x49, 0xb9, 0x60, 0x2, 0x1, 0x7f, 0xce, 0x93, 0xe5, 0x7, 0xe3, 0xb9, 0x53, 0xac, 0xf9, 0x99, 0x64, 0xb8, 0x47}, - output224: []byte{0x79, 0x97, 0xfd, 0xf3, 0x8, 0x37, 0xd8, 0xb2, 0x5e, 0x85, 0xfc, 0x1, 0x31, 0x6e, 0x31, 0xb6, 0x1e, 0xe8, 0x14, 0x49, 0xd, 0xa0, 0x2, 0xa0, 0x48, 0x16, 0xd7, 0xca}, - output256: []byte{0x67, 0x55, 0xbf, 0x7e, 0x60, 0xe4, 0xe0, 0x79, 0x65, 0xba, 0xc2, 0x4e, 0x51, 0xb1, 0xde, 0x93, 0xe3, 0xdd, 0x42, 0xae, 0x78, 0xf, 0x25, 0x66, 0x47, 0xd4, 0xcc, 0x2e, 0xf8, 0xef, 0xf7, 0x71}, - output384: []byte{0x25, 0x16, 0xe0, 0x1, 0x5e, 0xd1, 0x62, 0x7, 0x32, 0x38, 0x99, 0x6d, 0x5a, 0x3, 0x23, 0x90, 0x87, 0xe0, 0x1c, 0x20, 0x91, 0xf7, 0xb0, 0x36, 0x37, 0xe6, 0xc8, 0x9a, 0x75, 0x8f, 0x56, 0x5e, 0x45, 0xc9, 0x8, 0xde, 0x87, 0x3e, 0x37, 0x8c, 0xaa, 0x43, 0x3b, 0xaf, 0x33, 0x9d, 0x5, 0x52}, - output512: []byte{0x26, 0x78, 0xa8, 0x71, 0x5f, 0xc7, 0xe5, 0x38, 0x52, 0x2d, 0xd7, 0x60, 0x8d, 0x76, 0x95, 0x8, 0xb6, 0x30, 0x17, 0xd9, 0xeb, 0x6c, 0xc4, 0x8f, 0x1c, 0xb0, 0x7d, 0x14, 0xe7, 0x41, 0x6, 0x69, 0x36, 0xc8, 0x31, 0x6b, 0xf3, 0x21, 0x1e, 0x9, 0xf6, 0x26, 0x11, 0xe1, 0x40, 0xdd, 0xd1, 0x4a, 0x7, 0xf9, 0x7f, 0x9f, 0x37, 0x2e, 0x99, 0xc0, 0x84, 0xff, 0xe2, 0x89, 0xeb, 0x30, 0x2b, 0xd8}}, - testcase{ - msg: []byte{0xd8, 0x55, 0x88, 0x69, 0x6f, 0x57, 0x6e, 0x65, 0xec, 0xa0, 0x15, 0x5f, 0x39, 0x5f, 0xc, 0xfa, 0xcd, 0x83, 0xf3, 0x6a, 0x99, 0x11, 0x1e, 0xd5, 0x76, 0x8d, 0xf2, 0xd1, 0x16, 0xd2, 0x12, 0x1e, 0x32, 0x35, 0x7b, 0xa4, 0xf5, 0x4e, 0xde, 0x92, 0x7f, 0x18, 0x9f, 0x29, 0x7d, 0x3a, 0x97, 0xfa, 0xd4, 0xe9, 0xa0, 0xf5, 0xb4, 0x1d, 0x8d, 0x89, 0xdd, 0x7f, 0xe2, 0x1, 0x56, 0x79, 0x9c, 0x2b, 0x7b, 0x6b, 0xf9, 0xc9, 0x57, 0xba, 0xd, 0x67, 0x63, 0xf5, 0xc3, 0xbc, 0x51, 0x29, 0x74, 0x7b, 0xbb, 0x53, 0x65, 0x2b, 0x49, 0x29, 0xc, 0xff, 0x1c, 0x87, 0xe2, 0xcd, 0xf2, 0xc4, 0xb9, 0x5d, 0x8a, 0xae, 0xe0, 0x9b, 0xc8, 0xfb, 0xfa, 0x68, 0x83, 0xe6, 0x2d, 0x23, 0x78, 0x85, 0x81, 0x4, 0x91, 0xbf, 0xc1, 0x1, 0xf1, 0xd8, 0xc6, 0x36, 0xe3, 0xd0, 0xed, 0xe8, 0x38, 0xad, 0x5, 0xc2, 0x7, 0xa3, 0xdf, 0x4f, 0xad, 0x76, 0x45, 0x29, 0x79, 0xeb, 0x99, 0xf2, 0x9a, 0xfa, 0xec, 0xed, 0xd1, 0xc6, 0x3b, 0x8d, 0x36, 0xcf, 0x37, 0x84, 0x54, 0xa1, 0xbb, 0x67, 0xa7, 0x41, 0xc7, 0x7a, 0xc6, 0xb6, 0xb3, 0xf9, 0x5f, 0x4f, 0x2, 0xb6, 0x4d, 0xab, 0xc1, 0x54, 0x38, 0x61, 0x3e, 0xa4, 0x97, 0x50, 0xdf, 0x42, 0xee, 0x90, 0x10, 0x1f, 0x11, 0x5a, 0xa9, 0xab, 0xb9, 0xff, 0x64, 0x32, 0x4d, 0xde, 0x9d, 0xab, 0xbb, 0x1, 0x5, 0x4e, 0x1b, 0xd6, 0xb4, 0xbc, 0xdc, 0x79, 0x30, 0xa4, 0x4c, 0x23, 0x0, 0xd8, 0x7c, 0xa7, 0x8c, 0x6, 0x92, 0x4d, 0x3, 0x23, 0xad, 0x78, 0x87, 0xe4, 0x6c, 0x90, 0xe8, 0xc4, 0xd1, 0x0, 0xac, 0xd9, 0xee, 0xd2, 0x1e}, - output224: []byte{0x98, 0x97, 0xb4, 0x79, 0x87, 0x1a, 0xc7, 0x3d, 0xab, 0xbe, 0x62, 0x21, 0xe2, 0x7b, 0xfa, 0x67, 0x27, 0x8f, 0x2b, 0xb0, 0x44, 0xe3, 0xd0, 0x72, 0x6f, 0xcb, 0x2b, 0x81}, - output256: []byte{0x62, 0xc9, 0xf5, 0xe5, 0xb5, 0x6e, 0x29, 0x94, 0x32, 0x7a, 0x7f, 0x9a, 0x3, 0x88, 0x8d, 0xa7, 0xba, 0xd6, 0x7e, 0x38, 0x75, 0x93, 0x80, 0x3b, 0x18, 0x7, 0x48, 0x2b, 0x13, 0x7b, 0x45, 0x9}, - output384: []byte{0x6b, 0xae, 0x42, 0xad, 0xd0, 0x6c, 0x6a, 0x20, 0xa0, 0x5d, 0x84, 0x5e, 0x7b, 0xf3, 0x91, 0xf1, 0xea, 0xb8, 0x3e, 0x83, 0xa7, 0x10, 0xa1, 0x85, 0x27, 0xfc, 0x3, 0x64, 0x61, 0x4, 0xe5, 0x2a, 0x8b, 0x41, 0x7c, 0xff, 0x37, 0x57, 0x53, 0x88, 0x20, 0x81, 0xf3, 0x1b, 0x6f, 0x22, 0x95, 0xeb}, - output512: []byte{0xaa, 0x3, 0xeb, 0x9, 0x41, 0x74, 0x35, 0xda, 0x9e, 0x6e, 0x78, 0x3, 0xf3, 0xb6, 0xea, 0xb6, 0x6f, 0xaa, 0x3d, 0x59, 0xcc, 0x62, 0x29, 0x50, 0xd6, 0x1f, 0x9b, 0x96, 0x2b, 0x69, 0x14, 0x5a, 0xc2, 0x25, 0x5c, 0xd7, 0x52, 0xcb, 0x96, 0x7, 0x74, 0x20, 0x92, 0x69, 0x7b, 0x1a, 0x79, 0xd1, 0x24, 0x81, 0x7a, 0xe2, 0x64, 0x21, 0xe6, 0x1d, 0x11, 0x76, 0x76, 0x48, 0x32, 0xed, 0x35, 0x4c}}, - testcase{ - msg: []byte{0x3a, 0x12, 0xf8, 0x50, 0x8b, 0x40, 0xc3, 0x2c, 0x74, 0x49, 0x2b, 0x66, 0x32, 0x33, 0x75, 0xdc, 0xfe, 0x49, 0x18, 0x4c, 0x78, 0xf7, 0x31, 0x79, 0xf3, 0x31, 0x4b, 0x79, 0xe6, 0x33, 0x76, 0xb8, 0xac, 0x68, 0x3f, 0x5a, 0x51, 0xf1, 0x53, 0x4b, 0xd7, 0x29, 0xb0, 0x2b, 0x4, 0xd0, 0x2, 0xf5, 0x5c, 0xbd, 0x8e, 0x8f, 0xc9, 0xb5, 0xec, 0x1e, 0xa6, 0xbb, 0xe6, 0xa0, 0xd0, 0xe7, 0x43, 0x15, 0x18, 0xe6, 0xba, 0x45, 0xd1, 0x24, 0x3, 0x5f, 0x9d, 0x3d, 0xce, 0xa, 0x8b, 0xb7, 0xbf, 0x14, 0x30, 0xa9, 0xf6, 0x57, 0xe0, 0xb4, 0xea, 0x9f, 0x20, 0xeb, 0x20, 0xc7, 0x86, 0xa5, 0x81, 0x81, 0xa1, 0xe2, 0xa, 0x96, 0xf1, 0x62, 0x8f, 0x87, 0x28, 0xa1, 0x3b, 0xdf, 0x7a, 0x4b, 0x4b, 0x32, 0xfc, 0x8a, 0xa7, 0x5, 0x4c, 0xc4, 0x88, 0x1a, 0xe7, 0xfa, 0x19, 0xaf, 0xa6, 0x5c, 0x6c, 0x3e, 0xe1, 0xb3, 0xad, 0xe3, 0x19, 0x2a, 0xf4, 0x20, 0x54, 0xa8, 0xa9, 0x11, 0xb8, 0xec, 0x18, 0x26, 0x86, 0x5d, 0x46, 0xd9, 0x3f, 0x1e, 0x7c, 0x5e, 0x2b, 0x78, 0x13, 0xc9, 0x2a, 0x50, 0x6e, 0x53, 0x88, 0x6f, 0x3d, 0x47, 0x1, 0xbb, 0x93, 0xd2, 0xa6, 0x81, 0xad, 0x10, 0x9c, 0x84, 0x59, 0x4, 0xbb, 0x86, 0x1a, 0xf8, 0xaf, 0x6, 0x46, 0xb6, 0xe3, 0x99, 0xb3, 0x8b, 0x61, 0x40, 0x51, 0xd3, 0x4f, 0x68, 0x42, 0x56, 0x3a, 0xf, 0x37, 0xec, 0x0, 0xcb, 0x3d, 0x86, 0x5f, 0xc5, 0xd7, 0x46, 0xc4, 0x98, 0x7d, 0xe2, 0xa6, 0x50, 0x71, 0x10, 0x8, 0x83, 0xa2, 0xa9, 0xc7, 0xa2, 0xbf, 0xe1, 0xe2, 0xdd, 0x60, 0x3d, 0x9e, 0xa2, 0x4d, 0xc7, 0xc5, 0xfd, 0x6, 0xbe}, - output224: []byte{0xea, 0xd2, 0x62, 0xf, 0xbc, 0x4b, 0xdf, 0xb1, 0x4a, 0xec, 0x8c, 0x7b, 0x9a, 0xa8, 0x82, 0xba, 0x3e, 0xb2, 0xaa, 0xcc, 0x9a, 0x15, 0xd7, 0xd3, 0x6d, 0xba, 0x8, 0x6d}, - output256: []byte{0x99, 0x27, 0xfa, 0x5e, 0xfd, 0x86, 0x30, 0x4e, 0x73, 0xd5, 0x4a, 0xa4, 0x92, 0x88, 0x18, 0xc0, 0x5b, 0x1, 0x50, 0x46, 0x72, 0xc5, 0x29, 0x47, 0x13, 0x94, 0xa8, 0x2e, 0x4, 0x9e, 0x5f, 0x95}, - output384: []byte{0x14, 0x69, 0xd, 0xdb, 0x5a, 0x48, 0xfd, 0xf3, 0x82, 0xdb, 0xc7, 0x45, 0xad, 0x3, 0x30, 0xc1, 0x48, 0x61, 0x24, 0xf6, 0xad, 0x2e, 0x5a, 0xe4, 0xa8, 0x50, 0xe3, 0x8c, 0x26, 0x4f, 0x99, 0xae, 0xae, 0x6f, 0x15, 0x60, 0x62, 0xab, 0x19, 0x46, 0xdd, 0x7, 0xaf, 0xe1, 0x70, 0xa, 0x82, 0x94}, - output512: []byte{0xd3, 0x1, 0x2f, 0x2f, 0xb5, 0x68, 0x45, 0xb2, 0x58, 0xd7, 0x59, 0x8c, 0xb, 0xbb, 0x2c, 0x97, 0xd5, 0x3b, 0x60, 0x2d, 0xea, 0xe9, 0x32, 0x6d, 0xc3, 0x67, 0x8b, 0x22, 0x28, 0x45, 0x4a, 0x1e, 0x29, 0xf2, 0x88, 0x48, 0xed, 0x14, 0xc, 0x70, 0xbe, 0x85, 0xcd, 0xea, 0x9f, 0x99, 0xa8, 0xdc, 0x34, 0x7d, 0xea, 0xbd, 0x46, 0xd3, 0x62, 0xed, 0x1a, 0xfb, 0x23, 0x11, 0x46, 0xa0, 0x25, 0x5d}}, - testcase{ - msg: []byte{0x18, 0x61, 0xed, 0xce, 0x46, 0xfa, 0x5a, 0xd1, 0x7e, 0x1f, 0xf1, 0xde, 0xae, 0x8, 0x4d, 0xec, 0x58, 0xf, 0x97, 0xd0, 0xa6, 0x78, 0x85, 0xdf, 0xe8, 0x34, 0xb9, 0xdf, 0xac, 0x1a, 0xe0, 0x76, 0x74, 0x2c, 0xe9, 0xe2, 0x67, 0x51, 0x2c, 0xa5, 0x1f, 0x6d, 0xf5, 0xa4, 0x55, 0xaf, 0xc, 0x5f, 0xd6, 0xab, 0xf9, 0x4a, 0xce, 0xa1, 0x3, 0xa3, 0x37, 0xc, 0x35, 0x44, 0x85, 0xa7, 0x84, 0x6f, 0xb8, 0x4f, 0x3a, 0xc7, 0xc2, 0x90, 0x4b, 0x5b, 0x2f, 0xbf, 0x22, 0x70, 0x2, 0xce, 0x51, 0x21, 0x33, 0xbb, 0x7e, 0x1c, 0x4e, 0x50, 0x5, 0x7b, 0xfd, 0x1e, 0x44, 0xdb, 0x33, 0xc7, 0xcd, 0xb9, 0x69, 0xa9, 0x9e, 0x28, 0x4b, 0x18, 0x4f, 0x50, 0xa1, 0x4b, 0x6, 0x8a, 0x1f, 0xc5, 0x0, 0x9d, 0x9b, 0x29, 0x8d, 0xbe, 0x92, 0x23, 0x95, 0x72, 0xa7, 0x62, 0x7a, 0xac, 0x2, 0xab, 0xe8, 0xf3, 0xe3, 0xb4, 0x73, 0x41, 0x7f, 0x36, 0xd4, 0xd2, 0x50, 0x5d, 0x16, 0xb7, 0x57, 0x7f, 0x45, 0x26, 0xc9, 0xd9, 0x4a, 0x27, 0xa, 0x2d, 0xfe, 0x45, 0xd, 0x6, 0xda, 0x8f, 0x6f, 0xa9, 0x56, 0x87, 0x9a, 0xa, 0x55, 0xcf, 0xe9, 0x9e, 0x74, 0x2e, 0xa5, 0x55, 0xea, 0x47, 0x7b, 0xa3, 0xe9, 0xb4, 0x4c, 0xcd, 0x50, 0x8c, 0x37, 0x54, 0x23, 0x61, 0x1a, 0xf9, 0x2e, 0x55, 0x34, 0x5d, 0xc2, 0x15, 0x77, 0x9b, 0x2d, 0x51, 0x19, 0xeb, 0xa4, 0x9c, 0x71, 0xd4, 0x9b, 0x9f, 0xe3, 0xf1, 0x56, 0x9f, 0xa2, 0x4e, 0x5c, 0xa3, 0xe3, 0x32, 0xd0, 0x42, 0x42, 0x2a, 0x8b, 0x81, 0x58, 0xd3, 0xec, 0x66, 0xa8, 0x0, 0x12, 0x97, 0x6f, 0x31, 0xff, 0xdf, 0x30, 0x5f, 0xc, 0x9c, 0x5e}, - output224: []byte{0x54, 0x5e, 0x59, 0x81, 0x2c, 0x7a, 0xea, 0x1b, 0xd1, 0xcd, 0x48, 0x88, 0xd, 0x66, 0x50, 0x11, 0x7d, 0xfd, 0x9e, 0x58, 0xa7, 0x91, 0xda, 0xc1, 0x7, 0x2b, 0x19, 0xda}, - output256: []byte{0x84, 0xe0, 0x56, 0xbf, 0x7b, 0xdf, 0xc7, 0x3a, 0x3a, 0xaa, 0x95, 0xb0, 0xa, 0x74, 0xa1, 0x36, 0xd7, 0x76, 0x6, 0x9b, 0xee, 0xb3, 0x4, 0x42, 0x3b, 0xea, 0xd9, 0x1, 0x20, 0xdb, 0x63, 0x50}, - output384: []byte{0x9d, 0xa6, 0x65, 0x2b, 0xa8, 0x90, 0x0, 0x7a, 0x1, 0x12, 0x6f, 0xf, 0x65, 0x97, 0xa, 0xbf, 0x34, 0x74, 0xc7, 0x65, 0x9c, 0x6c, 0x80, 0xb0, 0x4d, 0xa2, 0xca, 0x59, 0x2e, 0xdf, 0xf, 0x39, 0x96, 0x1, 0xbc, 0xd, 0xad, 0x10, 0xa0, 0xdd, 0x6e, 0x31, 0x6a, 0x28, 0x6e, 0x23, 0x38, 0xef}, - output512: []byte{0xb5, 0xc, 0x89, 0x6f, 0x2c, 0xdf, 0x7f, 0x10, 0x5d, 0xe7, 0x51, 0xff, 0x6c, 0xf6, 0x64, 0xe5, 0x92, 0xfa, 0xb7, 0x52, 0xd6, 0x52, 0xb0, 0x68, 0x98, 0xb9, 0xb2, 0x88, 0x5, 0x2d, 0xf2, 0x2f, 0x72, 0x1a, 0xd8, 0x7e, 0x70, 0x2a, 0xf0, 0x43, 0xe6, 0xb1, 0xe8, 0x89, 0x29, 0x85, 0xc, 0xbd, 0x56, 0x98, 0xa9, 0x17, 0x2c, 0x39, 0x32, 0x40, 0xb, 0x25, 0x38, 0xe4, 0x1, 0xa6, 0xf0, 0x81}}, - testcase{ - msg: []byte{0x8, 0xd0, 0xff, 0xde, 0x3a, 0x6e, 0x4e, 0xf6, 0x56, 0x8, 0xea, 0x67, 0x2e, 0x48, 0x30, 0xc1, 0x29, 0x43, 0xd7, 0x18, 0x7c, 0xcf, 0xf0, 0x8f, 0x49, 0x41, 0xcf, 0xc1, 0x3e, 0x54, 0x5f, 0x3b, 0x9c, 0x7a, 0xd5, 0xee, 0xbb, 0xe2, 0xb0, 0x16, 0x42, 0xb4, 0x86, 0xca, 0xf8, 0x55, 0xc2, 0xc7, 0x3f, 0x58, 0xc1, 0xe4, 0xe3, 0x39, 0x1d, 0xa8, 0xe2, 0xd6, 0x3d, 0x96, 0xe1, 0x5f, 0xd8, 0x49, 0x53, 0xae, 0x5c, 0x23, 0x19, 0x11, 0xb0, 0xa, 0xd6, 0x5, 0xc, 0xd7, 0xaa, 0xfd, 0xaa, 0xc9, 0xb0, 0xf6, 0x63, 0xae, 0x6a, 0xab, 0x45, 0x51, 0x9d, 0xf, 0x53, 0x91, 0xa5, 0x41, 0x70, 0x7d, 0x47, 0x90, 0x34, 0xe7, 0x3a, 0x6a, 0xd8, 0x5, 0xae, 0x35, 0x98, 0x9, 0x6a, 0xf0, 0x78, 0xf1, 0x39, 0x33, 0x1, 0x49, 0x3d, 0x66, 0x3d, 0xd7, 0x1f, 0x83, 0x86, 0x9c, 0xa2, 0x7b, 0xa5, 0x8, 0xb7, 0xe9, 0x1e, 0x81, 0xe1, 0x28, 0xc1, 0x71, 0x6d, 0xc3, 0xac, 0xfe, 0x30, 0x84, 0xb2, 0x20, 0x1e, 0x4, 0xcf, 0x80, 0x6, 0x61, 0x7e, 0xec, 0xf1, 0xb6, 0x40, 0x47, 0x4a, 0x5d, 0x45, 0xcf, 0xde, 0x9f, 0x4d, 0x3e, 0xf9, 0x2d, 0x6d, 0x5, 0x5b, 0x90, 0x98, 0x92, 0x19, 0x4d, 0x8a, 0x82, 0x18, 0xdb, 0x6d, 0x82, 0x3, 0xa8, 0x42, 0x61, 0xd2, 0x0, 0xd7, 0x14, 0x73, 0xd7, 0x48, 0x8f, 0x34, 0x27, 0x41, 0x6b, 0x68, 0x96, 0xc1, 0x37, 0xd4, 0x55, 0xf2, 0x31, 0x7, 0x1c, 0xac, 0xbc, 0x86, 0xe0, 0x41, 0x5a, 0xb8, 0x8a, 0xec, 0x84, 0x1d, 0x96, 0xb7, 0xb8, 0xaf, 0x41, 0xe0, 0x5b, 0xb4, 0x61, 0xa4, 0x6, 0x45, 0xbf, 0x17, 0x66, 0x1, 0xf1, 0xe7, 0x60, 0xde, 0x5f}, - output224: []byte{0x7c, 0x2f, 0xa0, 0x9, 0x61, 0xbc, 0xf0, 0x20, 0xb9, 0x5a, 0xe, 0xd7, 0x19, 0x3e, 0xa3, 0x58, 0x33, 0x40, 0xbb, 0xd3, 0x78, 0x98, 0xef, 0x6a, 0x46, 0x4c, 0x19, 0x40}, - output256: []byte{0x40, 0x1c, 0x3b, 0xe5, 0x9c, 0xc3, 0x73, 0x45, 0x3a, 0xef, 0x96, 0x3, 0xf7, 0x33, 0x5c, 0x1d, 0x5f, 0xe6, 0x69, 0x90, 0x9a, 0x14, 0x25, 0xd7, 0x67, 0x1d, 0xcb, 0x84, 0xa4, 0x98, 0x87, 0xca}, - output384: []byte{0xb9, 0x4d, 0x57, 0x8d, 0xe7, 0x9a, 0x43, 0x7b, 0xea, 0xd9, 0x51, 0xe9, 0xae, 0xe9, 0x12, 0x54, 0xd, 0x1, 0x39, 0x96, 0x5c, 0xf0, 0x14, 0x2f, 0x1f, 0xd4, 0x3, 0x53, 0x49, 0x59, 0xb7, 0x5d, 0x11, 0xe0, 0xb2, 0x46, 0x32, 0x1, 0xb1, 0x3, 0x64, 0xb9, 0x5, 0xcf, 0x9b, 0xaa, 0x57, 0xb3}, - output512: []byte{0xa3, 0x4a, 0x2f, 0x27, 0xc3, 0x2f, 0x99, 0x3a, 0x7e, 0x70, 0x7, 0x86, 0x77, 0x33, 0x54, 0x74, 0x81, 0x29, 0x3c, 0x39, 0x12, 0x55, 0xff, 0xd0, 0xe5, 0xcc, 0xbe, 0x91, 0xe1, 0xcc, 0x74, 0x9b, 0x13, 0x52, 0x5a, 0xf6, 0xad, 0xfa, 0xc, 0x2d, 0x1d, 0x64, 0xbf, 0x87, 0xdd, 0x65, 0xb9, 0x96, 0xad, 0xa9, 0x11, 0x1c, 0x5d, 0xf5, 0x5b, 0xff, 0x8a, 0x57, 0x42, 0xe5, 0x4b, 0x84, 0x44, 0xf6}}, - testcase{ - msg: []byte{0xd7, 0x82, 0xab, 0xb7, 0x2a, 0x5b, 0xe3, 0x39, 0x27, 0x57, 0xbe, 0x2, 0xd3, 0xe4, 0x5b, 0xe6, 0xe2, 0x9, 0x9d, 0x6f, 0x0, 0xd, 0x4, 0x2c, 0x8a, 0x54, 0x3f, 0x50, 0xed, 0x6e, 0xbc, 0x5, 0x5a, 0x7f, 0x13, 0x3b, 0xd, 0xd8, 0xe9, 0xbc, 0x34, 0x85, 0x36, 0xed, 0xca, 0xae, 0x2e, 0x12, 0xec, 0x18, 0xe8, 0x83, 0x7d, 0xf7, 0xa1, 0xb3, 0xc8, 0x7e, 0xc4, 0x6d, 0x50, 0xc2, 0x41, 0xde, 0xe8, 0x20, 0xfd, 0x58, 0x61, 0x97, 0x55, 0x2d, 0xc2, 0xb, 0xee, 0xa5, 0xf, 0x44, 0x5a, 0x7, 0xa3, 0x8f, 0x17, 0x68, 0xa3, 0x9e, 0x2b, 0x2f, 0xf0, 0x5d, 0xdd, 0xed, 0xf7, 0x51, 0xf1, 0xde, 0xf6, 0x12, 0xd2, 0xe4, 0xd8, 0x10, 0xda, 0xa3, 0xa0, 0xcc, 0x90, 0x45, 0x16, 0xf9, 0xa4, 0x3a, 0xf6, 0x60, 0x31, 0x53, 0x85, 0x17, 0x8a, 0x52, 0x9e, 0x51, 0xf8, 0xaa, 0xe1, 0x41, 0x80, 0x8c, 0x8b, 0xc5, 0xd7, 0xb6, 0xc, 0xac, 0x26, 0xbb, 0x98, 0x4a, 0xc1, 0x89, 0xd, 0x4, 0x36, 0xef, 0x78, 0x4, 0x26, 0xc5, 0x47, 0xe9, 0x4a, 0x7b, 0x8, 0xf0, 0x1a, 0xcb, 0xfc, 0x4a, 0x38, 0x25, 0xea, 0xe0, 0x4f, 0x52, 0xa, 0x90, 0x16, 0xf2, 0xfb, 0x8b, 0xf5, 0x16, 0x5e, 0xd1, 0x27, 0x36, 0xfc, 0x71, 0xe3, 0x6a, 0x49, 0xa7, 0x36, 0x14, 0x73, 0x9e, 0xaa, 0x3e, 0xc8, 0x34, 0x6, 0x9b, 0x1b, 0x40, 0xf1, 0x35, 0xc, 0x2b, 0x3a, 0xb8, 0x85, 0xc0, 0x2c, 0x64, 0xb, 0x9f, 0x76, 0x86, 0xed, 0x5f, 0x99, 0x52, 0x7e, 0x41, 0xcf, 0xcd, 0x79, 0x6f, 0xe4, 0xc2, 0x56, 0xc9, 0x17, 0x31, 0x86, 0xc2, 0x26, 0x16, 0x9f, 0xf2, 0x57, 0x95, 0x4e, 0xbd, 0xa8, 0x1c, 0xe, 0x5f, 0x99}, - output224: []byte{0x23, 0x2d, 0xb2, 0x2e, 0xb2, 0xc1, 0x91, 0x9, 0xaf, 0xef, 0xb7, 0x19, 0x18, 0xea, 0x2d, 0xaa, 0x7c, 0xd, 0x76, 0x65, 0x2e, 0x18, 0x84, 0xea, 0x7a, 0x8a, 0xe6, 0x46}, - output256: []byte{0x2, 0x4, 0x85, 0xdc, 0xd2, 0x64, 0x29, 0x6a, 0xfd, 0xb7, 0xf6, 0x43, 0xca, 0x82, 0x8c, 0x93, 0x35, 0x6f, 0x17, 0x14, 0xcb, 0xcc, 0x2f, 0xbb, 0xdd, 0x30, 0xf9, 0x89, 0x6c, 0x3f, 0x27, 0x89}, - output384: []byte{0xb8, 0x5f, 0x56, 0xf6, 0x9d, 0x3b, 0xe5, 0x7a, 0x1c, 0x2a, 0xa5, 0x53, 0xf9, 0xb, 0xc1, 0xb0, 0x89, 0xe8, 0xf1, 0xc5, 0x61, 0x88, 0x1b, 0xe6, 0x46, 0x30, 0xea, 0x6b, 0xa4, 0xdd, 0x3b, 0xd5, 0x30, 0x15, 0x12, 0x31, 0x3a, 0x18, 0xc2, 0x6d, 0xf3, 0xe9, 0x7e, 0x5, 0x6a, 0x59, 0xed, 0xcf}, - output512: []byte{0xdd, 0x5f, 0x4b, 0x16, 0x71, 0x75, 0xd9, 0x56, 0x6d, 0xca, 0x6c, 0x5b, 0x1b, 0x54, 0xa3, 0x3d, 0x2, 0xef, 0xd0, 0x2e, 0x25, 0xe2, 0x3b, 0xb6, 0xfb, 0x2, 0xd8, 0x78, 0xa4, 0x41, 0x5e, 0x5e, 0x86, 0x82, 0xc2, 0x9, 0xbe, 0xac, 0x4, 0xe9, 0x88, 0x2a, 0x27, 0x2d, 0x1, 0xe8, 0xeb, 0x43, 0x5c, 0xaa, 0x5b, 0xcd, 0x74, 0xfc, 0x82, 0x5c, 0x6b, 0x90, 0x82, 0xd0, 0x41, 0xdf, 0xf3, 0x33}}, - testcase{ - msg: []byte{0x5f, 0xce, 0x81, 0x9, 0xa3, 0x58, 0x57, 0xe, 0x40, 0x98, 0x3e, 0x11, 0x84, 0xe5, 0x41, 0x83, 0x3b, 0xb9, 0x9, 0x1e, 0x28, 0xf, 0x25, 0x8c, 0xfb, 0x14, 0x43, 0x87, 0xb0, 0x5d, 0x19, 0xe, 0x43, 0x1c, 0xb1, 0x9b, 0xaa, 0x67, 0x27, 0x3b, 0xa0, 0xc5, 0x8a, 0xbe, 0x91, 0x30, 0x8e, 0x18, 0x44, 0xdc, 0xd0, 0xb3, 0x67, 0x8b, 0xaa, 0x42, 0xf3, 0x35, 0xf2, 0xfa, 0x5, 0x26, 0x7a, 0x2, 0x40, 0xb3, 0xc7, 0x18, 0xa5, 0x94, 0x2b, 0x3b, 0x3e, 0x3b, 0xfa, 0x98, 0xa5, 0x5c, 0x25, 0xa1, 0x46, 0x6e, 0x8d, 0x7a, 0x60, 0x37, 0x22, 0xcb, 0x2b, 0xbf, 0x3, 0xaf, 0xa5, 0x4c, 0xd7, 0x69, 0xa9, 0x9f, 0x31, 0x7, 0x35, 0xee, 0x5a, 0x5, 0xda, 0xe2, 0xc2, 0x2d, 0x39, 0x7b, 0xd9, 0x56, 0x35, 0xf5, 0x8c, 0x48, 0xa6, 0x7f, 0x90, 0xe1, 0xb7, 0x3a, 0xaf, 0xcd, 0x3f, 0x82, 0x11, 0x7f, 0x1, 0x66, 0x65, 0x78, 0x38, 0x69, 0x10, 0x5, 0xb1, 0x8d, 0xa6, 0xf3, 0x41, 0xd6, 0xe9, 0xf, 0xc1, 0xcd, 0xb3, 0x52, 0xb3, 0xf, 0xae, 0x45, 0xd3, 0x48, 0x29, 0x4e, 0x50, 0x1b, 0x63, 0x25, 0x2d, 0xe1, 0x47, 0x40, 0xf2, 0xb8, 0x5a, 0xe5, 0x29, 0x9d, 0xde, 0xc3, 0x17, 0x2d, 0xe8, 0xb6, 0xd0, 0xba, 0x21, 0x9a, 0x20, 0xa2, 0x3b, 0xb5, 0xe1, 0xf, 0xf4, 0x34, 0xd3, 0x9d, 0xb3, 0xf5, 0x83, 0x30, 0x5e, 0x9f, 0x5c, 0x3, 0x9d, 0x98, 0x56, 0x9e, 0x37, 0x7b, 0x75, 0xa7, 0xa, 0xb8, 0x37, 0xd1, 0xdf, 0x26, 0x9b, 0x8a, 0x4b, 0x56, 0x6f, 0x40, 0xbb, 0x91, 0xb5, 0x77, 0x45, 0x5f, 0xd3, 0xc3, 0x56, 0xc9, 0x14, 0xfa, 0x6, 0xb9, 0xa7, 0xce, 0x24, 0xc7, 0x31, 0x7a, 0x17, 0x2d}, - output224: []byte{0xdb, 0x85, 0xaf, 0x5c, 0xfc, 0xe7, 0x46, 0x24, 0xe, 0x6d, 0x44, 0xe7, 0x3c, 0xef, 0x66, 0xa7, 0x2c, 0xe5, 0x96, 0x82, 0x84, 0xd3, 0x5f, 0xfe, 0xf7, 0xfb, 0xff, 0x6c}, - output256: []byte{0xf8, 0xc4, 0x3e, 0x28, 0x81, 0x6b, 0xb4, 0x19, 0x93, 0xbd, 0xb8, 0x66, 0x88, 0x8f, 0x3c, 0xc5, 0x9e, 0xfb, 0xa2, 0x8, 0x39, 0x1, 0x44, 0xd3, 0x87, 0x8d, 0xbf, 0x9f, 0xbf, 0xa1, 0xd5, 0x7e}, - output384: []byte{0x7d, 0x95, 0x8, 0xfb, 0x79, 0x58, 0x11, 0xea, 0x14, 0x42, 0xdb, 0x3e, 0xcb, 0x77, 0x9c, 0xb0, 0x49, 0x47, 0x36, 0xe7, 0x12, 0x3b, 0x25, 0x2c, 0xf8, 0x8a, 0x9a, 0xb, 0x50, 0xd5, 0x7c, 0xf0, 0xb, 0x87, 0xa6, 0xc4, 0xfa, 0xc2, 0x7f, 0x82, 0x1c, 0xd5, 0x59, 0x79, 0xd5, 0x86, 0xaa, 0x39}, - output512: []byte{0xa4, 0x3a, 0xe5, 0xda, 0xd9, 0x36, 0x69, 0x75, 0x64, 0xae, 0x1b, 0xd9, 0xb8, 0x62, 0x4c, 0x5c, 0x31, 0xcc, 0x36, 0x60, 0x73, 0x22, 0xaf, 0x40, 0xe2, 0x53, 0xf1, 0xc, 0x28, 0x54, 0x67, 0xaf, 0xd0, 0xd0, 0x82, 0x52, 0xd2, 0xba, 0xd7, 0x6e, 0xfa, 0x52, 0xe4, 0x77, 0x5c, 0x9c, 0x26, 0x76, 0x1a, 0xbe, 0x38, 0x21, 0x28, 0x55, 0xa8, 0x1, 0x12, 0xfe, 0x2, 0x62, 0x3f, 0xbf, 0xa, 0x13}}, - testcase{ - msg: []byte{0x61, 0x72, 0xf1, 0x97, 0x1a, 0x6e, 0x1e, 0x4e, 0x61, 0x70, 0xaf, 0xba, 0xd9, 0x5d, 0x5f, 0xec, 0x99, 0xbf, 0x69, 0xb2, 0x4b, 0x67, 0x4b, 0xc1, 0x7d, 0xd7, 0x80, 0x11, 0x61, 0x5e, 0x50, 0x2d, 0xe6, 0xf5, 0x6b, 0x86, 0xb1, 0xa7, 0x1d, 0x3f, 0x43, 0x48, 0x8, 0x72, 0x18, 0xac, 0x7b, 0x7d, 0x9, 0x30, 0x29, 0x93, 0xbe, 0x27, 0x2e, 0x4a, 0x59, 0x19, 0x68, 0xae, 0xf1, 0x8a, 0x12, 0x62, 0xd6, 0x65, 0x61, 0xd, 0x10, 0x70, 0xee, 0x91, 0xcc, 0x8d, 0xa3, 0x6e, 0x1f, 0x84, 0x1a, 0x69, 0xa7, 0xa6, 0x82, 0xc5, 0x80, 0xe8, 0x36, 0x94, 0x1d, 0x21, 0xd9, 0x9, 0xa3, 0xaf, 0xc1, 0xf0, 0xb9, 0x63, 0xe1, 0xca, 0x5a, 0xb1, 0x93, 0xe1, 0x24, 0xa1, 0xa5, 0x3d, 0xf1, 0xc5, 0x87, 0x47, 0xe, 0x58, 0x81, 0xfb, 0x54, 0xda, 0xe1, 0xb0, 0xd8, 0x40, 0xf0, 0xc8, 0xf9, 0xd1, 0xb0, 0x4c, 0x64, 0x5b, 0xa1, 0x4, 0x1c, 0x7d, 0x8d, 0xbf, 0x22, 0x3, 0xa, 0x62, 0x3a, 0xa1, 0x56, 0x38, 0xb3, 0xd9, 0x9a, 0x2c, 0x40, 0xf, 0xf7, 0x6f, 0x32, 0x52, 0x7, 0x9a, 0xf8, 0x8d, 0x2b, 0x37, 0xf3, 0x5e, 0xe6, 0x6c, 0x1a, 0xd7, 0x80, 0x1a, 0x28, 0xd3, 0xd3, 0x88, 0xac, 0x45, 0xb, 0x97, 0xd5, 0xf0, 0xf7, 0x9e, 0x45, 0x41, 0x75, 0x53, 0x56, 0xb3, 0xb1, 0xa5, 0x69, 0x6b, 0x2, 0x3f, 0x39, 0xab, 0x7a, 0xb5, 0xf2, 0x8d, 0xf4, 0x20, 0x29, 0x36, 0xbc, 0x97, 0x39, 0x3b, 0x93, 0xbc, 0x91, 0x5c, 0xb1, 0x59, 0xea, 0x1b, 0xd7, 0xa0, 0xa4, 0x14, 0xcb, 0x4b, 0x7a, 0x1a, 0xc3, 0xaf, 0x68, 0xf5, 0xd, 0x79, 0xf0, 0xc9, 0xc7, 0x31, 0x4e, 0x75, 0xf, 0x7d, 0x2, 0xfa, 0xa5, 0x8b, 0xfa}, - output224: []byte{0xa1, 0xeb, 0x42, 0xfb, 0x7, 0x92, 0x36, 0x1f, 0xd, 0x68, 0x9, 0xa2, 0xe8, 0xdc, 0x6, 0x2f, 0x9, 0xf2, 0x85, 0x5b, 0x39, 0xbc, 0x2c, 0x4b, 0x7f, 0x54, 0x31, 0x1e}, - output256: []byte{0x4e, 0xa5, 0x24, 0xe7, 0x5, 0x2, 0x2, 0x84, 0xb1, 0x82, 0x84, 0xe3, 0x46, 0x83, 0x72, 0x55, 0x90, 0xe1, 0xee, 0x56, 0x5a, 0x6f, 0xf5, 0x98, 0xed, 0x4d, 0x42, 0xb1, 0xc9, 0x87, 0x47, 0x1e}, - output384: []byte{0xaf, 0xd9, 0x4b, 0x6, 0x1f, 0x35, 0x4b, 0x4, 0xd0, 0x71, 0x83, 0x26, 0xd7, 0xe1, 0xa, 0x6b, 0x59, 0x8c, 0xe3, 0x1c, 0xc3, 0x9c, 0x52, 0xd2, 0x65, 0xd6, 0xcf, 0x4, 0xe4, 0xd9, 0xee, 0x75, 0xcc, 0x20, 0x1, 0x49, 0x36, 0x76, 0x0, 0x31, 0x2e, 0x75, 0x14, 0xa6, 0x2f, 0xf, 0x9, 0x64}, - output512: []byte{0xa5, 0xac, 0x23, 0xd4, 0xa0, 0xd5, 0x33, 0xcb, 0x9d, 0x8a, 0x68, 0x87, 0x3f, 0x5c, 0xb7, 0x49, 0x22, 0x84, 0x58, 0xd4, 0x3c, 0xe6, 0xbd, 0x5, 0x36, 0xc8, 0x73, 0x37, 0x77, 0xb5, 0xe6, 0xe3, 0xf2, 0x8f, 0xd3, 0x6b, 0xff, 0xe6, 0x90, 0x2, 0xa0, 0x77, 0x7b, 0xa7, 0x4f, 0xef, 0x22, 0xde, 0x3f, 0xac, 0x4c, 0x81, 0x8b, 0x48, 0x42, 0x81, 0x6c, 0x60, 0x94, 0x49, 0x6f, 0x96, 0x85, 0x55}}, - testcase{ - msg: []byte{0x56, 0x68, 0xec, 0xd9, 0x9d, 0xfb, 0xe2, 0x15, 0xc4, 0x11, 0x83, 0x98, 0xac, 0x9c, 0x9e, 0xaf, 0x1a, 0x14, 0x33, 0xfa, 0xb4, 0xcc, 0xdd, 0x39, 0x68, 0x6, 0x47, 0x52, 0xb6, 0x25, 0xea, 0x94, 0x47, 0x31, 0xf7, 0x5d, 0x48, 0xa2, 0x7d, 0x4, 0x7d, 0x67, 0x54, 0x7f, 0x14, 0xdd, 0xf, 0xfa, 0xa5, 0x5f, 0xa5, 0xe2, 0x9f, 0x7a, 0xf0, 0xd1, 0x61, 0xd8, 0x5e, 0xaf, 0xc4, 0xf2, 0x2, 0x9b, 0x71, 0x7c, 0x91, 0x8e, 0xab, 0x9d, 0x30, 0x45, 0x43, 0x29, 0xb, 0xdb, 0xa7, 0x15, 0x8b, 0x68, 0x2, 0xc, 0xb, 0xa4, 0xe0, 0x79, 0xbc, 0x95, 0xb5, 0xbc, 0xf, 0xc0, 0x44, 0xa9, 0x92, 0xb9, 0x4b, 0x4c, 0xcd, 0x3b, 0xd6, 0x6d, 0xe, 0xab, 0xb5, 0xdb, 0xba, 0xb9, 0x4, 0xd6, 0x2e, 0x0, 0x75, 0x2c, 0x4e, 0x3b, 0x0, 0x91, 0xd7, 0x73, 0xbc, 0xf4, 0xc1, 0x4b, 0x43, 0x77, 0xda, 0x3e, 0xff, 0xf8, 0x24, 0xb1, 0xcb, 0x2f, 0xa0, 0x1b, 0x32, 0xd1, 0xe4, 0x6c, 0x90, 0x9e, 0x62, 0x6e, 0xd2, 0xda, 0xe9, 0x20, 0xf4, 0xc7, 0xdb, 0xeb, 0x63, 0x5b, 0xc7, 0x54, 0xfa, 0xcb, 0xd8, 0xd4, 0x9b, 0xeb, 0xa3, 0xf2, 0x3c, 0x1c, 0x41, 0xcc, 0xbf, 0xcd, 0xe, 0xe0, 0xc1, 0x14, 0xe6, 0x97, 0x37, 0xf5, 0x59, 0x7c, 0xb, 0xf1, 0xd8, 0x59, 0xf0, 0xc7, 0x67, 0xe1, 0x80, 0x2, 0xae, 0x8e, 0x39, 0xc2, 0x62, 0x61, 0xff, 0xde, 0x29, 0x20, 0xd3, 0xd0, 0xba, 0xf0, 0xe9, 0x6, 0x13, 0x86, 0x96, 0xcf, 0xe5, 0xb7, 0xe3, 0x2b, 0x60, 0xf, 0x45, 0xdf, 0x3a, 0xaa, 0x39, 0x93, 0x2f, 0x3a, 0x7d, 0xf9, 0x5b, 0x60, 0xfa, 0x87, 0x12, 0xa2, 0x27, 0x1f, 0xca, 0xf3, 0x91, 0x1c, 0xe7, 0xb5, 0x11, 0xb1}, - output224: []byte{0x1a, 0xf4, 0xa3, 0xab, 0x9a, 0x7, 0xcf, 0x6, 0x4c, 0x25, 0x4d, 0x12, 0x2c, 0xc7, 0xde, 0x15, 0xe0, 0xf0, 0xd3, 0xca, 0x3d, 0xfa, 0x50, 0xea, 0x1c, 0x43, 0xa7, 0x8d}, - output256: []byte{0xe4, 0x96, 0x3e, 0x74, 0xae, 0x1, 0xff, 0x77, 0x74, 0xb9, 0x6b, 0x4f, 0x61, 0x4d, 0x1c, 0xb2, 0xa4, 0xcf, 0x8d, 0x20, 0x6e, 0xd9, 0x3c, 0x66, 0xfa, 0x42, 0xf7, 0x14, 0x32, 0xbe, 0x2c, 0x3f}, - output384: []byte{0xec, 0x63, 0xce, 0x9d, 0xd9, 0x79, 0xfc, 0xd1, 0x32, 0x24, 0x4b, 0xe1, 0x1a, 0x45, 0xdd, 0xb1, 0xd0, 0xf, 0xc8, 0xf8, 0x1, 0x60, 0xb8, 0xcc, 0x45, 0x6f, 0x5c, 0x5e, 0xb8, 0x9e, 0xc, 0x3f, 0x67, 0x5b, 0x28, 0xb9, 0x2d, 0xd9, 0xe6, 0xce, 0xfa, 0xa5, 0xda, 0x57, 0xb4, 0x90, 0x86, 0x46}, - output512: []byte{0x7, 0xf3, 0xbc, 0xac, 0xf5, 0xf7, 0x88, 0x16, 0xd5, 0x15, 0xce, 0xdf, 0x1c, 0xbb, 0xa4, 0xff, 0xc5, 0x8d, 0x83, 0xaa, 0x86, 0x87, 0xb0, 0xe7, 0x25, 0x2f, 0xaa, 0xb4, 0x3e, 0x7f, 0x59, 0xa7, 0xff, 0x74, 0x15, 0x72, 0x7a, 0xdd, 0xf9, 0xa2, 0x25, 0x60, 0xad, 0xb5, 0x75, 0x5a, 0x2c, 0x6d, 0xf8, 0xc7, 0xe6, 0xdc, 0xac, 0xeb, 0x53, 0x10, 0x6a, 0x71, 0x4d, 0x80, 0x7a, 0xaa, 0xdb, 0xf3}}, - testcase{ - msg: []byte{0x3, 0xd6, 0x25, 0x48, 0x83, 0x54, 0xdf, 0x30, 0xe3, 0xf8, 0x75, 0xa6, 0x8e, 0xdf, 0xcf, 0x34, 0xe, 0x83, 0x66, 0xa8, 0xe1, 0xab, 0x67, 0xf9, 0xd5, 0xc5, 0x48, 0x6a, 0x96, 0x82, 0x9d, 0xfa, 0xc0, 0x57, 0x82, 0x89, 0x8, 0x2b, 0x2a, 0x62, 0x11, 0x7e, 0x1c, 0xf4, 0x18, 0xb4, 0x3b, 0x90, 0xe0, 0xad, 0xc8, 0x81, 0xfc, 0x6a, 0xe8, 0x10, 0x5c, 0x88, 0x8e, 0x9e, 0xcd, 0x21, 0xae, 0xa1, 0xc9, 0xae, 0x1a, 0x40, 0x38, 0xdf, 0xd1, 0x73, 0x78, 0xfe, 0xd7, 0x1d, 0x2, 0xae, 0x49, 0x20, 0x87, 0xd7, 0xcd, 0xcd, 0x98, 0xf7, 0x46, 0x85, 0x52, 0x27, 0x96, 0x7c, 0xb1, 0xab, 0x47, 0x14, 0x26, 0x1e, 0xe3, 0xbe, 0xad, 0x3f, 0x4d, 0xb1, 0x18, 0x32, 0x9d, 0x3e, 0xbe, 0xf4, 0xbc, 0x48, 0xa8, 0x75, 0xc1, 0x9b, 0xa7, 0x63, 0x96, 0x6d, 0xa0, 0xeb, 0xea, 0x80, 0xe, 0x1, 0xb2, 0xf5, 0xb, 0x0, 0xe9, 0xdd, 0x4c, 0xac, 0xa6, 0xdc, 0xb3, 0x14, 0xd0, 0x1, 0x84, 0xef, 0x71, 0xea, 0x23, 0x91, 0xd7, 0x60, 0xc9, 0x50, 0x71, 0xd, 0xb4, 0xa7, 0xf, 0x92, 0x12, 0xff, 0xc5, 0x48, 0x61, 0xf9, 0xdc, 0x75, 0x2c, 0xe1, 0x88, 0x67, 0xb8, 0xad, 0xc, 0x48, 0xdf, 0x84, 0x66, 0xef, 0x72, 0x31, 0xe7, 0xac, 0x56, 0x7f, 0xe, 0xb5, 0x50, 0x99, 0xe6, 0x22, 0xeb, 0xb8, 0x6c, 0xb2, 0x37, 0x52, 0x1, 0x90, 0xa6, 0x1c, 0x66, 0xad, 0x34, 0xf1, 0xf4, 0xe2, 0x89, 0xcb, 0x32, 0x82, 0xae, 0x3e, 0xaa, 0xc6, 0x15, 0x2e, 0xd2, 0x4d, 0x2c, 0x92, 0xba, 0xe5, 0xa7, 0x65, 0x82, 0x52, 0xa5, 0x3c, 0x49, 0xb7, 0xb0, 0x2d, 0xfe, 0x54, 0xfd, 0xb2, 0xe9, 0x0, 0x74, 0xb6, 0xcf, 0x31, 0xa, 0xc6, 0x61}, - output224: []byte{0xc1, 0x4d, 0x43, 0x52, 0x5e, 0x18, 0x89, 0x2c, 0x79, 0x14, 0x2d, 0x88, 0x7d, 0x2a, 0xd3, 0x99, 0x28, 0x48, 0xb7, 0x2c, 0xcc, 0x8, 0x7f, 0x64, 0xf0, 0xf1, 0xd6, 0x21}, - output256: []byte{0xf, 0xd, 0x72, 0xbf, 0x8c, 0x1, 0x98, 0x45, 0x9e, 0x45, 0xec, 0xe9, 0xcc, 0x18, 0xe9, 0x30, 0xcb, 0x86, 0x26, 0x3a, 0xcc, 0xf1, 0xfc, 0x7a, 0x0, 0xbc, 0x85, 0x7a, 0xc9, 0xf2, 0x1, 0xad}, - output384: []byte{0x86, 0x30, 0x1f, 0xe9, 0x8f, 0x3f, 0xfa, 0xbb, 0xc, 0xb0, 0x8, 0x5a, 0xaa, 0x1e, 0xc6, 0x1b, 0xca, 0xd6, 0x17, 0x14, 0x59, 0xa8, 0x62, 0x3b, 0xb7, 0x80, 0xec, 0x32, 0xe4, 0x6f, 0x52, 0x64, 0x99, 0x46, 0xa4, 0x21, 0xeb, 0xfc, 0x7d, 0xe9, 0xf, 0xe, 0x74, 0xec, 0x78, 0x7a, 0x3e, 0x3}, - output512: []byte{0x13, 0xa5, 0x92, 0xb7, 0x3e, 0xde, 0x48, 0x70, 0x36, 0xc8, 0x81, 0x6b, 0xd6, 0xfc, 0x6c, 0xdc, 0x4, 0xdc, 0x61, 0x33, 0x40, 0x9a, 0x6e, 0xe9, 0x90, 0x58, 0x41, 0x60, 0x51, 0x8f, 0x9e, 0xf5, 0x73, 0x26, 0x4c, 0xf0, 0x4d, 0x38, 0xa3, 0xba, 0x75, 0xd1, 0x50, 0xf4, 0xf0, 0x26, 0xf6, 0xdf, 0x89, 0x36, 0xe1, 0x3c, 0x8f, 0x4f, 0x3e, 0xcc, 0x9e, 0xcb, 0xc4, 0x3f, 0xdf, 0xc4, 0x88, 0xa4}}, - testcase{ - msg: []byte{0x2e, 0xdc, 0x28, 0x2f, 0xfb, 0x90, 0xb9, 0x71, 0x18, 0xdd, 0x3, 0xaa, 0xa0, 0x3b, 0x14, 0x5f, 0x36, 0x39, 0x5, 0xe3, 0xcb, 0xd2, 0xd5, 0xe, 0xcd, 0x69, 0x2b, 0x37, 0xbf, 0x0, 0x1, 0x85, 0xc6, 0x51, 0xd3, 0xe9, 0x72, 0x6c, 0x69, 0xd, 0x37, 0x73, 0xec, 0x1e, 0x48, 0x51, 0xe, 0x42, 0xb1, 0x77, 0x42, 0xb0, 0xb0, 0x37, 0x7e, 0x7d, 0xe6, 0xb8, 0xf5, 0x5e, 0x0, 0xa8, 0xa4, 0xdb, 0x47, 0x40, 0xce, 0xe6, 0xdb, 0x8, 0x30, 0x52, 0x9d, 0xd1, 0x96, 0x17, 0x50, 0x1d, 0xc1, 0xe9, 0x35, 0x9a, 0xa3, 0xbc, 0xf1, 0x47, 0xe0, 0xa7, 0x6b, 0x3a, 0xb7, 0xc, 0x49, 0x84, 0xc1, 0x3e, 0x33, 0x9e, 0x68, 0x6, 0xbb, 0x35, 0xe6, 0x83, 0xaf, 0x85, 0x27, 0x9, 0x36, 0x70, 0x85, 0x9f, 0x3d, 0x8a, 0xf, 0xc7, 0xd4, 0x93, 0xbc, 0xba, 0x6b, 0xb1, 0x2b, 0x5f, 0x65, 0xe7, 0x1e, 0x70, 0x5c, 0xa5, 0xd6, 0xc9, 0x48, 0xd6, 0x6e, 0xd3, 0xd7, 0x30, 0xb2, 0x6d, 0xb3, 0x95, 0xb3, 0x44, 0x77, 0x37, 0xc2, 0x6f, 0xad, 0x8, 0x9a, 0xa0, 0xad, 0xe, 0x30, 0x6c, 0xb2, 0x8b, 0xf0, 0xac, 0xf1, 0x6, 0xf8, 0x9a, 0xf3, 0x74, 0x5f, 0xe, 0xc7, 0x2d, 0x53, 0x49, 0x68, 0xcc, 0xa5, 0x43, 0xcd, 0x2c, 0xa5, 0xc, 0x94, 0xb1, 0x45, 0x67, 0x43, 0x25, 0x4e, 0x35, 0x8c, 0x13, 0x17, 0xc0, 0x7a, 0x7, 0xbf, 0x2b, 0xe, 0xca, 0x43, 0x8a, 0x70, 0x93, 0x67, 0xfa, 0xfc, 0x89, 0xa5, 0x72, 0x39, 0x2, 0x8f, 0xc5, 0xfe, 0xcf, 0xd5, 0x3b, 0x8e, 0xf9, 0x58, 0xef, 0x10, 0xee, 0x6, 0x8, 0xb7, 0xf5, 0xcb, 0x99, 0x23, 0xad, 0x97, 0x5, 0x8e, 0xc0, 0x67, 0x70, 0xc, 0xc7, 0x46, 0xc1, 0x27, 0xa6, 0x1e, 0xe3}, - output224: []byte{0x11, 0x6c, 0x4, 0x62, 0xd5, 0xd, 0x57, 0xf9, 0x48, 0x1, 0x5e, 0xc7, 0x4b, 0xe9, 0x1, 0x57, 0x7, 0x31, 0x37, 0x12, 0xb4, 0x58, 0x83, 0xc0, 0x2f, 0xe8, 0x4e, 0x1e}, - output256: []byte{0xdd, 0x1d, 0x2a, 0x92, 0xb3, 0xf3, 0xf3, 0x90, 0x2f, 0x6, 0x43, 0x65, 0x83, 0x8e, 0x1f, 0x5f, 0x34, 0x68, 0x73, 0xc, 0x34, 0x3e, 0x29, 0x74, 0xe7, 0xa9, 0xec, 0xfc, 0xd8, 0x4a, 0xa6, 0xdb}, - output384: []byte{0xdd, 0xf8, 0xd5, 0x47, 0xbb, 0xa4, 0xf4, 0x3d, 0x88, 0x64, 0xca, 0xef, 0x1b, 0x1b, 0xed, 0x77, 0xaa, 0x12, 0xe4, 0x1f, 0x68, 0x86, 0xa5, 0xd8, 0x75, 0x8c, 0x65, 0x4b, 0x7e, 0xc1, 0xfa, 0x5b, 0xe, 0x77, 0xba, 0x4e, 0x76, 0x80, 0xc7, 0x83, 0xd, 0xa1, 0x61, 0xe1, 0x4c, 0xb1, 0xe6, 0x5c}, - output512: []byte{0xc2, 0xfb, 0x59, 0xa, 0xb7, 0x4e, 0x23, 0xb, 0x8f, 0xe1, 0x59, 0x89, 0x2f, 0x94, 0xde, 0x4, 0xef, 0x7a, 0xda, 0xa0, 0x2b, 0x91, 0x8d, 0x49, 0x94, 0xf9, 0x96, 0x53, 0x8d, 0x25, 0x7f, 0x5a, 0x80, 0xc9, 0xb3, 0xbe, 0x8f, 0x41, 0x1, 0x70, 0xb0, 0xc5, 0xca, 0xc3, 0xf5, 0x7, 0x40, 0x12, 0x20, 0x88, 0x1c, 0x5e, 0x8, 0xd8, 0xbf, 0xa, 0x13, 0x24, 0x71, 0x70, 0xd3, 0x90, 0x85, 0xbc}}, - testcase{ - msg: []byte{0x90, 0xb2, 0x8a, 0x6a, 0xa1, 0xfe, 0x53, 0x39, 0x15, 0xbc, 0xb8, 0xe8, 0x1e, 0xd6, 0xca, 0xcd, 0xc1, 0x9, 0x62, 0xb7, 0xff, 0x82, 0x47, 0x4f, 0x84, 0x5e, 0xeb, 0x86, 0x97, 0x76, 0x0, 0xcf, 0x70, 0xb0, 0x7b, 0xa8, 0xe3, 0x79, 0x61, 0x41, 0xee, 0x34, 0xe, 0x3f, 0xce, 0x84, 0x2a, 0x38, 0xa5, 0xa, 0xfb, 0xe9, 0x3, 0x1, 0xa3, 0xbd, 0xcc, 0x59, 0x1f, 0x2e, 0x7d, 0x9d, 0xe5, 0x3e, 0x49, 0x55, 0x25, 0x56, 0xb, 0x90, 0x8c, 0x89, 0x24, 0x39, 0x99, 0xa, 0x2c, 0xa2, 0x67, 0x9c, 0x55, 0x39, 0xff, 0xdf, 0x63, 0x67, 0x77, 0xad, 0x9c, 0x1c, 0xde, 0xf8, 0x9, 0xcd, 0xa9, 0xe8, 0xdc, 0xdb, 0x45, 0x1a, 0xbb, 0x9e, 0x9c, 0x17, 0xef, 0xa4, 0x37, 0x9a, 0xbd, 0x24, 0xb1, 0x82, 0xbd, 0x98, 0x1c, 0xaf, 0xc7, 0x92, 0x64, 0xa, 0x18, 0x3b, 0x61, 0x69, 0x43, 0x1, 0xd0, 0x4c, 0x5b, 0x3e, 0xaa, 0xd6, 0x94, 0xa6, 0xbd, 0x4c, 0xc0, 0x6e, 0xf5, 0xda, 0x8f, 0xa2, 0x3b, 0x4f, 0xa2, 0xa6, 0x45, 0x59, 0xc5, 0xa6, 0x83, 0x97, 0x93, 0x0, 0x79, 0xd2, 0x50, 0xc5, 0x1b, 0xcf, 0x0, 0xe2, 0xb1, 0x6a, 0x6c, 0x49, 0x17, 0x14, 0x33, 0xb0, 0xaa, 0xdf, 0xd8, 0x2, 0x31, 0x27, 0x65, 0x60, 0xb8, 0x4, 0x58, 0xdd, 0x77, 0x8, 0x9b, 0x7a, 0x1b, 0xbc, 0xc9, 0xe7, 0xe4, 0xb9, 0xf8, 0x81, 0xea, 0xcd, 0x6c, 0x92, 0xc4, 0x31, 0x83, 0x48, 0xa1, 0x3f, 0x49, 0x14, 0xeb, 0x27, 0x11, 0x5a, 0x1c, 0xfc, 0x5d, 0x16, 0xd7, 0xfd, 0x94, 0x95, 0x4c, 0x35, 0x32, 0xef, 0xac, 0xa2, 0xca, 0xb0, 0x25, 0x10, 0x3b, 0x2d, 0x2, 0xc6, 0xfd, 0x71, 0xda, 0x3a, 0x77, 0xf4, 0x17, 0xd7, 0x93, 0x26, 0x85, 0x88, 0x8a}, - output224: []byte{0x96, 0xf7, 0x11, 0x11, 0x76, 0x64, 0x1f, 0x63, 0x73, 0x70, 0x1b, 0xa5, 0x94, 0x9, 0x0, 0x79, 0x14, 0x6d, 0x42, 0x20, 0xf3, 0xb, 0x51, 0x20, 0xc1, 0x24, 0x98, 0xba}, - output256: []byte{0x21, 0xbf, 0x20, 0x66, 0x4c, 0xec, 0x2c, 0xd2, 0xce, 0xb1, 0xdf, 0xfc, 0x1d, 0x78, 0x89, 0x3d, 0x5c, 0xa1, 0xa7, 0xda, 0x88, 0xeb, 0x6b, 0xfd, 0xc, 0x6e, 0xfc, 0xa6, 0x19, 0xc, 0x9e, 0x15}, - output384: []byte{0x72, 0x95, 0x3f, 0xe4, 0xca, 0x34, 0xe7, 0x17, 0xe3, 0x4, 0xdc, 0x77, 0xaf, 0xd9, 0xde, 0xde, 0x32, 0xa8, 0x46, 0x71, 0x27, 0xb9, 0xf7, 0x8b, 0xb0, 0xbe, 0x61, 0x91, 0xa7, 0xec, 0xd0, 0x51, 0xb7, 0xda, 0xe0, 0x91, 0xb1, 0x75, 0x89, 0x7, 0xdd, 0xa3, 0xb1, 0xd2, 0x5c, 0xc, 0x58, 0x83}, - output512: []byte{0x2, 0x95, 0x15, 0x96, 0xa1, 0x3a, 0x1a, 0x41, 0x18, 0x8a, 0x4a, 0x1d, 0x63, 0x46, 0xf7, 0xea, 0xfb, 0x60, 0xa2, 0x5, 0x1e, 0xa6, 0x7c, 0x63, 0x23, 0x7d, 0x1a, 0x9b, 0x79, 0xec, 0x47, 0x33, 0xf3, 0x3e, 0xce, 0xc2, 0x23, 0xde, 0xdd, 0x94, 0x6b, 0x78, 0x38, 0x7b, 0x6f, 0x2d, 0xf5, 0xe9, 0xab, 0x6a, 0xf7, 0xdf, 0xba, 0xba, 0xf8, 0xf, 0x4f, 0xcc, 0x94, 0xfa, 0x8, 0x72, 0x75, 0xe8}}, - testcase{ - msg: []byte{0x29, 0x69, 0x44, 0x7d, 0x17, 0x54, 0x90, 0xf2, 0xaa, 0x9b, 0xb0, 0x55, 0x1, 0x4d, 0xbe, 0xf2, 0xe6, 0x85, 0x4c, 0x95, 0xf8, 0xd6, 0x9, 0x50, 0xbf, 0xe8, 0xc0, 0xbe, 0x8d, 0xe2, 0x54, 0xc2, 0x6b, 0x2d, 0x31, 0xb9, 0xe4, 0xde, 0x9c, 0x68, 0xc9, 0xad, 0xf4, 0x9e, 0x4e, 0xe9, 0xb1, 0xc2, 0x85, 0x9, 0x67, 0xf2, 0x9f, 0x5d, 0x8, 0x73, 0x84, 0x83, 0xb4, 0x17, 0xbb, 0x96, 0xb2, 0xa5, 0x6f, 0xc, 0x8a, 0xca, 0x63, 0x2b, 0x55, 0x20, 0x59, 0xc5, 0x9a, 0xac, 0x3f, 0x61, 0xf7, 0xb4, 0x5c, 0x96, 0x6b, 0x75, 0xf1, 0xd9, 0x93, 0x1f, 0xf4, 0xe5, 0x96, 0x40, 0x63, 0x78, 0xce, 0xe9, 0x1a, 0xaa, 0x72, 0x6a, 0x3a, 0x84, 0xc3, 0x3f, 0x37, 0xe9, 0xcd, 0xbe, 0x62, 0x6b, 0x57, 0x45, 0xa0, 0xb0, 0x60, 0x64, 0xa8, 0xa8, 0xd5, 0x6e, 0x53, 0xaa, 0xf1, 0x2, 0xd2, 0x3d, 0xd9, 0xdf, 0xa, 0x3f, 0xdf, 0x7a, 0x63, 0x85, 0x9, 0xa6, 0x76, 0x1a, 0x33, 0xfa, 0x42, 0xfa, 0x8d, 0xdb, 0xd8, 0xe1, 0x61, 0x59, 0xc9, 0x30, 0x8, 0xb5, 0x37, 0x65, 0x1, 0x9c, 0x3f, 0xe, 0x9f, 0x10, 0xb1, 0x44, 0xce, 0x2a, 0xc5, 0x7f, 0x5d, 0x72, 0x97, 0xf9, 0xc9, 0x94, 0x9e, 0x4f, 0xf6, 0x8b, 0x70, 0xd3, 0x39, 0xf8, 0x75, 0x1, 0xce, 0x85, 0x50, 0xb7, 0x72, 0xf3, 0x2c, 0x6d, 0xa8, 0xad, 0x2c, 0xe2, 0x10, 0xa, 0x89, 0x5d, 0x8b, 0x8, 0xfa, 0x1e, 0xea, 0xd7, 0xc3, 0x76, 0xb4, 0x7, 0x70, 0x97, 0x3, 0xc5, 0x10, 0xb5, 0xf, 0x87, 0xe7, 0x3e, 0x43, 0xf8, 0xe7, 0x34, 0x8f, 0x87, 0xc3, 0x83, 0x2a, 0x54, 0x7e, 0xf2, 0xbb, 0xe5, 0x79, 0x9a, 0xbe, 0xdc, 0xf5, 0xe1, 0xf3, 0x72, 0xea, 0x80, 0x92, 0x33, 0xf0, 0x6}, - output224: []byte{0x9e, 0xdd, 0xab, 0x2c, 0x9c, 0x60, 0xb1, 0x22, 0x50, 0x3c, 0x1c, 0x30, 0xec, 0x6e, 0x74, 0x5, 0xe, 0xe1, 0x3c, 0x7e, 0x10, 0x3a, 0x5, 0xf9, 0xed, 0x41, 0xd9, 0x92}, - output256: []byte{0x64, 0x72, 0xd7, 0xc5, 0x30, 0xb5, 0x48, 0xe4, 0xb4, 0x7d, 0x22, 0x78, 0xd7, 0x17, 0x2b, 0x42, 0x1a, 0xf, 0xb6, 0x39, 0x8a, 0x28, 0x23, 0xdd, 0x2f, 0x2b, 0x26, 0x20, 0x8a, 0xf8, 0x94, 0x2e}, - output384: []byte{0xf3, 0x6a, 0x9e, 0xe4, 0x55, 0x6, 0x6e, 0x56, 0x2f, 0xb6, 0x75, 0xf3, 0x99, 0xd9, 0xdc, 0xc6, 0xbc, 0xcf, 0x68, 0xfd, 0x1b, 0xb, 0xa9, 0xf7, 0xdc, 0xc1, 0xed, 0xfa, 0xc1, 0xf1, 0xe2, 0x34, 0xcb, 0x67, 0xb5, 0xa0, 0xf7, 0x70, 0xe5, 0x54, 0x35, 0xf7, 0x5f, 0x9e, 0xc8, 0x4a, 0x91, 0x51}, - output512: []byte{0x5a, 0xa4, 0xe3, 0x2f, 0xe, 0xa3, 0xe8, 0x53, 0x92, 0x9b, 0xf6, 0x4a, 0xcc, 0x95, 0x65, 0xa0, 0x13, 0x0, 0xbc, 0x0, 0x70, 0x63, 0xb9, 0x39, 0xf6, 0xdb, 0xbe, 0x9c, 0xae, 0x5, 0x45, 0xea, 0x95, 0xfb, 0xca, 0xc3, 0x25, 0x75, 0xaa, 0x7, 0x27, 0xee, 0x4d, 0x93, 0x70, 0x71, 0xe6, 0xb3, 0xbe, 0x74, 0xe2, 0x3f, 0xe7, 0x6f, 0xd6, 0x3e, 0xc0, 0x5c, 0x7f, 0x7d, 0x8a, 0x40, 0x7a, 0xf0}}, - testcase{ - msg: []byte{0x72, 0x16, 0x45, 0x63, 0x3a, 0x44, 0xa2, 0xc7, 0x8b, 0x19, 0x2, 0x4e, 0xae, 0xcf, 0x58, 0x57, 0x5a, 0xb2, 0x3c, 0x27, 0x19, 0x8, 0x33, 0xc2, 0x68, 0x75, 0xdc, 0xf, 0xd, 0x50, 0xb4, 0x6a, 0xea, 0x9c, 0x34, 0x3d, 0x82, 0xea, 0x7d, 0x5b, 0x3e, 0x50, 0xec, 0x70, 0x5, 0x45, 0xc6, 0x15, 0xda, 0xea, 0xea, 0x64, 0x72, 0x6a, 0xf, 0x5, 0x60, 0x75, 0x76, 0xdc, 0xd3, 0x96, 0xd8, 0x12, 0xb0, 0x3f, 0xb6, 0x55, 0x1c, 0x64, 0x10, 0x87, 0x85, 0x6d, 0x5, 0xb, 0x10, 0xe6, 0xa4, 0xd5, 0x57, 0x7b, 0x82, 0xa9, 0x8a, 0xfb, 0x89, 0xce, 0xe8, 0x59, 0x4c, 0x9d, 0xc1, 0x9e, 0x79, 0xfe, 0xff, 0x3, 0x82, 0xfc, 0xfd, 0x12, 0x7f, 0x1b, 0x80, 0x3a, 0x4b, 0x99, 0x46, 0xf4, 0xac, 0x9a, 0x43, 0x78, 0xe1, 0xe6, 0xe0, 0x41, 0xb1, 0x38, 0x9a, 0x53, 0xe3, 0x45, 0xc, 0xd3, 0x2d, 0x9d, 0x29, 0x41, 0xb0, 0xcb, 0xab, 0xdb, 0x50, 0xda, 0x8e, 0xa2, 0x51, 0x31, 0x45, 0x16, 0x4c, 0x3a, 0xb6, 0xbc, 0xbd, 0x25, 0x1c, 0x44, 0x8d, 0x2d, 0x4b, 0x8, 0x7a, 0xc5, 0x7a, 0x59, 0xc2, 0x28, 0x5d, 0x56, 0x4f, 0x16, 0xda, 0x4e, 0xd5, 0xe6, 0x7, 0xed, 0x97, 0x95, 0x92, 0x14, 0x6f, 0xfb, 0xe, 0xf3, 0xf3, 0xdb, 0x30, 0x8f, 0xb3, 0x42, 0xdf, 0x5e, 0xb5, 0x92, 0x4a, 0x48, 0x25, 0x6f, 0xc7, 0x63, 0x14, 0x1a, 0x27, 0x88, 0x14, 0xc8, 0x2d, 0x6d, 0x63, 0x48, 0x57, 0x75, 0x45, 0x87, 0xa, 0xe3, 0xa8, 0x3c, 0x72, 0x30, 0xac, 0x2, 0xa1, 0x54, 0xf, 0xe1, 0x79, 0x8f, 0x7e, 0xf0, 0x9e, 0x33, 0x5a, 0x86, 0x5a, 0x2a, 0xe0, 0x94, 0x9b, 0x21, 0xe4, 0xf7, 0x48, 0xfb, 0x8a, 0x51, 0xf4, 0x47, 0x50, 0xe2, 0x13, 0xa8, 0xfb}, - output224: []byte{0x54, 0xcc, 0x87, 0xb9, 0x65, 0x51, 0x80, 0xc0, 0xe1, 0xc6, 0x67, 0x23, 0x50, 0xae, 0x19, 0x52, 0xdd, 0xf5, 0x1e, 0xe5, 0xd7, 0xe2, 0x15, 0x56, 0x96, 0x52, 0xaa, 0x2e}, - output256: []byte{0x2a, 0xc7, 0xff, 0x80, 0xee, 0x36, 0xd5, 0x0, 0x99, 0x5c, 0x97, 0x3b, 0x87, 0x46, 0xd8, 0x46, 0x67, 0x15, 0xe6, 0xd8, 0xb0, 0xf5, 0x54, 0xaa, 0xcb, 0x5d, 0x28, 0x76, 0xd7, 0xf5, 0xb8, 0x74}, - output384: []byte{0x37, 0x36, 0x8f, 0x5a, 0x7, 0x4d, 0xa0, 0xe5, 0x7, 0x58, 0x45, 0xf7, 0x6b, 0x1a, 0xc5, 0x85, 0x8d, 0xf7, 0x93, 0xee, 0xf8, 0x8a, 0x85, 0x4c, 0x7d, 0xaf, 0xe3, 0xb9, 0x7, 0x20, 0x70, 0x7a, 0x14, 0x5a, 0x5d, 0xcb, 0xd, 0x92, 0x66, 0xc6, 0x14, 0x82, 0x4, 0xce, 0x69, 0x3c, 0x54, 0x32}, - output512: []byte{0x49, 0x5b, 0x2a, 0xa2, 0x10, 0x31, 0x59, 0xd9, 0xa9, 0x37, 0xe9, 0xdd, 0x56, 0xb0, 0x59, 0xac, 0xa9, 0x8a, 0x5e, 0x3c, 0xb7, 0xb5, 0x9b, 0xb6, 0x90, 0xde, 0xdc, 0x0, 0xc6, 0x92, 0xe9, 0xd7, 0xa1, 0x86, 0x14, 0xa7, 0x3d, 0x12, 0xe0, 0x76, 0x34, 0xb2, 0x9, 0xcc, 0x63, 0xd, 0x18, 0x18, 0xb0, 0x9f, 0x10, 0x76, 0xa9, 0x41, 0xff, 0x80, 0x47, 0x44, 0x93, 0xe3, 0xd4, 0x2b, 0x98, 0x12}}, - testcase{ - msg: []byte{0x6b, 0x86, 0xd, 0x39, 0x72, 0x5a, 0x14, 0xb4, 0x98, 0xbb, 0x71, 0x45, 0x74, 0xb4, 0xd3, 0x7c, 0xa7, 0x87, 0x40, 0x47, 0x68, 0xf6, 0x4c, 0x64, 0x8b, 0x17, 0x51, 0xb3, 0x53, 0xac, 0x92, 0xba, 0xc2, 0xc3, 0xa2, 0x8e, 0xa9, 0x9, 0xfd, 0xf0, 0x42, 0x33, 0x36, 0x40, 0x1a, 0x2, 0xe6, 0x3e, 0xc2, 0x43, 0x25, 0x30, 0xd, 0x82, 0x3b, 0x68, 0x64, 0xbb, 0x70, 0x1f, 0x9d, 0x7c, 0x7a, 0x1f, 0x8e, 0xc9, 0xd0, 0xae, 0x35, 0x84, 0xaa, 0x6d, 0xd6, 0x2e, 0xa1, 0x99, 0x7c, 0xd8, 0x31, 0xb4, 0xba, 0xbd, 0x9a, 0x4d, 0xa5, 0x9, 0x32, 0xd4, 0xef, 0xda, 0x74, 0x5c, 0x61, 0xe4, 0x13, 0x8, 0x90, 0xe1, 0x56, 0xae, 0xe6, 0x11, 0x37, 0x16, 0xda, 0xf9, 0x57, 0x64, 0x22, 0x2a, 0x91, 0x18, 0x7d, 0xb2, 0xef, 0xfe, 0xa4, 0x9d, 0x5d, 0x5, 0x96, 0x10, 0x2d, 0x61, 0x9b, 0xd2, 0x6a, 0x61, 0x6b, 0xbf, 0xda, 0x83, 0x35, 0x50, 0x5f, 0xbb, 0xd, 0x90, 0xb4, 0xc1, 0x80, 0xd1, 0xa2, 0x33, 0x5b, 0x91, 0x53, 0x8e, 0x16, 0x68, 0xf9, 0xf9, 0x64, 0x27, 0x90, 0xb4, 0xe5, 0x5f, 0x9c, 0xab, 0xf, 0xe2, 0xbd, 0xd2, 0x93, 0x5d, 0x0, 0x1e, 0xe6, 0x41, 0x9a, 0xba, 0xb5, 0x45, 0x78, 0x80, 0xd0, 0xdb, 0xff, 0x20, 0xed, 0x87, 0x58, 0xf4, 0xc2, 0xf, 0xe7, 0x59, 0xef, 0xb3, 0x31, 0x41, 0xcf, 0xe, 0x89, 0x25, 0x87, 0xfe, 0x81, 0x87, 0xe5, 0xfb, 0xc5, 0x77, 0x86, 0xb7, 0xe8, 0xb0, 0x89, 0x61, 0x2c, 0x93, 0x6d, 0xfc, 0x3, 0xd2, 0x7e, 0xfb, 0xbe, 0x7c, 0x86, 0x73, 0xf1, 0x60, 0x6b, 0xd5, 0x1d, 0x5f, 0xf3, 0x86, 0xf4, 0xa7, 0xab, 0x68, 0xed, 0xf5, 0x9f, 0x38, 0x5e, 0xb1, 0x29, 0x1f, 0x11, 0x7b, 0xfe, 0x71, 0x73, 0x99}, - output224: []byte{0x46, 0x29, 0xc9, 0x7f, 0x9b, 0xa9, 0x86, 0x98, 0xe0, 0xdd, 0xec, 0xa5, 0xe0, 0xa3, 0xb6, 0xde, 0x21, 0xe, 0xa9, 0xe8, 0x4b, 0xf9, 0x42, 0xc2, 0xcc, 0xf4, 0xec, 0x68}, - output256: []byte{0x9f, 0xf8, 0x1d, 0x57, 0x5f, 0x7b, 0xf0, 0xc4, 0xef, 0x34, 0xb, 0x42, 0x79, 0xd5, 0x6e, 0x16, 0xce, 0x68, 0x82, 0x1a, 0xfc, 0xdf, 0x2a, 0x69, 0x10, 0x5d, 0x4f, 0x9c, 0xad, 0xad, 0xd3, 0xcf}, - output384: []byte{0xda, 0xac, 0x83, 0xb0, 0xc5, 0xc8, 0xf8, 0xfc, 0x3b, 0xcc, 0xd2, 0x59, 0xc2, 0x7d, 0x96, 0x46, 0x73, 0xb4, 0xdc, 0xa7, 0x90, 0xb4, 0xb6, 0x38, 0x99, 0xe1, 0xb6, 0xc1, 0x9c, 0xc2, 0x91, 0xfe, 0x6f, 0x88, 0x37, 0x62, 0x81, 0xe0, 0xfa, 0x32, 0xa, 0xdf, 0xad, 0xc8, 0x2a, 0x8f, 0xf4, 0xef}, - output512: []byte{0x21, 0x7b, 0x5a, 0x98, 0x5b, 0xed, 0x80, 0x0, 0x82, 0x74, 0x47, 0xe, 0x25, 0x44, 0x43, 0x23, 0x8c, 0x5a, 0xea, 0xcb, 0xc7, 0xee, 0x22, 0x89, 0xf0, 0xe6, 0x3b, 0x7a, 0xfe, 0x6d, 0xf, 0x39, 0x5e, 0x23, 0x61, 0xfd, 0x6d, 0x9d, 0xc3, 0x3b, 0x4f, 0x54, 0xf0, 0x3f, 0xf5, 0x6f, 0x6b, 0x26, 0x49, 0x76, 0x16, 0x1d, 0x80, 0x9, 0x17, 0x88, 0xee, 0x9d, 0x26, 0x2f, 0x14, 0x7a, 0x35, 0xfc}}, - testcase{ - msg: []byte{0x6a, 0x1, 0x83, 0xa, 0xf3, 0x88, 0x9a, 0x25, 0x18, 0x32, 0x44, 0xde, 0xcb, 0x50, 0x8b, 0xd0, 0x12, 0x53, 0xd5, 0xb5, 0x8, 0xab, 0x49, 0xd, 0x31, 0x24, 0xaf, 0xbf, 0x42, 0x62, 0x6b, 0x2e, 0x70, 0x89, 0x4e, 0x9b, 0x56, 0x2b, 0x28, 0x8d, 0xa, 0x24, 0x50, 0xcf, 0xac, 0xf1, 0x4a, 0xd, 0xda, 0xe5, 0xc0, 0x47, 0x16, 0xe5, 0xa0, 0x8, 0x2c, 0x33, 0x98, 0x1f, 0x60, 0x37, 0xd2, 0x3d, 0x5e, 0x4, 0x5e, 0xe1, 0xef, 0x22, 0x83, 0xfb, 0x8b, 0x63, 0x78, 0xa9, 0x14, 0xc5, 0xd9, 0x44, 0x16, 0x27, 0xa7, 0x22, 0xc2, 0x82, 0xff, 0x45, 0x2e, 0x25, 0xa7, 0xea, 0x60, 0x8d, 0x69, 0xce, 0xe4, 0x39, 0x3a, 0x7, 0x25, 0xd1, 0x79, 0x63, 0xd0, 0x34, 0x26, 0x84, 0xf2, 0x55, 0x49, 0x6d, 0x8a, 0x18, 0xc2, 0x96, 0x11, 0x45, 0x31, 0x51, 0x30, 0x54, 0x93, 0x11, 0xfc, 0x7, 0xf0, 0x31, 0x2f, 0xb7, 0x8e, 0x60, 0x77, 0x33, 0x4f, 0x87, 0xea, 0xa8, 0x73, 0xbe, 0xe8, 0xaa, 0x95, 0x69, 0x89, 0x96, 0xeb, 0x21, 0x37, 0x5e, 0xb2, 0xb4, 0xef, 0x53, 0xc1, 0x44, 0x1, 0x20, 0x7d, 0xeb, 0x45, 0x68, 0x39, 0x8e, 0x5d, 0xd9, 0xa7, 0xcf, 0x97, 0xe8, 0xc9, 0x66, 0x3e, 0x23, 0x33, 0x4b, 0x46, 0x91, 0x2f, 0x83, 0x44, 0xc1, 0x9e, 0xfc, 0xf8, 0xc2, 0xba, 0x6f, 0x4, 0x32, 0x5f, 0x1a, 0x27, 0xe0, 0x62, 0xb6, 0x2a, 0x58, 0xd0, 0x76, 0x6f, 0xc6, 0xdb, 0x4d, 0x2c, 0x6a, 0x19, 0x28, 0x60, 0x4b, 0x1, 0x75, 0xd8, 0x72, 0xd1, 0x6b, 0x79, 0x8, 0xeb, 0xc0, 0x41, 0x76, 0x11, 0x87, 0xcc, 0x78, 0x55, 0x26, 0xc2, 0xa3, 0x87, 0x3f, 0xea, 0xc3, 0xa6, 0x42, 0xbb, 0x39, 0xf5, 0x35, 0x15, 0x50, 0xaf, 0x97, 0x70, 0xc3, 0x28, 0xaf, 0x7b}, - output224: []byte{0xf4, 0x50, 0x34, 0xaa, 0x94, 0xc1, 0xa2, 0x68, 0x6e, 0xb8, 0x49, 0xef, 0x42, 0x62, 0xf2, 0xf5, 0xba, 0x9a, 0xcd, 0xd0, 0xe8, 0xea, 0x32, 0x40, 0x1e, 0x6, 0xb, 0x43}, - output256: []byte{0x9, 0xed, 0xc4, 0x65, 0xd4, 0xfd, 0x91, 0xc5, 0xe8, 0x6b, 0x29, 0x2f, 0x4, 0x1b, 0xcc, 0x17, 0x57, 0x1e, 0x1f, 0x2e, 0x17, 0xd5, 0x84, 0xdf, 0xf2, 0x1d, 0xd7, 0xdd, 0x8d, 0x8b, 0xff, 0x35}, - output384: []byte{0x35, 0x72, 0x58, 0xfa, 0x65, 0x79, 0x86, 0x7c, 0xc0, 0x8, 0x9c, 0x8b, 0x3c, 0x93, 0xce, 0x10, 0x67, 0x7a, 0x5a, 0xd4, 0xdb, 0xee, 0xe2, 0xa2, 0x7c, 0xea, 0x90, 0x31, 0x7a, 0xce, 0xbe, 0x72, 0x54, 0x50, 0x54, 0x68, 0x87, 0x5b, 0xcb, 0x33, 0x4e, 0xb, 0x6f, 0x70, 0xcf, 0xe5, 0x90, 0x82}, - output512: []byte{0x29, 0x3c, 0x55, 0x1e, 0x75, 0x3b, 0xba, 0x7f, 0x31, 0x4d, 0xcb, 0x93, 0xa0, 0xfa, 0xd9, 0x4f, 0x3f, 0x5d, 0xee, 0x6e, 0xd4, 0x5d, 0x76, 0x5a, 0x70, 0x8e, 0x6f, 0xd2, 0x77, 0x60, 0x1f, 0x3, 0xf6, 0xc9, 0x5, 0xd7, 0xe1, 0xea, 0xea, 0xec, 0x51, 0x3c, 0xbb, 0xbd, 0x67, 0x2b, 0x81, 0x7f, 0x6d, 0x60, 0xfb, 0xf0, 0x2c, 0x20, 0x16, 0x7d, 0x7f, 0x4b, 0x7b, 0x84, 0xaf, 0xee, 0xb3, 0xf6}}, - testcase{ - msg: []byte{0xb3, 0xc5, 0xe7, 0x4b, 0x69, 0x93, 0x3c, 0x25, 0x33, 0x10, 0x6c, 0x56, 0x3b, 0x4c, 0xa2, 0x2, 0x38, 0xf2, 0xb6, 0xe6, 0x75, 0xe8, 0x68, 0x1e, 0x34, 0xa3, 0x89, 0x89, 0x47, 0x85, 0xbd, 0xad, 0xe5, 0x96, 0x52, 0xd4, 0xa7, 0x3d, 0x80, 0xa5, 0xc8, 0x5b, 0xd4, 0x54, 0xfd, 0x1e, 0x9f, 0xfd, 0xad, 0x1c, 0x38, 0x15, 0xf5, 0x3, 0x8e, 0x9e, 0xf4, 0x32, 0xaa, 0xc5, 0xc3, 0xc4, 0xfe, 0x84, 0xc, 0xc3, 0x70, 0xcf, 0x86, 0x58, 0xa, 0x60, 0x11, 0x77, 0x8b, 0xbe, 0xda, 0xf5, 0x11, 0xa5, 0x1b, 0x56, 0xd1, 0xa2, 0xeb, 0x68, 0x39, 0x4a, 0xa2, 0x99, 0xe2, 0x6d, 0xa9, 0xad, 0xa6, 0xa2, 0xf3, 0x9b, 0x9f, 0xaf, 0xf7, 0xfb, 0xa4, 0x57, 0x68, 0x9b, 0x9c, 0x1a, 0x57, 0x7b, 0x2a, 0x1e, 0x50, 0x5f, 0xdf, 0x75, 0xc7, 0xa0, 0xa6, 0x4b, 0x1d, 0xf8, 0x1b, 0x3a, 0x35, 0x60, 0x1, 0xbf, 0xd, 0xf4, 0xe0, 0x2a, 0x1f, 0xc5, 0x9f, 0x65, 0x1c, 0x9d, 0x58, 0x5e, 0xc6, 0x22, 0x4b, 0xb2, 0x79, 0xc6, 0xbe, 0xba, 0x29, 0x66, 0xe8, 0x88, 0x2d, 0x68, 0x37, 0x60, 0x81, 0xb9, 0x87, 0x46, 0x8e, 0x7a, 0xed, 0x1e, 0xf9, 0xe, 0xbd, 0x9, 0xa, 0xe8, 0x25, 0x79, 0x5c, 0xdc, 0xa1, 0xb4, 0xf0, 0x9a, 0x97, 0x9c, 0x8d, 0xfc, 0x21, 0xa4, 0x8d, 0x8a, 0x53, 0xcd, 0xbb, 0x26, 0xc4, 0xdb, 0x54, 0x7f, 0xc0, 0x6e, 0xfe, 0x2f, 0x98, 0x50, 0xed, 0xd2, 0x68, 0x5a, 0x46, 0x61, 0xcb, 0x49, 0x11, 0xf1, 0x65, 0xd4, 0xb6, 0x3e, 0xf2, 0x5b, 0x87, 0xd0, 0xa9, 0x6d, 0x3d, 0xff, 0x6a, 0xb0, 0x75, 0x89, 0x99, 0xaa, 0xd2, 0x14, 0xd0, 0x7b, 0xd4, 0xf1, 0x33, 0xa6, 0x73, 0x4f, 0xde, 0x44, 0x5f, 0xe4, 0x74, 0x71, 0x1b, 0x69, 0xa9, 0x8f, 0x7e, 0x2b}, - output224: []byte{0x62, 0x15, 0x3f, 0x59, 0x2c, 0x49, 0xd3, 0xc0, 0x48, 0x5f, 0x80, 0x7, 0x33, 0x19, 0x4, 0x9a, 0x51, 0xc, 0x73, 0x3, 0x27, 0x94, 0xc, 0xd9, 0xd5, 0x2f, 0x36, 0x98}, - output256: []byte{0xc6, 0xd8, 0x6c, 0xc4, 0xcc, 0xef, 0x3b, 0xb7, 0xb, 0xf7, 0xbf, 0xdd, 0xec, 0x6a, 0x9a, 0x4, 0xa0, 0xdd, 0xa, 0x68, 0xfe, 0x1b, 0xf5, 0x1c, 0x14, 0x64, 0x8c, 0xf5, 0x6, 0xa0, 0x3e, 0x98}, - output384: []byte{0x6, 0xe9, 0xf8, 0x92, 0xa2, 0x71, 0x6d, 0xe1, 0x8d, 0xac, 0x1b, 0x89, 0x46, 0x60, 0x44, 0x73, 0xad, 0xe0, 0x60, 0xaf, 0xc8, 0xcb, 0x12, 0x87, 0xe3, 0x89, 0x99, 0x40, 0x76, 0xff, 0x92, 0xb4, 0xba, 0xe3, 0xd8, 0x48, 0x54, 0x47, 0xe, 0xd0, 0x61, 0xae, 0x31, 0xa9, 0x7b, 0x7d, 0xd, 0xcf}, - output512: []byte{0x89, 0xfe, 0x63, 0x14, 0xa0, 0x24, 0x6e, 0xff, 0x3b, 0xfd, 0x7, 0xa9, 0x5f, 0xe2, 0x39, 0xbd, 0x50, 0x71, 0x46, 0x7f, 0x53, 0x79, 0x91, 0x75, 0xb2, 0x26, 0xda, 0xf6, 0xc3, 0xdb, 0x61, 0x8c, 0xad, 0x4c, 0xa1, 0xc1, 0xaf, 0x64, 0xbf, 0x57, 0x93, 0xf0, 0x32, 0x54, 0xf5, 0x60, 0xe6, 0x33, 0x5b, 0xea, 0xaa, 0x86, 0xbc, 0xb9, 0xe9, 0x61, 0xf2, 0x14, 0xb2, 0xae, 0x97, 0xb4, 0x7a, 0xf0}}, - testcase{ - msg: []byte{0x83, 0xaf, 0x34, 0x27, 0x9c, 0xcb, 0x54, 0x30, 0xfe, 0xbe, 0xc0, 0x7a, 0x81, 0x95, 0xd, 0x30, 0xf4, 0xb6, 0x6f, 0x48, 0x48, 0x26, 0xaf, 0xee, 0x74, 0x56, 0xf0, 0x7, 0x1a, 0x51, 0xe1, 0xbb, 0xc5, 0x55, 0x70, 0xb5, 0xcc, 0x7e, 0xc6, 0xf9, 0x30, 0x9c, 0x17, 0xbf, 0x5b, 0xef, 0xdd, 0x7c, 0x6b, 0xa6, 0xe9, 0x68, 0xcf, 0x21, 0x8a, 0x2b, 0x34, 0xbd, 0x5c, 0xf9, 0x27, 0xab, 0x84, 0x6e, 0x38, 0xa4, 0xb, 0xbd, 0x81, 0x75, 0x9e, 0x9e, 0x33, 0x38, 0x10, 0x16, 0xa7, 0x55, 0xf6, 0x99, 0xdf, 0x35, 0xd6, 0x60, 0x0, 0x7b, 0x5e, 0xad, 0xf2, 0x92, 0xfe, 0xef, 0xb7, 0x35, 0x20, 0x7e, 0xbf, 0x70, 0xb5, 0xbd, 0x17, 0x83, 0x4f, 0x7b, 0xfa, 0xe, 0x16, 0xcb, 0x21, 0x9a, 0xd4, 0xaf, 0x52, 0x4a, 0xb1, 0xea, 0x37, 0x33, 0x4a, 0xa6, 0x64, 0x35, 0xe5, 0xd3, 0x97, 0xfc, 0xa, 0x6, 0x5c, 0x41, 0x1e, 0xbb, 0xce, 0x32, 0xc2, 0x40, 0xb9, 0x4, 0x76, 0xd3, 0x7, 0xce, 0x80, 0x2e, 0xc8, 0x2c, 0x1c, 0x49, 0xbc, 0x1b, 0xec, 0x48, 0xc0, 0x67, 0x5e, 0xc2, 0xa6, 0xc6, 0xf3, 0xed, 0x3e, 0x5b, 0x74, 0x1d, 0x13, 0x43, 0x70, 0x95, 0x70, 0x7c, 0x56, 0x5e, 0x10, 0xd8, 0xa2, 0xb, 0x8c, 0x20, 0x46, 0x8f, 0xf9, 0x51, 0x4f, 0xcf, 0x31, 0xb4, 0x24, 0x9c, 0xd8, 0x2d, 0xce, 0xe5, 0x8c, 0xa, 0x2a, 0xf5, 0x38, 0xb2, 0x91, 0xa8, 0x7e, 0x33, 0x90, 0xd7, 0x37, 0x19, 0x1a, 0x7, 0x48, 0x4a, 0x5d, 0x3f, 0x3f, 0xb8, 0xc8, 0xf1, 0x5c, 0xe0, 0x56, 0xe5, 0xe5, 0xf8, 0xfe, 0xbe, 0x5e, 0x1f, 0xb5, 0x9d, 0x67, 0x40, 0x98, 0xa, 0xa0, 0x6c, 0xa8, 0xa0, 0xc2, 0xf, 0x57, 0x12, 0xb4, 0xcd, 0xe5, 0xd0, 0x32, 0xe9, 0x2a, 0xb8, 0x9f, 0xa, 0xe1}, - output224: []byte{0xec, 0xde, 0x4d, 0x6e, 0xb0, 0xcf, 0x28, 0x1, 0xb, 0x45, 0xd0, 0xd3, 0x10, 0xe7, 0xd0, 0x5f, 0x8, 0xb8, 0xa, 0xfc, 0x44, 0xb8, 0xa3, 0x59, 0xbe, 0x7e, 0x19, 0x23}, - output256: []byte{0x1a, 0xfc, 0x9b, 0xa6, 0x3e, 0xea, 0x27, 0x60, 0x3b, 0x3a, 0x7a, 0x55, 0x62, 0xe1, 0x2b, 0x31, 0xe8, 0xfe, 0x9a, 0x96, 0x81, 0x2b, 0x53, 0x1e, 0x9d, 0x4, 0x83, 0x85, 0xfb, 0x76, 0xd4, 0x4f}, - output384: []byte{0x64, 0x4, 0x77, 0x90, 0xb1, 0x65, 0x6e, 0x78, 0x95, 0x3b, 0x98, 0x1b, 0x1b, 0xbf, 0xae, 0xaf, 0x9d, 0x2b, 0x1b, 0x89, 0x53, 0xab, 0x3, 0x4, 0x79, 0x12, 0x38, 0x39, 0x3f, 0x33, 0x72, 0xc6, 0x37, 0x3a, 0x1e, 0x8, 0x7b, 0x57, 0xbe, 0x48, 0x80, 0x62, 0x29, 0xdb, 0x73, 0xe1, 0xb1, 0xa4}, - output512: []byte{0x76, 0x90, 0xf7, 0x3, 0xe8, 0x94, 0xee, 0x22, 0xd4, 0xdf, 0xf5, 0x5a, 0x7f, 0x8d, 0x50, 0x21, 0xd5, 0xf1, 0x7b, 0x72, 0x9f, 0x95, 0xa5, 0x9c, 0x4d, 0x55, 0xcf, 0xb2, 0x25, 0xc6, 0x7b, 0xe1, 0x5, 0xf2, 0xe7, 0xcd, 0xf5, 0x6d, 0x14, 0xe, 0x56, 0x66, 0x48, 0xe9, 0xe9, 0xc3, 0x9b, 0xbe, 0xd9, 0x6f, 0x98, 0x5a, 0x6d, 0xae, 0x1f, 0x21, 0xd8, 0xba, 0x50, 0xf, 0x7f, 0xd4, 0xe, 0xdf}}, - testcase{ - msg: []byte{0xa7, 0xed, 0x84, 0x74, 0x9c, 0xcc, 0x56, 0xbb, 0x1d, 0xfb, 0xa5, 0x71, 0x19, 0xd2, 0x79, 0xd4, 0x12, 0xb8, 0xa9, 0x86, 0x88, 0x6d, 0x81, 0xf, 0x6, 0x7a, 0xf3, 0x49, 0xe8, 0x74, 0x9e, 0x9e, 0xa7, 0x46, 0xa6, 0xb, 0x3, 0x74, 0x26, 0x36, 0xc4, 0x64, 0xfc, 0x1e, 0xe2, 0x33, 0xac, 0xc5, 0x2c, 0x19, 0x83, 0x91, 0x46, 0x92, 0xb6, 0x43, 0x9, 0xed, 0xfd, 0xf2, 0x9f, 0x1a, 0xb9, 0x12, 0xec, 0x3e, 0x8d, 0xa0, 0x74, 0xd3, 0xf1, 0xd2, 0x31, 0x51, 0x1f, 0x57, 0x56, 0xf0, 0xb6, 0xee, 0xad, 0x3e, 0x89, 0xa6, 0xa8, 0x8f, 0xe3, 0x30, 0xa1, 0xf, 0xac, 0xe2, 0x67, 0xbf, 0xfb, 0xfc, 0x3e, 0x30, 0x90, 0xc7, 0xfd, 0x9a, 0x85, 0x5, 0x61, 0xf3, 0x63, 0xad, 0x75, 0xea, 0x88, 0x1e, 0x72, 0x44, 0xf8, 0xf, 0xf5, 0x58, 0x2, 0xd5, 0xef, 0x7a, 0x1a, 0x4e, 0x7b, 0x89, 0xfc, 0xfa, 0x80, 0xf1, 0x6d, 0xf5, 0x4d, 0x1b, 0x5, 0x6e, 0xe6, 0x37, 0xe6, 0x96, 0x4b, 0x9e, 0xf, 0xfd, 0x15, 0xb6, 0x19, 0x6b, 0xdd, 0x7d, 0xb2, 0x70, 0xc5, 0x6b, 0x47, 0x25, 0x14, 0x85, 0x34, 0x8e, 0x49, 0x81, 0x3b, 0x4e, 0xb9, 0xed, 0x12, 0x2a, 0x1, 0xb3, 0xea, 0x45, 0xad, 0x5e, 0x1a, 0x92, 0x9d, 0xf6, 0x1d, 0x5c, 0xf, 0x3e, 0x77, 0xe1, 0xfd, 0xc3, 0x56, 0xb6, 0x38, 0x83, 0xa6, 0xe, 0x9c, 0xbb, 0x9f, 0xc3, 0xe0, 0xc, 0x2f, 0x32, 0xdb, 0xd4, 0x69, 0x65, 0x98, 0x83, 0xf6, 0x90, 0xc6, 0x77, 0x2e, 0x33, 0x5f, 0x61, 0x7b, 0xc3, 0x3f, 0x16, 0x1d, 0x6f, 0x69, 0x84, 0x25, 0x2e, 0xe1, 0x2e, 0x62, 0xb6, 0x0, 0xa, 0xc5, 0x23, 0x1e, 0xc, 0x9b, 0xc6, 0x5b, 0xe2, 0x23, 0xd8, 0xdf, 0xd9, 0x4c, 0x50, 0x4, 0xa1, 0x1, 0xaf, 0x9f, 0xd6, 0xc0, 0xfb}, - output224: []byte{0x3b, 0xfc, 0x50, 0x18, 0xcf, 0x15, 0xcb, 0x88, 0x0, 0x79, 0x29, 0x92, 0x4b, 0x3e, 0x1, 0x46, 0x35, 0xef, 0x13, 0x5c, 0x91, 0xf9, 0x67, 0x1b, 0x29, 0xbe, 0x87, 0x31}, - output256: []byte{0x9b, 0x5e, 0x15, 0x53, 0x13, 0x85, 0xf0, 0xd4, 0x95, 0xfd, 0xbe, 0x68, 0x6e, 0x3e, 0x2, 0xec, 0xa4, 0x2b, 0x9f, 0x1b, 0x1c, 0xe8, 0x83, 0x7a, 0xd3, 0xb3, 0xe4, 0x2e, 0x61, 0x98, 0x5, 0xa}, - output384: []byte{0x9c, 0xa6, 0xf3, 0x90, 0x87, 0xe6, 0x45, 0x7e, 0x12, 0xc9, 0x69, 0xd4, 0x1c, 0x8b, 0xd6, 0x6b, 0xdd, 0x69, 0x90, 0xce, 0x23, 0xd3, 0x55, 0x66, 0x9e, 0x76, 0x6, 0xb9, 0x20, 0x3d, 0x21, 0x68, 0x11, 0x23, 0x79, 0x55, 0xdf, 0x67, 0x39, 0x49, 0x5d, 0x94, 0xf0, 0xc4, 0x8c, 0xe0, 0x28, 0x45}, - output512: []byte{0x65, 0xe4, 0x15, 0xc7, 0x95, 0x8a, 0x47, 0xfc, 0xa9, 0xee, 0xd3, 0x84, 0x6f, 0xd1, 0x28, 0x3a, 0xfe, 0xb3, 0x8e, 0x51, 0x30, 0xf5, 0x7e, 0xcd, 0x99, 0xdc, 0xb2, 0x1b, 0xed, 0xda, 0x85, 0x6e, 0x3b, 0x5f, 0xb9, 0xf8, 0x39, 0xe5, 0x79, 0xc5, 0xea, 0x38, 0x6e, 0xac, 0xa8, 0xcd, 0xc0, 0xa9, 0x54, 0x9e, 0xaa, 0xf6, 0xec, 0x45, 0x2d, 0xd6, 0xcb, 0x52, 0x12, 0xb7, 0x9, 0xbf, 0x5c, 0x59}}, - testcase{ - msg: []byte{0xa6, 0xfe, 0x30, 0xdc, 0xfc, 0xda, 0x1a, 0x32, 0x9e, 0x82, 0xab, 0x50, 0xe3, 0x2b, 0x5f, 0x50, 0xeb, 0x25, 0xc8, 0x73, 0xc5, 0xd2, 0x30, 0x58, 0x60, 0xa8, 0x35, 0xae, 0xce, 0xe6, 0x26, 0x4a, 0xa3, 0x6a, 0x47, 0x42, 0x99, 0x22, 0xc4, 0xb8, 0xb3, 0xaf, 0xd0, 0xd, 0xa1, 0x60, 0x35, 0x83, 0xe, 0xdb, 0x89, 0x78, 0x31, 0xc4, 0xe7, 0xb0, 0xf, 0x2c, 0x23, 0xfc, 0xb, 0x15, 0xfd, 0xc3, 0xd, 0x85, 0xfb, 0x70, 0xc3, 0xc, 0x43, 0x1c, 0x63, 0x8e, 0x1a, 0x25, 0xb5, 0x1c, 0xaf, 0x1d, 0x7e, 0x8b, 0x5, 0xb, 0x7f, 0x89, 0xbf, 0xb3, 0xf, 0x59, 0xf0, 0xf2, 0xf, 0xec, 0xff, 0x3d, 0x63, 0x9a, 0xbc, 0x42, 0x55, 0xb3, 0x86, 0x8f, 0xc4, 0x5d, 0xd8, 0x1e, 0x47, 0xeb, 0x12, 0xab, 0x40, 0xf2, 0xaa, 0xc7, 0x35, 0xdf, 0x5d, 0x1d, 0xc1, 0xad, 0x99, 0x7c, 0xef, 0xc4, 0xd8, 0x36, 0xb8, 0x54, 0xce, 0xe9, 0xac, 0x2, 0x90, 0x0, 0x36, 0xf3, 0x86, 0x7f, 0xe0, 0xd8, 0x4a, 0xff, 0xf3, 0x7b, 0xde, 0x33, 0x8, 0xc2, 0x20, 0x6c, 0x62, 0xc4, 0x74, 0x33, 0x75, 0x9, 0x41, 0x8, 0x87, 0x7c, 0x73, 0xb8, 0x7b, 0x25, 0x46, 0xfe, 0x5, 0xea, 0x13, 0x7b, 0xed, 0xfc, 0x6, 0xa2, 0x79, 0x62, 0x74, 0x9, 0x9a, 0xd, 0x55, 0x4d, 0xa8, 0xf7, 0xd7, 0x22, 0x3a, 0x48, 0xcb, 0xf3, 0x1b, 0x7d, 0xec, 0xaa, 0x1e, 0xbc, 0x8b, 0x14, 0x57, 0x63, 0xe3, 0x67, 0x31, 0x68, 0xc1, 0xb1, 0xb7, 0x15, 0xc1, 0xcd, 0x99, 0xec, 0xd3, 0xdd, 0xb2, 0x38, 0xb0, 0x60, 0x49, 0x88, 0x5e, 0xca, 0xd9, 0x34, 0x7c, 0x24, 0x36, 0xdf, 0xf3, 0x2c, 0x77, 0x1f, 0x34, 0xa3, 0x85, 0x87, 0xa4, 0x4a, 0x82, 0xc5, 0xd3, 0xd1, 0x37, 0xa0, 0x3c, 0xaa, 0x27, 0xe6, 0x6c, 0x8f, 0xf6}, - output224: []byte{0x22, 0x71, 0x55, 0x59, 0xad, 0x15, 0x71, 0x77, 0x22, 0xb1, 0xfa, 0x5, 0x83, 0x99, 0x60, 0x90, 0xc7, 0x9c, 0x3d, 0xf1, 0x6c, 0xc1, 0xe6, 0xe0, 0xf6, 0xd3, 0xe8, 0x98}, - output256: []byte{0x21, 0x6f, 0xc3, 0x25, 0xf9, 0x42, 0xee, 0xd0, 0x84, 0x1, 0x52, 0x7a, 0x8f, 0x41, 0xc0, 0x88, 0x52, 0x7c, 0x64, 0x79, 0x34, 0x26, 0x22, 0xc9, 0x7, 0xea, 0x8, 0xff, 0x32, 0x90, 0xf8, 0xc6}, - output384: []byte{0xfe, 0x99, 0xf1, 0x9c, 0x79, 0xa8, 0x90, 0x80, 0xe2, 0xff, 0x90, 0x98, 0x1d, 0xde, 0x91, 0x99, 0x45, 0x42, 0xd4, 0xbc, 0xc1, 0x27, 0x6a, 0x82, 0xd1, 0xa2, 0xe5, 0x38, 0x50, 0x34, 0x1b, 0x9a, 0xd5, 0x42, 0x2c, 0xea, 0xb8, 0x1e, 0x69, 0xda, 0xe5, 0xe9, 0x1d, 0xc5, 0xff, 0x60, 0xe1, 0xa3}, - output512: []byte{0xd6, 0x54, 0x2a, 0x2f, 0x6, 0x54, 0xb9, 0xb8, 0x74, 0xa6, 0x27, 0xd3, 0xd5, 0x37, 0x64, 0xa6, 0x5b, 0x1d, 0xf2, 0xc0, 0xce, 0xc3, 0xbc, 0xd0, 0xb4, 0xb0, 0x88, 0xfa, 0xa1, 0x9, 0x5e, 0x54, 0xf1, 0x79, 0x97, 0x57, 0xc4, 0x37, 0x1f, 0x8d, 0x54, 0x4e, 0x29, 0x8d, 0x60, 0xe, 0x21, 0xe1, 0x1b, 0x2f, 0x90, 0xd2, 0x95, 0x71, 0x26, 0x21, 0x23, 0x1a, 0x9, 0xc5, 0x8b, 0x5, 0xa7, 0x4}}, - testcase{ - msg: []byte{0x83, 0x16, 0x7f, 0xf5, 0x37, 0x4, 0xc3, 0xaa, 0x19, 0xe9, 0xfb, 0x33, 0x3, 0x53, 0x97, 0x59, 0xc4, 0x6d, 0xd4, 0x9, 0x1a, 0x52, 0xdd, 0xae, 0x9a, 0xd8, 0x64, 0x8, 0xb6, 0x93, 0x35, 0x98, 0x9e, 0x61, 0x41, 0x4b, 0xc2, 0xa, 0xb4, 0xd0, 0x12, 0x20, 0xe3, 0x52, 0x41, 0xef, 0xf5, 0xc9, 0x52, 0x2b, 0x7, 0x9f, 0xba, 0x59, 0x76, 0x74, 0xc8, 0xd7, 0x16, 0xfe, 0x44, 0x1e, 0x56, 0x61, 0x10, 0xb6, 0x21, 0x15, 0x31, 0xce, 0xcc, 0xf8, 0xfd, 0x6, 0xbc, 0x8e, 0x51, 0x1d, 0x0, 0x78, 0x5e, 0x57, 0x78, 0x8e, 0xd9, 0xa1, 0xc5, 0xc7, 0x35, 0x24, 0xf0, 0x18, 0x30, 0xd2, 0xe1, 0x14, 0x8c, 0x92, 0xd0, 0xed, 0xc9, 0x71, 0x13, 0xe3, 0xb7, 0xb5, 0xcd, 0x30, 0x49, 0x62, 0x7a, 0xbd, 0xb8, 0xb3, 0x9d, 0xd4, 0xd6, 0x89, 0xe, 0xe, 0xe9, 0x19, 0x93, 0xf9, 0x2b, 0x3, 0x35, 0x4a, 0x88, 0xf5, 0x22, 0x51, 0xc5, 0x46, 0xe6, 0x44, 0x34, 0xd9, 0xc3, 0xd7, 0x45, 0x44, 0xf2, 0x3f, 0xb9, 0x3e, 0x5a, 0x2d, 0x2f, 0x1f, 0xb1, 0x55, 0x45, 0xb4, 0xe1, 0x36, 0x7c, 0x97, 0x33, 0x5b, 0x2, 0x91, 0x94, 0x4c, 0x8b, 0x73, 0xa, 0xd3, 0xd4, 0x78, 0x92, 0x73, 0xfa, 0x44, 0xfb, 0x98, 0xd7, 0x8a, 0x36, 0xc3, 0xc3, 0x76, 0x4a, 0xbe, 0xea, 0xc7, 0xc5, 0x69, 0xc1, 0xe4, 0x3a, 0x35, 0x2e, 0x5b, 0x77, 0xc, 0x35, 0x4, 0xf8, 0x70, 0x90, 0xde, 0xe0, 0x75, 0xa1, 0xc4, 0xc8, 0x5c, 0xc, 0x39, 0xcf, 0x42, 0x1b, 0xdc, 0xc6, 0x15, 0xf9, 0xef, 0xf6, 0xcb, 0x4f, 0xe6, 0x46, 0x80, 0x4, 0xae, 0xce, 0x5f, 0x30, 0xe1, 0xec, 0xc6, 0xdb, 0x22, 0xad, 0x99, 0x39, 0xbb, 0x2b, 0xc, 0xcc, 0x96, 0x52, 0x1d, 0xfb, 0xf4, 0xae, 0x0, 0x8b, 0x5b, 0x46, 0xbc, 0x0, 0x6e}, - output224: []byte{0x2f, 0x36, 0xff, 0x8a, 0xb7, 0x26, 0x4f, 0x7a, 0x57, 0x66, 0xde, 0x2, 0x50, 0x18, 0xe1, 0x9b, 0x5a, 0x64, 0xd9, 0x9, 0x94, 0xb7, 0x43, 0xb8, 0xfb, 0xfb, 0xdc, 0xca}, - output256: []byte{0x43, 0x18, 0x4b, 0x9f, 0x2d, 0xb5, 0xb6, 0xda, 0x51, 0x60, 0xbc, 0x25, 0x5d, 0xbe, 0x19, 0xa0, 0xc9, 0x45, 0x33, 0xb8, 0x84, 0x80, 0x98, 0x15, 0xb7, 0xb3, 0x26, 0xd8, 0x68, 0x58, 0x9e, 0xdc}, - output384: []byte{0x92, 0xe1, 0xd9, 0x94, 0xfe, 0xa2, 0xfd, 0x50, 0xa, 0x4b, 0x7f, 0x51, 0x39, 0x11, 0x90, 0x58, 0xa5, 0xb7, 0xe, 0xf6, 0x17, 0x4e, 0x55, 0x3f, 0x12, 0xfe, 0x7b, 0xcf, 0xca, 0x24, 0xb0, 0xa, 0x28, 0x39, 0x1e, 0x37, 0x61, 0xbd, 0xcb, 0xa3, 0xfd, 0x6b, 0x3, 0x3c, 0x12, 0x86, 0xe2, 0x8e}, - output512: []byte{0xec, 0x98, 0x3e, 0x78, 0x76, 0x28, 0xb9, 0x4c, 0x87, 0xff, 0xf8, 0xd5, 0x7d, 0x2d, 0x5, 0x86, 0x67, 0xd1, 0x2f, 0x5a, 0xf4, 0x58, 0xbc, 0xe7, 0x9b, 0xb7, 0x84, 0x4f, 0xb4, 0x1d, 0x9c, 0x55, 0x92, 0xf, 0x59, 0x3c, 0x8d, 0x87, 0x30, 0xeb, 0x8d, 0x54, 0xff, 0x1d, 0x51, 0xcd, 0x8a, 0xd2, 0xf1, 0xc2, 0xa0, 0xf7, 0xd6, 0xb2, 0x99, 0xa2, 0x12, 0x66, 0x74, 0x4e, 0x47, 0xd1, 0x42, 0xb2}}, - testcase{ - msg: []byte{0x3a, 0x3a, 0x81, 0x9c, 0x48, 0xef, 0xde, 0x2a, 0xd9, 0x14, 0xfb, 0xf0, 0xe, 0x18, 0xab, 0x6b, 0xc4, 0xf1, 0x45, 0x13, 0xab, 0x27, 0xd0, 0xc1, 0x78, 0xa1, 0x88, 0xb6, 0x14, 0x31, 0xe7, 0xf5, 0x62, 0x3c, 0xb6, 0x6b, 0x23, 0x34, 0x67, 0x75, 0xd3, 0x86, 0xb5, 0xe, 0x98, 0x2c, 0x49, 0x3a, 0xdb, 0xbf, 0xc5, 0x4b, 0x9a, 0x3c, 0xd3, 0x83, 0x38, 0x23, 0x36, 0xa1, 0xa0, 0xb2, 0x15, 0xa, 0x15, 0x35, 0x8f, 0x33, 0x6d, 0x3, 0xae, 0x18, 0xf6, 0x66, 0xc7, 0x57, 0x3d, 0x55, 0xc4, 0xfd, 0x18, 0x1c, 0x29, 0xe6, 0xcc, 0xfd, 0xe6, 0x3e, 0xa3, 0x5f, 0xa, 0xdf, 0x58, 0x85, 0xcf, 0xc0, 0xa3, 0xd8, 0x4a, 0x2b, 0x2e, 0x4d, 0xd2, 0x44, 0x96, 0xdb, 0x78, 0x9e, 0x66, 0x31, 0x70, 0xce, 0xf7, 0x47, 0x98, 0xaa, 0x1b, 0xbc, 0xd4, 0x57, 0x4e, 0xa0, 0xbb, 0xa4, 0x4, 0x89, 0xd7, 0x64, 0xb2, 0xf8, 0x3a, 0xad, 0xc6, 0x6b, 0x14, 0x8b, 0x4a, 0xc, 0xd9, 0x52, 0x46, 0xc1, 0x27, 0xd5, 0x87, 0x1c, 0x4f, 0x11, 0x41, 0x86, 0x90, 0xa5, 0xdd, 0xf0, 0x12, 0x46, 0xa0, 0xc8, 0xa, 0x43, 0xc7, 0x0, 0x88, 0xb6, 0x18, 0x36, 0x39, 0xdc, 0xfd, 0xa4, 0x12, 0x5b, 0xd1, 0x13, 0xa8, 0xf4, 0x9e, 0xe2, 0x3e, 0xd3, 0x6, 0xfa, 0xac, 0x57, 0x6c, 0x3f, 0xb0, 0xc1, 0xe2, 0x56, 0x67, 0x1d, 0x81, 0x7f, 0xc2, 0x53, 0x4a, 0x52, 0xf5, 0xb4, 0x39, 0xf7, 0x2e, 0x42, 0x4d, 0xe3, 0x76, 0xf4, 0xc5, 0x65, 0xcc, 0xa8, 0x23, 0x7, 0xdd, 0x9e, 0xf7, 0x6d, 0xa5, 0xb7, 0xc4, 0xeb, 0x7e, 0x8, 0x51, 0x72, 0xe3, 0x28, 0x80, 0x7c, 0x2, 0xd0, 0x11, 0xff, 0xbf, 0x33, 0x78, 0x53, 0x78, 0xd7, 0x9d, 0xc2, 0x66, 0xf6, 0xa5, 0xbe, 0x6b, 0xb0, 0xe4, 0xa9, 0x2e, 0xce, 0xeb, 0xae, 0xb1}, - output224: []byte{0x5a, 0xf5, 0x69, 0x87, 0xea, 0x9c, 0xf1, 0x1f, 0xcd, 0xe, 0xac, 0x5e, 0xbc, 0x14, 0xb0, 0x37, 0x36, 0x5e, 0x9b, 0x11, 0x23, 0xe3, 0x1c, 0xb2, 0xdf, 0xc7, 0x92, 0x9a}, - output256: []byte{0x34, 0x8f, 0xb7, 0x74, 0xad, 0xc9, 0x70, 0xa1, 0x6b, 0x11, 0x5, 0x66, 0x94, 0x42, 0x62, 0x5e, 0x6a, 0xda, 0xa8, 0x25, 0x7a, 0x89, 0xef, 0xfd, 0xb5, 0xa8, 0x2, 0xf1, 0x61, 0xb8, 0x62, 0xea}, - output384: []byte{0x6b, 0xff, 0x1c, 0x84, 0x5, 0xa3, 0xfe, 0x59, 0x4e, 0x36, 0xe, 0x3b, 0xcc, 0xea, 0x1e, 0xbc, 0xd5, 0x9, 0x31, 0xd, 0xc7, 0x9b, 0x9e, 0x45, 0xc2, 0x63, 0x78, 0x3d, 0x7a, 0x5d, 0xd6, 0x62, 0xc6, 0x78, 0x9b, 0x18, 0xbd, 0x56, 0x7d, 0xbd, 0xda, 0x15, 0x54, 0xf5, 0xbe, 0xe6, 0xa8, 0x60}, - output512: []byte{0x81, 0x95, 0xe, 0x70, 0x96, 0xd3, 0x1d, 0x4f, 0x22, 0xe3, 0xdb, 0x71, 0xca, 0xc7, 0x25, 0xbf, 0x59, 0xe8, 0x1a, 0xf5, 0x4c, 0x7c, 0xa9, 0xe6, 0xae, 0xee, 0x71, 0xc0, 0x10, 0xfc, 0x54, 0x67, 0x46, 0x63, 0x12, 0xa0, 0x1a, 0xa5, 0xc1, 0x37, 0xcf, 0xb1, 0x40, 0x64, 0x69, 0x41, 0x55, 0x67, 0x96, 0xf6, 0x12, 0xc9, 0x35, 0x12, 0x68, 0x73, 0x7c, 0x7e, 0x9a, 0x2b, 0x96, 0x31, 0xd1, 0xfa}}, -} - -// extracted from LongMsgKAT_{224,256,384,512}.txt -var tstLong = []testcase{ - testcase{ - msg: []byte{0x72, 0x46, 0x27, 0x91, 0x6c, 0x50, 0x33, 0x86, 0x43, 0xe6, 0x99, 0x6f, 0x7, 0x87, 0x7e, 0xaf, 0xd9, 0x6b, 0xdf, 0x1, 0xda, 0x7e, 0x99, 0x1d, 0x41, 0x55, 0xb9, 0xbe, 0x12, 0x95, 0xea, 0x7d, 0x21, 0xc9, 0x39, 0x1f, 0x4c, 0x4a, 0x41, 0xc7, 0x5f, 0x77, 0xe5, 0xd2, 0x73, 0x89, 0x25, 0x33, 0x93, 0x72, 0x5f, 0x14, 0x27, 0xf5, 0x79, 0x14, 0xb2, 0x73, 0xab, 0x86, 0x2b, 0x9e, 0x31, 0xda, 0xbc, 0xe5, 0x6, 0xe5, 0x58, 0x72, 0x5, 0x20, 0xd3, 0x33, 0x52, 0xd1, 0x19, 0xf6, 0x99, 0xe7, 0x84, 0xf9, 0xe5, 0x48, 0xff, 0x91, 0xbc, 0x35, 0xca, 0x14, 0x70, 0x42, 0x12, 0x87, 0x9, 0x82, 0xd, 0x69, 0xa8, 0x28, 0x7e, 0xa3, 0x25, 0x78, 0x57, 0x61, 0x5e, 0xb0, 0x32, 0x12, 0x70, 0xe9, 0x4b, 0x84, 0xf4, 0x46, 0x94, 0x27, 0x65, 0xce, 0x88, 0x2b, 0x19, 0x1f, 0xae, 0xe7, 0xe1, 0xc8, 0x7e, 0xf, 0xb, 0xd4, 0xe0, 0xcd, 0x8a, 0x92, 0x77, 0x3, 0x52, 0x4b, 0x55, 0x9b, 0x76, 0x9c, 0xa4, 0xec, 0xe1, 0xf6, 0xdb, 0xf3, 0x13, 0xfd, 0xcf, 0x67, 0xc5, 0x72, 0xec, 0x41, 0x85, 0xc1, 0xa8, 0x8e, 0x86, 0xec, 0x11, 0xb6, 0x45, 0x4b, 0x37, 0x19, 0x80, 0x2, 0xf, 0x19, 0x63, 0x3b, 0x6b, 0x95, 0xbd, 0x28, 0xe, 0x4f, 0xbc, 0xb0, 0x16, 0x1e, 0x1a, 0x82, 0x47, 0x3, 0x20, 0xce, 0xc6, 0xec, 0xfa, 0x25, 0xac, 0x73, 0xd0, 0x9f, 0x15, 0x36, 0xf2, 0x86, 0xd3, 0xf9, 0xda, 0xca, 0xfb, 0x2c, 0xd1, 0xd0, 0xce, 0x72, 0xd6, 0x4d, 0x19, 0x7f, 0x5c, 0x75, 0x20, 0xb3, 0xcc, 0xb2, 0xfd, 0x74, 0xeb, 0x72, 0x66, 0x4b, 0xa9, 0x38, 0x53, 0xef, 0x41, 0xea, 0xbf, 0x52, 0xf0, 0x15, 0xdd, 0x59, 0x15, 0x0, 0xd0, 0x18, 0xdd, 0x16, 0x28, 0x15, 0xcc, 0x99, 0x35, 0x95, 0xb1, 0x95}, - output224: []byte{0xe9, 0xf, 0x81, 0xae, 0x86, 0xd7, 0x2d, 0xcc, 0x21, 0x90, 0xaf, 0x54, 0x5a, 0x34, 0x51, 0x50, 0xa6, 0x29, 0xee, 0x7d, 0xc7, 0x23, 0x7c, 0x19, 0x58, 0xcf, 0xcd, 0xbc}, - output256: []byte{0xea, 0xe, 0x41, 0x6c, 0xf, 0x7b, 0x4f, 0x11, 0xe3, 0xf0, 0x4, 0x79, 0xfd, 0xdf, 0x95, 0x4f, 0x25, 0x39, 0xe5, 0xe5, 0x57, 0x75, 0x3b, 0xd5, 0x46, 0xf6, 0x9e, 0xe3, 0x75, 0xa5, 0xde, 0x29}, - output384: []byte{0x86, 0xb7, 0xcc, 0x35, 0x44, 0xe5, 0xf9, 0x1f, 0x12, 0xa9, 0x10, 0xa5, 0x6a, 0xdd, 0xd6, 0xb5, 0xe7, 0xdc, 0x7d, 0xf5, 0x1f, 0xae, 0xcc, 0x2f, 0xc5, 0x15, 0xee, 0x66, 0x9b, 0x59, 0x12, 0xdd, 0x11, 0x6a, 0xa1, 0x30, 0x52, 0x56, 0x9e, 0xab, 0x59, 0x7c, 0xec, 0xa9, 0x22, 0xb1, 0xed, 0x32}, - output512: []byte{0x4e, 0x98, 0x77, 0x68, 0x46, 0x9f, 0x54, 0x62, 0x96, 0xad, 0x1a, 0x43, 0xd5, 0x4c, 0xa, 0xa, 0x6c, 0x87, 0xe7, 0xe4, 0xe2, 0x6b, 0x68, 0x66, 0x12, 0xb1, 0xe5, 0xb1, 0x55, 0x4b, 0x68, 0x9b, 0xff, 0xd5, 0x6d, 0x6a, 0x4b, 0x45, 0x4c, 0xe4, 0xa5, 0x71, 0x76, 0x25, 0xbb, 0xad, 0x32, 0x1f, 0x8d, 0x5, 0xf1, 0x9c, 0x22, 0x52, 0x59, 0x64, 0x6f, 0x21, 0x41, 0x6a, 0xa2, 0xd7, 0xc2, 0xed}}, - testcase{ - msg: []byte{0x31, 0x39, 0x84, 0xb, 0x8a, 0xd4, 0xbc, 0xd3, 0x90, 0x92, 0x91, 0x6f, 0xd9, 0xd0, 0x17, 0x98, 0xff, 0x5a, 0xa1, 0xe4, 0x8f, 0x34, 0x70, 0x2c, 0x72, 0xdf, 0xe7, 0x4b, 0x12, 0xe9, 0x8a, 0x11, 0x4e, 0x31, 0x8c, 0xdd, 0x2d, 0x47, 0xa9, 0xc3, 0x20, 0xff, 0xf9, 0x8, 0xa8, 0xdb, 0xc2, 0xa5, 0xb1, 0xd8, 0x72, 0x67, 0xc8, 0xe9, 0x83, 0x82, 0x98, 0x61, 0xa5, 0x67, 0x55, 0x8b, 0x37, 0xb2, 0x92, 0xd4, 0x57, 0x5e, 0x20, 0xd, 0xe9, 0xf1, 0xde, 0x45, 0x75, 0x5f, 0xaf, 0xf9, 0xef, 0xae, 0x34, 0x96, 0x4e, 0x43, 0x36, 0xc2, 0x59, 0xf1, 0xe6, 0x65, 0x99, 0xa7, 0xc9, 0x4, 0xec, 0x2, 0x53, 0x9f, 0x1a, 0x8e, 0xab, 0x87, 0x6, 0xe0, 0xb4, 0xf4, 0x8f, 0x72, 0xfe, 0xc2, 0x79, 0x49, 0x9, 0xee, 0x4a, 0x7b, 0x9, 0x2d, 0x60, 0x61, 0xc7, 0x44, 0x81, 0xc9, 0xe2, 0x1b, 0x93, 0x32, 0xdc, 0x7c, 0x6e, 0x48, 0x2d, 0x7f, 0x9c, 0xc3, 0x21, 0xb, 0x38, 0xa6, 0xf8, 0x8f, 0x79, 0x18, 0xc2, 0xd8, 0xc5, 0x5e, 0x64, 0xa4, 0x28, 0xce, 0x2b, 0x68, 0xfd, 0x7, 0xab, 0x57, 0x2a, 0x8b, 0xa, 0x23, 0x88, 0x66, 0x4f, 0x99, 0x48, 0x9f, 0x4, 0xeb, 0x54, 0xdf, 0x13, 0x76, 0x27, 0x18, 0x10, 0xe0, 0xe7, 0xbc, 0xe3, 0x96, 0xf5, 0x28, 0x7, 0x71, 0xe, 0xd, 0xea, 0x94, 0xeb, 0x49, 0xf4, 0xb3, 0x67, 0x27, 0x12, 0x60, 0xc3, 0x45, 0x6b, 0x98, 0x18, 0xfc, 0x7a, 0x72, 0x23, 0x4e, 0x6b, 0xf2, 0x20, 0x5f, 0xf6, 0xa3, 0x65, 0x46, 0x20, 0x50, 0x15, 0xeb, 0xd7, 0xd8, 0xc2, 0x52, 0x7a, 0xa4, 0x30, 0xf5, 0x8e, 0xe, 0x8a, 0xc9, 0x7a, 0x7b, 0x6b, 0x79, 0x3c, 0xd4, 0x3, 0xd5, 0x17, 0xd6, 0x62, 0x95, 0xf3, 0x7a, 0x34, 0xd0, 0xb7, 0xd2, 0xfa, 0x7b, 0xc3, 0x45, 0xac, 0x4, 0xca, 0x1e, 0x26, 0x64, 0x80, 0xde, 0xec, 0x39, 0xf5, 0xc8, 0x86, 0x41, 0xc9, 0xdc, 0xb, 0xd1, 0x35, 0x81, 0x58, 0xfd, 0xec, 0xdd, 0x96, 0x68, 0x5b, 0xbb, 0xb5, 0xc1, 0xfe, 0x5e, 0xa8, 0x9d, 0x2c, 0xb4, 0xa9, 0xd5, 0xd1, 0x2b, 0xb8, 0xc8, 0x93, 0x28, 0x1f, 0xf3, 0x8e, 0x87, 0xd6, 0xb4, 0x84, 0x1f, 0x6, 0x50, 0x9, 0x2d, 0x44, 0x7e, 0x1, 0x3f, 0x20, 0xea, 0x93, 0x4e, 0x18}, - output224: []byte{0xc1, 0xc8, 0xb, 0x60, 0xec, 0xbe, 0x67, 0xb7, 0xa4, 0x99, 0x40, 0xdf, 0x5e, 0x3e, 0xe7, 0xf3, 0x1c, 0x13, 0x4, 0x84, 0x4d, 0x9a, 0x33, 0x3a, 0x17, 0x29, 0x83, 0xff}, - output256: []byte{0x59, 0xe9, 0x4, 0xb2, 0xaa, 0xc, 0xcb, 0xf2, 0xa9, 0xd1, 0x27, 0x44, 0x6f, 0x11, 0x3b, 0x7c, 0xc3, 0xd0, 0x7b, 0x97, 0xe, 0x7, 0xa3, 0x22, 0x32, 0x5e, 0xce, 0xe6, 0x6a, 0xe0, 0xc9, 0xca}, - output384: []byte{0xe0, 0x10, 0xd, 0x6a, 0x2, 0x56, 0x8b, 0x24, 0x4d, 0xf7, 0xea, 0x67, 0xf2, 0x80, 0xae, 0x5d, 0x95, 0x6b, 0xe6, 0x38, 0x36, 0xb0, 0x2b, 0xbf, 0xe8, 0x87, 0x5d, 0x6d, 0xbe, 0xd1, 0x64, 0x65, 0x58, 0x2e, 0x5b, 0x4d, 0xa7, 0xa6, 0x76, 0x2, 0x50, 0x8c, 0x67, 0x9f, 0xa, 0x50, 0xea, 0x2d}, - output512: []byte{0x3d, 0x37, 0xd, 0xc8, 0x50, 0xbc, 0x7e, 0x15, 0x9c, 0xee, 0x3f, 0x24, 0xd9, 0xe9, 0x15, 0xb5, 0xb1, 0x30, 0x6f, 0xf4, 0x3, 0xc3, 0x2c, 0x7a, 0x3a, 0x38, 0x44, 0xf3, 0xfc, 0x8d, 0x90, 0xe3, 0x5f, 0x56, 0xd8, 0x3b, 0xdd, 0x9c, 0x63, 0x7b, 0xc4, 0x5e, 0x44, 0xe, 0x1f, 0x27, 0xcc, 0xd5, 0x6b, 0x6b, 0x38, 0x72, 0xec, 0x19, 0x10, 0x1b, 0xbe, 0x31, 0x84, 0x51, 0x8, 0xdc, 0xe9, 0x29}}, - testcase{ - msg: []byte{0x2, 0x3d, 0x91, 0xac, 0x53, 0x26, 0x1, 0xc7, 0xca, 0x39, 0x42, 0xd6, 0x28, 0x27, 0x56, 0x6d, 0x92, 0x68, 0xbb, 0x42, 0x76, 0xfc, 0xaa, 0x1a, 0xe9, 0x27, 0x69, 0x3a, 0x69, 0x61, 0x65, 0x26, 0x76, 0xdb, 0xa0, 0x92, 0x19, 0xa0, 0x1b, 0x3d, 0x5a, 0xdf, 0xa1, 0x25, 0x47, 0xa9, 0x46, 0xe7, 0x8f, 0x3c, 0x5c, 0x62, 0xdd, 0x88, 0xb, 0x2, 0xd2, 0xee, 0xeb, 0x4b, 0x96, 0x63, 0x65, 0x29, 0xc6, 0xb0, 0x11, 0x20, 0xb2, 0x3e, 0xfc, 0x49, 0xcc, 0xfb, 0x36, 0xb8, 0x49, 0x7c, 0xd1, 0x97, 0x67, 0xb5, 0x37, 0x10, 0xa6, 0x36, 0x68, 0x3b, 0xc5, 0xe0, 0xe5, 0xc9, 0x53, 0x4c, 0xfc, 0x0, 0x46, 0x91, 0xe8, 0x7d, 0x1b, 0xee, 0x39, 0xb8, 0x6b, 0x95, 0x35, 0x72, 0x92, 0x7b, 0xd6, 0x68, 0x62, 0xe, 0xab, 0x87, 0x83, 0x6d, 0x9f, 0x3f, 0x8f, 0x28, 0xac, 0xe4, 0x11, 0x50, 0x77, 0x6c, 0xb, 0xc6, 0x65, 0x71, 0x78, 0xeb, 0xf2, 0x97, 0xfe, 0x1f, 0x72, 0x14, 0xed, 0xd9, 0xf2, 0x15, 0xff, 0xb4, 0x91, 0xb6, 0x81, 0xb0, 0x6a, 0xc2, 0x3, 0x2d, 0x35, 0xe6, 0xfd, 0xf8, 0x32, 0xa8, 0xb0, 0x60, 0x56, 0xda, 0x70, 0xd7, 0x7f, 0x1e, 0x9b, 0x4d, 0x26, 0xae, 0x71, 0x2d, 0x85, 0x23, 0xc8, 0x6f, 0x79, 0x25, 0x7, 0x18, 0x40, 0x5f, 0x91, 0xb0, 0xa8, 0x7c, 0x72, 0x5f, 0x2d, 0x3f, 0x52, 0x8, 0x89, 0x65, 0xf8, 0x87, 0xd8, 0xcf, 0x87, 0x20, 0x6d, 0xfd, 0xe4, 0x22, 0x38, 0x6e, 0x58, 0xed, 0xda, 0x34, 0xdd, 0xe2, 0x78, 0x3b, 0x30, 0x49, 0xb8, 0x69, 0x17, 0xb4, 0x62, 0x80, 0x27, 0xa0, 0x5d, 0x4d, 0x1f, 0x42, 0x9d, 0x2b, 0x49, 0xc4, 0xb1, 0xc8, 0x98, 0xdd, 0xdc, 0xb8, 0x2f, 0x34, 0x3e, 0x14, 0x55, 0x96, 0xde, 0x11, 0xa5, 0x41, 0x82, 0xf3, 0x9f, 0x47, 0x18, 0xec, 0xae, 0x8f, 0x50, 0x6b, 0xd9, 0x73, 0x9f, 0x5c, 0xd5, 0xd5, 0x68, 0x6d, 0x7f, 0xef, 0xc8, 0x34, 0x51, 0x4c, 0xd1, 0xb2, 0xc9, 0x1c, 0x33, 0xb3, 0x81, 0xb4, 0x5e, 0x2e, 0x53, 0x35, 0xd7, 0xa8, 0x72, 0xa, 0x8f, 0x17, 0xaf, 0xc8, 0xc2, 0xcb, 0x2b, 0xd8, 0x8b, 0x14, 0xaa, 0x2d, 0xca, 0x9, 0x9b, 0x0, 0xaa, 0x57, 0x5d, 0xa, 0xc, 0xcf, 0x9, 0x9c, 0xde, 0xc4, 0x87, 0xf, 0xb7, 0x10, 0xd2, 0x68, 0xe, 0x60, 0xc4, 0x8b, 0xfc, 0x29, 0x1f, 0xf0, 0xce, 0xf2, 0xee, 0xbf, 0x9b, 0x36, 0x90, 0x2e, 0x9f, 0xba, 0x8c, 0x88, 0x9b, 0xf6, 0xb4, 0xb9, 0xf5, 0xce, 0x53, 0xa1, 0x9b, 0xd, 0x93, 0x99, 0xcd, 0x19, 0xd6, 0x1b, 0xd0, 0x8c, 0xc, 0x2e, 0xc2, 0x5e, 0x9, 0x99, 0x59, 0x84, 0x8e, 0x6a, 0x55, 0xc, 0xa7, 0x13, 0x7b, 0x63, 0xf4, 0x31, 0x38, 0xd7, 0xb6, 0x51}, - output224: []byte{0x23, 0x6, 0x20, 0xd7, 0x10, 0xcf, 0x3a, 0xb8, 0x35, 0x5, 0x9e, 0x1a, 0xa1, 0x70, 0x73, 0x5d, 0xb1, 0x7c, 0xae, 0x74, 0xb3, 0x45, 0x76, 0x5f, 0xf0, 0x2e, 0x8d, 0x89}, - output256: []byte{0x6c, 0x2a, 0x84, 0x13, 0x18, 0x6, 0x6b, 0x90, 0xa9, 0x60, 0x4d, 0xc, 0x8e, 0xcc, 0xb2, 0x98, 0x6b, 0x84, 0xa0, 0xc8, 0x67, 0x5c, 0xd2, 0x43, 0xe9, 0x69, 0x57, 0xd2, 0x6e, 0x9c, 0x1c, 0xfd}, - output384: []byte{0xae, 0x55, 0x9c, 0x73, 0x2e, 0x55, 0xc5, 0x21, 0xb7, 0x73, 0x1e, 0x9c, 0x80, 0x65, 0x93, 0x1b, 0x93, 0xab, 0x5e, 0xf1, 0x67, 0x28, 0xe3, 0xf3, 0xc7, 0x38, 0xe7, 0xd5, 0x7, 0xb1, 0x84, 0x89, 0x38, 0x8c, 0xc3, 0xca, 0x7b, 0xa0, 0x1a, 0xf6, 0x72, 0xc2, 0x2c, 0xb7, 0x67, 0xc2, 0x95, 0xd2}, - output512: []byte{0x21, 0x8a, 0x55, 0x79, 0x65, 0x29, 0x14, 0x9f, 0x29, 0xcc, 0x4a, 0x19, 0xc8, 0xe, 0x5, 0xc2, 0x6f, 0x4, 0x8a, 0xbc, 0x98, 0x94, 0xad, 0x79, 0xf1, 0x1b, 0xac, 0x7c, 0x28, 0xde, 0x53, 0xbd, 0xc9, 0xbd, 0xb8, 0xbe, 0x49, 0x84, 0xf9, 0x24, 0x64, 0x8, 0x67, 0xfc, 0xfc, 0xe4, 0x23, 0x10, 0xad, 0xfa, 0x94, 0x9e, 0x2b, 0x25, 0x68, 0xff, 0xa0, 0x79, 0x5f, 0xbb, 0x32, 0x3, 0xde, 0x65}}, - testcase{ - msg: []byte{0x20, 0xff, 0x45, 0x43, 0x69, 0xa5, 0xd0, 0x5b, 0x81, 0xa7, 0x8f, 0x3d, 0xb0, 0x58, 0x19, 0xfe, 0xa9, 0xb0, 0x8c, 0x23, 0x84, 0xf7, 0x5c, 0xb0, 0xab, 0x6a, 0xa1, 0x15, 0xdd, 0x69, 0xd, 0xa3, 0x13, 0x18, 0x74, 0xa1, 0xca, 0x8f, 0x70, 0x8a, 0xd1, 0x51, 0x9e, 0xa9, 0x52, 0xc1, 0xe2, 0x49, 0xcb, 0x54, 0xd, 0x19, 0x63, 0x92, 0xc7, 0x9e, 0x87, 0x75, 0x54, 0x24, 0xfe, 0xe7, 0xc8, 0x90, 0x80, 0x8c, 0x56, 0x27, 0x22, 0x35, 0x9e, 0xea, 0x52, 0xe8, 0xa1, 0x2f, 0xbb, 0xb9, 0x69, 0xdd, 0x79, 0x61, 0xd2, 0xba, 0x52, 0x3, 0x74, 0x93, 0x75, 0x5a, 0x5f, 0xa0, 0x4f, 0xd, 0x50, 0xa1, 0xaa, 0x26, 0xc9, 0xb4, 0x41, 0x48, 0xc0, 0xd3, 0xb9, 0x4d, 0x1c, 0x4a, 0x59, 0xa3, 0x1a, 0xca, 0x15, 0xae, 0x8b, 0xd4, 0x4a, 0xcb, 0x78, 0x33, 0xd8, 0xe9, 0x1c, 0x4b, 0x86, 0xfa, 0x31, 0x35, 0xa4, 0x23, 0x38, 0x7b, 0x81, 0x51, 0xb4, 0x13, 0x3e, 0xd2, 0x3f, 0x6d, 0x71, 0x87, 0xb5, 0xe, 0xc2, 0x20, 0x4a, 0xd9, 0x1, 0xad, 0x74, 0xd3, 0x96, 0xe4, 0x42, 0x74, 0xe0, 0xec, 0xaf, 0xaa, 0xe1, 0x7b, 0x3b, 0x90, 0x85, 0xe2, 0x22, 0x60, 0xb3, 0x5c, 0xa5, 0x3b, 0x15, 0xcc, 0x52, 0xab, 0xba, 0x75, 0x8a, 0xf6, 0x79, 0x8f, 0xbd, 0x4, 0xec, 0xee, 0xce, 0xd6, 0x48, 0xf3, 0xaf, 0x4f, 0xdb, 0x3d, 0xed, 0x75, 0x57, 0xa9, 0xa5, 0xcf, 0xb7, 0x38, 0x26, 0x12, 0xa8, 0xa8, 0xf3, 0xf4, 0x59, 0x47, 0xd1, 0xa2, 0x9c, 0xe2, 0x90, 0x72, 0x92, 0x8e, 0xc1, 0x93, 0xca, 0x25, 0xd5, 0x10, 0x71, 0xbd, 0x5e, 0x19, 0x84, 0xec, 0xf4, 0x2, 0xf3, 0x6, 0xea, 0x76, 0x2f, 0xf, 0x25, 0x28, 0x2f, 0x52, 0x96, 0xd9, 0x97, 0x65, 0x8b, 0xe3, 0xf9, 0x83, 0x69, 0x6f, 0xfa, 0x6d, 0x9, 0x5c, 0x63, 0x69, 0xb4, 0xda, 0xf7, 0x9e, 0x9a, 0x5d, 0x31, 0x36, 0x22, 0x91, 0x28, 0xf8, 0xeb, 0x63, 0xc1, 0x2b, 0x9e, 0x9f, 0xa7, 0x8a, 0xff, 0x7a, 0x3e, 0x9e, 0x19, 0xa6, 0x20, 0x22, 0x49, 0x3c, 0xd1, 0x36, 0xde, 0xfb, 0xb5, 0xbb, 0x7b, 0xa1, 0xb9, 0x38, 0xf3, 0x67, 0xfd, 0x2f, 0x63, 0xeb, 0x5c, 0xa7, 0x6c, 0xb, 0xf, 0xf2, 0x1b, 0x9e, 0x36, 0xc3, 0xf0, 0x72, 0x30, 0xcf, 0x3c, 0x30, 0x74, 0xe5, 0xda, 0x58, 0x70, 0x40, 0xa7, 0x69, 0x75, 0xd7, 0xe3, 0x9f, 0x44, 0x94, 0xac, 0xe5, 0x48, 0x6f, 0xcb, 0xf3, 0x80, 0xab, 0x75, 0x58, 0xc4, 0xfe, 0x89, 0x65, 0x63, 0x35, 0xb8, 0x2e, 0x4d, 0xb8, 0x65, 0x95, 0x9, 0xea, 0xb4, 0x6a, 0x19, 0x61, 0x31, 0x26, 0xe5, 0x94, 0x4, 0x27, 0x32, 0xdd, 0x4c, 0x41, 0x1f, 0x41, 0xaa, 0x8c, 0xde, 0xac, 0x71, 0xc0, 0xfb, 0x40, 0xa9, 0x4e, 0x6d, 0xa5, 0x58, 0xc0, 0x5e, 0x77, 0xb6, 0x18, 0x28, 0x6, 0xf2, 0x6d, 0x9a, 0xfd, 0xf3, 0xda, 0x0, 0xc6, 0x94, 0x19, 0x22, 0x2c, 0x81, 0x86, 0xa6, 0xef, 0xad, 0x60, 0xb, 0x41, 0xe, 0x6c, 0xe2, 0xf2, 0xa7, 0x97, 0xe4, 0x9d, 0xc1, 0xf1, 0x35, 0x31, 0x98, 0x1, 0xfa, 0x6f, 0x39, 0x6b, 0x6, 0xf9, 0x75, 0xe2, 0xa1, 0x90, 0xa0, 0x23, 0xe4, 0x74, 0xb6, 0x18, 0xe7}, - output224: []byte{0x34, 0xa5, 0x8d, 0xdf, 0xc5, 0xc2, 0x22, 0x22, 0x81, 0xfa, 0x73, 0xeb, 0x34, 0xbf, 0xb5, 0xe1, 0x52, 0x27, 0x2c, 0xc3, 0xac, 0x7f, 0xe9, 0x7a, 0xc5, 0x8c, 0x8, 0xb0}, - output256: []byte{0xe, 0xc8, 0xd9, 0xd2, 0xd, 0xdf, 0xa, 0x7b, 0x2, 0x51, 0xe9, 0x41, 0xa7, 0x26, 0x1b, 0x55, 0x75, 0x7, 0xff, 0x62, 0x87, 0xb5, 0x4, 0x36, 0x2a, 0x8f, 0x17, 0x34, 0xc5, 0xa9, 0x10, 0x12}, - output384: []byte{0x59, 0x75, 0xfa, 0x4b, 0xce, 0xfc, 0x79, 0xfa, 0xdc, 0x79, 0xcc, 0xf1, 0x25, 0x4b, 0xba, 0x9e, 0xac, 0x25, 0x2e, 0x24, 0xc7, 0xde, 0xc7, 0xeb, 0x89, 0x72, 0xd2, 0x65, 0xef, 0xad, 0x3f, 0x6c, 0xf6, 0x48, 0xc4, 0x9d, 0xff, 0xf5, 0x45, 0x3a, 0xd2, 0x7d, 0x62, 0xff, 0x86, 0x7a, 0x2f, 0x3}, - output512: []byte{0x11, 0x6a, 0xe9, 0x4c, 0x86, 0xf6, 0x8f, 0x96, 0xb8, 0xae, 0xf2, 0x98, 0xa9, 0xf5, 0x85, 0x2c, 0xc9, 0x91, 0x3a, 0x2a, 0xd3, 0xc3, 0xc3, 0x44, 0xf2, 0x8d, 0xcc, 0x9b, 0x29, 0x29, 0x2a, 0x71, 0x6f, 0xaf, 0x51, 0xdd, 0x4, 0xa9, 0x43, 0x3d, 0x8a, 0x12, 0x57, 0x2e, 0x1d, 0xbc, 0x58, 0x1a, 0x7c, 0xdc, 0x4e, 0x50, 0xbc, 0x1c, 0xa9, 0x5, 0x1d, 0xdb, 0xc1, 0x21, 0xf2, 0xe8, 0x64, 0xe2}}, - testcase{ - msg: []byte{0x4f, 0xbd, 0xc5, 0x96, 0x50, 0x8d, 0x24, 0xa2, 0xa0, 0x1, 0xe, 0x14, 0x9, 0x80, 0xb8, 0x9, 0xfb, 0x9c, 0x6d, 0x55, 0xec, 0x75, 0x12, 0x58, 0x91, 0xdd, 0x98, 0x5d, 0x37, 0x66, 0x5b, 0xd8, 0xf, 0x9b, 0xeb, 0x6a, 0x50, 0x20, 0x75, 0x88, 0xab, 0xf3, 0xce, 0xee, 0x8c, 0x77, 0xcd, 0x8a, 0x5a, 0xd4, 0x8a, 0x9e, 0xa, 0xa0, 0x74, 0xed, 0x38, 0x87, 0x38, 0x36, 0x24, 0x96, 0xd2, 0xfb, 0x2c, 0x87, 0x54, 0x3b, 0xb3, 0x34, 0x9e, 0xa6, 0x49, 0x97, 0xce, 0x3e, 0x7b, 0x42, 0x4e, 0xa9, 0x2d, 0x12, 0x2f, 0x57, 0xdb, 0xb0, 0x85, 0x5a, 0x80, 0x30, 0x58, 0x43, 0x7f, 0xe0, 0x8a, 0xfb, 0xc, 0x8b, 0x5e, 0x71, 0x79, 0xb9, 0x4, 0x4b, 0xbf, 0x4d, 0x81, 0xa7, 0x16, 0x3b, 0x31, 0x39, 0xe3, 0x8, 0x88, 0xb5, 0x36, 0xb0, 0xf9, 0x57, 0xef, 0xf9, 0x9a, 0x71, 0x62, 0xf4, 0xca, 0x5a, 0xa7, 0x56, 0xa4, 0xa9, 0x82, 0xdf, 0xad, 0xbf, 0x31, 0xef, 0x25, 0x50, 0x83, 0xc4, 0xb5, 0xc6, 0xc1, 0xb9, 0x9a, 0x10, 0x7d, 0x7d, 0x3a, 0xff, 0xfd, 0xb8, 0x91, 0x47, 0xc2, 0xcc, 0x4c, 0x9a, 0x26, 0x43, 0xf4, 0x78, 0xe5, 0xe2, 0xd3, 0x93, 0xae, 0xa3, 0x7b, 0x4c, 0x7c, 0xb4, 0xb5, 0xe9, 0x7d, 0xad, 0xcf, 0x16, 0xb6, 0xb5, 0xa, 0xae, 0xf, 0x3b, 0x54, 0x9e, 0xce, 0x47, 0x74, 0x6d, 0xb6, 0xce, 0x6f, 0x67, 0xdd, 0x44, 0x6, 0xcd, 0x4e, 0x75, 0x59, 0x5d, 0x51, 0x3, 0xd1, 0x3f, 0x9d, 0xfa, 0x79, 0x37, 0x29, 0x24, 0xd3, 0x28, 0xf8, 0xdd, 0x1f, 0xcb, 0xeb, 0x5a, 0x8e, 0x2e, 0x8b, 0xf4, 0xc7, 0x6d, 0xe0, 0x8e, 0x3f, 0xc4, 0x6a, 0xa0, 0x21, 0xf9, 0x89, 0xc4, 0x93, 0x29, 0xc7, 0xac, 0xac, 0x5a, 0x68, 0x85, 0x56, 0xd7, 0xbc, 0xbc, 0xb2, 0xa5, 0xd4, 0xbe, 0x69, 0xd3, 0x28, 0x4e, 0x9c, 0x40, 0xec, 0x48, 0x38, 0xee, 0x85, 0x92, 0x12, 0xc, 0xe2, 0xa, 0xb, 0x63, 0x5e, 0xca, 0xda, 0xa8, 0x4f, 0xd5, 0x69, 0x5, 0x9, 0xf5, 0x4f, 0x77, 0xe3, 0x5a, 0x41, 0x7c, 0x58, 0x46, 0x48, 0xbc, 0x98, 0x39, 0xb9, 0x74, 0xe0, 0x7b, 0xfa, 0xb0, 0x3, 0x8e, 0x90, 0x29, 0x5d, 0xb, 0x13, 0x90, 0x25, 0x30, 0xa8, 0x30, 0xd1, 0xc2, 0xbd, 0xd5, 0x3f, 0x1f, 0x9c, 0x9f, 0xae, 0xd4, 0x3c, 0xa4, 0xee, 0xd0, 0xa8, 0xdd, 0x76, 0x1b, 0xc7, 0xed, 0xbd, 0xda, 0x28, 0xa2, 0x87, 0xc6, 0xc, 0xd4, 0x2a, 0xf5, 0xf9, 0xc7, 0x58, 0xe5, 0xc7, 0x25, 0x2, 0x31, 0xc0, 0x9a, 0x58, 0x25, 0x63, 0x68, 0x9a, 0xfc, 0x65, 0xe2, 0xb7, 0x9a, 0x7a, 0x2b, 0x68, 0x20, 0x6, 0x67, 0x75, 0x2e, 0x91, 0x1, 0x74, 0x6f, 0x3, 0x18, 0x4e, 0x23, 0x99, 0xe4, 0xed, 0x88, 0x35, 0xcb, 0x8e, 0x9a, 0xe9, 0xe, 0x29, 0x6a, 0xf2, 0x20, 0xae, 0x23, 0x42, 0x59, 0xfe, 0xb, 0xd0, 0xbc, 0xc6, 0xf, 0x7a, 0x4a, 0x5f, 0xf3, 0xf7, 0xc, 0x5e, 0xd4, 0xde, 0x9c, 0x8c, 0x51, 0x9a, 0x10, 0xe9, 0x62, 0xf6, 0x73, 0xc8, 0x2c, 0x5e, 0x93, 0x51, 0x78, 0x6a, 0x8a, 0x3b, 0xfd, 0x57, 0x0, 0x31, 0x85, 0x7b, 0xd4, 0xc8, 0x7f, 0x4f, 0xca, 0x31, 0xed, 0x4d, 0x50, 0xe1, 0x4f, 0x21, 0x7, 0xda, 0x2, 0xcb, 0x50, 0x58, 0x70, 0xb, 0x74, 0xea, 0x24, 0x1a, 0x8b, 0x41, 0xd7, 0x84, 0x61, 0x65, 0x8f, 0x1b, 0x2b, 0x90, 0xbf, 0xd8, 0x4a, 0x4c, 0x2c, 0x9d, 0x65, 0x43, 0x86, 0x1a, 0xb3, 0xc5, 0x64, 0x51, 0x75, 0x7d, 0xcf, 0xb9, 0xba, 0x60, 0x33, 0x34, 0x88, 0xdb, 0xdd, 0x2, 0xd6, 0x1, 0xb4, 0x1a, 0xae, 0x31, 0x7c, 0xa7, 0x47, 0x4e, 0xb6, 0xe6, 0xdd}, - output224: []byte{0x7, 0x90, 0x64, 0x9a, 0x6f, 0x6e, 0xcc, 0x4d, 0xca, 0xca, 0xfa, 0xfb, 0x6a, 0xef, 0xbf, 0x6c, 0x6f, 0x7e, 0xc8, 0x83, 0xc7, 0x26, 0x71, 0xdb, 0x21, 0x1c, 0xd1, 0x63}, - output256: []byte{0xe, 0xa3, 0x3e, 0x2e, 0x34, 0xf5, 0x72, 0x44, 0x6, 0x40, 0x24, 0x4c, 0x7f, 0x1f, 0x5f, 0x4, 0x69, 0x7c, 0xe9, 0x71, 0x39, 0xbd, 0xa7, 0x2a, 0x65, 0x58, 0xd8, 0x66, 0x3c, 0x2, 0xb3, 0x88}, - output384: []byte{0xd8, 0xa1, 0x8f, 0xdf, 0xd, 0xbc, 0x4d, 0x9d, 0xc9, 0xa3, 0x99, 0xee, 0xd8, 0x33, 0xd2, 0x58, 0xbd, 0xf4, 0xe0, 0x6c, 0x50, 0xc1, 0x25, 0x50, 0xb5, 0x2, 0x97, 0xdd, 0xa0, 0x57, 0x84, 0xae, 0xe9, 0x1f, 0x33, 0x97, 0x66, 0x2, 0x1b, 0x2c, 0xa6, 0xbe, 0x15, 0x77, 0x82, 0x3d, 0x92, 0xb}, - output512: []byte{0xde, 0xa5, 0x6b, 0xda, 0xbb, 0xc6, 0xd2, 0x41, 0x83, 0xcf, 0x7b, 0xde, 0x1e, 0x1f, 0x78, 0x63, 0x1b, 0x2b, 0x2, 0x30, 0xc7, 0x6f, 0xf2, 0xf4, 0x30, 0x75, 0xf2, 0xfd, 0xe7, 0x7c, 0xf0, 0x52, 0x76, 0x92, 0x76, 0xca, 0xd9, 0x8d, 0xa6, 0x23, 0x94, 0xec, 0x62, 0xd7, 0x77, 0x30, 0xf5, 0x76, 0x14, 0x89, 0x58, 0x5e, 0x9, 0x3e, 0xa7, 0x31, 0x5f, 0x35, 0x92, 0x71, 0x7c, 0x48, 0x5c, 0x84}}, - testcase{ - msg: []byte{0xfe, 0x6, 0xa4, 0x70, 0x64, 0x68, 0xb3, 0x69, 0xf7, 0x62, 0x4f, 0x62, 0xd0, 0x4f, 0x9f, 0xac, 0x2, 0xf, 0x5, 0x15, 0x2f, 0x13, 0xe3, 0x50, 0x1, 0x6b, 0x2a, 0x29, 0xef, 0xff, 0x9a, 0x39, 0x39, 0x40, 0xc1, 0x38, 0x55, 0x33, 0x56, 0xb0, 0xe2, 0x84, 0x8c, 0x1, 0xb6, 0x22, 0xb9, 0x5f, 0xfa, 0x11, 0xab, 0x7, 0x58, 0x5f, 0x7d, 0xcb, 0xbf, 0x90, 0xe9, 0xf8, 0xec, 0x5f, 0xa2, 0xfb, 0x7b, 0x4c, 0xee, 0xd, 0xa, 0x4e, 0x8d, 0x33, 0x49, 0xa, 0xbd, 0x5, 0x8c, 0xf3, 0xbb, 0x85, 0xf0, 0xcd, 0x9b, 0x1b, 0xd3, 0xe9, 0x82, 0x30, 0x82, 0xd7, 0xb, 0x1a, 0x92, 0xac, 0xa6, 0xf2, 0xc8, 0x72, 0x16, 0xb4, 0xba, 0x9, 0xfe, 0xdd, 0xca, 0xa4, 0xcf, 0x25, 0x43, 0x36, 0x14, 0x6c, 0xc7, 0x56, 0x4, 0xfb, 0x1f, 0x28, 0x69, 0x18, 0xfa, 0x24, 0x34, 0xca, 0x36, 0xbe, 0x26, 0x21, 0x4, 0x94, 0x38, 0xa4, 0x0, 0xbd, 0xee, 0xa6, 0xc6, 0x57, 0xf0, 0x30, 0x15, 0x3, 0xcd, 0x7e, 0x6e, 0x38, 0x35, 0x8, 0x38, 0xf6, 0xe, 0xa7, 0xf0, 0x1, 0x75, 0x5d, 0xa4, 0x14, 0x2c, 0xe4, 0x57, 0x9b, 0x39, 0x2, 0x9d, 0xa8, 0x3f, 0x16, 0x46, 0xb7, 0xec, 0xb9, 0x94, 0x7e, 0xe8, 0x9a, 0xba, 0x37, 0x70, 0x99, 0xb8, 0x20, 0x26, 0x96, 0xb, 0x9e, 0xe6, 0x0, 0x77, 0x9b, 0xf0, 0xd, 0x6e, 0xb0, 0xcd, 0x9, 0x22, 0x6d, 0xb6, 0x91, 0x5a, 0x7a, 0xde, 0xd2, 0x7e, 0x67, 0x49, 0xe2, 0xcb, 0xc2, 0xc8, 0xb0, 0x30, 0xce, 0x18, 0x50, 0xeb, 0xfb, 0xe2, 0x4c, 0x6, 0x58, 0xf2, 0x9e, 0x9e, 0x70, 0x9c, 0xd1, 0xd, 0xb8, 0xa7, 0x7e, 0xfd, 0xef, 0xc9, 0xf, 0xdd, 0x7b, 0x9a, 0xd7, 0xa7, 0xe0, 0x33, 0x44, 0x12, 0xa5, 0x3d, 0x24, 0x8c, 0x4c, 0x12, 0xbf, 0x29, 0x87, 0xb7, 0xac, 0xcd, 0x2a, 0x8a, 0x60, 0x2f, 0x18, 0x45, 0x83, 0xaa, 0x56, 0xc, 0x1, 0x60, 0x93, 0xb5, 0x6b, 0x10, 0x1, 0x54, 0x47, 0x7b, 0x83, 0x46, 0x64, 0xe6, 0xb8, 0x5a, 0x19, 0xf8, 0xdc, 0x90, 0x9b, 0x4d, 0x79, 0x81, 0x6a, 0xf1, 0x22, 0x66, 0xc7, 0x31, 0xe2, 0x9a, 0x30, 0x4e, 0x9b, 0xed, 0x8e, 0xf1, 0xc8, 0x3, 0x3, 0x65, 0xb7, 0xde, 0xaf, 0x3d, 0x43, 0x69, 0x57, 0x30, 0x81, 0x17, 0xc7, 0xc5, 0x76, 0x7e, 0xc, 0xda, 0x6e, 0x34, 0x2d, 0xda, 0xf8, 0x24, 0x23, 0x3c, 0xbf, 0x4e, 0x69, 0x9d, 0xc6, 0x67, 0x35, 0x7c, 0xb3, 0x5c, 0x60, 0x2a, 0xc6, 0xbd, 0xde, 0xe7, 0x1b, 0x35, 0x2a, 0xf5, 0x5c, 0xb9, 0x39, 0x41, 0xa1, 0xa6, 0x30, 0x1a, 0x99, 0x4, 0x44, 0x7a, 0xf9, 0xee, 0x48, 0x61, 0x14, 0xd5, 0x7a, 0xe0, 0x39, 0x1, 0xf1, 0x0, 0x84, 0xad, 0xc0, 0x9, 0x6e, 0x46, 0x5e, 0x2e, 0xad, 0x24, 0x96, 0x27, 0x31, 0x12, 0xf2, 0xfa, 0xe6, 0x26, 0xe2, 0x30, 0xd4, 0x2e, 0xc2, 0x2e, 0xa1, 0xa, 0x82, 0x89, 0xb3, 0xe3, 0x5e, 0xee, 0x42, 0x15, 0x7, 0x69, 0xd6, 0xe6, 0x63, 0xa3, 0xca, 0x29, 0x17, 0x43, 0x16, 0xec, 0x93, 0xa2, 0x4f, 0x14, 0x8d, 0x98, 0x40, 0x53, 0xb8, 0xf9, 0x86, 0x64, 0xea, 0xca, 0x3e, 0xd, 0xea, 0xb, 0x42, 0xe8, 0xee, 0x30, 0xf8, 0x1a, 0x2c, 0xd6, 0xe4, 0x2c, 0x18, 0x9a, 0x25, 0xfe, 0xcb, 0x6e, 0x64, 0x3e, 0x69, 0x3e, 0x1f, 0x88, 0x71, 0xb8, 0x37, 0xc3, 0xf5, 0xff, 0x2a, 0xaf, 0xd1, 0x65, 0xa, 0x46, 0x5d, 0xc8, 0xe5, 0xc1, 0x99, 0x3b, 0xe6, 0x5c, 0xff, 0xd8, 0x7f, 0x2c, 0x68, 0xc, 0x86, 0xb0, 0xad, 0x31, 0x18, 0x83, 0x4a, 0x5f, 0x2e, 0x49, 0x0, 0x15, 0x13, 0x7b, 0xa9, 0x45, 0xc2, 0x77, 0x5d, 0xbd, 0x77, 0xfb, 0x3e, 0x5c, 0x67, 0x81, 0x9a, 0x9a, 0x7a, 0x94, 0xa6, 0x56, 0xfc, 0x47, 0x61, 0x65, 0x9c, 0x5b, 0x30, 0xed, 0x2a, 0xc5, 0x5a, 0x6d, 0x24, 0x9b, 0x70, 0xb, 0xc9, 0xc9, 0x3d, 0x59, 0x4, 0x90, 0xaa, 0xaa, 0xa7, 0x5a, 0x9f, 0xc3, 0x4a, 0x90, 0xd5, 0xa9, 0x10, 0x6f, 0x28, 0x60, 0xbd, 0xe1, 0x9f, 0xe5, 0x81, 0x54, 0x36, 0x6, 0x8a, 0x7f, 0x8e, 0xa4, 0x63, 0x6a}, - output224: []byte{0xcc, 0xd8, 0xa5, 0xf3, 0xc0, 0xa2, 0xf6, 0xaa, 0xa2, 0x5b, 0xe8, 0x97, 0x91, 0x60, 0x8c, 0x42, 0x9a, 0xd8, 0xa6, 0xde, 0x76, 0x7a, 0x47, 0x94, 0xb3, 0x5, 0xfb, 0x62}, - output256: []byte{0xd3, 0x10, 0x38, 0xec, 0x77, 0xcc, 0xad, 0x0, 0xaf, 0x3d, 0x9d, 0x5e, 0x9f, 0x5c, 0xe7, 0x17, 0xf5, 0x94, 0x5b, 0xde, 0x71, 0xc8, 0x7c, 0xea, 0x83, 0x7b, 0xe4, 0xb3, 0x60, 0xde, 0x59, 0x5a}, - output384: []byte{0x99, 0xfd, 0xee, 0x84, 0xa6, 0xe0, 0x6e, 0x7e, 0x8b, 0x21, 0xaf, 0x15, 0x64, 0x48, 0xb3, 0x16, 0x8f, 0x77, 0x71, 0x35, 0x2, 0x95, 0x65, 0x69, 0x46, 0x8, 0xe1, 0x47, 0x53, 0x7c, 0xe2, 0x62, 0x39, 0xd6, 0x89, 0x8f, 0xb, 0x1, 0xe4, 0x7, 0xef, 0x9e, 0x1c, 0xe5, 0x2b, 0xed, 0x34, 0x5e}, - output512: []byte{0x2e, 0x62, 0x36, 0x11, 0x7c, 0x4f, 0x99, 0x47, 0x8b, 0xff, 0x20, 0x4a, 0x44, 0x3c, 0x64, 0x77, 0x7c, 0xc0, 0xd6, 0x58, 0xa2, 0x46, 0x5, 0xe8, 0x10, 0xe5, 0xff, 0x12, 0xf2, 0x79, 0xbc, 0x32, 0x6c, 0x43, 0x91, 0x11, 0xa9, 0x11, 0x58, 0x31, 0x76, 0x28, 0xd, 0x63, 0xc4, 0xbf, 0x9c, 0x69, 0xf4, 0x7, 0x29, 0xcb, 0x97, 0x69, 0x96, 0xae, 0x77, 0x65, 0xe5, 0x91, 0x0, 0x4c, 0xd7, 0x99}}, - testcase{ - msg: []byte{0xd0, 0xff, 0x6e, 0x4, 0x5f, 0x4b, 0x63, 0x6f, 0x75, 0xa3, 0x89, 0x79, 0x9f, 0x31, 0x40, 0x66, 0x64, 0x48, 0x54, 0x82, 0x1b, 0x6e, 0x7a, 0xe4, 0x4, 0x7a, 0xdf, 0xde, 0x2d, 0xc, 0xe, 0x2, 0xc2, 0x50, 0xf0, 0xbe, 0x58, 0x2b, 0xec, 0x94, 0x1, 0x11, 0x89, 0xb9, 0x64, 0xa8, 0xaf, 0x43, 0xf, 0x59, 0x21, 0xed, 0x9d, 0x9f, 0x44, 0x46, 0xe4, 0xc7, 0x88, 0x51, 0x5b, 0x89, 0xca, 0x69, 0xe5, 0xf7, 0xcd, 0xfc, 0xcc, 0x9e, 0x83, 0xe8, 0xf9, 0x46, 0x1, 0x45, 0xb4, 0x3d, 0xdc, 0x41, 0xc0, 0x7c, 0xc5, 0x12, 0xb7, 0xe6, 0xfd, 0xd0, 0xe1, 0xe7, 0xaa, 0xba, 0x29, 0xa6, 0xc0, 0x16, 0xcc, 0xb7, 0xbd, 0x54, 0xb1, 0x45, 0xf3, 0x95, 0x1e, 0xab, 0x9b, 0xc4, 0x90, 0x8f, 0x62, 0x3e, 0x5a, 0x9b, 0xc, 0x5b, 0x36, 0x5, 0x62, 0x92, 0x54, 0xb, 0x79, 0xfd, 0x15, 0xc5, 0x34, 0x57, 0xdc, 0x74, 0xa6, 0x5f, 0xd7, 0x73, 0xa3, 0x4d, 0x6b, 0x31, 0x3a, 0x5, 0x6f, 0x79, 0xbc, 0x29, 0xa3, 0xfa, 0xc1, 0x5f, 0x6a, 0x14, 0x46, 0xbf, 0xae, 0xea, 0xaf, 0xba, 0xc8, 0xec, 0xf8, 0x16, 0x8d, 0xde, 0x5f, 0x6a, 0xe6, 0xb6, 0xe5, 0x79, 0xbd, 0x3c, 0xe7, 0x4e, 0x7a, 0xbf, 0xad, 0xf3, 0x61, 0xd0, 0xfd, 0x32, 0xd5, 0x65, 0x86, 0xa8, 0xd2, 0xd4, 0xff, 0x4c, 0xfd, 0xf8, 0xa7, 0x50, 0xfa, 0xfd, 0xe4, 0xc2, 0xe9, 0xeb, 0x32, 0xb0, 0x68, 0x47, 0xfa, 0x30, 0xb1, 0x3c, 0xc2, 0x73, 0x53, 0x2d, 0x1a, 0x23, 0xc8, 0x25, 0x7f, 0x80, 0xc6, 0xb, 0x8f, 0xa9, 0x4f, 0xa9, 0x76, 0xf5, 0x34, 0x14, 0x5c, 0xd6, 0x1c, 0x41, 0xc0, 0xa5, 0x11, 0xb6, 0x2c, 0xad, 0xd5, 0x84, 0x8c, 0xef, 0xf6, 0x43, 0xf8, 0x3c, 0xe4, 0x3f, 0x8e, 0x69, 0x69, 0xc5, 0xa5, 0x59, 0xaf, 0xad, 0x60, 0xe3, 0x10, 0x59, 0x9a, 0x34, 0xb2, 0xe5, 0xe0, 0x29, 0xfb, 0xdd, 0xf2, 0x98, 0x8f, 0xce, 0x59, 0x26, 0x9c, 0x71, 0x28, 0xa1, 0xfc, 0x79, 0xa7, 0x4b, 0x15, 0x4d, 0x8a, 0xa2, 0x85, 0xd, 0xcf, 0xdb, 0xf5, 0x94, 0x68, 0x4e, 0x74, 0x9, 0x9e, 0x37, 0x88, 0x2b, 0x44, 0x3, 0x67, 0xc1, 0xdd, 0x30, 0x3, 0xf6, 0x1c, 0xaf, 0xb4, 0x6a, 0xc7, 0x5d, 0x30, 0xe6, 0x77, 0xaf, 0x54, 0x55, 0x9a, 0x5d, 0xab, 0x70, 0xc5, 0x6, 0xcf, 0x61, 0xa9, 0xc3, 0x5e, 0xe, 0x56, 0xe1, 0x43, 0x7, 0x46, 0x91, 0x6d, 0xde, 0xec, 0x8d, 0x89, 0xb0, 0xc1, 0xd, 0xaa, 0x2, 0xc5, 0xd7, 0xe9, 0xf4, 0x26, 0x21, 0xd2, 0xb3, 0x12, 0xea, 0xff, 0xc9, 0xff, 0x30, 0x62, 0x97, 0x95, 0x2a, 0x32, 0xd2, 0x6c, 0x21, 0x48, 0x57, 0xa, 0xec, 0x90, 0x50, 0x1c, 0xa7, 0x39, 0xce, 0x5e, 0x68, 0x9e, 0x70, 0x66, 0xd9, 0x58, 0xa, 0x4f, 0xc2, 0x5e, 0x20, 0x23, 0x89, 0x7c, 0x74, 0xc6, 0x85, 0x62, 0x73, 0x13, 0x3e, 0x12, 0x75, 0xa0, 0xd2, 0x75, 0xdc, 0x5b, 0x75, 0xdb, 0x72, 0x4c, 0xd1, 0x2c, 0x9c, 0x1, 0xbb, 0x95, 0xab, 0x5a, 0x22, 0x7b, 0x78, 0x50, 0x2, 0x6, 0x30, 0x50, 0x60, 0x96, 0x87, 0x8d, 0x28, 0x99, 0x23, 0x17, 0x71, 0x83, 0xea, 0x92, 0x82, 0xa4, 0xc7, 0x8e, 0xc2, 0x12, 0xd2, 0xe8, 0x98, 0xcb, 0x99, 0xd8, 0x1a, 0x33, 0x64, 0xdf, 0x20, 0x92, 0x7e, 0xe3, 0x4d, 0x44, 0x75, 0xa5, 0xcf, 0x5c, 0xdb, 0x24, 0x8, 0x8e, 0xd7, 0x5b, 0x60, 0x20, 0x19, 0x22, 0xe9, 0xc9, 0x72, 0xd8, 0x55, 0x6c, 0xa7, 0x5f, 0x82, 0x74, 0xd1, 0x5f, 0x3f, 0xb8, 0x8a, 0x6b, 0x42, 0xc7, 0x66, 0xde, 0xf6, 0xb2, 0x13, 0x29, 0xde, 0xe7, 0xc4, 0x57, 0x44, 0x6d, 0xde, 0x8c, 0x26, 0x40, 0x5f, 0xe5, 0xd0, 0x30, 0x9a, 0x4, 0x22, 0x9f, 0x44, 0x9e, 0x84, 0x90, 0xcf, 0x90, 0x0, 0xee, 0x8d, 0xf4, 0x0, 0xcb, 0x7c, 0x7e, 0xe8, 0x31, 0xbd, 0x70, 0x59, 0xd2, 0x40, 0x88, 0xfb, 0x42, 0xd6, 0x16, 0x81, 0xcd, 0xe4, 0x50, 0x50, 0xfc, 0xa7, 0x8f, 0xf6, 0x4d, 0x9c, 0x8d, 0x1f, 0x58, 0xb5, 0x5f, 0x80, 0x2f, 0xa5, 0xd2, 0xf2, 0xe7, 0x23, 0xf3, 0xe4, 0xee, 0xd4, 0x33, 0x8b, 0x6, 0xd, 0x31, 0xc8, 0xac, 0xc4, 0x6d, 0x26, 0x87, 0xb, 0xd4, 0x5d, 0xd, 0xe0, 0x79, 0x8d, 0x48, 0xe3, 0x2a, 0xad, 0x1a, 0x6d, 0x43, 0x22, 0xe6, 0x9f, 0x5e, 0x72, 0x30, 0x9b, 0x9d, 0x7f, 0xa1, 0xf2, 0x4b, 0xb1, 0xd6, 0x3f, 0xf0, 0x9e, 0xd4, 0x73, 0x91, 0xc2, 0x32, 0x49, 0x7b, 0xf2, 0x22, 0xc5, 0x42, 0xa7, 0x9, 0x75, 0xc8, 0x29, 0x2d, 0x27, 0x51, 0x97, 0xa4, 0xca}, - output224: []byte{0x68, 0xc9, 0x38, 0xd6, 0x49, 0x6b, 0xb5, 0x7, 0xd7, 0xed, 0xe9, 0xac, 0x12, 0xfe, 0x8e, 0x1, 0xb, 0x3b, 0x2c, 0xfd, 0x44, 0xa5, 0xd4, 0x76, 0x10, 0x31, 0xb9, 0xe2}, - output256: []byte{0xe4, 0xe3, 0xbb, 0x66, 0x2b, 0xe0, 0x94, 0x61, 0xf, 0x4, 0xd5, 0x59, 0x4e, 0xef, 0x5f, 0x78, 0xb1, 0xab, 0x8, 0xf, 0x2e, 0xbe, 0x5a, 0xcf, 0x41, 0xd6, 0x61, 0xfa, 0x13, 0xa6, 0x8d, 0xbd}, - output384: []byte{0xe7, 0x2a, 0xfb, 0xd3, 0xac, 0xd3, 0x5b, 0x7f, 0x87, 0x8f, 0xce, 0xfa, 0xc7, 0x8d, 0xc5, 0x34, 0xe4, 0x25, 0x5, 0x22, 0x13, 0x76, 0x9d, 0xc3, 0xee, 0x17, 0x2a, 0xe5, 0x62, 0xf4, 0xa0, 0xfc, 0x94, 0x6d, 0x9c, 0x8e, 0x54, 0x6f, 0x15, 0x78, 0xa2, 0xac, 0xf3, 0xd0, 0x6d, 0x9f, 0x3c, 0xc9}, - output512: []byte{0xc8, 0xee, 0x15, 0x8c, 0xc1, 0xad, 0x47, 0x8a, 0x5b, 0x16, 0x64, 0x5b, 0xcb, 0x3a, 0x54, 0xa3, 0x8c, 0x7a, 0x55, 0x4a, 0xb5, 0x84, 0xd, 0x13, 0xfa, 0x7, 0xc7, 0xc, 0x18, 0xa3, 0x5e, 0x30, 0x35, 0xfb, 0x64, 0x44, 0x5a, 0x9b, 0x65, 0xda, 0x6, 0xeb, 0x7c, 0xfa, 0x5b, 0xd3, 0xc9, 0x21, 0xb2, 0xd, 0x15, 0xc, 0xfb, 0x73, 0x21, 0x31, 0x54, 0x28, 0x38, 0x40, 0xb7, 0x28, 0xde, 0x1e}}, - testcase{ - msg: []byte{0xc9, 0xa0, 0xb5, 0x1f, 0x31, 0x99, 0x33, 0x9c, 0x11, 0xa5, 0x75, 0x3c, 0x9d, 0x9c, 0x95, 0x10, 0x4b, 0x40, 0x1, 0x27, 0x8, 0x71, 0x77, 0xf1, 0x4d, 0x3e, 0x15, 0xbe, 0x88, 0x1e, 0xe8, 0x9b, 0xf4, 0x16, 0xf9, 0x7d, 0x4f, 0x7a, 0xa9, 0x63, 0x6c, 0x5e, 0xf2, 0x9e, 0xbb, 0xf8, 0x93, 0x8, 0x4, 0x0, 0x6e, 0xb2, 0x68, 0x39, 0x41, 0x5d, 0x39, 0x84, 0xb9, 0x20, 0x88, 0x24, 0x99, 0x75, 0x2c, 0x36, 0xa5, 0xbb, 0xd5, 0x83, 0x30, 0x8e, 0x71, 0x6d, 0xb1, 0x6f, 0x28, 0xdb, 0x98, 0xb3, 0xa3, 0xe7, 0x18, 0xa2, 0xeb, 0xcd, 0xfe, 0xfa, 0x75, 0xd7, 0xcc, 0xbb, 0x6a, 0x74, 0x6e, 0x32, 0xfe, 0xaa, 0x38, 0xd0, 0x34, 0x84, 0x34, 0x61, 0xdb, 0xcf, 0xca, 0x7f, 0x98, 0x3e, 0x19, 0xf5, 0xb2, 0x3e, 0xc2, 0xe3, 0xd7, 0x4d, 0x2b, 0x44, 0x2, 0xf3, 0xbd, 0xce, 0x7d, 0x7a, 0x9d, 0xf1, 0x38, 0x46, 0x68, 0xc7, 0x46, 0xcc, 0xe4, 0x66, 0xb0, 0x65, 0x4c, 0xdd, 0x5c, 0xa5, 0x6a, 0x77, 0xd6, 0x8a, 0x10, 0xa, 0xe0, 0x6d, 0x63, 0xcd, 0x9a, 0xf5, 0x12, 0xae, 0xba, 0xe7, 0x89, 0x93, 0x80, 0x8c, 0xe6, 0x72, 0x33, 0xe, 0x20, 0x65, 0xc0, 0xf7, 0x1e, 0x5, 0xc0, 0xfe, 0x82, 0x1c, 0xd5, 0xf8, 0x57, 0x32, 0x31, 0x5f, 0x4, 0x66, 0x6f, 0x3e, 0x4e, 0x6c, 0x4f, 0x3e, 0x9f, 0x41, 0x5e, 0x31, 0xfe, 0x9, 0x80, 0xd8, 0x74, 0x99, 0x41, 0x8, 0xe1, 0x24, 0x64, 0x60, 0x9c, 0x6d, 0x5c, 0x19, 0xce, 0xdf, 0xc8, 0x58, 0x46, 0xb0, 0xa8, 0x4e, 0xf3, 0xcc, 0xbd, 0x3b, 0x65, 0x5f, 0xb0, 0xde, 0x8c, 0xb8, 0x92, 0xbd, 0xf7, 0x74, 0xdf, 0x39, 0xc9, 0x55, 0xf0, 0x4f, 0x32, 0x28, 0x56, 0xd4, 0x70, 0x98, 0x1b, 0xee, 0xd0, 0xf7, 0x52, 0xd8, 0x2e, 0xad, 0x73, 0xb4, 0x13, 0x1c, 0x5d, 0xbf, 0x4, 0x24, 0xb4, 0xab, 0x65, 0x4f, 0x72, 0xe2, 0x6e, 0xf0, 0xcd, 0x29, 0x2b, 0x87, 0xbd, 0x5b, 0x66, 0xfb, 0xd5, 0xe7, 0xeb, 0xa9, 0x6c, 0x62, 0xcf, 0xfe, 0xfd, 0x4b, 0x1d, 0x87, 0xb, 0xfe, 0xf3, 0x12, 0xb8, 0x6e, 0x38, 0xed, 0x5c, 0xf, 0x50, 0x93, 0x5e, 0x2e, 0xcf, 0x9f, 0xcb, 0x8c, 0x95, 0xd3, 0x5d, 0x19, 0xa8, 0xfc, 0x8f, 0x20, 0x2b, 0xd9, 0xdb, 0xa7, 0x68, 0xca, 0x48, 0xfb, 0xbb, 0x7, 0x11, 0x79, 0x41, 0x3c, 0xd, 0xe4, 0xfd, 0xe8, 0x67, 0x62, 0xed, 0x4b, 0x13, 0xe1, 0xee, 0xf2, 0xa0, 0xa, 0xdd, 0x5d, 0x1c, 0x2a, 0x3a, 0xf7, 0x93, 0x77, 0x87, 0xde, 0xba, 0xf1, 0xf6, 0xf1, 0x2f, 0x3f, 0x2, 0x25, 0xff, 0xe5, 0x87, 0xa5, 0x54, 0xc, 0xb5, 0x50, 0xf7, 0xbc, 0x11, 0xdd, 0x6a, 0xf8, 0x64, 0xd6, 0xb6, 0xd1, 0x6d, 0xb1, 0x48, 0x8c, 0xb2, 0x26, 0xeb, 0xb2, 0x19, 0x9d, 0xa7, 0x5f, 0xdd, 0x59, 0xa7, 0x11, 0x58, 0x86, 0x72, 0x98, 0xf6, 0x39, 0x61, 0xb4, 0xa, 0x31, 0x20, 0x9f, 0x8f, 0x16, 0x62, 0x9b, 0x1c, 0xce, 0x7f, 0xfb, 0x61, 0x70, 0x72, 0x74, 0x8f, 0xde, 0x89, 0x20, 0xd1, 0x1c, 0xc0, 0xd0, 0x67, 0x83, 0x89, 0xd1, 0xf7, 0x19, 0xdf, 0x3e, 0xd1, 0x98, 0x46, 0xfe, 0x98, 0x93, 0xb0, 0x4d, 0xb6, 0xf, 0xa6, 0x3, 0x17, 0xd, 0x95, 0x73, 0xb1, 0xbf, 0xc7, 0xda, 0x66, 0x3e, 0x7, 0x25, 0x45, 0x52, 0xab, 0x62, 0x53, 0xdd, 0xe8, 0x14, 0x11, 0x71, 0x85, 0xf8, 0x43, 0x73, 0xfe, 0xcd, 0x7f, 0x98, 0xde, 0xd1, 0x70, 0xc8, 0x84, 0xd4, 0x1d, 0x1a, 0xc8, 0x18, 0x14, 0xc7, 0x3e, 0xa4, 0x8a, 0xd9, 0x4e, 0xca, 0x1b, 0x77, 0x33, 0xd8, 0x39, 0x3e, 0x32, 0xc, 0x8c, 0x46, 0x7e, 0xf6, 0x18, 0x9b, 0x4a, 0xc3, 0x24, 0xc6, 0x8c, 0x8a, 0x2e, 0xcf, 0x67, 0x9c, 0x89, 0x3b, 0x7d, 0xbc, 0x43, 0x10, 0xcd, 0x5, 0xda, 0xdd, 0x80, 0xbb, 0x63, 0x26, 0xb5, 0x1e, 0xcd, 0x99, 0xa4, 0x41, 0xbf, 0xf7, 0x7b, 0xe8, 0xd6, 0x44, 0xd7, 0x52, 0xf3, 0xc5, 0xc7, 0x94, 0xe7, 0xd4, 0x5b, 0xa7, 0x62, 0x83, 0xac, 0xf8, 0x91, 0x3b, 0xbf, 0x2a, 0x42, 0xf, 0x9e, 0x5d, 0x14, 0xd7, 0xa2, 0x3e, 0x95, 0xfd, 0xeb, 0xc6, 0x9b, 0x45, 0x5e, 0x46, 0x64, 0x23, 0x1, 0x2e, 0x9d, 0x1d, 0xe9, 0x35, 0x3e, 0x40, 0xd4, 0xbd, 0xc3, 0x10, 0x7c, 0x31, 0x44, 0xb9, 0x6c, 0x6d, 0xaf, 0xd4, 0x1c, 0xce, 0xfe, 0xb2, 0xb7, 0xff, 0x84, 0x8c, 0xb9, 0xfd, 0xbe, 0xa8, 0x64, 0x8b, 0xe3, 0x21, 0x60, 0xfa, 0xb7, 0xe7, 0xdf, 0xcc, 0xb8, 0x7, 0xfb, 0x1, 0x9e, 0xbf, 0x15, 0x92, 0x31, 0xed, 0xcf, 0x2d, 0x48, 0x7d, 0x76, 0xa3, 0xe8, 0x82, 0xf3, 0xf5, 0xc, 0xa4, 0x8d, 0xd0, 0x8a, 0x23, 0xb0, 0x6e, 0xe8, 0x87, 0xbd, 0x7d, 0xf9, 0xd7, 0xc6, 0xcc, 0x2b, 0xdb, 0xe3, 0x48, 0xe3, 0x12, 0x5c, 0x45, 0x32, 0x44, 0x8f, 0x40, 0xc, 0xd5, 0x7a, 0x86, 0x79, 0xab, 0xab, 0x13, 0xe5, 0x82, 0xb1, 0x3d, 0x49, 0x44, 0x26, 0x38, 0xe2, 0x69, 0x8f, 0xb7, 0xa5, 0x63, 0xc7, 0xfb, 0x26, 0x41, 0x57}, - output224: []byte{0x2e, 0xaf, 0x74, 0x19, 0x85, 0x69, 0xe0, 0x5a, 0x6, 0x14, 0xb0, 0x67, 0xc9, 0x11, 0xd6, 0x25, 0xa9, 0x22, 0x2b, 0xcb, 0x6f, 0x75, 0x37, 0xc3, 0x4e, 0x75, 0x3, 0x93}, - output256: []byte{0x6e, 0x1b, 0xb4, 0xd0, 0x34, 0xe9, 0xb9, 0x81, 0x6e, 0xd1, 0xa8, 0x46, 0xf9, 0x3, 0xf6, 0x2c, 0xb1, 0xbd, 0xb8, 0xa0, 0xd, 0x44, 0x6c, 0x9c, 0xc7, 0x77, 0xe4, 0x75, 0xa3, 0x27, 0xc5, 0x8d}, - output384: []byte{0x25, 0x64, 0x32, 0xcf, 0xe8, 0xf9, 0xf0, 0xc3, 0xef, 0xbb, 0x6c, 0xd1, 0x35, 0xfd, 0x92, 0xa9, 0x2a, 0xc5, 0x77, 0x2f, 0x3c, 0xd9, 0x5, 0x38, 0x9c, 0x5e, 0x76, 0xa4, 0x3e, 0x4f, 0x68, 0x3, 0x8, 0xc1, 0x34, 0xac, 0xb8, 0xd1, 0x7b, 0xf7, 0xcc, 0xa2, 0xe6, 0x67, 0x57, 0xc6, 0x7c, 0x33}, - output512: []byte{0x65, 0x6a, 0xbb, 0x69, 0x55, 0x4d, 0x7d, 0x34, 0x85, 0x5c, 0xc, 0x36, 0xd9, 0x9b, 0x73, 0xb9, 0x56, 0x9b, 0x1f, 0xf, 0x86, 0xb2, 0xcc, 0xa6, 0xc4, 0x6e, 0x80, 0x39, 0x37, 0x7d, 0x22, 0xc7, 0xf, 0x4d, 0x45, 0x7e, 0x3a, 0xd1, 0xdd, 0x33, 0x1, 0x2c, 0xb1, 0xbb, 0x26, 0x20, 0xbc, 0x1d, 0xbc, 0x4c, 0x68, 0xf0, 0xb2, 0xa3, 0x2, 0xb8, 0x1b, 0x64, 0xd2, 0x7, 0xb0, 0x4e, 0xf, 0x4f}}, - testcase{ - msg: []byte{0xda, 0x5b, 0x21, 0x18, 0xcb, 0xd5, 0x9f, 0x40, 0x8c, 0xe5, 0x63, 0x62, 0x48, 0x9f, 0xda, 0x69, 0xef, 0x73, 0x17, 0x2f, 0x46, 0xde, 0xc1, 0x6c, 0xd, 0x4a, 0x66, 0xe3, 0xf3, 0xcc, 0xa3, 0x73, 0x92, 0x7c, 0xb6, 0x78, 0x4c, 0xe6, 0x2b, 0xbc, 0xb0, 0x8a, 0x49, 0xd, 0x0, 0x3a, 0x8f, 0x77, 0x39, 0x1e, 0x82, 0xcd, 0xd8, 0x78, 0x60, 0x90, 0x93, 0x83, 0xb0, 0x54, 0xdb, 0x95, 0x81, 0x67, 0x20, 0x11, 0x2e, 0x2f, 0x96, 0xde, 0x9e, 0xf, 0xfc, 0x8b, 0xab, 0xc1, 0x35, 0xe, 0xd4, 0x6b, 0x9a, 0xeb, 0x5d, 0x46, 0xb6, 0x69, 0x40, 0xef, 0xa3, 0x11, 0xf4, 0x85, 0x3f, 0x31, 0x18, 0x6, 0x3c, 0x55, 0x7, 0x33, 0xe7, 0x67, 0x9d, 0x87, 0x17, 0x29, 0x0, 0x1c, 0x12, 0x27, 0xe, 0x98, 0x43, 0x9e, 0x37, 0x5e, 0xc, 0xd2, 0x47, 0x69, 0xd3, 0x18, 0xe0, 0x3c, 0xbc, 0x97, 0xd6, 0x43, 0xf1, 0xdc, 0x5f, 0x1b, 0x5e, 0xf5, 0x9d, 0x12, 0x78, 0x9f, 0x22, 0x44, 0x9b, 0xd8, 0xfa, 0x43, 0xa1, 0x3c, 0xe7, 0x8a, 0x41, 0x86, 0x16, 0x65, 0x23, 0xf3, 0x80, 0x7b, 0xb, 0x62, 0x10, 0x79, 0xcc, 0x52, 0x8f, 0x4e, 0x17, 0xc2, 0x58, 0xd4, 0xf9, 0xbd, 0xd0, 0x95, 0xa3, 0xe3, 0x65, 0x61, 0x4b, 0x94, 0xf2, 0xcd, 0x77, 0x8c, 0xac, 0xab, 0xf2, 0x62, 0x44, 0x89, 0x15, 0x31, 0xee, 0xdc, 0x24, 0xe1, 0xbf, 0x45, 0x98, 0x31, 0x9e, 0xb8, 0xb7, 0x52, 0x77, 0x36, 0xbb, 0x1e, 0x73, 0x44, 0x29, 0x36, 0xf, 0x47, 0xf0, 0x4b, 0x2e, 0x95, 0xd5, 0xaa, 0xe9, 0x97, 0x76, 0x3a, 0x46, 0x7c, 0xc5, 0x30, 0x3d, 0x11, 0x41, 0xc2, 0xc0, 0x1f, 0x7a, 0xb9, 0xed, 0xab, 0x86, 0xd, 0x18, 0x6, 0x97, 0xc9, 0x6, 0xce, 0x15, 0x58, 0xae, 0xff, 0x5a, 0xdc, 0xe6, 0x3, 0xf8, 0xa4, 0xa1, 0xf, 0xc6, 0xc1, 0x69, 0x91, 0x89, 0xe7, 0x3b, 0x48, 0x9f, 0x64, 0xce, 0xfb, 0x89, 0xac, 0x55, 0x7c, 0x5b, 0xb8, 0x82, 0x6c, 0x3, 0x17, 0xea, 0xef, 0x23, 0x2, 0xe8, 0x55, 0xfb, 0xd9, 0x67, 0x77, 0x89, 0x81, 0x4, 0x36, 0x5d, 0x96, 0xae, 0x8a, 0x8e, 0xd8, 0x66, 0x9c, 0x56, 0x8c, 0x4d, 0xbe, 0xb0, 0xa7, 0xf, 0x6c, 0xf4, 0xc2, 0x2f, 0xd9, 0x33, 0x1, 0x44, 0x73, 0xf9, 0x18, 0x71, 0xc0, 0x8d, 0x5a, 0x7b, 0x44, 0xa9, 0x28, 0x29, 0x5f, 0xb2, 0xaa, 0x56, 0xd5, 0xe2, 0xc3, 0x9c, 0xa7, 0x9d, 0x28, 0x37, 0xfb, 0x39, 0xb3, 0x5c, 0x68, 0x10, 0xc3, 0x78, 0xd7, 0x49, 0xaa, 0xcb, 0x54, 0x33, 0x68, 0xa1, 0x9c, 0x13, 0x7b, 0x87, 0x22, 0x29, 0xe0, 0xa6, 0xf4, 0x69, 0x2, 0x2a, 0xa9, 0x3b, 0xcb, 0x2b, 0xe3, 0x8b, 0x76, 0x1c, 0x85, 0xac, 0x9, 0x41, 0x5c, 0xa7, 0xde, 0xeb, 0x38, 0xff, 0x2a, 0x21, 0x1, 0x50, 0x72, 0x6, 0xfe, 0x32, 0x2a, 0x89, 0x66, 0x6d, 0x32, 0x75, 0xa, 0xf0, 0xf4, 0xd7, 0xb2, 0xe5, 0x95, 0x71, 0xf0, 0x2a, 0x4, 0x8b, 0x8f, 0x94, 0xfe, 0x2d, 0x23, 0x10, 0x72, 0xe3, 0x1, 0xc8, 0x64, 0x1d, 0x1c, 0xdb, 0x4f, 0x84, 0x1a, 0xb1, 0x65, 0xaf, 0x29, 0x74, 0x95, 0xa3, 0x48, 0xbc, 0xcd, 0x93, 0x77, 0x12, 0xe6, 0x88, 0x52, 0xa4, 0xac, 0xa9, 0x48, 0xc1, 0x29, 0x4f, 0x8b, 0x73, 0x3d, 0x6, 0xd6, 0x7d, 0xe8, 0x9f, 0x20, 0x64, 0x98, 0xdd, 0x40, 0x1e, 0x14, 0x9f, 0xcc, 0x1e, 0xdc, 0xa9, 0x2d, 0xeb, 0x92, 0x95, 0x2e, 0xde, 0x4e, 0xbd, 0xc7, 0xcd, 0x79, 0x92, 0x10, 0x47, 0x69, 0xa0, 0x4d, 0xe8, 0x70, 0x50, 0x27, 0xa3, 0x13, 0x37, 0xb8, 0x8e, 0x8d, 0xe9, 0x3f, 0x66, 0x24, 0xe8, 0xf1, 0xb, 0x9f, 0x99, 0x24, 0xe8, 0xce, 0x5a, 0x9d, 0x84, 0x1c, 0x92, 0x60, 0x75, 0x3f, 0xa1, 0x49, 0x2c, 0xdd, 0xff, 0xe6, 0xb4, 0x40, 0xc, 0x57, 0x19, 0xd7, 0x6f, 0xb5, 0xb0, 0x1b, 0x23, 0x4f, 0x32, 0xff, 0xe6, 0x4f, 0x4, 0xd0, 0xa0, 0x6, 0x76, 0xfb, 0xfc, 0x58, 0xdb, 0xe1, 0x7b, 0x4d, 0x55, 0x2f, 0xdf, 0xc, 0x5b, 0x80, 0x2c, 0xc, 0xad, 0xf7, 0x23, 0xf7, 0x3f, 0x86, 0xe8, 0xff, 0xc4, 0x93, 0x99, 0x2d, 0x23, 0xe8, 0xc0, 0xb8, 0x4f, 0x72, 0x20, 0xa9, 0x83, 0xdd, 0xda, 0x21, 0x17, 0xb, 0x1f, 0x73, 0xc, 0x73, 0x6e, 0x75, 0x54, 0x9a, 0xf6, 0xec, 0xb8, 0xdc, 0x94, 0xfb, 0x25, 0xc2, 0x6b, 0xcd, 0xde, 0xe4, 0x20, 0xc8, 0x3e, 0x8a, 0x45, 0xae, 0x4c, 0x34, 0x58, 0x16, 0xb7, 0x16, 0x3c, 0xfe, 0x1, 0x6d, 0xcc, 0xfe, 0x47, 0xc6, 0x69, 0x79, 0xd6, 0x10, 0xa7, 0xf9, 0xb4, 0xa7, 0xb1, 0xba, 0x5e, 0x23, 0x3, 0x44, 0xc9, 0xf4, 0x6b, 0xa0, 0x76, 0xf2, 0xfc, 0xea, 0x68, 0xaa, 0xda, 0x8f, 0xa0, 0x9b, 0xf0, 0xb5, 0xcb, 0xb3, 0x85, 0xd, 0xde, 0xdd, 0x80, 0xa3, 0xe, 0x1f, 0x7a, 0x63, 0x9a, 0xc6, 0x9e, 0x55, 0x95, 0xc6, 0xa4, 0x8, 0x3a, 0xa9, 0x59, 0x83, 0x1e, 0xbb, 0xeb, 0x84, 0xc0, 0x18, 0x6, 0x87, 0x23, 0x19, 0x2f, 0x58, 0xba, 0xec, 0xdd, 0xd1, 0x8c, 0x85, 0x7e, 0x21, 0x2d, 0x4c, 0x7e, 0x72, 0x15, 0xb6, 0xc9, 0x54, 0x72, 0x81, 0x83, 0xfb, 0xaa, 0x7, 0x72, 0xb, 0x97, 0x18, 0x9a, 0xf6, 0xa7, 0x72, 0x9c, 0x30, 0xd2, 0x8d, 0xb3, 0x3a, 0x88, 0x9f, 0x22, 0x5d, 0x2, 0x7d, 0x16, 0x4f, 0x25, 0x45, 0x35, 0x77, 0xc, 0x50, 0x4c, 0x50, 0x6a, 0xee, 0x4e, 0xc4, 0x67, 0x67, 0x71, 0xf6, 0x9f, 0x93, 0x5b, 0xa0, 0x8a, 0x1c, 0x6c, 0x85}, - output224: []byte{0x3a, 0x96, 0x95, 0xfc, 0x92, 0x10, 0x64, 0xad, 0x79, 0x92, 0x1d, 0x76, 0xe9, 0x1d, 0x7a, 0xc9, 0x1c, 0x77, 0x7a, 0x77, 0xbf, 0xb5, 0x38, 0xe, 0xa0, 0x68, 0x6c, 0x87}, - output256: []byte{0x63, 0x19, 0xc9, 0x11, 0x7e, 0xc0, 0xfd, 0xfb, 0x18, 0x9c, 0x83, 0xb5, 0x51, 0x1, 0x51, 0x45, 0xfc, 0x61, 0xff, 0x66, 0xb0, 0xd1, 0xb1, 0x56, 0x8a, 0xc8, 0xd1, 0x7d, 0x61, 0xf2, 0xa0, 0x8f}, - output384: []byte{0x61, 0xf4, 0x7f, 0x6b, 0xc7, 0x97, 0xd1, 0x66, 0x58, 0x9, 0xa3, 0x9c, 0xf9, 0x9b, 0x9, 0x39, 0x26, 0xb3, 0x3f, 0x92, 0x6e, 0xf6, 0xb0, 0xa1, 0xec, 0x8d, 0x82, 0x52, 0x35, 0x11, 0xff, 0x71, 0x9b, 0x3b, 0x62, 0x5c, 0xb1, 0xb5, 0x6a, 0x96, 0x62, 0x98, 0xfa, 0x77, 0xe5, 0xbf, 0x16, 0xf0}, - output512: []byte{0xfc, 0x6, 0x93, 0x39, 0xa5, 0x2a, 0x68, 0x9a, 0xdd, 0x5b, 0xbb, 0xb6, 0x6d, 0x45, 0x82, 0xff, 0x1a, 0xf7, 0xc2, 0x20, 0x52, 0x48, 0x99, 0xa5, 0xee, 0x9a, 0x14, 0x42, 0x96, 0x6d, 0xfa, 0xdb, 0x6d, 0x98, 0xed, 0x2f, 0x74, 0x67, 0x89, 0x0, 0x8, 0x27, 0xf7, 0xbb, 0xa7, 0x74, 0x7, 0xe4, 0xb8, 0x7f, 0xa1, 0xb, 0x3b, 0x85, 0xb9, 0x24, 0x5c, 0xab, 0x9c, 0x73, 0x4a, 0x1f, 0x91, 0x59}}, - testcase{ - msg: []byte{0xd1, 0x89, 0xb, 0x47, 0x4, 0xe1, 0x69, 0xc2, 0x8e, 0x44, 0xdd, 0xf6, 0x2a, 0x10, 0x91, 0x45, 0x4, 0x4, 0x91, 0x5, 0x39, 0xfc, 0x2d, 0xae, 0xb2, 0x6e, 0x8a, 0xcf, 0x45, 0x33, 0xb0, 0x24, 0xe5, 0x21, 0x5c, 0x2d, 0x2, 0x82, 0xd, 0xd8, 0xfb, 0x2c, 0xfc, 0x17, 0x43, 0x95, 0x5c, 0xba, 0xcf, 0xf0, 0xf8, 0xf3, 0x5d, 0xfb, 0xb5, 0xe3, 0xf9, 0x42, 0xf3, 0x62, 0x47, 0xf6, 0x82, 0x11, 0xd5, 0x18, 0xf3, 0xf6, 0x1, 0xaa, 0xe1, 0x2a, 0x1c, 0xdc, 0x0, 0xb, 0xab, 0x43, 0xd4, 0xc9, 0x73, 0xf2, 0x87, 0xe8, 0x7, 0x41, 0xdd, 0x1f, 0xcf, 0x6c, 0x34, 0xf2, 0xe6, 0xb4, 0xb6, 0xc3, 0x13, 0xd0, 0x1c, 0x4f, 0xf3, 0xcb, 0xf9, 0x16, 0x6f, 0x26, 0x94, 0x6f, 0x18, 0xef, 0x2d, 0x58, 0x27, 0x1b, 0xa9, 0x23, 0x3f, 0x9, 0xa6, 0xb7, 0x7b, 0xfd, 0x4f, 0x48, 0xb3, 0x6e, 0xb3, 0xd7, 0x3d, 0x11, 0x33, 0xc4, 0xf8, 0x42, 0xa7, 0xdc, 0x39, 0x7, 0xf6, 0x80, 0xb0, 0xb7, 0x73, 0x24, 0x2c, 0x11, 0xe3, 0xdd, 0x97, 0x3a, 0x44, 0x32, 0x7e, 0xa7, 0xce, 0xa9, 0xc0, 0xf8, 0xe0, 0x7d, 0x68, 0x2b, 0x66, 0x51, 0xe5, 0x6, 0xb5, 0x87, 0x55, 0x9f, 0xe0, 0x1e, 0xd7, 0x21, 0x0, 0xb, 0xaf, 0x57, 0xa, 0x16, 0xfb, 0xdd, 0x9e, 0xa2, 0x9f, 0xa3, 0xde, 0xf4, 0xbe, 0x91, 0x20, 0x58, 0x32, 0x1a, 0x8b, 0x72, 0xc, 0x5c, 0x10, 0x2e, 0x48, 0xa6, 0xe7, 0xed, 0x6f, 0x88, 0x38, 0xd4, 0x0, 0xdd, 0x57, 0xd0, 0x6e, 0xed, 0xbc, 0xd1, 0x53, 0x23, 0xf8, 0x6d, 0x85, 0x5c, 0x94, 0xb2, 0x1e, 0x41, 0xb1, 0x4e, 0xc9, 0xe1, 0xbb, 0xc8, 0x1, 0x92, 0x11, 0xfd, 0x88, 0x13, 0x8c, 0x91, 0xf9, 0xab, 0xbd, 0x9b, 0xb3, 0x91, 0x4d, 0x26, 0xc1, 0xdd, 0xc2, 0x16, 0x73, 0xd2, 0xd5, 0x12, 0x63, 0xb3, 0x9d, 0x66, 0xe7, 0x41, 0xd9, 0x24, 0xcf, 0x2b, 0x19, 0x2c, 0x5d, 0x2c, 0x1a, 0x14, 0x1, 0x26, 0xa3, 0xd6, 0x4a, 0x2c, 0x77, 0xbe, 0x6c, 0x2c, 0x6e, 0xbe, 0x85, 0x99, 0x97, 0x8a, 0xe9, 0xb, 0xd3, 0x6c, 0xbb, 0x9a, 0xf6, 0x4d, 0x7, 0x89, 0x10, 0xc4, 0x9, 0x4a, 0xb3, 0xbf, 0x39, 0x9c, 0x34, 0xf2, 0xab, 0x8e, 0xf8, 0x43, 0xe9, 0xfe, 0x1b, 0xf8, 0x8b, 0xf4, 0x43, 0xba, 0x21, 0xe4, 0x37, 0x7e, 0x5f, 0x49, 0xc0, 0x7f, 0xd9, 0x65, 0x3b, 0x52, 0x6e, 0x14, 0x56, 0x22, 0x37, 0xf0, 0x2d, 0x11, 0xb9, 0x4, 0xbc, 0xa6, 0xac, 0x31, 0xae, 0x72, 0x1a, 0x43, 0xe3, 0xc4, 0x91, 0xa, 0x24, 0xaf, 0x6f, 0x4d, 0x80, 0xc0, 0x31, 0xc1, 0x9, 0xfc, 0xf, 0xe4, 0x9f, 0x15, 0x27, 0x4b, 0xca, 0x92, 0xbd, 0xa0, 0x4c, 0x3b, 0x41, 0x96, 0xc1, 0x92, 0xf6, 0xce, 0x48, 0x9c, 0x63, 0xa8, 0x6, 0xac, 0xfc, 0x89, 0x5a, 0xb5, 0x2c, 0xad, 0x65, 0x7c, 0x17, 0x83, 0xb5, 0x28, 0xe1, 0x2d, 0xe, 0xd8, 0x56, 0xe1, 0xf8, 0xfc, 0x91, 0xf2, 0xaa, 0xfd, 0xfa, 0xa, 0x92, 0x49, 0x8d, 0x68, 0x53, 0x7, 0x72, 0xee, 0x73, 0xb3, 0x59, 0xfc, 0xf1, 0x41, 0x8d, 0x10, 0x96, 0xc4, 0x6b, 0x34, 0xdc, 0xf9, 0xe, 0x5b, 0x46, 0x8b, 0xbb, 0x29, 0x70, 0xbe, 0xcb, 0xd7, 0x0, 0x89, 0xcf, 0xb0, 0x39, 0xd6, 0x4c, 0xc5, 0xf, 0xff, 0x5e, 0xef, 0x26, 0x38, 0x4d, 0x34, 0xf2, 0x45, 0x15, 0xa6, 0x55, 0x8b, 0x6, 0xa1, 0xfd, 0xd8, 0x8f, 0x10, 0x50, 0xc5, 0xbd, 0x78, 0xcc, 0x6e, 0xd8, 0x3d, 0x4c, 0x2b, 0xe, 0x88, 0x2a, 0xeb, 0xcf, 0x84, 0xaf, 0xb0, 0x43, 0xd, 0xb, 0xf0, 0x9f, 0x2f, 0xb4, 0x2b, 0x8b, 0x45, 0x89, 0x15, 0x80, 0x93, 0xa7, 0x70, 0x9a, 0xae, 0x75, 0xa7, 0x90, 0x91, 0xe, 0x21, 0x1e, 0xe1, 0x33, 0x3f, 0xfb, 0x6f, 0xd8, 0x7, 0x78, 0xda, 0x3b, 0xf7, 0x38, 0x58, 0x97, 0x8e, 0x9d, 0xd6, 0x47, 0x97, 0x88, 0x41, 0xb1, 0x80, 0x1, 0xdb, 0xaa, 0xea, 0x43, 0xca, 0xc, 0xa, 0x3, 0xdb, 0xb9, 0xbc, 0xf3, 0xc, 0xe7, 0x6a, 0x6f, 0x4b, 0x2c, 0xf2, 0xa9, 0xb6, 0x53, 0x1b, 0x3e, 0x40, 0x51, 0xe7, 0xe0, 0x50, 0x90, 0xcd, 0x42, 0x1b, 0xc6, 0x6c, 0x47, 0x31, 0xe7, 0x12, 0x2a, 0xd1, 0x29, 0xfc, 0x42, 0xde, 0xdc, 0x83, 0xbb, 0x46, 0xe, 0x3f, 0x88, 0x99, 0x92, 0xfb, 0xd3, 0xca, 0x7, 0x26, 0x86, 0xe5, 0x6b, 0x72, 0xc7, 0x20, 0xfb, 0xc9, 0x8d, 0x72, 0x3e, 0xf7, 0xf2, 0x47, 0x28, 0x6f, 0x77, 0xcc, 0xdd, 0xc7, 0x28, 0x73, 0x8e, 0x94, 0x1b, 0x1a, 0x74, 0xd4, 0xf1, 0x66, 0x71, 0xc2, 0x1f, 0xdd, 0x56, 0x43, 0xa1, 0x15, 0xdd, 0xbc, 0xb8, 0x8e, 0xe7, 0xec, 0x67, 0xea, 0x66, 0xfd, 0x2b, 0xce, 0x71, 0x8d, 0xf6, 0xe0, 0x85, 0xd4, 0xb5, 0xfc, 0x71, 0xa7, 0x26, 0x96, 0x63, 0x6a, 0x8f, 0x7b, 0x3a, 0x68, 0xaf, 0xa5, 0x1a, 0x89, 0x67, 0x71, 0xfa, 0xaa, 0x7f, 0x1f, 0x82, 0x74, 0x30, 0xac, 0x5e, 0x80, 0x89, 0xdb, 0xc0, 0xd4, 0x17, 0x5e, 0x1b, 0x22, 0xa0, 0x57, 0xbc, 0x5f, 0x17, 0x24, 0xea, 0xdc, 0x1a, 0x41, 0xe7, 0x8f, 0xa3, 0xac, 0xaa, 0x8b, 0x97, 0xe5, 0xf2, 0xe1, 0x9e, 0xf9, 0xd5, 0x9a, 0xe1, 0x2b, 0x4, 0xe7, 0xf0, 0xe8, 0xa6, 0x21, 0xe0, 0x98, 0xa6, 0x69, 0x10, 0xe2, 0xa5, 0xed, 0x21, 0x2, 0xb8, 0x24, 0xcd, 0x3e, 0xa0, 0x44, 0xa8, 0x54, 0xf1, 0xcd, 0xb, 0x33, 0xe6, 0x1e, 0x7f, 0x73, 0x74, 0x14, 0xb2, 0x95, 0x35, 0x49, 0xf2, 0x5d, 0xd3, 0x4d, 0x19, 0xaa, 0x19, 0x81, 0xde, 0x7c, 0xd5, 0x64, 0x9f, 0xf6, 0xc6, 0x36, 0x4a, 0x4f, 0x25, 0x31, 0x2e, 0xf6, 0x23, 0x95, 0xa7, 0x47, 0xab, 0x88, 0xaa, 0xd7, 0x22, 0xc0, 0x5a, 0xec, 0x40, 0xde, 0xea, 0x8e, 0xee, 0x5e, 0x77, 0x9e, 0xf4, 0x58, 0xa6, 0x88, 0x40, 0xbc, 0x6b, 0xd5, 0xd2, 0x9a, 0xd4, 0xf, 0x98, 0xb3, 0xae, 0x1, 0xb, 0x62, 0x13, 0x37, 0x2a, 0xbb, 0x7b, 0xb8, 0xb8}, - output224: []byte{0x97, 0x49, 0x5b, 0xfe, 0xda, 0xf1, 0xca, 0xb1, 0x8e, 0x85, 0x19, 0xb, 0x37, 0x47, 0x29, 0xf5, 0x54, 0x3f, 0xa3, 0xf1, 0xcd, 0x88, 0x43, 0x81, 0x56, 0xf0, 0x1a, 0xc}, - output256: []byte{0xc7, 0x49, 0xb, 0x5, 0xb1, 0x72, 0xa1, 0xdb, 0xaa, 0xa6, 0x6f, 0xaa, 0x82, 0x31, 0x8, 0xd4, 0x4c, 0x82, 0xf1, 0xe8, 0x2a, 0x41, 0xfd, 0x57, 0xfd, 0x95, 0x0, 0xf, 0x30, 0xde, 0x74, 0x7e}, - output384: []byte{0x96, 0xac, 0x67, 0xd6, 0xc9, 0xb, 0xe8, 0x1e, 0x7f, 0x5e, 0xf0, 0x52, 0xc4, 0xcd, 0xe5, 0x2c, 0x89, 0x1f, 0x48, 0xfe, 0x9e, 0x38, 0x77, 0x58, 0xda, 0x5d, 0xcd, 0xf1, 0x3a, 0x7, 0xf7, 0x5d, 0xe1, 0x7f, 0xc0, 0x3c, 0x61, 0x37, 0x99, 0x9a, 0xb1, 0xde, 0xc, 0xe9, 0xe, 0x15, 0xea, 0xd5}, - output512: []byte{0x6e, 0x1, 0x6, 0x24, 0xe0, 0xc2, 0x58, 0x9f, 0x52, 0xa7, 0xfa, 0xbb, 0x75, 0xb0, 0x77, 0xc8, 0x6d, 0xf0, 0x4e, 0x4b, 0xe6, 0xfc, 0x73, 0x6d, 0xd0, 0x3, 0x46, 0x23, 0x13, 0x70, 0xa9, 0xa0, 0xf6, 0x71, 0x5e, 0x68, 0x3f, 0x97, 0x33, 0x22, 0x6c, 0x6a, 0xad, 0x19, 0x47, 0xeb, 0x46, 0x6c, 0x7d, 0xb7, 0x99, 0x79, 0xdd, 0x36, 0x7c, 0x33, 0x90, 0xd, 0x97, 0x27, 0xbd, 0xba, 0x24, 0xa9}}, - testcase{ - msg: []byte{0xd9, 0x25, 0x70, 0x4, 0x99, 0x3c, 0x7a, 0xe5, 0xd, 0x20, 0xf5, 0x34, 0xb4, 0x2b, 0x4e, 0xc3, 0x9b, 0xf3, 0x58, 0x39, 0x3b, 0x9f, 0xb5, 0xc8, 0xe3, 0x7f, 0x87, 0xac, 0x73, 0x61, 0x35, 0x45, 0x54, 0xbe, 0x59, 0x6f, 0x40, 0xe6, 0x7b, 0x2e, 0xd4, 0x99, 0x88, 0x7e, 0x26, 0xdc, 0x43, 0x5c, 0x43, 0x31, 0xcd, 0xe3, 0xbf, 0x1a, 0x11, 0x8f, 0x60, 0xfd, 0x82, 0x14, 0x77, 0xff, 0xa3, 0xb9, 0x2f, 0x64, 0x69, 0x56, 0x8c, 0xd2, 0xcd, 0xa6, 0xfc, 0xa, 0x2b, 0x13, 0x90, 0x6a, 0xe4, 0x59, 0xcf, 0x5d, 0x54, 0x17, 0xde, 0x2c, 0xe1, 0x4, 0xd0, 0xb6, 0x49, 0x9d, 0x36, 0x83, 0xbe, 0xb4, 0x7, 0x15, 0x58, 0x2c, 0xe7, 0xd, 0xed, 0x5c, 0x5f, 0x84, 0x61, 0xed, 0xea, 0xa3, 0x8b, 0xfa, 0x31, 0x97, 0x96, 0x61, 0xa2, 0xdc, 0x96, 0xd9, 0x26, 0x30, 0x71, 0x28, 0xf7, 0x77, 0x0, 0xf2, 0xc7, 0xd3, 0x8b, 0x8a, 0x9d, 0x6c, 0x6f, 0x70, 0xa3, 0x97, 0x30, 0x5, 0x35, 0xf, 0x93, 0x8b, 0x9b, 0x4a, 0x64, 0xe2, 0x28, 0xcc, 0x3b, 0x3f, 0x9c, 0x4f, 0xd4, 0x46, 0xfc, 0x65, 0xa, 0xa6, 0x37, 0x71, 0x52, 0xd7, 0xf4, 0x69, 0x3, 0xd8, 0xec, 0x8e, 0x93, 0x40, 0x71, 0xe, 0x28, 0x47, 0x5c, 0xf2, 0x1e, 0x64, 0x17, 0x37, 0xe7, 0xd7, 0xda, 0x3c, 0xdf, 0x18, 0xd0, 0x1c, 0x8f, 0x37, 0x13, 0x1e, 0x72, 0x7c, 0x72, 0x74, 0xb2, 0xdb, 0x75, 0x9c, 0x55, 0x86, 0xfb, 0x84, 0xec, 0x36, 0xa5, 0xce, 0x2d, 0x82, 0xe, 0x55, 0x3d, 0xe6, 0x42, 0x6b, 0x8b, 0x96, 0x11, 0x12, 0x95, 0xc1, 0x9d, 0xba, 0x8d, 0x17, 0xa2, 0xb7, 0x4, 0x7f, 0xcd, 0xf6, 0x62, 0xa5, 0x9c, 0x2a, 0xf2, 0x7a, 0x9a, 0xbe, 0xe3, 0x7a, 0x7f, 0x8a, 0xfc, 0x6, 0x94, 0x43, 0x46, 0xe3, 0x43, 0xe7, 0x79, 0xeb, 0xd8, 0x95, 0x11, 0x9d, 0x74, 0x60, 0xe7, 0xda, 0x99, 0x89, 0x62, 0xfb, 0x11, 0x0, 0xe9, 0x50, 0xa8, 0xd7, 0xfe, 0x21, 0x43, 0x60, 0xad, 0x26, 0x3b, 0x8d, 0x7, 0xf, 0x2b, 0x7d, 0xc9, 0x1c, 0x9d, 0x77, 0xc6, 0x69, 0x2d, 0xa0, 0xf4, 0x72, 0xa0, 0xa4, 0x64, 0x6a, 0x1e, 0xdb, 0x6, 0x9c, 0xcd, 0x9c, 0xe4, 0xca, 0x6f, 0xc2, 0x47, 0x13, 0xd6, 0x50, 0x15, 0x3b, 0x9a, 0x25, 0x3d, 0xb5, 0x13, 0x6a, 0x37, 0x10, 0x19, 0x8e, 0x60, 0x93, 0x4d, 0xd2, 0x5, 0x33, 0x15, 0xd3, 0x13, 0xe2, 0x7d, 0xd2, 0xc6, 0xff, 0xd2, 0xec, 0xf0, 0x28, 0x62, 0x5f, 0xe, 0x93, 0x7a, 0xfd, 0x8c, 0x2f, 0xfb, 0x1f, 0x64, 0x6e, 0x51, 0xa7, 0x68, 0x20, 0x4d, 0x83, 0xa6, 0x49, 0x79, 0x8a, 0x51, 0xb8, 0xe8, 0x7f, 0xcd, 0xda, 0x7b, 0xdd, 0xf5, 0x8e, 0xd9, 0x43, 0xbb, 0x7e, 0x29, 0xc7, 0xd7, 0xc5, 0xdf, 0xf0, 0x24, 0x54, 0x5f, 0x6a, 0x68, 0x9a, 0xa0, 0xe7, 0x27, 0xfe, 0xcd, 0x80, 0xb5, 0x61, 0x1, 0x1a, 0x73, 0x1a, 0xcd, 0xd9, 0xb3, 0xf2, 0x83, 0x12, 0x30, 0x98, 0xba, 0x66, 0xb6, 0xb9, 0xfc, 0xe6, 0x12, 0x3b, 0x35, 0xb6, 0xf3, 0xa2, 0xe, 0xf1, 0x5, 0x5b, 0xe9, 0xe2, 0x57, 0xcd, 0xe9, 0x7e, 0x5a, 0xf4, 0x1e, 0xb7, 0x96, 0x43, 0x87, 0x27, 0xa6, 0x2a, 0xa6, 0x65, 0xcc, 0x9b, 0x77, 0x1c, 0x4a, 0x20, 0x52, 0xef, 0xac, 0x61, 0xbc, 0x91, 0xbc, 0xdf, 0x57, 0x3f, 0x72, 0x63, 0x10, 0x7d, 0x44, 0xdf, 0xeb, 0x12, 0x5e, 0x66, 0xd1, 0xf3, 0xdd, 0xed, 0x3b, 0xd6, 0x38, 0x45, 0xaf, 0x3b, 0xf4, 0x18, 0x5a, 0x9a, 0x24, 0xa7, 0xf4, 0xb7, 0x77, 0xc3, 0x24, 0x96, 0xa6, 0x10, 0x7b, 0x7a, 0xc9, 0x40, 0xaf, 0x24, 0xbe, 0x98, 0x3f, 0x6a, 0x75, 0x8e, 0x50, 0x64, 0xf8, 0x71, 0x7e, 0xab, 0xbb, 0x86, 0xe6, 0xaa, 0xda, 0x7d, 0xa7, 0x5f, 0x72, 0xab, 0xed, 0x59, 0xa4, 0x2d, 0xe8, 0x2b, 0x1a, 0xa2, 0x64, 0x2f, 0x5e, 0xf1, 0xb2, 0xe7, 0x30, 0x4f, 0x64, 0x2e, 0xb2, 0xaa, 0xfb, 0xf0, 0xc, 0x11, 0x83, 0xd9, 0xb5, 0xfb, 0x83, 0x89, 0x3e, 0xdd, 0x48, 0xe9, 0x3, 0x4d, 0xc7, 0xa7, 0xab, 0x66, 0xf3, 0xf3, 0x92, 0xf9, 0x66, 0x6c, 0x0, 0xec, 0xc9, 0x74, 0x3a, 0xc4, 0xf7, 0x77, 0xed, 0xcf, 0x47, 0xb6, 0x81, 0x8a, 0x34, 0xb7, 0x39, 0x2b, 0x4a, 0xb8, 0xe3, 0x88, 0x91, 0xfa, 0xb4, 0x1, 0x8d, 0xfb, 0x99, 0xaf, 0x6, 0x36, 0x91, 0x15, 0xd6, 0xc, 0x4f, 0xa0, 0x73, 0x24, 0xd, 0x9c, 0x26, 0x5, 0xe0, 0x20, 0xa4, 0x2d, 0xb2, 0xe1, 0xe0, 0xae, 0x4a, 0xde, 0x3a, 0x4, 0xb8, 0x25, 0x92, 0x7a, 0x5, 0xd4, 0xfe, 0x3f, 0x50, 0xc1, 0xc7, 0xad, 0xd7, 0xa4, 0x96, 0xda, 0x7e, 0x95, 0x82, 0x5c, 0x6, 0x43, 0x15, 0x19, 0x6c, 0x20, 0x7, 0x52, 0x4d, 0x1e, 0x1e, 0xf2, 0xc5, 0x13, 0x3, 0xdd, 0x12, 0x3, 0xab, 0x66, 0xd9, 0xfe, 0x89, 0xde, 0x55, 0x3c, 0xb4, 0xb9, 0x5a, 0x6c, 0x5d, 0x62, 0x9b, 0x89, 0xb7, 0x11, 0x64, 0x63, 0xee, 0x10, 0xab, 0x3c, 0xf2, 0xc2, 0x61, 0x5f, 0x95, 0x74, 0x1c, 0xa2, 0x26, 0xf9, 0xe9, 0xa2, 0xe, 0x99, 0x30, 0x38, 0x88, 0xf7, 0x25, 0xc7, 0x74, 0x76, 0x53, 0x3b, 0x4c, 0x39, 0x37, 0x63, 0x17, 0xf, 0x18, 0xf2, 0x92, 0xc8, 0x9a, 0x22, 0xdf, 0x68, 0xea, 0xbd, 0xb8, 0x1a, 0xef, 0x11, 0xcc, 0x2a, 0xc3, 0x29, 0xc1, 0x74, 0xbd, 0xae, 0x5d, 0x3c, 0xc0, 0xbd, 0xce, 0xa6, 0xeb, 0x22, 0x5e, 0x0, 0xc1, 0x50, 0x21, 0x43, 0x22, 0x64, 0xba, 0x7c, 0x5e, 0xb4, 0x9a, 0x49, 0x23, 0x1d, 0x1f, 0x7a, 0x13, 0xaf, 0xc2, 0x38, 0xbd, 0x4e, 0xfc, 0x4, 0xda, 0x3c, 0x15, 0xae, 0xb, 0xb7, 0xd6, 0x93, 0xa0, 0x15, 0xe, 0x6a, 0x5a, 0xd9, 0xb1, 0xe1, 0x1a, 0x49, 0xb, 0x3c, 0xe9, 0xc, 0x2, 0x74, 0x42, 0x50, 0x16, 0x84, 0xc5, 0x28, 0xfe, 0x26, 0x8, 0x81, 0x16, 0x2d, 0x9e, 0x5e, 0xf8, 0x4d, 0x6e, 0x4f, 0x73, 0xf2, 0x22, 0xe7, 0x79, 0xe5, 0x8b, 0x71, 0xd5, 0x17, 0x6d, 0x9a, 0x27, 0xf6, 0x5e, 0x49, 0xd8, 0x3e, 0xfb, 0xb2, 0xd7, 0x81, 0xe, 0x5b, 0x6, 0x61, 0x9d, 0x8c, 0xef, 0x7e, 0x7b, 0x51, 0xcd, 0xfb, 0x6e, 0x81, 0x38, 0xe4, 0xcf, 0x56, 0x74, 0x24, 0x2f, 0x94, 0x7e, 0xac, 0x13, 0xfa, 0xd0, 0x8d, 0x68, 0xa8, 0xa1, 0x1a, 0xac, 0x97, 0x54, 0xa5, 0x31, 0x6c, 0x93, 0x73, 0x8b, 0xa7, 0xf3, 0xc3, 0xbd, 0x2e, 0x82, 0x7a}, - output224: []byte{0xb9, 0xcb, 0xbf, 0x5f, 0x95, 0x4c, 0xfe, 0x7a, 0x56, 0x17, 0xa1, 0x7d, 0xad, 0x9c, 0x43, 0x9f, 0xbf, 0x2a, 0x7, 0x1e, 0xfb, 0x4f, 0x3c, 0x23, 0x3c, 0xb, 0x3d, 0xf0}, - output256: []byte{0x18, 0x36, 0x42, 0x46, 0x8b, 0xe2, 0x70, 0x7c, 0x33, 0x49, 0x13, 0x2c, 0xd3, 0xb0, 0x63, 0x3a, 0xa6, 0x3e, 0x57, 0x52, 0x48, 0x8c, 0x3a, 0xdc, 0xd, 0x50, 0x12, 0x65, 0xff, 0x5, 0x29, 0xb0}, - output384: []byte{0x98, 0x72, 0xc7, 0xe0, 0x59, 0x40, 0x6, 0xc8, 0xb5, 0x9c, 0x37, 0x19, 0xaf, 0x32, 0x82, 0x1a, 0x60, 0xc, 0x26, 0x4d, 0x5e, 0xde, 0x1e, 0x16, 0x8f, 0x3f, 0x8c, 0x3f, 0x94, 0xfe, 0xd3, 0x7e, 0xcc, 0xb1, 0x30, 0xc0, 0x41, 0x29, 0x3, 0x93, 0xf3, 0x2d, 0xf6, 0x9f, 0x4, 0xf7, 0x8, 0xf9}, - output512: []byte{0x1c, 0x91, 0x35, 0xe7, 0x9d, 0x19, 0xd0, 0x5f, 0x45, 0xe3, 0x25, 0x20, 0x1, 0x21, 0x99, 0xb4, 0xa4, 0x63, 0x33, 0xb5, 0x48, 0xa5, 0xa5, 0xf2, 0x61, 0x6a, 0xfc, 0x78, 0x92, 0x3e, 0x6, 0x4f, 0x1f, 0x21, 0xea, 0x2, 0x49, 0x67, 0x0, 0x54, 0x7e, 0xcc, 0x19, 0xd3, 0x34, 0x51, 0x2d, 0xfe, 0x93, 0x20, 0x19, 0x50, 0x5b, 0xa6, 0x44, 0x81, 0x45, 0x87, 0x9d, 0x42, 0xb2, 0xab, 0x72, 0x2f}}, - testcase{ - msg: []byte{0x9, 0xcf, 0x13, 0x2a, 0xb9, 0x43, 0x65, 0x41, 0x84, 0xa3, 0xfc, 0x8d, 0x3, 0x68, 0xb4, 0x21, 0xfd, 0xac, 0x4e, 0xf1, 0x8, 0x1a, 0x29, 0xf3, 0x69, 0x1a, 0x52, 0x7f, 0xbd, 0xbd, 0x74, 0xc6, 0x37, 0x22, 0x33, 0xb3, 0x8d, 0xc4, 0x32, 0xba, 0x61, 0xf, 0x9c, 0x54, 0xfa, 0x68, 0x69, 0x9f, 0x9e, 0xc2, 0xa6, 0xbf, 0xb0, 0xb2, 0xcf, 0x7a, 0xa6, 0xd1, 0xa, 0xe2, 0x20, 0x7a, 0x75, 0x54, 0x16, 0x3a, 0xa1, 0x4f, 0xb6, 0xa9, 0xcf, 0xa0, 0x23, 0xce, 0x63, 0x54, 0x6b, 0x7b, 0x2, 0xaf, 0x3, 0x37, 0xa, 0x89, 0x9e, 0xa7, 0x3b, 0x27, 0xbd, 0xb5, 0xc3, 0x80, 0x61, 0x3c, 0xe, 0xa6, 0x70, 0xc6, 0x59, 0x80, 0x3d, 0x5f, 0x6f, 0x75, 0xc0, 0xce, 0x62, 0xb3, 0x11, 0xdc, 0x15, 0x7d, 0xe8, 0x43, 0xa9, 0x39, 0x5, 0xe7, 0xa2, 0x8a, 0x25, 0x57, 0x68, 0x4a, 0xe3, 0xdb, 0x4f, 0xd0, 0x9, 0x41, 0x2a, 0x10, 0x70, 0x98, 0xf8, 0x81, 0xdc, 0x6, 0x62, 0x2e, 0xd9, 0xe3, 0xdf, 0x2c, 0x8f, 0xe6, 0x9f, 0xe5, 0xb, 0xfa, 0xe1, 0x58, 0xb8, 0x7c, 0xa7, 0x61, 0xfe, 0x1e, 0x22, 0x18, 0x56, 0x61, 0xb, 0xca, 0x30, 0x1e, 0xe6, 0x89, 0x58, 0xc2, 0x5b, 0xf5, 0x8d, 0x3b, 0xe2, 0x3, 0xaf, 0x92, 0x8a, 0x91, 0x9a, 0xce, 0x53, 0xc3, 0xd9, 0x9f, 0x55, 0xab, 0x0, 0xdf, 0xc8, 0xa1, 0xa2, 0x8a, 0xb8, 0x3e, 0x78, 0x61, 0x7f, 0x19, 0x4e, 0xfc, 0x46, 0xda, 0xa7, 0x75, 0x73, 0xd0, 0x2f, 0xfc, 0xaa, 0x1f, 0x9d, 0x96, 0xfd, 0x8d, 0xa8, 0xde, 0xad, 0x3d, 0x4e, 0x75, 0xee, 0x5e, 0x65, 0xfc, 0x36, 0xb, 0x2a, 0x56, 0x7c, 0xd3, 0x4d, 0x52, 0xbc, 0x9a, 0xab, 0x8b, 0x71, 0x16, 0x3, 0x12, 0xe8, 0xe2, 0x1a, 0xa5, 0x6, 0x10, 0x5d, 0x66, 0x44, 0xe6, 0x86, 0x3e, 0x7d, 0x5e, 0x75, 0xed, 0x47, 0xc1, 0x76, 0x7, 0x43, 0xd1, 0x13, 0xa4, 0x52, 0x65, 0x53, 0xb3, 0x3, 0x34, 0x1f, 0xce, 0xe5, 0xfd, 0xd0, 0x5, 0xd3, 0x59, 0x29, 0xf2, 0xaf, 0xa7, 0x60, 0xbb, 0x83, 0x14, 0xd0, 0xc0, 0xea, 0xc9, 0x60, 0xfd, 0xa3, 0x26, 0x3a, 0x1e, 0x66, 0x88, 0x9, 0x82, 0x51, 0x61, 0x8c, 0x90, 0x33, 0x20, 0x5, 0xc7, 0x57, 0xaf, 0x95, 0x87, 0x14, 0x57, 0x1b, 0x77, 0xbf, 0x2a, 0x69, 0x3, 0xd, 0x99, 0xf7, 0x1d, 0x1a, 0x52, 0x59, 0x65, 0x8b, 0xe5, 0x65, 0xfb, 0xd0, 0x98, 0x7, 0x1, 0x22, 0xc4, 0x3e, 0xdf, 0xd4, 0x0, 0x99, 0x9c, 0x90, 0xa9, 0x8a, 0xce, 0x95, 0x31, 0x5f, 0xae, 0xe4, 0xf1, 0xc0, 0x44, 0x1c, 0x93, 0x15, 0xd5, 0x27, 0xc7, 0xff, 0x1a, 0x81, 0x71, 0x41, 0x5d, 0x2a, 0x7, 0x6e, 0x2c, 0x51, 0x3d, 0x40, 0xb0, 0x3c, 0xfe, 0x55, 0x13, 0xc0, 0xe7, 0x4e, 0xa3, 0xa0, 0x3a, 0xd4, 0x95, 0x8c, 0x0, 0xa3, 0xe1, 0x91, 0x6d, 0x34, 0x27, 0x3e, 0x30, 0x1d, 0x51, 0x7b, 0xa, 0x5e, 0x77, 0x3, 0x93, 0x88, 0xd, 0x9a, 0xfb, 0x4d, 0xe, 0xb4, 0x4d, 0x31, 0x40, 0xff, 0x7d, 0x82, 0x7c, 0x48, 0xf6, 0x7c, 0x6d, 0x92, 0xb8, 0x65, 0xd8, 0xfe, 0x7c, 0x7e, 0x45, 0xaa, 0x50, 0xdf, 0xd8, 0x52, 0x5f, 0x53, 0xd, 0xe1, 0x18, 0x8f, 0x3a, 0xf9, 0x8b, 0x3d, 0xc6, 0x25, 0xd3, 0x35, 0xe1, 0x91, 0xfb, 0xad, 0x5e, 0xe9, 0xdf, 0x9, 0xc9, 0x7b, 0x43, 0xf2, 0x3, 0xbf, 0xed, 0x79, 0x8f, 0x7d, 0x17, 0x1b, 0xf0, 0xc, 0x82, 0xea, 0xe, 0xd1, 0x7d, 0x58, 0x90, 0xc3, 0xd6, 0xb9, 0xef, 0x6f, 0xdc, 0x4, 0xc5, 0xff, 0xb6, 0x45, 0xe3, 0x5, 0x4, 0x6, 0xfe, 0x2f, 0xb6, 0xbd, 0xbe, 0x2f, 0xfe, 0x8, 0x3e, 0x75, 0x1d, 0xc1, 0x9f, 0x2f, 0x6, 0x44, 0x53, 0x97, 0x1, 0x9b, 0x61, 0xcf, 0x1f, 0x50, 0x58, 0x75, 0x52, 0xf, 0x9, 0xc6, 0xb7, 0x19, 0xe6, 0x42, 0xb8, 0x1b, 0x2f, 0xbf, 0xbd, 0xcc, 0x7, 0x2b, 0x79, 0x81, 0xa6, 0x66, 0xd5, 0x1e, 0x70, 0x65, 0xe2, 0x12, 0x44, 0x67, 0x9d, 0xfe, 0x5, 0x6b, 0xc9, 0xd4, 0x2b, 0x88, 0x51, 0xf9, 0xd2, 0x90, 0x5f, 0xd8, 0x38, 0x70, 0x7b, 0x27, 0x9a, 0x81, 0x6, 0xeb, 0x89, 0x4b, 0x60, 0xa7, 0x2e, 0x48, 0x51, 0xc3, 0x44, 0x11, 0x9c, 0xee, 0xb5, 0xbb, 0xe1, 0x10, 0xb1, 0xc5, 0xb2, 0x1c, 0x9a, 0x5f, 0x75, 0x45, 0x28, 0x30, 0x2, 0xd4, 0xb1, 0xc1, 0x15, 0x30, 0x8b, 0x1c, 0xb2, 0xf, 0x6d, 0x9c, 0xb8, 0x69, 0xed, 0x4, 0x59, 0xc5, 0x69, 0x66, 0x2a, 0xa5, 0x72, 0x9a, 0x7d, 0x71, 0x78, 0xde, 0x7d, 0x69, 0xe4, 0x88, 0x5c, 0xa7, 0x7c, 0x1, 0x1e, 0x78, 0x5e, 0xcf, 0xe, 0x2e, 0xcb, 0xb8, 0xf5, 0x24, 0x55, 0x79, 0xdb, 0xef, 0x7a, 0x5e, 0xb3, 0x3, 0x7, 0xe0, 0xb4, 0xb, 0x81, 0x7b, 0xd1, 0x11, 0x2d, 0x28, 0xee, 0xfd, 0x54, 0x83, 0x74, 0xbc, 0x86, 0x7e, 0xc, 0x34, 0xd2, 0x23, 0x69, 0x52, 0xb9, 0xf8, 0x59, 0x90, 0x3e, 0x87, 0xe9, 0x77, 0x19, 0xf, 0xf9, 0x4f, 0x5d, 0x81, 0x56, 0x99, 0x15, 0x4f, 0x96, 0xe5, 0x44, 0x9d, 0xdc, 0x1a, 0x14, 0xe4, 0x19, 0x6c, 0x83, 0xe4, 0xfb, 0x2, 0xf5, 0xf5, 0x8c, 0x30, 0xee, 0xed, 0x69, 0x1d, 0xe4, 0x7c, 0x81, 0xf4, 0x88, 0x3b, 0xd8, 0x4f, 0x6e, 0xd7, 0x11, 0xfe, 0xd0, 0xc1, 0x98, 0xbf, 0xa2, 0xb8, 0x29, 0x61, 0x82, 0xd7, 0x22, 0x5e, 0x89, 0x89, 0xac, 0xf5, 0x5d, 0x36, 0x12, 0xa9, 0x3e, 0x77, 0xd2, 0x4f, 0x7b, 0x6e, 0xef, 0x81, 0x3f, 0xd5, 0x14, 0xce, 0x21, 0x83, 0x57, 0x16, 0x2, 0x97, 0x63, 0x91, 0xf5, 0xac, 0x4e, 0x86, 0xda, 0x59, 0xa6, 0x42, 0x33, 0x23, 0xf, 0xb6, 0x7f, 0xf0, 0xbb, 0x9e, 0xc4, 0x6, 0x67, 0xf5, 0x4c, 0xcb, 0x23, 0x5d, 0x4, 0xb3, 0xfe, 0x1d, 0x9a, 0x47, 0xe1, 0x63, 0xcb, 0x19, 0xc3, 0x16, 0x4, 0x6f, 0xc1, 0x35, 0x3a, 0x66, 0x42, 0x21, 0x9e, 0x9c, 0xec, 0xf6, 0xe3, 0x15, 0x1c, 0xf, 0x4f, 0xae, 0x11, 0x77, 0xb6, 0x7f, 0x19, 0xb4, 0x96, 0x4d, 0xf9, 0x6b, 0xb6, 0xaf, 0x37, 0x1, 0x2b, 0x8e, 0xa9, 0xe5, 0xee, 0x24, 0xc5, 0x7a, 0x1, 0xc, 0x87, 0x2b, 0x15, 0xc8, 0xa6, 0x5d, 0x2, 0x66, 0x58, 0x9f, 0x6d, 0xa2, 0xe, 0x38, 0xd9, 0xbe, 0x2e, 0x2c, 0x21, 0x5c, 0x69, 0xf5, 0x58, 0x8, 0x4e, 0x48, 0xee, 0xb6, 0x1f, 0x4e, 0xaa, 0xe8, 0x3c, 0x57, 0xf3, 0xf1, 0xcd, 0x8, 0xd0, 0x57, 0x83, 0xfb, 0x9f, 0x5a, 0xb1, 0xcd, 0xa5, 0xe4, 0xb8, 0x62, 0x91, 0xff, 0xfb, 0x14, 0xfe, 0x9b, 0x49, 0x7e, 0xc7, 0x32, 0x92, 0xbb, 0xd2, 0x95, 0xc5, 0x65, 0x7d, 0x71, 0xcc, 0x74, 0xd3, 0x8a, 0x2f, 0x3d, 0xb7, 0x3b, 0xa9, 0x72, 0x98, 0x6b, 0x71, 0x69, 0xf7, 0x6b, 0xa3, 0x76, 0x37, 0x6f, 0x47, 0x47, 0xed, 0x65, 0xf2, 0xf1, 0xa5, 0xe6, 0x78, 0x89, 0xaf, 0x38, 0xa3, 0x80}, - output224: []byte{0x65, 0x76, 0x51, 0xaa, 0x8d, 0x87, 0x15, 0xdb, 0x57, 0xff, 0x7f, 0x18, 0xea, 0x1f, 0x2a, 0x8c, 0xcd, 0xbc, 0x2d, 0x5b, 0xbe, 0xe8, 0xa5, 0x10, 0xeb, 0x3d, 0x3a, 0x27}, - output256: []byte{0xca, 0x37, 0x2b, 0xec, 0xea, 0xbf, 0x81, 0x70, 0xb0, 0x11, 0x27, 0xad, 0xd4, 0xd3, 0xf7, 0x9, 0xe1, 0x26, 0x7a, 0xfb, 0x3e, 0xfb, 0x42, 0x71, 0xe2, 0xe6, 0x8f, 0xe9, 0x55, 0x8, 0x3, 0x67}, - output384: []byte{0xee, 0x36, 0x27, 0x83, 0x2f, 0xbd, 0xf2, 0x54, 0xae, 0xd7, 0x1, 0x85, 0xd6, 0x8d, 0xbf, 0x87, 0x3c, 0x5f, 0x54, 0x82, 0xb6, 0xd1, 0x56, 0x38, 0x13, 0x88, 0xdf, 0xac, 0x4f, 0x33, 0x6b, 0x8e, 0x0, 0x5e, 0xed, 0xd2, 0xb8, 0x29, 0x8c, 0xa0, 0x9, 0x7, 0x88, 0xf0, 0xa6, 0xfa, 0x5f, 0x52}, - output512: []byte{0x75, 0xff, 0x7d, 0x8f, 0xa4, 0xb9, 0x37, 0xb, 0x5b, 0x81, 0xdd, 0x88, 0xb6, 0x46, 0xa2, 0xb5, 0x46, 0x3a, 0x8f, 0xfa, 0x49, 0x82, 0xfb, 0x90, 0xc5, 0x5b, 0x68, 0x1c, 0x27, 0x16, 0x19, 0x20, 0x8a, 0x1b, 0x24, 0xde, 0xa3, 0x2f, 0x79, 0xf1, 0x9d, 0x9a, 0x96, 0xdc, 0x64, 0x20, 0x96, 0xa5, 0xae, 0xc2, 0xaa, 0xd8, 0x28, 0xb3, 0x8e, 0x42, 0xcf, 0x3d, 0x9e, 0xc7, 0xf1, 0x23, 0x93, 0xbf}}, - testcase{ - msg: []byte{0x67, 0xb, 0x79, 0xc6, 0x3, 0xd, 0xa4, 0x36, 0x91, 0x46, 0xa7, 0xf1, 0x4e, 0x6b, 0xd3, 0x93, 0xdf, 0x72, 0x9b, 0x60, 0x36, 0x9d, 0x3d, 0x55, 0x46, 0x1e, 0x51, 0x87, 0xd4, 0xf8, 0xe8, 0x31, 0x14, 0xb2, 0x27, 0x52, 0x4e, 0xe9, 0x55, 0xf6, 0x4a, 0x2c, 0x60, 0x7d, 0xa8, 0x50, 0x23, 0x5a, 0x1b, 0x49, 0xfe, 0xc6, 0xeb, 0x51, 0xed, 0xc2, 0x19, 0x41, 0xdc, 0xc6, 0x7b, 0xd0, 0x74, 0x12, 0xcf, 0xe0, 0x58, 0xaf, 0x45, 0x5, 0xc3, 0x25, 0xd9, 0x49, 0x36, 0xee, 0x36, 0xde, 0x41, 0x33, 0x77, 0x3a, 0xcf, 0x66, 0x95, 0x15, 0xda, 0xf4, 0xed, 0x87, 0x50, 0x85, 0x89, 0xcf, 0x65, 0x17, 0x84, 0xa8, 0xc3, 0x82, 0xa, 0x88, 0xfb, 0xf7, 0xcb, 0x60, 0xe2, 0xa, 0x3, 0x5e, 0xcd, 0x6, 0x40, 0x5b, 0x50, 0xf6, 0xa1, 0x3a, 0x36, 0xe1, 0x74, 0x92, 0x5b, 0x4e, 0x33, 0x4e, 0x19, 0x7e, 0x1e, 0x5f, 0xe8, 0x68, 0x36, 0xac, 0xbc, 0x1a, 0xc6, 0x81, 0xcf, 0xd4, 0x2b, 0x2f, 0x11, 0xf7, 0x45, 0x87, 0x66, 0xd, 0xe8, 0x67, 0xeb, 0xba, 0x72, 0x22, 0xc3, 0xe8, 0x9b, 0x42, 0x95, 0x7a, 0xc4, 0x50, 0x8f, 0x9, 0xb2, 0xde, 0x9c, 0x3b, 0x57, 0xc8, 0x83, 0x13, 0x8f, 0xd, 0x44, 0x2a, 0x5, 0xd, 0x8a, 0xa3, 0x2, 0x3e, 0xa9, 0x20, 0x14, 0xf, 0x70, 0x23, 0x7a, 0xb2, 0x14, 0xbe, 0x9f, 0xa0, 0xc4, 0x52, 0xc5, 0x4b, 0x50, 0x20, 0x7, 0x7e, 0xcc, 0x1f, 0x5d, 0xdf, 0x5d, 0x95, 0x9a, 0x5a, 0xae, 0xaa, 0xcb, 0x38, 0x13, 0x55, 0xfd, 0x7b, 0x49, 0x3a, 0x1a, 0x51, 0xce, 0x83, 0xe6, 0xeb, 0x52, 0xcc, 0x61, 0x21, 0x4a, 0x2, 0xfa, 0xfb, 0x1, 0x59, 0x3d, 0x57, 0x30, 0xc7, 0x5, 0x8b, 0xf9, 0x10, 0x6b, 0x83, 0x14, 0xf1, 0x0, 0x52, 0x36, 0xe5, 0xbe, 0xce, 0xb3, 0x80, 0x5b, 0xac, 0x8f, 0xc4, 0x30, 0x8b, 0x20, 0x7, 0x82, 0x3b, 0xbd, 0xb3, 0xdc, 0x25, 0x4, 0x2d, 0x6a, 0xb7, 0x74, 0x59, 0x41, 0xb0, 0x55, 0xa7, 0x64, 0x8f, 0x99, 0xff, 0xda, 0xca, 0xca, 0x98, 0x1, 0x9, 0x4e, 0xa8, 0x6d, 0xbc, 0x9d, 0x2e, 0xf2, 0xb6, 0x1a, 0x97, 0xad, 0x5f, 0xb9, 0xff, 0x75, 0x41, 0x90, 0xa5, 0x29, 0xce, 0x65, 0xfe, 0x46, 0xaf, 0xda, 0x3c, 0xe, 0xae, 0xe, 0xc9, 0x8e, 0xd5, 0xb0, 0x89, 0x14, 0x8b, 0xe3, 0x58, 0xa8, 0xab, 0xa6, 0xb2, 0xf0, 0x14, 0xa5, 0xb7, 0x45, 0x47, 0xfd, 0xc0, 0x5, 0x1, 0xdd, 0xb1, 0x47, 0x2e, 0xf4, 0xad, 0x59, 0x2e, 0xfa, 0x80, 0x31, 0xb0, 0xa4, 0x37, 0x6d, 0xcc, 0xea, 0x87, 0x14, 0x57, 0x5b, 0xf0, 0x55, 0xb1, 0x2, 0x78, 0x24, 0xf4, 0x63, 0xe8, 0xaf, 0x11, 0xc, 0xcb, 0x52, 0x1b, 0x2f, 0x13, 0x63, 0xc0, 0xf1, 0x32, 0x56, 0xb7, 0x68, 0x64, 0x5a, 0x3, 0x77, 0x54, 0x1c, 0xf2, 0xf7, 0x3d, 0xa0, 0x3a, 0xf0, 0xc0, 0x26, 0xe5, 0x95, 0x70, 0xd6, 0x0, 0x7b, 0xaf, 0xc2, 0x97, 0xa4, 0x1d, 0xee, 0xeb, 0x32, 0xe7, 0x93, 0x64, 0xf9, 0xef, 0xff, 0x6f, 0x81, 0xb6, 0x9f, 0xdb, 0x99, 0xdb, 0xae, 0x4d, 0xdb, 0xa4, 0x60, 0x16, 0xf8, 0x6b, 0xe1, 0x15, 0x76, 0x93, 0xc6, 0x3c, 0xbc, 0xfe, 0x24, 0xc7, 0xb6, 0xdb, 0xc2, 0x26, 0x7, 0x98, 0xa6, 0xc3, 0x97, 0xbd, 0x91, 0xd4, 0xab, 0xe0, 0xd5, 0xc2, 0x3b, 0x43, 0x76, 0x9b, 0xb, 0xa2, 0x8b, 0x6b, 0x95, 0x4e, 0x66, 0x3, 0x5b, 0xdc, 0x52, 0xde, 0x3, 0xb3, 0x3c, 0xa0, 0x4, 0xb6, 0x70, 0xea, 0x6e, 0x34, 0x1b, 0x1, 0xad, 0xbc, 0x40, 0xde, 0x2f, 0x40, 0x6b, 0xfc, 0x46, 0x91, 0x22, 0xee, 0x30, 0x19, 0x21, 0x38, 0x86, 0x83, 0x26, 0xbb, 0x64, 0x28, 0x34, 0xf9, 0xe7, 0x8f, 0x51, 0x97, 0x6c, 0x3e, 0x6e, 0xa0, 0xef, 0xa5, 0x70, 0x92, 0x6f, 0x47, 0x61, 0x2c, 0xd0, 0x70, 0x2e, 0xa8, 0x22, 0x79, 0xd6, 0xe, 0x6, 0x28, 0x32, 0xd3, 0x17, 0x85, 0x93, 0x3e, 0x3b, 0xeb, 0x86, 0xd1, 0x87, 0x55, 0x4a, 0x16, 0x75, 0xa6, 0x1f, 0xb0, 0xb8, 0x65, 0x9, 0x2e, 0x51, 0x8a, 0xd3, 0x29, 0xf3, 0x8a, 0x70, 0xe7, 0xdb, 0xd6, 0x2, 0x5c, 0x99, 0x25, 0xfb, 0x3, 0x32, 0xb5, 0xed, 0x97, 0xe7, 0x71, 0x34, 0xb8, 0x68, 0x4f, 0x6f, 0x16, 0x7e, 0xa6, 0x39, 0xfe, 0x65, 0x45, 0xfa, 0xe5, 0x8b, 0x61, 0x19, 0x22, 0x85, 0x5b, 0x44, 0xe5, 0x20, 0x60, 0x1d, 0xd0, 0x75, 0x83, 0x19, 0xe9, 0x49, 0x1a, 0x12, 0x29, 0xdc, 0x49, 0xf9, 0xf6, 0xf9, 0xee, 0xad, 0xd9, 0xce, 0x88, 0xce, 0x91, 0xe3, 0xbd, 0x3d, 0x13, 0xf6, 0x4e, 0xd7, 0x74, 0x52, 0x80, 0xf4, 0x82, 0x8d, 0x3a, 0x0, 0xd6, 0x6f, 0x39, 0x66, 0xe0, 0xee, 0xdf, 0x93, 0xf, 0x56, 0x3d, 0x8e, 0x48, 0xed, 0x94, 0xbe, 0x42, 0xce, 0x5f, 0x48, 0xe9, 0x2e, 0x3f, 0x2d, 0x80, 0x1f, 0xfc, 0x46, 0x46, 0x92, 0xc1, 0xe, 0x73, 0x0, 0xab, 0xf, 0x85, 0xd1, 0xd4, 0x4f, 0x35, 0x3c, 0x74, 0x2e, 0x20, 0xde, 0x37, 0x6, 0xbb, 0xa4, 0xb2, 0x4a, 0xc0, 0x4, 0x8e, 0xa6, 0xe0, 0xb4, 0x4, 0x54, 0xb0, 0x6f, 0xa9, 0x5e, 0x5d, 0xc2, 0x95, 0x1c, 0xb4, 0xb0, 0xa7, 0xd1, 0xc1, 0x5a, 0x3c, 0x12, 0xa3, 0x88, 0x9c, 0x71, 0x91, 0x81, 0x41, 0x61, 0xc5, 0x18, 0x18, 0x80, 0x22, 0x3f, 0xe3, 0x7, 0x4, 0x4, 0xe6, 0x1d, 0x9d, 0x38, 0x2a, 0xae, 0x8f, 0x23, 0x61, 0x65, 0xff, 0xf3, 0x12, 0x1d, 0x1b, 0x4b, 0xbb, 0x5b, 0x4d, 0x9b, 0x1, 0x28, 0x2e, 0x26, 0x63, 0xde, 0x39, 0xc6, 0x42, 0x83, 0x9b, 0x34, 0xe8, 0x53, 0xba, 0xdd, 0x9e, 0x2e, 0x2c, 0x82, 0xfe, 0x90, 0xfe, 0x75, 0x5c, 0x86, 0x77, 0xde, 0x6a, 0x40, 0x5d, 0x1a, 0x23, 0x49, 0x2d, 0x84, 0xaa, 0x27, 0x2a, 0xd9, 0x4c, 0x18, 0x3, 0x0, 0xd7, 0x37, 0x75, 0x8e, 0x0, 0xda, 0x83, 0x5d, 0xa7, 0xba, 0x9e, 0xfa, 0x3e, 0xa0, 0xc1, 0x6d, 0xf2, 0xfd, 0x47, 0x2c, 0x1b, 0x57, 0xe0, 0xd5, 0xca, 0x40, 0xd4, 0x3a, 0x34, 0x59, 0xa0, 0x6a, 0x33, 0x60, 0x21, 0x7a, 0xdf, 0x41, 0x64, 0x5f, 0xec, 0x31, 0xf1, 0x4, 0xca, 0x61, 0x66, 0x41, 0x6e, 0x36, 0x59, 0x7c, 0x35, 0xdc, 0xf0, 0xfa, 0x43, 0x29, 0x8b, 0x7f, 0xca, 0x4f, 0x50, 0x45, 0xaf, 0xf9, 0x0, 0x29, 0x83, 0x39, 0xff, 0x5d, 0xbc, 0xc1, 0x40, 0x8d, 0x70, 0x3c, 0xee, 0x17, 0x8c, 0x6b, 0x19, 0x4e, 0x10, 0x15, 0xdf, 0x36, 0x2b, 0x3, 0x8a, 0xfd, 0x34, 0x96, 0x10, 0x81, 0x9f, 0xab, 0x28, 0x9a, 0xc1, 0x1c, 0xbb, 0x3f, 0x19, 0xff, 0xc9, 0xfa, 0x2, 0x3, 0xc2, 0x31, 0x71, 0x1f, 0xbc, 0xc4, 0x89, 0x22, 0x42, 0x20, 0x59, 0x40, 0x7e, 0xa2, 0x25, 0xf8, 0x50, 0x97, 0x61, 0xd3, 0xc5, 0x3d, 0x83, 0x43, 0x7b, 0x50, 0x78, 0x14, 0xe6, 0x12, 0x6, 0x55, 0x8c, 0x8a, 0x27, 0xe7, 0xd5, 0x54, 0x0, 0xc6, 0x4c, 0x22, 0xaa, 0xe3, 0x3c, 0x81, 0x73, 0x24, 0xab, 0xdd, 0x71, 0x14, 0xab, 0xfc, 0x1, 0xcf, 0xb1, 0xaf, 0xc1, 0x62, 0x96, 0xff, 0x6b, 0x3d, 0xbc, 0x82, 0x18, 0x51, 0x4b, 0x83, 0x10, 0x2b, 0xc8, 0x42, 0x72, 0xd4, 0x1c, 0x5, 0xea, 0xea, 0xdc, 0xf4, 0xa0, 0xfd, 0x99, 0x83, 0xfb, 0xb7, 0x96, 0x27, 0xba, 0x8f, 0x90, 0x5e, 0x4c, 0xd3, 0x45, 0xc8, 0x74}, - output224: []byte{0x38, 0xa0, 0x93, 0xa9, 0x79, 0x52, 0x8f, 0xce, 0xad, 0x90, 0x63, 0xc2, 0x65, 0xb4, 0xfc, 0x44, 0xd, 0xda, 0xbb, 0x82, 0x77, 0x15, 0x73, 0xc7, 0xc2, 0xd0, 0x6b, 0x84}, - output256: []byte{0x8f, 0xb5, 0x5e, 0xed, 0x6, 0x3f, 0x80, 0x47, 0x6c, 0xc7, 0xb2, 0xa2, 0x2e, 0xbd, 0xd3, 0x51, 0xd0, 0x28, 0x8d, 0xba, 0x71, 0x49, 0xff, 0xa, 0x99, 0xd5, 0xc6, 0xf8, 0x95, 0x46, 0xfb, 0x4}, - output384: []byte{0x84, 0x3e, 0xbe, 0x1b, 0x88, 0x36, 0x7, 0xa3, 0x5e, 0x5b, 0x5a, 0x50, 0xd1, 0xc5, 0xa3, 0xb9, 0xba, 0x44, 0x3f, 0x59, 0x3d, 0x40, 0x4c, 0x4e, 0x95, 0xa1, 0x9c, 0x7, 0x42, 0x32, 0x4d, 0x43, 0xa9, 0x3b, 0xfa, 0xaf, 0x2a, 0xee, 0x7c, 0xb0, 0x4f, 0xac, 0xae, 0x49, 0xdd, 0x68, 0xa8, 0x8c}, - output512: []byte{0xe2, 0x98, 0xe7, 0x24, 0x2, 0x46, 0xff, 0x59, 0xf9, 0xcc, 0xe, 0x19, 0x61, 0xfc, 0x68, 0x60, 0xb8, 0x73, 0x23, 0xac, 0x52, 0x67, 0x56, 0x2b, 0x53, 0x90, 0x53, 0xf7, 0xc6, 0xad, 0x1a, 0x3d, 0x23, 0x71, 0x54, 0x7c, 0xee, 0x17, 0x1c, 0x20, 0x10, 0xfd, 0xd5, 0x3, 0x8d, 0x22, 0x70, 0x20, 0xcd, 0xd8, 0xc7, 0xa1, 0xfa, 0xc0, 0x76, 0x19, 0x82, 0xba, 0x57, 0x5f, 0x36, 0x9a, 0xe8, 0xac}}, - testcase{ - msg: []byte{0xc5, 0x95, 0x33, 0x68, 0x27, 0x25, 0x9b, 0x5, 0xd, 0xc7, 0x83, 0xf2, 0x2f, 0xf7, 0xb0, 0x33, 0xec, 0xc9, 0x8f, 0x9c, 0x7c, 0xe0, 0x26, 0x80, 0x9c, 0xf3, 0x88, 0xfb, 0xca, 0xa2, 0x9a, 0x9d, 0x35, 0x72, 0x54, 0x7c, 0xcc, 0xd, 0x5f, 0x8d, 0x26, 0x73, 0x6, 0x17, 0x93, 0x3f, 0x80, 0x9b, 0x95, 0x59, 0xab, 0x20, 0x33, 0x9f, 0xa9, 0xa, 0x52, 0x5c, 0x46, 0xa2, 0x99, 0xef, 0x14, 0xc9, 0x4, 0x5e, 0x62, 0x75, 0xe2, 0x2c, 0x34, 0x9, 0x3e, 0x9b, 0xcd, 0xb1, 0x23, 0x1, 0x98, 0x43, 0x36, 0x72, 0xed, 0xa8, 0xfd, 0xa5, 0xb1, 0x6e, 0xa9, 0x31, 0x32, 0x42, 0xed, 0x77, 0x7e, 0x86, 0xf4, 0xaf, 0xff, 0xb4, 0xbb, 0x8a, 0x9c, 0xc0, 0xa9, 0x2, 0xad, 0xe7, 0x74, 0xae, 0x68, 0x80, 0x95, 0xd2, 0x71, 0xce, 0x7d, 0xf9, 0x75, 0xf1, 0x40, 0x4f, 0xa5, 0xdc, 0x9a, 0xcb, 0x50, 0xd6, 0x6d, 0x2f, 0x93, 0xd7, 0x7e, 0x26, 0x25, 0x86, 0xca, 0xac, 0x61, 0xa, 0xb9, 0x90, 0x97, 0x48, 0x45, 0xf7, 0x58, 0x20, 0x31, 0x9f, 0xe8, 0xc5, 0x7, 0xc7, 0x59, 0xda, 0x47, 0x9a, 0xfc, 0x55, 0x57, 0xc3, 0x26, 0x18, 0xf6, 0x5e, 0xf7, 0xef, 0x36, 0xe6, 0x9f, 0x5c, 0x89, 0x34, 0x35, 0xa5, 0x92, 0xc3, 0xd3, 0xb3, 0xb8, 0xa8, 0x11, 0x8, 0x11, 0x36, 0x2b, 0x22, 0xf2, 0xd7, 0xa6, 0x60, 0xa7, 0x67, 0xd8, 0x8d, 0x6a, 0xc9, 0x65, 0x6f, 0xd, 0x83, 0xf1, 0xd0, 0x39, 0x5d, 0x47, 0x7a, 0xe9, 0xdf, 0x50, 0x16, 0xd9, 0x82, 0xbd, 0x6c, 0xb9, 0x72, 0xd7, 0x33, 0xf2, 0xe0, 0x10, 0xca, 0xda, 0xac, 0x4d, 0xd2, 0xf, 0x8b, 0x4b, 0x79, 0x8c, 0x12, 0xc5, 0xfc, 0xcc, 0xb7, 0xc7, 0xa1, 0x66, 0xe3, 0xbd, 0x45, 0x1c, 0xe0, 0xb8, 0x3f, 0x9f, 0xea, 0xfd, 0x67, 0xaf, 0x64, 0x7a, 0xde, 0xb7, 0xee, 0xf0, 0x23, 0xcf, 0x2c, 0xc, 0xba, 0x8c, 0x37, 0x9f, 0xbc, 0x4a, 0x5a, 0x3f, 0x58, 0x47, 0x3a, 0x37, 0x4e, 0x9, 0xff, 0x9, 0x60, 0x91, 0xde, 0xc2, 0xe5, 0xb3, 0x5a, 0x42, 0x83, 0xc7, 0xdd, 0x96, 0xc4, 0x6e, 0xfe, 0x4f, 0x27, 0x68, 0xac, 0xe5, 0xb4, 0x3a, 0x8, 0xdb, 0xde, 0xaf, 0x95, 0xbe, 0x5c, 0x2d, 0xb0, 0x54, 0xd, 0xdf, 0x80, 0xfc, 0x89, 0x5d, 0xce, 0x34, 0x3e, 0xa9, 0x3e, 0xd2, 0xed, 0x74, 0x8f, 0xc3, 0x24, 0x35, 0xe7, 0xb2, 0x8e, 0xd8, 0x47, 0x4e, 0xde, 0xa, 0xd4, 0x49, 0xb3, 0x27, 0x39, 0xf7, 0xd7, 0x4a, 0x37, 0xc9, 0x28, 0x7, 0xd, 0xc, 0x1c, 0x30, 0x5, 0x3a, 0xde, 0xca, 0xeb, 0xc8, 0x8f, 0x56, 0xc0, 0x13, 0xad, 0x54, 0x39, 0xad, 0x2c, 0xf6, 0xa3, 0x87, 0x63, 0x64, 0xa6, 0xb6, 0x8e, 0xd, 0x1f, 0xc2, 0x9, 0x6, 0x67, 0xe, 0xbe, 0x4e, 0x85, 0xce, 0xf0, 0x72, 0xff, 0x67, 0xda, 0x9, 0x7e, 0x3b, 0x6a, 0x88, 0xf7, 0x8d, 0xc1, 0xf, 0x95, 0x52, 0x7, 0x62, 0xee, 0x86, 0xe8, 0xb2, 0x63, 0x63, 0x24, 0x55, 0x55, 0xda, 0x7, 0x64, 0x93, 0x0, 0x89, 0x3f, 0xf3, 0x68, 0x54, 0xbc, 0xb8, 0x75, 0xaa, 0x19, 0x24, 0xb7, 0xa9, 0x91, 0x69, 0xe9, 0x65, 0x80, 0x3b, 0x74, 0xcb, 0xea, 0x5, 0xf7, 0xc4, 0x86, 0xfb, 0xea, 0x23, 0x55, 0xca, 0x3, 0x3a, 0x77, 0xc2, 0xf4, 0x16, 0x4a, 0x6, 0xed, 0xe3, 0xd, 0xc6, 0x24, 0x4f, 0xdb, 0x3e, 0x8d, 0xaf, 0x9e, 0x73, 0xf8, 0x35, 0x44, 0xb7, 0x9b, 0xab, 0x20, 0x85, 0x1a, 0x64, 0xd, 0xc8, 0x3c, 0x43, 0xc8, 0x98, 0xa, 0x27, 0x29, 0xec, 0x1, 0xf4, 0x9, 0xda, 0x9a, 0xf6, 0xe9, 0xb5, 0xb7, 0xa6, 0x28, 0x6a, 0xe8, 0xf2, 0x25, 0xaf, 0x90, 0xb2, 0xe5, 0x43, 0x88, 0x92, 0x11, 0x5e, 0x6d, 0xe7, 0x2d, 0xf2, 0x84, 0x83, 0x76, 0x49, 0x4, 0x3, 0xa5, 0x43, 0x76, 0x5e, 0xcf, 0xe2, 0xcb, 0xb4, 0x6e, 0xa7, 0xf0, 0x99, 0x9c, 0xb3, 0x99, 0x3c, 0xe0, 0x99, 0x75, 0x2e, 0x9, 0x99, 0xd8, 0x4c, 0x2b, 0xbf, 0x91, 0xa9, 0xfb, 0xd3, 0x9c, 0xb7, 0x21, 0xf4, 0xc6, 0x26, 0x6f, 0xee, 0x4d, 0xf8, 0x96, 0xeb, 0x29, 0x6c, 0xae, 0xb2, 0xb3, 0x48, 0x3b, 0x2, 0x5e, 0x4b, 0xe2, 0x7d, 0xeb, 0x57, 0xa3, 0xa7, 0x6, 0xbf, 0xf5, 0x98, 0x29, 0xba, 0xd9, 0xf1, 0x1e, 0xb7, 0x5a, 0x1d, 0x1, 0xe, 0xf1, 0xae, 0x92, 0x6d, 0x5f, 0x5c, 0xad, 0xad, 0x5c, 0xb3, 0xca, 0x71, 0x60, 0xa6, 0x68, 0x46, 0xab, 0x4f, 0x12, 0xf0, 0x36, 0x93, 0x3c, 0x90, 0xe1, 0x15, 0x70, 0x2e, 0x11, 0xb2, 0x65, 0x70, 0x31, 0xeb, 0x28, 0xbd, 0x1e, 0x27, 0x93, 0xd0, 0xd0, 0xbe, 0xf4, 0x23, 0x4c, 0x2b, 0x61, 0x66, 0xa0, 0x38, 0xcf, 0x67, 0xdd, 0x60, 0xcd, 0xcb, 0x86, 0xfb, 0x32, 0x37, 0x88, 0xaa, 0x67, 0x3f, 0x2c, 0xe5, 0xad, 0xc8, 0xfa, 0x8a, 0xae, 0x91, 0x1d, 0x73, 0x63, 0xff, 0x83, 0x3a, 0xbf, 0x61, 0x98, 0x47, 0xe7, 0x8f, 0x13, 0x7f, 0xd0, 0x95, 0x9b, 0x98, 0x3e, 0x76, 0x4a, 0x59, 0xfe, 0xd2, 0x9c, 0xee, 0x31, 0xf2, 0xf4, 0x77, 0x15, 0xfa, 0xea, 0x7f, 0x91, 0x48, 0x3a, 0x6e, 0x61, 0xdd, 0x7e, 0xce, 0xc5, 0x57, 0xcf, 0x24, 0xbb, 0x64, 0xcf, 0xcc, 0x7, 0x8, 0xdb, 0x55, 0xda, 0x24, 0x26, 0xd4, 0x33, 0x4, 0x38, 0xc4, 0x2a, 0x4f, 0xa7, 0xd9, 0xdc, 0x4a, 0x1c, 0x62, 0x58, 0x23, 0xdf, 0x1d, 0x70, 0x1b, 0xc3, 0xbc, 0x3a, 0xac, 0x58, 0x48, 0x43, 0xde, 0x33, 0x2, 0x6, 0xc4, 0x5d, 0xf0, 0x18, 0x4f, 0xfa, 0xe4, 0xe3, 0x47, 0xfc, 0xe6, 0x86, 0xc, 0x7e, 0xc, 0x8f, 0xd5, 0x4b, 0xed, 0x94, 0xce, 0x32, 0x1d, 0x62, 0x32, 0x5a, 0xe1, 0x2f, 0x93, 0x28, 0x71, 0xa4, 0x72, 0x46, 0x77, 0xbd, 0xde, 0x95, 0xe5, 0x42, 0xad, 0x66, 0xcd, 0xf4, 0x91, 0xf5, 0x70, 0x8f, 0xbe, 0xae, 0x6a, 0x68, 0x46, 0xd7, 0x6, 0x8f, 0x88, 0x27, 0x40, 0xc, 0x18, 0x8d, 0x69, 0x15, 0xaf, 0x83, 0x54, 0x2a, 0x51, 0xa1, 0xe0, 0xba, 0xcd, 0xd0, 0x7e, 0x25, 0x6, 0x4e, 0x29, 0x15, 0xea, 0x78, 0xc8, 0xca, 0x83, 0x27, 0xe2, 0x37, 0x5e, 0xea, 0x19, 0xc5, 0x65, 0xaf, 0x6b, 0x83, 0x7c, 0xa5, 0x4, 0x4a, 0xcf, 0xc4, 0xdf, 0x68, 0xee, 0x32, 0x4d, 0x5b, 0xb8, 0xef, 0x4d, 0x97, 0x43, 0x68, 0xea, 0x9b, 0x13, 0x69, 0xb5, 0x67, 0xe6, 0xd5, 0xa4, 0x45, 0x73, 0xda, 0x12, 0x49, 0xc8, 0x4a, 0x78, 0x94, 0x42, 0xce, 0x16, 0x60, 0x4a, 0x94, 0x78, 0x86, 0x31, 0xe8, 0x90, 0x63, 0x98, 0xea, 0x3c, 0x2b, 0x8e, 0xa3, 0x4, 0xb1, 0x1e, 0x52, 0x2b, 0xa8, 0x24, 0x1, 0xfa, 0x23, 0x38, 0xce, 0x92, 0x5d, 0x31, 0xae, 0x37, 0xbb, 0x3a, 0x67, 0x16, 0xd, 0xff, 0x3d, 0xb6, 0xf7, 0xed, 0xc, 0x2d, 0xf6, 0x45, 0xbf, 0xaa, 0x5e, 0x27, 0x6f, 0x2c, 0xbf, 0xc4, 0xca, 0x28, 0x8f, 0x2c, 0x3b, 0x24, 0x6c, 0x67, 0x31, 0x52, 0x35, 0xc0, 0x54, 0x6b, 0xcf, 0xd3, 0xe4, 0xdd, 0xc2, 0xd6, 0xa2, 0xfa, 0x2, 0xab, 0x78, 0xe, 0xb0, 0xfb, 0x34, 0x91, 0x23, 0x9a, 0x2f, 0xa1, 0xb5, 0xec, 0x90, 0xa0, 0x20, 0x3d, 0xed, 0x37, 0x2d, 0x5f, 0x59, 0x48, 0x47, 0xd2, 0x79, 0x39, 0x67, 0x30, 0xa9, 0xd8, 0xce, 0x5c, 0xc9, 0x2a, 0xe3, 0x4f, 0x7c, 0x75, 0xa0, 0x7b, 0xb4, 0x87, 0x3a, 0x5c, 0x5e, 0xe7, 0x82, 0x68, 0xdd, 0xd0, 0xd8, 0xa3, 0x51, 0x79, 0x4f, 0xbd, 0x6c, 0x80, 0x15, 0x51, 0xb3, 0x9f, 0xad, 0x39, 0xe6, 0xcd, 0x2c, 0xac, 0x30, 0xd4, 0x53, 0x8e, 0x90, 0xee, 0x24, 0x78, 0x4b, 0xa1, 0xac, 0xb, 0xa9, 0xcb, 0xc2, 0x87, 0x15, 0x1c, 0x7d, 0x8e, 0xe7, 0xff, 0x94, 0x52, 0x4f, 0xad, 0x65, 0xb3, 0xdc, 0x45, 0x26, 0x5e, 0xf3, 0xb7, 0x8, 0xca, 0x2b, 0xcc, 0x5d}, - output224: []byte{0x68, 0x61, 0xb5, 0xe0, 0xcf, 0xc2, 0x23, 0xeb, 0x2b, 0x9b, 0x73, 0x55, 0x67, 0x1, 0x9f, 0x90, 0xb6, 0x1a, 0x76, 0x84, 0xc, 0x89, 0x0, 0x55, 0x11, 0xb6, 0x63, 0x85}, - output256: []byte{0xe4, 0x31, 0x20, 0x8e, 0x1a, 0x69, 0xa, 0x1c, 0x9f, 0x83, 0x9, 0x2c, 0xb5, 0x7b, 0xf0, 0x12, 0x6d, 0xd, 0x3a, 0xfc, 0xe, 0xa0, 0xd1, 0x88, 0x46, 0xa, 0x25, 0x9f, 0x42, 0x12, 0xd1, 0x27}, - output384: []byte{0xff, 0xb1, 0x55, 0x23, 0x2a, 0x1e, 0xf4, 0xa, 0x53, 0x1e, 0xed, 0x1a, 0xa6, 0x1c, 0x7f, 0xcc, 0xa0, 0xf2, 0x13, 0x32, 0x65, 0x1b, 0xef, 0xe, 0x71, 0xfc, 0x11, 0xa3, 0x57, 0x6c, 0x85, 0x5f, 0xe9, 0x8c, 0xbd, 0x7e, 0x75, 0xff, 0x2, 0x6a, 0x18, 0xa6, 0x91, 0xa9, 0x6a, 0x75, 0x3d, 0x68}, - output512: []byte{0x54, 0xb2, 0xef, 0xf1, 0x73, 0xb4, 0x6, 0xba, 0x66, 0x3e, 0x39, 0x90, 0x8a, 0xf6, 0x76, 0x8f, 0x33, 0x28, 0x3b, 0x8b, 0xfb, 0xf, 0x48, 0xa5, 0x8c, 0x10, 0x4, 0xc5, 0x23, 0x15, 0x9a, 0x68, 0x1e, 0x60, 0x63, 0xfe, 0x22, 0x51, 0x67, 0xbd, 0xcb, 0xc, 0x90, 0x2e, 0x53, 0x3c, 0xe, 0x53, 0x54, 0x15, 0x63, 0x49, 0x10, 0xe1, 0xc8, 0xa6, 0x9f, 0x62, 0x49, 0x87, 0x1b, 0x1b, 0x17, 0x94}}, - testcase{ - msg: []byte{0xa8, 0x67, 0x33, 0xd, 0xc, 0x93, 0x8, 0x3f, 0xbb, 0x15, 0x9e, 0xfe, 0xef, 0x90, 0x7a, 0xa5, 0x3a, 0xce, 0x39, 0x95, 0xac, 0xfe, 0x75, 0x87, 0xb4, 0x4, 0xaf, 0x8c, 0x83, 0x34, 0xe3, 0x2f, 0x9d, 0x35, 0x97, 0x6d, 0x4, 0x66, 0x65, 0x9f, 0x26, 0x48, 0x26, 0x10, 0x9b, 0x23, 0xa0, 0xdf, 0x20, 0x56, 0xa5, 0x47, 0x9d, 0xc, 0xc, 0x5e, 0xa5, 0x16, 0x6c, 0xa2, 0x31, 0x52, 0x5d, 0xa9, 0xb, 0x38, 0x8c, 0x43, 0x25, 0x9b, 0xa1, 0x69, 0x6f, 0xd3, 0x92, 0xfa, 0x10, 0xd1, 0x46, 0x25, 0x80, 0x40, 0x4, 0xb, 0x6a, 0xc2, 0xc3, 0xe9, 0x1d, 0x1f, 0x22, 0x4e, 0x2a, 0x2a, 0xa, 0xb3, 0x23, 0xb4, 0xcd, 0xe6, 0xee, 0x57, 0xb, 0x4d, 0xce, 0xda, 0x79, 0x58, 0xd6, 0x9a, 0x2f, 0xb8, 0x5f, 0xd, 0x9d, 0xae, 0xfb, 0x37, 0x15, 0xe5, 0x82, 0x52, 0x98, 0xb7, 0xd3, 0xd8, 0xf0, 0x92, 0x68, 0x41, 0x3a, 0x11, 0xb3, 0xa, 0x24, 0x35, 0x87, 0x55, 0xf7, 0xed, 0x9d, 0xf6, 0xf2, 0xfa, 0x9a, 0xe7, 0xa2, 0x19, 0xe6, 0x5b, 0xea, 0x97, 0x8f, 0xa1, 0x18, 0x78, 0x6, 0x38, 0x6e, 0xba, 0x3, 0xaf, 0x49, 0x1a, 0x1d, 0x57, 0x8, 0xaf, 0x24, 0x9, 0xb8, 0x2d, 0xb0, 0x3a, 0x19, 0xd6, 0x65, 0xec, 0x58, 0x11, 0x9a, 0xc5, 0x37, 0xcb, 0xdc, 0x75, 0xff, 0x3e, 0xd1, 0xe0, 0xd0, 0xa2, 0x6d, 0x29, 0x13, 0x91, 0xde, 0x65, 0x84, 0xbc, 0xc0, 0xd5, 0x5b, 0x99, 0x31, 0x53, 0x7e, 0xbe, 0x21, 0xf4, 0x2a, 0xfe, 0xf0, 0x5a, 0xd7, 0x55, 0xdb, 0x1a, 0xf6, 0x9, 0x88, 0xda, 0xed, 0x8c, 0xb0, 0x87, 0x73, 0x34, 0x21, 0x67, 0x9f, 0x8b, 0x2d, 0x38, 0x1c, 0x65, 0x9c, 0x13, 0x25, 0xd4, 0x76, 0x88, 0xf2, 0x77, 0x1a, 0x3, 0xbf, 0xd3, 0x1c, 0xf8, 0xd3, 0xc2, 0xf, 0xd0, 0x9f, 0x60, 0x3b, 0xe7, 0xa1, 0x3d, 0x1b, 0xa8, 0xd3, 0x7c, 0xf4, 0x92, 0xc9, 0x37, 0x24, 0xa7, 0x28, 0xbf, 0xdb, 0xcb, 0x6d, 0x3e, 0x8f, 0xd, 0x77, 0xb, 0x5c, 0x26, 0xc, 0xfa, 0x35, 0x15, 0xaa, 0xf7, 0xc2, 0x5f, 0xae, 0xc4, 0x2b, 0x23, 0x73, 0x97, 0xd, 0x11, 0xeb, 0x2a, 0x18, 0xc8, 0x63, 0xd0, 0xd7, 0x12, 0x1b, 0xb2, 0xdd, 0xa1, 0xb2, 0x23, 0xb8, 0x83, 0xc4, 0x68, 0x28, 0x1e, 0xff, 0xf0, 0x17, 0xf, 0xfa, 0x48, 0x55, 0x2f, 0x26, 0x3c, 0x30, 0x86, 0x58, 0xd9, 0x69, 0x86, 0x67, 0x81, 0xf0, 0x41, 0xda, 0xa, 0xb1, 0x49, 0xeb, 0x20, 0x20, 0x89, 0x2a, 0x11, 0x4a, 0x4a, 0x77, 0x58, 0xad, 0xae, 0x9f, 0xeb, 0xb4, 0xaa, 0x76, 0x60, 0x4a, 0x65, 0xb8, 0x7a, 0x2a, 0x5d, 0xa, 0x45, 0xa8, 0x9, 0x63, 0x91, 0xb3, 0xd1, 0xc0, 0x9f, 0xc9, 0x57, 0x46, 0xc4, 0x49, 0xba, 0xeb, 0x2f, 0x80, 0x7a, 0xfc, 0x8e, 0x4f, 0x5e, 0xfa, 0xb2, 0x48, 0x8e, 0xc1, 0x98, 0x5, 0x69, 0x11, 0x62, 0xac, 0x8a, 0x3e, 0xac, 0xa1, 0xd2, 0x5f, 0xf, 0x4e, 0xb9, 0x5e, 0xcf, 0x48, 0xc1, 0x34, 0x58, 0x41, 0x25, 0xaa, 0xf, 0xaf, 0xd5, 0x58, 0x98, 0x47, 0xe6, 0x56, 0xbe, 0xca, 0xde, 0xbf, 0xbb, 0xd2, 0x58, 0xef, 0xcc, 0x6f, 0x74, 0x9e, 0x15, 0xba, 0x9, 0xdb, 0xf0, 0x4b, 0x93, 0x87, 0x7f, 0xa0, 0x4e, 0xc2, 0xb6, 0xc3, 0x23, 0x4f, 0xc4, 0x98, 0x72, 0xc3, 0x18, 0xb3, 0x2, 0x25, 0x24, 0x71, 0x70, 0x5b, 0xe6, 0x69, 0x2, 0x27, 0x65, 0xfd, 0x1, 0xd1, 0x57, 0xc4, 0xaa, 0x54, 0x17, 0x33, 0x99, 0x54, 0x8b, 0xde, 0x8d, 0x89, 0x71, 0xa8, 0xcf, 0xd, 0xb6, 0x52, 0x81, 0x43, 0x13, 0xb7, 0x1b, 0xc0, 0x62, 0xdb, 0x9, 0x2f, 0xa5, 0xa5, 0xca, 0xf1, 0x80, 0x9d, 0xef, 0xa1, 0x21, 0x5b, 0x42, 0xb8, 0x0, 0x7, 0x2b, 0x29, 0x90, 0xe6, 0xfa, 0x31, 0xf6, 0x9d, 0x52, 0x7, 0x6a, 0xd2, 0x93, 0xd9, 0x66, 0xcb, 0xe4, 0xf8, 0x9c, 0x6d, 0x4e, 0x45, 0xaf, 0xb7, 0x6f, 0x23, 0xa5, 0x67, 0xe, 0x5b, 0x36, 0xfd, 0x60, 0xd7, 0x84, 0xa7, 0x36, 0xd0, 0x20, 0x1c, 0xd2, 0xa1, 0x19, 0x10, 0x7f, 0x27, 0x8e, 0x54, 0x74, 0xd8, 0x7a, 0x97, 0xf5, 0x3b, 0x12, 0xa8, 0xab, 0x1d, 0x1, 0x91, 0xd1, 0x9e, 0xc4, 0x10, 0x3c, 0x47, 0x2d, 0x1e, 0x7a, 0xbe, 0x73, 0x51, 0x25, 0x8b, 0x26, 0xc4, 0x45, 0x39, 0x7a, 0xa5, 0xa3, 0xba, 0x92, 0x42, 0x38, 0xb2, 0x75, 0xe7, 0xd5, 0x3b, 0x20, 0x25, 0x36, 0x95, 0x86, 0x6e, 0xe8, 0xae, 0x2, 0xf9, 0xdd, 0x8f, 0xa8, 0xbf, 0x4b, 0x76, 0xe5, 0x49, 0xd9, 0x32, 0x2b, 0xae, 0xe5, 0x8d, 0x70, 0xbd, 0xfe, 0x1a, 0xf3, 0x4e, 0xbc, 0xbf, 0xd8, 0xa, 0xed, 0x8e, 0x40, 0x27, 0x37, 0x27, 0xb7, 0xb9, 0x19, 0xa2, 0x88, 0x62, 0x17, 0x1c, 0xda, 0xe6, 0x6e, 0xc8, 0x85, 0xee, 0xf4, 0x1e, 0x5d, 0x23, 0x7b, 0x9c, 0x30, 0x87, 0x72, 0xdb, 0x7c, 0xad, 0x76, 0x73, 0x64, 0x6a, 0x7c, 0xc7, 0xcd, 0x78, 0x80, 0xa, 0xa1, 0x23, 0x95, 0xe6, 0xdd, 0xd5, 0x0, 0x4f, 0xe, 0x4d, 0x48, 0x34, 0xb6, 0x6d, 0x7e, 0xe7, 0xfe, 0xfb, 0xe4, 0xe0, 0x94, 0x7c, 0xc2, 0xfe, 0x9, 0x93, 0xc3, 0xf5, 0x6, 0xea, 0xd5, 0x1c, 0x9e, 0x9b, 0x66, 0x48, 0x22, 0x8f, 0x3, 0x23, 0xf, 0x61, 0xad, 0x23, 0xa7, 0x8, 0xb1, 0x1d, 0xcd, 0x32, 0x8a, 0xb9, 0x8, 0x1d, 0x10, 0x24, 0x55, 0xdb, 0xf1, 0x1a, 0x93, 0x2f, 0x90, 0x94, 0x60, 0x46, 0xd7, 0x2d, 0x91, 0x2, 0x70, 0x21, 0x14, 0xb8, 0x96, 0x5f, 0x32, 0x8d, 0x6f, 0x57, 0xdc, 0xe, 0xce, 0xb, 0x1a, 0xef, 0x76, 0x20, 0x64, 0xb, 0x4f, 0x43, 0x61, 0x5a, 0x11, 0x23, 0xb6, 0xc3, 0xb5, 0x84, 0x38, 0xb5, 0x76, 0xe, 0xf0, 0xbe, 0xe1, 0x30, 0xc5, 0x65, 0x5b, 0x75, 0x6d, 0xab, 0x18, 0x94, 0xfe, 0xc4, 0x73, 0x64, 0x20, 0x18, 0x0, 0x41, 0x69, 0x8d, 0xcd, 0xee, 0xcb, 0x5e, 0xe9, 0x8b, 0x4, 0x3a, 0x87, 0xc, 0x99, 0x49, 0xb1, 0x14, 0x1d, 0x5a, 0x9, 0x20, 0xa1, 0xef, 0xa6, 0xa, 0x30, 0xd8, 0xcb, 0x33, 0xdb, 0xc, 0xc3, 0x36, 0x4c, 0x65, 0x7e, 0xe7, 0xe3, 0xe5, 0x82, 0xa2, 0xa4, 0x96, 0x10, 0xe8, 0xc0, 0x8b, 0x9e, 0xd7, 0x33, 0xd4, 0xf5, 0x84, 0xef, 0x6b, 0x9f, 0xc4, 0x3f, 0x62, 0xcf, 0xe9, 0xf6, 0x9b, 0xd6, 0x4c, 0x2, 0xb1, 0xd2, 0xe, 0xfe, 0x2e, 0xa9, 0xeb, 0xd6, 0xb6, 0xdc, 0xa5, 0xf6, 0xd9, 0xde, 0x62, 0xa4, 0x43, 0xd6, 0x7c, 0x60, 0xcc, 0xe6, 0x7c, 0x47, 0xb4, 0xed, 0xaf, 0x24, 0x80, 0x5d, 0xad, 0x5a, 0xc4, 0x98, 0xbf, 0x16, 0x34, 0x64, 0x6d, 0xc, 0x34, 0xfc, 0x3b, 0x7c, 0x46, 0x61, 0xee, 0x80, 0x29, 0xcd, 0x4f, 0xa2, 0x37, 0x53, 0x1c, 0xff, 0x68, 0x12, 0x13, 0x1, 0x29, 0x93, 0xf9, 0x11, 0x6, 0x8, 0x4d, 0xe2, 0x2, 0x41, 0xcd, 0xe0, 0x59, 0xbb, 0x37, 0xa2, 0x6c, 0xad, 0x85, 0x53, 0x3e, 0x4c, 0x5e, 0x8a, 0x4c, 0x4e, 0x6f, 0x95, 0x21, 0x62, 0x66, 0xc, 0xc, 0x55, 0xd8, 0xe2, 0x66, 0xf0, 0xab, 0xdd, 0x42, 0x24, 0x48, 0x7d, 0x6, 0xf7, 0xda, 0x1f, 0x26, 0xb8, 0x4d, 0x6d, 0x30, 0x10, 0x1b, 0x53, 0x5a, 0x1c, 0xe7, 0x63, 0x55, 0xae, 0x1d, 0x34, 0xda, 0x2e, 0x71, 0xe2, 0x44, 0x46, 0x8, 0x48, 0x21, 0x2d, 0x90, 0x76, 0xff, 0x79, 0xd8, 0xa2, 0x82, 0x35, 0x9b, 0x89, 0x61, 0xc2, 0x7a, 0x15, 0x7e, 0xd6, 0xaa, 0x5e, 0x99, 0x90, 0xd5, 0x6b, 0x4e, 0xd7, 0x11, 0x30, 0x66, 0xbd, 0x56, 0x7, 0x19, 0xa4, 0x31, 0xe3, 0x82, 0x2e, 0xf2, 0x4c, 0x6, 0x30, 0x11, 0xa, 0xb4, 0x48, 0xef, 0x26, 0x9f, 0x4f, 0xfa, 0xfd, 0xce, 0x95, 0xfa, 0x57, 0xad, 0xf3, 0x22, 0x9e, 0x5e, 0xa6, 0x39, 0xcf, 0x46, 0x49, 0xe5, 0x98, 0xe7, 0xf, 0x51, 0x7f, 0x8c, 0xa0, 0x3c, 0x9a, 0xfa, 0xf4, 0xc7, 0x52, 0xf7, 0xd1, 0x4f, 0x96, 0x76, 0x3f, 0x7a, 0xe, 0xb4, 0xe5, 0xbe, 0xab, 0xe5, 0xfd, 0x17, 0xfa, 0x8e, 0xc1, 0x52, 0x71, 0xa5, 0x9, 0xb1, 0xba, 0xde, 0x0, 0xd8, 0x40, 0x7, 0x3b, 0x52, 0xde, 0x95, 0xc6, 0x88, 0xf7, 0xaa, 0xaf, 0x25, 0x75, 0x10, 0x55, 0xc8, 0x82, 0x7d, 0x1c, 0x6b, 0x5b, 0xb2, 0xc9, 0x14, 0xe, 0xdc, 0xa4}, - output224: []byte{0xc, 0x26, 0x53, 0x20, 0xc0, 0x39, 0x4c, 0x3, 0xfa, 0xe3, 0x4d, 0x80, 0xdf, 0xfd, 0x4, 0x7, 0x4d, 0x0, 0xc7, 0x21, 0x4f, 0x95, 0xce, 0xcd, 0x9c, 0xfc, 0x8f, 0x7b}, - output256: []byte{0x12, 0xbc, 0xf1, 0x75, 0xba, 0x9f, 0x1a, 0x6e, 0x30, 0x66, 0x85, 0x5e, 0x3c, 0x23, 0xd4, 0x62, 0xb8, 0x39, 0x1, 0x61, 0x8a, 0xbe, 0x53, 0x6e, 0x86, 0xed, 0x14, 0xb2, 0x4a, 0xe5, 0x3e, 0xe}, - output384: []byte{0xb8, 0x2e, 0x19, 0xa3, 0x28, 0xf6, 0x72, 0x76, 0xba, 0x1b, 0x2, 0x2, 0xf4, 0xfe, 0x37, 0x40, 0x10, 0x2e, 0xe, 0x60, 0x72, 0xeb, 0xae, 0xb1, 0x6c, 0xfe, 0xe7, 0x21, 0xdb, 0x38, 0x1c, 0xa9, 0x35, 0xd3, 0x2e, 0x1a, 0x2f, 0x2d, 0x4e, 0xea, 0xf9, 0x79, 0xf8, 0xf6, 0xb, 0x67, 0x18, 0xde}, - output512: []byte{0xb9, 0x52, 0xc7, 0x56, 0xf1, 0xdf, 0xd6, 0xa3, 0xf7, 0x65, 0x2e, 0x3b, 0x13, 0xad, 0x5c, 0xd2, 0x93, 0xe3, 0xaf, 0x87, 0xb, 0xf3, 0xe7, 0x39, 0xe2, 0xe5, 0x20, 0xbf, 0x25, 0x45, 0xda, 0xe0, 0x8c, 0x5e, 0x45, 0x91, 0x47, 0xc8, 0x58, 0x9c, 0x33, 0x1a, 0x24, 0x24, 0xd4, 0x8e, 0xac, 0x3a, 0xc2, 0xcc, 0xf1, 0xef, 0x95, 0xfb, 0xb5, 0x91, 0xcc, 0x57, 0x57, 0x18, 0x2a, 0x57, 0xa7, 0xa8}}, - testcase{ - msg: []byte{0x2e, 0xb3, 0x10, 0x26, 0x15, 0x5b, 0x7b, 0xc3, 0x67, 0x2f, 0x6, 0xd, 0x84, 0x7, 0xb1, 0x62, 0x2f, 0x61, 0x62, 0xcf, 0xe4, 0xe, 0x2, 0x86, 0xcf, 0x9b, 0xd7, 0x3b, 0x18, 0x50, 0x3, 0x82, 0x7e, 0xb7, 0x5c, 0xa0, 0x80, 0xf0, 0xfa, 0x81, 0xd9, 0xe5, 0x89, 0x3f, 0x46, 0x21, 0x24, 0xf6, 0x79, 0xeb, 0xad, 0x80, 0x7d, 0xf6, 0xad, 0x87, 0xc8, 0x9, 0xff, 0x55, 0x2d, 0xdf, 0xef, 0x22, 0xc1, 0x1c, 0x4a, 0xef, 0xe1, 0x74, 0x5a, 0x45, 0x74, 0x62, 0xd3, 0x46, 0xa3, 0xe0, 0x41, 0x93, 0x47, 0x27, 0x4f, 0xa, 0x39, 0xf0, 0x9a, 0xc2, 0x11, 0xd7, 0x9b, 0xbc, 0x13, 0xc7, 0x99, 0xbc, 0x26, 0xe9, 0x54, 0xbe, 0xf1, 0x1f, 0xc7, 0xd9, 0xeb, 0xf0, 0xa0, 0x28, 0x3b, 0x59, 0x49, 0x8f, 0x6a, 0x27, 0x1a, 0xfc, 0x54, 0x15, 0xf6, 0x56, 0xf1, 0xc0, 0xa0, 0xe3, 0x11, 0xed, 0xd0, 0xbc, 0xb4, 0x98, 0x53, 0xf0, 0xfb, 0x52, 0xc8, 0x49, 0x84, 0x84, 0x6, 0xa7, 0xdf, 0x6d, 0x7f, 0x3f, 0x32, 0xde, 0xf5, 0xd, 0x80, 0x73, 0xad, 0x2b, 0x1a, 0x19, 0x79, 0x91, 0xd7, 0xd5, 0x33, 0x7e, 0xcd, 0x5c, 0x14, 0x72, 0xe5, 0x8d, 0xfe, 0x42, 0x85, 0x9f, 0xff, 0xaa, 0x4b, 0x85, 0x8c, 0x34, 0xb3, 0x5, 0xb8, 0xf9, 0x21, 0xaf, 0xb3, 0x19, 0xab, 0xc, 0xa, 0x4d, 0x3, 0x2, 0x4b, 0xc2, 0xaf, 0xee, 0x1b, 0xd4, 0xb0, 0xf9, 0x78, 0x48, 0xbb, 0xee, 0x53, 0x54, 0x60, 0x14, 0x4e, 0x30, 0x13, 0x34, 0xb9, 0xc, 0xcc, 0xed, 0xa1, 0x37, 0xa7, 0xe4, 0x4c, 0x44, 0xcb, 0x53, 0x8e, 0x9a, 0x3d, 0x10, 0x96, 0x1e, 0xcf, 0xf2, 0xbb, 0xf1, 0x6b, 0xeb, 0x1a, 0x40, 0x24, 0xf, 0xa6, 0x3e, 0xb0, 0x2f, 0xaf, 0x24, 0x81, 0x91, 0xda, 0xc5, 0x69, 0xf4, 0x4a, 0xa1, 0xb, 0x9e, 0x39, 0x14, 0x16, 0xa4, 0x1a, 0x1a, 0xf9, 0xb0, 0x37, 0x9d, 0x2e, 0x52, 0xeb, 0x6c, 0x2c, 0x1a, 0x11, 0x1, 0x8a, 0xb9, 0x51, 0xd0, 0x30, 0xfe, 0x5f, 0xb6, 0x31, 0x75, 0x38, 0xf4, 0xdd, 0xa3, 0xd4, 0xb3, 0x87, 0x1a, 0xfe, 0x47, 0x9c, 0x4c, 0xcb, 0x4, 0x22, 0x30, 0x1b, 0xca, 0xec, 0x7c, 0xd, 0x6a, 0x12, 0xe1, 0xa4, 0xdb, 0x17, 0xde, 0x25, 0x39, 0x49, 0x2c, 0x3c, 0x0, 0x3c, 0x3c, 0x89, 0xc6, 0x58, 0x7c, 0xe2, 0x5c, 0x7c, 0x7d, 0x69, 0x7a, 0x11, 0xdc, 0xb4, 0x17, 0x64, 0xdc, 0xde, 0x73, 0x72, 0xe6, 0xee, 0xda, 0xb3, 0x8b, 0x40, 0x4, 0xec, 0x8, 0x5, 0xe1, 0xfe, 0xda, 0xb9, 0xed, 0x25, 0x50, 0xd9, 0x76, 0xc2, 0x23, 0xb0, 0xb0, 0xfb, 0x39, 0xfb, 0x0, 0x6d, 0xd4, 0xaa, 0xfe, 0x4, 0x2b, 0xa, 0x77, 0x1e, 0x9, 0x8b, 0xaa, 0xfa, 0x72, 0xaa, 0x48, 0x8a, 0x40, 0xa1, 0x6b, 0xce, 0x62, 0x72, 0xf6, 0x40, 0x23, 0xe8, 0x63, 0x26, 0x2b, 0xb4, 0xd0, 0xa1, 0x37, 0xf6, 0x1f, 0x9e, 0x71, 0x1d, 0xb0, 0x96, 0xdd, 0x93, 0x25, 0x4c, 0x5e, 0x43, 0x82, 0xd3, 0xf7, 0xf1, 0x91, 0x4e, 0x9d, 0x18, 0xf8, 0x66, 0x37, 0xe5, 0xe4, 0xa7, 0xb7, 0xfc, 0xea, 0x80, 0xed, 0xca, 0x63, 0xb3, 0xac, 0xdc, 0x7c, 0x69, 0x27, 0x70, 0xd8, 0xad, 0xe9, 0xab, 0xf, 0xfa, 0x87, 0xa2, 0xc7, 0xdd, 0x33, 0x31, 0x7d, 0xb0, 0x38, 0xc5, 0x70, 0x9b, 0xce, 0x68, 0x6f, 0xe1, 0xbe, 0x39, 0x5b, 0x32, 0x92, 0x3, 0x38, 0x58, 0xa2, 0xfa, 0x3c, 0x81, 0x44, 0xd4, 0xa7, 0x4b, 0x53, 0xcf, 0xa8, 0x22, 0x2e, 0xcb, 0x7e, 0xd, 0x78, 0x8f, 0x4e, 0xbf, 0xd7, 0x5d, 0x88, 0xd, 0xaa, 0xbf, 0x66, 0xd8, 0x88, 0xf3, 0xd7, 0xcf, 0x5d, 0x1e, 0x3d, 0xac, 0xad, 0x33, 0xf3, 0xc6, 0xe0, 0x5e, 0xb0, 0xff, 0xe7, 0xe8, 0xcb, 0x1d, 0xbe, 0x14, 0x3, 0x53, 0xf, 0x1a, 0xa4, 0x4f, 0x70, 0x28, 0x58, 0xc, 0x90, 0x84, 0xdd, 0x6d, 0xfc, 0xd7, 0x78, 0x8b, 0x94, 0x5, 0xb, 0x5f, 0xe6, 0x3e, 0xf0, 0x79, 0x0, 0x3a, 0x51, 0xfa, 0x43, 0xe7, 0x26, 0x89, 0x7e, 0x82, 0xeb, 0xe1, 0x60, 0xf4, 0xf4, 0x8c, 0x98, 0x55, 0xd5, 0x9b, 0xb9, 0x4b, 0x8b, 0xeb, 0x6b, 0x54, 0x92, 0xa6, 0x6b, 0x38, 0xcf, 0xdf, 0x85, 0xb, 0x6f, 0x1c, 0xb3, 0x68, 0x59, 0x84, 0x43, 0xf2, 0xea, 0x96, 0x53, 0xdd, 0x5e, 0x6a, 0x3e, 0xd6, 0x8, 0x81, 0xd4, 0x79, 0x56, 0xcd, 0x24, 0xf1, 0xb0, 0x56, 0x7e, 0xda, 0xcf, 0xe3, 0xf8, 0x7a, 0x67, 0xe1, 0xd9, 0xf, 0xf6, 0x45, 0x96, 0x66, 0x4, 0x3b, 0x4f, 0x55, 0xd, 0x94, 0x80, 0xf4, 0xd1, 0x7f, 0xf0, 0xb4, 0xb, 0x71, 0x36, 0x43, 0x66, 0xb1, 0x7d, 0x95, 0x8d, 0xb4, 0xf, 0x3b, 0x88, 0x18, 0x9d, 0x23, 0x67, 0x57, 0x2a, 0xb8, 0x7a, 0x14, 0xb1, 0x60, 0x34, 0x4b, 0xec, 0x8c, 0x69, 0xbc, 0x3, 0x74, 0xeb, 0xfc, 0x62, 0xfa, 0x8e, 0x9, 0x2, 0x96, 0xe5, 0xcb, 0x43, 0xbb, 0x25, 0x3d, 0x4, 0xf2, 0x4e, 0x21, 0xcc, 0x55, 0x84, 0x9b, 0xe4, 0xcb, 0x7e, 0x3e, 0xe8, 0xa, 0xa0, 0xda, 0x1f, 0x8c, 0x71, 0xa5, 0x5e, 0x1d, 0x98, 0xa8, 0x50, 0x49, 0xcc, 0xa3, 0xf, 0x40, 0x0, 0x50, 0x6e, 0x4f, 0x36, 0xf7, 0x9, 0x6d, 0x4f, 0x88, 0x70, 0x3a, 0x6b, 0x77, 0x26, 0x90, 0x60, 0x20, 0x19, 0xe1, 0x7b, 0xea, 0x59, 0x65, 0xb6, 0x8c, 0xa1, 0xd7, 0x8c, 0xb1, 0x57, 0xe6, 0x40, 0xcc, 0xe3, 0xaf, 0xe0, 0xa, 0x25, 0xb6, 0x17, 0x2e, 0xca, 0x4c, 0xb9, 0x90, 0x2d, 0x3f, 0x39, 0xbd, 0xa2, 0x5d, 0x57, 0xe4, 0x6e, 0xe0, 0x1a, 0x79, 0x4d, 0xa2, 0xfa, 0x30, 0x9c, 0x8, 0x3c, 0xb1, 0x3, 0x22, 0x49, 0x64, 0xf8, 0x91, 0x4e, 0xb, 0xb3, 0x9f, 0x67, 0xbc, 0x50, 0xb4, 0x10, 0x3e, 0x41, 0xdc, 0x29, 0xc9, 0x50, 0x41, 0xd5, 0x83, 0x51, 0x78, 0xfb, 0xee, 0xa6, 0xbd, 0x35, 0xac, 0xdf, 0x51, 0xa6, 0xf5, 0x44, 0x4c, 0xbf, 0xe5, 0x40, 0x4, 0x39, 0xdc, 0x70, 0xcd, 0xff, 0x87, 0xe, 0x30, 0xea, 0x12, 0x39, 0xfa, 0xa2, 0xec, 0xfe, 0xba, 0xcc, 0x73, 0xb2, 0xc1, 0x4, 0xe9, 0x95, 0x94, 0xab, 0x81, 0x89, 0x4f, 0x4e, 0xba, 0x46, 0x4f, 0x0, 0x96, 0xf4, 0x36, 0x8d, 0x86, 0x62, 0xfa, 0x12, 0xb4, 0x6c, 0xff, 0xd7, 0xeb, 0x76, 0x60, 0x72, 0xbc, 0x14, 0x5e, 0x17, 0xb, 0xf6, 0x45, 0x94, 0x29, 0xbe, 0xa5, 0x84, 0x5b, 0xc4, 0xf0, 0x88, 0xb9, 0x8d, 0x9f, 0x1e, 0xc7, 0xb3, 0x1b, 0x5, 0x4f, 0xbf, 0x4, 0xba, 0x5b, 0x7d, 0x44, 0x14, 0x1c, 0xf2, 0x6b, 0x24, 0xf1, 0xd8, 0xe, 0x39, 0xb2, 0xfc, 0x84, 0x4e, 0x2c, 0x3c, 0xdf, 0x5c, 0x75, 0x2f, 0x65, 0x5, 0x7c, 0x9d, 0x4e, 0x98, 0x21, 0x72, 0xce, 0x9, 0x49, 0x7, 0x72, 0x1d, 0xa4, 0x96, 0x77, 0x72, 0x53, 0x36, 0x32, 0x63, 0x2d, 0x73, 0x35, 0x34, 0x23, 0x86, 0x62, 0x84, 0x38, 0xdb, 0xa8, 0xca, 0xcb, 0x60, 0x13, 0x9a, 0x7a, 0x7d, 0x7f, 0xf2, 0xf, 0x4e, 0x20, 0xe4, 0x5, 0xcd, 0x3a, 0x2, 0x9c, 0x3a, 0xf1, 0x3, 0xa9, 0x1b, 0xf2, 0x4, 0x6c, 0x37, 0x2c, 0x20, 0xe9, 0x9e, 0x3b, 0x59, 0x71, 0xca, 0xfd, 0x3e, 0x2c, 0xa4, 0xcc, 0x7e, 0xe, 0x6e, 0xcc, 0x27, 0x2b, 0xdc, 0x50, 0xfb, 0xd3, 0xf0, 0x18, 0x4e, 0x58, 0xe6, 0xb2, 0x6d, 0x32, 0x9a, 0x93, 0x80, 0x4, 0x9b, 0x32, 0x98, 0xce, 0x33, 0xcf, 0x15, 0xcd, 0x75, 0x60, 0xe3, 0xd3, 0xe0, 0xc5, 0x3c, 0xb0, 0x29, 0x33, 0x72, 0x36, 0xf9, 0xd8, 0x48, 0x76, 0x2d, 0x37, 0x1d, 0x32, 0x79, 0xa8, 0xb1, 0x19, 0x2d, 0x83, 0xcf, 0x1f, 0xf8, 0xc4, 0xf1, 0x2d, 0xbe, 0xaf, 0xa3, 0x83, 0xb4, 0x7c, 0xd3, 0xf1, 0x72, 0xb8, 0x2d, 0x4d, 0x94, 0x2d, 0x99, 0x76, 0xa4, 0xcf, 0x2e, 0x3e, 0xf, 0x69, 0xe1, 0x3f, 0x1d, 0x8e, 0xde, 0x15, 0x29, 0x38, 0xb9, 0x78, 0xd2, 0xb1, 0xcb, 0xaf, 0x27, 0x8, 0x8a, 0x10, 0x93, 0x5e, 0xda, 0x68, 0xb2, 0xe3, 0x14, 0x48, 0xb0, 0x9e, 0x58, 0x6e, 0x9f, 0xca, 0xc1, 0x1c, 0x6c, 0xb0, 0x56, 0xfc, 0x92, 0x51, 0x22, 0x10, 0xc3, 0xa8, 0x28, 0xb5, 0x49, 0xa1, 0xcf, 0xd3, 0x51, 0x6c, 0x4a, 0x5b, 0x4a, 0x59, 0xff, 0xaf, 0x22, 0xd3, 0xba, 0x32, 0x4d, 0xa5, 0xe9, 0x2c, 0x60, 0x7a, 0x45, 0xc1, 0x89, 0xd7, 0x48, 0x2f, 0x9c, 0xe1, 0xfb, 0x0, 0x5b, 0x31, 0x4d, 0x6d, 0x8a, 0xc0, 0xcf, 0x52, 0x3c, 0xb2, 0x1b, 0x3d, 0x86, 0xcb, 0x21, 0xd4, 0x51, 0x40, 0x6, 0x95, 0xd1, 0x34, 0x13, 0x45, 0xdb, 0xc9, 0xe6, 0xcb, 0xf0, 0x2f, 0x56, 0x5e, 0x8b, 0x2, 0xf7, 0xb2, 0x15, 0x11, 0x31, 0x51, 0x4e, 0xe7, 0xd3, 0x19, 0x5c, 0xcc, 0x26, 0x2e, 0xb6, 0x15, 0xa6, 0xc6}, - output224: []byte{0xff, 0x5d, 0xc9, 0xce, 0x96, 0xc, 0x60, 0x43, 0x23, 0xcd, 0x9d, 0x2d, 0x5d, 0x8d, 0x52, 0x10, 0xd, 0xc1, 0x84, 0xd2, 0x89, 0x5b, 0xa8, 0x76, 0xa5, 0x35, 0xdb, 0xd3}, - output256: []byte{0x33, 0xc1, 0xc, 0xcc, 0x7e, 0xac, 0x44, 0xf3, 0x7d, 0xc5, 0xd0, 0xd5, 0x8e, 0xd5, 0x90, 0xc8, 0x4, 0x40, 0x2d, 0x64, 0xd2, 0xf1, 0xdd, 0xfc, 0xac, 0xf3, 0xb3, 0x3, 0xef, 0xcc, 0xa8, 0x4b}, - output384: []byte{0xd7, 0x9a, 0xca, 0x6f, 0x2d, 0xdd, 0x22, 0x5b, 0x1b, 0x72, 0xc6, 0x59, 0x88, 0x9, 0x6f, 0xd, 0xd2, 0x12, 0xee, 0x63, 0x61, 0x24, 0xf7, 0xfb, 0x95, 0x83, 0xde, 0x56, 0xf2, 0xf6, 0x32, 0x61, 0x68, 0x6d, 0xe1, 0xdd, 0x6, 0x94, 0xd2, 0x18, 0x7d, 0xf3, 0x25, 0x4c, 0x37, 0x97, 0x83, 0xa6}, - output512: []byte{0xd9, 0x98, 0x2c, 0xc7, 0x53, 0xea, 0x96, 0xda, 0xab, 0xb5, 0xee, 0x67, 0x12, 0x4a, 0x29, 0x83, 0xc6, 0x18, 0xe2, 0x5b, 0x0, 0xb4, 0x8e, 0x3d, 0xbb, 0xc7, 0xa5, 0x7b, 0xba, 0x38, 0x34, 0x17, 0x2f, 0x11, 0xf0, 0xf3, 0x5, 0xad, 0x6c, 0xe, 0x99, 0x83, 0x2d, 0xe6, 0x25, 0x0, 0x5c, 0x6d, 0x8d, 0x2c, 0xb7, 0x89, 0xb0, 0x16, 0x33, 0x8d, 0x2e, 0xe8, 0x83, 0x35, 0xda, 0xb8, 0x34, 0xcb}}, - testcase{ - msg: []byte{0x21, 0x8a, 0x31, 0x57, 0x34, 0x65, 0xb8, 0xa5, 0x43, 0xe2, 0x93, 0xe5, 0xa5, 0x91, 0x11, 0x3e, 0x9c, 0xcc, 0xd2, 0x9, 0x5f, 0x51, 0x9d, 0x2b, 0xd, 0x7a, 0x19, 0x5a, 0x62, 0x59, 0x50, 0xae, 0x2f, 0xd5, 0x2a, 0xd7, 0xd5, 0xe5, 0xc9, 0x84, 0xe5, 0xbc, 0xa8, 0x9f, 0x7f, 0xba, 0xeb, 0xaa, 0xf4, 0x68, 0x6d, 0xb9, 0x68, 0x26, 0xe8, 0xe0, 0xcd, 0xef, 0x1b, 0x78, 0x7c, 0xd0, 0x81, 0x29, 0xf7, 0xac, 0x7b, 0xb0, 0xe1, 0x63, 0x5f, 0x7f, 0x52, 0xc5, 0xb6, 0xd6, 0x49, 0x7a, 0xd, 0xb6, 0x12, 0x5b, 0xf0, 0xb2, 0xfd, 0xc0, 0x6c, 0x8f, 0x72, 0xfe, 0x16, 0xf4, 0xd7, 0x5d, 0x5e, 0xf9, 0x62, 0x7, 0x86, 0xc8, 0x5d, 0xc, 0x12, 0x8a, 0xec, 0xdd, 0x36, 0x23, 0x90, 0x3, 0x9e, 0x25, 0x48, 0xd1, 0xdc, 0xaa, 0x0, 0x8b, 0xf, 0xd8, 0x70, 0xbe, 0x34, 0xe4, 0xe, 0x66, 0xc0, 0xae, 0xfc, 0xa2, 0x8b, 0xc6, 0x31, 0xb8, 0xfd, 0x80, 0x31, 0xfe, 0x7a, 0x5f, 0x39, 0xe8, 0x1d, 0x19, 0xc0, 0xcc, 0xa1, 0x8f, 0x1a, 0xec, 0xbb, 0x8a, 0xe0, 0xc9, 0xa4, 0xd1, 0xb, 0x85, 0x39, 0x3c, 0xb5, 0x84, 0x12, 0xb5, 0x65, 0xa2, 0x99, 0x99, 0xcd, 0x3, 0x98, 0x83, 0xeb, 0x9, 0x55, 0x47, 0xe8, 0xcb, 0xf5, 0x89, 0xb0, 0x86, 0x44, 0x4f, 0xe, 0xc3, 0x2, 0x23, 0x6e, 0x6e, 0xfc, 0x50, 0x8c, 0x3c, 0x8, 0x87, 0x3c, 0xfe, 0x13, 0xd5, 0x65, 0xf5, 0x50, 0x87, 0x90, 0xfd, 0xac, 0x23, 0x91, 0x58, 0xae, 0x65, 0xa2, 0x38, 0x19, 0xf3, 0x65, 0xec, 0xbf, 0x45, 0x86, 0xea, 0xaf, 0x39, 0xa5, 0xb7, 0x3c, 0xe6, 0xaf, 0xef, 0x65, 0x33, 0xd5, 0x6d, 0x20, 0x75, 0x87, 0x20, 0xf2, 0x2e, 0x27, 0xe2, 0xa4, 0xbe, 0x8, 0x65, 0x9b, 0x5b, 0x74, 0x9a, 0xc2, 0x9, 0x91, 0xe, 0xaf, 0x59, 0xe, 0x5d, 0x12, 0x76, 0xb8, 0xce, 0x3b, 0xcc, 0x49, 0x33, 0x1f, 0xe7, 0x38, 0x13, 0x41, 0x7c, 0xb, 0x1e, 0x6e, 0xfb, 0xb2, 0x41, 0x8c, 0x82, 0x72, 0x46, 0x7, 0x3, 0x24, 0x33, 0xa0, 0xd7, 0x20, 0xc3, 0x81, 0x47, 0x4e, 0xba, 0x57, 0x49, 0x30, 0x5d, 0x8f, 0xee, 0x12, 0x30, 0xee, 0xb, 0xef, 0x48, 0x28, 0x6e, 0x60, 0x2c, 0x59, 0x3b, 0x9c, 0x54, 0x34, 0xcd, 0x5e, 0x4d, 0xaa, 0x36, 0xed, 0x48, 0xc4, 0x7b, 0xb9, 0xb5, 0x40, 0xf0, 0x77, 0xd2, 0x1f, 0xef, 0xf3, 0x69, 0x17, 0x9c, 0x44, 0x36, 0x65, 0xcc, 0xb9, 0x8b, 0xa0, 0xd5, 0xa7, 0xb8, 0x93, 0x2a, 0x8d, 0xd7, 0xd5, 0xdc, 0x2, 0xf, 0x62, 0x61, 0xe2, 0x4f, 0xde, 0xa9, 0xc6, 0x61, 0x1a, 0x9, 0x6b, 0xbf, 0xfc, 0x44, 0xaa, 0xd9, 0x97, 0xc7, 0xbb, 0x3e, 0xa3, 0x23, 0x5, 0xa6, 0xab, 0x41, 0xe3, 0x3c, 0x55, 0xf0, 0x27, 0xd3, 0xa9, 0x90, 0x52, 0x0, 0x17, 0xcb, 0x8c, 0xc9, 0x50, 0x94, 0xd2, 0x25, 0xc9, 0x8f, 0xe7, 0xff, 0xc2, 0x1c, 0x44, 0x80, 0x96, 0x73, 0x76, 0xec, 0x8a, 0x22, 0xb2, 0x21, 0x6f, 0xe4, 0x67, 0xc4, 0x9e, 0x50, 0xed, 0x8c, 0xcc, 0x42, 0xfe, 0x9b, 0xb3, 0xc5, 0x21, 0xb, 0x8, 0x6a, 0x9f, 0xf1, 0x94, 0x7, 0x48, 0x42, 0xaf, 0xff, 0xfd, 0xa8, 0xf4, 0x73, 0x4e, 0x35, 0x4c, 0x97, 0x1d, 0xda, 0xa4, 0x8f, 0x38, 0xfb, 0xa1, 0xb7, 0xd5, 0xcd, 0x74, 0xf7, 0x43, 0x3e, 0xf5, 0xa4, 0x5d, 0xf, 0x6c, 0xf1, 0xd9, 0x90, 0x80, 0xc2, 0xa7, 0xc0, 0xde, 0xa6, 0xe8, 0xad, 0xf5, 0x1b, 0xd5, 0x9a, 0xaa, 0x50, 0x2e, 0x75, 0xc9, 0x6b, 0xf6, 0xd5, 0x39, 0x74, 0xda, 0x31, 0xaf, 0x2, 0x78, 0x43, 0xf3, 0xaf, 0xcc, 0x34, 0xce, 0x1e, 0xcb, 0x81, 0xb6, 0x14, 0xe9, 0xd2, 0xc3, 0x82, 0xd8, 0xb0, 0xb6, 0x0, 0x7c, 0xb4, 0xc5, 0x4e, 0xc5, 0x7, 0xfe, 0xeb, 0xed, 0x99, 0x92, 0xdf, 0x8d, 0x12, 0x51, 0xc7, 0x4e, 0x79, 0xb5, 0x70, 0xee, 0x4c, 0x26, 0x8d, 0x8e, 0x3, 0xcd, 0x85, 0x73, 0x0, 0x5f, 0x17, 0xdc, 0xe2, 0x4c, 0x6a, 0x52, 0xc0, 0x76, 0x99, 0x5e, 0x72, 0xab, 0x5f, 0x72, 0xf2, 0x90, 0x68, 0x20, 0x81, 0x93, 0x2e, 0x33, 0x57, 0xf4, 0xcf, 0x6, 0x59, 0xf5, 0xac, 0x6a, 0xd, 0x32, 0x4c, 0x9f, 0x52, 0x81, 0x1b, 0xb5, 0x2c, 0x9c, 0xd0, 0xcc, 0x85, 0x81, 0x78, 0xb9, 0x28, 0x3a, 0xa5, 0x3c, 0x52, 0x30, 0x45, 0x0, 0x4b, 0x2b, 0x55, 0xbc, 0x27, 0x3a, 0x49, 0xca, 0xc1, 0x7b, 0x95, 0xe3, 0x6f, 0x8d, 0x39, 0xc6, 0x48, 0x77, 0x53, 0x1, 0x41, 0xc6, 0x68, 0xda, 0x71, 0x5c, 0x3e, 0x1b, 0x2e, 0x21, 0x72, 0x42, 0x27, 0x28, 0xc1, 0xf7, 0xc1, 0xfd, 0xd3, 0x47, 0x6d, 0x13, 0x48, 0x7f, 0x19, 0x3c, 0xb1, 0x8c, 0x1f, 0xce, 0xf4, 0x3c, 0xce, 0x59, 0x4b, 0x54, 0x8f, 0x16, 0x4a, 0x24, 0xd2, 0xe0, 0xc1, 0x5d, 0xd4, 0xf6, 0x56, 0x14, 0xc0, 0xf0, 0xbe, 0xd2, 0x59, 0x7b, 0x45, 0x3a, 0x93, 0x49, 0xec, 0x79, 0xf1, 0x54, 0xe5, 0x2e, 0x9f, 0xb7, 0x4e, 0xb5, 0x51, 0x61, 0x46, 0x66, 0x17, 0x94, 0x3c, 0xc9, 0x18, 0x9e, 0x68, 0x1a, 0x3c, 0xa5, 0x11, 0x50, 0xce, 0x23, 0xb3, 0x0, 0x9a, 0xe9, 0x91, 0x64, 0x9c, 0x88, 0x26, 0x29, 0xf7, 0x6f, 0xfa, 0x91, 0x61, 0xba, 0xa1, 0xd0, 0x20, 0x42, 0xba, 0xf0, 0xd8, 0x16, 0xba, 0xcc, 0x3d, 0x3a, 0x5c, 0x90, 0x27, 0x9f, 0x39, 0x94, 0xd4, 0xa5, 0xee, 0xd4, 0xda, 0x64, 0x95, 0xcd, 0xf9, 0x56, 0xe, 0x90, 0xd, 0x7a, 0x7e, 0x58, 0x2c, 0xcb, 0x92, 0xe5, 0x43, 0xc3, 0xe4, 0x2a, 0xbc, 0xbf, 0xc2, 0xa8, 0xd5, 0x3e, 0x91, 0x41, 0x94, 0x2e, 0x3b, 0x58, 0x11, 0x5b, 0x6b, 0x64, 0xaa, 0x65, 0x4f, 0x9c, 0x8e, 0xa1, 0xb8, 0x56, 0x58, 0x8d, 0x46, 0x4b, 0x9a, 0x6a, 0x64, 0x2d, 0xf, 0xcf, 0x44, 0x30, 0xb8, 0x86, 0x37, 0x20, 0x67, 0x58, 0xaf, 0x50, 0xd, 0xaa, 0x35, 0xc7, 0xb6, 0x52, 0xa8, 0x44, 0xed, 0xbb, 0xfd, 0x90, 0x8a, 0xa9, 0x3b, 0x79, 0x29, 0x24, 0x82, 0x80, 0xdb, 0xf4, 0x8c, 0xf1, 0xcb, 0xab, 0xe1, 0x5a, 0xca, 0x2, 0xfe, 0x6d, 0x72, 0xbf, 0xe7, 0xfb, 0xac, 0x98, 0xa0, 0x3, 0x2a, 0x32, 0x34, 0x6f, 0x40, 0xb2, 0xec, 0xeb, 0x6d, 0xe2, 0xbe, 0x6e, 0x58, 0xf, 0x89, 0xa8, 0x6e, 0x4e, 0xac, 0xaf, 0xe, 0x95, 0x2e, 0x50, 0x85, 0x37, 0x56, 0x65, 0x77, 0xdd, 0x6d, 0xe6, 0xbe, 0xf2, 0xfc, 0x93, 0x55, 0x9b, 0x96, 0xe6, 0x4a, 0x2a, 0x9f, 0x93, 0x34, 0xc3, 0xc2, 0x6d, 0xb, 0xbd, 0x84, 0x97, 0x88, 0xf3, 0x28, 0x42, 0x9d, 0x3a, 0x8b, 0x26, 0x64, 0x7c, 0x96, 0xb3, 0xd5, 0x53, 0xf3, 0x80, 0x61, 0x9a, 0xd4, 0xf7, 0x99, 0xbb, 0xbd, 0x56, 0xaf, 0xf2, 0x2c, 0xe8, 0xb6, 0x1f, 0xe7, 0xc1, 0x8e, 0xd8, 0x8e, 0xbb, 0x5d, 0xbc, 0x47, 0x96, 0xbc, 0xe0, 0x16, 0x6, 0xd1, 0xeb, 0x76, 0x2f, 0xb1, 0x1f, 0xdb, 0xbd, 0x3c, 0xc6, 0xc5, 0x5a, 0xeb, 0x68, 0xbd, 0x93, 0xe9, 0xf3, 0x55, 0xcf, 0x7b, 0x7, 0xcf, 0xd0, 0x5c, 0x25, 0x2, 0xf0, 0xba, 0x79, 0x2c, 0x77, 0x3, 0xa0, 0x30, 0xc5, 0x2c, 0xbd, 0x54, 0x5f, 0x39, 0x41, 0x8, 0x14, 0xc, 0xb9, 0xb5, 0xa1, 0x49, 0xb6, 0x16, 0xfb, 0x6a, 0x45, 0xdb, 0xa5, 0x9b, 0x51, 0x18, 0xb6, 0x6c, 0xb0, 0x94, 0x9a, 0x3d, 0xb9, 0xe3, 0x9e, 0xde, 0xa, 0xbc, 0x2e, 0x2e, 0x4f, 0x76, 0xcb, 0xfc, 0x32, 0xd7, 0xd9, 0x8d, 0x36, 0xd2, 0x3e, 0x75, 0x7f, 0x3c, 0x5b, 0x3c, 0xd3, 0xb3, 0x79, 0x16, 0xb2, 0xcc, 0x32, 0xe4, 0xfb, 0x4c, 0xe1, 0x91, 0xc0, 0x3e, 0xdd, 0x7a, 0xb4, 0xf0, 0x61, 0xc5, 0xf1, 0x7, 0x5e, 0x59, 0x32, 0x8e, 0xb6, 0x96, 0xe7, 0xd0, 0x0, 0xc9, 0x14, 0x9c, 0x93, 0x12, 0x6a, 0xad, 0x94, 0xe3, 0x8, 0x84, 0xc9, 0x76, 0x17, 0x2e, 0x75, 0xbf, 0x25, 0x96, 0x77, 0x85, 0xeb, 0xb5, 0xaf, 0xa6, 0x84, 0x9, 0xda, 0xe8, 0x73, 0xa6, 0x12, 0xa7, 0x44, 0xa1, 0x52, 0x4c, 0x2b, 0x96, 0x84, 0x3d, 0xe6, 0x1b, 0xb9, 0x59, 0xdb, 0xc7, 0xdc, 0x78, 0x2b, 0x42, 0xc3, 0x91, 0x71, 0xf6, 0xc, 0x42, 0x4, 0x97, 0xdb, 0x5f, 0x77, 0xbd, 0x5f, 0x84, 0xb5, 0x2c, 0xc3, 0x92, 0x46, 0x5, 0xf5, 0x34, 0x0, 0x5f, 0x80, 0x68, 0xd2, 0x4c, 0x47, 0xef, 0x82, 0xed, 0x7c, 0xd4, 0xe5, 0x21, 0x65, 0x1, 0xc3, 0x30, 0x4b, 0xda, 0x36, 0x59, 0x90, 0x6e, 0x8a, 0xfb, 0x98, 0xc7, 0x4f, 0x86, 0x5d, 0xab, 0x33, 0xa7, 0x0, 0xa6, 0xc8, 0x83, 0x9e, 0x40, 0x5b, 0xc6, 0xce, 0xe1, 0xc3, 0x61, 0xa7, 0x2f, 0xb6, 0xba, 0xf4, 0xb1, 0x18, 0x3f, 0xc8, 0x0, 0xbd, 0xee, 0xdb, 0xef, 0x14, 0x1a, 0x59, 0x72, 0x53, 0xad, 0x54, 0xfe, 0x11, 0xd6, 0xdb, 0x36, 0x18, 0x65, 0xdd, 0x58, 0x82, 0x51, 0x16, 0xb5, 0x34, 0xae, 0x8, 0xb0, 0x75, 0x86, 0x37, 0x1a, 0x37, 0x91, 0xfc, 0x62, 0x71, 0xc, 0x43, 0x56, 0xe2, 0xbe, 0x12, 0x70, 0xd, 0xdf, 0xc7, 0xf3, 0xe3, 0x9, 0xf5, 0xec, 0xac, 0x47, 0x54, 0xa4, 0xa2, 0xce, 0xe2, 0x66, 0xa3, 0x7d, 0x67, 0xa3, 0xf8, 0xcf, 0x97, 0xc4, 0x5d, 0x37}, - output224: []byte{0x99, 0x98, 0x71, 0xb0, 0x57, 0xe1, 0x4, 0xe8, 0xa, 0x48, 0x85, 0xe3, 0x5b, 0x72, 0xe0, 0xd5, 0x79, 0xb5, 0x2b, 0x29, 0xc4, 0x4c, 0xfc, 0x36, 0xb9, 0xd4, 0x4, 0x6c}, - output256: []byte{0xf3, 0x3c, 0x45, 0xd1, 0x42, 0xe, 0xee, 0xac, 0x9f, 0xa7, 0x38, 0x46, 0xc0, 0x80, 0xae, 0xaa, 0x5, 0x25, 0x34, 0x4, 0xf7, 0xd4, 0x2, 0x8f, 0x57, 0x45, 0x7c, 0x4a, 0xfe, 0x15, 0x45, 0xde}, - output384: []byte{0x5c, 0xb2, 0x75, 0xf4, 0x61, 0x2f, 0xb, 0x3a, 0xf3, 0x1e, 0xa2, 0x9b, 0x1e, 0xbf, 0xc7, 0xd8, 0x8, 0xd1, 0x45, 0xe6, 0x95, 0x4f, 0x33, 0x7e, 0x9e, 0xb5, 0xd9, 0xef, 0x45, 0x20, 0x97, 0xf3, 0xd, 0x44, 0x18, 0x27, 0xed, 0x72, 0x72, 0x9c, 0xc9, 0x5, 0x1e, 0x45, 0x83, 0xcd, 0x4f, 0x11}, - output512: []byte{0xf1, 0xc0, 0x97, 0x6f, 0xfd, 0xfb, 0xbd, 0x9e, 0xb4, 0x6f, 0xbf, 0xaa, 0x34, 0x10, 0x94, 0x91, 0x91, 0xc, 0xef, 0x2f, 0x2b, 0xce, 0x2, 0x4a, 0x60, 0x89, 0x6e, 0x80, 0xe9, 0x2e, 0x60, 0xc5, 0xc, 0x99, 0x35, 0x23, 0xe, 0x5e, 0x16, 0x52, 0x4c, 0x17, 0x5, 0x3f, 0xc, 0x71, 0x9d, 0xba, 0xba, 0xe3, 0xfe, 0xa9, 0xfd, 0x4a, 0x88, 0xff, 0xc0, 0x2d, 0x6a, 0x2a, 0x48, 0x3f, 0x33, 0x8d}}, - testcase{ - msg: []byte{0x4f, 0xa3, 0xdf, 0x1d, 0xea, 0x75, 0xad, 0x4b, 0x9c, 0x37, 0x92, 0x6, 0xa9, 0x5f, 0xed, 0x93, 0x0, 0x0, 0x48, 0x2e, 0x5b, 0x68, 0x3f, 0xd2, 0xb1, 0x7d, 0xc8, 0xe7, 0xd5, 0xc4, 0xbc, 0x1b, 0x73, 0x18, 0x6c, 0xcc, 0x13, 0xc9, 0xff, 0x2d, 0xd0, 0x9f, 0xc1, 0xd4, 0xf6, 0x80, 0x34, 0xd1, 0x20, 0xe8, 0x4c, 0xa7, 0x3a, 0x0, 0xb7, 0x1a, 0x3b, 0x46, 0xd1, 0xef, 0xc6, 0xff, 0x88, 0xcf, 0x2e, 0xda, 0x65, 0x81, 0xb, 0x9, 0x8c, 0xc5, 0xe6, 0x51, 0xd9, 0xcf, 0x6, 0x4e, 0x87, 0x7, 0x6d, 0x5a, 0x87, 0x18, 0x49, 0xf3, 0xb4, 0x5, 0xd3, 0xd5, 0x8e, 0xf5, 0xb1, 0xf1, 0x5, 0x20, 0xa9, 0xfb, 0x4f, 0xc8, 0x4a, 0x81, 0xa8, 0x7b, 0x13, 0xdb, 0xfb, 0xf9, 0xd8, 0x67, 0x49, 0x43, 0xe2, 0x8c, 0x25, 0x7e, 0x46, 0xd8, 0xad, 0x7b, 0xe1, 0x78, 0x5f, 0x1d, 0xc7, 0xc9, 0xb1, 0xbd, 0x57, 0x4a, 0xd1, 0xdd, 0xa4, 0x8f, 0x2, 0x55, 0xc8, 0x53, 0xd2, 0x49, 0xb, 0xd3, 0xd6, 0x3d, 0xa2, 0x2a, 0x83, 0x69, 0xcf, 0xd0, 0x25, 0x94, 0x99, 0x9a, 0x2e, 0xf4, 0x43, 0x30, 0x8f, 0xb8, 0x29, 0x82, 0x66, 0xa1, 0x1e, 0xfa, 0x17, 0x71, 0x2, 0xc7, 0x5d, 0xc6, 0x74, 0xe8, 0x9f, 0xc9, 0xdc, 0xc1, 0xa0, 0xd3, 0xc8, 0x63, 0xbc, 0x26, 0x14, 0x11, 0x2, 0x17, 0x5d, 0x26, 0x78, 0xeb, 0x6e, 0x13, 0xd9, 0xb, 0xbd, 0x9a, 0x5e, 0xb8, 0x9a, 0xe8, 0xc0, 0xcb, 0x47, 0xd7, 0xf3, 0x40, 0xd3, 0xd3, 0x20, 0x42, 0xa2, 0x76, 0x2b, 0xc9, 0xbf, 0x2b, 0x40, 0xeb, 0x40, 0xe8, 0x7f, 0xb4, 0x26, 0x10, 0xfe, 0x7e, 0x35, 0x70, 0x51, 0xf0, 0x14, 0x94, 0x70, 0x4f, 0xbf, 0xf7, 0x33, 0x21, 0xb4, 0x73, 0x1, 0xa0, 0x79, 0x9b, 0x7e, 0xe3, 0xfe, 0x5e, 0x62, 0x20, 0xf, 0x39, 0x7a, 0x61, 0xed, 0x45, 0x9, 0xa6, 0x2f, 0x71, 0x6, 0xed, 0xe, 0xfb, 0xa, 0xbd, 0x6a, 0xe9, 0xe4, 0xa1, 0xfe, 0x9b, 0x2, 0xc0, 0x92, 0xdc, 0xdc, 0x75, 0x1, 0x5c, 0xf6, 0x2, 0xf3, 0xb9, 0xa8, 0x98, 0x8b, 0x60, 0x9e, 0x6c, 0xd, 0x1c, 0x5c, 0x3e, 0x21, 0x9f, 0xf5, 0x78, 0x75, 0xc2, 0xef, 0x1, 0x61, 0x5f, 0x89, 0x44, 0x7e, 0xa6, 0x2, 0xdf, 0xc9, 0x4e, 0xec, 0x17, 0xa3, 0x98, 0xc0, 0x14, 0xbd, 0x34, 0x66, 0x91, 0xfe, 0x20, 0x9a, 0x0, 0x27, 0x71, 0xdc, 0x81, 0x64, 0x42, 0x2c, 0xd1, 0x66, 0xaf, 0xb4, 0x57, 0xa8, 0xb3, 0x7, 0x12, 0x82, 0x17, 0x8a, 0x3e, 0xbd, 0x20, 0x1d, 0x9b, 0x7, 0xb2, 0x7e, 0x71, 0x1e, 0x7e, 0xe7, 0xd3, 0x3a, 0xa5, 0x21, 0xe, 0xd4, 0xe4, 0xe9, 0x24, 0x86, 0x77, 0x5d, 0x14, 0xa6, 0xce, 0xd0, 0x92, 0xe3, 0x4a, 0x7a, 0xc8, 0x26, 0x70, 0x93, 0x99, 0x48, 0xfe, 0xc1, 0x49, 0xf9, 0xc0, 0x18, 0xfc, 0xaa, 0xd3, 0xfc, 0x59, 0x7d, 0x31, 0x57, 0x13, 0xf4, 0x4f, 0xc5, 0xe1, 0x72, 0x5f, 0x44, 0x8e, 0xca, 0xed, 0x40, 0xe8, 0xd8, 0x41, 0xbd, 0x2, 0xf1, 0xe8, 0x1c, 0x1, 0x9b, 0x8, 0xf9, 0x94, 0x12, 0xe3, 0x60, 0xc0, 0xbd, 0x37, 0x83, 0x91, 0xc6, 0x7d, 0x96, 0x4b, 0x47, 0xf5, 0xc, 0x26, 0xf0, 0xa4, 0x83, 0xed, 0x66, 0x40, 0x23, 0x61, 0x6b, 0xf, 0xc9, 0xaf, 0xe4, 0x36, 0x20, 0xdb, 0xe9, 0xcc, 0xfe, 0x7, 0xe, 0xf2, 0x95, 0xc0, 0x49, 0xea, 0xc7, 0x54, 0xc2, 0x12, 0x31, 0x30, 0xc6, 0xb2, 0xc0, 0x23, 0x2f, 0x64, 0x3, 0xaa, 0x7f, 0xd, 0xc3, 0x5a, 0x59, 0x99, 0xbf, 0x95, 0xd3, 0x4a, 0xd6, 0x12, 0x23, 0x4c, 0x62, 0x89, 0x27, 0x7a, 0xdb, 0x60, 0xe4, 0xf7, 0x2e, 0xc2, 0xdf, 0x57, 0xf, 0x5, 0x39, 0x5b, 0x3b, 0xe8, 0xa0, 0xa3, 0xc7, 0x8b, 0x73, 0x28, 0x21, 0xaa, 0x8, 0x92, 0x7c, 0x52, 0x4e, 0x15, 0xd6, 0x5f, 0x66, 0xa3, 0xdb, 0x8c, 0x1c, 0x96, 0xfb, 0x70, 0xbc, 0x6, 0x86, 0xaa, 0xc3, 0x10, 0x5, 0x1f, 0x46, 0x9f, 0xc5, 0xef, 0x88, 0xc, 0xf, 0x66, 0x94, 0x7c, 0x1c, 0x32, 0x8f, 0x97, 0x68, 0x4e, 0xa2, 0x4c, 0xbe, 0x63, 0xba, 0xed, 0x8d, 0x11, 0x4f, 0x40, 0x50, 0x7c, 0x29, 0x1, 0x3, 0x4e, 0x6a, 0xb3, 0x89, 0x3f, 0x36, 0x6d, 0x53, 0xf1, 0xcf, 0xca, 0x30, 0x93, 0x9, 0x21, 0x8c, 0xab, 0xce, 0xca, 0x47, 0x22, 0xfa, 0x9c, 0xcb, 0xc7, 0x24, 0x9b, 0x87, 0xc1, 0x2f, 0xf8, 0x39, 0x7f, 0x40, 0x48, 0x7e, 0xb0, 0x0, 0x82, 0xe7, 0xf5, 0x51, 0xd2, 0x7e, 0x30, 0x1c, 0x3b, 0xc7, 0xb5, 0x38, 0x9f, 0x70, 0x42, 0x53, 0x4b, 0xf7, 0xe6, 0x92, 0xdf, 0xea, 0x4d, 0xa2, 0x4f, 0x7c, 0x34, 0xb8, 0xd2, 0xff, 0x14, 0x5f, 0x54, 0xb5, 0x17, 0xfc, 0x97, 0x13, 0x4e, 0xc5, 0xac, 0x2c, 0xb9, 0x25, 0xc5, 0x8, 0xd7, 0xa6, 0xbd, 0x1, 0xfe, 0x7b, 0x76, 0x46, 0x48, 0x27, 0x49, 0x72, 0xbf, 0x8, 0x56, 0xd, 0x30, 0x80, 0x2e, 0xe, 0xb7, 0xed, 0xcc, 0x57, 0xaf, 0x47, 0x97, 0xbb, 0xf9, 0x2e, 0x86, 0x88, 0x26, 0x86, 0x6, 0xb0, 0xf1, 0xbc, 0x90, 0x1f, 0xcc, 0x22, 0x13, 0x62, 0x81, 0x66, 0x5e, 0xc1, 0x63, 0x93, 0xfa, 0x96, 0x1, 0xc4, 0xfb, 0xdb, 0x18, 0xcd, 0x1d, 0x1e, 0xe3, 0x82, 0xbc, 0x7, 0x97, 0x39, 0x3, 0xe9, 0x1f, 0xfa, 0x87, 0x39, 0x9d, 0x11, 0x41, 0xd4, 0x9f, 0x4f, 0xc, 0x6, 0x4a, 0xcf, 0x3a, 0xc9, 0x89, 0x78, 0x91, 0xdf, 0x10, 0xbc, 0xa0, 0x11, 0x6f, 0x2c, 0x3f, 0xef, 0x18, 0xf, 0xe6, 0xa8, 0xe9, 0x37, 0xc4, 0x78, 0xf2, 0xef, 0x29, 0x3a, 0xe9, 0x18, 0x6d, 0xcb, 0x1f, 0x76, 0xb6, 0xe4, 0x81, 0x1, 0xdf, 0x64, 0xe5, 0x7e, 0xa7, 0xc6, 0x4c, 0x5c, 0x0, 0x25, 0xe2, 0x21, 0xc8, 0xf5, 0xcb, 0xa5, 0xcc, 0x92, 0xd9, 0xce, 0xc6, 0x28, 0x14, 0x9, 0x96, 0xb2, 0x6d, 0x17, 0xf4, 0x39, 0xb7, 0x80, 0xf5, 0x9a, 0x99, 0x93, 0x1, 0x12, 0x2f, 0x82, 0xd0, 0x49, 0x5f, 0x8a, 0xb5, 0xae, 0x1e, 0xa5, 0x79, 0xf, 0x45, 0xe9, 0x92, 0xdf, 0xe0, 0xd, 0x5f, 0x82, 0xa7, 0xff, 0x13, 0x54, 0xae, 0xfd, 0xce, 0xfc, 0xd, 0x2d, 0x17, 0x31, 0xd2, 0x2f, 0xa2, 0xb7, 0x5a, 0xfd, 0x4f, 0xda, 0x25, 0xab, 0x19, 0x40, 0x55, 0xfa, 0x96, 0x28, 0x38, 0x10, 0x55, 0x24, 0x7c, 0x8c, 0x75, 0x87, 0xd2, 0x2e, 0x73, 0xc6, 0x1, 0x36, 0xc4, 0x28, 0x24, 0x52, 0xd4, 0x7a, 0xe0, 0x3a, 0xa0, 0x35, 0xfe, 0xbc, 0x26, 0xfc, 0xcd, 0x42, 0xa1, 0xcb, 0x79, 0xcf, 0x86, 0x6d, 0xb6, 0x41, 0x8a, 0x49, 0xfd, 0x82, 0x61, 0xe8, 0x77, 0xdd, 0xbb, 0x83, 0x9c, 0xc3, 0x95, 0x14, 0xdd, 0xb8, 0x7a, 0x8a, 0x40, 0xd7, 0x95, 0x53, 0x26, 0x26, 0xfe, 0xa4, 0xa4, 0xc3, 0x5d, 0x13, 0xe0, 0x28, 0xf9, 0xed, 0x1b, 0xc0, 0x9b, 0x6, 0xbe, 0x99, 0x9b, 0x8d, 0xdd, 0x22, 0x58, 0xaa, 0x5, 0x96, 0xbc, 0xbb, 0xf7, 0x2a, 0xf6, 0x7e, 0x10, 0xbe, 0xdd, 0x58, 0xd5, 0x99, 0xb8, 0xd5, 0x77, 0xa5, 0x83, 0xd6, 0x76, 0xbf, 0x55, 0x61, 0xf8, 0xc, 0xe5, 0xe9, 0x52, 0x87, 0x29, 0xa9, 0x2d, 0xf5, 0x78, 0xfe, 0x75, 0xdb, 0xc7, 0x4, 0x74, 0xb7, 0x57, 0x47, 0xa8, 0xd5, 0x5d, 0xe7, 0xe, 0x57, 0xbd, 0xd6, 0x2d, 0x43, 0x44, 0xdc, 0x21, 0x15, 0xed, 0x4d, 0xd6, 0x2f, 0x1f, 0xc9, 0x8b, 0xfa, 0x1e, 0x74, 0x21, 0xfc, 0x7, 0x0, 0x2, 0x5c, 0x46, 0xd0, 0xed, 0x1b, 0xef, 0x35, 0xc3, 0xb7, 0x78, 0x56, 0x32, 0x11, 0xb9, 0xfa, 0x9e, 0x8b, 0xa4, 0xbb, 0xcb, 0xf0, 0x1c, 0x2f, 0xb6, 0x26, 0xab, 0x7e, 0xf3, 0x25, 0xce, 0x9f, 0x46, 0x8d, 0xf2, 0xca, 0xcd, 0xb1, 0x78, 0xd3, 0x65, 0x57, 0xcd, 0x85, 0xd5, 0x42, 0xc0, 0x67, 0xc2, 0x89, 0xe9, 0x26, 0xc1, 0xea, 0x2f, 0x20, 0xab, 0xd3, 0x29, 0xe9, 0x84, 0x16, 0x8b, 0xb6, 0xde, 0xf1, 0xdd, 0xcc, 0xf2, 0x14, 0xdc, 0xb6, 0xa5, 0x3a, 0xfd, 0x46, 0x2f, 0xe, 0x7e, 0x7a, 0x19, 0xe8, 0xc8, 0x8f, 0x4, 0x92, 0x44, 0x12, 0x5a, 0x6d, 0x7d, 0xd4, 0x1e, 0x58, 0xbc, 0x9b, 0x2f, 0xf7, 0xfa, 0x24, 0x78, 0xdf, 0x76, 0xaf, 0x73, 0x9, 0xc, 0xb1, 0xab, 0x59, 0xe3, 0x88, 0xba, 0x20, 0xe2, 0xc2, 0x97, 0xc9, 0x67, 0x73, 0x7a, 0x1a, 0xf6, 0x17, 0x93, 0xb6, 0x8e, 0xcd, 0x74, 0x39, 0x44, 0x4c, 0x48, 0xe2, 0x8e, 0x2d, 0x9, 0xc4, 0x8f, 0xad, 0xa5, 0xe0, 0xd1, 0xd1, 0x5e, 0x5b, 0x34, 0xa, 0x52, 0xf8, 0xb3, 0xb8, 0x54, 0xcc, 0xa4, 0x79, 0xf0, 0xa5, 0x98, 0x44, 0x5e, 0x14, 0xf5, 0x3b, 0x3b, 0xa3, 0x68, 0x91, 0x5, 0xc, 0x79, 0x67, 0x3d, 0xf3, 0xe2, 0xb5, 0x82, 0x5c, 0x95, 0x5a, 0x29, 0xe5, 0xc9, 0xa2, 0x2f, 0x39, 0x91, 0xd0, 0xaa, 0x78, 0x57, 0x18, 0xcf, 0xea, 0x1d, 0x23, 0x85, 0xf8, 0xe4, 0x7e, 0x4a, 0x75, 0xac, 0xbc, 0x79, 0x88, 0xd0, 0x55, 0x8d, 0x54, 0x1d, 0x71, 0xc4, 0xe6, 0xc5, 0xf1, 0xcb, 0x15, 0xb6, 0xc, 0xea, 0xc, 0x34, 0xa6, 0x7b, 0xbc, 0xe1, 0x5, 0xd7, 0xa8, 0x96, 0x2, 0x5e, 0x2, 0x54, 0xde, 0x7d, 0x7a, 0xf7, 0x24, 0xc9, 0x2, 0x7d, 0x44, 0xb8, 0x64, 0x21, 0x92, 0xa0, 0x8a, 0xb8, 0xe1, 0xef, 0x30, 0x46, 0xdd, 0xa6, 0x1, 0x4d, 0xf7, 0xf4, 0xc9, 0xe6, 0x3c, 0x63, 0x5e, 0x48, 0xab, 0x2e, 0x70, 0xb6, 0x40, 0xd4, 0x80, 0x99, 0x8e, 0xc9, 0x35, 0x7e, 0x66, 0x5f, 0x99, 0xd7, 0x6f, 0xe5, 0x52, 0x9e, 0xf2, 0x3c, 0x1b, 0xdf, 0xe0, 0x17, 0xc3, 0xa6, 0x6c, 0xd4, 0xeb, 0x2d, 0xdb, 0x42, 0xef, 0x85, 0xea, 0xc, 0xd6, 0x55, 0x34}, - output224: []byte{0x62, 0x97, 0xda, 0xbd, 0xc6, 0x6a, 0x68, 0xa2, 0x8e, 0x2f, 0x32, 0xfc, 0x95, 0xe5, 0x86, 0x40, 0x35, 0x0, 0x1c, 0xcb, 0x7a, 0xd, 0xcf, 0x59, 0x24, 0x67, 0xd4, 0x15}, - output256: []byte{0xeb, 0x35, 0x18, 0x38, 0xfe, 0x82, 0x25, 0xfb, 0xeb, 0xea, 0x91, 0x68, 0xdb, 0xb7, 0x8, 0x87, 0x2c, 0xa4, 0x3a, 0xc9, 0x34, 0x80, 0xc3, 0xaf, 0xfb, 0xe6, 0xcc, 0x3a, 0x15, 0xa2, 0x26, 0x3c}, - output384: []byte{0x3c, 0xb4, 0x48, 0x2b, 0x4f, 0x5f, 0xa1, 0x5b, 0x8c, 0x24, 0xa, 0xde, 0x9d, 0x99, 0x53, 0x4e, 0x8d, 0x91, 0x4a, 0x4c, 0x1, 0x29, 0xe, 0xf4, 0xb9, 0x41, 0x75, 0x97, 0x43, 0x1e, 0xdb, 0x1e, 0xce, 0x45, 0x6d, 0xc6, 0xb, 0x26, 0xfb, 0xd9, 0xc8, 0x8d, 0xb5, 0x80, 0x2d, 0x1c, 0xdc, 0xd9}, - output512: []byte{0x7a, 0xee, 0x30, 0x93, 0x3, 0x55, 0x71, 0x86, 0x79, 0xd3, 0x87, 0xdf, 0xbe, 0xd0, 0x8e, 0xb7, 0x0, 0xb3, 0x24, 0xbb, 0x27, 0x75, 0xbc, 0xfd, 0x11, 0xa8, 0x8d, 0x37, 0xaa, 0x69, 0xa5, 0xb1, 0xb0, 0x1, 0xe, 0x8a, 0x5c, 0x38, 0xbb, 0x20, 0xe5, 0xe5, 0xdd, 0xcf, 0x5b, 0xb2, 0x43, 0x68, 0x30, 0xdc, 0xe8, 0xda, 0x20, 0x48, 0x19, 0x77, 0x56, 0xfc, 0x85, 0xb2, 0xc, 0x16, 0xf0, 0xa0}}, - testcase{ - msg: []byte{0xbc, 0x25, 0x99, 0x72, 0xad, 0x10, 0x9b, 0xde, 0x60, 0x39, 0x99, 0x72, 0x8e, 0xf0, 0xbb, 0xf2, 0x3a, 0x91, 0x18, 0x29, 0xc1, 0xc9, 0x10, 0xf0, 0x51, 0x7a, 0xd7, 0x58, 0x4a, 0xab, 0x80, 0xb2, 0x7d, 0x4a, 0x59, 0x52, 0x3d, 0xb1, 0x1e, 0xf7, 0xb8, 0x6d, 0x73, 0xe4, 0x80, 0xf8, 0x26, 0x99, 0xe4, 0x4e, 0x2e, 0x28, 0x11, 0x72, 0xd4, 0x1c, 0xef, 0xe2, 0xa1, 0x5a, 0xae, 0x50, 0xe1, 0x39, 0x18, 0xef, 0xb6, 0x3d, 0xe0, 0x78, 0x5b, 0xa4, 0x15, 0xc7, 0xda, 0x37, 0x46, 0xa6, 0x69, 0xc7, 0xf6, 0xad, 0xac, 0x8c, 0x7e, 0xd0, 0x4f, 0xb5, 0xf8, 0xec, 0x70, 0x20, 0x76, 0x15, 0xc5, 0xb6, 0x15, 0x7f, 0x3b, 0xd9, 0xac, 0x31, 0x47, 0x8f, 0x50, 0x5, 0xf0, 0xe8, 0xde, 0x11, 0x39, 0xfd, 0xf4, 0xd, 0x2e, 0x1, 0xdb, 0xf5, 0x49, 0x73, 0xf7, 0x22, 0x5c, 0xa5, 0x45, 0xad, 0x7b, 0x8f, 0xac, 0x82, 0x33, 0xcc, 0x57, 0x9d, 0x4e, 0x6, 0x39, 0x5b, 0xae, 0x79, 0x1a, 0x5e, 0x49, 0x83, 0x8a, 0x80, 0x6f, 0x69, 0xb5, 0x78, 0x58, 0x61, 0x20, 0x63, 0x93, 0x52, 0x84, 0xf7, 0xaa, 0x2e, 0x37, 0x69, 0x10, 0x4f, 0x13, 0xf0, 0xd3, 0xc5, 0x31, 0xa3, 0xc7, 0x66, 0xb1, 0xf0, 0x8, 0xdb, 0x43, 0x7a, 0x2b, 0xbb, 0x4, 0x16, 0x91, 0xbb, 0x93, 0x77, 0x1, 0x2a, 0x9a, 0x73, 0x59, 0xba, 0x41, 0x8, 0x36, 0xef, 0x7b, 0xa9, 0x49, 0xe5, 0xf5, 0x6f, 0x70, 0xe8, 0x3c, 0x99, 0xdf, 0x96, 0x1c, 0xc3, 0xf4, 0x9d, 0x41, 0x33, 0xbe, 0xc5, 0x43, 0xdd, 0xaa, 0x14, 0xda, 0xba, 0xa5, 0x4f, 0xb6, 0xe5, 0xf5, 0x26, 0x3b, 0x83, 0xdf, 0x68, 0x63, 0xe8, 0x41, 0x79, 0x72, 0x25, 0x77, 0x10, 0x1c, 0xf3, 0xf6, 0x7c, 0x8, 0xc7, 0x53, 0xc5, 0xb0, 0x79, 0xde, 0x79, 0x5d, 0x29, 0x22, 0xfa, 0x21, 0xab, 0x23, 0xe2, 0x43, 0x7a, 0x64, 0xc6, 0x2a, 0xf6, 0x34, 0x98, 0x52, 0x66, 0x3, 0x9f, 0x7c, 0xbf, 0x1e, 0x1d, 0x76, 0x2d, 0xf4, 0x9f, 0x12, 0xa4, 0xff, 0x7e, 0xb9, 0x84, 0x6e, 0x8e, 0x5d, 0xce, 0xe5, 0x59, 0x8, 0x4f, 0xa, 0xd1, 0x75, 0xe0, 0xc6, 0xfc, 0xa9, 0x84, 0xb1, 0x68, 0xb7, 0x51, 0x25, 0x41, 0xb7, 0x56, 0xb, 0x68, 0xc8, 0xaf, 0xd0, 0x2f, 0xec, 0xe1, 0x15, 0xf0, 0xe9, 0x32, 0x7d, 0x3d, 0x6d, 0x57, 0xbc, 0x28, 0xc8, 0xf9, 0x14, 0xe9, 0xa5, 0xb3, 0x1d, 0x82, 0x2b, 0x48, 0xe0, 0xe4, 0x86, 0x5f, 0x65, 0x2e, 0x93, 0x13, 0xf0, 0xad, 0xe5, 0x66, 0x52, 0x29, 0x63, 0x19, 0x23, 0xa4, 0x97, 0xd6, 0x5e, 0x70, 0x17, 0x78, 0x73, 0x9c, 0x58, 0x42, 0xa0, 0x8a, 0x9, 0xfb, 0x25, 0x68, 0x3c, 0x38, 0xbb, 0x17, 0xeb, 0x95, 0xba, 0xb4, 0xb3, 0x58, 0xef, 0x56, 0x47, 0xbb, 0x29, 0xd3, 0xbf, 0x86, 0xe1, 0x58, 0x68, 0xe0, 0x2d, 0xa7, 0xe0, 0x22, 0x9e, 0x82, 0x13, 0x7, 0x1a, 0x24, 0xb4, 0xcd, 0x37, 0x32, 0x66, 0x56, 0x3e, 0x36, 0x46, 0x4c, 0x8b, 0x24, 0x5d, 0xe4, 0xa6, 0x2b, 0xe1, 0xaf, 0x9c, 0x70, 0x22, 0xf6, 0xc3, 0x89, 0x4d, 0xe6, 0xad, 0x8b, 0x9b, 0x17, 0xa6, 0xdf, 0x84, 0xaf, 0x65, 0x46, 0x6c, 0x31, 0x9b, 0xa4, 0x3a, 0x5e, 0xbd, 0xbf, 0x24, 0x83, 0x3c, 0xbc, 0xf1, 0x74, 0x10, 0xe7, 0x96, 0x37, 0xad, 0x5b, 0x77, 0x1b, 0x21, 0x57, 0x61, 0x13, 0xb8, 0x51, 0xbb, 0x73, 0xaf, 0x7b, 0xa9, 0xfa, 0x19, 0xe5, 0xcd, 0x7a, 0x53, 0x69, 0x6, 0x8a, 0x51, 0xf5, 0xd6, 0xa9, 0x28, 0xa8, 0x30, 0x68, 0x29, 0xb8, 0x10, 0xf5, 0x9c, 0xdd, 0xfb, 0x42, 0xc3, 0xb5, 0x8f, 0x6b, 0x9, 0x26, 0x87, 0x7d, 0xd3, 0x5c, 0x41, 0x73, 0x62, 0x8b, 0xb5, 0x54, 0xc7, 0x3, 0x67, 0x79, 0xc0, 0x0, 0xe8, 0xf, 0x93, 0xd2, 0x6c, 0x85, 0x60, 0xde, 0x78, 0x5, 0x7e, 0xa7, 0x4e, 0xb1, 0x22, 0x30, 0xc8, 0x31, 0xd, 0x57, 0x74, 0x73, 0xd9, 0x4c, 0x2d, 0xf1, 0x45, 0x77, 0xb4, 0x36, 0x1b, 0x30, 0x7d, 0x8b, 0xb6, 0x37, 0x1b, 0xa7, 0xb3, 0xf8, 0x64, 0x14, 0x88, 0xb1, 0x49, 0xb, 0x24, 0xda, 0x9c, 0xef, 0x1f, 0xfc, 0x73, 0x2c, 0xac, 0x6f, 0x9f, 0xcd, 0x69, 0x72, 0x8c, 0x1b, 0x7b, 0x4e, 0x72, 0xe8, 0xfc, 0x5c, 0x42, 0xb6, 0x68, 0x7f, 0x32, 0xfc, 0xf7, 0xb3, 0xa9, 0xa, 0x46, 0xe, 0x30, 0x2f, 0x3a, 0x4e, 0x33, 0xb5, 0x7b, 0x29, 0x80, 0x3c, 0x61, 0x1a, 0xd9, 0x3b, 0xe3, 0xe6, 0xc3, 0x3a, 0x8c, 0xef, 0xd2, 0xa5, 0x29, 0x7c, 0x28, 0x24, 0x9f, 0xb6, 0x4c, 0xe4, 0xc1, 0xa3, 0xd, 0xc1, 0xf8, 0x67, 0x4, 0x82, 0xcf, 0x6e, 0x22, 0xa, 0x3e, 0x17, 0xcc, 0x95, 0xad, 0xb2, 0x89, 0x19, 0x2f, 0xfc, 0xf0, 0x15, 0x5f, 0x7, 0x1a, 0xfe, 0x47, 0x3d, 0x5b, 0xbd, 0x42, 0x4, 0xfb, 0x43, 0x8, 0xcd, 0x5c, 0xe0, 0xf1, 0x30, 0x88, 0xa2, 0x58, 0x7f, 0x10, 0x36, 0x2d, 0x86, 0x46, 0x5c, 0x3a, 0xaa, 0xa7, 0x30, 0xcb, 0x82, 0x93, 0x3f, 0x56, 0x91, 0x2b, 0xe6, 0x2f, 0x78, 0xbd, 0x6a, 0x41, 0x3b, 0xd9, 0x84, 0x2d, 0x71, 0xf1, 0x25, 0xec, 0x8a, 0x7, 0x44, 0x2e, 0x1b, 0xb6, 0xae, 0x8b, 0x9a, 0xad, 0xa6, 0xbc, 0x47, 0xcc, 0x2f, 0xf7, 0x9b, 0x68, 0xf, 0x83, 0x26, 0x85, 0x18, 0x4f, 0xfc, 0xe0, 0x5e, 0xf1, 0x28, 0xd9, 0xd6, 0x46, 0x2c, 0xf7, 0x72, 0x8f, 0x2e, 0x58, 0x2f, 0x8b, 0xa7, 0x7e, 0xff, 0x16, 0x8, 0x5c, 0x26, 0x2f, 0x94, 0x5e, 0x3f, 0xb0, 0x6b, 0x23, 0x8b, 0x4a, 0x53, 0x45, 0xd1, 0xf8, 0x33, 0x73, 0xde, 0x40, 0xf9, 0x5e, 0xa, 0xe3, 0xc5, 0xf6, 0x2e, 0xf4, 0xbe, 0xc3, 0x66, 0x36, 0x88, 0x29, 0x4f, 0x64, 0xd1, 0x53, 0x10, 0xb6, 0xcc, 0xf4, 0xaa, 0xb0, 0x3a, 0x35, 0x8b, 0x0, 0x71, 0x11, 0x4b, 0xb3, 0x68, 0xff, 0x48, 0x9a, 0xc, 0xaf, 0x7b, 0x22, 0x2c, 0x1, 0x3d, 0xd5, 0xd9, 0xac, 0x39, 0xc7, 0x36, 0xfb, 0xc2, 0xf7, 0xea, 0xb5, 0xb4, 0xf5, 0xda, 0x46, 0x1c, 0x8e, 0x65, 0xd9, 0x59, 0x14, 0xb, 0xdf, 0xfd, 0x2a, 0x87, 0x18, 0x58, 0xac, 0xd3, 0xf9, 0xdd, 0xae, 0xce, 0x49, 0x7b, 0x44, 0x56, 0x55, 0x60, 0xfa, 0x96, 0xca, 0x9b, 0x76, 0x17, 0x64, 0xc6, 0xba, 0x9d, 0x8, 0x88, 0xcf, 0x52, 0x24, 0x10, 0xb6, 0x5, 0x56, 0x7d, 0x1f, 0xec, 0x21, 0x26, 0x4a, 0xd4, 0xf, 0x1c, 0xaf, 0x60, 0xf7, 0x94, 0x52, 0xca, 0x4f, 0x12, 0x61, 0x6d, 0x6a, 0xd8, 0xae, 0x73, 0xbb, 0x57, 0x11, 0x2f, 0x6f, 0x77, 0x90, 0x1f, 0xf4, 0x44, 0x15, 0x2b, 0xc2, 0x87, 0xa9, 0xf, 0xd2, 0xc7, 0x71, 0x87, 0xd5, 0xd, 0xb1, 0xf6, 0x48, 0x1, 0xb8, 0x23, 0x5f, 0xa4, 0x10, 0x56, 0x3c, 0x6e, 0xb4, 0xe5, 0xf3, 0xd3, 0xd2, 0x85, 0xc1, 0xbb, 0x22, 0x3, 0xc6, 0x18, 0xd1, 0xf4, 0xdf, 0x27, 0x4f, 0x6c, 0x47, 0xa0, 0xcc, 0x6a, 0x89, 0x22, 0x17, 0xc6, 0x8, 0xcb, 0x3e, 0x9d, 0xa3, 0xe1, 0x5a, 0x5e, 0x5, 0x9b, 0x6c, 0x26, 0xcd, 0x53, 0x57, 0xf9, 0xae, 0x1c, 0xa6, 0x71, 0xe, 0x2d, 0xdc, 0x79, 0xb5, 0x47, 0x5b, 0x42, 0xe8, 0xdf, 0x2d, 0x9d, 0x68, 0x7, 0x69, 0x21, 0x35, 0xb9, 0x22, 0x61, 0x1d, 0xd4, 0x1a, 0x75, 0xb, 0x44, 0xbe, 0xe, 0x4f, 0xee, 0xdd, 0x63, 0x26, 0x59, 0xbf, 0xd, 0xad, 0x6e, 0xeb, 0xe9, 0xfa, 0x92, 0x36, 0xe8, 0x4a, 0xaa, 0xf2, 0x78, 0xf6, 0x9d, 0xa6, 0x54, 0x28, 0x28, 0x3b, 0x66, 0xe4, 0x33, 0x38, 0x7b, 0x3a, 0x4f, 0xad, 0x80, 0x32, 0x17, 0x5e, 0x7e, 0x9c, 0x56, 0x5c, 0x95, 0xdc, 0x94, 0xa5, 0x3e, 0x8c, 0x52, 0xb3, 0xbd, 0x25, 0xa6, 0x6a, 0xe5, 0xc6, 0x97, 0x5f, 0x32, 0xc4, 0x52, 0x76, 0xd6, 0xdc, 0x4c, 0xbd, 0xe1, 0x55, 0xb2, 0xb7, 0xbd, 0xb7, 0xe2, 0x38, 0xd9, 0x3f, 0x1, 0xb1, 0x8b, 0xff, 0xbc, 0x30, 0x1e, 0xa, 0x8a, 0x70, 0x36, 0xa7, 0xc, 0x4a, 0x65, 0x6c, 0x66, 0xb9, 0xa1, 0xa8, 0x5b, 0x51, 0xf6, 0x90, 0xf2, 0x71, 0xb7, 0xee, 0x68, 0xba, 0x63, 0x67, 0xb4, 0xc5, 0x12, 0x20, 0x9f, 0xc2, 0x4c, 0xd2, 0x86, 0xf0, 0xce, 0xd9, 0xf6, 0x25, 0x72, 0xe2, 0x2c, 0x5c, 0x6e, 0xa4, 0x8b, 0xb9, 0x21, 0x37, 0xf7, 0xb8, 0x19, 0xcf, 0x54, 0xf6, 0x2e, 0x4c, 0xd1, 0xf8, 0x51, 0xf1, 0x1d, 0x8, 0xcb, 0xd0, 0x9a, 0xc2, 0x4a, 0x6b, 0xd3, 0xfd, 0xdf, 0x65, 0xab, 0xf0, 0x5c, 0xb8, 0xde, 0xaf, 0x2b, 0x94, 0xc7, 0xa3, 0xc8, 0xcb, 0x99, 0x13, 0xbd, 0x6f, 0xa9, 0xb6, 0x8e, 0x22, 0xaa, 0xef, 0x51, 0x72, 0x90, 0x11, 0xda, 0x21, 0x21, 0x55, 0x71, 0xb3, 0x99, 0x20, 0xfd, 0xd4, 0x70, 0xcd, 0x2b, 0x4a, 0xb, 0xd0, 0x8c, 0x40, 0x55, 0x78, 0x37, 0x7c, 0x88, 0x94, 0x18, 0xa8, 0x7d, 0xbf, 0x14, 0xa8, 0xe4, 0xfd, 0xe2, 0x3, 0xa2, 0xac, 0x85, 0x5f, 0x18, 0xdb, 0xf, 0x9d, 0x91, 0xc, 0xa4, 0x1a, 0xed, 0x5a, 0xc5, 0xec, 0x7d, 0x8, 0xae, 0x7f, 0x6a, 0xbc, 0xda, 0x6, 0x46, 0x99, 0x7b, 0x63, 0x34, 0x3b, 0x35, 0x0, 0x8e, 0xad, 0x44, 0xcf, 0x3a, 0x8e, 0xdf, 0xe, 0xb1, 0x4, 0xba, 0xc1, 0xec, 0x3b, 0xa1, 0xdc, 0xa8, 0x8, 0x53, 0x3, 0x32, 0xd9, 0xc2, 0x49, 0xc6, 0x27, 0x1d, 0x25, 0xce, 0x33, 0xb5, 0x36, 0xcb, 0xa3, 0xd2, 0xf8, 0xd6, 0xc8, 0xb6, 0xa0, 0xdf, 0xc8, 0x30, 0xcc, 0x42, 0x6f, 0xe1, 0x3d, 0x69, 0xac, 0xbc, 0x24, 0xba, 0xce, 0x7c, 0xbe, 0x27, 0x31, 0x8a, 0xcb, 0xa7, 0xfb, 0x54, 0xbd, 0xa4, 0x10, 0x4d, 0x7, 0x56, 0x1b, 0x5b, 0xf0, 0xd8, 0xf0, 0x67, 0xf, 0xe6, 0xe, 0x63, 0x89, 0xb2, 0xd6, 0xe9, 0x69, 0x24, 0xec, 0x4e, 0x4b, 0xd8, 0x27, 0x47, 0x36, 0x68, 0xd4, 0xf2, 0x84, 0x12, 0x12, 0x3c, 0x31, 0xcf, 0x49, 0x91, 0x2e, 0x73, 0xab, 0x8f, 0x40, 0xcd, 0xbe, 0x30, 0x32, 0xbe, 0x12, 0x7f, 0x36, 0xaf, 0x2d, 0xd7, 0x5a, 0xb2, 0xd3, 0xde, 0x8d, 0x2e, 0x1, 0x74, 0x70, 0xa7, 0xaa, 0x3c, 0xbb, 0xca, 0xe3, 0x18, 0xb2, 0xd}, - output224: []byte{0x5f, 0x70, 0xa3, 0x54, 0x53, 0xb9, 0xbb, 0xb5, 0xa, 0x14, 0xf2, 0x34, 0x98, 0x6, 0xce, 0xdd, 0x49, 0xf0, 0x6e, 0x3e, 0xeb, 0x98, 0x44, 0xc4, 0x2c, 0x79, 0x63, 0xa3}, - output256: []byte{0xa2, 0x63, 0x70, 0xed, 0xef, 0xba, 0x1a, 0xa5, 0x16, 0xfa, 0x4e, 0x49, 0x2, 0x29, 0x4f, 0x9f, 0xf7, 0xb4, 0x91, 0xd0, 0xea, 0xac, 0xee, 0xc7, 0x48, 0x6e, 0xb2, 0x62, 0xe8, 0xb1, 0x24, 0x9a}, - output384: []byte{0x8c, 0x3d, 0xe4, 0xc9, 0x79, 0x46, 0xdd, 0x88, 0x4e, 0x47, 0xae, 0x66, 0x18, 0xf9, 0xb0, 0xb6, 0xbc, 0xb7, 0x14, 0xf, 0xc3, 0x6c, 0x8b, 0x39, 0x2c, 0xdd, 0x75, 0x89, 0xcd, 0x61, 0x1e, 0x62, 0x52, 0x22, 0xfe, 0x85, 0xab, 0x38, 0x59, 0x60, 0xa7, 0xe0, 0x35, 0xfe, 0x70, 0x5a, 0xa, 0x49}, - output512: []byte{0x6c, 0x1b, 0x14, 0xa6, 0xa3, 0x1, 0x26, 0xd1, 0xac, 0x4c, 0x84, 0xc2, 0xe, 0x2f, 0x1d, 0x14, 0xca, 0x93, 0x8b, 0x19, 0xa0, 0xfe, 0x8c, 0xca, 0x81, 0x16, 0xca, 0xf4, 0x89, 0xb0, 0xfe, 0x43, 0x59, 0xe5, 0x92, 0xcf, 0xe7, 0x62, 0x55, 0xa7, 0xf8, 0xd0, 0x85, 0xee, 0xb6, 0x55, 0xfc, 0xeb, 0x12, 0x7c, 0x12, 0xbb, 0xba, 0x74, 0xb1, 0x9, 0x2f, 0x37, 0xba, 0x1c, 0x9b, 0xb1, 0x3b, 0xd2}}, - testcase{ - msg: []byte{0x82, 0x4a, 0x15, 0x5d, 0x77, 0x98, 0xe1, 0x29, 0x62, 0xf4, 0x46, 0x4e, 0xad, 0x9a, 0xf1, 0x32, 0xa2, 0x26, 0xda, 0x4d, 0xa6, 0xe8, 0x99, 0x62, 0x9e, 0xfb, 0x93, 0x8e, 0xa2, 0x9a, 0x86, 0x93, 0x7f, 0xb1, 0x44, 0x86, 0x6d, 0x8c, 0x7b, 0x2d, 0xf9, 0x98, 0x86, 0x4, 0xce, 0xd9, 0x68, 0x92, 0xda, 0x48, 0x2d, 0x4d, 0xd, 0xeb, 0x46, 0x58, 0x84, 0x4f, 0x41, 0x83, 0x5f, 0xd, 0x9c, 0x20, 0xc7, 0x96, 0x92, 0x9c, 0x83, 0xcf, 0xb4, 0x91, 0x13, 0xf5, 0xd9, 0x5a, 0x7b, 0x66, 0xd9, 0x11, 0x6a, 0x46, 0x97, 0xbf, 0xe3, 0x35, 0xbc, 0x83, 0x62, 0x96, 0x78, 0xcd, 0x5d, 0xee, 0xdb, 0x7c, 0x9f, 0x8f, 0x11, 0xdd, 0xa0, 0x79, 0xbd, 0xce, 0x8c, 0x27, 0x19, 0xb6, 0xcd, 0x40, 0xc, 0x2, 0xa6, 0xa5, 0x65, 0x4f, 0x19, 0xb6, 0xd5, 0x68, 0x47, 0x3d, 0x37, 0x17, 0x4f, 0x62, 0xab, 0x66, 0x84, 0xc9, 0xc9, 0x19, 0xc1, 0xcf, 0xaf, 0x35, 0x11, 0x6f, 0xf7, 0xae, 0x4f, 0x5b, 0xf, 0xb, 0xd2, 0x43, 0xc7, 0x43, 0x84, 0xc2, 0xc9, 0x39, 0x2f, 0x11, 0x89, 0xb2, 0xad, 0x44, 0x8b, 0x9d, 0x79, 0x46, 0xc2, 0xcc, 0xad, 0x4, 0xd2, 0xf2, 0xc, 0xb8, 0xcf, 0x1f, 0x95, 0x90, 0xd1, 0x50, 0x4b, 0x1e, 0x1b, 0x1d, 0x74, 0xa0, 0x44, 0x24, 0xbd, 0x27, 0xd0, 0x11, 0x76, 0x76, 0xb8, 0xc8, 0x23, 0x2, 0x28, 0x58, 0xa4, 0xc1, 0x2a, 0xad, 0xf2, 0x1f, 0xa4, 0x5c, 0x99, 0xfa, 0xd6, 0x1, 0x20, 0xb2, 0x4f, 0xe0, 0x4b, 0xa3, 0x3, 0x6b, 0x80, 0xac, 0x5f, 0x46, 0xe9, 0x83, 0x3, 0x2b, 0x6d, 0x78, 0x83, 0xf, 0x51, 0xe6, 0x5a, 0x62, 0x31, 0xb, 0x90, 0x58, 0xa4, 0xdd, 0x3f, 0x3f, 0x8f, 0x90, 0xed, 0x53, 0x11, 0xe1, 0xf4, 0x79, 0x87, 0xe0, 0xd4, 0x10, 0xf7, 0x8b, 0x2a, 0x76, 0x58, 0xf, 0xbf, 0xdd, 0xa0, 0xf9, 0x44, 0xbb, 0xe4, 0x66, 0xc8, 0xa8, 0x17, 0xb, 0x5c, 0x77, 0xe8, 0x13, 0x2c, 0xcd, 0x7d, 0x5e, 0x99, 0x46, 0xa5, 0xfe, 0xdc, 0x73, 0xab, 0x94, 0x65, 0xe3, 0xb, 0xee, 0xe9, 0xcf, 0xad, 0x68, 0xb7, 0xa, 0x21, 0x76, 0x39, 0x3a, 0xd8, 0xa1, 0x73, 0xcd, 0x9a, 0xfe, 0x8f, 0x9b, 0x33, 0x2, 0x3e, 0x85, 0x28, 0x76, 0x82, 0x4b, 0x72, 0x3, 0x65, 0xe6, 0x88, 0xb3, 0xfb, 0x4b, 0xa9, 0x25, 0x4, 0x3, 0x85, 0x55, 0x9f, 0xef, 0x7b, 0xdc, 0xfa, 0x7d, 0xd1, 0x8b, 0xbc, 0x31, 0xb2, 0x49, 0x36, 0x55, 0x7e, 0xdd, 0x67, 0x9b, 0x50, 0x28, 0x64, 0x58, 0x8c, 0xd4, 0xbc, 0x27, 0x0, 0x99, 0xa3, 0xd, 0xc3, 0xb3, 0xef, 0x7a, 0x39, 0x2f, 0x3e, 0x33, 0xe2, 0x1a, 0x53, 0xfb, 0x83, 0x75, 0x6e, 0xe3, 0x71, 0xa1, 0x98, 0x69, 0x30, 0xc4, 0xa3, 0x4a, 0xe1, 0x30, 0x1e, 0xc4, 0x4e, 0x18, 0x9e, 0x23, 0xad, 0xb7, 0xea, 0xaa, 0x12, 0x1c, 0x6d, 0x78, 0x70, 0x7, 0xa4, 0x4e, 0x99, 0x8d, 0x11, 0x24, 0x84, 0x1, 0x9f, 0x7d, 0x7d, 0x8e, 0x16, 0x98, 0x5b, 0x3, 0x9c, 0x8c, 0xe0, 0x1e, 0xc8, 0xcc, 0xef, 0xb6, 0x47, 0xf0, 0x7f, 0x9f, 0xac, 0x11, 0x4b, 0xab, 0xc3, 0xd8, 0x31, 0xaf, 0xd6, 0xf0, 0x85, 0x97, 0x22, 0x2a, 0x4d, 0xa8, 0xc4, 0xf6, 0xcb, 0x22, 0xc6, 0x73, 0xc0, 0x43, 0x7c, 0x16, 0xfc, 0xce, 0x7e, 0xeb, 0x64, 0xe7, 0x5, 0xa, 0xf9, 0xbf, 0x41, 0xe9, 0x5d, 0x3a, 0x1, 0x12, 0xfc, 0x4, 0x9d, 0x40, 0x5d, 0xf0, 0xe3, 0x22, 0x42, 0x20, 0x72, 0xa1, 0x6d, 0xf2, 0x48, 0xe1, 0xa, 0xa2, 0x2e, 0xe5, 0xf1, 0x98, 0xc6, 0x7c, 0x59, 0xeb, 0x81, 0x98, 0x42, 0x1d, 0xa8, 0x55, 0xdb, 0xf2, 0xc7, 0x8b, 0x36, 0x35, 0x2b, 0x13, 0x73, 0xf7, 0xf6, 0x6b, 0x5a, 0x5b, 0xdc, 0xff, 0xd4, 0x4c, 0x76, 0xb7, 0xcd, 0xf5, 0x6d, 0x89, 0x41, 0x87, 0xde, 0x7b, 0xfb, 0x5, 0xc0, 0x53, 0x5c, 0x3d, 0x2a, 0xa4, 0x91, 0xf3, 0x7d, 0x35, 0xc3, 0x17, 0x7e, 0xf, 0x31, 0x2a, 0x9f, 0xc7, 0xf1, 0xc6, 0x66, 0x8a, 0xe0, 0xb6, 0xb4, 0xb6, 0xc1, 0x95, 0xeb, 0x4a, 0xea, 0x21, 0x9f, 0x14, 0x7a, 0x97, 0x99, 0xa9, 0xc8, 0x44, 0x49, 0xd7, 0x47, 0x7f, 0xce, 0xea, 0xa0, 0xab, 0xb8, 0x36, 0x15, 0x4, 0x87, 0xab, 0xee, 0x7a, 0x19, 0x2, 0x54, 0xb, 0x90, 0x5e, 0x99, 0x8a, 0x53, 0x2a, 0xdd, 0x68, 0xb2, 0xd1, 0x5a, 0x1f, 0xbb, 0x63, 0xdd, 0xec, 0xc5, 0x4c, 0x8c, 0x20, 0x6e, 0xe6, 0x55, 0x35, 0x3c, 0x7d, 0x1d, 0xb4, 0x11, 0xbd, 0x33, 0x41, 0x9f, 0x6f, 0x90, 0x5b, 0xea, 0x56, 0x7f, 0x8d, 0x67, 0xb5, 0x46, 0x1f, 0x15, 0xac, 0xfb, 0x8f, 0x85, 0x5, 0xcc, 0xdc, 0x29, 0xcd, 0x70, 0x8b, 0xe6, 0x79, 0x23, 0x8c, 0xe3, 0xe, 0xa3, 0xd1, 0xaa, 0x18, 0x3b, 0xef, 0xc3, 0x59, 0x38, 0xd7, 0x55, 0xc5, 0x9, 0x63, 0xff, 0x9c, 0x89, 0xce, 0xb2, 0x87, 0x64, 0xa7, 0xba, 0x8e, 0x72, 0xa2, 0xd2, 0x2d, 0x16, 0x81, 0x72, 0xdc, 0x5d, 0x91, 0xf4, 0xad, 0x59, 0x80, 0xb1, 0x24, 0x74, 0xa9, 0x6d, 0xb7, 0x5e, 0x1f, 0x7a, 0x9e, 0xf9, 0xcf, 0x1a, 0x3, 0x18, 0xd1, 0x8b, 0x1, 0xb1, 0x8, 0xcd, 0x16, 0x5a, 0x37, 0x34, 0xd6, 0x71, 0xd4, 0x36, 0x70, 0x8b, 0xa0, 0x30, 0xc1, 0xe8, 0x60, 0xee, 0xe8, 0x60, 0xb4, 0xe, 0x61, 0xee, 0x5b, 0x72, 0xa4, 0xa9, 0x8a, 0xea, 0x24, 0xac, 0x34, 0x3b, 0xb6, 0xd4, 0x9, 0x5f, 0x79, 0xfd, 0x9f, 0x1c, 0x8d, 0x64, 0x5, 0x7b, 0x66, 0x72, 0x82, 0x1b, 0x96, 0xf9, 0x54, 0xdf, 0x23, 0xcf, 0x29, 0x4f, 0x51, 0x6b, 0xdc, 0x10, 0x45, 0x17, 0xe, 0x16, 0x2b, 0xf5, 0x8e, 0x75, 0xdb, 0x11, 0x28, 0x8b, 0x46, 0x6a, 0x4b, 0x83, 0x12, 0x5f, 0x1b, 0x54, 0x28, 0x6f, 0x14, 0xba, 0xb, 0x55, 0x26, 0x73, 0x97, 0xd9, 0x60, 0x5a, 0x57, 0xf1, 0x6e, 0xc3, 0x57, 0x85, 0x3d, 0xf6, 0xf3, 0xc8, 0x94, 0x3a, 0x73, 0xf7, 0xd2, 0x6, 0x59, 0xee, 0x1, 0xb3, 0xcf, 0x70, 0xba, 0xfe, 0x43, 0x20, 0x89, 0xbf, 0xd9, 0xdc, 0xe1, 0xe3, 0x1d, 0x44, 0x1c, 0x17, 0x4f, 0x42, 0xd3, 0xbc, 0x4, 0x8, 0x47, 0x5, 0xd0, 0xda, 0x30, 0x8c, 0x21, 0xf3, 0x8, 0x75, 0xd6, 0x8f, 0x86, 0x11, 0xb6, 0x2f, 0x49, 0xaf, 0x1b, 0x93, 0x73, 0x19, 0x34, 0x6d, 0xcd, 0xde, 0xe9, 0x63, 0x2f, 0x5c, 0x70, 0x44, 0x10, 0x7c, 0x3c, 0x5b, 0x49, 0xcd, 0x59, 0x16, 0x90, 0x8, 0xd4, 0x97, 0xc4, 0xbd, 0x9c, 0xf2, 0x12, 0x3f, 0xf7, 0x63, 0x6a, 0x5b, 0x20, 0x50, 0x1b, 0xa3, 0x68, 0xac, 0x6d, 0x18, 0xa3, 0x2b, 0xf7, 0x98, 0x41, 0x9b, 0xf9, 0x3b, 0xf7, 0xcd, 0x7b, 0x1e, 0x99, 0x84, 0x71, 0xd4, 0xc8, 0x5a, 0x2b, 0xc5, 0xe, 0x31, 0x6e, 0x89, 0xd1, 0x7a, 0xcf, 0x32, 0x74, 0x69, 0xf1, 0xf4, 0x5a, 0x68, 0xfd, 0xe5, 0x47, 0x14, 0xcf, 0xfa, 0x97, 0x6d, 0x48, 0x89, 0x89, 0xf6, 0x5f, 0xb4, 0xe8, 0xf9, 0xf8, 0x5d, 0x43, 0x1, 0xf, 0x98, 0x24, 0x53, 0x22, 0x3b, 0xd0, 0x60, 0xba, 0xbe, 0xfd, 0xeb, 0x9d, 0xc1, 0xd, 0xbd, 0x28, 0xcf, 0xf8, 0x42, 0x36, 0x6d, 0xd5, 0x51, 0x70, 0xc3, 0x3e, 0xaa, 0xaf, 0xe9, 0x4, 0x28, 0xd9, 0xe6, 0x32, 0x78, 0x56, 0x21, 0xc5, 0xf8, 0x36, 0xd1, 0x18, 0xc4, 0xbb, 0x97, 0xbd, 0x2d, 0xfc, 0x2a, 0x73, 0x4c, 0x64, 0xf6, 0x14, 0xa9, 0xfd, 0x31, 0x79, 0x51, 0x27, 0x20, 0xc9, 0x51, 0x1a, 0x1d, 0xf2, 0x9e, 0xa9, 0x79, 0x22, 0x26, 0xfa, 0x5d, 0x3b, 0x74, 0xd0, 0xd2, 0x9d, 0x47, 0x41, 0xed, 0xd5, 0x82, 0x19, 0x4, 0xf5, 0x2a, 0xa7, 0x96, 0x1d, 0x30, 0x3b, 0x51, 0xe5, 0x4a, 0x6c, 0xcb, 0x80, 0xbb, 0x85, 0x1a, 0xe5, 0x7d, 0xb1, 0xf9, 0x7b, 0x65, 0x67, 0x72, 0x89, 0x71, 0x90, 0x71, 0x4a, 0x5d, 0xf7, 0x45, 0xd, 0x7e, 0xef, 0xb9, 0x82, 0x18, 0x81, 0x31, 0xd8, 0x1c, 0x6d, 0x27, 0x30, 0x21, 0xa2, 0xaa, 0xac, 0x77, 0x7b, 0x0, 0x83, 0xf0, 0xcc, 0x36, 0x3e, 0x61, 0x9a, 0x1f, 0xae, 0xd4, 0xcc, 0x2c, 0xc7, 0xf2, 0x8e, 0x24, 0xf6, 0x82, 0xc9, 0xf9, 0xee, 0xd9, 0x9e, 0x9, 0xe1, 0x9a, 0x82, 0x0, 0xe6, 0x8a, 0xb9, 0xdc, 0xae, 0x56, 0xaa, 0x92, 0xc9, 0x98, 0x23, 0x1, 0x5f, 0x82, 0xc8, 0xf9, 0xa, 0x40, 0xdf, 0xf, 0x72, 0x98, 0x88, 0xc8, 0x32, 0xa, 0x7f, 0xb, 0x1e, 0x2f, 0x61, 0x55, 0xc8, 0x2a, 0xad, 0x1b, 0x4a, 0xca, 0x8, 0x70, 0xde, 0xb6, 0x9f, 0x4, 0xcd, 0x13, 0x7b, 0x55, 0x6b, 0x99, 0x19, 0xbd, 0x92, 0xd, 0xb2, 0xa, 0x1c, 0x1d, 0xcf, 0xc4, 0x52, 0x36, 0xe6, 0xe9, 0xf, 0xa3, 0x5, 0x4a, 0x8e, 0x29, 0x21, 0x1b, 0xf7, 0x6b, 0x13, 0x80, 0xf, 0x3a, 0xc4, 0x65, 0x74, 0x49, 0xc8, 0x9f, 0xb7, 0x6d, 0x32, 0x89, 0x20, 0x24, 0xe6, 0xfe, 0x76, 0x64, 0xbd, 0x23, 0x3, 0x84, 0x57, 0xfa, 0x0, 0xb1, 0xeb, 0x88, 0x33, 0x4f, 0x4c, 0x8a, 0xd0, 0x56, 0x91, 0xc8, 0xe3, 0x10, 0xf, 0x28, 0x89, 0xc0, 0xe9, 0x6a, 0x32, 0x7c, 0x9b, 0x36, 0xdb, 0xe6, 0xd9, 0xcb, 0xfb, 0xf9, 0xde, 0x93, 0xad, 0xc8, 0xc1, 0x78, 0x64, 0xce, 0xe6, 0xd3, 0xe, 0xbf, 0xb, 0xdf, 0x8f, 0x6b, 0x9d, 0x65, 0xd2, 0xd6, 0x47, 0x1d, 0x26, 0x33, 0x40, 0x89, 0xb4, 0xc, 0x9b, 0xe, 0xdc, 0xc3, 0xd0, 0xda, 0x47, 0x10, 0xe7, 0x6b, 0x28, 0xb3, 0x92, 0xf7, 0xc3, 0xba, 0xd6, 0xf3, 0x4c, 0x77, 0x6a, 0x72, 0xab, 0x21, 0x1b, 0x72, 0xc, 0xcb, 0xe6, 0xe, 0x84, 0x4c, 0xec, 0x48, 0x32, 0xec, 0xb8, 0x1, 0x4b, 0xb2, 0x36, 0xe0, 0xaf, 0x9a, 0x39, 0x91, 0x2c, 0xe1, 0x2a, 0x53, 0x86, 0xd4, 0x9, 0xf5, 0x11, 0x7c, 0x1, 0x47, 0x8d, 0x75, 0x29, 0x6e, 0xda, 0xb3, 0x3e, 0x1c, 0x52, 0x73, 0x71, 0x87, 0x9, 0x48, 0x7a, 0xd0, 0xab, 0x5b, 0x18, 0xa, 0x2d, 0x6, 0x5c, 0x31, 0xdb, 0xc1, 0xe0, 0x73, 0x7d, 0x9a, 0x80, 0x2, 0x60, 0xc7, 0x1a, 0x2, 0x44, 0xf1, 0x95, 0x28, 0xe7, 0x90, 0x72, 0xd8, 0xb8, 0x32, 0x22, 0x25, 0xc6, 0xc6, 0xae, 0x84, 0x71, 0x6, 0x8b, 0xfe, 0xb6, 0x1c, 0x57, 0x8b, 0xeb, 0x30, 0xf9, 0xab, 0x6a, 0x17, 0x3d, 0x70, 0x37, 0x3d, 0x5f, 0x28, 0xe7, 0xc3, 0x53, 0xfe, 0x72, 0x33, 0x16, 0x14, 0x3b, 0x2a, 0x6e, 0xdf, 0x78, 0xea, 0xbd, 0x60, 0x12, 0x41, 0x38, 0xb6, 0x7, 0xd9, 0xa0, 0x9d, 0x6a, 0xce, 0x70, 0x88, 0x2d, 0x43, 0x3, 0xee, 0xf2, 0xc2}, - output224: []byte{0xa3, 0xd5, 0x12, 0x8d, 0x5b, 0xc7, 0x85, 0x2e, 0xc6, 0xb5, 0x9d, 0x3d, 0x33, 0xab, 0xe7, 0xf, 0x73, 0x52, 0x39, 0xd1, 0x49, 0x59, 0x3e, 0x9d, 0x17, 0x98, 0xd1, 0xa9}, - output256: []byte{0x9f, 0x4e, 0xa3, 0x42, 0x76, 0x42, 0xd8, 0xa8, 0xb3, 0x92, 0xa5, 0x7e, 0x3f, 0x0, 0xa5, 0xca, 0xbc, 0xcf, 0x56, 0x8e, 0xb, 0x81, 0x21, 0x88, 0x14, 0xb1, 0x8e, 0xa4, 0x7c, 0x85, 0x27, 0x26}, - output384: []byte{0x9d, 0x5a, 0x13, 0x7, 0x73, 0xc6, 0x96, 0xac, 0xd0, 0xf3, 0xa, 0xd5, 0x3a, 0x93, 0xa7, 0x1f, 0x18, 0x93, 0x2a, 0x25, 0xec, 0x31, 0x3b, 0x29, 0xed, 0x9b, 0x70, 0x1d, 0xec, 0xd4, 0xdb, 0xb7, 0x89, 0xd3, 0xa, 0x33, 0xe6, 0x24, 0x64, 0x86, 0x9, 0x5d, 0xe3, 0xb0, 0xfa, 0x3, 0x3d, 0x2f}, - output512: []byte{0x62, 0xd9, 0xff, 0x2d, 0x86, 0x2f, 0xd2, 0xc6, 0xdc, 0x57, 0xdc, 0x25, 0xcc, 0x51, 0xef, 0xe5, 0x24, 0x47, 0x2, 0x7b, 0x9a, 0x34, 0xf4, 0x8, 0x48, 0xc2, 0x13, 0x33, 0x70, 0xc1, 0xe0, 0xfd, 0xb5, 0xa8, 0xa0, 0x8f, 0xd1, 0x95, 0x41, 0xb5, 0xa6, 0x7b, 0x51, 0x42, 0x65, 0x67, 0x6b, 0xe1, 0x4c, 0xf7, 0x1d, 0x19, 0xf6, 0x6f, 0x1d, 0x8a, 0xbe, 0x30, 0x75, 0x68, 0xfe, 0xca, 0x39, 0x65}}, - testcase{ - msg: []byte{0xfd, 0x76, 0xa3, 0xe9, 0xe0, 0xe3, 0x3, 0xcf, 0xc3, 0xc2, 0xa8, 0x4c, 0x43, 0xd1, 0x9b, 0x60, 0x69, 0x16, 0x7f, 0x7c, 0x70, 0x94, 0xbb, 0x37, 0x9e, 0xc9, 0x29, 0xaa, 0xa4, 0xf1, 0x9e, 0x2e, 0x1a, 0x77, 0xe3, 0x12, 0xc0, 0xcb, 0x8, 0xc5, 0x44, 0xc9, 0x5e, 0xbb, 0xab, 0xb5, 0x98, 0x8f, 0x45, 0x1b, 0x1, 0xcf, 0x92, 0x14, 0xb3, 0x7c, 0x34, 0x1a, 0x52, 0x7c, 0xa5, 0x84, 0x84, 0x1, 0x11, 0x23, 0x67, 0x57, 0x10, 0x8f, 0xf1, 0x38, 0xe3, 0x64, 0xd9, 0x3b, 0xb7, 0x66, 0x29, 0xc0, 0x95, 0x11, 0x7f, 0xce, 0x45, 0x8e, 0xc0, 0x3b, 0x87, 0xbf, 0x19, 0xf8, 0xc9, 0x93, 0x6b, 0x3e, 0x1c, 0x4c, 0x79, 0xf9, 0x37, 0x58, 0x15, 0xa6, 0x58, 0x63, 0x8e, 0x93, 0xc5, 0x10, 0x2c, 0x66, 0x56, 0x3f, 0x3a, 0x37, 0x2e, 0x63, 0x48, 0xc6, 0xc1, 0xb9, 0xdf, 0xa6, 0xa4, 0xe4, 0x27, 0xf4, 0x18, 0xcc, 0x65, 0xef, 0x67, 0xee, 0x52, 0x41, 0xa8, 0x5f, 0x78, 0x96, 0xb1, 0xa0, 0xe9, 0x41, 0x45, 0x39, 0x16, 0x0, 0x7c, 0x67, 0xb4, 0x71, 0x94, 0x35, 0x26, 0x36, 0xdf, 0x36, 0xe2, 0x23, 0xf, 0x45, 0x2, 0xb2, 0x56, 0x9a, 0xa8, 0xaf, 0xc7, 0x9c, 0x71, 0xb8, 0xb6, 0x75, 0x80, 0x53, 0x75, 0xe1, 0xff, 0xd2, 0x76, 0x4a, 0xa8, 0xb8, 0xd5, 0x8e, 0xa9, 0xc9, 0xb5, 0x80, 0xd4, 0x89, 0xb0, 0x9e, 0xfe, 0xb1, 0xd7, 0x7, 0x71, 0x9f, 0x3a, 0xa9, 0x9c, 0x44, 0x7c, 0x11, 0x2c, 0xc7, 0x7b, 0x3f, 0x83, 0x39, 0x89, 0xbd, 0x2d, 0xf9, 0x8f, 0x32, 0xf0, 0x68, 0xb9, 0xc0, 0xf7, 0xee, 0xf2, 0x40, 0x71, 0x98, 0x17, 0xb1, 0x1e, 0xd5, 0x83, 0xc8, 0x2c, 0xf3, 0xbb, 0xda, 0x26, 0x8d, 0x60, 0xb0, 0x3f, 0xee, 0x5, 0x79, 0x7e, 0x3e, 0xbf, 0x65, 0xc1, 0x53, 0xac, 0x84, 0xe8, 0x99, 0xe3, 0xda, 0x34, 0x32, 0x88, 0xf, 0x18, 0xb0, 0x91, 0x94, 0xa1, 0xd1, 0x70, 0xdc, 0x23, 0xa1, 0xd1, 0x7f, 0x53, 0xde, 0x6f, 0x31, 0x9, 0xca, 0x8a, 0x88, 0xe1, 0x39, 0xf, 0xd, 0x49, 0x90, 0x2a, 0x48, 0x52, 0xb, 0x92, 0x83, 0xc0, 0x67, 0x46, 0xa5, 0x5b, 0x4, 0x1f, 0x4a, 0x7d, 0xdc, 0x7, 0x27, 0xa0, 0x8d, 0xd5, 0x71, 0x7f, 0xba, 0x55, 0x84, 0x67, 0xc, 0xd0, 0xaf, 0xc7, 0xa9, 0x59, 0x77, 0x49, 0xc7, 0x18, 0xb8, 0xfd, 0x11, 0x22, 0x2e, 0xc4, 0x15, 0x6, 0x50, 0x5e, 0xd3, 0xdb, 0x5b, 0x82, 0x88, 0xfd, 0x23, 0x4e, 0xa, 0x92, 0x37, 0xd6, 0x71, 0x5f, 0x89, 0x96, 0x98, 0xd, 0x98, 0x55, 0x87, 0xa8, 0x64, 0x53, 0x57, 0xb0, 0xf5, 0x3c, 0x48, 0xf, 0x72, 0xc8, 0x6, 0x5f, 0x51, 0x88, 0xa0, 0xe1, 0x32, 0xad, 0x31, 0x5f, 0x3e, 0x7c, 0x12, 0xa8, 0x54, 0xe9, 0x3d, 0x1c, 0xc2, 0xfe, 0x92, 0x52, 0xfb, 0xe6, 0x8b, 0x3b, 0xef, 0xbb, 0xea, 0xce, 0x38, 0x53, 0x1e, 0x5b, 0xf5, 0xf2, 0xc6, 0x71, 0xfe, 0xc8, 0xea, 0x58, 0xf5, 0xe3, 0x1a, 0x4b, 0xb0, 0x5b, 0x8a, 0x6e, 0xa8, 0x7e, 0xa7, 0xbc, 0xca, 0xb5, 0xc, 0xa6, 0x5f, 0xb2, 0xa2, 0xf3, 0x12, 0xf1, 0x83, 0xb5, 0xb1, 0x50, 0x4e, 0xd0, 0x47, 0x39, 0xba, 0x85, 0x4a, 0xb4, 0x36, 0xb8, 0xfc, 0x2e, 0x50, 0xc3, 0x43, 0x4f, 0xdf, 0xd5, 0x6, 0x82, 0xfd, 0x79, 0xb1, 0x9c, 0xbb, 0xce, 0x2c, 0x76, 0xec, 0x1f, 0xfe, 0xa, 0xc9, 0xe5, 0x4c, 0x2f, 0x9b, 0xf5, 0x14, 0x97, 0xab, 0x95, 0x13, 0x5b, 0x87, 0x73, 0x28, 0x86, 0x8d, 0x6a, 0xc2, 0xb7, 0xf7, 0x64, 0xfe, 0xc8, 0x66, 0xcb, 0xb6, 0xa5, 0x3f, 0x34, 0x61, 0x22, 0x12, 0x40, 0xf1, 0xbd, 0x6d, 0x99, 0xc3, 0x8d, 0xf6, 0x12, 0x1e, 0x37, 0x51, 0xce, 0xcb, 0x1e, 0xa, 0xe1, 0xa0, 0x2f, 0xe0, 0x54, 0x5, 0x9b, 0x78, 0xdd, 0x96, 0xfa, 0xc, 0xb3, 0xd1, 0x95, 0x2a, 0x80, 0xb8, 0xab, 0x55, 0xe, 0xaa, 0x82, 0xd7, 0x52, 0x4c, 0x2, 0x77, 0x84, 0x16, 0xe0, 0x35, 0x56, 0x1d, 0x31, 0xae, 0x99, 0xf2, 0xea, 0x52, 0xcc, 0xd1, 0xe, 0xa0, 0x9e, 0xcd, 0x6e, 0xf2, 0x44, 0x57, 0x6d, 0x18, 0xe3, 0xc1, 0x21, 0x10, 0xe6, 0xd2, 0x24, 0xc3, 0xd2, 0x96, 0xa8, 0xbe, 0x95, 0xf4, 0x7f, 0x5a, 0x31, 0x50, 0xb3, 0x2f, 0x67, 0xb2, 0xc1, 0x8f, 0x5b, 0xac, 0xe7, 0x6d, 0xbc, 0xf9, 0xf4, 0xa7, 0xf5, 0x8a, 0x81, 0x87, 0x57, 0xed, 0x6, 0xeb, 0x3e, 0x5c, 0x98, 0x7b, 0x58, 0xab, 0x40, 0x1, 0x6b, 0xe4, 0x66, 0x6c, 0xba, 0x84, 0x3b, 0xa4, 0xa0, 0x9c, 0x57, 0x9b, 0x22, 0x74, 0x13, 0xa, 0x8b, 0xdd, 0x7d, 0xc3, 0x75, 0x57, 0xcc, 0xa3, 0x65, 0x30, 0x2a, 0xed, 0x9c, 0xcf, 0x46, 0x5f, 0x3f, 0x97, 0xd, 0x97, 0x99, 0x64, 0x6c, 0xfb, 0x9b, 0x2b, 0x69, 0x21, 0x80, 0x45, 0xf6, 0xdd, 0xf5, 0x18, 0xd, 0x4e, 0x5d, 0x36, 0xa0, 0xf6, 0x3f, 0xea, 0x6b, 0x71, 0xe6, 0xc, 0x20, 0xf, 0x34, 0x18, 0xa8, 0xfd, 0x35, 0xc4, 0xf2, 0x68, 0x4c, 0x81, 0xe3, 0xd7, 0x15, 0x36, 0x20, 0x61, 0xde, 0x34, 0xb4, 0xab, 0x7a, 0x11, 0x82, 0x49, 0xd4, 0xe7, 0x4e, 0xf7, 0xc6, 0x89, 0x80, 0x73, 0x1, 0x41, 0x20, 0xff, 0x2d, 0x80, 0xee, 0xb2, 0x66, 0x4e, 0x47, 0xc2, 0x34, 0x9c, 0x44, 0x90, 0x53, 0x96, 0xf0, 0xb9, 0xcd, 0xe, 0xc3, 0x43, 0xd6, 0x1e, 0xc4, 0xc6, 0x65, 0x7a, 0xf7, 0x96, 0x4c, 0xcf, 0x38, 0x4e, 0x83, 0xae, 0xd, 0xf1, 0x73, 0x64, 0x35, 0xf9, 0xb, 0x76, 0x65, 0x28, 0xef, 0xc6, 0x9d, 0x9a, 0xb2, 0x4, 0xd2, 0xd8, 0xa6, 0xd7, 0x9d, 0x23, 0x88, 0x6d, 0xe9, 0x71, 0x85, 0x2c, 0xca, 0x92, 0x83, 0xef, 0x87, 0x12, 0x5c, 0x28, 0x44, 0x2e, 0xb0, 0x82, 0xbe, 0x6f, 0xe6, 0x8f, 0x45, 0xf1, 0xb3, 0xc4, 0x40, 0xc3, 0xf9, 0x3b, 0xac, 0x49, 0xca, 0x85, 0x56, 0x4, 0x13, 0x4c, 0xeb, 0x4e, 0x96, 0x86, 0x54, 0xb4, 0xc0, 0xd, 0x1e, 0x7a, 0x81, 0x95, 0x94, 0x35, 0xfa, 0x36, 0xd0, 0xdc, 0x43, 0x40, 0xa, 0x8d, 0xdb, 0xf2, 0x6e, 0xac, 0x87, 0x14, 0x22, 0x3b, 0x4d, 0x55, 0xaf, 0x42, 0xe7, 0x5d, 0x3e, 0xd3, 0x87, 0xe5, 0x2e, 0x52, 0x22, 0xb3, 0x64, 0x6b, 0xf0, 0x18, 0xc7, 0x94, 0x86, 0x78, 0x9a, 0x67, 0x2b, 0xb8, 0x26, 0x84, 0x17, 0x45, 0xf4, 0x76, 0x9a, 0x6b, 0xe8, 0xf4, 0x67, 0xab, 0x22, 0x94, 0xcd, 0xec, 0xa2, 0xd9, 0x74, 0xe8, 0xd3, 0xfe, 0xe4, 0x17, 0xab, 0x6d, 0x2, 0xcf, 0x16, 0xe9, 0xec, 0x3f, 0xb2, 0x20, 0x5, 0xa6, 0x32, 0xce, 0xbd, 0x64, 0xb5, 0x81, 0x72, 0x86, 0x80, 0x74, 0x5, 0xb9, 0xd7, 0x80, 0x50, 0xe6, 0x1b, 0x5d, 0x97, 0x59, 0x89, 0x28, 0x2d, 0x7d, 0xbd, 0xf2, 0xbb, 0x81, 0xad, 0x2e, 0x15, 0xc0, 0x7f, 0x9a, 0xf2, 0x2d, 0xe7, 0xb8, 0x9, 0x77, 0xe3, 0x44, 0x2c, 0x1f, 0x11, 0x93, 0x12, 0xa2, 0xb, 0x46, 0x12, 0x61, 0xe8, 0xb6, 0x81, 0xca, 0x61, 0x2e, 0x7c, 0x7a, 0x67, 0xa2, 0x7, 0x67, 0x81, 0x60, 0xf, 0x5, 0x7a, 0x6e, 0xb3, 0xf8, 0xa0, 0x65, 0x4f, 0xb9, 0x82, 0x77, 0x1b, 0x6c, 0x66, 0x19, 0x54, 0xb6, 0x6d, 0x96, 0x8, 0x6a, 0xfd, 0x11, 0xb, 0x2, 0x39, 0xe0, 0xbf, 0x96, 0x88, 0x0, 0x40, 0x18, 0xe4, 0x18, 0xca, 0x2e, 0x3d, 0xf9, 0x9d, 0xf0, 0x14, 0x5, 0x50, 0x8b, 0x8d, 0x69, 0xcd, 0x6a, 0x75, 0xa7, 0xfb, 0xdb, 0x52, 0xd3, 0x78, 0xc2, 0xbf, 0x79, 0x80, 0x45, 0xd0, 0x2a, 0x9d, 0xb7, 0xb1, 0xd9, 0xd2, 0x75, 0xfb, 0xce, 0xc5, 0xcd, 0xab, 0x92, 0x3c, 0x57, 0x42, 0xa, 0xa2, 0x6c, 0x31, 0xc0, 0xb6, 0x32, 0xd2, 0x3e, 0xa2, 0xdb, 0x8c, 0x19, 0x3e, 0x55, 0xa1, 0xdf, 0x6c, 0xe8, 0xfe, 0x61, 0xb, 0xd9, 0x1c, 0x4b, 0xa8, 0x1a, 0x41, 0xc8, 0xc, 0xab, 0x69, 0x74, 0x4b, 0x8c, 0x88, 0x55, 0x4f, 0x1f, 0xe8, 0xcc, 0x14, 0xa0, 0xc2, 0x94, 0x67, 0xd7, 0xab, 0x48, 0x40, 0xac, 0x9e, 0x86, 0x1f, 0x8a, 0x24, 0xc9, 0x53, 0xd6, 0x8c, 0xaa, 0x58, 0x32, 0x91, 0xf1, 0xba, 0x86, 0x3, 0xee, 0xd2, 0xc8, 0x43, 0x0, 0x14, 0x2, 0xaa, 0x21, 0x34, 0xa0, 0x67, 0xeb, 0x6e, 0xe2, 0x83, 0xc, 0x49, 0x72, 0x53, 0xa, 0x5e, 0x4e, 0x26, 0x28, 0xe6, 0x32, 0x66, 0xa5, 0x1b, 0xb3, 0x53, 0x7e, 0xe4, 0x8e, 0xbb, 0x6d, 0xe8, 0x69, 0x99, 0x79, 0x43, 0xb0, 0x85, 0x11, 0xad, 0xc9, 0x64, 0x7e, 0x82, 0x24, 0xd0, 0x8d, 0xaa, 0x3c, 0x0, 0x9f, 0x4d, 0x65, 0xf0, 0xc9, 0xa1, 0xaf, 0x4e, 0x8b, 0x22, 0x5a, 0x30, 0xda, 0xba, 0x35, 0x2f, 0xd5, 0xd1, 0xf6, 0xc3, 0x66, 0x83, 0xaa, 0x4f, 0x44, 0x60, 0x2e, 0x32, 0xbf, 0x4, 0x48, 0x4a, 0x7c, 0xe8, 0x87, 0x9, 0xaa, 0xfc, 0xe1, 0xf9, 0x3e, 0xae, 0x9, 0x5f, 0xcb, 0x89, 0xa1, 0xe3, 0x2d, 0xc9, 0x2c, 0x41, 0x50, 0x59, 0x2e, 0xcf, 0xe9, 0x9a, 0xa5, 0x99, 0x38, 0xa2, 0x11, 0xfb, 0x13, 0x73, 0x3f, 0x30, 0xed, 0x47, 0x6b, 0xac, 0x2d, 0xb3, 0x4f, 0x5f, 0xd, 0xa6, 0x7a, 0x60, 0x9c, 0x49, 0xcf, 0x3b, 0xcf, 0xbb, 0x90, 0xe1, 0xa7, 0x97, 0x4b, 0x33, 0xd0, 0x25, 0x2c, 0x5d, 0xc1, 0x8e, 0x5c, 0x67, 0xbf, 0x5c, 0x1, 0x33, 0x44, 0x99, 0x36, 0xe3, 0x87, 0xb3, 0xc3, 0x58, 0x23, 0xc9, 0xee, 0xb2, 0xe5, 0xbf, 0x63, 0x37, 0x66, 0x5a, 0xd4, 0x1e, 0xba, 0x13, 0x46, 0xe7, 0x43, 0x62, 0xd3, 0xe5, 0xfd, 0x86, 0x36, 0xba, 0x54, 0xc4, 0xad, 0xb7, 0x54, 0x48, 0xd7, 0x65, 0xf, 0xbb, 0x54, 0x26, 0x84, 0xfd, 0x92, 0x4f, 0x82, 0x34, 0x89, 0x65, 0x69, 0xaa, 0x46, 0x66, 0x22, 0xa5, 0x3c, 0x4, 0x2c, 0xa8, 0x43, 0xed, 0x6b, 0xb6, 0x3, 0xf2, 0xd7, 0xb7, 0x5, 0x8d, 0xfd, 0xa1, 0x39, 0x83, 0xed, 0x91, 0x3e, 0xd5, 0x65, 0xc2, 0xe1, 0x7, 0x8f, 0x67, 0x31, 0xc7, 0x6e, 0xc7, 0x96, 0xcb, 0x41, 0x29, 0x7c, 0xbc, 0xf3, 0xbc, 0xf4, 0x42, 0x26, 0x1d, 0x22, 0x93, 0xb8, 0x13, 0x70, 0x3a, 0xe9, 0x92, 0x6b, 0x22, 0xf5, 0x5e, 0x33, 0xaf, 0x40, 0x49, 0x6, 0x3e, 0xa4, 0x43, 0xd2, 0x30, 0xaf, 0x25, 0x59, 0x7c, 0xe2, 0x8, 0x27, 0x95, 0x27, 0x49, 0xd0, 0x20, 0xff, 0xf0, 0x7a, 0x58, 0xae, 0xd9, 0x51, 0xfd, 0x9c, 0xa9, 0xb2, 0xac, 0xb1, 0x53, 0x46, 0xd5, 0x13, 0xb3, 0x49, 0xe, 0x2c, 0x12, 0x94, 0x60, 0x5d, 0x91, 0xec, 0x67, 0xcc, 0x73, 0xf7, 0x6a, 0x38, 0xff, 0xbd, 0x86, 0xd7, 0x9c, 0x55, 0xc8, 0x65, 0x15, 0x16, 0x4a, 0x8b, 0xea, 0xcc, 0xb3, 0x86, 0xe7, 0x5e, 0xa1, 0x81, 0xc7, 0x62, 0x33, 0xc1, 0x85, 0x49, 0xd4, 0x1d, 0x5e, 0xf5, 0xf4, 0xda, 0x25, 0x80, 0x9d, 0xc7, 0x1b, 0x5c, 0x3f, 0x83, 0xa1, 0xdc, 0x31, 0xd4, 0xd1, 0x17, 0xa5, 0x75, 0x1d, 0x77, 0x38, 0xb, 0x54, 0x19, 0xa2, 0xa4, 0xa8, 0xcf, 0xd2, 0x39, 0x1d, 0xd9, 0x7f, 0x88, 0xc7, 0xc8, 0xf3, 0x9a, 0x22, 0xea, 0xe, 0xa3}, - output224: []byte{0xda, 0x3b, 0x6c, 0x90, 0x8d, 0x94, 0x7a, 0x2, 0x59, 0x2, 0x39, 0xe1, 0x11, 0xbb, 0xe4, 0xd6, 0x43, 0x66, 0x55, 0xa3, 0xf, 0x7f, 0x6f, 0x17, 0xdd, 0xf5, 0x25, 0xcf}, - output256: []byte{0x3, 0xb5, 0xa9, 0x21, 0x8a, 0xf0, 0xfb, 0x5a, 0xbd, 0x1a, 0xd6, 0xdf, 0xb1, 0xb3, 0x2e, 0x2e, 0xe8, 0x2b, 0x5, 0x4c, 0xbb, 0x4, 0x6a, 0xbc, 0x65, 0x6c, 0xc5, 0x26, 0x20, 0x82, 0x85, 0x53}, - output384: []byte{0x8a, 0x12, 0x49, 0xf0, 0xaf, 0x80, 0x50, 0x79, 0xb5, 0xf1, 0xd8, 0x23, 0xc7, 0x10, 0x1e, 0xdb, 0x47, 0x91, 0x7b, 0xf0, 0x92, 0xa8, 0xaf, 0x98, 0xda, 0x8e, 0x1b, 0x1e, 0xe1, 0xe8, 0x22, 0xa8, 0x9, 0x83, 0x55, 0xd4, 0x51, 0x42, 0xe, 0xe2, 0x41, 0x43, 0xc9, 0x97, 0x81, 0x96, 0x96, 0x98}, - output512: []byte{0xd2, 0x3b, 0x6e, 0x24, 0x24, 0x7a, 0xce, 0x20, 0xa, 0xae, 0xd6, 0x9f, 0x42, 0x5b, 0x65, 0xfc, 0xa3, 0x78, 0x11, 0x2a, 0x2b, 0x53, 0xbe, 0x7e, 0x59, 0x12, 0x52, 0x2d, 0x95, 0xa2, 0x5a, 0xde, 0x40, 0xf5, 0xc7, 0xca, 0x9f, 0x7c, 0xb9, 0xf1, 0x50, 0xa9, 0xfe, 0xd4, 0x78, 0x2b, 0xdd, 0x3f, 0xb8, 0x63, 0xbc, 0x2, 0xe9, 0xeb, 0xe, 0xfc, 0xec, 0x44, 0x23, 0x4a, 0xf7, 0x66, 0x37, 0x71}}, - testcase{ - msg: []byte{0xaf, 0x3, 0x37, 0x72, 0x47, 0x8b, 0x6c, 0x7a, 0x40, 0x59, 0x6, 0x81, 0x1d, 0x78, 0x7a, 0xcd, 0xa7, 0xb7, 0x75, 0xc2, 0x8e, 0xbf, 0xfa, 0x6, 0xae, 0xab, 0x37, 0xee, 0x36, 0x34, 0x76, 0x23, 0x9a, 0x4f, 0xa0, 0xaf, 0x7a, 0xfc, 0xed, 0xad, 0xeb, 0x2d, 0xed, 0x7c, 0xa3, 0x99, 0x7c, 0x82, 0xa5, 0x4d, 0x6f, 0xd, 0x10, 0x16, 0xc4, 0xbc, 0x2d, 0x18, 0x2f, 0x61, 0x16, 0x23, 0x26, 0x86, 0xf7, 0xb5, 0xba, 0xec, 0x0, 0x75, 0x9e, 0x7b, 0x2a, 0xcf, 0xa, 0x2f, 0x9d, 0xec, 0x55, 0xf3, 0xe3, 0xc7, 0x2, 0xf2, 0x1d, 0x76, 0xa, 0x85, 0x32, 0x83, 0xc7, 0x5b, 0x1e, 0xdd, 0x75, 0x44, 0x2e, 0x30, 0xda, 0x1d, 0xe7, 0x41, 0x97, 0x91, 0x3b, 0xca, 0xab, 0x1a, 0x61, 0x9e, 0x44, 0xc6, 0x5f, 0x41, 0xe, 0x9b, 0x8f, 0x23, 0x5d, 0x68, 0xd1, 0xef, 0xb, 0x78, 0x53, 0xac, 0x83, 0x62, 0x59, 0xc7, 0x6b, 0x4a, 0x84, 0xf4, 0x2, 0xc2, 0xe9, 0xf, 0x58, 0x79, 0x76, 0x13, 0x51, 0xdd, 0x28, 0x1e, 0x19, 0x21, 0x9e, 0x27, 0x4a, 0xc8, 0xd7, 0x65, 0x89, 0x15, 0x3f, 0xb5, 0xe6, 0x87, 0xcc, 0xd, 0xe9, 0xb5, 0x43, 0xf7, 0x63, 0xe6, 0x32, 0xa4, 0x65, 0xbe, 0x81, 0xf2, 0xfa, 0xde, 0xf, 0xee, 0xb9, 0x6d, 0x41, 0x2, 0xbc, 0xfa, 0x27, 0x6d, 0x7c, 0x9d, 0x6, 0x94, 0x5c, 0xfe, 0xa6, 0xc8, 0x2c, 0xaf, 0xed, 0x68, 0xb, 0xdd, 0x37, 0xf6, 0xeb, 0xe9, 0xb8, 0x1, 0x3b, 0xc2, 0xe7, 0xde, 0xc5, 0x2a, 0x87, 0xa1, 0xc5, 0x39, 0xd8, 0xaa, 0x5a, 0xd5, 0x25, 0xf9, 0x40, 0x5b, 0x1d, 0xb1, 0xef, 0x94, 0x2d, 0x4e, 0x98, 0xf4, 0xa, 0x1, 0xc3, 0xe5, 0xe5, 0x55, 0xc9, 0x2d, 0x18, 0xf3, 0x6e, 0xf4, 0xdd, 0x8c, 0xbb, 0x5a, 0xa7, 0x20, 0x7f, 0xef, 0xfa, 0xf2, 0x8a, 0x57, 0x62, 0xdd, 0xaf, 0xab, 0x4c, 0x84, 0x10, 0x63, 0xc6, 0x4f, 0xf, 0xbc, 0x32, 0xaa, 0xa6, 0x9c, 0xc1, 0x30, 0xc9, 0xa2, 0xad, 0xd7, 0x8c, 0x79, 0x5f, 0x5e, 0x41, 0x7b, 0x57, 0x26, 0x39, 0x9, 0x52, 0x6d, 0x2a, 0x74, 0x12, 0x76, 0xe4, 0x4d, 0x5, 0xa3, 0xc1, 0x75, 0xb5, 0x1f, 0xba, 0x17, 0xfd, 0xaf, 0x7d, 0x83, 0xef, 0xfc, 0xe3, 0x48, 0x71, 0x59, 0xcd, 0x92, 0xf4, 0xa, 0x19, 0xc5, 0x67, 0xda, 0x4e, 0x66, 0x7a, 0x0, 0x8c, 0x5a, 0xe8, 0xe6, 0xe0, 0x4f, 0x85, 0x26, 0x64, 0x2c, 0xb4, 0xa2, 0xf4, 0xcf, 0xa, 0x7, 0xaf, 0x44, 0xa6, 0x5d, 0x4f, 0x1d, 0x67, 0x1, 0xd6, 0xe3, 0x3b, 0xad, 0x2b, 0x1a, 0xe2, 0xbc, 0x18, 0xef, 0x45, 0x22, 0xf6, 0x4f, 0x28, 0x56, 0x52, 0xa1, 0x15, 0x54, 0x87, 0xb8, 0xa4, 0x9e, 0x9b, 0xe, 0xb9, 0x96, 0x56, 0x7f, 0xde, 0xfe, 0x7, 0xb8, 0xef, 0x97, 0xda, 0x55, 0xc4, 0x93, 0x44, 0x8f, 0xb0, 0xee, 0xd5, 0x32, 0x8, 0x8a, 0xdb, 0xd3, 0x55, 0xe4, 0x96, 0x6e, 0xd5, 0x99, 0x6e, 0xf8, 0x8c, 0xfb, 0x94, 0x25, 0x43, 0xd5, 0x6, 0x5f, 0x88, 0x26, 0xf8, 0x56, 0x18, 0xda, 0xab, 0xa9, 0xf1, 0xce, 0xae, 0x14, 0x83, 0x8, 0x3c, 0xfd, 0x52, 0x72, 0xbe, 0x7, 0xfa, 0xa6, 0x27, 0xd, 0x51, 0xb7, 0xdf, 0x74, 0x25, 0x8f, 0xf6, 0x2c, 0x20, 0xa8, 0xb6, 0x92, 0xa4, 0xfd, 0xf0, 0xf6, 0x95, 0x5c, 0x1f, 0xfb, 0xb4, 0x8c, 0x5b, 0xd5, 0x2, 0x6b, 0xb2, 0x57, 0x97, 0x2a, 0x81, 0x84, 0x9d, 0xb7, 0xb4, 0xee, 0xcd, 0xac, 0x95, 0x31, 0xc2, 0xef, 0x50, 0xf9, 0x15, 0x11, 0x90, 0x86, 0xd8, 0xe3, 0xb5, 0x21, 0x91, 0xb7, 0x65, 0xd6, 0xe3, 0x8d, 0xda, 0x2b, 0x12, 0x5d, 0xeb, 0x8b, 0xa9, 0xbb, 0x84, 0x14, 0x60, 0xb9, 0x75, 0x5d, 0x1f, 0xe3, 0x8c, 0x17, 0x65, 0xb7, 0x2e, 0xff, 0x98, 0xb9, 0x3d, 0xfa, 0x87, 0xe0, 0xcd, 0x47, 0x87, 0xb7, 0x4a, 0xe3, 0x35, 0xa9, 0xa6, 0x1b, 0x93, 0x4e, 0x25, 0x8e, 0xcb, 0x76, 0x42, 0x84, 0xf0, 0x71, 0x5d, 0xe4, 0x38, 0xe5, 0xf2, 0xf5, 0x96, 0x39, 0x2, 0x1e, 0xf2, 0xb2, 0x1f, 0xbf, 0x49, 0xd5, 0x3b, 0x63, 0x5f, 0x68, 0x3e, 0x37, 0x11, 0xa2, 0xaf, 0x1d, 0x1e, 0x25, 0x55, 0xf5, 0xae, 0x93, 0x15, 0x8b, 0xb5, 0xf6, 0x67, 0xc, 0xcc, 0xc, 0x99, 0xd2, 0x3c, 0xcd, 0x4d, 0x22, 0x8f, 0x2a, 0x63, 0x74, 0xbc, 0x7a, 0xa2, 0xc3, 0x21, 0xf0, 0x3a, 0x8a, 0xbb, 0x4d, 0x9d, 0xb6, 0x73, 0xa6, 0x3e, 0xa1, 0xce, 0x5d, 0x5b, 0xa5, 0x13, 0x3a, 0xf9, 0xeb, 0xdb, 0xcc, 0xef, 0x97, 0x1, 0x6b, 0x81, 0x3a, 0x97, 0x65, 0xb9, 0xac, 0x1e, 0xb5, 0x1a, 0x93, 0xd7, 0x76, 0xb, 0x36, 0x75, 0x1c, 0x76, 0x62, 0x83, 0xab, 0x13, 0xe7, 0x73, 0xa1, 0x28, 0x55, 0x91, 0x55, 0x45, 0x51, 0x31, 0xb8, 0x46, 0x67, 0x1, 0xf6, 0xc1, 0x6a, 0xcc, 0x82, 0x26, 0x12, 0xc1, 0xbe, 0x81, 0xe1, 0x4f, 0x5d, 0x9b, 0xdf, 0x8b, 0x9d, 0xcb, 0xaa, 0x7f, 0x3e, 0x10, 0xc3, 0x56, 0x34, 0x0, 0x4d, 0xaa, 0x50, 0x6a, 0x26, 0x87, 0x8a, 0xe7, 0x51, 0xd, 0xda, 0xc3, 0xfc, 0x9f, 0x8d, 0xf0, 0xf5, 0x2e, 0xb, 0xe1, 0x5, 0x13, 0xd6, 0x41, 0xfd, 0xa7, 0x41, 0xfd, 0x26, 0x5f, 0x9e, 0xe, 0x3d, 0xed, 0xee, 0xe4, 0x55, 0x13, 0xd1, 0x88, 0x44, 0x58, 0x90, 0xc3, 0x84, 0xdd, 0xa5, 0x1b, 0xa4, 0xcd, 0x1a, 0xc6, 0x31, 0x37, 0x55, 0xb, 0x59, 0x5f, 0xb2, 0xc3, 0xab, 0xa5, 0xb6, 0xa, 0x79, 0x8c, 0x44, 0x18, 0xc9, 0x40, 0x23, 0x33, 0x23, 0x2e, 0x1a, 0x26, 0x61, 0xc8, 0x97, 0x7d, 0xcc, 0xe6, 0x6, 0xf4, 0xba, 0x89, 0xe8, 0x3a, 0x1b, 0xca, 0xb8, 0x8b, 0xa6, 0xf3, 0xdb, 0x59, 0x34, 0xc2, 0x27, 0xd3, 0xca, 0x82, 0x0, 0x63, 0xa1, 0xdc, 0x2e, 0xeb, 0xc, 0x18, 0x22, 0xdd, 0x2c, 0xb8, 0x9b, 0xaa, 0x12, 0xd8, 0x1b, 0xeb, 0xdf, 0xfb, 0xd0, 0x54, 0xdb, 0xc4, 0xa0, 0x63, 0x35, 0x5e, 0xd3, 0x82, 0x5e, 0x81, 0x96, 0xca, 0x4, 0xd6, 0xd1, 0x2d, 0x8c, 0x8c, 0x52, 0x1d, 0x63, 0x3e, 0x2f, 0x21, 0x4e, 0x84, 0x68, 0x53, 0xde, 0x5d, 0x8, 0x77, 0xd4, 0x10, 0x58, 0xce, 0xb7, 0x75, 0x45, 0xe7, 0x73, 0xc0, 0xb5, 0xd5, 0x15, 0x5d, 0x4b, 0x61, 0xb4, 0xcb, 0x6, 0xd, 0xba, 0x7d, 0xfc, 0xe8, 0x4d, 0x3e, 0x25, 0xf3, 0x9e, 0xa6, 0xb9, 0x5c, 0xdf, 0x83, 0x11, 0xe, 0x9c, 0x10, 0x51, 0xd7, 0x46, 0xf0, 0x18, 0x3c, 0x1, 0xb0, 0x6e, 0x31, 0x10, 0x35, 0xa2, 0x88, 0x9, 0xf4, 0xcd, 0xda, 0x7, 0x84, 0xd7, 0x90, 0x3e, 0x13, 0x2d, 0xe9, 0x1e, 0xf, 0x42, 0x6d, 0x93, 0x7c, 0x5e, 0x98, 0xff, 0x81, 0x23, 0xad, 0x11, 0xac, 0x3e, 0x11, 0x33, 0xcf, 0xa6, 0x29, 0x8b, 0xe0, 0xab, 0x58, 0xb5, 0xdf, 0x55, 0xd6, 0x6, 0xd, 0x51, 0x63, 0xd8, 0x47, 0xee, 0x59, 0x65, 0xfa, 0xd6, 0xa, 0x85, 0x3, 0xc3, 0xbb, 0x54, 0x93, 0x58, 0x56, 0x54, 0x4d, 0x57, 0x40, 0x42, 0x15, 0xfc, 0x84, 0x3d, 0x41, 0xe5, 0xc7, 0x3f, 0x1a, 0x8e, 0x50, 0xf, 0xb, 0xab, 0x3f, 0xba, 0x3f, 0xe5, 0x54, 0x75, 0xf8, 0x9a, 0x96, 0x7e, 0x7e, 0x7, 0xed, 0x21, 0xd6, 0xd8, 0x21, 0xa7, 0x97, 0xa9, 0xb3, 0xe9, 0x33, 0x41, 0x68, 0xfd, 0x6d, 0x1f, 0x19, 0xf3, 0x12, 0xa5, 0xbb, 0x69, 0x42, 0x2c, 0xad, 0x50, 0x68, 0x51, 0x77, 0xc, 0x38, 0x97, 0xdf, 0x83, 0x83, 0x3, 0xb2, 0x78, 0x3f, 0x86, 0xc8, 0xa5, 0x6, 0xee, 0x32, 0x6e, 0xe4, 0xd8, 0xc4, 0x92, 0xcd, 0x11, 0x50, 0xf4, 0x77, 0x1a, 0x53, 0x34, 0x40, 0xe7, 0x4d, 0x7e, 0x90, 0x80, 0x19, 0x3f, 0x6d, 0x4b, 0x44, 0xbc, 0x26, 0x65, 0x8d, 0x8b, 0xbb, 0x53, 0xa1, 0x32, 0xaf, 0xce, 0x18, 0x99, 0x22, 0x4b, 0xce, 0xa0, 0x37, 0x5a, 0x5e, 0x3e, 0x56, 0x3f, 0xc1, 0x69, 0x39, 0xbd, 0x3e, 0xc0, 0x85, 0xd2, 0xa5, 0x36, 0x4f, 0xaf, 0x11, 0xed, 0xa4, 0x1e, 0xef, 0xf4, 0x44, 0x9, 0xc5, 0x10, 0xf, 0xa, 0xc2, 0xef, 0x60, 0xea, 0x8a, 0xb9, 0x8c, 0x35, 0xf9, 0xfd, 0x65, 0xfa, 0x61, 0xd6, 0xa6, 0xa, 0xb0, 0xc3, 0x54, 0x37, 0x86, 0x72, 0x21, 0xdd, 0xb6, 0xa8, 0x77, 0x2, 0xed, 0x44, 0xe1, 0x15, 0xba, 0xef, 0x16, 0xf2, 0x5c, 0xce, 0x2b, 0x11, 0xb8, 0x6, 0x2a, 0x8c, 0x2a, 0x6, 0xe3, 0x4c, 0x40, 0x0, 0xea, 0xe8, 0x81, 0xbe, 0x36, 0x71, 0xc5, 0x66, 0xb4, 0xc2, 0xb5, 0x2b, 0xe2, 0x84, 0xfa, 0x70, 0x73, 0x36, 0x4b, 0x7e, 0x9a, 0x6d, 0xbb, 0xa8, 0xae, 0x7e, 0xbc, 0xf6, 0x0, 0x84, 0x91, 0xc6, 0x6c, 0x7e, 0xe4, 0x9e, 0xd4, 0x26, 0xe7, 0xa3, 0xee, 0x3d, 0xe2, 0x55, 0xb0, 0xb2, 0x4f, 0x88, 0xa2, 0xe7, 0x38, 0x17, 0x7c, 0xf7, 0xae, 0xe4, 0xff, 0xb5, 0xf2, 0xce, 0x40, 0x54, 0xca, 0xb2, 0x37, 0x8b, 0xa, 0xf8, 0xa5, 0xa2, 0xbe, 0x2f, 0xba, 0x43, 0xe5, 0x85, 0x94, 0x36, 0xa4, 0xf3, 0x21, 0xf8, 0x52, 0x2c, 0x75, 0x7, 0x53, 0x8b, 0x74, 0xd0, 0xd3, 0xe2, 0xb1, 0xb9, 0x4e, 0x92, 0x60, 0xd, 0x71, 0x16, 0xba, 0x31, 0x9d, 0x88, 0x68, 0x24, 0x90, 0x8b, 0x4, 0x80, 0x35, 0x31, 0x91, 0x4a, 0xc7, 0xa8, 0x15, 0x39, 0x37, 0xfc, 0xf2, 0x8, 0x59, 0x68, 0xa7, 0xb9, 0x24, 0xcf, 0xbc, 0x49, 0x32, 0x4b, 0xf0, 0x14, 0x4b, 0xe3, 0x7f, 0xf3, 0x9a, 0x23, 0x5a, 0x15, 0x18, 0x73, 0xf9, 0xbf, 0xeb, 0x57, 0x36, 0x6b, 0xf9, 0xc8, 0xa0, 0xa9, 0xdc, 0x9c, 0x2e, 0x84, 0x7c, 0x7b, 0x87, 0xd6, 0x44, 0xa0, 0xbc, 0xf0, 0x91, 0xf6, 0x8e, 0x46, 0x3c, 0xbb, 0x51, 0x66, 0xa, 0xd, 0xc7, 0xc0, 0x2, 0x76, 0x5f, 0x6d, 0x15, 0xc4, 0x46, 0xa1, 0xd8, 0x4d, 0x62, 0x5b, 0xd1, 0xc, 0xc9, 0x7b, 0x81, 0x80, 0x66, 0x61, 0x84, 0x82, 0x80, 0x3e, 0xc0, 0xc7, 0x3b, 0x66, 0xbe, 0xe4, 0xfa, 0x71, 0xee, 0x72, 0xad, 0xd4, 0x5d, 0x5b, 0xb6, 0x71, 0xfc, 0xe5, 0xb2, 0x78, 0xf7, 0xf1, 0x9d, 0x90, 0x9e, 0xc6, 0xe9, 0x20, 0x19, 0xcc, 0xe4, 0x41, 0x87, 0x96, 0xed, 0x5b, 0x97, 0xe3, 0xa7, 0xd9, 0x0, 0x6d, 0x2c, 0x3d, 0x82, 0x28, 0x7c, 0x65, 0x9a, 0x52, 0x6d, 0xf5, 0x19, 0xc1, 0x1b, 0x21, 0xda, 0xfa, 0x78, 0x7b, 0xfd, 0xd0, 0x3f, 0x4a, 0x2e, 0xd8, 0x32, 0xef, 0xe8, 0xc9, 0x20, 0x6b, 0x59, 0x29, 0xc, 0xc3, 0xd1, 0xef, 0x74, 0x97, 0x6e, 0x38, 0xb0, 0x5d, 0x2b, 0x9a, 0xa3, 0x1c, 0x18, 0xe6, 0x6c, 0xa7, 0xfe, 0xc, 0xd8, 0x3, 0xeb, 0x58, 0x3f, 0x4a, 0x6a, 0xdc, 0xe, 0x90, 0xa5, 0x21, 0x49, 0x2e, 0xfc, 0x83, 0xf9, 0xe5, 0x19, 0x66, 0xfa, 0x69, 0x68, 0x4e, 0xdd, 0x67, 0xf4, 0xa1, 0x11, 0xfa, 0x89, 0x42, 0x41, 0xe9, 0xdf, 0x30, 0xfa, 0x8d, 0x22, 0x27, 0xd7, 0xdb, 0x2e, 0x79, 0xfa, 0xcb, 0x7a, 0x2d, 0x9b, 0x94, 0xd7, 0xd5, 0xb7, 0x41, 0xcd, 0x92, 0x24, 0xf9, 0x61, 0x55, 0xbe, 0x98, 0x8e, 0x3, 0x20, 0x5d, 0x2c, 0x47, 0x54, 0x1a, 0x0, 0x1e, 0x2a, 0x7e, 0xee, 0xa3, 0xbe, 0x70, 0xde, 0xc1, 0x9b, 0xcc, 0x61, 0x25, 0xdc, 0x9d, 0xc0, 0xca, 0xa9, 0x4f, 0xeb, 0x63, 0x8f, 0xcb, 0x60, 0x5a, 0x46, 0xa2, 0x24, 0xfa, 0x3b, 0xd1, 0x80, 0xf6, 0x76, 0x1d, 0x4d, 0x92, 0x89, 0xdb, 0x2d, 0x2e, 0x76, 0x26, 0x99, 0x58, 0x3f, 0xb, 0x86, 0x4d, 0x90, 0x81, 0x61, 0x1d, 0xe2, 0xb1, 0xc0, 0x32, 0xca, 0x0, 0xc7}, - output224: []byte{0xa6, 0x35, 0x1b, 0x5, 0xaf, 0xe1, 0x91, 0x21, 0xb1, 0x59, 0x81, 0xa3, 0xd4, 0x8a, 0xfa, 0x6f, 0xd5, 0xcd, 0x7b, 0x65, 0x89, 0xa9, 0x47, 0xbc, 0xc, 0xcd, 0xf5, 0xab}, - output256: []byte{0xe2, 0x59, 0x70, 0x3b, 0xe7, 0x2c, 0xc3, 0x26, 0x9, 0x4d, 0x4d, 0x53, 0x1c, 0xd7, 0xff, 0xc6, 0xf2, 0xe5, 0xd, 0xdf, 0x39, 0x4d, 0x96, 0x4e, 0x8d, 0x29, 0xfe, 0xe3, 0xd7, 0x58, 0xe4, 0x56}, - output384: []byte{0xa7, 0xcf, 0xbb, 0x3e, 0x0, 0x67, 0x35, 0x2, 0x57, 0xab, 0xe8, 0x8f, 0x84, 0x8e, 0x17, 0x4d, 0xaa, 0xf4, 0xb9, 0x57, 0xe2, 0x2f, 0x2e, 0xea, 0x4a, 0xc3, 0xa3, 0x6f, 0x6f, 0x3c, 0x1, 0x4e, 0x19, 0xca, 0xd5, 0x83, 0x45, 0x78, 0x5e, 0xaa, 0x37, 0xcc, 0x52, 0x33, 0x87, 0xc8, 0xed, 0x54}, - output512: []byte{0x27, 0x73, 0x9b, 0xda, 0x63, 0x9d, 0x10, 0x72, 0x75, 0xfa, 0x9f, 0x84, 0x8e, 0x40, 0xf9, 0x3c, 0x20, 0xa8, 0x89, 0x45, 0xa6, 0x2a, 0x15, 0x21, 0x8f, 0xb, 0x26, 0xc4, 0xa5, 0x37, 0xee, 0x42, 0x9c, 0x1f, 0xd, 0x6, 0xe9, 0x81, 0x12, 0x38, 0x4d, 0xa6, 0xb0, 0x1f, 0xeb, 0x15, 0x80, 0x60, 0x52, 0xb5, 0xc8, 0x35, 0xc8, 0x29, 0x6d, 0x75, 0x19, 0x8f, 0xb5, 0x99, 0x5c, 0xf3, 0xdd, 0x79}}, - testcase{ - msg: []byte{0x8f, 0x1c, 0x1e, 0x85, 0x39, 0x3b, 0x9c, 0x2a, 0x2b, 0x59, 0x33, 0x63, 0xdc, 0xeb, 0x81, 0x8b, 0x10, 0x2d, 0xf, 0x57, 0xd4, 0xe1, 0xd3, 0x1b, 0xd3, 0x3c, 0x3, 0x4d, 0xfb, 0x1f, 0x17, 0xe2, 0xa9, 0xdb, 0x96, 0xd, 0x70, 0xd2, 0xfa, 0xa, 0xae, 0xbb, 0x7b, 0x56, 0xc8, 0x9, 0xea, 0x6, 0x7e, 0x93, 0xc4, 0x49, 0xf4, 0x2, 0x6a, 0x25, 0x8a, 0xc0, 0x4b, 0x6c, 0xe8, 0x9, 0xa7, 0x34, 0xd1, 0x5b, 0x7f, 0xe1, 0x3e, 0x4f, 0xaf, 0x8f, 0x26, 0x14, 0xdb, 0x9c, 0x3a, 0x42, 0x43, 0x5f, 0xbf, 0x15, 0x8e, 0x3e, 0x6c, 0xb3, 0xa, 0xa7, 0x27, 0x27, 0x2a, 0x4e, 0x32, 0x3d, 0xf2, 0x17, 0x20, 0xad, 0x65, 0xd7, 0x2b, 0x18, 0xa4, 0xa6, 0xba, 0xff, 0x9d, 0xde, 0x47, 0xca, 0xbb, 0x34, 0x3d, 0xb2, 0x82, 0x17, 0x5d, 0x85, 0xff, 0x51, 0xb3, 0x4a, 0x19, 0x77, 0x52, 0x13, 0x8a, 0xf3, 0xa0, 0x17, 0xd1, 0x99, 0x39, 0xdf, 0x72, 0x8a, 0x9, 0xc8, 0xf2, 0x8c, 0xde, 0xf4, 0xce, 0x5f, 0xf5, 0x40, 0xa6, 0xc9, 0x96, 0x8f, 0x46, 0x35, 0xd8, 0xd3, 0x28, 0x1f, 0x1a, 0x51, 0x26, 0xfc, 0x3a, 0x7e, 0xd3, 0x68, 0xdf, 0xfd, 0x41, 0xb5, 0xaa, 0xdf, 0xaa, 0xfc, 0xe5, 0xfc, 0x6, 0x90, 0x56, 0x85, 0x4a, 0x78, 0x5, 0x49, 0x17, 0xd3, 0x9a, 0x34, 0x94, 0x5f, 0xb5, 0xe6, 0x8, 0xfe, 0xba, 0xc8, 0x8f, 0xa, 0x53, 0x60, 0xa5, 0x24, 0xd9, 0xc8, 0x87, 0x24, 0x1d, 0x29, 0x53, 0xbd, 0x36, 0xe4, 0x6d, 0xb7, 0x5a, 0x45, 0x8f, 0x4d, 0xf4, 0x94, 0xe, 0xd7, 0x11, 0x10, 0x33, 0x44, 0x7, 0xdd, 0x0, 0x8, 0xa6, 0xdc, 0xae, 0x7d, 0x13, 0xfa, 0x5c, 0xbf, 0xce, 0xfd, 0x66, 0x67, 0xba, 0xc6, 0x57, 0xdc, 0xbe, 0x1d, 0xfb, 0xab, 0x48, 0x3d, 0xae, 0xc6, 0x86, 0xab, 0x87, 0xe, 0xb6, 0x2, 0x25, 0x68, 0x96, 0x33, 0xf7, 0x1f, 0xd, 0x3c, 0x4c, 0x87, 0xb, 0xfe, 0x60, 0x90, 0x29, 0x8b, 0x37, 0x2b, 0x73, 0xd5, 0xac, 0xa2, 0x22, 0x5a, 0xd7, 0x24, 0x20, 0xc, 0xe2, 0x40, 0xa, 0x77, 0xd4, 0x78, 0x8e, 0xe6, 0xd4, 0xb5, 0x60, 0x33, 0x2a, 0x2, 0xd, 0xa0, 0x35, 0xda, 0x3d, 0x52, 0xa, 0xa9, 0xcc, 0x52, 0x22, 0x93, 0x29, 0xa8, 0x18, 0x47, 0xac, 0xf6, 0x80, 0xb3, 0xaf, 0xeb, 0x2c, 0x1b, 0xc8, 0x4b, 0x6, 0x80, 0xa, 0xf3, 0x81, 0xcd, 0xb9, 0xaa, 0xa, 0x68, 0x7c, 0x50, 0xd0, 0x30, 0x29, 0xa0, 0xa6, 0xb5, 0x64, 0x1a, 0x8d, 0x3a, 0x8e, 0x40, 0xfd, 0x93, 0x18, 0xd3, 0xc5, 0xad, 0xd5, 0x1a, 0x4a, 0xbe, 0x66, 0x1b, 0xc3, 0xc5, 0xc4, 0x7d, 0x38, 0x50, 0x7a, 0x8a, 0xa7, 0xd6, 0x27, 0x5d, 0xf3, 0x8, 0x26, 0x33, 0x63, 0x7e, 0x57, 0x0, 0x78, 0x77, 0x14, 0xfc, 0x97, 0x76, 0x98, 0xed, 0xd2, 0x21, 0x8f, 0xfd, 0x47, 0xa8, 0x1d, 0x42, 0x8b, 0xf, 0xd6, 0x1b, 0xe6, 0x51, 0x47, 0x8d, 0xf0, 0x1, 0xd, 0xdd, 0xf9, 0x36, 0x3e, 0x93, 0xd8, 0xb3, 0x7b, 0x3d, 0x8e, 0x1b, 0x12, 0x2b, 0x76, 0xe1, 0x59, 0x85, 0xd9, 0xf4, 0xec, 0xcf, 0x55, 0x93, 0x6d, 0x91, 0x8f, 0xc, 0xbe, 0x39, 0x73, 0x4a, 0x1c, 0x41, 0xb3, 0x3b, 0x3e, 0xfd, 0x34, 0xd8, 0x45, 0xde, 0x55, 0x26, 0xc1, 0x83, 0xd9, 0x18, 0x78, 0x6c, 0x8e, 0xd3, 0xfa, 0xf1, 0xde, 0xb9, 0x2e, 0x85, 0xcd, 0x6f, 0xc3, 0x4, 0x21, 0xd2, 0x9, 0xd6, 0xcc, 0xa4, 0x7e, 0x9d, 0xb5, 0x34, 0x12, 0x51, 0xe2, 0x53, 0xe9, 0x32, 0xc8, 0xf0, 0x86, 0x28, 0xd2, 0x11, 0x5e, 0x56, 0x5c, 0x2d, 0x58, 0x1f, 0x8c, 0x89, 0x55, 0xd7, 0x19, 0x36, 0xdd, 0x50, 0x5e, 0x85, 0x58, 0xde, 0xa1, 0x40, 0x9e, 0x84, 0xea, 0x31, 0xba, 0x53, 0x55, 0xd7, 0xe2, 0xd0, 0x11, 0xf7, 0xdf, 0x83, 0xac, 0xb9, 0xce, 0xc, 0x6d, 0xef, 0xa5, 0x1b, 0x16, 0x18, 0x5a, 0x66, 0xd3, 0xd6, 0xd1, 0xd1, 0xd7, 0x14, 0x21, 0x68, 0xd9, 0xb8, 0xa0, 0x83, 0x2f, 0xd2, 0xec, 0xad, 0xad, 0x64, 0xca, 0xbe, 0xe8, 0xc7, 0x93, 0x28, 0xb9, 0x51, 0x33, 0x28, 0xfd, 0x4c, 0x70, 0x6, 0x22, 0x26, 0x85, 0xaf, 0x6c, 0x39, 0xab, 0x5f, 0x8, 0x1e, 0xdd, 0x49, 0x15, 0x4b, 0x5a, 0x25, 0x37, 0x5e, 0xeb, 0xa3, 0xf6, 0x63, 0xf7, 0x79, 0x9a, 0xed, 0xc4, 0xf, 0xd7, 0x47, 0x48, 0xbe, 0x95, 0x6e, 0xc6, 0x6f, 0x77, 0xec, 0x97, 0x45, 0x7d, 0x1c, 0x8, 0xc4, 0xa0, 0x3b, 0xa3, 0x24, 0x36, 0x54, 0x99, 0xd8, 0xd0, 0xaf, 0xe4, 0xa4, 0x5e, 0x75, 0x63, 0xbc, 0xe, 0x4e, 0x33, 0xaf, 0x70, 0x4e, 0x7c, 0xbd, 0x8f, 0x85, 0xce, 0x14, 0xfe, 0x1f, 0x84, 0xe1, 0xbb, 0xb8, 0x71, 0xd3, 0x61, 0xd4, 0x6e, 0xe, 0xb0, 0xb0, 0x44, 0xd4, 0xaf, 0x33, 0xb8, 0x67, 0x2b, 0x68, 0x48, 0x3e, 0x71, 0x87, 0xf1, 0xf8, 0x9b, 0xde, 0x3d, 0xa2, 0x9c, 0x40, 0x50, 0x29, 0xdd, 0x3d, 0xa3, 0xb2, 0xeb, 0x8c, 0x24, 0x8e, 0x32, 0x35, 0xcd, 0x8d, 0x2e, 0xc1, 0x72, 0x71, 0xba, 0x55, 0x63, 0xa0, 0x9f, 0x5d, 0xaa, 0xa5, 0xe9, 0xd1, 0x18, 0xb1, 0xe2, 0xaa, 0x61, 0xd2, 0x32, 0xf4, 0xef, 0x92, 0x8d, 0xe1, 0xa1, 0xc, 0x78, 0x6c, 0xe3, 0x27, 0xb, 0x88, 0x9b, 0x6d, 0x85, 0x9f, 0x35, 0xee, 0x0, 0xda, 0x10, 0xfb, 0xbc, 0xde, 0x1, 0xa9, 0xcd, 0x47, 0x27, 0x17, 0xe1, 0xbb, 0x35, 0xda, 0xac, 0x57, 0x53, 0x1d, 0x44, 0xc0, 0xb6, 0x2b, 0xf8, 0x60, 0x63, 0xbf, 0x35, 0x5e, 0xc, 0x8, 0xe3, 0xba, 0xf6, 0x49, 0x9f, 0xa0, 0xba, 0x8e, 0xa9, 0x6f, 0xc3, 0x38, 0x50, 0x7b, 0x67, 0x5d, 0x1a, 0x31, 0x0, 0x8f, 0x97, 0x98, 0x7b, 0x2c, 0xc3, 0x66, 0xe7, 0x15, 0xf4, 0x34, 0x46, 0xf9, 0xde, 0x4d, 0xc8, 0xc0, 0xaa, 0x7d, 0x81, 0xbb, 0x3b, 0x2e, 0x7b, 0xa7, 0x23, 0x6d, 0x31, 0x7b, 0x32, 0xc, 0x93, 0x4a, 0xd8, 0xa, 0x7b, 0x17, 0xf0, 0xf5, 0x91, 0xfd, 0x9d, 0xbb, 0xdb, 0x18, 0x0, 0xbc, 0x37, 0x7b, 0x6b, 0x4, 0xdf, 0xf1, 0xd2, 0x68, 0xf3, 0xf6, 0x19, 0x1d, 0x3a, 0x37, 0x1, 0x56, 0x24, 0xa8, 0xb4, 0xef, 0xdd, 0xc1, 0xf6, 0x88, 0x2d, 0x66, 0x79, 0xfb, 0xf, 0xd9, 0x2b, 0xfc, 0x95, 0x26, 0x27, 0x2c, 0xd6, 0xa2, 0xcf, 0x76, 0x8e, 0x6d, 0xbf, 0x3f, 0xd1, 0x73, 0x2f, 0x6b, 0x46, 0xcd, 0x4c, 0xde, 0x5d, 0x7, 0xb7, 0xaa, 0xb4, 0x67, 0xfb, 0x87, 0x16, 0xe4, 0x1c, 0xa9, 0xb8, 0xea, 0x91, 0x39, 0xd0, 0x97, 0x1, 0x73, 0x6b, 0x3, 0x8d, 0x25, 0x1, 0x36, 0x66, 0xa8, 0xdb, 0xe6, 0x3e, 0xb, 0x60, 0xf9, 0x3f, 0x6e, 0x77, 0xbd, 0x27, 0x5, 0x59, 0x84, 0x73, 0xa, 0x6c, 0xc5, 0x79, 0x1c, 0x6b, 0x55, 0x85, 0xa1, 0xa5, 0x1f, 0x78, 0x7e, 0xaa, 0x42, 0xb3, 0xdb, 0x7c, 0xe6, 0x15, 0x94, 0x71, 0xdc, 0x54, 0x54, 0xb7, 0x31, 0x3a, 0xba, 0x20, 0xf2, 0xdf, 0x10, 0x4b, 0xf9, 0x88, 0x62, 0x34, 0xf, 0xe0, 0xa7, 0x4, 0x3a, 0x55, 0x5f, 0xfd, 0x7, 0xdd, 0x11, 0x12, 0xf9, 0xc1, 0x62, 0x7d, 0x54, 0x1a, 0x89, 0x6b, 0xc6, 0x6e, 0x78, 0xa0, 0x1a, 0xf4, 0xac, 0x30, 0x80, 0x3, 0xcf, 0x97, 0xa, 0x5c, 0x11, 0xd2, 0x88, 0xe, 0x39, 0x5b, 0xd9, 0x2d, 0x45, 0x59, 0x60, 0x44, 0x6a, 0x67, 0xcc, 0xdc, 0xee, 0x71, 0xcb, 0x6e, 0x76, 0xf9, 0x88, 0x7c, 0xeb, 0xdd, 0x1d, 0x5a, 0x60, 0x13, 0x1d, 0x2b, 0xae, 0x75, 0x31, 0xe1, 0x4f, 0x3e, 0x4, 0xa4, 0xea, 0xf5, 0xbd, 0x36, 0x6d, 0x4e, 0x17, 0x10, 0x29, 0x31, 0x89, 0x13, 0x1d, 0x2b, 0x9d, 0x8f, 0x28, 0xb8, 0x91, 0x9b, 0x27, 0xf5, 0x4a, 0x1, 0xfb, 0x80, 0x4c, 0x2d, 0x1a, 0x66, 0xb4, 0x93, 0x66, 0xc5, 0x94, 0x65, 0xed, 0xe6, 0xd6, 0x28, 0x1b, 0xa5, 0x65, 0x6e, 0xb, 0xc1, 0x45, 0x78, 0xed, 0x3a, 0xe2, 0x18, 0x9b, 0x1d, 0xc7, 0x3d, 0xb5, 0x3a, 0x21, 0x7f, 0x53, 0x4e, 0x27, 0x54, 0x30, 0x4, 0xaf, 0x45, 0x45, 0x1e, 0x6a, 0x8f, 0xb9, 0x64, 0xb3, 0xfa, 0x2c, 0x8a, 0xf0, 0x14, 0x4a, 0x3b, 0x22, 0xca, 0x3b, 0xd, 0x5f, 0x38, 0x24, 0x17, 0x13, 0x9d, 0xd8, 0xb1, 0xe6, 0x24, 0x69, 0xac, 0xeb, 0x17, 0x81, 0xac, 0xb4, 0x98, 0x6d, 0x97, 0x25, 0xbd, 0xcb, 0x8b, 0xd8, 0x21, 0xa2, 0xc4, 0x49, 0xa, 0x6e, 0x75, 0xfa, 0x4e, 0x5, 0x40, 0x53, 0x3c, 0x39, 0xa9, 0xdc, 0xc8, 0x69, 0x7c, 0x16, 0x9d, 0x53, 0x5e, 0xc7, 0x1b, 0xf1, 0xdb, 0x4, 0xa6, 0x44, 0x6c, 0xcc, 0x7, 0xcf, 0x34, 0xea, 0x44, 0xb, 0x4d, 0x45, 0xcd, 0x8d, 0x66, 0x4a, 0x8a, 0x35, 0xaa, 0xe7, 0xa1, 0x6f, 0xf8, 0xac, 0x4d, 0x23, 0x60, 0xd4, 0x0, 0xea, 0x19, 0xe9, 0xf0, 0x0, 0xe6, 0xb, 0x92, 0x22, 0x9c, 0x51, 0xbe, 0xf3, 0x9, 0xf, 0xfe, 0x9c, 0x54, 0x61, 0xfe, 0x79, 0xd3, 0x95, 0xee, 0xcf, 0x4c, 0x11, 0xaa, 0x54, 0x6c, 0xa0, 0xc, 0xda, 0x99, 0xb5, 0xcd, 0x5c, 0xe4, 0xf4, 0x1e, 0xf, 0x0, 0xbe, 0x6c, 0x2a, 0xe3, 0xc4, 0xee, 0xc7, 0xdf, 0x60, 0xd7, 0xe7, 0x60, 0xcd, 0x30, 0x76, 0xec, 0xf5, 0xfa, 0x61, 0xda, 0xc1, 0x63, 0xdf, 0xe1, 0x2, 0xe3, 0x91, 0x7f, 0x69, 0x2b, 0x36, 0xcc, 0x1b, 0xce, 0xe7, 0x9f, 0xf8, 0xfd, 0xcf, 0x8e, 0x18, 0xac, 0x90, 0xd4, 0xab, 0x0, 0x69, 0xca, 0xdc, 0x2e, 0xe6, 0xe4, 0xa9, 0x2e, 0x52, 0x97, 0xe, 0x63, 0x15, 0x2e, 0x77, 0xfb, 0x4a, 0x4, 0x7d, 0x20, 0xe3, 0x35, 0x26, 0xa4, 0xde, 0xf6, 0x3a, 0xb8, 0x12, 0xa1, 0x7f, 0x9, 0x6, 0x5e, 0x60, 0xaa, 0xbb, 0x7a, 0x2b, 0x89, 0x8c, 0xfa, 0x10, 0xa3, 0x5b, 0x7b, 0x7c, 0xa9, 0xfa, 0xb1, 0x58, 0x3f, 0x35, 0x78, 0x94, 0xcc, 0xd8, 0xaa, 0xab, 0x8, 0xc6, 0xd9, 0xf6, 0xfd, 0xf1, 0xb8, 0xee, 0xe4, 0xd9, 0x38, 0x6, 0x8d, 0x35, 0xb3, 0xeb, 0xb, 0x1a, 0xea, 0xc3, 0xd6, 0x76, 0xca, 0x50, 0x34, 0x44, 0x8c, 0x6b, 0x7, 0xdf, 0xc, 0x9e, 0x10, 0x58, 0x90, 0x91, 0x26, 0x93, 0xa8, 0x4c, 0x98, 0x1c, 0x63, 0x6e, 0x7f, 0xc8, 0xd3, 0x1b, 0x19, 0xfc, 0x2d, 0xeb, 0x42, 0x3f, 0x13, 0xe4, 0x22, 0x59, 0x4b, 0xf3, 0x4f, 0x74, 0xdb, 0x5a, 0xb0, 0x80, 0x6f, 0x9f, 0x2e, 0x7c, 0xf, 0x22, 0x4f, 0x37, 0xe6, 0xc4, 0x3c, 0xb1, 0x92, 0x59, 0x3c, 0x85, 0x1a, 0x7c, 0xc1, 0x90, 0x27, 0x41, 0xb5, 0x5b, 0x86, 0x36, 0x5b, 0xeb, 0xbb, 0xf1, 0x18, 0x80, 0x5, 0x10, 0x5f, 0x49, 0x2d, 0x43, 0xe0, 0xa9, 0xa0, 0x7c, 0x7a, 0xf5, 0xc6, 0x5, 0xa3, 0xc0, 0x56, 0x9b, 0xb4, 0x5, 0x26, 0x97, 0x77, 0x5a, 0x99, 0x5, 0xc7, 0xa0, 0x23, 0x3b, 0xcb, 0x96, 0x99, 0xe6, 0xbb, 0x9, 0x82, 0xea, 0x7d, 0xc2, 0x52, 0x40, 0x44, 0x51, 0xce, 0x6d, 0xfd, 0x1a, 0x47, 0xc2, 0x98, 0xc5, 0xab, 0xff, 0xa1, 0x50, 0x41, 0xca, 0x28, 0x15, 0x7f, 0xcb, 0x4f, 0x48, 0x47, 0x72, 0x76, 0x7c, 0x2, 0x5d, 0xc, 0x4a, 0x8e, 0x89, 0xa1, 0xf5, 0x95, 0x17, 0xd7, 0x26, 0x93, 0xa4, 0x5d, 0x13, 0x99, 0x88, 0x16, 0x69, 0x8e, 0xc2, 0x1c, 0x64, 0xe, 0xb8, 0xe9, 0xf7, 0x5d, 0x40, 0x1b, 0x81, 0x18, 0xaa, 0x3a, 0x79, 0xf6, 0x5e, 0x25, 0x92, 0xb5, 0x6, 0x11, 0x11, 0x3c, 0xf4, 0x5, 0x0, 0x2d, 0x61, 0x62, 0x54, 0xa, 0xb, 0xa0, 0x3, 0xd4, 0x9, 0xc1, 0xd5, 0x8e, 0x81, 0xd2, 0xf4, 0xa7, 0x17, 0x57, 0x47, 0xea, 0xec, 0x68, 0xcb, 0x60, 0xa8, 0x54, 0x58, 0xb, 0x7e, 0x99, 0x30, 0x52, 0x4c, 0xda, 0x26, 0xe9, 0xb7, 0x4c, 0x48, 0x8f, 0x98, 0xba, 0x2b, 0xb0, 0x8b, 0x6, 0x11, 0x4b, 0x8d, 0x1f, 0x24, 0xb5, 0x1f, 0x5b, 0x7a, 0xbf, 0x7e, 0x45, 0x61, 0x78, 0xad, 0xa8, 0xc7, 0x7d, 0x9c, 0xa1, 0xa9, 0x32, 0xf8, 0x5d, 0xf4, 0xdb, 0x0, 0xca, 0x44, 0xc4, 0x83}, - output224: []byte{0xd9, 0xad, 0x6, 0x79, 0x21, 0x61, 0xe7, 0x4b, 0x19, 0x11, 0x70, 0xaa, 0x23, 0x65, 0xa0, 0x44, 0x3e, 0x67, 0xea, 0x9d, 0xff, 0xea, 0xf1, 0x15, 0x3a, 0xba, 0xbf, 0xe5}, - output256: []byte{0xc4, 0x2c, 0x1, 0x3, 0x3, 0x45, 0x6f, 0xbf, 0x39, 0xc4, 0x3a, 0xa9, 0x96, 0xd4, 0x2a, 0xc8, 0x6b, 0x36, 0x3b, 0xc6, 0x36, 0x5f, 0xdb, 0xd9, 0xea, 0x75, 0x8c, 0xc8, 0x96, 0x1c, 0xd9, 0xde}, - output384: []byte{0x49, 0xaa, 0xeb, 0x1a, 0x48, 0xa1, 0x89, 0x2f, 0x4d, 0xae, 0x92, 0x8d, 0x6c, 0x40, 0xf0, 0x3e, 0x49, 0x61, 0x4b, 0xcd, 0xfa, 0xa2, 0xd9, 0xbf, 0x2b, 0xe0, 0x73, 0x87, 0x54, 0x3e, 0x66, 0x71, 0x69, 0x40, 0xc5, 0xe, 0x36, 0xc3, 0x46, 0x46, 0xd0, 0xc3, 0x8d, 0x7b, 0x90, 0xc7, 0x4b, 0x1e}, - output512: []byte{0xbc, 0xb9, 0xe2, 0x7b, 0x76, 0xf, 0xd6, 0xe3, 0x15, 0x1f, 0xef, 0x53, 0xae, 0xd0, 0xa9, 0xcb, 0x8e, 0x43, 0xc0, 0x8a, 0x4b, 0xd5, 0x4f, 0xc5, 0x70, 0x34, 0x0, 0x64, 0x7e, 0x5, 0xc0, 0x6, 0x1, 0xd, 0xdd, 0xa0, 0xac, 0x7a, 0xf9, 0x64, 0xaf, 0x45, 0x22, 0x41, 0x4e, 0x13, 0xcb, 0x4c, 0x26, 0xcb, 0xa7, 0x1c, 0x13, 0xf3, 0x34, 0x61, 0x31, 0xc9, 0x35, 0x27, 0xc4, 0x2, 0xa0, 0x97}}, - testcase{ - msg: []byte{0xa8, 0xb7, 0x48, 0xdd, 0x69, 0x59, 0xfa, 0x87, 0x70, 0xad, 0x66, 0x73, 0xb8, 0xe7, 0xe, 0x35, 0x74, 0x8d, 0xfd, 0xc, 0x3b, 0xde, 0xda, 0xaa, 0x46, 0x7c, 0xe4, 0xe5, 0x2, 0xeb, 0x86, 0x6d, 0x73, 0x26, 0x83, 0xcb, 0x64, 0xe7, 0x8c, 0x52, 0x32, 0x8, 0xcb, 0x67, 0xdd, 0x9a, 0x6f, 0x3d, 0x32, 0x47, 0xf5, 0xb4, 0x13, 0xb1, 0x2, 0x5a, 0x33, 0xb2, 0x8c, 0x63, 0xb4, 0x28, 0x2, 0xcf, 0x6d, 0x74, 0x26, 0xdb, 0x5c, 0x7a, 0x26, 0x5f, 0xd8, 0x20, 0x61, 0xa, 0x14, 0x45, 0x3c, 0x28, 0x0, 0xb1, 0xf5, 0xd7, 0x76, 0x71, 0xb1, 0x5b, 0xc7, 0x92, 0xc0, 0xb0, 0xdd, 0x64, 0xaa, 0xd3, 0x53, 0x27, 0x21, 0xfd, 0xa0, 0xad, 0x87, 0xad, 0x7a, 0x57, 0xd1, 0x99, 0xdc, 0xf5, 0xb2, 0xff, 0xc, 0xc8, 0x4a, 0x7f, 0x74, 0x4e, 0xa7, 0x36, 0x9e, 0x6f, 0x4d, 0x8f, 0xf, 0x77, 0xda, 0xaa, 0x7d, 0xa0, 0xa8, 0x25, 0x5e, 0x32, 0xc4, 0x73, 0xd9, 0x81, 0xfd, 0xd4, 0xe9, 0xc8, 0x55, 0x28, 0x2b, 0xa0, 0xd5, 0x88, 0x97, 0xef, 0x23, 0x29, 0x65, 0x5d, 0xfa, 0xf8, 0x75, 0x37, 0xcf, 0xfc, 0x25, 0xa2, 0x2a, 0xa0, 0x87, 0x4e, 0xe8, 0xb5, 0x4a, 0x37, 0x3, 0x90, 0x60, 0x1a, 0x54, 0x92, 0xe7, 0x63, 0x4f, 0xef, 0x8e, 0x24, 0xab, 0xe3, 0x20, 0x35, 0x50, 0xee, 0x87, 0x88, 0x92, 0x6f, 0x1b, 0xcb, 0x8b, 0xd, 0xf7, 0xa, 0x6, 0x30, 0x35, 0x7d, 0x99, 0x1b, 0xb8, 0xf4, 0x5d, 0xf6, 0xa0, 0x3a, 0x17, 0xc0, 0x0, 0xe9, 0x78, 0x40, 0xfe, 0xce, 0xad, 0xf9, 0x45, 0x16, 0x5c, 0xac, 0x49, 0x41, 0xcf, 0x36, 0x3d, 0xb4, 0x98, 0x91, 0xc8, 0x6a, 0x54, 0xfa, 0x81, 0xb4, 0x86, 0xa5, 0x63, 0x49, 0x2a, 0xa0, 0x1f, 0x76, 0x9a, 0x1, 0xbb, 0xfc, 0x7e, 0x86, 0x97, 0xb1, 0x2b, 0x28, 0xcd, 0x1f, 0xcf, 0x60, 0x8b, 0xd, 0xa5, 0xec, 0x7f, 0x5b, 0x65, 0x36, 0x93, 0x64, 0xcb, 0x75, 0x2c, 0x83, 0xd6, 0x89, 0x1b, 0x7d, 0x87, 0xd, 0x52, 0xb3, 0xb6, 0x5c, 0x36, 0x96, 0x4, 0x34, 0x74, 0xf9, 0x1a, 0x3, 0x45, 0xcc, 0xb7, 0xaf, 0x34, 0xcd, 0x5b, 0x30, 0x8b, 0x1d, 0xbf, 0x23, 0x32, 0x9, 0x9f, 0x67, 0x1a, 0x8c, 0xf4, 0xd8, 0x9, 0xe4, 0x60, 0x56, 0x28, 0xb1, 0xb, 0x27, 0x5f, 0xc5, 0xba, 0xd4, 0xca, 0xf2, 0x99, 0xbb, 0x58, 0x1, 0x12, 0x4b, 0xc8, 0x63, 0x59, 0xac, 0x83, 0xb3, 0x3b, 0xd8, 0x4d, 0xcf, 0x6d, 0x6d, 0xb4, 0x19, 0x17, 0xa9, 0xa2, 0x17, 0xcc, 0x68, 0x2a, 0xec, 0x18, 0x59, 0xa4, 0x27, 0xa3, 0x2b, 0xc1, 0xb1, 0x1f, 0xfe, 0xef, 0x82, 0x5d, 0xf4, 0x51, 0xc7, 0xcd, 0xc0, 0x33, 0xe9, 0x14, 0x87, 0x79, 0xf7, 0x53, 0xcb, 0x4c, 0x5, 0x67, 0x4e, 0xde, 0x8e, 0xdc, 0xea, 0xc8, 0xc, 0xd2, 0x3d, 0xf3, 0x72, 0x46, 0x4f, 0x3, 0x90, 0x0, 0xfa, 0x3a, 0xa4, 0x7d, 0x5a, 0x99, 0xe1, 0x48, 0x94, 0xca, 0xa2, 0xff, 0x5b, 0x90, 0x5, 0x7d, 0x3f, 0x41, 0x1b, 0x14, 0x59, 0x16, 0x8a, 0x85, 0xc2, 0x84, 0xd5, 0xc2, 0x81, 0x48, 0x11, 0xba, 0xa7, 0x70, 0xe, 0x5e, 0xd9, 0x6e, 0x45, 0x17, 0x46, 0x4f, 0xf1, 0x75, 0x78, 0x11, 0xbf, 0x36, 0x91, 0xce, 0x33, 0xd0, 0x24, 0x45, 0x98, 0xb, 0xcc, 0x40, 0xe2, 0x4e, 0x1f, 0x9d, 0xc6, 0xf9, 0xdf, 0x45, 0x34, 0x2c, 0xa4, 0xe1, 0x4e, 0x1, 0x3c, 0x1f, 0xa0, 0x66, 0x76, 0xd5, 0x82, 0x55, 0x5e, 0xd5, 0x5d, 0x6, 0x9f, 0xd2, 0xdb, 0x26, 0x7c, 0x92, 0xdb, 0x57, 0x7a, 0x55, 0x6e, 0x61, 0x3, 0xe6, 0x9d, 0x1d, 0x73, 0x33, 0x51, 0x83, 0xe2, 0x6e, 0xd8, 0x8a, 0x5e, 0xfd, 0x87, 0xeb, 0xdd, 0xca, 0xa5, 0x92, 0x7b, 0x97, 0xf0, 0x94, 0x20, 0x9d, 0xbc, 0x7f, 0xb3, 0x37, 0xdc, 0xf, 0x7c, 0x98, 0xa9, 0x75, 0xa7, 0x41, 0x69, 0x60, 0xf, 0x3f, 0x1a, 0x1c, 0x74, 0x33, 0xec, 0xfc, 0x74, 0xb3, 0x19, 0xba, 0x3d, 0xd8, 0xef, 0x69, 0xfd, 0x1c, 0xc6, 0xce, 0x83, 0xd1, 0xb4, 0xa0, 0x12, 0x49, 0x69, 0xf6, 0xcd, 0x24, 0xb7, 0xe3, 0xd3, 0x41, 0x8a, 0x80, 0xc7, 0x35, 0xb4, 0xf7, 0xad, 0xd0, 0x91, 0x88, 0x26, 0x73, 0xf0, 0x1f, 0xf2, 0xe, 0x38, 0x46, 0x1a, 0x2b, 0x38, 0x9d, 0xca, 0x81, 0xe5, 0xe6, 0xca, 0x22, 0x13, 0xaf, 0x19, 0x48, 0x95, 0x13, 0x9c, 0xdb, 0x2, 0x13, 0xc, 0x1f, 0xe0, 0x43, 0xe5, 0x87, 0x83, 0xc1, 0x30, 0xc3, 0x6b, 0xb8, 0x8a, 0x9a, 0xf6, 0x56, 0xe4, 0x6, 0xdc, 0xa1, 0x14, 0xe9, 0x6f, 0x2f, 0xc9, 0xf0, 0xe, 0xaa, 0xf5, 0xca, 0x99, 0x11, 0x70, 0x8a, 0x4a, 0x2e, 0x6c, 0xfe, 0xda, 0x25, 0x3, 0xc4, 0x9b, 0x64, 0x4d, 0xd2, 0x56, 0x26, 0x37, 0x13, 0x4c, 0xfa, 0x33, 0xc5, 0xc, 0x62, 0x19, 0x9e, 0x99, 0xa8, 0xa2, 0xec, 0xcc, 0xfc, 0xc3, 0xc6, 0xa1, 0xfa, 0x62, 0xbc, 0x1a, 0xd9, 0x70, 0x1b, 0x7c, 0x9c, 0xe1, 0x48, 0x24, 0x45, 0x10, 0x59, 0x41, 0x4e, 0xd5, 0x2a, 0xd3, 0x6a, 0x69, 0xb3, 0xe0, 0xa4, 0xfb, 0x54, 0x3f, 0x40, 0x9, 0x9c, 0x43, 0x7e, 0x89, 0xfb, 0x12, 0xf6, 0xae, 0xd8, 0x16, 0xc9, 0xaf, 0x77, 0x78, 0xd9, 0x1a, 0xdc, 0x62, 0x18, 0xa1, 0x13, 0xad, 0x9c, 0x9c, 0xc, 0xaa, 0x4e, 0x60, 0x28, 0x6, 0xc4, 0x33, 0x9e, 0xb4, 0x56, 0xda, 0x4c, 0x9, 0x21, 0x80, 0xfc, 0x8a, 0x91, 0xfb, 0x9f, 0xe3, 0x5, 0xc9, 0x5c, 0xc4, 0xae, 0x5c, 0xcb, 0x6, 0xdd, 0xc6, 0x4f, 0x41, 0x27, 0x90, 0x6b, 0xe2, 0x8f, 0x70, 0x14, 0xa9, 0xee, 0x2e, 0xf9, 0xf9, 0xf0, 0x75, 0x98, 0x2f, 0x72, 0x73, 0xb1, 0x46, 0x9d, 0xf1, 0x4b, 0xb9, 0x2c, 0xf2, 0x9b, 0xbd, 0xb4, 0x87, 0xb8, 0xdd, 0xf3, 0x7f, 0x5e, 0x10, 0xda, 0x60, 0xc7, 0x2, 0x93, 0x44, 0x8b, 0x7e, 0x8c, 0x5d, 0x92, 0x14, 0x8f, 0xb4, 0x66, 0xa2, 0x8a, 0x16, 0xf2, 0xea, 0x8a, 0x3f, 0xb1, 0x2c, 0x8e, 0x86, 0x78, 0xbf, 0x4d, 0x13, 0x9a, 0xa2, 0xdb, 0x2f, 0x17, 0x11, 0x22, 0xe5, 0x97, 0x5, 0xea, 0x34, 0x9, 0xfd, 0xb3, 0x24, 0xfc, 0xaf, 0x27, 0x90, 0x9a, 0x66, 0xed, 0x1c, 0xde, 0x7b, 0x92, 0xb9, 0x49, 0xe9, 0x7, 0x3a, 0xde, 0x44, 0x8, 0xe9, 0xd5, 0x53, 0x7d, 0x3b, 0x14, 0x36, 0x85, 0x3a, 0x2, 0x94, 0xb7, 0x75, 0x64, 0xb7, 0xb, 0x1e, 0x43, 0xab, 0x13, 0x32, 0x7d, 0x61, 0x7e, 0x86, 0x97, 0x1d, 0x0, 0x9c, 0x7d, 0xc1, 0xbe, 0x3, 0x37, 0xb1, 0x85, 0x70, 0x1a, 0x5, 0x21, 0xda, 0xf4, 0x94, 0xb, 0xf5, 0xa1, 0x51, 0xc6, 0xd2, 0xef, 0xd0, 0x77, 0xa3, 0x4, 0x8e, 0xb7, 0xb3, 0x7a, 0xce, 0xa0, 0x84, 0xe3, 0xa3, 0xac, 0xeb, 0x4f, 0x2f, 0x44, 0xe4, 0xb4, 0x2e, 0x91, 0x12, 0xfe, 0x67, 0x27, 0xf5, 0xb6, 0x5a, 0xfd, 0xf2, 0x82, 0x52, 0xf3, 0x41, 0xda, 0xbc, 0x9f, 0xc8, 0xc8, 0xd5, 0xdd, 0x2f, 0xa6, 0xf2, 0x63, 0xf9, 0x5c, 0x0, 0x66, 0x58, 0x54, 0x21, 0x7e, 0x91, 0x5d, 0x84, 0x2c, 0xcb, 0x2f, 0x33, 0x31, 0x1, 0x24, 0xe5, 0xb5, 0x79, 0x2b, 0xf0, 0x86, 0x3e, 0x2c, 0x10, 0x84, 0xdf, 0xa5, 0x11, 0x38, 0x7a, 0xeb, 0x1a, 0xc4, 0x4, 0xd3, 0x2a, 0xdb, 0x5c, 0x3, 0x6, 0xef, 0xec, 0x84, 0x68, 0x8a, 0x95, 0x6c, 0x70, 0x41, 0xc7, 0x24, 0xe8, 0x74, 0x1e, 0xf4, 0x9d, 0xe2, 0x77, 0x2f, 0xc3, 0xe1, 0x74, 0xe0, 0x2f, 0x81, 0xb7, 0xd9, 0x70, 0xe5, 0x1, 0x29, 0x13, 0xdc, 0xcd, 0x2c, 0xb0, 0x92, 0x5c, 0xe5, 0x1d, 0x72, 0x5e, 0x89, 0x0, 0xba, 0x58, 0x9a, 0x97, 0xf, 0x19, 0xb5, 0x58, 0xcd, 0xc5, 0x7b, 0x30, 0xa7, 0xdb, 0x60, 0xfe, 0xc9, 0x1a, 0xd0, 0x0, 0x5b, 0xd, 0xef, 0xc0, 0x5d, 0xfa, 0xaa, 0x26, 0x13, 0x9, 0x5f, 0x53, 0xa4, 0x78, 0x45, 0x9b, 0x4e, 0x89, 0x17, 0xf, 0xcb, 0xb5, 0x7f, 0x60, 0xb2, 0x80, 0x1e, 0xf8, 0x7f, 0x6, 0x65, 0x23, 0x5c, 0x0, 0x4b, 0x8f, 0x61, 0xa1, 0x66, 0xdd, 0x58, 0x85, 0xda, 0x1b, 0x4, 0x76, 0x8c, 0x8, 0xf9, 0xee, 0xde, 0xab, 0x78, 0xa1, 0xd7, 0xbb, 0x49, 0x29, 0x4f, 0xfc, 0xd1, 0x34, 0x52, 0x20, 0x76, 0xc3, 0xe0, 0xb0, 0xa2, 0xa8, 0xfb, 0xca, 0xe3, 0xd0, 0x1, 0xf4, 0xe1, 0xdf, 0xd, 0xe1, 0x66, 0x9e, 0x53, 0x3f, 0x4c, 0x9d, 0x95, 0xcc, 0x2a, 0xe0, 0xc4, 0x2b, 0x67, 0xa6, 0x28, 0xd0, 0x87, 0x1b, 0x83, 0xcc, 0x59, 0x9a, 0x8a, 0xc4, 0x82, 0x8f, 0xda, 0x49, 0xec, 0x2f, 0x9c, 0x5, 0x7c, 0xc9, 0x95, 0xe7, 0x9e, 0xe5, 0xfc, 0x51, 0x90, 0x5b, 0xbe, 0xdc, 0x75, 0x6a, 0x74, 0x86, 0xe7, 0x95, 0x37, 0xb5, 0x59, 0xb4, 0x9e, 0xa5, 0x7e, 0x87, 0x40, 0x6c, 0x20, 0xef, 0x94, 0xfa, 0x73, 0x2, 0x5f, 0xe1, 0x6a, 0xb5, 0x88, 0x59, 0x1d, 0x8e, 0x89, 0xc7, 0x9c, 0x3f, 0x91, 0x4f, 0x97, 0xab, 0x15, 0x42, 0xdc, 0x6f, 0x86, 0x43, 0x5f, 0x13, 0x24, 0x5, 0xff, 0x49, 0x46, 0x3f, 0x6b, 0x83, 0x6f, 0x83, 0x51, 0xbe, 0x8c, 0x1e, 0x21, 0xdd, 0x14, 0xb6, 0x19, 0xb5, 0x19, 0x3b, 0xcd, 0x4, 0x47, 0xe, 0xdc, 0x4b, 0x86, 0x31, 0x74, 0xe4, 0xf1, 0xb2, 0xe, 0xda, 0x5c, 0x3d, 0xe3, 0x25, 0x32, 0x41, 0xd6, 0x1c, 0xc1, 0x7f, 0x4f, 0xe1, 0xdd, 0x6a, 0xb0, 0xa7, 0xcd, 0x10, 0x22, 0x58, 0xf6, 0x36, 0x64, 0x2, 0xb4, 0x4d, 0xa9, 0xd7, 0xc4, 0x15, 0xab, 0xea, 0x13, 0x41, 0x1a, 0x89, 0xe7, 0x79, 0x6, 0xde, 0xd4, 0x30, 0x75, 0x13, 0x57, 0x87, 0x82, 0x6, 0x92, 0xa3, 0x78, 0x5d, 0x9, 0x94, 0x8c, 0x5e, 0x6, 0x35, 0x51, 0xf5, 0x1a, 0xb, 0x8f, 0xe7, 0xba, 0x9a, 0x7, 0xa, 0x6e, 0x6, 0x48, 0xb0, 0x7c, 0x9c, 0xb9, 0x9b, 0xea, 0x75, 0x93, 0x39, 0x36, 0x92, 0xea, 0x6a, 0x36, 0x5d, 0xb, 0x25, 0x76, 0xaa, 0x3, 0xb, 0xb4, 0xcd, 0x28, 0x8c, 0x42, 0x50, 0xc, 0x42, 0x97, 0xcb, 0x7, 0x3b, 0xf, 0x73, 0x70, 0xdf, 0xb7, 0xaa, 0xdb, 0xd8, 0x56, 0x9e, 0x51, 0xed, 0x6a, 0x9e, 0x74, 0xab, 0x58, 0xe6, 0x47, 0x87, 0x9f, 0x7a, 0x53, 0x7d, 0xd1, 0xb3, 0xe4, 0x81, 0x6a, 0xe9, 0xf, 0x63, 0x32, 0xa2, 0x19, 0x43, 0x9a, 0xba, 0x6c, 0x9d, 0x77, 0x22, 0xa3, 0xc, 0x93, 0x2a, 0x25, 0x42, 0xf2, 0x57, 0x11, 0x14, 0x50, 0xfc, 0x27, 0x9, 0x71, 0xd2, 0xe6, 0xc1, 0xb9, 0xeb, 0xb3, 0x4b, 0x78, 0x6d, 0x21, 0x5a, 0x1, 0xe8, 0x9d, 0x53, 0x65, 0x58, 0xd9, 0x4, 0x42, 0x2d, 0x8e, 0x5a, 0x5b, 0x3e, 0x2b, 0x2c, 0x54, 0xda, 0x19, 0x1b, 0x94, 0x7c, 0x48, 0xee, 0xe, 0xd2, 0x96, 0x35, 0x5b, 0xe5, 0x2e, 0xd1, 0x92, 0xda, 0x91, 0xc, 0xd4, 0x7d, 0x8b, 0x4f, 0xe7, 0xa2, 0x9a, 0x23, 0xba, 0x2f, 0xa2, 0x3b, 0x8c, 0x6c, 0xbf, 0x4c, 0xa5, 0x72, 0xb9, 0xa7, 0x2e, 0xa9, 0x68, 0x8c, 0xa0, 0xdf, 0xb2, 0xf7, 0x4a, 0xe6, 0xd7, 0x8c, 0x2d, 0x96, 0x74, 0x8e, 0x58, 0x7d, 0x2d, 0x1f, 0x5d, 0x3c, 0x99, 0xab, 0xd, 0x98, 0xdf, 0x94, 0x94, 0x56, 0xe0, 0x67, 0xaa, 0x2, 0xb3, 0xb4, 0x3d, 0x29, 0x16, 0xf0, 0x51, 0xd6, 0x36, 0xf2, 0x8f, 0xcf, 0x97, 0x19, 0x50, 0xe9, 0xd9, 0xc1, 0xc0, 0xc9, 0x4b, 0x89, 0x4e, 0xee, 0x76, 0xe9, 0xae, 0x94, 0x22, 0x83, 0xb5, 0x16, 0xc0, 0xe4, 0xa1, 0x5, 0x27, 0xd0, 0xf1, 0x20, 0xe1, 0x5c, 0xae, 0xdd, 0x19, 0x54, 0x6a, 0xcb, 0xf1, 0xab, 0x85, 0xca, 0xba, 0x76, 0x4c, 0x74, 0xde, 0xc2, 0xad, 0x19, 0x5, 0x70, 0xd7, 0xd4, 0x4b, 0x5d, 0xd6, 0x37, 0x97, 0x4e, 0x8b, 0xa2, 0x6b, 0x60, 0xf0, 0xa4, 0x8, 0xb7, 0xc5, 0x6d, 0xb7, 0x33, 0x95, 0xc1, 0xf1, 0xe7, 0x60, 0x60, 0x16, 0xb6, 0x61, 0x11, 0x9c, 0xa4, 0x68, 0x9b, 0x12, 0xaf, 0x8f, 0x60, 0x8a, 0x18, 0x10, 0x70, 0x3c, 0xb4, 0x89, 0xbe, 0xaa, 0x12, 0xcd, 0x72, 0xcf, 0x37, 0xbe, 0x43, 0xff, 0xcf, 0x2f, 0x7f, 0x8c, 0x21, 0xa8, 0x31, 0x1a, 0x52, 0x78, 0x31, 0xbf, 0xe5, 0xb7, 0xcf, 0x5e, 0x98, 0x39, 0xba, 0x13, 0x81, 0x87, 0xba, 0xbd, 0x9a, 0xdc, 0xa8, 0x4c, 0x35, 0xb9, 0xaa, 0xfa, 0xba, 0x6b, 0xcf, 0x7e, 0xd0, 0xd2, 0x2d, 0xa8, 0x7f, 0xb6, 0xeb, 0x81, 0x45, 0x59, 0x1c, 0x9b, 0x36, 0x52, 0xa4, 0xea, 0xc2, 0x56}, - output224: []byte{0xb1, 0xa2, 0x9c, 0x0, 0xab, 0x23, 0x41, 0xa7, 0x7c, 0xfe, 0xd8, 0x39, 0x8f, 0x23, 0x2b, 0x1f, 0xb5, 0x7b, 0xf4, 0x57, 0x2e, 0xaa, 0xb7, 0x56, 0xd, 0x7d, 0x4c, 0xd6}, - output256: []byte{0x1b, 0xae, 0x63, 0x99, 0x40, 0xec, 0x63, 0xdc, 0xb6, 0x7f, 0x9e, 0x80, 0x6c, 0x4b, 0x2e, 0xde, 0x67, 0x51, 0xcf, 0x54, 0xe, 0x63, 0xbc, 0xec, 0xa, 0xd8, 0x3d, 0x79, 0x6, 0xa8, 0x91, 0x37}, - output384: []byte{0x1d, 0x67, 0xe9, 0x94, 0xaf, 0x91, 0x86, 0xa2, 0x1a, 0xbb, 0x67, 0xaa, 0x4c, 0x54, 0x41, 0xfb, 0xd8, 0x6f, 0x7, 0x81, 0x4a, 0xa9, 0xeb, 0x38, 0x50, 0x8f, 0x9, 0x9c, 0x5c, 0xb, 0xbb, 0x41, 0x96, 0xf5, 0x17, 0x3d, 0xe4, 0x8f, 0x19, 0xbb, 0xab, 0x68, 0x42, 0xea, 0x51, 0x96, 0x2d, 0x8c}, - output512: []byte{0x26, 0xd9, 0x3e, 0x60, 0x41, 0x3e, 0x83, 0x23, 0xbc, 0xf6, 0x71, 0x44, 0xe8, 0x46, 0xe1, 0x97, 0x51, 0x10, 0x3c, 0xd1, 0xec, 0x47, 0x49, 0x93, 0x9, 0x25, 0x17, 0xa6, 0x3f, 0x40, 0x10, 0x1b, 0xea, 0x10, 0xc8, 0xd1, 0x20, 0xfa, 0x7, 0x7a, 0xf7, 0x43, 0xee, 0xc1, 0x6c, 0x38, 0x12, 0x70, 0x88, 0x7d, 0xef, 0xe3, 0xf4, 0x1c, 0xa4, 0xa5, 0x1, 0xd8, 0x38, 0x42, 0x94, 0xbc, 0x53, 0x7f}}, - testcase{ - msg: []byte{0x5b, 0x4d, 0x29, 0x85, 0xe6, 0x1a, 0xa7, 0x14, 0x5b, 0x5e, 0x76, 0x4, 0x35, 0xff, 0xd, 0x8e, 0x12, 0xb5, 0x46, 0xea, 0xd8, 0x25, 0x40, 0xf, 0xa6, 0x67, 0x7b, 0x5e, 0x44, 0x43, 0x55, 0x93, 0xa3, 0x8a, 0xe2, 0xfe, 0x15, 0x2d, 0x8b, 0x55, 0x87, 0x9a, 0x6f, 0xb0, 0x5d, 0x72, 0xda, 0x1d, 0xf4, 0xf5, 0xcc, 0xad, 0x61, 0x71, 0x2b, 0x8e, 0x76, 0xbd, 0x69, 0xa9, 0xd3, 0xef, 0x9, 0xda, 0xb, 0x2f, 0xfe, 0xa, 0x0, 0xfb, 0xcf, 0xfc, 0x83, 0x26, 0x3d, 0x48, 0xe3, 0xa2, 0x63, 0xa9, 0x75, 0x82, 0xd2, 0xd, 0x91, 0x95, 0xb2, 0x38, 0x75, 0x17, 0x6f, 0xfb, 0x45, 0xcb, 0x8a, 0x94, 0x2c, 0x48, 0x60, 0xe3, 0xce, 0x6c, 0x26, 0x43, 0x78, 0x26, 0xdd, 0xce, 0x61, 0xd4, 0xda, 0x4f, 0xda, 0x38, 0x78, 0x18, 0x7d, 0x55, 0x1c, 0x3b, 0xaa, 0xb3, 0x7e, 0xd6, 0x6e, 0xb1, 0xd, 0x71, 0xa1, 0x8e, 0xa6, 0xe4, 0x8b, 0x96, 0xfd, 0xe7, 0xcc, 0x1c, 0xec, 0xb8, 0x21, 0xe7, 0xae, 0x5b, 0xe0, 0x7e, 0x34, 0xc6, 0xf5, 0xc2, 0x6, 0x4, 0x42, 0x45, 0x91, 0xa4, 0xea, 0xc3, 0x72, 0x8d, 0xdc, 0x78, 0x6e, 0x23, 0xb0, 0x70, 0x6, 0x44, 0x1b, 0xaa, 0x56, 0xe1, 0x74, 0xab, 0x4c, 0x5c, 0xb4, 0x17, 0x0, 0x8a, 0x3d, 0x66, 0x56, 0xab, 0xd0, 0x7b, 0xb7, 0x17, 0x87, 0xcc, 0x39, 0xf, 0x4e, 0x90, 0x4, 0x47, 0x6d, 0xd, 0xd9, 0xe9, 0xcb, 0x33, 0xda, 0xc6, 0x8a, 0x1c, 0x6c, 0xc, 0xe4, 0x55, 0x14, 0xdb, 0x44, 0x61, 0xf7, 0x99, 0x27, 0x14, 0xb9, 0xdd, 0x28, 0x19, 0x48, 0x56, 0x81, 0x3c, 0x9f, 0x24, 0xc1, 0xdc, 0x4a, 0xcf, 0xfd, 0x0, 0x65, 0xb9, 0xd5, 0xc, 0x26, 0x62, 0xb4, 0x16, 0x33, 0x47, 0x2b, 0x25, 0xc3, 0x58, 0xda, 0xb5, 0x3f, 0x85, 0x19, 0x8d, 0x76, 0xc9, 0x3a, 0xa2, 0xc, 0x74, 0x83, 0xa1, 0xdb, 0x21, 0xc3, 0x73, 0x62, 0x75, 0x38, 0xdb, 0x87, 0x3, 0x5e, 0xed, 0xe, 0x78, 0xba, 0xf5, 0x20, 0x5a, 0x2b, 0xe0, 0xca, 0xb9, 0x25, 0xa0, 0xfb, 0xcf, 0x14, 0x15, 0x43, 0xb0, 0x4f, 0xac, 0x7a, 0xaa, 0xef, 0xc3, 0xa5, 0x3f, 0x64, 0xab, 0x3a, 0x71, 0x0, 0x46, 0x84, 0xa3, 0x50, 0x75, 0x35, 0xd2, 0x53, 0xd, 0x8f, 0xeb, 0xb4, 0xe7, 0x90, 0x9a, 0x37, 0x37, 0xf9, 0xa4, 0x96, 0x47, 0x16, 0x10, 0x8b, 0x19, 0xc4, 0x91, 0x8, 0x9a, 0x1, 0x24, 0x9e, 0x45, 0x71, 0x74, 0x2f, 0xf8, 0x58, 0x72, 0xe9, 0xfc, 0x8e, 0x8e, 0x75, 0x69, 0xac, 0x15, 0x65, 0x5b, 0xa0, 0x84, 0xef, 0x6a, 0xbc, 0x58, 0x2f, 0x6e, 0x91, 0xfe, 0x23, 0x9, 0xd5, 0xe4, 0xe3, 0xfa, 0xdc, 0x55, 0x4d, 0xcd, 0x87, 0xe1, 0x18, 0x26, 0x2d, 0xc4, 0x8, 0x39, 0x8a, 0xf5, 0xdd, 0xad, 0xae, 0xf2, 0xca, 0xfa, 0x99, 0xf6, 0xe0, 0x33, 0xb3, 0xa4, 0x22, 0x52, 0x1f, 0x43, 0xdf, 0x2d, 0x72, 0x6, 0x93, 0x12, 0x4d, 0x6d, 0xa2, 0xba, 0xf5, 0xfe, 0x2b, 0x37, 0xe7, 0x75, 0xae, 0x3a, 0xdc, 0x46, 0x10, 0x80, 0x7c, 0xe, 0x9b, 0x43, 0xab, 0xf8, 0xfa, 0x71, 0xab, 0x97, 0x7c, 0xf9, 0xd3, 0xed, 0xb0, 0x7c, 0x56, 0x44, 0xf8, 0x55, 0x6d, 0x84, 0x9b, 0x2c, 0x40, 0xf5, 0x23, 0xea, 0xe9, 0x27, 0xbc, 0xcc, 0xcf, 0x9f, 0xd7, 0xb7, 0x68, 0x92, 0xba, 0x4f, 0xce, 0x9d, 0xe7, 0x1f, 0x71, 0xfa, 0x70, 0x6, 0xe7, 0x74, 0xf7, 0xee, 0xfc, 0x20, 0x1a, 0x5b, 0xbc, 0x69, 0x40, 0x8, 0xf8, 0x7, 0x6e, 0xde, 0x5b, 0x85, 0xea, 0x3f, 0xff, 0x18, 0x67, 0xc8, 0xe2, 0x15, 0xe1, 0x92, 0xea, 0xa9, 0xcc, 0x88, 0x83, 0xca, 0xad, 0xd6, 0x8b, 0xe5, 0x7d, 0xfa, 0xc9, 0x89, 0xb2, 0x5d, 0x92, 0xab, 0x8d, 0x53, 0x70, 0x94, 0x90, 0xc6, 0x76, 0x6a, 0xe8, 0xc2, 0x17, 0x20, 0xe6, 0xa1, 0x5, 0x88, 0x8c, 0x23, 0x16, 0xbb, 0x30, 0x1d, 0x39, 0x2e, 0x8e, 0xca, 0x46, 0x4c, 0x86, 0x94, 0x30, 0x4, 0x55, 0x57, 0x1f, 0xda, 0xb6, 0xce, 0x25, 0xbf, 0xe3, 0xef, 0xcd, 0xf0, 0x8c, 0x7c, 0xef, 0x99, 0x86, 0x9, 0x26, 0xaa, 0x8c, 0xfc, 0xe6, 0x80, 0x3d, 0xf0, 0xa7, 0xd0, 0xee, 0xa8, 0x83, 0xc2, 0xa5, 0x48, 0x62, 0xe0, 0xb4, 0x1, 0x35, 0xc3, 0xb3, 0xfb, 0x9d, 0xe, 0xb2, 0x18, 0xe5, 0xe1, 0x95, 0x7e, 0x45, 0xfa, 0x64, 0xe2, 0xf7, 0xf8, 0xf2, 0xe2, 0x94, 0xed, 0xf6, 0x9f, 0x26, 0xa8, 0xd6, 0x53, 0x72, 0xa2, 0xcd, 0xbd, 0x79, 0x2b, 0x75, 0x14, 0xef, 0xfe, 0xe4, 0xa3, 0x8f, 0xf2, 0xa7, 0x87, 0x74, 0xff, 0x84, 0x70, 0xff, 0x3a, 0xf1, 0xa1, 0xb2, 0x1d, 0x5, 0x4b, 0x97, 0x8a, 0x3f, 0x8e, 0x16, 0xd5, 0xd7, 0x61, 0x99, 0xdd, 0xde, 0xa8, 0x7f, 0xda, 0x4c, 0x29, 0xb, 0x67, 0x89, 0x6, 0x73, 0x62, 0xfa, 0x6e, 0x6c, 0x37, 0xce, 0x66, 0x60, 0xed, 0x90, 0x5e, 0xbd, 0x31, 0x61, 0xb9, 0xd0, 0x5f, 0xce, 0xc8, 0xe1, 0x32, 0x95, 0x68, 0x85, 0x51, 0x8e, 0xba, 0xbf, 0x85, 0x25, 0xbb, 0x3c, 0x35, 0x63, 0x1, 0x4, 0x81, 0x51, 0xbf, 0x6d, 0xaa, 0x28, 0xef, 0x6f, 0x12, 0x5f, 0x16, 0x5a, 0x79, 0xb8, 0xee, 0x31, 0x4a, 0x7f, 0xe2, 0xf, 0x25, 0xa7, 0xe2, 0xac, 0x8c, 0xa3, 0x65, 0x50, 0x96, 0xb1, 0xe7, 0x7c, 0x10, 0x5, 0x58, 0x2d, 0x82, 0xf2, 0x8f, 0xfa, 0x10, 0x8b, 0x38, 0xd1, 0xc2, 0x51, 0xc, 0x40, 0xf0, 0x6a, 0x5f, 0x90, 0x19, 0x5b, 0x8b, 0x23, 0x67, 0x31, 0x35, 0x23, 0x98, 0x1f, 0x2c, 0x7a, 0xf6, 0x3f, 0x53, 0x6d, 0xd3, 0xdc, 0x19, 0x1a, 0x5f, 0xb0, 0x98, 0x4a, 0x7a, 0xd0, 0xcf, 0x99, 0x4d, 0xbf, 0xb8, 0xa5, 0xc8, 0x99, 0x1d, 0xca, 0x74, 0xbc, 0x18, 0x48, 0xc6, 0xcb, 0xca, 0xe6, 0xea, 0xad, 0xe0, 0xab, 0xc4, 0xa4, 0x5e, 0xf0, 0x35, 0x75, 0xe8, 0x2a, 0x2c, 0x3e, 0xb, 0xf5, 0xef, 0xc1, 0x9f, 0xc9, 0xf2, 0xeb, 0x36, 0xc0, 0x7e, 0x42, 0x69, 0x30, 0x4, 0x39, 0x74, 0x59, 0xd5, 0x55, 0xf0, 0xd6, 0xf2, 0x67, 0x50, 0x4e, 0xb3, 0x5a, 0xb7, 0x98, 0x85, 0x63, 0x0, 0xd9, 0x60, 0x25, 0xa1, 0xa0, 0x17, 0x43, 0x3c, 0xbf, 0x49, 0x2f, 0x7f, 0x30, 0x28, 0x38, 0x1c, 0xfd, 0x13, 0x75, 0xc3, 0xd2, 0xc5, 0xb7, 0x1c, 0xe2, 0x85, 0xfb, 0xd1, 0xcb, 0x22, 0x98, 0x7f, 0x5a, 0x21, 0x46, 0x4, 0x3d, 0x2c, 0x1f, 0x26, 0xe6, 0xe9, 0x37, 0x84, 0x99, 0x35, 0xb6, 0xd6, 0xcd, 0x89, 0x60, 0x18, 0x94, 0xaf, 0x6a, 0xa, 0x7c, 0x94, 0xfc, 0xc1, 0x0, 0xe8, 0xf1, 0x67, 0xa7, 0x54, 0x7d, 0x7c, 0x72, 0xa3, 0xb4, 0x25, 0xfd, 0xc0, 0xea, 0xff, 0x68, 0xcd, 0x36, 0x74, 0xf9, 0xc0, 0x7b, 0x45, 0x39, 0xbe, 0xe7, 0xe8, 0x85, 0x74, 0x90, 0x8, 0xcf, 0x53, 0x8d, 0xfc, 0x36, 0x57, 0xf3, 0x70, 0x8d, 0x77, 0x8a, 0x8f, 0x39, 0xe5, 0xd7, 0xb1, 0x3a, 0xd8, 0xec, 0xf8, 0x4d, 0xd4, 0xc0, 0xac, 0xb6, 0x5a, 0x41, 0x34, 0xc7, 0x1d, 0xd5, 0x90, 0xaa, 0xd9, 0x7d, 0x6e, 0xef, 0xd0, 0x15, 0xfd, 0xe1, 0xeb, 0x53, 0x15, 0x3, 0x8b, 0x48, 0x36, 0x28, 0xcc, 0xae, 0xbd, 0x9, 0x5b, 0x1b, 0x42, 0x3, 0xb6, 0x60, 0x95, 0x73, 0x1e, 0x62, 0x92, 0xbd, 0x80, 0x6c, 0x6d, 0xde, 0x41, 0x7c, 0xe9, 0xb5, 0x64, 0xe2, 0xa7, 0xc9, 0xf6, 0x98, 0x93, 0xf0, 0xb0, 0x1f, 0xa8, 0xaa, 0xf3, 0x71, 0x22, 0x58, 0xa3, 0xbb, 0x7, 0xc, 0xc5, 0x2, 0x6, 0x3b, 0x9, 0xc3, 0x3, 0xee, 0xa0, 0xa6, 0x46, 0xa2, 0x4, 0xe1, 0xec, 0xb, 0x31, 0xab, 0xd6, 0xed, 0x56, 0xf4, 0xfe, 0x3c, 0xd7, 0xf2, 0x69, 0x4e, 0xba, 0x27, 0xca, 0xa4, 0xf5, 0x81, 0xf3, 0x12, 0x54, 0xc4, 0x20, 0xb9, 0xa5, 0x1b, 0x43, 0x39, 0xfd, 0xc8, 0x13, 0xa4, 0x46, 0xd2, 0x9c, 0x61, 0xcf, 0x81, 0x74, 0x67, 0xf4, 0xf, 0x6f, 0x55, 0xeb, 0x7, 0xc0, 0xc7, 0xa8, 0x61, 0x82, 0xa1, 0x47, 0x2b, 0xb, 0xdb, 0x9b, 0xeb, 0x87, 0x4b, 0x25, 0x72, 0xa2, 0xa1, 0xea, 0x65, 0x24, 0x2a, 0xc5, 0xee, 0x41, 0x2, 0x5d, 0xbf, 0xd, 0x4b, 0xc3, 0x38, 0xf0, 0x91, 0x46, 0xce, 0x59, 0xed, 0x65, 0x6f, 0x93, 0xc8, 0xd8, 0x7b, 0xe9, 0xf0, 0xd7, 0x39, 0x9, 0x29, 0x1a, 0xd1, 0x33, 0x61, 0x3, 0xe0, 0x5f, 0xde, 0x9e, 0x9b, 0xcc, 0x77, 0xed, 0x75, 0x22, 0xa, 0x2b, 0x63, 0x39, 0xff, 0x6c, 0xd8, 0xa3, 0x88, 0x15, 0x3f, 0x55, 0xc9, 0xca, 0x3, 0xbe, 0x9d, 0xb5, 0xda, 0x24, 0x2b, 0x9e, 0x9f, 0x29, 0x9e, 0x23, 0x21, 0x7b, 0xc9, 0x37, 0xad, 0xc6, 0xfb, 0xba, 0x90, 0x98, 0xa, 0x29, 0xb6, 0x19, 0x98, 0x83, 0x60, 0x30, 0x1f, 0x7d, 0x8d, 0xdc, 0xf7, 0xb8, 0xfa, 0xd0, 0x65, 0x1f, 0x31, 0x23, 0x1b, 0x81, 0x66, 0x20, 0xa2, 0x95, 0xd1, 0xd6, 0xc6, 0xc9, 0x6, 0x43, 0xe2, 0xf2, 0x59, 0x3a, 0xd, 0xcf, 0xb7, 0x0, 0xc0, 0x17, 0xf0, 0xa8, 0x8e, 0x3, 0xd3, 0xd6, 0x87, 0x1e, 0xbe, 0x42, 0xb, 0x7f, 0x43, 0x5a, 0x58, 0x40, 0x7c, 0x66, 0x7e, 0xa6, 0x84, 0xd5, 0x90, 0x6c, 0x91, 0xd6, 0x99, 0xd0, 0xf3, 0x86, 0x82, 0x94, 0x43, 0x2f, 0xd7, 0xfe, 0xcb, 0xec, 0x52, 0x7d, 0x21, 0x3f, 0xf7, 0xd9, 0x40, 0x12, 0xa5, 0x2c, 0x9f, 0x81, 0x8c, 0xc1, 0x9b, 0x3f, 0xf9, 0xf3, 0xd8, 0x34, 0xdf, 0xba, 0xb4, 0xb1, 0xa6, 0xb0, 0x69, 0x37, 0x5d, 0x5c, 0x3c, 0xa6, 0xc1, 0x70, 0x4a, 0xc5, 0xcb, 0x39, 0x1a, 0x3f, 0x4d, 0xa4, 0xee, 0x35, 0x88, 0x55, 0x16, 0x33, 0xb6, 0xb0, 0x14, 0x76, 0xf9, 0xb1, 0x3f, 0x1b, 0x36, 0xba, 0xaa, 0x3b, 0xb6, 0xb5, 0xef, 0xea, 0xd, 0x9d, 0x15, 0xe, 0x33, 0x25, 0x35, 0x71, 0x51, 0x7, 0x11, 0x25, 0x84, 0x70, 0x38, 0xdb, 0x3e, 0xa6, 0xec, 0xa1, 0x14, 0xac, 0x55, 0xf5, 0xdb, 0x1f, 0xce, 0x80, 0x89, 0xe1, 0x8d, 0x47, 0x8d, 0x7a, 0xe8, 0x2d, 0x17, 0x35, 0x99, 0xa0, 0x2d, 0xd6, 0x70, 0xb4, 0x67, 0x94, 0xe9, 0xe2, 0xce, 0x91, 0xba, 0xf9, 0xd, 0xba, 0x5a, 0xfe, 0xfc, 0xd1, 0xba, 0xbb, 0xb8, 0xea, 0x21, 0x6, 0x40, 0xe1, 0x4e, 0xa8, 0xe0, 0x85, 0xa4, 0x4, 0xdb, 0xd9, 0xfe, 0x15, 0xdc, 0x3c, 0xd0, 0xbc, 0x3a, 0x59, 0xbf, 0x99, 0x7b, 0xc6, 0xa1, 0xd, 0xd4, 0xec, 0x89, 0x70, 0xfb, 0x39, 0x65, 0x5, 0xfb, 0xc1, 0x7f, 0xa5, 0xd6, 0x1d, 0x90, 0xc9, 0x89, 0xb4, 0x7f, 0xb3, 0x67, 0xf7, 0xb2, 0xeb, 0x17, 0x70, 0x2f, 0xd0, 0x39, 0xfe, 0x16, 0xec, 0x87, 0x45, 0x91, 0x20, 0x3, 0xaa, 0xae, 0xda, 0x9, 0xcb, 0x64, 0x44, 0x49, 0xdd, 0x85, 0xef, 0x1, 0x4, 0x88, 0xfb, 0xf, 0xcd, 0xe2, 0xd8, 0x4, 0xa0, 0xab, 0xb5, 0x9f, 0x2c, 0x4f, 0x59, 0x4b, 0x34, 0x66, 0xb6, 0x26, 0x20, 0x57, 0x3, 0x50, 0x77, 0x1, 0xbd, 0x4f, 0xb2, 0x5a, 0xf8, 0x33, 0x43, 0xaf, 0xf8, 0xa0, 0x9a, 0x0, 0x4a, 0x55, 0x9f, 0x75, 0xc, 0xdf, 0x6b, 0x2a, 0xdb, 0x2c, 0xab, 0x16, 0xe2, 0xae, 0xd2, 0xbd, 0xc0, 0x48, 0x1a, 0xdd, 0xe1, 0xa8, 0xa7, 0x95, 0x13, 0xe9, 0x4e, 0x6f, 0x95, 0x9f, 0x4e, 0x42, 0x65, 0xcf, 0x2a, 0xba, 0xdb, 0xbf, 0x17, 0x3a, 0x89, 0x7c, 0x50, 0xfd, 0xc2, 0xa2, 0x19, 0xd2, 0x60, 0xaf, 0xd0, 0xc3, 0x47, 0x51, 0x48, 0xc6, 0x45, 0xe6, 0x5e, 0x34, 0x3d, 0x40, 0x85, 0xb7, 0x6c, 0xf1, 0x4e, 0xcc, 0x83, 0x9e, 0x4f, 0x7c, 0x72, 0x51, 0x30, 0x77, 0x75, 0x35, 0xac, 0xb1, 0x54, 0xf7, 0x4b, 0x67, 0x38, 0xfd, 0xc8, 0x23, 0x27, 0xf0, 0xbe, 0x57, 0x94, 0xd6, 0x30, 0xcc, 0x81, 0xb8, 0x7d, 0x5a, 0x19, 0x63, 0x74, 0x68, 0xb1, 0x91, 0xcc, 0x2a, 0xe6, 0xb6, 0x7f, 0xd5, 0xc3, 0x99, 0xf, 0xae, 0xed, 0x6a, 0x5, 0xf4, 0x82, 0xe5, 0xda, 0xc9, 0x1d, 0xae, 0xde, 0xcb, 0xa3, 0x79, 0xfa, 0x68, 0xbf, 0xd8, 0x5a, 0x21, 0x82, 0x75, 0xf4, 0x4a, 0x80, 0x11, 0xa7, 0x4d, 0xe3, 0x3, 0x0, 0x7e, 0x9f, 0x5e, 0x95, 0x5d, 0xf0, 0x52, 0xd6, 0x74, 0x65, 0xd4, 0xa1, 0xc1, 0x79, 0x1b, 0x88, 0xc7, 0x1d, 0xbb, 0xb6, 0xd1, 0x4f, 0x3c, 0xfd, 0x49, 0xf4, 0x14, 0xad, 0xc2, 0x6c, 0xf8, 0xfb, 0xb7, 0x97, 0xc7, 0xf4, 0xd6, 0x5a, 0xb1, 0xb2, 0x60, 0xc4, 0x3d, 0xd, 0xa0, 0x63, 0x83, 0x78, 0x77, 0x88, 0x3e, 0x87, 0x85, 0x9f, 0x99, 0xa3, 0x6f, 0xf2, 0x18, 0x52, 0x89, 0xfb, 0x3b, 0x26, 0x5c, 0xa1, 0xd0, 0x17, 0xc7, 0x31, 0xd6, 0xfa, 0x64, 0x37, 0xf9, 0x54, 0xe5, 0x5c, 0x4e, 0x7b, 0x90, 0x15, 0x51, 0x56, 0x95, 0x5d, 0x24, 0x95, 0xc3, 0x30, 0x5e, 0xf1, 0x96, 0xf9, 0xbd, 0x62, 0x20, 0x4b, 0xf1, 0x8d, 0xc1, 0xf3, 0xe8, 0xb6, 0xbe, 0x2c, 0x38, 0x95, 0x6b, 0x16, 0x9b, 0x75}, - output224: []byte{0xc, 0x79, 0xf3, 0xd, 0xa2, 0xa4, 0xab, 0x99, 0x68, 0xd5, 0xa7, 0xd9, 0x96, 0x9d, 0x6c, 0x96, 0x9d, 0x68, 0x91, 0x8, 0xeb, 0xff, 0xee, 0x3e, 0xa4, 0xe1, 0x8e, 0x1d}, - output256: []byte{0x83, 0xf1, 0x11, 0x1a, 0x37, 0xec, 0x61, 0xe9, 0xd5, 0x23, 0x10, 0x24, 0xb8, 0x1e, 0x88, 0x83, 0xf7, 0xbd, 0x11, 0xbb, 0xa9, 0xa5, 0xda, 0x46, 0xfa, 0xf, 0x6f, 0x19, 0xb3, 0x81, 0xb2, 0xa7}, - output384: []byte{0xa, 0x82, 0x2a, 0xe2, 0x4c, 0x6d, 0xd0, 0x72, 0x95, 0x7a, 0x8c, 0x74, 0x9, 0xb8, 0xd8, 0xbb, 0x40, 0x9, 0x7d, 0x8c, 0xe8, 0x33, 0xc9, 0x28, 0x20, 0x9b, 0xb7, 0x3c, 0xd3, 0xfa, 0x91, 0x73, 0x19, 0xeb, 0x93, 0xae, 0x77, 0xda, 0x8b, 0xa5, 0x37, 0x3c, 0x5e, 0x5f, 0x94, 0xa9, 0x54, 0x8}, - output512: []byte{0x4a, 0xb1, 0x4, 0x33, 0xd2, 0xaf, 0xe4, 0x54, 0x3d, 0xbb, 0x59, 0x11, 0x14, 0x14, 0x9b, 0x28, 0x3d, 0xf0, 0x3c, 0x8d, 0x18, 0x57, 0x52, 0x24, 0xe1, 0xb, 0x5d, 0xbf, 0xa7, 0x15, 0xe5, 0xde, 0x7e, 0xc2, 0x7b, 0xd5, 0x8, 0xd1, 0xb8, 0x92, 0xce, 0x66, 0x8f, 0x36, 0x93, 0xd8, 0x9f, 0x9e, 0x35, 0xc3, 0xdd, 0x2a, 0xb, 0xad, 0xcc, 0x1c, 0x7b, 0xbd, 0xe6, 0x2, 0xeb, 0xa4, 0x73, 0x3c}}, - testcase{ - msg: []byte{0x52, 0x3d, 0xe8, 0xb1, 0xf4, 0xcb, 0xb6, 0x5e, 0x81, 0xff, 0xb, 0x6c, 0xcd, 0x6e, 0xb8, 0xef, 0xa, 0xf, 0xa, 0x69, 0x1a, 0xca, 0xf4, 0xa7, 0x7f, 0x25, 0xac, 0xd2, 0xd6, 0x6a, 0xd4, 0xb3, 0xef, 0xd2, 0x5b, 0xe7, 0x3, 0x8, 0x85, 0x3c, 0x9, 0x44, 0x12, 0xa5, 0x18, 0xa3, 0x20, 0x20, 0xe3, 0x2, 0xa, 0x9f, 0x6a, 0xb3, 0x2f, 0xc, 0xd6, 0xe, 0xc0, 0xd7, 0xa1, 0x94, 0x91, 0x7d, 0x6c, 0x45, 0x7b, 0x16, 0x8a, 0x54, 0xa4, 0xb4, 0x6f, 0x7b, 0xd, 0xc, 0x71, 0xbd, 0x61, 0xcd, 0x20, 0x2f, 0x4c, 0x71, 0x87, 0x76, 0xa7, 0x1, 0xe0, 0x77, 0xb, 0xe, 0xfa, 0x5, 0x41, 0x87, 0x70, 0xf9, 0x8e, 0x4e, 0x79, 0xcd, 0x6, 0x63, 0x66, 0xfb, 0x33, 0x0, 0xe8, 0xbe, 0x35, 0x9a, 0x98, 0xb8, 0x2b, 0x76, 0x4b, 0xc2, 0xfb, 0xbf, 0x59, 0xc7, 0xe8, 0xf9, 0x4a, 0x15, 0x7b, 0x1, 0xc6, 0xc7, 0x57, 0x7b, 0x14, 0x28, 0x13, 0x8c, 0xd4, 0x22, 0xbc, 0x47, 0x33, 0xf, 0x8e, 0xd9, 0x9f, 0x4c, 0xa, 0xab, 0xd, 0x98, 0x42, 0x87, 0x44, 0x55, 0x39, 0x83, 0x93, 0x89, 0xee, 0x8, 0xd6, 0x34, 0x51, 0x8, 0xaf, 0x26, 0xad, 0xed, 0xe, 0xc1, 0xd7, 0xbe, 0x77, 0x4c, 0xfb, 0x8c, 0x52, 0x5, 0xdf, 0xe0, 0x7c, 0xf6, 0xca, 0xf8, 0xc1, 0xaf, 0xe3, 0x7c, 0x7a, 0x2e, 0x4f, 0xe6, 0x1, 0x3b, 0x93, 0xeb, 0x24, 0x63, 0xde, 0x4e, 0x9, 0x71, 0xc7, 0x17, 0x8d, 0x6a, 0x76, 0xb1, 0x6a, 0xe, 0x89, 0x60, 0xc9, 0x84, 0xce, 0x8b, 0xbe, 0x71, 0xb3, 0xb4, 0x66, 0xed, 0xf0, 0x44, 0x5b, 0x83, 0x5f, 0x9, 0x41, 0x4d, 0x1, 0xf1, 0x4c, 0x7b, 0x61, 0x67, 0xff, 0x78, 0xff, 0x11, 0x81, 0x27, 0xbb, 0xd5, 0xf8, 0x12, 0xc2, 0x7f, 0xac, 0xd5, 0x7b, 0x3b, 0x12, 0xe, 0x2b, 0xcf, 0xe8, 0x73, 0x15, 0xc7, 0xa9, 0x2b, 0x82, 0xef, 0x5d, 0x50, 0xca, 0x14, 0xa7, 0x17, 0x4d, 0x1b, 0xea, 0x7e, 0x5, 0x65, 0x23, 0xe0, 0x55, 0xa6, 0xae, 0x42, 0xea, 0x37, 0x65, 0x9, 0x4e, 0x55, 0x44, 0xe5, 0xed, 0x0, 0x3c, 0x98, 0x9c, 0x2f, 0x98, 0xf3, 0x8a, 0x17, 0xe3, 0xdd, 0xa7, 0x4d, 0xba, 0xf9, 0xc6, 0x69, 0xa3, 0x19, 0x63, 0x8a, 0x26, 0x98, 0xb0, 0xe4, 0xa6, 0x11, 0x48, 0xd, 0x8a, 0xd3, 0xcf, 0x1, 0x67, 0x92, 0xec, 0xd1, 0x3, 0x49, 0x25, 0xf4, 0x2b, 0x98, 0x11, 0xa7, 0x21, 0x4d, 0x62, 0x3d, 0x4, 0x7a, 0xbc, 0xa3, 0x19, 0x97, 0xdd, 0xeb, 0x3, 0x27, 0x5f, 0x80, 0xdd, 0x21, 0xf4, 0xd, 0xdc, 0x80, 0x61, 0x6e, 0x7a, 0xd3, 0xd4, 0x81, 0xe8, 0xeb, 0xc0, 0xa1, 0xa6, 0xa3, 0x98, 0xe1, 0x6a, 0x78, 0x36, 0x92, 0x15, 0x54, 0x1e, 0xd1, 0xb, 0x75, 0x67, 0x1a, 0xde, 0xb1, 0xaa, 0xe6, 0xe1, 0x11, 0x42, 0xa1, 0xcf, 0x66, 0x5f, 0xc1, 0xb7, 0x33, 0x2d, 0xfb, 0xb0, 0xe1, 0xc, 0x21, 0xa2, 0xb4, 0x8f, 0x78, 0xe5, 0x73, 0x19, 0xac, 0x9c, 0x58, 0xdf, 0xa8, 0xb1, 0xc2, 0x54, 0x8e, 0x29, 0x79, 0xef, 0x1a, 0xcc, 0xfe, 0xb2, 0x15, 0xaf, 0xcd, 0x6c, 0x2c, 0x1b, 0x46, 0xfe, 0x97, 0xdd, 0x49, 0x17, 0x58, 0x37, 0x83, 0x30, 0xef, 0xfc, 0x72, 0x83, 0x66, 0x1d, 0x2c, 0xb8, 0x4f, 0xa0, 0x52, 0x81, 0xe9, 0xe5, 0x17, 0x40, 0x85, 0x8, 0xd2, 0x4d, 0x4, 0x2e, 0x7b, 0x9b, 0xcd, 0x34, 0xdb, 0x87, 0xce, 0x97, 0x2e, 0x4c, 0xbc, 0xdb, 0x98, 0x61, 0x5f, 0xb9, 0x30, 0x93, 0x36, 0x9d, 0xfe, 0xdc, 0x78, 0x2f, 0x44, 0xbc, 0xd0, 0x3e, 0x81, 0xcf, 0x93, 0x5, 0x13, 0x18, 0xb2, 0x40, 0x1f, 0xf2, 0x9f, 0x75, 0x3a, 0x26, 0x4b, 0xda, 0x65, 0xaf, 0x19, 0x9e, 0x3f, 0xcb, 0xb8, 0xb5, 0xd3, 0x9c, 0x83, 0x8a, 0x67, 0xd6, 0xc7, 0xa3, 0xdb, 0x4, 0x6d, 0xc5, 0x6c, 0x32, 0x3d, 0xdb, 0xb5, 0x34, 0xc, 0xbc, 0x22, 0x9e, 0x47, 0xcf, 0xf8, 0xc9, 0xd2, 0x9b, 0x7a, 0x49, 0xac, 0xe, 0xc8, 0xc1, 0x44, 0xa, 0xe4, 0x98, 0xc7, 0xd1, 0x50, 0xef, 0x91, 0xc2, 0x9b, 0xea, 0x7d, 0xf3, 0xef, 0xcc, 0x28, 0x71, 0xa1, 0x3a, 0x1d, 0x72, 0xd1, 0x39, 0xcb, 0x46, 0x3, 0xd9, 0xff, 0xfe, 0x85, 0xf6, 0xdd, 0xd5, 0x44, 0x85, 0xe, 0xf6, 0x3c, 0x39, 0x44, 0xfb, 0x35, 0xdb, 0xc0, 0xd, 0x43, 0x8, 0xce, 0xaa, 0x63, 0x94, 0xb6, 0xe2, 0x3f, 0x65, 0xd, 0x32, 0x3f, 0x8f, 0x7e, 0xf5, 0xd, 0xdb, 0x68, 0xf1, 0x48, 0x6e, 0xab, 0xf9, 0x89, 0xbf, 0x44, 0x45, 0x1f, 0x62, 0xe, 0xc9, 0x48, 0x5c, 0xb, 0x52, 0xd1, 0x41, 0x5d, 0x3c, 0x90, 0x9a, 0x2c, 0xfb, 0xe9, 0xd7, 0x7d, 0xb1, 0x9d, 0x6, 0x9d, 0x33, 0xba, 0xee, 0x4d, 0x77, 0x29, 0x2e, 0x63, 0xfc, 0xbf, 0x65, 0xc1, 0xeb, 0xa2, 0x4b, 0xff, 0xdd, 0xef, 0xe9, 0x52, 0x11, 0xef, 0xa, 0xaf, 0x8a, 0xbf, 0xda, 0x9f, 0x94, 0x44, 0x5e, 0x58, 0x29, 0x76, 0xf9, 0x86, 0xf5, 0x38, 0x2c, 0xb6, 0x69, 0x50, 0x6a, 0xf2, 0xb4, 0xa5, 0xa0, 0xc4, 0x30, 0x0, 0xa3, 0xc7, 0x2c, 0x5c, 0xa4, 0xaa, 0xcd, 0xc9, 0xd3, 0xd3, 0x9f, 0xc5, 0xc4, 0x92, 0xa3, 0x93, 0xb6, 0xc3, 0x41, 0xb8, 0x6d, 0xac, 0xbb, 0xf6, 0xba, 0x8b, 0x46, 0x51, 0x0, 0xcc, 0x68, 0x3e, 0xdb, 0x2d, 0x9b, 0x9f, 0x83, 0xed, 0xf9, 0xc6, 0xa3, 0x26, 0x45, 0xf5, 0x1c, 0xc7, 0x9a, 0xdc, 0x22, 0xa5, 0x2a, 0x0, 0x7b, 0xaa, 0xca, 0x61, 0x8b, 0xe3, 0x5e, 0x35, 0x6d, 0x1f, 0xd1, 0xcf, 0xbd, 0xa7, 0x3f, 0x1e, 0xd0, 0x92, 0x53, 0x3, 0x9d, 0xef, 0x60, 0x94, 0x50, 0xfd, 0x2d, 0x59, 0x43, 0xb9, 0xcd, 0x49, 0xcb, 0xd5, 0x2a, 0x31, 0x8e, 0xe3, 0x51, 0xd, 0x7c, 0xf3, 0xfd, 0x8f, 0xb3, 0x88, 0xac, 0x6c, 0xb9, 0xc6, 0xee, 0xfe, 0xf3, 0xd3, 0xca, 0xd8, 0x50, 0x1b, 0x91, 0xcc, 0x4, 0xa8, 0x88, 0xd3, 0x3e, 0x16, 0xd6, 0xa4, 0xc9, 0x66, 0x6f, 0x5f, 0x5f, 0x3b, 0x25, 0x71, 0x93, 0xf2, 0xb4, 0x6d, 0xed, 0xde, 0x11, 0x84, 0x29, 0x9, 0xd8, 0xc4, 0x8a, 0xde, 0x57, 0x77, 0x5b, 0xb, 0x27, 0x2e, 0x2d, 0xc9, 0xce, 0xf1, 0xa0, 0x83, 0xeb, 0x2c, 0xe5, 0x8f, 0x4d, 0x1f, 0x21, 0x19, 0x22, 0xfd, 0x6a, 0xde, 0xd1, 0xb8, 0x2f, 0xe6, 0xf5, 0xb1, 0x12, 0x51, 0xcd, 0x39, 0x6e, 0x5a, 0x36, 0x66, 0xed, 0x96, 0x26, 0x3, 0x6e, 0x4e, 0x35, 0x62, 0x31, 0xc1, 0x46, 0xbb, 0xa0, 0xa9, 0x1a, 0xfd, 0x36, 0x48, 0xeb, 0x7b, 0xfe, 0xb, 0x9c, 0x14, 0xf1, 0x5a, 0xf2, 0xf9, 0x23, 0x9, 0x82, 0x6f, 0x46, 0x89, 0x45, 0xca, 0xd0, 0xac, 0x42, 0x2d, 0xe3, 0xd6, 0xa7, 0x73, 0xb7, 0x61, 0x78, 0x42, 0x21, 0x7, 0xce, 0x2, 0x70, 0xe7, 0xf5, 0x80, 0xb5, 0xcc, 0xeb, 0xa8, 0x2c, 0xa0, 0x18, 0x4a, 0xaf, 0xa8, 0x34, 0x11, 0x41, 0xe6, 0x5e, 0x39, 0x85, 0x98, 0x85, 0x76, 0x8f, 0xbc, 0x5c, 0xe6, 0x3b, 0x96, 0x5a, 0x6, 0x4, 0xb6, 0x59, 0xe7, 0x1d, 0x9d, 0xa2, 0xc7, 0xa4, 0x36, 0x46, 0x8, 0x8d, 0x80, 0x71, 0xd7, 0x69, 0x26, 0x16, 0x3a, 0xaf, 0xc6, 0x9e, 0x25, 0x35, 0x5b, 0xb0, 0xa2, 0x22, 0xb7, 0xb2, 0xda, 0x9f, 0xa, 0x20, 0xc0, 0x21, 0xad, 0xc4, 0x62, 0xe9, 0x5, 0xa9, 0xc3, 0xbf, 0x31, 0xc1, 0x6d, 0x87, 0xfb, 0xec, 0x3f, 0x1, 0x4f, 0x39, 0x57, 0xa7, 0x20, 0xf1, 0x43, 0x2e, 0x17, 0x41, 0x55, 0x30, 0x92, 0x5, 0x2f, 0xb5, 0x8a, 0x19, 0x86, 0x40, 0x47, 0x9a, 0xbc, 0xaa, 0x51, 0xb1, 0x4, 0xcc, 0x93, 0xe2, 0x63, 0x6e, 0x14, 0x60, 0x64, 0x3e, 0xa8, 0x12, 0xbd, 0x44, 0xe8, 0x19, 0xc2, 0x16, 0x6e, 0xb6, 0xb3, 0x49, 0xba, 0x5b, 0xde, 0xba, 0xd5, 0x90, 0x78, 0x91, 0xb, 0x5c, 0x22, 0xa5, 0x6f, 0x0, 0x4b, 0x8d, 0x9e, 0x4b, 0x12, 0x24, 0xd8, 0xd2, 0x4, 0xb4, 0x8a, 0xbe, 0x73, 0x55, 0x54, 0x8a, 0x40, 0x27, 0x36, 0xc5, 0xcb, 0x11, 0xf, 0x3a, 0x14, 0x76, 0xed, 0x63, 0x1f, 0xf1, 0x68, 0xf4, 0xf3, 0xef, 0xd8, 0x9b, 0x38, 0xde, 0x47, 0x51, 0x53, 0x65, 0x48, 0x64, 0x75, 0x23, 0xd3, 0x34, 0xfa, 0xd7, 0xcc, 0x2d, 0x14, 0x29, 0x73, 0xf2, 0xdb, 0x3c, 0x1f, 0xe0, 0x8f, 0xc5, 0xcf, 0x83, 0xf9, 0xf2, 0xbd, 0x2d, 0xaa, 0x52, 0x4b, 0x37, 0x86, 0x48, 0x16, 0xaf, 0x29, 0xee, 0x5, 0x95, 0x1f, 0xa0, 0x9d, 0x1c, 0x51, 0xd9, 0xd1, 0x4e, 0xe4, 0xf7, 0x2f, 0xd7, 0xbb, 0xf1, 0x8b, 0x1a, 0x72, 0x4f, 0xf5, 0xa0, 0x95, 0x8a, 0x6, 0x39, 0x47, 0xc4, 0x30, 0x14, 0x2a, 0xd2, 0x35, 0x6e, 0x44, 0x0, 0xaa, 0xec, 0xa4, 0x42, 0xe1, 0x63, 0x37, 0x2a, 0x8f, 0x1c, 0xd3, 0x6e, 0x2d, 0xb9, 0x88, 0xe7, 0x78, 0x11, 0x65, 0xe5, 0xd4, 0xe7, 0x7, 0x4a, 0xce, 0x40, 0x85, 0x8e, 0x83, 0x70, 0xe8, 0x83, 0x69, 0x4a, 0xf0, 0x99, 0x77, 0x70, 0x43, 0x47, 0xfb, 0x73, 0x5c, 0x87, 0x17, 0xc4, 0x2b, 0xc4, 0xee, 0xeb, 0x2a, 0xaa, 0x50, 0xdf, 0xe6, 0x37, 0xc6, 0x40, 0x90, 0x9c, 0xe3, 0x79, 0xbf, 0xb9, 0xe2, 0x60, 0x8f, 0x88, 0x75, 0x13, 0x77, 0x3, 0x8d, 0x16, 0x69, 0xf2, 0x48, 0x17, 0x8a, 0xd5, 0x80, 0xa9, 0x8, 0xd7, 0xa1, 0xb8, 0xdc, 0xc7, 0xe5, 0x3e, 0x1, 0x80, 0x1f, 0x1e, 0x48, 0x5b, 0x58, 0x93, 0xf1, 0x3, 0xf0, 0x3e, 0xf, 0x53, 0xb2, 0xb1, 0x44, 0xb, 0xe9, 0x56, 0x44, 0xd8, 0x5a, 0xa7, 0xf6, 0xeb, 0x7e, 0xdf, 0xbb, 0x46, 0x65, 0x21, 0x96, 0x69, 0x5e, 0xa2, 0x3c, 0x8, 0x57, 0x33, 0x97, 0xb1, 0x11, 0xff, 0x90, 0x90, 0x25, 0xe2, 0xc, 0x52, 0x1, 0x29, 0x3b, 0x4d, 0x22, 0x3b, 0xf7, 0xaa, 0x1, 0xde, 0x7c, 0xb2, 0x8b, 0x94, 0x71, 0x43, 0x70, 0x43, 0x4b, 0x95, 0x88, 0x9, 0x7e, 0x24, 0x1, 0xb6, 0x2c, 0x7a, 0xd, 0xef, 0x1f, 0xbf, 0x89, 0x80, 0x9e, 0x81, 0x7, 0x49, 0xfd, 0x3c, 0xe9, 0xec, 0x3c, 0x7, 0xce, 0x4b, 0xf4, 0xc4, 0x3d, 0xc9, 0x66, 0x42, 0x9b, 0x2b, 0xeb, 0x4d, 0x71, 0x1f, 0xc6, 0xc4, 0x48, 0xa1, 0x20, 0x97, 0xb3, 0x6f, 0x1e, 0x68, 0x17, 0xea, 0xf4, 0x93, 0x7a, 0x98, 0x3f, 0x85, 0xd9, 0xcf, 0x3e, 0x62, 0xcc, 0x1b, 0x2a, 0xc6, 0xae, 0x1e, 0xc9, 0xea, 0xa8, 0xcd, 0x8e, 0xe2, 0xc3, 0x32, 0x22, 0x39, 0xcf, 0xe5, 0xdb, 0x3d, 0x4e, 0x87, 0x86, 0x28, 0x2e, 0x63, 0xa, 0x7d, 0x25, 0x9c, 0x2f, 0xef, 0xec, 0xa0, 0x30, 0x31, 0xc9, 0x60, 0xa6, 0x6a, 0x71, 0xe4, 0x36, 0xa3, 0xed, 0x6f, 0x2f, 0x3c, 0xfa, 0xb4, 0xbd, 0x77, 0xc6, 0x60, 0xd1, 0x42, 0x5, 0xab, 0xf6, 0x6, 0xfe, 0x56, 0x1a, 0x34, 0x6f, 0x7d, 0x84, 0x9b, 0x69, 0x47, 0x5a, 0xc9, 0xf6, 0x82, 0x2d, 0x80, 0xb9, 0xa2, 0xe5, 0x6d, 0x5d, 0x49, 0x5e, 0x4b, 0x30, 0x9b, 0xe, 0xa9, 0x63, 0xc9, 0xfc, 0x5c, 0x7e, 0xf9, 0x4b, 0x21, 0x7e, 0xe5, 0x33, 0x79, 0x89, 0xaf, 0xbc, 0x71, 0x7, 0xd2, 0x33, 0xa8, 0xb3, 0x62, 0xac, 0x27, 0xc4, 0xf6, 0x9d, 0xf9, 0xe1, 0x91, 0xcd, 0x65, 0xae, 0x97, 0xd6, 0xeb, 0x9e, 0x54, 0x84, 0xeb, 0x6f, 0x10, 0x34, 0x95, 0x75, 0xe4, 0xca, 0xe5, 0x14, 0x52, 0x38, 0x1, 0x51, 0xf9, 0x2, 0x41, 0x5a, 0xc9, 0xcf, 0x42, 0xc8, 0x24, 0xeb, 0x23, 0xc9, 0x54, 0x1d, 0x2d, 0xa1, 0xc2, 0x6d, 0xb8, 0x5f, 0x53, 0xcd, 0xaf, 0xb0, 0x6a, 0x12, 0xb8, 0x39, 0x3c, 0xd5, 0x80, 0xa8, 0xe4, 0x94, 0xed, 0xb6, 0x71, 0xc, 0x72, 0xd, 0xca, 0xe3, 0x8, 0x32, 0x96, 0x7e, 0x33, 0xe6, 0x30, 0x3a, 0x92, 0xb1, 0xdf, 0x8, 0x41, 0xd7, 0x72, 0x42, 0x84, 0xff, 0xd2, 0xe0, 0xb, 0x95, 0xc6, 0xd6, 0x23, 0xb1, 0x68, 0xd2, 0x1a, 0xc1, 0xbd, 0x3c, 0x67, 0x5e, 0xda, 0x33, 0x18, 0x2a, 0x2c, 0x22, 0x37, 0x9, 0x98, 0xde, 0x1e, 0x5e, 0xb9, 0x5, 0x37, 0x2c, 0xc6, 0xef, 0x32, 0xd5, 0xb7, 0x65, 0xf5, 0xc9, 0x48, 0x70, 0xdf, 0x48, 0x42, 0xd0, 0x11, 0x60, 0x3b, 0xe4, 0xcd, 0xb1, 0xc2, 0x27, 0xe4, 0x1e, 0xb2, 0xf2, 0xe8, 0x54, 0x2c, 0xd3, 0x25, 0x88, 0x4f, 0xed, 0xc9, 0xc5, 0xc7, 0xbb, 0x7, 0xa9, 0x2d, 0x20, 0xd6, 0x4b, 0x83, 0x62, 0x15, 0xc5, 0x9f, 0x16, 0x2a, 0x3d, 0xa8, 0xbb, 0x67, 0xd6, 0xfc, 0x13, 0xfe, 0xf9, 0x7c, 0xab, 0x6e, 0xcb, 0x8a, 0x29, 0xe4, 0x31, 0xa6, 0x51, 0x9a, 0x62, 0x61, 0xc4, 0x52, 0x1c, 0xcb, 0x90, 0xe6, 0xe6, 0x9, 0x86, 0x9e, 0x6f, 0xe3, 0x98, 0x40, 0x4a, 0xe0, 0x47, 0xf6, 0x4e, 0xc4, 0x26, 0x35, 0x66, 0xde, 0xfe, 0xe6, 0x63, 0x29, 0xdd, 0x40, 0xac, 0x98, 0x5e, 0xb8, 0xa0, 0x8d, 0x26, 0x52, 0x9a, 0x54, 0x48, 0x91, 0xb6, 0xf5, 0x7c, 0xc2, 0x35, 0xc6, 0x3c, 0x9, 0x5, 0x7a, 0xb6, 0xb6, 0xed, 0x72, 0xe, 0xf4, 0x1a, 0x3c, 0x9a, 0xe6, 0x57, 0x68, 0xb4, 0x3f, 0x6d, 0xcf, 0x49, 0x62, 0xa1, 0x3, 0xdd, 0x93, 0xc2, 0x13, 0x17, 0x1d, 0xc2, 0xc9, 0x19, 0x4e, 0x43, 0x26, 0x5c, 0x68, 0x9b, 0x49, 0x33, 0x14, 0x50, 0x28, 0x1a, 0x3f, 0xeb, 0xc6, 0x18, 0xd1, 0xaa, 0x4d, 0x65, 0xa1, 0x35, 0x13, 0x70, 0x51, 0xfd, 0x46, 0xb5, 0x68, 0xce, 0x29, 0x4c, 0x89}, - output224: []byte{0x2c, 0x70, 0xb, 0x40, 0x59, 0x91, 0x6a, 0xf3, 0xf4, 0x7d, 0x90, 0x17, 0xf5, 0x72, 0x5f, 0x42, 0xb0, 0xd5, 0x18, 0x95, 0x33, 0x1f, 0x9, 0x0, 0x48, 0xc2, 0x76, 0xa0}, - output256: []byte{0x96, 0xba, 0xee, 0x8e, 0xca, 0x9d, 0xcd, 0xbd, 0xc4, 0x67, 0x54, 0x9e, 0x30, 0x7d, 0x95, 0xc2, 0xa, 0x7, 0xfe, 0xb7, 0x2e, 0xcc, 0xc7, 0x80, 0xdb, 0xc2, 0x9d, 0x40, 0xae, 0x7c, 0xae, 0x45}, - output384: []byte{0xe1, 0x7a, 0x2a, 0x66, 0x7, 0x82, 0xbd, 0xe, 0xb5, 0x7b, 0x46, 0x3a, 0xfa, 0xa7, 0x45, 0xf6, 0x58, 0xbd, 0x6d, 0x7, 0x3c, 0x56, 0xf6, 0x9d, 0xea, 0xdb, 0x62, 0x9d, 0x4e, 0xa9, 0x3c, 0x1c, 0x36, 0x3, 0x39, 0x2d, 0xc6, 0xd8, 0x41, 0x45, 0x27, 0xa9, 0x62, 0xae, 0x34, 0x77, 0xfd, 0x34}, - output512: []byte{0x76, 0x58, 0x3e, 0x74, 0xe, 0xef, 0xb6, 0x39, 0x4f, 0x6a, 0xf3, 0x10, 0xae, 0x89, 0x6e, 0x1b, 0x2d, 0x18, 0x15, 0x81, 0x16, 0x5c, 0xe1, 0xdc, 0xc2, 0x31, 0x7d, 0x7e, 0xb0, 0x44, 0x67, 0x7a, 0xc0, 0xaa, 0x63, 0x23, 0xb5, 0xb1, 0x42, 0x43, 0xd0, 0x82, 0x2e, 0xe4, 0x9d, 0xa1, 0xc6, 0x76, 0xfb, 0xbc, 0x1f, 0x18, 0x9b, 0x91, 0x9b, 0xce, 0x8a, 0xa, 0xb2, 0x83, 0xd6, 0x3, 0x8, 0xc8}}, - testcase{ - msg: []byte{0x24, 0xb1, 0x19, 0x1, 0x70, 0x41, 0x81, 0x26, 0xdd, 0x7a, 0x5a, 0x81, 0xfc, 0x8, 0xa, 0x98, 0x4, 0x31, 0x1b, 0x48, 0xc4, 0xe4, 0xda, 0x68, 0x7, 0x27, 0xb8, 0x74, 0x31, 0x8d, 0x17, 0xbd, 0xd3, 0x4b, 0xe7, 0x26, 0xda, 0xa7, 0x60, 0xa4, 0x2, 0x8, 0xbb, 0x6f, 0x51, 0x2e, 0x5a, 0xa8, 0x89, 0xb1, 0x35, 0xd2, 0x77, 0xcf, 0xfe, 0x6a, 0xf8, 0x2, 0x95, 0x4b, 0xc9, 0x18, 0xe4, 0xd5, 0x99, 0xee, 0x18, 0x5d, 0x59, 0x87, 0x1, 0xc2, 0xfa, 0x3c, 0x28, 0xf7, 0xed, 0xb3, 0x55, 0xd7, 0x4a, 0x8d, 0x2f, 0x1a, 0x9e, 0xff, 0x8b, 0x6c, 0x2a, 0xbe, 0xd7, 0x76, 0xbe, 0x8b, 0xac, 0xdc, 0xfc, 0x6c, 0x98, 0xc5, 0xe7, 0x3c, 0x24, 0xfa, 0x9, 0x67, 0xb6, 0xf2, 0xf7, 0x90, 0x51, 0xe6, 0x48, 0xec, 0xd9, 0x53, 0xab, 0x54, 0x30, 0xb8, 0xc7, 0xd9, 0x63, 0x52, 0xe6, 0x0, 0xa6, 0xfc, 0x4, 0xfd, 0x42, 0x25, 0xd, 0x24, 0xe4, 0xa5, 0x96, 0x9b, 0xae, 0x77, 0x12, 0xc6, 0xc1, 0xbf, 0x8b, 0x95, 0x48, 0x1a, 0xf, 0x81, 0x86, 0x29, 0x8e, 0xd2, 0xa7, 0xe, 0x16, 0xff, 0x82, 0x9, 0xc0, 0x51, 0x1a, 0xd4, 0xe2, 0xea, 0x17, 0xf5, 0x39, 0x78, 0x9f, 0x9a, 0x1d, 0x47, 0xee, 0x29, 0x1e, 0x15, 0x78, 0x6, 0xcf, 0x68, 0x0, 0x67, 0xd3, 0x72, 0x31, 0x3, 0x2b, 0x3, 0x2d, 0x5e, 0xfb, 0x15, 0x52, 0x92, 0x54, 0x97, 0xe5, 0x7d, 0x8, 0x8e, 0xce, 0x2b, 0x38, 0x69, 0x68, 0x43, 0x57, 0xc4, 0x66, 0xdb, 0x45, 0x4d, 0x4f, 0xd9, 0xee, 0x9b, 0xcf, 0xc5, 0xdf, 0xd7, 0xad, 0x36, 0x20, 0xb3, 0xfb, 0x24, 0x4f, 0x71, 0x7a, 0x48, 0xfa, 0xcf, 0x1, 0x57, 0xf8, 0x7c, 0xbb, 0xa9, 0x4b, 0x91, 0xc0, 0xc3, 0x90, 0x2, 0xf7, 0x83, 0x51, 0xe3, 0xea, 0x6d, 0x41, 0x1c, 0xa5, 0x87, 0xb9, 0x1a, 0xc, 0xba, 0x4c, 0xe2, 0x1a, 0x89, 0x32, 0xec, 0x9f, 0xf, 0x6e, 0x8f, 0xed, 0x5d, 0xe7, 0xdd, 0xd0, 0x3a, 0x3b, 0x90, 0xb6, 0xc6, 0xd8, 0x28, 0xf7, 0x83, 0x1a, 0xae, 0x1f, 0x87, 0x9f, 0xca, 0xff, 0x77, 0xb7, 0x6f, 0xba, 0x1c, 0x0, 0x13, 0xcd, 0xdb, 0x19, 0xe9, 0x3d, 0x87, 0x8b, 0x34, 0x28, 0xfa, 0x91, 0xf1, 0xa5, 0x17, 0x9f, 0x72, 0x40, 0xa5, 0xb4, 0x7b, 0x14, 0x6f, 0xa3, 0x4e, 0x39, 0x97, 0x73, 0xb, 0x60, 0x1d, 0xd5, 0x6f, 0x58, 0x76, 0x22, 0x11, 0x48, 0x13, 0xb5, 0x72, 0x39, 0xa2, 0x89, 0xdb, 0xa2, 0x34, 0x8b, 0x2b, 0xd8, 0x20, 0x7f, 0xcd, 0xb1, 0xce, 0x0, 0x32, 0x98, 0x4d, 0x93, 0x89, 0xd7, 0x31, 0x94, 0x2e, 0xdc, 0x5a, 0x44, 0xd8, 0x72, 0xeb, 0x86, 0x3, 0x8e, 0x28, 0x1f, 0x49, 0xc8, 0x68, 0xdb, 0xa2, 0x78, 0xd1, 0xc9, 0x4a, 0xd1, 0xac, 0x37, 0x6d, 0x57, 0x8, 0x5e, 0xbe, 0x87, 0x5c, 0xba, 0x7a, 0xd0, 0x71, 0xd5, 0xcb, 0x38, 0x43, 0xdd, 0xad, 0xc6, 0xec, 0xf8, 0xaf, 0x7d, 0x6c, 0x54, 0x69, 0x38, 0x95, 0x76, 0x68, 0xe4, 0xe8, 0xdc, 0x5, 0x70, 0x9, 0x0, 0xff, 0x2a, 0xa, 0x2e, 0x8d, 0xba, 0x72, 0x6c, 0xce, 0xa4, 0x43, 0xf8, 0x68, 0x16, 0x44, 0xa3, 0x77, 0xd7, 0xfb, 0x39, 0xfd, 0x15, 0x9f, 0x72, 0xb8, 0xb6, 0xed, 0xab, 0xab, 0x76, 0xe4, 0xaf, 0x39, 0xfa, 0x6, 0x5c, 0x9b, 0x94, 0x7f, 0x53, 0x70, 0x2a, 0x37, 0x97, 0x55, 0x2e, 0x92, 0xd3, 0x13, 0x54, 0xa, 0x50, 0xe7, 0x39, 0x81, 0xc4, 0x34, 0xe, 0x88, 0x72, 0x2c, 0xe1, 0x97, 0x97, 0xdd, 0x53, 0x5, 0xe5, 0x61, 0x15, 0x6b, 0xcc, 0xfa, 0xd1, 0x47, 0x68, 0x5f, 0xef, 0x2b, 0x76, 0xf4, 0xcf, 0x80, 0x83, 0x51, 0x5c, 0xe8, 0xf0, 0xc6, 0xa, 0x52, 0x69, 0x9f, 0x8, 0xe6, 0xab, 0x24, 0xc1, 0xdf, 0x61, 0x2d, 0x93, 0xd7, 0xca, 0x26, 0xcc, 0xb2, 0xd5, 0x15, 0x6b, 0xac, 0xe4, 0xda, 0x28, 0xe8, 0xf1, 0xe9, 0x99, 0x2b, 0xb8, 0x48, 0xd, 0x30, 0x10, 0x46, 0xba, 0xbf, 0x55, 0x95, 0x4f, 0xd5, 0xf2, 0x9c, 0x7, 0x48, 0x6, 0x48, 0x2f, 0xac, 0xec, 0x43, 0x2d, 0xa1, 0xb, 0xb7, 0x55, 0x62, 0x87, 0xf2, 0xf1, 0x8, 0xb1, 0x14, 0x90, 0x4c, 0x12, 0x2d, 0xe4, 0x3e, 0x6a, 0x77, 0x4, 0x8a, 0xf3, 0xb4, 0x79, 0x20, 0x51, 0x5d, 0x1b, 0x3, 0xe2, 0x80, 0xc1, 0xe7, 0xc0, 0x5b, 0xc7, 0x10, 0x89, 0xec, 0x76, 0x9f, 0x7f, 0xa0, 0x4e, 0xc, 0x49, 0x84, 0xd1, 0x86, 0xf8, 0xc8, 0xee, 0x30, 0x5b, 0x1f, 0xb2, 0x1d, 0x3, 0xf0, 0x25, 0xc9, 0x5c, 0x8c, 0xe9, 0xc5, 0xa, 0xd6, 0xfb, 0x52, 0x7e, 0xf5, 0x5, 0xbd, 0x20, 0x3a, 0xcb, 0x5b, 0x12, 0xd4, 0xcf, 0xe0, 0x8f, 0x45, 0x79, 0x97, 0x15, 0x90, 0xbd, 0x43, 0x75, 0x5a, 0x85, 0xa0, 0x3b, 0xd2, 0x96, 0x88, 0x51, 0x28, 0xae, 0x64, 0x33, 0x3d, 0xc3, 0x3, 0x1, 0xdd, 0x7c, 0x9b, 0x8e, 0x3, 0x5e, 0x22, 0xf7, 0x5f, 0x41, 0x10, 0x50, 0xdb, 0x6a, 0x17, 0x26, 0x5d, 0xcf, 0x3f, 0x3d, 0xcd, 0xf8, 0xfe, 0xb, 0x72, 0x8a, 0x68, 0xb, 0x60, 0xee, 0xad, 0x7f, 0xbe, 0x14, 0x1f, 0x6d, 0x92, 0x98, 0xed, 0xbd, 0xd0, 0x7d, 0x52, 0xde, 0xcd, 0xe1, 0x53, 0xaa, 0xfd, 0xa6, 0x69, 0x8f, 0x41, 0x5e, 0xaf, 0x86, 0x22, 0x86, 0x1e, 0x54, 0xa2, 0xb2, 0x79, 0xe3, 0xb1, 0xc0, 0xea, 0xfd, 0x5a, 0x58, 0x9e, 0x71, 0x21, 0xdf, 0x6e, 0x51, 0xe4, 0xd7, 0x69, 0x85, 0x66, 0xbc, 0xd5, 0x2, 0x10, 0x13, 0x18, 0xd, 0x77, 0xa1, 0x90, 0x8c, 0x17, 0x16, 0x9c, 0x9b, 0xba, 0x1b, 0xca, 0xcd, 0x5a, 0xa4, 0x79, 0x9d, 0xf8, 0x45, 0x93, 0x1, 0x3e, 0x21, 0xc3, 0x3, 0xac, 0xb6, 0x70, 0xde, 0x66, 0xb5, 0xcf, 0x8, 0xfa, 0xd0, 0x47, 0x69, 0xcd, 0x5, 0xd6, 0x9e, 0x3a, 0xdc, 0xd5, 0xb0, 0x0, 0x2c, 0x75, 0x61, 0x8a, 0x6a, 0x1f, 0x44, 0x9, 0x18, 0xb0, 0x4d, 0xf7, 0xb2, 0xde, 0x36, 0x36, 0x39, 0x15, 0x2c, 0xb6, 0xa2, 0x6d, 0x77, 0xdb, 0x7f, 0x40, 0x2, 0x91, 0xe2, 0x14, 0x79, 0xd5, 0xa7, 0xe0, 0xfa, 0xcd, 0x36, 0xed, 0x9, 0xf2, 0xa2, 0xe7, 0x4f, 0x56, 0x4b, 0x8b, 0x67, 0x6d, 0x3e, 0x3d, 0xe0, 0x77, 0x12, 0xe1, 0xf6, 0x98, 0x40, 0xbf, 0xb4, 0x8d, 0xe6, 0x31, 0x41, 0xa2, 0x45, 0x5d, 0xeb, 0xe2, 0xe9, 0xfb, 0x81, 0x86, 0xa0, 0x19, 0x21, 0xbf, 0xc8, 0xd6, 0x44, 0xdb, 0xe3, 0x15, 0xee, 0xa9, 0x43, 0xd3, 0x70, 0xec, 0x64, 0x8a, 0xe7, 0x46, 0x57, 0xaa, 0x57, 0x51, 0x2b, 0x39, 0xb6, 0xd8, 0x72, 0x21, 0x2d, 0xd1, 0x3b, 0xbc, 0x7f, 0xdc, 0xb4, 0x81, 0xf7, 0x20, 0x1f, 0x65, 0x34, 0x80, 0x17, 0xd0, 0x25, 0x9f, 0xa9, 0x9a, 0x69, 0x8, 0x4d, 0xb, 0x62, 0xe6, 0x3a, 0x74, 0x8, 0xaa, 0xb2, 0x4d, 0xa4, 0xd3, 0xba, 0x6f, 0x7b, 0x18, 0x7d, 0x1, 0x4a, 0x37, 0x2f, 0xa8, 0x16, 0x1, 0x75, 0xf3, 0xb3, 0x73, 0x99, 0xee, 0xdd, 0x7f, 0x6f, 0xe8, 0x69, 0xa1, 0xf0, 0xab, 0x8b, 0xa, 0x3b, 0x83, 0x5c, 0x9d, 0x8, 0x69, 0x27, 0xda, 0x75, 0xad, 0x48, 0x3c, 0xdb, 0xf8, 0x3f, 0x75, 0x71, 0xfe, 0x10, 0x41, 0x37, 0x6b, 0x8b, 0x57, 0xa1, 0x5d, 0xd1, 0xda, 0x70, 0x75, 0xec, 0xd0, 0x40, 0xae, 0x2f, 0x5b, 0xd6, 0xd3, 0x71, 0xed, 0x3e, 0xdd, 0xcc, 0x13, 0xf8, 0xd6, 0x11, 0xc2, 0x2b, 0x29, 0xfe, 0x9f, 0x24, 0x61, 0x25, 0xb2, 0xb8, 0x68, 0xad, 0xae, 0xae, 0xed, 0x40, 0xba, 0x1c, 0x31, 0x50, 0xbe, 0xb5, 0x9, 0x40, 0x87, 0x5b, 0x8, 0xe6, 0x50, 0xc0, 0xa, 0x9, 0x5e, 0xc2, 0xab, 0xff, 0x72, 0x3f, 0x7f, 0x1f, 0x5b, 0x97, 0x98, 0x5b, 0x7d, 0x1c, 0x1d, 0x81, 0xbf, 0xc0, 0x31, 0xf6, 0x4e, 0x45, 0x21, 0x25, 0xcd, 0xd1, 0x37, 0x32, 0xd8, 0x6a, 0x9c, 0xb7, 0xee, 0x1d, 0x89, 0x38, 0x14, 0x34, 0xd9, 0x39, 0xb5, 0x15, 0xf3, 0xf4, 0x61, 0x56, 0x7b, 0x90, 0x5c, 0xce, 0x4d, 0x6a, 0x7a, 0x5a, 0xb, 0x7f, 0x96, 0x4f, 0xd6, 0xd5, 0xfe, 0x90, 0xfa, 0x72, 0x6e, 0xfe, 0x18, 0x78, 0x7d, 0x26, 0xb0, 0x83, 0xbb, 0xc8, 0xab, 0x5d, 0x7e, 0xe7, 0xf9, 0xd7, 0x9d, 0x35, 0x56, 0x61, 0x6e, 0x2, 0x82, 0xfc, 0x14, 0xb8, 0xc, 0x9c, 0xfe, 0x2, 0xa3, 0xbd, 0x84, 0x5b, 0x1a, 0x3e, 0xad, 0x1d, 0xec, 0x61, 0x39, 0x3f, 0x0, 0x49, 0xb8, 0x5e, 0xa6, 0x4a, 0x7b, 0xbc, 0x5, 0x85, 0xa0, 0xe2, 0x4c, 0x53, 0xd7, 0x74, 0xe5, 0xa0, 0x85, 0xfc, 0x21, 0x7e, 0xf6, 0xf0, 0x37, 0xa, 0x79, 0x4a, 0x96, 0xe6, 0xbf, 0x57, 0x2a, 0x4c, 0x31, 0x95, 0xe9, 0x16, 0xc9, 0xa5, 0x18, 0x14, 0x98, 0x9d, 0xc4, 0xae, 0x65, 0xd0, 0x90, 0x97, 0x6b, 0xab, 0x97, 0x9, 0xfb, 0xb5, 0x1b, 0x0, 0x46, 0x94, 0xab, 0x9c, 0x8, 0x33, 0x63, 0x7f, 0xe1, 0x0, 0x18, 0x3e, 0xbe, 0xcf, 0xa6, 0xf7, 0x8d, 0x26, 0x1, 0x4a, 0x0, 0xdb, 0xb2, 0x4, 0x47, 0x1a, 0x6a, 0x37, 0x9d, 0x9e, 0x42, 0x94, 0xa5, 0xda, 0x78, 0xf3, 0x8e, 0xf2, 0xb0, 0xa4, 0x74, 0xe9, 0x2a, 0xe6, 0xd8, 0x11, 0xe1, 0x12, 0xff, 0xb2, 0x24, 0xc6, 0xee, 0x2f, 0x5b, 0x2a, 0x3a, 0x5e, 0xd5, 0xb5, 0x29, 0xef, 0xd2, 0xb9, 0x10, 0x6d, 0x87, 0x8b, 0x38, 0x6a, 0xc9, 0x74, 0xcd, 0x5d, 0xa9, 0x91, 0x13, 0xf1, 0x17, 0x0, 0x78, 0x32, 0x26, 0x31, 0x5a, 0xe8, 0xb9, 0xcc, 0x9c, 0x41, 0x42, 0x3e, 0x47, 0xb5, 0x1d, 0x10, 0xb5, 0x1a, 0xd5, 0x3, 0xba, 0x96, 0x8a, 0x70, 0x46, 0x75, 0x3d, 0x3f, 0x5f, 0xb0, 0xcb, 0x60, 0x1f, 0x4a, 0x8d, 0x59, 0x4b, 0x12, 0xe2, 0x83, 0x84, 0x39, 0x11, 0x71, 0xb, 0x89, 0x77, 0x41, 0x2c, 0x3b, 0x64, 0xe8, 0x61, 0x17, 0x28, 0xad, 0x46, 0x84, 0xd7, 0xe2, 0x42, 0xa1, 0xd8, 0x5f, 0xfa, 0x5d, 0x1, 0xe7, 0xf3, 0xda, 0xdb, 0xc1, 0xb1, 0x69, 0x10, 0x30, 0xc8, 0xaa, 0x51, 0x9, 0x5c, 0xd2, 0xba, 0xf3, 0x6e, 0x5b, 0x45, 0xd1, 0xfb, 0x7d, 0xa2, 0x89, 0x73, 0xa9, 0x8f, 0xb3, 0xbc, 0xe8, 0x35, 0x93, 0x2a, 0x47, 0x5e, 0xda, 0xa1, 0x2c, 0x23, 0x2b, 0xba, 0xe4, 0xf7, 0x93, 0x32, 0x4f, 0x82, 0xbb, 0xb4, 0xe1, 0x9c, 0xc9, 0xe4, 0x48, 0x23, 0x93, 0x43, 0x8f, 0x94, 0x0, 0x62, 0x46, 0xc3, 0xa8, 0x1a, 0xb5, 0x1b, 0xe7, 0x72, 0x13, 0x11, 0xeb, 0xf1, 0x92, 0x74, 0x88, 0xf1, 0xbc, 0xbb, 0xb2, 0x67, 0x92, 0xd6, 0x18, 0xd, 0xc, 0xe5, 0x9b, 0x69, 0xe3, 0x97, 0xa6, 0xd6, 0xd, 0xb8, 0x3c, 0x32, 0x1b, 0xf9, 0x71, 0xf5, 0xd8, 0x4, 0x51, 0x2d, 0x55, 0x4f, 0xc3, 0x45, 0x3a, 0xec, 0x14, 0xf6, 0xb0, 0xb5, 0xe8, 0x2b, 0x8a, 0x87, 0xbc, 0x8e, 0xaf, 0xdf, 0x7c, 0xad, 0x1e, 0xb0, 0x7e, 0x16, 0x4d, 0xf6, 0x1b, 0x6d, 0xd, 0xea, 0xae, 0xd3, 0x3d, 0x4b, 0x56, 0xb1, 0x75, 0x18, 0x47, 0x30, 0x10, 0x2e, 0x77, 0xcf, 0x81, 0x82, 0x3e, 0xe8, 0x2b, 0xfe, 0x94, 0x5e, 0x3b, 0x79, 0x23, 0x81, 0x81, 0x57, 0xc5, 0x79, 0xa7, 0x74, 0xe8, 0xd0, 0x5f, 0xd7, 0x7f, 0xe8, 0x4a, 0xb3, 0x6a, 0x3d, 0x26, 0x6b, 0xe1, 0xf0, 0x94, 0x4, 0x8b, 0x8e, 0x41, 0x7f, 0xf0, 0x55, 0x6c, 0x95, 0xc2, 0xc, 0xc, 0xc1, 0xf3, 0x96, 0x39, 0x65, 0xe5, 0xc3, 0x7d, 0xf5, 0xb4, 0xd8, 0x86, 0x53, 0xf8, 0x31, 0xbb, 0x22, 0x2f, 0x39, 0x9d, 0x86, 0x7e, 0xd7, 0x7b, 0xf8, 0xc8, 0x9b, 0xf6, 0x16, 0x4, 0x49, 0xa3, 0x4e, 0xa7, 0x8a, 0xb7, 0xd9, 0x92, 0x80, 0x1, 0xfd, 0x8d, 0xde, 0x94, 0xf3, 0xc, 0x8c, 0xbd, 0xee, 0x4d, 0x6, 0xfb, 0xa1, 0x50, 0x85, 0x2e, 0xc2, 0x55, 0xc6, 0x9c, 0x59, 0xd, 0x7, 0xb5, 0xa8, 0x3, 0x70, 0x7e, 0x11, 0xa0, 0xef, 0x68, 0x9c, 0xee, 0xa9, 0xdc, 0xe, 0xf8, 0x80, 0x9a, 0xf6, 0x85, 0xe4, 0x8b, 0x79, 0xb4, 0x33, 0x7c, 0x75, 0x6b, 0xe, 0x56, 0x7d, 0x3b, 0xec, 0x43, 0xb4, 0x43, 0x1e, 0x86, 0xb7, 0x9d, 0x65, 0x22, 0xc5, 0x6d, 0xc3, 0x18, 0x2, 0xb7, 0x68, 0x93, 0xd5, 0x48, 0xf8, 0xf8, 0x51, 0xd7, 0x69, 0x6d, 0x8f, 0xd8, 0xdd, 0x15, 0xf6, 0x2, 0x53, 0x16, 0x3f, 0x83, 0x35, 0xb9, 0x89, 0x7c, 0x47, 0x7e, 0x6d, 0x4c, 0x74, 0x3b, 0xe2, 0x2b, 0x1d, 0xea, 0xff, 0x90, 0x69, 0x33, 0x37, 0xba, 0x80, 0x32, 0x97, 0x8e, 0x97, 0xbf, 0x73, 0xbd, 0x3f, 0xa1, 0xb5, 0x3a, 0x46, 0xa7, 0x79, 0xb1, 0x3c, 0xbb, 0xa4, 0x53, 0x34, 0x62, 0x34, 0xc3, 0xa6, 0x8f, 0x36, 0x9a, 0xfc, 0xdd, 0xa2, 0x3, 0xc0, 0x58, 0xe3, 0xf3, 0xa2, 0x1a, 0xdf, 0x8b, 0x7c, 0x87, 0x2c, 0x8a, 0xcd, 0xec, 0xc0, 0xc2, 0x92, 0xdc, 0xc4, 0x36, 0x38, 0xd1, 0x32, 0x6b, 0x5d, 0x2e, 0x18, 0x70, 0x53, 0x77, 0x77, 0xec, 0x8a, 0x47, 0xe6, 0x9e, 0xb5, 0x4a, 0x30, 0xf9, 0xb1, 0xae, 0x21, 0x4e, 0xd0, 0xa1, 0x45, 0x6, 0xec, 0x21, 0x8b, 0x5, 0xcc, 0x44, 0x8, 0x6f, 0x65, 0x30, 0x48, 0xd7, 0xe0, 0x69, 0x49, 0xd6, 0x1, 0x7b, 0xdc, 0xc7, 0x71, 0x39, 0x83, 0xb6, 0xea, 0x9d, 0xd7, 0xd7, 0x93, 0x65, 0x43, 0x1d, 0xfe, 0xca, 0x3a, 0xf4, 0xf6, 0xcf, 0x1e, 0xfa, 0x18, 0xad, 0x23, 0xb7, 0x16, 0x81, 0x4f, 0x61, 0x4e, 0xd2, 0xa2, 0x2a, 0x5d, 0x8b, 0x37, 0x7f, 0x44, 0x2f, 0x2c, 0x40, 0x2d, 0xe0, 0x5c, 0xc8, 0xc2, 0xdb, 0xaa, 0x50, 0x76, 0x13, 0x3e, 0x9, 0x5, 0xff, 0x84, 0x3d, 0x64, 0x54, 0x5a, 0x74, 0x9, 0x71, 0x1e, 0x15, 0x63, 0x7, 0x1c, 0x5d, 0x48, 0xe2, 0xae, 0x76, 0x5a, 0xfd, 0xba, 0xa8, 0x4c, 0x24, 0x99, 0xfa, 0xc8, 0xf1, 0x84, 0x8d, 0xb6, 0x5b, 0x74, 0x57, 0x76, 0xa4, 0x92, 0x11, 0xd0}, - output224: []byte{0xf6, 0x2e, 0xd9, 0xff, 0x9d, 0x91, 0xda, 0xa0, 0x54, 0xc2, 0x59, 0x27, 0xa1, 0xea, 0x4c, 0x85, 0x3e, 0xd9, 0xb3, 0xca, 0x63, 0xfe, 0xa7, 0x8a, 0x67, 0x12, 0x13, 0xe6}, - output256: []byte{0xfb, 0xf2, 0xfb, 0xa4, 0x5d, 0x6f, 0x2, 0xbc, 0xfa, 0x87, 0x88, 0xc4, 0x43, 0x70, 0x11, 0x4, 0xfe, 0xc7, 0xc8, 0x17, 0x0, 0xaa, 0xf2, 0xd0, 0x31, 0x11, 0x32, 0x95, 0x8e, 0x1b, 0xa5, 0x7f}, - output384: []byte{0xc8, 0xaa, 0x4a, 0xaa, 0x57, 0xd5, 0x24, 0x1a, 0xbf, 0xa4, 0xb4, 0x98, 0x64, 0xa, 0x36, 0x5d, 0x98, 0x76, 0x82, 0xcf, 0x66, 0xa0, 0xdd, 0x23, 0x59, 0xb8, 0x23, 0x92, 0x1b, 0x94, 0x62, 0x35, 0x65, 0x69, 0xc9, 0x66, 0xfc, 0x39, 0x11, 0xec, 0xfc, 0x40, 0xa7, 0x14, 0xed, 0xd2, 0xb3, 0x58}, - output512: []byte{0x31, 0x6, 0x1c, 0x59, 0xc5, 0xc6, 0xc, 0x55, 0xf0, 0xd3, 0x3e, 0xa7, 0x74, 0x94, 0x94, 0x7e, 0x6f, 0xdb, 0x71, 0xe8, 0x4e, 0x3c, 0x20, 0x7, 0xaf, 0xf1, 0x25, 0x7a, 0xda, 0x79, 0x71, 0xd, 0x41, 0x6b, 0x3a, 0x71, 0xa4, 0x10, 0x8f, 0x31, 0x89, 0xe2, 0x89, 0x8a, 0x19, 0x12, 0x47, 0xf0, 0xf2, 0xe0, 0x2c, 0xb9, 0xf2, 0x1a, 0x93, 0x3d, 0x14, 0x5, 0xb1, 0x55, 0xd9, 0xab, 0x33, 0x32}}, - testcase{ - msg: []byte{0xb8, 0xb2, 0x7e, 0xf9, 0x41, 0x79, 0x2b, 0xd6, 0x81, 0x97, 0x47, 0x43, 0x2c, 0xb8, 0x44, 0xd1, 0x1d, 0x32, 0x75, 0xe2, 0x35, 0xd6, 0xa0, 0x48, 0x42, 0xd0, 0xea, 0x1b, 0xe5, 0xa7, 0x27, 0xe, 0x3d, 0x32, 0x92, 0x4d, 0x2f, 0x74, 0xde, 0xb9, 0xac, 0x5a, 0x86, 0x91, 0x61, 0x7a, 0x1c, 0xbc, 0x10, 0x46, 0xa5, 0xab, 0x8f, 0x89, 0xa6, 0xe5, 0xa8, 0x4e, 0x7c, 0xf3, 0xb3, 0x19, 0xb0, 0xef, 0xe2, 0x19, 0x28, 0xaa, 0x0, 0xdf, 0x31, 0xfe, 0xd3, 0x4e, 0x2f, 0xce, 0x50, 0x76, 0x10, 0xf, 0xd3, 0x84, 0x27, 0x3d, 0xc5, 0xb3, 0xed, 0x56, 0x7, 0x9a, 0xdc, 0x94, 0x8e, 0x47, 0x91, 0x9e, 0x8c, 0xe5, 0xdc, 0xe4, 0x47, 0x26, 0xf9, 0x36, 0x88, 0x54, 0xd5, 0xeb, 0x7e, 0xa9, 0xdf, 0x44, 0x45, 0xf4, 0xe9, 0xa3, 0xea, 0x55, 0x65, 0x24, 0x4, 0xb7, 0x1e, 0x16, 0xcf, 0xf4, 0x5e, 0x40, 0x7c, 0x8e, 0x86, 0xa5, 0x6b, 0x4d, 0x23, 0x28, 0xaf, 0x7d, 0xc9, 0xa1, 0x1c, 0x74, 0x90, 0xd0, 0x2d, 0xda, 0xd8, 0xbc, 0x81, 0x31, 0x6b, 0xc, 0x70, 0xc2, 0xe0, 0xbd, 0xf3, 0xc4, 0xbf, 0xdf, 0xf2, 0xc6, 0x61, 0x39, 0x95, 0x31, 0xe1, 0x34, 0xa5, 0x99, 0xf9, 0xc2, 0xf8, 0xb5, 0x39, 0x72, 0x85, 0xef, 0x54, 0x47, 0x90, 0x3c, 0xb, 0x43, 0xa5, 0xad, 0xd9, 0x6c, 0xd5, 0xc6, 0x88, 0x92, 0x9d, 0xc, 0x5, 0xb5, 0x7b, 0x5c, 0x46, 0x32, 0x8a, 0x4b, 0xd, 0x85, 0x1, 0xdc, 0xcc, 0xd6, 0xb0, 0xd2, 0x2f, 0x1c, 0xbb, 0x40, 0xf9, 0xf, 0xb3, 0xd2, 0x83, 0x38, 0xef, 0x4e, 0x1c, 0xed, 0x2d, 0xd5, 0x6c, 0xb5, 0x69, 0xee, 0x63, 0xa1, 0x4a, 0x54, 0x20, 0x17, 0x6b, 0x2f, 0x1f, 0x8f, 0xa1, 0xb3, 0x92, 0x96, 0xad, 0x88, 0xb5, 0x2e, 0x7d, 0x3d, 0x13, 0xae, 0x6, 0x66, 0x68, 0xe6, 0x8, 0x35, 0xa0, 0x4a, 0xe8, 0x15, 0xd4, 0x81, 0x42, 0x8a, 0x5d, 0x39, 0xdf, 0x18, 0xe6, 0x7c, 0x4f, 0xe0, 0xf3, 0x27, 0x7c, 0xd7, 0x42, 0x73, 0xb5, 0xf7, 0x8f, 0x9f, 0xcb, 0x93, 0xd7, 0xe, 0xcc, 0xf9, 0x76, 0x47, 0x98, 0x82, 0x7b, 0xf4, 0xd6, 0xcf, 0xa8, 0xee, 0xb6, 0x85, 0xa7, 0x69, 0xce, 0xf9, 0x64, 0xfd, 0xa3, 0xe1, 0xe1, 0x3c, 0x96, 0x66, 0xe, 0xb0, 0xe1, 0x85, 0x1e, 0x30, 0xf1, 0xec, 0x4b, 0x9d, 0x91, 0x5c, 0x6b, 0x62, 0x2, 0x4, 0xa7, 0xf0, 0x98, 0x8a, 0xd3, 0x99, 0x8, 0x14, 0xa0, 0x95, 0xdc, 0xeb, 0x3e, 0xba, 0x9b, 0x70, 0x23, 0xf2, 0x33, 0x7b, 0x9, 0xb3, 0x26, 0x8d, 0xf4, 0x1c, 0xb5, 0xc7, 0x21, 0xdf, 0x9a, 0x28, 0x51, 0x85, 0x83, 0xb1, 0x1, 0x17, 0x63, 0xab, 0xe6, 0x23, 0x77, 0xcc, 0xaa, 0x5b, 0x32, 0x77, 0x47, 0x5a, 0x9c, 0xf7, 0x2e, 0x36, 0xb0, 0x7b, 0xbe, 0x8f, 0x2e, 0x2b, 0xd, 0x2f, 0xe2, 0x6e, 0x8b, 0x81, 0xa5, 0xb0, 0x4a, 0xd6, 0xbd, 0xc, 0xb8, 0xc8, 0xc, 0xc3, 0x59, 0xc4, 0xeb, 0x38, 0xea, 0x25, 0x5, 0x77, 0xd2, 0xd0, 0x6d, 0x14, 0xcc, 0xcd, 0x76, 0x1e, 0xe, 0x51, 0xc8, 0x30, 0x78, 0x51, 0x7a, 0x50, 0xa, 0x81, 0xc, 0xf0, 0x84, 0xa, 0x9f, 0xe5, 0x2f, 0x41, 0x5f, 0x96, 0xea, 0x1d, 0x16, 0x44, 0xfe, 0x3e, 0x81, 0x82, 0x3b, 0xc2, 0x19, 0x60, 0x51, 0xda, 0x58, 0x19, 0x31, 0x64, 0x61, 0x93, 0x66, 0x6e, 0x0, 0xeb, 0x80, 0x3, 0xa1, 0xdb, 0x1f, 0x95, 0xe0, 0xd4, 0x16, 0x5d, 0x8, 0x4d, 0x58, 0x91, 0x15, 0x3b, 0x6f, 0x27, 0xb1, 0x57, 0xce, 0xd6, 0x67, 0x5a, 0xdf, 0xc5, 0x37, 0x77, 0x84, 0x3b, 0x1f, 0x33, 0xa4, 0x33, 0x7a, 0x2d, 0xa2, 0x39, 0x5b, 0xfa, 0x28, 0xb, 0xe7, 0x11, 0xf3, 0xcb, 0xa2, 0xa9, 0x61, 0xb6, 0x1, 0x1e, 0xdc, 0xa3, 0x5c, 0x57, 0xdc, 0x20, 0xd9, 0x26, 0x98, 0x2e, 0x20, 0x74, 0x24, 0x3d, 0x64, 0x4f, 0xe6, 0xc, 0x76, 0xae, 0x70, 0xab, 0x1e, 0x2d, 0x90, 0x4c, 0x3b, 0xa6, 0x8d, 0x8d, 0xc7, 0xb5, 0x81, 0x35, 0x65, 0xf1, 0x46, 0x1e, 0x52, 0xd4, 0x62, 0x53, 0xde, 0xb1, 0x87, 0xf6, 0x9, 0x59, 0x2b, 0x1e, 0x92, 0xe0, 0x62, 0xa8, 0xae, 0xd5, 0x76, 0xca, 0x33, 0x81, 0xb7, 0x62, 0x5c, 0x2e, 0x84, 0xb3, 0xef, 0x93, 0xa3, 0x38, 0xb9, 0x7d, 0x69, 0x93, 0x77, 0xe9, 0x96, 0x19, 0xa1, 0x16, 0xee, 0xf9, 0xeb, 0xf0, 0x5a, 0x7f, 0x3e, 0xaa, 0x96, 0xf3, 0x2b, 0x6b, 0x49, 0x1a, 0x2a, 0xa7, 0x85, 0x30, 0x3a, 0xe0, 0x35, 0x52, 0x31, 0x1b, 0x11, 0x3b, 0x6e, 0x8, 0xf2, 0xe1, 0x8f, 0x60, 0xd7, 0x19, 0x80, 0x35, 0xd2, 0xc8, 0xa6, 0x0, 0xd9, 0xc5, 0x72, 0x25, 0x1b, 0x54, 0x2a, 0xdb, 0x19, 0x8c, 0x3b, 0x5b, 0x59, 0x78, 0xe0, 0x93, 0x93, 0x27, 0x4d, 0x9, 0x79, 0x7b, 0xf2, 0xac, 0xc0, 0xcb, 0xe6, 0xc9, 0xe5, 0x1, 0xa3, 0xc6, 0x7a, 0x3c, 0x54, 0xb8, 0xbc, 0xc1, 0x69, 0xa6, 0x8a, 0x38, 0x89, 0xff, 0x5c, 0x2, 0x5, 0x97, 0x62, 0x77, 0x1e, 0xa9, 0xb8, 0x7b, 0x74, 0x84, 0xb4, 0x60, 0x4b, 0x20, 0xe1, 0xd3, 0x24, 0xf4, 0x8b, 0xc, 0x80, 0x7d, 0xcd, 0x88, 0x59, 0x7, 0x0, 0x31, 0x87, 0x69, 0x6a, 0xb, 0xbd, 0xbe, 0x5f, 0xa0, 0xb0, 0xb3, 0x73, 0x45, 0xf, 0xc4, 0x40, 0xf6, 0x98, 0x96, 0x7b, 0xaa, 0xb6, 0x7b, 0x62, 0x1d, 0x83, 0x46, 0xcc, 0x43, 0x46, 0x2b, 0x17, 0x1d, 0xe, 0x2e, 0x71, 0xd, 0x69, 0x6e, 0xc0, 0x5d, 0xfd, 0x51, 0x57, 0x8d, 0x62, 0x44, 0x37, 0x5a, 0xc6, 0xed, 0x69, 0x56, 0x82, 0x23, 0xf1, 0x7a, 0x67, 0xbd, 0xb1, 0x8c, 0x86, 0xaa, 0x9a, 0x98, 0x2b, 0x72, 0x69, 0xfd, 0x4, 0xe2, 0x78, 0xb9, 0xef, 0x1f, 0x37, 0x96, 0x86, 0xcd, 0x5b, 0x6f, 0x5e, 0xea, 0xd9, 0x1b, 0xf7, 0xd8, 0x54, 0x7e, 0xe8, 0x68, 0xd7, 0x1b, 0x6e, 0x7, 0xe9, 0x7, 0xe8, 0x88, 0x30, 0x18, 0xb2, 0x63, 0x80, 0xa1, 0x6e, 0x77, 0x9a, 0x3a, 0x86, 0x48, 0x3c, 0xcd, 0x67, 0x84, 0x73, 0xc3, 0x18, 0x38, 0xa0, 0x4e, 0x1a, 0xef, 0x78, 0x79, 0x37, 0x88, 0x33, 0xd, 0x16, 0x2d, 0x1a, 0xdb, 0xf9, 0xe0, 0xcb, 0x15, 0x51, 0xfc, 0x14, 0xec, 0xb8, 0x73, 0x56, 0xc6, 0x2e, 0xe1, 0x7f, 0x95, 0xd3, 0x8a, 0x63, 0x49, 0x17, 0xdd, 0x3a, 0x63, 0xc0, 0x7c, 0xd5, 0x93, 0x24, 0x19, 0x8d, 0x3f, 0xe6, 0xeb, 0x4a, 0xbd, 0x92, 0x8d, 0x78, 0xd8, 0xcf, 0xd9, 0xd0, 0x5b, 0x74, 0xf4, 0x4f, 0x69, 0x1c, 0x8c, 0xc3, 0x53, 0x3f, 0xac, 0x92, 0x6e, 0xcb, 0xf, 0xfa, 0x98, 0x9f, 0x50, 0x4a, 0x9d, 0xc7, 0x9c, 0xf8, 0x6f, 0x39, 0x52, 0x5a, 0x8d, 0xd3, 0xee, 0xcc, 0x4f, 0xd4, 0x84, 0x2f, 0xae, 0x92, 0xb0, 0x2c, 0xff, 0x25, 0xdd, 0xe9, 0xb0, 0x80, 0x14, 0xc3, 0x71, 0xf4, 0x1d, 0xf2, 0x26, 0x23, 0x52, 0x53, 0xb9, 0xb3, 0x6e, 0x1e, 0xa8, 0xc7, 0xe8, 0xf0, 0x81, 0xdc, 0xe, 0x95, 0x89, 0x91, 0x51, 0x5e, 0xea, 0x8, 0x55, 0xce, 0x7b, 0xdf, 0x3f, 0x2e, 0xfb, 0x1, 0x83, 0x16, 0x32, 0xc5, 0x5e, 0x6, 0x5a, 0x2e, 0xc4, 0xd1, 0x60, 0x48, 0x40, 0x73, 0x96, 0xb2, 0xdd, 0xc2, 0x33, 0xfa, 0x4, 0x22, 0xf8, 0x33, 0x94, 0x6a, 0xc3, 0x2c, 0xe1, 0x43, 0x20, 0x82, 0x0, 0x51, 0xd5, 0xa6, 0x8a, 0x76, 0x95, 0x85, 0x41, 0x67, 0x26, 0x4a, 0x64, 0x15, 0xbc, 0x7, 0x8d, 0xc3, 0x7c, 0x71, 0x7c, 0x83, 0xed, 0x78, 0x79, 0xd7, 0x76, 0xfd, 0x85, 0x99, 0xa7, 0x1f, 0x99, 0x9d, 0xd5, 0xaa, 0x2a, 0x53, 0xe9, 0xb6, 0xa3, 0x8c, 0xc1, 0x77, 0x5, 0x8f, 0x7a, 0x14, 0x7b, 0x6e, 0x4, 0x3b, 0x2b, 0x5a, 0xe5, 0x1, 0xd, 0x1, 0x7d, 0x32, 0x78, 0x5, 0xc8, 0x58, 0x61, 0x30, 0x81, 0xab, 0x49, 0x43, 0x98, 0x1c, 0xb7, 0x45, 0x74, 0x26, 0xb7, 0xa8, 0x57, 0xd2, 0xfe, 0xfa, 0x6, 0x3d, 0xfb, 0x65, 0x59, 0x97, 0x3, 0x64, 0x37, 0xd1, 0x8d, 0x82, 0x3, 0xf6, 0x8d, 0x89, 0xff, 0x56, 0x60, 0xd3, 0x10, 0xcb, 0x99, 0xf5, 0xca, 0x37, 0x8a, 0x9f, 0xb8, 0xf, 0xd8, 0x48, 0x52, 0xa0, 0x59, 0x1f, 0xe, 0x41, 0x31, 0x11, 0x0, 0xd1, 0x68, 0xac, 0x78, 0x67, 0xe5, 0x4d, 0x5c, 0x69, 0x38, 0xd7, 0x27, 0x23, 0xf2, 0x20, 0x16, 0xc9, 0x62, 0xeb, 0xaa, 0x67, 0x36, 0x8a, 0x17, 0x3c, 0xac, 0xa2, 0x65, 0x57, 0xb2, 0x76, 0xa2, 0x9e, 0xd4, 0x69, 0x7a, 0xfb, 0x6a, 0xe9, 0xbe, 0x48, 0xd7, 0xc4, 0x11, 0xa9, 0x17, 0x79, 0x85, 0xce, 0x34, 0xc0, 0xc1, 0xbc, 0x1f, 0xf8, 0x7d, 0x47, 0x68, 0x76, 0x70, 0x5d, 0x31, 0x57, 0xa7, 0x89, 0xb4, 0xf0, 0xa7, 0xdb, 0x6c, 0x27, 0x2e, 0xf4, 0xaf, 0x61, 0x4b, 0xd4, 0x21, 0x2, 0x9c, 0xf7, 0x4f, 0xd1, 0x7f, 0xf1, 0xb8, 0x2d, 0xb1, 0x90, 0xca, 0x13, 0xf0, 0x2e, 0x60, 0xa6, 0xf2, 0xb2, 0x61, 0xaa, 0x4f, 0xdf, 0xf7, 0x4e, 0x2d, 0xea, 0xb1, 0x82, 0x22, 0xc6, 0x74, 0xff, 0xed, 0x71, 0x1e, 0xf8, 0x87, 0xf7, 0xe4, 0xe6, 0x5, 0xe3, 0x24, 0x1b, 0x75, 0x1c, 0x58, 0x1e, 0x96, 0xe8, 0xb9, 0x18, 0x97, 0x4e, 0x90, 0x2, 0x2f, 0x8, 0x6e, 0xf, 0x92, 0xb6, 0x3f, 0xd7, 0x96, 0x3d, 0xc1, 0xd0, 0xf5, 0xca, 0xfa, 0x1e, 0xb9, 0xdf, 0x69, 0xc3, 0x2b, 0x9d, 0x1b, 0xde, 0x99, 0xe8, 0x91, 0x93, 0xb9, 0x74, 0xd4, 0x14, 0x53, 0xef, 0xd3, 0x67, 0x83, 0xf9, 0x2b, 0xf2, 0xcb, 0xe1, 0xef, 0x6d, 0xc5, 0x6e, 0xa2, 0xe, 0xe9, 0xac, 0x1f, 0x3a, 0x74, 0x35, 0xdc, 0xc2, 0x1a, 0x20, 0x66, 0xc6, 0x3b, 0x74, 0x63, 0x43, 0xe5, 0x65, 0x18, 0x2a, 0x94, 0x1c, 0xd2, 0x29, 0x98, 0xaa, 0x34, 0x13, 0x8, 0x8a, 0xd2, 0x80, 0x11, 0x20, 0xf5, 0x62, 0xf6, 0x4b, 0x7a, 0xf5, 0x5d, 0x3c, 0x66, 0x21, 0xba, 0x13, 0x1, 0xee, 0xed, 0x65, 0x26, 0x61, 0xbc, 0x22, 0x18, 0x4b, 0xdb, 0x9a, 0x9a, 0xea, 0xb6, 0x7c, 0xb1, 0x8d, 0x85, 0x61, 0x2e, 0x7d, 0x8f, 0x7a, 0xa2, 0xf7, 0xd2, 0xa6, 0xb3, 0xc4, 0x54, 0x5b, 0x40, 0x51, 0x7a, 0x4a, 0x74, 0xcb, 0xf, 0xbd, 0x46, 0x10, 0xaf, 0x86, 0x87, 0xbd, 0x69, 0x29, 0xdd, 0xef, 0x85, 0xc0, 0xf7, 0x4c, 0x66, 0xdb, 0xf6, 0x4a, 0x83, 0xbe, 0x10, 0x77, 0xec, 0xab, 0xc, 0x5e, 0xc9, 0x29, 0x91, 0xc6, 0xb8, 0x65, 0x2b, 0xda, 0x8e, 0x6c, 0x8, 0x8b, 0xe, 0xba, 0x61, 0xc9, 0x0, 0x61, 0x58, 0xb4, 0x8f, 0x88, 0xd8, 0x25, 0x7a, 0xd3, 0xf, 0x7a, 0xa5, 0xf, 0xa0, 0xed, 0xfa, 0x2, 0x5f, 0xbb, 0x70, 0x28, 0xbb, 0x97, 0x83, 0x96, 0x71, 0x4b, 0xcd, 0xc2, 0x62, 0x22, 0x90, 0xf9, 0x7, 0xb8, 0x42, 0x47, 0xb7, 0xb, 0x71, 0xaa, 0xf6, 0x8, 0x31, 0x5d, 0xdf, 0xc7, 0x8c, 0x9a, 0xe4, 0x29, 0x71, 0x95, 0xeb, 0x95, 0x6a, 0x79, 0x90, 0x89, 0x1d, 0x5c, 0x83, 0xda, 0x71, 0xd4, 0x5c, 0x8e, 0xc9, 0x37, 0x9e, 0xee, 0xe0, 0xf8, 0xf0, 0x1a, 0x29, 0xcb, 0xb5, 0x8b, 0x41, 0xec, 0x75, 0xd9, 0x5, 0xc7, 0x7a, 0xe5, 0x33, 0xc5, 0x12, 0x2b, 0x90, 0x7b, 0x6d, 0x2c, 0x6e, 0x4f, 0x42, 0x3f, 0x69, 0x14, 0xc5, 0x8d, 0x1, 0xb, 0xd4, 0xf2, 0x6b, 0xef, 0x38, 0x23, 0x58, 0x7c, 0x95, 0xc7, 0xbb, 0x86, 0x70, 0xca, 0x75, 0x12, 0xe8, 0xd7, 0x22, 0x36, 0x19, 0xcc, 0xd9, 0xb8, 0x8c, 0x61, 0x58, 0xb1, 0x50, 0xb, 0x92, 0x23, 0xae, 0x31, 0xbe, 0x27, 0xd5, 0x9, 0xdd, 0xee, 0x72, 0xbb, 0x1c, 0x29, 0x8e, 0x30, 0x8c, 0x46, 0xcd, 0xdb, 0x93, 0xe5, 0x0, 0xa0, 0xb5, 0x4b, 0x41, 0x81, 0x3b, 0xba, 0x52, 0x8e, 0xc1, 0xf8, 0xfd, 0x6e, 0x7, 0xf, 0x73, 0xe0, 0x28, 0x9a, 0xf5, 0x34, 0x67, 0xc, 0x8d, 0x2d, 0xdc, 0x98, 0xe9, 0x5f, 0xee, 0x6b, 0x39, 0xf3, 0xf3, 0x68, 0x10, 0x12, 0xb5, 0xbe, 0x2, 0x8c, 0x3c, 0xfe, 0x7b, 0x2d, 0xa5, 0xd7, 0xef, 0xf3, 0xff, 0x35, 0x2b, 0x64, 0x50, 0xeb, 0x47, 0x10, 0xee, 0x54, 0x89, 0x9d, 0x9a, 0x9, 0xb0, 0xf2, 0xd1, 0xa, 0x8b, 0xb1, 0x77, 0xbc, 0x30, 0xea, 0xd3, 0x8c, 0xd2, 0x99, 0x33, 0xa7, 0x15, 0x60, 0x8e, 0x62, 0x5d, 0x35, 0xd9, 0x19, 0xab, 0xcc, 0xbb, 0x58, 0xf7, 0xc2, 0x3a, 0x4, 0x7f, 0xec, 0xf9, 0xa9, 0x22, 0x69, 0x30, 0x43, 0x8e, 0x30, 0xf2, 0x62, 0x18, 0x7c, 0x7f, 0xc7, 0xaa, 0x87, 0x2c, 0x36, 0x51, 0xc6, 0x32, 0x47, 0x9c, 0x26, 0x87, 0x77, 0x7e, 0x15, 0x22, 0x58, 0x97, 0x2f, 0xa4, 0xfa, 0xa6, 0x76, 0x33, 0x86, 0x2b, 0xd2, 0x42, 0x32, 0x48, 0x43, 0xd, 0x1f, 0x44, 0x45, 0x65, 0xac, 0x1a, 0x6a, 0x39, 0xd9, 0x15, 0x36, 0xe0, 0x3, 0x66, 0x7d, 0x88, 0xdf, 0x89, 0xd9, 0xd1, 0xcf, 0x90, 0x94, 0x51, 0xc4, 0xfc, 0xe3, 0x55, 0x6b, 0x25, 0x10, 0x1e, 0x88, 0x7f, 0xa8, 0xed, 0x5a, 0xa8, 0xd6, 0xfc, 0x2d, 0xa1, 0x4c, 0xf3, 0x79, 0xa5, 0x4e, 0x3d, 0xa7, 0x98, 0x7f, 0xf2, 0xc8, 0x11, 0xda, 0xd, 0xe4, 0x86, 0x25, 0xbc, 0x8c, 0x4d, 0xc3, 0x45, 0xc4, 0xd1, 0x95, 0xec, 0xed, 0xe0, 0xd1, 0x8a, 0xc3, 0x70, 0x9b, 0x4b, 0x6a, 0x8a, 0xea, 0x78, 0xa9, 0x79, 0xa6, 0x46, 0x2c, 0xc0, 0xf1, 0x94, 0x43, 0x9, 0x6e, 0x39, 0x2b, 0x3e, 0x14, 0x26, 0x90, 0x16, 0x3c, 0xa2, 0x8f, 0x1, 0xbd, 0x60, 0x69, 0x58, 0xf6, 0xa5, 0x11, 0xaf, 0x5b, 0x19, 0x1f, 0xf, 0x37, 0x37, 0x3f, 0xb4, 0x51, 0xe2, 0x8e, 0xeb, 0xe2, 0x71, 0xe6, 0x31, 0xce, 0x1f, 0xaf, 0x9, 0x56, 0x6d, 0x8c, 0x6e, 0x1d, 0x4b, 0xb3, 0x89, 0x68, 0x78, 0x58, 0x29, 0x66, 0x7e, 0x37, 0x53, 0x87, 0x12, 0x30, 0x6a, 0x69, 0xce, 0x67, 0xdd, 0x50, 0x2f, 0x1, 0xca, 0xd3, 0x56, 0xa, 0xb6, 0x96, 0xfc, 0x2a, 0x51, 0x44, 0xb5, 0x53, 0xfc, 0x44, 0xb5, 0xf1, 0xba, 0xe4, 0x64, 0xb, 0x13, 0x47, 0xa9, 0x9c, 0xe9, 0x8e, 0x22, 0x4f, 0x88, 0x10, 0x98, 0x3d, 0x64, 0x15, 0x4a, 0x7f, 0xf5, 0xcc, 0xab, 0xc1, 0x38, 0xe4, 0xc4, 0x22, 0x57, 0xdc, 0x2b, 0x5e, 0x56, 0x91, 0xfc, 0xe4, 0xbf, 0x4a, 0x88, 0x96, 0x5a, 0xa3, 0x46, 0x8, 0x71, 0xa6, 0xea, 0xa3}, - output224: []byte{0x88, 0xf4, 0x69, 0x98, 0x92, 0xc2, 0x1e, 0x5, 0x64, 0x5a, 0x3, 0x5a, 0xe6, 0x62, 0x59, 0xd4, 0x46, 0xaf, 0xba, 0xa2, 0x2e, 0x35, 0x2a, 0xe1, 0x8f, 0x66, 0x8c, 0x9e}, - output256: []byte{0xa3, 0xba, 0xd4, 0x19, 0x5, 0xd8, 0xd5, 0x9, 0x95, 0x1e, 0xbe, 0xcc, 0xf3, 0x14, 0x8d, 0x52, 0x34, 0xd3, 0x98, 0x7b, 0x34, 0x84, 0x42, 0x70, 0xdc, 0xe8, 0x15, 0x8f, 0x15, 0x4, 0x51, 0x1e}, - output384: []byte{0x92, 0xce, 0x8d, 0xbe, 0xab, 0xa7, 0x35, 0x97, 0x51, 0x93, 0x9f, 0x3b, 0x5c, 0x8f, 0xa6, 0xdf, 0x41, 0xc2, 0xe5, 0x4b, 0x42, 0x86, 0x41, 0xac, 0xa9, 0x1e, 0x41, 0xeb, 0x52, 0xc5, 0x8d, 0x41, 0xe1, 0x34, 0x84, 0xa7, 0x41, 0x43, 0xaa, 0xd5, 0x45, 0xc8, 0xfe, 0x62, 0xf, 0xb7, 0xfa, 0x72}, - output512: []byte{0x39, 0x20, 0x5e, 0x6d, 0xff, 0x23, 0x16, 0xf0, 0x0, 0xa6, 0xe8, 0x2d, 0x56, 0x3e, 0x79, 0xa9, 0x2, 0x72, 0x80, 0xa5, 0xef, 0xbd, 0x6e, 0xf2, 0x46, 0x43, 0x62, 0xcf, 0xc9, 0x3f, 0xe, 0x25, 0xfd, 0xa2, 0xc6, 0x11, 0xd, 0x40, 0x45, 0x1a, 0x63, 0x52, 0xf9, 0x5e, 0x32, 0xb6, 0x66, 0x20, 0x42, 0x7e, 0x3a, 0x95, 0x9e, 0x21, 0x55, 0xa1, 0x46, 0x97, 0xc0, 0x75, 0x61, 0x18, 0x5e, 0xae}}, - testcase{ - msg: []byte{0xfb, 0xb3, 0x6a, 0x6d, 0x35, 0xfa, 0x8c, 0x1, 0x74, 0xbf, 0x87, 0xfd, 0x3c, 0x23, 0x2d, 0x1f, 0x60, 0x59, 0xb8, 0xc4, 0x3c, 0xbd, 0x71, 0x6, 0xae, 0xa4, 0x6, 0xca, 0x2e, 0xfd, 0xca, 0xbe, 0xcf, 0x3b, 0x5, 0xdb, 0x8a, 0xe5, 0x3c, 0xf9, 0x8e, 0x86, 0x6d, 0xfc, 0x5e, 0xe7, 0x14, 0xea, 0x3c, 0x55, 0x58, 0x2, 0xf7, 0x51, 0x55, 0x98, 0x56, 0xb, 0xb3, 0x5e, 0xf, 0xb, 0x26, 0xd5, 0xf5, 0x1b, 0x81, 0xfd, 0xce, 0x91, 0x4e, 0x36, 0x51, 0xc2, 0x19, 0x51, 0xcc, 0x45, 0xdb, 0x3b, 0x48, 0x8, 0x21, 0xe4, 0x16, 0x54, 0x36, 0x8b, 0x32, 0x59, 0xe9, 0x53, 0x50, 0x16, 0x21, 0xfa, 0x54, 0x91, 0x14, 0xd8, 0xa, 0x53, 0x4f, 0xee, 0x58, 0x3a, 0xd6, 0x1d, 0x68, 0x1c, 0x4f, 0xe4, 0x2, 0x92, 0x5d, 0x3b, 0xc7, 0x2a, 0x7a, 0x63, 0xd0, 0x42, 0xcf, 0x5, 0x1e, 0xa2, 0xfb, 0xd2, 0xb1, 0x10, 0x1, 0x7d, 0x31, 0x21, 0x8f, 0xa0, 0xbd, 0xa8, 0x42, 0x86, 0x46, 0x57, 0x40, 0xd5, 0x49, 0xf7, 0x3, 0x54, 0x92, 0xb2, 0xc0, 0xa2, 0x82, 0x54, 0x4c, 0xc5, 0x36, 0xb8, 0xe4, 0xeb, 0x86, 0x95, 0x43, 0x7d, 0x60, 0x38, 0xb1, 0x3f, 0x91, 0x25, 0xf8, 0xc4, 0x79, 0x9c, 0xea, 0xf8, 0x53, 0x39, 0x53, 0xe, 0x47, 0x8a, 0xe2, 0xec, 0xd4, 0xff, 0x90, 0x9b, 0xab, 0x84, 0x9a, 0x18, 0xcd, 0xd7, 0x75, 0xb6, 0x75, 0x88, 0x8, 0x14, 0x1b, 0x94, 0xf1, 0xa2, 0x43, 0xbc, 0xa4, 0x98, 0x1c, 0x9d, 0x4b, 0x7a, 0x29, 0xce, 0x53, 0xa2, 0xc1, 0x7c, 0x3e, 0x62, 0xe6, 0x57, 0xbf, 0x51, 0xb6, 0x16, 0x34, 0x2, 0xd6, 0xc3, 0x3f, 0x17, 0xfc, 0xea, 0x97, 0x9e, 0x40, 0xb0, 0xd6, 0xad, 0xaf, 0x57, 0x2a, 0x79, 0x3, 0xa, 0xac, 0x63, 0xe0, 0x2e, 0x99, 0x31, 0xb, 0x13, 0x3b, 0xc0, 0x7, 0xaa, 0xc9, 0xfc, 0x85, 0x64, 0x20, 0xa, 0x9b, 0xbb, 0xa0, 0xf5, 0xb1, 0x22, 0x8b, 0x7d, 0x9e, 0x86, 0x9d, 0xd8, 0x24, 0x31, 0x95, 0x68, 0xce, 0xee, 0xd7, 0xa9, 0xc8, 0x7e, 0x5a, 0x5c, 0x20, 0xa6, 0xf6, 0x58, 0x79, 0x15, 0xd, 0x8d, 0x27, 0x9f, 0x13, 0x76, 0x96, 0xe, 0x80, 0xa6, 0xe1, 0xcc, 0x92, 0x9b, 0x30, 0x40, 0x67, 0x65, 0xba, 0xe9, 0x7b, 0x22, 0xd0, 0x8e, 0x2, 0x25, 0xbc, 0x32, 0xe, 0xb5, 0x0, 0x4d, 0xb4, 0xf4, 0x64, 0x8e, 0x6b, 0x8f, 0x8f, 0x1f, 0xf1, 0x31, 0x82, 0xd1, 0xb2, 0x8, 0x38, 0xca, 0xf6, 0x9b, 0x5, 0x4e, 0x72, 0xdf, 0x7, 0xe3, 0xe5, 0xc5, 0x3c, 0x66, 0x92, 0x81, 0xe2, 0x27, 0xa1, 0x3f, 0xf0, 0xf6, 0x35, 0x5, 0x78, 0xf2, 0xe2, 0x57, 0xd9, 0xa2, 0xdb, 0xbe, 0x67, 0x3f, 0x8d, 0x46, 0x66, 0xf3, 0xfe, 0x6b, 0x46, 0xe0, 0x7, 0xa0, 0x8d, 0x4c, 0x79, 0xfc, 0xcd, 0x4c, 0x82, 0x44, 0xde, 0xf3, 0xda, 0x4b, 0x86, 0x19, 0xb2, 0x38, 0x9f, 0xc7, 0x9d, 0x5c, 0x15, 0x43, 0x2b, 0x67, 0x21, 0x21, 0xff, 0x14, 0xb5, 0x87, 0x42, 0xdc, 0xd5, 0x65, 0xec, 0x5e, 0xac, 0x78, 0xb, 0xb8, 0x83, 0x2d, 0xa1, 0x6c, 0x33, 0x7, 0xb8, 0xe6, 0x3d, 0x41, 0x50, 0xe, 0x61, 0x8c, 0x8f, 0xa9, 0xee, 0x7, 0x7f, 0x4a, 0x98, 0x23, 0x68, 0x9, 0xca, 0xa3, 0xf3, 0xdf, 0xfc, 0xea, 0x6e, 0xec, 0x7d, 0xc3, 0x76, 0x22, 0x6c, 0x80, 0xc5, 0xb1, 0xdf, 0x3e, 0xc1, 0x61, 0xc9, 0x99, 0x3d, 0xef, 0x39, 0x3, 0xd5, 0x42, 0xeb, 0xec, 0x84, 0x4c, 0x2e, 0x7e, 0x69, 0xfc, 0x21, 0x5b, 0xc5, 0x9f, 0xe8, 0x6d, 0x5e, 0x98, 0xf9, 0x8e, 0x3b, 0x82, 0x37, 0xd5, 0x4c, 0xb2, 0xc2, 0x8b, 0x41, 0x47, 0x0, 0xe1, 0xe9, 0x77, 0xb1, 0x45, 0xc7, 0x68, 0x30, 0x1e, 0x78, 0xb9, 0x31, 0x1, 0x19, 0xbe, 0xad, 0xf6, 0x95, 0xa0, 0x5c, 0x50, 0x9d, 0x95, 0x86, 0x3c, 0x42, 0x36, 0xa3, 0xb9, 0x9c, 0x19, 0x97, 0xec, 0x73, 0x9e, 0xf4, 0xf3, 0xd7, 0x4d, 0xad, 0x5f, 0xdc, 0x66, 0xe4, 0x94, 0xea, 0xc4, 0x63, 0x84, 0x48, 0x74, 0xd6, 0xa9, 0xad, 0xba, 0x89, 0x1c, 0x61, 0x7a, 0x9f, 0x98, 0xd8, 0x30, 0xfb, 0xe, 0x24, 0xcc, 0x9, 0xb7, 0x1, 0x14, 0xb3, 0x2c, 0xf2, 0x42, 0xb7, 0xc1, 0x10, 0x71, 0x5f, 0x29, 0x58, 0x21, 0x95, 0x96, 0xe0, 0xaa, 0xcc, 0xab, 0x5d, 0xca, 0x7a, 0xeb, 0x2c, 0x16, 0x49, 0x35, 0x8d, 0xd9, 0x58, 0x17, 0xeb, 0x35, 0xce, 0xf4, 0xdf, 0x99, 0x72, 0x42, 0xec, 0xf3, 0x87, 0xd6, 0xa0, 0x61, 0x49, 0xe6, 0xb4, 0x66, 0x12, 0x3, 0x62, 0x75, 0x16, 0x81, 0x2d, 0x74, 0x72, 0xb4, 0xd3, 0xf0, 0x5f, 0x1a, 0xa2, 0x0, 0xd5, 0x99, 0x2, 0x1, 0xe9, 0x7d, 0xa0, 0xf3, 0xd3, 0xac, 0xc8, 0x13, 0x77, 0x75, 0x2c, 0x7b, 0x94, 0x55, 0xb5, 0x91, 0xab, 0x6b, 0x46, 0xaf, 0xe8, 0xdb, 0xde, 0x73, 0x2a, 0x96, 0x64, 0xa4, 0x21, 0x75, 0xc2, 0x9, 0x89, 0xb5, 0xa3, 0x7, 0x20, 0x9f, 0x64, 0xb0, 0xf2, 0xaa, 0x0, 0xbd, 0x29, 0x7f, 0x8e, 0xb7, 0x2e, 0xca, 0x72, 0x55, 0xb9, 0x9f, 0x7, 0x29, 0x8b, 0x1c, 0x59, 0xe3, 0xd4, 0x13, 0x32, 0x7e, 0xf9, 0x94, 0xeb, 0xcc, 0xae, 0xd1, 0xd9, 0x86, 0x50, 0xa, 0xd2, 0xde, 0x59, 0x15, 0x90, 0x8d, 0xbe, 0xaf, 0xa0, 0x4, 0x98, 0xfa, 0x37, 0x4e, 0xed, 0x25, 0x37, 0xe0, 0x45, 0x5e, 0xc5, 0x6, 0xf, 0x8c, 0xbc, 0xa7, 0x70, 0x29, 0xcf, 0x2f, 0x21, 0xb0, 0xd2, 0xef, 0x29, 0x95, 0x2, 0x22, 0x94, 0x7d, 0x3b, 0x92, 0x6b, 0xcd, 0xaf, 0x61, 0x61, 0x5f, 0x73, 0xf0, 0x19, 0x5e, 0xbf, 0x18, 0x9c, 0xbf, 0xbd, 0x25, 0x7, 0x5e, 0x6c, 0x70, 0x64, 0xa, 0x81, 0xe6, 0x4c, 0x36, 0xb5, 0x42, 0x32, 0xcd, 0x76, 0xef, 0x24, 0xae, 0xcd, 0x8e, 0x61, 0x9f, 0x65, 0x2a, 0xff, 0xaa, 0x27, 0xa3, 0x9f, 0xec, 0x7e, 0xf7, 0xdf, 0x3b, 0x6c, 0x9d, 0x3, 0xb5, 0x1c, 0x9, 0x75, 0xec, 0xc0, 0xce, 0x4c, 0x9, 0xca, 0x29, 0xf5, 0x63, 0x80, 0xf0, 0xb2, 0xb2, 0x93, 0x32, 0x1e, 0xca, 0x37, 0xa6, 0x67, 0x5f, 0x43, 0xcc, 0x7d, 0x7a, 0x4a, 0x19, 0x6d, 0x3d, 0x11, 0xac, 0xa3, 0x5a, 0x54, 0xec, 0xa6, 0xd, 0xb9, 0x65, 0xee, 0x1d, 0xb7, 0x9, 0x5d, 0x48, 0x1f, 0x1f, 0x27, 0x6f, 0x6a, 0xb4, 0xc0, 0xb3, 0x73, 0x98, 0xc7, 0x6e, 0xd4, 0xa5, 0xcf, 0x2b, 0xb7, 0xb9, 0xc4, 0x1, 0xe2, 0x68, 0x6f, 0xf8, 0x67, 0x8a, 0xc6, 0xc1, 0xd1, 0x41, 0xc3, 0xa4, 0xd, 0x41, 0xc4, 0x4b, 0x3f, 0x29, 0x33, 0xdd, 0x4b, 0x25, 0x8e, 0xdb, 0x45, 0xdb, 0x56, 0x75, 0x98, 0x4e, 0x68, 0x80, 0xc3, 0x92, 0x7d, 0xd5, 0x8, 0x7f, 0x94, 0xe1, 0x22, 0x28, 0x3f, 0xb7, 0x6c, 0xf, 0x62, 0x2b, 0x67, 0x14, 0x77, 0xb2, 0xc5, 0x35, 0x19, 0x3d, 0x1f, 0x43, 0x30, 0xec, 0x9, 0xcd, 0xa0, 0x3a, 0x1e, 0x4c, 0xcd, 0x1a, 0x6, 0x44, 0x7e, 0x7, 0x8a, 0xb7, 0xa3, 0x7e, 0x34, 0xe5, 0x4c, 0x2e, 0xd, 0x91, 0x15, 0x93, 0xff, 0x52, 0x2e, 0xd9, 0x4b, 0x5f, 0xfc, 0x14, 0xe6, 0x2f, 0xd2, 0x1d, 0x0, 0xd7, 0xe5, 0xbc, 0xbe, 0xc5, 0x19, 0xd, 0x5a, 0x40, 0x61, 0x5f, 0xf6, 0x47, 0x40, 0xa1, 0xd3, 0x1d, 0xc, 0xdd, 0x7, 0xe3, 0x9b, 0xbb, 0x4f, 0x61, 0x5a, 0x4a, 0x3, 0x45, 0xaf, 0x40, 0xd0, 0x64, 0x7f, 0x35, 0x4f, 0x96, 0xff, 0x2a, 0xf3, 0xef, 0xbe, 0x25, 0xb9, 0xe3, 0x8e, 0x1c, 0x55, 0x50, 0x96, 0x8a, 0x18, 0xbe, 0x6d, 0xa2, 0x52, 0xa5, 0xbc, 0x86, 0x1c, 0xfe, 0x2d, 0x9c, 0xe8, 0x4f, 0x56, 0xb0, 0x7, 0x1c, 0xba, 0xd9, 0x37, 0xc9, 0x47, 0xc5, 0x8d, 0x3, 0x1, 0xe5, 0x1d, 0xd1, 0xc3, 0x14, 0x6f, 0x78, 0x10, 0xd7, 0x95, 0x20, 0x4b, 0xc0, 0xc7, 0xfb, 0x71, 0xf9, 0x62, 0x24, 0xbe, 0x40, 0x9f, 0xf7, 0x32, 0xe1, 0x4d, 0xb1, 0xc2, 0xcd, 0xab, 0xa7, 0xcc, 0x74, 0x6c, 0x4f, 0xee, 0xd8, 0x29, 0xa7, 0x7, 0x7f, 0x48, 0xc7, 0xf4, 0x66, 0xd1, 0xec, 0xc, 0x89, 0xe3, 0xe2, 0x47, 0xd1, 0x5a, 0x4a, 0x63, 0x11, 0x4e, 0xa1, 0xe6, 0xfd, 0x85, 0x5c, 0x98, 0xcd, 0x78, 0x70, 0xce, 0xfc, 0x75, 0xec, 0xc8, 0x11, 0x4f, 0x11, 0x35, 0xa1, 0x54, 0xd, 0xe6, 0xa8, 0xe1, 0xc0, 0x5c, 0x9d, 0x6d, 0xc5, 0x54, 0xa6, 0xb0, 0x8e, 0x86, 0xc8, 0x15, 0x8e, 0xb3, 0xd8, 0x44, 0xc5, 0x34, 0x8a, 0x61, 0xd5, 0x4a, 0x65, 0x59, 0xb0, 0xb7, 0xf4, 0xbc, 0x59, 0x25, 0x58, 0x20, 0xa, 0x28, 0x9c, 0xcc, 0xf3, 0x9a, 0xa3, 0x8, 0x78, 0x23, 0x70, 0xb2, 0x98, 0x1c, 0xb5, 0xee, 0x5, 0x7, 0x10, 0xe0, 0x12, 0xd4, 0xf5, 0x8a, 0x9d, 0x1e, 0x2e, 0xb, 0x9d, 0xd5, 0xa3, 0x53, 0x24, 0x55, 0xfb, 0xcc, 0x1d, 0xba, 0xbd, 0xf0, 0x41, 0xf0, 0xe7, 0xb9, 0xdb, 0xac, 0x80, 0x5a, 0x50, 0x38, 0x32, 0xdf, 0x59, 0xb2, 0x9d, 0xd, 0x1d, 0xd6, 0xe7, 0x5e, 0x73, 0x5d, 0xf9, 0x8, 0x2b, 0x45, 0x8d, 0xd1, 0x9, 0x20, 0xc2, 0xcb, 0x72, 0xca, 0x4a, 0xe2, 0x8b, 0x63, 0x81, 0x57, 0x85, 0x65, 0x6a, 0x7b, 0xd8, 0x97, 0xf1, 0x43, 0x63, 0x93, 0x78, 0xd, 0xac, 0x60, 0x4, 0xf6, 0x8a, 0x74, 0x5b, 0x23, 0x59, 0x13, 0xc5, 0x36, 0xdb, 0xd5, 0xc2, 0x3e, 0xac, 0xc6, 0xba, 0xe6, 0x35, 0xc9, 0x49, 0xef, 0xdd, 0x29, 0x41, 0xd9, 0xf1, 0xa9, 0x3e, 0xd9, 0x44, 0x18, 0x4, 0x27, 0xff, 0x57, 0xd0, 0xae, 0x76, 0xa5, 0xd5, 0x84, 0x43, 0xf, 0xa0, 0x31, 0xd8, 0x96, 0x98, 0x83, 0xe0, 0x9e, 0x85, 0x3e, 0x6a, 0x29, 0x92, 0x1d, 0x70, 0x21, 0x4b, 0xbe, 0x2f, 0x74, 0x77, 0xcc, 0xc9, 0xf1, 0x6d, 0x18, 0xef, 0x69, 0x11, 0x9, 0x1d, 0x2e, 0x62, 0xa8, 0xc0, 0x5, 0x67, 0xb8, 0x31, 0xfc, 0x79, 0xce, 0x5d, 0xd6, 0x5a, 0x95, 0x30, 0x4f, 0xb7, 0xb0, 0xc5, 0x6c, 0xd4, 0xd7, 0xfe, 0xf1, 0x5d, 0xe5, 0xfb, 0xd1, 0x9e, 0x31, 0x2e, 0xf7, 0x6c, 0x58, 0xc6, 0x76, 0x45, 0x0, 0x3b, 0xf0, 0xa5, 0x56, 0x10, 0xf7, 0xa6, 0xc, 0x7d, 0x7c, 0x54, 0x18, 0xee, 0x4, 0xc4, 0x5f, 0xfb, 0xdf, 0x3d, 0x9c, 0x3c, 0x79, 0x2a, 0x5e, 0x92, 0x97, 0x9d, 0x6f, 0x8d, 0x19, 0x98, 0xc0, 0xa, 0x2, 0xc, 0xf, 0x19, 0x74, 0xbb, 0x86, 0x73, 0x35, 0x28, 0x8f, 0x0, 0x6d, 0xd0, 0xe9, 0x73, 0xa3, 0x76, 0xf3, 0x53, 0xac, 0xd, 0x97, 0x64, 0x69, 0x24, 0xc1, 0xb3, 0x5c, 0x27, 0x4e, 0x6a, 0xd1, 0x10, 0x3a, 0x1b, 0xde, 0xce, 0xe5, 0x3d, 0x2c, 0xde, 0x46, 0x86, 0xbd, 0x6a, 0xab, 0x94, 0x7, 0xa5, 0x68, 0xc7, 0xe0, 0x29, 0xb8, 0x65, 0x57, 0x61, 0x7c, 0x26, 0x15, 0x90, 0x38, 0x42, 0x59, 0xb3, 0x9, 0x3e, 0x0, 0x98, 0xf1, 0x1c, 0x17, 0xde, 0x72, 0x10, 0x11, 0x3d, 0x58, 0x6b, 0x46, 0x24, 0xc2, 0xe0, 0x52, 0xae, 0x67, 0x38, 0xef, 0x10, 0xcc, 0xcc, 0x72, 0x8f, 0x2a, 0xe1, 0x11, 0x45, 0x8e, 0x5f, 0xa1, 0xa9, 0x3e, 0xa3, 0xa5, 0x94, 0xe0, 0x3a, 0xa1, 0xc6, 0x5e, 0x54, 0x71, 0xf2, 0x4f, 0x3b, 0x8a, 0xa1, 0x26, 0xc3, 0x85, 0x6, 0x2a, 0x2f, 0xbc, 0x2a, 0xe2, 0xf2, 0x95, 0x18, 0x74, 0xbb, 0xb6, 0x4e, 0x2, 0xf3, 0x0, 0x9a, 0x57, 0x59, 0x41, 0xd4, 0x23, 0x5b, 0x6, 0xc1, 0xfe, 0x45, 0x1a, 0x82, 0x5c, 0xe9, 0x1b, 0xe5, 0x9b, 0xab, 0x85, 0xda, 0x91, 0x64, 0x5e, 0xe, 0x2b, 0x8c, 0xe3, 0x74, 0xdf, 0xb0, 0x54, 0xa4, 0x8, 0x9, 0xf2, 0x6d, 0xb0, 0xae, 0xc5, 0x34, 0xab, 0x5c, 0xc2, 0x7e, 0x27, 0x47, 0x7f, 0x1c, 0x1a, 0x72, 0x9f, 0x2c, 0xc0, 0xc1, 0x1f, 0xc5, 0x14, 0x17, 0xb7, 0x14, 0x43, 0xb6, 0x57, 0xfd, 0x79, 0xda, 0x80, 0x7b, 0xb0, 0x1c, 0xd0, 0x1b, 0x3, 0x6c, 0x67, 0x37, 0x25, 0x8e, 0x60, 0xda, 0x37, 0x6d, 0xf0, 0x80, 0x89, 0xf4, 0x10, 0x56, 0xfc, 0x45, 0x40, 0x44, 0xe0, 0xf1, 0xd1, 0x73, 0xa7, 0xe6, 0xf1, 0x13, 0x55, 0x85, 0x1d, 0x36, 0x62, 0x6a, 0x4c, 0x3e, 0x89, 0x72, 0x1f, 0xe6, 0x59, 0xbf, 0x58, 0xb7, 0x2e, 0x41, 0x1b, 0x1, 0x5b, 0xf1, 0x33, 0x96, 0xb2, 0x69, 0x14, 0x2c, 0x57, 0x6a, 0x59, 0x76, 0xab, 0x35, 0x2e, 0x17, 0x8, 0xc1, 0x90, 0x8c, 0x43, 0xd8, 0x73, 0x96, 0x4a, 0x9, 0x77, 0x21, 0xa6, 0x4, 0x85, 0x0, 0x2f, 0x46, 0x75, 0xc5, 0xa5, 0xf5, 0x82, 0xed, 0x4b, 0xc7, 0x78, 0x6e, 0xeb, 0x2d, 0x49, 0x23, 0x2d, 0xad, 0xd6, 0x64, 0x9b, 0xd9, 0xce, 0xc3, 0x2d, 0x69, 0x1, 0xea, 0x5c, 0xda, 0x7b, 0xa8, 0x38, 0x81, 0x7d, 0xb8, 0xc0, 0xaf, 0xc2, 0x54, 0xb9, 0x4e, 0x4a, 0xa3, 0x9c, 0x6, 0x71, 0xec, 0x45, 0xca, 0xc7, 0xa, 0x73, 0xbd, 0xc7, 0x7e, 0x82, 0x1c, 0xd8, 0xba, 0xa7, 0x7d, 0xf6, 0xed, 0xf, 0x3f, 0x79, 0x38, 0x6d, 0xe1, 0xfd, 0x7d, 0x7d, 0x81, 0xae, 0x7e, 0x5, 0xdb, 0x6d, 0x1d, 0x9c, 0xce, 0x8f, 0x42, 0xed, 0x4f, 0xfb, 0x1a, 0x7f, 0xbe, 0xc6, 0x29, 0x84, 0xde, 0xa7, 0x4c, 0x94, 0x80, 0x94, 0x5e, 0xb9, 0x16, 0x75, 0x2e, 0xc9, 0xe0, 0x60, 0x68, 0x15, 0xf8, 0xd5, 0x77, 0x9c, 0xee, 0xfd, 0x2d, 0xf4, 0x97, 0x75, 0xa1, 0xca, 0x29, 0x46, 0x5a, 0xc9, 0x78, 0x39, 0x44, 0xa0, 0x61, 0x72, 0x79, 0x30, 0x3a, 0xb8, 0x6c, 0x2a, 0xee, 0xb1, 0xab, 0x4e, 0xf1, 0xff, 0xf7, 0x46, 0x5e, 0xa6, 0x85, 0x1, 0x9, 0xd7, 0x70, 0xc9, 0x90, 0xb8, 0x42, 0xa0, 0xa5, 0xdb, 0xb1, 0xcc, 0x14, 0xea, 0x49, 0x47, 0xa3, 0x56, 0x67, 0x8f, 0xda, 0x4e, 0xc4, 0x4f, 0xc9, 0xd8, 0xfa, 0x35, 0x2a, 0x54, 0x6a, 0x24, 0x85, 0xf8, 0x42, 0xa6, 0xbf, 0xac, 0x20, 0xde, 0xb0, 0x45, 0x87, 0x62, 0xa7, 0x2d, 0xd4, 0xa0, 0x39, 0xd6, 0x4a, 0xd8, 0x48, 0x5d, 0x9f, 0x1c, 0x4d, 0x67, 0xeb, 0xb8, 0x7b, 0x99, 0xfa, 0x95, 0xcd, 0x5b, 0x38, 0xdf, 0x8e, 0x32, 0xcb, 0x6e, 0xff, 0x14, 0x1, 0xd0, 0xd2, 0xcd, 0x20, 0xa7, 0xdb, 0xbc, 0x39, 0x77, 0xb0, 0x85, 0x4e, 0xb9, 0xf9, 0x45, 0x51, 0x1, 0x25, 0x46, 0x43, 0x0, 0xc9, 0x15, 0x77, 0xb2, 0x1b, 0x6a, 0xa, 0x61, 0x34, 0x13, 0x79, 0xd1, 0xf1, 0xe1, 0x59, 0x37, 0xc4, 0xea, 0xc4, 0x35, 0xd0, 0x5b, 0xe9, 0x28, 0x2f, 0x63, 0x2f, 0x84, 0xc2, 0xae, 0x12, 0x90, 0xc6, 0xde, 0x6c, 0xa6, 0xc5, 0xab, 0xae, 0x90, 0xa6, 0xc9, 0xf3, 0x73, 0x21, 0x96, 0x6c, 0xd3, 0x3d, 0x86, 0xc6, 0x27, 0x5c, 0x1, 0x8f, 0xd2, 0xc1, 0x5a, 0xec, 0x46, 0xc0, 0x95, 0xac, 0xc, 0xd5, 0x15, 0x93, 0xcf, 0xb6, 0x46, 0xe8, 0xa5, 0xf8}, - output224: []byte{0x86, 0x89, 0xce, 0x87, 0x86, 0x4b, 0x65, 0x86, 0x6e, 0x50, 0xae, 0x81, 0x73, 0xbf, 0x9f, 0xde, 0x1e, 0x6c, 0x0, 0xf5, 0xd, 0x27, 0x99, 0xf5, 0xaf, 0x77, 0xed, 0x4f}, - output256: []byte{0x54, 0x21, 0x6e, 0x68, 0xa6, 0xbb, 0xdd, 0xd2, 0x78, 0x27, 0xd5, 0xfc, 0xa1, 0x1b, 0x1, 0x10, 0xff, 0xa8, 0x9d, 0x78, 0x96, 0xe5, 0x91, 0x4d, 0x57, 0x49, 0x5b, 0xd2, 0xc3, 0x9e, 0x94, 0x95}, - output384: []byte{0x53, 0xcc, 0xe2, 0xb5, 0x93, 0xe0, 0xd1, 0xfa, 0xbd, 0x91, 0xb6, 0x2e, 0x33, 0x49, 0x15, 0x66, 0xf9, 0x5d, 0xa2, 0x10, 0x6a, 0xda, 0xed, 0x5, 0x5e, 0x1, 0x6, 0x15, 0xc9, 0x3f, 0x7, 0x34, 0xcd, 0x27, 0x79, 0x21, 0x23, 0xc3, 0xf4, 0x3f, 0x44, 0xa9, 0x4f, 0xd5, 0x2d, 0x5e, 0xca, 0x97}, - output512: []byte{0xf7, 0x15, 0xdd, 0xae, 0x51, 0xac, 0xe7, 0xb5, 0xbb, 0xd9, 0x13, 0x32, 0x98, 0x4a, 0x92, 0x17, 0xb3, 0x39, 0xfa, 0xc4, 0xc1, 0xc7, 0xb1, 0x76, 0x18, 0xf5, 0xa, 0xf, 0x2d, 0x16, 0xd8, 0x6a, 0xe3, 0x85, 0x66, 0x64, 0x65, 0x4, 0x6, 0x5f, 0x67, 0xcd, 0xf3, 0xc6, 0xc8, 0xe4, 0xc8, 0xf6, 0x5f, 0x7d, 0x73, 0xd6, 0xf3, 0x81, 0x23, 0xf2, 0x5d, 0xe0, 0x45, 0x90, 0x7b, 0x51, 0x2f, 0x46}}, - testcase{ - msg: []byte{0x6e, 0x1c, 0xad, 0xfb, 0x2a, 0x14, 0xc5, 0xff, 0xb1, 0xdd, 0x69, 0x91, 0x9c, 0x1, 0x24, 0xed, 0x1b, 0x9a, 0x41, 0x4b, 0x2b, 0xea, 0x1e, 0x5e, 0x42, 0x2d, 0x53, 0xb0, 0x22, 0xbd, 0xd1, 0x3a, 0x9c, 0x88, 0xe1, 0x62, 0x97, 0x2e, 0xbb, 0x98, 0x52, 0x33, 0x0, 0x6, 0xb1, 0x3c, 0x5b, 0x2f, 0x2a, 0xfb, 0xe7, 0x54, 0xab, 0x7b, 0xac, 0xf1, 0x24, 0x79, 0xd4, 0x55, 0x8d, 0x19, 0xdd, 0xbb, 0x1a, 0x62, 0x89, 0x38, 0x7b, 0x3a, 0xc0, 0x84, 0x98, 0x1d, 0xf3, 0x35, 0x33, 0xd, 0x15, 0x70, 0x85, 0xb, 0x97, 0x20, 0x3d, 0xba, 0x5f, 0x20, 0xcf, 0x7f, 0xf2, 0x17, 0x75, 0x36, 0x7a, 0x84, 0x1, 0xb6, 0xeb, 0xe5, 0xb8, 0x22, 0xed, 0x16, 0xc3, 0x93, 0x83, 0x23, 0x20, 0x3, 0xab, 0xc4, 0x12, 0xb0, 0xce, 0xd, 0xd7, 0xc7, 0xda, 0x6, 0x4e, 0x4b, 0xb7, 0x3e, 0x8c, 0x58, 0xf2, 0x22, 0xa1, 0x51, 0x2d, 0x5f, 0xe6, 0xd9, 0x47, 0x31, 0x6e, 0x2, 0xf8, 0xaa, 0x87, 0xe7, 0xaa, 0x7a, 0x3a, 0xa1, 0xc2, 0x99, 0xd9, 0x2e, 0x64, 0x14, 0xae, 0x3b, 0x92, 0x7d, 0xb8, 0xff, 0x70, 0x8a, 0xc8, 0x6a, 0x9, 0xb2, 0x4e, 0x18, 0x84, 0x74, 0x3b, 0xc3, 0x40, 0x67, 0xbb, 0x4, 0x12, 0x45, 0x3b, 0x4a, 0x6a, 0x65, 0x9, 0x50, 0x4b, 0x55, 0xf, 0x53, 0xd5, 0x18, 0xe4, 0xbc, 0xc3, 0xd9, 0xc1, 0xef, 0xdb, 0x33, 0xda, 0x2e, 0xac, 0xcb, 0x84, 0xc9, 0xf1, 0xca, 0xec, 0x81, 0x5, 0x7a, 0x85, 0x8, 0xf4, 0x23, 0xb2, 0x5d, 0xb5, 0x50, 0xe, 0x5f, 0xc8, 0x6a, 0xb3, 0xb5, 0xeb, 0x10, 0xd6, 0xd0, 0xbf, 0x3, 0x3a, 0x71, 0x6d, 0xde, 0x55, 0xb0, 0x9f, 0xd5, 0x34, 0x51, 0xbb, 0xea, 0x64, 0x42, 0x17, 0xae, 0x1e, 0xf9, 0x1f, 0xad, 0x2b, 0x5d, 0xcc, 0x65, 0x15, 0x24, 0x9c, 0x96, 0xee, 0x7e, 0xab, 0xfd, 0x12, 0xf1, 0xef, 0x65, 0x25, 0x6b, 0xd1, 0xcf, 0xf2, 0x8, 0x7d, 0xab, 0xf2, 0xf6, 0x9a, 0xd1, 0xff, 0xb9, 0xcf, 0x3b, 0xc8, 0xca, 0x43, 0x7c, 0x7f, 0x18, 0xb6, 0x9, 0x5b, 0xc0, 0x8d, 0x65, 0xdf, 0x99, 0xcc, 0x7f, 0x65, 0x7c, 0x41, 0x8d, 0x8e, 0xb1, 0x9, 0xfd, 0xc9, 0x1a, 0x13, 0xdc, 0x20, 0xa4, 0x38, 0x94, 0x17, 0x26, 0xef, 0x24, 0xf9, 0x73, 0x8b, 0x65, 0x52, 0x75, 0x1a, 0x32, 0xc, 0x4e, 0xa9, 0xc8, 0xd7, 0xe8, 0xe8, 0x59, 0x2a, 0x3b, 0x69, 0xd3, 0xa, 0x41, 0x9c, 0x55, 0xfb, 0x6c, 0xb0, 0x85, 0x9, 0x89, 0xc0, 0x29, 0xaa, 0xae, 0x66, 0x30, 0x5e, 0x2c, 0x14, 0x53, 0xb, 0x39, 0xea, 0xa8, 0x6e, 0xa3, 0xba, 0x2a, 0x7d, 0xec, 0xf4, 0xb2, 0x84, 0x8b, 0x1, 0xfa, 0xa8, 0xaa, 0x91, 0xf2, 0x44, 0xb, 0x7c, 0xc4, 0x33, 0x4f, 0x63, 0x6, 0x1c, 0xe7, 0x8a, 0xa1, 0x58, 0x9b, 0xef, 0xa3, 0x8b, 0x19, 0x47, 0x11, 0x69, 0x7a, 0xe3, 0xaa, 0xdc, 0xb1, 0x5c, 0x9f, 0xbf, 0x6, 0x74, 0x33, 0x15, 0xe2, 0xf9, 0x7f, 0x1a, 0x8b, 0x52, 0x23, 0x6a, 0xcb, 0x44, 0x40, 0x69, 0x55, 0xc, 0x23, 0x45, 0xf4, 0xed, 0x12, 0xe5, 0xb8, 0xe8, 0x81, 0xcd, 0xd4, 0x72, 0xe8, 0x3, 0xe5, 0xdc, 0xe6, 0x3a, 0xe4, 0x85, 0xc2, 0x71, 0x3f, 0x81, 0xbc, 0x30, 0x7f, 0x25, 0xac, 0x74, 0xd3, 0x9b, 0xaf, 0x7e, 0x3b, 0xc5, 0xe7, 0x61, 0x74, 0x65, 0xc2, 0xb9, 0xc3, 0x9, 0xcb, 0xa, 0xc0, 0xa5, 0x70, 0xa7, 0xe4, 0x6c, 0x61, 0x16, 0xb2, 0x24, 0x2e, 0x1c, 0x54, 0xf4, 0x56, 0xf6, 0x58, 0x9e, 0x20, 0xb1, 0xc0, 0x92, 0x5b, 0xf1, 0xcd, 0x5f, 0x93, 0x44, 0xe0, 0x1f, 0x63, 0xb5, 0xba, 0x9d, 0x46, 0x71, 0xab, 0xbf, 0x92, 0xc, 0x7e, 0xd3, 0x29, 0x37, 0xa0, 0x74, 0xc3, 0x38, 0x36, 0xf0, 0xe0, 0x19, 0xdf, 0xb6, 0xb3, 0x5d, 0x86, 0x53, 0x12, 0xc6, 0x5, 0x8d, 0xfd, 0xaf, 0xf8, 0x44, 0xc8, 0xd5, 0x8b, 0x75, 0x7, 0x15, 0x23, 0xe7, 0x9d, 0xfb, 0xab, 0x2e, 0xa3, 0x74, 0x79, 0xdf, 0x12, 0xc4, 0x74, 0x58, 0x4f, 0x4f, 0xf4, 0xf, 0x0, 0xf9, 0x2c, 0x6b, 0xad, 0xa0, 0x25, 0xce, 0x4d, 0xf8, 0xfa, 0xf0, 0xaf, 0xb2, 0xce, 0x75, 0xc0, 0x77, 0x73, 0x90, 0x7c, 0xa2, 0x88, 0x16, 0x7d, 0x6b, 0x1, 0x15, 0x99, 0xc3, 0xde, 0xf, 0xff, 0x16, 0xc1, 0x16, 0x1d, 0x31, 0xdf, 0x1c, 0x1d, 0xde, 0x21, 0x7c, 0xb5, 0x74, 0xed, 0x5a, 0x33, 0x75, 0x17, 0x59, 0xf8, 0xed, 0x2b, 0x1e, 0x69, 0x79, 0xc5, 0x8, 0x8b, 0x94, 0x9, 0x26, 0xb9, 0x15, 0x5c, 0x9d, 0x25, 0xb, 0x47, 0x99, 0x48, 0xc2, 0xa, 0xcb, 0x55, 0x78, 0xdc, 0x2, 0xc9, 0x75, 0x93, 0xf6, 0x46, 0xcc, 0x5c, 0x55, 0x8a, 0x6a, 0xf, 0x3d, 0x8d, 0x27, 0x32, 0x58, 0x88, 0x7c, 0xcf, 0xf2, 0x59, 0x19, 0x7c, 0xb1, 0xa7, 0x38, 0x6, 0x22, 0xe3, 0x71, 0xfd, 0x2e, 0xb5, 0x37, 0x62, 0x25, 0xec, 0x4, 0xf9, 0xed, 0x1d, 0x1f, 0x2f, 0x8, 0xfa, 0x23, 0x76, 0xdb, 0x5b, 0x79, 0xe, 0x73, 0x8, 0x6f, 0x58, 0x10, 0x64, 0xed, 0x1c, 0x5f, 0x47, 0xe9, 0x89, 0xe9, 0x55, 0xd7, 0x77, 0x16, 0xb5, 0xf, 0xb6, 0x4b, 0x85, 0x33, 0x88, 0xfb, 0xa0, 0x1d, 0xac, 0x2c, 0xea, 0xe9, 0x96, 0x42, 0x34, 0x1f, 0x2d, 0xa6, 0x4c, 0x56, 0xbe, 0xfc, 0x47, 0x89, 0xc0, 0x51, 0xe5, 0xeb, 0x79, 0xb0, 0x63, 0xf2, 0xf0, 0x84, 0xdb, 0x44, 0x91, 0xc3, 0xc5, 0xaa, 0x7b, 0x4b, 0xcf, 0x7d, 0xd7, 0xa1, 0xd7, 0xce, 0xd1, 0x55, 0x4f, 0xa6, 0x7d, 0xca, 0x1f, 0x95, 0x15, 0x74, 0x6a, 0x23, 0x75, 0x47, 0xa4, 0xa1, 0xd2, 0x2a, 0xcf, 0x64, 0x9f, 0xa1, 0xed, 0x3b, 0x9b, 0xb5, 0x2b, 0xde, 0xc, 0x69, 0x96, 0x62, 0xf, 0x8c, 0xfd, 0xb2, 0x93, 0xf8, 0xba, 0xca, 0xd0, 0x2b, 0xce, 0x42, 0x83, 0x63, 0xd0, 0xbb, 0x3d, 0x39, 0x14, 0x69, 0x46, 0x1d, 0x21, 0x27, 0x69, 0x4, 0x82, 0x19, 0x22, 0xa, 0x7e, 0xd3, 0x9d, 0x1f, 0x91, 0x57, 0xdf, 0xea, 0x3b, 0x43, 0x94, 0xca, 0x8f, 0x5f, 0x61, 0x2d, 0x9a, 0xc1, 0x62, 0xbf, 0xb, 0x96, 0x1b, 0xfb, 0xc1, 0x57, 0xe5, 0xf8, 0x63, 0xce, 0x65, 0x9e, 0xb2, 0x35, 0xcf, 0x98, 0xe8, 0x44, 0x4b, 0xc8, 0xc7, 0x88, 0xb, 0xdd, 0xcd, 0xb, 0x3b, 0x38, 0x9a, 0xaa, 0x89, 0xd5, 0xe0, 0x5f, 0x84, 0xd0, 0x64, 0x9e, 0xeb, 0xac, 0xab, 0x4f, 0x1c, 0x75, 0x35, 0x2e, 0x89, 0xf0, 0xe9, 0xd9, 0x1e, 0x4a, 0xca, 0x26, 0x44, 0x93, 0xa5, 0xd, 0x2f, 0x4a, 0xed, 0x66, 0xbd, 0x13, 0x65, 0xd, 0x1f, 0x18, 0xe7, 0x19, 0x9e, 0x93, 0x1c, 0x78, 0xae, 0xb7, 0x63, 0xe9, 0x3, 0x80, 0x74, 0x99, 0xf1, 0xcd, 0x99, 0xaf, 0x81, 0x27, 0x6b, 0x61, 0x5b, 0xe8, 0xec, 0x70, 0x9b, 0x3, 0x95, 0x84, 0xb2, 0xb5, 0x74, 0x45, 0xb0, 0x14, 0xf6, 0x16, 0x25, 0x77, 0xf3, 0x54, 0x83, 0x29, 0xfd, 0x28, 0x8b, 0x8, 0x0, 0xf9, 0x36, 0xfc, 0x5e, 0xa1, 0xa4, 0x12, 0xe3, 0x14, 0x2e, 0x60, 0x9f, 0xc8, 0xe3, 0x99, 0x88, 0xca, 0x53, 0xdf, 0x4d, 0x8f, 0xb5, 0xb5, 0xfb, 0x5f, 0x42, 0xc0, 0xa0, 0x16, 0x48, 0x94, 0x6a, 0xc6, 0x86, 0x4c, 0xfb, 0xe, 0x92, 0x85, 0x63, 0x45, 0xb0, 0x8e, 0x5d, 0xf0, 0xd2, 0x35, 0x26, 0x1e, 0x44, 0xcf, 0xe7, 0x76, 0x45, 0x6b, 0x40, 0xae, 0xf0, 0xac, 0x1a, 0xd, 0xfa, 0x2f, 0xe6, 0x39, 0x48, 0x66, 0x66, 0xc0, 0x5e, 0xa1, 0x96, 0xb0, 0xc1, 0xa9, 0xd3, 0x46, 0x43, 0x5e, 0x3, 0x96, 0x5e, 0x61, 0x39, 0xb1, 0xce, 0x10, 0x12, 0x9f, 0x8a, 0x53, 0x74, 0x5f, 0x80, 0x10, 0xa, 0x94, 0xae, 0x4, 0xd9, 0x96, 0xc1, 0x3a, 0xc1, 0x4c, 0xf2, 0x71, 0x3e, 0x39, 0xdf, 0xbb, 0x19, 0xa9, 0x36, 0xcf, 0x38, 0x61, 0x31, 0x8b, 0xd7, 0x49, 0xb1, 0xfb, 0x82, 0xf4, 0xd, 0x73, 0xd7, 0x14, 0xe4, 0x6, 0xcb, 0xeb, 0x3d, 0x92, 0xe, 0xa0, 0x37, 0xb7, 0xde, 0x56, 0x64, 0x55, 0xcc, 0xa5, 0x19, 0x80, 0xf0, 0xf5, 0x3a, 0x76, 0x2d, 0x5b, 0xf8, 0xa4, 0xdb, 0xb5, 0x5a, 0xac, 0xe, 0xdd, 0xb4, 0xb1, 0xf2, 0xae, 0xd2, 0xaa, 0x3d, 0x1, 0x44, 0x9d, 0x34, 0xa5, 0x7f, 0xde, 0x43, 0x29, 0xe7, 0xff, 0x3f, 0x6b, 0xec, 0xe4, 0x45, 0x62, 0x7, 0xa4, 0x22, 0x52, 0x18, 0xee, 0x9f, 0x17, 0x4c, 0x2d, 0xe0, 0xff, 0x51, 0xce, 0xaf, 0x2a, 0x7, 0xcf, 0x84, 0xf0, 0x3d, 0x1d, 0xf3, 0x16, 0x33, 0x1e, 0x3e, 0x72, 0x5c, 0x54, 0x21, 0x35, 0x6c, 0x40, 0xed, 0x25, 0xd5, 0xab, 0xf9, 0xd2, 0x4c, 0x45, 0x70, 0xfe, 0xd6, 0x18, 0xca, 0x41, 0x0, 0x4, 0x55, 0xdb, 0xd7, 0x59, 0xe3, 0x2e, 0x2b, 0xf0, 0xb6, 0xc5, 0xe6, 0x12, 0x97, 0xc2, 0xf, 0x75, 0x2c, 0x30, 0x42, 0x39, 0x4c, 0xe8, 0x40, 0xc7, 0x9, 0x43, 0xc4, 0x51, 0xdd, 0x55, 0x98, 0xeb, 0xe, 0x49, 0x53, 0xce, 0x26, 0xe8, 0x33, 0xe5, 0xaf, 0x64, 0xfc, 0x10, 0x7, 0xc0, 0x44, 0x56, 0xd1, 0x9f, 0x87, 0xe4, 0x56, 0x36, 0xf4, 0x56, 0xb7, 0xdc, 0x9d, 0x31, 0xe7, 0x57, 0x62, 0x2e, 0x27, 0x39, 0x57, 0x33, 0x42, 0xde, 0x75, 0x49, 0x7a, 0xe1, 0x81, 0xaa, 0xe7, 0xa5, 0x42, 0x57, 0x56, 0xc8, 0xe2, 0xa7, 0xee, 0xf9, 0x18, 0xe5, 0xc6, 0xa9, 0x68, 0xae, 0xfe, 0x92, 0xe8, 0xb2, 0x61, 0xbb, 0xfe, 0x93, 0x6b, 0x19, 0xf9, 0xe6, 0x9a, 0x3c, 0x90, 0x9, 0x40, 0x96, 0xda, 0xe8, 0x96, 0x45, 0xe, 0x15, 0x5, 0xed, 0x58, 0x28, 0xee, 0x2a, 0x7f, 0xe, 0xa3, 0xa2, 0x8e, 0x6e, 0xc4, 0x7c, 0xa, 0xf7, 0x11, 0x82, 0x3e, 0x76, 0x89, 0x16, 0x6e, 0xa0, 0x7e, 0xca, 0x0, 0xff, 0xc4, 0x93, 0x13, 0x1d, 0x65, 0xf9, 0x3a, 0x4e, 0x1d, 0x3, 0xe0, 0x35, 0x4a, 0xfc, 0x21, 0x15, 0xcf, 0xb8, 0xd2, 0x3d, 0xae, 0x8c, 0x6f, 0x96, 0x89, 0x10, 0x31, 0xb2, 0x32, 0x26, 0xb8, 0xbc, 0x82, 0xf1, 0xa7, 0x3d, 0xaa, 0x5b, 0xb7, 0x40, 0xfc, 0x8c, 0xc3, 0x6c, 0x9, 0x75, 0xbe, 0xfa, 0xc, 0x78, 0x95, 0xa9, 0xbb, 0xc2, 0x61, 0xed, 0xb7, 0xfd, 0x38, 0x41, 0x3, 0x96, 0x8f, 0x7a, 0x18, 0x35, 0x3d, 0x5f, 0xe5, 0x62, 0x74, 0xe4, 0x51, 0x57, 0x68, 0xe4, 0x35, 0x30, 0x46, 0xc7, 0x85, 0x26, 0x7d, 0xe0, 0x1e, 0x81, 0x6a, 0x28, 0x73, 0xf9, 0x7a, 0xad, 0x3a, 0xb4, 0xd7, 0x23, 0x4e, 0xbf, 0xd9, 0x83, 0x27, 0x16, 0xf4, 0x3b, 0xe8, 0x24, 0x5c, 0xf0, 0xb4, 0x40, 0x8b, 0xa0, 0xf0, 0xf7, 0x64, 0xce, 0x9d, 0x24, 0x94, 0x7a, 0xb6, 0xab, 0xdd, 0x98, 0x79, 0xf2, 0x4f, 0xcf, 0xf1, 0x0, 0x78, 0xf5, 0x89, 0x4b, 0xd, 0x64, 0xf6, 0xa8, 0xd3, 0xea, 0x3d, 0xd9, 0x2a, 0xc, 0x38, 0x60, 0x9d, 0x3c, 0x14, 0xfd, 0xc0, 0xa4, 0x40, 0x64, 0xd5, 0x1, 0x92, 0x6b, 0xe8, 0x4b, 0xf8, 0x3, 0x4f, 0x1d, 0x7a, 0x8c, 0x5f, 0x38, 0x2e, 0x69, 0x89, 0xbf, 0xfa, 0x21, 0x9, 0xd4, 0xfb, 0xc5, 0x6d, 0x1f, 0x9, 0x1e, 0x8b, 0x6f, 0xab, 0xff, 0x4, 0xd2, 0x1b, 0xb1, 0x96, 0x56, 0x92, 0x9d, 0x19, 0xde, 0xcb, 0x8e, 0x82, 0x91, 0xe6, 0xae, 0x55, 0x37, 0xa1, 0x69, 0x87, 0x4e, 0xf, 0xe9, 0x89, 0xd, 0xff, 0x11, 0xff, 0xd1, 0x59, 0xad, 0x23, 0xd7, 0x49, 0xfb, 0x9e, 0x8b, 0x67, 0x6e, 0x2c, 0x31, 0x31, 0x3c, 0x16, 0xd1, 0xef, 0xa0, 0x6f, 0x4d, 0x7b, 0xc1, 0x91, 0x28, 0xa, 0x4e, 0xe6, 0x30, 0x49, 0xfc, 0xef, 0x23, 0x4, 0x2b, 0x20, 0x30, 0x3a, 0xec, 0xdd, 0x41, 0x2a, 0x52, 0x6d, 0x7a, 0x53, 0xf7, 0x60, 0xa0, 0x89, 0xfb, 0xdf, 0x13, 0xf3, 0x61, 0x58, 0x6f, 0xd, 0xca, 0x76, 0xbb, 0x92, 0x8e, 0xdb, 0x41, 0x93, 0x1d, 0x11, 0xf6, 0x79, 0x61, 0x9f, 0x94, 0x8a, 0x6a, 0x9e, 0x8d, 0xba, 0x91, 0x93, 0x27, 0x76, 0x90, 0x6, 0x30, 0x3c, 0x6e, 0xf8, 0x41, 0x43, 0x8a, 0x72, 0x55, 0xc8, 0x6, 0x24, 0x2e, 0x2e, 0x7f, 0xf4, 0x62, 0x1b, 0xb0, 0xf8, 0xaf, 0xa0, 0xb4, 0xa2, 0x48, 0xea, 0xd1, 0xa1, 0xe9, 0x46, 0xf3, 0xe8, 0x26, 0xfb, 0xfb, 0xbf, 0x80, 0x13, 0xce, 0x5c, 0xc8, 0x14, 0xe2, 0xf, 0xef, 0x21, 0xfa, 0x5d, 0xb1, 0x9e, 0xc7, 0xff, 0xb, 0x6, 0xc5, 0x92, 0x24, 0x7b, 0x27, 0xe5, 0x0, 0xeb, 0x47, 0x5, 0xe6, 0xc3, 0x7d, 0x41, 0xd0, 0x9e, 0x83, 0xcb, 0xa, 0x61, 0x80, 0x8, 0xca, 0x1a, 0xaa, 0xe8, 0xa2, 0x15, 0x17, 0x1d, 0x81, 0x76, 0x59, 0x6, 0x3c, 0x2f, 0xa3, 0x85, 0xcf, 0xa3, 0xc1, 0x7, 0x8d, 0x5c, 0x2b, 0x28, 0xce, 0x73, 0x12, 0x87, 0x6a, 0x27, 0x67, 0x73, 0x82, 0x1b, 0xe1, 0x45, 0x78, 0x5d, 0xff, 0x24, 0xbb, 0xb2, 0x4d, 0x59, 0x6, 0x78, 0x15, 0x8a, 0x61, 0xea, 0x49, 0xf2, 0xbe, 0x56, 0xfd, 0xac, 0x8c, 0xe7, 0xf9, 0x4b, 0x5, 0xd6, 0x2f, 0x15, 0xad, 0xd3, 0x51, 0xe5, 0x93, 0xf, 0xd4, 0xf3, 0x1b, 0x3e, 0x74, 0x1, 0xd5, 0xc0, 0xff, 0x7f, 0xc8, 0x45, 0xb1, 0x65, 0xfb, 0x6a, 0xba, 0xfd, 0x47, 0x88, 0xa8, 0xb0, 0x61, 0x5f, 0xec, 0x91, 0x9, 0x2b, 0x34, 0xb7, 0x10, 0xa6, 0x8d, 0xa5, 0x18, 0x63, 0x16, 0x22, 0xba, 0x2a, 0xae, 0x5d, 0x19, 0x1, 0xd, 0x30, 0x7e, 0x56, 0x5a, 0x16, 0x1e, 0x64, 0xa4, 0x31, 0x9a, 0x6b, 0x26, 0x1f, 0xb2, 0xf6, 0xa9, 0x5, 0x33, 0x99, 0x7b, 0x1a, 0xec, 0x32, 0xef, 0x89, 0xcf, 0x1f, 0x23, 0x26, 0x96, 0xe2, 0x13, 0xda, 0xfe, 0x4d, 0xbe, 0xb1, 0xcf, 0x1d, 0x5b, 0xbd, 0x12, 0xe5, 0xff, 0x2e, 0xbb, 0x28, 0x9, 0x18, 0x4e, 0x37, 0xcd, 0x9a, 0xe, 0x58, 0xa4, 0xe0, 0xaf, 0x9, 0x94, 0x93, 0xe6, 0xd8, 0xcc, 0x98, 0xb0, 0x5a, 0x2f, 0x4, 0xa, 0x7e, 0x39, 0x51, 0x50, 0x38, 0xf6, 0xee, 0x21, 0xfc, 0x25, 0xf8, 0xd4, 0x59, 0xa3, 0x27, 0xb8, 0x3e, 0xc1, 0xa2, 0x8a, 0x23, 0x42, 0x37, 0xac, 0xd5, 0x24, 0x65, 0x50, 0x69, 0x42, 0x64, 0x6a, 0xc2, 0x48, 0xec, 0x96, 0xeb, 0xba, 0x6e, 0x1b, 0x9, 0x24, 0x75, 0xf7, 0xad, 0xae, 0x4d, 0x35, 0xe0, 0x9, 0xfd, 0x33, 0x86, 0x13, 0xc7, 0xd4, 0xc1, 0x2e, 0x38, 0x18, 0x47, 0x31, 0xa, 0x10, 0xe6, 0xf0, 0x2c, 0x2, 0x39, 0x2f, 0xc3, 0x20, 0x84, 0xfb, 0xe9, 0x39, 0x68, 0x9b, 0xc6, 0x51, 0x8b, 0xe2, 0x7a, 0xf7, 0x84, 0x2d, 0xee, 0xa8, 0x4, 0x38, 0x28, 0xe3, 0xdf, 0xfe, 0x3b, 0xba, 0xc4, 0x79, 0x4c, 0xa0, 0xcc, 0x78, 0x69, 0x97, 0x22, 0x70, 0x9f, 0x2e, 0x4b, 0xe, 0xae, 0x72, 0x87, 0xde, 0xb0, 0x6a, 0x27, 0xb4, 0x62, 0x42, 0x3e, 0xc3, 0xf0, 0xdf, 0x22, 0x7a, 0xcf, 0x58, 0x90, 0x43, 0x29, 0x26, 0x85, 0xf2, 0xc0, 0xe7, 0x32, 0x3, 0xe8, 0x58, 0x8b, 0x62, 0x55, 0x4f, 0xf1, 0x9d, 0x62, 0x60, 0xc7, 0xfe, 0x48, 0xdf, 0x30, 0x15, 0x9, 0xd3, 0x3b, 0xe0, 0xd8, 0xb3, 0x1d, 0x3f, 0x65, 0x8c, 0x92, 0x1e, 0xf7, 0xf5, 0x54, 0x49, 0xff, 0x38, 0x87, 0xd9, 0x1b, 0xfb, 0x89, 0x41, 0x16, 0xdf, 0x57, 0x20, 0x60, 0x98, 0xe8, 0xc5, 0x83, 0x5b}, - output224: []byte{0x3a, 0x44, 0x7c, 0x96, 0xe9, 0x7c, 0xab, 0xba, 0x2a, 0xed, 0xfb, 0x3d, 0xfd, 0x1a, 0x56, 0x3f, 0xe0, 0x5d, 0xf, 0x13, 0x32, 0x6b, 0xa5, 0x43, 0x75, 0x27, 0x4e, 0xb1}, - output256: []byte{0x3c, 0x79, 0xa3, 0xbd, 0x82, 0x45, 0x42, 0xc2, 0xa, 0xf7, 0x1f, 0x21, 0xd6, 0xc2, 0x8d, 0xf2, 0x21, 0x3a, 0x4, 0x1f, 0x77, 0xdd, 0x79, 0xa3, 0x28, 0xa0, 0x7, 0x81, 0x23, 0x95, 0x4e, 0x7b}, - output384: []byte{0x2a, 0xad, 0x66, 0x1e, 0xbc, 0x40, 0x4e, 0xfe, 0xdc, 0xfb, 0x7, 0x11, 0xe6, 0x9d, 0x0, 0xf1, 0xfb, 0x7d, 0x40, 0x3d, 0x97, 0x25, 0xaa, 0x1f, 0xb9, 0xa4, 0x3e, 0x40, 0xd0, 0xf3, 0x24, 0x95, 0x71, 0xa3, 0xad, 0xa0, 0x1f, 0x73, 0xf8, 0x3b, 0x2d, 0x46, 0x99, 0x57, 0x48, 0x5, 0x3f, 0x77}, - output512: []byte{0x5f, 0xb5, 0x2a, 0xb6, 0xba, 0xdf, 0xe3, 0xd5, 0xf1, 0xee, 0x5a, 0x56, 0x9b, 0x77, 0xc4, 0x3b, 0x3f, 0x37, 0x56, 0x16, 0xf1, 0xcc, 0x88, 0x38, 0x39, 0x8b, 0xa6, 0x54, 0x93, 0xfe, 0xc6, 0x7e, 0x66, 0x5c, 0x1a, 0x6, 0x7c, 0xa4, 0x62, 0x9b, 0x22, 0x68, 0x55, 0x43, 0xd6, 0x5, 0x1f, 0x6f, 0xbd, 0x4f, 0x25, 0x80, 0x50, 0xd3, 0xa2, 0x71, 0x11, 0xc, 0x13, 0x37, 0xf6, 0xe5, 0x4c, 0x3d}}, - testcase{ - msg: []byte{0xd7, 0x75, 0x1a, 0xac, 0xb, 0x43, 0xc4, 0xae, 0x8c, 0x2c, 0xe3, 0x66, 0x25, 0x6f, 0x95, 0xe3, 0x57, 0xc, 0xd6, 0xad, 0x64, 0x3c, 0x7, 0x6f, 0x5, 0x65, 0x22, 0x14, 0xb6, 0xca, 0x4d, 0xc1, 0x34, 0xe6, 0x40, 0x77, 0xcb, 0x1b, 0x46, 0x8c, 0xc1, 0x95, 0x0, 0xba, 0x1d, 0x3f, 0xb0, 0xd3, 0xc5, 0xba, 0xfa, 0x26, 0x7d, 0xce, 0xe9, 0x72, 0xeb, 0x4b, 0xa3, 0xb7, 0xa, 0xf3, 0x2a, 0x0, 0xe4, 0x81, 0x41, 0x6b, 0xa6, 0x91, 0x7d, 0xa4, 0x77, 0x1d, 0xb3, 0xdf, 0x2d, 0xf3, 0x88, 0x62, 0xd9, 0xad, 0xc8, 0x15, 0x0, 0x7, 0xe6, 0xc3, 0x69, 0xf3, 0xea, 0xeb, 0xe2, 0x9d, 0x50, 0xe9, 0xa5, 0xa6, 0x87, 0x79, 0x3b, 0x3a, 0x41, 0x48, 0x7d, 0x20, 0x96, 0x62, 0x5a, 0x2d, 0xa, 0xd4, 0x6e, 0xe4, 0x40, 0x21, 0x20, 0x9e, 0xf, 0x75, 0x26, 0x15, 0xef, 0x13, 0x23, 0x2c, 0x3e, 0xb9, 0x59, 0x7b, 0xf, 0x75, 0xbf, 0x17, 0x52, 0x50, 0xe7, 0x26, 0x40, 0xf2, 0x45, 0xdb, 0x41, 0xb6, 0xe1, 0x8d, 0xd0, 0x67, 0xdc, 0x62, 0x8e, 0x36, 0x4a, 0x92, 0xfc, 0x96, 0xcc, 0xba, 0xab, 0xa0, 0xe9, 0x24, 0xc8, 0xfa, 0x4e, 0x2e, 0xb, 0xd8, 0xd5, 0xeb, 0x1f, 0x90, 0x1e, 0x15, 0x3d, 0xf1, 0x28, 0x4f, 0x80, 0xb6, 0xb8, 0x59, 0x16, 0xe2, 0xbc, 0xb3, 0xf0, 0xac, 0xf, 0x35, 0x7c, 0x58, 0xca, 0x35, 0x64, 0x81, 0xc3, 0xe9, 0x2, 0x3, 0x31, 0xea, 0x63, 0xe8, 0x76, 0x84, 0x3, 0x24, 0x89, 0x65, 0x88, 0x67, 0xf7, 0xbc, 0x88, 0xbd, 0x98, 0xfd, 0xaf, 0x8, 0x1a, 0xe7, 0x46, 0xa5, 0x27, 0x14, 0xad, 0x1b, 0xd8, 0x30, 0xc1, 0xd6, 0x5a, 0x9e, 0xa5, 0xe8, 0xf0, 0xb6, 0x53, 0x85, 0xca, 0xad, 0x9e, 0x2b, 0xa9, 0x49, 0x52, 0x23, 0xbe, 0xa6, 0x61, 0xe6, 0x9a, 0x5b, 0xa0, 0x35, 0x23, 0x50, 0x63, 0xf2, 0x75, 0xc5, 0xc6, 0x55, 0xfa, 0xd, 0x16, 0x55, 0x33, 0xfb, 0xfe, 0x70, 0xa4, 0x8d, 0xe5, 0x45, 0xde, 0xd7, 0xbe, 0xb7, 0x2f, 0xd9, 0x5, 0xfe, 0xfa, 0xeb, 0xd6, 0x83, 0xf8, 0x53, 0x44, 0x10, 0x3d, 0xf0, 0xb8, 0xda, 0x66, 0x33, 0x48, 0x0, 0x54, 0x92, 0xd8, 0xbe, 0x2a, 0xe9, 0x5c, 0x30, 0xfc, 0x62, 0x9c, 0x4d, 0x2, 0x7d, 0x50, 0x3d, 0x68, 0x6b, 0x5a, 0x34, 0xbf, 0xb6, 0x85, 0x6f, 0x24, 0xe8, 0xfd, 0x9e, 0x56, 0xeb, 0x58, 0x9b, 0x79, 0xc2, 0x8f, 0x72, 0x7d, 0x42, 0x49, 0xc6, 0xa8, 0xcc, 0x50, 0x72, 0xbb, 0x19, 0x22, 0x9d, 0x6, 0xf2, 0xa5, 0xf7, 0xb0, 0x22, 0x33, 0x64, 0xb4, 0xa0, 0xcc, 0x55, 0xe5, 0x3e, 0xdb, 0x77, 0x1a, 0x2e, 0xdc, 0xd7, 0xf2, 0x78, 0xed, 0x52, 0x86, 0x72, 0x1c, 0xdf, 0xf0, 0x69, 0x66, 0x16, 0x56, 0x66, 0x42, 0xca, 0x4, 0x51, 0x3b, 0x58, 0xd6, 0x23, 0x71, 0xd8, 0xc5, 0x33, 0xfa, 0xdb, 0x90, 0xe4, 0x3d, 0x78, 0xe4, 0x88, 0x90, 0xe, 0x55, 0x6c, 0x86, 0x5e, 0x5c, 0xee, 0x9c, 0x65, 0x2f, 0x94, 0x44, 0x5, 0x6, 0x71, 0x3e, 0x48, 0x33, 0xcc, 0x6e, 0x11, 0x9d, 0x5b, 0xaf, 0xb0, 0xfc, 0xde, 0xcf, 0x25, 0x7d, 0xa9, 0xc7, 0xdb, 0xae, 0xe, 0x98, 0x25, 0xd4, 0x45, 0x95, 0x32, 0xa2, 0xd7, 0x1b, 0x22, 0x6a, 0xdf, 0x88, 0x49, 0xd6, 0x91, 0xd3, 0x27, 0xb, 0x73, 0xd9, 0x5e, 0x1d, 0x39, 0x3f, 0x6d, 0x32, 0x3f, 0xe, 0x39, 0xa4, 0x43, 0xbb, 0x5d, 0xb5, 0x5, 0x50, 0x95, 0x91, 0x23, 0xe5, 0x90, 0x35, 0x41, 0x3f, 0xe4, 0xb1, 0x5f, 0x32, 0xf3, 0xad, 0xcb, 0x42, 0x58, 0x1, 0xd8, 0x81, 0xa2, 0x4b, 0x24, 0x1b, 0x1d, 0x95, 0xe8, 0xbe, 0xb2, 0x75, 0x94, 0x11, 0xba, 0x7f, 0x34, 0xdb, 0x3, 0xc8, 0x8e, 0x55, 0x71, 0x6a, 0x64, 0xbb, 0xa0, 0xa2, 0xf4, 0x1f, 0x50, 0x0, 0x8a, 0x57, 0xc3, 0x1d, 0xb3, 0xa6, 0xea, 0x1b, 0xe6, 0x46, 0x91, 0xb3, 0x88, 0xe9, 0x3c, 0x3c, 0x4c, 0xff, 0xc9, 0x7a, 0xe4, 0xef, 0x45, 0x5a, 0x1b, 0xdd, 0x1, 0x3d, 0x44, 0xf2, 0xbc, 0xbf, 0x4a, 0x45, 0xc0, 0xc4, 0xa6, 0x2, 0x1c, 0x22, 0x2, 0x70, 0x70, 0x7c, 0x36, 0x43, 0x58, 0x35, 0xca, 0xdd, 0x61, 0x13, 0x86, 0xb5, 0xff, 0x31, 0xe, 0x44, 0x97, 0x78, 0x23, 0x46, 0x3, 0xfd, 0x77, 0xa3, 0xdc, 0x17, 0x6b, 0xb9, 0x65, 0xa0, 0xea, 0xb2, 0x14, 0x2c, 0x1f, 0x48, 0x90, 0x87, 0xd4, 0xba, 0xc3, 0xd7, 0xaa, 0x3, 0xda, 0x55, 0x7d, 0x23, 0xc9, 0x43, 0xf6, 0x58, 0x8d, 0x64, 0xc3, 0xe1, 0x47, 0x69, 0x89, 0x8c, 0xd4, 0x5a, 0x6f, 0xfe, 0xf5, 0xb, 0xa4, 0x53, 0x91, 0x46, 0xe, 0x24, 0x3a, 0x90, 0x4b, 0x1, 0xa8, 0xb3, 0xd8, 0x8, 0x14, 0xad, 0xd1, 0xe6, 0xaf, 0x63, 0x5e, 0x6b, 0x7d, 0xb4, 0x57, 0xa4, 0x7b, 0xbf, 0x70, 0x78, 0x25, 0xfc, 0x72, 0x92, 0x9d, 0xd1, 0xf8, 0x88, 0x49, 0x4, 0xfb, 0x5d, 0x4f, 0x8c, 0x1a, 0x33, 0x1b, 0x44, 0x3b, 0x1, 0xb3, 0xec, 0x89, 0x78, 0x92, 0x7c, 0x16, 0x2, 0xad, 0xc6, 0xa9, 0x45, 0x5b, 0x33, 0x2a, 0xd3, 0xd5, 0x7, 0x4b, 0x7a, 0x40, 0xd, 0x22, 0x36, 0x7a, 0x5, 0x7e, 0xeb, 0xd3, 0xff, 0x91, 0xdd, 0xe2, 0xfc, 0x3e, 0x36, 0x7f, 0x57, 0x80, 0xa6, 0x7f, 0x5e, 0x22, 0xb8, 0x45, 0xd, 0x2b, 0x73, 0x8c, 0xea, 0xa9, 0x9a, 0xd2, 0x9e, 0x0, 0x32, 0xd1, 0x7d, 0x8, 0x77, 0x25, 0xda, 0xcd, 0xda, 0x29, 0x5, 0xcc, 0x79, 0xfb, 0x94, 0xbd, 0x83, 0x55, 0x84, 0x62, 0xa, 0xd7, 0x70, 0xf9, 0x1f, 0x96, 0x26, 0x48, 0x4b, 0xdb, 0x65, 0x35, 0xb0, 0x8e, 0x13, 0x4, 0x6, 0xa3, 0x97, 0xca, 0x73, 0x21, 0x75, 0xe3, 0xa9, 0xb1, 0xd2, 0x6a, 0x83, 0x3d, 0xa2, 0xce, 0xf7, 0x5, 0x96, 0xd8, 0xde, 0x6d, 0x2c, 0x54, 0x4a, 0xc0, 0x1, 0xae, 0xfa, 0xc, 0x57, 0x9, 0x22, 0xa, 0xf3, 0x49, 0x94, 0xf3, 0x2a, 0x20, 0xcd, 0x98, 0x2c, 0x67, 0xec, 0x3c, 0x3a, 0xcd, 0xf4, 0xde, 0x6e, 0xdb, 0x4e, 0xd4, 0x61, 0xf3, 0xb0, 0x5c, 0x2e, 0xc, 0xdb, 0x38, 0xc6, 0x6, 0x37, 0x6f, 0xa, 0xf4, 0x68, 0x7b, 0x9c, 0xff, 0x71, 0xeb, 0xfe, 0xdc, 0x3b, 0x3d, 0x4e, 0x25, 0x3c, 0xa4, 0xfb, 0xe8, 0x9f, 0x4b, 0x19, 0xb8, 0x20, 0xe9, 0xba, 0x1d, 0x4f, 0xd4, 0xac, 0x40, 0xd0, 0x5b, 0xbd, 0x81, 0x50, 0x93, 0xfa, 0x0, 0xcd, 0x53, 0x38, 0x50, 0x8c, 0x71, 0xd5, 0xa5, 0xf7, 0x3f, 0x3d, 0xe1, 0xe, 0x58, 0xa3, 0xab, 0x8d, 0x55, 0x5e, 0x5b, 0x32, 0x85, 0x49, 0x43, 0xb9, 0x24, 0x93, 0x97, 0x92, 0xbb, 0x16, 0xf, 0xbc, 0xf1, 0xd8, 0x2a, 0xd6, 0xe1, 0xda, 0x7e, 0x3f, 0x86, 0xee, 0x46, 0x27, 0x4b, 0xc7, 0x75, 0xc4, 0x2d, 0x2f, 0x54, 0x1c, 0x4f, 0xf0, 0x76, 0x4e, 0xe1, 0xd9, 0xd6, 0x35, 0xd7, 0x1d, 0x84, 0x9c, 0x1d, 0xb9, 0x17, 0x37, 0x72, 0x18, 0xf4, 0x9a, 0x11, 0x84, 0x54, 0xb4, 0xdf, 0xdc, 0xc, 0xdc, 0xa2, 0xe, 0x43, 0x97, 0x13, 0x7d, 0x6c, 0x57, 0x44, 0xf3, 0x87, 0xfa, 0x3e, 0xad, 0xb2, 0x45, 0xb0, 0x75, 0x7c, 0x50, 0xbc, 0xa8, 0x3, 0xa9, 0xf0, 0xfb, 0x76, 0x4a, 0x76, 0x1c, 0x77, 0x59, 0x90, 0x27, 0xff, 0x88, 0x22, 0xb2, 0x50, 0x85, 0x97, 0xf4, 0x6a, 0x41, 0xa0, 0x39, 0x71, 0xad, 0x32, 0xe5, 0x9a, 0x26, 0x68, 0xaa, 0xd2, 0xe9, 0x79, 0x83, 0x6, 0x80, 0xc, 0xbe, 0xfa, 0x4, 0x8, 0xed, 0x52, 0x8e, 0x58, 0xb1, 0xd5, 0xf3, 0x12, 0xc4, 0xea, 0xe7, 0xf7, 0xe, 0x7d, 0xac, 0xde, 0xf0, 0xb2, 0x23, 0x4f, 0x5b, 0x96, 0xba, 0xc9, 0x78, 0x17, 0x1, 0x1d, 0xbd, 0x88, 0x22, 0x0, 0x6b, 0x1f, 0xe5, 0x65, 0x4b, 0x5a, 0x3e, 0x79, 0x59, 0x77, 0x24, 0x2c, 0x25, 0xf5, 0x6c, 0xf3, 0xad, 0x61, 0x23, 0x1e, 0xd8, 0x8e, 0x39, 0xb, 0x4a, 0x1, 0x99, 0xa5, 0xd0, 0x6f, 0xb, 0x3b, 0x9d, 0x9e, 0x91, 0x8b, 0xf6, 0x6b, 0xf3, 0x76, 0x43, 0x1f, 0x62, 0xd4, 0x7, 0x21, 0x80, 0x59, 0x45, 0x92, 0x49, 0x38, 0xd8, 0xc4, 0x73, 0x74, 0xeb, 0xe6, 0x97, 0xfe, 0xab, 0x83, 0x9e, 0x6c, 0x26, 0xb6, 0xf3, 0x98, 0x4f, 0xcd, 0x14, 0x9c, 0x17, 0x3e, 0x2f, 0xd8, 0x5d, 0x9a, 0x45, 0xe5, 0x35, 0xc, 0x55, 0x4d, 0xda, 0x97, 0x8e, 0xfe, 0x22, 0xc8, 0x1b, 0x89, 0x78, 0xb6, 0x51, 0xee, 0x87, 0x75, 0xed, 0x85, 0xd6, 0x88, 0xab, 0xc7, 0x98, 0xe7, 0xd4, 0x2d, 0x25, 0x6c, 0xb3, 0x6c, 0x9, 0x78, 0x8d, 0x38, 0x76, 0x99, 0xcb, 0x44, 0x97, 0xa, 0xc4, 0xa0, 0x56, 0x14, 0x7b, 0xe9, 0xbf, 0x54, 0x80, 0xa9, 0x52, 0x72, 0x4e, 0xe1, 0x33, 0x68, 0xbd, 0xab, 0xe8, 0x12, 0xec, 0x8b, 0x16, 0xe4, 0xe1, 0x68, 0x1, 0x3f, 0xd, 0xfd, 0x17, 0x47, 0x26, 0x7d, 0xe2, 0xb1, 0x9e, 0xe4, 0x90, 0xee, 0xb8, 0xdd, 0x47, 0x93, 0xa0, 0xc, 0x7e, 0xd8, 0xf7, 0x79, 0xb9, 0xf, 0x2c, 0x0, 0x4b, 0x30, 0xa6, 0x7, 0xac, 0xd, 0xca, 0xe6, 0xbe, 0x6d, 0x1d, 0xd6, 0xdb, 0xf2, 0xdb, 0xbb, 0xf0, 0xbc, 0xb5, 0x39, 0x49, 0x4, 0xfc, 0x7c, 0x43, 0x51, 0xbd, 0xe6, 0x12, 0x51, 0x15, 0xba, 0x1f, 0xaa, 0xb7, 0x6a, 0xdf, 0xd0, 0xa4, 0x11, 0x2d, 0x96, 0x21, 0x17, 0xc6, 0xc3, 0x4, 0xb8, 0xb5, 0x52, 0xa9, 0xdc, 0xad, 0x1b, 0x9f, 0x7e, 0xa9, 0x59, 0x5d, 0xc1, 0xa4, 0x32, 0xba, 0x85, 0x34, 0xc6, 0x1d, 0xc7, 0x86, 0x9e, 0xda, 0xbb, 0x46, 0xf9, 0x9d, 0x5f, 0xbf, 0x13, 0xb2, 0x57, 0xca, 0x28, 0x3, 0xc7, 0x36, 0x17, 0xcc, 0x32, 0xa3, 0xd3, 0x9c, 0x2b, 0x8e, 0x55, 0x23, 0x32, 0x6e, 0xe4, 0x97, 0x55, 0xb3, 0xb4, 0x9d, 0xb1, 0x14, 0x71, 0x92, 0x5d, 0x71, 0xc6, 0x6f, 0x4e, 0x92, 0xe9, 0xc4, 0xb6, 0x83, 0x2b, 0x23, 0x65, 0x39, 0xdd, 0x88, 0x68, 0x35, 0x25, 0x3b, 0x96, 0x81, 0x72, 0x9f, 0x49, 0x3d, 0x30, 0x45, 0x18, 0xea, 0xea, 0xf8, 0x37, 0xcf, 0xae, 0xa9, 0x79, 0x8a, 0x6d, 0x4f, 0x87, 0x36, 0xf0, 0x6f, 0xf3, 0x75, 0x86, 0xd1, 0x90, 0x78, 0x37, 0x63, 0xa6, 0x60, 0x46, 0x5d, 0xf3, 0x97, 0x88, 0x36, 0x16, 0xa5, 0xcd, 0x11, 0x34, 0xaa, 0x8b, 0x63, 0x38, 0x5d, 0xa8, 0xbd, 0xe8, 0x74, 0x35, 0xf6, 0xef, 0x79, 0xf0, 0x69, 0xcd, 0x67, 0x6e, 0xb7, 0xd1, 0x41, 0xb1, 0xfe, 0x4d, 0x51, 0xd, 0xde, 0x94, 0x2f, 0x50, 0x3f, 0x1, 0xba, 0xd2, 0xfe, 0x5f, 0xe3, 0xdf, 0xa8, 0x48, 0x3e, 0x88, 0x70, 0xe2, 0xa0, 0xc3, 0xf4, 0x5e, 0x6e, 0x8b, 0x49, 0xe0, 0xbc, 0x7b, 0x1f, 0x47, 0x3e, 0x5c, 0x38, 0x20, 0x85, 0xaa, 0xa6, 0x1f, 0x66, 0x3b, 0x3a, 0xf, 0x81, 0x5b, 0x48, 0x5f, 0xfd, 0xf9, 0xe7, 0x6d, 0x18, 0xba, 0xa6, 0x43, 0x29, 0x3a, 0x73, 0x6e, 0xc6, 0xd8, 0x48, 0x7d, 0x76, 0xf7, 0x2b, 0xa9, 0xd2, 0x10, 0xce, 0x2c, 0x90, 0x91, 0x6, 0x32, 0x95, 0x67, 0x1b, 0x36, 0x4c, 0xac, 0x70, 0xa6, 0xb1, 0xc7, 0xb8, 0x59, 0xf2, 0x80, 0x75, 0xa8, 0xe4, 0x6, 0x2b, 0xbc, 0xa7, 0x2e, 0xec, 0x1e, 0x39, 0x90, 0xf0, 0x11, 0x25, 0x1a, 0xdb, 0x36, 0xb9, 0x2f, 0x5e, 0x14, 0xf, 0x6e, 0xb7, 0x3, 0x4a, 0xec, 0xb1, 0xa, 0x86, 0x5c, 0x77, 0x4f, 0x2b, 0x29, 0x7f, 0x8, 0x87, 0x80, 0xc6, 0xc5, 0x6b, 0xbd, 0x5e, 0xe5, 0x60, 0x20, 0xab, 0xb2, 0xba, 0x1f, 0xe7, 0xb2, 0x53, 0xfb, 0x79, 0x9d, 0xe9, 0x2, 0x61, 0xab, 0xb, 0x87, 0x30, 0x6b, 0xae, 0x8, 0x77, 0x5, 0x3a, 0xa5, 0xbd, 0x62, 0x89, 0xb0, 0x76, 0x91, 0x4e, 0xaa, 0x98, 0x7d, 0x63, 0x1e, 0x5d, 0x11, 0xdc, 0x67, 0xe8, 0x5b, 0x81, 0xf5, 0x93, 0xd9, 0x6c, 0xb6, 0xd9, 0x9e, 0x62, 0xe5, 0xef, 0xb5, 0x49, 0x2b, 0xdb, 0xa4, 0x55, 0x55, 0x40, 0xbd, 0x64, 0xdd, 0x1f, 0x34, 0x33, 0x52, 0xab, 0xa2, 0x73, 0x39, 0x5e, 0x1, 0x55, 0xb3, 0x7e, 0xf2, 0x17, 0x2c, 0x16, 0x4e, 0xcf, 0xd2, 0xe4, 0xcf, 0x88, 0x6c, 0x22, 0xd4, 0x97, 0x54, 0xa7, 0x42, 0x1f, 0xe4, 0xa1, 0x26, 0x89, 0xab, 0x6f, 0x28, 0x71, 0x86, 0x11, 0xf2, 0xa4, 0x8a, 0xd1, 0xcb, 0xc0, 0x11, 0x7d, 0x2a, 0x66, 0x8c, 0x9b, 0x2f, 0x54, 0x3d, 0xef, 0xe7, 0x35, 0x95, 0xf9, 0xb2, 0x77, 0x1, 0x8, 0xdd, 0x26, 0x19, 0xcf, 0xae, 0xb0, 0xc4, 0xe, 0x65, 0xd6, 0x57, 0x84, 0x74, 0x8f, 0x5a, 0x5b, 0xa2, 0x44, 0x83, 0x64, 0x73, 0xa4, 0x2f, 0x64, 0xe7, 0x1b, 0xfd, 0x2f, 0x41, 0x96, 0xcd, 0x54, 0x47, 0xb7, 0xcf, 0x1c, 0x8a, 0x46, 0x0, 0xe8, 0xcd, 0xaf, 0x51, 0x0, 0x5f, 0xff, 0x2c, 0xb, 0x43, 0x45, 0x89, 0x66, 0xd7, 0x9c, 0xe0, 0x39, 0xe7, 0xab, 0x1a, 0x1f, 0x48, 0x58, 0x87, 0x90, 0x9e, 0xd2, 0x42, 0xbd, 0xcd, 0xfd, 0x4a, 0x26, 0xc2, 0x94, 0x50, 0x64, 0x78, 0xe1, 0x6e, 0x71, 0xe7, 0x14, 0x5f, 0x10, 0x9a, 0x48, 0xe5, 0x73, 0xce, 0x65, 0x8f, 0x62, 0xef, 0xb6, 0xf6, 0x67, 0xb4, 0x86, 0x42, 0x7e, 0x7c, 0x92, 0x34, 0x86, 0x47, 0xdf, 0xb1, 0xeb, 0x23, 0xca, 0x6e, 0x47, 0xb5, 0x7d, 0x8f, 0x69, 0x12, 0x6f, 0x89, 0xf2, 0xef, 0xab, 0xd8, 0x76, 0x23, 0x67, 0x59, 0x41, 0x4e, 0x77, 0x5f, 0x6b, 0xb9, 0x8a, 0xec, 0x33, 0x2b, 0xd, 0xb2, 0x89, 0xdd, 0x5b, 0x2b, 0x7b, 0xa3, 0xdb, 0xbc, 0xa2, 0x82, 0x5b, 0x3, 0x3, 0xb4, 0x4c, 0x3b, 0x90, 0xba, 0x6d, 0x2, 0x9a, 0x5b, 0x77, 0x55, 0x66, 0x10, 0xae, 0xd3, 0x2f, 0xf2, 0x1d, 0x13, 0xbf, 0x38, 0x66, 0x7c, 0xb3, 0x15, 0x71, 0xf5, 0xfd, 0x2a, 0xe9, 0xd, 0xce, 0x95, 0x3d, 0x8d, 0xad, 0x9c, 0x16, 0xa3, 0xec, 0x34, 0xf0, 0xc3, 0x8, 0x5a, 0x44, 0xc0, 0x21, 0x3d, 0xf1, 0x15, 0x39, 0xef, 0xb8, 0xa, 0x1, 0x3c, 0x31, 0xc6, 0xd7, 0x2c, 0xf6, 0x2a, 0xbc, 0xa1, 0xbe, 0x59, 0x4f, 0x7d, 0x9a, 0x47, 0x83, 0x3a, 0x86, 0x3f, 0xcf, 0x58, 0x10, 0x14, 0xa8, 0x3e, 0x73, 0xd7, 0xe6, 0x61, 0x78, 0xc0, 0xa0, 0x7, 0xaa, 0x21, 0xb2, 0x31, 0x4e, 0xd0, 0xb6, 0xe1, 0x6f, 0x41, 0x49, 0x14, 0x5c, 0x51, 0xad, 0x8c, 0xbb, 0x68, 0x97, 0xa6, 0xe9, 0x4e, 0xc0, 0x91, 0xd9, 0xb8, 0xa1, 0x1b, 0x44, 0x36, 0x21, 0x3e, 0x7e, 0xa0, 0xd3, 0x4d, 0x34, 0x95, 0x3a, 0xcf, 0x49, 0x72, 0xa6, 0xe0, 0x8b, 0x13, 0x7f, 0xa, 0x11, 0x68, 0x32, 0x4b, 0xcb, 0x9d, 0x9b, 0xd4, 0xf0, 0x3f, 0xe0, 0xca, 0xea, 0x55, 0x88, 0xc8, 0xc0, 0xa9, 0x37, 0x22, 0xfa, 0x4a, 0x96, 0x73, 0xea, 0xb, 0x31, 0x75, 0xc3, 0x70, 0xdc, 0xc2, 0x3c, 0x28, 0x72, 0x76, 0xda, 0x6d, 0x5, 0xd, 0xe8, 0x9b, 0x45, 0xa4, 0xbf, 0x2f, 0x0, 0x56, 0xb7, 0x90, 0x63, 0x4a, 0x77, 0x37, 0x6e, 0xf0, 0x2e, 0xd3, 0x51, 0xcd, 0x5d, 0x33, 0xc5, 0x4f, 0xf1, 0x50, 0xda, 0xeb, 0xfc, 0xe8, 0xd4, 0x2e, 0xf3, 0xcc, 0xfc, 0x90, 0x21, 0xf8, 0x3d, 0xa1, 0x18, 0x61, 0x66, 0xff, 0x2d, 0x52, 0x62, 0x30, 0xd7, 0xef, 0xb2, 0x89, 0x58, 0xd6, 0x6e, 0x2d, 0xe4, 0x1b, 0x5d, 0x43, 0xc3, 0xdc, 0x3, 0x50, 0x25, 0xb0, 0xd1, 0xa7, 0xc8, 0x62, 0x7b, 0x92, 0x84, 0x5f, 0xe, 0x38, 0x8e, 0xd2, 0x99, 0x0, 0x7, 0x5e, 0x84, 0xa6, 0xe2, 0xd, 0x9f, 0x7c, 0xe0, 0x46, 0x88, 0x52, 0x9f, 0x94, 0x52, 0xbb, 0xdf, 0xb6, 0x8c, 0x91, 0x2b, 0xf, 0xec, 0xc2, 0xec, 0x9c, 0x92, 0x83, 0xd6, 0x5e, 0x22, 0xbc, 0x65, 0x8f, 0xa3, 0xde, 0xb3, 0xeb, 0xf0, 0xb5, 0x67, 0x9e}, - output224: []byte{0x9e, 0x49, 0xfe, 0x7, 0x5b, 0x54, 0xf3, 0xc9, 0xc9, 0x43, 0x62, 0x75, 0x56, 0x45, 0xd9, 0x6, 0x79, 0xcb, 0xca, 0xf7, 0xed, 0x7f, 0x75, 0x1, 0xd0, 0xc2, 0x93, 0x7b}, - output256: []byte{0x22, 0x61, 0x4d, 0x37, 0x96, 0x59, 0xde, 0xc8, 0xf3, 0x4b, 0x89, 0x26, 0xf9, 0x19, 0x15, 0x16, 0x38, 0xc1, 0xeb, 0xb8, 0x71, 0x30, 0x4e, 0x51, 0x90, 0x6, 0xe1, 0x85, 0xf8, 0xe2, 0x25, 0xde}, - output384: []byte{0xd, 0x25, 0xfc, 0xc6, 0x35, 0x27, 0xef, 0xf5, 0x2d, 0x6e, 0x4c, 0x3e, 0x3f, 0x96, 0x63, 0xa9, 0xf, 0x8d, 0xbb, 0xfb, 0x50, 0xbc, 0x20, 0x35, 0x5c, 0x4e, 0x88, 0x79, 0x26, 0xe8, 0xdd, 0x45, 0xcc, 0x4, 0x15, 0x2c, 0x88, 0xf4, 0x23, 0x1, 0x3c, 0x3c, 0x40, 0xca, 0xc7, 0x6e, 0xa7, 0x80}, - output512: []byte{0x8b, 0x6, 0xcd, 0x2b, 0x1e, 0xba, 0x5b, 0x4f, 0x60, 0x7b, 0x2e, 0xf6, 0x1e, 0x1d, 0xc2, 0x4b, 0x26, 0xce, 0x8a, 0x50, 0xf2, 0x26, 0xfd, 0x78, 0x61, 0x35, 0x40, 0x67, 0x50, 0x9, 0xe9, 0x46, 0x88, 0x1f, 0xa1, 0x9d, 0x4e, 0xf0, 0x17, 0x2c, 0x90, 0xe5, 0xd1, 0xa1, 0x99, 0x27, 0xc6, 0xd9, 0x2d, 0x86, 0x2f, 0xd5, 0x13, 0xda, 0x66, 0x42, 0x8b, 0x8, 0x49, 0x16, 0x23, 0x58, 0x49, 0x38}}, - testcase{ - msg: []byte{0xcf, 0xf5, 0x45, 0x96, 0xc3, 0x15, 0x40, 0x30, 0x90, 0xb3, 0xdf, 0x12, 0x53, 0xc9, 0x77, 0x9b, 0x89, 0xe8, 0x66, 0xf1, 0x42, 0x1e, 0x13, 0xf7, 0x64, 0x6e, 0x3c, 0xc1, 0x6d, 0x9, 0x78, 0xc4, 0x1b, 0x95, 0x94, 0x99, 0xc2, 0x49, 0xd2, 0x29, 0xdc, 0xed, 0x6e, 0x26, 0x7c, 0xb4, 0xcb, 0x66, 0x99, 0xe0, 0x47, 0x8b, 0xe8, 0xde, 0x4e, 0x13, 0xbe, 0x4b, 0x58, 0xd6, 0xb6, 0x30, 0x83, 0xe9, 0x73, 0x45, 0x73, 0x9, 0x3f, 0xd3, 0x3f, 0xf2, 0xfd, 0xef, 0x48, 0x75, 0x4c, 0x9, 0xe8, 0x91, 0xc4, 0x1d, 0xdb, 0x62, 0xc2, 0xb4, 0x20, 0x8f, 0x77, 0x9c, 0x44, 0xbd, 0x44, 0x5d, 0x85, 0x2e, 0x2b, 0xe9, 0xda, 0x7f, 0xca, 0x6c, 0x5d, 0x7c, 0x1, 0x5f, 0x31, 0x9e, 0x4b, 0xaf, 0x9f, 0x9b, 0x8c, 0x59, 0x71, 0x8, 0x16, 0xa9, 0x78, 0xf6, 0x70, 0xeb, 0xdb, 0xf5, 0xef, 0x45, 0x57, 0x48, 0x20, 0x4b, 0x3c, 0xf1, 0x50, 0x18, 0x82, 0x53, 0xf, 0x7f, 0x95, 0x35, 0x7b, 0x7c, 0xc, 0x66, 0xb3, 0x54, 0xab, 0x94, 0x7f, 0xad, 0xd4, 0x19, 0x74, 0x10, 0x16, 0x2, 0xc9, 0x26, 0x92, 0x8d, 0x8a, 0x2b, 0x3a, 0xe1, 0x45, 0x97, 0xde, 0x32, 0x7d, 0xe0, 0x7b, 0x72, 0x4f, 0x96, 0x5, 0xbb, 0xb7, 0xa, 0x19, 0x3f, 0x4b, 0xf6, 0xdb, 0xf, 0x12, 0x50, 0xbb, 0xe0, 0x73, 0x2c, 0xe9, 0xcd, 0xa1, 0x3f, 0x22, 0x3, 0xee, 0x4, 0x16, 0x44, 0x38, 0xb8, 0x89, 0x32, 0x38, 0xa1, 0x86, 0x3c, 0x19, 0xf2, 0x23, 0x26, 0x6a, 0x4, 0x77, 0x92, 0xe1, 0x38, 0xb8, 0xce, 0x77, 0xa9, 0x63, 0x30, 0x38, 0x6c, 0x86, 0x6, 0x7c, 0x7f, 0x10, 0x97, 0xc1, 0xa4, 0x43, 0x7a, 0xcc, 0xb9, 0xdf, 0xec, 0xc9, 0x65, 0xd5, 0x76, 0x95, 0x54, 0x26, 0xf0, 0x66, 0xd1, 0xce, 0x72, 0xba, 0xb6, 0xaa, 0x25, 0xb9, 0x44, 0xeb, 0x7c, 0xd9, 0x85, 0x99, 0x88, 0xc9, 0xfc, 0x38, 0xc7, 0x73, 0x98, 0x83, 0x9e, 0x5c, 0x3a, 0x6a, 0x94, 0xe9, 0x19, 0x3, 0x35, 0xfa, 0x8a, 0x20, 0xf2, 0x40, 0xb6, 0x75, 0xa5, 0xe1, 0xf2, 0x54, 0x4f, 0x95, 0x76, 0x59, 0xb5, 0x57, 0xf2, 0xc9, 0x39, 0x3a, 0xa7, 0x99, 0xab, 0xaf, 0xd4, 0xd0, 0xa3, 0x16, 0x96, 0x27, 0xa7, 0x98, 0x51, 0x31, 0xc7, 0xc2, 0xbd, 0xac, 0x9c, 0xce, 0x99, 0xc8, 0xc7, 0x44, 0x37, 0x3c, 0x19, 0x58, 0x2a, 0x14, 0xbe, 0xdb, 0x71, 0x3b, 0x20, 0x68, 0xf1, 0x1, 0xfa, 0xd7, 0x6, 0x0, 0x4c, 0x63, 0xda, 0x2f, 0x56, 0x75, 0x34, 0x7a, 0x9, 0x53, 0x93, 0xbd, 0xe6, 0xe5, 0xeb, 0xac, 0xd2, 0xf8, 0x8b, 0xa, 0xec, 0x69, 0x99, 0xfa, 0xa, 0x16, 0x73, 0xd8, 0xf5, 0x30, 0xc5, 0xa4, 0x3e, 0x65, 0xa7, 0xbb, 0x24, 0x20, 0x2a, 0x7d, 0xdb, 0x5b, 0xe1, 0xb2, 0x30, 0x3b, 0xde, 0xb0, 0x6, 0x5d, 0x3d, 0x2, 0xb8, 0xa3, 0xa7, 0xb7, 0x46, 0x3a, 0xde, 0x75, 0x56, 0x48, 0x19, 0x7f, 0x99, 0x1d, 0xb4, 0xe7, 0x33, 0x79, 0x94, 0x8d, 0x1, 0xd6, 0x6f, 0x88, 0xe6, 0x5, 0x28, 0x5a, 0x14, 0x15, 0x1c, 0x6a, 0x3, 0x26, 0x43, 0x2c, 0x40, 0x5, 0xa8, 0x52, 0xb6, 0xfe, 0x74, 0x10, 0xe7, 0xa7, 0x74, 0xba, 0x17, 0xd8, 0x6f, 0x8b, 0xed, 0x48, 0xd8, 0x3a, 0x77, 0x7f, 0xcc, 0xfa, 0x8, 0xff, 0x6c, 0xf, 0x4a, 0xf9, 0xb4, 0x4d, 0x20, 0x2, 0x2d, 0xd7, 0x11, 0xb1, 0xf9, 0xfa, 0x88, 0xa3, 0x38, 0xae, 0x41, 0x28, 0x68, 0xde, 0xef, 0xd9, 0xad, 0x16, 0x1a, 0x91, 0xc, 0xd5, 0x5f, 0x33, 0x75, 0xca, 0x69, 0x9f, 0x8f, 0x3f, 0x2c, 0x32, 0x76, 0xe3, 0xc, 0x2e, 0xec, 0xce, 0x99, 0xbd, 0x8f, 0x25, 0x4c, 0xfc, 0xa7, 0x47, 0xfc, 0x39, 0x8d, 0x96, 0xc3, 0xc9, 0xb5, 0x62, 0x1e, 0xcf, 0x8d, 0xc7, 0x77, 0xd4, 0x7, 0x53, 0x44, 0xfd, 0xd0, 0xe9, 0x92, 0x91, 0x55, 0x6c, 0x9c, 0xa5, 0x86, 0xcb, 0x5f, 0x6, 0xf1, 0xcc, 0xa3, 0x2c, 0x11, 0x94, 0xff, 0x82, 0xf2, 0x7, 0x92, 0x44, 0xa, 0xdf, 0x15, 0xc1, 0x76, 0xd0, 0x1a, 0x4c, 0x4f, 0xf0, 0x4a, 0x2, 0xd2, 0xd8, 0xa, 0x47, 0x6a, 0x5b, 0xbb, 0xb1, 0xeb, 0x3b, 0x56, 0xf1, 0xdc, 0x76, 0xc4, 0xb0, 0x60, 0x2c, 0x50, 0xb6, 0x2a, 0x6d, 0xb0, 0xe1, 0x60, 0xc4, 0x3d, 0xf6, 0xc8, 0x78, 0x82, 0x96, 0x6b, 0xce, 0x7c, 0x33, 0xcc, 0xe7, 0x9b, 0xca, 0x7c, 0xd2, 0x65, 0x1, 0x48, 0x58, 0xac, 0xd6, 0xf0, 0x60, 0x6e, 0x2d, 0x25, 0xb9, 0xa4, 0x94, 0x9, 0xe4, 0x1b, 0x2b, 0x17, 0xde, 0xb2, 0x4e, 0xf5, 0xeb, 0xe3, 0x4c, 0xc7, 0x13, 0xd5, 0xce, 0xcf, 0xd5, 0xeb, 0x56, 0xa, 0x8a, 0xdb, 0xb4, 0x56, 0x99, 0xb2, 0xea, 0x19, 0x87, 0x6e, 0xc9, 0xf2, 0x16, 0xbe, 0xb5, 0x41, 0x44, 0x60, 0x4, 0x89, 0x8e, 0xe0, 0xfb, 0x56, 0x3, 0x3a, 0xbe, 0xe5, 0xda, 0xfe, 0x1b, 0x2a, 0x19, 0x6f, 0x11, 0xe7, 0x41, 0xe1, 0x64, 0x45, 0xb1, 0xe8, 0x82, 0xc2, 0xce, 0x6e, 0x5f, 0x43, 0x3c, 0x6b, 0xbf, 0x25, 0x8a, 0xc9, 0xaf, 0xc8, 0x14, 0x53, 0xd4, 0xf9, 0x5d, 0x9c, 0x37, 0x56, 0x8, 0x8e, 0x42, 0x88, 0xfb, 0xfd, 0xb8, 0x1a, 0x72, 0xe1, 0xf2, 0xe5, 0xa4, 0xad, 0xb9, 0x9e, 0xb6, 0x6, 0xe6, 0xb5, 0xaa, 0x48, 0x4e, 0x57, 0x8d, 0x97, 0xeb, 0x10, 0xbe, 0xc9, 0x72, 0xd2, 0x7a, 0xef, 0x24, 0x44, 0xf3, 0x40, 0x63, 0x4e, 0xad, 0x3a, 0xa6, 0x81, 0xc0, 0xa4, 0x3f, 0x4, 0x73, 0x5e, 0xd7, 0x44, 0x52, 0x5e, 0x18, 0xc3, 0xec, 0x9d, 0xd2, 0x22, 0x13, 0xf8, 0xf9, 0x9e, 0xa6, 0x33, 0x41, 0x27, 0xbf, 0xc0, 0xd7, 0x3, 0x67, 0x7e, 0x15, 0xa4, 0x13, 0xb1, 0xf2, 0x88, 0x6, 0x23, 0x4a, 0xd5, 0x10, 0x6d, 0x1c, 0x93, 0xa0, 0xa5, 0x44, 0x67, 0x33, 0x6b, 0xc0, 0x2a, 0xd7, 0x12, 0x91, 0x60, 0x5a, 0x87, 0xbf, 0x26, 0xc9, 0x5a, 0x38, 0x28, 0x52, 0xc4, 0x8e, 0x1, 0x7f, 0x8, 0x2f, 0x72, 0x89, 0xc5, 0x7e, 0x3e, 0x92, 0x43, 0x65, 0x8e, 0x9c, 0x10, 0x52, 0x36, 0x37, 0xfe, 0xdb, 0x5b, 0x36, 0x87, 0x30, 0x50, 0x31, 0x62, 0x1a, 0x6a, 0x62, 0xf6, 0x50, 0x72, 0xd5, 0x72, 0xe3, 0x53, 0x25, 0xf3, 0xf4, 0x7b, 0xb3, 0x68, 0x3e, 0x43, 0x7c, 0x1f, 0x64, 0x82, 0x50, 0x4, 0x6f, 0x46, 0x2f, 0xf6, 0x14, 0x3a, 0x37, 0x2a, 0xec, 0x2a, 0x80, 0xa9, 0x99, 0x82, 0x3a, 0xdb, 0x2b, 0xa6, 0x58, 0x64, 0xa7, 0xc8, 0x5, 0x5a, 0x1f, 0x38, 0xe8, 0xa4, 0x55, 0x31, 0x3f, 0xa4, 0xf0, 0x91, 0x8, 0x76, 0x9, 0xc8, 0x48, 0x99, 0x64, 0x1b, 0x94, 0x4a, 0x2d, 0x76, 0x4f, 0x5a, 0xff, 0x93, 0x59, 0x94, 0x4b, 0x33, 0xd0, 0xad, 0x0, 0x5, 0xc0, 0x8b, 0xac, 0x0, 0x3b, 0xa1, 0x4d, 0x50, 0x86, 0xa8, 0x8d, 0x3c, 0x12, 0xfb, 0xff, 0x8c, 0xa5, 0xd5, 0x19, 0x50, 0x68, 0xbc, 0x84, 0xef, 0x66, 0x82, 0xac, 0x2e, 0x27, 0x9c, 0x0, 0x82, 0xdd, 0xa, 0xbf, 0x42, 0x33, 0x3e, 0x7e, 0x52, 0xcf, 0x8b, 0xd1, 0x25, 0x3b, 0xc2, 0x66, 0xf4, 0x12, 0xd0, 0x50, 0xc9, 0xcd, 0x2e, 0x2d, 0xd3, 0xa8, 0x14, 0xc5, 0x92, 0x19, 0x32, 0x3, 0x54, 0x7a, 0x6f, 0xd0, 0xce, 0x70, 0x43, 0x60, 0xfd, 0x98, 0x44, 0xfa, 0x1f, 0xb7, 0x89, 0x18, 0x11, 0x75, 0xd0, 0x89, 0xdb, 0x4d, 0xb8, 0x65, 0x9c, 0x5e, 0x2b, 0xc9, 0x91, 0xf2, 0x13, 0x44, 0x22, 0x85, 0x87, 0x94, 0x15, 0x61, 0x85, 0x93, 0xea, 0x76, 0xfb, 0xcf, 0x34, 0x6, 0x7e, 0x7e, 0xe0, 0xb5, 0xba, 0xb7, 0x8d, 0x26, 0xb2, 0xa4, 0x96, 0x4b, 0xfa, 0xdd, 0x9f, 0xcf, 0x47, 0x70, 0xed, 0xc6, 0x2c, 0x7, 0x47, 0x80, 0xc, 0xe5, 0x82, 0xbe, 0x6c, 0x3d, 0x44, 0xdc, 0xf6, 0xb4, 0x48, 0x98, 0x81, 0x3, 0xc4, 0xff, 0x81, 0xc5, 0x22, 0x48, 0x38, 0xf7, 0x21, 0x68, 0x98, 0x5b, 0x24, 0x1e, 0x88, 0xd2, 0xce, 0x3b, 0x5, 0x86, 0x4b, 0x3d, 0xaa, 0xbf, 0xe8, 0x6, 0x33, 0x30, 0x76, 0x5b, 0xd1, 0x9, 0x37, 0x83, 0xae, 0x2a, 0x2a, 0x10, 0x4d, 0x32, 0x58, 0xcf, 0x2, 0x82, 0xe5, 0x16, 0x58, 0x57, 0xfc, 0xe9, 0x61, 0xfa, 0xd5, 0x62, 0x7f, 0x50, 0x8c, 0x40, 0x12, 0xa4, 0x5f, 0x61, 0x60, 0x2d, 0x7, 0x6c, 0xb2, 0x10, 0x8e, 0xfb, 0x8d, 0x96, 0x3f, 0x26, 0x6e, 0xdc, 0xc1, 0x72, 0xf0, 0x72, 0x9f, 0x3b, 0x43, 0x91, 0xb1, 0x92, 0x86, 0x8c, 0x90, 0xb5, 0x8e, 0xf8, 0x3c, 0xfd, 0x71, 0x3a, 0x27, 0xcc, 0x84, 0x94, 0xba, 0x5a, 0xb9, 0xec, 0x88, 0xb3, 0x3b, 0xe6, 0xf5, 0xdd, 0x3, 0xc1, 0x5e, 0x1c, 0x2a, 0x84, 0xc1, 0xbb, 0x9a, 0x13, 0xff, 0x49, 0x67, 0xfb, 0x20, 0x88, 0x4f, 0xcf, 0xd9, 0xf1, 0x7, 0xe1, 0x34, 0x5, 0x30, 0x7a, 0x1e, 0x52, 0x4a, 0xb8, 0x80, 0x43, 0x34, 0x10, 0x86, 0x10, 0xb1, 0x2b, 0xc3, 0xec, 0xb2, 0xe7, 0xb6, 0xc0, 0x20, 0x85, 0xa5, 0x93, 0x20, 0x80, 0x27, 0xa4, 0xe5, 0x25, 0xbe, 0x7d, 0x4a, 0x15, 0x6b, 0x97, 0x56, 0x25, 0xdb, 0x2d, 0x87, 0x9, 0x7d, 0xe, 0xa3, 0x69, 0x17, 0x92, 0xc, 0x47, 0xd9, 0xd, 0xac, 0xbf, 0xd5, 0x97, 0x8d, 0xc6, 0x2e, 0x11, 0x91, 0x20, 0x17, 0xe2, 0x8d, 0x43, 0x28, 0xb4, 0xce, 0xa1, 0xc5, 0xd4, 0xbb, 0x8f, 0x17, 0x6a, 0xa7, 0x93, 0xbc, 0x82, 0x48, 0xf3, 0xf4, 0xf8, 0xf, 0x52, 0x15, 0x67, 0x83, 0xc4, 0x71, 0x48, 0xce, 0x93, 0xf6, 0xe, 0x33, 0xfb, 0xcc, 0x70, 0x52, 0xa8, 0xcd, 0x49, 0xb, 0xf5, 0x85, 0xa6, 0x7b, 0x27, 0x93, 0x7, 0x76, 0xc7, 0xb6, 0xa7, 0x34, 0xd7, 0xe7, 0x71, 0xb7, 0xde, 0x92, 0x9c, 0xf2, 0x4c, 0x3, 0xb7, 0x7a, 0x27, 0xaf, 0x2f, 0x86, 0xa7, 0x5a, 0xf5, 0x9d, 0x6b, 0xe5, 0x81, 0xe3, 0xd1, 0xbb, 0xfe, 0x1f, 0x6e, 0xf0, 0x70, 0xc7, 0x3f, 0xa4, 0xbf, 0x58, 0xe, 0x87, 0xe7, 0x86, 0x10, 0x9e, 0x57, 0xa0, 0xcc, 0x1d, 0x2, 0x7c, 0xee, 0x30, 0x30, 0xd7, 0x9e, 0xb6, 0x7f, 0x4b, 0xf7, 0x1b, 0xfb, 0x3a, 0x52, 0xf, 0xd6, 0x82, 0x9e, 0xae, 0xe6, 0xf5, 0xac, 0xbc, 0x45, 0xc4, 0xd, 0x2d, 0x19, 0xbf, 0xff, 0xc7, 0x31, 0xe, 0xb0, 0x82, 0xd6, 0x7e, 0x4c, 0xeb, 0x2b, 0x12, 0xbb, 0x77, 0xc3, 0x34, 0xac, 0x9b, 0x24, 0xa5, 0x59, 0xa6, 0x79, 0x47, 0x4a, 0x86, 0x55, 0x9f, 0x52, 0x94, 0x33, 0xb, 0x15, 0x5b, 0x9f, 0x8c, 0x9d, 0x84, 0x58, 0x56, 0xc3, 0x7f, 0x75, 0x60, 0xfc, 0xd9, 0x26, 0xed, 0x8, 0x41, 0xc8, 0xd0, 0x77, 0x24, 0x9b, 0xbc, 0xcb, 0x28, 0xbc, 0x41, 0x8d, 0xdc, 0x7d, 0x18, 0x9f, 0xc0, 0xae, 0xe6, 0x70, 0x74, 0xe9, 0x5f, 0x81, 0x61, 0x9b, 0x87, 0x27, 0x50, 0xf, 0x16, 0x31, 0x7, 0xee, 0x17, 0xf0, 0x6f, 0xda, 0xaa, 0x1e, 0x61, 0x6, 0xfe, 0x55, 0x8c, 0xd0, 0x70, 0x7a, 0xd8, 0x58, 0x84, 0xc5, 0x1e, 0xb5, 0xca, 0x10, 0x86, 0x44, 0xc9, 0x8, 0xed, 0xe0, 0x43, 0x3d, 0xb7, 0x45, 0x93, 0x4, 0x28, 0xb5, 0x64, 0x6, 0xe0, 0x63, 0xcd, 0xdd, 0xb1, 0xa5, 0xc8, 0x35, 0x44, 0x4a, 0x7, 0x33, 0xba, 0x4, 0x97, 0xfe, 0x2c, 0xc, 0xc2, 0x73, 0x9c, 0x37, 0x3e, 0x8f, 0x74, 0xb2, 0x4b, 0xc1, 0xb3, 0xa0, 0x9c, 0x28, 0x65, 0x4e, 0x74, 0xc4, 0x84, 0x2c, 0x5b, 0x17, 0x76, 0x0, 0x97, 0x84, 0xa4, 0x5, 0xb9, 0xf8, 0x1e, 0xa9, 0x61, 0x63, 0x3d, 0xf7, 0xbe, 0x90, 0x85, 0x93, 0xb1, 0xef, 0x82, 0x4e, 0x43, 0xac, 0xb9, 0xeb, 0x4c, 0x39, 0x72, 0xa6, 0x62, 0x46, 0x2c, 0x42, 0xee, 0x1c, 0xe4, 0x6, 0xed, 0x55, 0xdf, 0xe6, 0x24, 0x5e, 0x9c, 0xe1, 0x24, 0xfe, 0x7c, 0x3, 0x8d, 0xea, 0xa1, 0x5e, 0x48, 0x7c, 0xbc, 0x1f, 0xb9, 0xb0, 0xfe, 0xec, 0x15, 0x36, 0xaa, 0x90, 0xf2, 0xec, 0x9f, 0xc, 0x97, 0x9f, 0x36, 0x9f, 0xf5, 0xf, 0xb9, 0x9a, 0x14, 0xd3, 0xc0, 0xaa, 0x9f, 0x94, 0xe6, 0x68, 0xa9, 0x80, 0x1d, 0x51, 0x4d, 0xe6, 0x90, 0x1d, 0xfa, 0x18, 0x91, 0x96, 0xd0, 0xfd, 0xb1, 0xe4, 0x31, 0x3d, 0x55, 0xa3, 0xed, 0x19, 0xe8, 0x76, 0x8e, 0xd8, 0x45, 0xb, 0x38, 0x7b, 0x84, 0x4, 0xbb, 0x9a, 0xd9, 0xdb, 0x1f, 0xa4, 0x8f, 0xb4, 0x3a, 0x2f, 0x5, 0x61, 0x68, 0xf2, 0x36, 0x96, 0x55, 0xd8, 0x38, 0x3c, 0xde, 0xff, 0xcc, 0xdd, 0xb9, 0x21, 0xf0, 0x94, 0x21, 0x34, 0x2, 0x41, 0x68, 0x2c, 0xf1, 0xad, 0x23, 0x3e, 0x48, 0x8d, 0xa9, 0x58, 0x48, 0x95, 0xbb, 0xef, 0xec, 0x36, 0x2, 0x69, 0x3e, 0xbb, 0x7e, 0xca, 0x32, 0xbe, 0x77, 0x3c, 0x91, 0x42, 0x56, 0x9a, 0xcf, 0xc1, 0x88, 0xa9, 0x7d, 0x46, 0x80, 0x1f, 0x61, 0x3d, 0xec, 0x22, 0x6e, 0x82, 0xf2, 0x9e, 0xf0, 0x7c, 0x1e, 0x1, 0x97, 0xf4, 0x46, 0x2b, 0x4f, 0x1f, 0x22, 0xed, 0xe1, 0x3e, 0x12, 0x42, 0xff, 0x51, 0x1, 0x69, 0x31, 0x12, 0xa4, 0x10, 0xaa, 0x59, 0xd4, 0x93, 0x1d, 0x2e, 0x98, 0x99, 0x21, 0x72, 0xaa, 0x4d, 0xf8, 0x18, 0xd, 0x57, 0x1f, 0xea, 0x9e, 0xf9, 0x45, 0x15, 0x91, 0xd, 0x6c, 0xe1, 0x4d, 0x81, 0xed, 0x8f, 0x6, 0xe, 0x8e, 0x6c, 0xfc, 0xcd, 0x16, 0x78, 0xa8, 0x27, 0x73, 0x60, 0x9, 0xdb, 0xc3, 0x8d, 0xe3, 0xd6, 0x3d, 0x2b, 0xf7, 0xab, 0x78, 0xb0, 0xc9, 0xcf, 0x35, 0x24, 0x37, 0x95, 0x27, 0xa7, 0xfe, 0x4a, 0x3, 0x4e, 0x36, 0xdf, 0xaf, 0xb0, 0x18, 0xb5, 0x4f, 0x8, 0xef, 0x3d, 0xd4, 0x19, 0x4, 0xfb, 0xb2, 0x78, 0x2d, 0x63, 0xeb, 0x7b, 0x75, 0x5a, 0x6d, 0x30, 0x6b, 0xcb, 0x0, 0x4f, 0xa, 0x8c, 0xee, 0x31, 0x82, 0xb9, 0x9e, 0xd6, 0xa0, 0x1d, 0xf1, 0x98, 0xa0, 0x2, 0x7d, 0xe4, 0x29, 0x38, 0x6, 0x4d, 0x32, 0xe4, 0x5d, 0x37, 0xa6, 0x13, 0xfa, 0xee, 0x1f, 0x10, 0x75, 0xf6, 0x99, 0x12, 0x56, 0x75, 0xb1, 0x89, 0x8, 0xc2, 0x3a, 0xb0, 0xbe, 0x24, 0x8a, 0x5a, 0x1a, 0xe8, 0xa0, 0x1b, 0x1b, 0xf7, 0x6c, 0xe7, 0x13, 0x71, 0xaf, 0xa5, 0x6c, 0xb3, 0x46, 0x2a, 0x1c, 0x52, 0x46, 0x9a, 0x46, 0xa, 0x35, 0x7e, 0x4c, 0x78, 0x74, 0x22, 0x4c, 0x37, 0xc1, 0x36, 0x6d, 0xb9, 0xfd, 0xd3, 0xa6, 0xf1, 0xf0, 0x8a, 0x67, 0x18, 0xca, 0x45, 0xbb, 0xd3, 0xb1, 0x85, 0xe, 0x74, 0xe2, 0x7e, 0x76, 0x57, 0x1d, 0xc8, 0x9e, 0x53, 0x96, 0xef, 0xd5, 0xc2, 0x8a, 0xa3, 0x7a, 0x61, 0xdd, 0x3f, 0x82, 0xfc, 0x42, 0x57, 0xc0, 0x80, 0xaa, 0xd2, 0x5a, 0xcb, 0x8b, 0x33, 0x6e, 0x5d, 0x9, 0x39, 0x55, 0xdc, 0x68, 0x47, 0xaf, 0x1a, 0xa4, 0xbb, 0xae, 0x31, 0xa0, 0xe6, 0x4b, 0xa5, 0xc0, 0x21, 0x5, 0x3e, 0x85, 0x1e, 0x5, 0xe1, 0xfd, 0x39, 0x8b, 0x5e, 0xca, 0x21, 0x49, 0x21, 0x98, 0x92, 0xec, 0xa, 0x64, 0x4d, 0xf2, 0x27, 0x7b, 0x77, 0xbd, 0xa8, 0x35, 0x72, 0xa7, 0x90, 0x6b, 0x16, 0x8a, 0x9a, 0xb1, 0x73, 0x70, 0xab, 0x9e, 0x24, 0xb5, 0x76, 0x67, 0xf9, 0xde, 0x50, 0x3f, 0xf0, 0xb1, 0xf9, 0xb7, 0x98, 0xdd, 0xa9, 0x99, 0x96, 0x35, 0x6c, 0xf6, 0x5, 0x55, 0xdc, 0x63, 0xee, 0x40, 0xb2, 0x3c, 0x77, 0xfc, 0xe4, 0x38, 0x79, 0xc, 0x8f, 0x25, 0x0, 0x30, 0x3, 0x32, 0xa, 0xba, 0x73, 0x1a, 0x2f, 0x23, 0x37, 0x25, 0xff, 0x7d, 0x62, 0xa4, 0x9e, 0x76, 0xbc, 0xeb, 0x7e, 0xc7, 0x6f, 0x58, 0x55, 0x8c, 0x2, 0x56, 0x72, 0xd7, 0x14, 0x4e, 0x59, 0x43, 0x40, 0x8f, 0x4d, 0xaf, 0x60, 0xe4, 0xd9, 0x91, 0x99, 0xb, 0x51, 0xf, 0x54, 0x85, 0x51, 0xf2, 0xab, 0xac, 0x99, 0x6e, 0x60, 0x3f, 0x55, 0x90, 0x51, 0xc4, 0xa8, 0x2c, 0x81, 0x81, 0xe9, 0x67, 0xee, 0xe7, 0x2e, 0x5, 0xae, 0x35, 0x8, 0xe1, 0x81, 0xdb, 0x54, 0xc8, 0xee, 0xa4, 0xc0, 0x5d, 0x2c, 0x94, 0x40, 0x52, 0x1e, 0xb1, 0x93, 0x8, 0xb3, 0xd5, 0xf0, 0xb5, 0x48, 0x59, 0x2, 0xa6, 0xb0, 0x1a, 0x5a, 0xe0, 0x4f, 0xa, 0x4d, 0x57, 0x12, 0xc2, 0x83, 0x8c, 0x81, 0x50, 0x98}, - output224: []byte{0x13, 0xb7, 0x2f, 0x2c, 0xba, 0x9f, 0x9a, 0x26, 0x92, 0x2e, 0xe7, 0xa8, 0xe5, 0x72, 0x2a, 0xed, 0xd6, 0x27, 0x82, 0xd4, 0x67, 0x96, 0x49, 0xec, 0xa6, 0xcb, 0x48, 0xc6}, - output256: []byte{0xab, 0x9b, 0xeb, 0xef, 0x5, 0x3a, 0xd5, 0x70, 0x60, 0xfb, 0xa, 0x7c, 0xbf, 0xc7, 0xe4, 0x2a, 0x6d, 0x78, 0xb4, 0x9f, 0x60, 0xcd, 0xb5, 0xaa, 0x8b, 0xd3, 0xbc, 0xe1, 0x73, 0xb5, 0xc2, 0xb7}, - output384: []byte{0x92, 0x91, 0xd0, 0x1c, 0x91, 0x3e, 0xe2, 0x5e, 0x11, 0xc1, 0x6a, 0x2f, 0xd2, 0x4e, 0x89, 0xab, 0x9, 0x14, 0x91, 0xfb, 0xfb, 0xe8, 0x5a, 0xde, 0x41, 0x12, 0x28, 0xac, 0x35, 0xc2, 0x8d, 0xc0, 0xce, 0x9b, 0x2e, 0x9a, 0x9, 0x8, 0xad, 0x28, 0x8b, 0x3b, 0xf8, 0x8c, 0x49, 0x29, 0xae, 0x5}, - output512: []byte{0x6, 0x7, 0x15, 0xba, 0xf2, 0x20, 0xba, 0xce, 0xab, 0x6e, 0xf1, 0x57, 0x56, 0x98, 0x5c, 0xc0, 0xcc, 0x2d, 0x60, 0x85, 0x40, 0x99, 0x51, 0x6, 0x20, 0x89, 0x6b, 0x76, 0x53, 0x20, 0x4d, 0xfa, 0x9e, 0x57, 0xfd, 0xbb, 0xa3, 0x45, 0x5c, 0x63, 0x7e, 0xd4, 0x88, 0xc1, 0xa1, 0x3e, 0x6c, 0x67, 0x89, 0x38, 0x49, 0xbc, 0x1, 0x7c, 0x34, 0x18, 0x45, 0x48, 0x5a, 0x3a, 0x8c, 0x38, 0x8c, 0xf3}}, - testcase{ - msg: []byte{0x94, 0x13, 0x3b, 0x8e, 0x14, 0x78, 0x5f, 0xc1, 0x95, 0x65, 0xa3, 0xaf, 0xa, 0xef, 0x60, 0x46, 0x2b, 0xb7, 0xf8, 0x4, 0x5e, 0x2e, 0xdf, 0x4a, 0x83, 0x67, 0x18, 0x56, 0x1a, 0xee, 0xfb, 0xd0, 0x38, 0x24, 0x34, 0xd3, 0x19, 0x21, 0x1c, 0x67, 0xf, 0xc6, 0x99, 0xd2, 0x5f, 0x2, 0xec, 0x60, 0x8c, 0xfe, 0xd9, 0x78, 0x6b, 0x7d, 0xa7, 0xe, 0x55, 0x95, 0xac, 0x81, 0x66, 0x88, 0x45, 0x5c, 0xbc, 0xb4, 0x44, 0x95, 0x36, 0xe8, 0xad, 0x20, 0x86, 0x3d, 0x76, 0x93, 0x77, 0x96, 0xcb, 0xc, 0x59, 0x99, 0x18, 0xa2, 0x1a, 0x1, 0x33, 0xb6, 0xc6, 0x25, 0xb2, 0x0, 0xb, 0xed, 0x88, 0x84, 0xfc, 0x86, 0x35, 0x6f, 0xd7, 0x42, 0xaf, 0x78, 0xbb, 0x55, 0xd6, 0x52, 0xce, 0x48, 0x92, 0xe7, 0xc2, 0x96, 0x85, 0x3a, 0x40, 0xaf, 0x29, 0x11, 0x6c, 0xc9, 0x8d, 0x38, 0x87, 0x4c, 0xa0, 0xf8, 0xbb, 0x5f, 0x6e, 0xc8, 0xc0, 0x4d, 0xd7, 0xf3, 0xf9, 0x68, 0x18, 0x58, 0xe0, 0xcd, 0x54, 0xd8, 0xf9, 0xb5, 0xa, 0x83, 0xc, 0x31, 0xa9, 0x78, 0x1e, 0x70, 0xf6, 0x3e, 0x59, 0x22, 0xb0, 0x86, 0x17, 0x80, 0x21, 0x4, 0x4, 0x4e, 0xc2, 0xed, 0x28, 0x56, 0x6e, 0x39, 0x53, 0x4f, 0xa8, 0x85, 0x95, 0x73, 0xf0, 0x24, 0xca, 0x38, 0x1d, 0x87, 0xbd, 0x6e, 0x4, 0x60, 0x7b, 0x94, 0x40, 0xd3, 0xb7, 0xd4, 0xef, 0xf, 0xd1, 0x72, 0xa6, 0xb8, 0xfd, 0xfa, 0x22, 0x35, 0xd4, 0x6b, 0xaa, 0xe0, 0x77, 0x84, 0x67, 0xbf, 0xed, 0x91, 0xd3, 0x3c, 0x8d, 0xac, 0x9d, 0xb5, 0xe7, 0xeb, 0x6c, 0x69, 0xff, 0xcc, 0x2e, 0x9f, 0x2d, 0x6b, 0x5f, 0x53, 0xec, 0xc8, 0x0, 0x30, 0x61, 0x3, 0xd8, 0x6c, 0xcb, 0x1e, 0x34, 0x83, 0xea, 0x2a, 0xc3, 0x49, 0xeb, 0xa3, 0x83, 0x31, 0x74, 0xd5, 0xcf, 0x5, 0x8b, 0x8c, 0xa8, 0x28, 0x55, 0xa9, 0x38, 0xa6, 0xd3, 0x82, 0x72, 0x85, 0x1b, 0x19, 0x77, 0x31, 0x9a, 0xd7, 0x8a, 0x96, 0xa5, 0x9b, 0x7d, 0x63, 0x0, 0x83, 0x6b, 0xb, 0x21, 0x99, 0x74, 0xca, 0xf8, 0x77, 0x6b, 0xab, 0x7a, 0xbf, 0x46, 0x65, 0x75, 0x7f, 0x9c, 0xc9, 0x41, 0x29, 0x9a, 0x96, 0x99, 0x8d, 0x3a, 0x91, 0xd, 0xd4, 0x1f, 0xaf, 0x26, 0xd4, 0xab, 0x54, 0x40, 0x8f, 0xdb, 0x92, 0xf, 0xde, 0x1d, 0x61, 0x4a, 0x8, 0xc2, 0xf0, 0x27, 0x16, 0xa1, 0x7a, 0xc3, 0xa9, 0x85, 0x54, 0xd9, 0x27, 0x1f, 0x64, 0x4d, 0xd, 0x74, 0xc0, 0xd4, 0xa7, 0x5c, 0x66, 0x3a, 0xb8, 0xfd, 0xcb, 0xcb, 0xb7, 0x5b, 0x25, 0x0, 0x96, 0xc1, 0x56, 0x36, 0x6e, 0xe1, 0xa3, 0xdf, 0xdc, 0x6b, 0x28, 0x29, 0x9b, 0x38, 0xc0, 0xc1, 0x4b, 0xb6, 0x85, 0xa8, 0x9a, 0xcf, 0x6c, 0x41, 0xac, 0xab, 0xf6, 0xb3, 0xc6, 0x74, 0x5d, 0x8, 0xf7, 0x38, 0x11, 0x0, 0x9e, 0x9e, 0x5e, 0xa8, 0x68, 0xd4, 0x69, 0xa0, 0xc8, 0xcc, 0x35, 0xd8, 0x3e, 0x99, 0xb2, 0xda, 0x57, 0xd2, 0x2, 0x32, 0x4e, 0xdf, 0x5, 0x58, 0xe7, 0x63, 0x2d, 0xe7, 0x82, 0x74, 0xc, 0xea, 0x7d, 0x6c, 0x4d, 0xb9, 0x59, 0xf, 0x67, 0x5c, 0xed, 0x9e, 0x6c, 0x27, 0xc8, 0xd3, 0x98, 0x84, 0x99, 0xd, 0x7b, 0x68, 0x5c, 0x89, 0xf7, 0xe, 0x55, 0xe0, 0x84, 0xac, 0x8c, 0x1f, 0x36, 0x6a, 0x2b, 0x8e, 0xa8, 0x93, 0x70, 0xe7, 0xf7, 0xd7, 0x24, 0xeb, 0x91, 0x70, 0x72, 0x9e, 0x20, 0xbb, 0x18, 0xc7, 0x2, 0x6b, 0xfd, 0xa8, 0xbe, 0x4a, 0x98, 0x13, 0x17, 0x2b, 0x76, 0xf7, 0x2b, 0x7f, 0xf8, 0xfd, 0xd3, 0x1f, 0x3a, 0xd4, 0x72, 0x82, 0x97, 0x9d, 0xfa, 0x87, 0x4, 0x92, 0x80, 0x42, 0xc2, 0x4a, 0xe3, 0x98, 0x5, 0xa, 0x4f, 0x43, 0x84, 0x51, 0x79, 0x1, 0xa3, 0xa2, 0xd4, 0x23, 0xc, 0x56, 0xa0, 0xcf, 0x3b, 0xca, 0x92, 0x8a, 0xb2, 0x11, 0xbc, 0xd2, 0xbc, 0xd4, 0xef, 0xb, 0x73, 0xda, 0xf6, 0x2, 0x40, 0xf3, 0x9a, 0xc0, 0x1a, 0x7a, 0xb2, 0x9d, 0xc8, 0x8, 0x96, 0xf6, 0x11, 0x8a, 0x56, 0xdb, 0x95, 0x76, 0x62, 0xc2, 0x5, 0x8f, 0x4, 0x58, 0x24, 0xda, 0x79, 0xda, 0x35, 0xef, 0xdb, 0xa1, 0xf8, 0xd7, 0x10, 0x94, 0x15, 0x46, 0x43, 0xa5, 0x70, 0xde, 0xa9, 0x5f, 0x30, 0xcd, 0x28, 0xf2, 0x8a, 0xac, 0x3f, 0x32, 0x4, 0x13, 0x25, 0x71, 0xcf, 0x9c, 0xb6, 0x88, 0xd2, 0x7a, 0xdc, 0x77, 0x66, 0x2a, 0xe9, 0x25, 0xb7, 0x5f, 0x3f, 0xa3, 0x85, 0x4f, 0xb8, 0x49, 0xc4, 0x45, 0xd, 0x4c, 0xb6, 0x16, 0x97, 0x88, 0xe2, 0xaa, 0x6a, 0xf6, 0x3a, 0x30, 0xc3, 0x65, 0x4b, 0x81, 0xd0, 0x8a, 0xa1, 0x18, 0x77, 0x3b, 0x87, 0xd0, 0xf7, 0x6b, 0x7a, 0xc4, 0x43, 0x24, 0x66, 0x58, 0x66, 0x2b, 0xef, 0x13, 0x2e, 0xd1, 0x32, 0x18, 0x49, 0x8f, 0xe, 0x46, 0x46, 0xec, 0x77, 0x82, 0xf6, 0x3b, 0x1, 0x69, 0xda, 0x78, 0x90, 0xc6, 0x82, 0xa2, 0xd0, 0x46, 0xe1, 0x3c, 0x9, 0x6f, 0xe5, 0x21, 0xe4, 0xe4, 0x28, 0x51, 0x61, 0x7d, 0xfe, 0xaf, 0x85, 0xcb, 0x36, 0x6c, 0x6d, 0xa7, 0xce, 0x65, 0x65, 0x53, 0x26, 0x4b, 0xf6, 0x73, 0x90, 0x68, 0x72, 0xce, 0x8e, 0xf4, 0x45, 0x2c, 0x9, 0x93, 0xb2, 0xf5, 0x19, 0x1f, 0x2e, 0x83, 0x11, 0x7e, 0x2e, 0x8d, 0x66, 0xd3, 0xfd, 0x83, 0x33, 0xf0, 0xde, 0xbb, 0xc9, 0xd2, 0xb1, 0xad, 0xd3, 0x1e, 0xd8, 0x7, 0xbf, 0x3d, 0xd2, 0xdc, 0x5, 0x6a, 0x25, 0x90, 0xf8, 0xfb, 0x1c, 0xaa, 0x31, 0xd1, 0x10, 0xf3, 0x89, 0xdf, 0xb0, 0x45, 0xc2, 0x67, 0x6, 0x80, 0x2a, 0xcb, 0x2b, 0x4e, 0x7a, 0x2c, 0x1e, 0x59, 0x71, 0xd0, 0x79, 0x20, 0xa5, 0x8f, 0xdf, 0x2e, 0x30, 0xa4, 0x87, 0x56, 0xa2, 0xbe, 0x92, 0xfc, 0x47, 0x29, 0xe5, 0xa7, 0x79, 0xd6, 0x1e, 0x82, 0x47, 0x76, 0x3, 0xce, 0xc7, 0x30, 0x88, 0xc1, 0x23, 0x14, 0xcc, 0x89, 0xc9, 0x9c, 0xa, 0xc9, 0x1e, 0x41, 0xf7, 0x2e, 0x83, 0x9, 0x56, 0xf3, 0x51, 0xd5, 0x60, 0x13, 0x6f, 0xa2, 0x41, 0x2f, 0x5a, 0x47, 0xf6, 0x27, 0xf5, 0x72, 0x4a, 0x73, 0xfd, 0x4c, 0x58, 0x4c, 0x9a, 0xb6, 0x2f, 0x2, 0x83, 0x42, 0x27, 0x8e, 0x96, 0xb7, 0xf3, 0xf1, 0xed, 0xd2, 0x70, 0xca, 0x45, 0xbc, 0x8b, 0x56, 0x73, 0x97, 0x10, 0x7, 0xfc, 0x55, 0x7e, 0x9c, 0x3f, 0x1c, 0xf7, 0xa6, 0x5c, 0x80, 0x42, 0x65, 0x2, 0x21, 0x3e, 0xe2, 0xd5, 0xf3, 0x2a, 0xa7, 0x26, 0xc3, 0x36, 0x89, 0x4e, 0x35, 0xae, 0x3f, 0xa3, 0xdc, 0x45, 0x2f, 0x1e, 0x13, 0xf9, 0x4d, 0x6a, 0xa2, 0xba, 0x5a, 0xe7, 0x97, 0x5c, 0x14, 0xc3, 0xc2, 0x80, 0x4f, 0xe7, 0x19, 0x98, 0xac, 0x48, 0x12, 0x41, 0xc6, 0x6f, 0xb8, 0x1a, 0xd6, 0x21, 0x57, 0xe4, 0x5, 0x88, 0x84, 0x93, 0x1c, 0x93, 0xda, 0x6c, 0x37, 0x7f, 0xac, 0x5d, 0xfa, 0xd4, 0xc6, 0xfa, 0xa5, 0x5, 0x46, 0x1b, 0xab, 0x4f, 0xa8, 0x52, 0x66, 0x92, 0x2b, 0x28, 0x27, 0xbf, 0x3b, 0x9a, 0x43, 0x1e, 0xaf, 0x25, 0xc5, 0xac, 0xcf, 0x83, 0x9f, 0x78, 0xa0, 0x2, 0x9e, 0xd, 0xba, 0xba, 0x8a, 0x2d, 0x52, 0xb7, 0xe0, 0x20, 0x32, 0x63, 0xb6, 0xc2, 0x65, 0xb0, 0x3c, 0x97, 0x60, 0xc, 0x75, 0x39, 0x12, 0x9c, 0x3e, 0xba, 0x3b, 0x55, 0xca, 0x88, 0x20, 0x32, 0x79, 0x20, 0x55, 0x9d, 0x86, 0x87, 0x81, 0x36, 0xe4, 0x4, 0x60, 0xc4, 0x5f, 0x5e, 0x3e, 0xd4, 0xd0, 0xa8, 0x4e, 0x81, 0xbc, 0x2a, 0xf6, 0x84, 0x73, 0xae, 0x7c, 0x9e, 0xec, 0xa6, 0x2e, 0x55, 0x91, 0x72, 0x9d, 0xea, 0xe7, 0x4c, 0x4a, 0xcc, 0x97, 0x4b, 0xb9, 0x98, 0xbf, 0x6f, 0xe0, 0x1c, 0xd2, 0xa7, 0x81, 0xf1, 0x1, 0x46, 0xca, 0xca, 0xc6, 0x6a, 0x49, 0x29, 0x5, 0x97, 0x3b, 0x6, 0xc3, 0x91, 0x7c, 0x72, 0x26, 0x8f, 0xf8, 0x9e, 0x84, 0x73, 0x6a, 0xe3, 0x86, 0xec, 0xa2, 0x91, 0x3c, 0xef, 0xea, 0x3d, 0x55, 0xc6, 0xcc, 0xb3, 0x92, 0xd1, 0xb1, 0xc1, 0x62, 0x72, 0x69, 0xc0, 0x60, 0x96, 0x2a, 0xbe, 0xee, 0xa3, 0x88, 0x79, 0x1f, 0x5b, 0xd4, 0xea, 0xeb, 0x1f, 0xe0, 0x33, 0x8b, 0xf1, 0x8f, 0xc3, 0x40, 0x1b, 0xe0, 0xb7, 0xab, 0x55, 0xc2, 0x8f, 0xbc, 0xda, 0xda, 0x3a, 0xd2, 0xb3, 0x9e, 0x7b, 0xff, 0x28, 0xf4, 0xf8, 0xf3, 0x11, 0x73, 0x39, 0xe, 0xef, 0xdc, 0x99, 0x27, 0xa0, 0x66, 0xa5, 0x54, 0xe8, 0x17, 0x5b, 0x92, 0xef, 0xb8, 0x80, 0x8c, 0x92, 0x52, 0x74, 0x89, 0x19, 0x4c, 0x61, 0x92, 0xd7, 0xf1, 0xcd, 0xa7, 0x8a, 0xce, 0xea, 0xc7, 0x7e, 0x67, 0xba, 0x50, 0x2f, 0x79, 0x4e, 0x6d, 0xa3, 0xda, 0xdb, 0x8c, 0x12, 0xe5, 0xec, 0x43, 0x6a, 0x1a, 0xe0, 0xaf, 0x57, 0x1f, 0x34, 0xa9, 0xb5, 0xed, 0xcc, 0x64, 0xa8, 0xed, 0x34, 0x35, 0x4e, 0x36, 0xeb, 0x67, 0xe8, 0xd6, 0x16, 0x31, 0x70, 0x75, 0x16, 0xf, 0x72, 0x52, 0x2, 0xb8, 0x32, 0xc7, 0xac, 0xd6, 0x49, 0xa8, 0x6f, 0xf7, 0xb1, 0x35, 0x96, 0xa, 0x3f, 0x29, 0x57, 0x86, 0x97, 0x6d, 0xac, 0x96, 0x63, 0x7d, 0x94, 0x9e, 0xcd, 0xda, 0x43, 0xe7, 0x1, 0x4c, 0x45, 0x1e, 0xe5, 0xe, 0xc7, 0x52, 0xbb, 0x20, 0xc8, 0xde, 0xfb, 0x19, 0x92, 0x7, 0xc6, 0xb2, 0xbb, 0xd, 0xcd, 0x1f, 0xb2, 0x12, 0xe6, 0xdb, 0x26, 0x47, 0x6b, 0xb3, 0xe9, 0xf, 0x5e, 0xd2, 0xb9, 0xcb, 0xb3, 0xf1, 0xc2, 0x43, 0xda, 0xdc, 0xc6, 0x22, 0xcb, 0x50, 0x3d, 0x8, 0xff, 0x4b, 0x26, 0x6a, 0x74, 0x2c, 0x5c, 0x61, 0xa4, 0xff, 0xf2, 0x3d, 0xe2, 0x5c, 0xad, 0x7c, 0x3d, 0x13, 0xc2, 0xab, 0x50, 0xad, 0x2a, 0xe7, 0x7b, 0xff, 0x6e, 0x1b, 0x18, 0xe5, 0x93, 0x28, 0x3a, 0xb, 0xb4, 0xaf, 0xd6, 0x11, 0x1c, 0x9b, 0x5d, 0x5d, 0x6, 0x2f, 0x77, 0xeb, 0x2c, 0xe8, 0x7, 0x15, 0x61, 0xa7, 0x96, 0xce, 0xdd, 0x4c, 0x4f, 0x81, 0x93, 0x73, 0x68, 0x5b, 0x4c, 0x3d, 0x3d, 0x14, 0xbe, 0x5b, 0xc2, 0xa, 0x72, 0xeb, 0x9c, 0x6c, 0x2c, 0x17, 0x65, 0xba, 0x88, 0x76, 0x8, 0x15, 0x73, 0x54, 0xd0, 0xa5, 0xbc, 0x1f, 0x41, 0x58, 0xd2, 0x3e, 0xcf, 0x30, 0xae, 0x3b, 0x3b, 0xef, 0x24, 0xbc, 0xf8, 0x53, 0xf, 0x13, 0xb7, 0xfe, 0xa5, 0x47, 0x22, 0xb5, 0x7a, 0x76, 0x11, 0x69, 0xcc, 0x82, 0x76, 0x34, 0xa8, 0x43, 0x14, 0xf6, 0x97, 0xb0, 0x90, 0x42, 0x5b, 0xdf, 0x9e, 0xbd, 0xf8, 0x8a, 0x6b, 0x53, 0x51, 0x5e, 0x1, 0xd3, 0x19, 0x4a, 0x8d, 0xec, 0x7b, 0x8e, 0x15, 0xba, 0xba, 0xff, 0x42, 0xe0, 0xe0, 0xcb, 0xd1, 0xdf, 0x28, 0x6a, 0x25, 0xc1, 0xfe, 0x39, 0x34, 0x20, 0x1e, 0xe1, 0x94, 0x47, 0xeb, 0x1e, 0x29, 0xbf, 0x9d, 0xdc, 0xd1, 0x4e, 0xc9, 0x50, 0x8a, 0xc2, 0x13, 0xce, 0x17, 0xc6, 0xa5, 0xba, 0x3b, 0xcd, 0x20, 0x7d, 0x1e, 0x41, 0xac, 0xc4, 0xfc, 0xf9, 0xef, 0x40, 0xee, 0xa8, 0x94, 0x3d, 0xff, 0xa2, 0x82, 0x20, 0xf, 0x37, 0x72, 0x44, 0x13, 0xa4, 0x38, 0xba, 0xdc, 0x59, 0xa1, 0x3a, 0x7, 0xca, 0xf1, 0x63, 0x35, 0xf, 0x26, 0x63, 0xd2, 0xb3, 0x81, 0xc1, 0x43, 0x63, 0xe2, 0x37, 0x2e, 0x30, 0xfa, 0xf1, 0x38, 0x1a, 0x89, 0x36, 0xb6, 0x1d, 0xf5, 0x37, 0x5, 0x62, 0xbd, 0xba, 0xa1, 0x10, 0x2b, 0x65, 0x89, 0xdb, 0x74, 0xc6, 0x35, 0xc7, 0x91, 0x94, 0x2a, 0x5e, 0xc1, 0x48, 0xf6, 0x6d, 0xab, 0x80, 0x3f, 0x46, 0x9f, 0x6c, 0x39, 0xdc, 0x22, 0x5f, 0xba, 0x4e, 0xc8, 0x7b, 0xde, 0x2d, 0x5e, 0xa3, 0x1e, 0xb5, 0x17, 0xf3, 0xa4, 0x38, 0x35, 0xd4, 0xb8, 0x8c, 0x55, 0x6e, 0x84, 0xd6, 0x3b, 0x26, 0x89, 0x4b, 0xda, 0xdf, 0xc4, 0x62, 0x4e, 0xcb, 0x43, 0x27, 0x20, 0xd1, 0x64, 0xbf, 0xa5, 0xf9, 0xd2, 0xa6, 0x85, 0x72, 0x8b, 0xdf, 0x11, 0x95, 0x91, 0xa, 0x94, 0xc3, 0x4, 0x36, 0x9d, 0xe6, 0x1c, 0x34, 0xbb, 0xe3, 0x2f, 0xde, 0xd4, 0x51, 0x53, 0x42, 0x76, 0xde, 0x8e, 0x36, 0x97, 0x49, 0xa, 0xf8, 0x35, 0xfb, 0xd8, 0x15, 0x3b, 0x80, 0x7c, 0x8a, 0x45, 0xc1, 0xe7, 0x5, 0x73, 0x33, 0xf9, 0x9e, 0x82, 0x0, 0x32, 0xf8, 0x5, 0x1f, 0xe8, 0xfd, 0x60, 0x75, 0x2, 0x70, 0x41, 0xdb, 0x4b, 0xaf, 0x76, 0x93, 0xba, 0x22, 0x0, 0xa6, 0x71, 0xb3, 0x76, 0x79, 0xb7, 0xdd, 0x8, 0x81, 0x22, 0xf4, 0x89, 0x25, 0xc6, 0x4e, 0x4c, 0x3e, 0x99, 0x9b, 0xe8, 0x43, 0x48, 0x44, 0x58, 0x98, 0xc3, 0xa1, 0x69, 0xa, 0x26, 0x59, 0x86, 0xff, 0x55, 0x8d, 0x8c, 0x6e, 0xf, 0x2f, 0xd1, 0x42, 0xe1, 0xa9, 0x3f, 0x4e, 0xb3, 0x7, 0xe4, 0xcf, 0x20, 0x47, 0x21, 0x1e, 0x0, 0x5a, 0x42, 0xc9, 0x2a, 0x43, 0x1d, 0x11, 0x1d, 0x48, 0xef, 0xe4, 0x76, 0x2d, 0xae, 0x2, 0x5b, 0x18, 0x3a, 0x2d, 0xbc, 0x57, 0xc4, 0x5d, 0x98, 0x48, 0x4d, 0xd8, 0x53, 0x39, 0xee, 0xc6, 0x8e, 0x4a, 0x6c, 0xeb, 0x31, 0x57, 0x16, 0x12, 0x17, 0xda, 0x7d, 0xf4, 0x40, 0x29, 0xc1, 0xd0, 0x42, 0xe4, 0xfc, 0x30, 0x20, 0x79, 0xb2, 0x22, 0x4, 0x33, 0x23, 0x7, 0x9b, 0xb6, 0x85, 0x1f, 0xa7, 0x32, 0xa9, 0xa2, 0xa9, 0x1a, 0x6d, 0x94, 0xc1, 0xea, 0x5e, 0xca, 0xaf, 0x91, 0x31, 0x29, 0x53, 0xea, 0xd, 0x24, 0x6c, 0xcb, 0x56, 0xc9, 0xc2, 0x34, 0xea, 0x53, 0x3, 0x1c, 0x36, 0xd3, 0x55, 0x8, 0x14, 0xaa, 0x8c, 0xb3, 0x9d, 0x77, 0xf7, 0x7a, 0xe8, 0x42, 0xcd, 0xff, 0xde, 0x17, 0xd9, 0x15, 0xae, 0x29, 0xb8, 0xf1, 0x18, 0xa4, 0x6e, 0xdb, 0x8, 0xec, 0x5e, 0x42, 0x6e, 0x30, 0xdc, 0x4d, 0xcd, 0xb, 0x14, 0x57, 0x37, 0x1e, 0xe1, 0x8c, 0x78, 0x53, 0xb9, 0x39, 0x36, 0xb8, 0xeb, 0x4b, 0x43, 0x34, 0xcd, 0xf6, 0x41, 0x3a, 0xce, 0x28, 0xd6, 0x8b, 0x1e, 0x6e, 0xf7, 0x20, 0x50, 0xc1, 0x21, 0x28, 0x9d, 0xcc, 0x10, 0x7d, 0x5e, 0x85, 0x97, 0x30, 0xf9, 0x7a, 0xee, 0x44, 0x7, 0x4, 0x8e, 0x4d, 0xb2, 0xb7, 0x1c, 0x91, 0xc3, 0xb, 0x63, 0xf0, 0x1c, 0x2d, 0x2, 0x84, 0x5f, 0x31, 0x92, 0xe8, 0x61, 0x85, 0x39, 0x42, 0xe6, 0xdf, 0x81, 0x60, 0x67, 0xf4, 0xc2, 0xa8, 0xff, 0xc4, 0x75, 0xfa, 0x71, 0x92, 0x24, 0x5a, 0x54, 0x63, 0xc9, 0x79, 0x3f, 0x47, 0x31, 0xdc, 0x4a, 0x4a, 0xc3, 0xca, 0x20, 0x3a, 0x27, 0xb, 0xbf, 0xc9, 0xbd, 0x84, 0x1a, 0x22, 0x4d, 0x34, 0x7f, 0x8d, 0x30, 0xef, 0x84, 0xaf, 0xdf, 0x9a, 0x70, 0x96, 0x93, 0x30, 0xe0, 0x77, 0x66, 0x70, 0xed, 0xf1, 0x34, 0x7c, 0x71, 0x6a, 0xd9, 0x31, 0xee, 0x7b, 0x21, 0x8b, 0xef, 0x3b, 0x62, 0xc3, 0xec, 0x4f, 0xcd, 0xb6, 0xb4, 0x1b, 0x9d, 0x42, 0x50, 0x9b, 0xf4, 0xe8, 0x44, 0xe7, 0xc8, 0x5e, 0xd2, 0xcb, 0x6d, 0x40, 0xe0, 0xbd, 0x12, 0x59, 0x63, 0x45, 0x8f, 0x8e, 0x6, 0xc, 0x1d, 0xd7, 0xd3, 0x98, 0x61, 0x53, 0x57, 0xd7, 0xc2, 0x66, 0x2e, 0xb4, 0x13, 0x9d, 0x95, 0x2d, 0x67, 0x57, 0x3c, 0x2d, 0xdc, 0x83, 0x4, 0x8a, 0x7d, 0xa7, 0xb9, 0xd6, 0x69, 0xcc, 0x50, 0x2, 0xbd, 0xbc, 0xe1, 0x83, 0x88, 0x9a, 0xaf, 0x43, 0x4a, 0x61, 0x82, 0xe3, 0x2f, 0x5, 0x1d, 0xcf, 0xd9, 0x36, 0x92, 0xb9, 0xc0, 0x96, 0xb5, 0x7e, 0x6b, 0xab, 0x5d, 0x22, 0xe7, 0x2a, 0xfa, 0x2a, 0xfe, 0xb5, 0x3b, 0x48, 0x70, 0xb5, 0x2f, 0x5f, 0x3a, 0xeb, 0xce, 0x58, 0xad, 0xdc, 0x0, 0x5d, 0xb1, 0x5, 0x80, 0xfb, 0xee, 0x6c, 0xb9, 0xc5, 0x98, 0x26, 0xf, 0x36, 0x49, 0x62, 0x91, 0x7a, 0x73, 0x23, 0xaf, 0x20, 0xea, 0xf3, 0xf5, 0x11, 0xe2, 0x34, 0x6b, 0x19, 0x62, 0xed, 0x24, 0x7a, 0xeb, 0x7d, 0xe6, 0x4e, 0x68, 0xd6, 0xc5, 0xc1, 0xc1, 0x4a, 0x92, 0xf6, 0x6, 0xb1, 0x9b, 0xbd, 0xe4, 0xa6, 0x84, 0x94, 0xbf, 0xc0, 0x6d, 0x76, 0xdf, 0x42, 0x2e, 0xc1, 0x82, 0xfc, 0xa8, 0xc0, 0xd1, 0xe3, 0x0, 0x89, 0x64, 0x55, 0xdf, 0xbd, 0x49, 0xc2, 0x9c, 0x85, 0x8c, 0x64, 0xe8, 0xa, 0x17, 0xc8, 0xb, 0x51, 0x96, 0x1c, 0xe, 0xd3, 0x12, 0xf0, 0x71, 0xb0, 0xd6, 0x2d, 0x76, 0x25, 0xdd, 0x35, 0x4, 0xa2, 0xce, 0x21, 0x4a, 0xae, 0xa5, 0x1a, 0xc8, 0x1c, 0xed, 0x44, 0x79, 0xfd, 0x9d, 0xa0, 0x6c, 0x7c, 0xb0, 0x20, 0x21, 0xf4, 0xf3, 0x47, 0xe1, 0xf2, 0xd, 0x62, 0xc7, 0x8a, 0x50, 0xa3, 0xa, 0x82, 0xf2, 0x88, 0x40, 0x79, 0x66, 0xd6, 0x9d, 0x83, 0x7f, 0x88, 0x1f, 0xce, 0x43, 0x1e, 0xf0}, - output224: []byte{0xc7, 0xc4, 0xd1, 0x80, 0xc1, 0xcd, 0x83, 0xc9, 0x28, 0x4e, 0x38, 0x7, 0x8a, 0x5e, 0x48, 0x50, 0x74, 0x89, 0x65, 0x55, 0x72, 0x71, 0xff, 0xa, 0x84, 0x84, 0x89, 0xd2}, - output256: []byte{0x20, 0x52, 0x6a, 0xd, 0x4e, 0x6f, 0x6, 0x24, 0x52, 0x1b, 0x3, 0x69, 0x83, 0xfd, 0xd4, 0xf3, 0x7b, 0xc7, 0x9b, 0x79, 0xf, 0xe2, 0xaa, 0x8a, 0xed, 0x1b, 0x16, 0x6b, 0x40, 0xcd, 0x99, 0x9d}, - output384: []byte{0xfc, 0xf, 0x4, 0xe5, 0xc1, 0x67, 0x21, 0x10, 0x1e, 0x7a, 0x92, 0x54, 0xd2, 0x78, 0x3b, 0x61, 0x9f, 0x78, 0xa5, 0x26, 0xe4, 0x0, 0x6c, 0x43, 0xe6, 0xd1, 0x23, 0x51, 0x28, 0x12, 0x27, 0xd1, 0x3b, 0xc5, 0x7c, 0x8c, 0xf3, 0x86, 0x52, 0xff, 0xdf, 0x56, 0xa8, 0x88, 0xcd, 0x90, 0x22, 0x9d}, - output512: []byte{0x50, 0x59, 0x3e, 0xd5, 0xad, 0xf3, 0x21, 0x50, 0x10, 0x53, 0x1e, 0x3a, 0x1b, 0xb6, 0x58, 0x5f, 0x94, 0xca, 0xd6, 0xb5, 0x7f, 0x34, 0x72, 0x74, 0x18, 0xc2, 0x9d, 0xa1, 0xdd, 0xf9, 0xd0, 0x61, 0xb, 0xac, 0x77, 0x81, 0xff, 0xf7, 0x96, 0x62, 0x7c, 0x9f, 0x51, 0xc1, 0x8b, 0x1f, 0xf, 0x4, 0x60, 0xf9, 0xba, 0x9c, 0x13, 0xb0, 0x95, 0x61, 0x7c, 0xc7, 0x8d, 0x18, 0xa, 0x71, 0x9b, 0x1}}, - testcase{ - msg: []byte{0xf5, 0x8, 0xd, 0x4c, 0x59, 0xe8, 0x4, 0xbf, 0x8f, 0x34, 0xb3, 0x34, 0xca, 0xbb, 0xcc, 0x7d, 0x32, 0x1, 0x1b, 0xde, 0x36, 0x77, 0xf4, 0xb9, 0x6, 0x94, 0x16, 0xac, 0x20, 0x41, 0x14, 0xcd, 0x9d, 0xa7, 0xa0, 0xed, 0xf, 0x4b, 0x4d, 0x83, 0x44, 0x41, 0x63, 0x36, 0xee, 0xc1, 0x55, 0x53, 0xef, 0x52, 0x6b, 0x6d, 0xec, 0x26, 0x7b, 0x12, 0x42, 0x65, 0x7d, 0xd0, 0xb5, 0x8, 0xaf, 0x81, 0xfe, 0xcf, 0x9c, 0xff, 0x9c, 0x82, 0xa6, 0xa7, 0xa9, 0x53, 0x98, 0x14, 0xdd, 0x7e, 0x9, 0x76, 0x15, 0xef, 0x15, 0x37, 0x38, 0x36, 0xb5, 0xd2, 0xf7, 0x65, 0xcc, 0x8d, 0x5f, 0x82, 0xe9, 0x4, 0x49, 0xf1, 0x3a, 0xa7, 0x41, 0xd5, 0xee, 0x2f, 0xe6, 0x38, 0x98, 0xe5, 0x5a, 0xcd, 0x85, 0x11, 0x68, 0x46, 0x80, 0x76, 0x6, 0xfe, 0x1e, 0x2e, 0x29, 0xf9, 0x8f, 0x99, 0x40, 0xb0, 0x67, 0xd0, 0xd1, 0xdf, 0x1, 0xf0, 0x80, 0x21, 0x1b, 0x2e, 0xe4, 0xb0, 0xa3, 0x8, 0x3, 0x78, 0x2a, 0x7b, 0xc2, 0xea, 0xfd, 0xc5, 0xeb, 0xdb, 0xa9, 0x1e, 0xb0, 0x5f, 0x7d, 0x7d, 0xc8, 0xe3, 0x4b, 0xf6, 0xd4, 0x4f, 0xec, 0x5, 0x82, 0x4f, 0x53, 0x41, 0x8f, 0x23, 0x5f, 0xb6, 0x4e, 0x89, 0x9e, 0xe1, 0x47, 0xbc, 0xb4, 0x3, 0xc8, 0x85, 0x5e, 0x94, 0xaf, 0x37, 0x8d, 0x18, 0x2d, 0x79, 0xc3, 0xea, 0xf9, 0x77, 0xcb, 0x4e, 0x9d, 0x4a, 0x16, 0xd9, 0x90, 0xa6, 0xc3, 0x88, 0xce, 0xb5, 0x67, 0xb9, 0x77, 0x85, 0xe6, 0xf2, 0xbc, 0x67, 0x45, 0x10, 0x2b, 0x99, 0xae, 0x76, 0x5e, 0x96, 0xb, 0x6b, 0x32, 0xba, 0xf0, 0x1e, 0x23, 0x79, 0xcd, 0x6e, 0xcb, 0x74, 0xd3, 0xe1, 0xa5, 0x65, 0x52, 0xf5, 0x97, 0x6d, 0xfe, 0x5c, 0x74, 0x2b, 0xc9, 0x2b, 0xe5, 0x96, 0xca, 0x74, 0x2f, 0xfc, 0x3d, 0xf, 0xa0, 0x32, 0xac, 0x29, 0xf9, 0xf7, 0xc1, 0xa5, 0xc4, 0x3b, 0xcc, 0xa6, 0x2d, 0xf7, 0xd9, 0xde, 0x35, 0xd0, 0xc7, 0xc1, 0x79, 0xdb, 0x2e, 0x1a, 0xa2, 0x55, 0xce, 0xdc, 0xca, 0x55, 0x6, 0x4c, 0x20, 0x49, 0xfe, 0xe1, 0xaf, 0x2c, 0xe5, 0xef, 0x69, 0x6e, 0xd4, 0xbc, 0x46, 0xb7, 0xc5, 0x5b, 0xdd, 0x51, 0xf2, 0xd4, 0x4c, 0x87, 0x13, 0xfb, 0x24, 0x75, 0xc0, 0xb8, 0x52, 0x46, 0xac, 0x1, 0x3, 0xcc, 0x38, 0x63, 0xb7, 0xeb, 0x2, 0x6a, 0xe0, 0x76, 0xa6, 0x0, 0x31, 0x3f, 0x6f, 0xb4, 0xa, 0x4d, 0xf6, 0x2a, 0x2a, 0xf8, 0x1b, 0x7e, 0x91, 0x79, 0x51, 0xea, 0x87, 0xe, 0xcb, 0x31, 0xb3, 0x40, 0x19, 0x28, 0xb5, 0x4, 0x6d, 0x9a, 0x1e, 0x62, 0xd1, 0x4b, 0x30, 0xfd, 0xeb, 0xaf, 0x26, 0x28, 0x68, 0x51, 0x73, 0x18, 0xfe, 0x17, 0xec, 0x3c, 0xd, 0x52, 0x52, 0x4f, 0x44, 0x12, 0xe, 0xd8, 0xed, 0x3b, 0xa7, 0xc, 0x64, 0x33, 0x0, 0xcd, 0xb, 0xc7, 0xd, 0xa7, 0x2c, 0x96, 0x4a, 0x88, 0xf5, 0x2c, 0x3a, 0x91, 0xec, 0x20, 0xbf, 0xeb, 0x5c, 0xae, 0xfc, 0xd4, 0xd9, 0xc7, 0x68, 0x5d, 0x84, 0x7, 0x47, 0x6b, 0x5f, 0x34, 0x67, 0x6c, 0x5e, 0xbd, 0x1e, 0x88, 0xa6, 0xcf, 0xf1, 0xc6, 0x25, 0x32, 0x2f, 0x8c, 0xd5, 0x9b, 0x9e, 0xd6, 0xc, 0xef, 0xb2, 0x1f, 0x94, 0x91, 0xb9, 0x5e, 0x72, 0x79, 0x1f, 0x7a, 0xc7, 0xea, 0xa3, 0xc1, 0x61, 0x59, 0xfe, 0x9d, 0xf7, 0xa9, 0x89, 0xad, 0xd6, 0xc2, 0x28, 0x2c, 0x47, 0x58, 0x5e, 0x11, 0x39, 0x7e, 0xda, 0x9f, 0x47, 0xdf, 0x2b, 0x40, 0x16, 0x6e, 0x3, 0xbc, 0xdd, 0x61, 0x86, 0xb4, 0x6c, 0x68, 0x35, 0x11, 0x82, 0x68, 0xdd, 0xbe, 0xf1, 0x9a, 0x28, 0xbb, 0xad, 0xe1, 0xbd, 0xe0, 0x22, 0x8f, 0xfd, 0x7e, 0x8b, 0x3c, 0x3c, 0x59, 0x8d, 0x89, 0xe2, 0x4b, 0x8c, 0xde, 0xe7, 0x9c, 0x94, 0x2, 0x54, 0xde, 0x26, 0xcc, 0x68, 0x14, 0xba, 0x27, 0x22, 0xe4, 0x2f, 0x75, 0x71, 0x60, 0xb, 0x73, 0x25, 0xe1, 0xff, 0x30, 0x2, 0x51, 0xd5, 0x2a, 0x89, 0x5b, 0x8c, 0xcb, 0xd0, 0x49, 0xb2, 0x95, 0x3b, 0x8d, 0x23, 0x14, 0x45, 0xf6, 0x8f, 0x7c, 0x26, 0xec, 0x25, 0xa4, 0xb8, 0x69, 0x5c, 0x8a, 0xc1, 0x16, 0xf7, 0x36, 0xbe, 0x93, 0x9e, 0xdd, 0x76, 0x2c, 0x9b, 0x47, 0x43, 0xe4, 0x63, 0xc9, 0xb9, 0xb2, 0xf8, 0x8e, 0xb, 0xc0, 0xce, 0x78, 0x78, 0x1c, 0xdd, 0xc3, 0xbc, 0xa8, 0x25, 0xac, 0xd4, 0x63, 0xc7, 0xca, 0xc2, 0xaa, 0x6c, 0x43, 0xb, 0xbe, 0x82, 0xe, 0xa9, 0x4a, 0xf9, 0xa4, 0xb, 0x1b, 0x5c, 0x0, 0x6e, 0x96, 0x41, 0xa2, 0xff, 0xa6, 0xe4, 0x27, 0x37, 0x9e, 0x1a, 0xd4, 0x9c, 0x81, 0xb9, 0x83, 0x20, 0xb3, 0x43, 0x1f, 0xf0, 0x3, 0xd, 0xc6, 0x83, 0xd6, 0x10, 0x26, 0x43, 0x8b, 0xc6, 0xa6, 0xd3, 0x4b, 0x2c, 0x73, 0x70, 0x4d, 0x9f, 0x62, 0xea, 0xeb, 0x13, 0xab, 0xb3, 0xe4, 0xb0, 0x56, 0x2b, 0x4e, 0x4, 0x82, 0xcd, 0x6b, 0x2d, 0x7a, 0xeb, 0xc0, 0x36, 0x7e, 0xa2, 0x9a, 0x88, 0xf4, 0xa7, 0x6f, 0x3d, 0x76, 0xfa, 0x11, 0x97, 0xe1, 0xdc, 0xa9, 0x2c, 0x82, 0x16, 0xc8, 0x4c, 0x1a, 0xf9, 0xb8, 0xc7, 0x8c, 0x9e, 0x3a, 0x77, 0x99, 0xa4, 0xa7, 0x9a, 0x78, 0x30, 0x33, 0xb0, 0xf5, 0x54, 0x7e, 0x8e, 0x75, 0xe6, 0x9c, 0xf3, 0x61, 0x5a, 0xb0, 0x4e, 0xf9, 0x89, 0xfe, 0x1a, 0x46, 0x3b, 0x16, 0x72, 0xc5, 0x71, 0xd5, 0xa, 0xb5, 0x69, 0x72, 0x89, 0x6e, 0x8a, 0x50, 0xc2, 0x42, 0xf2, 0x2c, 0x7f, 0x6e, 0x27, 0xca, 0x4c, 0xa7, 0x93, 0xf6, 0x27, 0xe7, 0x96, 0x8, 0x68, 0xf, 0x54, 0x21, 0xb2, 0x8b, 0xdd, 0x25, 0x89, 0xf0, 0x5e, 0x65, 0x43, 0xd, 0xf7, 0x74, 0xee, 0x87, 0x3f, 0xcd, 0x12, 0x34, 0x6, 0x4f, 0x7a, 0x33, 0xcf, 0x5a, 0x1f, 0xa4, 0xe3, 0x68, 0x13, 0x7f, 0xf9, 0xc1, 0x59, 0x7f, 0x1f, 0xa0, 0xfa, 0x36, 0x49, 0x3f, 0x20, 0x53, 0x80, 0x77, 0x66, 0x9e, 0xad, 0xfd, 0x3b, 0x6, 0xf7, 0x88, 0xc9, 0x12, 0xc7, 0x15, 0xfb, 0x5d, 0x33, 0x4d, 0xb6, 0xbe, 0xd1, 0x33, 0xa8, 0xfd, 0xc4, 0xf, 0x54, 0x96, 0xe6, 0x6a, 0xd6, 0x38, 0x81, 0xf0, 0xba, 0x37, 0x27, 0x41, 0x67, 0x15, 0x86, 0x52, 0x53, 0xdc, 0x52, 0x90, 0x32, 0x7b, 0x51, 0x5b, 0xf6, 0x8d, 0xa1, 0x88, 0xdd, 0x5b, 0x4b, 0xe, 0xac, 0x7c, 0xa7, 0x12, 0xca, 0xfa, 0x8f, 0xca, 0xe0, 0xc5, 0x50, 0x3f, 0xe5, 0x8a, 0x21, 0x91, 0x82, 0xf1, 0xc3, 0xd, 0xa6, 0xd0, 0xc1, 0x9c, 0xfe, 0xe8, 0x97, 0xb7, 0xd8, 0x37, 0xc9, 0x79, 0x96, 0xa3, 0x5f, 0x4c, 0xa8, 0xcf, 0x5, 0x37, 0xa0, 0x1d, 0x17, 0xe7, 0xde, 0xc, 0xc9, 0xc1, 0x29, 0xe4, 0xda, 0xa, 0xda, 0xf1, 0xfd, 0xa8, 0x50, 0x30, 0xdf, 0x91, 0x27, 0xbe, 0x62, 0x82, 0x63, 0xb0, 0x62, 0x4f, 0x37, 0x2c, 0x47, 0xc3, 0xac, 0x87, 0xeb, 0x94, 0x5a, 0x57, 0xf5, 0xc7, 0x32, 0xbe, 0xee, 0x81, 0xa7, 0x40, 0x30, 0x1, 0x79, 0x89, 0x92, 0xf3, 0xdc, 0x94, 0x41, 0x14, 0xff, 0x3d, 0x54, 0xc4, 0x66, 0x6a, 0xc5, 0xac, 0x8c, 0x98, 0xd0, 0xd5, 0x59, 0x6c, 0xbd, 0xeb, 0x42, 0x6, 0x65, 0xf5, 0xed, 0xaa, 0xe7, 0x47, 0xd5, 0x4c, 0xf7, 0xed, 0xd3, 0x7b, 0x16, 0x2e, 0x37, 0x22, 0x49, 0xd1, 0x35, 0x93, 0x8c, 0xf1, 0x7d, 0x17, 0x4d, 0x12, 0xd8, 0x82, 0x79, 0xcb, 0x4c, 0x32, 0xbd, 0x6f, 0x1, 0x8c, 0x76, 0x6d, 0xa6, 0x98, 0x3d, 0x4e, 0xa5, 0x1d, 0x6b, 0xd8, 0xff, 0xa, 0x9b, 0x34, 0xe9, 0xa9, 0x3b, 0xbd, 0xa7, 0xc, 0xf1, 0xb4, 0xb8, 0x67, 0xd6, 0xa, 0x74, 0x81, 0x1f, 0xd9, 0x8d, 0x52, 0xfa, 0xa5, 0x59, 0xb5, 0x2c, 0x75, 0x5c, 0xb7, 0xa, 0x76, 0xc9, 0x4b, 0xd1, 0x96, 0x54, 0xca, 0xe7, 0x1, 0x7c, 0xcd, 0x70, 0x22, 0x2b, 0xf0, 0x8c, 0x5d, 0x7a, 0xd1, 0xf5, 0xe4, 0xe6, 0x34, 0x4f, 0xdb, 0x3a, 0xbe, 0x70, 0x34, 0x52, 0xc2, 0x9a, 0x69, 0x6f, 0x39, 0xf9, 0x82, 0x6e, 0xd8, 0xbc, 0x51, 0xa, 0x4a, 0x14, 0x8e, 0x5b, 0xf8, 0xa5, 0xdb, 0xe6, 0xb8, 0x2d, 0x72, 0x20, 0x16, 0x4f, 0x8, 0x1, 0x1c, 0x5, 0xac, 0x51, 0x59, 0xd5, 0x2c, 0xe9, 0xd4, 0x5d, 0x75, 0x8b, 0x64, 0x5b, 0xbb, 0x24, 0x8c, 0x2d, 0x34, 0x1d, 0xbe, 0xfa, 0x1f, 0x86, 0x2, 0xc5, 0xd4, 0x58, 0xa6, 0x4f, 0x38, 0xf3, 0xb0, 0x4d, 0xb3, 0x90, 0x89, 0x80, 0x7b, 0x6a, 0x10, 0xe1, 0xbb, 0x52, 0x77, 0xb, 0x92, 0xce, 0x72, 0xe2, 0xd3, 0xbb, 0xc, 0x22, 0x41, 0xcd, 0xed, 0x35, 0x5, 0x4b, 0x84, 0x55, 0x8d, 0x1c, 0xc0, 0x99, 0xef, 0x7b, 0x22, 0x96, 0x95, 0x19, 0x51, 0xd5, 0xb6, 0xa2, 0x2f, 0x93, 0xbf, 0x96, 0x2a, 0xc5, 0xef, 0x8f, 0xb5, 0x5e, 0xc6, 0xcc, 0x2b, 0x31, 0x64, 0x28, 0xed, 0xf1, 0x20, 0x78, 0xed, 0x1b, 0x66, 0xd5, 0x25, 0xd0, 0x22, 0x81, 0x9c, 0xbd, 0x48, 0x9e, 0x1b, 0xed, 0xb0, 0x2f, 0xfb, 0xd5, 0x7, 0xd5, 0x5f, 0x9b, 0x5d, 0x4e, 0x22, 0xf6, 0x39, 0x6e, 0xa2, 0x33, 0x45, 0x37, 0x54, 0x68, 0x8d, 0x20, 0x15, 0x1a, 0x9, 0xc7, 0x0, 0x44, 0xb8, 0xa5, 0xa9, 0xac, 0x3, 0x3c, 0x3c, 0x3b, 0x84, 0x7a, 0xd8, 0x33, 0xd5, 0xc0, 0x5b, 0x33, 0x40, 0x76, 0x66, 0xee, 0x82, 0xf9, 0x58, 0x1d, 0xf9, 0x3, 0x4e, 0xe1, 0x5a, 0x9c, 0xa6, 0x7d, 0x52, 0xf1, 0xd9, 0xb6, 0x34, 0xb8, 0x4c, 0x1b, 0x8b, 0xa9, 0xe5, 0x15, 0xf1, 0xf0, 0x60, 0xa5, 0xac, 0x5c, 0xba, 0xe2, 0xde, 0x75, 0xf9, 0x4e, 0x11, 0x2f, 0x71, 0x98, 0xe2, 0x39, 0xdf, 0x8, 0xd3, 0x10, 0x3f, 0x6, 0x56, 0x27, 0x43, 0x89, 0x95, 0x2, 0x6d, 0xf5, 0x11, 0xc6, 0xe5, 0xbf, 0xde, 0xee, 0x56, 0x67, 0xd5, 0x11, 0xd4, 0x18, 0x18, 0x50, 0xc7, 0xc5, 0xd1, 0x79, 0x10, 0x7c, 0x1b, 0x86, 0xd2, 0x4d, 0x55, 0x32, 0xa8, 0x8a, 0x41, 0x49, 0xa2, 0x81, 0xd, 0xca, 0xe7, 0x37, 0x31, 0xb0, 0xe1, 0x24, 0x72, 0x81, 0xa6, 0xfd, 0x31, 0x61, 0x3d, 0xf6, 0x89, 0x1b, 0x4c, 0x17, 0xb7, 0xa6, 0xa9, 0xad, 0x9b, 0x77, 0x46, 0x82, 0x54, 0xb9, 0x3f, 0x85, 0x95, 0x8a, 0xa0, 0xf0, 0x1c, 0xef, 0xc1, 0xb, 0x25, 0x16, 0x9d, 0xc4, 0x6e, 0x3, 0x5d, 0x3f, 0x24, 0x55, 0x7b, 0x4b, 0xf0, 0xe7, 0xd6, 0x1, 0x74, 0x21, 0x91, 0x8, 0xd9, 0x16, 0xff, 0xdc, 0x55, 0xe2, 0x5b, 0xff, 0xd9, 0x80, 0x9e, 0xfd, 0x5, 0x8e, 0x12, 0xc1, 0x4f, 0x39, 0xc6, 0x9d, 0x8f, 0xb7, 0x3d, 0x3e, 0xc6, 0x45, 0x8f, 0x47, 0xf2, 0xf8, 0xdb, 0x90, 0x1b, 0xa7, 0x6c, 0x86, 0x55, 0xb, 0x11, 0xb5, 0x4d, 0x6, 0x41, 0xd4, 0xdb, 0x3e, 0xb0, 0x0, 0x5, 0x7d, 0xd0, 0xf, 0x2e, 0x51, 0x1f, 0xb7, 0xa4, 0x7e, 0x95, 0x9a, 0x44, 0x2, 0xa3, 0xac, 0x54, 0x62, 0x23, 0x4b, 0x40, 0xb1, 0x84, 0x2, 0xf, 0xcf, 0x7a, 0x3, 0x96, 0xc4, 0xd0, 0xa, 0x98, 0x7c, 0x87, 0x41, 0xa4, 0x53, 0x7b, 0xc1, 0x71, 0x2, 0xa5, 0xc4, 0x2a, 0xfe, 0xab, 0x9f, 0x71, 0xea, 0x66, 0xed, 0x4c, 0xbc, 0x7b, 0x5e, 0xe6, 0x82, 0xff, 0x4, 0xf5, 0x6f, 0x4b, 0xa1, 0xea, 0xb, 0xb3, 0x26, 0xc4, 0x8, 0x99, 0x30, 0xf9, 0xe3, 0xf3, 0xff, 0xa3, 0xe0, 0x66, 0x37, 0xcc, 0xe3, 0x21, 0x13, 0x88, 0x1a, 0x6, 0xcc, 0x3a, 0x13, 0x83, 0x74, 0x48, 0x14, 0x5c, 0x2b, 0xd0, 0x13, 0x7, 0xa5, 0x80, 0xfd, 0xbc, 0x38, 0x5d, 0x8f, 0x46, 0xfb, 0x92, 0xff, 0xed, 0xbc, 0x89, 0x18, 0xd2, 0x69, 0xdd, 0x18, 0x71, 0x16, 0x4d, 0x4b, 0x3e, 0x20, 0x23, 0x44, 0x1e, 0xc8, 0xb9, 0x9c, 0x82, 0xa5, 0xf0, 0x98, 0x21, 0xcd, 0xdf, 0x6b, 0x38, 0xc9, 0xac, 0xc3, 0xbf, 0x3a, 0x38, 0xd5, 0x62, 0x80, 0x16, 0x15, 0x95, 0x88, 0xc3, 0x3e, 0xaa, 0x29, 0xd9, 0x46, 0x3a, 0x53, 0x7c, 0x0, 0xa, 0x16, 0xad, 0x8c, 0x17, 0x7d, 0xc4, 0xcf, 0x71, 0x6e, 0x62, 0x5f, 0x46, 0xfc, 0x4c, 0xa8, 0xc1, 0x9f, 0xbd, 0x8e, 0xf3, 0x20, 0xf1, 0xd6, 0x80, 0x63, 0x91, 0x95, 0xc8, 0xb1, 0x95, 0xb0, 0xa0, 0x27, 0x38, 0xe0, 0x66, 0x5f, 0x41, 0x90, 0xd6, 0x28, 0x7e, 0x58, 0x9c, 0xd6, 0xdd, 0x45, 0xb9, 0xe8, 0xcc, 0x23, 0xb0, 0x8e, 0x16, 0x81, 0xbf, 0xc6, 0xf6, 0x6b, 0x88, 0xde, 0x6b, 0x9, 0x1e, 0x82, 0x5e, 0xa4, 0xbb, 0xfb, 0xd6, 0x97, 0xe1, 0xb, 0xc4, 0x7, 0x57, 0xa, 0xe4, 0xf2, 0xa3, 0xeb, 0xe5, 0x69, 0x55, 0x46, 0x39, 0xc2, 0xb8, 0xe0, 0x51, 0x65, 0x6c, 0xc3, 0xc, 0x83, 0x7f, 0x5a, 0x92, 0x26, 0xe, 0xad, 0x1d, 0x55, 0x2b, 0x45, 0x80, 0x1b, 0x6d, 0x28, 0x13, 0x41, 0x66, 0x79, 0x6c, 0x87, 0xf9, 0x0, 0x22, 0x5c, 0xfd, 0xc3, 0xcc, 0x49, 0xd7, 0x2d, 0xfb, 0xc1, 0x8d, 0x8d, 0x95, 0xb1, 0xe1, 0x60, 0xed, 0x3c, 0xaf, 0xd5, 0xc3, 0x46, 0x7d, 0x48, 0xaf, 0xf8, 0x74, 0x2, 0xcb, 0xcb, 0x1e, 0x14, 0x20, 0xe3, 0xfc, 0xb5, 0x88, 0xaa, 0x19, 0xc8, 0xf4, 0x27, 0x53, 0xb5, 0x9d, 0xb6, 0xfb, 0x6a, 0x9f, 0xdb, 0xa1, 0x27, 0xca, 0x80, 0x6d, 0xba, 0x7d, 0xd9, 0x7f, 0x24, 0x88, 0xfc, 0x2e, 0x43, 0x8e, 0xef, 0x57, 0xa4, 0xcc, 0x85, 0xb8, 0x8d, 0xcf, 0xde, 0x76, 0xae, 0x1f, 0xf6, 0x12, 0x25, 0xa1, 0xca, 0x8b, 0xf4, 0xa1, 0x4f, 0x72, 0x99, 0x50, 0x32, 0x2e, 0xa6, 0x81, 0xb1, 0x6d, 0x64, 0x92, 0x90, 0x25, 0x6, 0x70, 0x2d, 0xc8, 0xf3, 0x48, 0xe4, 0xd3, 0xae, 0x7f, 0xb5, 0x5f, 0xac, 0x12, 0x31, 0xfd, 0xe8, 0x20, 0x91, 0xb3, 0x4f, 0x17, 0x91, 0xb6, 0xae, 0x37, 0x58, 0x7b, 0x10, 0x32, 0x5f, 0x6f, 0xf5, 0xe2, 0x3b, 0x85, 0x58, 0x45, 0xb8, 0x6e, 0xae, 0x90, 0x78, 0x5b, 0x9d, 0x10, 0xd9, 0xa, 0x16, 0x64, 0x4d, 0x1, 0xbb, 0x62, 0x6f, 0x34, 0x3b, 0x90, 0x8a, 0x95, 0x91, 0xf4, 0x6, 0x9b, 0x21, 0x82, 0x2c, 0xa4, 0xec, 0xf9, 0x85, 0xc1, 0xe7, 0x10, 0x47, 0x5f, 0x33, 0xdf, 0x9a, 0xf4, 0x76, 0x4c, 0xfb, 0xf, 0xfe, 0x64, 0x90, 0x63, 0x77, 0x53, 0x38, 0xf1, 0x5b, 0xea, 0x7c, 0xff, 0x29, 0xf1, 0x64, 0x67, 0x81, 0x60, 0x96, 0xa, 0x80, 0xed, 0x14, 0x8c, 0x9b, 0x7f, 0xaa, 0x58, 0xe9, 0x13, 0x99, 0x11, 0xd3, 0xdd, 0x95, 0x36, 0xf6, 0x96, 0x46, 0xf7, 0x18, 0xf0, 0x83, 0xdc, 0x90, 0x29, 0xd6, 0x29, 0x4f, 0xc4, 0xc6, 0x7, 0x68, 0x8a, 0xa7, 0x5a, 0xf3, 0x50, 0xac, 0x2c, 0xb, 0x0, 0x1a, 0x15, 0x7d, 0x2, 0x3d, 0x73, 0xd8, 0x6e, 0xd8, 0x13, 0x38, 0x9, 0xfc, 0xb9, 0x59, 0x2d, 0x12, 0x8, 0x9c, 0xbd, 0x7a, 0x1b, 0xb6, 0xbb, 0xa8, 0x82, 0xfe, 0x22, 0x7c, 0x9, 0xa5, 0x3f, 0xf0, 0x88, 0x90, 0x7c, 0xb4, 0xbc, 0x2f, 0xb4, 0xb7, 0xf6, 0x2d, 0x41, 0xd3, 0xd3, 0x97, 0xc4, 0xfe, 0xa, 0xd1, 0x2b, 0xb3, 0x96, 0x43, 0x70, 0xe2, 0x17, 0x12, 0x95, 0x1c, 0x67, 0x98, 0x14, 0xd5, 0x6, 0xe7, 0x38, 0xc0, 0x20, 0x1e, 0x42, 0x18, 0x1d, 0x23, 0x11, 0x36, 0xa4, 0x35, 0xae, 0x3, 0x97, 0xb6, 0x1c, 0xcb, 0xc5, 0xe8, 0xbb, 0xeb, 0xf8, 0xea, 0x77, 0xc8, 0xbc, 0x48, 0xbd, 0x62, 0x11, 0xf2, 0x92, 0x48, 0xf9, 0xd4, 0x98, 0xd8, 0x18, 0xe2, 0xb5, 0x44, 0xd2, 0x8a, 0x5e, 0x60, 0xba, 0x72, 0x7f, 0x32, 0xef, 0x4b, 0xa2, 0x70, 0x79, 0x62, 0x23, 0xc, 0x90, 0x0, 0x76, 0xfb, 0x76, 0x4d, 0xe, 0xd5, 0xce, 0x7, 0x8c, 0x9d, 0xb1, 0x4d, 0xe8, 0x94, 0xbb, 0xb8, 0x36, 0xc6, 0xde, 0x9e, 0x83, 0x20, 0x2a, 0xe8, 0x9f, 0x9a, 0x8d, 0x8c, 0xb0, 0x34, 0x1e, 0x1c, 0x81, 0xb5, 0xfa, 0x8b, 0x16, 0x73, 0x1b, 0x8e, 0x23, 0x1e, 0x96, 0x9c, 0xf, 0x1e, 0xf9, 0x53, 0x36, 0xd4, 0xe7, 0x3e, 0xad, 0x6d, 0xa2, 0x3d, 0xe3, 0xad, 0x1e, 0xb6, 0x8, 0xac, 0xce, 0x4d, 0x4d, 0x93, 0x99, 0x6d, 0xd7, 0x6e, 0xc1, 0xf5, 0xf2, 0xc5, 0x76, 0xf6, 0xb3, 0xb7, 0x6e, 0x7, 0xbd, 0x8a, 0x81, 0xf, 0xf5, 0xd8, 0x8b, 0x0, 0xff, 0xe4, 0x8c, 0x42, 0x70, 0xb, 0x61, 0xcc, 0x49, 0x93, 0x36, 0xe7, 0xfb, 0x57, 0xad, 0x72, 0xff, 0x44, 0xfc, 0x63, 0x1c, 0x72, 0x22, 0xc9, 0xa3, 0xd1, 0xab, 0xf6, 0xe7, 0x7b, 0x5e, 0xd7, 0xfe, 0x2f, 0x72, 0x28, 0xfe, 0xd6, 0xc8, 0x49, 0xbf, 0x71, 0x42, 0xc4, 0x10, 0x39, 0x89, 0xa8, 0xf, 0x7c, 0x15, 0x64, 0x2a, 0xe6, 0x16, 0x50, 0xcd, 0xca, 0x7e, 0x85, 0x4e, 0xb2, 0x5e, 0x9e, 0x72, 0xf4, 0xc3, 0xe3, 0x76, 0x8e, 0x6c, 0xcc, 0x8b, 0xfd, 0x55, 0x6b, 0x56, 0xd3, 0x50, 0x7e, 0xdd, 0xe9, 0xe5, 0xc3, 0x31, 0xdd, 0xea, 0x75, 0x56, 0x8b, 0x7, 0x81, 0x3d, 0x20, 0xe8, 0xf4, 0xc9, 0x54, 0x78, 0x38, 0xed, 0x28, 0x44, 0x8f, 0x2e, 0x67, 0x15, 0x8a, 0xcf, 0xc, 0x0, 0xb1, 0x31, 0x47, 0x38, 0x47, 0x81, 0x6c, 0x5e, 0x2d, 0xc2, 0x15}, - output224: []byte{0xb4, 0x97, 0x8f, 0x5d, 0xe0, 0x29, 0x5, 0x35, 0x5d, 0x9d, 0x40, 0xfa, 0x9, 0xe6, 0xf8, 0xa2, 0x97, 0xca, 0x54, 0x6a, 0xc8, 0x38, 0x2c, 0xf1, 0x1, 0x52, 0xb2, 0xb3}, - output256: []byte{0x6c, 0x87, 0x23, 0xda, 0x27, 0xcd, 0x98, 0xe2, 0xf, 0x25, 0x83, 0xd0, 0x18, 0x68, 0x5, 0x1e, 0xf2, 0xda, 0xfa, 0x64, 0x59, 0x1, 0xf8, 0x2c, 0x74, 0xd5, 0x32, 0xe, 0xaf, 0xc1, 0x8a, 0xac}, - output384: []byte{0x74, 0xb1, 0x9a, 0x3c, 0xc5, 0x77, 0x84, 0x7c, 0x75, 0x7b, 0x8, 0xc2, 0xe1, 0x9c, 0x9e, 0x94, 0x92, 0xf8, 0xc5, 0xa8, 0xeb, 0x9e, 0x98, 0x3c, 0x68, 0xdc, 0xef, 0x4a, 0xd4, 0xee, 0x30, 0x28, 0xd2, 0xe6, 0x26, 0xd3, 0x43, 0xed, 0x2d, 0xbe, 0x90, 0x90, 0x6e, 0xdc, 0xba, 0x51, 0x3e, 0x8b}, - output512: []byte{0x68, 0xcf, 0xeb, 0x4a, 0xfc, 0x84, 0xfd, 0xe5, 0xb1, 0xa2, 0xf7, 0x3a, 0x91, 0x4c, 0x70, 0x5b, 0xc2, 0x11, 0xca, 0xc6, 0x9f, 0xc6, 0x81, 0x89, 0xe3, 0x58, 0x74, 0x12, 0xea, 0x74, 0x1e, 0x46, 0xfd, 0x23, 0xa, 0xf5, 0x4b, 0xab, 0x9a, 0xf6, 0x5a, 0xd5, 0x32, 0x2c, 0xb6, 0x91, 0xb0, 0x4e, 0xf0, 0x45, 0xc1, 0x5a, 0x18, 0x7f, 0xec, 0xc7, 0xae, 0xe9, 0xfa, 0xf2, 0xc, 0x8f, 0xc6, 0x58}}, - testcase{ - msg: []byte{0x34, 0xa8, 0xb8, 0x95, 0x6b, 0xf5, 0xad, 0xfa, 0x5e, 0xf8, 0xf1, 0xb, 0x67, 0x3f, 0x6e, 0x53, 0xbc, 0x3f, 0xef, 0x8d, 0xd1, 0xf9, 0x42, 0x80, 0x78, 0xc2, 0x56, 0xa8, 0xfa, 0x1d, 0x8d, 0xa1, 0xe7, 0x24, 0xba, 0x90, 0xb6, 0x5b, 0xd4, 0x39, 0x4e, 0xac, 0xac, 0x54, 0x69, 0xc5, 0x20, 0xba, 0xc2, 0xce, 0xd1, 0x64, 0xb, 0xa2, 0x6e, 0xfe, 0xf4, 0x4f, 0x50, 0xba, 0xa7, 0x2a, 0x9e, 0x7c, 0xc8, 0xbf, 0xf6, 0x9e, 0xb8, 0x71, 0x9a, 0xa1, 0xd8, 0x8a, 0x24, 0x50, 0xf5, 0xc3, 0xb4, 0xfa, 0x54, 0xa2, 0x97, 0x7c, 0xed, 0x1a, 0x90, 0x4c, 0x9, 0x35, 0x6f, 0x48, 0x33, 0x1, 0xad, 0xd6, 0x10, 0x6, 0x52, 0x4f, 0xf8, 0x14, 0xca, 0xb, 0x1f, 0xd5, 0xd, 0x3f, 0x3a, 0x30, 0x49, 0x2b, 0xa7, 0xc, 0x29, 0x21, 0xe3, 0xb9, 0xda, 0x58, 0xcf, 0x8f, 0x5b, 0xee, 0x32, 0xac, 0x15, 0xe3, 0x93, 0x71, 0xfd, 0x9d, 0x78, 0x42, 0x56, 0x5, 0x4a, 0x3d, 0x14, 0x55, 0x63, 0xc6, 0x2e, 0x72, 0x58, 0xff, 0xf3, 0xa1, 0x65, 0x24, 0xd3, 0x87, 0x67, 0xa7, 0x5f, 0xc2, 0x7f, 0xc3, 0xd0, 0xa9, 0xf0, 0xf5, 0x85, 0xa0, 0x4, 0x6d, 0x63, 0x69, 0xdc, 0x6d, 0xd1, 0x7f, 0xc6, 0x5b, 0x53, 0x38, 0x1, 0x84, 0xb4, 0xd9, 0xee, 0xaf, 0xf2, 0x45, 0xfc, 0xe1, 0xae, 0xa0, 0xd4, 0xe8, 0x40, 0x7d, 0x2e, 0xbf, 0xf6, 0xec, 0xf, 0xae, 0x8b, 0x65, 0x47, 0x47, 0xee, 0xcc, 0xe1, 0x3b, 0xea, 0x89, 0xd4, 0x87, 0x9e, 0xc, 0x92, 0xe1, 0xf4, 0x7e, 0xad, 0x8e, 0x5c, 0xd7, 0xf5, 0x6b, 0x4, 0xc6, 0x2c, 0x2b, 0x7c, 0xc1, 0x3c, 0x5c, 0xc2, 0xd9, 0xe6, 0xa8, 0x7d, 0x77, 0xde, 0x73, 0xe5, 0x4d, 0xcb, 0x98, 0x29, 0x0, 0x1a, 0x3a, 0x98, 0x13, 0xdc, 0x19, 0x58, 0xe4, 0xfa, 0x10, 0xbb, 0xe4, 0x2, 0x78, 0x22, 0xf8, 0x92, 0x3a, 0xf1, 0x7d, 0xb, 0x4, 0xbd, 0xe9, 0x7b, 0x98, 0x10, 0xb3, 0x1e, 0x26, 0xff, 0x74, 0xf9, 0xae, 0x95, 0xe5, 0xc, 0x6e, 0xa2, 0x5a, 0x49, 0xee, 0x55, 0x75, 0x59, 0xc2, 0xc9, 0xc8, 0x3d, 0x1, 0x73, 0x7b, 0x6c, 0xd7, 0x21, 0x6c, 0x46, 0x85, 0x9d, 0x28, 0x33, 0xf0, 0x4d, 0xef, 0x7a, 0x7e, 0xfc, 0x84, 0x9f, 0x8b, 0x13, 0xf6, 0x27, 0xe2, 0xf, 0xcf, 0xc, 0xd3, 0xe0, 0xb1, 0xcc, 0x7d, 0xb, 0x22, 0xb4, 0xeb, 0xd5, 0x76, 0xcb, 0xc2, 0xa3, 0x97, 0x82, 0x8e, 0xae, 0xd2, 0xe4, 0xaf, 0xe5, 0x11, 0x4, 0x50, 0x7c, 0xb, 0x31, 0x76, 0xa7, 0x4a, 0x2, 0x61, 0xa1, 0x59, 0x52, 0x5e, 0x8, 0x83, 0xf4, 0x51, 0x4f, 0x18, 0x56, 0xd1, 0xbc, 0xa3, 0xce, 0xb1, 0x8, 0x44, 0x41, 0xe9, 0x9f, 0xac, 0xdc, 0xc5, 0xb7, 0xed, 0xbc, 0x5a, 0x4c, 0x80, 0x3f, 0x64, 0x48, 0x11, 0x97, 0x45, 0xc2, 0x3e, 0x5d, 0x79, 0x5a, 0xa, 0xa9, 0x6f, 0x31, 0xa4, 0x8f, 0x43, 0x19, 0x60, 0xb3, 0xc4, 0x1c, 0x9c, 0x6b, 0x13, 0xa2, 0x28, 0x26, 0x74, 0x38, 0x39, 0xe5, 0x71, 0xf4, 0xb, 0xf5, 0xc9, 0x65, 0xee, 0xed, 0xb2, 0x93, 0xdd, 0x5d, 0xdd, 0x22, 0x44, 0x20, 0x71, 0x89, 0x5b, 0xd9, 0xc3, 0x4d, 0x8a, 0x34, 0x49, 0x7, 0xe1, 0x7a, 0xf7, 0xef, 0x48, 0x0, 0x88, 0x1, 0x6, 0x6a, 0xa8, 0xf4, 0x34, 0x1, 0x9d, 0x95, 0xa0, 0x1c, 0xe3, 0x4c, 0x30, 0xdc, 0x11, 0x6d, 0x6a, 0x5d, 0x9f, 0x6d, 0x43, 0xbc, 0x2c, 0xae, 0x32, 0x7b, 0x61, 0x3e, 0x61, 0x29, 0x9e, 0x75, 0xd5, 0x80, 0xc7, 0x32, 0x3e, 0xce, 0xaf, 0x49, 0x4d, 0x54, 0x82, 0x55, 0x53, 0xc9, 0x85, 0x14, 0xd8, 0x41, 0x56, 0x8f, 0x5b, 0xce, 0x9c, 0x97, 0x19, 0x4e, 0xc3, 0x6a, 0x16, 0xf6, 0xb1, 0xd, 0x9f, 0x18, 0x8, 0xec, 0xc1, 0xda, 0x80, 0xbe, 0x4d, 0x37, 0x73, 0x5a, 0xdb, 0x6d, 0x1b, 0x83, 0xa1, 0x57, 0xed, 0xec, 0x26, 0x66, 0x12, 0xe6, 0x5e, 0x57, 0xee, 0x41, 0x9a, 0xbf, 0xc3, 0x5e, 0x34, 0x2a, 0x67, 0x72, 0xb5, 0xff, 0xe8, 0xab, 0x1d, 0x80, 0x95, 0xbc, 0x92, 0xbf, 0x99, 0x82, 0xa7, 0xa3, 0x2e, 0x85, 0x5, 0xd8, 0xf2, 0xbd, 0xdd, 0xd6, 0x26, 0xd0, 0x9f, 0x20, 0x89, 0x30, 0x42, 0x7f, 0x14, 0x11, 0x1b, 0x91, 0xad, 0x66, 0xeb, 0xf7, 0x10, 0xd9, 0xb1, 0xea, 0xfb, 0x22, 0xfc, 0x34, 0xb2, 0x61, 0x64, 0x58, 0x28, 0x3e, 0x9f, 0xe1, 0x21, 0x8a, 0x28, 0x86, 0xa7, 0xb7, 0x37, 0x42, 0x34, 0x29, 0x62, 0xbf, 0xe5, 0xdf, 0xc2, 0xf8, 0x29, 0xa7, 0x72, 0x26, 0xfa, 0x8b, 0xb6, 0x16, 0x5e, 0xfc, 0x66, 0x87, 0x3d, 0x61, 0x8d, 0x8b, 0x6a, 0xce, 0xce, 0x4, 0x12, 0x51, 0x5c, 0x5a, 0x3, 0x2e, 0x44, 0x68, 0x5f, 0x73, 0x54, 0xf2, 0xdf, 0x2c, 0xa1, 0xf9, 0x3, 0xec, 0xf1, 0xa5, 0x38, 0x94, 0xa9, 0xa8, 0x7e, 0x7, 0xfb, 0x36, 0x75, 0x9f, 0xf6, 0x66, 0x56, 0x6, 0x5, 0xca, 0x55, 0x48, 0x8a, 0x7b, 0x3b, 0xfc, 0xfe, 0xbf, 0x6a, 0xd, 0x61, 0x64, 0x17, 0xc9, 0x38, 0x35, 0xec, 0xe0, 0x8f, 0xb6, 0x94, 0x50, 0xe0, 0x41, 0xa7, 0xc2, 0x39, 0x81, 0x52, 0xc, 0xe0, 0x3d, 0x51, 0x94, 0xdc, 0xe2, 0xac, 0x49, 0x2f, 0x2e, 0x48, 0x92, 0xb8, 0x2, 0x8a, 0x7e, 0xaf, 0xbb, 0x91, 0x39, 0x30, 0x94, 0x2f, 0xb2, 0x66, 0x43, 0x39, 0x4b, 0xfd, 0xd6, 0x7b, 0x93, 0x81, 0xb1, 0x58, 0x1f, 0x9f, 0x62, 0x99, 0x37, 0x8, 0xa3, 0xc4, 0x61, 0xff, 0xa4, 0x3f, 0x11, 0xaf, 0x67, 0x9b, 0x68, 0xf6, 0x2f, 0x25, 0x53, 0x50, 0xe, 0xd3, 0xd7, 0xd0, 0x49, 0x90, 0xa6, 0xfc, 0x10, 0x17, 0xd8, 0xd7, 0xaf, 0xf9, 0xb6, 0xdd, 0x58, 0xb2, 0x2f, 0x16, 0x81, 0x61, 0xe7, 0x1e, 0xad, 0x31, 0x18, 0x3e, 0xb3, 0x38, 0xc7, 0x5c, 0xb, 0xfa, 0x0, 0xa7, 0x1, 0xa1, 0x9f, 0x72, 0xb7, 0x3c, 0x5a, 0x77, 0x20, 0x90, 0xa8, 0x6b, 0xec, 0x3, 0xe4, 0xf9, 0xf2, 0x55, 0x49, 0x48, 0xd9, 0x4e, 0x15, 0x3, 0x10, 0xc5, 0xaa, 0xee, 0xe4, 0x6d, 0x1a, 0xee, 0x5b, 0x83, 0x76, 0x95, 0xfb, 0x49, 0x36, 0x8e, 0x59, 0xd1, 0x76, 0xe0, 0x19, 0x9c, 0xdd, 0xea, 0x60, 0x85, 0xc8, 0x97, 0xae, 0x28, 0x29, 0xb1, 0xc, 0x59, 0x25, 0x53, 0xd5, 0x4e, 0xc9, 0xa0, 0xa7, 0xb8, 0xb7, 0x88, 0x9, 0xa5, 0x1b, 0x9d, 0xea, 0xd6, 0x6d, 0x8, 0x79, 0xe8, 0xd7, 0x16, 0xb0, 0x51, 0x98, 0x1, 0xad, 0x71, 0xfc, 0xa6, 0x2d, 0x84, 0x83, 0x13, 0xd4, 0xf, 0x82, 0x24, 0x86, 0x1e, 0x58, 0xf0, 0xd1, 0x7, 0xef, 0x85, 0x5a, 0x6f, 0xe9, 0x31, 0x5d, 0xf8, 0xee, 0x62, 0x4c, 0x4, 0xc5, 0x64, 0x73, 0xc6, 0x1c, 0x40, 0x6, 0xe9, 0x37, 0x2c, 0xb2, 0x2b, 0x4c, 0xc3, 0xdd, 0xe1, 0xe, 0x60, 0xed, 0x3, 0xd6, 0xd6, 0xfc, 0x92, 0x8e, 0xfe, 0xfe, 0x11, 0xba, 0x7c, 0xec, 0x15, 0x35, 0x1f, 0xc0, 0xb0, 0xa5, 0x59, 0x7d, 0xea, 0xbc, 0x58, 0xb9, 0x10, 0x40, 0xb7, 0xb, 0xbd, 0xaf, 0x8e, 0x16, 0x15, 0xea, 0x52, 0x46, 0xca, 0x99, 0x3b, 0xbf, 0x65, 0x3e, 0xfe, 0xc3, 0xfa, 0xff, 0x58, 0x74, 0x67, 0xa1, 0x8a, 0x4f, 0x38, 0x68, 0xc1, 0x10, 0x9f, 0xb3, 0x55, 0x33, 0x8e, 0x54, 0xef, 0xf5, 0x8a, 0x1c, 0x90, 0xe2, 0xbb, 0xda, 0xdb, 0x2, 0x20, 0xf2, 0x25, 0x11, 0xc5, 0xd8, 0xcb, 0xa9, 0xa, 0xc4, 0x74, 0xfc, 0xcb, 0xf, 0x9d, 0xab, 0x7b, 0x66, 0x10, 0x9b, 0xaf, 0xba, 0x8e, 0x82, 0x38, 0x2c, 0xbb, 0x85, 0x1c, 0x2f, 0x8, 0x69, 0xb3, 0xbf, 0xf0, 0x9a, 0x90, 0x75, 0x1b, 0x59, 0x1b, 0xdc, 0xb6, 0x17, 0xc6, 0x87, 0x1f, 0xd8, 0xe2, 0x2b, 0xf5, 0x54, 0xf3, 0xaf, 0x80, 0x97, 0xe9, 0x44, 0x3d, 0xd, 0x85, 0xf9, 0xa7, 0xac, 0x34, 0x32, 0xdc, 0x8b, 0x3e, 0x3f, 0xc, 0x8a, 0x57, 0xe, 0x2f, 0x97, 0xdf, 0xb0, 0xe4, 0x44, 0x51, 0x52, 0xe4, 0xdd, 0xb, 0xe, 0xf1, 0xe6, 0x56, 0xdd, 0x7b, 0x7a, 0x50, 0xb3, 0x3, 0xb6, 0xbb, 0xc7, 0x34, 0x39, 0xf8, 0x73, 0x73, 0x7b, 0x47, 0xaf, 0x21, 0xaf, 0x43, 0x5c, 0x97, 0x3, 0xf7, 0x4, 0xdd, 0xc1, 0x53, 0xb2, 0x67, 0x88, 0xfe, 0x93, 0x2c, 0xfc, 0xf0, 0xe, 0x87, 0xe3, 0x3e, 0xb1, 0x95, 0xa3, 0x8c, 0x58, 0x12, 0x8a, 0x43, 0x5c, 0x81, 0xa0, 0xdf, 0xb4, 0x2e, 0xdb, 0xb0, 0xb9, 0xeb, 0x27, 0xf6, 0x4c, 0xf, 0xfe, 0x83, 0x57, 0xfd, 0x99, 0x5e, 0x8a, 0xc7, 0xb, 0xf0, 0xc7, 0xfb, 0xb2, 0x62, 0x2a, 0xb5, 0x47, 0x7c, 0xa8, 0xf6, 0x5e, 0xf1, 0xcc, 0xbf, 0xdd, 0xe0, 0xdd, 0xf2, 0xd6, 0x10, 0xf7, 0x91, 0x3d, 0x7f, 0xf6, 0x92, 0x79, 0xdd, 0x33, 0xea, 0xf4, 0xa4, 0x9e, 0x3a, 0x53, 0x26, 0xe5, 0x7a, 0xe3, 0xe8, 0xdf, 0xb7, 0x52, 0xe9, 0x89, 0xc9, 0x9d, 0x17, 0x3, 0x89, 0xc0, 0x1c, 0x9a, 0xdb, 0xda, 0x22, 0x84, 0x68, 0x68, 0xcb, 0xad, 0x5f, 0x62, 0xb9, 0x74, 0xbf, 0xc6, 0xa5, 0xa4, 0xa8, 0x8e, 0xb6, 0xe0, 0x4a, 0x28, 0x75, 0x2d, 0xe0, 0x94, 0x39, 0x15, 0x76, 0xfc, 0x17, 0x27, 0x5d, 0x87, 0x6a, 0x5d, 0x3b, 0x47, 0x8, 0x45, 0xa7, 0xa0, 0x64, 0xe0, 0xb, 0xe7, 0x91, 0xb2, 0xd, 0xad, 0xdb, 0xe5, 0x88, 0x12, 0xce, 0xb2, 0x96, 0x88, 0x4f, 0xd7, 0x24, 0x6f, 0xf6, 0x74, 0x11, 0xaa, 0xb7, 0x3d, 0x4, 0x9f, 0xc3, 0x25, 0xd, 0xa9, 0x11, 0x1d, 0x1b, 0x3f, 0x19, 0x2b, 0xd8, 0xbc, 0x65, 0xf, 0xc4, 0xac, 0x93, 0x92, 0xeb, 0x18, 0x84, 0xb, 0x36, 0xd8, 0x46, 0xa, 0x80, 0xd7, 0x96, 0x7b, 0x20, 0x75, 0x5b, 0xfc, 0xf8, 0x25, 0x18, 0x36, 0x96, 0x1f, 0x98, 0xb5, 0xe7, 0x17, 0xd7, 0xf0, 0x78, 0xd3, 0xa2, 0xcb, 0xb0, 0x9b, 0xfe, 0xda, 0x3, 0x42, 0x74, 0xb9, 0x3e, 0x80, 0x92, 0xd3, 0x7f, 0x6, 0xc, 0xee, 0x6, 0x59, 0x26, 0x9a, 0x9, 0xa1, 0x1c, 0xac, 0x90, 0x7c, 0xe, 0xc0, 0x27, 0xda, 0x78, 0xa7, 0x23, 0xa2, 0x7, 0xb2, 0x17, 0x73, 0x5b, 0x15, 0x99, 0x8e, 0xcf, 0xb3, 0xc4, 0x3d, 0x87, 0xae, 0xf6, 0x67, 0x1b, 0x54, 0xa7, 0x66, 0x66, 0x93, 0x3d, 0xd9, 0x8d, 0x5d, 0xb4, 0xc7, 0xa7, 0x38, 0xc4, 0x31, 0x73, 0xe7, 0x7b, 0x25, 0x73, 0xc7, 0x61, 0x82, 0x39, 0xf4, 0xb6, 0x64, 0x3, 0x14, 0x77, 0x2, 0x96, 0x66, 0xfb, 0x8d, 0x3b, 0xc2, 0x3, 0xf1, 0x19, 0xd, 0xcc, 0x27, 0xba, 0x6, 0x8, 0xb2, 0x76, 0xb5, 0x1f, 0x7c, 0xfb, 0xbc, 0x70, 0xf5, 0xd4, 0xb1, 0x44, 0x3d, 0xbe, 0x37, 0xdc, 0xea, 0x3, 0x54, 0xdd, 0x28, 0x8d, 0xd4, 0xd8, 0x51, 0xf1, 0x82, 0x28, 0x3f, 0xba, 0xd3, 0x1d, 0x4a, 0x8e, 0x57, 0x34, 0xa2, 0x8c, 0x49, 0x9, 0x4d, 0xe6, 0x1a, 0xf6, 0x67, 0x49, 0x60, 0xda, 0xbb, 0x2e, 0x63, 0x32, 0xfd, 0x5a, 0x92, 0x17, 0xa9, 0x2e, 0x5c, 0xb1, 0x1, 0x22, 0x3d, 0x98, 0xa4, 0xbd, 0x50, 0xe5, 0x68, 0x24, 0xc7, 0xda, 0x9, 0xaf, 0x16, 0x68, 0xb1, 0xe9, 0x8b, 0xee, 0xfa, 0x8c, 0xc9, 0xda, 0x8f, 0x5b, 0x64, 0x89, 0xff, 0x1f, 0x79, 0x5b, 0x6f, 0x2e, 0x3d, 0xa9, 0x65, 0x26, 0xec, 0x2, 0x33, 0x60, 0x4a, 0x5c, 0x30, 0xc, 0xa9, 0x91, 0xd5, 0x9, 0xa, 0x35, 0x8a, 0xd2, 0x1b, 0x1, 0xe9, 0x18, 0xe5, 0xfb, 0x9f, 0xc0, 0x7, 0xd, 0x3e, 0xc1, 0xa8, 0x64, 0x7a, 0x1f, 0x40, 0xfd, 0x9a, 0x66, 0x2d, 0xb1, 0x6a, 0xaf, 0x39, 0xb8, 0xfc, 0x35, 0x1d, 0x2f, 0xb0, 0x77, 0xba, 0x37, 0x80, 0x2, 0x58, 0x20, 0x24, 0x49, 0xdb, 0x1f, 0x1a, 0x95, 0xfa, 0x9d, 0xef, 0x31, 0xe4, 0x8c, 0xbb, 0xcc, 0x59, 0x4f, 0x6a, 0xd6, 0x3c, 0xca, 0x4f, 0xc3, 0xeb, 0x3b, 0xb5, 0x72, 0x8c, 0xbf, 0xe4, 0x2, 0x6c, 0x4a, 0x7a, 0xba, 0x1f, 0xed, 0x99, 0x26, 0x61, 0xe5, 0x8e, 0xdd, 0x33, 0x4b, 0x55, 0x5d, 0xc9, 0x3d, 0x34, 0xbf, 0x34, 0x64, 0x10, 0x12, 0x2c, 0xac, 0x14, 0xf7, 0x74, 0xb3, 0x99, 0xe, 0x68, 0x50, 0x8d, 0xd2, 0x1e, 0xf2, 0x7a, 0x83, 0xd6, 0xbb, 0x6c, 0xe2, 0x1e, 0xef, 0xdb, 0xaa, 0xa2, 0xca, 0x63, 0x44, 0x30, 0x0, 0xeb, 0xfa, 0xfd, 0xfc, 0x18, 0xc0, 0xc9, 0x6d, 0x7f, 0xf7, 0xeb, 0x47, 0x44, 0x8f, 0xc9, 0x46, 0xa1, 0xa0, 0x96, 0xb0, 0x0, 0x8e, 0xad, 0x10, 0x75, 0x20, 0xe2, 0x53, 0x6c, 0xff, 0x86, 0xce, 0xdd, 0xc9, 0x3f, 0x5f, 0x8f, 0x72, 0x78, 0x25, 0x57, 0x5c, 0x7f, 0xd7, 0xd5, 0x28, 0x47, 0x7e, 0x14, 0x54, 0x9c, 0x91, 0xfd, 0x86, 0xfb, 0xee, 0xa8, 0x32, 0xd1, 0xf6, 0x9d, 0x21, 0xd0, 0x5f, 0x22, 0xd, 0x81, 0xaf, 0x9c, 0x24, 0x17, 0x66, 0xca, 0xd8, 0xaa, 0x61, 0x54, 0xdd, 0x66, 0x61, 0x78, 0x9e, 0xbd, 0x44, 0xb6, 0x79, 0x15, 0xf2, 0xf5, 0x5b, 0x38, 0xea, 0xb1, 0x7, 0x4e, 0x48, 0xb1, 0x13, 0x7c, 0xfb, 0x1c, 0x44, 0xf, 0x1b, 0xef, 0x43, 0x8a, 0xc1, 0xdb, 0x41, 0x80, 0xb4, 0xd5, 0xc, 0xf7, 0x35, 0xd3, 0x9a, 0xf8, 0x20, 0x1e, 0x92, 0x36, 0xdc, 0x60, 0x56, 0xd2, 0x97, 0x4b, 0x95, 0x1a, 0xb4, 0x17, 0x47, 0x51, 0x96, 0x9f, 0xa0, 0xb3, 0x37, 0x5, 0xfb, 0x60, 0x5d, 0x2e, 0x92, 0x6a, 0x76, 0x4d, 0xa3, 0xca, 0x29, 0x92, 0xcc, 0x93, 0x8, 0x54, 0x7, 0x5c, 0xd, 0xa0, 0xe5, 0xd1, 0xb7, 0xbc, 0xc8, 0xb6, 0x6c, 0xb9, 0x37, 0xfd, 0x6b, 0x92, 0xa2, 0x77, 0x6c, 0x88, 0xc0, 0x2b, 0x39, 0x1d, 0x35, 0x37, 0x59, 0xa0, 0x4b, 0x5a, 0xba, 0x50, 0x34, 0x90, 0x5a, 0xad, 0x61, 0xd0, 0xc3, 0x30, 0xc9, 0xb0, 0x9, 0x69, 0xd1, 0xfd, 0x1d, 0xd9, 0x92, 0x84, 0xd2, 0x31, 0x3e, 0x90, 0xa5, 0xb8, 0xb0, 0x80, 0x3b, 0xcc, 0x19, 0xd7, 0x2, 0xe1, 0x31, 0xb4, 0x13, 0x3b, 0xb9, 0x1c, 0xed, 0x8a, 0xab, 0x62, 0xb0, 0x10, 0x6c, 0xbe, 0x3d, 0xb, 0xa5, 0x97, 0xc6, 0x9c, 0xbb, 0xab, 0xe0, 0xcf, 0x66, 0x9f, 0xe4, 0x46, 0xaa, 0xd7, 0xdf, 0x1e, 0x4e, 0x68, 0x27, 0xe2, 0x80, 0xfe, 0x8f, 0x2e, 0xe9, 0x1c, 0x99, 0xb1, 0xdb, 0x44, 0xd1, 0xa, 0x65, 0x76, 0xa5, 0x35, 0xb4, 0xfb, 0xc6, 0xc7, 0x62, 0x69, 0xd1, 0xb0, 0x25, 0x2c, 0xf4, 0x82, 0xb9, 0x21, 0x88, 0x9a, 0xac, 0xba, 0x14, 0xb4, 0xc0, 0xa2, 0xeb, 0x59, 0x7, 0x61, 0x12, 0x90, 0xce, 0x4, 0xb2, 0x9a, 0xc5, 0x43, 0x6e, 0xdb, 0x8d, 0x5d, 0x77, 0xa6, 0xe8, 0xac, 0x5c, 0x67, 0x2d, 0x67, 0xe1, 0x7, 0xb6, 0xa8, 0x66, 0xc4, 0xba, 0xe3, 0x6e, 0x82, 0xe2, 0x2f, 0xe6, 0xfc, 0x5b, 0x31, 0x53, 0x84, 0x84, 0x40, 0x2a, 0x30, 0xa5, 0x22, 0x1f, 0xa2, 0x35, 0x7c, 0x3d, 0x17, 0xa1, 0x31, 0x7e, 0xf8, 0xe5, 0xac, 0xf7, 0x32, 0x9c, 0x67, 0xb, 0x67, 0xd3, 0x8f, 0x1c, 0xe6, 0xa, 0x5, 0xdd, 0x99, 0x1b, 0xa8, 0x55, 0xc5, 0x98, 0xf9, 0xc3, 0x2e, 0x51, 0x8b, 0x95, 0xb6, 0xae, 0xb8, 0x45, 0x87, 0x10, 0x38, 0x15, 0x1, 0x9e, 0x39, 0x75, 0x3d, 0x43, 0xa7, 0x1a, 0x8c, 0x82, 0x58, 0x95, 0xcf, 0x25, 0x69, 0x78, 0x63, 0x58, 0xb7, 0x8a, 0x74, 0xa5, 0xb4, 0x7b, 0x7d, 0xfc, 0x32, 0x92, 0x14, 0x6b, 0xad, 0xbe, 0x8, 0x67, 0xa3, 0x53, 0xa7, 0x28, 0x54, 0x87, 0xba, 0xdd, 0xe2, 0x8e, 0x9d, 0x78, 0xf7, 0xe8, 0xb2, 0xfe, 0xe, 0x7c, 0xf7, 0x83, 0x30, 0xd4, 0xba, 0xda, 0xd, 0x60, 0x6d, 0x6d, 0x40, 0xfe, 0x92, 0x96, 0xeb, 0x50, 0xc, 0xc9, 0x6, 0x54, 0x5d, 0x72, 0x59, 0x6c, 0x8c, 0x98, 0x18, 0x86, 0x73, 0xf4, 0x10, 0x57, 0x6d, 0x15, 0x4e, 0x3b, 0xcb, 0x1f, 0x88, 0x87, 0xe5, 0x61, 0x3c, 0x3c, 0xf2, 0x79, 0xbe, 0x30, 0x7c, 0x2, 0x24, 0xda, 0xdf, 0x58, 0xa9, 0x1e, 0x93, 0x21, 0x1f, 0x11, 0x73, 0xc4, 0x61, 0xef, 0x42, 0xf3, 0x51, 0xc7, 0xdb, 0xa4, 0x99, 0xd6, 0x97, 0x42, 0x45, 0xe1, 0xd8, 0x8b, 0xa2, 0x28, 0x30, 0xb0, 0x7f, 0x6d, 0x73, 0x5c, 0x5a, 0x74, 0xde, 0x47, 0x5c, 0x7f, 0x8, 0xa9, 0x40, 0x46, 0x5, 0x12, 0xee, 0xe2, 0xca, 0xa4, 0x67, 0x5, 0x58, 0x8, 0x68, 0xd6, 0x39, 0xe4, 0x6b, 0x3f, 0xde, 0x80, 0x5a, 0xa1, 0x34, 0x3c, 0xec, 0x38, 0x5, 0xce, 0xb7, 0xe6, 0x24, 0x53, 0x9f, 0xb2, 0xb3, 0x62, 0x38, 0x2f, 0x5b, 0xf0, 0xd5, 0x5e, 0x6f, 0x3b, 0x90, 0xd2, 0x12, 0x51, 0x62, 0xae, 0x7b, 0xab, 0xdf, 0x96, 0xfe, 0xe5, 0x4b, 0x29, 0xbf, 0xa9, 0xef, 0xfd, 0x80, 0xa5, 0x8, 0xe8, 0xb, 0x47, 0x8e, 0xf6, 0x79, 0x97, 0xaf, 0x16, 0x6b, 0x54, 0x17, 0x62, 0xb, 0xa5, 0x88, 0x6d, 0x63, 0x1d, 0xf5, 0x1, 0xee, 0xb2, 0x42, 0xcc, 0x40, 0xd0, 0x53, 0x87, 0xc9, 0x73, 0xb, 0xbe, 0x8c, 0xb0, 0x70, 0xb2, 0x21, 0xa, 0x87, 0x75, 0xdd, 0x25, 0xa5, 0xb7, 0x67, 0x55, 0x38, 0xb, 0xa7, 0xe2, 0xea, 0x2, 0x14, 0x2e, 0x43, 0xa3, 0xff, 0xfb, 0x6f, 0x1b, 0xed, 0x55, 0x9c, 0xaa, 0x68, 0xb0, 0x9d, 0xfc, 0x8d, 0xfc, 0x18, 0x64, 0xed, 0xaf, 0xf7, 0x5, 0xbb, 0x1e, 0x30, 0xfb, 0x58, 0xc3, 0xa2, 0x7c, 0x5b, 0x1c, 0x42, 0x5b, 0x22, 0xd0, 0xc1, 0x7, 0x37, 0x26, 0xa2, 0xca, 0xae, 0x5c, 0xfa, 0x63, 0x1c, 0xc2, 0xed, 0xac, 0x96, 0xc1, 0xf, 0xb2, 0x53, 0x29, 0xf0, 0xe6, 0xd1, 0x5e, 0x4d, 0x52, 0x69, 0x4f, 0x86, 0x70, 0xd3, 0xd0, 0x54, 0xe9, 0xfb, 0xb2}, - output224: []byte{0xdf, 0x76, 0x57, 0x85, 0xbb, 0x97, 0xba, 0x37, 0x86, 0xea, 0x56, 0xdf, 0xe8, 0x5a, 0xf5, 0xc7, 0x34, 0x47, 0x13, 0xeb, 0x5f, 0xee, 0xf3, 0x74, 0xed, 0xe9, 0xe6, 0x60}, - output256: []byte{0xc3, 0x6a, 0xc1, 0x51, 0xbe, 0x54, 0x58, 0x23, 0x9a, 0xe7, 0xa0, 0xe6, 0xb4, 0x70, 0x69, 0x50, 0xa1, 0xc6, 0xb0, 0x46, 0xf0, 0x2d, 0x64, 0x29, 0x5d, 0xc1, 0xe5, 0xe9, 0x6e, 0x7f, 0xfd, 0x5b}, - output384: []byte{0x2e, 0xf1, 0x6b, 0xfe, 0xf6, 0xea, 0x7a, 0x6, 0xc3, 0x80, 0xb8, 0x8d, 0xbc, 0x41, 0x27, 0x7b, 0xea, 0x79, 0x6e, 0xf1, 0xba, 0x8d, 0x7c, 0xdd, 0x32, 0xef, 0x15, 0xcf, 0x6e, 0xb0, 0x7a, 0x23, 0x4, 0xfb, 0xbc, 0xe0, 0x55, 0x47, 0x8d, 0xa5, 0xa, 0x1c, 0xea, 0x34, 0x5e, 0xa0, 0x27, 0x9f}, - output512: []byte{0x1c, 0xb0, 0xd8, 0x98, 0x95, 0xfa, 0xbc, 0x4, 0xe0, 0xb1, 0x9a, 0x71, 0xb2, 0x74, 0x2, 0x4a, 0x67, 0xf0, 0x8a, 0x3d, 0x88, 0x11, 0x93, 0xef, 0x43, 0x8a, 0xfb, 0x3a, 0x8f, 0xfb, 0x3, 0x3a, 0x47, 0x2a, 0x35, 0x7f, 0x9d, 0xa3, 0x51, 0xc7, 0xd5, 0xbd, 0xde, 0x9b, 0x88, 0x8e, 0x9c, 0x4d, 0x8f, 0xc9, 0x21, 0x6a, 0x17, 0x1, 0xfe, 0xa2, 0x60, 0x6f, 0x8a, 0x5a, 0x64, 0x75, 0xd3, 0x2f}}, - testcase{ - msg: []byte{0xb7, 0x20, 0x2c, 0x31, 0xc3, 0x3e, 0x55, 0x79, 0x59, 0x9d, 0x14, 0xd1, 0x25, 0x11, 0xcd, 0x70, 0xe, 0x5a, 0x7, 0x76, 0x79, 0x26, 0x6b, 0x94, 0xb4, 0x45, 0x86, 0xb3, 0x63, 0x67, 0x76, 0x92, 0xa4, 0xf2, 0x83, 0x8f, 0x50, 0xd4, 0x37, 0xc9, 0x9, 0xe5, 0xa4, 0x1b, 0xa7, 0x47, 0xa6, 0xf2, 0xc7, 0x2b, 0xe8, 0x51, 0x49, 0xd5, 0x3a, 0x83, 0x4f, 0x7e, 0x66, 0xb6, 0xdc, 0x74, 0x92, 0x72, 0x50, 0xb5, 0x43, 0x12, 0x1b, 0x6b, 0x47, 0x80, 0x54, 0x2a, 0xb5, 0x11, 0xad, 0xf2, 0x1, 0x13, 0x80, 0xf0, 0xd7, 0x13, 0x3b, 0xf8, 0x2b, 0x38, 0xa2, 0xe3, 0x77, 0xb5, 0xc7, 0x75, 0x5e, 0x49, 0xbb, 0x1a, 0xbc, 0x16, 0xee, 0xa, 0x4a, 0x77, 0x2f, 0x56, 0x53, 0xbb, 0xfe, 0x6, 0xbe, 0x77, 0x73, 0x29, 0xa, 0xa4, 0xa9, 0xa0, 0x59, 0xb9, 0x86, 0x47, 0xc1, 0x88, 0xbb, 0xa6, 0x9, 0xd3, 0x1a, 0xf5, 0x94, 0xd0, 0x59, 0x4b, 0x37, 0x59, 0x63, 0xf2, 0x49, 0x29, 0x6f, 0xc6, 0x97, 0x4d, 0x25, 0x20, 0xcf, 0xe9, 0xeb, 0xab, 0x8c, 0x41, 0x54, 0xf1, 0xb9, 0xa7, 0xee, 0xe6, 0x69, 0x68, 0xb8, 0x53, 0xf1, 0x9f, 0x74, 0xd3, 0x12, 0x5b, 0x82, 0x83, 0xe5, 0xf1, 0x67, 0x39, 0x5e, 0xe1, 0x7, 0x72, 0x63, 0xee, 0xf9, 0x1c, 0xf5, 0x73, 0xf1, 0xa2, 0x58, 0x38, 0x4d, 0x36, 0x9c, 0xa, 0x1b, 0x8f, 0x4e, 0x12, 0xc0, 0x5f, 0x94, 0x2b, 0x33, 0xd, 0x43, 0xa1, 0x68, 0x29, 0xd, 0x82, 0x32, 0x5e, 0xb2, 0xb7, 0x7d, 0x49, 0xf2, 0x5e, 0x2, 0x8a, 0xa3, 0x77, 0x51, 0xa2, 0x8c, 0x40, 0x5a, 0x6a, 0xb1, 0x90, 0xb7, 0x44, 0xc5, 0xf9, 0x98, 0xd7, 0xca, 0xba, 0xe1, 0x8c, 0xe1, 0x84, 0xd9, 0x6b, 0xa9, 0xbe, 0x24, 0x28, 0x15, 0x56, 0x38, 0x7d, 0x71, 0xe, 0x66, 0xfd, 0x77, 0x80, 0xeb, 0x1a, 0xd, 0x91, 0xa3, 0xf6, 0x39, 0x6c, 0xca, 0xa5, 0x4a, 0x7b, 0x2b, 0x22, 0x3a, 0xbc, 0x19, 0x2, 0xa6, 0x60, 0xa4, 0x4e, 0xd1, 0xfc, 0x26, 0x6, 0xaa, 0x5, 0x4e, 0x1c, 0xf, 0xd9, 0x12, 0x4e, 0xeb, 0xcc, 0x9, 0x93, 0x92, 0x2b, 0x79, 0xab, 0x6d, 0xc2, 0x25, 0x82, 0x6c, 0xc3, 0xfb, 0xb0, 0xb9, 0x90, 0x46, 0x52, 0x9a, 0xb3, 0xcf, 0xc7, 0x9e, 0xab, 0x58, 0xea, 0x68, 0xa1, 0x53, 0xf0, 0xc1, 0x4e, 0x57, 0x35, 0xcb, 0x42, 0x96, 0xfb, 0xfc, 0xb2, 0x3a, 0xcd, 0x15, 0x8a, 0xdc, 0x1b, 0x4, 0x9b, 0xbf, 0x85, 0x40, 0x54, 0xa7, 0xe0, 0x8b, 0xfe, 0xb, 0x7d, 0x4c, 0x88, 0x96, 0x67, 0xa, 0x90, 0xbc, 0x1a, 0x3a, 0x9d, 0x4a, 0x2f, 0x74, 0xd1, 0xfb, 0x5e, 0x14, 0x3a, 0x4d, 0x22, 0xed, 0xe7, 0x9c, 0x73, 0x8b, 0x41, 0xb9, 0x1b, 0x93, 0xab, 0x34, 0xa9, 0x1c, 0x8e, 0x32, 0x7b, 0xf1, 0x7a, 0x1e, 0x86, 0x88, 0x45, 0x44, 0xb7, 0x5, 0x57, 0xd4, 0xec, 0x18, 0x4f, 0x82, 0xea, 0x5b, 0x5c, 0x56, 0x82, 0xe3, 0x3a, 0xf7, 0xcc, 0x38, 0xc5, 0xf9, 0x1b, 0xf5, 0xd0, 0x24, 0xcf, 0xff, 0xd1, 0x45, 0xa5, 0xae, 0xa6, 0xfd, 0x7b, 0x6b, 0x4, 0x56, 0xaf, 0x14, 0xbd, 0xcf, 0x60, 0x73, 0x4c, 0xc9, 0x3c, 0x13, 0x87, 0xa4, 0x8d, 0xfb, 0x97, 0xb9, 0x1b, 0xb2, 0x3d, 0x7f, 0x68, 0xeb, 0x78, 0x3e, 0xb0, 0xcd, 0xbd, 0xb, 0xbe, 0x41, 0x4, 0xab, 0x21, 0x21, 0x47, 0xc9, 0xca, 0xa9, 0xdd, 0x92, 0x3e, 0x88, 0x3c, 0x3e, 0x24, 0xb5, 0x3a, 0xeb, 0xcc, 0x3f, 0x7f, 0xa5, 0xaa, 0x5c, 0x88, 0x70, 0x78, 0x62, 0x8e, 0xfd, 0x7e, 0x82, 0x54, 0x3f, 0x86, 0x0, 0xfd, 0xf8, 0x9a, 0x33, 0x12, 0xad, 0x69, 0x2, 0x27, 0x13, 0x21, 0xb7, 0x7c, 0x1f, 0x8d, 0xff, 0x1b, 0x92, 0x25, 0xc, 0x59, 0xe0, 0x37, 0x41, 0x1c, 0x67, 0x91, 0xc7, 0xe9, 0x30, 0xd6, 0x86, 0xe7, 0xbf, 0x35, 0x9e, 0xc4, 0x80, 0xc6, 0xd0, 0xbd, 0x5, 0xd2, 0x0, 0x9f, 0x2d, 0x33, 0x9d, 0x20, 0x89, 0xd5, 0x20, 0x2c, 0x65, 0xb8, 0xfe, 0x73, 0x7e, 0xbe, 0xa6, 0xcb, 0x6d, 0x92, 0x71, 0xb0, 0xbb, 0xd3, 0xec, 0xd6, 0x32, 0x8a, 0xa2, 0x7e, 0xc7, 0x72, 0x2c, 0xbb, 0x3e, 0x70, 0x6, 0x62, 0xee, 0x6a, 0xfe, 0xbd, 0xc4, 0xff, 0x5e, 0x9b, 0x0, 0x94, 0x9e, 0xc3, 0xda, 0x53, 0xa, 0xa2, 0x71, 0xa7, 0x8c, 0xa7, 0x32, 0x82, 0x17, 0xbd, 0xb5, 0x60, 0x4, 0x48, 0xd9, 0xf8, 0x25, 0x83, 0x6e, 0x4, 0x89, 0x2c, 0xef, 0x50, 0xa9, 0x5f, 0x8c, 0xea, 0xaa, 0x5c, 0x28, 0xf2, 0xb9, 0xb1, 0x85, 0x53, 0x6f, 0xf2, 0xdd, 0xf3, 0x80, 0x80, 0x8e, 0xa3, 0x51, 0xbb, 0xd7, 0xa0, 0x68, 0xbd, 0x43, 0xbf, 0xe8, 0xee, 0xa7, 0xa3, 0x29, 0x2c, 0x65, 0x13, 0x9, 0x15, 0xe8, 0x28, 0x20, 0x4c, 0xe, 0xc1, 0x93, 0x9f, 0x1e, 0x30, 0x88, 0x5, 0x8c, 0xce, 0x4b, 0x29, 0x21, 0x53, 0xe, 0x3a, 0x2c, 0x8c, 0xbd, 0x3f, 0xca, 0x2e, 0xe3, 0x95, 0x4, 0xb7, 0x2e, 0xe7, 0x2d, 0xe1, 0x20, 0x31, 0x64, 0xab, 0xa, 0xf7, 0x8b, 0x66, 0x60, 0xb, 0x27, 0xa0, 0x67, 0xcd, 0x62, 0xd7, 0xdf, 0xac, 0x48, 0x15, 0xb2, 0x3a, 0x71, 0x28, 0x70, 0xaa, 0x4f, 0x26, 0x59, 0x15, 0x70, 0x37, 0x28, 0x53, 0x86, 0xbe, 0xaf, 0x26, 0x49, 0x74, 0x1d, 0xa7, 0xf, 0xb7, 0xe0, 0x31, 0xb4, 0xe1, 0xf3, 0x77, 0x68, 0xa0, 0xc3, 0x49, 0xc7, 0xb8, 0xc9, 0xa, 0x3d, 0xa6, 0x13, 0x84, 0x47, 0xdb, 0x7c, 0xda, 0x0, 0xc9, 0xfb, 0x1, 0x64, 0x7e, 0x32, 0x39, 0xa6, 0x80, 0xff, 0xb6, 0xc8, 0xd4, 0xd5, 0x36, 0xde, 0xa7, 0x13, 0x14, 0x80, 0xfa, 0x95, 0xc5, 0x97, 0xbf, 0xf6, 0x7a, 0xb5, 0xba, 0xe2, 0x57, 0x89, 0x54, 0xbe, 0x1, 0xbe, 0x5f, 0x38, 0x92, 0x68, 0x8a, 0x98, 0xb0, 0xad, 0xa, 0x21, 0xb0, 0xaf, 0x40, 0xe5, 0x62, 0x17, 0x51, 0x64, 0x1, 0x8d, 0x32, 0xd6, 0xa8, 0x86, 0xdc, 0xcb, 0x25, 0x6e, 0xd7, 0xc4, 0x14, 0x8e, 0xeb, 0x96, 0x30, 0x42, 0xbc, 0xa3, 0x4b, 0x68, 0x9c, 0x44, 0xbc, 0x48, 0x5f, 0x28, 0x6a, 0x65, 0xd1, 0xec, 0x44, 0xe5, 0xa0, 0xc9, 0xf, 0x5a, 0x1e, 0x8d, 0x6a, 0x29, 0xdc, 0x30, 0x81, 0x9, 0x17, 0xb8, 0xa3, 0xa6, 0xde, 0xb0, 0x36, 0x2d, 0x59, 0x67, 0xf7, 0x58, 0x2, 0xe8, 0x17, 0x47, 0x25, 0xb7, 0x34, 0xb6, 0x17, 0x87, 0x43, 0x7a, 0xa6, 0xff, 0x8a, 0x4f, 0xea, 0x6c, 0x23, 0x90, 0xc4, 0x77, 0xdd, 0xa0, 0x85, 0xa6, 0x2c, 0x64, 0x77, 0xe9, 0x94, 0x91, 0x35, 0x2, 0xb8, 0x62, 0xba, 0xe5, 0x48, 0x79, 0x8a, 0x17, 0x71, 0x6a, 0x48, 0xfc, 0xec, 0xf3, 0x15, 0x48, 0x78, 0x44, 0xa1, 0xd9, 0x8e, 0xaf, 0x12, 0x25, 0x21, 0x17, 0x38, 0x7, 0xcb, 0x72, 0x30, 0x8c, 0xdf, 0xc6, 0xcf, 0xa2, 0xf1, 0xb9, 0x32, 0x4a, 0x30, 0x58, 0x69, 0xe4, 0x7c, 0xe1, 0x5c, 0xd1, 0x8c, 0xb3, 0x8c, 0xe8, 0x3e, 0xd3, 0xb4, 0x1a, 0x71, 0x20, 0x5b, 0xe4, 0x9c, 0xab, 0x4b, 0x93, 0x14, 0x2d, 0x8e, 0x20, 0xa4, 0xc4, 0x36, 0x5e, 0x4b, 0xe, 0x72, 0xb4, 0x8e, 0x54, 0x40, 0xc8, 0xe8, 0xf5, 0xa8, 0xab, 0xbe, 0x22, 0xe5, 0xc2, 0x4d, 0x2f, 0xfa, 0xe, 0x6, 0x24, 0x34, 0xfb, 0x17, 0x11, 0x90, 0x28, 0x29, 0x9a, 0xd5, 0xae, 0x73, 0x2f, 0xf, 0xa3, 0x91, 0x27, 0xe5, 0x33, 0xd5, 0x91, 0xa2, 0x7c, 0x7a, 0x1, 0x7, 0xa9, 0x44, 0x2b, 0x7c, 0x22, 0x11, 0xc2, 0xf7, 0xfd, 0xad, 0xe8, 0x6b, 0xf0, 0x32, 0xce, 0x72, 0xe9, 0x4e, 0x71, 0xd6, 0x7, 0x24, 0x66, 0xe7, 0xc5, 0xc, 0x62, 0xe0, 0x1c, 0x35, 0xaf, 0x9b, 0xf5, 0xde, 0x70, 0x8a, 0x30, 0x9c, 0x56, 0x94, 0xc8, 0x4e, 0xd4, 0x7a, 0xb3, 0x97, 0xc4, 0x9, 0x5, 0x72, 0x19, 0xb2, 0xb8, 0x1d, 0x9b, 0xca, 0x75, 0x26, 0x76, 0x5c, 0x11, 0x70, 0x1e, 0x69, 0x93, 0x37, 0x8b, 0xed, 0x5, 0xf5, 0xe5, 0xba, 0x5f, 0x9c, 0x5f, 0xc3, 0xe3, 0xe6, 0x9, 0x7d, 0x39, 0xc8, 0x6b, 0x29, 0x95, 0xa9, 0xfe, 0x75, 0xdb, 0xdd, 0xc, 0xbd, 0x3a, 0x9d, 0x96, 0xc3, 0x35, 0xc8, 0xf3, 0xf, 0xb0, 0x4, 0x19, 0x62, 0x2f, 0x8d, 0x61, 0x19, 0x24, 0x6f, 0x1b, 0x94, 0xee, 0x85, 0x24, 0xa2, 0x75, 0x73, 0x8a, 0x2b, 0x31, 0x2d, 0x3, 0x6a, 0xd0, 0xa8, 0xab, 0x72, 0xac, 0x50, 0xf7, 0x6c, 0x86, 0x42, 0xb0, 0xf, 0x35, 0x4b, 0x0, 0xe0, 0x31, 0x1a, 0xc1, 0xc1, 0x1c, 0x13, 0x32, 0x37, 0x2e, 0x4a, 0xd1, 0xa9, 0x82, 0x2, 0x72, 0x30, 0x53, 0x6e, 0x7a, 0x3d, 0x45, 0x1b, 0xb1, 0xe5, 0x5e, 0x50, 0x9a, 0xd0, 0x26, 0x18, 0x86, 0x68, 0xbe, 0x90, 0xb1, 0x2c, 0xdc, 0xb6, 0x4a, 0xb4, 0xc1, 0x9e, 0x46, 0xbd, 0x19, 0x98, 0x3f, 0x4e, 0x1d, 0x26, 0xf8, 0x52, 0x58, 0x50, 0x4a, 0xf4, 0xda, 0xaa, 0x3c, 0x18, 0x8f, 0xc2, 0xac, 0xaf, 0x6a, 0xde, 0x8f, 0xef, 0xa7, 0xa4, 0x2a, 0xba, 0x19, 0xdc, 0x7d, 0x1f, 0x22, 0x69, 0xfd, 0xdf, 0xb1, 0x5e, 0xd2, 0xc6, 0x59, 0x72, 0x58, 0x29, 0xe0, 0x73, 0x69, 0x47, 0xda, 0xcc, 0x67, 0xd8, 0x3b, 0xf, 0xf4, 0xf1, 0xdf, 0xdb, 0x8b, 0x99, 0x8e, 0xfd, 0x4e, 0x50, 0xd8, 0xe5, 0x5, 0x58, 0x38, 0x14, 0xe0, 0x49, 0xa3, 0x19, 0x23, 0xfe, 0xbe, 0x47, 0x9e, 0xa8, 0x88, 0x16, 0xa7, 0xfd, 0x4, 0x4a, 0x52, 0x33, 0x9b, 0x76, 0x1f, 0x9e, 0x6, 0x9c, 0x75, 0x85, 0xd9, 0xed, 0x7f, 0x23, 0x97, 0xad, 0x4c, 0x20, 0x8a, 0xb0, 0x6c, 0x5f, 0xe4, 0xbc, 0x6f, 0xf9, 0xb3, 0x67, 0xd1, 0x9, 0xdd, 0x3f, 0xbb, 0xbb, 0x48, 0xf3, 0x19, 0x5, 0x3c, 0x8b, 0xcf, 0x64, 0x3e, 0x1b, 0x83, 0x46, 0xea, 0x42, 0x92, 0xe, 0x9c, 0xda, 0x20, 0x2e, 0xa0, 0xa7, 0x4e, 0x44, 0x30, 0x5f, 0x8e, 0xf7, 0xb1, 0x8c, 0xfa, 0x5c, 0x92, 0x1c, 0x9e, 0x5e, 0x54, 0x62, 0x76, 0xd3, 0xea, 0xd2, 0x56, 0x8a, 0x9d, 0xf7, 0xb7, 0x88, 0x3d, 0x4c, 0x20, 0xb0, 0xf3, 0x8b, 0xed, 0x53, 0x8d, 0x9b, 0x41, 0xab, 0xa4, 0x91, 0xa4, 0xba, 0x3e, 0x4c, 0x47, 0x87, 0xfb, 0xb6, 0xf7, 0x5b, 0x18, 0xdc, 0x6c, 0x35, 0x6a, 0x95, 0xde, 0xbd, 0x89, 0x85, 0xa0, 0x28, 0xc1, 0xd0, 0xc5, 0x6a, 0xb5, 0xd0, 0x64, 0x6, 0xe5, 0x47, 0xcb, 0x4f, 0xe8, 0x8b, 0xea, 0x7d, 0xf, 0x8b, 0x3d, 0x24, 0x4f, 0xd, 0x57, 0x65, 0x2a, 0x18, 0xd1, 0x22, 0xfb, 0xd1, 0xc6, 0xdf, 0x0, 0x2, 0xf3, 0xbf, 0xa0, 0x71, 0x97, 0x13, 0x99, 0xc7, 0x49, 0xa0, 0x55, 0x69, 0xf9, 0x72, 0xac, 0xc, 0x79, 0xcf, 0x65, 0x32, 0x50, 0x77, 0x40, 0xc3, 0xb9, 0x6, 0xe1, 0xc5, 0x66, 0x41, 0x94, 0x2e, 0x21, 0x5f, 0xe6, 0x0, 0x2, 0xac, 0xb2, 0xf3, 0x30, 0xc9, 0x98, 0x0, 0xb8, 0x41, 0x0, 0x98, 0x21, 0x23, 0x21, 0x1a, 0x1b, 0xb9, 0xc0, 0x58, 0x45, 0xc2, 0x9e, 0xd0, 0x3e, 0x35, 0x49, 0x86, 0x17, 0x87, 0x86, 0x8c, 0xdf, 0x9f, 0x20, 0xc9, 0xdc, 0x3d, 0xd9, 0xc6, 0x38, 0xa9, 0xd5, 0xec, 0x2, 0x38, 0xab, 0x5, 0xbb, 0x2c, 0x31, 0xe4, 0x75, 0xf0, 0x8, 0xdd, 0x3e, 0x5c, 0x9a, 0xdc, 0xb0, 0x96, 0x8d, 0x2, 0x2b, 0x99, 0xf1, 0xc8, 0x48, 0x33, 0x9e, 0xd3, 0x86, 0x1, 0xfd, 0x59, 0x4f, 0x2b, 0xe5, 0x43, 0x84, 0x40, 0xf6, 0x37, 0x1a, 0xc9, 0x54, 0x57, 0x30, 0x12, 0xd6, 0x26, 0xf9, 0xcf, 0xff, 0xb0, 0x6a, 0xf4, 0xdc, 0x2f, 0xc, 0x52, 0x2e, 0x52, 0x58, 0x96, 0x8a, 0x6e, 0xb2, 0x88, 0x22, 0x58, 0x48, 0x35, 0xcb, 0x64, 0xdc, 0xb1, 0xa1, 0x59, 0x30, 0x29, 0x58, 0x85, 0x94, 0x66, 0x5b, 0xe0, 0xf5, 0x68, 0x48, 0xe2, 0x4f, 0x6b, 0xa9, 0x14, 0xd3, 0xac, 0x6d, 0xf6, 0xee, 0x1, 0x9a, 0x43, 0x71, 0xd8, 0xd7, 0xcf, 0xc7, 0x47, 0x33, 0xf2, 0x97, 0x84, 0xef, 0x56, 0xe0, 0x18, 0x36, 0x39, 0xdb, 0xd8, 0xfe, 0x0, 0x1c, 0x63, 0xe8, 0x5f, 0xc3, 0x20, 0x6b, 0x29, 0x9f, 0x1e, 0xc1, 0x3, 0x6d, 0xdd, 0xc0, 0x18, 0x51, 0xd1, 0x89, 0xb5, 0xee, 0x27, 0xe, 0xe5, 0x29, 0x3b, 0x77, 0xab, 0xf4, 0xa4, 0xbc, 0x6f, 0x98, 0x68, 0x14, 0xfc, 0xe, 0xd6, 0x50, 0x11, 0x75, 0x4f, 0x40, 0x30, 0xdd, 0xca, 0x7d, 0xc6, 0x7d, 0x60, 0x51, 0x24, 0x61, 0x36, 0x95, 0x1c, 0xfc, 0xb6, 0xaa, 0xfe, 0x14, 0x5f, 0x5c, 0x14, 0xdf, 0x53, 0x90, 0xb1, 0x5, 0xff, 0x1e, 0xf9, 0xd3, 0x5d, 0x31, 0xec, 0xbb, 0x5, 0xb2, 0xd8, 0x81, 0x40, 0xa7, 0xc6, 0x62, 0xca, 0x6f, 0x58, 0xe2, 0x68, 0x2c, 0xb2, 0x1f, 0x1d, 0xa8, 0x37, 0x19, 0x12, 0x20, 0xe3, 0xb2, 0xdb, 0xf9, 0x25, 0x46, 0xd5, 0x76, 0xe2, 0x77, 0x9, 0xc6, 0x7f, 0xb3, 0xea, 0x8a, 0xb8, 0xb5, 0x3f, 0x39, 0x4c, 0x82, 0x83, 0x4d, 0xd9, 0xfc, 0xb3, 0x17, 0xa1, 0xb5, 0x1d, 0x17, 0x23, 0xbb, 0xda, 0x7a, 0xb5, 0x31, 0x57, 0x78, 0xb2, 0x7a, 0xfa, 0x89, 0xd1, 0x91, 0xf1, 0xa4, 0x7f, 0x8a, 0xe, 0xc, 0x15, 0xe3, 0x3f, 0xb, 0xdf, 0x57, 0x7f, 0x92, 0xef, 0xe3, 0xea, 0xed, 0x65, 0x46, 0xa9, 0x48, 0x72, 0x33, 0xcf, 0x9c, 0x77, 0x55, 0xd, 0x48, 0x2d, 0xa1, 0xb9, 0x9f, 0xb3, 0xb7, 0x21, 0xab, 0x7e, 0xf7, 0x82, 0x65, 0x50, 0xfc, 0x4b, 0xf9, 0x53, 0x42, 0x6b, 0x69, 0xcc, 0xa8, 0x5, 0x49, 0x56, 0x9e, 0x1e, 0xc6, 0xe5, 0x23, 0x82, 0x20, 0x60, 0xb4, 0xcb, 0x8a, 0x88, 0xbc, 0xae, 0x1b, 0x9f, 0x48, 0xe, 0x7, 0x3a, 0x90, 0xe4, 0xcd, 0xbc, 0x8e, 0x60, 0x99, 0x4b, 0x6b, 0x95, 0x3e, 0xd1, 0x53, 0xc9, 0xda, 0x14, 0x6f, 0x4a, 0xc0, 0xd2, 0x3, 0x1, 0x5, 0xbd, 0xee, 0x29, 0x6d, 0xc6, 0xbf, 0xdb, 0xeb, 0xf7, 0x5e, 0x63, 0x53, 0xad, 0xd8, 0x43, 0x30, 0xe8, 0x1, 0x1f, 0x94, 0x83, 0xf8, 0x3a, 0x39, 0xf8, 0xd0, 0x6a, 0x50, 0x96, 0x1a, 0x7, 0x55, 0x7d, 0x4e, 0xd8, 0x3d, 0xbf, 0xd9, 0xe5, 0xcc, 0x43, 0x4f, 0xe, 0xaa, 0x70, 0xd6, 0x9d, 0xe7, 0xd0, 0x34, 0xe3, 0x59, 0xa4, 0x12, 0x86, 0x4d, 0x8b, 0xe2, 0x92, 0xf5, 0x88, 0xd6, 0x7, 0x29, 0x4a, 0x57, 0xcc, 0x3c, 0x50, 0x65, 0x78, 0x1e, 0x11, 0x14, 0x39, 0xa2, 0x3, 0x3d, 0xd6, 0x4b, 0x94, 0xb7, 0x15, 0x5a, 0xa5, 0x65, 0x36, 0x80, 0x45, 0x21, 0x4c, 0x58, 0x8d, 0x3e, 0xbe, 0x4, 0xa0, 0x4b, 0x7f, 0x7d, 0xf5, 0x63, 0xa, 0x46, 0xb, 0xbf, 0xbc, 0x39, 0xde, 0xdd, 0xe1, 0x4d, 0x59, 0xb, 0x2c, 0x79, 0x66, 0x45, 0x4, 0xef, 0x2, 0x7f, 0x4a, 0xc2, 0x27, 0x12, 0xf8, 0xee, 0x8b, 0x43, 0x99, 0xf0, 0x1a, 0x74, 0x18, 0xa8, 0xab, 0x9c, 0xdd, 0xc4, 0xda, 0x64, 0x9f, 0x52, 0x3, 0xa9, 0xca, 0x15, 0xeb, 0x75, 0x80, 0x59, 0xb9, 0x11, 0xb7, 0x43, 0x1e, 0xc0, 0x7a, 0xc5, 0x41, 0xd4, 0xd2, 0xac, 0xbb, 0x3d, 0x67, 0x83, 0x8f, 0x4b, 0xe5, 0x4a, 0x38, 0x77, 0x57, 0xf1, 0xd1, 0x9d, 0x9c, 0xdc, 0xd7, 0xca, 0x1e, 0x5e, 0x6e, 0xdd, 0x25, 0x4, 0x6b, 0xa1, 0x17, 0x84, 0x4d, 0x98, 0x15, 0x30, 0x8, 0x40, 0x1a, 0x83, 0x98, 0x9c, 0x67, 0x88, 0x27, 0x48, 0x52, 0x48, 0x8d, 0x9c, 0x3a, 0x90, 0xa3, 0xc0, 0x93, 0x6d, 0xc0, 0x90, 0x87, 0xa4, 0xdd, 0x6c, 0x8, 0xeb, 0x28, 0x13, 0xcc, 0xdb, 0x49, 0xf1, 0xea, 0x86, 0x80, 0xf6, 0x6d, 0x58, 0xb, 0x10, 0xeb, 0xb3, 0x9, 0x1, 0xc8, 0x32, 0xd8, 0x33, 0xce, 0xd1, 0x9b, 0x52, 0xb4, 0x19, 0xca, 0xcc, 0x1e, 0x1, 0xa6, 0x1d, 0x16, 0x91, 0x33, 0x96, 0xcb, 0xcb, 0xd3, 0x1e, 0xfa, 0xef, 0xcf, 0x1f, 0xda, 0x31, 0x7, 0x2a, 0xf0, 0x8c, 0x1f, 0x12, 0x13, 0x65, 0x8c, 0x4c, 0x6d, 0xd7, 0x64, 0xc, 0xea, 0x2c, 0x2c, 0x41, 0x11, 0xa4, 0xe2, 0xe3, 0x9b, 0x80, 0x6c, 0xdd, 0xdd, 0x6c, 0x60, 0x83, 0xce, 0x78, 0x76, 0xbd, 0x19, 0x64, 0x0, 0xba, 0x7, 0xfb, 0xb9, 0xf6, 0xbe, 0xb7, 0x65, 0x62, 0x81, 0xd9, 0x65, 0x3, 0x17, 0xd8, 0xf2, 0xed, 0xeb, 0x96, 0x2e, 0x62, 0xe3, 0x1f, 0xe7, 0x3d, 0x53, 0x75, 0x9a, 0x35, 0x7d, 0xa4, 0xb8, 0x57, 0x13, 0x37, 0xe3, 0xc7, 0x58, 0x8b, 0x99, 0x86, 0x28, 0xf5, 0x67, 0x90, 0x9c, 0xfb, 0xec, 0x3d, 0x6b, 0xd8, 0x18, 0x21, 0x4f, 0xc7, 0xf0, 0xfe, 0x72, 0x25, 0xe0, 0xf8, 0xab, 0x64, 0xbb, 0x4b, 0xd, 0x74, 0xaa, 0x79, 0xd9, 0x94, 0x5e, 0x56, 0x17, 0x7f, 0xe, 0x81, 0x79, 0x35, 0x52, 0xb5, 0xf2, 0xd7, 0x82, 0x89, 0x30, 0x9e, 0x13, 0x2d, 0x16, 0xfc, 0x74, 0x24, 0x15, 0x51, 0x95, 0xe1, 0xf5, 0xdb, 0x8c, 0xc3, 0x27, 0xb6, 0x50, 0xf2, 0xe3, 0xf1, 0xaf, 0x98, 0x7a, 0xf8, 0x41, 0x49, 0x5, 0x2f, 0x27, 0xa1, 0xda, 0x66, 0x25, 0x1b, 0x8, 0xa5, 0x62, 0xe8, 0xbe, 0x10, 0xe9, 0x2f, 0x97, 0x6c, 0xea, 0x41, 0xcd, 0xa5, 0x31, 0x70, 0x35, 0xdd, 0x78, 0xb3, 0x27, 0xd9, 0xfa, 0xaa, 0xb, 0x3c, 0x89, 0x7c, 0xe1, 0x10, 0x6b, 0x7, 0x46, 0x60, 0x6f, 0xc4, 0xb6, 0xac, 0x5f, 0x35, 0x8d, 0x2f, 0x2e, 0x10, 0xf7, 0x93, 0x8e, 0x5f, 0xef, 0x61, 0xe5, 0x40, 0x18, 0x1b, 0xdc, 0xed, 0x5a, 0x74, 0xd3, 0xae, 0xad, 0x42, 0x7, 0xe1, 0x83, 0x5, 0xa4, 0xee, 0x2e, 0x99, 0x94, 0x35, 0xa7, 0x59, 0x14, 0xf2, 0x12, 0x2, 0xfe, 0x3f, 0x39, 0xc3, 0x9e, 0x5f, 0xac, 0xe4, 0xe3, 0x91, 0x91, 0xb, 0x93, 0x7f, 0xb5, 0xab, 0xe0, 0x43, 0xd6, 0x33, 0x41, 0xe, 0x47, 0xf9, 0x9c, 0xde, 0x9d, 0xb8, 0x50, 0x15, 0xad, 0xcb, 0xdf, 0x48, 0xf4, 0x51, 0x90, 0x19, 0x3a, 0xcf, 0x6e, 0x62, 0x51, 0xe9, 0x9b, 0x65, 0xa5, 0x68, 0x68, 0xcd, 0x24, 0x8f, 0x69, 0x35, 0xaa, 0x9c, 0x67, 0x20, 0xc2, 0x97, 0x9f, 0xb5, 0xa5, 0xd5, 0x4b, 0x45, 0xfe, 0x84, 0xfc, 0xe1}, - output224: []byte{0xe1, 0xcc, 0xc5, 0xe6, 0x57, 0x1c, 0x4, 0xc6, 0x76, 0xf7, 0x2, 0xb5, 0x2f, 0xf5, 0xc5, 0x2b, 0x2a, 0xa4, 0xff, 0x1b, 0x30, 0x76, 0x48, 0x2b, 0x99, 0x76, 0xc9, 0x55}, - output256: []byte{0x26, 0xa, 0xfc, 0xf3, 0x8d, 0xed, 0xd0, 0xa2, 0x3c, 0x5f, 0x75, 0xb4, 0xf0, 0x44, 0xa6, 0x65, 0xfb, 0x64, 0x8b, 0xd7, 0x99, 0x7c, 0x28, 0xe2, 0xd4, 0xdc, 0x6e, 0x64, 0xee, 0x5e, 0x24, 0x20}, - output384: []byte{0x53, 0xc1, 0x19, 0xf, 0x68, 0xf5, 0xad, 0xff, 0x7, 0xe0, 0x51, 0xc7, 0xbc, 0xa8, 0x96, 0x1c, 0x48, 0xe9, 0x76, 0x84, 0xb3, 0xa2, 0x9c, 0xf6, 0xa6, 0x8, 0x23, 0x23, 0x30, 0x0, 0x73, 0x67, 0xcf, 0xb4, 0xe3, 0x9d, 0xd9, 0x3, 0x98, 0xd9, 0x30, 0x3e, 0x1f, 0x85, 0xf5, 0x1d, 0x14, 0x66}, - output512: []byte{0x7b, 0x4d, 0xff, 0x95, 0xfa, 0x73, 0x60, 0xe9, 0xec, 0xa6, 0x86, 0x29, 0x30, 0x3d, 0x9, 0x3f, 0x3c, 0xa9, 0x29, 0x44, 0xf9, 0x91, 0xb0, 0xa7, 0x19, 0xfc, 0xc3, 0x16, 0xf6, 0x57, 0xbb, 0xa3, 0xfa, 0xae, 0xf5, 0xd4, 0x35, 0x68, 0xeb, 0x88, 0x59, 0x1e, 0x86, 0x42, 0x7d, 0xef, 0x6b, 0xd7, 0xc8, 0x8f, 0xc7, 0xdb, 0x27, 0x11, 0x82, 0xee, 0x8c, 0x49, 0x5b, 0xdf, 0x4d, 0xec, 0x74, 0xe8}}, - testcase{ - msg: []byte{0xca, 0xd9, 0xef, 0x7, 0x7a, 0x98, 0xe3, 0xf2, 0xe5, 0x70, 0x6e, 0xbe, 0xc4, 0x96, 0xd, 0x5a, 0x5b, 0x78, 0xb5, 0x7c, 0xc8, 0x1, 0x7d, 0xb1, 0x11, 0x2f, 0x2c, 0x53, 0x70, 0x76, 0x35, 0xc, 0x80, 0x7d, 0x5c, 0xb1, 0x42, 0x1c, 0x23, 0x5a, 0xd2, 0xf8, 0xab, 0xf7, 0xce, 0x90, 0x5c, 0x26, 0xb1, 0x85, 0x66, 0xd8, 0xfd, 0x6a, 0xf4, 0x49, 0x8, 0x26, 0x97, 0x85, 0xe7, 0x89, 0xca, 0xaf, 0xa1, 0x0, 0x2b, 0xea, 0x64, 0xed, 0x46, 0xb1, 0xab, 0xe2, 0xa8, 0x81, 0x2f, 0xfd, 0xf4, 0x0, 0xb1, 0x8a, 0x39, 0xb7, 0x31, 0x4, 0xa, 0x8c, 0x70, 0x3d, 0x83, 0x7e, 0x46, 0x3f, 0x29, 0xd4, 0x21, 0x8c, 0xc4, 0xac, 0xe, 0x38, 0x94, 0x5f, 0x5c, 0x79, 0x26, 0x3d, 0x2e, 0xa8, 0x6a, 0xe5, 0x28, 0x11, 0x72, 0x44, 0x24, 0x64, 0x4e, 0xe2, 0x74, 0xc5, 0x5f, 0xb6, 0xa0, 0x50, 0x78, 0x28, 0x7, 0xf3, 0xdf, 0x60, 0x54, 0x7b, 0xa0, 0x58, 0x46, 0x53, 0x72, 0xc8, 0xa6, 0x64, 0xe8, 0x33, 0xb5, 0x17, 0x6c, 0xed, 0x42, 0xc4, 0x1, 0x77, 0xcd, 0x34, 0x83, 0xe6, 0x36, 0xae, 0x6f, 0xb, 0x9c, 0x7a, 0xab, 0x5d, 0xde, 0x53, 0x9, 0xe5, 0xf3, 0x77, 0xaf, 0x74, 0x31, 0x46, 0x80, 0xa7, 0x2d, 0xc1, 0x8, 0x8a, 0xfb, 0x86, 0x1e, 0x6d, 0x56, 0x4d, 0xb6, 0xdb, 0x6e, 0x6d, 0x3e, 0x66, 0xda, 0x3f, 0x3d, 0x53, 0x96, 0x16, 0x40, 0x8d, 0x7b, 0x7, 0x27, 0xcd, 0xb9, 0x24, 0xbb, 0xa3, 0x8c, 0x3b, 0xd5, 0xeb, 0xb8, 0x23, 0xe7, 0xf4, 0x41, 0xd2, 0x56, 0x7f, 0xb3, 0x6d, 0x31, 0x31, 0x3c, 0x58, 0x34, 0x15, 0x4a, 0xbe, 0x16, 0x23, 0x72, 0x34, 0x49, 0xfa, 0x83, 0x24, 0xc8, 0x5a, 0x14, 0x9e, 0xd1, 0xeb, 0x86, 0x87, 0xbe, 0xe, 0x8a, 0x6c, 0x7, 0x52, 0x7b, 0xc0, 0xd9, 0x28, 0x26, 0x51, 0xcf, 0x36, 0xd5, 0x59, 0x6e, 0x1e, 0x7, 0x48, 0x91, 0x31, 0xac, 0x3c, 0x71, 0xb7, 0x55, 0x13, 0xac, 0x3a, 0xce, 0xe7, 0xcf, 0x90, 0x98, 0xd1, 0xd5, 0xc7, 0x10, 0xd3, 0x1a, 0x80, 0xb2, 0xa6, 0x3, 0x7b, 0x37, 0x22, 0x88, 0x10, 0xb8, 0x85, 0x16, 0xb, 0x76, 0x42, 0x23, 0xd4, 0xb0, 0x16, 0x48, 0xc, 0xc9, 0x83, 0x5a, 0x69, 0x5d, 0xec, 0x0, 0x13, 0xe9, 0xe0, 0x64, 0xc0, 0x83, 0x4b, 0x58, 0xc, 0x25, 0x4c, 0x6f, 0x4, 0x68, 0x9d, 0xf, 0xf8, 0xc, 0x69, 0x99, 0x88, 0x2c, 0xe2, 0xae, 0x5b, 0x4d, 0x8f, 0x1, 0xcd, 0xc5, 0xc2, 0x72, 0x88, 0x90, 0xc7, 0xc7, 0x95, 0xb1, 0xc, 0x5b, 0x7e, 0x1, 0xad, 0x20, 0x54, 0xe7, 0x50, 0x78, 0x3d, 0x4d, 0xaf, 0xa6, 0x77, 0xce, 0xf7, 0xca, 0x61, 0x41, 0xb0, 0xc5, 0xfc, 0x6e, 0x5f, 0xc3, 0x8b, 0xd, 0x1a, 0xe0, 0x88, 0xb1, 0x6a, 0x2, 0xc3, 0x1f, 0xfe, 0x24, 0x2a, 0xfa, 0x42, 0x64, 0xc2, 0x1d, 0x4a, 0xad, 0xee, 0x3f, 0xe6, 0xb3, 0xf4, 0x3a, 0xfd, 0x38, 0xfc, 0x55, 0x4b, 0xf1, 0x68, 0xc4, 0x33, 0x1a, 0x38, 0x85, 0x8, 0xad, 0xb6, 0x6a, 0x12, 0xb8, 0x5a, 0xf2, 0x5, 0xe6, 0xf2, 0xa6, 0x0, 0xc, 0x7f, 0x22, 0x2b, 0x5e, 0x3e, 0x32, 0x6a, 0xe9, 0xe5, 0x72, 0x95, 0x63, 0x30, 0x57, 0x5a, 0x7, 0x71, 0x3e, 0xe3, 0x2f, 0x42, 0x78, 0x78, 0xa6, 0x21, 0x46, 0x81, 0xb, 0x85, 0x48, 0x3f, 0x10, 0x36, 0x37, 0x22, 0x27, 0x9a, 0xf7, 0x12, 0x90, 0xe5, 0x8f, 0xd7, 0xda, 0x3c, 0x79, 0xc8, 0xfa, 0x3, 0x78, 0x64, 0x84, 0x23, 0xe1, 0x8f, 0x2b, 0xc4, 0x64, 0x9e, 0x8e, 0xba, 0xc7, 0xe2, 0x8a, 0xb3, 0xf8, 0xd1, 0xab, 0x64, 0x75, 0x7, 0x91, 0xfa, 0x91, 0x58, 0xb0, 0xc9, 0x26, 0x1b, 0x2d, 0xa1, 0xa8, 0x17, 0x4f, 0x50, 0x2, 0xaa, 0xfa, 0xca, 0x12, 0x2e, 0xb2, 0x85, 0x78, 0x51, 0xde, 0x26, 0x27, 0x8f, 0x59, 0x4b, 0x59, 0x64, 0x6b, 0x3b, 0x2f, 0x6b, 0x51, 0xa4, 0x1, 0x1d, 0xed, 0x61, 0x88, 0xee, 0x52, 0xd6, 0x43, 0x11, 0xdb, 0x7e, 0x50, 0xdd, 0x81, 0x97, 0xea, 0x1, 0x87, 0xef, 0x0, 0xf0, 0x41, 0x1d, 0x50, 0x1e, 0x5d, 0x1b, 0xe9, 0x46, 0xe3, 0x16, 0x3, 0x24, 0x27, 0x57, 0xb2, 0x8f, 0x3d, 0x5, 0xcf, 0x17, 0x44, 0xd6, 0x2c, 0xed, 0x24, 0x36, 0x65, 0x66, 0xdd, 0x16, 0xa3, 0xf8, 0xf3, 0xdd, 0x4d, 0x52, 0xd7, 0xfc, 0x89, 0x1a, 0x31, 0xe8, 0x3e, 0xe8, 0x3, 0x8d, 0xd7, 0x8a, 0xfe, 0xa8, 0x4e, 0xc8, 0x89, 0x69, 0x58, 0x39, 0x7a, 0xa7, 0xab, 0xa0, 0x5, 0x6d, 0xb3, 0xb1, 0x6a, 0x4, 0xa2, 0x2, 0x3a, 0xf6, 0x7a, 0x19, 0x48, 0xdc, 0xba, 0xd4, 0xa0, 0xa5, 0x37, 0x64, 0x75, 0xa3, 0x20, 0x37, 0x11, 0x94, 0x91, 0x9c, 0x93, 0x9f, 0x4e, 0x63, 0x97, 0x1b, 0xca, 0xdd, 0xc3, 0x44, 0x79, 0x9a, 0xaa, 0x15, 0x14, 0x34, 0xd2, 0xa5, 0xc4, 0x2, 0xd0, 0x2d, 0x4c, 0xcc, 0x29, 0xec, 0xb1, 0xbc, 0x40, 0xb2, 0x97, 0xd9, 0xbf, 0x72, 0xaa, 0x9, 0xca, 0x9d, 0xd2, 0xcc, 0x52, 0x68, 0xf2, 0xc3, 0xf4, 0x9e, 0x10, 0xfb, 0xe4, 0x73, 0x3e, 0xe8, 0x36, 0x47, 0xb9, 0xef, 0xc1, 0xf5, 0x9b, 0xb9, 0xf7, 0xd8, 0xe2, 0xbd, 0xdf, 0xce, 0x71, 0x7c, 0xb1, 0xaf, 0xe7, 0xdf, 0x9f, 0xfe, 0x8b, 0x4a, 0x7b, 0xc7, 0x93, 0x71, 0xb7, 0x4f, 0x1a, 0x3, 0x8c, 0x9c, 0x4f, 0xb8, 0xb7, 0xb1, 0xee, 0xfd, 0x38, 0x98, 0x8b, 0xd5, 0x91, 0xdd, 0x28, 0x17, 0xe1, 0x9e, 0x9d, 0x6c, 0x52, 0xb5, 0x22, 0xe9, 0xd, 0xcd, 0x89, 0xc7, 0xd, 0x3e, 0xed, 0x91, 0xb1, 0x28, 0x6c, 0x38, 0x91, 0xd5, 0x46, 0xf4, 0xe1, 0x98, 0xbf, 0xb3, 0x85, 0x55, 0x4e, 0x88, 0x2a, 0xde, 0x7, 0xaa, 0xaa, 0x45, 0x59, 0xad, 0x51, 0x7c, 0x5c, 0xd7, 0xce, 0xa7, 0xcc, 0x65, 0x9b, 0xea, 0xf8, 0x21, 0x47, 0x16, 0xed, 0x9d, 0x75, 0xd, 0x38, 0x23, 0x89, 0xee, 0x8a, 0xb7, 0xc3, 0xc8, 0xaa, 0xc4, 0x89, 0x68, 0x22, 0x0, 0x27, 0xed, 0xe8, 0x5f, 0x93, 0x90, 0x98, 0xfd, 0x67, 0x9d, 0x97, 0x86, 0x59, 0x26, 0xf1, 0x20, 0xd8, 0xa9, 0xa3, 0x60, 0x42, 0x9c, 0xf0, 0xa, 0x7c, 0x1d, 0xef, 0x83, 0x6a, 0x99, 0x33, 0x65, 0x5a, 0xbc, 0xb3, 0x84, 0xe9, 0xf6, 0x30, 0xb4, 0x16, 0x3f, 0x20, 0x42, 0x38, 0xe9, 0xa3, 0x8e, 0xd9, 0x49, 0xaf, 0x36, 0xf5, 0x20, 0x4b, 0x74, 0xdc, 0xc4, 0x52, 0x66, 0xf8, 0x9a, 0xf9, 0xe, 0x6d, 0xb2, 0xc9, 0x48, 0xe7, 0xd7, 0x73, 0xd7, 0x2e, 0x65, 0x3d, 0x35, 0xc8, 0x48, 0xc7, 0x79, 0x36, 0xe6, 0xe6, 0x89, 0xf7, 0x5d, 0xd7, 0x8e, 0xc2, 0x75, 0x4e, 0x2, 0xfb, 0xe1, 0x19, 0xc5, 0x72, 0x88, 0x5b, 0xf0, 0x90, 0xb0, 0x4a, 0x43, 0x90, 0xbc, 0x7d, 0x59, 0x83, 0x80, 0x9e, 0x5a, 0xc7, 0xe4, 0xa1, 0x6f, 0x6a, 0xd0, 0x23, 0xc8, 0xb2, 0x8e, 0x6b, 0x1, 0x59, 0x1b, 0xf, 0xab, 0x80, 0xdf, 0xf9, 0xe1, 0x30, 0xd, 0xe1, 0x1b, 0xe3, 0x16, 0x8b, 0xa2, 0xf1, 0x69, 0x1e, 0x6c, 0xb7, 0xc4, 0x16, 0xc3, 0x20, 0x1f, 0xae, 0x3f, 0x17, 0x19, 0x75, 0xba, 0xcd, 0xff, 0xa5, 0x20, 0x57, 0x1f, 0x51, 0x8f, 0xd8, 0x47, 0x75, 0x53, 0xbe, 0x92, 0x53, 0x9a, 0xe, 0xcc, 0x5f, 0xfc, 0x16, 0x10, 0x43, 0x13, 0x9c, 0xbf, 0xa3, 0x56, 0x73, 0xf7, 0x19, 0x49, 0xff, 0xbd, 0xa6, 0x46, 0x93, 0xa0, 0x32, 0xcd, 0xe6, 0xa3, 0x44, 0x32, 0xcc, 0x77, 0x36, 0xf1, 0x85, 0x6b, 0x4d, 0xaf, 0x68, 0xd3, 0x93, 0x69, 0x32, 0x77, 0x44, 0x35, 0x5a, 0xfb, 0x6a, 0x4e, 0x89, 0xb8, 0x2e, 0x5b, 0xbb, 0x1d, 0x53, 0xb5, 0xec, 0xd1, 0xeb, 0xbc, 0xa2, 0x5f, 0x6b, 0x51, 0xf1, 0xb0, 0x7, 0x6c, 0x34, 0x6, 0x86, 0x76, 0xb2, 0xb8, 0x79, 0xc1, 0x3f, 0x64, 0xd9, 0x1b, 0x27, 0x7f, 0xc8, 0x2e, 0xad, 0x74, 0x20, 0xf2, 0x49, 0x7b, 0x86, 0xc9, 0xfe, 0xb5, 0x34, 0x1a, 0xa5, 0x53, 0xc7, 0x91, 0x6e, 0xbe, 0x66, 0x20, 0xde, 0x18, 0xeb, 0xa7, 0xf4, 0x53, 0x88, 0x3a, 0x6e, 0x8a, 0x3, 0x7c, 0x31, 0x4e, 0xc1, 0x59, 0x86, 0x91, 0x32, 0xe1, 0x85, 0x69, 0x43, 0xca, 0x6d, 0xa2, 0x41, 0x18, 0x30, 0xd6, 0xaf, 0x83, 0x54, 0x34, 0x6a, 0xcb, 0x6, 0x57, 0x8c, 0xe8, 0x9e, 0x27, 0x7e, 0x26, 0x19, 0x59, 0x63, 0x30, 0x47, 0x6e, 0xe1, 0xb8, 0xa1, 0xec, 0xd2, 0x8e, 0x20, 0x1c, 0x6, 0x5b, 0xc3, 0xe, 0xce, 0x1f, 0xee, 0xe5, 0xe7, 0xae, 0x18, 0x2e, 0xfa, 0x8d, 0x3, 0x10, 0xeb, 0x73, 0x1c, 0x30, 0xca, 0x71, 0x84, 0xd6, 0xe9, 0xf3, 0xc9, 0xcf, 0x8, 0xef, 0x2b, 0x2e, 0x63, 0xcc, 0xb3, 0x69, 0xa3, 0x6a, 0xd6, 0x32, 0x7, 0xdd, 0xe3, 0xcc, 0xb0, 0x4d, 0xe3, 0x41, 0xb5, 0xd0, 0x93, 0xa0, 0xa1, 0x40, 0xaa, 0xa, 0x8d, 0xbe, 0x81, 0x1f, 0x3, 0x11, 0x4b, 0x23, 0x5f, 0x7, 0x49, 0x9e, 0x62, 0x2e, 0xbe, 0xc3, 0x95, 0x21, 0xfa, 0xc6, 0x71, 0x18, 0x3f, 0x7, 0x98, 0xac, 0x50, 0x91, 0x9d, 0x26, 0x9, 0x41, 0x41, 0x58, 0x32, 0xb1, 0xc5, 0x68, 0x6d, 0x7c, 0x27, 0xa7, 0xa5, 0xd0, 0xe6, 0x22, 0x2a, 0x99, 0x1e, 0x34, 0x1c, 0x9a, 0x8b, 0x10, 0xa7, 0x6e, 0x1, 0xe7, 0x9b, 0x1e, 0x7a, 0xc, 0x18, 0x22, 0x7a, 0x39, 0x7, 0x9d, 0x50, 0xf5, 0xee, 0x94, 0xb1, 0x8b, 0x62, 0xc5, 0x1a, 0xc3, 0x66, 0x50, 0xed, 0x3a, 0xdf, 0xe1, 0x42, 0xba, 0x5a, 0x34, 0xa8, 0x39, 0x44, 0x95, 0x99, 0x35, 0x5d, 0x4a, 0xc9, 0x54, 0x2b, 0x14, 0x61, 0x56, 0xbe, 0x4f, 0xc4, 0xdb, 0xfd, 0xd1, 0xc, 0xb8, 0xdd, 0x15, 0xd0, 0xc5, 0x1a, 0xb2, 0x3a, 0xb1, 0x9c, 0x16, 0x50, 0xf, 0x77, 0x6, 0x93, 0xc9, 0x4e, 0xf6, 0x1d, 0xf2, 0x6d, 0xa4, 0x3a, 0x9, 0xb0, 0xd, 0x4e, 0xb7, 0x20, 0x6e, 0x93, 0x25, 0xcd, 0x66, 0x78, 0xa, 0xb4, 0x7a, 0x7e, 0x95, 0xb5, 0xd, 0xf4, 0x23, 0xc4, 0x7, 0x67, 0x22, 0x9d, 0xf1, 0xdd, 0x41, 0xa8, 0x8, 0xfa, 0x70, 0xda, 0x64, 0x77, 0x1f, 0xb9, 0x1b, 0x5f, 0x6f, 0x76, 0x87, 0x27, 0x59, 0xa8, 0xcb, 0x77, 0xfd, 0xa8, 0x7e, 0x2f, 0x2d, 0x7f, 0x3, 0xb, 0x9c, 0xdb, 0x45, 0x60, 0x5, 0xdb, 0x9a, 0x88, 0xd0, 0xf2, 0x7d, 0x47, 0x96, 0x80, 0x3b, 0xd5, 0x70, 0x44, 0xf, 0xd0, 0xb7, 0xe9, 0x9c, 0x3d, 0x8, 0xfd, 0x8e, 0x60, 0x3c, 0x92, 0x9, 0x8a, 0xa4, 0x15, 0xd, 0x5a, 0x87, 0xc2, 0x91, 0x7c, 0xd7, 0x50, 0xbf, 0x0, 0x77, 0xe9, 0xd7, 0x1c, 0x43, 0xf5, 0xbd, 0x3d, 0xab, 0x91, 0x9c, 0x23, 0xe1, 0x6b, 0xb9, 0x5, 0x37, 0xe7, 0xfe, 0x69, 0x4a, 0x84, 0x7e, 0xe8, 0x43, 0xdf, 0x4c, 0x82, 0x62, 0xd4, 0x4c, 0x39, 0xbc, 0xe4, 0xd9, 0xc4, 0x90, 0x69, 0xb2, 0x13, 0xf1, 0x7, 0x44, 0x53, 0xec, 0x66, 0xea, 0x5, 0x48, 0x33, 0xfb, 0xdb, 0x72, 0xb8, 0x11, 0x61, 0xdb, 0xa4, 0x24, 0x39, 0x4, 0x13, 0xdb, 0xcf, 0x96, 0xcb, 0xd5, 0x6a, 0x35, 0xfc, 0xe6, 0x51, 0xd, 0xdc, 0x2b, 0xd9, 0x29, 0x6f, 0x7c, 0xd2, 0xf7, 0x47, 0x4f, 0x86, 0xfe, 0x24, 0xcd, 0x61, 0xc9, 0x66, 0x5c, 0xee, 0x25, 0x14, 0x20, 0xc0, 0xa0, 0xd1, 0xf5, 0x6f, 0x9f, 0xb0, 0x6c, 0x83, 0xff, 0xdf, 0xcf, 0x3, 0x4a, 0x5c, 0x27, 0xb8, 0xc6, 0x89, 0x35, 0xc4, 0xb2, 0xab, 0xd2, 0xfb, 0x92, 0xd5, 0x70, 0xf1, 0xfb, 0x61, 0xb, 0x3f, 0xf4, 0xf6, 0x6a, 0x31, 0x10, 0xa7, 0xa0, 0xb8, 0x9c, 0x7, 0x19, 0x1b, 0xd5, 0x92, 0x8a, 0x39, 0xd5, 0x79, 0x19, 0x16, 0x33, 0xb9, 0x6f, 0x11, 0x23, 0xe5, 0x53, 0x59, 0x53, 0xf0, 0xd2, 0x5d, 0x28, 0x67, 0x5f, 0x5d, 0xde, 0xe3, 0x1f, 0xf2, 0xb6, 0xe1, 0x3f, 0xf2, 0x1a, 0x2d, 0xb1, 0x99, 0xf, 0x4e, 0xa8, 0xd0, 0xab, 0x5d, 0x4a, 0x73, 0xaf, 0x9a, 0x41, 0xd5, 0xff, 0x8b, 0x14, 0x67, 0xa1, 0x1c, 0xd2, 0x97, 0xec, 0x41, 0x6f, 0x44, 0x8c, 0x5b, 0xd, 0x77, 0xdf, 0x8d, 0x2, 0xe6, 0x88, 0xa, 0x7d, 0xca, 0x28, 0x30, 0x54, 0xbe, 0xaf, 0x1f, 0xb9, 0x86, 0xac, 0xbf, 0x83, 0x8b, 0x68, 0xa3, 0x2c, 0x6a, 0x4d, 0xfd, 0x9, 0x7c, 0x9f, 0xc9, 0x98, 0xfa, 0x13, 0xe3, 0x82, 0x39, 0x96, 0x77, 0xcc, 0x94, 0x7a, 0xf6, 0xe4, 0xca, 0x5b, 0x37, 0xbd, 0xbd, 0xe3, 0x94, 0xb8, 0x95, 0x82, 0xc0, 0x4b, 0xd0, 0x5d, 0xc7, 0xc0, 0x40, 0x38, 0xc6, 0x26, 0xc5, 0xb7, 0x27, 0x88, 0x18, 0x9f, 0xc0, 0x17, 0x99, 0xa4, 0xca, 0x3, 0xa1, 0xe6, 0x5c, 0x74, 0x4f, 0x6c, 0x48, 0x93, 0xb1, 0x9d, 0x27, 0x49, 0x70, 0x9b, 0x23, 0xaf, 0x92, 0x59, 0x20, 0x44, 0x22, 0x4a, 0xba, 0x18, 0xe1, 0x5, 0x28, 0x20, 0x25, 0xd, 0xc, 0x35, 0xcf, 0x8d, 0x76, 0xe5, 0x1c, 0x73, 0xc9, 0x43, 0x86, 0xc6, 0xe0, 0xf1, 0x47, 0xc7, 0x70, 0xec, 0x37, 0x99, 0x76, 0xb5, 0x74, 0xef, 0x2e, 0xc6, 0xd6, 0x8c, 0x39, 0xff, 0x2c, 0x28, 0x7f, 0xe5, 0x14, 0x9f, 0x71, 0x49, 0x7e, 0x1a, 0xbf, 0x7, 0x17, 0x6b, 0x2, 0x4e, 0x40, 0x84, 0x79, 0xbb, 0x7b, 0x56, 0xb3, 0x73, 0x36, 0x7d, 0x40, 0xa5, 0xbd, 0x8, 0xaa, 0x38, 0xbc, 0xfc, 0xcc, 0x70, 0x55, 0x31, 0xd2, 0x98, 0x4c, 0xd3, 0x86, 0xf0, 0xf4, 0x7f, 0x8, 0x64, 0xe0, 0xd, 0x75, 0x8e, 0xec, 0x1b, 0xa0, 0xed, 0x9, 0x71, 0xa0, 0xa2, 0xa8, 0x4e, 0xec, 0x66, 0x3f, 0x19, 0x83, 0x26, 0xaa, 0x62, 0xf9, 0x31, 0xda, 0xab, 0xe3, 0x81, 0xde, 0xa6, 0x92, 0xa7, 0xc4, 0x34, 0x25, 0xd5, 0x4a, 0xcd, 0x99, 0xe2, 0xff, 0x5b, 0x74, 0x64, 0xf5, 0xbb, 0x79, 0x4d, 0x20, 0x9, 0x3, 0x5c, 0xa9, 0xff, 0x72, 0x1b, 0x1b, 0x44, 0x94, 0xcd, 0x8c, 0xc5, 0xcc, 0xa9, 0x95, 0x76, 0x60, 0xf2, 0x9b, 0x77, 0xdd, 0xf1, 0x73, 0xd7, 0x8a, 0xc5, 0x6b, 0x36, 0xaa, 0xc5, 0xe2, 0x83, 0x74, 0xc3, 0x82, 0x53, 0xb2, 0x2e, 0x16, 0xbd, 0xb9, 0x3e, 0x4c, 0xbd, 0xf9, 0xf0, 0xe8, 0x54, 0xea, 0x1d, 0x79, 0x98, 0x3f, 0x8f, 0x9c, 0xf6, 0xd2, 0x5d, 0xda, 0xa7, 0x64, 0x80, 0x55, 0x35, 0x4a, 0x8c, 0xea, 0x37, 0x2b, 0xa5, 0x4e, 0xef, 0xca, 0x4c, 0xd0, 0x40, 0xd3, 0xea, 0xdd, 0x23, 0xb8, 0x9a, 0xb6, 0x4c, 0x54, 0x5b, 0x74, 0x62, 0xd2, 0xd6, 0xd2, 0xd2, 0x49, 0xa9, 0x19, 0x70, 0x3b, 0xcc, 0xbe, 0xa4, 0x71, 0x25, 0x1d, 0x36, 0xa1, 0xa2, 0x7b, 0xf0, 0xfd, 0x65, 0x3f, 0x5f, 0x1d, 0x84, 0x90, 0x58, 0x6d, 0x95, 0x68, 0xaa, 0xb1, 0x41, 0x38, 0x3b, 0x18, 0x66, 0x30, 0xa2, 0x70, 0xbc, 0x7d, 0x2a, 0x8a, 0x29, 0x9b, 0x4c, 0x90, 0xbb, 0x22, 0xfd, 0xf0, 0x8c, 0x30, 0xb2, 0x74, 0x5d, 0xbe, 0x6d, 0x6a, 0xe7, 0xde, 0xc9, 0xbf, 0xd1, 0x12, 0xf5, 0x61, 0x1a, 0x83, 0xf9, 0xde, 0xff, 0x40, 0x83, 0x46, 0xdd, 0x62, 0xf7, 0x5d, 0xe0, 0x5, 0x50, 0xf6, 0xe5, 0x6b, 0x3f, 0x9f, 0x9b, 0x80, 0xd7, 0x2, 0x7a, 0xc, 0x7b, 0xf6, 0x30, 0x6a, 0xca, 0x15, 0x99, 0x72, 0xf2, 0xae, 0x43, 0x34, 0x69, 0x85, 0xa4, 0x60, 0x1b, 0x48, 0x17, 0x22, 0xea, 0xbf, 0x37, 0x86, 0x69, 0x6f, 0x96, 0x23, 0xe1, 0x36, 0x6f, 0x93, 0xdc, 0x58, 0x57, 0x58, 0xfe, 0x8f, 0x24, 0x5e, 0x82, 0x21, 0x1e, 0xf9, 0x84, 0xbd, 0x31, 0xdc, 0xc9, 0xfc, 0x7d, 0x7c, 0xec, 0xd0, 0x99, 0xda, 0xc9, 0xe4, 0x5c, 0xbe, 0x65, 0x5d, 0xac, 0xd6, 0x87, 0xa8, 0x48, 0xf5, 0x33, 0x53, 0xd7, 0xbc, 0x1d, 0x68, 0x10, 0x3d, 0x4c, 0x8c, 0x74, 0xc, 0x91, 0xb6, 0x95, 0x17, 0xb1, 0x64, 0xf4, 0x7e, 0xd7, 0x18, 0xe5, 0x26, 0x87, 0x75, 0x7a, 0x51, 0xf0, 0x86, 0xa4, 0xdd, 0xef, 0x8e, 0xa4, 0xc8, 0x58, 0x58, 0xd, 0x6e, 0xb8, 0x6, 0x4a, 0x4, 0x45, 0x34, 0xe2, 0x77, 0xa7, 0xdd, 0x59, 0x75, 0xaf, 0x13, 0xef, 0x5c, 0x43, 0x6, 0x6e, 0xa2, 0x69, 0x2, 0xe7, 0xa3, 0x6d, 0xf3, 0x95, 0xf2, 0x49, 0x5e, 0xd4, 0x31, 0x1c, 0x37, 0x36, 0xe9, 0x14, 0x50, 0x65, 0x8, 0x43, 0xa1, 0x82, 0x8f, 0xee, 0xb4, 0x2e, 0x6b, 0xd5, 0xa0, 0x5d, 0xf, 0xe4, 0xaf, 0x8d, 0x7a, 0x54, 0x34, 0x63, 0x3, 0x8b, 0xcc, 0x3d, 0x31, 0xa5, 0x89, 0x10, 0x80, 0x38, 0xdc, 0xff, 0xc8, 0xc7, 0xa3, 0xcb, 0x86, 0xc5, 0x7c, 0xed, 0x3a, 0x1e, 0x3e, 0x22, 0x35, 0x7c, 0xba, 0xca, 0x32, 0x8e, 0xbe, 0x1d, 0xbd, 0x16, 0xc1, 0xb8, 0x82, 0xfb, 0x0, 0x9a, 0x69, 0x7c, 0x1e, 0xfe, 0xb3, 0xef, 0xca, 0x0, 0x77, 0x53, 0xdd, 0xc5, 0x1f, 0x6e, 0x7d, 0xa8, 0x90, 0xb, 0x3a, 0x37, 0x31, 0x2e, 0xbb, 0xf4, 0x1c, 0xa, 0x7e, 0xcf, 0x23, 0xc3, 0x92, 0x13, 0xfc, 0x8a, 0x23, 0xc2, 0xc5, 0xee, 0x6d, 0x78, 0x3a, 0x1b, 0x65, 0x20, 0xb0, 0x7f, 0xf7, 0x47, 0xa1, 0x43, 0xf6, 0xa8, 0xdc, 0x51, 0x22, 0x9, 0xc3, 0x7a, 0xdb, 0xed, 0x27, 0x6d, 0xe1, 0x3c, 0x5c, 0xa2, 0x7f, 0xf7, 0xa5, 0x95, 0x54, 0x5c, 0x2, 0x4b, 0x11, 0xf5, 0xee, 0xfe, 0xdc, 0xbf, 0x61, 0xd9, 0x2e, 0xc0, 0xa1, 0x7, 0xbd, 0x1c, 0xa0, 0x9, 0x34, 0x61, 0x89, 0x27, 0xda, 0x45, 0xc, 0x94, 0xf, 0x6d, 0xab, 0x1c, 0x18, 0xb, 0x29, 0xe7, 0x2c, 0xe, 0x87, 0x9, 0x62, 0x7e, 0x51, 0xe9, 0x16, 0x32, 0xc3, 0x64, 0xfe, 0x45, 0xfb, 0xda, 0xe4, 0x3a, 0xb8, 0x76, 0xd3, 0x30, 0x0, 0xfb, 0x1a, 0xb4, 0x37, 0xd4, 0x99, 0xb3, 0x32, 0x50, 0xd7, 0x5a, 0x1d, 0x23, 0x19, 0x2a, 0x55, 0xf8, 0x13, 0x85, 0x9c, 0xb6, 0x93, 0x77, 0x3d, 0xdd, 0xe6, 0x16, 0xe5, 0x57, 0xe, 0x75, 0x31, 0x28, 0x57, 0x2b, 0xc1, 0x19, 0xa4, 0x69, 0x51, 0xc8, 0x6f, 0x99, 0xb3, 0xf9, 0x31, 0x41, 0x6c, 0x3, 0x47, 0xd9, 0x5d, 0x5a, 0x6b, 0xe5, 0x2, 0xc3, 0xc8, 0xf6, 0x96, 0xee, 0x2, 0x6c, 0x3e, 0x66, 0xe4, 0xf0, 0xa3, 0x84, 0x7a, 0xa4, 0x98, 0x15, 0xcf, 0x40, 0xc9, 0x2, 0xba, 0x79, 0xec, 0x7c, 0x4e, 0x3d, 0x82, 0xee, 0x14, 0xc, 0x8c, 0x9, 0xf7, 0x3e, 0xba, 0xac, 0xb, 0x5c, 0xa1, 0x17, 0x23, 0xb0, 0x87, 0x93, 0xfe, 0x17, 0xdf, 0xf3, 0xef, 0xca, 0xc0, 0xc5, 0x76, 0xd8, 0xf5, 0xd9, 0x69, 0x9b, 0x74, 0x18, 0x61, 0xe6, 0xe2, 0xe9, 0x77, 0xa}, - output224: []byte{0xfd, 0x1, 0xd3, 0x42, 0xd2, 0x1, 0xaf, 0x1, 0x2a, 0xd2, 0xc, 0xd5, 0x86, 0x30, 0xdf, 0x41, 0x12, 0xec, 0xcf, 0xe4, 0xcf, 0x2e, 0x87, 0x26, 0x28, 0xd9, 0xfb, 0x80}, - output256: []byte{0xa0, 0x20, 0xf8, 0xf6, 0x46, 0x48, 0x53, 0xc4, 0x64, 0x91, 0xd1, 0x7d, 0xe7, 0x6e, 0xd9, 0x81, 0x57, 0xe, 0x18, 0x20, 0x57, 0xea, 0x64, 0xbf, 0xc4, 0xc9, 0x88, 0xae, 0x58, 0x1b, 0xb8, 0x9e}, - output384: []byte{0xad, 0x99, 0xc9, 0x7f, 0xc, 0xa5, 0xa5, 0x68, 0xf, 0x2a, 0x89, 0x5f, 0xf7, 0x9e, 0xa0, 0x9a, 0x42, 0x20, 0xdc, 0x74, 0x28, 0xdd, 0x5e, 0x78, 0x8, 0x1b, 0xc5, 0x4c, 0x7a, 0x49, 0xa4, 0xde, 0x4f, 0x1, 0x83, 0x61, 0x3, 0x88, 0x28, 0x7e, 0xa0, 0xde, 0x88, 0xa, 0xc6, 0xea, 0xbe, 0xfa}, - output512: []byte{0xf2, 0x9c, 0x92, 0xba, 0x7a, 0xe0, 0x87, 0xbf, 0x53, 0x51, 0x26, 0xed, 0x9c, 0xe3, 0x18, 0x58, 0xbb, 0xf5, 0xcc, 0x7, 0xf7, 0x38, 0xfa, 0x68, 0x62, 0x91, 0xaf, 0x9c, 0xb4, 0x76, 0x39, 0xc7, 0xf5, 0xd, 0x6e, 0xa5, 0xa2, 0x11, 0xfd, 0xbd, 0xa7, 0x3d, 0xd9, 0x9f, 0xea, 0x7a, 0xdf, 0x79, 0xa8, 0xbd, 0xfb, 0xbb, 0x5b, 0x47, 0xe3, 0x4, 0x59, 0x37, 0xfa, 0xda, 0xfa, 0x55, 0x3b, 0x36}}, - testcase{ - msg: []byte{0x19, 0x26, 0x32, 0xfd, 0xde, 0x8f, 0x5d, 0x5c, 0x75, 0xb3, 0x1a, 0x51, 0xa9, 0x41, 0xb6, 0x9d, 0x80, 0xe5, 0xb6, 0xa5, 0xa0, 0x5f, 0xcb, 0xeb, 0xd9, 0xb8, 0xbe, 0x91, 0x2e, 0xbe, 0xde, 0x89, 0x35, 0xcd, 0x45, 0xc6, 0x3a, 0xaa, 0xcb, 0x84, 0x5e, 0x84, 0x33, 0xc6, 0xc3, 0xa2, 0xb4, 0xa2, 0xa0, 0x82, 0x20, 0x1, 0x1, 0x86, 0x11, 0xce, 0x54, 0xe8, 0xb1, 0x4, 0x5d, 0xd, 0x4a, 0xb4, 0x5f, 0xe0, 0x87, 0x14, 0x75, 0x4f, 0xc6, 0xb8, 0xc7, 0x10, 0x4, 0x33, 0x5f, 0x36, 0x15, 0x53, 0x4e, 0xfa, 0xc, 0x19, 0xee, 0xb0, 0x6d, 0xea, 0x36, 0x12, 0xda, 0xe6, 0x7f, 0x40, 0xd2, 0xee, 0x6a, 0xfd, 0xfb, 0x11, 0x9e, 0x1d, 0x87, 0xf2, 0x34, 0xf3, 0x80, 0xb8, 0xd7, 0xe2, 0xf4, 0x4f, 0x5c, 0xf2, 0x8f, 0xae, 0x69, 0x98, 0xec, 0x8d, 0xd6, 0x38, 0x10, 0x33, 0xad, 0x37, 0x9, 0xea, 0xea, 0xd1, 0xeb, 0xc3, 0xa5, 0x1a, 0x3b, 0xb5, 0x34, 0xdd, 0xfc, 0x16, 0x97, 0xbc, 0x49, 0xd9, 0xd9, 0xf0, 0xc2, 0xe0, 0x6e, 0xda, 0xc9, 0xb6, 0x6c, 0x49, 0x25, 0x0, 0xbd, 0x80, 0xc2, 0x5c, 0x38, 0x3c, 0x2b, 0xcc, 0x8, 0x2e, 0xb6, 0xe6, 0xda, 0x4f, 0x1c, 0x2c, 0x41, 0x49, 0xcd, 0x3b, 0xf8, 0x49, 0x57, 0xb8, 0x36, 0x12, 0xb3, 0x35, 0x1d, 0x27, 0x7, 0x54, 0x9, 0x5, 0x2, 0x4, 0x4e, 0x2e, 0x81, 0xd8, 0x23, 0x64, 0x12, 0xa6, 0x90, 0x5f, 0x96, 0x52, 0x8c, 0xb0, 0xc4, 0x37, 0x60, 0xc3, 0x28, 0x9, 0x52, 0x7a, 0x85, 0x72, 0x9a, 0x3c, 0x3b, 0x15, 0x1f, 0xe, 0xdf, 0x53, 0x73, 0x3, 0x68, 0xb6, 0xe8, 0x44, 0xe1, 0xe0, 0x95, 0x24, 0xcd, 0xa2, 0x22, 0xe7, 0x28, 0x4d, 0xdc, 0xf3, 0x7e, 0x1, 0xe4, 0xb6, 0xae, 0x1f, 0xb4, 0x22, 0x90, 0x71, 0x36, 0x43, 0x44, 0x6, 0x5, 0x9e, 0x69, 0xc8, 0xdb, 0x71, 0xa4, 0x3c, 0x50, 0x7c, 0x72, 0x56, 0x7e, 0x66, 0xd5, 0xed, 0x6f, 0x17, 0xab, 0x75, 0x7c, 0xc1, 0xf5, 0xbd, 0x57, 0xf2, 0x46, 0xa3, 0x8, 0xe5, 0xa9, 0x35, 0x10, 0xad, 0x80, 0xa5, 0x65, 0x75, 0x12, 0x74, 0xff, 0xaa, 0x46, 0x79, 0xb1, 0x31, 0x34, 0x32, 0x23, 0xee, 0xfa, 0xca, 0xeb, 0xdb, 0x52, 0x3b, 0xd3, 0xed, 0x31, 0x3a, 0xa2, 0x8, 0x99, 0xff, 0x15, 0xcc, 0xa0, 0xe7, 0x8, 0xf3, 0x62, 0x20, 0x54, 0x98, 0x1b, 0xb5, 0x67, 0x0, 0x1, 0x91, 0x80, 0x7e, 0xd9, 0xdc, 0x2f, 0xfe, 0xb7, 0x92, 0x8d, 0xf8, 0x68, 0xdf, 0x13, 0xa4, 0xcd, 0xfb, 0x8e, 0x90, 0x9f, 0xde, 0x78, 0x67, 0x99, 0x9d, 0xa2, 0x48, 0xe5, 0xbd, 0xd3, 0x61, 0xb3, 0xc1, 0x2, 0x2c, 0xfc, 0x46, 0xfd, 0xe1, 0xdf, 0xec, 0x94, 0xe9, 0x6d, 0x60, 0x97, 0x23, 0xe3, 0xc7, 0xf4, 0xd2, 0x3a, 0x8c, 0x47, 0x7b, 0x31, 0x96, 0x50, 0xc9, 0x97, 0xee, 0x7a, 0x20, 0x60, 0x88, 0xa5, 0xcb, 0x95, 0x9d, 0x8b, 0x27, 0x99, 0xca, 0x59, 0x7b, 0x11, 0x93, 0xe4, 0x3a, 0x75, 0x67, 0x23, 0x95, 0xb8, 0xc2, 0x5, 0xe3, 0xca, 0x17, 0x7d, 0xf6, 0x97, 0x6e, 0x9f, 0x87, 0x85, 0x3a, 0x18, 0x9f, 0x33, 0xf7, 0x66, 0xa4, 0x52, 0xf1, 0x11, 0xe9, 0x9a, 0x3f, 0xb2, 0x6b, 0xc1, 0xe3, 0xe5, 0x78, 0x69, 0x90, 0x63, 0x3f, 0x9c, 0x86, 0x95, 0x18, 0x8b, 0xc3, 0xf8, 0xc8, 0x54, 0x51, 0x72, 0xfc, 0x64, 0xe4, 0xa9, 0x89, 0x65, 0x37, 0xb4, 0x4f, 0x13, 0xd6, 0x3e, 0x56, 0x20, 0xc3, 0x12, 0x9e, 0xc9, 0x5c, 0xd9, 0x4d, 0x4e, 0x26, 0x7c, 0xa7, 0xfa, 0xd4, 0xf4, 0x23, 0x34, 0xe3, 0xa6, 0x57, 0xc7, 0x42, 0xe7, 0xee, 0x75, 0x69, 0x9b, 0x81, 0x85, 0x6b, 0x1d, 0xe3, 0x3d, 0x4f, 0x2b, 0xd8, 0x40, 0x22, 0x86, 0xdc, 0xd8, 0xaf, 0xd5, 0x98, 0x5d, 0xd3, 0x8d, 0xda, 0x6c, 0x85, 0x3e, 0xa7, 0x3b, 0x83, 0x82, 0x9b, 0x60, 0x71, 0xaf, 0x5a, 0x69, 0x77, 0x8d, 0x8f, 0xa0, 0xa5, 0xa0, 0x0, 0xd, 0xf4, 0xfa, 0xcd, 0x72, 0x3c, 0x6c, 0x9c, 0x9f, 0x50, 0xd6, 0x12, 0x14, 0x6d, 0xc2, 0x29, 0xf0, 0x71, 0xde, 0xed, 0x32, 0x58, 0xe4, 0xef, 0xa, 0xa3, 0x76, 0x93, 0xa7, 0xc2, 0xdc, 0xe6, 0x15, 0x24, 0x69, 0x97, 0x46, 0x94, 0x0, 0x5e, 0x8d, 0x82, 0xcf, 0xc, 0xa0, 0xf9, 0xf0, 0x34, 0x36, 0x96, 0x7c, 0xed, 0x5c, 0xa8, 0x27, 0x8f, 0x6, 0x5c, 0x9b, 0x52, 0x41, 0xd2, 0xd8, 0x1a, 0xdc, 0x1a, 0xed, 0xbd, 0xef, 0x5a, 0xf4, 0x49, 0x5a, 0x79, 0x79, 0x75, 0x63, 0x5c, 0x71, 0x18, 0xb, 0x6b, 0x3f, 0x80, 0x2b, 0xe0, 0x8f, 0x2a, 0xb4, 0xec, 0x7b, 0xe3, 0xd1, 0x59, 0xdf, 0x1, 0xd1, 0xb, 0x33, 0xe5, 0xf7, 0x66, 0xcc, 0x3c, 0x9e, 0x26, 0x37, 0xe6, 0xaa, 0x39, 0xf4, 0x6f, 0xdc, 0xec, 0xc3, 0x7d, 0xc0, 0x4b, 0x45, 0xb8, 0x1c, 0x6e, 0x11, 0x3b, 0xad, 0x69, 0x2a, 0x3, 0x7e, 0xc3, 0x92, 0xb0, 0x75, 0xc0, 0x5a, 0x7b, 0x61, 0x72, 0xbe, 0x9c, 0xf0, 0xd1, 0x54, 0xcc, 0xe3, 0xca, 0x84, 0xf5, 0xd7, 0x8e, 0x95, 0x80, 0xbc, 0x31, 0xbf, 0x9e, 0x43, 0xfb, 0x6c, 0x10, 0xc6, 0xd8, 0xa7, 0x91, 0x7c, 0x20, 0x28, 0xcb, 0x89, 0xf0, 0x8d, 0x20, 0x5e, 0x33, 0xa9, 0xd5, 0xa3, 0x9a, 0xe, 0xf1, 0xe6, 0x19, 0x90, 0xdc, 0xbb, 0x64, 0xc0, 0x63, 0x61, 0xff, 0xe9, 0xb1, 0x61, 0xa5, 0x95, 0xbe, 0x16, 0x5f, 0x33, 0x3a, 0x2e, 0x14, 0x85, 0x22, 0xd0, 0x2e, 0xab, 0x28, 0xaf, 0xce, 0x37, 0x82, 0x40, 0x3f, 0xbf, 0xd8, 0x8c, 0x14, 0xe5, 0x3c, 0xb0, 0x9e, 0xc3, 0xf0, 0xa0, 0xf5, 0x3, 0x8c, 0x9, 0x73, 0x59, 0x6, 0x47, 0x95, 0x8c, 0x64, 0xe3, 0x46, 0x90, 0xce, 0xf, 0xf1, 0x33, 0x96, 0xaa, 0x45, 0x32, 0x97, 0x95, 0xd5, 0x9, 0x1, 0xc5, 0xe9, 0x84, 0xe2, 0x89, 0xe2, 0xfc, 0x7e, 0x91, 0xc4, 0xd, 0xf0, 0xd4, 0x44, 0x22, 0x70, 0x2, 0x2, 0xab, 0x3b, 0xde, 0x48, 0x1f, 0xce, 0xcc, 0x3d, 0xe9, 0x9d, 0xf9, 0x60, 0x91, 0x11, 0xc3, 0xf5, 0x7a, 0x8f, 0xc3, 0x93, 0x12, 0xc5, 0x2a, 0xb7, 0x61, 0xca, 0x37, 0x6f, 0x3e, 0xcf, 0xc7, 0xa9, 0x51, 0x41, 0x92, 0xe9, 0x8f, 0x7c, 0x89, 0xf4, 0x3f, 0xa7, 0x95, 0x93, 0x1c, 0xf0, 0x97, 0x1, 0x42, 0xd4, 0x7, 0xcf, 0xdd, 0x8a, 0x4a, 0x5f, 0x27, 0xdb, 0x8f, 0x6e, 0x1d, 0xe3, 0x52, 0xda, 0x58, 0x20, 0xab, 0x4a, 0x88, 0xf8, 0xac, 0x4b, 0x5c, 0x19, 0x9e, 0x6e, 0x46, 0xfd, 0x37, 0x77, 0xd0, 0x68, 0xfd, 0x97, 0xc5, 0x66, 0x90, 0x31, 0xd5, 0x8a, 0x83, 0x12, 0x9b, 0xc0, 0x95, 0xbf, 0xfc, 0xf0, 0x5f, 0x83, 0x1d, 0xa8, 0x11, 0x4b, 0x18, 0x98, 0xbf, 0x76, 0x49, 0xcd, 0xf5, 0x46, 0x59, 0x23, 0xf1, 0x3b, 0x82, 0x9, 0x8d, 0x6b, 0x3, 0x38, 0x8, 0xd2, 0xbe, 0xa2, 0xc3, 0x3, 0x7e, 0x9e, 0xf2, 0x5e, 0xba, 0xaa, 0xf0, 0x58, 0xab, 0x69, 0xe6, 0xfa, 0x69, 0xd6, 0x63, 0xa5, 0x7, 0xb, 0xea, 0xbc, 0x93, 0x3f, 0x5d, 0x12, 0xa1, 0x34, 0x6b, 0x1b, 0x7c, 0xdf, 0x46, 0xe1, 0x63, 0x8c, 0xe1, 0x63, 0x6, 0xf, 0x18, 0x5d, 0x5b, 0xd8, 0x8a, 0xb7, 0x37, 0x4, 0xda, 0x4f, 0x38, 0x54, 0xcd, 0xd3, 0x15, 0x6a, 0x7f, 0x93, 0x84, 0x41, 0xb1, 0x3c, 0x61, 0x6e, 0x6a, 0xd1, 0x80, 0xd9, 0xb7, 0x70, 0xa6, 0xa7, 0xa4, 0xac, 0x6f, 0xa3, 0x79, 0x8a, 0xce, 0xbd, 0x24, 0xc8, 0xe0, 0xd3, 0x45, 0x8f, 0x5a, 0x82, 0x79, 0x1b, 0x50, 0xed, 0x17, 0xeb, 0xe, 0xf0, 0x5c, 0x8e, 0xb8, 0xe, 0xd5, 0x92, 0xf1, 0x73, 0xf0, 0x39, 0x95, 0x6c, 0x67, 0x82, 0x76, 0x84, 0x22, 0x70, 0x63, 0xa4, 0x2, 0xa3, 0x7c, 0x0, 0x9a, 0x5f, 0x5a, 0x7, 0x5c, 0xf5, 0xc3, 0x9, 0xee, 0xfc, 0x8d, 0xa5, 0x17, 0x5, 0x4b, 0xba, 0x9, 0x4a, 0xe7, 0xb0, 0xa1, 0x12, 0x6a, 0x79, 0x1b, 0xa8, 0xe9, 0x4e, 0x44, 0xb5, 0x65, 0xc1, 0x26, 0x18, 0x51, 0xb, 0x9e, 0x93, 0x6e, 0x1c, 0x15, 0xed, 0xa1, 0x52, 0x2f, 0x7, 0x31, 0x42, 0x43, 0x30, 0xea, 0xaa, 0x3a, 0x9f, 0xfe, 0x94, 0x72, 0x7f, 0x9c, 0xaf, 0x8e, 0xb4, 0x4, 0xb0, 0x1b, 0x4e, 0x10, 0x71, 0xbe, 0x6b, 0xf7, 0xe2, 0xe5, 0x85, 0x13, 0xc1, 0x93, 0xed, 0x9c, 0xe2, 0x2c, 0x87, 0x5, 0x72, 0xfc, 0x39, 0x76, 0xef, 0x10, 0xa2, 0x25, 0x5c, 0x59, 0x80, 0x6, 0x2f, 0x8b, 0xb9, 0x87, 0x7b, 0x50, 0x48, 0xcd, 0x1, 0xb4, 0x2, 0x9f, 0xf1, 0xc7, 0xd2, 0x66, 0xb4, 0x2d, 0xad, 0x9d, 0x2, 0xf8, 0xc8, 0x9c, 0x3b, 0xd7, 0x81, 0x3c, 0x2, 0xde, 0x27, 0xde, 0x1f, 0x3b, 0xdc, 0xf8, 0xf, 0x6d, 0xc4, 0xff, 0x1c, 0x80, 0xf3, 0xd, 0x10, 0x37, 0x5b, 0xc1, 0x68, 0x4b, 0xe8, 0xe9, 0xc8, 0x18, 0x87, 0x4c, 0x38, 0x57, 0x5b, 0x51, 0x1a, 0x2d, 0x80, 0xf9, 0xfb, 0x65, 0x39, 0xbb, 0x0, 0x3d, 0xa8, 0x71, 0xdf, 0xf2, 0x62, 0x14, 0xde, 0x6e, 0x80, 0x6c, 0x31, 0xaf, 0x96, 0x81, 0xa0, 0x75, 0xba, 0x9a, 0xc4, 0xa4, 0xe0, 0x7f, 0x70, 0x4, 0x48, 0xe, 0x4e, 0x3d, 0x8c, 0xc0, 0x6a, 0x53, 0x98, 0x17, 0x19, 0x98, 0xf0, 0x3b, 0xde, 0x21, 0x91, 0x89, 0xc0, 0x62, 0x7b, 0x8a, 0x4a, 0x4f, 0x8a, 0xe1, 0x74, 0xc5, 0xde, 0x72, 0x1e, 0x29, 0xd7, 0xb9, 0x87, 0x4f, 0x22, 0x34, 0x9a, 0xcc, 0x6b, 0x35, 0xe7, 0x60, 0x16, 0xa7, 0x49, 0x27, 0x3f, 0xea, 0xae, 0x94, 0x11, 0x6c, 0x4e, 0x6c, 0x9f, 0xfe, 0x62, 0xb8, 0x71, 0x89, 0xe6, 0x10, 0x51, 0xeb, 0x9c, 0xfa, 0xad, 0x72, 0xf2, 0xfe, 0x36, 0x82, 0x58, 0xc4, 0xed, 0x2d, 0x36, 0x34, 0x2c, 0x81, 0xb7, 0x83, 0x51, 0x34, 0x8e, 0xb, 0xde, 0xcf, 0x63, 0xa0, 0x9f, 0xd2, 0x4d, 0xf8, 0x9c, 0x93, 0xeb, 0x18, 0x1d, 0xec, 0xbe, 0x3f, 0x93, 0x7b, 0x53, 0x7a, 0x1b, 0xe0, 0x22, 0x1f, 0x7c, 0xe, 0x25, 0x7b, 0x82, 0xd6, 0x79, 0xcd, 0xd6, 0xb2, 0x6a, 0x9, 0x9b, 0x2e, 0x9b, 0xc1, 0xe5, 0xf9, 0xd5, 0x4f, 0x97, 0x94, 0x9, 0xa7, 0xbc, 0x4f, 0x4b, 0x37, 0x5f, 0x5a, 0x37, 0x99, 0x1e, 0x4, 0x6e, 0x9b, 0x33, 0xc0, 0x1e, 0x60, 0x19, 0xfe, 0x93, 0xf6, 0xd8, 0x5, 0x28, 0x19, 0x5d, 0x92, 0x81, 0xe6, 0x17, 0x94, 0xd8, 0x77, 0x76, 0x91, 0x4c, 0xdf, 0x1e, 0x46, 0x15, 0xdc, 0x15, 0xeb, 0x0, 0x7, 0xe3, 0x97, 0x97, 0xd1, 0x4f, 0xa7, 0xda, 0xc2, 0xe9, 0x2c, 0x12, 0x35, 0x3b, 0x25, 0x12, 0xa3, 0x9, 0x97, 0x61, 0xf7, 0x73, 0x7a, 0xad, 0x3a, 0x5a, 0xd7, 0xf7, 0x64, 0xc4, 0xe, 0x88, 0x78, 0xab, 0x99, 0x3, 0xb8, 0xfa, 0xd5, 0x11, 0x3a, 0x84, 0x60, 0x33, 0x26, 0xfb, 0x23, 0x7e, 0x8f, 0x2b, 0x11, 0x23, 0xf6, 0x78, 0xca, 0x9, 0x11, 0x7a, 0xc3, 0x6b, 0x50, 0x5c, 0xa6, 0xbc, 0xab, 0x8c, 0x4f, 0x75, 0xd5, 0xa3, 0x6b, 0xf8, 0xe8, 0x56, 0xe0, 0x4b, 0xda, 0xe1, 0x99, 0x98, 0xa2, 0xb9, 0x8f, 0xd3, 0xd6, 0x8a, 0xfc, 0xd1, 0xdc, 0x5e, 0x33, 0xa5, 0xc2, 0x6e, 0x4e, 0x85, 0x6, 0xd0, 0x5e, 0xf8, 0x79, 0xb9, 0x8f, 0xd2, 0x3e, 0x74, 0x98, 0x9d, 0x4b, 0x8d, 0xf6, 0x9c, 0x33, 0x21, 0x7f, 0xde, 0x5e, 0x40, 0x3d, 0x85, 0xc0, 0x2b, 0xc9, 0xc3, 0x3a, 0x85, 0x56, 0xf0, 0xb0, 0x2d, 0x92, 0xab, 0xbe, 0x3a, 0x5e, 0xdb, 0xdd, 0x6b, 0x34, 0x58, 0x1d, 0xa3, 0x7e, 0x77, 0xbc, 0x81, 0x6f, 0x50, 0xb6, 0xdd, 0x74, 0x3e, 0x59, 0x4e, 0x35, 0x48, 0xda, 0xc5, 0x7a, 0xac, 0x17, 0x40, 0xfd, 0x8, 0xf4, 0x16, 0xf1, 0x13, 0xd6, 0xbd, 0x80, 0xe1, 0x27, 0xcd, 0xf8, 0x7e, 0x68, 0x1e, 0xf2, 0x23, 0xcb, 0x70, 0x9f, 0x1a, 0xe4, 0xc7, 0xc, 0x81, 0x36, 0x3c, 0x7e, 0x83, 0xf9, 0x5f, 0x95, 0x78, 0x4e, 0x29, 0x44, 0xab, 0x1c, 0xa, 0x5f, 0x4f, 0x15, 0x10, 0x7f, 0x89, 0x44, 0xbe, 0xdc, 0x66, 0x9d, 0x38, 0xd9, 0x7e, 0x2c, 0xfc, 0xd6, 0x86, 0x2d, 0x97, 0xcb, 0xe3, 0xcb, 0xe8, 0x80, 0xc3, 0x97, 0x35, 0x6d, 0xe4, 0x1f, 0x4c, 0xb4, 0xa6, 0x4c, 0x63, 0x3, 0x9c, 0x83, 0x3b, 0x2e, 0x18, 0x57, 0xf, 0xe4, 0xb0, 0x61, 0xd, 0xb5, 0xa9, 0x43, 0xb, 0xca, 0xc8, 0x9f, 0xad, 0x40, 0x62, 0x78, 0x3e, 0x22, 0xed, 0x97, 0x16, 0xc9, 0xb3, 0x30, 0xae, 0xf9, 0xb9, 0xcc, 0xad, 0xd7, 0x8a, 0xb, 0x54, 0x3a, 0x5b, 0x7, 0xf, 0xd5, 0x32, 0xd1, 0xb0, 0x5, 0x61, 0x2e, 0x68, 0xe6, 0x22, 0x2e, 0x74, 0xa1, 0xbf, 0x2b, 0x1b, 0x67, 0x7b, 0x15, 0x82, 0x19, 0x6e, 0x8a, 0x6, 0x23, 0x92, 0x26, 0x9a, 0xa3, 0xae, 0xa9, 0x1e, 0xa0, 0xa6, 0xbb, 0x96, 0x45, 0x9e, 0x65, 0x2c, 0x4e, 0xc5, 0x5, 0x34, 0x40, 0x58, 0xca, 0xec, 0x53, 0x5, 0x98, 0xda, 0x6f, 0x42, 0x36, 0x22, 0xdd, 0xa7, 0x81, 0x3b, 0x59, 0xc8, 0x33, 0xeb, 0x6e, 0x66, 0x6c, 0x5b, 0x8c, 0x2f, 0xa4, 0xff, 0xe3, 0x58, 0xb3, 0xd6, 0x9f, 0x17, 0x5f, 0x88, 0x38, 0x83, 0xe6, 0x77, 0xc1, 0x59, 0xaf, 0x94, 0x44, 0x95, 0x9f, 0xb, 0xc3, 0x45, 0xfa, 0x81, 0x87, 0x7a, 0x16, 0x2, 0xf9, 0xc6, 0x51, 0x72, 0x66, 0x9c, 0x33, 0x75, 0x0, 0x52, 0xdc, 0x1a, 0xec, 0xff, 0x64, 0x41, 0x1, 0xaf, 0xa2, 0x55, 0xdc, 0x7e, 0xf3, 0xc2, 0xf0, 0xf7, 0x90, 0xb6, 0x1a, 0x30, 0x62, 0xd6, 0x8e, 0x47, 0x5a, 0x75, 0xfc, 0x6a, 0xba, 0xb8, 0xe, 0x6d, 0xc9, 0x58, 0xc7, 0xcd, 0x1d, 0x87, 0xcb, 0xea, 0x87, 0xba, 0x27, 0xd1, 0x86, 0xf7, 0xa2, 0xa5, 0x2b, 0xa4, 0x46, 0xe2, 0x5e, 0x16, 0x3b, 0x18, 0x18, 0x9d, 0xac, 0x6d, 0xc9, 0x35, 0x1d, 0x24, 0xc7, 0xe1, 0x7b, 0x72, 0x5b, 0x38, 0x34, 0x31, 0x96, 0xa7, 0x32, 0xa9, 0xc4, 0xc6, 0x28, 0x5d, 0xc1, 0xf, 0x33, 0x45, 0xd0, 0xce, 0x32, 0x8, 0xa8, 0x47, 0xd5, 0x10, 0xfb, 0xa7, 0xaa, 0x4b, 0x88, 0xfc, 0xd8, 0x12, 0xf6, 0x73, 0x10, 0xb1, 0x1d, 0x3e, 0x7d, 0xdc, 0x1b, 0xd, 0xd3, 0xb, 0x1f, 0x86, 0xf6, 0xce, 0x35, 0xc, 0xe2, 0x68, 0x46, 0xda, 0x8d, 0xa, 0xd2, 0x1a, 0xdc, 0x2f, 0x62, 0xbc, 0x48, 0x32, 0x98, 0x8f, 0x30, 0xa4, 0x79, 0x71, 0x6c, 0x2f, 0x90, 0xa6, 0xbf, 0xa0, 0xfe, 0xfe, 0x75, 0xfc, 0xb0, 0x8e, 0xf5, 0xac, 0xa5, 0x54, 0x78, 0x1c, 0xfb, 0xea, 0x1c, 0x84, 0x67, 0xaa, 0x45, 0x85, 0x4e, 0xa0, 0x26, 0xb9, 0xff, 0xe1, 0xe9, 0xcf, 0x1d, 0xb5, 0xf3, 0xfc, 0x48, 0xe1, 0x89, 0xc6, 0x5f, 0xf2, 0xa7, 0x43, 0x88, 0x3b, 0x99, 0x98, 0x8e, 0x2f, 0x6, 0x7e, 0xe3, 0xcd, 0x9f, 0x2c, 0xc4, 0xf8, 0x41, 0xc1, 0xc, 0xcb, 0xd7, 0xb5, 0x25, 0x8, 0x25, 0x2a, 0xe3, 0xf, 0x12, 0xb7, 0xc7, 0x61, 0x9c, 0x55, 0x73, 0x85, 0x33, 0x3d, 0x46, 0x92, 0x4, 0x5, 0x68, 0x29, 0xc3, 0xa3, 0xe3, 0x55, 0x86, 0x4, 0xda, 0x89, 0xa2, 0x14, 0xb8, 0xa6, 0x6e, 0xad, 0xbb, 0x71, 0xd0, 0x73, 0x6a, 0xa, 0x3, 0xc4, 0x43, 0x30, 0xe6, 0x6b, 0xce, 0x1a, 0x5f, 0xdf, 0x4f, 0x63, 0xfc, 0x46, 0xf6, 0x66, 0x4f, 0xc9, 0xc1, 0x45, 0x42, 0x90, 0x50, 0x4c, 0x4a, 0xe2, 0x42, 0x5d, 0x8f, 0xeb, 0x95, 0x77, 0xca, 0xad, 0x4e, 0x32, 0x6b, 0x79, 0x3a, 0xb6, 0x88, 0xae, 0x62, 0x1c, 0x76, 0x99, 0x95, 0x64, 0xa4, 0x8, 0xbe, 0xcf, 0x26, 0xc3, 0x1b, 0x5d, 0x15, 0xc, 0xbd, 0x78, 0xe5, 0xd, 0x3a, 0xd3, 0x40, 0x3e, 0x28, 0x5e, 0x96, 0xea, 0x57, 0xda, 0xdf, 0x6f, 0xe9, 0x96, 0x23, 0x47, 0x6, 0x9f, 0x6e, 0xcb, 0xc2, 0xf0, 0xe, 0xb0, 0x94, 0x99, 0xc1, 0x6c, 0x4c, 0x44, 0x53, 0xae, 0x16, 0xf9, 0xa7, 0x82, 0x55, 0x6a, 0xe5, 0x67, 0xf9, 0x22, 0x2, 0x8c, 0x30, 0xff, 0x88, 0xa2, 0xcc, 0xc9, 0x24, 0x28, 0xc9, 0xf5, 0xab, 0xfb, 0x12, 0xac, 0xfe, 0xbb, 0xdf, 0xfb, 0xf, 0x1f, 0x2f, 0xf9, 0x70, 0xc3, 0xbe, 0x37, 0x8d, 0x22, 0x1c, 0xfb, 0x34, 0xd, 0x10, 0x7d, 0x92, 0x59, 0x7c, 0x77, 0x86, 0x57, 0xc8, 0x65, 0x3c, 0x76, 0xbf, 0x9a, 0xfd, 0x18, 0x5e, 0x9f, 0xf4, 0x80, 0x74, 0x6d, 0x88, 0x31, 0xb0, 0xcb, 0xc3, 0x4f, 0x79, 0x88, 0xf2, 0xb8, 0x31, 0x6c, 0xb0, 0xac, 0x2, 0xe9, 0xde, 0xe4, 0x14, 0x90, 0x56, 0x6, 0x7a, 0x91, 0x28, 0x66, 0x78, 0x7d, 0x5f, 0x55, 0x29, 0x67, 0xd1, 0xd, 0x6, 0x7d, 0x50, 0xc6, 0x79, 0x59, 0xef, 0xfd, 0x9, 0x98, 0xa5, 0xab, 0xab, 0x4a, 0x1e, 0x7f, 0x98, 0x9c, 0x3a, 0x15, 0xa9, 0x9c, 0xbd, 0x42, 0xe2, 0xf0, 0x3b, 0xbe, 0xe7, 0x19, 0xfe, 0x14, 0xc5, 0xb8, 0xd9, 0x17, 0xc6, 0xa, 0xd0, 0x2, 0xcf, 0x75, 0xd5, 0xac, 0x13, 0x71, 0x9d, 0x1a, 0x1, 0xfa, 0x70, 0xba, 0x83, 0xda, 0x1a, 0xe5, 0x3a, 0xfa, 0x8f, 0xa9, 0x37, 0x84, 0x8, 0x51, 0xcc, 0xae, 0x5, 0x7, 0x3a, 0x65, 0x0, 0x45, 0x41, 0x12, 0x5b, 0x58, 0xc6, 0xf8, 0xd0, 0xbc, 0x7d, 0x70, 0x6d, 0x70, 0x46, 0x83, 0xdd, 0x4, 0x6d, 0x5e, 0x73, 0x60, 0xb6, 0x66, 0x94, 0x32, 0xf8, 0x72, 0x5, 0x17, 0x6, 0x24, 0xf2, 0x31, 0xd1, 0xee, 0xa8, 0xab, 0xf2, 0xbc, 0xd6, 0x11, 0xe8, 0xfd, 0x7c, 0x2c, 0x92, 0x3d, 0x8c, 0xef, 0x8e, 0x1a, 0xe9, 0x2b, 0xa3, 0xe6, 0x6a, 0xa8, 0x5a, 0x24, 0x17, 0x6, 0x6b, 0xb7, 0xba, 0x68, 0xba, 0x14, 0x56, 0xde, 0x9d, 0x35, 0x3a, 0x94, 0xb1, 0x46, 0xa3, 0x63, 0x15, 0x7, 0xf0, 0x68, 0x8c, 0xc6, 0xca, 0x40, 0x6f, 0x7b, 0xe4, 0x7e, 0xe6, 0xcb, 0x94, 0x88, 0xc2, 0x93, 0xc4, 0xfb, 0x2b, 0xee, 0x62, 0x76, 0x3f, 0x2c, 0xcc, 0x7f, 0x3d, 0x7c, 0x81, 0x77, 0x4e, 0xfb, 0x79, 0x23, 0x8b, 0x1c, 0x39, 0x2, 0x37, 0xe, 0x5e, 0x9d, 0x94, 0xb4, 0x1e, 0x7d, 0xb, 0x81, 0x82, 0x87, 0x87, 0x12, 0x31, 0x9b, 0x8f, 0xe8, 0x56, 0xcb, 0xc5, 0x6e, 0x1c, 0x85, 0x30, 0xc4, 0x19, 0x31, 0xd6, 0xc2, 0xb5, 0xa9, 0x80, 0xa6, 0x49, 0x38, 0x98, 0x8e, 0xd8, 0x4e, 0x7, 0x6, 0x18, 0x8a, 0x56, 0xac, 0xec, 0x67, 0xec, 0x4b, 0xa0, 0xea, 0xf8, 0x81, 0xd1, 0x77, 0xcc, 0x1c, 0xfe, 0xb8, 0xe1, 0x3, 0x4f, 0xc3, 0x57, 0x74, 0xc6, 0xcf, 0x9a, 0x65, 0xf3, 0xb, 0xb0, 0x1d, 0x82, 0x2e, 0x64, 0x40, 0x1d, 0x98, 0xff, 0xb9, 0x36, 0xfd, 0xdd, 0xd8, 0xcf, 0xe, 0x70, 0xa4, 0x82, 0xf2, 0x24, 0xe0, 0xf4, 0xf3, 0xcc, 0xde, 0xaa, 0x55, 0xa2, 0x26, 0x55, 0xb4, 0x48, 0x2e, 0xe2, 0x3f, 0x7b, 0x5d, 0x3e, 0xe1, 0x3, 0x68, 0x89, 0xfe, 0x5f, 0xf8, 0x88, 0x56, 0xc0, 0x54, 0x5b, 0x9, 0xf6, 0x2f, 0xf8, 0xa5, 0x4a, 0xad, 0x8e, 0x5c, 0x19, 0x64, 0x49, 0x1d, 0x3a}, - output224: []byte{0x3d, 0xe2, 0x74, 0x84, 0xa9, 0xaa, 0xf9, 0x42, 0x7b, 0x6d, 0x7c, 0xe9, 0xf2, 0x34, 0x55, 0xda, 0x77, 0x1d, 0xcd, 0x2, 0x1a, 0x74, 0x3b, 0x4, 0x9c, 0xe8, 0x56, 0x42}, - output256: []byte{0x72, 0xf0, 0xbb, 0x32, 0xeb, 0x6e, 0x4b, 0xb9, 0x70, 0xa1, 0x2b, 0xac, 0xe8, 0xa, 0x7e, 0x3c, 0xa8, 0x61, 0x6a, 0x3f, 0xa5, 0x1f, 0x40, 0x43, 0x8f, 0xc9, 0xb, 0x32, 0x7f, 0xe, 0x75, 0xf6}, - output384: []byte{0x18, 0x3c, 0x13, 0xeb, 0x17, 0xc6, 0x6f, 0x15, 0xf2, 0xd7, 0x3d, 0x51, 0xca, 0x70, 0x17, 0x72, 0x82, 0x48, 0x95, 0x7d, 0x60, 0xe, 0x89, 0xa7, 0xcc, 0xb, 0xc0, 0x67, 0xc9, 0x75, 0xbc, 0x32, 0xf4, 0xe0, 0x78, 0x6f, 0xf4, 0xe, 0x62, 0x5c, 0xc7, 0xc0, 0xe0, 0xac, 0x78, 0x7f, 0x62, 0x36}, - output512: []byte{0xe, 0xa2, 0xc8, 0x58, 0x7e, 0x46, 0x46, 0x22, 0x6f, 0x46, 0x95, 0x23, 0x50, 0xe3, 0xbf, 0xe, 0x71, 0xb0, 0xb8, 0xab, 0xf7, 0x7, 0xc8, 0xc1, 0xec, 0x99, 0x87, 0x7e, 0x38, 0x31, 0xee, 0x3d, 0x3d, 0x22, 0x4d, 0xfd, 0xac, 0x17, 0xb0, 0xac, 0xae, 0x62, 0xf5, 0x7, 0xce, 0x2a, 0x17, 0x5, 0xd5, 0x18, 0xef, 0x45, 0x2b, 0x97, 0x2f, 0x33, 0xf6, 0x0, 0x23, 0x8, 0xc9, 0x72, 0x69, 0x94}}, - testcase{ - msg: []byte{0x28, 0x10, 0x9f, 0x1e, 0x97, 0x64, 0x1e, 0x7c, 0x24, 0x6c, 0xa9, 0xde, 0xe6, 0xfb, 0xaa, 0x15, 0xd9, 0x85, 0xa8, 0x42, 0x92, 0xec, 0xaf, 0xfe, 0x2, 0x5f, 0x66, 0xa9, 0xdc, 0xae, 0xb1, 0xf0, 0xf8, 0xcd, 0x72, 0x48, 0x96, 0xa0, 0xbc, 0x2e, 0x6f, 0x7b, 0x17, 0x63, 0xd7, 0xc1, 0x5b, 0x61, 0xac, 0xbb, 0xf1, 0x3f, 0xce, 0x74, 0x78, 0x2b, 0x8a, 0x71, 0x51, 0x52, 0x7c, 0x9b, 0xd3, 0x75, 0xd4, 0xbf, 0x37, 0xc1, 0x5c, 0xa3, 0x9e, 0x20, 0xc3, 0x52, 0xb2, 0xe0, 0xb0, 0xd8, 0x47, 0x4f, 0x90, 0x4f, 0xca, 0x4e, 0x3, 0x9d, 0xcd, 0x6e, 0x1e, 0x54, 0xe8, 0x72, 0xa4, 0x81, 0xf8, 0xe1, 0xe5, 0xff, 0xd3, 0xd6, 0x52, 0x57, 0xff, 0x81, 0x4f, 0xa0, 0xe5, 0x9b, 0x5e, 0xce, 0xcc, 0x30, 0xfb, 0x1e, 0xe1, 0xb7, 0x3a, 0x87, 0xc0, 0x50, 0xb9, 0xc0, 0xc8, 0xdb, 0x6b, 0xab, 0x93, 0xa2, 0x4a, 0xda, 0x3f, 0xa4, 0x80, 0xf2, 0x15, 0xe1, 0x9f, 0x63, 0x30, 0x8c, 0xec, 0x77, 0xd1, 0xbd, 0x5a, 0xc1, 0x86, 0x4a, 0xe2, 0x46, 0x7, 0x12, 0x3, 0xc7, 0x49, 0x9f, 0x3, 0xea, 0xbc, 0xa4, 0x9, 0x30, 0x58, 0xd9, 0xa9, 0x8e, 0x26, 0xf2, 0x9d, 0xd9, 0x1a, 0xb0, 0xac, 0x55, 0x6b, 0xf1, 0xa6, 0xed, 0x76, 0x49, 0xe5, 0x55, 0x9d, 0x6e, 0x3c, 0x93, 0x25, 0x4e, 0x6f, 0x4c, 0xd7, 0x94, 0x35, 0x85, 0xd6, 0xe1, 0x50, 0x2b, 0xbc, 0x6c, 0xfa, 0x4a, 0x38, 0x22, 0x3b, 0x35, 0xee, 0xd2, 0xbf, 0x65, 0x84, 0x48, 0x25, 0x9f, 0x82, 0x78, 0x30, 0xd8, 0x97, 0x94, 0x2a, 0x3a, 0xd0, 0xa8, 0xa5, 0xcc, 0x7e, 0x30, 0x18, 0x45, 0x1e, 0x4f, 0xc8, 0x84, 0xc5, 0xb7, 0xcc, 0x65, 0xf5, 0x4e, 0xe7, 0x5e, 0xbf, 0xd7, 0xc1, 0xd4, 0xc8, 0x8c, 0x71, 0xa3, 0x63, 0x41, 0x32, 0x7b, 0x97, 0x72, 0xce, 0xb9, 0xf8, 0xb7, 0xb4, 0xb7, 0x25, 0x16, 0x50, 0x11, 0xb8, 0x48, 0xc2, 0xdc, 0x91, 0x7f, 0xd5, 0x51, 0x41, 0x82, 0xe2, 0x69, 0x8f, 0x9e, 0xa1, 0x81, 0xfe, 0x6c, 0x97, 0x11, 0x90, 0x6d, 0x29, 0x6a, 0xb9, 0x83, 0x5d, 0xb7, 0x50, 0x1e, 0x2e, 0xbf, 0x79, 0xec, 0xc4, 0x47, 0x50, 0x91, 0xe6, 0x71, 0x9c, 0x8c, 0x6, 0x59, 0x9d, 0xd2, 0xb8, 0x86, 0x70, 0xbd, 0xb8, 0xc4, 0xa2, 0x8b, 0xdd, 0xf7, 0x8c, 0x97, 0xb8, 0x1b, 0xd2, 0xfd, 0x67, 0x3d, 0x59, 0x10, 0xe1, 0x24, 0x7c, 0x43, 0xfd, 0xef, 0xad, 0xd3, 0xd, 0x92, 0xe0, 0xd9, 0xb6, 0xe0, 0xb4, 0x56, 0x63, 0x5f, 0x96, 0xfa, 0x47, 0x7f, 0xe5, 0xec, 0xfc, 0xfa, 0x9f, 0x94, 0xf5, 0xc1, 0xd7, 0x66, 0x64, 0xc, 0x59, 0x62, 0x98, 0x50, 0x2b, 0x20, 0xcf, 0xb3, 0xbd, 0xfe, 0x7f, 0x3f, 0xd2, 0x37, 0xfc, 0xbe, 0xa9, 0x47, 0xd2, 0x4d, 0x3, 0x60, 0x77, 0x60, 0x30, 0xb0, 0xb6, 0x61, 0xa9, 0xbd, 0xd2, 0x14, 0x76, 0x4d, 0xe, 0x70, 0xe6, 0xe, 0xfc, 0x69, 0x6b, 0x9b, 0xb6, 0x3e, 0x3b, 0xf1, 0x71, 0xc6, 0x2d, 0x1b, 0xc2, 0xb6, 0xe5, 0x3f, 0x94, 0x1b, 0x39, 0x15, 0xf8, 0x5f, 0xb4, 0xb9, 0xb2, 0xe7, 0x4f, 0x39, 0x1b, 0x5d, 0xad, 0x29, 0x1f, 0xe9, 0xf9, 0x62, 0x9e, 0x2, 0xfc, 0x3f, 0xc5, 0x39, 0x5e, 0xc6, 0x6f, 0xa6, 0xfc, 0xc5, 0x33, 0x8d, 0x35, 0x3c, 0xfc, 0xd4, 0x9, 0xa1, 0xcf, 0x4b, 0x6b, 0xbe, 0xa5, 0x17, 0xef, 0x59, 0x79, 0xd0, 0x86, 0xdd, 0xe3, 0x5c, 0x8, 0xc8, 0x85, 0xc3, 0xb9, 0xee, 0x5c, 0x8c, 0x59, 0x28, 0x4e, 0x10, 0xa5, 0x4, 0x1c, 0x9d, 0xeb, 0x78, 0x60, 0xb1, 0x12, 0xe0, 0x5e, 0x5, 0x16, 0x55, 0xdc, 0x37, 0x42, 0x71, 0x1, 0x2e, 0xce, 0x9e, 0xac, 0x4c, 0x84, 0xd, 0x2c, 0x47, 0x46, 0x90, 0x74, 0xb7, 0x7f, 0x80, 0x81, 0x89, 0xa0, 0xea, 0x64, 0x5e, 0xee, 0x5f, 0x5e, 0xec, 0x17, 0xfd, 0xcb, 0x51, 0xd0, 0xd1, 0xb2, 0xd8, 0x29, 0x3b, 0x4c, 0x8a, 0x25, 0x93, 0x75, 0x70, 0xc, 0x3f, 0xa8, 0xfc, 0x48, 0xa3, 0x9c, 0xc8, 0xb3, 0x2b, 0x22, 0xcf, 0x7b, 0xb7, 0x14, 0xfd, 0xc7, 0xea, 0xcd, 0x71, 0x90, 0xba, 0xce, 0x15, 0x98, 0x7c, 0x7f, 0x86, 0x74, 0xf3, 0xf, 0x46, 0x63, 0xf1, 0xbb, 0x50, 0x47, 0xd, 0x25, 0x43, 0x79, 0x48, 0xd4, 0x35, 0x3f, 0xc2, 0xb9, 0x6e, 0x79, 0xc, 0x19, 0x41, 0x3e, 0x9f, 0x28, 0xec, 0x4, 0xa0, 0x2b, 0x37, 0xcb, 0x0, 0x36, 0x48, 0x18, 0x3, 0xbb, 0x67, 0x28, 0xb6, 0xd8, 0x81, 0x4b, 0xcd, 0xd8, 0x9d, 0xcf, 0xe4, 0x58, 0x8, 0x4b, 0x8c, 0x84, 0x95, 0xc4, 0xbe, 0x33, 0xb5, 0xf0, 0x2e, 0xc6, 0x9f, 0x22, 0x46, 0x5d, 0x5f, 0xac, 0x7d, 0x85, 0x33, 0x1e, 0x8e, 0xd2, 0x90, 0x78, 0x73, 0x36, 0xa7, 0x32, 0x38, 0x44, 0x82, 0x71, 0xa2, 0x37, 0xa3, 0x47, 0x30, 0x76, 0x4c, 0x2a, 0x4d, 0xf6, 0x47, 0x74, 0xac, 0x6a, 0x25, 0x12, 0x23, 0x1c, 0x54, 0xfa, 0x7d, 0x68, 0xfb, 0xa4, 0xe8, 0x88, 0x33, 0x1f, 0xa2, 0x8d, 0x1b, 0x41, 0x43, 0xa2, 0xc, 0xec, 0x22, 0x34, 0x52, 0x4c, 0x52, 0x20, 0x70, 0xa2, 0xf3, 0xac, 0x33, 0x6a, 0x41, 0x6c, 0x7, 0x9b, 0x58, 0xe2, 0xea, 0x8b, 0x2d, 0x71, 0x18, 0x81, 0x70, 0xb6, 0x41, 0x6b, 0x70, 0x57, 0xb1, 0x1b, 0x99, 0x90, 0x26, 0xbd, 0x67, 0x2e, 0x1, 0x59, 0xfa, 0x85, 0xbc, 0xa, 0x1a, 0x26, 0x57, 0xaa, 0xa1, 0x1b, 0x67, 0x42, 0xf1, 0x21, 0xf0, 0x8d, 0xc8, 0xcb, 0xa4, 0xcd, 0x16, 0x24, 0xa2, 0xa3, 0x37, 0x98, 0xd5, 0xf7, 0xed, 0x9, 0x6b, 0x76, 0x9b, 0x79, 0xb8, 0x10, 0xed, 0xc8, 0x1c, 0x4e, 0x5, 0xc1, 0x7b, 0x62, 0xd8, 0xb2, 0xdf, 0x21, 0x40, 0xc5, 0xdc, 0xac, 0xe, 0xa9, 0xb5, 0x9, 0x8, 0x4, 0x34, 0x25, 0xce, 0xe2, 0xec, 0x17, 0xc3, 0xc3, 0xe5, 0x22, 0xd1, 0x27, 0x29, 0x69, 0xf1, 0xf8, 0xab, 0xeb, 0xe8, 0x2e, 0x1e, 0x1d, 0x2a, 0xe7, 0xb6, 0x4b, 0xa1, 0x4e, 0x0, 0xc1, 0x7a, 0x66, 0x35, 0x49, 0x8f, 0xd7, 0xfe, 0xcc, 0x64, 0x21, 0xc8, 0x9b, 0xad, 0x4c, 0xb7, 0x80, 0x5, 0xee, 0xaa, 0xe9, 0x69, 0x78, 0xbb, 0xfa, 0x20, 0x15, 0xb2, 0x82, 0x91, 0x7a, 0xcc, 0xea, 0x60, 0xb0, 0xe0, 0xaa, 0xa2, 0xcf, 0x1e, 0xd7, 0xa6, 0xe7, 0xed, 0xc, 0x95, 0x88, 0xd6, 0xa6, 0xc0, 0x6e, 0x49, 0x33, 0x98, 0x23, 0xc6, 0x18, 0xb, 0x9a, 0x1d, 0xe, 0x61, 0x14, 0xc0, 0xde, 0x9d, 0x89, 0xec, 0xa8, 0x17, 0x29, 0x8c, 0x6e, 0x3b, 0xe3, 0xf5, 0x34, 0x4, 0x78, 0x76, 0x38, 0xb2, 0xf8, 0x83, 0x24, 0x8e, 0xee, 0xf0, 0x55, 0xc1, 0x8f, 0xd4, 0x76, 0xe0, 0x7a, 0x7e, 0xb5, 0xf1, 0x79, 0xc8, 0x61, 0x3c, 0xf4, 0xdf, 0x1, 0x41, 0x9c, 0x1c, 0x6d, 0x63, 0x9, 0xbc, 0x53, 0xe2, 0x14, 0xbd, 0xa5, 0x46, 0xf2, 0x72, 0xa3, 0x72, 0xb8, 0x13, 0xef, 0x8, 0x3b, 0xb3, 0x90, 0x5a, 0x99, 0x62, 0x74, 0xbd, 0xb, 0xe7, 0x3c, 0x9b, 0x79, 0x13, 0x5d, 0x81, 0x67, 0xfa, 0x5a, 0x5, 0x8a, 0x7f, 0x92, 0x6f, 0x9f, 0x31, 0x5f, 0x4f, 0x82, 0x3c, 0x44, 0xba, 0x6f, 0x28, 0x0, 0xe2, 0x5e, 0xd8, 0xe1, 0x65, 0x94, 0x44, 0xd3, 0xce, 0x47, 0xf1, 0xa5, 0x8e, 0x50, 0x11, 0x66, 0xb, 0x40, 0x39, 0x2a, 0x94, 0x2e, 0x90, 0x1d, 0xc9, 0xab, 0x94, 0x90, 0x94, 0xd2, 0x8a, 0xc3, 0x8d, 0x1d, 0x7a, 0x13, 0x35, 0x7f, 0x71, 0x65, 0x11, 0xd1, 0xb1, 0x2a, 0x29, 0x4b, 0xaa, 0x1f, 0xe6, 0xda, 0x6b, 0xf6, 0xd8, 0x1b, 0x83, 0xd, 0xcb, 0xac, 0xa4, 0xf4, 0xc0, 0x9a, 0x53, 0x33, 0x13, 0x79, 0xcb, 0x6c, 0x42, 0xc3, 0xad, 0xa8, 0xd6, 0x13, 0x22, 0xde, 0x1f, 0xfe, 0xcb, 0xb1, 0xa7, 0xaf, 0xe3, 0x27, 0x9f, 0x6e, 0xb6, 0x3c, 0x8f, 0x2, 0xa, 0x51, 0x92, 0x58, 0x62, 0x33, 0x4, 0x51, 0xa0, 0x0, 0x2a, 0x6e, 0x17, 0x55, 0xeb, 0x26, 0x4f, 0x3c, 0x74, 0xfb, 0x62, 0xdc, 0x92, 0xe9, 0xe6, 0xab, 0x82, 0x2c, 0x87, 0x62, 0xcb, 0x9f, 0x93, 0xcd, 0xf0, 0x65, 0x9a, 0x54, 0xa5, 0x69, 0x6a, 0xd1, 0x3e, 0xc6, 0xce, 0xcb, 0xae, 0xde, 0xba, 0x6a, 0x41, 0x32, 0x3d, 0x75, 0x40, 0xad, 0x59, 0x25, 0xf, 0x1f, 0xff, 0xe6, 0x16, 0xdd, 0xe6, 0x71, 0xd6, 0x73, 0xe3, 0x7d, 0x4a, 0x52, 0x13, 0x5, 0xe4, 0x7a, 0x64, 0x55, 0x76, 0xd6, 0xaf, 0x9a, 0x69, 0x91, 0xb1, 0x7f, 0x3c, 0x71, 0x19, 0xdb, 0x46, 0x3a, 0x76, 0xec, 0x93, 0x3f, 0x5, 0x90, 0x5a, 0x1d, 0xd6, 0x21, 0xad, 0x15, 0x77, 0x5e, 0xb9, 0x47, 0x5e, 0xb0, 0xcd, 0xeb, 0x6c, 0xd9, 0x3a, 0xcc, 0x12, 0xb, 0x39, 0x67, 0x82, 0x44, 0x56, 0x37, 0xf4, 0xf8, 0xdb, 0xb3, 0x8a, 0x3a, 0xa1, 0x75, 0x37, 0xd9, 0x17, 0xd, 0xaa, 0xe4, 0xe4, 0xdd, 0xd8, 0x99, 0xb1, 0x61, 0x68, 0xa2, 0xf9, 0xdc, 0x4b, 0xfd, 0xf7, 0xa9, 0xbe, 0xe0, 0x7b, 0xb9, 0xf7, 0xc3, 0x12, 0xef, 0xb7, 0x8d, 0x37, 0xae, 0x43, 0x73, 0x92, 0xda, 0xa7, 0x55, 0xb1, 0x84, 0xfc, 0x51, 0x10, 0xc, 0x54, 0xe8, 0x2f, 0xc1, 0x79, 0x2a, 0xa8, 0x7e, 0x58, 0x77, 0x8f, 0xbc, 0x15, 0xe, 0xdc, 0xb8, 0xc9, 0xf3, 0x37, 0x22, 0x7b, 0x4f, 0x6e, 0xa5, 0x83, 0x7d, 0xf8, 0xa0, 0x87, 0x19, 0x78, 0x93, 0x56, 0x28, 0x1c, 0x8f, 0xc7, 0xce, 0x6, 0x63, 0xea, 0xc9, 0xba, 0x76, 0xca, 0xa, 0xb5, 0x89, 0xcd, 0x3c, 0x5a, 0x82, 0xea, 0x2a, 0x1a, 0x99, 0x6d, 0x2c, 0xfd, 0xb2, 0x45, 0xf1, 0x90, 0x8a, 0xd7, 0x49, 0x34, 0x82, 0x3b, 0x93, 0x52, 0xff, 0x9, 0x39, 0xab, 0x22, 0x8f, 0x6f, 0x8c, 0x59, 0x98, 0xc, 0xcd, 0xa9, 0x84, 0xc2, 0x12, 0xa0, 0x89, 0x29, 0x28, 0xb8, 0x8d, 0xfc, 0x52, 0xc4, 0xfc, 0x34, 0x99, 0x7a, 0x6f, 0x2, 0x85, 0xf4, 0x51, 0xdb, 0x3a, 0x1d, 0x5d, 0xc4, 0xc8, 0x0, 0xb3, 0x3a, 0x68, 0x63, 0x85, 0x2c, 0x44, 0xa2, 0xe6, 0x75, 0xa9, 0x8b, 0x38, 0xee, 0x85, 0x26, 0xfb, 0x79, 0x4e, 0xee, 0x59, 0x29, 0x62, 0xa9, 0x38, 0x66, 0xe, 0x1b, 0x71, 0x14, 0xab, 0xcd, 0x42, 0x92, 0x4c, 0xa4, 0xd7, 0x0, 0x45, 0x80, 0x7c, 0x50, 0x98, 0x55, 0x65, 0xef, 0xe2, 0x4f, 0x33, 0x3, 0x98, 0x7c, 0x30, 0x7d, 0xe7, 0x54, 0xd8, 0x62, 0x5a, 0x5b, 0x73, 0x39, 0xf0, 0x54, 0xa9, 0xd, 0xb3, 0x7c, 0xe0, 0xb9, 0xf5, 0xba, 0x5, 0x95, 0x42, 0x5b, 0x26, 0x71, 0x2a, 0xf4, 0x43, 0x5a, 0xb8, 0x8, 0x2a, 0xe5, 0xbc, 0x1b, 0x21, 0x1f, 0xc6, 0xee, 0x44, 0x26, 0x2d, 0x26, 0xd8, 0x2a, 0x88, 0xe6, 0x62, 0xa4, 0x76, 0x88, 0xe3, 0xde, 0x67, 0xcf, 0x82, 0x5b, 0xc6, 0x2e, 0x1b, 0x3e, 0x3f, 0x62, 0x5b, 0x54, 0x81, 0x46, 0xe, 0xb, 0xac, 0x45, 0x1d, 0xb6, 0xb6, 0x7f, 0x40, 0xe9, 0xcb, 0x6b, 0x87, 0xc7, 0x7f, 0x2e, 0xe6, 0x37, 0x92, 0x30, 0x5e, 0xb6, 0x97, 0xb1, 0xf2, 0xf7, 0x57, 0x31, 0x80, 0xb8, 0x52, 0x61, 0x58, 0x41, 0xf6, 0xb9, 0xdc, 0x8e, 0x5b, 0xe4, 0x5, 0x19, 0xe9, 0xc2, 0xc7, 0x82, 0xfd, 0x0, 0x69, 0xb8, 0xd3, 0xb2, 0xac, 0xa3, 0x38, 0x53, 0xcd, 0x29, 0xcd, 0xb1, 0xfe, 0xc7, 0x35, 0xd2, 0x66, 0xab, 0x25, 0xef, 0xe2, 0xa0, 0xfd, 0x47, 0x47, 0x6e, 0x5c, 0xc1, 0x17, 0x3e, 0x97, 0x17, 0xbf, 0x40, 0x2c, 0x2, 0x84, 0x3e, 0x56, 0xbc, 0x70, 0xd9, 0x56, 0xa3, 0xda, 0xeb, 0xb0, 0xeb, 0x5f, 0x2, 0xa4, 0x2, 0x1e, 0x62, 0x59, 0xdf, 0x33, 0xb6, 0x5a, 0x36, 0x33, 0x65, 0xab, 0x7e, 0xae, 0xab, 0x33, 0x20, 0x71, 0x68, 0x42, 0xe7, 0xa, 0x86, 0xd3, 0xef, 0xa3, 0x55, 0xc, 0x59, 0xbc, 0xe, 0x14, 0xb0, 0x5e, 0x38, 0xab, 0x9c, 0x4e, 0x38, 0xfe, 0x9e, 0x7d, 0xcf, 0x9b, 0x30, 0x2, 0xef, 0x85, 0xb, 0x78, 0x99, 0xa0, 0xe1, 0x75, 0x39, 0x35, 0x9a, 0xd4, 0x32, 0x2d, 0x1d, 0x53, 0xaf, 0xbf, 0x9e, 0xc4, 0x5e, 0x1a, 0x63, 0x7e, 0x4f, 0xb, 0xa1, 0xd, 0x9d, 0x3b, 0x24, 0x4c, 0xd9, 0xf, 0xdb, 0xb4, 0x4f, 0x9e, 0x72, 0x0, 0xdc, 0xa9, 0x87, 0xb1, 0xa5, 0xe1, 0x25, 0x5c, 0x83, 0x3f, 0x3f, 0x9d, 0x5a, 0xf3, 0x50, 0x44, 0x79, 0xd6, 0xa9, 0x0, 0xd3, 0x19, 0x6, 0x64, 0xab, 0x93, 0x75, 0x54, 0x78, 0xcc, 0xe9, 0xa1, 0x60, 0xad, 0x79, 0x3d, 0x20, 0x61, 0xfe, 0x3b, 0xf8, 0xc2, 0x8e, 0x60, 0x11, 0x72, 0xd2, 0xb4, 0x68, 0x5d, 0x51, 0x70, 0x83, 0x14, 0x8c, 0x13, 0x68, 0xc4, 0xd8, 0x53, 0xb3, 0xa4, 0x18, 0x27, 0x20, 0xd4, 0x7c, 0xc7, 0x36, 0x3d, 0x95, 0x61, 0xef, 0x31, 0xf3, 0xc1, 0x8, 0xbb, 0x9f, 0x66, 0x42, 0xa3, 0x4f, 0xf3, 0x88, 0x46, 0xf3, 0x84, 0x64, 0x77, 0x1f, 0x49, 0x43, 0x47, 0x83, 0x9a, 0xb0, 0x72, 0xe8, 0xe9, 0xb7, 0x88, 0xce, 0xa5, 0x3, 0x30, 0xff, 0x72, 0x97, 0xf9, 0x42, 0x8f, 0x97, 0xd0, 0x95, 0xf7, 0x76, 0xb9, 0xde, 0x59, 0xe, 0x65, 0x50, 0xdf, 0xe2, 0xf3, 0x32, 0x73, 0xa3, 0x6d, 0x6a, 0x20, 0x11, 0x3, 0x97, 0x30, 0x32, 0x14, 0x74, 0x74, 0x33, 0x5a, 0x63, 0xe8, 0x3f, 0x4, 0xd7, 0xdb, 0xb9, 0x40, 0xf3, 0x89, 0x19, 0xbb, 0x45, 0xfc, 0xf7, 0xa4, 0xd2, 0xef, 0x84, 0x6e, 0xb2, 0x4f, 0xdc, 0x4d, 0xa6, 0x5d, 0xe5, 0x3e, 0x29, 0x22, 0xac, 0x7, 0xe1, 0x77, 0xf0, 0xfe, 0x1e, 0x65, 0xe8, 0x2c, 0xda, 0xf8, 0xf6, 0x59, 0x48, 0xeb, 0x1e, 0xaa, 0x3, 0x1f, 0x3, 0x71, 0xbc, 0x49, 0xf5, 0x47, 0xee, 0xce, 0x7c, 0x4c, 0xe9, 0x5, 0xae, 0x97, 0xee, 0x7d, 0xbb, 0xc7, 0x8a, 0xb3, 0x47, 0x57, 0x7a, 0xe3, 0x98, 0x51, 0x21, 0xfe, 0xb8, 0x11, 0x0, 0xd2, 0xbe, 0x2e, 0x57, 0x71, 0xc4, 0x11, 0x8f, 0x24, 0xe, 0xae, 0xbc, 0x3c, 0xed, 0xc9, 0x11, 0xec, 0x75, 0x88, 0x35, 0x9d, 0xa1, 0x89, 0x8, 0xee, 0x3d, 0x83, 0x2, 0xd5, 0xe5, 0x44, 0x38, 0x1b, 0x66, 0xdb, 0xed, 0x78, 0x5d, 0xd6, 0x84, 0xcd, 0xd, 0xb2, 0x74, 0xe6, 0x48, 0xad, 0xfc, 0xc3, 0x6a, 0xc8, 0x70, 0xdb, 0x86, 0x89, 0xdc, 0xcf, 0xea, 0x3c, 0xa0, 0x97, 0x11, 0xb0, 0xbf, 0xc3, 0x2c, 0x8b, 0x7f, 0x6, 0x76, 0xd6, 0x5d, 0x63, 0x76, 0x14, 0x22, 0xf0, 0x77, 0xc9, 0xcc, 0xaa, 0x2e, 0xc8, 0xb, 0xbd, 0xf7, 0x42, 0x62, 0x9e, 0xfa, 0x5d, 0x9c, 0x4c, 0xe5, 0xb3, 0x23, 0x8e, 0xcc, 0x5, 0xe1, 0x80, 0x4a, 0x7c, 0x4, 0x4b, 0xae, 0x3b, 0xb4, 0xdc, 0x3a, 0xd6, 0xaa, 0x3c, 0x59, 0x2f, 0x71, 0xda, 0x7f, 0x54, 0x81, 0x48, 0xaa, 0x11, 0xf3, 0x52, 0xd2, 0xf0, 0xd0, 0x9b, 0x84, 0xfb, 0x8f, 0x5b, 0xe6, 0x29, 0xc3, 0xaa, 0x7c, 0x68, 0xd9, 0x80, 0x29, 0x4a, 0x6a, 0x17, 0x26, 0x69, 0xbe, 0x5d, 0x98, 0x75, 0x88, 0x1, 0x4b, 0xdc, 0x1e, 0x91, 0x74, 0x63, 0xb8, 0x29, 0xed, 0x62, 0x3b, 0x87, 0xbc, 0x5f, 0xf2, 0x6, 0x75, 0xdf, 0x37, 0xbe, 0x1, 0x97, 0xa5, 0xe2, 0xf4, 0x88, 0x91, 0xe6, 0xca, 0xdd, 0x2e, 0xd8, 0x60, 0xce, 0x15, 0x43, 0x54, 0xd4, 0x85, 0x4e, 0x6d, 0x8, 0xf0, 0xa2, 0x8e, 0x67, 0x3c, 0x7a, 0x15, 0x2f, 0xf2, 0xfe, 0xb7, 0x63, 0x4f, 0x0, 0x85, 0xfb, 0xca, 0xb1, 0xfb, 0x20, 0x5c, 0xcf, 0x36, 0x60, 0xfa, 0x28, 0x8f, 0x5d, 0x21, 0x42, 0x12, 0x34, 0x3b, 0x54, 0x85, 0x93, 0x4a, 0x25, 0x6f, 0x4, 0x33, 0x96, 0xa0, 0x39, 0x53, 0x9c, 0xda, 0x52, 0xdb, 0x6c, 0x47, 0xa3, 0xab, 0x7e, 0x23, 0x74, 0xcb, 0x28, 0x70, 0xe1, 0x4c, 0xa6, 0x42, 0x33, 0x12, 0xd2, 0xa9, 0xc4, 0x8f, 0x67, 0x35, 0x2e, 0x1e, 0xa2, 0x73, 0x27, 0x7, 0xca, 0x11, 0x78, 0x5d, 0x8c, 0x27, 0x35, 0x1c, 0xa7, 0x69, 0x14, 0x1d, 0x20, 0x90, 0xe7, 0x94, 0x72, 0x64, 0x5a, 0xf2, 0x72, 0x9c, 0x15, 0x84, 0x79, 0xb4, 0xd1, 0x38, 0xb1, 0xbc, 0xea, 0xac, 0x70, 0xab, 0x7d, 0xd2, 0x21, 0xbd, 0x89, 0xee, 0xdd, 0x8e, 0x15, 0x32, 0x15, 0xe5, 0x22, 0xc8, 0x37, 0xd7, 0x55, 0x4f, 0x45, 0xe8, 0x87, 0x7b, 0x65, 0x44, 0xf7, 0x7, 0x1d, 0x45, 0xe7, 0xec, 0x54, 0x5f, 0x7f, 0x9b, 0xb2, 0x7d, 0xb9, 0x5e, 0x9a, 0xb2, 0x29, 0x8c, 0x8a, 0x51, 0x3d, 0x2a, 0x2f, 0xf8, 0x82, 0x8f, 0x24, 0x39, 0x82, 0xfd, 0xf2, 0x3e, 0x48, 0x29, 0xd0, 0xfd, 0x81, 0x1e, 0x9c, 0x19, 0xe7, 0xb2, 0x96, 0xd, 0x8c, 0x97, 0x6e, 0x3e, 0xe6, 0x53, 0x78, 0x8c, 0x26, 0x26, 0x92, 0x21, 0xb, 0x5d, 0x10, 0x5c, 0x73, 0x26, 0x8f, 0x92, 0xa5, 0xb2, 0xec, 0xf6, 0xc2, 0x83, 0xd8, 0x58, 0x74, 0xb5, 0xae, 0x3f, 0x37, 0xbd, 0xc5, 0x20, 0xe2, 0xf4, 0x17, 0x5f, 0xcf, 0xb2, 0x17, 0x5c, 0x57, 0xf4, 0x60, 0x96, 0xf9, 0xee, 0xa1, 0xe0, 0xc7, 0x60, 0x80, 0xc7, 0x65, 0xc7, 0x51, 0x93, 0xa9, 0x56, 0x3e, 0xd5, 0xad, 0x6e, 0xa, 0xae, 0xa, 0xb0, 0xf3, 0xf9, 0x44, 0x59, 0xae, 0x4b, 0x9a, 0xb0, 0xba, 0xaf, 0x30, 0x2e, 0x70, 0xc0, 0x8d, 0x58, 0xc1, 0xe1, 0xda, 0x83, 0x8, 0xfd, 0xca, 0x1b, 0xab, 0x17, 0x2a, 0xeb, 0x7, 0xd3, 0x7e, 0x79, 0xaf, 0xee, 0x3f, 0x30, 0x67, 0xdd, 0xad, 0x92, 0xbd, 0x4f, 0x51, 0xf5, 0x1e, 0xc8, 0xe6, 0x47, 0xb2, 0x12, 0xff, 0x9, 0x7, 0xc9, 0x7, 0x8c, 0xdd, 0xbd, 0x40, 0x59, 0xfd, 0xf2, 0x23, 0x50, 0x24, 0x1c, 0xa5, 0x8, 0x93, 0x54, 0x42, 0x46, 0x3a, 0x6c, 0x23, 0xac, 0x28, 0xb2, 0xc2, 0xa9, 0x68, 0xa7, 0xdb, 0x22, 0xe8, 0xe7, 0xd4, 0xcc, 0x9d, 0xcb, 0x3f, 0xb1, 0x17, 0x97, 0x43, 0x9c, 0xc0, 0x9, 0x5f, 0x45, 0xd2, 0x1e, 0x7, 0x53, 0x90, 0xce, 0x34, 0x83, 0xdc, 0xd0, 0x94, 0x63, 0xa4, 0xe9, 0x77, 0xb5, 0x6c, 0xa1, 0x9f, 0xfe, 0x4c, 0x6f, 0xba, 0x28, 0x87, 0x4d, 0x96, 0xac, 0x2c, 0x66, 0xb6, 0x57, 0x31, 0x43, 0x3, 0xaa, 0x68, 0x83, 0x92, 0x62, 0x73, 0x3e, 0x90, 0x3f, 0x7, 0x4a, 0x14, 0x63, 0xa2, 0xdd, 0xc8, 0xea, 0x1, 0x6f, 0x68, 0x2, 0xf9, 0x17, 0x61, 0x4c, 0x3c, 0xf4, 0x4d, 0xae, 0x4b, 0x4f, 0x6e, 0x78, 0xf5, 0x6, 0x21, 0xb0, 0x17, 0xb6, 0xd4, 0x22, 0x65, 0x99, 0x7f, 0x59, 0x6e, 0xbf, 0xd7, 0xc1, 0x38, 0x8b, 0xdf, 0xef, 0x98, 0x3c, 0xc9, 0x1b, 0x9f, 0x98, 0xc1, 0x7f, 0x85, 0xc1, 0x0, 0xcb, 0x37, 0xdc, 0x40, 0xc3, 0x1f, 0xfa, 0xf2, 0xc8, 0x82, 0xa2, 0x71, 0xc7, 0xf6, 0xdd, 0xfa, 0x94, 0xbf, 0x69, 0xc7, 0xe5, 0xc, 0xb6, 0xd7, 0x8e, 0x48, 0x9f, 0x6d, 0xdf, 0xd2, 0x6e, 0x34, 0xed, 0xbd, 0xc9, 0xa6, 0xfe, 0xa4, 0xff, 0xcb, 0x76, 0x78, 0xfa, 0x60, 0x9c, 0x8d, 0x0, 0x69, 0x33, 0xf4, 0xbe, 0xcb, 0x85, 0x28, 0x3b, 0x13, 0xc0, 0x4c, 0x6a, 0x27, 0xa8, 0x9b, 0xc, 0x2c, 0xd2, 0x71, 0x25, 0xde, 0xc2, 0xc4, 0x96, 0x46, 0x49, 0x62, 0x88, 0xeb, 0xb1, 0x62, 0xce, 0xc4, 0xd5, 0xa3, 0xe, 0x3b, 0x83, 0xa9, 0xb, 0x54, 0xac, 0x61, 0x81, 0x2a, 0x90, 0x80, 0x14, 0xf9, 0xd2, 0x2c, 0xa2, 0x1f, 0x98, 0xc1, 0x23, 0x57, 0x2, 0x89, 0x71, 0x90, 0xe, 0x57, 0xac, 0xf8, 0xeb, 0xf0, 0x95, 0x68, 0x7e, 0x2d}, - output224: []byte{0xae, 0x53, 0x34, 0xfb, 0x23, 0x39, 0xd2, 0x88, 0xd3, 0x73, 0xf4, 0x36, 0x73, 0x25, 0xf6, 0xa0, 0x6a, 0x3e, 0x78, 0x16, 0x9b, 0xf8, 0x1b, 0x3c, 0xca, 0x8, 0x8a, 0x82}, - output256: []byte{0x62, 0xe8, 0x37, 0xa8, 0x3d, 0x1c, 0xc3, 0xf6, 0x30, 0x64, 0x20, 0xf0, 0x91, 0xea, 0x71, 0xf6, 0x1d, 0xdc, 0x73, 0xe4, 0xbc, 0x1d, 0x3a, 0xd6, 0x38, 0xae, 0x28, 0xda, 0xae, 0x69, 0xb5, 0x83}, - output384: []byte{0x68, 0x7a, 0xb7, 0xc4, 0xb4, 0xda, 0xc4, 0xa, 0xf8, 0x40, 0x80, 0xb3, 0xea, 0x25, 0x13, 0x7c, 0x1, 0xb0, 0x7b, 0x54, 0x66, 0x51, 0xdd, 0xbf, 0xa9, 0x8f, 0x35, 0x9e, 0xea, 0xf3, 0x4, 0x31, 0x3d, 0xd2, 0x7b, 0x95, 0x50, 0x0, 0xaa, 0x7b, 0x35, 0x66, 0x50, 0xf6, 0x85, 0x4c, 0x67, 0xee}, - output512: []byte{0xe, 0xd0, 0x15, 0x74, 0xe6, 0x5, 0x4a, 0x13, 0xdc, 0x63, 0x67, 0xfc, 0x47, 0xda, 0xa2, 0x42, 0x8, 0xf0, 0x25, 0x11, 0x51, 0x48, 0x84, 0x5b, 0x4, 0xb4, 0xa, 0xc2, 0x38, 0xf6, 0x15, 0x89, 0x37, 0x8d, 0xc1, 0x9c, 0x65, 0x2a, 0x50, 0x91, 0xd0, 0xc7, 0xf9, 0x25, 0xff, 0x1d, 0x5c, 0x7e, 0x6, 0x27, 0x28, 0xae, 0xf4, 0x6, 0xa2, 0xad, 0x75, 0xf6, 0x1f, 0xb8, 0x78, 0xfb, 0x5e, 0x78}}, - testcase{ - msg: []byte{0x6, 0x72, 0x90, 0x47, 0xc0, 0xd4, 0xa7, 0xb3, 0x2, 0x8, 0x65, 0xf5, 0x27, 0xf0, 0x65, 0x7e, 0xa5, 0x39, 0x7e, 0xb5, 0x80, 0x90, 0xab, 0xd0, 0x19, 0x12, 0xc4, 0x85, 0xe7, 0x38, 0x54, 0xaa, 0x9a, 0xa0, 0x39, 0x4c, 0xb5, 0x3d, 0x53, 0xe3, 0xd2, 0x40, 0xd1, 0xbd, 0x6c, 0xbd, 0x1e, 0x1e, 0x35, 0x35, 0x29, 0xcb, 0x87, 0x83, 0x3b, 0x5f, 0x47, 0x64, 0x83, 0xe6, 0x84, 0xf1, 0x17, 0x48, 0xd5, 0xab, 0x7a, 0x1f, 0x18, 0xf5, 0xb7, 0x6e, 0x59, 0x38, 0x45, 0x84, 0x86, 0xd4, 0xd5, 0xb1, 0xfe, 0x1a, 0xf7, 0xec, 0x2a, 0x13, 0x9c, 0xf5, 0xc4, 0xb7, 0x55, 0x16, 0x5e, 0x18, 0x2f, 0x23, 0xb9, 0xe6, 0x9e, 0xde, 0xdc, 0x39, 0x37, 0x5f, 0xf, 0x87, 0xb2, 0x4d, 0xab, 0x23, 0x30, 0x49, 0xdb, 0xb, 0x34, 0x62, 0x7d, 0x53, 0xda, 0xba, 0xd0, 0xac, 0x33, 0x51, 0xfd, 0xd9, 0x40, 0x10, 0xdb, 0x51, 0xad, 0x31, 0x82, 0xf1, 0xb1, 0x27, 0x6c, 0x49, 0x82, 0x96, 0xdd, 0xd7, 0x59, 0xad, 0xc3, 0x38, 0x4e, 0xe9, 0x49, 0xe4, 0xb2, 0xb6, 0x41, 0x2c, 0xfe, 0x3e, 0x8e, 0xf7, 0x69, 0xdc, 0xaf, 0x76, 0xbe, 0x4b, 0x2f, 0xed, 0xce, 0x5, 0x45, 0x15, 0xee, 0x24, 0xf7, 0x60, 0x1e, 0xb1, 0x55, 0x35, 0x16, 0x18, 0x79, 0x54, 0xbc, 0x6, 0x89, 0xef, 0x27, 0x80, 0x71, 0xea, 0x7b, 0x95, 0xd5, 0x8e, 0x7f, 0xf2, 0x11, 0x6b, 0x45, 0x7, 0x28, 0xe4, 0x75, 0x71, 0x14, 0xa, 0xb1, 0xa, 0x32, 0x7c, 0x8e, 0x6d, 0x33, 0x3e, 0xf0, 0x44, 0xdf, 0xa1, 0x8, 0x66, 0xa8, 0x2b, 0x97, 0x28, 0xd3, 0xf5, 0xf3, 0x43, 0xe1, 0xb3, 0x30, 0x64, 0xe1, 0xe8, 0x60, 0x88, 0x1d, 0xf0, 0x5d, 0x78, 0xb7, 0x7b, 0x1f, 0x36, 0x3d, 0xa7, 0xd3, 0xee, 0x42, 0x9, 0xe8, 0xe2, 0x42, 0x6b, 0x69, 0x69, 0xb5, 0x54, 0x4a, 0xfd, 0x81, 0x34, 0x3f, 0xaa, 0xce, 0xe9, 0x15, 0x26, 0x9c, 0x6d, 0x3b, 0x12, 0xc2, 0x2f, 0x2a, 0x5f, 0xa4, 0xe7, 0xa5, 0x18, 0xc5, 0x53, 0x92, 0x28, 0x37, 0x31, 0x92, 0xf8, 0x5d, 0x81, 0x23, 0x10, 0x5b, 0x4, 0xc2, 0x86, 0x6d, 0xeb, 0x89, 0x67, 0xe7, 0xce, 0xc3, 0xc0, 0xfc, 0xce, 0xda, 0x19, 0xfd, 0xb8, 0x4c, 0x72, 0x59, 0x7e, 0xe, 0xdf, 0xee, 0xc6, 0x20, 0xf8, 0x38, 0xe, 0x3c, 0xd5, 0xb5, 0xac, 0x20, 0x53, 0xea, 0xe4, 0x4, 0xcd, 0x60, 0x52, 0xaa, 0xe7, 0xbc, 0x7c, 0x66, 0x66, 0x28, 0xaa, 0xc1, 0xfc, 0x72, 0x22, 0x44, 0xa6, 0xe8, 0x5, 0x36, 0x24, 0x6c, 0x98, 0x94, 0xc4, 0x7b, 0xdc, 0xda, 0x71, 0xc2, 0x39, 0xe2, 0xfd, 0x27, 0x6e, 0x6e, 0x4, 0x1d, 0xf8, 0xa9, 0x30, 0x63, 0x9f, 0x79, 0x93, 0x30, 0xd, 0x68, 0xfd, 0xa7, 0xe2, 0xea, 0xcb, 0x31, 0xf, 0x49, 0xd4, 0x80, 0x49, 0xa8, 0xb6, 0xb1, 0xbe, 0x42, 0xfe, 0xd5, 0xbb, 0x26, 0x17, 0x9d, 0x6e, 0x43, 0x28, 0xe6, 0x4, 0x11, 0xaf, 0xa7, 0xbb, 0xea, 0x12, 0x2e, 0xa9, 0x3, 0x74, 0x50, 0xd8, 0xe, 0x5f, 0xdf, 0x13, 0xc9, 0x3b, 0xb7, 0x19, 0xb, 0xf4, 0x47, 0xe3, 0x0, 0x8a, 0x34, 0xec, 0xa6, 0xea, 0xe0, 0x8a, 0xc7, 0x1a, 0x54, 0x46, 0xbb, 0x56, 0x8d, 0x4d, 0xf8, 0xca, 0x45, 0x12, 0xb9, 0xbb, 0xef, 0x21, 0x64, 0x8a, 0xcf, 0x2d, 0xfe, 0xc9, 0x5c, 0xd2, 0xd2, 0x98, 0x5c, 0x97, 0xc4, 0x61, 0xda, 0x65, 0x1c, 0x1c, 0x87, 0xdf, 0xae, 0x35, 0x66, 0x8c, 0x0, 0x80, 0x1, 0x1, 0x7a, 0x48, 0x29, 0x2b, 0x4b, 0xb, 0x5, 0xc, 0x0, 0x12, 0x44, 0x46, 0x59, 0x4f, 0xb2, 0x7a, 0x41, 0x8e, 0x35, 0x49, 0x17, 0x1d, 0x15, 0x1e, 0x57, 0x94, 0x7, 0xa, 0xca, 0xaa, 0xa9, 0x7b, 0x88, 0x4, 0x5a, 0xeb, 0x3b, 0xdf, 0xfe, 0xa9, 0xcb, 0x33, 0x72, 0x95, 0xc, 0xdd, 0x72, 0x73, 0x50, 0xee, 0xfd, 0xf0, 0x6e, 0x76, 0x52, 0xbc, 0xd1, 0x91, 0x3, 0x12, 0xb3, 0x5f, 0x5d, 0x4e, 0xf3, 0xb8, 0x41, 0x8b, 0xbe, 0xeb, 0x52, 0x65, 0x7a, 0x36, 0xcc, 0xb7, 0x97, 0x9c, 0xca, 0xbe, 0xc0, 0xc4, 0xb2, 0xd2, 0x20, 0x14, 0xf6, 0xf, 0xe, 0x84, 0x7d, 0xed, 0x96, 0x69, 0x8a, 0x81, 0xa7, 0xf2, 0xf3, 0xe3, 0x59, 0x32, 0xcc, 0x5d, 0x34, 0xd3, 0xa5, 0xec, 0x36, 0x65, 0x7, 0xdc, 0xf1, 0x79, 0x30, 0x9c, 0x1f, 0x4d, 0xe6, 0x1, 0x88, 0x6, 0x28, 0x48, 0x76, 0xa9, 0x6c, 0xc9, 0xbc, 0x54, 0xfb, 0x5d, 0x9e, 0x5b, 0x31, 0x27, 0xc7, 0x47, 0x23, 0xe0, 0xc3, 0xaf, 0x1f, 0xff, 0xb0, 0x1e, 0x4e, 0xde, 0x2c, 0x59, 0x41, 0x3f, 0x1f, 0xf5, 0x6f, 0x83, 0x46, 0xc7, 0x1e, 0x30, 0xde, 0x5a, 0x66, 0xfe, 0x94, 0x87, 0x8c, 0xd, 0x7a, 0x21, 0x7d, 0x75, 0x4c, 0x94, 0xa7, 0xc3, 0xac, 0xae, 0x3a, 0xd2, 0x64, 0xa3, 0xd2, 0xc7, 0xdf, 0x93, 0xaa, 0x29, 0xb4, 0xe0, 0xa1, 0xab, 0x96, 0x6e, 0x36, 0xfc, 0x8a, 0x81, 0xcd, 0xde, 0x9c, 0x49, 0x2e, 0x4a, 0x9, 0xa9, 0xc6, 0x1e, 0x63, 0xc5, 0x40, 0xa4, 0x57, 0x48, 0x9c, 0x7c, 0xe6, 0xd9, 0xef, 0x30, 0x46, 0xc7, 0x78, 0x12, 0xb9, 0x72, 0x37, 0x83, 0x3d, 0xa0, 0xd8, 0xe6, 0xda, 0x30, 0x3, 0x2, 0x21, 0xc, 0xc0, 0x9, 0xf3, 0x9b, 0xea, 0xaa, 0xe, 0xd1, 0xaa, 0x10, 0x7f, 0xf0, 0xc0, 0x6d, 0x21, 0xc, 0xa6, 0x78, 0xac, 0xd3, 0x57, 0x70, 0x9b, 0x25, 0x24, 0x2d, 0xa3, 0xde, 0x14, 0x4b, 0xb3, 0x97, 0xd9, 0xa3, 0xcf, 0x84, 0x41, 0x3, 0x97, 0x66, 0x40, 0x7a, 0x67, 0xbc, 0x92, 0x97, 0xc1, 0x8, 0xe7, 0xa1, 0x1e, 0x98, 0xb0, 0x90, 0x46, 0xb4, 0x86, 0x6c, 0x9a, 0x91, 0x28, 0x17, 0xb6, 0x56, 0x8a, 0x4, 0xce, 0x10, 0xf4, 0x3b, 0xac, 0x7b, 0xf2, 0x11, 0xda, 0xeb, 0x90, 0xec, 0x1a, 0x28, 0x14, 0x37, 0xb5, 0x5f, 0x88, 0xc6, 0xe8, 0x83, 0xef, 0x9a, 0x27, 0x1d, 0x85, 0x73, 0xea, 0xcd, 0x96, 0x53, 0x60, 0xfd, 0x8f, 0x84, 0xda, 0xdd, 0x72, 0xea, 0xa1, 0x23, 0x77, 0xa7, 0xe1, 0xf4, 0x7f, 0xa4, 0x9b, 0xd7, 0xc3, 0x96, 0x1a, 0x15, 0xef, 0x5c, 0x31, 0x1c, 0xe6, 0x2c, 0xcb, 0x43, 0x3, 0x2c, 0xd8, 0x6c, 0x50, 0x9a, 0x10, 0xe, 0xf8, 0xa2, 0x50, 0xee, 0x84, 0xb9, 0xf7, 0xf9, 0x73, 0x1, 0x96, 0xa8, 0x6a, 0xde, 0xe9, 0x2f, 0xa9, 0x32, 0x33, 0xb2, 0xe3, 0x2c, 0x87, 0xaf, 0x90, 0x91, 0x5b, 0x23, 0xb4, 0x4c, 0xda, 0x91, 0x86, 0xdd, 0x51, 0xeb, 0x9a, 0x4, 0x9c, 0x47, 0x8c, 0x2a, 0x5b, 0x36, 0x38, 0x31, 0xac, 0x5f, 0xd1, 0x70, 0xdc, 0x84, 0x31, 0x24, 0x40, 0xaa, 0x8c, 0x83, 0xb7, 0xfc, 0x44, 0x25, 0x4b, 0xe6, 0xf4, 0xe8, 0x1f, 0xf2, 0xd6, 0x6f, 0x57, 0xb1, 0x2d, 0x78, 0x90, 0x5b, 0x89, 0x60, 0xe, 0x53, 0x77, 0x54, 0xa4, 0x6c, 0xc5, 0xb6, 0xc5, 0xce, 0x2b, 0x6b, 0x4, 0xf8, 0xd6, 0xf1, 0xcb, 0x60, 0x35, 0x95, 0x39, 0x2, 0x3b, 0xaf, 0xc7, 0x8a, 0xa0, 0xe8, 0x34, 0xba, 0x87, 0x9, 0x43, 0x3f, 0x8c, 0x6f, 0xa, 0xdd, 0x3d, 0x4d, 0x74, 0x3f, 0x4b, 0x6f, 0xb4, 0x84, 0xc1, 0xa, 0x42, 0x67, 0x50, 0x50, 0x97, 0x8, 0x2f, 0x30, 0xba, 0x7d, 0xb8, 0x1b, 0xdb, 0x24, 0x76, 0xca, 0xe4, 0x52, 0xb4, 0xf, 0x67, 0x40, 0x95, 0x36, 0x14, 0x14, 0x28, 0xb2, 0x64, 0xcd, 0xb8, 0x32, 0xd1, 0xd6, 0x11, 0xce, 0xfb, 0x5d, 0x4d, 0x13, 0x26, 0x42, 0x8f, 0x97, 0x78, 0xf9, 0x29, 0xc8, 0xc1, 0x82, 0x34, 0x60, 0x42, 0xcf, 0xa5, 0xfa, 0xff, 0x8, 0x19, 0x66, 0x7e, 0xf4, 0xed, 0x29, 0xe8, 0xd9, 0x22, 0x79, 0xa2, 0x99, 0x95, 0x45, 0xc3, 0x33, 0x52, 0x85, 0xf0, 0x72, 0xdc, 0x95, 0x2e, 0x7c, 0x7f, 0xc1, 0x11, 0x6e, 0xd0, 0xc5, 0x11, 0x5c, 0x6c, 0xe7, 0xad, 0xc9, 0x93, 0xc2, 0x3a, 0x8b, 0xc, 0x96, 0xc2, 0x88, 0x4f, 0x70, 0x81, 0x7b, 0x5c, 0x90, 0x63, 0xc7, 0x5f, 0xf1, 0x87, 0x5a, 0x7b, 0x8, 0xb, 0x76, 0xb9, 0xaa, 0x32, 0xe6, 0xf7, 0xe4, 0xe8, 0x46, 0x4a, 0xfa, 0x40, 0xf7, 0x12, 0x3a, 0xc7, 0x9c, 0x45, 0xd8, 0x8d, 0xaa, 0xc7, 0x1d, 0x76, 0xf7, 0x95, 0xf1, 0x92, 0xc6, 0xce, 0xbd, 0xe8, 0xc9, 0x9f, 0x10, 0xce, 0xb9, 0xe9, 0xf, 0x2, 0x2e, 0x58, 0x1, 0xa7, 0x89, 0x22, 0xf3, 0x89, 0x72, 0x5b, 0xb2, 0x36, 0xaf, 0xb5, 0xdc, 0x28, 0xcb, 0xbf, 0x1c, 0x9b, 0xe9, 0x61, 0x7c, 0xea, 0x56, 0xc8, 0xc, 0x53, 0x1b, 0xb7, 0xac, 0x22, 0x7f, 0x6b, 0x99, 0x6c, 0x68, 0x58, 0x3b, 0x74, 0xbf, 0xf7, 0x8e, 0xf4, 0x4d, 0x18, 0x5e, 0xd, 0xe, 0x5e, 0x9d, 0x6f, 0x34, 0xb2, 0x50, 0xdc, 0xc4, 0x63, 0x9e, 0x3a, 0x1a, 0x93, 0x7c, 0xdb, 0x96, 0xe7, 0x8a, 0x21, 0x7e, 0x3, 0xac, 0x90, 0x8, 0x34, 0xb4, 0xab, 0xaa, 0x49, 0x5c, 0x9b, 0xd9, 0xdb, 0xc2, 0xc4, 0xe8, 0x54, 0x63, 0xcd, 0x1c, 0x6d, 0x1f, 0x4d, 0x87, 0x46, 0xee, 0x4b, 0x58, 0xba, 0xd7, 0x8c, 0xbe, 0xe2, 0x1c, 0xa3, 0xe5, 0x3e, 0x6b, 0x6d, 0x42, 0x64, 0x5f, 0xb9, 0x6c, 0x94, 0x17, 0xa3, 0x74, 0xeb, 0x62, 0xdf, 0x7f, 0x7d, 0x23, 0x98, 0x3b, 0x53, 0xe1, 0xda, 0x75, 0x44, 0x87, 0xf3, 0xc0, 0x71, 0x17, 0x12, 0x49, 0x9d, 0xae, 0xea, 0x9e, 0x6a, 0xb9, 0x39, 0xcb, 0xeb, 0xea, 0x79, 0xd5, 0xb9, 0xc7, 0x29, 0x9c, 0x6, 0xce, 0x53, 0xcc, 0x8b, 0xc, 0x8f, 0x83, 0x81, 0xe0, 0x4c, 0x52, 0x5c, 0xc6, 0x91, 0x44, 0x33, 0x18, 0xb7, 0xe, 0x44, 0x7e, 0x83, 0xf4, 0x85, 0xe1, 0x8e, 0xbe, 0x45, 0x24, 0xdf, 0xf, 0xe0, 0xf4, 0x7e, 0xcb, 0xba, 0x87, 0xee, 0xfe, 0x4f, 0x70, 0x9b, 0x7c, 0x84, 0x27, 0x4f, 0x3, 0x7e, 0x89, 0xd3, 0xe1, 0x40, 0xdc, 0x2b, 0xd6, 0x8, 0xf8, 0xbc, 0xd5, 0xf5, 0x1b, 0x3f, 0xbf, 0x4e, 0xf9, 0x3e, 0xdb, 0xd4, 0x5a, 0xa7, 0xae, 0x53, 0x26, 0xd1, 0x8b, 0x71, 0x9a, 0x5d, 0xc6, 0xae, 0x91, 0x40, 0xe, 0x2b, 0x6c, 0x88, 0xe6, 0x99, 0xc9, 0xf9, 0xa9, 0x5b, 0xab, 0xe3, 0x3e, 0x98, 0x39, 0x7f, 0x77, 0xfb, 0xf, 0xcc, 0xea, 0x59, 0xf3, 0xbc, 0x2, 0xa4, 0x79, 0xe6, 0xfe, 0x10, 0x59, 0xdf, 0xed, 0x54, 0x66, 0x44, 0xdf, 0xbe, 0xc3, 0xf2, 0xf, 0xbd, 0xf4, 0xaa, 0x53, 0xd0, 0x25, 0xc6, 0x6d, 0xab, 0x24, 0x87, 0x50, 0x21, 0xd7, 0x93, 0x4e, 0xcb, 0xcc, 0x6, 0x19, 0xaa, 0xbe, 0x7f, 0x55, 0x3c, 0x92, 0x87, 0xdd, 0x6f, 0xb9, 0x16, 0xd2, 0xc5, 0xb8, 0xda, 0x77, 0x55, 0x5d, 0x91, 0x59, 0x7d, 0x89, 0x5b, 0x9f, 0x8e, 0xc, 0x60, 0x1e, 0xbc, 0xd3, 0x83, 0x64, 0xc9, 0x1f, 0x28, 0x44, 0x5c, 0xe0, 0x9d, 0x44, 0x5a, 0x9e, 0x71, 0x49, 0x3f, 0xe3, 0x5f, 0xf7, 0x23, 0x14, 0x9e, 0x73, 0xde, 0xa9, 0xee, 0xd1, 0xe1, 0x95, 0x17, 0xb5, 0xa7, 0x35, 0xf7, 0xab, 0xd8, 0xd9, 0x2d, 0x45, 0x47, 0x2e, 0xef, 0x1d, 0x2c, 0x4e, 0xaa, 0xad, 0x6f, 0xdb, 0xbe, 0x95, 0x70, 0x95, 0xb, 0xee, 0x94, 0x61, 0x3a, 0xe2, 0xa9, 0x34, 0xe1, 0xa2, 0xc7, 0xee, 0x89, 0x9f, 0x28, 0x61, 0xae, 0x17, 0xbf, 0x8d, 0x60, 0xfc, 0xc1, 0x0, 0x5a, 0xbe, 0xc7, 0x24, 0xc, 0x7e, 0xf9, 0x8e, 0x7d, 0xf4, 0x42, 0xe5, 0x87, 0xfe, 0x24, 0x7, 0xcd, 0xed, 0xaf, 0x6c, 0x4a, 0xd7, 0x25, 0xfe, 0x54, 0xac, 0x88, 0xa, 0x47, 0x53, 0xe, 0x8, 0xb6, 0x45, 0x2f, 0x5d, 0x9d, 0x4, 0x48, 0x33, 0xcd, 0x11, 0x7e, 0xe4, 0xe1, 0xa2, 0x42, 0xfd, 0xc0, 0x75, 0x45, 0xaa, 0x74, 0xb5, 0x59, 0xd3, 0x94, 0xd8, 0x37, 0xe5, 0x5e, 0xbf, 0x7, 0xfd, 0x2d, 0x67, 0x71, 0x81, 0x1d, 0xf9, 0x57, 0x91, 0xe2, 0x93, 0xa5, 0x2a, 0x97, 0x2b, 0x68, 0x24, 0x46, 0xa2, 0x9c, 0x4c, 0xe3, 0xe0, 0x2f, 0x71, 0x56, 0x5d, 0x53, 0x7d, 0x12, 0xee, 0xe2, 0x1e, 0x1f, 0xf5, 0x58, 0xc9, 0xb7, 0x4f, 0xd4, 0x91, 0x4c, 0x66, 0x84, 0xab, 0x89, 0x7d, 0x9c, 0x4f, 0xcc, 0x4a, 0x5f, 0x26, 0x85, 0xb7, 0x8a, 0x81, 0x62, 0xdc, 0x1b, 0xb7, 0x2, 0x3, 0xf5, 0x0, 0x5a, 0xcc, 0x2, 0x57, 0x25, 0x2e, 0xf, 0xf9, 0xef, 0xc4, 0x3b, 0x10, 0x2e, 0x9, 0xe9, 0x22, 0x1b, 0xf9, 0x8, 0xb8, 0x3b, 0x49, 0x7a, 0x88, 0xed, 0x83, 0xd0, 0xdb, 0x7c, 0x8f, 0xac, 0xa7, 0x41, 0xa2, 0x8b, 0xc5, 0xa9, 0x10, 0x4, 0x87, 0x64, 0xc5, 0x9, 0x8a, 0xa7, 0xb4, 0x19, 0xf2, 0x4a, 0xe5, 0xe1, 0xe2, 0xb0, 0x13, 0x40, 0x5e, 0x39, 0x76, 0xd9, 0x38, 0xe7, 0x81, 0xfb, 0xb1, 0xb, 0xa6, 0x79, 0xe8, 0x55, 0xd2, 0xfd, 0xcb, 0x77, 0x2e, 0xe9, 0x6b, 0xa2, 0x64, 0x20, 0x8c, 0xf4, 0x81, 0x26, 0x7, 0xee, 0xb, 0xe5, 0x8c, 0x30, 0x75, 0x68, 0x6, 0x37, 0x89, 0xac, 0x78, 0x3e, 0xc9, 0x37, 0xc6, 0x86, 0x7, 0xc8, 0x7c, 0xd0, 0xf, 0x34, 0xeb, 0xfc, 0xfd, 0x26, 0x35, 0xe5, 0xc6, 0xb2, 0xf7, 0xd8, 0x84, 0x69, 0xfd, 0xf8, 0x72, 0x3b, 0x81, 0x31, 0x2d, 0x34, 0x2, 0xc1, 0xae, 0x85, 0xc3, 0xc1, 0x20, 0x23, 0x88, 0x9, 0x40, 0x59, 0x51, 0x75, 0xd5, 0x86, 0x29, 0x8d, 0x21, 0x56, 0x61, 0xa3, 0x8a, 0x36, 0x3d, 0xf4, 0x26, 0x3a, 0x51, 0xf4, 0x34, 0x36, 0x2f, 0xd5, 0xa1, 0x1b, 0xf6, 0x9b, 0x12, 0x10, 0x65, 0xbb, 0x8, 0xce, 0xb2, 0xda, 0xf2, 0xd9, 0xf8, 0x44, 0x64, 0x69, 0x16, 0xe4, 0xa2, 0xaf, 0xba, 0xba, 0x77, 0x99, 0x9e, 0x76, 0x64, 0xaf, 0x96, 0x70, 0xcb, 0xf6, 0x8e, 0x7e, 0x4b, 0x10, 0x83, 0x4a, 0x52, 0xcc, 0xf0, 0x2e, 0x45, 0xa4, 0x31, 0xe0, 0x6a, 0x27, 0x60, 0x8, 0x44, 0x75, 0xa7, 0x4c, 0x4c, 0x66, 0xf8, 0xff, 0x90, 0xf3, 0x4c, 0x1d, 0x83, 0xd7, 0xe, 0xf8, 0xd6, 0xa3, 0x79, 0xa, 0x6e, 0x3b, 0xc9, 0xd8, 0x16, 0xf1, 0xab, 0x3, 0x8d, 0x5c, 0x31, 0x40, 0xc8, 0xf3, 0x6e, 0x66, 0xd3, 0x97, 0x6b, 0xd8, 0x31, 0xcc, 0xfd, 0x88, 0xc8, 0x4e, 0x77, 0x88, 0xcf, 0x2a, 0x32, 0x46, 0xc8, 0x15, 0x3a, 0x27, 0x45, 0x4b, 0xe, 0x7a, 0x3c, 0x59, 0xe2, 0x92, 0x92, 0x7f, 0x1d, 0xc0, 0x4e, 0xe8, 0x1e, 0x2a, 0xa2, 0x91, 0xc0, 0x6c, 0x8b, 0xb1, 0x73, 0xb5, 0x3f, 0xbf, 0x39, 0xec, 0xfd, 0x6e, 0xc1, 0xf5, 0x7a, 0x74, 0x78, 0xe3, 0x71, 0x99, 0xdc, 0x39, 0xd0, 0x58, 0x28, 0x3b, 0xd0, 0x46, 0xab, 0xe2, 0x5e, 0x91, 0x42, 0x2b, 0xb, 0x25, 0x32, 0x9d, 0x17, 0x5a, 0x7d, 0xb, 0xfa, 0x21, 0xe2, 0x97, 0xc9, 0x6a, 0x5c, 0x3f, 0x19, 0x79, 0xaf, 0x84, 0x75, 0x2a, 0x2f, 0xb6, 0x7b, 0xcb, 0x5, 0x11, 0xb7, 0x90, 0x12, 0x4b, 0xd9, 0x6e, 0xd1, 0x37, 0x49, 0xf1, 0xe9, 0x22, 0xc4, 0xac, 0xe3, 0x55, 0xdb, 0x86, 0x60, 0x11, 0xa1, 0x55, 0x1d, 0xcc, 0x95, 0x48, 0xeb, 0x46, 0xb9, 0x61, 0xfe, 0xff, 0x4f, 0x28, 0x51, 0x5, 0x58, 0x33, 0xbc, 0x40, 0x83, 0xba, 0x71, 0x2e, 0x4f, 0xb9, 0xc3, 0xc, 0x49, 0x92, 0x86, 0x83, 0xad, 0x78, 0x3f, 0xc3, 0x70, 0x39, 0x3a, 0x55, 0xf9, 0x4, 0xfd, 0xef, 0x27, 0x9c, 0xa, 0x4e, 0x1d, 0xc9, 0xe1, 0xed, 0x7e, 0x90, 0x58, 0xfa, 0x5f, 0xe3, 0x63, 0xab, 0x1e, 0x17, 0xa7, 0x24, 0x2d, 0x9, 0x21, 0x80, 0x9c, 0xca, 0xe1, 0xb9, 0xe5, 0xf2, 0x8f, 0xa5, 0x53, 0xf7, 0xca, 0x3e, 0x58, 0xfc, 0xef, 0x7b, 0xae, 0xb8, 0x8d, 0x3, 0xda, 0x5e, 0x2c, 0x6, 0xfe, 0xcd, 0x35, 0x7c, 0x12, 0xcb, 0x4, 0xc5, 0xab, 0x12, 0xda, 0xfe, 0x4d, 0x68, 0xad, 0x3c, 0x7a, 0xa9, 0x30, 0x2c, 0x9e, 0x2e, 0x6e, 0x4b, 0x86, 0xd1, 0xc9, 0x6c, 0x55, 0xfa, 0xc6, 0xf7, 0xb6, 0x31, 0x96, 0xa1, 0x5e, 0x81, 0x82, 0xc1, 0xbf, 0x2, 0x6, 0x11, 0x9d, 0x67, 0xdf, 0x74, 0x9e, 0x14, 0x28, 0xb3, 0xfb, 0x13, 0x7a, 0xe7, 0xc6, 0xeb, 0xaf, 0x75, 0xa0, 0xfc, 0x64, 0x16, 0x3c, 0x21, 0xc4, 0x43, 0x29, 0xcb, 0x44, 0x57, 0xf7, 0xd4, 0xf3, 0x69, 0x59, 0xe8, 0xa9, 0x34, 0x62, 0xaa, 0xf1, 0xbf, 0xfc, 0xfd, 0xe0, 0x2e, 0xc1, 0xa2, 0xc7, 0xe6, 0x78, 0x91, 0xdc, 0x64, 0xc1, 0xea, 0xf2, 0xa4, 0x4d, 0xd7, 0xd8, 0xec, 0xfa, 0x5f, 0x7d, 0x59, 0x6c, 0x2c, 0x66, 0xc1, 0x8a, 0x4d, 0x8b, 0x7, 0xe1, 0x90, 0x9f, 0xa8, 0x78, 0x84, 0x81, 0x6f, 0x51, 0x4e, 0xc1, 0x7a, 0xf2, 0x86, 0xdb, 0xf, 0xb3, 0x53, 0xbe, 0xff, 0xf9, 0x4f, 0x81, 0x9, 0x42, 0xb5, 0x60, 0x62, 0xa4, 0xa8, 0x4a, 0x45, 0x32, 0x47, 0x73, 0xbd, 0x26, 0xed, 0x4b, 0x5c, 0xcf, 0x4e, 0x10, 0xbf, 0x71, 0x51, 0x10, 0xfd, 0xac, 0x5c, 0x4c, 0x5, 0xa3, 0xef, 0x4a, 0x31, 0x34, 0xbc, 0x9c, 0x9a, 0x7b, 0x57, 0x74, 0xd5, 0xd, 0xc8, 0x17, 0xeb, 0x6a, 0x5a, 0xa3, 0xba, 0xc0, 0x29, 0xae, 0xb5, 0x50, 0x52, 0x4, 0xdb, 0x40, 0x81, 0x1f, 0x69, 0xec, 0xf1, 0x7e, 0xbc, 0x20, 0x67, 0x46, 0xd7, 0xfa, 0xec, 0x59, 0xb2, 0x61, 0x70, 0xff, 0x23, 0xef, 0x45, 0x62, 0x35, 0xa6, 0x6c, 0xda, 0x3b, 0x84, 0x18, 0x84, 0x95, 0x77, 0x1e, 0x53, 0x42, 0x1c, 0x72, 0x56, 0x71, 0x78, 0x86, 0x33, 0x47, 0x23, 0x65, 0xd4, 0x74, 0x16, 0x7a, 0xb, 0xf9, 0xba, 0x7b, 0x21, 0x2b, 0xc6, 0xfd, 0x91, 0xc4, 0x21, 0x5, 0x70, 0xfa, 0x3f, 0xed, 0xb1, 0xec, 0xf6, 0xfc, 0x77, 0xd0, 0x49, 0x83, 0xe, 0xb1, 0xe9, 0x91, 0x95, 0x1d, 0xf4, 0x39, 0xdc, 0x21, 0x16, 0xf7, 0x2e, 0x9a, 0xe1, 0x67, 0x9b, 0x45, 0x20, 0x88, 0xff, 0xd, 0x8c, 0x76, 0xa4, 0x48, 0x6e, 0xff, 0x15, 0xef, 0x9e, 0x7d, 0x80, 0xe5, 0x29, 0xa9, 0x7b, 0x36, 0x87, 0x0, 0xa4, 0xc6, 0xc7, 0x88, 0x47, 0x8, 0x45, 0x5, 0xc8, 0xd9, 0x17, 0x7f, 0x8, 0xc9, 0x6f, 0xc4, 0xba, 0xf5, 0xbe, 0x3f, 0x40, 0x43, 0xa2, 0x1b, 0x6f, 0xcc, 0x20, 0xe, 0x7f, 0x59, 0xcf, 0xc8, 0xbc, 0xb7, 0x1a, 0x1e, 0x2f, 0xb9, 0xd9, 0xae, 0x85, 0x41, 0x4d, 0x92, 0xd0, 0x9b, 0xc6, 0xe2, 0x68, 0x6e, 0xda, 0x67, 0xe, 0xb5, 0xe9, 0x3, 0xfc, 0x94, 0x6, 0xcc, 0xb0, 0x50, 0x1f, 0x8b, 0xfa, 0x16, 0xc0, 0x16, 0x7e, 0x2f, 0x48, 0x89, 0x9b, 0xd1, 0x42, 0x58, 0xd5, 0x9e, 0x58, 0xaa, 0xa8, 0xf4, 0x50, 0x38, 0x7c, 0x9d, 0x80, 0xf6, 0x6a, 0x6f, 0x9d, 0x15, 0xfa, 0xbe, 0xc9, 0xce, 0x12, 0x18, 0x66, 0xb2, 0xb6, 0xba, 0x9, 0xcc, 0x93, 0x16, 0x5b, 0x8a, 0x56, 0x7f, 0x86, 0xfe, 0x4, 0x23, 0x81, 0x3d, 0x7a, 0xb, 0x9a, 0xcd, 0xc5, 0x5, 0xdb, 0x6f, 0xbf, 0x6d, 0x50, 0x63, 0xdc, 0x23, 0x1b, 0xe1, 0xe2, 0xd8, 0x1, 0xe8, 0xd, 0xcf, 0xa, 0x82, 0xd3, 0xd8, 0xc9, 0x8e, 0x80, 0xe3, 0xad, 0xe2, 0xcd, 0xf4, 0xd8, 0xeb, 0xfb, 0x99, 0x66, 0xca, 0x1c, 0x68, 0xfa, 0xbf, 0xe, 0x31, 0x36, 0x38, 0xe, 0x6a, 0xd1, 0x75, 0x17, 0x60, 0x7e, 0x2a, 0x36, 0xd4, 0x10, 0x17, 0xe6, 0xe, 0xc0, 0xd2, 0xd, 0x6b, 0x17, 0xe5, 0x50, 0x44, 0x93, 0xc9, 0x4f, 0xbd, 0xa6, 0x47, 0xe3, 0xc2, 0x19, 0x53, 0x79, 0xb9, 0x8d, 0x84, 0xc1, 0xda, 0x6, 0x34, 0x57, 0x7d, 0xc5, 0xfb, 0xc3, 0x63, 0x8d, 0x94, 0x33, 0xfd, 0xb3, 0x2f, 0x7d, 0xc2, 0x5e, 0x52, 0xb6, 0x21, 0xdb, 0x7f, 0x3a, 0x1, 0x94, 0xf3, 0xcc, 0xbb, 0xe5, 0x1b, 0xe6, 0x1b, 0x55, 0xb4, 0xe5, 0xd2, 0x7e, 0xb, 0xcb, 0x27, 0x12, 0xf6, 0xcd, 0x3a, 0x29, 0xae, 0x2c, 0x5c, 0x8f, 0x9a, 0x29, 0xfe, 0x83, 0x6c, 0x2, 0xb6, 0xe9, 0x8, 0x6a, 0xa4, 0xd9, 0x2c, 0x57, 0xc5, 0xaa, 0x89, 0x96, 0xf4, 0x56, 0x1f}, - output224: []byte{0xed, 0x18, 0xda, 0xe7, 0x7c, 0x77, 0x57, 0xf7, 0xae, 0x75, 0xfd, 0xb0, 0x85, 0xca, 0x7f, 0xd, 0x50, 0x29, 0x36, 0xe, 0xc0, 0xde, 0x88, 0x9d, 0x7, 0x9, 0xb, 0xc5}, - output256: []byte{0xfc, 0x98, 0xc1, 0x67, 0x23, 0xd8, 0xb8, 0x53, 0x12, 0x51, 0x97, 0x93, 0xbf, 0x97, 0xba, 0x50, 0xf4, 0x20, 0xdf, 0x68, 0x71, 0xc6, 0x18, 0x11, 0x77, 0x8f, 0xc1, 0x55, 0xc4, 0xac, 0xb2, 0x47}, - output384: []byte{0xae, 0x31, 0xed, 0xa8, 0xd6, 0xb7, 0x4f, 0x3e, 0x4a, 0x7d, 0xf3, 0x3d, 0xbe, 0x75, 0xa1, 0x46, 0xbc, 0xfe, 0xb5, 0x16, 0x1, 0x2d, 0xed, 0x58, 0xa7, 0xb, 0x32, 0xda, 0xce, 0x5, 0x5a, 0x79, 0xc8, 0x98, 0x20, 0x43, 0x13, 0x65, 0xd6, 0xa0, 0xe2, 0x8c, 0x8, 0x16, 0x28, 0xd9, 0x5e, 0x1f}, - output512: []byte{0x31, 0x9d, 0x56, 0x7c, 0xe6, 0xc7, 0x16, 0x29, 0xf4, 0xd0, 0x80, 0x1e, 0x38, 0x8a, 0x4b, 0xe3, 0x39, 0x33, 0x8f, 0x68, 0x94, 0xab, 0x47, 0x47, 0x50, 0x33, 0x2e, 0x95, 0x6e, 0xb3, 0xf1, 0xb0, 0xd4, 0x97, 0x83, 0xf, 0x8a, 0x4e, 0xce, 0xd8, 0xde, 0x90, 0xea, 0x8, 0x81, 0xcf, 0x5d, 0x1a, 0x73, 0x3b, 0x86, 0xdc, 0xe9, 0xd9, 0x9e, 0x40, 0x29, 0x30, 0x96, 0x46, 0x32, 0x1b, 0x4d, 0xb2}}, - testcase{ - msg: []byte{0xfa, 0x82, 0x3, 0x12, 0x35, 0x66, 0xc3, 0x34, 0x55, 0x9f, 0x12, 0xf1, 0xc3, 0x71, 0x81, 0xda, 0x32, 0x75, 0x9d, 0xa, 0xc6, 0xcd, 0xee, 0x69, 0x66, 0x10, 0x44, 0x5d, 0xa4, 0x48, 0x4a, 0x51, 0xa8, 0x67, 0x26, 0x3a, 0xb6, 0x4, 0x3a, 0xb5, 0x2c, 0x6c, 0x9, 0x73, 0x46, 0xd5, 0xbd, 0x6c, 0x83, 0xa2, 0x51, 0x9b, 0x28, 0xd3, 0x78, 0x44, 0xae, 0x1d, 0xbb, 0x55, 0xcb, 0x8b, 0x86, 0x74, 0x3d, 0x51, 0x88, 0x1d, 0x1b, 0xc8, 0x10, 0xf0, 0xe4, 0xa9, 0xe1, 0xf5, 0x89, 0xd8, 0xe4, 0xce, 0xcd, 0xfe, 0x58, 0x59, 0xab, 0x24, 0x5a, 0x79, 0xe0, 0xd8, 0x80, 0x53, 0x47, 0x99, 0x1f, 0x23, 0xec, 0xc8, 0x3a, 0x30, 0x78, 0x71, 0xc3, 0xd1, 0xa2, 0x2d, 0x6b, 0xdb, 0x2a, 0x70, 0xdd, 0xa2, 0xe, 0xeb, 0x51, 0x49, 0x62, 0x16, 0xad, 0xab, 0x2c, 0xac, 0x4b, 0xc4, 0x34, 0x60, 0x53, 0xa4, 0x1a, 0x6f, 0xac, 0x5c, 0xd7, 0x8b, 0x5d, 0x2c, 0x51, 0xaf, 0x83, 0xa7, 0x54, 0xf8, 0xf3, 0x8c, 0xc, 0xa7, 0xeb, 0x48, 0x24, 0x1e, 0x34, 0xb7, 0x38, 0xff, 0x4c, 0xe7, 0x42, 0x14, 0x71, 0xf8, 0xa7, 0x92, 0xe3, 0x6f, 0x32, 0xc1, 0x6e, 0x6, 0x7b, 0x85, 0x56, 0x2b, 0xd7, 0x52, 0xee, 0x5e, 0x73, 0xc7, 0x92, 0xd, 0xf0, 0x8f, 0x10, 0x90, 0xad, 0x8c, 0xd2, 0x51, 0x87, 0x4d, 0x11, 0x64, 0xe1, 0x5d, 0xc9, 0xc1, 0x31, 0xaf, 0xe3, 0x18, 0xc4, 0xca, 0xf0, 0x4d, 0xd0, 0x44, 0xad, 0x6, 0x8c, 0xa8, 0x56, 0xeb, 0x44, 0xf1, 0x2c, 0x5, 0x7a, 0x67, 0x6c, 0xf2, 0xf5, 0xbe, 0x9c, 0x72, 0xc7, 0x4c, 0x47, 0x9, 0xec, 0xbe, 0x90, 0xa8, 0x16, 0xad, 0x2a, 0xf4, 0x3e, 0xe8, 0x92, 0xad, 0xde, 0xdb, 0x70, 0x89, 0xc8, 0x9d, 0xa5, 0xec, 0xdd, 0x20, 0xe7, 0xbd, 0x8, 0x2c, 0xe5, 0x48, 0x5d, 0x55, 0x9b, 0xc9, 0xc7, 0x71, 0xe4, 0x9f, 0x87, 0x23, 0x39, 0x25, 0x2d, 0x66, 0xc3, 0x68, 0xc9, 0xe9, 0x4f, 0x4e, 0x23, 0xc8, 0x57, 0x34, 0xcd, 0x56, 0x7c, 0x4d, 0xe7, 0xed, 0x49, 0xf9, 0x24, 0x26, 0xa5, 0xd3, 0x87, 0x83, 0xfb, 0xfc, 0xde, 0xcb, 0x7e, 0xf6, 0x2a, 0xdc, 0x53, 0x19, 0xcc, 0x63, 0x34, 0x35, 0x7c, 0x2d, 0x83, 0x89, 0xda, 0x87, 0x1, 0x46, 0x32, 0x6b, 0x1b, 0xc1, 0x2e, 0x9f, 0x70, 0xb3, 0xc2, 0xaf, 0xad, 0x6c, 0x4f, 0x51, 0xf7, 0x10, 0xdd, 0x77, 0x66, 0x3e, 0xaf, 0x37, 0xc1, 0x1, 0x70, 0xd, 0x64, 0xaf, 0xd4, 0x40, 0x47, 0x73, 0xab, 0x57, 0x2a, 0x24, 0x4b, 0x36, 0xc3, 0x27, 0x37, 0xfe, 0xf7, 0xe1, 0x68, 0xd4, 0x16, 0x21, 0x12, 0x30, 0x78, 0xaf, 0x2, 0x5f, 0x4c, 0x25, 0xaa, 0xab, 0x8c, 0x9c, 0x84, 0x4e, 0x74, 0x0, 0xcd, 0x2d, 0x8e, 0x43, 0xb3, 0xbc, 0x62, 0x1d, 0xb1, 0x59, 0x2d, 0x32, 0x12, 0xe2, 0x76, 0xc9, 0xa5, 0x2e, 0xf5, 0x6b, 0x6b, 0x4c, 0xf3, 0x9a, 0x49, 0x67, 0x3c, 0x48, 0x38, 0x5, 0xd2, 0x45, 0xc, 0xb2, 0xee, 0x4, 0x5e, 0x3b, 0x8b, 0x5b, 0xbc, 0xf7, 0xfd, 0x41, 0x3e, 0x8d, 0x34, 0xa8, 0x71, 0x63, 0x63, 0xee, 0xc4, 0x8f, 0x76, 0xf5, 0x4b, 0x4f, 0x2f, 0xd0, 0x8e, 0x81, 0xc1, 0x19, 0x97, 0xc5, 0x64, 0x71, 0x73, 0x77, 0x5d, 0x26, 0x7, 0xed, 0xe1, 0x74, 0x3e, 0x2a, 0x22, 0x42, 0xb, 0x3c, 0x87, 0xee, 0xe4, 0xd7, 0x5d, 0x14, 0x34, 0x3c, 0x87, 0x35, 0xe2, 0xb6, 0xa7, 0xd2, 0x76, 0xc7, 0x39, 0xfc, 0xc7, 0x5d, 0x3d, 0x10, 0x74, 0xc4, 0x3e, 0xfc, 0x5a, 0x62, 0x43, 0x4, 0xc4, 0xcd, 0xba, 0xc9, 0xf1, 0x23, 0x12, 0x4, 0x6, 0x15, 0xd, 0x26, 0x5d, 0x36, 0xc5, 0xd4, 0xde, 0x44, 0x41, 0xc7, 0xfc, 0x63, 0x7f, 0xa4, 0xb4, 0x23, 0x7a, 0x40, 0x3a, 0x54, 0x15, 0xea, 0x1, 0xac, 0xb3, 0x3e, 0x5a, 0xc6, 0x50, 0x7d, 0xbc, 0xb0, 0xe3, 0x57, 0x24, 0x59, 0x16, 0xcf, 0xd6, 0xb0, 0xd0, 0xe3, 0x5e, 0x2, 0xca, 0x15, 0x58, 0xd, 0x52, 0x66, 0x8, 0x72, 0xb6, 0xc2, 0x86, 0x9c, 0x4f, 0x1d, 0xa4, 0x9b, 0x60, 0xa, 0xa3, 0xb3, 0x99, 0x3d, 0xc5, 0x69, 0xe3, 0x5e, 0x4a, 0xf3, 0x80, 0xde, 0x74, 0x0, 0xae, 0xa9, 0x28, 0xe9, 0xd2, 0x55, 0x10, 0xb3, 0xbf, 0x9a, 0xff, 0x50, 0x7c, 0xec, 0x72, 0x0, 0x68, 0xd4, 0x72, 0x1f, 0x42, 0xc8, 0xec, 0xae, 0x2a, 0x48, 0xae, 0xe3, 0x1d, 0xa, 0xf6, 0xf8, 0x44, 0x45, 0x8c, 0x44, 0x1b, 0x93, 0xb3, 0x50, 0x8d, 0x74, 0xcd, 0x43, 0xa4, 0x40, 0x33, 0xb7, 0x61, 0x8a, 0xa4, 0xd8, 0x52, 0xba, 0xa4, 0x20, 0xcd, 0xd6, 0xb7, 0x42, 0x8a, 0x84, 0x1, 0xe1, 0xb5, 0x3e, 0xa2, 0xce, 0x33, 0xb3, 0xf0, 0x99, 0x91, 0xe6, 0x91, 0xe5, 0x33, 0x44, 0x16, 0x3b, 0x2a, 0x88, 0x35, 0xe0, 0xf9, 0xe, 0x83, 0xc7, 0x27, 0x8f, 0x9a, 0xd, 0x8c, 0x64, 0x20, 0xc, 0x50, 0x2d, 0x8d, 0xc1, 0xae, 0x1b, 0x96, 0xf9, 0x94, 0x7e, 0x60, 0x69, 0x0, 0x32, 0x92, 0xe, 0x79, 0x59, 0x50, 0xeb, 0xf6, 0x64, 0x2c, 0xd5, 0x42, 0x1c, 0xec, 0xd2, 0x82, 0xcc, 0x47, 0xf, 0xa4, 0x62, 0x8, 0x3e, 0x22, 0x1a, 0x90, 0x1, 0x40, 0xbd, 0x51, 0x1e, 0x61, 0x6a, 0xa7, 0x47, 0x1a, 0x75, 0x26, 0x18, 0x7, 0x71, 0xb8, 0x3, 0xa2, 0x26, 0x50, 0x21, 0xbe, 0x28, 0x76, 0xae, 0x4, 0xe4, 0xe4, 0xe8, 0x6e, 0x83, 0x4, 0x52, 0xba, 0x79, 0xd4, 0x30, 0x6a, 0xe4, 0x5c, 0x7f, 0xd7, 0x57, 0x16, 0xc6, 0x13, 0x12, 0x11, 0x90, 0x4f, 0x72, 0xe1, 0xf5, 0x2d, 0x3a, 0x1d, 0xe2, 0x8, 0x17, 0x70, 0x59, 0x86, 0x28, 0xe3, 0x3e, 0x24, 0x4d, 0x93, 0xfb, 0x97, 0x14, 0x88, 0x82, 0x3d, 0xa9, 0x72, 0x91, 0x69, 0xb6, 0x99, 0x92, 0x28, 0x76, 0x81, 0x8d, 0xd, 0x91, 0x84, 0x8a, 0x3e, 0xba, 0xa7, 0x85, 0xb7, 0x2, 0x99, 0x15, 0xf3, 0xd9, 0x23, 0x8a, 0x41, 0x51, 0x91, 0xa, 0x88, 0xe2, 0xef, 0xe6, 0xf4, 0x18, 0x41, 0xeb, 0x85, 0x4, 0x44, 0x43, 0x9, 0x83, 0x22, 0xb0, 0x59, 0x38, 0x26, 0xf8, 0xcb, 0x6b, 0xb, 0x76, 0xe5, 0x31, 0x20, 0xa0, 0x4, 0xe9, 0x13, 0xce, 0x42, 0xe4, 0x48, 0xd4, 0xba, 0x1f, 0x29, 0x30, 0x84, 0x91, 0x85, 0xe7, 0xc8, 0xe0, 0x29, 0x53, 0x3b, 0x27, 0x5a, 0xa4, 0xc1, 0xb1, 0xde, 0xd8, 0xd3, 0x88, 0x18, 0xef, 0xe9, 0x53, 0x5f, 0x4d, 0x7, 0x24, 0xa5, 0xef, 0xbc, 0xe4, 0x85, 0xcf, 0x49, 0x3b, 0xa5, 0x3f, 0x61, 0x9b, 0x56, 0xc2, 0x51, 0x46, 0x5e, 0x8a, 0x7, 0xf3, 0xa0, 0x85, 0x62, 0x7e, 0x13, 0xd0, 0xe2, 0x4e, 0xe6, 0x15, 0x7d, 0xd7, 0x6f, 0x4f, 0xb2, 0xfb, 0xad, 0x7b, 0x58, 0x39, 0x6b, 0xae, 0x69, 0x19, 0x6, 0x9e, 0xb0, 0xd3, 0x2b, 0x8d, 0x57, 0xf9, 0x33, 0xe6, 0x5, 0x9f, 0xa2, 0xff, 0x6, 0x2b, 0xdc, 0x7f, 0xd8, 0x6c, 0xde, 0xbb, 0xa4, 0xe2, 0x6, 0xa4, 0xc3, 0xcb, 0xb2, 0xa8, 0x68, 0xd7, 0xe0, 0x98, 0x67, 0xd3, 0x16, 0xc8, 0x80, 0x1a, 0x39, 0xdc, 0x7c, 0x71, 0xf2, 0xe7, 0xfe, 0x43, 0xea, 0xe3, 0xc1, 0xcf, 0xc7, 0x1e, 0xc, 0xcf, 0x8e, 0xe9, 0x46, 0x5e, 0x53, 0xf9, 0x36, 0xa9, 0xab, 0x60, 0x8f, 0x29, 0xc9, 0xf2, 0xe0, 0xde, 0xe8, 0xe4, 0x50, 0xcd, 0x42, 0x63, 0x77, 0x85, 0xcf, 0x84, 0x54, 0x3d, 0x39, 0xba, 0x6f, 0xda, 0xb7, 0x7f, 0x1c, 0x93, 0xd0, 0x8c, 0x5d, 0x5d, 0x87, 0x41, 0x95, 0x40, 0xb3, 0xa5, 0x10, 0xd0, 0x4b, 0x2, 0x98, 0x88, 0xd0, 0xf2, 0xfa, 0x64, 0xcf, 0x5a, 0x62, 0xed, 0xb4, 0xdb, 0x7f, 0x4a, 0x8f, 0xef, 0x45, 0xb8, 0xd2, 0x7a, 0x22, 0xc6, 0x89, 0x52, 0xc4, 0x5, 0x98, 0x4b, 0xa9, 0x4c, 0xd2, 0xfc, 0xd, 0x79, 0xdb, 0x81, 0xa7, 0xb, 0xfa, 0xf9, 0x23, 0x7d, 0xf9, 0xb8, 0x6f, 0x3a, 0x7e, 0x3c, 0xd0, 0x8d, 0x4a, 0x1c, 0xe6, 0xb1, 0xe2, 0x5c, 0x3b, 0xbc, 0x5b, 0x20, 0x6e, 0x4a, 0x1, 0x80, 0x70, 0xf0, 0xb0, 0xec, 0xde, 0x81, 0xca, 0x83, 0x4f, 0xe2, 0x11, 0x62, 0xcc, 0xe9, 0xed, 0x32, 0xe1, 0xb5, 0x7, 0xfb, 0x5d, 0x93, 0xa6, 0x25, 0x60, 0x2e, 0x12, 0x3e, 0xd1, 0xef, 0x25, 0xb3, 0xc2, 0x91, 0x79, 0x1c, 0x56, 0xb4, 0x50, 0xf, 0xb7, 0xb1, 0x26, 0x46, 0x77, 0x3b, 0x1f, 0x59, 0xe2, 0x4, 0x19, 0x3d, 0xba, 0xa2, 0x3c, 0x9a, 0xe7, 0x9b, 0x29, 0x31, 0x32, 0xcd, 0x5e, 0xc9, 0xb6, 0x9, 0x65, 0x28, 0xa, 0xd0, 0x82, 0x4f, 0x3e, 0x4a, 0x56, 0xff, 0xcf, 0x96, 0x6f, 0x6b, 0x23, 0x9, 0xf3, 0xcb, 0x78, 0xea, 0x7e, 0x4c, 0xc5, 0x87, 0xc4, 0x66, 0x1a, 0x10, 0xd1, 0xe2, 0x2a, 0xb2, 0x68, 0x9, 0x1e, 0x95, 0xe8, 0x70, 0x2f, 0xd2, 0xd, 0xb7, 0x1d, 0x73, 0xa6, 0xb9, 0xfa, 0x66, 0x96, 0xa5, 0xc0, 0xc8, 0xa6, 0x71, 0x88, 0xff, 0xcc, 0xb9, 0x6, 0x96, 0xd7, 0x3d, 0x8a, 0xea, 0x1d, 0x9a, 0xc, 0x0, 0x16, 0xcd, 0x44, 0x9f, 0x9c, 0x9d, 0xd1, 0x8d, 0xa9, 0xb, 0x25, 0xd1, 0x82, 0xf5, 0x56, 0xdf, 0x18, 0x57, 0xee, 0xb, 0x3e, 0x48, 0xc2, 0x88, 0x82, 0xb1, 0x10, 0xe2, 0xc, 0x9c, 0x91, 0x26, 0xff, 0x73, 0xdf, 0x84, 0xc, 0xa, 0x3f, 0x72, 0x47, 0x4a, 0x14, 0xc9, 0x16, 0x79, 0xeb, 0x5f, 0x5d, 0x9a, 0x20, 0x95, 0xa5, 0xac, 0xf1, 0x1, 0x55, 0x98, 0xcb, 0x5d, 0xe4, 0x29, 0x4b, 0x4a, 0x78, 0xc7, 0xe5, 0x81, 0x8c, 0x8f, 0x13, 0x23, 0x23, 0x4b, 0x4, 0xe7, 0x9c, 0x5a, 0x43, 0x85, 0xaa, 0x42, 0x9c, 0xc3, 0xbb, 0x41, 0x25, 0x5b, 0xe8, 0x79, 0x61, 0x65, 0xca, 0x3b, 0x2d, 0xa, 0xdd, 0xca, 0x42, 0x2f, 0xe8, 0xca, 0x3c, 0x75, 0x89, 0x2a, 0xbc, 0x86, 0x31, 0x6b, 0x2e, 0xb9, 0x3d, 0x6e, 0x75, 0x60, 0x6, 0x68, 0xe8, 0xaf, 0xe9, 0x9d, 0xde, 0x20, 0x5e, 0xfa, 0xfa, 0x47, 0x2b, 0xec, 0x72, 0xcd, 0x31, 0x2d, 0xd8, 0x15, 0x70, 0x15, 0x44, 0x90, 0x93, 0x16, 0x13, 0xe8, 0xf0, 0xff, 0x9f, 0xb0, 0x50, 0x7d, 0xe5, 0x65, 0x9, 0xa3, 0xc2, 0xe7, 0xc9, 0x7c, 0x3b, 0xbf, 0xce, 0xad, 0x92, 0x3a, 0x3f, 0x2f, 0xf1, 0x1d, 0xd8, 0xb0, 0x52, 0xd1, 0x54, 0xc2, 0x20, 0xd4, 0x4e, 0x7b, 0x2e, 0x45, 0xbd, 0x65, 0x2b, 0x6c, 0x88, 0x57, 0x70, 0xe0, 0xe4, 0x86, 0x32, 0x5f, 0x54, 0xfd, 0xac, 0x28, 0xad, 0x7a, 0x76, 0xe, 0xfa, 0xf7, 0xc5, 0x5, 0x16, 0x4d, 0x52, 0x9, 0x55, 0xe1, 0x35, 0x27, 0xd1, 0x86, 0xc2, 0x48, 0x8a, 0x80, 0x17, 0xa5, 0x30, 0xe0, 0x2a, 0x57, 0xf6, 0x1b, 0x5c, 0x5f, 0x37, 0x39, 0x7, 0x71, 0x4e, 0x6d, 0xf7, 0x8, 0xd4, 0x7c, 0x99, 0x23, 0xb7, 0x0, 0x82, 0xfa, 0x64, 0x1c, 0xe2, 0xd7, 0xb9, 0xca, 0x4f, 0x30, 0x87, 0xd8, 0xfd, 0x88, 0xd2, 0xba, 0x15, 0x33, 0xcc, 0x67, 0x51, 0x50, 0x6a, 0x64, 0xe0, 0x6e, 0xc9, 0x2b, 0x4a, 0xbd, 0xa8, 0xde, 0x2d, 0x75, 0xb0, 0x20, 0xb2, 0xc0, 0x11, 0x3c, 0x15, 0xb7, 0xfd, 0x92, 0xee, 0x84, 0x94, 0xb5, 0x72, 0x20, 0x9c, 0xb, 0x4c, 0x61, 0x4e, 0xff, 0x2f, 0xd8, 0x9a, 0xf1, 0xfd, 0xcf, 0x48, 0x9b, 0xb5, 0xbb, 0xb7, 0x76, 0x8a, 0xad, 0x64, 0xea, 0x49, 0xa7, 0xdf, 0xd7, 0x96, 0xff, 0x75, 0x1, 0xd7, 0x5d, 0xa4, 0x39, 0x2, 0x85, 0x75, 0xed, 0xb, 0xf0, 0xce, 0xdb, 0x1f, 0xc7, 0x1e, 0x68, 0xe3, 0xc6, 0xcb, 0x3d, 0xa3, 0xcb, 0xfe, 0xf8, 0xd1, 0x2a, 0xc0, 0x52, 0xcc, 0xcc, 0x1d, 0xe4, 0x6b, 0xbb, 0x43, 0x83, 0x5c, 0xeb, 0xd9, 0xa1, 0x11, 0x1e, 0x83, 0xd6, 0x17, 0x9e, 0x6c, 0xd1, 0xf, 0x67, 0x73, 0x3e, 0xaa, 0xd, 0x9b, 0xb1, 0x66, 0x89, 0x7, 0x29, 0xa4, 0x8a, 0xba, 0x5, 0xec, 0x77, 0x45, 0x40, 0x92, 0x9, 0x94, 0x2b, 0xe4, 0x4a, 0x27, 0x84, 0x86, 0xf3, 0x8c, 0xdd, 0xb6, 0xe9, 0x85, 0x2b, 0xe, 0xe4, 0xea, 0xd9, 0x81, 0xa8, 0xe8, 0xbc, 0xc4, 0x6e, 0xf2, 0x5a, 0x4c, 0x7, 0xf8, 0x74, 0xa8, 0x87, 0xf2, 0x9c, 0xd6, 0x1d, 0x47, 0xc3, 0x8c, 0x90, 0x20, 0xa0, 0xf1, 0xf2, 0xd4, 0xa1, 0xbd, 0xd3, 0xc0, 0xb8, 0xe2, 0xc5, 0x3c, 0x9b, 0x43, 0x12, 0xb5, 0x4f, 0xfb, 0xdf, 0x69, 0x48, 0xb, 0x2a, 0x37, 0x7, 0xf0, 0xcf, 0x89, 0x63, 0x8d, 0x7b, 0x76, 0x79, 0xaa, 0x91, 0x86, 0x9a, 0x53, 0x66, 0x4b, 0x15, 0xad, 0x7, 0xef, 0xa0, 0x1e, 0x71, 0x88, 0x71, 0xec, 0x94, 0x10, 0xa1, 0x48, 0x6a, 0x8d, 0xc2, 0xb4, 0x1f, 0xf0, 0xd, 0xf7, 0xfa, 0x6, 0x9a, 0x6e, 0x68, 0xa3, 0x3f, 0x27, 0xa2, 0xea, 0xb, 0xa4, 0xa3, 0x19, 0x1c, 0xde, 0xfd, 0xf2, 0x34, 0x9b, 0xe5, 0xdf, 0x72, 0x7b, 0x73, 0x54, 0x76, 0x7a, 0x29, 0x9f, 0xaf, 0x5e, 0x87, 0xcc, 0xbe, 0xb9, 0x8c, 0x4a, 0xf0, 0x36, 0x89, 0x8a, 0x80, 0xb5, 0xc4, 0x85, 0x88, 0x16, 0x45, 0x73, 0x9f, 0xbc, 0x5a, 0x76, 0xc3, 0x93, 0x47, 0x74, 0xf6, 0xa0, 0x78, 0xae, 0xf2, 0x81, 0x83, 0xa0, 0x14, 0x83, 0x5, 0xf8, 0xc0, 0x89, 0x18, 0x32, 0x40, 0x2d, 0xde, 0xb9, 0x93, 0xe1, 0xca, 0xe, 0xab, 0xd5, 0x2d, 0x2f, 0xd5, 0xc5, 0x94, 0x6a, 0x94, 0xb2, 0x3b, 0x5, 0x7b, 0x85, 0x93, 0x1b, 0x69, 0x8b, 0x46, 0xf6, 0x8a, 0xd8, 0x85, 0x80, 0xf, 0xf2, 0x5a, 0xb1, 0xb5, 0xdb, 0xe4, 0x26, 0x61, 0xfa, 0xa9, 0x2, 0x7, 0x4a, 0x3d, 0x45, 0xce, 0x2, 0xfb, 0xde, 0x7c, 0x1c, 0x38, 0x1, 0x3b, 0x10, 0x0, 0xd9, 0xcf, 0x9c, 0x2f, 0x42, 0x26, 0xb5, 0xed, 0x1a, 0xdf, 0xd1, 0x8d, 0x67, 0x6d, 0x14, 0xe7, 0xb1, 0x42, 0x2c, 0x63, 0x21, 0xc0, 0xfa, 0x51, 0x71, 0x93, 0x30, 0x41, 0xab, 0xe9, 0x63, 0xdb, 0x7, 0xc0, 0x69, 0x53, 0x90, 0x6c, 0x5, 0x1d, 0x7a, 0xc1, 0xd3, 0x56, 0xbc, 0xc0, 0xb8, 0x0, 0xa7, 0xd5, 0xf1, 0x9d, 0xc0, 0xed, 0xf4, 0xd0, 0xcb, 0xd1, 0x6a, 0x22, 0x54, 0x20, 0x82, 0x35, 0xf9, 0x72, 0xf5, 0x9e, 0x71, 0xe4, 0x10, 0xbb, 0x6d, 0x51, 0xa8, 0x9e, 0x12, 0xa3, 0x39, 0x79, 0xba, 0x6a, 0x6f, 0x8f, 0x5c, 0xd5, 0xc1, 0xcb, 0x3, 0x29, 0xc7, 0x3f, 0xde, 0xcb, 0xe2, 0x4d, 0x66, 0xc6, 0xb5, 0xd5, 0xa1, 0x12, 0x5d, 0x16, 0x2a, 0x9b, 0xe, 0x98, 0x2b, 0xad, 0x23, 0xd4, 0x4e, 0xf9, 0x92, 0x4c, 0x6e, 0x29, 0x3, 0xfe, 0xe8, 0x35, 0x52, 0x23, 0x72, 0x7e, 0x4f, 0xbe, 0x40, 0xe, 0x86, 0xe4, 0xba, 0x82, 0x82, 0x59, 0x36, 0x95, 0x1, 0x8f, 0x50, 0xd9, 0x6b, 0x7d, 0x1f, 0x5f, 0x83, 0x6, 0x6f, 0x2, 0x3b, 0xb7, 0xd0, 0xa5, 0x68, 0xd0, 0xc3, 0x96, 0x66, 0x1b, 0x87, 0x6a, 0x15, 0xa8, 0x59, 0xab, 0x8, 0x42, 0x5a, 0xc1, 0xcc, 0x15, 0x63, 0xc7, 0xa0, 0x94, 0xbf, 0x8d, 0x9a, 0x34, 0x8b, 0x2e, 0xbe, 0x8c, 0xd8, 0x82, 0x6c, 0x25, 0x21, 0x23, 0x96, 0x8a, 0xa9, 0xd, 0x94, 0x4, 0xbe, 0x82, 0x1, 0x9d, 0xf5, 0xba, 0x76, 0x4d, 0x5e, 0x79, 0x6c, 0xa4, 0x3f, 0x5b, 0xcb, 0x34, 0xa1, 0xd4, 0xf9, 0x8, 0xe7, 0x96, 0x6d, 0x89, 0x83, 0x3e, 0x5a, 0xe, 0x8b, 0x0, 0xa9, 0xc0, 0xb3, 0x85, 0x4, 0x5c, 0xff, 0x25, 0xaf, 0x35, 0xc4, 0xf5, 0x66, 0x49, 0x27, 0x69, 0x18, 0x98, 0x73, 0xba, 0x43, 0x80, 0xbf, 0xef, 0x1a, 0xd5, 0x2f, 0xa9, 0x6e, 0xe0, 0x49, 0xba, 0xcf, 0x89, 0x2d, 0xba, 0x6d, 0xda, 0x60, 0x5c, 0x1c, 0x0, 0x24, 0x4c, 0x7c, 0x59, 0x75, 0x43, 0xfd, 0x2b, 0x6a, 0xa6, 0xf0, 0xf0, 0x44, 0xab, 0x4a, 0x52, 0x19, 0x58, 0x8d, 0x54, 0x80, 0xe7, 0x59, 0xab, 0x44, 0xe7, 0x9c, 0x57, 0x59, 0xf1, 0x8, 0x3f, 0x68, 0x16, 0x5d, 0x42, 0xda, 0x6c, 0xf0, 0x4d, 0x16, 0xec, 0xa, 0x71, 0x40, 0xc, 0x1c, 0x6a, 0x50, 0xff, 0xfb, 0x6, 0xa0, 0x6a, 0xc0, 0xfc, 0xd2, 0x3f, 0x5, 0xee, 0x84, 0x31, 0x51, 0x94, 0x7, 0xc4, 0x70, 0xda, 0x99, 0xbc, 0xa4, 0xb1, 0x1e, 0xc2, 0x33, 0xed, 0x32, 0xc1, 0xb1, 0xf6, 0xe5, 0x6, 0xe3, 0x42, 0x70, 0xc5, 0x92, 0x7f, 0x8c, 0x34, 0xcf, 0x30, 0x83, 0x3c, 0x94, 0xa2, 0x3c, 0xf, 0x90, 0xab, 0xe0, 0xfe, 0xe4, 0x3d, 0xd, 0xb8, 0xbc, 0x56, 0xef, 0xf9, 0xa0, 0xc, 0x40, 0x3a, 0x4c, 0x12, 0xf8, 0x81, 0x11, 0x9d, 0xb8, 0xb7, 0xc2, 0x59, 0x5, 0x16, 0x1f, 0x20, 0x30, 0xef, 0xda, 0xf8, 0x8, 0x64, 0x88, 0xf, 0x6f, 0x93, 0xc5, 0xb, 0x7f, 0xb7, 0x46, 0x44, 0xbc, 0xe0, 0x61, 0xc2, 0xe, 0x9f, 0x20, 0xdb, 0xdd, 0xcd, 0x98, 0xe6, 0x3c, 0xdc, 0x69, 0xe0, 0xf4, 0x8a, 0x4, 0x97, 0x53, 0x4b, 0xf5, 0x9c, 0x6, 0x26, 0x31, 0x8, 0x17, 0x1d, 0x5e, 0x48, 0xf, 0x9, 0x54, 0x82, 0x6, 0x34, 0x34, 0x9d, 0x5b, 0xaf, 0xe9, 0xa4, 0xe8, 0xd9, 0x6a, 0xe1, 0xc2, 0x9c, 0x46, 0xc2, 0x89, 0x52, 0x27, 0xb0, 0x4a, 0x44, 0x12, 0x99, 0x3b, 0x8b, 0x6b, 0xbe, 0x5d, 0x66, 0xd5, 0xd0, 0x26, 0x63, 0x5b, 0xce, 0xfb, 0x16, 0x2a, 0x53, 0xe4, 0x84, 0xa9, 0xd9, 0x17, 0x3d, 0x3a, 0x2a, 0xa6, 0xe, 0x60, 0x24, 0x42, 0x93, 0x40, 0xb3, 0x44, 0x85, 0xfd, 0xd6, 0x8b, 0x7, 0x7b, 0x13, 0xf4, 0x13, 0x4c, 0xaf, 0x6d, 0xd7, 0xf3, 0x86, 0x89, 0xe4, 0x93, 0x63, 0x25, 0xb3, 0x14, 0x22, 0x3c, 0x68, 0x4e, 0xd9, 0x9d, 0x50, 0x16, 0x36, 0x46, 0xa7, 0xb7, 0x25, 0xf3, 0x21, 0xc7, 0xbb, 0x60, 0x15, 0x3f, 0x40, 0xe3, 0xcf, 0xec, 0xe9, 0xde, 0x2a, 0x26, 0x3f, 0x3a, 0x10, 0x30, 0x12, 0x48, 0x32, 0x33, 0x6e, 0x12, 0xbe, 0xd3, 0xb8, 0x1d, 0x99, 0xf3, 0xb6, 0xce, 0x3a, 0xcf, 0x87, 0xbb, 0x1d, 0x57, 0x29, 0x8b, 0xca, 0x23, 0xbf, 0xf9, 0x3, 0x40, 0x76, 0xef, 0xa9, 0xa3, 0x62, 0xf3, 0xb, 0x3b, 0x9b, 0x3e, 0x2e, 0xe8, 0x3b, 0x45, 0x5d, 0x8a, 0x63, 0xde, 0xff, 0x54, 0x5e, 0xb6, 0x34, 0x19, 0x10, 0xc7, 0x67, 0xab, 0x1f, 0xca, 0x29, 0x60, 0xc7, 0x24, 0x91, 0x5d, 0xb6, 0x9, 0x26, 0xae, 0x6d, 0x40, 0xf5, 0xe8, 0x7e, 0xf2, 0x8d, 0xb3, 0xa1, 0x33, 0xb6, 0x9f, 0xd6, 0x73, 0xf6, 0xbf, 0x10, 0x88, 0xd7, 0x27, 0xca, 0x8d, 0x62, 0x37, 0xd1, 0x5, 0x5b, 0xd6, 0xb1, 0xcd, 0xa4, 0xe1, 0xbc, 0xc8, 0x49, 0xb6, 0xbc, 0xff, 0x96, 0x2, 0xae, 0xb7, 0x3a, 0x3f, 0x59, 0xbd, 0x3a, 0xac, 0x6d, 0xe, 0x54, 0xe9, 0xd5, 0x33, 0x6f, 0xa3, 0xbc, 0xc, 0xf, 0xd2, 0x27, 0x82, 0xed, 0xbb, 0xb, 0x9b, 0x35, 0xec, 0xfb, 0xd9, 0x97, 0x93, 0xfd, 0x91, 0x3, 0x99, 0xd3, 0x5e, 0x8, 0x9, 0xf1, 0x6b, 0x53, 0x59, 0x7c, 0x24, 0xe4, 0x84, 0x1f, 0xb8, 0xe7, 0xec, 0x3c, 0x4c, 0x43, 0x4b, 0x96, 0x53, 0xe0, 0xc1, 0xf9, 0xd8, 0x59, 0xdc, 0x9a, 0x36, 0x5e, 0x46, 0x1d, 0xb6, 0x82, 0x7c, 0x2a, 0xd1, 0xe0, 0x7c, 0x61, 0x30, 0xda, 0x1b, 0x84, 0xab, 0xf3, 0x1a, 0x76, 0x8, 0x4b, 0xd7, 0xef, 0xb4, 0xf, 0x30, 0x2d, 0xe7, 0x5d, 0x62, 0xee, 0xd0, 0xeb, 0x4a, 0x29, 0x85, 0x34, 0x5c, 0x85, 0xb8, 0xa, 0xe5, 0x32, 0x26, 0x6b, 0x39, 0xa7, 0x4, 0xd8, 0x4b, 0xb1, 0x6e, 0x9a, 0x9f, 0xae, 0xa7, 0xb3, 0xe7, 0x92, 0x43, 0x6, 0xf6, 0x50, 0xc2, 0xf3, 0x38, 0x29, 0x8c, 0xb3, 0x8f, 0x7, 0xc0, 0x4b, 0x1f, 0x41, 0x73, 0x68, 0x76, 0x79, 0x9c, 0xd, 0x17, 0xc4, 0x87, 0xbc, 0x5e, 0x0, 0x47, 0xe8, 0x53, 0x4e, 0xd3, 0x56, 0xc6, 0xf3, 0xd, 0xaf, 0x21, 0x61, 0x6, 0x18, 0xd1, 0x9b, 0xf1, 0x0, 0xb, 0xb8, 0x86, 0xc, 0x27, 0x9b, 0x7e, 0xc2, 0x7c, 0x62, 0x70, 0x70, 0x9c, 0x0, 0xe3, 0xcc, 0xf7, 0x8b, 0xc9, 0x5c, 0xd5, 0x50, 0x20, 0x22, 0x75, 0x1, 0x32, 0x35, 0xbc, 0x2b, 0x3f, 0xe, 0x11, 0x79, 0x1d, 0xf, 0x87, 0xd1, 0x25, 0xb2, 0xb1, 0x77, 0x5f, 0x4a, 0x86, 0x6d, 0xaa, 0x90, 0xa7, 0xcc, 0xb1, 0xc7, 0xd2, 0x14, 0xb1, 0x9f, 0x2, 0x28, 0x25, 0xaa, 0xa, 0x22, 0xdb, 0x78, 0x4, 0x12, 0x50, 0xf6, 0x3b, 0x5a, 0x68, 0x3d, 0xc9, 0xff, 0xe7, 0x6a, 0xb0, 0x35}, - output224: []byte{0x62, 0xee, 0x8f, 0xc4, 0xe7, 0x72, 0xf3, 0xb2, 0xc5, 0x5, 0x15, 0x44, 0x43, 0xcc, 0xa1, 0x4d, 0xd4, 0xff, 0xc8, 0xd4, 0xf4, 0xf, 0x91, 0xc7, 0xc4, 0xb8, 0xc5, 0xe6}, - output256: []byte{0x95, 0xc8, 0xe6, 0x82, 0x59, 0xdc, 0xa8, 0xb8, 0x5e, 0x81, 0x68, 0x8c, 0x12, 0x82, 0x80, 0xb5, 0x9f, 0x7e, 0x10, 0x5d, 0x8e, 0xdd, 0x89, 0xcb, 0x9f, 0x29, 0x5b, 0x93, 0xea, 0x40, 0xe2, 0x91}, - output384: []byte{0xde, 0x42, 0xc7, 0xb0, 0x7, 0x9d, 0x73, 0x8b, 0x18, 0xc7, 0x2, 0xfe, 0x81, 0x28, 0x39, 0x1a, 0xe1, 0x3e, 0x5b, 0x9f, 0xb3, 0xc, 0xdc, 0x43, 0xe3, 0x3d, 0x2, 0xcd, 0x63, 0xd7, 0xca, 0x8c, 0xae, 0x2f, 0xd3, 0xc7, 0x17, 0xd7, 0xca, 0xce, 0x83, 0xc0, 0x7d, 0x41, 0x42, 0x5b, 0xa7, 0x37}, - output512: []byte{0x51, 0x46, 0xcc, 0x4c, 0x42, 0xa2, 0x65, 0x2e, 0x95, 0x8a, 0x2c, 0xe8, 0x67, 0x4f, 0x5e, 0x17, 0x48, 0xe3, 0xbd, 0x67, 0x4d, 0x49, 0x6c, 0x97, 0x6f, 0xe2, 0x8d, 0x9, 0x85, 0x17, 0xda, 0x3c, 0xd4, 0x4c, 0x1a, 0xcd, 0xd4, 0xbc, 0x47, 0x18, 0x26, 0x0, 0x15, 0x67, 0xb7, 0x66, 0x8c, 0xad, 0x39, 0x60, 0xf4, 0x55, 0xf4, 0x53, 0x0, 0x9, 0x5d, 0xcc, 0xf1, 0xb8, 0xf5, 0x68, 0x1a, 0xe2}}, - testcase{ - msg: []byte{0x8, 0x94, 0x4c, 0xb4, 0x73, 0xb8, 0x28, 0xb1, 0x18, 0xa3, 0x19, 0x86, 0xdb, 0x67, 0xfc, 0x75, 0x7f, 0x23, 0x81, 0x82, 0xe7, 0x90, 0x55, 0x34, 0x4, 0xb7, 0x92, 0xaa, 0x4f, 0x0, 0x95, 0xa6, 0xa8, 0x32, 0x91, 0xe2, 0x87, 0xcd, 0xd1, 0x65, 0x21, 0xa3, 0xae, 0x8c, 0x48, 0xf5, 0x6f, 0xbc, 0x90, 0x9d, 0xfc, 0xcf, 0xaa, 0x7b, 0xcc, 0x57, 0xc, 0x21, 0x59, 0xf2, 0x65, 0x92, 0xdc, 0xd6, 0xb1, 0x5b, 0xc4, 0xdd, 0x55, 0xcc, 0x5, 0x59, 0x5a, 0xc6, 0x34, 0xb2, 0xc3, 0xde, 0x15, 0x36, 0xb, 0xf, 0x7, 0xa0, 0x3b, 0x59, 0x57, 0xbc, 0x93, 0x33, 0xcc, 0x50, 0x97, 0x91, 0x93, 0x99, 0xdd, 0x99, 0x73, 0xac, 0xe1, 0x5e, 0x55, 0x94, 0x1, 0x78, 0xc4, 0xc9, 0x6b, 0xb5, 0xe0, 0xa0, 0xa1, 0xb, 0xae, 0x17, 0x57, 0x69, 0x54, 0x8e, 0xbc, 0xe1, 0x1e, 0xd, 0x7d, 0x9d, 0xb2, 0x96, 0x47, 0xf1, 0x97, 0xd4, 0xb8, 0x7f, 0x70, 0x39, 0xf5, 0xd4, 0xe5, 0x9e, 0x1, 0x65, 0x31, 0xdb, 0xeb, 0xf5, 0x5a, 0x79, 0x7a, 0xc9, 0xa6, 0x83, 0x50, 0x32, 0xcd, 0xf3, 0x42, 0x40, 0xa7, 0xee, 0x74, 0x23, 0xe8, 0x9c, 0x9, 0x12, 0x48, 0x29, 0xca, 0xfc, 0x5f, 0x89, 0x43, 0x1c, 0x8a, 0xfc, 0x54, 0xfd, 0x97, 0x9e, 0x50, 0xd4, 0x8a, 0x82, 0xb4, 0x7a, 0x53, 0x52, 0x3c, 0x84, 0xb6, 0x0, 0x4d, 0xaa, 0x32, 0x3e, 0xfb, 0x70, 0x82, 0x3, 0xe5, 0x38, 0x8a, 0x6a, 0x51, 0x10, 0xc6, 0xce, 0x2e, 0x34, 0x10, 0x48, 0xa6, 0x5f, 0xde, 0xad, 0xeb, 0x38, 0x37, 0xa0, 0x34, 0x20, 0xf9, 0xfa, 0xdd, 0xc3, 0xf0, 0x2a, 0x54, 0x4f, 0x1e, 0x46, 0xd9, 0x6b, 0x7, 0xc9, 0xc, 0x79, 0x71, 0xa7, 0x4, 0xa, 0x17, 0x9e, 0x81, 0x98, 0xe9, 0xa, 0xa0, 0x19, 0x26, 0x8e, 0x0, 0x36, 0x71, 0x20, 0xd5, 0xf3, 0xd9, 0x8a, 0x5c, 0xce, 0x82, 0xc8, 0x85, 0xe7, 0x71, 0x44, 0xb1, 0xaa, 0xd6, 0x6e, 0xe6, 0x82, 0x84, 0x77, 0x76, 0xb0, 0x4f, 0x1, 0xf5, 0x1, 0xdc, 0xbe, 0xfe, 0x39, 0x3, 0x8, 0xa, 0x80, 0x58, 0xb3, 0xb8, 0xf1, 0xd8, 0x23, 0xd9, 0x17, 0xec, 0xf3, 0x1f, 0xc2, 0xd5, 0xb0, 0x79, 0x5b, 0xf9, 0x5a, 0x55, 0xc7, 0x9, 0x3e, 0xca, 0x7c, 0x80, 0x1d, 0xd0, 0xbd, 0xd, 0xbd, 0xbe, 0xde, 0x7d, 0x56, 0x51, 0x31, 0x28, 0xb2, 0x9f, 0xc0, 0xb4, 0xd2, 0x5a, 0x62, 0x40, 0xb2, 0x4c, 0x99, 0xe0, 0x17, 0xbd, 0xff, 0x7a, 0xca, 0xfc, 0x8f, 0x8d, 0xe9, 0xfa, 0xf5, 0xa2, 0x94, 0x43, 0x84, 0xae, 0xce, 0x82, 0xbe, 0xa0, 0x4d, 0xcc, 0xc6, 0xd5, 0x1f, 0xc6, 0xe6, 0xf2, 0x7a, 0xa3, 0x8f, 0x13, 0x1b, 0x79, 0x59, 0xb1, 0x36, 0x81, 0xa0, 0x9b, 0x31, 0x1d, 0x24, 0x2e, 0x62, 0x22, 0xa1, 0xce, 0x56, 0x87, 0xde, 0x5c, 0x8, 0x5, 0x8, 0xb1, 0xdb, 0x16, 0xb6, 0xf8, 0x29, 0xd, 0x33, 0xa3, 0xcc, 0xd, 0x1, 0x38, 0xac, 0x61, 0xfd, 0x90, 0x93, 0x82, 0x5e, 0x9d, 0x37, 0x52, 0x88, 0x9e, 0x9f, 0x20, 0xdb, 0x9f, 0x80, 0xf9, 0x27, 0x50, 0xea, 0xc8, 0x8b, 0x38, 0xac, 0x81, 0xc0, 0x1, 0x6d, 0x40, 0x37, 0x1e, 0xab, 0x4a, 0x87, 0xe8, 0x45, 0xe9, 0x14, 0x46, 0xb0, 0xa0, 0x70, 0x81, 0xb8, 0x4f, 0x55, 0x9c, 0xdb, 0x95, 0x34, 0xc, 0xb0, 0x20, 0xaf, 0x22, 0xae, 0xa1, 0xbf, 0xf2, 0xfd, 0xa1, 0x2f, 0x7a, 0x42, 0x97, 0x3f, 0xf1, 0x63, 0xa1, 0xc6, 0xf3, 0x3d, 0xb8, 0xb8, 0x21, 0x4a, 0xe2, 0x7a, 0xbd, 0xf1, 0xc5, 0x4f, 0x5b, 0x3, 0xe2, 0x93, 0x10, 0xfa, 0x21, 0x1, 0x25, 0xe1, 0x29, 0x6e, 0x8a, 0xf9, 0x3a, 0x29, 0x96, 0xdb, 0xae, 0xfb, 0xad, 0xd4, 0xc5, 0x1c, 0x2c, 0x3b, 0x8a, 0x3e, 0x2b, 0xc9, 0xfe, 0x6, 0xc, 0x42, 0xba, 0x32, 0x76, 0x8f, 0x69, 0x92, 0xa9, 0x95, 0x99, 0x20, 0x6c, 0xd2, 0x29, 0x1c, 0xcc, 0x5b, 0xbd, 0x50, 0x85, 0x6f, 0x7f, 0x8d, 0x2d, 0xa, 0xe1, 0xef, 0xb5, 0x89, 0x2c, 0x15, 0xa7, 0x99, 0xb7, 0x74, 0x82, 0xde, 0x45, 0x53, 0x73, 0x6b, 0x16, 0x2a, 0xbb, 0x6, 0x63, 0x1f, 0x16, 0x88, 0xf6, 0x74, 0x6e, 0x7d, 0x7a, 0x37, 0xee, 0x7e, 0xf2, 0x4e, 0x6c, 0xc9, 0x1, 0x17, 0x5f, 0x4, 0x96, 0xc, 0x1, 0x99, 0x1, 0x78, 0xf8, 0x1e, 0x95, 0x7e, 0x94, 0x1d, 0xea, 0xac, 0x88, 0x46, 0xb3, 0x70, 0x4e, 0x24, 0x20, 0x4f, 0x43, 0xdd, 0xb0, 0x76, 0x5c, 0x43, 0x3f, 0x3f, 0x7d, 0x4d, 0x20, 0x14, 0x59, 0xcd, 0x65, 0x68, 0x2b, 0x7d, 0xdf, 0x3d, 0x47, 0xe9, 0x5c, 0xdb, 0x31, 0xb9, 0x6a, 0x4c, 0xb2, 0x29, 0x7, 0xf0, 0x8b, 0xa6, 0xe9, 0x2a, 0x4a, 0x7, 0x70, 0x3b, 0x2d, 0xcf, 0x15, 0xf, 0x92, 0x2c, 0x4b, 0x7c, 0xf1, 0x81, 0x38, 0x3, 0x3, 0xfb, 0x72, 0x54, 0x78, 0x47, 0x30, 0x59, 0x99, 0xc3, 0xc8, 0xf9, 0xac, 0x87, 0x7d, 0x5, 0xd9, 0xdc, 0x41, 0x59, 0xde, 0xb8, 0xa1, 0x3d, 0x36, 0xad, 0x1d, 0x53, 0x3a, 0x56, 0x95, 0xe, 0x20, 0xf9, 0x6, 0xd2, 0x9d, 0x51, 0xdd, 0xc4, 0x5b, 0xd1, 0x5c, 0x17, 0x73, 0x99, 0x17, 0x7, 0x48, 0xe, 0x37, 0xb8, 0x27, 0x4, 0x4b, 0xdc, 0x64, 0x73, 0x18, 0x1b, 0x76, 0xa, 0x90, 0x36, 0xe0, 0xd3, 0xfa, 0x49, 0x1c, 0x2f, 0x8, 0xc5, 0x51, 0x30, 0xd8, 0xcd, 0xd5, 0xac, 0x8e, 0x97, 0xd0, 0x81, 0x31, 0x64, 0xaf, 0x3d, 0x28, 0xa5, 0x85, 0xf0, 0xc2, 0xec, 0x70, 0x4, 0xd4, 0x98, 0xf9, 0x5c, 0x6b, 0x62, 0x23, 0x1a, 0x63, 0x2a, 0x56, 0xc2, 0xd0, 0xc4, 0x8f, 0xc3, 0xa6, 0x99, 0x2d, 0x40, 0x51, 0x95, 0x7b, 0x9e, 0xd6, 0xd9, 0xa8, 0x6d, 0xbc, 0xcd, 0x96, 0x2a, 0x88, 0x83, 0xcf, 0x82, 0xca, 0xf0, 0x1d, 0xa2, 0xf5, 0x1a, 0x20, 0x3d, 0x56, 0xb6, 0x8, 0x9b, 0xc8, 0xfd, 0xb, 0x1b, 0xd4, 0x14, 0xc8, 0x6, 0x30, 0x31, 0xed, 0x46, 0x95, 0x55, 0xe2, 0x2e, 0xf8, 0x72, 0x68, 0x9c, 0x13, 0xb, 0x1c, 0x10, 0x10, 0x34, 0xd5, 0x72, 0xfd, 0x8c, 0xd0, 0xed, 0xda, 0xbe, 0xc9, 0xef, 0x15, 0x3, 0xd7, 0xf7, 0x28, 0xb0, 0x94, 0x1e, 0xfe, 0x2b, 0x95, 0x12, 0x43, 0x8c, 0x7d, 0xdb, 0x17, 0x6b, 0xe2, 0xec, 0x2d, 0x9f, 0xfc, 0xd5, 0x64, 0x95, 0xa4, 0x51, 0x14, 0x28, 0xdf, 0x2, 0x81, 0x9c, 0xdd, 0xa1, 0x8d, 0x1e, 0xd5, 0xd3, 0xb1, 0x6c, 0x6f, 0x42, 0xaa, 0xa, 0xc6, 0x81, 0xa9, 0xfa, 0xb5, 0x1e, 0x8a, 0x1a, 0x85, 0x6c, 0x15, 0xc5, 0x1a, 0x3e, 0xc1, 0x3, 0x14, 0x27, 0x14, 0x2e, 0xa1, 0x25, 0x43, 0x1, 0x4d, 0xd4, 0xac, 0xac, 0x64, 0xb, 0x8a, 0x77, 0x29, 0xe6, 0x3a, 0xb7, 0xdf, 0x10, 0x51, 0x11, 0x2c, 0xde, 0xfd, 0x4b, 0x98, 0x8a, 0x22, 0x58, 0x33, 0x4f, 0xa9, 0xa7, 0xf5, 0xb3, 0xa8, 0x7a, 0x2, 0x7, 0x4b, 0x9f, 0x69, 0xdd, 0x81, 0xb8, 0x3f, 0xc7, 0x40, 0x89, 0xa9, 0x1d, 0x76, 0xaa, 0x40, 0x41, 0x25, 0x9e, 0x80, 0xfa, 0x25, 0x5f, 0x20, 0x84, 0x90, 0x2a, 0xeb, 0x9e, 0x99, 0x6a, 0xc2, 0x28, 0x8a, 0xb4, 0x64, 0xbd, 0xec, 0x47, 0xaa, 0xb2, 0x6a, 0x28, 0xa2, 0xa8, 0x19, 0x49, 0x89, 0x75, 0x5d, 0x48, 0xfc, 0x9a, 0x5c, 0x92, 0x79, 0x28, 0x5f, 0x2f, 0x1d, 0xbb, 0x8b, 0x80, 0x18, 0xf3, 0xe4, 0xe1, 0x31, 0x15, 0xd7, 0x8a, 0x87, 0x97, 0x92, 0xe4, 0x5a, 0x8f, 0x4f, 0x24, 0xed, 0x4a, 0x31, 0x74, 0x40, 0xba, 0x63, 0xe6, 0x92, 0x90, 0x56, 0xef, 0xc1, 0xd2, 0x52, 0x9b, 0x75, 0xa7, 0x9, 0xd6, 0xc0, 0x9, 0x7d, 0xc2, 0xd9, 0x7f, 0x64, 0x6f, 0x33, 0x4e, 0xbe, 0x61, 0x95, 0xec, 0x56, 0x30, 0x13, 0x2f, 0xde, 0x58, 0xe2, 0x5d, 0xbc, 0x17, 0xda, 0xd8, 0x22, 0xd9, 0xfa, 0x9, 0x38, 0xa2, 0xa2, 0xc9, 0x26, 0xb1, 0x5, 0xd1, 0x8, 0x40, 0x3d, 0xc2, 0x9c, 0xf3, 0x71, 0xc3, 0x50, 0x4f, 0xf7, 0x3b, 0xce, 0x9c, 0x7a, 0xcf, 0x9a, 0x74, 0xc4, 0x95, 0x4c, 0xe6, 0xa3, 0x2d, 0xa9, 0x6b, 0x21, 0xcf, 0x32, 0x11, 0xb3, 0xe4, 0x99, 0x53, 0xda, 0xb7, 0x8c, 0x49, 0xc3, 0xe5, 0x32, 0xa3, 0x49, 0x0, 0x3c, 0x59, 0xc6, 0x2f, 0x7d, 0x40, 0x26, 0x1c, 0xba, 0x63, 0xa9, 0xea, 0x21, 0xc8, 0x9a, 0x38, 0xaa, 0x63, 0xce, 0x43, 0x1c, 0x43, 0xae, 0x26, 0x1c, 0x4d, 0x99, 0x99, 0xb1, 0xca, 0xf4, 0x91, 0xfa, 0xb8, 0xe7, 0xbe, 0x6e, 0x8c, 0x34, 0x54, 0xf1, 0xbe, 0x87, 0x93, 0xb2, 0xd2, 0x71, 0x41, 0xfc, 0x10, 0x7d, 0xa5, 0x99, 0xa4, 0x69, 0x4c, 0x41, 0x35, 0x3d, 0x77, 0x85, 0xc0, 0x5b, 0x5e, 0x31, 0x44, 0x4, 0x58, 0xd1, 0x7c, 0x6d, 0xb6, 0x6f, 0xeb, 0x8a, 0x9c, 0x5c, 0x7, 0x3f, 0xb9, 0x46, 0xa6, 0x7a, 0xc0, 0x31, 0x2b, 0xb6, 0x69, 0xd9, 0xb1, 0x2f, 0xab, 0xaa, 0x52, 0x72, 0xca, 0x66, 0x31, 0x37, 0x9e, 0xf4, 0xed, 0x42, 0xa, 0x44, 0x24, 0xa5, 0xcd, 0x8, 0x52, 0x63, 0x84, 0xc0, 0x47, 0xc3, 0x3a, 0x84, 0xd5, 0xd7, 0xdc, 0xc, 0x21, 0x53, 0x66, 0x3b, 0x54, 0xc7, 0x3d, 0xd7, 0x99, 0xa3, 0x56, 0x8c, 0x1, 0xb8, 0x18, 0x99, 0x2c, 0xdf, 0x81, 0x43, 0xf1, 0xda, 0xdd, 0x6b, 0x50, 0xca, 0xe6, 0xea, 0xe1, 0x3a, 0xc6, 0x6f, 0x31, 0xff, 0xa2, 0xb3, 0x62, 0xcc, 0x4d, 0x28, 0x80, 0x59, 0x2b, 0x7f, 0xee, 0x4b, 0x9e, 0x4c, 0xd6, 0xaa, 0x5e, 0x5d, 0xe2, 0x7a, 0xab, 0x9b, 0x5d, 0xad, 0x9f, 0x7d, 0x39, 0x40, 0x7a, 0xe9, 0x27, 0x53, 0xc, 0xab, 0x2b, 0x61, 0xcd, 0x73, 0x94, 0xa2, 0x1e, 0xf4, 0x7b, 0xfb, 0x81, 0x3b, 0x5e, 0xa6, 0x9, 0x14, 0x58, 0xd2, 0x39, 0x66, 0x49, 0x23, 0x28, 0xe, 0xd0, 0xd5, 0xcc, 0xa8, 0x28, 0x5b, 0xb2, 0x28, 0x1a, 0x2f, 0x9f, 0xb3, 0xff, 0xec, 0xc8, 0xe9, 0x14, 0x7e, 0x1e, 0x8f, 0xac, 0x95, 0x7d, 0x90, 0xc9, 0xe5, 0xf5, 0x13, 0x73, 0x87, 0x45, 0xa4, 0x7c, 0x2a, 0xd0, 0xc3, 0x1f, 0xd8, 0x98, 0x6e, 0xf3, 0xb6, 0x38, 0x8c, 0x6e, 0x82, 0x1f, 0x16, 0x65, 0x13, 0x81, 0x1d, 0x54, 0x7a, 0xb4, 0x33, 0x6b, 0x5e, 0x4, 0x64, 0x34, 0x97, 0xfc, 0x9f, 0x8d, 0x6e, 0x38, 0xe, 0xf6, 0x47, 0x8b, 0x82, 0xb6, 0xe2, 0xf5, 0xf6, 0x5d, 0xd9, 0x8a, 0x63, 0xc6, 0x8c, 0x32, 0xb9, 0x46, 0x10, 0xe1, 0xd3, 0xb9, 0x53, 0x8f, 0x13, 0xa7, 0x68, 0x8f, 0xbb, 0x1e, 0xc3, 0x44, 0x8b, 0xe9, 0xbd, 0x77, 0xbb, 0x93, 0xa3, 0x45, 0x46, 0x17, 0x2a, 0xe8, 0xd6, 0x14, 0xf8, 0x52, 0x28, 0x98, 0x8e, 0x7f, 0xeb, 0x18, 0xc9, 0xa0, 0xc9, 0x82, 0x76, 0x99, 0xe8, 0xb3, 0xcb, 0xc6, 0x97, 0x50, 0xbd, 0xfe, 0xcd, 0xa8, 0x26, 0x8f, 0x69, 0x4f, 0x4c, 0x50, 0x9b, 0xef, 0xc1, 0xa1, 0x16, 0x6f, 0x85, 0xc8, 0x29, 0x72, 0x52, 0x99, 0xd1, 0x73, 0xf8, 0x67, 0xa3, 0x0, 0x98, 0x7a, 0x2d, 0x36, 0xd1, 0xbb, 0xbe, 0x37, 0xbe, 0x32, 0x8, 0xfb, 0x8e, 0xfe, 0x91, 0x52, 0xa4, 0x1a, 0x5f, 0xe, 0x93, 0x1b, 0x63, 0x82, 0xff, 0x7f, 0x9b, 0x18, 0x93, 0x79, 0x58, 0xfb, 0x18, 0xe, 0x61, 0xf2, 0xa8, 0xc2, 0x8f, 0x36, 0xc3, 0xc8, 0xc, 0x37, 0x22, 0x93, 0x5a, 0xac, 0xb8, 0x1c, 0x24, 0xaa, 0x17, 0xfb, 0x3e, 0x7a, 0x10, 0x26, 0xf7, 0x3, 0x1a, 0x74, 0x49, 0x81, 0x8e, 0xd6, 0x2b, 0xa7, 0x70, 0x5c, 0xa2, 0x7c, 0x2d, 0x32, 0x68, 0xf9, 0xb, 0x63, 0x22, 0x92, 0x16, 0x83, 0xdf, 0xf8, 0x0, 0xa3, 0x6, 0xcf, 0xc1, 0x86, 0xcf, 0x2a, 0x61, 0xb3, 0x7f, 0x35, 0x83, 0x7b, 0x21, 0x7e, 0x3b, 0x2c, 0xec, 0xb0, 0x84, 0x3d, 0x84, 0xea, 0xc6, 0x74, 0x31, 0xe3, 0xd6, 0x89, 0xf0, 0x15, 0x22, 0xd4, 0xa4, 0xc7, 0x36, 0x18, 0xb7, 0xc2, 0x96, 0x5c, 0x9d, 0xab, 0xb1, 0x5c, 0xb, 0xe6, 0x37, 0xd1, 0xc, 0xee, 0xf7, 0x22, 0x71, 0xcf, 0x39, 0xa7, 0xb8, 0x3, 0xb4, 0x17, 0x67, 0xbc, 0x34, 0x43, 0x3c, 0x3e, 0x6f, 0xf4, 0x49, 0xa4, 0x39, 0xae, 0x13, 0xda, 0x1e, 0xaf, 0xa0, 0x38, 0xcb, 0x9f, 0x2e, 0x1c, 0x84, 0xf1, 0xce, 0x39, 0xc0, 0x5d, 0xf5, 0x6f, 0xe3, 0xd7, 0xb8, 0x23, 0x86, 0xc4, 0xe6, 0x28, 0xb6, 0xe2, 0x7c, 0xbc, 0x5d, 0x57, 0x5c, 0x66, 0xad, 0xa3, 0x51, 0xc, 0x24, 0x6b, 0xd0, 0x4d, 0xb4, 0x8f, 0x4a, 0xfc, 0x2d, 0x73, 0x52, 0x96, 0x6d, 0xa2, 0x26, 0x6c, 0x2b, 0xc9, 0x83, 0x15, 0x32, 0xf5, 0x36, 0x55, 0xd8, 0xbe, 0x42, 0xb4, 0x21, 0xac, 0xd, 0x70, 0xd8, 0xad, 0x1d, 0x35, 0x87, 0x25, 0x78, 0x86, 0xdb, 0xf9, 0x36, 0x68, 0xe9, 0x7, 0xe8, 0x61, 0xba, 0x64, 0xf4, 0x59, 0x99, 0xba, 0xdb, 0xf, 0x76, 0x6e, 0xad, 0xce, 0x52, 0x38, 0xb5, 0xed, 0x39, 0x7f, 0x26, 0x59, 0x35, 0x19, 0x48, 0x12, 0xc0, 0x3c, 0x57, 0x69, 0x13, 0x7b, 0xac, 0x97, 0x14, 0x5, 0x25, 0x30, 0x3c, 0xf4, 0x8d, 0x65, 0xf3, 0x90, 0x4, 0xa3, 0xf5, 0x9b, 0x1f, 0xab, 0x9, 0x89, 0x5c, 0xee, 0x5, 0x33, 0x5d, 0x15, 0xb9, 0xb1, 0x22, 0x65, 0x89, 0x2f, 0x4a, 0xbb, 0x92, 0xab, 0x1d, 0xd2, 0x0, 0x2e, 0xd0, 0xc, 0xf3, 0x56, 0x2c, 0xb6, 0x7d, 0xfe, 0x10, 0x55, 0x96, 0x8e, 0x4a, 0xb3, 0x30, 0x6b, 0xb3, 0x4b, 0xb8, 0x7d, 0xf, 0x64, 0xb2, 0x68, 0x48, 0x81, 0x2a, 0x2f, 0x7b, 0x50, 0x42, 0x4a, 0x21, 0xff, 0x94, 0x8, 0x1a, 0x7f, 0x70, 0xf7, 0xb6, 0x84, 0xab, 0xf, 0x9, 0x2b, 0x2b, 0x8, 0x5d, 0xcf, 0x84, 0xca, 0x38, 0x41, 0x4c, 0xf7, 0x29, 0xf, 0x60, 0x7b, 0xf7, 0x9c, 0x37, 0xea, 0x84, 0x25, 0x3a, 0xbc, 0xa8, 0xd4, 0x18, 0x4d, 0x2d, 0xbe, 0x2e, 0x90, 0x2, 0x0, 0xb8, 0x14, 0x79, 0xe1, 0xce, 0x8b, 0x71, 0xdc, 0xf2, 0xbd, 0x6e, 0x3c, 0x55, 0x7a, 0x8e, 0x43, 0x1d, 0x62, 0x7b, 0xa6, 0x69, 0xc2, 0xea, 0x3, 0x6, 0x8e, 0xf, 0x7e, 0xa6, 0x2c, 0x29, 0x77, 0x7b, 0x22, 0x14, 0x2d, 0x7a, 0x1d, 0x45, 0x1b, 0xd5, 0x41, 0xef, 0x8e, 0xbd, 0xdb, 0xba, 0x4e, 0x3b, 0xd8, 0xff, 0xcd, 0x34, 0xe, 0x93, 0x5b, 0xe7, 0xc6, 0x6e, 0xfc, 0x14, 0xa1, 0x3e, 0xa4, 0x81, 0x34, 0xf6, 0x55, 0xb0, 0xde, 0x31, 0x80, 0x10, 0x1f, 0x9, 0xd2, 0x4, 0xc3, 0x79, 0x74, 0x3a, 0x35, 0x7e, 0x6d, 0xf1, 0x26, 0x8b, 0x55, 0xa9, 0xf7, 0x52, 0x43, 0x98, 0xec, 0xf3, 0xa5, 0x98, 0x49, 0xa2, 0x7b, 0x14, 0x22, 0x39, 0x5, 0x99, 0x98, 0x8, 0x3e, 0x8f, 0xa9, 0x17, 0x85, 0xe9, 0x1c, 0x4d, 0x22, 0xb, 0x2f, 0xb1, 0x7e, 0x33, 0x89, 0xeb, 0xaa, 0x38, 0x4a, 0x49, 0xd8, 0x9b, 0x5d, 0x78, 0x13, 0x6d, 0xd2, 0x45, 0x4f, 0x6, 0xcd, 0xe9, 0x83, 0x7f, 0x9, 0x6b, 0x74, 0x4d, 0x53, 0x22, 0x11, 0x27, 0x86, 0x99, 0x4, 0xac, 0x22, 0x7c, 0xdf, 0x30, 0xbf, 0xea, 0x78, 0xcc, 0x55, 0x45, 0x58, 0x3f, 0x99, 0x9b, 0x9c, 0x42, 0xa1, 0x18, 0x4e, 0x2f, 0xb9, 0xff, 0x3e, 0xc0, 0x95, 0xb9, 0xda, 0xd, 0x13, 0x82, 0x5, 0xc4, 0xea, 0xc4, 0xc8, 0xc4, 0x80, 0xc4, 0x31, 0x53, 0x60, 0x88, 0x49, 0xf6, 0x3e, 0x16, 0x11, 0x35, 0xc7, 0x9d, 0x8b, 0x6c, 0x9c, 0xfe, 0x9b, 0x8d, 0xfd, 0x8a, 0xfa, 0xb5, 0x59, 0xd8, 0xb5, 0x95, 0xdd, 0xd4, 0x38, 0x35, 0x3, 0x3b, 0x4b, 0xbd, 0x39, 0x1e, 0x2, 0x8b, 0xb2, 0xa6, 0x8, 0x32, 0xd9, 0xb6, 0x97, 0xee, 0x61, 0x40, 0x8f, 0x14, 0x97, 0x44, 0xdc, 0xe7, 0x1a, 0xa1, 0x1b, 0xb2, 0xb0, 0x43, 0x6c, 0x1e, 0x26, 0x26, 0xac, 0x3a, 0x27, 0xcd, 0xa2, 0x93, 0x36, 0x6b, 0x90, 0xb9, 0xcd, 0xe2, 0xd9, 0x27, 0x85, 0x51, 0x30, 0x75, 0x8d, 0x39, 0x46, 0xb8, 0x67, 0x19, 0x2d, 0xcf, 0x3f, 0xce, 0x9a, 0x3b, 0x9a, 0x52, 0x76, 0xe8, 0xc3, 0x7b, 0x8c, 0xb1, 0x36, 0xfc, 0x90, 0xa6, 0xdc, 0x22, 0x65, 0xf, 0x95, 0xe7, 0x96, 0xa9, 0x88, 0x6e, 0xfd, 0x3f, 0x42, 0x4b, 0xe6, 0x3a, 0x66, 0xdb, 0xb1, 0x4, 0x1c, 0xb3, 0xd4, 0xa0, 0x6f, 0x4e, 0x7e, 0xee, 0x89, 0xf0, 0xb6, 0xd1, 0x5c, 0x36, 0xf9, 0xea, 0x1, 0xc, 0x66, 0xb3, 0x32, 0x1, 0x1c, 0x88, 0x88, 0xe8, 0xe4, 0xab, 0x2b, 0x3a, 0xb5, 0x22, 0x31, 0x91, 0xe1, 0x38, 0x86, 0x13, 0xa0, 0xfd, 0xf, 0x7, 0xc1, 0xb2, 0x6d, 0x7c, 0xc7, 0xcd, 0xf1, 0xac, 0x62, 0xa2, 0x26, 0x45, 0x4d, 0x62, 0x91, 0xb4, 0x31, 0xcc, 0x3e, 0xf2, 0xdb, 0x2b, 0x24, 0x42, 0xb3, 0x7d, 0xef, 0xb9, 0x42, 0x11, 0x7f, 0xa2, 0x47, 0x9, 0x6b, 0xea, 0xe5, 0x98, 0x61, 0x1b, 0x81, 0x4, 0xf3, 0x7b, 0xeb, 0xed, 0xd8, 0xbb, 0x8b, 0x94, 0x9a, 0x89, 0xb5, 0xbf, 0x8e, 0x22, 0x8e, 0xca, 0x1d, 0x8f, 0x16, 0xbf, 0xec, 0x75, 0xa0, 0x2f, 0xfb, 0xb4, 0xee, 0xe3, 0xa6, 0xd4, 0xa6, 0x8, 0x7c, 0x43, 0x63, 0x4d, 0x67, 0x53, 0x11, 0xe7, 0x2a, 0x9f, 0x32, 0x53, 0xbb, 0x5d, 0xd3, 0x64, 0xe0, 0x7e, 0xb4, 0xb9, 0xc8, 0x4f, 0x58, 0x6b, 0xa2, 0x67, 0xba, 0xff, 0xae, 0xfe, 0xc7, 0x9e, 0x3, 0xb8, 0x3b, 0x18, 0x59, 0x5f, 0xe0, 0x6d, 0x7e, 0x6, 0x3e, 0xe6, 0x4, 0xff, 0x28, 0x70, 0x4, 0xd1, 0x41, 0xc1, 0xa4, 0x3a, 0xf0, 0xca, 0x7c, 0x56, 0x51, 0xd9, 0x8f, 0x63, 0x3f, 0xa8, 0x75, 0xb4, 0x74, 0x33, 0x53, 0xfb, 0x7, 0xbd, 0xe5, 0x9b, 0x65, 0x67, 0xae, 0x25, 0xf7, 0x9, 0x5f, 0x1d, 0x9e, 0xdf, 0x30, 0x57, 0xe, 0x2f, 0x7d, 0x7e, 0xc1, 0x94, 0x21, 0x68, 0x98, 0xd9, 0x10, 0xf9, 0xe2, 0x95, 0xa4, 0x1d, 0xfe, 0xe0, 0x72, 0xcb, 0x56, 0xf9, 0x14, 0xbb, 0x78, 0xcc, 0x98, 0x54, 0x12, 0x92, 0x50, 0xf9, 0x87, 0x4b, 0x63, 0xbb, 0x3e, 0xbe, 0x9a, 0x1c, 0xdc, 0x6e, 0xbc, 0xb0, 0x91, 0x6e, 0x1c, 0x44, 0x3, 0x54, 0xde, 0xd6, 0xaa, 0x81, 0x8f, 0x28, 0x11, 0xda, 0x91, 0x39, 0x12, 0xa2, 0x1d, 0x39, 0x61, 0xac, 0x94, 0xa3, 0x9f, 0x8, 0x27, 0xd3, 0xa4, 0x19, 0x61, 0x69, 0x5, 0xdc, 0x45, 0x84, 0x2c, 0x8e, 0x69, 0xa4, 0x30, 0x4, 0xb8, 0xae, 0x92, 0x2c, 0x8d, 0xe1, 0xe8, 0xcd, 0x6, 0x68, 0x67, 0x4a, 0x77, 0x60, 0x15, 0x32, 0x13, 0x83, 0x5b, 0xc6, 0x3f, 0xae, 0x4f, 0x8d, 0x65, 0x61, 0x4a, 0xfd, 0x74, 0xa3, 0x4d, 0x42, 0xab, 0xad, 0x50, 0x25, 0xb8, 0x84, 0xb3, 0x46, 0x39, 0x34, 0xb, 0x45, 0xd4, 0x9c, 0xce, 0xd4, 0x23, 0x77, 0x19, 0x16, 0xe1, 0x8a, 0xa0, 0x77, 0x29, 0x19, 0x23, 0x1, 0x7c, 0xa5, 0x7, 0x95, 0xf3, 0xb7, 0xa3, 0xf3, 0x49, 0xa3, 0xd2, 0x99, 0x23, 0x83, 0x3c, 0xe5, 0x78, 0x1, 0xc6, 0x31, 0x57, 0x6e, 0x23, 0xb8, 0x38, 0xa7, 0x76, 0x7c, 0xa1, 0xbd, 0xa9, 0x2b, 0x82, 0xac, 0x50, 0x2d, 0xb3, 0x68, 0x8f, 0xfc, 0x83, 0xc0, 0x9a, 0x4e, 0x40, 0xca, 0xc3, 0x1d, 0x20, 0xd9, 0xd3, 0x2f, 0xa6, 0x72, 0x4a, 0x80, 0xbe, 0x70, 0x91, 0xcd, 0xe9, 0xc7, 0xa6, 0x56, 0xc, 0xfb, 0x32, 0x6b, 0x46, 0x7c, 0xad, 0xdb, 0x9e, 0x9b, 0x7a, 0x49, 0x1e, 0xda, 0x28, 0x3e, 0xfb, 0xb, 0x61, 0xb4, 0xa1, 0x11, 0x6d, 0xd8, 0x59, 0xd5, 0xc0, 0x89, 0x7e, 0xaa, 0x2a, 0x3f, 0xb2, 0xcd, 0x82, 0xff, 0xb3, 0x37, 0x70, 0xbf, 0x9e, 0x8, 0x9, 0x13, 0x63, 0xb6, 0xb8, 0x1d, 0x23, 0xe6, 0x1c, 0x2a, 0x64, 0x7d, 0x2b, 0xe4, 0x40, 0xc5, 0xc7, 0x9e, 0xa8, 0x96, 0x90, 0x65, 0x6d, 0x9f, 0x10, 0xb1, 0xf0, 0x79, 0x42, 0x83, 0x4e, 0x1c, 0xb6, 0xe2, 0xd2, 0xdf, 0x10, 0x6e, 0xb6, 0xd6, 0xa2, 0x1f, 0xa2, 0x38, 0x19, 0xe6, 0x50, 0x28, 0x51, 0x5e, 0x88, 0xbd, 0x27, 0x9f, 0x93, 0x17, 0xbe, 0xaf, 0xfd, 0x39, 0x4e, 0xa5, 0x1f, 0x86, 0x39, 0x37, 0x1c, 0x3a, 0x89, 0xf1, 0x13, 0x5, 0xa4, 0xca, 0x35, 0xfb, 0x7, 0x11, 0xf5, 0xe2, 0xc7, 0xc3, 0xdd, 0x16, 0x59, 0xc7, 0x90, 0x24, 0x58, 0x12, 0x11, 0x32, 0x4, 0xb4, 0xed, 0x8a, 0xae, 0x9f, 0xf0, 0x9d, 0x43, 0xc6, 0xdd, 0xb1, 0x3f, 0x50, 0x70, 0xd9, 0x88, 0x31, 0xb2, 0xc7, 0x63, 0x9f, 0xb6, 0xb9, 0xb0, 0x1c, 0x28, 0x88, 0x12, 0xdd, 0xfa, 0x88, 0x61, 0xdb, 0x32, 0xdc, 0x82, 0x68, 0xc0, 0x7d, 0x30, 0xcf, 0x96, 0x99, 0x53, 0x4, 0x2b, 0x3d, 0xad, 0x53, 0xd, 0x9d, 0x74, 0x4c, 0x6, 0xaa, 0xbe, 0x7a, 0x88, 0x6c, 0xf, 0xe5, 0x7b, 0x9, 0xb7, 0xf4, 0x2d, 0x19, 0x3f, 0xb3, 0xe9, 0xc0, 0x63, 0x29, 0x81, 0x82, 0x51, 0xa2, 0xf7, 0xe6, 0x47, 0x44, 0x62, 0xc9, 0x5d, 0xed}, - output224: []byte{0xc1, 0x75, 0x6c, 0x1, 0xc, 0x17, 0x3e, 0x99, 0x9b, 0x6c, 0xf1, 0x1e, 0x3b, 0x6b, 0xf4, 0x40, 0xc, 0x8c, 0x86, 0x6a, 0x18, 0xc2, 0x67, 0x3a, 0x47, 0x5, 0xdf, 0x79}, - output256: []byte{0x3d, 0x20, 0x74, 0x6d, 0xda, 0x87, 0x1a, 0x10, 0x42, 0x2, 0xec, 0x1a, 0xd7, 0xd6, 0xd, 0x8e, 0x16, 0x5f, 0xbf, 0x97, 0xaf, 0xc1, 0x92, 0x95, 0x11, 0xe4, 0x17, 0x81, 0xa3, 0x5c, 0xba, 0x45}, - output384: []byte{0x55, 0x31, 0xa3, 0x4d, 0x85, 0x65, 0xa9, 0x4b, 0x73, 0x57, 0xba, 0x71, 0x71, 0xae, 0x7e, 0xdd, 0x1e, 0x61, 0xac, 0xaf, 0xc1, 0x74, 0x7d, 0xba, 0xc4, 0xd4, 0xc0, 0x22, 0xb8, 0xac, 0xc6, 0x64, 0x9c, 0x8e, 0x44, 0xec, 0x2d, 0x64, 0x55, 0xe6, 0x23, 0xbc, 0xac, 0xf1, 0xc, 0x39, 0x15, 0xe4}, - output512: []byte{0xb1, 0x41, 0x28, 0x9f, 0xc8, 0xe9, 0x71, 0x91, 0xc3, 0xa4, 0x5a, 0x12, 0x5e, 0xb2, 0x98, 0x31, 0xc5, 0x32, 0xf7, 0x64, 0xc9, 0x92, 0x4a, 0x5e, 0xc1, 0x75, 0x52, 0x67, 0xe7, 0xdb, 0xac, 0xe6, 0x8c, 0x9e, 0xc4, 0xa6, 0x85, 0x45, 0x5b, 0xe0, 0x6a, 0x75, 0xdd, 0xfa, 0x80, 0x42, 0x1f, 0x16, 0xa3, 0xfc, 0x96, 0x20, 0x32, 0x77, 0xe3, 0xcb, 0x22, 0x54, 0x3b, 0x9c, 0x7, 0xa9, 0x4c, 0x7f}}, - testcase{ - msg: []byte{0x3d, 0x85, 0xe0, 0x3, 0x73, 0x43, 0xfa, 0x7, 0x6a, 0xe1, 0xa5, 0xac, 0x3b, 0x9b, 0x3a, 0x29, 0x96, 0x54, 0xa9, 0xf5, 0x2e, 0x73, 0x31, 0x21, 0x13, 0xe0, 0xeb, 0xd7, 0x8f, 0x4b, 0x59, 0x98, 0x48, 0x2, 0x3a, 0xa9, 0x75, 0x50, 0xdc, 0x77, 0xc9, 0x1d, 0xbf, 0xc9, 0x22, 0xbb, 0x96, 0x55, 0x8, 0xd5, 0xce, 0xcb, 0x13, 0x91, 0x53, 0xd6, 0xd6, 0xfa, 0xa4, 0xf8, 0xba, 0xbf, 0xa2, 0x25, 0xd, 0x29, 0xae, 0x12, 0xbb, 0x1, 0xd, 0x6d, 0x3e, 0xe7, 0x1f, 0x91, 0x7, 0x73, 0xa1, 0x52, 0x83, 0xac, 0x91, 0x6f, 0x8c, 0xa7, 0x6d, 0x35, 0x9a, 0xc6, 0xb6, 0x54, 0xbe, 0x15, 0xcf, 0xc8, 0xed, 0xf2, 0x46, 0xd, 0xe, 0x99, 0x3d, 0x1d, 0xf5, 0xed, 0x9c, 0x73, 0xe9, 0x5d, 0x35, 0x7d, 0x3c, 0xff, 0x5, 0x2b, 0x3f, 0x4c, 0xe3, 0x58, 0xf9, 0x6a, 0x63, 0x1f, 0xf, 0x7b, 0xe4, 0xc1, 0xb9, 0xd8, 0x8c, 0x7e, 0x6c, 0x4, 0x68, 0x2c, 0xe6, 0x5c, 0xdb, 0xca, 0x2c, 0x4e, 0x9c, 0xd0, 0x5d, 0x2f, 0x51, 0x2, 0x7e, 0x5e, 0x99, 0x2a, 0xdd, 0x31, 0x2, 0x6d, 0x37, 0xfd, 0x91, 0xda, 0x8c, 0x41, 0xa3, 0x3e, 0xe7, 0x26, 0xfa, 0xdd, 0x3d, 0x51, 0x69, 0x23, 0xc6, 0xcf, 0x58, 0x49, 0xe5, 0x84, 0x22, 0x91, 0x3, 0x9b, 0xc2, 0xea, 0x94, 0xd9, 0x3b, 0x2a, 0x8a, 0xc7, 0xfe, 0x72, 0x75, 0xfe, 0x86, 0x89, 0x28, 0xf3, 0xfa, 0xc2, 0xbe, 0xaa, 0x44, 0xf0, 0x63, 0x75, 0xd8, 0xb9, 0x2c, 0xde, 0x7c, 0x40, 0x3a, 0xb9, 0xf3, 0x5b, 0x4f, 0xf, 0x34, 0xeb, 0x66, 0xa5, 0xa3, 0x1d, 0xda, 0x32, 0xdf, 0x9d, 0xcd, 0x77, 0xdc, 0xb0, 0x40, 0xa6, 0xcc, 0x12, 0x7f, 0xd1, 0x9, 0xcf, 0xd5, 0x44, 0x10, 0xd7, 0xb3, 0xe4, 0xe8, 0x49, 0x8b, 0x4, 0x8, 0x94, 0x0, 0xd6, 0x1f, 0x0, 0x82, 0xca, 0x48, 0xa9, 0xd1, 0xd9, 0x56, 0x54, 0x87, 0xd7, 0x8, 0x75, 0x6a, 0x9b, 0x16, 0x94, 0x7e, 0x9c, 0x5, 0xf9, 0x40, 0x78, 0xe9, 0x1c, 0x56, 0x5a, 0x56, 0xc9, 0xf7, 0x20, 0x5a, 0xde, 0x6d, 0x8e, 0x94, 0x13, 0xd6, 0xdd, 0xf, 0xc8, 0x88, 0x5f, 0xe0, 0x1a, 0xc7, 0xfa, 0xee, 0x36, 0x5, 0xe2, 0x27, 0x25, 0xc9, 0xa5, 0x2f, 0xc1, 0xda, 0xe9, 0x2b, 0x11, 0xc, 0x38, 0xee, 0xb8, 0x77, 0x29, 0xa9, 0xbb, 0x22, 0x63, 0xb6, 0xd4, 0x3f, 0xfa, 0xa5, 0x7a, 0xbe, 0x9c, 0x84, 0x38, 0xb3, 0x1d, 0x15, 0xcd, 0xc8, 0xd8, 0xd, 0xc8, 0x13, 0x72, 0xb4, 0xd9, 0x81, 0x54, 0x93, 0x7e, 0x7e, 0xaa, 0xe, 0xec, 0xb, 0xf9, 0xc7, 0x1f, 0xb7, 0x7e, 0x2f, 0x7c, 0x36, 0xb, 0x64, 0x11, 0x2a, 0xc8, 0xd8, 0xfa, 0xb5, 0xb5, 0x74, 0xc2, 0x1f, 0xd3, 0x16, 0x0, 0xd3, 0x41, 0xa9, 0x17, 0x3a, 0x3e, 0xd0, 0x5b, 0xf, 0x41, 0x7c, 0x18, 0xc5, 0x8e, 0x52, 0x6a, 0x1, 0xe, 0xc9, 0xff, 0xca, 0x19, 0x46, 0x1a, 0xa9, 0xea, 0x5f, 0x85, 0x41, 0x6d, 0x2, 0x96, 0x89, 0xaf, 0xe7, 0xf6, 0x98, 0x36, 0xf8, 0x9d, 0x17, 0x12, 0x0, 0x4b, 0x8c, 0x79, 0x2, 0xd, 0x6c, 0xff, 0x2, 0x45, 0xc7, 0xd4, 0xb1, 0xc1, 0x96, 0x75, 0xd, 0x44, 0x52, 0x7d, 0xed, 0x40, 0x75, 0x95, 0xa7, 0xb2, 0x8e, 0xe8, 0xc9, 0x5a, 0x85, 0xc6, 0xce, 0xd8, 0x26, 0xbb, 0x7f, 0x61, 0xd8, 0xea, 0xd9, 0xe0, 0xbe, 0x20, 0xe6, 0x7d, 0x30, 0xd5, 0xad, 0x6d, 0x2d, 0x4d, 0xcb, 0x38, 0xf2, 0xe, 0x41, 0xce, 0xad, 0x52, 0x15, 0x11, 0x75, 0x49, 0x1, 0xf1, 0x8, 0x31, 0xf8, 0xba, 0x88, 0x67, 0x9a, 0xa4, 0x2e, 0x9c, 0x47, 0x30, 0x8b, 0xc5, 0xa7, 0xf3, 0xae, 0x7, 0xc1, 0x4a, 0x8a, 0xb9, 0x92, 0xcf, 0x7, 0xa2, 0x67, 0x15, 0xf5, 0x64, 0xb1, 0x15, 0x38, 0xe4, 0xc4, 0x41, 0xa9, 0xae, 0x54, 0xa5, 0xa8, 0x27, 0x1b, 0x66, 0x96, 0x6c, 0x2c, 0x90, 0x65, 0xa4, 0xea, 0xed, 0x98, 0x84, 0x36, 0xc, 0xe6, 0x4, 0x15, 0xe9, 0x53, 0xbc, 0x31, 0x7, 0x2b, 0x4b, 0x2e, 0x3f, 0x75, 0x79, 0xd6, 0xfd, 0xb7, 0xf, 0xc7, 0x37, 0xc7, 0xc, 0xf5, 0x5e, 0xa5, 0xf7, 0x27, 0x43, 0xda, 0xff, 0x86, 0x6b, 0xa4, 0x82, 0x19, 0x9f, 0x85, 0x94, 0xd6, 0xd7, 0x2e, 0x1b, 0xd0, 0x7b, 0xb8, 0x24, 0x76, 0xea, 0x95, 0xb7, 0xdf, 0x92, 0x43, 0xb0, 0x1, 0x35, 0x42, 0xec, 0x95, 0xaf, 0x48, 0x6a, 0xb1, 0x84, 0xbb, 0xd9, 0x3e, 0x6e, 0xcc, 0xea, 0xfe, 0xcd, 0x1a, 0x64, 0xec, 0xa3, 0x4, 0x68, 0x12, 0x96, 0x83, 0xf1, 0x50, 0x65, 0x7a, 0xd0, 0x50, 0x1, 0x49, 0x1, 0xd0, 0xd4, 0xef, 0x10, 0x5, 0xc5, 0xb8, 0x6f, 0x98, 0xf2, 0xd7, 0x55, 0x3f, 0xb5, 0x29, 0xd7, 0x52, 0x4c, 0x3f, 0x1b, 0x27, 0x69, 0x6f, 0xd9, 0x83, 0x59, 0x35, 0x5c, 0xdc, 0x39, 0xde, 0x67, 0xcf, 0x18, 0xd8, 0xef, 0x58, 0x65, 0x3f, 0x3c, 0x4, 0x99, 0xe0, 0x85, 0xa8, 0xf9, 0xbf, 0x55, 0x5d, 0xb9, 0xa1, 0x60, 0x4a, 0x9d, 0x64, 0xc, 0x9, 0xc4, 0x5d, 0x2b, 0x4a, 0x8d, 0x81, 0xbe, 0x36, 0x93, 0x49, 0x38, 0x9a, 0xa8, 0x33, 0x35, 0x63, 0x38, 0x58, 0x47, 0x4, 0xf8, 0x64, 0xf0, 0x42, 0x27, 0x53, 0x6b, 0x5f, 0x95, 0x81, 0x99, 0x19, 0xc8, 0x36, 0x1, 0x11, 0xfa, 0x2f, 0x1c, 0x9f, 0x4b, 0x27, 0x5a, 0x18, 0xf7, 0x24, 0x64, 0x7b, 0xdf, 0x2a, 0x78, 0x30, 0xbc, 0xb, 0x6a, 0xf3, 0x86, 0xe9, 0xb5, 0xfd, 0xff, 0x2, 0x31, 0x16, 0xfb, 0x4e, 0x22, 0xe, 0x9e, 0xac, 0xe1, 0xb6, 0xe6, 0xb4, 0xc6, 0x8c, 0x1c, 0x7d, 0xc9, 0x19, 0x2, 0x36, 0x6a, 0x6c, 0xef, 0x4c, 0x41, 0x63, 0x61, 0x6b, 0x85, 0xdb, 0x15, 0xc3, 0xd3, 0x57, 0x33, 0x72, 0x72, 0x14, 0xb1, 0x7a, 0x47, 0xa6, 0xd9, 0xc5, 0xe0, 0x59, 0xcd, 0x1, 0x74, 0xb1, 0xe5, 0xfa, 0x76, 0x4a, 0xc1, 0x1d, 0x1e, 0x85, 0x9b, 0x8f, 0x9, 0x2a, 0x4d, 0xfd, 0xe1, 0x25, 0x43, 0xe5, 0xac, 0x4c, 0x27, 0xe3, 0x96, 0x18, 0x3a, 0x63, 0xfc, 0xa, 0x76, 0xa5, 0x24, 0x69, 0x14, 0x5c, 0xe8, 0xb0, 0x1b, 0xa7, 0x33, 0xc1, 0xbf, 0x4a, 0xe0, 0xd3, 0xda, 0x35, 0xf5, 0xb1, 0x7, 0xf3, 0x8, 0x3c, 0xf0, 0x7b, 0xfb, 0xf0, 0xe0, 0xe7, 0x6b, 0x3f, 0xc7, 0xfb, 0xf5, 0xe5, 0x15, 0xc6, 0xb7, 0x94, 0x3, 0x52, 0x3d, 0xb6, 0xd6, 0x68, 0xef, 0xfc, 0xec, 0x49, 0xda, 0xd4, 0x19, 0x66, 0x9d, 0xad, 0xd3, 0x43, 0x87, 0xc, 0x82, 0xbf, 0x5b, 0x76, 0x24, 0xc0, 0x6b, 0x9f, 0x8d, 0xbe, 0x66, 0xe4, 0x9a, 0x35, 0x49, 0x5b, 0xb, 0x17, 0xc2, 0x5a, 0xc8, 0x14, 0xa0, 0xa5, 0x8e, 0x54, 0x67, 0xda, 0xd9, 0x61, 0x34, 0x9c, 0xcc, 0x2e, 0x64, 0xc2, 0x17, 0xb8, 0xc3, 0x2d, 0xd2, 0x8d, 0xb4, 0xb7, 0xa4, 0xd8, 0xfc, 0x84, 0x1b, 0xc1, 0xad, 0xbf, 0x9f, 0x1e, 0x3c, 0x1f, 0x87, 0x1a, 0xc9, 0xe3, 0xd0, 0x3b, 0xe, 0x7f, 0xe2, 0x5a, 0xa7, 0x93, 0x91, 0xde, 0x96, 0x1b, 0x87, 0x20, 0x9c, 0x6e, 0x41, 0xd7, 0x36, 0x69, 0xc3, 0xa8, 0x88, 0x38, 0x56, 0x40, 0x37, 0x36, 0x23, 0x63, 0x17, 0x24, 0x7f, 0x33, 0x2b, 0xc4, 0xfa, 0x1b, 0x14, 0xf1, 0x98, 0x78, 0xe2, 0xdf, 0x79, 0x25, 0x19, 0x2a, 0xd5, 0xc4, 0xf7, 0xbf, 0x43, 0x1a, 0x1, 0xa1, 0x57, 0x2d, 0xa9, 0x8f, 0x2b, 0x1, 0xd1, 0x84, 0x67, 0x60, 0xdb, 0xfe, 0x3e, 0x38, 0x73, 0x57, 0xd1, 0x15, 0x13, 0x5f, 0x1d, 0xf6, 0xe4, 0xb1, 0x38, 0x5d, 0xa5, 0xe5, 0x91, 0xe0, 0xee, 0x22, 0x95, 0x85, 0x87, 0x5, 0xa2, 0xf1, 0x67, 0x30, 0xb0, 0xcd, 0x74, 0x68, 0xc0, 0x86, 0x12, 0x17, 0x9e, 0x3c, 0x44, 0x9f, 0x99, 0x77, 0xc0, 0xef, 0x66, 0x88, 0x41, 0x71, 0x90, 0xd7, 0x36, 0x1b, 0xb9, 0x4c, 0x47, 0x82, 0xd6, 0x7b, 0x3, 0x8c, 0x22, 0x5e, 0xa7, 0x3, 0xb8, 0xbc, 0x73, 0x9, 0x76, 0x15, 0x61, 0xbb, 0xf1, 0xa3, 0xae, 0x49, 0x25, 0xcb, 0xe, 0x8e, 0x33, 0x33, 0x16, 0x15, 0xee, 0x3f, 0x6, 0x62, 0x64, 0x1c, 0xef, 0x39, 0x42, 0xf9, 0xa0, 0x3, 0x14, 0x3, 0x76, 0x39, 0x3c, 0x58, 0xea, 0xa4, 0x6f, 0x6e, 0x99, 0x4a, 0x37, 0x53, 0x69, 0x27, 0x73, 0x31, 0x79, 0x5d, 0x9a, 0xe7, 0x5, 0x5d, 0x4d, 0xfe, 0x87, 0xad, 0x41, 0xa8, 0x43, 0x20, 0x2e, 0x59, 0x8e, 0x49, 0x20, 0x11, 0x83, 0x35, 0x25, 0xd2, 0xd5, 0x68, 0xb6, 0x99, 0x84, 0x1e, 0x6a, 0x82, 0xcc, 0xe5, 0x9b, 0x51, 0xd4, 0x0, 0xed, 0x6f, 0x89, 0x6c, 0x27, 0x11, 0x94, 0xf2, 0xc8, 0x23, 0xe, 0x27, 0x1b, 0xd2, 0x1a, 0xd4, 0x34, 0x5c, 0xb8, 0xcd, 0x89, 0xba, 0xde, 0xa7, 0xfb, 0x61, 0x88, 0xb0, 0x16, 0x74, 0x90, 0xe1, 0x49, 0x32, 0x64, 0xb6, 0x8b, 0xd9, 0x95, 0xd5, 0x6c, 0x93, 0xe6, 0x95, 0x1c, 0xa8, 0xc5, 0x54, 0xb1, 0xe0, 0xaf, 0x35, 0x85, 0x3, 0x77, 0xbb, 0x87, 0xc1, 0x3b, 0xaf, 0xdc, 0x81, 0xe3, 0xc4, 0x33, 0xff, 0x3b, 0x5f, 0x13, 0xfc, 0xb5, 0x33, 0x8b, 0x31, 0xee, 0x61, 0x9c, 0x59, 0xeb, 0x16, 0xe, 0x4e, 0x6e, 0x51, 0x85, 0xed, 0x41, 0xec, 0xb1, 0x87, 0x91, 0xe6, 0xae, 0xc2, 0xdb, 0xb8, 0x98, 0xc4, 0xf9, 0x51, 0xf7, 0x17, 0x9b, 0x3a, 0x52, 0x3a, 0x3e, 0xe8, 0xd7, 0x5b, 0xd3, 0x75, 0xf0, 0x3a, 0x18, 0x33, 0xe5, 0x4, 0x67, 0x27, 0xa5, 0x1, 0x17, 0x8e, 0x8e, 0xaa, 0xb4, 0xe2, 0x5a, 0x5, 0x79, 0x98, 0x37, 0xf1, 0xc9, 0x1f, 0xfd, 0x4e, 0xf3, 0x64, 0xed, 0x73, 0x1f, 0x39, 0xac, 0x65, 0x63, 0x71, 0xcc, 0xe0, 0x1d, 0xa7, 0x3a, 0x85, 0x59, 0x5a, 0xb9, 0xae, 0x3c, 0xe4, 0x1e, 0x79, 0x9f, 0xf9, 0x4c, 0x67, 0x6a, 0x45, 0x9, 0xd7, 0x74, 0xb7, 0x20, 0xf3, 0x8c, 0x1d, 0x92, 0x4d, 0x17, 0xb0, 0x9e, 0xaa, 0x4, 0x83, 0x55, 0x13, 0xc9, 0x65, 0x30, 0x65, 0x4d, 0xca, 0xf0, 0x5, 0x21, 0xb8, 0xa7, 0x4e, 0x40, 0x77, 0x4f, 0x14, 0x6b, 0x0, 0xaf, 0x65, 0xbc, 0xcb, 0xf4, 0x77, 0xb5, 0x8d, 0xe5, 0x28, 0xaa, 0x2b, 0xb7, 0x93, 0xf4, 0x7d, 0x55, 0xf4, 0xf2, 0x89, 0x3a, 0x11, 0x4e, 0xed, 0x9, 0xf2, 0x1c, 0xd7, 0x91, 0x68, 0xc5, 0x21, 0x34, 0xfe, 0xfe, 0xc9, 0xa7, 0x96, 0x59, 0xd4, 0xae, 0x45, 0xf2, 0x8a, 0x56, 0xa6, 0xe6, 0x53, 0x76, 0x18, 0x80, 0x24, 0x65, 0x2c, 0xc, 0xbc, 0xde, 0xb6, 0xdc, 0x8a, 0xed, 0x36, 0x60, 0x4e, 0x3, 0xdd, 0x61, 0xd4, 0xac, 0xe9, 0xa8, 0xb7, 0xc5, 0x4e, 0xbd, 0x35, 0xa1, 0x9c, 0xec, 0x99, 0xc7, 0x88, 0xfa, 0x2, 0xe4, 0x5e, 0x5a, 0xa2, 0x91, 0x60, 0xc6, 0x61, 0x5, 0x1b, 0x26, 0x20, 0x80, 0x84, 0x1d, 0xa9, 0xf3, 0xbe, 0x61, 0xad, 0x42, 0x1b, 0x4c, 0xeb, 0xe7, 0xee, 0xc7, 0x7d, 0xa, 0x2c, 0x2f, 0x14, 0x65, 0x81, 0x9, 0xcd, 0xe4, 0x74, 0x1a, 0x8f, 0x9, 0x67, 0xd3, 0xe6, 0x9d, 0x95, 0xe6, 0x90, 0x90, 0x98, 0xa6, 0x10, 0x85, 0xae, 0x12, 0x37, 0xba, 0x8b, 0xfc, 0xdb, 0xfc, 0x33, 0x9d, 0xeb, 0x4a, 0x11, 0xad, 0x80, 0xc1, 0x18, 0x2, 0x3d, 0x82, 0xd9, 0x4, 0xa0, 0x28, 0x2e, 0xe5, 0x8d, 0xa, 0xcc, 0x18, 0xf, 0x9e, 0x9a, 0x62, 0x9c, 0x8, 0x3c, 0xc7, 0xb, 0x6b, 0xcb, 0xaa, 0x47, 0xad, 0xad, 0x76, 0xbf, 0xa0, 0xbf, 0x3, 0x93, 0xe9, 0xfc, 0x86, 0xc6, 0xd4, 0x37, 0x4b, 0x1f, 0xff, 0x93, 0xe9, 0xad, 0x8f, 0x76, 0x43, 0xbc, 0xc7, 0x69, 0xd2, 0xe1, 0xb9, 0x1a, 0x57, 0x1f, 0xd0, 0x4f, 0x46, 0x2, 0xad, 0x8, 0xa7, 0xca, 0xa9, 0x23, 0x19, 0x13, 0x72, 0x91, 0x88, 0x3f, 0xf0, 0xce, 0xe2, 0x2, 0x3b, 0xd4, 0x12, 0x5, 0x77, 0x61, 0x1d, 0x68, 0x7e, 0x71, 0xfd, 0x39, 0xbe, 0xe2, 0x5d, 0x23, 0xd0, 0x6, 0x19, 0x8, 0x31, 0x71, 0xde, 0x81, 0xa0, 0x47, 0x5b, 0xf7, 0x69, 0xc9, 0x72, 0xa0, 0x69, 0x60, 0x31, 0x71, 0x97, 0x19, 0x18, 0x7f, 0xb5, 0xc1, 0x72, 0xea, 0x5, 0xc7, 0xcf, 0x57, 0x40, 0x29, 0x66, 0x83, 0x88, 0x9f, 0xc, 0xe5, 0xb2, 0x86, 0x65, 0xc0, 0xef, 0xcf, 0xbc, 0x95, 0xa4, 0xbf, 0x7b, 0x9c, 0x6c, 0xee, 0x9e, 0x3a, 0xbe, 0xf3, 0x17, 0xaa, 0xd2, 0xc8, 0x29, 0xe5, 0x95, 0x33, 0xdc, 0xe7, 0x1, 0x86, 0x65, 0x7c, 0x6d, 0xb4, 0x4d, 0xa4, 0x28, 0x20, 0xbd, 0x1f, 0x91, 0x91, 0xab, 0xcd, 0x34, 0x95, 0xaa, 0x6d, 0x16, 0x61, 0xfe, 0x7, 0x35, 0xf4, 0xae, 0x7d, 0x56, 0x7e, 0xf0, 0xcc, 0xab, 0x73, 0x10, 0x36, 0xb2, 0x43, 0x90, 0xc5, 0x60, 0x96, 0xd3, 0xb5, 0x6a, 0x1f, 0xfd, 0xc9, 0xcf, 0x36, 0xf1, 0x75, 0xb5, 0x87, 0x61, 0x2d, 0xd7, 0xec, 0xb4, 0x13, 0x86, 0xf8, 0x2b, 0xa6, 0xf8, 0x1a, 0xf6, 0xe6, 0x84, 0xbf, 0xd6, 0x5, 0x5e, 0xe2, 0x37, 0xe5, 0xa2, 0x2a, 0x25, 0xdb, 0xa, 0xc2, 0x98, 0x5b, 0x8f, 0x4e, 0x7c, 0x55, 0x3b, 0x10, 0x28, 0x3c, 0x76, 0xab, 0xff, 0x2c, 0xfd, 0x41, 0x5d, 0x6d, 0x39, 0x72, 0x3b, 0xfd, 0xf8, 0x8f, 0x2a, 0x8c, 0x58, 0x7c, 0x5c, 0x92, 0x1d, 0x4f, 0xd4, 0xa8, 0xe7, 0x29, 0x8d, 0xe0, 0xe7, 0xb2, 0xe8, 0x97, 0xfa, 0xa2, 0x51, 0x3d, 0x5a, 0xe1, 0xc3, 0x15, 0xa5, 0x93, 0x42, 0x1d, 0xb0, 0x7d, 0xae, 0x69, 0x63, 0x44, 0xef, 0x88, 0x24, 0x14, 0xe3, 0x23, 0xbd, 0x3, 0xbf, 0x8b, 0x97, 0xee, 0xdd, 0x73, 0x2e, 0x44, 0xc7, 0x37, 0xca, 0x23, 0x2e, 0x4e, 0x6a, 0x1d, 0x26, 0xf, 0x36, 0x7d, 0xbb, 0xac, 0x25, 0x0, 0xc4, 0x61, 0x9e, 0xd7, 0xd7, 0x17, 0xd, 0x24, 0x82, 0xa1, 0xa9, 0x8f, 0x99, 0xf9, 0xd4, 0xd6, 0xf1, 0x83, 0x2d, 0x7, 0xe8, 0x3f, 0x58, 0xe6, 0x82, 0xd8, 0x9e, 0xea, 0x2, 0x3f, 0xb4, 0xa3, 0xa9, 0x43, 0x8c, 0x90, 0x6a, 0xa3, 0x64, 0x11, 0xe3, 0x73, 0x56, 0xd9, 0x56, 0x89, 0xe4, 0xed, 0x4d, 0x49, 0x54, 0x8d, 0xa8, 0xe8, 0xfb, 0x59, 0xc9, 0xc8, 0x80, 0xe7, 0x76, 0xe2, 0xed, 0x87, 0x7, 0xdc, 0xf4, 0xb5, 0x7a, 0xe1, 0x65, 0x7a, 0x5c, 0xdf, 0x77, 0xa4, 0xa7, 0x57, 0x88, 0x6a, 0xa5, 0x9b, 0x49, 0x61, 0x82, 0xa6, 0x8b, 0x62, 0xcb, 0x41, 0x36, 0x9, 0x56, 0xb5, 0x11, 0x52, 0x6e, 0x89, 0x55, 0xa8, 0x16, 0x58, 0x98, 0x70, 0x62, 0x58, 0xb3, 0xf6, 0xf9, 0xd5, 0x4, 0xef, 0xf7, 0xc2, 0xf5, 0x73, 0xe7, 0xdb, 0x10, 0x64, 0xf9, 0xa1, 0x63, 0x91, 0xb1, 0x1d, 0x1d, 0x53, 0x7c, 0xf7, 0x9, 0x57, 0x2e, 0xae, 0xa0, 0x23, 0x95, 0x2f, 0xab, 0x7c, 0x70, 0xbb, 0x4b, 0xe3, 0x87, 0x2e, 0x79, 0x49, 0x30, 0xcb, 0xe2, 0xcc, 0xea, 0x92, 0xcd, 0xbb, 0xc8, 0x58, 0x68, 0x30, 0xaf, 0xf8, 0x12, 0x64, 0xcc, 0xa, 0x4f, 0x3a, 0x3f, 0xf1, 0x1a, 0x4d, 0x1a, 0x7d, 0x52, 0x1a, 0x8e, 0xe7, 0x37, 0xc4, 0xff, 0xa4, 0x70, 0x63, 0xd8, 0xe8, 0x8d, 0x69, 0xd3, 0x81, 0xa0, 0x85, 0xd7, 0x1e, 0xfe, 0xa5, 0x1a, 0x3d, 0xc1, 0x73, 0xf6, 0xf7, 0x6f, 0x2f, 0x4e, 0x12, 0x9, 0xa5, 0x36, 0x95, 0x1f, 0xe9, 0x46, 0xe5, 0x48, 0x91, 0x4b, 0xcd, 0x7b, 0xc4, 0xdd, 0x50, 0x6b, 0x41, 0xb1, 0xdc, 0x5b, 0xaa, 0xb3, 0x48, 0x74, 0x36, 0x2c, 0xe0, 0xff, 0x3, 0xbd, 0xa1, 0x9c, 0xb5, 0x93, 0x8b, 0x81, 0x3c, 0x57, 0xe4, 0x4e, 0xd, 0x61, 0xdb, 0x66, 0x44, 0x50, 0x1c, 0xba, 0x3d, 0x59, 0xb6, 0xcf, 0xeb, 0xe2, 0xe, 0x35, 0xe4, 0xf6, 0x70, 0xe1, 0xe8, 0x78, 0xe3, 0xda, 0xf7, 0x2, 0x45, 0xd9, 0xc4, 0x2a, 0x19, 0xd, 0x57, 0x5b, 0x98, 0xf9, 0xba, 0xf8, 0x8e, 0xf5, 0x9e, 0x55, 0x64, 0x63, 0xd, 0x1c, 0xb, 0xe4, 0xe5, 0x66, 0x70, 0x8c, 0x4c, 0xa9, 0x13, 0x18, 0x13, 0x33, 0x2d, 0xfd, 0x7f, 0x26, 0x7e, 0x37, 0xca, 0xf7, 0x68, 0x1e, 0xc9, 0xbf, 0x5a, 0xc8, 0x45, 0x86, 0xfa, 0x9a, 0x97, 0xc6, 0xc8, 0x88, 0x2f, 0xc2, 0x43, 0x58, 0xbf, 0x88, 0x51, 0x68, 0x88, 0x60, 0xe8, 0x38, 0x70, 0x3d, 0x3e, 0xbe, 0x14, 0x98, 0xee, 0xc2, 0x7d, 0x8c, 0xee, 0xac, 0xc0, 0xaf, 0xb1, 0x58, 0xf5, 0xcc, 0xf1, 0x84, 0x65, 0x25, 0x47, 0x7d, 0x3b, 0xf0, 0x69, 0xf6, 0x3f, 0xe2, 0x6e, 0xde, 0x5f, 0xf5, 0x56, 0x38, 0x7b, 0x7d, 0x92, 0xf9, 0x54, 0x8, 0x57, 0xd7, 0x99, 0xd7, 0x7d, 0x1d, 0x33, 0x19, 0xc8, 0x66, 0x95, 0xb0, 0x62, 0x2f, 0x82, 0xc5, 0x7a, 0x5, 0x95, 0x2f, 0x6d, 0xcf, 0x11, 0x4b, 0x1d, 0x36, 0xf5, 0x62, 0x99, 0x62, 0xdf, 0x10, 0x72, 0x7b, 0x2b, 0x3f, 0x9a, 0x9e, 0x58, 0x3d, 0xab, 0xc8, 0xb5, 0x61, 0xdf, 0xf5, 0x3b, 0x3e, 0x17, 0xd7, 0x2c, 0xbc, 0xab, 0x8c, 0xa9, 0x74, 0x1, 0x8d, 0x65, 0xc4, 0xe3, 0x5, 0x4b, 0xa5, 0x12, 0x11, 0xc3, 0x1f, 0x81, 0x34, 0x4c, 0xff, 0x43, 0x54, 0xf8, 0x12, 0x2b, 0x6b, 0x2b, 0x28, 0x19, 0x2e, 0x80, 0x99, 0x95, 0x37, 0xd7, 0x83, 0xdd, 0x5b, 0x34, 0xa4, 0x77, 0x52, 0x57, 0x5b, 0x3b, 0xae, 0xfb, 0x4, 0x24, 0x77, 0x3, 0x27, 0x1f, 0x9e, 0xbd, 0x89, 0x64, 0x9d, 0xd, 0xf3, 0xb, 0xf0, 0x30, 0xc9, 0xdf, 0xe3, 0x9e, 0x61, 0x64, 0x70, 0xf3, 0xdd, 0x75, 0xe0, 0xf0, 0x59, 0x5e, 0x57, 0x2e, 0x70, 0xa9, 0x3d, 0x1c, 0xc2, 0xed, 0x8c, 0xac, 0xb4, 0xdc, 0x24, 0x31, 0x54, 0x6b, 0x12, 0x39, 0x72, 0x64, 0x9b, 0x82, 0xd5, 0x87, 0x6e, 0x9, 0xd6, 0xc4, 0xd9, 0xe1, 0xd2, 0xc, 0xf4, 0x6c, 0x75, 0xc4, 0xe2, 0xef, 0x76, 0xc1, 0x62, 0xe5, 0x26, 0x7b, 0xb, 0x9c, 0x11, 0xb6, 0xdf, 0x4f, 0x32, 0x92, 0x50, 0x42, 0xe1, 0x91, 0xb6, 0xed, 0x5d, 0xa0, 0x24, 0x5b, 0x68, 0xde, 0xb, 0x9, 0x8, 0x7e, 0x64, 0xe1, 0x77, 0xe4, 0x1a, 0x5a, 0x6b, 0xde, 0xdd, 0xb4, 0x84, 0x2d, 0xd0, 0x86, 0x64, 0xe0, 0x3f, 0xa5, 0x94, 0x57, 0x29, 0x82, 0xd4, 0x15, 0xa6, 0x4b, 0x70, 0x74, 0x9e, 0xd5, 0x36, 0xea, 0x12, 0x85, 0x11, 0x77, 0x7, 0x9d, 0xa7, 0x93, 0x5b, 0x85, 0xa8, 0x1f, 0x0, 0xaf, 0x1, 0x18, 0xfa, 0xa6, 0x2b, 0x87, 0x9b, 0xf5, 0xc0, 0x41, 0x6, 0x72, 0xc5, 0x94, 0x8e, 0x54, 0x52, 0x18, 0xca, 0xf9, 0xce, 0xa6, 0x4b, 0x60, 0xc9, 0xc0, 0x54, 0xa1, 0x28, 0xe7, 0x86, 0x75, 0x72, 0xe0, 0x22, 0x89, 0x65, 0x34, 0xd1, 0x4b, 0x97, 0xab, 0x66, 0x8b, 0xdc, 0x9b, 0x50, 0xce, 0x34, 0xc2, 0x69, 0x7, 0x88, 0xf4, 0x7c, 0xc3, 0x11, 0xb8, 0x66, 0xd4, 0xde, 0x1f, 0xac, 0xeb, 0xc1, 0xbc, 0xc3, 0x6, 0xef, 0xdd, 0x69, 0x56, 0xe5, 0x8d, 0x39, 0x13, 0x4, 0x76, 0x97, 0x42, 0xa6, 0x5c, 0xba, 0x3f, 0x81, 0xd6, 0xc4, 0x5a, 0x79, 0xcf, 0xc2, 0xe9, 0x4b, 0xa4, 0x4f, 0x9c, 0x73, 0x98, 0x6b, 0xdc, 0xd6, 0x8e, 0x91, 0x62, 0xd9, 0xfd, 0x52, 0xaf, 0xba, 0xf0, 0x15, 0x4e, 0x20, 0xe4, 0x26, 0x83, 0x6a, 0x68, 0xe6, 0xfc, 0x5d, 0x22, 0x73, 0xcd, 0x11, 0xf0, 0x9d, 0xa0, 0xb3, 0x1, 0x9b, 0x7a, 0x52, 0x88, 0xbb, 0xf2, 0x1e, 0xb3, 0xed, 0x2, 0xa6, 0x6d, 0x78, 0x74, 0x2, 0x49, 0x4d, 0x51, 0xf1, 0xfc, 0xc3, 0x72, 0x81, 0x3b, 0xdd, 0xb5, 0x1, 0x7b, 0xb, 0xd4, 0x68, 0xa8, 0x8a, 0x50, 0xd6, 0x5a, 0xe0, 0x80, 0x76, 0xd7, 0xc7, 0x54, 0xe6, 0x48, 0x98, 0x7, 0x4f, 0x30, 0x48, 0xc8, 0xe3, 0xce, 0x1b, 0x9, 0x54, 0xde, 0x60, 0xdd, 0x97, 0xe9, 0x4f, 0xad, 0xdf, 0x31, 0xb3, 0x83, 0xf7, 0xb1, 0x36, 0x5c, 0xb8, 0x3a, 0xb0, 0xb4, 0xd3, 0xa, 0x7f, 0x89, 0x53, 0xa7, 0x34, 0x35, 0xf9, 0x16, 0xd, 0x45, 0xc3, 0x70, 0xf3, 0x9f, 0x3d, 0xb1, 0x3e, 0xe4, 0x6a, 0x37, 0xb5, 0xac, 0xe3, 0x5, 0x7b, 0x83, 0x99, 0x3f, 0x3, 0x5e, 0x8c, 0x1f, 0x8c, 0xee, 0x6e, 0xf7, 0xc3, 0x59, 0x12, 0x77, 0xce, 0xf6, 0x93, 0x1, 0xd5, 0x4e, 0xca, 0x46, 0x70, 0x25, 0x58, 0x37, 0x50, 0x4b, 0x70, 0x9b, 0xa3, 0xb2, 0xdd, 0x9, 0x1d, 0x95, 0xef, 0x6e, 0x6c, 0x55, 0x91, 0xde, 0x43, 0x9f, 0x5a, 0x88, 0x2e, 0x86, 0xe1, 0x9d, 0x1a, 0x2d, 0x6d, 0xf5, 0x6f, 0xd, 0xd2, 0x6e, 0x8e, 0x95, 0x4d, 0xe5, 0xf3, 0xd1, 0x43, 0x89, 0x87, 0xad, 0x2f, 0xf1, 0xa2, 0x2f, 0x43, 0x20, 0xe9, 0x6f, 0xeb, 0x55, 0xdf, 0xac, 0xb8, 0x3a, 0x53, 0xd1, 0xc8, 0x4b, 0x6b, 0x25, 0xfa, 0xde, 0xea, 0x49, 0x70, 0xc8, 0x5e, 0x82, 0x86, 0x6a, 0xae, 0x5e, 0x7a, 0x7c, 0xbe, 0x85, 0xdd, 0xa0, 0xab, 0x5e, 0x7b, 0xb0, 0xa0, 0x74, 0x30, 0x2c, 0x49, 0x60, 0x91, 0x18, 0xc8, 0xe3, 0x4a, 0xaf, 0xa5, 0xec, 0x7b, 0xd1, 0xbe, 0xf5, 0xd8, 0x1b, 0x25, 0xb5, 0xf8, 0xf4, 0xcc, 0x8f, 0x26, 0x40, 0x86, 0xd3, 0xb0, 0x46, 0xa5, 0xee, 0xb8, 0x9a, 0x30, 0x7d, 0x4, 0x4c, 0x7, 0x6c, 0x3e, 0x46, 0x98, 0xe6, 0x7, 0x89, 0xda, 0xdc, 0xf2, 0x65, 0x17, 0x2b, 0x75, 0xfb, 0x5e, 0x80, 0xb5, 0x9c, 0xff, 0x93, 0x9c, 0x6, 0xf9, 0x37, 0x85, 0x64, 0x8, 0xf7, 0x9}, - output224: []byte{0xb6, 0xcd, 0xea, 0x9d, 0xec, 0x93, 0x7e, 0x45, 0x7f, 0xb9, 0x45, 0x43, 0x3e, 0x14, 0x6, 0x10, 0xa5, 0xd5, 0xd9, 0x3d, 0xc2, 0x5f, 0x30, 0x7, 0x99, 0x24, 0x77, 0xca}, - output256: []byte{0xea, 0x2d, 0xbc, 0xe6, 0x65, 0x27, 0x8a, 0xa9, 0xbf, 0x9a, 0xfe, 0xe3, 0x4a, 0x0, 0x60, 0x21, 0x5f, 0x1d, 0x25, 0x71, 0x43, 0xd7, 0x3f, 0xf, 0xbe, 0x54, 0x1b, 0x29, 0x42, 0xf1, 0xbc, 0xbc}, - output384: []byte{0xb3, 0xfb, 0xb5, 0x6b, 0x7f, 0x1c, 0xe4, 0x4e, 0x8, 0x39, 0x4f, 0x8e, 0x21, 0xe2, 0x8b, 0x97, 0xb5, 0xec, 0x2d, 0x60, 0x37, 0xfc, 0xa4, 0x55, 0x67, 0x4b, 0x40, 0x64, 0x91, 0x57, 0x68, 0x4d, 0x5a, 0x19, 0x14, 0x3d, 0x8d, 0x9a, 0x9f, 0xc9, 0x51, 0xba, 0x98, 0xe5, 0x40, 0x7d, 0x2, 0x9a}, - output512: []byte{0xf2, 0xcd, 0x7, 0x45, 0xf5, 0x9f, 0x2e, 0x40, 0xd2, 0x9e, 0xc5, 0xc9, 0xc3, 0xf6, 0x69, 0x1a, 0x1b, 0xf6, 0x2d, 0x19, 0x46, 0x53, 0x93, 0x4f, 0x3d, 0xbc, 0x87, 0xb4, 0xa2, 0x7d, 0xe3, 0xe2, 0x15, 0x3a, 0xec, 0x97, 0xc, 0x51, 0xf5, 0x20, 0x1f, 0xb7, 0x55, 0x8, 0x44, 0xa7, 0xe4, 0xb6, 0x96, 0x45, 0x70, 0xb2, 0xa4, 0xbd, 0x87, 0x39, 0x4, 0xf9, 0xfd, 0x9c, 0x70, 0x49, 0x0, 0xda}}, - testcase{ - msg: []byte{0x16, 0xf8, 0x5f, 0x57, 0x82, 0x6, 0xf4, 0xd6, 0x25, 0xa5, 0x83, 0x1c, 0xb3, 0xb0, 0x29, 0xf0, 0x9d, 0x6f, 0x9e, 0x13, 0xf8, 0xe4, 0x27, 0x1f, 0xd4, 0x1a, 0x42, 0x9c, 0xeb, 0x63, 0x8a, 0x13, 0x0, 0xe5, 0x1b, 0x40, 0x3e, 0xd6, 0x12, 0x44, 0x20, 0xb3, 0x63, 0x19, 0x1f, 0x55, 0xb3, 0x2e, 0x14, 0xd2, 0x86, 0x58, 0x4b, 0x51, 0xd3, 0x57, 0x25, 0x36, 0xa0, 0xb7, 0x2, 0x2b, 0x63, 0xf8, 0x44, 0xf8, 0x5c, 0x45, 0x77, 0x19, 0xf8, 0x8d, 0x4b, 0x91, 0xb1, 0x3, 0x4d, 0x2b, 0x58, 0xe7, 0x7c, 0x3f, 0xaa, 0x34, 0xa3, 0x3d, 0xb8, 0x8, 0x92, 0x84, 0xad, 0x13, 0xc9, 0x93, 0xc2, 0x34, 0xca, 0x88, 0x3e, 0x2, 0x63, 0xd4, 0xfb, 0xe2, 0x9, 0xaf, 0xa3, 0x1a, 0x44, 0x50, 0x21, 0xa2, 0xfb, 0x4f, 0x45, 0x76, 0x33, 0xa5, 0x4d, 0x15, 0x8d, 0x94, 0xf2, 0x34, 0x2b, 0xed, 0xb2, 0xcb, 0x65, 0xdd, 0x67, 0x8, 0x8f, 0x8e, 0x1, 0x7b, 0x58, 0xbb, 0x78, 0x7e, 0xd0, 0x40, 0xa, 0xe3, 0x4, 0x66, 0x8, 0x5e, 0xb7, 0x2f, 0x19, 0x1, 0x18, 0xbc, 0xd6, 0xb0, 0xa, 0x7e, 0x1b, 0xe1, 0x2d, 0x3e, 0x86, 0x55, 0x39, 0x48, 0x85, 0x9f, 0xdb, 0x93, 0x5, 0x22, 0xac, 0x99, 0x39, 0x96, 0x85, 0xfa, 0x8d, 0x29, 0x27, 0xd4, 0xc9, 0x76, 0x37, 0xea, 0x57, 0x73, 0xc, 0x12, 0x16, 0xe0, 0xc, 0x2b, 0xd8, 0xe8, 0xba, 0x68, 0x4e, 0x1e, 0x82, 0x2, 0x28, 0x9f, 0x87, 0x8, 0xd5, 0xe4, 0x3f, 0x68, 0xef, 0xbd, 0x1d, 0xce, 0x5d, 0xb6, 0x40, 0x88, 0x89, 0xe5, 0xe6, 0xd3, 0x2b, 0xc6, 0xb2, 0xc, 0x1e, 0x40, 0x30, 0x14, 0x71, 0xee, 0x65, 0x8a, 0x2b, 0x89, 0x87, 0x35, 0x89, 0xa9, 0x5f, 0x1b, 0x19, 0x23, 0x97, 0x23, 0x77, 0xe6, 0x59, 0x9d, 0xc7, 0xa0, 0x27, 0x6d, 0x52, 0xb5, 0x4b, 0x18, 0x24, 0x5a, 0x38, 0xcf, 0x56, 0xb9, 0xe4, 0x60, 0x3b, 0xb9, 0xbf, 0xb7, 0xf9, 0xa6, 0x8c, 0xb6, 0x31, 0x84, 0x22, 0x13, 0x45, 0x89, 0x5d, 0xfa, 0xef, 0xb6, 0xdb, 0x77, 0xc8, 0xfc, 0x11, 0xa2, 0xb0, 0x63, 0x7e, 0xe6, 0x47, 0x8d, 0xb7, 0x4f, 0x2d, 0xc7, 0x71, 0xae, 0x29, 0x3c, 0x9d, 0x1b, 0x49, 0x6a, 0x41, 0xa, 0xd0, 0x12, 0x13, 0x3f, 0x65, 0xea, 0xf4, 0xd3, 0x73, 0x7e, 0x1, 0xb4, 0x14, 0x2b, 0x50, 0xc7, 0x39, 0xb0, 0x76, 0x6e, 0x84, 0x6e, 0x3a, 0x37, 0x29, 0x36, 0xe8, 0xf0, 0x5d, 0x0, 0xcc, 0x91, 0xfc, 0x4b, 0x1, 0xdf, 0x2e, 0x39, 0x15, 0x1d, 0xec, 0x6c, 0x11, 0xc3, 0xe0, 0x59, 0xae, 0xeb, 0x88, 0x4a, 0xd4, 0xb1, 0x46, 0xf0, 0xcc, 0xc6, 0x6c, 0xe4, 0x8d, 0x89, 0x59, 0xd7, 0xab, 0x99, 0x20, 0xf8, 0x95, 0xfa, 0x91, 0x1d, 0x6f, 0x12, 0x7c, 0x97, 0xf1, 0xe8, 0x58, 0x3d, 0x5a, 0xc8, 0xb0, 0xbb, 0xb9, 0x59, 0xca, 0x80, 0xe6, 0xf0, 0x25, 0xb4, 0xdf, 0x44, 0x7, 0x47, 0x64, 0x8d, 0xab, 0x69, 0x66, 0x2e, 0xdb, 0x9f, 0x4e, 0xe4, 0x4a, 0x6e, 0xb7, 0xb3, 0xa0, 0x86, 0x87, 0xb, 0x16, 0x74, 0x18, 0xc4, 0xca, 0xdf, 0xdf, 0x64, 0x8, 0xe8, 0x6f, 0xc0, 0x74, 0x59, 0xd3, 0x78, 0x70, 0xf9, 0x5d, 0x1a, 0xa1, 0x1d, 0x3c, 0xaa, 0xdb, 0x3f, 0xd6, 0x50, 0x38, 0xcf, 0xad, 0xc7, 0x58, 0xc6, 0x9e, 0x8e, 0x77, 0xb9, 0xf0, 0xd0, 0x88, 0x44, 0xf9, 0x42, 0xa7, 0x3b, 0x2a, 0x16, 0xb9, 0x9f, 0xe5, 0x8f, 0x35, 0x44, 0x4c, 0x3e, 0x5c, 0xbf, 0xf0, 0x3c, 0xc7, 0xcb, 0x4b, 0x95, 0xda, 0x6c, 0xa7, 0xd9, 0xa7, 0xf, 0xfd, 0x84, 0x62, 0x27, 0xcd, 0xa9, 0xbb, 0x71, 0xa7, 0x21, 0x2c, 0xb7, 0xf6, 0x6b, 0xd6, 0x35, 0xb2, 0xb2, 0x51, 0x16, 0xf1, 0xa6, 0x8c, 0xcc, 0x23, 0x9f, 0xb5, 0xc5, 0x10, 0xe8, 0x76, 0xbc, 0x60, 0x2d, 0xbc, 0x51, 0x8f, 0x6, 0x8f, 0x55, 0x2, 0x47, 0x15, 0xc2, 0x23, 0x6b, 0xea, 0x45, 0xf4, 0x29, 0x64, 0xac, 0xc0, 0x22, 0xec, 0xc3, 0x65, 0x3c, 0x12, 0x39, 0x9f, 0xd6, 0x50, 0x95, 0xe0, 0xe3, 0x6, 0x14, 0xd0, 0x2d, 0x82, 0x74, 0xc6, 0x3b, 0xc4, 0xb8, 0x8f, 0x3d, 0x11, 0xdf, 0xea, 0xd0, 0xe4, 0x6, 0xb1, 0xcf, 0xbe, 0xc3, 0x40, 0x65, 0x5, 0x9d, 0xdc, 0xe7, 0x63, 0x27, 0x97, 0x3e, 0xf8, 0x2d, 0x5b, 0xa, 0x6d, 0xb9, 0xb3, 0x1, 0x46, 0x7, 0x20, 0x7e, 0x54, 0x5b, 0xb9, 0x65, 0x5, 0x18, 0xe4, 0xbe, 0x41, 0xbf, 0x94, 0x54, 0xac, 0x5f, 0xbf, 0xc9, 0x84, 0x58, 0x6f, 0x6f, 0xc5, 0x71, 0x42, 0x93, 0xad, 0xc8, 0x43, 0x8c, 0x89, 0x75, 0x22, 0xfe, 0x2c, 0xc6, 0xb1, 0xb8, 0x0, 0xbf, 0x64, 0x38, 0x1d, 0x91, 0xab, 0xfb, 0x2e, 0xf2, 0xb7, 0x70, 0x3e, 0x33, 0x7a, 0xd6, 0x31, 0xd2, 0x44, 0x98, 0xfa, 0x36, 0xfc, 0x94, 0x8f, 0x7b, 0x7b, 0xd6, 0x68, 0x18, 0x7c, 0xe9, 0xd9, 0x4c, 0x39, 0x6f, 0xc3, 0x22, 0xe5, 0x3f, 0x34, 0x19, 0x71, 0xf8, 0xb7, 0x9d, 0x50, 0x42, 0x89, 0xda, 0x46, 0x19, 0x9d, 0x7d, 0xf8, 0x41, 0xb9, 0x85, 0xd0, 0xeb, 0xe2, 0xf8, 0x2d, 0x9b, 0x74, 0x2a, 0x92, 0xcd, 0x18, 0x79, 0xce, 0xf6, 0xa9, 0xfe, 0x96, 0x8f, 0x3d, 0xd0, 0x87, 0x5f, 0x4c, 0x17, 0x2a, 0xfc, 0x3a, 0x28, 0x9a, 0x86, 0xda, 0xf, 0x4d, 0x3, 0xe8, 0xe5, 0xe2, 0x7d, 0xf2, 0xe, 0xb1, 0xc8, 0x19, 0xb2, 0x56, 0x6a, 0x63, 0x62, 0xa3, 0xa2, 0x2, 0xed, 0x31, 0x88, 0x51, 0xf2, 0x18, 0xd3, 0x93, 0x64, 0xc4, 0xc4, 0x7e, 0x5b, 0x47, 0xe1, 0x68, 0x94, 0xb6, 0x45, 0xfc, 0xc7, 0xa8, 0x4f, 0xf4, 0xae, 0x8a, 0x7, 0x5a, 0x65, 0x23, 0x75, 0x59, 0xe6, 0x9f, 0x6f, 0x63, 0x47, 0x36, 0x12, 0x9a, 0x67, 0x83, 0xb7, 0xc1, 0x3b, 0xfb, 0xbb, 0xc9, 0xe3, 0xfb, 0xf5, 0xf8, 0xfe, 0x52, 0xdc, 0xac, 0xf5, 0x63, 0xef, 0x41, 0xc1, 0xe8, 0x76, 0x75, 0x12, 0x6, 0xe5, 0xfb, 0x7c, 0xf8, 0x69, 0xf3, 0xf6, 0xbf, 0x38, 0x2c, 0x1e, 0x73, 0x33, 0x4f, 0x1c, 0x5, 0xe5, 0xf6, 0xfe, 0x81, 0x34, 0x4b, 0x7d, 0x5c, 0xdf, 0x58, 0x6, 0x17, 0x75, 0xcb, 0x34, 0x57, 0xd7, 0x47, 0x6c, 0x30, 0x85, 0xf9, 0xfe, 0x62, 0xc, 0xca, 0x92, 0x67, 0x9b, 0x1a, 0x54, 0x90, 0xd1, 0x62, 0xf, 0x61, 0x3b, 0x7e, 0x8c, 0xe1, 0x37, 0xc2, 0xf3, 0x9b, 0xa5, 0xcc, 0xbc, 0xb7, 0xc6, 0x1b, 0xcc, 0xbd, 0x6a, 0x2, 0x4e, 0xaa, 0x79, 0xe5, 0x89, 0x39, 0xb7, 0xca, 0xef, 0x19, 0x34, 0x8f, 0x74, 0x5a, 0x46, 0x40, 0xd1, 0x52, 0x26, 0xc0, 0x53, 0x2f, 0x1a, 0xc3, 0x57, 0x40, 0xae, 0x23, 0xcd, 0xf1, 0xc5, 0xf7, 0x11, 0x37, 0x25, 0x2, 0x2a, 0x79, 0x48, 0x61, 0x5a, 0x33, 0x46, 0x8a, 0x3f, 0x2e, 0x84, 0x50, 0x15, 0x4e, 0x4d, 0x9d, 0xe4, 0x52, 0xd3, 0xb9, 0xd5, 0x36, 0x89, 0x80, 0x7, 0x58, 0x58, 0xac, 0x6, 0xab, 0x9b, 0x30, 0xfd, 0xd4, 0x32, 0xe4, 0x4e, 0xdd, 0x9d, 0xd3, 0xc5, 0x72, 0x81, 0xbf, 0xb5, 0xf4, 0xe6, 0x82, 0x2d, 0x8b, 0xac, 0xc2, 0xe3, 0x51, 0x28, 0x34, 0xaf, 0x79, 0xe0, 0xf8, 0xe1, 0x3f, 0x86, 0x4, 0xc6, 0xcc, 0x83, 0x8e, 0x2b, 0xd3, 0x56, 0xbc, 0x32, 0x24, 0xd3, 0x51, 0x18, 0x7c, 0x89, 0xcf, 0xa, 0x35, 0x6, 0x9c, 0x78, 0x91, 0xbb, 0xf9, 0xf2, 0xe7, 0xd6, 0xb5, 0xd1, 0x86, 0xec, 0x92, 0xca, 0x96, 0xa1, 0x7a, 0x75, 0xb5, 0x31, 0x5c, 0xa5, 0xec, 0xa9, 0x4c, 0x3, 0x76, 0x7c, 0x50, 0xb, 0x27, 0x28, 0xe3, 0x6b, 0x7c, 0x7c, 0x10, 0xa3, 0x91, 0x55, 0xaf, 0x28, 0xa8, 0xc2, 0x62, 0x15, 0x20, 0x65, 0xcb, 0x68, 0xae, 0x92, 0x96, 0x5f, 0xa, 0x2, 0x89, 0xfb, 0xc4, 0x70, 0xfd, 0xf7, 0x12, 0xcc, 0xe4, 0xa0, 0x3c, 0xd0, 0xaf, 0xa7, 0xd9, 0xd3, 0xda, 0x1e, 0x7, 0x99, 0x17, 0x7d, 0x78, 0xc5, 0xe8, 0x7e, 0xa5, 0xae, 0x6a, 0xa1, 0xfc, 0xf4, 0xa5, 0x14, 0x81, 0x2d, 0xe, 0xd0, 0x58, 0x74, 0x17, 0xf7, 0x6, 0x89, 0x1c, 0xab, 0x15, 0x84, 0x29, 0xa3, 0x26, 0xbf, 0xda, 0x7, 0xf6, 0xc3, 0x11, 0x2f, 0x72, 0x12, 0x75, 0x6e, 0x6a, 0xed, 0xe, 0x54, 0x8c, 0xfd, 0x78, 0x8a, 0xed, 0xc7, 0xcb, 0xd, 0x3, 0xd1, 0x34, 0x5b, 0x2a, 0x28, 0xc6, 0xd3, 0x86, 0x4e, 0xc6, 0x73, 0x60, 0xce, 0x23, 0x7f, 0x0, 0x8a, 0x22, 0x5d, 0xe3, 0x8b, 0x3c, 0x3d, 0x95, 0x4, 0x7d, 0x2e, 0xa9, 0x19, 0xe4, 0x7d, 0xed, 0x2b, 0x2b, 0x81, 0x39, 0xcd, 0x37, 0xd3, 0x0, 0xa5, 0x29, 0x65, 0x50, 0xa1, 0x62, 0xca, 0xfa, 0x5b, 0xc0, 0xe8, 0x1, 0x48, 0x30, 0x49, 0x54, 0x87, 0xa3, 0xc2, 0xc4, 0xc4, 0x92, 0x82, 0xb8, 0xe0, 0x4b, 0xb9, 0x88, 0xd7, 0x44, 0xc0, 0xc7, 0x24, 0x8a, 0xe2, 0x0, 0x3f, 0x41, 0xcc, 0xd4, 0x46, 0x66, 0xe0, 0x67, 0x96, 0xc6, 0xa, 0xe, 0x58, 0x5b, 0xb1, 0xe1, 0xb, 0x5c, 0xb8, 0xd3, 0x46, 0xe5, 0x8f, 0x98, 0x43, 0x42, 0x5f, 0xa3, 0x27, 0x1b, 0x52, 0x27, 0xd0, 0x49, 0x8a, 0xed, 0x29, 0x6, 0xf3, 0x6d, 0x90, 0x76, 0xb1, 0x8, 0x3b, 0xc2, 0x6f, 0xa3, 0xf5, 0x5, 0xd9, 0x8, 0xf0, 0xb2, 0x94, 0x14, 0x8c, 0x79, 0x6e, 0xe2, 0x8a, 0xab, 0x11, 0x91, 0xb9, 0xf4, 0x6f, 0x5a, 0x49, 0x50, 0x48, 0x5d, 0xbe, 0x91, 0x3b, 0x9e, 0x22, 0x36, 0x5f, 0x0, 0x64, 0x72, 0xe, 0x9f, 0x9, 0x68, 0x84, 0xc0, 0xb3, 0x6d, 0x18, 0x40, 0x5f, 0x35, 0xec, 0x92, 0x81, 0x1, 0xad, 0xcc, 0x82, 0xe3, 0xd5, 0x6d, 0xd5, 0x78, 0xb6, 0xe8, 0x1d, 0xd0, 0xef, 0x2a, 0x98, 0xdc, 0x94, 0x16, 0x68, 0x28, 0x83, 0x52, 0x2a, 0x5f, 0x35, 0x7c, 0x36, 0xf2, 0x92, 0xed, 0xb5, 0x33, 0x7e, 0xe, 0x6b, 0x33, 0xdb, 0x17, 0x71, 0xed, 0xd2, 0xe9, 0x8c, 0xf4, 0x40, 0xa6, 0x11, 0x6e, 0xee, 0x24, 0xc7, 0xeb, 0xa0, 0xbc, 0xfd, 0xb2, 0xff, 0x1e, 0x1c, 0x85, 0x2a, 0x69, 0x27, 0xcd, 0x12, 0x2e, 0xd0, 0x5a, 0x2d, 0x41, 0x4c, 0x51, 0xa5, 0x69, 0x44, 0xb3, 0x1, 0x2f, 0x5f, 0x9e, 0xb5, 0x45, 0xb8, 0x38, 0x78, 0x1c, 0x96, 0x4b, 0xed, 0x1c, 0x55, 0xf0, 0xb4, 0xe3, 0x6f, 0x25, 0x8f, 0x4d, 0xf, 0xfd, 0x1a, 0x1, 0xd5, 0xca, 0xd9, 0xa2, 0xed, 0x53, 0xdf, 0x6a, 0x19, 0x2e, 0xe7, 0x4d, 0xf6, 0x3d, 0xf7, 0xf6, 0x58, 0x7e, 0xb3, 0x1e, 0xd3, 0x65, 0xf5, 0x8f, 0x16, 0x66, 0x34, 0x3c, 0x33, 0xe4, 0x2d, 0x75, 0x32, 0x2f, 0xe5, 0x85, 0x75, 0x43, 0xca, 0xe1, 0x91, 0xb7, 0x99, 0xe3, 0x12, 0xd1, 0xeb, 0xb8, 0xf7, 0xd, 0xb1, 0x9f, 0x83, 0x1f, 0x13, 0x6e, 0xc1, 0x1f, 0x3f, 0xdb, 0x80, 0xb6, 0x93, 0xcd, 0x2d, 0x2c, 0x2a, 0x56, 0xa3, 0xd5, 0xa1, 0xf4, 0x8c, 0x63, 0xdd, 0x69, 0x1e, 0x3, 0x63, 0x87, 0xd6, 0x60, 0xee, 0x98, 0x88, 0x85, 0xf0, 0x8e, 0x4d, 0xb4, 0x7a, 0x72, 0xe5, 0x7c, 0x8b, 0x16, 0xc5, 0x83, 0xa7, 0xba, 0x9c, 0x13, 0xd6, 0xf6, 0x86, 0xe6, 0xc7, 0x16, 0x4e, 0x91, 0x19, 0x70, 0x9b, 0xed, 0xd8, 0x92, 0xdb, 0x2e, 0xd2, 0x44, 0xe7, 0x32, 0x5c, 0x31, 0x1e, 0x3f, 0xff, 0x48, 0x27, 0xcd, 0xe0, 0xac, 0x75, 0x7, 0xdd, 0x2d, 0x23, 0x88, 0xbb, 0x97, 0x8c, 0x62, 0x80, 0xac, 0x6e, 0x9, 0x6a, 0x12, 0xcc, 0x8b, 0x44, 0xc7, 0x7a, 0x5e, 0x4b, 0x4c, 0x79, 0xe2, 0xcc, 0xeb, 0x84, 0xe2, 0x4c, 0xe7, 0xe3, 0x4, 0x68, 0x67, 0xf2, 0xb9, 0x6a, 0xa3, 0xdc, 0x66, 0x3a, 0x2d, 0x66, 0xd4, 0x81, 0xf4, 0x7d, 0x81, 0xab, 0x48, 0x7b, 0x1a, 0x7f, 0xb0, 0x4b, 0x6b, 0x14, 0x43, 0xe1, 0xed, 0xd6, 0xa2, 0xc8, 0xfa, 0x9, 0x1, 0x5b, 0xc1, 0x7c, 0xda, 0x3d, 0x7a, 0x82, 0xb9, 0xdf, 0xa4, 0x19, 0x40, 0x94, 0xb4, 0x3, 0x53, 0xe0, 0xb2, 0x3b, 0x1f, 0x87, 0x8c, 0x3f, 0x3f, 0xba, 0x50, 0x5d, 0x70, 0x17, 0xed, 0x16, 0xef, 0xa, 0x3, 0x72, 0xf1, 0x44, 0x3e, 0x81, 0xd6, 0x9d, 0xbe, 0x1f, 0xff, 0x79, 0x94, 0x3a, 0xc8, 0xb6, 0xfa, 0x31, 0xaa, 0xbd, 0x9, 0x7, 0x33, 0x10, 0x99, 0x17, 0x73, 0x3, 0x33, 0xb8, 0x6c, 0x9, 0x3d, 0x72, 0x27, 0xdd, 0x54, 0xfc, 0xb5, 0x90, 0x61, 0x4d, 0x8f, 0x19, 0x59, 0x22, 0xb1, 0x20, 0x90, 0x43, 0x93, 0x97, 0x45, 0x60, 0xcc, 0xc4, 0x4e, 0x22, 0x5d, 0x17, 0x40, 0xf5, 0x59, 0xa, 0xd8, 0x73, 0xe3, 0x9, 0x3b, 0xbb, 0x1e, 0xaa, 0xc5, 0x4a, 0xc7, 0x70, 0x47, 0xaf, 0xf1, 0xb8, 0xb1, 0x43, 0x99, 0x44, 0xb5, 0xec, 0x78, 0x4c, 0xe8, 0xa4, 0xb1, 0xa1, 0x16, 0xf7, 0xd0, 0x8, 0xc3, 0xb2, 0x3f, 0x2f, 0x7c, 0x9e, 0xa1, 0xb, 0x80, 0x2b, 0x3b, 0xd0, 0xc5, 0x7d, 0x0, 0xba, 0x7d, 0x5f, 0xca, 0xc1, 0x2f, 0xc3, 0xb0, 0x33, 0xc3, 0x5e, 0xca, 0xb3, 0xc, 0x25, 0x63, 0xa0, 0x14, 0x3c, 0x7b, 0x54, 0xeb, 0xf3, 0xb5, 0xee, 0x18, 0xd8, 0x0, 0xff, 0xea, 0x1a, 0x4, 0xe9, 0x2a, 0x41, 0x75, 0x4b, 0x1b, 0xf, 0x71, 0x90, 0xe9, 0xaa, 0xf, 0x12, 0xf3, 0x49, 0x86, 0x25, 0xf2, 0x22, 0xde, 0x62, 0x1e, 0xc3, 0x11, 0x18, 0x6e, 0x22, 0x99, 0xf7, 0xf8, 0x6b, 0x4d, 0x95, 0xe3, 0x2, 0x4b, 0x46, 0xa5, 0x89, 0x89, 0x72, 0x3e, 0xd8, 0x8a, 0xd5, 0x7b, 0x9b, 0x99, 0x17, 0x64, 0x7f, 0x94, 0x84, 0x20, 0xfb, 0xc, 0xfb, 0x24, 0xa8, 0x65, 0x61, 0xf, 0x6, 0x50, 0xba, 0x77, 0x3c, 0x25, 0x8d, 0xf0, 0x9d, 0x73, 0x9f, 0x73, 0xfd, 0xa7, 0x6b, 0x12, 0xe7, 0xb5, 0x6c, 0x17, 0x74, 0xe6, 0x2e, 0xcb, 0xa2, 0x4a, 0xe, 0x0, 0xda, 0x25, 0xcb, 0x89, 0x6, 0x42, 0xe4, 0x9a, 0xb6, 0x63, 0x6c, 0xe5, 0xb2, 0xdd, 0xb5, 0x72, 0xd6, 0xca, 0xa0, 0xa9, 0x23, 0x1d, 0x16, 0x3a, 0x72, 0xd5, 0x66, 0x6f, 0xbd, 0x46, 0x67, 0x24, 0xde, 0x80, 0xf7, 0xbc, 0x67, 0xa4, 0x7f, 0x9e, 0xd5, 0x13, 0x67, 0x16, 0x4b, 0x9f, 0x87, 0x62, 0xb7, 0xb4, 0xa0, 0xcb, 0x4e, 0x91, 0xfe, 0xc5, 0x51, 0x42, 0x7c, 0xc9, 0xdb, 0x52, 0x85, 0x5c, 0x64, 0x57, 0xca, 0xd5, 0x35, 0x99, 0xae, 0x41, 0x6d, 0x2e, 0x94, 0x34, 0xaa, 0x4a, 0xd7, 0x2d, 0x19, 0x1e, 0x16, 0x25, 0x2, 0xd9, 0xaf, 0xd3, 0x54, 0xe8, 0xa3, 0xbe, 0xf8, 0xb8, 0x5a, 0x7c, 0xa1, 0xd5, 0x27, 0x35, 0xf5, 0xc1, 0xae, 0xe0, 0xa7, 0xf9, 0x8e, 0x3d, 0x1d, 0x79, 0x31, 0x48, 0xf0, 0x16, 0x3e, 0x4f, 0x86, 0x39, 0xc0, 0x79, 0x80, 0xc9, 0x78, 0xb, 0x2, 0x5a, 0x8f, 0x2f, 0x78, 0x79, 0x1, 0x86, 0xbc, 0x38, 0x2b, 0x76, 0x6d, 0x80, 0x18, 0xa1, 0xc3, 0xf6, 0xfc, 0x8, 0x8e, 0x14, 0xfb, 0xaa, 0xcc, 0xd9, 0xe9, 0x7d, 0x67, 0xca, 0x25, 0x93, 0x87, 0x99, 0x79, 0x8f, 0x11, 0xed, 0xee, 0xfa, 0xec, 0x5f, 0x96, 0xd1, 0x78, 0x2f, 0x10, 0x73, 0xa1, 0x4b, 0x97, 0x1f, 0xb0, 0x9f, 0xcd, 0x37, 0xbe, 0x34, 0xd3, 0x9a, 0x6b, 0x5e, 0x13, 0x8, 0xf5, 0x3f, 0xf2, 0x91, 0xcd, 0x19, 0xbb, 0xae, 0x6a, 0xbb, 0x79, 0x97, 0x83, 0x61, 0x78, 0xc0, 0x74, 0xf7, 0x18, 0x1d, 0x26, 0x93, 0x16, 0x11, 0xe1, 0xc8, 0x6e, 0x90, 0xba, 0x8e, 0xf3, 0x78, 0x1c, 0x81, 0xca, 0x4c, 0x93, 0x8, 0x6d, 0xd2, 0xf4, 0xda, 0xab, 0xc2, 0xf7, 0xef, 0x30, 0xce, 0xd5, 0x3a, 0xaf, 0xb9, 0xf, 0x97, 0x2b, 0x75, 0x77, 0x4c, 0xf7, 0xd3, 0x11, 0x2c, 0xd1, 0xca, 0x5b, 0xff, 0x8c, 0x1b, 0x46, 0x3f, 0xdf, 0x46, 0xae, 0xcc, 0xee, 0x30, 0xa2, 0x24, 0x7e, 0x9a, 0x20, 0x23, 0xec, 0x1e, 0x3e, 0xc2, 0x1b, 0x22, 0x50, 0xb8, 0xe9, 0xfe, 0x2b, 0x4b, 0xcc, 0xa8, 0x2c, 0x84, 0xf0, 0xbe, 0x24, 0x60, 0x5, 0x89, 0xf7, 0xb9, 0xd6, 0xbe, 0x5b, 0xea, 0x4d, 0x2a, 0xe5, 0x43, 0xd7, 0x38, 0xd0, 0xf2, 0xb7, 0xb0, 0x86, 0xc8, 0x8e, 0x92, 0xf7, 0xe1, 0x8b, 0x32, 0x3b, 0xeb, 0xc4, 0x4e, 0xae, 0xea, 0x26, 0xbe, 0x12, 0xfe, 0x32, 0x75, 0x3e, 0x3d, 0x20, 0x64, 0xe3, 0xde, 0xb7, 0xec, 0x9e, 0xa4, 0x92, 0x5e, 0x69, 0xde, 0x6b, 0x41, 0xe3, 0x18, 0x20, 0xd4, 0x9d, 0x6f, 0xa8, 0xe3, 0x3, 0xde, 0xf, 0xaf, 0x1b, 0x1f, 0xe6, 0xc7, 0xc2, 0x3a, 0x4e, 0x1d, 0xcc, 0x23, 0xbc, 0x62, 0x6c, 0x10, 0x8d, 0x51, 0x84, 0x14, 0x1d, 0x69, 0x14, 0xc4, 0xdb, 0xbb, 0x15, 0xd0, 0xa2, 0xf5, 0x5b, 0xc2, 0xdd, 0x4e, 0xcb, 0xed, 0x4c, 0x41, 0x9b, 0x9b, 0x0, 0xa6, 0x44, 0x4d, 0x63, 0x95, 0x22, 0x60, 0xc, 0x8f, 0x92, 0x4, 0xb0, 0xde, 0x1f, 0xce, 0x3b, 0x6b, 0xe5, 0x7e, 0x5a, 0x9b, 0xe, 0x3c, 0xde, 0x2a, 0x45, 0x59, 0x59, 0x78, 0xfe, 0xfa, 0xa4, 0x0, 0x8c, 0xf7, 0x4b, 0x13, 0xce, 0x86, 0xdb, 0x5c, 0x9a, 0xf0, 0xff, 0x4c, 0xe1, 0x22, 0xf6, 0xf, 0x7, 0x6, 0x94, 0x23, 0xf5, 0xe8, 0xc5, 0x13, 0xb5, 0xb9, 0x55, 0xd2, 0xa5, 0xc2, 0x2b, 0x11, 0xd4, 0x10, 0x3f, 0x9f, 0x37, 0xaf, 0xab, 0xd6, 0x6, 0xd5, 0xf, 0x79, 0x76, 0xc8, 0x8f, 0xe0, 0xf0, 0x1c, 0xac, 0xd0, 0x75, 0xf4, 0x82, 0x56, 0x15, 0xd3, 0xb9, 0x89, 0xf, 0x9d, 0xfe, 0xbe, 0x49, 0xab, 0x86, 0xe6, 0xf, 0x39, 0xe, 0xd2, 0xd7, 0x56, 0x59, 0x4e, 0x94, 0x82, 0x7a, 0x49, 0x46, 0x17, 0x22, 0x32, 0x97, 0x96, 0x65, 0xfa, 0x82, 0x64, 0xb7, 0xc0, 0xce, 0x1d, 0x8b, 0xfc, 0xa2, 0x3, 0xed, 0xbd, 0x7d, 0x39, 0x4a, 0x9d, 0xd0, 0x6b, 0x90, 0xd4, 0x28, 0xda, 0x3f, 0x7d, 0x58, 0xf9, 0x61, 0xd3, 0x68, 0x6, 0x8, 0xae, 0x82, 0xa0, 0x46, 0x9b, 0xf3, 0xb3, 0xea, 0xde, 0xdd, 0x34, 0x48, 0x98, 0x24, 0x6, 0x63, 0x8, 0x8b, 0x62, 0xb6, 0xfd, 0x38, 0x23, 0x5b, 0xc0, 0xd3, 0x91, 0x15, 0x12, 0x38, 0x96, 0x3c, 0x80, 0x61, 0x47, 0xf, 0x7, 0xe2, 0x1d, 0x3b, 0x7f, 0xe3, 0xbc, 0x6c, 0xfc, 0x4e, 0xfc, 0x55, 0xe, 0x29, 0x40, 0x87, 0x2b, 0x67, 0x32, 0x23, 0x53, 0xbd, 0xe6, 0x2, 0x5c, 0xd6, 0xd6, 0x5c, 0x16, 0x9b, 0x9d, 0x66, 0x74, 0x8d, 0x73, 0xb9, 0xde, 0x6b, 0xf9, 0xed, 0xc5, 0x7d, 0xa1, 0xd7, 0xaa, 0x7, 0x2b, 0xb2, 0xc3, 0x59, 0x61, 0xdf, 0x26, 0xfc, 0x7b, 0xc5, 0xa4, 0x92, 0x8a, 0x4c, 0x6a, 0x95, 0x37, 0x1b, 0x87, 0xe0, 0x3f, 0xc5, 0x2c, 0x2a, 0x6, 0x34, 0x29, 0x59, 0xf7, 0xa1, 0xbb, 0xe8, 0x96, 0x1d, 0x69, 0xff, 0x17, 0x4, 0xfa, 0xb2, 0x83, 0xb4, 0xa5, 0xbd, 0x41, 0x7a, 0x80, 0xe4, 0x5d, 0x92, 0x72, 0x7e, 0x5, 0x47, 0xa4, 0x3a, 0xb0, 0x4a, 0x59, 0x27, 0x2e, 0xe8, 0xb3, 0xf6, 0xc4, 0x49, 0x54, 0x14, 0xd0, 0xb, 0x88, 0xaa, 0x8a, 0x10, 0xe2, 0x2a, 0x1a, 0x68, 0x29, 0xdc, 0x2b, 0x3e, 0xa2, 0xf9, 0xd2, 0xa5, 0x44, 0xad, 0xa9, 0x33, 0xfb, 0x44, 0x25, 0x1d, 0xc6, 0xfb, 0x81, 0x4c, 0x82, 0xb0, 0xe2, 0xab, 0x1d, 0xad, 0x9f, 0x86, 0x9, 0xfe, 0x86, 0xeb, 0xef, 0xa6, 0x27, 0x7a, 0x67, 0x74, 0xc8, 0x1d, 0x49, 0x63, 0x57, 0x8d, 0x56, 0xa4, 0x9c, 0xa1, 0xa5, 0xb8, 0x4, 0x23, 0xa6, 0xb1, 0xd1, 0x73, 0x5b, 0xa3, 0xe6, 0xc0, 0xa0, 0xcd, 0x4a, 0xec, 0x87, 0x7d, 0x9a, 0xae, 0xa8, 0x42, 0x45, 0xca, 0xba, 0x67, 0x86, 0x66, 0xcb, 0x5c, 0x2b, 0x48, 0xae, 0x67, 0x1b, 0xef, 0xed, 0x3e, 0xd3, 0x27, 0x18, 0x8f, 0xf2, 0xc, 0x1a, 0x5e, 0x44, 0xa7, 0xe1, 0x4e, 0x4e, 0xaa, 0x6b, 0xe3, 0xa0, 0x1c, 0x8a, 0x65, 0x8e, 0x37, 0xf3, 0x37, 0xf3, 0xcc, 0x80, 0x74, 0xd6, 0x5e, 0xb3, 0x72, 0x55, 0x95, 0x44, 0x1f, 0xe7, 0xd6, 0x6e, 0x13, 0x21, 0x38, 0x5b, 0x21, 0x81, 0x6, 0xe, 0xfc, 0xd9, 0x2f, 0xdd, 0x5a, 0x55, 0x6b, 0x83, 0x39, 0x89, 0x8, 0x84, 0xa5, 0x4e, 0xdf, 0xa, 0xfe, 0x41, 0x33, 0x12, 0x3f, 0x1, 0x8e, 0x9a, 0x27, 0x5, 0x1a, 0x9b, 0xcd, 0x4, 0x73, 0x1e, 0x9e, 0xad, 0x92, 0x33, 0xef, 0x5, 0x64, 0xe1, 0x62, 0xd5, 0x46, 0x31, 0x9b, 0x13, 0xfc, 0x43, 0xb, 0x8d, 0x43, 0x4e, 0x2d, 0xdb, 0x6, 0x9d, 0x98, 0x3c, 0xc1, 0x2b, 0xf1, 0x78, 0x98, 0x38, 0x68, 0xd3, 0x4f, 0x39, 0xf2, 0x52, 0xa8, 0xf1, 0xf1, 0xe8, 0x27, 0xf8, 0x3a, 0x53, 0xbd, 0x7c, 0x4, 0xfd, 0x83, 0x4, 0x9d, 0xae, 0x31, 0xe2, 0xdf, 0x2b, 0x5e, 0xfb, 0x6a, 0xb8, 0x53, 0x8d, 0x9, 0x1, 0x89, 0xa0, 0xa9, 0x55, 0x70, 0xe3, 0xae, 0xde, 0x41, 0xe9, 0x38, 0xf4, 0xaf, 0x84, 0xd1, 0x95, 0x45, 0x84, 0x2, 0x82, 0x9b, 0xd2, 0x77, 0x59, 0xd3, 0xa4, 0x29, 0x15, 0x3a, 0xa, 0x86, 0x66, 0x1, 0x1a, 0x2, 0x3e, 0xc5, 0xc, 0xfd, 0xf7, 0x65, 0xc5, 0x5e, 0xcf, 0x5, 0x42, 0x6b, 0x87, 0x2b, 0x95, 0xfc, 0xf2, 0x81, 0xdb, 0x66, 0x2d, 0xd8, 0xf1, 0x68, 0x9d, 0x8, 0xee, 0x83, 0xbb, 0x32, 0x24, 0x1b, 0x29, 0x76, 0x5a, 0x1b, 0xe2, 0xd8, 0xc9, 0xe5, 0x34, 0x27, 0x89, 0xda, 0x43, 0x9e, 0x7d, 0x94, 0xa4, 0xe6, 0x73, 0x7, 0x41, 0x18, 0x2d, 0xf1, 0xe6, 0x1e, 0x18, 0xe5, 0xb8, 0x20, 0xd1, 0x90, 0xe4, 0x6f, 0xa4, 0x61, 0xee, 0x4f, 0xaf, 0x5e, 0x79, 0x72, 0x90, 0xd3, 0x45, 0x8f, 0xe4, 0xba, 0x80, 0x57, 0x50, 0xad, 0x85, 0x67, 0x9a, 0x16, 0x77, 0x18, 0xfd, 0xc1, 0xb3, 0x5b, 0x7, 0x64, 0x5d, 0x9e, 0x82, 0x19, 0x46, 0x59, 0xfa, 0x4d, 0x52, 0x43, 0x27, 0x60, 0xc, 0xbf, 0x69, 0xe1, 0x9a, 0x76, 0x94, 0x4e, 0xe7}, - output224: []byte{0x5, 0x69, 0x2e, 0x46, 0xa9, 0x53, 0xae, 0x4a, 0x49, 0x57, 0x73, 0xc8, 0x7c, 0x6c, 0xcc, 0xa2, 0xd7, 0x6f, 0xfa, 0xbf, 0x55, 0x9e, 0xf2, 0xd, 0x24, 0x7, 0x9a, 0x54}, - output256: []byte{0x25, 0x97, 0xaa, 0xb9, 0x21, 0x4e, 0x2c, 0xa7, 0x37, 0x3c, 0x7e, 0x7e, 0x7, 0xb4, 0xf2, 0x4b, 0xc9, 0x29, 0x3c, 0x50, 0xff, 0x22, 0x6f, 0xfe, 0xd8, 0xf0, 0x20, 0x24, 0x12, 0x7d, 0xe8, 0x28}, - output384: []byte{0xa9, 0x8c, 0x5e, 0xff, 0x26, 0xd2, 0x7c, 0x8d, 0xda, 0x17, 0xe9, 0x19, 0xa4, 0x5b, 0xf9, 0xa, 0x60, 0xf, 0x23, 0x6e, 0x3f, 0xb, 0xd8, 0xdb, 0x1f, 0x2f, 0x61, 0x1f, 0xa, 0x77, 0x6, 0x96, 0xce, 0xe4, 0x59, 0x8e, 0xcd, 0xa, 0x15, 0xd3, 0xa1, 0xdb, 0x7e, 0xa9, 0x98, 0x94, 0x9f, 0xf6}, - output512: []byte{0x51, 0x8a, 0xa2, 0x64, 0xff, 0xe3, 0x82, 0x3, 0x82, 0xc9, 0x8e, 0xa1, 0x25, 0x4a, 0xc8, 0x2c, 0x30, 0x45, 0xbb, 0xcb, 0xc9, 0xaf, 0x9d, 0x7e, 0x7f, 0xa3, 0x68, 0x52, 0x5b, 0xb9, 0x5b, 0x7, 0x4c, 0xe3, 0xb4, 0x7c, 0xe6, 0xd6, 0xa7, 0x6f, 0xf1, 0x21, 0x2b, 0x79, 0x1a, 0xef, 0x6f, 0xf1, 0x91, 0xa0, 0xa0, 0x4a, 0xd3, 0x8e, 0x6a, 0x98, 0xc3, 0xd2, 0x6e, 0x24, 0x28, 0x4c, 0xee, 0x3d}}, - testcase{ - msg: []byte{0x85, 0x98, 0xb3, 0x2e, 0x7e, 0xe9, 0x46, 0x9b, 0x6d, 0x33, 0x24, 0x7a, 0xeb, 0x8a, 0xfb, 0x12, 0xd6, 0xbd, 0xc3, 0xee, 0x4a, 0xe5, 0xa4, 0x96, 0x83, 0xe8, 0x4c, 0x73, 0xfb, 0x35, 0x3a, 0x7b, 0xa6, 0xfd, 0xd9, 0x5c, 0x49, 0x7f, 0x42, 0x9e, 0x82, 0xf0, 0x7b, 0x2b, 0x65, 0x2d, 0x7e, 0x41, 0x5e, 0x9b, 0x93, 0xb5, 0x9e, 0x54, 0x1a, 0xbf, 0x46, 0xc8, 0x8f, 0xa5, 0x4e, 0xe0, 0x68, 0xf9, 0x7, 0x64, 0x56, 0x4a, 0x11, 0xa5, 0x9f, 0x1d, 0x4, 0xd8, 0xb8, 0x8d, 0xe1, 0x86, 0xc4, 0x21, 0x72, 0x85, 0xb7, 0x27, 0x96, 0xd5, 0xc0, 0x57, 0x5d, 0xae, 0xcc, 0x30, 0x92, 0xf, 0x6b, 0xfd, 0xbe, 0xa7, 0x72, 0xa7, 0xb1, 0x83, 0x39, 0xa1, 0xe2, 0xcc, 0xfc, 0x79, 0xfc, 0x8a, 0x98, 0x39, 0xb2, 0xa, 0x98, 0x1d, 0x52, 0x91, 0x2, 0x5f, 0x34, 0x1e, 0x5d, 0x7a, 0xcc, 0x1a, 0x3b, 0xb4, 0x12, 0x90, 0x91, 0xa5, 0x6, 0x2b, 0x9e, 0x54, 0xbe, 0x7e, 0xd8, 0xaf, 0x81, 0x96, 0xca, 0x7a, 0x9e, 0xca, 0xf1, 0x8c, 0xcc, 0xe4, 0xa1, 0xd7, 0x18, 0x14, 0x98, 0x9, 0xd0, 0x8a, 0x8a, 0xc8, 0x6c, 0x9a, 0x12, 0xe7, 0x63, 0x79, 0xf6, 0x34, 0xac, 0x16, 0x15, 0xaf, 0x3, 0xab, 0xb9, 0x28, 0x7c, 0x4b, 0x4a, 0x79, 0x84, 0x7b, 0x52, 0xed, 0x4f, 0xa1, 0x7e, 0x15, 0x27, 0x49, 0x53, 0x62, 0xb6, 0x25, 0x15, 0x5e, 0x9f, 0x1a, 0xa3, 0xa3, 0xe5, 0xd0, 0x82, 0x12, 0x40, 0xd8, 0x36, 0x8, 0x94, 0xe1, 0x9a, 0x56, 0x20, 0xbd, 0xbe, 0x0, 0xa7, 0xaf, 0x6c, 0x40, 0xb1, 0xe5, 0x13, 0x49, 0x6, 0x71, 0xbd, 0xbe, 0x40, 0x23, 0x79, 0xf4, 0x95, 0xc5, 0x28, 0xe2, 0x18, 0x2, 0x8d, 0x31, 0x5f, 0x6e, 0xf8, 0x20, 0xc3, 0x83, 0xc8, 0x36, 0x30, 0xf7, 0x56, 0x44, 0x53, 0xf0, 0xe2, 0xd3, 0x87, 0x27, 0x38, 0x54, 0xfa, 0x5, 0xf4, 0xda, 0x7b, 0xc2, 0x4c, 0xab, 0xb, 0x71, 0xd4, 0x9, 0x2a, 0x43, 0x2c, 0xb0, 0x85, 0x49, 0x16, 0xf7, 0x1c, 0x3b, 0x86, 0x40, 0xca, 0x60, 0x25, 0x47, 0x92, 0x2c, 0x98, 0x67, 0xb0, 0x2, 0xdf, 0x73, 0x82, 0xaf, 0x29, 0xe4, 0xe1, 0xb9, 0x93, 0xd1, 0xfa, 0x74, 0xd9, 0x50, 0x6, 0x3e, 0x52, 0x7d, 0xb6, 0xca, 0xb, 0x73, 0x6b, 0x89, 0x6, 0x96, 0x24, 0x12, 0xea, 0x1d, 0xae, 0x21, 0x8a, 0xc, 0x86, 0xaa, 0xcf, 0x51, 0x36, 0x2b, 0xb8, 0xbc, 0xeb, 0x38, 0x26, 0xbc, 0x32, 0x49, 0xf1, 0xc5, 0x15, 0x5f, 0xc, 0xb5, 0x1, 0x33, 0xd0, 0x52, 0x7b, 0x98, 0xba, 0x21, 0xf7, 0x57, 0xf7, 0x2a, 0x9c, 0x52, 0xd3, 0x42, 0xde, 0x1, 0x3b, 0xb3, 0x8e, 0xa5, 0x27, 0x74, 0xa7, 0xc0, 0x12, 0xdc, 0xc0, 0xa5, 0x80, 0x51, 0xcd, 0xa5, 0x65, 0xfd, 0xb4, 0x5a, 0x1f, 0x6, 0x50, 0x41, 0xba, 0x5f, 0xe6, 0x2d, 0xc, 0x46, 0xcb, 0xb1, 0xb9, 0xef, 0x7d, 0x66, 0x9b, 0xe3, 0x19, 0xd9, 0x88, 0x34, 0x78, 0x6f, 0x55, 0x32, 0x22, 0x5d, 0x26, 0xd1, 0x84, 0xab, 0xb3, 0x8e, 0x34, 0x5c, 0x4c, 0xda, 0x3f, 0xe3, 0xb8, 0x52, 0x25, 0xd6, 0xf6, 0xc7, 0xa, 0xee, 0xc8, 0x1, 0xbb, 0x57, 0x1c, 0x5e, 0x44, 0xd9, 0x29, 0x8f, 0x2, 0xf6, 0x32, 0x45, 0x3c, 0x14, 0xd1, 0xc7, 0x10, 0xcd, 0xec, 0x58, 0x43, 0xb7, 0xa0, 0x55, 0x81, 0x75, 0x87, 0xd7, 0x90, 0xfc, 0x58, 0x90, 0x17, 0x34, 0x8d, 0xac, 0xc1, 0x8b, 0x68, 0x6b, 0xa0, 0xee, 0x29, 0xd0, 0x74, 0xcf, 0xfa, 0x70, 0x1, 0x7d, 0x97, 0x24, 0x49, 0xf4, 0xd7, 0x2, 0xc0, 0x51, 0x12, 0x5f, 0xec, 0xa4, 0x8a, 0xd3, 0xc5, 0xf8, 0x84, 0x31, 0x78, 0x97, 0x14, 0xc9, 0xf, 0x48, 0xed, 0xfc, 0x38, 0x2c, 0x28, 0xf5, 0xd9, 0x43, 0x9b, 0x88, 0x53, 0x1b, 0x0, 0x3b, 0xe7, 0x93, 0x5a, 0x84, 0x5d, 0xcf, 0x5e, 0xe5, 0x45, 0xa6, 0x61, 0x7a, 0x3b, 0x5, 0xee, 0xea, 0xd8, 0x9e, 0xd5, 0xb9, 0x50, 0xed, 0xd0, 0x91, 0x9b, 0xee, 0x24, 0x3e, 0xbf, 0x5c, 0xef, 0x53, 0x6a, 0xa, 0x7c, 0x28, 0x15, 0x8b, 0xed, 0x2f, 0x83, 0x8f, 0x49, 0x4a, 0x2e, 0x82, 0x8c, 0x58, 0xb, 0x48, 0xd8, 0x8e, 0x21, 0x6f, 0x50, 0x49, 0x2e, 0x75, 0x42, 0x75, 0x69, 0x78, 0x82, 0xc9, 0x4d, 0x1a, 0xdd, 0x46, 0xfe, 0x44, 0x3b, 0x76, 0x6d, 0xab, 0xe2, 0xf9, 0xad, 0xa1, 0x42, 0xa5, 0xbb, 0x1a, 0x9, 0x6d, 0x3d, 0xbb, 0x71, 0xfd, 0x6b, 0x55, 0x81, 0xe, 0xe5, 0xb2, 0x98, 0x97, 0x45, 0x69, 0x5d, 0x4b, 0xfa, 0x14, 0x30, 0x13, 0xf7, 0xea, 0x34, 0x42, 0x48, 0x33, 0xfe, 0x9, 0xd8, 0x96, 0x6a, 0xb, 0x97, 0xb6, 0x29, 0x53, 0xc4, 0xcb, 0xca, 0xc8, 0x6c, 0xfc, 0x83, 0xe1, 0x4a, 0xb3, 0x6a, 0x4d, 0x9f, 0x8e, 0x8c, 0xd9, 0x1, 0x7, 0x13, 0x70, 0x2e, 0x1d, 0xb6, 0xc2, 0x7b, 0xd0, 0x16, 0x67, 0x77, 0xe2, 0xbd, 0xb5, 0x26, 0x8c, 0xa3, 0x88, 0x39, 0x49, 0x86, 0x68, 0x3d, 0xb8, 0x3a, 0xe0, 0x60, 0x3f, 0xa6, 0x11, 0xac, 0xad, 0x58, 0x7f, 0xdf, 0xf4, 0x71, 0x71, 0x8f, 0x20, 0xf4, 0x23, 0x60, 0xfb, 0x5c, 0x3d, 0xe8, 0xa3, 0xb3, 0xfe, 0xc0, 0x68, 0xe9, 0xdc, 0x49, 0x6f, 0x66, 0x4f, 0xdc, 0xc, 0x30, 0x5a, 0xe9, 0x36, 0xc7, 0xae, 0x56, 0xa, 0x5, 0x68, 0xcc, 0x50, 0x9f, 0x99, 0xae, 0x62, 0xc6, 0x28, 0x4f, 0x8b, 0xf2, 0xa2, 0x80, 0x1c, 0x39, 0xc7, 0x92, 0x95, 0x60, 0x9b, 0x62, 0x22, 0x47, 0xb9, 0xf1, 0xf6, 0xe0, 0xe7, 0x7a, 0xd8, 0x9f, 0xd5, 0x44, 0x9c, 0xd9, 0xbb, 0xb8, 0x4a, 0x52, 0x37, 0x95, 0xf5, 0x79, 0x43, 0x2c, 0x19, 0xe9, 0x2b, 0x27, 0xb, 0x68, 0x46, 0xd7, 0x29, 0x86, 0xef, 0x5, 0x2d, 0xec, 0x37, 0x2b, 0x3d, 0xb6, 0xd8, 0x44, 0x9f, 0x36, 0x2, 0xfb, 0xcd, 0x66, 0x2e, 0x2d, 0xcd, 0x4e, 0xdc, 0xc5, 0x9e, 0x2a, 0x6d, 0x15, 0xe8, 0xa4, 0x1c, 0xa7, 0x93, 0x23, 0x43, 0x98, 0x17, 0x70, 0x12, 0x1a, 0x78, 0xd3, 0x4b, 0x74, 0x0, 0x77, 0x80, 0x72, 0xc8, 0x9d, 0xe9, 0x69, 0xd0, 0x46, 0x8a, 0xc0, 0x52, 0xae, 0x54, 0xd6, 0x7, 0x66, 0x60, 0xc6, 0x7e, 0x47, 0xab, 0x93, 0x31, 0x3e, 0x9a, 0x97, 0x9d, 0x80, 0xe0, 0x54, 0x42, 0xb4, 0xe3, 0x28, 0xe8, 0x9e, 0x79, 0x81, 0x58, 0xb7, 0x47, 0xab, 0x23, 0x7c, 0xa5, 0x77, 0xac, 0xba, 0xa0, 0x7c, 0xb8, 0x5f, 0x8a, 0xe7, 0xb1, 0xc9, 0x32, 0x5f, 0xe8, 0xb2, 0x69, 0x76, 0x53, 0x99, 0xea, 0xd3, 0x75, 0x22, 0xcd, 0xe1, 0xf0, 0x71, 0xdc, 0x26, 0xbb, 0xc4, 0xd1, 0xe7, 0xaa, 0x8f, 0x5f, 0x4d, 0xd6, 0x6a, 0x86, 0x1a, 0x8f, 0x4f, 0xa3, 0x81, 0x83, 0xb3, 0x96, 0x2b, 0x97, 0x39, 0x34, 0x14, 0x4, 0x25, 0x3c, 0x93, 0xd7, 0xde, 0xc6, 0xb4, 0x54, 0xdd, 0xba, 0xc9, 0xf9, 0x42, 0xf2, 0xf7, 0x8d, 0x6f, 0x75, 0x89, 0x7e, 0x67, 0x3b, 0x9e, 0xca, 0xcb, 0x15, 0x79, 0xe2, 0x98, 0xb8, 0xb9, 0x44, 0x6b, 0x11, 0xaa, 0x43, 0xc6, 0xba, 0x75, 0x11, 0xed, 0x9c, 0xa8, 0x31, 0x15, 0x2d, 0x3c, 0x3e, 0xf0, 0xef, 0x39, 0xa, 0x2c, 0xe6, 0x5f, 0x4f, 0x5f, 0x6e, 0x17, 0x7b, 0x50, 0xc9, 0xaf, 0x91, 0x2b, 0xa4, 0xb4, 0x54, 0x82, 0x8, 0x57, 0x1a, 0x43, 0xd6, 0x85, 0x4a, 0x8e, 0xd4, 0x47, 0x9d, 0x95, 0x38, 0x45, 0x65, 0x39, 0x20, 0x3d, 0x49, 0x1, 0x3, 0xdd, 0x23, 0xba, 0xce, 0x9, 0x5d, 0xb, 0xf6, 0x6c, 0x17, 0xf2, 0x41, 0x1d, 0x51, 0x40, 0x84, 0xe0, 0x47, 0x97, 0x6, 0x96, 0x40, 0xe, 0x1b, 0xc9, 0xce, 0x48, 0x98, 0xca, 0x62, 0xfb, 0x35, 0x8b, 0x9, 0x6d, 0xaf, 0x8a, 0x38, 0x57, 0xac, 0x39, 0x8a, 0x7, 0x88, 0x2e, 0x22, 0x1, 0xf8, 0xca, 0xe, 0x4d, 0x1c, 0xf0, 0xca, 0x4e, 0x47, 0xbb, 0x26, 0x8a, 0x91, 0xdb, 0xaf, 0xa8, 0x37, 0x37, 0x53, 0x84, 0xa1, 0xbd, 0x68, 0xf8, 0x78, 0x94, 0xaf, 0x81, 0xbb, 0xf1, 0xe2, 0x20, 0xc2, 0xd3, 0xc3, 0xb2, 0xb9, 0x3a, 0x87, 0x7c, 0xf6, 0xa7, 0xc2, 0x53, 0xcf, 0x66, 0xb, 0x49, 0x8d, 0x3e, 0xfa, 0x4f, 0x38, 0xb9, 0xb4, 0x1, 0x81, 0x6c, 0xa, 0xa5, 0x1f, 0xfd, 0x3b, 0xe9, 0xf3, 0x6a, 0xa1, 0xd2, 0x33, 0x5f, 0x4c, 0x7, 0x94, 0x87, 0xbe, 0x16, 0xe5, 0x32, 0xbb, 0xf, 0xdf, 0x8e, 0x0, 0xd5, 0xd8, 0x37, 0x9c, 0xf, 0x61, 0x7f, 0x71, 0x48, 0x0, 0x9e, 0xc5, 0x7d, 0xae, 0x98, 0xcd, 0x41, 0xac, 0x1, 0xd3, 0xd0, 0xb5, 0x68, 0xe0, 0x8, 0x57, 0x75, 0x69, 0x4c, 0x74, 0xfc, 0x33, 0x9f, 0xb5, 0xf5, 0xa5, 0x7c, 0x27, 0x4d, 0xa0, 0x7c, 0xb4, 0xda, 0xe5, 0x48, 0x33, 0xbb, 0x74, 0xb0, 0x79, 0x3e, 0x93, 0xe8, 0xf1, 0xb5, 0xa7, 0xf5, 0xa0, 0x92, 0xe9, 0x4, 0x59, 0xf2, 0xc6, 0xb7, 0xe7, 0xa6, 0xf4, 0x88, 0xe3, 0xc7, 0xae, 0x10, 0xac, 0x90, 0xc3, 0x58, 0xc5, 0xbf, 0xd6, 0x3, 0x8, 0xa, 0x54, 0x48, 0x22, 0xb4, 0x66, 0x3a, 0xec, 0x1a, 0x42, 0xd3, 0xf1, 0x6e, 0x33, 0x50, 0x47, 0xa1, 0xc9, 0xef, 0x69, 0x39, 0xc3, 0x6c, 0xc3, 0x4d, 0xaf, 0xc9, 0xee, 0xdb, 0x13, 0xe1, 0xa9, 0x55, 0x92, 0x79, 0x86, 0x6a, 0x6d, 0x71, 0xa9, 0x7f, 0xfd, 0x31, 0x7f, 0xbb, 0xcd, 0x8c, 0xf8, 0x4, 0x76, 0xd5, 0x92, 0x71, 0x13, 0x6e, 0xde, 0xa5, 0xa1, 0x86, 0xe7, 0xea, 0xb7, 0xfc, 0x28, 0x88, 0x1c, 0x8, 0xfa, 0xf7, 0xc5, 0x41, 0x6e, 0xa4, 0x80, 0x1a, 0x1e, 0xb9, 0xe0, 0xc8, 0x83, 0xdb, 0xdf, 0xd5, 0xcf, 0xf, 0xc, 0x9a, 0x61, 0x9d, 0x91, 0x48, 0x1e, 0x41, 0x3a, 0x74, 0xf0, 0x1d, 0x86, 0xbc, 0x76, 0x2f, 0x4b, 0x5, 0x49, 0x7e, 0x20, 0x89, 0x3c, 0xd5, 0x5c, 0xc, 0x57, 0xc, 0xaa, 0x3f, 0xa0, 0xb, 0xd5, 0x37, 0xd6, 0x37, 0x3b, 0x60, 0xd3, 0x2c, 0xa1, 0x4a, 0x36, 0xbd, 0x2f, 0xdb, 0x3e, 0xac, 0x13, 0x44, 0xe4, 0x5, 0x2e, 0xfe, 0x7d, 0x1a, 0xbc, 0xc7, 0x74, 0x80, 0xee, 0x43, 0x30, 0x8, 0xde, 0xba, 0xf7, 0x1c, 0x9f, 0xb7, 0x7, 0x0, 0x5, 0xd8, 0x36, 0x5a, 0xc1, 0x12, 0xf1, 0x51, 0xb3, 0x74, 0xda, 0x14, 0x1e, 0x1f, 0xc6, 0x2b, 0x3e, 0x40, 0xa7, 0x4f, 0x35, 0x46, 0xbf, 0x4f, 0x2, 0xea, 0x80, 0x50, 0xb8, 0x23, 0xcf, 0x2c, 0xd5, 0xfd, 0x13, 0x4f, 0x10, 0xab, 0xc2, 0xdb, 0xb, 0x9b, 0x27, 0xf5, 0xc0, 0xa4, 0x4e, 0x32, 0xe, 0xff, 0x81, 0xa0, 0xf7, 0xef, 0xd4, 0x27, 0x1b, 0xc9, 0xd5, 0x74, 0xd6, 0xa8, 0x2f, 0xa8, 0x7, 0xb0, 0x5f, 0x38, 0x92, 0x56, 0x4d, 0x8b, 0xf5, 0x4d, 0xb7, 0xb8, 0x1a, 0xc8, 0x7b, 0x63, 0x3c, 0x53, 0xf8, 0x18, 0x74, 0x36, 0xc1, 0xdf, 0x43, 0x5b, 0xa2, 0xd1, 0x6d, 0x72, 0x35, 0x3e, 0xf7, 0xb3, 0x9c, 0xc5, 0x50, 0xcf, 0xec, 0x1e, 0xc2, 0x50, 0x29, 0x2, 0xaa, 0x6b, 0xf4, 0xd5, 0x5, 0x63, 0x30, 0x1f, 0xb, 0x39, 0xa9, 0xd2, 0x1, 0xfc, 0x2, 0xb0, 0xc9, 0xac, 0xba, 0x14, 0x78, 0x43, 0xa5, 0xab, 0xa, 0xd1, 0x5e, 0x1f, 0xbd, 0x9d, 0x38, 0x80, 0xd9, 0x97, 0x79, 0xd0, 0xfb, 0xcd, 0x21, 0x77, 0x46, 0xae, 0xba, 0xcc, 0x23, 0x1a, 0x12, 0x85, 0x92, 0x7f, 0xb, 0xc8, 0x8, 0xb2, 0xa5, 0x27, 0x71, 0x79, 0x8a, 0x91, 0x4, 0x79, 0x2d, 0xd0, 0xe9, 0xc9, 0x38, 0xf6, 0x69, 0x29, 0xd3, 0x3, 0x90, 0xd1, 0x6f, 0x57, 0x59, 0x1d, 0xfe, 0xd8, 0x42, 0x47, 0x92, 0xc1, 0xa0, 0xcf, 0xea, 0x7c, 0xd2, 0xda, 0x90, 0xc6, 0xc2, 0xa8, 0x2, 0x34, 0xf3, 0xb3, 0x50, 0xd, 0xce, 0xc0, 0x78, 0xbd, 0xae, 0x33, 0x38, 0x16, 0xce, 0xaa, 0xbe, 0x9b, 0x68, 0x6a, 0xd0, 0xbb, 0x24, 0xf6, 0x5b, 0xfc, 0xa8, 0x62, 0x22, 0xbf, 0xc6, 0x28, 0x84, 0x3b, 0xb4, 0xd3, 0x28, 0xda, 0x1e, 0xa2, 0x82, 0x81, 0xd9, 0xa3, 0xd2, 0x9e, 0xd, 0x7e, 0xeb, 0x9f, 0xe2, 0x4b, 0x33, 0x28, 0x4d, 0x73, 0x48, 0x6d, 0x8d, 0x5f, 0x37, 0xdf, 0x74, 0x50, 0x40, 0x97, 0x22, 0xe8, 0x28, 0xb8, 0x79, 0xb8, 0xf7, 0xd1, 0x7a, 0xab, 0x0, 0x2e, 0xd2, 0xc2, 0xfd, 0x7f, 0x3, 0xfa, 0x46, 0x47, 0xf4, 0x9d, 0x4f, 0x1b, 0x20, 0x4c, 0xd, 0xe0, 0xb4, 0x13, 0xc6, 0x13, 0x96, 0x3a, 0xc, 0x3a, 0xd0, 0x2, 0x6a, 0xde, 0xc9, 0x27, 0x97, 0x79, 0xa0, 0xc7, 0x98, 0x65, 0x26, 0xf8, 0xc9, 0x74, 0x2b, 0xaa, 0x0, 0xc0, 0x88, 0xb6, 0x82, 0x6c, 0x24, 0x49, 0x37, 0x8f, 0x47, 0xeb, 0x6d, 0xb7, 0x5c, 0xfa, 0x1, 0x3b, 0xc1, 0x91, 0x6, 0xe1, 0x8d, 0x6, 0x2b, 0x6, 0x98, 0xba, 0x2, 0x5, 0x4d, 0x87, 0x19, 0xf7, 0x56, 0x28, 0x41, 0x91, 0x46, 0x1f, 0xdc, 0x5d, 0x33, 0xcf, 0xd, 0x15, 0x41, 0x9a, 0xbe, 0xa0, 0x10, 0xc8, 0xba, 0xd6, 0xe1, 0xb, 0x79, 0xcc, 0x39, 0x33, 0x4f, 0xa8, 0x78, 0x93, 0x83, 0xca, 0x3, 0x73, 0x2e, 0x3d, 0xe9, 0xe4, 0x54, 0xd2, 0x94, 0x49, 0x13, 0xed, 0x2c, 0x74, 0x2, 0x1b, 0x7b, 0x39, 0x3b, 0x36, 0x41, 0x44, 0x8a, 0x62, 0x33, 0xa9, 0xee, 0xde, 0x72, 0xb8, 0xdd, 0x5a, 0x46, 0x3e, 0x5a, 0x2d, 0xd7, 0xb4, 0x41, 0x28, 0xb0, 0x9c, 0x1d, 0x25, 0x6f, 0x69, 0x42, 0xcd, 0x7d, 0xb7, 0x4e, 0x48, 0x93, 0x40, 0x2b, 0x6a, 0xec, 0x1c, 0x1, 0x17, 0x5, 0x23, 0xbb, 0xf3, 0x30, 0x15, 0x57, 0x5f, 0xac, 0x45, 0x34, 0x70, 0xe, 0x91, 0x15, 0x33, 0x70, 0x0, 0x6d, 0x82, 0x9e, 0x4b, 0x76, 0x21, 0x6b, 0x94, 0xf, 0x19, 0x45, 0xfe, 0xd3, 0x13, 0x78, 0x80, 0xb, 0xae, 0x38, 0x5a, 0x54, 0xc4, 0xd3, 0x2d, 0xd7, 0xa9, 0x60, 0xe8, 0xb2, 0xed, 0x1e, 0x34, 0xfe, 0x8d, 0xb1, 0xcb, 0xc7, 0xd1, 0xe7, 0xa8, 0x68, 0x47, 0xa6, 0x9f, 0xf5, 0xfa, 0xbd, 0x40, 0xb0, 0xe9, 0x19, 0x1e, 0x42, 0x68, 0x43, 0xfb, 0x79, 0xa1, 0xde, 0xe7, 0xdd, 0xb, 0xae, 0x4c, 0x55, 0xe5, 0x8f, 0x32, 0x2a, 0x4f, 0x65, 0x86, 0x22, 0xb, 0xa, 0x5d, 0x48, 0x3e, 0x70, 0xf9, 0x98, 0xb1, 0x6, 0x56, 0xd1, 0xf5, 0x6f, 0xe9, 0x11, 0xcf, 0xb0, 0xd1, 0xcf, 0x9c, 0xe1, 0xa2, 0x4c, 0x4b, 0xd, 0x4f, 0x19, 0xa0, 0x41, 0x29, 0xdd, 0xa0, 0x63, 0xfe, 0x17, 0xcb, 0x8f, 0x0, 0xcf, 0x9d, 0x51, 0x6d, 0x44, 0xba, 0xd, 0x1a, 0xf9, 0xac, 0x23, 0xbe, 0xe5, 0x5c, 0xa3, 0x7, 0xfe, 0x69, 0xf6, 0xd1, 0x75, 0x3a, 0xce, 0x1b, 0x18, 0x93, 0xdc, 0xb4, 0x55, 0x93, 0x4f, 0x73, 0x48, 0x5c, 0xa3, 0xd8, 0xc1, 0x41, 0xb5, 0x6c, 0xc8, 0x3, 0x9b, 0xa3, 0xcf, 0x7f, 0x29, 0xdc, 0x68, 0x5, 0x31, 0xfa, 0xcf, 0x11, 0x7b, 0xd0, 0xf6, 0xd1, 0xb, 0xe2, 0x95, 0x42, 0x6e, 0x18, 0x16, 0x7a, 0x33, 0xd2, 0x2a, 0x83, 0xb4, 0x16, 0xdd, 0x1b, 0x84, 0x8b, 0x55, 0x8a, 0x94, 0x4b, 0x16, 0x8a, 0x2b, 0xb1, 0x1b, 0xde, 0xc, 0x55, 0xf9, 0xf9, 0xb9, 0x65, 0x74, 0x5b, 0xe, 0x8e, 0x36, 0x7f, 0xcd, 0xc5, 0x70, 0x30, 0x14, 0xb, 0x87, 0xb8, 0x86, 0x13, 0xd5, 0xec, 0x81, 0x36, 0x67, 0x5f, 0xb3, 0xcd, 0xd, 0xbd, 0x20, 0x35, 0xf1, 0xa7, 0x28, 0x44, 0xea, 0xc0, 0xc2, 0x39, 0x4f, 0x2c, 0x45, 0x46, 0x67, 0x4b, 0xda, 0x13, 0x16, 0x33, 0x70, 0xb1, 0xe3, 0xd6, 0x23, 0xff, 0x30, 0x17, 0x80, 0xf0, 0x6d, 0x13, 0x48, 0xe9, 0x9c, 0x13, 0x86, 0x41, 0x1d, 0xd1, 0x52, 0xff, 0x42, 0x55, 0xe8, 0x69, 0xdb, 0x6e, 0x31, 0x87, 0xe7, 0x36, 0xf7, 0x1, 0x5a, 0xb4, 0xb8, 0xd7, 0x2b, 0x45, 0xa2, 0x2b, 0xf, 0x4f, 0x3f, 0x5, 0xff, 0xa7, 0x3, 0xc3, 0xb5, 0x76, 0xb3, 0x76, 0xfe, 0xc2, 0xaa, 0x14, 0x2e, 0x68, 0xbd, 0x1b, 0x52, 0x85, 0xc1, 0x38, 0xaf, 0xee, 0x11, 0x19, 0x87, 0xa1, 0x0, 0xbf, 0x56, 0xda, 0xc6, 0x62, 0x17, 0xc6, 0xcc, 0x3a, 0xa1, 0xf1, 0x5b, 0x49, 0x94, 0x2c, 0x9c, 0x3c, 0x0, 0x74, 0x9e, 0x2c, 0xd7, 0x8a, 0x4, 0x38, 0x44, 0x41, 0x65, 0xe7, 0x2d, 0xae, 0x65, 0xb1, 0xbc, 0xe9, 0x85, 0x32, 0x5e, 0x34, 0x1e, 0x27, 0x36, 0xf1, 0x1e, 0xa5, 0xaf, 0x9c, 0x8d, 0x0, 0xc4, 0xdd, 0x1c, 0x15, 0x23, 0xa0, 0x96, 0x3, 0x37, 0x4a, 0xc3, 0x2a, 0xae, 0xf8, 0x2b, 0xa4, 0x6, 0x2a, 0xc, 0xd9, 0x37, 0x90, 0xc9, 0x95, 0x95, 0xb9, 0xa8, 0x22, 0x5, 0xfb, 0x5f, 0x96, 0x80, 0x98, 0xe2, 0x19, 0x0, 0x2f, 0xb8, 0x4c, 0xd5, 0x87, 0xdd, 0x68, 0xf9, 0xbe, 0x29, 0xb, 0xc4, 0x75, 0x2a, 0x5d, 0x9d, 0xfc, 0x86, 0x4e, 0xa1, 0xbb, 0x67, 0x87, 0x8c, 0x97, 0x14, 0x7c, 0xf5, 0x47, 0xda, 0x95, 0x9e, 0xe3, 0xca, 0x1c, 0x43, 0x3b, 0x72, 0x86, 0x85, 0x27, 0x74, 0x4d, 0x29, 0xbf, 0xcd, 0x2e, 0x32, 0x35, 0x30, 0xa6, 0x54, 0x73, 0x89, 0x97, 0x8b, 0xc2, 0x31, 0x5d, 0x5b, 0x34, 0xbe, 0x36, 0x32, 0xb6, 0x41, 0x42, 0x9c, 0xdf, 0x93, 0x55, 0xc4, 0x8b, 0xe2, 0x3a, 0xd6, 0x59, 0x15, 0x81, 0xc7, 0x6, 0xa0, 0xcd, 0x25, 0x79, 0x30, 0x15, 0xd9, 0xd8, 0x88, 0x87, 0x80, 0x6c, 0x2f, 0xe8, 0x50, 0x4b, 0xe, 0xd1, 0x9e, 0xe7, 0x4b, 0x75, 0x62, 0x70, 0x74, 0xa7, 0x12, 0x4d, 0xc0, 0x1f, 0xd, 0x33, 0x7f, 0x52, 0x4, 0x4b, 0xda, 0x1b, 0xe, 0x5, 0x74, 0x70, 0xed, 0x88, 0x61, 0x26, 0xa8, 0xa8, 0xb4, 0xbe, 0xbe, 0x21, 0xed, 0xc2, 0x1d, 0x6e, 0x3b, 0x9b, 0xdf, 0x88, 0x87, 0x27, 0x77, 0x78, 0x7e, 0xc4, 0x2e, 0x98, 0x13, 0xf7, 0x53, 0xcc, 0x77, 0x6b, 0xfd, 0xe5, 0xc, 0xde, 0xa0, 0x90, 0xe5, 0xf6, 0x94, 0x5f, 0x24, 0x2e, 0xfe, 0xa, 0x77, 0x6d, 0xc4, 0x2d, 0xe1, 0xb4, 0x42, 0xe5, 0x10, 0xab, 0x87, 0xb0, 0x8d, 0x97, 0xa5, 0x63, 0x99, 0xd1, 0x71, 0xbd, 0xe5, 0xf7, 0x46, 0x15, 0x17, 0xf0, 0x4b, 0x9b, 0x50, 0xc3, 0xc4, 0x28, 0x24, 0xc3, 0x1, 0x95, 0x5e, 0xb9, 0x28, 0x77, 0x56, 0xc3, 0xb, 0xab, 0x6b, 0xe7, 0x53, 0x19, 0x89, 0xbf, 0xc5, 0x52, 0x27, 0x2f, 0xaa, 0x23, 0x7b, 0x10, 0x99, 0xc7, 0x8f, 0x8e, 0xf3, 0xf7, 0x81, 0x21, 0xb6, 0x1b, 0xb2, 0x69, 0xc, 0x17, 0x28, 0xdd, 0x3, 0x0, 0xd1, 0x29, 0x94, 0x39, 0xcb, 0x99, 0xd9, 0x6, 0xc3, 0x57, 0x67, 0x21, 0x12, 0xa1, 0xea, 0x35, 0xf8, 0x3e, 0x91, 0x44, 0xf5, 0x1f, 0x92, 0xdc, 0xac, 0xfb, 0x92, 0x85, 0xc7, 0x5c, 0x73, 0xe2, 0x38, 0x14, 0x33, 0xcd, 0xf3, 0x93, 0x27, 0xa8, 0xb2, 0xd1, 0x30, 0xca, 0x2a, 0x73, 0xf5, 0xa7, 0x69, 0xb0, 0xa, 0x85, 0x85, 0x5a, 0xe9, 0x67, 0x8, 0x9a, 0xc9, 0x41, 0xa5, 0xf1, 0xb5, 0x35, 0xea, 0x5b, 0x3c, 0x68, 0xd0, 0x1a, 0xf7, 0x2f, 0x69, 0x2b, 0x70, 0xf, 0x66, 0x4, 0xfb, 0xee, 0x54, 0x51, 0x19, 0x73, 0x26, 0x99, 0x84, 0xfd, 0x17, 0x44, 0x16, 0x9a, 0x33, 0x2, 0x9f, 0xbe, 0x76, 0xa4, 0x36, 0x47, 0xf9, 0xa3, 0x11, 0x90, 0x63, 0x6, 0x5d, 0xcf, 0x34, 0x56, 0xcc, 0x75, 0xf7, 0x4c, 0x5b, 0x9e, 0x17, 0xdb, 0xeb, 0x8c, 0xda, 0xcf, 0x9c, 0xdb, 0x55, 0x3, 0x68, 0x75, 0x9, 0xe4, 0xb5, 0x14, 0xbc, 0x1f, 0x9f, 0x90, 0xb4, 0xe1, 0x7f, 0x16, 0x7c, 0xc4, 0x26, 0xf9, 0x56, 0x60, 0x2f, 0xb4, 0x2c, 0x64, 0x1, 0x33, 0xd7, 0xda, 0xf0, 0x22, 0x7a, 0x48, 0xdc, 0xf2, 0x28, 0x85, 0xf5, 0x8e, 0xa8, 0x7f, 0xeb, 0x44, 0xcc, 0x4e, 0x67, 0x20, 0x91, 0x16, 0xdc, 0x9e, 0x60, 0x8, 0xf2, 0xbc, 0x7a, 0x4, 0x4, 0x5b, 0x9a, 0xe, 0xf3, 0xeb, 0xdd, 0xc3, 0xae, 0xae, 0xb7, 0x76, 0xcf, 0x63, 0xad, 0xc4, 0xde, 0x7f, 0x9, 0x1f, 0xea, 0x13, 0x9e, 0xfc, 0x26, 0x8f, 0xe2, 0x43, 0xf1, 0x90, 0x24, 0x34, 0xee, 0xd5, 0xa8, 0xd4, 0x7f, 0x39, 0x1b, 0xde, 0xb5, 0x2e, 0x4a, 0x49, 0x18, 0xac, 0x40, 0xcb, 0x56, 0xc8, 0xa7, 0x3c, 0xc0, 0xf8, 0x9a, 0x64, 0x3e, 0x61, 0x35, 0x36, 0x1d, 0x9, 0x8d, 0x9e, 0x46, 0x82, 0xd2, 0x52, 0x6f, 0xf2, 0x84, 0x8b, 0x8f, 0xa0, 0xda, 0xa7, 0x95, 0x73, 0xbf, 0x6, 0xfa, 0xd2, 0xd6, 0x13, 0x81, 0xce, 0x7, 0x1b, 0xd8, 0xa7, 0x11, 0x47, 0xb9, 0x16, 0x4e, 0x6f, 0x83, 0x61, 0xa9, 0x4b, 0xfa, 0x34, 0xf1, 0xe5, 0x8c, 0xa8, 0xd4, 0x4a, 0x80, 0x66, 0x29, 0xf8, 0x11, 0x14, 0x80, 0x51, 0xf0, 0xce, 0x62, 0xb, 0x3c, 0x4f, 0xf8, 0xf0, 0x94, 0xc9, 0xef, 0x5e, 0xcd, 0x24, 0xc0, 0xc6, 0x10, 0x90, 0xbf, 0x4c, 0x8c, 0x6c, 0x99, 0x24, 0x75, 0x57, 0x36, 0x1a, 0xe4, 0x22, 0x8e, 0x8a, 0xdd, 0x68, 0x31, 0xbc, 0x67, 0xd6, 0xff, 0x9c, 0x2, 0x47, 0xbd, 0x89, 0x6e, 0x15, 0x2, 0x81, 0x59, 0x8f, 0x10, 0x97, 0x59, 0x49, 0x19, 0x7, 0xb, 0x97, 0x1c, 0x23, 0xf4, 0xed, 0xbf, 0x87, 0x87, 0x1e, 0xa8, 0x8a, 0x15, 0x42, 0x3, 0x2, 0x96, 0x8b, 0x1, 0x66, 0x33, 0x66, 0xda, 0xd4, 0xbe, 0xd, 0xce, 0xa3, 0x75, 0x11, 0x1b, 0xeb, 0xac, 0xc3, 0x33, 0x72, 0x3f, 0x17, 0xc2, 0xf3, 0x6c, 0xac, 0x75, 0xb9, 0xa8, 0x90, 0xf3, 0x4d, 0x4b, 0xf0, 0xbe, 0x5b, 0x94, 0x3b, 0xb3, 0xdc, 0xa5, 0xc8, 0x97, 0xbe, 0x37, 0x73, 0x81, 0x8d, 0x6e, 0x78, 0x4d, 0x73, 0x30, 0x21, 0xaa, 0x7, 0x10, 0x6f, 0x36, 0x9b, 0xca, 0x54, 0x3e, 0xbc, 0x7e, 0x9b, 0xbe, 0xce, 0x36, 0xae, 0x83, 0x35, 0x96, 0x7d, 0xdc, 0xc2, 0x8e, 0xe4, 0x9b, 0x58, 0x69, 0xc1, 0xa2, 0x12, 0xec, 0x3d, 0x4e, 0xc5, 0x21, 0x4a, 0x90, 0xd6, 0x56, 0xbb, 0x87, 0xe6, 0x2f, 0x7b, 0x25, 0xea, 0xbe, 0x97, 0xd0, 0x6, 0x6c, 0x69, 0x96, 0x3c, 0x73, 0x62, 0x8a, 0xea, 0xa3, 0x2a, 0x3f, 0xcf, 0x44, 0x3b, 0x29, 0xef, 0x1e, 0xe3, 0x89, 0x73, 0x6c, 0xbb, 0xdf, 0x99, 0xfc, 0x7e, 0x1b, 0x77, 0xd4, 0xf, 0x65, 0x1a, 0xe3, 0x58, 0x81, 0xd2, 0xff, 0x43, 0xe7, 0xd4, 0xa1, 0x3a, 0x56, 0xe8, 0xdd}, - output224: []byte{0xa, 0xf7, 0xe1, 0x35, 0x1c, 0x6a, 0x6b, 0x73, 0x59, 0xb5, 0x9e, 0x22, 0xbf, 0x9c, 0x9b, 0xa2, 0x41, 0x10, 0xa2, 0xce, 0xfb, 0x64, 0x7a, 0x79, 0xf, 0xab, 0x41, 0xf1}, - output256: []byte{0x3f, 0x3d, 0x3a, 0xfa, 0xf6, 0x17, 0x3d, 0xc5, 0xa3, 0x81, 0x1a, 0xdd, 0x40, 0x9f, 0xf2, 0x53, 0x1, 0x2, 0x9c, 0xc0, 0xbc, 0xbd, 0xe4, 0xc7, 0xd, 0x21, 0xec, 0xb5, 0x87, 0x2c, 0x1c, 0x12}, - output384: []byte{0x1, 0x63, 0xb6, 0xf7, 0x68, 0xa, 0xd7, 0x18, 0xf4, 0xcf, 0xcc, 0x39, 0x75, 0x4, 0x82, 0xcb, 0xb0, 0xcf, 0x6e, 0x93, 0xa8, 0x5e, 0x99, 0x6b, 0x9c, 0xde, 0xa9, 0xf8, 0x40, 0x97, 0xb0, 0x62, 0xd3, 0xb0, 0x1c, 0x66, 0xeb, 0xf8, 0x22, 0xdb, 0x3b, 0x8b, 0xdb, 0x27, 0x9, 0x1b, 0x8, 0x19}, - output512: []byte{0x91, 0x2e, 0x6a, 0xe7, 0x27, 0x8f, 0xeb, 0x20, 0x3c, 0x33, 0xd4, 0x4d, 0x7a, 0xc3, 0x1a, 0x4c, 0x3e, 0x87, 0xf1, 0x3c, 0x2, 0xdb, 0x14, 0x97, 0x7d, 0x2c, 0xbf, 0x8e, 0xdf, 0x3, 0x3c, 0xf4, 0x9e, 0xb3, 0x8e, 0x67, 0xb9, 0x1, 0x9c, 0xb0, 0xb4, 0xc1, 0x6b, 0x7b, 0xd4, 0xa6, 0xce, 0x8a, 0x9, 0x8c, 0x68, 0x4a, 0xdd, 0x42, 0x23, 0xa3, 0x6d, 0x6d, 0xea, 0xda, 0x9c, 0x83, 0xa0, 0x4b}}, - testcase{ - msg: []byte{0xd3, 0x39, 0x61, 0x1e, 0x4d, 0x57, 0xf8, 0x58, 0xa0, 0xb7, 0x49, 0x8, 0x8d, 0x12, 0x9c, 0xf1, 0x25, 0x8c, 0x20, 0x35, 0xee, 0x4, 0x9d, 0x5f, 0x47, 0x81, 0x6c, 0xb, 0x82, 0xd6, 0x40, 0x45, 0x8c, 0x8f, 0xfa, 0x13, 0x1a, 0xfd, 0xa4, 0x5b, 0xef, 0x31, 0x5, 0xdd, 0x60, 0x46, 0x9a, 0x70, 0xea, 0xcd, 0x18, 0xee, 0x59, 0x4c, 0xcb, 0xac, 0x48, 0x7d, 0x94, 0x8, 0x5e, 0x95, 0x7f, 0x8a, 0x82, 0x8, 0x6e, 0xcb, 0xdf, 0xca, 0xbb, 0x8a, 0xce, 0xda, 0x51, 0x20, 0xa7, 0xe1, 0x5a, 0x12, 0x57, 0x79, 0x85, 0xde, 0xf9, 0xce, 0xd3, 0x21, 0xa1, 0xc8, 0xd3, 0x50, 0x25, 0x5c, 0xce, 0x7d, 0x33, 0x68, 0x25, 0x48, 0x4c, 0x86, 0xf9, 0xdd, 0x18, 0x23, 0x56, 0x5d, 0x26, 0x24, 0x98, 0x25, 0x16, 0xa6, 0x2, 0x7a, 0x21, 0xfb, 0xa2, 0x70, 0x25, 0x71, 0xcd, 0xc0, 0x5c, 0x51, 0x4f, 0x6b, 0x9a, 0x71, 0x38, 0xab, 0x8a, 0x44, 0x1d, 0x80, 0x5f, 0xd3, 0x7b, 0xda, 0xfe, 0xee, 0xe3, 0x1, 0x59, 0x13, 0xe, 0xe5, 0xf9, 0xc, 0x90, 0xde, 0x3, 0xf, 0x9a, 0x90, 0x4e, 0x6d, 0x2a, 0x3, 0xcd, 0xbb, 0xe2, 0x41, 0xf0, 0x43, 0xf, 0xa8, 0x13, 0xa2, 0x51, 0xd4, 0x46, 0x43, 0xc0, 0x4c, 0x4b, 0xef, 0x5d, 0x7, 0x27, 0x3c, 0x92, 0x37, 0xf7, 0x5, 0x30, 0xc3, 0xc, 0xb2, 0x69, 0xd7, 0xe7, 0xb6, 0xe7, 0xf1, 0x8, 0x31, 0x6, 0x9e, 0xee, 0x54, 0x1d, 0x5e, 0xf9, 0x86, 0xcc, 0xf0, 0xe1, 0xe8, 0x70, 0x56, 0x4f, 0xe5, 0x58, 0xbc, 0x1c, 0x21, 0x9d, 0xd8, 0x70, 0xaf, 0x28, 0x70, 0x32, 0x1a, 0xb6, 0x2d, 0xec, 0x23, 0x11, 0x8b, 0x77, 0xd1, 0x64, 0x18, 0x46, 0x5b, 0x54, 0xef, 0x71, 0xa6, 0x8d, 0xd1, 0x7e, 0x2a, 0xa, 0xd1, 0x6e, 0x31, 0xb6, 0x18, 0x19, 0x15, 0x77, 0xbc, 0xaa, 0x5c, 0x29, 0xc2, 0xf3, 0x6c, 0x2b, 0x56, 0xdc, 0x93, 0x2e, 0xf2, 0xf8, 0xef, 0x64, 0x11, 0x18, 0xfa, 0x3a, 0x78, 0xb6, 0x5b, 0x56, 0x4, 0xe0, 0x91, 0x3a, 0x48, 0x53, 0x9c, 0x4b, 0x26, 0xf0, 0xb5, 0xe7, 0x3f, 0x77, 0xde, 0x1d, 0x6d, 0x86, 0xeb, 0xe0, 0x3, 0x8c, 0x78, 0x83, 0xc2, 0xf6, 0x9c, 0xf, 0xf4, 0x62, 0x90, 0x7d, 0xc3, 0xb8, 0x5c, 0xcb, 0xd8, 0x7b, 0x85, 0xb0, 0x67, 0x81, 0x39, 0x29, 0x7a, 0xa4, 0x78, 0xf0, 0x3a, 0x58, 0x8c, 0x6c, 0xd9, 0xba, 0xcf, 0x2d, 0x5c, 0xb5, 0x54, 0xc, 0x6, 0x6a, 0x5d, 0x52, 0x88, 0x9b, 0xc3, 0x70, 0xa0, 0x8a, 0xce, 0x6, 0x95, 0x3c, 0x23, 0x98, 0xe9, 0x2e, 0x2a, 0x6a, 0xa1, 0x16, 0x16, 0xb4, 0x9, 0x27, 0xc4, 0x22, 0x3, 0x32, 0x6b, 0x38, 0x88, 0xce, 0xcb, 0x70, 0xf7, 0x42, 0x5c, 0x10, 0x38, 0xe5, 0x7d, 0x6d, 0x3b, 0xb1, 0x9b, 0xb6, 0x43, 0x70, 0x4f, 0x83, 0xae, 0x6a, 0x55, 0xfe, 0x8b, 0x32, 0x34, 0xdc, 0x25, 0x17, 0x5d, 0x24, 0x3f, 0xfd, 0x7e, 0x16, 0xbc, 0x5c, 0xb8, 0x4e, 0x85, 0x79, 0xe6, 0x19, 0xcf, 0x69, 0x9b, 0x54, 0xbf, 0x98, 0x89, 0xc, 0x5, 0x63, 0xc4, 0x24, 0x47, 0x7b, 0x5b, 0x18, 0xe5, 0x93, 0x14, 0x99, 0x9f, 0xbc, 0x4c, 0x13, 0xd2, 0x86, 0x6d, 0xbe, 0xdd, 0x98, 0x36, 0xc1, 0x1a, 0x62, 0xc4, 0xe1, 0xe5, 0x19, 0x9b, 0xda, 0x93, 0xd2, 0xc9, 0x4, 0x83, 0xa4, 0xfc, 0x35, 0x90, 0xbf, 0x66, 0x47, 0x2b, 0xb8, 0xb1, 0xf4, 0x99, 0xdb, 0xf9, 0x4a, 0x56, 0xd8, 0xa2, 0xd2, 0x7f, 0x96, 0x7, 0xb0, 0x19, 0x22, 0x8a, 0xcc, 0x75, 0xf8, 0xda, 0x8f, 0x3f, 0x9a, 0x24, 0xea, 0xf, 0xbe, 0xf5, 0x5c, 0xbe, 0x6c, 0x3b, 0x55, 0x50, 0x6a, 0xe4, 0xfe, 0xd8, 0x49, 0x95, 0x43, 0xb0, 0xf0, 0x4b, 0xba, 0x76, 0xf7, 0xf1, 0x64, 0xf3, 0x1d, 0xfc, 0x76, 0x81, 0x5, 0x1e, 0xf0, 0x5b, 0x32, 0x84, 0x69, 0x33, 0xce, 0x4c, 0x12, 0x61, 0x65, 0x9d, 0x6c, 0x41, 0x4b, 0xdf, 0xf5, 0x97, 0xaf, 0x14, 0xd0, 0x1d, 0x73, 0xd4, 0xf3, 0x27, 0xd, 0xb3, 0x9, 0xb8, 0xe8, 0xb6, 0x20, 0x1, 0xea, 0x17, 0xb3, 0x5b, 0xb7, 0xb7, 0xcc, 0x7c, 0xbb, 0xfc, 0xdc, 0x84, 0x6a, 0x3d, 0x19, 0x92, 0x9b, 0x7f, 0xed, 0x56, 0x93, 0x8, 0x9a, 0x3f, 0x81, 0xa4, 0x67, 0xa5, 0x39, 0xbe, 0x1c, 0xeb, 0xcc, 0xeb, 0xfb, 0x5b, 0x38, 0x4c, 0xd0, 0x25, 0xeb, 0x2d, 0xed, 0xf5, 0xc4, 0x39, 0xf, 0x60, 0x7f, 0x7c, 0x9e, 0xe3, 0xef, 0x27, 0x3d, 0x72, 0x70, 0xe5, 0x15, 0xa, 0x24, 0x1a, 0xbe, 0xb9, 0x7b, 0x67, 0x8c, 0xa3, 0x80, 0x8f, 0x31, 0x8d, 0xa5, 0xe3, 0x8f, 0x68, 0x42, 0xa2, 0xa3, 0xc0, 0x9c, 0xdf, 0x25, 0xc8, 0xd0, 0x93, 0xca, 0xee, 0x7c, 0x5a, 0xdb, 0xab, 0x43, 0x6b, 0x8d, 0xa1, 0x5a, 0xe3, 0xfe, 0x3f, 0xb, 0x84, 0xab, 0x2b, 0x43, 0xcf, 0x1c, 0xf9, 0xae, 0x3c, 0xd, 0x44, 0x77, 0x2, 0x82, 0xb6, 0xf1, 0xcc, 0x1c, 0xd7, 0xe8, 0x2d, 0x19, 0x5b, 0xe2, 0xa5, 0xe5, 0xaf, 0x40, 0x73, 0x54, 0x49, 0xf6, 0x94, 0x8c, 0x70, 0x37, 0xf6, 0xe1, 0x73, 0x31, 0x89, 0x98, 0x4b, 0x4d, 0x1d, 0xa1, 0xf0, 0xbb, 0xcb, 0xab, 0x83, 0x73, 0xc3, 0xa9, 0xa3, 0xc0, 0xda, 0xe2, 0x36, 0x76, 0x88, 0x83, 0x63, 0x4e, 0xb4, 0x2e, 0x57, 0x45, 0x25, 0x26, 0x44, 0x3, 0xe9, 0xa, 0x50, 0x3a, 0x7d, 0x89, 0x5, 0x30, 0x83, 0x4b, 0x47, 0x1, 0xad, 0xc1, 0xa9, 0xc6, 0xb9, 0x53, 0x98, 0x1b, 0x95, 0x81, 0x72, 0x1a, 0xe3, 0x7a, 0xb0, 0x1c, 0xfc, 0x2b, 0x95, 0x71, 0xf2, 0xd6, 0x5d, 0x4e, 0x35, 0xf3, 0x38, 0x1f, 0x7f, 0x5, 0xf2, 0xcd, 0xa1, 0x60, 0xed, 0x61, 0x43, 0xe2, 0x5c, 0x6d, 0x9d, 0x2a, 0xd6, 0xdc, 0x9b, 0x3f, 0x69, 0xed, 0x69, 0x3a, 0x32, 0x51, 0x10, 0xf4, 0x91, 0x92, 0xe1, 0x69, 0xab, 0x5e, 0xed, 0x6b, 0xe8, 0x8a, 0x3e, 0xb, 0xe0, 0x3d, 0x1f, 0xa2, 0x9f, 0xc0, 0x2, 0x33, 0x59, 0x79, 0x97, 0x1c, 0x16, 0xf0, 0x96, 0xbd, 0xdc, 0x4d, 0x88, 0xeb, 0x23, 0x0, 0xba, 0x51, 0x4b, 0x16, 0x7d, 0x4a, 0x9d, 0xcb, 0x35, 0x3d, 0x7a, 0xb0, 0xc3, 0xdb, 0x7a, 0xd9, 0x91, 0x41, 0x5d, 0xa3, 0x62, 0x27, 0x5d, 0x32, 0x64, 0x36, 0xd, 0x5, 0x68, 0xbc, 0x5b, 0x60, 0xb5, 0xeb, 0xcd, 0xaa, 0x5b, 0xd6, 0x2e, 0xdb, 0x4, 0xc, 0x65, 0x83, 0xa9, 0xb9, 0x97, 0xd9, 0x83, 0x84, 0x79, 0xa5, 0x8, 0xf7, 0x9e, 0x9a, 0xca, 0xaf, 0xa6, 0x3f, 0x90, 0x66, 0xf, 0xb0, 0xc0, 0xd0, 0xee, 0xca, 0xa7, 0x2b, 0xde, 0x7f, 0xc7, 0xab, 0x4b, 0x77, 0xd2, 0x9c, 0x21, 0xf, 0xe6, 0xae, 0xbc, 0x6a, 0xbe, 0xec, 0x7f, 0x20, 0x1c, 0x8c, 0x64, 0xcb, 0x30, 0x6a, 0xee, 0xd1, 0x11, 0x7, 0x68, 0xb3, 0x36, 0xb, 0x8b, 0x2f, 0x30, 0xf8, 0xd1, 0xd2, 0xc1, 0xee, 0x7b, 0x5d, 0xfc, 0xfd, 0x5d, 0x56, 0x51, 0x5f, 0x3f, 0x61, 0x7d, 0xec, 0x24, 0xf5, 0x6c, 0x4f, 0xbe, 0x66, 0x4, 0x59, 0x7e, 0xda, 0xcb, 0x6a, 0x42, 0xf9, 0x44, 0x7b, 0xac, 0x63, 0xc5, 0x3b, 0x54, 0x1, 0xb, 0x5a, 0xd6, 0xf3, 0xa5, 0xa8, 0xc3, 0x7f, 0x89, 0xcd, 0x34, 0x5d, 0xef, 0x63, 0x14, 0x50, 0xc2, 0xb4, 0x91, 0xe7, 0xad, 0x64, 0x36, 0xf6, 0xf9, 0x23, 0xa0, 0xce, 0xc8, 0x5a, 0x76, 0xfb, 0x4, 0xc0, 0xb5, 0x59, 0xa6, 0x97, 0x22, 0x84, 0x14, 0x59, 0x54, 0xec, 0x82, 0xcf, 0x84, 0xb0, 0x63, 0x7e, 0x4b, 0xa1, 0x1b, 0x3f, 0x8b, 0xd6, 0x8d, 0xc1, 0x25, 0xeb, 0x56, 0x93, 0xa3, 0xed, 0x2c, 0xb3, 0xa6, 0x29, 0x59, 0xcb, 0xf4, 0x1c, 0x94, 0x9, 0xd8, 0x4f, 0x2a, 0xc9, 0x26, 0x4e, 0x99, 0xff, 0x69, 0x54, 0x43, 0xff, 0xe6, 0x89, 0x46, 0x4b, 0x34, 0x9b, 0x29, 0x9a, 0xb2, 0x40, 0xd5, 0x42, 0xb2, 0x9c, 0xed, 0xea, 0x37, 0xf2, 0x22, 0x1b, 0x54, 0x44, 0xb9, 0x26, 0x16, 0x38, 0x6a, 0x2b, 0xc7, 0x44, 0x14, 0x39, 0x5b, 0x97, 0xeb, 0xd3, 0xdf, 0x78, 0xc5, 0x83, 0x23, 0x48, 0x83, 0xaf, 0x5c, 0x79, 0x7, 0xcd, 0x68, 0xba, 0x81, 0xe1, 0x9a, 0xe6, 0x16, 0xb4, 0x95, 0x3, 0x26, 0xe5, 0x26, 0xcd, 0xec, 0x80, 0x44, 0x34, 0x97, 0xb1, 0xbc, 0x42, 0xcb, 0xc4, 0x11, 0x15, 0x73, 0xd3, 0x9e, 0xd2, 0x36, 0x32, 0x3a, 0x8e, 0xab, 0x36, 0xab, 0x7d, 0xd4, 0x5d, 0x65, 0xdb, 0xbb, 0x9f, 0x5f, 0x7d, 0x65, 0x7c, 0xcf, 0x94, 0x4f, 0x0, 0xce, 0xd4, 0xf1, 0x28, 0x17, 0xde, 0x3d, 0x3, 0x19, 0x60, 0xbc, 0x33, 0x4e, 0xd3, 0xf8, 0x64, 0x64, 0x37, 0x37, 0xb2, 0x64, 0x1c, 0x6f, 0x39, 0x2a, 0x4a, 0x60, 0x52, 0x72, 0x52, 0x27, 0x2e, 0x13, 0x34, 0xbc, 0xed, 0x47, 0x63, 0x7d, 0xce, 0x95, 0x29, 0x2a, 0x8e, 0x42, 0x73, 0xcb, 0xa0, 0x3e, 0x17, 0xe1, 0x66, 0x70, 0x22, 0x5c, 0x2e, 0x27, 0x33, 0xd7, 0x85, 0x8e, 0x2c, 0x7d, 0x9d, 0xa6, 0xe1, 0x43, 0x33, 0xf2, 0x91, 0x7c, 0x6d, 0xf9, 0x2f, 0x23, 0x3a, 0xcb, 0x60, 0x55, 0x3b, 0xed, 0xc6, 0x8d, 0xa7, 0xa9, 0x9f, 0x18, 0xc2, 0xd3, 0x85, 0x4f, 0xec, 0x8c, 0x7, 0x6, 0x98, 0xc, 0x5d, 0xda, 0xc1, 0x17, 0x4b, 0xef, 0xad, 0x6a, 0x7d, 0xa0, 0x3d, 0xc1, 0xdf, 0x37, 0x2c, 0xae, 0xd2, 0xb7, 0xb5, 0x62, 0x5e, 0xef, 0xe9, 0x3d, 0x64, 0x19, 0x49, 0x4c, 0x3d, 0xd1, 0x89, 0x1, 0x13, 0xe1, 0x90, 0x71, 0x9a, 0xbc, 0x2b, 0x69, 0x5f, 0x7f, 0x2a, 0xac, 0xcd, 0x37, 0x2e, 0xf7, 0x81, 0x81, 0xc4, 0x28, 0xf1, 0x99, 0x18, 0xbc, 0x2e, 0x2c, 0xc1, 0x6f, 0xd9, 0x7f, 0x1a, 0xef, 0x7e, 0x4f, 0xc3, 0x29, 0x75, 0x78, 0xe0, 0xbe, 0x19, 0xb8, 0xb2, 0xce, 0x6d, 0xdf, 0xa2, 0x0, 0xe5, 0x93, 0x69, 0x2e, 0xfa, 0x8b, 0x11, 0xfb, 0x5a, 0x55, 0x91, 0x93, 0x93, 0xb9, 0x8a, 0x2f, 0xe3, 0x1b, 0xf7, 0xb8, 0x7, 0x1, 0xb6, 0x74, 0x30, 0xf1, 0xb3, 0x39, 0x11, 0xaf, 0x41, 0x50, 0x4b, 0x2c, 0x3c, 0xd0, 0x0, 0xe3, 0xea, 0xe1, 0x48, 0x1, 0x4c, 0x45, 0x1d, 0x16, 0x6c, 0x47, 0xb6, 0xfe, 0x82, 0x66, 0xf4, 0x4e, 0x62, 0xed, 0x75, 0x15, 0xc6, 0xf3, 0x5, 0x11, 0x74, 0x31, 0x43, 0x48, 0x59, 0x82, 0xc3, 0x24, 0x53, 0x32, 0xfe, 0x19, 0x89, 0xf, 0xc8, 0xe7, 0xdb, 0x99, 0x79, 0x1a, 0x36, 0xe7, 0x7a, 0xbf, 0xaf, 0xbd, 0xb, 0x65, 0xcd, 0xd8, 0x61, 0xee, 0xff, 0x1f, 0x29, 0xe1, 0x42, 0xdf, 0x90, 0x3e, 0x72, 0x3b, 0x2e, 0xc3, 0xb4, 0xa4, 0xff, 0xf8, 0xc5, 0xb4, 0xf3, 0xf4, 0x37, 0x7e, 0x38, 0x37, 0xcf, 0x13, 0x4d, 0x74, 0x2d, 0x46, 0xef, 0x14, 0x8c, 0x98, 0x6d, 0xd1, 0x61, 0xa9, 0x39, 0x48, 0x2f, 0xdf, 0x40, 0xd4, 0xbb, 0x4a, 0x42, 0x31, 0xb7, 0xd5, 0x64, 0x8e, 0x2d, 0xbd, 0x8a, 0x9d, 0x85, 0x16, 0xc6, 0xbd, 0xa0, 0xa3, 0x70, 0xfa, 0x53, 0x62, 0xd, 0x52, 0x55, 0x34, 0x18, 0x30, 0xb8, 0x4c, 0x75, 0x1e, 0x31, 0xb8, 0xe1, 0x7f, 0x3f, 0xce, 0x2, 0x79, 0x6, 0xaf, 0xcc, 0x2a, 0xe7, 0xe5, 0xe1, 0x4, 0xa1, 0x10, 0x9e, 0x86, 0xfb, 0x20, 0x89, 0x7e, 0x31, 0x9, 0xd0, 0x7e, 0x70, 0xc, 0x13, 0xe6, 0xff, 0xa7, 0x1, 0x6e, 0xad, 0x35, 0x96, 0x92, 0x45, 0xa1, 0x6b, 0xe0, 0x32, 0xca, 0xda, 0xf, 0x23, 0x27, 0x84, 0x4d, 0xfb, 0x3b, 0x45, 0xd9, 0xb3, 0xe9, 0xe3, 0x9, 0xa9, 0x8d, 0xd9, 0x27, 0xc5, 0xe7, 0x5a, 0xed, 0x32, 0x70, 0x71, 0x40, 0x41, 0xe3, 0x5a, 0x70, 0x3c, 0x3e, 0xa7, 0xc1, 0x3, 0x48, 0xfe, 0x52, 0x1c, 0xfc, 0xdf, 0xb7, 0xc0, 0x2e, 0xa9, 0xe1, 0x23, 0xb2, 0x67, 0xc2, 0x2f, 0x9, 0x1a, 0x4b, 0x98, 0x47, 0x33, 0x30, 0xe9, 0x3a, 0x36, 0x2c, 0x35, 0x8f, 0x92, 0x51, 0x9f, 0x9f, 0x42, 0xb0, 0xe6, 0xd2, 0xaa, 0xfa, 0x5, 0x38, 0xec, 0x32, 0xaf, 0x4a, 0x52, 0x35, 0x8e, 0xfe, 0x45, 0xb5, 0x9a, 0x9a, 0xc0, 0x5c, 0xf4, 0xd6, 0xd8, 0x2a, 0xf2, 0xb8, 0x8b, 0xbf, 0x32, 0x7d, 0x3e, 0xe6, 0x1a, 0x4f, 0x34, 0x11, 0x78, 0xba, 0xd4, 0xb2, 0x28, 0xca, 0x86, 0xd9, 0xce, 0xff, 0xb4, 0x59, 0xc6, 0x4e, 0xf1, 0x2e, 0x5c, 0x53, 0x39, 0x47, 0x10, 0x54, 0xfe, 0x9, 0xde, 0x9, 0x33, 0x59, 0x5c, 0x2b, 0x1a, 0x5c, 0xd9, 0x85, 0x81, 0x67, 0x5d, 0xfa, 0xb, 0x9c, 0x4, 0xdb, 0x65, 0xdd, 0xcf, 0x45, 0x2c, 0x49, 0xd7, 0x20, 0xc0, 0x87, 0x6b, 0xe8, 0x8e, 0x9d, 0x72, 0x32, 0x73, 0x78, 0x65, 0xc5, 0x98, 0xa5, 0xd2, 0x8, 0x62, 0xd7, 0x49, 0xd3, 0x80, 0x7a, 0x7f, 0x5, 0x2f, 0x4f, 0xc0, 0xe0, 0x96, 0x1f, 0xf3, 0x14, 0xdf, 0x69, 0x82, 0x9b, 0x3a, 0x30, 0x85, 0x14, 0x8a, 0x81, 0x8b, 0xf, 0x53, 0x84, 0xb, 0x92, 0xeb, 0xba, 0x2, 0x66, 0xa4, 0x27, 0x19, 0xd4, 0x99, 0x2, 0x77, 0x5b, 0x72, 0xd1, 0x51, 0x62, 0xb1, 0x64, 0x3f, 0x80, 0x99, 0x33, 0x93, 0xa9, 0x28, 0xa, 0x99, 0xe7, 0x2a, 0xca, 0x1f, 0xc8, 0xb2, 0xf8, 0x45, 0x4e, 0x56, 0x6b, 0xc7, 0x9c, 0xd9, 0x7, 0x5f, 0xe0, 0x91, 0xf5, 0xed, 0xb4, 0xeb, 0xd, 0xa5, 0xe0, 0xdc, 0x5c, 0x4e, 0xd8, 0x5a, 0x8f, 0xc3, 0x99, 0x73, 0x89, 0xd2, 0x35, 0xcb, 0x54, 0x36, 0xe9, 0xa8, 0xae, 0xd1, 0xd4, 0x60, 0x45, 0x75, 0x83, 0x4c, 0x1e, 0xb2, 0xfc, 0xf1, 0x37, 0x8e, 0x46, 0x5f, 0x77, 0xcf, 0x3, 0x75, 0x3, 0x63, 0x94, 0x82, 0xa2, 0x85, 0xa9, 0xd0, 0xb4, 0x76, 0xcb, 0x9d, 0xdf, 0xfc, 0xb, 0x82, 0xe6, 0x4b, 0xbd, 0x17, 0x55, 0x38, 0xc2, 0x64, 0x73, 0x82, 0xd2, 0xd7, 0x58, 0x72, 0x25, 0xc8, 0x45, 0xd8, 0xc1, 0x4f, 0x38, 0x74, 0xc1, 0x45, 0x62, 0x5, 0x7, 0x1c, 0xc, 0xb, 0x39, 0x65, 0xfe, 0x30, 0xe9, 0xce, 0x3b, 0x61, 0x6e, 0x4d, 0xe7, 0x8b, 0x39, 0x53, 0xa9, 0xec, 0x52, 0x5e, 0x43, 0xce, 0xea, 0xcc, 0xc, 0x30, 0x3c, 0x64, 0x0, 0xcb, 0x4d, 0x52, 0xfd, 0xfd, 0x14, 0x23, 0x76, 0x7, 0x5d, 0x26, 0xac, 0x11, 0x23, 0xec, 0x4c, 0xfb, 0xf8, 0x2e, 0x77, 0xcb, 0x4, 0xef, 0xc0, 0x9c, 0xc9, 0x56, 0x1, 0xb1, 0x46, 0x81, 0xc9, 0xa, 0x7b, 0x8, 0x40, 0xef, 0xc8, 0x19, 0x61, 0x3a, 0xa0, 0x6f, 0xaf, 0xe2, 0xda, 0xb4, 0xb0, 0x36, 0x95, 0x1f, 0x82, 0x57, 0x9a, 0x2, 0xef, 0xef, 0xd0, 0x8d, 0xf0, 0xee, 0xef, 0xd2, 0x14, 0x60, 0x80, 0x73, 0x49, 0x61, 0x72, 0x5b, 0x6e, 0x91, 0x77, 0x39, 0xfb, 0x80, 0xde, 0xb9, 0xb8, 0xbb, 0x6d, 0xce, 0x39, 0xe2, 0x3, 0x72, 0xcc, 0xc0, 0x79, 0xad, 0xd9, 0x3, 0x7, 0x99, 0x6, 0x1e, 0xf1, 0xf0, 0x11, 0x69, 0x94, 0x45, 0x57, 0xe, 0xf0, 0xcb, 0x96, 0x34, 0x83, 0x9, 0x9e, 0xb1, 0x7f, 0x22, 0x22, 0x66, 0x98, 0xde, 0xb1, 0x10, 0x49, 0x5c, 0x15, 0x9e, 0xb6, 0x3d, 0xa7, 0x50, 0xd2, 0x31, 0xe7, 0x8c, 0x4a, 0x7c, 0x73, 0x49, 0x41, 0xe4, 0x43, 0xaf, 0x7f, 0x2b, 0x5a, 0x3a, 0x6, 0xcc, 0x53, 0x34, 0xef, 0x76, 0x74, 0x3f, 0xcb, 0xe8, 0xed, 0xd3, 0x93, 0x9a, 0xbd, 0x48, 0xce, 0x32, 0xa0, 0x3d, 0xd5, 0x9d, 0x25, 0x53, 0xba, 0x40, 0x8b, 0x44, 0x4d, 0x95, 0x99, 0xc2, 0x35, 0x84, 0x43, 0x29, 0x4c, 0x40, 0x6d, 0x3, 0xd8, 0x6a, 0x23, 0xf8, 0x72, 0x99, 0x2a, 0x1c, 0x45, 0x50, 0x27, 0xaa, 0x4d, 0x7e, 0xa3, 0x5a, 0xfc, 0xe3, 0x5a, 0xf0, 0xa4, 0xa, 0x8b, 0x58, 0xce, 0x2c, 0x14, 0x9c, 0x0, 0xed, 0x49, 0xdd, 0xfb, 0xf0, 0x1f, 0x1e, 0xfb, 0xad, 0x3d, 0xb5, 0x9d, 0x22, 0x14, 0xb7, 0x95, 0xc7, 0xf7, 0x82, 0x29, 0x88, 0x9d, 0xa7, 0x7c, 0x4a, 0x4f, 0xaa, 0xb9, 0x44, 0xeb, 0xb0, 0x33, 0xa0, 0x45, 0x15, 0x6a, 0xae, 0xb5, 0xb4, 0x57, 0xba, 0x7f, 0xe0, 0xa9, 0x70, 0xfa, 0xc1, 0x95, 0xef, 0x5d, 0x20, 0x6e, 0x28, 0xff, 0x91, 0x51, 0x31, 0xc, 0xc9, 0x19, 0x37, 0xfc, 0x33, 0xe6, 0x1a, 0x50, 0x75, 0x5a, 0xb1, 0xc1, 0x9, 0xe4, 0xdd, 0x87, 0xdc, 0x51, 0x19, 0x64, 0xf9, 0x70, 0x78, 0x4b, 0xc3, 0x1, 0x9a, 0xfc, 0xf0, 0x15, 0xc6, 0xeb, 0xad, 0xd5, 0xc4, 0xc3, 0x22, 0x56, 0x31, 0x1e, 0x89, 0x96, 0xfa, 0xb7, 0xdc, 0x39, 0x45, 0xcd, 0x87, 0xd5, 0x5f, 0xc9, 0xc8, 0x51, 0xe8, 0x63, 0xda, 0xd3, 0x71, 0xd6, 0xe9, 0xd6, 0x91, 0x57, 0xc5, 0x4, 0xb, 0xd7, 0x2, 0xf8, 0x28, 0xc0, 0x88, 0xc5, 0xa8, 0xe4, 0xe3, 0x5e, 0xd1, 0x9e, 0x87, 0x31, 0xeb, 0x9a, 0xdd, 0xc7, 0xd3, 0x1e, 0xde, 0xb9, 0x5e, 0x2f, 0xa5, 0x7e, 0xc5, 0x14, 0xd9, 0x7f, 0xe5, 0x91, 0x42, 0x64, 0xdd, 0x0, 0x16, 0xbb, 0x43, 0xf, 0xdd, 0x7d, 0xcd, 0x5a, 0x16, 0x17, 0x32, 0x80, 0x29, 0x63, 0xbe, 0xc1, 0x54, 0x9e, 0x5c, 0xd5, 0x15, 0x1c, 0xe9, 0xc8, 0xbd, 0x46, 0xb2, 0x6f, 0x44, 0x1c, 0xb6, 0x8b, 0xbc, 0x9d, 0xcc, 0x8, 0xc1, 0x39, 0xdd, 0x9a, 0xda, 0xc1, 0xa1, 0x58, 0xb5, 0xf9, 0xe5, 0x4d, 0x2c, 0x20, 0xf0, 0x1a, 0xe6, 0x6b, 0xe7, 0x88, 0xc1, 0x0, 0x67, 0xc6, 0xe, 0x8, 0x8f, 0xdc, 0xf8, 0x28, 0xf7, 0xbe, 0x90, 0x8d, 0x86, 0x36, 0x4, 0xe1, 0x9f, 0x31, 0x83, 0x89, 0xe5, 0xac, 0x14, 0x82, 0x37, 0xe1, 0x1b, 0xe7, 0x11, 0xff, 0x43, 0x28, 0x69, 0xc5, 0xa9, 0x8, 0x2e, 0x5f, 0xd9, 0xfd, 0x24, 0xc3, 0x9e, 0x57, 0x86, 0x3d, 0x63, 0xbd, 0x85, 0xd5, 0xb7, 0x8c, 0x63, 0x29, 0xc6, 0x64, 0x9f, 0x56, 0x23, 0x24, 0x39, 0x8c, 0x21, 0xce, 0xca, 0x17, 0xcc, 0x78, 0x75, 0xa, 0xe9, 0xad, 0xab, 0x61, 0x2c, 0xa3, 0xbd, 0xa, 0xb6, 0xff, 0xaa, 0x9f, 0x23, 0x6, 0x37, 0x92, 0x7d, 0xa9, 0xde, 0xc3, 0x7, 0x7a, 0xb6, 0xf4, 0x25, 0xd2, 0x1e, 0xe9, 0x71, 0xa0, 0x74, 0x47, 0x32, 0xf3, 0x9e, 0xd8, 0x2f, 0x6b, 0x6, 0xf1, 0xe8, 0x4c, 0xd7, 0x77, 0xf1, 0x91, 0xa, 0x92, 0x90, 0xa6, 0x6c, 0x77, 0x26, 0x4e, 0x48, 0x46, 0x93, 0x10, 0x8d, 0x97, 0x3a, 0x25, 0x90, 0x8a, 0x97, 0x1, 0xc4, 0x14, 0x92, 0xc, 0xb0, 0xe3, 0xb8, 0x2a, 0x74, 0xd1, 0xea, 0x83, 0x4, 0xe8, 0x59, 0x4c, 0x77, 0x72, 0x90, 0xcd, 0x32, 0x86, 0x47, 0x38, 0xc6, 0x57, 0xbd, 0xbb, 0xd5, 0x7e, 0xdf, 0x42, 0xec, 0x9a, 0x2f, 0x52, 0x2c, 0xe9, 0x11, 0xc1, 0x37, 0x82, 0x75, 0xad, 0x43, 0x88, 0x9c, 0xc2, 0x6e, 0x9a, 0x38, 0x18, 0x98, 0x7f, 0xf0, 0x67, 0x1a, 0x7a, 0x94, 0x57, 0x3c, 0x1, 0x3e, 0xee, 0xbd, 0xfc, 0xfa, 0xb5, 0xd9, 0xbb, 0x40, 0x5d, 0x5, 0xb6, 0x6e, 0xb6, 0x41, 0xc9, 0x76, 0xa4, 0x23, 0x31, 0x69, 0xa4, 0x63, 0x38, 0x89, 0x54, 0x67, 0xf3, 0x6f, 0x9f, 0xe7, 0xfc, 0x1c, 0xb3, 0xea, 0xb8, 0x30, 0xf4, 0x6f, 0x26, 0x12, 0x52, 0xaa, 0xc0, 0x49, 0x2c, 0x6, 0x99, 0x44, 0x33, 0x3, 0x94, 0x95, 0x30, 0x68, 0x75, 0x33, 0xcd, 0x9, 0xcb, 0xff, 0x9, 0xdc, 0xc8, 0xf1, 0x2a, 0x49, 0xe8, 0x92, 0xa4, 0x7a, 0xb0, 0xa2, 0xbf, 0xfe, 0x1b, 0x7a, 0x49, 0x3b, 0xfd, 0x66, 0xd9, 0xe4, 0x82, 0x25, 0x98, 0x78, 0x1b, 0xb8, 0xa9, 0x4a, 0x4d, 0x7d, 0x63, 0xd7, 0x7c, 0x8f, 0x1b, 0x41, 0x12, 0xf8, 0x9c, 0xa2, 0x15, 0xde, 0xcb, 0x61, 0xf, 0x13, 0x39, 0x18, 0x4f, 0x8c, 0xf6, 0x6b, 0xb5, 0x91, 0x69, 0x55, 0x30, 0x13, 0x27, 0x64, 0x72, 0xbb, 0xf7, 0x75, 0x3a, 0x7e, 0xab, 0x4, 0x6f, 0x55, 0xe7, 0x20, 0xc0, 0xb2, 0x35, 0x40, 0x77, 0x48, 0xb8, 0xcf, 0xa0, 0x7e, 0x74, 0x88, 0x8, 0x87, 0x5a, 0x89, 0x66, 0x61, 0xa5, 0x4d, 0xde, 0x93, 0x9e, 0xd, 0x64, 0xcb, 0x30, 0x31, 0xa4, 0xd4, 0x8d, 0x56, 0x5e, 0x24, 0xa5, 0x6a, 0xe1, 0x17, 0xec, 0xfe, 0xb2, 0x79, 0x28, 0xe4, 0x2c, 0x6, 0x61, 0x4b, 0x43, 0x27, 0xb9, 0x26, 0x1b, 0xe4, 0xab, 0x24, 0x16, 0x9b, 0x26, 0xf9, 0xa7, 0xa4, 0x63, 0xa4, 0x2f, 0xa, 0xda, 0x30, 0x53, 0x59, 0x31, 0x4e, 0x7d, 0x48, 0x99, 0x3e, 0xbf, 0xe4, 0x6f, 0xed, 0x1e, 0xf6, 0xf6, 0x5f, 0x73, 0x34, 0x83, 0xb8, 0x83, 0xb7, 0x2d, 0xee, 0xfd, 0x5a, 0xe8, 0x3, 0xa0, 0xcb, 0xce, 0x91, 0xe5, 0x16, 0x10, 0x90, 0xda, 0x18, 0x8c, 0x47, 0x5b, 0x38, 0x37, 0x9f, 0xa2, 0xcb, 0x19, 0x1d, 0xc, 0x17, 0x2e, 0x96, 0x63, 0x76, 0xfc, 0x8c, 0x7a, 0x5e, 0xf4, 0x26, 0x39, 0x49, 0xd7, 0x5a, 0x95, 0x5e, 0xe9, 0x4e, 0x3, 0x91, 0xe7, 0xc, 0xe0, 0x4c, 0x61, 0xd3, 0xf4, 0xf4, 0x9c, 0xc5, 0xf1, 0x77, 0x45, 0x15, 0xf0, 0x1b, 0xa6, 0xcf, 0x83, 0xbe, 0xa9, 0xbd, 0xfb, 0x7f, 0x15, 0x8f, 0x6c, 0xed, 0x3b, 0xc3, 0x3b, 0xef, 0xfa, 0xcb, 0x80, 0xba, 0x37, 0x67, 0xe4, 0x76, 0xf3, 0x18, 0xc, 0x39, 0x2f, 0x17, 0xde, 0x1f, 0x72, 0x71, 0x94, 0x66, 0xb4, 0xe8, 0x14, 0xd7, 0x57, 0xc, 0x9b, 0x8, 0xeb, 0x3f, 0x5, 0x3d, 0x72, 0x8e, 0x5e, 0xfa, 0x2c, 0x28, 0xae, 0xb4, 0xfa, 0x55, 0x7a, 0x2c, 0x80, 0x9e, 0x35, 0x7f, 0x9c, 0xca, 0xb2, 0x1f, 0x4e, 0x9f, 0xc3, 0x29, 0x1c, 0xee, 0x7c, 0xcd, 0xe2, 0xed, 0xf7, 0xb0, 0x86, 0xf8, 0x44, 0xb5, 0x31, 0xc6, 0xd6, 0xd5, 0x74, 0x4a, 0xb2, 0xc3, 0xfa, 0x27, 0x95, 0xa7, 0xc2, 0xb2, 0x6a, 0x3f, 0xde, 0x44, 0xac, 0x46, 0x73, 0x89, 0x72, 0xd3, 0x74, 0xe5, 0x34, 0xd1, 0x97, 0x23, 0x22, 0xd4, 0xdc, 0x8b, 0x34, 0x9f, 0xdd, 0x5d, 0x3a, 0xee, 0x82, 0x7b, 0xc4, 0xde, 0x6d, 0xed, 0x71, 0x5b, 0x87, 0xf1, 0xa2, 0x6f, 0xe0, 0x9f, 0xa1, 0x2a, 0x49, 0x59, 0x19, 0x99, 0x7e, 0x7, 0xe7, 0x5e, 0x26, 0x88, 0x99, 0xd5, 0x99, 0xbe, 0xf, 0xc6, 0x99, 0x43, 0x36, 0x19, 0xd7, 0x3c, 0x63, 0xb3, 0x4a, 0x37, 0x7f, 0x6c, 0xd5, 0x11, 0xd0, 0x95, 0xda, 0x8e, 0xd2, 0x9a, 0x9f, 0xa8, 0x69, 0x44, 0xb3, 0x79, 0x5b, 0xb6, 0x9f, 0xb8, 0xf5, 0x1f, 0xbc, 0x34, 0xd0, 0x78, 0x9, 0xde, 0xc6, 0xfc, 0x64, 0x6b, 0xa6, 0x3b, 0xa4, 0x83, 0x22, 0x71, 0x7a, 0x1e, 0xe0, 0x1e, 0xc9, 0xb1, 0xca, 0xdc, 0xe5, 0x56, 0xb0, 0x7e, 0x94, 0x3f, 0x61, 0x9a, 0x7, 0x3f, 0xae, 0xc0, 0x3, 0xec, 0xfa, 0x65, 0x7d, 0x7c, 0x0, 0x86, 0x63, 0x1f, 0x41, 0x90, 0x9b, 0xfd, 0xda, 0xae, 0x9, 0x5, 0x49, 0x48, 0x93, 0x42, 0x25, 0xa3}, - output224: []byte{0xd6, 0x20, 0x41, 0x96, 0x40, 0x8a, 0xf4, 0xc7, 0x39, 0x1, 0xe8, 0xf2, 0xcb, 0xd, 0xa, 0xd2, 0x81, 0xfd, 0x60, 0x71, 0x30, 0x1c, 0x6b, 0x70, 0x46, 0xd8, 0x24, 0x7e}, - output256: []byte{0xa6, 0x3, 0x77, 0xb7, 0xdc, 0xb5, 0xe0, 0x23, 0x32, 0x85, 0xfd, 0xa3, 0xa5, 0x4e, 0x5b, 0x91, 0x11, 0x93, 0x80, 0xa8, 0x25, 0x1a, 0xf2, 0xf4, 0xc2, 0x16, 0xda, 0x33, 0x63, 0x75, 0x4e, 0x11}, - output384: []byte{0xed, 0x58, 0xeb, 0x86, 0xd5, 0x95, 0x70, 0x54, 0x7f, 0xef, 0x42, 0xbb, 0xe2, 0x46, 0x92, 0xd0, 0x67, 0x9d, 0xa7, 0x64, 0x11, 0x5d, 0xf8, 0x98, 0x74, 0xf3, 0x7f, 0xf0, 0xe0, 0xd4, 0x7b, 0xed, 0x71, 0x82, 0x56, 0xe0, 0x92, 0x6c, 0x85, 0xd0, 0x62, 0xed, 0x73, 0x50, 0x47, 0x4c, 0xb8, 0xf1}, - output512: []byte{0xee, 0xf3, 0x1f, 0x98, 0x11, 0xd7, 0x80, 0xb1, 0xa6, 0xf0, 0xed, 0xfc, 0x47, 0x63, 0x52, 0x80, 0x1e, 0x90, 0x84, 0xfc, 0xa3, 0xec, 0x4b, 0xb2, 0xbe, 0xf8, 0x22, 0xdf, 0xd, 0x95, 0x80, 0xa6, 0x98, 0xd3, 0x6c, 0x57, 0xd9, 0xd2, 0xd6, 0x66, 0x6d, 0x8b, 0xfc, 0xa, 0xae, 0x48, 0x59, 0x31, 0x59, 0x8, 0xd7, 0x55, 0xf6, 0x16, 0x7f, 0xd8, 0x6d, 0x46, 0x4d, 0xb0, 0xbd, 0x84, 0x87, 0x2f}}, - testcase{ - msg: []byte{0x93, 0xb7, 0x16, 0x1e, 0x99, 0xfd, 0xee, 0x38, 0x71, 0x33, 0x76, 0xa6, 0x9f, 0xc4, 0xbc, 0xcc, 0x66, 0xc0, 0x92, 0xcf, 0x4a, 0xc5, 0xb7, 0x1c, 0x35, 0x0, 0x89, 0x25, 0x3c, 0xd1, 0x7e, 0x7d, 0xb2, 0x8a, 0x41, 0x49, 0xa, 0x35, 0x42, 0x21, 0x1, 0x79, 0x95, 0xab, 0xba, 0xec, 0xb6, 0x7a, 0x2a, 0x98, 0x9d, 0x81, 0x98, 0x4f, 0x34, 0xd0, 0x21, 0xff, 0xf3, 0x64, 0xe8, 0xd1, 0x8f, 0xa5, 0x8e, 0xf3, 0xdf, 0x9, 0x7, 0x26, 0xde, 0x78, 0x20, 0xf5, 0x98, 0xde, 0x62, 0x5f, 0x90, 0xf1, 0x0, 0x7, 0xf6, 0x2c, 0x9, 0xf3, 0xe7, 0x9e, 0xb2, 0x1e, 0x84, 0x7d, 0x28, 0xa8, 0x86, 0x9e, 0xb2, 0x17, 0x30, 0xc, 0xb4, 0x1, 0x4a, 0xa8, 0x3d, 0x7d, 0x7a, 0xc6, 0xdb, 0xb9, 0xac, 0xb1, 0xe1, 0x9a, 0x2b, 0xc7, 0x62, 0x91, 0x52, 0x7c, 0x57, 0x1e, 0xf5, 0x93, 0xb5, 0x9, 0xaa, 0xb4, 0x54, 0xf2, 0xb, 0xdc, 0xa4, 0xab, 0xcd, 0x33, 0x7b, 0x50, 0x87, 0xba, 0x30, 0xbf, 0x4a, 0x87, 0xa9, 0x36, 0xf4, 0x0, 0xa1, 0x3d, 0x4c, 0x45, 0x5e, 0x60, 0x14, 0x65, 0x96, 0x57, 0x7c, 0x30, 0x9f, 0xf2, 0x5c, 0x22, 0x48, 0x9d, 0x3d, 0x51, 0xa4, 0xbf, 0x1c, 0xea, 0xc5, 0xb8, 0xe2, 0xa, 0x70, 0xc5, 0x41, 0x92, 0x2b, 0x78, 0xee, 0xd7, 0xf2, 0xc3, 0xc2, 0xde, 0x68, 0x9, 0xd4, 0x74, 0x23, 0x7f, 0xf6, 0xb9, 0x22, 0x1b, 0x6a, 0x20, 0xcc, 0x70, 0x46, 0xbd, 0x7a, 0x29, 0x2a, 0x4a, 0x7e, 0x1a, 0xdb, 0x16, 0xb2, 0x1d, 0xa6, 0x81, 0x24, 0x22, 0xf0, 0xa2, 0x93, 0x24, 0x94, 0xda, 0xd, 0xa8, 0xea, 0xfc, 0x50, 0x26, 0xe, 0xdc, 0xe6, 0x1d, 0x50, 0x6f, 0xf, 0x9d, 0xec, 0xe6, 0x24, 0xe9, 0xb5, 0xc6, 0xec, 0x55, 0x59, 0x63, 0xd5, 0xf6, 0x5b, 0xf5, 0xf9, 0x78, 0xe4, 0x41, 0x95, 0x5b, 0x2, 0x76, 0xf1, 0x56, 0x20, 0x2c, 0x67, 0xab, 0xab, 0x3e, 0xa7, 0x90, 0x13, 0x42, 0x8d, 0xdf, 0xd8, 0x80, 0xd8, 0x61, 0xdf, 0x4e, 0x7a, 0x1b, 0xff, 0xce, 0xe6, 0x19, 0xd0, 0x4c, 0x8, 0x63, 0xb2, 0xd6, 0x75, 0xde, 0x97, 0x64, 0x2b, 0x44, 0xfe, 0x71, 0x14, 0xc8, 0x45, 0xb5, 0x1e, 0x57, 0x30, 0x6b, 0x2d, 0x0, 0x72, 0xda, 0xda, 0x86, 0x73, 0xc0, 0xc0, 0x56, 0xec, 0xaf, 0x4b, 0x48, 0x66, 0x53, 0xa6, 0xdc, 0xc0, 0xf, 0x33, 0x7f, 0x1a, 0xca, 0xb6, 0xb9, 0xb2, 0xd6, 0x65, 0xb1, 0xa5, 0xbf, 0xee, 0x45, 0xa7, 0x54, 0x71, 0x1d, 0x45, 0xc9, 0xac, 0x63, 0x36, 0x6c, 0x15, 0x14, 0x3f, 0x89, 0xa5, 0xd3, 0x2d, 0xe0, 0x3c, 0x24, 0x4c, 0xcf, 0x83, 0x1c, 0x95, 0xa9, 0x7d, 0x44, 0xc2, 0xba, 0xef, 0x5c, 0x90, 0xd8, 0x75, 0x2e, 0x2c, 0xac, 0xcc, 0x11, 0x31, 0x6e, 0x1b, 0x78, 0xe0, 0xf1, 0xc4, 0xb5, 0xb0, 0xa4, 0x38, 0x71, 0xc7, 0x84, 0xcf, 0x5d, 0x97, 0x70, 0x58, 0xef, 0x4c, 0xca, 0x6, 0x17, 0x2d, 0x60, 0x81, 0x99, 0x69, 0x63, 0xf3, 0xda, 0x12, 0x70, 0x76, 0x49, 0x33, 0x22, 0xd9, 0xbf, 0x39, 0x58, 0xf, 0x9, 0x6a, 0x44, 0x16, 0x9c, 0x9a, 0x93, 0xdd, 0x7c, 0x84, 0xa6, 0xaa, 0xf1, 0x5, 0x27, 0xd, 0xb3, 0x87, 0x99, 0xc, 0xa1, 0xbe, 0x0, 0x94, 0xbb, 0x28, 0xad, 0x74, 0x1d, 0xcb, 0x42, 0x95, 0xb1, 0x6a, 0xf1, 0x8c, 0x97, 0xe1, 0x5a, 0x61, 0xae, 0xc1, 0x2e, 0x10, 0x8d, 0x61, 0xd5, 0xf2, 0x72, 0x15, 0xdc, 0x24, 0xdf, 0xa8, 0xb0, 0x9c, 0xe5, 0xe3, 0x5f, 0x61, 0xb2, 0x30, 0x96, 0x17, 0x27, 0xed, 0xdb, 0xb9, 0x7, 0xf6, 0x9e, 0xa3, 0x98, 0x8e, 0xa9, 0x5f, 0x73, 0x29, 0x9e, 0x4f, 0x3c, 0xba, 0xb4, 0xa6, 0x50, 0x6f, 0xb, 0x4e, 0x8, 0x3e, 0xda, 0x4a, 0x24, 0xa7, 0xc3, 0x9, 0xd4, 0x78, 0x5a, 0xa1, 0xf2, 0xb1, 0xd6, 0x3b, 0xb, 0x2, 0x1e, 0x3d, 0x72, 0x27, 0xaf, 0xbb, 0x66, 0x62, 0xc3, 0xe6, 0x15, 0x86, 0xcb, 0xe8, 0xac, 0xa2, 0x27, 0xc6, 0x1b, 0xd3, 0x4e, 0xf7, 0xb7, 0x34, 0x6f, 0x1e, 0x99, 0xda, 0x95, 0x88, 0xde, 0xb4, 0x9b, 0xba, 0x8a, 0x83, 0x9a, 0x7d, 0x4c, 0xfb, 0xa9, 0xcf, 0x43, 0xa7, 0xb2, 0xee, 0x85, 0xa9, 0x7e, 0x37, 0x54, 0xeb, 0x9d, 0x1c, 0x73, 0x9, 0xba, 0x8f, 0xca, 0xdd, 0x45, 0x64, 0x1a, 0xca, 0x4a, 0xe0, 0x61, 0x2a, 0x9a, 0xc6, 0x87, 0x2c, 0xce, 0x7b, 0x6e, 0xc5, 0x49, 0x3c, 0xcb, 0x45, 0x59, 0x30, 0x17, 0xe6, 0xf9, 0x18, 0x49, 0x3b, 0x68, 0x82, 0xba, 0x66, 0xfe, 0x8f, 0x96, 0xda, 0x93, 0xd7, 0x1c, 0xe4, 0xc4, 0x35, 0xe4, 0x5, 0xc4, 0x4f, 0x4b, 0x67, 0xde, 0xc0, 0xf8, 0x96, 0xda, 0x96, 0x1f, 0x7b, 0xed, 0x78, 0x49, 0x58, 0xf, 0x3c, 0x88, 0xdd, 0x15, 0x6e, 0xb8, 0xe3, 0x1e, 0x7e, 0x32, 0x5c, 0xab, 0xc1, 0xbc, 0x4f, 0x58, 0xe8, 0x3b, 0xcf, 0x8e, 0x62, 0x4, 0xda, 0xd7, 0x58, 0x53, 0x78, 0x8f, 0x12, 0x1d, 0x91, 0x61, 0x42, 0x7a, 0x43, 0x5b, 0x6, 0xf0, 0x85, 0x7, 0x25, 0x89, 0x31, 0xfd, 0x7c, 0x36, 0xd3, 0x9b, 0x48, 0x68, 0xdc, 0x57, 0x5a, 0x70, 0x6, 0x21, 0x68, 0x20, 0x3d, 0x8b, 0xdd, 0x60, 0x67, 0xb4, 0x58, 0xeb, 0x25, 0xaa, 0x5e, 0xc8, 0xaa, 0xbb, 0xf9, 0xb1, 0x19, 0x8d, 0xf0, 0xae, 0xcf, 0xcd, 0xa2, 0x6, 0xde, 0xe2, 0xdc, 0x4e, 0xe5, 0x72, 0x16, 0x80, 0xca, 0x36, 0x44, 0x64, 0xa9, 0xe7, 0xed, 0xd2, 0x96, 0x8, 0xa3, 0xc6, 0xa2, 0x67, 0x7a, 0x64, 0x92, 0xa5, 0x49, 0x44, 0x6e, 0x53, 0x4e, 0x9a, 0x66, 0xc9, 0x9b, 0x46, 0x9f, 0x5d, 0xcc, 0x14, 0xd9, 0x14, 0x8e, 0x28, 0xb, 0x39, 0xfe, 0xf7, 0x7a, 0xfc, 0x6d, 0x97, 0xa4, 0x8f, 0x19, 0x45, 0x44, 0xa2, 0x85, 0xdb, 0xf1, 0xb1, 0xd4, 0xda, 0xbe, 0x9e, 0x12, 0xe, 0x77, 0x77, 0x4a, 0xd5, 0x5, 0xda, 0x8, 0x34, 0xe5, 0x5d, 0x3e, 0x76, 0xfe, 0xb4, 0xf6, 0x17, 0x79, 0xb8, 0x6b, 0x88, 0x3d, 0x6b, 0x39, 0x0, 0xb9, 0xda, 0x38, 0xf3, 0xbc, 0x92, 0xe0, 0x36, 0x43, 0xe7, 0xe0, 0xc7, 0x16, 0x2b, 0x79, 0xfc, 0x62, 0x47, 0xc3, 0xf8, 0x87, 0xe9, 0xc4, 0xf7, 0x63, 0xb1, 0xf5, 0x44, 0x50, 0x4f, 0xe1, 0xc2, 0xd4, 0xa9, 0x5b, 0xe2, 0x15, 0x8a, 0x31, 0xfb, 0xb5, 0x15, 0x43, 0x1b, 0xe2, 0xb9, 0x54, 0x27, 0x5c, 0x70, 0x6f, 0x3a, 0x3e, 0xd2, 0xb6, 0xa6, 0xa9, 0x70, 0x59, 0x60, 0xc8, 0x68, 0x27, 0x1d, 0xf, 0x3f, 0xe5, 0x2d, 0x71, 0x1b, 0xf3, 0x77, 0x74, 0x6f, 0x28, 0xf7, 0xbc, 0x1f, 0xee, 0xd6, 0xbf, 0x7d, 0xf6, 0x4a, 0xbb, 0x5c, 0x61, 0xe3, 0xde, 0xe6, 0xdd, 0xab, 0x1f, 0xfa, 0x93, 0x8e, 0xe2, 0x1e, 0xa4, 0x5c, 0xea, 0xec, 0x5f, 0x6, 0x4f, 0x84, 0x36, 0x94, 0x2b, 0xb4, 0x89, 0x52, 0xe3, 0x70, 0xc3, 0x5a, 0x4d, 0xcf, 0xa8, 0xd7, 0x3d, 0x9c, 0x75, 0xad, 0xf8, 0xf3, 0xaf, 0x1d, 0x6f, 0xb9, 0x86, 0x27, 0x25, 0x8d, 0x96, 0xa6, 0x3a, 0x39, 0x8d, 0x90, 0xfd, 0xaa, 0x7f, 0x5c, 0x77, 0x9d, 0xc8, 0xfd, 0x97, 0x33, 0xe4, 0x32, 0xac, 0x54, 0x2b, 0xdd, 0x39, 0x95, 0xe5, 0xac, 0x33, 0x5e, 0xe3, 0x3, 0x17, 0xa4, 0xd, 0x2, 0xfd, 0xc3, 0x47, 0x20, 0xb8, 0x4f, 0x25, 0x34, 0x71, 0x65, 0x4a, 0x70, 0x97, 0x52, 0xd9, 0xed, 0x2e, 0xa3, 0xdb, 0x8, 0x9a, 0x5, 0xa5, 0x79, 0xa9, 0x29, 0x9d, 0xf1, 0xf4, 0xfe, 0x63, 0x78, 0xc, 0xbc, 0xee, 0xce, 0x5e, 0x21, 0xb2, 0x36, 0x36, 0x8e, 0xac, 0x70, 0x16, 0x89, 0xb, 0x53, 0x3b, 0xf9, 0x4b, 0xe, 0xe, 0xab, 0xd, 0x74, 0xd9, 0xbc, 0x9c, 0xb2, 0x9, 0x84, 0x5, 0x3, 0xb2, 0x37, 0x82, 0x1d, 0x3, 0xb7, 0x1b, 0xc9, 0x22, 0xfb, 0x4b, 0x74, 0x44, 0x1c, 0xb8, 0xee, 0xa8, 0x45, 0xd6, 0x70, 0x35, 0x25, 0x6, 0x53, 0x95, 0xb6, 0xa7, 0x2d, 0x47, 0xf9, 0x1, 0xd0, 0x52, 0x66, 0x24, 0x65, 0xc4, 0x8c, 0x11, 0x0, 0xc8, 0x8a, 0xa, 0x6, 0x79, 0x9b, 0x40, 0x76, 0xb0, 0x77, 0x4, 0xd6, 0x56, 0x75, 0xfc, 0x3b, 0x52, 0xf1, 0xd0, 0xfd, 0x99, 0xe4, 0x70, 0xb3, 0x20, 0x9c, 0x6a, 0x90, 0x94, 0x9a, 0xde, 0x31, 0xae, 0xb6, 0x27, 0x2e, 0x94, 0xfb, 0x53, 0x39, 0x8f, 0xf, 0x28, 0x91, 0x58, 0xfb, 0xbd, 0xae, 0xcb, 0x5c, 0xfe, 0xde, 0x54, 0x9d, 0x1b, 0xab, 0xd7, 0xe3, 0x4a, 0x3b, 0xa9, 0x93, 0x93, 0x31, 0xff, 0x19, 0xa5, 0xcc, 0xdd, 0x53, 0xbb, 0x38, 0xd8, 0x9a, 0x5b, 0x92, 0x55, 0xc0, 0x5, 0x1b, 0x73, 0x92, 0xed, 0x7, 0xb0, 0xd7, 0x55, 0xe0, 0x4b, 0x51, 0x79, 0x34, 0xdc, 0x3f, 0xb6, 0xbf, 0xb9, 0x33, 0x11, 0x98, 0xed, 0x28, 0x5b, 0x40, 0xa4, 0xb4, 0x38, 0x8b, 0xa2, 0xe7, 0xc0, 0x2, 0xc4, 0x7a, 0x37, 0xc0, 0xb6, 0x8b, 0xfd, 0xd7, 0x2b, 0x61, 0x77, 0xd, 0xae, 0xc3, 0x9a, 0x9a, 0x1, 0x39, 0x1d, 0x83, 0x9b, 0x84, 0xaf, 0x6b, 0x71, 0x7, 0x1c, 0xef, 0xe6, 0x66, 0xc, 0x58, 0x53, 0x72, 0xb3, 0xc6, 0xf9, 0xf7, 0x35, 0x53, 0x6e, 0xd0, 0xdf, 0xda, 0x55, 0xf5, 0xf3, 0x52, 0x76, 0x8f, 0x71, 0x6c, 0x4f, 0x6d, 0x41, 0x21, 0x39, 0xa4, 0x7b, 0x43, 0x4, 0xe5, 0xfd, 0xda, 0x71, 0x4c, 0x5e, 0x14, 0xf1, 0x61, 0x87, 0xb9, 0xd8, 0xac, 0xe5, 0x3f, 0x6d, 0x3d, 0xd2, 0x22, 0x98, 0x5f, 0x8b, 0xc1, 0x4e, 0xea, 0xbc, 0x1b, 0xa8, 0xef, 0x7e, 0xb, 0x68, 0x53, 0x5d, 0xc5, 0xb, 0xc2, 0xe0, 0x32, 0x29, 0x42, 0xfd, 0xf1, 0x23, 0x3e, 0xf9, 0xcf, 0x4d, 0xbe, 0xbe, 0x20, 0x5f, 0xc5, 0xe4, 0x60, 0x48, 0x89, 0xbc, 0xa0, 0xf9, 0x53, 0x81, 0xc1, 0x1b, 0xad, 0xc6, 0xa3, 0xff, 0xc7, 0x1d, 0x7b, 0x28, 0xf0, 0x60, 0x3e, 0xc7, 0x20, 0xe7, 0xf8, 0xfb, 0x60, 0xed, 0x46, 0x3e, 0x72, 0xde, 0x15, 0x9a, 0xf0, 0xd4, 0x96, 0x18, 0xe3, 0xdf, 0x16, 0xaf, 0xe2, 0x72, 0xdd, 0x62, 0x81, 0x6, 0xe3, 0xfe, 0x4d, 0xd1, 0x98, 0xc6, 0x85, 0xb6, 0x48, 0x70, 0x60, 0xec, 0xbb, 0xe, 0x69, 0xdf, 0x99, 0x5e, 0xa9, 0x7e, 0x37, 0xa7, 0x97, 0x89, 0xf1, 0x47, 0xfc, 0x3, 0x2b, 0x39, 0x98, 0x89, 0x4, 0x56, 0x23, 0x82, 0x14, 0x73, 0xfd, 0x4d, 0x6c, 0xdb, 0x45, 0x4c, 0x7b, 0x46, 0x8d, 0x26, 0xef, 0xbe, 0xa0, 0xda, 0x4b, 0xba, 0x85, 0xd9, 0x93, 0x66, 0x65, 0x60, 0xe1, 0xfa, 0xf8, 0xc0, 0x9c, 0x2e, 0xc3, 0x3e, 0xdb, 0x37, 0x92, 0x45, 0xd8, 0xa5, 0xd2, 0x61, 0xba, 0xa6, 0xa, 0x6f, 0x36, 0x7a, 0x51, 0x7c, 0x2e, 0xa1, 0xcd, 0xf8, 0x77, 0xae, 0x26, 0x41, 0xed, 0x22, 0xbb, 0x3c, 0x8a, 0x5, 0xa7, 0xfe, 0x28, 0x76, 0x32, 0xc8, 0x52, 0x30, 0xa4, 0x1c, 0x44, 0xd9, 0x66, 0x3d, 0x30, 0x8, 0xdf, 0x8e, 0x89, 0x7e, 0x13, 0x97, 0xe, 0x3f, 0x1, 0x3a, 0xb2, 0xf5, 0x9a, 0x7a, 0xae, 0x3b, 0xc5, 0xd, 0x28, 0x15, 0x2e, 0x84, 0xef, 0x60, 0x7b, 0x1f, 0x19, 0x8, 0x81, 0x2f, 0xdd, 0xd, 0xa3, 0x28, 0x5d, 0x98, 0x2d, 0xd7, 0xc2, 0x1c, 0x76, 0x73, 0xf9, 0x3a, 0x32, 0x40, 0xcd, 0x1, 0xac, 0xc8, 0x8f, 0x6d, 0x70, 0xb9, 0x58, 0xf8, 0x9f, 0xc4, 0x68, 0x55, 0xb, 0x6d, 0xde, 0xbe, 0x8f, 0x3b, 0xc2, 0xe5, 0xc1, 0x6f, 0xa9, 0xe3, 0x27, 0x46, 0x68, 0xc3, 0xc5, 0x48, 0x84, 0x41, 0x2a, 0x55, 0xdd, 0x1e, 0xb3, 0xe8, 0x1a, 0xb8, 0x18, 0x69, 0x6a, 0x76, 0x24, 0x70, 0x5b, 0xf5, 0x15, 0xe6, 0xb1, 0xef, 0xb1, 0xd5, 0xcd, 0x50, 0x4b, 0x6a, 0x73, 0x3b, 0xc7, 0x46, 0x66, 0x1c, 0x5a, 0xb8, 0xc, 0xa5, 0xd9, 0xf5, 0x69, 0x4b, 0x4e, 0x1d, 0xd6, 0x64, 0xc4, 0x19, 0x52, 0xbc, 0x18, 0x35, 0xe2, 0x30, 0x87, 0xa6, 0x1c, 0x5, 0xb, 0x32, 0x8d, 0xe9, 0xcc, 0xbf, 0xc8, 0x8b, 0xff, 0xc, 0xa6, 0x4f, 0xbf, 0xf0, 0x92, 0xea, 0x7e, 0x61, 0xef, 0x4a, 0x61, 0x23, 0x2a, 0xd3, 0x3, 0x78, 0x5, 0x3c, 0xc5, 0x9c, 0xe7, 0x7c, 0x6b, 0xd2, 0x62, 0xad, 0x8, 0x3, 0x42, 0xa4, 0x57, 0x8e, 0x4e, 0xc2, 0x1d, 0x33, 0x8c, 0x71, 0x7c, 0x56, 0x71, 0x6, 0x48, 0x2d, 0x11, 0x1, 0xeb, 0xc3, 0x6, 0x69, 0x91, 0x2d, 0x6b, 0x1f, 0xd3, 0xd1, 0xa2, 0xd1, 0x30, 0x2d, 0x94, 0xbb, 0x8f, 0x44, 0x22, 0x96, 0xc0, 0xa6, 0x37, 0x7a, 0x90, 0xbd, 0x6c, 0xf6, 0x27, 0xb7, 0x92, 0x3b, 0xe4, 0x91, 0x6f, 0x74, 0x42, 0x55, 0x9b, 0x29, 0x64, 0xa7, 0xc, 0xe3, 0xb7, 0xf1, 0x8a, 0x3, 0x2d, 0xc0, 0xdd, 0x8f, 0x4c, 0x25, 0x3, 0xd6, 0x0, 0x7f, 0xf7, 0xfb, 0xfb, 0x45, 0xf2, 0xf4, 0xcb, 0x61, 0xef, 0xa7, 0x9c, 0x74, 0xb3, 0x1, 0xbd, 0x7c, 0x67, 0x4d, 0x8c, 0xd5, 0xaf, 0xa3, 0x80, 0x2, 0x74, 0x4d, 0x56, 0x69, 0xd8, 0xf5, 0x2f, 0x67, 0xa8, 0x78, 0x33, 0x63, 0xb0, 0x15, 0x9, 0x25, 0x87, 0xdb, 0x9e, 0xc4, 0xf2, 0x53, 0x29, 0x38, 0x2d, 0x42, 0x6a, 0xb9, 0xca, 0x27, 0x31, 0xc8, 0xc2, 0xbe, 0xd2, 0x42, 0xe0, 0xd7, 0x36, 0xf1, 0x8d, 0x68, 0xba, 0x90, 0x6d, 0x5e, 0xfc, 0xf8, 0x84, 0x5b, 0xca, 0x9e, 0x0, 0x62, 0x12, 0xc7, 0x89, 0x35, 0x5a, 0xbd, 0x40, 0x3, 0x3d, 0x32, 0xbe, 0xf4, 0xe, 0x43, 0x12, 0x3d, 0xa1, 0xb5, 0x60, 0xd1, 0x9b, 0xe7, 0xb2, 0xbe, 0xde, 0xb3, 0x16, 0x5a, 0x27, 0xfa, 0xf5, 0xad, 0x3c, 0x8f, 0x8a, 0x6c, 0xbf, 0x1b, 0x2c, 0xd3, 0x85, 0xf6, 0x24, 0xe5, 0x2f, 0x7e, 0x6, 0x35, 0xd6, 0xf2, 0x3, 0xb0, 0x4f, 0xaa, 0xc9, 0x60, 0x4a, 0x44, 0x21, 0x9c, 0x96, 0x3c, 0x90, 0x2b, 0x20, 0x5d, 0x34, 0x49, 0xe9, 0x44, 0x52, 0x23, 0xe9, 0x49, 0x4f, 0xd4, 0xf6, 0xbc, 0x2c, 0xb3, 0xea, 0xdb, 0xd7, 0x69, 0xc3, 0xf, 0xc3, 0x9f, 0x62, 0xdf, 0xb, 0x45, 0x41, 0xfc, 0xed, 0x20, 0xf9, 0x6d, 0xde, 0x44, 0x20, 0x18, 0x8c, 0x80, 0x8d, 0xa3, 0x6d, 0x7f, 0x25, 0x2d, 0x8d, 0x15, 0xd2, 0xcb, 0xfd, 0xd9, 0xd1, 0x46, 0xa2, 0xc3, 0xc9, 0xeb, 0xdf, 0x4e, 0x7f, 0x16, 0xa3, 0xce, 0x9d, 0x7e, 0xbb, 0xec, 0xf6, 0xe3, 0x4f, 0x36, 0xad, 0x52, 0xfb, 0xd7, 0xa4, 0xa9, 0xa, 0x70, 0x83, 0x80, 0xd8, 0xc9, 0xaf, 0x17, 0xc1, 0x42, 0x2, 0x47, 0xe, 0x61, 0x96, 0x2a, 0xe1, 0x30, 0x57, 0x89, 0xe4, 0xda, 0xce, 0x5, 0x21, 0x88, 0x36, 0xcc, 0xe5, 0x67, 0x15, 0x3c, 0x85, 0x9, 0x79, 0x6d, 0xe7, 0xf6, 0xc5, 0x9c, 0x61, 0x84, 0x3f, 0x31, 0xad, 0xca, 0x2, 0xb0, 0xac, 0x14, 0x83, 0x22, 0x4b, 0x67, 0x5d, 0xd3, 0x12, 0x3c, 0xe7, 0x20, 0xfb, 0xfc, 0xdf, 0x6f, 0x10, 0xe3, 0xc2, 0xd, 0x53, 0x43, 0xf6, 0x3b, 0xd2, 0xd9, 0x5c, 0x4f, 0xea, 0xe8, 0x9, 0xb2, 0xa2, 0xd7, 0xe3, 0x5, 0x1, 0xe8, 0x36, 0x1a, 0x1a, 0x3b, 0xdd, 0x4a, 0xca, 0x1, 0xe9, 0xd1, 0x9, 0x69, 0xc0, 0x73, 0x55, 0x13, 0x36, 0x80, 0xdf, 0x2f, 0xce, 0x12, 0x2e, 0x43, 0x95, 0xa3, 0x69, 0x2a, 0x97, 0x2f, 0xdb, 0x4a, 0xa1, 0xed, 0xa5, 0x98, 0x75, 0x39, 0xb1, 0x93, 0x59, 0xc4, 0x59, 0xc2, 0x7a, 0xbe, 0xe0, 0xc0, 0xbd, 0xfa, 0xa7, 0xa3, 0x77, 0x6b, 0x41, 0x14, 0x7c, 0x61, 0xbc, 0x38, 0x91, 0x6b, 0x74, 0xcb, 0xc6, 0xdc, 0xca, 0x58, 0x7d, 0xa2, 0xcd, 0xd6, 0x73, 0x2c, 0x7b, 0xf1, 0x35, 0x5c, 0xf1, 0x82, 0xcd, 0x2f, 0xa3, 0x31, 0x7f, 0x8d, 0xc4, 0x91, 0x23, 0x44, 0x25, 0x29, 0xe9, 0xd0, 0x4, 0x26, 0x33, 0xae, 0x5d, 0xd6, 0x67, 0x24, 0x8e, 0xfb, 0x1d, 0x85, 0xd6, 0x35, 0x1a, 0x62, 0x59, 0x75, 0x43, 0x3b, 0x6d, 0x51, 0xf7, 0xb7, 0xc, 0xad, 0xab, 0x21, 0x5b, 0xcb, 0xea, 0xa4, 0xcc, 0x5a, 0xbd, 0x33, 0x71, 0x56, 0x81, 0x9, 0xdd, 0x1f, 0x7a, 0x83, 0x39, 0xee, 0xbc, 0x1d, 0x11, 0xe3, 0xa7, 0x72, 0x80, 0xbc, 0x44, 0x5b, 0x3f, 0xff, 0x98, 0x4a, 0x53, 0xaa, 0x3d, 0xc3, 0xc9, 0x6b, 0xe7, 0x5a, 0xb2, 0x6b, 0xb4, 0xc1, 0x3d, 0xa4, 0x96, 0xf, 0x7c, 0xeb, 0x17, 0xef, 0x36, 0x44, 0x31, 0x49, 0xe0, 0xf, 0xe7, 0x4, 0x1a, 0x83, 0xbe, 0x6d, 0xba, 0xb7, 0x1a, 0x62, 0x7e, 0x13, 0x68, 0xfe, 0xbb, 0xf, 0x98, 0xf7, 0x10, 0xd5, 0x60, 0x98, 0x6d, 0x5a, 0x89, 0x6f, 0xb9, 0x12, 0x5b, 0xcc, 0x19, 0xd3, 0x97, 0x66, 0x1a, 0x10, 0xd2, 0x7a, 0x65, 0xbc, 0xae, 0xd9, 0x5c, 0xfc, 0x3a, 0x31, 0xf9, 0x17, 0xca, 0x93, 0x95, 0xcd, 0xc2, 0x5c, 0x17, 0xaa, 0x3e, 0x1a, 0xc0, 0xd7, 0x4, 0x3b, 0x41, 0xd4, 0x99, 0x57, 0xfc, 0x93, 0x23, 0x7e, 0xf2, 0x2e, 0xa, 0xe7, 0x79, 0x1b, 0xdd, 0x30, 0x36, 0x9a, 0xf5, 0xca, 0xf6, 0x72, 0xc4, 0x32, 0x3e, 0xea, 0xf5, 0x33, 0x60, 0x34, 0x1d, 0x4, 0x6b, 0x69, 0x74, 0x3b, 0xf7, 0xd8, 0xc3, 0x4d, 0xe2, 0x79, 0x13, 0x21, 0x37, 0x25, 0x90, 0xb7, 0x24, 0xb0, 0x2, 0x79, 0x57, 0x5c, 0xb4, 0x4f, 0x41, 0xa5, 0xfd, 0x66, 0x18, 0x68, 0xa7, 0xf7, 0xf7, 0xa4, 0xe0, 0x35, 0xe9, 0xc3, 0xa2, 0x88, 0x9a, 0x58, 0x6, 0x3c, 0x65, 0xcc, 0x41, 0xfa, 0xcc, 0x1e, 0x57, 0x6d, 0x32, 0xbc, 0x2, 0x70, 0x46, 0x10, 0xa9, 0xc1, 0x5e, 0xd0, 0xf4, 0x5d, 0xd4, 0xf3, 0x65, 0xfb, 0x81, 0x57, 0xff, 0x8, 0xe7, 0xcb, 0xe7, 0x58, 0x5e, 0x31, 0x45, 0x81, 0x75, 0xb, 0x56, 0x94, 0xcf, 0xb3, 0x82, 0xfa, 0x16, 0x34, 0xe, 0xe7, 0x35, 0xf, 0x24, 0xe, 0x27, 0x7e, 0xeb, 0x71, 0xe4, 0xcc, 0xe7, 0xcc, 0x9d, 0xf5, 0x8d, 0xed, 0xc7, 0x69, 0x61, 0x20, 0xaa, 0x77, 0xfd, 0x8e, 0x6b, 0xfa, 0xe7, 0x58, 0xca, 0xdb, 0xfd, 0x97, 0xed, 0x29, 0xf8, 0xf0, 0xe6, 0x2f, 0x4b, 0x14, 0x2f, 0x1c, 0xbd, 0x43, 0xc8, 0xf9, 0xf4, 0xeb, 0xab, 0x25, 0xb0, 0x35, 0x9f, 0x9b, 0xa0, 0x2e, 0x37, 0x1a, 0x25, 0xf9, 0x57, 0x3f, 0x1c, 0x77, 0x3f, 0x86, 0xe5, 0x3d, 0x75, 0x48, 0xd4, 0x9f, 0x19, 0xf, 0xb7, 0xbf, 0x31, 0xfc, 0x72, 0x6a, 0xa5, 0x9e, 0x89, 0xd3, 0x10, 0x39, 0x32, 0x2e, 0xe5, 0x3e, 0x20, 0x3b, 0x47, 0x6f, 0x5f, 0x32, 0xd6, 0x8c, 0x2b, 0xeb, 0x6e, 0xc3, 0x8d, 0xd9, 0x90, 0x14, 0x34, 0xb8, 0x77, 0x40, 0x8d, 0xbb, 0xe8, 0xb3, 0xa8, 0x8c, 0x2e, 0xd7, 0xf9, 0x44, 0x5c, 0xf2, 0xae, 0x9, 0x1c, 0x85, 0xe4, 0x27, 0x3f, 0xf, 0xb7, 0x74, 0x5b, 0xc6, 0x93, 0x64, 0x8f, 0xba, 0xe3, 0xa4, 0xc7, 0x67, 0x26, 0xe9, 0x5f, 0x20, 0xa7, 0xfe, 0x1e, 0xdd, 0x8e, 0x43, 0xbf, 0x8c, 0xbc, 0x12, 0x37, 0x9a, 0x7c, 0xc6, 0x40, 0xd4, 0x85, 0xbd, 0xd4, 0x74, 0x73, 0x99, 0xba, 0x5c, 0x20, 0x6e, 0x1d, 0x22, 0x4c, 0xed, 0xc9, 0x56, 0x17, 0xbc, 0xc2, 0x4, 0xcb, 0xf8, 0xc2, 0xdb, 0xe, 0x2c, 0x4f, 0x26, 0x96, 0x44, 0xe3, 0xcc, 0xfc, 0x3d, 0x43, 0xa8, 0x96, 0xb4, 0x73, 0xa1, 0xe1, 0xbe, 0xa1, 0x55, 0xcd, 0xb2, 0x2, 0x3, 0x6e, 0x57, 0x49, 0xc1, 0x1c, 0x98, 0x1f, 0xd8, 0xf, 0xe0, 0xe, 0x8e, 0xa8, 0x5a, 0xe0, 0x4a, 0x94, 0x50, 0x8, 0x91, 0xae, 0x66, 0xf, 0x9, 0x65, 0x5a, 0xb9, 0x61, 0xc, 0xb5, 0x1c, 0x7e, 0x80, 0xf2, 0xa7, 0xe6, 0x38, 0xb2, 0x69, 0x67, 0x2a, 0x98, 0x26, 0x6f, 0x9a, 0x35, 0x8d, 0x51, 0xf9, 0x37, 0xe5, 0xfc, 0x7e, 0x9b, 0xf5, 0xd8, 0x9a, 0xfe, 0x8f, 0x5a, 0xeb, 0xc9, 0x37, 0x50, 0xf6, 0xc1, 0xc5, 0xf5, 0xfa, 0xb8, 0x0, 0xa1, 0x71, 0x1, 0xfe, 0x7a, 0xd6, 0xe8, 0x5b, 0x4b, 0xb7, 0x9e, 0x7, 0x41, 0xaf, 0xf6, 0x41, 0x8e, 0xd4, 0xb6, 0xc9, 0xc2, 0x77, 0x27, 0x4, 0xfa, 0xad, 0xf6, 0x95, 0x1f, 0x17, 0xcd, 0x76, 0xf5, 0x18, 0xbc, 0x9e, 0x7a, 0x77, 0xff, 0xee, 0xe4, 0x74, 0x8d, 0x80, 0x43, 0xd3, 0x96, 0x99, 0xa4, 0x63, 0x58, 0x58, 0xb, 0x63, 0x9f, 0x93, 0x62, 0xea, 0x1a, 0xcc, 0x62, 0x79, 0x59, 0xf, 0x9b, 0x69, 0x1c, 0xe1, 0x7d, 0xb4, 0xac, 0x83, 0x5d, 0x98, 0x74, 0x71, 0xb, 0xc3, 0xbc, 0xf0, 0xc1, 0x8d, 0xb6, 0xb4, 0x8b, 0x62, 0x54, 0x95, 0x31, 0xc1, 0x36, 0xab, 0xb, 0x8d, 0x75, 0x6b, 0x8, 0xf9, 0xbc, 0x36, 0xaa, 0x13, 0x12, 0x55, 0x69, 0x37, 0xd, 0xff, 0xcc, 0x6c, 0x80, 0xe6, 0xf6, 0x38, 0x8d, 0x1f, 0x46, 0x5e, 0x3, 0x95, 0xe1, 0x44, 0xff, 0xd7, 0xa7, 0xf7, 0xce, 0x8, 0x1a, 0xd9, 0x9c, 0x59, 0xd8, 0x94, 0x40, 0x17, 0x1a, 0x9e, 0x8c, 0xd6, 0x6, 0xbf, 0xcd, 0x17, 0x56, 0x7f, 0xf3, 0xfe, 0x63, 0xbe, 0x15, 0x79, 0x4e, 0xc3, 0xb5, 0x51, 0xe4, 0x2a, 0x22, 0x86, 0xff, 0xfe, 0xaf, 0x49, 0xd9, 0x9, 0x6e, 0x63, 0xb7, 0x5b, 0x1f, 0x75, 0x0, 0x3f, 0xfe, 0x4, 0x47, 0x55, 0x20, 0xb6, 0x40, 0xe7, 0x7e, 0x8d, 0x87, 0x38, 0xe1, 0x55, 0xc4, 0x57, 0xac, 0x62, 0xde, 0xce, 0xe0, 0x8a, 0xbd, 0x4a, 0xf3, 0x48, 0x40, 0x23, 0x95, 0xbb, 0x6d, 0x57, 0x9d, 0x7b, 0x84, 0xe, 0xeb, 0x95, 0xe1, 0x86, 0xce, 0x20, 0x6c, 0x1a, 0x85, 0x27, 0xa, 0x9e, 0x54, 0x18, 0x76, 0xbb, 0x10, 0xd5, 0x60, 0xc3, 0xae, 0x4a, 0xe, 0x5e, 0x9b, 0xab, 0xb8, 0xb8, 0x84, 0x1e, 0xa3, 0x63, 0xef, 0x8e, 0xe4, 0x3, 0xb3, 0x2, 0x49, 0xe, 0x5c, 0xf5, 0x13, 0x79, 0x6a, 0xe5, 0x9, 0x2c, 0x7c, 0x98, 0x81, 0xa6, 0x50, 0x64, 0xfc, 0x13, 0xb7, 0x3a, 0x47, 0x56, 0xb8, 0x86, 0xb8, 0xf0, 0x16, 0xcf, 0x1d, 0x99, 0x76, 0x86, 0x19, 0x9a, 0xc2, 0x4a, 0x21, 0x71, 0x9a, 0xb2, 0x93, 0xba, 0x22, 0x7e, 0x61, 0xee, 0x8b, 0xd6, 0xa, 0x37, 0x38, 0x4b, 0x55, 0x68, 0x45, 0x54, 0x2, 0x66, 0x5a, 0xf1, 0x1d, 0x3d, 0x5d, 0x3f, 0xf9, 0x41, 0xc1, 0xfe, 0x17, 0xcf, 0x49, 0x6, 0x91, 0xbb, 0xdd, 0x74, 0xa2, 0x5, 0xef, 0x6e, 0x4e, 0x10, 0xaf, 0xd3, 0x57, 0xf5, 0x54, 0x6d, 0xeb, 0x18, 0x54, 0x22, 0x88, 0x25, 0x35, 0xce, 0xf8, 0x8a, 0x1c, 0x8a, 0x74, 0xbd, 0xc7, 0xdd, 0x72, 0x2a, 0x9b, 0xd9, 0xdb, 0x55, 0xb8, 0xc, 0x2f, 0x6c, 0xf1, 0x1a, 0xc6, 0xe3, 0x81, 0x16, 0x4b, 0x6f, 0xba, 0x41, 0xec, 0xbb, 0x33, 0xaf, 0x31, 0x27, 0x8a, 0x19, 0xd6, 0xf2, 0x1, 0x4, 0xd0, 0x40, 0x11, 0xc2, 0xa2, 0x28, 0x7d, 0x75, 0x97, 0xdb, 0xda, 0x5f, 0xaf, 0xdf, 0x63, 0x58, 0x4e, 0xdc, 0x37, 0x39, 0x67, 0x4f, 0x2b, 0xdb, 0xc9, 0x1, 0x2e, 0xb, 0x77, 0x41, 0xf4, 0xc8, 0x84, 0xca, 0x74, 0x2f, 0x7d, 0x5c, 0xeb, 0xb5, 0x94, 0xad, 0x7f, 0x55, 0x82, 0x6e, 0xe8, 0x5e, 0x3c, 0x6, 0xcc, 0x77, 0x68, 0x6c, 0xbc, 0xda, 0x8, 0x0, 0xfb, 0x4b, 0x8, 0x56, 0x9d, 0x1d, 0x8f, 0x39, 0x6b, 0xfc, 0xa7, 0xcf, 0x61, 0xff, 0xbd, 0x39, 0x11, 0xb4, 0x44, 0xe1, 0xc6, 0x3}, - output224: []byte{0x1a, 0x32, 0xe, 0xa5, 0xd2, 0xc3, 0xb7, 0x20, 0x9f, 0xe9, 0xaa, 0x5, 0x34, 0xc, 0xa2, 0x8e, 0x51, 0x4e, 0x18, 0x90, 0x80, 0x64, 0x6, 0xc5, 0x76, 0x81, 0xe4, 0x20}, - output256: []byte{0xa9, 0x32, 0x87, 0x95, 0x2d, 0xbf, 0x85, 0x98, 0xd6, 0x9d, 0x81, 0x77, 0x70, 0x55, 0x83, 0x30, 0xc5, 0xda, 0xe8, 0x7c, 0x12, 0x68, 0x82, 0x48, 0xe7, 0x0, 0x31, 0x4e, 0xe7, 0x89, 0x62, 0x8b}, - output384: []byte{0xa3, 0x32, 0x9b, 0xa, 0xb3, 0x58, 0xf0, 0x10, 0xce, 0xad, 0x13, 0x6f, 0xa0, 0x76, 0x7c, 0x84, 0xc9, 0x62, 0x4f, 0xa2, 0xa6, 0xde, 0x47, 0xf, 0x23, 0xda, 0x87, 0x32, 0xfe, 0x65, 0x63, 0x9f, 0x71, 0xb1, 0xdd, 0x47, 0x63, 0x3f, 0x9, 0xae, 0x86, 0x34, 0x9e, 0x97, 0x7e, 0x4d, 0xe8, 0x4}, - output512: []byte{0xb5, 0xbd, 0xb3, 0xfa, 0xd8, 0xb5, 0xb8, 0x9e, 0xd4, 0x7d, 0xb1, 0x48, 0x9e, 0x19, 0xe2, 0x7b, 0x84, 0x6d, 0xcc, 0x9d, 0x96, 0x5d, 0x32, 0x54, 0x3e, 0x94, 0xa5, 0x30, 0x51, 0x49, 0x9e, 0xee, 0xfe, 0x88, 0xcd, 0x12, 0x3c, 0x58, 0xd5, 0xee, 0x25, 0x81, 0x12, 0xd3, 0xec, 0x7f, 0x44, 0x34, 0x19, 0x99, 0x76, 0x23, 0x7f, 0x69, 0x97, 0x1f, 0x69, 0xba, 0x8a, 0xda, 0x7d, 0x8d, 0x3d, 0xa7}}, - testcase{ - msg: []byte{0x85, 0x8e, 0xf3, 0x4c, 0x28, 0xb8, 0x93, 0x9b, 0xfb, 0x46, 0x44, 0xd1, 0xe4, 0x58, 0xa6, 0x7a, 0x3, 0x4b, 0x9a, 0xf9, 0xf8, 0x2d, 0xb7, 0x86, 0x89, 0x2d, 0x81, 0xc3, 0x43, 0xd2, 0x7b, 0x96, 0xee, 0x49, 0xcf, 0xfb, 0xf2, 0xc3, 0x41, 0x9e, 0xb1, 0x1e, 0xfa, 0xeb, 0x9f, 0x8d, 0x4, 0x10, 0xb0, 0xeb, 0x68, 0x81, 0x56, 0x65, 0x4a, 0x8e, 0x32, 0xee, 0x2a, 0x57, 0xc, 0x5a, 0x88, 0x0, 0x76, 0x56, 0xa1, 0x83, 0x80, 0xdf, 0x33, 0xf7, 0x75, 0x6a, 0x60, 0x4, 0x76, 0x6a, 0x6b, 0x96, 0xbb, 0x27, 0xa7, 0x41, 0x5, 0x7a, 0x7a, 0xe, 0x22, 0xd7, 0x32, 0xd7, 0x97, 0xc4, 0x88, 0xeb, 0x61, 0x3f, 0x17, 0x9d, 0xc3, 0xf1, 0x9, 0x4b, 0x2b, 0x5c, 0x8e, 0x5a, 0x34, 0xbd, 0x57, 0xf2, 0x6d, 0xe8, 0x5e, 0x23, 0x4f, 0xd8, 0x94, 0xa2, 0xd2, 0x76, 0xe8, 0xf3, 0x1d, 0xf, 0x7f, 0x23, 0xe5, 0x70, 0xa0, 0xa4, 0xe1, 0x3b, 0xdb, 0x63, 0x5c, 0xc8, 0x89, 0x72, 0x82, 0xa1, 0xae, 0x0, 0xcb, 0xc, 0x8f, 0x4, 0x12, 0x4e, 0xdc, 0x6e, 0xde, 0x14, 0x4, 0x27, 0x2f, 0x1b, 0xfd, 0xf5, 0x5a, 0xb2, 0xa0, 0xb3, 0xd5, 0xb3, 0x53, 0x4a, 0x4c, 0x1, 0xcb, 0xe, 0x1d, 0x57, 0x50, 0xee, 0x71, 0x32, 0x8f, 0xe3, 0xda, 0xcc, 0xe5, 0x42, 0x3, 0x44, 0x10, 0x89, 0x96, 0xb6, 0xde, 0x1a, 0x44, 0x38, 0x34, 0xb6, 0xba, 0xdf, 0xe6, 0x16, 0x53, 0x4e, 0xaa, 0xea, 0x32, 0x68, 0x1d, 0x57, 0xa2, 0xe4, 0x1c, 0x77, 0x17, 0x3d, 0x6d, 0xc0, 0x75, 0x1d, 0xa2, 0x6a, 0x17, 0x73, 0x1b, 0x1, 0x83, 0x3a, 0xd0, 0xb9, 0xc4, 0xd3, 0xb4, 0x8b, 0xa2, 0x37, 0x73, 0xaa, 0x6d, 0x2b, 0xb7, 0x2, 0x93, 0x77, 0xf4, 0x53, 0x48, 0x4a, 0x44, 0xe6, 0x73, 0x4a, 0x3a, 0xcb, 0x37, 0x25, 0xff, 0xba, 0x5, 0x47, 0xf1, 0x4, 0x5f, 0x18, 0xba, 0xcb, 0x1e, 0x9c, 0x9c, 0x80, 0x17, 0x59, 0xb9, 0xa1, 0x62, 0x9, 0xf0, 0x15, 0x8a, 0x4e, 0x8f, 0x21, 0xcc, 0xa9, 0x11, 0x2f, 0xde, 0x82, 0x38, 0x8c, 0xf1, 0xfe, 0x58, 0xad, 0xfa, 0x1f, 0x68, 0x4c, 0x31, 0x58, 0x93, 0x5e, 0xdf, 0x93, 0x88, 0xb4, 0x2a, 0xc0, 0xe5, 0xb3, 0xb6, 0x8e, 0x6e, 0x6a, 0x4d, 0x44, 0x76, 0xc4, 0xea, 0xc7, 0x8f, 0x16, 0x6e, 0xc5, 0xfa, 0x46, 0x4b, 0x56, 0x5d, 0x48, 0x1f, 0x57, 0xa9, 0xd2, 0x63, 0xba, 0xb7, 0xa1, 0xfe, 0xd0, 0x5d, 0x73, 0x79, 0x74, 0xc4, 0xf7, 0xbd, 0xaf, 0x2c, 0xe5, 0xba, 0x40, 0xb2, 0xa9, 0x93, 0xe8, 0x67, 0xe5, 0x84, 0x4c, 0x77, 0x50, 0x1, 0x4e, 0x66, 0xbc, 0xc5, 0xbb, 0xf5, 0xe5, 0x0, 0x40, 0x25, 0x29, 0xdd, 0xab, 0xf1, 0xea, 0x2e, 0x39, 0x5d, 0xb0, 0x84, 0xc4, 0xbb, 0x85, 0x76, 0x6f, 0xda, 0x99, 0x3b, 0x54, 0x77, 0x88, 0xfc, 0xef, 0x35, 0x38, 0x1f, 0xb1, 0x6a, 0xf0, 0x96, 0x5a, 0x8, 0xee, 0x5c, 0xbb, 0x4d, 0x68, 0xc9, 0x34, 0x78, 0x55, 0x94, 0xb3, 0x7f, 0x78, 0xe7, 0x6a, 0x65, 0x58, 0xae, 0xe7, 0x3e, 0x57, 0xe, 0x40, 0xcc, 0xc8, 0x89, 0xb0, 0xd5, 0x26, 0x97, 0x56, 0xbc, 0x40, 0x89, 0x7e, 0xc0, 0xc2, 0xd6, 0xc3, 0x3a, 0x33, 0xb1, 0x89, 0x7a, 0xef, 0x29, 0x7f, 0x37, 0x7c, 0xb5, 0x8a, 0x7a, 0x1a, 0x38, 0x9e, 0xa6, 0xf, 0x4b, 0x5f, 0x25, 0xd1, 0x30, 0x5d, 0x4, 0x6e, 0x48, 0xd5, 0xbf, 0xb1, 0x8, 0x3a, 0x82, 0xc5, 0xae, 0xed, 0x9, 0x20, 0x8f, 0xf8, 0x30, 0x76, 0x36, 0x71, 0x56, 0xb9, 0x7, 0x1b, 0xea, 0xb5, 0xaa, 0x12, 0xd9, 0xdc, 0xa9, 0xf8, 0xaa, 0x9, 0x38, 0x72, 0xc4, 0xc9, 0x5b, 0x84, 0xcd, 0xbb, 0xb, 0x84, 0xab, 0xbb, 0x3, 0xf3, 0x3b, 0x63, 0xa7, 0xc6, 0x3, 0xd7, 0x23, 0xdd, 0x99, 0x70, 0x52, 0x45, 0x48, 0xe6, 0x1f, 0x38, 0x4, 0xb7, 0xa9, 0x14, 0x85, 0x2a, 0xe5, 0x5d, 0x37, 0x7e, 0x25, 0xa8, 0x43, 0x1b, 0x1e, 0x7c, 0xe7, 0x8f, 0x12, 0x94, 0x66, 0x49, 0x25, 0xd6, 0x2b, 0x7d, 0x8c, 0xa3, 0xc8, 0x80, 0xc4, 0xac, 0x80, 0xe9, 0x2f, 0x8e, 0x86, 0x55, 0x4b, 0xca, 0xfc, 0xd3, 0x9c, 0xa4, 0x4c, 0xac, 0x1, 0x7f, 0x4c, 0x45, 0x50, 0xbe, 0x11, 0x9e, 0xbd, 0xec, 0x7a, 0xee, 0xcc, 0xd5, 0x27, 0xef, 0xb4, 0x78, 0x34, 0x84, 0x25, 0xfc, 0x36, 0x68, 0x14, 0x16, 0x7, 0xd1, 0x4d, 0xfa, 0xc9, 0x4, 0x51, 0xb2, 0x99, 0x6d, 0xd4, 0x6b, 0x23, 0x68, 0x32, 0x10, 0x91, 0x6b, 0x90, 0xe6, 0x3e, 0xa2, 0xa4, 0xa0, 0x6, 0xbf, 0x72, 0xc4, 0xdb, 0xb6, 0xab, 0xf3, 0xd0, 0x50, 0x53, 0x79, 0xc5, 0xb3, 0x60, 0x96, 0x6a, 0x25, 0x47, 0x1e, 0x65, 0x8e, 0xe2, 0x4c, 0xab, 0xce, 0xbb, 0x5c, 0x6e, 0xd5, 0xf8, 0xdc, 0xcc, 0x84, 0x61, 0x4d, 0x64, 0xbc, 0xa5, 0x4f, 0x35, 0x18, 0x9f, 0x57, 0x9c, 0x17, 0xf, 0x2a, 0x2b, 0x77, 0x3a, 0xad, 0xfc, 0xf3, 0xc1, 0xc4, 0x35, 0x88, 0x5d, 0xa, 0xde, 0x71, 0x21, 0xa4, 0xd2, 0xfc, 0xc9, 0x6a, 0xfa, 0x88, 0xdf, 0x6e, 0xa2, 0xc5, 0x19, 0xa9, 0x8a, 0xb2, 0x79, 0xe9, 0xf7, 0x54, 0x0, 0xab, 0x5, 0x3d, 0x45, 0x7e, 0xd3, 0xff, 0x95, 0x7c, 0x20, 0xf2, 0x82, 0xbd, 0x12, 0x1e, 0xf6, 0x7f, 0x53, 0x5, 0x3f, 0xb4, 0x96, 0x3d, 0x8, 0xf7, 0xe, 0xb2, 0x87, 0xe0, 0x11, 0xdf, 0xd0, 0x15, 0xcf, 0xe4, 0x92, 0xad, 0xcb, 0x92, 0x7b, 0xb8, 0x0, 0x93, 0x54, 0x50, 0x14, 0x73, 0x6a, 0x12, 0xe2, 0x36, 0x56, 0x9e, 0xcc, 0x34, 0x53, 0x35, 0xa, 0x5e, 0x57, 0xd5, 0xb, 0x1b, 0xbc, 0xa5, 0xc8, 0xa0, 0x1a, 0x94, 0x62, 0x48, 0x37, 0xc, 0xde, 0x61, 0x77, 0xd7, 0xb8, 0xc8, 0x4f, 0x11, 0xea, 0xba, 0xb0, 0xc3, 0xa5, 0xce, 0x65, 0x4f, 0xf8, 0x57, 0x83, 0xee, 0x8e, 0xef, 0xea, 0xb5, 0x84, 0x51, 0xce, 0x73, 0xe1, 0x64, 0xa9, 0xdf, 0x47, 0xdc, 0xdc, 0x9e, 0xd2, 0x4b, 0xf, 0x7a, 0x87, 0xe0, 0xec, 0xd1, 0xa3, 0xdd, 0x15, 0xe6, 0xd6, 0x56, 0xb8, 0x94, 0x5f, 0x9, 0x64, 0x92, 0xec, 0x72, 0xc0, 0xb5, 0x1d, 0x13, 0x61, 0x3b, 0x31, 0x34, 0xc3, 0xe3, 0x1c, 0xd1, 0xa3, 0x9, 0x3b, 0x80, 0x23, 0x64, 0x9c, 0x1b, 0x3a, 0x3e, 0xe8, 0xa0, 0x9e, 0x5a, 0x8d, 0x61, 0x2a, 0x91, 0xb4, 0xb1, 0x46, 0x46, 0xe2, 0x2d, 0x57, 0x5c, 0xc0, 0x93, 0x48, 0xa5, 0xa5, 0x8e, 0xf, 0x9b, 0x64, 0x10, 0x37, 0xd7, 0xb6, 0x3d, 0x32, 0xb4, 0xe, 0xa5, 0xfc, 0x16, 0xc5, 0x5a, 0x8, 0x75, 0xf3, 0xe6, 0x4f, 0x25, 0xca, 0x97, 0xf2, 0xa7, 0xd, 0xa0, 0xf4, 0x56, 0x7c, 0x96, 0x26, 0x3, 0xb, 0x5b, 0x84, 0x63, 0xd8, 0xa5, 0x5c, 0x34, 0x66, 0x54, 0x81, 0xf2, 0xfc, 0x30, 0x8d, 0x2b, 0x87, 0x11, 0x1d, 0x23, 0xb1, 0xb6, 0xca, 0x96, 0x1, 0x3f, 0xf0, 0x33, 0xb2, 0x32, 0x16, 0xc2, 0x7c, 0x9d, 0x2e, 0x12, 0x22, 0xde, 0xe2, 0x5b, 0x29, 0x5e, 0x18, 0xc, 0xb6, 0xeb, 0x9b, 0xbf, 0x72, 0xf5, 0x9a, 0xec, 0x7, 0xa, 0xc8, 0x9, 0xa7, 0x9b, 0x33, 0x6, 0xe0, 0xbd, 0xb7, 0x1, 0x52, 0x1d, 0x4d, 0xe1, 0xd7, 0x55, 0xf7, 0x5e, 0xea, 0xd5, 0xd7, 0x9a, 0x72, 0xdc, 0xa5, 0x5b, 0x6e, 0x25, 0xfd, 0x10, 0xc4, 0xec, 0x68, 0xbc, 0x5c, 0x58, 0x5a, 0xa1, 0xc3, 0x92, 0xda, 0x26, 0xbe, 0x5d, 0xcb, 0x75, 0xcf, 0x2f, 0xf4, 0xb3, 0x1c, 0x3c, 0x57, 0x8f, 0x97, 0x8, 0x19, 0x1f, 0x59, 0xd0, 0x4c, 0x2e, 0x0, 0xab, 0xea, 0xbc, 0x6b, 0x21, 0x7d, 0x89, 0xba, 0x9b, 0xcd, 0xc, 0xbe, 0x76, 0xe7, 0x2e, 0x31, 0x6a, 0x4c, 0x7f, 0x18, 0xaf, 0x64, 0x2d, 0x9f, 0xaf, 0x3e, 0x76, 0xa6, 0xe4, 0xf4, 0xf5, 0xe8, 0xe, 0x12, 0x52, 0xe5, 0x2f, 0x99, 0x6d, 0xde, 0xa2, 0x79, 0xba, 0xe6, 0xd8, 0x8e, 0xf8, 0x66, 0xae, 0x6f, 0x3d, 0x77, 0xe0, 0xe1, 0x5, 0x11, 0x1d, 0x4, 0xd4, 0x14, 0x5f, 0x9, 0x69, 0x19, 0x25, 0xce, 0xfc, 0x2a, 0x8d, 0xf9, 0x6f, 0xd, 0x34, 0xa, 0xc8, 0x6c, 0xb, 0x48, 0xef, 0x5d, 0x18, 0xec, 0x1d, 0xf5, 0x97, 0x48, 0xbf, 0x5f, 0x26, 0x15, 0x80, 0xac, 0xdc, 0x4f, 0x58, 0xcd, 0xd2, 0xc2, 0x64, 0x9e, 0x4b, 0x35, 0x78, 0x72, 0xdd, 0x98, 0x2d, 0x9f, 0xcb, 0x59, 0x91, 0x60, 0x37, 0xa8, 0x24, 0x7c, 0x6e, 0x37, 0x4f, 0xc, 0xea, 0x92, 0x4a, 0x25, 0xed, 0x9a, 0xb, 0x5d, 0xc1, 0x5d, 0xa9, 0xae, 0xec, 0xa8, 0xa9, 0xa9, 0xde, 0x98, 0x11, 0xe1, 0xdc, 0xc4, 0xf0, 0x53, 0x57, 0x86, 0x78, 0x71, 0xb9, 0x59, 0xac, 0x9e, 0x1d, 0x3c, 0x4a, 0xa2, 0x63, 0x3c, 0x94, 0x45, 0xaa, 0x22, 0x39, 0xd0, 0x2e, 0x9e, 0x5c, 0x7d, 0x22, 0xfe, 0xba, 0x47, 0xe7, 0xa0, 0x33, 0x2f, 0x2, 0x5e, 0x83, 0xda, 0x6, 0xea, 0xa8, 0x2f, 0x30, 0xad, 0xbf, 0xc8, 0xe1, 0x16, 0x73, 0x91, 0xc6, 0xf3, 0xfa, 0x82, 0xb8, 0x78, 0x57, 0xde, 0xec, 0x2f, 0x39, 0xd0, 0x8d, 0x4a, 0xa3, 0xba, 0x59, 0xe1, 0x59, 0x8b, 0x54, 0xd6, 0x65, 0xba, 0x68, 0x43, 0x8f, 0xc7, 0x49, 0x3b, 0x35, 0x1a, 0xb5, 0x4b, 0x90, 0x7a, 0x80, 0x94, 0x5f, 0xed, 0xa0, 0xed, 0x5a, 0xba, 0xc5, 0x75, 0x84, 0x18, 0x2e, 0x40, 0xcd, 0x4c, 0x8b, 0x48, 0xf6, 0x19, 0x87, 0xa0, 0x7a, 0xe6, 0xff, 0x61, 0x96, 0xe5, 0x43, 0x53, 0x24, 0xb3, 0x54, 0x6f, 0x77, 0x12, 0xbf, 0x45, 0x3a, 0x1f, 0x31, 0xca, 0xc5, 0x77, 0x8f, 0x94, 0x64, 0x7b, 0x65, 0x6d, 0xcb, 0x4f, 0xdd, 0x8b, 0x58, 0xad, 0x36, 0x45, 0xfa, 0x1d, 0x54, 0xfa, 0x7d, 0x8e, 0xa1, 0xb6, 0x27, 0xf6, 0x5d, 0x68, 0xd4, 0xb, 0x92, 0x56, 0x77, 0x8b, 0x46, 0x95, 0xc, 0xc2, 0xd1, 0xe4, 0xc3, 0x31, 0x3d, 0x54, 0x21, 0x5, 0xa3, 0x47, 0x6a, 0x7a, 0xe2, 0xe5, 0x18, 0x77, 0x25, 0x4b, 0xd7, 0x56, 0xe7, 0xfb, 0x55, 0xa5, 0x55, 0x26, 0xa3, 0x2b, 0x78, 0xc9, 0x5a, 0xbd, 0x16, 0x9d, 0xa1, 0x92, 0x9c, 0xb3, 0xa1, 0xa0, 0x98, 0xd2, 0x46, 0xf0, 0x29, 0xaf, 0x5d, 0xcd, 0xb, 0xed, 0x45, 0x46, 0xb2, 0x55, 0x9a, 0x6a, 0x47, 0x39, 0x39, 0x6c, 0x2e, 0x22, 0x2c, 0x77, 0xcc, 0x4d, 0x3a, 0xb4, 0x72, 0x62, 0xcb, 0xe3, 0x63, 0x46, 0x5c, 0xcb, 0x32, 0x23, 0x45, 0x2a, 0x35, 0xb9, 0x1c, 0x15, 0xd4, 0xf2, 0x82, 0x2f, 0xd7, 0x5a, 0x91, 0xa1, 0x91, 0xed, 0xb, 0x19, 0xef, 0xd, 0x46, 0x89, 0xa2, 0xf7, 0x93, 0xd3, 0x16, 0x7, 0xdd, 0xfa, 0xb5, 0xfe, 0x2, 0x92, 0xeb, 0x31, 0x26, 0xc6, 0x72, 0x9b, 0x37, 0xbd, 0xf4, 0xee, 0xf8, 0x8, 0xa1, 0xa7, 0x15, 0x98, 0x2b, 0xeb, 0x2f, 0x9d, 0x6a, 0xd6, 0x57, 0x1d, 0x23, 0x46, 0xac, 0x4c, 0xc7, 0x53, 0x74, 0xb4, 0x64, 0x1a, 0x2b, 0xe6, 0x21, 0x40, 0xdc, 0xef, 0x6a, 0x10, 0x5e, 0xb3, 0xaa, 0x59, 0x32, 0x7, 0xde, 0x59, 0x5c, 0x43, 0x9c, 0x8e, 0x94, 0xe8, 0x59, 0x6f, 0x8d, 0x99, 0x56, 0x90, 0x81, 0x3b, 0x89, 0x7f, 0x15, 0x6, 0x70, 0x37, 0x4d, 0xfd, 0x9b, 0xa0, 0x58, 0x8c, 0x7a, 0xb7, 0x60, 0x39, 0x58, 0x56, 0x5b, 0xc3, 0x1c, 0x27, 0x4e, 0xd4, 0x2d, 0xa1, 0xba, 0x94, 0x37, 0x2e, 0xbe, 0xb, 0x4f, 0x8, 0x61, 0x1d, 0xfe, 0x26, 0x12, 0x7e, 0x7d, 0x5, 0xaf, 0xf7, 0xb9, 0xde, 0x63, 0xb3, 0x60, 0xb8, 0xc3, 0xe7, 0x9b, 0x0, 0x57, 0xf9, 0x2b, 0x40, 0x34, 0x8c, 0x4a, 0x6c, 0xf8, 0xc2, 0x38, 0xbd, 0xd3, 0x3c, 0x20, 0x49, 0x26, 0xc3, 0x42, 0x17, 0xd, 0x9c, 0x15, 0xdc, 0x3d, 0x69, 0xc7, 0xe6, 0x1f, 0x2a, 0x94, 0x80, 0x7a, 0x4b, 0x84, 0xd0, 0x4d, 0xf5, 0x99, 0x41, 0x1c, 0x11, 0xde, 0xeb, 0xea, 0xc2, 0x43, 0x68, 0x1f, 0xde, 0xc8, 0xbe, 0x38, 0x2e, 0xee, 0xad, 0xed, 0xf6, 0x1f, 0x72, 0x86, 0x46, 0xfd, 0xf9, 0xa4, 0x21, 0xea, 0x23, 0x1f, 0xbb, 0xde, 0x66, 0x13, 0xde, 0x7a, 0x4f, 0x7b, 0xda, 0x12, 0x5a, 0xf5, 0xdf, 0x11, 0x49, 0xac, 0xca, 0xaa, 0xbe, 0x2c, 0x2a, 0x1, 0x84, 0x1d, 0x24, 0xe1, 0x65, 0xae, 0x76, 0x80, 0x8c, 0xa9, 0xaf, 0x94, 0xef, 0xfb, 0x1c, 0xf3, 0xb1, 0xe3, 0x1c, 0x76, 0x55, 0x59, 0xae, 0xfe, 0xfd, 0xcc, 0xe1, 0x22, 0xbd, 0xfe, 0x56, 0x7e, 0x67, 0xc9, 0x70, 0xe6, 0xb4, 0xb, 0x46, 0x8d, 0xa0, 0xad, 0x6b, 0x82, 0xba, 0xcc, 0xcd, 0xcb, 0x29, 0x37, 0x22, 0x45, 0xa, 0xea, 0xae, 0x80, 0x1a, 0x34, 0x2a, 0xdc, 0x7f, 0x1f, 0x44, 0x3d, 0x99, 0x35, 0xf5, 0xd4, 0x38, 0xa1, 0x63, 0x61, 0xa0, 0x87, 0x22, 0x8c, 0x2e, 0x26, 0xc1, 0x2c, 0xb5, 0x9b, 0xc9, 0x87, 0x74, 0xcb, 0xdd, 0x9b, 0x49, 0xb2, 0xa0, 0x65, 0xc8, 0xa7, 0x67, 0x33, 0x4c, 0xf1, 0x6d, 0xd2, 0x71, 0x7c, 0xf4, 0x5a, 0xc, 0x8e, 0xde, 0x97, 0xb4, 0xf4, 0xfa, 0xf9, 0x9a, 0xcb, 0x1, 0x3b, 0x5e, 0x0, 0x79, 0xf2, 0xb3, 0xa6, 0xa2, 0xcb, 0x82, 0xb6, 0x11, 0xdc, 0x78, 0x18, 0x22, 0x1a, 0x67, 0x9c, 0x0, 0x73, 0x77, 0xed, 0xbb, 0x9f, 0xd0, 0xa2, 0x0, 0xb, 0x32, 0xc6, 0xa1, 0x7e, 0x1b, 0xb, 0xe9, 0xb9, 0x12, 0x8, 0xed, 0xd3, 0xe4, 0x17, 0xe6, 0x31, 0xc2, 0xe6, 0xd2, 0x3d, 0xfa, 0x76, 0x3f, 0xd7, 0x92, 0x97, 0x2f, 0x9a, 0x9b, 0x1c, 0x8f, 0xa4, 0x2f, 0xa, 0xf5, 0x29, 0x7e, 0xb4, 0x9b, 0x7, 0x76, 0xba, 0xb8, 0x10, 0xb6, 0x85, 0x6e, 0x1, 0x75, 0xeb, 0x1b, 0x87, 0xec, 0x83, 0xcd, 0x2c, 0xd1, 0x2e, 0x2c, 0x5c, 0x16, 0x10, 0xe1, 0xee, 0xbe, 0x9e, 0x66, 0x5a, 0x6c, 0x34, 0x67, 0xb8, 0x70, 0xa1, 0x57, 0x4e, 0x6f, 0x2c, 0xfc, 0x86, 0x56, 0x87, 0x51, 0x5d, 0x8a, 0x35, 0xf5, 0xe9, 0xd, 0x85, 0x13, 0x8c, 0x3d, 0x2c, 0x98, 0x23, 0x69, 0x6e, 0x25, 0x31, 0x7b, 0x1b, 0xa5, 0xb0, 0xbe, 0x62, 0x3f, 0xdc, 0x6c, 0xaa, 0x10, 0x41, 0x37, 0x4d, 0x39, 0x85, 0x78, 0x16, 0x7f, 0x43, 0x52, 0xf3, 0x15, 0xae, 0x9d, 0xb4, 0x25, 0x5a, 0x32, 0xee, 0x49, 0x10, 0xf2, 0x74, 0x26, 0x33, 0xd7, 0x9d, 0x5b, 0x5f, 0x10, 0x5a, 0xdb, 0x63, 0xb0, 0xa3, 0xd7, 0x76, 0x35, 0xb, 0x85, 0x74, 0x47, 0x7e, 0x57, 0x2e, 0xfd, 0xca, 0x9, 0x57, 0x44, 0x45, 0xec, 0xe8, 0xdd, 0x63, 0x82, 0xfc, 0x21, 0xd7, 0xb9, 0xd6, 0x8b, 0x3a, 0x4b, 0xfc, 0xa1, 0x58, 0xdf, 0x4a, 0x7a, 0xa4, 0xcc, 0x1c, 0xd, 0xa1, 0x1, 0x6c, 0x36, 0x4c, 0x9f, 0xdc, 0x62, 0xab, 0xc9, 0x91, 0xa3, 0x50, 0x4e, 0xab, 0xb5, 0x90, 0x80, 0x9b, 0x2d, 0x41, 0xe4, 0xd5, 0x1c, 0xcb, 0xb0, 0xe9, 0x2e, 0x87, 0x52, 0xa4, 0xc0, 0xf7, 0x2e, 0x74, 0xca, 0x7e, 0x45, 0xeb, 0x19, 0x68, 0x19, 0x1d, 0x56, 0x4d, 0x81, 0x31, 0x31, 0xdb, 0x2b, 0x32, 0x12, 0x79, 0xfe, 0x7a, 0x10, 0x4a, 0xbc, 0x6e, 0x33, 0xff, 0xac, 0xc5, 0x53, 0xd0, 0xa6, 0x2d, 0x69, 0xed, 0x3c, 0xb6, 0x77, 0x98, 0xbf, 0x8e, 0x92, 0x7d, 0x4d, 0xb0, 0x2a, 0x35, 0x33, 0x4e, 0x94, 0x66, 0x5, 0x28, 0x58, 0xe6, 0x82, 0x8e, 0xc, 0x28, 0x54, 0x8, 0x80, 0x74, 0x2e, 0xd5, 0x49, 0x23, 0xba, 0xab, 0x85, 0x92, 0x2e, 0x5, 0xe0, 0xb6, 0x6e, 0xeb, 0x40, 0x14, 0x53, 0xc8, 0x2d, 0x5b, 0x4d, 0x7f, 0xf2, 0x52, 0x97, 0xc1, 0xf9, 0xf1, 0x35, 0x8b, 0xcf, 0xeb, 0x5d, 0x52, 0x94, 0x77, 0x3d, 0xe2, 0x3, 0xd7, 0xf2, 0xff, 0x9f, 0xad, 0x19, 0xfe, 0xdc, 0xe6, 0xc1, 0x28, 0x96, 0xc1, 0xae, 0x44, 0xab, 0xe0, 0x90, 0x5e, 0xa8, 0xd, 0x24, 0xbc, 0xaa, 0xd9, 0x27, 0xaa, 0xfc, 0x6a, 0xfd, 0x48, 0xdd, 0xe5, 0x26, 0xf3, 0xdd, 0xf4, 0xe6, 0xcf, 0x94, 0xea, 0xbb, 0x9e, 0x99, 0xca, 0x68, 0x52, 0x36, 0xd, 0xf3, 0xdd, 0x2b, 0xfc, 0x79, 0x7, 0xe4, 0x2a, 0x35, 0x74, 0x4b, 0xa7, 0x20, 0xfb, 0xf, 0x36, 0x6e, 0xed, 0xaa, 0x8e, 0x86, 0xe4, 0x40, 0x59, 0xf6, 0x4b, 0x38, 0x4e, 0x29, 0x6f, 0x0, 0xac, 0xfb, 0x46, 0x94, 0x72, 0xad, 0x1, 0x23, 0x2e, 0x4a, 0x48, 0x33, 0xd1, 0x1a, 0x2c, 0xf0, 0x97, 0xc7, 0x54, 0x92, 0xe2, 0xaa, 0x1f, 0xd7, 0xe4, 0x25, 0x8, 0x21, 0x95, 0xbf, 0x43, 0xf4, 0xce, 0xf3, 0xb3, 0x47, 0x7d, 0x16, 0xb6, 0x6, 0x86, 0x6f, 0x1a, 0xa6, 0x26, 0x44, 0xf1, 0xa3, 0x11, 0x19, 0xb9, 0xbc, 0x78, 0x7e, 0xcf, 0x70, 0x68, 0x64, 0x68, 0xa9, 0x6a, 0xfc, 0xce, 0x82, 0x62, 0x5c, 0x86, 0xc, 0xeb, 0xe8, 0x2, 0xc2, 0x70, 0x60, 0x5e, 0xa0, 0x3, 0xb2, 0xb4, 0x1, 0x24, 0xe8, 0xca, 0x4e, 0xbc, 0x78, 0xa9, 0xce, 0x22, 0x6c, 0xbb, 0x3a, 0xe7, 0x4a, 0x7f, 0xc8, 0x29, 0xf5, 0x3a, 0x51, 0xd9, 0x25, 0x3, 0x8c, 0xe9, 0xa3, 0xd3, 0x68, 0x1c, 0xd5, 0xd, 0xc4, 0x63, 0xac, 0x34, 0x88, 0xc9, 0x81, 0xdb, 0xb0, 0xed, 0x6e, 0x4b, 0xe1, 0x27, 0xcd, 0x3a, 0xec, 0x47, 0x37, 0x65, 0xc2, 0xaa, 0x76, 0x26, 0x11, 0xa6, 0x41, 0x84, 0x80, 0x22, 0xe3, 0x3a, 0xe6, 0xb5, 0xa1, 0xbd, 0x57, 0xd1, 0x72, 0x21, 0xd1, 0x72, 0xa1, 0x77, 0x5a, 0xc5, 0x4d, 0xae, 0x58, 0xa1, 0xb0, 0xe2, 0x1c, 0x54, 0x85, 0x3b, 0xa5, 0x9b, 0xa4, 0x6c, 0xce, 0xc, 0x62, 0x39, 0x9a, 0x54, 0x7d, 0xe3, 0x75, 0x57, 0xff, 0x4b, 0x66, 0x94, 0xb8, 0x6f, 0xef, 0xe0, 0x62, 0xaf, 0x6e, 0xfc, 0xc1, 0x3, 0xc4, 0xa1, 0xa2, 0xbd, 0x6, 0x70, 0xe, 0x87, 0x69, 0xe4, 0xc7, 0x6, 0x41, 0x1, 0x1e, 0x54, 0x24, 0xc2, 0xa2, 0xf0, 0xa6, 0xa2, 0xc8, 0xef, 0x98, 0x97, 0x74, 0xfd, 0x59, 0xc0, 0x80, 0xe, 0xb0, 0xcb, 0x19, 0xed, 0xb5, 0x1b, 0x69, 0xe8, 0x8b, 0xf4, 0xfa, 0xea, 0x43, 0xf5, 0xc2, 0xc2, 0x81, 0x8f, 0x9b, 0x95, 0xe2, 0x7b, 0xc6, 0x8f, 0x60, 0xbf, 0xbb, 0xbc, 0xdc, 0x77, 0x8c, 0x6f, 0x6b, 0x11, 0x63, 0x33, 0xdb, 0xc1, 0x7d, 0xd3, 0x52, 0xe2, 0xe9, 0x7b, 0xfb, 0x5e, 0x33, 0xeb, 0xe9, 0xb3, 0xe5, 0x18, 0xf9, 0x3e, 0x86, 0x6, 0x7e, 0x75, 0xf0, 0x64, 0xa7, 0x14, 0xdb, 0x63, 0x4e, 0x37, 0xce, 0x71, 0xd4, 0xba, 0xd6, 0x5f, 0xe2, 0xbb, 0xf3, 0x26, 0xea, 0x27, 0x93, 0xc8, 0x7c, 0xb4, 0x45, 0x72, 0xc9, 0x65, 0xad, 0x65, 0x98, 0x31, 0x2b, 0xd9, 0x83, 0x8d, 0xfa, 0x8e, 0x1b, 0x59, 0x9c, 0xcb, 0x87, 0x1, 0xdc, 0xb3, 0x97, 0xe8, 0x46, 0x6a, 0x85, 0x24, 0xb5, 0x68, 0xe7, 0x7b, 0xe9, 0x5c, 0xb9, 0x6c, 0x79, 0xa6, 0x4d, 0xc1, 0x80, 0xa7, 0x36, 0xa6, 0xd9, 0x96, 0xee, 0xb8, 0x96, 0xdc, 0xd9, 0xd9, 0xaa, 0xa8, 0xb6, 0xa4, 0xa9, 0xae, 0xee, 0x6f, 0x21, 0x3d, 0xf1, 0xa0, 0x71, 0xf6, 0xf3, 0x9, 0xc1, 0xab, 0xad, 0x52, 0xfd, 0x47, 0x7f, 0x6f, 0x70, 0x7f, 0x87, 0x6f, 0x40, 0xeb, 0xff, 0x35, 0x30, 0x19, 0x5e, 0xc3, 0x98, 0x87, 0xe3, 0xd7, 0x64, 0x48, 0x8e, 0xc4, 0xc7, 0x61, 0x8f, 0xfb, 0xe7, 0x92, 0x65, 0xee, 0xe0, 0x8c, 0xb8, 0x9, 0xcd, 0xbd, 0xf, 0x7d, 0x38, 0xa8, 0xa2, 0xd2, 0x92, 0x82, 0x26, 0x61, 0xc2, 0x27, 0x3d, 0x82, 0x70, 0xd1, 0xe0, 0xb2, 0xbd, 0xa7, 0xdb, 0xf1, 0x36, 0x23, 0x49, 0xa9, 0x20, 0x6b, 0xa2, 0x5c, 0xd, 0xc1, 0xc6, 0x68, 0xb3, 0x9d, 0xb7, 0x72, 0x4e, 0x29, 0x5, 0x6, 0x18, 0xe4, 0x3b, 0xba, 0x5, 0xf5, 0xf, 0x20, 0x2d, 0x9a, 0x2, 0x68, 0x94, 0xeb, 0x20, 0xfe, 0xe7, 0xd6, 0xfc, 0xbb, 0x22, 0xd7, 0xde, 0x3e, 0xb8, 0x9e, 0xef, 0xf4, 0x28, 0xaa, 0xa1, 0xb3, 0xf1, 0x8a, 0x98, 0x47, 0xfd, 0x5f, 0xcf, 0xe6, 0xaf, 0xb9, 0xea, 0xd2, 0xc8, 0x64, 0xe0, 0xdb, 0x5c, 0xc, 0x75, 0x33, 0xe5, 0x74, 0xcf, 0xcb, 0xd8, 0x2f, 0x14, 0xdb, 0x20, 0xf8, 0x51, 0x97, 0x97, 0x22, 0x27, 0x7a, 0xeb, 0xe, 0xf5, 0x79, 0x80, 0x23, 0x36, 0xc9, 0xd, 0x3b, 0xe7, 0x8b, 0x47, 0xde, 0xd5, 0xc8, 0x29, 0xe8, 0x39, 0x56, 0xfc, 0x95, 0x87, 0xac, 0xd1, 0xb0, 0x15, 0x79, 0x18, 0xc4, 0xa1, 0xdb, 0x36, 0x76, 0xe4, 0x0, 0x1f, 0x6, 0x81, 0x28, 0xcd, 0x4c, 0x45, 0x11, 0x38, 0x5f, 0x4a, 0xc3, 0x9e, 0xbc, 0x68, 0x7a, 0xee, 0xe6, 0xec, 0x7d, 0x75, 0x35, 0x39, 0x10, 0x62, 0x19, 0x1f, 0x86, 0xb4, 0xa2, 0xf1, 0x81, 0x8e, 0x6d, 0x1d, 0xdb, 0xb2, 0x4e, 0x1e, 0x7c, 0xf7, 0x43, 0xe3, 0x99, 0x10, 0x6a, 0xa1, 0xc3, 0x9e, 0x52, 0xad, 0x7e, 0xc2, 0xbe, 0x7b, 0xdf, 0xb3, 0x2b, 0x54, 0xe9, 0x23, 0xd5, 0xe, 0xf8, 0xad, 0x4e, 0xbc, 0x6a, 0x80, 0xc6, 0x56, 0x14, 0xee, 0xa4, 0xaa, 0x5d, 0x7, 0xf4, 0x8f, 0xc5, 0x97, 0xa2, 0x9e, 0xe2, 0x0, 0x26, 0xde, 0xf2, 0xf3, 0x0, 0xc7, 0xd3, 0xca, 0x72, 0x7e, 0x88, 0x57, 0xa0, 0x98, 0xa0, 0xfb, 0x22, 0xf2, 0xc6, 0x75, 0x72, 0x68, 0xe3, 0x90, 0xf8, 0x39, 0xbe, 0x20, 0xd4, 0x59, 0x83, 0xa, 0x9e, 0x3d, 0xac, 0x71, 0xef, 0x41, 0x82, 0x15, 0xd9, 0xb8, 0x9b, 0xa5, 0x59, 0xa8, 0x3, 0x41, 0xe1, 0x59, 0xd, 0xc9, 0x64, 0xb8, 0xa6, 0xab, 0xa0, 0x7f, 0xaa, 0xe4, 0xa9, 0xad, 0x8e, 0x59, 0x69, 0xe9, 0x47, 0x1d, 0x53, 0xe4, 0xda, 0x76, 0x88, 0x9a, 0xf5, 0xf9, 0x92, 0x3b, 0x18, 0xbb, 0x58, 0x4d, 0x71, 0xe3, 0x2, 0x31, 0xe0, 0xeb, 0xfd, 0x9f, 0xa4, 0x89, 0x1a, 0xf3, 0x40, 0x7, 0xc1, 0x23, 0x5a, 0x9c, 0xfb, 0x2b, 0xd, 0xb0, 0xef, 0xc1, 0xa5, 0x41, 0x7c, 0xbd, 0x53, 0xf6, 0x94, 0xc6, 0xf3, 0x88, 0x2e, 0x85, 0x53, 0xa0, 0xe0, 0x1f, 0x7a, 0xe3, 0x4c, 0x24, 0x43, 0x9a, 0x97, 0xde, 0xea, 0xce, 0x8b, 0xdd, 0x2f, 0x59, 0x51, 0x5d, 0xe0, 0x76, 0x5, 0x89, 0xff, 0x62, 0x30, 0xd6, 0x2, 0xbe, 0x38, 0x93, 0xd2, 0x7e, 0x34, 0xdc, 0xec, 0xce, 0x7b, 0x8e, 0x31, 0xd, 0x87, 0x79, 0xf, 0xff, 0x49, 0xae, 0x5b, 0x53, 0xf, 0xdf, 0xdf, 0xf7, 0x1e, 0x61, 0xbe, 0x2e, 0x1b, 0x90, 0xd4, 0x20, 0x41, 0x94, 0xef, 0xd2, 0x63, 0xd1, 0xcc, 0xff, 0x45, 0x84, 0x93, 0x8c, 0x6, 0x66, 0x6b, 0xa, 0xb6, 0x75, 0xa6, 0xcc, 0x5c, 0xa0, 0xc6, 0x57, 0x88, 0x51, 0x73, 0xe, 0x28, 0x1c, 0x10, 0x7b, 0x58, 0xa2, 0x70, 0x99, 0x64, 0x75, 0x41, 0xcb, 0x2b, 0x9c, 0x46, 0x62, 0x66, 0x62, 0x45, 0x11, 0x37, 0xbe, 0x1b, 0x34, 0x43, 0x8e, 0xd8, 0x25, 0xc4, 0x56, 0x28, 0xd7, 0xdd, 0x49, 0x30, 0x37, 0x70, 0xbc, 0x33, 0x30, 0xe5, 0xe9, 0x8e, 0x9a, 0xda, 0x7a, 0x1c, 0xcb, 0x69, 0x4e, 0xe5, 0xe0, 0xb, 0x27, 0xf7, 0xa5, 0xaa, 0x0, 0xd, 0x1d, 0x9d, 0x1f, 0x76, 0x14, 0x53, 0x2b, 0xa4, 0xb8, 0xab, 0x8a, 0x92, 0x36, 0x7b, 0x69, 0x46, 0x24, 0x7b, 0x5f, 0x69, 0xf8, 0x70, 0xde, 0x10, 0x77, 0x53, 0x25, 0xc6, 0x5a, 0xde, 0x56, 0xa7, 0xd0, 0x63, 0x75, 0x73, 0x71, 0x73, 0x9e, 0x5, 0x3e, 0x97, 0x11, 0x79, 0xd2, 0xbb, 0x65, 0x17, 0xc7, 0xd9, 0xf8, 0xef, 0x37, 0xa7, 0x8d, 0xd3, 0xb9, 0xd1, 0x5c, 0x9d, 0x2f, 0x2, 0x1d, 0x4b, 0x81, 0xff, 0xe9, 0x43, 0x73, 0x53, 0xa9, 0x65, 0xd7, 0x9b, 0x82, 0x17, 0x7b, 0x67, 0x98, 0xa7, 0xe, 0xf8, 0x51, 0x1d, 0x27, 0xff, 0xf2, 0x15, 0xb7, 0x41, 0xb9}, - output224: []byte{0xaf, 0x82, 0x8b, 0x69, 0x42, 0x3d, 0x5b, 0x66, 0x7a, 0xa9, 0x2c, 0xf1, 0x65, 0x8c, 0x9a, 0x70, 0xd2, 0x3b, 0xe6, 0x4f, 0x61, 0xbc, 0xd8, 0x7, 0x82, 0xde, 0x58, 0x86}, - output256: []byte{0xc8, 0xd6, 0x55, 0x66, 0xe3, 0x46, 0xb9, 0xd8, 0xd5, 0xee, 0x75, 0xc, 0x13, 0x45, 0x7d, 0xd, 0x5b, 0x18, 0x22, 0x3b, 0x5a, 0x92, 0xe3, 0xa5, 0x42, 0x1d, 0xd1, 0x5b, 0x33, 0x49, 0xfe, 0xef}, - output384: []byte{0x74, 0xb8, 0x63, 0x43, 0xaa, 0xfc, 0x1b, 0xb0, 0x7d, 0x40, 0xbe, 0x7b, 0xfe, 0xbe, 0xcc, 0xf4, 0xba, 0x3b, 0x12, 0xdc, 0xf6, 0x81, 0xf3, 0x45, 0x8d, 0xe2, 0x8, 0x82, 0x9f, 0x70, 0x4d, 0x35, 0x12, 0xb7, 0xc6, 0xc, 0x7d, 0x21, 0x1a, 0x54, 0x9e, 0xc8, 0xc9, 0xd4, 0xf4, 0x80, 0x62, 0x57}, - output512: []byte{0xc3, 0x4, 0xb2, 0x9c, 0x9f, 0x46, 0x71, 0x87, 0xfc, 0xad, 0xa4, 0x2b, 0xc3, 0x61, 0x16, 0x58, 0x4d, 0xee, 0x21, 0x52, 0x1, 0xd2, 0xe8, 0xb7, 0xd9, 0xcf, 0x95, 0x5, 0x88, 0x82, 0x22, 0xa4, 0x43, 0xd0, 0x58, 0xf3, 0x7a, 0x7e, 0x1d, 0xda, 0x5, 0xd9, 0x1a, 0xcc, 0x35, 0x39, 0x15, 0x95, 0xb6, 0xaa, 0x7b, 0x67, 0x86, 0xe2, 0x24, 0xfe, 0xbe, 0x70, 0x59, 0x70, 0x1d, 0x99, 0x64, 0xb2}}, - testcase{ - msg: []byte{0xae, 0x82, 0xef, 0x9, 0xb7, 0x11, 0x95, 0x1f, 0x60, 0x82, 0xb1, 0xbd, 0xc5, 0xb1, 0x75, 0xc8, 0x10, 0x10, 0xe3, 0x98, 0xb8, 0xf3, 0xb1, 0x8f, 0x5a, 0xb9, 0x9f, 0x78, 0xcb, 0x53, 0xa5, 0xf9, 0x53, 0xbe, 0x9, 0xc9, 0x8b, 0xd9, 0x72, 0x37, 0x40, 0xc7, 0xa4, 0xe6, 0xd2, 0x6a, 0x64, 0xaa, 0x62, 0xc6, 0x97, 0x3f, 0x60, 0xda, 0x56, 0xe, 0x14, 0xee, 0xd6, 0x3d, 0x0, 0x1f, 0x6e, 0x28, 0x17, 0x1, 0x77, 0x3c, 0x34, 0xa4, 0x12, 0x60, 0xa2, 0xae, 0x67, 0x5d, 0xe5, 0x43, 0xf2, 0xbf, 0x2f, 0xee, 0xa4, 0xb1, 0x7e, 0xbd, 0x92, 0x8a, 0xad, 0x65, 0xa1, 0x7f, 0x7f, 0xbc, 0x4b, 0x75, 0x70, 0xfe, 0xfc, 0xa8, 0x4, 0x95, 0x6d, 0x4d, 0x93, 0x53, 0x93, 0x7c, 0x3f, 0xaa, 0x15, 0x51, 0x6c, 0x8f, 0xc1, 0x40, 0xee, 0x8f, 0x91, 0xf2, 0x71, 0x1e, 0x3a, 0xc0, 0x87, 0x9a, 0x1d, 0x3c, 0xf7, 0xaf, 0x79, 0x63, 0xcf, 0x82, 0xe0, 0x8e, 0xee, 0x5, 0xd3, 0xd9, 0x13, 0xd2, 0xb7, 0xe5, 0x68, 0xca, 0xb7, 0x65, 0x5a, 0x8b, 0xc5, 0x43, 0x61, 0x93, 0x64, 0x1d, 0x76, 0xf7, 0x44, 0x3b, 0xef, 0x83, 0xd5, 0xf4, 0x68, 0xd8, 0x4c, 0x80, 0xb8, 0xd3, 0x72, 0x50, 0xf0, 0x6b, 0x37, 0x78, 0x1e, 0xfc, 0xd, 0x88, 0x5b, 0xc7, 0x35, 0x8a, 0x2b, 0x90, 0xfd, 0xd5, 0xcb, 0xa3, 0xdf, 0xdd, 0xc, 0x57, 0xb8, 0xf6, 0x67, 0x50, 0x16, 0x75, 0x46, 0x49, 0x4e, 0x31, 0xbb, 0x75, 0x1a, 0x9e, 0x8, 0xe2, 0x9, 0x95, 0x2d, 0xc1, 0xef, 0xaa, 0x2b, 0x12, 0x10, 0xe6, 0x9d, 0x97, 0x44, 0x54, 0xef, 0x55, 0x95, 0x2e, 0x35, 0xca, 0x7f, 0x40, 0xcd, 0xe9, 0x44, 0xc6, 0x65, 0xd9, 0x58, 0x55, 0x80, 0xc7, 0xb, 0x8f, 0xcf, 0xf5, 0xbb, 0xb5, 0x63, 0x5f, 0x5d, 0x8d, 0x54, 0x93, 0x56, 0xf4, 0x8d, 0x4b, 0x5f, 0x17, 0x3c, 0x54, 0x1c, 0xfc, 0x0, 0xc3, 0xf4, 0x26, 0x95, 0x54, 0x1c, 0xb7, 0x78, 0x44, 0xf, 0x64, 0xed, 0xea, 0x6d, 0xa, 0xc8, 0xdf, 0xd3, 0x80, 0x23, 0xc7, 0xa0, 0x13, 0xfd, 0xc2, 0x8a, 0xb3, 0xc5, 0x7f, 0xad, 0x93, 0x89, 0x37, 0xcb, 0xcf, 0xbc, 0xd9, 0x41, 0xd3, 0x15, 0xe7, 0x51, 0x46, 0x54, 0x28, 0xb8, 0x22, 0x0, 0xb7, 0x5b, 0x3a, 0xec, 0x17, 0x76, 0xc1, 0x80, 0x15, 0xaa, 0x39, 0xe2, 0x5e, 0x16, 0x2a, 0xdb, 0xa, 0xe2, 0x4c, 0x19, 0x60, 0x9f, 0x36, 0x5f, 0x45, 0xbb, 0xb8, 0x19, 0xf, 0xab, 0xde, 0xbf, 0xa0, 0x42, 0x7, 0x6f, 0xcb, 0xf, 0x2c, 0xba, 0x3b, 0xf2, 0x58, 0xf6, 0xfe, 0xee, 0xbe, 0x38, 0x23, 0xbe, 0xbd, 0x9d, 0xba, 0x95, 0xcd, 0xe0, 0x36, 0x97, 0xd6, 0x72, 0x2a, 0x3a, 0x64, 0xb9, 0x26, 0x31, 0x1e, 0xc0, 0x3e, 0x6b, 0x56, 0xea, 0x4, 0x7d, 0x2f, 0x5c, 0x28, 0x73, 0xc, 0xe7, 0xb5, 0x60, 0xfd, 0xe8, 0xeb, 0xfb, 0x1b, 0xa7, 0x4a, 0xa1, 0xcd, 0x2e, 0x57, 0xa1, 0x28, 0x47, 0xbf, 0x51, 0xc, 0x9b, 0x16, 0xae, 0xf0, 0xc2, 0x5a, 0xe3, 0x97, 0xdd, 0x60, 0x22, 0xce, 0xb1, 0x90, 0x2c, 0x8e, 0xd2, 0xe2, 0x40, 0x54, 0x87, 0x5b, 0x5c, 0xc, 0x9e, 0x6b, 0xe8, 0x7e, 0x9f, 0x40, 0xc9, 0x9b, 0x85, 0xf9, 0xa, 0x47, 0x79, 0xc1, 0x9, 0x13, 0xf, 0x2, 0x36, 0xd1, 0xc1, 0x29, 0xdc, 0x29, 0x62, 0xbb, 0x57, 0x47, 0x9e, 0x65, 0xbc, 0x99, 0xd5, 0xdf, 0xb6, 0xbb, 0xc7, 0xd9, 0x6a, 0x29, 0xa, 0xdc, 0xf3, 0xae, 0x9e, 0xcc, 0xa7, 0x55, 0x87, 0xdc, 0xcb, 0x2c, 0xc3, 0x18, 0xda, 0x3a, 0x66, 0x9d, 0xa9, 0x2c, 0xe2, 0xaf, 0x33, 0x38, 0x97, 0x44, 0x8a, 0x66, 0x9f, 0x1a, 0x4c, 0x12, 0x8d, 0xa3, 0xf9, 0x64, 0xa0, 0x1a, 0xd6, 0x4e, 0x13, 0x2c, 0xd9, 0x40, 0x16, 0x5f, 0x57, 0x8, 0xb1, 0x58, 0x36, 0x23, 0xd2, 0xc, 0xc5, 0xa3, 0xad, 0x9f, 0xb8, 0x60, 0xf3, 0x42, 0xa4, 0xd4, 0x7e, 0x2c, 0xbe, 0x1c, 0x43, 0x57, 0x7c, 0x9b, 0x98, 0x34, 0x1e, 0x15, 0xb2, 0x85, 0xa2, 0x53, 0xc3, 0x2b, 0x3b, 0x0, 0xc3, 0x9f, 0x3f, 0x8f, 0x99, 0x83, 0xfb, 0xfd, 0x2d, 0x4f, 0x21, 0x7c, 0x85, 0x79, 0x60, 0xa7, 0xee, 0x6c, 0x96, 0x2c, 0x2c, 0xde, 0x25, 0x47, 0x24, 0x9f, 0xa5, 0x6f, 0x97, 0xb6, 0x85, 0x73, 0x48, 0xd8, 0xa4, 0x49, 0xce, 0x8d, 0xc8, 0x3c, 0xc9, 0x9f, 0xb, 0xfc, 0x29, 0xe2, 0x14, 0xe0, 0xa3, 0xdb, 0x6a, 0x63, 0x6b, 0xfc, 0xdf, 0xb1, 0x5a, 0x53, 0x79, 0x79, 0x56, 0x51, 0x61, 0xec, 0xdf, 0xe6, 0xa4, 0xc2, 0x9d, 0x88, 0xf4, 0xe4, 0x65, 0x66, 0xe, 0x4b, 0x4a, 0x49, 0x3b, 0x33, 0x95, 0xac, 0x96, 0x96, 0xe5, 0xbf, 0x5f, 0x4d, 0x2f, 0xc6, 0x58, 0x7e, 0x67, 0x3f, 0x8b, 0x65, 0xbe, 0xce, 0x1c, 0xa4, 0x41, 0x73, 0x82, 0xa3, 0xfe, 0x11, 0x21, 0x5c, 0x5e, 0xac, 0x59, 0x1d, 0xda, 0xb, 0xe4, 0xa9, 0xf2, 0xfe, 0xb, 0x1b, 0x18, 0x32, 0x52, 0x80, 0x24, 0x1b, 0xf7, 0xdf, 0xc6, 0x21, 0x90, 0x1a, 0xe, 0x9f, 0x4c, 0xd4, 0x71, 0x40, 0x10, 0x64, 0xfa, 0xb7, 0x33, 0x73, 0xbe, 0xd, 0x80, 0xf, 0xe1, 0xca, 0x29, 0x6b, 0x27, 0x20, 0xd, 0xe5, 0x15, 0x8c, 0x17, 0xe6, 0x42, 0x16, 0xf0, 0x1e, 0xb1, 0x6e, 0x58, 0xb9, 0xc9, 0xdd, 0x51, 0x83, 0x71, 0x1, 0x44, 0x75, 0x58, 0xdc, 0xd0, 0x7c, 0x7b, 0x78, 0x2b, 0x60, 0x16, 0x31, 0x3c, 0xbd, 0xfa, 0x95, 0xc0, 0x7b, 0x9c, 0x2d, 0xd2, 0x5d, 0xfb, 0x36, 0x45, 0xd8, 0xf2, 0x2c, 0x3d, 0xee, 0x68, 0xb1, 0xa4, 0x3c, 0xba, 0x11, 0x4e, 0xd2, 0x7a, 0x6f, 0x3e, 0x55, 0xcd, 0xdc, 0x7f, 0xa8, 0x56, 0xfb, 0xd0, 0x7d, 0xdb, 0x72, 0xf5, 0x40, 0xd4, 0x6f, 0x78, 0xe, 0xf5, 0xed, 0xfa, 0x68, 0xf9, 0xc2, 0x8f, 0xec, 0xfc, 0xd3, 0xe9, 0x67, 0xa0, 0x30, 0x57, 0xa, 0xba, 0x49, 0xc8, 0xcb, 0x2a, 0x17, 0x8d, 0x25, 0x57, 0xe6, 0xb9, 0xa3, 0xfb, 0x38, 0x7e, 0xd2, 0xf6, 0xed, 0xc7, 0x85, 0x6c, 0x2b, 0x5, 0x16, 0x81, 0x80, 0xbd, 0x6b, 0xd7, 0xa8, 0x8a, 0x8b, 0xcc, 0x8a, 0x81, 0xc5, 0xa0, 0x33, 0x1e, 0x9, 0x53, 0x63, 0x50, 0x8c, 0xd3, 0x29, 0xec, 0x50, 0x4e, 0xa3, 0x21, 0xa6, 0x76, 0x6c, 0x58, 0xd6, 0x58, 0xe0, 0xfa, 0xb9, 0x42, 0xe1, 0xdc, 0x2a, 0x30, 0x8b, 0xa7, 0xe1, 0x22, 0x25, 0x87, 0x19, 0x87, 0x7b, 0xb8, 0xaf, 0xe6, 0x92, 0xd1, 0xcd, 0xf2, 0xbc, 0xdb, 0xb4, 0x10, 0xcb, 0xa4, 0xe5, 0xe5, 0xe4, 0xb8, 0xfc, 0x8e, 0x14, 0x49, 0x79, 0x3f, 0xda, 0x1c, 0x14, 0xaa, 0x33, 0x7a, 0x1f, 0x88, 0x84, 0xc, 0x3a, 0x6, 0x75, 0x82, 0x63, 0x2b, 0x65, 0x2e, 0x2a, 0xf7, 0x2e, 0xc8, 0x87, 0x49, 0x19, 0xf4, 0xd8, 0xaa, 0x94, 0xde, 0x30, 0xeb, 0x3f, 0x1e, 0x44, 0xae, 0xfe, 0xbc, 0x66, 0xf5, 0x8e, 0x5e, 0xbd, 0xc7, 0x66, 0xb7, 0xa3, 0xa8, 0xcd, 0x16, 0x1c, 0xeb, 0x65, 0xb9, 0x4, 0x7e, 0x52, 0xb9, 0x31, 0xac, 0x59, 0xa0, 0x3b, 0x13, 0xea, 0x6e, 0x3f, 0x41, 0xe3, 0x8b, 0x40, 0x51, 0x9a, 0xf3, 0x85, 0xb5, 0x7c, 0x72, 0xde, 0xc9, 0x9b, 0xb7, 0xbf, 0x37, 0xd7, 0x1f, 0x4a, 0x40, 0x91, 0x0, 0xa3, 0xbf, 0xe2, 0x4, 0x5b, 0x29, 0x2f, 0x92, 0x77, 0x5a, 0xea, 0xf7, 0xc2, 0x39, 0x4a, 0x15, 0x13, 0x5f, 0x97, 0x17, 0x84, 0x44, 0x16, 0x37, 0xd5, 0x14, 0x67, 0xbf, 0xfe, 0x9b, 0x4b, 0xc8, 0x53, 0xea, 0x4c, 0xff, 0x5d, 0xc8, 0xe2, 0x51, 0x26, 0x3a, 0x76, 0x6, 0x2c, 0xaa, 0xb0, 0xb7, 0x58, 0x24, 0xd2, 0x1c, 0x76, 0x3d, 0x33, 0x40, 0x5a, 0x95, 0x66, 0x8a, 0x53, 0xda, 0x22, 0x95, 0x1e, 0x96, 0x26, 0xa0, 0x91, 0xa5, 0x7f, 0x8a, 0x5a, 0x27, 0xdb, 0xe0, 0xb6, 0x1c, 0xf, 0x1c, 0x65, 0x2d, 0xd0, 0xf0, 0x4c, 0x12, 0xa3, 0xe3, 0xcf, 0x1, 0x4d, 0x95, 0xbf, 0xd3, 0x5e, 0x56, 0x44, 0x70, 0x47, 0xab, 0xe7, 0x9b, 0x8f, 0xe0, 0x4c, 0xec, 0x13, 0x75, 0x16, 0xc3, 0xeb, 0xa6, 0xd0, 0x2e, 0x68, 0x29, 0xf, 0x91, 0xa4, 0x78, 0x68, 0xaf, 0x42, 0x4e, 0x1d, 0xbf, 0x55, 0x84, 0x64, 0x7e, 0xda, 0x7f, 0xad, 0xa8, 0xf0, 0x51, 0xbe, 0xba, 0xdd, 0x65, 0x4b, 0x14, 0x91, 0x24, 0x4, 0xf5, 0xab, 0x54, 0xcb, 0x79, 0x27, 0xc4, 0x13, 0xee, 0x2, 0x71, 0x4d, 0x74, 0xe8, 0x2b, 0x14, 0x45, 0xf9, 0x2e, 0xaf, 0x64, 0xc2, 0x86, 0x61, 0x47, 0x8b, 0x50, 0x89, 0x96, 0xed, 0xb8, 0x20, 0x14, 0xe0, 0x14, 0xa9, 0x68, 0x24, 0x21, 0x35, 0xd4, 0xa, 0xf9, 0x66, 0xf0, 0xcf, 0x69, 0x87, 0xe7, 0x61, 0x6e, 0xae, 0x58, 0x8c, 0x29, 0x81, 0x10, 0xae, 0x42, 0x33, 0x3b, 0x91, 0x8b, 0x2d, 0xcc, 0xfe, 0x4c, 0x6a, 0x60, 0xe9, 0x7e, 0x65, 0xb6, 0x3e, 0x41, 0x9d, 0x5f, 0x6b, 0x64, 0x2, 0x50, 0x24, 0x42, 0x68, 0x76, 0x5b, 0x5a, 0xd9, 0xb7, 0x3a, 0x5d, 0x1, 0x6d, 0x50, 0x83, 0x31, 0xc4, 0x2f, 0x69, 0x4c, 0x97, 0xc, 0x2b, 0xcb, 0x74, 0x5b, 0xf0, 0x37, 0xa4, 0xd2, 0x2e, 0xb2, 0xb4, 0x97, 0x1d, 0x96, 0xf3, 0x68, 0x9e, 0xbf, 0x51, 0x3b, 0xcb, 0x2a, 0x2b, 0xe7, 0x88, 0x93, 0xe9, 0x88, 0x8b, 0x62, 0x35, 0x28, 0x67, 0x6d, 0x94, 0xef, 0xbc, 0x76, 0x81, 0x74, 0x14, 0x5f, 0x21, 0x2c, 0x94, 0x19, 0x38, 0x9, 0x64, 0x72, 0x55, 0x11, 0x78, 0xfc, 0xcf, 0x31, 0x25, 0x3, 0x8, 0x4, 0x1f, 0xcc, 0x72, 0xaf, 0xdc, 0x3b, 0x84, 0x5a, 0x45, 0xfa, 0xd6, 0x54, 0x87, 0xa7, 0x40, 0x4c, 0x89, 0x70, 0xbf, 0x8a, 0x3b, 0xa2, 0xc8, 0xab, 0x5e, 0x76, 0x8b, 0xb0, 0xcd, 0x85, 0xb3, 0xa6, 0xf0, 0xf1, 0xc9, 0xeb, 0x66, 0xc1, 0x3, 0x6, 0x21, 0x61, 0xd6, 0xae, 0xdb, 0xe7, 0x6c, 0x43, 0xf8, 0xe3, 0x9f, 0x6b, 0xbc, 0xa5, 0x99, 0x56, 0xa5, 0x28, 0x1b, 0x5f, 0x15, 0x4c, 0xe2, 0xe6, 0x64, 0x97, 0x1, 0xd0, 0x3a, 0xca, 0xee, 0xc7, 0x97, 0x26, 0x7a, 0xa0, 0x62, 0x3b, 0x70, 0xc1, 0x32, 0x3d, 0x22, 0xfe, 0x6a, 0x1, 0x39, 0x11, 0x43, 0x90, 0x1e, 0x4f, 0x8c, 0xb9, 0xe8, 0xc7, 0x6f, 0x40, 0xfb, 0xc4, 0x43, 0x42, 0x7f, 0xdf, 0x93, 0xee, 0x90, 0x9f, 0xbd, 0xc2, 0x68, 0x91, 0xd4, 0x45, 0x20, 0x28, 0x91, 0x38, 0x94, 0x10, 0xeb, 0x8, 0xf5, 0x2f, 0xcc, 0x19, 0xe, 0x4, 0x21, 0x9f, 0x2a, 0x75, 0xfb, 0xb5, 0x1, 0x94, 0xa5, 0xde, 0x57, 0xcf, 0xc0, 0xd0, 0xf, 0x1a, 0x7d, 0x3, 0xa0, 0x4, 0x8b, 0x3, 0xc5, 0xb1, 0x2f, 0x6f, 0x5b, 0xee, 0xc8, 0xce, 0xfc, 0xaa, 0x7b, 0xd4, 0x11, 0x92, 0x86, 0x58, 0x10, 0x25, 0x2f, 0xad, 0x91, 0x65, 0xc, 0xba, 0xdc, 0x85, 0xbc, 0x79, 0xf3, 0x3a, 0x94, 0xd, 0x45, 0xa3, 0x9e, 0x9, 0xa2, 0xd5, 0xef, 0x50, 0x6e, 0xea, 0x56, 0x7f, 0x69, 0x55, 0x60, 0xc5, 0x18, 0x9e, 0x9a, 0x68, 0x6e, 0x3b, 0x36, 0x3b, 0x99, 0x9c, 0xbe, 0xfc, 0xc2, 0x60, 0x70, 0x15, 0x8e, 0xfa, 0x1a, 0x26, 0x7a, 0x9b, 0x53, 0x2d, 0x6c, 0x86, 0xc0, 0x7c, 0xa4, 0x74, 0x54, 0xb3, 0x46, 0xcb, 0xaa, 0x4b, 0x4d, 0x78, 0xef, 0x9f, 0x48, 0x4c, 0xd1, 0x1b, 0x2f, 0xbc, 0x26, 0xe3, 0x52, 0xfc, 0x18, 0xc6, 0x92, 0x3, 0xf8, 0xe9, 0xbc, 0xd8, 0xd4, 0xf1, 0xbc, 0xd1, 0xc3, 0xd4, 0xf7, 0xb1, 0x2a, 0xbd, 0xbc, 0xc5, 0x8e, 0xb6, 0xe6, 0x14, 0x68, 0xeb, 0x8d, 0xe, 0x73, 0x3d, 0x90, 0x21, 0xb6, 0x79, 0xeb, 0x1b, 0x51, 0x46, 0xaa, 0x68, 0x29, 0x4d, 0xc5, 0x8, 0xee, 0x15, 0xbd, 0x67, 0x15, 0x17, 0x1, 0x45, 0xa6, 0x70, 0x4d, 0x3e, 0x3f, 0xa3, 0x6, 0xe1, 0xf4, 0x7a, 0x60, 0x64, 0x17, 0x5d, 0xfc, 0xfb, 0x46, 0x85, 0x6f, 0x52, 0x4f, 0xfe, 0xc0, 0x88, 0x51, 0xd5, 0x58, 0x56, 0x4b, 0xf9, 0x43, 0xd9, 0x21, 0x6d, 0x61, 0x99, 0xe7, 0x54, 0x9, 0x51, 0x6b, 0x85, 0x55, 0xa1, 0x42, 0x92, 0x54, 0xd3, 0x67, 0x7c, 0xeb, 0x19, 0x3f, 0x16, 0x3d, 0x1, 0xb4, 0x44, 0xf4, 0x18, 0xec, 0x63, 0x3f, 0xf9, 0xed, 0x42, 0x7f, 0xe2, 0x86, 0x76, 0xb6, 0xb6, 0x50, 0xc0, 0xb4, 0x67, 0xef, 0x2e, 0x79, 0x30, 0xec, 0x43, 0xd3, 0xaf, 0x92, 0xd6, 0xc7, 0xb6, 0x2, 0xac, 0xd2, 0x1c, 0xe6, 0xf2, 0x2e, 0x1e, 0x46, 0x3f, 0xcd, 0xb2, 0x2b, 0xe9, 0xf2, 0x23, 0x4a, 0x93, 0x31, 0xe3, 0x9b, 0x3a, 0x55, 0x5, 0xb1, 0x15, 0x31, 0xac, 0x72, 0x9e, 0x6f, 0x1a, 0x84, 0x52, 0xc9, 0xc2, 0x25, 0xfa, 0x4, 0x1, 0x32, 0xc6, 0x21, 0x65, 0xa2, 0x6c, 0x59, 0xe4, 0x87, 0x9d, 0x93, 0xfb, 0xa9, 0xc7, 0x5d, 0x37, 0x62, 0xfd, 0x1b, 0xb8, 0xd3, 0xef, 0xf5, 0x9d, 0x62, 0x8a, 0x19, 0x3c, 0x9b, 0xec, 0x89, 0x81, 0x5, 0x7, 0xf4, 0x5e, 0xdb, 0x21, 0x56, 0x2, 0xfb, 0x65, 0x38, 0x5f, 0x99, 0x34, 0x35, 0x93, 0x88, 0x1a, 0xea, 0x6d, 0x16, 0xb5, 0x65, 0xf4, 0x1d, 0x6c, 0xfa, 0xa0, 0x16, 0x3f, 0x2a, 0x28, 0x71, 0xd2, 0x1f, 0xa3, 0xdc, 0x94, 0xfc, 0xfd, 0x57, 0x6f, 0x7d, 0xf9, 0xd3, 0x70, 0x89, 0xbb, 0x3b, 0x4b, 0x1a, 0xd, 0xb0, 0x9e, 0xf4, 0x2d, 0x91, 0xce, 0xf3, 0xe3, 0x53, 0x47, 0xd7, 0xb7, 0x6f, 0x5b, 0x5, 0x7c, 0x9c, 0xf0, 0x9c, 0x5a, 0x41, 0x8a, 0xfe, 0x3a, 0xf0, 0x6d, 0x27, 0xa4, 0xd9, 0x5b, 0xb2, 0x76, 0x23, 0x8c, 0xe0, 0x69, 0x80, 0xb1, 0xfc, 0x92, 0x15, 0x83, 0x8f, 0xb0, 0x73, 0xc, 0x35, 0x4c, 0x4e, 0xeb, 0xa8, 0x49, 0x1a, 0x5b, 0x79, 0x3a, 0xd0, 0x85, 0xdc, 0x5f, 0xc2, 0x69, 0x7a, 0x19, 0x48, 0x91, 0x32, 0xca, 0x61, 0x93, 0xd9, 0x6c, 0x4e, 0x1b, 0xb2, 0x9d, 0xa6, 0xd7, 0x19, 0xf8, 0x6d, 0x3e, 0x8d, 0x17, 0x97, 0x3e, 0x76, 0xb5, 0x74, 0x10, 0xb2, 0x98, 0xbb, 0x72, 0xb7, 0x9, 0xad, 0xdb, 0xde, 0xbb, 0xa6, 0x61, 0x8a, 0xbb, 0x26, 0xd5, 0x57, 0xc9, 0xc8, 0x83, 0xc8, 0xf1, 0x59, 0xc9, 0x1e, 0xf6, 0x20, 0xd2, 0xff, 0xf2, 0x2, 0xa1, 0x80, 0x5d, 0xe6, 0xc3, 0xec, 0x47, 0x87, 0x29, 0xa7, 0x61, 0xe3, 0x6, 0xa6, 0xec, 0xc3, 0x62, 0xc1, 0xc1, 0xf2, 0xca, 0x18, 0xc7, 0xb5, 0xb3, 0xf9, 0xfe, 0xc4, 0x2e, 0x41, 0xd6, 0x1a, 0xb5, 0x96, 0x3a, 0x7a, 0x27, 0x83, 0xaa, 0xc5, 0xe5, 0x15, 0x9c, 0xf5, 0x59, 0xf3, 0x47, 0xc8, 0x5, 0xfb, 0x7b, 0x45, 0xeb, 0x82, 0x98, 0x6a, 0xad, 0x4a, 0xb6, 0xfe, 0x71, 0xa1, 0x12, 0xea, 0x3, 0x9c, 0xbc, 0xe6, 0x63, 0xea, 0x37, 0xce, 0x6f, 0xc8, 0xa2, 0x62, 0x77, 0xc8, 0x90, 0x8c, 0xa6, 0xec, 0xd9, 0xc4, 0xa, 0x70, 0x22, 0x14, 0xff, 0x22, 0xcf, 0x2a, 0x55, 0x8e, 0x3b, 0x9b, 0xfd, 0xa2, 0xdd, 0xf6, 0xba, 0xb5, 0xc7, 0xf1, 0x82, 0xb8, 0x39, 0x3a, 0xaf, 0x6e, 0xa, 0xa1, 0x11, 0xa, 0x56, 0x7f, 0xee, 0x52, 0x49, 0x6b, 0xd8, 0x61, 0xa9, 0x2e, 0xb1, 0x75, 0xea, 0xd0, 0xe7, 0x28, 0xd2, 0x8b, 0x28, 0x23, 0xba, 0xe9, 0xe4, 0x6, 0x36, 0xb6, 0x79, 0x7a, 0x6c, 0xa4, 0x57, 0x1d, 0x76, 0x85, 0x8c, 0x44, 0x77, 0x4f, 0xe1, 0x4e, 0x2b, 0x99, 0xa3, 0x15, 0x62, 0x1a, 0x83, 0xc, 0xaf, 0xc9, 0xb8, 0x49, 0x4d, 0x7d, 0x97, 0x3b, 0x4f, 0xa8, 0xcd, 0xb8, 0xfc, 0xcb, 0x6e, 0x5a, 0xa, 0x1f, 0x47, 0x15, 0x20, 0x32, 0x74, 0x7a, 0xfa, 0xcd, 0xa1, 0x30, 0x2, 0x1b, 0x55, 0xc6, 0xd9, 0x16, 0x11, 0x49, 0x93, 0x6f, 0x19, 0x66, 0x8d, 0x8c, 0xf5, 0x62, 0xb8, 0xf4, 0x2a, 0xcf, 0x41, 0x65, 0x37, 0x74, 0x77, 0xe2, 0x44, 0x75, 0x65, 0x86, 0x1d, 0xcb, 0xfb, 0xe5, 0x30, 0x1d, 0xa8, 0x66, 0x3c, 0x11, 0xd8, 0x6c, 0x91, 0x16, 0xd3, 0x8d, 0x59, 0xc4, 0xea, 0xc0, 0xf6, 0x34, 0x79, 0xc9, 0xf, 0xc8, 0xe4, 0xf1, 0x5, 0xd7, 0x18, 0x2, 0x3a, 0x1d, 0xc0, 0x64, 0xcd, 0x13, 0x38, 0x82, 0x5e, 0xa1, 0x24, 0x12, 0x21, 0x69, 0x81, 0x50, 0xaf, 0xa4, 0x7b, 0xd6, 0x30, 0x65, 0x95, 0xca, 0x5d, 0xd3, 0x7b, 0x1b, 0x2b, 0x8, 0x19, 0xc9, 0xe2, 0xa2, 0xa8, 0x80, 0x20, 0x7, 0x88, 0x6d, 0xe7, 0xc4, 0x7, 0xc3, 0x12, 0xf4, 0xdb, 0xd3, 0xe2, 0xec, 0x5e, 0xc7, 0x8f, 0x62, 0x3f, 0x4, 0xed, 0x7e, 0x4b, 0x27, 0x29, 0x8, 0x31, 0xca, 0x1c, 0xc9, 0xcb, 0x80, 0xae, 0xa1, 0x57, 0xeb, 0x73, 0x62, 0xd3, 0x7, 0x9c, 0xdf, 0xb1, 0x2, 0x34, 0x25, 0x12, 0xbf, 0xb1, 0xae, 0xb, 0x97, 0x9e, 0x4f, 0x16, 0x24, 0x10, 0xd3, 0x1e, 0x9, 0x59, 0xe8, 0xbe, 0xc4, 0xdd, 0xe2, 0xbd, 0x9f, 0xc2, 0x7f, 0xb, 0x48, 0x78, 0x7c, 0xc5, 0x41, 0xc1, 0x84, 0xc5, 0x8, 0x9d, 0x39, 0xc9, 0x16, 0x6f, 0x83, 0x7, 0x98, 0x8, 0xa9, 0x90, 0x4, 0x4, 0x9f, 0xf1, 0xc3, 0xcc, 0x45, 0x2b, 0x12, 0xa8, 0x84, 0x75, 0xe9, 0x0, 0xae, 0x5, 0x66, 0x93, 0x1, 0x51, 0xa8, 0x50, 0xbf, 0x57, 0x2a, 0x8e, 0x6f, 0x16, 0x81, 0x26, 0x25, 0x22, 0x80, 0x85, 0x3b, 0x16, 0xe3, 0xb8, 0x15, 0xa8, 0xfe, 0x5c, 0x8a, 0x13, 0x59, 0xff, 0x78, 0xbb, 0x8, 0x61, 0xb2, 0x4b, 0xf8, 0xc5, 0x59, 0x2c, 0x49, 0xb0, 0x7c, 0x73, 0x33, 0xe, 0x34, 0x2b, 0xd2, 0x1, 0xc0, 0x36, 0x29, 0xdd, 0xe2, 0x38, 0xcc, 0x7b, 0x85, 0xd1, 0x3c, 0xd2, 0x13, 0x1b, 0x1e, 0x1f, 0xcb, 0x39, 0x57, 0xfc, 0x51, 0xe6, 0xcc, 0xfc, 0x9e, 0x4a, 0x26, 0xaf, 0xc, 0x23, 0x64, 0xce, 0x35, 0xd7, 0xa4, 0x73, 0x75, 0xae, 0x86, 0x27, 0x75, 0x46, 0xca, 0xf7, 0x76, 0x35, 0x94, 0x7e, 0xf7, 0x34, 0x87, 0x59, 0x51, 0x2b, 0xa6, 0xde, 0xd2, 0x67, 0x85, 0xb1, 0xf9, 0x5, 0xb3, 0x9c, 0x9d, 0x1d, 0xb5, 0xbb, 0x34, 0x7f, 0x1f, 0x9c, 0x46, 0xc0, 0xad, 0xf8, 0xf0, 0x2d, 0x3c, 0x3, 0xd, 0x6b, 0xbc, 0x2c, 0x89, 0x24, 0x7e, 0x87, 0x5, 0xc7, 0xb1, 0xa9, 0x1, 0xed, 0xb7, 0x62, 0xf1, 0xab, 0xb4, 0xe6, 0x2e, 0x87, 0x4a, 0xd7, 0x53, 0x8a, 0x7, 0x98, 0x68, 0x3, 0xc4, 0x91, 0x71, 0xf5, 0x6d, 0xfe, 0x5, 0x5f, 0x63, 0x23, 0xb3, 0xea, 0x4, 0x16, 0x6b, 0x9, 0x61, 0xbc, 0xb7, 0xf4, 0x7d, 0xdd, 0xfe, 0xc3, 0x44, 0x62, 0x8b, 0x44, 0xb9, 0x2e, 0x14, 0xcb, 0xf2, 0x42, 0x91, 0x1c, 0xcd, 0xd5, 0x71, 0x9b, 0xcc, 0x8e, 0x79, 0x9, 0x78, 0x2d, 0x89, 0x2, 0x65, 0xcb, 0xb3, 0x74, 0x50, 0x51, 0xba, 0x36, 0x79, 0x2d, 0xa2, 0x2a, 0x55, 0x6c, 0x76, 0x2a, 0xdb, 0x22, 0x88, 0x9, 0xf8, 0x5f, 0xcb, 0xd1, 0xe5, 0x21, 0x38, 0x79, 0x6, 0xd4, 0xbe, 0x38, 0x4f, 0x32, 0x37, 0x9a, 0xd5, 0x67, 0x4b, 0x52, 0x3d, 0x6, 0x57, 0xea, 0x7e, 0xbe, 0x7e, 0x15, 0x77, 0xa5, 0x54, 0x86, 0x4c, 0x87, 0x25, 0xdd, 0x87, 0x9, 0xc9, 0xb4, 0xa1, 0x6d, 0xcb, 0xa3, 0xfc, 0x7a, 0x3b, 0x34, 0xb2, 0xe7, 0xc1, 0x1, 0x7e, 0x40, 0x1d, 0xe1, 0x5d, 0xf0, 0x6c, 0x8, 0x20, 0x23, 0x37, 0x60, 0xb1, 0xda, 0xc6, 0x93, 0x53, 0xc2, 0x5e, 0x98, 0x1d, 0x11, 0x67, 0x1b, 0x2a, 0x28, 0x34, 0xfa, 0x53, 0x94, 0x23, 0xc7, 0x71, 0x71, 0x73, 0xea, 0xa9, 0xd8, 0x3d, 0x88, 0x88, 0x52, 0x19, 0xc7, 0xf7, 0xf4, 0x4, 0x9b, 0x22, 0xcb, 0x9c, 0x3e, 0xd5, 0xd1, 0x67, 0xce, 0xe1, 0x41, 0xa0, 0xd8, 0x70, 0xbb, 0xc0, 0x17, 0x66, 0x27, 0x8d, 0x41, 0x30, 0x27, 0xb4, 0xb1, 0x1d, 0x1, 0x6d, 0x53, 0x93, 0x6b, 0x77, 0x70, 0xb, 0x24, 0x3d, 0x3c, 0xf4, 0x31, 0x82, 0xbc, 0x22, 0xea, 0xd, 0x86, 0xaa, 0x2f, 0xd, 0x68, 0x21, 0x93, 0x91, 0x5a, 0x93, 0x3b, 0xf6, 0x93, 0xc4, 0x4d, 0xa0, 0x24, 0xc6, 0x56, 0x94, 0xd, 0xdd, 0xcd, 0x46, 0x9d, 0xa4, 0x74, 0x94, 0xe, 0x50, 0x9c, 0x58, 0x43, 0x9, 0xd6, 0x79, 0x5c, 0x85, 0x7a, 0xdf, 0x9a, 0xe6, 0x9f, 0xfa, 0xd2, 0xfa, 0x2a, 0x97, 0xd3, 0x67, 0x52, 0xf, 0xb4, 0xa6, 0x2f, 0xfa, 0x54, 0x7f, 0x46, 0x15, 0xe3, 0x43, 0xb6, 0x62, 0x6f, 0xb2, 0x63, 0xc4, 0x3a, 0x87, 0x77, 0x9e, 0xd7, 0x9f, 0xe9, 0xc4, 0x2d, 0xfb, 0xa6, 0xf3, 0x59, 0x52, 0xfe, 0x39, 0x45, 0x50, 0x3c, 0x7e, 0x99, 0xf3, 0xc4, 0xb1, 0xd1, 0x1a, 0x8b, 0xd9, 0x2b, 0xa3, 0x4b, 0x61, 0x73, 0x8f, 0xe2, 0xca, 0xf3, 0x33, 0x45, 0x58, 0x7f, 0x60, 0xec, 0x2e, 0xd6, 0xc6, 0xb9, 0x14, 0x25, 0x3e, 0x89, 0x4c, 0xcb, 0x7f, 0x6, 0x26, 0x2, 0x61, 0x46, 0x5f, 0x12, 0xa6, 0x6b, 0xa9, 0x36, 0x45, 0xff, 0xe, 0xa9, 0x68, 0x99, 0xff, 0xe0, 0xdd, 0xfa, 0xdc, 0x96, 0x3, 0xbc, 0x66, 0xa8, 0x9e, 0x5, 0x5f, 0xdb, 0x75, 0x80, 0x9f, 0xc6, 0xd0, 0xb9, 0x74, 0xb0, 0xd7, 0xbd, 0x7e, 0x47, 0x0, 0x90, 0xcd, 0xad, 0xbc, 0x91, 0x6, 0x9f, 0xe2, 0xe1, 0x7d, 0xc7, 0xff, 0x91, 0x58, 0x86, 0x1b, 0x81, 0xbf, 0xac, 0x6a, 0xe5, 0x44, 0xa3, 0xf0, 0xbc, 0xed, 0x71, 0x1a, 0x3b, 0x55, 0x3d, 0xfd, 0xac, 0x7a, 0xf, 0xd4, 0x89, 0x34, 0xb7, 0xc, 0x31, 0xf8, 0x64, 0x4f, 0x85, 0x95, 0xb6, 0x3a, 0xea, 0x85, 0x36, 0xc3, 0x46, 0xb5, 0x5, 0x58, 0x3f, 0x84, 0x77, 0x96, 0xab, 0xf0, 0xe8, 0x93, 0x71, 0xcf, 0xce, 0x93, 0x8c, 0x4d, 0x21, 0x48, 0xb9, 0x9d, 0xdd, 0xde, 0x67, 0x7e, 0xa0, 0x4a, 0xe4, 0xaa, 0x33, 0xc5, 0x8d, 0xb, 0x2d, 0xba, 0x36, 0xa8, 0xb7, 0xb6, 0xd3, 0x36, 0x2c, 0x7b, 0x2c, 0x7a, 0x3b, 0xe4, 0x54, 0x83, 0x3e, 0x2e, 0x19, 0xc1, 0xc8, 0xf8, 0x28, 0xf0, 0x5d, 0x3, 0x4d, 0x7d, 0x21, 0x66, 0x41, 0x20, 0x5f, 0x91, 0x6c, 0x1a, 0x72, 0xe5, 0x12, 0x9, 0xf, 0x92, 0x4c, 0x45, 0x74, 0xdd, 0xb2, 0x4b, 0xa8, 0x9f, 0x76, 0xd, 0x6f, 0x52, 0xf4, 0xc, 0xd5, 0x11, 0xca, 0x21, 0x72, 0xfc, 0xf, 0xec, 0x36, 0x63, 0x90, 0xb7, 0xa2, 0x6c, 0x1f, 0x96, 0xb5, 0x26, 0xac, 0xe6, 0x49, 0x4c, 0x9d, 0x25, 0x2d, 0x68, 0xa9, 0xda, 0x2a, 0x93, 0xfc, 0x4e, 0x42, 0x16, 0xd7, 0xa, 0x86, 0xe0, 0x9f, 0xa5, 0x70, 0x75, 0x62, 0x10, 0xf, 0xc6, 0x9e, 0xfc, 0x66, 0x31, 0x82, 0x3b, 0x5, 0x76, 0xd5, 0xae, 0x8c, 0x66, 0x8e, 0xa6, 0xaf, 0xbd, 0x78, 0x43, 0xa7, 0xa1, 0x10, 0x43, 0x55, 0xce, 0xc3, 0xb2, 0x3, 0x2f, 0x46, 0x93, 0x99, 0x5a, 0xe5, 0xf0, 0x18, 0xc8, 0xa1, 0x63, 0xd5, 0x93, 0xf8, 0x3c, 0x86, 0xb3, 0x87, 0x3d, 0xf8, 0x12, 0xd8, 0x77, 0xad, 0x92, 0x97, 0x5, 0x3, 0xcd, 0xab, 0xf, 0x4f, 0x77, 0xf1, 0xb, 0x1d, 0xf1, 0xaf, 0x10, 0x2f, 0x92, 0x1, 0xf6, 0xd9, 0x2c, 0x51, 0x2e, 0xff, 0x44, 0xd1, 0xdb, 0x32, 0x67, 0x8f, 0xf7, 0xa5, 0x83, 0xab, 0x6f, 0x1a, 0xcd, 0xf6, 0xc7, 0x7d, 0x16, 0x8e, 0x88, 0xe6, 0x35, 0xf0, 0x52, 0x97, 0xbf, 0xe, 0x31, 0xe4, 0x82, 0x6a, 0x27, 0xd8, 0xad, 0x97, 0x70, 0x2b, 0x9a, 0x1f, 0xef, 0x99, 0x58, 0xd3, 0x4b, 0xa0, 0x49, 0x84, 0xde, 0x2, 0x7b, 0x22, 0x99, 0x6d, 0xa1, 0x43, 0x9d, 0xed, 0x3f, 0x85, 0x9a, 0x39, 0x14, 0xea, 0x27, 0xe4, 0xff, 0x3e, 0xd4, 0x54, 0x9c, 0x4a, 0xab, 0x5d, 0x80, 0x5d, 0x59, 0x3c, 0x9a, 0xcf, 0x76, 0x64, 0x88, 0x37, 0xc4, 0x56, 0x6e, 0xed, 0xe6, 0xd3, 0x7, 0xca, 0x8b, 0x7a, 0xab, 0x4d, 0xdc, 0xc7, 0xf9, 0x3f, 0x22, 0x71, 0x56, 0x77, 0xa2, 0x30, 0x55, 0x56, 0x6a, 0x83, 0xc1, 0x2d, 0x83, 0x30, 0x91, 0x6b, 0x49, 0x17, 0x9b, 0xe2, 0xb2, 0x97, 0x9d, 0xba, 0x70, 0x64, 0x3a, 0x33, 0x7, 0xe4, 0xe0, 0xc6, 0xfc, 0x59, 0x66, 0x49, 0x30, 0x5, 0x57, 0xe3, 0xb7, 0xb5, 0x87, 0xbf, 0xc8, 0xd, 0xcb, 0x36, 0xc7, 0xe8, 0xfb, 0xa9}, - output224: []byte{0xd2, 0x5b, 0x2d, 0x47, 0x4f, 0x62, 0xf6, 0xca, 0x7d, 0xb, 0xb2, 0x8, 0xac, 0xfb, 0x8b, 0xd7, 0x7a, 0x71, 0xb, 0x26, 0x44, 0xe0, 0x3a, 0xff, 0x27, 0x5b, 0x13, 0x91}, - output256: []byte{0x31, 0x6d, 0xba, 0xab, 0xd7, 0x3c, 0xb3, 0x31, 0xe4, 0xca, 0xd8, 0x99, 0xb4, 0x46, 0xdf, 0xf6, 0x5e, 0xb8, 0x66, 0x8f, 0x5c, 0x4e, 0xf9, 0xa1, 0xdb, 0x8e, 0x8a, 0xe4, 0x24, 0x12, 0x8f, 0x66}, - output384: []byte{0xf7, 0x65, 0x2a, 0xb4, 0xec, 0x1e, 0xbe, 0xf1, 0x18, 0x3c, 0x8d, 0xb0, 0xbd, 0x21, 0x7f, 0x8b, 0xd5, 0x57, 0xf6, 0x4, 0xf4, 0x59, 0xf5, 0xa2, 0x6d, 0x17, 0xf5, 0xb3, 0xe5, 0xd, 0x9d, 0xad, 0xaf, 0x13, 0x85, 0x36, 0x7d, 0x1c, 0x37, 0x5f, 0xa9, 0xba, 0x42, 0xd2, 0x51, 0x4c, 0x78, 0xb5}, - output512: []byte{0xfd, 0x90, 0xed, 0x9a, 0x58, 0x20, 0x44, 0x3e, 0x58, 0xf1, 0x18, 0xfa, 0xd2, 0xed, 0xf, 0x65, 0x93, 0x89, 0x76, 0x87, 0x3e, 0x1c, 0xe6, 0xde, 0x77, 0xa3, 0x37, 0xfc, 0xfe, 0xc3, 0x92, 0xb3, 0x27, 0x5f, 0xd8, 0x5, 0xcc, 0xc6, 0x44, 0x26, 0x87, 0x1a, 0xbc, 0xca, 0x32, 0x50, 0xd3, 0x1a, 0x9f, 0xdb, 0x6c, 0x8c, 0x7b, 0xd8, 0x5b, 0x1e, 0x9e, 0x9, 0xf4, 0x29, 0x84, 0x3f, 0xa9, 0x26}}, - testcase{ - msg: []byte{0x1a, 0x3d, 0xea, 0xfc, 0xe7, 0xa, 0xf6, 0xf3, 0xf5, 0x5d, 0x66, 0xad, 0x9c, 0xe7, 0x8d, 0x5f, 0x4d, 0x5c, 0x5f, 0x26, 0x38, 0xa8, 0x10, 0xaf, 0xcd, 0x7, 0xd6, 0x7e, 0x9f, 0x9a, 0x13, 0x80, 0xd6, 0xb3, 0x4b, 0xe4, 0x82, 0xef, 0x3, 0xc, 0x22, 0xf1, 0xe9, 0x78, 0xf5, 0x44, 0x60, 0x9c, 0xce, 0x35, 0xa7, 0x4c, 0x51, 0x9, 0xee, 0x70, 0x38, 0x49, 0x5b, 0x62, 0x10, 0xcd, 0xbc, 0xa8, 0xdc, 0x82, 0xc6, 0xe9, 0xe7, 0xb0, 0xd5, 0x93, 0xfa, 0xd9, 0x66, 0x53, 0x82, 0xb3, 0xc4, 0x1, 0xab, 0x89, 0x41, 0xdf, 0x71, 0x30, 0x7d, 0xd7, 0x7e, 0xba, 0xf1, 0x40, 0xaa, 0x66, 0xa1, 0xf7, 0x63, 0x16, 0x47, 0x88, 0x50, 0xe5, 0x88, 0x86, 0xa9, 0x61, 0x6, 0x31, 0xe9, 0xc7, 0x22, 0xf4, 0x59, 0xfa, 0x0, 0xc0, 0xb5, 0x31, 0x24, 0xfb, 0x4f, 0x12, 0x77, 0x8b, 0xbb, 0xa3, 0x76, 0x8, 0x26, 0xd3, 0xdb, 0xa6, 0x7c, 0xd0, 0x30, 0xa9, 0x6b, 0x65, 0x4a, 0xf9, 0x3f, 0x8e, 0x39, 0x5f, 0x5f, 0x43, 0x95, 0x49, 0x48, 0x9f, 0x81, 0x61, 0x68, 0x3f, 0x12, 0x4b, 0xc9, 0x80, 0xe6, 0x93, 0x9c, 0x83, 0xa6, 0x8, 0x5e, 0x4b, 0x6c, 0xaa, 0xf8, 0xbc, 0xd8, 0x9a, 0xe, 0x1, 0xed, 0x70, 0xdb, 0x48, 0x71, 0x66, 0xcc, 0x29, 0x73, 0x5d, 0x92, 0x35, 0xa9, 0xcd, 0xc5, 0x7b, 0x80, 0xc9, 0xc2, 0xe5, 0x91, 0xdf, 0x63, 0x22, 0xf5, 0xbe, 0xdd, 0x32, 0x93, 0x70, 0x73, 0xf7, 0x81, 0xa3, 0x3, 0x89, 0x55, 0x2a, 0xe8, 0x3f, 0xbe, 0x14, 0x7d, 0x1b, 0x3d, 0x34, 0x61, 0xa3, 0xdf, 0x96, 0xc1, 0x5c, 0xd9, 0x69, 0x0, 0xc5, 0x67, 0x18, 0xea, 0xae, 0x83, 0x84, 0x17, 0x5, 0x75, 0x79, 0x11, 0x59, 0x36, 0x86, 0x26, 0x79, 0xf5, 0xf2, 0xa4, 0x5d, 0xad, 0xf6, 0x5d, 0x14, 0x10, 0x8a, 0xf1, 0x64, 0x1d, 0xf9, 0x87, 0xb5, 0x79, 0x86, 0x38, 0x4f, 0xa1, 0x43, 0x37, 0x89, 0xf5, 0xdf, 0xbe, 0x87, 0xe9, 0xb, 0xd4, 0xe9, 0xd8, 0xd4, 0xd0, 0x74, 0x1f, 0xcd, 0xa7, 0x34, 0x83, 0x22, 0xb9, 0x67, 0xb5, 0x66, 0xb1, 0x86, 0x12, 0xdb, 0xb8, 0xfe, 0x64, 0xf1, 0x51, 0x94, 0x7c, 0x3f, 0x7e, 0x36, 0x1e, 0xe8, 0x68, 0x67, 0x6b, 0xcc, 0xd0, 0xcb, 0x3a, 0x1a, 0xfe, 0x4, 0x6b, 0xe7, 0x0, 0x57, 0xa0, 0x5a, 0xdd, 0x3e, 0x65, 0xaf, 0x31, 0xe3, 0xff, 0x41, 0x4a, 0x62, 0x7c, 0x1, 0x83, 0xe8, 0xff, 0x58, 0x3b, 0x41, 0xb7, 0x5b, 0x20, 0x36, 0x50, 0x42, 0x2, 0x16, 0xe6, 0xdf, 0xca, 0xb2, 0x89, 0x66, 0x5f, 0x5, 0x4c, 0xfe, 0x3e, 0xa0, 0x94, 0x36, 0x47, 0x52, 0x85, 0x18, 0x57, 0x3b, 0xbb, 0x1d, 0xf, 0x27, 0xe1, 0x44, 0x9e, 0x98, 0x73, 0x9e, 0xaf, 0xd, 0x0, 0x94, 0x32, 0xdf, 0xc, 0x1e, 0xdc, 0x16, 0x25, 0x26, 0x4b, 0x94, 0xa7, 0x1d, 0xb7, 0x62, 0x65, 0x9f, 0xf5, 0xa3, 0xa7, 0xa8, 0x67, 0xf1, 0x82, 0xd1, 0xf1, 0xfd, 0x34, 0xb3, 0x41, 0xa4, 0xa1, 0x81, 0x22, 0x18, 0x70, 0xdc, 0x4a, 0x49, 0x40, 0x13, 0x9, 0x1a, 0x7e, 0x3b, 0x2b, 0x7, 0xe0, 0x16, 0xc, 0x43, 0x8f, 0x1e, 0xe1, 0xe8, 0xa2, 0xb9, 0x89, 0xc4, 0xff, 0xec, 0x36, 0xb5, 0x8, 0x3e, 0xa4, 0x27, 0x60, 0x67, 0x67, 0xc2, 0x96, 0x72, 0xf4, 0x47, 0x79, 0xa8, 0x50, 0x5b, 0x42, 0x2b, 0x25, 0xa5, 0x69, 0x7, 0xf5, 0x65, 0xb2, 0x76, 0x90, 0xd0, 0x11, 0x42, 0x6a, 0x62, 0xdf, 0x0, 0x36, 0xd5, 0x7d, 0x96, 0x7c, 0xd1, 0xd1, 0x4e, 0x91, 0x5b, 0xbc, 0x26, 0x91, 0xe7, 0xaf, 0x81, 0x8c, 0x76, 0x9d, 0x9e, 0x1f, 0x9e, 0xdd, 0x40, 0x89, 0x4b, 0xe8, 0x8f, 0xa1, 0xd7, 0xa5, 0x95, 0x2a, 0xfd, 0x89, 0x8e, 0x83, 0x77, 0x16, 0xac, 0xd7, 0x39, 0x53, 0xbf, 0x2d, 0x1d, 0x44, 0x81, 0x23, 0xfd, 0x1a, 0x2, 0x76, 0xd2, 0xc2, 0xeb, 0xdc, 0x76, 0xa, 0x4b, 0x78, 0x74, 0x16, 0xcf, 0xae, 0x5e, 0x96, 0x3f, 0xcb, 0xdc, 0x8b, 0x55, 0x1c, 0xb7, 0xf, 0x91, 0xda, 0xe, 0xd4, 0xa8, 0x9, 0xf, 0xef, 0x17, 0x8e, 0x87, 0x9f, 0x2c, 0x34, 0xf3, 0xa2, 0x69, 0xdf, 0xff, 0xf0, 0x97, 0x72, 0xd4, 0x4a, 0x13, 0xd7, 0xa1, 0x74, 0x68, 0xb5, 0x83, 0x4c, 0x46, 0x9, 0x57, 0xd5, 0x24, 0x3c, 0x32, 0x5f, 0x63, 0xf0, 0x5f, 0x89, 0xd4, 0xed, 0x98, 0xd3, 0x61, 0xe7, 0xf0, 0xab, 0x8a, 0x83, 0x94, 0x8a, 0x64, 0xd0, 0xcf, 0xf8, 0x51, 0x48, 0x41, 0xaa, 0x21, 0xc7, 0xf3, 0x37, 0x92, 0xa, 0x99, 0x83, 0xe5, 0x9b, 0xe4, 0xa0, 0xf1, 0x33, 0x9e, 0x1e, 0x46, 0x2f, 0x92, 0xdc, 0x1f, 0xc0, 0x70, 0x12, 0x62, 0x6, 0x1, 0x24, 0x58, 0xa4, 0x99, 0xa8, 0x11, 0x1f, 0xae, 0x7, 0x8e, 0x0, 0xb0, 0xca, 0x3b, 0xc1, 0xd6, 0xc7, 0x8, 0x7c, 0xd3, 0x18, 0xd5, 0x60, 0x3c, 0x1c, 0x7e, 0x4, 0x25, 0xe6, 0xf7, 0x29, 0xce, 0xec, 0xa5, 0xf3, 0x5b, 0x82, 0xf8, 0xa4, 0x2e, 0xe, 0x9b, 0x95, 0xe, 0xfb, 0x9, 0x4, 0xc5, 0xfb, 0x5c, 0x6, 0xd9, 0x1d, 0x23, 0x99, 0x13, 0x66, 0x5e, 0xd1, 0xf1, 0xee, 0x4b, 0x82, 0x18, 0x5a, 0x1, 0xba, 0x86, 0xca, 0x2d, 0x3e, 0xa9, 0x4e, 0x5a, 0x88, 0x42, 0x23, 0x1a, 0x94, 0xc0, 0x52, 0x80, 0x18, 0x3b, 0x7a, 0xca, 0x28, 0x99, 0x84, 0x10, 0x3f, 0x12, 0x22, 0x3, 0xec, 0x2f, 0xba, 0x4a, 0x38, 0x2e, 0x6f, 0x52, 0x36, 0xd6, 0xf6, 0x8d, 0xa0, 0x5e, 0x3b, 0xb0, 0xc5, 0x58, 0x42, 0x1f, 0xe, 0xfa, 0xb9, 0x1d, 0xce, 0xef, 0x6d, 0x1e, 0xcd, 0xc6, 0xf, 0x9b, 0x88, 0xf8, 0xbe, 0xfe, 0x31, 0xcd, 0xc3, 0xc2, 0xf0, 0x24, 0xa1, 0xaf, 0x2c, 0x73, 0x36, 0xaa, 0x5d, 0x15, 0x1e, 0x8c, 0xda, 0x81, 0x4a, 0x5f, 0xe8, 0x98, 0xba, 0xde, 0xb9, 0xdd, 0x68, 0xe, 0x33, 0x7e, 0x68, 0x2e, 0xbc, 0x22, 0xbf, 0xae, 0x44, 0x54, 0x17, 0xe3, 0x7d, 0x2d, 0x89, 0xa3, 0x38, 0x65, 0x9a, 0x28, 0xa, 0xb1, 0x20, 0x6d, 0xb7, 0x4d, 0xd4, 0x2c, 0x6f, 0x25, 0x63, 0x9c, 0x18, 0x3, 0xbf, 0xdf, 0x21, 0x56, 0xdf, 0x61, 0x3b, 0xf, 0x59, 0x24, 0xd2, 0x9, 0xf7, 0xf9, 0x0, 0x3c, 0xe8, 0x79, 0x4f, 0x98, 0x9f, 0x4f, 0x27, 0xb8, 0x21, 0x21, 0x21, 0xf, 0x4f, 0x65, 0xec, 0x5a, 0x1f, 0x77, 0x23, 0x30, 0x5c, 0xee, 0x43, 0x8c, 0x41, 0xf7, 0x93, 0xee, 0x4, 0x49, 0x6b, 0xbe, 0x33, 0x7b, 0xbd, 0x2f, 0xd3, 0x2, 0x38, 0x30, 0xb1, 0xc8, 0x88, 0x9c, 0x6f, 0x4d, 0xc, 0x11, 0x92, 0xe3, 0x64, 0xed, 0xbe, 0x1c, 0xd9, 0x87, 0xba, 0x5d, 0x66, 0x22, 0x4e, 0xe9, 0xc9, 0x40, 0x5e, 0x1d, 0xfc, 0xec, 0xe, 0xef, 0xfc, 0x5c, 0x73, 0xd3, 0x12, 0x3f, 0x67, 0x31, 0xc6, 0x29, 0x5d, 0x1e, 0x6b, 0x85, 0x4b, 0x88, 0x4f, 0xd2, 0x2b, 0x6a, 0x3b, 0xbb, 0xe5, 0x39, 0x53, 0x12, 0x58, 0x5c, 0xd1, 0x38, 0xbc, 0xa6, 0x75, 0x32, 0xc6, 0xab, 0x71, 0xbe, 0xbc, 0x66, 0x57, 0xc5, 0xd, 0xa8, 0x7d, 0x2a, 0xc6, 0x6, 0x8f, 0xa3, 0x97, 0x2, 0x2, 0xc5, 0xe1, 0x5e, 0xb7, 0xb4, 0xb3, 0xd2, 0x67, 0x6c, 0x1, 0x34, 0xbc, 0xf1, 0xea, 0xc2, 0xb2, 0x6b, 0xa4, 0x69, 0x30, 0xb5, 0xe6, 0x60, 0xb1, 0x60, 0x60, 0x89, 0x48, 0x84, 0xc8, 0x8b, 0xfa, 0xcd, 0x67, 0x79, 0x27, 0x6b, 0x86, 0xf6, 0x85, 0xab, 0x6f, 0x17, 0xc6, 0xd5, 0x3f, 0x62, 0x12, 0x75, 0xfa, 0xd6, 0x6d, 0x2, 0x1d, 0x26, 0xd1, 0xd4, 0x80, 0xaf, 0xab, 0x4b, 0x5e, 0xc7, 0x5e, 0xe, 0x76, 0x3f, 0xfc, 0x45, 0xf5, 0x99, 0xea, 0x2, 0x50, 0x4d, 0xa5, 0xd9, 0x1e, 0xb5, 0xef, 0xc3, 0xe4, 0xae, 0x19, 0x6f, 0x21, 0x9e, 0x45, 0xe7, 0xcb, 0x5, 0x59, 0x49, 0x58, 0xc8, 0x76, 0xff, 0x47, 0x4a, 0x2, 0xe, 0xf7, 0x3c, 0x1f, 0x9, 0xb1, 0xf7, 0xf7, 0x45, 0x7e, 0x81, 0x6d, 0x3a, 0xf5, 0x1d, 0x86, 0x66, 0x3d, 0x4d, 0x46, 0x17, 0x54, 0xcd, 0x5e, 0x90, 0x74, 0x56, 0x69, 0x1e, 0x2, 0x44, 0x6d, 0x6c, 0xac, 0xfd, 0x33, 0x51, 0x62, 0x6, 0xa3, 0x18, 0x70, 0x54, 0x3d, 0x57, 0x45, 0x92, 0x8, 0x77, 0x73, 0x65, 0x3d, 0x40, 0x86, 0xc2, 0xbd, 0xcb, 0xab, 0x3c, 0x9b, 0x65, 0xca, 0x11, 0xad, 0xd, 0x4e, 0x58, 0xdd, 0xda, 0x8b, 0x44, 0x3, 0x9, 0x98, 0x98, 0x57, 0x10, 0x39, 0x29, 0x54, 0x9b, 0x73, 0x0, 0xce, 0xd4, 0x26, 0x51, 0xd4, 0x8, 0x66, 0x61, 0x69, 0x40, 0x92, 0xc4, 0x28, 0x75, 0xcb, 0x62, 0x85, 0x8e, 0x6d, 0x1b, 0xe5, 0xf7, 0x27, 0x4b, 0x4b, 0xcd, 0x83, 0xaa, 0x4d, 0xa0, 0x5c, 0xac, 0xa1, 0x86, 0xa3, 0x9, 0x2, 0x83, 0x7, 0x90, 0xf9, 0xff, 0xa2, 0x44, 0x18, 0xe1, 0xf9, 0xdb, 0x0, 0xfa, 0x40, 0x47, 0x7e, 0x83, 0xb0, 0x5c, 0x2d, 0x11, 0xad, 0x7d, 0x81, 0xdd, 0xdb, 0x1e, 0x31, 0xf9, 0x4a, 0x9d, 0xd5, 0xe9, 0xe1, 0x33, 0x91, 0xc2, 0x24, 0x79, 0xb5, 0x70, 0x97, 0x6e, 0x3a, 0xfc, 0x1b, 0xe4, 0x10, 0x86, 0xd3, 0xbe, 0x66, 0x89, 0xd8, 0x7c, 0xa4, 0x32, 0x6a, 0x7c, 0xde, 0x8e, 0x5b, 0x39, 0x6a, 0x67, 0x8d, 0x3c, 0xdb, 0x2c, 0x80, 0xfe, 0xcf, 0xba, 0x2b, 0xc7, 0x99, 0xae, 0x8b, 0x15, 0x28, 0xe9, 0x6d, 0x88, 0xc, 0xd0, 0x98, 0xdd, 0xe9, 0x10, 0xd0, 0x97, 0xea, 0xae, 0x66, 0xa, 0xd4, 0xd7, 0xea, 0x51, 0xc1, 0x8f, 0x18, 0xaa, 0x1b, 0x39, 0x61, 0x42, 0x99, 0xa1, 0x72, 0x51, 0x25, 0x21, 0xdf, 0xd2, 0x31, 0xb9, 0x84, 0x9, 0x9, 0x83, 0x9e, 0xb6, 0x9c, 0x89, 0x2e, 0xe2, 0x3f, 0x1b, 0xce, 0xec, 0x1f, 0xad, 0xba, 0x75, 0x78, 0x6c, 0x7d, 0xed, 0x93, 0xbc, 0x99, 0x83, 0xf7, 0x4c, 0xea, 0xb3, 0x97, 0xeb, 0x8b, 0xa8, 0x4f, 0x7e, 0x41, 0x30, 0xb3, 0x42, 0x58, 0xd6, 0x28, 0x59, 0x4a, 0x6f, 0x9e, 0x23, 0x48, 0xfd, 0x91, 0xba, 0x25, 0x94, 0xe0, 0x7b, 0x80, 0x57, 0xe8, 0xa2, 0xae, 0x3a, 0xdf, 0xea, 0xe, 0xf9, 0x19, 0x55, 0x53, 0x85, 0x97, 0x70, 0x41, 0xc5, 0xb6, 0xdc, 0x4f, 0x38, 0x80, 0x56, 0x91, 0x71, 0xf7, 0x21, 0x7a, 0xaa, 0x9a, 0x85, 0xf2, 0xf5, 0xbb, 0xdf, 0xe3, 0xff, 0xdf, 0x79, 0x24, 0x8f, 0x2a, 0x35, 0xfd, 0x4d, 0xec, 0x34, 0x98, 0xc, 0x67, 0x29, 0x3, 0x39, 0xb1, 0xc0, 0xa5, 0xa6, 0xab, 0x88, 0x38, 0x15, 0x7a, 0xe2, 0xf5, 0x14, 0xb, 0x4a, 0x24, 0x92, 0x4a, 0x66, 0x88, 0xae, 0x5c, 0xe7, 0x2a, 0x48, 0x10, 0x3e, 0xe9, 0x2, 0x9c, 0xe8, 0xa0, 0xf1, 0x5b, 0x1f, 0xbb, 0x19, 0xa1, 0x2f, 0xaa, 0xb8, 0xa, 0x7c, 0xd9, 0xc0, 0xe3, 0x89, 0xfc, 0x27, 0x75, 0x83, 0x3e, 0x31, 0x90, 0xf1, 0xcf, 0x73, 0x5e, 0xcd, 0xfe, 0x7f, 0x6b, 0x6c, 0x32, 0x65, 0x6, 0xaa, 0x82, 0x61, 0x3c, 0xbe, 0xda, 0x8d, 0xd3, 0x69, 0x1b, 0x81, 0xf4, 0xc1, 0xe3, 0xb0, 0xfc, 0x32, 0xd7, 0xe6, 0x71, 0x9c, 0xbf, 0xc1, 0x2f, 0x4a, 0x26, 0xe0, 0xfc, 0x29, 0xd6, 0x41, 0x79, 0x53, 0xab, 0xc9, 0x56, 0x8d, 0xb4, 0xed, 0x9a, 0x29, 0x4b, 0x9f, 0xd5, 0xf2, 0xa6, 0x66, 0xdd, 0xa5, 0x46, 0xab, 0xa3, 0x1, 0xb1, 0xc6, 0x9, 0x85, 0x3, 0x39, 0x53, 0xef, 0xd6, 0xf4, 0x53, 0x83, 0x33, 0xb5, 0xc7, 0xdd, 0x31, 0x48, 0x81, 0x4a, 0x3f, 0xd7, 0x92, 0x7c, 0x36, 0x6f, 0x40, 0xb3, 0xd7, 0xab, 0xbd, 0xeb, 0x23, 0x32, 0xdd, 0xb5, 0x86, 0xaf, 0x80, 0x95, 0x90, 0x97, 0x66, 0x3c, 0xfa, 0xb2, 0xfe, 0xec, 0xad, 0x6d, 0x36, 0x8a, 0xe1, 0xe, 0xff, 0x96, 0x63, 0xd5, 0xf8, 0xba, 0xb9, 0x59, 0x35, 0xd2, 0x5f, 0x45, 0x77, 0x6f, 0x7f, 0x4, 0xb4, 0x68, 0x17, 0xd0, 0x51, 0x65, 0xa9, 0xdd, 0x47, 0x70, 0x50, 0x9a, 0xbb, 0x92, 0xf8, 0xb9, 0xe7, 0x37, 0x3c, 0xa7, 0x80, 0x70, 0x35, 0x69, 0x98, 0x17, 0x54, 0xa5, 0x1d, 0x6d, 0x37, 0x6d, 0x65, 0xc5, 0x7f, 0x55, 0xcd, 0x70, 0xe2, 0xdf, 0x5f, 0xdf, 0x5a, 0x6b, 0x82, 0x9a, 0xe3, 0xc, 0xe3, 0xbf, 0x94, 0x28, 0x15, 0xc8, 0xb4, 0xbe, 0x85, 0x8d, 0xb5, 0x81, 0x51, 0xd0, 0x2a, 0x68, 0xaa, 0xb9, 0xfd, 0x37, 0x3e, 0x4, 0x7e, 0xfa, 0x51, 0xbd, 0x1a, 0xc, 0xd1, 0xb6, 0x17, 0x44, 0xd9, 0xe9, 0x7c, 0xeb, 0xa3, 0x33, 0x4b, 0x3b, 0xaa, 0xfe, 0xa3, 0xbc, 0x9e, 0x43, 0xae, 0x9, 0x7c, 0xf2, 0xc3, 0xd7, 0x13, 0xee, 0xcc, 0x24, 0x7f, 0xf4, 0x3e, 0xc7, 0x4d, 0x54, 0x90, 0x7d, 0x8b, 0xf4, 0x5e, 0x45, 0xb2, 0xe0, 0xe1, 0x1d, 0x82, 0xb1, 0x26, 0xa8, 0x17, 0x9d, 0x3f, 0x66, 0xc0, 0x55, 0xe1, 0x1f, 0x69, 0xea, 0x67, 0xaa, 0xcc, 0x5f, 0xee, 0x8a, 0xf0, 0x1f, 0xaa, 0x37, 0x9e, 0x51, 0x99, 0x8f, 0x50, 0x70, 0xf9, 0xee, 0xf, 0xd3, 0xa, 0x2e, 0xb2, 0x2a, 0x92, 0x55, 0x86, 0xfb, 0x1b, 0x39, 0x2, 0x4e, 0xb5, 0xeb, 0x1e, 0x12, 0x7c, 0x76, 0xa1, 0x49, 0xe7, 0xf0, 0x2a, 0xf1, 0xb7, 0x3c, 0x16, 0xe9, 0xe5, 0xa5, 0xdb, 0xe3, 0x78, 0xe0, 0x8a, 0x9f, 0xad, 0xf1, 0x19, 0x4c, 0x62, 0x51, 0x32, 0xab, 0x3f, 0xde, 0xfe, 0x8f, 0xe9, 0xa8, 0x9b, 0xb8, 0xe0, 0x3, 0x5a, 0x1a, 0x3a, 0xc5, 0x27, 0x8f, 0x5d, 0x3d, 0xa, 0xde, 0xe, 0x41, 0xc8, 0x1c, 0x68, 0x53, 0xa4, 0x1c, 0x4a, 0xc4, 0x5b, 0xe3, 0xf6, 0x81, 0x80, 0xfe, 0x23, 0xf2, 0x7f, 0x18, 0xbe, 0x2e, 0x33, 0x9d, 0xe1, 0xd5, 0x59, 0xd7, 0x5d, 0xe6, 0x3a, 0xdf, 0x7a, 0x32, 0xba, 0xe4, 0x2b, 0x3, 0x7a, 0xea, 0xa3, 0xe1, 0x23, 0xa5, 0x31, 0x48, 0x91, 0xbc, 0xd3, 0x5c, 0xa4, 0x8d, 0x57, 0xdf, 0x4c, 0x17, 0x54, 0xe, 0x97, 0x20, 0x2a, 0x8e, 0xa1, 0x32, 0x8d, 0xa2, 0x5b, 0x1f, 0xd6, 0xbe, 0x2b, 0x56, 0xae, 0xc1, 0xe5, 0xde, 0xb2, 0x9, 0xf3, 0xb7, 0xa1, 0x3a, 0xdb, 0x1c, 0xbe, 0x53, 0xeb, 0x64, 0x59, 0x56, 0xe5, 0x77, 0xa7, 0x62, 0x1d, 0x74, 0xe4, 0x23, 0x76, 0xd7, 0xb, 0xc5, 0xc4, 0xaa, 0xcd, 0x23, 0x9a, 0x85, 0x2f, 0xbb, 0x7b, 0x3f, 0x62, 0xcf, 0x59, 0xfe, 0x10, 0x43, 0x8c, 0x1d, 0xc8, 0xe1, 0xe4, 0x65, 0x66, 0x32, 0x5d, 0xa0, 0xca, 0x43, 0xaa, 0xa6, 0x3f, 0xb7, 0xe0, 0xb4, 0x50, 0xa2, 0xdb, 0x3e, 0x3a, 0x22, 0x4, 0x70, 0x4d, 0x89, 0x4d, 0xb2, 0x4b, 0x72, 0xb3, 0x7, 0x81, 0x6, 0xe0, 0x96, 0xcd, 0x54, 0x3d, 0xcf, 0x2, 0x76, 0x50, 0xcb, 0x49, 0x65, 0xe3, 0x8a, 0xc3, 0x6a, 0x8a, 0xd5, 0x88, 0xc5, 0x96, 0x2b, 0x4e, 0x26, 0x54, 0x8a, 0xb8, 0x8f, 0xb, 0xc2, 0xe, 0x10, 0xac, 0xc1, 0xc3, 0xfc, 0x0, 0xef, 0x41, 0x5b, 0x3c, 0x32, 0x49, 0x92, 0x64, 0x55, 0x2b, 0x14, 0xe2, 0xc0, 0xe7, 0x89, 0xa3, 0xb8, 0xa8, 0xbf, 0xf9, 0x62, 0xf, 0xd9, 0x39, 0xd0, 0xb3, 0x4e, 0x80, 0x61, 0x77, 0xec, 0x69, 0x6a, 0x4b, 0x3b, 0x1c, 0xa4, 0xb3, 0x2b, 0xa9, 0x79, 0xb2, 0x69, 0xc, 0xfb, 0x3a, 0x6b, 0x17, 0xbc, 0xee, 0x68, 0x77, 0xff, 0xce, 0x75, 0x7e, 0x41, 0x16, 0xda, 0x1, 0x9, 0x9f, 0xfe, 0x82, 0xad, 0xd5, 0xa0, 0xc5, 0x93, 0xe7, 0x34, 0x49, 0xa9, 0x6d, 0xb9, 0xcc, 0x2b, 0x9e, 0x84, 0x6d, 0x16, 0x6b, 0x9, 0x51, 0x74, 0xf2, 0xca, 0xf8, 0xb3, 0x5d, 0xd8, 0x78, 0xc8, 0x36, 0xd9, 0xbb, 0x6e, 0xee, 0xaf, 0x8e, 0x1b, 0xc5, 0xd0, 0xe1, 0x49, 0xc7, 0x39, 0x82, 0x8c, 0xc4, 0x80, 0xd7, 0x31, 0xdc, 0x16, 0xb3, 0x5b, 0x80, 0xd4, 0xad, 0x82, 0xed, 0x7d, 0x29, 0xbd, 0x5, 0x1, 0x82, 0x39, 0xef, 0xec, 0xf8, 0xde, 0xae, 0x18, 0xc, 0x6a, 0x45, 0x9d, 0xbc, 0xbf, 0xe4, 0xaa, 0xb9, 0xa5, 0xe2, 0xc1, 0xe1, 0xbc, 0x31, 0x41, 0x8c, 0xf2, 0xee, 0xeb, 0x31, 0xfd, 0xf8, 0xba, 0x2, 0xc9, 0xa9, 0x15, 0x25, 0xe9, 0x16, 0x3f, 0x67, 0x2b, 0xae, 0x2e, 0xde, 0xc3, 0x8c, 0x1b, 0xdb, 0x84, 0xea, 0x23, 0x7b, 0x4e, 0xf8, 0x6b, 0xf5, 0xc0, 0xf0, 0xff, 0xe1, 0x78, 0xe3, 0x76, 0x1e, 0x82, 0xd9, 0x4f, 0x66, 0xe5, 0xea, 0x40, 0xba, 0x81, 0x70, 0xbf, 0x76, 0x84, 0x9, 0xe1, 0xb4, 0x17, 0x7a, 0xaf, 0xd9, 0x93, 0x7b, 0xce, 0x3f, 0xbf, 0xf5, 0x90, 0x32, 0xd, 0x7c, 0x44, 0x53, 0x72, 0x46, 0x3f, 0xbb, 0xfb, 0x34, 0xf5, 0x74, 0x47, 0xf4, 0x2c, 0x16, 0xe0, 0x26, 0xf1, 0x79, 0xcb, 0xf8, 0x2f, 0x61, 0x7c, 0x86, 0xd1, 0xe8, 0xd4, 0x2f, 0x6c, 0x90, 0x8f, 0x9c, 0x6b, 0x77, 0xe3, 0x8d, 0x25, 0xd5, 0x13, 0x3, 0xdb, 0xd7, 0x81, 0xff, 0xab, 0x56, 0x9b, 0x4c, 0xf3, 0x1f, 0xd0, 0xb9, 0x47, 0xc4, 0x5e, 0x17, 0x68, 0xa2, 0xe9, 0xdf, 0xe8, 0x36, 0x9f, 0x52, 0xd, 0xc3, 0x8d, 0x77, 0x93, 0x7b, 0x69, 0xb8, 0x21, 0xdb, 0x4f, 0xfe, 0xa8, 0xf5, 0xe, 0xbc, 0x40, 0x4f, 0x5, 0x87, 0xb5, 0x59, 0x81, 0x89, 0xf5, 0x4b, 0x5a, 0x5b, 0x98, 0x96, 0x6f, 0xd1, 0x68, 0x1, 0xc8, 0x7d, 0xe2, 0xc3, 0xc7, 0x81, 0x3d, 0xd7, 0xd, 0xc6, 0x0, 0x82, 0x4d, 0x42, 0x6d, 0x88, 0xc5, 0x5e, 0x89, 0xd4, 0x72, 0x14, 0xd5, 0x92, 0x6, 0xa7, 0xa6, 0x5a, 0x65, 0xda, 0x7c, 0xa2, 0xe4, 0x2f, 0xa6, 0x2e, 0xd1, 0x7e, 0x7a, 0xa5, 0xb3, 0xed, 0x44, 0x6b, 0xcc, 0x71, 0xf1, 0x7f, 0xec, 0x85, 0x93, 0xbe, 0x96, 0xd2, 0x3, 0x7b, 0xd0, 0x7f, 0x94, 0x76, 0xd4, 0xd7, 0x32, 0xb3, 0x2b, 0xc5, 0xdf, 0x8c, 0x92, 0x13, 0x16, 0xb4, 0x56, 0x99, 0x0, 0x47, 0x16, 0xfc, 0x89, 0xf8, 0xd4, 0x5b, 0xae, 0x40, 0x2c, 0x26, 0xdb, 0xcd, 0xf1, 0xa3, 0x40, 0x84, 0x7b, 0x93, 0x2f, 0xf8, 0x82, 0xdb, 0xea, 0xfb, 0xed, 0xd2, 0x52, 0xe1, 0x26, 0xc8, 0x9a, 0x1e, 0x1f, 0xdd, 0x89, 0x8, 0xa1, 0xf6, 0x7d, 0x15, 0xd8, 0xe4, 0x32, 0xda, 0xd8, 0xe0, 0x8e, 0x95, 0xa, 0x3b, 0xc4, 0x6b, 0x96, 0xcb, 0x89, 0xcc, 0x5b, 0xda, 0xc7, 0x3, 0xb3, 0xfa, 0x3e, 0x98, 0x6e, 0xf1, 0xc6, 0xe7, 0xe6, 0x60, 0x6e, 0x68, 0x45, 0xba, 0x1e, 0xb2, 0xfb, 0xdc, 0xfe, 0xe7, 0x44, 0xb5, 0xe4, 0x52, 0x6, 0xf4, 0xa4, 0x19, 0xe1, 0xcb, 0x10, 0x3c, 0x84, 0x90, 0xeb, 0x29, 0x3e, 0xe9, 0xae, 0xc1, 0xf0, 0xa0, 0xd2, 0x94, 0xf9, 0xd3, 0x84, 0x77, 0x37, 0x41, 0x3d, 0x30, 0x87, 0x3f, 0x3c, 0x94, 0x74, 0xe, 0x8f, 0xd0, 0x72, 0x81, 0x78, 0x15, 0xeb, 0xbc, 0xe3, 0xf0, 0x9e, 0xde, 0xc9, 0xd1, 0x21, 0x1a, 0x9e, 0x99, 0x54, 0x7d, 0x62, 0xb, 0x2e, 0xc5, 0x6c, 0x89, 0xe9, 0xcb, 0x81, 0x44, 0xae, 0x9e, 0x46, 0x63, 0x63, 0x24, 0xbd, 0x13, 0xc6, 0xcc, 0xa3, 0xab, 0x9c, 0xd9, 0xfd, 0x8f, 0x7f, 0x93, 0x7a, 0xba, 0xbc, 0x59, 0x82, 0x32, 0x38, 0x44, 0x27, 0xa2, 0xd4, 0xce, 0xc, 0xbf, 0x97, 0x65, 0xf7, 0x22, 0x5e, 0x20, 0x8c, 0x3c, 0xe1, 0x28, 0x60, 0x2b, 0xa, 0xd0, 0x8a, 0x1b, 0xaa, 0xb7, 0x7e, 0xdb, 0x31, 0x11, 0xf0, 0xc6, 0xca, 0x7b, 0xa0, 0xea, 0xc9, 0xd8, 0x9d, 0x5b, 0x43, 0x78, 0xeb, 0x82, 0xc1, 0x7f, 0x6e, 0xa0, 0x83, 0x8, 0xa7, 0x9a, 0x53, 0xd1, 0x50, 0xd3, 0xf8, 0x5e, 0xfa, 0xb7, 0x72, 0x94, 0xf0, 0x2e, 0xe0, 0xe2, 0x88, 0x5e, 0xe2, 0xab, 0x27, 0x93, 0x39, 0x2b, 0x87, 0xdb, 0x11, 0xfa, 0x77, 0x99, 0x2f, 0x5b, 0x4f, 0xd7, 0x5e, 0xf2, 0xf1, 0xa8, 0x22, 0xe8, 0x74, 0x7, 0xa4, 0x87, 0x88, 0x94, 0x21, 0x5a, 0xb8, 0x9b, 0x6c, 0xc4, 0xa1, 0x20, 0xf5, 0xa7, 0x8b, 0x3c, 0x31, 0xab, 0x80, 0xff, 0xcc, 0x9a, 0xce, 0xf5, 0x3f, 0xc6, 0xf7, 0xf8, 0x56, 0x85, 0xeb, 0x9d, 0x56, 0xd3, 0xd, 0x87, 0xc2, 0x1a, 0xbb, 0xf1, 0x65, 0x2e, 0xef, 0x8f, 0x32, 0xc7, 0xc5, 0x67, 0xbd, 0x1f, 0x8, 0x62, 0x3b, 0x9, 0xc2, 0x9f, 0x33, 0x56, 0x1d, 0x42, 0x72, 0x7a, 0x56, 0x49, 0xa3, 0x85, 0x0, 0x71, 0xaa, 0x6c, 0x11, 0x73, 0x5a, 0xe6, 0x3c, 0x4f, 0xd3, 0x15, 0x59, 0xce, 0x56, 0xb, 0x27, 0xa3, 0x62, 0x78, 0x6a, 0x83, 0x35, 0x3f, 0xe4, 0x60, 0xb3, 0x70, 0x74, 0x66, 0x4a, 0x94, 0x21, 0xd3, 0xb2, 0xf6, 0xa8, 0x64, 0xd5, 0xac, 0xa0, 0x87, 0x18, 0x7b, 0x27, 0xe2, 0xb8, 0x2f, 0x31, 0xcb, 0x3d, 0xf5, 0xe9, 0x85, 0xce, 0xa2, 0x71, 0xc6, 0x9, 0xb9, 0x4b, 0x4e, 0x58, 0x35, 0x6d, 0x40, 0xc7, 0xd5, 0xc7, 0xff, 0x2e, 0x59, 0x90, 0xfb, 0x39, 0x58, 0x81, 0x54, 0x84, 0x3e, 0xa5, 0xfc, 0xa9, 0x2f, 0x12, 0x0, 0x75, 0xd4, 0xc4, 0xd0, 0x6, 0x66, 0x1a, 0xf, 0xa1, 0xb0, 0x58, 0x54, 0x54, 0xbe, 0xa7, 0x25, 0x47, 0x3e, 0xef, 0x7d, 0x58, 0x11, 0x7d, 0x58, 0x40, 0xc8, 0x34, 0x89, 0x99, 0x0, 0x37, 0x36, 0xc5, 0xee, 0xb7, 0x85, 0x8f, 0xfd, 0x27, 0x3a, 0x1c, 0x3e, 0xb2, 0x81, 0x2f, 0x56, 0x97, 0xc5, 0x91, 0x10, 0x27, 0x5b, 0x8, 0xf6, 0xbe, 0xfb, 0xe8, 0x4c, 0x92, 0x49, 0x7d, 0x5f, 0x73, 0xb7, 0xb6, 0xf7, 0x94, 0xa8, 0x49, 0x71, 0x3b, 0x23, 0xac, 0x5f, 0x29, 0xd5, 0xc7, 0x11, 0x2f, 0xb2, 0xe7, 0xa6, 0xe8, 0x9e, 0xb5, 0x4d, 0xdf, 0xa3, 0x12, 0x2e, 0x6c, 0x79, 0x62, 0x4c, 0x1b, 0xf2, 0x5e, 0xbf, 0xb9, 0xfe, 0x5c, 0xe6, 0xda, 0xa7, 0x79, 0xf3, 0xec, 0xb2, 0x98, 0x4d, 0xa4, 0x2f, 0x8c, 0x6a, 0xdc, 0x77, 0xb2, 0x1d, 0xd2, 0x91, 0xe6, 0x84, 0xfc, 0xa5, 0xe, 0x46, 0x7, 0x9, 0x62, 0xa2, 0xd4, 0xf0, 0x8, 0x13, 0xd8, 0xde, 0x1b, 0x8e, 0xd3, 0x3f, 0xed, 0x97, 0x15, 0x18, 0xc, 0x7e, 0xa8, 0xe2, 0xbb, 0x74, 0xfa, 0x65, 0xd9, 0xc7, 0xf6, 0xe1, 0x42, 0xf3, 0xc8, 0x1c, 0xdc, 0x59, 0x17, 0x2e, 0x10, 0x20, 0xf6, 0x2f, 0x65, 0xca, 0x5a, 0x12, 0xcf, 0x2b, 0xed, 0x9d, 0xea, 0x4, 0xa4, 0xd8, 0xca, 0xbc, 0x29, 0x48, 0xf7, 0xbe, 0x82, 0x3a, 0x3e, 0x79, 0x26, 0x25, 0x27, 0x5b, 0x39, 0x25, 0xa6, 0xc8, 0xd8, 0xe2, 0xb4, 0x28, 0xc7, 0x5a, 0x5d, 0xb0, 0xf7, 0x12, 0x2, 0x78, 0xcd, 0x7d, 0x6c, 0xab, 0x76, 0x87, 0x55, 0xc7, 0xfe, 0x2f, 0xbf, 0x89, 0xfd, 0xed, 0x1f, 0xb3, 0x8a, 0xc7, 0xf7, 0x6a, 0x2f, 0x87, 0x98, 0xca, 0x36, 0xed, 0x42, 0xcb, 0x7c, 0x7, 0xf0, 0x6, 0x27, 0x12, 0x5, 0xf5, 0x46, 0xa4, 0x81, 0x2c, 0x20, 0x7, 0x7f, 0x5, 0xd, 0x4c, 0xdc, 0x79, 0x45, 0x9f, 0xa6, 0x86, 0xe9, 0x7f, 0x7, 0x4, 0xb7, 0xa9, 0xff, 0x7d, 0xe1, 0x63, 0x18, 0xe8, 0x62, 0xc5, 0x3d, 0x36, 0x1b, 0xc6, 0x35, 0xa5, 0x5a, 0x26, 0x4b, 0xe1, 0x50, 0x16, 0x54, 0x5d, 0xbf, 0xce, 0x3c, 0x6d, 0x68, 0x49, 0x57, 0x6a, 0xde, 0xfb, 0x68, 0x84, 0xed, 0xd7, 0x68, 0x21, 0x4e, 0xb, 0x43, 0x8b, 0x2, 0x31, 0xb4, 0xf2, 0x69, 0x2c, 0x2c, 0xb, 0x5c, 0x17, 0x76, 0x74, 0xf8, 0xa0, 0xde, 0x23, 0x6e, 0xac, 0xd9, 0xe0, 0xce, 0xc7, 0xc8, 0x64, 0x7e, 0x4e, 0x9a, 0x58, 0x61, 0xb9, 0x57, 0xec, 0x83, 0x4a, 0x2f, 0x85, 0x72, 0xf0, 0x13, 0x4, 0xc3, 0xfd, 0x6a, 0x6, 0x1, 0x9e, 0x5f, 0x14, 0x99, 0xb6, 0x2b, 0xaa, 0x86, 0x70, 0xb6, 0x52, 0x46, 0x7f, 0xa9, 0xa4, 0xf1, 0xf, 0x5, 0x32, 0x63, 0xbf, 0xe9, 0x74, 0x3c, 0xc7, 0xd9, 0x33, 0xf8, 0x61, 0x36, 0xaa, 0xe3, 0xa6, 0xfb, 0x56, 0x75, 0x4d, 0x7d, 0x23, 0x83, 0x97, 0xa0, 0x3, 0xc, 0xeb, 0xea, 0x87, 0xcb, 0x25, 0x5a, 0xf3, 0x61, 0x38, 0xc3, 0x73, 0xdb, 0xba, 0xc4, 0x1d, 0xd4, 0xa6, 0x97, 0x3, 0x2e, 0x47, 0x96, 0xc5, 0x52, 0xad, 0x9c, 0x9b, 0x3f, 0xa7, 0x13, 0xc3, 0xa4, 0xe0, 0x9e, 0xe, 0xc5, 0x58, 0x1e, 0x94, 0xbe, 0x7f, 0x31, 0x6, 0x51, 0x57, 0x66, 0x2f, 0x9e, 0x9c, 0x67, 0x8b, 0x1e, 0xf1, 0xb8, 0xb8, 0xa8, 0x47, 0xc5, 0x17, 0x89, 0xc2, 0x2b, 0x18, 0x41, 0xbc, 0xfc, 0x85, 0x58, 0x20, 0xaf, 0x32, 0x58, 0xaf, 0x9e, 0x8, 0x23, 0x10, 0x90, 0xb4, 0x5d, 0x10, 0x4, 0x6a, 0x0, 0x17, 0x8e, 0x89, 0xbd, 0x51, 0x56, 0x16, 0xb8, 0xa4, 0x4e, 0x77, 0xbf, 0x57, 0x79, 0x5d, 0xab, 0xaf, 0x40, 0x68, 0x7b, 0x2c, 0xda, 0x7a, 0x50, 0x14, 0x16, 0x8f}, - output224: []byte{0x98, 0xe4, 0xc, 0x17, 0x6c, 0x8c, 0x8e, 0xc4, 0x6a, 0xb9, 0x40, 0x68, 0x8d, 0x47, 0x97, 0x8b, 0x8d, 0x1c, 0xac, 0xef, 0xf3, 0x7c, 0x70, 0xf, 0xdd, 0x6, 0xcb, 0xb5}, - output256: []byte{0x4b, 0xa1, 0x50, 0xc2, 0xf4, 0xdb, 0x24, 0x49, 0x51, 0x5c, 0xc9, 0xb5, 0x45, 0xec, 0x0, 0x12, 0x74, 0x73, 0x24, 0x70, 0xd, 0xa, 0xc1, 0xe5, 0x54, 0xea, 0xb8, 0x4a, 0x26, 0x2b, 0xaf, 0x0}, - output384: []byte{0x97, 0x8a, 0x5c, 0x74, 0xca, 0xb4, 0xd5, 0xb7, 0x73, 0xad, 0xf6, 0x4c, 0xab, 0xec, 0xd, 0xe0, 0x36, 0xd0, 0x87, 0xe0, 0x41, 0xf6, 0xc1, 0xa9, 0x85, 0x53, 0xc, 0x22, 0x50, 0xd2, 0x83, 0xfa, 0xaa, 0x7f, 0xfa, 0xa0, 0x14, 0x25, 0x88, 0x69, 0x4e, 0x67, 0x24, 0x5b, 0xba, 0x56, 0xb9, 0xc8}, - output512: []byte{0x29, 0xe5, 0xcd, 0x96, 0x9, 0x9c, 0x48, 0x34, 0xfd, 0xe, 0xcb, 0xe8, 0x13, 0x26, 0x21, 0xd0, 0x34, 0x5b, 0xe3, 0xdf, 0xc, 0x7a, 0xb9, 0xb8, 0xb8, 0x6d, 0x91, 0xe8, 0x7f, 0xd8, 0xaf, 0xa0, 0xa4, 0xf2, 0x9, 0x50, 0x6b, 0x8d, 0x8f, 0xba, 0xba, 0x15, 0x4a, 0xc6, 0x55, 0x52, 0xbe, 0x5f, 0x5c, 0x6b, 0xef, 0xea, 0x1d, 0xb6, 0x64, 0xbc, 0x55, 0x8f, 0x57, 0x48, 0xa, 0x31, 0x26, 0xb4}}, - testcase{ - msg: []byte{0x93, 0xb0, 0x1f, 0x62, 0xe3, 0xcb, 0x96, 0x58, 0xb4, 0x80, 0x93, 0x61, 0xda, 0x42, 0xe9, 0x7, 0x4e, 0x31, 0x1b, 0x9d, 0x63, 0x27, 0x76, 0xd3, 0x2a, 0x2a, 0x3e, 0x1b, 0xf1, 0x68, 0xc7, 0xa6, 0x17, 0x3e, 0x44, 0x9f, 0x5e, 0xe4, 0x83, 0xff, 0x20, 0xb6, 0x3, 0x3, 0x62, 0xa4, 0x71, 0xfb, 0x3f, 0x2, 0x66, 0x3d, 0x9d, 0x86, 0x2a, 0x5, 0x76, 0x7c, 0xbc, 0x32, 0x21, 0x1d, 0x47, 0xef, 0xa5, 0x46, 0x7, 0xc0, 0x52, 0xbe, 0xe3, 0xec, 0xbc, 0x21, 0x1c, 0x7d, 0xe6, 0xe, 0xa8, 0x3b, 0xff, 0x16, 0x38, 0xf8, 0xf, 0x20, 0x3a, 0xc6, 0x67, 0x5a, 0x7, 0x75, 0x6c, 0xe1, 0x49, 0xa5, 0x69, 0x3, 0xf7, 0x8d, 0xb2, 0x1, 0x8d, 0xba, 0xfe, 0xf1, 0xb9, 0x3f, 0xca, 0xda, 0xfb, 0x63, 0x9a, 0x18, 0x41, 0x55, 0xee, 0x7a, 0x2a, 0xa9, 0xe4, 0x9d, 0xc6, 0x67, 0x1, 0x22, 0x98, 0xb1, 0xd4, 0x89, 0x14, 0x3f, 0xf2, 0x3, 0xf9, 0x39, 0xe8, 0xa8, 0x26, 0x29, 0xb, 0x95, 0xcc, 0x4c, 0x45, 0xa6, 0xfb, 0x25, 0xa4, 0x68, 0x7e, 0x58, 0x23, 0x28, 0xce, 0x2d, 0x96, 0x90, 0x95, 0xa, 0x32, 0xfd, 0xc5, 0xb5, 0xf0, 0x5f, 0x39, 0x58, 0x2c, 0x8c, 0x68, 0x90, 0x40, 0xcd, 0x4f, 0xed, 0xd7, 0x91, 0x9c, 0x5b, 0xb9, 0xdd, 0xcc, 0xef, 0xb1, 0x27, 0x75, 0xf, 0x27, 0x76, 0xb9, 0x1, 0xed, 0xaf, 0x71, 0x73, 0xe9, 0xc, 0x3, 0x54, 0xfb, 0x37, 0x5c, 0x62, 0x49, 0xc9, 0x35, 0x89, 0x6, 0x32, 0xb8, 0x6d, 0xfb, 0x37, 0xe4, 0x75, 0xfc, 0x48, 0xe, 0x4a, 0xce, 0xb7, 0x2, 0xf9, 0x35, 0x3d, 0x25, 0xe, 0xf7, 0x3a, 0xc0, 0x75, 0xb0, 0xbb, 0x6c, 0x6b, 0x2f, 0x3, 0x16, 0x84, 0x2b, 0x19, 0xac, 0xca, 0xe8, 0xe0, 0x84, 0xf0, 0x73, 0x95, 0x33, 0xe3, 0xe3, 0xd6, 0x2c, 0x5f, 0xc1, 0x7, 0x3, 0x39, 0x37, 0xed, 0xbf, 0x1e, 0xc9, 0x5e, 0x92, 0x51, 0x2d, 0xbd, 0xda, 0xea, 0xac, 0x8b, 0xdd, 0xc2, 0xcb, 0x8e, 0xc3, 0x48, 0x8e, 0xef, 0xeb, 0x62, 0xa1, 0xfe, 0x84, 0x49, 0x1, 0xbc, 0x12, 0xd9, 0xa0, 0xab, 0xdd, 0x8d, 0xa4, 0xa0, 0x6f, 0x7b, 0x9a, 0x9f, 0x9, 0x57, 0x61, 0xdd, 0x80, 0xe8, 0x91, 0xd2, 0x24, 0x5e, 0x5d, 0x35, 0x9b, 0x39, 0xc2, 0xe4, 0x61, 0xba, 0x80, 0xe3, 0x3e, 0x1b, 0xf7, 0xc5, 0x32, 0xa8, 0xc7, 0xcb, 0x35, 0x0, 0x2d, 0xeb, 0x5d, 0xdd, 0x49, 0xcb, 0x11, 0x3c, 0x4e, 0xa2, 0x14, 0xc0, 0x4b, 0x95, 0xc4, 0xa5, 0xa6, 0x8f, 0x68, 0xf5, 0x13, 0xd9, 0xb4, 0x70, 0x45, 0x9c, 0xd8, 0x74, 0x89, 0xe7, 0xe1, 0x3, 0xd1, 0x9b, 0xfe, 0x1e, 0xc3, 0xaa, 0x82, 0x69, 0xa6, 0x11, 0xf0, 0xa5, 0x16, 0x40, 0x82, 0x32, 0xe3, 0x96, 0x46, 0x3d, 0xad, 0x84, 0x2d, 0xc, 0x1e, 0x92, 0xb2, 0x5e, 0x9a, 0x3c, 0xa1, 0x69, 0x6a, 0x5f, 0x2a, 0x68, 0x4c, 0x23, 0xdd, 0xe0, 0xa6, 0xb3, 0xf2, 0xff, 0x2e, 0xa1, 0xd9, 0x56, 0xd5, 0xe6, 0xaf, 0x67, 0xf7, 0xd7, 0x2e, 0x3d, 0x6, 0x92, 0x93, 0xe, 0x44, 0x6a, 0xaa, 0xe1, 0x83, 0x73, 0x86, 0x1a, 0x95, 0x21, 0xd6, 0x7c, 0xf7, 0x41, 0xc6, 0x1e, 0xea, 0xb4, 0xe8, 0xd7, 0xa3, 0xf4, 0x96, 0xee, 0xfa, 0xc6, 0x78, 0xb, 0xfb, 0x82, 0x6b, 0x53, 0x2b, 0xc8, 0x68, 0xb7, 0x56, 0x9, 0xb1, 0xbe, 0x86, 0xf9, 0xec, 0x24, 0x97, 0x32, 0xa8, 0x31, 0xa6, 0xa8, 0xa4, 0x90, 0xe2, 0xbb, 0x60, 0xba, 0x62, 0x8d, 0x14, 0x4b, 0xe1, 0x95, 0x2, 0xeb, 0x99, 0x91, 0xe, 0x31, 0x30, 0xe5, 0x65, 0x8f, 0xb5, 0xe3, 0x34, 0x8c, 0xe9, 0xdd, 0x3, 0xe, 0x68, 0xa5, 0x19, 0x40, 0x71, 0x97, 0xf5, 0x63, 0xb3, 0x65, 0xf2, 0x37, 0x81, 0x6d, 0x9f, 0x68, 0x3c, 0x5b, 0x73, 0x6c, 0x40, 0xb2, 0x36, 0xfa, 0x4a, 0xc9, 0xce, 0xc9, 0xa0, 0xcf, 0x8d, 0x5b, 0x54, 0xd5, 0xab, 0x36, 0x9, 0x13, 0x1a, 0x5a, 0xe, 0x6b, 0xb4, 0xc4, 0xca, 0xca, 0x24, 0xaa, 0xe1, 0x98, 0x9f, 0x18, 0x59, 0xd1, 0xcd, 0x55, 0x4c, 0xef, 0x5, 0xfd, 0x31, 0x22, 0xf, 0x7f, 0x46, 0xcc, 0x2e, 0x2d, 0x94, 0xc7, 0xb9, 0x48, 0x40, 0x73, 0x5a, 0xf, 0x3a, 0x70, 0xa5, 0x56, 0xd7, 0xe5, 0xf4, 0x84, 0x51, 0x23, 0xcf, 0x16, 0xdd, 0xfb, 0x56, 0x33, 0x46, 0xb9, 0x3, 0x5c, 0xcb, 0x34, 0x22, 0x19, 0x7b, 0x2f, 0x88, 0x5, 0xed, 0x2d, 0x3f, 0x6a, 0x15, 0xbc, 0xc0, 0x22, 0x9, 0xb4, 0xf, 0xa7, 0x60, 0x9a, 0xa8, 0x6f, 0xb6, 0xb9, 0x1f, 0x76, 0x5a, 0xa1, 0x89, 0xe2, 0x83, 0x14, 0x85, 0x17, 0x93, 0x1e, 0xde, 0xf, 0x19, 0x55, 0x2c, 0x94, 0x5a, 0x34, 0x1b, 0x1d, 0x69, 0x3c, 0xef, 0x1, 0x67, 0xeb, 0xb3, 0x82, 0x93, 0x3f, 0xdc, 0xa1, 0xe9, 0xd5, 0xb5, 0xe2, 0xf0, 0xd8, 0x81, 0xae, 0x12, 0x65, 0xe6, 0x7e, 0x39, 0x79, 0x3a, 0xbf, 0x65, 0x2b, 0x2d, 0xf9, 0x81, 0x39, 0x51, 0xd4, 0x33, 0x5d, 0x98, 0x86, 0x70, 0xff, 0xbc, 0x2b, 0x9c, 0x98, 0xeb, 0xae, 0xc7, 0x16, 0xd1, 0x3d, 0x22, 0x1d, 0x8c, 0x44, 0x84, 0x74, 0xed, 0x81, 0x3c, 0x1d, 0xfa, 0x3e, 0xe8, 0xf8, 0xbc, 0xde, 0x51, 0x79, 0x2e, 0x87, 0xf7, 0x97, 0xa4, 0xef, 0xd8, 0x0, 0x3e, 0xcc, 0x9b, 0x27, 0x4d, 0xf, 0x86, 0x93, 0xae, 0x56, 0x57, 0x62, 0x9d, 0xa8, 0xe1, 0x24, 0x68, 0x52, 0x4e, 0xe8, 0xff, 0x1e, 0x67, 0x90, 0xdf, 0x8, 0xe9, 0xaf, 0x5, 0xb1, 0xc6, 0xc0, 0x61, 0xe6, 0xa2, 0x4c, 0xf9, 0x52, 0xba, 0xf4, 0xce, 0x54, 0x40, 0xf, 0x3a, 0x1e, 0x22, 0x3c, 0xc, 0x18, 0x1c, 0xe9, 0x74, 0xeb, 0x41, 0x36, 0x64, 0xdb, 0x47, 0xbd, 0xcd, 0x62, 0xa0, 0xc3, 0x68, 0xf8, 0xd4, 0xc2, 0xeb, 0x45, 0x7b, 0xc5, 0xe7, 0x55, 0x4b, 0x0, 0xe9, 0xda, 0x62, 0x18, 0x5, 0xd9, 0x7f, 0x67, 0x72, 0x2, 0x39, 0x0, 0x79, 0xbd, 0xd8, 0x17, 0x17, 0x96, 0xdc, 0x51, 0xb1, 0xad, 0xc2, 0x77, 0x23, 0xce, 0x76, 0xf4, 0xfc, 0x19, 0x77, 0xb1, 0xb0, 0xf8, 0x82, 0x59, 0x9c, 0x8c, 0x4a, 0x12, 0x76, 0xb9, 0x90, 0x91, 0x20, 0x3, 0xb2, 0xd2, 0xbc, 0x9e, 0x8e, 0xf9, 0x95, 0xbf, 0xc3, 0xd2, 0x99, 0x37, 0x83, 0x68, 0x8e, 0x1d, 0x7f, 0xf5, 0x3e, 0xaa, 0x16, 0x70, 0xa, 0x4f, 0xd1, 0x50, 0x34, 0xf, 0x84, 0x63, 0xd, 0x1c, 0xf9, 0xf, 0x9d, 0xa0, 0xc9, 0x69, 0xa4, 0xac, 0xda, 0x92, 0xc7, 0xc7, 0xad, 0xc9, 0xbb, 0x3f, 0xb, 0x22, 0xb7, 0x4e, 0x95, 0x6f, 0xcf, 0xf9, 0x0, 0x5b, 0x5, 0x94, 0x51, 0xad, 0xd0, 0xe9, 0x9, 0x78, 0x43, 0xf4, 0x3e, 0x98, 0xf, 0x5c, 0xad, 0x99, 0x42, 0x1, 0x8c, 0x6a, 0x80, 0x1f, 0x77, 0x9f, 0x4, 0x72, 0x1d, 0x68, 0x96, 0x97, 0x6b, 0xdd, 0x27, 0x48, 0xb3, 0xf2, 0xb2, 0xe2, 0xda, 0x69, 0x2, 0x14, 0xaf, 0xd6, 0xaf, 0xd2, 0x17, 0x2a, 0xe2, 0x9b, 0xfd, 0x6b, 0x7, 0x1c, 0xe2, 0xd6, 0x93, 0x81, 0x4a, 0x79, 0xae, 0x8, 0x3e, 0x9b, 0x1d, 0xad, 0x64, 0x74, 0xec, 0xeb, 0x54, 0x7c, 0xb1, 0x8d, 0x55, 0xd2, 0x4f, 0x98, 0xe8, 0xd5, 0xa3, 0x43, 0x69, 0xa, 0xf, 0xfb, 0x96, 0xf7, 0xf3, 0x21, 0x3e, 0xb1, 0xa1, 0x1a, 0x7b, 0xdd, 0x6c, 0x37, 0x7a, 0x2d, 0x9e, 0x85, 0xbf, 0xb7, 0xd0, 0x9c, 0x53, 0xa1, 0x36, 0x40, 0xf0, 0x41, 0x7b, 0xd0, 0x36, 0x6b, 0x31, 0xf4, 0x82, 0xc2, 0xd8, 0xb5, 0x58, 0xdd, 0xfb, 0x3a, 0xb4, 0xe6, 0xfa, 0x99, 0xdf, 0xfa, 0x64, 0x4b, 0xd6, 0x93, 0xde, 0x92, 0x4, 0xa1, 0xb6, 0x1e, 0xa, 0xd7, 0x90, 0xf8, 0x3e, 0xcb, 0xa5, 0xd4, 0x45, 0xb3, 0xed, 0x1c, 0x7d, 0x4a, 0x68, 0x6d, 0x2a, 0xb0, 0x14, 0xeb, 0xa7, 0x80, 0x7a, 0x40, 0xa8, 0x4f, 0xd3, 0x9e, 0x5a, 0x75, 0x26, 0xa9, 0xeb, 0x5b, 0xe1, 0xca, 0x25, 0x4b, 0x2, 0xb5, 0x29, 0x52, 0x6e, 0xce, 0x40, 0x1a, 0xac, 0x18, 0x99, 0xf6, 0xfb, 0x8c, 0x9e, 0xb0, 0xcd, 0xc5, 0x9, 0x2b, 0x22, 0x8, 0x36, 0x8b, 0xaf, 0x9a, 0xae, 0x50, 0x12, 0x83, 0xf8, 0xe7, 0x2, 0x3c, 0xba, 0x4f, 0x17, 0xbe, 0xd1, 0xb6, 0xbc, 0x52, 0xc8, 0xcd, 0xe3, 0xf8, 0x4f, 0xae, 0xc6, 0xfc, 0x1f, 0x11, 0xfc, 0xd1, 0xf7, 0xdd, 0x3c, 0x60, 0x99, 0x48, 0x6c, 0xc8, 0xf6, 0xcc, 0x75, 0x89, 0xff, 0x18, 0xa4, 0xfb, 0x7e, 0xf2, 0x3, 0xf6, 0xfc, 0xce, 0xc1, 0x61, 0x60, 0xd9, 0x19, 0x7a, 0xc4, 0x19, 0xe0, 0x44, 0xd3, 0xbb, 0xaa, 0x2a, 0x42, 0xe0, 0x33, 0x60, 0x58, 0x5e, 0xf3, 0x83, 0xc4, 0xb8, 0xc8, 0xc1, 0x2, 0x5b, 0x8c, 0xe9, 0xcc, 0x99, 0xfc, 0xd3, 0xaf, 0x5f, 0xe, 0xdc, 0x45, 0x40, 0x9d, 0x5e, 0x35, 0x45, 0xcd, 0x66, 0xcd, 0xaa, 0x1d, 0xbc, 0xfb, 0xf7, 0x27, 0xbd, 0xe4, 0x14, 0x1d, 0x2e, 0x65, 0x9a, 0x78, 0x88, 0xff, 0xaf, 0x73, 0xaa, 0xed, 0xff, 0x9a, 0x79, 0xbd, 0x5e, 0x89, 0xa2, 0x8f, 0x4f, 0xd6, 0x92, 0xda, 0x3f, 0xf4, 0x32, 0xd2, 0x25, 0x7, 0x74, 0x90, 0x6b, 0x73, 0x7a, 0xdf, 0xdb, 0x6, 0xfb, 0x70, 0xbf, 0x3f, 0x6d, 0x90, 0xcc, 0x3b, 0xb, 0x27, 0x35, 0xf6, 0x6a, 0x0, 0x52, 0x97, 0xea, 0xb3, 0xe3, 0xbc, 0xef, 0x42, 0x99, 0xbd, 0x81, 0x27, 0xbc, 0x86, 0x48, 0xbf, 0x35, 0xf4, 0xf8, 0xa1, 0x47, 0x66, 0xf1, 0x92, 0x19, 0x85, 0xc9, 0x39, 0x79, 0x9e, 0x2d, 0xcf, 0x4, 0x24, 0x3b, 0x14, 0x2e, 0x21, 0x51, 0x6b, 0x42, 0x91, 0x11, 0xec, 0x94, 0x72, 0xeb, 0xcc, 0x9d, 0x8, 0x2c, 0xe7, 0x2a, 0xd4, 0x1d, 0xfd, 0x2c, 0x88, 0x7b, 0xcb, 0x86, 0xc3, 0x14, 0x35, 0x56, 0x4d, 0xf1, 0xb3, 0x97, 0x89, 0x7d, 0xc7, 0xbf, 0x55, 0x65, 0xa1, 0xd5, 0x9a, 0x4c, 0x7e, 0x3a, 0x1d, 0x5e, 0x28, 0x84, 0x4a, 0x3c, 0x3e, 0x98, 0xee, 0x11, 0xcf, 0xac, 0x4e, 0x91, 0xda, 0xec, 0x76, 0x1b, 0x79, 0x66, 0x17, 0xb0, 0x92, 0xca, 0x92, 0x27, 0x25, 0xb0, 0x94, 0x92, 0xb6, 0xbd, 0xf7, 0xcb, 0xb0, 0x2f, 0x32, 0x78, 0x75, 0xd2, 0x31, 0x2c, 0xae, 0x9f, 0x31, 0x2e, 0x18, 0x47, 0x2e, 0x3e, 0xfe, 0x74, 0x97, 0xa3, 0xeb, 0xd4, 0xec, 0x10, 0x5b, 0xf6, 0xcc, 0x8, 0x19, 0xbe, 0xae, 0xb6, 0xbe, 0xfd, 0x4d, 0x23, 0xce, 0xf5, 0xe7, 0x7, 0xd, 0x3e, 0x6e, 0xfd, 0x79, 0xa6, 0x4b, 0x4d, 0xb4, 0xff, 0xf8, 0x72, 0x6c, 0xca, 0x73, 0xe1, 0x80, 0xc8, 0x22, 0x49, 0x7d, 0xa, 0x23, 0xa1, 0xb9, 0x80, 0x2a, 0x90, 0x44, 0x71, 0x56, 0x80, 0x9e, 0xfe, 0xf2, 0x5c, 0xbd, 0x74, 0x14, 0xbb, 0x94, 0x5c, 0x8d, 0xc7, 0x8d, 0x5e, 0x3e, 0x53, 0x1e, 0x4a, 0xa9, 0x3c, 0xbb, 0x12, 0xb1, 0xbe, 0x22, 0x7a, 0xa6, 0xc9, 0xb9, 0x5, 0x38, 0x63, 0x4b, 0x1, 0xa5, 0xf, 0xda, 0x8e, 0x78, 0x66, 0x19, 0xa4, 0xc4, 0xeb, 0x17, 0x17, 0x72, 0x6f, 0x83, 0x65, 0xce, 0x56, 0x8f, 0x83, 0x83, 0x1f, 0xef, 0x3d, 0x70, 0xd1, 0xa1, 0xbf, 0xce, 0x19, 0x3b, 0x48, 0x59, 0x3a, 0xb2, 0x70, 0xc0, 0xae, 0x15, 0x6b, 0x2e, 0x4b, 0xaa, 0xba, 0xf9, 0xf0, 0xfa, 0xe9, 0x6d, 0x0, 0x75, 0xa5, 0x96, 0x20, 0xe9, 0xad, 0x57, 0x45, 0x70, 0xc1, 0xf2, 0x2d, 0x3f, 0xac, 0x28, 0xa6, 0x64, 0x1b, 0xd2, 0x9e, 0x51, 0xd4, 0xd1, 0xd6, 0xbc, 0xfd, 0xc6, 0x84, 0xc1, 0x47, 0xd, 0xe7, 0x33, 0x27, 0x28, 0xa8, 0x2f, 0x91, 0xd, 0x52, 0x4c, 0xd3, 0xb8, 0x9e, 0xb5, 0x68, 0xee, 0xa6, 0x58, 0x99, 0x6, 0x7d, 0x8e, 0x2d, 0x41, 0xa2, 0xb6, 0xbc, 0xa6, 0x48, 0x71, 0xbf, 0x53, 0x61, 0x6c, 0xcb, 0xb0, 0x6d, 0x50, 0xae, 0xfc, 0xeb, 0xba, 0x94, 0x2e, 0xf0, 0xd7, 0x93, 0xc3, 0xe5, 0x82, 0x77, 0x50, 0xd5, 0xc1, 0x80, 0x17, 0xeb, 0xa0, 0xb8, 0x82, 0x98, 0x20, 0xbe, 0xb3, 0xe8, 0xa9, 0x38, 0xd5, 0xb2, 0xaf, 0xed, 0xb9, 0x84, 0x46, 0x9c, 0x93, 0xdf, 0xf6, 0x3d, 0xb1, 0x75, 0x69, 0xbf, 0xc9, 0xd3, 0x4b, 0xcf, 0x1f, 0x68, 0xd0, 0x8e, 0xe2, 0x4c, 0x43, 0x10, 0xce, 0x97, 0x30, 0xbd, 0x5c, 0x8b, 0xe, 0xe8, 0x4a, 0xf, 0xa6, 0xbb, 0x5e, 0x9f, 0xcc, 0xa, 0x1d, 0xbc, 0x5, 0xde, 0x24, 0xc1, 0x9f, 0xf3, 0x17, 0x13, 0xee, 0xd5, 0x5a, 0x67, 0x2f, 0x47, 0x66, 0x5, 0xd3, 0x10, 0x19, 0xd, 0xbf, 0xa3, 0x13, 0xc9, 0xc7, 0xb3, 0x9c, 0x41, 0xbf, 0xc5, 0x72, 0x7d, 0xc5, 0x6, 0x3d, 0xc0, 0xf8, 0x6c, 0xb5, 0x68, 0x5e, 0x72, 0x1f, 0xaa, 0x85, 0xe4, 0x2b, 0xd7, 0x86, 0x20, 0x6b, 0x2f, 0x8b, 0xe2, 0x8, 0x48, 0x81, 0x3a, 0xce, 0x13, 0xaf, 0xea, 0xc1, 0xa, 0x6f, 0xa, 0x5c, 0xdb, 0x11, 0xb6, 0x7f, 0xdc, 0x6d, 0xb8, 0x11, 0x65, 0x39, 0x3b, 0xd4, 0xef, 0xc2, 0x1a, 0x63, 0x44, 0x50, 0xbc, 0xcd, 0xae, 0xe3, 0x78, 0xb7, 0x1a, 0xe9, 0xe3, 0xa8, 0x3a, 0x21, 0xa6, 0xb7, 0xc5, 0xd8, 0xa2, 0xb7, 0x97, 0xd9, 0x17, 0x82, 0x25, 0xc1, 0xe3, 0xe0, 0xa0, 0x19, 0x5, 0x10, 0x5c, 0xeb, 0x8f, 0x8a, 0x36, 0xfa, 0xf0, 0xf7, 0xa7, 0xb9, 0x3b, 0x69, 0x5a, 0xac, 0x54, 0x6b, 0xb7, 0x35, 0x4a, 0xe0, 0x59, 0x6e, 0x9b, 0xc4, 0x9c, 0x15, 0x4, 0xcc, 0x21, 0x67, 0xba, 0x95, 0x9f, 0x58, 0xb0, 0xa2, 0xbe, 0x26, 0x30, 0x72, 0x6, 0x7d, 0x5d, 0x89, 0x31, 0x1f, 0x0, 0x5f, 0xbc, 0x14, 0x68, 0x23, 0xe9, 0xf1, 0x0, 0x17, 0x57, 0x52, 0x23, 0xc9, 0x34, 0x27, 0x57, 0xf6, 0xea, 0xe3, 0xc0, 0x2, 0x89, 0xfd, 0xad, 0x15, 0x5f, 0x5d, 0x5d, 0xf8, 0x76, 0x51, 0xed, 0x2e, 0x1d, 0x1e, 0xc4, 0x3a, 0xd3, 0xab, 0xf5, 0x21, 0xe7, 0x82, 0x20, 0xe, 0x8a, 0x24, 0x38, 0xdc, 0x6a, 0xd4, 0x0, 0xd5, 0x49, 0xf6, 0x22, 0xac, 0x6d, 0xd0, 0xf9, 0x9d, 0x16, 0xcf, 0x50, 0x35, 0xfb, 0x61, 0x45, 0x7b, 0xe6, 0x6d, 0x1c, 0x79, 0x77, 0x42, 0xe, 0xac, 0x76, 0x7e, 0xdb, 0x3e, 0xe3, 0x50, 0xd, 0x7, 0x2b, 0x4, 0xcb, 0xb3, 0x48, 0x1b, 0xe8, 0x45, 0xec, 0x9, 0x88, 0x38, 0x86, 0xa8, 0xa0, 0x66, 0xd, 0xff, 0x30, 0xf2, 0x55, 0x67, 0xab, 0xc2, 0xde, 0x5, 0x77, 0x8d, 0x22, 0x79, 0x7b, 0x4c, 0x1b, 0x25, 0x88, 0xce, 0x38, 0x3f, 0x28, 0xba, 0xc, 0x6c, 0xee, 0x62, 0x1f, 0xb4, 0x64, 0xc5, 0xce, 0xec, 0xbe, 0xdd, 0xef, 0x1d, 0x9a, 0x26, 0xf4, 0x50, 0x46, 0xd5, 0x33, 0x2b, 0x33, 0xde, 0xab, 0xda, 0xb7, 0xdc, 0x2e, 0x7, 0xc7, 0x73, 0x2b, 0xee, 0x25, 0xf6, 0xb9, 0xe7, 0x2e, 0x8, 0x5d, 0x89, 0x65, 0xce, 0x2a, 0x55, 0x5a, 0x8b, 0x7d, 0xbf, 0x72, 0x8b, 0xb8, 0x55, 0x81, 0x12, 0xe, 0x16, 0xd4, 0xb4, 0xb5, 0x3d, 0x5e, 0x8b, 0xf8, 0xa0, 0x7d, 0x6f, 0x97, 0x1, 0x8, 0x24, 0xe1, 0x1b, 0x24, 0xa8, 0x56, 0x6a, 0xd4, 0xd1, 0x7, 0x59, 0x88, 0xaa, 0xa4, 0x94, 0x14, 0x2d, 0x3f, 0xbc, 0x9e, 0x5b, 0x29, 0x86, 0x6b, 0x6c, 0x0, 0x90, 0x0, 0x6c, 0x5e, 0x7a, 0x21, 0xad, 0x53, 0x4d, 0x5f, 0xd4, 0xfb, 0xc2, 0xab, 0xf5, 0x64, 0x6b, 0x3c, 0xd3, 0xfd, 0x3f, 0x3c, 0x32, 0x1d, 0x18, 0x8b, 0x60, 0x8c, 0xf6, 0xb6, 0x65, 0x78, 0x39, 0xae, 0x7a, 0x7e, 0x12, 0x49, 0x84, 0xe7, 0xae, 0xf6, 0x7a, 0x99, 0xc9, 0x39, 0xeb, 0x3b, 0xf3, 0xb5, 0x68, 0x58, 0x3c, 0xf9, 0xff, 0x13, 0xfd, 0xde, 0xfb, 0xac, 0x6b, 0x63, 0xd4, 0xe1, 0xd9, 0x96, 0x8f, 0xf, 0xdc, 0x22, 0x3d, 0x16, 0x4, 0x6b, 0x5a, 0xdb, 0x63, 0x1c, 0x89, 0xc, 0x89, 0xed, 0x79, 0x5d, 0xd3, 0x51, 0xcc, 0x51, 0x14, 0x48, 0x72, 0xe5, 0x7c, 0x75, 0xe, 0x7c, 0x1, 0x62, 0x6a, 0x81, 0xb3, 0x6b, 0xea, 0x86, 0x8d, 0x80, 0xd3, 0x19, 0xa4, 0xd0, 0xeb, 0xa3, 0xde, 0x56, 0xc4, 0x1e, 0x70, 0x6c, 0xe8, 0xd0, 0xb7, 0x7, 0x1b, 0x13, 0xb, 0xd9, 0x46, 0xbf, 0x5a, 0x7f, 0xd1, 0xf0, 0x77, 0x7b, 0x6c, 0x7a, 0xb9, 0xf0, 0x3d, 0xaf, 0x3e, 0xef, 0xa6, 0x2c, 0x63, 0xf4, 0xc, 0xd6, 0x5f, 0x4d, 0xc4, 0xf9, 0x57, 0xac, 0xf9, 0xc4, 0x85, 0x98, 0x19, 0x99, 0x1c, 0xd0, 0x37, 0x73, 0x70, 0xc5, 0x8a, 0x71, 0xb2, 0xe7, 0x8e, 0xe0, 0x82, 0xe2, 0xe, 0xc0, 0x9f, 0xda, 0x69, 0x12, 0x90, 0x24, 0x1f, 0x72, 0x2c, 0xa, 0x54, 0x12, 0x69, 0x6, 0xb9, 0x71, 0xc1, 0x8d, 0x76, 0x69, 0xb7, 0x95, 0x6d, 0xb, 0x20, 0xcf, 0xe4, 0x54, 0xf9, 0x3d, 0x88, 0x49, 0x23, 0x3, 0x40, 0xa9, 0x9e, 0xa2, 0x3b, 0x7f, 0x7, 0xdc, 0x75, 0x86, 0xc2, 0x93, 0xdd, 0xa, 0x96, 0xf9, 0xc2, 0xc9, 0x73, 0x19, 0x46, 0x54, 0x2c, 0xb, 0x39, 0xa8, 0xbd, 0x98, 0xf7, 0x7f, 0xa3, 0xf3, 0xcd, 0x1f, 0x7d, 0xc6, 0xaf, 0x97, 0x86, 0x29, 0x73, 0x0, 0xe7, 0xb0, 0xfb, 0x2c, 0x9a, 0x46, 0xdf, 0x2, 0x73, 0x2d, 0x76, 0x14, 0x43, 0xba, 0x36, 0xda, 0xab, 0xb8, 0xdf, 0xf1, 0xb8, 0x36, 0x47, 0x38, 0xb6, 0x5e, 0x4a, 0xd6, 0x56, 0x4b, 0x98, 0x2, 0x10, 0xc, 0x91, 0x0, 0xcb, 0x6b, 0x4c, 0x32, 0x59, 0xae, 0x7d, 0xb0, 0x0, 0x31, 0xda, 0x4d, 0x7b, 0x36, 0x3, 0x23, 0x44, 0xa1, 0x66, 0xde, 0xe3, 0x86, 0x7a, 0xe1, 0xae, 0x49, 0x9b, 0x89, 0xee, 0x27, 0xd, 0xd5, 0xe8, 0x7f, 0x42, 0x18, 0x73, 0x1, 0x2e, 0x24, 0x98, 0xb7, 0xae, 0x63, 0xd4, 0xf, 0x68, 0xa1, 0x23, 0xbd, 0xb2, 0x38, 0x19, 0x26, 0x53, 0x27, 0x3e, 0xb3, 0x60, 0xd8, 0x52, 0x25, 0x0, 0x24, 0xe2, 0x47, 0x17, 0x3, 0x77, 0x70, 0x45, 0x4e, 0x23, 0x4, 0x6c, 0x7d, 0xd8, 0x4f, 0x98, 0xd, 0x76, 0xc4, 0xa0, 0xfe, 0x11, 0xef, 0x4f, 0x2, 0xb9, 0x43, 0x5f, 0xdf, 0x33, 0x78, 0xe2, 0x1, 0x7f, 0x62, 0x27, 0x49, 0x33, 0xaa, 0x23, 0x60, 0x8f, 0x9a, 0xc4, 0x26, 0xd9, 0xaa, 0xec, 0xe6, 0x9, 0x74, 0x5c, 0x71, 0x46, 0x5e, 0xc8, 0x78, 0x6d, 0x4e, 0x7d, 0x6, 0xa9, 0x1b, 0x24, 0x49, 0x2f, 0x9f, 0x98, 0xca, 0x43, 0x70, 0x3f, 0xc, 0x4f, 0xa9, 0x7c, 0x7, 0x6e, 0xf, 0x5f, 0xf4, 0x60, 0x36, 0x50, 0x6b, 0x4e, 0xba, 0x5b, 0xa7, 0xa2, 0x67, 0x34, 0x6d, 0xab, 0x8e, 0x1a, 0x94, 0x62, 0xc9, 0x56, 0xe8, 0xf4, 0xc3, 0x78, 0x2c, 0x13, 0x53, 0xfd, 0x55, 0x84, 0xbb, 0xeb, 0xe9, 0xef, 0x40, 0xf9, 0x2c, 0x9e, 0x8f, 0xbb, 0x28, 0x60, 0x1b, 0x11, 0x38, 0xff, 0x8a, 0x38, 0x2, 0x13, 0xb6, 0x72, 0xf4, 0x26, 0x50, 0x18, 0xce, 0xd7, 0x63, 0xb, 0x51, 0x21, 0x80, 0x7b, 0xa5, 0xa9, 0xdd, 0x2f, 0xf1, 0x8, 0x6f, 0x7b, 0x70, 0x43, 0x1a, 0x9f, 0x22, 0x9f, 0x86, 0x95, 0xd6, 0xc6, 0x6e, 0xb8, 0xb9, 0xfb, 0x83, 0x72, 0xf, 0x7c, 0x1f, 0x6c, 0x3e, 0xa5, 0xa, 0xed, 0x0, 0xab, 0x32, 0x47, 0xdf, 0x97, 0x92, 0x88, 0xba, 0x61, 0x85, 0xd4, 0x24, 0xd5, 0x54, 0x85, 0x7, 0xd6, 0xa7, 0x3f, 0xb8, 0x16, 0x9b, 0x1e, 0x17, 0xdc, 0xe9, 0x27, 0xe0, 0xcc, 0xe7, 0x13, 0x23, 0xce, 0x25, 0xbc, 0x45, 0xb2, 0xd7, 0xac, 0x5, 0xe9, 0x27, 0x23, 0xad, 0x35, 0x7f, 0x8c, 0x90, 0xab, 0xb6, 0xa4, 0xb9, 0x6e, 0xdf, 0xf1, 0xa7, 0x69, 0x41, 0xf2, 0xc2, 0x4b, 0xfc, 0x57, 0x7d, 0x5b, 0x7d, 0x15, 0xd6, 0x25, 0xf, 0x87, 0xdb, 0xfe, 0x6, 0x33, 0x6, 0xf1, 0x93, 0x6, 0xd0, 0xed, 0x32, 0x9f, 0xdb, 0x6e, 0x5c, 0xdd, 0x6d, 0x6f, 0x6f, 0x21, 0xe0, 0x19, 0xe5, 0x8c, 0x3f, 0xfe, 0xc8, 0xbe, 0xdc, 0x57, 0x3, 0x6a, 0xb6, 0x9d, 0x9a, 0xe, 0x19, 0xda, 0x5c, 0x1d, 0xb8, 0xd0, 0xc6, 0xac, 0x80, 0x16, 0x87, 0xed, 0x61, 0x7d, 0xa9, 0x4f, 0x85, 0x16, 0x1d, 0x10, 0x86, 0x8a, 0x27, 0x7d, 0x93, 0x54, 0xce, 0x1e, 0x7a, 0xef, 0xec, 0xbf, 0xfc, 0xbb, 0xcd, 0x44, 0x1c, 0xa9, 0xfe, 0xfd, 0x36, 0x64, 0x6b, 0x28, 0xac, 0x5c, 0xe2, 0xd9, 0xaa, 0x6, 0x24, 0xa5, 0x50, 0x1b, 0xd8, 0xc5, 0xc2, 0xb2, 0xed, 0x8d, 0x1c, 0x89, 0xec, 0xbe, 0x58, 0xbd, 0xb, 0x37, 0x3b, 0x8, 0xe4, 0x2f, 0xb2, 0x22, 0xe7, 0xc4, 0xef, 0x4b, 0xc8, 0x6, 0x1e, 0x35, 0x55, 0x73, 0x42, 0x67, 0xc0, 0x74, 0x74, 0xb6, 0x75, 0xdc, 0xcf, 0x91, 0x56, 0xcd, 0x94, 0x73, 0x16, 0x4, 0xd0, 0x6f, 0x7c, 0xbf, 0x5f, 0xa2, 0x2c, 0x31, 0x69, 0x20, 0xfd, 0x64, 0x48, 0xc9, 0x35, 0xb5, 0xe5, 0x66, 0x3c, 0x95, 0x55, 0xd, 0x6, 0x34, 0xc2, 0x0, 0x65, 0x6a, 0x4, 0xc, 0xa2, 0x93, 0xfb, 0xda, 0xc3, 0xe0, 0x32, 0x39, 0xe0, 0xc6, 0xae, 0x4b, 0x19, 0x26, 0xa1, 0x60, 0x29, 0xd3, 0xfb, 0x0, 0xbd, 0x59, 0x5e, 0x8e, 0x83, 0x5b, 0x2, 0x88, 0x52, 0x75, 0x31, 0xe, 0xc2, 0x8b, 0x52, 0xb9, 0x8c, 0x5c, 0x7, 0x96, 0x29, 0xb8, 0x75, 0x4a, 0x14, 0xdd, 0x4d, 0x88, 0xb3, 0xfe, 0xa9, 0x48, 0xdf, 0xaf, 0xb2, 0x35, 0xda, 0x71, 0x2a, 0x6, 0x78, 0x43, 0x91, 0xd3, 0xbb, 0xb9, 0x1, 0x8d, 0x0, 0x54, 0x42, 0x7c, 0x1e, 0x92, 0x26, 0x6e, 0x98, 0xd, 0x87, 0x6b, 0x25, 0xd8, 0xd8, 0xd3, 0xe1, 0x63, 0xa9, 0xe5, 0x81, 0x2e, 0x4f, 0xab, 0x12, 0xa, 0x2e, 0x29, 0x7d, 0x2f, 0xac, 0xc6, 0x51, 0x25, 0x42, 0xb2, 0x54, 0x68, 0x2c, 0x8d, 0xc7, 0xbe, 0x6b, 0xd1, 0xac, 0xaa, 0x5d, 0x91, 0x73, 0x21, 0x71, 0x8f, 0x2a, 0x2c, 0x42, 0x4b, 0x3b, 0xce, 0x4e, 0x15, 0x7e, 0xe4, 0x42, 0x6e, 0xda, 0x54, 0xe2, 0x1c, 0xa2, 0xd3, 0x5f, 0x6b, 0x38, 0x76, 0x6a, 0x7f, 0x68, 0x4d, 0x39, 0xf8, 0xf3, 0xb9, 0x50, 0xc3, 0x68, 0xff, 0xb3, 0x3a, 0x8, 0xa7, 0x53, 0x37, 0x69, 0xcd, 0x77, 0x19, 0x95, 0x52, 0xd7, 0x73, 0x29, 0x4c, 0xec, 0x13, 0x5, 0xf, 0x4e, 0x7f, 0x65, 0xb5, 0x17, 0x5a, 0x54, 0xa8, 0x59, 0x1b, 0x7, 0x9e, 0x9b, 0xdb, 0x49, 0x6d, 0x59, 0x7c, 0x6, 0x54, 0x70, 0xe, 0x1f, 0xcf, 0x3a, 0xb5, 0xc9, 0x94, 0x21, 0x41, 0xc7, 0xbe, 0x48, 0x7b, 0x1d, 0x57, 0x38, 0x3d, 0x33, 0x4b, 0xe0, 0x37, 0xf4, 0x50, 0x20, 0x88, 0x5c, 0xfe, 0x71, 0xe4, 0x36, 0xa, 0xab, 0x5c, 0xf4, 0x7b, 0x12, 0x4f, 0xd, 0x35, 0x62, 0x77, 0xf, 0x1, 0x6, 0xf2, 0xa6, 0x6f, 0xc, 0xd7, 0xb5, 0xcb, 0xa8, 0x69, 0xee, 0x27, 0xec, 0x6a, 0xf4, 0xd6, 0x13, 0xea, 0x8a, 0x86, 0xfa, 0x99, 0xea, 0x78, 0xbd, 0x51, 0xf5, 0x5e, 0x89, 0x51, 0xaf, 0xdd, 0x38, 0xd, 0x2a, 0x3f, 0x7e, 0xa0, 0x77, 0xe6, 0x2b, 0x21, 0x5d, 0x78, 0x71, 0xfa, 0xff, 0x18, 0xd2, 0xf8, 0x7, 0xf6, 0xce, 0xcb, 0x50, 0xc1, 0x96, 0xc, 0x2a, 0x80, 0x1d, 0x7f, 0x4, 0x36, 0x79, 0x8, 0x77, 0xd1, 0xf1, 0x9b, 0x70, 0x8a, 0x18, 0x3b, 0x3a, 0x94, 0x9e, 0x35, 0x3, 0x46, 0x40, 0xd3, 0x80, 0x93, 0xa8, 0x9f, 0xcb, 0x7f, 0xd3, 0xba, 0xdb, 0x7, 0x7e, 0xc1, 0x50, 0x21, 0x87, 0xf4, 0xa1, 0x10, 0xf2, 0x6c, 0x69, 0xa1, 0x18, 0xf4, 0xdd, 0xe2, 0x29, 0x6f, 0x20, 0xa7, 0xc2, 0xd4, 0x44, 0x20, 0xe, 0x3b, 0x0, 0xb3, 0x12, 0xd8, 0x86, 0x3e, 0x47, 0x8f, 0xbf, 0xf8, 0xfc, 0x4f, 0x9a, 0x1f, 0x79, 0x2c, 0x2e, 0xde, 0xb4, 0xf7, 0x3f, 0x9a, 0x7c, 0x7c, 0x9e, 0x9a, 0xb4, 0xdc, 0xb7, 0xd7, 0xf5, 0xa3, 0x94, 0x3, 0xd3, 0xb0, 0xd1, 0x94, 0x5c, 0x2a, 0xf7, 0xc8, 0xf, 0x54, 0xff, 0x3e, 0xaa, 0xb8, 0xd7, 0xee, 0x5f, 0xf2, 0xb6, 0x69, 0xff, 0xfa, 0xae, 0x31, 0x9e, 0x6f, 0x4c, 0xfc, 0xc5, 0x4f, 0x6c, 0xff, 0xa7, 0x15, 0x69, 0x19, 0x59, 0xe3, 0x50, 0x4f, 0x33, 0x49, 0xe9, 0xd, 0x6f, 0x4, 0xef, 0x7b, 0xd0, 0x22, 0x2f, 0x57, 0xf1, 0x1c, 0x91, 0x2f, 0x44, 0x74, 0x4c, 0x2a, 0xd3, 0x10, 0x8d, 0xa3, 0x4, 0x99, 0x5c, 0xa7, 0xd9, 0xbd, 0xb3, 0x83, 0xb3, 0x2a, 0x81, 0x10, 0x82, 0x3d, 0x59, 0xa6, 0x2b, 0xc3, 0x2d, 0x61, 0xe, 0x8, 0x3b, 0xf4, 0x95, 0x60, 0xd7, 0x6d, 0xba, 0xec, 0x82, 0x29, 0x28, 0x18, 0x37, 0x7e, 0xa5, 0xea, 0x68, 0xed, 0x76, 0xda, 0xa1, 0x5b, 0x2b, 0xfa, 0xe0, 0x9d, 0x17, 0x29, 0xb4, 0x4a, 0xde, 0xeb, 0x45, 0xbd, 0x47, 0x9, 0xcc, 0x30, 0x6e, 0x31, 0x95, 0x3c, 0x74, 0xfb, 0x6f, 0xf0, 0x57, 0x57, 0xcd, 0xa9, 0xb0, 0xb4, 0x22, 0x74, 0x6b, 0x1c, 0xca, 0x7f, 0xa6, 0x7c, 0x29, 0xa, 0x8c, 0x50, 0xa8, 0x3c, 0x24, 0x2f, 0xb, 0xdf, 0x8a, 0xdd, 0xae, 0x3d, 0xac, 0xc6, 0x87, 0xf4, 0xf8, 0xa8, 0x9f, 0xd9, 0x7, 0x75, 0x90, 0x63, 0x4f, 0x98, 0x4a, 0x18, 0x71, 0xaa, 0xfb, 0xd9, 0xf2, 0xc3, 0x5b}, - output224: []byte{0x35, 0x70, 0x7d, 0xd2, 0xa4, 0x4d, 0xe6, 0x66, 0x41, 0xdc, 0xfb, 0x35, 0xa0, 0x6f, 0xdc, 0x0, 0x1c, 0x74, 0xee, 0xc, 0x96, 0xec, 0xc1, 0x6b, 0x34, 0x69, 0x6f, 0xe1}, - output256: []byte{0x17, 0xc8, 0xa5, 0xf5, 0x23, 0x64, 0xc9, 0xf6, 0x51, 0xde, 0x5f, 0x10, 0x2, 0x1e, 0x5, 0xda, 0xf6, 0xcc, 0x63, 0xd6, 0x8f, 0x66, 0x66, 0x6e, 0x76, 0x2e, 0xdb, 0xd7, 0x57, 0x52, 0x58, 0x82}, - output384: []byte{0xd5, 0xf3, 0x78, 0x42, 0x1c, 0xac, 0x5, 0x82, 0xd1, 0xa2, 0xd1, 0x2c, 0x8c, 0x9b, 0x75, 0xc6, 0xa9, 0xa9, 0x5c, 0x74, 0x89, 0xb6, 0x94, 0xc0, 0xa6, 0x0, 0xae, 0xc6, 0x4, 0x7f, 0x54, 0xd3, 0x8b, 0x22, 0xdf, 0xff, 0xb6, 0x3b, 0x95, 0xe2, 0x35, 0xf3, 0x68, 0x28, 0x28, 0xae, 0xe6, 0x1e}, - output512: []byte{0x9b, 0x73, 0x59, 0xf3, 0x5d, 0xf4, 0x10, 0x49, 0xe9, 0xf2, 0xd8, 0x47, 0xfe, 0xdc, 0xf2, 0xb7, 0x49, 0xbd, 0xec, 0x88, 0x62, 0x8a, 0x58, 0xbd, 0xd2, 0xf, 0xa7, 0xee, 0x57, 0x73, 0x5b, 0xb5, 0x42, 0x84, 0x3c, 0x48, 0x32, 0x2d, 0xe5, 0xa6, 0x11, 0x44, 0x13, 0x54, 0x6e, 0xf5, 0xe4, 0x3c, 0x4, 0x34, 0x5d, 0x98, 0xa8, 0xb3, 0x9e, 0x1e, 0x4a, 0x6b, 0xb, 0x97, 0xd0, 0x90, 0x5f, 0x69}}, - testcase{ - msg: []byte{0xd8, 0xe, 0x6f, 0xe5, 0x9b, 0x72, 0x28, 0xd2, 0x5e, 0x78, 0x58, 0x6f, 0x94, 0xf2, 0x68, 0xea, 0x62, 0xeb, 0xe0, 0x42, 0x38, 0xab, 0x44, 0xe9, 0x73, 0x16, 0xb2, 0x2e, 0x96, 0xc9, 0x1d, 0x18, 0x6f, 0xac, 0x86, 0x2e, 0xba, 0x92, 0x12, 0xce, 0x84, 0x5b, 0xed, 0xc2, 0x3c, 0xec, 0x43, 0xfc, 0x3d, 0xa4, 0x2a, 0xa7, 0x2, 0x56, 0x37, 0xe0, 0xef, 0x65, 0x82, 0x3e, 0xba, 0x6f, 0xed, 0x26, 0x1a, 0xfe, 0x9a, 0x48, 0x7, 0x42, 0x58, 0xb2, 0x35, 0x55, 0x9a, 0x91, 0x6e, 0x64, 0x4b, 0xfb, 0xc9, 0xc3, 0xb6, 0xf4, 0x4d, 0x76, 0xe, 0x30, 0x47, 0xbf, 0x7c, 0x88, 0x5f, 0x9c, 0x70, 0xc4, 0x42, 0x46, 0xa8, 0x1d, 0x29, 0xf9, 0xc1, 0x5, 0x94, 0xb9, 0x35, 0x9e, 0xaa, 0x8c, 0x8c, 0x57, 0x2c, 0x71, 0x42, 0x6a, 0x93, 0xf, 0x2, 0xf2, 0x69, 0x2d, 0x50, 0x4e, 0xf, 0x19, 0xe1, 0x2f, 0x6b, 0xd1, 0x15, 0xc0, 0x85, 0x98, 0x8b, 0xbd, 0xf2, 0x74, 0x8a, 0x2e, 0xdc, 0xdc, 0xca, 0xa3, 0xd2, 0x93, 0x29, 0xb4, 0xe8, 0xa1, 0xa1, 0x7c, 0xc2, 0x2, 0x43, 0x19, 0x1d, 0x2a, 0xbc, 0x7a, 0x4c, 0xfe, 0x38, 0x42, 0x91, 0xfa, 0x8d, 0x7e, 0xc5, 0x78, 0x21, 0xe1, 0x21, 0x75, 0xa1, 0x56, 0xf8, 0x93, 0x58, 0x7e, 0x2d, 0xbd, 0x5f, 0xd3, 0x2c, 0x2c, 0x1a, 0x78, 0x4, 0x75, 0x6a, 0xec, 0x8f, 0xf1, 0x2b, 0xca, 0xd4, 0x30, 0x8d, 0xd3, 0x3e, 0xef, 0x5c, 0xff, 0x29, 0x83, 0x65, 0xf, 0xef, 0xc0, 0x4d, 0xdf, 0xc4, 0x30, 0x11, 0x7, 0x19, 0x3d, 0xfa, 0x9e, 0xb7, 0xe8, 0xa6, 0xea, 0x27, 0x48, 0x7, 0x28, 0x79, 0xb0, 0x63, 0xc7, 0xb0, 0x95, 0x56, 0x54, 0xae, 0x2a, 0x68, 0xbf, 0xf, 0x0, 0xc3, 0x7f, 0x3, 0x23, 0xc6, 0x45, 0x83, 0x10, 0xb4, 0x70, 0x7d, 0xd2, 0x46, 0x4d, 0xa5, 0xa5, 0x2b, 0x8a, 0x8e, 0x7c, 0xe6, 0x58, 0x99, 0x70, 0x11, 0x6b, 0xa9, 0x3e, 0xab, 0x20, 0x24, 0x4, 0xc, 0x45, 0xf2, 0x2e, 0x9b, 0x47, 0x8b, 0x34, 0xed, 0xff, 0x4b, 0xc8, 0x76, 0x89, 0x6d, 0x14, 0x31, 0x52, 0x56, 0x57, 0x32, 0xff, 0xf0, 0x4e, 0xfe, 0x65, 0x6e, 0x6, 0xea, 0xc3, 0x8f, 0x19, 0xf4, 0xee, 0xbf, 0xf2, 0x24, 0xe3, 0x21, 0x59, 0xab, 0x37, 0x55, 0x11, 0xb4, 0x2b, 0x6f, 0x74, 0x0, 0x1d, 0xdb, 0x15, 0xac, 0xc, 0xb4, 0xf6, 0xba, 0xec, 0x84, 0x90, 0x10, 0x59, 0x88, 0x2f, 0x58, 0xeb, 0xf9, 0x40, 0xcc, 0x97, 0x34, 0x22, 0xf6, 0xf6, 0x94, 0xa, 0x94, 0xc5, 0x10, 0x1e, 0xb2, 0x4e, 0xd2, 0x1b, 0xc0, 0xc4, 0x17, 0xd9, 0x59, 0xb4, 0xf0, 0x86, 0x93, 0x17, 0x3e, 0x88, 0xc6, 0xdb, 0xe2, 0x8b, 0x48, 0x7b, 0x3d, 0xc, 0xa0, 0xa, 0xf2, 0x62, 0x39, 0xb5, 0xb8, 0x99, 0x2c, 0x60, 0xec, 0x3b, 0xcd, 0x38, 0x55, 0xd2, 0xdb, 0x19, 0x7a, 0xc9, 0x5c, 0x48, 0x62, 0xb9, 0xb9, 0xc, 0x5b, 0x4a, 0xe3, 0x66, 0x75, 0x9a, 0x38, 0x86, 0x8a, 0x2b, 0x83, 0x8e, 0x36, 0xd7, 0xe4, 0x25, 0x52, 0xb3, 0x56, 0x6d, 0x7a, 0x28, 0xfe, 0x6e, 0x20, 0x8a, 0xe9, 0xc6, 0xae, 0xe5, 0x5, 0x24, 0x88, 0x1c, 0x48, 0x2b, 0x8f, 0x48, 0xe9, 0x13, 0x3a, 0xe2, 0xa9, 0xd9, 0x37, 0x7a, 0x6f, 0x96, 0x6f, 0x30, 0x60, 0x3e, 0x25, 0xa0, 0xff, 0x6, 0x10, 0x6b, 0x29, 0x25, 0x1, 0x23, 0x13, 0xcb, 0x3e, 0x79, 0xfa, 0x3f, 0xd, 0xad, 0xa7, 0xcc, 0x3d, 0x1, 0x5b, 0x4c, 0xb, 0xae, 0xa4, 0xa7, 0x9e, 0xc8, 0xe3, 0x7d, 0x79, 0x2f, 0xa1, 0x3c, 0x19, 0xaa, 0x17, 0x3e, 0x13, 0x47, 0x74, 0xdf, 0x39, 0x3e, 0x1d, 0xe9, 0x13, 0x33, 0x69, 0xe8, 0x58, 0xe4, 0x72, 0x0, 0x64, 0x8b, 0x44, 0x74, 0xf, 0x18, 0xbc, 0x5, 0x50, 0x26, 0x6f, 0x7e, 0xe7, 0x80, 0x5b, 0x85, 0xd8, 0xa1, 0x93, 0x68, 0xc6, 0x81, 0x10, 0xcd, 0x11, 0xf1, 0x40, 0x32, 0xa0, 0x99, 0xcc, 0x79, 0x7d, 0xb3, 0x93, 0x90, 0xc2, 0x93, 0xf, 0x68, 0x5, 0x9c, 0xa3, 0x15, 0x92, 0xfb, 0xe7, 0x36, 0x19, 0x4, 0x3e, 0x1c, 0x9, 0x57, 0x77, 0xd2, 0x97, 0x15, 0x8a, 0xe6, 0xc2, 0x8c, 0x86, 0x3f, 0xac, 0xe2, 0x29, 0x9e, 0xa4, 0x35, 0xcc, 0x1e, 0x7a, 0x9, 0xfb, 0x29, 0x7, 0x1c, 0x21, 0x78, 0x9, 0x24, 0xd2, 0xec, 0xc4, 0x1c, 0x9c, 0x97, 0x49, 0xda, 0x3e, 0xf0, 0x81, 0x9a, 0x41, 0xec, 0x8, 0x6c, 0xd2, 0xb7, 0x37, 0x8, 0x70, 0x69, 0x4b, 0x3, 0x92, 0xd1, 0x8b, 0x6b, 0x72, 0x1b, 0x81, 0x28, 0x2d, 0xad, 0xfe, 0x3c, 0x3c, 0x3f, 0xe2, 0x12, 0x88, 0xe9, 0x92, 0xc7, 0xe3, 0xa8, 0xfa, 0x68, 0x5f, 0x32, 0x30, 0x75, 0x29, 0xe6, 0xd5, 0xa, 0xcb, 0x42, 0x52, 0xd3, 0xe1, 0x70, 0x33, 0x4c, 0x42, 0xc7, 0xf, 0xab, 0x2, 0xdf, 0x83, 0x25, 0x69, 0xc7, 0xe5, 0xe0, 0x50, 0x42, 0xf7, 0x1a, 0x4f, 0xa9, 0x39, 0xb5, 0x85, 0x72, 0xcc, 0x8b, 0xc, 0xee, 0x43, 0x31, 0x22, 0x7, 0x42, 0xd2, 0xea, 0x9b, 0x11, 0x17, 0x36, 0x2a, 0x18, 0x31, 0xc8, 0x24, 0x7e, 0x1f, 0x6e, 0x1f, 0x42, 0xa8, 0x8f, 0xf5, 0xeb, 0x9a, 0xa6, 0x65, 0xf9, 0xa6, 0x37, 0xdb, 0x1b, 0xe7, 0xe4, 0xff, 0x5a, 0x75, 0xdc, 0x21, 0x13, 0x7a, 0x50, 0xd0, 0x70, 0x87, 0x18, 0x5d, 0xe1, 0x31, 0xb, 0xc5, 0xeb, 0x9, 0x84, 0x50, 0x91, 0x4b, 0x9c, 0x6a, 0xd8, 0xdd, 0xf6, 0x7a, 0xc0, 0xdc, 0xc9, 0x9a, 0xc6, 0x1c, 0x3c, 0xb0, 0x9b, 0x10, 0x1d, 0xf6, 0x27, 0x3e, 0xc, 0x3a, 0xbb, 0x37, 0x68, 0xf2, 0x4f, 0xd2, 0xc4, 0xbd, 0x2e, 0xf6, 0xdb, 0xec, 0xb1, 0xa1, 0xec, 0xde, 0x14, 0x18, 0xae, 0x5f, 0xca, 0x22, 0xd4, 0x1d, 0xba, 0xc, 0xb6, 0xc1, 0x6b, 0x6, 0xf2, 0xcd, 0x26, 0xfe, 0x16, 0x57, 0xc1, 0xea, 0x7a, 0xbe, 0xbc, 0x5b, 0xbc, 0x8d, 0xcb, 0x58, 0x73, 0x8f, 0x85, 0x5b, 0xf3, 0x8c, 0xd9, 0x6f, 0x29, 0xbf, 0x77, 0x32, 0xe9, 0x1b, 0x26, 0x1b, 0x70, 0xa7, 0x76, 0xee, 0xe6, 0x41, 0x45, 0xc1, 0x42, 0x1f, 0xa3, 0x0, 0xbd, 0xf8, 0xb, 0xdf, 0x64, 0x57, 0xe3, 0x18, 0xf9, 0xbe, 0xba, 0x22, 0x43, 0xce, 0x8c, 0xf5, 0x7d, 0xfa, 0x8b, 0xa0, 0xd5, 0xf1, 0x24, 0xaf, 0xc6, 0x85, 0x9d, 0xdb, 0xf, 0x3e, 0xd4, 0x57, 0xfc, 0xa6, 0x46, 0x23, 0xb5, 0x4a, 0x49, 0xbe, 0x58, 0x99, 0x53, 0x7, 0x8d, 0xfd, 0xa6, 0x57, 0x45, 0xfa, 0x39, 0xcf, 0xc, 0x4d, 0x98, 0x66, 0xc3, 0x8f, 0x76, 0x23, 0x1f, 0xcb, 0x44, 0xd3, 0x13, 0x1f, 0x8d, 0xf3, 0x89, 0xab, 0x75, 0x57, 0x42, 0xf1, 0x6d, 0xb2, 0x18, 0xb3, 0x97, 0x85, 0x28, 0x79, 0x97, 0x46, 0xa9, 0x9d, 0xc7, 0xe3, 0xa9, 0x58, 0x63, 0x25, 0x63, 0x74, 0x80, 0x39, 0xfd, 0xd9, 0xff, 0xcb, 0xff, 0x6f, 0x93, 0xbd, 0x83, 0xda, 0xcf, 0x6, 0xba, 0x93, 0xe3, 0x92, 0x51, 0x62, 0x1a, 0xf0, 0x2f, 0x81, 0x75, 0xcf, 0x54, 0x1f, 0xc, 0x80, 0xc, 0x5d, 0x2f, 0x5a, 0xf0, 0x68, 0x94, 0xb2, 0xfa, 0x14, 0xb9, 0xa6, 0xfa, 0xa3, 0xa3, 0xc9, 0x55, 0x70, 0x42, 0x36, 0x13, 0x29, 0x9f, 0x14, 0x1c, 0xe2, 0x5e, 0xe7, 0x7c, 0x2, 0x59, 0xa4, 0x2, 0x79, 0xa2, 0xff, 0x60, 0xb5, 0x1a, 0xca, 0xfc, 0xf8, 0x2c, 0xae, 0x42, 0x97, 0xe5, 0x78, 0x61, 0x64, 0x5d, 0xc7, 0x44, 0x2e, 0xb0, 0x52, 0x30, 0x90, 0x1, 0xe8, 0x9f, 0xf2, 0xff, 0x5b, 0xa4, 0x1f, 0x2f, 0x7d, 0x48, 0xfc, 0x9a, 0x49, 0xbd, 0x30, 0x62, 0xb8, 0xc, 0x75, 0xbe, 0x51, 0xfb, 0xcc, 0x87, 0x64, 0xad, 0x6d, 0x2e, 0x64, 0x75, 0x74, 0xed, 0xc0, 0x36, 0x60, 0xc9, 0xf4, 0xb7, 0xae, 0x58, 0x88, 0x86, 0x78, 0xde, 0xa4, 0xd6, 0xa5, 0xc2, 0x51, 0x2f, 0x12, 0xa6, 0xae, 0xcd, 0x30, 0x47, 0xad, 0x8, 0xcf, 0xec, 0xb6, 0xa4, 0xc9, 0x59, 0x93, 0x16, 0x4c, 0x58, 0x3c, 0x91, 0xfc, 0x85, 0x58, 0xca, 0xd1, 0x46, 0xc7, 0x3c, 0x7f, 0x4c, 0x24, 0x70, 0x4e, 0xbb, 0xd0, 0xd, 0x9d, 0xc2, 0xc7, 0x2f, 0x4a, 0xf1, 0xb2, 0x4f, 0x1d, 0xd5, 0xc0, 0xbf, 0x97, 0xc2, 0x83, 0xb7, 0xf6, 0x99, 0x37, 0xa6, 0xaf, 0xc, 0x5a, 0xb1, 0x95, 0xac, 0x8d, 0x17, 0x91, 0x69, 0xba, 0xb6, 0xb1, 0x41, 0xa5, 0xa6, 0x1f, 0x7f, 0xab, 0xd2, 0xb0, 0xa2, 0x3e, 0xa2, 0x9c, 0xc2, 0x95, 0xab, 0x4, 0xde, 0x12, 0x32, 0x90, 0x48, 0x50, 0x48, 0xe0, 0x6a, 0xf0, 0xec, 0x21, 0x1d, 0x93, 0xcd, 0xf8, 0xfe, 0xad, 0xa7, 0x22, 0xb8, 0x2b, 0x99, 0x41, 0x34, 0x91, 0x1b, 0x5e, 0xbc, 0xbf, 0x21, 0xd0, 0x13, 0xf, 0x91, 0xd, 0xde, 0x8c, 0xf7, 0xcd, 0x3e, 0x46, 0xc2, 0xbe, 0x4a, 0xe2, 0x67, 0x96, 0xf2, 0x5b, 0x65, 0x3f, 0x92, 0x65, 0x69, 0x37, 0x1e, 0xa0, 0x9c, 0x7a, 0x5e, 0x2f, 0x38, 0x56, 0x5d, 0x8, 0xc9, 0xd3, 0x77, 0xba, 0xf5, 0x1b, 0x6d, 0xc8, 0x54, 0x86, 0x6c, 0x50, 0x56, 0x3b, 0x9d, 0xa2, 0x6f, 0xa3, 0xe, 0xa, 0x87, 0xf5, 0xb2, 0xfc, 0x64, 0x72, 0x29, 0x15, 0x50, 0xfc, 0xc7, 0xa0, 0xc4, 0x23, 0xce, 0x82, 0xd0, 0xae, 0xf2, 0x4f, 0x54, 0xc0, 0x50, 0x87, 0x62, 0x7f, 0xde, 0x9c, 0x9e, 0xe2, 0xeb, 0xf2, 0x28, 0xd1, 0x22, 0x91, 0xb2, 0xb2, 0x5c, 0xc8, 0xfa, 0xca, 0xe9, 0xc6, 0x20, 0x9d, 0xc4, 0x35, 0x47, 0xba, 0x2, 0x8, 0xd3, 0x59, 0x67, 0x7c, 0x94, 0xfd, 0x17, 0xa7, 0x6d, 0xd, 0x84, 0xd9, 0xb1, 0x80, 0x84, 0xc8, 0xaf, 0xe1, 0x54, 0x8e, 0xf4, 0xb7, 0xfc, 0x94, 0xd7, 0x4, 0x50, 0x8, 0x7e, 0xdf, 0x3, 0x74, 0xcc, 0x41, 0x45, 0x61, 0xe6, 0x57, 0x5a, 0xd4, 0x1, 0xc9, 0x99, 0x8, 0xec, 0xf2, 0x8c, 0x6a, 0xee, 0x82, 0xf3, 0x41, 0x23, 0x79, 0xa8, 0x6f, 0x78, 0xea, 0x98, 0x41, 0xce, 0xa2, 0xd5, 0x97, 0x66, 0x43, 0x40, 0xe9, 0x7, 0x14, 0xc4, 0xf7, 0x54, 0x53, 0xcb, 0xc4, 0xc2, 0x4c, 0x96, 0x32, 0x64, 0xdc, 0x8f, 0x13, 0x48, 0x7a, 0xb, 0xfd, 0x4f, 0xd0, 0x4a, 0xca, 0x13, 0x15, 0xa1, 0xb7, 0xe, 0xb4, 0x88, 0x82, 0x65, 0x14, 0x3d, 0x82, 0xcd, 0x63, 0x4, 0x6f, 0xd, 0xaf, 0x27, 0xd8, 0xf1, 0xa6, 0xef, 0x98, 0x8f, 0x48, 0xd1, 0x3c, 0x56, 0xea, 0xbb, 0xbf, 0x27, 0xb5, 0x78, 0x5e, 0x51, 0xd6, 0x8d, 0xb0, 0x8b, 0x4a, 0xe2, 0xb9, 0x41, 0x15, 0x96, 0xae, 0x87, 0xc7, 0x60, 0xd2, 0x8a, 0x4e, 0x2c, 0x38, 0xa7, 0x6b, 0xd6, 0xb7, 0x15, 0x29, 0x3c, 0x59, 0x13, 0x1d, 0x3d, 0x63, 0x8, 0xc7, 0x22, 0x28, 0x24, 0x95, 0xbe, 0xa6, 0x90, 0x9, 0xca, 0x71, 0xaa, 0x78, 0xa2, 0x8b, 0x68, 0x1c, 0xb7, 0x82, 0xfe, 0x42, 0x74, 0xd4, 0x99, 0xa8, 0x56, 0xaa, 0xb6, 0xf1, 0x9f, 0xe9, 0xf8, 0x79, 0x31, 0xea, 0x93, 0x77, 0x4a, 0xb1, 0x3c, 0xa5, 0xb3, 0xe2, 0x9c, 0x1e, 0xc6, 0xb3, 0x0, 0xe6, 0x7e, 0x52, 0x5b, 0x94, 0x38, 0xc2, 0xf3, 0xc3, 0xaf, 0x3c, 0x38, 0x27, 0x60, 0x39, 0xfe, 0x82, 0xbb, 0x15, 0xca, 0xc8, 0x10, 0x13, 0xb1, 0x95, 0xea, 0x9c, 0x43, 0xb, 0x83, 0x81, 0xf7, 0x3b, 0x5f, 0x95, 0xcd, 0xfc, 0xe4, 0x3, 0xc0, 0x27, 0x7b, 0xe7, 0x7f, 0xb7, 0xd8, 0xcc, 0x38, 0xf5, 0xc0, 0x75, 0x34, 0x7c, 0xdf, 0x1d, 0xa4, 0x68, 0x98, 0x45, 0xd8, 0x3, 0xc9, 0x36, 0x9, 0x11, 0xf0, 0x15, 0x6f, 0x6c, 0x92, 0xb5, 0xf7, 0x75, 0xd5, 0x2, 0x67, 0x4c, 0xcd, 0x63, 0x5f, 0x64, 0x2b, 0x26, 0x6a, 0x2b, 0x3, 0x74, 0x8e, 0xd6, 0x24, 0x72, 0x50, 0xba, 0x23, 0x87, 0x88, 0x53, 0xec, 0xc6, 0x9c, 0xab, 0x7e, 0xef, 0x2a, 0x29, 0xa0, 0x8e, 0x29, 0x7, 0x2b, 0xdf, 0x32, 0xdb, 0x74, 0x2d, 0xe3, 0x68, 0x12, 0x5c, 0xdd, 0xb3, 0x69, 0x53, 0xd1, 0x57, 0x12, 0x30, 0x2a, 0x9e, 0x4a, 0xd5, 0x8c, 0x8c, 0x63, 0xc7, 0x72, 0x1d, 0x46, 0x47, 0xbd, 0xe4, 0xa1, 0x6e, 0x58, 0x21, 0x81, 0x14, 0x4a, 0xd9, 0xee, 0x4d, 0x51, 0x13, 0x3a, 0x55, 0x34, 0x93, 0x6f, 0xa3, 0xa7, 0x88, 0x4d, 0x9, 0x81, 0x78, 0x5f, 0x8e, 0xc5, 0x56, 0x50, 0x57, 0x38, 0xe5, 0x29, 0x30, 0x20, 0xa2, 0xfc, 0x31, 0xbc, 0x3d, 0x95, 0x8, 0xe, 0x1f, 0x74, 0x7b, 0x2e, 0x25, 0x28, 0x1e, 0xd2, 0x56, 0x54, 0xd, 0x27, 0x9c, 0x7, 0xfe, 0x32, 0x18, 0xa3, 0x5d, 0x45, 0x74, 0xd2, 0x2d, 0x41, 0x55, 0xe3, 0xf1, 0x2f, 0x74, 0x50, 0xf3, 0x7f, 0x8f, 0xec, 0x6c, 0x46, 0x75, 0x66, 0x74, 0x67, 0x20, 0x53, 0x8b, 0xd1, 0xa2, 0x97, 0xdd, 0x9b, 0x98, 0x7d, 0xba, 0xbf, 0x2d, 0x61, 0x10, 0xfe, 0xf5, 0x1b, 0x69, 0x91, 0x1, 0x2c, 0xf3, 0x38, 0xf2, 0x37, 0x1e, 0x39, 0x4f, 0x2d, 0x49, 0x67, 0xa7, 0xa4, 0x62, 0xc0, 0x54, 0xe4, 0x3b, 0xca, 0x22, 0x79, 0x4a, 0x20, 0x67, 0x58, 0x54, 0xd7, 0x42, 0xd4, 0x41, 0xf0, 0xaa, 0x28, 0x9b, 0xd, 0xbf, 0x55, 0xe4, 0x8f, 0xd, 0x49, 0x58, 0x64, 0xe3, 0xef, 0x5b, 0x14, 0x53, 0x51, 0xb9, 0x3a, 0x24, 0x59, 0xb6, 0xca, 0x84, 0x8f, 0x40, 0xdf, 0x1d, 0x8b, 0x58, 0x8f, 0xf6, 0x79, 0x77, 0x1c, 0xd, 0xcb, 0x69, 0xa7, 0x19, 0x6d, 0x19, 0xc1, 0x41, 0xea, 0x8, 0x46, 0xd5, 0xd2, 0x93, 0x4a, 0xa5, 0xc6, 0x62, 0xac, 0xf1, 0xa7, 0x85, 0x9d, 0xb2, 0xc0, 0x2c, 0x79, 0x12, 0x50, 0xbd, 0xc1, 0xf5, 0xac, 0xba, 0x56, 0x38, 0x81, 0x5d, 0xcf, 0xff, 0xc8, 0x58, 0xb0, 0xbf, 0x1e, 0x8, 0x6e, 0xad, 0xb, 0xe4, 0x6e, 0x9c, 0x40, 0x18, 0x15, 0x97, 0x29, 0xe6, 0x45, 0xc4, 0x86, 0xa4, 0x97, 0x3e, 0x6e, 0x13, 0x80, 0xf9, 0x85, 0x1, 0x28, 0xf0, 0x8f, 0x31, 0x5e, 0x9f, 0x9d, 0x6e, 0xfe, 0x64, 0xea, 0x21, 0xf, 0xb8, 0x7, 0xa, 0x49, 0x8f, 0x98, 0xa1, 0xec, 0xe8, 0xff, 0x42, 0x79, 0xb4, 0x2, 0x8e, 0xfc, 0x7d, 0x36, 0x34, 0xfa, 0x3c, 0xa8, 0xcf, 0xc1, 0xc, 0x58, 0xe3, 0x49, 0xb9, 0x88, 0xd3, 0xf6, 0xa1, 0x3a, 0x18, 0xb6, 0x48, 0x7b, 0x52, 0x6a, 0xc7, 0x79, 0xc8, 0x24, 0x73, 0xd1, 0x21, 0x45, 0x6e, 0xb2, 0xc1, 0x81, 0x67, 0xcd, 0xd7, 0x40, 0x18, 0xc0, 0x7, 0x9a, 0x53, 0x47, 0xc1, 0xf9, 0x87, 0x3c, 0xec, 0x0, 0x71, 0x5f, 0xf, 0xa5, 0x30, 0x55, 0xc, 0x81, 0x4c, 0xec, 0x5b, 0x96, 0x12, 0x1a, 0x99, 0x14, 0xa8, 0x29, 0x17, 0x13, 0xd6, 0xc7, 0xb9, 0xf6, 0x5a, 0x9e, 0x45, 0xb8, 0x5e, 0xa4, 0x3e, 0x93, 0xa7, 0x9d, 0xcf, 0xb9, 0xdc, 0x6a, 0x6b, 0xdc, 0xef, 0x82, 0x2, 0x42, 0xdf, 0xe7, 0xcf, 0xa4, 0xc2, 0xa5, 0x32, 0xe6, 0x37, 0x16, 0x81, 0xc8, 0xf3, 0x9f, 0xd6, 0x59, 0xa1, 0xf5, 0x45, 0x36, 0xec, 0xeb, 0x20, 0xfb, 0x52, 0x8c, 0x8b, 0x8b, 0xfa, 0x96, 0x6, 0x9f, 0xaf, 0xc4, 0xa8, 0xb2, 0x3d, 0xea, 0xf0, 0xab, 0x27, 0xd8, 0xe1, 0x90, 0xfa, 0x84, 0x66, 0x69, 0xf4, 0x3, 0xbe, 0xc4, 0xf3, 0x2, 0xc7, 0xcd, 0x5a, 0xb9, 0x97, 0x25, 0x29, 0x82, 0x7d, 0x58, 0x19, 0xe6, 0xd1, 0xfd, 0xf2, 0xb6, 0xcf, 0x2a, 0xfa, 0x57, 0x89, 0x9f, 0x8f, 0x9c, 0xbe, 0x1f, 0xcc, 0xbe, 0xbe, 0x8d, 0x73, 0x8e, 0x84, 0x77, 0x91, 0x34, 0x54, 0x56, 0x14, 0x24, 0x3a, 0x15, 0x56, 0xce, 0xb4, 0x60, 0x1e, 0xd1, 0xa6, 0xda, 0x90, 0x59, 0x9b, 0xd3, 0xb2, 0xe2, 0xae, 0xf9, 0xb0, 0x60, 0xe2, 0x7d, 0x87, 0x9d, 0x1e, 0x8, 0x12, 0x6, 0x51, 0x73, 0x94, 0x56, 0x6, 0x2a, 0x18, 0xca, 0xb9, 0x4a, 0xae, 0x28, 0x7, 0xce, 0x12, 0xfe, 0x7, 0x61, 0xaa, 0x96, 0x59, 0x8a, 0xc4, 0xd, 0x1d, 0xb8, 0x68, 0x87, 0x70, 0x80, 0x41, 0xa9, 0xd, 0x59, 0xc6, 0x6b, 0x37, 0xba, 0x63, 0xab, 0x40, 0x9c, 0x9f, 0xb0, 0x25, 0xc5, 0x99, 0x2b, 0x98, 0x5a, 0x35, 0xc1, 0xbc, 0x3f, 0xea, 0x87, 0xb7, 0x79, 0x1b, 0x6d, 0x8, 0x32, 0xa4, 0x61, 0xa5, 0x8b, 0x22, 0x19, 0x33, 0xd2, 0xb9, 0xad, 0x6c, 0xcd, 0x80, 0xe0, 0x8c, 0xb8, 0xf8, 0x5f, 0x52, 0xd3, 0xb9, 0xa0, 0xdd, 0x6e, 0xd5, 0x7a, 0xb7, 0xa6, 0x2f, 0x1a, 0xc7, 0x78, 0x34, 0xbb, 0x86, 0xfc, 0x54, 0x21, 0x31, 0xc7, 0x79, 0xda, 0xfe, 0xe3, 0xdf, 0x16, 0xe2, 0x6c, 0xeb, 0x9, 0x53, 0x66, 0x1a, 0xff, 0x0, 0x84, 0x3d, 0xef, 0x77, 0x21, 0x0, 0x11, 0x96, 0x50, 0x16, 0x94, 0x2b, 0x3f, 0xfa, 0xd4, 0x79, 0x74, 0x98, 0x17, 0xba, 0x8a, 0x85, 0xef, 0x28, 0x80, 0x91, 0xf9, 0x2e, 0xdb, 0xa1, 0x1d, 0x7f, 0xc0, 0x16, 0x81, 0xa8, 0x5, 0x13, 0xb3, 0x28, 0x18, 0x0, 0x63, 0x2a, 0x33, 0xb3, 0xa7, 0x3b, 0x4f, 0xf9, 0x18, 0x7c, 0x12, 0xa5, 0x70, 0x15, 0x20, 0x72, 0x4e, 0x77, 0xaf, 0xc8, 0x4e, 0x6a, 0x3f, 0xfc, 0xee, 0xc4, 0x39, 0xd5, 0x30, 0xb3, 0x8a, 0xbd, 0x98, 0x5, 0xee, 0xa, 0x80, 0x16, 0x83, 0x1c, 0xbf, 0xb5, 0x4b, 0x16, 0x7b, 0x65, 0xd4, 0x66, 0xf9, 0xee, 0xc8, 0x5, 0x8e, 0x13, 0xd2, 0x5f, 0x97, 0x7b, 0xcd, 0xcc, 0xf8, 0x2c, 0x72, 0x74, 0xad, 0x9a, 0x71, 0xdd, 0xac, 0x8a, 0x9, 0x28, 0xe5, 0x7b, 0x4c, 0xb7, 0x32, 0xde, 0xd8, 0xd3, 0x14, 0xe8, 0x31, 0x2f, 0x99, 0xef, 0xfa, 0xea, 0x2, 0x8c, 0xd4, 0x8b, 0xe6, 0x14, 0x25, 0x6c, 0x6d, 0x39, 0xca, 0xb, 0x2f, 0x77, 0xa1, 0x38, 0x29, 0xf1, 0x72, 0xaf, 0x85, 0xfa, 0x85, 0x7b, 0xb7, 0x34, 0x38, 0x3e, 0x75, 0x7a, 0xe, 0x52, 0x6b, 0x1, 0x9d, 0x18, 0x8d, 0xf1, 0x7b, 0xdd, 0x90, 0x81, 0x5c, 0xc9, 0xd, 0x28, 0x9e, 0x6f, 0xd1, 0x4, 0x8c, 0x9, 0x63, 0xd6, 0x5b, 0x5b, 0xda, 0x59, 0x5d, 0x34, 0xed, 0x76, 0xa, 0xa1, 0x6, 0x6f, 0x1e, 0x3d, 0x9e, 0x48, 0xae, 0x2a, 0x2d, 0xc4, 0x92, 0x70, 0x1e, 0x9c, 0xe4, 0x65, 0xbb, 0x5a, 0x39, 0xff, 0x72, 0x2c, 0xf5, 0x5e, 0x9e, 0x2f, 0x86, 0x11, 0x79, 0x9, 0x20, 0xa3, 0xee, 0xaa, 0xb9, 0xab, 0xb, 0xf8, 0x6e, 0xd2, 0x70, 0xfe, 0x65, 0x8c, 0x3a, 0x5f, 0x63, 0x3f, 0xff, 0x63, 0x3e, 0xce, 0x63, 0x9a, 0x93, 0x33, 0x2f, 0x3b, 0xff, 0x7, 0x46, 0xb5, 0xc4, 0xa5, 0xef, 0xe9, 0xae, 0x48, 0x44, 0xf9, 0x96, 0xfb, 0x84, 0x27, 0x48, 0xc2, 0xe2, 0x5e, 0xf2, 0x4b, 0x6d, 0xf, 0x8d, 0x5a, 0x47, 0x6b, 0xde, 0xb8, 0x32, 0x84, 0x44, 0xe4, 0x63, 0x93, 0xc0, 0x54, 0x4e, 0xc9, 0xf1, 0xd2, 0x8c, 0xb8, 0x3a, 0x8c, 0x96, 0x5e, 0xd, 0x9b, 0x6, 0x6d, 0xb0, 0x36, 0x6b, 0x43, 0x13, 0x6, 0x45, 0x9b, 0x6c, 0x83, 0x7d, 0xc9, 0xe6, 0x72, 0xfd, 0xba, 0x23, 0x4a, 0x12, 0xab, 0xec, 0x8c, 0x8c, 0x81, 0x3d, 0x2f, 0xf6, 0xfc, 0x62, 0x5d, 0xe9, 0x6d, 0x35, 0x46, 0x1c, 0xf7, 0x2e, 0xf1, 0x52, 0x9e, 0x54, 0x25, 0xea, 0x19, 0x88, 0xec, 0xda, 0x73, 0x81, 0xc0, 0xf8, 0x4d, 0x86, 0xeb, 0xa9, 0x8f, 0x4f, 0x4d, 0xf, 0x45, 0xf1, 0xc1, 0x6f, 0x5c, 0xb3, 0xf8, 0x45, 0x6d, 0xa4, 0xbe, 0xa3, 0x3, 0xf, 0x97, 0xb5, 0x6d, 0xd4, 0x94, 0xee, 0x97, 0xc6, 0x30, 0x65, 0x6e, 0x58, 0xab, 0xb7, 0xac, 0x6f, 0x2d, 0x86, 0x76, 0xc0, 0x4a, 0x34, 0xc2, 0xee, 0x4a, 0xb1, 0xbd, 0x10, 0xd1, 0x63, 0xd, 0xd5, 0x9b, 0x69, 0x99, 0xac, 0xda, 0x44, 0x7e, 0x64, 0x6a, 0x84, 0xaa, 0x66, 0xd5, 0x3c, 0x6a, 0xc0, 0xe3, 0xbe, 0xdd, 0xf, 0xc0, 0x1a, 0xea, 0x8a, 0xa9, 0xfc, 0x76, 0x48, 0xd4, 0x4b, 0xf5, 0x85, 0xf6, 0xf1, 0x33, 0xa2, 0x5a, 0x59, 0xd, 0x63, 0xb4, 0xa8, 0x3e, 0x65, 0x19, 0xf5, 0x28, 0xb3, 0x10, 0xbc, 0x3, 0xb9, 0xc9, 0x7f, 0xda, 0x5f, 0xe7, 0x0, 0x97, 0x8a, 0x66, 0xf1, 0xef, 0x42, 0x27, 0xaf, 0xb3, 0xcb, 0xec, 0x11, 0x2c, 0xc4, 0x55, 0x2d, 0xe5, 0xf6, 0x5, 0xd9, 0xcd, 0x7, 0x72, 0x12, 0x2b, 0x9, 0xae, 0x19, 0x6e, 0x87, 0x25, 0x82, 0x75, 0x38, 0xc4, 0x47, 0x3f, 0x82, 0xa3, 0xaa, 0xf, 0x69, 0x5c, 0x5c, 0x5d, 0x71, 0xf9, 0x1f, 0x16, 0xcc, 0x86, 0x74, 0x44, 0x5b, 0x79, 0x90, 0x77, 0xe5, 0x51, 0x6a, 0xb5, 0x58, 0x53, 0xd8, 0x6c, 0x1f, 0xe9, 0xe4, 0xbe, 0xe0, 0x6c, 0xbf, 0x8f, 0x96, 0x1, 0xe1, 0x46, 0x84, 0xb0, 0x5, 0x79, 0xf2, 0x77, 0x96, 0x4a, 0xa1, 0x62, 0xbe, 0xb9, 0x2a, 0xb4, 0x76, 0xe3, 0x22, 0xe7, 0xab, 0xa4, 0x64, 0xc0, 0x65, 0x7b, 0xcb, 0x65, 0x5, 0x9b, 0x47, 0x66, 0x8a, 0x82, 0x19, 0xf, 0xc0, 0x93, 0xba, 0x43, 0x3a, 0x16, 0xf3, 0x6b, 0x22, 0x93, 0x6a, 0xb3, 0xf, 0x67, 0x90, 0x60, 0x19, 0x7, 0x4, 0x8c, 0x6e, 0xcf, 0x7c, 0x4a, 0x41, 0xa4, 0x6, 0xec, 0xf8, 0x66, 0xd7, 0xa, 0x3a, 0x3a, 0xa2, 0xa1, 0xbc, 0x64, 0x72, 0xdd, 0xac, 0x9f, 0x97, 0xd3, 0x7a, 0xc7, 0x90, 0xc1, 0x17, 0xa6, 0x9, 0xdd, 0x37, 0x41, 0xfa, 0xc7, 0xa0, 0x11, 0x96, 0xa, 0xa6, 0xe2, 0x78, 0x10, 0xf, 0xa0, 0x4d, 0x34, 0x57, 0x96, 0x64, 0x5e, 0x59, 0x58, 0xa0, 0xae, 0xa, 0x68, 0xb3, 0xb6, 0xd3, 0xf1, 0x1d, 0xf7, 0x40, 0x39, 0x32, 0xe6, 0xaa, 0xbc, 0x33, 0x2a, 0x77, 0x41, 0x7f, 0x2f, 0xed, 0x36, 0x51, 0x66, 0x7b, 0xb0, 0x85, 0x91, 0x33, 0xc0, 0x73, 0x2c, 0x56, 0xec, 0x52, 0xac, 0xdf, 0x86, 0x14, 0x53, 0x4e, 0x4a, 0x2e, 0x0, 0x73, 0x43, 0x83, 0x33, 0x89, 0x7, 0x3d, 0xb6, 0xc2, 0x12, 0xe5, 0x67, 0xb7, 0x58, 0x8b, 0xb, 0xc8, 0x1f, 0xd, 0x62, 0x2e, 0x16, 0x46, 0xac, 0xda, 0xf, 0x5d, 0xfc, 0x80, 0x70, 0x73, 0xef, 0xa7, 0x79, 0xd6, 0x87, 0x35, 0x7c, 0xcd, 0x1d, 0x10, 0x2b, 0x2b, 0x61, 0x89, 0x68, 0xc, 0x50, 0x24, 0x35, 0xbc, 0x65, 0x22, 0xca, 0xf5, 0xcc, 0x16, 0xbe, 0xc7, 0x95, 0x17, 0x45, 0x3, 0xa8, 0x84, 0xfb, 0xf2, 0x9, 0xd0, 0xa2, 0x35, 0x76, 0x2c, 0x71, 0x62, 0xeb, 0xc6, 0x68, 0x28, 0xbb, 0x8f, 0x23, 0xdf, 0xdb, 0xb6, 0x46, 0x8a, 0x5e, 0x62, 0x29, 0x4d, 0x45, 0x97, 0xff, 0x4f, 0x91, 0xd9, 0x9c, 0xb1, 0x41, 0x7b, 0x68, 0x5c, 0xf1, 0x84, 0x9d, 0x9a, 0xbb, 0x58, 0xe6, 0x3f, 0xc7, 0x7f, 0x38, 0xe, 0xde, 0x5a, 0xc5, 0xe6, 0x58, 0xc1, 0x3, 0x41, 0x4f, 0x68, 0xde, 0x7e, 0xaf, 0xeb, 0x3e, 0x69, 0xe6, 0x64, 0x1c, 0x4, 0xb0, 0xca, 0x57, 0xc7, 0xe9, 0x38, 0xd9, 0xeb, 0xb2, 0x90, 0xd6, 0x1a, 0x2d, 0x42, 0xe1, 0xb5, 0xc0, 0xf9, 0x56, 0x0, 0x9a, 0x6a, 0x80, 0x40, 0x3e, 0xc, 0x77, 0x77, 0x3f, 0x28, 0x1e, 0xf6, 0x4, 0xc1, 0x95, 0x9e, 0xdf, 0xd1, 0xdf, 0x21, 0xd, 0xf1, 0x27, 0xc3, 0x2, 0x31, 0x1e, 0x4a, 0x71, 0xa7, 0x56, 0x22, 0xde, 0xf0, 0xf9, 0x1e, 0xca, 0x47, 0x17, 0xfa, 0xe4, 0x55, 0xdd, 0x9f, 0xea, 0x55, 0x7d, 0xeb, 0xa0, 0xeb, 0xe1, 0xaa, 0xb6, 0x18, 0x6a, 0xac, 0x0, 0x94, 0xef, 0x34, 0x44, 0x7c, 0x24, 0x12, 0x57, 0x6, 0x10, 0x2c, 0xb, 0x27, 0xe1, 0x7f, 0xdf, 0x4f, 0x1d, 0x22, 0xeb, 0xc6, 0x50, 0x6f, 0x28, 0x68, 0x5e, 0xd, 0x1d, 0x88, 0x6d, 0xd4, 0x17, 0x29, 0xf9, 0xba, 0xb6, 0x44, 0x86, 0xe7, 0xe9, 0x61, 0x55, 0xa2, 0x6c, 0xfe, 0xd6, 0x9d, 0xf3, 0xbd, 0xeb, 0x62, 0x77, 0x51, 0x89, 0xe9, 0xed, 0xe3, 0x9d, 0x7a, 0xd, 0x3, 0xc5, 0x11, 0xab, 0x4d, 0x60, 0x53, 0x43, 0x35, 0x6b, 0xad, 0x7a, 0xe8, 0x6f, 0x43, 0xe1, 0xe9, 0xea, 0xe2, 0x30, 0x30, 0x28, 0xd1, 0x87, 0xbc, 0x81, 0xfd, 0x33, 0x65, 0xd7, 0xb8, 0xe, 0x9, 0x4b, 0xa6, 0x29, 0xad, 0x56, 0xca, 0x35, 0x2f, 0x3d, 0xe8, 0xed, 0x6d, 0xfd, 0xbb, 0xe7, 0xd2, 0x6, 0x4c, 0x75, 0x7a, 0xf3, 0x6b, 0x7d, 0xb4, 0xef, 0xc0, 0xe9, 0xe8, 0xf2, 0xf2, 0x5e, 0x62, 0x82, 0x78, 0xf, 0x7e, 0x5, 0x9e, 0xc9, 0xab, 0xa8, 0xc0, 0x4f, 0x59, 0x13, 0xe9, 0x63, 0x29, 0x81, 0x24, 0x1f, 0x75, 0x51, 0x4c, 0x50, 0xd6, 0x50, 0x2d, 0x7b, 0x1, 0xf4, 0x0, 0x84, 0x22, 0x31, 0x8c, 0xb, 0xac, 0xe5, 0xd1, 0x35, 0x32, 0x7e, 0x9, 0xe4, 0xf9, 0x7f, 0xdb, 0xfd, 0x7c, 0xec, 0xda, 0xbb, 0xf1, 0x6b, 0xa2, 0x88, 0x7f, 0x76, 0xd9, 0x72, 0xe, 0x34, 0xc2, 0x6c, 0xb8, 0xd1, 0x99, 0xfb, 0x46, 0xb4, 0x86, 0xd4, 0x7e, 0x24, 0xff, 0x94, 0x3c, 0x1c, 0x23, 0xf3, 0xe9, 0x9e, 0x47, 0x2d, 0x96, 0xfb, 0x4b, 0x64, 0x77, 0xea, 0xc3, 0xf3, 0x64, 0xe0, 0x2f, 0xf1, 0x92, 0xf3, 0xfe, 0xfe, 0x13, 0xc6, 0x95, 0x60, 0xfd, 0x4f, 0x4a, 0x28, 0x30, 0xa3, 0xa7, 0x4b, 0xa8, 0xc8, 0xea, 0xeb, 0x82, 0xe8, 0x4d, 0x8e, 0xce, 0xb9, 0x83, 0xa6, 0xf1, 0xcb, 0x2, 0x4a, 0x9d, 0xff, 0xce, 0x69, 0xae, 0xd, 0xc7, 0x66, 0xfe, 0x28, 0x36, 0x19, 0xc1, 0x1c, 0x58, 0x85, 0xb2, 0xfd, 0xf3, 0x8e, 0x23, 0xb, 0x18, 0x7d, 0x82, 0x2c, 0xc6, 0xa5, 0x4a, 0x2b, 0x64, 0x30, 0x29, 0xa5, 0xd9, 0xaf, 0x17, 0xc5, 0xc7, 0x5, 0xf4, 0x14, 0x3, 0xae, 0x62, 0x95, 0x6d, 0x97, 0x7b, 0xbb, 0xc7, 0xce, 0x90, 0xc, 0xee, 0xc2, 0xb7}, - output224: []byte{0x96, 0x56, 0xf2, 0x73, 0xcf, 0x78, 0xf3, 0x61, 0x3d, 0x93, 0x1d, 0x50, 0x27, 0x8e, 0x27, 0x36, 0x43, 0xcd, 0x66, 0x62, 0xc4, 0x8d, 0x24, 0x3a, 0x11, 0x5c, 0xad, 0x65}, - output256: []byte{0x2, 0x38, 0xb0, 0xa1, 0xe3, 0x57, 0xc7, 0x38, 0x21, 0x29, 0xad, 0x29, 0x40, 0xed, 0x71, 0x82, 0xf, 0x7d, 0x45, 0xa7, 0xf0, 0xf2, 0x62, 0x93, 0x91, 0xc1, 0x8, 0x29, 0xae, 0x80, 0x1b, 0xf5}, - output384: []byte{0x0, 0x6, 0x2a, 0x3e, 0xcb, 0x49, 0x1a, 0x34, 0x68, 0x1a, 0x52, 0xd1, 0x16, 0xde, 0x2f, 0xa, 0x66, 0x1a, 0x53, 0x52, 0x24, 0xca, 0xd8, 0x82, 0x86, 0x2f, 0xd8, 0xa6, 0x8b, 0x15, 0x2a, 0x5f, 0x54, 0xd3, 0x4, 0xbf, 0x8f, 0x1b, 0x7d, 0x61, 0x47, 0x16, 0x4c, 0xb6, 0x6a, 0x43, 0xc6, 0xb7}, - output512: []byte{0xe6, 0x67, 0x4b, 0x97, 0x8b, 0x94, 0xaa, 0xfa, 0x19, 0xe4, 0x49, 0xd3, 0xdb, 0xf9, 0xc8, 0xd5, 0x87, 0x1, 0x8, 0x4b, 0x0, 0x29, 0x62, 0xca, 0xd7, 0x99, 0xc5, 0x68, 0x83, 0x17, 0x10, 0x13, 0xd, 0xa7, 0x78, 0x28, 0x19, 0x54, 0x55, 0x8a, 0x61, 0x94, 0xd5, 0x1c, 0xb7, 0x79, 0x31, 0xc5, 0x17, 0x89, 0xb9, 0xf8, 0xdf, 0x2, 0x55, 0xa8, 0x1b, 0x2a, 0xad, 0xf4, 0xf, 0x7f, 0x2, 0x3f}}, - testcase{ - msg: []byte{0x35, 0x81, 0xd4, 0xae, 0xf0, 0x86, 0xc, 0x17, 0x29, 0xeb, 0x3e, 0x6b, 0x50, 0x4f, 0x0, 0x91, 0x9c, 0x65, 0x6a, 0x1c, 0x56, 0xc1, 0x1, 0x11, 0xd2, 0x1a, 0x2f, 0x9a, 0x77, 0xec, 0xe, 0xf7, 0x11, 0x8b, 0xff, 0x2a, 0x88, 0x19, 0x73, 0xcb, 0xa4, 0x66, 0x86, 0xd4, 0xf1, 0x4, 0xcc, 0x94, 0xc3, 0xb, 0x93, 0xf6, 0x27, 0x69, 0xaa, 0x2c, 0xf, 0x4c, 0x7f, 0x3f, 0xb9, 0x31, 0xb6, 0x96, 0xdd, 0xb6, 0x32, 0xb0, 0xfe, 0x71, 0xd5, 0x7c, 0xad, 0xfe, 0x27, 0x57, 0x39, 0x13, 0xce, 0xa4, 0x88, 0xa6, 0x8d, 0xe, 0x45, 0xb9, 0xc, 0xce, 0xda, 0x68, 0xd9, 0x66, 0xb7, 0x25, 0x15, 0x2c, 0xcf, 0x5, 0x47, 0x57, 0x21, 0x1d, 0x4e, 0x9e, 0xb4, 0x2a, 0x97, 0x30, 0x8c, 0x6a, 0xf1, 0xe0, 0xb7, 0xa0, 0xdf, 0x67, 0xc6, 0x1f, 0x93, 0x57, 0xa1, 0x54, 0x2c, 0xea, 0xbf, 0x0, 0xc, 0xfd, 0xaa, 0x1f, 0xbe, 0x71, 0xd3, 0x5, 0x30, 0xd, 0x43, 0xa4, 0x48, 0xa4, 0x84, 0x5e, 0xc9, 0x4d, 0xf6, 0x96, 0xc7, 0xc0, 0x12, 0x9b, 0x8, 0x8a, 0xaa, 0xc2, 0x9a, 0x43, 0xbc, 0xe1, 0x97, 0x26, 0xf9, 0x4d, 0xfb, 0xad, 0xe2, 0xd0, 0xf7, 0xcd, 0x7c, 0x4e, 0xf0, 0xfc, 0xe1, 0x26, 0x81, 0xfb, 0xe4, 0x96, 0xbe, 0xe9, 0xd7, 0x72, 0x5f, 0x54, 0x92, 0x81, 0xf4, 0xae, 0x66, 0x61, 0x10, 0xbf, 0x40, 0xf5, 0x23, 0x55, 0x26, 0x60, 0x61, 0x27, 0xee, 0x4, 0x1c, 0x9, 0x87, 0x4c, 0x10, 0x3c, 0xae, 0xc8, 0xee, 0x32, 0xd, 0x5e, 0x9f, 0x2d, 0x62, 0xbd, 0xbc, 0xe3, 0x21, 0xfd, 0xf7, 0x68, 0x1f, 0xc9, 0x88, 0xf4, 0x53, 0xef, 0x99, 0x9b, 0x9f, 0xff, 0xd9, 0xdc, 0x28, 0x5b, 0xed, 0xd0, 0xeb, 0xd3, 0x6f, 0xc2, 0x2b, 0x61, 0x37, 0x65, 0xa3, 0x4b, 0xc0, 0x97, 0xdc, 0xd1, 0xf1, 0x9b, 0x14, 0xc6, 0x1, 0x40, 0xc8, 0xe2, 0x3d, 0x78, 0x94, 0x13, 0x23, 0x43, 0xff, 0xc2, 0xb8, 0xed, 0x14, 0x4d, 0x90, 0x55, 0xd2, 0x79, 0x5c, 0xbb, 0x20, 0xb8, 0xfe, 0xe9, 0x23, 0x63, 0xf6, 0x67, 0x2b, 0xea, 0x4d, 0x40, 0xf9, 0xac, 0xd5, 0x5a, 0x2b, 0xe2, 0x7c, 0xf8, 0x13, 0xb0, 0x59, 0x9c, 0xab, 0x2e, 0x8, 0x22, 0x5c, 0x4f, 0x90, 0x9e, 0x7b, 0x64, 0x7a, 0x39, 0xf8, 0x88, 0xb9, 0x37, 0xe, 0xc6, 0x9b, 0x2a, 0x6e, 0x65, 0x91, 0x60, 0x4a, 0x38, 0xa5, 0xbc, 0x2e, 0xa, 0xbf, 0x8b, 0x72, 0x2e, 0x9a, 0xa2, 0xf0, 0x5a, 0xd9, 0xae, 0xde, 0xf5, 0x5a, 0x37, 0x81, 0xf, 0x93, 0x5a, 0x46, 0xee, 0xe3, 0x33, 0x89, 0xc3, 0x75, 0x61, 0x39, 0x41, 0x10, 0x2d, 0x67, 0xc, 0xa6, 0x70, 0x95, 0x6, 0x86, 0x1b, 0xed, 0xd3, 0xdc, 0xd0, 0xf1, 0x46, 0x7f, 0x4a, 0xa, 0xb6, 0x81, 0x8, 0x4b, 0xd4, 0x82, 0x73, 0xf, 0x7c, 0x75, 0x3f, 0xa3, 0xf5, 0xab, 0x47, 0xb7, 0x84, 0x5c, 0x5c, 0xb1, 0x7d, 0x17, 0x39, 0x25, 0x81, 0x21, 0x9a, 0xf4, 0x40, 0xcd, 0x67, 0x1, 0x39, 0x86, 0xca, 0xc4, 0xff, 0xa4, 0xb6, 0xfa, 0x0, 0x4e, 0x7b, 0x5e, 0xee, 0x95, 0x74, 0x2e, 0x7c, 0x40, 0x4, 0x4b, 0x9c, 0x5a, 0x46, 0x91, 0xc2, 0xb5, 0x84, 0xdd, 0xe6, 0xa8, 0xa4, 0x5a, 0x36, 0x48, 0x1e, 0x71, 0x5d, 0x6d, 0x9f, 0xb2, 0x73, 0x4e, 0x53, 0x39, 0xdd, 0x5a, 0x18, 0x56, 0x39, 0x2e, 0x8f, 0xec, 0xc4, 0x16, 0x77, 0x88, 0x5, 0x11, 0x79, 0x89, 0xe3, 0xd, 0x42, 0x2a, 0xb8, 0xd3, 0x58, 0xb6, 0x90, 0x78, 0x7e, 0x9f, 0xed, 0x37, 0x67, 0xa4, 0x8, 0xdd, 0x99, 0x23, 0x44, 0x63, 0xb2, 0x5b, 0x91, 0xc3, 0xa, 0xbb, 0x93, 0xf3, 0xce, 0xec, 0x89, 0x82, 0x3c, 0x37, 0x2, 0x3e, 0x73, 0x93, 0xf2, 0x9f, 0x50, 0x65, 0xac, 0xd4, 0x99, 0xd2, 0x2e, 0x13, 0xb5, 0x90, 0x98, 0x57, 0x18, 0xf, 0x77, 0x85, 0x74, 0x97, 0x34, 0x2, 0x7a, 0xeb, 0x84, 0x32, 0x45, 0xf5, 0x56, 0x9c, 0x71, 0x5a, 0x88, 0x1a, 0x1e, 0x75, 0x54, 0x17, 0x9d, 0x5d, 0x99, 0x3f, 0xad, 0xff, 0x2a, 0xae, 0x71, 0xcb, 0x0, 0x16, 0xe1, 0x45, 0x9a, 0xe6, 0xc2, 0xec, 0x79, 0x54, 0xc0, 0xb6, 0xcc, 0x8b, 0xb1, 0x11, 0x6b, 0xbb, 0x8c, 0xbd, 0x81, 0xcb, 0x62, 0xdd, 0xe5, 0x74, 0x42, 0xf6, 0x2, 0x14, 0x7c, 0xbc, 0x64, 0xc2, 0xa4, 0xc4, 0x56, 0xc1, 0x52, 0x3b, 0x80, 0x75, 0xd0, 0xde, 0xfa, 0x5, 0x35, 0x78, 0xc3, 0x14, 0x92, 0xb3, 0x23, 0x4c, 0xc7, 0x37, 0xa, 0xea, 0x59, 0x3a, 0xec, 0x3, 0x59, 0xab, 0xe3, 0xd1, 0xc7, 0x43, 0x1c, 0xb6, 0x29, 0x73, 0xe9, 0x3b, 0xc, 0xf3, 0xc3, 0x70, 0x18, 0xb4, 0x68, 0x26, 0x7b, 0x66, 0x4d, 0xb3, 0xf4, 0x5f, 0xce, 0xe7, 0x37, 0xcf, 0xf9, 0x76, 0xbc, 0xe3, 0x5e, 0x6, 0x1a, 0xef, 0x48, 0xe8, 0xcb, 0x20, 0xf0, 0x46, 0x1d, 0x72, 0x9f, 0xd1, 0x69, 0x1e, 0xd, 0x2f, 0x8f, 0x2e, 0xd, 0x44, 0xf7, 0x7b, 0x64, 0x1, 0x31, 0xb9, 0xe6, 0x2b, 0x80, 0xc7, 0x51, 0xd0, 0x18, 0x6f, 0x18, 0x37, 0x60, 0xb6, 0x32, 0x96, 0xb6, 0xbd, 0xce, 0x97, 0xa9, 0xc0, 0xab, 0x4c, 0xc3, 0x7a, 0x27, 0xa8, 0x5e, 0x18, 0x97, 0xf6, 0xde, 0x52, 0xdf, 0x9f, 0xb, 0x8, 0xf3, 0x7c, 0x85, 0xf, 0x24, 0x5, 0x83, 0x1c, 0xbe, 0x98, 0x26, 0xf3, 0x58, 0x4e, 0x99, 0xf7, 0x81, 0x1f, 0x8, 0xfd, 0x5, 0xb3, 0x35, 0xf6, 0xd0, 0x74, 0x9, 0xa8, 0x2, 0x29, 0xa5, 0x67, 0x76, 0x3a, 0xd8, 0xf2, 0x5, 0x39, 0xe1, 0x64, 0x12, 0x36, 0xe8, 0x7a, 0x7c, 0xd3, 0xc8, 0x47, 0xc9, 0xe8, 0xec, 0x6, 0x3a, 0x5a, 0x8d, 0x21, 0xf7, 0x7f, 0x94, 0x1c, 0xa7, 0xa5, 0x6e, 0x23, 0xf9, 0x1, 0x30, 0xb7, 0x47, 0x98, 0xb7, 0x1e, 0x7a, 0x9c, 0xf8, 0x41, 0x67, 0x39, 0xa4, 0xc7, 0x50, 0xc0, 0xd5, 0x75, 0x2a, 0x78, 0x1b, 0x11, 0xf9, 0x94, 0xa0, 0xb0, 0xe1, 0xcb, 0x6d, 0x83, 0x77, 0x48, 0x8e, 0xc2, 0xde, 0x64, 0x29, 0x3, 0xf9, 0xb4, 0x46, 0x57, 0xe8, 0x5d, 0x8a, 0x21, 0x3f, 0x1f, 0xc8, 0xe, 0x67, 0x4d, 0xff, 0xb7, 0x47, 0xc6, 0x3a, 0xac, 0x85, 0xe6, 0x2e, 0x29, 0x54, 0x28, 0xaa, 0x31, 0x5f, 0x60, 0x58, 0x5b, 0xb5, 0xd5, 0x20, 0x35, 0x98, 0xdb, 0x4f, 0x6b, 0xa7, 0x8f, 0xbf, 0x3f, 0x5, 0x3d, 0x57, 0x95, 0x34, 0xa0, 0xc2, 0x70, 0xb5, 0x42, 0xda, 0x82, 0x84, 0x8b, 0x81, 0x89, 0xde, 0x8a, 0x77, 0xa3, 0x39, 0xd0, 0x5, 0x2b, 0x74, 0xb2, 0x1d, 0x80, 0x62, 0x17, 0xe9, 0x2, 0xd9, 0xde, 0xee, 0x2f, 0xbe, 0x97, 0xdb, 0x9e, 0x41, 0x4c, 0xa9, 0x43, 0x9e, 0xce, 0x35, 0x3f, 0xe0, 0xea, 0x8a, 0x72, 0xed, 0x21, 0x16, 0xf0, 0x2, 0x36, 0x5c, 0x88, 0xaf, 0x5, 0xd0, 0xe8, 0x3, 0xab, 0x49, 0x4c, 0x3d, 0x17, 0x20, 0x29, 0x7a, 0xce, 0x85, 0x8c, 0xad, 0x90, 0xd3, 0xe, 0x81, 0x85, 0xd0, 0x2d, 0xe9, 0xbb, 0x4c, 0xc3, 0x40, 0x97, 0x72, 0xc0, 0x87, 0x34, 0xcd, 0xbc, 0xe2, 0x2b, 0x49, 0x86, 0x61, 0xd7, 0x3a, 0x18, 0xfe, 0x27, 0x38, 0x29, 0x7f, 0x25, 0xf5, 0x46, 0x6b, 0xec, 0xf4, 0xdf, 0x3b, 0xe1, 0xf3, 0xd9, 0x16, 0xd, 0xef, 0x55, 0x66, 0x31, 0x86, 0x20, 0xa2, 0x2c, 0xb, 0xcc, 0x27, 0xe9, 0x1c, 0xbb, 0x3f, 0x1c, 0x58, 0x6f, 0xc8, 0xe0, 0x9c, 0x60, 0xdc, 0xd4, 0x24, 0xe8, 0xc6, 0x84, 0x18, 0xec, 0xce, 0x19, 0x3f, 0xe2, 0x9e, 0x45, 0x29, 0xe1, 0x41, 0x9b, 0x1b, 0xe, 0xa3, 0x59, 0x7a, 0x98, 0xf1, 0x9e, 0x99, 0x9c, 0x78, 0xe, 0x54, 0x30, 0x68, 0xca, 0xc8, 0x4d, 0x7e, 0xa2, 0x26, 0xff, 0xd5, 0x35, 0xf7, 0x5d, 0xe1, 0x51, 0x34, 0x55, 0x6d, 0x8d, 0x63, 0x70, 0x64, 0xcf, 0x85, 0xf6, 0x27, 0x99, 0xcb, 0xc1, 0x5f, 0xa4, 0x6a, 0x62, 0xc0, 0x3b, 0x0, 0x12, 0xaf, 0x46, 0x15, 0xf7, 0xcc, 0x4a, 0x6f, 0xd0, 0x93, 0x96, 0xa1, 0xa6, 0xd1, 0x3d, 0x55, 0xd2, 0x7c, 0xc7, 0x6e, 0x9d, 0xd0, 0x95, 0x97, 0xd6, 0xbe, 0xcc, 0x4, 0x67, 0xb0, 0x98, 0xf5, 0xde, 0xc0, 0x34, 0xeb, 0xca, 0xe7, 0xa6, 0x60, 0x39, 0x45, 0x21, 0xcf, 0xf7, 0xd8, 0x2b, 0xd4, 0x18, 0xff, 0x8c, 0xef, 0x7c, 0x1e, 0x5c, 0xf, 0xbe, 0x1c, 0x1f, 0x26, 0x2b, 0x4d, 0xfa, 0x18, 0x6c, 0x78, 0x5b, 0x0, 0xce, 0x61, 0x4c, 0x45, 0x58, 0xd9, 0x37, 0x16, 0xe1, 0x77, 0x66, 0xd4, 0xd5, 0xea, 0xc4, 0xb0, 0xb8, 0x1c, 0xb, 0x86, 0x6e, 0x41, 0xe6, 0x8b, 0xa0, 0xbe, 0x22, 0x2d, 0x32, 0xf8, 0xd8, 0x35, 0x7, 0x92, 0x54, 0x17, 0xba, 0xfe, 0xc4, 0xb7, 0xee, 0x39, 0xc3, 0x74, 0x41, 0x2f, 0x71, 0x76, 0x7d, 0xf7, 0x83, 0x76, 0x60, 0x5a, 0x0, 0x29, 0x90, 0x84, 0x5b, 0x9e, 0x79, 0x10, 0x11, 0x72, 0x41, 0x51, 0xcd, 0x3e, 0xf2, 0x61, 0x91, 0xe6, 0xc2, 0xdb, 0x99, 0xae, 0xe, 0xca, 0x55, 0x79, 0xf3, 0xa2, 0x4d, 0x2, 0x1f, 0x15, 0xa0, 0x93, 0x19, 0x23, 0x55, 0x8, 0x13, 0x5b, 0x39, 0x6e, 0x97, 0x81, 0x9d, 0xcf, 0xf8, 0x36, 0x17, 0xe6, 0x41, 0xd6, 0x77, 0x88, 0x29, 0xd6, 0xe3, 0xa2, 0x6f, 0x71, 0x86, 0xef, 0xb1, 0x4d, 0xde, 0xaf, 0x21, 0x13, 0xb9, 0xea, 0x53, 0x8f, 0xfb, 0x2c, 0x22, 0x7, 0xb7, 0x37, 0xf7, 0xb7, 0x8, 0xef, 0x54, 0xc1, 0x62, 0x52, 0xf2, 0xa6, 0x32, 0x97, 0xfe, 0x57, 0x10, 0x34, 0xfb, 0x4b, 0xca, 0xa1, 0xea, 0x6c, 0x4b, 0x65, 0x1, 0x7f, 0xb4, 0xec, 0x70, 0x50, 0xbd, 0xfa, 0x24, 0xba, 0xcb, 0x1a, 0xfe, 0x2e, 0x2d, 0x52, 0x6e, 0xe2, 0x78, 0x4e, 0x1a, 0xc9, 0x25, 0x12, 0xe4, 0xef, 0xdd, 0xb7, 0x2e, 0x4b, 0x12, 0x81, 0x9, 0x97, 0xcd, 0xc3, 0x9e, 0xa1, 0xa8, 0x27, 0xfa, 0x8, 0xdd, 0x2d, 0x7d, 0x88, 0xe7, 0x81, 0x86, 0x2e, 0x7c, 0x5b, 0xd9, 0x64, 0xa1, 0x43, 0xf6, 0x12, 0x23, 0x42, 0x36, 0x89, 0xb8, 0x16, 0x75, 0x23, 0x1c, 0xf9, 0x7c, 0x64, 0xa3, 0xa7, 0x16, 0x18, 0xf7, 0xcf, 0x6a, 0x44, 0xce, 0x45, 0x80, 0x37, 0x73, 0xa, 0x25, 0x92, 0x71, 0x15, 0x82, 0xea, 0x9d, 0x9e, 0xff, 0x63, 0x40, 0xf, 0xca, 0x70, 0xb7, 0xb5, 0x25, 0x1d, 0xa7, 0xd, 0xa3, 0xd3, 0x39, 0xb7, 0x68, 0x76, 0x21, 0x11, 0xd2, 0x7b, 0x1a, 0x2e, 0x9c, 0xa5, 0x59, 0xf5, 0x44, 0xad, 0xf0, 0xf, 0x8c, 0x23, 0x72, 0xcf, 0xbf, 0x3, 0xc2, 0x15, 0xb7, 0x5c, 0xef, 0xbd, 0xd6, 0xb3, 0x63, 0x4a, 0x8f, 0xd1, 0x5, 0x4a, 0x5c, 0x1, 0x6f, 0xf1, 0xfe, 0xaf, 0x5, 0x26, 0xed, 0x8b, 0x96, 0x8c, 0xb4, 0x4d, 0x27, 0x9c, 0x4, 0x15, 0x9e, 0x77, 0xa0, 0x28, 0x97, 0x17, 0xd3, 0xe2, 0x51, 0x5d, 0xb6, 0xa7, 0xb5, 0xb4, 0x86, 0x6, 0x81, 0xcf, 0x8c, 0x7a, 0x15, 0x89, 0xa3, 0xd8, 0x5c, 0x57, 0x24, 0xa2, 0x89, 0x76, 0x19, 0x33, 0x12, 0xad, 0xa2, 0x4c, 0x23, 0x97, 0xd2, 0xc1, 0xb, 0xaf, 0x2f, 0xa9, 0x33, 0xd7, 0x1f, 0x2b, 0xb2, 0x79, 0x41, 0x90, 0x73, 0x2, 0x42, 0xe1, 0x17, 0xc9, 0xf, 0xaa, 0x63, 0x91, 0xfd, 0xac, 0x1e, 0xc6, 0x1c, 0xe7, 0x80, 0xa7, 0x86, 0x4f, 0x6f, 0x1d, 0x6d, 0x8c, 0xc1, 0x9c, 0x2, 0x4f, 0x47, 0x91, 0xb4, 0x92, 0x8f, 0x1a, 0x2b, 0x5e, 0xc9, 0x1c, 0xdc, 0xc1, 0xfb, 0xc1, 0xe8, 0x9e, 0x7c, 0xf5, 0xfe, 0xb9, 0x74, 0xa0, 0x23, 0x1d, 0xd7, 0x1d, 0x43, 0x57, 0x41, 0xd8, 0xfd, 0xc3, 0x73, 0x0, 0x12, 0x79, 0x5f, 0xcd, 0xb4, 0xb1, 0x52, 0x67, 0xcd, 0x20, 0xe, 0x57, 0x6b, 0x7d, 0x1e, 0xb9, 0xc5, 0x21, 0xf, 0x24, 0xb9, 0x16, 0xa0, 0x1d, 0xdd, 0x1b, 0xfb, 0x13, 0x78, 0xaa, 0x86, 0x5e, 0xd8, 0x6d, 0x0, 0x56, 0xca, 0x5c, 0x92, 0xe5, 0xf7, 0xbd, 0x57, 0xd4, 0x47, 0x57, 0x25, 0x60, 0xed, 0x23, 0x10, 0x7e, 0xe6, 0xc0, 0x8f, 0x5, 0x10, 0xe2, 0x59, 0x4f, 0x47, 0xe1, 0x9a, 0xd6, 0x72, 0x5b, 0xb3, 0x3, 0xee, 0xd6, 0x3b, 0xe2, 0xf9, 0x4c, 0x5, 0x1, 0xc6, 0x9, 0xc5, 0x65, 0xe4, 0xa, 0xd7, 0x42, 0x11, 0xfe, 0x97, 0xde, 0x80, 0xcd, 0xc8, 0x2b, 0x20, 0x97, 0x7a, 0x1d, 0x24, 0xa7, 0xe3, 0x5c, 0x3e, 0xdc, 0xac, 0x3a, 0x59, 0xe, 0xbf, 0x65, 0xee, 0x6f, 0x5d, 0x4, 0x4f, 0x43, 0xee, 0xfe, 0xe6, 0xca, 0x71, 0x32, 0x6a, 0xa7, 0x13, 0xfd, 0xd8, 0x78, 0xcc, 0xb6, 0xf5, 0x3d, 0x9, 0x91, 0x34, 0x20, 0x11, 0x32, 0x20, 0xaf, 0x1e, 0x37, 0xce, 0xc5, 0xfd, 0x5b, 0x1f, 0x17, 0x43, 0xec, 0x12, 0x92, 0x67, 0xa6, 0xd5, 0x50, 0x39, 0x43, 0xbb, 0x5d, 0x4d, 0x21, 0xbd, 0xbe, 0x14, 0x9e, 0x1f, 0xf7, 0x46, 0x26, 0xb1, 0x91, 0xbf, 0x75, 0xb1, 0x9b, 0x5a, 0x2e, 0x42, 0x25, 0xfa, 0x8e, 0xc8, 0x87, 0x91, 0x47, 0x87, 0xa7, 0x5e, 0xbd, 0x7c, 0xc, 0xaf, 0xbf, 0xe0, 0xf5, 0xca, 0xee, 0x5, 0xf2, 0xcf, 0x46, 0x8a, 0x16, 0x4, 0xbb, 0xb1, 0xc5, 0xff, 0xc7, 0x89, 0x44, 0x1, 0x7a, 0x81, 0x40, 0x77, 0xb0, 0x7e, 0xdf, 0x48, 0x52, 0x4e, 0xb9, 0xa9, 0xba, 0xdc, 0xed, 0x4e, 0x56, 0x26, 0x74, 0x21, 0xa, 0x5e, 0xa2, 0x65, 0x7, 0xdf, 0xe2, 0x62, 0x11, 0xb5, 0x7a, 0xd3, 0xf6, 0x13, 0xcf, 0x95, 0x13, 0x6, 0xae, 0x51, 0xd4, 0xda, 0x53, 0xa9, 0x76, 0xe1, 0x39, 0xb3, 0xef, 0xf7, 0x83, 0xd, 0x66, 0x1c, 0xed, 0xb0, 0x59, 0xc9, 0x2f, 0x93, 0xbd, 0xe0, 0x20, 0x9c, 0x18, 0x4b, 0xed, 0x15, 0xe3, 0x83, 0x73, 0xa5, 0x8e, 0x8e, 0x10, 0x7b, 0x1f, 0xb0, 0xdf, 0x85, 0xdf, 0xff, 0xca, 0xfe, 0x9b, 0x0, 0x5c, 0xe, 0xf9, 0xc8, 0xc7, 0xbd, 0x31, 0x66, 0xf7, 0x77, 0xfa, 0x5d, 0x6, 0x1e, 0xe8, 0x27, 0xcd, 0x45, 0xba, 0xe3, 0x4b, 0xcf, 0x7e, 0xbc, 0xa1, 0xa4, 0x7f, 0x76, 0xf4, 0x59, 0xd6, 0xdc, 0x5f, 0x85, 0xef, 0xb0, 0xd9, 0xb5, 0xfa, 0x5c, 0x4b, 0xf1, 0x94, 0x94, 0xef, 0x7b, 0xb5, 0xf7, 0x6f, 0xcc, 0xec, 0x4e, 0xde, 0x71, 0xb4, 0xbb, 0x4a, 0x4b, 0x37, 0x11, 0x32, 0x89, 0x87, 0x3f, 0x3d, 0x57, 0xd0, 0x6b, 0x3d, 0x42, 0xce, 0x54, 0x3c, 0x11, 0x3c, 0x78, 0x9c, 0xfb, 0x88, 0xdb, 0x82, 0x7, 0xd2, 0x60, 0x7, 0xc8, 0x9, 0xbe, 0x20, 0x98, 0xc2, 0x0, 0x34, 0xec, 0xa5, 0x53, 0x9a, 0xc8, 0x12, 0x26, 0x40, 0xa7, 0x14, 0xb0, 0xee, 0x35, 0xf6, 0xb4, 0x66, 0xdd, 0xd, 0xa, 0x1d, 0x7, 0xd6, 0x54, 0x7e, 0x6e, 0xf4, 0xb2, 0x43, 0xce, 0x98, 0x35, 0xb9, 0xbf, 0x6c, 0xe2, 0xd1, 0x71, 0x17, 0x44, 0xbe, 0x3a, 0x40, 0x5f, 0x6e, 0x46, 0xe1, 0x82, 0x4a, 0x62, 0x5b, 0xeb, 0xc4, 0x2f, 0xf3, 0x40, 0x22, 0xe, 0x68, 0xb7, 0x85, 0xaf, 0x5c, 0xd5, 0xc0, 0x5c, 0x21, 0x5a, 0x6d, 0x3e, 0x31, 0xdf, 0x1c, 0xa9, 0x7d, 0x5, 0x42, 0x98, 0xc0, 0x39, 0x9f, 0xfb, 0x8, 0xb4, 0xce, 0x8b, 0x2d, 0x6d, 0x8, 0xa3, 0xca, 0xfb, 0x33, 0xee, 0x53, 0x6b, 0xb0, 0x1f, 0xef, 0xa5, 0xfc, 0xc7, 0xaa, 0x90, 0x5c, 0x83, 0xaf, 0x89, 0x50, 0x47, 0xcc, 0x7b, 0xb6, 0x5, 0x14, 0x82, 0xdc, 0xd5, 0xaa, 0xda, 0x28, 0xe9, 0x6, 0xea, 0xd9, 0xb9, 0xc, 0xee, 0x2b, 0x32, 0xf9, 0xb9, 0x17, 0x12, 0x36, 0x51, 0x25, 0x8d, 0x47, 0x4c, 0xc6, 0x99, 0x93, 0x4f, 0xe7, 0x32, 0xa9, 0xdb, 0x3d, 0x83, 0xc, 0xe1, 0xc3, 0x3f, 0xf3, 0x9e, 0x94, 0x6f, 0x6b, 0xbe, 0x36, 0x3a, 0xeb, 0x3a, 0x3f, 0x8, 0x95, 0xca, 0x9, 0xf7, 0x8e, 0xd3, 0x7b, 0x66, 0xc9, 0x19, 0xa1, 0x5d, 0x85, 0xe9, 0xea, 0x68, 0xf9, 0xae, 0xf3, 0x83, 0xa7, 0xab, 0x61, 0x10, 0x1b, 0xc6, 0xd4, 0xbe, 0xb7, 0xe3, 0x6b, 0xb9, 0xbc, 0xc0, 0x44, 0x21, 0xa0, 0xbf, 0x7a, 0x26, 0x36, 0x51, 0xc3, 0xa, 0x40, 0xb6, 0x52, 0x28, 0x6a, 0x56, 0x78, 0xea, 0xd, 0xa5, 0x16, 0xd4, 0xba, 0xf8, 0x9d, 0x74, 0x7d, 0x5, 0x59, 0xb1, 0x19, 0x19, 0x9a, 0x7a, 0x61, 0x55, 0x28, 0xcc, 0xdb, 0x2d, 0x5b, 0x10, 0xe9, 0x9b, 0x2b, 0xec, 0x59, 0xb7, 0x42, 0xb4, 0xf, 0x8a, 0x30, 0x46, 0x48, 0x18, 0x58, 0xf7, 0xd, 0x18, 0xb5, 0x44, 0x19, 0x74, 0xd4, 0xa5, 0xf4, 0xa7, 0x32, 0x4, 0x1b, 0x99, 0x97, 0x73, 0xa9, 0x3c, 0x3f, 0xb4, 0x32, 0x5b, 0x6e, 0x5f, 0x5e, 0xb7, 0x84, 0x99, 0x23, 0x40, 0x7e, 0x15, 0xa5, 0x5b, 0xa4, 0x6f, 0x38, 0x4, 0xde, 0x3e, 0x8c, 0xa9, 0x56, 0x1b, 0xf8, 0x76, 0x22, 0xec, 0x8e, 0x91, 0x69, 0x8c, 0xf, 0xd9, 0x7b, 0x64, 0x13, 0xd3, 0x21, 0x2f, 0x14, 0x10, 0xd9, 0xad, 0x7, 0x54, 0xb4, 0x57, 0xf0, 0x41, 0xa6, 0x80, 0x5f, 0xc3, 0xd, 0x7a, 0x7a, 0x98, 0x70, 0xc, 0x5d, 0x6a, 0xdc, 0xef, 0x4a, 0x1f, 0x23, 0xe5, 0x19, 0x50, 0xf2, 0xfa, 0x40, 0xf7, 0x4f, 0xdd, 0x6a, 0xee, 0xd4, 0x7c, 0xba, 0xe6, 0xcb, 0xcc, 0xb9, 0x3e, 0x8a, 0x6, 0x95, 0xd, 0x98, 0xc, 0xa2, 0x61, 0x70, 0x5a, 0x8e, 0xfb, 0x5b, 0x7b, 0xc8, 0x66, 0xf5, 0x45, 0x1f, 0x70, 0x9e, 0x8f, 0x1, 0x79, 0x16, 0x0, 0xaa, 0x7e, 0x93, 0xad, 0x41, 0x8, 0x8d, 0xab, 0x6a, 0xc9, 0xea, 0x25, 0x28, 0x52, 0x14, 0xd4, 0xfa, 0x5a, 0x1c, 0x4c, 0x31, 0xed, 0x4e, 0x1, 0x57, 0xa3, 0xa6, 0xbb, 0x94, 0xf8, 0xe0, 0xac, 0xb6, 0x6b, 0xe, 0x5f, 0xb3, 0x23, 0x28, 0x4c, 0x54, 0xfa, 0x9e, 0x7, 0x54, 0x20, 0x30, 0x67, 0x93, 0x84, 0xaa, 0xea, 0x81, 0x75, 0x76, 0x32, 0x9f, 0xad, 0x20, 0xbf, 0x28, 0xd8, 0xc, 0xf8, 0x24, 0xd7, 0x51, 0x20, 0x6b, 0xe1, 0x7a, 0xc, 0xe1, 0x6a, 0x9c, 0x2e, 0xbd, 0xd, 0x80, 0xc7, 0xe6, 0x43, 0x86, 0x7c, 0xc3, 0x2f, 0xf9, 0xca, 0x92, 0xe9, 0xad, 0xab, 0x3e, 0x10, 0x96, 0xcd, 0xde, 0x69, 0xb6, 0xc2, 0x99, 0x4, 0x66, 0x61, 0x14, 0x89, 0xbe, 0xda, 0xec, 0xcb, 0x9b, 0xc1, 0x35, 0xeb, 0x2e, 0xf5, 0x45, 0x2, 0xac, 0xfa, 0xfe, 0x49, 0x7e, 0xd6, 0x68, 0xaf, 0x4c, 0x98, 0x49, 0x59, 0xcf, 0xf2, 0x84, 0xb2, 0xae, 0x81, 0x63, 0x8f, 0x2e, 0x11, 0xcd, 0xc4, 0x63, 0x31, 0x88, 0x45, 0xa3, 0x63, 0xeb, 0x8, 0x38, 0x5b, 0x40, 0x2, 0xe3, 0x63, 0x8f, 0xff, 0xa3, 0x47, 0x3, 0x9b, 0x40, 0xef, 0x73, 0x15, 0xc8, 0x8e, 0xfb, 0xf0, 0x1f, 0x9e, 0xab, 0x73, 0xa6, 0xf0, 0x59, 0x6a, 0x1a, 0x16, 0x94, 0x3b, 0x3, 0x13, 0x9f, 0x4e, 0x1a, 0x3e, 0xa5, 0x18, 0x2b, 0x40, 0x1f, 0x8d, 0xbe, 0x8, 0x52, 0x7d, 0x81, 0xed, 0x45, 0x68, 0x2d, 0x64, 0x59, 0xbc, 0xc9, 0x36, 0x2d, 0xe5, 0xd3, 0x51, 0xa5, 0xb8, 0x43, 0x7d, 0x79, 0xd2, 0x48, 0x99, 0xbf, 0x53, 0x16, 0xe8, 0x1a, 0x18, 0x2a, 0xcf, 0x4f, 0x74, 0xe, 0xaf, 0xff, 0xef, 0x36, 0x5a, 0xe5, 0x48, 0x32, 0x82, 0x2a, 0xb4, 0xf5, 0x8d, 0x89, 0x59, 0x60, 0x14, 0xfe, 0xdd, 0x5b, 0x99, 0xca, 0xab, 0xc0, 0xe8, 0x77, 0x60, 0x4b, 0xf4, 0xda, 0x5a, 0x4a, 0x8f, 0x8a, 0x93, 0xda, 0xc8, 0xb5, 0xff, 0x7f, 0x68, 0xbf, 0x41, 0x67, 0x56, 0x5, 0x79, 0x31, 0x7a, 0x77, 0x99, 0xd9, 0xed, 0x14, 0xb7, 0xc4, 0x71, 0x9e, 0x34, 0xaa, 0x33, 0x12, 0xf2, 0xb9, 0xf0, 0x73, 0x21, 0xbd, 0x38, 0xfe, 0x23, 0x2b, 0x66, 0xfc, 0xeb, 0xcf, 0xa5, 0xa1, 0x5e, 0xa6, 0x97, 0x1c, 0x92, 0xc0, 0xeb, 0x37, 0x7c, 0x44, 0xa8, 0xb2, 0xc9, 0x2b, 0xe3, 0x63, 0x47, 0x5, 0xf7, 0xfd, 0x1, 0xf8, 0xe2, 0xb1, 0xf, 0x61, 0xa7, 0xad, 0xaa, 0xb9, 0x30, 0x9, 0xb0, 0xb6, 0x12, 0xcf, 0xca, 0xc9, 0x31, 0x5e, 0xbf, 0xaf, 0x32, 0x1c, 0x27, 0xb9, 0xfb, 0x2d, 0xa0, 0x12, 0xa, 0x8, 0xf5, 0x12, 0xa9, 0xa9, 0x14, 0x9b, 0x47, 0x97, 0xe4, 0x0, 0xda, 0x17, 0xe7, 0x49, 0xbf, 0xd1, 0x68, 0x3d, 0xf6, 0x28, 0xde, 0xd, 0x6, 0x2a, 0x86, 0xb9, 0x31, 0xdd, 0x19, 0xa6, 0x39, 0xaa, 0x7e, 0xe3, 0x32, 0xc5, 0x3a, 0x8c, 0x77, 0x1e, 0x78, 0x7f, 0x7b, 0x7c, 0x6d, 0x81, 0x7f, 0x53, 0xb6, 0xe5, 0x71, 0x53, 0xc3, 0x2b, 0x25, 0xf8, 0x7a, 0x1d, 0xf9, 0x40, 0x7d, 0x23, 0x90, 0xf0, 0x2c, 0xf6, 0xda, 0x3a, 0x50, 0x8d, 0x17, 0x21, 0xf5, 0x5e, 0x15, 0x5e, 0x6e, 0x20, 0xbf, 0xec, 0xd, 0x25, 0x50, 0x59, 0x8d, 0x81, 0x5f, 0x71, 0xe0, 0x65, 0x42, 0x6e, 0x4a, 0xfd, 0x67, 0x7a, 0x1f, 0xcf, 0x41, 0xa2, 0x4c, 0xbd, 0x82, 0xdb, 0x61, 0x35, 0xf4, 0x5d, 0x74, 0xd0, 0xe8, 0xae, 0xd9, 0x4b, 0xda, 0x26, 0xa0, 0xf4, 0x2d, 0x19, 0xf5, 0x20, 0x28, 0x12, 0x2d, 0xf5, 0x51, 0x6, 0xe4, 0x5f, 0x8b, 0x36, 0x4f, 0x65, 0xe3, 0x14, 0xef, 0x77, 0xef, 0xb, 0x7b, 0xcd, 0xd8, 0x24, 0x25, 0xd8, 0xe3, 0x21, 0x2e, 0x3c, 0x7d, 0xdb, 0x4e, 0xa1, 0xd3, 0x78, 0xe2, 0x30, 0xf, 0x10, 0xae, 0x70, 0x74, 0x66, 0x75, 0x2b, 0x15, 0xeb, 0x44, 0x89, 0xce, 0xa8, 0x7, 0xe9, 0xaa, 0x3, 0xb8, 0x86, 0xf3, 0xd6, 0x23, 0x51, 0x4a, 0x7d, 0x16, 0x67, 0x2b, 0x6d, 0xc0, 0x25, 0x50, 0x2b, 0xbb, 0x69, 0xa8, 0xac, 0x5e, 0x37, 0x4b, 0x94, 0xa0, 0xf1, 0x53, 0xdd, 0x86, 0xb3, 0xb5, 0x53, 0x8, 0xac, 0x5, 0xae, 0x58, 0x69, 0xc0, 0xae, 0x5e, 0x18, 0x20, 0x8b, 0xb0, 0xae, 0xce, 0xc3, 0xd5, 0xe3, 0x99, 0x93, 0x6d, 0x58, 0xff, 0x9f, 0xb9, 0x33, 0xba, 0x34, 0x9a, 0xd5, 0x67, 0xf9, 0xcc, 0xf7, 0x43, 0xc2, 0x64, 0x60, 0x6b, 0x41, 0xd8, 0xaa, 0x1a, 0x4c, 0x16, 0x4f, 0xfd, 0xfc, 0x98, 0x53, 0xfb, 0xe6, 0xac, 0xf1, 0x1f, 0x21, 0x34, 0x90, 0xa4, 0x71, 0xe8, 0xc, 0x15, 0xde, 0xf7, 0xd9, 0x85, 0xaa, 0x9c, 0x34, 0xc, 0x12, 0x64, 0x73, 0xd1, 0xd1, 0x4b, 0xcc, 0x82, 0x6c, 0x12, 0xc2, 0x0, 0xd7, 0x2e, 0x1a, 0x0, 0xb3, 0x92, 0x76, 0x7b, 0xde, 0x8, 0x84, 0x0, 0x5d, 0x27, 0xa, 0x1c, 0x62, 0x41, 0x3a, 0xef, 0x75, 0x48, 0x4, 0xa2, 0xf0, 0x4b, 0xa3, 0xc9, 0xb4, 0xa4, 0xfc, 0x90, 0x76, 0x95, 0x18, 0x60, 0xf9, 0xa0, 0xde, 0xa8, 0xb, 0xd6, 0xcf, 0x5f, 0xd6, 0xe5, 0x19, 0x83, 0xaf, 0x34, 0x4b, 0x88, 0x7a, 0xc3, 0xf9, 0x7, 0xa4, 0xa, 0x69, 0x4d, 0xed, 0x88, 0x40, 0x99, 0x8c, 0x3a, 0x27, 0x3f, 0xb1, 0x26, 0x7c, 0x4c, 0x7c, 0xbc, 0x2f, 0xd0, 0xa5, 0x13, 0x15, 0xf3, 0x13, 0xe3, 0x28, 0x18, 0xb4, 0x5d, 0x6c, 0x7f, 0xbe, 0xdb, 0x5a, 0xa6, 0x73, 0xe7, 0xa8, 0x6, 0x9c, 0x93, 0x1a, 0xb8, 0x38, 0xde, 0x20, 0x45, 0xe7, 0x98, 0x52, 0xfd, 0x83, 0x2c, 0x5, 0x46, 0x22, 0x8a, 0xee, 0x6b, 0xc7, 0x7d, 0x72, 0xd8, 0xe9, 0x84, 0x57, 0x5e, 0x27, 0xec, 0x61, 0xe, 0x41, 0x1d, 0xe7, 0xe0, 0x27, 0x25, 0x8, 0x5a, 0xab, 0xb, 0xa9, 0x67, 0xa9, 0x30, 0x5, 0x83, 0xf2, 0x7a, 0x18, 0x93, 0xc1, 0x43, 0x2f, 0x3e, 0x65, 0x1b, 0xe3, 0xe4, 0x9d, 0x60, 0x69, 0x6, 0x52, 0xd6, 0x17, 0x7b, 0x39, 0xbc, 0xd6, 0xb8, 0xe0, 0xa6, 0xa6, 0xa8, 0x12, 0x4, 0x8f, 0xb2, 0xcc, 0xfc, 0x6c, 0xc6, 0x36, 0xa0, 0xfe, 0xa9, 0x89, 0xce, 0xac, 0xa7, 0xbf, 0xdb, 0x52, 0x86, 0xe9, 0xf9, 0xb3, 0x4e, 0xe5, 0xbb, 0xe0, 0xce, 0x93, 0xd4, 0xa4, 0x61, 0x4a, 0x35, 0x4e, 0xa9, 0x1d, 0xea, 0x8b, 0xa0, 0xfe, 0x6a, 0xf3, 0xa4, 0x35, 0x2, 0x88, 0xb0, 0xca, 0xab, 0x1f, 0xcc, 0x13, 0x52, 0x75, 0xae, 0x5a, 0x65, 0x9e, 0x4c, 0x3a, 0x8, 0xc9, 0xe2, 0x48, 0x1f, 0xeb, 0xd1, 0x50, 0x59, 0x6e, 0x68, 0x40, 0x9, 0x13, 0x7d, 0xe6, 0xa0, 0xf1, 0x75, 0x2e, 0x25, 0x24, 0x2, 0x83, 0xdf, 0xa5, 0x84, 0x51, 0xc9, 0x4f, 0x9a, 0xb9, 0x6b, 0xc4, 0xf3, 0xdf, 0x55, 0x7, 0x23, 0xe, 0x15, 0x2b, 0xb0, 0xc7, 0xf0, 0xf4, 0xc0, 0xf0, 0xd, 0x94, 0x80, 0x50, 0x95, 0x95, 0xeb, 0x25, 0xbd, 0xd3, 0xf3, 0xb2, 0x99, 0xcd, 0xd, 0x16, 0x5e, 0xa4, 0xc2, 0xf2, 0xba, 0x5b, 0x2, 0x2b, 0xf5, 0x7a, 0x30, 0xe8, 0xe3, 0x9c, 0xbb, 0xdd, 0xe0, 0x47, 0xf1, 0xc9, 0x1f, 0x87, 0xb6, 0x58, 0x21, 0x50, 0x76, 0xef, 0x53, 0x4f, 0xde, 0xc7, 0x55, 0x80, 0xe2, 0x10, 0xa9, 0x48, 0xbb, 0x1c, 0x3e, 0xd8, 0xbe, 0x98, 0x18, 0x1d, 0xfb, 0x6e, 0x15, 0xff, 0xde, 0x2b, 0xb7, 0xf3, 0xec, 0x5d, 0xa5, 0x90, 0x7a, 0x71, 0xfa, 0xb7, 0x70, 0xd2, 0x9a, 0xda, 0x27, 0x62, 0xd5, 0x88, 0x7b, 0x30, 0x6f, 0x7a, 0x85, 0x86, 0x22, 0x3d, 0x8c, 0xb8, 0x9a, 0x8e, 0x84, 0x21, 0x60, 0x9c, 0xd8, 0xf, 0x21, 0x75, 0xf2, 0xda, 0xa6, 0x1a, 0xe3, 0xbd, 0x7b, 0xd1, 0x35, 0xbe, 0x39, 0xed, 0xdd, 0x2b, 0x26, 0x87, 0x38, 0x14, 0x20, 0xe2, 0xc9, 0x2a, 0x10, 0x7e, 0x28, 0xe3, 0xe0, 0xb, 0x50, 0x7e, 0x32, 0x5f, 0x4a, 0xce, 0x54, 0x13, 0x7b, 0x37, 0xa0, 0xa7, 0x50, 0xe3, 0x62, 0x9d, 0x64, 0x59, 0x6e, 0x1c, 0x1b, 0x50, 0x91, 0xf1, 0x76, 0x1f, 0x3e, 0xb7, 0xc3, 0x4a, 0xb6, 0xc5, 0x4e, 0x10, 0x8a, 0x89, 0xdd, 0x1e, 0xdb, 0x83, 0x3d, 0x21, 0xec, 0x68, 0x8e, 0xf3, 0xc3, 0x7a, 0xb1, 0xf7, 0x62, 0xe5, 0xaa, 0xd7, 0xc6, 0xb3, 0x76, 0x4b, 0x5e, 0xc0, 0x4b, 0x3c, 0x3f, 0x31, 0x97, 0x32, 0xc1, 0xa3, 0xd2, 0x5, 0x82, 0xd9, 0xef, 0x30, 0xc4, 0xb3, 0x53, 0x6b, 0x7c, 0x47, 0x19, 0x7c, 0x97, 0xc7, 0x67, 0x92, 0x14, 0x5c, 0xb8, 0x47, 0xbd, 0x2f, 0xb8, 0x4a, 0x7c, 0xb4, 0x60, 0x84, 0x2f, 0x9, 0x56, 0x2, 0xc, 0x32, 0xd, 0x48}, - output224: []byte{0x15, 0xe1, 0x5, 0x8, 0xa9, 0x79, 0x46, 0xcf, 0x7d, 0x8, 0x42, 0xc5, 0x1e, 0x63, 0xd3, 0x4b, 0xd9, 0x93, 0x56, 0x3d, 0x9b, 0x3c, 0x6b, 0x81, 0xb7, 0x56, 0xf6, 0xcd}, - output256: []byte{0xdf, 0x6e, 0x9b, 0x8, 0x44, 0x15, 0x3e, 0x3c, 0xd6, 0x54, 0xd4, 0x60, 0xd5, 0x37, 0xe, 0xe1, 0x91, 0x77, 0x62, 0xf6, 0x7d, 0xc2, 0x9b, 0xec, 0xe4, 0x4d, 0xf2, 0x65, 0x2e, 0xa6, 0xae, 0x59}, - output384: []byte{0xdb, 0x72, 0x2f, 0xd0, 0x96, 0x99, 0x2d, 0x5f, 0x25, 0xfb, 0xfe, 0xf7, 0x99, 0x1e, 0xa8, 0xc1, 0xbc, 0xe6, 0xb1, 0xc2, 0xad, 0x49, 0x21, 0xac, 0x61, 0x9f, 0xe1, 0x9c, 0x50, 0x5e, 0x3e, 0x2d, 0x82, 0xd1, 0xca, 0x64, 0x4d, 0xed, 0xad, 0xec, 0x87, 0x6f, 0x51, 0xfd, 0xb2, 0x15, 0x78, 0xb}, - output512: []byte{0x81, 0x30, 0x7d, 0xa5, 0x51, 0xcf, 0x5, 0x76, 0x6e, 0x29, 0xb8, 0xfe, 0x5c, 0x33, 0xfa, 0x5a, 0x12, 0x4b, 0xd0, 0x20, 0x2b, 0xc5, 0xe3, 0x9, 0xd6, 0x48, 0xe0, 0xec, 0xfa, 0xdb, 0x44, 0x28, 0x6, 0xdc, 0x5e, 0x2f, 0x8a, 0xe9, 0xc4, 0x66, 0x14, 0xc2, 0x39, 0x9e, 0xf9, 0x1c, 0xd2, 0x15, 0x91, 0x5d, 0xfd, 0x48, 0x55, 0x59, 0x85, 0xa5, 0xc6, 0x31, 0x38, 0x91, 0x5b, 0xbe, 0x27, 0x37}}, - testcase{ - msg: []byte{0x97, 0x40, 0xcb, 0xe9, 0xeb, 0x65, 0xad, 0x1c, 0xe9, 0x13, 0xf4, 0xb, 0xe2, 0x36, 0xb1, 0xad, 0x71, 0x41, 0xf8, 0xea, 0x72, 0x10, 0x4b, 0x12, 0x2f, 0xe9, 0xac, 0x99, 0xb6, 0x55, 0x2b, 0x1b, 0x3a, 0x34, 0xfd, 0x6c, 0x1b, 0x96, 0x2f, 0x1e, 0xca, 0xdd, 0x53, 0xb5, 0x30, 0x86, 0x6b, 0xfd, 0xad, 0x8d, 0x81, 0xf8, 0x40, 0x5c, 0x1d, 0x54, 0xe2, 0xd, 0x99, 0xf3, 0xf, 0xb0, 0x41, 0x97, 0x5f, 0x70, 0xdd, 0x97, 0x1c, 0x17, 0x42, 0x4c, 0x60, 0x1f, 0x46, 0x51, 0x6c, 0x13, 0x53, 0x49, 0x67, 0x31, 0x8d, 0x3c, 0x5d, 0x60, 0xec, 0xbe, 0xc6, 0x7, 0xc4, 0x2d, 0x8, 0x25, 0xff, 0xb8, 0x4d, 0x7c, 0x5c, 0x69, 0x85, 0x85, 0x12, 0xa3, 0xc5, 0x9e, 0xae, 0xed, 0x3f, 0x61, 0x12, 0x4d, 0xf7, 0x9f, 0x13, 0xd6, 0x3c, 0x38, 0x2c, 0xff, 0x70, 0xeb, 0xd2, 0x50, 0xff, 0x94, 0xe1, 0x68, 0x4e, 0xb5, 0xad, 0x80, 0x67, 0x14, 0xb4, 0x13, 0x2e, 0x85, 0x5c, 0xb2, 0xc, 0x9, 0x95, 0x1e, 0x3d, 0x1f, 0x18, 0x5d, 0xa0, 0x9b, 0xd, 0xfc, 0x4c, 0x2, 0x6f, 0xef, 0x5d, 0x34, 0x87, 0xe5, 0xf6, 0x7, 0x57, 0x8d, 0x34, 0xc5, 0xa4, 0xe9, 0xc3, 0x1, 0xc0, 0x7d, 0xfb, 0xb7, 0x22, 0x33, 0x54, 0x2c, 0x4, 0xfe, 0xc1, 0x8e, 0xce, 0x50, 0xc, 0x4c, 0xa4, 0x79, 0xa4, 0x76, 0x2e, 0x5d, 0xa2, 0xbf, 0xe6, 0x30, 0xf6, 0xe4, 0x55, 0x81, 0x92, 0xd6, 0x56, 0x1b, 0x69, 0xbe, 0x36, 0x95, 0x68, 0x83, 0x62, 0xdc, 0x88, 0xde, 0xfc, 0xf8, 0x59, 0x85, 0x83, 0x96, 0xf9, 0x74, 0xe5, 0x97, 0x44, 0xbd, 0x2, 0x24, 0xf5, 0x78, 0xf3, 0xb1, 0xc6, 0xf4, 0x6c, 0x7e, 0xaa, 0x52, 0x3f, 0x67, 0x2b, 0x52, 0x90, 0x6d, 0xda, 0x5a, 0xd7, 0xa4, 0x10, 0xac, 0x6e, 0xd5, 0xd3, 0xab, 0x82, 0x3e, 0xb7, 0x23, 0x5b, 0x1c, 0xab, 0x4b, 0xfa, 0xc9, 0x2d, 0xd7, 0x3f, 0x4f, 0xb7, 0x96, 0xa2, 0x99, 0xc5, 0xf3, 0x9d, 0xe5, 0x90, 0xcf, 0x90, 0x30, 0x7c, 0x6b, 0xd8, 0xa7, 0x71, 0x7c, 0x32, 0x51, 0xcd, 0x61, 0x39, 0x17, 0x35, 0x8d, 0xb8, 0x37, 0xdb, 0xaa, 0xc6, 0x15, 0xac, 0xbe, 0x28, 0x85, 0x55, 0x8f, 0xc7, 0xa0, 0xbe, 0xa8, 0xe1, 0x51, 0x76, 0x75, 0x6c, 0xf5, 0xc9, 0x20, 0x4c, 0x3e, 0x3b, 0x2, 0x76, 0x4e, 0xd6, 0x8, 0xdd, 0xfc, 0x52, 0xa3, 0xbc, 0xcc, 0x2c, 0xf4, 0xae, 0xd6, 0xf8, 0xaf, 0x14, 0x95, 0x33, 0x63, 0xb0, 0x8a, 0x8, 0x85, 0xc1, 0x31, 0xcb, 0xb5, 0x71, 0x5e, 0xef, 0xa, 0x4, 0xd1, 0x8c, 0x4e, 0x6e, 0xfd, 0x59, 0xe9, 0x99, 0xf7, 0x4e, 0xe6, 0x9c, 0x79, 0xe9, 0x6a, 0x9c, 0xe7, 0xa5, 0xd9, 0xfe, 0x27, 0xa6, 0xa6, 0x51, 0xfe, 0xf5, 0x4b, 0x9, 0x76, 0x8c, 0x1a, 0xa4, 0x9f, 0xb0, 0x3b, 0x9, 0xb6, 0xae, 0xb1, 0x9b, 0x38, 0xb0, 0x0, 0x65, 0xec, 0x6d, 0xa0, 0x1f, 0xb4, 0x71, 0xd1, 0x79, 0x2f, 0x7e, 0x3d, 0x5d, 0x8c, 0x14, 0x38, 0x1c, 0xf6, 0x8c, 0x42, 0x70, 0x8a, 0x43, 0xef, 0x34, 0x31, 0x35, 0x92, 0x9f, 0xcc, 0xff, 0x2f, 0x66, 0x42, 0xc1, 0x3e, 0xd2, 0x0, 0x8f, 0xeb, 0xfe, 0x99, 0x72, 0xbc, 0x16, 0x4e, 0x37, 0x53, 0x83, 0xf5, 0x7, 0x98, 0xcb, 0x84, 0xff, 0x34, 0xe1, 0xfd, 0x7, 0x94, 0xa, 0x21, 0x8d, 0xd1, 0x74, 0xdc, 0x86, 0x90, 0x25, 0xe5, 0xfc, 0x45, 0x9b, 0xb0, 0xbb, 0xa9, 0x69, 0xa2, 0x24, 0xe, 0xbf, 0xe0, 0xef, 0xc1, 0xcd, 0x34, 0x15, 0x4e, 0xc1, 0xae, 0xa7, 0x3f, 0xf7, 0x85, 0x87, 0x49, 0x73, 0x5f, 0x1b, 0x27, 0x22, 0xc6, 0xdd, 0xd4, 0xa6, 0x99, 0x1d, 0x20, 0x69, 0xfc, 0x3d, 0x61, 0xa8, 0xb2, 0x39, 0x77, 0xfa, 0xae, 0x5c, 0x32, 0xd9, 0x5f, 0x3f, 0x18, 0x97, 0xb0, 0xe8, 0x6b, 0xc8, 0x70, 0x5c, 0xfb, 0x69, 0x84, 0xd4, 0x9c, 0x1e, 0xe2, 0x6a, 0x90, 0xb3, 0xc8, 0x67, 0x9e, 0xff, 0xab, 0x5a, 0xdb, 0x87, 0x1a, 0x3e, 0x21, 0x98, 0x1, 0xc7, 0xb1, 0x5d, 0x6d, 0xfc, 0x62, 0xe9, 0xdc, 0xcc, 0x88, 0x7c, 0xd7, 0xf2, 0x5b, 0xb7, 0x3e, 0xa2, 0xc3, 0xfe, 0xf7, 0x64, 0x96, 0x22, 0x46, 0x39, 0xa, 0x4a, 0xd9, 0x66, 0x10, 0xf5, 0xe0, 0xe7, 0xeb, 0x59, 0xb3, 0x2e, 0x7e, 0xc2, 0x1, 0x45, 0x30, 0x8d, 0x81, 0xf6, 0xf6, 0x38, 0x29, 0x90, 0x57, 0xb2, 0x27, 0x6e, 0xd0, 0x45, 0xae, 0xa7, 0x10, 0x3b, 0x44, 0xbc, 0x85, 0xd3, 0x3c, 0xdd, 0xf, 0xcd, 0x73, 0x80, 0x35, 0xe6, 0x70, 0xb2, 0x85, 0x76, 0x2c, 0x65, 0xc3, 0xef, 0x52, 0x45, 0x2a, 0xce, 0x98, 0xc, 0x41, 0x16, 0x1d, 0x85, 0x93, 0xf4, 0x6d, 0xd2, 0x81, 0x6d, 0x43, 0x5d, 0xf7, 0xfe, 0x90, 0x87, 0x1a, 0x9b, 0x4c, 0xa1, 0xc5, 0xcb, 0xe6, 0x36, 0x2e, 0x22, 0x5e, 0x89, 0x50, 0x88, 0x9f, 0xeb, 0xc4, 0x75, 0x45, 0xf6, 0x7, 0xa7, 0xae, 0x4b, 0xa8, 0xb8, 0x63, 0x50, 0xb5, 0x54, 0xf6, 0x1d, 0x42, 0x4f, 0xb5, 0x1c, 0x8e, 0x98, 0x86, 0x0, 0xe, 0x4e, 0x7, 0xde, 0xc3, 0x24, 0xbb, 0x51, 0x19, 0xa5, 0xb5, 0x9, 0x9b, 0xbb, 0x12, 0x6b, 0xc, 0xc, 0xa0, 0xcd, 0x8f, 0xbc, 0x30, 0x47, 0x80, 0xa9, 0xbb, 0x44, 0xa4, 0xab, 0xf5, 0x8d, 0x30, 0xdb, 0x42, 0x45, 0xb6, 0x5c, 0xe2, 0xb, 0x9, 0x75, 0xc7, 0x86, 0x9b, 0x39, 0xb9, 0x66, 0xa5, 0x9f, 0xe6, 0x92, 0x90, 0xd5, 0xab, 0x3f, 0xab, 0xb1, 0x2d, 0xf5, 0x2, 0x4d, 0xaa, 0x6, 0x5a, 0x48, 0xa0, 0x7a, 0x8c, 0x8, 0x4d, 0xd6, 0x10, 0x16, 0x17, 0x8e, 0x69, 0xfb, 0xaf, 0x1f, 0xd8, 0x7c, 0xdf, 0x78, 0xe1, 0xaa, 0xba, 0x8a, 0x3a, 0x3, 0xb9, 0xfb, 0x89, 0x3a, 0xb7, 0xb6, 0x74, 0x54, 0x4e, 0x6b, 0x1e, 0x46, 0xf9, 0x43, 0xb1, 0x49, 0xcd, 0xfb, 0x85, 0x98, 0xf9, 0x8a, 0xc0, 0x8e, 0xfd, 0x87, 0x22, 0x83, 0x6b, 0xa3, 0x20, 0xaa, 0x13, 0xb4, 0x6, 0x89, 0x4, 0x49, 0xf9, 0x85, 0xff, 0x8a, 0x56, 0x8c, 0x66, 0x43, 0xb2, 0x4d, 0xb3, 0x5c, 0x25, 0xdf, 0x8f, 0xb, 0xaa, 0x2a, 0x17, 0xef, 0x66, 0xc2, 0xee, 0xe, 0x6f, 0x6e, 0x2b, 0x42, 0xe1, 0x84, 0x47, 0x59, 0x21, 0x50, 0x8f, 0xa6, 0x46, 0x32, 0xa4, 0x62, 0x9b, 0x72, 0xf7, 0xf3, 0x95, 0x13, 0xa0, 0x8c, 0x6b, 0x55, 0xa8, 0xf0, 0x48, 0x3f, 0x3f, 0xe1, 0xae, 0x75, 0x28, 0xe1, 0x28, 0xfa, 0x30, 0x74, 0x5f, 0x5, 0x83, 0xc2, 0x3c, 0x27, 0xb9, 0xd1, 0xeb, 0xe5, 0x6a, 0xe8, 0x6a, 0xbc, 0x1e, 0x24, 0x48, 0xb1, 0x5c, 0x46, 0x49, 0xe5, 0xe2, 0x6e, 0x18, 0x90, 0x90, 0xea, 0x98, 0x62, 0x23, 0x68, 0x8f, 0x31, 0xf, 0x70, 0x75, 0x75, 0xf7, 0x37, 0x8c, 0x7a, 0xeb, 0x7, 0xe, 0xd, 0xdf, 0xac, 0xff, 0x6, 0x9d, 0xeb, 0xec, 0x77, 0x3b, 0x8b, 0x50, 0xdc, 0x86, 0xa0, 0x12, 0xdb, 0x58, 0x61, 0x2e, 0xc9, 0xd, 0x64, 0xae, 0xee, 0xa0, 0x37, 0xc3, 0xcf, 0x40, 0xe4, 0x2f, 0x19, 0x48, 0xef, 0x83, 0x79, 0x37, 0xd6, 0x7c, 0x70, 0x59, 0x73, 0x2b, 0xb3, 0x2f, 0xc6, 0x18, 0xa2, 0x3, 0xad, 0x6, 0xd5, 0xf8, 0xb4, 0x72, 0xd0, 0xd6, 0x92, 0xd9, 0x37, 0x7, 0xb6, 0xb1, 0xb8, 0x5f, 0x83, 0x16, 0x1d, 0x13, 0xbd, 0x9, 0x30, 0xfc, 0xdb, 0xcf, 0xf9, 0x44, 0x95, 0x27, 0x7d, 0x9e, 0x39, 0xa, 0xb6, 0x71, 0x37, 0x1d, 0x45, 0x40, 0xe6, 0x6a, 0xc1, 0x8f, 0x3, 0xd6, 0x25, 0xc8, 0xd3, 0x8e, 0x75, 0xf6, 0x28, 0xb0, 0x6f, 0x47, 0x8e, 0x6c, 0xc4, 0xa4, 0x98, 0xbd, 0xe8, 0x11, 0xb9, 0xdd, 0x8b, 0x63, 0x6f, 0x7c, 0x76, 0x12, 0x77, 0xa5, 0x61, 0x22, 0xe5, 0x9d, 0xa, 0xd8, 0x5, 0x2a, 0xe0, 0xc, 0x8d, 0x8, 0x43, 0x64, 0x8, 0xea, 0x54, 0x33, 0xd6, 0x2, 0x7f, 0x79, 0x8f, 0x48, 0xdd, 0xf1, 0x5b, 0xa7, 0x60, 0x3, 0x63, 0xc7, 0xef, 0x67, 0x23, 0x6f, 0xa6, 0xef, 0x37, 0x74, 0x25, 0xcd, 0x9f, 0x63, 0x47, 0x88, 0xe9, 0xce, 0x34, 0xd0, 0x8a, 0x95, 0x6e, 0x24, 0xe3, 0x13, 0x71, 0x49, 0xb0, 0x8a, 0xe, 0xaa, 0x2d, 0x83, 0x1b, 0xf, 0x32, 0x85, 0xbf, 0xd2, 0x30, 0x85, 0x9a, 0xd0, 0x2d, 0x50, 0xfe, 0xb1, 0xb, 0x63, 0xee, 0xa8, 0x4, 0x4d, 0xbe, 0x97, 0x69, 0x3c, 0x29, 0xc1, 0x5, 0xc2, 0x16, 0x4e, 0xf4, 0x36, 0xb8, 0x8d, 0x5d, 0x87, 0xf, 0x88, 0xad, 0x59, 0x19, 0xfd, 0xe8, 0x14, 0x9b, 0x39, 0xaa, 0x65, 0xe9, 0x31, 0xbf, 0x5d, 0x46, 0x1a, 0x10, 0x9a, 0x42, 0x3e, 0x81, 0xc3, 0x76, 0xf1, 0x14, 0x95, 0xc0, 0x67, 0x1f, 0x3c, 0xf3, 0x71, 0xf8, 0x9f, 0x81, 0xd5, 0x22, 0x35, 0xd3, 0x41, 0x39, 0x92, 0x71, 0x31, 0x41, 0xc3, 0xf2, 0x8f, 0x14, 0xa9, 0x26, 0x40, 0x7a, 0x23, 0x9d, 0x6a, 0xd9, 0xcf, 0xe5, 0x65, 0xcc, 0x29, 0xf8, 0xa8, 0x36, 0xe5, 0x64, 0x3f, 0x5e, 0xad, 0x4c, 0xbd, 0x6b, 0xc9, 0x36, 0xef, 0xfd, 0xc6, 0x87, 0xb7, 0x58, 0x38, 0x4d, 0x7, 0x2, 0x73, 0xc8, 0xc2, 0xd2, 0xdb, 0xb8, 0x11, 0x23, 0xb5, 0x24, 0x14, 0x79, 0x79, 0xa8, 0xe0, 0xc0, 0xd9, 0x9b, 0x9, 0x81, 0x2e, 0xfa, 0xc7, 0x39, 0x46, 0x5d, 0x1a, 0x85, 0x8e, 0xf2, 0x33, 0xcd, 0xd1, 0x37, 0x69, 0xbb, 0x89, 0x96, 0x85, 0x6c, 0xcf, 0x50, 0x9d, 0x50, 0xcb, 0x33, 0xe4, 0x48, 0xa, 0x6a, 0xd9, 0x51, 0xe4, 0x51, 0xcc, 0x63, 0x79, 0x33, 0xbf, 0x8d, 0xbd, 0x51, 0x68, 0xc0, 0x6a, 0x76, 0xdd, 0x8, 0xd4, 0x2e, 0x6f, 0xb0, 0xba, 0x10, 0x44, 0xfc, 0x33, 0x47, 0x5a, 0x23, 0x42, 0xa5, 0x37, 0x65, 0xbd, 0x40, 0x99, 0x54, 0x6c, 0x9e, 0xf9, 0x6d, 0xe5, 0xb7, 0x8c, 0x59, 0xca, 0x61, 0x23, 0x22, 0x3e, 0x6f, 0x72, 0x68, 0xa, 0xb, 0x9d, 0xd9, 0xa1, 0x2b, 0x24, 0xca, 0xfe, 0xe3, 0x2f, 0xb, 0x6e, 0x14, 0x55, 0x15, 0x22, 0x2c, 0xbf, 0x2a, 0xbb, 0xd7, 0x33, 0xb, 0x9a, 0x91, 0x30, 0x3b, 0x68, 0x8d, 0xcc, 0x35, 0xdb, 0x23, 0x3c, 0x71, 0x4, 0x67, 0x16, 0x82, 0x1e, 0xe4, 0x9, 0x8, 0x3c, 0x79, 0xb, 0xca, 0xa8, 0x93, 0xd0, 0x4c, 0x9, 0xa8, 0xf6, 0xa9, 0xc3, 0x5c, 0x7, 0x2e, 0x50, 0x33, 0x10, 0x84, 0x6, 0x0, 0x95, 0x64, 0xb4, 0x13, 0x5c, 0x0, 0xfe, 0x40, 0x37, 0xd2, 0xd5, 0x1a, 0xb1, 0xd7, 0x21, 0xae, 0x6b, 0x74, 0xe8, 0x67, 0x7, 0x41, 0x99, 0xb7, 0x3b, 0x93, 0xa6, 0xd8, 0x9d, 0xdb, 0x8e, 0xe7, 0x46, 0x81, 0x21, 0x3b, 0xb6, 0x77, 0x1, 0x4d, 0x1c, 0xd7, 0x58, 0x21, 0xea, 0xdd, 0xdd, 0x7c, 0x1c, 0x78, 0xb6, 0xb7, 0x5a, 0xcf, 0x57, 0x4c, 0xbb, 0x28, 0x8d, 0x2b, 0x77, 0x8d, 0x84, 0xf8, 0x59, 0x9a, 0x42, 0x1c, 0x5b, 0x8b, 0x9a, 0x3b, 0x12, 0xf, 0x8b, 0x8f, 0x98, 0xb5, 0xcf, 0xb8, 0x1f, 0x4f, 0x8b, 0xbc, 0x41, 0x6e, 0x3e, 0x1e, 0x94, 0x62, 0xee, 0xa5, 0x84, 0xb, 0x96, 0xea, 0x87, 0x4a, 0x6c, 0x82, 0x67, 0xf5, 0xd1, 0x64, 0x51, 0xb9, 0x3b, 0x72, 0xdd, 0x59, 0x51, 0xde, 0x2c, 0x4d, 0x6d, 0x3f, 0x94, 0xba, 0x87, 0xa6, 0x2a, 0x19, 0xda, 0x58, 0xe3, 0xc, 0xcf, 0x7f, 0xb7, 0x82, 0x74, 0x5c, 0x23, 0x3c, 0xdc, 0xe1, 0xb0, 0xae, 0x1b, 0x1f, 0x14, 0x76, 0x98, 0x3d, 0x12, 0x34, 0x40, 0xa7, 0x65, 0xd5, 0xdb, 0xc, 0x3e, 0x38, 0xc4, 0x7b, 0xbf, 0xec, 0x5c, 0xe3, 0x7b, 0x94, 0x96, 0x93, 0x77, 0x39, 0x4a, 0x25, 0xa9, 0x4, 0x71, 0xaa, 0x9d, 0xdc, 0x98, 0xd5, 0x59, 0xdc, 0x98, 0x2a, 0x76, 0x30, 0xb6, 0x0, 0x9a, 0x77, 0x48, 0xe9, 0xe5, 0xf6, 0xfe, 0x93, 0x97, 0xfe, 0x4a, 0xfb, 0xa1, 0xeb, 0xe5, 0x30, 0xb8, 0xc4, 0x6f, 0x4f, 0x18, 0xcc, 0xa2, 0x71, 0x85, 0x6e, 0xfb, 0xfe, 0x57, 0x91, 0xfb, 0x92, 0x97, 0x11, 0x4d, 0x95, 0x2f, 0xe, 0x37, 0x94, 0x9e, 0x3d, 0xd5, 0xa3, 0x8f, 0xd3, 0x80, 0x5e, 0xff, 0x33, 0xdb, 0xec, 0x3b, 0xae, 0xb2, 0x2a, 0x8e, 0xe9, 0x3b, 0x42, 0xf8, 0x5c, 0x84, 0x5c, 0xf3, 0xc2, 0xc0, 0xc, 0x70, 0x6e, 0x11, 0xec, 0x79, 0x75, 0xf6, 0x36, 0x6c, 0x6a, 0x38, 0xc2, 0x41, 0x7e, 0xdf, 0xde, 0xfa, 0xf0, 0x3a, 0xed, 0x1, 0xa9, 0x87, 0xe4, 0x64, 0x83, 0xd, 0x78, 0x91, 0xb0, 0xab, 0x7f, 0x67, 0xf0, 0x80, 0x96, 0xe8, 0x1f, 0x93, 0x7d, 0xf9, 0xab, 0x60, 0x5c, 0x3a, 0xbf, 0xd1, 0xf2, 0x67, 0x3f, 0xa3, 0x2, 0x88, 0x28, 0x6, 0x71, 0x8c, 0xb, 0x87, 0x50, 0xc5, 0x9d, 0xb, 0x5f, 0x27, 0xbd, 0x16, 0x57, 0x9e, 0x5e, 0x5a, 0xa1, 0xb5, 0xa9, 0x82, 0x57, 0x62, 0x7f, 0x97, 0xae, 0x38, 0xbb, 0xd7, 0x9a, 0xc, 0x21, 0xe4, 0x8e, 0xf7, 0xba, 0xe4, 0x36, 0xc, 0x0, 0x3e, 0x8f, 0x86, 0xb8, 0x9b, 0x4, 0x2b, 0x65, 0xf4, 0x36, 0xce, 0xdf, 0x39, 0xca, 0x3, 0xd, 0xfc, 0xe9, 0xff, 0x77, 0x2c, 0xd9, 0x92, 0x74, 0xbd, 0xd0, 0xe6, 0x25, 0x2d, 0x8e, 0xae, 0x87, 0x73, 0x30, 0xa2, 0x1b, 0xbf, 0x6f, 0x26, 0x6f, 0x27, 0xd1, 0x19, 0x70, 0xe, 0xa5, 0x97, 0xa3, 0x9a, 0xcc, 0x8c, 0x21, 0x2b, 0x43, 0xda, 0x9a, 0x77, 0x5a, 0x6e, 0x16, 0x5c, 0x60, 0xf6, 0xef, 0xb7, 0x57, 0x1, 0xb7, 0xae, 0xca, 0x10, 0x1f, 0x70, 0xae, 0x54, 0x1a, 0x44, 0xeb, 0xa7, 0x50, 0xd, 0xf1, 0x4e, 0xfc, 0x38, 0xf2, 0xe8, 0xe1, 0x22, 0x38, 0xcb, 0x74, 0x79, 0xfd, 0x41, 0x48, 0x32, 0x2f, 0x10, 0x55, 0x68, 0xb, 0xbc, 0xa8, 0xe5, 0x35, 0xcb, 0x5e, 0xca, 0x77, 0xa5, 0x56, 0x12, 0xe5, 0x63, 0xf6, 0xce, 0x2a, 0x57, 0xb1, 0xfb, 0x9b, 0x66, 0x3a, 0xd0, 0xb5, 0x5e, 0xf2, 0x7b, 0x2e, 0xe3, 0x2e, 0x6f, 0x77, 0x9c, 0x6f, 0x9e, 0x74, 0x32, 0x32, 0x56, 0xd3, 0xd0, 0xa2, 0xe2, 0x47, 0x94, 0x3d, 0xdd, 0x75, 0x83, 0x6f, 0x4b, 0x7, 0xb1, 0x48, 0xa, 0x0, 0xcf, 0x4f, 0x62, 0x9, 0x2e, 0x5f, 0xf6, 0xd, 0xbe, 0x75, 0x41, 0x8b, 0x6b, 0xdb, 0xdb, 0xa5, 0x9d, 0xa3, 0x97, 0xf2, 0x3b, 0x54, 0x70, 0xbb, 0x33, 0x74, 0x87, 0xc8, 0x63, 0xad, 0xa5, 0xcd, 0x84, 0x83, 0xe6, 0xc5, 0x4d, 0x20, 0x18, 0x83, 0xa3, 0x36, 0x7d, 0xa2, 0xb2, 0xf4, 0x9c, 0x66, 0xb7, 0xfc, 0x67, 0x5a, 0xc4, 0x7d, 0xdf, 0x7d, 0x26, 0xcb, 0x3b, 0x40, 0xdd, 0x86, 0x4c, 0xea, 0x1a, 0x17, 0x8b, 0xb1, 0x27, 0x7b, 0x28, 0xf1, 0x98, 0x93, 0x7c, 0x12, 0xbd, 0xd8, 0xc1, 0x45, 0x73, 0xc4, 0x29, 0xfb, 0x13, 0x9b, 0xce, 0x19, 0xec, 0x9b, 0x44, 0x65, 0x52, 0x80, 0x8d, 0x25, 0xf8, 0x61, 0xd, 0xbf, 0x94, 0x9d, 0x33, 0xa0, 0x65, 0x50, 0x38, 0x3d, 0xf5, 0xf3, 0xcb, 0xf7, 0x99, 0xb0, 0xfa, 0x41, 0xdc, 0x59, 0x35, 0xda, 0xb1, 0x18, 0xa7, 0x17, 0x83, 0x81, 0xed, 0x3e, 0xf9, 0xbd, 0xbd, 0x63, 0x24, 0x72, 0xcb, 0xc4, 0x8f, 0x21, 0xde, 0xb7, 0xb5, 0xb2, 0x6c, 0x6d, 0x6a, 0x4c, 0x6d, 0x8b, 0xbc, 0xa6, 0x9, 0xee, 0x39, 0xc5, 0x1, 0x78, 0x7f, 0x6e, 0xf2, 0xa9, 0xb4, 0x5f, 0xff, 0x5c, 0x6c, 0x57, 0x35, 0x5d, 0xdb, 0x17, 0xb7, 0xa2, 0x71, 0xc7, 0xb5, 0x6f, 0x1b, 0x7b, 0x4c, 0xca, 0xe8, 0xdf, 0x84, 0xc0, 0x15, 0x14, 0xcf, 0x9f, 0x81, 0x38, 0x15, 0xc, 0x77, 0xac, 0x95, 0xea, 0x22, 0xb5, 0xc7, 0xda, 0x74, 0xdf, 0x60, 0xef, 0xb0, 0x60, 0x5f, 0x31, 0xd, 0x42, 0xee, 0x7, 0x14, 0x38, 0xc5, 0x14, 0xa4, 0x18, 0xb6, 0x22, 0x47, 0xdc, 0x2c, 0x55, 0xa2, 0x3d, 0xe, 0x73, 0x1e, 0xf9, 0xe5, 0x14, 0xd1, 0xdd, 0xa7, 0x3f, 0x57, 0xb2, 0xb6, 0xfc, 0x4b, 0x4f, 0xce, 0x62, 0xf1, 0xf0, 0xd0, 0xb5, 0x45, 0xab, 0x8f, 0xc0, 0x8a, 0xd4, 0x44, 0x9b, 0x96, 0x62, 0x19, 0xe1, 0xd5, 0x33, 0xf2, 0x6a, 0x4c, 0x4f, 0x62, 0x8c, 0x29, 0x48, 0x53, 0xc, 0x5, 0x18, 0xb9, 0x6f, 0xa8, 0xb9, 0x79, 0x25, 0x62, 0x9d, 0xad, 0x65, 0xfa, 0x65, 0x51, 0xbf, 0xe9, 0x10, 0x2c, 0xf1, 0xb9, 0xb7, 0xc4, 0x3c, 0x41, 0xf8, 0xbf, 0x4d, 0xe9, 0x93, 0xfd, 0x53, 0xc4, 0xe5, 0x82, 0x54, 0x8a, 0xcc, 0x64, 0xf6, 0x7b, 0x2e, 0x9f, 0xfa, 0x34, 0xb8, 0xb9, 0xe2, 0xf6, 0x4c, 0x87, 0x43, 0x6c, 0xa6, 0xd1, 0xd0, 0xf2, 0x2a, 0x2c, 0xa2, 0x36, 0xfb, 0xa1, 0xd, 0x91, 0x92, 0x40, 0xb, 0x11, 0xd7, 0x73, 0x7, 0xb5, 0x14, 0x87, 0xd9, 0x86, 0xdd, 0xf4, 0x18, 0x7, 0x68, 0x33, 0xcc, 0xa1, 0x63, 0x9a, 0x2c, 0x9b, 0x80, 0xc3, 0x9, 0xa3, 0xa4, 0xec, 0x9e, 0xd9, 0x10, 0x8a, 0x69, 0xec, 0x13, 0x6b, 0x73, 0x98, 0x24, 0x41, 0x67, 0x42, 0x39, 0xa6, 0xa3, 0x80, 0x85, 0xa, 0x7e, 0x18, 0x58, 0x4e, 0x95, 0x56, 0xb7, 0xa6, 0x29, 0x55, 0x78, 0xe4, 0xad, 0xb0, 0x10, 0xd5, 0xec, 0x2a, 0x3c, 0x5b, 0xfd, 0xd3, 0x6, 0x2a, 0x9b, 0xc5, 0xa2, 0xa8, 0xac, 0x6e, 0xaa, 0x45, 0xf6, 0x3b, 0xe5, 0x0, 0x2a, 0x5b, 0x53, 0xa0, 0x37, 0xcd, 0x2e, 0x99, 0x6d, 0x3e, 0xb, 0x25, 0x6a, 0xff, 0x17, 0x78, 0x35, 0x28, 0xab, 0x93, 0xeb, 0x48, 0xb2, 0x80, 0x6e, 0xd0, 0xd4, 0xca, 0x4a, 0x3, 0x70, 0x22, 0xc5, 0x85, 0xee, 0x77, 0x89, 0xf8, 0xf2, 0x53, 0x80, 0x3d, 0x89, 0x7e, 0xa6, 0xf0, 0xc4, 0xf, 0x7, 0xf0, 0x45, 0x74, 0xaa, 0xbc, 0xec, 0x46, 0x9c, 0xd9, 0x8b, 0x7c, 0xf1, 0xb3, 0x52, 0x85, 0x7a, 0xe3, 0x2d, 0xcd, 0xb2, 0xed, 0xf8, 0xcc, 0x2e, 0x35, 0x94, 0x67, 0x9b, 0x9, 0x69, 0x9, 0x5c, 0xc4, 0x50, 0x7d, 0xc3, 0xe9, 0x5, 0x9c, 0xde, 0x8a, 0xa2, 0xbf, 0x16, 0xff, 0x73, 0x6, 0x96, 0xfe, 0x75, 0xcb, 0x63, 0x55, 0x56, 0x93, 0xc9, 0xe0, 0x3, 0xb4, 0x7e, 0x29, 0x2, 0xa0, 0x51, 0x32, 0x74, 0x5d, 0x5d, 0x48, 0xc0, 0xa3, 0x6f, 0x10, 0x17, 0x78, 0xc6, 0x6e, 0xb9, 0xca, 0x32, 0x87, 0x39, 0x7e, 0x27, 0x8b, 0xa4, 0xa3, 0xd1, 0xe8, 0xe, 0x5d, 0x7e, 0x1f, 0xa0, 0x41, 0x34, 0x4e, 0x2f, 0xf0, 0xd4, 0x79, 0x54, 0x76, 0xb5, 0xd2, 0x9, 0x8e, 0x39, 0xdd, 0xc7, 0x73, 0x8f, 0x5b, 0x9a, 0x87, 0x1e, 0x4d, 0x96, 0x34, 0x83, 0xeb, 0x72, 0x86, 0x68, 0x1a, 0x3d, 0xfa, 0xc3, 0x8d, 0x58, 0x66, 0xbb, 0x95, 0xf2, 0xd6, 0xbc, 0x43, 0xf, 0xf1, 0x1e, 0x39, 0x52, 0x79, 0xdb, 0x71, 0x16, 0x57, 0x2, 0x3e, 0x2f, 0x4e, 0x54, 0x2d, 0x9f, 0x39, 0x42, 0x19, 0x10, 0xca, 0x2, 0xed, 0x7b, 0xc7, 0x67, 0xb4, 0x7a, 0x33, 0xd0, 0x96, 0x96, 0x98, 0x2f, 0xc6, 0xa0, 0x84, 0x8f, 0x12, 0xf0, 0xa8, 0x4b, 0xfb, 0xa1, 0xa0, 0xb4, 0x2a, 0xb, 0x55, 0xc3, 0xe3, 0xd9, 0x8b, 0x5, 0x97, 0x8b, 0x53, 0xba, 0xa8, 0x13, 0x13, 0xd, 0x18, 0xad, 0xd7, 0x6d, 0xb7, 0xee, 0x84, 0x83, 0xa2, 0xd6, 0xb3, 0x41, 0xb, 0x8, 0xc7, 0x62, 0x3c, 0x6b, 0x46, 0x3e, 0x4, 0xd4, 0xd5, 0x3b, 0xab, 0x51, 0xf0, 0xa5, 0xa3, 0xf2, 0x6b, 0x9e, 0xb, 0xec, 0xf9, 0x8c, 0x10, 0x67, 0xa2, 0x16, 0x77, 0xc0, 0x78, 0x22, 0xf5, 0xf7, 0x30, 0xfc, 0xf5, 0x23, 0x9d, 0x69, 0xd6, 0xd3, 0x4b, 0x1d, 0x83, 0xea, 0xe3, 0x40, 0x9c, 0x4a, 0x9c, 0xb2, 0x6b, 0x75, 0x4f, 0x24, 0x82, 0x71, 0xdf, 0xc7, 0x75, 0xcf, 0x45, 0x53, 0x72, 0xc6, 0x1c, 0x60, 0x99, 0xf2, 0xd8, 0x17, 0x22, 0x74, 0xea, 0x4f, 0xa4, 0xd, 0x87, 0x75, 0x9c, 0x2e, 0xf2, 0xf5, 0xf4, 0xb9, 0x8, 0x6c, 0xa4, 0xa7, 0xdc, 0x6a, 0x5a, 0x20, 0x1, 0xa3, 0xb8, 0x50, 0x76, 0xa6, 0x43, 0x6a, 0xed, 0xc3, 0x8, 0x8e, 0x26, 0xaf, 0x74, 0xc9, 0x8f, 0x18, 0x50, 0x57, 0xe0, 0x78, 0x1b, 0xbf, 0x8d, 0x52, 0xc0, 0xe4, 0xeb, 0x3c, 0x4a, 0xd, 0x3e, 0x22, 0xcc, 0xa0, 0xa8, 0xe2, 0xd1, 0x5f, 0xe7, 0x5d, 0x87, 0xaa, 0xea, 0x72, 0x3a, 0x99, 0x1d, 0x81, 0x3a, 0x67, 0xd9, 0x3e, 0x26, 0xb3, 0x12, 0x89, 0xb4, 0x6e, 0x21, 0x41, 0x6a, 0x0, 0xee, 0x86, 0xb7, 0x85, 0xe0, 0xf4, 0x70, 0xc2, 0xa3, 0xd0, 0xbe, 0xb1, 0x83, 0x5, 0x91, 0x5a, 0xe2, 0x1d, 0xe, 0x7d, 0x3c, 0x27, 0xc2, 0xd3, 0x7a, 0x5, 0xc8, 0xfb, 0x80, 0x89, 0x21, 0xd4, 0xe7, 0x59, 0xa4, 0xd3, 0x13, 0x96, 0x24, 0xbf, 0x2a, 0xc8, 0xd5, 0xca, 0x8a, 0xec, 0xb, 0xa0, 0x7d, 0x5a, 0x3, 0xe1, 0x3b, 0xa4, 0x5a, 0xc7, 0x1a, 0xfc, 0xea, 0xe9, 0xf2, 0xb5, 0x5d, 0xf, 0xe7, 0xa, 0xf8, 0x33, 0x42, 0x45, 0xe7, 0x16, 0xfb, 0xd6, 0x41, 0x18, 0x0, 0xd6, 0x4, 0x3f, 0x30, 0xd6, 0x69, 0x9a, 0x81, 0xe1, 0xa9, 0x2, 0xf8, 0xfb, 0x1d, 0xd2, 0x3f, 0xc0, 0xd9, 0x44, 0x3f, 0x5, 0xab, 0xff, 0xa7, 0xfd, 0x25, 0xb6, 0xf0, 0xd8, 0x37, 0x1, 0x57, 0x8c, 0x54, 0xe0, 0x51, 0x5, 0x5a, 0x5d, 0x27, 0x85, 0x94, 0x1b, 0xee, 0x2c, 0xed, 0x39, 0xe8, 0xfc, 0xab, 0x99, 0x23, 0xb7, 0xc3, 0x5, 0xfd, 0x23, 0xcd, 0xac, 0xd5, 0xc6, 0xf7, 0x1e, 0x64, 0x55, 0x17, 0xd0, 0xbf, 0x34, 0xda, 0x56, 0xf7, 0xcc, 0x6, 0x17, 0x5e, 0xd9, 0x20, 0xcd, 0x1a, 0x6e, 0xb7, 0x13, 0x20, 0xa, 0x21, 0x25, 0x38, 0x69, 0xf, 0x48, 0x1c, 0xbc, 0x44, 0x33, 0xb3, 0x7b, 0xf7, 0x33, 0x7c, 0x61, 0xed, 0xf6, 0xd2, 0x7f, 0xfa, 0xe8, 0x55, 0x69, 0x41, 0xaa, 0xa5, 0xf4, 0x3a, 0x5e, 0xb6, 0x11, 0xa, 0xe7, 0x3e, 0x28, 0xe1, 0x90, 0xae, 0xe, 0xc6, 0xe6, 0xa4, 0x36, 0x31, 0x2f, 0xa7, 0x2d, 0xa, 0xff, 0xdd, 0x9e, 0xba, 0xe4, 0x33, 0xf6, 0x5, 0x7, 0xf6, 0x24, 0xbb, 0x7a, 0x5f, 0xc4, 0x8c, 0x3a, 0xe8, 0x53, 0xa8, 0xc1, 0x46, 0xa3, 0x32, 0x78, 0x56, 0x66, 0x36, 0x7a, 0x8b, 0x7f, 0x9f, 0xb5, 0x86, 0x3a, 0xe7, 0x5b, 0x9, 0xfc, 0x31, 0x94, 0xd8, 0x90, 0xa3, 0xf7, 0x24, 0xd6, 0x16, 0x1b, 0xc, 0x8d, 0x24, 0xe0, 0xf0, 0xf2, 0x6b, 0xda, 0xe7, 0x11, 0xae, 0x13, 0xba, 0x8b, 0xcc, 0xa5, 0x5f, 0x9a, 0xc3, 0xbb, 0xd9, 0xee, 0x43, 0xcb, 0x3a, 0x45, 0x1a, 0x13, 0xf9, 0xd5, 0x3f, 0xbc, 0x4d, 0x50, 0x3f, 0x91, 0xec, 0x77, 0x30, 0x22, 0x15, 0x8f, 0xc6, 0x66, 0x62, 0xa7, 0xb7, 0x5a, 0x61, 0x7f, 0xd1, 0xb9, 0xd0, 0x30, 0x72, 0x7f, 0x2d, 0x25, 0x5, 0x23, 0x1c, 0x59, 0xd9, 0x22, 0x34, 0x64, 0xad, 0x71, 0x31, 0x52, 0xfd, 0xd3, 0x53, 0xad, 0x50, 0xd, 0x60, 0x5c, 0x38, 0x31, 0x7f, 0xb5, 0xc6, 0xa9, 0xe0, 0x52, 0xb9, 0x52, 0x61, 0xba, 0x64, 0x5, 0x38, 0x9a, 0xee, 0xa7, 0x8, 0x55, 0xc0, 0xcb, 0x28, 0x70, 0xe9, 0x70, 0x89, 0xd7, 0xf6, 0xa6, 0x23, 0x1e, 0xaa, 0xdc, 0x11, 0x6a, 0xad, 0xfe, 0x35, 0x81, 0xd9, 0x1b, 0x30, 0xb7, 0xee, 0x22, 0xe1, 0xd8, 0xd9, 0x1d, 0x81, 0x2e, 0x64, 0x1b, 0x77, 0x86, 0xc0, 0x4c, 0xb, 0xb4, 0xab, 0x5a, 0x58, 0xf9, 0x3d, 0xbc, 0x48, 0x49, 0x3a, 0x51, 0x75, 0x5b, 0x5c, 0xcd, 0xdd, 0xa3, 0x73, 0xcd, 0xe4, 0xd7, 0x1e, 0x20, 0x7, 0xf5, 0xbc, 0xc9, 0x3, 0x21, 0x59, 0x83, 0xba, 0x84, 0x79, 0x9, 0x73, 0x9c, 0x8d, 0x80, 0x95, 0x5c, 0x35, 0x2, 0x8, 0xc6, 0x10, 0x49, 0xf4, 0x2, 0x72, 0x49, 0x6d, 0x55, 0xe, 0x1, 0x39, 0x7e, 0x8d, 0x81, 0x7b, 0x91, 0xfe, 0xc0, 0xd1, 0x5d, 0x61, 0xa2, 0x8d, 0xba, 0x51, 0x61, 0x8f, 0xf3, 0xe8, 0x61, 0x9a, 0xd9, 0xde, 0x3c, 0xc3, 0xa9, 0xe3, 0x5f, 0xc1, 0x77, 0x7b, 0xb6, 0x18, 0x9a, 0x1a, 0x50, 0xef, 0x42, 0xcf, 0xf1, 0xee, 0xb7, 0x16, 0xc8, 0x27, 0xf7, 0x93, 0xd8, 0xa, 0xe5, 0x50, 0x65, 0x67, 0x1a, 0x29, 0xaf, 0x4b, 0xc1, 0x36, 0xc, 0x36, 0xf7, 0x3d, 0x32, 0x81, 0xc6, 0x90, 0xf7, 0xcf, 0x2e, 0xf, 0x94, 0x24, 0x5f, 0x9c, 0xe8, 0xa9, 0x6c, 0xe5, 0x3a, 0x99, 0xcb, 0x23, 0x2, 0x94, 0xd, 0x9, 0xbe, 0x86, 0xcf, 0x7, 0xcc, 0x7a, 0x37, 0x7, 0x33, 0x82, 0xd2, 0xf5, 0x60, 0xd7, 0x33, 0x73, 0x9f, 0xa9, 0xd9, 0x9e, 0xd4, 0xd1, 0x6f, 0xa5, 0xa8, 0x10, 0x66, 0xf5, 0xaf, 0x1, 0xe1, 0x7e, 0x75, 0x7c, 0xff, 0xbf, 0x9e, 0xf6, 0xca, 0x9e, 0xca, 0xcc, 0x81, 0x28, 0xb0, 0x36, 0x1b, 0x3a, 0xbd, 0xce, 0x84, 0xc, 0x50, 0x4c, 0x31, 0x49, 0x7b, 0xa5, 0xe1, 0x59, 0x33, 0xf1, 0x8a, 0x1b, 0xba, 0x12, 0x14, 0xcf, 0x2f, 0x1, 0x97, 0x52, 0xcb, 0x5a, 0xe6, 0x1f, 0x90, 0x0, 0xc8, 0x5c, 0xaa, 0xba, 0x22, 0x52, 0x75, 0x49, 0x36, 0xba, 0x35, 0xa, 0x60, 0xc0, 0x2b, 0x33, 0xeb, 0x41, 0x8d, 0xa3, 0x57, 0x2a, 0xf1, 0x43, 0xcb, 0xb2, 0xe9, 0x9d, 0x6b, 0xfd, 0x88, 0x56, 0xa8, 0x8d, 0xbf, 0xd5, 0x32, 0x9b, 0x11, 0x81, 0x3e, 0x41, 0xa, 0x56, 0xb0, 0xd5, 0x70, 0xee, 0x39, 0xe2, 0x62, 0xf9, 0x2, 0xa8, 0x2f, 0x89, 0x1, 0x36, 0xe1, 0xaf, 0xee, 0xda, 0xc5, 0x91, 0x90, 0x47, 0x64, 0xcd, 0x5e, 0xf0, 0x67, 0x6b, 0x7e, 0xf2, 0xa4, 0x31, 0x7a, 0x48, 0x4b, 0x99, 0x45, 0x6, 0xe9, 0xa7, 0xff, 0xd9, 0x35, 0x50, 0x76, 0x29, 0x75, 0xba, 0xc0, 0x17, 0x3c, 0x90, 0x99, 0x2a, 0x9e, 0x93, 0x8e, 0x6d, 0xea, 0xc5, 0x63, 0xd7, 0xf3, 0x60, 0xab, 0x7d, 0xa0, 0x3, 0x24, 0x8a, 0x1c, 0xbf, 0x3f, 0xd4, 0x30, 0x67, 0x2e, 0x21, 0xf8, 0x7f, 0xaf, 0xa, 0x1a, 0x91, 0xb3, 0x5, 0xba, 0x1f, 0x6a, 0xb4, 0x6b, 0xf3, 0x7b, 0xcb, 0xf7, 0x2, 0x10, 0xb4, 0xa, 0xa2, 0x2b, 0xea, 0xef, 0x8c, 0x87, 0x83, 0x15, 0xc2, 0x4e, 0x50, 0x3b, 0x5a, 0xfa, 0xd8, 0xb9, 0xd2, 0x38, 0x4f, 0x82, 0x2a, 0xe8, 0xc3, 0xa7, 0x94, 0x1f, 0x58, 0xf3, 0x6c, 0x48, 0x4b, 0x82, 0x98, 0xc3, 0x9c, 0x40, 0x9c, 0x32, 0xcd, 0xf2, 0x55, 0x1c, 0xf8, 0xa9, 0xd, 0xf0, 0x8d, 0xf6, 0xc4, 0x31, 0x37, 0x99, 0xb0, 0xb7, 0x81, 0xa4, 0xaa, 0x5, 0xd7, 0x63, 0x1b, 0x73, 0x96, 0x9c, 0x54, 0x4, 0xd0, 0xc, 0xb0, 0x53, 0xb7, 0x86, 0xb5, 0xea, 0x67, 0xdb, 0xfa, 0x9c}, - output224: []byte{0x4c, 0x5, 0x2d, 0x37, 0x5b, 0x7, 0xb3, 0xbe, 0x2b, 0xcb, 0xf5, 0x4b, 0x29, 0xc0, 0xbd, 0x26, 0xc3, 0xbf, 0xd5, 0x16, 0xac, 0x26, 0x4f, 0x4d, 0xe5, 0xe6, 0x7b, 0xb9}, - output256: []byte{0xe3, 0x79, 0x77, 0x5a, 0xe8, 0x0, 0x3b, 0x80, 0xa8, 0x25, 0xf7, 0x94, 0xc8, 0x3e, 0xb6, 0x52, 0x96, 0x9f, 0xb0, 0x64, 0xc5, 0x41, 0xa7, 0x99, 0xe1, 0x74, 0x54, 0x95, 0x80, 0xcb, 0x76, 0x59}, - output384: []byte{0x3d, 0x43, 0x7a, 0x92, 0x1b, 0x29, 0xae, 0xce, 0xe0, 0x6b, 0x46, 0xa2, 0x6b, 0x8d, 0xde, 0x14, 0xdd, 0x95, 0xcb, 0x62, 0x43, 0x3d, 0x75, 0x52, 0xc9, 0xf9, 0x4c, 0xaf, 0x82, 0x99, 0xfb, 0xb6, 0xa0, 0xbd, 0xc8, 0x22, 0x94, 0xd3, 0x1, 0x6c, 0x25, 0x4b, 0x9a, 0x41, 0xca, 0xd9, 0xcc, 0x15}, - output512: []byte{0x56, 0x14, 0xa6, 0xd6, 0xf5, 0x52, 0xd4, 0xc9, 0xda, 0xd4, 0x86, 0x41, 0xec, 0xe0, 0xce, 0xf2, 0xa3, 0xf0, 0x50, 0x11, 0x45, 0x26, 0xf8, 0x12, 0x36, 0xae, 0x53, 0xad, 0x7e, 0x8f, 0x84, 0x99, 0x94, 0x6, 0x73, 0xa8, 0xac, 0x51, 0x31, 0x93, 0x69, 0xb8, 0x21, 0x4a, 0x35, 0x8b, 0x4e, 0x4, 0x76, 0xc9, 0x49, 0x69, 0x11, 0x22, 0xb4, 0x67, 0x7a, 0xb1, 0x3c, 0x3b, 0x98, 0xb2, 0x47, 0x9b}}, - testcase{ - msg: []byte{0xe6, 0x91, 0xe8, 0xfe, 0xb7, 0x44, 0x95, 0x7b, 0x27, 0x5e, 0x5f, 0xd8, 0x79, 0xa3, 0xab, 0xe5, 0x4d, 0x6d, 0x6c, 0x8c, 0x7f, 0x58, 0x9f, 0xb, 0x1a, 0x17, 0xc0, 0x8c, 0x29, 0x9c, 0x55, 0x9e, 0x5f, 0x7, 0xc9, 0xea, 0xa1, 0x2b, 0x3d, 0xbf, 0xe, 0x6, 0x34, 0x2e, 0x63, 0x44, 0x22, 0x9e, 0x99, 0x31, 0x21, 0x7e, 0x77, 0xf3, 0x4b, 0x53, 0x1, 0x45, 0x77, 0xab, 0x76, 0xfb, 0xee, 0x38, 0xec, 0x3f, 0x49, 0x1e, 0x7e, 0xa, 0x12, 0x95, 0x0, 0xbe, 0xec, 0xae, 0x77, 0x74, 0x5f, 0x98, 0x37, 0xc, 0xf6, 0xd4, 0xd0, 0xe3, 0x9c, 0x42, 0x73, 0xae, 0xf3, 0x66, 0xb9, 0xbb, 0x28, 0x64, 0xc, 0xcd, 0x6b, 0x11, 0xb4, 0xa7, 0xea, 0x7f, 0x4b, 0xe9, 0xc5, 0xc9, 0xee, 0x52, 0x9d, 0xa, 0x1b, 0xfd, 0x14, 0x50, 0xb5, 0xfb, 0x91, 0x90, 0xc1, 0xd8, 0xbb, 0xcf, 0x1b, 0x80, 0x33, 0x6c, 0x21, 0x29, 0x92, 0xd4, 0x28, 0xc2, 0x0, 0xb5, 0xcd, 0x34, 0xca, 0x3c, 0xdd, 0x75, 0xe1, 0x75, 0x99, 0x7a, 0xc6, 0x18, 0x1e, 0x3d, 0x49, 0x72, 0x88, 0x6f, 0xc9, 0xd4, 0x10, 0x38, 0xb0, 0x77, 0xcd, 0x1e, 0x78, 0x6a, 0xb3, 0xac, 0x82, 0xc3, 0xc8, 0xad, 0x6d, 0xd5, 0xd0, 0x1e, 0xff, 0xa3, 0x96, 0x29, 0x54, 0xa, 0x3d, 0x60, 0x2, 0xc9, 0xab, 0x63, 0xa1, 0x83, 0xa8, 0xa8, 0x5b, 0x3b, 0xdf, 0xcf, 0x4d, 0x81, 0x7f, 0x65, 0x5, 0xc7, 0x74, 0x7a, 0xbe, 0xb7, 0x63, 0xdc, 0x78, 0x24, 0x6b, 0x6f, 0x56, 0xa3, 0xe1, 0x2e, 0x10, 0x1, 0x52, 0xf, 0x5d, 0x35, 0xc8, 0xe3, 0xf2, 0x51, 0x70, 0x2a, 0x66, 0xde, 0x66, 0x3c, 0x9c, 0xb9, 0xc5, 0x3e, 0x5, 0x84, 0x20, 0x7b, 0xef, 0x86, 0xec, 0xd0, 0x46, 0x97, 0x90, 0x44, 0xde, 0xe5, 0x5e, 0x26, 0x39, 0xf4, 0xa, 0x4d, 0x5, 0x20, 0x96, 0x8b, 0xe4, 0x43, 0xc4, 0x6d, 0x71, 0xf9, 0xb6, 0xc7, 0x5a, 0x82, 0xd8, 0xf7, 0xcf, 0x5, 0xa0, 0xd4, 0xa1, 0xa8, 0x97, 0xe6, 0xb5, 0x7c, 0x93, 0x92, 0x2a, 0x5f, 0x82, 0xe4, 0xe7, 0x57, 0x86, 0x12, 0xb3, 0xc6, 0x8b, 0x79, 0x94, 0xd8, 0xef, 0x2f, 0x85, 0xb3, 0x5b, 0xd0, 0xdd, 0xdd, 0x14, 0x9c, 0xcd, 0xd8, 0xc9, 0x8, 0x4f, 0x6f, 0x8f, 0xf6, 0x19, 0x0, 0xfe, 0x8c, 0xbe, 0xae, 0x65, 0x25, 0xdf, 0xb8, 0x20, 0x90, 0x26, 0xf6, 0x38, 0xa, 0xe6, 0x77, 0x26, 0x3b, 0x1d, 0x7c, 0xed, 0x5f, 0x8b, 0x2b, 0xb, 0x31, 0x34, 0x66, 0x96, 0x69, 0x95, 0xa7, 0xaf, 0x76, 0x8a, 0x33, 0x83, 0x21, 0x5a, 0xd8, 0x32, 0x77, 0x7, 0xc8, 0xcb, 0x26, 0x56, 0xdc, 0x1e, 0x91, 0x90, 0x28, 0x6, 0xb6, 0x13, 0xba, 0xcb, 0x93, 0xd0, 0x4b, 0x1c, 0xaa, 0xee, 0x75, 0x9b, 0x97, 0xd7, 0xd1, 0x3c, 0xd0, 0x77, 0xa, 0x20, 0xa3, 0xf2, 0x29, 0x6, 0x8b, 0x28, 0xff, 0x36, 0xc7, 0x4, 0x82, 0x8, 0xa4, 0x69, 0x3d, 0x48, 0x96, 0xa9, 0xf1, 0x21, 0x62, 0xf3, 0xdc, 0xf1, 0x8e, 0x97, 0xdd, 0xb8, 0x49, 0x46, 0xfa, 0xbd, 0x8f, 0xd5, 0x3, 0x9f, 0x6e, 0xf6, 0xdd, 0x9, 0x54, 0xd, 0xf8, 0xd5, 0xa6, 0xb7, 0x92, 0x6c, 0xac, 0xba, 0x50, 0x9f, 0x98, 0x5f, 0xdf, 0x23, 0xa1, 0xf4, 0xee, 0xe5, 0x14, 0x5d, 0x13, 0xd7, 0xd0, 0xe3, 0xe4, 0xbf, 0xdd, 0x18, 0x9, 0xa3, 0x91, 0x8c, 0xac, 0x77, 0x34, 0x60, 0x9f, 0x6c, 0x3f, 0x38, 0xbe, 0xbe, 0xea, 0x3f, 0xfc, 0x3e, 0x4b, 0x4a, 0x8a, 0xca, 0xa1, 0x38, 0x74, 0x40, 0xc9, 0x2d, 0x1c, 0xed, 0x43, 0x51, 0x16, 0x54, 0xe9, 0x5b, 0x33, 0xb5, 0x6f, 0x98, 0x8d, 0xd4, 0x3e, 0xde, 0x14, 0x3a, 0xff, 0xfe, 0x3b, 0x6e, 0x4, 0xf4, 0xb3, 0x8b, 0x59, 0x32, 0x51, 0xe0, 0xfd, 0xda, 0xd3, 0xd2, 0x6b, 0xfc, 0x1b, 0x40, 0xc5, 0xfe, 0x5, 0x73, 0xf0, 0x10, 0x67, 0x1a, 0xc3, 0xe3, 0xe6, 0x21, 0xe, 0x87, 0x99, 0xf2, 0x56, 0xb1, 0x53, 0xe1, 0xd9, 0x50, 0x93, 0xbd, 0x45, 0x2d, 0x70, 0x96, 0x8c, 0xe6, 0x51, 0xc7, 0x71, 0x7b, 0xc9, 0x35, 0xbf, 0x2f, 0xb7, 0x7c, 0x21, 0x2, 0x9b, 0x65, 0x50, 0xf5, 0x35, 0xc3, 0xbd, 0xf8, 0x4, 0xe7, 0xc2, 0xb1, 0xa5, 0x72, 0x8a, 0xe2, 0x31, 0xc0, 0x5, 0xe3, 0x19, 0x13, 0xbe, 0x6a, 0xea, 0x15, 0xbd, 0x90, 0x49, 0x1f, 0x70, 0xcd, 0xd2, 0x22, 0xa5, 0x48, 0xc3, 0xf3, 0x8c, 0x7b, 0x2c, 0xb4, 0x54, 0xb3, 0xb5, 0x50, 0x69, 0x9f, 0x6e, 0xea, 0x35, 0x1a, 0x5b, 0xd6, 0x9b, 0x97, 0xc2, 0xc8, 0x23, 0xac, 0xb2, 0x1f, 0x48, 0xa5, 0x25, 0x33, 0x58, 0x7b, 0x3b, 0x2b, 0x51, 0xef, 0xf4, 0xf4, 0x53, 0xea, 0x66, 0xa1, 0xec, 0x55, 0x9f, 0x11, 0xc3, 0x87, 0xe7, 0xb5, 0xa1, 0x11, 0xc7, 0xd8, 0x85, 0xbf, 0xbb, 0x55, 0x79, 0x59, 0x95, 0x9a, 0xea, 0xfd, 0xac, 0x86, 0x93, 0xb2, 0x2d, 0xea, 0xc, 0xd3, 0x4, 0x54, 0xb2, 0xc4, 0xb1, 0xa0, 0x7a, 0xa6, 0x4e, 0x3d, 0xf3, 0xe4, 0xa3, 0x6f, 0xa4, 0x66, 0x6b, 0x70, 0xe0, 0x74, 0x4f, 0x24, 0x5d, 0xc0, 0x16, 0x1a, 0xe2, 0xcf, 0xc5, 0xcd, 0xf, 0x7a, 0x35, 0xe6, 0x76, 0x51, 0x54, 0x9e, 0x86, 0x40, 0x7c, 0xf8, 0xd2, 0xef, 0x25, 0x9b, 0xf6, 0x5e, 0xe7, 0x5f, 0x20, 0x32, 0xe3, 0xa0, 0xd3, 0xcc, 0x6e, 0xa8, 0xea, 0xf5, 0xfb, 0x16, 0x56, 0x36, 0x71, 0xae, 0x9f, 0x11, 0x85, 0xfd, 0xa5, 0x52, 0x63, 0x90, 0x83, 0x55, 0x8d, 0xde, 0x88, 0x3a, 0xdf, 0x86, 0xcb, 0x31, 0xbb, 0xb8, 0x76, 0x4b, 0xcc, 0x9, 0x6d, 0xf6, 0x2, 0x7, 0xe3, 0x7c, 0xf5, 0xaa, 0x87, 0xe0, 0xd3, 0x56, 0x5d, 0x55, 0x10, 0xff, 0xa, 0xc9, 0x35, 0x9a, 0xf6, 0x54, 0xc, 0x51, 0x3b, 0xd3, 0xac, 0x35, 0xf1, 0x82, 0x9c, 0x5b, 0x34, 0x2e, 0x66, 0xec, 0x78, 0xbe, 0x3, 0x56, 0x73, 0x5e, 0xe, 0xcd, 0x97, 0xd2, 0xf, 0x85, 0x40, 0x94, 0xd1, 0x24, 0xcd, 0x91, 0x8a, 0x3b, 0xfd, 0x4, 0x55, 0x45, 0xb1, 0xa7, 0xe1, 0x7f, 0xe3, 0xe1, 0xe, 0xed, 0x4d, 0x11, 0xf8, 0xaa, 0x1b, 0xe, 0x33, 0x28, 0x5c, 0x78, 0x37, 0xdb, 0x70, 0x33, 0xac, 0xd, 0x71, 0x27, 0x30, 0xc0, 0xbc, 0xe1, 0xc3, 0x85, 0x14, 0xfd, 0x2, 0x98, 0x5f, 0x99, 0xb8, 0x8a, 0x20, 0x5, 0x7c, 0x97, 0x81, 0xff, 0x4, 0x44, 0xc2, 0x90, 0xa7, 0xe0, 0x64, 0x5e, 0x17, 0xd0, 0xbe, 0xb2, 0xcd, 0x3a, 0x45, 0x81, 0x84, 0xf6, 0xb4, 0xb5, 0xe1, 0x0, 0xcb, 0xd, 0x69, 0x27, 0x9a, 0x9a, 0x18, 0x57, 0x36, 0xe7, 0xee, 0xc4, 0x2d, 0x87, 0x40, 0xe6, 0x3d, 0x5b, 0x26, 0x1c, 0xae, 0x6, 0x1b, 0x54, 0x18, 0x3e, 0x4c, 0x21, 0x99, 0x4c, 0xfe, 0x6c, 0xd5, 0xc5, 0x44, 0x1d, 0x6c, 0x3d, 0x23, 0x0, 0x50, 0x9a, 0x40, 0xcc, 0x2e, 0xfe, 0x67, 0xe6, 0x3d, 0xe, 0x19, 0x66, 0xc7, 0x81, 0xbd, 0xf5, 0x46, 0xe9, 0xe9, 0x17, 0xfd, 0x28, 0x3c, 0xff, 0x73, 0x5b, 0x0, 0x17, 0x55, 0xb, 0x5c, 0xfb, 0x8b, 0x5a, 0xb2, 0x2a, 0xda, 0xfc, 0xee, 0x1e, 0x3e, 0xc1, 0x9e, 0x6, 0x16, 0xde, 0xc2, 0xe5, 0xe7, 0xb4, 0x5c, 0x2e, 0x54, 0x7e, 0x48, 0x42, 0x5b, 0xe2, 0x71, 0x23, 0xaa, 0xf9, 0x1b, 0x44, 0x68, 0xb4, 0xb1, 0x38, 0x9a, 0x9, 0x5b, 0x3b, 0xcd, 0xc2, 0xcf, 0xa4, 0x3, 0xb9, 0x42, 0x31, 0x41, 0x1e, 0xd8, 0x35, 0x69, 0x41, 0x90, 0xe5, 0x45, 0x39, 0xf9, 0x12, 0x66, 0x88, 0xf6, 0x23, 0x2e, 0xa1, 0x30, 0x2, 0x25, 0x3e, 0x93, 0x7e, 0x50, 0x8c, 0x0, 0x16, 0x5a, 0x3e, 0xf5, 0x23, 0x62, 0x1f, 0x6, 0xfe, 0xa1, 0x44, 0xb, 0x81, 0xe8, 0x49, 0x9c, 0x20, 0xbd, 0x2d, 0x81, 0x74, 0x22, 0xb4, 0x8f, 0x8e, 0x83, 0x13, 0x1e, 0xa, 0xf7, 0x7, 0x12, 0x6c, 0xca, 0xd0, 0x3a, 0x23, 0x23, 0x7a, 0x4a, 0xd2, 0x3, 0x53, 0xeb, 0xca, 0x6a, 0xf4, 0x9f, 0x7e, 0x85, 0x99, 0xb3, 0x2b, 0x70, 0x8f, 0x9c, 0x3b, 0xaf, 0xea, 0xa, 0x7b, 0xe2, 0x4c, 0x22, 0x7f, 0xb0, 0x86, 0x67, 0x3, 0x67, 0x7e, 0xd8, 0x57, 0x74, 0xf1, 0x6, 0x96, 0x65, 0xcd, 0x8e, 0xf8, 0x8c, 0x96, 0xca, 0xb5, 0xec, 0x3f, 0x5c, 0xeb, 0x4c, 0xea, 0x91, 0x53, 0x61, 0xde, 0xc9, 0x6, 0xa6, 0x75, 0x39, 0xab, 0xe4, 0x12, 0x79, 0x54, 0xfd, 0x53, 0xb2, 0xd7, 0x34, 0xd5, 0x8f, 0x84, 0xe4, 0xc2, 0xe6, 0xe9, 0xc, 0xc1, 0x95, 0x8c, 0x20, 0xb7, 0x8, 0xe, 0x6e, 0x6, 0x70, 0x32, 0x18, 0x6f, 0x2b, 0x38, 0xb8, 0xe, 0xdd, 0x45, 0xfd, 0xf1, 0xc7, 0xf1, 0xe, 0x2c, 0xdc, 0xf, 0xc, 0xcb, 0x73, 0x4e, 0x7c, 0xb2, 0x86, 0xa9, 0x75, 0x94, 0xb6, 0xd9, 0x2, 0x28, 0x91, 0x13, 0x79, 0xff, 0x4c, 0x61, 0x74, 0xb9, 0xaa, 0x1c, 0x8b, 0x29, 0x1c, 0xe0, 0x61, 0xa9, 0x7c, 0x82, 0xad, 0xd4, 0x14, 0xf5, 0x51, 0xa1, 0xee, 0xb9, 0xfc, 0x89, 0xdb, 0xe6, 0x45, 0xcf, 0x82, 0xde, 0xc0, 0x48, 0xd6, 0xbd, 0xe9, 0x48, 0x35, 0xd6, 0xd4, 0x76, 0xf6, 0xe5, 0xe0, 0x8e, 0x47, 0x61, 0x6e, 0xd5, 0x76, 0x6c, 0xb3, 0x69, 0xa9, 0x4d, 0x51, 0xf2, 0xa5, 0xf0, 0x3e, 0x5f, 0xee, 0x94, 0x30, 0x58, 0xc0, 0x9d, 0xad, 0x21, 0xe0, 0x8b, 0x82, 0x2d, 0x7f, 0x51, 0xbe, 0x52, 0x96, 0xdf, 0xc3, 0x98, 0xb1, 0x41, 0x81, 0x7f, 0x56, 0x71, 0xdf, 0x7b, 0x3, 0x2b, 0x5c, 0x4b, 0xee, 0x77, 0x9b, 0x7b, 0x5e, 0xcf, 0xd2, 0x28, 0xfa, 0xd0, 0xa6, 0xf1, 0x2, 0xed, 0x8d, 0x7a, 0x62, 0xf, 0xb0, 0xc6, 0xe8, 0xe8, 0x4a, 0x2, 0x9, 0x48, 0xee, 0xcb, 0x10, 0xfa, 0x27, 0xee, 0xdf, 0x71, 0xff, 0x5e, 0x11, 0xd0, 0xe1, 0xa2, 0xda, 0x41, 0xbe, 0x40, 0x29, 0x47, 0x2c, 0xf6, 0xf2, 0x6d, 0xd3, 0xf6, 0xed, 0x6e, 0x4a, 0x5a, 0x7f, 0xd4, 0x41, 0x20, 0xd, 0xc6, 0x90, 0x30, 0x76, 0x73, 0xff, 0x9b, 0xbe, 0x81, 0xd7, 0x16, 0x49, 0x68, 0xe, 0x3f, 0x62, 0xd6, 0x24, 0x33, 0xce, 0x34, 0x96, 0x26, 0x95, 0x7, 0xaa, 0x4a, 0xf5, 0xb1, 0xe0, 0x2, 0xcb, 0x1, 0xca, 0xd3, 0xae, 0x50, 0x80, 0xb1, 0x52, 0xd5, 0xea, 0xc, 0x91, 0x3, 0x76, 0xbd, 0x6, 0xe4, 0xc6, 0x3f, 0x72, 0xaf, 0x73, 0x17, 0x21, 0xe8, 0xae, 0x38, 0xe9, 0x17, 0x56, 0xd8, 0x16, 0xa4, 0x68, 0x30, 0xa1, 0x1c, 0xcf, 0x5a, 0xde, 0x12, 0x18, 0xa0, 0x30, 0x17, 0x11, 0xd4, 0x88, 0x9a, 0x90, 0xcf, 0x5, 0x27, 0xb8, 0xc2, 0x99, 0x11, 0xcd, 0xab, 0xc8, 0x32, 0x52, 0x8d, 0x93, 0xb9, 0xea, 0x9d, 0x80, 0xad, 0xe8, 0x1b, 0x5a, 0x1b, 0x8b, 0x26, 0x19, 0x95, 0xcc, 0xc4, 0x82, 0x3b, 0x9, 0xe3, 0xb4, 0x23, 0x6c, 0xa9, 0xbf, 0xcf, 0xf, 0x43, 0x3, 0x90, 0x55, 0x4e, 0x4c, 0x3b, 0x3a, 0xe, 0xf0, 0xfb, 0xaf, 0x13, 0x7, 0x78, 0xee, 0x84, 0x42, 0xc, 0xb2, 0x44, 0x90, 0xc5, 0x86, 0x3c, 0xe5, 0xf3, 0xd8, 0x4a, 0x46, 0xfa, 0x4d, 0xad, 0x6, 0xa9, 0x9e, 0xc0, 0xa, 0x17, 0x65, 0x6b, 0x4c, 0x84, 0x97, 0xc5, 0xdd, 0xd4, 0x51, 0x8a, 0xd3, 0xf, 0x92, 0x9a, 0x1f, 0xc4, 0xf2, 0x1d, 0xf7, 0x8f, 0x87, 0xf9, 0x9f, 0xc1, 0xf9, 0xd7, 0x52, 0x8e, 0x63, 0x15, 0x2a, 0x16, 0x68, 0x0, 0x7, 0x76, 0xda, 0x46, 0x58, 0xd3, 0x18, 0x1d, 0x25, 0x99, 0x3, 0x44, 0x3f, 0xb9, 0xaa, 0x32, 0xd5, 0xe0, 0x7d, 0x3f, 0x24, 0x64, 0xbb, 0xf2, 0x41, 0xcb, 0x2f, 0xb6, 0xc, 0xd4, 0xc6, 0xa9, 0x3d, 0xe4, 0xa6, 0xa9, 0x3c, 0x6c, 0xc4, 0x8d, 0xf8, 0x85, 0xa8, 0xa8, 0x17, 0x5e, 0x1a, 0x38, 0x5, 0xad, 0xc5, 0x39, 0xc1, 0xc9, 0x8e, 0x10, 0x91, 0xa6, 0xb5, 0xdf, 0xa3, 0x8e, 0xac, 0xaa, 0xc4, 0xeb, 0xd5, 0xfb, 0xa7, 0x7, 0xda, 0x54, 0x12, 0x5a, 0x3d, 0xa9, 0xbc, 0x1f, 0xd1, 0xbe, 0x1, 0xe9, 0xbe, 0x53, 0x42, 0x6e, 0x74, 0x15, 0x79, 0x6e, 0xc7, 0xc5, 0x67, 0x3b, 0xda, 0x85, 0x3b, 0x9a, 0x9a, 0x42, 0xfb, 0x76, 0x2a, 0x63, 0x94, 0x3d, 0x57, 0xf6, 0x55, 0x47, 0x64, 0xa3, 0x33, 0x1, 0x22, 0xa, 0xf0, 0xff, 0x66, 0x48, 0xf8, 0x70, 0x9c, 0xef, 0x52, 0x44, 0xad, 0xd7, 0x5, 0x44, 0x58, 0x6b, 0x3, 0x37, 0x54, 0xf9, 0xc, 0xe0, 0xd, 0xd9, 0xb3, 0x88, 0x4e, 0x27, 0xc2, 0x5f, 0xd0, 0x32, 0x26, 0x1d, 0x57, 0x32, 0xc, 0xd8, 0xdc, 0x34, 0x35, 0xa2, 0x27, 0x10, 0x56, 0x9b, 0x22, 0xf9, 0x5e, 0xae, 0x3b, 0x98, 0xef, 0x5b, 0xa7, 0x23, 0xc0, 0x4c, 0x49, 0xd5, 0x3a, 0x87, 0x40, 0x60, 0x3f, 0xda, 0x45, 0x51, 0xa5, 0x27, 0x16, 0xaa, 0x8b, 0xca, 0xed, 0x8e, 0x50, 0x5d, 0xf7, 0xab, 0xf6, 0xd8, 0x53, 0x83, 0xb9, 0xac, 0x93, 0xf2, 0x12, 0xb7, 0x11, 0xc, 0xc9, 0xaa, 0x68, 0x2, 0x21, 0xaa, 0x14, 0x87, 0x57, 0xb3, 0x1, 0x85, 0xe2, 0x11, 0x7b, 0xe1, 0xe3, 0x1d, 0x6a, 0x91, 0xcb, 0xd, 0x4c, 0xba, 0xa3, 0x97, 0x70, 0x6b, 0xd1, 0xa9, 0x54, 0x1a, 0x21, 0xd3, 0x8a, 0x42, 0xb9, 0xc8, 0x6e, 0xf1, 0x46, 0x88, 0xd, 0x0, 0xec, 0xfc, 0xb2, 0x93, 0xab, 0x9e, 0x4, 0xd3, 0xb4, 0xbc, 0x12, 0xbe, 0x7d, 0x35, 0xda, 0x30, 0xd8, 0xef, 0x2b, 0xaa, 0xf8, 0x68, 0x4c, 0x7, 0x14, 0x4a, 0x33, 0x22, 0xd3, 0x55, 0xb9, 0x93, 0xf1, 0x96, 0x7b, 0xb6, 0xbf, 0xfa, 0xae, 0x16, 0x36, 0x31, 0xc4, 0xb7, 0xa8, 0x65, 0xac, 0x7c, 0x1b, 0xe3, 0xbe, 0x4b, 0x99, 0x5b, 0x6c, 0x34, 0xf9, 0x6a, 0x5e, 0x4, 0xbc, 0x54, 0xbb, 0x5, 0xb6, 0xca, 0xdc, 0xb6, 0xb8, 0x28, 0x49, 0xee, 0x9f, 0xc0, 0xb4, 0xa7, 0x19, 0x72, 0xbb, 0xc3, 0x6a, 0x0, 0x83, 0x2b, 0x52, 0xb4, 0x6e, 0xcd, 0x27, 0x11, 0x7c, 0x60, 0xab, 0xb0, 0x7, 0x5e, 0x43, 0x8b, 0xd5, 0x86, 0x11, 0xef, 0x61, 0xb4, 0xe5, 0xfb, 0x16, 0xd5, 0x8e, 0x2c, 0x34, 0x81, 0xad, 0x2c, 0xd1, 0x0, 0x2, 0xa7, 0x92, 0x9d, 0x67, 0x64, 0xa1, 0x16, 0x99, 0xcd, 0x1e, 0xaf, 0xda, 0x71, 0x8a, 0x15, 0x24, 0xc6, 0xbf, 0x18, 0xd9, 0xfb, 0x14, 0x1f, 0xc9, 0xcb, 0xe2, 0x24, 0x35, 0x1c, 0x6b, 0x69, 0x33, 0x16, 0xaa, 0x81, 0xfe, 0xe4, 0x36, 0xa3, 0x7, 0x98, 0xb8, 0x17, 0xc7, 0xb0, 0x17, 0x87, 0xfb, 0x85, 0x10, 0x3e, 0x73, 0xe, 0x62, 0x34, 0x1a, 0xc2, 0xe8, 0x3, 0xea, 0x54, 0x50, 0x6e, 0xe3, 0x6e, 0x13, 0xc8, 0xde, 0x28, 0x2, 0xa8, 0x4e, 0x9f, 0x55, 0x62, 0xe8, 0xb1, 0x4e, 0xf5, 0x54, 0x96, 0x81, 0x1e, 0x2c, 0x17, 0x32, 0xca, 0xae, 0xb3, 0x9b, 0x3, 0xd, 0x75, 0x21, 0x76, 0xf4, 0xb, 0x95, 0xcd, 0x5d, 0x55, 0x4, 0xb0, 0x55, 0xe1, 0xa9, 0x6e, 0x8c, 0xd1, 0x90, 0xd9, 0x56, 0x81, 0x43, 0x44, 0x82, 0x3f, 0x3b, 0xd5, 0x7b, 0x52, 0x86, 0x6, 0x7c, 0xb2, 0x9a, 0x10, 0xed, 0x94, 0x28, 0x8e, 0xe8, 0xbc, 0x16, 0x58, 0x20, 0x15, 0x71, 0xc1, 0x5d, 0x79, 0x17, 0x1a, 0x3f, 0xee, 0xa4, 0x8d, 0xf6, 0xd1, 0x75, 0x3f, 0x99, 0x57, 0xdf, 0x79, 0xd7, 0x67, 0x1e, 0x16, 0x97, 0xf1, 0x7b, 0xe0, 0x8c, 0xc0, 0x21, 0x33, 0xc9, 0x6f, 0x72, 0x5a, 0x2f, 0x67, 0xd6, 0xea, 0xe2, 0x6d, 0xc6, 0x7f, 0xf8, 0x33, 0x24, 0xc4, 0xad, 0xb4, 0xe1, 0x1b, 0x73, 0x25, 0x13, 0xc7, 0xc4, 0x6f, 0x81, 0x42, 0xec, 0xe3, 0x15, 0x68, 0xc2, 0x61, 0x76, 0x32, 0x6f, 0xa4, 0xdf, 0x3, 0x76, 0xb0, 0x15, 0x62, 0xc, 0x5a, 0xdf, 0x3c, 0x5e, 0xad, 0x45, 0xe5, 0x47, 0xed, 0xe9, 0x3e, 0x63, 0xf7, 0x21, 0x87, 0xde, 0x80, 0x66, 0x81, 0xd6, 0xf6, 0x9c, 0xfe, 0x7e, 0x3, 0xcf, 0xa4, 0xcc, 0x9b, 0x39, 0xf6, 0xf1, 0xb6, 0xa3, 0xa3, 0xaf, 0x90, 0xf5, 0x5, 0xa, 0x8a, 0x83, 0x6b, 0x59, 0x7d, 0xa1, 0xa0, 0x54, 0x4c, 0x2f, 0xe8, 0xf1, 0xea, 0x7f, 0xfb, 0x27, 0x78, 0x4d, 0x8b, 0xb8, 0xd8, 0x3, 0x0, 0x72, 0x94, 0x7b, 0xeb, 0x28, 0x3a, 0xf7, 0x8, 0xfe, 0xbc, 0xc0, 0xe, 0x1b, 0x37, 0x8, 0xb6, 0x4a, 0x20, 0x19, 0xd0, 0x16, 0x73, 0xa2, 0xb5, 0x7d, 0x12, 0x5c, 0xb2, 0x44, 0xe0, 0x37, 0x8f, 0xa8, 0xfd, 0x9c, 0x36, 0xe5, 0x8e, 0x53, 0x80, 0xbf, 0x1b, 0x8e, 0x29, 0x86, 0xb2, 0x3, 0xf0, 0x90, 0x78, 0xc, 0x8d, 0x2e, 0xfa, 0xbe, 0xc, 0x82, 0x4, 0xa6, 0xa8, 0x6b, 0xc2, 0x28, 0x17, 0x9b, 0x16, 0x5a, 0x6b, 0x52, 0x43, 0xc1, 0xa0, 0x24, 0xa9, 0xa4, 0xfc, 0x2b, 0x60, 0xce, 0x15, 0xb, 0xa1, 0x12, 0xb, 0xe3, 0x33, 0xb8, 0xc7, 0x53, 0xa6, 0x19, 0x3d, 0x3d, 0xd2, 0x4f, 0xb4, 0x10, 0xb, 0x29, 0xf9, 0xf5, 0xe0, 0xcd, 0x41, 0xd7, 0xa1, 0x5d, 0x5f, 0xd4, 0xc6, 0xfc, 0xb1, 0x1e, 0xb9, 0x3, 0xc5, 0x7a, 0x10, 0xd2, 0x64, 0xe0, 0xfa, 0xe6, 0x32, 0x52, 0x6d, 0xc, 0xeb, 0xb4, 0x32, 0x36, 0xcf, 0xa2, 0x60, 0x5f, 0x80, 0x28, 0xa4, 0xd5, 0x4, 0xa0, 0x65, 0x3, 0x58, 0xf5, 0xf5, 0xbc, 0x9, 0xfd, 0xd7, 0xbd, 0x31, 0x91, 0x9c, 0x2a, 0xd1, 0xca, 0xde, 0x90, 0xcd, 0xfc, 0x5d, 0x91, 0x16, 0x91, 0xeb, 0x16, 0xd9, 0x5c, 0x6f, 0xa0, 0x44, 0x1f, 0x2, 0x94, 0x59, 0x2a, 0x75, 0x65, 0x20, 0x3c, 0x65, 0x1c, 0x30, 0x57, 0xd9, 0x85, 0x7c, 0xd1, 0x70, 0x96, 0x62, 0x8, 0x1d, 0x8c, 0xb, 0x9d, 0x60, 0x62, 0x5f, 0x66, 0xd5, 0x1c, 0xcf, 0x94, 0x60, 0x3e, 0xaa, 0x32, 0xd1, 0x18, 0x3d, 0x12, 0x86, 0xb2, 0x48, 0x3d, 0x25, 0x1d, 0x4b, 0x4b, 0x16, 0xde, 0x16, 0x47, 0xe4, 0xba, 0xfb, 0x56, 0xe, 0x60, 0xf7, 0xc7, 0xf1, 0xb2, 0x89, 0x7b, 0x45, 0x1, 0x62, 0xd3, 0xfd, 0x2b, 0x49, 0x1b, 0x38, 0xe1, 0xf4, 0x2e, 0xad, 0x2b, 0xa9, 0x2a, 0xc5, 0xa0, 0xbb, 0x51, 0x7c, 0xba, 0x10, 0x80, 0xec, 0xfc, 0xe7, 0x26, 0x10, 0x45, 0x15, 0x25, 0x70, 0xc9, 0x8f, 0x43, 0x49, 0x49, 0x60, 0x77, 0x2d, 0xd8, 0xf2, 0x60, 0x1c, 0x19, 0xd2, 0x2c, 0xcb, 0x58, 0x6a, 0x6c, 0x72, 0x68, 0xaf, 0x93, 0x45, 0x97, 0xa5, 0x5c, 0x79, 0xb3, 0xf, 0xcd, 0x44, 0xf9, 0x85, 0x9c, 0xcc, 0xf4, 0xf0, 0x4a, 0x8d, 0x93, 0x41, 0xa2, 0xf, 0x9c, 0x24, 0xb, 0xfa, 0x32, 0x36, 0xa1, 0x15, 0xde, 0xd0, 0x21, 0x93, 0x6b, 0xfa, 0x3e, 0xc9, 0x1, 0x94, 0xdd, 0x61, 0x7f, 0xb2, 0xd7, 0x3e, 0xe3, 0xc, 0xc3, 0x9e, 0x7d, 0x8d, 0xb9, 0x4e, 0xda, 0xc8, 0x5d, 0xd2, 0x47, 0x9b, 0x3b, 0x1d, 0xfa, 0xaa, 0xd2, 0xac, 0x1c, 0x77, 0xdb, 0x58, 0x55, 0x86, 0xda, 0x14, 0x2d, 0x52, 0xb0, 0xbb, 0x48, 0x54, 0xf, 0x46, 0x48, 0x28, 0x1e, 0xd4, 0xc2, 0xfd, 0xd2, 0xd0, 0xd, 0xdf, 0x7a, 0x38, 0x9, 0x6b, 0xc6, 0xc6, 0x84, 0x20, 0x38, 0xc5, 0xa6, 0xbf, 0xb9, 0x4e, 0xdd, 0x67, 0x6a, 0x69, 0xa, 0xbe, 0x8a, 0x82, 0xd3, 0x6c, 0x53, 0xa, 0xde, 0x4, 0xdd, 0x73, 0xf9, 0x12, 0x18, 0x88, 0x8d, 0x67, 0x8c, 0x80, 0xbc, 0xbc, 0x53, 0xc, 0x88, 0x6f, 0x9, 0xd6, 0x1a, 0xdd, 0x74, 0x74, 0xbe, 0x81, 0x53, 0xbd, 0x95, 0xa2, 0x5f, 0x18, 0xf8, 0xb0, 0xc7, 0x8, 0x4d, 0xde, 0xb3, 0xb3, 0x2a, 0x29, 0x5d, 0xdc, 0xa5, 0x60, 0x68, 0xfa, 0x5a, 0x48, 0x8c, 0x1a, 0x69, 0x49, 0xf2, 0x48, 0x3, 0x34, 0xa5, 0x45, 0x61, 0xd8, 0x1b, 0xad, 0x1e, 0x63, 0xb9, 0x24, 0x85, 0xa0, 0x57, 0x86, 0xcd, 0xae, 0xcd, 0x5f, 0x57, 0x31, 0xfa, 0x72, 0xa6, 0x9b, 0x69, 0xe4, 0x70, 0x61, 0x80, 0xd0, 0x12, 0x99, 0xad, 0x26, 0xa7, 0xa0, 0x73, 0x59, 0xf9, 0xb5, 0xad, 0xdc, 0xaf, 0xcc, 0x56, 0xc7, 0x3f, 0xb, 0x3e, 0x3a, 0x53, 0xea, 0x8e, 0xf3, 0x57, 0x57, 0xb3, 0x9b, 0x46, 0xaa, 0xc1, 0x21, 0x37, 0x2f, 0x50, 0xaa, 0xb7, 0xee, 0x71, 0xda, 0x1d, 0xb3, 0x29, 0xe0, 0xd, 0x59, 0x77, 0xc2, 0x44, 0x25, 0x5d, 0x43, 0xba, 0x52, 0x32, 0x70, 0x1d, 0x79, 0x25, 0x34, 0xf4, 0x41, 0xe2, 0xfc, 0x6c, 0x52, 0x2a, 0xcf, 0xf4, 0x5e, 0xe1, 0x85, 0x77, 0xcf, 0x94, 0x8d, 0x78, 0x4, 0x88, 0xf5, 0xac, 0x4c, 0x59, 0x3d, 0x14, 0xd9, 0x43, 0x8a, 0xb1, 0xf, 0x4, 0xd3, 0x4b, 0x6c, 0xd1, 0x18, 0x62, 0x4c, 0x93, 0x1e, 0x85, 0x62, 0x3b, 0x4a, 0x7f, 0x8, 0xf8, 0x44, 0x8, 0x68, 0x82, 0xed, 0xf0, 0xad, 0x22, 0xfb, 0x15, 0x94, 0x51, 0x1a, 0xb2, 0x1c, 0x79, 0xf4, 0x76, 0xe4, 0x8b, 0xdd, 0x43, 0x21, 0x28, 0x51, 0x92, 0x1e, 0x55, 0xcf, 0x6c, 0x83, 0xff, 0x3e, 0x8f, 0xb3, 0x8d, 0x17, 0x18, 0x2e, 0xea, 0x92, 0x3, 0xa8, 0xd0, 0x1f, 0xdb, 0xe8, 0xdc, 0x76, 0xfa, 0x8b, 0x88, 0xf2, 0x90, 0xa2, 0x5e, 0xc, 0x46, 0xea, 0xc2, 0x8e, 0xce, 0xa4, 0x4c, 0xf4, 0x36, 0xb3, 0x4a, 0xf6, 0x68, 0x29, 0x8a, 0x4b, 0x29, 0x11, 0xfa, 0xb6, 0xff, 0x58, 0x5f, 0x17, 0x5e, 0x82, 0x66, 0xf9, 0xe8, 0x70, 0x91, 0x77, 0x30, 0x5a, 0x81, 0x10, 0x1c, 0xfc, 0x52, 0xb3, 0x51, 0x7c, 0xbe, 0xf6, 0xec, 0x44, 0xb1, 0xa2, 0x7d, 0x32, 0x36, 0x14, 0x63, 0x86, 0x4e, 0x4d, 0x15, 0x73, 0x9d, 0x85, 0xba, 0xde, 0xba, 0xf7, 0xc2, 0xf5, 0x8f, 0xaf, 0xa8, 0xea, 0x6a, 0x6d, 0x37, 0x37, 0x9a, 0x30, 0xca, 0x64, 0xe4, 0x41, 0x39, 0xc6, 0x85, 0x12, 0xd2, 0x71, 0x3a, 0xa7, 0x0, 0xc6, 0xff, 0x25, 0x35, 0xb8, 0xed, 0xb7, 0x95, 0xf6, 0xe3, 0xc4, 0x68, 0x29, 0xed, 0xd1, 0xcd, 0x34, 0x2f, 0xdb, 0xd, 0xdd, 0xf2, 0x30, 0x2a, 0x1c, 0xa5, 0x93, 0xb4, 0xaa, 0x39, 0x56, 0x57, 0x3d, 0x10, 0xbf, 0x2a, 0x92, 0xb, 0x5, 0x77, 0x7a, 0xbe, 0x2e, 0x72, 0xa3, 0x13, 0xc2, 0x6a, 0x4e, 0xa3, 0x85, 0x23, 0x7e, 0xf, 0xb, 0x3f, 0xc6, 0x3, 0x9c, 0x4a, 0xe5, 0xdb, 0xb0, 0x55, 0xa4, 0x94, 0x5c, 0xe7, 0x4c, 0xc9, 0x6, 0x27, 0xa5, 0x83, 0x2c, 0x82, 0xd7, 0x66, 0x7c, 0xbc, 0xff, 0xd, 0x3c, 0xb6, 0x42, 0x5d, 0x2e, 0x1b, 0xa4, 0x79, 0xd9, 0x28, 0x57, 0x6b, 0xd4, 0x60, 0x56, 0xe8, 0xaf, 0xc, 0x3b, 0xa, 0xec, 0xa0, 0xa9, 0x44, 0x85, 0x8c, 0x97, 0xc0, 0xe6, 0x48, 0x22, 0xfd, 0x3e, 0x91, 0xc2, 0xb7, 0x63, 0xf8, 0x88, 0xef, 0x4a, 0x65, 0x9b, 0xbb, 0xae, 0x14, 0x9f, 0xc4, 0xbd, 0xac, 0x76, 0xab, 0x6a, 0x50, 0x7f, 0xf2, 0xd5, 0xc6, 0x4, 0x71, 0x9b, 0x8, 0xcf, 0xf8, 0x4c, 0x87, 0x13, 0x56, 0xf3, 0x44, 0x29, 0x4f, 0xda, 0xdf, 0xbd, 0x56, 0xb, 0xba, 0xd, 0x1e, 0xef, 0xb6, 0x44, 0x2f, 0xc8, 0x8f, 0xf1, 0xca, 0x10, 0x11, 0x20, 0x31, 0xd3, 0x4, 0x6d, 0x6e, 0x83, 0xd0, 0x2c, 0xf9, 0xe8, 0xf3, 0x1c, 0x59, 0x18, 0xed, 0x87, 0x98, 0x7d, 0xd1, 0xba, 0x2a, 0xb8, 0x73, 0x11, 0x26, 0xee, 0x50, 0x6b, 0x3, 0xf8, 0x5d, 0x6f, 0x9f, 0xfa, 0xe3, 0x44, 0x79, 0xc6, 0xa7, 0xd2, 0xd0, 0xfa, 0xca, 0xb8, 0xdc, 0xdb, 0xaf, 0xa9, 0xb2, 0xf0, 0x2e, 0x21, 0xc6, 0x66, 0xd7, 0x8f, 0xa0, 0x34, 0x89, 0x3f, 0x2d, 0x10, 0x26, 0x60, 0x89, 0x84, 0xd6, 0x8f, 0x93, 0x33, 0x39, 0x5e, 0xb, 0xf1, 0x95, 0xbc, 0xaf, 0x7f, 0x15, 0xcb, 0x12, 0x24, 0x19, 0xe1, 0xf2, 0xbf, 0x3b, 0x3e, 0x1e, 0x83, 0x1a, 0x61, 0xe2, 0x73, 0x36, 0xe2, 0x5e, 0xb6, 0x48, 0x4, 0x3, 0xc9, 0x9, 0x80, 0xbc, 0x59, 0x7e, 0x87, 0xb5, 0x2c, 0xf5, 0xd0, 0xff, 0x77, 0x70, 0x35, 0x5e, 0xd5, 0x2, 0x81, 0xd, 0x26, 0x5f, 0x32, 0x65, 0x24, 0x1b, 0x75, 0xfe, 0x2c, 0xf3, 0x7f, 0xe0, 0xd5, 0xac, 0xc2, 0xfd, 0x37, 0x58, 0xa0, 0x41, 0x4c, 0x47, 0x98, 0xbb, 0xa7, 0x78, 0xe2, 0x45, 0x2d, 0xbe, 0x86, 0xbf, 0x9e, 0x2c, 0x7a, 0x3a, 0x55, 0x63, 0x1, 0x9f, 0x60, 0xdd, 0xd5, 0x34, 0x4f, 0x29, 0xcc, 0xeb, 0xdb, 0x9d, 0xef, 0xbb, 0x60, 0xc6, 0xc0, 0xf5, 0x3, 0x43, 0x2d, 0x76, 0xee, 0xb4, 0x7f, 0xe3, 0x6d, 0x63, 0x7a, 0x67, 0x35, 0x96, 0xdb, 0xca, 0x4e, 0x55, 0xa8, 0x80, 0xfb, 0x28, 0xf4, 0xcb, 0x81, 0x93, 0xc7, 0xa4, 0x8, 0x44, 0x30, 0x9b, 0x55, 0xe4, 0xc0, 0x10, 0xfa, 0xed, 0x3f, 0xae, 0x5, 0xd8, 0x56, 0x48, 0xa3, 0x39, 0xb4, 0x7d, 0x5a, 0xe3, 0xcd, 0x14, 0x27, 0x59, 0xf6, 0xd0, 0x9, 0x2, 0x97, 0x19, 0xf9, 0xaf, 0x5f, 0x81, 0xc8, 0x8e, 0xca, 0x88, 0xed, 0xd4, 0x37, 0x2c, 0x7a, 0x82, 0x7e, 0xce, 0x87, 0x6, 0xf, 0x25, 0x76, 0xea, 0x82, 0x38, 0x9a, 0x5f, 0x3f, 0x3e, 0xe5, 0x1f, 0x50, 0x37, 0x9, 0xb4, 0x6a, 0x6d, 0x3b, 0x7f, 0x2a, 0x97, 0xfe, 0xdc, 0x9b, 0xae, 0x4f, 0x15, 0x6a, 0xa, 0xbd, 0xd7, 0x74, 0x44, 0xdd, 0x59, 0x81, 0xa9, 0x88, 0x2e, 0x55, 0x34, 0xca, 0x71, 0xe3, 0x15, 0xfe, 0xae, 0xca, 0x7d, 0x5d, 0x6, 0xa9, 0xf7, 0x4b, 0x6f, 0x8, 0x9c, 0x36, 0x7, 0xa1, 0x7e, 0xac, 0x3a, 0x20, 0x5, 0x57, 0x66, 0x68, 0x17, 0xdb, 0x7e, 0xfd, 0x52, 0x4b, 0xf3, 0x7c, 0x58, 0xff, 0xbf, 0xb0, 0xfe, 0xae, 0x9d, 0x0, 0xf7, 0x8d, 0x6e, 0xb7, 0x24, 0xc, 0x87, 0xdf, 0x54, 0xd1, 0x77, 0x4f, 0x87, 0xbe, 0x2d, 0xcb, 0x26, 0xc9, 0xf0, 0xac, 0x70, 0xb8, 0x5c, 0x48, 0x2c, 0x67, 0x20, 0x51, 0xea, 0x0, 0x20, 0xc2, 0x42, 0x65, 0xcd, 0x97, 0xf2, 0x65, 0xea, 0x3e, 0x2d, 0xb3, 0xc9, 0x3f, 0xe1, 0x4d, 0xb8, 0x32, 0xd2, 0xf, 0x5b, 0xca, 0x7f, 0xe, 0x57, 0xa3, 0xb7, 0xe4, 0x38, 0xaf, 0xbd, 0xf3, 0x49, 0x21, 0x5a, 0x8d, 0x83, 0xb6, 0xdd, 0x80, 0xbf, 0x29, 0x97, 0x40, 0x3d, 0xe3, 0x50, 0xbc, 0xfa, 0x83, 0x2e, 0x2f, 0x39, 0x3b, 0x43, 0x4e, 0xe5, 0x15, 0xb4, 0x6e, 0x41, 0x25, 0x3, 0x9e, 0xa, 0xb0, 0x5b, 0x79, 0x14, 0xdd, 0xae, 0xdb, 0x87, 0xc2, 0xc0, 0xa5, 0xbc, 0x32, 0xb2, 0xde, 0x45, 0x68, 0xfd, 0xff, 0x23, 0x8c, 0x9c, 0x39, 0x40, 0x8c, 0x60, 0x4e, 0xad, 0x6f, 0x4c, 0x5a, 0x24, 0xa7, 0xc3, 0x6d, 0x96, 0xcb, 0xd8, 0x97, 0xcc, 0x38, 0xbf, 0x60, 0xd, 0x51, 0xce, 0x9, 0x3b, 0x71, 0xc6, 0x3a, 0x1c, 0x8c, 0x36, 0xf4, 0x57, 0x30, 0xd1, 0x8e, 0xbd, 0x95, 0x1a, 0x6a, 0xb7, 0x4b, 0x1, 0x4d, 0x91, 0x5e, 0xb2, 0xa9, 0x51, 0x45, 0x8c, 0xbe, 0xec, 0xb4, 0x51, 0x22, 0x40, 0x34, 0x2a, 0x83, 0xc5, 0x83, 0x79, 0xb5, 0xc9, 0x86, 0x64, 0x20, 0x2f, 0x78, 0x34, 0x53, 0xb8, 0xc8, 0xca, 0xb8, 0x93, 0x2, 0x88, 0x31, 0x95}, - output224: []byte{0x85, 0x81, 0xaa, 0xd3, 0x9, 0xe2, 0x38, 0xd2, 0xdc, 0xd2, 0x83, 0xb9, 0x65, 0x49, 0x7b, 0x86, 0x74, 0xcc, 0x8f, 0x1b, 0x99, 0x9, 0x6f, 0x82, 0xd7, 0x80, 0x1, 0xf0}, - output256: []byte{0x31, 0x20, 0x83, 0xd9, 0x69, 0x68, 0x97, 0x40, 0xc2, 0x3c, 0xc2, 0x87, 0x7, 0x7b, 0x60, 0xad, 0x35, 0x31, 0x6a, 0x14, 0xf2, 0xeb, 0x1, 0x5f, 0xa0, 0xa1, 0x12, 0x5c, 0xb6, 0x34, 0x7f, 0x76}, - output384: []byte{0x55, 0x27, 0x4f, 0x25, 0x79, 0xa, 0xdf, 0x33, 0x32, 0x2a, 0xe0, 0x8f, 0xa3, 0x3b, 0x3e, 0x48, 0xb4, 0x93, 0x99, 0x1d, 0x11, 0x64, 0xcb, 0x7d, 0x11, 0xb7, 0x4f, 0x4c, 0x76, 0xec, 0x32, 0x72, 0x6, 0xec, 0x11, 0xee, 0x2f, 0x2b, 0x7b, 0x3b, 0x4, 0xee, 0x58, 0x1a, 0xa8, 0x35, 0xd5, 0x3f}, - output512: []byte{0x85, 0x47, 0x66, 0x87, 0x16, 0x77, 0xe0, 0xf, 0xc9, 0x80, 0x37, 0x82, 0x32, 0x9b, 0xf0, 0x8b, 0x93, 0x5f, 0xe6, 0x2, 0x6, 0xe1, 0xf5, 0xd0, 0x26, 0x52, 0x88, 0x1e, 0xd4, 0x7e, 0xb3, 0xed, 0x6b, 0x92, 0xdf, 0x1f, 0x18, 0x93, 0xaa, 0x17, 0x39, 0xe6, 0xb7, 0x4c, 0x49, 0xd, 0x56, 0xb0, 0x81, 0x8e, 0x41, 0xb1, 0xd7, 0x6b, 0xaa, 0x19, 0x64, 0x71, 0x54, 0x3a, 0x13, 0xc2, 0x25, 0x95}}, - testcase{ - msg: []byte{0x63, 0xd0, 0x16, 0xd6, 0x4a, 0x4, 0x18, 0x3e, 0xa6, 0xab, 0xfd, 0x3d, 0x35, 0x37, 0x90, 0xe2, 0x2b, 0x4, 0xca, 0x89, 0xd7, 0xcd, 0xe3, 0xf2, 0xc6, 0xe, 0x8d, 0x36, 0xc7, 0x14, 0x3a, 0xfa, 0xe9, 0x6d, 0xe6, 0x71, 0xc2, 0xcd, 0x91, 0x5a, 0x7d, 0x8f, 0x41, 0xc9, 0xf8, 0xb, 0xf3, 0xc4, 0x7a, 0xa3, 0x74, 0x87, 0xcb, 0x9c, 0x93, 0x8c, 0xd5, 0xaf, 0x8a, 0xee, 0xb4, 0xa3, 0xc6, 0x29, 0x4d, 0x2e, 0x12, 0xca, 0xf1, 0xf2, 0xc7, 0xab, 0x70, 0xdd, 0x14, 0x40, 0x74, 0xfe, 0x8, 0x3c, 0xf8, 0x2d, 0x37, 0xcb, 0x38, 0x4, 0x28, 0x62, 0xda, 0x9f, 0xde, 0x75, 0xc0, 0x12, 0x1f, 0xb7, 0xc0, 0x4f, 0x7a, 0x9f, 0x71, 0x14, 0xf8, 0x9a, 0x7e, 0xe3, 0x48, 0x69, 0xc1, 0xbb, 0x3f, 0x78, 0xbb, 0x58, 0xfc, 0x64, 0x6c, 0x8b, 0x16, 0xca, 0x22, 0x88, 0xa2, 0x5a, 0x5, 0xe, 0x34, 0xb8, 0xf6, 0x31, 0x5a, 0xf6, 0x84, 0xac, 0xf3, 0x62, 0x9a, 0xb2, 0x4e, 0xe6, 0xde, 0xd7, 0x35, 0x71, 0xc1, 0x83, 0x7f, 0xe9, 0x9, 0xef, 0xd3, 0xde, 0x34, 0x98, 0x51, 0x58, 0x57, 0x9f, 0x4, 0x92, 0x50, 0xb1, 0x87, 0x40, 0x21, 0x35, 0x4f, 0xb1, 0x71, 0x50, 0x47, 0xd9, 0x15, 0x8a, 0x31, 0xe9, 0x6, 0x73, 0x8f, 0xb3, 0x2d, 0x3b, 0xa0, 0x1f, 0x55, 0x9b, 0x19, 0xee, 0xf2, 0x48, 0x78, 0x1e, 0x23, 0xdc, 0x47, 0xfe, 0x2a, 0x3b, 0x12, 0xf1, 0xfc, 0x70, 0xd0, 0xae, 0x92, 0x2f, 0x60, 0x78, 0xf8, 0xbd, 0x1a, 0x9c, 0xe1, 0x3e, 0x3c, 0x18, 0xdf, 0x4c, 0x51, 0x21, 0xc1, 0x32, 0xf0, 0xdd, 0xed, 0xc5, 0x96, 0x14, 0x29, 0xad, 0xf7, 0xb3, 0x2d, 0x62, 0x5, 0x8b, 0x4e, 0x7b, 0x7a, 0xab, 0xe5, 0xc5, 0xd0, 0x50, 0xa8, 0xea, 0x33, 0xd3, 0xb5, 0xb6, 0xe9, 0xd, 0x22, 0x4, 0x4e, 0x58, 0xba, 0xab, 0xce, 0xb2, 0x23, 0x53, 0x9a, 0x33, 0x9d, 0xe9, 0x91, 0x7d, 0x7f, 0x5b, 0x3d, 0x72, 0xb9, 0x10, 0xc1, 0xc8, 0x3, 0x6c, 0x24, 0xc, 0xb1, 0xa5, 0x8b, 0x7b, 0xca, 0xd, 0x77, 0xad, 0x82, 0xe, 0xd1, 0xfb, 0x2f, 0xe, 0xcf, 0x85, 0xa5, 0xd0, 0xc0, 0xf0, 0x79, 0x76, 0xea, 0x27, 0x87, 0x1e, 0xc7, 0xd1, 0xfe, 0x9e, 0xa5, 0x1a, 0xb1, 0xf2, 0x0, 0x52, 0x30, 0x7b, 0x3f, 0x9, 0x95, 0xc, 0x6d, 0x1e, 0x38, 0x22, 0x44, 0xe, 0x7a, 0xbc, 0xc3, 0x4d, 0xba, 0x27, 0x83, 0x79, 0x11, 0x5c, 0xa0, 0x69, 0x1, 0x12, 0xef, 0xe4, 0xb9, 0x56, 0x99, 0xe6, 0xe1, 0x35, 0xca, 0x8d, 0xeb, 0xb1, 0x73, 0xcf, 0x7a, 0x3a, 0xd5, 0x51, 0xdc, 0x41, 0xe5, 0x2e, 0x23, 0x7c, 0x8, 0x4c, 0x31, 0x8d, 0xe2, 0x90, 0xbe, 0x7a, 0xef, 0xeb, 0xf1, 0x2a, 0xde, 0xb0, 0x24, 0x3a, 0xe5, 0x76, 0x39, 0x2c, 0x76, 0x7f, 0x8, 0x71, 0x80, 0xa1, 0x25, 0xbb, 0x30, 0xd8, 0xd5, 0x6b, 0xfa, 0xf7, 0x3, 0xa8, 0x5c, 0x93, 0x59, 0x18, 0x28, 0x94, 0xf5, 0xd, 0xaa, 0x69, 0x42, 0x55, 0xd0, 0x1a, 0xcb, 0x1d, 0x43, 0x6b, 0x27, 0xa, 0x7b, 0xd, 0x88, 0x77, 0x26, 0x59, 0xe7, 0x49, 0x10, 0x27, 0x7c, 0x2e, 0x2e, 0x9a, 0xb0, 0xe9, 0xd3, 0xc7, 0x22, 0x3, 0xe5, 0x97, 0x70, 0x90, 0x47, 0x89, 0xc1, 0x2a, 0x38, 0xd0, 0x46, 0x50, 0x90, 0xac, 0x62, 0x85, 0xca, 0x8b, 0x57, 0x75, 0x5, 0xa2, 0x5c, 0xc8, 0x7c, 0xab, 0xa9, 0x9b, 0x43, 0x16, 0x6b, 0x52, 0x1b, 0xc2, 0xbb, 0x68, 0x57, 0xb0, 0xfe, 0x26, 0xd9, 0x9f, 0xbd, 0xba, 0xa3, 0x48, 0x49, 0xb2, 0x7, 0x5b, 0x67, 0x2d, 0x1f, 0xb6, 0x22, 0x92, 0x54, 0xbd, 0x71, 0x8, 0xb1, 0x99, 0x97, 0x1e, 0x85, 0x93, 0xe1, 0xc8, 0xe8, 0x3c, 0x2a, 0x63, 0x17, 0x98, 0xdb, 0x5e, 0x84, 0x9, 0x8a, 0x67, 0xf2, 0x16, 0x4f, 0x16, 0x78, 0x4, 0x81, 0x11, 0xc, 0xe6, 0xa9, 0xeb, 0x4c, 0x1b, 0xbc, 0x12, 0xe6, 0x81, 0xe5, 0xd2, 0x48, 0xb1, 0xe8, 0xe2, 0xfa, 0xaa, 0x8, 0x1b, 0x37, 0x62, 0xf6, 0x4d, 0xad, 0x22, 0xc9, 0xe1, 0xc2, 0xab, 0x45, 0xea, 0x3a, 0xba, 0xf5, 0x47, 0xce, 0x40, 0x5a, 0xd5, 0x67, 0x94, 0xf8, 0x9e, 0x20, 0x86, 0x80, 0x72, 0x79, 0x82, 0x87, 0x82, 0xd4, 0xba, 0x5e, 0x82, 0xd, 0x5d, 0x77, 0xd0, 0x20, 0xb0, 0x65, 0x36, 0xa2, 0x58, 0x4d, 0x78, 0xd3, 0x92, 0xb4, 0xec, 0xe4, 0x56, 0x60, 0x6a, 0x6b, 0x7a, 0xa9, 0xc8, 0xb, 0x8d, 0x5a, 0xb0, 0x75, 0x8a, 0x36, 0xe7, 0x7f, 0x97, 0xda, 0xa2, 0x4c, 0x8, 0xf, 0xa4, 0x24, 0x9f, 0x12, 0x7b, 0x16, 0xcd, 0xf5, 0xbb, 0xf0, 0xf6, 0x9b, 0x4d, 0xd4, 0x25, 0xd2, 0xc4, 0x22, 0xc0, 0x11, 0x7e, 0x90, 0x85, 0x35, 0x62, 0x35, 0xf4, 0x9d, 0x7b, 0xd2, 0x77, 0x3f, 0xed, 0x4e, 0x17, 0x71, 0x29, 0x35, 0xbc, 0x44, 0x68, 0xa9, 0xad, 0xaa, 0x30, 0xe9, 0xcc, 0xb9, 0xb1, 0x60, 0x22, 0x30, 0x64, 0xa2, 0xee, 0x4e, 0x17, 0xe8, 0x85, 0xeb, 0x3e, 0xab, 0x5b, 0x72, 0xcf, 0x7b, 0x37, 0x15, 0xe5, 0x18, 0xaa, 0x1b, 0xcf, 0xdf, 0x6c, 0xc3, 0xeb, 0x73, 0x4f, 0xc7, 0x5e, 0x6a, 0xd7, 0x93, 0xa4, 0x39, 0xb1, 0x22, 0x1f, 0x89, 0x5f, 0x67, 0xe6, 0xa9, 0x24, 0xdc, 0x58, 0x63, 0x97, 0x3b, 0x53, 0x4, 0xa0, 0x7e, 0xa1, 0x11, 0x8e, 0x7c, 0x72, 0xd4, 0x60, 0x29, 0x4, 0x8a, 0xa7, 0x3a, 0x8b, 0xae, 0xa1, 0xd8, 0xc9, 0x7, 0x3f, 0x2e, 0xd3, 0xc0, 0x86, 0x7f, 0x5a, 0xff, 0x73, 0xae, 0xb4, 0xbf, 0x47, 0x7e, 0x58, 0xa8, 0xb6, 0xa5, 0xa5, 0x7b, 0xee, 0xb3, 0x82, 0x11, 0x7d, 0x3d, 0x40, 0x6f, 0x3f, 0x1c, 0xf9, 0x9c, 0x3c, 0x4d, 0x28, 0xd6, 0x9a, 0xb, 0xc0, 0x5f, 0xc3, 0x77, 0x35, 0xfc, 0x26, 0xab, 0x83, 0xf1, 0x1b, 0x6b, 0x31, 0x96, 0x68, 0x31, 0x7, 0x2e, 0xb9, 0x60, 0x9, 0x6e, 0x2c, 0x8b, 0x79, 0x6, 0x79, 0xe8, 0x16, 0xa5, 0x86, 0x88, 0x28, 0x11, 0x0, 0x47, 0xc4, 0x74, 0xba, 0x31, 0xf0, 0x95, 0xb3, 0xed, 0xa5, 0x71, 0xb6, 0xcd, 0x8c, 0xc9, 0xfd, 0x3b, 0x6b, 0x96, 0xb8, 0x31, 0x24, 0x82, 0xa6, 0x9e, 0x3c, 0xae, 0xe4, 0x23, 0xae, 0xb6, 0x2, 0x76, 0x45, 0xaf, 0x2a, 0xae, 0xf2, 0x74, 0x14, 0x32, 0x7e, 0x45, 0xaf, 0xb1, 0xc9, 0x26, 0xe3, 0x9, 0x4b, 0x36, 0xa5, 0xb3, 0xeb, 0xba, 0x3a, 0xcf, 0x29, 0xe3, 0x68, 0x7b, 0x66, 0x88, 0x32, 0x1e, 0x4e, 0x24, 0x4e, 0x50, 0xea, 0x72, 0x5a, 0xa0, 0x30, 0x3a, 0xcd, 0x52, 0x25, 0x5, 0x86, 0x6a, 0xd9, 0xa6, 0xe4, 0xe7, 0xd5, 0xcd, 0xbd, 0xda, 0xf2, 0xf7, 0xe3, 0x27, 0x43, 0x6a, 0xc5, 0x1f, 0xc2, 0x43, 0xbd, 0xed, 0xbb, 0xfb, 0x7c, 0x27, 0xad, 0xab, 0x5d, 0xfb, 0x41, 0x44, 0x6a, 0xc2, 0x4, 0x83, 0x32, 0x70, 0xac, 0xb7, 0x16, 0x92, 0x9a, 0xb0, 0x7c, 0xa6, 0xd, 0xa8, 0x47, 0xa1, 0x4a, 0x2b, 0x24, 0x8b, 0x56, 0xac, 0x8, 0x2b, 0x3b, 0xd8, 0xc6, 0x43, 0x87, 0x8d, 0xe6, 0x62, 0xf6, 0xbf, 0x76, 0x4e, 0x45, 0xdc, 0x25, 0xfd, 0xed, 0x62, 0x49, 0x50, 0x29, 0x21, 0x1a, 0x57, 0x88, 0xd0, 0x49, 0x5f, 0x86, 0xc4, 0xcd, 0x46, 0x81, 0x10, 0x32, 0x33, 0x34, 0xcc, 0xea, 0x98, 0x55, 0x8d, 0x5f, 0x9e, 0x23, 0x70, 0xd4, 0x6d, 0x36, 0x28, 0x6b, 0x54, 0x94, 0x4, 0x2f, 0x97, 0x8b, 0xcd, 0xa3, 0xbc, 0x8b, 0x89, 0xbc, 0x7b, 0xb7, 0xcc, 0x2e, 0x5c, 0x90, 0x50, 0xbd, 0x13, 0x15, 0xc7, 0x4c, 0xe3, 0xe5, 0x3a, 0x4c, 0x5a, 0xdc, 0x25, 0x12, 0x1d, 0x15, 0xc7, 0xe5, 0x5d, 0x4e, 0x29, 0x0, 0x18, 0x20, 0x9b, 0x3a, 0x7, 0x7c, 0x73, 0xb1, 0x90, 0x8d, 0xad, 0xbf, 0x21, 0xa4, 0x2d, 0x25, 0x41, 0xfc, 0xe9, 0x67, 0x92, 0xee, 0xbe, 0xf0, 0x91, 0xf6, 0x6, 0x72, 0x94, 0xbc, 0x54, 0x16, 0x71, 0x91, 0x83, 0x74, 0xe5, 0x34, 0x50, 0x17, 0xbc, 0x39, 0xfd, 0x64, 0xa4, 0xcc, 0x56, 0x30, 0x33, 0x89, 0xcd, 0x5b, 0xca, 0x80, 0x3e, 0x89, 0x74, 0x14, 0xf7, 0x83, 0x25, 0x2d, 0x93, 0x7a, 0x61, 0xae, 0x42, 0x29, 0x56, 0xf8, 0xe6, 0xb0, 0xef, 0x73, 0x3d, 0xe2, 0x6c, 0xe2, 0x9d, 0x7d, 0x54, 0xa8, 0x6c, 0xf5, 0x1a, 0xa0, 0x9, 0xe4, 0xed, 0x1c, 0x5c, 0x85, 0x9a, 0x3e, 0x23, 0xc7, 0xcd, 0x9f, 0xd, 0xbb, 0xf0, 0x40, 0x9d, 0x46, 0x55, 0x48, 0xaa, 0x53, 0x16, 0xda, 0x3f, 0xa5, 0xc1, 0x61, 0xf4, 0xfa, 0x13, 0x2, 0xf, 0x92, 0x73, 0x6d, 0x93, 0x37, 0xd2, 0xc1, 0x72, 0xf1, 0x9e, 0xa9, 0xc4, 0x53, 0x2b, 0xa6, 0xcc, 0xe8, 0xe0, 0xf, 0x13, 0x3b, 0x21, 0x3b, 0x8, 0x16, 0xd8, 0x5d, 0x83, 0xe3, 0xa3, 0x90, 0xd0, 0xfd, 0xf, 0x7c, 0xdb, 0x99, 0x3c, 0x35, 0x56, 0x14, 0x54, 0xb, 0x27, 0x3, 0x9f, 0x45, 0xe5, 0x18, 0x4d, 0xce, 0x4c, 0x1, 0xf1, 0xce, 0x6a, 0xdf, 0xfc, 0xfd, 0x35, 0xf3, 0xcf, 0xf6, 0x82, 0xb5, 0x14, 0x8b, 0xfd, 0xd3, 0x90, 0x26, 0x24, 0x4, 0x62, 0x18, 0xe5, 0xe8, 0x43, 0x99, 0xe1, 0xf9, 0xf8, 0xf3, 0xdb, 0x5a, 0xcb, 0xb2, 0xe5, 0xf6, 0x1c, 0xe5, 0x12, 0x23, 0xff, 0xaa, 0x86, 0x7d, 0x80, 0xbf, 0x9, 0xa7, 0xfa, 0xb7, 0xe2, 0x21, 0xa5, 0xb6, 0x90, 0xe7, 0x4d, 0x1, 0xc4, 0x68, 0x26, 0x9e, 0xe7, 0x1d, 0xf6, 0x9f, 0xa2, 0xf0, 0x56, 0x25, 0x12, 0x9c, 0x9c, 0xeb, 0xa4, 0x12, 0x52, 0x8, 0xa9, 0xdd, 0x8, 0xfd, 0x68, 0xd6, 0x18, 0xc6, 0x87, 0xa4, 0x3e, 0xa5, 0xac, 0x1e, 0x6f, 0xb2, 0x5, 0x7, 0xdc, 0xe2, 0x96, 0x99, 0x51, 0x1c, 0x2f, 0xd7, 0xb5, 0x65, 0x30, 0x7e, 0xdc, 0x53, 0xd7, 0x7c, 0xd6, 0xed, 0xea, 0x24, 0xa0, 0x14, 0x20, 0x65, 0x9c, 0xa9, 0x71, 0x2d, 0x8a, 0x76, 0xa8, 0xb1, 0xa, 0xc, 0xd7, 0x4c, 0xd1, 0x44, 0xb0, 0x63, 0xb1, 0xc3, 0x14, 0xa0, 0xe9, 0x65, 0x83, 0x9e, 0x29, 0xc, 0x7f, 0x17, 0x7e, 0x51, 0xb4, 0x1c, 0xb9, 0x2b, 0xfb, 0xca, 0xbf, 0xc6, 0x26, 0x59, 0x1, 0xcd, 0x42, 0x2b, 0xa1, 0x82, 0xa2, 0x18, 0xae, 0x32, 0x9d, 0x3a, 0x50, 0xef, 0xa1, 0x56, 0x26, 0xd6, 0x6d, 0xf2, 0xf0, 0x5a, 0xd2, 0xa9, 0xc0, 0xc6, 0xb9, 0xf1, 0xe4, 0x45, 0xe9, 0xb0, 0xb5, 0x2d, 0x37, 0xd6, 0xf3, 0xf5, 0x18, 0x65, 0xe, 0x17, 0x92, 0x7, 0x1b, 0x6e, 0x7f, 0xd9, 0xe1, 0xec, 0x4b, 0x90, 0x49, 0x33, 0x2b, 0x62, 0x53, 0x60, 0x36, 0x83, 0xb4, 0x32, 0x61, 0x20, 0xd9, 0xa9, 0x78, 0xe8, 0xeb, 0xa2, 0xac, 0x3b, 0x84, 0xc5, 0x6c, 0x2b, 0x32, 0x2d, 0x61, 0xbc, 0x69, 0x3e, 0x3e, 0x1d, 0x15, 0x1e, 0xd4, 0x8b, 0x9b, 0xd2, 0xb2, 0x55, 0xc3, 0xc9, 0xc6, 0x0, 0xbb, 0xdd, 0xaf, 0x72, 0x8e, 0x7e, 0x74, 0xb, 0x40, 0xbd, 0x56, 0x47, 0x98, 0xf7, 0xbe, 0x87, 0xd7, 0x4e, 0xc0, 0x64, 0x7b, 0xa3, 0xfa, 0x9, 0x4b, 0x62, 0x55, 0xdb, 0x44, 0x96, 0xc0, 0xc6, 0xff, 0x7b, 0xc0, 0x80, 0xf4, 0x69, 0xe6, 0xb4, 0x88, 0x4d, 0x99, 0x8a, 0x40, 0x0, 0x9, 0xb, 0x93, 0xaa, 0x18, 0xb8, 0x72, 0x22, 0xe4, 0x1a, 0xe8, 0xe1, 0xb9, 0x63, 0x49, 0xb2, 0xef, 0x2a, 0x4c, 0xa1, 0xd3, 0x4c, 0x59, 0x73, 0xb3, 0x83, 0xc, 0x89, 0x4e, 0xd, 0xa0, 0x76, 0x81, 0x9e, 0xce, 0x77, 0x4e, 0xa2, 0x46, 0x35, 0xc2, 0x81, 0x27, 0x36, 0x14, 0x8d, 0x69, 0x42, 0xb, 0xd3, 0x11, 0x2c, 0xd3, 0x8f, 0x45, 0x10, 0x3, 0x2, 0xad, 0x4c, 0xe4, 0x1e, 0x93, 0x2c, 0x44, 0x7a, 0xb2, 0x5b, 0x79, 0xa1, 0xf5, 0xbd, 0xf8, 0x6b, 0x11, 0xbb, 0x52, 0x9, 0x81, 0x2, 0x35, 0x97, 0x98, 0xe8, 0x91, 0xd3, 0x93, 0x96, 0x30, 0x22, 0x3f, 0x97, 0x3b, 0x90, 0x4d, 0x74, 0x2, 0xc6, 0x1e, 0x34, 0x1f, 0x64, 0x2f, 0x9c, 0x81, 0x23, 0xe4, 0x72, 0xb7, 0x14, 0x38, 0x75, 0x56, 0x4f, 0x87, 0x20, 0x9e, 0x94, 0xaf, 0x82, 0x0, 0x81, 0x0, 0x92, 0xbe, 0x1f, 0xe1, 0x68, 0xb, 0x49, 0x88, 0x99, 0x95, 0xc7, 0xe5, 0x3c, 0x60, 0xaf, 0x9d, 0x4a, 0xae, 0x25, 0x8c, 0xad, 0x2a, 0xaa, 0xad, 0x1b, 0x2c, 0x8, 0x85, 0xd5, 0xbd, 0xc6, 0xa0, 0x5c, 0x23, 0xae, 0xc3, 0x3a, 0x58, 0xc0, 0x85, 0x54, 0x28, 0xc3, 0xf7, 0x2c, 0xf1, 0x9d, 0x53, 0xdf, 0x5b, 0xca, 0xb8, 0x70, 0x2b, 0x11, 0x69, 0xd0, 0xd3, 0xf9, 0x20, 0xf1, 0x1a, 0x1d, 0x52, 0x84, 0xcf, 0x6f, 0x9b, 0x21, 0x56, 0x68, 0xd8, 0xaa, 0xd8, 0xbb, 0xea, 0xca, 0x19, 0xcd, 0x28, 0xa2, 0xee, 0xd4, 0x78, 0x8d, 0x75, 0x34, 0x5, 0xea, 0xac, 0x40, 0xac, 0x97, 0x79, 0xe, 0xd7, 0x6f, 0x24, 0x65, 0x1d, 0xa, 0x30, 0xce, 0x10, 0xb, 0x83, 0x94, 0x3a, 0xd1, 0x38, 0xd8, 0x8c, 0x9e, 0x96, 0x64, 0x8c, 0x30, 0x61, 0x38, 0x4c, 0xb0, 0xff, 0x87, 0xa3, 0x31, 0xc3, 0x26, 0xdc, 0x90, 0x27, 0xe1, 0x3e, 0xcb, 0x70, 0x31, 0x99, 0x47, 0xb3, 0x45, 0x97, 0x9c, 0x0, 0x1c, 0xc4, 0x48, 0x23, 0xa5, 0x92, 0x71, 0x98, 0x26, 0x5d, 0xd2, 0x1, 0x8c, 0x18, 0xbd, 0x8d, 0x16, 0x4b, 0x93, 0x62, 0x29, 0xd6, 0x9d, 0xec, 0x5d, 0xfd, 0x65, 0x6c, 0x74, 0x64, 0x85, 0x32, 0xe5, 0x5, 0xca, 0x8c, 0xeb, 0xf8, 0x78, 0xd, 0x8c, 0x4e, 0x10, 0x79, 0x45, 0x40, 0x3d, 0xa3, 0xd3, 0xf2, 0x72, 0x2e, 0x1b, 0xec, 0x6a, 0x6c, 0x47, 0x32, 0x71, 0x74, 0x86, 0x99, 0x9b, 0x57, 0x16, 0x9b, 0xfd, 0x62, 0x7c, 0x25, 0x5c, 0xbb, 0x1d, 0x67, 0xac, 0x5b, 0x5c, 0xf0, 0x31, 0x6e, 0xdc, 0xe1, 0xc1, 0x31, 0x8e, 0xa3, 0x5a, 0x53, 0xb2, 0x8c, 0x6f, 0xb6, 0x17, 0x28, 0xf0, 0xc4, 0x7e, 0x6, 0x79, 0x36, 0x94, 0x57, 0x2a, 0xa, 0xa1, 0xb5, 0xb1, 0x56, 0x18, 0x10, 0xbc, 0x99, 0xe9, 0x65, 0x4e, 0x2f, 0xe1, 0x72, 0x5e, 0xf2, 0xf, 0x8d, 0x1f, 0x9c, 0xc, 0xb7, 0x4b, 0x2, 0x5e, 0xc7, 0x62, 0x7a, 0x18, 0xfc, 0xb2, 0xc4, 0x24, 0x17, 0x93, 0x72, 0x7f, 0x12, 0x21, 0x83, 0xe5, 0x61, 0x3f, 0x20, 0xeb, 0x3c, 0x7a, 0xe3, 0x71, 0xf, 0xf7, 0xb8, 0xda, 0x1b, 0xfd, 0x52, 0x72, 0xc, 0xc2, 0x4, 0xa1, 0xd7, 0x96, 0xbd, 0x40, 0x99, 0x6a, 0x74, 0xe7, 0x7b, 0xb2, 0x34, 0xd3, 0xec, 0xc3, 0xd6, 0x62, 0x7c, 0x69, 0x81, 0xa4, 0x5e, 0xb1, 0x8f, 0x3, 0xab, 0x5b, 0x70, 0xe9, 0xe3, 0x30, 0x59, 0xfa, 0xaa, 0x61, 0x84, 0x1e, 0x8a, 0x3b, 0x24, 0x94, 0x32, 0x8c, 0x96, 0x5b, 0xc4, 0x6d, 0x5b, 0x3a, 0xff, 0x6, 0xc2, 0x69, 0xf0, 0xc7, 0xe0, 0x66, 0xe3, 0xe7, 0xa, 0x5d, 0x42, 0x79, 0x21, 0x65, 0x11, 0xa7, 0x8f, 0x2f, 0x68, 0xfe, 0x7b, 0x7d, 0x95, 0xc8, 0xb8, 0x18, 0x8a, 0x4c, 0xa1, 0xdd, 0xe, 0xb1, 0x64, 0x2f, 0xf4, 0xdc, 0x25, 0xa5, 0xca, 0xb, 0x40, 0x7d, 0x4e, 0x87, 0x28, 0x49, 0x25, 0x47, 0x31, 0x53, 0xb4, 0xe4, 0xab, 0x1e, 0x97, 0xbd, 0x14, 0xc7, 0x4b, 0xb5, 0x2d, 0x7, 0xdb, 0x40, 0x9c, 0xc1, 0x1e, 0x1f, 0xc0, 0x7d, 0xc7, 0x97, 0x21, 0x26, 0xcb, 0xd8, 0x19, 0xad, 0xc8, 0x36, 0x2, 0x22, 0xb4, 0x89, 0x3e, 0x2d, 0xd6, 0xdc, 0x63, 0x5, 0xd4, 0xcb, 0x0, 0x2, 0x92, 0x8f, 0x45, 0xc7, 0xf7, 0x76, 0x63, 0x16, 0x75, 0xc6, 0x74, 0x76, 0x72, 0xff, 0xb3, 0x5a, 0x86, 0x16, 0xc2, 0x4c, 0xbb, 0xc, 0x7, 0x9c, 0x1d, 0x20, 0x1f, 0xbd, 0x2, 0xf9, 0x34, 0x13, 0x8e, 0x1a, 0xdf, 0xa8, 0x2d, 0x50, 0x6c, 0x88, 0x30, 0x60, 0xb4, 0x63, 0xa, 0xb8, 0x38, 0xae, 0x8b, 0xb1, 0x36, 0x8, 0x11, 0xae, 0x8c, 0xa3, 0xaf, 0x4, 0x7e, 0x24, 0x7c, 0x2, 0x63, 0x0, 0x2, 0x5b, 0xe2, 0x14, 0xa3, 0x92, 0xeb, 0x5, 0x38, 0x2c, 0xd5, 0xee, 0x86, 0x65, 0x53, 0xb7, 0xb3, 0xa8, 0x19, 0xd9, 0xda, 0x3b, 0x3, 0xb4, 0x12, 0x58, 0xaf, 0x30, 0x8, 0xcb, 0x7d, 0xf0, 0x6a, 0x32, 0x55, 0x46, 0x67, 0x7b, 0x95, 0x4d, 0xd8, 0x3, 0x1f, 0x2b, 0x23, 0x91, 0xf7, 0xb8, 0xe9, 0xb0, 0xda, 0x93, 0x7a, 0x7a, 0x47, 0xe4, 0x3a, 0xf3, 0x4b, 0xda, 0xb, 0xe6, 0xd4, 0x52, 0x8b, 0xae, 0x57, 0xbf, 0xf8, 0x9b, 0x1b, 0x74, 0x39, 0x12, 0xaa, 0xfd, 0x7a, 0x16, 0x9a, 0x16, 0x29, 0xc2, 0x85, 0xbb, 0x0, 0x63, 0x31, 0x1, 0xef, 0xb6, 0xe2, 0xc7, 0x17, 0x30, 0x5f, 0x57, 0xfa, 0x99, 0x67, 0xd1, 0x74, 0x27, 0x5c, 0xc6, 0x3, 0xeb, 0x12, 0x29, 0x41, 0xe0, 0x4, 0x7b, 0x75, 0xe7, 0xa9, 0x2c, 0x38, 0x1d, 0x18, 0x54, 0x9e, 0x22, 0x2c, 0x4e, 0x30, 0x87, 0xde, 0x67, 0x8, 0x98, 0xd7, 0x89, 0x21, 0x5a, 0xbe, 0xf3, 0x3c, 0xe7, 0xb, 0x2c, 0x2e, 0xb7, 0x2e, 0xd5, 0x16, 0x54, 0xd1, 0xfe, 0x3f, 0xff, 0x93, 0xf8, 0x13, 0xdd, 0xd8, 0x66, 0x82, 0xa6, 0x4a, 0xb7, 0x95, 0xd1, 0x94, 0x59, 0xae, 0xd7, 0xe0, 0xba, 0xf9, 0xb9, 0xc0, 0x1c, 0xe5, 0x22, 0xe7, 0x18, 0x75, 0x5a, 0x23, 0x26, 0x4d, 0x67, 0x48, 0xb5, 0xe7, 0x47, 0x5e, 0x1d, 0xf, 0xde, 0x8d, 0x98, 0x28, 0xac, 0xd5, 0x74, 0x76, 0xfa, 0xe1, 0x19, 0x19, 0x5f, 0xab, 0xa7, 0x68, 0xa1, 0xac, 0x66, 0xbd, 0x3b, 0xa, 0xf3, 0xaf, 0x80, 0xe1, 0x4b, 0xa8, 0x6b, 0xe0, 0x75, 0xc7, 0x85, 0x3, 0x24, 0x55, 0x31, 0x14, 0xce, 0xa9, 0x89, 0x0, 0x89, 0xdc, 0x97, 0x3, 0x21, 0xc, 0x82, 0x4a, 0xbf, 0xe3, 0xf6, 0x56, 0x59, 0x5e, 0xcd, 0xf0, 0xa9, 0xe9, 0xe5, 0x9c, 0x2e, 0xf5, 0x8b, 0xe8, 0x26, 0xa5, 0xf1, 0x35, 0xf3, 0x94, 0x2c, 0x63, 0xa6, 0xd3, 0xeb, 0x40, 0xb3, 0x9c, 0x8e, 0x23, 0x4e, 0x8e, 0x23, 0x71, 0xae, 0x94, 0xbf, 0x17, 0xe3, 0x78, 0xd4, 0xe9, 0xde, 0x4f, 0xbe, 0xa5, 0x79, 0x5, 0x2d, 0x8e, 0xd, 0xc1, 0xbd, 0xb0, 0xdc, 0xe3, 0x19, 0xd4, 0xda, 0xb6, 0xc7, 0xf5, 0x3a, 0x1f, 0xb7, 0x59, 0x3, 0xfd, 0x2c, 0x28, 0x1f, 0x3, 0x3d, 0x98, 0x58, 0x6, 0xe4, 0x76, 0x79, 0x4f, 0x40, 0xdb, 0x73, 0x8b, 0xf7, 0x74, 0x45, 0x4d, 0xf1, 0x14, 0x46, 0x6e, 0x47, 0xbf, 0x57, 0xd9, 0x34, 0x32, 0xdc, 0xfc, 0x3b, 0xfc, 0x9, 0xa5, 0x9c, 0xee, 0xe9, 0x87, 0x71, 0x17, 0x28, 0x7b, 0xb4, 0x8b, 0xbc, 0xd5, 0x6, 0x9e, 0xe3, 0xa2, 0x15, 0x3a, 0x9c, 0x8c, 0xce, 0xf2, 0xd2, 0x78, 0x38, 0x84, 0xc3, 0x99, 0xe5, 0x90, 0x71, 0xf6, 0x98, 0xe1, 0xe8, 0x5d, 0xbe, 0xaa, 0xc2, 0x3, 0x27, 0x18, 0x52, 0xa0, 0x56, 0xd2, 0x87, 0xef, 0x30, 0x84, 0x36, 0x8a, 0xe3, 0x27, 0x33, 0xd7, 0xad, 0xc8, 0xca, 0x4c, 0x1e, 0x73, 0x2f, 0xe4, 0xa0, 0xee, 0x41, 0xb5, 0x3d, 0x2e, 0xd5, 0xc, 0xcc, 0xd, 0x79, 0xe1, 0x27, 0xa5, 0xce, 0x58, 0xbc, 0x48, 0xe, 0x43, 0x2d, 0x8c, 0x85, 0x56, 0x48, 0xbd, 0x44, 0xeb, 0x87, 0xff, 0x98, 0xd5, 0x8e, 0x3e, 0xfc, 0x5e, 0xaa, 0xd3, 0x6b, 0xf8, 0x45, 0x72, 0x35, 0x6, 0x72, 0xf7, 0xfc, 0xf0, 0x7c, 0x47, 0xc2, 0x3a, 0xc9, 0x46, 0x59, 0x31, 0xba, 0xa9, 0x44, 0x31, 0xde, 0x7e, 0xf4, 0x4a, 0xa9, 0x57, 0xeb, 0xca, 0x26, 0x90, 0x6, 0x3f, 0x3e, 0xc9, 0xa9, 0x66, 0xb0, 0x4c, 0x69, 0xb3, 0x41, 0xc9, 0x5, 0x24, 0x82, 0x6d, 0x27, 0x86, 0x9c, 0xc2, 0x30, 0x32, 0x7b, 0x88, 0x3f, 0xe5, 0x29, 0xee, 0xa2, 0x4b, 0xc1, 0x13, 0x34, 0xf0, 0x8c, 0xf8, 0x36, 0x70, 0x5c, 0x3c, 0xc2, 0x2a, 0x46, 0xd, 0x14, 0x2f, 0xf2, 0x1a, 0x29, 0x2b, 0x97, 0x63, 0x48, 0x5, 0xb8, 0x73, 0xa9, 0xd, 0x32, 0xbd, 0xc3, 0x54, 0xd5, 0x74, 0xa0, 0xaf, 0xdb, 0xb6, 0xb0, 0xbc, 0x47, 0x2d, 0x27, 0xfd, 0x91, 0x16, 0xd6, 0xd9, 0x11, 0x74, 0x6b, 0xb1, 0x4, 0xdd, 0x9c, 0x65, 0xa6, 0xa2, 0x77, 0xe4, 0xe6, 0xa, 0x6a, 0x5d, 0x77, 0xb1, 0x91, 0xc9, 0x4, 0xa4, 0xba, 0xbc, 0xed, 0x9c, 0xd7, 0x7f, 0x7a, 0x7b, 0x5c, 0x4b, 0x7b, 0x8c, 0x47, 0x3a, 0x5, 0x1b, 0x5e, 0xff, 0x46, 0xd7, 0x1c, 0x4a, 0xc, 0xe8, 0x1b, 0x87, 0xd4, 0x49, 0xf5, 0x83, 0xe6, 0xbb, 0xfe, 0xae, 0x99, 0x9d, 0x6e, 0xfb, 0xdf, 0xd6, 0xb4, 0xa7, 0xff, 0x70, 0x9d, 0xe3, 0xec, 0xe9, 0x39, 0xcb, 0x5b, 0x12, 0x7d, 0xcb, 0x4d, 0xec, 0x94, 0xec, 0xb1, 0xce, 0xbf, 0xfd, 0xd3, 0xd2, 0x22, 0x37, 0xbe, 0x58, 0x0, 0xc3, 0x71, 0xaf, 0xb5, 0x64, 0x56, 0x88, 0x2a, 0xb3, 0xdd, 0xe8, 0x14, 0xea, 0xfc, 0xd1, 0x3a, 0x39, 0x8c, 0x17, 0x39, 0x17, 0x73, 0x12, 0xf8, 0xf7, 0xdd, 0xef, 0x23, 0x86, 0xe0, 0x84, 0x26, 0x35, 0x5c, 0xa, 0xd2, 0xac, 0x21, 0x11, 0xea, 0xfc, 0x57, 0xa1, 0x6e, 0xa2, 0x38, 0x5d, 0x38, 0xdd, 0xb8, 0x5e, 0x32, 0x82, 0x7b, 0xef, 0x10, 0x53, 0x66, 0x61, 0x7b, 0xf8, 0x58, 0x5a, 0x25, 0xed, 0xdd, 0x66, 0x3, 0x7b, 0x8f, 0x1b, 0x67, 0xc3, 0x91, 0x1c, 0xe1, 0x5, 0x2b, 0x22, 0x55, 0xb4, 0x4f, 0x15, 0x7e, 0x3e, 0x73, 0xf8, 0x45, 0xb3, 0xf1, 0x79, 0xef, 0x54, 0xc, 0xec, 0xc3, 0xe, 0x41, 0x73, 0x1b, 0x2, 0xa9, 0xbb, 0x3c, 0xe6, 0xf3, 0x90, 0xd2, 0x73, 0xef, 0x30, 0x11, 0xc9, 0x22, 0x7d, 0x27, 0x43, 0x37, 0x67, 0xd, 0x2c, 0xe9, 0x6, 0x29, 0x63, 0x9e, 0x62, 0xa5, 0x17, 0x1c, 0xf2, 0x6d, 0x30, 0xda, 0xed, 0x75, 0xef, 0x9a, 0x2, 0x66, 0x36, 0x27, 0xc1, 0x42, 0xf9, 0xb8, 0x4c, 0x9f, 0xb5, 0xce, 0xcb, 0xe0, 0x70, 0xb4, 0x85, 0x4e, 0x6e, 0x40, 0x6b, 0xfc, 0x93, 0x7c, 0x8a, 0x6b, 0x44, 0xe7, 0xef, 0x5f, 0x56, 0xcb, 0xbe, 0x6d, 0x57, 0xfd, 0x5d, 0x5c, 0x15, 0x4, 0xd7, 0x7a, 0x2a, 0x14, 0xd8, 0x44, 0xaa, 0x14, 0xea, 0x52, 0xad, 0x88, 0x86, 0x0, 0xfd, 0x7d, 0xda, 0x4f, 0x81, 0x97, 0x16, 0x96, 0x33, 0x69, 0xe8, 0x39, 0xb8, 0x47, 0xe9, 0x5c, 0xa7, 0xd8, 0x9f, 0xbf, 0xbf, 0x11, 0x77, 0x89, 0x3, 0xa8, 0x84, 0xed, 0xe8, 0xfc, 0xd1, 0xe0, 0xd, 0x80, 0xf9, 0xbb, 0x24, 0x1e, 0x8e, 0x6c, 0xdd, 0xdf, 0x7, 0xa2, 0xdf, 0xcb, 0xb5, 0xca, 0x70, 0x28, 0xa3, 0x39, 0x99, 0x97, 0x4, 0xd1, 0x29, 0x3, 0x51, 0x8f, 0xd3, 0x38, 0x98, 0xad, 0x3, 0x84, 0xd6, 0x7d, 0x22, 0xcc, 0x63, 0x52, 0x2a, 0xe6, 0x4d, 0x57, 0xfe, 0x19, 0xcd, 0xb, 0x77, 0x8b, 0x56, 0xfb, 0x53, 0x1c, 0x0, 0xb9, 0xf9, 0x15, 0xc5, 0x86, 0xa0, 0xdc, 0xa0, 0x70, 0xea, 0xac, 0x22, 0xe8, 0x4f, 0xf4, 0xdc, 0x71, 0x89, 0x15, 0xae, 0xb3, 0x7a, 0x30, 0x5b, 0xe0, 0x2d, 0xa, 0xf2, 0xf4, 0x10, 0x84, 0x13, 0xff, 0xd5, 0xdf, 0x74, 0xea, 0x1b, 0xb5, 0xa, 0x6f, 0x7b, 0x17, 0x2e, 0xae, 0x5, 0x31, 0x38, 0x4f, 0x6b, 0x11, 0x69, 0x3d, 0x9a, 0xd6, 0x58, 0x8c, 0x4f, 0xfa, 0x1c, 0x13, 0x1a, 0xf8, 0xbc, 0xc3, 0x9f, 0xb4, 0x9d, 0x3, 0xc8, 0x50, 0xeb, 0x45, 0xc3, 0x60, 0xf9, 0x94, 0x1d, 0x27, 0xc4, 0xce, 0xeb, 0xf4, 0xd5, 0x4d, 0xc7, 0x5f, 0x40, 0xe3, 0x92, 0x6, 0x13, 0xc3, 0x72, 0x97, 0x8d, 0xb8, 0xf9, 0xf5, 0x0, 0x5a, 0x63, 0x4e, 0x22, 0xce, 0x15, 0xcd, 0x95, 0xf3, 0xeb, 0x73, 0xcb, 0x35, 0x85, 0x4f, 0xb5, 0xfa, 0x9e, 0xaf, 0xd, 0x86, 0x74, 0x93, 0x4d, 0x2e, 0x44, 0xac, 0xe7, 0x4f, 0x47, 0x3b, 0x1b, 0xf1, 0xda, 0xea, 0x7c, 0xbb, 0x91, 0xff, 0xb, 0x75, 0x24, 0xb5, 0x1f, 0xcb, 0x51, 0xd7, 0x6a, 0x21, 0x38, 0x2d, 0x1e, 0x68, 0xdc, 0x6c, 0xca, 0xa3, 0x24, 0x32, 0x26, 0x6a, 0x60, 0xec, 0x5a, 0x15, 0xf1, 0x54, 0xf3, 0x90, 0xf1, 0x7f, 0x2a, 0x32, 0xf2, 0x2e, 0xc3, 0x7f, 0x95, 0x46, 0xb0, 0x66, 0xe5, 0x31, 0x44, 0x28, 0xf1, 0x6, 0x5e, 0xe2, 0x4f, 0xa7, 0x4e, 0x7c, 0x10, 0x4b, 0x88, 0x9, 0x91, 0x12, 0x4d, 0x5f, 0x9c, 0x2c, 0x43, 0x1c, 0x20, 0x49, 0x7c, 0xb4, 0x4, 0xf0, 0x46, 0x62, 0xf5, 0x83, 0xd9, 0xe5, 0x45, 0xc0, 0x8e, 0x10, 0x71, 0x7d, 0x4a, 0x3, 0x31, 0xed, 0xfa, 0x1, 0x89, 0x33, 0xc7, 0x22, 0x0, 0x66, 0x7b, 0xee, 0xf4, 0xa3, 0x4, 0x2e, 0x34, 0xcb, 0x81, 0x77, 0x7c, 0x20, 0x17, 0x1f, 0x13, 0x34, 0xec, 0x18, 0x63, 0xf5, 0xa7, 0x7e, 0xbc, 0x55, 0xaa, 0x6, 0xe4, 0xed, 0xd8, 0x37, 0xc2, 0xfe, 0x5, 0x7f, 0x8d, 0xa8, 0x7d, 0xff, 0xbf, 0x61, 0x7, 0x38, 0x65, 0x73, 0x34, 0x6a, 0x17, 0xbd, 0xc3, 0xfb, 0xd8, 0x73, 0xae, 0x7c, 0xbd, 0x3e, 0x78, 0x57, 0x9c, 0xe3, 0x8, 0xbb, 0x6c, 0xbe, 0x6d, 0xee, 0xc7, 0xa2, 0x4c, 0x5c, 0x7d, 0xe6, 0x4c, 0x2c, 0x85, 0x77, 0x87, 0xa2, 0x2b, 0xb7, 0xa9, 0xe6, 0x98, 0xe9, 0xa6, 0xbc, 0xe8, 0x54, 0xd3, 0xbe, 0x63, 0xea, 0xcb, 0xe4, 0xe1, 0xf, 0x1b, 0x17, 0x5, 0xcb, 0xda, 0xdb, 0xa7, 0xda, 0x8c, 0x20, 0x37, 0xa0, 0x43, 0x8a, 0x6f, 0xa5, 0x4e, 0x3, 0x25, 0x47, 0x47, 0x4e, 0xe8, 0xa2, 0x83, 0x86, 0xb4, 0xf0, 0xf6, 0x38, 0x39, 0x6e, 0xf7, 0x12, 0x5e, 0x77, 0xcd, 0xb7, 0x60, 0x46, 0x5a, 0xe, 0x19, 0x6f, 0x1e, 0x44, 0xcf, 0x77, 0x6e, 0xcf, 0xff, 0xff, 0x94, 0xda, 0x9d, 0x45, 0xa6, 0xc2, 0xa7, 0x74, 0x70, 0x34, 0xff, 0x61, 0x10, 0xf8, 0xc8, 0x18, 0xa0, 0xb4, 0xdd, 0x74, 0x68, 0xd5, 0x23, 0x7b, 0x6d, 0xc5, 0xc5, 0x9b, 0x24, 0x3, 0xfb, 0xb, 0xf2, 0xcd, 0xe5, 0x53, 0xe0, 0xe7, 0x20, 0x3a, 0xd2, 0xe0, 0x8a, 0xc4, 0x47, 0xbd, 0x36, 0xcc, 0x42, 0x59, 0xd4, 0x4, 0x5, 0x8d, 0x49, 0x9f, 0x7d, 0x51, 0xbb, 0xf7, 0xd8, 0xa1, 0x8f, 0xc5, 0x98, 0xa9, 0xf3, 0x22, 0x15, 0x4d, 0xb7, 0xa4, 0x6, 0xfc, 0x67, 0xc6, 0x5b, 0x60, 0xad, 0x2f, 0x9e, 0x4a, 0xef, 0x5a, 0x20, 0xca, 0x1a, 0x98, 0x82, 0x92, 0x23, 0x5d, 0x9e, 0x37, 0xf2, 0xcc, 0x6c, 0xaa, 0x46, 0x6, 0x31, 0x24, 0xe4, 0xed, 0xef, 0x6f, 0x6d, 0xb0, 0x29, 0x46, 0x37, 0xe0, 0xf5, 0xc2, 0x44, 0x43, 0xfd, 0x9e, 0x8f, 0x14, 0xd0, 0x4d, 0x44, 0xe6, 0xa0, 0xf8, 0x9d, 0x39, 0x3, 0x34, 0x10, 0x29, 0x90, 0x99, 0x1d, 0xad, 0xe0, 0x76, 0x7, 0xf4, 0xf, 0xec, 0xcf, 0x1, 0xa, 0xfb, 0xd7, 0x32, 0xda, 0x1d, 0x70, 0x30, 0x5e, 0x61, 0xa5, 0xc3, 0x6a, 0xb8, 0x61, 0x3b, 0xb2, 0x75, 0x24, 0xcb, 0x64, 0xb8, 0x76, 0x6f, 0x47, 0xe1, 0xc5, 0xd4, 0x2f, 0x17, 0x78, 0xfa, 0x2, 0xed, 0x13, 0xc2, 0x75, 0xb1, 0x29, 0x6, 0xfa, 0x1d, 0x6f, 0xfc, 0xc1, 0x14, 0x31, 0xc, 0xde, 0x81, 0x9d, 0x3b, 0x42, 0x84, 0x81, 0xaf, 0x47, 0x39, 0xe9, 0x62, 0xe3, 0xa2, 0xd9, 0xd, 0x86, 0x4d, 0x43, 0x19, 0xdc, 0x67, 0xf4, 0xbd, 0xda, 0xc7, 0x64, 0x48, 0xb6, 0x7f, 0xb4, 0x39, 0x79, 0x3b, 0x68, 0xb7, 0x9c, 0x1d, 0xea, 0xa6, 0xde, 0xf0, 0x4a, 0x44, 0xad, 0x66, 0xf2, 0x59, 0x6c, 0xbb, 0x3a, 0x9b, 0x54, 0x60, 0xdd, 0xf0, 0x52, 0x35, 0xd5}, - output224: []byte{0xe0, 0x1a, 0x40, 0xef, 0xa7, 0x8d, 0xe5, 0xbb, 0x50, 0x5, 0x13, 0xcc, 0x1a, 0xd7, 0x73, 0x26, 0xc9, 0x50, 0xd9, 0x91, 0xc0, 0x70, 0x6a, 0xc6, 0x67, 0x58, 0xef, 0xa1}, - output256: []byte{0x7, 0x12, 0x8f, 0x94, 0x52, 0xcf, 0x60, 0x1e, 0x2a, 0x30, 0x5a, 0xb7, 0x5c, 0xdd, 0x13, 0x1, 0x7b, 0xbf, 0x79, 0xb0, 0xae, 0x3b, 0x5b, 0x43, 0xc2, 0xce, 0x7, 0x71, 0xb0, 0x4f, 0x57, 0x19}, - output384: []byte{0x92, 0xb0, 0xef, 0xc8, 0x24, 0x8e, 0x8c, 0x6a, 0x96, 0x46, 0xdf, 0x49, 0xb8, 0x75, 0x99, 0x21, 0xbe, 0xa6, 0xf4, 0x4, 0x2e, 0x1b, 0xdd, 0x1c, 0x12, 0x8c, 0x42, 0x1e, 0x6c, 0xa6, 0xfe, 0xb4, 0xb7, 0x85, 0xcd, 0x8a, 0xe0, 0xa4, 0x8a, 0xd1, 0x8a, 0x1d, 0x5, 0xa6, 0x5d, 0xbd, 0xe2, 0x81}, - output512: []byte{0x46, 0x19, 0x3d, 0x20, 0x10, 0x98, 0x71, 0x2e, 0x16, 0xfa, 0x95, 0x7d, 0x9b, 0x9f, 0x95, 0x40, 0xcf, 0xb, 0x53, 0xb6, 0xa1, 0xe0, 0xbd, 0x5e, 0xfe, 0x6b, 0x6d, 0xbb, 0x40, 0x18, 0x16, 0xfc, 0x5a, 0x78, 0xb8, 0xf7, 0x6, 0xc6, 0xfb, 0x57, 0x9d, 0xe4, 0x5b, 0x7e, 0x33, 0xb3, 0xf9, 0xbc, 0xae, 0x1, 0xf4, 0x56, 0xc9, 0xc, 0x76, 0x2f, 0x36, 0xfa, 0x62, 0x4b, 0x75, 0x85, 0x83, 0x84}}, - testcase{ - msg: []byte{0x86, 0xa9, 0xe1, 0xce, 0x8c, 0x1f, 0x20, 0x45, 0x86, 0x83, 0xca, 0xd7, 0x2c, 0xba, 0x1a, 0x63, 0x78, 0x9e, 0x61, 0xf8, 0xcb, 0xd6, 0xa5, 0x43, 0x43, 0x6, 0x4d, 0x72, 0x49, 0x5a, 0x8c, 0x68, 0x6a, 0x7, 0x3a, 0x81, 0x9d, 0xab, 0x85, 0x82, 0xa2, 0x9e, 0xd7, 0x5b, 0x32, 0x7f, 0x2, 0xe0, 0x1, 0xf6, 0x4b, 0xf5, 0x4d, 0x4c, 0x7a, 0x42, 0xdf, 0x21, 0xb, 0x5f, 0xd2, 0xe2, 0x25, 0x60, 0x72, 0x89, 0xdd, 0xb6, 0x7d, 0x0, 0x24, 0x92, 0xec, 0xb, 0x27, 0x73, 0xe8, 0x60, 0x97, 0xe6, 0x31, 0x70, 0x9a, 0xd7, 0x77, 0xe9, 0xa1, 0x2b, 0x14, 0xe6, 0xfb, 0xb, 0x27, 0xd7, 0xa6, 0xb0, 0x72, 0xa0, 0xcf, 0x10, 0x71, 0x36, 0x5d, 0x4, 0xe7, 0x64, 0x84, 0x70, 0xb6, 0xbe, 0x0, 0xd5, 0x88, 0xd9, 0x37, 0x8c, 0x8e, 0x1a, 0xf2, 0xf3, 0x17, 0x68, 0xc5, 0x6d, 0xaa, 0xc4, 0x28, 0x2b, 0xb3, 0x91, 0x19, 0x69, 0xb3, 0x81, 0x37, 0x1c, 0xa4, 0x6b, 0x62, 0xf3, 0xeb, 0x1f, 0x50, 0xdf, 0x99, 0x53, 0x5c, 0x0, 0xff, 0x52, 0x3d, 0x78, 0x1b, 0x25, 0x19, 0xe1, 0xbc, 0xfe, 0x43, 0x9, 0xae, 0x56, 0x8b, 0x1a, 0xb9, 0x22, 0x93, 0xfb, 0xce, 0xdc, 0xae, 0x52, 0xb1, 0xbd, 0x6c, 0x60, 0x5b, 0xd3, 0x5e, 0xf6, 0x33, 0xa, 0x61, 0xad, 0xfd, 0x5c, 0xeb, 0xe6, 0x2b, 0x78, 0xdf, 0x1c, 0x95, 0x16, 0x8e, 0x41, 0x26, 0xb, 0x52, 0xb, 0x76, 0xc4, 0xc, 0xb7, 0x67, 0xce, 0x84, 0x48, 0x37, 0xcc, 0x48, 0x6e, 0x66, 0xa6, 0xd6, 0x89, 0x26, 0x32, 0xb8, 0x7a, 0xfd, 0x27, 0xa, 0x96, 0x53, 0x52, 0xee, 0xe8, 0xa8, 0xd2, 0x34, 0xc5, 0x66, 0xbf, 0x78, 0xb5, 0x39, 0xd, 0x94, 0x9, 0x48, 0xf3, 0xdc, 0xe2, 0xe9, 0x73, 0xd6, 0x86, 0x56, 0x97, 0x79, 0x39, 0xa7, 0x87, 0x91, 0x69, 0x22, 0xcc, 0xd9, 0x49, 0xbd, 0x41, 0xa0, 0x64, 0xb, 0xd4, 0x4a, 0x33, 0xcd, 0x77, 0x20, 0x40, 0x40, 0x7b, 0xaa, 0x11, 0xd9, 0x5a, 0x6f, 0x2e, 0xf1, 0x8e, 0x9f, 0x29, 0x74, 0xf1, 0x3, 0x9c, 0x63, 0xc1, 0x4f, 0xff, 0x47, 0x6d, 0x97, 0x6c, 0xe5, 0x7c, 0xae, 0x6f, 0x2a, 0xca, 0x2, 0x18, 0xae, 0xd3, 0x85, 0xb6, 0xd9, 0x12, 0x62, 0x97, 0x7d, 0x23, 0xe5, 0xa0, 0xac, 0x9f, 0xff, 0xbd, 0xa8, 0x7c, 0x54, 0xc8, 0x95, 0x90, 0x24, 0x65, 0xba, 0xc9, 0xc5, 0xc6, 0xbb, 0x3e, 0x10, 0xa2, 0x76, 0xc3, 0xaa, 0x7e, 0xf9, 0x2, 0xb2, 0xff, 0xeb, 0xff, 0xb0, 0x14, 0xa7, 0x7f, 0x65, 0x38, 0x3a, 0x27, 0x7b, 0x10, 0xd1, 0xea, 0x73, 0x6b, 0x6d, 0x8b, 0x84, 0x54, 0x8, 0x25, 0x10, 0x46, 0xa1, 0xc5, 0x54, 0x8f, 0x71, 0x8e, 0x94, 0x8e, 0x29, 0xb, 0xc9, 0x4c, 0x86, 0xa0, 0x5e, 0x3, 0xd, 0x7c, 0x1, 0x83, 0xcd, 0x2b, 0xd3, 0xf3, 0x16, 0x6c, 0x8d, 0xf6, 0x48, 0xfc, 0xc3, 0x76, 0x4a, 0xb9, 0xc2, 0x7e, 0x77, 0xf0, 0x6b, 0xa7, 0x2d, 0xe8, 0x7c, 0x79, 0xcf, 0x7f, 0x8d, 0x6e, 0x83, 0xa8, 0xd5, 0xce, 0x62, 0x87, 0xd2, 0xb1, 0x7b, 0x9e, 0x7d, 0x90, 0xb2, 0x5b, 0x9e, 0x75, 0x7b, 0xec, 0xa7, 0x23, 0x68, 0xf9, 0x90, 0x9d, 0x89, 0x35, 0x17, 0x95, 0x24, 0xc1, 0x36, 0xb0, 0xea, 0x32, 0x40, 0xd4, 0x10, 0x82, 0x65, 0x55, 0x89, 0x44, 0xd8, 0xe7, 0x77, 0x1, 0xca, 0x4f, 0x18, 0x7b, 0xcb, 0x48, 0x70, 0x8f, 0x4c, 0x1, 0x5c, 0xbd, 0xb8, 0x1d, 0xdb, 0x9, 0xcc, 0x6a, 0xfa, 0x46, 0xf4, 0x73, 0x4f, 0x78, 0x53, 0xb1, 0x40, 0x94, 0x13, 0xad, 0xa5, 0xd5, 0x58, 0x44, 0x94, 0x3, 0x4f, 0x5b, 0x45, 0x17, 0xfa, 0x7d, 0xe3, 0xdf, 0xc0, 0x75, 0x31, 0xcb, 0x6f, 0xd2, 0x13, 0xa6, 0x87, 0x4c, 0x21, 0x28, 0x5, 0xdf, 0xc, 0x8d, 0xae, 0x74, 0x96, 0x9e, 0x54, 0xcd, 0x9a, 0xc4, 0xae, 0x77, 0x8a, 0xba, 0x8c, 0xa5, 0x26, 0x19, 0xe3, 0x79, 0xea, 0x17, 0xfd, 0x10, 0x95, 0x72, 0xf2, 0xdd, 0x38, 0xc0, 0x31, 0xcd, 0xf5, 0x8d, 0xe8, 0xf0, 0xe, 0x1e, 0x5f, 0xa2, 0xf1, 0xcf, 0x2e, 0xa3, 0x94, 0x42, 0x11, 0x6f, 0xd9, 0xd, 0xff, 0x3d, 0xbc, 0x92, 0xcb, 0x52, 0xaf, 0xae, 0x95, 0xeb, 0x17, 0x53, 0x5d, 0x48, 0x41, 0x59, 0x98, 0xf1, 0x23, 0x5f, 0xd9, 0x66, 0x49, 0x9f, 0xad, 0xdc, 0x41, 0x35, 0xb2, 0x69, 0xf6, 0xdb, 0x55, 0xe3, 0x92, 0xc0, 0xd0, 0xb5, 0xe, 0x2a, 0x94, 0xd5, 0x3b, 0x13, 0xf2, 0x20, 0x56, 0x77, 0x29, 0x69, 0x8f, 0x4a, 0x64, 0x65, 0xef, 0xce, 0x13, 0x8a, 0x5d, 0xb3, 0xae, 0xca, 0x6e, 0xa2, 0xda, 0x5a, 0x43, 0x11, 0x70, 0x6b, 0xb8, 0xe3, 0xac, 0x2f, 0xef, 0x19, 0xce, 0xe7, 0x58, 0x77, 0x15, 0x18, 0x98, 0xbe, 0xcc, 0xf7, 0x5b, 0x5, 0x55, 0x34, 0x7e, 0x52, 0xc5, 0x71, 0xb8, 0xc0, 0x0, 0x1a, 0xcc, 0x8, 0xc3, 0xbf, 0xe6, 0x4f, 0xd4, 0x55, 0x62, 0x8d, 0xc7, 0xb8, 0xbf, 0xe3, 0x8, 0x73, 0x76, 0x3, 0x6, 0xc5, 0x48, 0xac, 0xea, 0xb, 0x7e, 0x8c, 0x61, 0x24, 0x6, 0x5a, 0x16, 0xb0, 0x4a, 0xc5, 0x9, 0x98, 0xbf, 0xa5, 0x7f, 0xa1, 0xf5, 0x95, 0xdf, 0x82, 0x72, 0xa0, 0xcf, 0x7d, 0x4c, 0xb4, 0x1, 0x97, 0x7f, 0x4, 0x8d, 0x95, 0x30, 0xe5, 0xa1, 0xe5, 0xca, 0xdb, 0xcd, 0xb0, 0xa3, 0xd5, 0x24, 0xb6, 0xce, 0xb7, 0xd1, 0x6b, 0x5d, 0x62, 0x72, 0x5a, 0xa0, 0x83, 0xb5, 0x5b, 0xa5, 0x95, 0xb4, 0x6d, 0x68, 0x31, 0xe, 0xdf, 0x2d, 0xa3, 0xd6, 0xe0, 0xd5, 0xd, 0x87, 0x41, 0x4e, 0x64, 0x21, 0xc6, 0xc3, 0x1f, 0x51, 0xfa, 0x56, 0xbf, 0x9b, 0x46, 0xed, 0x52, 0x16, 0x54, 0x9e, 0x2a, 0x2e, 0x9, 0x0, 0xeb, 0x21, 0x94, 0xfd, 0x41, 0x3a, 0x40, 0xe5, 0xbd, 0xe5, 0x2a, 0x85, 0x6, 0x3a, 0xa1, 0x1e, 0x51, 0x73, 0x9f, 0x73, 0x25, 0xe1, 0x9, 0xe1, 0x68, 0x82, 0xb9, 0xb8, 0xe0, 0xe2, 0xdf, 0x4, 0x72, 0x7f, 0xb3, 0xea, 0x6c, 0x66, 0xe4, 0x15, 0xf2, 0xfa, 0xeb, 0x65, 0xcb, 0x2, 0xdb, 0x10, 0x1d, 0x97, 0xb4, 0x79, 0x32, 0xfc, 0xde, 0x8f, 0x12, 0x10, 0x51, 0x36, 0x3f, 0xfc, 0x17, 0xde, 0xba, 0xaf, 0x55, 0x7d, 0xe6, 0x31, 0x4e, 0x8b, 0xae, 0xed, 0xa9, 0xd7, 0x9c, 0xf7, 0xcb, 0x61, 0x2b, 0xa8, 0x7c, 0x7a, 0x29, 0x10, 0xa7, 0x2b, 0xa2, 0xe, 0xdf, 0x2f, 0x69, 0x27, 0xcd, 0xd6, 0xd6, 0x79, 0x2b, 0x1c, 0x79, 0x73, 0xa6, 0x4, 0xb7, 0xee, 0x96, 0x73, 0xea, 0xcf, 0xa9, 0xc0, 0x14, 0xfb, 0xd0, 0x88, 0xf3, 0x70, 0x6c, 0xd7, 0x62, 0x72, 0x71, 0x69, 0xbb, 0xae, 0xd0, 0x92, 0xd8, 0xc, 0x75, 0xb4, 0x7c, 0xff, 0xf0, 0xc6, 0xaf, 0xfd, 0x8b, 0x78, 0x83, 0xd8, 0xa8, 0xe1, 0xfe, 0x97, 0xff, 0x1f, 0xf6, 0xe6, 0xf3, 0x9c, 0xb4, 0x7d, 0x87, 0x6b, 0xba, 0xce, 0x34, 0x5e, 0x20, 0x59, 0x0, 0xec, 0xa0, 0xf6, 0xa1, 0x93, 0xc1, 0x15, 0x7, 0x48, 0xc2, 0xc5, 0xee, 0x97, 0xea, 0x88, 0x20, 0xb8, 0x46, 0xac, 0x7a, 0xf9, 0x6, 0x34, 0xaa, 0x62, 0xcb, 0x6e, 0x9b, 0xa3, 0x9c, 0x5d, 0x94, 0x43, 0x4e, 0x9d, 0xa3, 0xa5, 0x66, 0xca, 0x2a, 0x8, 0x99, 0x27, 0xaa, 0x9a, 0xc9, 0xa5, 0xe1, 0x3f, 0x2c, 0xab, 0x62, 0x4f, 0x2a, 0x72, 0x77, 0xca, 0x41, 0x5f, 0xb3, 0xcf, 0x19, 0xca, 0xdc, 0xaf, 0xe6, 0xfc, 0x58, 0x6e, 0x4, 0x39, 0xbf, 0xb1, 0x20, 0x58, 0x9c, 0x29, 0x1, 0x2c, 0x87, 0x3d, 0x5e, 0xd7, 0x51, 0xe3, 0x77, 0x27, 0xf8, 0x67, 0xd0, 0xfd, 0x4e, 0x2d, 0xfe, 0x3b, 0x3c, 0xd5, 0x39, 0x95, 0xa0, 0xf4, 0x26, 0x9a, 0x3d, 0xb4, 0x7, 0xf5, 0xac, 0xe9, 0xfc, 0xe4, 0x99, 0x98, 0x31, 0x35, 0xfe, 0x2e, 0xbc, 0x48, 0xcd, 0x7e, 0x70, 0x86, 0x80, 0x44, 0x4a, 0xfb, 0xbe, 0x55, 0x83, 0x8c, 0x92, 0xd2, 0x3b, 0xef, 0x7, 0x13, 0xa9, 0xfa, 0x38, 0x17, 0x89, 0xe7, 0x60, 0xfc, 0x64, 0xab, 0xa8, 0x45, 0x48, 0x46, 0x1f, 0x62, 0xdc, 0xf9, 0x33, 0x0, 0xbf, 0x8e, 0x1f, 0xd, 0xe9, 0xb1, 0xe2, 0xfb, 0x54, 0xf3, 0x72, 0x2e, 0x7, 0x48, 0x80, 0x27, 0x4, 0x53, 0x2a, 0x15, 0x63, 0x67, 0x98, 0x46, 0x4, 0xb6, 0x4e, 0xb4, 0x0, 0x55, 0x9e, 0x90, 0x7c, 0x1a, 0x2f, 0xf2, 0x7d, 0x3d, 0x91, 0xc5, 0x23, 0xaf, 0xb0, 0xab, 0xcc, 0xc7, 0x57, 0x5d, 0xe3, 0xc, 0x1a, 0xab, 0xcc, 0x4d, 0xa, 0xe4, 0x25, 0x9f, 0xa, 0xca, 0xc4, 0xb2, 0xed, 0xa7, 0x98, 0x97, 0xe, 0x4e, 0xe9, 0x9c, 0x39, 0xc0, 0x9e, 0x85, 0xac, 0x28, 0x1e, 0xfe, 0x13, 0x6b, 0x83, 0x5e, 0xca, 0x8f, 0xd7, 0x9, 0xd9, 0x3c, 0x13, 0x8e, 0x2c, 0x32, 0xe3, 0xd7, 0x44, 0x44, 0xaf, 0xc, 0xf0, 0x14, 0x6f, 0xa8, 0xe9, 0xc, 0x25, 0x86, 0x9e, 0xdb, 0x12, 0xed, 0x7f, 0xb8, 0x7c, 0xf1, 0x70, 0xb6, 0x5f, 0x20, 0x34, 0x31, 0xf6, 0xc7, 0x4c, 0x98, 0x2f, 0xcf, 0xdd, 0x6a, 0x7, 0x9e, 0x14, 0x87, 0xf1, 0xa8, 0xf2, 0xf1, 0xb2, 0x90, 0x25, 0x64, 0x3, 0x1a, 0x1e, 0xce, 0xfa, 0x43, 0x5b, 0x6e, 0x6a, 0x6f, 0x61, 0xbb, 0x1a, 0x8b, 0x6a, 0xc5, 0x5d, 0x6e, 0x7c, 0x87, 0x9, 0x29, 0x1f, 0x1d, 0xbf, 0x62, 0x7e, 0xa1, 0x56, 0x5f, 0x1b, 0x83, 0x4c, 0x37, 0x65, 0xce, 0x94, 0xa3, 0xa0, 0xe0, 0x12, 0xdb, 0xe7, 0xd7, 0x1, 0x46, 0xad, 0xa1, 0xc7, 0x4b, 0x8, 0xf2, 0x1c, 0x38, 0xf0, 0x5c, 0x5, 0x14, 0x9e, 0xb0, 0xe7, 0xa6, 0xcf, 0xe7, 0xc1, 0x6a, 0x19, 0x9, 0xcc, 0x3b, 0x57, 0x96, 0x76, 0x80, 0x36, 0x81, 0x31, 0x42, 0xce, 0xa6, 0x2c, 0xc4, 0x96, 0x34, 0xe0, 0x7c, 0xa2, 0xfb, 0x27, 0x47, 0x60, 0x19, 0xd3, 0xf5, 0xd3, 0x26, 0x70, 0xad, 0x88, 0x91, 0x95, 0x79, 0xb9, 0x1f, 0x79, 0x12, 0x64, 0x15, 0x89, 0x6b, 0xfe, 0x30, 0xe1, 0x6b, 0x82, 0x28, 0x9d, 0x8b, 0xc7, 0x75, 0xb5, 0xd1, 0xca, 0xbf, 0x9e, 0xc2, 0x8c, 0x4c, 0xec, 0x19, 0xe6, 0xeb, 0xc9, 0x1e, 0x40, 0x97, 0x6e, 0xd3, 0xc7, 0x9b, 0x2, 0xdb, 0xb2, 0x57, 0x45, 0x8b, 0x84, 0xcd, 0x25, 0x6c, 0xfc, 0x55, 0x9e, 0x5b, 0xe5, 0xb9, 0xee, 0x9a, 0xe2, 0x42, 0x70, 0xe1, 0x4, 0x48, 0xd4, 0x97, 0x92, 0x3a, 0x71, 0xfe, 0x42, 0x8f, 0x13, 0xfd, 0x1d, 0x9f, 0xbb, 0x49, 0xf5, 0x8e, 0xc6, 0x2c, 0x5b, 0xdd, 0xfb, 0xd3, 0x42, 0x76, 0x87, 0x2b, 0xb3, 0xe7, 0xd5, 0x5f, 0xdd, 0x16, 0x68, 0xf8, 0x85, 0x6c, 0xd0, 0x4b, 0x4f, 0x61, 0x6b, 0x7b, 0x21, 0xe2, 0xb4, 0xec, 0xa9, 0xf7, 0x27, 0x90, 0x3d, 0x93, 0x5a, 0x80, 0x75, 0xff, 0xa7, 0xf3, 0x88, 0xdf, 0x6a, 0x89, 0xf5, 0xee, 0xda, 0x1d, 0xe4, 0x6e, 0x26, 0x27, 0x5e, 0xf5, 0xe5, 0xcb, 0xb6, 0xa, 0xa, 0x74, 0x5a, 0x38, 0x58, 0x6f, 0xcb, 0x5b, 0xbd, 0x48, 0x31, 0x2e, 0x6a, 0x66, 0x55, 0x58, 0xcd, 0xf3, 0x15, 0x96, 0x9c, 0x27, 0x78, 0xf2, 0x70, 0xca, 0x2a, 0x23, 0x20, 0xab, 0x4b, 0x99, 0x8, 0xa, 0x0, 0x8c, 0x56, 0xe0, 0x5d, 0x7b, 0xaa, 0x9e, 0x82, 0xfa, 0x53, 0xb0, 0x46, 0x3d, 0x74, 0xce, 0x40, 0x9b, 0xec, 0xaa, 0xdf, 0xbe, 0x45, 0xa3, 0x66, 0x59, 0x45, 0xba, 0xc2, 0x18, 0x8d, 0x96, 0x7, 0xde, 0xf5, 0x54, 0x6b, 0xb8, 0x95, 0xe5, 0xea, 0x89, 0xea, 0x1e, 0xf, 0x77, 0xec, 0x53, 0x39, 0x29, 0xa7, 0xdb, 0x48, 0x41, 0xe, 0xab, 0xbd, 0xb3, 0x46, 0xa3, 0x9, 0xbe, 0x64, 0xdf, 0xd2, 0x7, 0xdd, 0x20, 0x70, 0x23, 0x41, 0xf1, 0x81, 0x9f, 0xaa, 0xf9, 0x38, 0x92, 0x3e, 0x44, 0xb0, 0x41, 0xf1, 0x12, 0x76, 0x79, 0x54, 0x9e, 0x3b, 0xbc, 0xcc, 0x5f, 0x8f, 0x6e, 0xc7, 0x13, 0x19, 0x52, 0x52, 0x21, 0x66, 0xb5, 0x35, 0x24, 0x20, 0xcb, 0x21, 0xc, 0x9, 0xc2, 0x3, 0x57, 0xcc, 0xaa, 0xb7, 0x9, 0x62, 0x8a, 0x92, 0xf5, 0x7c, 0x92, 0xa2, 0x1c, 0x1c, 0x9a, 0x7a, 0x7f, 0x4f, 0x83, 0xce, 0x87, 0xc6, 0x3, 0x33, 0x5, 0x81, 0x4a, 0xcc, 0x81, 0x1, 0x1, 0x37, 0x60, 0xac, 0x25, 0xdd, 0x61, 0x14, 0x8a, 0xd6, 0x3f, 0x8b, 0x96, 0xf1, 0xd6, 0x29, 0xee, 0x5f, 0x42, 0xa0, 0x9e, 0xc4, 0x13, 0x59, 0x3f, 0xa0, 0x3b, 0x60, 0xe3, 0xba, 0x22, 0x42, 0x34, 0x13, 0x32, 0xc, 0x67, 0x4a, 0x8e, 0xcb, 0x1a, 0xfe, 0xe2, 0xd6, 0xa7, 0xb0, 0x35, 0x5e, 0xb8, 0x91, 0x57, 0x9, 0xc1, 0xd4, 0xa0, 0xb4, 0x27, 0x41, 0xe2, 0x95, 0x89, 0x88, 0xec, 0xdc, 0x18, 0xab, 0xe8, 0x9a, 0xc5, 0x55, 0x54, 0x3b, 0xb9, 0xae, 0xbc, 0x35, 0x24, 0x33, 0x97, 0xf9, 0xa3, 0xf7, 0xa5, 0x3b, 0xaf, 0xfe, 0xe6, 0xba, 0xdc, 0x82, 0xd8, 0xa5, 0xd5, 0x8f, 0x20, 0x85, 0x62, 0x19, 0xf2, 0x8d, 0x56, 0x95, 0xee, 0x59, 0xbc, 0xf1, 0x4d, 0xdf, 0xd5, 0xb7, 0x3, 0xd9, 0x3f, 0x37, 0x1c, 0xb6, 0x8, 0xfe, 0x1, 0xd, 0xc9, 0x66, 0x88, 0x6, 0xb, 0x59, 0xc1, 0x85, 0xb0, 0x43, 0xdd, 0x84, 0x40, 0x55, 0x8b, 0xf6, 0x97, 0x5f, 0xa7, 0xb7, 0x93, 0x33, 0x50, 0xfd, 0x69, 0xd7, 0xf, 0x9c, 0x9c, 0x1b, 0x89, 0x67, 0x5f, 0x4b, 0x8, 0xcc, 0xb7, 0xcc, 0xf6, 0x7c, 0xa4, 0x57, 0xab, 0x33, 0x8f, 0x74, 0x4a, 0xd9, 0xd5, 0x95, 0x8e, 0x8e, 0xf5, 0x1f, 0x32, 0x3, 0xf8, 0xd7, 0xe, 0x5, 0xc2, 0x8, 0xa3, 0x10, 0xad, 0x2e, 0xd9, 0x89, 0x8b, 0x16, 0x1, 0xec, 0x3b, 0xf5, 0x69, 0x3b, 0x2, 0xa, 0xbd, 0x7f, 0xe2, 0xb5, 0x1, 0x99, 0x1, 0xb1, 0x1d, 0x74, 0x7, 0xf1, 0x31, 0x82, 0x31, 0x1c, 0xb4, 0xe7, 0xe2, 0x36, 0x85, 0x42, 0x10, 0x6e, 0x3, 0xb5, 0xb3, 0xb8, 0x64, 0xa4, 0x26, 0x49, 0x48, 0x59, 0x15, 0xb2, 0x58, 0x4c, 0x62, 0xfe, 0xae, 0x5, 0xc0, 0x47, 0xb1, 0xea, 0xd2, 0x30, 0x32, 0x45, 0xc3, 0x45, 0xd, 0x7e, 0x87, 0x2b, 0xf3, 0xd3, 0xa6, 0x5d, 0x9e, 0x6a, 0xc6, 0xdd, 0x62, 0x3d, 0x53, 0xf8, 0x79, 0x0, 0xa, 0x35, 0x56, 0xd4, 0x67, 0x60, 0xd0, 0x54, 0x8a, 0x55, 0x2b, 0x83, 0xad, 0xc9, 0x17, 0xec, 0x86, 0x17, 0xe9, 0x53, 0xf4, 0xd8, 0x40, 0x64, 0xe3, 0xa4, 0x8a, 0x79, 0x52, 0x91, 0x24, 0xe, 0xce, 0x56, 0xdb, 0xed, 0xad, 0x22, 0xd0, 0x5c, 0x78, 0x75, 0x2a, 0xcd, 0xd3, 0xb5, 0x85, 0x4f, 0xe5, 0x9c, 0x21, 0x7e, 0xfa, 0x6f, 0x53, 0x8d, 0x15, 0xee, 0x1a, 0x78, 0xb5, 0xc4, 0x79, 0x1b, 0x6, 0x5, 0x7e, 0x59, 0x3b, 0x3b, 0xb7, 0x54, 0xaa, 0xad, 0xc0, 0x8d, 0x71, 0xf7, 0x91, 0x3a, 0x22, 0x2, 0xd5, 0x3c, 0x8b, 0xd1, 0xd8, 0x3b, 0x21, 0x42, 0xde, 0x9b, 0x70, 0xab, 0xfc, 0x4, 0x36, 0x31, 0x2c, 0x1c, 0x59, 0x19, 0x3f, 0x63, 0xe2, 0xd2, 0x9, 0xf1, 0xd5, 0xf1, 0xf8, 0x1f, 0xb4, 0xe8, 0xfb, 0x13, 0x4f, 0x65, 0x68, 0x87, 0xa7, 0x1f, 0x68, 0xc0, 0x73, 0x23, 0xfc, 0x53, 0x4c, 0xf6, 0xac, 0xce, 0x14, 0x4c, 0x4f, 0x7c, 0x7c, 0x41, 0x81, 0x8b, 0x18, 0xe7, 0x6e, 0x15, 0xc1, 0xc0, 0x25, 0x8e, 0x5b, 0xc6, 0x38, 0x87, 0xdc, 0xea, 0x5f, 0x99, 0x73, 0x8b, 0xe8, 0x5c, 0xb1, 0xf4, 0xc9, 0xfd, 0xf1, 0xfa, 0xeb, 0xc5, 0x34, 0xae, 0x8a, 0x28, 0x5c, 0x80, 0xf1, 0x3b, 0x2e, 0x20, 0x8c, 0x5f, 0xe4, 0xaf, 0xba, 0xf5, 0xf6, 0xc3, 0x8e, 0xcc, 0xcb, 0xc8, 0xb1, 0xe9, 0xaf, 0xda, 0xda, 0x59, 0x12, 0x47, 0xba, 0x7, 0xf1, 0x6b, 0xa9, 0xe4, 0xe3, 0x6f, 0x94, 0xe, 0x56, 0x98, 0x34, 0xf1, 0xf8, 0xc, 0xbc, 0xa9, 0xce, 0x8e, 0x3e, 0xdd, 0x4c, 0xaf, 0x4d, 0x32, 0xd3, 0x7e, 0xf4, 0x52, 0x64, 0x86, 0x4b, 0x36, 0xa2, 0x9e, 0x17, 0x29, 0xb2, 0xab, 0x9a, 0xed, 0xc, 0x45, 0xb, 0x45, 0xf9, 0xd6, 0x0, 0xe7, 0x73, 0xda, 0x9d, 0x6c, 0x5f, 0x78, 0x0, 0x55, 0x30, 0x6e, 0xaa, 0x6d, 0x19, 0xe7, 0xaa, 0xaf, 0xa8, 0xf4, 0x14, 0x28, 0x24, 0x73, 0x60, 0xfe, 0x13, 0xbd, 0xd8, 0x73, 0xbb, 0xc7, 0x49, 0xdc, 0xb5, 0x9, 0xb0, 0x2a, 0x76, 0xe7, 0x9e, 0x2f, 0x2e, 0x52, 0x8e, 0x4f, 0x38, 0x1b, 0x7b, 0xb3, 0xae, 0x24, 0xb2, 0x6f, 0xa3, 0x2a, 0x21, 0xd7, 0x72, 0x3e, 0xcb, 0x98, 0x53, 0xc1, 0xb6, 0x6, 0xa5, 0x4f, 0x14, 0xb8, 0x81, 0xba, 0xb0, 0xc, 0x22, 0x31, 0xc7, 0x70, 0x44, 0x86, 0x56, 0x15, 0x1f, 0x7e, 0xd9, 0xe4, 0x79, 0x56, 0x0, 0x12, 0x2c, 0x2f, 0xc4, 0x59, 0xc8, 0x72, 0xcf, 0x53, 0xe8, 0xe, 0x42, 0x41, 0x22, 0x8, 0x82, 0x5, 0x47, 0x8, 0xca, 0x33, 0xb2, 0xf3, 0xb4, 0xf2, 0x1f, 0xa3, 0x84, 0x88, 0x4c, 0x81, 0x5, 0x12, 0xab, 0x5e, 0xea, 0x4b, 0x66, 0x12, 0xd3, 0xe4, 0xde, 0xf6, 0x4, 0xd, 0x9e, 0x5f, 0x36, 0x3, 0xe6, 0xea, 0xc7, 0x3c, 0x73, 0xcb, 0x79, 0xcd, 0x54, 0x4, 0x35, 0xad, 0xa4, 0xa5, 0xd9, 0xb8, 0x2d, 0xf4, 0x54, 0x5b, 0x69, 0xee, 0xf, 0x48, 0x40, 0xd2, 0x95, 0x4e, 0x2, 0x3b, 0x48, 0xda, 0x4, 0x44, 0x56, 0x4f, 0xa3, 0xff, 0x42, 0x59, 0xb7, 0xd8, 0xa2, 0xf, 0xcb, 0x66, 0x24, 0x1c, 0x6f, 0x6, 0x41, 0x26, 0x69, 0xce, 0xfb, 0x3c, 0x8b, 0x9e, 0x9e, 0xa, 0x83, 0xe9, 0xca, 0xa, 0xc7, 0x44, 0xec, 0x7a, 0x26, 0xd8, 0x96, 0xcd, 0x43, 0xe9, 0x94, 0x58, 0x82, 0x78, 0xa5, 0x6d, 0xd5, 0x82, 0x7e, 0x25, 0x39, 0xb5, 0x5f, 0x8d, 0xd9, 0xf1, 0x21, 0x72, 0x55, 0x27, 0xb0, 0x76, 0x23, 0xd4, 0x87, 0x6a, 0xde, 0xde, 0xcb, 0xfe, 0xb, 0x4b, 0xd4, 0x15, 0x10, 0xbd, 0x30, 0xe3, 0xaa, 0xb2, 0x53, 0x9, 0x88, 0x44, 0xc6, 0xa, 0xb, 0x59, 0x8e, 0x69, 0xdb, 0x2e, 0x1c, 0xdd, 0xd7, 0x7a, 0x96, 0x4d, 0xb8, 0x43, 0x37, 0x56, 0xb5, 0xf9, 0x54, 0x45, 0x3a, 0x2a, 0xe8, 0x62, 0xf, 0xab, 0xe6, 0x73, 0x7b, 0x61, 0x5d, 0xc4, 0x0, 0x6d, 0x3, 0x32, 0x7d, 0xf0, 0x4e, 0x65, 0xc8, 0xe8, 0x9, 0x46, 0xd9, 0xfe, 0x5a, 0xe5, 0xff, 0x38, 0xa5, 0x82, 0x32, 0xee, 0xeb, 0xe8, 0x57, 0x97, 0xa0, 0xd3, 0x32, 0xb5, 0x5b, 0x21, 0x77, 0xb, 0x10, 0x1, 0x53, 0x79, 0xa9, 0xa5, 0x29, 0x44, 0x4, 0xf4, 0xd3, 0x56, 0xee, 0xee, 0xa4, 0x7c, 0x12, 0x9e, 0x40, 0xb6, 0x1, 0x4c, 0x19, 0xf8, 0x4c, 0xc1, 0xb9, 0x6e, 0x34, 0x45, 0x93, 0x5a, 0xed, 0x67, 0xab, 0x3a, 0x1a, 0xa5, 0x3d, 0xba, 0x57, 0xa, 0xa0, 0xf2, 0x9b, 0xa1, 0x9b, 0x2a, 0xe1, 0xa6, 0xc4, 0x8e, 0x34, 0x5f, 0x39, 0xa1, 0xe1, 0xa2, 0x8b, 0x2b, 0xf6, 0x37, 0x72, 0x3e, 0xb7, 0x8, 0xd9, 0x89, 0xeb, 0x25, 0xde, 0xcd, 0xea, 0x9e, 0xca, 0xe0, 0xb2, 0xb2, 0xd9, 0x3f, 0xdd, 0xcc, 0x68, 0x37, 0x7e, 0xa3, 0xfc, 0xd2, 0xa9, 0x38, 0x6b, 0xc, 0xec, 0x68, 0x93, 0xbc, 0x3a, 0x57, 0x86, 0x7b, 0x2e, 0x48, 0x20, 0x1a, 0x6c, 0x1, 0x9a, 0xde, 0xfd, 0xf, 0x5, 0x55, 0x3b, 0x5, 0x54, 0xb9, 0x38, 0xd7, 0x44, 0x87, 0x2d, 0x6, 0x1f, 0xac, 0x64, 0x9a, 0x68, 0xd8, 0x34, 0xca, 0x52, 0xa4, 0x75, 0x2a, 0xb4, 0xb3, 0x64, 0x71, 0xc5, 0xd4, 0xc6, 0x57, 0x54, 0x86, 0x8c, 0x3, 0x1f, 0xc3, 0x5d, 0x80, 0x50, 0xe5, 0xe, 0x80, 0x39, 0x60, 0xf8, 0x17, 0x5f, 0xf0, 0xba, 0xcc, 0x8, 0x64, 0x4b, 0x51, 0xd3, 0x16, 0xdc, 0xfd, 0x99, 0x82, 0xd0, 0x76, 0xa6, 0xa2, 0xcb, 0xad, 0xf7, 0x0, 0x61, 0x67, 0xfa, 0xbc, 0x77, 0x53, 0x8, 0x4b, 0x7f, 0x75, 0xc1, 0x38, 0xb0, 0x59, 0xf1, 0x45, 0xa6, 0x68, 0xc5, 0x99, 0x57, 0x63, 0x7b, 0xb8, 0xf7, 0xab, 0xef, 0xb8, 0x92, 0x2d, 0x50, 0x9f, 0xef, 0xbc, 0xdd, 0x35, 0x7f, 0x15, 0xed, 0xf1, 0xf6, 0x2b, 0xb1, 0x6b, 0x94, 0xb6, 0xa1, 0xe7, 0xb4, 0xe3, 0x53, 0x25, 0x6d, 0xbe, 0x17, 0xb2, 0xa4, 0x66, 0xe6, 0xc4, 0xad, 0x72, 0xd2, 0x5a, 0x17, 0x7a, 0xc3, 0x33, 0xbe, 0x50, 0x5d, 0xb8, 0xba, 0xfd, 0x92, 0x44, 0xb5, 0x6, 0x8b, 0xa7, 0xd4, 0xdd, 0x28, 0x3e, 0xe0, 0x84, 0x59, 0xbd, 0x47, 0xb2, 0x27, 0x6f, 0x3c, 0x25, 0xda, 0xc5, 0xd7, 0x0, 0x1e, 0xbd, 0xe, 0x88, 0x92, 0xbe, 0xf4, 0xf0, 0xf1, 0x72, 0x72, 0xdb, 0xc7, 0xd, 0x15, 0xb6, 0x26, 0xe3, 0x64, 0x3e, 0x16, 0x64, 0xcb, 0x7b, 0xcb, 0x5c, 0xb6, 0x52, 0x1c, 0xc, 0xc8, 0xe2, 0xe0, 0x83, 0x57, 0xff, 0xc3, 0xa3, 0x29, 0xc7, 0x2d, 0xff, 0x9b, 0x4f, 0x0, 0x9, 0xa3, 0x1, 0x19, 0x31, 0xa1, 0x63, 0x0, 0x20, 0xad, 0x83, 0xdf, 0x6a, 0x80, 0x3d, 0xc1, 0x1d, 0xed, 0xa4, 0x48, 0x26, 0x2, 0x6, 0x47, 0x5f, 0xd7, 0xb2, 0xd0, 0xc4, 0xae, 0x80, 0x57, 0xee, 0x93, 0x58, 0xac, 0x8e, 0xfe, 0xfe, 0xad, 0xd2, 0x83, 0x5d, 0xe0, 0xee, 0x6d, 0x8f, 0x5a, 0x25, 0x93, 0xb7, 0xea, 0xb, 0xd5, 0xf8, 0xa7, 0xfb, 0xd, 0x0, 0x3e, 0x5c, 0x17, 0x5e, 0x40, 0x80, 0xef, 0x77, 0xfc, 0xef, 0xe8, 0xc3, 0x4f, 0xd0, 0x9a, 0xc0, 0xc5, 0x62, 0x1e, 0x3, 0x4b, 0xa4, 0x75, 0xde, 0x9d, 0xde, 0x49, 0xd2, 0xd8, 0xd, 0xde, 0x83, 0x6e, 0x6a, 0x75, 0xe9, 0xb2, 0x57, 0xe4, 0x63, 0x73, 0xac, 0x2c, 0xd1, 0xc8, 0x1f, 0x88, 0x98, 0xcf, 0xe8, 0xb2, 0xda, 0xb0, 0x5d, 0x35, 0xc4, 0x4, 0x47, 0x7c, 0x13, 0x30, 0x34, 0x38, 0xea, 0xdc, 0xd2, 0x50, 0x2e, 0xca, 0xb5, 0x68, 0x9c, 0x3b, 0xb, 0x1, 0xcc, 0x61, 0x28, 0xd2, 0x77, 0x84, 0xbb, 0x28, 0x3e, 0xd8, 0x88, 0x8b, 0x20, 0x41, 0x60, 0x36, 0x1d, 0xae, 0x14, 0xae, 0xc9, 0x7c, 0xbc, 0xd8, 0x1a, 0x9c, 0x1c, 0xdf, 0xb3, 0x72, 0xa5, 0x43, 0xfb, 0xe7, 0xc0, 0x31, 0x46, 0x13, 0xfa, 0x7a, 0x11, 0x49, 0x22, 0x1a, 0x16, 0x9f, 0x58, 0xf2, 0x6c, 0xf, 0x0, 0x86, 0x14, 0x12, 0x92, 0xb1, 0xb, 0x91, 0x24, 0xd9, 0x11, 0x23, 0xd9, 0x50, 0x74, 0xe5, 0x3e, 0xa0, 0x29, 0x80, 0x1e, 0x6b, 0x18, 0x7e, 0x5d, 0x28, 0xd8, 0x3e, 0xc9, 0xa, 0xd5, 0x1c, 0x80, 0xd9, 0xb3, 0x50, 0x81, 0x3c, 0xc0, 0x19, 0xc7, 0xe5, 0xa2, 0xbe, 0x39, 0xbf, 0xce, 0xa0, 0x2b, 0xf0, 0x8b, 0x86, 0x5e, 0x6b, 0x31, 0xc3, 0x2, 0xf4, 0x9, 0x1, 0x66, 0xae, 0x3a, 0x62, 0x4f, 0x19, 0xa2, 0x19, 0xdd, 0x7e, 0x6e, 0xcb, 0xb2, 0x95, 0x78, 0xbc, 0x96, 0xa9, 0x19, 0xe0, 0x4b, 0x65, 0xd, 0x79, 0x4f, 0xd1, 0x7c, 0x81, 0xee, 0x27, 0xae, 0x97, 0x45, 0x59, 0x39, 0x72, 0x7f, 0xfe, 0xcf, 0x7b, 0xf3, 0x67, 0x89, 0xba, 0x34, 0xb0, 0x4e, 0x88, 0x92, 0xfd, 0x22, 0x36, 0xd6, 0x40, 0x2c, 0x80, 0x88, 0x4e, 0xef, 0xc9, 0x38, 0x8d, 0xe1, 0x62, 0x1c, 0x74, 0x6d, 0x66, 0x35, 0x82, 0x30, 0x5b, 0x6a, 0x7b, 0x3e, 0x1d, 0x88, 0x54, 0xaf, 0xd6, 0x33, 0x97, 0x85, 0x76, 0x9d, 0x4a, 0xbe, 0x41, 0x1b, 0x9f, 0x99, 0xa, 0x42, 0xa5, 0xef, 0x9b, 0x43, 0xc8, 0xf5, 0xc4, 0x59, 0xd5, 0x5, 0x59, 0xf6, 0x16, 0x90, 0xd7, 0x81, 0x6d, 0x43, 0xca, 0x9b, 0x15, 0xbf, 0xc4, 0xc5, 0xdd, 0x5a, 0x2f, 0x52, 0x5, 0x27, 0x72, 0x9b, 0xb1, 0x87, 0xc1, 0x4c, 0xb4, 0x94, 0x88, 0x51, 0x42, 0xbc, 0xce, 0x3d, 0x9d, 0x17, 0x37, 0xee, 0x57, 0x51, 0x8a, 0x1c, 0xbb, 0x8e, 0x91, 0x94, 0xdd, 0x9d, 0x27, 0x27, 0x6e, 0x87, 0x5e, 0xde, 0xae, 0xc9, 0x31, 0xb1, 0x22, 0x7b, 0xda, 0x3b, 0xec, 0x2f, 0x7c, 0x3f, 0xf, 0x56, 0x90, 0xc5, 0xde, 0x5e, 0x9d, 0xb8, 0xac, 0xed, 0x68, 0xb0, 0x96, 0x3d, 0x35, 0x53, 0x5e, 0x6f, 0x89, 0x62, 0xff, 0x45, 0x26, 0x4b, 0x1, 0x12, 0xb8, 0x8c, 0x9b, 0xfc, 0x92, 0x12, 0x2, 0x7d, 0xe6, 0x46, 0x8e, 0x86, 0xf1, 0xac, 0x63, 0x2d, 0x4c, 0x8b, 0x26, 0x4a, 0xd1, 0xee, 0xfc, 0xf2, 0xf5, 0x97, 0x1a, 0xcf, 0xea, 0xe6, 0xb8, 0x92, 0x56, 0x17, 0x3, 0x48, 0x14, 0xcb, 0x3c, 0x96, 0x10, 0xe3, 0xb3, 0x42, 0x84, 0xad, 0x38, 0xfa, 0xdd, 0x7, 0xde, 0xf4, 0x91, 0xdd, 0xfd, 0x66, 0xf, 0x4a, 0x54, 0x88, 0xc, 0x6b, 0x71, 0xd9, 0xda, 0xff, 0x18, 0xb5, 0xae, 0x53, 0xa7, 0x27, 0x4a, 0xa6, 0xf6, 0x2c, 0x9a, 0xbc, 0xe4, 0x53, 0x8e, 0x5c, 0xc7, 0x6e, 0x9f, 0xd8, 0xb2, 0x71, 0x77, 0x8f, 0xb8, 0x58, 0x7f, 0x15, 0x4b, 0xfb, 0xe, 0xd9, 0x8e, 0x20, 0xa4, 0xa5, 0xe5, 0x8d, 0x21, 0xc7, 0x20, 0x1e, 0x70, 0xd2, 0x68, 0xa7, 0x44, 0xfb, 0x9d, 0xaa, 0x1a, 0x3d, 0xbe, 0xe5, 0x1, 0xc6, 0x55, 0x2e, 0xe5, 0xeb, 0x7e, 0x98, 0xfb, 0x42, 0x6d, 0xec, 0xb5, 0xdb, 0x87, 0x71, 0xf0, 0xd1, 0xe8, 0x69, 0x2a, 0xb8, 0xfc, 0xa7, 0xb6, 0x2a, 0x5b, 0x14, 0x9, 0x3d, 0xb3, 0xa, 0xc6, 0x85, 0x18, 0xcf, 0x72, 0x8f, 0xa8, 0x75, 0x76, 0x77, 0xb6, 0x7b, 0x95, 0xa7, 0x32, 0xd8, 0x31, 0x7d, 0x47, 0xa6, 0x15, 0xeb, 0x67, 0x72, 0x81, 0x7e, 0x89, 0xaa, 0x52, 0x39, 0x40, 0xb9, 0xb0, 0x8a, 0xa5, 0x3, 0xe7, 0x4a, 0x5d, 0x75, 0x5e, 0x8c, 0x26, 0x74, 0x80, 0xb5, 0x7f, 0x39, 0x8b, 0xac, 0x10, 0xfc, 0x87, 0x17, 0x68, 0x8d, 0x23, 0xa7, 0x37, 0x82, 0x2f, 0x7a, 0x3, 0x1a, 0x3e, 0x2, 0x99, 0x38, 0x96, 0xc5, 0x73, 0x24, 0xb0, 0xc0, 0x49, 0xe0, 0xd0, 0xa3, 0xb6, 0xec, 0x32, 0xbf, 0x78, 0xdc, 0x16, 0xd5, 0x43, 0x6b, 0x10, 0xa3, 0x98, 0x81, 0x12, 0xac, 0x87, 0xae, 0xa1, 0x64, 0xc0, 0x61, 0x2d, 0xac, 0xd8, 0xfa, 0xc6, 0xad, 0xe0, 0x9e, 0xaa, 0x14, 0xb4, 0x43, 0x52, 0x4d, 0xad, 0xc6, 0x96, 0x57, 0xf, 0x8b, 0xb9, 0x21, 0x9f, 0xda, 0x4a, 0xf0, 0x4d, 0xda, 0xbc, 0xc8, 0x3b, 0xec, 0x86, 0xa4, 0xe3, 0x7, 0x88, 0x24, 0x23, 0x37, 0xc1, 0x7d, 0x72, 0x1d, 0xb5, 0xfa, 0x20, 0x88, 0x83, 0xd2, 0xf0, 0xa, 0xf1, 0xd1, 0x59, 0x9c, 0xd5, 0x8d, 0x80, 0xdf, 0xea, 0xce, 0x67, 0xf1, 0x80, 0xea, 0x89, 0x53, 0xf9, 0x2c, 0x16, 0xbd, 0xa7, 0xe6, 0x20, 0x31, 0x2c, 0xf4, 0x59, 0x9b, 0x48, 0x7, 0xa7, 0x5, 0xc5, 0x3, 0x54, 0xd8, 0xdc, 0xdc, 0x2d, 0x4b, 0x51, 0x8c, 0xd6, 0x62, 0x25, 0xbc, 0x9c, 0x90, 0xbd, 0x33, 0x83, 0x16, 0x3b, 0x24, 0xef, 0xf6, 0xde, 0x76, 0x8e, 0xab, 0xd7, 0x7e, 0x6e, 0xbf, 0xa2, 0xc2, 0xed, 0xae, 0xbc, 0xe4, 0x6e, 0x58, 0xed, 0x8b, 0x85, 0x8b, 0x55, 0xed, 0x87, 0xfb, 0x14, 0xe3, 0x48, 0x9b, 0xa1, 0x18, 0x61, 0xed, 0x4, 0x34, 0xd1, 0xc3, 0xc4, 0xd2, 0x9, 0xd, 0x28, 0xbf, 0x72, 0xec, 0xd2, 0x52, 0xdf, 0x9d, 0xc3, 0x4b, 0xdc, 0x41, 0xdd, 0x40, 0x90, 0x49, 0x81, 0x1f, 0xab, 0x93, 0x25, 0x4b, 0x23, 0x95, 0x27, 0x12, 0x44, 0x77, 0x2d, 0xbd, 0xb5, 0x94, 0xe2, 0xda, 0x7, 0x69, 0x6, 0xd0, 0xe0, 0xf8, 0x5a, 0x2, 0x5b, 0x2f, 0xf3, 0xc6, 0xec, 0x10, 0x88, 0xc5, 0xc3, 0x7f, 0x85, 0xb9, 0x2f, 0x6e, 0xe7, 0xdb, 0x41, 0xf7, 0xc8, 0x67, 0xe3, 0x5b, 0x1a, 0xae, 0x99, 0xa4, 0xe6, 0xb6, 0xf, 0x73, 0x4e, 0x1, 0xe5, 0x98, 0xb, 0x60, 0x80, 0x22, 0xef, 0x24, 0x39, 0xd5, 0x82, 0x68, 0x5e, 0x5e, 0x12, 0x32, 0xb2, 0x5c, 0x71, 0xbc, 0xed, 0x4a, 0x91, 0xe3, 0xac, 0xee, 0xd3, 0xe6, 0xa1, 0x48, 0x8d, 0x8b, 0x58, 0x2d, 0x10, 0xb7, 0x97, 0x1e, 0x98, 0x71, 0xe5, 0xac, 0x2e, 0x69, 0x36, 0xef, 0x2d, 0x55, 0x35, 0x3d}, - output224: []byte{0x9b, 0xdb, 0xeb, 0x56, 0xbb, 0xf0, 0x60, 0xfd, 0x4, 0xe8, 0x54, 0xc7, 0x48, 0xa, 0x64, 0x6a, 0xca, 0x77, 0xc8, 0xee, 0x8a, 0x60, 0xae, 0x7, 0xa2, 0xce, 0x6d, 0x7c}, - output256: []byte{0xc6, 0xc2, 0x5c, 0xfb, 0x97, 0xe8, 0x5b, 0x3d, 0x59, 0xc5, 0xf7, 0xce, 0xae, 0xf6, 0xd0, 0x6f, 0xc3, 0x14, 0xc0, 0xb2, 0x3f, 0x37, 0xc3, 0xc0, 0x45, 0x48, 0x90, 0x82, 0x1a, 0x9c, 0xc8, 0x16}, - output384: []byte{0xbd, 0x9c, 0x83, 0xb7, 0x53, 0xe6, 0xce, 0xab, 0x4e, 0x92, 0xdf, 0x62, 0x6f, 0x64, 0x70, 0xf8, 0x81, 0xb5, 0x85, 0xbc, 0xee, 0xd8, 0x95, 0x9e, 0x51, 0x2d, 0x3a, 0x23, 0x8a, 0xc2, 0xd5, 0x81, 0xfe, 0x42, 0x94, 0xbd, 0x8e, 0xf, 0x69, 0xf8, 0x64, 0x72, 0x56, 0xcc, 0x29, 0xa9, 0x39, 0x3f}, - output512: []byte{0xcc, 0xa3, 0x47, 0xe, 0xf3, 0xca, 0xfc, 0x49, 0xc2, 0x3f, 0x74, 0xc8, 0xeb, 0xed, 0x8, 0x12, 0x75, 0x71, 0x3a, 0x8e, 0x5c, 0xea, 0x53, 0xd5, 0x90, 0x83, 0x5, 0x52, 0xe6, 0x69, 0x8f, 0xeb, 0x7f, 0xb9, 0xde, 0x3f, 0x72, 0x81, 0x17, 0x64, 0x68, 0xa1, 0xd6, 0xf3, 0x7d, 0xb7, 0xe4, 0xc1, 0x0, 0x68, 0x3a, 0x1a, 0x51, 0xda, 0x23, 0x3f, 0x90, 0x3b, 0x8, 0x2a, 0xbf, 0x64, 0x8d, 0xaa}}, - testcase{ - msg: []byte{0x16, 0x33, 0x25, 0x6a, 0xb0, 0x3b, 0x20, 0xce, 0x7, 0x91, 0x96, 0xb7, 0x8, 0xa1, 0xc0, 0x2d, 0x1b, 0x60, 0x72, 0x21, 0x90, 0x70, 0x71, 0x2c, 0x85, 0x89, 0xee, 0x21, 0x34, 0x1d, 0x50, 0x75, 0x2a, 0xcb, 0x6c, 0xfd, 0xa1, 0x7e, 0x98, 0x2d, 0x82, 0x8b, 0xbd, 0x6c, 0xdf, 0x54, 0xbc, 0x72, 0x32, 0xfd, 0x41, 0x8a, 0x32, 0x3d, 0x64, 0x93, 0x99, 0x28, 0x59, 0x7b, 0x9b, 0x52, 0xf0, 0x7c, 0xf4, 0x88, 0x25, 0xc, 0x5e, 0x42, 0xbf, 0xd3, 0xab, 0x48, 0x1, 0x2d, 0x70, 0x9f, 0x8d, 0x74, 0x72, 0x25, 0x83, 0x92, 0x96, 0x38, 0x6f, 0xce, 0x5f, 0xc5, 0xae, 0xcc, 0x4b, 0xa7, 0xa1, 0x7, 0x6d, 0x8, 0x9d, 0xea, 0x8e, 0xce, 0xfa, 0xa0, 0xcf, 0x66, 0xfc, 0xa8, 0x60, 0x23, 0x95, 0x71, 0x9c, 0x12, 0xa0, 0x4f, 0x92, 0x93, 0x21, 0x78, 0x4d, 0x7a, 0xb8, 0x23, 0x9f, 0xce, 0x2f, 0xf3, 0xbd, 0xae, 0x4, 0x6a, 0x26, 0x61, 0x32, 0xb5, 0xc2, 0xad, 0x9f, 0x72, 0x61, 0xf3, 0x1, 0x4e, 0x87, 0xb3, 0x89, 0xa6, 0x69, 0x59, 0x78, 0x69, 0x3d, 0x93, 0x71, 0xd0, 0xb1, 0xff, 0x9c, 0x40, 0x5f, 0x33, 0x8c, 0x2f, 0xde, 0x46, 0x87, 0x35, 0x96, 0x3, 0x95, 0xa, 0x54, 0xcf, 0x4b, 0x9c, 0xdd, 0x9b, 0x24, 0x48, 0xb, 0x23, 0x9a, 0xcc, 0x54, 0x5, 0xc1, 0x4c, 0x88, 0x6b, 0xbb, 0x3, 0x78, 0x39, 0x1c, 0xef, 0x6, 0x62, 0xa3, 0x88, 0x82, 0xbd, 0xd0, 0x9e, 0x38, 0x66, 0xab, 0x9a, 0x66, 0xcf, 0xbd, 0x28, 0xeb, 0x5e, 0xe4, 0xf8, 0x0, 0x9b, 0xde, 0xfc, 0x4a, 0xeb, 0x16, 0x70, 0xe, 0xba, 0x7d, 0xc5, 0x57, 0xb4, 0x89, 0x19, 0xa, 0x71, 0xfd, 0xa7, 0x5e, 0x85, 0xf7, 0xef, 0x84, 0x16, 0x97, 0xf7, 0xf, 0xfd, 0x4f, 0xea, 0x18, 0x5e, 0x7a, 0x67, 0xc8, 0x1c, 0x5b, 0x8f, 0x27, 0x3b, 0xfb, 0x97, 0xb2, 0xce, 0xf6, 0x95, 0xc1, 0xc7, 0x44, 0x46, 0xc4, 0xb4, 0x25, 0xbe, 0x6b, 0x2e, 0x66, 0xdc, 0xa, 0xaa, 0xcb, 0x24, 0x7e, 0x44, 0x67, 0xb7, 0xc7, 0xd8, 0x4e, 0xc3, 0x3b, 0x6b, 0x5a, 0xb8, 0xfa, 0x19, 0x79, 0xf5, 0x3, 0x0, 0x8b, 0xdc, 0xff, 0x94, 0x8c, 0xdb, 0xf1, 0x22, 0x6b, 0x1b, 0x6, 0x6c, 0xbc, 0xf3, 0x47, 0x97, 0x29, 0x8f, 0x3b, 0xa8, 0xc6, 0xf, 0xa0, 0x1e, 0xa, 0xc8, 0xb8, 0x3, 0x22, 0x3c, 0x65, 0x61, 0x12, 0xfb, 0x91, 0x43, 0x5d, 0x75, 0x45, 0x3b, 0xae, 0x47, 0x7, 0xb6, 0x33, 0x30, 0x46, 0x7d, 0xd1, 0x3e, 0xa, 0x4b, 0x99, 0x2e, 0x6f, 0x7e, 0x46, 0x99, 0x58, 0x99, 0xa2, 0xd9, 0x5d, 0x23, 0xf4, 0xac, 0x3d, 0x8, 0x2, 0xb2, 0xa6, 0xe7, 0xd0, 0x24, 0xde, 0xa1, 0x9c, 0xa4, 0x8, 0xc4, 0xbb, 0xe0, 0x53, 0xf1, 0x4c, 0x9c, 0xe2, 0x64, 0xf1, 0x29, 0x72, 0x4a, 0x18, 0xbc, 0xb1, 0x8f, 0x38, 0x5b, 0x1c, 0xa0, 0x91, 0xa1, 0x14, 0x34, 0xea, 0x96, 0xd9, 0x8c, 0x8d, 0x6, 0x2, 0xe9, 0x8e, 0xdc, 0x8d, 0xfa, 0x14, 0x14, 0x1a, 0xf9, 0x3e, 0xd0, 0xba, 0x66, 0xe8, 0x85, 0xe9, 0xfa, 0x10, 0x85, 0x91, 0xae, 0x59, 0xe1, 0x9, 0xae, 0x34, 0xd6, 0xb9, 0xf5, 0x58, 0x6e, 0x4b, 0x4d, 0x75, 0xe7, 0xdf, 0x7c, 0x32, 0x95, 0x8a, 0x65, 0xe8, 0x8a, 0x9b, 0xaf, 0x41, 0x8, 0x2a, 0xa, 0x3f, 0x11, 0x53, 0x9d, 0xc4, 0xea, 0x2c, 0xbd, 0x9e, 0x1c, 0x6c, 0x3c, 0x43, 0x9b, 0x62, 0x2f, 0x1d, 0xe5, 0x74, 0xfa, 0x75, 0x47, 0xc, 0x8c, 0x93, 0x9b, 0x51, 0xd2, 0xd1, 0xc2, 0xa7, 0x20, 0x4b, 0x85, 0x98, 0x81, 0xd4, 0x30, 0x86, 0xbf, 0xd8, 0xfb, 0x90, 0x34, 0x62, 0x18, 0xd0, 0x99, 0xc5, 0xab, 0x36, 0x84, 0x6f, 0x3b, 0x98, 0xa7, 0xc8, 0x47, 0x31, 0x8b, 0xdf, 0xa0, 0x1e, 0x9, 0x71, 0x79, 0x43, 0xfc, 0xd8, 0x64, 0xc5, 0xa8, 0xa1, 0x7b, 0x6c, 0xeb, 0x89, 0xd9, 0x8e, 0x87, 0x2d, 0x38, 0x8f, 0x20, 0xad, 0xc2, 0xbe, 0x5e, 0x20, 0x6, 0x84, 0x69, 0x4, 0xf4, 0x16, 0x82, 0xfb, 0x12, 0x83, 0x21, 0x4f, 0x3d, 0x20, 0xdb, 0xc9, 0xfc, 0x9e, 0xf, 0xf5, 0x71, 0x84, 0x4a, 0x12, 0x82, 0xe8, 0x85, 0x90, 0xd7, 0xc0, 0x85, 0xb2, 0xc5, 0x68, 0xec, 0x5a, 0xcc, 0x44, 0x62, 0xb3, 0x89, 0xfe, 0xaa, 0x57, 0x57, 0xf7, 0x3, 0x31, 0x87, 0xe2, 0xde, 0x31, 0x95, 0x5f, 0xce, 0x55, 0xfe, 0xdc, 0x90, 0x92, 0x55, 0x4, 0x8b, 0x32, 0x7c, 0xca, 0xb2, 0xe5, 0x82, 0xbb, 0xc9, 0xd8, 0x5, 0x4b, 0xf5, 0xcb, 0x45, 0x14, 0x5c, 0x7d, 0x3a, 0x3a, 0xf9, 0xcd, 0x5c, 0xf6, 0xec, 0xba, 0x49, 0xc, 0x63, 0x4e, 0xcf, 0x0, 0xe6, 0x46, 0xbf, 0x95, 0xe8, 0x64, 0x2c, 0x43, 0xa4, 0x97, 0x8e, 0xf0, 0x8a, 0x57, 0x4e, 0xf1, 0xf7, 0x8f, 0x6c, 0xe5, 0x7c, 0x3b, 0x34, 0xb5, 0xa1, 0x23, 0xd1, 0x23, 0x61, 0x7f, 0xc8, 0xec, 0x9b, 0x2a, 0xc0, 0xf9, 0xb7, 0xa, 0x7f, 0x60, 0x62, 0xd3, 0x8d, 0xd7, 0xb8, 0xe9, 0xfb, 0x4e, 0xcc, 0xef, 0x13, 0xde, 0xd5, 0xc0, 0x47, 0x74, 0x83, 0xad, 0xda, 0xe4, 0xf1, 0xcc, 0xc, 0xfc, 0xa2, 0x74, 0xb1, 0x30, 0x7e, 0xd0, 0xde, 0x72, 0xfb, 0xcb, 0x81, 0x91, 0x54, 0xcd, 0xa8, 0x97, 0xd7, 0x57, 0x52, 0x13, 0x4, 0x26, 0x15, 0xf1, 0x74, 0x1a, 0x8c, 0xb6, 0x46, 0xa3, 0x9f, 0x8d, 0x13, 0x4f, 0xdf, 0x9e, 0x60, 0xe0, 0x0, 0xeb, 0x82, 0x20, 0xf6, 0x5c, 0xc3, 0xf, 0x5f, 0xa5, 0x2c, 0x43, 0x1b, 0x9e, 0x3b, 0x61, 0x1, 0xb9, 0x6e, 0x25, 0xb8, 0xd0, 0x44, 0xb, 0x96, 0xe5, 0x72, 0xa1, 0x8a, 0x1, 0x74, 0x7c, 0x2, 0xaf, 0xcd, 0x75, 0x13, 0x54, 0x2f, 0x7a, 0xac, 0xe1, 0x94, 0x63, 0x20, 0x99, 0xd1, 0x62, 0x74, 0xf3, 0x1e, 0xba, 0xbb, 0x60, 0xdd, 0xd9, 0x4f, 0xe4, 0x3d, 0xac, 0xce, 0x90, 0xe, 0xc0, 0x90, 0x2e, 0xb5, 0xe6, 0x86, 0xd4, 0x8e, 0xd8, 0xd0, 0x9a, 0xe6, 0x3d, 0xa0, 0xe1, 0x5c, 0x73, 0x68, 0x9, 0x90, 0x3a, 0x2, 0x97, 0xa9, 0x2d, 0xe8, 0x4e, 0x2, 0x60, 0xf1, 0x1f, 0x44, 0x6e, 0x1f, 0xc4, 0x48, 0xe0, 0xeb, 0xf5, 0x9f, 0xae, 0xa3, 0xc7, 0x26, 0xf9, 0x79, 0x25, 0xc5, 0x7c, 0xbd, 0xf8, 0x5b, 0x1f, 0x77, 0x7, 0x8d, 0x36, 0x25, 0x7c, 0x85, 0xd5, 0x6c, 0xbb, 0xed, 0xce, 0x18, 0xf, 0xe1, 0x2b, 0x68, 0x7a, 0xda, 0x2d, 0xc9, 0x91, 0x2f, 0xac, 0x60, 0x33, 0x41, 0x66, 0xbd, 0x2c, 0xef, 0x6, 0xb0, 0x89, 0xed, 0x5c, 0x95, 0x63, 0x84, 0x4d, 0x71, 0xd8, 0xfe, 0xad, 0x2f, 0x3a, 0x93, 0xf3, 0xc0, 0x7c, 0x52, 0x53, 0x73, 0x36, 0xa8, 0xa7, 0xb, 0xf5, 0xb5, 0x96, 0xb9, 0x0, 0x7b, 0x9f, 0xdf, 0x2d, 0x8, 0x20, 0x0, 0xf2, 0xe, 0x6b, 0x70, 0xd2, 0xa7, 0xe6, 0xc7, 0xed, 0x27, 0xc4, 0x14, 0x68, 0x95, 0xa6, 0xd8, 0x5a, 0x24, 0x6f, 0x62, 0x3c, 0x1b, 0x92, 0x58, 0xa2, 0xf8, 0x91, 0xf8, 0x23, 0xad, 0xe4, 0xce, 0xff, 0xd5, 0x9d, 0x4f, 0xfa, 0xd0, 0x77, 0x35, 0x1e, 0x2f, 0x50, 0x6e, 0x9a, 0x5b, 0xdd, 0x39, 0x0, 0xf0, 0x20, 0x4b, 0x9e, 0x89, 0x69, 0xaf, 0xe7, 0x2f, 0x5d, 0xcc, 0xb9, 0xcd, 0xf9, 0x86, 0xd1, 0x97, 0xae, 0x4c, 0x4d, 0xb5, 0x30, 0x14, 0x4, 0x1a, 0xe6, 0x22, 0x1b, 0x75, 0xe, 0x52, 0x90, 0xe3, 0x7, 0xad, 0x29, 0x2c, 0x8d, 0xe6, 0xb8, 0x99, 0x23, 0x52, 0x12, 0xef, 0x8c, 0xe9, 0x54, 0x78, 0x55, 0x37, 0xdc, 0x94, 0x35, 0xaf, 0x11, 0xe0, 0xf3, 0x42, 0x7a, 0x9c, 0x7b, 0x22, 0xef, 0xa7, 0x52, 0xea, 0xb, 0x7e, 0xad, 0xe5, 0xf6, 0xeb, 0x40, 0x93, 0xba, 0xcb, 0x78, 0x67, 0x6e, 0x50, 0x66, 0x98, 0x13, 0x9e, 0x4f, 0x77, 0x44, 0x23, 0xb8, 0x94, 0x21, 0x66, 0xf9, 0xa7, 0xd2, 0x24, 0x80, 0xd8, 0x14, 0xfc, 0xa, 0xe1, 0x9c, 0xf4, 0x96, 0xf, 0xbf, 0x6e, 0x1, 0xff, 0xa6, 0x5c, 0x8d, 0xa5, 0xbe, 0xd4, 0xf1, 0xae, 0x2b, 0x9e, 0xce, 0xc5, 0xbe, 0x7b, 0x3c, 0x38, 0xdd, 0x40, 0x45, 0xb0, 0xc9, 0x3e, 0xe6, 0xcc, 0x77, 0xa7, 0xe6, 0x1e, 0x85, 0xd3, 0x31, 0xb2, 0x3c, 0xd, 0x16, 0x4b, 0x10, 0x45, 0x18, 0xb3, 0x40, 0x54, 0x97, 0x5, 0x44, 0x45, 0xa3, 0x53, 0xe9, 0xb4, 0x8f, 0x2a, 0xc5, 0xe8, 0xe9, 0x62, 0x98, 0xd6, 0x65, 0x56, 0x14, 0x33, 0x6c, 0xff, 0xe6, 0xd8, 0xc9, 0xc9, 0x15, 0xe3, 0x87, 0x39, 0x15, 0x19, 0xad, 0x26, 0x32, 0x36, 0x6a, 0xa3, 0xbc, 0x93, 0x50, 0x30, 0xfd, 0x12, 0x92, 0x7e, 0xfc, 0xa1, 0x75, 0x5, 0xed, 0x74, 0xc9, 0x46, 0x50, 0xc7, 0x78, 0x53, 0x90, 0x4, 0x85, 0x4d, 0xf6, 0xc2, 0x42, 0x69, 0xaa, 0xb9, 0xc2, 0x73, 0xa4, 0x93, 0xd3, 0xe5, 0xb0, 0xb1, 0xd6, 0x87, 0xc3, 0x3c, 0x2f, 0xac, 0xe4, 0x6b, 0x4b, 0xb3, 0x74, 0x2d, 0x6d, 0xf7, 0x43, 0xd0, 0x91, 0x64, 0xd2, 0xe0, 0xee, 0x7f, 0x6b, 0xa1, 0x28, 0xbd, 0x5f, 0xba, 0x2e, 0x3b, 0x33, 0xc1, 0x99, 0xae, 0x80, 0xfa, 0x9d, 0xee, 0x3a, 0xd8, 0x11, 0xd0, 0x2b, 0xaa, 0x3d, 0x42, 0xa6, 0x36, 0x2b, 0x2a, 0xd4, 0x7b, 0xba, 0x8a, 0x2c, 0x5c, 0xd0, 0xb, 0x46, 0xcf, 0x22, 0xcf, 0xe3, 0x67, 0x28, 0x14, 0x88, 0xa4, 0x85, 0x2e, 0xb8, 0xb7, 0xfa, 0xce, 0x79, 0xf0, 0xca, 0x6f, 0x8e, 0x78, 0xd3, 0x25, 0x78, 0xdf, 0xee, 0x1, 0x71, 0x1c, 0x4d, 0xcf, 0x3c, 0x26, 0xd0, 0xba, 0x13, 0xf3, 0x7, 0x54, 0x78, 0xe7, 0x8, 0xc5, 0xc5, 0x31, 0x5a, 0xfd, 0xc2, 0xe4, 0xc0, 0x6, 0x2d, 0x16, 0x45, 0x82, 0x13, 0xbe, 0xc5, 0x6, 0xa9, 0xe9, 0x91, 0xa6, 0x18, 0x25, 0xff, 0x78, 0xda, 0x9b, 0xa1, 0xba, 0xab, 0xbe, 0xfa, 0x56, 0xb4, 0xa8, 0xc9, 0xe2, 0xe7, 0xb6, 0xe, 0xc4, 0xb7, 0xb5, 0x41, 0xc8, 0xe0, 0xf7, 0x9c, 0x86, 0xbb, 0x5f, 0x3, 0xf7, 0x36, 0x76, 0x1a, 0x37, 0x16, 0x9b, 0x2a, 0xab, 0x88, 0x84, 0xec, 0x6e, 0xa2, 0x17, 0xb0, 0x2c, 0x59, 0x3, 0x5f, 0x5b, 0xb3, 0x27, 0x24, 0x3d, 0x12, 0x6b, 0x78, 0xd4, 0xaa, 0xb4, 0x30, 0x21, 0x24, 0x39, 0xb5, 0xa7, 0x5b, 0x80, 0x61, 0x8d, 0xaf, 0xeb, 0x66, 0xaa, 0x3a, 0xff, 0x86, 0x6c, 0x4d, 0xae, 0xe4, 0x7d, 0x37, 0x4b, 0x51, 0x2e, 0x74, 0xad, 0xa9, 0x33, 0xef, 0x24, 0xa8, 0x41, 0xba, 0x27, 0x1c, 0x6f, 0x2, 0xc8, 0x70, 0xe8, 0xab, 0x95, 0xf, 0xe0, 0x6e, 0x93, 0xc9, 0x1d, 0xf0, 0xe9, 0x91, 0x65, 0xdc, 0x1, 0xbc, 0xb1, 0x90, 0xe4, 0x11, 0xec, 0xcd, 0x85, 0x35, 0x8f, 0xd4, 0xa8, 0x81, 0x27, 0xa2, 0x2e, 0x4c, 0xf4, 0x26, 0x6a, 0x90, 0x84, 0x51, 0x24, 0xbf, 0x97, 0xb2, 0x5d, 0x7b, 0x1c, 0x46, 0xd3, 0xa0, 0xd6, 0x8a, 0x68, 0x4f, 0x84, 0xe2, 0xa6, 0x38, 0xc6, 0x92, 0xa5, 0x2c, 0xb6, 0xe8, 0xc6, 0x51, 0xa3, 0xac, 0x49, 0x2b, 0x4, 0x60, 0x0, 0x40, 0x73, 0xd5, 0x34, 0x9e, 0x35, 0x55, 0x23, 0x59, 0xca, 0x37, 0x66, 0xf, 0x77, 0xb2, 0x77, 0xd, 0x6b, 0x2b, 0x3f, 0x7b, 0x19, 0x22, 0x42, 0x4a, 0xc4, 0xa8, 0x59, 0x8b, 0x4c, 0x61, 0xa6, 0xdb, 0x50, 0x76, 0x8, 0xa7, 0x2a, 0x6a, 0x7d, 0x57, 0x3c, 0xc0, 0x55, 0x20, 0x62, 0x76, 0xe1, 0x40, 0x5, 0xa2, 0x8a, 0xe, 0xc4, 0x1f, 0x28, 0xd7, 0xe2, 0x60, 0x61, 0x1d, 0x40, 0xf0, 0x89, 0xff, 0xe5, 0xe5, 0x29, 0x37, 0x56, 0x91, 0x41, 0x2f, 0x4e, 0x9e, 0x12, 0xe6, 0x2c, 0x3b, 0xe2, 0xc5, 0x63, 0xc2, 0x6d, 0x24, 0x44, 0xea, 0x9c, 0x69, 0xe6, 0xc9, 0x35, 0xfe, 0xb4, 0xdc, 0x4e, 0x80, 0x2e, 0x5f, 0xe3, 0x90, 0x6f, 0x8a, 0xce, 0xf4, 0x79, 0x8d, 0x94, 0xc, 0x3c, 0xd5, 0x74, 0xbb, 0x5e, 0x74, 0x50, 0x6c, 0x3e, 0xb, 0x70, 0xcb, 0x62, 0x45, 0x4a, 0x25, 0xf5, 0x89, 0xea, 0xdb, 0x6b, 0x7, 0x9, 0xfe, 0x3b, 0x50, 0x41, 0x7c, 0xd1, 0xd9, 0x8f, 0x8, 0xe0, 0x8b, 0x7c, 0xf6, 0x8a, 0x4, 0xcc, 0xcf, 0x8d, 0x65, 0x88, 0xf9, 0xfc, 0x2f, 0x31, 0xe5, 0x33, 0xcd, 0xa6, 0x15, 0x9b, 0xaa, 0x42, 0x97, 0xfa, 0x44, 0x64, 0x50, 0xd7, 0x1c, 0x16, 0xea, 0x23, 0x24, 0xec, 0x9, 0x77, 0x3e, 0x7c, 0x88, 0x17, 0xec, 0xf6, 0x80, 0xed, 0x12, 0xf6, 0x4a, 0x4, 0x86, 0x3e, 0xfe, 0x3d, 0x9d, 0x87, 0x60, 0xf3, 0x4d, 0xe5, 0xb0, 0x86, 0xb, 0x39, 0x91, 0xff, 0xe, 0xe5, 0xed, 0xba, 0x22, 0xc4, 0xd6, 0x91, 0x20, 0xde, 0x19, 0xd5, 0x42, 0x9e, 0x4a, 0xae, 0x91, 0xc9, 0xe7, 0xcf, 0x5, 0xcc, 0x80, 0x71, 0x59, 0xa5, 0x8f, 0x13, 0xb4, 0x80, 0x87, 0x2a, 0xc1, 0x60, 0x9d, 0x87, 0xe7, 0x0, 0x9d, 0xed, 0xb7, 0x1c, 0x9, 0xce, 0xaa, 0xb6, 0x40, 0xa2, 0xb6, 0x13, 0x58, 0x55, 0xce, 0xae, 0x4a, 0xc2, 0x95, 0x49, 0x33, 0xa0, 0x25, 0x5b, 0x42, 0x5d, 0x9f, 0xdc, 0xd9, 0xc2, 0x46, 0xf8, 0x2a, 0xeb, 0x7c, 0x3b, 0xb7, 0x8c, 0x6e, 0x73, 0xe0, 0x3d, 0xb7, 0xae, 0xc4, 0x24, 0x5a, 0x28, 0x69, 0x3f, 0xbd, 0x36, 0xef, 0x49, 0x38, 0xd5, 0x9c, 0xce, 0x19, 0xea, 0xfc, 0x0, 0x67, 0x1a, 0x8, 0x51, 0x61, 0x24, 0x6, 0xa0, 0x75, 0x71, 0x3c, 0x5d, 0x11, 0x54, 0xd8, 0xe1, 0x3b, 0x59, 0xb7, 0xc5, 0xb0, 0x90, 0x22, 0x39, 0xd4, 0xba, 0xcf, 0xa3, 0x86, 0xac, 0x81, 0x7a, 0xc5, 0xee, 0x2, 0xa1, 0x81, 0xa9, 0xa4, 0x7c, 0x62, 0x2b, 0x3e, 0xcf, 0x28, 0x7e, 0x14, 0x84, 0x3d, 0x45, 0x2a, 0xf3, 0x47, 0x11, 0x4, 0x98, 0xa6, 0x20, 0xb3, 0x4a, 0xb4, 0xe1, 0x16, 0x30, 0x8d, 0x97, 0x60, 0x62, 0xc9, 0xee, 0x9c, 0xd3, 0x5d, 0xb6, 0xcb, 0x79, 0x80, 0x5b, 0x93, 0xac, 0x9a, 0x15, 0xaf, 0xbc, 0xb5, 0x2f, 0x1e, 0xd4, 0x30, 0x98, 0x79, 0xd1, 0x92, 0x4a, 0x4b, 0xa1, 0x90, 0xb0, 0xb8, 0x6e, 0x60, 0xa5, 0x16, 0xe7, 0x7d, 0x34, 0xb4, 0xe0, 0xa4, 0x9d, 0x4e, 0xf2, 0xce, 0xf3, 0xcc, 0x2f, 0x41, 0xf, 0xd8, 0xec, 0x90, 0x13, 0x63, 0xfc, 0x9e, 0xbd, 0x75, 0xeb, 0x46, 0xd, 0x4d, 0x89, 0x10, 0xbd, 0xf2, 0x7c, 0xe2, 0x6a, 0x8b, 0x4a, 0xeb, 0x94, 0xf9, 0xf7, 0x62, 0x42, 0x40, 0x1d, 0xc3, 0x5d, 0x6, 0x44, 0x84, 0x2b, 0x99, 0xfb, 0x6c, 0x43, 0x9b, 0x82, 0xd8, 0x2e, 0xcf, 0xe1, 0xaf, 0xd, 0x1, 0xf9, 0xbe, 0xcb, 0x15, 0xbe, 0xc8, 0x3f, 0x13, 0xb2, 0x60, 0xf7, 0xf7, 0x14, 0xaa, 0x38, 0x10, 0x32, 0x92, 0x3f, 0xde, 0x8f, 0x80, 0x18, 0xf3, 0x51, 0x85, 0x47, 0x45, 0x14, 0x35, 0xc9, 0xa5, 0x20, 0x72, 0x94, 0xd0, 0x8a, 0x90, 0x7c, 0x73, 0x69, 0x6f, 0x6c, 0xb0, 0x0, 0x74, 0x5e, 0x7, 0x2e, 0x25, 0xb7, 0x3b, 0x3e, 0xe1, 0x15, 0x95, 0x43, 0x3d, 0x27, 0xa1, 0xf1, 0x14, 0x68, 0x68, 0x6f, 0x8, 0x9, 0x4f, 0x1d, 0x31, 0xf5, 0xad, 0xa8, 0x1f, 0x11, 0xf0, 0x67, 0x7a, 0x29, 0xd7, 0x2e, 0xbb, 0x2e, 0x1c, 0x47, 0x92, 0xcc, 0xc6, 0x7, 0xcb, 0x93, 0x86, 0x47, 0xe1, 0xf1, 0x53, 0xf9, 0xee, 0xf0, 0x3d, 0x98, 0x25, 0x95, 0xc6, 0x31, 0xe4, 0x9b, 0x6b, 0x7c, 0x1f, 0xa0, 0x3, 0xa6, 0xeb, 0x8d, 0x59, 0xcb, 0x88, 0x92, 0xcd, 0x8, 0x88, 0xb0, 0x52, 0x40, 0xf1, 0x27, 0x1, 0x75, 0x3f, 0x89, 0x0, 0x7c, 0x85, 0x95, 0x15, 0xa2, 0xfe, 0xf9, 0x44, 0xbc, 0x60, 0xb3, 0x60, 0x3, 0xa2, 0x67, 0x2, 0xac, 0x6f, 0xe0, 0x4d, 0x2e, 0x94, 0x29, 0x78, 0xfc, 0x31, 0xa9, 0x7e, 0xb2, 0x98, 0x71, 0xd6, 0x75, 0x23, 0x99, 0xd3, 0x52, 0x17, 0x20, 0x72, 0x90, 0x7, 0xb6, 0xa7, 0x21, 0x5a, 0x42, 0x82, 0xb2, 0xa4, 0xef, 0xc2, 0xc5, 0x6b, 0xd1, 0x29, 0xe7, 0x4c, 0x9b, 0x0, 0x84, 0x76, 0x92, 0xb9, 0x6f, 0xcc, 0x71, 0xcf, 0x7a, 0x7f, 0x19, 0xf3, 0xfd, 0x6b, 0x45, 0xc5, 0x19, 0xfd, 0x73, 0xb4, 0x86, 0x8, 0x80, 0xa2, 0xdd, 0x74, 0xe5, 0x72, 0x7b, 0x31, 0xa9, 0x3f, 0xa, 0x87, 0xf0, 0x7, 0x81, 0x55, 0x34, 0x4a, 0xe9, 0xf7, 0xbd, 0xbf, 0x0, 0xd8, 0x33, 0x93, 0xb6, 0x34, 0xb5, 0xdc, 0xa8, 0x8a, 0x39, 0x8e, 0x42, 0xc3, 0x20, 0xeb, 0x95, 0xc4, 0xa8, 0x26, 0xac, 0xea, 0x90, 0xb6, 0x5e, 0x47, 0x67, 0xb2, 0xeb, 0xa7, 0x48, 0xf9, 0x7c, 0x24, 0x75, 0x68, 0x39, 0x3e, 0x2f, 0xd3, 0xa6, 0x60, 0x75, 0xcc, 0x12, 0x93, 0x5b, 0x6d, 0x7e, 0xb5, 0xc2, 0xff, 0x52, 0x82, 0x18, 0x5c, 0xb6, 0x2c, 0x73, 0x97, 0x2a, 0x37, 0xb3, 0xca, 0x50, 0x80, 0x4, 0xb4, 0xf7, 0x96, 0xbd, 0xf8, 0x2b, 0x83, 0xb5, 0xbd, 0xf9, 0xd, 0x6b, 0xfd, 0x32, 0xb5, 0x8, 0x9b, 0xc, 0xa2, 0x68, 0x3d, 0xc7, 0xfb, 0x23, 0x37, 0xde, 0x42, 0xe6, 0x50, 0xed, 0x91, 0x1d, 0xbe, 0xe1, 0xef, 0x98, 0x25, 0x7f, 0x9b, 0xa5, 0xaf, 0x54, 0xb1, 0xa5, 0x4b, 0x4, 0xc0, 0x8, 0x7a, 0x5a, 0x64, 0xba, 0x77, 0x9d, 0x86, 0x46, 0x1b, 0xa1, 0x53, 0x37, 0xc2, 0xe7, 0xd4, 0x95, 0x5f, 0xdd, 0x77, 0x7a, 0x2, 0x5d, 0xe2, 0x26, 0x30, 0x6a, 0x17, 0xc3, 0x84, 0xf1, 0xc5, 0x2c, 0xdb, 0x59, 0x46, 0xfb, 0xb, 0x46, 0xdd, 0x5c, 0x13, 0xbd, 0x7a, 0x55, 0xfe, 0x2e, 0x27, 0xe4, 0xc6, 0xd4, 0xd, 0x61, 0xd6, 0xff, 0xc0, 0x24, 0x46, 0x8f, 0x8e, 0xdf, 0xc7, 0xc7, 0x99, 0x2d, 0xf5, 0xdc, 0x5d, 0x5, 0x6, 0x3f, 0xe7, 0x23, 0x19, 0x92, 0x24, 0xf5, 0x36, 0x78, 0xe4, 0x8f, 0x25, 0x25, 0xe, 0xa2, 0x8b, 0xdf, 0x10, 0x89, 0x71, 0x8e, 0xb8, 0xb7, 0x30, 0xd1, 0xc0, 0x67, 0x35, 0xc2, 0xf8, 0x71, 0x16, 0x4e, 0x2e, 0xb5, 0xe8, 0x85, 0xa8, 0xdf, 0xd2, 0xa0, 0x83, 0xbe, 0x97, 0xed, 0xc9, 0x41, 0x59, 0xce, 0x9b, 0xf7, 0x5d, 0x24, 0x33, 0xf1, 0xd7, 0x82, 0x76, 0x2f, 0x77, 0x19, 0x3, 0xcb, 0xf9, 0xa1, 0xc9, 0xd1, 0x3f, 0x71, 0xb, 0xa0, 0xe1, 0x51, 0xb0, 0x79, 0xdc, 0xa, 0x82, 0x62, 0xbc, 0xeb, 0x1d, 0xbc, 0xbb, 0xc0, 0xf3, 0x5d, 0xf6, 0xee, 0xcf, 0x7b, 0xaa, 0x71, 0x5, 0xb9, 0x80, 0x87, 0x45, 0x85, 0x3c, 0x96, 0xb4, 0x37, 0x2e, 0x95, 0xe4, 0x82, 0x3, 0x59, 0x16, 0xb7, 0x26, 0xda, 0xc7, 0xbe, 0x95, 0xa7, 0x2b, 0x19, 0xda, 0xd4, 0x8d, 0xb1, 0xb1, 0x9e, 0x6e, 0xb2, 0xed, 0xab, 0x5a, 0xc1, 0xb3, 0x1, 0x38, 0x39, 0xe7, 0x80, 0x66, 0x25, 0xab, 0xc1, 0x29, 0xf4, 0x18, 0x13, 0xe6, 0xd7, 0x1e, 0xe4, 0xab, 0x20, 0x40, 0xd8, 0x1e, 0x42, 0xe6, 0xed, 0x73, 0xab, 0xba, 0x64, 0xff, 0x2e, 0xb4, 0x33, 0xb9, 0x10, 0xea, 0x7d, 0x4f, 0x5e, 0xd3, 0xd8, 0xd2, 0x7d, 0x39, 0xbb, 0x45, 0x4e, 0xc0, 0x19, 0xdf, 0x61, 0x14, 0xf5, 0x44, 0xd7, 0xb1, 0x55, 0x54, 0x9d, 0xc, 0x56, 0xd1, 0x45, 0x51, 0xfa, 0xf3, 0x53, 0x99, 0x4a, 0x80, 0xf3, 0xf, 0x3c, 0x97, 0xe8, 0x63, 0xa4, 0xf2, 0xaf, 0x31, 0x64, 0x68, 0xa5, 0x68, 0x3, 0x8e, 0xb4, 0xd7, 0x99, 0x35, 0xa, 0x6f, 0xac, 0xaf, 0xf9, 0xe, 0xcd, 0x44, 0xe0, 0xf4, 0x4e, 0xfb, 0x6d, 0xc4, 0x2e, 0xe4, 0xb0, 0xdc, 0x2c, 0x59, 0xea, 0x9c, 0x18, 0x27, 0x32, 0x6d, 0xf0, 0x8c, 0xa, 0x6e, 0x55, 0xcf, 0x4f, 0x9c, 0x3e, 0xa0, 0xe7, 0x8c, 0xff, 0x36, 0x35, 0xf5, 0xd0, 0x8e, 0x44, 0xf1, 0x40, 0xd, 0x20, 0xf6, 0x38, 0xd5, 0x6b, 0xa8, 0x4b, 0x48, 0x32, 0x9, 0x4, 0x54, 0xde, 0x57, 0xef, 0x4, 0xb6, 0xc8, 0x80, 0x5a, 0x36, 0xf6, 0x3e, 0x5c, 0xcc, 0x6e, 0x83, 0xc, 0x87, 0xff, 0xc1, 0x64, 0x64, 0x7c, 0xed, 0x20, 0xe4, 0xc4, 0x86, 0xd0, 0x9d, 0xe7, 0xa5, 0xf9, 0xe4, 0xb6, 0x8d, 0x54, 0x56, 0xcd, 0xb2, 0x2b, 0xd, 0xde, 0xd2, 0xb9, 0x5b, 0x3b, 0xca, 0xe5, 0x29, 0x21, 0x5c, 0x2d, 0x25, 0xd6, 0x82, 0x3c, 0x7d, 0x66, 0xa4, 0xfa, 0xe0, 0xa1, 0xe9, 0xf0, 0x22, 0xba, 0x56, 0x63, 0x20, 0x4f, 0x23, 0x14, 0xdf, 0xa5, 0x1a, 0x1f, 0x10, 0xe1, 0x1d, 0x6d, 0x62, 0xa8, 0xba, 0x6c, 0x28, 0xb6, 0xae, 0x7d, 0xa1, 0xde, 0xb5, 0xb5, 0x7f, 0x2b, 0x65, 0xd7, 0x45, 0x60, 0x59, 0xad, 0x9f, 0x3, 0xdc, 0x5a, 0x52, 0x40, 0x54, 0xda, 0x39, 0xdd, 0x10, 0xd, 0x74, 0xeb, 0x65, 0x7d, 0xe2, 0x19, 0x79, 0x5e, 0x3c, 0x45, 0xa0, 0xe4, 0xc7, 0x62, 0xba, 0x22, 0xf9, 0xda, 0x9d, 0x81, 0x59, 0xe4, 0x25, 0xa1, 0xee, 0x78, 0x3b, 0x4b, 0x22, 0xc2, 0x50, 0xd8, 0x89, 0x4c, 0xbe, 0xc7, 0x6, 0xce, 0x16, 0xd5, 0xca, 0x39, 0x34, 0x4, 0xff, 0x47, 0x8f, 0x14, 0x1b, 0xe7, 0xcc, 0x69, 0xe4, 0x5b, 0x7, 0x7b, 0xa1, 0x95, 0x5f, 0x1f, 0x49, 0xef, 0xbe, 0x48, 0x47, 0xc7, 0x95, 0x34, 0x7f, 0x70, 0x33, 0x0, 0xf6, 0x72, 0x33, 0x4f, 0x49, 0xa, 0xbf, 0x8b, 0x64, 0x4a, 0x34, 0xb5, 0x6d, 0xa0, 0xe, 0xc4, 0x5a, 0x35, 0x3, 0x14, 0xb9, 0xad, 0xf2, 0x7c, 0xaf, 0x7c, 0x51, 0xcb, 0x7d, 0xba, 0xc, 0x54, 0x77, 0xe7, 0xd3, 0x76, 0x62, 0xf4, 0xf2, 0x32, 0x47, 0xbc, 0xb8, 0xf7, 0xdd, 0x5f, 0x3e, 0x9c, 0xb8, 0xbd, 0xa4, 0xf, 0xa9, 0x75, 0x68, 0x83, 0x2a, 0xf0, 0xad, 0xc6, 0x8f, 0x71, 0x42, 0x2e, 0x41, 0x22, 0x54, 0xa6, 0xbf, 0xc8, 0x94, 0x3b, 0xb4, 0x65, 0xb0, 0x1f, 0xcc, 0x8d, 0xe0, 0xb9, 0x57, 0x67, 0x7c, 0x78, 0xbc, 0x1f, 0x75, 0x66, 0x95, 0x3e, 0x9d, 0x24, 0x46, 0x23, 0x9f, 0x60, 0x2c, 0x68, 0x2a, 0x52, 0x1c, 0x14, 0xf7, 0x41, 0xfe, 0xa9, 0x8c, 0x7e, 0x27, 0xaa, 0xbe, 0xc3, 0x39, 0xb6, 0xf5, 0xb9, 0x4c, 0x78, 0x28, 0x7a, 0x89, 0x4a, 0xfd, 0xae, 0x97, 0x1f, 0x8d, 0xa7, 0xc7, 0xe4, 0xa4, 0xc9, 0x2c, 0x8d, 0xa4, 0x7b, 0xe8, 0x2d, 0xc2, 0x53, 0x2e, 0xc2, 0xda, 0x9b, 0xac, 0xed, 0xd2, 0xbe, 0x6d, 0xb2, 0xb2, 0xfb, 0x34, 0xdc, 0xcd, 0xcb, 0x34, 0x11, 0x65, 0x7, 0x37, 0x65, 0x78, 0xcb, 0xca, 0x10, 0x5e, 0x5e, 0x44, 0x3b, 0xec, 0xf, 0x2e, 0xf2, 0x3b, 0xe3, 0x4c, 0xdf, 0x86, 0x2e, 0xda, 0xb3, 0x4f, 0xf, 0xf2, 0x13, 0x35, 0xe3, 0xac, 0xd9, 0x2f, 0x59, 0x68, 0x8b, 0x41, 0x9f, 0x82, 0x4e, 0xa6, 0x1e, 0xea, 0x82, 0xbc, 0x80, 0xe3, 0x46, 0x34, 0x52, 0x19, 0x23, 0x77, 0x13, 0x1b, 0xa5, 0x1f, 0xb0, 0x79, 0x5e, 0x8, 0x9f, 0xc0, 0x77, 0xd0, 0xec, 0xa8, 0x1, 0x2e, 0x58, 0xb0, 0x63, 0x7a, 0xd7, 0x2, 0x22, 0x6, 0x88, 0x7f, 0xe9, 0xec, 0x0, 0xee, 0x5d, 0xf7, 0xad, 0x2e, 0x26, 0xfe, 0x81, 0x9e, 0xe3, 0x5c, 0x7a, 0x17, 0x9c, 0x57, 0x90, 0x98, 0xaa, 0x3d, 0xf6, 0x45, 0xd9, 0x6, 0x4c, 0xd5, 0x57, 0xda, 0x90, 0xbd, 0xd2, 0x1f, 0x87, 0x1c, 0xeb, 0x4, 0x8c, 0xa5, 0x6d, 0xf9, 0x65, 0x3a, 0x10, 0xed, 0x60, 0xf5, 0xe9, 0xf0, 0xed, 0x7f, 0x8d, 0x89, 0xbc, 0xf5, 0xc2, 0x2d, 0x11, 0x43, 0xcf, 0x44, 0x71, 0x8f, 0xf2, 0xdf, 0xd8, 0xe1, 0xc, 0xef, 0x8a, 0xab, 0xb6, 0x7d, 0x23, 0x5, 0xf1, 0x81, 0x77, 0xc1, 0x42, 0x6b, 0xd4, 0xcd, 0x3, 0xf2, 0x62, 0x5e, 0x45, 0x9c, 0xe9, 0x5, 0x6, 0x78, 0x26, 0xa2, 0x14, 0xe0, 0x8e, 0x56, 0xd8, 0xf9, 0x45, 0x55, 0x93, 0xe6, 0xb3, 0x24, 0xe7, 0x2d, 0xed, 0xcc, 0x42, 0x9d, 0x3b, 0xef, 0xe2, 0xae, 0x5, 0x99, 0xe3, 0x60, 0xdf, 0x95, 0xe8, 0xd, 0x45, 0x3a, 0x3a, 0x84, 0x9e, 0x48, 0x38, 0x9f, 0xa7, 0x45, 0x63, 0x5b, 0xed, 0xe3, 0xe, 0x79, 0x32, 0xde, 0x6a, 0x38, 0x16, 0xe3, 0x1a, 0x22, 0x17, 0xf9, 0x8d, 0x5e, 0x40, 0x23, 0x89, 0x63, 0xd0, 0xa3, 0x6c, 0x15, 0x9f, 0xd4, 0xec, 0x32, 0xd8, 0xa5, 0xcf, 0x59, 0xd4, 0x33, 0xde, 0xf3, 0x37, 0x86, 0x34, 0xaf, 0x68, 0x87, 0xfd, 0xb3, 0xf3, 0xed, 0xb9, 0x6f, 0xc8, 0x84, 0xf, 0xe1, 0xb5, 0x38, 0xc3, 0x29, 0x67, 0x4a, 0xe8, 0x10, 0xe8, 0xc8, 0xb2, 0xb4, 0x6d, 0xb2, 0x8, 0x71, 0x6d, 0x38, 0xe9, 0xd1, 0xae, 0xab, 0x9, 0x70, 0x68, 0xad, 0x83, 0xad, 0xd7, 0xdd, 0x26, 0x47, 0x83, 0x9b, 0x3a, 0x73, 0x88, 0xb0, 0x61, 0x5b, 0xde, 0x26, 0xf8, 0x69, 0x2e, 0x9c, 0x7, 0xd8, 0xad, 0xec, 0xc2, 0xa8, 0x75, 0x20, 0x3c, 0x3d, 0x3a, 0x9c, 0x6c, 0xb1, 0xd7, 0xd0, 0x63, 0x7, 0xe9, 0xe1, 0xd9, 0xc3, 0xbc, 0x53, 0x6d, 0xd8, 0xeb, 0x27, 0x1e, 0x9a, 0x21, 0x59, 0xc9, 0x4, 0xe6, 0x1e, 0x8c, 0x93, 0x57, 0xfe, 0x75, 0x9f, 0x36, 0x36, 0x6a, 0xef, 0x5a, 0x3d, 0x14, 0xce, 0xe8, 0x29, 0x13, 0xcd, 0x27, 0x8, 0xaa, 0x60, 0x69, 0x36, 0x9c, 0xed, 0x76, 0x3c, 0x8e, 0x83, 0xd, 0x70, 0x92, 0x4e, 0x82, 0xe9, 0x1, 0x5c, 0x29, 0x98, 0xe8, 0x6e, 0xfc, 0x1d, 0xce, 0x6a, 0xc2, 0xeb, 0xcb, 0x49, 0x45, 0x55, 0x42, 0xa6, 0xd7, 0xda, 0xb2, 0x65, 0xad, 0x6d, 0x73, 0x81, 0xff, 0xee, 0xe1, 0xaa, 0x40, 0xf8, 0xfa, 0xc0, 0x65, 0x9b, 0x6f, 0xb5, 0x6b, 0xb0, 0x3c, 0xd8, 0xca, 0xfa, 0xac, 0xd4, 0x8d, 0x13, 0x67, 0x2f, 0x7d, 0x52, 0x4e, 0xb9, 0x68, 0x4c, 0xfe, 0xd4, 0xdb, 0xb7, 0x47, 0x6e, 0x99, 0x14, 0x9c, 0x28, 0xec, 0x8, 0xf3, 0x3b, 0xa6, 0xaf, 0xf8, 0x39, 0xaa, 0x17, 0x8f, 0x86, 0xb8, 0xee, 0xaf, 0x17, 0x39, 0xc8, 0x29, 0x17, 0x7b, 0xa7, 0x85, 0x47, 0xad, 0x39, 0x41, 0x36, 0xaa, 0x3f, 0xad, 0x45, 0x1a, 0x11, 0xe9, 0x64, 0x25, 0x6, 0x56, 0x8b, 0x39, 0x66, 0x8b, 0x24, 0x36, 0x61, 0xe, 0x6, 0xea, 0x45, 0xfa, 0x11, 0xd0, 0x4d, 0x37, 0x59, 0xb0, 0x33, 0xb5, 0x38, 0x26, 0x45, 0xf1, 0x5b, 0x3c, 0x39, 0x27, 0xb, 0x81, 0xb8, 0x4, 0x87, 0x64, 0x39, 0x13, 0xa2, 0x4f, 0x2f, 0x1c, 0x1a, 0x1e, 0xd5, 0x7c, 0x85, 0xcc, 0xdd, 0xc8, 0xcd, 0x6d, 0x59, 0xb6, 0x2f, 0xa6, 0x7c, 0xc8, 0x5, 0x72, 0x96, 0x8c, 0x8f, 0xd0, 0x18, 0x94, 0xf0, 0x15, 0x36, 0x34, 0xc8, 0x87, 0x92, 0xa7, 0xc4, 0xa4, 0x7, 0xa4, 0xa4, 0xce, 0x46, 0xce, 0xc5, 0xfe, 0x5d, 0x25, 0x69, 0xf9, 0x5a, 0x27, 0xde, 0x24, 0x24, 0x44, 0xea, 0xc, 0x71, 0x5b, 0x35, 0x75, 0x18, 0xca, 0xea, 0x23, 0xe7, 0x67, 0xe8, 0x54, 0x59, 0x83, 0xf0, 0xd3, 0xa4, 0xdf, 0x66, 0x11, 0x1b, 0x4a, 0xa1, 0xd3, 0x99, 0xcc, 0xaf, 0xd7, 0x96, 0xd7, 0xa8, 0xe, 0x59, 0x2d, 0x5a, 0x51, 0xd2, 0xb3, 0xf6, 0xb, 0x5b, 0x4, 0xf8, 0xd9, 0xc0, 0x9, 0xca, 0x56, 0xcb, 0xd4, 0xdd, 0x84, 0x12, 0x7a, 0x29, 0xb7, 0x2a, 0xdb, 0x76, 0x45, 0xfb, 0x72, 0x79, 0xc9, 0x81, 0x8b, 0x2b, 0x43, 0x96, 0x3b, 0xd6, 0x5, 0xf4, 0x5b, 0x65, 0x75, 0xa5, 0xe2, 0xe3, 0x69, 0xe0, 0xb4, 0x1, 0xf5, 0xec, 0x10, 0xec, 0x70, 0x3f, 0x11, 0x79, 0xb0, 0xab, 0x9d, 0x4a, 0x89, 0xd6, 0xf0, 0x96, 0x57, 0x39, 0x52, 0xe5, 0x13, 0x82, 0x73, 0x64, 0xa8, 0x4d, 0x38, 0x92, 0x27, 0x34, 0x13, 0x7e, 0x96, 0x9d, 0x81, 0x67, 0xd6, 0x95, 0x9b, 0x70, 0xf4, 0x2f, 0x2b, 0xda, 0x37, 0xe4, 0xc9, 0x89, 0xab, 0xaa, 0x80, 0x24, 0xc1, 0xa8, 0x4e, 0xd6, 0xbe, 0xb7, 0x47, 0x80, 0x92, 0x7f, 0x78, 0xb3, 0x2e, 0xa7, 0x36, 0xb9, 0xb2, 0xb4, 0xa7, 0x95, 0xc3, 0x55, 0xc0, 0x31, 0x98, 0x11, 0x72, 0x9d, 0x9c, 0xc3, 0x99, 0xd2, 0x35, 0x19, 0x73, 0x3, 0x38, 0xd6, 0x2e, 0x16, 0xe5, 0x3, 0x5f, 0xc5, 0x2a, 0x81, 0x70, 0x90, 0x70, 0x3f, 0xe7, 0x76, 0xd6, 0x5e, 0xf9, 0xfe, 0xf5, 0xba, 0x5f, 0x4f, 0xfe, 0xc3, 0xcc, 0x8e, 0x9e, 0xb2, 0xe3, 0x12, 0xc5, 0xa, 0x47, 0x9b, 0xdd, 0x4e, 0x6a, 0xb0, 0xa5, 0x6c, 0x18, 0xc2, 0xdf, 0x69, 0xed, 0x40, 0x84, 0x17, 0xbe, 0xe2, 0x8b, 0xb4, 0x1d, 0xd1, 0x3f, 0x83, 0x66, 0xff, 0x6e, 0xda, 0x4b, 0x34, 0x9, 0xf, 0xc9, 0xbc, 0x4, 0x52, 0x71}, - output224: []byte{0x82, 0x69, 0x8a, 0xd7, 0x8d, 0xfc, 0x9e, 0x39, 0x66, 0x5c, 0x9d, 0xfd, 0x54, 0xc7, 0xbc, 0x44, 0xdb, 0xe, 0xbb, 0xa2, 0xe7, 0x41, 0xe8, 0xd, 0x52, 0x92, 0x66, 0x9b}, - output256: []byte{0x19, 0x2e, 0xae, 0xa8, 0x40, 0x38, 0xd5, 0x88, 0xad, 0x55, 0xdc, 0x51, 0x43, 0xf2, 0xbb, 0x10, 0x4, 0xe, 0xf7, 0x8b, 0xfc, 0x7f, 0xb9, 0x1f, 0x6b, 0x5e, 0x4c, 0x5, 0x34, 0x66, 0xaf, 0x0}, - output384: []byte{0xdd, 0x29, 0xed, 0x94, 0x68, 0xbb, 0x12, 0xde, 0x8f, 0x9c, 0xf6, 0x4a, 0xa7, 0x66, 0xb0, 0x44, 0x77, 0xd6, 0x59, 0xf0, 0x32, 0x74, 0x6a, 0xb4, 0xd0, 0x9d, 0x56, 0xa5, 0x40, 0xdb, 0x1a, 0x3d, 0x13, 0xf7, 0xc9, 0x1b, 0x27, 0xfc, 0xe1, 0xc, 0x4c, 0xa8, 0x46, 0x6f, 0x4a, 0x6, 0xc2, 0xc2}, - output512: []byte{0xfc, 0x4e, 0x8e, 0xef, 0x8a, 0x77, 0x59, 0x8a, 0x38, 0x9b, 0xd5, 0x8a, 0x31, 0xc3, 0x48, 0xb2, 0x2c, 0x63, 0x28, 0x23, 0x5a, 0x39, 0xf1, 0xf0, 0x97, 0xc0, 0x6d, 0x18, 0x9d, 0xfe, 0x8, 0x65, 0x8b, 0x89, 0xc1, 0x6d, 0x9b, 0x26, 0xa4, 0x3d, 0x17, 0xa2, 0x5f, 0x1b, 0x40, 0x7, 0x85, 0x2c, 0xed, 0x21, 0x28, 0x56, 0x5, 0x9d, 0x8b, 0x5e, 0xb4, 0x2e, 0xf6, 0x6, 0x6c, 0x84, 0x58, 0x50}}, - testcase{ - msg: []byte{0xd1, 0xfa, 0x12, 0x3c, 0x46, 0x8d, 0x0, 0x52, 0xc5, 0x8c, 0x93, 0xbf, 0x30, 0x6c, 0x7c, 0x1d, 0xc9, 0x9, 0x68, 0xec, 0xca, 0xc6, 0xb0, 0xc2, 0xf4, 0xe3, 0xec, 0xc3, 0xf9, 0x8, 0xf2, 0xbe, 0x6a, 0x54, 0xab, 0x69, 0xae, 0xc5, 0xc4, 0x96, 0xd2, 0x91, 0xd0, 0x26, 0x32, 0x43, 0xbf, 0x18, 0x27, 0x77, 0x3d, 0xbf, 0xfc, 0x2, 0xa9, 0xd5, 0xfb, 0xf7, 0xaf, 0xf6, 0x3d, 0xa5, 0x35, 0x5d, 0x58, 0x69, 0xf4, 0x92, 0xb0, 0xca, 0xe8, 0x2b, 0x22, 0x9a, 0x36, 0x33, 0x1d, 0xfa, 0x64, 0x25, 0x57, 0xc6, 0xf6, 0x62, 0x7f, 0xfb, 0x9, 0x95, 0xe5, 0x93, 0xdf, 0x8e, 0xf, 0xbd, 0x3a, 0xbe, 0x66, 0x12, 0x6b, 0x7e, 0x5d, 0xa1, 0xf1, 0x89, 0x1b, 0xd2, 0x88, 0x73, 0xfd, 0x9c, 0x96, 0xc0, 0x7, 0x62, 0x15, 0xb6, 0x5, 0x48, 0x7, 0x5d, 0x16, 0xcd, 0xa9, 0x2a, 0x2b, 0x99, 0xea, 0xe5, 0x77, 0x6f, 0x6d, 0x1e, 0x7a, 0xe2, 0xd8, 0xca, 0x30, 0x54, 0x6b, 0xd3, 0x32, 0x71, 0xd5, 0xa, 0x6f, 0xd3, 0x4b, 0x23, 0x80, 0x95, 0x34, 0xae, 0x6e, 0x4a, 0x87, 0x5d, 0x69, 0x81, 0x49, 0x2f, 0x23, 0x75, 0x2a, 0x68, 0xd1, 0xe8, 0x70, 0xd1, 0x74, 0xa0, 0x21, 0xff, 0x8c, 0x55, 0xe, 0x1, 0x99, 0x3e, 0x3d, 0xc3, 0x35, 0x82, 0x74, 0xe4, 0xda, 0x2b, 0x45, 0xc0, 0x0, 0xc4, 0x3f, 0xac, 0x30, 0x7d, 0x82, 0xee, 0x2b, 0x5d, 0x42, 0xa6, 0xd9, 0x84, 0x9c, 0x11, 0xa8, 0xa5, 0x67, 0x66, 0x5, 0xb7, 0xb3, 0xc4, 0x52, 0x20, 0xbf, 0xa5, 0xbf, 0xc7, 0x11, 0x8e, 0x24, 0x87, 0xda, 0x14, 0x3d, 0xf0, 0x79, 0x78, 0x70, 0x30, 0x3c, 0x18, 0x5c, 0x92, 0x33, 0xaf, 0x63, 0xf4, 0x47, 0xce, 0x53, 0xd8, 0x19, 0x9b, 0x98, 0x6a, 0xba, 0x36, 0x77, 0x35, 0xfd, 0x74, 0x5f, 0x84, 0xf8, 0xd9, 0x4b, 0xa0, 0xc1, 0xa0, 0x8d, 0xb2, 0x80, 0xd8, 0x60, 0xbf, 0x65, 0x6e, 0xe8, 0x71, 0xad, 0x10, 0x94, 0xfc, 0xb4, 0x1c, 0x7b, 0xfb, 0xf0, 0xfb, 0xe0, 0x95, 0x9a, 0x31, 0xb3, 0xed, 0x57, 0x34, 0x98, 0xad, 0x35, 0x2, 0x66, 0x94, 0xab, 0xfb, 0x90, 0x68, 0x4b, 0x35, 0xbe, 0x28, 0x4b, 0x18, 0xd4, 0xb6, 0x63, 0xcb, 0x2e, 0xa5, 0xde, 0x1a, 0x88, 0xe2, 0x94, 0x7b, 0xe8, 0x1, 0x28, 0x58, 0xc5, 0x7a, 0xd8, 0x60, 0x1c, 0xfd, 0x17, 0x44, 0x57, 0x3f, 0x79, 0x90, 0x68, 0x49, 0xb4, 0xa5, 0x55, 0x2a, 0xa8, 0x7d, 0x5e, 0x64, 0xc2, 0x1a, 0x5, 0x4a, 0x7f, 0xd3, 0x1b, 0x7e, 0xfe, 0x2a, 0x5e, 0x40, 0x15, 0x53, 0x46, 0x3f, 0xdd, 0xb8, 0x81, 0x35, 0x5f, 0xd9, 0x4c, 0x9e, 0xf7, 0xf6, 0xf9, 0xe3, 0xda, 0x4c, 0xd8, 0x45, 0xee, 0x16, 0xdb, 0x2d, 0x1a, 0x7d, 0x4e, 0x31, 0xc9, 0xe8, 0xb4, 0x2c, 0xe, 0xe5, 0xd3, 0x2, 0x96, 0xa6, 0x6, 0xb0, 0xa, 0xad, 0x9e, 0xa0, 0x95, 0x9, 0x20, 0x81, 0x88, 0xd4, 0xa1, 0x5b, 0x32, 0x8e, 0xf7, 0x56, 0x4c, 0x2e, 0x36, 0xfe, 0x79, 0xc0, 0x6e, 0x46, 0x6a, 0xf5, 0x98, 0xeb, 0x64, 0x28, 0xf, 0x0, 0x19, 0xa3, 0xac, 0x81, 0xb1, 0x8f, 0xa2, 0x54, 0xb0, 0xb7, 0x9d, 0x7b, 0x80, 0xec, 0xdc, 0x9a, 0xda, 0x3d, 0xd3, 0xd1, 0x3f, 0x18, 0x99, 0xcd, 0x3e, 0xeb, 0x6c, 0xeb, 0xda, 0xcc, 0x7f, 0x69, 0xe6, 0xed, 0x2, 0xb2, 0x55, 0xe, 0xb3, 0xc7, 0x6e, 0x17, 0x74, 0xe1, 0x89, 0x66, 0x1b, 0xf7, 0x91, 0xab, 0x88, 0x42, 0xa9, 0x2d, 0x86, 0xaf, 0x94, 0x89, 0x77, 0x1d, 0x1d, 0x6f, 0xe8, 0x30, 0x2b, 0xe3, 0x95, 0xd6, 0x75, 0xe, 0xbb, 0xfb, 0x1e, 0xd7, 0x23, 0x7c, 0x2c, 0x97, 0xab, 0x65, 0x5c, 0x7a, 0x6c, 0x71, 0x57, 0xa5, 0xea, 0x5c, 0x51, 0x3, 0x6a, 0xcd, 0x9f, 0x1c, 0x3, 0x12, 0x77, 0xa9, 0x4, 0x50, 0xbd, 0xba, 0xb5, 0xd4, 0xa9, 0xb3, 0x6d, 0xa5, 0x2a, 0x6e, 0xf7, 0x86, 0x5b, 0xd0, 0xb5, 0x57, 0x1f, 0x22, 0x8d, 0x5d, 0x61, 0xd1, 0x5a, 0x1, 0xc3, 0x6c, 0x3a, 0x7d, 0x2f, 0x13, 0x3f, 0x4, 0xd0, 0xa1, 0x72, 0x55, 0x27, 0x1a, 0x1f, 0xa0, 0xbc, 0x7c, 0xd6, 0xa, 0x85, 0xbf, 0xf1, 0x7e, 0xfe, 0x1d, 0x49, 0xa2, 0x4d, 0x7e, 0x87, 0x80, 0x7f, 0x67, 0xa0, 0x13, 0x58, 0xb7, 0xce, 0xd0, 0x1a, 0x11, 0x2d, 0x8b, 0x71, 0xa6, 0xdd, 0x70, 0x51, 0x8b, 0xf6, 0xaa, 0x8b, 0x65, 0xa5, 0xd5, 0x10, 0xe6, 0xf5, 0x8, 0x4f, 0x5e, 0xca, 0xef, 0x10, 0x8f, 0x6e, 0x65, 0x64, 0x3, 0x2a, 0xd9, 0x25, 0x9e, 0x84, 0x6, 0x7, 0x6b, 0x93, 0x48, 0xce, 0x33, 0x70, 0x5, 0xfa, 0x4b, 0x20, 0x5f, 0x47, 0x73, 0x6a, 0x79, 0x69, 0x3c, 0x7e, 0x96, 0x36, 0x35, 0xea, 0x63, 0x4c, 0xa6, 0x7b, 0x97, 0x49, 0xa0, 0x98, 0xb2, 0x99, 0x87, 0x99, 0x73, 0xca, 0x9c, 0xb3, 0x55, 0xb1, 0x8, 0xd, 0xe5, 0xa9, 0x5, 0x4c, 0x7f, 0x39, 0xc1, 0x58, 0xaa, 0xe4, 0xe2, 0x5b, 0xf7, 0x2c, 0x5, 0x47, 0xfd, 0xa9, 0xf6, 0x6a, 0x23, 0x4a, 0xc3, 0xe2, 0xdf, 0x8d, 0xd2, 0x27, 0x52, 0xae, 0x66, 0xd2, 0x6f, 0xdb, 0x32, 0x51, 0x5b, 0x9e, 0x92, 0x39, 0xd1, 0xb5, 0x83, 0xa3, 0x14, 0xae, 0x23, 0x1d, 0xbd, 0xce, 0x90, 0x13, 0xda, 0x4f, 0x98, 0x21, 0x3c, 0xd6, 0xab, 0x9f, 0x42, 0x58, 0x2f, 0x62, 0xd6, 0x39, 0xe2, 0xc, 0xd1, 0x83, 0x56, 0xf, 0x34, 0x10, 0x7, 0xc6, 0x0, 0xb2, 0xe0, 0x12, 0x33, 0x9, 0x8f, 0xc6, 0x1a, 0x50, 0xc2, 0x7d, 0x94, 0x98, 0x22, 0xc6, 0xf9, 0x9f, 0xda, 0x51, 0xad, 0x78, 0x8b, 0xae, 0x10, 0x1c, 0xc3, 0x79, 0xb4, 0x8a, 0xc8, 0xcf, 0xac, 0x3b, 0x5d, 0xf8, 0x1c, 0x9f, 0x7b, 0x4e, 0x1e, 0x3, 0x53, 0xf7, 0xf1, 0xa, 0xb3, 0x40, 0x15, 0x7f, 0xc7, 0xa8, 0xf9, 0x2f, 0xfc, 0x43, 0xd3, 0x1f, 0x24, 0xb4, 0x98, 0xb3, 0x81, 0xc7, 0xb2, 0xb, 0xf0, 0xa3, 0x1b, 0x74, 0xc4, 0x56, 0x27, 0xb9, 0xe9, 0x85, 0x8d, 0x84, 0x79, 0xaf, 0x59, 0x77, 0x78, 0x2a, 0x5f, 0xa8, 0x8d, 0x25, 0x8e, 0xbc, 0xe9, 0x7e, 0x6d, 0xf, 0xa0, 0x97, 0x1d, 0xbf, 0xca, 0xb6, 0xaf, 0xbb, 0x30, 0x11, 0xf9, 0xcc, 0x24, 0xd8, 0xc4, 0xe3, 0xdb, 0x57, 0x69, 0x8e, 0x29, 0x9f, 0x67, 0x93, 0x74, 0x18, 0x10, 0xe2, 0xa9, 0x42, 0x95, 0xd0, 0xd9, 0x1f, 0x3f, 0x76, 0x9f, 0x18, 0x4d, 0xa2, 0xff, 0xfc, 0xa7, 0x71, 0xa1, 0x48, 0x72, 0x8a, 0x2f, 0x95, 0x23, 0x7b, 0x77, 0x86, 0x4d, 0xea, 0x20, 0xd8, 0xe, 0x9, 0xe7, 0xa0, 0xa3, 0x66, 0x37, 0x6, 0x28, 0x0, 0x6, 0x5a, 0xcf, 0x15, 0x57, 0x23, 0x55, 0xbe, 0xa8, 0xdf, 0xe2, 0x75, 0x9, 0xf4, 0xa7, 0x57, 0x7, 0x9b, 0xea, 0x6d, 0x6d, 0xf3, 0x42, 0x93, 0x53, 0xaa, 0xeb, 0x77, 0x77, 0xa1, 0x43, 0xe3, 0xed, 0x1a, 0x20, 0xde, 0x48, 0x71, 0x62, 0xf6, 0x66, 0x6b, 0xa5, 0xd2, 0x7e, 0xb9, 0xd3, 0x50, 0xd6, 0xa5, 0xc7, 0x24, 0xbf, 0x19, 0xa1, 0xd0, 0x58, 0xac, 0xde, 0xf1, 0x26, 0xf6, 0x0, 0x8e, 0xbc, 0xd1, 0x92, 0x51, 0x6f, 0xb0, 0xd4, 0x79, 0x7d, 0xd5, 0xfd, 0x32, 0x16, 0xa9, 0xcd, 0xcd, 0x2e, 0xe2, 0x4a, 0x2c, 0x40, 0xbb, 0x2c, 0xbf, 0xf7, 0x5c, 0xc5, 0x9d, 0xb2, 0xe3, 0xcd, 0xd8, 0xdf, 0x4e, 0xb, 0x36, 0xa6, 0x70, 0x95, 0x2b, 0x7, 0x87, 0x1a, 0x2, 0x99, 0xee, 0xda, 0x93, 0x77, 0xe8, 0x29, 0x6a, 0xd3, 0x78, 0x8c, 0x78, 0x72, 0x8d, 0xe7, 0x1d, 0x31, 0x24, 0x1f, 0x20, 0xc2, 0xb2, 0x4, 0x69, 0x28, 0xca, 0x27, 0x51, 0xbe, 0xbd, 0x10, 0xbc, 0xc, 0x45, 0x5f, 0x49, 0xf3, 0xd, 0x7a, 0xd9, 0x79, 0xb0, 0xd8, 0x6b, 0x66, 0xa5, 0x54, 0x29, 0x85, 0x3a, 0xab, 0x62, 0x57, 0x5f, 0x92, 0x19, 0x48, 0x36, 0x3, 0x92, 0x4b, 0x4d, 0x39, 0x93, 0x54, 0x89, 0xe8, 0xb2, 0xad, 0x6e, 0x10, 0x5b, 0x8d, 0x11, 0xe7, 0x47, 0x85, 0xfe, 0xa9, 0xd1, 0xa9, 0x37, 0x7d, 0x18, 0x9b, 0xa2, 0x90, 0xcd, 0x41, 0x4f, 0x57, 0xed, 0x67, 0x13, 0x75, 0x23, 0xa3, 0x55, 0xf9, 0xc, 0x9f, 0xf5, 0xff, 0x2c, 0xb7, 0x60, 0xd4, 0xa3, 0x1f, 0xaa, 0x2f, 0x1c, 0x47, 0x8f, 0x95, 0x47, 0xfe, 0x4c, 0x4b, 0xb, 0x1c, 0xbb, 0xd7, 0x1b, 0x69, 0xf, 0xb3, 0xee, 0xae, 0xf8, 0x7a, 0x53, 0xea, 0xa1, 0xeb, 0x65, 0x26, 0xb7, 0x48, 0x89, 0x63, 0xfb, 0x64, 0xd1, 0x7b, 0x37, 0xbb, 0x38, 0x71, 0x5, 0xe3, 0x99, 0x69, 0xdb, 0xab, 0xcd, 0x79, 0xec, 0x28, 0xdf, 0xfb, 0x5a, 0x61, 0xa1, 0x10, 0x1b, 0x34, 0xc1, 0x42, 0x2, 0xbd, 0xe, 0xc1, 0xcf, 0x80, 0xe, 0x21, 0xd6, 0x95, 0xab, 0xab, 0xa4, 0x94, 0x43, 0x1d, 0xda, 0xa2, 0xd, 0x88, 0xed, 0x75, 0x1, 0xad, 0x36, 0xf, 0x9b, 0x6e, 0xd4, 0x1b, 0x4c, 0xcd, 0xd0, 0xfb, 0x57, 0x78, 0xcf, 0x53, 0xd7, 0xc1, 0x8c, 0x36, 0xc4, 0xba, 0x78, 0x3e, 0x68, 0xb9, 0xb0, 0xd2, 0x6c, 0x7b, 0xbc, 0xb3, 0xb2, 0xa0, 0x15, 0xbb, 0x1e, 0x2f, 0xb5, 0x1f, 0xa9, 0xc3, 0x23, 0xc0, 0x8a, 0x72, 0x51, 0xe4, 0x8f, 0x14, 0xa, 0x4e, 0x51, 0x9b, 0x1c, 0x38, 0x9e, 0xf, 0xe4, 0xa8, 0x7b, 0x9d, 0x65, 0xb8, 0xd9, 0x1a, 0x20, 0x81, 0x40, 0x5f, 0x5, 0xd0, 0x1f, 0x71, 0x2, 0x4a, 0x56, 0xba, 0x89, 0x55, 0xa, 0x41, 0x8b, 0xfa, 0xc2, 0x86, 0x39, 0x28, 0xbc, 0x87, 0x4, 0x13, 0xce, 0xde, 0x14, 0x11, 0xf0, 0xd7, 0xc3, 0xe7, 0x7c, 0x76, 0xb, 0x76, 0xe0, 0xd9, 0x4f, 0x7d, 0x9a, 0xde, 0xda, 0xbe, 0x9e, 0x4a, 0x63, 0x2b, 0x6a, 0x1f, 0xb5, 0xcc, 0xbf, 0x8e, 0xb2, 0xcf, 0xe7, 0x72, 0xfc, 0x31, 0xdc, 0xd, 0x1b, 0xa6, 0x3a, 0xde, 0xf2, 0x1c, 0xae, 0xbf, 0x84, 0x64, 0x18, 0xc6, 0xad, 0xf2, 0xe4, 0x74, 0xed, 0xb4, 0xa0, 0x20, 0x72, 0x71, 0xc3, 0x26, 0xf1, 0x4d, 0x20, 0xc0, 0xb9, 0x5e, 0x1a, 0xf7, 0xd8, 0x63, 0x31, 0xf0, 0xd4, 0xf7, 0x92, 0xd7, 0x54, 0x58, 0x74, 0xf5, 0x50, 0x89, 0x2b, 0x3e, 0x8, 0x1f, 0xcf, 0xac, 0x60, 0x74, 0xe1, 0x72, 0xf8, 0x82, 0x6e, 0x4, 0xf2, 0x89, 0x20, 0x14, 0x20, 0xf0, 0x64, 0xff, 0x3c, 0x53, 0xac, 0x7b, 0x9a, 0x15, 0xa2, 0x91, 0xe8, 0x78, 0xb5, 0x90, 0xb3, 0xf4, 0x7f, 0x53, 0xe6, 0xcc, 0xbb, 0xa8, 0x97, 0x65, 0x3d, 0x6f, 0xf4, 0xc6, 0xcb, 0xfa, 0xc9, 0xc, 0xb8, 0x66, 0x6c, 0x86, 0xdf, 0xca, 0x4d, 0x55, 0x4d, 0x8b, 0x87, 0xad, 0x1e, 0xd5, 0xbd, 0x39, 0x41, 0x1e, 0xa3, 0x5a, 0x41, 0x7a, 0x51, 0xf9, 0x11, 0x9b, 0x63, 0x9, 0x4, 0xbe, 0x65, 0x75, 0xaa, 0x25, 0x7b, 0xe5, 0x47, 0x16, 0xa7, 0x88, 0x92, 0x29, 0x72, 0xcf, 0xdc, 0x5a, 0x5b, 0xcb, 0x4b, 0x60, 0x54, 0x53, 0x2a, 0xab, 0x91, 0x3e, 0x7d, 0x8b, 0xf, 0x5a, 0x45, 0x1, 0x80, 0xa3, 0xe7, 0xde, 0xef, 0x61, 0xbb, 0x8, 0x15, 0x12, 0xd, 0x78, 0x69, 0x8, 0x62, 0x91, 0xc3, 0xf3, 0xdf, 0xb7, 0x10, 0x14, 0xbc, 0x66, 0xe3, 0xd5, 0xc8, 0x85, 0x4b, 0x52, 0xe8, 0x0, 0xc8, 0xf6, 0x47, 0x65, 0xc4, 0x8, 0x9e, 0x48, 0x20, 0x12, 0x55, 0xe, 0x23, 0x77, 0x10, 0x4f, 0x93, 0xae, 0x57, 0xf0, 0x47, 0xa3, 0x5c, 0xd, 0xb2, 0x43, 0xbd, 0xc7, 0xe1, 0x84, 0x6b, 0xa0, 0xd0, 0xeb, 0x42, 0xaa, 0xf9, 0x77, 0x42, 0x98, 0x4d, 0x26, 0x37, 0xc2, 0xf2, 0xbe, 0xfa, 0x40, 0x21, 0x39, 0x0, 0xc3, 0xaf, 0x5a, 0x75, 0x8f, 0x85, 0xfd, 0x43, 0x42, 0xf9, 0xfc, 0xb, 0x38, 0x21, 0xff, 0x97, 0xb5, 0x30, 0x23, 0x32, 0xdb, 0x2d, 0xde, 0xb6, 0x88, 0xc8, 0x57, 0x26, 0x91, 0xaa, 0xc5, 0xaf, 0xd7, 0x77, 0xc5, 0xac, 0x88, 0x20, 0x9, 0x93, 0xd3, 0xef, 0x10, 0xa, 0x5f, 0x95, 0xb5, 0x1a, 0xa9, 0x28, 0x81, 0xac, 0xaa, 0x5f, 0xaf, 0x68, 0xe6, 0x13, 0x42, 0x21, 0x39, 0x1c, 0x4, 0xa8, 0x8c, 0x7c, 0x7, 0xcb, 0x39, 0xd0, 0x7d, 0x5a, 0x24, 0x5a, 0xee, 0xd, 0x63, 0x39, 0x50, 0x18, 0xc0, 0xc8, 0xe1, 0xd4, 0x5b, 0xb6, 0x40, 0x22, 0xc, 0x2f, 0x99, 0x38, 0x31, 0xdc, 0xe2, 0x59, 0x71, 0x33, 0xc8, 0x70, 0x14, 0xd1, 0x2f, 0x5c, 0xed, 0x52, 0x1a, 0xa4, 0x52, 0x73, 0xf7, 0x43, 0x4d, 0xa8, 0xac, 0xca, 0x2f, 0xe3, 0x5a, 0x26, 0xfe, 0xed, 0xcf, 0x70, 0x1a, 0xf1, 0x32, 0x8e, 0x4c, 0x23, 0x58, 0xbf, 0x74, 0x51, 0x3c, 0xdf, 0xbb, 0x6a, 0x8, 0x64, 0xea, 0x96, 0x70, 0xc2, 0x81, 0xc5, 0xe7, 0xc5, 0x1e, 0x26, 0xf3, 0xde, 0x15, 0x64, 0x99, 0x85, 0xde, 0x90, 0xab, 0xbc, 0xfc, 0x2d, 0x85, 0xc2, 0x68, 0x86, 0xf0, 0xa0, 0xc3, 0x3c, 0x8f, 0xd7, 0x4e, 0x33, 0x12, 0x2c, 0x42, 0x1, 0x2f, 0x1c, 0x5e, 0xcd, 0xd0, 0x1f, 0xf9, 0x6f, 0xd7, 0x5c, 0x6b, 0x6, 0x7c, 0x60, 0xf2, 0x50, 0x10, 0x88, 0xe2, 0xc8, 0xc2, 0x53, 0xa, 0x1, 0x91, 0xc1, 0x7a, 0x11, 0x3b, 0x38, 0x24, 0x3, 0x45, 0x41, 0x45, 0x69, 0xb3, 0xb8, 0xf, 0x8d, 0xb7, 0x55, 0xdc, 0x33, 0x62, 0xc5, 0x2d, 0xd1, 0xd3, 0x6c, 0x6, 0xd0, 0x24, 0x42, 0xc3, 0xaf, 0xd2, 0x40, 0x58, 0x34, 0x3f, 0x9c, 0xfc, 0x69, 0x31, 0xcc, 0xa0, 0x44, 0x2d, 0x3c, 0xa2, 0xcc, 0xc8, 0x4c, 0x62, 0x67, 0xc4, 0x2c, 0xc8, 0x5f, 0x4d, 0x6b, 0xb7, 0x8f, 0x34, 0xdf, 0x54, 0xd4, 0xe2, 0x2, 0x5, 0xd7, 0xc3, 0x79, 0xd9, 0x24, 0xc6, 0x49, 0xac, 0x7e, 0xa8, 0xfc, 0x12, 0x7b, 0x7e, 0xe2, 0x88, 0x6, 0x4b, 0x2b, 0x69, 0xfa, 0x95, 0xc9, 0x3f, 0xe, 0xd, 0xf1, 0xe8, 0x63, 0xc5, 0x90, 0xe2, 0x6, 0x9a, 0x9, 0x98, 0xa3, 0xc2, 0xb9, 0x9c, 0x95, 0xb6, 0x90, 0xb5, 0xf7, 0x1, 0x4f, 0x40, 0x1b, 0xef, 0xaa, 0x83, 0x5c, 0xfb, 0x41, 0x4c, 0xca, 0x8a, 0x5b, 0x7c, 0xd0, 0x27, 0xe5, 0x2a, 0xe3, 0xac, 0xd2, 0x1b, 0x61, 0x8b, 0x6c, 0x9d, 0x1e, 0x24, 0xe, 0x5d, 0xa3, 0xa5, 0xf9, 0xd2, 0xef, 0x4f, 0x9a, 0xae, 0x6b, 0x32, 0x24, 0x7, 0xf, 0xc4, 0x1c, 0x13, 0x2, 0x51, 0xd9, 0x3e, 0x8e, 0x4a, 0x94, 0x52, 0xa3, 0xa2, 0xac, 0xe2, 0xe9, 0x19, 0xb6, 0xcb, 0xe2, 0x48, 0xa3, 0xea, 0xb6, 0x47, 0x9f, 0xfe, 0x4a, 0xcc, 0x55, 0xea, 0xf5, 0x4d, 0xad, 0xa9, 0xa8, 0x41, 0x30, 0xcd, 0x6b, 0xbb, 0xb, 0xe4, 0x16, 0x37, 0x55, 0x8a, 0x17, 0x9, 0x82, 0xea, 0xe9, 0xa8, 0x88, 0x53, 0xfc, 0xbf, 0xa6, 0xcb, 0x7, 0x68, 0x41, 0xa8, 0xe3, 0x6e, 0x88, 0x24, 0xd2, 0x1a, 0xd2, 0xe3, 0xad, 0x1d, 0x7f, 0x82, 0x9a, 0x5b, 0x13, 0x29, 0x6b, 0x15, 0xd0, 0x5, 0x3b, 0xdd, 0x52, 0x1d, 0x7d, 0x15, 0xe7, 0x6b, 0x35, 0x6d, 0x62, 0xf0, 0x2e, 0xe2, 0xe, 0xb7, 0x8d, 0x4, 0x83, 0x8a, 0xf7, 0xe4, 0xb0, 0x84, 0xb0, 0xd2, 0x57, 0x5e, 0xde, 0x7d, 0xe2, 0x13, 0xc, 0x54, 0x72, 0xd8, 0xeb, 0x18, 0x39, 0xc1, 0x9f, 0xde, 0x6, 0xd7, 0xe7, 0x7b, 0xac, 0xfa, 0xe1, 0x5, 0x8a, 0xa, 0x19, 0xee, 0xc6, 0x48, 0x54, 0x85, 0xd4, 0x1, 0xa7, 0xa, 0x89, 0x20, 0x29, 0xa, 0xee, 0x1d, 0xf, 0x36, 0xc6, 0x73, 0x24, 0xa6, 0xd8, 0x7d, 0x3b, 0x96, 0x28, 0xff, 0x69, 0x47, 0x9a, 0xea, 0x47, 0x40, 0xab, 0x9f, 0x25, 0x63, 0x89, 0x5d, 0x41, 0x8f, 0x9a, 0x5f, 0x4, 0xc6, 0x7c, 0xb4, 0x52, 0x91, 0x15, 0x14, 0x66, 0x29, 0xca, 0xdf, 0x3c, 0x19, 0x49, 0xb3, 0xaf, 0xf5, 0xe, 0x89, 0x76, 0x0, 0x36, 0x88, 0xa3, 0x76, 0xc5, 0xe8, 0x89, 0xaa, 0xb, 0x76, 0x40, 0x27, 0x33, 0x5f, 0xd8, 0x17, 0x4f, 0x64, 0x8c, 0x3e, 0x7, 0x2c, 0xf4, 0x61, 0x8f, 0xf2, 0xc2, 0x18, 0x95, 0x21, 0x5, 0x6c, 0x3, 0xbc, 0x2e, 0x53, 0xf, 0xb8, 0x9b, 0x39, 0x1c, 0xc5, 0x62, 0x79, 0x64, 0xa6, 0x55, 0x5e, 0x8c, 0xcf, 0x10, 0x2d, 0x62, 0x8c, 0xf1, 0xb3, 0xef, 0x1c, 0x32, 0x49, 0x90, 0x13, 0xcc, 0x37, 0xd8, 0x1a, 0xe, 0x8e, 0x3e, 0x3, 0x3f, 0xac, 0xf4, 0x1c, 0x12, 0x95, 0xf3, 0xf8, 0xab, 0xe3, 0x17, 0xd1, 0xcf, 0x1d, 0x2b, 0x1c, 0x5f, 0xb8, 0x91, 0xe1, 0x97, 0xcc, 0xa3, 0x42, 0x25, 0x22, 0xa4, 0xb6, 0x8c, 0x64, 0x81, 0xd4, 0xc7, 0x45, 0x56, 0xe0, 0x5e, 0x6, 0xd0, 0xe4, 0x5b, 0xe2, 0x94, 0xe9, 0x10, 0x63, 0x2b, 0x74, 0x7f, 0x3f, 0xb3, 0x4f, 0xe5, 0xd3, 0xac, 0x1, 0x26, 0x90, 0xd9, 0xe3, 0xb7, 0xa4, 0x33, 0x8f, 0xd5, 0x88, 0x18, 0xe6, 0x22, 0xae, 0x7f, 0x71, 0xdd, 0x90, 0xa3, 0x40, 0x81, 0x49, 0x62, 0x15, 0xd8, 0xf2, 0x24, 0x25, 0x2c, 0x50, 0xcb, 0x1b, 0xbf, 0xaa, 0x8, 0x81, 0xf, 0xb6, 0xb4, 0xd0, 0xda, 0x50, 0xd0, 0x7, 0xad, 0x6d, 0x53, 0x9, 0xe5, 0xc0, 0xe2, 0x7f, 0xd9, 0x1b, 0x8b, 0x34, 0x37, 0x46, 0xb6, 0xcb, 0xed, 0x10, 0x83, 0xf9, 0x15, 0x23, 0xa7, 0xb5, 0x1b, 0x90, 0x46, 0x73, 0x7f, 0x71, 0x14, 0xf5, 0x7, 0xbd, 0x76, 0x68, 0x83, 0x5c, 0xe2, 0xea, 0xe7, 0x39, 0x86, 0x17, 0xe3, 0xf2, 0x98, 0xf5, 0xb8, 0xb3, 0x89, 0x66, 0xa9, 0xbd, 0xb3, 0xbe, 0xb3, 0x42, 0xee, 0xfb, 0xe6, 0x13, 0x68, 0xdd, 0x83, 0x2, 0x74, 0x7c, 0x68, 0x2b, 0x83, 0xc3, 0xad, 0x4e, 0x18, 0x4a, 0x5f, 0x8d, 0xa2, 0xcc, 0xc4, 0xf7, 0xee, 0x99, 0xa3, 0x31, 0x56, 0x27, 0x4d, 0x97, 0x13, 0x41, 0x26, 0xb0, 0xb8, 0x96, 0x27, 0xd8, 0x11, 0xbf, 0x7, 0xf7, 0x68, 0x3e, 0x84, 0xc, 0x51, 0xf1, 0x5b, 0x71, 0x1d, 0x1d, 0xb0, 0xc3, 0xc4, 0x1b, 0xe9, 0x89, 0xe0, 0xf1, 0x56, 0xa5, 0xb9, 0x48, 0xdb, 0xff, 0xc1, 0x9b, 0x40, 0x47, 0xa7, 0xd9, 0x3c, 0x9d, 0x9a, 0x22, 0xdc, 0xdf, 0xc, 0x14, 0x89, 0x7b, 0x5c, 0xf2, 0x9d, 0x3, 0xcd, 0x42, 0x6c, 0x62, 0xe6, 0x1, 0x4e, 0xe3, 0x96, 0xc1, 0x14, 0x83, 0xee, 0xe8, 0x5a, 0x2d, 0x32, 0x12, 0x38, 0x7b, 0x5c, 0x48, 0xdf, 0x82, 0x52, 0xb2, 0x1d, 0xb4, 0xa, 0xec, 0x9f, 0x8a, 0x2a, 0x1a, 0xd8, 0xa5, 0x5b, 0xaf, 0x26, 0x38, 0x12, 0x9, 0x4e, 0x9c, 0x81, 0xd5, 0xc1, 0x8f, 0xe1, 0xfb, 0x56, 0x59, 0x3e, 0x51, 0x88, 0x8c, 0x8a, 0x2, 0x72, 0xea, 0x2f, 0x81, 0x89, 0x78, 0x2f, 0x46, 0x27, 0x83, 0xbc, 0x99, 0x65, 0x41, 0xb8, 0x6e, 0xee, 0x4f, 0x7b, 0xe5, 0x3d, 0x53, 0x5b, 0x4e, 0x85, 0xdd, 0x78, 0x6b, 0xd9, 0x82, 0xc5, 0xd4, 0x94, 0xea, 0x1, 0x7c, 0xbf, 0x35, 0x46, 0x17, 0xd2, 0x19, 0xa4, 0x95, 0xe6, 0x44, 0x8b, 0x0, 0x99, 0x2d, 0xf8, 0x3c, 0x94, 0xfa, 0xbb, 0x35, 0x67, 0xe7, 0x52, 0x20, 0x70, 0x5b, 0xc4, 0x49, 0xc2, 0x36, 0x7c, 0x11, 0x8c, 0x76, 0xef, 0x74, 0x82, 0xc9, 0xab, 0x77, 0xa1, 0xe0, 0xaf, 0xcd, 0x3d, 0xae, 0x4d, 0xbf, 0xb, 0x21, 0x1a, 0xd7, 0x9e, 0xf1, 0x41, 0x21, 0x7d, 0xb5, 0x99, 0xf4, 0xf7, 0x45, 0x57, 0xb9, 0x33, 0x36, 0x29, 0xa1, 0x1a, 0xb4, 0x82, 0xec, 0x3d, 0x70, 0x50, 0xd9, 0x5a, 0xe0, 0x52, 0xf3, 0xe1, 0xf8, 0x14, 0xf6, 0x30, 0xe9, 0x80, 0x9b, 0x87, 0x4, 0x6d, 0x1c, 0xc4, 0x8, 0x7, 0x6b, 0x5c, 0xdd, 0xdb, 0x90, 0xa3, 0x89, 0xf8, 0xeb, 0x3f, 0xdf, 0x64, 0xfc, 0x7d, 0xd7, 0x1e, 0x6c, 0xd, 0x5d, 0x6c, 0x2c, 0x2c, 0x50, 0x76, 0x22, 0xa3, 0x87, 0xc5, 0xa3, 0xae, 0x60, 0xa6, 0xd7, 0x23, 0xdf, 0xcc, 0xcd, 0x1b, 0x6a, 0x8, 0xb4, 0xc, 0xae, 0x54, 0xd6, 0xfa, 0x51, 0x9b, 0x58, 0x97, 0x49, 0x7e, 0xb, 0x97, 0x2b, 0xfa, 0x19, 0x66, 0xce, 0x2a, 0x3d, 0xb3, 0xfe, 0xfc, 0x41, 0xab, 0x33, 0x93, 0x17, 0x1b, 0xa4, 0x6b, 0xac, 0x2f, 0xa9, 0x3a, 0xe3, 0x61, 0x3c, 0xe8, 0x82, 0x73, 0xab, 0x92, 0x92, 0x1f, 0x4c, 0xf8, 0xa5, 0x84, 0xc, 0xce, 0x3f, 0x3b, 0x3c, 0x41, 0x62, 0x2e, 0xda, 0x57, 0xe3, 0x3b, 0x43, 0x6f, 0xf8, 0x10, 0x82, 0x68, 0xe3, 0x58, 0xcf, 0xe0, 0xaa, 0x72, 0xfd, 0xd, 0x2a, 0xd5, 0x57, 0x67, 0x12, 0x19, 0x5f, 0x63, 0x36, 0x29, 0x3b, 0xb3, 0x6, 0x7e, 0xd3, 0x89, 0xd6, 0x9b, 0x86, 0x18, 0xdf, 0xea, 0xa8, 0xcb, 0x1d, 0x12, 0xb4, 0x3b, 0x37, 0xb, 0x17, 0xd2, 0x9e, 0xc2, 0x3, 0x5e, 0xe9, 0x34, 0x8d, 0x69, 0xf0, 0xe6, 0x4d, 0xff, 0xd8, 0x9, 0x61, 0x68, 0xf6, 0xcf, 0x2, 0x6, 0x61, 0xe7, 0x2b, 0xf6, 0x4f, 0xa0, 0xd0, 0x3e, 0x6, 0x2, 0x75, 0xa, 0x7d, 0xa0, 0xda, 0xf4, 0xa4, 0xed, 0x90, 0x9b, 0xcf, 0x17, 0xe, 0x76, 0xea, 0xb0, 0x88, 0x9f, 0xf1, 0x5d, 0x84, 0xe9, 0xf8, 0x23, 0x3b, 0x3c, 0x57, 0xb3, 0x40, 0x84, 0xbf, 0xbe, 0x77, 0x32, 0x50, 0xa, 0x40, 0x34, 0xbf, 0xf2, 0x41, 0xae, 0x4b, 0x89, 0xf9, 0xbc, 0xb2, 0xbe, 0x60, 0x71, 0x5c, 0x14, 0xd3, 0xb2, 0xf5, 0xf8, 0xe3, 0xc9, 0xb9, 0xc7, 0xf7, 0xeb, 0x11, 0xe6, 0xb0, 0xeb, 0xe7, 0xc, 0x9b, 0x63, 0x57, 0x1a, 0xbd, 0xd5, 0xa1, 0xa, 0x86, 0xc8, 0xf9, 0xc2, 0xeb, 0x64, 0xf7, 0x7, 0x5e, 0xa1, 0xf0, 0xbc, 0x2, 0x57, 0x3b, 0xf8, 0x3c, 0x3a, 0xf6, 0x8c, 0xa8, 0x31, 0xe1, 0x6f, 0x5f, 0x40, 0xe5, 0x58, 0xae, 0x5, 0x57, 0xde, 0x3b, 0x4, 0x6d, 0x54, 0x18, 0xa1, 0xb, 0x9e, 0x23, 0xc, 0xcd, 0x22, 0xd4, 0xca, 0xdd, 0x50, 0xcc, 0x91, 0x2d, 0xf9, 0xa4, 0x2a, 0xf8, 0x2e, 0xc9, 0x7c, 0x91, 0xaa, 0xcf, 0x2, 0x72, 0x40, 0xf9, 0x5b, 0x19, 0xfa, 0xe3, 0xdd, 0xd3, 0x6e, 0xae, 0xb1, 0x1f, 0xa7, 0x9c, 0x6c, 0x17, 0xbc, 0x6a, 0x43, 0x79, 0x61, 0x51, 0x70, 0xf, 0x58, 0x7b, 0x64, 0xcf, 0x3a, 0x2e, 0xd5, 0x21, 0xb2, 0x2e, 0x36, 0xc8, 0x25, 0x9d, 0xad, 0x86, 0xde, 0x55, 0xf4, 0x6e, 0xb6, 0x65, 0xac, 0xc, 0xe9, 0xc5, 0x9d, 0x91, 0xd5, 0x31, 0x3, 0x69, 0xf8, 0x87, 0x54, 0xcc, 0xb1, 0x48, 0x4f, 0x49, 0x99, 0xb9, 0xdb, 0xe3, 0x1a, 0x90, 0x85, 0xc5, 0xd8, 0xac, 0x64, 0xb6, 0x24, 0x90, 0x4a, 0x63, 0xdf, 0x3d, 0x1d, 0xab, 0x99, 0x4e, 0xa, 0x84, 0x53, 0x65, 0xcc, 0x6d, 0xaa, 0xf4, 0x76, 0x33, 0xf3, 0x2a, 0x92, 0x9a, 0xc7, 0x4b, 0x9e, 0x8a, 0x76, 0xf4, 0x9, 0x1d, 0xa8, 0xe, 0x49, 0xf3, 0xaa, 0xeb, 0xba, 0x70, 0x54, 0x4d, 0x17, 0x5, 0xb6, 0xe, 0x40, 0x80, 0x55, 0xf0, 0x7e, 0x3c, 0xc7, 0x1f, 0xd, 0x2c, 0xea, 0x3b, 0x4b, 0x16, 0xd5, 0x99, 0x5a, 0x6a, 0x9f, 0x47, 0x64, 0x66, 0x76, 0x5b, 0xed, 0xb2, 0xbd, 0x44, 0xf9, 0x7d, 0x45, 0x85, 0x8d, 0x14, 0x3, 0xc6, 0x34, 0x88, 0x84, 0xac, 0x71, 0x63, 0xae, 0xb2, 0x13, 0x64, 0x53, 0x4d, 0x8c, 0x19, 0xb0, 0x79, 0x6c, 0xcb, 0x50, 0x7d, 0x94, 0x41, 0xf6, 0x26, 0x67, 0x25, 0xfd, 0xb3, 0x40, 0xac, 0x11, 0x59, 0xd7, 0xc6, 0x3e, 0xd0, 0xc5, 0xab, 0x42, 0xda, 0xa9, 0x91, 0x8c, 0xa, 0x3d, 0xab, 0x2f, 0xa7, 0xf, 0x84, 0xd4, 0x99, 0xac, 0xdb, 0xac, 0x62, 0xf7, 0x42, 0x1, 0x30, 0x2d, 0x6e, 0x2b, 0x85, 0x4e, 0x37, 0xb1, 0xc7, 0x90, 0x19, 0x6e, 0x87, 0x8a, 0xdc, 0x3, 0xc0, 0x1, 0xf0, 0x6, 0xd2, 0x19, 0x6c, 0x28, 0x5f, 0xe5, 0x0, 0x1f, 0xe3, 0x95, 0x79, 0x5d, 0x84, 0x3b, 0x2a, 0xee, 0x6f, 0x7d, 0x6c, 0x22, 0xac, 0xc3, 0xa4, 0x23, 0x7, 0xf5, 0xf3, 0xff, 0xa8, 0x61, 0xe9, 0x96, 0xf1, 0x69, 0x31, 0x82, 0x48, 0xc3, 0xc4, 0x1b, 0xf9, 0xd1, 0xa5, 0x1b, 0xdb, 0xcf, 0x5a, 0x33, 0xa7, 0x98, 0x15, 0x6, 0x3e, 0x7, 0xcd, 0xf5, 0xa0, 0xc4, 0x67, 0x6e, 0xc9, 0x6a, 0xb5, 0x76, 0xd2, 0x7e, 0x11, 0x7b, 0x3d, 0xff, 0x7a, 0x2f, 0x1d, 0xd2, 0x19, 0xa1, 0xf1, 0xb1, 0x63, 0x7a, 0x64, 0xf3, 0x8b, 0x12, 0x2d, 0x60, 0xb9, 0x50, 0x1b, 0xbe, 0x36, 0x39, 0xcb, 0x76, 0xd8, 0xe7, 0x46, 0x16, 0x5e, 0xbb, 0xeb, 0xb9, 0x6, 0x92, 0x46, 0x1b, 0x61, 0x8, 0x6e, 0xae, 0x6f, 0x6f, 0x5a, 0xa5, 0xe0, 0x5, 0x3d, 0x84, 0xb6, 0xfc, 0xa8, 0x14, 0x7d, 0x97, 0x6d, 0xe8, 0x1, 0xb1, 0x1b, 0x30, 0x6c, 0x1a, 0x50, 0x61, 0x10, 0xc6, 0xa8, 0xb0, 0xff, 0x62, 0x23, 0x68, 0x89, 0x71, 0x8b, 0x18, 0xb5, 0x50, 0x7c, 0xc2, 0xed, 0x7, 0x3f, 0x1a, 0xc4, 0x8a, 0xd1, 0xdb, 0x1a, 0xa7, 0x71, 0x29, 0x56, 0x34, 0x27, 0x2f, 0x33, 0x83, 0x23, 0xae, 0x5d, 0xc1, 0xfb, 0x19, 0xb9, 0x37, 0xd8, 0x91, 0xef, 0xe2, 0xe9, 0x60, 0xb1, 0x7d, 0x34, 0x3e, 0x38, 0xf2, 0xf2, 0x8, 0xd4, 0xb8, 0xce, 0x21, 0xf2, 0x5f, 0xe8, 0x7b, 0x5f, 0x12, 0x3, 0x8e, 0xc5, 0x7e, 0x29, 0xc7, 0x40, 0x79, 0x14, 0x47, 0x3e, 0x96, 0xc3, 0x65, 0x41, 0x62, 0xe5, 0xdf, 0xab, 0x99, 0x39, 0xa0, 0x11, 0xba, 0xac, 0xce, 0x48, 0x1, 0x8, 0x98, 0xf1, 0x15, 0x77, 0x40, 0x78, 0x9, 0x46, 0xb6, 0x7e, 0x5a, 0x44, 0xd4, 0x92, 0x40, 0xb1, 0xa6, 0x94, 0xf6, 0x79, 0xcd, 0x68, 0x9e, 0x72, 0xb, 0x3, 0x81, 0xad, 0xc6, 0x91, 0xc8, 0xb2, 0x4d, 0xe8, 0xea, 0x99, 0xa4, 0xc7, 0x39, 0xfd, 0x5a, 0x82, 0xc0, 0x6c, 0xe1, 0x2c, 0x9d, 0xf3, 0x34, 0xe9, 0x1c, 0x63, 0xb4, 0x8c, 0xb8, 0x33, 0xcd, 0xe, 0x57, 0xd2, 0x43, 0x5f, 0xbe, 0x1a, 0x60, 0x83, 0x27, 0x8a, 0xaf, 0x57, 0x4e, 0x2c, 0xb, 0x70, 0x6a, 0x27, 0x62, 0x5f, 0xb4, 0x93, 0x4e, 0x13, 0x91, 0x63, 0x0, 0x6f, 0xf9, 0x13, 0x19, 0x77, 0x3e, 0x99, 0x6e, 0x8, 0xe9, 0x1e, 0xb, 0xbf, 0x55, 0x77, 0x99, 0x71, 0xd4, 0x58, 0x24, 0x1c, 0xc2, 0x7b, 0x4a, 0xdb, 0x43, 0xf3, 0xc5, 0x25, 0x33, 0xf4, 0xa6, 0x13, 0x65, 0x95, 0x6f, 0x49, 0x63, 0x32, 0xaf, 0x91, 0xa4, 0xb5, 0xc, 0x21, 0x36, 0x5c, 0x5d, 0xa8, 0x2f, 0xea, 0xfc, 0x6e, 0xd8, 0x19, 0x54, 0x5c, 0x23, 0xe3, 0x15, 0x30, 0x20, 0xb8, 0x64, 0x71, 0x56, 0x3a, 0xf4, 0x1, 0x43, 0xa9, 0x21, 0x36, 0x58, 0xea, 0xb2, 0x32, 0x1f, 0x56, 0x67, 0xa8, 0x5d, 0xe8, 0x8d, 0x6a, 0xd7, 0x7d, 0x3a, 0xcc, 0x20, 0x5d, 0x13, 0xd, 0xb4, 0xd8, 0x89, 0x1, 0xe9, 0x2f, 0x6c, 0xc8, 0x38, 0x6a, 0x60, 0xcd, 0xbe, 0x8c, 0x60, 0x4d, 0x2c, 0x57, 0x79, 0x39, 0xb4, 0x4f, 0x6b, 0x6e, 0x8d, 0xb7, 0x38, 0x3, 0x30, 0x84, 0xf8, 0x49, 0x90, 0x93, 0x2a, 0x21, 0xf8, 0xff, 0x91, 0xa0, 0x9a, 0x28, 0xba, 0x11, 0x73, 0xb2, 0xdd, 0xb3, 0x24, 0x22, 0xc9, 0x99, 0xeb, 0x42, 0xaf, 0xea, 0x2, 0x17, 0x2a, 0x14, 0x51, 0xbd, 0x90, 0x70, 0xe2, 0x81, 0x88, 0x50, 0x24, 0xbb, 0xbe, 0x70, 0x8, 0xe3, 0x40, 0x88, 0x1b, 0xb2, 0xcd, 0x61, 0xeb, 0x36, 0xb6, 0xdd, 0x4a, 0xa3, 0x88, 0x3a, 0x79, 0xb8, 0x39, 0x9a, 0xcb, 0x86, 0x56, 0xd0, 0xdf, 0xd7, 0x52, 0x0, 0x63, 0xff, 0x1f, 0xf9, 0x5a, 0x62, 0x37, 0x6c, 0x1c, 0x99, 0xad, 0xf2, 0xdc, 0xdf, 0xe, 0x62, 0xe0, 0x6f, 0xdd, 0x1c, 0x23, 0xe8, 0xb4, 0xb2, 0x5d, 0xaa, 0xc3, 0x17, 0x91, 0xec, 0x77, 0x2d, 0xc9, 0x6e, 0xc1, 0xe8, 0xcc, 0xc4, 0xfb, 0x54, 0x55, 0x35, 0x7d, 0xd6, 0xc3, 0x26, 0x82, 0xb2, 0x7f, 0xc9, 0x29, 0xe5, 0xf2, 0x8c, 0xaf, 0x9f, 0xd9, 0xeb, 0xfe, 0xd7, 0x3a, 0x13, 0xb0, 0xd7, 0x4d, 0x9d, 0x47, 0x48, 0xd, 0xbc, 0x7d, 0x95, 0x50, 0x7, 0x8b, 0x25, 0x49, 0x2c, 0x9e, 0x2d, 0x3e, 0x3f, 0x5a, 0x86, 0xf5, 0x8f, 0xa, 0xd3, 0x57, 0x44, 0xed, 0xf2, 0x14, 0xe3, 0xf8, 0x10, 0x7, 0x5e, 0x77, 0xbe, 0x79, 0x7d, 0xe0, 0x86, 0x2d, 0x4b, 0x3e, 0x77, 0x14, 0x6, 0xf6, 0x0, 0x7f, 0x7c, 0x29, 0x42, 0x6c, 0x16, 0xfb, 0x3c, 0xc5, 0x48, 0x34, 0x98, 0x64, 0x6f, 0xdd, 0xe6, 0x44, 0xc5, 0x54, 0x2b, 0x28, 0x37, 0x10, 0x19, 0xef, 0xef, 0xe5, 0xf, 0x29, 0xb2, 0x47, 0x9c, 0xc6, 0x8e, 0x7c, 0x40, 0xd6, 0x81, 0xd8, 0xe4, 0x96, 0x35, 0x6d, 0x71, 0xbe, 0x30, 0x79, 0x88, 0x97, 0xae, 0x49, 0x64, 0x16, 0xd7, 0xa3, 0xab, 0x97, 0x51, 0xcf, 0xeb, 0xb1, 0x43, 0xe0, 0xc, 0x3, 0x6c, 0x54, 0x2f, 0x79, 0xf6, 0x9f, 0x5, 0x18, 0x87, 0xe4, 0x29, 0x84, 0x95, 0x4e, 0xa5, 0x84, 0x4d, 0xad, 0xf5, 0x6b, 0x9b, 0xbd, 0x19, 0xe8, 0xd2, 0xc, 0xb9, 0xa4, 0xea}, - output224: []byte{0x1a, 0x74, 0x28, 0xb, 0x21, 0x7a, 0x3d, 0xa3, 0x2a, 0xce, 0x42, 0xd8, 0xae, 0x85, 0xdc, 0xf9, 0x4c, 0x33, 0x19, 0x98, 0xc2, 0xb1, 0x16, 0xff, 0x56, 0x86, 0x8d, 0x90}, - output256: []byte{0x7c, 0x96, 0xcf, 0xf2, 0xd7, 0xca, 0xf0, 0x2d, 0x6f, 0xcd, 0x46, 0xa3, 0x12, 0xc, 0x1d, 0xd9, 0x40, 0xfa, 0xb7, 0xbc, 0x5b, 0x70, 0xcf, 0x97, 0xe1, 0x82, 0xcc, 0xf7, 0x1a, 0xbe, 0xb6, 0x43}, - output384: []byte{0x6b, 0xdf, 0x6f, 0xd1, 0x83, 0xad, 0x49, 0xa1, 0xed, 0x91, 0xd9, 0xa0, 0x2d, 0xa0, 0x99, 0xf9, 0x56, 0x89, 0xf4, 0x37, 0x3e, 0xb5, 0x31, 0xd, 0xd4, 0xc1, 0xad, 0xd4, 0x51, 0xc8, 0xf6, 0x82, 0xe8, 0x89, 0x5e, 0xde, 0xf3, 0x4b, 0x5e, 0xf1, 0xe3, 0x5f, 0x3c, 0xab, 0x4e, 0x6e, 0xeb, 0x83}, - output512: []byte{0x1e, 0x63, 0x25, 0xee, 0xe, 0x57, 0xfc, 0x92, 0x97, 0xed, 0x58, 0xd3, 0x5c, 0xa2, 0x9e, 0xb0, 0x6b, 0x3, 0x4f, 0xc3, 0x37, 0xa0, 0xad, 0xb, 0x45, 0x3a, 0xf7, 0x67, 0x76, 0xc5, 0x9f, 0xc9, 0xa1, 0x15, 0xae, 0x1c, 0x3d, 0xf9, 0x1b, 0x2, 0x58, 0x32, 0x81, 0xaf, 0xf8, 0x3b, 0xff, 0x91, 0x8f, 0x63, 0xb1, 0xd, 0x98, 0x22, 0x25, 0xf, 0xc4, 0xe2, 0x97, 0xb1, 0x7, 0x72, 0xe1, 0x81}}, - testcase{ - msg: []byte{0x3, 0x97, 0x8f, 0xa9, 0xdb, 0xf1, 0xef, 0x4b, 0xea, 0xcb, 0x8f, 0x58, 0xd4, 0xc8, 0x2e, 0x29, 0x17, 0x70, 0x93, 0x52, 0xc, 0xdd, 0x8f, 0x3a, 0xf0, 0x19, 0xfd, 0x34, 0xee, 0x23, 0xb5, 0x89, 0x66, 0xbd, 0x79, 0x3d, 0x87, 0x83, 0xae, 0x53, 0xb4, 0xd0, 0x2, 0x38, 0xb8, 0x33, 0xeb, 0x41, 0xd7, 0x2a, 0x61, 0x69, 0x3, 0xa1, 0xc4, 0xd9, 0x72, 0xb, 0x6, 0x67, 0x45, 0xce, 0x4c, 0xb3, 0x20, 0x96, 0x7f, 0x9b, 0xee, 0xd5, 0x66, 0x90, 0x3e, 0x1d, 0xb3, 0xc3, 0x12, 0x4b, 0x64, 0x7, 0x2c, 0xe0, 0x48, 0xd2, 0xfc, 0x4c, 0x12, 0x38, 0xf9, 0x9, 0xe1, 0x52, 0xf4, 0x61, 0x78, 0xad, 0xd, 0x59, 0x72, 0x99, 0x32, 0x3f, 0x58, 0x43, 0x6b, 0xa3, 0xe1, 0x56, 0x27, 0xbd, 0xf9, 0x62, 0x34, 0x3f, 0x86, 0x2c, 0x76, 0x63, 0x79, 0x26, 0x9, 0x94, 0xb7, 0x1b, 0x4a, 0x5a, 0x8f, 0x54, 0xb9, 0xb, 0xc, 0x5a, 0x6b, 0x6b, 0x6b, 0x5c, 0x3c, 0x54, 0xbb, 0x7e, 0x41, 0x12, 0xeb, 0x7c, 0x86, 0xc4, 0xa6, 0x6b, 0x73, 0xc3, 0xa0, 0x10, 0xa5, 0x72, 0x32, 0xfd, 0xc7, 0x9a, 0xf0, 0x2b, 0xea, 0xfd, 0xcb, 0x97, 0x99, 0xef, 0xd4, 0x34, 0xa9, 0x88, 0x3c, 0xdb, 0x73, 0x42, 0xbc, 0x29, 0xbf, 0xb1, 0x76, 0xd2, 0xc6, 0x67, 0xf6, 0x55, 0x6a, 0xb4, 0x15, 0xf5, 0x48, 0x21, 0xca, 0xc1, 0xd7, 0x56, 0xa1, 0xc3, 0x30, 0xd, 0x8e, 0x66, 0x3b, 0x24, 0x18, 0xa6, 0x44, 0x3e, 0xd4, 0x79, 0x65, 0xb0, 0x5e, 0x2f, 0x2d, 0xdf, 0x33, 0x9d, 0xae, 0xf0, 0x37, 0x83, 0x15, 0xaa, 0xc, 0x55, 0xaf, 0xd9, 0xc4, 0x16, 0xba, 0xdf, 0xe0, 0x90, 0xe5, 0x16, 0xa1, 0x32, 0x61, 0x19, 0xa9, 0x7b, 0xb8, 0x42, 0x1a, 0x67, 0xaa, 0xd2, 0x5, 0x1c, 0xaa, 0xce, 0x47, 0x12, 0x2a, 0x86, 0xdc, 0x9, 0x23, 0x83, 0xeb, 0x35, 0xba, 0xe8, 0x36, 0x67, 0x6a, 0x23, 0x8d, 0xf8, 0x13, 0xe6, 0x1, 0x3a, 0xf9, 0x42, 0x3, 0x71, 0xe7, 0xca, 0x95, 0xc9, 0xda, 0x9e, 0x77, 0x20, 0x2a, 0x74, 0xb0, 0x24, 0xb, 0xd9, 0x74, 0x12, 0xb7, 0xb7, 0xbd, 0x13, 0x14, 0xf2, 0xea, 0xe0, 0xf1, 0xbe, 0x89, 0x7d, 0x7d, 0xda, 0xe8, 0xcb, 0x96, 0xcd, 0x77, 0x88, 0x75, 0x89, 0xf6, 0x6a, 0x90, 0x68, 0x73, 0x4f, 0x9c, 0xf, 0xf7, 0x77, 0x8a, 0xb4, 0x5c, 0x1a, 0x59, 0xec, 0x7d, 0xe3, 0x5e, 0x6a, 0xb5, 0xfd, 0x6f, 0xa0, 0xfe, 0x5, 0x54, 0x74, 0xcd, 0xf0, 0xcd, 0x1f, 0x27, 0xcc, 0xa4, 0x35, 0xa6, 0x62, 0x91, 0xdf, 0x8c, 0x1d, 0xb2, 0x31, 0xe1, 0xad, 0x3b, 0x38, 0xec, 0xd9, 0x27, 0x12, 0x59, 0xc7, 0x70, 0xc6, 0x9e, 0xd3, 0x62, 0x2a, 0x86, 0x90, 0x89, 0xcb, 0x91, 0x76, 0x92, 0xf5, 0xfe, 0x5, 0xbe, 0xda, 0x10, 0xd6, 0x76, 0x5b, 0x15, 0xfd, 0xf9, 0xab, 0xa, 0x1f, 0x5d, 0x20, 0x9c, 0xb5, 0x76, 0x68, 0x42, 0xa0, 0x6f, 0x6d, 0x8a, 0x29, 0x8a, 0xd0, 0x1b, 0x73, 0x5f, 0xa4, 0xfd, 0x63, 0x0, 0xe4, 0x6b, 0xf, 0x54, 0xc9, 0xbf, 0x47, 0x8, 0x92, 0x74, 0xdc, 0xb5, 0xdc, 0xd0, 0xd1, 0x4c, 0xad, 0x4, 0xec, 0xe2, 0x4a, 0x97, 0x19, 0x6a, 0xe5, 0x11, 0x76, 0xd4, 0xe1, 0x2, 0x44, 0x87, 0xc0, 0x75, 0xc8, 0x85, 0x3c, 0x9f, 0xaf, 0x36, 0x29, 0x1b, 0x9a, 0xb7, 0xb8, 0x85, 0x3e, 0x36, 0x6c, 0x90, 0x79, 0x54, 0x4c, 0x52, 0x8e, 0x10, 0x3a, 0xd5, 0x9, 0xc2, 0xa4, 0x86, 0x5, 0x1, 0x53, 0xf6, 0x6, 0x27, 0x3b, 0x72, 0x52, 0x69, 0x1e, 0x83, 0xbe, 0x3e, 0xf6, 0x89, 0xd3, 0x7e, 0x70, 0x48, 0x39, 0x6c, 0x17, 0x5c, 0x7e, 0x83, 0xa5, 0xa2, 0xd4, 0x5b, 0xb4, 0x8f, 0xd8, 0x67, 0xb0, 0x16, 0x95, 0x63, 0x6e, 0x38, 0x13, 0x91, 0x4a, 0x77, 0x15, 0xad, 0xa0, 0x4c, 0xad, 0x83, 0x8d, 0xd9, 0x8d, 0x94, 0x48, 0x93, 0x5c, 0x0, 0x4c, 0x8a, 0x90, 0x5c, 0xab, 0x6, 0xb4, 0xd6, 0xb3, 0x16, 0x23, 0x54, 0x53, 0x1e, 0x8a, 0xa7, 0x4b, 0xc5, 0x8f, 0x65, 0x70, 0x70, 0xed, 0x5f, 0x10, 0xe8, 0x55, 0x9a, 0x5b, 0x52, 0xc3, 0xee, 0x34, 0x44, 0x1a, 0x0, 0x3, 0xd8, 0x49, 0xaf, 0xe0, 0xe6, 0xd6, 0x39, 0x9d, 0x79, 0xa6, 0xb6, 0xb0, 0x63, 0x58, 0x11, 0x9b, 0xb8, 0xf6, 0x58, 0x68, 0x5e, 0xea, 0xe9, 0xa3, 0x92, 0xa6, 0xe8, 0xd5, 0x58, 0xf3, 0x42, 0xea, 0xf8, 0x6b, 0x1c, 0x83, 0x32, 0x18, 0xe0, 0xde, 0x3d, 0x4e, 0x69, 0xad, 0x82, 0x5c, 0x1d, 0xbb, 0x96, 0x6e, 0x9e, 0x13, 0x81, 0x2b, 0x64, 0x16, 0xd9, 0xcc, 0xf0, 0x36, 0x50, 0xf1, 0xfa, 0x85, 0x98, 0x2e, 0xb3, 0x7c, 0xb9, 0x26, 0xe4, 0x72, 0x63, 0x42, 0x34, 0xf9, 0x4b, 0xe6, 0xb2, 0x27, 0xe0, 0x3a, 0xb2, 0x7a, 0x60, 0xb8, 0x9c, 0x76, 0xf, 0x8a, 0x9b, 0x8c, 0x9a, 0xe8, 0xda, 0xb4, 0x31, 0x76, 0x27, 0x64, 0x4a, 0xa2, 0xb1, 0xca, 0x99, 0x66, 0xc4, 0x46, 0xdd, 0x59, 0x7d, 0xa3, 0x67, 0xa6, 0x3a, 0x30, 0xb1, 0xe3, 0xd4, 0x4d, 0x10, 0x79, 0x59, 0x8f, 0x23, 0x55, 0x74, 0x20, 0x2c, 0xa6, 0xf6, 0x4e, 0xad, 0xd, 0xb6, 0xe0, 0xd1, 0x40, 0x20, 0x97, 0x86, 0x6b, 0x14, 0x74, 0x30, 0xbe, 0xb0, 0xc6, 0xec, 0x3e, 0xbd, 0xd0, 0x2b, 0x42, 0x61, 0x4, 0x10, 0xce, 0xcc, 0x3c, 0xed, 0xa0, 0x9c, 0x9c, 0xcc, 0xfa, 0xd4, 0xba, 0x95, 0xc3, 0x2f, 0x26, 0x6b, 0x84, 0x86, 0x84, 0x3f, 0xf7, 0xc8, 0x54, 0xbb, 0x8d, 0xe, 0x44, 0xe1, 0x77, 0xca, 0x29, 0x4d, 0xea, 0x15, 0xf6, 0xa8, 0x65, 0x26, 0x63, 0x43, 0xca, 0x11, 0x44, 0xa7, 0xd3, 0xb, 0xbf, 0x48, 0xb0, 0xb4, 0xb4, 0xfb, 0x48, 0xee, 0x2b, 0xfa, 0x53, 0x1e, 0x23, 0x79, 0xf9, 0x7e, 0x5d, 0x78, 0x5f, 0x7f, 0xdc, 0x24, 0x27, 0xe, 0x98, 0x1f, 0x8d, 0xe2, 0xdd, 0x4, 0x5b, 0x36, 0xd6, 0xb2, 0xce, 0x12, 0xab, 0x79, 0x9, 0xc6, 0xcf, 0x28, 0x56, 0x55, 0xd, 0x60, 0xc, 0xa9, 0x94, 0x22, 0x90, 0x5c, 0x36, 0x17, 0x9c, 0x61, 0x87, 0x6e, 0x5c, 0x76, 0x33, 0x24, 0x52, 0x25, 0x27, 0xa2, 0xba, 0xe8, 0xb6, 0xac, 0xf3, 0x54, 0x22, 0x58, 0x3c, 0x88, 0x1b, 0xe7, 0x4d, 0x94, 0x3d, 0xfa, 0xcc, 0x1c, 0x25, 0xdf, 0xb, 0x16, 0xde, 0x5e, 0xf8, 0xfd, 0x43, 0x4f, 0xc3, 0x39, 0x6f, 0xdf, 0xd, 0xcf, 0x27, 0x2a, 0xba, 0x55, 0x16, 0xa8, 0x22, 0x1c, 0x29, 0xf0, 0x1d, 0x7d, 0xc0, 0xce, 0x38, 0x58, 0xf1, 0xc5, 0x56, 0xdb, 0xaa, 0x8e, 0x50, 0x16, 0xfc, 0xf8, 0xa4, 0xe2, 0xbe, 0x7b, 0x7d, 0xeb, 0x5d, 0x38, 0x8d, 0x61, 0x73, 0x97, 0xd6, 0x7b, 0xb7, 0x98, 0xc7, 0x5d, 0x7f, 0xd6, 0x99, 0xa7, 0xcc, 0xf1, 0xe4, 0x1, 0x92, 0xd6, 0x36, 0xc1, 0xab, 0x19, 0xcf, 0xd6, 0x29, 0x74, 0x66, 0xb7, 0x6, 0x7d, 0x2c, 0x43, 0x4d, 0xc1, 0xfc, 0xa9, 0x21, 0x51, 0x13, 0xa2, 0xc8, 0xca, 0xac, 0xef, 0xe, 0x29, 0x42, 0x82, 0x34, 0x7c, 0x65, 0xe, 0x41, 0xe3, 0x76, 0xcc, 0xfc, 0x3d, 0x88, 0x3e, 0xbe, 0x1a, 0x60, 0x96, 0xfc, 0xd2, 0x74, 0xfe, 0x72, 0xd4, 0x8, 0xaa, 0xef, 0x73, 0xcd, 0xdf, 0xe8, 0x57, 0x35, 0x86, 0xa6, 0x76, 0xa9, 0x42, 0xa8, 0xd, 0xdf, 0xd2, 0xab, 0xd8, 0x60, 0xb1, 0xd6, 0xe6, 0xe7, 0x7e, 0x65, 0x64, 0x66, 0x76, 0x94, 0x7, 0x50, 0xc0, 0x91, 0xc0, 0xaa, 0x37, 0x10, 0xe3, 0xe3, 0xec, 0x51, 0x4, 0xcc, 0xe4, 0xbf, 0x7c, 0x65, 0xcb, 0x32, 0xcb, 0x16, 0x8e, 0xa, 0xf7, 0xf6, 0x38, 0x52, 0xbf, 0x6e, 0x40, 0xd6, 0x76, 0x19, 0xc0, 0xa5, 0x76, 0x9a, 0xcc, 0x96, 0x3b, 0xed, 0xa4, 0x82, 0xa0, 0x60, 0xb9, 0xd6, 0xe1, 0xf5, 0x1b, 0x7f, 0x24, 0x4b, 0x4e, 0x0, 0x32, 0xe1, 0xa6, 0x9, 0x3a, 0x89, 0xb4, 0xba, 0x1a, 0xb9, 0xfc, 0x7, 0x6f, 0x25, 0xd1, 0xe5, 0x5f, 0x64, 0x93, 0xf3, 0xda, 0xcb, 0x5b, 0x9a, 0x6e, 0x61, 0xbf, 0xd6, 0x29, 0x67, 0xed, 0x30, 0x45, 0x18, 0x39, 0x3d, 0x3d, 0x3d, 0xc5, 0x7, 0x54, 0x69, 0x95, 0x23, 0x68, 0x25, 0x78, 0x51, 0xfc, 0x78, 0xc8, 0x5a, 0x20, 0x39, 0xab, 0x20, 0x4f, 0xfc, 0xfe, 0xc5, 0xf1, 0x40, 0xb4, 0xac, 0x99, 0x90, 0x21, 0xe5, 0x3c, 0x49, 0xc0, 0xb5, 0xb7, 0xb9, 0xf9, 0x59, 0x7, 0xcb, 0x6b, 0xbe, 0xef, 0x40, 0x8, 0x8a, 0xc8, 0xf, 0x4a, 0x2c, 0xaa, 0xab, 0x81, 0x5, 0xca, 0x5a, 0x4, 0x12, 0x3a, 0xb4, 0xd8, 0x3a, 0x1f, 0xa1, 0xe7, 0x73, 0x8a, 0xd2, 0x59, 0xe, 0x8, 0x38, 0x55, 0x63, 0x22, 0x2, 0xb, 0xfd, 0x5d, 0x60, 0x35, 0x29, 0x43, 0x5f, 0xbd, 0xbb, 0x95, 0x1b, 0x76, 0xaa, 0xe8, 0xa9, 0xd6, 0x3e, 0x68, 0xba, 0x7, 0x79, 0xf1, 0x97, 0xd9, 0xe5, 0xf, 0xa3, 0x1d, 0x11, 0x2a, 0x5c, 0xe4, 0xaf, 0xde, 0x8f, 0x1f, 0xec, 0x94, 0x41, 0x2d, 0xf4, 0x4d, 0x78, 0xc9, 0x88, 0x5f, 0xf6, 0x78, 0x14, 0xf, 0xd6, 0x36, 0xad, 0x28, 0xd9, 0x2, 0x8a, 0x6e, 0x19, 0x3b, 0x5d, 0xb8, 0x56, 0x69, 0xd8, 0x5d, 0x13, 0xfa, 0x7f, 0xf5, 0xb9, 0x29, 0x4a, 0x4, 0x23, 0xb3, 0xdb, 0xce, 0x88, 0x45, 0x4b, 0xa6, 0xc6, 0x38, 0x61, 0x49, 0xb4, 0x71, 0xe5, 0xe2, 0xe, 0x5c, 0x39, 0xf5, 0xfe, 0x85, 0x86, 0x9d, 0xb, 0x23, 0x52, 0x1d, 0xff, 0x66, 0x7e, 0x57, 0x44, 0xc2, 0xe0, 0xc2, 0x73, 0xa9, 0xdb, 0x6, 0x40, 0x5e, 0x95, 0x34, 0x6a, 0x94, 0xc3, 0xa9, 0x40, 0x59, 0xc9, 0xc7, 0xa2, 0x3b, 0xea, 0x47, 0x6f, 0xc1, 0xaf, 0xbf, 0x91, 0xc0, 0x7, 0x18, 0xb8, 0x44, 0xba, 0x4f, 0x3a, 0xf8, 0x15, 0x89, 0x6e, 0xcd, 0xcb, 0x58, 0x12, 0x4d, 0x1d, 0x2, 0x18, 0xf2, 0x92, 0xb6, 0x5d, 0x15, 0x24, 0x7, 0x97, 0x54, 0x23, 0x33, 0x2a, 0x8f, 0xa7, 0x67, 0x6a, 0xdd, 0x34, 0x1d, 0x4b, 0xb8, 0xf8, 0x10, 0x86, 0xc4, 0x17, 0xaa, 0x48, 0x9c, 0x41, 0x25, 0x72, 0x7f, 0x42, 0xcf, 0x52, 0xdf, 0x31, 0x64, 0xea, 0x72, 0x88, 0x6c, 0xb8, 0xca, 0xbb, 0x78, 0x72, 0xe3, 0x89, 0x8c, 0xc5, 0x57, 0xef, 0xa6, 0xbe, 0x5f, 0x74, 0x31, 0xe9, 0x9c, 0xcd, 0xcc, 0x2e, 0x8, 0x74, 0x94, 0xda, 0x48, 0x37, 0x51, 0xf9, 0x61, 0xed, 0x7b, 0x60, 0xf5, 0xe7, 0xf9, 0x3e, 0x10, 0x28, 0x7d, 0x68, 0x6d, 0xde, 0xc6, 0x75, 0x7, 0x1f, 0x5d, 0xc0, 0xba, 0xdd, 0x6f, 0x4f, 0xff, 0x7, 0xcb, 0x27, 0xd2, 0x51, 0xfa, 0x41, 0x58, 0x2a, 0x4f, 0x70, 0x8e, 0xd9, 0xbd, 0x77, 0x66, 0x20, 0x96, 0xe0, 0xf2, 0xbe, 0x33, 0xc4, 0x37, 0x5b, 0xb5, 0x1a, 0x5, 0x17, 0x9, 0xc4, 0xf4, 0x10, 0x26, 0xec, 0x22, 0xd9, 0x75, 0x9a, 0x82, 0x9d, 0x65, 0x4f, 0x16, 0x6d, 0xa6, 0xbc, 0x15, 0x8d, 0x7, 0x6e, 0x75, 0x3f, 0x6c, 0x0, 0x4f, 0x3f, 0x2e, 0xa5, 0x56, 0x2c, 0xb6, 0x5a, 0xbc, 0x5d, 0x53, 0x2b, 0xd3, 0xd7, 0x82, 0xf9, 0xce, 0x9c, 0x60, 0x6, 0xa0, 0xeb, 0xb8, 0xf0, 0x9e, 0xea, 0xf4, 0xfa, 0xe4, 0xa, 0x77, 0x70, 0x81, 0xbc, 0xa8, 0x21, 0x10, 0xca, 0x6d, 0x3f, 0xe2, 0x5b, 0x56, 0x58, 0x9b, 0xbe, 0xcb, 0x52, 0xda, 0x66, 0x8b, 0x22, 0xf5, 0xfa, 0x38, 0xe1, 0x68, 0x4f, 0x18, 0x68, 0xca, 0xf0, 0x18, 0xe4, 0x9d, 0xba, 0x28, 0xc4, 0x5d, 0xb8, 0x6f, 0xd7, 0x9, 0x21, 0xaa, 0xfa, 0x4e, 0x56, 0xb5, 0x89, 0xa0, 0x1a, 0xfe, 0xbd, 0xda, 0xb7, 0x84, 0x36, 0xc0, 0x50, 0xa4, 0xdb, 0xf2, 0x6a, 0xa8, 0x2b, 0x76, 0x18, 0xae, 0x1b, 0x2e, 0xac, 0x7f, 0xd1, 0xd, 0x2d, 0x3c, 0x97, 0x45, 0x31, 0x76, 0xa, 0xc0, 0xed, 0x2a, 0xb4, 0xf1, 0xd4, 0x2d, 0x92, 0xb0, 0xe4, 0x45, 0xf3, 0x2a, 0x6f, 0xa6, 0x97, 0xec, 0xba, 0x29, 0x9f, 0xd0, 0x61, 0xa2, 0x9a, 0x84, 0x8e, 0xc6, 0x36, 0xe0, 0xb7, 0xf0, 0xe, 0x63, 0x10, 0x20, 0x8f, 0x9d, 0x21, 0xd2, 0x29, 0xcc, 0xa2, 0x50, 0x55, 0x28, 0xad, 0x91, 0xdd, 0x22, 0xe4, 0xee, 0xf4, 0xe7, 0x23, 0x31, 0x4c, 0xac, 0x64, 0x8c, 0x26, 0xcc, 0x85, 0xa9, 0xf6, 0x80, 0x8, 0x76, 0x38, 0x38, 0x2, 0x5b, 0xe8, 0xaa, 0x59, 0x8f, 0x1e, 0x43, 0x33, 0x1c, 0x34, 0x96, 0x9, 0x5b, 0xc0, 0xc5, 0xe0, 0x39, 0x9e, 0xe1, 0xcc, 0x56, 0xaa, 0xf8, 0x8a, 0xef, 0x50, 0x71, 0x6b, 0x37, 0xeb, 0x15, 0x6f, 0xcb, 0xbe, 0x1b, 0x10, 0xc2, 0x1b, 0xa3, 0x1, 0x15, 0x8e, 0x42, 0x2d, 0x63, 0x11, 0x6d, 0x7d, 0xb8, 0xc6, 0x93, 0x57, 0x1, 0xfa, 0x7b, 0x3c, 0x2a, 0xce, 0x99, 0x68, 0xa8, 0x1f, 0x90, 0x63, 0xea, 0xcc, 0xe5, 0x79, 0x4a, 0x25, 0x5d, 0xd5, 0xa, 0x41, 0x2d, 0x68, 0xa4, 0xd1, 0xdd, 0x12, 0x18, 0x9d, 0xa6, 0x12, 0xc2, 0x93, 0xaa, 0x9a, 0x47, 0x56, 0xad, 0xb2, 0x5b, 0x58, 0x54, 0x52, 0xe6, 0xf3, 0x84, 0x79, 0xd6, 0x3b, 0xff, 0xab, 0xe4, 0xe8, 0x7e, 0xc4, 0x39, 0x56, 0x68, 0x46, 0x93, 0x2, 0x5f, 0xf5, 0x90, 0x87, 0x42, 0x3c, 0x9, 0xe8, 0xdf, 0x4b, 0xc2, 0x4, 0xf8, 0x9a, 0xa9, 0xc0, 0x76, 0x9b, 0x32, 0xa7, 0x0, 0x4d, 0xbe, 0x9f, 0x45, 0x21, 0xb9, 0x93, 0xca, 0x92, 0x94, 0x57, 0x31, 0xca, 0xc8, 0x0, 0xea, 0xe7, 0x38, 0xfb, 0x17, 0x43, 0x2b, 0xee, 0x22, 0xa9, 0x31, 0x95, 0x2d, 0x7a, 0x93, 0x42, 0xe0, 0x49, 0xe5, 0xc4, 0x22, 0x7, 0xeb, 0xa1, 0x59, 0x27, 0xbf, 0x16, 0x30, 0xe0, 0x3a, 0x2, 0xae, 0xf6, 0xdf, 0xe2, 0xf4, 0xd, 0x5a, 0x45, 0xf7, 0x71, 0x0, 0x2, 0x13, 0xf6, 0x4c, 0xc0, 0x7d, 0xca, 0x61, 0xc5, 0xb2, 0xa6, 0x8d, 0xfb, 0x38, 0xe4, 0x2b, 0xc0, 0x8b, 0xf3, 0xb6, 0x4c, 0x14, 0x6e, 0xd3, 0xc2, 0x91, 0xe5, 0xb9, 0x4f, 0x9, 0xed, 0xe9, 0xd, 0x6c, 0x9c, 0x6f, 0xfe, 0x75, 0x2a, 0xad, 0x17, 0xf9, 0x77, 0x7a, 0xa8, 0x6b, 0xf1, 0xa6, 0xb5, 0xc4, 0x87, 0x6c, 0xea, 0x63, 0x1e, 0x13, 0x44, 0x3c, 0x0, 0x70, 0xf, 0x93, 0xb4, 0xf7, 0x97, 0x2a, 0xa7, 0xfa, 0x21, 0x17, 0x3e, 0x71, 0x70, 0xde, 0x5f, 0x3e, 0x3b, 0x7f, 0x6f, 0x75, 0x5b, 0xae, 0xee, 0xc9, 0xd8, 0x80, 0x15, 0x5a, 0x64, 0xb, 0xe6, 0x12, 0x67, 0xce, 0xb0, 0x5c, 0xea, 0x10, 0x2c, 0x94, 0x4a, 0xa4, 0x5c, 0x6d, 0x40, 0x23, 0xea, 0x25, 0x87, 0x37, 0xdd, 0x75, 0x2a, 0x44, 0xb2, 0x7e, 0x2b, 0x5c, 0x16, 0x90, 0x61, 0x56, 0xa7, 0x74, 0xdd, 0x40, 0xd4, 0x7d, 0x13, 0xe2, 0x21, 0xc2, 0x7e, 0xff, 0xb4, 0xcc, 0xe1, 0x0, 0xb3, 0xeb, 0x54, 0x29, 0xff, 0x11, 0x5b, 0x27, 0x0, 0x6e, 0x33, 0x8f, 0x5f, 0xdf, 0x66, 0x3b, 0xdc, 0x90, 0x69, 0x4d, 0x32, 0x53, 0xc1, 0x1a, 0x24, 0xbc, 0xe4, 0x5, 0x3, 0xbb, 0x4, 0x91, 0x7e, 0xa4, 0xfe, 0x22, 0xba, 0x5e, 0x8d, 0x87, 0x83, 0x7c, 0x34, 0x4c, 0x2f, 0xb1, 0x7e, 0xac, 0x54, 0x87, 0xaa, 0x73, 0x72, 0xec, 0x20, 0x2a, 0x6b, 0xc8, 0x1d, 0x80, 0xde, 0xc3, 0x52, 0xcd, 0x9, 0xc, 0x4, 0xf, 0x1a, 0xd3, 0x38, 0x59, 0xc0, 0x2b, 0x7e, 0x21, 0x38, 0x1b, 0xea, 0x28, 0xff, 0xe, 0x97, 0x1d, 0x52, 0xd9, 0x0, 0x64, 0x24, 0xee, 0xdd, 0x72, 0xa9, 0x29, 0x51, 0xda, 0x1f, 0xe3, 0xc4, 0x8b, 0x45, 0xd5, 0x1b, 0xe8, 0x43, 0xa, 0x99, 0xc9, 0xca, 0x15, 0x90, 0x93, 0xdd, 0xa7, 0x5c, 0xe2, 0xfa, 0x8a, 0xcd, 0x7e, 0x6, 0xa3, 0x1a, 0x1c, 0xd3, 0xa6, 0xf, 0xe3, 0x3a, 0x24, 0x1b, 0x9a, 0x64, 0x9f, 0xf5, 0x53, 0x33, 0x3b, 0x9c, 0x9c, 0xd7, 0x3, 0x80, 0xb4, 0x94, 0xa7, 0x31, 0x47, 0x86, 0x98, 0xd8, 0x33, 0xb8, 0x9d, 0xeb, 0x3a, 0xd7, 0x9c, 0x5f, 0xa8, 0xe, 0xd8, 0xbb, 0x3, 0xad, 0x1d, 0x42, 0xf2, 0xc8, 0xd2, 0xfe, 0x4c, 0x45, 0x7a, 0x1, 0x9b, 0xe9, 0x5f, 0x26, 0x70, 0x80, 0xb3, 0x20, 0x38, 0xe5, 0x5a, 0x57, 0xe4, 0x8d, 0x58, 0x4, 0x4a, 0xcc, 0x69, 0x1d, 0xab, 0x6d, 0x7e, 0x17, 0xbc, 0x62, 0x9e, 0x78, 0xef, 0x78, 0x79, 0xbe, 0x8d, 0x39, 0x8c, 0x77, 0xc1, 0x15, 0xf4, 0x54, 0x7f, 0x32, 0xb1, 0xcf, 0xa1, 0x81, 0xaf, 0xf8, 0xf3, 0xdf, 0xc6, 0x6c, 0x6e, 0x9a, 0x75, 0x4b, 0x64, 0xba, 0x93, 0x2e, 0x70, 0x1, 0x27, 0x47, 0x6c, 0x59, 0x4, 0x1, 0x45, 0x44, 0x96, 0xf6, 0x27, 0x42, 0xb8, 0x5c, 0x17, 0x68, 0x71, 0x40, 0xe1, 0x32, 0x22, 0x51, 0x2c, 0x36, 0x9f, 0xa0, 0x82, 0x5c, 0x7, 0xd2, 0x6e, 0x5f, 0x1, 0xa7, 0x74, 0xff, 0x7a, 0x75, 0x5d, 0x4c, 0xf1, 0x7f, 0xd7, 0xf2, 0x1d, 0xed, 0x83, 0xa9, 0xfe, 0xe4, 0x3e, 0xcb, 0x42, 0xd4, 0x49, 0x8a, 0xb1, 0xc3, 0xa9, 0x37, 0xaa, 0xe6, 0x92, 0x19, 0xfc, 0xc7, 0xc2, 0x7, 0x80, 0xcc, 0x5a, 0xe8, 0x6f, 0x96, 0x9f, 0xaa, 0x6, 0x7b, 0xca, 0x9c, 0x6c, 0x3c, 0x7c, 0x86, 0x6d, 0xa5, 0xc, 0xd1, 0xce, 0xb2, 0x55, 0xd1, 0x4, 0xa3, 0x14, 0xd9, 0x50, 0x69, 0x57, 0x78, 0x2f, 0xcd, 0xf1, 0xdb, 0xe0, 0x39, 0x45, 0xc3, 0x6d, 0x38, 0xa4, 0x32, 0x2, 0xd7, 0xb3, 0x44, 0x41, 0xb8, 0x2e, 0x61, 0xe7, 0x2a, 0xd4, 0x1, 0x35, 0x5f, 0xae, 0x75, 0x57, 0xef, 0xee, 0xb, 0xb6, 0xa9, 0x7, 0x60, 0xee, 0x54, 0xcc, 0x50, 0xe3, 0x9a, 0x84, 0x4e, 0x8f, 0x3, 0x7f, 0xc9, 0xca, 0xc0, 0xb0, 0x55, 0xf7, 0x1d, 0xce, 0xa1, 0xaa, 0xfb, 0xa7, 0xf0, 0xe7, 0x70, 0xe6, 0x1e, 0xc8, 0x37, 0x1, 0x59, 0xf8, 0x34, 0xc, 0x6f, 0xcb, 0x1f, 0x37, 0x27, 0xe, 0x4a, 0x71, 0xcf, 0x11, 0x10, 0xb7, 0xda, 0x39, 0x9f, 0xef, 0x7e, 0x46, 0x4, 0xfe, 0x7b, 0xc4, 0x1c, 0x71, 0xf3, 0x66, 0xa4, 0x51, 0xb4, 0xcb, 0x53, 0xcf, 0x45, 0x69, 0xc8, 0xc9, 0xa8, 0xa1, 0x98, 0x97, 0xa4, 0xb, 0xe9, 0x6a, 0x92, 0xee, 0x6b, 0xc8, 0x88, 0xe8, 0x58, 0x58, 0x32, 0xdc, 0x4f, 0xea, 0xb3, 0x1a, 0x40, 0x74, 0x32, 0x37, 0xbf, 0xb0, 0xa3, 0x46, 0xea, 0x90, 0xac, 0xd8, 0x48, 0xcc, 0x64, 0x8b, 0x9f, 0x84, 0x4c, 0x60, 0x6c, 0x1, 0x88, 0x16, 0xca, 0xd, 0xcc, 0x18, 0x90, 0x36, 0xa2, 0xcf, 0xff, 0xc, 0x41, 0x89, 0x1b, 0xd4, 0xc3, 0x26, 0x6, 0xd8, 0x7d, 0x67, 0xa6, 0xea, 0x61, 0x75, 0x4a, 0x15, 0xb, 0xba, 0x6f, 0xff, 0x9a, 0xe, 0x57, 0x41, 0x4a, 0xb, 0x91, 0xcf, 0xd0, 0x87, 0x95, 0x5a, 0xae, 0x7b, 0xc4, 0xfd, 0xa9, 0x5a, 0x44, 0x99, 0xfe, 0xde, 0x1b, 0x4d, 0x84, 0x4a, 0xe0, 0x57, 0x4, 0x5a, 0xdb, 0x7c, 0x86, 0xb7, 0x2d, 0xe4, 0xb2, 0x5f, 0xac, 0x9, 0x95, 0xef, 0xfb, 0x5c, 0xfa, 0xb3, 0x72, 0xad, 0x89, 0x57, 0x96, 0xf9, 0x87, 0x3f, 0x5b, 0xb, 0x95, 0x45, 0x83, 0xed, 0x81, 0x5b, 0x45, 0x23, 0xb3, 0xb5, 0xa1, 0x40, 0xa2, 0xdd, 0xb7, 0xa5, 0xaa, 0x2b, 0x61, 0xad, 0x8d, 0x6, 0xbb, 0x70, 0xef, 0xad, 0x3e, 0xa2, 0x37, 0xf6, 0x60, 0x6a, 0x5d, 0xbc, 0xb8, 0x8f, 0x46, 0xdd, 0x75, 0xac, 0x84, 0x32, 0x3, 0x90, 0x90, 0xae, 0x24, 0x58, 0x67, 0x2d, 0xb7, 0x80, 0xa, 0x75, 0x14, 0xa2, 0x26, 0x51, 0x6f, 0x41, 0xcc, 0xfd, 0x8, 0xa1, 0xf0, 0x72, 0xa, 0x77, 0xe5, 0xfc, 0x1, 0x6b, 0x1b, 0x92, 0x7b, 0x82, 0x87, 0x84, 0xe4, 0x21, 0xc0, 0xc9, 0xe0, 0x4c, 0x45, 0xa7, 0x9c, 0x2e, 0x8d, 0xb1, 0x6e, 0x7a, 0x4e, 0x9, 0x2d, 0x73, 0xc5, 0x12, 0x4d, 0x2b, 0xd1, 0x46, 0x38, 0x13, 0xc7, 0x95, 0x81, 0xab, 0x46, 0x8e, 0x2d, 0x37, 0xdf, 0x39, 0x25, 0x18, 0x98, 0x33, 0xf8, 0xb3, 0x72, 0x83, 0x8a, 0x9f, 0x89, 0xae, 0xc3, 0x58, 0x7e, 0x2b, 0x19, 0x4, 0x4c, 0x9, 0x51, 0x7, 0xac, 0xd4, 0x35, 0xb9, 0x34, 0xf, 0xa4, 0x9a, 0xdf, 0x11, 0xf1, 0x5, 0xd2, 0xc8, 0x7b, 0x9f, 0x5a, 0xb6, 0x2e, 0x38, 0x2e, 0xb5, 0x69, 0xd7, 0x9c, 0xd8, 0x67, 0x8a, 0x5b, 0x1a, 0x1f, 0x7d, 0x0, 0xf3, 0x80, 0x31, 0x69, 0x4e, 0xe6, 0xaa, 0xed, 0x22, 0x3b, 0xa1, 0x23, 0xe8, 0x82, 0x2b, 0xe1, 0x18, 0x1a, 0x7b, 0xbc, 0xe5, 0xdc, 0x90, 0xf8, 0xdf, 0x9e, 0x3f, 0xba, 0xf9, 0x6e, 0x4d, 0x82, 0xb3, 0x88, 0x88, 0x9f, 0x2b, 0xca, 0xcd, 0xd8, 0x1a, 0xbd, 0x5b, 0x77, 0x7d, 0x78, 0xca, 0xb2, 0xea, 0xca, 0x14, 0xca, 0x97, 0x28, 0x16, 0x3, 0xe5, 0xfd, 0xc, 0x67, 0x8, 0xcc, 0x9e, 0x22, 0x3d, 0x4, 0x5e, 0xe2, 0xd1, 0x99, 0x4b, 0x5d, 0xee, 0x24, 0x83, 0x90, 0xfa, 0x1, 0xcb, 0x40, 0x47, 0x47, 0x33, 0x12, 0xf1, 0x42, 0x93, 0xbd, 0x9f, 0x57, 0x45, 0x35, 0x1, 0x5a, 0x5f, 0xd0, 0xd1, 0x6f, 0xac, 0xe6, 0xb0, 0xf8, 0x8f, 0xfc, 0x94, 0x9a, 0xb4, 0x58, 0xa2, 0xc4, 0xf, 0xc9, 0x80, 0x64, 0x1, 0xbc, 0x5e, 0x91, 0x7e, 0xaf, 0xc5, 0x6a, 0x8d, 0xb3, 0x23, 0xc1, 0xfb, 0xe6, 0xa5, 0x7c, 0xee, 0xf5, 0xe6, 0x38, 0x28, 0x8c, 0x9, 0x17, 0xf0, 0xbe, 0x1b, 0x8d, 0x71, 0x8b, 0xc0, 0xe7, 0xb2, 0xb9, 0x6e, 0x46, 0x1e, 0xde, 0xc2, 0xd0, 0xc5, 0x3b, 0x48, 0x18, 0x45, 0xbd, 0x90, 0x6a, 0x97, 0x23, 0x36, 0xdb, 0x93, 0xdb, 0x64, 0x99, 0xd2, 0x7b, 0x9b, 0x2a, 0x5c, 0xad, 0xcb, 0xc9, 0x4d, 0xc0, 0x93, 0xb8, 0xb1, 0x1c, 0x9d, 0x8b, 0xf0, 0x63, 0x30, 0xd1, 0x5a, 0x22, 0x32, 0x36, 0xd6, 0xe1, 0x67, 0xce, 0xa4, 0x57, 0xc4, 0x6b, 0x2, 0xbe, 0xf9, 0x4a, 0x93, 0x6e, 0xb, 0xb9, 0x8e, 0x14, 0xc8, 0x94, 0x4c, 0x5, 0x3d, 0xfc, 0xd7, 0xa2, 0x43, 0xe7, 0x48, 0x70, 0x9a, 0x1c, 0x62, 0x5a, 0x38, 0xeb, 0x15, 0x6d, 0x94, 0x3f, 0x12, 0x91, 0x7a, 0xa0, 0x77, 0xdb, 0xfa, 0x57, 0xb2, 0x4e, 0x26, 0xc2, 0x84, 0x50, 0x9d, 0x53, 0x4c, 0x14, 0x51, 0xf4, 0x25, 0xd5, 0xd2, 0x54, 0x56, 0x78, 0x7f, 0x97, 0x40, 0x12, 0x13, 0x37, 0x4e, 0xf7, 0x7d, 0x6c, 0x86, 0xbe, 0x8e, 0xd, 0x31, 0x15, 0x43, 0xb1, 0x5c, 0xe7, 0xe4, 0x2a, 0x15, 0x2f, 0xfd, 0x10, 0x30, 0x3b, 0x50, 0x4, 0x6b, 0xe0, 0x74, 0x64, 0xc9, 0xb9, 0x9b, 0x51, 0x1, 0x8a, 0x42, 0x6, 0x20, 0x54, 0xdd, 0x76, 0x54, 0x19, 0x3e, 0x81, 0xa0, 0x59, 0x9, 0xca, 0x7b, 0xb2, 0x8c, 0x61, 0x7f, 0x6, 0x4f, 0x99, 0x36, 0xc0, 0xd3, 0x59, 0x8, 0x82, 0xf0, 0xc2, 0x6b, 0xa8, 0x9f, 0xe6, 0xd2, 0xb2, 0xf5, 0xb, 0x3c, 0x67, 0xda, 0x8c, 0xfc, 0xdc, 0xde, 0xa6, 0xe6, 0x0, 0xcd, 0xb6, 0xb0, 0x9f, 0xb3, 0xc1, 0x70, 0x97, 0x9b, 0xc9, 0xb1, 0xab, 0xff, 0x44, 0xeb, 0x22, 0xe6, 0x6e, 0x74, 0xfc, 0xe4, 0xff, 0xb6, 0xe5, 0xb3, 0x73, 0xf2, 0xf1, 0xb, 0xc, 0xa5, 0xee, 0x4c, 0x62, 0x1f, 0x21, 0xf7, 0xa6, 0xf8, 0x63, 0xfa, 0x73, 0x91, 0x72, 0xc1, 0x35, 0x56, 0x6b, 0x55, 0x91, 0x6f, 0xb, 0xcc, 0x6e, 0xe4, 0xcf, 0xd, 0x35, 0xb1, 0x60, 0xac, 0x8a, 0x15, 0x56, 0xe4, 0x32, 0x71, 0x99, 0xdb, 0xf5, 0x36, 0x82, 0x47, 0x1b, 0xae, 0xf0, 0x9f, 0xab, 0x7a, 0xbe, 0xdf, 0x51, 0x84, 0x27, 0xba, 0xff, 0x19, 0xf2, 0x94, 0x29, 0xc2, 0xdf, 0xd9, 0x58, 0x78, 0x43, 0xd5, 0xce, 0xd1, 0x22, 0x72, 0xa8, 0xb, 0x17, 0xa5, 0xfb, 0xdb, 0x1e, 0xf7, 0x7a, 0x51, 0xc, 0xff, 0xe7, 0xb, 0x7a, 0xb6, 0xf5, 0x92, 0x76, 0x34, 0x18, 0xaf, 0x4c, 0xb5, 0x55, 0xc0, 0x80, 0xd9, 0x19, 0x6b, 0xd8, 0x95, 0x1a, 0x20, 0x47, 0x4, 0x6d, 0x8e, 0x1e, 0xd6, 0xa, 0x67, 0xdc, 0x63, 0xe0, 0x12, 0x94, 0xe7, 0x34, 0xcd, 0x77, 0xf4, 0x30, 0xae, 0x77, 0x1e, 0x72, 0xa2, 0x9a, 0x9a, 0x15, 0xf0, 0xdc, 0x10, 0xa4, 0xb, 0x18, 0x72, 0x91, 0x73, 0xa5, 0x4b, 0x62, 0xcc, 0xf0, 0xcb, 0xb5, 0xb6, 0x86, 0x4, 0x43, 0x16, 0x61, 0xb6, 0x13, 0xde, 0xeb, 0xc2, 0x0, 0xd0, 0xf1, 0x9f, 0x14, 0x2b, 0x85, 0x50, 0xec, 0xf2, 0x56, 0xdc, 0xb2, 0x23, 0x30, 0x69, 0xbc, 0xa8, 0x39, 0x36, 0x5e, 0xb8, 0xba, 0x87, 0x20, 0x4f, 0x83, 0xa8, 0xfc, 0xa2, 0x37, 0xb1, 0x1f, 0x1a, 0xda, 0x6c, 0x44, 0xea, 0xf2, 0xaa, 0xeb, 0xb1, 0xb8, 0xb5, 0xfa, 0xee, 0xbd, 0x2e, 0xfa, 0xfc, 0x7, 0x64, 0x17, 0x5a, 0xaf, 0x9a, 0x9a, 0x96, 0x20, 0xf5, 0x33, 0xc2, 0x6c, 0xc2, 0x37, 0xb2, 0x8, 0xad, 0x67, 0x89, 0xca, 0x6f, 0x60, 0xb3, 0x9f, 0xd5, 0xa0, 0xe0, 0x7a, 0xd5, 0x82, 0xf7, 0x1, 0x11, 0xc2, 0x56, 0x16, 0xd0, 0xa3, 0x46, 0x67, 0x69, 0xb3, 0xe9, 0x45, 0xfa, 0x23, 0xdc, 0xfc, 0x72, 0x55, 0xc0, 0x3a, 0xad, 0x9, 0x97, 0x7e, 0xbc, 0xb0, 0x46, 0x70, 0x7b, 0x6a, 0xae, 0x59, 0xea, 0x80, 0x3c, 0xb5, 0x6d, 0x22, 0x38, 0x16, 0xf0, 0x6, 0xb3, 0xef, 0x6, 0xfb, 0x67, 0x78, 0x7b, 0xb0, 0x9f, 0x41, 0xa6, 0xb4, 0x1d, 0x6f, 0xad, 0x4, 0xad, 0xe0, 0x14, 0x43, 0x4e, 0x3c, 0xde, 0x87, 0xf5, 0xcf, 0xe8, 0xf1, 0x4d, 0x98, 0x22, 0xd9, 0x90, 0x74, 0x5b, 0x26, 0xa6, 0xc0, 0xbd, 0x49, 0xa7, 0xd, 0x34, 0xc, 0x62, 0x88, 0xc1, 0x33, 0xee, 0x43, 0xa1, 0xb2, 0x2b, 0xb1, 0xff, 0xc3, 0x94, 0x8f, 0x1f, 0xb0, 0x30, 0x47, 0xcf, 0x6e, 0xa6, 0x4, 0x6, 0x7d, 0x33, 0xd0, 0xf, 0x3a, 0x1c, 0x88, 0xca, 0x52, 0x9b, 0x7b, 0x51, 0x5f, 0x3f, 0xec, 0xaa, 0x3b, 0xf1, 0xcf, 0x56, 0x86, 0xe5, 0xe, 0x55, 0xa2, 0xc3, 0xe4, 0x17, 0x6e, 0x7b, 0x2, 0x80, 0x13, 0x2a, 0x8f, 0x21, 0x69, 0x81, 0x37, 0x74, 0x5a, 0x3c, 0xf2, 0xb5, 0xd6, 0xd3, 0x2e, 0xc9, 0x1e, 0x34, 0xc, 0xdb, 0x63, 0x28, 0xab, 0xec, 0xc4, 0x36, 0x4f, 0x32, 0x85, 0xd1, 0xfb, 0x9d, 0xd5, 0x2, 0xc1, 0xd3, 0xa8, 0x4f, 0x47, 0xee, 0x9, 0x44, 0x8, 0x99, 0x9, 0x4a, 0xe5, 0x39, 0x71, 0xc, 0xef, 0x43, 0x3f, 0x6, 0x6d, 0x30, 0x55, 0xa4, 0x66, 0xfc, 0x9b, 0xf5, 0x80, 0x3b, 0xf9, 0x2b, 0xc6, 0x5c, 0xb5, 0xe0, 0xb1, 0xab, 0xb4, 0x98, 0x5e, 0xf8, 0x5b, 0x0, 0xa3, 0xaf, 0xab, 0x4f, 0x8f, 0x59, 0x35, 0x2e, 0xcd, 0x7e, 0x85, 0x50, 0xbf, 0x46, 0xb4, 0xd9, 0xaa, 0xab, 0xe8, 0x58, 0x76, 0x67, 0x51, 0xef, 0x9a, 0x99, 0x88, 0x90, 0x83, 0xa2, 0xad, 0x6f, 0xc1, 0x78, 0xd6, 0xb1, 0x42, 0xe1, 0xd9, 0xe0, 0x2, 0xe0, 0x74, 0x30, 0xf2, 0x7c, 0xad, 0xf6, 0x48, 0x16, 0x83, 0x26, 0x4b, 0x1f, 0x66, 0x29, 0xf9, 0xe1, 0x86, 0xa1, 0x6c, 0x48, 0x28, 0x62, 0x57, 0xd3, 0xb3, 0x54, 0x27, 0xd7, 0x65, 0xa1, 0x2e, 0x91, 0x8c, 0xed, 0x15, 0x7c, 0xb1, 0xe5, 0x74, 0x57, 0x13, 0xb0, 0xec, 0xcb, 0xe5, 0x29, 0xc7, 0xb3, 0x4, 0xce, 0x7e, 0x67, 0xce, 0xb5, 0x43, 0x1b, 0x83, 0x20, 0x19, 0x99, 0x5f, 0x89, 0xdf, 0xfd, 0xc9, 0x6c, 0xf6, 0x55, 0xf, 0xe0, 0x56, 0xaa, 0xd8, 0x75, 0xc8, 0xd3, 0x70, 0x99, 0xed, 0xf8, 0x2d, 0x1d, 0xf1, 0x2, 0x6d, 0x60, 0x5c, 0xd9, 0x39, 0x98, 0x5c, 0x37, 0x2f, 0x4e, 0x95, 0xb6, 0xae, 0xe3, 0x86, 0x77, 0x95, 0x27, 0xf7, 0x9a, 0xfc, 0x24, 0xe1, 0x87, 0x50, 0xa4, 0xef, 0xa, 0x93, 0xe1, 0xe3, 0x15, 0xc0, 0x9f, 0x78, 0x5c, 0x31, 0x0, 0xfb, 0x43, 0xe4, 0x4d, 0x62, 0x48, 0xbb, 0x7b, 0xcb, 0xcd, 0x29, 0xa7, 0xb4, 0x6b, 0xa9, 0xbe, 0xca, 0x59, 0x47, 0xec, 0xa2, 0xf5, 0xd7, 0xfd, 0x12, 0xf5, 0x88, 0xaa, 0x30, 0xe2, 0x42, 0x4f, 0xdf, 0xf, 0x20, 0x20, 0x0, 0xc6, 0x78, 0xc9, 0xae, 0x59, 0x83, 0x45, 0xd6, 0xaa, 0xce, 0x4e, 0x29, 0xf8, 0x57, 0x31, 0xb7, 0x75, 0xcb, 0x49, 0xe7, 0x51, 0x7e, 0x38, 0x10, 0x4b, 0x7b, 0x28, 0x7d, 0xc3, 0xa4, 0x90, 0xc2, 0xe3, 0xd, 0x3e, 0x35, 0xae, 0xb1, 0xe6, 0xd3, 0x5d, 0x2a, 0xbc, 0x8d, 0x45, 0xd, 0x7, 0x46, 0x3e, 0x3e, 0x46, 0xb9, 0x8, 0x12, 0x6d, 0xc8, 0x31, 0xf6, 0x24, 0xea, 0x1, 0xe, 0xe, 0x2f, 0xf8, 0x7d, 0x7f, 0x47, 0x93, 0xc8, 0xf0, 0x75, 0x21, 0x5c, 0x29, 0xd4, 0x53, 0x96, 0xf4, 0xa6, 0x5d, 0x49, 0xd, 0xc1, 0xc2, 0x90, 0x2b, 0xab, 0xef, 0x3a, 0xb1, 0xd2, 0xff, 0x8c, 0x9a, 0x24, 0xd9, 0xc5, 0x95, 0x6c, 0x9a, 0x92, 0x5c, 0x7b, 0x88, 0x70, 0x3c, 0x7b, 0xb8, 0xe2, 0xc6, 0xf3, 0xa1, 0xbd, 0x6f, 0xc5, 0xea, 0xa, 0xcb, 0x4e, 0xc6, 0x69, 0xc0, 0xfc, 0x3, 0xe9, 0x74, 0x38, 0x91, 0x87, 0xd9, 0x7f, 0x49, 0xd2, 0xa6, 0x64, 0x3d, 0xdb, 0xe1, 0xb1, 0xaa, 0x9c, 0xd2, 0x33, 0x5a, 0x90, 0x74, 0x1e, 0xa0, 0xbd, 0x4, 0x4d, 0xa6, 0xfd, 0x28, 0xe7, 0x8d, 0x35, 0x99, 0x2b, 0x5b, 0x1a, 0x85, 0x1f, 0x2c, 0xf5, 0xd9, 0x35, 0x3a, 0x5, 0x2c, 0xbf, 0x1e, 0x57, 0xb9, 0x78, 0x2a, 0xb3, 0x62, 0x0, 0x53, 0xc8, 0x9d}, - output224: []byte{0x77, 0xab, 0x76, 0x68, 0x83, 0x2a, 0x56, 0x7e, 0x4f, 0x7f, 0x2e, 0xf3, 0x21, 0x3c, 0x59, 0x9a, 0xe9, 0x3a, 0x48, 0x51, 0xed, 0xa5, 0x6b, 0xfd, 0xb8, 0x14, 0x80, 0x9a}, - output256: []byte{0x96, 0x80, 0x5c, 0x12, 0xa7, 0x52, 0xa2, 0x69, 0x0, 0xcf, 0xbe, 0x7a, 0x47, 0xfb, 0x94, 0xd0, 0x3c, 0x94, 0x9a, 0x8d, 0xd3, 0xd7, 0xec, 0x15, 0x21, 0xdd, 0x1c, 0x9a, 0xef, 0x0, 0x68, 0xb2}, - output384: []byte{0xd2, 0x58, 0x71, 0x99, 0x4d, 0x47, 0x8f, 0xc, 0xc4, 0x6, 0x76, 0xf0, 0xc5, 0x3c, 0x9c, 0x60, 0x1d, 0x96, 0x2, 0xda, 0xc2, 0xb8, 0x42, 0x20, 0xaf, 0x46, 0xcd, 0xb3, 0x3c, 0x47, 0x59, 0xed, 0x97, 0x1c, 0x52, 0x92, 0x2e, 0x66, 0x23, 0x63, 0x90, 0xcb, 0xe9, 0x53, 0x68, 0xa2, 0x63, 0xa4}, - output512: []byte{0x2c, 0xb3, 0xf8, 0xe2, 0xd3, 0x22, 0x7d, 0x32, 0x13, 0x93, 0x1c, 0xc, 0xd4, 0x54, 0x6, 0xed, 0xe, 0xce, 0x37, 0x3e, 0x93, 0xa5, 0x74, 0x61, 0x8d, 0x5b, 0x6c, 0xfd, 0xc3, 0x1a, 0x75, 0x6f, 0xff, 0xe8, 0xe, 0xfa, 0xcf, 0xf9, 0x3a, 0x70, 0x8e, 0xe7, 0x2b, 0x76, 0xbc, 0x8e, 0xa0, 0xab, 0x40, 0xbf, 0x53, 0x3e, 0x44, 0x21, 0x10, 0x28, 0x43, 0x43, 0x72, 0x1b, 0x43, 0xc1, 0xa1, 0x7e}}, - testcase{ - msg: []byte{0x9, 0xa9, 0x6a, 0x1, 0x12, 0xb8, 0x23, 0xc2, 0x21, 0x2a, 0xba, 0x52, 0xee, 0xa1, 0x3c, 0x48, 0xca, 0xe3, 0xf5, 0xe0, 0x88, 0x83, 0x45, 0x3e, 0x20, 0x85, 0xa8, 0x3, 0xea, 0x85, 0x2a, 0x9d, 0x6a, 0xe0, 0x75, 0x39, 0x2b, 0xbd, 0x8f, 0xce, 0xc5, 0x67, 0xa1, 0x52, 0x4a, 0xa6, 0x5c, 0x70, 0xc3, 0xee, 0x17, 0x22, 0xaa, 0x7, 0x9a, 0xfd, 0x41, 0x69, 0x6c, 0xc5, 0x39, 0x1f, 0x52, 0x92, 0x99, 0xc7, 0x1e, 0x99, 0xb0, 0xe0, 0x8e, 0x41, 0x1d, 0x3e, 0x1e, 0x5, 0xc4, 0x3e, 0x97, 0x9c, 0xe1, 0xa, 0xc9, 0xc2, 0xea, 0x80, 0xcb, 0xf4, 0xb5, 0x83, 0x71, 0x27, 0x3c, 0x3d, 0x3a, 0x8d, 0xf4, 0x8e, 0x2d, 0xe7, 0xf5, 0x5, 0x60, 0xff, 0xed, 0x25, 0xf6, 0xe6, 0x5e, 0x9d, 0x96, 0xcb, 0xb3, 0x79, 0x57, 0x3b, 0xdb, 0xdd, 0x28, 0x59, 0xd1, 0x3f, 0x86, 0x6e, 0xbf, 0x3a, 0xf4, 0x88, 0xc6, 0xd2, 0xe3, 0x65, 0x5, 0xa7, 0xd, 0x81, 0xaf, 0xd0, 0x7e, 0x32, 0x11, 0x57, 0x79, 0x5c, 0xdf, 0x40, 0xc1, 0x88, 0x5d, 0xba, 0xeb, 0xf3, 0xd4, 0xe4, 0x25, 0xeb, 0x4c, 0xe0, 0xcf, 0xd6, 0xca, 0x50, 0x19, 0xc8, 0xdf, 0xd5, 0x4b, 0xc2, 0xa3, 0x0, 0x95, 0xb3, 0x12, 0xaf, 0x45, 0x48, 0xb9, 0xac, 0xeb, 0xb6, 0xa2, 0x7, 0xad, 0x3b, 0xca, 0x29, 0xf4, 0xda, 0x44, 0x3a, 0xfc, 0x7f, 0xa7, 0x89, 0xaa, 0xdb, 0xd6, 0x5c, 0x9d, 0x45, 0xaf, 0x71, 0x59, 0x4b, 0x79, 0xf, 0xdf, 0x84, 0xd9, 0x23, 0x59, 0x33, 0xee, 0x96, 0xff, 0xd8, 0x3d, 0x1a, 0x1d, 0xac, 0x8c, 0x1f, 0x3c, 0x2b, 0xaf, 0xe6, 0x68, 0xb8, 0xea, 0x5c, 0x96, 0x49, 0xd1, 0xd8, 0xda, 0xf2, 0x80, 0x6f, 0x5, 0x19, 0x44, 0x8a, 0x97, 0xaf, 0x11, 0x4, 0xdb, 0xa3, 0xfb, 0x5, 0xcc, 0x46, 0xd3, 0x3f, 0xa0, 0x11, 0x2d, 0xd0, 0x92, 0x2c, 0xf1, 0xac, 0x84, 0xd4, 0xa3, 0x43, 0xf1, 0xae, 0x59, 0x79, 0x30, 0x4, 0x2a, 0xff, 0x6d, 0xaa, 0x75, 0x1, 0x1b, 0xe4, 0xb1, 0x8a, 0xcb, 0x25, 0x7d, 0x88, 0x9a, 0x80, 0xf0, 0xc3, 0xd4, 0x9, 0x4e, 0xf7, 0x29, 0x5e, 0xd4, 0xe8, 0xc2, 0xf1, 0xe2, 0xb8, 0xf5, 0x6e, 0xdb, 0xc9, 0xb8, 0x31, 0x33, 0x36, 0x77, 0xa4, 0xe6, 0xcf, 0x61, 0x10, 0x21, 0x8b, 0x23, 0x52, 0x3e, 0xee, 0xe1, 0xe0, 0x24, 0xb6, 0x39, 0x8d, 0x1c, 0xc5, 0x72, 0xdf, 0x7a, 0xa1, 0x3, 0xcf, 0x7f, 0x50, 0xfa, 0x48, 0x8e, 0x19, 0x93, 0x6d, 0x20, 0x39, 0x3a, 0x55, 0x84, 0x3c, 0x4, 0x2b, 0x27, 0x5b, 0x78, 0xca, 0xa9, 0xee, 0xfc, 0x77, 0xc4, 0x44, 0x37, 0xc3, 0x75, 0xd4, 0xd1, 0x10, 0xb, 0xc4, 0x86, 0xfc, 0xb0, 0xd2, 0x50, 0x52, 0x60, 0x86, 0xeb, 0xd4, 0xd2, 0xd3, 0x8f, 0xbc, 0x8e, 0x3e, 0x55, 0xf9, 0x26, 0x2b, 0x4b, 0xe5, 0xe6, 0xce, 0x6a, 0xa3, 0x16, 0x4d, 0xc0, 0x4d, 0x7f, 0xb1, 0x2b, 0xe7, 0xa, 0xf6, 0x86, 0x1a, 0xe0, 0xc2, 0x1a, 0x4, 0x46, 0x83, 0x39, 0xd3, 0x35, 0xbe, 0x15, 0xf6, 0xa7, 0x7a, 0x8b, 0xb8, 0x4c, 0xa4, 0xbb, 0xe9, 0x4b, 0x7, 0x82, 0x24, 0x15, 0x0, 0xb5, 0x95, 0xfd, 0x67, 0x1b, 0x30, 0xdc, 0x6c, 0x26, 0x31, 0x7d, 0xb3, 0xaf, 0x8d, 0xb1, 0x21, 0x4b, 0x14, 0x4f, 0xc4, 0x2f, 0xe9, 0x36, 0x77, 0x14, 0x69, 0xd3, 0x83, 0x8e, 0x41, 0xc1, 0x6e, 0xac, 0xa8, 0xb4, 0x4a, 0x59, 0x15, 0xd1, 0xcb, 0x45, 0x50, 0xa4, 0x51, 0xbe, 0x5f, 0x6, 0x73, 0xff, 0xe8, 0x46, 0xf6, 0xa2, 0x2b, 0xbd, 0x19, 0x4c, 0x88, 0x70, 0x19, 0x3e, 0x1b, 0x68, 0x45, 0x9b, 0x5, 0x93, 0x93, 0xe, 0x17, 0x8b, 0x76, 0x5d, 0x5c, 0x19, 0xb0, 0xf9, 0xd6, 0x5b, 0x1e, 0x25, 0xd6, 0xb, 0x72, 0x7e, 0x50, 0xee, 0x4c, 0x39, 0xd1, 0xb8, 0x98, 0xce, 0xa9, 0xc8, 0xe9, 0x5e, 0x40, 0x11, 0xe, 0x40, 0xdd, 0xf8, 0x82, 0xa7, 0xc8, 0x93, 0x3, 0xbf, 0x1b, 0x6a, 0xf9, 0x5, 0x6, 0xe4, 0x70, 0x9a, 0x79, 0x16, 0xf2, 0x7, 0xbe, 0xec, 0xb8, 0x50, 0xc9, 0xe2, 0x27, 0xc9, 0x55, 0x75, 0x36, 0x13, 0x85, 0x94, 0x51, 0x30, 0x43, 0xfe, 0xbe, 0x77, 0x8c, 0x47, 0x1d, 0xff, 0x8, 0xed, 0x2e, 0xd7, 0xf8, 0xa5, 0x49, 0x52, 0xf6, 0xf5, 0x24, 0x22, 0xae, 0xe3, 0x24, 0xe, 0xef, 0x81, 0xd3, 0x4c, 0xbb, 0xe4, 0x7c, 0xc, 0xc5, 0x9a, 0x23, 0x9d, 0x7a, 0xd7, 0x58, 0x52, 0xcf, 0x62, 0x47, 0x3f, 0xdf, 0xa9, 0xc7, 0x23, 0xfe, 0xc8, 0x2c, 0x38, 0x4d, 0x6, 0xf2, 0x32, 0xc, 0x8c, 0x3e, 0x5a, 0x14, 0x83, 0xd9, 0xb5, 0x73, 0xae, 0xe0, 0x3f, 0xe0, 0xf8, 0x50, 0x87, 0x8, 0x7b, 0x89, 0x6a, 0x56, 0x9d, 0x9a, 0x7, 0xb0, 0x2a, 0x38, 0x7e, 0xe0, 0x9e, 0xd6, 0xb7, 0xc8, 0xd6, 0xc0, 0xec, 0xa7, 0x6e, 0xa6, 0x13, 0x1, 0x79, 0x1c, 0x9f, 0x83, 0x5e, 0x5c, 0xad, 0xd1, 0x48, 0x62, 0x39, 0x3a, 0x69, 0x8d, 0xb2, 0x35, 0x77, 0xa6, 0x8e, 0xff, 0xdb, 0x68, 0x7, 0x6f, 0xd8, 0xa0, 0xe7, 0xbb, 0xe9, 0xd9, 0x30, 0x98, 0xe7, 0x3f, 0x5a, 0x17, 0x4c, 0xe4, 0x6, 0x44, 0x1d, 0xf4, 0x8b, 0x96, 0x9b, 0x4d, 0x25, 0x2, 0xeb, 0xbb, 0xd9, 0x93, 0x78, 0x56, 0x77, 0x7d, 0x6f, 0x13, 0x85, 0x2d, 0x9a, 0xd3, 0xa3, 0x97, 0x2, 0xbd, 0x55, 0x60, 0x9, 0x8, 0x2d, 0xc2, 0x7, 0xc4, 0x42, 0xd3, 0x27, 0xeb, 0x33, 0xa2, 0x4f, 0x18, 0xdc, 0x56, 0x42, 0x8b, 0x18, 0x1c, 0x7b, 0x44, 0x5, 0xd0, 0xb2, 0x72, 0xb, 0x8c, 0x4c, 0x62, 0x41, 0x7a, 0xb9, 0xf9, 0xda, 0x55, 0x66, 0xbd, 0x85, 0xfb, 0x7f, 0xc5, 0x67, 0xf5, 0x42, 0xd0, 0x51, 0x11, 0x84, 0x2d, 0xe0, 0x91, 0x14, 0xd2, 0x7a, 0x38, 0x2f, 0x0, 0x9b, 0xf7, 0x37, 0xea, 0x2d, 0x8d, 0x8e, 0x4f, 0x9, 0x0, 0xa0, 0xde, 0xba, 0x8, 0xc, 0xe6, 0xb0, 0xfd, 0x7f, 0xe, 0xcb, 0x3f, 0x81, 0x79, 0x17, 0x17, 0xeb, 0x12, 0x11, 0x76, 0x41, 0x2e, 0x7c, 0xa6, 0x18, 0x73, 0x5b, 0xb0, 0x65, 0xa6, 0x59, 0xb6, 0x89, 0xa1, 0x80, 0x69, 0xb2, 0xc4, 0x3b, 0x0, 0xeb, 0xde, 0x9d, 0xe2, 0x72, 0x10, 0x6e, 0x18, 0xe, 0xea, 0x44, 0x62, 0x42, 0xf7, 0x88, 0x9e, 0x50, 0x92, 0xe, 0xe5, 0xda, 0x2b, 0x70, 0x26, 0x96, 0x5b, 0x6d, 0xfc, 0xf4, 0x23, 0x9e, 0xd8, 0xec, 0x7f, 0x73, 0x63, 0x90, 0x3f, 0x10, 0xef, 0x6c, 0xd8, 0xd, 0x76, 0xcb, 0x42, 0x29, 0x8e, 0x91, 0x3c, 0x82, 0x9b, 0x66, 0xce, 0x1a, 0x5b, 0x18, 0x4, 0x7e, 0xf0, 0x6f, 0xad, 0x79, 0xde, 0x36, 0x9, 0x8, 0x6, 0x5e, 0x3a, 0xf, 0x61, 0xaa, 0xe3, 0x34, 0x7a, 0x1d, 0x76, 0x1, 0x18, 0x8d, 0xcf, 0xd6, 0x2c, 0x56, 0xd6, 0x75, 0x73, 0xee, 0x45, 0x50, 0xd6, 0x26, 0x9f, 0xf7, 0x18, 0x1c, 0xad, 0xcf, 0x84, 0x5, 0x97, 0x49, 0xc8, 0xa4, 0xac, 0x1a, 0x46, 0x74, 0x6f, 0xfc, 0xab, 0x7c, 0xbf, 0xa1, 0x84, 0xe, 0x59, 0x90, 0x48, 0x37, 0x95, 0x45, 0x2e, 0xf9, 0x30, 0x75, 0xc9, 0x2a, 0x4d, 0x11, 0x5e, 0xca, 0x32, 0xeb, 0xe5, 0xef, 0x2, 0x11, 0x76, 0x4a, 0xc8, 0xf6, 0xd6, 0x1e, 0xa5, 0xa7, 0x55, 0x30, 0x50, 0x8a, 0x87, 0x24, 0xcd, 0x11, 0x84, 0x62, 0xca, 0x6c, 0xe3, 0x7e, 0x85, 0xe3, 0x37, 0xe3, 0x12, 0xc6, 0xe, 0x43, 0x34, 0x24, 0x97, 0xa9, 0xc5, 0xc, 0x5, 0xb3, 0x8a, 0x6d, 0x5c, 0x25, 0x3e, 0x1c, 0x0, 0x15, 0x38, 0xb4, 0x3d, 0x13, 0x12, 0xa3, 0x69, 0xd8, 0x30, 0x15, 0x44, 0xcc, 0x24, 0xb3, 0xbf, 0x30, 0x89, 0xc5, 0xd1, 0x19, 0xaf, 0xe9, 0x97, 0x94, 0x30, 0x22, 0x31, 0x91, 0xad, 0xde, 0x6b, 0x68, 0x13, 0x5b, 0x5d, 0x8a, 0xd5, 0xce, 0x4a, 0x80, 0x85, 0x80, 0xbb, 0x1c, 0x34, 0xf6, 0x50, 0xeb, 0x63, 0xee, 0xf3, 0xd5, 0x92, 0xbb, 0xc4, 0x5b, 0xb7, 0xf2, 0xde, 0x9a, 0xcf, 0x2d, 0x4b, 0xc2, 0x82, 0xe, 0xc1, 0xaa, 0x76, 0x5f, 0x35, 0xfc, 0xb3, 0xf7, 0x1d, 0x86, 0x2a, 0xaa, 0x11, 0x56, 0xd0, 0x83, 0x8e, 0xf0, 0x62, 0x41, 0x91, 0x4a, 0xa4, 0xb8, 0x63, 0x27, 0x33, 0xb8, 0x23, 0xac, 0xa5, 0x80, 0x1b, 0xd2, 0x81, 0xd1, 0x27, 0x23, 0x86, 0x76, 0x38, 0xd, 0xd8, 0x8e, 0x9b, 0xe0, 0xd6, 0xdd, 0xd0, 0xac, 0x7e, 0x87, 0xcd, 0xc1, 0x75, 0xa2, 0x43, 0x43, 0xb7, 0x52, 0xa4, 0x6a, 0xfe, 0xec, 0xac, 0x75, 0x61, 0x76, 0x6b, 0xc3, 0x3d, 0xe4, 0x36, 0x3d, 0xdf, 0x7, 0xf4, 0x3e, 0x9b, 0xc4, 0xa1, 0xec, 0x5f, 0xf, 0xe3, 0x6f, 0x40, 0xc3, 0x0, 0x1f, 0x16, 0x47, 0x5, 0x81, 0x31, 0x62, 0x9e, 0x2c, 0xca, 0xf0, 0x56, 0xb3, 0x81, 0xfc, 0x3b, 0x57, 0x6d, 0x8d, 0xd0, 0x72, 0xb8, 0xb2, 0xab, 0xd, 0x25, 0x1b, 0x90, 0x60, 0xa9, 0xf7, 0x6b, 0x3d, 0x99, 0xf2, 0xd0, 0xeb, 0xf6, 0x57, 0x81, 0xb9, 0x51, 0x1d, 0xe3, 0x10, 0x27, 0xd8, 0x28, 0x62, 0x99, 0xde, 0x9f, 0xbc, 0x9c, 0x1c, 0x28, 0xbe, 0x2e, 0x4d, 0xf9, 0xce, 0x82, 0x40, 0x85, 0x2f, 0xe0, 0x42, 0xd5, 0x72, 0x23, 0x6a, 0xc5, 0x4b, 0x42, 0xb6, 0x90, 0xd2, 0x5a, 0xdf, 0x27, 0xc2, 0x6a, 0x96, 0xd0, 0xfd, 0x4, 0x8f, 0x1d, 0x11, 0x29, 0x96, 0x36, 0xb5, 0x56, 0x31, 0xd3, 0x78, 0x82, 0x63, 0x70, 0xaf, 0x97, 0xd7, 0x6e, 0x40, 0x2c, 0xf4, 0x9c, 0xa5, 0x68, 0x7c, 0x17, 0xe2, 0xf8, 0xbb, 0xea, 0xe, 0xd8, 0x35, 0x35, 0x53, 0x55, 0x66, 0xd6, 0x5f, 0xc, 0x6f, 0x7b, 0x2d, 0x88, 0x7d, 0xcd, 0x39, 0x1d, 0xf0, 0xe9, 0xce, 0xb2, 0x7b, 0xc0, 0xa8, 0xa3, 0x30, 0x39, 0xcd, 0xca, 0x51, 0x5c, 0x88, 0x6d, 0x89, 0xd, 0x69, 0xa3, 0x89, 0xaf, 0x7b, 0xcb, 0x9c, 0x9e, 0x58, 0xde, 0x6, 0x36, 0x44, 0x13, 0x97, 0xa5, 0x3a, 0xf0, 0x9a, 0x44, 0x7b, 0xff, 0xd4, 0x9b, 0xef, 0x72, 0x87, 0xaa, 0xd0, 0x1a, 0x18, 0x27, 0xfc, 0xb8, 0x64, 0x1f, 0x9b, 0xcb, 0x76, 0x42, 0x95, 0x2d, 0x7e, 0x19, 0x44, 0x8c, 0x4e, 0x88, 0xdc, 0x5a, 0xbb, 0x28, 0xe2, 0x4b, 0xfe, 0xac, 0x16, 0xbb, 0xcb, 0x9f, 0x8e, 0x99, 0x62, 0xf5, 0x32, 0xb4, 0x28, 0xcc, 0xf8, 0x6e, 0xf6, 0x35, 0x69, 0x7e, 0x17, 0x9e, 0xa3, 0x28, 0x38, 0x79, 0xe9, 0x37, 0x5f, 0xfd, 0xd4, 0xdd, 0x99, 0x86, 0xcf, 0x86, 0x21, 0x70, 0xd3, 0xd8, 0x57, 0x43, 0x40, 0x42, 0xb, 0x43, 0x51, 0x2d, 0x5a, 0x36, 0x8c, 0xf3, 0x38, 0xb7, 0x32, 0xef, 0x44, 0x7a, 0x66, 0x9c, 0x51, 0x14, 0x66, 0xdf, 0xd, 0xdd, 0x9e, 0x5e, 0x26, 0xa1, 0x9a, 0x2a, 0xdf, 0xb1, 0x7c, 0xfc, 0x59, 0x35, 0x70, 0xf6, 0xc6, 0x77, 0x5d, 0x70, 0x31, 0x9e, 0x4d, 0xcd, 0xc4, 0xbe, 0xaf, 0x70, 0xac, 0x76, 0x8e, 0x78, 0x37, 0xfe, 0xf9, 0x4c, 0x78, 0x5e, 0xb5, 0x4b, 0x1a, 0x6c, 0x16, 0x4e, 0x9, 0xfe, 0x88, 0x79, 0x1b, 0x3d, 0xb6, 0xd1, 0xbc, 0xfa, 0x4e, 0xc1, 0x70, 0xa3, 0x69, 0x5f, 0xbc, 0x21, 0xc9, 0xad, 0x19, 0x42, 0xd3, 0xa4, 0x83, 0xcb, 0xd4, 0x33, 0xd3, 0xfc, 0xc8, 0x99, 0xf1, 0x2b, 0xb9, 0xcf, 0x78, 0x86, 0x66, 0xc0, 0x65, 0x8c, 0xfd, 0xea, 0x7f, 0x29, 0xd5, 0xca, 0xfb, 0xf3, 0xb1, 0x6b, 0x3e, 0xd9, 0x5e, 0x52, 0xae, 0x21, 0xe5, 0x99, 0xe6, 0x35, 0x4d, 0x65, 0x30, 0x5d, 0x7, 0x3d, 0xe3, 0x4b, 0x67, 0x7c, 0xfd, 0x9f, 0xf, 0xf0, 0xcc, 0xef, 0x95, 0x6b, 0xf5, 0x61, 0x4, 0x3e, 0xd, 0xb9, 0x67, 0x62, 0xc3, 0xb9, 0x36, 0x52, 0x47, 0xc1, 0x51, 0xcd, 0x6, 0x7, 0x55, 0x1b, 0xf8, 0xd7, 0x81, 0xe0, 0xce, 0x84, 0xd2, 0x3e, 0xf7, 0xb6, 0xa3, 0xb6, 0x7b, 0x69, 0x8c, 0xf3, 0xed, 0xc2, 0xdb, 0x9d, 0x96, 0x81, 0x74, 0xc0, 0xa2, 0x60, 0x10, 0xfa, 0x7f, 0xcc, 0xc5, 0xf8, 0x7e, 0x8b, 0x25, 0xd1, 0x24, 0x63, 0x39, 0x2b, 0xbc, 0x40, 0x4b, 0x22, 0xe0, 0x46, 0xb5, 0x3d, 0x18, 0x3a, 0x68, 0x61, 0xf6, 0x67, 0x71, 0x8, 0x48, 0x4f, 0xe5, 0x9e, 0x41, 0x7, 0x7b, 0xcf, 0x6c, 0x37, 0x59, 0x66, 0x31, 0x12, 0xba, 0x95, 0x10, 0x14, 0xf4, 0x9, 0x52, 0xd2, 0x9a, 0x15, 0x9b, 0xa3, 0xf8, 0x38, 0xa8, 0xce, 0xd3, 0x70, 0x7e, 0x45, 0xe0, 0x83, 0x7d, 0xc6, 0x2d, 0x5, 0x76, 0xa6, 0xdd, 0x12, 0xf3, 0xc7, 0x5c, 0xf9, 0x2, 0x63, 0x6d, 0xf5, 0xfb, 0xbd, 0xcd, 0x9b, 0x19, 0x3, 0x7e, 0x69, 0x9, 0x1b, 0x26, 0x8, 0x2b, 0x7d, 0xe2, 0xed, 0xc1, 0xec, 0x5b, 0xc2, 0x18, 0xea, 0x76, 0xc, 0x4b, 0x53, 0x4a, 0xaf, 0x35, 0x22, 0x52, 0x4, 0x3d, 0xc5, 0xb4, 0xad, 0xa6, 0xa, 0x9d, 0xee, 0x32, 0x18, 0xf1, 0x8d, 0xe6, 0xb, 0xc6, 0x54, 0xa9, 0xd, 0x82, 0x43, 0x5, 0x67, 0xf0, 0xc5, 0x91, 0xc7, 0x21, 0x90, 0x42, 0x18, 0xf, 0xc8, 0x44, 0xb, 0x5e, 0x42, 0x2a, 0x4b, 0xca, 0xaf, 0x92, 0x55, 0x3b, 0xa8, 0x6b, 0x14, 0x9c, 0x7d, 0x5e, 0x76, 0x13, 0x90, 0xc5, 0x2e, 0xe0, 0x13, 0x90, 0x0, 0x59, 0x5e, 0x17, 0x12, 0x93, 0x80, 0x30, 0xf3, 0x87, 0xbc, 0x88, 0x6c, 0x7e, 0x66, 0xbb, 0x11, 0xf7, 0x4a, 0x6c, 0xcb, 0x5c, 0xa9, 0x30, 0x99, 0xde, 0x6, 0xa0, 0x66, 0x5a, 0x1a, 0x99, 0xe1, 0x46, 0xe4, 0x80, 0xfd, 0x80, 0xd7, 0xed, 0x36, 0xe, 0x95, 0xfb, 0x3b, 0x2b, 0x8, 0xbc, 0x23, 0x54, 0xdf, 0xd5, 0x6b, 0xfd, 0x40, 0x31, 0x53, 0x8f, 0x43, 0x8a, 0xc1, 0x2, 0xb7, 0x34, 0x72, 0xdf, 0xf3, 0xdd, 0xc9, 0x3b, 0xbe, 0xc4, 0xf9, 0x98, 0x7d, 0xca, 0x8d, 0xf7, 0x91, 0x15, 0x89, 0x2a, 0x0, 0x4e, 0x86, 0xf4, 0xfe, 0x8e, 0x76, 0xbe, 0xc1, 0x45, 0xa1, 0x9c, 0x1, 0x36, 0x30, 0xde, 0x21, 0x8b, 0x3a, 0xe3, 0xc3, 0x25, 0xdd, 0x62, 0x2d, 0xbf, 0x17, 0x89, 0x7d, 0x68, 0x83, 0x3b, 0x43, 0xe8, 0x70, 0x83, 0x49, 0x68, 0xa, 0xd1, 0x83, 0x60, 0x44, 0xf0, 0x9d, 0xa, 0x36, 0xa0, 0xa, 0xbb, 0xfb, 0x9e, 0xb9, 0xb9, 0xfb, 0xc3, 0x9e, 0xb7, 0x1d, 0xef, 0xed, 0x6b, 0x2b, 0x86, 0xf4, 0xb8, 0x50, 0x91, 0xa2, 0xa1, 0xc6, 0x14, 0x1a, 0x2d, 0x74, 0xa8, 0xb2, 0xf1, 0x1e, 0x7c, 0xf4, 0xb5, 0xbd, 0xa, 0x76, 0x5, 0xf4, 0x3b, 0x75, 0x2f, 0x1f, 0xe2, 0xb5, 0x52, 0x9b, 0xc0, 0xb9, 0x13, 0xb5, 0x98, 0x11, 0x49, 0xf8, 0xe3, 0xe2, 0x38, 0x8, 0x19, 0x37, 0x41, 0xf1, 0x52, 0xd7, 0x7a, 0x10, 0x18, 0x49, 0x8b, 0x4, 0x59, 0x82, 0xa, 0x8e, 0x6e, 0xb6, 0x61, 0xb6, 0x33, 0x25, 0xd4, 0x1e, 0xa2, 0xe8, 0xd, 0x7, 0x14, 0x17, 0x81, 0x65, 0x51, 0x27, 0x2e, 0xdb, 0x51, 0x9d, 0xf3, 0x79, 0xe5, 0xcb, 0x7, 0x30, 0xed, 0x93, 0x35, 0x97, 0xe0, 0xd6, 0x28, 0x58, 0x27, 0x53, 0x90, 0x33, 0x1b, 0xb0, 0x48, 0xd2, 0x1f, 0x75, 0x3f, 0xa5, 0x2, 0x62, 0xfe, 0x9e, 0xd6, 0xff, 0x0, 0xf5, 0x4f, 0xc0, 0x75, 0x2d, 0xb0, 0x16, 0xa3, 0xf5, 0xf8, 0xdc, 0x41, 0x14, 0xdf, 0xb7, 0x60, 0xe8, 0xe9, 0xe1, 0x7a, 0x3b, 0x87, 0x6c, 0xb7, 0xfb, 0xc3, 0xf4, 0x43, 0x84, 0x3a, 0x9d, 0xf4, 0x62, 0x67, 0x40, 0xbd, 0xc, 0x51, 0x1b, 0xff, 0xfe, 0x4f, 0x78, 0x49, 0xc7, 0x7e, 0xa6, 0x48, 0x57, 0xc4, 0x89, 0xc2, 0x4, 0xda, 0x3f, 0xbf, 0x6c, 0x8, 0xac, 0xdd, 0x70, 0x5d, 0x75, 0x24, 0x24, 0x5b, 0xd2, 0x3e, 0x37, 0x67, 0xc6, 0x58, 0x7b, 0xa, 0x70, 0x74, 0x3a, 0xab, 0xda, 0x34, 0x34, 0xf0, 0x96, 0x9d, 0x0, 0x7b, 0xbf, 0xdd, 0x27, 0x96, 0x8c, 0x4e, 0x7f, 0xbb, 0xab, 0x26, 0x21, 0xec, 0x26, 0xfc, 0x28, 0xfa, 0x98, 0x4a, 0xe, 0x75, 0x13, 0xc5, 0x48, 0xf5, 0xbe, 0x67, 0xba, 0xe1, 0x39, 0x9, 0x88, 0x73, 0x93, 0x2b, 0xd6, 0x51, 0xfa, 0x85, 0xf8, 0x97, 0x8f, 0x8a, 0x52, 0xca, 0x11, 0x11, 0xc3, 0x54, 0xaa, 0xf0, 0x77, 0x28, 0xa1, 0xa4, 0xd8, 0xe8, 0xbc, 0x45, 0xcd, 0xfb, 0x17, 0x4f, 0xd8, 0xcf, 0xfd, 0xb8, 0xb2, 0x3c, 0xee, 0x7c, 0xb7, 0xc7, 0xcf, 0x2c, 0xa5, 0x90, 0xb9, 0x3c, 0x4e, 0xeb, 0x40, 0x31, 0x23, 0xb2, 0xe1, 0x2, 0x93, 0x2, 0x1a, 0x73, 0x7b, 0x21, 0x46, 0xb2, 0x13, 0x27, 0xc0, 0xf2, 0xff, 0xb5, 0x91, 0x76, 0xd1, 0xb2, 0x6d, 0xd3, 0xa1, 0xb7, 0xdf, 0xe3, 0x46, 0x76, 0x13, 0x20, 0x74, 0x26, 0xb3, 0x25, 0x3f, 0xb6, 0x1b, 0xe, 0x42, 0x96, 0x9e, 0x5f, 0x6f, 0x1, 0xa1, 0x2, 0x69, 0x90, 0x83, 0x1, 0xd, 0x5f, 0x53, 0xf1, 0xc, 0x36, 0xf0, 0xc6, 0x9e, 0xf7, 0x3b, 0x35, 0xb, 0x14, 0x4f, 0xd2, 0x95, 0x6, 0x3b, 0x19, 0x77, 0x5, 0x52, 0xcb, 0x2b, 0x6, 0xf2, 0x15, 0xcd, 0x5f, 0x30, 0x86, 0x58, 0xdd, 0x34, 0xc1, 0x2e, 0x66, 0xeb, 0xf3, 0xa4, 0x8d, 0xf9, 0xc8, 0x1e, 0xa4, 0xa, 0x72, 0x8a, 0x3, 0x5e, 0x4d, 0x20, 0xae, 0x41, 0x72, 0xa6, 0x55, 0x6d, 0x3c, 0xd5, 0xda, 0x10, 0x9e, 0xd, 0x2c, 0x5c, 0x40, 0xf5, 0x8f, 0x10, 0x4b, 0xe1, 0x15, 0x9, 0x28, 0x2b, 0x67, 0x82, 0x68, 0x31, 0xa9, 0x56, 0x5, 0x84, 0x46, 0x6a, 0x93, 0x86, 0x7, 0x31, 0xc3, 0xf8, 0x8a, 0x29, 0x36, 0x85, 0xf6, 0x58, 0xc1, 0x5d, 0x4e, 0x3a, 0x12, 0xb3, 0x8e, 0xf6, 0x3a, 0x4a, 0x17, 0x5f, 0x74, 0x54, 0x1f, 0xa, 0xac, 0x49, 0x9e, 0x39, 0x16, 0xa5, 0xc7, 0xfa, 0x3a, 0x2b, 0x30, 0x85, 0xcf, 0xed, 0xa4, 0x59, 0x39, 0xc3, 0x19, 0xb3, 0x9f, 0x88, 0x77, 0x5, 0xb9, 0xf0, 0x89, 0xc9, 0xf, 0xa3, 0x8d, 0x62, 0x69, 0xf0, 0x47, 0x56, 0x15, 0x2d, 0x6b, 0x58, 0xfc, 0x22, 0xae, 0x8a, 0x16, 0xd1, 0xf0, 0x93, 0x54, 0x80, 0x19, 0xe9, 0xea, 0xfd, 0x24, 0x32, 0x3a, 0xed, 0xc6, 0x5f, 0xb8, 0xf, 0xb9, 0xa9, 0x95, 0xf, 0x96, 0xb9, 0xaa, 0x56, 0x88, 0x6a, 0x96, 0x95, 0xbb, 0xaf, 0xa1, 0x9a, 0x9d, 0xf7, 0xa, 0x97, 0xeb, 0x73, 0x72, 0x99, 0x15, 0xaf, 0x44, 0x33, 0xd3, 0x8a, 0x2e, 0xce, 0xa4, 0xe, 0xce, 0xd, 0xa7, 0x1c, 0xe, 0xae, 0xbb, 0x61, 0xd5, 0xc9, 0x6, 0x81, 0x51, 0x35, 0x88, 0x29, 0x32, 0xb2, 0x44, 0x29, 0x1, 0xdd, 0x71, 0x9b, 0xfb, 0x33, 0x86, 0xdc, 0xb4, 0x57, 0x46, 0xfc, 0x76, 0x3, 0xe1, 0xb5, 0x7c, 0x30, 0x32, 0xd5, 0x4a, 0xf9, 0x8a, 0x52, 0x8f, 0x3d, 0x2f, 0x8d, 0x80, 0x10, 0x26, 0xca, 0xf9, 0x4f, 0xfc, 0xa, 0x95, 0x25, 0x8f, 0x28, 0xaf, 0x7b, 0xfa, 0x5, 0xa6, 0xcd, 0xc6, 0xdb, 0xc8, 0x4d, 0xad, 0x9f, 0x7f, 0xa5, 0x20, 0xa7, 0x8, 0xee, 0x18, 0xe6, 0xac, 0xb3, 0x16, 0x23, 0x54, 0x79, 0xc4, 0x9c, 0xe5, 0xb8, 0xf0, 0xd8, 0x96, 0xee, 0xe7, 0x2, 0x93, 0xf8, 0x22, 0xfe, 0x85, 0xe9, 0xd1, 0x5b, 0x5f, 0x45, 0x11, 0xcb, 0x2e, 0x5c, 0x49, 0x26, 0xd9, 0xef, 0xc1, 0x1f, 0xf9, 0x31, 0xb4, 0x65, 0x60, 0x95, 0x32, 0xd3, 0xf7, 0x8a, 0xcc, 0xb0, 0x8b, 0x3c, 0x25, 0x97, 0xaa, 0xd0, 0x82, 0x85, 0x22, 0x38, 0xf2, 0x4d, 0xe9, 0x5, 0xd4, 0x33, 0x48, 0x4d, 0x4, 0x1c, 0x9c, 0x90, 0xe1, 0xf9, 0xbd, 0xd1, 0x45, 0x24, 0xef, 0x59, 0x3a, 0xda, 0xc2, 0x5b, 0xe, 0xaa, 0x59, 0xf5, 0xd0, 0x22, 0x3d, 0xe1, 0x57, 0xdd, 0x2a, 0xef, 0x43, 0x64, 0x22, 0x7f, 0xce, 0xfc, 0x25, 0xdc, 0x1e, 0x98, 0x78, 0x5c, 0x40, 0xb8, 0xf4, 0x91, 0xdb, 0xe8, 0x34, 0x71, 0x3c, 0x9c, 0x9e, 0x8c, 0xcb, 0x72, 0x13, 0x33, 0x51, 0xc8, 0xaa, 0xc3, 0x62, 0x5a, 0x33, 0x37, 0xd6, 0x37, 0xc2, 0x64, 0xd9, 0xab, 0x2, 0xde, 0x30, 0xd7, 0x8a, 0x7a, 0xa5, 0x48, 0x91, 0xea, 0x52, 0xc9, 0x6e, 0x7f, 0x6, 0x1a, 0xfa, 0x55, 0x8f, 0x5f, 0x66, 0x1d, 0x87, 0x52, 0xf5, 0x4d, 0xbe, 0xe0, 0x25, 0xa6, 0x8b, 0x72, 0xe2, 0x5, 0xec, 0xb2, 0xd1, 0x4e, 0xe8, 0x4c, 0x7d, 0xff, 0xca, 0xad, 0x8f, 0x28, 0x29, 0xf2, 0x1b, 0x77, 0x8d, 0x85, 0xba, 0x3c, 0x59, 0x3, 0x94, 0xad, 0x4d, 0xe3, 0x95, 0x87, 0xd4, 0xe, 0xab, 0x9, 0x15, 0xa3, 0xc7, 0xe7, 0xbc, 0x89, 0xbf, 0xcc, 0x75, 0x66, 0xd1, 0xf4, 0x4d, 0x25, 0xf, 0xc3, 0xdc, 0xa3, 0x27, 0xe7, 0xdf, 0xd2, 0xdc, 0x7e, 0x4, 0xc0, 0x1c, 0x57, 0x73, 0xb7, 0xde, 0xee, 0x55, 0x81, 0x6, 0xa3, 0xa4, 0xd7, 0xbd, 0xa8, 0x34, 0x7c, 0x8f, 0x5c, 0x11, 0x50, 0x5, 0x51, 0x34, 0x5e, 0x96, 0x3a, 0x34, 0xfa, 0xde, 0x1a, 0xad, 0xa6, 0xf8, 0x8b, 0x7f, 0x73, 0xc3, 0x20, 0x61, 0x73, 0xc5, 0xb5, 0xa8, 0x31, 0xcb, 0x30, 0x8a, 0xa3, 0x38, 0xde, 0xc5, 0x7f, 0xb, 0xb4, 0xd0, 0xd4, 0x3b, 0x9, 0x88, 0xe, 0x2e, 0x15, 0xd, 0x43, 0x8d, 0xba, 0x83, 0xab, 0x9f, 0x49, 0xb4, 0xc3, 0xb8, 0x12, 0x38, 0x6d, 0xd2, 0xe1, 0x1f, 0xe9, 0x92, 0xb3, 0x2d, 0xde, 0xb5, 0xf0, 0xb3, 0xf2, 0xf1, 0x0, 0xd9, 0x89, 0xa6, 0x48, 0x2b, 0xf7, 0x5, 0xe1, 0x90, 0xe8, 0x20, 0x1b, 0x61, 0x4a, 0xfb, 0x5b, 0xa6, 0x73, 0x6d, 0xe, 0xc8, 0x1d, 0xbb, 0x35, 0x77, 0x8e, 0x65, 0x65, 0x3f, 0x38, 0xf4, 0x96, 0x94, 0xb8, 0x5b, 0xe, 0x78, 0x20, 0x2c, 0x3f, 0x80, 0x5f, 0xed, 0xbf, 0x6e, 0xc5, 0x79, 0x5f, 0x93, 0x96, 0x6d, 0xb9, 0x65, 0x60, 0x66, 0x94, 0x4b, 0xc2, 0xe5, 0x2c, 0x10, 0xa5, 0xdc, 0xff, 0x5b, 0xa6, 0x8f, 0x0, 0x8c, 0x40, 0xe6, 0xc8, 0x1, 0xd1, 0x6e, 0xdd, 0x3, 0x35, 0x12, 0xb2, 0xf2, 0xf5, 0xe5, 0x1f, 0x3b, 0x49, 0xc4, 0x15, 0xee, 0xad, 0xae, 0x4f, 0x87, 0x8f, 0xa4, 0x4b, 0x3a, 0xa6, 0x96, 0x5b, 0xa6, 0xb7, 0xa1, 0x18, 0x29, 0x7f, 0xe5, 0x99, 0x3c, 0x9a, 0x3e, 0xfc, 0x22, 0xdd, 0x57, 0x36, 0x9c, 0xe8, 0xff, 0x70, 0x9d, 0x83, 0x5c, 0x97, 0x78, 0x74, 0xad, 0xfe, 0xf7, 0xd8, 0xd2, 0x52, 0xd1, 0xe8, 0xf6, 0xf5, 0xad, 0x54, 0x8d, 0x8d, 0x14, 0xd8, 0x9c, 0x72, 0xf2, 0x29, 0x4f, 0x95, 0x4c, 0x6c, 0xe3, 0x53, 0xd0, 0xc3, 0xf4, 0x3a, 0x76, 0xbc, 0x5e, 0x3b, 0xa7, 0xc0, 0x70, 0x7b, 0xf2, 0x1e, 0x4a, 0x4d, 0x6e, 0xbc, 0x4b, 0x99, 0xd3, 0x45, 0x6, 0xb4, 0xab, 0x78, 0xe6, 0x22, 0xbc, 0x32, 0xaa, 0xa7, 0x30, 0x7d, 0xed, 0x2f, 0x55, 0xe5, 0x75, 0xea, 0xa6, 0xa6, 0x1, 0xe6, 0x27, 0xf0, 0x9d, 0xfe, 0x2, 0xe1, 0xcf, 0x3d, 0x59, 0xd0, 0x27, 0xe7, 0xae, 0x1d, 0xbf, 0x4c, 0x13, 0x65, 0x23, 0x1b, 0x72, 0x4b, 0x3, 0x45, 0x1e, 0x79, 0xa3, 0x51, 0x23, 0x93, 0xc8, 0x43, 0xeb, 0xe4, 0x74, 0xd2, 0x9e, 0x3e, 0xe1, 0x82, 0x8b, 0x10, 0x10, 0xa7, 0x46, 0xfb, 0xa2, 0xe6, 0x48, 0x3a, 0x5f, 0x29, 0x33, 0x6a, 0x6c, 0xf0, 0xc9, 0x5e, 0x9d, 0x3b, 0x92, 0x9d, 0x1f, 0xac, 0x33, 0x4d, 0x2f, 0x39, 0x1b, 0xee, 0xde, 0x2f, 0xd, 0xad, 0xf3, 0x99, 0x80, 0x5b, 0x4c, 0x3, 0x9e, 0x66, 0xfc, 0x20, 0x76, 0x73, 0x4d, 0xf2, 0x6, 0x2a, 0x9, 0xaa, 0xdc, 0x69, 0xdf, 0x10, 0xaf, 0xde, 0xf8, 0xed, 0x1a, 0x15, 0xb5, 0xd8, 0x10, 0x41, 0xc3, 0xb0, 0xa0, 0x4e, 0x1a, 0x12, 0x95, 0x86, 0x27, 0xb5, 0x80, 0x56, 0xfe, 0x33, 0x39, 0x7b, 0xcf, 0x5e, 0xbf, 0xff, 0x54, 0xd3, 0x4f, 0xcb, 0xad, 0x32, 0x90, 0x6a, 0x56, 0x85, 0xee, 0x8a, 0x4d, 0xd3, 0x4d, 0xbe, 0xdf, 0x4d, 0xba, 0x83, 0x2f, 0x24, 0x64, 0xf, 0x9, 0xc, 0xcc, 0x21, 0x70, 0x1a, 0x4b, 0x35, 0xed, 0x37, 0xda, 0xc3, 0xe6, 0x96, 0x1e, 0xc8, 0x9e, 0xa0, 0x81, 0x57, 0x51, 0xd5, 0x58, 0x71, 0xa1, 0x31, 0x25, 0xd7, 0x34, 0xef, 0x17, 0x81, 0x24, 0xae, 0x1f, 0x59, 0x3d, 0x89, 0x60, 0x9d, 0x12, 0x18, 0x78, 0xb3, 0x15, 0x1b, 0xa9, 0x6c, 0x83, 0x47, 0xb1, 0x66, 0x55, 0x8f, 0xbd, 0x27, 0xd4, 0xd2, 0x1, 0xd7, 0x6c, 0xdf, 0x47, 0x74, 0x24, 0x4c, 0xea, 0x52, 0x78, 0x96, 0x87, 0x4e, 0xbd, 0xaf, 0x9a, 0xf7, 0x29, 0x3a, 0xfb, 0x14, 0xa4, 0xe3, 0x71, 0x9d, 0x50, 0xd9, 0xc9, 0x90, 0x2b, 0x92, 0x74, 0x1b, 0xcf, 0xe0, 0x57, 0x2d, 0x37, 0xea, 0x11, 0xda, 0x57, 0x29, 0x8d, 0xc9, 0xf7, 0x10, 0xf3, 0xd2, 0x29, 0x4e, 0x48, 0xf6, 0x8c, 0x47, 0xd9, 0x72, 0xcd, 0x2, 0x61, 0x50, 0x84, 0x82, 0xef, 0xf8, 0xb2, 0x90, 0xf5, 0x27, 0x37, 0xe6, 0x41, 0xb6, 0x1e, 0x99, 0x26, 0xee, 0xc0, 0x20, 0xfd, 0xd7, 0x4a, 0x1a, 0x7, 0x22, 0xba, 0x53, 0x49, 0x54, 0xd4, 0xce, 0xdb, 0x3e, 0xd4, 0x4e, 0xb2, 0x55, 0x6, 0x97, 0x8, 0xbc, 0xe9, 0xa2, 0x25, 0x64, 0xf5, 0xb4, 0x99, 0x5, 0x62, 0x27, 0x8e, 0x2e, 0x89, 0x24, 0x5c, 0x54, 0xb8, 0x27, 0x8e, 0xc1, 0x7c, 0x8b, 0x56, 0x41, 0x57, 0xe8, 0x7d, 0xd5, 0x2c, 0xdc, 0x1a, 0x67, 0xd6, 0xd, 0xfd, 0xb6, 0xcc, 0x9a, 0xce, 0x96, 0xa5, 0xbc, 0xc7, 0x7c, 0xd3, 0x3a, 0x10, 0xc5, 0x6, 0x66, 0x5, 0x48, 0xa1, 0x67, 0x19, 0x3a, 0x6a, 0x13, 0xfa, 0x6f, 0xbf, 0x31, 0xd, 0x80, 0x3b, 0xd7, 0x32, 0xa5, 0x1b, 0xf8, 0x5c, 0x72, 0xaa, 0xf8, 0x68, 0x89, 0x79, 0x59, 0x1c, 0x5d, 0x82, 0x9e, 0xf4, 0xa7, 0xee, 0xec, 0x82, 0x1, 0x7c, 0xad, 0x8, 0x80, 0x20, 0x9c, 0x4a, 0x64, 0xa0, 0xea, 0x4b, 0xa2, 0x2f, 0x40, 0xd2, 0x6c, 0xd5, 0x59, 0xec, 0xeb, 0x9c, 0x87, 0x9a, 0xe4, 0x13, 0xd6, 0x2, 0x40, 0xe2, 0x6f, 0x88, 0xa7, 0xdf, 0x5, 0x57, 0xdb, 0x1e, 0xb, 0xf9, 0x38, 0x32, 0x7d, 0xc4, 0xcc, 0x6, 0x64, 0xe0, 0xb4, 0xe, 0x9d, 0xc, 0x67, 0xa4, 0x31, 0xc1, 0x58, 0x6, 0x35, 0xbd, 0xe0, 0x40, 0xff, 0x20, 0x79, 0xfb, 0xd5, 0x24, 0xd, 0x2d, 0xe2, 0xdb, 0x11, 0x2a, 0xe4, 0xf3, 0x41, 0x1d, 0xf, 0x59, 0x8, 0xdb, 0xda, 0xed, 0x15, 0x15, 0x16, 0x3b, 0x62, 0x1a, 0x66, 0xcf, 0xf, 0x3d, 0x80, 0xaf, 0xa0, 0xe0, 0xb5, 0x63, 0xf3, 0xab, 0x81, 0xfd, 0x6, 0x11, 0x7a, 0x7f, 0x21, 0xe7, 0xae, 0x2f, 0xaa, 0x46, 0x1e, 0xfc, 0xe9, 0x61, 0xfe, 0xfd, 0xab, 0xcd, 0xca, 0xe2, 0x7c, 0x20, 0xf0, 0x11, 0x43, 0x8, 0xba, 0xae, 0x2, 0x28, 0xd8, 0x49, 0xa, 0xa, 0x84, 0xe, 0x39, 0xbc, 0x9a, 0x50, 0x1c, 0xc, 0x59, 0x1c, 0xa2, 0x8f, 0xba, 0x2, 0x5e, 0x14, 0x5e, 0x4f, 0xff, 0x4b, 0x43, 0x2a, 0x16, 0x1b, 0xd8, 0x21, 0xfd, 0x86, 0x28, 0x55, 0xa9, 0x55, 0x3, 0x5c, 0x1a, 0xde, 0xad, 0xe9, 0x8c, 0xde, 0xdd, 0x8e, 0xc0, 0xbf, 0x8, 0x81, 0xce, 0x6f, 0x3f, 0xb3, 0xb6, 0x95, 0x1, 0xb1, 0x64, 0xfa, 0xe0, 0x89, 0xff, 0x0, 0x7a, 0x92, 0x3f, 0x42, 0x54, 0x60, 0x19, 0x84, 0x4c, 0x6, 0x38, 0x7b, 0x84, 0x70, 0x71, 0x71, 0x6b, 0x30, 0x49, 0x1a, 0x50, 0xa8, 0x36, 0xdf, 0x91, 0x3d, 0xc2, 0xba, 0x22, 0xd0, 0xdb, 0x14, 0xd1, 0x8f, 0x84, 0x81, 0x26, 0xac, 0x12, 0x4e, 0x5e, 0x9a, 0x0, 0x4b, 0x54, 0x73, 0xc6, 0x6, 0xae, 0x54, 0x2, 0x35, 0x7a, 0x93, 0xfb, 0xc7, 0x14, 0x63, 0x24, 0xe2, 0x69, 0xb6, 0x24, 0x8b, 0x43, 0xcf, 0xc2, 0x29, 0x10, 0x31, 0xf7, 0x20, 0x21, 0x53, 0xcb, 0xc4, 0x56, 0x3f, 0xbb, 0xe, 0x6d, 0x0, 0x8d, 0x6b, 0xd, 0xad, 0x9a, 0x2, 0xd0, 0x3f, 0x33, 0xfb, 0xf8, 0xbc, 0x92, 0x7, 0x19, 0x9b, 0xbc, 0x19, 0xec, 0xa8, 0x0, 0xef, 0xae, 0xbb, 0x5b, 0x7e, 0x1f, 0x89, 0x29, 0x84, 0x6a, 0xa2, 0xcf, 0xca, 0x4b, 0x13, 0xee, 0x36, 0x52, 0x47, 0x7f, 0xe3, 0xee, 0xed, 0x93, 0xb6, 0x3c, 0xf2, 0x50, 0x8a, 0x1e, 0x54, 0xb, 0xd3, 0x52, 0x50, 0xfa, 0x40, 0xf9, 0x3a, 0x41, 0xad, 0x70, 0xa4, 0xe5, 0xb5, 0x47, 0x0, 0x69, 0x68, 0x10, 0x65, 0x31, 0x41, 0x9e, 0x8d, 0xc6, 0xe, 0x42, 0x31, 0x29, 0xfd, 0x62, 0x7b, 0xcd, 0xf1, 0x4b, 0xf0, 0xd2, 0x94, 0x98, 0x4b, 0xe3, 0x3, 0x7d, 0x4f, 0x5c, 0xe6, 0xeb, 0x8a, 0xac, 0x28, 0x74, 0x4a, 0xa3, 0x13, 0x25, 0xbb, 0x32, 0xcf, 0x85, 0xd9, 0x5f, 0x4, 0x57, 0x30, 0x40, 0xfa, 0xf5, 0x54, 0xd8, 0x7b, 0xa7, 0xe1, 0xbf, 0xd9, 0xcb, 0x37, 0xd4, 0x3e, 0x2d, 0xf6, 0xa8, 0xee, 0x9, 0xb8, 0x42, 0x3f, 0x8f, 0xaa, 0x8f, 0x7, 0x44, 0xb0, 0xf3, 0x83, 0xfe, 0x9a, 0xb4, 0x3, 0xd5, 0xb7, 0x7f, 0x8b, 0x2d, 0xa1, 0xe2, 0x6e, 0x3b, 0xf2, 0xe, 0x5c, 0x19, 0x5e, 0xf3, 0x41, 0x5f, 0xf2, 0xda, 0x74, 0x0, 0x3b, 0x9f, 0x82, 0xd7, 0x4f, 0x5a, 0x4a, 0xf4, 0xec, 0x1f, 0x9e, 0x87, 0xe2, 0xec, 0xf5, 0xb, 0x36, 0x29, 0x90, 0xff, 0xf4, 0x32, 0xfc, 0x7a, 0x98, 0x65, 0x78, 0xb0, 0xd0, 0x16, 0x61, 0x75, 0xf0, 0x87, 0xdc, 0x8d, 0x72, 0x4f, 0xe4, 0x3e, 0xa6, 0xd7, 0xa5, 0x41, 0xaa, 0x7e, 0x54, 0x45, 0xb0, 0x27, 0x3b, 0x41, 0xba, 0x78, 0x18, 0xa9, 0x6c, 0x28, 0x26, 0x5d, 0xb7, 0xfc, 0x72, 0x9f, 0xf7, 0x2c, 0x8d, 0xd6, 0x35, 0x26, 0x9f, 0xc, 0x35, 0xd4, 0x3d, 0x8c, 0xd2, 0xa0, 0xd4, 0xac, 0xed, 0xf1, 0x3c, 0x75, 0x13, 0xf, 0x17, 0xd6, 0x5c, 0x57, 0xa9, 0xed, 0x2d, 0x26, 0xd5, 0xa6, 0xab, 0xe0, 0x6e, 0x40, 0xcc, 0x7b, 0x78, 0xd2, 0xa5, 0x54, 0xc0, 0xa2}, - output224: []byte{0xae, 0x38, 0xd7, 0x76, 0x3d, 0x84, 0xce, 0xa8, 0x8e, 0x46, 0x8e, 0xd4, 0x33, 0x8d, 0xa5, 0x8f, 0x4e, 0x10, 0x80, 0x1e, 0x15, 0x19, 0xe6, 0x5a, 0xac, 0xc3, 0xc6, 0xda}, - output256: []byte{0x0, 0x85, 0x6e, 0xec, 0xb7, 0xb7, 0x2e, 0x76, 0xd8, 0x15, 0xf7, 0xae, 0x4, 0x24, 0x51, 0x9e, 0xb5, 0xb5, 0xc, 0x81, 0x28, 0xc4, 0xb1, 0x7d, 0x15, 0xdf, 0x1, 0x13, 0xbc, 0x30, 0x2a, 0xb}, - output384: []byte{0x85, 0xeb, 0x70, 0xf7, 0xc2, 0xbb, 0x4, 0x8, 0x53, 0x52, 0x33, 0x3d, 0xf7, 0x69, 0x38, 0x1, 0x2d, 0x15, 0x1d, 0x76, 0xa5, 0xe1, 0x65, 0xe6, 0xe1, 0x79, 0x6c, 0x69, 0x32, 0xf3, 0xa7, 0x19, 0x88, 0xab, 0xff, 0xae, 0xbe, 0x1b, 0x14, 0x8, 0xae, 0x4e, 0xcc, 0xde, 0xf7, 0x19, 0x8b, 0xd9}, - output512: []byte{0xa9, 0x17, 0xf7, 0x7e, 0xad, 0xc2, 0xb7, 0xa0, 0x14, 0x40, 0x9f, 0xd1, 0x24, 0xab, 0x38, 0x0, 0x5, 0xff, 0x9e, 0xa6, 0xda, 0xf9, 0x24, 0x54, 0xb, 0x72, 0x16, 0x42, 0xc0, 0xc7, 0x3d, 0x30, 0xd2, 0x40, 0x3c, 0xa7, 0x8b, 0xaa, 0x5b, 0x79, 0x13, 0x60, 0x46, 0x8d, 0xfb, 0x47, 0x5a, 0x55, 0x8e, 0x61, 0xe1, 0x5e, 0xf7, 0x12, 0xc7, 0x9f, 0xa2, 0xa8, 0xd6, 0xc3, 0x83, 0x41, 0xcb, 0x1b}}, - testcase{ - msg: []byte{0xe, 0x31, 0xc8, 0xa, 0x1c, 0x41, 0xdf, 0x5f, 0x70, 0x6d, 0xb8, 0xda, 0x40, 0xdc, 0xc0, 0x6e, 0x61, 0xb4, 0xd6, 0x96, 0x97, 0x15, 0xea, 0x2, 0x11, 0x3e, 0x2a, 0x63, 0x66, 0x3d, 0xa6, 0xaa, 0x3d, 0xf8, 0xba, 0x75, 0x51, 0x9, 0xa5, 0x80, 0x44, 0x6e, 0x7e, 0x94, 0xe9, 0xe3, 0x3d, 0xc9, 0x8e, 0xe6, 0xb1, 0x19, 0xd3, 0xab, 0xe7, 0x8b, 0x3b, 0x9f, 0x99, 0x3, 0x49, 0xa6, 0x3d, 0xd6, 0x9, 0x0, 0x8f, 0xf7, 0x2e, 0x2c, 0xb6, 0x71, 0xb, 0x99, 0x52, 0x20, 0x21, 0xae, 0xd5, 0x1b, 0x74, 0x85, 0xb7, 0xb3, 0xb8, 0x9c, 0x4c, 0x5f, 0x81, 0xe0, 0xce, 0x61, 0xb5, 0x31, 0x7, 0x89, 0x55, 0x6d, 0x93, 0x64, 0x6d, 0x53, 0x17, 0x44, 0xe6, 0xb3, 0x93, 0xaa, 0x38, 0xe1, 0xac, 0xa0, 0xd6, 0x56, 0x57, 0x28, 0x56, 0x4, 0x3, 0x42, 0x3c, 0x5c, 0x5b, 0xf3, 0xb8, 0xb, 0x4e, 0x99, 0xbb, 0xa5, 0xfa, 0x53, 0x76, 0x5a, 0x8f, 0xb, 0x67, 0xe9, 0x9b, 0xbd, 0xf, 0x1e, 0x31, 0x92, 0x97, 0x31, 0x17, 0x5b, 0x49, 0xe2, 0x37, 0xee, 0xc4, 0x48, 0xd0, 0x8d, 0x28, 0x2c, 0xa6, 0x34, 0xd7, 0x20, 0xce, 0x74, 0xc5, 0x59, 0x25, 0xb6, 0x8f, 0xb, 0xcf, 0x8, 0xb6, 0x49, 0x3b, 0x18, 0x4, 0x65, 0xce, 0x3, 0xab, 0x4d, 0xb3, 0xc7, 0x4b, 0xea, 0x45, 0xd2, 0x45, 0xd2, 0x16, 0x98, 0xe9, 0xf1, 0xcc, 0x8e, 0xd4, 0x6e, 0xc4, 0xbf, 0x4a, 0xd4, 0xff, 0xda, 0xaa, 0xb9, 0xca, 0x2b, 0xd7, 0x5a, 0xf8, 0x17, 0x80, 0xae, 0x59, 0x61, 0xb, 0x65, 0x27, 0x15, 0xa3, 0xf, 0x45, 0x81, 0x2a, 0xd1, 0x7, 0x5f, 0xb9, 0x5, 0x13, 0x40, 0x16, 0x7f, 0x69, 0xcc, 0xd0, 0x1b, 0x5, 0xfd, 0xf1, 0xf4, 0xcf, 0xa3, 0x6c, 0x5, 0x32, 0x69, 0xb0, 0x6e, 0x40, 0xd9, 0x9c, 0x5c, 0xbc, 0x68, 0x5d, 0xc1, 0x8e, 0x26, 0x6f, 0x60, 0xb2, 0x3c, 0x19, 0x56, 0x57, 0x76, 0xa5, 0xf7, 0x6c, 0x5e, 0xa9, 0x17, 0xaa, 0xb0, 0x8d, 0xb8, 0x63, 0xdc, 0x88, 0xc2, 0x34, 0x2c, 0x7f, 0x7f, 0xe, 0x0, 0x24, 0x6b, 0x66, 0xea, 0xfe, 0x2d, 0x3d, 0xe1, 0x38, 0x4a, 0x10, 0x8d, 0xf5, 0xdd, 0x5a, 0xac, 0x8f, 0xce, 0x8b, 0xed, 0xbf, 0x49, 0x5f, 0x6, 0x5d, 0xbf, 0x43, 0x7, 0xc9, 0x8b, 0x87, 0x9a, 0x6b, 0x38, 0x6f, 0x8a, 0x42, 0x61, 0xda, 0xea, 0xa0, 0xa, 0x33, 0x1f, 0xd2, 0xd8, 0x27, 0xe8, 0x95, 0xd2, 0xfd, 0xeb, 0x84, 0x1, 0x26, 0x56, 0x4e, 0xd5, 0x61, 0x62, 0x4a, 0xbb, 0xef, 0x25, 0xb0, 0x42, 0x7f, 0xaf, 0xef, 0xd7, 0x5, 0xf5, 0x6e, 0x2f, 0x36, 0x2a, 0xb7, 0x41, 0xc, 0xb7, 0x77, 0x59, 0x1b, 0xb0, 0x12, 0x6c, 0xf7, 0xe, 0x39, 0xe, 0xfb, 0xb4, 0xe7, 0xa1, 0x3b, 0x7, 0x45, 0xd7, 0xed, 0xd8, 0x64, 0xe6, 0xf9, 0xe, 0x8e, 0x38, 0xb6, 0x1c, 0x70, 0x6e, 0x14, 0x4b, 0xd5, 0xf, 0xbc, 0x6b, 0x5a, 0x5a, 0xbb, 0x81, 0xb, 0x5b, 0x82, 0xe2, 0xc0, 0xd1, 0x3b, 0xc4, 0xe, 0xfc, 0x83, 0xe9, 0xe7, 0x90, 0xf9, 0x90, 0xd3, 0x4a, 0x7, 0xa5, 0xf3, 0x12, 0xe2, 0x53, 0x90, 0xb, 0x57, 0xb0, 0x4e, 0xb6, 0x34, 0xdd, 0xfe, 0xaa, 0x53, 0x7a, 0xaf, 0x8d, 0x11, 0x8f, 0x1f, 0xd, 0xb5, 0x7d, 0x6e, 0x62, 0x6, 0xc0, 0xea, 0xf9, 0x4c, 0xe2, 0xd5, 0x40, 0xf6, 0xee, 0x2e, 0x2e, 0x20, 0x49, 0x41, 0x84, 0x8a, 0x53, 0x7d, 0x86, 0x8f, 0x9d, 0x95, 0xd6, 0x81, 0xf0, 0xc5, 0x93, 0x58, 0x81, 0x28, 0x8e, 0xd, 0x91, 0xc1, 0x2d, 0xe1, 0xc, 0x36, 0x29, 0xe4, 0x3e, 0x9d, 0xc4, 0x36, 0x20, 0x18, 0x9f, 0x44, 0x98, 0x5b, 0x59, 0x42, 0x7a, 0xc1, 0x31, 0xb3, 0x5a, 0xb4, 0x57, 0x4a, 0x3c, 0xe2, 0x88, 0x80, 0x6b, 0x9f, 0x4c, 0xd2, 0x3e, 0xe2, 0x46, 0x3f, 0x3a, 0xe9, 0x47, 0xfe, 0x6e, 0xee, 0x2f, 0xd3, 0xca, 0x9b, 0x77, 0x80, 0xe0, 0x93, 0x9b, 0x61, 0x5e, 0x8d, 0xcf, 0x94, 0xff, 0x68, 0x4f, 0xb4, 0x1b, 0x76, 0xd2, 0x5c, 0x61, 0x43, 0xc2, 0x82, 0xce, 0xd5, 0xd9, 0x79, 0x9e, 0xe1, 0x9f, 0xce, 0x19, 0x4b, 0x4, 0x7e, 0x80, 0x72, 0xb8, 0x15, 0x4e, 0x9c, 0x3c, 0xef, 0x1a, 0x34, 0xe7, 0xdf, 0xca, 0x73, 0xd4, 0xea, 0x16, 0x36, 0xcd, 0x81, 0x20, 0xa8, 0x48, 0x32, 0x85, 0xb2, 0x1a, 0xff, 0xd0, 0x2e, 0xe0, 0x6e, 0xc8, 0x82, 0xf7, 0x4b, 0xb8, 0xed, 0x8, 0xd0, 0x11, 0xa9, 0xa1, 0x70, 0x43, 0xd1, 0x2c, 0x4b, 0xfe, 0x83, 0xef, 0xc8, 0x20, 0x85, 0x49, 0xe5, 0x38, 0x74, 0x49, 0x77, 0x41, 0xaf, 0xf8, 0xe5, 0xb8, 0xfc, 0x59, 0x41, 0x91, 0xe1, 0xb9, 0x2e, 0x58, 0x1b, 0x1b, 0x73, 0x61, 0xee, 0x57, 0xbd, 0x39, 0xc5, 0xb2, 0xdf, 0xd4, 0x9f, 0x15, 0xc7, 0x58, 0xb5, 0x7d, 0xe8, 0xfd, 0x5f, 0x2d, 0x65, 0xf7, 0x25, 0x80, 0x41, 0x48, 0xa6, 0x41, 0xa2, 0xe3, 0xa, 0x73, 0x2b, 0x59, 0x32, 0xfe, 0x8c, 0xe4, 0x3a, 0x21, 0x2c, 0x6b, 0xe5, 0x56, 0x3f, 0xee, 0x85, 0x10, 0xe3, 0xb8, 0xa9, 0xfe, 0x21, 0xa0, 0xff, 0xb6, 0x49, 0x79, 0x18, 0xe, 0xc1, 0xd0, 0x84, 0x2f, 0x61, 0x2f, 0x1d, 0x58, 0xea, 0x55, 0x5f, 0x5b, 0x5c, 0x7d, 0xc8, 0x2e, 0xbf, 0x2e, 0x4a, 0xe7, 0x83, 0xf6, 0x8, 0xa3, 0x7d, 0xea, 0x30, 0x18, 0x6f, 0x55, 0x8e, 0xe7, 0x43, 0xc3, 0xc2, 0xd2, 0xc9, 0xd, 0x5f, 0x51, 0x26, 0x92, 0x0, 0xa2, 0x84, 0x55, 0xd1, 0x5f, 0xd4, 0x6, 0x51, 0x66, 0xae, 0x51, 0xd5, 0xa8, 0x26, 0x87, 0x93, 0x1, 0x1b, 0x77, 0x77, 0xbb, 0x8d, 0xfb, 0x52, 0x3c, 0x27, 0x8c, 0x9a, 0x7d, 0x1f, 0x69, 0xa, 0xaf, 0x5, 0xbd, 0xf9, 0xe, 0x7, 0x6b, 0x3d, 0xb8, 0x76, 0x6, 0xe6, 0x57, 0x5a, 0x8e, 0xc0, 0xa5, 0xc5, 0xbd, 0xa9, 0x63, 0x5f, 0xde, 0x17, 0x9d, 0x40, 0xde, 0xb4, 0x46, 0x6d, 0xcd, 0x2c, 0xf2, 0xf0, 0xce, 0x93, 0x55, 0x4c, 0xa6, 0xc4, 0x53, 0xb3, 0x2, 0x49, 0x8f, 0xdc, 0x5d, 0xfc, 0x4f, 0xe1, 0xcc, 0x71, 0x75, 0x29, 0xc3, 0x32, 0xc7, 0x77, 0x15, 0x40, 0xb2, 0x9c, 0xb3, 0xa3, 0xba, 0xbb, 0x52, 0x2d, 0xcc, 0x7c, 0xc, 0x10, 0x82, 0x96, 0x89, 0x3b, 0x4d, 0x90, 0x62, 0x94, 0x92, 0xde, 0xcd, 0x4a, 0xf2, 0x3e, 0xe8, 0xc8, 0x48, 0x30, 0xfe, 0xa1, 0x48, 0x2c, 0x9b, 0x9c, 0xbf, 0xa, 0xf1, 0x43, 0xaf, 0x68, 0x35, 0x4e, 0xc5, 0x7c, 0xdd, 0x8b, 0x3e, 0x1a, 0x50, 0x39, 0x68, 0xa9, 0x69, 0x12, 0x33, 0xd7, 0x6b, 0x36, 0x30, 0xb1, 0x8e, 0x1c, 0x79, 0x26, 0x3e, 0xb0, 0x5f, 0x81, 0x5, 0xd1, 0xe1, 0x7, 0x7, 0x1, 0xd3, 0x5c, 0xc0, 0x32, 0xdb, 0xfd, 0x5b, 0x2e, 0x87, 0x72, 0x12, 0xe7, 0xa1, 0x19, 0x40, 0xdf, 0x6c, 0xdc, 0xa8, 0x4d, 0x5c, 0xf7, 0xf7, 0x43, 0x6e, 0x65, 0x57, 0x16, 0xa0, 0x9, 0xd, 0x21, 0x24, 0xcb, 0xd, 0xc6, 0xf0, 0x7b, 0xd0, 0x51, 0xee, 0x93, 0x56, 0x28, 0x7a, 0x91, 0x96, 0xf4, 0x3b, 0x17, 0xf7, 0x3d, 0x3f, 0x5, 0x6d, 0xcd, 0x38, 0xcf, 0x9, 0x83, 0xf5, 0xda, 0xe8, 0xdb, 0x93, 0x98, 0x3, 0xd6, 0x86, 0x6a, 0xd4, 0xf2, 0x80, 0xc, 0xf1, 0xb3, 0x16, 0xca, 0x31, 0x4, 0x1e, 0xab, 0xbd, 0x59, 0xd0, 0xdf, 0x83, 0x80, 0xfc, 0xe7, 0xf3, 0xb6, 0x24, 0x61, 0xa4, 0xdd, 0x6e, 0x14, 0xf9, 0xe4, 0x8d, 0xc1, 0x30, 0x79, 0x1c, 0x4, 0xff, 0x7c, 0x6e, 0x3e, 0x84, 0x62, 0xf3, 0x85, 0x94, 0xb6, 0x2b, 0x11, 0xd6, 0xb8, 0x65, 0x62, 0x21, 0x70, 0xb9, 0x54, 0xff, 0x99, 0x9, 0xaf, 0x29, 0x99, 0xa, 0xb4, 0x13, 0x4d, 0x48, 0xd4, 0x94, 0xbe, 0xd3, 0xbf, 0x8f, 0x93, 0x9f, 0xfb, 0xa7, 0x6e, 0x3a, 0x3a, 0x8a, 0x26, 0x3f, 0x75, 0xf8, 0xa1, 0xf3, 0xb2, 0x19, 0x42, 0x25, 0x25, 0xd8, 0xac, 0x91, 0x94, 0x88, 0x72, 0xf2, 0x21, 0xf8, 0xc0, 0x79, 0x87, 0xa4, 0xee, 0x85, 0x29, 0xf7, 0x1a, 0x9f, 0x2b, 0x8a, 0xe7, 0xc7, 0xa0, 0x54, 0xc7, 0x3f, 0x13, 0xf, 0x97, 0xa2, 0xea, 0x8e, 0xbe, 0xae, 0xea, 0xc3, 0x8, 0xae, 0x9e, 0x98, 0x44, 0x47, 0x57, 0x3b, 0xcb, 0x29, 0x56, 0x54, 0x26, 0x1e, 0x9, 0x80, 0x4c, 0x65, 0xd3, 0xac, 0xcc, 0x93, 0x2c, 0x32, 0xd2, 0x65, 0xe8, 0x26, 0x12, 0x50, 0xbc, 0x4, 0x5f, 0xdb, 0x58, 0x96, 0xab, 0x26, 0x6c, 0xf3, 0xba, 0x5b, 0x92, 0x54, 0xdd, 0x8e, 0x54, 0x11, 0x2f, 0x2b, 0xfc, 0xc9, 0xf1, 0x19, 0xef, 0x4e, 0x20, 0x59, 0xa9, 0xec, 0xf, 0xf6, 0x2b, 0x42, 0xc3, 0xdf, 0xfb, 0xa2, 0x86, 0x8e, 0x4a, 0xa1, 0xc7, 0x2, 0x1a, 0xc3, 0x5c, 0x9a, 0xec, 0x2c, 0xb5, 0xd1, 0x33, 0xe2, 0xdb, 0x8e, 0x11, 0xce, 0x6b, 0x2c, 0xce, 0x87, 0x75, 0x4f, 0x4d, 0xa3, 0xa4, 0x7, 0x89, 0xf9, 0x5e, 0xf5, 0x60, 0xbc, 0x90, 0x57, 0x8f, 0x50, 0xf8, 0x8, 0x7f, 0x4e, 0x53, 0x44, 0x4a, 0xf8, 0xc4, 0x53, 0x77, 0x4d, 0x99, 0x8e, 0x13, 0xbc, 0xbf, 0xc, 0xe5, 0x4c, 0xbc, 0xf5, 0x69, 0x58, 0x25, 0x49, 0x59, 0x68, 0x59, 0x79, 0xe5, 0x6f, 0xc, 0xfb, 0xee, 0x65, 0x7f, 0xae, 0xb, 0xdb, 0x4, 0x80, 0x90, 0x76, 0x27, 0xac, 0x22, 0x31, 0xee, 0xdc, 0xf, 0x78, 0xba, 0xc2, 0x8b, 0x5a, 0xbe, 0x1d, 0x20, 0xa0, 0xe4, 0x28, 0x97, 0x3d, 0x15, 0xe6, 0xf1, 0x29, 0x6e, 0x3b, 0xa, 0xb8, 0x76, 0x1d, 0x77, 0xdc, 0x92, 0x8a, 0x43, 0xae, 0xce, 0x9c, 0xa5, 0xc5, 0x2, 0xef, 0x74, 0x66, 0x87, 0x4b, 0x68, 0x10, 0x85, 0xdd, 0xb5, 0xe7, 0x37, 0x7e, 0x16, 0xd1, 0x1e, 0xa2, 0xf, 0xd9, 0x31, 0xf9, 0xbc, 0x21, 0x3a, 0xe0, 0xf5, 0x44, 0xaa, 0xed, 0xea, 0x9e, 0x4f, 0xb7, 0xf5, 0x46, 0x5b, 0x94, 0xc1, 0x49, 0x79, 0xf3, 0xbb, 0x23, 0x16, 0x76, 0x83, 0x1e, 0xe7, 0x3f, 0xb7, 0xa3, 0x79, 0xb7, 0x89, 0x36, 0x57, 0x1, 0xd6, 0xe2, 0xe2, 0xa2, 0x47, 0xc1, 0xc2, 0x1a, 0xe5, 0xeb, 0xf6, 0xf3, 0xed, 0xd9, 0xc4, 0x68, 0x98, 0x97, 0x4b, 0x73, 0x43, 0x6, 0xe7, 0xc, 0x9b, 0x55, 0x73, 0xb4, 0xd0, 0x52, 0xe6, 0x3f, 0x9c, 0x44, 0x39, 0x6b, 0xc8, 0x9c, 0x95, 0x66, 0x80, 0xa, 0x7e, 0x2a, 0x9a, 0x4c, 0x32, 0x90, 0x2f, 0x79, 0x9b, 0x4f, 0xf2, 0x2c, 0xc9, 0xbc, 0x21, 0xf3, 0x9b, 0x8a, 0x8a, 0xf4, 0xe3, 0x40, 0x7, 0xca, 0xe3, 0x7a, 0xde, 0x40, 0xcb, 0x85, 0x9d, 0xec, 0xea, 0x4d, 0x27, 0x4b, 0xd1, 0x1d, 0xbb, 0x2f, 0x5b, 0xa3, 0x4, 0x31, 0x3c, 0x66, 0xa7, 0x7f, 0x7a, 0x43, 0xb5, 0xaa, 0x7d, 0xfe, 0x18, 0xbe, 0x40, 0xa9, 0xf4, 0x99, 0xb9, 0x5e, 0x4b, 0x82, 0x5e, 0xa0, 0xb, 0xb8, 0x3a, 0xd, 0x4f, 0x11, 0xf2, 0xf6, 0x2f, 0x5e, 0xa7, 0xf, 0xb8, 0x17, 0xdc, 0x6c, 0x66, 0x6b, 0x9, 0xbb, 0x6c, 0x91, 0x99, 0x72, 0xb2, 0xa0, 0xc7, 0xbf, 0xb1, 0xc, 0x5b, 0x46, 0x74, 0x92, 0xb8, 0x29, 0x1a, 0x2b, 0x98, 0x20, 0xe2, 0xd8, 0xbc, 0x6e, 0x72, 0x50, 0x35, 0x5e, 0x23, 0xf5, 0x6, 0x62, 0xda, 0xfe, 0xec, 0xe0, 0xc, 0xc8, 0xc0, 0xb7, 0x4f, 0xe2, 0x2, 0x78, 0xdd, 0xdf, 0x87, 0xd, 0xdd, 0xaf, 0x8, 0x34, 0x80, 0xb1, 0x50, 0x4e, 0x11, 0xb5, 0x18, 0xd3, 0xf9, 0xe9, 0x93, 0x3c, 0x3f, 0xf2, 0xf0, 0xca, 0x3c, 0x42, 0x3b, 0x86, 0x91, 0x68, 0x3e, 0x3e, 0xa1, 0x90, 0x20, 0x4, 0xaa, 0x51, 0xcd, 0x82, 0x37, 0x9, 0xbb, 0x5, 0x14, 0x1a, 0x8b, 0x8c, 0xfb, 0xcb, 0x4e, 0xf9, 0xf7, 0x3a, 0xca, 0x2f, 0x9, 0x71, 0x65, 0x58, 0xd8, 0x79, 0x41, 0x8d, 0xc7, 0xb0, 0x88, 0x2f, 0xaa, 0x38, 0x1a, 0xac, 0xef, 0xaa, 0xb6, 0x11, 0xec, 0xc3, 0x36, 0xf3, 0x6d, 0x6f, 0xd7, 0x89, 0xeb, 0x73, 0x46, 0x52, 0xa0, 0x8b, 0xbf, 0xc6, 0x1d, 0x19, 0x92, 0x50, 0x67, 0xc6, 0xe5, 0xdc, 0xac, 0x4f, 0x5, 0xbf, 0xda, 0xb6, 0xfc, 0xf0, 0x83, 0x59, 0x9f, 0x28, 0x45, 0xd0, 0x42, 0x9c, 0x5, 0xa6, 0x16, 0xd1, 0x97, 0x70, 0x4, 0x80, 0x3b, 0xff, 0xf9, 0x8, 0x74, 0x51, 0x4a, 0x79, 0xc0, 0xf4, 0x5e, 0x4c, 0xc5, 0xb3, 0x18, 0x2b, 0xe7, 0xc4, 0x5a, 0x9e, 0x2f, 0x9a, 0xd, 0xd9, 0x76, 0xfe, 0x3c, 0x22, 0x5, 0x42, 0xcf, 0x11, 0xcb, 0x52, 0x78, 0x61, 0xcd, 0x74, 0x61, 0xe0, 0x3f, 0x53, 0x35, 0x29, 0xe, 0x24, 0xc4, 0x83, 0xb1, 0x5d, 0xd2, 0x61, 0x7b, 0x31, 0x37, 0x1a, 0x6f, 0xf9, 0x8c, 0xd6, 0x2f, 0xd8, 0xe7, 0x13, 0xf1, 0x66, 0xc3, 0x95, 0x4f, 0x8, 0x67, 0xdc, 0x8c, 0x36, 0x41, 0xc9, 0xcd, 0xb1, 0xa2, 0x4f, 0x3a, 0x9e, 0xf2, 0x70, 0xd5, 0x63, 0x37, 0x53, 0x7c, 0x98, 0xd3, 0xfe, 0x90, 0x4c, 0xfc, 0x32, 0xd, 0x8d, 0x19, 0xa2, 0x41, 0xe1, 0x54, 0xc, 0xf5, 0xcb, 0xfc, 0x5a, 0x55, 0x79, 0xc7, 0x60, 0x26, 0xcd, 0xf9, 0x61, 0xae, 0x88, 0xd3, 0x22, 0x48, 0x18, 0xe8, 0xea, 0xcd, 0x70, 0xae, 0x43, 0x7, 0xb3, 0x35, 0xbb, 0x75, 0x9f, 0x8e, 0xb7, 0x1d, 0x4a, 0x32, 0xd1, 0x2f, 0x61, 0x18, 0x4d, 0x91, 0xcb, 0x8, 0x17, 0x37, 0xeb, 0x9e, 0xf5, 0xc3, 0x6b, 0x8b, 0xd5, 0xa7, 0x62, 0xb3, 0x78, 0x12, 0x53, 0x40, 0x3a, 0x9d, 0x62, 0x1b, 0x90, 0x70, 0xeb, 0x22, 0xb7, 0x7d, 0x41, 0xdb, 0x6a, 0x8b, 0x23, 0xb6, 0xb6, 0xdf, 0xfb, 0xa9, 0x2b, 0x4d, 0x54, 0xd4, 0xc6, 0x25, 0xff, 0x55, 0xba, 0x5b, 0xb0, 0xd1, 0xbf, 0x49, 0x9f, 0xee, 0x64, 0x81, 0x3e, 0x76, 0x2c, 0xbe, 0x9b, 0xe8, 0xa6, 0x65, 0x66, 0xa5, 0xf7, 0x33, 0xb0, 0xeb, 0x40, 0x7c, 0xb0, 0x25, 0xa0, 0xd9, 0xe, 0x6e, 0x2e, 0x8a, 0x41, 0x5d, 0x9c, 0xed, 0x32, 0x17, 0xa5, 0x41, 0xc2, 0x8d, 0xea, 0xff, 0x17, 0xab, 0x86, 0x55, 0xdb, 0x0, 0x1f, 0x52, 0x3f, 0xf3, 0x3, 0x92, 0x13, 0x37, 0xed, 0x2e, 0xe0, 0xae, 0xac, 0x60, 0x70, 0xf8, 0xad, 0xf9, 0xff, 0xd6, 0x13, 0x32, 0xec, 0xbf, 0xd2, 0xdf, 0x68, 0xab, 0x36, 0x67, 0x51, 0xc8, 0x38, 0x85, 0x36, 0x7e, 0xff, 0x7f, 0x58, 0x9e, 0xcc, 0x4b, 0x7d, 0xa6, 0x51, 0x3, 0xf8, 0x14, 0xeb, 0xc2, 0xb3, 0x99, 0x93, 0x3, 0x16, 0x24, 0x13, 0x23, 0xa1, 0xf5, 0xa2, 0xbf, 0xc7, 0x1f, 0xca, 0x1, 0x9b, 0xf8, 0x88, 0xf6, 0xd5, 0x63, 0x2a, 0xc9, 0x16, 0xd7, 0x3a, 0x3e, 0x91, 0x5d, 0x26, 0xdd, 0x11, 0xa2, 0x81, 0x6a, 0x27, 0xe2, 0x38, 0x56, 0x8e, 0xd0, 0xbb, 0x4d, 0x2d, 0xbb, 0x13, 0xfe, 0x6b, 0x6d, 0xb5, 0x7b, 0xe, 0xd9, 0xed, 0x50, 0x5, 0x59, 0x79, 0x1b, 0x1, 0x75, 0x51, 0x79, 0xea, 0x68, 0xf5, 0x7f, 0xc4, 0xb, 0xc3, 0x57, 0x92, 0x5d, 0x11, 0x44, 0x1, 0xf3, 0x28, 0xbf, 0x6a, 0xfb, 0x7a, 0x35, 0x48, 0xf9, 0x57, 0xea, 0x12, 0xf7, 0x69, 0x76, 0x67, 0x1a, 0x8b, 0x5c, 0xc2, 0xa5, 0xb0, 0xd0, 0x85, 0xec, 0xa8, 0x7c, 0xdb, 0x91, 0x1d, 0x13, 0x44, 0xaa, 0x7f, 0xe0, 0x2c, 0x92, 0xf1, 0xe, 0x5c, 0x86, 0xb6, 0xbd, 0x4c, 0x1f, 0xc2, 0xc6, 0xf0, 0x2c, 0xcc, 0xec, 0x98, 0xaa, 0xeb, 0x75, 0x20, 0x57, 0xcb, 0x4e, 0x64, 0x43, 0x4d, 0x1e, 0x9, 0x86, 0xb9, 0x3e, 0x3f, 0x98, 0x1d, 0x1b, 0x58, 0x35, 0xd7, 0x56, 0x91, 0xcf, 0x58, 0x6, 0x54, 0xb5, 0xab, 0x34, 0x68, 0x85, 0x9b, 0x21, 0x4b, 0xf, 0x3b, 0xf6, 0xa7, 0x56, 0x5, 0x90, 0x1a, 0x6a, 0x1e, 0xc1, 0xef, 0xe, 0xe0, 0xa6, 0xce, 0x1, 0x32, 0xd2, 0x8c, 0xd7, 0x9e, 0x63, 0x65, 0xec, 0x6a, 0x99, 0x2f, 0x8a, 0xd7, 0x30, 0xa4, 0x4, 0xc, 0x8b, 0xc2, 0xa0, 0xfe, 0xb8, 0x31, 0x5a, 0x90, 0x63, 0x95, 0x16, 0xb0, 0xd3, 0xd, 0xb4, 0xa6, 0x6f, 0x7e, 0x72, 0x48, 0xb0, 0x4f, 0xfe, 0xc3, 0x98, 0x5b, 0x2a, 0x19, 0x95, 0xdf, 0x3e, 0xd5, 0x8c, 0x35, 0x31, 0x67, 0x5c, 0x4b, 0xa8, 0x85, 0xd5, 0xa4, 0x88, 0xa7, 0x73, 0xdd, 0xb3, 0xe9, 0x4d, 0x29, 0x82, 0xfa, 0x22, 0xa7, 0xd4, 0x24, 0x41, 0x43, 0x5, 0xa3, 0x36, 0x17, 0x19, 0x92, 0xde, 0x1, 0xe3, 0x1e, 0x72, 0x45, 0xcb, 0xd3, 0xb5, 0x4d, 0x46, 0x20, 0x90, 0x14, 0x92, 0x1d, 0x5f, 0xbd, 0xd3, 0x7, 0x7f, 0x3b, 0xfd, 0x86, 0xa3, 0xa9, 0x9c, 0xf9, 0x98, 0xd1, 0x41, 0xc3, 0xa4, 0x33, 0xe7, 0xd6, 0x8a, 0xad, 0x54, 0x7c, 0xe, 0xc9, 0x9c, 0xa3, 0xf, 0x2d, 0x15, 0xff, 0x5f, 0x26, 0xcd, 0x0, 0xf0, 0xd4, 0x5f, 0x2f, 0x4, 0x61, 0xef, 0x70, 0xa, 0x30, 0x3, 0x88, 0x77, 0x0, 0x4a, 0x22, 0xd5, 0x4c, 0xe3, 0xf1, 0x98, 0xb4, 0x4a, 0xd4, 0x70, 0xf2, 0xa, 0xde, 0xad, 0x37, 0xbd, 0x7f, 0x74, 0x82, 0xe7, 0x27, 0xc1, 0x20, 0x21, 0x45, 0x33, 0x54, 0x88, 0xa7, 0x39, 0xe6, 0x88, 0xf7, 0x82, 0x32, 0x54, 0xdd, 0x66, 0x9d, 0xf5, 0x9b, 0xfd, 0x94, 0xec, 0x7b, 0x8, 0xc5, 0x26, 0x28, 0x6a, 0xab, 0xde, 0xd0, 0xec, 0x28, 0x71, 0x4e, 0x7c, 0x5c, 0x56, 0x37, 0x9f, 0x5f, 0x2, 0x97, 0xe5, 0x35, 0x12, 0xdd, 0x1e, 0x71, 0xde, 0x49, 0x3e, 0x46, 0x3d, 0x3f, 0x4d, 0x18, 0x0, 0x97, 0xb8, 0x77, 0x1b, 0x5e, 0x5, 0x5f, 0xc7, 0xe4, 0x36, 0xc5, 0x7b, 0x53, 0x36, 0x54, 0x23, 0xd3, 0x59, 0xee, 0xa4, 0x14, 0x96, 0xef, 0xfc, 0x10, 0xf9, 0xb, 0x46, 0xa2, 0x20, 0x4e, 0xf4, 0xcf, 0x3d, 0xae, 0xbb, 0x60, 0xa3, 0x4, 0x78, 0x66, 0xd7, 0x36, 0xda, 0x1a, 0x35, 0x53, 0xbd, 0x32, 0xa7, 0x8a, 0x37, 0xa, 0xd1, 0x49, 0x31, 0x9e, 0xa4, 0xcd, 0xfe, 0xb9, 0x92, 0x1f, 0xf9, 0x20, 0xb4, 0xd6, 0xa2, 0x75, 0x2e, 0x9f, 0x63, 0x96, 0xda, 0x5f, 0x32, 0xab, 0x8d, 0x79, 0xe7, 0x17, 0xf0, 0x4f, 0xf9, 0xd, 0x19, 0x8d, 0x24, 0x99, 0x76, 0xc0, 0x81, 0xcd, 0x29, 0x81, 0x59, 0xba, 0xce, 0x7d, 0x72, 0x0, 0xe3, 0x4c, 0x82, 0xd0, 0xc7, 0x6a, 0x61, 0xdc, 0x8, 0x98, 0x28, 0x7c, 0xa0, 0xa7, 0x7e, 0x9f, 0x4d, 0x64, 0x95, 0x57, 0xe0, 0xcd, 0x4c, 0x5e, 0x13, 0x8d, 0xa5, 0x3d, 0x30, 0xd4, 0x7c, 0x5b, 0xb4, 0xca, 0xd5, 0x26, 0x77, 0x32, 0x1c, 0xa0, 0xde, 0xc3, 0x9, 0xcb, 0x65, 0x8f, 0x73, 0xd9, 0x3d, 0x6c, 0x5, 0x72, 0x6b, 0xba, 0x12, 0x4, 0xd7, 0x8c, 0xbe, 0x97, 0xbb, 0x3f, 0xb7, 0x6c, 0x7b, 0x9f, 0x64, 0xd, 0x6f, 0x96, 0x17, 0xa, 0x87, 0x39, 0xf7, 0x74, 0x30, 0x11, 0x17, 0x11, 0xe1, 0x3d, 0x9e, 0x4e, 0x73, 0x48, 0x63, 0xcb, 0x39, 0xa3, 0xe3, 0x66, 0xc4, 0x6, 0xde, 0x7b, 0xd0, 0xa7, 0x16, 0x38, 0x4e, 0x5a, 0xe, 0xef, 0xee, 0x58, 0x1c, 0xd1, 0x67, 0x5, 0xd1, 0x74, 0x5f, 0x13, 0xd5, 0x6b, 0xb5, 0x5, 0x3d, 0xd1, 0x86, 0x6b, 0xf9, 0xcd, 0xe1, 0xad, 0x9c, 0x46, 0x2a, 0x76, 0xd8, 0x82, 0x42, 0x2f, 0x5c, 0x9a, 0x60, 0x25, 0x13, 0x1f, 0x8b, 0x58, 0x78, 0xad, 0xf9, 0x7d, 0x32, 0xa0, 0xfd, 0x89, 0x32, 0x1d, 0x62, 0xea, 0x5f, 0x5b, 0x8b, 0xa3, 0xc3, 0x80, 0x90, 0x57, 0xc4, 0xd5, 0x53, 0xa3, 0x91, 0xde, 0xe7, 0x5b, 0x93, 0xc8, 0x52, 0x9a, 0xc4, 0x98, 0xa4, 0x9b, 0x52, 0xf2, 0xe3, 0xab, 0x6b, 0xf6, 0x59, 0xcd, 0xe1, 0xb2, 0x10, 0xae, 0xbc, 0x3a, 0x85, 0xec, 0x87, 0x9, 0xe9, 0xab, 0x6c, 0x61, 0x34, 0x8, 0x1e, 0xa0, 0xb0, 0x20, 0xe0, 0xb0, 0x86, 0x7c, 0x72, 0xa6, 0x54, 0x58, 0x3b, 0x95, 0x4c, 0xbc, 0xf8, 0xef, 0x2a, 0x73, 0xce, 0x98, 0x3c, 0x2f, 0x8f, 0xb, 0x5d, 0xb5, 0x77, 0x6c, 0x16, 0xf5, 0x60, 0x79, 0x23, 0x9a, 0x6d, 0x74, 0x64, 0x69, 0x6a, 0x18, 0x2a, 0xc5, 0x18, 0x55, 0x24, 0x6f, 0x8d, 0xdf, 0x8, 0x7f, 0xb4, 0x3, 0x84, 0xf, 0xbf, 0xaf, 0x21, 0x5b, 0x1c, 0x49, 0xd2, 0xe7, 0xb8, 0xcd, 0xc5, 0x67, 0x43, 0x1f, 0x1d, 0x0, 0xc3, 0x79, 0x54, 0xdc, 0x7b, 0x40, 0xbe, 0xe9, 0xa8, 0x68, 0xf2, 0xea, 0xda, 0x29, 0xe6, 0xf0, 0xa7, 0x31, 0x86, 0xc1, 0x19, 0x27, 0x81, 0x97, 0xaf, 0x5, 0x4c, 0x7e, 0x3f, 0x88, 0xe5, 0xf6, 0x96, 0xb0, 0xd4, 0xc9, 0x4c, 0x11, 0x96, 0xf0, 0x58, 0xff, 0xd7, 0x27, 0x22, 0xf6, 0x49, 0x5f, 0x16, 0xdc, 0x41, 0xe6, 0x75, 0x83, 0x3d, 0xf9, 0xe4, 0x39, 0x4a, 0xfb, 0xcc, 0x7a, 0x32, 0xb1, 0x1c, 0xc2, 0x38, 0x8e, 0x49, 0x29, 0x78, 0x68, 0x65, 0xbe, 0x41, 0x78, 0xf5, 0x40, 0xca, 0x52, 0x5d, 0x6, 0x7f, 0xa, 0x78, 0x6b, 0xe5, 0x96, 0xf1, 0x6, 0x70, 0xa2, 0x5f, 0xc6, 0xf2, 0xf5, 0x25, 0xca, 0xc4, 0xe, 0x7e, 0x34, 0x1a, 0xdd, 0xcf, 0xcb, 0x91, 0xf0, 0x69, 0xa5, 0xc2, 0xae, 0xcd, 0x7b, 0x86, 0xed, 0x1f, 0xbe, 0xbe, 0x8e, 0x3b, 0xdb, 0xc3, 0xfe, 0x27, 0xf9, 0x4, 0x2c, 0xc5, 0x3b, 0xec, 0x16, 0x19, 0x8a, 0xd4, 0x22, 0x30, 0x25, 0x6c, 0x83, 0x86, 0xb4, 0x6c, 0x4a, 0xd9, 0x87, 0xea, 0xfc, 0xb6, 0xf0, 0x7e, 0x34, 0x7c, 0xc7, 0xc4, 0xab, 0x4b, 0x4, 0xef, 0x9d, 0x20, 0xcb, 0x58, 0x12, 0x45, 0xc9, 0xc1, 0x2, 0xcc, 0xba, 0x4, 0x4a, 0x18, 0x84, 0x14, 0x6, 0x66, 0xf3, 0x8b, 0xe3, 0xe6, 0x4f, 0xac, 0x46, 0x35, 0xc, 0x4b, 0x3e, 0x98, 0x3d, 0x96, 0x78, 0x84, 0x5e, 0x9c, 0xfc, 0xc6, 0x55, 0xa2, 0x4b, 0xf8, 0x9a, 0x8f, 0xd4, 0x60, 0x5, 0x36, 0xd6, 0x5, 0x8, 0x26, 0x68, 0x61, 0x20, 0x38, 0xb6, 0x25, 0x52, 0x85, 0xbe, 0x6e, 0x62, 0x66, 0xc9, 0x7, 0x56, 0xa3, 0xcb, 0x11, 0x69, 0x31, 0xf7, 0xd7, 0x41, 0x2d, 0x17, 0x25, 0x14, 0x37, 0x60, 0xfe, 0xb8, 0x6f, 0x4f, 0x8c, 0x4c, 0xdf, 0x1f, 0x4b, 0x6, 0xbe, 0xed, 0xf, 0x69, 0xe3, 0xf6, 0x4c, 0x5d, 0xc7, 0x97, 0x5f, 0xac, 0xe5, 0xf2, 0x9, 0xb4, 0xb6, 0x7c, 0xed, 0xb7, 0x34, 0xc2, 0x30, 0x73, 0xf9, 0xae, 0x1d, 0x82, 0x4e, 0xf8, 0x49, 0xbe, 0x83, 0x6f, 0x2, 0xd4, 0x8a, 0xa4, 0x3, 0x48, 0x22, 0x1f, 0xd0, 0x9e, 0x11, 0x1c, 0x7, 0x6e, 0x61, 0x73, 0x74, 0xcc, 0x43, 0xf, 0x31, 0x20, 0x38, 0x3f, 0xce, 0xb3, 0x8c, 0x42, 0xdd, 0x6f, 0x4b, 0x53, 0xe6, 0x6e, 0xf6, 0xc8, 0x3, 0x68, 0xe0, 0xfb, 0x96, 0x51, 0x2f, 0xcb, 0x25, 0xec, 0xbc, 0x4c, 0x2c, 0x3b, 0x99, 0xa0, 0x77, 0x89, 0xe6, 0x92, 0x3, 0x11, 0xda, 0xca, 0x59, 0x9d, 0xd8, 0xc9, 0xf0, 0xca, 0x41, 0x3a, 0x4b, 0xf9, 0xb9, 0xb9, 0x86, 0xd9, 0x20, 0x21, 0x37, 0xc9, 0xdd, 0xdd, 0x36, 0xf9, 0xb1, 0x6b, 0x4, 0x82, 0x68, 0xf8, 0x33, 0x4a, 0xf0, 0xcf, 0xb1, 0x3d, 0xcc, 0x25, 0x89, 0x0, 0x7e, 0x4d, 0xdc, 0x4b, 0x34, 0xa2, 0x16, 0xf7, 0x35, 0x8f, 0x31, 0x6e, 0xff, 0xff, 0x9d, 0xc3, 0x3a, 0x8d, 0x5f, 0xd9, 0x1a, 0x95, 0xbd, 0x43, 0x3b, 0xad, 0x8b, 0xb3, 0x1d, 0x4a, 0x14, 0xd6, 0xd4, 0x5f, 0x6c, 0xb5, 0xe8, 0xa8, 0xec, 0x31, 0x18, 0xa, 0x76, 0xaa, 0x3, 0xe8, 0x3a, 0xb3, 0xb2, 0xcb, 0x9a, 0x7d, 0xe0, 0x74, 0xe, 0xc7, 0xbb, 0xb5, 0x5d, 0xdb, 0x56, 0x32, 0xd4, 0xbe, 0x11, 0x82, 0xe2, 0xab, 0xe3, 0xf6, 0x25, 0x92, 0x3b, 0xf5, 0xb9, 0x44, 0x88, 0xa0, 0x0, 0x72, 0x41, 0x4d, 0xeb, 0x2f, 0xbf, 0xc7, 0x94, 0x44, 0x46, 0x5e, 0xf1, 0xa, 0xa7, 0xea, 0xab, 0xcc, 0x52, 0xe1, 0x3f, 0x68, 0x60, 0x12, 0x50, 0xf3, 0x13, 0xb4, 0xd, 0x3d, 0xde, 0x69, 0x4f, 0xd9, 0x35, 0xe9, 0x2d, 0x4, 0xa9, 0x40, 0xa8, 0xbb, 0x7d, 0x56, 0x70, 0xed, 0x45, 0x4b, 0x47, 0x72, 0x5d, 0x93, 0x3e, 0x64, 0xea, 0x64, 0x85, 0xe4, 0x58, 0x9f, 0x1d, 0x9e, 0x53, 0xde, 0x5e, 0xb1, 0xc9, 0x45, 0x0, 0x49, 0xf3, 0x5d, 0x14, 0xbc, 0xf8, 0xc3, 0x8d, 0x20, 0xbe, 0x81, 0x5d, 0x5a, 0x61, 0x70, 0x3f, 0x36, 0x36, 0xf6, 0xe2, 0x93, 0xea, 0x38, 0x4b, 0x74, 0x2a, 0x90, 0x88, 0xae, 0x0, 0x6d, 0x3a, 0xcb, 0xa, 0x29, 0x6e, 0xad, 0x46, 0x80, 0xf3, 0x15, 0x2d, 0xeb, 0x56, 0x80, 0x15, 0x30, 0xd6, 0x4, 0x4a, 0xa0, 0x40, 0x50, 0x5e, 0xa4, 0xfb, 0x65, 0x6e, 0xca, 0xe9, 0xe3, 0x89, 0xa3, 0xe5, 0x4, 0xf, 0xb6, 0x64, 0x90, 0xc7, 0x9f, 0x26, 0xe9, 0x80, 0xaf, 0x88, 0x56, 0xbc, 0xd3, 0x81, 0xa5, 0x3e, 0x7, 0x36, 0xa9, 0xa4, 0xbc, 0x0, 0x4c, 0xea, 0x3, 0xf1, 0x27, 0xc4, 0x2d, 0x3a, 0xa7, 0x5a, 0xb, 0x9d, 0x90, 0x84, 0x32, 0x6f, 0x57, 0xca, 0xf3, 0x46, 0x22, 0x9f, 0x81, 0x8a, 0x94, 0xfd, 0xf9, 0x2c, 0xf3, 0x2f, 0xc3, 0xdf, 0x8, 0x8, 0xc, 0x57, 0xe2, 0xbd, 0x93, 0x42, 0xfa, 0xe, 0x60, 0x0, 0x4e, 0x90, 0x91, 0xd5, 0x14, 0xc5, 0x0, 0xd4, 0xc3, 0x10, 0xc, 0x73, 0x61, 0xe, 0xd9, 0x89, 0xcc, 0xf5, 0xc2, 0xd4, 0x9, 0x96, 0xf5, 0x2e, 0x4f, 0xa4, 0x69, 0xbb, 0xce, 0xf2, 0xce, 0x1a, 0x7b, 0x2e, 0xfb, 0x9d, 0x70, 0xdd, 0xb3, 0xb, 0x28, 0x72, 0x8f, 0x7b, 0x59, 0x9f, 0x50, 0x3d, 0x92, 0x1c, 0x59, 0x37, 0xf, 0xca, 0xe3, 0xe0, 0x7b, 0xab, 0x48, 0x85, 0xe1, 0x97, 0x26, 0x1f, 0x9d, 0x9, 0x59, 0xad, 0x49, 0xb4, 0x18, 0xb2, 0xf4, 0x45, 0xc0, 0x27, 0x28, 0xdb, 0x3, 0x90, 0x42, 0x82, 0x42, 0x45, 0xcc, 0xc7, 0x75, 0x42, 0xe0, 0xc0, 0xb1, 0x5c, 0x73, 0xc8, 0xe0, 0x17, 0x67, 0xbe, 0x6a, 0x2b, 0xa, 0xb3, 0x70, 0x9f, 0x35, 0x63, 0x2, 0x25, 0xd9, 0x74, 0x9e, 0x23, 0x11, 0xb, 0xc9, 0x6f, 0x59, 0x1b, 0x8d, 0x82, 0x24, 0x91, 0xb9, 0xd, 0x7f, 0x89, 0x3d, 0xc1, 0x12, 0x78, 0x12, 0x18, 0x15, 0x65, 0x95, 0x4e, 0xe6, 0xb8, 0x12, 0x28, 0x65, 0xbd, 0xb4, 0x96, 0xad, 0x53, 0x3e, 0xb7, 0x48, 0x18, 0x6, 0xd4, 0xbb, 0x6, 0x1e, 0x18, 0x17, 0xa, 0x1d, 0xa3, 0x7c, 0xb4, 0x35, 0xcf, 0x35, 0x6d, 0xbf, 0xa5, 0x70, 0xad, 0x4e, 0xeb, 0x26, 0x34, 0x26, 0x12, 0xbc, 0x73, 0xf6, 0xe0, 0xd3, 0x9c, 0xa4, 0x5e, 0xe, 0xb4, 0x4c, 0xeb, 0x7, 0xe4, 0x9d, 0x29, 0xe1, 0xb7, 0x26, 0x71, 0x2f, 0x51, 0xb, 0x68, 0xef, 0x29, 0x75, 0xcf, 0xcf, 0xeb, 0x65, 0x61, 0x64, 0xb, 0xf, 0xc, 0x2e, 0xf9, 0x23, 0xfc, 0x68, 0x10, 0xfa, 0x5c, 0xc5, 0xe5, 0xf7, 0xe5, 0xc2, 0x99, 0x2f, 0xc7, 0xe0, 0x23, 0xcc, 0xab, 0xc7, 0x8b, 0x8d, 0x9f, 0x3e, 0xea, 0xbf, 0xff, 0xf3, 0xa3, 0xc3, 0xc3, 0x8d, 0x32, 0x16, 0x57, 0xe5, 0x95, 0xbb, 0x4e, 0x6c, 0xf1, 0x4, 0xf8, 0xb5, 0x9d, 0xd4, 0x49, 0x1a, 0x88, 0xc9, 0x6b, 0x11, 0xaa, 0x51, 0x79, 0xc3, 0xe2, 0x30, 0x63, 0x5, 0xf4, 0x9f, 0x81, 0x3a, 0x5, 0x98, 0x3, 0x7c, 0xdf, 0xa9, 0x5a, 0x24, 0x49, 0x29, 0x6, 0x59, 0xc8, 0xc1, 0xf1, 0x67, 0x1c, 0xa6, 0x88, 0xa1, 0x9c, 0xa4, 0x98, 0xed, 0xa4, 0xf5, 0x77, 0x1a, 0x97, 0x2b, 0x23, 0x4f, 0x2, 0xfa, 0x70, 0xcf, 0x19, 0x8e, 0xa4, 0x22, 0x27, 0x1, 0xd1, 0xf3, 0x1, 0x31, 0x31, 0xf, 0x1b, 0xa4, 0x40, 0x1e, 0xab, 0xc0, 0x61, 0x90, 0xac, 0x9d, 0xbc, 0x8e, 0xb1, 0xc7, 0x52, 0x6d, 0x4, 0x5f, 0xee, 0xa, 0x9c, 0xbd, 0xcb, 0x24, 0xe0, 0x44, 0x64, 0xe0, 0x3, 0x31, 0x23, 0xd6, 0xf8, 0xf2, 0xf2, 0x4f, 0x12, 0x3c, 0x5e, 0x6d, 0xfd, 0x75, 0xd9, 0x43, 0x63, 0x9c, 0x47, 0xa6, 0x11, 0x4f, 0x8d, 0xdb, 0x7a, 0xf9, 0x65, 0xb8, 0xdd, 0xa8, 0x46, 0xf, 0xdb, 0xc4, 0xb2, 0x58, 0x48, 0x94, 0x90, 0xe6, 0x63, 0x26, 0x69, 0x74, 0x4, 0x59, 0x2a, 0x4a, 0xd4, 0x12, 0x4e, 0x3d, 0x87, 0x9d, 0xb8, 0x64, 0x18, 0x62, 0x79, 0xd3, 0x7, 0x1, 0x5d, 0x2c, 0x3a, 0xdf, 0x96, 0xe2, 0xf5, 0x71, 0x60, 0xf0, 0xe4, 0xa2, 0x3, 0x7d, 0x6c, 0x76, 0xc, 0x5c, 0x4c, 0x85, 0x2d, 0x40, 0x0, 0xad, 0xe5, 0x1e, 0xbc, 0x66, 0x13, 0xa7, 0xb4, 0x8c, 0xa, 0xa4, 0x0, 0xd0, 0xfc, 0xed, 0x3c, 0x5e, 0x47, 0x7, 0x4c, 0x3b, 0x91, 0x77, 0x3, 0xd2, 0xfb, 0x1b, 0x4, 0xb0, 0x58, 0xec, 0xf3, 0x3f, 0xf5, 0x4e, 0xfe, 0xa3, 0x74, 0x95, 0xe4, 0x5c, 0x9b, 0xba, 0x1c, 0x1b, 0x26, 0xf1, 0x60, 0xde, 0xb, 0xee, 0xf2, 0x1d, 0x26, 0xf1, 0x91, 0x31, 0x4, 0x11, 0x63, 0xba, 0xbf, 0xe1, 0x6e, 0x4d, 0x38, 0xd8, 0x35, 0x19, 0xbb, 0xc1, 0x66, 0x22, 0xef, 0x69, 0xe, 0x3f, 0xd0, 0xa6, 0x1a, 0x96, 0x8f, 0x6, 0x32, 0xa, 0x44, 0x54, 0xaa, 0x43, 0x88, 0x3d, 0xa5, 0x80, 0xa3, 0x96, 0xbc, 0x65, 0xe8, 0xaf, 0x87, 0x27, 0x49, 0x5c, 0xde, 0x4, 0x2a, 0x5, 0x87, 0x8, 0x53, 0x99, 0xfd, 0xbd, 0xf6, 0x8f, 0x77, 0xae, 0x2b, 0xec, 0x13, 0x2d, 0x66, 0x79, 0x4, 0xd1, 0xff, 0xbf, 0xf7, 0xa2, 0xb3, 0x61, 0xe6, 0x7d, 0xba, 0x50, 0x18, 0xd0, 0xd7, 0x5c, 0x2, 0x5d, 0x2f, 0xd7, 0x7e, 0x48, 0x27, 0x44, 0x8b, 0xeb, 0xa2, 0xe9, 0x1c, 0x3c, 0x4f, 0x45, 0x65, 0x65, 0xaa, 0xbf, 0x8f, 0x9e, 0x1c, 0xaa, 0xb0, 0x20, 0xa7, 0x97, 0xd6, 0xb8, 0xc2, 0xc9, 0xa7, 0x30, 0xfd, 0xd8, 0xf, 0x5d, 0x22, 0x7e, 0xf9, 0xda, 0xf8, 0x8b, 0xb0, 0x2, 0x6a, 0x9e, 0x93, 0xc3, 0xd8, 0xa, 0x16, 0x36, 0x83, 0xc, 0xe8, 0x32, 0xb0, 0x9b, 0x94, 0x2c, 0xc6, 0xd6, 0x27, 0x8c, 0xec, 0x5e, 0x29, 0x42, 0x9a, 0xa6, 0xd6, 0x72, 0xf2, 0xba, 0x7, 0x12, 0xd5, 0xa8, 0x45, 0x80, 0xc1, 0x54, 0xc0, 0xdf, 0x8, 0xb6, 0x3, 0x2e, 0x59, 0x2, 0x35, 0x3c, 0xeb, 0x67, 0x93, 0xad, 0x9c, 0x8e, 0xc9, 0x53, 0x53, 0x1b, 0x4f, 0x6, 0x2, 0xed, 0xbf, 0x3d, 0x6, 0x9a, 0x7, 0xf, 0x41, 0x66, 0xf1, 0x2a, 0x3a, 0xe3, 0xd3}, - output224: []byte{0x48, 0x47, 0x85, 0xc8, 0xdb, 0x75, 0xcd, 0x2b, 0x16, 0xcf, 0x81, 0x65, 0xa0, 0xb6, 0x1f, 0xca, 0xd8, 0x6f, 0x80, 0x38, 0xe0, 0xee, 0x83, 0x93, 0x94, 0x43, 0xf0, 0x14}, - output256: []byte{0xec, 0x23, 0xf3, 0xc4, 0x52, 0x43, 0x23, 0x39, 0x33, 0xa5, 0x81, 0xab, 0x55, 0x4e, 0xa3, 0x91, 0xac, 0xb3, 0xaf, 0xff, 0x8c, 0xed, 0x26, 0xe7, 0xed, 0x29, 0x44, 0x50, 0x40, 0xa8, 0xd5, 0x27}, - output384: []byte{0x9, 0x6a, 0xfc, 0x47, 0xcf, 0x56, 0x86, 0xfb, 0x78, 0x50, 0x70, 0xa2, 0xe0, 0x9f, 0xbf, 0x69, 0xf5, 0x9, 0xff, 0x92, 0x0, 0xb3, 0x45, 0x85, 0x7f, 0xb0, 0xb8, 0xe7, 0xc, 0xbb, 0xb0, 0x12, 0xb9, 0x28, 0x62, 0x71, 0x59, 0xab, 0xdb, 0x35, 0x63, 0x1a, 0xfa, 0xe8, 0x4c, 0x6d, 0xc, 0x58}, - output512: []byte{0xab, 0x2c, 0xd6, 0x17, 0x71, 0x32, 0x92, 0x54, 0x97, 0x7d, 0x33, 0x31, 0xb3, 0xbb, 0x8b, 0x94, 0x40, 0xba, 0x1b, 0x32, 0x36, 0xa, 0x58, 0x1f, 0x44, 0xc1, 0x7c, 0xc7, 0x83, 0x23, 0x17, 0x37, 0xaf, 0xf1, 0x4e, 0xa9, 0x52, 0x78, 0x6b, 0x2f, 0x5c, 0xe2, 0xdb, 0xe2, 0xb2, 0x76, 0xf2, 0x84, 0x8b, 0x25, 0xd7, 0xbd, 0x1d, 0x84, 0xf0, 0x73, 0xe5, 0x3, 0x6f, 0xc7, 0xb8, 0xd0, 0x8d, 0xa1}}, - testcase{ - msg: []byte{0x61, 0xcc, 0x4d, 0x97, 0xf4, 0x11, 0xd9, 0x59, 0x56, 0x2a, 0xf, 0xc4, 0x10, 0x9b, 0x44, 0x2a, 0xff, 0xf5, 0x9b, 0xdb, 0x15, 0x84, 0x15, 0xe8, 0x65, 0x8f, 0x95, 0x45, 0xa4, 0xaa, 0x2b, 0xa8, 0xb6, 0x4a, 0x65, 0xb0, 0xc7, 0x1f, 0xdf, 0x33, 0x8d, 0x2f, 0x48, 0xee, 0x3, 0x1d, 0x8b, 0x6f, 0xc2, 0xb0, 0x49, 0xc2, 0xbe, 0x4f, 0x25, 0xcf, 0xb5, 0xd9, 0x59, 0xc7, 0x70, 0x99, 0x68, 0x9b, 0x4c, 0x60, 0x7a, 0x2f, 0x81, 0xc5, 0xfa, 0xfe, 0xcb, 0x32, 0x90, 0x63, 0x3c, 0x5e, 0x77, 0x66, 0xc2, 0xe7, 0x66, 0xb4, 0xcb, 0xb1, 0xf9, 0x7f, 0x8a, 0x4d, 0x61, 0xc6, 0xc5, 0x5c, 0xa9, 0x96, 0xc8, 0xff, 0xef, 0x51, 0xef, 0x28, 0xa9, 0xc, 0x6, 0xdc, 0x75, 0xe2, 0xa, 0xff, 0x33, 0x9a, 0x28, 0xa4, 0x4f, 0xc0, 0x57, 0xfe, 0x51, 0xfe, 0xde, 0x72, 0x60, 0x93, 0x8e, 0x89, 0xad, 0x74, 0xac, 0xfe, 0x13, 0x76, 0x7b, 0xcd, 0xb8, 0xd2, 0x5b, 0xb8, 0x90, 0xc1, 0x40, 0x1c, 0x59, 0x86, 0xc6, 0xa1, 0xdd, 0xd3, 0x66, 0xeb, 0x5e, 0xdc, 0xa5, 0x5e, 0xc9, 0xb6, 0x5c, 0x10, 0x14, 0xde, 0xa4, 0x75, 0x97, 0xda, 0xb8, 0x11, 0x44, 0x6e, 0xd3, 0xc7, 0xa3, 0x57, 0x1b, 0xc7, 0x7d, 0x1e, 0x3e, 0x97, 0xca, 0xc5, 0x60, 0x8c, 0x43, 0xcd, 0x3, 0x2c, 0x63, 0x45, 0x54, 0x6, 0xea, 0x98, 0xb3, 0x11, 0x68, 0x8f, 0x11, 0xa0, 0x79, 0x2a, 0xb, 0x8e, 0x65, 0xff, 0x80, 0x45, 0x26, 0x63, 0x8a, 0x73, 0xe, 0xf2, 0x5a, 0x6f, 0x4a, 0x7b, 0x18, 0x92, 0xde, 0x22, 0x6b, 0x6f, 0xa4, 0xb, 0x65, 0xe4, 0xfe, 0xf5, 0x38, 0x7a, 0xc4, 0xee, 0xda, 0x6e, 0xec, 0xcf, 0x15, 0x57, 0x12, 0xe7, 0x53, 0x6c, 0x1a, 0x4a, 0xaa, 0xd5, 0xf7, 0x8f, 0x8c, 0x86, 0x68, 0x42, 0xd, 0xa7, 0xa4, 0x8d, 0x48, 0x6f, 0x4c, 0x4f, 0x0, 0x63, 0x29, 0xe7, 0xbd, 0x87, 0x50, 0x16, 0x55, 0x12, 0x0, 0x5d, 0x88, 0x6, 0x1e, 0xf2, 0x35, 0x4a, 0x84, 0x74, 0x9e, 0xf2, 0x9f, 0xc0, 0xd5, 0xd4, 0x75, 0x30, 0x6, 0x87, 0x86, 0x86, 0xd0, 0x98, 0x25, 0x82, 0x5d, 0x25, 0x58, 0x9a, 0xa3, 0xf3, 0x86, 0xab, 0xd0, 0x79, 0x39, 0x63, 0x12, 0xe8, 0xcb, 0x26, 0xcc, 0x92, 0x42, 0xc, 0xca, 0xc1, 0x74, 0x92, 0x89, 0x5b, 0x2a, 0xbd, 0x20, 0x17, 0xa, 0x1d, 0xf0, 0x11, 0x18, 0x1f, 0x40, 0x51, 0xae, 0xff, 0x2d, 0xe7, 0x84, 0x91, 0x3c, 0xc4, 0xf, 0xa8, 0x5e, 0x5f, 0x26, 0xc3, 0xfb, 0x36, 0xbc, 0x39, 0x6f, 0x6b, 0x1e, 0xe7, 0x11, 0x7e, 0x77, 0xd2, 0x9a, 0x25, 0x3e, 0x37, 0xf0, 0x27, 0x69, 0xf7, 0x57, 0x4d, 0x6c, 0xa2, 0x3a, 0x56, 0xf9, 0x25, 0x14, 0xaa, 0x61, 0x5a, 0x42, 0x4b, 0x48, 0x4f, 0x90, 0xf3, 0x82, 0xe1, 0xad, 0xd, 0x3a, 0xc3, 0x91, 0x5e, 0x4, 0x8d, 0x99, 0xd7, 0x47, 0x79, 0xbe, 0x14, 0x3, 0xe4, 0x9c, 0x61, 0xf6, 0x76, 0x9, 0x49, 0xe8, 0x94, 0x55, 0x93, 0xf7, 0xa0, 0xde, 0x5d, 0x88, 0x4b, 0xdc, 0x2e, 0x94, 0xf4, 0xbb, 0xef, 0xd5, 0x1d, 0x83, 0xe3, 0x31, 0xfd, 0xb7, 0xfe, 0x8e, 0x4c, 0x4b, 0x4, 0x29, 0xa2, 0x4e, 0xc0, 0x2e, 0xd9, 0xf3, 0xdf, 0x54, 0x40, 0x4f, 0x6d, 0x7c, 0x8f, 0xf5, 0x28, 0x95, 0xe5, 0x85, 0x34, 0x42, 0xc0, 0x3d, 0xcd, 0xb9, 0xa9, 0x80, 0x37, 0x7e, 0x9, 0xc2, 0x1a, 0xb8, 0x81, 0x9b, 0x29, 0xec, 0x96, 0xad, 0xd, 0xf, 0xab, 0xdb, 0x77, 0xe4, 0x2b, 0xcc, 0xc7, 0xfc, 0x7a, 0x70, 0xb8, 0x3e, 0xe0, 0x53, 0xf5, 0x56, 0xb9, 0x5, 0xc6, 0x3f, 0x81, 0x14, 0xc1, 0x7a, 0x45, 0xae, 0x8d, 0x19, 0xce, 0xca, 0x6e, 0x52, 0x18, 0x33, 0x6e, 0xc1, 0x16, 0x13, 0xdc, 0x11, 0x53, 0x2d, 0x91, 0x65, 0x2e, 0x78, 0xf8, 0x67, 0x26, 0xa8, 0x7, 0x49, 0xd7, 0xc, 0xc5, 0x4c, 0xa4, 0x1c, 0x33, 0xd6, 0x43, 0xf2, 0x80, 0xf1, 0x9, 0xf6, 0x26, 0x9c, 0x3d, 0xa3, 0x77, 0xbf, 0xe8, 0x7b, 0xfa, 0x60, 0xa1, 0xd1, 0x67, 0x88, 0x1a, 0xf2, 0x20, 0xfc, 0x8d, 0x2a, 0x6e, 0x29, 0x2, 0x26, 0xfc, 0x2d, 0xf, 0x66, 0xd2, 0xa1, 0xa7, 0xfa, 0xbe, 0x47, 0xaa, 0x80, 0x7, 0xee, 0xc3, 0x1, 0xe8, 0x2f, 0xf5, 0xb, 0xf7, 0x14, 0x84, 0x63, 0x64, 0x5d, 0xd2, 0x47, 0x19, 0x27, 0xf9, 0x54, 0x6d, 0xa7, 0x8e, 0x15, 0xd1, 0x2, 0xe7, 0x1, 0xbf, 0x6, 0xc9, 0x72, 0xee, 0xd2, 0xb4, 0x89, 0xde, 0x28, 0xbc, 0x21, 0x48, 0x57, 0x7f, 0xb4, 0x89, 0x14, 0x1d, 0xe8, 0xcb, 0x51, 0xd2, 0x42, 0x82, 0xe6, 0x21, 0x26, 0x7a, 0x41, 0x39, 0xd1, 0xf0, 0xbc, 0x35, 0xdc, 0x9d, 0x9c, 0x42, 0xbc, 0x33, 0xa0, 0x4f, 0x81, 0x9, 0x5a, 0xb3, 0xf1, 0x76, 0xc4, 0x21, 0x2e, 0x50, 0xb7, 0x7e, 0xa2, 0xd1, 0x32, 0xc9, 0xa5, 0xb9, 0xb, 0x1e, 0x32, 0xe6, 0x31, 0xcf, 0x1e, 0x10, 0xc5, 0x58, 0x35, 0x14, 0x32, 0x59, 0x78, 0x58, 0x1c, 0x1e, 0x55, 0xf7, 0x52, 0xd7, 0x6d, 0xbf, 0xfc, 0x85, 0x76, 0xf5, 0x64, 0x22, 0xc5, 0xda, 0x1c, 0xe2, 0xe, 0x77, 0x38, 0x7f, 0x51, 0x73, 0x89, 0x44, 0x67, 0xab, 0x5, 0x88, 0x65, 0x3b, 0xbb, 0x44, 0xbc, 0xbe, 0xbe, 0x48, 0x53, 0xfd, 0xb9, 0xcd, 0x39, 0x15, 0x70, 0x68, 0xc9, 0x7, 0xb3, 0x2c, 0xfc, 0x4a, 0xa5, 0xda, 0xf2, 0xd0, 0x24, 0xe0, 0xc3, 0xb2, 0xa8, 0x4, 0xfe, 0x5f, 0x2c, 0xde, 0x75, 0xd2, 0x99, 0xb3, 0x7c, 0x5f, 0xb4, 0x42, 0x2d, 0x7e, 0x61, 0xe9, 0x59, 0xab, 0xf9, 0xc, 0x9a, 0x3d, 0x8d, 0xf6, 0x29, 0xe7, 0x6f, 0x4a, 0x44, 0xb7, 0x62, 0x63, 0xe9, 0xeb, 0x7a, 0xd1, 0x64, 0x9e, 0xa8, 0x9f, 0x88, 0x38, 0x70, 0x5e, 0x1a, 0x63, 0x2f, 0xa0, 0xb9, 0x14, 0x82, 0xe9, 0x7, 0xf0, 0x77, 0xb9, 0x92, 0xc9, 0x6b, 0x30, 0x64, 0xd6, 0xd7, 0x60, 0x4d, 0x9, 0xe6, 0x82, 0xa5, 0x88, 0x6a, 0x2d, 0x93, 0x34, 0x13, 0x81, 0x61, 0xdf, 0x51, 0x41, 0xc3, 0xf0, 0x62, 0x51, 0xbd, 0x47, 0x1, 0x63, 0x87, 0x53, 0x87, 0xaf, 0xb3, 0x81, 0x63, 0x39, 0x4b, 0x33, 0x5b, 0x79, 0x21, 0xb, 0xad, 0x92, 0xac, 0xa5, 0x68, 0xbd, 0x1a, 0xe1, 0xe5, 0x11, 0xc2, 0x28, 0x3, 0xbb, 0xa3, 0x60, 0x79, 0xfe, 0xf0, 0x28, 0x35, 0x3a, 0xa0, 0xf5, 0x73, 0x4a, 0x1c, 0x7c, 0x6c, 0x4e, 0x6e, 0xd6, 0x84, 0x74, 0x2b, 0xab, 0xad, 0xe, 0x93, 0xed, 0xbc, 0xd0, 0xde, 0x50, 0x47, 0x3a, 0x5f, 0x46, 0xcb, 0xd9, 0xc5, 0x92, 0xfa, 0x92, 0xd4, 0x2e, 0xbe, 0x1, 0xa, 0xce, 0xa9, 0x7b, 0xb3, 0x6f, 0xba, 0xbe, 0x2f, 0x14, 0xbd, 0x2, 0xb1, 0xa0, 0x7b, 0x35, 0x70, 0x1d, 0x13, 0x16, 0x23, 0xbd, 0xd5, 0x26, 0xbe, 0xdd, 0xad, 0xb, 0x4f, 0xc6, 0xfb, 0xbf, 0xd4, 0xcf, 0xca, 0x8e, 0x51, 0x37, 0x67, 0xed, 0x4d, 0x10, 0xec, 0x64, 0xf9, 0x20, 0xe9, 0xe6, 0xcd, 0x52, 0x86, 0x76, 0x87, 0x5a, 0x7, 0xc, 0xa6, 0xd7, 0xaa, 0xc6, 0x80, 0x7b, 0x53, 0xb7, 0xb1, 0x37, 0x49, 0xcb, 0xe3, 0x50, 0xd5, 0xfc, 0xfe, 0x1b, 0x34, 0xe4, 0xdf, 0x2e, 0x89, 0x50, 0x70, 0x19, 0xbd, 0x6f, 0xcb, 0x24, 0xaf, 0xc3, 0xa1, 0xc9, 0xbd, 0x64, 0xca, 0x4c, 0x75, 0x72, 0xfa, 0xc9, 0xd8, 0x76, 0x49, 0x51, 0xd, 0x5f, 0x91, 0xb3, 0x73, 0xef, 0xa0, 0xb9, 0x7e, 0xde, 0x7b, 0x87, 0x68, 0xd0, 0x18, 0x6b, 0x96, 0x8e, 0x5a, 0x7f, 0x6d, 0x18, 0x1c, 0xb5, 0xf4, 0x5b, 0xe2, 0xeb, 0xb9, 0x42, 0xe2, 0x3d, 0x82, 0x1b, 0xd7, 0xa8, 0xa1, 0xd7, 0xb0, 0xe2, 0xa7, 0x35, 0xde, 0xe8, 0x94, 0x4c, 0x37, 0x8f, 0xf9, 0xa9, 0x8e, 0x13, 0xad, 0x73, 0x44, 0x19, 0x8b, 0x57, 0x6c, 0x6c, 0xc7, 0x70, 0xc0, 0x82, 0xd6, 0x40, 0x93, 0x6d, 0x3f, 0x7, 0x2, 0x12, 0x93, 0x76, 0x46, 0x62, 0xf7, 0x71, 0x95, 0xcf, 0x95, 0x6e, 0x91, 0xaa, 0x7d, 0x14, 0xeb, 0xdd, 0x6, 0xc4, 0x1b, 0x57, 0xc9, 0xe8, 0x81, 0xf2, 0xde, 0x46, 0x7a, 0xef, 0x5, 0xfe, 0x9e, 0xa1, 0x80, 0x9c, 0x45, 0xa, 0x45, 0xf3, 0xf0, 0xd6, 0x7d, 0x74, 0x47, 0xf8, 0xaf, 0x8f, 0x87, 0xdd, 0x52, 0xb3, 0x3, 0x62, 0xf4, 0x4a, 0xfa, 0xff, 0x54, 0xa2, 0xa0, 0x33, 0x1a, 0xd8, 0xc1, 0x8c, 0x2f, 0x35, 0x94, 0xa1, 0xe1, 0x87, 0xa1, 0xd9, 0x4a, 0x4c, 0x18, 0x29, 0xd8, 0x7e, 0xa6, 0x7e, 0xce, 0x4, 0x57, 0x72, 0xbb, 0xc8, 0x2c, 0x23, 0x1f, 0xea, 0xaf, 0xa8, 0x1e, 0x2f, 0x6e, 0x18, 0xd7, 0xf4, 0x50, 0x20, 0xae, 0xd2, 0xb2, 0x2f, 0xee, 0x1d, 0xf1, 0x3f, 0xc3, 0x18, 0x47, 0xeb, 0xc9, 0xf8, 0xca, 0x14, 0xe, 0x49, 0x44, 0xf8, 0xd1, 0x11, 0xa4, 0xde, 0xb5, 0x6c, 0x8, 0x88, 0x88, 0xe, 0xb9, 0x56, 0x1, 0xfb, 0xac, 0xe7, 0x99, 0x18, 0xa6, 0xbe, 0x2f, 0xb, 0xd3, 0x70, 0x21, 0x56, 0x89, 0x98, 0x87, 0x25, 0xe9, 0xaf, 0xa9, 0x88, 0x55, 0x38, 0x67, 0xf8, 0x98, 0xc9, 0x39, 0xa8, 0xdc, 0x4a, 0x58, 0xfa, 0xab, 0x9b, 0x10, 0x51, 0x85, 0x90, 0x4c, 0xd5, 0x43, 0x38, 0x2f, 0x7d, 0xde, 0x81, 0x1e, 0xbd, 0x11, 0x4a, 0xe1, 0x9, 0xb9, 0x7e, 0xfb, 0x4a, 0x7b, 0xd4, 0xe5, 0x82, 0xc3, 0xf6, 0x4, 0x23, 0xb4, 0x8c, 0x1e, 0x35, 0xb8, 0xc0, 0xf2, 0x91, 0x4, 0x8c, 0x29, 0x37, 0x5f, 0x9c, 0xc2, 0xd4, 0xc0, 0x10, 0x79, 0xa2, 0x7, 0xbb, 0x7b, 0xcf, 0x87, 0x5f, 0xc7, 0x53, 0x5b, 0xf4, 0x7d, 0xb2, 0x51, 0xed, 0x8a, 0x60, 0xf0, 0x3d, 0x84, 0xe4, 0x9e, 0x32, 0xec, 0x5e, 0x72, 0xf6, 0xdf, 0x26, 0xf1, 0x8b, 0xa0, 0x40, 0xf5, 0x8, 0xa0, 0x2e, 0xce, 0x21, 0x59, 0x7b, 0xd7, 0x10, 0xc3, 0x60, 0x52, 0xeb, 0xf7, 0xa0, 0xcf, 0xa8, 0xc1, 0xfd, 0xa1, 0x32, 0xee, 0x3f, 0x9d, 0xff, 0x88, 0x14, 0xcf, 0xdf, 0xe0, 0xa5, 0x14, 0xc9, 0x1f, 0xc7, 0x95, 0x46, 0xb8, 0x24, 0x47, 0x92, 0x6d, 0x42, 0x2b, 0x8a, 0xab, 0x87, 0xb9, 0x4c, 0xc2, 0x9f, 0x16, 0x5e, 0x1f, 0x97, 0xf, 0xf2, 0x74, 0xfe, 0x2a, 0x66, 0x21, 0xea, 0xc5, 0xf1, 0x28, 0x16, 0x12, 0x9d, 0x27, 0xb8, 0xdf, 0x6, 0xe3, 0x2a, 0x41, 0x75, 0x2a, 0x65, 0xde, 0xb, 0x47, 0x28, 0x3e, 0xf0, 0x49, 0x42, 0x2a, 0x9a, 0xf5, 0x8a, 0x9b, 0xfc, 0xb0, 0x42, 0xac, 0xe1, 0xce, 0x47, 0x1, 0x24, 0x36, 0x9a, 0x91, 0x5e, 0x2b, 0xdd, 0xcc, 0x29, 0x24, 0x31, 0xe8, 0x89, 0x82, 0xbc, 0x6f, 0x9c, 0x51, 0xac, 0x4c, 0x8b, 0x3e, 0x2a, 0xa9, 0x6b, 0xfd, 0x6b, 0x57, 0x4a, 0xe9, 0xd7, 0x2, 0xa2, 0x67, 0x30, 0x81, 0xeb, 0xf5, 0x4f, 0xb3, 0x32, 0xf5, 0x52, 0xee, 0x17, 0xba, 0x63, 0x81, 0x12, 0x81, 0x62, 0x86, 0xe9, 0x4f, 0xe4, 0x3c, 0x66, 0x95, 0x75, 0x2e, 0x67, 0xf6, 0x9c, 0xe6, 0xdc, 0x48, 0x93, 0xe1, 0xdb, 0xe8, 0xc5, 0xdf, 0x8f, 0x29, 0x22, 0x71, 0xf4, 0xf5, 0xc1, 0x40, 0xf3, 0x24, 0xaf, 0xb4, 0x9a, 0x15, 0x65, 0x71, 0x7f, 0xf0, 0xe0, 0x68, 0x1f, 0x1, 0xcb, 0x7c, 0xf9, 0x6d, 0x2f, 0x8c, 0x50, 0xa2, 0xd7, 0x6f, 0xa6, 0xb4, 0x50, 0x97, 0x1, 0x21, 0x1e, 0x7, 0xc7, 0x14, 0x2d, 0x22, 0xa2, 0xfc, 0x40, 0xc2, 0xcb, 0x47, 0xe9, 0x1a, 0xd, 0xde, 0x3c, 0xd8, 0x6f, 0xbd, 0x2, 0xee, 0x53, 0xf8, 0x36, 0x7d, 0x1f, 0x25, 0xe6, 0xbc, 0xc, 0x4, 0xf1, 0x90, 0x80, 0xac, 0x19, 0x68, 0x9e, 0x72, 0x13, 0x27, 0x63, 0x42, 0x89, 0x26, 0x18, 0x27, 0x33, 0x35, 0x94, 0xcf, 0x23, 0xa7, 0xcc, 0xb, 0xc, 0x95, 0x26, 0x12, 0x57, 0xf2, 0xf2, 0xa4, 0xd9, 0xea, 0xf7, 0x27, 0x4, 0x89, 0xf, 0x29, 0xa5, 0xc6, 0xf1, 0x23, 0x94, 0xc6, 0xa5, 0x76, 0x88, 0xbb, 0xf6, 0x1e, 0x18, 0x70, 0x12, 0xcb, 0x7c, 0x92, 0xd7, 0x20, 0x58, 0x59, 0x76, 0xae, 0xe3, 0x44, 0xbc, 0xcb, 0xa6, 0x7, 0xe7, 0x4f, 0x50, 0x32, 0xc1, 0x45, 0x92, 0xc3, 0x17, 0xd2, 0x11, 0xc3, 0x84, 0x8f, 0xd7, 0x6c, 0xbf, 0xd8, 0x4d, 0x7a, 0x62, 0x1e, 0x3d, 0x89, 0xfe, 0xca, 0x1a, 0xc8, 0xd1, 0xc0, 0x9, 0x8, 0x55, 0xd5, 0x30, 0xdf, 0x5, 0x97, 0x8e, 0xa5, 0xc, 0x36, 0xdb, 0x86, 0xd3, 0x11, 0xfd, 0xe0, 0xf8, 0xc6, 0x59, 0x8d, 0xff, 0xa9, 0x4f, 0x9, 0x4e, 0x4c, 0x3, 0x4f, 0xcb, 0x13, 0x98, 0x6e, 0xcc, 0xf0, 0x9d, 0xcc, 0xa0, 0x3f, 0x2b, 0xa0, 0x6f, 0x86, 0xd2, 0xe4, 0x9a, 0xa9, 0x11, 0x5b, 0xd8, 0xc, 0xf4, 0x95, 0x49, 0xe6, 0xfb, 0x23, 0xa8, 0x14, 0x19, 0x82, 0x6f, 0x7f, 0x37, 0x4, 0xa1, 0xfe, 0xac, 0xaa, 0x45, 0x6d, 0xa4, 0xc1, 0x7, 0x61, 0x4c, 0x99, 0x24, 0x43, 0xd5, 0xdb, 0xc8, 0x94, 0xf, 0x66, 0xc2, 0xf3, 0x96, 0x78, 0x6c, 0xe6, 0x52, 0xe, 0x8, 0xb7, 0x15, 0xd1, 0xdc, 0x3a, 0xc0, 0xe6, 0x95, 0xb7, 0xbe, 0x34, 0x89, 0x72, 0x52, 0x2d, 0xc4, 0xc8, 0x31, 0xf0, 0x2b, 0x42, 0x53, 0xdc, 0x76, 0x18, 0x1f, 0x97, 0x9c, 0x6f, 0x4, 0x50, 0xa7, 0x30, 0x32, 0x88, 0xab, 0xe8, 0xb9, 0xfd, 0x6f, 0x8a, 0x9f, 0x46, 0xaa, 0x93, 0xc4, 0xe6, 0x72, 0x4e, 0x29, 0xc9, 0x89, 0x1b, 0xa4, 0xeb, 0x84, 0x3, 0x1, 0x3d, 0xef, 0x60, 0x68, 0x41, 0x3b, 0xcb, 0x4d, 0x41, 0x3e, 0xab, 0xd6, 0x9b, 0x81, 0x2f, 0x47, 0x9a, 0x2b, 0x63, 0x43, 0x7a, 0xbe, 0x8c, 0xc, 0xe4, 0xaa, 0xb3, 0x43, 0x86, 0xde, 0x58, 0xb, 0xd7, 0x4, 0xaa, 0x36, 0x4f, 0x17, 0xc0, 0x31, 0x19, 0x5f, 0xd, 0xef, 0x63, 0xcf, 0xd8, 0x8f, 0x12, 0x46, 0xa5, 0x89, 0x5d, 0x3d, 0x6, 0xc2, 0xbf, 0xc9, 0x19, 0x93, 0x92, 0x80, 0xec, 0xb8, 0xd1, 0x17, 0x7d, 0x79, 0x90, 0x62, 0xb4, 0xf4, 0xf0, 0xb3, 0xc7, 0xd8, 0x55, 0xaa, 0xd7, 0x6a, 0x52, 0x53, 0x1, 0xeb, 0x67, 0x6, 0x69, 0x56, 0x39, 0xd0, 0x3a, 0x4c, 0xc, 0xfa, 0xb1, 0x1a, 0x1e, 0xa7, 0x4a, 0xad, 0x65, 0xd6, 0x8b, 0xae, 0xff, 0x5b, 0x3, 0x55, 0xae, 0xc1, 0xbc, 0xdf, 0xf9, 0xfc, 0xa7, 0xf3, 0xba, 0x5d, 0xfa, 0x9f, 0x7e, 0x1d, 0x7, 0x33, 0x5, 0xbd, 0x96, 0xf9, 0xab, 0xf5, 0xec, 0x76, 0xa1, 0x4b, 0xe2, 0x1e, 0xe5, 0x36, 0xe0, 0x98, 0x66, 0xc1, 0xe0, 0xc4, 0xb9, 0xab, 0x8e, 0x70, 0x43, 0xb, 0xc7, 0x8, 0xdd, 0xe6, 0x17, 0xf6, 0x68, 0x6c, 0x2b, 0x61, 0x65, 0x98, 0x1b, 0xf5, 0xc7, 0xc, 0x74, 0x7a, 0xb2, 0x22, 0x48, 0x2b, 0x7, 0x6f, 0x50, 0x32, 0x65, 0x6e, 0xa7, 0x80, 0xe0, 0x79, 0x8c, 0x5f, 0x18, 0x22, 0x35, 0x90, 0xd3, 0x87, 0x28, 0x4, 0xc3, 0x79, 0xe5, 0x11, 0x4c, 0x6a, 0x49, 0xc8, 0xdb, 0xfc, 0x14, 0xbe, 0xe6, 0x80, 0x46, 0x12, 0xeb, 0x21, 0xb2, 0x5, 0x5a, 0xfc, 0xc7, 0xc1, 0xb2, 0xa8, 0xe8, 0xbe, 0x67, 0xfa, 0xd7, 0xfd, 0x8b, 0x5e, 0x26, 0x41, 0xfe, 0x8c, 0xf3, 0x77, 0x92, 0xfe, 0x47, 0xbf, 0xc3, 0x5c, 0x76, 0x94, 0x96, 0x10, 0xf6, 0x71, 0x8d, 0xb9, 0x40, 0x3b, 0x29, 0xf5, 0x36, 0xde, 0x9, 0xce, 0x4a, 0x25, 0x4f, 0x9d, 0x61, 0x2d, 0xcb, 0x93, 0x17, 0x5f, 0x55, 0x92, 0x46, 0x6c, 0xf9, 0xb7, 0xed, 0x5, 0x85, 0xf8, 0x3d, 0x1e, 0xb7, 0xae, 0x64, 0xcd, 0x83, 0xc1, 0x17, 0xa7, 0xf7, 0xa0, 0x2a, 0x85, 0x9a, 0x73, 0x37, 0x7b, 0xaf, 0x46, 0x24, 0xbc, 0xb5, 0xb7, 0xc3, 0x13, 0xf6, 0xc2, 0x61, 0x31, 0x38, 0x24, 0x5f, 0xa0, 0xa4, 0xb, 0x84, 0x4c, 0xd8, 0x67, 0x1, 0x11, 0xaa, 0x27, 0xbb, 0xb0, 0x1a, 0x73, 0x68, 0xaa, 0x56, 0xbf, 0x24, 0xdc, 0x7d, 0x8e, 0x21, 0xfc, 0xa5, 0x6e, 0x84, 0xa3, 0x27, 0x76, 0x57, 0x1f, 0xf6, 0xb, 0x3a, 0xe3, 0x8b, 0x3a, 0xd1, 0xed, 0x3e, 0xd3, 0xbd, 0xd1, 0x9e, 0xde, 0x8c, 0x24, 0xc2, 0xaa, 0x71, 0xec, 0xc2, 0xb2, 0x81, 0x24, 0xdd, 0xa, 0xfc, 0x38, 0x2b, 0x78, 0x4e, 0x27, 0x3e, 0x83, 0x8a, 0xfb, 0x69, 0x8d, 0x8a, 0xa3, 0x36, 0x1, 0x6c, 0x49, 0x88, 0xa5, 0x8e, 0xce, 0xd, 0x8a, 0x2a, 0x2d, 0x94, 0x36, 0x2d, 0x73, 0x83, 0x46, 0xc9, 0x50, 0xbf, 0x5, 0x0, 0x8a, 0x10, 0xe2, 0x9b, 0xf2, 0x7f, 0x15, 0xb8, 0x2, 0xf2, 0x13, 0xb8, 0xe6, 0x94, 0x73, 0xb0, 0x23, 0x33, 0x29, 0x52, 0x91, 0x2f, 0x20, 0x47, 0x2f, 0xdc, 0xf1, 0x93, 0x7, 0x7a, 0xf, 0x46, 0xe, 0x68, 0x4f, 0x9f, 0xde, 0xcd, 0x2d, 0x77, 0x93, 0xdd, 0xb3, 0x3d, 0x54, 0x57, 0xba, 0x30, 0xb4, 0xd9, 0x1e, 0xc2, 0x72, 0xd1, 0xe6, 0xe5, 0xd2, 0x79, 0x56, 0x98, 0xa9, 0xaf, 0x40, 0x6a, 0x8c, 0x5, 0xd1, 0xba, 0x2a, 0x64, 0xf8, 0x83, 0xd3, 0x7e, 0xa1, 0x85, 0x5, 0xa0, 0xf5, 0x74, 0x5a, 0x2d, 0xda, 0x21, 0x7e, 0xab, 0x17, 0x74, 0xa9, 0xd8, 0x13, 0xb8, 0x38, 0x7e, 0xa1, 0x6c, 0x48, 0xec, 0x8e, 0x56, 0x0, 0xc1, 0x6d, 0x98, 0xfd, 0x4b, 0xa0, 0xa1, 0xef, 0x28, 0x88, 0xfd, 0xfc, 0xef, 0x53, 0x65, 0x40, 0x10, 0x4, 0xb0, 0x2c, 0xf7, 0x4, 0x62, 0x32, 0x77, 0xce, 0x50, 0x2a, 0x54, 0xe4, 0xe0, 0x3d, 0x91, 0x91, 0x4b, 0xa8, 0x29, 0xc5, 0x67, 0x40, 0xf7, 0x77, 0xa5, 0xc2, 0x8f, 0xbd, 0x45, 0xea, 0xc5, 0x71, 0xdd, 0xa7, 0xb8, 0x9e, 0xc7, 0xfc, 0x98, 0x2f, 0x65, 0xe5, 0xcb, 0x38, 0x24, 0x15, 0x44, 0x1, 0x62, 0x9, 0x1c, 0x2f, 0x4, 0x1f, 0xc0, 0xf9, 0x7f, 0x20, 0x69, 0x33, 0x5, 0xc2, 0x5d, 0xe7, 0x83, 0x7a, 0x2f, 0x65, 0x5, 0x77, 0xac, 0x6c, 0xbf, 0xfc, 0x9, 0xf1, 0xf6, 0x95, 0x41, 0x7c, 0xd5, 0xec, 0xc5, 0x55, 0x69, 0x76, 0x93, 0xb1, 0x21, 0x66, 0xcd, 0xa4, 0x7b, 0x8a, 0x74, 0x5f, 0x48, 0x94, 0x6, 0x94, 0x2c, 0x59, 0x9a, 0xf5, 0xf0, 0x85, 0x30, 0x6e, 0xfa, 0xa5, 0x8, 0xb5, 0xbf, 0xa, 0x40, 0x62, 0x69, 0xf6, 0x0, 0xb6, 0x8b, 0x58, 0xce, 0x3e, 0x20, 0x4c, 0x3b, 0xea, 0x59, 0xe4, 0xf3, 0xc1, 0x91, 0x57, 0xc6, 0x2, 0x46, 0xed, 0xf1, 0x81, 0x41, 0x59, 0x7b, 0xc0, 0xcf, 0xff, 0x83, 0x8, 0x87, 0x8e, 0x4f, 0x36, 0xe4, 0xc4, 0x43, 0xba, 0x87, 0x4b, 0xe5, 0x82, 0x78, 0xfd, 0x5b, 0x33, 0x2c, 0xa7, 0x3c, 0xba, 0xba, 0x2a, 0x30, 0x25, 0x79, 0xe5, 0xdf, 0x86, 0x3d, 0xb9, 0x22, 0x51, 0xc5, 0x97, 0xcd, 0x45, 0xf8, 0x36, 0xd0, 0xb9, 0xd3, 0xad, 0xd5, 0x9e, 0xf9, 0x24, 0x68, 0x54, 0x2b, 0x37, 0x7e, 0x32, 0x50, 0xfb, 0xad, 0xe0, 0x83, 0x39, 0x14, 0x6, 0x6a, 0x39, 0x56, 0x60, 0x9, 0x50, 0x7d, 0x4c, 0x3d, 0x57, 0x58, 0x51, 0x22, 0x4e, 0x86, 0x4, 0x29, 0xf6, 0x17, 0xac, 0x7e, 0xbe, 0xbd, 0xf5, 0x34, 0xde, 0xa8, 0xf3, 0xac, 0x3f, 0x7a, 0x14, 0xf8, 0x15, 0x75, 0x1c, 0x8e, 0x72, 0xe9, 0x7, 0xf9, 0x7, 0x7b, 0x54, 0xaa, 0xc6, 0x45, 0xb4, 0xbd, 0xad, 0xbf, 0xd9, 0x69, 0xab, 0x38, 0x31, 0x2c, 0xba, 0x88, 0x8f, 0x5, 0x68, 0x17, 0xc, 0x2, 0xf3, 0x6a, 0x4c, 0x5f, 0x0, 0x55, 0xe6, 0x70, 0x2f, 0x39, 0xd6, 0x2b, 0x23, 0x83, 0x83, 0x5a, 0x71, 0x9a, 0x60, 0xe3, 0xa6, 0x5, 0x5d, 0xf5, 0x50, 0xb3, 0x59, 0x3, 0x41, 0xb6, 0x67, 0x70, 0x89, 0x7b, 0xcc, 0x66, 0xf8, 0xa5, 0x20, 0x16, 0xf1, 0x49, 0x19, 0x73, 0xd5, 0x65, 0xee, 0xd5, 0xd1, 0xc7, 0x18, 0xca, 0x89, 0x97, 0xc8, 0xa6, 0x4d, 0x46, 0x71, 0x70, 0x60, 0x89, 0x91, 0xd1, 0x4f, 0x1e, 0x50, 0xa8, 0xfc, 0x63, 0xc4, 0xa3, 0xb4, 0x64, 0xd0, 0x8d, 0x5, 0xf7, 0x2e, 0x9c, 0xeb, 0x8a, 0xc6, 0x9b, 0x5f, 0x88, 0x9e, 0xe1, 0x6f, 0x99, 0x45, 0x4b, 0xb5, 0xf8, 0x22, 0xf1, 0x53, 0xc9, 0xd9, 0xdc, 0xf4, 0xf0, 0xbb, 0xbe, 0xb5, 0x10, 0xd7, 0x6, 0xf2, 0xc7, 0xce, 0x5e, 0x51, 0x6e, 0x1a, 0xf5, 0xcb, 0xb8, 0x38, 0xc9, 0x5d, 0x97, 0x3b, 0x34, 0x23, 0x3, 0x79, 0xcc, 0x30, 0x29, 0x9d, 0xa5, 0x85, 0xbd, 0xd8, 0xad, 0x8b, 0xdd, 0x43, 0xea, 0x6a, 0xd8, 0xaa, 0x8f, 0x44, 0x47, 0xed, 0x4f, 0x41, 0x1e, 0x4a, 0x3c, 0xe2, 0x5c, 0x4b, 0x33, 0x88, 0x82, 0xc6, 0xdd, 0xda, 0x40, 0xa8, 0xc2, 0x22, 0x84, 0x91, 0xcb, 0x6c, 0xb3, 0x3a, 0x5a, 0xe7, 0x3, 0xd2, 0x98, 0x65, 0xa1, 0x51, 0xbe, 0xbb, 0xfc, 0x59, 0x10, 0xb6, 0x44, 0x1b, 0x10, 0xcf, 0x64, 0xc1, 0x89, 0xa7, 0x19, 0x11, 0x67, 0x7c, 0x10, 0xf1, 0x1d, 0xec, 0xba, 0x96, 0xa4, 0x20, 0xde, 0xe, 0xf9, 0xc1, 0x24, 0xf3, 0x6f, 0xc5, 0xd2, 0x7f, 0xdd, 0x75, 0xc3, 0x88, 0x53, 0x3c, 0x88, 0x66, 0x73, 0x47, 0xb5, 0x27, 0x7c, 0x2e, 0x1f, 0xc0, 0x2, 0x6b, 0x75, 0xe3, 0x8e, 0x6e, 0x46, 0xac, 0xec, 0xb2, 0xba, 0x8e, 0xfa, 0xdb, 0xaf, 0x14, 0x89, 0xcf, 0x45, 0xf4, 0xa9, 0x22, 0x56, 0x91, 0x49, 0x2b, 0xc6, 0x37, 0x85, 0x96, 0x6c, 0x1, 0x8a, 0x8f, 0xbe, 0xfe, 0x58, 0xc5, 0x53, 0x3e, 0x2b, 0xf2, 0xc6, 0x1, 0xa0, 0xa5, 0xef, 0x8, 0xcb, 0xf1, 0xb1, 0x15, 0xbf, 0x34, 0x52, 0xc9, 0x49, 0x53, 0xac, 0xb7, 0x29, 0x4f, 0xf0, 0x9c, 0x7f, 0xce, 0x12, 0xf8, 0xcb, 0x86, 0x33, 0x3a, 0xd7, 0xee, 0xa5, 0x14, 0xae, 0x12, 0x33, 0x35, 0x58, 0xf2, 0x55, 0xf5, 0xd7, 0x3, 0x9a, 0xf7, 0x7d, 0x72, 0x4f, 0x66, 0xc9, 0x62, 0x19, 0x25, 0x9, 0xc5, 0xb5, 0xe0, 0x7c, 0xa8, 0x16, 0x1d, 0x60, 0x2, 0x41, 0x7b, 0x79, 0x3f, 0x25, 0xb9, 0x25, 0x32, 0xc6, 0x1d, 0x67, 0xca, 0x6c, 0xe4, 0xe1, 0x71, 0x8b, 0x41, 0x4a, 0x86, 0xb2, 0x37, 0xfc, 0xf0, 0x19, 0x9d, 0x7e, 0x56, 0xc, 0x21, 0x36, 0xaf, 0xb2, 0x90, 0x71, 0x1b, 0x3e, 0x2b, 0x8d, 0x40, 0x3e, 0xe0, 0x53, 0x7c, 0x35, 0x19, 0x72, 0xe8, 0x65, 0x51, 0xe5, 0xeb, 0x9a, 0x35, 0x35, 0xd7, 0xd6, 0x2, 0xe5, 0xc4, 0x44, 0x21, 0x9b, 0x3b, 0x3d, 0x63, 0x41, 0x25, 0x92, 0x39, 0x9a, 0x7e, 0xe9, 0x1b, 0xf3, 0xbf, 0xc2, 0x6f, 0x5a, 0x3a, 0x91, 0xbf, 0xe9, 0xef, 0x9a, 0x87, 0x5c, 0xca, 0x8c, 0x6c, 0xde, 0x2f, 0xcc, 0x7c, 0xdd, 0xc9, 0x71, 0x89, 0x7e, 0x55, 0x9b, 0xa5, 0x67, 0x61, 0x59, 0x9c, 0x5f, 0x88, 0x3a, 0x7c, 0x2a, 0xa2, 0xe4, 0xcc, 0xb7, 0x53, 0xc6, 0x59, 0x67, 0x8d, 0x16, 0xd1, 0x58, 0xef, 0x12, 0xaf, 0x98, 0x72, 0x60, 0xfe, 0x98, 0x8, 0x7c, 0x23, 0x77, 0x3a, 0xe2, 0xf, 0x81, 0xfd, 0x59, 0xe, 0x1c, 0xf7, 0x38, 0xd3, 0xc0, 0x4b, 0x9, 0x55, 0xf2, 0xb2, 0xb, 0x30, 0xf5, 0x43, 0x81, 0xc1, 0x6, 0x11, 0x5d, 0x4e, 0xd8, 0x3f, 0xc7, 0xf6, 0xbe, 0x6d, 0x14, 0x3b, 0x61, 0xc2, 0xd5, 0x89, 0xa3, 0x17, 0xe9, 0x8e, 0x18, 0x33, 0x61, 0x50, 0xb3, 0x35, 0xc, 0xe0, 0xe1, 0x6e, 0x82, 0x14, 0xda, 0x55, 0x47, 0x68, 0x87, 0xda, 0x6f, 0xc6, 0x4d, 0x61, 0xba, 0x49, 0x42, 0x5d, 0xa1, 0xc1, 0x56, 0xdb, 0x5e, 0xca, 0x1, 0x41, 0x1f, 0xa0, 0x62, 0x18, 0x3d, 0xd2, 0x9f, 0xa1, 0xce, 0xd4, 0x91, 0xe5, 0xe1, 0xe2, 0xe3, 0xce, 0x16, 0xa, 0x8e, 0x9e, 0x4f, 0xf1, 0x0, 0xb, 0xaf, 0x63, 0x2a, 0x92, 0xd8, 0xe9, 0x72, 0x7, 0x7c, 0x23, 0xc6, 0x66, 0x81, 0x3, 0x39, 0xe9, 0xd9, 0xb5, 0xf6, 0x2f, 0xda, 0x5b, 0xcd, 0xc4, 0x5d, 0x31, 0x5b, 0xf8, 0xdb, 0x41, 0xb8, 0x1a, 0xa1, 0x65, 0x76, 0x37, 0x80, 0xbe, 0xcb, 0x54, 0x4f, 0x27, 0x7b, 0xf1, 0x4, 0x91, 0xcd, 0x8, 0x5a, 0x8f, 0x5a, 0xd9, 0x1e, 0xb6, 0xdc, 0xe7, 0x93, 0xf4, 0x80, 0xa2, 0x7c, 0x44, 0x8a, 0xc8, 0xdb, 0x95, 0x73, 0x8e, 0x36, 0xad, 0xf, 0x15, 0xfa, 0xe2, 0x3a, 0x98, 0xf7, 0x3e, 0x1b, 0xd9, 0x6a, 0x6d, 0xfa, 0x6b, 0x1a, 0x4d, 0xf4, 0xd3, 0x44, 0x41, 0xd9, 0x73, 0xaf, 0x7e, 0x19, 0x94, 0xc0, 0x67, 0x63, 0xbb, 0xab, 0x81, 0xac, 0x19, 0xb0, 0xbe, 0x9e, 0xc8, 0x56, 0x36, 0x5d, 0xe6, 0x72, 0x18, 0x40, 0xb2, 0xa4, 0x80, 0xf, 0x27, 0xe3, 0x2d, 0x90, 0x46, 0xfc, 0x67, 0xb7, 0xf4, 0x43, 0xa8, 0x8c, 0x3b, 0xae, 0x70, 0x13, 0x83, 0x5, 0xe9, 0xf1, 0x62, 0xdb, 0xa6, 0x21, 0x9e, 0x6f, 0x8f, 0xd6, 0x84, 0x94, 0xfe, 0x64, 0x4b, 0xf6, 0xf1, 0x98, 0xd1, 0xb3, 0xa9, 0x34, 0x41, 0x6e, 0x96, 0xac, 0x21, 0x9c, 0x72, 0xea, 0x95, 0x64, 0x8b, 0x1d, 0x96, 0x77, 0xc7, 0xdb, 0xa1, 0xe3, 0xcc, 0x6e, 0x6b, 0x1, 0x19, 0x8e, 0xa8, 0x5a, 0x6f, 0xa3, 0xdb, 0xe6, 0x8f, 0xfd, 0x5b, 0x93, 0x67, 0x47, 0xbf, 0x86, 0x25, 0x36, 0x22, 0xbf, 0x6, 0x56, 0xc4, 0x17, 0x8e, 0x9b, 0x25, 0x9f, 0x1, 0xfb, 0xfb, 0xef, 0x7d, 0xbb, 0x6f, 0x45, 0xea, 0x2d, 0x1, 0xcf, 0x4a, 0xd0, 0x75, 0x71, 0x84, 0x40, 0xc0, 0xd, 0xc6, 0x63, 0x21, 0xb3, 0x11, 0xf3, 0x99, 0x43, 0x60, 0x64, 0xe7, 0xf5, 0x6d, 0x25, 0x4b, 0xaa, 0xe8, 0x5a, 0x31, 0x99, 0xc3, 0x13, 0x57, 0xb7, 0xe, 0x81, 0x18, 0xd, 0x1b, 0xed, 0xe7, 0xfc, 0xe1, 0x28, 0xd2, 0xaa, 0x7f, 0xe5, 0xc5, 0x9, 0x5a, 0x5, 0x31, 0x4b, 0x5, 0x62, 0x5, 0xe7, 0x19, 0xf1, 0x3c, 0x73, 0x8f, 0xc4, 0x43, 0xf9, 0x4d, 0xd3, 0xdd, 0x8b, 0xf2, 0x8a, 0x80, 0x24, 0x49, 0x1d, 0x36, 0x25, 0x79, 0x4c, 0xef, 0x85, 0xb2, 0xc2, 0xc8, 0x10, 0x20, 0x8a, 0x85, 0x57, 0xb0, 0x4f, 0x51, 0x7c, 0x42, 0xef, 0xd9, 0x50, 0x2a, 0x1b, 0x4d, 0xe4, 0x12, 0xb4, 0x7c, 0x53, 0xe, 0xe6, 0xf0, 0x5, 0x6b, 0x5e, 0xac, 0x5b, 0xe8, 0x7a, 0xe7, 0x44, 0x2a, 0xa8, 0x4f, 0x30, 0xad, 0x9b, 0x6c, 0x50, 0xd8, 0x51, 0x86, 0x32, 0xbd, 0x45, 0x12, 0x78, 0x3b, 0xd3, 0xfb, 0x35, 0x8b, 0x9c, 0xbe, 0xe1, 0xec, 0xd5, 0xd6, 0x34, 0xd6, 0x17, 0xa5, 0x7b, 0xa8, 0xac, 0x2d, 0x8f, 0x12, 0xc9, 0x9c, 0x1a, 0x14, 0x6d, 0x6f, 0xcb, 0x99, 0x1, 0xf4, 0x6c, 0x5, 0xfd, 0xb5, 0xbc, 0x3d, 0xdb, 0x7d, 0x8c, 0xd, 0x69, 0x4b, 0x5e, 0x4, 0x32, 0xe2, 0x9a, 0x2b, 0xb3, 0xbd, 0xa7, 0xd, 0x39, 0x77, 0xd7, 0x96, 0x70, 0x82, 0x6, 0x9a, 0xa3, 0x6f, 0x42, 0x5c, 0x60, 0xd3, 0xed, 0xa2, 0x92, 0x2f, 0xd4, 0x1d, 0xdb, 0x7d, 0x1f, 0xa2, 0xce, 0x76, 0x25, 0x6e, 0x3e, 0xc5, 0x3a, 0x55, 0x75, 0xde, 0xb, 0x9, 0x19, 0xbb, 0x71, 0x9c, 0xd7, 0x38, 0x84, 0xf0, 0x52, 0xa3, 0x5f, 0xda, 0x47, 0x86, 0x1c, 0x13, 0xbb, 0x52, 0x35, 0x9, 0xbf, 0x91, 0x23, 0x3a, 0xcf, 0xb8, 0x2c, 0x67, 0x4b, 0xc4, 0x6f, 0xb5, 0xaa, 0xba, 0x97, 0xe, 0x29, 0xea, 0x48, 0xaf, 0x84, 0xfe, 0xae, 0xe9, 0xaa, 0xc0, 0xcd, 0xe8, 0xad, 0xf, 0xf2, 0xb3, 0x8a, 0xa3, 0x78, 0x96, 0x3d, 0x62, 0x21, 0x7b, 0x8c, 0x7, 0x9b, 0xee, 0x27, 0x98, 0x5b, 0x72, 0x5e, 0xc8, 0x32, 0x7f, 0x8a, 0x49, 0x6c, 0xbc, 0xa3, 0xeb, 0xc7, 0x63, 0x79, 0x3c, 0xdd, 0xa9, 0xc5, 0xc8, 0x4b, 0x42, 0x67, 0x8a, 0xa, 0xa6, 0xb9, 0xba, 0xa0, 0x3a, 0x5c, 0xbd, 0x7e, 0x2f, 0x73, 0x3e, 0x95, 0x6d, 0xd9, 0xb5, 0x71, 0x23, 0x17, 0x6, 0x8e, 0xa3, 0x69, 0xd7, 0x82, 0x1e, 0x3c, 0x28, 0x8c, 0x1, 0x91, 0x10, 0xc0, 0xeb, 0x79, 0x2e, 0xf4, 0xfe, 0x7b, 0xde, 0x19, 0x9e, 0xf1, 0xc, 0x97, 0x31, 0x38, 0xaf, 0x40, 0xfa, 0x52, 0xfb, 0x35, 0xdf, 0xfa, 0x93, 0x9e, 0x3d, 0x84, 0x3a, 0xda, 0x77, 0x50, 0x89, 0x69, 0x17, 0x77, 0x21, 0x1, 0xe4, 0x90, 0x76, 0x81, 0x2e, 0x62, 0x3f, 0x8f, 0xe4, 0x35, 0x45, 0x2c, 0xc3, 0x9c, 0xfc, 0x3c, 0x6b, 0xd3, 0x66, 0x5b, 0xb7, 0xe2, 0xf, 0xd0, 0x9e, 0x28, 0xc0, 0x8d, 0x9d, 0x29, 0xcd, 0xb7, 0xa4, 0xc5, 0xf7, 0x30, 0x2a, 0xcf, 0xb6, 0x3a, 0x56, 0xbd, 0x48, 0x1f, 0x53, 0x5a, 0x13, 0x61, 0x82, 0x57, 0x7e, 0xa, 0xf1, 0x43, 0x6c, 0x5, 0xe, 0xa3, 0x76, 0xb3, 0x35, 0xda, 0x9c, 0xf9, 0x60, 0x4, 0x2a, 0x11, 0x58, 0xfa, 0x84, 0x2a, 0x85, 0xdc, 0xc9, 0x23, 0xbb, 0x7e, 0xe9, 0x60, 0x16, 0x86, 0xc, 0x22, 0x31, 0xa1, 0xf0, 0xd8, 0x59, 0x27, 0x58, 0x1, 0x95, 0x8c, 0xeb, 0xdb, 0x37, 0x4c, 0xc1, 0xbc, 0xee, 0x20, 0x69, 0xae, 0x9a, 0x2e, 0x97, 0x3, 0x91, 0x17, 0x2a, 0xb7, 0xbb, 0x9d, 0x39, 0xd9, 0x91, 0xf6, 0x8c, 0x2e, 0x8, 0x7a, 0x7, 0x73, 0x38, 0x7b, 0x62, 0xa6, 0x8, 0x64, 0x1e, 0xc5, 0x4a, 0x7e, 0x89, 0x76, 0xb7, 0xa9, 0xad, 0x1f, 0xa9, 0x90, 0x4b, 0xb3, 0xfa, 0x98, 0xfb, 0xb3, 0x32, 0xd1, 0x4b, 0x6b, 0x23, 0xa8, 0x2f, 0x4f, 0xfa, 0x69, 0xa8, 0xdb, 0xee, 0xb4, 0x73, 0x3b, 0x7e, 0x69, 0x43, 0xb, 0xf6, 0xb1, 0xec, 0x5c, 0x8e, 0x5b, 0xd, 0x78, 0x1, 0xb4, 0xc7, 0x45, 0xd9, 0x2d, 0xfe, 0x7, 0x12, 0x24, 0xc7, 0xda, 0x68, 0x7a, 0x7e, 0x19, 0x91, 0xb0, 0x38, 0x67, 0xe8, 0x2e, 0x7f, 0x3d, 0x3d, 0xcc, 0x2c, 0x63, 0xad, 0x5e, 0xe9, 0xcf, 0xc2, 0x4, 0x51, 0xbe, 0xc8, 0x62, 0xd4, 0x21, 0xe0, 0x3b, 0x11, 0x19, 0x5b, 0xca, 0xf0, 0x1e, 0xc4, 0x42, 0x86, 0x91, 0xcd, 0xe6, 0x61, 0x8d, 0xb6, 0x3a, 0xe7, 0x3c, 0x8, 0x18, 0x13, 0x4, 0xd4, 0xb0, 0x65, 0x61, 0x38, 0x31, 0x76, 0x66, 0x4d, 0x20, 0x5, 0x2b, 0xd5, 0xb7, 0x37, 0x3a, 0x7e, 0xc5, 0x3d, 0x1a, 0x4f, 0xcd, 0x63, 0xd7, 0x39, 0xd, 0x0, 0xd2, 0x21, 0x7c, 0xfd, 0xe4, 0x99, 0x3, 0x6e, 0x6e, 0xa3, 0x89, 0xdb, 0xac, 0x12, 0xd0, 0x8f, 0x40, 0xd6, 0x32, 0x2a, 0x26, 0xc5, 0x68, 0x1f, 0xf0, 0xc1, 0xf9, 0xb6, 0x38, 0xcc, 0x8, 0xce, 0xd6, 0x15, 0x24, 0xec, 0x48, 0xa8, 0xe8, 0xbf, 0x93, 0xd2, 0x2, 0x8d, 0xc1, 0xf, 0xfe, 0x6, 0x3c, 0xb8, 0x7, 0xc9, 0x4c, 0xad, 0x3c, 0x2b, 0x69, 0x4e, 0xd9, 0x74, 0x73, 0x85, 0xef, 0x59, 0x34, 0xf4, 0xc8, 0x4f, 0x90, 0x7a, 0xf7, 0x99, 0x9e, 0x47, 0x6c, 0x27, 0x35, 0xe1, 0x31, 0x8a, 0xad, 0x6e, 0xbb, 0x79, 0x47, 0xd9, 0xa6, 0x4b, 0x2f, 0x62, 0x5e, 0x2d, 0xab, 0x7e, 0x77, 0xb6, 0xfd, 0xbf}, - output224: []byte{0x3b, 0xe8, 0x19, 0x8d, 0x48, 0x41, 0xd5, 0x7b, 0x66, 0x75, 0x57, 0x18, 0x50, 0x54, 0x36, 0x35, 0xdd, 0x9f, 0x22, 0x88, 0x2d, 0x49, 0x32, 0x8b, 0x75, 0x55, 0x98, 0xd9}, - output256: []byte{0x94, 0x71, 0x60, 0x79, 0x46, 0x3, 0x1a, 0x2e, 0x58, 0x9d, 0xdf, 0x6f, 0x7a, 0xe6, 0x89, 0x6c, 0xd9, 0x4e, 0x7d, 0xf, 0x86, 0x30, 0x6e, 0xd, 0x1a, 0x75, 0x77, 0x45, 0x13, 0xac, 0x95, 0x53}, - output384: []byte{0xa4, 0x1a, 0xa8, 0xf9, 0x43, 0x11, 0x7d, 0xe4, 0x1b, 0x2f, 0xa4, 0x24, 0x5b, 0xc9, 0x75, 0x8d, 0x67, 0x2f, 0x5d, 0xf, 0xec, 0xf4, 0x32, 0xac, 0x44, 0x63, 0x5b, 0xff, 0x2a, 0x46, 0xd3, 0x8f, 0x16, 0x8e, 0x23, 0x1e, 0xad, 0xef, 0x2c, 0x77, 0xd3, 0x44, 0x1f, 0x1d, 0x36, 0xd2, 0xb2, 0x2a}, - output512: []byte{0x8, 0xcd, 0x2e, 0xca, 0xa8, 0x95, 0xc0, 0xe2, 0xb3, 0x19, 0x94, 0xdc, 0xaa, 0xe2, 0xc1, 0xf7, 0x6b, 0x2, 0xe7, 0x61, 0xfb, 0x5f, 0x92, 0x94, 0x49, 0xac, 0x32, 0xa4, 0x77, 0xcc, 0x16, 0x7a, 0xb1, 0xd4, 0xe2, 0x38, 0x43, 0xc3, 0xbd, 0x1, 0xf7, 0xd, 0x83, 0x1c, 0x4a, 0x77, 0xc5, 0xb7, 0xcc, 0x90, 0x12, 0x31, 0x8a, 0xd8, 0x7c, 0x65, 0x51, 0xa5, 0xb6, 0xaa, 0x5b, 0xfd, 0xf8, 0x6f}}, - testcase{ - msg: []byte{0x69, 0x64, 0xe2, 0xd6, 0x50, 0xb1, 0x9a, 0xa6, 0xd3, 0x1b, 0x83, 0x9c, 0x60, 0x4a, 0x90, 0xaa, 0x3d, 0x10, 0x58, 0x34, 0xf3, 0x85, 0x4d, 0xf4, 0xa4, 0x1d, 0x47, 0x87, 0xa3, 0x87, 0x4, 0x2c, 0xc4, 0x13, 0xde, 0x27, 0x50, 0x3a, 0x1e, 0xfc, 0x36, 0x6b, 0x87, 0xed, 0x67, 0x7e, 0xa6, 0x3d, 0xcc, 0xd4, 0xd, 0x9c, 0x7f, 0x69, 0x9f, 0xff, 0x9b, 0x8a, 0x42, 0xb5, 0x96, 0x17, 0x30, 0x14, 0xb9, 0xe8, 0x11, 0xd4, 0x2d, 0x2d, 0xe5, 0x74, 0xed, 0x5c, 0x80, 0xfc, 0x6a, 0x5a, 0x86, 0xb7, 0x72, 0xa3, 0xee, 0xbe, 0x56, 0x40, 0x10, 0x25, 0x27, 0x40, 0x1c, 0xe, 0x9b, 0xef, 0x57, 0xe0, 0x5b, 0xbf, 0x6, 0x98, 0x65, 0x35, 0xd3, 0x16, 0x37, 0x88, 0xc6, 0xc, 0x92, 0xec, 0x74, 0x60, 0xb7, 0xfc, 0x68, 0x5f, 0xb4, 0x5f, 0xb8, 0xa1, 0x8f, 0xa8, 0x4e, 0xf5, 0xa3, 0x7c, 0x94, 0xa2, 0xec, 0x3a, 0x94, 0x8d, 0xca, 0xfc, 0x69, 0xb8, 0x3e, 0x24, 0x34, 0xab, 0xcf, 0xda, 0xfc, 0xe9, 0x48, 0xd8, 0xc7, 0x6e, 0xd9, 0xba, 0x78, 0xd, 0x39, 0xac, 0x3d, 0xd0, 0x98, 0xeb, 0xb3, 0x20, 0x85, 0x38, 0xa6, 0x66, 0xce, 0xd8, 0xac, 0xf1, 0xb3, 0x3, 0x1c, 0x5e, 0xf2, 0x35, 0x92, 0xfc, 0x43, 0x2a, 0xc2, 0x5b, 0xe0, 0x55, 0x2c, 0x1a, 0x64, 0x63, 0xe3, 0xcc, 0x77, 0x8d, 0x45, 0x6a, 0x52, 0x4, 0x32, 0xa8, 0xc5, 0x54, 0x36, 0x57, 0x32, 0x19, 0xc4, 0x9e, 0x6b, 0xc2, 0x74, 0x74, 0xaa, 0x4b, 0xd9, 0xb1, 0xb3, 0xbc, 0x64, 0x91, 0x7d, 0x1, 0x6b, 0x65, 0x80, 0xae, 0xf2, 0xa0, 0xba, 0x41, 0xac, 0xfb, 0x98, 0xea, 0x86, 0x9d, 0x39, 0x95, 0x1, 0x27, 0x15, 0xd0, 0x6d, 0x64, 0xe0, 0xaa, 0xef, 0xb2, 0x62, 0x71, 0x25, 0xf2, 0x25, 0xe2, 0xef, 0xea, 0x21, 0xaf, 0x7e, 0xc4, 0x93, 0x4, 0xb8, 0xe6, 0x39, 0x96, 0x23, 0xfa, 0xc1, 0x5d, 0x6c, 0xdf, 0x39, 0xc4, 0x17, 0x7a, 0x12, 0x25, 0x4e, 0x5d, 0x80, 0x7b, 0x4a, 0xae, 0xce, 0xd6, 0xd5, 0x91, 0xf4, 0xd0, 0xbf, 0x50, 0xc0, 0x7f, 0x5b, 0x69, 0xe7, 0xd6, 0x0, 0x55, 0x6, 0x26, 0x54, 0xe7, 0xb1, 0xc8, 0xb9, 0x6a, 0xf7, 0x26, 0xbc, 0xb3, 0x4b, 0x10, 0xc6, 0xb, 0x7f, 0xc3, 0xb1, 0xd, 0xbc, 0x69, 0x10, 0x7c, 0x7d, 0x81, 0x4, 0x3b, 0xca, 0xa6, 0x81, 0xeb, 0x35, 0x4c, 0xf1, 0x9a, 0xf2, 0x6a, 0xe3, 0xc7, 0xcb, 0x32, 0x1b, 0x89, 0x2c, 0x33, 0xcd, 0x4, 0x4a, 0x24, 0xa5, 0x24, 0x9f, 0x2f, 0x2e, 0xa3, 0xf8, 0x4, 0x94, 0x4b, 0x50, 0x49, 0xca, 0x88, 0x7e, 0xaa, 0x6d, 0x4c, 0xd5, 0xe5, 0x2d, 0x17, 0xcf, 0x1, 0xcb, 0xf, 0xce, 0xcd, 0xa4, 0x74, 0x25, 0xec, 0x85, 0xf8, 0x36, 0x2a, 0xe0, 0x45, 0xed, 0xd, 0x10, 0x97, 0x58, 0xc9, 0x1, 0x34, 0xea, 0x27, 0xc4, 0xcb, 0xf6, 0xe3, 0xab, 0xe7, 0xf2, 0x83, 0xf4, 0xc3, 0xff, 0xc4, 0x45, 0x5e, 0xae, 0x47, 0x90, 0x32, 0x9a, 0xe4, 0x76, 0x58, 0xdb, 0x28, 0x50, 0xb0, 0x9a, 0x79, 0xa8, 0x9b, 0xdb, 0xf7, 0x2a, 0x20, 0xdc, 0x88, 0x7b, 0x6a, 0xd7, 0xad, 0xec, 0xbd, 0x5a, 0x86, 0xc0, 0x84, 0x79, 0xd4, 0x46, 0xef, 0x81, 0x7e, 0x13, 0xa3, 0x78, 0x19, 0xc2, 0x27, 0x79, 0x2e, 0x3e, 0xf, 0xf8, 0xa, 0x28, 0x31, 0xb2, 0x7, 0x60, 0xb8, 0x79, 0xa4, 0x89, 0xa4, 0xae, 0x50, 0xaf, 0xf9, 0xfb, 0x1d, 0xff, 0x39, 0x13, 0x2d, 0xd8, 0x43, 0x0, 0xef, 0x7a, 0xbe, 0x5, 0xe9, 0x8c, 0x59, 0x29, 0x68, 0x3a, 0x2d, 0xdf, 0xea, 0x99, 0x46, 0x89, 0x96, 0xd6, 0x52, 0xdc, 0xcc, 0x69, 0x81, 0x83, 0xf9, 0xa3, 0x10, 0x3f, 0x7c, 0x4, 0x9a, 0x72, 0x27, 0x73, 0x3d, 0xc, 0x14, 0xed, 0x1b, 0xb8, 0x9, 0xb4, 0xef, 0x75, 0xd, 0xf1, 0x90, 0x94, 0x88, 0x59, 0x61, 0xd3, 0x27, 0x39, 0x4d, 0x6c, 0xfa, 0xa, 0x21, 0xb3, 0x41, 0x68, 0x17, 0x38, 0xb7, 0xe6, 0xfe, 0xef, 0xcb, 0xf4, 0xdd, 0x47, 0x4b, 0x7b, 0x45, 0xea, 0x64, 0xa3, 0xa6, 0xb, 0x97, 0xbf, 0xf2, 0x97, 0xe8, 0xa5, 0x2c, 0xd4, 0xaa, 0x6e, 0x92, 0xd6, 0xdb, 0xb7, 0xfe, 0xf7, 0xf7, 0x36, 0xd2, 0x9c, 0xe3, 0xb0, 0x41, 0x48, 0x8a, 0x6d, 0xb6, 0x8d, 0x28, 0xf3, 0xc0, 0x20, 0x4c, 0xff, 0xf8, 0x2c, 0xe6, 0xea, 0xd1, 0x1e, 0x11, 0xd7, 0xb0, 0x60, 0xa0, 0xff, 0x55, 0x7, 0x11, 0xbe, 0x33, 0x28, 0x8a, 0xcc, 0x63, 0xb6, 0xdc, 0xf2, 0x6, 0x22, 0x51, 0x77, 0x15, 0x44, 0xad, 0x41, 0xb3, 0x5b, 0x1e, 0xa5, 0xf1, 0x1c, 0x4b, 0x19, 0x6c, 0x48, 0xf5, 0xfb, 0xfc, 0xb4, 0xb3, 0x9c, 0x60, 0x4, 0x4a, 0x70, 0xe1, 0xdb, 0xb2, 0xcf, 0xbf, 0x9d, 0x8f, 0xcc, 0x85, 0x5d, 0xec, 0x9a, 0xb, 0x33, 0xf2, 0x2, 0x1c, 0xc7, 0x6b, 0x23, 0x6a, 0xde, 0xb5, 0xa1, 0x35, 0x6c, 0xfb, 0x85, 0x90, 0xfc, 0x1d, 0xdf, 0x8a, 0x72, 0x1d, 0x93, 0x31, 0x86, 0x1d, 0xb6, 0x4, 0xad, 0xc, 0x8c, 0x89, 0x87, 0x1e, 0x96, 0x0, 0x19, 0xa0, 0xda, 0xba, 0x43, 0x20, 0x2a, 0xdd, 0xd5, 0x26, 0xc1, 0x70, 0x6e, 0x78, 0x2f, 0xac, 0x5f, 0x98, 0x29, 0x5f, 0x4c, 0x60, 0x36, 0xb8, 0xe2, 0xdf, 0x6d, 0x22, 0x5b, 0x63, 0x35, 0xd1, 0x31, 0x41, 0x43, 0x57, 0x3a, 0xb8, 0xe6, 0x6a, 0x77, 0x50, 0xbd, 0xb6, 0x42, 0x4, 0x52, 0xfa, 0x6, 0xb, 0x24, 0xfb, 0xbc, 0x36, 0x18, 0xd9, 0x51, 0x49, 0x5, 0x34, 0x71, 0x8d, 0x97, 0xe3, 0xae, 0x99, 0x4d, 0x5e, 0x77, 0xd, 0x10, 0x3e, 0x1f, 0x40, 0x5a, 0x53, 0x57, 0xa2, 0x52, 0x1e, 0x93, 0x93, 0xed, 0x2e, 0xd1, 0x97, 0xe7, 0xaa, 0xc8, 0x7e, 0x14, 0x22, 0x5, 0xc6, 0x9d, 0xbe, 0xe8, 0x46, 0x3, 0x4f, 0xe6, 0xf2, 0x16, 0x8d, 0xc2, 0x7, 0xd1, 0x30, 0x22, 0xe1, 0x14, 0x27, 0xe8, 0xf0, 0x20, 0x87, 0xd2, 0xf4, 0xe8, 0x50, 0xe7, 0xfd, 0x21, 0x23, 0x7d, 0x56, 0xbe, 0x97, 0x7, 0x81, 0xcd, 0x77, 0x9f, 0x7b, 0xd, 0x8e, 0x9f, 0x68, 0x9e, 0x6c, 0xad, 0xa3, 0x38, 0x6b, 0x5e, 0x77, 0x9e, 0x38, 0x2a, 0xe3, 0xde, 0xb6, 0xcb, 0x20, 0xdb, 0xa1, 0x6a, 0x94, 0xd1, 0x47, 0x10, 0x1f, 0xe5, 0x94, 0x79, 0xa, 0x5b, 0x33, 0x1d, 0x40, 0x55, 0x1c, 0x8c, 0x1d, 0x81, 0x5, 0x2c, 0xe0, 0x6, 0x42, 0xf5, 0x6e, 0x40, 0x48, 0xf6, 0x83, 0x1d, 0x71, 0x3e, 0x74, 0xe3, 0xf4, 0xc6, 0xed, 0x23, 0x52, 0x85, 0x48, 0x54, 0xe3, 0x5c, 0x6, 0x31, 0x3f, 0x1, 0x4, 0xfa, 0x47, 0xee, 0xb2, 0x82, 0xaf, 0xf9, 0xa3, 0xed, 0x3d, 0x68, 0x3f, 0xc8, 0x8e, 0x96, 0x84, 0xaa, 0xc, 0x46, 0xc, 0x3e, 0xc3, 0x33, 0x8, 0xd, 0x5f, 0x55, 0x75, 0x20, 0xa3, 0x59, 0x80, 0x35, 0x63, 0xa1, 0xd8, 0xba, 0x7c, 0x71, 0x60, 0x82, 0xcb, 0xea, 0x80, 0x8d, 0xff, 0x62, 0x96, 0x94, 0x7c, 0xef, 0x7e, 0xa3, 0xc, 0xba, 0xd4, 0x58, 0xc0, 0xb9, 0xa, 0x7, 0x84, 0x7e, 0x3e, 0x55, 0x7c, 0xfc, 0x33, 0xb0, 0xe3, 0x89, 0x3d, 0x32, 0x92, 0x49, 0x34, 0xda, 0x96, 0x6f, 0x6d, 0x45, 0x1f, 0xf8, 0xc6, 0xb2, 0x8e, 0xca, 0xd7, 0x48, 0xc, 0xc1, 0x37, 0x32, 0x7e, 0x5d, 0xb1, 0xd, 0x18, 0xd, 0x41, 0xe8, 0x8, 0x86, 0x60, 0x29, 0x7d, 0xfa, 0x99, 0x12, 0x6f, 0x7e, 0x2a, 0xb2, 0x90, 0xf2, 0x6, 0xc0, 0x26, 0x44, 0xb4, 0xf2, 0x8a, 0x60, 0x3e, 0x95, 0x90, 0x77, 0xe1, 0x3d, 0x65, 0xc6, 0x50, 0xcc, 0x5, 0x13, 0x25, 0x9c, 0x36, 0x32, 0x4c, 0xb5, 0x22, 0x3e, 0x82, 0x93, 0x50, 0xeb, 0xa, 0x56, 0x73, 0x17, 0xfa, 0x17, 0x62, 0x13, 0xeb, 0xef, 0xd4, 0xb, 0x98, 0xc3, 0x80, 0x55, 0xb2, 0x4a, 0xd8, 0x51, 0x71, 0xff, 0x7, 0x24, 0x41, 0x9, 0x26, 0xb3, 0x8d, 0x8a, 0x6, 0xde, 0x50, 0x7, 0x75, 0xd3, 0x9e, 0x47, 0x2b, 0xb, 0x32, 0x12, 0x12, 0x22, 0x4, 0x13, 0x6d, 0x7, 0x93, 0xed, 0x28, 0xf6, 0xea, 0x7, 0xe, 0xd5, 0x7, 0x45, 0x74, 0x5d, 0xf5, 0x70, 0x79, 0xf7, 0xd4, 0xc6, 0x3c, 0x6b, 0x5a, 0x86, 0x2a, 0x3, 0x1d, 0xa9, 0x3f, 0x4e, 0x57, 0x68, 0x73, 0xe6, 0xed, 0x3, 0xea, 0xab, 0xc2, 0xa5, 0x9d, 0x4f, 0xde, 0x5a, 0x67, 0x8, 0x50, 0xa5, 0x2b, 0x17, 0xdf, 0xb0, 0x59, 0xad, 0x5a, 0x8, 0x22, 0xff, 0x68, 0xb9, 0xa3, 0xa1, 0x1a, 0x26, 0xbd, 0xe5, 0x19, 0xe8, 0x6a, 0x2c, 0x7f, 0x74, 0x3b, 0xc9, 0x32, 0xbb, 0x29, 0x20, 0x83, 0x83, 0x62, 0x1d, 0x50, 0x9d, 0xa4, 0x38, 0xa5, 0x6b, 0x56, 0xe1, 0xaa, 0xad, 0xc3, 0x30, 0xa0, 0xce, 0xad, 0xe5, 0x1e, 0xa6, 0x5e, 0xca, 0x25, 0x6e, 0x3d, 0xee, 0x44, 0x95, 0xc3, 0xfb, 0x94, 0xf4, 0x1c, 0x12, 0x1b, 0x3, 0xb6, 0x99, 0x69, 0x81, 0x3, 0x3d, 0x5d, 0x9e, 0x55, 0x40, 0x71, 0x9e, 0x29, 0xeb, 0x1a, 0xd9, 0xa1, 0xc, 0x21, 0x82, 0x81, 0x16, 0x29, 0xbb, 0x5a, 0x7d, 0x22, 0x96, 0x84, 0x2f, 0xca, 0x60, 0x18, 0xe4, 0x4b, 0x1b, 0x2b, 0xe, 0xe5, 0x6d, 0xb6, 0x3e, 0xda, 0xcf, 0xfa, 0x83, 0x7a, 0x1, 0x47, 0xd1, 0xfb, 0xea, 0x73, 0x7f, 0xd6, 0x6b, 0x61, 0x4f, 0xa0, 0x97, 0x81, 0x94, 0x22, 0xda, 0xeb, 0x9e, 0x1f, 0x4, 0xb8, 0x1d, 0x4b, 0x1e, 0x56, 0x9a, 0xa8, 0x47, 0x8, 0xaf, 0xac, 0x7a, 0x9d, 0xd9, 0x2f, 0x95, 0xd9, 0xca, 0xc1, 0x13, 0x74, 0x4, 0xf9, 0x50, 0xc7, 0xd, 0xe, 0x33, 0x7c, 0x95, 0x6b, 0xfd, 0x2c, 0x7b, 0x64, 0xa3, 0xb9, 0x9f, 0x14, 0x99, 0xf9, 0xb2, 0x97, 0x39, 0x1b, 0x9, 0x96, 0xb4, 0x22, 0x89, 0xe2, 0x5, 0xb4, 0x79, 0x0, 0x16, 0x8f, 0x8b, 0xc3, 0xa3, 0xc, 0x84, 0xcd, 0xf0, 0xa, 0xf5, 0x2e, 0xf1, 0x4d, 0x8b, 0x4a, 0x87, 0x67, 0x5f, 0x88, 0x59, 0xe9, 0xc3, 0x98, 0x5, 0x24, 0xc2, 0x8, 0x1d, 0x3a, 0x8, 0xde, 0x57, 0x6c, 0x1f, 0xd5, 0xb4, 0x4, 0x59, 0xe2, 0x99, 0xba, 0x89, 0xfb, 0xd0, 0x5c, 0x8e, 0xd0, 0x1e, 0x3b, 0xed, 0xd8, 0x93, 0xf7, 0xec, 0x17, 0xdd, 0x1b, 0xe1, 0xee, 0xe0, 0xb1, 0x91, 0x86, 0xe7, 0x39, 0xdd, 0xe6, 0x50, 0x56, 0x6c, 0x39, 0x5e, 0xb1, 0x43, 0x45, 0x1c, 0x9, 0xeb, 0x51, 0xc6, 0xe1, 0x4e, 0xef, 0x3f, 0xc3, 0xe2, 0x2, 0x10, 0xce, 0x62, 0xc4, 0x9d, 0xb, 0xb8, 0x62, 0xce, 0xc2, 0x88, 0x72, 0xc0, 0xcd, 0x98, 0x90, 0x50, 0xb5, 0x6e, 0xee, 0xb0, 0x62, 0xae, 0x26, 0x45, 0xc1, 0x51, 0x6, 0x35, 0xe4, 0x8, 0x5f, 0x59, 0x40, 0xee, 0xc6, 0x27, 0x4c, 0xa9, 0x82, 0xe3, 0x12, 0xab, 0x21, 0xba, 0x9, 0x30, 0xbe, 0x4d, 0x6b, 0x57, 0xad, 0x8d, 0x36, 0xbb, 0xf5, 0x8d, 0xc0, 0x5d, 0x35, 0x3e, 0x32, 0xa5, 0xcf, 0xcc, 0x4e, 0xb0, 0x8, 0x61, 0xe, 0x24, 0xa8, 0xf2, 0xa1, 0xfc, 0xb5, 0x7b, 0xf6, 0xe4, 0xad, 0xcf, 0x80, 0xd3, 0x40, 0x89, 0x97, 0xd6, 0x87, 0x2a, 0x2e, 0xa5, 0xe9, 0x4e, 0x74, 0xcc, 0x18, 0x4e, 0xcc, 0xbb, 0xa1, 0x58, 0x82, 0x74, 0x5e, 0x3, 0x14, 0x60, 0x45, 0xdb, 0xf6, 0xe9, 0x41, 0x27, 0x58, 0x1c, 0xee, 0x20, 0xf2, 0xf4, 0x8, 0x84, 0x1d, 0x19, 0x82, 0x13, 0x2e, 0x5b, 0x7f, 0x58, 0x2b, 0x91, 0x78, 0x47, 0x40, 0x76, 0x1e, 0xfd, 0xc9, 0x34, 0x6b, 0xd9, 0xeb, 0xb3, 0xc1, 0xfd, 0x34, 0x1c, 0x30, 0x56, 0xf4, 0xdb, 0xb4, 0xb3, 0x6e, 0xa9, 0xe4, 0xbf, 0x5, 0xc9, 0x65, 0xb3, 0x67, 0x34, 0x64, 0x72, 0xd0, 0xeb, 0x55, 0xb8, 0x40, 0xed, 0x49, 0xef, 0x24, 0x5c, 0x6f, 0x86, 0xec, 0x53, 0x94, 0x6, 0x33, 0x5, 0xba, 0xd, 0xf4, 0x5d, 0xb3, 0xf, 0x76, 0x58, 0xd2, 0x8a, 0xa9, 0x88, 0xcc, 0x9a, 0xd9, 0x7f, 0xa, 0x9c, 0xb, 0x3e, 0x59, 0xfb, 0x62, 0x3d, 0x55, 0xc6, 0x1f, 0x2e, 0x20, 0x25, 0x21, 0x71, 0x49, 0x70, 0xc2, 0x28, 0x5b, 0xdb, 0xf7, 0xc6, 0x11, 0x9f, 0xa3, 0x9, 0x7d, 0x82, 0xf6, 0xa1, 0xeb, 0xc3, 0x3d, 0x42, 0xc8, 0x5a, 0x93, 0x63, 0xa, 0xe1, 0x85, 0x21, 0xa2, 0xf8, 0xaa, 0x78, 0x5a, 0x17, 0xc2, 0xd9, 0x35, 0x40, 0x33, 0xfe, 0x29, 0x7b, 0x17, 0x2e, 0xa1, 0xf0, 0x6c, 0xca, 0x68, 0x6d, 0xe4, 0xe1, 0xa2, 0x88, 0x36, 0xda, 0x55, 0x9e, 0x44, 0x5, 0x85, 0x64, 0x11, 0xd5, 0x85, 0x33, 0xce, 0x33, 0xc6, 0xb5, 0x73, 0xec, 0x51, 0xf0, 0xf5, 0x65, 0x49, 0x9f, 0x6f, 0xca, 0x88, 0x37, 0xfc, 0x80, 0xbc, 0x49, 0x25, 0x86, 0x7e, 0xeb, 0x6b, 0xdc, 0xab, 0x15, 0xef, 0x1c, 0x70, 0xb1, 0x7e, 0x2, 0xa5, 0x35, 0xe2, 0xf4, 0x23, 0xd3, 0x65, 0x91, 0xa2, 0x2c, 0xf5, 0x27, 0xd1, 0x18, 0xd5, 0xc5, 0x40, 0xa6, 0x74, 0x9e, 0x1c, 0x20, 0x60, 0x58, 0xc0, 0x45, 0x2b, 0xd9, 0xc8, 0xf5, 0x88, 0x5e, 0xb5, 0x82, 0x3b, 0xa8, 0x51, 0x5c, 0x10, 0x5f, 0x8d, 0x96, 0xfd, 0x5f, 0x4a, 0xf9, 0x33, 0x7e, 0x66, 0xd3, 0x50, 0x69, 0xd1, 0x9e, 0xc0, 0x41, 0xa7, 0xd9, 0x79, 0x45, 0x2e, 0x57, 0x43, 0xa6, 0xa2, 0x2d, 0xa0, 0xdf, 0x66, 0x2f, 0xd9, 0xd1, 0xa2, 0xac, 0x3f, 0x8d, 0x43, 0x1a, 0x61, 0xf4, 0xfb, 0x94, 0x40, 0x89, 0xc5, 0x22, 0x33, 0x16, 0x7e, 0xd, 0x53, 0x89, 0x9b, 0x6d, 0x45, 0xc5, 0x13, 0x93, 0xf3, 0xef, 0x68, 0x94, 0x92, 0x14, 0x86, 0xd2, 0xf9, 0xf4, 0xd5, 0xe6, 0xe9, 0x51, 0x7, 0xfb, 0x97, 0x5c, 0x8e, 0x85, 0x6a, 0xfc, 0x76, 0xb0, 0x6b, 0xf3, 0x64, 0x86, 0x68, 0xea, 0xff, 0x6a, 0xa5, 0x9f, 0xc9, 0xa3, 0xaa, 0x53, 0x6e, 0x54, 0x88, 0x80, 0xd4, 0xd7, 0x9c, 0x9e, 0xb5, 0xcf, 0xeb, 0xa4, 0xd6, 0xd5, 0xd4, 0x2, 0x19, 0x7c, 0xe, 0x16, 0x8, 0x50, 0xd, 0x69, 0x83, 0x3c, 0x6, 0x9b, 0xd1, 0xc4, 0x5d, 0x76, 0x6a, 0x7b, 0xc7, 0x83, 0xc0, 0x19, 0x4a, 0x2c, 0x81, 0x3b, 0x22, 0x3f, 0x14, 0x1d, 0x8a, 0xe2, 0x86, 0x8f, 0xd6, 0x5d, 0x68, 0xdd, 0x67, 0xef, 0x46, 0x3e, 0x34, 0xe4, 0xfc, 0x20, 0xc7, 0x77, 0x7b, 0xe1, 0x7a, 0x3f, 0xcf, 0xa5, 0x1a, 0x9d, 0x98, 0xfb, 0x23, 0xb3, 0x41, 0xb1, 0x2c, 0xdd, 0x2b, 0x43, 0xb, 0x6, 0x2, 0xca, 0xb0, 0x3a, 0x22, 0x6c, 0x7c, 0xee, 0x4f, 0x94, 0x88, 0xc8, 0x31, 0x9d, 0xdb, 0xf4, 0xef, 0xf1, 0xb6, 0x14, 0xba, 0x9c, 0x1f, 0xe0, 0x9, 0x8e, 0x9c, 0xe1, 0xb5, 0x7e, 0xa4, 0xd8, 0xd7, 0x77, 0xee, 0x89, 0xf4, 0xc2, 0xe3, 0xc7, 0x29, 0x21, 0x6b, 0x6b, 0x2e, 0xe2, 0x68, 0x5d, 0xb9, 0xc1, 0x94, 0x5b, 0x27, 0x98, 0x6c, 0x74, 0x8d, 0xca, 0x51, 0xbb, 0x36, 0x18, 0x24, 0x82, 0x4f, 0xb2, 0xa3, 0x1e, 0xf9, 0xd7, 0x24, 0x4b, 0x73, 0x47, 0x79, 0xb8, 0x63, 0x54, 0xbc, 0xd, 0xba, 0x43, 0x8d, 0x37, 0x81, 0x93, 0xa8, 0x47, 0x85, 0xb6, 0xb8, 0x64, 0x30, 0x6e, 0xb6, 0xe6, 0xa0, 0xa8, 0xf, 0xa2, 0xaf, 0x4, 0x98, 0x5f, 0xc5, 0x40, 0x47, 0x7b, 0x91, 0x1d, 0x7e, 0xa8, 0x59, 0xd8, 0xf9, 0x56, 0xdd, 0x1d, 0xf3, 0xe4, 0x64, 0xd8, 0x84, 0xa6, 0x35, 0x5e, 0x8b, 0x24, 0xca, 0x3f, 0x5, 0xf2, 0x5e, 0xe5, 0x3b, 0x23, 0xeb, 0xe4, 0x3c, 0xe6, 0xc3, 0x27, 0x74, 0xfb, 0x74, 0xba, 0xce, 0x33, 0xa1, 0x2e, 0x7c, 0x17, 0x98, 0xb7, 0x11, 0x6b, 0xee, 0x12, 0x45, 0xcb, 0xe3, 0x23, 0x88, 0x24, 0x64, 0xc4, 0x9b, 0x64, 0x7d, 0x61, 0x35, 0xa, 0xde, 0xb8, 0x4c, 0xae, 0x9c, 0x61, 0xb0, 0x2b, 0xd7, 0x2, 0xe6, 0xd8, 0xde, 0x84, 0x9f, 0xad, 0x57, 0xa5, 0x7a, 0xd2, 0x97, 0x15, 0x3, 0x12, 0x19, 0x8d, 0x89, 0xef, 0x13, 0x66, 0xe4, 0x52, 0x86, 0xf4, 0xbc, 0xc8, 0x21, 0x7d, 0xb2, 0xed, 0xd3, 0x9b, 0x14, 0x4d, 0x6b, 0xa1, 0xd6, 0xcb, 0xd, 0x1c, 0x74, 0xbe, 0x39, 0x6c, 0xb5, 0x35, 0xe6, 0xff, 0x99, 0x0, 0xac, 0x37, 0x1a, 0x6f, 0x9e, 0x8d, 0xaa, 0x45, 0xdd, 0x1b, 0x18, 0x42, 0xfc, 0x68, 0x5d, 0x1f, 0xde, 0xe0, 0xfc, 0x12, 0x7a, 0x16, 0x5b, 0x3, 0xb5, 0x61, 0x0, 0x2c, 0xa5, 0x6f, 0x19, 0x14, 0x30, 0x24, 0xc4, 0x15, 0x20, 0x48, 0x9b, 0xef, 0xa8, 0x2a, 0xf9, 0x2f, 0xce, 0x5b, 0xb2, 0x20, 0xdc, 0xec, 0x1a, 0xa0, 0x47, 0xb2, 0x99, 0xf7, 0xfa, 0xc2, 0xbc, 0xb4, 0x89, 0xc9, 0x90, 0x44, 0xae, 0xfa, 0xf2, 0x92, 0xc, 0x32, 0x45, 0x97, 0xda, 0xac, 0xab, 0x92, 0xf6, 0x34, 0x7b, 0xc0, 0xef, 0x95, 0xca, 0x61, 0x9d, 0xc1, 0x9a, 0x7f, 0x28, 0xa1, 0xcb, 0xba, 0xce, 0xfc, 0x85, 0xea, 0x2b, 0xd7, 0xa7, 0x69, 0xe6, 0xbe, 0x42, 0x4f, 0x4a, 0xf0, 0x8a, 0xf7, 0xf2, 0x4f, 0x54, 0x75, 0xee, 0x24, 0x34, 0xac, 0xee, 0xce, 0xc1, 0x8b, 0xfb, 0xcf, 0xd3, 0x47, 0x92, 0x26, 0x36, 0x3b, 0x2b, 0xfa, 0x91, 0x5d, 0xa7, 0x6b, 0x83, 0x98, 0x57, 0xa3, 0x36, 0x41, 0xb4, 0xb9, 0xf6, 0x4f, 0x15, 0x70, 0x2a, 0xdb, 0x39, 0x64, 0xe5, 0xdb, 0x19, 0xfa, 0xf4, 0x84, 0x89, 0xa7, 0xf6, 0xf9, 0xf5, 0x6a, 0x2a, 0x25, 0x8c, 0x54, 0xe0, 0xe5, 0xf9, 0x7f, 0x38, 0x2f, 0xa9, 0x92, 0x74, 0xb2, 0x60, 0x7d, 0x3d, 0x6a, 0x6b, 0x94, 0xca, 0x7, 0x5e, 0xb4, 0x54, 0x8, 0xb, 0x1, 0x43, 0x5c, 0x5a, 0xba, 0x8b, 0x45, 0xad, 0x6e, 0xdf, 0xd0, 0xd, 0xdc, 0x2, 0x70, 0xc7, 0xe5, 0x49, 0x19, 0xa4, 0x3d, 0xc7, 0x15, 0xcb, 0x7b, 0x37, 0xe8, 0x42, 0x3c, 0x7d, 0x22, 0x85, 0xd2, 0x22, 0xae, 0xc6, 0x6e, 0x4d, 0xc4, 0xb5, 0x5b, 0xc6, 0xee, 0xd3, 0xce, 0xd1, 0xb8, 0xd5, 0xb3, 0x64, 0xf5, 0xfe, 0xd3, 0x5b, 0xa0, 0x31, 0x2e, 0x46, 0x41, 0x81, 0x92, 0x93, 0x77, 0x92, 0xe8, 0x65, 0xeb, 0xf5, 0xd5, 0x31, 0x5f, 0x1e, 0x39, 0x51, 0x94, 0x0, 0x4b, 0x77, 0xf1, 0xd1, 0x5e, 0x48, 0x20, 0x3e, 0x3e, 0x5b, 0xd2, 0xc5, 0x8, 0xe3, 0xcd, 0x8d, 0x1e, 0x20, 0x75, 0xb3, 0xd6, 0xdb, 0xa, 0x5b, 0x28, 0xc1, 0xf, 0x15, 0x5b, 0x13, 0x95, 0x42, 0x97, 0xdb, 0x51, 0x8a, 0x3e, 0x47, 0xdb, 0x5d, 0xa1, 0xc0, 0xed, 0x85, 0x36, 0xfa, 0x7b, 0x59, 0x45, 0xe9, 0x52, 0xbb, 0x5c, 0x4e, 0x24, 0xc4, 0xf, 0xca, 0xc, 0x34, 0x43, 0x2, 0xa5, 0x20, 0x2b, 0x92, 0xa3, 0x51, 0x73, 0x82, 0x25, 0x50, 0x52, 0x9, 0xd8, 0x10, 0x78, 0x9f, 0x7a, 0x59, 0x6, 0x72, 0xec, 0xaa, 0xd8, 0x66, 0xac, 0xe7, 0x71, 0xa3, 0xf9, 0x9, 0x1a, 0x16, 0x95, 0xda, 0x17, 0xb3, 0x57, 0x62, 0x13, 0xa0, 0xdb, 0x5c, 0x46, 0x41, 0xe7, 0x80, 0x45, 0x82, 0x2a, 0xfd, 0x93, 0x9b, 0x62, 0x72, 0xd1, 0x2e, 0x5, 0xcd, 0xd1, 0x4, 0x6, 0x81, 0xaa, 0xee, 0x55, 0x52, 0x3b, 0xe6, 0x37, 0x1c, 0x53, 0xfc, 0xed, 0x13, 0x63, 0x8a, 0x94, 0x48, 0xc0, 0xe9, 0xaf, 0x8a, 0xef, 0x55, 0xac, 0xaf, 0x72, 0x3d, 0x51, 0x3d, 0xab, 0x51, 0x38, 0xf6, 0x2e, 0x28, 0xfe, 0xb4, 0x89, 0xe7, 0x5b, 0xe0, 0x72, 0x41, 0x80, 0x51, 0xcd, 0xfd, 0xab, 0xc7, 0xce, 0xb0, 0xc9, 0x9f, 0x18, 0x1c, 0x6a, 0xd9, 0x5e, 0x7e, 0xff, 0x52, 0x26, 0xbe, 0x5c, 0x4f, 0x4e, 0xde, 0xe7, 0xa8, 0xc4, 0xa0, 0x50, 0x2, 0x41, 0xed, 0xbc, 0x36, 0x3c, 0xb4, 0xc3, 0xac, 0x12, 0xdd, 0x4, 0x6e, 0xf0, 0xc8, 0x40, 0x93, 0x37, 0x40, 0xf4, 0x8c, 0x63, 0xde, 0x39, 0xc0, 0x82, 0xff, 0x43, 0x74, 0xc2, 0xd8, 0x45, 0x3f, 0x2b, 0x81, 0x3f, 0x39, 0x7b, 0x82, 0x2e, 0x90, 0xfd, 0x59, 0xb4, 0x48, 0x26, 0x2c, 0x0, 0xfd, 0xca, 0xe7, 0x3b, 0xcf, 0x90, 0xca, 0xe1, 0x64, 0xba, 0xe3, 0x30, 0x41, 0xcb, 0x80, 0x9e, 0x7c, 0xaf, 0xcf, 0xdd, 0x65, 0x80, 0x65, 0xb8, 0x4b, 0x7c, 0x37, 0xc, 0xe3, 0xe0, 0x8d, 0x50, 0x5f, 0x7a, 0x2b, 0xa7, 0x83, 0xa6, 0x66, 0xef, 0x74, 0xd8, 0x74, 0x33, 0x36, 0xfa, 0x4d, 0xf4, 0xe2, 0xa, 0x1f, 0x8d, 0x58, 0xcd, 0xb, 0xe, 0xff, 0x66, 0xfa, 0x77, 0x80, 0x3f, 0x42, 0x16, 0x9f, 0x51, 0x10, 0x9a, 0x4c, 0xcf, 0xd0, 0x8, 0xf3, 0x6e, 0x23, 0xed, 0xba, 0xaa, 0x6a, 0xbf, 0x53, 0xb8, 0x22, 0xc9, 0xef, 0x35, 0x6b, 0x79, 0x2, 0x7c, 0xf2, 0x8d, 0xf9, 0xe5, 0xd5, 0xd7, 0xca, 0x36, 0xa, 0xeb, 0x40, 0x7c, 0xf0, 0x2c, 0xa2, 0x68, 0x9f, 0x81, 0x31, 0xc7, 0x8c, 0xe6, 0xde, 0x7c, 0x5d, 0x8a, 0x2d, 0xc6, 0x5a, 0x91, 0xdf, 0x7a, 0xca, 0x77, 0x87, 0xec, 0xd5, 0x14, 0x5c, 0x5c, 0x79, 0x1b, 0x74, 0x28, 0xf3, 0xf9, 0xcb, 0xb2, 0x2f, 0x58, 0x4e, 0xb5, 0x64, 0xaf, 0x89, 0x26, 0x3f, 0x57, 0x50, 0xcb, 0x37, 0xc8, 0x15, 0x1f, 0x20, 0x5b, 0x2f, 0xca, 0x7d, 0xf7, 0x46, 0x22, 0x6d, 0x5a, 0xfe, 0x10, 0x17, 0x7c, 0x8b, 0xc4, 0x56, 0x45, 0x2e, 0xa6, 0x5d, 0x44, 0x9e, 0x19, 0xb4, 0x25, 0x3d, 0x66, 0x25, 0xd5, 0xc3, 0x34, 0x9f, 0x3e, 0xc3, 0xbe, 0x55, 0x4d, 0x41, 0x58, 0xdf, 0x21, 0x9d, 0xe2, 0x26, 0xaf, 0x37, 0x9a, 0x42, 0x2a, 0x8d, 0xac, 0x91, 0xb9, 0x7c, 0x64, 0xe1, 0x9c, 0x12, 0x1, 0x41, 0xd8, 0x6, 0x76, 0x7f, 0x7e, 0xe9, 0x31, 0xd8, 0x8e, 0x29, 0x3e, 0xe8, 0xae, 0x1e, 0xfd, 0x27, 0x66, 0xee, 0x83, 0x17, 0x4d, 0xe1, 0x9b, 0xb6, 0x45, 0xee, 0x34, 0x55, 0x13, 0x3b, 0x81, 0xe2, 0x27, 0xa, 0xc1, 0xc7, 0xcc, 0xeb, 0x3, 0x7a, 0x50, 0xa5, 0xcc, 0xd5, 0x40, 0xf0, 0xa, 0xbe, 0x27, 0xf0, 0x5b, 0xbc, 0x29, 0xa2, 0xf1, 0x5, 0x42, 0xca, 0xa, 0xe1, 0x30, 0xd2, 0xb2, 0xa1, 0x46, 0x4d, 0xb0, 0x3c, 0xb, 0x25, 0x10, 0xa9, 0xe7, 0xfb, 0x98, 0xab, 0x24, 0xfd, 0x39, 0x1c, 0xba, 0xe0, 0xa1, 0x12, 0xa6, 0x6e, 0xac, 0x5, 0x30, 0x41, 0x27, 0xd1, 0x54, 0x5b, 0xe6, 0x63, 0x8b, 0x6d, 0x35, 0x60, 0x68, 0x77, 0x71, 0x9c, 0x3c, 0xd7, 0x82, 0xfa, 0xe3, 0xfa, 0xad, 0x1b, 0x89, 0xeb, 0x60, 0x37, 0x50, 0xc7, 0xb5, 0xc3, 0xce, 0x84, 0xf9, 0x3f, 0xac, 0x14, 0x73, 0x46, 0x35, 0xc, 0x75, 0xc, 0xf2, 0xca, 0x7e, 0xf9, 0x9, 0x9d, 0x67, 0x25, 0xbd, 0x31, 0x17, 0x2c, 0x37, 0xfa, 0xe6, 0xe, 0x7, 0xf3, 0x35, 0x72, 0xcb, 0x84, 0x3e, 0x67, 0xe8, 0x66, 0x2d, 0xd, 0xd5, 0x5e, 0x42, 0x4a, 0xfa, 0x9b, 0x1d, 0x57, 0xcb, 0xf9, 0xdd, 0xcd, 0xe4, 0x47, 0xa3, 0xb8, 0xb6, 0x4, 0xef, 0xa2, 0x53, 0xeb, 0xb2, 0xce, 0xbe, 0x1, 0x52, 0x1f, 0x3, 0x53, 0xc5, 0x21, 0xf4, 0x57, 0xf4, 0x51, 0xcd, 0x93, 0x34, 0x6d, 0x81, 0x5d, 0x6b, 0xcb, 0xa8, 0x7b, 0x3d, 0x2f, 0x96, 0xa2, 0x2e, 0xd1, 0x7c, 0x17, 0xb9, 0xb, 0xe3, 0xdd, 0xf7, 0xe0, 0x48, 0x38, 0xc4, 0xf7, 0x80, 0xbe, 0x2c, 0x96, 0xb7, 0x81, 0x55, 0x8b, 0x4a, 0x49, 0x99, 0xb3, 0xad, 0xba, 0xac, 0xa1, 0x22, 0x9f, 0x22, 0xff, 0x63, 0x7c, 0xfc, 0x6, 0x8c, 0xe8, 0x80, 0x2f, 0x86, 0x84, 0xaa, 0xc3, 0x2a, 0xe3, 0x2b, 0xd0, 0x9c, 0xd5, 0xc1, 0xd7, 0x70, 0x90, 0xc, 0xc7, 0xc5, 0xfe, 0x8d, 0xf4, 0x1e, 0x81, 0x10, 0xfa, 0xad, 0x78, 0x2c, 0x15, 0xc3, 0xcd, 0x63, 0x7b, 0xa6, 0x19, 0xa0, 0x3, 0x7d, 0x73, 0x78, 0xc7, 0x2c, 0xb0, 0xc9, 0x5a, 0x35, 0xa9, 0x10, 0x9b, 0xe1, 0x1f, 0x8c, 0x4b, 0xf0, 0xd3, 0xbb, 0x80, 0x94, 0x9a, 0x15, 0xc6, 0x4a, 0xd, 0x6f, 0x52, 0xa9, 0xb5, 0x2a, 0x52, 0x1d, 0x6, 0xdc, 0x74, 0x9c, 0xd0, 0xe5, 0x53, 0x41, 0x8e, 0x12, 0x7f, 0xb5, 0x19, 0xbd, 0xa4, 0x1, 0xf5, 0x9e, 0x5a, 0xe5, 0x17, 0xcb, 0xc2, 0xf5, 0x38, 0xb6, 0xc3, 0x2f, 0x9c, 0xe5, 0xc3, 0x40, 0x88, 0xcf, 0xff, 0xe0, 0x3f, 0xdc, 0x7d, 0x36, 0xa7, 0xa9, 0x12, 0xed, 0xe8, 0x25, 0x4b, 0x7e, 0xa4, 0x6f, 0x12, 0x62, 0x97, 0x3b, 0xe5, 0x64, 0x8, 0x9c, 0x44, 0x82, 0x54, 0x37, 0xd8, 0xdb, 0xa9, 0x8b, 0xe0, 0x4c, 0xf7, 0xf6, 0xab, 0x5d, 0x3, 0xc5, 0xc1, 0xa, 0xb5, 0x15, 0x57, 0xf3, 0x31, 0xd0, 0xb1, 0xb9, 0x19, 0xb9, 0x64, 0x3e, 0xfa, 0xd7, 0x9, 0x8, 0xd, 0x2f, 0xf4, 0x6b, 0xe8, 0x3e, 0x8, 0x15, 0x51, 0xf6, 0x4e, 0xcd, 0x82, 0x6d, 0xb0, 0x94, 0x69, 0x17, 0x9f, 0xf4, 0xb0, 0x68, 0xcc, 0xa1, 0x72, 0xd1, 0xe1, 0x67, 0x50, 0xbd, 0x6d, 0x4c, 0x80, 0x51, 0x46, 0xdc, 0x2, 0x21, 0xa5, 0x55, 0xc8, 0x19, 0x31, 0xa6, 0x2, 0x6, 0xaf, 0x7c, 0xb4, 0x85, 0xd2, 0xfb, 0x7f, 0xa9, 0xd7, 0xaa, 0xcb, 0xc3, 0xe3, 0x72, 0x9e, 0xb0, 0x99, 0x79, 0xd2, 0xe6, 0x83, 0xea, 0x3e, 0xd8, 0xad, 0x3b, 0x4b, 0xaa, 0xf4, 0xfe, 0x25, 0xf8, 0xb2, 0x27, 0x56, 0x87, 0x95, 0x56, 0x3d, 0x3f, 0x29, 0x2, 0xa9, 0x73, 0x75, 0xc5, 0x21, 0xba, 0x20, 0xf9, 0xc5, 0xe8, 0x60, 0xdf, 0xac, 0x83, 0xa0, 0xf0, 0xed, 0x34, 0x75, 0x88, 0xf2, 0x50, 0xa4, 0x4f, 0x1, 0xc9, 0x36, 0x11, 0x40, 0x5a, 0xeb, 0x4, 0xc6, 0xe7, 0x51, 0x53, 0xf0, 0xa6, 0xe0, 0x64, 0xe1, 0x9d, 0x89, 0x5d, 0xf7, 0x59, 0x6c, 0x6a, 0x48, 0xa0, 0xbb, 0x38, 0x4, 0xa7, 0x89, 0x37, 0xa4, 0x5b, 0xcd, 0x5, 0x48, 0x63, 0x14, 0xba, 0xf7, 0x26, 0x61, 0x34, 0x9e, 0x8e, 0xb5, 0x16, 0xfc, 0xfb, 0xaf, 0xfb, 0x31, 0x63, 0x97, 0x16, 0xc5, 0xb8, 0x8c, 0xaf, 0x42, 0x55, 0xe2, 0xe, 0xe9, 0xa, 0x6e, 0xf4, 0x2, 0xe7, 0xa3, 0x9c, 0x5c, 0xcd, 0xc5, 0xb1, 0x96, 0xa9, 0x9c, 0x54, 0x55, 0x63, 0x9e, 0x9e, 0xcb, 0x78, 0x8f, 0x94, 0xab, 0xd7, 0xa7, 0x11, 0x83, 0x3b, 0x92, 0xdb, 0x9f, 0xd5, 0x6b, 0x64, 0x12, 0xbf, 0x84, 0xc6, 0xbe, 0xe9, 0x50, 0x56, 0x82, 0xea, 0x30, 0xc, 0xee, 0xda, 0x49, 0x6e, 0xf0, 0x6c, 0xc4, 0x77, 0xc2, 0x72, 0x31, 0x8f, 0x98, 0x83, 0x21, 0x27, 0x94, 0xe9, 0xad, 0x88, 0x17, 0x7b, 0x65, 0xce, 0xcc, 0x1b, 0xa8, 0x47, 0x4d, 0x3d, 0xe7, 0x65, 0x6b, 0x61, 0xa3, 0xb8, 0x32, 0x24, 0x5, 0x78, 0xa4, 0xff, 0x70, 0x4c, 0xaa, 0x65, 0xe0, 0x1a, 0x29, 0xf3, 0x65, 0xc1, 0xab, 0xb1, 0xdf, 0x23, 0xd6, 0x1a, 0xd4, 0x1c, 0x8, 0xb0, 0x92, 0xce, 0x87, 0xb, 0xa1, 0x10, 0x38, 0x57, 0xda, 0x37, 0xd8, 0xf5, 0x64, 0x7a, 0x5d, 0x5a, 0xda, 0x7b, 0xb1, 0xd9, 0x80, 0x4c, 0x54, 0x7c, 0x18, 0x7b, 0xd1, 0x76, 0x72, 0x58, 0x29, 0x25, 0x14, 0x49, 0x1c, 0xec, 0x97, 0xba, 0x41, 0xf4, 0x8c, 0x6b, 0x58, 0x1f, 0xe8, 0xe7, 0x45, 0x20, 0xd0, 0xf0, 0xf6, 0xb0, 0xe4, 0x4c, 0x99, 0x20, 0x29, 0xf, 0x68, 0x68, 0x4d, 0x16, 0x92, 0x53, 0x8, 0x75, 0x40, 0xeb, 0xe7, 0x33, 0xae, 0x24, 0x65, 0x25, 0x4b, 0xa0, 0x4b, 0xeb, 0x70, 0x3f, 0x3a, 0x30, 0x9b, 0xe1, 0x4b, 0x4f, 0x22, 0xea, 0x63, 0xaa, 0x2d, 0xe8, 0xe6, 0x74, 0xd2, 0xad, 0x44, 0x6f, 0x35, 0x6d, 0x1c, 0xfe, 0x12, 0x7, 0xa5, 0xed, 0x7c, 0x2d, 0x56, 0x5c, 0xcd, 0x5c, 0xc1, 0xef, 0xe, 0xb1, 0xe7, 0x91, 0x9c, 0x26, 0xe9, 0x2b, 0x85, 0x1f, 0x74, 0x78, 0xc8, 0x3d, 0xe6, 0xcd, 0x21, 0xa3, 0x54, 0x7c, 0xd4, 0x46, 0x4a, 0x6b, 0x6b, 0x4d, 0xa6, 0xa8, 0xd8, 0xf7, 0x36, 0xd1, 0x6d, 0x81, 0x80, 0x63, 0xd1, 0xfb, 0x95, 0xa8, 0xd6, 0xa4, 0x69, 0x11, 0xfc, 0x56, 0x4a, 0xa5, 0xcf, 0xb1, 0xcf, 0x76, 0xef, 0x9, 0xd0, 0xc1, 0x4, 0x64, 0x8f, 0x92, 0xdb, 0x9b, 0x28, 0x81, 0x6f, 0x56, 0xa, 0x24, 0x93, 0x59, 0x23, 0xa9, 0x45, 0xa1, 0xfb, 0x52, 0xad, 0x9f, 0xac, 0x6e, 0xa2, 0xe6, 0x40, 0xa6, 0x4f, 0x79, 0xf2, 0x56, 0x93, 0x39, 0x8b, 0xa, 0xe, 0x56, 0x75, 0x18, 0xd9, 0x50, 0x71, 0x4a, 0x8a, 0xaf, 0x34, 0x3a, 0x68, 0xa4, 0xeb, 0x1e, 0xe1, 0xf5, 0x18, 0xac, 0xbe, 0x99, 0xe0, 0x50, 0x41, 0xca, 0x50, 0x5a, 0xd5, 0x9, 0xf6, 0xeb, 0xcc, 0x68, 0xc8, 0x4d, 0x85, 0xdc, 0x17, 0xe6, 0xf, 0x2, 0x40, 0xec, 0x84, 0x8a, 0x84, 0x2f, 0x4a, 0x1a, 0xbf, 0x11, 0x37, 0x1f, 0x46, 0xce, 0x69, 0xd5, 0xb5, 0x35, 0xfa, 0xb5, 0x63, 0x45, 0x23, 0xe3, 0x59, 0xae, 0x14, 0xdd, 0x7, 0x74, 0x9f, 0xbc, 0x63, 0x90, 0xee, 0xb9, 0xe5, 0x33, 0xf, 0xc0, 0x79, 0x26, 0xc9, 0x71, 0xc7, 0x19, 0xcd, 0x2, 0xaa, 0x56, 0x50, 0x48, 0xcd, 0xa7, 0xe5, 0x34, 0x36, 0x5a, 0x3f, 0x39, 0x55, 0x5f, 0x25, 0xbe, 0xc8, 0x47, 0xc0, 0xfe, 0x5a, 0x76, 0xef, 0x68, 0xf0, 0x38, 0xff, 0x55, 0x2d, 0xa2, 0x72, 0x25, 0x81, 0xcc, 0x14, 0xec, 0xed, 0xa1, 0x29, 0x79, 0x42, 0xa1, 0xa6, 0x7d, 0x5, 0x1, 0x81, 0x57, 0x47, 0xc6, 0x15, 0x17, 0xa9, 0xac, 0x87, 0x6d, 0xb6, 0x62, 0x64, 0x1f, 0x75, 0xa, 0x91, 0x7e, 0xdf, 0xd8, 0xea, 0x19, 0x9d, 0x27, 0xe5, 0xd5, 0x68, 0x55, 0xe5, 0x20, 0x7, 0x91, 0xcd, 0x40, 0x4d, 0x15, 0xb6, 0xef, 0x6f, 0x57, 0x71, 0x23, 0x4b, 0x9, 0x2, 0xc9, 0xdb, 0x5b, 0x3, 0x3f, 0x26, 0x3, 0x59, 0xf1, 0xa5, 0x2e, 0x66, 0x46, 0xdb, 0xde, 0x9e, 0x4f, 0x98, 0x76, 0xa7, 0xbf, 0x2c, 0x5f, 0xd7, 0xba, 0x2, 0x8b, 0xaa, 0x30, 0x6f, 0xf9, 0xd4, 0x28, 0x7d, 0xf8, 0x8a, 0xa0, 0x55, 0xc8, 0x33, 0xed, 0x8a, 0xc6, 0xa5, 0x6d, 0x2c, 0x83, 0xad, 0x69, 0xad, 0x3f, 0xd6, 0xff, 0xa9, 0x6a, 0xb7, 0x17, 0x44, 0x40, 0x35, 0xd3, 0xb8, 0xda, 0xe9, 0xd2, 0x6d, 0x47, 0x57, 0x67, 0xca, 0xd4, 0x52, 0xb6, 0x7, 0xb3, 0xec, 0xa6, 0xc5, 0x73, 0xc3, 0x85, 0x30, 0xdb, 0x7, 0x19, 0x68, 0xb7, 0xe1, 0xdc, 0x26, 0x5, 0x88, 0x27, 0xc5, 0x7a, 0xd8, 0x4a, 0x14, 0xb4, 0x95, 0xfe, 0x8, 0x24, 0x19, 0x25, 0x5c, 0x49, 0x5c, 0x5e, 0x13, 0xf5, 0xbc, 0x34, 0xd9, 0x6c, 0xb4, 0x98, 0x37, 0x8c, 0xc1, 0x6d, 0xbf, 0x66, 0x83, 0xd5, 0x48, 0x36, 0xe1, 0x2d, 0x44, 0xd7, 0x69, 0x56, 0xa6, 0xb0, 0xce, 0x78, 0x8a, 0xf5, 0x28, 0x2b, 0x9f, 0x6, 0xb5, 0xba, 0xd3, 0x3, 0x47, 0xa1, 0xd5, 0x37, 0xef, 0x86, 0x4b, 0xb0, 0xc1, 0x49, 0x61, 0x76, 0xb1, 0xb1, 0x1, 0x18, 0xd0, 0x2a, 0x56, 0x40, 0x76, 0x9, 0xc0, 0x20, 0x8e, 0x86, 0xb, 0x86, 0xa4, 0x7c, 0x82, 0xb6, 0xfd, 0xe7, 0x6c, 0xec, 0x5a, 0xa7, 0xc, 0xf5, 0x8b, 0x4b, 0x11, 0xd, 0x67, 0xe7, 0xe, 0x7b, 0x37, 0xdf, 0xe3, 0xa1, 0xd5, 0x30, 0x18, 0x31, 0x11, 0xe2, 0xac, 0x6b, 0x30, 0x73, 0x6b, 0xe4, 0xff, 0xd6, 0xdb, 0xae, 0xc5, 0xdc, 0xbb, 0x71, 0x94, 0xb9, 0xf0, 0xcc, 0x73, 0x3f, 0xa, 0x3a}, - output224: []byte{0x93, 0x43, 0x6c, 0xf5, 0x50, 0x14, 0xb5, 0x33, 0xda, 0x3f, 0x89, 0xb, 0xd3, 0x18, 0x79, 0xb4, 0xdc, 0xdd, 0x88, 0xfb, 0xd8, 0x3, 0x43, 0xb6, 0x24, 0x8c, 0x8d, 0x7c}, - output256: []byte{0x89, 0xd2, 0x23, 0x1f, 0xc6, 0x58, 0xe2, 0x8b, 0xe2, 0xa1, 0xca, 0x23, 0x82, 0x18, 0x71, 0x37, 0x47, 0x9e, 0x38, 0x34, 0xb4, 0x98, 0xd8, 0xe0, 0x70, 0x71, 0x15, 0x15, 0xef, 0x67, 0xb, 0x4d}, - output384: []byte{0xe7, 0x3f, 0x2b, 0xa0, 0xdd, 0x0, 0x57, 0xb8, 0xe3, 0xa2, 0x9f, 0x8d, 0xc4, 0x3f, 0x52, 0x5c, 0x36, 0xa2, 0xe0, 0x3e, 0xc7, 0x71, 0xdb, 0x1d, 0x76, 0xd8, 0x7d, 0x86, 0xd5, 0x7c, 0x94, 0x80, 0x84, 0xae, 0xf3, 0x6d, 0x92, 0x31, 0xc7, 0xd0, 0x99, 0xb7, 0xb4, 0x2d, 0xf4, 0x56, 0x8d, 0x5b}, - output512: []byte{0x93, 0x61, 0x91, 0xdc, 0xb9, 0x6f, 0x5a, 0x3a, 0x3a, 0xc1, 0x6c, 0xd8, 0x17, 0x22, 0x38, 0xa5, 0x13, 0xcf, 0x1f, 0x9c, 0xc1, 0x96, 0x20, 0xbd, 0x7c, 0xcb, 0x7e, 0xb1, 0x13, 0x5a, 0x7a, 0xc5, 0x7f, 0xd2, 0xe7, 0x6b, 0xe8, 0x86, 0x65, 0x13, 0x60, 0x24, 0xc4, 0x8d, 0x87, 0x74, 0x5e, 0x76, 0xce, 0xe0, 0x9e, 0xef, 0xc3, 0xb3, 0x52, 0xac, 0xb7, 0xc7, 0xf2, 0x7d, 0x17, 0xc8, 0x2e, 0x15}}, - testcase{ - msg: []byte{0xe, 0xbf, 0x64, 0xac, 0x1, 0x7f, 0xeb, 0xdc, 0xa4, 0xf, 0xf8, 0x5f, 0xd4, 0xae, 0xb8, 0xf1, 0xa8, 0x27, 0x56, 0x1c, 0x15, 0xf, 0x74, 0xcd, 0x5e, 0x86, 0x48, 0x57, 0xfb, 0xba, 0x9c, 0x8, 0xa4, 0x6e, 0xfb, 0x9f, 0xf7, 0xa1, 0x69, 0x19, 0x61, 0x8c, 0x9f, 0xb0, 0x6b, 0xf8, 0xfe, 0x3f, 0x8, 0x59, 0x77, 0x4d, 0xa6, 0xc3, 0x8c, 0x5a, 0xc, 0x54, 0xd4, 0x40, 0x75, 0xd1, 0xba, 0xf6, 0x48, 0x2b, 0x77, 0x5, 0xc8, 0xe1, 0xa8, 0x6e, 0x79, 0xb0, 0xfb, 0xf0, 0x32, 0x82, 0x46, 0xb5, 0xe6, 0xbe, 0x1, 0x3f, 0x93, 0x4d, 0x4e, 0xcc, 0x34, 0x80, 0x8a, 0x36, 0x39, 0xc4, 0x94, 0x64, 0x30, 0x9d, 0xf5, 0xad, 0x25, 0xb, 0xf4, 0x52, 0x1e, 0x41, 0xb4, 0xcd, 0xe5, 0x63, 0x56, 0x6b, 0x86, 0x25, 0x7, 0x6a, 0xd7, 0xe2, 0x60, 0x1, 0x8e, 0xee, 0x2f, 0x32, 0x52, 0xd1, 0x5f, 0x36, 0xbd, 0xbb, 0xce, 0x3c, 0x74, 0x75, 0x8c, 0x68, 0xa0, 0xe7, 0x2d, 0x83, 0xa3, 0x7d, 0xb4, 0xd2, 0x2, 0x2a, 0x80, 0xa4, 0xf6, 0xb1, 0x6f, 0x45, 0x15, 0x5, 0x3e, 0x1f, 0xe3, 0x98, 0xcc, 0x6a, 0x74, 0xd3, 0x43, 0xd4, 0xcb, 0xb4, 0x3, 0x59, 0x7a, 0xe6, 0x85, 0x33, 0xe1, 0x8e, 0xf8, 0x93, 0xf7, 0x56, 0xf6, 0xf5, 0x54, 0xf9, 0x8b, 0xcc, 0xbc, 0x84, 0x70, 0x2d, 0x19, 0xf8, 0x75, 0xd3, 0x47, 0xc3, 0x45, 0xb0, 0x9e, 0xdf, 0xcb, 0x1c, 0x71, 0xbd, 0x69, 0x55, 0xc5, 0x17, 0x8d, 0xfc, 0xb0, 0x73, 0x76, 0x72, 0x8c, 0xfc, 0x3a, 0xb9, 0x56, 0x5c, 0xa, 0x1a, 0x8d, 0xca, 0x78, 0x22, 0x10, 0x28, 0xb0, 0xb, 0x51, 0xb1, 0x75, 0xa2, 0xda, 0x2c, 0xc0, 0xa9, 0xc, 0x33, 0xc1, 0x69, 0xea, 0x8a, 0x1a, 0x2e, 0x37, 0x5c, 0x8, 0x7a, 0xc3, 0x65, 0x7d, 0x28, 0xac, 0x48, 0x1d, 0x5b, 0x5c, 0x22, 0x5a, 0xef, 0xa8, 0x59, 0x19, 0xfb, 0x86, 0x28, 0xf3, 0x2f, 0x42, 0xf1, 0xfc, 0x8, 0x6, 0xa2, 0x50, 0x14, 0x3c, 0x8, 0x43, 0x22, 0xfe, 0x9e, 0x30, 0xbc, 0xc8, 0xb8, 0x9f, 0x3d, 0xa7, 0x34, 0x69, 0xce, 0xb9, 0x35, 0xee, 0x25, 0x88, 0x7d, 0x84, 0x33, 0x21, 0xcc, 0x8a, 0xbb, 0x3c, 0x75, 0xe1, 0x5f, 0x48, 0x94, 0xcb, 0xb5, 0x73, 0x17, 0x82, 0x37, 0x2a, 0x56, 0x31, 0x97, 0x9b, 0xbe, 0x6a, 0xea, 0xcd, 0xfb, 0x71, 0x1a, 0x84, 0xf8, 0x3b, 0xb8, 0x9e, 0xf, 0x92, 0xb8, 0x8c, 0x5e, 0xe8, 0x3e, 0x4f, 0x9a, 0x3c, 0x4f, 0x80, 0x62, 0x4a, 0x17, 0xed, 0x55, 0x49, 0xb7, 0x7e, 0xd7, 0xd9, 0x39, 0xc3, 0x68, 0xcd, 0x9a, 0x92, 0xea, 0xae, 0x59, 0x51, 0x5, 0xde, 0x7e, 0x28, 0x89, 0xca, 0xd7, 0x1d, 0x1, 0x20, 0x15, 0x80, 0x3, 0x8f, 0xcf, 0x4a, 0xb4, 0xd2, 0x85, 0xa1, 0x3b, 0xef, 0xaa, 0xa1, 0x4f, 0xac, 0xfe, 0x50, 0x99, 0xa8, 0x3f, 0x9e, 0x71, 0xd5, 0x12, 0x51, 0x9d, 0x5, 0x5f, 0x44, 0xf7, 0x57, 0x75, 0x7b, 0xce, 0xbb, 0xd2, 0x73, 0x4c, 0xb9, 0x1c, 0x5c, 0x4c, 0xe7, 0xb4, 0x11, 0xd1, 0xe8, 0x3b, 0x42, 0x68, 0x9f, 0xdf, 0x8a, 0x69, 0xe6, 0x3d, 0xdf, 0xd2, 0x55, 0xb9, 0x77, 0xd7, 0x43, 0x5b, 0xee, 0xb5, 0xde, 0xbb, 0xba, 0x7a, 0x47, 0xb1, 0x9c, 0xda, 0xb3, 0xf1, 0xc4, 0xe, 0x79, 0xb9, 0x26, 0xa4, 0x81, 0xa1, 0x62, 0x9a, 0x81, 0x85, 0x25, 0xc2, 0xa1, 0x98, 0x98, 0x3f, 0x23, 0xf0, 0xda, 0x5d, 0xa8, 0xb9, 0x96, 0x33, 0x68, 0x92, 0x92, 0x33, 0x2b, 0xcc, 0x2a, 0x4a, 0xd4, 0x97, 0x69, 0xb3, 0xe4, 0x48, 0xf8, 0xce, 0xdb, 0x87, 0xc1, 0xde, 0x2e, 0xf5, 0xd0, 0x4e, 0x1c, 0x3a, 0x81, 0x16, 0xc3, 0x32, 0x8f, 0x6b, 0x19, 0xb5, 0x9c, 0x31, 0x8e, 0x18, 0xf8, 0xdb, 0x29, 0x87, 0x5c, 0x22, 0xa0, 0xa0, 0xc8, 0xea, 0x61, 0x5a, 0x59, 0x34, 0x39, 0xf7, 0xb9, 0xa, 0xa2, 0xad, 0x9c, 0x16, 0xca, 0x57, 0x30, 0x40, 0xa8, 0x19, 0xa, 0x83, 0x43, 0x70, 0x37, 0x85, 0x54, 0xbd, 0xa9, 0xda, 0x94, 0x86, 0xaa, 0x3c, 0xe3, 0xf1, 0xb0, 0x1d, 0xba, 0x14, 0xb0, 0x32, 0xb3, 0xc3, 0x34, 0xf7, 0xa1, 0xe9, 0x61, 0x42, 0x63, 0x2, 0xed, 0x2d, 0x38, 0xc3, 0x4f, 0x61, 0xd7, 0xb4, 0xd1, 0x82, 0xc0, 0xca, 0x30, 0x3c, 0x2f, 0x37, 0x9e, 0x74, 0xea, 0xf6, 0x5a, 0x48, 0xd3, 0xd8, 0xa9, 0x56, 0x16, 0xb2, 0xab, 0xa5, 0xc8, 0x8d, 0xbf, 0x62, 0x84, 0xc5, 0xcd, 0x68, 0xd9, 0x2, 0xe3, 0x95, 0x8a, 0x7b, 0x95, 0x29, 0xf4, 0x9d, 0x38, 0x9, 0x1b, 0xac, 0x28, 0x87, 0x34, 0x24, 0x7f, 0xce, 0x88, 0x6d, 0x49, 0xbc, 0xe0, 0xa, 0xb9, 0x8b, 0x1b, 0x96, 0x2a, 0x8d, 0xa8, 0xb4, 0x71, 0x6, 0x44, 0xe9, 0xda, 0x41, 0x85, 0x29, 0xe7, 0x9a, 0x27, 0x40, 0x8b, 0x52, 0xeb, 0x65, 0x5f, 0xde, 0x2, 0x5a, 0x12, 0x9a, 0x38, 0xee, 0xeb, 0xa9, 0x36, 0x65, 0x7f, 0x72, 0x5f, 0xe, 0xc6, 0x68, 0x38, 0xb, 0x9d, 0xd5, 0xc, 0x7, 0x59, 0xac, 0x15, 0xf, 0x81, 0xb6, 0x96, 0xb8, 0x86, 0xe8, 0x6a, 0x54, 0x47, 0xcc, 0xdc, 0xb3, 0xfb, 0xec, 0x8, 0xc7, 0x94, 0x71, 0xdc, 0x31, 0x11, 0x4, 0x2f, 0xcf, 0xff, 0xad, 0xc1, 0xa9, 0x73, 0x34, 0xd, 0xd6, 0x86, 0x10, 0x63, 0x1f, 0xdd, 0xa6, 0xad, 0x25, 0x14, 0x8c, 0x2d, 0xb, 0x48, 0xad, 0xa2, 0x4e, 0x6b, 0x2d, 0x42, 0xea, 0x75, 0x10, 0x99, 0x1c, 0x4, 0x55, 0xba, 0x1b, 0x7f, 0x39, 0x3c, 0xa1, 0xfa, 0x58, 0x1, 0xf1, 0x82, 0xf8, 0x91, 0x17, 0x88, 0x54, 0x55, 0xdb, 0xf8, 0x8f, 0x63, 0xce, 0xb, 0x77, 0x66, 0x9b, 0xa9, 0x65, 0xb7, 0x3a, 0x34, 0x4d, 0x3c, 0x4c, 0x78, 0x7e, 0x3b, 0x4a, 0xaf, 0x58, 0xc5, 0x6f, 0xb2, 0x58, 0x99, 0x67, 0xc7, 0x19, 0x69, 0xb1, 0xfe, 0x92, 0xc5, 0xe7, 0xd9, 0x10, 0x94, 0xdb, 0xa8, 0x4f, 0x47, 0x4, 0x37, 0x33, 0x9c, 0x1d, 0xc6, 0x91, 0x8d, 0xd5, 0xfb, 0x83, 0x5c, 0xbe, 0x69, 0x75, 0x3, 0x63, 0x69, 0x1b, 0xc, 0xee, 0x7b, 0x80, 0xf0, 0xd0, 0xae, 0xb3, 0x1d, 0xdb, 0xda, 0xc5, 0x2f, 0x90, 0x4a, 0x3a, 0x91, 0x5, 0x1b, 0x54, 0xad, 0xf7, 0x5b, 0xd, 0x19, 0x57, 0x63, 0xd2, 0x9f, 0xd1, 0xb8, 0x82, 0x44, 0xf6, 0x1d, 0x6a, 0x30, 0x48, 0x7, 0xb6, 0x46, 0x32, 0x6e, 0x76, 0xfb, 0x88, 0xd, 0x1d, 0xf3, 0x72, 0x81, 0xa1, 0x1c, 0xed, 0x52, 0xd5, 0xb5, 0x87, 0x36, 0x68, 0x64, 0x2c, 0x72, 0xcd, 0x7c, 0x70, 0xe3, 0x68, 0x25, 0xcc, 0x17, 0xda, 0x6e, 0x3, 0xc5, 0x77, 0xd1, 0x2f, 0x79, 0xcc, 0xef, 0xd6, 0xb7, 0xb7, 0x6c, 0x88, 0xb1, 0x9f, 0x76, 0x6, 0x53, 0x67, 0x93, 0xd8, 0xd3, 0x3f, 0x7e, 0xa, 0x59, 0x87, 0x69, 0x88, 0x3b, 0x41, 0x7c, 0x36, 0x62, 0xb6, 0x26, 0x70, 0x1, 0xbe, 0x7d, 0x9, 0x14, 0x56, 0x3b, 0x24, 0x2, 0x14, 0x93, 0x57, 0xd1, 0xc6, 0x46, 0x80, 0xda, 0x80, 0xb3, 0x22, 0x7, 0xa6, 0x76, 0x11, 0xed, 0xf0, 0xe8, 0xd9, 0xa7, 0x67, 0xe2, 0xbe, 0x2a, 0xbb, 0x21, 0x95, 0x6f, 0xc7, 0x64, 0x20, 0x9, 0x45, 0xe4, 0xbc, 0x58, 0x30, 0xac, 0xcc, 0xdc, 0x80, 0xde, 0x48, 0x50, 0x86, 0x51, 0x4c, 0x63, 0xda, 0x7f, 0x78, 0x5c, 0xba, 0xc, 0x1e, 0x9c, 0xe5, 0xb2, 0x49, 0xb5, 0x2e, 0x7e, 0xe5, 0x70, 0xd8, 0x65, 0x7c, 0x63, 0xc4, 0xfc, 0x90, 0x85, 0x6d, 0xfb, 0xbb, 0x24, 0xc8, 0xd2, 0xa7, 0x11, 0xcb, 0x3a, 0x9, 0x60, 0x68, 0x5e, 0xc5, 0x55, 0x40, 0xf6, 0xec, 0x26, 0x41, 0xa4, 0x29, 0xd3, 0xdc, 0x99, 0xd8, 0x2f, 0x26, 0xd2, 0xc7, 0xea, 0xcc, 0x61, 0x4f, 0xfe, 0x98, 0x81, 0x17, 0xd8, 0xf1, 0x3b, 0x74, 0x42, 0xa9, 0xae, 0x29, 0x29, 0xd3, 0xe1, 0xf6, 0x7b, 0x97, 0x4b, 0xb4, 0xa4, 0xaa, 0x96, 0x0, 0x15, 0xc9, 0x21, 0x6a, 0xfa, 0x84, 0x4a, 0x24, 0x30, 0x95, 0xf1, 0x67, 0xb1, 0x14, 0x70, 0xf, 0xb1, 0x12, 0x15, 0xeb, 0x54, 0x35, 0x7b, 0xcb, 0x1d, 0x47, 0x92, 0xa0, 0xb6, 0x76, 0xc7, 0x8, 0xe7, 0x10, 0x21, 0x1c, 0x3a, 0xf7, 0x3d, 0x61, 0xb8, 0x2f, 0x4d, 0x4, 0xbc, 0x40, 0xc8, 0x98, 0xce, 0x0, 0xa2, 0xd3, 0x4c, 0x77, 0xf5, 0xe2, 0x2d, 0xb7, 0x1f, 0x46, 0xc9, 0x39, 0xa0, 0xec, 0x9c, 0x37, 0xd1, 0x64, 0x7e, 0x23, 0xa0, 0xf4, 0x4c, 0xc2, 0x3d, 0x71, 0xa, 0x1d, 0xb2, 0xe, 0x38, 0xd0, 0x9, 0xc6, 0x58, 0x1, 0x92, 0x29, 0x5c, 0x40, 0xb4, 0x78, 0xa8, 0x5a, 0x9, 0x30, 0x18, 0x1d, 0x9, 0x62, 0xc3, 0xb1, 0x8b, 0x6a, 0xac, 0x7f, 0x5b, 0xe9, 0x96, 0x7, 0xad, 0xd2, 0x5b, 0xbc, 0x23, 0xa7, 0x53, 0xe, 0x7e, 0x58, 0xc9, 0x3f, 0x9f, 0xd4, 0xaf, 0xe5, 0x13, 0x3f, 0xd2, 0x28, 0xc6, 0xb4, 0xd9, 0xe4, 0x35, 0x38, 0xcd, 0x9d, 0xcb, 0xe7, 0x6c, 0x4d, 0x7d, 0xed, 0xf2, 0x27, 0x41, 0x83, 0x95, 0x58, 0xa6, 0xb5, 0x61, 0x84, 0x73, 0x27, 0xdf, 0x7c, 0xff, 0x1c, 0x17, 0xe0, 0x3e, 0xb0, 0xed, 0x9d, 0xd9, 0x21, 0x97, 0x49, 0x54, 0x63, 0x8c, 0xad, 0xbf, 0x64, 0x5a, 0x4b, 0xaa, 0x4a, 0x62, 0x77, 0x4b, 0xa6, 0x6e, 0x2e, 0x45, 0x8a, 0x1f, 0x7a, 0xc6, 0x7e, 0xc3, 0x94, 0x42, 0x93, 0x39, 0xc2, 0xf6, 0x20, 0xd4, 0x57, 0xf5, 0xdd, 0x6, 0xae, 0x55, 0x1b, 0x69, 0xba, 0xdd, 0xee, 0x99, 0xa6, 0xc9, 0x3e, 0xdc, 0x7b, 0xf7, 0xcd, 0x56, 0x89, 0x8c, 0xec, 0x4a, 0xb4, 0xe6, 0x33, 0x48, 0x9d, 0xd1, 0x93, 0x4b, 0x3e, 0xab, 0x68, 0x60, 0x1e, 0x35, 0x60, 0x9, 0x2c, 0xb9, 0xb1, 0xc6, 0x4b, 0x90, 0xc9, 0xfb, 0xb6, 0xf6, 0x2b, 0xe6, 0xb, 0xe, 0x22, 0x1f, 0x1f, 0x6e, 0x1d, 0x58, 0x44, 0x4b, 0x73, 0x1b, 0x30, 0xab, 0x4, 0xc4, 0x9, 0x88, 0x9, 0x3f, 0xbd, 0x39, 0x6e, 0x65, 0xba, 0x70, 0x3f, 0x52, 0xac, 0xe0, 0x69, 0x50, 0x35, 0xee, 0x78, 0xe7, 0xa4, 0x96, 0x9d, 0x3e, 0xb5, 0x83, 0x4c, 0x58, 0xef, 0x60, 0xfe, 0xe1, 0xde, 0xf, 0xe, 0x3, 0xe4, 0x20, 0x3f, 0xf5, 0xf, 0x95, 0x7e, 0xd6, 0x85, 0x13, 0xf9, 0x13, 0x4a, 0x43, 0x32, 0xb5, 0x60, 0x44, 0xee, 0x14, 0xce, 0x80, 0xea, 0xd7, 0xce, 0x53, 0x2a, 0xca, 0x58, 0xb1, 0xf9, 0x84, 0x23, 0xc3, 0xca, 0xbd, 0x99, 0x21, 0xf8, 0x3a, 0x81, 0xc7, 0x46, 0x7b, 0x3c, 0x6f, 0x6d, 0xe4, 0xb1, 0x2a, 0xd7, 0x41, 0xc7, 0x34, 0x5b, 0xd6, 0x45, 0x85, 0x4b, 0xbf, 0x85, 0x9d, 0x11, 0xc, 0x8d, 0x60, 0xf5, 0x3a, 0xfe, 0x65, 0xf6, 0xa8, 0xa0, 0x85, 0x6b, 0xbf, 0x78, 0x95, 0x4f, 0x8e, 0xcc, 0x83, 0x1f, 0xbb, 0x43, 0xf0, 0x30, 0x44, 0x9a, 0x9f, 0xe7, 0x2a, 0x3c, 0x86, 0xab, 0x79, 0x62, 0xac, 0xd2, 0x89, 0x75, 0x53, 0xc, 0xb5, 0x67, 0xce, 0xa7, 0x13, 0xbe, 0x76, 0xb2, 0x26, 0x2a, 0x70, 0x89, 0x6b, 0x8a, 0x3c, 0xac, 0x66, 0x77, 0x2c, 0x56, 0xa9, 0xed, 0x13, 0x9f, 0x3f, 0x43, 0x49, 0x89, 0x8a, 0xec, 0xcd, 0xeb, 0xd5, 0x62, 0x2f, 0x32, 0xa7, 0x5e, 0xbb, 0xc9, 0xfe, 0x20, 0x2f, 0xe5, 0x6c, 0x95, 0x73, 0x56, 0xd4, 0xa, 0xfe, 0xe4, 0x71, 0x8c, 0x52, 0xd3, 0xf, 0xbf, 0x68, 0x3c, 0xe1, 0x70, 0x56, 0xe6, 0x72, 0xf9, 0x9, 0x11, 0xc, 0x8, 0x7d, 0x36, 0x1c, 0x19, 0x6f, 0xe3, 0x3c, 0x6d, 0x80, 0xdc, 0x69, 0x25, 0x76, 0x9f, 0x6a, 0x93, 0xdd, 0x41, 0xb5, 0xbb, 0x5f, 0xea, 0x80, 0x6f, 0x3b, 0xf5, 0x6c, 0x50, 0xd6, 0x9b, 0x45, 0xa3, 0x71, 0xac, 0x5d, 0xcf, 0x5c, 0xf3, 0x56, 0xbc, 0x55, 0x2e, 0xc, 0xf8, 0x7e, 0x22, 0xaf, 0xf, 0x12, 0x1b, 0x21, 0x27, 0x8b, 0x6, 0x71, 0x38, 0xe2, 0xaf, 0xa0, 0x98, 0xe7, 0xed, 0xe1, 0xc0, 0xa8, 0xab, 0x29, 0xb6, 0xcc, 0xf6, 0xb8, 0x5d, 0x39, 0xad, 0xb9, 0xce, 0xdd, 0x1, 0x38, 0x86, 0xd2, 0xc2, 0x3c, 0x27, 0x3a, 0x21, 0x26, 0x7b, 0x2f, 0x2c, 0x22, 0xb5, 0xbf, 0x25, 0xd5, 0xa5, 0xcb, 0xd0, 0x83, 0x68, 0x4b, 0x45, 0x4a, 0xb5, 0xfb, 0x85, 0x4f, 0x90, 0xcb, 0x49, 0xb2, 0xf5, 0x37, 0x95, 0xbb, 0xfd, 0x46, 0x34, 0x8b, 0x30, 0x95, 0x83, 0x98, 0x34, 0x4f, 0x9c, 0x36, 0x20, 0x40, 0xe1, 0x41, 0x2f, 0x33, 0x1e, 0x2d, 0xd1, 0x67, 0x9f, 0x31, 0xad, 0xbc, 0xf8, 0xd4, 0xb, 0xd3, 0xbf, 0x70, 0x7a, 0x4f, 0x35, 0x58, 0x23, 0x9a, 0xb, 0x94, 0x88, 0xb3, 0xd6, 0xa2, 0x64, 0xe6, 0xda, 0x39, 0x11, 0xb0, 0xbe, 0x47, 0xdf, 0xf3, 0x25, 0x7b, 0x19, 0x31, 0x29, 0xdd, 0xa9, 0xf3, 0xc0, 0xd9, 0xad, 0xeb, 0x16, 0x1f, 0x84, 0x26, 0xcc, 0xd0, 0x1a, 0xd2, 0xd0, 0x85, 0x4f, 0x73, 0x19, 0xe1, 0x2d, 0xf8, 0x9d, 0xa8, 0x8c, 0x98, 0xfb, 0xfe, 0xa9, 0x6d, 0x1f, 0x40, 0xbd, 0x9, 0x8a, 0xa4, 0x6b, 0xeb, 0x47, 0x18, 0x34, 0xb0, 0x39, 0xd6, 0xf0, 0x1, 0xf8, 0x4, 0xed, 0x3d, 0xc4, 0x7c, 0xde, 0x1, 0xd5, 0xb5, 0x94, 0xd5, 0x65, 0xd9, 0x4f, 0x70, 0xba, 0x73, 0x87, 0x82, 0x2d, 0xbe, 0x8d, 0xe, 0x44, 0x64, 0x5a, 0x91, 0x4f, 0x25, 0xd1, 0xd1, 0x5f, 0x38, 0xeb, 0x4e, 0x5c, 0x9b, 0x4f, 0x48, 0xc6, 0x14, 0x6d, 0xbe, 0xff, 0x8d, 0x36, 0xc1, 0x7e, 0x5e, 0x57, 0xa3, 0xf0, 0x7e, 0x56, 0x1a, 0xf3, 0x90, 0xed, 0xfa, 0x4e, 0x2c, 0xfe, 0xca, 0x19, 0x72, 0x2a, 0x3b, 0xee, 0xea, 0x23, 0x78, 0x2c, 0xd7, 0xaf, 0x8a, 0x61, 0x76, 0x7b, 0x1, 0xf, 0x89, 0xa7, 0x8, 0x2e, 0x4, 0xe8, 0x7, 0xf5, 0xce, 0xc4, 0x9b, 0xf5, 0xac, 0x71, 0xdb, 0x3d, 0xfd, 0xc5, 0x66, 0x5c, 0xd1, 0xfa, 0x5b, 0x9e, 0xb0, 0xc3, 0xc7, 0x34, 0x3c, 0x67, 0x47, 0x30, 0xec, 0x65, 0xa, 0x13, 0xba, 0xe4, 0x12, 0x12, 0x6c, 0x68, 0xda, 0xf9, 0x17, 0x86, 0x2a, 0xdb, 0x4e, 0x22, 0x4, 0x61, 0xa6, 0xcd, 0xc, 0x75, 0x11, 0xf4, 0xf3, 0x1c, 0x47, 0xf8, 0xa4, 0x1a, 0xc5, 0x4f, 0xc0, 0xb3, 0x4f, 0x7, 0xdc, 0x15, 0x6, 0xe, 0x9a, 0x43, 0x85, 0x5d, 0xa0, 0xa1, 0x62, 0x43, 0x6b, 0x1d, 0x3a, 0x4b, 0x6d, 0x8e, 0xa8, 0x72, 0x29, 0xfa, 0xec, 0xbb, 0xd9, 0xa2, 0xf0, 0x79, 0x22, 0x66, 0xdd, 0x16, 0xe, 0xf, 0x86, 0x71, 0x69, 0x4, 0x11, 0xf8, 0xa9, 0xbc, 0x74, 0x29, 0xf8, 0xe0, 0xf4, 0xeb, 0x0, 0x98, 0xe3, 0x3f, 0x5, 0x32, 0x5, 0x7d, 0x1e, 0x5, 0xe6, 0xa7, 0x8f, 0xf4, 0x8a, 0x6b, 0xdf, 0x78, 0x17, 0x6f, 0xb4, 0x62, 0xe5, 0x6b, 0x30, 0x54, 0x76, 0xa7, 0x8f, 0x9, 0x97, 0x86, 0xa6, 0x79, 0x3d, 0x2f, 0xc3, 0xf4, 0xf7, 0x4d, 0xab, 0xd3, 0xa3, 0x4b, 0xc2, 0xe5, 0x2, 0x67, 0xf0, 0x61, 0x57, 0x49, 0x4b, 0x99, 0x66, 0xe1, 0xbf, 0x1f, 0x87, 0x8, 0xcb, 0xb7, 0x70, 0x58, 0xc, 0xbb, 0x24, 0x67, 0xfc, 0x1b, 0x35, 0x95, 0x34, 0x5a, 0x49, 0xa5, 0xd8, 0xec, 0x52, 0x8f, 0x3e, 0x2b, 0x3f, 0x91, 0xb0, 0x6e, 0x6, 0x93, 0xf8, 0x7f, 0xda, 0x3b, 0x68, 0xcf, 0x99, 0xdf, 0x5c, 0x47, 0xbb, 0x18, 0xb7, 0x67, 0xfb, 0xe7, 0x4e, 0xc0, 0xb6, 0x64, 0xac, 0xf, 0x1c, 0xc6, 0x59, 0x2f, 0x1, 0xa5, 0x65, 0x9a, 0x7f, 0x3b, 0x42, 0x93, 0xbf, 0xb8, 0x54, 0x1f, 0xa, 0x9e, 0x3f, 0x92, 0x3a, 0x54, 0x7d, 0xd1, 0xc7, 0x84, 0xed, 0x62, 0x4c, 0xd3, 0xa2, 0xc9, 0xd1, 0xb8, 0xc3, 0x8, 0xb3, 0x23, 0x6e, 0x41, 0x46, 0xc9, 0x3c, 0xdc, 0x36, 0xe1, 0x7d, 0xfe, 0xda, 0x5c, 0x12, 0x3e, 0x73, 0x5a, 0xd4, 0xfe, 0xaa, 0xdc, 0xaa, 0xbf, 0x95, 0x81, 0xbc, 0x10, 0x60, 0x72, 0x6f, 0x54, 0x5c, 0x30, 0x8e, 0x56, 0xc7, 0x31, 0x0, 0x93, 0xf7, 0x93, 0x8a, 0x20, 0x83, 0xdc, 0x46, 0x8b, 0xf5, 0xff, 0x3c, 0x84, 0xc2, 0x27, 0x1e, 0xc7, 0x53, 0x38, 0x38, 0xff, 0x15, 0xe6, 0xf7, 0xee, 0x8c, 0x71, 0x11, 0x5e, 0xa8, 0xe3, 0x42, 0xbc, 0x33, 0xad, 0x64, 0x46, 0x76, 0x40, 0xb1, 0x1e, 0xfe, 0x5f, 0x33, 0xce, 0xcd, 0xee, 0x30, 0x58, 0xe8, 0xc1, 0x7f, 0x8c, 0xa0, 0x48, 0x89, 0x18, 0x50, 0x6f, 0xe2, 0xfa, 0x10, 0xb9, 0x2b, 0x9f, 0xa8, 0x7d, 0xd7, 0x30, 0x53, 0x62, 0xd2, 0x4d, 0x4c, 0xe4, 0x54, 0xa7, 0x79, 0x61, 0x2b, 0x11, 0x2c, 0x7c, 0x7e, 0x6d, 0x4b, 0x63, 0x2a, 0x84, 0x75, 0xed, 0xad, 0xbe, 0xa1, 0x34, 0x86, 0xcf, 0xaf, 0x56, 0x47, 0xe4, 0xdf, 0x1f, 0xb1, 0x35, 0xae, 0x79, 0x3f, 0x8e, 0x6d, 0x23, 0x21, 0x6b, 0xa, 0xdf, 0x66, 0x4a, 0x14, 0x39, 0x7d, 0xae, 0x7, 0xe1, 0x33, 0xa1, 0xa5, 0x8e, 0x15, 0xb2, 0x5e, 0x90, 0x92, 0xb6, 0x1f, 0xad, 0x36, 0x19, 0xbd, 0x55, 0x18, 0x58, 0x14, 0x4b, 0x80, 0xd9, 0x7, 0x5d, 0x34, 0x12, 0x8c, 0x35, 0x16, 0x43, 0xf1, 0x1, 0xba, 0xdd, 0xfa, 0x99, 0xc, 0xe9, 0x10, 0xf2, 0xa8, 0xd7, 0x21, 0xb6, 0x4c, 0x49, 0x5a, 0x12, 0xf0, 0x7a, 0xf3, 0xd3, 0x2c, 0xed, 0xac, 0x92, 0xe2, 0xd, 0xd9, 0x63, 0x8c, 0xd, 0xb3, 0x6e, 0xb7, 0xb1, 0x28, 0x61, 0x38, 0xfe, 0x5, 0x6e, 0xae, 0x9d, 0x91, 0xc4, 0xa0, 0xab, 0x7d, 0xc5, 0x26, 0x7f, 0xb1, 0x6a, 0x41, 0xb7, 0x71, 0xeb, 0x1, 0xd5, 0x47, 0x1, 0xfb, 0x43, 0x57, 0x4, 0x82, 0x15, 0x7b, 0xe1, 0xc, 0x6f, 0xa9, 0xe4, 0xd8, 0x66, 0xb8, 0xb5, 0xd6, 0x50, 0xee, 0x6f, 0x3f, 0xe1, 0x17, 0xb1, 0xfa, 0x79, 0xcb, 0xe4, 0xf8, 0xa9, 0xb9, 0x79, 0x28, 0xeb, 0xa2, 0xfc, 0xa6, 0xd7, 0x66, 0x9b, 0x38, 0x41, 0x84, 0x89, 0x5b, 0xfe, 0x76, 0xab, 0xf4, 0x84, 0xb0, 0x3b, 0x9f, 0x7c, 0xa1, 0x3, 0x8, 0xc6, 0xce, 0x31, 0x19, 0x7c, 0xa1, 0x5b, 0x1a, 0x36, 0xce, 0xdc, 0x37, 0x74, 0xb6, 0xb9, 0xdd, 0xcc, 0x24, 0x31, 0xe7, 0x32, 0xdb, 0x36, 0x53, 0x7f, 0x1f, 0x4f, 0x48, 0x83, 0xe8, 0x1e, 0x7b, 0x3c, 0x6d, 0x36, 0x8b, 0x4e, 0xbd, 0xce, 0x34, 0xc6, 0x57, 0x71, 0x1d, 0x2c, 0xbb, 0x41, 0x58, 0xd5, 0x19, 0xe0, 0x27, 0xc5, 0xb4, 0xb6, 0x45, 0x75, 0xaf, 0xcd, 0x87, 0xce, 0x73, 0x6c, 0x45, 0x2, 0x8d, 0x37, 0x8d, 0x70, 0xc0, 0xfd, 0xe7, 0x3b, 0x54, 0x99, 0xff, 0xb3, 0x7, 0xb9, 0xdd, 0x82, 0x7, 0x38, 0x33, 0xc0, 0xa8, 0x47, 0x69, 0x96, 0x4f, 0xbd, 0x7d, 0x1, 0xc4, 0xec, 0xe8, 0x5, 0xe1, 0x22, 0x36, 0x4b, 0x2b, 0x48, 0x5b, 0x6d, 0xac, 0x77, 0x93, 0xf1, 0xee, 0x7f, 0x1c, 0xb2, 0xa5, 0xa, 0xe6, 0x56, 0x5c, 0xd2, 0x10, 0x30, 0x82, 0x60, 0xef, 0x64, 0xd9, 0xb2, 0xfe, 0x83, 0x78, 0x51, 0x6a, 0xd0, 0x93, 0x96, 0xd, 0x5c, 0xa8, 0xcf, 0xa9, 0xfc, 0xf2, 0x87, 0x62, 0x99, 0x80, 0x20, 0x74, 0x30, 0x86, 0xb9, 0x3e, 0xed, 0xec, 0x32, 0x47, 0x84, 0x42, 0x8e, 0xba, 0x23, 0x14, 0x14, 0x66, 0x18, 0x5c, 0x74, 0x0, 0x55, 0xb1, 0xe8, 0x7b, 0xf7, 0xf6, 0xbe, 0xf5, 0xce, 0x8e, 0x28, 0xdd, 0x27, 0xf, 0x9d, 0xa6, 0x4d, 0x6f, 0xff, 0x2c, 0xb0, 0xd7, 0x3a, 0x73, 0x4d, 0x45, 0xdc, 0x56, 0xcd, 0x3, 0xbe, 0x94, 0x14, 0xdb, 0x56, 0x8e, 0xe2, 0x36, 0x6f, 0x21, 0x66, 0xfd, 0x6d, 0x43, 0xaf, 0x9e, 0xee, 0xcb, 0x13, 0xc4, 0xa5, 0xd3, 0xa8, 0xe7, 0x75, 0xbe, 0xe5, 0x94, 0x21, 0x94, 0x3, 0x3a, 0xe3, 0xee, 0x17, 0x54, 0xfc, 0x4, 0x6b, 0xe9, 0x11, 0x30, 0x97, 0x9a, 0xb8, 0x8e, 0x47, 0xa4, 0xce, 0xa3, 0x79, 0xed, 0x9e, 0x77, 0xbc, 0x43, 0x10, 0xdd, 0xae, 0x2b, 0xdb, 0x7a, 0x5b, 0x94, 0x1e, 0x3f, 0xb6, 0x8, 0x1c, 0xc3, 0xed, 0x71, 0xe, 0xc, 0x60, 0x3d, 0x47, 0xef, 0xa8, 0x2f, 0xcc, 0xc0, 0xd5, 0x56, 0xd4, 0xab, 0x58, 0x82, 0x5e, 0xbe, 0x6e, 0xc7, 0x70, 0xf, 0x2, 0xfb, 0x7a, 0xe, 0xed, 0x44, 0xcd, 0x2f, 0x87, 0x72, 0xcc, 0xde, 0xe4, 0xba, 0x4b, 0x88, 0x3d, 0xaa, 0xb4, 0x62, 0x64, 0xa5, 0x69, 0xaa, 0xae, 0x97, 0xa0, 0xe4, 0x36, 0x9e, 0xc0, 0xf, 0x59, 0xd8, 0x41, 0xa1, 0xa7, 0xcf, 0x2d, 0x39, 0xbc, 0x58, 0x72, 0x5b, 0x24, 0x8c, 0x7b, 0x15, 0x9d, 0x6d, 0x68, 0xb3, 0xd9, 0x72, 0x12, 0x31, 0xca, 0xca, 0xad, 0x38, 0xf2, 0x6f, 0x35, 0x7b, 0xfd, 0x31, 0xff, 0xce, 0xc1, 0x8c, 0xf3, 0x4e, 0xe4, 0x2c, 0x3b, 0x37, 0x5c, 0x82, 0x7c, 0x42, 0x84, 0xb3, 0x1f, 0xcd, 0x43, 0x74, 0xcf, 0xe8, 0xc2, 0xc7, 0xa6, 0xb9, 0x52, 0x58, 0x1c, 0x98, 0x37, 0x58, 0x7c, 0xb1, 0x61, 0xee, 0xca, 0x23, 0x72, 0x90, 0xaf, 0xe8, 0x9, 0x5e, 0x6, 0x9a, 0x99, 0x51, 0x4d, 0xfa, 0xfc, 0x2f, 0xd8, 0xcf, 0xc7, 0x34, 0xb4, 0xae, 0x64, 0x80, 0x7d, 0x3a, 0xca, 0x26, 0x81, 0xad, 0xe0, 0xfa, 0x1, 0x8b, 0x17, 0xd2, 0xa6, 0x1f, 0x30, 0xf0, 0x30, 0x7a, 0xe8, 0x6d, 0x67, 0xd4, 0xa1, 0x4d, 0x9c, 0xe2, 0x14, 0xcf, 0x41, 0xed, 0xb7, 0x2, 0x73, 0x5f, 0x99, 0xd5, 0x8b, 0xda, 0xce, 0x7f, 0x28, 0xc7, 0xd9, 0x5a, 0x9c, 0xae, 0x8b, 0x7, 0x97, 0x8, 0xc6, 0xc7, 0xe7, 0x8a, 0xcc, 0xab, 0x67, 0xf6, 0x7a, 0x59, 0x8f, 0x7c, 0x86, 0xfe, 0x8b, 0x8a, 0xb6, 0x53, 0x9b, 0x2e, 0xbb, 0x37, 0x6b, 0x6a, 0x17, 0x14, 0x4a, 0x3a, 0xda, 0xd6, 0xbe, 0x5d, 0x61, 0x7d, 0x30, 0x60, 0x7a, 0xb4, 0xd9, 0x4c, 0x11, 0xa7, 0xc1, 0x85, 0x8e, 0x19, 0xb5, 0xc7, 0xb1, 0x2f, 0x9b, 0xe4, 0xac, 0x24, 0x5a, 0x9e, 0x91, 0xa2, 0x2e, 0xe5, 0x47, 0x1a, 0xa5, 0x85, 0x38, 0xaf, 0xb3, 0x53, 0x19, 0xf5, 0x3d, 0x6d, 0xd6, 0x9b, 0xc2, 0xae, 0x48, 0xd2, 0xb6, 0x49, 0xdf, 0xf6, 0xe7, 0x1d, 0xea, 0x3b, 0x79, 0x7c, 0x7, 0x1a, 0xc, 0x34, 0x5f, 0x66, 0xdf, 0x5, 0x34, 0x75, 0xa4, 0x0, 0x31, 0xf3, 0x23, 0x90, 0x8c, 0x71, 0xa1, 0x98, 0xc7, 0xfb, 0x2d, 0x54, 0x2a, 0xa8, 0xdd, 0x97, 0xb2, 0xf1, 0xce, 0x1, 0xd1, 0x1e, 0x7f, 0xc4, 0x58, 0x51, 0x8c, 0xe1, 0xcb, 0x45, 0x1b, 0xb9, 0xb1, 0xd5, 0x75, 0x30, 0xd1, 0x5e, 0xc9, 0x5b, 0xa7, 0x3b, 0xd5, 0xa3, 0x86, 0x94, 0x7f, 0xf8, 0xd0, 0xf5, 0x65, 0x54, 0x9a, 0x11, 0xb8, 0x87, 0x59, 0xd6, 0xab, 0xa3, 0xa8, 0x39, 0x67, 0xbf, 0x95, 0x43, 0xe6, 0x40, 0xa3, 0x3f, 0x6f, 0x9d, 0x96, 0x55, 0xa5, 0x47, 0x78, 0x5b, 0x42, 0xb1, 0x12, 0x16, 0xec, 0x1c, 0xce, 0x6, 0x76, 0x30, 0xe8, 0x97, 0x8, 0xca, 0x89, 0x67, 0x33, 0x12, 0x9d, 0xb5, 0x31, 0x21, 0x69, 0x0, 0x3b, 0x8f, 0xac, 0xb8, 0xde, 0x3f, 0x99, 0xe6, 0x54, 0x27, 0xae, 0xf5, 0x1c, 0xc1, 0xc9, 0x10, 0x5, 0xbb, 0x7f, 0x5b, 0x65, 0x21, 0x8b, 0x1b, 0x49, 0x2f, 0xdd, 0x67, 0x76, 0x1e, 0xf, 0x7c, 0x2f, 0xc6, 0xf, 0x7e, 0xca, 0x13, 0xb0, 0x9d, 0xf6, 0xb2, 0xa5, 0x3b, 0x5b, 0x9c, 0xea, 0xb4, 0x3d, 0x5a, 0x1e, 0xc3, 0x26, 0xa, 0x89, 0xb5, 0x4b, 0xc2, 0x57, 0x85, 0xf, 0x6, 0x59, 0xe3, 0x24, 0xd, 0xaf, 0x7, 0x3c, 0xc5, 0x23, 0x6f, 0x65, 0xb1, 0x59, 0xcf, 0x8f, 0xde, 0xc7, 0x71, 0x91, 0x1c, 0x5, 0x4b, 0xb4, 0x17, 0xf6, 0x79, 0x93, 0x30, 0xd4, 0x43, 0xa7, 0x35, 0x70, 0x4e, 0x66, 0xea, 0x9f, 0x1d, 0x33, 0x51, 0x83, 0x71, 0x97, 0xc1, 0x9e, 0x82, 0x26, 0xd2, 0x7a, 0x1e, 0xb5, 0xb6, 0x64, 0x78, 0x1c, 0xf0, 0x65, 0x12, 0x31, 0xab, 0x25, 0x67, 0x8a, 0x4c, 0x9f, 0x99, 0x73, 0xda, 0x83, 0xe, 0xd3, 0x87, 0x1a, 0x6e, 0xe6, 0x38, 0xdd, 0xa3, 0xc7, 0x89, 0xb0, 0xac, 0x27, 0xdf, 0x49, 0x71, 0x7c, 0xa2, 0xa1, 0xdf, 0x46, 0x96, 0x8d, 0x56, 0x3, 0x5e, 0xf0, 0x2b, 0x71, 0x2d, 0x12, 0x6, 0x7e, 0x72, 0xb1, 0xe6, 0x61, 0x12, 0xf, 0xc1, 0xfd, 0xe4, 0xfe, 0x6b, 0x11, 0xbb, 0x4d, 0x18, 0x9f, 0x29, 0x11, 0x2d, 0xbb, 0xd6, 0xdd, 0xd, 0x9e, 0x4e, 0x78, 0x50, 0x1c, 0x8e, 0x5e, 0xee, 0xcc, 0x33, 0x3b, 0x20, 0x8d, 0x7b, 0x86, 0x52, 0x2c, 0x61, 0xde, 0x4e, 0xd0, 0xd4, 0x45, 0x4d, 0x19, 0xca, 0x62, 0x2, 0x76, 0x27, 0x34, 0x4f, 0x45, 0x5c, 0x5, 0xf4, 0x29, 0xfa, 0x17, 0xe4, 0xa6, 0xf0, 0xba, 0xfc, 0xd4, 0xb5, 0x75, 0xcb, 0xa3, 0x75, 0x5b, 0x4, 0x23, 0x82, 0x94, 0x21, 0x90, 0xb6, 0xea, 0xf7, 0x62, 0xdf, 0x77, 0x14, 0x79, 0x7e, 0x91, 0x6d, 0x58, 0xe7, 0xdd, 0xd, 0xe2, 0xcf, 0xc4, 0x1d, 0x8e, 0x6e, 0x41, 0xd, 0xe6, 0x23, 0xea, 0x5c, 0x54, 0x73, 0x34, 0xd3, 0xa2, 0x14, 0x88, 0xcd, 0x2d, 0x65, 0xe6, 0xf9, 0xe0, 0xf1, 0x23, 0x16, 0x6f, 0xd8, 0x30, 0x43, 0x9, 0xd0, 0x16, 0xb, 0x5a, 0x60, 0x53, 0x17, 0xe0, 0x12, 0x23, 0x8, 0xf9, 0xff, 0x6, 0x5a, 0xe6, 0xed, 0x42, 0x24, 0x37, 0xc9, 0x62, 0xa1, 0x36, 0x2e, 0xc1, 0xf2, 0x80, 0x4b, 0x27, 0x4e, 0x3b, 0xae, 0x11, 0x82, 0x92, 0xff, 0x93, 0xb, 0xd5, 0x19, 0xef, 0xd3, 0xa9, 0x3e, 0x40, 0xf9, 0x49, 0xab, 0xc6, 0xe, 0x8e, 0x91, 0x90, 0xda, 0xaf, 0x9f, 0xc8, 0x9, 0x9a, 0x44, 0x31, 0x18, 0x61, 0xb0, 0x2f, 0xfb, 0x4f, 0x9a, 0xa, 0xea, 0x81, 0x99, 0x91, 0x70, 0xed, 0x5b, 0xd1, 0x4b, 0x72, 0x7b, 0x42, 0xeb, 0x44, 0xb0, 0xb5, 0x59, 0x83, 0xf1, 0xac, 0x2f, 0x2b, 0xa8, 0x7, 0x34, 0x63, 0xd, 0x6b, 0x75, 0x0, 0xd6, 0x5e, 0xab, 0x42, 0xf6, 0x77, 0x1e, 0xea, 0x68, 0x72, 0x67, 0x7e, 0x25, 0x2d, 0xa4, 0xc7, 0x17, 0xba, 0xa0, 0x77, 0x60, 0xbf, 0xc5, 0xfe, 0x9, 0xd4, 0x83, 0x5a, 0x65, 0x20, 0xa, 0x80, 0xc2, 0x75, 0x9a, 0x47, 0x6a, 0x93, 0xb, 0x7f, 0xb4, 0xa7, 0x38, 0x24, 0x1c, 0x3e, 0x73, 0xa9, 0xc7, 0x5d, 0x5a, 0x7f, 0xa, 0xb, 0xe5, 0x21, 0x38, 0xdd, 0xa2, 0x81, 0x2a, 0xef, 0xba, 0x8f, 0xd7, 0x8d, 0x58, 0x40, 0xe6, 0xea, 0x1d, 0x15, 0xc5, 0x7e, 0xa6, 0x6a, 0x59, 0xb3, 0xa8, 0x82, 0xa8, 0xfd, 0x4, 0x9, 0x3a, 0x58, 0x15, 0xa5, 0x32, 0x4b, 0xe7, 0x5c, 0x4f, 0x83, 0xcf, 0x16, 0xb7, 0x85, 0xd2, 0xd3, 0xbd, 0x36, 0x60, 0x2a, 0x0, 0x26, 0xa9, 0x89, 0x5c, 0xb3, 0x43, 0x68, 0x8e, 0xea, 0x40, 0xcd, 0xb4, 0x83, 0xed, 0xcd, 0x87, 0x78, 0x8b, 0x66, 0x8a, 0x69, 0xd0, 0xbc, 0x75, 0xb0, 0x7d, 0x8c, 0x82, 0x47, 0xa9, 0x78, 0xe, 0x4c, 0x1e, 0xc3, 0x42, 0xc1, 0x19, 0x82, 0x95, 0xd6, 0x99, 0xf0, 0x82, 0x9e, 0x41, 0xa7, 0x8f, 0xf, 0x99, 0x78, 0xdd, 0x52, 0xd6, 0x49, 0x18, 0x98, 0xf1, 0xf0, 0x5b, 0x97, 0x9e, 0x58, 0x7f, 0x71, 0x1d, 0xf6, 0x6f, 0x38, 0xc2, 0x3c, 0x2b, 0xff, 0x9c, 0x69, 0x8, 0x6a, 0xb9, 0x70, 0xc4, 0x68, 0x31, 0x5b, 0x3b, 0x6c, 0x36, 0xd5, 0x8a, 0x7a, 0xe9, 0xc7, 0x49, 0xfa, 0x6, 0x42, 0x9e, 0x67, 0x81, 0xae, 0x7d, 0x49, 0xb3, 0xb3, 0x68, 0x4, 0x86, 0x41, 0xa6, 0x3d, 0xb9, 0x5e, 0xe2, 0x93, 0xa1, 0x95, 0x42, 0x1, 0xca, 0xd7, 0x2e, 0x92, 0xa8, 0x5e, 0x34, 0xc7, 0xa7, 0x4b, 0x2f, 0xd1, 0xbc, 0xa6, 0xaa, 0x61, 0x43, 0x5a, 0xf2, 0xdc, 0x32, 0xc1, 0xa2, 0xf5, 0x59, 0xf6, 0x3e, 0x71, 0x6a, 0x6c, 0x96, 0xf0, 0x76, 0x9, 0x7e, 0x6c, 0x45, 0xf4, 0x37, 0x2a, 0xe6, 0x82, 0x8e, 0x9e, 0xaa, 0xe3, 0xeb, 0x82, 0x36, 0x17, 0x10, 0xec, 0x14, 0xf6, 0x7f, 0x7d, 0xe, 0xd9, 0x85, 0x92, 0x49, 0xc1, 0x8d, 0x14, 0x98, 0x53, 0x2, 0x84, 0x7f, 0xc8, 0xf3, 0x30, 0x1b, 0xd3, 0x1c, 0x7e, 0x1e, 0x9, 0xb2, 0x5, 0x7e, 0x9e, 0xe4, 0x6f, 0xcc, 0x7c, 0x9b, 0xd8, 0xdb, 0x59, 0xeb, 0xd, 0xeb, 0xb, 0x1d, 0x8d, 0x29, 0x15, 0x8, 0xcb, 0x38, 0x37, 0xc9, 0xb2, 0xf1, 0x91, 0xa4, 0x95, 0x95, 0xd6, 0xaa, 0xdd, 0xce, 0xfe, 0xf0, 0xdd, 0x59, 0xed, 0x3a, 0x5, 0xfa, 0x8f, 0x6e, 0xf0, 0x3d, 0x38, 0xf5, 0x34, 0x13, 0x9d, 0x56, 0xbc, 0xbd, 0x4b, 0xc3, 0x25, 0x6e, 0x1a, 0x12, 0xd, 0x49, 0xa5, 0xdb, 0x1b, 0xad, 0xb5, 0x28, 0xb0, 0x25, 0x6c, 0x61, 0xa2, 0xf1, 0x79, 0xa2, 0x3c, 0x49, 0x92, 0x87, 0x38, 0xf9, 0xc0, 0xfa, 0x81, 0xfc, 0x19, 0x6d, 0x1a, 0x74, 0x50, 0x79, 0x98, 0x41, 0x5f, 0x7, 0xe, 0xf9, 0xc3, 0x8b, 0xaa, 0x53, 0x95, 0x1f, 0xee, 0x7b, 0x68, 0x0, 0x8b, 0xc6, 0x75, 0xe0, 0xe1, 0x5b, 0xc3, 0x2a, 0x61, 0xc3, 0xb, 0xc1, 0x32, 0xe7, 0x9c, 0x58, 0xa3, 0xa9, 0x70, 0xff, 0xdd, 0xb8, 0xb8, 0x6, 0x78, 0x2d, 0xd3, 0x12, 0x42, 0xb3, 0xc3, 0xcf, 0x98, 0x10, 0xbe, 0xea, 0x5f, 0xb5, 0xa1, 0xb2, 0x50, 0xea, 0x62, 0x33, 0x64, 0x56, 0xe7, 0x69, 0x4b, 0x4c, 0x82, 0x95, 0x8, 0xc7, 0xdb, 0xfe, 0x9, 0xa, 0xf6, 0xa8, 0x50, 0xf7, 0x9d, 0x4, 0xd2, 0xc6, 0x98, 0x63, 0x78, 0x16, 0x1, 0x7f, 0x8a, 0x92, 0xe, 0x1b, 0x1a, 0xde, 0x23, 0x6e, 0x22, 0x7b, 0x34, 0x80, 0x89, 0x9b, 0xcb, 0xb9, 0x91, 0xf6, 0xc6, 0xc2, 0x40, 0xbb, 0xd4, 0x11, 0x4a, 0xaf, 0x98, 0x75, 0x93, 0x55, 0x58, 0x39, 0x4a, 0x48, 0x66, 0x52, 0xb0, 0x94, 0x2f, 0x34, 0x9, 0xb6, 0x6f, 0xaf, 0x8b, 0x8b, 0xf7, 0x11, 0xcc, 0x8c, 0x34, 0xcc, 0xa4, 0x1b, 0x8e, 0x16, 0xc2, 0xcd, 0xf0, 0x16, 0xb, 0x92, 0xa3, 0x32, 0xc1, 0xf0, 0x4b, 0xc6, 0x45, 0x82, 0x44, 0x6b, 0x98, 0xaf, 0xf3, 0x41, 0x89, 0x67, 0x5b, 0x7a, 0x10, 0xff, 0xc6, 0xf1, 0x3b, 0x3f, 0x74, 0x65, 0x4e, 0xd7, 0xc0, 0x59, 0xd, 0x4a, 0xf7, 0xf4, 0xd7, 0x47, 0xbf, 0x89, 0xbb, 0x2a, 0x8f, 0x5c, 0x8c, 0xe6, 0x10, 0xcf, 0x4f, 0xa4, 0xab, 0x71, 0x4a, 0x84, 0x5e, 0x15, 0x64, 0x9b, 0x53, 0xe5, 0x4a, 0x95, 0x21, 0x3d, 0x5a, 0x73, 0x90, 0x59, 0x41, 0xd9, 0x46, 0x7b, 0xb, 0xed, 0xda, 0x2b, 0xec, 0xc1, 0xc2, 0x19, 0xe1, 0xca, 0xb6, 0x99, 0x65, 0x2d, 0x85, 0xb8, 0xcd, 0x7e, 0xc, 0xd1, 0x1c, 0xe5, 0xb0, 0xca, 0xc7, 0x6f, 0x9e, 0xf3, 0xd7, 0x4b, 0xd8, 0x29, 0x87, 0x78, 0x98, 0xe7, 0x35, 0xc, 0xca, 0x72, 0x10, 0x10, 0x76, 0xa9, 0x70, 0xbe, 0xc6, 0x75, 0x6c, 0x3f, 0xd1, 0xaa, 0xf3, 0x39, 0x6f, 0x72, 0x83, 0x3f, 0x8d, 0x4e, 0x71, 0x6a, 0xec, 0x6f, 0x93, 0x71, 0x8b, 0x26, 0x27, 0x10, 0xb0, 0xda, 0x2f, 0x3f, 0xd6, 0xcb, 0xdb, 0x20, 0x4e, 0xd0, 0xe9, 0x1d, 0x65, 0xca, 0xb3, 0x9e, 0xd3, 0x5f, 0x22, 0xa0, 0x1e, 0x5d, 0x50, 0x92, 0x82, 0x75, 0x28, 0x37, 0xeb, 0xee, 0x96, 0x8b, 0x14, 0x9, 0x89, 0xef, 0x5f, 0x4d, 0x51, 0x34, 0x52, 0x78, 0x4b, 0xdb, 0x89, 0x2c, 0xaf, 0xd8, 0x38, 0x7e, 0x5, 0xb3, 0x1, 0x2c, 0x4, 0x58, 0xa3, 0x69, 0xe6, 0x21, 0x91, 0xf5, 0xbd, 0xc5, 0x7d, 0xd6, 0x3c, 0xe4, 0x2e, 0x94, 0x5f, 0x49, 0x3c, 0x2b, 0x42, 0x30, 0x6b, 0x80, 0x84, 0xf3, 0xb2, 0x5e, 0x94, 0xab, 0xac, 0xf0, 0x8e, 0xe1, 0x55, 0xf3, 0x62, 0x1a, 0xcc, 0x96, 0x26, 0xee, 0x48, 0x7c, 0x7a, 0x7e, 0x46, 0x67, 0xf0, 0x37, 0x7a, 0xe4, 0xb2}, - output224: []byte{0xba, 0xdf, 0x58, 0xa, 0x48, 0x5b, 0x27, 0x90, 0x58, 0x18, 0x3b, 0x4d, 0x53, 0x75, 0x5f, 0xba, 0xa8, 0x88, 0x9d, 0x34, 0xb0, 0x41, 0x61, 0x9b, 0xc2, 0x92, 0xe8, 0xd0}, - output256: []byte{0x86, 0xec, 0x53, 0x42, 0xab, 0x76, 0x7, 0x10, 0x35, 0x47, 0x98, 0x5b, 0xd8, 0x32, 0xa2, 0x71, 0x42, 0x6a, 0xcd, 0xe8, 0xdc, 0xac, 0x94, 0x1a, 0xa7, 0xc4, 0xff, 0x17, 0xcf, 0xb1, 0x76, 0x2}, - output384: []byte{0xbe, 0x96, 0x4d, 0x9a, 0xf6, 0x7d, 0x2a, 0x10, 0x60, 0x2d, 0xdc, 0x5f, 0x5e, 0x5c, 0x79, 0xd2, 0x39, 0x51, 0x11, 0x2c, 0x56, 0x24, 0x6e, 0xc7, 0x59, 0x31, 0xd9, 0xdf, 0xb3, 0xf0, 0xb0, 0x6d, 0xe4, 0x47, 0x88, 0x38, 0xda, 0xd9, 0xde, 0x9f, 0x8c, 0x76, 0xfe, 0xf0, 0xaa, 0xa7, 0xc6, 0x28}, - output512: []byte{0xdb, 0xd1, 0x99, 0x4, 0x88, 0x1f, 0x49, 0x12, 0xf9, 0x9e, 0xc3, 0x9b, 0x67, 0x3, 0x72, 0x70, 0x36, 0xc7, 0x67, 0xd2, 0x9, 0x7b, 0x9d, 0x14, 0x60, 0xb4, 0x83, 0xfb, 0x18, 0x2, 0xce, 0x5f, 0x6f, 0x5d, 0xe3, 0x83, 0xa3, 0xcf, 0x40, 0x67, 0x9d, 0x2a, 0x64, 0x15, 0xfe, 0x6e, 0xed, 0x2e, 0xbb, 0xff, 0xa3, 0xa5, 0xbd, 0xd4, 0x25, 0x29, 0x5b, 0xe, 0xbc, 0xf9, 0x81, 0xad, 0x1d, 0x3e}}, -} diff --git a/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/.travis.yml b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/.travis.yml new file mode 100644 index 0000000000..20cad02887 --- /dev/null +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/.travis.yml @@ -0,0 +1,23 @@ +sudo: required + +os: + - linux + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/LICENSE b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/LICENSE rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/LICENSE diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/Makefile b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/Makefile similarity index 100% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/Makefile rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/Makefile diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/README.md b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/README.md similarity index 100% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/README.md rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/README.md diff --git a/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/addrs.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/addrs.go new file mode 100644 index 0000000000..54bbe16834 --- /dev/null +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/addrs.go @@ -0,0 +1,35 @@ +package swarm + +import ( + mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" + mafilter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" +) + +// http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml +var lowTimeoutFilters = mafilter.NewFilters() + +func init() { + for _, p := range []string{ + "/ip4/10.0.0.0/ipcidr/8", + "/ip4/100.64.0.0/ipcidr/10", + "/ip4/169.254.0.0/ipcidr/16", + "/ip4/172.16.0.0/ipcidr/12", + "/ip4/192.0.0.0/ipcidr/24", + "/ip4/192.0.0.0/ipcidr/29", + "/ip4/192.0.0.8/ipcidr/32", + "/ip4/192.0.0.170/ipcidr/32", + "/ip4/192.0.0.171/ipcidr/32", + "/ip4/192.0.2.0/ipcidr/24", + "/ip4/192.168.0.0/ipcidr/16", + "/ip4/198.18.0.0/ipcidr/15", + "/ip4/198.51.100.0/ipcidr/24", + "/ip4/203.0.113.0/ipcidr/24", + "/ip4/240.0.0.0/ipcidr/4", + } { + f, err := mamask.NewMask(p) + if err != nil { + panic("error in lowTimeoutFilters init: " + err.Error()) + } + lowTimeoutFilters.AddDialFilter(f) + } +} diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/codecov.yml b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/codecov.yml rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/codecov.yml diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/dial_sync.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/dial_sync.go similarity index 97% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/dial_sync.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/dial_sync.go index 5e6b46a14f..d36f38a91e 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/dial_sync.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/dial_sync.go @@ -4,7 +4,7 @@ import ( "context" "sync" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // DialFunc is the type of function expected by DialSync. diff --git a/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/limiter.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/limiter.go new file mode 100644 index 0000000000..b9bc9a6160 --- /dev/null +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/limiter.go @@ -0,0 +1,225 @@ +package swarm + +import ( + "context" + "os" + "strconv" + "sync" + "time" + + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + addrutil "gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util" +) + +type dialResult struct { + Conn transport.Conn + Addr ma.Multiaddr + Err error +} + +type dialJob struct { + addr ma.Multiaddr + peer peer.ID + ctx context.Context + resp chan dialResult +} + +func (dj *dialJob) cancelled() bool { + return dj.ctx.Err() != nil +} + +func (dj *dialJob) dialTimeout() time.Duration { + timeout := transport.DialTimeout + if lowTimeoutFilters.AddrBlocked(dj.addr) { + timeout = DialTimeoutLocal + } + + return timeout +} + +type dialLimiter struct { + lk sync.Mutex + + fdConsuming int + fdLimit int + waitingOnFd []*dialJob + + dialFunc dialfunc + + activePerPeer map[peer.ID]int + perPeerLimit int + waitingOnPeerLimit map[peer.ID][]*dialJob +} + +type dialfunc func(context.Context, peer.ID, ma.Multiaddr) (transport.Conn, error) + +func newDialLimiter(df dialfunc) *dialLimiter { + fd := ConcurrentFdDials + if env := os.Getenv("LIBP2P_SWARM_FD_LIMIT"); env != "" { + if n, err := strconv.ParseInt(env, 10, 32); err == nil { + fd = int(n) + } + } + return newDialLimiterWithParams(df, fd, DefaultPerPeerRateLimit) +} + +func newDialLimiterWithParams(df dialfunc, fdLimit, perPeerLimit int) *dialLimiter { + return &dialLimiter{ + fdLimit: fdLimit, + perPeerLimit: perPeerLimit, + waitingOnPeerLimit: make(map[peer.ID][]*dialJob), + activePerPeer: make(map[peer.ID]int), + dialFunc: df, + } +} + +// freeFDToken frees FD token and if there are any schedules another waiting dialJob +// in it's place +func (dl *dialLimiter) freeFDToken() { + log.Debugf("[limiter] freeing FD token; waiting: %d; consuming: %d", len(dl.waitingOnFd), dl.fdConsuming) + dl.fdConsuming-- + + for len(dl.waitingOnFd) > 0 { + next := dl.waitingOnFd[0] + dl.waitingOnFd[0] = nil // clear out memory + dl.waitingOnFd = dl.waitingOnFd[1:] + + if len(dl.waitingOnFd) == 0 { + // clear out memory. + dl.waitingOnFd = nil + } + + // Skip over canceled dials instead of queuing up a goroutine. + if next.cancelled() { + dl.freePeerToken(next) + continue + } + dl.fdConsuming++ + + // we already have activePerPeer token at this point so we can just dial + go dl.executeDial(next) + return + } +} + +func (dl *dialLimiter) freePeerToken(dj *dialJob) { + log.Debugf("[limiter] freeing peer token; peer %s; addr: %s; active for peer: %d; waiting on peer limit: %d", + dj.peer, dj.addr, dl.activePerPeer[dj.peer], len(dl.waitingOnPeerLimit[dj.peer])) + // release tokens in reverse order than we take them + dl.activePerPeer[dj.peer]-- + if dl.activePerPeer[dj.peer] == 0 { + delete(dl.activePerPeer, dj.peer) + } + + waitlist := dl.waitingOnPeerLimit[dj.peer] + for len(waitlist) > 0 { + next := waitlist[0] + waitlist[0] = nil // clear out memory + waitlist = waitlist[1:] + + if len(waitlist) == 0 { + delete(dl.waitingOnPeerLimit, next.peer) + } else { + dl.waitingOnPeerLimit[next.peer] = waitlist + } + + if next.cancelled() { + continue + } + + dl.activePerPeer[next.peer]++ // just kidding, we still want this token + + dl.addCheckFdLimit(next) + return + } +} + +func (dl *dialLimiter) finishedDial(dj *dialJob) { + dl.lk.Lock() + defer dl.lk.Unlock() + + if addrutil.IsFDCostlyTransport(dj.addr) { + dl.freeFDToken() + } + + dl.freePeerToken(dj) +} + +func (dl *dialLimiter) addCheckFdLimit(dj *dialJob) { + if addrutil.IsFDCostlyTransport(dj.addr) { + if dl.fdConsuming >= dl.fdLimit { + log.Debugf("[limiter] blocked dial waiting on FD token; peer: %s; addr: %s; consuming: %d; "+ + "limit: %d; waiting: %d", dj.peer, dj.addr, dl.fdConsuming, dl.fdLimit, len(dl.waitingOnFd)) + dl.waitingOnFd = append(dl.waitingOnFd, dj) + return + } + + log.Debugf("[limiter] taking FD token: peer: %s; addr: %s; prev consuming: %d", + dj.peer, dj.addr, dl.fdConsuming) + // take token + dl.fdConsuming++ + } + + log.Debugf("[limiter] executing dial; peer: %s; addr: %s; FD consuming: %d; waiting: %d", + dj.peer, dj.addr, dl.fdConsuming, len(dl.waitingOnFd)) + go dl.executeDial(dj) +} + +func (dl *dialLimiter) addCheckPeerLimit(dj *dialJob) { + if dl.activePerPeer[dj.peer] >= dl.perPeerLimit { + log.Debugf("[limiter] blocked dial waiting on peer limit; peer: %s; addr: %s; active: %d; "+ + "peer limit: %d; waiting: %d", dj.peer, dj.addr, dl.activePerPeer[dj.peer], dl.perPeerLimit, + len(dl.waitingOnPeerLimit[dj.peer])) + wlist := dl.waitingOnPeerLimit[dj.peer] + dl.waitingOnPeerLimit[dj.peer] = append(wlist, dj) + return + } + dl.activePerPeer[dj.peer]++ + + dl.addCheckFdLimit(dj) +} + +// AddDialJob tries to take the needed tokens for starting the given dial job. +// If it acquires all needed tokens, it immediately starts the dial, otherwise +// it will put it on the waitlist for the requested token. +func (dl *dialLimiter) AddDialJob(dj *dialJob) { + dl.lk.Lock() + defer dl.lk.Unlock() + + log.Debugf("[limiter] adding a dial job through limiter: %v", dj.addr) + dl.addCheckPeerLimit(dj) +} + +func (dl *dialLimiter) clearAllPeerDials(p peer.ID) { + dl.lk.Lock() + defer dl.lk.Unlock() + delete(dl.waitingOnPeerLimit, p) + log.Debugf("[limiter] clearing all peer dials: %v", p) + // NB: the waitingOnFd list doesn't need to be cleaned out here, we will + // remove them as we encounter them because they are 'cancelled' at this + // point +} + +// executeDial calls the dialFunc, and reports the result through the response +// channel when finished. Once the response is sent it also releases all tokens +// it held during the dial. +func (dl *dialLimiter) executeDial(j *dialJob) { + defer dl.finishedDial(j) + if j.cancelled() { + return + } + + dctx, cancel := context.WithTimeout(j.ctx, j.dialTimeout()) + defer cancel() + + con, err := dl.dialFunc(dctx, j.peer, j.addr) + select { + case j.resp <- dialResult{Conn: con, Addr: j.addr, Err: err}: + case <-j.ctx.Done(): + if err == nil { + con.Close() + } + } +} diff --git a/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/package.json b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/package.json new file mode 100644 index 0000000000..21e13ccd90 --- /dev/null +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/package.json @@ -0,0 +1,161 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-swarm/issues" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-swarm" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "whyrusleeping", + "hash": "QmUWkEreTZdTxUVDfpQ2fLywJh6dinfEYahEoBDTMQ2hks", + "name": "go-smux-multistream", + "version": "2.0.3" + }, + { + "author": "whyrusleeping", + "hash": "QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb", + "name": "go-smux-yamux", + "version": "2.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv", + "name": "multiaddr-filter", + "version": "1.0.2" + }, + { + "author": "whyrusleeping", + "hash": "QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR", + "name": "go-libp2p-metrics", + "version": "2.1.14" + }, + { + "author": "whyrusleeping", + "hash": "QmTGiDkw4eeKq31wwpQRk5GwWiReaxrcTQLuCCLWgfKo5M", + "name": "go-tcp-transport", + "version": "2.0.28" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "whyrusleeping", + "hash": "QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd", + "name": "go-maddr-filter", + "version": "1.1.13" + }, + { + "author": "whyrusleeping", + "hash": "QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX", + "name": "go-addr-util", + "version": "2.0.11" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", + "name": "go-libp2p-loggables", + "version": "1.1.33" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "stebalien", + "hash": "QmZWmFkMm28sWeDr5Xh1LexdKBGYGp946MNCfgtLqfX73z", + "name": "go-conn-security-multistream", + "version": "0.1.26" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmSVaJe1aRjc78cZARTtf4pqvXERYwihyYhZWoVWceHnsK", + "name": "go-libp2p-secio", + "version": "2.0.30" + } + ], + "gxVersion": "0.9.1", + "language": "go", + "license": "MIT", + "name": "go-libp2p-swarm", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.0.34" +} + diff --git a/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm.go new file mode 100644 index 0000000000..d9c8a24f04 --- /dev/null +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm.go @@ -0,0 +1,500 @@ +package swarm + +import ( + "context" + "errors" + "fmt" + "strings" + "sync" + "sync/atomic" + "time" + + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + mafilter "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" + metrics "gx/ipfs/QmSwVwKUWzdf3ppM3FbBbpuqHUNtUFJPQQdfvKmgZoz2gR/go-libp2p-metrics" + filter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +// DialTimeoutLocal is the maximum duration a Dial to local network address +// is allowed to take. +// This includes the time between dialing the raw network connection, +// protocol selection as well the handshake, if applicable. +var DialTimeoutLocal = 5 * time.Second + +var log = logging.Logger("swarm2") + +// ErrSwarmClosed is returned when one attempts to operate on a closed swarm. +var ErrSwarmClosed = errors.New("swarm closed") + +// ErrAddrFiltered is returned when trying to register a connection to a +// filtered address. You shouldn't see this error unless some underlying +// transport is misbehaving. +var ErrAddrFiltered = errors.New("address filtered") + +// Swarm is a connection muxer, allowing connections to other peers to +// be opened and closed, while still using the same Chan for all +// communication. The Chan sends/receives Messages, which note the +// destination or source Peer. +type Swarm struct { + // Close refcount. This allows us to fully wait for the swarm to be torn + // down before continuing. + refs sync.WaitGroup + + local peer.ID + peers pstore.Peerstore + + conns struct { + sync.RWMutex + m map[peer.ID][]*Conn + } + + listeners struct { + sync.RWMutex + m map[transport.Listener]struct{} + } + + notifs struct { + sync.RWMutex + m map[inet.Notifiee]struct{} + } + + transports struct { + sync.RWMutex + m map[int]transport.Transport + } + + // new connection and stream handlers + connh atomic.Value + streamh atomic.Value + + // dialing helpers + dsync *DialSync + backf DialBackoff + limiter *dialLimiter + + // filters for addresses that shouldnt be dialed (or accepted) + Filters *filter.Filters + + proc goprocess.Process + ctx context.Context + bwc metrics.Reporter +} + +// NewSwarm constructs a Swarm +func NewSwarm(ctx context.Context, local peer.ID, peers pstore.Peerstore, bwc metrics.Reporter) *Swarm { + s := &Swarm{ + local: local, + peers: peers, + bwc: bwc, + Filters: filter.NewFilters(), + } + + s.conns.m = make(map[peer.ID][]*Conn) + s.listeners.m = make(map[transport.Listener]struct{}) + s.transports.m = make(map[int]transport.Transport) + s.notifs.m = make(map[inet.Notifiee]struct{}) + + s.dsync = NewDialSync(s.doDial) + s.limiter = newDialLimiter(s.dialAddr) + s.proc = goprocessctx.WithContextAndTeardown(ctx, s.teardown) + s.ctx = goprocessctx.OnClosingContext(s.proc) + + return s +} + +func (s *Swarm) teardown() error { + // Prevents new connections and/or listeners from being added to the swarm. + + s.listeners.Lock() + listeners := s.listeners.m + s.listeners.m = nil + s.listeners.Unlock() + + s.conns.Lock() + conns := s.conns.m + s.conns.m = nil + s.conns.Unlock() + + // Lots of goroutines but we might as well do this in parallel. We want to shut down as fast as + // possible. + + for l := range listeners { + go func(l transport.Listener) { + if err := l.Close(); err != nil { + log.Errorf("error when shutting down listener: %s", err) + } + }(l) + } + + for _, cs := range conns { + for _, c := range cs { + go func(c *Conn) { + if err := c.Close(); err != nil { + log.Errorf("error when shutting down connection: %s", err) + } + }(c) + } + } + + // Wait for everything to finish. + s.refs.Wait() + + return nil +} + +// AddAddrFilter adds a multiaddr filter to the set of filters the swarm will use to determine which +// addresses not to dial to. +func (s *Swarm) AddAddrFilter(f string) error { + m, err := mafilter.NewMask(f) + if err != nil { + return err + } + + s.Filters.AddDialFilter(m) + return nil +} + +// Process returns the Process of the swarm +func (s *Swarm) Process() goprocess.Process { + return s.proc +} + +func (s *Swarm) addConn(tc transport.Conn, dir inet.Direction) (*Conn, error) { + // The underlying transport (or the dialer) *should* filter it's own + // connections but we should double check anyways. + raddr := tc.RemoteMultiaddr() + if s.Filters.AddrBlocked(raddr) { + tc.Close() + return nil, ErrAddrFiltered + } + + p := tc.RemotePeer() + + // Add the public key. + if pk := tc.RemotePublicKey(); pk != nil { + s.peers.AddPubKey(p, pk) + } + + // Clear any backoffs + s.backf.Clear(p) + + // Finally, add the peer. + s.conns.Lock() + // Check if we're still online + if s.conns.m == nil { + s.conns.Unlock() + tc.Close() + return nil, ErrSwarmClosed + } + + // Wrap and register the connection. + stat := inet.Stat{Direction: dir} + c := &Conn{ + conn: tc, + swarm: s, + stat: stat, + } + c.streams.m = make(map[*Stream]struct{}) + s.conns.m[p] = append(s.conns.m[p], c) + + // Add two swarm refs: + // * One will be decremented after the close notifications fire in Conn.doClose + // * The other will be decremented when Conn.start exits. + s.refs.Add(2) + + // Take the notification lock before releasing the conns lock to block + // Disconnect notifications until after the Connect notifications done. + c.notifyLk.Lock() + s.conns.Unlock() + + // We have a connection now. Cancel all other in-progress dials. + // This should be fast, no reason to wait till later. + s.dsync.CancelDial(p) + + s.notifyAll(func(f inet.Notifiee) { + f.Connected(s, c) + }) + c.notifyLk.Unlock() + + c.start() + + // TODO: Get rid of this. We use it for identify but that happen much + // earlier (really, inside the transport and, if not then, during the + // notifications). + if h := s.ConnHandler(); h != nil { + go h(c) + } + + return c, nil +} + +// Peerstore returns this swarms internal Peerstore. +func (s *Swarm) Peerstore() pstore.Peerstore { + return s.peers +} + +// Context returns the context of the swarm +func (s *Swarm) Context() context.Context { + return s.ctx +} + +// Close stops the Swarm. +func (s *Swarm) Close() error { + return s.proc.Close() +} + +// TODO: We probably don't need the conn handlers. + +// SetConnHandler assigns the handler for new connections. +// You will rarely use this. See SetStreamHandler +func (s *Swarm) SetConnHandler(handler inet.ConnHandler) { + s.connh.Store(handler) +} + +// ConnHandler gets the handler for new connections. +func (s *Swarm) ConnHandler() inet.ConnHandler { + handler, _ := s.connh.Load().(inet.ConnHandler) + return handler +} + +// SetStreamHandler assigns the handler for new streams. +func (s *Swarm) SetStreamHandler(handler inet.StreamHandler) { + s.streamh.Store(handler) +} + +// StreamHandler gets the handler for new streams. +func (s *Swarm) StreamHandler() inet.StreamHandler { + handler, _ := s.streamh.Load().(inet.StreamHandler) + return handler +} + +// NewStream creates a new stream on any available connection to peer, dialing +// if necessary. +func (s *Swarm) NewStream(ctx context.Context, p peer.ID) (inet.Stream, error) { + log.Debugf("[%s] opening stream to peer [%s]", s.local, p) + + // Algorithm: + // 1. Find the best connection, otherwise, dial. + // 2. Try opening a stream. + // 3. If the underlying connection is, in fact, closed, close the outer + // connection and try again. We do this in case we have a closed + // connection but don't notice it until we actually try to open a + // stream. + // + // Note: We only dial once. + // + // TODO: Try all connections even if we get an error opening a stream on + // a non-closed connection. + dials := 0 + for { + c := s.bestConnToPeer(p) + if c == nil { + if dials >= DialAttempts { + return nil, errors.New("max dial attempts exceeded") + } + dials++ + + var err error + c, err = s.dialPeer(ctx, p) + if err != nil { + return nil, err + } + } + s, err := c.NewStream() + if err != nil { + if c.conn.IsClosed() { + continue + } + return nil, err + } + return s, nil + } +} + +// ConnsToPeer returns all the live connections to peer. +func (s *Swarm) ConnsToPeer(p peer.ID) []inet.Conn { + // TODO: Consider sorting the connection list best to worst. Currently, + // it's sorted oldest to newest. + s.conns.RLock() + defer s.conns.RUnlock() + conns := s.conns.m[p] + output := make([]inet.Conn, len(conns)) + for i, c := range conns { + output[i] = c + } + return output +} + +// bestConnToPeer returns the best connection to peer. +func (s *Swarm) bestConnToPeer(p peer.ID) *Conn { + // Selects the best connection we have to the peer. + // TODO: Prefer some transports over others. Currently, we just select + // the newest non-closed connection with the most streams. + s.conns.RLock() + defer s.conns.RUnlock() + + var best *Conn + bestLen := 0 + for _, c := range s.conns.m[p] { + if c.conn.IsClosed() { + // We *will* garbage collect this soon anyways. + continue + } + c.streams.Lock() + cLen := len(c.streams.m) + c.streams.Unlock() + + if cLen >= bestLen { + best = c + bestLen = cLen + } + + } + return best +} + +// Connectedness returns our "connectedness" state with the given peer. +// +// To check if we have an open connection, use `s.Connectedness(p) == +// inet.Connected`. +func (s *Swarm) Connectedness(p peer.ID) inet.Connectedness { + if s.bestConnToPeer(p) != nil { + return inet.Connected + } + return inet.NotConnected +} + +// Conns returns a slice of all connections. +func (s *Swarm) Conns() []inet.Conn { + s.conns.RLock() + defer s.conns.RUnlock() + + conns := make([]inet.Conn, 0, len(s.conns.m)) + for _, cs := range s.conns.m { + for _, c := range cs { + conns = append(conns, c) + } + } + return conns +} + +// ClosePeer closes all connections to the given peer. +func (s *Swarm) ClosePeer(p peer.ID) error { + conns := s.ConnsToPeer(p) + switch len(conns) { + case 0: + return nil + case 1: + return conns[0].Close() + default: + errCh := make(chan error) + for _, c := range conns { + go func(c inet.Conn) { + errCh <- c.Close() + }(c) + } + + var errs []string + for range conns { + err := <-errCh + if err != nil { + errs = append(errs, err.Error()) + } + } + if len(errs) > 0 { + return fmt.Errorf("when disconnecting from peer %s: %s", p, strings.Join(errs, ", ")) + } + return nil + } +} + +// Peers returns a copy of the set of peers swarm is connected to. +func (s *Swarm) Peers() []peer.ID { + s.conns.RLock() + defer s.conns.RUnlock() + peers := make([]peer.ID, 0, len(s.conns.m)) + for p := range s.conns.m { + peers = append(peers, p) + } + + return peers +} + +// LocalPeer returns the local peer swarm is associated to. +func (s *Swarm) LocalPeer() peer.ID { + return s.local +} + +// Backoff returns the DialBackoff object for this swarm. +func (s *Swarm) Backoff() *DialBackoff { + return &s.backf +} + +// notifyAll sends a signal to all Notifiees +func (s *Swarm) notifyAll(notify func(inet.Notifiee)) { + var wg sync.WaitGroup + + s.notifs.RLock() + wg.Add(len(s.notifs.m)) + for f := range s.notifs.m { + go func(f inet.Notifiee) { + defer wg.Done() + notify(f) + }(f) + } + + wg.Wait() + s.notifs.RUnlock() +} + +// Notify signs up Notifiee to receive signals when events happen +func (s *Swarm) Notify(f inet.Notifiee) { + s.notifs.Lock() + s.notifs.m[f] = struct{}{} + s.notifs.Unlock() +} + +// StopNotify unregisters Notifiee fromr receiving signals +func (s *Swarm) StopNotify(f inet.Notifiee) { + s.notifs.Lock() + delete(s.notifs.m, f) + s.notifs.Unlock() +} + +func (s *Swarm) removeConn(c *Conn) { + p := c.RemotePeer() + + s.conns.Lock() + defer s.conns.Unlock() + cs := s.conns.m[p] + for i, ci := range cs { + if ci == c { + if len(cs) == 1 { + delete(s.conns.m, p) + } else { + // NOTE: We're intentionally preserving order. + // This way, connections to a peer are always + // sorted oldest to newest. + copy(cs[i:], cs[i+1:]) + cs[len(cs)-1] = nil + s.conns.m[p] = cs[:len(cs)-1] + } + return + } + } +} + +// String returns a string representation of Network. +func (s *Swarm) String() string { + return fmt.Sprintf("", s.LocalPeer()) +} + +// Swarm is a Network. +var _ inet.Network = (*Swarm)(nil) +var _ transport.Network = (*Swarm)(nil) diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_addr.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_addr.go similarity index 82% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_addr.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_addr.go index cea359f74a..e50ec3e8a3 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_addr.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_addr.go @@ -1,8 +1,8 @@ package swarm import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - addrutil "gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + addrutil "gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util" ) // ListenAddresses returns a list of addresses at which this swarm listens. diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_conn.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_conn.go similarity index 92% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_conn.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_conn.go index 13ca5ea4d6..b21fe2f66e 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_conn.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_conn.go @@ -5,12 +5,12 @@ import ( "fmt" "sync" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // TODO: Put this elsewhere. diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_dial.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_dial.go similarity index 91% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_dial.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_dial.go index f7f710b092..6370923b75 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_dial.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_dial.go @@ -7,13 +7,13 @@ import ( "sync" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - lgbl "gx/ipfs/QmVrDtvvQCUeMZaY9UFkae6c85kdQ1GvVEhPrjPTdjxRLv/go-libp2p-loggables" - addrutil "gx/ipfs/QmXeCbQtGnurbWEWuxSyHAFRUzCvdarF9aNCGKSqRNzYv6/go-addr-util" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + lgbl "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + addrutil "gx/ipfs/QmZomXpA4HrYKRV2ftnE5odWMT2JNnhAXTvEyQrzXrnyEX/go-addr-util" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) // Diagram of dial sync: @@ -275,7 +275,7 @@ func (s *Swarm) dial(ctx context.Context, p peer.ID) (*Conn, error) { logdial["dial"] = "failure" // start off with failure. set to "success" at the end. sk := s.peers.PrivKey(s.local) - logdial["encrypted"] = (sk != nil) // log wether this will be an encrypted dial or not. + logdial["encrypted"] = sk != nil // log whether this will be an encrypted dial or not. if sk == nil { // fine for sk to be nil, just log. log.Debug("Dial not given PrivateKey, so WILL NOT SECURE conn.") @@ -358,14 +358,34 @@ func (s *Swarm) dialAddrs(ctx context.Context, p peer.ID, remoteAddrs <-chan ma. defer s.limiter.clearAllPeerDials(p) var active int - for { + for remoteAddrs != nil || active > 0 { + // Check for context cancellations and/or responses first. + select { + case <-ctx.Done(): + if exitErr == defaultDialFail { + exitErr = ctx.Err() + } + return nil, exitErr + case resp := <-respch: + active-- + if resp.Err != nil { + log.Infof("got error on dial to %s: %s", resp.Addr, resp.Err) + // Errors are normal, lots of dials will fail + exitErr = resp.Err + } else if resp.Conn != nil { + return resp.Conn, nil + } + + // We got a result, try again from the top. + continue + default: + } + + // Now, attempt to dial. select { case addr, ok := <-remoteAddrs: if !ok { remoteAddrs = nil - if active == 0 { - return nil, exitErr - } continue } @@ -382,15 +402,12 @@ func (s *Swarm) dialAddrs(ctx context.Context, p peer.ID, remoteAddrs <-chan ma. log.Infof("got error on dial to %s: %s", resp.Addr, resp.Err) // Errors are normal, lots of dials will fail exitErr = resp.Err - - if remoteAddrs == nil && active == 0 { - return nil, exitErr - } } else if resp.Conn != nil { return resp.Conn, nil } } } + return nil, exitErr } // limitedDial will start a dial to the given peer when diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_listen.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_listen.go similarity index 89% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_listen.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_listen.go index 85699b0fb2..d68976496b 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_listen.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_listen.go @@ -3,8 +3,8 @@ package swarm import ( "fmt" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" ) // Listen sets up listeners for all of the given addresses. @@ -74,7 +74,9 @@ func (s *Swarm) AddListenAddr(a ma.Multiaddr) error { for { c, err := list.Accept() if err != nil { - log.Warningf("swarm listener accept error: %s", err) + if s.ctx.Err() == nil { + log.Errorf("swarm listener accept error: %s", err) + } return } log.Debugf("swarm listener accepted connection: %s", c) diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_stream.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_stream.go similarity index 97% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_stream.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_stream.go index 9ebb6e792b..8ecba887c6 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_stream.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_stream.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" ) diff --git a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_transport.go b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_transport.go similarity index 88% rename from vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_transport.go rename to vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_transport.go index f3831c6a86..93da360223 100644 --- a/vendor/gx/ipfs/QmVHhT8NxtApPTndiZPe4JNGNUxGWtJe3ebyxtRz4HnbEp/go-libp2p-swarm/swarm_transport.go +++ b/vendor/gx/ipfs/Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq/go-libp2p-swarm/swarm_transport.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // TransportForDialing retrieves the appropriate transport for dialing the given @@ -70,6 +70,10 @@ func (s *Swarm) TransportForListening(a ma.Multiaddr) transport.Transport { func (s *Swarm) AddTransport(t transport.Transport) error { protocols := t.Protocols() + if len(protocols) == 0 { + return fmt.Errorf("useless transport handles no protocols: %T", t) + } + s.transports.Lock() defer s.transports.Unlock() var registered []string diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/identity.go b/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/identity.go deleted file mode 100644 index 397ccc7400..0000000000 --- a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/identity.go +++ /dev/null @@ -1,60 +0,0 @@ -package testutil - -import ( - "testing" - - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -type Identity interface { - Address() ma.Multiaddr - ID() peer.ID - PrivateKey() ci.PrivKey - PublicKey() ci.PubKey -} - -// TODO add a cheaper way to generate identities - -func RandIdentity() (Identity, error) { - p, err := RandPeerNetParams() - if err != nil { - return nil, err - } - return &identity{*p}, nil -} - -func RandIdentityOrFatal(t *testing.T) Identity { - p, err := RandPeerNetParams() - if err != nil { - t.Fatal(err) - } - return &identity{*p} -} - -// identity is a temporary shim to delay binding of PeerNetParams. -type identity struct { - PeerNetParams -} - -func (p *identity) ID() peer.ID { - return p.PeerNetParams.ID -} - -func (p *identity) Address() ma.Multiaddr { - return p.Addr -} - -func (p *identity) PrivateKey() ci.PrivKey { - return p.PrivKey -} - -func (p *identity) PublicKey() ci.PubKey { - return p.PubKey -} - -// NewIdentity constructs a new identity object with specific parameters -func NewIdentity(ID peer.ID, addr ma.Multiaddr, privk ci.PrivKey, pubk ci.PubKey) Identity { - return &identity{PeerNetParams{ID: ID, Addr: addr, PrivKey: privk, PubKey: pubk}} -} diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/package.json b/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/package.json deleted file mode 100644 index 228b700079..0000000000 --- a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-testutil" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-testutil", - "goversion": "1.7" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "MIT", - "name": "go-testutil", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.2.10" -} - diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/.travis.yml b/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/.travis.yml deleted file mode 100644 index 468b0499b6..0000000000 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -script: - - make deps - - go test ./... - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/README.md b/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/README.md deleted file mode 100644 index 672e4605d8..0000000000 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# go-libp2p-record - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) - -> signed records for use with routing systems - -## Documenation - -See https://godoc.org/github.com/libp2p/go-libp2p-record. - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-key/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License - -MIT \ No newline at end of file diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/package.json b/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/package.json deleted file mode 100644 index c6f477f1ec..0000000000 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-record" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-record", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-record", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "4.1.8" -} - diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/record.pb.go b/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/record.pb.go deleted file mode 100644 index fa5bb90702..0000000000 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/record.pb.go +++ /dev/null @@ -1,435 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: record.proto - -package record_pb - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// Record represents a dht record that contains a value -// for a key value pair -type Record struct { - // The key that references this record - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The actual value this record is storing - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Time the record was received, set by receiver - TimeReceived string `protobuf:"bytes,5,opt,name=timeReceived,proto3" json:"timeReceived,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Record) Reset() { *m = Record{} } -func (m *Record) String() string { return proto.CompactTextString(m) } -func (*Record) ProtoMessage() {} -func (*Record) Descriptor() ([]byte, []int) { - return fileDescriptor_record_4db3afde4cc8746e, []int{0} -} -func (m *Record) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Record.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Record) XXX_Merge(src proto.Message) { - xxx_messageInfo_Record.Merge(dst, src) -} -func (m *Record) XXX_Size() int { - return m.Size() -} -func (m *Record) XXX_DiscardUnknown() { - xxx_messageInfo_Record.DiscardUnknown(m) -} - -var xxx_messageInfo_Record proto.InternalMessageInfo - -func (m *Record) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *Record) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *Record) GetTimeReceived() string { - if m != nil { - return m.TimeReceived - } - return "" -} - -func init() { - proto.RegisterType((*Record)(nil), "record.pb.Record") -} -func (m *Record) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Record) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRecord(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRecord(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if len(m.TimeReceived) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintRecord(dAtA, i, uint64(len(m.TimeReceived))) - i += copy(dAtA[i:], m.TimeReceived) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintRecord(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Record) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRecord(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovRecord(uint64(l)) - } - l = len(m.TimeReceived) - if l > 0 { - n += 1 + l + sovRecord(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRecord(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRecord(x uint64) (n int) { - return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Record) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Record: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRecord - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRecord - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeReceived", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecord - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeReceived = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRecord(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthRecord - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRecord(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("record.proto", fileDescriptor_record_4db3afde4cc8746e) } - -var fileDescriptor_record_4db3afde4cc8746e = []byte{ - // 125 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0x4d, 0xce, - 0x2f, 0x4a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0xf1, 0x92, 0x94, 0x42, 0xb8, - 0xd8, 0x82, 0xc0, 0x1c, 0x21, 0x01, 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, - 0x9e, 0x20, 0x10, 0x53, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, - 0x06, 0xe1, 0x08, 0x29, 0x71, 0xf1, 0x94, 0x64, 0xe6, 0xa6, 0x06, 0xa5, 0x26, 0xa7, 0x66, 0x96, - 0xa5, 0xa6, 0x48, 0xb0, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xa1, 0x88, 0x39, 0xf1, 0x9c, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, 0x5b, 0x8d, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x64, 0x43, 0x08, 0x1c, 0x85, 0x00, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/record.go b/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/record.go deleted file mode 100644 index b60b7020b8..0000000000 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/record.go +++ /dev/null @@ -1,13 +0,0 @@ -package record - -import ( - pb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" -) - -// MakePutRecord creates a dht record for the given key/value pair -func MakePutRecord(key string, value []byte) *pb.Record { - record := new(pb.Record) - record.Key = []byte(key) - record.Value = value - return record -} diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/.travis.yml b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/.travis.yml new file mode 100644 index 0000000000..58d60ddf4a --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/.travis.yml @@ -0,0 +1,22 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/LICENSE b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/LICENSE rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/LICENSE diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/Makefile b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/Makefile similarity index 100% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/Makefile rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/Makefile diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/README.md b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/README.md new file mode 100644 index 0000000000..e730e273b4 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/README.md @@ -0,0 +1,32 @@ +# go-libp2p-peerstore +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-peerstore?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p-peerstore) +[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-libp2p-peerstore/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-libp2p-peerstore?branch=master) +[![Build Status](https://travis-ci.org/libp2p/go-libp2p-peerstore.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-peerstore) + +> An object to manage peers, their addresses, and other metadata about them. + +## Install + +```sh +go get github.com/libp2p/go-libp2p-peerstore +``` + +## Usage + +Check out the [GoDocs](https://godoc.org/github.com/libp2p/go-libp2p-peerstore). + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-libp2p-peerstore/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +### Want to hack on IPFS? + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) + +## License +MIT diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/addrsrcs.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/addrsrcs.go similarity index 96% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/addrsrcs.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/addrsrcs.go index 29e523043e..4b55831838 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr/addrsrcs.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/addrsrcs.go @@ -2,7 +2,7 @@ package addr import ( - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // AddrSource is a source of addresses. It allows clients to retrieve diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/sorting.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/sorting.go new file mode 100644 index 0000000000..2636629f18 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr/sorting.go @@ -0,0 +1,62 @@ +package addr + +import ( + "bytes" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + mafmt "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +func isFDCostlyTransport(a ma.Multiaddr) bool { + return mafmt.TCP.Matches(a) +} + +type AddrList []ma.Multiaddr + +func (al AddrList) Len() int { + return len(al) +} + +func (al AddrList) Swap(i, j int) { + al[i], al[j] = al[j], al[i] +} + +func (al AddrList) Less(i, j int) bool { + a := al[i] + b := al[j] + + // dial localhost addresses next, they should fail immediately + lba := manet.IsIPLoopback(a) + lbb := manet.IsIPLoopback(b) + if lba { + if !lbb { + return true + } + } + + // dial utp and similar 'non-fd-consuming' addresses first + fda := isFDCostlyTransport(a) + fdb := isFDCostlyTransport(b) + if !fda { + if fdb { + return true + } + + // if neither consume fd's, assume equal ordering + return false + } + + // if 'b' doesnt take a file descriptor + if !fdb { + return false + } + + // if 'b' is loopback and both take file descriptors + if lbb { + return false + } + + // for the rest, just sort by bytes + return bytes.Compare(a.Bytes(), b.Bytes()) > 0 +} diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/codecov.yml b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/codecov.yml new file mode 100644 index 0000000000..96dcfd7890 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/codecov.yml @@ -0,0 +1,5 @@ +coverage: + range: "50...100" +comment: off +ignore: + - "pb/*.pb.go" \ No newline at end of file diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/interface.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/interface.go new file mode 100644 index 0000000000..eebf766967 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/interface.go @@ -0,0 +1,143 @@ +package peerstore + +import ( + "context" + "errors" + "io" + "math" + "time" + + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +var ErrNotFound = errors.New("item not found") + +var ( + // AddressTTL is the expiration time of addresses. + AddressTTL = time.Hour + + // TempAddrTTL is the ttl used for a short lived address + TempAddrTTL = time.Second * 10 + + // ProviderAddrTTL is the TTL of an address we've received from a provider. + // This is also a temporary address, but lasts longer. After this expires, + // the records we return will require an extra lookup. + ProviderAddrTTL = time.Minute * 10 + + // RecentlyConnectedAddrTTL is used when we recently connected to a peer. + // It means that we are reasonably certain of the peer's address. + RecentlyConnectedAddrTTL = time.Minute * 10 + + // OwnObservedAddrTTL is used for our own external addresses observed by peers. + OwnObservedAddrTTL = time.Minute * 10 +) + +// Permanent TTLs (distinct so we can distinguish between them, constant as they +// are, in fact, permanent) +const ( + + // PermanentAddrTTL is the ttl for a "permanent address" (e.g. bootstrap nodes). + PermanentAddrTTL = math.MaxInt64 - iota + + // ConnectedAddrTTL is the ttl used for the addresses of a peer to whom + // we're connected directly. This is basically permanent, as we will + // clear them + re-add under a TempAddrTTL after disconnecting. + ConnectedAddrTTL +) + +// Peerstore provides a threadsafe store of Peer related +// information. +type Peerstore interface { + io.Closer + + AddrBook + KeyBook + PeerMetadata + Metrics + + // PeerInfo returns a peer.PeerInfo struct for given peer.ID. + // This is a small slice of the information Peerstore has on + // that peer, useful to other services. + PeerInfo(peer.ID) PeerInfo + + GetProtocols(peer.ID) ([]string, error) + AddProtocols(peer.ID, ...string) error + SetProtocols(peer.ID, ...string) error + SupportsProtocols(peer.ID, ...string) ([]string, error) + + // Peers returns all of the peer IDs stored across all inner stores. + Peers() peer.IDSlice +} + +// PeerMetadata can handle values of any type. Serializing values is +// up to the implementation. Dynamic type introspection may not be +// supported, in which case explicitly enlisting types in the +// serializer may be required. +// +// Refer to the docs of the underlying implementation for more +// information. +type PeerMetadata interface { + // Get/Put is a simple registry for other peer-related key/value pairs. + // if we find something we use often, it should become its own set of + // methods. this is a last resort. + Get(p peer.ID, key string) (interface{}, error) + Put(p peer.ID, key string, val interface{}) error +} + +// AddrBook holds the multiaddrs of peers. +type AddrBook interface { + + // AddAddr calls AddAddrs(p, []ma.Multiaddr{addr}, ttl) + AddAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration) + + // AddAddrs gives this AddrBook addresses to use, with a given ttl + // (time-to-live), after which the address is no longer valid. + // If the manager has a longer TTL, the operation is a no-op for that address + AddAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) + + // SetAddr calls mgr.SetAddrs(p, addr, ttl) + SetAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration) + + // SetAddrs sets the ttl on addresses. This clears any TTL there previously. + // This is used when we receive the best estimate of the validity of an address. + SetAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) + + // UpdateAddrs updates the addresses associated with the given peer that have + // the given oldTTL to have the given newTTL. + UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL time.Duration) + + // Addresses returns all known (and valid) addresses for a given peer + Addrs(p peer.ID) []ma.Multiaddr + + // AddrStream returns a channel that gets all addresses for a given + // peer sent on it. If new addresses are added after the call is made + // they will be sent along through the channel as well. + AddrStream(context.Context, peer.ID) <-chan ma.Multiaddr + + // ClearAddresses removes all previously stored addresses + ClearAddrs(p peer.ID) + + // PeersWithAddrs returns all of the peer IDs stored in the AddrBook + PeersWithAddrs() peer.IDSlice +} + +// KeyBook tracks the keys of Peers. +type KeyBook interface { + + // PubKey stores the public key of a peer. + PubKey(peer.ID) ic.PubKey + + // AddPubKey stores the public key of a peer. + AddPubKey(peer.ID, ic.PubKey) error + + // PrivKey returns the private key of a peer. + PrivKey(peer.ID) ic.PrivKey + + // AddPrivKey stores the private key of a peer. + AddPrivKey(peer.ID, ic.PrivKey) error + + // PeersWithKeys returns all the peer IDs stored in the KeyBook + PeersWithKeys() peer.IDSlice +} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/metrics.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/metrics.go similarity index 95% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/metrics.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/metrics.go index db4fe7873b..9de535932d 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/metrics.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/metrics.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // LatencyEWMASmooting governs the decay of the EWMA (the speed diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/package.json b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/package.json new file mode 100644 index 0000000000..4532cc1b6c --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/package.json @@ -0,0 +1,100 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-peerstore" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-peerstore" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc", + "name": "go-keyspace", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "jbenet", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "magik6k", + "hash": "QmTNJogwkhnbHeRmAXWtzvN2KgVko2oNmHHQN1ggHVhF91", + "name": "go-ds-badger", + "version": "1.12.3" + }, + { + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + }, + { + "author": "Stebalien", + "hash": "QmQDvJoB6aJWN3sjr3xsgXqKCXf4jU5zdMXpDMsBkYVNqa", + "name": "go-buffer-pool", + "version": "0.1.3" + }, + { + "author": "whyrusleeping", + "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", + "name": "base32", + "version": "0.0.2" + }, + { + "author": "whyrusleeping", + "hash": "QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk", + "name": "go-ds-leveldb", + "version": "1.3.0" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-peerstore", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.19" +} + diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerinfo.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerinfo.go similarity index 93% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerinfo.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerinfo.go index 371006dc70..5207ed5e99 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/peerinfo.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerinfo.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // PeerInfo is a small struct used to pass around a peer with @@ -77,7 +77,7 @@ func (pi *PeerInfo) Loggable() map[string]interface{} { } } -func (pi *PeerInfo) MarshalJSON() ([]byte, error) { +func (pi PeerInfo) MarshalJSON() ([]byte, error) { out := make(map[string]interface{}) out["ID"] = pi.ID.Pretty() var addrs []string diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerstore.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerstore.go new file mode 100644 index 0000000000..a7fec16527 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/peerstore.go @@ -0,0 +1,170 @@ +package peerstore + +import ( + "fmt" + "io" + "sync" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +var _ Peerstore = (*peerstore)(nil) + +type peerstore struct { + Metrics + + KeyBook + AddrBook + PeerMetadata + + // lock for protocol information, separate from datastore lock + protolock sync.Mutex +} + +// NewPeerstore creates a data structure that stores peer data, backed by the +// supplied implementations of KeyBook, AddrBook and PeerMetadata. +func NewPeerstore(kb KeyBook, ab AddrBook, md PeerMetadata) Peerstore { + return &peerstore{ + KeyBook: kb, + AddrBook: ab, + PeerMetadata: md, + Metrics: NewMetrics(), + } +} + +func (ps *peerstore) Close() (err error) { + var errs []error + weakClose := func(name string, c interface{}) { + if cl, ok := c.(io.Closer); ok { + if err = cl.Close(); err != nil { + errs = append(errs, fmt.Errorf("%s error: %s", name, err)) + } + } + } + + weakClose("keybook", ps.KeyBook) + weakClose("addressbook", ps.AddrBook) + weakClose("peermetadata", ps.PeerMetadata) + + if len(errs) > 0 { + return fmt.Errorf("failed while closing peerstore; err(s): %q", errs) + } + return nil +} + +func (ps *peerstore) Peers() peer.IDSlice { + set := map[peer.ID]struct{}{} + for _, p := range ps.PeersWithKeys() { + set[p] = struct{}{} + } + for _, p := range ps.PeersWithAddrs() { + set[p] = struct{}{} + } + + pps := make(peer.IDSlice, 0, len(set)) + for p := range set { + pps = append(pps, p) + } + return pps +} + +func (ps *peerstore) PeerInfo(p peer.ID) PeerInfo { + return PeerInfo{ + ID: p, + Addrs: ps.AddrBook.Addrs(p), + } +} + +func (ps *peerstore) SetProtocols(p peer.ID, protos ...string) error { + ps.protolock.Lock() + defer ps.protolock.Unlock() + + protomap := make(map[string]struct{}) + for _, proto := range protos { + protomap[proto] = struct{}{} + } + + return ps.Put(p, "protocols", protomap) +} + +func (ps *peerstore) AddProtocols(p peer.ID, protos ...string) error { + ps.protolock.Lock() + defer ps.protolock.Unlock() + protomap, err := ps.getProtocolMap(p) + if err != nil { + return err + } + + for _, proto := range protos { + protomap[proto] = struct{}{} + } + + return ps.Put(p, "protocols", protomap) +} + +func (ps *peerstore) getProtocolMap(p peer.ID) (map[string]struct{}, error) { + iprotomap, err := ps.Get(p, "protocols") + switch err { + default: + return nil, err + case ErrNotFound: + return make(map[string]struct{}), nil + case nil: + cast, ok := iprotomap.(map[string]struct{}) + if !ok { + return nil, fmt.Errorf("stored protocol set was not a map") + } + + return cast, nil + } +} + +func (ps *peerstore) GetProtocols(p peer.ID) ([]string, error) { + ps.protolock.Lock() + defer ps.protolock.Unlock() + pmap, err := ps.getProtocolMap(p) + if err != nil { + return nil, err + } + + var out []string + for k := range pmap { + out = append(out, k) + } + + return out, nil +} + +func (ps *peerstore) SupportsProtocols(p peer.ID, protos ...string) ([]string, error) { + ps.protolock.Lock() + defer ps.protolock.Unlock() + pmap, err := ps.getProtocolMap(p) + if err != nil { + return nil, err + } + + var out []string + for _, proto := range protos { + if _, ok := pmap[proto]; ok { + out = append(out, proto) + } + } + + return out, nil +} + +func PeerInfos(ps Peerstore, peers peer.IDSlice) []PeerInfo { + pi := make([]PeerInfo, len(peers)) + for i, p := range peers { + pi[i] = ps.PeerInfo(p) + } + return pi +} + +func PeerInfoIDs(pis []PeerInfo) peer.IDSlice { + ps := make(peer.IDSlice, len(pis)) + for i, pi := range pis { + ps[i] = pi.ID + } + return ps +} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/addr_book.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/addr_book.go similarity index 96% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/addr_book.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/addr_book.go index 3bc69b1a1c..bd9fd98662 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/addr_book.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/addr_book.go @@ -6,12 +6,12 @@ import ( "sync" "time" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - addr "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/addr" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + addr "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/addr" ) var log = logging.Logger("peerstore") diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/keybook.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/keybook.go similarity index 89% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/keybook.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/keybook.go index 9df824816a..0f25bbfb9d 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/keybook.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/keybook.go @@ -4,10 +4,10 @@ import ( "errors" "sync" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + ic "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) type memoryKeyBook struct { diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/metadata.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/metadata.go similarity index 87% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/metadata.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/metadata.go index d342e7b869..d688063b62 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/pstoremem/metadata.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/metadata.go @@ -3,8 +3,8 @@ package pstoremem import ( "sync" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" ) type memoryPeerMetadata struct { diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/peerstore.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/peerstore.go new file mode 100644 index 0000000000..75dbb18ac1 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/pstoremem/peerstore.go @@ -0,0 +1,11 @@ +package pstoremem + +import pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + +// NewPeerstore creates an in-memory threadsafe collection of peers. +func NewPeerstore() pstore.Peerstore { + return pstore.NewPeerstore( + NewKeyBook(), + NewAddrBook(), + NewPeerMetadata()) +} diff --git a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/distance.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/distance.go similarity index 96% rename from vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/distance.go rename to vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/distance.go index 3f6254b0aa..51e4b2021d 100644 --- a/vendor/gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore/queue/distance.go +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/distance.go @@ -5,8 +5,8 @@ import ( "math/big" "sync" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" ks "gx/ipfs/QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc/go-keyspace" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // peerMetric tracks a peer and its distance to something else. diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/interface.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/interface.go new file mode 100644 index 0000000000..83120b4969 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/interface.go @@ -0,0 +1,18 @@ +package queue + +import "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + +// PeerQueue maintains a set of peers ordered according to a metric. +// Implementations of PeerQueue could order peers based on distances along +// a KeySpace, latency measurements, trustworthiness, reputation, etc. +type PeerQueue interface { + + // Len returns the number of items in PeerQueue + Len() int + + // Enqueue adds this node to the queue. + Enqueue(peer.ID) + + // Dequeue retrieves the highest (smallest int) priority node + Dequeue() peer.ID +} diff --git a/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/sync.go b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/sync.go new file mode 100644 index 0000000000..fb89187f34 --- /dev/null +++ b/vendor/gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue/sync.go @@ -0,0 +1,85 @@ +package queue + +import ( + "context" + + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("peerqueue") + +// ChanQueue makes any PeerQueue synchronizable through channels. +type ChanQueue struct { + Queue PeerQueue + EnqChan chan<- peer.ID + DeqChan <-chan peer.ID +} + +// NewChanQueue creates a ChanQueue by wrapping pq. +func NewChanQueue(ctx context.Context, pq PeerQueue) *ChanQueue { + cq := &ChanQueue{Queue: pq} + cq.process(ctx) + return cq +} + +func (cq *ChanQueue) process(ctx context.Context) { + // construct the channels here to be able to use them bidirectionally + enqChan := make(chan peer.ID) + deqChan := make(chan peer.ID) + + cq.EnqChan = enqChan + cq.DeqChan = deqChan + + go func() { + log.Debug("processing") + defer log.Debug("closed") + defer close(deqChan) + + var next peer.ID + var item peer.ID + var more bool + + for { + if cq.Queue.Len() == 0 { + // log.Debug("wait for enqueue") + select { + case next, more = <-enqChan: + if !more { + return + } + // log.Debug("got", next) + + case <-ctx.Done(): + return + } + + } else { + next = cq.Queue.Dequeue() + // log.Debug("peek", next) + } + + select { + case item, more = <-enqChan: + if !more { + if cq.Queue.Len() > 0 { + return // we're done done. + } + enqChan = nil // closed, so no use. + } + // log.Debug("got", item) + cq.Queue.Enqueue(item) + cq.Queue.Enqueue(next) // order may have changed. + next = "" + + case deqChan <- next: + // log.Debug("dequeued", next) + next = "" + + case <-ctx.Done(): + return + } + } + + }() +} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/LICENSE b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/LICENSE rename to vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/LICENSE diff --git a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/Makefile b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/Makefile similarity index 100% rename from vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/Makefile rename to vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/Makefile diff --git a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/README.md b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/README.md similarity index 100% rename from vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/README.md rename to vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/README.md diff --git a/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/multiplex.go b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/multiplex.go new file mode 100644 index 0000000000..01575fa04f --- /dev/null +++ b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/multiplex.go @@ -0,0 +1,41 @@ +package peerstream_multiplex + +import ( + "net" + + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" // Conn is a connection to a remote peer. + mp "gx/ipfs/QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj/go-mplex" // Conn is a connection to a remote peer. +) + +type conn struct { + *mp.Multiplex +} + +func (c *conn) Close() error { + return c.Multiplex.Close() +} + +func (c *conn) IsClosed() bool { + return c.Multiplex.IsClosed() +} + +// OpenStream creates a new stream. +func (c *conn) OpenStream() (smux.Stream, error) { + return c.Multiplex.NewStream() +} + +// AcceptStream accepts a stream opened by the other side. +func (c *conn) AcceptStream() (smux.Stream, error) { + return c.Multiplex.Accept() +} + +// Transport is a go-peerstream transport that constructs +// multiplex-backed connections. +type Transport struct{} + +// DefaultTransport has default settings for multiplex +var DefaultTransport = &Transport{} + +func (t *Transport) NewConn(nc net.Conn, isServer bool) (smux.Conn, error) { + return &conn{mp.NewMultiplex(nc, isServer)}, nil +} diff --git a/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/package.json b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/package.json new file mode 100644 index 0000000000..f5a975cfa5 --- /dev/null +++ b/vendor/gx/ipfs/QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc/go-smux-multiplex/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/whyrusleeping/go-smux-multiplex" + }, + "gx": { + "dvcsimport": "github.com/whyrusleeping/go-smux-multiplex" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "whyrusleeping", + "hash": "QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj", + "name": "go-mplex", + "version": "0.2.35" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "MIT", + "name": "go-smux-multiplex", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.0.19" +} + diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/.travis.yml b/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/.travis.yml deleted file mode 100644 index 311d45cc22..0000000000 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.10.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/README.md b/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/README.md deleted file mode 100644 index efd897a255..0000000000 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# go-ipns - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/ipfs/go-datastore?status.svg)](https://godoc.org/github.com/ipfs/go-ipns) - -> ipns record definitions - -This package contains all of components necessary to create, understand, and validate IPNS records. It does *not* publish or resolve those records. [`go-ipfs`](https://github.com/ipfs/go-ipfs) uses this package internally to manipulate records. - -## Usage - -To create a new IPNS record: - -```go -import ( - "time" - - ipns "github.com/ipfs/go-ipns" - crypto "github.com/libp2p/go-libp2p-crypto" -) - -// Generate a private key to sign the IPNS record with. Most of the time, -// however, you'll want to retrieve an already-existing key from IPFS using the -// go-ipfs/core/coreapi CoreAPI.KeyAPI() interface. -privateKey, publicKey, err := crypto.GenerateKeyPair(crypto.RSA, 2048) -if err != nil { - panic(err) -} - -// Create an IPNS record that expires in one hour and points to the IPFS address -// /ipfs/Qme1knMqwt1hKZbc1BmQFmnm9f36nyQGwXxPGVpVJ9rMK5 -ipnsRecord, err := ipns.Create(privateKey, []byte("/ipfs/Qme1knMqwt1hKZbc1BmQFmnm9f36nyQGwXxPGVpVJ9rMK5"), 0, time.Now().Add(1*time.Hour)) -if err != nil { - panic(err) -} -``` - -Once you have the record, you’ll need to use IPFS to *publish* it. - -There are several other major operations you can do with `go-ipns`. Check out the [API docs](https://godoc.org/github.com/ipfs/go-ipns) or look at the tests in this repo for examples. - -## Documentation - -https://godoc.org/github.com/ipfs/go-ipns - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-ipns/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License - -Copyright (c) Protocol Labs, Inc. under the **MIT license**. See [LICENSE file](./LICENSE) for details. diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/ipns.go b/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/ipns.go deleted file mode 100644 index ad4f874e28..0000000000 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/ipns.go +++ /dev/null @@ -1,168 +0,0 @@ -package ipns - -import ( - "bytes" - "fmt" - "time" - - pb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" -) - -// Create creates a new IPNS entry and signs it with the given private key. -// -// This function does not embed the public key. If you want to do that, use -// `EmbedPublicKey`. -func Create(sk ic.PrivKey, val []byte, seq uint64, eol time.Time) (*pb.IpnsEntry, error) { - entry := new(pb.IpnsEntry) - - entry.Value = val - typ := pb.IpnsEntry_EOL - entry.ValidityType = &typ - entry.Sequence = &seq - entry.Validity = []byte(u.FormatRFC3339(eol)) - - sig, err := sk.Sign(ipnsEntryDataForSig(entry)) - if err != nil { - return nil, err - } - entry.Signature = sig - - return entry, nil -} - -// Validates validates the given IPNS entry against the given public key. -func Validate(pk ic.PubKey, entry *pb.IpnsEntry) error { - // Check the ipns record signature with the public key - if ok, err := pk.Verify(ipnsEntryDataForSig(entry), entry.GetSignature()); err != nil || !ok { - return ErrSignature - } - - eol, err := GetEOL(entry) - if err != nil { - return err - } - if time.Now().After(eol) { - return ErrExpiredRecord - } - return nil -} - -// GetEOL returns the EOL of this IPNS entry -// -// This function returns ErrUnrecognizedValidity if the validity type of the -// record isn't EOL. Otherwise, it returns an error if it can't parse the EOL. -func GetEOL(entry *pb.IpnsEntry) (time.Time, error) { - if entry.GetValidityType() != pb.IpnsEntry_EOL { - return time.Time{}, ErrUnrecognizedValidity - } - return u.ParseRFC3339(string(entry.GetValidity())) -} - -// EmbedPublicKey embeds the given public key in the given ipns entry. While not -// strictly required, some nodes (e.g., DHT servers) may reject IPNS entries -// that don't embed their public keys as they may not be able to validate them -// efficiently. -func EmbedPublicKey(pk ic.PubKey, entry *pb.IpnsEntry) error { - // Try extracting the public key from the ID. If we can, *don't* embed - // it. - id, err := peer.IDFromPublicKey(pk) - if err != nil { - return err - } - if _, err := id.ExtractPublicKey(); err != peer.ErrNoPublicKey { - // Either a *real* error or nil. - return err - } - - // We failed to extract the public key from the peer ID, embed it in the - // record. - pkBytes, err := pk.Bytes() - if err != nil { - return err - } - entry.PubKey = pkBytes - return nil -} - -// ExtractPublicKey extracts a public key matching `pid` from the IPNS record, -// if possible. -// -// This function returns (nil, nil) when no public key can be extracted and -// nothing is malformed. -func ExtractPublicKey(pid peer.ID, entry *pb.IpnsEntry) (ic.PubKey, error) { - if entry.PubKey != nil { - pk, err := ic.UnmarshalPublicKey(entry.PubKey) - if err != nil { - return nil, fmt.Errorf("unmarshaling pubkey in record: %s", err) - } - - expPid, err := peer.IDFromPublicKey(pk) - if err != nil { - return nil, fmt.Errorf("could not regenerate peerID from pubkey: %s", err) - } - - if pid != expPid { - return nil, ErrPublicKeyMismatch - } - return pk, nil - } - - return pid.ExtractPublicKey() -} - -// Compare compares two IPNS entries. It returns: -// -// * -1 if a is older than b -// * 0 if a and b cannot be ordered (this doesn't mean that they are equal) -// * +1 if a is newer than b -// -// It returns an error when either a or b are malformed. -// -// NOTE: It *does not* validate the records, the caller is responsible for calling -// `Validate` first. -// -// NOTE: If a and b cannot be ordered by this function, you can determine their -// order by comparing their serialized byte representations (using -// `bytes.Compare`). You must do this if you are implementing a libp2p record -// validator (or you can just use the one provided for you by this package). -func Compare(a, b *pb.IpnsEntry) (int, error) { - as := a.GetSequence() - bs := b.GetSequence() - - if as > bs { - return 1, nil - } else if as < bs { - return -1, nil - } - - at, err := u.ParseRFC3339(string(a.GetValidity())) - if err != nil { - return 0, err - } - - bt, err := u.ParseRFC3339(string(b.GetValidity())) - if err != nil { - return 0, err - } - - if at.After(bt) { - return 1, nil - } else if bt.After(at) { - return -1, nil - } - - return 0, nil -} - -func ipnsEntryDataForSig(e *pb.IpnsEntry) []byte { - return bytes.Join([][]byte{ - e.Value, - e.Validity, - []byte(fmt.Sprint(e.GetValidityType())), - }, - []byte{}) -} diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/package.json b/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/package.json deleted file mode 100644 index a2790f300e..0000000000 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "author": "stebalien", - "bugs": { - "url": "https://github.com/ipfs/go-ipns/issues" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipns" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "hash": "Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL", - "name": "go-libp2p-record", - "version": "4.1.8" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipns", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.13" -} - diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/record.go b/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/record.go deleted file mode 100644 index 5dd95d8db8..0000000000 --- a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/record.go +++ /dev/null @@ -1,126 +0,0 @@ -package ipns - -import ( - "bytes" - "errors" - - pb "gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -var log = logging.Logger("ipns") - -var _ record.Validator = Validator{} - -// RecordKey returns the libp2p record key for a given peer ID. -func RecordKey(pid peer.ID) string { - return "/ipns/" + string(pid) -} - -// Validator is an IPNS record validator that satisfies the libp2p record -// validator interface. -type Validator struct { - // KeyBook, if non-nil, will be used to lookup keys for validating IPNS - // records. - KeyBook pstore.KeyBook -} - -// Validate validates an IPNS record. -func (v Validator) Validate(key string, value []byte) error { - ns, pidString, err := record.SplitKey(key) - if err != nil || ns != "ipns" { - return ErrInvalidPath - } - - // Parse the value into an IpnsEntry - entry := new(pb.IpnsEntry) - err = proto.Unmarshal(value, entry) - if err != nil { - return ErrBadRecord - } - - // Get the public key defined by the ipns path - pid, err := peer.IDFromString(pidString) - if err != nil { - log.Debugf("failed to parse ipns record key %s into peer ID", pidString) - return ErrKeyFormat - } - - pubk, err := v.getPublicKey(pid, entry) - if err != nil { - return err - } - - return Validate(pubk, entry) -} - -func (v Validator) getPublicKey(pid peer.ID, entry *pb.IpnsEntry) (ic.PubKey, error) { - switch pk, err := ExtractPublicKey(pid, entry); err { - case peer.ErrNoPublicKey: - case nil: - return pk, nil - default: - return nil, err - } - - if v.KeyBook == nil { - log.Debugf("public key with hash %s not found in IPNS record and no peer store provided", pid) - return nil, ErrPublicKeyNotFound - } - - pubk := v.KeyBook.PubKey(pid) - if pubk == nil { - log.Debugf("public key with hash %s not found in peer store", pid) - return nil, ErrPublicKeyNotFound - } - return pubk, nil -} - -// Select selects the best record by checking which has the highest sequence -// number and latest EOL. -// -// This function returns an error if any of the records fail to parse. Validate -// your records first! -func (v Validator) Select(k string, vals [][]byte) (int, error) { - var recs []*pb.IpnsEntry - for _, v := range vals { - e := new(pb.IpnsEntry) - if err := proto.Unmarshal(v, e); err != nil { - return -1, err - } - recs = append(recs, e) - } - - return selectRecord(recs, vals) -} - -func selectRecord(recs []*pb.IpnsEntry, vals [][]byte) (int, error) { - switch len(recs) { - case 0: - return -1, errors.New("no usable records in given set") - case 1: - return 0, nil - } - - var i int - for j := 1; j < len(recs); j++ { - cmp, err := Compare(recs[i], recs[j]) - if err != nil { - return -1, err - } - if cmp == 0 { - cmp = bytes.Compare(vals[i], vals[j]) - } - if cmp < 0 { - i = j - } - } - - return i, nil -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/.travis.yml b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/.travis.yml deleted file mode 100644 index 19b893ed7a..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/batch.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/batch.go deleted file mode 100644 index 3c0926e989..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/batch.go +++ /dev/null @@ -1,44 +0,0 @@ -package datastore - -// basicBatch implements the transaction interface for datastores who do -// not have any sort of underlying transactional support -type basicBatch struct { - puts map[Key][]byte - deletes map[Key]struct{} - - target Datastore -} - -func NewBasicBatch(ds Datastore) Batch { - return &basicBatch{ - puts: make(map[Key][]byte), - deletes: make(map[Key]struct{}), - target: ds, - } -} - -func (bt *basicBatch) Put(key Key, val []byte) error { - bt.puts[key] = val - return nil -} - -func (bt *basicBatch) Delete(key Key) error { - bt.deletes[key] = struct{}{} - return nil -} - -func (bt *basicBatch) Commit() error { - for k, val := range bt.puts { - if err := bt.target.Put(k, val); err != nil { - return err - } - } - - for k := range bt.deletes { - if err := bt.target.Delete(k); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/datastore.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/datastore.go deleted file mode 100644 index dd7abeac7a..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/datastore.go +++ /dev/null @@ -1,225 +0,0 @@ -package datastore - -import ( - "errors" - "time" - - query "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" -) - -/* -Datastore represents storage for any key-value pair. - -Datastores are general enough to be backed by all kinds of different storage: -in-memory caches, databases, a remote datastore, flat files on disk, etc. - -The general idea is to wrap a more complicated storage facility in a simple, -uniform interface, keeping the freedom of using the right tools for the job. -In particular, a Datastore can aggregate other datastores in interesting ways, -like sharded (to distribute load) or tiered access (caches before databases). - -While Datastores should be written general enough to accept all sorts of -values, some implementations will undoubtedly have to be specific (e.g. SQL -databases where fields should be decomposed into columns), particularly to -support queries efficiently. Moreover, certain datastores may enforce certain -types of values (e.g. requiring an io.Reader, a specific struct, etc) or -serialization formats (JSON, Protobufs, etc). - -IMPORTANT: No Datastore should ever Panic! This is a cross-module interface, -and thus it should behave predictably and handle exceptional conditions with -proper error reporting. Thus, all Datastore calls may return errors, which -should be checked by callers. -*/ -type Datastore interface { - // Put stores the object `value` named by `key`. - // - // The generalized Datastore interface does not impose a value type, - // allowing various datastore middleware implementations (which do not - // handle the values directly) to be composed together. - // - // Ultimately, the lowest-level datastore will need to do some value checking - // or risk getting incorrect values. It may also be useful to expose a more - // type-safe interface to your application, and do the checking up-front. - Put(key Key, value []byte) error - - // Get retrieves the object `value` named by `key`. - // Get will return ErrNotFound if the key is not mapped to a value. - Get(key Key) (value []byte, err error) - - // Has returns whether the `key` is mapped to a `value`. - // In some contexts, it may be much cheaper only to check for existence of - // a value, rather than retrieving the value itself. (e.g. HTTP HEAD). - // The default implementation is found in `GetBackedHas`. - Has(key Key) (exists bool, err error) - - // GetSize returns the size of the `value` named by `key`. - // In some contexts, it may be much cheaper to only get the size of the - // value rather than retrieving the value itself. - GetSize(key Key) (size int, err error) - - // Delete removes the value for given `key`. - Delete(key Key) error - - // Query searches the datastore and returns a query result. This function - // may return before the query actually runs. To wait for the query: - // - // result, _ := ds.Query(q) - // - // // use the channel interface; result may come in at different times - // for entry := range result.Next() { ... } - // - // // or wait for the query to be completely done - // entries, _ := result.Rest() - // for entry := range entries { ... } - // - Query(q query.Query) (query.Results, error) -} - -type Batching interface { - Datastore - - Batch() (Batch, error) -} - -var ErrBatchUnsupported = errors.New("this datastore does not support batching") - -// ThreadSafeDatastore is an interface that all threadsafe datastore should -// implement to leverage type safety checks. -type ThreadSafeDatastore interface { - Datastore - - IsThreadSafe() -} - -// CheckedDatastore is an interface that should be implemented by datastores -// which may need checking on-disk data integrity. -type CheckedDatastore interface { - Datastore - - Check() error -} - -// CheckedDatastore is an interface that should be implemented by datastores -// which want to provide a mechanism to check data integrity and/or -// error correction. -type ScrubbedDatastore interface { - Datastore - - Scrub() error -} - -// GCDatastore is an interface that should be implemented by datastores which -// don't free disk space by just removing data from them. -type GCDatastore interface { - Datastore - - CollectGarbage() error -} - -// PersistentDatastore is an interface that should be implemented by datastores -// which can report disk usage. -type PersistentDatastore interface { - Datastore - - // DiskUsage returns the space used by a datastore, in bytes. - DiskUsage() (uint64, error) -} - -// DiskUsage checks if a Datastore is a -// PersistentDatastore and returns its DiskUsage(), -// otherwise returns 0. -func DiskUsage(d Datastore) (uint64, error) { - persDs, ok := d.(PersistentDatastore) - if !ok { - return 0, nil - } - return persDs.DiskUsage() -} - -// TTLDatastore is an interface that should be implemented by datastores that -// support expiring entries. -type TTLDatastore interface { - Datastore - - PutWithTTL(key Key, value []byte, ttl time.Duration) error - SetTTL(key Key, ttl time.Duration) error - GetExpiration(key Key) (time.Time, error) -} - -// Txn extends the Datastore type. Txns allow users to batch queries and -// mutations to the Datastore into atomic groups, or transactions. Actions -// performed on a transaction will not take hold until a successful call to -// Commit has been made. Likewise, transactions can be aborted by calling -// Discard before a successful Commit has been made. -type Txn interface { - Datastore - - // Commit finalizes a transaction, attempting to commit it to the Datastore. - // May return an error if the transaction has gone stale. The presence of an - // error is an indication that the data was not committed to the Datastore. - Commit() error - // Discard throws away changes recorded in a transaction without committing - // them to the underlying Datastore. Any calls made to Discard after Commit - // has been successfully called will have no effect on the transaction and - // state of the Datastore, making it safe to defer. - Discard() -} - -// TxnDatastore is an interface that should be implemented by datastores that -// support transactions. -type TxnDatastore interface { - Datastore - - NewTransaction(readOnly bool) (Txn, error) -} - -// Errors - -// ErrNotFound is returned by Get, Has, and Delete when a datastore does not -// map the given key to a value. -var ErrNotFound = errors.New("datastore: key not found") - -// ErrInvalidType is returned by Put when a given value is incopatible with -// the type the datastore supports. This means a conversion (or serialization) -// is needed beforehand. -var ErrInvalidType = errors.New("datastore: invalid type error") - -// GetBackedHas provides a default Datastore.Has implementation. -// It exists so Datastore.Has implementations can use it, like so: -// -// func (*d SomeDatastore) Has(key Key) (exists bool, err error) { -// return GetBackedHas(d, key) -// } -func GetBackedHas(ds Datastore, key Key) (bool, error) { - _, err := ds.Get(key) - switch err { - case nil: - return true, nil - case ErrNotFound: - return false, nil - default: - return false, err - } -} - -// GetBackedSize provides a default Datastore.GetSize implementation. -// It exists so Datastore.GetSize implementations can use it, like so: -// -// func (*d SomeDatastore) GetSize(key Key) (size int, err error) { -// return GetBackedSize(d, key) -// } -func GetBackedSize(ds Datastore, key Key) (int, error) { - value, err := ds.Get(key) - if err == nil { - return len(value), nil - } - return -1, err -} - -type Batch interface { - Put(key Key, val []byte) error - - Delete(key Key) error - - Commit() error -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/delayed/delayed.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/delayed/delayed.go deleted file mode 100644 index 1ac6cd9ab6..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/delayed/delayed.go +++ /dev/null @@ -1,58 +0,0 @@ -// Package delayed wraps a datastore allowing to artificially -// delay all operations. -package delayed - -import ( - delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" -) - -// New returns a new delayed datastore. -func New(ds ds.Datastore, delay delay.D) ds.Datastore { - return &delayed{ds: ds, delay: delay} -} - -type delayed struct { - ds ds.Datastore - delay delay.D -} - -func (dds *delayed) Put(key ds.Key, value []byte) (err error) { - dds.delay.Wait() - return dds.ds.Put(key, value) -} - -func (dds *delayed) Get(key ds.Key) (value []byte, err error) { - dds.delay.Wait() - return dds.ds.Get(key) -} - -func (dds *delayed) Has(key ds.Key) (exists bool, err error) { - dds.delay.Wait() - return dds.ds.Has(key) -} - -func (dds *delayed) GetSize(key ds.Key) (size int, err error) { - dds.delay.Wait() - return dds.ds.GetSize(key) -} - -func (dds *delayed) Delete(key ds.Key) (err error) { - dds.delay.Wait() - return dds.ds.Delete(key) -} - -func (dds *delayed) Query(q dsq.Query) (dsq.Results, error) { - dds.delay.Wait() - return dds.ds.Query(q) -} - -func (dds *delayed) Batch() (ds.Batch, error) { - return ds.NewBasicBatch(dds), nil -} - -func (dds *delayed) DiskUsage() (uint64, error) { - dds.delay.Wait() - return ds.DiskUsage(dds.ds) -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/key.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/key.go deleted file mode 100644 index 5362058115..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/key.go +++ /dev/null @@ -1,302 +0,0 @@ -package datastore - -import ( - "encoding/json" - "path" - "strings" - - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - - "gx/ipfs/QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W/uuid" -) - -/* -A Key represents the unique identifier of an object. -Our Key scheme is inspired by file systems and Google App Engine key model. - -Keys are meant to be unique across a system. Keys are hierarchical, -incorporating more and more specific namespaces. Thus keys can be deemed -'children' or 'ancestors' of other keys:: - - Key("/Comedy") - Key("/Comedy/MontyPython") - -Also, every namespace can be parametrized to embed relevant object -information. For example, the Key `name` (most specific namespace) could -include the object type:: - - Key("/Comedy/MontyPython/Actor:JohnCleese") - Key("/Comedy/MontyPython/Sketch:CheeseShop") - Key("/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender") - -*/ -type Key struct { - string -} - -// NewKey constructs a key from string. it will clean the value. -func NewKey(s string) Key { - k := Key{s} - k.Clean() - return k -} - -// RawKey creates a new Key without safety checking the input. Use with care. -func RawKey(s string) Key { - // accept an empty string and fix it to avoid special cases - // elsewhere - if len(s) == 0 { - return Key{"/"} - } - - // perform a quick sanity check that the key is in the correct - // format, if it is not then it is a programmer error and it is - // okay to panic - if len(s) == 0 || s[0] != '/' || (len(s) > 1 && s[len(s)-1] == '/') { - panic("invalid datastore key: " + s) - } - - return Key{s} -} - -// KeyWithNamespaces constructs a key out of a namespace slice. -func KeyWithNamespaces(ns []string) Key { - return NewKey(strings.Join(ns, "/")) -} - -// Clean up a Key, using path.Clean. -func (k *Key) Clean() { - switch { - case len(k.string) == 0: - k.string = "/" - case k.string[0] == '/': - k.string = path.Clean(k.string) - default: - k.string = path.Clean("/" + k.string) - } -} - -// Strings is the string value of Key -func (k Key) String() string { - return k.string -} - -// Bytes returns the string value of Key as a []byte -func (k Key) Bytes() []byte { - return []byte(k.string) -} - -// Equal checks equality of two keys -func (k Key) Equal(k2 Key) bool { - return k.string == k2.string -} - -// Less checks whether this key is sorted lower than another. -func (k Key) Less(k2 Key) bool { - list1 := k.List() - list2 := k2.List() - for i, c1 := range list1 { - if len(list2) < (i + 1) { - return false - } - - c2 := list2[i] - if c1 < c2 { - return true - } else if c1 > c2 { - return false - } - // c1 == c2, continue - } - - // list1 is shorter or exactly the same. - return len(list1) < len(list2) -} - -// List returns the `list` representation of this Key. -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").List() -// ["Comedy", "MontyPythong", "Actor:JohnCleese"] -func (k Key) List() []string { - return strings.Split(k.string, "/")[1:] -} - -// Reverse returns the reverse of this Key. -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Reverse() -// NewKey("/Actor:JohnCleese/MontyPython/Comedy") -func (k Key) Reverse() Key { - l := k.List() - r := make([]string, len(l), len(l)) - for i, e := range l { - r[len(l)-i-1] = e - } - return KeyWithNamespaces(r) -} - -// Namespaces returns the `namespaces` making up this Key. -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Namespaces() -// ["Comedy", "MontyPython", "Actor:JohnCleese"] -func (k Key) Namespaces() []string { - return k.List() -} - -// BaseNamespace returns the "base" namespace of this key (path.Base(filename)) -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").BaseNamespace() -// "Actor:JohnCleese" -func (k Key) BaseNamespace() string { - n := k.Namespaces() - return n[len(n)-1] -} - -// Type returns the "type" of this key (value of last namespace). -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Type() -// "Actor" -func (k Key) Type() string { - return NamespaceType(k.BaseNamespace()) -} - -// Name returns the "name" of this key (field of last namespace). -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Name() -// "JohnCleese" -func (k Key) Name() string { - return NamespaceValue(k.BaseNamespace()) -} - -// Instance returns an "instance" of this type key (appends value to namespace). -// NewKey("/Comedy/MontyPython/Actor").Instance("JohnClesse") -// NewKey("/Comedy/MontyPython/Actor:JohnCleese") -func (k Key) Instance(s string) Key { - return NewKey(k.string + ":" + s) -} - -// Path returns the "path" of this key (parent + type). -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Path() -// NewKey("/Comedy/MontyPython/Actor") -func (k Key) Path() Key { - s := k.Parent().string + "/" + NamespaceType(k.BaseNamespace()) - return NewKey(s) -} - -// Parent returns the `parent` Key of this Key. -// NewKey("/Comedy/MontyPython/Actor:JohnCleese").Parent() -// NewKey("/Comedy/MontyPython") -func (k Key) Parent() Key { - n := k.List() - if len(n) == 1 { - return RawKey("/") - } - return NewKey(strings.Join(n[:len(n)-1], "/")) -} - -// Child returns the `child` Key of this Key. -// NewKey("/Comedy/MontyPython").Child(NewKey("Actor:JohnCleese")) -// NewKey("/Comedy/MontyPython/Actor:JohnCleese") -func (k Key) Child(k2 Key) Key { - switch { - case k.string == "/": - return k2 - case k2.string == "/": - return k - default: - return RawKey(k.string + k2.string) - } -} - -// ChildString returns the `child` Key of this Key -- string helper. -// NewKey("/Comedy/MontyPython").ChildString("Actor:JohnCleese") -// NewKey("/Comedy/MontyPython/Actor:JohnCleese") -func (k Key) ChildString(s string) Key { - return NewKey(k.string + "/" + s) -} - -// IsAncestorOf returns whether this key is a prefix of `other` -// NewKey("/Comedy").IsAncestorOf("/Comedy/MontyPython") -// true -func (k Key) IsAncestorOf(other Key) bool { - if other.string == k.string { - return false - } - return strings.HasPrefix(other.string, k.string) -} - -// IsDescendantOf returns whether this key contains another as a prefix. -// NewKey("/Comedy/MontyPython").IsDescendantOf("/Comedy") -// true -func (k Key) IsDescendantOf(other Key) bool { - if other.string == k.string { - return false - } - return strings.HasPrefix(k.string, other.string) -} - -// IsTopLevel returns whether this key has only one namespace. -func (k Key) IsTopLevel() bool { - return len(k.List()) == 1 -} - -// MarshalJSON implements the json.Marshaler interface, -// keys are represented as JSON strings -func (k Key) MarshalJSON() ([]byte, error) { - return json.Marshal(k.String()) -} - -// MarshalJSON implements the json.Unmarshaler interface, -// keys will parse any value specified as a key to a string -func (k *Key) UnmarshalJSON(data []byte) error { - var key string - if err := json.Unmarshal(data, &key); err != nil { - return err - } - *k = NewKey(key) - return nil -} - -// RandomKey returns a randomly (uuid) generated key. -// RandomKey() -// NewKey("/f98719ea086343f7b71f32ea9d9d521d") -func RandomKey() Key { - return NewKey(strings.Replace(uuid.New().String(), "-", "", -1)) -} - -/* -A Key Namespace is like a path element. -A namespace can optionally include a type (delimited by ':') - - > NamespaceValue("Song:PhilosopherSong") - PhilosopherSong - > NamespaceType("Song:PhilosopherSong") - Song - > NamespaceType("Music:Song:PhilosopherSong") - Music:Song -*/ - -// NamespaceType is the first component of a namespace. `foo` in `foo:bar` -func NamespaceType(namespace string) string { - parts := strings.Split(namespace, ":") - if len(parts) < 2 { - return "" - } - return strings.Join(parts[0:len(parts)-1], ":") -} - -// NamespaceValue returns the last component of a namespace. `baz` in `f:b:baz` -func NamespaceValue(namespace string) string { - parts := strings.Split(namespace, ":") - return parts[len(parts)-1] -} - -// KeySlice attaches the methods of sort.Interface to []Key, -// sorting in increasing order. -type KeySlice []Key - -func (p KeySlice) Len() int { return len(p) } -func (p KeySlice) Less(i, j int) bool { return p[i].Less(p[j]) } -func (p KeySlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -// EntryKeys -func EntryKeys(e []dsq.Entry) []Key { - ks := make([]Key, len(e)) - for i, e := range e { - ks[i] = NewKey(e.Key) - } - return ks -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/interface.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/interface.go deleted file mode 100644 index 17944cb043..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/keytransform/interface.go +++ /dev/null @@ -1,34 +0,0 @@ -package keytransform - -import ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - -// KeyMapping is a function that maps one key to annother -type KeyMapping func(ds.Key) ds.Key - -// KeyTransform is an object with a pair of functions for (invertibly) -// transforming keys -type KeyTransform interface { - ConvertKey(ds.Key) ds.Key - InvertKey(ds.Key) ds.Key -} - -// Datastore is a keytransform.Datastore -type Datastore interface { - ds.Shim - KeyTransform -} - -// Wrap wraps a given datastore with a KeyTransform function. -// The resulting wrapped datastore will use the transform on all Datastore -// operations. -func Wrap(child ds.Datastore, t KeyTransform) *ktds { - if t == nil { - panic("t (KeyTransform) is nil") - } - - if child == nil { - panic("child (ds.Datastore) is nil") - } - - return &ktds{child: child, KeyTransform: t} -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/package.json b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/package.json deleted file mode 100644 index d0b895143d..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "author": "jbenet", - "bugs": { - "url": "https://github.com/jbenet/go-datastore" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-datastore" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "gustavo", - "hash": "QmYBJ8BXPDTMnzLFdv4rS5kbR1fUFASDVDpK7ZbeWMx6hq", - "name": "go-check", - "version": "1.0.0" - }, - { - "author": "hsanjuan", - "hash": "QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL", - "name": "go-ipfs-delay", - "version": "0.0.1" - }, - { - "author": "google", - "hash": "QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W", - "name": "uuid", - "version": "0.1.0" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "go-datastore", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.4.0" -} - diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/order.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/order.go deleted file mode 100644 index 8fa987ba4f..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/order.go +++ /dev/null @@ -1,66 +0,0 @@ -package query - -import ( - "sort" -) - -// Order is an object used to order objects -type Order interface { - - // Sort sorts the Entry slice according to - // the Order criteria. - Sort([]Entry) -} - -// OrderByValue is used to signal to datastores they -// should apply internal orderings. unfortunately, there -// is no way to apply order comparisons to interface{} types -// in Go, so if the datastore doesnt have a special way to -// handle these comparisons, you must provide an Order -// implementation that casts to the correct type. -type OrderByValue struct { - TypedOrder Order -} - -func (o OrderByValue) Sort(res []Entry) { - if o.TypedOrder == nil { - panic("cannot order interface{} by value. see query docs.") - } - o.TypedOrder.Sort(res) -} - -// OrderByValueDescending is used to signal to datastores they -// should apply internal orderings. unfortunately, there -// is no way to apply order comparisons to interface{} types -// in Go, so if the datastore doesnt have a special way to -// handle these comparisons, you are SOL. -type OrderByValueDescending struct { - TypedOrder Order -} - -func (o OrderByValueDescending) Sort(res []Entry) { - if o.TypedOrder == nil { - panic("cannot order interface{} by value. see query docs.") - } - o.TypedOrder.Sort(res) -} - -// OrderByKey -type OrderByKey struct{} - -func (o OrderByKey) Sort(res []Entry) { - sort.Stable(reByKey(res)) -} - -// OrderByKeyDescending -type OrderByKeyDescending struct{} - -func (o OrderByKeyDescending) Sort(res []Entry) { - sort.Stable(sort.Reverse(reByKey(res))) -} - -type reByKey []Entry - -func (s reByKey) Len() int { return len(s) } -func (s reByKey) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s reByKey) Less(i, j int) bool { return s[i].Key < s[j].Key } diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query.go deleted file mode 100644 index 5435b1a3e1..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query/query.go +++ /dev/null @@ -1,379 +0,0 @@ -package query - -import ( - "time" - - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" -) - -/* -Query represents storage for any key-value pair. - -tl;dr: - - queries are supported across datastores. - Cheap on top of relational dbs, and expensive otherwise. - Pick the right tool for the job! - -In addition to the key-value store get and set semantics, datastore -provides an interface to retrieve multiple records at a time through -the use of queries. The datastore Query model gleans a common set of -operations performed when querying. To avoid pasting here years of -database research, let’s summarize the operations datastore supports. - -Query Operations: - - * namespace - scope the query, usually by object type - * filters - select a subset of values by applying constraints - * orders - sort the results by applying sort conditions - * limit - impose a numeric limit on the number of results - * offset - skip a number of results (for efficient pagination) - -datastore combines these operations into a simple Query class that allows -applications to define their constraints in a simple, generic, way without -introducing datastore specific calls, languages, etc. - -Of course, different datastores provide relational query support across a -wide spectrum, from full support in traditional databases to none at all in -most key-value stores. Datastore aims to provide a common, simple interface -for the sake of application evolution over time and keeping large code bases -free of tool-specific code. It would be ridiculous to claim to support high- -performance queries on architectures that obviously do not. Instead, datastore -provides the interface, ideally translating queries to their native form -(e.g. into SQL for MySQL). - -However, on the wrong datastore, queries can potentially incur the high cost -of performing the aforemantioned query operations on the data set directly in -Go. It is the client’s responsibility to select the right tool for the job: -pick a data storage solution that fits the application’s needs now, and wrap -it with a datastore implementation. As the needs change, swap out datastore -implementations to support your new use cases. Some applications, particularly -in early development stages, can afford to incurr the cost of queries on non- -relational databases (e.g. using a FSDatastore and not worry about a database -at all). When it comes time to switch the tool for performance, updating the -application code can be as simple as swapping the datastore in one place, not -all over the application code base. This gain in engineering time, both at -initial development and during later iterations, can significantly offset the -cost of the layer of abstraction. - -*/ -type Query struct { - Prefix string // namespaces the query to results whose keys have Prefix - Filters []Filter // filter results. apply sequentially - Orders []Order // order results. apply sequentially - Limit int // maximum number of results - Offset int // skip given number of results - KeysOnly bool // return only keys. - ReturnExpirations bool // return expirations (see TTLDatastore) -} - -// Entry is a query result entry. -type Entry struct { - Key string // cant be ds.Key because circular imports ...!!! - Value []byte // Will be nil if KeysOnly has been passed. - Expiration time.Time // Entry expiration timestamp if requested and supported (see TTLDatastore). -} - -// Result is a special entry that includes an error, so that the client -// may be warned about internal errors. -type Result struct { - Entry - - Error error -} - -// Results is a set of Query results. This is the interface for clients. -// Example: -// -// qr, _ := myds.Query(q) -// for r := range qr.Next() { -// if r.Error != nil { -// // handle. -// break -// } -// -// fmt.Println(r.Entry.Key, r.Entry.Value) -// } -// -// or, wait on all results at once: -// -// qr, _ := myds.Query(q) -// es, _ := qr.Rest() -// for _, e := range es { -// fmt.Println(e.Key, e.Value) -// } -// -type Results interface { - Query() Query // the query these Results correspond to - Next() <-chan Result // returns a channel to wait for the next result - NextSync() (Result, bool) // blocks and waits to return the next result, second paramter returns false when results are exhausted - Rest() ([]Entry, error) // waits till processing finishes, returns all entries at once. - Close() error // client may call Close to signal early exit - - // Process returns a goprocess.Process associated with these results. - // most users will not need this function (Close is all they want), - // but it's here in case you want to connect the results to other - // goprocess-friendly things. - Process() goprocess.Process -} - -// results implements Results -type results struct { - query Query - proc goprocess.Process - res <-chan Result -} - -func (r *results) Next() <-chan Result { - return r.res -} - -func (r *results) NextSync() (Result, bool) { - val, ok := <-r.res - return val, ok -} - -func (r *results) Rest() ([]Entry, error) { - var es []Entry - for e := range r.res { - if e.Error != nil { - return es, e.Error - } - es = append(es, e.Entry) - } - <-r.proc.Closed() // wait till the processing finishes. - return es, nil -} - -func (r *results) Process() goprocess.Process { - return r.proc -} - -func (r *results) Close() error { - return r.proc.Close() -} - -func (r *results) Query() Query { - return r.query -} - -// ResultBuilder is what implementors use to construct results -// Implementors of datastores and their clients must respect the -// Process of the Request: -// -// * clients must call r.Process().Close() on an early exit, so -// implementations can reclaim resources. -// * if the Entries are read to completion (channel closed), Process -// should be closed automatically. -// * datastores must respect <-Process.Closing(), which intermediates -// an early close signal from the client. -// -type ResultBuilder struct { - Query Query - Process goprocess.Process - Output chan Result -} - -// Results returns a Results to to this builder. -func (rb *ResultBuilder) Results() Results { - return &results{ - query: rb.Query, - proc: rb.Process, - res: rb.Output, - } -} - -const NormalBufSize = 1 -const KeysOnlyBufSize = 128 - -func NewResultBuilder(q Query) *ResultBuilder { - bufSize := NormalBufSize - if q.KeysOnly { - bufSize = KeysOnlyBufSize - } - b := &ResultBuilder{ - Query: q, - Output: make(chan Result, bufSize), - } - b.Process = goprocess.WithTeardown(func() error { - close(b.Output) - return nil - }) - return b -} - -// ResultsWithChan returns a Results object from a channel -// of Result entries. Respects its own Close() -func ResultsWithChan(q Query, res <-chan Result) Results { - b := NewResultBuilder(q) - - // go consume all the entries and add them to the results. - b.Process.Go(func(worker goprocess.Process) { - for { - select { - case <-worker.Closing(): // client told us to close early - return - case e, more := <-res: - if !more { - return - } - - select { - case b.Output <- e: - case <-worker.Closing(): // client told us to close early - return - } - } - } - }) - - go b.Process.CloseAfterChildren() - return b.Results() -} - -// ResultsWithEntries returns a Results object from a list of entries -func ResultsWithEntries(q Query, res []Entry) Results { - b := NewResultBuilder(q) - - // go consume all the entries and add them to the results. - b.Process.Go(func(worker goprocess.Process) { - for _, e := range res { - select { - case b.Output <- Result{Entry: e}: - case <-worker.Closing(): // client told us to close early - return - } - } - return - }) - - go b.Process.CloseAfterChildren() - return b.Results() -} - -func ResultsReplaceQuery(r Results, q Query) Results { - switch r := r.(type) { - case *results: - // note: not using field names to make sure all fields are copied - return &results{q, r.proc, r.res} - case *resultsIter: - // note: not using field names to make sure all fields are copied - lr := r.legacyResults - if lr != nil { - lr = &results{q, lr.proc, lr.res} - } - return &resultsIter{q, r.next, r.close, lr} - default: - panic("unknown results type") - } -} - -// -// ResultFromIterator provides an alternative way to to construct -// results without the use of channels. -// - -func ResultsFromIterator(q Query, iter Iterator) Results { - if iter.Close == nil { - iter.Close = noopClose - } - return &resultsIter{ - query: q, - next: iter.Next, - close: iter.Close, - } -} - -func noopClose() error { - return nil -} - -type Iterator struct { - Next func() (Result, bool) - Close func() error // note: might be called more than once -} - -type resultsIter struct { - query Query - next func() (Result, bool) - close func() error - legacyResults *results -} - -func (r *resultsIter) Next() <-chan Result { - r.useLegacyResults() - return r.legacyResults.Next() -} - -func (r *resultsIter) NextSync() (Result, bool) { - if r.legacyResults != nil { - return r.legacyResults.NextSync() - } else { - res, ok := r.next() - if !ok { - r.close() - } - return res, ok - } -} - -func (r *resultsIter) Rest() ([]Entry, error) { - var es []Entry - for { - e, ok := r.NextSync() - if !ok { - break - } - if e.Error != nil { - return es, e.Error - } - es = append(es, e.Entry) - } - return es, nil -} - -func (r *resultsIter) Process() goprocess.Process { - r.useLegacyResults() - return r.legacyResults.Process() -} - -func (r *resultsIter) Close() error { - if r.legacyResults != nil { - return r.legacyResults.Close() - } else { - return r.close() - } -} - -func (r *resultsIter) Query() Query { - return r.query -} - -func (r *resultsIter) useLegacyResults() { - if r.legacyResults != nil { - return - } - - b := NewResultBuilder(r.query) - - // go consume all the entries and add them to the results. - b.Process.Go(func(worker goprocess.Process) { - defer r.close() - for { - e, ok := r.next() - if !ok { - break - } - select { - case b.Output <- e: - case <-worker.Closing(): // client told us to close early - return - } - } - return - }) - - go b.Process.CloseAfterChildren() - - r.legacyResults = b.Results().(*results) -} diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync/sync.go b/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync/sync.go deleted file mode 100644 index c1c060548d..0000000000 --- a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync/sync.go +++ /dev/null @@ -1,157 +0,0 @@ -package sync - -import ( - "io" - "sync" - - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" -) - -// MutexDatastore contains a child datastire and a mutex. -// used for coarse sync -type MutexDatastore struct { - sync.RWMutex - - child ds.Datastore -} - -// MutexWrap constructs a datastore with a coarse lock around -// the entire datastore, for every single operation -func MutexWrap(d ds.Datastore) *MutexDatastore { - return &MutexDatastore{child: d} -} - -// Children implements Shim -func (d *MutexDatastore) Children() []ds.Datastore { - return []ds.Datastore{d.child} -} - -// IsThreadSafe implements ThreadSafeDatastore -func (d *MutexDatastore) IsThreadSafe() {} - -// Put implements Datastore.Put -func (d *MutexDatastore) Put(key ds.Key, value []byte) (err error) { - d.Lock() - defer d.Unlock() - return d.child.Put(key, value) -} - -// Get implements Datastore.Get -func (d *MutexDatastore) Get(key ds.Key) (value []byte, err error) { - d.RLock() - defer d.RUnlock() - return d.child.Get(key) -} - -// Has implements Datastore.Has -func (d *MutexDatastore) Has(key ds.Key) (exists bool, err error) { - d.RLock() - defer d.RUnlock() - return d.child.Has(key) -} - -// GetSize implements Datastore.GetSize -func (d *MutexDatastore) GetSize(key ds.Key) (size int, err error) { - d.RLock() - defer d.RUnlock() - return d.child.GetSize(key) -} - -// Delete implements Datastore.Delete -func (d *MutexDatastore) Delete(key ds.Key) (err error) { - d.Lock() - defer d.Unlock() - return d.child.Delete(key) -} - -// KeyList implements Datastore.KeyList -func (d *MutexDatastore) Query(q dsq.Query) (dsq.Results, error) { - d.RLock() - defer d.RUnlock() - return d.child.Query(q) -} - -func (d *MutexDatastore) Batch() (ds.Batch, error) { - d.RLock() - defer d.RUnlock() - bds, ok := d.child.(ds.Batching) - if !ok { - return nil, ds.ErrBatchUnsupported - } - - b, err := bds.Batch() - if err != nil { - return nil, err - } - return &syncBatch{ - batch: b, - mds: d, - }, nil -} - -func (d *MutexDatastore) Close() error { - d.RWMutex.Lock() - defer d.RWMutex.Unlock() - if c, ok := d.child.(io.Closer); ok { - return c.Close() - } - return nil -} - -// DiskUsage implements the PersistentDatastore interface. -func (d *MutexDatastore) DiskUsage() (uint64, error) { - d.RLock() - defer d.RUnlock() - return ds.DiskUsage(d.child) -} - -type syncBatch struct { - batch ds.Batch - mds *MutexDatastore -} - -func (b *syncBatch) Put(key ds.Key, val []byte) error { - b.mds.Lock() - defer b.mds.Unlock() - return b.batch.Put(key, val) -} - -func (b *syncBatch) Delete(key ds.Key) error { - b.mds.Lock() - defer b.mds.Unlock() - return b.batch.Delete(key) -} - -func (b *syncBatch) Commit() error { - b.mds.Lock() - defer b.mds.Unlock() - return b.batch.Commit() -} - -func (d *MutexDatastore) Check() error { - if c, ok := d.child.(ds.CheckedDatastore); ok { - d.RWMutex.Lock() - defer d.RWMutex.Unlock() - return c.Check() - } - return nil -} - -func (d *MutexDatastore) Scrub() error { - if c, ok := d.child.(ds.ScrubbedDatastore); ok { - d.RWMutex.Lock() - defer d.RWMutex.Unlock() - return c.Scrub() - } - return nil -} - -func (d *MutexDatastore) CollectGarbage() error { - if c, ok := d.child.(ds.GCDatastore); ok { - d.RWMutex.Lock() - defer d.RWMutex.Unlock() - return c.CollectGarbage() - } - return nil -} diff --git a/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/.travis.yml b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/.travis.yml new file mode 100644 index 0000000000..5730d313e7 --- /dev/null +++ b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/.travis.yml @@ -0,0 +1,19 @@ +os: + - linux + - osx + +language: go +sudo: false + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx diff --git a/vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/Makefile b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/Makefile similarity index 100% rename from vendor/gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil/Makefile rename to vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/Makefile diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/README.md b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/README.md similarity index 100% rename from vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/README.md rename to vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/README.md diff --git a/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/addrs.go b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/addrs.go new file mode 100644 index 0000000000..cb71774613 --- /dev/null +++ b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/addrs.go @@ -0,0 +1,73 @@ +package websocket + +import ( + "fmt" + "net" + "net/url" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +// Addr is an implementation of net.Addr for WebSocket. +type Addr struct { + *url.URL +} + +var _ net.Addr = (*Addr)(nil) + +// Network returns the network type for a WebSocket, "websocket". +func (addr *Addr) Network() string { + return "websocket" +} + +// NewAddr creates a new Addr using the given host string +func NewAddr(host string) *Addr { + return &Addr{ + URL: &url.URL{ + Host: host, + }, + } +} + +func ConvertWebsocketMultiaddrToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { + _, host, err := manet.DialArgs(maddr) + if err != nil { + return nil, err + } + + return NewAddr(host), nil +} + +func ParseWebsocketNetAddr(a net.Addr) (ma.Multiaddr, error) { + wsa, ok := a.(*Addr) + if !ok { + return nil, fmt.Errorf("not a websocket address") + } + + tcpaddr, err := net.ResolveTCPAddr("tcp", wsa.Host) + if err != nil { + return nil, err + } + + tcpma, err := manet.FromNetAddr(tcpaddr) + if err != nil { + return nil, err + } + + wsma, err := ma.NewMultiaddr("/ws") + if err != nil { + return nil, err + } + + return tcpma.Encapsulate(wsma), nil +} + +func parseMultiaddr(a ma.Multiaddr) (string, error) { + _, host, err := manet.DialArgs(a) + if err != nil { + return "", err + } + + return "ws://" + host, nil +} diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/codecov.yml b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/codecov.yml rename to vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/codecov.yml diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/conn.go b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/conn.go similarity index 100% rename from vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/conn.go rename to vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/conn.go diff --git a/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/listener.go b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/listener.go new file mode 100644 index 0000000000..caf0fd255d --- /dev/null +++ b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/listener.go @@ -0,0 +1,86 @@ +package websocket + +import ( + "context" + "fmt" + "net" + "net/http" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +type listener struct { + net.Listener + + laddr ma.Multiaddr + + closed chan struct{} + incoming chan *Conn +} + +func (l *listener) serve() { + defer close(l.closed) + http.Serve(l.Listener, l) +} + +func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) { + c, err := upgrader.Upgrade(w, r, nil) + if err != nil { + http.Error(w, "Failed to upgrade websocket", 400) + return + } + + ctx, cancel := context.WithCancel(context.Background()) + + var cnCh <-chan bool + if cn, ok := w.(http.CloseNotifier); ok { + cnCh = cn.CloseNotify() + } + + wscon := NewConn(c, cancel) + // Just to make sure. + defer wscon.Close() + + select { + case l.incoming <- wscon: + case <-l.closed: + c.Close() + return + case <-cnCh: + return + } + + // wait until conn gets closed, otherwise the handler closes it early + select { + case <-ctx.Done(): + case <-l.closed: + c.Close() + return + case <-cnCh: + return + } +} + +func (l *listener) Accept() (manet.Conn, error) { + select { + case c, ok := <-l.incoming: + if !ok { + return nil, fmt.Errorf("listener is closed") + } + + mnc, err := manet.WrapNetConn(c) + if err != nil { + c.Close() + return nil, err + } + + return mnc, nil + case <-l.closed: + return nil, fmt.Errorf("listener is closed") + } +} + +func (l *listener) Multiaddr() ma.Multiaddr { + return l.laddr +} diff --git a/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/package.json b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/package.json new file mode 100644 index 0000000000..4be1f82dc4 --- /dev/null +++ b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/package.json @@ -0,0 +1,72 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-ws-transport/issues" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-ws-transport" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "author": "whyrusleeping", + "hash": "QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4", + "name": "mafmt", + "version": "1.2.11" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "gorilla", + "hash": "QmZH5VXfAJouGMyCCHTRPGCT3e5MG9Lu78Ln3YAYW1XTts", + "name": "websocket", + "version": "0.0.1" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc", + "name": "go-smux-multiplex", + "version": "3.0.19" + }, + { + "author": "steb", + "hash": "QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh", + "name": "go-libp2p-transport-upgrader", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-ws-transport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.27" +} + diff --git a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/websocket.go b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/websocket.go similarity index 89% rename from vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/websocket.go rename to vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/websocket.go index b372663355..025812c5e4 100644 --- a/vendor/gx/ipfs/QmY957dCFYVPKpj21xRs6KA3XAGA9tBt73UE5kfUGdNgD9/go-ws-transport/websocket.go +++ b/vendor/gx/ipfs/QmaSWc4ox6SZQF6DHZvDuM9sP1syNajkKuPXmKR1t5BAz5/go-ws-transport/websocket.go @@ -8,13 +8,13 @@ import ( "net/http" "net/url" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + tpt "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + mafmt "gx/ipfs/QmUrZZavcArYChpibtP8KgQXsAEpvgzUk73B2oj3HLbWc4/mafmt" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ws "gx/ipfs/QmZH5VXfAJouGMyCCHTRPGCT3e5MG9Lu78Ln3YAYW1XTts/websocket" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - tpt "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - mafmt "gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt" - tptu "gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" + tptu "gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader" ) // WsProtocol is the multiaddr protocol definition for this transport. diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/README.md b/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/README.md deleted file mode 100644 index 15a8a99320..0000000000 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# go-multiaddr-net - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) -[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/multiformats/go-multiaddr-net?status.svg)](https://godoc.org/github.com/multiformats/go-multiaddr-net) -[![Travis CI](https://img.shields.io/travis/multiformats/go-multiaddr-net.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multiaddr-net) - - - -> Multiaddress net tools - -This package provides [Multiaddr](https://github.com/multiformats/go-multiaddr) specific versions of common functions in [stdlib](https://github.com/golang/go/tree/master/src)'s `net` package. This means wrappers of standard net symbols like `net.Dial` and `net.Listen`, as well -as conversion to and from `net.Addr`. - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Maintainers](#maintainers) -- [Contribute](#contribute) -- [License](#license) - -## Install - -`go-multiaddr-net` is a standard Go module which can be installed with: - -```sh -go get github.com/multiformats/go-multiaddr-net -``` - -Note that `go-multiaddr-net` is packaged with Gx, so it is recommended to use Gx to install and use it (see Usage section). - - -## Usage - -This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project do: - -```sh -go get -u github.com/whyrusleeping/gx -go get -u github.com/whyrusleeping/gx-go -cd -gx init -gx import github.com/multiformats/go-multiaddr-net -gx install --global -gx-go --rewrite -``` - -Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information. - -For further usage, see the docs: - -- `multiaddr/net`: https://godoc.org/github.com/multiformats/go-multiaddr-net -- `multiaddr`: https://godoc.org/github.com/multiformats/go-multiaddr - -## Maintainers - -Captain: [@whyrusleeping](https://github.com/whyrusleeping). - -## Contribute - -Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multiaddr-net/issues). - -Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/convert.go b/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/convert.go deleted file mode 100644 index 521a4d284c..0000000000 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/convert.go +++ /dev/null @@ -1,232 +0,0 @@ -package manet - -import ( - "fmt" - "net" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" -) - -var errIncorrectNetAddr = fmt.Errorf("incorrect network addr conversion") - -// FromNetAddr converts a net.Addr type to a Multiaddr. -func FromNetAddr(a net.Addr) (ma.Multiaddr, error) { - return defaultCodecs.FromNetAddr(a) -} - -// FromNetAddr converts a net.Addr to Multiaddress. -func (cm *CodecMap) FromNetAddr(a net.Addr) (ma.Multiaddr, error) { - if a == nil { - return nil, fmt.Errorf("nil multiaddr") - } - p, err := cm.getAddrParser(a.Network()) - if err != nil { - return nil, err - } - - return p(a) -} - -// ToNetAddr converts a Multiaddr to a net.Addr -// Must be ThinWaist. acceptable protocol stacks are: -// /ip{4,6}/{tcp, udp} -func ToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { - return defaultCodecs.ToNetAddr(maddr) -} - -// ToNetAddr converts a Multiaddress to a standard net.Addr. -func (cm *CodecMap) ToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { - protos := maddr.Protocols() - final := protos[len(protos)-1] - - p, err := cm.getMaddrParser(final.Name) - if err != nil { - return nil, err - } - - return p(maddr) -} - -func parseBasicNetMaddr(maddr ma.Multiaddr) (net.Addr, error) { - network, host, err := DialArgs(maddr) - if err != nil { - return nil, err - } - - switch network { - case "tcp", "tcp4", "tcp6": - return net.ResolveTCPAddr(network, host) - case "udp", "udp4", "udp6": - return net.ResolveUDPAddr(network, host) - case "ip", "ip4", "ip6": - return net.ResolveIPAddr(network, host) - } - - return nil, fmt.Errorf("network not supported: %s", network) -} - -func FromIPAndZone(ip net.IP, zone string) (ma.Multiaddr, error) { - switch { - case ip.To4() != nil: - return ma.NewComponent("ip4", ip.String()) - case ip.To16() != nil: - ip6, err := ma.NewComponent("ip6", ip.String()) - if err != nil { - return nil, err - } - if zone == "" { - return ip6, nil - } else { - zone, err := ma.NewComponent("ip6zone", zone) - if err != nil { - return nil, err - } - return zone.Encapsulate(ip6), nil - } - default: - return nil, errIncorrectNetAddr - } -} - -// FromIP converts a net.IP type to a Multiaddr. -func FromIP(ip net.IP) (ma.Multiaddr, error) { - return FromIPAndZone(ip, "") -} - -// DialArgs is a convenience function returning arguments for use in net.Dial -func DialArgs(m ma.Multiaddr) (string, string, error) { - var ( - zone, network, ip, port string - err error - ) - - ma.ForEach(m, func(c ma.Component) bool { - switch network { - case "": - switch c.Protocol().Code { - case ma.P_IP6ZONE: - if zone != "" { - err = fmt.Errorf("%s has multiple zones", m) - return false - } - zone = c.Value() - return true - case ma.P_IP6: - network = "ip6" - ip = c.Value() - return true - case ma.P_IP4: - if zone != "" { - err = fmt.Errorf("%s has ip4 with zone", m) - return false - } - network = "ip4" - ip = c.Value() - return true - } - case "ip4": - switch c.Protocol().Code { - case ma.P_UDP: - network = "udp4" - case ma.P_TCP: - network = "tcp4" - default: - return false - } - port = c.Value() - case "ip6": - switch c.Protocol().Code { - case ma.P_UDP: - network = "udp6" - case ma.P_TCP: - network = "tcp6" - default: - return false - } - port = c.Value() - } - // Done. - return false - }) - if err != nil { - return "", "", err - } - switch network { - case "ip6": - if zone != "" { - ip += "%" + zone - } - fallthrough - case "ip4": - return network, ip, nil - case "tcp4", "udp4": - return network, ip + ":" + port, nil - case "tcp6", "udp6": - if zone != "" { - ip += "%" + zone - } - return network, "[" + ip + "]" + ":" + port, nil - default: - return "", "", fmt.Errorf("%s is not a 'thin waist' address", m) - } -} - -func parseTCPNetAddr(a net.Addr) (ma.Multiaddr, error) { - ac, ok := a.(*net.TCPAddr) - if !ok { - return nil, errIncorrectNetAddr - } - - // Get IP Addr - ipm, err := FromIPAndZone(ac.IP, ac.Zone) - if err != nil { - return nil, errIncorrectNetAddr - } - - // Get TCP Addr - tcpm, err := ma.NewMultiaddr(fmt.Sprintf("/tcp/%d", ac.Port)) - if err != nil { - return nil, errIncorrectNetAddr - } - - // Encapsulate - return ipm.Encapsulate(tcpm), nil -} - -func parseUDPNetAddr(a net.Addr) (ma.Multiaddr, error) { - ac, ok := a.(*net.UDPAddr) - if !ok { - return nil, errIncorrectNetAddr - } - - // Get IP Addr - ipm, err := FromIPAndZone(ac.IP, ac.Zone) - if err != nil { - return nil, errIncorrectNetAddr - } - - // Get UDP Addr - udpm, err := ma.NewMultiaddr(fmt.Sprintf("/udp/%d", ac.Port)) - if err != nil { - return nil, errIncorrectNetAddr - } - - // Encapsulate - return ipm.Encapsulate(udpm), nil -} - -func parseIPNetAddr(a net.Addr) (ma.Multiaddr, error) { - ac, ok := a.(*net.IPAddr) - if !ok { - return nil, errIncorrectNetAddr - } - return FromIPAndZone(ac.IP, ac.Zone) -} - -func parseIPPlusNetAddr(a net.Addr) (ma.Multiaddr, error) { - ac, ok := a.(*net.IPNet) - if !ok { - return nil, errIncorrectNetAddr - } - return FromIP(ac.IP) -} diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/net.go b/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/net.go deleted file mode 100644 index 4babd54c52..0000000000 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/net.go +++ /dev/null @@ -1,420 +0,0 @@ -// Package manet provides Multiaddr -// (https://github.com/multiformats/go-multiaddr) specific versions of common -// functions in Go's standard `net` package. This means wrappers of standard -// net symbols like `net.Dial` and `net.Listen`, as well as conversion to -// and from `net.Addr`. -package manet - -import ( - "context" - "fmt" - "net" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" -) - -// Conn is the equivalent of a net.Conn object. It is the -// result of calling the Dial or Listen functions in this -// package, with associated local and remote Multiaddrs. -type Conn interface { - net.Conn - - // LocalMultiaddr returns the local Multiaddr associated - // with this connection - LocalMultiaddr() ma.Multiaddr - - // RemoteMultiaddr returns the remote Multiaddr associated - // with this connection - RemoteMultiaddr() ma.Multiaddr -} - -type halfOpen interface { - net.Conn - CloseRead() error - CloseWrite() error -} - -func wrap(nconn net.Conn, laddr, raddr ma.Multiaddr) Conn { - endpts := maEndpoints{ - laddr: laddr, - raddr: raddr, - } - // This sucks. However, it's the only way to reliably expose the - // underlying methods. This way, users that need access to, e.g., - // CloseRead and CloseWrite, can do so via type assertions. - switch nconn := nconn.(type) { - case *net.TCPConn: - return &struct { - *net.TCPConn - maEndpoints - }{nconn, endpts} - case *net.UDPConn: - return &struct { - *net.UDPConn - maEndpoints - }{nconn, endpts} - case *net.IPConn: - return &struct { - *net.IPConn - maEndpoints - }{nconn, endpts} - case *net.UnixConn: - return &struct { - *net.UnixConn - maEndpoints - }{nconn, endpts} - case halfOpen: - return &struct { - halfOpen - maEndpoints - }{nconn, endpts} - default: - return &struct { - net.Conn - maEndpoints - }{nconn, endpts} - } -} - -// WrapNetConn wraps a net.Conn object with a Multiaddr friendly Conn. -// -// This function does it's best to avoid "hiding" methods exposed by the wrapped -// type. Guarantees: -// -// * If the wrapped connection exposes the "half-open" closer methods -// (CloseWrite, CloseRead), these will be available on the wrapped connection -// via type assertions. -// * If the wrapped connection is a UnixConn, IPConn, TCPConn, or UDPConn, all -// methods on these wrapped connections will be available via type assertions. -func WrapNetConn(nconn net.Conn) (Conn, error) { - if nconn == nil { - return nil, fmt.Errorf("failed to convert nconn.LocalAddr: nil") - } - - laddr, err := FromNetAddr(nconn.LocalAddr()) - if err != nil { - return nil, fmt.Errorf("failed to convert nconn.LocalAddr: %s", err) - } - - raddr, err := FromNetAddr(nconn.RemoteAddr()) - if err != nil { - return nil, fmt.Errorf("failed to convert nconn.RemoteAddr: %s", err) - } - - return wrap(nconn, laddr, raddr), nil -} - -type maEndpoints struct { - laddr ma.Multiaddr - raddr ma.Multiaddr -} - -// LocalMultiaddr returns the local address associated with -// this connection -func (c *maEndpoints) LocalMultiaddr() ma.Multiaddr { - return c.laddr -} - -// RemoteMultiaddr returns the remote address associated with -// this connection -func (c *maEndpoints) RemoteMultiaddr() ma.Multiaddr { - return c.raddr -} - -// Dialer contains options for connecting to an address. It -// is effectively the same as net.Dialer, but its LocalAddr -// and RemoteAddr options are Multiaddrs, instead of net.Addrs. -type Dialer struct { - - // Dialer is just an embedded net.Dialer, with all its options. - net.Dialer - - // LocalAddr is the local address to use when dialing an - // address. The address must be of a compatible type for the - // network being dialed. - // If nil, a local address is automatically chosen. - LocalAddr ma.Multiaddr -} - -// Dial connects to a remote address, using the options of the -// Dialer. Dialer uses an underlying net.Dialer to Dial a -// net.Conn, then wraps that in a Conn object (with local and -// remote Multiaddrs). -func (d *Dialer) Dial(remote ma.Multiaddr) (Conn, error) { - return d.DialContext(context.Background(), remote) -} - -// DialContext allows to provide a custom context to Dial(). -func (d *Dialer) DialContext(ctx context.Context, remote ma.Multiaddr) (Conn, error) { - // if a LocalAddr is specified, use it on the embedded dialer. - if d.LocalAddr != nil { - // convert our multiaddr to net.Addr friendly - naddr, err := ToNetAddr(d.LocalAddr) - if err != nil { - return nil, err - } - - // set the dialer's LocalAddr as naddr - d.Dialer.LocalAddr = naddr - } - - // get the net.Dial friendly arguments from the remote addr - rnet, rnaddr, err := DialArgs(remote) - if err != nil { - return nil, err - } - - // ok, Dial! - var nconn net.Conn - switch rnet { - case "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6": - nconn, err = d.Dialer.DialContext(ctx, rnet, rnaddr) - if err != nil { - return nil, err - } - default: - return nil, fmt.Errorf("unrecognized network: %s", rnet) - } - - // get local address (pre-specified or assigned within net.Conn) - local := d.LocalAddr - if local == nil { - local, err = FromNetAddr(nconn.LocalAddr()) - if err != nil { - return nil, err - } - } - return wrap(nconn, local, remote), nil -} - -// Dial connects to a remote address. It uses an underlying net.Conn, -// then wraps it in a Conn object (with local and remote Multiaddrs). -func Dial(remote ma.Multiaddr) (Conn, error) { - return (&Dialer{}).Dial(remote) -} - -// A Listener is a generic network listener for stream-oriented protocols. -// it uses an embedded net.Listener, overriding net.Listener.Accept to -// return a Conn and providing Multiaddr. -type Listener interface { - // Accept waits for and returns the next connection to the listener. - // Returns a Multiaddr friendly Conn - Accept() (Conn, error) - - // Close closes the listener. - // Any blocked Accept operations will be unblocked and return errors. - Close() error - - // Multiaddr returns the listener's (local) Multiaddr. - Multiaddr() ma.Multiaddr - - // Addr returns the net.Listener's network address. - Addr() net.Addr -} - -type netListenerAdapter struct { - Listener -} - -func (nla *netListenerAdapter) Accept() (net.Conn, error) { - return nla.Listener.Accept() -} - -// NetListener turns this Listener into a net.Listener. -// -// * Connections returned from Accept implement multiaddr-net Conn. -// * Calling WrapNetListener on the net.Listener returned by this function will -// return the original (underlying) multiaddr-net Listener. -func NetListener(l Listener) net.Listener { - return &netListenerAdapter{l} -} - -// maListener implements Listener -type maListener struct { - net.Listener - laddr ma.Multiaddr -} - -// Accept waits for and returns the next connection to the listener. -// Returns a Multiaddr friendly Conn -func (l *maListener) Accept() (Conn, error) { - nconn, err := l.Listener.Accept() - if err != nil { - return nil, err - } - - raddr, err := FromNetAddr(nconn.RemoteAddr()) - if err != nil { - return nil, fmt.Errorf("failed to convert connn.RemoteAddr: %s", err) - } - - return wrap(nconn, l.laddr, raddr), nil -} - -// Multiaddr returns the listener's (local) Multiaddr. -func (l *maListener) Multiaddr() ma.Multiaddr { - return l.laddr -} - -// Addr returns the listener's network address. -func (l *maListener) Addr() net.Addr { - return l.Listener.Addr() -} - -// Listen announces on the local network address laddr. -// The Multiaddr must be a "ThinWaist" stream-oriented network: -// ip4/tcp, ip6/tcp, (TODO: unix, unixpacket) -// See Dial for the syntax of laddr. -func Listen(laddr ma.Multiaddr) (Listener, error) { - - // get the net.Listen friendly arguments from the remote addr - lnet, lnaddr, err := DialArgs(laddr) - if err != nil { - return nil, err - } - - nl, err := net.Listen(lnet, lnaddr) - if err != nil { - return nil, err - } - - // we want to fetch the new multiaddr from the listener, as it may - // have resolved to some other value. WrapNetListener does it for us. - return WrapNetListener(nl) -} - -// WrapNetListener wraps a net.Listener with a manet.Listener. -func WrapNetListener(nl net.Listener) (Listener, error) { - if nla, ok := nl.(*netListenerAdapter); ok { - return nla.Listener, nil - } - - laddr, err := FromNetAddr(nl.Addr()) - if err != nil { - return nil, err - } - - return &maListener{ - Listener: nl, - laddr: laddr, - }, nil -} - -// A PacketConn is a generic packet oriented network connection which uses an -// underlying net.PacketConn, wrapped with the locally bound Multiaddr. -type PacketConn interface { - Connection() net.PacketConn - - Multiaddr() ma.Multiaddr - - ReadFrom(b []byte) (int, ma.Multiaddr, error) - WriteTo(b []byte, maddr ma.Multiaddr) (int, error) - - Close() error -} - -// maPacketConn implements PacketConn -type maPacketConn struct { - net.PacketConn - laddr ma.Multiaddr -} - -// Connection returns the embedded net.PacketConn. -func (l *maPacketConn) Connection() net.PacketConn { - return l.PacketConn -} - -// Multiaddr returns the bound local Multiaddr. -func (l *maPacketConn) Multiaddr() ma.Multiaddr { - return l.laddr -} - -func (l *maPacketConn) ReadFrom(b []byte) (int, ma.Multiaddr, error) { - n, addr, err := l.PacketConn.ReadFrom(b) - maddr, _ := FromNetAddr(addr) - return n, maddr, err -} - -func (l *maPacketConn) WriteTo(b []byte, maddr ma.Multiaddr) (int, error) { - addr, err := ToNetAddr(maddr) - if err != nil { - return 0, err - } - return l.PacketConn.WriteTo(b, addr) -} - -// ListenPacket announces on the local network address laddr. -// The Multiaddr must be a packet driven network, like udp4 or udp6. -// See Dial for the syntax of laddr. -func ListenPacket(laddr ma.Multiaddr) (PacketConn, error) { - lnet, lnaddr, err := DialArgs(laddr) - if err != nil { - return nil, err - } - - pc, err := net.ListenPacket(lnet, lnaddr) - if err != nil { - return nil, err - } - - // We want to fetch the new multiaddr from the listener, as it may - // have resolved to some other value. WrapPacketConn does this. - return WrapPacketConn(pc) -} - -// WrapPacketConn wraps a net.PacketConn with a manet.PacketConn. -func WrapPacketConn(pc net.PacketConn) (PacketConn, error) { - laddr, err := FromNetAddr(pc.LocalAddr()) - if err != nil { - return nil, err - } - - return &maPacketConn{ - PacketConn: pc, - laddr: laddr, - }, nil -} - -// InterfaceMultiaddrs will return the addresses matching net.InterfaceAddrs -func InterfaceMultiaddrs() ([]ma.Multiaddr, error) { - addrs, err := net.InterfaceAddrs() - if err != nil { - return nil, err - } - - maddrs := make([]ma.Multiaddr, len(addrs)) - for i, a := range addrs { - maddrs[i], err = FromNetAddr(a) - if err != nil { - return nil, err - } - } - return maddrs, nil -} - -// AddrMatch returns the Multiaddrs that match the protocol stack on addr -func AddrMatch(match ma.Multiaddr, addrs []ma.Multiaddr) []ma.Multiaddr { - - // we should match transports entirely. - p1s := match.Protocols() - - out := make([]ma.Multiaddr, 0, len(addrs)) - for _, a := range addrs { - p2s := a.Protocols() - if len(p1s) != len(p2s) { - continue - } - - match := true - for i, p2 := range p2s { - if p1s[i].Code != p2.Code { - match = false - break - } - } - if match { - out = append(out, a) - } - } - return out -} diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/package.json b/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/package.json deleted file mode 100644 index 8679c31c6d..0000000000 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "multiformats", - "bugs": { - "url": "https://github.com/multiformats/go-multiaddr-net" - }, - "gx": { - "dvcsimport": "github.com/multiformats/go-multiaddr-net" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.6.0", - "language": "go", - "license": "", - "name": "go-multiaddr-net", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.6.5" -} - diff --git a/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/.travis.yml b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/.travis.yml new file mode 100644 index 0000000000..1a3fd48a75 --- /dev/null +++ b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/LICENSE b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/LICENSE rename to vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/LICENSE diff --git a/vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/Makefile b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/Makefile similarity index 100% rename from vendor/gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/Makefile rename to vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/Makefile diff --git a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/measure.go b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/measure.go similarity index 98% rename from vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/measure.go rename to vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/measure.go index b250a52ca8..209da321f0 100644 --- a/vendor/gx/ipfs/QmQS6UXi1R87y9nEgnCNmG6YfMzvBSLir7xUheMNFP3hoe/go-ds-measure/measure.go +++ b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/measure.go @@ -6,8 +6,8 @@ import ( "io" "time" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" ) diff --git a/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/package.json b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/package.json new file mode 100644 index 0000000000..9d31f488c8 --- /dev/null +++ b/vendor/gx/ipfs/QmafCXHpwUKGUrt6eQF97U1ornFxTicsw7iyYSAhu9aXgc/go-ds-measure/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ds-measure" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ds-measure" + }, + "gxDependencies": [ + { + "author": "ipfs", + "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", + "name": "go-metrics-interface", + "version": "0.2.0" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "", + "name": "go-ds-measure", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.4.5" +} + diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/datastore.go b/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/datastore.go deleted file mode 100644 index b853a0764f..0000000000 --- a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/datastore.go +++ /dev/null @@ -1,355 +0,0 @@ -package badger - -import ( - "fmt" - "strings" - "time" - - osh "gx/ipfs/QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93/go-os-helper" - badger "gx/ipfs/QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ/badger" - - goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" -) - -type Datastore struct { - DB *badger.DB - - gcDiscardRatio float64 -} - -// Implements the datastore.Txn interface, enabling transaction support for -// the badger Datastore. -type txn struct { - txn *badger.Txn - - // Whether this transaction has been implicitly created as a result of a direct Datastore - // method invocation. - implicit bool -} - -// Options are the badger datastore options, reexported here for convenience. -type Options struct { - gcDiscardRatio float64 - - badger.Options -} - -var DefaultOptions = Options{ - gcDiscardRatio: 0.1, - - Options: badger.DefaultOptions, -} - -var _ ds.Datastore = (*Datastore)(nil) -var _ ds.TxnDatastore = (*Datastore)(nil) -var _ ds.TTLDatastore = (*Datastore)(nil) - -// NewDatastore creates a new badger datastore. -// -// DO NOT set the Dir and/or ValuePath fields of opt, they will be set for you. -func NewDatastore(path string, options *Options) (*Datastore, error) { - // Copy the options because we modify them. - var opt badger.Options - var gcDiscardRatio float64 - if options == nil { - opt = badger.DefaultOptions - gcDiscardRatio = DefaultOptions.gcDiscardRatio - } else { - opt = options.Options - gcDiscardRatio = options.gcDiscardRatio - } - - if osh.IsWindows() && opt.SyncWrites { - opt.Truncate = true - } - - opt.Dir = path - opt.ValueDir = path - - kv, err := badger.Open(opt) - if err != nil { - if strings.HasPrefix(err.Error(), "manifest has unsupported version:") { - err = fmt.Errorf("unsupported badger version, use github.com/ipfs/badgerds-upgrade to upgrade: %s", err.Error()) - } - return nil, err - } - - return &Datastore{ - DB: kv, - gcDiscardRatio: gcDiscardRatio, - }, nil -} - -// NewTransaction starts a new transaction. The resulting transaction object -// can be mutated without incurring changes to the underlying Datastore until -// the transaction is Committed. -func (d *Datastore) NewTransaction(readOnly bool) (ds.Txn, error) { - return &txn{d.DB.NewTransaction(!readOnly), false}, nil -} - -// newImplicitTransaction creates a transaction marked as 'implicit'. -// Implicit transactions are created by Datastore methods performing single operations. -func (d *Datastore) newImplicitTransaction(readOnly bool) ds.Txn { - return &txn{d.DB.NewTransaction(!readOnly), true} -} - -func (d *Datastore) Put(key ds.Key, value []byte) error { - txn := d.newImplicitTransaction(false) - defer txn.Discard() - - if err := txn.Put(key, value); err != nil { - return err - } - - return txn.Commit() -} - -func (d *Datastore) PutWithTTL(key ds.Key, value []byte, ttl time.Duration) error { - txn := d.newImplicitTransaction(false).(*txn) - defer txn.Discard() - - if err := txn.PutWithTTL(key, value, ttl); err != nil { - return err - } - - return txn.Commit() -} - -func (d *Datastore) SetTTL(key ds.Key, ttl time.Duration) error { - txn := d.newImplicitTransaction(false).(*txn) - defer txn.Discard() - - if err := txn.SetTTL(key, ttl); err != nil { - return err - } - - return txn.Commit() -} - -func (d *Datastore) GetExpiration(key ds.Key) (time.Time, error) { - txn := d.newImplicitTransaction(false).(*txn) - defer txn.Discard() - - return txn.GetExpiration(key) -} - -func (d *Datastore) Get(key ds.Key) (value []byte, err error) { - txn := d.newImplicitTransaction(true) - defer txn.Discard() - - return txn.Get(key) -} - -func (d *Datastore) Has(key ds.Key) (bool, error) { - txn := d.newImplicitTransaction(true) - defer txn.Discard() - - return txn.Has(key) -} - -func (d *Datastore) GetSize(key ds.Key) (size int, err error) { - txn := d.newImplicitTransaction(true) - defer txn.Discard() - - return txn.GetSize(key) -} - -func (d *Datastore) Delete(key ds.Key) error { - txn := d.newImplicitTransaction(false) - defer txn.Discard() - - err := txn.Delete(key) - if err != nil { - return err - } - - return txn.Commit() -} - -func (d *Datastore) Query(q dsq.Query) (dsq.Results, error) { - txn := d.newImplicitTransaction(true) - // We cannot defer txn.Discard() here, as the txn must remain active while the iterator is open. - // https://github.com/dgraph-io/badger/commit/b1ad1e93e483bbfef123793ceedc9a7e34b09f79 - // The closing logic in the query goprocess takes care of discarding the implicit transaction. - return txn.Query(q) -} - -// DiskUsage implements the PersistentDatastore interface. -// It returns the sum of lsm and value log files sizes in bytes. -func (d *Datastore) DiskUsage() (uint64, error) { - lsm, vlog := d.DB.Size() - return uint64(lsm + vlog), nil -} - -func (d *Datastore) Close() error { - return d.DB.Close() -} - -func (d *Datastore) IsThreadSafe() {} - -func (d *Datastore) Batch() (ds.Batch, error) { - tx, _ := d.NewTransaction(false) - return tx, nil -} - -func (d *Datastore) CollectGarbage() error { - err := d.DB.RunValueLogGC(d.gcDiscardRatio) - if err == badger.ErrNoRewrite { - err = nil - } - return err -} - -func (t *txn) Put(key ds.Key, value []byte) error { - return t.txn.Set(key.Bytes(), value) -} - -func (t *txn) PutWithTTL(key ds.Key, value []byte, ttl time.Duration) error { - return t.txn.SetWithTTL(key.Bytes(), value, ttl) -} - -func (t *txn) GetExpiration(key ds.Key) (time.Time, error) { - item, err := t.txn.Get(key.Bytes()) - if err == badger.ErrKeyNotFound { - return time.Time{}, ds.ErrNotFound - } else if err != nil { - return time.Time{}, err - } - return time.Unix(int64(item.ExpiresAt()), 0), nil -} - -func (t *txn) SetTTL(key ds.Key, ttl time.Duration) error { - data, err := t.Get(key) - if err != nil { - return err - } - - return t.PutWithTTL(key, data, ttl) -} - -func (t *txn) Get(key ds.Key) ([]byte, error) { - item, err := t.txn.Get(key.Bytes()) - if err == badger.ErrKeyNotFound { - err = ds.ErrNotFound - } - if err != nil { - return nil, err - } - - return item.ValueCopy(nil) -} - -func (t *txn) Has(key ds.Key) (bool, error) { - _, err := t.txn.Get(key.Bytes()) - switch err { - case badger.ErrKeyNotFound: - return false, nil - case nil: - return true, nil - default: - return false, err - } -} - -func (t *txn) GetSize(key ds.Key) (int, error) { - item, err := t.txn.Get(key.Bytes()) - switch err { - case nil: - return int(item.ValueSize()), nil - case badger.ErrKeyNotFound: - return -1, ds.ErrNotFound - default: - return -1, err - } -} - -func (t *txn) Delete(key ds.Key) error { - return t.txn.Delete(key.Bytes()) -} - -func (t *txn) Query(q dsq.Query) (dsq.Results, error) { - prefix := []byte(q.Prefix) - opt := badger.DefaultIteratorOptions - opt.PrefetchValues = !q.KeysOnly - - txn := t.txn - - it := txn.NewIterator(opt) - it.Seek([]byte(q.Prefix)) - if q.Offset > 0 { - for j := 0; j < q.Offset; j++ { - it.Next() - } - } - - qrb := dsq.NewResultBuilder(q) - - qrb.Process.Go(func(worker goprocess.Process) { - if t.implicit { - // this iterator is part of an implicit transaction, so when we're done we must discard - // the transaction. It's safe to discard the txn it because it contains the iterator only. - defer t.Discard() - } - defer it.Close() - - for sent := 0; it.ValidForPrefix(prefix); sent++ { - if qrb.Query.Limit > 0 && sent >= qrb.Query.Limit { - break - } - - item := it.Item() - - k := string(item.Key()) - e := dsq.Entry{Key: k} - - var result dsq.Result - if !q.KeysOnly { - b, err := item.ValueCopy(nil) - if err != nil { - result = dsq.Result{Error: err} - } else { - e.Value = b - result = dsq.Result{Entry: e} - } - } else { - result = dsq.Result{Entry: e} - } - - if q.ReturnExpirations { - result.Expiration = time.Unix(int64(item.ExpiresAt()), 0) - } - - select { - case qrb.Output <- result: - case <-worker.Closing(): // client told us to close early - return - } - it.Next() - } - - return - }) - - go qrb.Process.CloseAfterChildren() - - // Now, apply remaining things (filters, order) - qr := qrb.Results() - for _, f := range q.Filters { - qr = dsq.NaiveFilter(qr, f) - } - for _, o := range q.Orders { - qr = dsq.NaiveOrder(qr, o) - } - - return qr, nil -} - -func (t *txn) Commit() error { - return t.txn.Commit(nil) -} - -func (t *txn) Discard() { - t.txn.Discard() -} diff --git a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/package.json b/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/package.json deleted file mode 100644 index d24a3b6901..0000000000 --- a/vendor/gx/ipfs/QmaixNkKwtinV3umL5VD1VDD5CQjnZhXY31awM2YHTzbui/go-ds-badger/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "author": "magik6k", - "bugs": { - "url": "https://github.com/ipfs/go-ds-badger" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ds-badger" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "dgraph-io", - "hash": "QmZ7bFqkoHU2ARF68y9fSQVKcmhjYrTQgtCQ4i3chwZCgQ", - "name": "badger", - "version": "2.9.0" - }, - { - "author": "Kubuxu", - "hash": "QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93", - "name": "go-os-helper", - "version": "0.0.0" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "", - "name": "go-ds-badger", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.10.0" -} - diff --git a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/multiplex.go b/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/multiplex.go deleted file mode 100644 index 833feb26e3..0000000000 --- a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/multiplex.go +++ /dev/null @@ -1,41 +0,0 @@ -package peerstream_multiplex - -import ( - "net" - - mp "gx/ipfs/QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur/go-mplex" // Conn is a connection to a remote peer. - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" // Conn is a connection to a remote peer. -) - -type conn struct { - *mp.Multiplex -} - -func (c *conn) Close() error { - return c.Multiplex.Close() -} - -func (c *conn) IsClosed() bool { - return c.Multiplex.IsClosed() -} - -// OpenStream creates a new stream. -func (c *conn) OpenStream() (smux.Stream, error) { - return c.Multiplex.NewStream() -} - -// AcceptStream accepts a stream opened by the other side. -func (c *conn) AcceptStream() (smux.Stream, error) { - return c.Multiplex.Accept() -} - -// Transport is a go-peerstream transport that constructs -// multiplex-backed connections. -type Transport struct{} - -// DefaultTransport has default settings for multiplex -var DefaultTransport = &Transport{} - -func (t *Transport) NewConn(nc net.Conn, isServer bool) (smux.Conn, error) { - return &conn{mp.NewMultiplex(nc, isServer)}, nil -} diff --git a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/package.json b/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/package.json deleted file mode 100644 index 4eadee98a7..0000000000 --- a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/whyrusleeping/go-smux-multiplex" - }, - "gx": { - "dvcsimport": "github.com/whyrusleeping/go-smux-multiplex" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmP5tygNbeAH5Z8sGdrnE9rqqkAVYotam3UAgRWWfL2zur", - "name": "go-mplex", - "version": "0.2.30" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "go-smux-multiplex", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.16" -} - diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/.travis.yml b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/.travis.yml rename to vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/.travis.yml diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/CODEOWNERS b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/CODEOWNERS similarity index 100% rename from vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/CODEOWNERS rename to vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/CODEOWNERS diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/LICENSE b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/LICENSE rename to vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/LICENSE diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/Makefile b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/Makefile similarity index 100% rename from vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/Makefile rename to vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/Makefile diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/README.md b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/README.md new file mode 100644 index 0000000000..4beaa66122 --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/README.md @@ -0,0 +1,64 @@ +# go-mfs + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/ipfs/go-mfs?status.svg)](https://godoc.org/github.com/ipfs/go-mfs) +[![Build Status](https://travis-ci.org/ipfs/go-mfs.svg?branch=master)](https://travis-ci.org/ipfs/go-mfs) + +> go-mfs implements an in-memory model of a mutable IPFS filesystem. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Contribute](#contribute) +- [License](#license) + +## Install + +`go-mfs` works like a regular Go module: + +``` +> go get github.com/ipfs/go-mfs +``` + +It uses [Gx](https://github.com/whyrusleeping/gx) to manage dependencies. You can use `make all` to build it with the `gx` dependencies. + +## Usage + +``` +import "github.com/ipfs/go-mfs" +``` + +Check the [GoDoc documentation](https://godoc.org/github.com/ipfs/go-mfs) + +## Documentation + +Documentation around the MFS and the Files API in general around IPFS is a work in progress the following links may be of use: + +* [UnixFS](https://docs.ipfs.io/guides/concepts/unixfs/) +* [MFS](https://docs.ipfs.io/guides/concepts/mfs/) +* [General concept document about how are files handled in IPFS (WIP)](https://github.com/ipfs/docs/issues/133) + +## Repository Structure +This repository contains many files, all belonging to the root `mfs` package. + +* `file.go`: MFS `File`. +* `dir.go`: MFS `Directory`. +* `fd.go`: `FileDescriptor` used to operate on `File`s. +* `ops.go`: Functions that do not belong to either `File` nor `Directory` (although they mostly operate on them) that contain common operations to the MFS, e.g., find, move, add a file, make a directory. +* `root.go`: MFS `Root` (a `Directory` with republishing support). +* `repub.go`: `Republisher`. +* `mfs_test.go`: General tests (needs a [revision](https://github.com/ipfs/go-mfs/issues/9)). +* `repub_test.go`: Republisher-specific tests (contains only the `TestRepublisher` function). + +## Contribute + +PRs accepted. + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +MIT © Protocol Labs, Inc. diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/dir.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/dir.go new file mode 100644 index 0000000000..e5673749fb --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/dir.go @@ -0,0 +1,450 @@ +package mfs + +import ( + "context" + "errors" + "fmt" + "os" + "path" + "sync" + "time" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +var ErrNotYetImplemented = errors.New("not yet implemented") +var ErrInvalidChild = errors.New("invalid child node") +var ErrDirExists = errors.New("directory already has entry by that name") + +// TODO: There's too much functionality associated with this structure, +// let's organize it (and if possible extract part of it elsewhere) +// and document the main features of `Directory` here. +type Directory struct { + inode + + // Internal cache with added entries to the directory, its cotents + // are synched with the underlying `unixfsDir` node in `sync()`. + entriesCache map[string]FSNode + + lock sync.Mutex + // TODO: What content is being protected here exactly? The entire directory? + + ctx context.Context + + // UnixFS directory implementation used for creating, + // reading and editing directories. + unixfsDir uio.Directory + + modTime time.Time +} + +// NewDirectory constructs a new MFS directory. +// +// You probably don't want to call this directly. Instead, construct a new root +// using NewRoot. +func NewDirectory(ctx context.Context, name string, node ipld.Node, parent parent, dserv ipld.DAGService) (*Directory, error) { + db, err := uio.NewDirectoryFromNode(dserv, node) + if err != nil { + return nil, err + } + + return &Directory{ + inode: inode{ + name: name, + parent: parent, + dagService: dserv, + }, + ctx: ctx, + unixfsDir: db, + entriesCache: make(map[string]FSNode), + modTime: time.Now(), + }, nil +} + +// GetCidBuilder gets the CID builder of the root node +func (d *Directory) GetCidBuilder() cid.Builder { + return d.unixfsDir.GetCidBuilder() +} + +// SetCidBuilder sets the CID builder +func (d *Directory) SetCidBuilder(b cid.Builder) { + d.unixfsDir.SetCidBuilder(b) +} + +// This method implements the `parent` interface. It first does the local +// update of the child entry in the underlying UnixFS directory and saves +// the newly created directory node with the updated entry in the DAG +// service. Then it propagates the update upwards (through this same +// interface) repeating the whole process in the parent. +func (d *Directory) updateChildEntry(c child) error { + newDirNode, err := d.localUpdate(c) + if err != nil { + return err + } + + // Continue to propagate the update process upwards + // (all the way up to the root). + return d.parent.updateChildEntry(child{d.name, newDirNode}) +} + +// This method implements the part of `updateChildEntry` that needs +// to be locked around: in charge of updating the UnixFS layer and +// generating the new node reflecting the update. It also stores the +// new node in the DAG layer. +func (d *Directory) localUpdate(c child) (*dag.ProtoNode, error) { + d.lock.Lock() + defer d.lock.Unlock() + + err := d.updateChild(c) + if err != nil { + return nil, err + } + // TODO: Clearly define how are we propagating changes to lower layers + // like UnixFS. + + nd, err := d.unixfsDir.GetNode() + if err != nil { + return nil, err + } + + pbnd, ok := nd.(*dag.ProtoNode) + if !ok { + return nil, dag.ErrNotProtobuf + } + + err = d.dagService.Add(d.ctx, nd) + if err != nil { + return nil, err + } + + return pbnd.Copy().(*dag.ProtoNode), nil + // TODO: Why do we need a copy? +} + +// Update child entry in the underlying UnixFS directory. +func (d *Directory) updateChild(c child) error { + err := d.addUnixFSChild(c) + if err != nil { + return err + } + + d.modTime = time.Now() + + return nil +} + +func (d *Directory) Type() NodeType { + return TDir +} + +// childNode returns a FSNode under this directory by the given name if it exists. +// it does *not* check the cached dirs and files +func (d *Directory) childNode(name string) (FSNode, error) { + nd, err := d.childFromDag(name) + if err != nil { + return nil, err + } + + return d.cacheNode(name, nd) +} + +// cacheNode caches a node into d.childDirs or d.files and returns the FSNode. +func (d *Directory) cacheNode(name string, nd ipld.Node) (FSNode, error) { + switch nd := nd.(type) { + case *dag.ProtoNode: + fsn, err := ft.FSNodeFromBytes(nd.Data()) + if err != nil { + return nil, err + } + + switch fsn.Type() { + case ft.TDirectory, ft.THAMTShard: + ndir, err := NewDirectory(d.ctx, name, nd, d, d.dagService) + if err != nil { + return nil, err + } + + d.entriesCache[name] = ndir + return ndir, nil + case ft.TFile, ft.TRaw, ft.TSymlink: + nfi, err := NewFile(name, nd, d, d.dagService) + if err != nil { + return nil, err + } + d.entriesCache[name] = nfi + return nfi, nil + case ft.TMetadata: + return nil, ErrNotYetImplemented + default: + return nil, ErrInvalidChild + } + case *dag.RawNode: + nfi, err := NewFile(name, nd, d, d.dagService) + if err != nil { + return nil, err + } + d.entriesCache[name] = nfi + return nfi, nil + default: + return nil, fmt.Errorf("unrecognized node type in cache node") + } +} + +// Child returns the child of this directory by the given name +func (d *Directory) Child(name string) (FSNode, error) { + d.lock.Lock() + defer d.lock.Unlock() + return d.childUnsync(name) +} + +func (d *Directory) Uncache(name string) { + d.lock.Lock() + defer d.lock.Unlock() + delete(d.entriesCache, name) +} + +// childFromDag searches through this directories dag node for a child link +// with the given name +func (d *Directory) childFromDag(name string) (ipld.Node, error) { + return d.unixfsDir.Find(d.ctx, name) +} + +// childUnsync returns the child under this directory by the given name +// without locking, useful for operations which already hold a lock +func (d *Directory) childUnsync(name string) (FSNode, error) { + entry, ok := d.entriesCache[name] + if ok { + return entry, nil + } + + return d.childNode(name) +} + +type NodeListing struct { + Name string + Type int + Size int64 + Hash string +} + +func (d *Directory) ListNames(ctx context.Context) ([]string, error) { + d.lock.Lock() + defer d.lock.Unlock() + + var out []string + err := d.unixfsDir.ForEachLink(ctx, func(l *ipld.Link) error { + out = append(out, l.Name) + return nil + }) + if err != nil { + return nil, err + } + + return out, nil +} + +func (d *Directory) List(ctx context.Context) ([]NodeListing, error) { + var out []NodeListing + err := d.ForEachEntry(ctx, func(nl NodeListing) error { + out = append(out, nl) + return nil + }) + return out, err +} + +func (d *Directory) ForEachEntry(ctx context.Context, f func(NodeListing) error) error { + d.lock.Lock() + defer d.lock.Unlock() + return d.unixfsDir.ForEachLink(ctx, func(l *ipld.Link) error { + c, err := d.childUnsync(l.Name) + if err != nil { + return err + } + + nd, err := c.GetNode() + if err != nil { + return err + } + + child := NodeListing{ + Name: l.Name, + Type: int(c.Type()), + Hash: nd.Cid().String(), + } + + if c, ok := c.(*File); ok { + size, err := c.Size() + if err != nil { + return err + } + child.Size = size + } + + return f(child) + }) +} + +func (d *Directory) Mkdir(name string) (*Directory, error) { + d.lock.Lock() + defer d.lock.Unlock() + + fsn, err := d.childUnsync(name) + if err == nil { + switch fsn := fsn.(type) { + case *Directory: + return fsn, os.ErrExist + case *File: + return nil, os.ErrExist + default: + return nil, fmt.Errorf("unrecognized type: %#v", fsn) + } + } + + ndir := ft.EmptyDirNode() + ndir.SetCidBuilder(d.GetCidBuilder()) + + err = d.dagService.Add(d.ctx, ndir) + if err != nil { + return nil, err + } + + err = d.addUnixFSChild(child{name, ndir}) + if err != nil { + return nil, err + } + + dirobj, err := NewDirectory(d.ctx, name, ndir, d, d.dagService) + if err != nil { + return nil, err + } + + d.entriesCache[name] = dirobj + return dirobj, nil +} + +func (d *Directory) Unlink(name string) error { + d.lock.Lock() + defer d.lock.Unlock() + + delete(d.entriesCache, name) + + return d.unixfsDir.RemoveChild(d.ctx, name) +} + +func (d *Directory) Flush() error { + nd, err := d.GetNode() + if err != nil { + return err + } + + return d.parent.updateChildEntry(child{d.name, nd}) +} + +// AddChild adds the node 'nd' under this directory giving it the name 'name' +func (d *Directory) AddChild(name string, nd ipld.Node) error { + d.lock.Lock() + defer d.lock.Unlock() + + _, err := d.childUnsync(name) + if err == nil { + return ErrDirExists + } + + err = d.dagService.Add(d.ctx, nd) + if err != nil { + return err + } + + err = d.addUnixFSChild(child{name, nd}) + if err != nil { + return err + } + + d.modTime = time.Now() + return nil +} + +// addUnixFSChild adds a child to the inner UnixFS directory +// and transitions to a HAMT implementation if needed. +func (d *Directory) addUnixFSChild(c child) error { + if uio.UseHAMTSharding { + // If the directory HAMT implementation is being used and this + // directory is actually a basic implementation switch it to HAMT. + if basicDir, ok := d.unixfsDir.(*uio.BasicDirectory); ok { + hamtDir, err := basicDir.SwitchToSharding(d.ctx) + if err != nil { + return err + } + d.unixfsDir = hamtDir + } + } + + err := d.unixfsDir.AddChild(d.ctx, c.Name, c.Node) + if err != nil { + return err + } + + return nil +} + +func (d *Directory) sync() error { + for name, entry := range d.entriesCache { + nd, err := entry.GetNode() + if err != nil { + return err + } + + err = d.updateChild(child{name, nd}) + if err != nil { + return err + } + } + + // TODO: Should we clean the cache here? + + return nil +} + +func (d *Directory) Path() string { + cur := d + var out string + for cur != nil { + switch parent := cur.parent.(type) { + case *Directory: + out = path.Join(cur.name, out) + cur = parent + case *Root: + return "/" + out + default: + panic("directory parent neither a directory nor a root") + } + } + return out +} + +func (d *Directory) GetNode() (ipld.Node, error) { + d.lock.Lock() + defer d.lock.Unlock() + + err := d.sync() + if err != nil { + return nil, err + } + + nd, err := d.unixfsDir.GetNode() + if err != nil { + return nil, err + } + + err = d.dagService.Add(d.ctx, nd) + if err != nil { + return nil, err + } + + return nd.Copy(), err +} diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/fd.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/fd.go new file mode 100644 index 0000000000..505ffe0517 --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/fd.go @@ -0,0 +1,197 @@ +package mfs + +import ( + "fmt" + "io" + + mod "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod" + + context "context" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +type state uint8 + +const ( + stateCreated state = iota + stateFlushed + stateDirty + stateClosed +) + +// One `File` can have many `FileDescriptor`s associated to it +// (only one if it's RW, many if they are RO, see `File.desclock`). +// A `FileDescriptor` contains the "view" of the file (through an +// instance of a `DagModifier`), that's why it (and not the `File`) +// has the responsibility to `Flush` (which crystallizes that view +// in the `File`'s `Node`). +type FileDescriptor interface { + io.Reader + CtxReadFull(context.Context, []byte) (int, error) + + io.Writer + io.WriterAt + + io.Closer + io.Seeker + + Truncate(int64) error + Size() (int64, error) + Flush() error +} + +type fileDescriptor struct { + inode *File + mod *mod.DagModifier + flags Flags + + state state +} + +func (fi *fileDescriptor) checkWrite() error { + if fi.state == stateClosed { + return ErrClosed + } + if !fi.flags.Write { + return fmt.Errorf("file is read-only") + } + return nil +} + +func (fi *fileDescriptor) checkRead() error { + if fi.state == stateClosed { + return ErrClosed + } + if !fi.flags.Read { + return fmt.Errorf("file is write-only") + } + return nil +} + +// Size returns the size of the file referred to by this descriptor +func (fi *fileDescriptor) Size() (int64, error) { + return fi.mod.Size() +} + +// Truncate truncates the file to size +func (fi *fileDescriptor) Truncate(size int64) error { + if err := fi.checkWrite(); err != nil { + return fmt.Errorf("truncate failed: %s", err) + } + fi.state = stateDirty + return fi.mod.Truncate(size) +} + +// Write writes the given data to the file at its current offset +func (fi *fileDescriptor) Write(b []byte) (int, error) { + if err := fi.checkWrite(); err != nil { + return 0, fmt.Errorf("write failed: %s", err) + } + fi.state = stateDirty + return fi.mod.Write(b) +} + +// Read reads into the given buffer from the current offset +func (fi *fileDescriptor) Read(b []byte) (int, error) { + if err := fi.checkRead(); err != nil { + return 0, fmt.Errorf("read failed: %s", err) + } + return fi.mod.Read(b) +} + +// Read reads into the given buffer from the current offset +func (fi *fileDescriptor) CtxReadFull(ctx context.Context, b []byte) (int, error) { + if err := fi.checkRead(); err != nil { + return 0, fmt.Errorf("read failed: %s", err) + } + return fi.mod.CtxReadFull(ctx, b) +} + +// Close flushes, then propogates the modified dag node up the directory structure +// and signals a republish to occur +func (fi *fileDescriptor) Close() error { + if fi.state == stateClosed { + return ErrClosed + } + if fi.flags.Write { + defer fi.inode.desclock.Unlock() + } else if fi.flags.Read { + defer fi.inode.desclock.RUnlock() + } + err := fi.flushUp(fi.flags.Sync) + fi.state = stateClosed + return err +} + +// Flush generates a new version of the node of the underlying +// UnixFS directory (adding it to the DAG service) and updates +// the entry in the parent directory (setting `fullSync` to +// propagate the update all the way to the root). +func (fi *fileDescriptor) Flush() error { + return fi.flushUp(true) +} + +// flushUp syncs the file and adds it to the dagservice +// it *must* be called with the File's lock taken +// If `fullSync` is set the changes are propagated upwards +// (the `Up` part of `flushUp`). +func (fi *fileDescriptor) flushUp(fullSync bool) error { + var nd ipld.Node + switch fi.state { + case stateCreated, stateDirty: + var err error + nd, err = fi.mod.GetNode() + if err != nil { + return err + } + err = fi.inode.dagService.Add(context.TODO(), nd) + if err != nil { + return err + } + + // TODO: Very similar logic to the update process in + // `Directory`, the logic should be unified, both structures + // (`File` and `Directory`) are backed by a IPLD node with + // a UnixFS format that is the actual target of the update + // (regenerating it and adding it to the DAG service). + fi.inode.nodeLock.Lock() + // Always update the file descriptor's inode with the created/modified node. + fi.inode.node = nd + // Save the members to be used for subsequent calls + parent := fi.inode.parent + name := fi.inode.name + fi.inode.nodeLock.Unlock() + + // Bubble up the update's to the parent, only if fullSync is set to true. + if fullSync { + if err := parent.updateChildEntry(child{name, nd}); err != nil { + return err + } + } + + fi.state = stateFlushed + return nil + case stateFlushed: + return nil + default: + panic("invalid state") + } +} + +// Seek implements io.Seeker +func (fi *fileDescriptor) Seek(offset int64, whence int) (int64, error) { + if fi.state == stateClosed { + return 0, fmt.Errorf("seek failed: %s", ErrClosed) + } + return fi.mod.Seek(offset, whence) +} + +// Write At writes the given bytes at the offset 'at' +func (fi *fileDescriptor) WriteAt(b []byte, at int64) (int, error) { + if err := fi.checkWrite(); err != nil { + return 0, fmt.Errorf("write-at failed: %s", err) + } + fi.state = stateDirty + return fi.mod.WriteAt(b, at) +} diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/file.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/file.go new file mode 100644 index 0000000000..5184b3b6a2 --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/file.go @@ -0,0 +1,179 @@ +package mfs + +import ( + "context" + "fmt" + "sync" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + mod "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod" + + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// File represents a file in the MFS, its logic its mainly targeted +// to coordinating (potentially many) `FileDescriptor`s pointing to +// it. +type File struct { + inode + + // Lock to coordinate the `FileDescriptor`s associated to this file. + desclock sync.RWMutex + + // This isn't any node, it's the root node that represents the + // entire DAG of nodes that comprise the file. + // TODO: Rename, there should be an explicit term for these root nodes + // of a particular sub-DAG that abstract an upper layer's entity. + node ipld.Node + + // Lock around the `node` that represents this file, necessary because + // there may be many `FileDescriptor`s operating on this `File`. + nodeLock sync.RWMutex + + RawLeaves bool +} + +// NewFile returns a NewFile object with the given parameters. If the +// Cid version is non-zero RawLeaves will be enabled. +func NewFile(name string, node ipld.Node, parent parent, dserv ipld.DAGService) (*File, error) { + fi := &File{ + inode: inode{ + name: name, + parent: parent, + dagService: dserv, + }, + node: node, + } + if node.Cid().Prefix().Version > 0 { + fi.RawLeaves = true + } + return fi, nil +} + +func (fi *File) Open(flags Flags) (_ FileDescriptor, _retErr error) { + if flags.Write { + fi.desclock.Lock() + defer func() { + if _retErr != nil { + fi.desclock.Unlock() + } + }() + } else if flags.Read { + fi.desclock.RLock() + defer func() { + if _retErr != nil { + fi.desclock.Unlock() + } + }() + } else { + return nil, fmt.Errorf("file opened for neither reading nor writing") + } + + fi.nodeLock.RLock() + node := fi.node + fi.nodeLock.RUnlock() + + // TODO: Move this `switch` logic outside (maybe even + // to another package, this seems like a job of UnixFS), + // `NewDagModifier` uses the IPLD node, we're not + // extracting anything just doing a safety check. + switch node := node.(type) { + case *dag.ProtoNode: + fsn, err := ft.FSNodeFromBytes(node.Data()) + if err != nil { + return nil, err + } + + switch fsn.Type() { + default: + return nil, fmt.Errorf("unsupported fsnode type for 'file'") + case ft.TSymlink: + return nil, fmt.Errorf("symlinks not yet supported") + case ft.TFile, ft.TRaw: + // OK case + } + case *dag.RawNode: + // Ok as well. + } + + dmod, err := mod.NewDagModifier(context.TODO(), node, fi.dagService, chunker.DefaultSplitter) + // TODO: Remove the use of the `chunker` package here, add a new `NewDagModifier` in + // `go-unixfs` with the `DefaultSplitter` already included. + if err != nil { + return nil, err + } + dmod.RawLeaves = fi.RawLeaves + + return &fileDescriptor{ + inode: fi, + flags: flags, + mod: dmod, + state: stateCreated, + }, nil +} + +// Size returns the size of this file +// TODO: Should we be providing this API? +// TODO: There's already a `FileDescriptor.Size()` that +// through the `DagModifier`'s `fileSize` function is doing +// pretty much the same thing as here, we should at least call +// that function and wrap the `ErrNotUnixfs` with an MFS text. +func (fi *File) Size() (int64, error) { + fi.nodeLock.RLock() + defer fi.nodeLock.RUnlock() + switch nd := fi.node.(type) { + case *dag.ProtoNode: + fsn, err := ft.FSNodeFromBytes(nd.Data()) + if err != nil { + return 0, err + } + return int64(fsn.FileSize()), nil + case *dag.RawNode: + return int64(len(nd.RawData())), nil + default: + return 0, fmt.Errorf("unrecognized node type in mfs/file.Size()") + } +} + +// GetNode returns the dag node associated with this file +// TODO: Use this method and do not access the `nodeLock` directly anywhere else. +func (fi *File) GetNode() (ipld.Node, error) { + fi.nodeLock.RLock() + defer fi.nodeLock.RUnlock() + return fi.node, nil +} + +// TODO: Tight coupling with the `FileDescriptor`, at the +// very least this should be an independent function that +// takes a `File` argument and automates the open/flush/close +// operations. +// TODO: Why do we need to flush a file that isn't opened? +// (the `OpenWriteOnly` seems to implicitly be targeting a +// closed file, a file we forgot to flush? can we close +// a file without flushing?) +func (fi *File) Flush() error { + // open the file in fullsync mode + fd, err := fi.Open(Flags{Write: true, Sync: true}) + if err != nil { + return err + } + + defer fd.Close() + + return fd.Flush() +} + +func (fi *File) Sync() error { + // just being able to take the writelock means the descriptor is synced + // TODO: Why? + fi.desclock.Lock() + fi.desclock.Unlock() + return nil +} + +// Type returns the type FSNode this is +func (fi *File) Type() NodeType { + return TFile +} diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/inode.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/inode.go new file mode 100644 index 0000000000..9cec0363a7 --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/inode.go @@ -0,0 +1,21 @@ +package mfs + +import ( + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// inode abstracts the common characteristics of the MFS `File` +// and `Directory`. All of its attributes are initialized at +// creation. +type inode struct { + // name of this `inode` in the MFS path (the same value + // is also stored as the name of the DAG link). + name string + + // parent directory of this `inode` (which may be the `Root`). + parent parent + + // dagService used to store modifications made to the contents + // of the file or directory the `inode` belongs to. + dagService ipld.DAGService +} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/ops.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/ops.go similarity index 79% rename from vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/ops.go rename to vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/ops.go index 6b112af7b7..3309b24aaf 100644 --- a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/ops.go +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/ops.go @@ -1,18 +1,25 @@ package mfs import ( + "context" "fmt" "os" gopath "path" "strings" - path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" + path "gx/ipfs/QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR/go-path" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) +// TODO: Evaluate moving all this operations to as `Root` +// methods, since all of them use it as its first argument +// and there is no clear documentation that explains this +// separation. + // Mv moves the file or directory at 'src' to 'dst' +// TODO: Document what the strings 'src' and 'dst' represent. func Mv(r *Root, src, dst string) error { srcDir, srcFname := gopath.Split(src) @@ -53,6 +60,7 @@ func Mv(r *Root, src, dst string) error { _ = dstDir.Unlink(filename) case *Directory: dstDir = n + filename = srcFname default: return fmt.Errorf("unexpected type at path: %s", dst) } @@ -83,6 +91,15 @@ func lookupDir(r *Root, path string) (*Directory, error) { } // PutNode inserts 'nd' at 'path' in the given mfs +// TODO: Rename or clearly document that this is not about nodes but actually +// MFS files/directories (that in the underlying representation can be +// considered as just nodes). +// TODO: Document why are we handling IPLD nodes in the first place when we +// are actually referring to files/directories (that is, it can't be any +// node, it has to have a specific format). +// TODO: Can this function add directories or just files? What would be the +// difference between adding a directory with this method and creating it +// with `Mkdir`. func PutNode(r *Root, path string, nd ipld.Node) error { dirp, filename := gopath.Split(path) if filename == "" { @@ -207,6 +224,8 @@ func DirLookup(d *Directory, pth string) (FSNode, error) { return cur, nil } +// TODO: Document this function and link its functionality +// with the republisher. func FlushPath(rt *Root, pth string) error { nd, err := Lookup(rt, pth) if err != nil { @@ -218,6 +237,6 @@ func FlushPath(rt *Root, pth string) error { return err } - rt.repub.WaitPub() + rt.repub.WaitPub(context.TODO()) return nil } diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/options.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/options.go new file mode 100644 index 0000000000..6bdcd71006 --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/options.go @@ -0,0 +1,7 @@ +package mfs + +type Flags struct { + Read bool + Write bool + Sync bool +} diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/package.json b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/package.json new file mode 100644 index 0000000000..06f6fadcbe --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/package.json @@ -0,0 +1,48 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-mfs" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-mfs" + }, + "gxDependencies": [ + { + "author": "why", + "hash": "QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri", + "name": "go-merkledag", + "version": "1.1.37" + }, + { + "author": "why", + "hash": "QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ", + "name": "go-unixfs", + "version": "1.3.12" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "why", + "hash": "QmQAgv6Gaoe2tQpcabqwKXKChp2MZ7i3UXv9DqTTaxCaTR", + "name": "go-path", + "version": "1.1.39" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-mfs", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.49" +} + diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/repub.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/repub.go new file mode 100644 index 0000000000..58d8e727cf --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/repub.go @@ -0,0 +1,197 @@ +package mfs + +import ( + "context" + "time" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +// PubFunc is the user-defined function that determines exactly what +// logic entails "publishing" a `Cid` value. +type PubFunc func(context.Context, cid.Cid) error + +// Republisher manages when to publish a given entry. +type Republisher struct { + TimeoutLong time.Duration + TimeoutShort time.Duration + RetryTimeout time.Duration + pubfunc PubFunc + + update chan cid.Cid + immediatePublish chan chan struct{} + + ctx context.Context + cancel func() +} + +// NewRepublisher creates a new Republisher object to republish the given root +// using the given short and long time intervals. +func NewRepublisher(ctx context.Context, pf PubFunc, tshort, tlong time.Duration) *Republisher { + ctx, cancel := context.WithCancel(ctx) + return &Republisher{ + TimeoutShort: tshort, + TimeoutLong: tlong, + RetryTimeout: tlong, + update: make(chan cid.Cid, 1), + pubfunc: pf, + immediatePublish: make(chan chan struct{}), + ctx: ctx, + cancel: cancel, + } +} + +// WaitPub waits for the current value to be published (or returns early +// if it already has). +func (rp *Republisher) WaitPub(ctx context.Context) error { + wait := make(chan struct{}) + select { + case rp.immediatePublish <- wait: + case <-ctx.Done(): + return ctx.Err() + } + select { + case <-wait: + return nil + case <-ctx.Done(): + return ctx.Err() + } +} + +func (rp *Republisher) Close() error { + // TODO(steb): Wait for `Run` to stop + err := rp.WaitPub(rp.ctx) + rp.cancel() + return err +} + +// Update the current value. The value will be published after a delay but each +// consecutive call to Update may extend this delay up to TimeoutLong. +func (rp *Republisher) Update(c cid.Cid) { + select { + case <-rp.update: + select { + case rp.update <- c: + default: + // Don't try again. If we hit this case, there's a + // concurrent publish and we can safely let that + // concurrent publish win. + } + case rp.update <- c: + } +} + +// Run contains the core logic of the `Republisher`. It calls the user-defined +// `pubfunc` function whenever the `Cid` value is updated to a *new* value. The +// complexity comes from the fact that `pubfunc` may be slow so we need to batch +// updates. +// +// Algorithm: +// 1. When we receive the first update after publishing, we set a `longer` timer. +// 2. When we receive any update, we reset the `quick` timer. +// 3. If either the `quick` timeout or the `longer` timeout elapses, +// we call `publish` with the latest updated value. +// +// The `longer` timer ensures that we delay publishing by at most +// `TimeoutLong`. The `quick` timer allows us to publish sooner if +// it looks like there are no more updates coming down the pipe. +// +// Note: If a publish fails, we retry repeatedly every TimeoutRetry. +func (rp *Republisher) Run(lastPublished cid.Cid) { + quick := time.NewTimer(0) + if !quick.Stop() { + <-quick.C + } + longer := time.NewTimer(0) + if !longer.Stop() { + <-longer.C + } + + var toPublish cid.Cid + for rp.ctx.Err() == nil { + var waiter chan struct{} + + select { + case <-rp.ctx.Done(): + return + case newValue := <-rp.update: + // Skip already published values. + if lastPublished.Equals(newValue) { + // Break to the end of the switch to cleanup any + // timers. + toPublish = cid.Undef + break + } + + // If we aren't already waiting to publish something, + // reset the long timeout. + if !toPublish.Defined() { + longer.Reset(rp.TimeoutLong) + } + + // Always reset the short timeout. + quick.Reset(rp.TimeoutShort) + + // Finally, set the new value to publish. + toPublish = newValue + continue + case waiter = <-rp.immediatePublish: + // Make sure to grab the *latest* value to publish. + select { + case toPublish = <-rp.update: + default: + } + + // Avoid publishing duplicate values + if lastPublished.Equals(toPublish) { + toPublish = cid.Undef + } + case <-quick.C: + case <-longer.C: + } + + // Cleanup, publish, and close waiters. + + // 1. Stop any timers. Don't use the `if !t.Stop() { ... }` + // idiom as these timers may not be running. + + quick.Stop() + select { + case <-quick.C: + default: + } + + longer.Stop() + select { + case <-longer.C: + default: + } + + // 2. If we have a value to publish, publish it now. + if toPublish.Defined() { + for { + err := rp.pubfunc(rp.ctx, toPublish) + if err == nil { + break + } + // Keep retrying until we succeed or we abort. + // TODO(steb): We could try pulling new values + // off `update` but that's not critical (and + // complicates this code a bit). We'll pull off + // a new value on the next loop through. + select { + case <-time.After(rp.RetryTimeout): + case <-rp.ctx.Done(): + return + } + } + lastPublished = toPublish + toPublish = cid.Undef + } + + // 3. Trigger anything waiting in `WaitPub`. + if waiter != nil { + close(waiter) + } + } +} diff --git a/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/root.go b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/root.go new file mode 100644 index 0000000000..870d4396de --- /dev/null +++ b/vendor/gx/ipfs/Qmb74fRYPgpjYzoBV7PAVNmP3DQaRrh8dHdKE4PwnF3cRx/go-mfs/root.go @@ -0,0 +1,218 @@ +// package mfs implements an in memory model of a mutable IPFS filesystem. +// TODO: Develop on this line (and move it to `doc.go`). + +package mfs + +import ( + "context" + "errors" + "fmt" + "time" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +// TODO: Remove if not used. +var ErrNotExist = errors.New("no such rootfs") +var ErrClosed = errors.New("file closed") + +var log = logging.Logger("mfs") + +// TODO: Remove if not used. +var ErrIsDirectory = errors.New("error: is a directory") + +// The information that an MFS `Directory` has about its children +// when updating one of its entries: when a child mutates it signals +// its parent directory to update its entry (under `Name`) with the +// new content (in `Node`). +type child struct { + Name string + Node ipld.Node +} + +// This interface represents the basic property of MFS directories of updating +// children entries with modified content. Implemented by both the MFS +// `Directory` and `Root` (which is basically a `Directory` with republishing +// support). +// +// TODO: What is `fullsync`? (unnamed `bool` argument) +// TODO: There are two types of persistence/flush that need to be +// distinguished here, one at the DAG level (when I store the modified +// nodes in the DAG service) and one in the UnixFS/MFS level (when I modify +// the entry/link of the directory that pointed to the modified node). +type parent interface { + // Method called by a child to its parent to signal to update the content + // pointed to in the entry by that child's name. The child sends its own + // information in the `child` structure. As modifying a directory entry + // entails modifying its contents the parent will also call *its* parent's + // `updateChildEntry` to update the entry pointing to the new directory, + // this mechanism is in turn repeated until reaching the `Root`. + updateChildEntry(c child) error +} + +type NodeType int + +const ( + TFile NodeType = iota + TDir +) + +// FSNode abstracts the `Directory` and `File` structures, it represents +// any child node in the MFS (i.e., all the nodes besides the `Root`). It +// is the counterpart of the `parent` interface which represents any +// parent node in the MFS (`Root` and `Directory`). +// (Not to be confused with the `unixfs.FSNode`.) +type FSNode interface { + GetNode() (ipld.Node, error) + + Flush() error + Type() NodeType +} + +// IsDir checks whether the FSNode is dir type +func IsDir(fsn FSNode) bool { + return fsn.Type() == TDir +} + +// IsFile checks whether the FSNode is file type +func IsFile(fsn FSNode) bool { + return fsn.Type() == TFile +} + +// Root represents the root of a filesystem tree. +type Root struct { + + // Root directory of the MFS layout. + dir *Directory + + repub *Republisher +} + +// NewRoot creates a new Root and starts up a republisher routine for it. +func NewRoot(parent context.Context, ds ipld.DAGService, node *dag.ProtoNode, pf PubFunc) (*Root, error) { + + var repub *Republisher + if pf != nil { + repub = NewRepublisher(parent, pf, time.Millisecond*300, time.Second*3) + + // No need to take the lock here since we just created + // the `Republisher` and no one has access to it yet. + + go repub.Run(node.Cid()) + } + + root := &Root{ + repub: repub, + } + + fsn, err := ft.FSNodeFromBytes(node.Data()) + if err != nil { + log.Error("IPNS pointer was not unixfs node") + // TODO: IPNS pointer? + return nil, err + } + + switch fsn.Type() { + case ft.TDirectory, ft.THAMTShard: + newDir, err := NewDirectory(parent, node.String(), node, root, ds) + if err != nil { + return nil, err + } + + root.dir = newDir + case ft.TFile, ft.TMetadata, ft.TRaw: + return nil, fmt.Errorf("root can't be a file (unixfs type: %s)", fsn.Type()) + // TODO: This special error reporting case doesn't seem worth it, we either + // have a UnixFS directory or we don't. + default: + return nil, fmt.Errorf("unrecognized unixfs type: %s", fsn.Type()) + } + return root, nil +} + +// GetDirectory returns the root directory. +func (kr *Root) GetDirectory() *Directory { + return kr.dir +} + +// Flush signals that an update has occurred since the last publish, +// and updates the Root republisher. +// TODO: We are definitely abusing the "flush" terminology here. +func (kr *Root) Flush() error { + nd, err := kr.GetDirectory().GetNode() + if err != nil { + return err + } + + if kr.repub != nil { + kr.repub.Update(nd.Cid()) + } + return nil +} + +// FlushMemFree flushes the root directory and then uncaches all of its links. +// This has the effect of clearing out potentially stale references and allows +// them to be garbage collected. +// CAUTION: Take care not to ever call this while holding a reference to any +// child directories. Those directories will be bad references and using them +// may have unintended racy side effects. +// A better implemented mfs system (one that does smarter internal caching and +// refcounting) shouldnt need this method. +// TODO: Review the motivation behind this method once the cache system is +// refactored. +func (kr *Root) FlushMemFree(ctx context.Context) error { + dir := kr.GetDirectory() + + if err := dir.Flush(); err != nil { + return err + } + + dir.lock.Lock() + defer dir.lock.Unlock() + + for name := range dir.entriesCache { + delete(dir.entriesCache, name) + } + // TODO: Can't we just create new maps? + + return nil +} + +// updateChildEntry implements the `parent` interface, and signals +// to the publisher that there are changes ready to be published. +// This is the only thing that separates a `Root` from a `Directory`. +// TODO: Evaluate merging both. +// TODO: The `sync` argument isn't used here (we've already reached +// the top), document it and maybe make it an anonymous variable (if +// that's possible). +func (kr *Root) updateChildEntry(c child) error { + err := kr.GetDirectory().dagService.Add(context.TODO(), c.Node) + if err != nil { + return err + } + // TODO: Why are we not using the inner directory lock nor + // applying the same procedure as `Directory.updateChildEntry`? + + if kr.repub != nil { + kr.repub.Update(c.Node.Cid()) + } + return nil +} + +func (kr *Root) Close() error { + nd, err := kr.GetDirectory().GetNode() + if err != nil { + return err + } + + if kr.repub != nil { + kr.repub.Update(nd.Cid()) + return kr.repub.Close() + } + + return nil +} diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/.travis.yml b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/.travis.yml rename to vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/.travis.yml diff --git a/vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/LICENSE b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker/LICENSE rename to vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/LICENSE diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/Makefile b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/Makefile similarity index 100% rename from vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/Makefile rename to vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/Makefile diff --git a/vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/README.md b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/README.md similarity index 100% rename from vendor/gx/ipfs/QmT6dHGp3UYd3vUMpy7rzX2CXQv7HLcj42Vtq8qwwjgASb/go-ipfs-exchange-offline/README.md rename to vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/README.md diff --git a/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/offline.go b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/offline.go new file mode 100644 index 0000000000..6969f3e636 --- /dev/null +++ b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/offline.go @@ -0,0 +1,73 @@ +// package offline implements an object that implements the exchange +// interface but returns nil values to every request. +package offline + +import ( + "context" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + exchange "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" +) + +func Exchange(bs blockstore.Blockstore) exchange.Interface { + return &offlineExchange{bs: bs} +} + +// offlineExchange implements the Exchange interface but doesn't return blocks. +// For use in offline mode. +type offlineExchange struct { + bs blockstore.Blockstore +} + +// GetBlock returns nil to signal that a block could not be retrieved for the +// given key. +// NB: This function may return before the timeout expires. +func (e *offlineExchange) GetBlock(_ context.Context, k cid.Cid) (blocks.Block, error) { + return e.bs.Get(k) +} + +// HasBlock always returns nil. +func (e *offlineExchange) HasBlock(b blocks.Block) error { + return e.bs.Put(b) +} + +// Close always returns nil. +func (_ *offlineExchange) Close() error { + // NB: exchange doesn't own the blockstore's underlying datastore, so it is + // not responsible for closing it. + return nil +} + +func (e *offlineExchange) GetBlocks(ctx context.Context, ks []cid.Cid) (<-chan blocks.Block, error) { + out := make(chan blocks.Block) + go func() { + defer close(out) + var misses []cid.Cid + for _, k := range ks { + hit, err := e.bs.Get(k) + if err != nil { + misses = append(misses, k) + // a long line of misses should abort when context is cancelled. + select { + // TODO case send misses down channel + case <-ctx.Done(): + return + default: + continue + } + } + select { + case out <- hit: + case <-ctx.Done(): + return + } + } + }() + return out, nil +} + +func (e *offlineExchange) IsOnline() bool { + return false +} diff --git a/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/package.json b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/package.json new file mode 100644 index 0000000000..e356dd9f14 --- /dev/null +++ b/vendor/gx/ipfs/Qmb9fkAWgcyVRnFdXGqA6jcWGFj6q35oJjwRAYRhfEboGS/go-ipfs-exchange-offline/package.json @@ -0,0 +1,48 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-exchange-offline" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-exchange-offline" + }, + "gxDependencies": [ + { + "author": "hsanjuan", + "hash": "QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA", + "name": "go-ipfs-blockstore", + "version": "0.1.8" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "hsanjuan", + "hash": "QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg", + "name": "go-ipfs-exchange-interface", + "version": "0.1.3" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "hsanjuan", + "hash": "QmcbQ44AgbtV1rnxZz5RsRVduxdgNYLANxnsuW5wvvu4ts", + "name": "go-ipfs-blocksutil", + "version": "0.1.2" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipfs-exchange-offline", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.7" +} + diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/.travis.yml b/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/.travis.yml deleted file mode 100644 index 0c44098200..0000000000 --- a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -language: go - -sudo: false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/README.md b/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/README.md deleted file mode 100644 index 4b2e2e2f50..0000000000 --- a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# go-libp2p-transport - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://libp2p.io/) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) -[![GoDoc](https://godoc.org/github.com/libp2p/go-libp2p-transport?status.svg)](https://godoc.org/github.com/libp2p/go-libp2p-transport) -[![Coverage Status](https://img.shields.io/codecov/c/github/libp2p/go-libp2p-transport.svg?style=flat-square&branch=master)](https://codecov.io/github/libp2p/go-libp2p-transport?branch=master) -[![Build Status](https://travis-ci.org/libp2p/go-libp2p-transport.svg?branch=master)](https://travis-ci.org/libp2p/go-libp2p-transport) - -> libp2p transport code - -A common interface for network transports. - -This is the 'base' layer for any transport that wants to be used by libp2p and ipfs. If you want to make 'ipfs work over X', the first thing you'll want to do is to implement the `Transport` interface for 'X'. - -Transports are: - -* Encrypted: Connections must be end-to-end encrypted. -* Authenticated: The endpoints, RemotePeer and LocalPeer, must be authenticated. -* Multiplexed: It must be possible to multiplex multiple reliable streams over a single transport connection. - -## Install - -```sh -> gx install --global -> gx-go rewrite -``` - -## Usage - -To actually *use* a transport, you'll likely want to register it with a `transport.Network` (e.g., [go-libp2p-swarm](https://github.com/libp2p/go-libp2p-swarm)). However, you're probably more interested in *implementing* transports. - -Transports construct fully featured, encrypted, multiplexed connections. However, there's a fairly good chance your transport won't meet all of those requirements. To make life easier, we've created a helper library called [go-libp2p-transport-upgrader](https://github.com/libp2p/go-libp2p-transport-upgrader) for upgrading simple stream transports to fully-featured (encrypted, authenticated, multiplexed) transports. Check out that packages [README]([go-libp2p-transport-upgrader](https://github.com/libp2p/go-libp2p-transport-upgrader/blob/master/README.md) for an example. - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-transport/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) - -## License - -MIT diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/package.json b/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/package.json deleted file mode 100644 index 6d766ef485..0000000000 --- a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-transport" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-transport" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-transport", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.15" -} - diff --git a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/transport.go b/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/transport.go deleted file mode 100644 index 620e508cac..0000000000 --- a/vendor/gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport/transport.go +++ /dev/null @@ -1,97 +0,0 @@ -package transport - -import ( - "context" - "net" - "time" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -// DialTimeout is the maximum duration a Dial is allowed to take. -// This includes the time between dialing the raw network connection, -// protocol selection as well the handshake, if applicable. -var DialTimeout = 60 * time.Second - -// AcceptTimeout is the maximum duration an Accept is allowed to take. -// This includes the time between accepting the raw network connection, -// protocol selection as well as the handshake, if applicable. -var AcceptTimeout = 60 * time.Second - -var log = logging.Logger("transport") - -// Conn is an extension of the net.Conn interface that provides multiaddr -// information, and an accessor for the transport used to create the conn -type Conn interface { - smux.Conn - inet.ConnSecurity - inet.ConnMultiaddrs - - // Transport returns the transport to which this connection belongs. - Transport() Transport -} - -// Transport represents any device by which you can connect to and accept -// connections from other peers. The built-in transports provided are TCP and UTP -// but many more can be implemented, sctp, audio signals, sneakernet, UDT, a -// network of drones carrying usb flash drives, and so on. -type Transport interface { - // Dial dials a remote peer. It should try to reuse local listener - // addresses if possible but it may choose not to. - Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (Conn, error) - - // CanDial returns true if this transport knows how to dial the given - // multiaddr. - // - // Returning true does not guarantee that dialing this multiaddr will - // succeed. This function should *only* be used to preemptively filter - // out addresses that we can't dial. - CanDial(addr ma.Multiaddr) bool - - // Listen listens on the passed multiaddr. - Listen(laddr ma.Multiaddr) (Listener, error) - - // Protocol returns the set of protocols handled by this transport. - // - // See the Network interface for an explanation of how this is used. - Protocols() []int - - // Proxy returns true if this is a proxy transport. - // - // See the Network interface for an explanation of how this is used. - // TODO: Make this a part of the go-multiaddr protocol instead? - Proxy() bool -} - -// Listener is an interface closely resembling the net.Listener interface. The -// only real difference is that Accept() returns Conn's of the type in this -// package, and also exposes a Multiaddr method as opposed to a regular Addr -// method -type Listener interface { - Accept() (Conn, error) - Close() error - Addr() net.Addr - Multiaddr() ma.Multiaddr -} - -// Network is an inet.Network with methods for managing transports. -type Network interface { - inet.Network - - // AddTransport adds a transport to this Network. - // - // When dialing, this Network will iterate over the protocols in the - // remote multiaddr and pick the first protocol registered with a proxy - // transport, if any. Otherwise, it'll pick the transport registered to - // handle the last protocol in the multiaddr. - // - // When listening, this Network will iterate over the protocols in the - // local multiaddr and pick the *last* protocol registered with a proxy - // transport, if any. Otherwise, it'll pick the transport registered to - // handle the last protocol in the multiaddr. - AddTransport(t Transport) error -} diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/.travis.yml b/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/.travis.yml deleted file mode 100644 index 97aca1a098..0000000000 --- a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: flase - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/package.json b/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/package.json deleted file mode 100644 index 43b6a90e95..0000000000 --- a/vendor/gx/ipfs/QmbLmhmtzD1rsrWC5Vjq6YHBmUzqh7LCR4m8W1e91BHQyg/go-libp2p-nat/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-nat" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-nat" - }, - "gxDependencies": [ - { - "author": "fd", - "hash": "QmPfFaAVvKzacBFh2UBqUzczkPNQxGcLyAXKKD1hjC22re", - "name": "go-nat", - "version": "1.0.0" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "whyrusleeping", - "hash": "QmeQW4ayVqi7Jjay1SrP2wYydsH9KwSrzQBnqyC25gPFnG", - "name": "go-notifier", - "version": "1.0.0" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "", - "name": "go-libp2p-nat", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.8.8" -} - diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/.travis.yml b/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/.travis.yml deleted file mode 100644 index bc156b09dd..0000000000 --- a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/convert.go b/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/convert.go deleted file mode 100644 index 32d94fb09c..0000000000 --- a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/convert.go +++ /dev/null @@ -1,182 +0,0 @@ -// Package flatfs is a Datastore implementation that stores all -// objects in a two-level directory structure in the local file -// system, regardless of the hierarchy of the keys. -package flatfs - -import ( - "errors" - "fmt" - "io" - "os" - "path/filepath" - "strings" - - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" -) - -func UpgradeV0toV1(path string, prefixLen int) error { - fun := Prefix(prefixLen) - err := WriteShardFunc(path, fun) - if err != nil { - return err - } - err = WriteReadme(path, fun) - if err != nil { - return err - } - return nil -} - -func DowngradeV1toV0(path string) error { - fun, err := ReadShardFunc(path) - if err != nil { - return err - } else if fun.funName != "prefix" { - return fmt.Errorf("%s: can only downgrade datastore that use the 'prefix' sharding function", path) - } - - err = os.Remove(filepath.Join(path, SHARDING_FN)) - if err != nil { - return err - } - err = os.Remove(filepath.Join(path, README_FN)) - if err != nil && !os.IsNotExist(err) { - return err - } - return nil -} - -func Move(oldPath string, newPath string, out io.Writer) error { - oldDS, err := Open(oldPath, false) - if err != nil { - return fmt.Errorf("%s: %v", oldPath, err) - } - oldDS.deactivate() - newDS, err := Open(newPath, false) - if err != nil { - return fmt.Errorf("%s: %v", newPath, err) - } - newDS.deactivate() - - res, err := oldDS.Query(query.Query{KeysOnly: true}) - if err != nil { - return err - } - - if out != nil { - fmt.Fprintf(out, "Moving Keys...\n") - } - - // first move the keys - count := 0 - for { - e, ok := res.NextSync() - if !ok { - break - } - if e.Error != nil { - return e.Error - } - - err := moveKey(oldDS, newDS, datastore.RawKey(e.Key)) - if err != nil { - return err - } - - count++ - if out != nil && count%10 == 0 { - fmt.Fprintf(out, "\r%d keys so far", count) - } - } - - if out != nil { - fmt.Fprintf(out, "\nCleaning Up...\n") - } - - // now walk the old top-level directory - dir, err := os.Open(oldDS.path) - if err != nil { - return err - } - defer dir.Close() - names, err := dir.Readdirnames(-1) - if err != nil { - return err - } - for _, fn := range names { - if fn == "." || fn == ".." { - continue - } - oldPath := filepath.Join(oldDS.path, fn) - inf, err := os.Stat(oldPath) - if err != nil { - return err - } - if inf.IsDir() { - indir, err := os.Open(oldPath) - if err != nil { - return err - } - - names, err := indir.Readdirnames(-1) - indir.Close() - if err != nil { - return err - } - - for _, n := range names { - p := filepath.Join(oldPath, n) - // part of unfinished write transaction - // remove it - if strings.HasPrefix(n, "put-") { - err := os.Remove(p) - if err != nil { - return err - } - } else { - return errors.New("unknown file in flatfs: " + p) - } - } - - err = os.Remove(oldPath) - if err != nil { - return err - } - } else if fn == SHARDING_FN || fn == README_FN { - // generated file so just remove it - err := os.Remove(oldPath) - if err != nil { - return err - } - } else { - // else we found something unexpected, so to be safe just move it - log.Warningf("found unexpected file in datastore directory: \"%s\", moving anyway\n", fn) - newPath := filepath.Join(newDS.path, fn) - err := os.Rename(oldPath, newPath) - if err != nil { - return err - } - } - } - - if out != nil { - fmt.Fprintf(out, "All Done.\n") - } - - return nil -} - -func moveKey(oldDS *Datastore, newDS *Datastore, key datastore.Key) error { - _, oldPath := oldDS.encode(key) - dir, newPath := newDS.encode(key) - err := newDS.makeDirNoSync(dir) - if err != nil { - return err - } - err = os.Rename(oldPath, newPath) - if err != nil { - return err - } - return nil -} diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/flatfs.go b/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/flatfs.go deleted file mode 100644 index 71e80f6867..0000000000 --- a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/flatfs.go +++ /dev/null @@ -1,1062 +0,0 @@ -// Package flatfs is a Datastore implementation that stores all -// objects in a two-level directory structure in the local file -// system, regardless of the hierarchy of the keys. -package flatfs - -import ( - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "math" - "math/rand" - "os" - "path/filepath" - "strings" - "sync" - "sync/atomic" - "time" - - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" -) - -var log = logging.Logger("flatfs") - -const ( - extension = ".data" - diskUsageMessageTimeout = 5 * time.Second - diskUsageCheckpointPercent = 1.0 - diskUsageCheckpointTimeout = 2 * time.Second -) - -var ( - // DiskUsageFile is the name of the file to cache the size of the - // datastore in disk - DiskUsageFile = "diskUsage.cache" - // DiskUsageFilesAverage is the maximum number of files per folder - // to stat in order to calculate the size of the datastore. - // The size of the rest of the files in a folder will be assumed - // to be the average of the values obtained. This includes - // regular files and directories. - DiskUsageFilesAverage = 2000 - // DiskUsageCalcTimeout is the maximum time to spend - // calculating the DiskUsage upon a start when no - // DiskUsageFile is present. - // If this period did not suffice to read the size of the datastore, - // the remaining sizes will be stimated. - DiskUsageCalcTimeout = 5 * time.Minute -) - -const ( - opPut = iota - opDelete - opRename -) - -type initAccuracy string - -const ( - unknownA initAccuracy = "unknown" - exactA initAccuracy = "initial-exact" - approxA initAccuracy = "initial-approximate" - timedoutA initAccuracy = "initial-timed-out" -) - -func combineAccuracy(a, b initAccuracy) initAccuracy { - if a == unknownA || b == unknownA { - return unknownA - } - if a == timedoutA || b == timedoutA { - return timedoutA - } - if a == approxA || b == approxA { - return approxA - } - if a == exactA && b == exactA { - return exactA - } - if a == "" { - return b - } - if b == "" { - return a - } - return unknownA -} - -var _ datastore.Datastore = (*Datastore)(nil) - -var ( - ErrDatastoreExists = errors.New("datastore already exists") - ErrDatastoreDoesNotExist = errors.New("datastore directory does not exist") - ErrShardingFileMissing = fmt.Errorf("%s file not found in datastore", SHARDING_FN) -) - -func init() { - rand.Seed(time.Now().UTC().UnixNano()) -} - -// Datastore implements the go-datastore Interface. -// Note this datastore cannot guarantee order of concurrent -// write operations to the same key. See the explanation in -// Put(). -type Datastore struct { - // atmoic operations should always be used with diskUsage. - // Must be first in struct to ensure correct alignment - // (see https://golang.org/pkg/sync/atomic/#pkg-note-BUG) - diskUsage int64 - - path string - - shardStr string - getDir ShardFunc - - // sychronize all writes and directory changes for added safety - sync bool - - // these values should only be used during internalization or - // inside the checkpoint loop - dirty bool - storedValue diskUsageValue - - checkpointCh chan struct{} - done chan struct{} - - // opMap handles concurrent write operations (put/delete) - // to the same key - opMap *opMap -} - -type diskUsageValue struct { - DiskUsage int64 `json:"diskUsage"` - Accuracy initAccuracy `json:"accuracy"` -} - -type ShardFunc func(string) string - -type opT int - -// op wraps useful arguments of write operations -type op struct { - typ opT // operation type - key datastore.Key // datastore key. Mandatory. - tmp string // temp file path - path string // file path - v []byte // value -} - -type opMap struct { - ops sync.Map -} - -type opResult struct { - mu sync.RWMutex - success bool - - opMap *opMap - name string -} - -// Returns nil if there's nothing to do. -func (m *opMap) Begin(name string) *opResult { - for { - myOp := &opResult{opMap: m, name: name} - myOp.mu.Lock() - opIface, loaded := m.ops.LoadOrStore(name, myOp) - if !loaded { // no one else doing ops with this key - return myOp - } - - op := opIface.(*opResult) - // someone else doing ops with this key, wait for - // the result - op.mu.RLock() - if op.success { - return nil - } - - // if we are here, we will retry the operation - } -} - -func (o *opResult) Finish(ok bool) { - o.success = ok - o.opMap.ops.Delete(o.name) - o.mu.Unlock() -} - -func Create(path string, fun *ShardIdV1) error { - - err := os.Mkdir(path, 0755) - if err != nil && !os.IsExist(err) { - return err - } - - dsFun, err := ReadShardFunc(path) - switch err { - case ErrShardingFileMissing: - isEmpty, err := DirIsEmpty(path) - if err != nil { - return err - } - if !isEmpty { - return fmt.Errorf("directory missing %s file: %s", SHARDING_FN, path) - } - - err = WriteShardFunc(path, fun) - if err != nil { - return err - } - err = WriteReadme(path, fun) - return err - case nil: - if fun.String() != dsFun.String() { - return fmt.Errorf("specified shard func '%s' does not match repo shard func '%s'", - fun.String(), dsFun.String()) - } - return ErrDatastoreExists - default: - return err - } -} - -func Open(path string, syncFiles bool) (*Datastore, error) { - _, err := os.Stat(path) - if os.IsNotExist(err) { - return nil, ErrDatastoreDoesNotExist - } else if err != nil { - return nil, err - } - - shardId, err := ReadShardFunc(path) - if err != nil { - return nil, err - } - - fs := &Datastore{ - path: path, - shardStr: shardId.String(), - getDir: shardId.Func(), - sync: syncFiles, - diskUsage: 0, - opMap: new(opMap), - } - - // This sets diskUsage to the correct value - // It might be slow, but allowing it to happen - // while the datastore is usable might - // cause diskUsage to not be accurate. - err = fs.calculateDiskUsage() - if err != nil { - // Cannot stat() all - // elements in the datastore. - return nil, err - } - - fs.checkpointCh = make(chan struct{}, 1) - fs.done = make(chan struct{}) - go fs.checkpointLoop() - return fs, nil -} - -// convenience method -func CreateOrOpen(path string, fun *ShardIdV1, sync bool) (*Datastore, error) { - err := Create(path, fun) - if err != nil && err != ErrDatastoreExists { - return nil, err - } - return Open(path, sync) -} - -func (fs *Datastore) ShardStr() string { - return fs.shardStr -} - -func (fs *Datastore) encode(key datastore.Key) (dir, file string) { - noslash := key.String()[1:] - dir = filepath.Join(fs.path, fs.getDir(noslash)) - file = filepath.Join(dir, noslash+extension) - return dir, file -} - -func (fs *Datastore) decode(file string) (key datastore.Key, ok bool) { - if filepath.Ext(file) != extension { - return datastore.Key{}, false - } - name := file[:len(file)-len(extension)] - return datastore.NewKey(name), true -} - -func (fs *Datastore) makeDir(dir string) error { - if err := fs.makeDirNoSync(dir); err != nil { - return err - } - - // In theory, if we create a new prefix dir and add a file to - // it, the creation of the prefix dir itself might not be - // durable yet. Sync the root dir after a successful mkdir of - // a prefix dir, just to be paranoid. - if fs.sync { - if err := syncDir(fs.path); err != nil { - return err - } - } - return nil -} - -func (fs *Datastore) makeDirNoSync(dir string) error { - if err := os.Mkdir(dir, 0755); err != nil { - // EEXIST is safe to ignore here, that just means the prefix - // directory already existed. - if !os.IsExist(err) { - return err - } - return nil - } - - // Track DiskUsage of this NEW folder - fs.updateDiskUsage(dir, true) - return nil -} - -// This function always runs under an opLock. Therefore, only one thread is -// touching the affected files. -func (fs *Datastore) renameAndUpdateDiskUsage(tmpPath, path string) error { - fi, err := os.Stat(path) - - // Destination exists, we need to discount it from diskUsage - if fs != nil && err == nil { - atomic.AddInt64(&fs.diskUsage, -fi.Size()) - } else if !os.IsNotExist(err) { - return err - } - - // Rename and add new file's diskUsage. If the rename fails, - // it will either a) Re-add the size of an existing file, which - // was sustracted before b) Add 0 if there is no existing file. - err = os.Rename(tmpPath, path) - fs.updateDiskUsage(path, true) - return err -} - -var putMaxRetries = 6 - -// Put stores a key/value in the datastore. -// -// Note, that we do not guarantee order of write operations (Put or Delete) -// to the same key in this datastore. -// -// For example. i.e. in the case of two concurrent Put, we only guarantee -// that one of them will come through, but cannot assure which one even if -// one arrived slightly later than the other. In the case of a -// concurrent Put and a Delete operation, we cannot guarantee which one -// will win. -func (fs *Datastore) Put(key datastore.Key, value []byte) error { - var err error - for i := 1; i <= putMaxRetries; i++ { - err = fs.doWriteOp(&op{ - typ: opPut, - key: key, - v: value, - }) - if err == nil { - break - } - - if !strings.Contains(err.Error(), "too many open files") { - break - } - - log.Errorf("too many open files, retrying in %dms", 100*i) - time.Sleep(time.Millisecond * 100 * time.Duration(i)) - } - return err -} - -func (fs *Datastore) doOp(oper *op) error { - switch oper.typ { - case opPut: - return fs.doPut(oper.key, oper.v) - case opDelete: - return fs.doDelete(oper.key) - case opRename: - return fs.renameAndUpdateDiskUsage(oper.tmp, oper.path) - default: - panic("bad operation, this is a bug") - } -} - -// doWrite optmizes out write operations (put/delete) to the same -// key by queueing them and suceeding all queued -// operations if one of them does. In such case, -// we assume that the first suceeding operation -// on that key was the last one to happen after -// all successful others. -func (fs *Datastore) doWriteOp(oper *op) error { - keyStr := oper.key.String() - - opRes := fs.opMap.Begin(keyStr) - if opRes == nil { // nothing to do, a concurrent op succeeded - return nil - } - - // Do the operation - err := fs.doOp(oper) - - // Finish it. If no error, it will signal other operations - // waiting on this result to succeed. Otherwise, they will - // retry. - opRes.Finish(err == nil) - return err -} - -func (fs *Datastore) doPut(key datastore.Key, val []byte) error { - - dir, path := fs.encode(key) - if err := fs.makeDir(dir); err != nil { - return err - } - - tmp, err := ioutil.TempFile(dir, "put-") - if err != nil { - return err - } - closed := false - removed := false - defer func() { - if !closed { - // silence errcheck - _ = tmp.Close() - } - if !removed { - // silence errcheck - _ = os.Remove(tmp.Name()) - } - }() - - if _, err := tmp.Write(val); err != nil { - return err - } - if fs.sync { - if err := syncFile(tmp); err != nil { - return err - } - } - if err := tmp.Close(); err != nil { - return err - } - closed = true - - err = fs.renameAndUpdateDiskUsage(tmp.Name(), path) - if err != nil { - return err - } - removed = true - - if fs.sync { - if err := syncDir(dir); err != nil { - return err - } - } - return nil -} - -func (fs *Datastore) putMany(data map[datastore.Key]interface{}) error { - var dirsToSync []string - files := make(map[*os.File]*op) - - for key, value := range data { - val, ok := value.([]byte) - if !ok { - return datastore.ErrInvalidType - } - dir, path := fs.encode(key) - if err := fs.makeDirNoSync(dir); err != nil { - return err - } - dirsToSync = append(dirsToSync, dir) - - tmp, err := ioutil.TempFile(dir, "put-") - if err != nil { - return err - } - - if _, err := tmp.Write(val); err != nil { - return err - } - - files[tmp] = &op{ - typ: opRename, - path: path, - tmp: tmp.Name(), - key: key, - } - } - - ops := make(map[*os.File]int) - - defer func() { - for fi := range files { - val, _ := ops[fi] - switch val { - case 0: - _ = fi.Close() - fallthrough - case 1: - _ = os.Remove(fi.Name()) - } - } - }() - - // Now we sync everything - // sync and close files - for fi := range files { - if fs.sync { - if err := syncFile(fi); err != nil { - return err - } - } - - if err := fi.Close(); err != nil { - return err - } - - // signify closed - ops[fi] = 1 - } - - // move files to their proper places - for fi, op := range files { - fs.doWriteOp(op) - // signify removed - ops[fi] = 2 - } - - // now sync the dirs for those files - if fs.sync { - for _, dir := range dirsToSync { - if err := syncDir(dir); err != nil { - return err - } - } - - // sync top flatfs dir - if err := syncDir(fs.path); err != nil { - return err - } - } - - return nil -} - -func (fs *Datastore) Get(key datastore.Key) (value []byte, err error) { - _, path := fs.encode(key) - data, err := ioutil.ReadFile(path) - if err != nil { - if os.IsNotExist(err) { - return nil, datastore.ErrNotFound - } - // no specific error to return, so just pass it through - return nil, err - } - return data, nil -} - -func (fs *Datastore) Has(key datastore.Key) (exists bool, err error) { - _, path := fs.encode(key) - switch _, err := os.Stat(path); { - case err == nil: - return true, nil - case os.IsNotExist(err): - return false, nil - default: - return false, err - } -} - -func (fs *Datastore) GetSize(key datastore.Key) (size int, err error) { - _, path := fs.encode(key) - switch s, err := os.Stat(path); { - case err == nil: - return int(s.Size()), nil - case os.IsNotExist(err): - return -1, datastore.ErrNotFound - default: - return -1, err - } -} - -// Delete removes a key/value from the Datastore. Please read -// the Put() explanation about the handling of concurrent write -// operations to the same key. -func (fs *Datastore) Delete(key datastore.Key) error { - return fs.doWriteOp(&op{ - typ: opDelete, - key: key, - v: nil, - }) -} - -// This function always runs within an opLock for the given -// key, and not concurrently. -func (fs *Datastore) doDelete(key datastore.Key) error { - _, path := fs.encode(key) - - fSize := fileSize(path) - - switch err := os.Remove(path); { - case err == nil: - atomic.AddInt64(&fs.diskUsage, -fSize) - fs.checkpointDiskUsage() - return nil - case os.IsNotExist(err): - return datastore.ErrNotFound - default: - return err - } -} - -func (fs *Datastore) Query(q query.Query) (query.Results, error) { - if (q.Prefix != "" && q.Prefix != "/") || - len(q.Filters) > 0 || - len(q.Orders) > 0 || - q.Limit > 0 || - q.Offset > 0 || - !q.KeysOnly { - // TODO this is overly simplistic, but the only caller is - // `ipfs refs local` for now, and this gets us moving. - return nil, errors.New("flatfs only supports listing all keys in random order") - } - - reschan := make(chan query.Result, query.KeysOnlyBufSize) - go func() { - defer close(reschan) - err := fs.walkTopLevel(fs.path, reschan) - if err != nil { - reschan <- query.Result{Error: errors.New("walk failed: " + err.Error())} - } - }() - return query.ResultsWithChan(q, reschan), nil -} - -func (fs *Datastore) walkTopLevel(path string, reschan chan query.Result) error { - dir, err := os.Open(path) - if err != nil { - return err - } - defer dir.Close() - names, err := dir.Readdirnames(-1) - if err != nil { - return err - } - for _, dir := range names { - - if len(dir) == 0 || dir[0] == '.' { - continue - } - - err = fs.walk(filepath.Join(path, dir), reschan) - if err != nil { - return err - } - - } - return nil -} - -// folderSize estimates the diskUsage of a folder by reading -// up to DiskUsageFilesAverage entries in it and assumming any -// other files will have an avereage size. -func folderSize(path string, deadline time.Time) (int64, initAccuracy, error) { - var du int64 - - folder, err := os.Open(path) - if err != nil { - return 0, "", err - } - defer folder.Close() - - stat, err := folder.Stat() - if err != nil { - return 0, "", err - } - - files, err := folder.Readdirnames(-1) - if err != nil { - return 0, "", err - } - - totalFiles := len(files) - i := 0 - filesProcessed := 0 - maxFiles := DiskUsageFilesAverage - if maxFiles <= 0 { - maxFiles = totalFiles - } - - // randomize file order - // https://stackoverflow.com/a/42776696 - for i := len(files) - 1; i > 0; i-- { - j := rand.Intn(i + 1) - files[i], files[j] = files[j], files[i] - } - - accuracy := exactA - for { - // Do not process any files after deadline is over - if time.Now().After(deadline) { - accuracy = timedoutA - break - } - - if i >= totalFiles || filesProcessed >= maxFiles { - if filesProcessed >= maxFiles { - accuracy = approxA - } - break - } - - // Stat the file - fname := files[i] - subpath := filepath.Join(path, fname) - st, err := os.Stat(subpath) - if err != nil { - return 0, "", err - } - - // Find folder size recursively - if st.IsDir() { - du2, acc, err := folderSize(filepath.Join(subpath), deadline) - if err != nil { - return 0, "", err - } - accuracy = combineAccuracy(acc, accuracy) - du += du2 - filesProcessed++ - } else { // in any other case, add the file size - du += st.Size() - filesProcessed++ - } - - i++ - } - - nonProcessed := totalFiles - filesProcessed - - // Avg is total size in this folder up to now / total files processed - // it includes folders ant not folders - avg := 0.0 - if filesProcessed > 0 { - avg = float64(du) / float64(filesProcessed) - } - duEstimation := int64(avg * float64(nonProcessed)) - du += duEstimation - du += stat.Size() - //fmt.Println(path, "total:", totalFiles, "totalStat:", i, "totalFile:", filesProcessed, "left:", nonProcessed, "avg:", int(avg), "est:", int(duEstimation), "du:", du) - return du, accuracy, nil -} - -// calculateDiskUsage tries to read the DiskUsageFile for a cached -// diskUsage value, otherwise walks the datastore files. -// it is only safe to call in Open() -func (fs *Datastore) calculateDiskUsage() error { - // Try to obtain a previously stored value from disk - if persDu := fs.readDiskUsageFile(); persDu > 0 { - fs.diskUsage = persDu - return nil - } - - msgDone := make(chan struct{}, 1) // prevent race condition - msgTimer := time.AfterFunc(diskUsageMessageTimeout, func() { - fmt.Printf("Calculating datastore size. This might take %s at most and will happen only once\n", - DiskUsageCalcTimeout.String()) - msgDone <- struct{}{} - }) - defer msgTimer.Stop() - deadline := time.Now().Add(DiskUsageCalcTimeout) - du, accuracy, err := folderSize(fs.path, deadline) - if err != nil { - return err - } - if !msgTimer.Stop() { - <-msgDone - } - if accuracy == timedoutA { - fmt.Println("WARN: It took to long to calculate the datastore size") - fmt.Printf("WARN: The total size (%d) is an estimation. You can fix errors by\n", du) - fmt.Printf("WARN: replacing the %s file with the right disk usage in bytes and\n", - filepath.Join(fs.path, DiskUsageFile)) - fmt.Println("WARN: re-opening the datastore") - } - - fs.storedValue.Accuracy = accuracy - fs.diskUsage = du - fs.writeDiskUsageFile(du, true) - - return nil -} - -func fileSize(path string) int64 { - fi, err := os.Stat(path) - if err != nil { - return 0 - } - return fi.Size() -} - -// updateDiskUsage reads the size of path and atomically -// increases or decreases the diskUsage variable. -// setting add to false will subtract from disk usage. -func (fs *Datastore) updateDiskUsage(path string, add bool) { - fsize := fileSize(path) - if !add { - fsize = -fsize - } - - if fsize != 0 { - atomic.AddInt64(&fs.diskUsage, fsize) - fs.checkpointDiskUsage() - } -} - -func (fs *Datastore) checkpointDiskUsage() { - select { - case fs.checkpointCh <- struct{}{}: - // msg sent - default: - // checkpoint request already pending - } -} - -func (fs *Datastore) checkpointLoop() { - timerActive := true - timer := time.NewTimer(0) - defer timer.Stop() - for { - select { - case _, more := <-fs.checkpointCh: - du := atomic.LoadInt64(&fs.diskUsage) - fs.dirty = true - if !more { // shutting down - fs.writeDiskUsageFile(du, true) - if fs.dirty { - log.Errorf("could not store final value of disk usage to file, future estimates may be inaccurate") - } - fs.done <- struct{}{} - return - } - // If the difference between the checkpointed disk usage and - // current one is larger than than `diskUsageCheckpointPercent` - // of the checkpointed: store it. - newDu := float64(du) - lastCheckpointDu := float64(fs.storedValue.DiskUsage) - diff := math.Abs(newDu - lastCheckpointDu) - if lastCheckpointDu*diskUsageCheckpointPercent < diff*100.0 { - fs.writeDiskUsageFile(du, false) - } - // Otherwise insure the value will be written to disk after - // `diskUsageCheckpointTimeout` - if fs.dirty && !timerActive { - timer.Reset(diskUsageCheckpointTimeout) - timerActive = true - } - case <-timer.C: - timerActive = false - if fs.dirty { - du := atomic.LoadInt64(&fs.diskUsage) - fs.writeDiskUsageFile(du, false) - } - } - } -} - -func (fs *Datastore) writeDiskUsageFile(du int64, doSync bool) { - tmp, err := ioutil.TempFile(fs.path, "du-") - if err != nil { - log.Warningf("cound not write disk usage: %v", err) - return - } - - removed := false - defer func() { - if !removed { - // silence errcheck - _ = os.Remove(tmp.Name()) - } - }() - - toWrite := fs.storedValue - toWrite.DiskUsage = du - encoder := json.NewEncoder(tmp) - if err := encoder.Encode(&toWrite); err != nil { - log.Warningf("cound not write disk usage: %v", err) - return - } - - if doSync { - if err := tmp.Sync(); err != nil { - log.Warningf("cound not sync %s: %v", DiskUsageFile, err) - return - } - } - - if err := tmp.Close(); err != nil { - log.Warningf("cound not write disk usage: %v", err) - return - } - - if err := os.Rename(tmp.Name(), filepath.Join(fs.path, DiskUsageFile)); err != nil { - log.Warningf("cound not write disk usage: %v", err) - return - } - removed = true - - fs.storedValue = toWrite - fs.dirty = false -} - -// readDiskUsageFile is only safe to call in Open() -func (fs *Datastore) readDiskUsageFile() int64 { - fpath := filepath.Join(fs.path, DiskUsageFile) - duB, err := ioutil.ReadFile(fpath) - if err != nil { - return 0 - } - err = json.Unmarshal(duB, &fs.storedValue) - if err != nil { - return 0 - } - return fs.storedValue.DiskUsage -} - -// DiskUsage implements the PersistentDatastore interface -// and returns the current disk usage in bytes used by -// this datastore. -// -// The size is approximative and may slightly differ from -// the real disk values. -func (fs *Datastore) DiskUsage() (uint64, error) { - // it may differ from real disk values if - // the filesystem has allocated for blocks - // for a directory because it has many files in it - // we don't account for "resized" directories. - // In a large datastore, the differences should be - // are negligible though. - - du := atomic.LoadInt64(&fs.diskUsage) - return uint64(du), nil -} - -// Accuracy returns a string representing the accuracy of the -// DiskUsage() result, the value returned is implementation defined -// and for informational purposes only -func (fs *Datastore) Accuracy() string { - return string(fs.storedValue.Accuracy) -} - -func (fs *Datastore) walk(path string, reschan chan query.Result) error { - dir, err := os.Open(path) - if err != nil { - if os.IsNotExist(err) { - // not an error if the file disappeared - return nil - } - return err - } - defer dir.Close() - - // ignore non-directories - fileInfo, err := dir.Stat() - if err != nil { - return err - } - if !fileInfo.IsDir() { - return nil - } - - names, err := dir.Readdirnames(-1) - if err != nil { - return err - } - for _, fn := range names { - - if len(fn) == 0 || fn[0] == '.' { - continue - } - - key, ok := fs.decode(fn) - if !ok { - log.Warningf("failed to decode flatfs entry: %s", fn) - continue - } - - reschan <- query.Result{ - Entry: query.Entry{ - Key: key.String(), - }, - } - } - return nil -} - -// Deactivate closes background maintenance threads, most write -// operations will fail but readonly operations will continue to -// function -func (fs *Datastore) deactivate() error { - if fs.checkpointCh != nil { - close(fs.checkpointCh) - <-fs.done - fs.checkpointCh = nil - } - return nil -} - -func (fs *Datastore) Close() error { - return fs.deactivate() -} - -type flatfsBatch struct { - puts map[datastore.Key]interface{} - deletes map[datastore.Key]struct{} - - ds *Datastore -} - -func (fs *Datastore) Batch() (datastore.Batch, error) { - return &flatfsBatch{ - puts: make(map[datastore.Key]interface{}), - deletes: make(map[datastore.Key]struct{}), - ds: fs, - }, nil -} - -func (bt *flatfsBatch) Put(key datastore.Key, val []byte) error { - bt.puts[key] = val - return nil -} - -func (bt *flatfsBatch) Delete(key datastore.Key) error { - bt.deletes[key] = struct{}{} - return nil -} - -func (bt *flatfsBatch) Commit() error { - if err := bt.ds.putMany(bt.puts); err != nil { - return err - } - - for k := range bt.deletes { - if err := bt.ds.Delete(k); err != nil { - return err - } - } - - return nil -} - -var _ datastore.ThreadSafeDatastore = (*Datastore)(nil) - -func (*Datastore) IsThreadSafe() {} diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/package.json b/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/package.json deleted file mode 100644 index c7d9cd9186..0000000000 --- a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-ds-flatfs" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ds-flatfs" - }, - "gxDependencies": [ - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "", - "name": "go-ds-flatfs", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.3.3" -} - diff --git a/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/.travis.yml b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/.travis.yml new file mode 100644 index 0000000000..0e4b0642e8 --- /dev/null +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/.travis.yml @@ -0,0 +1,27 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +script: + - make deps + - go test ./... + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/LICENSE b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/LICENSE similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/LICENSE rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/LICENSE diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/Makefile b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/Makefile similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/Makefile rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/Makefile diff --git a/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/README.md b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/README.md new file mode 100644 index 0000000000..875d77e3fd --- /dev/null +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/README.md @@ -0,0 +1,26 @@ +# go-libp2p-record + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](http://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) + +> signed records for use with routing systems + +## Documenation + +See https://godoc.org/github.com/libp2p/go-libp2p-record. + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-key/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +### Want to hack on IPFS? + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) + +## License + +MIT diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/codecov.yml b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/codecov.yml rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/codecov.yml diff --git a/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/package.json b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/package.json new file mode 100644 index 0000000000..5a77e37c09 --- /dev/null +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/package.json @@ -0,0 +1,50 @@ +{ + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-record" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-record", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-record", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "4.1.15" +} + diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/Makefile b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/Makefile rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/Makefile diff --git a/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/record.pb.go b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/record.pb.go new file mode 100644 index 0000000000..590d135a9d --- /dev/null +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/record.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: record.proto + +package record_pb + +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// Record represents a dht record that contains a value +// for a key value pair +type Record struct { + // The key that references this record + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The actual value this record is storing + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // Time the record was received, set by receiver + TimeReceived string `protobuf:"bytes,5,opt,name=timeReceived,proto3" json:"timeReceived,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Record) Reset() { *m = Record{} } +func (m *Record) String() string { return proto.CompactTextString(m) } +func (*Record) ProtoMessage() {} +func (*Record) Descriptor() ([]byte, []int) { + return fileDescriptor_bf94fd919e302a1d, []int{0} +} +func (m *Record) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Record.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Record) XXX_Merge(src proto.Message) { + xxx_messageInfo_Record.Merge(m, src) +} +func (m *Record) XXX_Size() int { + return m.Size() +} +func (m *Record) XXX_DiscardUnknown() { + xxx_messageInfo_Record.DiscardUnknown(m) +} + +var xxx_messageInfo_Record proto.InternalMessageInfo + +func (m *Record) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *Record) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *Record) GetTimeReceived() string { + if m != nil { + return m.TimeReceived + } + return "" +} + +func init() { + proto.RegisterType((*Record)(nil), "record.pb.Record") +} + +func init() { proto.RegisterFile("record.proto", fileDescriptor_bf94fd919e302a1d) } + +var fileDescriptor_bf94fd919e302a1d = []byte{ + // 125 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0x4d, 0xce, + 0x2f, 0x4a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0xf1, 0x92, 0x94, 0x42, 0xb8, + 0xd8, 0x82, 0xc0, 0x1c, 0x21, 0x01, 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, + 0x9e, 0x20, 0x10, 0x53, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, + 0x06, 0xe1, 0x08, 0x29, 0x71, 0xf1, 0x94, 0x64, 0xe6, 0xa6, 0x06, 0xa5, 0x26, 0xa7, 0x66, 0x96, + 0xa5, 0xa6, 0x48, 0xb0, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xa1, 0x88, 0x39, 0xf1, 0x9c, 0x78, 0x24, + 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, 0x5b, 0x8d, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x64, 0x43, 0x08, 0x1c, 0x85, 0x00, 0x00, 0x00, +} + +func (m *Record) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Record) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintRecord(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintRecord(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.TimeReceived) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintRecord(dAtA, i, uint64(len(m.TimeReceived))) + i += copy(dAtA[i:], m.TimeReceived) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintRecord(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Record) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.TimeReceived) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRecord(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRecord(x uint64) (n int) { + return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Record) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Record: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeReceived", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeReceived = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRecord + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRecord + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRecord(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRecord + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthRecord + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipRecord(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthRecord + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/record.proto b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/record.proto similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb/record.proto rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb/record.proto diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pubkey.go b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pubkey.go similarity index 89% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pubkey.go rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pubkey.go index 9536c1336d..f56b6647d7 100644 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pubkey.go +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pubkey.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // PublicKeyValidator is a Validator that validates public keys. diff --git a/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/record.go b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/record.go new file mode 100644 index 0000000000..22f70b4303 --- /dev/null +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/record.go @@ -0,0 +1,13 @@ +package record + +import ( + pb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" +) + +// MakePutRecord creates a dht record for the given key/value pair +func MakePutRecord(key string, value []byte) *pb.Record { + record := new(pb.Record) + record.Key = []byte(key) + record.Value = value + return record +} diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/util.go b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/util.go similarity index 100% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/util.go rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/util.go diff --git a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/validator.go b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/validator.go similarity index 96% rename from vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/validator.go rename to vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/validator.go index 558164eba1..c2cc4fab10 100644 --- a/vendor/gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/validator.go +++ b/vendor/gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/validator.go @@ -3,7 +3,7 @@ package record import ( "errors" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("routing/record") diff --git a/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/.travis.yml b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/.travis.yml new file mode 100644 index 0000000000..1a3fd48a75 --- /dev/null +++ b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/.travis.yml @@ -0,0 +1,24 @@ +os: + - linux + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/LICENSE b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/LICENSE rename to vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/LICENSE diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/Makefile b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/Makefile similarity index 100% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/Makefile rename to vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/Makefile diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/README.md b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/README.md similarity index 100% rename from vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/README.md rename to vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/README.md diff --git a/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/datastore.go b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/datastore.go new file mode 100644 index 0000000000..8180f56c24 --- /dev/null +++ b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/datastore.go @@ -0,0 +1,312 @@ +package leveldb + +import ( + "os" + "path/filepath" + + "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/errors" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/iterator" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/opt" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/storage" + "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/util" +) + +type Datastore struct { + *accessor + DB *leveldb.DB + path string +} + +var _ ds.Datastore = (*Datastore)(nil) +var _ ds.TxnDatastore = (*Datastore)(nil) + +// Options is an alias of syndtr/goleveldb/opt.Options which might be extended +// in the future. +type Options opt.Options + +// NewDatastore returns a new datastore backed by leveldb +// +// for path == "", an in memory bachend will be chosen +func NewDatastore(path string, opts *Options) (*Datastore, error) { + var nopts opt.Options + if opts != nil { + nopts = opt.Options(*opts) + } + + var err error + var db *leveldb.DB + + if path == "" { + db, err = leveldb.Open(storage.NewMemStorage(), &nopts) + } else { + db, err = leveldb.OpenFile(path, &nopts) + if errors.IsCorrupted(err) && !nopts.GetReadOnly() { + db, err = leveldb.RecoverFile(path, &nopts) + } + } + + if err != nil { + return nil, err + } + + return &Datastore{ + accessor: &accessor{ldb: db}, + DB: db, + path: path, + }, nil +} + +// An extraction of the common interface between LevelDB Transactions and the DB itself. +// +// It allows to plug in either inside the `accessor`. +type levelDbOps interface { + Put(key, value []byte, wo *opt.WriteOptions) error + Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) + Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) + Delete(key []byte, wo *opt.WriteOptions) error + NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator +} + +// Datastore operations using either the DB or a transaction as the backend. +type accessor struct { + ldb levelDbOps +} + +func (a *accessor) Put(key ds.Key, value []byte) (err error) { + return a.ldb.Put(key.Bytes(), value, nil) +} + +func (a *accessor) Get(key ds.Key) (value []byte, err error) { + val, err := a.ldb.Get(key.Bytes(), nil) + if err != nil { + if err == leveldb.ErrNotFound { + return nil, ds.ErrNotFound + } + return nil, err + } + return val, nil +} + +func (a *accessor) Has(key ds.Key) (exists bool, err error) { + return a.ldb.Has(key.Bytes(), nil) +} + +func (d *accessor) GetSize(key ds.Key) (size int, err error) { + return ds.GetBackedSize(d, key) +} + +func (a *accessor) Delete(key ds.Key) (err error) { + // leveldb Delete will not return an error if the key doesn't + // exist (see https://github.com/syndtr/goleveldb/issues/109), + // so check that the key exists first and if not return an + // error + exists, err := a.ldb.Has(key.Bytes(), nil) + if !exists { + return ds.ErrNotFound + } else if err != nil { + return err + } + return a.ldb.Delete(key.Bytes(), nil) +} + +func (a *accessor) Query(q dsq.Query) (dsq.Results, error) { + return a.queryNew(q) +} + +func (a *accessor) queryNew(q dsq.Query) (dsq.Results, error) { + if len(q.Filters) > 0 || + len(q.Orders) > 0 || + q.Limit > 0 || + q.Offset > 0 { + return a.queryOrig(q) + } + var rnge *util.Range + if q.Prefix != "" { + rnge = util.BytesPrefix([]byte(q.Prefix)) + } + i := a.ldb.NewIterator(rnge, nil) + return dsq.ResultsFromIterator(q, dsq.Iterator{ + Next: func() (dsq.Result, bool) { + ok := i.Next() + if !ok { + return dsq.Result{}, false + } + k := string(i.Key()) + e := dsq.Entry{Key: k} + + if !q.KeysOnly { + buf := make([]byte, len(i.Value())) + copy(buf, i.Value()) + e.Value = buf + } + return dsq.Result{Entry: e}, true + }, + Close: func() error { + i.Release() + return nil + }, + }), nil +} + +func (a *accessor) queryOrig(q dsq.Query) (dsq.Results, error) { + // we can use multiple iterators concurrently. see: + // https://godoc.org/github.com/syndtr/goleveldb/leveldb#DB.NewIterator + // advance the iterator only if the reader reads + // + // run query in own sub-process tied to Results.Process(), so that + // it waits for us to finish AND so that clients can signal to us + // that resources should be reclaimed. + qrb := dsq.NewResultBuilder(q) + qrb.Process.Go(func(worker goprocess.Process) { + a.runQuery(worker, qrb) + }) + + // go wait on the worker (without signaling close) + go qrb.Process.CloseAfterChildren() + + // Now, apply remaining things (filters, order) + qr := qrb.Results() + for _, f := range q.Filters { + qr = dsq.NaiveFilter(qr, f) + } + if len(q.Orders) > 0 { + switch q.Orders[0].(type) { + case dsq.OrderByKey, *dsq.OrderByKey: + // Default ordering + default: + qr = dsq.NaiveOrder(qr, q.Orders...) + } + } + return qr, nil +} + +func (a *accessor) runQuery(worker goprocess.Process, qrb *dsq.ResultBuilder) { + var rnge *util.Range + if qrb.Query.Prefix != "" { + rnge = util.BytesPrefix([]byte(qrb.Query.Prefix)) + } + i := a.ldb.NewIterator(rnge, nil) + defer i.Release() + + // advance iterator for offset + if qrb.Query.Offset > 0 { + for j := 0; j < qrb.Query.Offset; j++ { + i.Next() + } + } + + // iterate, and handle limit, too + for sent := 0; i.Next(); sent++ { + // end early if we hit the limit + if qrb.Query.Limit > 0 && sent >= qrb.Query.Limit { + break + } + + k := string(i.Key()) + e := dsq.Entry{Key: k} + + if !qrb.Query.KeysOnly { + buf := make([]byte, len(i.Value())) + copy(buf, i.Value()) + e.Value = buf + } + + select { + case qrb.Output <- dsq.Result{Entry: e}: // we sent it out + case <-worker.Closing(): // client told us to end early. + break + } + } + + if err := i.Error(); err != nil { + select { + case qrb.Output <- dsq.Result{Error: err}: // client read our error + case <-worker.Closing(): // client told us to end. + return + } + } +} + +// DiskUsage returns the current disk size used by this levelDB. +// For in-mem datastores, it will return 0. +func (d *Datastore) DiskUsage() (uint64, error) { + if d.path == "" { // in-mem + return 0, nil + } + + var du uint64 + + err := filepath.Walk(d.path, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + du += uint64(info.Size()) + return nil + }) + + if err != nil { + return 0, err + } + + return du, nil +} + +// LevelDB needs to be closed. +func (d *Datastore) Close() (err error) { + return d.DB.Close() +} + +func (d *Datastore) IsThreadSafe() {} + +type leveldbBatch struct { + b *leveldb.Batch + db *leveldb.DB +} + +func (d *Datastore) Batch() (ds.Batch, error) { + return &leveldbBatch{ + b: new(leveldb.Batch), + db: d.DB, + }, nil +} + +func (b *leveldbBatch) Put(key ds.Key, value []byte) error { + b.b.Put(key.Bytes(), value) + return nil +} + +func (b *leveldbBatch) Commit() error { + return b.db.Write(b.b, nil) +} + +func (b *leveldbBatch) Delete(key ds.Key) error { + b.b.Delete(key.Bytes()) + return nil +} + +// A leveldb transaction embedding the accessor backed by the transaction. +type transaction struct { + *accessor + tx *leveldb.Transaction +} + +func (t *transaction) Commit() error { + return t.tx.Commit() +} + +func (t *transaction) Discard() { + t.tx.Discard() +} + +func (d *Datastore) NewTransaction(readOnly bool) (ds.Txn, error) { + tx, err := d.DB.OpenTransaction() + if err != nil { + return nil, err + } + accessor := &accessor{tx} + return &transaction{accessor, tx}, nil +} diff --git a/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/package.json b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/package.json new file mode 100644 index 0000000000..aab7eaf0a8 --- /dev/null +++ b/vendor/gx/ipfs/QmbgYmpUkuCDnXi4hci3Jt797iVXbpuBKRTCqGz57h48Sk/go-ds-leveldb/package.json @@ -0,0 +1,36 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ds-leveldb" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ds-leveldb" + }, + "gxDependencies": [ + { + "author": "syndtr", + "hash": "QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g", + "name": "goleveldb", + "version": "0.0.1" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "", + "name": "go-ds-leveldb", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.3.0" +} + diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/.travis.yml b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/.travis.yml rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/.travis.yml diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/LICENSE b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/LICENSE similarity index 100% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/LICENSE rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/LICENSE diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/README.md b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/README.md similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/README.md rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/README.md diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/context.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/context.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/context.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/context.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/entry.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/entry.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/entry.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/entry.go diff --git a/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/log.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/log.go new file mode 100644 index 0000000000..a87ae12e9e --- /dev/null +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/log.go @@ -0,0 +1,404 @@ +// Package log is the logging library used by IPFS +// (https://github.com/ipfs/go-ipfs). It uses a modified version of +// https://godoc.org/github.com/whyrusleeping/go-logging . +package log + +import ( + "bytes" + "context" + "encoding/json" + "path" + "runtime" + "time" + + writer "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" + + opentrace "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" + otExt "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go/ext" +) + +var log = Logger("eventlog") + +// StandardLogger provides API compatibility with standard printf loggers +// eg. go-logging +type StandardLogger interface { + Debug(args ...interface{}) + Debugf(format string, args ...interface{}) + Error(args ...interface{}) + Errorf(format string, args ...interface{}) + Fatal(args ...interface{}) + Fatalf(format string, args ...interface{}) + Info(args ...interface{}) + Infof(format string, args ...interface{}) + Panic(args ...interface{}) + Panicf(format string, args ...interface{}) + Warning(args ...interface{}) + Warningf(format string, args ...interface{}) +} + +// EventLogger extends the StandardLogger interface to allow for log items +// containing structured metadata +type EventLogger interface { + StandardLogger + + // Event merges structured data from the provided inputs into a single + // machine-readable log event. + // + // If the context contains metadata, a copy of this is used as the base + // metadata accumulator. + // + // If one or more loggable objects are provided, these are deep-merged into base blob. + // + // Next, the event name is added to the blob under the key "event". If + // the key "event" already exists, it will be over-written. + // + // Finally the timestamp and package name are added to the accumulator and + // the metadata is logged. + // DEPRECATED + Event(ctx context.Context, event string, m ...Loggable) + + // DEPRECATED + EventBegin(ctx context.Context, event string, m ...Loggable) *EventInProgress + + // Start starts an opentracing span with `name`, using + // any Span found within `ctx` as a ChildOfRef. If no such parent could be + // found, Start creates a root (parentless) Span. + // + // The return value is a context.Context object built around the + // returned Span. + // + // Example usage: + // + // SomeFunction(ctx context.Context, ...) { + // ctx := log.Start(ctx, "SomeFunction") + // defer log.Finish(ctx) + // ... + // } + Start(ctx context.Context, name string) context.Context + + // StartFromParentState starts an opentracing span with `name`, using + // any Span found within `ctx` as a ChildOfRef. If no such parent could be + // found, StartSpanFromParentState creates a root (parentless) Span. + // + // StartFromParentState will attempt to deserialize a SpanContext from `parent`, + // using any Span found within to continue the trace + // + // The return value is a context.Context object built around the + // returned Span. + // + // An error is returned when `parent` cannot be deserialized to a SpanContext + // + // Example usage: + // + // SomeFunction(ctx context.Context, bParent []byte) { + // ctx := log.StartFromParentState(ctx, "SomeFunction", bParent) + // defer log.Finish(ctx) + // ... + // } + StartFromParentState(ctx context.Context, name string, parent []byte) (context.Context, error) + + // Finish completes the span associated with `ctx`. + // + // Finish() must be the last call made to any span instance, and to do + // otherwise leads to undefined behavior. + // Finish will do its best to notify (log) when used in correctly + // .e.g called twice, or called on a spanless `ctx` + Finish(ctx context.Context) + + // FinishWithErr completes the span associated with `ctx` and also calls + // SetErr if `err` is non-nil + // + // FinishWithErr() must be the last call made to any span instance, and to do + // otherwise leads to undefined behavior. + // FinishWithErr will do its best to notify (log) when used in correctly + // .e.g called twice, or called on a spanless `ctx` + FinishWithErr(ctx context.Context, err error) + + // SetErr tags the span associated with `ctx` to reflect an error occured, and + // logs the value `err` under key `error`. + SetErr(ctx context.Context, err error) + + // LogKV records key:value logging data about an event stored in `ctx` + // Eexample: + // log.LogKV( + // "error", "resolve failure", + // "type", "cache timeout", + // "waited.millis", 1500) + LogKV(ctx context.Context, alternatingKeyValues ...interface{}) + + // SetTag tags key `k` and value `v` on the span associated with `ctx` + SetTag(ctx context.Context, key string, value interface{}) + + // SetTags tags keys from the `tags` maps on the span associated with `ctx` + // Example: + // log.SetTags(ctx, map[string]{ + // "type": bizStruct, + // "request": req, + // }) + SetTags(ctx context.Context, tags map[string]interface{}) + + // SerializeContext takes the SpanContext instance stored in `ctx` and Seralizes + // it to bytes. An error is returned if the `ctx` cannot be serialized to + // a bytes array + SerializeContext(ctx context.Context) ([]byte, error) +} + +// Logger retrieves an event logger by name +func Logger(system string) EventLogger { + + // TODO if we would like to adjust log levels at run-time. Store this event + // logger in a map (just like the util.Logger impl) + if len(system) == 0 { + setuplog := getLogger("setup-logger") + setuplog.Warning("Missing name parameter") + system = "undefined" + } + + logger := getLogger(system) + + return &eventLogger{system: system, StandardLogger: logger} +} + +// eventLogger implements the EventLogger and wraps a go-logging Logger +type eventLogger struct { + StandardLogger + + system string + // TODO add log-level +} + +func (el *eventLogger) Start(ctx context.Context, operationName string) context.Context { + span, ctx := opentrace.StartSpanFromContext(ctx, operationName) + span.SetTag("system", el.system) + return ctx +} + +func (el *eventLogger) StartFromParentState(ctx context.Context, operationName string, parent []byte) (context.Context, error) { + sc, err := deserializeContext(parent) + if err != nil { + return nil, err + } + + //TODO RPCServerOption is probably not the best tag, as this is likely from a peer + span, ctx := opentrace.StartSpanFromContext(ctx, operationName, otExt.RPCServerOption(sc)) + span.SetTag("system", el.system) + return ctx, nil +} + +func (el *eventLogger) SerializeContext(ctx context.Context) ([]byte, error) { + gTracer := opentrace.GlobalTracer() + b := make([]byte, 0) + carrier := bytes.NewBuffer(b) + span := opentrace.SpanFromContext(ctx) + if err := gTracer.Inject(span.Context(), opentrace.Binary, carrier); err != nil { + return nil, err + } + return carrier.Bytes(), nil +} + +func (el *eventLogger) LogKV(ctx context.Context, alternatingKeyValues ...interface{}) { + span := opentrace.SpanFromContext(ctx) + if span == nil { + _, file, line, _ := runtime.Caller(1) + log.Errorf("LogKV with no Span in context called on %s:%d", path.Base(file), line) + return + } + span.LogKV(alternatingKeyValues...) +} + +func (el *eventLogger) SetTag(ctx context.Context, k string, v interface{}) { + span := opentrace.SpanFromContext(ctx) + if span == nil { + _, file, line, _ := runtime.Caller(1) + log.Errorf("SetTag with no Span in context called on %s:%d", path.Base(file), line) + return + } + span.SetTag(k, v) +} + +func (el *eventLogger) SetTags(ctx context.Context, tags map[string]interface{}) { + span := opentrace.SpanFromContext(ctx) + if span == nil { + _, file, line, _ := runtime.Caller(1) + log.Errorf("SetTags with no Span in context called on %s:%d", path.Base(file), line) + return + } + for k, v := range tags { + span.SetTag(k, v) + } +} + +func (el *eventLogger) setErr(ctx context.Context, err error, skip int) { + span := opentrace.SpanFromContext(ctx) + if span == nil { + _, file, line, _ := runtime.Caller(skip) + log.Errorf("SetErr with no Span in context called on %s:%d", path.Base(file), line) + return + } + if err == nil { + return + } + + otExt.Error.Set(span, true) + span.LogKV("error", err.Error()) +} + +func (el *eventLogger) SetErr(ctx context.Context, err error) { + el.setErr(ctx, err, 1) +} + +func (el *eventLogger) Finish(ctx context.Context) { + span := opentrace.SpanFromContext(ctx) + if span == nil { + _, file, line, _ := runtime.Caller(1) + log.Errorf("Finish with no Span in context called on %s:%d", path.Base(file), line) + return + } + span.Finish() +} + +func (el *eventLogger) FinishWithErr(ctx context.Context, err error) { + el.setErr(ctx, err, 2) + el.Finish(ctx) +} + +func deserializeContext(bCtx []byte) (opentrace.SpanContext, error) { + gTracer := opentrace.GlobalTracer() + carrier := bytes.NewReader(bCtx) + spanContext, err := gTracer.Extract(opentrace.Binary, carrier) + if err != nil { + log.Warning("Failed to deserialize context %s", err) + return nil, err + } + return spanContext, nil +} + +// DEPRECATED use `Start` +func (el *eventLogger) EventBegin(ctx context.Context, event string, metadata ...Loggable) *EventInProgress { + ctx = el.Start(ctx, event) + + for _, m := range metadata { + for l, v := range m.Loggable() { + el.LogKV(ctx, l, v) + } + } + + eip := &EventInProgress{} + eip.doneFunc = func(additional []Loggable) { + // anything added during the operation + // e.g. deprecated methods event.Append(...) or event.SetError(...) + for _, m := range eip.loggables { + for l, v := range m.Loggable() { + el.LogKV(ctx, l, v) + } + } + el.Finish(ctx) + } + return eip +} + +type activeEventKeyType struct{} + +var activeEventKey = activeEventKeyType{} + +// DEPRECATED use `Start` +func (el *eventLogger) Event(ctx context.Context, event string, metadata ...Loggable) { + + // short circuit if theres nothing to write to + if !writer.WriterGroup.Active() { + return + } + + // Collect loggables for later logging + var loggables []Loggable + + // get any existing metadata from the context + existing, err := MetadataFromContext(ctx) + if err != nil { + existing = Metadata{} + } + loggables = append(loggables, existing) + + for _, datum := range metadata { + loggables = append(loggables, datum) + } + + e := entry{ + loggables: loggables, + system: el.system, + event: event, + } + + accum := Metadata{} + for _, loggable := range e.loggables { + accum = DeepMerge(accum, loggable.Loggable()) + } + + // apply final attributes to reserved keys + // TODO accum["level"] = level + accum["event"] = e.event + accum["system"] = e.system + accum["time"] = FormatRFC3339(time.Now()) + + var buf bytes.Buffer + encoder := json.NewEncoder(&buf) + encoder.SetEscapeHTML(false) + err = encoder.Encode(accum) + if err != nil { + el.Errorf("ERROR FORMATTING EVENT ENTRY: %s", err) + return + } + + writer.WriterGroup.Write(buf.Bytes()) +} + +// DEPRECATED +// EventInProgress represent and event which is happening +type EventInProgress struct { + loggables []Loggable + doneFunc func([]Loggable) +} + +// DEPRECATED use `LogKV` or `SetTag` +// Append adds loggables to be included in the call to Done +func (eip *EventInProgress) Append(l Loggable) { + eip.loggables = append(eip.loggables, l) +} + +// DEPRECATED use `SetError(ctx, error)` +// SetError includes the provided error +func (eip *EventInProgress) SetError(err error) { + eip.loggables = append(eip.loggables, LoggableMap{ + "error": err.Error(), + }) +} + +// DEPRECATED use `Finish` +// Done creates a new Event entry that includes the duration and appended +// loggables. +func (eip *EventInProgress) Done() { + eip.doneFunc(eip.loggables) // create final event with extra data +} + +// DEPRECATED use `FinishWithErr` +// DoneWithErr creates a new Event entry that includes the duration and appended +// loggables. DoneWithErr accepts an error, if err is non-nil, it is set on +// the EventInProgress. Otherwise the logic is the same as the `Done()` method +func (eip *EventInProgress) DoneWithErr(err error) { + if err != nil { + eip.SetError(err) + } + eip.doneFunc(eip.loggables) +} + +// DEPRECATED use `Finish` +// Close is an alias for done +func (eip *EventInProgress) Close() error { + eip.Done() + return nil +} + +// FormatRFC3339 returns the given time in UTC with RFC3999Nano format. +func FormatRFC3339(t time.Time) string { + return t.UTC().Format(time.RFC3339Nano) +} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/loggable.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/loggable.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/loggable.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/loggable.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/metadata.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/metadata.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/metadata.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/metadata.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/oldlog.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/oldlog.go similarity index 89% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/oldlog.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/oldlog.go index ff23726c92..cf5b574c76 100644 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/oldlog.go +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/oldlog.go @@ -6,7 +6,8 @@ import ( "os" "sync" - tracer "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer" + tracer "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer" + lwriter "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" colorable "gx/ipfs/QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq/go-colorable" opentrace "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" @@ -36,7 +37,8 @@ const ( envLogging = "IPFS_LOGGING" envLoggingFmt = "IPFS_LOGGING_FMT" - envLoggingFile = "GOLOG_FILE" // /path/to/file + envLoggingFile = "GOLOG_FILE" // /path/to/file + envTracingFile = "GOLOG_TRACING_FILE" // /path/to/file ) // ErrNoSuchLogger is returned when the util pkg is asked for a non existant logger @@ -93,6 +95,15 @@ func SetupLogging() { opentrace.SetGlobalTracer(lgblTracer) SetAllLoggers(lvl) + + if tracingfp := os.Getenv(envTracingFile); len(tracingfp) > 0 { + f, err := os.Create(tracingfp) + if err != nil { + log.Error("failed to create tracing file: %s", tracingfp) + } else { + lwriter.WriterGroup.AddWriter(f) + } + } } // SetDebugLogging calls SetAllLoggers with logging.DEBUG diff --git a/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/package.json b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/package.json new file mode 100644 index 0000000000..adcf8cd08e --- /dev/null +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/package.json @@ -0,0 +1,41 @@ +{ + "bugs": { + "url": "https://github.com/ipfs/go-log" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-log" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmcaSwFc5RBg8yCq54QURwEU4nwjfCpjbpmaAm4VbdGLKv", + "name": "go-logging", + "version": "0.0.0" + }, + { + "author": "frist", + "hash": "QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo", + "name": "opentracing-go", + "version": "0.0.3" + }, + { + "author": "mattn", + "hash": "QmTsHcKgTQ4VeYZd8eKYpTXeLW7KNwkRD9wjnrwsV2sToq", + "name": "go-colorable", + "version": "0.2.0" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-log", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.5.9" +} + diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/LICENSE b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/LICENSE rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/LICENSE diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/context.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/context.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/context.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/context.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/debug.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/debug.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/debug.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/debug.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/event.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/event.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/event.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/event.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/propagation.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/propagation.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/propagation.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/propagation.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/propagation_ot.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/propagation_ot.go similarity index 97% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/propagation_ot.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/propagation_ot.go index 502378cf52..8e60122f58 100644 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/propagation_ot.go +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/propagation_ot.go @@ -7,8 +7,8 @@ import ( "strings" opentracing "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" - "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" ) type textMapPropagator struct { diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/raw.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/raw.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/raw.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/raw.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/recorder.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/recorder.go similarity index 96% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/recorder.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/recorder.go index 16521c893d..ce0a2be307 100644 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/recorder.go +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/recorder.go @@ -9,7 +9,7 @@ import ( "time" opentrace "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" - writer "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer" + writer "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" ) // A SpanRecorder handles all of the `RawSpan` data generated via an @@ -93,7 +93,6 @@ func (r *LoggableSpanRecorder) RecordSpan(span RawSpan) { var buf bytes.Buffer encoder := json.NewEncoder(&buf) encoder.SetEscapeHTML(false) - encoder.SetIndent("", " ") err := encoder.Encode(spanlog) if err != nil { fmt.Fprintf(os.Stderr, "ERROR FORMATTING SPAN ENTRY: %s\n", err) diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/span.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/span.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/span.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/span.go diff --git a/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/tracer.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/tracer.go new file mode 100644 index 0000000000..3b50888551 --- /dev/null +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/tracer.go @@ -0,0 +1,280 @@ +package loggabletracer + +import ( + "time" + + opentracing "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" + writer "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer" +) + +// Tracer extends the opentracing.Tracer interface with methods to +// probe implementation state, for use by loggabletracer consumers. +type Tracer interface { + opentracing.Tracer + + // Options gets the Options used in New() or NewWithOptions(). + Options() Options +} + +// Options allows creating a customized Tracer via NewWithOptions. The object +// must not be updated when there is an active tracer using it. +type Options struct { + // ShouldSample is a function which is called when creating a new Span and + // determines whether that Span is sampled. The randomized TraceID is supplied + // to allow deterministic sampling decisions to be made across different nodes. + // For example, + // + // func(traceID uint64) { return traceID % 64 == 0 } + // + // samples every 64th trace on average. + ShouldSample func(traceID uint64) bool + // TrimUnsampledSpans turns potentially expensive operations on unsampled + // Spans into no-ops. More precisely, tags and log events are silently + // discarded. If NewSpanEventListener is set, the callbacks will still fire. + TrimUnsampledSpans bool + // Recorder receives Spans which have been finished. + Recorder SpanRecorder + // NewSpanEventListener can be used to enhance the tracer by effectively + // attaching external code to trace events. See NetTraceIntegrator for a + // practical example, and event.go for the list of possible events. + NewSpanEventListener func() func(SpanEvent) + // DropAllLogs turns log events on all Spans into no-ops. + // If NewSpanEventListener is set, the callbacks will still fire. + DropAllLogs bool + // MaxLogsPerSpan limits the number of Logs in a span (if set to a nonzero + // value). If a span has more logs than this value, logs are dropped as + // necessary (and replaced with a log describing how many were dropped). + // + // About half of the MaxLogPerSpan logs kept are the oldest logs, and about + // half are the newest logs. + // + // If NewSpanEventListener is set, the callbacks will still fire for all log + // events. This value is ignored if DropAllLogs is true. + MaxLogsPerSpan int + // DebugAssertSingleGoroutine internally records the ID of the goroutine + // creating each Span and verifies that no operation is carried out on + // it on a different goroutine. + // Provided strictly for development purposes. + // Passing Spans between goroutine without proper synchronization often + // results in use-after-Finish() errors. For a simple example, consider the + // following pseudocode: + // + // func (s *Server) Handle(req http.Request) error { + // sp := s.StartSpan("server") + // defer sp.Finish() + // wait := s.queueProcessing(opentracing.ContextWithSpan(context.Background(), sp), req) + // select { + // case resp := <-wait: + // return resp.Error + // case <-time.After(10*time.Second): + // sp.LogEvent("timed out waiting for processing") + // return ErrTimedOut + // } + // } + // + // This looks reasonable at first, but a request which spends more than ten + // seconds in the queue is abandoned by the main goroutine and its trace + // finished, leading to use-after-finish when the request is finally + // processed. Note also that even joining on to a finished Span via + // StartSpanWithOptions constitutes an illegal operation. + // + // Code bases which do not require (or decide they do not want) Spans to + // be passed across goroutine boundaries can run with this flag enabled in + // tests to increase their chances of spotting wrong-doers. + DebugAssertSingleGoroutine bool + // DebugAssertUseAfterFinish is provided strictly for development purposes. + // When set, it attempts to exacerbate issues emanating from use of Spans + // after calling Finish by running additional assertions. + DebugAssertUseAfterFinish bool + // EnableSpanPool enables the use of a pool, so that the tracer reuses spans + // after Finish has been called on it. Adds a slight performance gain as it + // reduces allocations. However, if you have any use-after-finish race + // conditions the code may panic. + EnableSpanPool bool +} + +// DefaultOptions returns an Options object with a 1 in 64 sampling rate and +// all options disabled. A Recorder needs to be set manually before using the +// returned object with a Tracer. +func DefaultOptions() Options { + return Options{ + ShouldSample: func(traceID uint64) bool { return traceID%64 == 0 }, + MaxLogsPerSpan: 100, + } +} + +// NewWithOptions creates a customized Tracer. +func NewWithOptions(opts Options) opentracing.Tracer { + rval := &LoggableTracer{options: opts} + rval.accessorPropagator = &accessorPropagator{rval} + return rval +} + +// New creates and returns a standard Tracer which defers completed Spans to +// `recorder`. +// Spans created by this Tracer support the ext.SamplingPriority tag: Setting +// ext.SamplingPriority causes the Span to be Sampled from that point on. +func New(recorder SpanRecorder) opentracing.Tracer { + opts := DefaultOptions() + opts.Recorder = recorder + return NewWithOptions(opts) +} + +// Implements the `Tracer` interface. +type LoggableTracer struct { + options Options + textPropagator *textMapPropagator + binaryPropagator *binaryPropagator + accessorPropagator *accessorPropagator +} + +func (t *LoggableTracer) StartSpan( + operationName string, + opts ...opentracing.StartSpanOption, +) opentracing.Span { + + if !writer.WriterGroup.Active() { + return opentracing.NoopTracer.StartSpan(opentracing.NoopTracer{}, operationName) + } + + sso := opentracing.StartSpanOptions{} + for _, o := range opts { + o.Apply(&sso) + } + return t.StartSpanWithOptions(operationName, sso) +} + +func (t *LoggableTracer) getSpan() *spanImpl { + if t.options.EnableSpanPool { + sp := spanPool.Get().(*spanImpl) + sp.reset() + return sp + } + return &spanImpl{} +} + +func (t *LoggableTracer) StartSpanWithOptions( + operationName string, + opts opentracing.StartSpanOptions, +) opentracing.Span { + if !writer.WriterGroup.Active() { + return opentracing.NoopTracer.StartSpan(opentracing.NoopTracer{}, operationName) + } + // Start time. + startTime := opts.StartTime + if startTime.IsZero() { + startTime = time.Now() + } + + // Tags. + tags := opts.Tags + + // Build the new span. This is the only allocation: We'll return this as + // an opentracing.Span. + sp := t.getSpan() + // Look for a parent in the list of References. + // + // TODO: would be nice if loggabletracer did something with all + // References, not just the first one. +ReferencesLoop: + for _, ref := range opts.References { + switch ref.Type { + case opentracing.ChildOfRef, + opentracing.FollowsFromRef: + + refCtx, ok := ref.ReferencedContext.(SpanContext) + if !ok { + // Could be a noopSpanContext + // Ignore that parent. + continue + } + sp.raw.Context.TraceID = refCtx.TraceID + sp.raw.Context.SpanID = randomID() + sp.raw.Context.Sampled = refCtx.Sampled + sp.raw.ParentSpanID = refCtx.SpanID + + if l := len(refCtx.Baggage); l > 0 { + sp.raw.Context.Baggage = make(map[string]string, l) + for k, v := range refCtx.Baggage { + sp.raw.Context.Baggage[k] = v + } + } + break ReferencesLoop + } + } + if sp.raw.Context.TraceID == 0 { + // No parent Span found; allocate new trace and span ids and determine + // the Sampled status. + sp.raw.Context.TraceID, sp.raw.Context.SpanID = randomID2() + sp.raw.Context.Sampled = t.options.ShouldSample(sp.raw.Context.TraceID) + } + + return t.startSpanInternal( + sp, + operationName, + startTime, + tags, + ) +} + +func (t *LoggableTracer) startSpanInternal( + sp *spanImpl, + operationName string, + startTime time.Time, + tags opentracing.Tags, +) opentracing.Span { + sp.tracer = t + if t.options.NewSpanEventListener != nil { + sp.event = t.options.NewSpanEventListener() + } + sp.raw.Operation = operationName + sp.raw.Start = startTime + sp.raw.Duration = -1 + sp.raw.Tags = tags + if t.options.DebugAssertSingleGoroutine { + sp.SetTag(debugGoroutineIDTag, curGoroutineID()) + } + defer sp.onCreate(operationName) + return sp +} + +type delegatorType struct{} + +// Delegator is the format to use for DelegatingCarrier. +var Delegator delegatorType + +func (t *LoggableTracer) Inject(sc opentracing.SpanContext, format interface{}, carrier interface{}) error { + if !writer.WriterGroup.Active() { + return opentracing.NoopTracer.Inject(opentracing.NoopTracer{}, sc, format, carrier) + } + switch format { + case opentracing.TextMap, opentracing.HTTPHeaders: + return t.textPropagator.Inject(sc, carrier) + case opentracing.Binary: + return t.binaryPropagator.Inject(sc, carrier) + } + if _, ok := format.(delegatorType); ok { + return t.accessorPropagator.Inject(sc, carrier) + } + return opentracing.ErrUnsupportedFormat +} + +func (t *LoggableTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error) { + if !writer.WriterGroup.Active() { + return opentracing.NoopTracer.Extract(opentracing.NoopTracer{}, format, carrier) + } + switch format { + case opentracing.TextMap, opentracing.HTTPHeaders: + return t.textPropagator.Extract(carrier) + case opentracing.Binary: + return t.binaryPropagator.Extract(carrier) + } + if _, ok := format.(delegatorType); ok { + return t.accessorPropagator.Extract(carrier) + } + return nil, opentracing.ErrUnsupportedFormat +} + +func (t *LoggableTracer) Options() Options { + return t.options +} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/util.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/util.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/util.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/util.go diff --git a/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/Makefile b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/Makefile new file mode 100644 index 0000000000..8677a37114 --- /dev/null +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/Makefile @@ -0,0 +1,6 @@ +pbgos := $(patsubst %.proto,%.pb.go,$(wildcard *.proto)) + +all: $(pbgos) + +%.pb.go: %.proto + protoc --gogofaster_out=. --proto_path=$(GOPATH)/src:. $< diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/carrier.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/carrier.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/carrier.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/carrier.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/gen.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/gen.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/gen.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/gen.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/wire.pb.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/wire.pb.go similarity index 85% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/wire.pb.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/wire.pb.go index 2a6c57abb5..7da552646e 100644 --- a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/wire.pb.go +++ b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/wire.pb.go @@ -3,13 +3,13 @@ package wire -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -import encoding_binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -23,19 +23,17 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TracerState struct { - TraceId uint64 `protobuf:"fixed64,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - SpanId uint64 `protobuf:"fixed64,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - Sampled bool `protobuf:"varint,3,opt,name=sampled,proto3" json:"sampled,omitempty"` - BaggageItems map[string]string `protobuf:"bytes,4,rep,name=baggage_items,json=baggageItems" json:"baggage_items,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + TraceId uint64 `protobuf:"fixed64,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + SpanId uint64 `protobuf:"fixed64,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + Sampled bool `protobuf:"varint,3,opt,name=sampled,proto3" json:"sampled,omitempty"` + BaggageItems map[string]string `protobuf:"bytes,4,rep,name=baggage_items,json=baggageItems,proto3" json:"baggage_items,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *TracerState) Reset() { *m = TracerState{} } func (m *TracerState) String() string { return proto.CompactTextString(m) } func (*TracerState) ProtoMessage() {} func (*TracerState) Descriptor() ([]byte, []int) { - return fileDescriptor_wire_61ba5cb4647b0ea5, []int{0} + return fileDescriptor_f2dcdddcdf68d8e0, []int{0} } func (m *TracerState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -52,8 +50,8 @@ func (m *TracerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *TracerState) XXX_Merge(src proto.Message) { - xxx_messageInfo_TracerState.Merge(dst, src) +func (m *TracerState) XXX_Merge(src proto.Message) { + xxx_messageInfo_TracerState.Merge(m, src) } func (m *TracerState) XXX_Size() int { return m.Size() @@ -96,6 +94,29 @@ func init() { proto.RegisterType((*TracerState)(nil), "loggabletracer.wire.TracerState") proto.RegisterMapType((map[string]string)(nil), "loggabletracer.wire.TracerState.BaggageItemsEntry") } + +func init() { proto.RegisterFile("wire.proto", fileDescriptor_f2dcdddcdf68d8e0) } + +var fileDescriptor_f2dcdddcdf68d8e0 = []byte{ + // 250 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xcf, 0x2c, 0x4a, + 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xce, 0xc9, 0x4f, 0x4f, 0x4f, 0x4c, 0xca, 0x49, + 0x2d, 0x29, 0x4a, 0x4c, 0x4e, 0x2d, 0xd2, 0x03, 0x49, 0x29, 0x7d, 0x65, 0xe4, 0xe2, 0x0e, 0x01, + 0xf3, 0x83, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x24, 0xb9, 0x38, 0xc0, 0xd2, 0xf1, 0x99, 0x29, 0x12, + 0x8c, 0x0a, 0x8c, 0x1a, 0x6c, 0x41, 0xec, 0x60, 0xbe, 0x67, 0x8a, 0x90, 0x38, 0x17, 0x7b, 0x71, + 0x41, 0x62, 0x1e, 0x48, 0x86, 0x09, 0x2c, 0xc3, 0x06, 0xe2, 0x7a, 0xa6, 0x08, 0x49, 0x70, 0xb1, + 0x17, 0x27, 0xe6, 0x16, 0xe4, 0xa4, 0xa6, 0x48, 0x30, 0x2b, 0x30, 0x6a, 0x70, 0x04, 0xc1, 0xb8, + 0x42, 0xe1, 0x5c, 0xbc, 0x49, 0x89, 0xe9, 0xe9, 0x89, 0xe9, 0xa9, 0xf1, 0x99, 0x25, 0xa9, 0xb9, + 0xc5, 0x12, 0x2c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x46, 0x7a, 0x58, 0x9c, 0xa2, 0x87, 0xe4, 0x0c, + 0x3d, 0x27, 0x88, 0x2e, 0x4f, 0x90, 0x26, 0xd7, 0xbc, 0x92, 0xa2, 0xca, 0x20, 0x9e, 0x24, 0x24, + 0x21, 0x29, 0x7b, 0x2e, 0x41, 0x0c, 0x25, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x60, 0x67, + 0x73, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x60, 0x07, 0x73, + 0x06, 0x41, 0x38, 0x56, 0x4c, 0x16, 0x8c, 0x4e, 0x72, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, + 0x2c, 0xc7, 0x10, 0xc5, 0x02, 0x72, 0x4c, 0x12, 0x1b, 0x38, 0xcc, 0x8c, 0x01, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xe4, 0x48, 0xf4, 0xf8, 0x41, 0x01, 0x00, 0x00, +} + func (m *TracerState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -163,6 +184,9 @@ func encodeVarintWire(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *TracerState) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TraceId != 0 { @@ -213,7 +237,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -261,7 +285,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -281,7 +305,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -290,6 +314,9 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { return ErrInvalidLengthWire } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWire + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -310,7 +337,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -327,7 +354,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -337,6 +364,9 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { return ErrInvalidLengthWire } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthWire + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -353,7 +383,7 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -363,6 +393,9 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { return ErrInvalidLengthWire } postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthWire + } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } @@ -394,6 +427,9 @@ func (m *TracerState) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthWire } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWire + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -460,10 +496,13 @@ func skipWire(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthWire } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthWire + } return iNdEx, nil case 3: for { @@ -492,6 +531,9 @@ func skipWire(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthWire + } } return iNdEx, nil case 4: @@ -510,25 +552,3 @@ var ( ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWire = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("wire.proto", fileDescriptor_wire_61ba5cb4647b0ea5) } - -var fileDescriptor_wire_61ba5cb4647b0ea5 = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xcf, 0x2c, 0x4a, - 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xce, 0xc9, 0x4f, 0x4f, 0x4f, 0x4c, 0xca, 0x49, - 0x2d, 0x29, 0x4a, 0x4c, 0x4e, 0x2d, 0xd2, 0x03, 0x49, 0x29, 0x7d, 0x65, 0xe4, 0xe2, 0x0e, 0x01, - 0xf3, 0x83, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x24, 0xb9, 0x38, 0xc0, 0xd2, 0xf1, 0x99, 0x29, 0x12, - 0x8c, 0x0a, 0x8c, 0x1a, 0x6c, 0x41, 0xec, 0x60, 0xbe, 0x67, 0x8a, 0x90, 0x38, 0x17, 0x7b, 0x71, - 0x41, 0x62, 0x1e, 0x48, 0x86, 0x09, 0x2c, 0xc3, 0x06, 0xe2, 0x7a, 0xa6, 0x08, 0x49, 0x70, 0xb1, - 0x17, 0x27, 0xe6, 0x16, 0xe4, 0xa4, 0xa6, 0x48, 0x30, 0x2b, 0x30, 0x6a, 0x70, 0x04, 0xc1, 0xb8, - 0x42, 0xe1, 0x5c, 0xbc, 0x49, 0x89, 0xe9, 0xe9, 0x89, 0xe9, 0xa9, 0xf1, 0x99, 0x25, 0xa9, 0xb9, - 0xc5, 0x12, 0x2c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x46, 0x7a, 0x58, 0x9c, 0xa2, 0x87, 0xe4, 0x0c, - 0x3d, 0x27, 0x88, 0x2e, 0x4f, 0x90, 0x26, 0xd7, 0xbc, 0x92, 0xa2, 0xca, 0x20, 0x9e, 0x24, 0x24, - 0x21, 0x29, 0x7b, 0x2e, 0x41, 0x0c, 0x25, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x60, 0x67, - 0x73, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x60, 0x07, 0x73, - 0x06, 0x41, 0x38, 0x56, 0x4c, 0x16, 0x8c, 0x4e, 0x62, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, - 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x2c, 0x20, 0x47, 0x24, 0xb1, - 0x81, 0xc3, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xa1, 0xbe, 0x79, 0x39, 0x01, 0x00, - 0x00, -} diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/wire.proto b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/wire.proto similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/tracer/wire/wire.proto rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/tracer/wire/wire.proto diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/option.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/option.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/option.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/option.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/polite_json_formatter.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/polite_json_formatter.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/polite_json_formatter.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/polite_json_formatter.go diff --git a/vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/writer.go b/vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/writer.go similarity index 100% rename from vendor/gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log/writer/writer.go rename to vendor/gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log/writer/writer.go diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/.travis.yml b/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/.travis.yml deleted file mode 100644 index e1be0bfa30..0000000000 --- a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/filter.go b/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/filter.go deleted file mode 100644 index 29695de47f..0000000000 --- a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/filter.go +++ /dev/null @@ -1,67 +0,0 @@ -package filter - -import ( - "net" - "sync" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" -) - -type Filters struct { - mu sync.RWMutex - filters map[string]*net.IPNet -} - -func NewFilters() *Filters { - return &Filters{ - filters: make(map[string]*net.IPNet), - } -} - -func (fs *Filters) AddDialFilter(f *net.IPNet) { - fs.mu.Lock() - defer fs.mu.Unlock() - fs.filters[f.String()] = f -} - -func (f *Filters) AddrBlocked(a ma.Multiaddr) bool { - maddr := ma.Split(a) - if len(maddr) == 0 { - return false - } - netaddr, err := manet.ToNetAddr(maddr[0]) - if err != nil { - // if we cant parse it, its probably not blocked - return false - } - netip := net.ParseIP(netaddr.String()) - if netip == nil { - return false - } - - f.mu.RLock() - defer f.mu.RUnlock() - for _, ft := range f.filters { - if ft.Contains(netip) { - return true - } - } - return false -} - -func (f *Filters) Filters() []*net.IPNet { - var out []*net.IPNet - f.mu.RLock() - defer f.mu.RUnlock() - for _, ff := range f.filters { - out = append(out, ff) - } - return out -} - -func (f *Filters) Remove(ff *net.IPNet) { - f.mu.Lock() - defer f.mu.Unlock() - delete(f.filters, ff.String()) -} diff --git a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/package.json b/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/package.json deleted file mode 100644 index a3d114c02e..0000000000 --- a/vendor/gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-maddr-filter" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-maddr-filter" - }, - "gxDependencies": [ - { - "author": "jbenet", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "", - "name": "go-maddr-filter", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.10" -} - diff --git a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/package.json b/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/package.json deleted file mode 100644 index 701eb5b734..0000000000 --- a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": "dignifiedquire", - "bugs": { - "url": "https://github.com/ipfs/go-fs-lock/issues" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-fs-lock" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "hsanjuan", - "hash": "QmYDxsntDcWC7CTisDmeorEvDVjkRAjjY9Vr9DJ6HSkXMS", - "name": "go4-lock", - "version": "0.0.3" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-fs-lock", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.8" -} - diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/.travis.yml b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/.travis.yml similarity index 100% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/.travis.yml rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/.travis.yml diff --git a/vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/LICENSE b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc/go-smux-multiplex/LICENSE rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/LICENSE diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/Makefile b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/Makefile similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/Makefile rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/Makefile diff --git a/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/README.md b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/README.md new file mode 100644 index 0000000000..c13d248fa4 --- /dev/null +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/README.md @@ -0,0 +1,67 @@ +# go-multiaddr-net + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs) +[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +[![GoDoc](https://godoc.org/github.com/multiformats/go-multiaddr-net?status.svg)](https://godoc.org/github.com/multiformats/go-multiaddr-net) +[![Travis CI](https://img.shields.io/travis/multiformats/go-multiaddr-net.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/go-multiaddr-net) + + + +> Multiaddress net tools + +This package provides [Multiaddr](https://github.com/multiformats/go-multiaddr) specific versions of common functions in [stdlib](https://github.com/golang/go/tree/master/src)'s `net` package. This means wrappers of standard net symbols like `net.Dial` and `net.Listen`, as well +as conversion to and from `net.Addr`. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Maintainers](#maintainers) +- [Contribute](#contribute) +- [License](#license) + +## Install + +`go-multiaddr-net` is a standard Go module which can be installed with: + +```sh +go get github.com/multiformats/go-multiaddr-net +``` + +Note that `go-multiaddr-net` is packaged with Gx, so it is recommended to use Gx to install and use it (see Usage section). + + +## Usage + +This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project do: + +```sh +go get -u github.com/whyrusleeping/gx +go get -u github.com/whyrusleeping/gx-go +cd +gx init +gx import github.com/multiformats/go-multiaddr-net +gx install --global +gx-go --rewrite +``` + +Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information. + +For further usage, see the docs: + +- `multiaddr/net`: https://godoc.org/github.com/multiformats/go-multiaddr-net +- `multiaddr`: https://godoc.org/github.com/multiformats/go-multiaddr + +## Contribute + +Contributions welcome. Please check out [the issues](https://github.com/multiformats/go-multiaddr-net/issues). + +Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © 2014 Juan Batiz-Benet diff --git a/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/convert.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/convert.go new file mode 100644 index 0000000000..275994be10 --- /dev/null +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/convert.go @@ -0,0 +1,269 @@ +package manet + +import ( + "fmt" + "net" + "path/filepath" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + madns "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" +) + +var errIncorrectNetAddr = fmt.Errorf("incorrect network addr conversion") + +// FromNetAddr converts a net.Addr type to a Multiaddr. +func FromNetAddr(a net.Addr) (ma.Multiaddr, error) { + return defaultCodecs.FromNetAddr(a) +} + +// FromNetAddr converts a net.Addr to Multiaddress. +func (cm *CodecMap) FromNetAddr(a net.Addr) (ma.Multiaddr, error) { + if a == nil { + return nil, fmt.Errorf("nil multiaddr") + } + p, err := cm.getAddrParser(a.Network()) + if err != nil { + return nil, err + } + + return p(a) +} + +// ToNetAddr converts a Multiaddr to a net.Addr +// Must be ThinWaist. acceptable protocol stacks are: +// /ip{4,6}/{tcp, udp} +func ToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { + return defaultCodecs.ToNetAddr(maddr) +} + +// ToNetAddr converts a Multiaddress to a standard net.Addr. +func (cm *CodecMap) ToNetAddr(maddr ma.Multiaddr) (net.Addr, error) { + protos := maddr.Protocols() + final := protos[len(protos)-1] + + p, err := cm.getMaddrParser(final.Name) + if err != nil { + return nil, err + } + + return p(maddr) +} + +func parseBasicNetMaddr(maddr ma.Multiaddr) (net.Addr, error) { + network, host, err := DialArgs(maddr) + if err != nil { + return nil, err + } + + switch network { + case "tcp", "tcp4", "tcp6": + return net.ResolveTCPAddr(network, host) + case "udp", "udp4", "udp6": + return net.ResolveUDPAddr(network, host) + case "ip", "ip4", "ip6": + return net.ResolveIPAddr(network, host) + case "unix": + return net.ResolveUnixAddr(network, host) + } + + return nil, fmt.Errorf("network not supported: %s", network) +} + +func FromIPAndZone(ip net.IP, zone string) (ma.Multiaddr, error) { + switch { + case ip.To4() != nil: + return ma.NewComponent("ip4", ip.String()) + case ip.To16() != nil: + ip6, err := ma.NewComponent("ip6", ip.String()) + if err != nil { + return nil, err + } + if zone == "" { + return ip6, nil + } else { + zone, err := ma.NewComponent("ip6zone", zone) + if err != nil { + return nil, err + } + return zone.Encapsulate(ip6), nil + } + default: + return nil, errIncorrectNetAddr + } +} + +// FromIP converts a net.IP type to a Multiaddr. +func FromIP(ip net.IP) (ma.Multiaddr, error) { + return FromIPAndZone(ip, "") +} + +// DialArgs is a convenience function that returns network and address as +// expected by net.Dial. See https://godoc.org/net#Dial for an overview of +// possible return values (we do not support the unixpacket ones yet). Unix +// addresses do not, at present, compose. +func DialArgs(m ma.Multiaddr) (string, string, error) { + var ( + zone, network, ip, port string + err error + hostname bool + ) + + ma.ForEach(m, func(c ma.Component) bool { + switch network { + case "": + switch c.Protocol().Code { + case ma.P_IP6ZONE: + if zone != "" { + err = fmt.Errorf("%s has multiple zones", m) + return false + } + zone = c.Value() + return true + case ma.P_IP6: + network = "ip6" + ip = c.Value() + return true + case ma.P_IP4: + if zone != "" { + err = fmt.Errorf("%s has ip4 with zone", m) + return false + } + network = "ip4" + ip = c.Value() + return true + case madns.Dns4Protocol.Code: + network = "ip4" + hostname = true + ip = c.Value() + return true + case madns.Dns6Protocol.Code: + network = "ip6" + hostname = true + ip = c.Value() + return true + case ma.P_UNIX: + network = "unix" + ip = c.Value() + return false + } + case "ip4": + switch c.Protocol().Code { + case ma.P_UDP: + network = "udp4" + case ma.P_TCP: + network = "tcp4" + default: + return false + } + port = c.Value() + case "ip6": + switch c.Protocol().Code { + case ma.P_UDP: + network = "udp6" + case ma.P_TCP: + network = "tcp6" + default: + return false + } + port = c.Value() + } + // Done. + return false + }) + if err != nil { + return "", "", err + } + + switch network { + case "ip6": + if zone != "" { + ip += "%" + zone + } + fallthrough + case "ip4": + return network, ip, nil + case "tcp4", "udp4": + return network, ip + ":" + port, nil + case "tcp6", "udp6": + if zone != "" { + ip += "%" + zone + } + if hostname { + return network, ip + ":" + port, nil + } + return network, "[" + ip + "]" + ":" + port, nil + case "unix": + return network, ip, nil + default: + return "", "", fmt.Errorf("%s is not a 'thin waist' address", m) + } +} + +func parseTCPNetAddr(a net.Addr) (ma.Multiaddr, error) { + ac, ok := a.(*net.TCPAddr) + if !ok { + return nil, errIncorrectNetAddr + } + + // Get IP Addr + ipm, err := FromIPAndZone(ac.IP, ac.Zone) + if err != nil { + return nil, errIncorrectNetAddr + } + + // Get TCP Addr + tcpm, err := ma.NewMultiaddr(fmt.Sprintf("/tcp/%d", ac.Port)) + if err != nil { + return nil, errIncorrectNetAddr + } + + // Encapsulate + return ipm.Encapsulate(tcpm), nil +} + +func parseUDPNetAddr(a net.Addr) (ma.Multiaddr, error) { + ac, ok := a.(*net.UDPAddr) + if !ok { + return nil, errIncorrectNetAddr + } + + // Get IP Addr + ipm, err := FromIPAndZone(ac.IP, ac.Zone) + if err != nil { + return nil, errIncorrectNetAddr + } + + // Get UDP Addr + udpm, err := ma.NewMultiaddr(fmt.Sprintf("/udp/%d", ac.Port)) + if err != nil { + return nil, errIncorrectNetAddr + } + + // Encapsulate + return ipm.Encapsulate(udpm), nil +} + +func parseIPNetAddr(a net.Addr) (ma.Multiaddr, error) { + ac, ok := a.(*net.IPAddr) + if !ok { + return nil, errIncorrectNetAddr + } + return FromIPAndZone(ac.IP, ac.Zone) +} + +func parseIPPlusNetAddr(a net.Addr) (ma.Multiaddr, error) { + ac, ok := a.(*net.IPNet) + if !ok { + return nil, errIncorrectNetAddr + } + return FromIP(ac.IP) +} + +func parseUnixNetAddr(a net.Addr) (ma.Multiaddr, error) { + ac, ok := a.(*net.UnixAddr) + if !ok { + return nil, errIncorrectNetAddr + } + cleaned := filepath.Clean(ac.Name) + return ma.NewComponent("unix", cleaned) +} diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/doc.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/doc.go similarity index 100% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/doc.go rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/doc.go diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/ip.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/ip.go similarity index 97% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/ip.go rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/ip.go index c61b786a1f..6660715835 100644 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/ip.go +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/ip.go @@ -3,7 +3,7 @@ package manet import ( "net" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // Loopback Addresses diff --git a/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/net.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/net.go new file mode 100644 index 0000000000..a178c92c4c --- /dev/null +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/net.go @@ -0,0 +1,427 @@ +// Package manet provides Multiaddr +// (https://github.com/multiformats/go-multiaddr) specific versions of common +// functions in Go's standard `net` package. This means wrappers of standard +// net symbols like `net.Dial` and `net.Listen`, as well as conversion to +// and from `net.Addr`. +package manet + +import ( + "context" + "fmt" + "net" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" +) + +// Conn is the equivalent of a net.Conn object. It is the +// result of calling the Dial or Listen functions in this +// package, with associated local and remote Multiaddrs. +type Conn interface { + net.Conn + + // LocalMultiaddr returns the local Multiaddr associated + // with this connection + LocalMultiaddr() ma.Multiaddr + + // RemoteMultiaddr returns the remote Multiaddr associated + // with this connection + RemoteMultiaddr() ma.Multiaddr +} + +type halfOpen interface { + net.Conn + CloseRead() error + CloseWrite() error +} + +func wrap(nconn net.Conn, laddr, raddr ma.Multiaddr) Conn { + endpts := maEndpoints{ + laddr: laddr, + raddr: raddr, + } + // This sucks. However, it's the only way to reliably expose the + // underlying methods. This way, users that need access to, e.g., + // CloseRead and CloseWrite, can do so via type assertions. + switch nconn := nconn.(type) { + case *net.TCPConn: + return &struct { + *net.TCPConn + maEndpoints + }{nconn, endpts} + case *net.UDPConn: + return &struct { + *net.UDPConn + maEndpoints + }{nconn, endpts} + case *net.IPConn: + return &struct { + *net.IPConn + maEndpoints + }{nconn, endpts} + case *net.UnixConn: + return &struct { + *net.UnixConn + maEndpoints + }{nconn, endpts} + case halfOpen: + return &struct { + halfOpen + maEndpoints + }{nconn, endpts} + default: + return &struct { + net.Conn + maEndpoints + }{nconn, endpts} + } +} + +// WrapNetConn wraps a net.Conn object with a Multiaddr friendly Conn. +// +// This function does it's best to avoid "hiding" methods exposed by the wrapped +// type. Guarantees: +// +// * If the wrapped connection exposes the "half-open" closer methods +// (CloseWrite, CloseRead), these will be available on the wrapped connection +// via type assertions. +// * If the wrapped connection is a UnixConn, IPConn, TCPConn, or UDPConn, all +// methods on these wrapped connections will be available via type assertions. +func WrapNetConn(nconn net.Conn) (Conn, error) { + if nconn == nil { + return nil, fmt.Errorf("failed to convert nconn.LocalAddr: nil") + } + + laddr, err := FromNetAddr(nconn.LocalAddr()) + if err != nil { + return nil, fmt.Errorf("failed to convert nconn.LocalAddr: %s", err) + } + + raddr, err := FromNetAddr(nconn.RemoteAddr()) + if err != nil { + return nil, fmt.Errorf("failed to convert nconn.RemoteAddr: %s", err) + } + + return wrap(nconn, laddr, raddr), nil +} + +type maEndpoints struct { + laddr ma.Multiaddr + raddr ma.Multiaddr +} + +// LocalMultiaddr returns the local address associated with +// this connection +func (c *maEndpoints) LocalMultiaddr() ma.Multiaddr { + return c.laddr +} + +// RemoteMultiaddr returns the remote address associated with +// this connection +func (c *maEndpoints) RemoteMultiaddr() ma.Multiaddr { + return c.raddr +} + +// Dialer contains options for connecting to an address. It +// is effectively the same as net.Dialer, but its LocalAddr +// and RemoteAddr options are Multiaddrs, instead of net.Addrs. +type Dialer struct { + + // Dialer is just an embedded net.Dialer, with all its options. + net.Dialer + + // LocalAddr is the local address to use when dialing an + // address. The address must be of a compatible type for the + // network being dialed. + // If nil, a local address is automatically chosen. + LocalAddr ma.Multiaddr +} + +// Dial connects to a remote address, using the options of the +// Dialer. Dialer uses an underlying net.Dialer to Dial a +// net.Conn, then wraps that in a Conn object (with local and +// remote Multiaddrs). +func (d *Dialer) Dial(remote ma.Multiaddr) (Conn, error) { + return d.DialContext(context.Background(), remote) +} + +// DialContext allows to provide a custom context to Dial(). +func (d *Dialer) DialContext(ctx context.Context, remote ma.Multiaddr) (Conn, error) { + // if a LocalAddr is specified, use it on the embedded dialer. + if d.LocalAddr != nil { + // convert our multiaddr to net.Addr friendly + naddr, err := ToNetAddr(d.LocalAddr) + if err != nil { + return nil, err + } + + // set the dialer's LocalAddr as naddr + d.Dialer.LocalAddr = naddr + } + + // get the net.Dial friendly arguments from the remote addr + rnet, rnaddr, err := DialArgs(remote) + if err != nil { + return nil, err + } + + // ok, Dial! + var nconn net.Conn + switch rnet { + case "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6", "unix": + nconn, err = d.Dialer.DialContext(ctx, rnet, rnaddr) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("unrecognized network: %s", rnet) + } + + // get local address (pre-specified or assigned within net.Conn) + local := d.LocalAddr + // This block helps us avoid parsing addresses in transports (such as unix + // sockets) that don't have local addresses when dialing out. + if local == nil && nconn.LocalAddr().String() != "" { + local, err = FromNetAddr(nconn.LocalAddr()) + if err != nil { + return nil, err + } + } + return wrap(nconn, local, remote), nil +} + +// Dial connects to a remote address. It uses an underlying net.Conn, +// then wraps it in a Conn object (with local and remote Multiaddrs). +func Dial(remote ma.Multiaddr) (Conn, error) { + return (&Dialer{}).Dial(remote) +} + +// A Listener is a generic network listener for stream-oriented protocols. +// it uses an embedded net.Listener, overriding net.Listener.Accept to +// return a Conn and providing Multiaddr. +type Listener interface { + // Accept waits for and returns the next connection to the listener. + // Returns a Multiaddr friendly Conn + Accept() (Conn, error) + + // Close closes the listener. + // Any blocked Accept operations will be unblocked and return errors. + Close() error + + // Multiaddr returns the listener's (local) Multiaddr. + Multiaddr() ma.Multiaddr + + // Addr returns the net.Listener's network address. + Addr() net.Addr +} + +type netListenerAdapter struct { + Listener +} + +func (nla *netListenerAdapter) Accept() (net.Conn, error) { + return nla.Listener.Accept() +} + +// NetListener turns this Listener into a net.Listener. +// +// * Connections returned from Accept implement multiaddr-net Conn. +// * Calling WrapNetListener on the net.Listener returned by this function will +// return the original (underlying) multiaddr-net Listener. +func NetListener(l Listener) net.Listener { + return &netListenerAdapter{l} +} + +// maListener implements Listener +type maListener struct { + net.Listener + laddr ma.Multiaddr +} + +// Accept waits for and returns the next connection to the listener. +// Returns a Multiaddr friendly Conn +func (l *maListener) Accept() (Conn, error) { + nconn, err := l.Listener.Accept() + if err != nil { + return nil, err + } + + var raddr ma.Multiaddr + // This block protects us in transports (i.e. unix sockets) that don't have + // remote addresses for inbound connections. + if nconn.RemoteAddr().String() != "" { + raddr, err = FromNetAddr(nconn.RemoteAddr()) + if err != nil { + return nil, fmt.Errorf("failed to convert conn.RemoteAddr: %s", err) + } + } + + return wrap(nconn, l.laddr, raddr), nil +} + +// Multiaddr returns the listener's (local) Multiaddr. +func (l *maListener) Multiaddr() ma.Multiaddr { + return l.laddr +} + +// Addr returns the listener's network address. +func (l *maListener) Addr() net.Addr { + return l.Listener.Addr() +} + +// Listen announces on the local network address laddr. +// The Multiaddr must be a "ThinWaist" stream-oriented network: +// ip4/tcp, ip6/tcp, (TODO: unix, unixpacket) +// See Dial for the syntax of laddr. +func Listen(laddr ma.Multiaddr) (Listener, error) { + + // get the net.Listen friendly arguments from the remote addr + lnet, lnaddr, err := DialArgs(laddr) + if err != nil { + return nil, err + } + + nl, err := net.Listen(lnet, lnaddr) + if err != nil { + return nil, err + } + + // we want to fetch the new multiaddr from the listener, as it may + // have resolved to some other value. WrapNetListener does it for us. + return WrapNetListener(nl) +} + +// WrapNetListener wraps a net.Listener with a manet.Listener. +func WrapNetListener(nl net.Listener) (Listener, error) { + if nla, ok := nl.(*netListenerAdapter); ok { + return nla.Listener, nil + } + + laddr, err := FromNetAddr(nl.Addr()) + if err != nil { + return nil, err + } + + return &maListener{ + Listener: nl, + laddr: laddr, + }, nil +} + +// A PacketConn is a generic packet oriented network connection which uses an +// underlying net.PacketConn, wrapped with the locally bound Multiaddr. +type PacketConn interface { + Connection() net.PacketConn + + Multiaddr() ma.Multiaddr + + ReadFrom(b []byte) (int, ma.Multiaddr, error) + WriteTo(b []byte, maddr ma.Multiaddr) (int, error) + + Close() error +} + +// maPacketConn implements PacketConn +type maPacketConn struct { + net.PacketConn + laddr ma.Multiaddr +} + +// Connection returns the embedded net.PacketConn. +func (l *maPacketConn) Connection() net.PacketConn { + return l.PacketConn +} + +// Multiaddr returns the bound local Multiaddr. +func (l *maPacketConn) Multiaddr() ma.Multiaddr { + return l.laddr +} + +func (l *maPacketConn) ReadFrom(b []byte) (int, ma.Multiaddr, error) { + n, addr, err := l.PacketConn.ReadFrom(b) + maddr, _ := FromNetAddr(addr) + return n, maddr, err +} + +func (l *maPacketConn) WriteTo(b []byte, maddr ma.Multiaddr) (int, error) { + addr, err := ToNetAddr(maddr) + if err != nil { + return 0, err + } + return l.PacketConn.WriteTo(b, addr) +} + +// ListenPacket announces on the local network address laddr. +// The Multiaddr must be a packet driven network, like udp4 or udp6. +// See Dial for the syntax of laddr. +func ListenPacket(laddr ma.Multiaddr) (PacketConn, error) { + lnet, lnaddr, err := DialArgs(laddr) + if err != nil { + return nil, err + } + + pc, err := net.ListenPacket(lnet, lnaddr) + if err != nil { + return nil, err + } + + // We want to fetch the new multiaddr from the listener, as it may + // have resolved to some other value. WrapPacketConn does this. + return WrapPacketConn(pc) +} + +// WrapPacketConn wraps a net.PacketConn with a manet.PacketConn. +func WrapPacketConn(pc net.PacketConn) (PacketConn, error) { + laddr, err := FromNetAddr(pc.LocalAddr()) + if err != nil { + return nil, err + } + + return &maPacketConn{ + PacketConn: pc, + laddr: laddr, + }, nil +} + +// InterfaceMultiaddrs will return the addresses matching net.InterfaceAddrs +func InterfaceMultiaddrs() ([]ma.Multiaddr, error) { + addrs, err := net.InterfaceAddrs() + if err != nil { + return nil, err + } + + maddrs := make([]ma.Multiaddr, len(addrs)) + for i, a := range addrs { + maddrs[i], err = FromNetAddr(a) + if err != nil { + return nil, err + } + } + return maddrs, nil +} + +// AddrMatch returns the Multiaddrs that match the protocol stack on addr +func AddrMatch(match ma.Multiaddr, addrs []ma.Multiaddr) []ma.Multiaddr { + + // we should match transports entirely. + p1s := match.Protocols() + + out := make([]ma.Multiaddr, 0, len(addrs)) + for _, a := range addrs { + p2s := a.Protocols() + if len(p1s) != len(p2s) { + continue + } + + match := true + for i, p2 := range p2s { + if p1s[i].Code != p2.Code { + match = false + break + } + } + if match { + out = append(out, a) + } + } + return out +} diff --git a/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/package.json b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/package.json new file mode 100644 index 0000000000..cdad09eacb --- /dev/null +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/package.json @@ -0,0 +1,30 @@ +{ + "author": "multiformats", + "bugs": { + "url": "https://github.com/multiformats/go-multiaddr-net" + }, + "gx": { + "dvcsimport": "github.com/multiformats/go-multiaddr-net" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "lgierth", + "hash": "QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy", + "name": "go-multiaddr-dns", + "version": "0.3.1" + } + ], + "gxVersion": "0.6.0", + "language": "go", + "license": "", + "name": "go-multiaddr-net", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.7.2" +} + diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/private.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/private.go similarity index 97% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/private.go rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/private.go index fb07ec9e83..f6ccfda4ef 100644 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/private.go +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/private.go @@ -3,7 +3,7 @@ package manet import ( "net" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // Private4 and Private6 are well-known private networks diff --git a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/registry.go b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/registry.go similarity index 96% rename from vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/registry.go rename to vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/registry.go index c26d02d35a..50c38338f1 100644 --- a/vendor/gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net/registry.go +++ b/vendor/gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net/registry.go @@ -5,7 +5,7 @@ import ( "net" "sync" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" ) // FromNetAddrFunc is a generic function which converts a net.Addr to Multiaddress @@ -21,8 +21,9 @@ func init() { defaultCodecs.RegisterFromNetAddr(parseUDPNetAddr, "udp", "udp4", "udp6") defaultCodecs.RegisterFromNetAddr(parseIPNetAddr, "ip", "ip4", "ip6") defaultCodecs.RegisterFromNetAddr(parseIPPlusNetAddr, "ip+net") + defaultCodecs.RegisterFromNetAddr(parseUnixNetAddr, "unix") - defaultCodecs.RegisterToNetAddr(parseBasicNetMaddr, "tcp", "udp", "ip6", "ip4") + defaultCodecs.RegisterToNetAddr(parseBasicNetMaddr, "tcp", "udp", "ip6", "ip4", "unix") } // CodecMap holds a map of NetCodecs indexed by their Protocol ID diff --git a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/package.json b/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/package.json deleted file mode 100644 index d5a7375b32..0000000000 --- a/vendor/gx/ipfs/QmcASJiigZMaU3dKghcQo6FtcbqwfZ7UFp5W4fp62f8KJE/mafmt/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": {}, - "gx": { - "dvcsimport": "github.com/whyrusleeping/mafmt" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.6.0", - "gx_version": "0.4.0", - "issues_url": "https://github.com/whyrusleeping/mafmt", - "language": "go", - "license": "", - "name": "mafmt", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.2.8" -} - diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/.travis.yml b/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/.travis.yml deleted file mode 100644 index 2bf34b5c43..0000000000 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go -go: - - 1.9 - -install: - - go get github.com/whyrusleeping/gx - - go get github.com/whyrusleeping/gx-go -script: - - make test - -after_success: - - bash <(curl -s https://codecov.io/bash) - -cache: - directories: - - $GOPATH/src/gx - -notifications: -email: false diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/LICENSE b/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/LICENSE deleted file mode 100644 index e4224df5b7..0000000000 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 IPFS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/package.json b/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/package.json deleted file mode 100644 index 02382ef0bd..0000000000 --- a/vendor/gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-blockstore" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-blockstore" - }, - "gxDependencies": [ - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - }, - { - "author": "ipfs", - "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", - "name": "go-metrics-interface", - "version": "0.2.0" - }, - { - "author": "hashicorp", - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "hector", - "hash": "QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt", - "name": "go-ipfs-ds-help", - "version": "0.1.3" - }, - { - "author": "kubuxu", - "hash": "QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf", - "name": "bbloom", - "version": "0.1.2" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-blockstore", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.4" -} - diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/Makefile b/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/Makefile deleted file mode 100644 index a89e6d08e6..0000000000 --- a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -export IPFS_API ?= v04x.ipfs.io - -gx: - go get -u github.com/whyrusleeping/gx - go get -u github.com/whyrusleeping/gx-go - -deps: gx - gx --verbose install --global - gx-go rewrite \ No newline at end of file diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications/query.go b/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications/query.go deleted file mode 100644 index 3020f6d5d7..0000000000 --- a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/notifications/query.go +++ /dev/null @@ -1,121 +0,0 @@ -package notifications - -import ( - "context" - "encoding/json" - "sync" - - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" -) - -type QueryEventType int - -// Number of events to buffer. -var QueryEventBufferSize = 16 - -const ( - SendingQuery QueryEventType = iota - PeerResponse - FinalPeer - QueryError - Provider - Value - AddingPeer - DialingPeer -) - -type QueryEvent struct { - ID peer.ID - Type QueryEventType - Responses []*pstore.PeerInfo - Extra string -} - -type routingQueryKey struct{} -type eventChannel struct { - mu sync.Mutex - ctx context.Context - ch chan<- *QueryEvent -} - -// waitThenClose is spawned in a goroutine when the channel is registered. This -// safely cleans up the channel when the context has been canceled. -func (e *eventChannel) waitThenClose() { - <-e.ctx.Done() - e.mu.Lock() - close(e.ch) - // 1. Signals that we're done. - // 2. Frees memory (in case we end up hanging on to this for a while). - e.ch = nil - e.mu.Unlock() -} - -// send sends an event on the event channel, aborting if either the passed or -// the internal context expire. -func (e *eventChannel) send(ctx context.Context, ev *QueryEvent) { - e.mu.Lock() - // Closed. - if e.ch == nil { - e.mu.Unlock() - return - } - // in case the passed context is unrelated, wait on both. - select { - case e.ch <- ev: - case <-e.ctx.Done(): - case <-ctx.Done(): - } - e.mu.Unlock() -} - -func RegisterForQueryEvents(ctx context.Context) (context.Context, <-chan *QueryEvent) { - ch := make(chan *QueryEvent, QueryEventBufferSize) - ech := &eventChannel{ch: ch, ctx: ctx} - go ech.waitThenClose() - return context.WithValue(ctx, routingQueryKey{}, ech), ch -} - -func PublishQueryEvent(ctx context.Context, ev *QueryEvent) { - ich := ctx.Value(routingQueryKey{}) - if ich == nil { - return - } - - // We *want* to panic here. - ech := ich.(*eventChannel) - ech.send(ctx, ev) -} - -func (qe *QueryEvent) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ - "ID": peer.IDB58Encode(qe.ID), - "Type": int(qe.Type), - "Responses": qe.Responses, - "Extra": qe.Extra, - }) -} - -func (qe *QueryEvent) UnmarshalJSON(b []byte) error { - temp := struct { - ID string - Type int - Responses []*pstore.PeerInfo - Extra string - }{} - err := json.Unmarshal(b, &temp) - if err != nil { - return err - } - if len(temp.ID) > 0 { - pid, err := peer.IDB58Decode(temp.ID) - if err != nil { - return err - } - qe.ID = pid - } - qe.Type = QueryEventType(temp.Type) - qe.Responses = temp.Responses - qe.Extra = temp.Extra - return nil -} diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/package.json b/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/package.json deleted file mode 100644 index 983377801e..0000000000 --- a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-routing" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-routing", - "goversion": "1.5.2" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - } - ], - "gxVersion": "0.4.0", - "language": "go", - "license": "MIT", - "name": "go-libp2p-routing", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.7.1" -} - diff --git a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/routing.go b/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/routing.go deleted file mode 100644 index 8d5270762f..0000000000 --- a/vendor/gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/routing.go +++ /dev/null @@ -1,124 +0,0 @@ -// package routing defines the interface for a routing system used by ipfs. -package routing - -import ( - "context" - "errors" - - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" -) - -// ErrNotFound is returned when the router fails to find the requested record. -var ErrNotFound = errors.New("routing: not found") - -// ErrNotSupported is returned when the router doesn't support the given record -// type/operation. -var ErrNotSupported = errors.New("routing: operation or key not supported") - -// ContentRouting is a value provider layer of indirection. It is used to find -// information about who has what content. -type ContentRouting interface { - // Provide adds the given cid to the content routing system. If 'true' is - // passed, it also announces it, otherwise it is just kept in the local - // accounting of which objects are being provided. - Provide(context.Context, cid.Cid, bool) error - - // Search for peers who are able to provide a given key - FindProvidersAsync(context.Context, cid.Cid, int) <-chan pstore.PeerInfo -} - -// PeerRouting is a way to find information about certain peers. -// This can be implemented by a simple lookup table, a tracking server, -// or even a DHT. -type PeerRouting interface { - // Find specific Peer - // FindPeer searches for a peer with given ID, returns a pstore.PeerInfo - // with relevant addresses. - FindPeer(context.Context, peer.ID) (pstore.PeerInfo, error) -} - -// ValueStore is a basic Put/Get interface. -type ValueStore interface { - - // PutValue adds value corresponding to given Key. - PutValue(context.Context, string, []byte, ...ropts.Option) error - - // GetValue searches for the value corresponding to given Key. - GetValue(context.Context, string, ...ropts.Option) ([]byte, error) - - // SearchValue searches for better and better values from this value - // store corresponding to the given Key. By default implementations must - // stop the search after a good value is found. A 'good' value is a value - // that would be returned from GetValue. - // - // Useful when you want a result *now* but still want to hear about - // better/newer results. - // - // Implementations of this methods won't return ErrNotFound. When a value - // couldn't be found, the channel will get closed without passing any results - SearchValue(context.Context, string, ...ropts.Option) (<-chan []byte, error) -} - -// IpfsRouting is the combination of different routing types that ipfs -// uses. It can be satisfied by a single item (such as a DHT) or multiple -// different pieces that are more optimized to each task. -type IpfsRouting interface { - ContentRouting - PeerRouting - ValueStore - - // Bootstrap allows callers to hint to the routing system to get into a - // Boostrapped state - Bootstrap(context.Context) error - - // TODO expose io.Closer or plain-old Close error -} - -// PubKeyFetcher is an interfaces that should be implemented by value stores -// that can optimize retrieval of public keys. -// -// TODO(steb): Consider removing, see #22. -type PubKeyFetcher interface { - // GetPublicKey returns the public key for the given peer. - GetPublicKey(context.Context, peer.ID) (ci.PubKey, error) -} - -// KeyForPublicKey returns the key used to retrieve public keys -// from a value store. -func KeyForPublicKey(id peer.ID) string { - return "/pk/" + string(id) -} - -// GetPublicKey retrieves the public key associated with the given peer ID from -// the value store. -// -// If the ValueStore is also a PubKeyFetcher, this method will call GetPublicKey -// (which may be better optimized) instead of GetValue. -func GetPublicKey(r ValueStore, ctx context.Context, p peer.ID) (ci.PubKey, error) { - switch k, err := p.ExtractPublicKey(); err { - case peer.ErrNoPublicKey: - // check the datastore - case nil: - return k, nil - default: - return nil, err - } - - if dht, ok := r.(PubKeyFetcher); ok { - // If we have a DHT as our routing system, use optimized fetcher - return dht.GetPublicKey(ctx, p) - } - key := KeyForPublicKey(p) - pkval, err := r.GetValue(ctx, key) - if err != nil { - return nil, err - } - - // get PublicKey from node.Data - return ci.UnmarshalPublicKey(pkval) -} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/.travis.yml b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/.travis.yml new file mode 100644 index 0000000000..1bf8cd5692 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/.travis.yml @@ -0,0 +1,22 @@ +sudo: false + + +language: go +go: + - 1.11.x + +before_install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/LICENSE b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmWfhv1D18DRSiSm73r4QGcByspzPtxxRTcmHW3axFXZo8/go-blockservice/LICENSE rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/LICENSE diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/Makefile b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/Makefile similarity index 100% rename from vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/Makefile rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/Makefile diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/README.md b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/README.md similarity index 100% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/README.md rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/README.md diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/bitswap.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/bitswap.go new file mode 100644 index 0000000000..98ab9e5431 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/bitswap.go @@ -0,0 +1,390 @@ +// package bitswap implements the IPFS exchange interface with the BitSwap +// bilateral exchange protocol. +package bitswap + +import ( + "context" + "errors" + "sync" + "time" + + bssrs "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter" + + flags "gx/ipfs/QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8/go-ipfs-flags" + process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + delay "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" + exchange "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + decision "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision" + bsgetter "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + bsmq "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/messagequeue" + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + bspm "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/peermanager" + bspqm "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/providerquerymanager" + bssession "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session" + bssm "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionmanager" + bsspm "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionpeermanager" + bswm "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantmanager" + metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" +) + +var log = logging.Logger("bitswap") + +var _ exchange.SessionExchange = (*Bitswap)(nil) + +const ( + // maxProvidersPerRequest specifies the maximum number of providers desired + // from the network. This value is specified because the network streams + // results. + // TODO: if a 'non-nice' strategy is implemented, consider increasing this value + maxProvidersPerRequest = 3 + findProviderDelay = 1 * time.Second + providerRequestTimeout = time.Second * 10 + provideTimeout = time.Second * 15 + sizeBatchRequestChan = 32 +) + +var ( + HasBlockBufferSize = 256 + provideKeysBufferSize = 2048 + provideWorkerMax = 512 + + // the 1<<18+15 is to observe old file chunks that are 1<<18 + 14 in size + metricsBuckets = []float64{1 << 6, 1 << 10, 1 << 14, 1 << 18, 1<<18 + 15, 1 << 22} +) + +func init() { + if flags.LowMemMode { + HasBlockBufferSize = 64 + provideKeysBufferSize = 512 + provideWorkerMax = 16 + } +} + +var rebroadcastDelay = delay.Fixed(time.Minute) + +// New initializes a BitSwap instance that communicates over the provided +// BitSwapNetwork. This function registers the returned instance as the network +// delegate. +// Runs until context is cancelled. +func New(parent context.Context, network bsnet.BitSwapNetwork, + bstore blockstore.Blockstore) exchange.Interface { + + // important to use provided parent context (since it may include important + // loggable data). It's probably not a good idea to allow bitswap to be + // coupled to the concerns of the ipfs daemon in this way. + // + // FIXME(btc) Now that bitswap manages itself using a process, it probably + // shouldn't accept a context anymore. Clients should probably use Close() + // exclusively. We should probably find another way to share logging data + ctx, cancelFunc := context.WithCancel(parent) + ctx = metrics.CtxSubScope(ctx, "bitswap") + dupHist := metrics.NewCtx(ctx, "recv_dup_blocks_bytes", "Summary of duplicate"+ + " data blocks recived").Histogram(metricsBuckets) + allHist := metrics.NewCtx(ctx, "recv_all_blocks_bytes", "Summary of all"+ + " data blocks recived").Histogram(metricsBuckets) + + sentHistogram := metrics.NewCtx(ctx, "sent_all_blocks_bytes", "Histogram of blocks sent by"+ + " this bitswap").Histogram(metricsBuckets) + + px := process.WithTeardown(func() error { + return nil + }) + + peerQueueFactory := func(ctx context.Context, p peer.ID) bspm.PeerQueue { + return bsmq.New(ctx, p, network) + } + + wm := bswm.New(ctx) + pqm := bspqm.New(ctx, network) + + sessionFactory := func(ctx context.Context, id uint64, pm bssession.PeerManager, srs bssession.RequestSplitter) bssm.Session { + return bssession.New(ctx, id, wm, pm, srs) + } + sessionPeerManagerFactory := func(ctx context.Context, id uint64) bssession.PeerManager { + return bsspm.New(ctx, id, network.ConnectionManager(), pqm) + } + sessionRequestSplitterFactory := func(ctx context.Context) bssession.RequestSplitter { + return bssrs.New(ctx) + } + + bs := &Bitswap{ + blockstore: bstore, + engine: decision.NewEngine(ctx, bstore), // TODO close the engine with Close() method + network: network, + process: px, + newBlocks: make(chan cid.Cid, HasBlockBufferSize), + provideKeys: make(chan cid.Cid, provideKeysBufferSize), + wm: wm, + pqm: pqm, + pm: bspm.New(ctx, peerQueueFactory), + sm: bssm.New(ctx, sessionFactory, sessionPeerManagerFactory, sessionRequestSplitterFactory), + counters: new(counters), + dupMetric: dupHist, + allMetric: allHist, + sentHistogram: sentHistogram, + } + + bs.wm.SetDelegate(bs.pm) + bs.wm.Startup() + bs.pqm.Startup() + network.SetDelegate(bs) + + // Start up bitswaps async worker routines + bs.startWorkers(px, ctx) + + // bind the context and process. + // do it over here to avoid closing before all setup is done. + go func() { + <-px.Closing() // process closes first + cancelFunc() + }() + procctx.CloseAfterContext(px, ctx) // parent cancelled first + + return bs +} + +// Bitswap instances implement the bitswap protocol. +type Bitswap struct { + // the peermanager manages sending messages to peers in a way that + // wont block bitswap operation + pm *bspm.PeerManager + + // the wantlist tracks global wants for bitswap + wm *bswm.WantManager + + // the provider query manager manages requests to find providers + pqm *bspqm.ProviderQueryManager + + // the engine is the bit of logic that decides who to send which blocks to + engine *decision.Engine + + // network delivers messages on behalf of the session + network bsnet.BitSwapNetwork + + // blockstore is the local database + // NB: ensure threadsafety + blockstore blockstore.Blockstore + + // newBlocks is a channel for newly added blocks to be provided to the + // network. blocks pushed down this channel get buffered and fed to the + // provideKeys channel later on to avoid too much network activity + newBlocks chan cid.Cid + // provideKeys directly feeds provide workers + provideKeys chan cid.Cid + + process process.Process + + // Counters for various statistics + counterLk sync.Mutex + counters *counters + + // Metrics interface metrics + dupMetric metrics.Histogram + allMetric metrics.Histogram + sentHistogram metrics.Histogram + + // the sessionmanager manages tracking sessions + sm *bssm.SessionManager +} + +type counters struct { + blocksRecvd uint64 + dupBlocksRecvd uint64 + dupDataRecvd uint64 + blocksSent uint64 + dataSent uint64 + dataRecvd uint64 + messagesRecvd uint64 +} + +type blockRequest struct { + Cid cid.Cid + Ctx context.Context +} + +// GetBlock attempts to retrieve a particular block from peers within the +// deadline enforced by the context. +func (bs *Bitswap) GetBlock(parent context.Context, k cid.Cid) (blocks.Block, error) { + return bsgetter.SyncGetBlock(parent, k, bs.GetBlocks) +} + +func (bs *Bitswap) WantlistForPeer(p peer.ID) []cid.Cid { + var out []cid.Cid + for _, e := range bs.engine.WantlistForPeer(p) { + out = append(out, e.Cid) + } + return out +} + +func (bs *Bitswap) LedgerForPeer(p peer.ID) *decision.Receipt { + return bs.engine.LedgerForPeer(p) +} + +// GetBlocks returns a channel where the caller may receive blocks that +// correspond to the provided |keys|. Returns an error if BitSwap is unable to +// begin this request within the deadline enforced by the context. +// +// NB: Your request remains open until the context expires. To conserve +// resources, provide a context with a reasonably short deadline (ie. not one +// that lasts throughout the lifetime of the server) +func (bs *Bitswap) GetBlocks(ctx context.Context, keys []cid.Cid) (<-chan blocks.Block, error) { + session := bs.sm.NewSession(ctx) + return session.GetBlocks(ctx, keys) +} + +// HasBlock announces the existence of a block to this bitswap service. The +// service will potentially notify its peers. +func (bs *Bitswap) HasBlock(blk blocks.Block) error { + return bs.receiveBlockFrom(blk, "") +} + +// TODO: Some of this stuff really only needs to be done when adding a block +// from the user, not when receiving it from the network. +// In case you run `git blame` on this comment, I'll save you some time: ask +// @whyrusleeping, I don't know the answers you seek. +func (bs *Bitswap) receiveBlockFrom(blk blocks.Block, from peer.ID) error { + select { + case <-bs.process.Closing(): + return errors.New("bitswap is closed") + default: + } + + err := bs.blockstore.Put(blk) + if err != nil { + log.Errorf("Error writing block to datastore: %s", err) + return err + } + + // NOTE: There exists the possiblity for a race condition here. If a user + // creates a node, then adds it to the dagservice while another goroutine + // is waiting on a GetBlock for that object, they will receive a reference + // to the same node. We should address this soon, but i'm not going to do + // it now as it requires more thought and isnt causing immediate problems. + + bs.sm.ReceiveBlockFrom(from, blk) + + bs.engine.AddBlock(blk) + + select { + case bs.newBlocks <- blk.Cid(): + // send block off to be reprovided + case <-bs.process.Closing(): + return bs.process.Close() + } + return nil +} + +func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg.BitSwapMessage) { + bs.counterLk.Lock() + bs.counters.messagesRecvd++ + bs.counterLk.Unlock() + + // This call records changes to wantlists, blocks received, + // and number of bytes transfered. + bs.engine.MessageReceived(p, incoming) + // TODO: this is bad, and could be easily abused. + // Should only track *useful* messages in ledger + + iblocks := incoming.Blocks() + + if len(iblocks) == 0 { + return + } + + wg := sync.WaitGroup{} + for _, block := range iblocks { + + wg.Add(1) + go func(b blocks.Block) { // TODO: this probably doesnt need to be a goroutine... + defer wg.Done() + + bs.updateReceiveCounters(b) + bs.sm.UpdateReceiveCounters(b) + log.Debugf("got block %s from %s", b, p) + + // skip received blocks that are not in the wantlist + if !bs.wm.IsWanted(b.Cid()) { + return + } + + if err := bs.receiveBlockFrom(b, p); err != nil { + log.Warningf("ReceiveMessage recvBlockFrom error: %s", err) + } + log.Event(ctx, "Bitswap.GetBlockRequest.End", b.Cid()) + }(block) + } + wg.Wait() +} + +var ErrAlreadyHaveBlock = errors.New("already have block") + +func (bs *Bitswap) updateReceiveCounters(b blocks.Block) { + blkLen := len(b.RawData()) + has, err := bs.blockstore.Has(b.Cid()) + if err != nil { + log.Infof("blockstore.Has error: %s", err) + return + } + + bs.allMetric.Observe(float64(blkLen)) + if has { + bs.dupMetric.Observe(float64(blkLen)) + } + + bs.counterLk.Lock() + defer bs.counterLk.Unlock() + c := bs.counters + + c.blocksRecvd++ + c.dataRecvd += uint64(len(b.RawData())) + if has { + c.dupBlocksRecvd++ + c.dupDataRecvd += uint64(blkLen) + } +} + +// Connected/Disconnected warns bitswap about peer connections. +func (bs *Bitswap) PeerConnected(p peer.ID) { + bs.wm.Connected(p) + bs.engine.PeerConnected(p) +} + +// Connected/Disconnected warns bitswap about peer connections. +func (bs *Bitswap) PeerDisconnected(p peer.ID) { + bs.wm.Disconnected(p) + bs.engine.PeerDisconnected(p) +} + +func (bs *Bitswap) ReceiveError(err error) { + log.Infof("Bitswap ReceiveError: %s", err) + // TODO log the network error + // TODO bubble the network error up to the parent context/error logger +} + +func (bs *Bitswap) Close() error { + return bs.process.Close() +} + +func (bs *Bitswap) GetWantlist() []cid.Cid { + entries := bs.wm.CurrentWants() + out := make([]cid.Cid, 0, len(entries)) + for _, e := range entries { + out = append(out, e.Cid) + } + return out +} + +func (bs *Bitswap) IsOnline() bool { + return true +} + +func (bs *Bitswap) NewSession(ctx context.Context) exchange.Fetcher { + return bs.sm.NewSession(ctx) +} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/engine.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/engine.go similarity index 93% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/engine.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/engine.go index 14c35e1ab7..9777b7ce2e 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/engine.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/engine.go @@ -6,13 +6,13 @@ import ( "sync" "time" - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - wl "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + wl "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - bstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" + bstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) // TODO consider taking responsibility for other types of requests. For @@ -56,12 +56,12 @@ const ( maxMessageSize = 512 * 1024 ) -// Envelope contains a message for a Peer +// Envelope contains a message for a Peer. type Envelope struct { - // Peer is the intended recipient + // Peer is the intended recipient. Peer peer.ID - // Message is the payload + // Message is the payload. Message bsmsg.BitSwapMessage // A callback to notify the decision queue that the task is complete @@ -107,7 +107,7 @@ func NewEngine(ctx context.Context, bs bstore.Blockstore) *Engine { return e } -func (e *Engine) WantlistForPeer(p peer.ID) (out []*wl.Entry) { +func (e *Engine) WantlistForPeer(p peer.ID) (out []wl.Entry) { partner := e.findOrCreate(p) partner.lk.Lock() defer partner.lk.Unlock() @@ -206,7 +206,7 @@ func (e *Engine) Outbox() <-chan (<-chan *Envelope) { return e.outbox } -// Returns a slice of Peers with whom the local node has active sessions +// Peers returns a slice of Peers with whom the local node has active sessions. func (e *Engine) Peers() []peer.ID { e.lock.Lock() defer e.lock.Unlock() @@ -241,7 +241,7 @@ func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error { } var msgSize int - var activeEntries []*wl.Entry + var activeEntries []wl.Entry for _, entry := range m.Wantlist() { if entry.Cancel { log.Debugf("%s cancel %s", p, entry.Cid) @@ -261,7 +261,7 @@ func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error { newWorkExists = true if msgSize+blockSize > maxMessageSize { e.peerRequestQueue.Push(p, activeEntries...) - activeEntries = []*wl.Entry{} + activeEntries = []wl.Entry{} msgSize = 0 } activeEntries = append(activeEntries, entry.Entry) diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/ledger.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/ledger.go similarity index 87% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/ledger.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/ledger.go index db9135f7ae..9e715d0d4e 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/ledger.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/ledger.go @@ -4,10 +4,10 @@ import ( "sync" "time" - wl "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist" + wl "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) func newLedger(p peer.ID) *ledger { @@ -85,7 +85,7 @@ func (l *ledger) CancelWant(k cid.Cid) { l.wantList.Remove(k) } -func (l *ledger) WantListContains(k cid.Cid) (*wl.Entry, bool) { +func (l *ledger) WantListContains(k cid.Cid) (wl.Entry, bool) { return l.wantList.Contains(k) } diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/peer_request_queue.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/peer_request_queue.go similarity index 86% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/peer_request_queue.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/peer_request_queue.go index eff99b2fca..701b75f44f 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/decision/peer_request_queue.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision/peer_request_queue.go @@ -4,17 +4,17 @@ import ( "sync" "time" - wantlist "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/wantlist" + wantlist "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" pq "gx/ipfs/QmZUbTDJ39JpvtFCSubiWeUTQRvMA1tVE5RZCJrY4oeAsC/go-ipfs-pq" ) type peerRequestQueue interface { // Pop returns the next peerRequestTask. Returns nil if the peerRequestQueue is empty. Pop() *peerRequestTask - Push(to peer.ID, entries ...*wantlist.Entry) + Push(to peer.ID, entries ...wantlist.Entry) Remove(k cid.Cid, p peer.ID) // NB: cannot expose simply expose taskQueue.Len because trashed elements @@ -45,8 +45,8 @@ type prq struct { frozen map[peer.ID]*activePartner } -// Push currently adds a new peerRequestTask to the end of the list -func (tl *prq) Push(to peer.ID, entries ...*wantlist.Entry) { +// Push currently adds a new peerRequestTask to the end of the list. +func (tl *prq) Push(to peer.ID, entries ...wantlist.Entry) { tl.lock.Lock() defer tl.lock.Unlock() partner, ok := tl.partners[to] @@ -60,7 +60,7 @@ func (tl *prq) Push(to peer.ID, entries ...*wantlist.Entry) { defer partner.activelk.Unlock() var priority int - newEntries := make([]*wantlist.Entry, 0, len(entries)) + newEntries := make([]peerRequestTaskEntry, 0, len(entries)) for _, entry := range entries { if partner.activeBlocks.Has(entry.Cid) { continue @@ -75,7 +75,7 @@ func (tl *prq) Push(to peer.ID, entries ...*wantlist.Entry) { if entry.Priority > priority { priority = entry.Priority } - newEntries = append(newEntries, entry) + newEntries = append(newEntries, peerRequestTaskEntry{entry, false}) } if len(newEntries) == 0 { @@ -86,7 +86,7 @@ func (tl *prq) Push(to peer.ID, entries ...*wantlist.Entry) { Entries: newEntries, Target: to, created: time.Now(), - Done: func(e []*wantlist.Entry) { + Done: func(e []peerRequestTaskEntry) { tl.lock.Lock() for _, entry := range e { partner.TaskDone(entry.Cid) @@ -117,10 +117,10 @@ func (tl *prq) Pop() *peerRequestTask { for partner.taskQueue.Len() > 0 && partner.freezeVal == 0 { out = partner.taskQueue.Pop().(*peerRequestTask) - newEntries := make([]*wantlist.Entry, 0, len(out.Entries)) + newEntries := make([]peerRequestTaskEntry, 0, len(out.Entries)) for _, entry := range out.Entries { delete(tl.taskMap, taskEntryKey{out.Target, entry.Cid}) - if entry.Trash { + if entry.trash { continue } partner.requests-- @@ -140,17 +140,17 @@ func (tl *prq) Pop() *peerRequestTask { return out } -// Remove removes a task from the queue +// Remove removes a task from the queue. func (tl *prq) Remove(k cid.Cid, p peer.ID) { tl.lock.Lock() t, ok := tl.taskMap[taskEntryKey{p, k}] if ok { - for _, entry := range t.Entries { - if entry.Cid.Equals(k) { + for i := range t.Entries { + if t.Entries[i].Cid.Equals(k) { // remove the task "lazily" // simply mark it as trash, so it'll be dropped when popped off the // queue. - entry.Trash = true + t.Entries[i].trash = true break } } @@ -197,25 +197,30 @@ func (tl *prq) thawRound() { } } +type peerRequestTaskEntry struct { + wantlist.Entry + // trash in a book-keeping field + trash bool +} type peerRequestTask struct { - Entries []*wantlist.Entry + Entries []peerRequestTaskEntry Priority int Target peer.ID // A callback to signal that this task has been completed - Done func([]*wantlist.Entry) + Done func([]peerRequestTaskEntry) // created marks the time that the task was added to the queue created time.Time index int // book-keeping field used by the pq container } -// Index implements pq.Elem +// Index implements pq.Elem. func (t *peerRequestTask) Index() int { return t.index } -// SetIndex implements pq.Elem +// SetIndex implements pq.Elem. func (t *peerRequestTask) SetIndex(i int) { t.index = i } @@ -307,7 +312,7 @@ func partnerCompare(a, b pq.Elem) bool { return pa.active < pb.active } -// StartTask signals that a task was started for this partner +// StartTask signals that a task was started for this partner. func (p *activePartner) StartTask(k cid.Cid) { p.activelk.Lock() p.activeBlocks.Add(k) @@ -315,7 +320,7 @@ func (p *activePartner) StartTask(k cid.Cid) { p.activelk.Unlock() } -// TaskDone signals that a task was completed for this partner +// TaskDone signals that a task was completed for this partner. func (p *activePartner) TaskDone(k cid.Cid) { p.activelk.Lock() p.activeBlocks.Remove(k) @@ -326,12 +331,12 @@ func (p *activePartner) TaskDone(k cid.Cid) { p.activelk.Unlock() } -// Index implements pq.Elem +// Index implements pq.Elem. func (p *activePartner) Index() int { return p.index } -// SetIndex implements pq.Elem +// SetIndex implements pq.Elem. func (p *activePartner) SetIndex(i int) { p.index = i } diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter/getter.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter/getter.go new file mode 100644 index 0000000000..0e0b5bffed --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter/getter.go @@ -0,0 +1,112 @@ +package getter + +import ( + "context" + "errors" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + notifications "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" +) + +var log = logging.Logger("bitswap") + +// GetBlocksFunc is any function that can take an array of CIDs and return a +// channel of incoming blocks. +type GetBlocksFunc func(context.Context, []cid.Cid) (<-chan blocks.Block, error) + +// SyncGetBlock takes a block cid and an async function for getting several +// blocks that returns a channel, and uses that function to return the +// block syncronously. +func SyncGetBlock(p context.Context, k cid.Cid, gb GetBlocksFunc) (blocks.Block, error) { + if !k.Defined() { + log.Error("undefined cid in GetBlock") + return nil, blockstore.ErrNotFound + } + + // Any async work initiated by this function must end when this function + // returns. To ensure this, derive a new context. Note that it is okay to + // listen on parent in this scope, but NOT okay to pass |parent| to + // functions called by this one. Otherwise those functions won't return + // when this context's cancel func is executed. This is difficult to + // enforce. May this comment keep you safe. + ctx, cancel := context.WithCancel(p) + defer cancel() + + promise, err := gb(ctx, []cid.Cid{k}) + if err != nil { + return nil, err + } + + select { + case block, ok := <-promise: + if !ok { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + return nil, errors.New("promise channel was closed") + } + } + return block, nil + case <-p.Done(): + return nil, p.Err() + } +} + +// WantFunc is any function that can express a want for set of blocks. +type WantFunc func(context.Context, []cid.Cid) + +// AsyncGetBlocks take a set of block cids, a pubsub channel for incoming +// blocks, a want function, and a close function, +// and returns a channel of incoming blocks. +func AsyncGetBlocks(ctx context.Context, keys []cid.Cid, notif notifications.PubSub, want WantFunc, cwants func([]cid.Cid)) (<-chan blocks.Block, error) { + if len(keys) == 0 { + out := make(chan blocks.Block) + close(out) + return out, nil + } + + remaining := cid.NewSet() + promise := notif.Subscribe(ctx, keys...) + for _, k := range keys { + log.Event(ctx, "Bitswap.GetBlockRequest.Start", k) + remaining.Add(k) + } + + want(ctx, keys) + + out := make(chan blocks.Block) + go handleIncoming(ctx, remaining, promise, out, cwants) + return out, nil +} + +func handleIncoming(ctx context.Context, remaining *cid.Set, in <-chan blocks.Block, out chan blocks.Block, cfun func([]cid.Cid)) { + ctx, cancel := context.WithCancel(ctx) + defer func() { + cancel() + close(out) + // can't just defer this call on its own, arguments are resolved *when* the defer is created + cfun(remaining.Keys()) + }() + for { + select { + case blk, ok := <-in: + if !ok { + return + } + + remaining.Remove(blk.Cid()) + select { + case out <- blk: + case <-ctx.Done(): + return + } + case <-ctx.Done(): + return + } + } +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/message.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/message.go new file mode 100644 index 0000000000..0c4f75f789 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/message.go @@ -0,0 +1,244 @@ +package message + +import ( + "fmt" + "io" + + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + pb "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb" + wantlist "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" +) + +// TODO move message.go into the bitswap package +// TODO move bs/msg/internal/pb to bs/internal/pb and rename pb package to bitswap_pb + +type BitSwapMessage interface { + // Wantlist returns a slice of unique keys that represent data wanted by + // the sender. + Wantlist() []Entry + + // Blocks returns a slice of unique blocks. + Blocks() []blocks.Block + + // AddEntry adds an entry to the Wantlist. + AddEntry(key cid.Cid, priority int) + + Cancel(key cid.Cid) + + Empty() bool + + // A full wantlist is an authoritative copy, a 'non-full' wantlist is a patch-set + Full() bool + + AddBlock(blocks.Block) + Exportable + + Loggable() map[string]interface{} +} + +type Exportable interface { + ToProtoV0() *pb.Message + ToProtoV1() *pb.Message + ToNetV0(w io.Writer) error + ToNetV1(w io.Writer) error +} + +type impl struct { + full bool + wantlist map[cid.Cid]*Entry + blocks map[cid.Cid]blocks.Block +} + +func New(full bool) BitSwapMessage { + return newMsg(full) +} + +func newMsg(full bool) *impl { + return &impl{ + blocks: make(map[cid.Cid]blocks.Block), + wantlist: make(map[cid.Cid]*Entry), + full: full, + } +} + +type Entry struct { + wantlist.Entry + Cancel bool +} + +func newMessageFromProto(pbm pb.Message) (BitSwapMessage, error) { + m := newMsg(pbm.Wantlist.Full) + for _, e := range pbm.Wantlist.Entries { + c, err := cid.Cast([]byte(e.Block)) + if err != nil { + return nil, fmt.Errorf("incorrectly formatted cid in wantlist: %s", err) + } + m.addEntry(c, int(e.Priority), e.Cancel) + } + + // deprecated + for _, d := range pbm.Blocks { + // CIDv0, sha256, protobuf only + b := blocks.NewBlock(d) + m.AddBlock(b) + } + // + + for _, b := range pbm.GetPayload() { + pref, err := cid.PrefixFromBytes(b.GetPrefix()) + if err != nil { + return nil, err + } + + c, err := pref.Sum(b.GetData()) + if err != nil { + return nil, err + } + + blk, err := blocks.NewBlockWithCid(b.GetData(), c) + if err != nil { + return nil, err + } + + m.AddBlock(blk) + } + + return m, nil +} + +func (m *impl) Full() bool { + return m.full +} + +func (m *impl) Empty() bool { + return len(m.blocks) == 0 && len(m.wantlist) == 0 +} + +func (m *impl) Wantlist() []Entry { + out := make([]Entry, 0, len(m.wantlist)) + for _, e := range m.wantlist { + out = append(out, *e) + } + return out +} + +func (m *impl) Blocks() []blocks.Block { + bs := make([]blocks.Block, 0, len(m.blocks)) + for _, block := range m.blocks { + bs = append(bs, block) + } + return bs +} + +func (m *impl) Cancel(k cid.Cid) { + delete(m.wantlist, k) + m.addEntry(k, 0, true) +} + +func (m *impl) AddEntry(k cid.Cid, priority int) { + m.addEntry(k, priority, false) +} + +func (m *impl) addEntry(c cid.Cid, priority int, cancel bool) { + e, exists := m.wantlist[c] + if exists { + e.Priority = priority + e.Cancel = cancel + } else { + m.wantlist[c] = &Entry{ + Entry: wantlist.Entry{ + Cid: c, + Priority: priority, + }, + Cancel: cancel, + } + } +} + +func (m *impl) AddBlock(b blocks.Block) { + m.blocks[b.Cid()] = b +} + +func FromNet(r io.Reader) (BitSwapMessage, error) { + pbr := ggio.NewDelimitedReader(r, inet.MessageSizeMax) + return FromPBReader(pbr) +} + +func FromPBReader(pbr ggio.Reader) (BitSwapMessage, error) { + pb := new(pb.Message) + if err := pbr.ReadMsg(pb); err != nil { + return nil, err + } + + return newMessageFromProto(*pb) +} + +func (m *impl) ToProtoV0() *pb.Message { + pbm := new(pb.Message) + pbm.Wantlist.Entries = make([]pb.Message_Wantlist_Entry, 0, len(m.wantlist)) + for _, e := range m.wantlist { + pbm.Wantlist.Entries = append(pbm.Wantlist.Entries, pb.Message_Wantlist_Entry{ + Block: e.Cid.Bytes(), + Priority: int32(e.Priority), + Cancel: e.Cancel, + }) + } + pbm.Wantlist.Full = m.full + + blocks := m.Blocks() + pbm.Blocks = make([][]byte, 0, len(blocks)) + for _, b := range blocks { + pbm.Blocks = append(pbm.Blocks, b.RawData()) + } + return pbm +} + +func (m *impl) ToProtoV1() *pb.Message { + pbm := new(pb.Message) + pbm.Wantlist.Entries = make([]pb.Message_Wantlist_Entry, 0, len(m.wantlist)) + for _, e := range m.wantlist { + pbm.Wantlist.Entries = append(pbm.Wantlist.Entries, pb.Message_Wantlist_Entry{ + Block: e.Cid.Bytes(), + Priority: int32(e.Priority), + Cancel: e.Cancel, + }) + } + pbm.Wantlist.Full = m.full + + blocks := m.Blocks() + pbm.Payload = make([]pb.Message_Block, 0, len(blocks)) + for _, b := range blocks { + pbm.Payload = append(pbm.Payload, pb.Message_Block{ + Data: b.RawData(), + Prefix: b.Cid().Prefix().Bytes(), + }) + } + return pbm +} + +func (m *impl) ToNetV0(w io.Writer) error { + pbw := ggio.NewDelimitedWriter(w) + + return pbw.WriteMsg(m.ToProtoV0()) +} + +func (m *impl) ToNetV1(w io.Writer) error { + pbw := ggio.NewDelimitedWriter(w) + + return pbw.WriteMsg(m.ToProtoV1()) +} + +func (m *impl) Loggable() map[string]interface{} { + blocks := make([]string, 0, len(m.blocks)) + for _, v := range m.blocks { + blocks = append(blocks, v.Cid().String()) + } + return map[string]interface{}{ + "blocks": blocks, + "wants": m.Wantlist(), + } +} diff --git a/vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/Makefile b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmXVoVfwEXZdG9zNNHE9in55SepeSJM5GSETEyWNSNMygc/go-libp2p-secio/pb/Makefile rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/Makefile diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/message.pb.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/message.pb.go similarity index 80% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/message.pb.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/message.pb.go index 7275fac460..5b7e3bee06 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/message.pb.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/message.pb.go @@ -3,12 +3,13 @@ package bitswap_message_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" -import _ "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto" - -import io "io" +import ( + fmt "fmt" + _ "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -22,18 +23,16 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Message struct { - Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist" json:"wantlist"` - Blocks [][]byte `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"` - Payload []Message_Block `protobuf:"bytes,3,rep,name=payload" json:"payload"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist,proto3" json:"wantlist"` + Blocks [][]byte `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` + Payload []Message_Block `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload"` } func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_message_c28309e4affd853b, []int{0} + return fileDescriptor_33c57e4bae7b9afd, []int{0} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -50,8 +49,8 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(dst, src) +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) } func (m *Message) XXX_Size() int { return m.Size() @@ -84,17 +83,15 @@ func (m *Message) GetPayload() []Message_Block { } type Message_Wantlist struct { - Entries []Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries" json:"entries"` - Full bool `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Entries []Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"` + Full bool `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"` } func (m *Message_Wantlist) Reset() { *m = Message_Wantlist{} } func (m *Message_Wantlist) String() string { return proto.CompactTextString(m) } func (*Message_Wantlist) ProtoMessage() {} func (*Message_Wantlist) Descriptor() ([]byte, []int) { - return fileDescriptor_message_c28309e4affd853b, []int{0, 0} + return fileDescriptor_33c57e4bae7b9afd, []int{0, 0} } func (m *Message_Wantlist) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -111,8 +108,8 @@ func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (dst *Message_Wantlist) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message_Wantlist.Merge(dst, src) +func (m *Message_Wantlist) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Wantlist.Merge(m, src) } func (m *Message_Wantlist) XXX_Size() int { return m.Size() @@ -138,18 +135,16 @@ func (m *Message_Wantlist) GetFull() bool { } type Message_Wantlist_Entry struct { - Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` - Cancel bool `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` + Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` + Cancel bool `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"` } func (m *Message_Wantlist_Entry) Reset() { *m = Message_Wantlist_Entry{} } func (m *Message_Wantlist_Entry) String() string { return proto.CompactTextString(m) } func (*Message_Wantlist_Entry) ProtoMessage() {} func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_message_c28309e4affd853b, []int{0, 0, 0} + return fileDescriptor_33c57e4bae7b9afd, []int{0, 0, 0} } func (m *Message_Wantlist_Entry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -166,8 +161,8 @@ func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (dst *Message_Wantlist_Entry) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message_Wantlist_Entry.Merge(dst, src) +func (m *Message_Wantlist_Entry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Wantlist_Entry.Merge(m, src) } func (m *Message_Wantlist_Entry) XXX_Size() int { return m.Size() @@ -200,17 +195,15 @@ func (m *Message_Wantlist_Entry) GetCancel() bool { } type Message_Block struct { - Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (m *Message_Block) Reset() { *m = Message_Block{} } func (m *Message_Block) String() string { return proto.CompactTextString(m) } func (*Message_Block) ProtoMessage() {} func (*Message_Block) Descriptor() ([]byte, []int) { - return fileDescriptor_message_c28309e4affd853b, []int{0, 1} + return fileDescriptor_33c57e4bae7b9afd, []int{0, 1} } func (m *Message_Block) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -227,8 +220,8 @@ func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (dst *Message_Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message_Block.Merge(dst, src) +func (m *Message_Block) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Block.Merge(m, src) } func (m *Message_Block) XXX_Size() int { return m.Size() @@ -259,6 +252,34 @@ func init() { proto.RegisterType((*Message_Wantlist_Entry)(nil), "bitswap.message.pb.Message.Wantlist.Entry") proto.RegisterType((*Message_Block)(nil), "bitswap.message.pb.Message.Block") } + +func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) } + +var fileDescriptor_33c57e4bae7b9afd = []byte{ + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0xf3, 0x40, + 0x14, 0xc5, 0x33, 0x4d, 0xd3, 0x86, 0xdb, 0x7e, 0x9b, 0xe1, 0x43, 0x86, 0x2c, 0x62, 0x14, 0x17, + 0x41, 0x70, 0x0a, 0xed, 0x13, 0x58, 0xd0, 0x85, 0xe0, 0xc2, 0x6c, 0x5c, 0x4f, 0xd2, 0x34, 0x0e, + 0xa6, 0x99, 0x90, 0x4c, 0xa9, 0x7d, 0x0b, 0x5f, 0xc1, 0x07, 0x71, 0xdf, 0x65, 0x97, 0xae, 0x44, + 0xda, 0x17, 0x91, 0xdc, 0x4e, 0xb3, 0x11, 0xc4, 0xdd, 0x3d, 0xc3, 0x39, 0xbf, 0xfb, 0x67, 0xe0, + 0xdf, 0x22, 0xad, 0x6b, 0x91, 0xa5, 0xbc, 0xac, 0x94, 0x56, 0x94, 0xc6, 0x52, 0xd7, 0x2b, 0x51, + 0xf2, 0xf6, 0x39, 0xf6, 0xae, 0x32, 0xa9, 0x9f, 0x96, 0x31, 0x4f, 0xd4, 0x62, 0x94, 0xa9, 0x4c, + 0x8d, 0xd0, 0x1a, 0x2f, 0xe7, 0xa8, 0x50, 0x60, 0x75, 0x40, 0x9c, 0xbf, 0xd9, 0xd0, 0xbf, 0x3f, + 0xa4, 0xe9, 0x2d, 0xb8, 0x2b, 0x51, 0xe8, 0x5c, 0xd6, 0x9a, 0x91, 0x80, 0x84, 0x83, 0xf1, 0x05, + 0xff, 0xd9, 0x81, 0x1b, 0x3b, 0x7f, 0x34, 0xde, 0x69, 0x77, 0xf3, 0x79, 0x6a, 0x45, 0x6d, 0x96, + 0x9e, 0x40, 0x2f, 0xce, 0x55, 0xf2, 0x5c, 0xb3, 0x4e, 0x60, 0x87, 0xc3, 0xc8, 0x28, 0x7a, 0x0d, + 0xfd, 0x52, 0xac, 0x73, 0x25, 0x66, 0xcc, 0x0e, 0xec, 0x70, 0x30, 0x3e, 0xfb, 0x0d, 0x3f, 0x6d, + 0x42, 0x86, 0x7d, 0xcc, 0x79, 0xef, 0x04, 0xdc, 0x63, 0x5f, 0x7a, 0x07, 0xfd, 0xb4, 0xd0, 0x95, + 0x4c, 0x6b, 0x46, 0x90, 0x77, 0xf9, 0x97, 0x71, 0xf9, 0x4d, 0xa1, 0xab, 0xf5, 0x11, 0x6c, 0x00, + 0x94, 0x42, 0x77, 0xbe, 0xcc, 0x73, 0xd6, 0x09, 0x48, 0xe8, 0x46, 0x58, 0x7b, 0x0f, 0xe0, 0xa0, + 0x97, 0xfe, 0x07, 0x07, 0x57, 0xc0, 0xab, 0x0c, 0xa3, 0x83, 0xa0, 0x1e, 0xb8, 0x65, 0x25, 0x55, + 0x25, 0xf5, 0x1a, 0x63, 0x4e, 0xd4, 0xea, 0xe6, 0x04, 0x89, 0x28, 0x92, 0x34, 0x67, 0x36, 0x02, + 0x8d, 0xf2, 0x26, 0xe0, 0xe0, 0x5e, 0x8d, 0xa1, 0xac, 0xd2, 0xb9, 0x7c, 0x31, 0x4c, 0xa3, 0x9a, + 0x39, 0x66, 0x42, 0x0b, 0x04, 0x0e, 0x23, 0xac, 0xa7, 0x6c, 0xb3, 0xf3, 0xc9, 0x76, 0xe7, 0x93, + 0xaf, 0x9d, 0x4f, 0x5e, 0xf7, 0xbe, 0xb5, 0xdd, 0xfb, 0xd6, 0xc7, 0xde, 0xb7, 0xe2, 0x1e, 0x7e, + 0xe2, 0xe4, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x1d, 0x6e, 0x21, 0x18, 0x02, 0x00, 0x00, +} + func (m *Message) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -424,6 +445,9 @@ func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Message) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Wantlist.Size() @@ -444,6 +468,9 @@ func (m *Message) Size() (n int) { } func (m *Message_Wantlist) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Entries) > 0 { @@ -459,6 +486,9 @@ func (m *Message_Wantlist) Size() (n int) { } func (m *Message_Wantlist_Entry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Block) @@ -475,6 +505,9 @@ func (m *Message_Wantlist_Entry) Size() (n int) { } func (m *Message_Block) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Prefix) @@ -516,7 +549,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -544,7 +577,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -553,6 +586,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -574,7 +610,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -583,6 +619,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -603,7 +642,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -612,6 +651,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -629,6 +671,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMessage } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -656,7 +701,7 @@ func (m *Message_Wantlist) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -684,7 +729,7 @@ func (m *Message_Wantlist) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -693,6 +738,9 @@ func (m *Message_Wantlist) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -715,7 +763,7 @@ func (m *Message_Wantlist) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -730,6 +778,9 @@ func (m *Message_Wantlist) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMessage } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -757,7 +808,7 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -785,7 +836,7 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -794,6 +845,9 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -816,7 +870,7 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Priority |= (int32(b) & 0x7F) << shift + m.Priority |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -835,7 +889,7 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -850,6 +904,9 @@ func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMessage } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -877,7 +934,7 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -905,7 +962,7 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -914,6 +971,9 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -936,7 +996,7 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -945,6 +1005,9 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMessage } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -962,6 +1025,9 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMessage } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1028,10 +1094,13 @@ func skipMessage(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMessage } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } return iNdEx, nil case 3: for { @@ -1060,6 +1129,9 @@ func skipMessage(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } } return iNdEx, nil case 4: @@ -1078,30 +1150,3 @@ var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("message.proto", fileDescriptor_message_c28309e4affd853b) } - -var fileDescriptor_message_c28309e4affd853b = []byte{ - // 328 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0xf3, 0x40, - 0x14, 0xc5, 0x3b, 0x4d, 0xd3, 0x86, 0xdb, 0x7e, 0xf0, 0x31, 0x88, 0x84, 0x2c, 0x62, 0x14, 0x17, - 0x41, 0x70, 0x0a, 0xed, 0x13, 0x58, 0xd0, 0x85, 0xe0, 0xc2, 0x6c, 0x5c, 0x4f, 0xd2, 0x34, 0x0e, - 0xa6, 0x99, 0x30, 0x33, 0xa5, 0xf6, 0x2d, 0x7c, 0x05, 0x1f, 0xc4, 0x7d, 0x97, 0x3e, 0x81, 0x48, - 0x7d, 0x11, 0xc9, 0xed, 0x34, 0x1b, 0x41, 0xdc, 0xdd, 0x33, 0x9c, 0xf3, 0xbb, 0x7f, 0x06, 0xfe, - 0x2d, 0x73, 0xad, 0x79, 0x91, 0xb3, 0x5a, 0x49, 0x23, 0x29, 0x4d, 0x85, 0xd1, 0x6b, 0x5e, 0xb3, - 0xf6, 0x39, 0x0d, 0x2e, 0x0b, 0x61, 0x1e, 0x57, 0x29, 0xcb, 0xe4, 0x72, 0x5c, 0xc8, 0x42, 0x8e, - 0xd1, 0x9a, 0xae, 0x16, 0xa8, 0x50, 0x60, 0xb5, 0x47, 0x9c, 0xbd, 0x3a, 0x30, 0xb8, 0xdb, 0xa7, - 0xe9, 0x0d, 0x78, 0x6b, 0x5e, 0x99, 0x52, 0x68, 0xe3, 0x93, 0x88, 0xc4, 0xc3, 0xc9, 0x39, 0xfb, - 0xd9, 0x81, 0x59, 0x3b, 0x7b, 0xb0, 0xde, 0x59, 0x6f, 0xfb, 0x71, 0xd2, 0x49, 0xda, 0x2c, 0x3d, - 0x86, 0x7e, 0x5a, 0xca, 0xec, 0x49, 0xfb, 0xdd, 0xc8, 0x89, 0x47, 0x89, 0x55, 0xf4, 0x0a, 0x06, - 0x35, 0xdf, 0x94, 0x92, 0xcf, 0x7d, 0x27, 0x72, 0xe2, 0xe1, 0xe4, 0xf4, 0x37, 0xfc, 0xac, 0x09, - 0x59, 0xf6, 0x21, 0x17, 0xbc, 0x11, 0xf0, 0x0e, 0x7d, 0xe9, 0x2d, 0x0c, 0xf2, 0xca, 0x28, 0x91, - 0x6b, 0x9f, 0x20, 0xef, 0xe2, 0x2f, 0xe3, 0xb2, 0xeb, 0xca, 0xa8, 0xcd, 0x01, 0x6c, 0x01, 0x94, - 0x42, 0x6f, 0xb1, 0x2a, 0x4b, 0xbf, 0x1b, 0x91, 0xd8, 0x4b, 0xb0, 0x0e, 0xee, 0xc1, 0x45, 0x2f, - 0x3d, 0x02, 0x17, 0x57, 0xc0, 0xab, 0x8c, 0x92, 0xbd, 0xa0, 0x01, 0x78, 0xb5, 0x12, 0x52, 0x09, - 0xb3, 0xc1, 0x98, 0x9b, 0xb4, 0xba, 0x39, 0x41, 0xc6, 0xab, 0x2c, 0x2f, 0x7d, 0x07, 0x81, 0x56, - 0x05, 0x53, 0x70, 0x71, 0xaf, 0xc6, 0x50, 0xab, 0x7c, 0x21, 0x9e, 0x2d, 0xd3, 0xaa, 0x66, 0x8e, - 0x39, 0x37, 0x1c, 0x81, 0xa3, 0x04, 0xeb, 0xd9, 0xff, 0xed, 0x2e, 0x24, 0xef, 0xbb, 0x90, 0x7c, - 0xee, 0x42, 0xf2, 0xf2, 0x15, 0x76, 0xd2, 0x3e, 0x7e, 0xde, 0xf4, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0xd1, 0x6a, 0x3a, 0xa2, 0x10, 0x02, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/message.proto b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/message.proto similarity index 100% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message/pb/message.proto rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message/pb/message.proto diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/messagequeue/messagequeue.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/messagequeue/messagequeue.go new file mode 100644 index 0000000000..79d1a368de --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/messagequeue/messagequeue.go @@ -0,0 +1,282 @@ +package messagequeue + +import ( + "context" + "sync" + "time" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + wantlist "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" +) + +var log = logging.Logger("bitswap") + +const maxRetries = 10 + +// MessageNetwork is any network that can connect peers and generate a message +// sender. +type MessageNetwork interface { + ConnectTo(context.Context, peer.ID) error + NewMessageSender(context.Context, peer.ID) (bsnet.MessageSender, error) +} + +type request interface { + handle(mq *MessageQueue) +} + +// MessageQueue implements queue of want messages to send to peers. +type MessageQueue struct { + ctx context.Context + p peer.ID + network MessageNetwork + + newRequests chan request + outgoingMessages chan bsmsg.BitSwapMessage + done chan struct{} + + // do not touch out of run loop + wl *wantlist.SessionTrackedWantlist + nextMessage bsmsg.BitSwapMessage + sender bsnet.MessageSender +} + +type messageRequest struct { + entries []bsmsg.Entry + ses uint64 +} + +type wantlistRequest struct { + wl *wantlist.SessionTrackedWantlist +} + +// New creats a new MessageQueue. +func New(ctx context.Context, p peer.ID, network MessageNetwork) *MessageQueue { + return &MessageQueue{ + ctx: ctx, + wl: wantlist.NewSessionTrackedWantlist(), + network: network, + p: p, + newRequests: make(chan request, 16), + outgoingMessages: make(chan bsmsg.BitSwapMessage), + done: make(chan struct{}), + } +} + +// AddMessage adds new entries to an outgoing message for a given session. +func (mq *MessageQueue) AddMessage(entries []bsmsg.Entry, ses uint64) { + select { + case mq.newRequests <- newMessageRequest(entries, ses): + case <-mq.ctx.Done(): + } +} + +// AddWantlist adds a complete session tracked want list to a message queue +func (mq *MessageQueue) AddWantlist(initialWants *wantlist.SessionTrackedWantlist) { + wl := wantlist.NewSessionTrackedWantlist() + initialWants.CopyWants(wl) + + select { + case mq.newRequests <- &wantlistRequest{wl}: + case <-mq.ctx.Done(): + } +} + +// Startup starts the processing of messages, and creates an initial message +// based on the given initial wantlist. +func (mq *MessageQueue) Startup() { + go mq.runQueue() + go mq.sendMessages() +} + +// Shutdown stops the processing of messages for a message queue. +func (mq *MessageQueue) Shutdown() { + close(mq.done) +} + +func (mq *MessageQueue) runQueue() { + outgoingMessages := func() chan bsmsg.BitSwapMessage { + if mq.nextMessage == nil { + return nil + } + return mq.outgoingMessages + } + + for { + select { + case newRequest := <-mq.newRequests: + newRequest.handle(mq) + case outgoingMessages() <- mq.nextMessage: + mq.nextMessage = nil + case <-mq.done: + if mq.sender != nil { + mq.sender.Close() + } + return + case <-mq.ctx.Done(): + if mq.sender != nil { + mq.sender.Reset() + } + return + } + } +} + +// We allocate a bunch of these so use a pool. +var messageRequestPool = sync.Pool{ + New: func() interface{} { + return new(messageRequest) + }, +} + +func newMessageRequest(entries []bsmsg.Entry, session uint64) *messageRequest { + mr := messageRequestPool.Get().(*messageRequest) + mr.entries = entries + mr.ses = session + return mr +} + +func returnMessageRequest(mr *messageRequest) { + *mr = messageRequest{} + messageRequestPool.Put(mr) +} + +func (mr *messageRequest) handle(mq *MessageQueue) { + mq.addEntries(mr.entries, mr.ses) + returnMessageRequest(mr) +} + +func (wr *wantlistRequest) handle(mq *MessageQueue) { + initialWants := wr.wl + initialWants.CopyWants(mq.wl) + if initialWants.Len() > 0 { + if mq.nextMessage == nil { + mq.nextMessage = bsmsg.New(false) + } + for _, e := range initialWants.Entries() { + mq.nextMessage.AddEntry(e.Cid, e.Priority) + } + } +} + +func (mq *MessageQueue) addEntries(entries []bsmsg.Entry, ses uint64) { + for _, e := range entries { + if e.Cancel { + if mq.wl.Remove(e.Cid, ses) { + if mq.nextMessage == nil { + mq.nextMessage = bsmsg.New(false) + } + mq.nextMessage.Cancel(e.Cid) + } + } else { + if mq.wl.Add(e.Cid, e.Priority, ses) { + if mq.nextMessage == nil { + mq.nextMessage = bsmsg.New(false) + } + mq.nextMessage.AddEntry(e.Cid, e.Priority) + } + } + } +} + +func (mq *MessageQueue) sendMessages() { + for { + select { + case nextMessage := <-mq.outgoingMessages: + mq.sendMessage(nextMessage) + case <-mq.done: + return + case <-mq.ctx.Done(): + return + } + } +} + +func (mq *MessageQueue) sendMessage(message bsmsg.BitSwapMessage) { + + err := mq.initializeSender() + if err != nil { + log.Infof("cant open message sender to peer %s: %s", mq.p, err) + // TODO: cant connect, what now? + return + } + + for i := 0; i < maxRetries; i++ { // try to send this message until we fail. + if mq.attemptSendAndRecovery(message) { + return + } + } +} + +func (mq *MessageQueue) initializeSender() error { + if mq.sender != nil { + return nil + } + nsender, err := openSender(mq.ctx, mq.network, mq.p) + if err != nil { + return err + } + mq.sender = nsender + return nil +} + +func (mq *MessageQueue) attemptSendAndRecovery(message bsmsg.BitSwapMessage) bool { + err := mq.sender.SendMsg(mq.ctx, message) + if err == nil { + return true + } + + log.Infof("bitswap send error: %s", err) + mq.sender.Reset() + mq.sender = nil + + select { + case <-mq.done: + return true + case <-mq.ctx.Done(): + return true + case <-time.After(time.Millisecond * 100): + // wait 100ms in case disconnect notifications are still propogating + log.Warning("SendMsg errored but neither 'done' nor context.Done() were set") + } + + err = mq.initializeSender() + if err != nil { + log.Infof("couldnt open sender again after SendMsg(%s) failed: %s", mq.p, err) + // TODO(why): what do we do now? + // I think the *right* answer is to probably put the message we're + // trying to send back, and then return to waiting for new work or + // a disconnect. + return true + } + + // TODO: Is this the same instance for the remote peer? + // If its not, we should resend our entire wantlist to them + /* + if mq.sender.InstanceID() != mq.lastSeenInstanceID { + wlm = mq.getFullWantlistMessage() + } + */ + return false +} + +func openSender(ctx context.Context, network MessageNetwork, p peer.ID) (bsnet.MessageSender, error) { + // allow ten minutes for connections this includes looking them up in the + // dht dialing them, and handshaking + conctx, cancel := context.WithTimeout(ctx, time.Minute*10) + defer cancel() + + err := network.ConnectTo(conctx, p) + if err != nil { + return nil, err + } + + nsender, err := network.NewMessageSender(ctx, p) + if err != nil { + return nil, err + } + + return nsender, nil +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/interface.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/interface.go new file mode 100644 index 0000000000..5247b6e6a1 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/interface.go @@ -0,0 +1,80 @@ +package network + +import ( + "context" + + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" +) + +var ( + // These two are equivalent, legacy + ProtocolBitswapOne protocol.ID = "/ipfs/bitswap/1.0.0" + ProtocolBitswapNoVers protocol.ID = "/ipfs/bitswap" + + ProtocolBitswap protocol.ID = "/ipfs/bitswap/1.1.0" +) + +// BitSwapNetwork provides network connectivity for BitSwap sessions. +type BitSwapNetwork interface { + + // SendMessage sends a BitSwap message to a peer. + SendMessage( + context.Context, + peer.ID, + bsmsg.BitSwapMessage) error + + // SetDelegate registers the Reciver to handle messages received from the + // network. + SetDelegate(Receiver) + + ConnectTo(context.Context, peer.ID) error + + NewMessageSender(context.Context, peer.ID) (MessageSender, error) + + ConnectionManager() ifconnmgr.ConnManager + + Stats() NetworkStats + + Routing +} + +type MessageSender interface { + SendMsg(context.Context, bsmsg.BitSwapMessage) error + Close() error + Reset() error +} + +// Implement Receiver to receive messages from the BitSwapNetwork. +type Receiver interface { + ReceiveMessage( + ctx context.Context, + sender peer.ID, + incoming bsmsg.BitSwapMessage) + + ReceiveError(error) + + // Connected/Disconnected warns bitswap about peer connections. + PeerConnected(peer.ID) + PeerDisconnected(peer.ID) +} + +type Routing interface { + // FindProvidersAsync returns a channel of providers for the given key. + FindProvidersAsync(context.Context, cid.Cid, int) <-chan peer.ID + + // Provide provides the key to the network. + Provide(context.Context, cid.Cid) error +} + +// NetworkStats is a container for statistics about the bitswap network +// the numbers inside are specific to bitswap, and not any other protocols +// using the same underlying network. +type NetworkStats struct { + MessagesSent uint64 + MessagesRecvd uint64 +} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/ipfs_impl.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/ipfs_impl.go similarity index 79% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/ipfs_impl.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/ipfs_impl.go index 17bac78116..c72fa5a24f 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/network/ipfs_impl.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network/ipfs_impl.go @@ -5,27 +5,28 @@ import ( "context" "fmt" "io" + "sync/atomic" "time" - bsmsg "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/message" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - ifconnmgr "gx/ipfs/QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ/go-libp2p-interface-connmgr" - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - host "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" - ggio "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" ) var log = logging.Logger("bitswap_network") var sendMessageTimeout = time.Minute * 10 -// NewFromIpfsHost returns a BitSwapNetwork supported by underlying IPFS host +// NewFromIpfsHost returns a BitSwapNetwork supported by underlying IPFS host. func NewFromIpfsHost(host host.Host, r routing.ContentRouting) BitSwapNetwork { bitswapNetwork := impl{ host: host, @@ -48,6 +49,8 @@ type impl struct { // inbound messages from the network are forwarded to the receiver receiver Receiver + + stats NetworkStats } type streamMessageSender struct { @@ -130,6 +133,8 @@ func (bsnet *impl) SendMessage( s.Reset() return err } + atomic.AddUint64(&bsnet.stats.MessagesSent, 1) + // TODO(https://github.com/libp2p/go-libp2p-net/issues/28): Avoid this goroutine. go inet.AwaitEOF(s) return s.Close() @@ -144,24 +149,9 @@ func (bsnet *impl) ConnectTo(ctx context.Context, p peer.ID) error { return bsnet.host.Connect(ctx, pstore.PeerInfo{ID: p}) } -// FindProvidersAsync returns a channel of providers for the given key +// FindProvidersAsync returns a channel of providers for the given key. func (bsnet *impl) FindProvidersAsync(ctx context.Context, k cid.Cid, max int) <-chan peer.ID { - - // Since routing queries are expensive, give bitswap the peers to which we - // have open connections. Note that this may cause issues if bitswap starts - // precisely tracking which peers provide certain keys. This optimization - // would be misleading. In the long run, this may not be the most - // appropriate place for this optimization, but it won't cause any harm in - // the short term. - connectedPeers := bsnet.host.Network().Peers() - out := make(chan peer.ID, len(connectedPeers)) // just enough buffer for these connectedPeers - for _, id := range connectedPeers { - if id == bsnet.host.ID() { - continue // ignore self as provider - } - out <- id - } - + out := make(chan peer.ID, max) go func() { defer close(out) providers := bsnet.routing.FindProvidersAsync(ctx, k, max) @@ -210,6 +200,7 @@ func (bsnet *impl) handleNewStream(s inet.Stream) { ctx := context.Background() log.Debugf("bitswap net handleNewStream from %s", s.Conn().RemotePeer()) bsnet.receiver.ReceiveMessage(ctx, p, received) + atomic.AddUint64(&bsnet.stats.MessagesRecvd, 1) } } @@ -217,6 +208,13 @@ func (bsnet *impl) ConnectionManager() ifconnmgr.ConnManager { return bsnet.host.ConnManager() } +func (bsnet *impl) Stats() NetworkStats { + return NetworkStats{ + MessagesRecvd: atomic.LoadUint64(&bsnet.stats.MessagesRecvd), + MessagesSent: atomic.LoadUint64(&bsnet.stats.MessagesSent), + } +} + type netNotifiee impl func (nn *netNotifiee) impl() *impl { diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications/notifications.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications/notifications.go new file mode 100644 index 0000000000..ec9e90719d --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications/notifications.go @@ -0,0 +1,131 @@ +package notifications + +import ( + "context" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + pubsub "gx/ipfs/QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2/pubsub" +) + +const bufferSize = 16 + +type PubSub interface { + Publish(block blocks.Block) + Subscribe(ctx context.Context, keys ...cid.Cid) <-chan blocks.Block + Shutdown() +} + +func New() PubSub { + return &impl{ + wrapped: *pubsub.New(bufferSize), + closed: make(chan struct{}), + } +} + +type impl struct { + lk sync.RWMutex + wrapped pubsub.PubSub + + closed chan struct{} +} + +func (ps *impl) Publish(block blocks.Block) { + ps.lk.RLock() + defer ps.lk.RUnlock() + select { + case <-ps.closed: + return + default: + } + + ps.wrapped.Pub(block, block.Cid().KeyString()) +} + +func (ps *impl) Shutdown() { + ps.lk.Lock() + defer ps.lk.Unlock() + select { + case <-ps.closed: + return + default: + } + close(ps.closed) + ps.wrapped.Shutdown() +} + +// Subscribe returns a channel of blocks for the given |keys|. |blockChannel| +// is closed if the |ctx| times out or is cancelled, or after sending len(keys) +// blocks. +func (ps *impl) Subscribe(ctx context.Context, keys ...cid.Cid) <-chan blocks.Block { + + blocksCh := make(chan blocks.Block, len(keys)) + valuesCh := make(chan interface{}, len(keys)) // provide our own channel to control buffer, prevent blocking + if len(keys) == 0 { + close(blocksCh) + return blocksCh + } + + // prevent shutdown + ps.lk.RLock() + defer ps.lk.RUnlock() + + select { + case <-ps.closed: + close(blocksCh) + return blocksCh + default: + } + + ps.wrapped.AddSubOnceEach(valuesCh, toStrings(keys)...) + go func() { + defer func() { + close(blocksCh) + + ps.lk.RLock() + defer ps.lk.RUnlock() + // Don't touch the pubsub instance if we're + // already closed. + select { + case <-ps.closed: + return + default: + } + + ps.wrapped.Unsub(valuesCh) + }() + + for { + select { + case <-ctx.Done(): + return + case <-ps.closed: + case val, ok := <-valuesCh: + if !ok { + return + } + block, ok := val.(blocks.Block) + if !ok { + return + } + select { + case <-ctx.Done(): + return + case blocksCh <- block: // continue + case <-ps.closed: + } + } + } + }() + + return blocksCh +} + +func toStrings(keys []cid.Cid) []string { + strs := make([]string, 0, len(keys)) + for _, key := range keys { + strs = append(strs, key.KeyString()) + } + return strs +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/package.json b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/package.json new file mode 100644 index 0000000000..e67984f951 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/package.json @@ -0,0 +1,196 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-bitswap" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-bitswap" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + }, + { + "author": "hsanjuan", + "hash": "QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ", + "name": "go-ipfs-routing", + "version": "0.1.18" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "stebalien", + "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", + "name": "go-block-format", + "version": "0.2.2" + }, + { + "author": "ipfs", + "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", + "name": "go-metrics-interface", + "version": "0.2.0" + }, + { + "author": "why", + "hash": "QmdbxjQWogRCHRaxhhGnYdT1oQJzL9GdqSKzCdqWr85AP2", + "name": "pubsub", + "version": "1.0.0" + }, + { + "author": "hsanjuan", + "hash": "QmZUbTDJ39JpvtFCSubiWeUTQRvMA1tVE5RZCJrY4oeAsC", + "name": "go-ipfs-pq", + "version": "0.0.1" + }, + { + "author": "hsanjuan", + "hash": "QmcbQ44AgbtV1rnxZz5RsRVduxdgNYLANxnsuW5wvvu4ts", + "name": "go-ipfs-blocksutil", + "version": "0.1.2" + }, + { + "author": "hsanjuan", + "hash": "QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA", + "name": "go-ipfs-blockstore", + "version": "0.1.8" + }, + { + "author": "hector", + "hash": "QmRMGdC6HKdLsPDABL9aXPDidrpmEHzJqFWSvshkbn9Hj8", + "name": "go-ipfs-flags", + "version": "0.0.1" + }, + { + "author": "hsanjuan", + "hash": "QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg", + "name": "go-ipfs-exchange-interface", + "version": "0.1.3" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "hsanjuan", + "hash": "QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq", + "name": "go-ipfs-delay", + "version": "0.1.0" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "author": "hashicorp", + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + }, + { + "author": "whyrusleeping", + "hash": "QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j", + "name": "go-libp2p-netutil", + "version": "0.4.23" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", + "name": "go-libp2p-loggables", + "version": "1.1.33" + }, + { + "author": "why", + "hash": "QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd", + "name": "go-libp2p-interface-connmgr", + "version": "0.0.32" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "jbenet", + "hash": "Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF", + "name": "go-detect-race", + "version": "1.0.1" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-bitswap", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.29" +} + diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/peermanager/peermanager.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/peermanager/peermanager.go new file mode 100644 index 0000000000..f663bd4af3 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/peermanager/peermanager.go @@ -0,0 +1,137 @@ +package peermanager + +import ( + "context" + "sync" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + wantlist "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +var log = logging.Logger("bitswap") + +var ( + metricsBuckets = []float64{1 << 6, 1 << 10, 1 << 14, 1 << 18, 1<<18 + 15, 1 << 22} +) + +// PeerQueue provides a queer of messages to be sent for a single peer. +type PeerQueue interface { + AddMessage(entries []bsmsg.Entry, ses uint64) + Startup() + AddWantlist(initialWants *wantlist.SessionTrackedWantlist) + Shutdown() +} + +// PeerQueueFactory provides a function that will create a PeerQueue. +type PeerQueueFactory func(ctx context.Context, p peer.ID) PeerQueue + +type peerMessage interface { + handle(pm *PeerManager) +} + +type peerQueueInstance struct { + refcnt int + pq PeerQueue +} + +// PeerManager manages a pool of peers and sends messages to peers in the pool. +type PeerManager struct { + // peerQueues -- interact through internal utility functions get/set/remove/iterate + peerQueues map[peer.ID]*peerQueueInstance + peerQueuesLk sync.RWMutex + + createPeerQueue PeerQueueFactory + ctx context.Context +} + +// New creates a new PeerManager, given a context and a peerQueueFactory. +func New(ctx context.Context, createPeerQueue PeerQueueFactory) *PeerManager { + return &PeerManager{ + peerQueues: make(map[peer.ID]*peerQueueInstance), + createPeerQueue: createPeerQueue, + ctx: ctx, + } +} + +// ConnectedPeers returns a list of peers this PeerManager is managing. +func (pm *PeerManager) ConnectedPeers() []peer.ID { + pm.peerQueuesLk.RLock() + defer pm.peerQueuesLk.RUnlock() + peers := make([]peer.ID, 0, len(pm.peerQueues)) + for p := range pm.peerQueues { + peers = append(peers, p) + } + return peers +} + +// Connected is called to add a new peer to the pool, and send it an initial set +// of wants. +func (pm *PeerManager) Connected(p peer.ID, initialWants *wantlist.SessionTrackedWantlist) { + pm.peerQueuesLk.Lock() + + pq := pm.getOrCreate(p) + + if pq.refcnt == 0 { + pq.pq.AddWantlist(initialWants) + } + + pq.refcnt++ + + pm.peerQueuesLk.Unlock() +} + +// Disconnected is called to remove a peer from the pool. +func (pm *PeerManager) Disconnected(p peer.ID) { + pm.peerQueuesLk.Lock() + pq, ok := pm.peerQueues[p] + + if !ok { + pm.peerQueuesLk.Unlock() + return + } + + pq.refcnt-- + if pq.refcnt > 0 { + pm.peerQueuesLk.Unlock() + return + } + + delete(pm.peerQueues, p) + pm.peerQueuesLk.Unlock() + + pq.pq.Shutdown() + +} + +// SendMessage is called to send a message to all or some peers in the pool; +// if targets is nil, it sends to all. +func (pm *PeerManager) SendMessage(entries []bsmsg.Entry, targets []peer.ID, from uint64) { + if len(targets) == 0 { + pm.peerQueuesLk.RLock() + for _, p := range pm.peerQueues { + p.pq.AddMessage(entries, from) + } + pm.peerQueuesLk.RUnlock() + } else { + for _, t := range targets { + pm.peerQueuesLk.Lock() + pqi := pm.getOrCreate(t) + pm.peerQueuesLk.Unlock() + pqi.pq.AddMessage(entries, from) + } + } +} + +func (pm *PeerManager) getOrCreate(p peer.ID) *peerQueueInstance { + pqi, ok := pm.peerQueues[p] + if !ok { + pq := pm.createPeerQueue(pm.ctx, p) + pq.Startup() + pqi = &peerQueueInstance{0, pq} + pm.peerQueues[p] = pqi + } + return pqi +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/providerquerymanager/providerquerymanager.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/providerquerymanager/providerquerymanager.go new file mode 100644 index 0000000000..53a445244e --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/providerquerymanager/providerquerymanager.go @@ -0,0 +1,423 @@ +package providerquerymanager + +import ( + "context" + "fmt" + "sync" + "time" + + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("bitswap") + +const ( + maxProviders = 10 + maxInProcessRequests = 6 + defaultTimeout = 10 * time.Second +) + +type inProgressRequestStatus struct { + ctx context.Context + cancelFn func() + providersSoFar []peer.ID + listeners map[chan peer.ID]struct{} +} + +type findProviderRequest struct { + k cid.Cid + ctx context.Context +} + +// ProviderQueryNetwork is an interface for finding providers and connecting to +// peers. +type ProviderQueryNetwork interface { + ConnectTo(context.Context, peer.ID) error + FindProvidersAsync(context.Context, cid.Cid, int) <-chan peer.ID +} + +type providerQueryMessage interface { + debugMessage() string + handle(pqm *ProviderQueryManager) +} + +type receivedProviderMessage struct { + k cid.Cid + p peer.ID +} + +type finishedProviderQueryMessage struct { + k cid.Cid +} + +type newProvideQueryMessage struct { + k cid.Cid + inProgressRequestChan chan<- inProgressRequest +} + +type cancelRequestMessage struct { + incomingProviders chan peer.ID + k cid.Cid +} + +// ProviderQueryManager manages requests to find more providers for blocks +// for bitswap sessions. It's main goals are to: +// - rate limit requests -- don't have too many find provider calls running +// simultaneously +// - connect to found peers and filter them if it can't connect +// - ensure two findprovider calls for the same block don't run concurrently +// - manage timeouts +type ProviderQueryManager struct { + ctx context.Context + network ProviderQueryNetwork + providerQueryMessages chan providerQueryMessage + providerRequestsProcessing chan *findProviderRequest + incomingFindProviderRequests chan *findProviderRequest + + findProviderTimeout time.Duration + timeoutMutex sync.RWMutex + + // do not touch outside the run loop + inProgressRequestStatuses map[cid.Cid]*inProgressRequestStatus +} + +// New initializes a new ProviderQueryManager for a given context and a given +// network provider. +func New(ctx context.Context, network ProviderQueryNetwork) *ProviderQueryManager { + return &ProviderQueryManager{ + ctx: ctx, + network: network, + providerQueryMessages: make(chan providerQueryMessage, 16), + providerRequestsProcessing: make(chan *findProviderRequest), + incomingFindProviderRequests: make(chan *findProviderRequest), + inProgressRequestStatuses: make(map[cid.Cid]*inProgressRequestStatus), + findProviderTimeout: defaultTimeout, + } +} + +// Startup starts processing for the ProviderQueryManager. +func (pqm *ProviderQueryManager) Startup() { + go pqm.run() +} + +type inProgressRequest struct { + providersSoFar []peer.ID + incoming chan peer.ID +} + +// SetFindProviderTimeout changes the timeout for finding providers +func (pqm *ProviderQueryManager) SetFindProviderTimeout(findProviderTimeout time.Duration) { + pqm.timeoutMutex.Lock() + pqm.findProviderTimeout = findProviderTimeout + pqm.timeoutMutex.Unlock() +} + +// FindProvidersAsync finds providers for the given block. +func (pqm *ProviderQueryManager) FindProvidersAsync(sessionCtx context.Context, k cid.Cid) <-chan peer.ID { + inProgressRequestChan := make(chan inProgressRequest) + + select { + case pqm.providerQueryMessages <- &newProvideQueryMessage{ + k: k, + inProgressRequestChan: inProgressRequestChan, + }: + case <-pqm.ctx.Done(): + ch := make(chan peer.ID) + close(ch) + return ch + case <-sessionCtx.Done(): + ch := make(chan peer.ID) + close(ch) + return ch + } + + // DO NOT select on sessionCtx. We only want to abort here if we're + // shutting down because we can't actually _cancel_ the request till we + // get to receiveProviders. + var receivedInProgressRequest inProgressRequest + select { + case <-pqm.ctx.Done(): + ch := make(chan peer.ID) + close(ch) + return ch + case receivedInProgressRequest = <-inProgressRequestChan: + } + + return pqm.receiveProviders(sessionCtx, k, receivedInProgressRequest) +} + +func (pqm *ProviderQueryManager) receiveProviders(sessionCtx context.Context, k cid.Cid, receivedInProgressRequest inProgressRequest) <-chan peer.ID { + // maintains an unbuffered queue for incoming providers for given request for a given session + // essentially, as a provider comes in, for a given CID, we want to immediately broadcast to all + // sessions that queried that CID, without worrying about whether the client code is actually + // reading from the returned channel -- so that the broadcast never blocks + // based on: https://medium.com/capital-one-tech/building-an-unbounded-channel-in-go-789e175cd2cd + returnedProviders := make(chan peer.ID) + receivedProviders := append([]peer.ID(nil), receivedInProgressRequest.providersSoFar[0:]...) + incomingProviders := receivedInProgressRequest.incoming + + go func() { + defer close(returnedProviders) + outgoingProviders := func() chan<- peer.ID { + if len(receivedProviders) == 0 { + return nil + } + return returnedProviders + } + nextProvider := func() peer.ID { + if len(receivedProviders) == 0 { + return "" + } + return receivedProviders[0] + } + for len(receivedProviders) > 0 || incomingProviders != nil { + select { + case <-pqm.ctx.Done(): + return + case <-sessionCtx.Done(): + if incomingProviders != nil { + pqm.cancelProviderRequest(k, incomingProviders) + } + return + case provider, ok := <-incomingProviders: + if !ok { + incomingProviders = nil + } else { + receivedProviders = append(receivedProviders, provider) + } + case outgoingProviders() <- nextProvider(): + receivedProviders = receivedProviders[1:] + } + } + }() + return returnedProviders +} + +func (pqm *ProviderQueryManager) cancelProviderRequest(k cid.Cid, incomingProviders chan peer.ID) { + cancelMessageChannel := pqm.providerQueryMessages + for { + select { + case cancelMessageChannel <- &cancelRequestMessage{ + incomingProviders: incomingProviders, + k: k, + }: + cancelMessageChannel = nil + // clear out any remaining providers, in case and "incoming provider" + // messages get processed before our cancel message + case _, ok := <-incomingProviders: + if !ok { + return + } + case <-pqm.ctx.Done(): + return + } + } +} + +func (pqm *ProviderQueryManager) findProviderWorker() { + // findProviderWorker just cycles through incoming provider queries one + // at a time. We have six of these workers running at once + // to let requests go in parallel but keep them rate limited + for { + select { + case fpr, ok := <-pqm.providerRequestsProcessing: + if !ok { + return + } + k := fpr.k + log.Debugf("Beginning Find Provider Request for cid: %s", k.String()) + pqm.timeoutMutex.RLock() + findProviderCtx, cancel := context.WithTimeout(fpr.ctx, pqm.findProviderTimeout) + pqm.timeoutMutex.RUnlock() + providers := pqm.network.FindProvidersAsync(findProviderCtx, k, maxProviders) + wg := &sync.WaitGroup{} + for p := range providers { + wg.Add(1) + go func(p peer.ID) { + defer wg.Done() + err := pqm.network.ConnectTo(findProviderCtx, p) + if err != nil { + log.Debugf("failed to connect to provider %s: %s", p, err) + return + } + select { + case pqm.providerQueryMessages <- &receivedProviderMessage{ + k: k, + p: p, + }: + case <-pqm.ctx.Done(): + return + } + }(p) + } + cancel() + wg.Wait() + select { + case pqm.providerQueryMessages <- &finishedProviderQueryMessage{ + k: k, + }: + case <-pqm.ctx.Done(): + } + case <-pqm.ctx.Done(): + return + } + } +} + +func (pqm *ProviderQueryManager) providerRequestBufferWorker() { + // the provider request buffer worker just maintains an unbounded + // buffer for incoming provider queries and dispatches to the find + // provider workers as they become available + // based on: https://medium.com/capital-one-tech/building-an-unbounded-channel-in-go-789e175cd2cd + var providerQueryRequestBuffer []*findProviderRequest + nextProviderQuery := func() *findProviderRequest { + if len(providerQueryRequestBuffer) == 0 { + return nil + } + return providerQueryRequestBuffer[0] + } + outgoingRequests := func() chan<- *findProviderRequest { + if len(providerQueryRequestBuffer) == 0 { + return nil + } + return pqm.providerRequestsProcessing + } + + for { + select { + case incomingRequest, ok := <-pqm.incomingFindProviderRequests: + if !ok { + return + } + providerQueryRequestBuffer = append(providerQueryRequestBuffer, incomingRequest) + case outgoingRequests() <- nextProviderQuery(): + providerQueryRequestBuffer = providerQueryRequestBuffer[1:] + case <-pqm.ctx.Done(): + return + } + } +} + +func (pqm *ProviderQueryManager) cleanupInProcessRequests() { + for _, requestStatus := range pqm.inProgressRequestStatuses { + for listener := range requestStatus.listeners { + close(listener) + } + requestStatus.cancelFn() + } +} + +func (pqm *ProviderQueryManager) run() { + defer pqm.cleanupInProcessRequests() + + go pqm.providerRequestBufferWorker() + for i := 0; i < maxInProcessRequests; i++ { + go pqm.findProviderWorker() + } + + for { + select { + case nextMessage := <-pqm.providerQueryMessages: + log.Debug(nextMessage.debugMessage()) + nextMessage.handle(pqm) + case <-pqm.ctx.Done(): + return + } + } +} + +func (rpm *receivedProviderMessage) debugMessage() string { + return fmt.Sprintf("Received provider (%s) for cid (%s)", rpm.p.String(), rpm.k.String()) +} + +func (rpm *receivedProviderMessage) handle(pqm *ProviderQueryManager) { + requestStatus, ok := pqm.inProgressRequestStatuses[rpm.k] + if !ok { + log.Errorf("Received provider (%s) for cid (%s) not requested", rpm.p.String(), rpm.k.String()) + return + } + requestStatus.providersSoFar = append(requestStatus.providersSoFar, rpm.p) + for listener := range requestStatus.listeners { + select { + case listener <- rpm.p: + case <-pqm.ctx.Done(): + return + } + } +} + +func (fpqm *finishedProviderQueryMessage) debugMessage() string { + return fmt.Sprintf("Finished Provider Query on cid: %s", fpqm.k.String()) +} + +func (fpqm *finishedProviderQueryMessage) handle(pqm *ProviderQueryManager) { + requestStatus, ok := pqm.inProgressRequestStatuses[fpqm.k] + if !ok { + log.Errorf("Ended request for cid (%s) not in progress", fpqm.k.String()) + return + } + for listener := range requestStatus.listeners { + close(listener) + } + delete(pqm.inProgressRequestStatuses, fpqm.k) + requestStatus.cancelFn() +} + +func (npqm *newProvideQueryMessage) debugMessage() string { + return fmt.Sprintf("New Provider Query on cid: %s", npqm.k.String()) +} + +func (npqm *newProvideQueryMessage) handle(pqm *ProviderQueryManager) { + requestStatus, ok := pqm.inProgressRequestStatuses[npqm.k] + if !ok { + ctx, cancelFn := context.WithCancel(pqm.ctx) + requestStatus = &inProgressRequestStatus{ + listeners: make(map[chan peer.ID]struct{}), + ctx: ctx, + cancelFn: cancelFn, + } + pqm.inProgressRequestStatuses[npqm.k] = requestStatus + select { + case pqm.incomingFindProviderRequests <- &findProviderRequest{ + k: npqm.k, + ctx: ctx, + }: + case <-pqm.ctx.Done(): + return + } + } + inProgressChan := make(chan peer.ID) + requestStatus.listeners[inProgressChan] = struct{}{} + select { + case npqm.inProgressRequestChan <- inProgressRequest{ + providersSoFar: requestStatus.providersSoFar, + incoming: inProgressChan, + }: + case <-pqm.ctx.Done(): + } +} + +func (crm *cancelRequestMessage) debugMessage() string { + return fmt.Sprintf("Cancel provider query on cid: %s", crm.k.String()) +} + +func (crm *cancelRequestMessage) handle(pqm *ProviderQueryManager) { + requestStatus, ok := pqm.inProgressRequestStatuses[crm.k] + if !ok { + // Request finished while queued. + return + } + _, ok = requestStatus.listeners[crm.incomingProviders] + if !ok { + // Request finished and _restarted_ while queued. + return + } + delete(requestStatus.listeners, crm.incomingProviders) + close(crm.incomingProviders) + if len(requestStatus.listeners) == 0 { + delete(pqm.inProgressRequestStatuses, crm.k) + requestStatus.cancelFn() + } +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/cidqueue.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/cidqueue.go new file mode 100644 index 0000000000..e4231319ab --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/cidqueue.go @@ -0,0 +1,46 @@ +package session + +import cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + +type cidQueue struct { + elems []cid.Cid + eset *cid.Set +} + +func newCidQueue() *cidQueue { + return &cidQueue{eset: cid.NewSet()} +} + +func (cq *cidQueue) Pop() cid.Cid { + for { + if len(cq.elems) == 0 { + return cid.Cid{} + } + + out := cq.elems[0] + cq.elems = cq.elems[1:] + + if cq.eset.Has(out) { + cq.eset.Remove(out) + return out + } + } +} + +func (cq *cidQueue) Push(c cid.Cid) { + if cq.eset.Visit(c) { + cq.elems = append(cq.elems, c) + } +} + +func (cq *cidQueue) Remove(c cid.Cid) { + cq.eset.Remove(c) +} + +func (cq *cidQueue) Has(c cid.Cid) bool { + return cq.eset.Has(c) +} + +func (cq *cidQueue) Len() int { + return cq.eset.Len() +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/session.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/session.go new file mode 100644 index 0000000000..1ee7af25a8 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session/session.go @@ -0,0 +1,418 @@ +package session + +import ( + "context" + "time" + + lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + loggables "gx/ipfs/QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU/go-libp2p-loggables" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + bsgetter "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/getter" + notifications "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/notifications" + + bssrs "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter" +) + +const ( + broadcastLiveWantsLimit = 4 + targetedLiveWantsLimit = 32 +) + +// WantManager is an interface that can be used to request blocks +// from given peers. +type WantManager interface { + WantBlocks(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) + CancelWants(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) +} + +// PeerManager provides an interface for tracking and optimize peers, and +// requesting more when neccesary. +type PeerManager interface { + FindMorePeers(context.Context, cid.Cid) + GetOptimizedPeers() []peer.ID + RecordPeerRequests([]peer.ID, []cid.Cid) + RecordPeerResponse(peer.ID, cid.Cid) +} + +// RequestSplitter provides an interface for splitting +// a request for Cids up among peers. +type RequestSplitter interface { + SplitRequest([]peer.ID, []cid.Cid) []*bssrs.PartialRequest + RecordDuplicateBlock() + RecordUniqueBlock() +} + +type interestReq struct { + c cid.Cid + resp chan bool +} + +type blkRecv struct { + from peer.ID + blk blocks.Block + counterMessage bool +} + +// Session holds state for an individual bitswap transfer operation. +// This allows bitswap to make smarter decisions about who to send wantlist +// info to, and who to request blocks from. +type Session struct { + // dependencies + ctx context.Context + wm WantManager + pm PeerManager + srs RequestSplitter + + // channels + incoming chan blkRecv + newReqs chan []cid.Cid + cancelKeys chan []cid.Cid + interestReqs chan interestReq + latencyReqs chan chan time.Duration + tickDelayReqs chan time.Duration + + // do not touch outside run loop + tofetch *cidQueue + interest *lru.Cache + pastWants *cidQueue + liveWants map[cid.Cid]time.Time + tick *time.Timer + baseTickDelay time.Duration + latTotal time.Duration + fetchcnt int + // identifiers + notif notifications.PubSub + uuid logging.Loggable + id uint64 +} + +// New creates a new bitswap session whose lifetime is bounded by the +// given context. +func New(ctx context.Context, id uint64, wm WantManager, pm PeerManager, srs RequestSplitter) *Session { + s := &Session{ + liveWants: make(map[cid.Cid]time.Time), + newReqs: make(chan []cid.Cid), + cancelKeys: make(chan []cid.Cid), + tofetch: newCidQueue(), + pastWants: newCidQueue(), + interestReqs: make(chan interestReq), + latencyReqs: make(chan chan time.Duration), + tickDelayReqs: make(chan time.Duration), + ctx: ctx, + wm: wm, + pm: pm, + srs: srs, + incoming: make(chan blkRecv), + notif: notifications.New(), + uuid: loggables.Uuid("GetBlockRequest"), + baseTickDelay: time.Millisecond * 500, + id: id, + } + + cache, _ := lru.New(2048) + s.interest = cache + + go s.run(ctx) + + return s +} + +// ReceiveBlockFrom receives an incoming block from the given peer. +func (s *Session) ReceiveBlockFrom(from peer.ID, blk blocks.Block) { + select { + case s.incoming <- blkRecv{from: from, blk: blk, counterMessage: false}: + case <-s.ctx.Done(): + } + ks := []cid.Cid{blk.Cid()} + s.wm.CancelWants(s.ctx, ks, nil, s.id) + +} + +// UpdateReceiveCounters updates receive counters for a block, +// which may be a duplicate and adjusts the split factor based on that. +func (s *Session) UpdateReceiveCounters(blk blocks.Block) { + select { + case s.incoming <- blkRecv{from: "", blk: blk, counterMessage: true}: + case <-s.ctx.Done(): + } +} + +// InterestedIn returns true if this session is interested in the given Cid. +func (s *Session) InterestedIn(c cid.Cid) bool { + if s.interest.Contains(c) { + return true + } + // TODO: PERF: this is using a channel to guard a map access against race + // conditions. This is definitely much slower than a mutex, though its unclear + // if it will actually induce any noticeable slowness. This is implemented this + // way to avoid adding a more complex set of mutexes around the liveWants map. + // note that in the average case (where this session *is* interested in the + // block we received) this function will not be called, as the cid will likely + // still be in the interest cache. + resp := make(chan bool, 1) + select { + case s.interestReqs <- interestReq{ + c: c, + resp: resp, + }: + case <-s.ctx.Done(): + return false + } + + select { + case want := <-resp: + return want + case <-s.ctx.Done(): + return false + } +} + +// GetBlock fetches a single block. +func (s *Session) GetBlock(parent context.Context, k cid.Cid) (blocks.Block, error) { + return bsgetter.SyncGetBlock(parent, k, s.GetBlocks) +} + +// GetBlocks fetches a set of blocks within the context of this session and +// returns a channel that found blocks will be returned on. No order is +// guaranteed on the returned blocks. +func (s *Session) GetBlocks(ctx context.Context, keys []cid.Cid) (<-chan blocks.Block, error) { + ctx = logging.ContextWithLoggable(ctx, s.uuid) + return bsgetter.AsyncGetBlocks(ctx, keys, s.notif, + func(ctx context.Context, keys []cid.Cid) { + select { + case s.newReqs <- keys: + case <-ctx.Done(): + case <-s.ctx.Done(): + } + }, + func(keys []cid.Cid) { + select { + case s.cancelKeys <- keys: + case <-s.ctx.Done(): + } + }, + ) +} + +// GetAverageLatency returns the average latency for block requests. +func (s *Session) GetAverageLatency() time.Duration { + resp := make(chan time.Duration) + select { + case s.latencyReqs <- resp: + case <-s.ctx.Done(): + return -1 * time.Millisecond + } + + select { + case latency := <-resp: + return latency + case <-s.ctx.Done(): + return -1 * time.Millisecond + } +} + +// SetBaseTickDelay changes the rate at which ticks happen. +func (s *Session) SetBaseTickDelay(baseTickDelay time.Duration) { + select { + case s.tickDelayReqs <- baseTickDelay: + case <-s.ctx.Done(): + } +} + +var provSearchDelay = time.Second + +// SetProviderSearchDelay overwrites the global provider search delay +func SetProviderSearchDelay(newProvSearchDelay time.Duration) { + provSearchDelay = newProvSearchDelay +} + +// Session run loop -- everything function below here should not be called +// of this loop +func (s *Session) run(ctx context.Context) { + s.tick = time.NewTimer(provSearchDelay) + for { + select { + case blk := <-s.incoming: + if blk.counterMessage { + s.updateReceiveCounters(ctx, blk) + } else { + s.handleIncomingBlock(ctx, blk) + } + case keys := <-s.newReqs: + s.handleNewRequest(ctx, keys) + case keys := <-s.cancelKeys: + s.handleCancel(keys) + case <-s.tick.C: + s.handleTick(ctx) + case lwchk := <-s.interestReqs: + lwchk.resp <- s.cidIsWanted(lwchk.c) + case resp := <-s.latencyReqs: + resp <- s.averageLatency() + case baseTickDelay := <-s.tickDelayReqs: + s.baseTickDelay = baseTickDelay + case <-ctx.Done(): + s.handleShutdown() + return + } + } +} + +func (s *Session) handleIncomingBlock(ctx context.Context, blk blkRecv) { + s.tick.Stop() + + if blk.from != "" { + s.pm.RecordPeerResponse(blk.from, blk.blk.Cid()) + } + + s.receiveBlock(ctx, blk.blk) + + s.resetTick() +} + +func (s *Session) handleNewRequest(ctx context.Context, keys []cid.Cid) { + for _, k := range keys { + s.interest.Add(k, nil) + } + if toadd := s.wantBudget(); toadd > 0 { + if toadd > len(keys) { + toadd = len(keys) + } + + now := keys[:toadd] + keys = keys[toadd:] + + s.wantBlocks(ctx, now) + } + for _, k := range keys { + s.tofetch.Push(k) + } +} + +func (s *Session) handleCancel(keys []cid.Cid) { + for _, c := range keys { + s.tofetch.Remove(c) + } +} + +func (s *Session) handleTick(ctx context.Context) { + + live := make([]cid.Cid, 0, len(s.liveWants)) + now := time.Now() + for c := range s.liveWants { + live = append(live, c) + s.liveWants[c] = now + } + + // Broadcast these keys to everyone we're connected to + s.pm.RecordPeerRequests(nil, live) + s.wm.WantBlocks(ctx, live, nil, s.id) + + if len(live) > 0 { + s.pm.FindMorePeers(ctx, live[0]) + } + s.resetTick() +} + +func (s *Session) handleShutdown() { + s.tick.Stop() + s.notif.Shutdown() + + live := make([]cid.Cid, 0, len(s.liveWants)) + for c := range s.liveWants { + live = append(live, c) + } + s.wm.CancelWants(s.ctx, live, nil, s.id) +} + +func (s *Session) cidIsWanted(c cid.Cid) bool { + _, ok := s.liveWants[c] + if !ok { + ok = s.tofetch.Has(c) + } + return ok +} + +func (s *Session) receiveBlock(ctx context.Context, blk blocks.Block) { + c := blk.Cid() + if s.cidIsWanted(c) { + s.srs.RecordUniqueBlock() + tval, ok := s.liveWants[c] + if ok { + s.latTotal += time.Since(tval) + delete(s.liveWants, c) + } else { + s.tofetch.Remove(c) + } + s.fetchcnt++ + s.notif.Publish(blk) + + toAdd := s.wantBudget() + if toAdd > s.tofetch.Len() { + toAdd = s.tofetch.Len() + } + if toAdd > 0 { + var keys []cid.Cid + for i := 0; i < toAdd; i++ { + keys = append(keys, s.tofetch.Pop()) + } + s.wantBlocks(ctx, keys) + } + + s.pastWants.Push(c) + } +} + +func (s *Session) updateReceiveCounters(ctx context.Context, blk blkRecv) { + ks := blk.blk.Cid() + if s.pastWants.Has(ks) { + s.srs.RecordDuplicateBlock() + } +} + +func (s *Session) wantBlocks(ctx context.Context, ks []cid.Cid) { + now := time.Now() + for _, c := range ks { + s.liveWants[c] = now + } + peers := s.pm.GetOptimizedPeers() + if len(peers) > 0 { + splitRequests := s.srs.SplitRequest(peers, ks) + for _, splitRequest := range splitRequests { + s.pm.RecordPeerRequests(splitRequest.Peers, splitRequest.Keys) + s.wm.WantBlocks(ctx, splitRequest.Keys, splitRequest.Peers, s.id) + } + } else { + s.pm.RecordPeerRequests(nil, ks) + s.wm.WantBlocks(ctx, ks, nil, s.id) + } +} + +func (s *Session) averageLatency() time.Duration { + return s.latTotal / time.Duration(s.fetchcnt) +} + +func (s *Session) resetTick() { + if s.latTotal == 0 { + s.tick.Reset(provSearchDelay) + } else { + avLat := s.averageLatency() + s.tick.Reset(s.baseTickDelay + (3 * avLat)) + } +} + +func (s *Session) wantBudget() int { + live := len(s.liveWants) + var budget int + if len(s.pm.GetOptimizedPeers()) > 0 { + budget = targetedLiveWantsLimit - live + } else { + budget = broadcastLiveWantsLimit - live + } + if budget < 0 { + budget = 0 + } + return budget +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionmanager/sessionmanager.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionmanager/sessionmanager.go new file mode 100644 index 0000000000..df56f151f9 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionmanager/sessionmanager.go @@ -0,0 +1,134 @@ +package sessionmanager + +import ( + "context" + "sync" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + blocks "gx/ipfs/QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK/go-block-format" + + exchange "gx/ipfs/QmWokDcQdSZCxrNxgaRzQDDBofALhActzNBaxRLtiRkUHg/go-ipfs-exchange-interface" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + bssession "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/session" +) + +// Session is a session that is managed by the session manager +type Session interface { + exchange.Fetcher + InterestedIn(cid.Cid) bool + ReceiveBlockFrom(peer.ID, blocks.Block) + UpdateReceiveCounters(blocks.Block) +} + +type sesTrk struct { + session Session + pm bssession.PeerManager + srs bssession.RequestSplitter +} + +// SessionFactory generates a new session for the SessionManager to track. +type SessionFactory func(ctx context.Context, id uint64, pm bssession.PeerManager, srs bssession.RequestSplitter) Session + +// RequestSplitterFactory generates a new request splitter for a session. +type RequestSplitterFactory func(ctx context.Context) bssession.RequestSplitter + +// PeerManagerFactory generates a new peer manager for a session. +type PeerManagerFactory func(ctx context.Context, id uint64) bssession.PeerManager + +// SessionManager is responsible for creating, managing, and dispatching to +// sessions. +type SessionManager struct { + ctx context.Context + sessionFactory SessionFactory + peerManagerFactory PeerManagerFactory + requestSplitterFactory RequestSplitterFactory + + // Sessions + sessLk sync.Mutex + sessions []sesTrk + + // Session Index + sessIDLk sync.Mutex + sessID uint64 +} + +// New creates a new SessionManager. +func New(ctx context.Context, sessionFactory SessionFactory, peerManagerFactory PeerManagerFactory, requestSplitterFactory RequestSplitterFactory) *SessionManager { + return &SessionManager{ + ctx: ctx, + sessionFactory: sessionFactory, + peerManagerFactory: peerManagerFactory, + requestSplitterFactory: requestSplitterFactory, + } +} + +// NewSession initializes a session with the given context, and adds to the +// session manager. +func (sm *SessionManager) NewSession(ctx context.Context) exchange.Fetcher { + id := sm.GetNextSessionID() + sessionctx, cancel := context.WithCancel(ctx) + + pm := sm.peerManagerFactory(sessionctx, id) + srs := sm.requestSplitterFactory(sessionctx) + session := sm.sessionFactory(sessionctx, id, pm, srs) + tracked := sesTrk{session, pm, srs} + sm.sessLk.Lock() + sm.sessions = append(sm.sessions, tracked) + sm.sessLk.Unlock() + go func() { + defer cancel() + select { + case <-sm.ctx.Done(): + sm.removeSession(tracked) + case <-ctx.Done(): + sm.removeSession(tracked) + } + }() + + return session +} + +func (sm *SessionManager) removeSession(session sesTrk) { + sm.sessLk.Lock() + defer sm.sessLk.Unlock() + for i := 0; i < len(sm.sessions); i++ { + if sm.sessions[i] == session { + sm.sessions[i] = sm.sessions[len(sm.sessions)-1] + sm.sessions = sm.sessions[:len(sm.sessions)-1] + return + } + } +} + +// GetNextSessionID returns the next sequentional identifier for a session. +func (sm *SessionManager) GetNextSessionID() uint64 { + sm.sessIDLk.Lock() + defer sm.sessIDLk.Unlock() + sm.sessID++ + return sm.sessID +} + +// ReceiveBlockFrom receives a block from a peer and dispatches to interested +// sessions. +func (sm *SessionManager) ReceiveBlockFrom(from peer.ID, blk blocks.Block) { + sm.sessLk.Lock() + defer sm.sessLk.Unlock() + + k := blk.Cid() + for _, s := range sm.sessions { + if s.session.InterestedIn(k) { + s.session.ReceiveBlockFrom(from, blk) + } + } +} + +// UpdateReceiveCounters records the fact that a block was received, allowing +// sessions to track duplicates +func (sm *SessionManager) UpdateReceiveCounters(blk blocks.Block) { + sm.sessLk.Lock() + defer sm.sessLk.Unlock() + + for _, s := range sm.sessions { + s.session.UpdateReceiveCounters(blk) + } +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionpeermanager/sessionpeermanager.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionpeermanager/sessionpeermanager.go new file mode 100644 index 0000000000..507ac74d7e --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionpeermanager/sessionpeermanager.go @@ -0,0 +1,224 @@ +package sessionpeermanager + +import ( + "context" + "fmt" + "math/rand" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +var log = logging.Logger("bitswap") + +const ( + maxOptimizedPeers = 32 + reservePeers = 2 +) + +// PeerTagger is an interface for tagging peers with metadata +type PeerTagger interface { + TagPeer(peer.ID, string, int) + UntagPeer(p peer.ID, tag string) +} + +// PeerProviderFinder is an interface for finding providers +type PeerProviderFinder interface { + FindProvidersAsync(context.Context, cid.Cid) <-chan peer.ID +} + +type peerMessage interface { + handle(spm *SessionPeerManager) +} + +// SessionPeerManager tracks and manages peers for a session, and provides +// the best ones to the session +type SessionPeerManager struct { + ctx context.Context + tagger PeerTagger + providerFinder PeerProviderFinder + tag string + id uint64 + + peerMessages chan peerMessage + + // do not touch outside of run loop + activePeers map[peer.ID]bool + unoptimizedPeersArr []peer.ID + optimizedPeersArr []peer.ID +} + +// New creates a new SessionPeerManager +func New(ctx context.Context, id uint64, tagger PeerTagger, providerFinder PeerProviderFinder) *SessionPeerManager { + spm := &SessionPeerManager{ + id: id, + ctx: ctx, + tagger: tagger, + providerFinder: providerFinder, + peerMessages: make(chan peerMessage, 16), + activePeers: make(map[peer.ID]bool), + } + + spm.tag = fmt.Sprint("bs-ses-", id) + + go spm.run(ctx) + return spm +} + +// RecordPeerResponse records that a peer received a block, and adds to it +// the list of peers if it wasn't already added +func (spm *SessionPeerManager) RecordPeerResponse(p peer.ID, k cid.Cid) { + + // at the moment, we're just adding peers here + // in the future, we'll actually use this to record metrics + select { + case spm.peerMessages <- &peerResponseMessage{p}: + case <-spm.ctx.Done(): + } +} + +// RecordPeerRequests records that a given set of peers requested the given cids +func (spm *SessionPeerManager) RecordPeerRequests(p []peer.ID, ks []cid.Cid) { + // at the moment, we're not doing anything here + // soon we'll use this to track latency by peer +} + +// GetOptimizedPeers returns the best peers available for a session +func (spm *SessionPeerManager) GetOptimizedPeers() []peer.ID { + // right now this just returns all peers, but soon we might return peers + // ordered by optimization, or only a subset + resp := make(chan []peer.ID, 1) + select { + case spm.peerMessages <- &peerReqMessage{resp}: + case <-spm.ctx.Done(): + return nil + } + + select { + case peers := <-resp: + return peers + case <-spm.ctx.Done(): + return nil + } +} + +// FindMorePeers attempts to find more peers for a session by searching for +// providers for the given Cid +func (spm *SessionPeerManager) FindMorePeers(ctx context.Context, c cid.Cid) { + go func(k cid.Cid) { + for p := range spm.providerFinder.FindProvidersAsync(ctx, k) { + + select { + case spm.peerMessages <- &peerFoundMessage{p}: + case <-ctx.Done(): + case <-spm.ctx.Done(): + } + } + }(c) +} + +func (spm *SessionPeerManager) run(ctx context.Context) { + for { + select { + case pm := <-spm.peerMessages: + pm.handle(spm) + case <-ctx.Done(): + spm.handleShutdown() + return + } + } +} + +func (spm *SessionPeerManager) tagPeer(p peer.ID) { + spm.tagger.TagPeer(p, spm.tag, 10) +} + +func (spm *SessionPeerManager) insertOptimizedPeer(p peer.ID) { + if len(spm.optimizedPeersArr) >= (maxOptimizedPeers - reservePeers) { + tailPeer := spm.optimizedPeersArr[len(spm.optimizedPeersArr)-1] + spm.optimizedPeersArr = spm.optimizedPeersArr[:len(spm.optimizedPeersArr)-1] + spm.unoptimizedPeersArr = append(spm.unoptimizedPeersArr, tailPeer) + } + + spm.optimizedPeersArr = append([]peer.ID{p}, spm.optimizedPeersArr...) +} + +func (spm *SessionPeerManager) removeOptimizedPeer(p peer.ID) { + for i := 0; i < len(spm.optimizedPeersArr); i++ { + if spm.optimizedPeersArr[i] == p { + spm.optimizedPeersArr = append(spm.optimizedPeersArr[:i], spm.optimizedPeersArr[i+1:]...) + return + } + } +} + +func (spm *SessionPeerManager) removeUnoptimizedPeer(p peer.ID) { + for i := 0; i < len(spm.unoptimizedPeersArr); i++ { + if spm.unoptimizedPeersArr[i] == p { + spm.unoptimizedPeersArr[i] = spm.unoptimizedPeersArr[len(spm.unoptimizedPeersArr)-1] + spm.unoptimizedPeersArr = spm.unoptimizedPeersArr[:len(spm.unoptimizedPeersArr)-1] + return + } + } +} + +type peerFoundMessage struct { + p peer.ID +} + +func (pfm *peerFoundMessage) handle(spm *SessionPeerManager) { + p := pfm.p + if _, ok := spm.activePeers[p]; !ok { + spm.activePeers[p] = false + spm.unoptimizedPeersArr = append(spm.unoptimizedPeersArr, p) + spm.tagPeer(p) + } +} + +type peerResponseMessage struct { + p peer.ID +} + +func (prm *peerResponseMessage) handle(spm *SessionPeerManager) { + + p := prm.p + isOptimized, ok := spm.activePeers[p] + if !ok { + spm.activePeers[p] = true + spm.tagPeer(p) + } else { + if isOptimized { + spm.removeOptimizedPeer(p) + } else { + spm.activePeers[p] = true + spm.removeUnoptimizedPeer(p) + } + } + spm.insertOptimizedPeer(p) +} + +type peerReqMessage struct { + resp chan<- []peer.ID +} + +func (prm *peerReqMessage) handle(spm *SessionPeerManager) { + randomOrder := rand.Perm(len(spm.unoptimizedPeersArr)) + maxPeers := len(spm.unoptimizedPeersArr) + len(spm.optimizedPeersArr) + if maxPeers > maxOptimizedPeers { + maxPeers = maxOptimizedPeers + } + + extraPeers := make([]peer.ID, maxPeers-len(spm.optimizedPeersArr)) + for i := range extraPeers { + extraPeers[i] = spm.unoptimizedPeersArr[randomOrder[i]] + } + prm.resp <- append(spm.optimizedPeersArr, extraPeers...) +} + +func (spm *SessionPeerManager) handleShutdown() { + for p := range spm.activePeers { + spm.tagger.UntagPeer(p, spm.tag) + } +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter/sessionrequestsplitter.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter/sessionrequestsplitter.go new file mode 100644 index 0000000000..95820eba2e --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/sessionrequestsplitter/sessionrequestsplitter.go @@ -0,0 +1,163 @@ +package sessionrequestsplitter + +import ( + "context" + + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" +) + +const ( + minReceivedToAdjustSplit = 2 + maxSplit = 16 + maxAcceptableDupes = 0.4 + minDuplesToTryLessSplits = 0.2 + initialSplit = 2 +) + +// PartialRequest is represents one slice of an over request split among peers +type PartialRequest struct { + Peers []peer.ID + Keys []cid.Cid +} + +type srsMessage interface { + handle(srs *SessionRequestSplitter) +} + +// SessionRequestSplitter track how many duplicate and unique blocks come in and +// uses that to determine how much to split up each set of wants among peers. +type SessionRequestSplitter struct { + ctx context.Context + messages chan srsMessage + + // data, do not touch outside run loop + receivedCount int + split int + duplicateReceivedCount int +} + +// New returns a new SessionRequestSplitter. +func New(ctx context.Context) *SessionRequestSplitter { + srs := &SessionRequestSplitter{ + ctx: ctx, + messages: make(chan srsMessage, 10), + split: initialSplit, + } + go srs.run() + return srs +} + +// SplitRequest splits a request for the given cids one or more times among the +// given peers. +func (srs *SessionRequestSplitter) SplitRequest(peers []peer.ID, ks []cid.Cid) []*PartialRequest { + resp := make(chan []*PartialRequest, 1) + + select { + case srs.messages <- &splitRequestMessage{peers, ks, resp}: + case <-srs.ctx.Done(): + return nil + } + select { + case splitRequests := <-resp: + return splitRequests + case <-srs.ctx.Done(): + return nil + } + +} + +// RecordDuplicateBlock records the fact that the session received a duplicate +// block and adjusts split factor as neccesary. +func (srs *SessionRequestSplitter) RecordDuplicateBlock() { + select { + case srs.messages <- &recordDuplicateMessage{}: + case <-srs.ctx.Done(): + } +} + +// RecordUniqueBlock records the fact that the session received unique block +// and adjusts the split factor as neccesary. +func (srs *SessionRequestSplitter) RecordUniqueBlock() { + select { + case srs.messages <- &recordUniqueMessage{}: + case <-srs.ctx.Done(): + } +} + +func (srs *SessionRequestSplitter) run() { + for { + select { + case message := <-srs.messages: + message.handle(srs) + case <-srs.ctx.Done(): + return + } + } +} + +func (srs *SessionRequestSplitter) duplicateRatio() float64 { + return float64(srs.duplicateReceivedCount) / float64(srs.receivedCount) +} + +type splitRequestMessage struct { + peers []peer.ID + ks []cid.Cid + resp chan []*PartialRequest +} + +func (s *splitRequestMessage) handle(srs *SessionRequestSplitter) { + split := srs.split + peers := s.peers + ks := s.ks + if len(peers) < split { + split = len(peers) + } + peerSplits := splitPeers(peers, split) + if len(ks) < split { + split = len(ks) + } + keySplits := splitKeys(ks, split) + splitRequests := make([]*PartialRequest, len(keySplits)) + for i := range splitRequests { + splitRequests[i] = &PartialRequest{peerSplits[i], keySplits[i]} + } + s.resp <- splitRequests +} + +type recordDuplicateMessage struct{} + +func (r *recordDuplicateMessage) handle(srs *SessionRequestSplitter) { + srs.receivedCount++ + srs.duplicateReceivedCount++ + if (srs.receivedCount > minReceivedToAdjustSplit) && (srs.duplicateRatio() > maxAcceptableDupes) && (srs.split < maxSplit) { + srs.split++ + } +} + +type recordUniqueMessage struct{} + +func (r *recordUniqueMessage) handle(srs *SessionRequestSplitter) { + srs.receivedCount++ + if (srs.split > 1) && (srs.duplicateRatio() < minDuplesToTryLessSplits) { + srs.split-- + } + +} +func splitKeys(ks []cid.Cid, split int) [][]cid.Cid { + splits := make([][]cid.Cid, split) + for i, c := range ks { + pos := i % split + splits[pos] = append(splits[pos], c) + } + return splits +} + +func splitPeers(peers []peer.ID, split int) [][]peer.ID { + splits := make([][]peer.ID, split) + for i, p := range peers { + pos := i % split + splits[pos] = append(splits[pos], p) + } + return splits +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/stat.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/stat.go new file mode 100644 index 0000000000..b35d9decd7 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/stat.go @@ -0,0 +1,46 @@ +package bitswap + +import ( + "sort" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +type Stat struct { + ProvideBufLen int + Wantlist []cid.Cid + Peers []string + BlocksReceived uint64 + DataReceived uint64 + BlocksSent uint64 + DataSent uint64 + DupBlksReceived uint64 + DupDataReceived uint64 + MessagesReceived uint64 +} + +func (bs *Bitswap) Stat() (*Stat, error) { + st := new(Stat) + st.ProvideBufLen = len(bs.newBlocks) + st.Wantlist = bs.GetWantlist() + bs.counterLk.Lock() + c := bs.counters + st.BlocksReceived = c.blocksRecvd + st.DupBlksReceived = c.dupBlocksRecvd + st.DupDataReceived = c.dupDataRecvd + st.BlocksSent = c.blocksSent + st.DataSent = c.dataSent + st.DataReceived = c.dataRecvd + st.MessagesReceived = c.messagesRecvd + bs.counterLk.Unlock() + + peers := bs.engine.Peers() + st.Peers = make([]string, 0, len(peers)) + + for _, p := range peers { + st.Peers = append(st.Peers, p.Pretty()) + } + sort.Strings(st.Peers) + + return st, nil +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/interface.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/interface.go new file mode 100644 index 0000000000..dc8b6e44d4 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/interface.go @@ -0,0 +1,13 @@ +package bitswap + +import ( + "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" +) + +type Network interface { + Adapter(testutil.Identity) bsnet.BitSwapNetwork + + HasPeer(peer.ID) bool +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/internet_latency_delay_generator.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/internet_latency_delay_generator.go new file mode 100644 index 0000000000..2a7077fef0 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/internet_latency_delay_generator.go @@ -0,0 +1,63 @@ +package bitswap + +import ( + "math/rand" + "time" + + "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" +) + +var sharedRNG = rand.New(rand.NewSource(time.Now().UnixNano())) + +// InternetLatencyDelayGenerator generates three clusters of delays, +// typical of the type of peers you would encounter on the interenet. +// Given a base delay time T, the wait time generated will be either: +// 1. A normalized distribution around the base time +// 2. A normalized distribution around the base time plus a "medium" delay +// 3. A normalized distribution around the base time plus a "large" delay +// The size of the medium & large delays are determined when the generator +// is constructed, as well as the relative percentages with which delays fall +// into each of the three different clusters, and the standard deviation for +// the normalized distribution. +// This can be used to generate a number of scenarios typical of latency +// distribution among peers on the internet. +func InternetLatencyDelayGenerator( + mediumDelay time.Duration, + largeDelay time.Duration, + percentMedium float64, + percentLarge float64, + std time.Duration, + rng *rand.Rand) delay.Generator { + if rng == nil { + rng = sharedRNG + } + + return &internetLatencyDelayGenerator{ + mediumDelay: mediumDelay, + largeDelay: largeDelay, + percentLarge: percentLarge, + percentMedium: percentMedium, + std: std, + rng: rng, + } +} + +type internetLatencyDelayGenerator struct { + mediumDelay time.Duration + largeDelay time.Duration + percentLarge float64 + percentMedium float64 + std time.Duration + rng *rand.Rand +} + +func (d *internetLatencyDelayGenerator) NextWaitTime(t time.Duration) time.Duration { + clusterDistribution := d.rng.Float64() + baseDelay := time.Duration(d.rng.NormFloat64()*float64(d.std)) + t + if clusterDistribution < d.percentLarge { + return baseDelay + d.largeDelay + } else if clusterDistribution < d.percentMedium+d.percentLarge { + return baseDelay + d.mediumDelay + } + return baseDelay +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/peernet.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/peernet.go new file mode 100644 index 0000000000..c3163024e8 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/peernet.go @@ -0,0 +1,42 @@ +package bitswap + +import ( + "context" + + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + + mockpeernet "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + testutil "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + mockrouting "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock" +) + +type peernet struct { + mockpeernet.Mocknet + routingserver mockrouting.Server +} + +func StreamNet(ctx context.Context, net mockpeernet.Mocknet, rs mockrouting.Server) (Network, error) { + return &peernet{net, rs}, nil +} + +func (pn *peernet) Adapter(p testutil.Identity) bsnet.BitSwapNetwork { + client, err := pn.Mocknet.AddPeer(p.PrivateKey(), p.Address()) + if err != nil { + panic(err.Error()) + } + routing := pn.routingserver.ClientWithDatastore(context.TODO(), p, ds.NewMapDatastore()) + return bsnet.NewFromIpfsHost(client, routing) +} + +func (pn *peernet) HasPeer(p peer.ID) bool { + for _, member := range pn.Mocknet.Peers() { + if p == member { + return true + } + } + return false +} + +var _ Network = (*peernet)(nil) diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/rate_limit_generators.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/rate_limit_generators.go new file mode 100644 index 0000000000..2c4a1cd563 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/rate_limit_generators.go @@ -0,0 +1,42 @@ +package bitswap + +import ( + "math/rand" +) + +type fixedRateLimitGenerator struct { + rateLimit float64 +} + +// FixedRateLimitGenerator returns a rate limit generatoe that always generates +// the specified rate limit in bytes/sec. +func FixedRateLimitGenerator(rateLimit float64) RateLimitGenerator { + return &fixedRateLimitGenerator{rateLimit} +} + +func (rateLimitGenerator *fixedRateLimitGenerator) NextRateLimit() float64 { + return rateLimitGenerator.rateLimit +} + +type variableRateLimitGenerator struct { + rateLimit float64 + std float64 + rng *rand.Rand +} + +// VariableRateLimitGenerator makes rate limites that following a normal distribution. +func VariableRateLimitGenerator(rateLimit float64, std float64, rng *rand.Rand) RateLimitGenerator { + if rng == nil { + rng = sharedRNG + } + + return &variableRateLimitGenerator{ + std: std, + rng: rng, + rateLimit: rateLimit, + } +} + +func (rateLimitGenerator *variableRateLimitGenerator) NextRateLimit() float64 { + return rateLimitGenerator.rng.NormFloat64()*rateLimitGenerator.std + rateLimitGenerator.rateLimit +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/virtual.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/virtual.go new file mode 100644 index 0000000000..525694a035 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet/virtual.go @@ -0,0 +1,330 @@ +package bitswap + +import ( + "context" + "errors" + "sort" + "sync" + "sync/atomic" + "time" + + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + bsnet "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/network" + + mocknet "gx/ipfs/QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK/go-libp2p/p2p/net/mock" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + delay "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" + testutil "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + ifconnmgr "gx/ipfs/QmXa6sgzUvP5bgF5CyyV36bZYv5VDRwttggQYUPvFybLVd/go-libp2p-interface-connmgr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + mockrouting "gx/ipfs/QmZ22s3UgNi5vvYNH79jWJ63NPyQGiv4mdNaWCz4WKqMTZ/go-ipfs-routing/mock" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("bstestnet") + +func VirtualNetwork(rs mockrouting.Server, d delay.D) Network { + return &network{ + latencies: make(map[peer.ID]map[peer.ID]time.Duration), + clients: make(map[peer.ID]*receiverQueue), + delay: d, + routingserver: rs, + isRateLimited: false, + rateLimitGenerator: nil, + conns: make(map[string]struct{}), + } +} + +type RateLimitGenerator interface { + NextRateLimit() float64 +} + +func RateLimitedVirtualNetwork(rs mockrouting.Server, d delay.D, rateLimitGenerator RateLimitGenerator) Network { + return &network{ + latencies: make(map[peer.ID]map[peer.ID]time.Duration), + rateLimiters: make(map[peer.ID]map[peer.ID]*mocknet.RateLimiter), + clients: make(map[peer.ID]*receiverQueue), + delay: d, + routingserver: rs, + isRateLimited: true, + rateLimitGenerator: rateLimitGenerator, + conns: make(map[string]struct{}), + } +} + +type network struct { + mu sync.Mutex + latencies map[peer.ID]map[peer.ID]time.Duration + rateLimiters map[peer.ID]map[peer.ID]*mocknet.RateLimiter + clients map[peer.ID]*receiverQueue + routingserver mockrouting.Server + delay delay.D + isRateLimited bool + rateLimitGenerator RateLimitGenerator + conns map[string]struct{} +} + +type message struct { + from peer.ID + msg bsmsg.BitSwapMessage + shouldSend time.Time +} + +// receiverQueue queues up a set of messages to be sent, and sends them *in +// order* with their delays respected as much as sending them in order allows +// for +type receiverQueue struct { + receiver *networkClient + queue []*message + active bool + lk sync.Mutex +} + +func (n *network) Adapter(p testutil.Identity) bsnet.BitSwapNetwork { + n.mu.Lock() + defer n.mu.Unlock() + + client := &networkClient{ + local: p.ID(), + network: n, + routing: n.routingserver.Client(p), + } + n.clients[p.ID()] = &receiverQueue{receiver: client} + return client +} + +func (n *network) HasPeer(p peer.ID) bool { + n.mu.Lock() + defer n.mu.Unlock() + + _, found := n.clients[p] + return found +} + +// TODO should this be completely asynchronous? +// TODO what does the network layer do with errors received from services? +func (n *network) SendMessage( + ctx context.Context, + from peer.ID, + to peer.ID, + mes bsmsg.BitSwapMessage) error { + + n.mu.Lock() + defer n.mu.Unlock() + + latencies, ok := n.latencies[from] + if !ok { + latencies = make(map[peer.ID]time.Duration) + n.latencies[from] = latencies + } + + latency, ok := latencies[to] + if !ok { + latency = n.delay.NextWaitTime() + latencies[to] = latency + } + + var bandwidthDelay time.Duration + if n.isRateLimited { + rateLimiters, ok := n.rateLimiters[from] + if !ok { + rateLimiters = make(map[peer.ID]*mocknet.RateLimiter) + n.rateLimiters[from] = rateLimiters + } + + rateLimiter, ok := rateLimiters[to] + if !ok { + rateLimiter = mocknet.NewRateLimiter(n.rateLimitGenerator.NextRateLimit()) + rateLimiters[to] = rateLimiter + } + + size := mes.ToProtoV1().Size() + bandwidthDelay = rateLimiter.Limit(size) + } else { + bandwidthDelay = 0 + } + + receiver, ok := n.clients[to] + if !ok { + return errors.New("cannot locate peer on network") + } + + // nb: terminate the context since the context wouldn't actually be passed + // over the network in a real scenario + + msg := &message{ + from: from, + msg: mes, + shouldSend: time.Now().Add(latency).Add(bandwidthDelay), + } + receiver.enqueue(msg) + + return nil +} + +type networkClient struct { + local peer.ID + bsnet.Receiver + network *network + routing routing.IpfsRouting + stats bsnet.NetworkStats +} + +func (nc *networkClient) SendMessage( + ctx context.Context, + to peer.ID, + message bsmsg.BitSwapMessage) error { + if err := nc.network.SendMessage(ctx, nc.local, to, message); err != nil { + return err + } + atomic.AddUint64(&nc.stats.MessagesSent, 1) + return nil +} + +func (nc *networkClient) Stats() bsnet.NetworkStats { + return bsnet.NetworkStats{ + MessagesRecvd: atomic.LoadUint64(&nc.stats.MessagesRecvd), + MessagesSent: atomic.LoadUint64(&nc.stats.MessagesSent), + } +} + +// FindProvidersAsync returns a channel of providers for the given key. +func (nc *networkClient) FindProvidersAsync(ctx context.Context, k cid.Cid, max int) <-chan peer.ID { + + // NB: this function duplicates the PeerInfo -> ID transformation in the + // bitswap network adapter. Not to worry. This network client will be + // deprecated once the ipfsnet.Mock is added. The code below is only + // temporary. + + out := make(chan peer.ID) + go func() { + defer close(out) + providers := nc.routing.FindProvidersAsync(ctx, k, max) + for info := range providers { + select { + case <-ctx.Done(): + case out <- info.ID: + } + } + }() + return out +} + +func (nc *networkClient) ConnectionManager() ifconnmgr.ConnManager { + return &ifconnmgr.NullConnMgr{} +} + +type messagePasser struct { + net *networkClient + target peer.ID + local peer.ID + ctx context.Context +} + +func (mp *messagePasser) SendMsg(ctx context.Context, m bsmsg.BitSwapMessage) error { + return mp.net.SendMessage(ctx, mp.target, m) +} + +func (mp *messagePasser) Close() error { + return nil +} + +func (mp *messagePasser) Reset() error { + return nil +} + +func (n *networkClient) NewMessageSender(ctx context.Context, p peer.ID) (bsnet.MessageSender, error) { + return &messagePasser{ + net: n, + target: p, + local: n.local, + ctx: ctx, + }, nil +} + +// Provide provides the key to the network. +func (nc *networkClient) Provide(ctx context.Context, k cid.Cid) error { + return nc.routing.Provide(ctx, k, true) +} + +func (nc *networkClient) SetDelegate(r bsnet.Receiver) { + nc.Receiver = r +} + +func (nc *networkClient) ConnectTo(_ context.Context, p peer.ID) error { + nc.network.mu.Lock() + + otherClient, ok := nc.network.clients[p] + if !ok { + nc.network.mu.Unlock() + return errors.New("no such peer in network") + } + + tag := tagForPeers(nc.local, p) + if _, ok := nc.network.conns[tag]; ok { + nc.network.mu.Unlock() + log.Warning("ALREADY CONNECTED TO PEER (is this a reconnect? test lib needs fixing)") + return nil + } + nc.network.conns[tag] = struct{}{} + nc.network.mu.Unlock() + + // TODO: add handling for disconnects + + otherClient.receiver.PeerConnected(nc.local) + nc.Receiver.PeerConnected(p) + return nil +} + +func (rq *receiverQueue) enqueue(m *message) { + rq.lk.Lock() + defer rq.lk.Unlock() + rq.queue = append(rq.queue, m) + if !rq.active { + rq.active = true + go rq.process() + } +} + +func (rq *receiverQueue) Swap(i, j int) { + rq.queue[i], rq.queue[j] = rq.queue[j], rq.queue[i] +} + +func (rq *receiverQueue) Len() int { + return len(rq.queue) +} + +func (rq *receiverQueue) Less(i, j int) bool { + return rq.queue[i].shouldSend.UnixNano() < rq.queue[j].shouldSend.UnixNano() +} + +func (rq *receiverQueue) process() { + for { + rq.lk.Lock() + sort.Sort(rq) + if len(rq.queue) == 0 { + rq.active = false + rq.lk.Unlock() + return + } + m := rq.queue[0] + if time.Until(m.shouldSend).Seconds() < 0.1 { + rq.queue = rq.queue[1:] + rq.lk.Unlock() + time.Sleep(time.Until(m.shouldSend)) + atomic.AddUint64(&rq.receiver.stats.MessagesRecvd, 1) + rq.receiver.ReceiveMessage(context.TODO(), m.from, m.msg) + } else { + rq.lk.Unlock() + time.Sleep(100 * time.Millisecond) + } + } +} + +func tagForPeers(a, b peer.ID) string { + if a < b { + return string(a + b) + } + return string(b + a) +} diff --git a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testutils.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testutils.go similarity index 78% rename from vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testutils.go rename to vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testutils.go index 8eecb257ed..efaf11ccd7 100644 --- a/vendor/gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testutils.go +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testutils.go @@ -4,16 +4,16 @@ import ( "context" "time" - tn "gx/ipfs/QmNkxFCmPtr2RQxjZNRCNryLud4L9wMEiBJsLgF14MqTHj/go-bitswap/testnet" - - delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - delayed "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/delayed" - ds_sync "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/sync" - blockstore "gx/ipfs/QmcDDgAXDbpDUpadCJKLr49KYR4HuL7T8Z1dZTHt6ixsoR/go-ipfs-blockstore" - p2ptestutil "gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil" + tn "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/testnet" + + p2ptestutil "gx/ipfs/QmQzyPDx8rLqJ5evnHAo4Mpbsb64RKGZzLABzsbXQM6a2j/go-libp2p-netutil" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + delayed "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/delayed" + ds_sync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + delay "gx/ipfs/QmUe1WCHkQaz4UeNKiHDUBV2T6i9prc3DniqyHPXyfGaUq/go-ipfs-delay" + testutil "gx/ipfs/QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W/go-testutil" + blockstore "gx/ipfs/QmXjKkjMDTtXAiLBwstVexofB8LeruZmE2eBd85GwGFFLA/go-ipfs-blockstore" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" ) // WARNING: this uses RandTestBogusIdentity DO NOT USE for NON TESTS! @@ -81,7 +81,7 @@ func (i *Instance) SetBlockstoreLatency(t time.Duration) time.Duration { return i.blockstoreDelay.Set(t) } -// session creates a test bitswap session. +// session creates a test bitswap instance. // // NB: It's easy make mistakes by providing the same peer ID to two different // sessions. To safeguard, use the SessionGenerator to generate sessions. It's diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist/wantlist.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist/wantlist.go new file mode 100644 index 0000000000..f7c9a2de7a --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist/wantlist.go @@ -0,0 +1,197 @@ +// Package wantlist implements an object for bitswap that contains the keys +// that a given peer wants. +package wantlist + +import ( + "sort" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" +) + +type SessionTrackedWantlist struct { + set map[cid.Cid]*sessionTrackedEntry +} + +type Wantlist struct { + set map[cid.Cid]Entry +} + +type Entry struct { + Cid cid.Cid + Priority int +} + +type sessionTrackedEntry struct { + Entry + sesTrk map[uint64]struct{} +} + +// NewRefEntry creates a new reference tracked wantlist entry. +func NewRefEntry(c cid.Cid, p int) Entry { + return Entry{ + Cid: c, + Priority: p, + } +} + +type entrySlice []Entry + +func (es entrySlice) Len() int { return len(es) } +func (es entrySlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } +func (es entrySlice) Less(i, j int) bool { return es[i].Priority > es[j].Priority } + +func NewSessionTrackedWantlist() *SessionTrackedWantlist { + return &SessionTrackedWantlist{ + set: make(map[cid.Cid]*sessionTrackedEntry), + } +} + +func New() *Wantlist { + return &Wantlist{ + set: make(map[cid.Cid]Entry), + } +} + +// Add adds the given cid to the wantlist with the specified priority, governed +// by the session ID 'ses'. if a cid is added under multiple session IDs, then +// it must be removed by each of those sessions before it is no longer 'in the +// wantlist'. Calls to Add are idempotent given the same arguments. Subsequent +// calls with different values for priority will not update the priority. +// TODO: think through priority changes here +// Add returns true if the cid did not exist in the wantlist before this call +// (even if it was under a different session). +func (w *SessionTrackedWantlist) Add(c cid.Cid, priority int, ses uint64) bool { + + if e, ok := w.set[c]; ok { + e.sesTrk[ses] = struct{}{} + return false + } + + w.set[c] = &sessionTrackedEntry{ + Entry: Entry{Cid: c, Priority: priority}, + sesTrk: map[uint64]struct{}{ses: {}}, + } + + return true +} + +// AddEntry adds given Entry to the wantlist. For more information see Add method. +func (w *SessionTrackedWantlist) AddEntry(e Entry, ses uint64) bool { + if ex, ok := w.set[e.Cid]; ok { + ex.sesTrk[ses] = struct{}{} + return false + } + w.set[e.Cid] = &sessionTrackedEntry{ + Entry: e, + sesTrk: map[uint64]struct{}{ses: {}}, + } + return true +} + +// Remove removes the given cid from being tracked by the given session. +// 'true' is returned if this call to Remove removed the final session ID +// tracking the cid. (meaning true will be returned iff this call caused the +// value of 'Contains(c)' to change from true to false) +func (w *SessionTrackedWantlist) Remove(c cid.Cid, ses uint64) bool { + e, ok := w.set[c] + if !ok { + return false + } + + delete(e.sesTrk, ses) + if len(e.sesTrk) == 0 { + delete(w.set, c) + return true + } + return false +} + +// Contains returns true if the given cid is in the wantlist tracked by one or +// more sessions. +func (w *SessionTrackedWantlist) Contains(k cid.Cid) (Entry, bool) { + e, ok := w.set[k] + if !ok { + return Entry{}, false + } + return e.Entry, true +} + +func (w *SessionTrackedWantlist) Entries() []Entry { + es := make([]Entry, 0, len(w.set)) + for _, e := range w.set { + es = append(es, e.Entry) + } + return es +} + +func (w *SessionTrackedWantlist) SortedEntries() []Entry { + es := w.Entries() + sort.Sort(entrySlice(es)) + return es +} + +func (w *SessionTrackedWantlist) Len() int { + return len(w.set) +} + +func (w *SessionTrackedWantlist) CopyWants(to *SessionTrackedWantlist) { + for _, e := range w.set { + for k := range e.sesTrk { + to.AddEntry(e.Entry, k) + } + } +} + +func (w *Wantlist) Len() int { + return len(w.set) +} + +func (w *Wantlist) Add(c cid.Cid, priority int) bool { + if _, ok := w.set[c]; ok { + return false + } + + w.set[c] = Entry{ + Cid: c, + Priority: priority, + } + + return true +} + +func (w *Wantlist) AddEntry(e Entry) bool { + if _, ok := w.set[e.Cid]; ok { + return false + } + w.set[e.Cid] = e + return true +} + +func (w *Wantlist) Remove(c cid.Cid) bool { + _, ok := w.set[c] + if !ok { + return false + } + + delete(w.set, c) + return true +} + +func (w *Wantlist) Contains(c cid.Cid) (Entry, bool) { + e, ok := w.set[c] + return e, ok +} + +func (w *Wantlist) Entries() []Entry { + es := make([]Entry, 0, len(w.set)) + for _, e := range w.set { + es = append(es, e) + } + return es +} + +func (w *Wantlist) SortedEntries() []Entry { + es := w.Entries() + sort.Sort(entrySlice(es)) + return es +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantmanager/wantmanager.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantmanager/wantmanager.go new file mode 100644 index 0000000000..e43d2f5556 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantmanager/wantmanager.go @@ -0,0 +1,286 @@ +package wantmanager + +import ( + "context" + "math" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" + wantlist "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/wantlist" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" +) + +var log = logging.Logger("bitswap") + +const ( + // maxPriority is the max priority as defined by the bitswap protocol + maxPriority = math.MaxInt32 +) + +// PeerHandler sends changes out to the network as they get added to the wantlist +// managed by the WantManager. +type PeerHandler interface { + Disconnected(p peer.ID) + Connected(p peer.ID, initialWants *wantlist.SessionTrackedWantlist) + SendMessage(entries []bsmsg.Entry, targets []peer.ID, from uint64) +} + +type wantMessage interface { + handle(wm *WantManager) +} + +// WantManager manages a global want list. It tracks two seperate want lists - +// one for all wants, and one for wants that are specifically broadcast to the +// internet. +type WantManager struct { + // channel requests to the run loop + // to get predictable behavior while running this in a go routine + // having only one channel is neccesary, so requests are processed serially + wantMessages chan wantMessage + + // synchronized by Run loop, only touch inside there + wl *wantlist.SessionTrackedWantlist + bcwl *wantlist.SessionTrackedWantlist + + ctx context.Context + cancel func() + + peerHandler PeerHandler + wantlistGauge metrics.Gauge +} + +// New initializes a new WantManager for a given context. +func New(ctx context.Context) *WantManager { + ctx, cancel := context.WithCancel(ctx) + wantlistGauge := metrics.NewCtx(ctx, "wantlist_total", + "Number of items in wantlist.").Gauge() + return &WantManager{ + wantMessages: make(chan wantMessage, 10), + wl: wantlist.NewSessionTrackedWantlist(), + bcwl: wantlist.NewSessionTrackedWantlist(), + ctx: ctx, + cancel: cancel, + wantlistGauge: wantlistGauge, + } +} + +// SetDelegate specifies who will send want changes out to the internet. +func (wm *WantManager) SetDelegate(peerHandler PeerHandler) { + wm.peerHandler = peerHandler +} + +// WantBlocks adds the given cids to the wantlist, tracked by the given session. +func (wm *WantManager) WantBlocks(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) { + log.Infof("want blocks: %s", ks) + wm.addEntries(ctx, ks, peers, false, ses) +} + +// CancelWants removes the given cids from the wantlist, tracked by the given session. +func (wm *WantManager) CancelWants(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64) { + wm.addEntries(context.Background(), ks, peers, true, ses) +} + +// IsWanted returns whether a CID is currently wanted. +func (wm *WantManager) IsWanted(c cid.Cid) bool { + resp := make(chan bool, 1) + select { + case wm.wantMessages <- &isWantedMessage{c, resp}: + case <-wm.ctx.Done(): + return false + } + select { + case wanted := <-resp: + return wanted + case <-wm.ctx.Done(): + return false + } +} + +// CurrentWants returns the list of current wants. +func (wm *WantManager) CurrentWants() []wantlist.Entry { + resp := make(chan []wantlist.Entry, 1) + select { + case wm.wantMessages <- ¤tWantsMessage{resp}: + case <-wm.ctx.Done(): + return nil + } + select { + case wantlist := <-resp: + return wantlist + case <-wm.ctx.Done(): + return nil + } +} + +// CurrentBroadcastWants returns the current list of wants that are broadcasts. +func (wm *WantManager) CurrentBroadcastWants() []wantlist.Entry { + resp := make(chan []wantlist.Entry, 1) + select { + case wm.wantMessages <- ¤tBroadcastWantsMessage{resp}: + case <-wm.ctx.Done(): + return nil + } + select { + case wl := <-resp: + return wl + case <-wm.ctx.Done(): + return nil + } +} + +// WantCount returns the total count of wants. +func (wm *WantManager) WantCount() int { + resp := make(chan int, 1) + select { + case wm.wantMessages <- &wantCountMessage{resp}: + case <-wm.ctx.Done(): + return 0 + } + select { + case count := <-resp: + return count + case <-wm.ctx.Done(): + return 0 + } +} + +// Connected is called when a new peer is connected +func (wm *WantManager) Connected(p peer.ID) { + select { + case wm.wantMessages <- &connectedMessage{p}: + case <-wm.ctx.Done(): + } +} + +// Disconnected is called when a peer is disconnected +func (wm *WantManager) Disconnected(p peer.ID) { + select { + case wm.wantMessages <- &disconnectedMessage{p}: + case <-wm.ctx.Done(): + } +} + +// Startup starts processing for the WantManager. +func (wm *WantManager) Startup() { + go wm.run() +} + +// Shutdown ends processing for the want manager. +func (wm *WantManager) Shutdown() { + wm.cancel() +} + +func (wm *WantManager) run() { + // NOTE: Do not open any streams or connections from anywhere in this + // event loop. Really, just don't do anything likely to block. + for { + select { + case message := <-wm.wantMessages: + message.handle(wm) + case <-wm.ctx.Done(): + return + } + } +} + +func (wm *WantManager) addEntries(ctx context.Context, ks []cid.Cid, targets []peer.ID, cancel bool, ses uint64) { + entries := make([]bsmsg.Entry, 0, len(ks)) + for i, k := range ks { + entries = append(entries, bsmsg.Entry{ + Cancel: cancel, + Entry: wantlist.NewRefEntry(k, maxPriority-i), + }) + } + select { + case wm.wantMessages <- &wantSet{entries: entries, targets: targets, from: ses}: + case <-wm.ctx.Done(): + case <-ctx.Done(): + } +} + +type wantSet struct { + entries []bsmsg.Entry + targets []peer.ID + from uint64 +} + +func (ws *wantSet) handle(wm *WantManager) { + // is this a broadcast or not? + brdc := len(ws.targets) == 0 + + // add changes to our wantlist + for _, e := range ws.entries { + if e.Cancel { + if brdc { + wm.bcwl.Remove(e.Cid, ws.from) + } + + if wm.wl.Remove(e.Cid, ws.from) { + wm.wantlistGauge.Dec() + } + } else { + if brdc { + wm.bcwl.AddEntry(e.Entry, ws.from) + } + if wm.wl.AddEntry(e.Entry, ws.from) { + wm.wantlistGauge.Inc() + } + } + } + + // broadcast those wantlist changes + wm.peerHandler.SendMessage(ws.entries, ws.targets, ws.from) +} + +type isWantedMessage struct { + c cid.Cid + resp chan<- bool +} + +func (iwm *isWantedMessage) handle(wm *WantManager) { + _, isWanted := wm.wl.Contains(iwm.c) + iwm.resp <- isWanted +} + +type currentWantsMessage struct { + resp chan<- []wantlist.Entry +} + +func (cwm *currentWantsMessage) handle(wm *WantManager) { + cwm.resp <- wm.wl.Entries() +} + +type currentBroadcastWantsMessage struct { + resp chan<- []wantlist.Entry +} + +func (cbcwm *currentBroadcastWantsMessage) handle(wm *WantManager) { + cbcwm.resp <- wm.bcwl.Entries() +} + +type wantCountMessage struct { + resp chan<- int +} + +func (wcm *wantCountMessage) handle(wm *WantManager) { + wcm.resp <- wm.wl.Len() +} + +type connectedMessage struct { + p peer.ID +} + +func (cm *connectedMessage) handle(wm *WantManager) { + wm.peerHandler.Connected(cm.p, wm.bcwl) +} + +type disconnectedMessage struct { + p peer.ID +} + +func (dm *disconnectedMessage) handle(wm *WantManager) { + wm.peerHandler.Disconnected(dm.p) +} diff --git a/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/workers.go b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/workers.go new file mode 100644 index 0000000000..dcc30db0d0 --- /dev/null +++ b/vendor/gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/workers.go @@ -0,0 +1,177 @@ +package bitswap + +import ( + "context" + + process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + engine "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/decision" + bsmsg "gx/ipfs/QmcSPuzpSbVLU6UHU4e5PwZpm4fHbCn5SbNR5ZNL6Mj63G/go-bitswap/message" +) + +var TaskWorkerCount = 8 + +func (bs *Bitswap) startWorkers(px process.Process, ctx context.Context) { + + // Start up workers to handle requests from other nodes for the data on this node + for i := 0; i < TaskWorkerCount; i++ { + i := i + px.Go(func(px process.Process) { + bs.taskWorker(ctx, i) + }) + } + + // Start up a worker to manage sending out provides messages + px.Go(func(px process.Process) { + bs.provideCollector(ctx) + }) + + // Spawn up multiple workers to handle incoming blocks + // consider increasing number if providing blocks bottlenecks + // file transfers + px.Go(bs.provideWorker) +} + +func (bs *Bitswap) taskWorker(ctx context.Context, id int) { + idmap := logging.LoggableMap{"ID": id} + defer log.Debug("bitswap task worker shutting down...") + for { + log.Event(ctx, "Bitswap.TaskWorker.Loop", idmap) + select { + case nextEnvelope := <-bs.engine.Outbox(): + select { + case envelope, ok := <-nextEnvelope: + if !ok { + continue + } + // update the BS ledger to reflect sent message + // TODO: Should only track *useful* messages in ledger + outgoing := bsmsg.New(false) + for _, block := range envelope.Message.Blocks() { + log.Event(ctx, "Bitswap.TaskWorker.Work", logging.LoggableF(func() map[string]interface{} { + return logging.LoggableMap{ + "ID": id, + "Target": envelope.Peer.Pretty(), + "Block": block.Cid().String(), + } + })) + outgoing.AddBlock(block) + } + bs.engine.MessageSent(envelope.Peer, outgoing) + + bs.sendBlocks(ctx, envelope) + bs.counterLk.Lock() + for _, block := range envelope.Message.Blocks() { + bs.counters.blocksSent++ + bs.counters.dataSent += uint64(len(block.RawData())) + } + bs.counterLk.Unlock() + case <-ctx.Done(): + return + } + case <-ctx.Done(): + return + } + } +} + +func (bs *Bitswap) sendBlocks(ctx context.Context, env *engine.Envelope) { + // Blocks need to be sent synchronously to maintain proper backpressure + // throughout the network stack + defer env.Sent() + + msgSize := 0 + msg := bsmsg.New(false) + for _, block := range env.Message.Blocks() { + msgSize += len(block.RawData()) + msg.AddBlock(block) + log.Infof("Sending block %s to %s", block, env.Peer) + } + + bs.sentHistogram.Observe(float64(msgSize)) + err := bs.network.SendMessage(ctx, env.Peer, msg) + if err != nil { + log.Infof("sendblock error: %s", err) + } +} + +func (bs *Bitswap) provideWorker(px process.Process) { + + limit := make(chan struct{}, provideWorkerMax) + + limitedGoProvide := func(k cid.Cid, wid int) { + defer func() { + // replace token when done + <-limit + }() + ev := logging.LoggableMap{"ID": wid} + + ctx := procctx.OnClosingContext(px) // derive ctx from px + defer log.EventBegin(ctx, "Bitswap.ProvideWorker.Work", ev, k).Done() + + ctx, cancel := context.WithTimeout(ctx, provideTimeout) // timeout ctx + defer cancel() + + if err := bs.network.Provide(ctx, k); err != nil { + log.Warning(err) + } + } + + // worker spawner, reads from bs.provideKeys until it closes, spawning a + // _ratelimited_ number of workers to handle each key. + for wid := 2; ; wid++ { + ev := logging.LoggableMap{"ID": 1} + log.Event(procctx.OnClosingContext(px), "Bitswap.ProvideWorker.Loop", ev) + + select { + case <-px.Closing(): + return + case k, ok := <-bs.provideKeys: + if !ok { + log.Debug("provideKeys channel closed") + return + } + select { + case <-px.Closing(): + return + case limit <- struct{}{}: + go limitedGoProvide(k, wid) + } + } + } +} + +func (bs *Bitswap) provideCollector(ctx context.Context) { + defer close(bs.provideKeys) + var toProvide []cid.Cid + var nextKey cid.Cid + var keysOut chan cid.Cid + + for { + select { + case blkey, ok := <-bs.newBlocks: + if !ok { + log.Debug("newBlocks channel closed") + return + } + + if keysOut == nil { + nextKey = blkey + keysOut = bs.provideKeys + } else { + toProvide = append(toProvide, blkey) + } + case keysOut <- nextKey: + if len(toProvide) > 0 { + nextKey = toProvide[0] + toProvide = toProvide[1:] + } else { + keysOut = nil + } + case <-ctx.Done(): + return + } + } +} diff --git a/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/.travis.yml b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/.travis.yml new file mode 100644 index 0000000000..d6b58e855b --- /dev/null +++ b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/.travis.yml @@ -0,0 +1,24 @@ +sudo: required +dist: trusty +language: go + +os: +- linux + +go: +- tip +- 1.11 +- 1.10 + +env: +- ARCH=x86_64 +- ARCH=i686 + +matrix: + fast_finish: true + allow_failures: + - go: tip + +script: +- diff -au <(gofmt -d .) <(printf "") +- go test -race -v ./... diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/LICENSE b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/LICENSE rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/LICENSE diff --git a/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/README.md b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/README.md new file mode 100644 index 0000000000..567645350e --- /dev/null +++ b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/README.md @@ -0,0 +1,120 @@ +# sha256-simd + +Accelerate SHA256 computations in pure Go using AVX512 and AVX2 for Intel and ARM64 for ARM. On AVX512 it provides an up to 8x improvement (over 3 GB/s per core) in comparison to AVX2. + +## Introduction + +This package is designed as a replacement for `crypto/sha256`. For Intel CPUs it has two flavors for AVX512 and AVX2 (AVX/SSE are also supported). For ARM CPUs with the Cryptography Extensions, advantage is taken of the SHA2 instructions resulting in a massive performance improvement. + +This package uses Golang assembly. The AVX512 version is based on the Intel's "multi-buffer crypto library for IPSec" whereas the other Intel implementations are described in "Fast SHA-256 Implementations on Intel Architecture Processors" by J. Guilford et al. + +## New: Support for AVX512 + +We have added support for AVX512 which results in an up to 8x performance improvement over AVX2 (3.0 GHz Xeon Platinum 8124M CPU): + +``` +$ benchcmp avx2.txt avx512.txt +benchmark AVX2 MB/s AVX512 MB/s speedup +BenchmarkHash5M 448.62 3498.20 7.80x +``` + +The original code was developed by Intel as part of the [multi-buffer crypto library](https://github.com/intel/intel-ipsec-mb) for IPSec or more specifically this [AVX512](https://github.com/intel/intel-ipsec-mb/blob/master/avx512/sha256_x16_avx512.asm) implementation. The key idea behind it is to process a total of 16 checksums in parallel by “transposing” 16 (independent) messages of 64 bytes between a total of 16 ZMM registers (each 64 bytes wide). + +Transposing the input messages means that in order to take full advantage of the speedup you need to have a (server) workload where multiple threads are doing SHA256 calculations in parallel. Unfortunately for this algorithm it is not possible for two message blocks processed in parallel to be dependent on one another — because then the (interim) result of the first part of the message has to be an input into the processing of the second part of the message. + +Whereas the original Intel C implementation requires some sort of explicit scheduling of messages to be processed in parallel, for Golang it makes sense to take advantage of channels in order to group messages together and use channels as well for sending back the results (thereby effectively decoupling the calculations). We have implemented a fairly simple scheduling mechanism that seems to work well in practice. + +Due to this different way of scheduling, we decided to use an explicit method to instantiate the AVX512 version. Essentially one or more AVX512 processing servers ([`Avx512Server`](https://github.com/minio/sha256-simd/blob/master/sha256blockAvx512_amd64.go#L294)) have to be created whereby each server can hash over 3 GB/s on a single core. An `hash.Hash` object ([`Avx512Digest`](https://github.com/minio/sha256-simd/blob/master/sha256blockAvx512_amd64.go#L45)) is then instantiated using one of these servers and used in the regular fashion: + +```go +import "github.com/minio/sha256-simd" + +func main() { + server := sha256.NewAvx512Server() + h512 := sha256.NewAvx512(server) + h512.Write(fileBlock) + digest := h512.Sum([]byte{}) +} +``` + +Note that, because of the scheduling overhead, for small messages (< 1 MB) you will be better off using the regular SHA256 hashing (but those are typically not performance critical anyway). Some other tips to get the best performance: +* Have many go routines doing SHA256 calculations in parallel. +* Try to Write() messages in multiples of 64 bytes. +* Try to keep the overall length of messages to a roughly similar size ie. 5 MB (this way all 16 ‘lanes’ in the AVX512 computations are contributing as much as possible). + +More detailed information can be found in this [blog](https://blog.minio.io/accelerate-sha256-up-to-8x-over-3-gb-s-per-core-with-avx512-a0b1d64f78f) post including scaling across cores. + +## Drop-In Replacement + +The following code snippet shows how you can use `github.com/minio/sha256-simd`. This will automatically select the fastest method for the architecture on which it will be executed. + +```go +import "github.com/minio/sha256-simd" + +func main() { + ... + shaWriter := sha256.New() + io.Copy(shaWriter, file) + ... +} +``` + +## Performance + +Below is the speed in MB/s for a single core (ranked fast to slow) for blocks larger than 1 MB. + +| Processor | SIMD | Speed (MB/s) | +| --------------------------------- | ------- | ------------:| +| 3.0 GHz Intel Xeon Platinum 8124M | AVX512 | 3498 | +| 1.2 GHz ARM Cortex-A53 | ARM64 | 638 | +| 3.0 GHz Intel Xeon Platinum 8124M | AVX2 | 449 | +| 3.1 GHz Intel Core i7 | AVX | 362 | +| 3.1 GHz Intel Core i7 | SSE | 299 | + +## asm2plan9s + +In order to be able to work more easily with AVX512/AVX2 instructions, a separate tool was developed to convert SIMD instructions into the corresponding BYTE sequence as accepted by Go assembly. See [asm2plan9s](https://github.com/minio/asm2plan9s) for more information. + +## Why and benefits + +One of the most performance sensitive parts of the [Minio](https://github.com/minio/minio) object storage server is related to SHA256 hash sums calculations. For instance during multi part uploads each part that is uploaded needs to be verified for data integrity by the server. + +Other applications that can benefit from enhanced SHA256 performance are deduplication in storage systems, intrusion detection, version control systems, integrity checking, etc. + +## ARM SHA Extensions + +The 64-bit ARMv8 core has introduced new instructions for SHA1 and SHA2 acceleration as part of the [Cryptography Extensions](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0501f/CHDFJBCJ.html). Below you can see a small excerpt highlighting one of the rounds as is done for the SHA256 calculation process (for full code see [sha256block_arm64.s](https://github.com/minio/sha256-simd/blob/master/sha256block_arm64.s)). + + ``` + sha256h q2, q3, v9.4s + sha256h2 q3, q4, v9.4s + sha256su0 v5.4s, v6.4s + rev32 v8.16b, v8.16b + add v9.4s, v7.4s, v18.4s + mov v4.16b, v2.16b + sha256h q2, q3, v10.4s + sha256h2 q3, q4, v10.4s + sha256su0 v6.4s, v7.4s + sha256su1 v5.4s, v7.4s, v8.4s + ``` + +### Detailed benchmarks + +Benchmarks generated on a 1.2 Ghz Quad-Core ARM Cortex A53 equipped [Pine64](https://www.pine64.com/). + +``` +minio@minio-arm:$ benchcmp golang.txt arm64.txt +benchmark golang arm64 speedup +BenchmarkHash8Bytes-4 0.68 MB/s 5.70 MB/s 8.38x +BenchmarkHash1K-4 5.65 MB/s 326.30 MB/s 57.75x +BenchmarkHash8K-4 6.00 MB/s 570.63 MB/s 95.11x +BenchmarkHash1M-4 6.05 MB/s 638.23 MB/s 105.49x +``` + +## License + +Released under the Apache License v2.0. You can find the complete text in the file LICENSE. + +## Contributing + +Contributions are welcome, please send PRs for any enhancements. diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/appveyor.yml b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/appveyor.yml similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/appveyor.yml rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/appveyor.yml diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_386.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_386.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_386.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_386.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_386.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_386.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_386.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_386.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_amd64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_amd64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_amd64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_amd64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_arm.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_arm.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_arm.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_arm.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_linux_arm64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_linux_arm64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_linux_arm64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_linux_arm64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_other.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_other.go similarity index 93% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_other.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_other.go index e26952a82b..04f26ce884 100644 --- a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_other.go +++ b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_other.go @@ -13,7 +13,7 @@ // limitations under the License. // -// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x +// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x wasm package sha256 diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_others_arm64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_others_arm64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/cpuid_others_arm64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/cpuid_others_arm64.go diff --git a/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/package.json b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/package.json new file mode 100644 index 0000000000..cf4cc8731d --- /dev/null +++ b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/package.json @@ -0,0 +1,16 @@ +{ + "author": "minio", + "bugs": { + "url": "github.com/minio/sha256-simd/issues" + }, + "gx": { + "dvcsimport": "github.com/minio/sha256-simd" + }, + "gxVersion": "0.12.1", + "language": "go", + "license": "Apache-2.0", + "name": "sha256-simd", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.2" +} + diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx2_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx2_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx2_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx2_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx2_amd64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx2_amd64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx2_amd64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx2_amd64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.asm b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.asm similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.asm rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.asm diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx512_amd64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx512_amd64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx_amd64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx_amd64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockAvx_amd64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockAvx_amd64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockSsse_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockSsse_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockSsse_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockSsse_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockSsse_amd64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockSsse_amd64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256blockSsse_amd64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256blockSsse_amd64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_386.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_386.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_386.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_386.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_amd64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_amd64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_amd64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_amd64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm64.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm64.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm64.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm64.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm64.s b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm64.s similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_arm64.s rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_arm64.s diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_noasm.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_noasm.go similarity index 100% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_noasm.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_noasm.go diff --git a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_other.go b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_other.go similarity index 92% rename from vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_other.go rename to vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_other.go index 38e7403733..55aa42b961 100644 --- a/vendor/gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd/sha256block_other.go +++ b/vendor/gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd/sha256block_other.go @@ -13,7 +13,7 @@ // limitations under the License. // -// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x +// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x wasm package sha256 diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/LICENSE b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/LICENSE rename to vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/LICENSE diff --git a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/Makefile b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/Makefile similarity index 100% rename from vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/Makefile rename to vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/Makefile diff --git a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/README.md b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/README.md similarity index 100% rename from vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/README.md rename to vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/README.md diff --git a/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/package.json b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/package.json new file mode 100644 index 0000000000..e227012c5f --- /dev/null +++ b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/package.json @@ -0,0 +1,30 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/whyrusleeping/go-smux-yamux" + }, + "gx": { + "dvcsimport": "github.com/whyrusleeping/go-smux-yamux" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmUNMbRUsVYHi1D14annF7Rr7pQAX7TNLwpRCa975ojKnw", + "name": "yamux", + "version": "1.1.5" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "", + "name": "go-smux-yamux", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "2.0.9" +} + diff --git a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/yamux.go b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/yamux.go similarity index 96% rename from vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/yamux.go rename to vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/yamux.go index 1af38e34f2..1f0eaae339 100644 --- a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/yamux.go +++ b/vendor/gx/ipfs/QmcVFwGS6sjfxVico2bd1gQGRu5A2ymwZunVmMdeV5zEYb/go-smux-yamux/yamux.go @@ -6,7 +6,7 @@ import ( "time" yamux "gx/ipfs/QmUNMbRUsVYHi1D14annF7Rr7pQAX7TNLwpRCa975ojKnw/yamux" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" ) // Conn is a connection to a remote peer. diff --git a/vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/package.json b/vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/package.json new file mode 100644 index 0000000000..a066b1d8a0 --- /dev/null +++ b/vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/package.json @@ -0,0 +1,28 @@ +{ + "author": "why", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/ipfs/go-verifcid" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-verifcid", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.2" +} + diff --git a/vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/validate.go b/vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/validate.go similarity index 90% rename from vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/validate.go rename to vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/validate.go index 78eb38264b..0fe3598318 100644 --- a/vendor/gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid/validate.go +++ b/vendor/gx/ipfs/QmcVd2ApQdbfaYPKhCjj4WoQuxk4CMxPqmNpijKmFLh6qa/go-verifcid/validate.go @@ -3,8 +3,8 @@ package verifcid import ( "fmt" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) var ErrPossiblyInsecureHashFunction = fmt.Errorf("potentially insecure hash functions not allowed") diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/.travis.yml b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/.travis.yml new file mode 100644 index 0000000000..1bf8cd5692 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/.travis.yml @@ -0,0 +1,22 @@ +sudo: false + + +language: go +go: + - 1.11.x + +before_install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/CODEOWNERS b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/CODEOWNERS similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/CODEOWNERS rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/CODEOWNERS diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/LICENSE b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/LICENSE rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/LICENSE diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/Makefile b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/Makefile similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/Makefile rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/Makefile diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/README.md b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/README.md similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/README.md rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/README.md diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/file/unixfile.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/file/unixfile.go new file mode 100644 index 0000000000..e223c46c8c --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/file/unixfile.go @@ -0,0 +1,183 @@ +package unixfile + +import ( + "context" + "errors" + + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// Number to file to prefetch in directories +// TODO: should we allow setting this via context hint? +const prefetchFiles = 4 + +type ufsDirectory struct { + ctx context.Context + dserv ipld.DAGService + dir uio.Directory + size int64 +} + +type ufsIterator struct { + ctx context.Context + files chan *ipld.Link + dserv ipld.DAGService + + curName string + curFile files.Node + + err error + errCh chan error +} + +func (it *ufsIterator) Name() string { + return it.curName +} + +func (it *ufsIterator) Node() files.Node { + return it.curFile +} + +func (it *ufsIterator) Next() bool { + if it.err != nil { + return false + } + + var l *ipld.Link + var ok bool + for !ok { + if it.files == nil && it.errCh == nil { + return false + } + select { + case l, ok = <-it.files: + if !ok { + it.files = nil + } + case err := <-it.errCh: + it.errCh = nil + it.err = err + + if err != nil { + return false + } + } + } + + it.curFile = nil + + nd, err := l.GetNode(it.ctx, it.dserv) + if err != nil { + it.err = err + return false + } + + it.curName = l.Name + it.curFile, it.err = NewUnixfsFile(it.ctx, it.dserv, nd) + return it.err == nil +} + +func (it *ufsIterator) Err() error { + return it.err +} + +func (d *ufsDirectory) Close() error { + return nil +} + +func (d *ufsDirectory) Entries() files.DirIterator { + fileCh := make(chan *ipld.Link, prefetchFiles) + errCh := make(chan error, 1) + go func() { + errCh <- d.dir.ForEachLink(d.ctx, func(link *ipld.Link) error { + if d.ctx.Err() != nil { + return d.ctx.Err() + } + select { + case fileCh <- link: + case <-d.ctx.Done(): + return d.ctx.Err() + } + return nil + }) + + close(errCh) + close(fileCh) + }() + + return &ufsIterator{ + ctx: d.ctx, + files: fileCh, + errCh: errCh, + dserv: d.dserv, + } +} + +func (d *ufsDirectory) Size() (int64, error) { + return d.size, nil +} + +type ufsFile struct { + uio.DagReader +} + +func (f *ufsFile) Size() (int64, error) { + return int64(f.DagReader.Size()), nil +} + +func newUnixfsDir(ctx context.Context, dserv ipld.DAGService, nd *dag.ProtoNode) (files.Directory, error) { + dir, err := uio.NewDirectoryFromNode(dserv, nd) + if err != nil { + return nil, err + } + + size, err := nd.Size() + if err != nil { + return nil, err + } + + return &ufsDirectory{ + ctx: ctx, + dserv: dserv, + + dir: dir, + size: int64(size), + }, nil +} + +func NewUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node) (files.Node, error) { + switch dn := nd.(type) { + case *dag.ProtoNode: + fsn, err := ft.FSNodeFromBytes(dn.Data()) + if err != nil { + return nil, err + } + if fsn.IsDir() { + return newUnixfsDir(ctx, dserv, dn) + } + if fsn.Type() == ft.TSymlink { + return files.NewLinkFile(string(fsn.Data()), nil), nil + } + + case *dag.RawNode: + default: + return nil, errors.New("unknown node type") + } + + dr, err := uio.NewDagReader(ctx, nd, dserv) + if err != nil { + return nil, err + } + + return &ufsFile{ + DagReader: dr, + }, nil +} + +var _ files.Directory = &ufsDirectory{} +var _ files.File = &ufsFile{} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/hamt.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/hamt.go new file mode 100644 index 0000000000..1ce3e15eac --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/hamt.go @@ -0,0 +1,677 @@ +// Package hamt implements a Hash Array Mapped Trie over ipfs merkledag nodes. +// It is implemented mostly as described in the wikipedia article on HAMTs, +// however the table size is variable (usually 256 in our usages) as opposed to +// 32 as suggested in the article. The hash function used is currently +// Murmur3, but this value is configurable (the datastructure reports which +// hash function its using). +// +// The one algorithmic change we implement that is not mentioned in the +// wikipedia article is the collapsing of empty shards. +// Given the following tree: ( '[' = shards, '{' = values ) +// [ 'A' ] -> [ 'B' ] -> { "ABC" } +// | L-> { "ABD" } +// L-> { "ASDF" } +// If we simply removed "ABC", we would end up with a tree where shard 'B' only +// has a single child. This causes two issues, the first, is that now we have +// an extra lookup required to get to "ABD". The second issue is that now we +// have a tree that contains only "ABD", but is not the same tree that we would +// get by simply inserting "ABD" into a new tree. To address this, we always +// check for empty shard nodes upon deletion and prune them to maintain a +// consistent tree, independent of insertion order. +package hamt + +import ( + "context" + "fmt" + "os" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + bitfield "gx/ipfs/QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ/go-bitfield" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + format "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" +) + +const ( + // HashMurmur3 is the multiformats identifier for Murmur3 + HashMurmur3 uint64 = 0x22 +) + +func (ds *Shard) isValueNode() bool { + return ds.key != "" && ds.val != nil +} + +// A Shard represents the HAMT. It should be initialized with NewShard(). +type Shard struct { + cid cid.Cid + + childer *childer + + tableSize int + tableSizeLg2 int + + builder cid.Builder + hashFunc uint64 + + prefixPadStr string + maxpadlen int + + dserv ipld.DAGService + + // leaf node + key string + val *ipld.Link +} + +// NewShard creates a new, empty HAMT shard with the given size. +func NewShard(dserv ipld.DAGService, size int) (*Shard, error) { + ds, err := makeShard(dserv, size) + if err != nil { + return nil, err + } + + ds.hashFunc = HashMurmur3 + return ds, nil +} + +func makeShard(ds ipld.DAGService, size int) (*Shard, error) { + lg2s, err := logtwo(size) + if err != nil { + return nil, err + } + maxpadding := fmt.Sprintf("%X", size-1) + s := &Shard{ + tableSizeLg2: lg2s, + prefixPadStr: fmt.Sprintf("%%0%dX", len(maxpadding)), + maxpadlen: len(maxpadding), + childer: newChilder(ds, size), + tableSize: size, + dserv: ds, + } + + s.childer.sd = s + + return s, nil +} + +// NewHamtFromDag creates new a HAMT shard from the given DAG. +func NewHamtFromDag(dserv ipld.DAGService, nd ipld.Node) (*Shard, error) { + pbnd, ok := nd.(*dag.ProtoNode) + if !ok { + return nil, dag.ErrNotProtobuf + } + + fsn, err := format.FSNodeFromBytes(pbnd.Data()) + if err != nil { + return nil, err + } + + if fsn.Type() != format.THAMTShard { + return nil, fmt.Errorf("node was not a dir shard") + } + + if fsn.HashType() != HashMurmur3 { + return nil, fmt.Errorf("only murmur3 supported as hash function") + } + + size := int(fsn.Fanout()) + + ds, err := makeShard(dserv, size) + if err != nil { + return nil, err + } + + ds.childer.makeChilder(fsn.Data(), pbnd.Links()) + + ds.cid = pbnd.Cid() + ds.hashFunc = fsn.HashType() + ds.builder = pbnd.CidBuilder() + + return ds, nil +} + +// SetCidBuilder sets the CID Builder +func (ds *Shard) SetCidBuilder(builder cid.Builder) { + ds.builder = builder +} + +// CidBuilder gets the CID Builder, may be nil if unset +func (ds *Shard) CidBuilder() cid.Builder { + return ds.builder +} + +// Node serializes the HAMT structure into a merkledag node with unixfs formatting +func (ds *Shard) Node() (ipld.Node, error) { + out := new(dag.ProtoNode) + out.SetCidBuilder(ds.builder) + + sliceIndex := 0 + // TODO: optimized 'for each set bit' + for childIndex := 0; childIndex < ds.tableSize; childIndex++ { + if !ds.childer.has(childIndex) { + continue + } + + ch := ds.childer.child(sliceIndex) + if ch != nil { + clnk, err := ch.Link() + if err != nil { + return nil, err + } + + err = out.AddRawLink(ds.linkNamePrefix(childIndex)+ch.key, clnk) + if err != nil { + return nil, err + } + } else { + // child unloaded, just copy in link with updated name + lnk := ds.childer.link(sliceIndex) + label := lnk.Name[ds.maxpadlen:] + + err := out.AddRawLink(ds.linkNamePrefix(childIndex)+label, lnk) + if err != nil { + return nil, err + } + } + sliceIndex++ + } + + data, err := format.HAMTShardData(ds.childer.bitfield.Bytes(), uint64(ds.tableSize), HashMurmur3) + if err != nil { + return nil, err + } + + out.SetData(data) + + err = ds.dserv.Add(context.TODO(), out) + if err != nil { + return nil, err + } + + return out, nil +} + +func (ds *Shard) makeShardValue(lnk *ipld.Link) (*Shard, error) { + lnk2 := *lnk + s, err := makeShard(ds.dserv, ds.tableSize) + if err != nil { + return nil, err + } + + s.key = lnk.Name[ds.maxpadlen:] + s.val = &lnk2 + + return s, nil +} + +// Set sets 'name' = nd in the HAMT +func (ds *Shard) Set(ctx context.Context, name string, nd ipld.Node) error { + hv := &hashBits{b: hash([]byte(name))} + err := ds.dserv.Add(ctx, nd) + if err != nil { + return err + } + + lnk, err := ipld.MakeLink(nd) + if err != nil { + return err + } + lnk.Name = ds.linkNamePrefix(0) + name + + return ds.modifyValue(ctx, hv, name, lnk) +} + +// Remove deletes the named entry if it exists, this operation is idempotent. +func (ds *Shard) Remove(ctx context.Context, name string) error { + hv := &hashBits{b: hash([]byte(name))} + return ds.modifyValue(ctx, hv, name, nil) +} + +// Find searches for a child node by 'name' within this hamt +func (ds *Shard) Find(ctx context.Context, name string) (*ipld.Link, error) { + hv := &hashBits{b: hash([]byte(name))} + + var out *ipld.Link + err := ds.getValue(ctx, hv, name, func(sv *Shard) error { + out = sv.val + return nil + }) + if err != nil { + return nil, err + } + + return out, nil +} + +type linkType int + +const ( + invalidLink linkType = iota + shardLink + shardValueLink +) + +func (ds *Shard) childLinkType(lnk *ipld.Link) (linkType, error) { + if len(lnk.Name) < ds.maxpadlen { + return invalidLink, fmt.Errorf("invalid link name '%s'", lnk.Name) + } + if len(lnk.Name) == ds.maxpadlen { + return shardLink, nil + } + return shardValueLink, nil +} + +// Link returns a merklelink to this shard node +func (ds *Shard) Link() (*ipld.Link, error) { + if ds.isValueNode() { + return ds.val, nil + } + + nd, err := ds.Node() + if err != nil { + return nil, err + } + + err = ds.dserv.Add(context.TODO(), nd) + if err != nil { + return nil, err + } + + return ipld.MakeLink(nd) +} + +func (ds *Shard) getValue(ctx context.Context, hv *hashBits, key string, cb func(*Shard) error) error { + childIndex, err := hv.Next(ds.tableSizeLg2) + if err != nil { + return err + } + + if ds.childer.has(childIndex) { + child, err := ds.childer.get(ctx, ds.childer.sliceIndex(childIndex)) + if err != nil { + return err + } + + if child.isValueNode() { + if child.key == key { + return cb(child) + } + } else { + return child.getValue(ctx, hv, key, cb) + } + } + + return os.ErrNotExist +} + +// EnumLinks collects all links in the Shard. +func (ds *Shard) EnumLinks(ctx context.Context) ([]*ipld.Link, error) { + var links []*ipld.Link + + linkResults := ds.EnumLinksAsync(ctx) + + for linkResult := range linkResults { + if linkResult.Err != nil { + return links, linkResult.Err + } + links = append(links, linkResult.Link) + } + return links, nil +} + +// ForEachLink walks the Shard and calls the given function. +func (ds *Shard) ForEachLink(ctx context.Context, f func(*ipld.Link) error) error { + return ds.walkTrie(ctx, func(sv *Shard) error { + lnk := sv.val + lnk.Name = sv.key + + return f(lnk) + }) +} + +// EnumLinksAsync returns a channel which will receive Links in the directory +// as they are enumerated, where order is not gauranteed +func (ds *Shard) EnumLinksAsync(ctx context.Context) <-chan format.LinkResult { + linkResults := make(chan format.LinkResult) + ctx, cancel := context.WithCancel(ctx) + go func() { + defer close(linkResults) + defer cancel() + getLinks := makeAsyncTrieGetLinks(ds.dserv, linkResults) + cset := cid.NewSet() + err := dag.EnumerateChildrenAsync(ctx, getLinks, ds.cid, cset.Visit) + if err != nil { + emitResult(ctx, linkResults, format.LinkResult{Link: nil, Err: err}) + } + }() + return linkResults +} + +// makeAsyncTrieGetLinks builds a getLinks function that can be used with EnumerateChildrenAsync +// to iterate a HAMT shard. It takes an IPLD Dag Service to fetch nodes, and a call back that will get called +// on all links to leaf nodes in a HAMT tree, so they can be collected for an EnumLinks operation +func makeAsyncTrieGetLinks(dagService ipld.DAGService, linkResults chan<- format.LinkResult) dag.GetLinks { + + return func(ctx context.Context, currentCid cid.Cid) ([]*ipld.Link, error) { + node, err := dagService.Get(ctx, currentCid) + if err != nil { + return nil, err + } + directoryShard, err := NewHamtFromDag(dagService, node) + if err != nil { + return nil, err + } + + childShards := make([]*ipld.Link, 0, directoryShard.childer.length()) + links := directoryShard.childer.links + for idx := range directoryShard.childer.children { + lnk := links[idx] + lnkLinkType, err := directoryShard.childLinkType(lnk) + + if err != nil { + return nil, err + } + if lnkLinkType == shardLink { + childShards = append(childShards, lnk) + } else { + sv, err := directoryShard.makeShardValue(lnk) + if err != nil { + return nil, err + } + formattedLink := sv.val + formattedLink.Name = sv.key + emitResult(ctx, linkResults, format.LinkResult{Link: formattedLink, Err: nil}) + } + } + return childShards, nil + } +} + +func emitResult(ctx context.Context, linkResults chan<- format.LinkResult, r format.LinkResult) { + // make sure that context cancel is processed first + // the reason is due to the concurrency of EnumerateChildrenAsync + // it's possible for EnumLinksAsync to complete and close the linkResults + // channel before this code runs + select { + case <-ctx.Done(): + return + default: + } + select { + case linkResults <- r: + case <-ctx.Done(): + } +} + +func (ds *Shard) walkTrie(ctx context.Context, cb func(*Shard) error) error { + return ds.childer.each(ctx, func(s *Shard) error { + if s.isValueNode() { + if err := cb(s); err != nil { + return err + } + } else { + if err := s.walkTrie(ctx, cb); err != nil { + return err + } + } + return nil + }) +} + +func (ds *Shard) modifyValue(ctx context.Context, hv *hashBits, key string, val *ipld.Link) error { + idx, err := hv.Next(ds.tableSizeLg2) + if err != nil { + return err + } + + if !ds.childer.has(idx) { + return ds.childer.insert(key, val, idx) + } + + i := ds.childer.sliceIndex(idx) + + child, err := ds.childer.get(ctx, i) + if err != nil { + return err + } + + if child.isValueNode() { + if child.key == key { + // value modification + if val == nil { + return ds.childer.rm(idx) + } + + child.val = val + return nil + } + + if val == nil { + return os.ErrNotExist + } + + // replace value with another shard, one level deeper + ns, err := NewShard(ds.dserv, ds.tableSize) + if err != nil { + return err + } + ns.builder = ds.builder + chhv := &hashBits{ + b: hash([]byte(child.key)), + consumed: hv.consumed, + } + + err = ns.modifyValue(ctx, hv, key, val) + if err != nil { + return err + } + + err = ns.modifyValue(ctx, chhv, child.key, child.val) + if err != nil { + return err + } + + ds.childer.set(ns, i) + return nil + } else { + err := child.modifyValue(ctx, hv, key, val) + if err != nil { + return err + } + + if val == nil { + switch child.childer.length() { + case 0: + // empty sub-shard, prune it + // Note: this shouldnt normally ever happen + // in the event of another implementation creates flawed + // structures, this will help to normalize them. + return ds.childer.rm(idx) + case 1: + nchild := child.childer.children[0] + if nchild.isValueNode() { + // sub-shard with a single value element, collapse it + ds.childer.set(nchild, i) + } + return nil + } + } + + return nil + } +} + +// linkNamePrefix takes in the bitfield index of an entry and returns its hex prefix +func (ds *Shard) linkNamePrefix(idx int) string { + return fmt.Sprintf(ds.prefixPadStr, idx) +} + +// childer wraps the links, children and bitfield +// and provides basic operation (get, rm, insert and set) of manipulating children. +// The slices `links` and `children` are always coordinated to have the entries +// in the same index. A `childIndex` belonging to one of the original `Shard.size` +// entries corresponds to a `sliceIndex` in `links` and `children` (the conversion +// is done through `bitfield`). +type childer struct { + sd *Shard + dserv ipld.DAGService + bitfield bitfield.Bitfield + links []*ipld.Link + children []*Shard +} + +func newChilder(ds ipld.DAGService, size int) *childer { + return &childer{ + dserv: ds, + bitfield: bitfield.NewBitfield(size), + } +} + +func (s *childer) makeChilder(data []byte, links []*ipld.Link) *childer { + s.children = make([]*Shard, len(links)) + s.bitfield.SetBytes(data) + if len(links) > 0 { + s.links = make([]*ipld.Link, len(links)) + copy(s.links, links) + } + + return s +} + +// Return the `sliceIndex` associated with a child. +func (s *childer) sliceIndex(childIndex int) (sliceIndex int) { + return s.bitfield.OnesBefore(childIndex) +} + +func (s *childer) child(sliceIndex int) *Shard { + return s.children[sliceIndex] +} + +func (s *childer) link(sliceIndex int) *ipld.Link { + return s.links[sliceIndex] +} + +func (s *childer) insert(key string, lnk *ipld.Link, idx int) error { + if lnk == nil { + return os.ErrNotExist + } + + lnk.Name = s.sd.linkNamePrefix(idx) + key + i := s.sliceIndex(idx) + sd := &Shard{key: key, val: lnk} + + s.children = append(s.children[:i], append([]*Shard{sd}, s.children[i:]...)...) + s.links = append(s.links[:i], append([]*ipld.Link{nil}, s.links[i:]...)...) + // Add a `nil` placeholder in `links` so the rest of the entries keep the same + // index as `children`. + s.bitfield.SetBit(idx) + + return nil +} + +func (s *childer) set(sd *Shard, i int) { + s.children[i] = sd +} + +func (s *childer) rm(childIndex int) error { + i := s.sliceIndex(childIndex) + + if err := s.check(i); err != nil { + return err + } + + copy(s.children[i:], s.children[i+1:]) + s.children = s.children[:len(s.children)-1] + + copy(s.links[i:], s.links[i+1:]) + s.links = s.links[:len(s.links)-1] + + s.bitfield.UnsetBit(childIndex) + + return nil +} + +// get returns the i'th child of this shard. If it is cached in the +// children array, it will return it from there. Otherwise, it loads the child +// node from disk. +func (s *childer) get(ctx context.Context, sliceIndex int) (*Shard, error) { + if err := s.check(sliceIndex); err != nil { + return nil, err + } + + c := s.child(sliceIndex) + if c != nil { + return c, nil + } + + return s.loadChild(ctx, sliceIndex) +} + +// loadChild reads the i'th child node of this shard from disk and returns it +// as a 'child' interface +func (s *childer) loadChild(ctx context.Context, sliceIndex int) (*Shard, error) { + lnk := s.link(sliceIndex) + lnkLinkType, err := s.sd.childLinkType(lnk) + if err != nil { + return nil, err + } + + var c *Shard + if lnkLinkType == shardLink { + nd, err := lnk.GetNode(ctx, s.dserv) + if err != nil { + return nil, err + } + cds, err := NewHamtFromDag(s.dserv, nd) + if err != nil { + return nil, err + } + + c = cds + } else { + s, err := s.sd.makeShardValue(lnk) + if err != nil { + return nil, err + } + c = s + } + + s.set(c, sliceIndex) + + return c, nil +} + +func (s *childer) has(childIndex int) bool { + return s.bitfield.Bit(childIndex) +} + +func (s *childer) length() int { + return len(s.children) +} + +func (s *childer) each(ctx context.Context, cb func(*Shard) error) error { + for i := range s.children { + c, err := s.get(ctx, i) + if err != nil { + return err + } + + if err := cb(c); err != nil { + return err + } + } + + return nil +} + +func (s *childer) check(sliceIndex int) error { + if sliceIndex >= len(s.children) || sliceIndex < 0 { + return fmt.Errorf("invalid index passed to operate children (likely corrupt bitfield)") + } + + if len(s.children) != len(s.links) { + return fmt.Errorf("inconsistent lengths between children array and Links array") + } + + return nil +} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/util.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/util.go new file mode 100644 index 0000000000..19677be853 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt/util.go @@ -0,0 +1,68 @@ +package hamt + +import ( + "fmt" + + "gx/ipfs/QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx/murmur3" + "math/bits" +) + +// hashBits is a helper that allows the reading of the 'next n bits' as an integer. +type hashBits struct { + b []byte + consumed int +} + +func mkmask(n int) byte { + return (1 << uint(n)) - 1 +} + +// Next returns the next 'i' bits of the hashBits value as an integer, or an +// error if there aren't enough bits. +func (hb *hashBits) Next(i int) (int, error) { + if hb.consumed+i > len(hb.b)*8 { + return 0, fmt.Errorf("sharded directory too deep") + } + return hb.next(i), nil +} + +func (hb *hashBits) next(i int) int { + curbi := hb.consumed / 8 + leftb := 8 - (hb.consumed % 8) + + curb := hb.b[curbi] + if i == leftb { + out := int(mkmask(i) & curb) + hb.consumed += i + return out + } else if i < leftb { + a := curb & mkmask(leftb) // mask out the high bits we don't want + b := a & ^mkmask(leftb-i) // mask out the low bits we don't want + c := b >> uint(leftb-i) // shift whats left down + hb.consumed += i + return int(c) + } else { + out := int(mkmask(leftb) & curb) + out <<= uint(i - leftb) + hb.consumed += leftb + out += hb.next(i - leftb) + return out + } +} + +func logtwo(v int) (int, error) { + if v <= 0 { + return 0, fmt.Errorf("hamt size should be a power of two") + } + lg2 := bits.TrailingZeros(uint(v)) + if 1< 0) that can + // be handled by the loop. + root, fileSize, err := db.NewLeafDataNode(ft.TFile) + if err != nil { + return nil, err + } + + // Each time a DAG of a certain `depth` is filled (because it + // has reached its maximum capacity of `db.Maxlinks()` per node) + // extend it by making it a sub-DAG of a bigger DAG with `depth+1`. + for depth := 1; !db.Done(); depth++ { + + // Add the old `root` as a child of the `newRoot`. + newRoot := db.NewFSNodeOverDag(ft.TFile) + newRoot.AddChild(root, fileSize, db) + + // Fill the `newRoot` (that has the old `root` already as child) + // and make it the current `root` for the next iteration (when + // it will become "old"). + root, fileSize, err = fillNodeRec(db, newRoot, depth) + if err != nil { + return nil, err + } + } + + return root, db.Add(root) +} + +// fillNodeRec will "fill" the given internal (non-leaf) `node` with data by +// adding child nodes to it, either leaf data nodes (if `depth` is 1) or more +// internal nodes with higher depth (and calling itself recursively on them +// until *they* are filled with data). The data to fill the node with is +// provided by DagBuilderHelper. +// +// `node` represents a (sub-)DAG root that is being filled. If called recursively, +// it is `nil`, a new node is created. If it has been called from `Layout` (see +// diagram below) it points to the new root (that increases the depth of the DAG), +// it already has a child (the old root). New children will be added to this new +// root, and those children will in turn be filled (calling `fillNodeRec` +// recursively). +// +// +-------------+ +// | `node` | +// | (new root) | +// +-------------+ +// | +// +-------------+ - - - - - - + - - - - - - - - - - - + +// | | | +// +--------------+ + - - - - - + + - - - - - + +// | (old root) | | new child | | | +// +--------------+ + - - - - - + + - - - - - + +// | | | +// +------+------+ + - - + - - - + +// | | | | +// +=========+ +=========+ + - - - - + + - - - - + +// | Chunk 1 | | Chunk 2 | | Chunk 3 | | Chunk 4 | +// +=========+ +=========+ + - - - - + + - - - - + +// +// The `node` to be filled uses the `FSNodeOverDag` abstraction that allows adding +// child nodes without packing/unpacking the UnixFS layer node (having an internal +// `ft.FSNode` cache). +// +// It returns the `ipld.Node` representation of the passed `node` filled with +// children and the `nodeFileSize` with the total size of the file chunk (leaf) +// nodes stored under this node (parent nodes store this to enable efficient +// seeking through the DAG when reading data later). +// +// warning: **children** pinned indirectly, but input node IS NOT pinned. +func fillNodeRec(db *h.DagBuilderHelper, node *h.FSNodeOverDag, depth int) (filledNode ipld.Node, nodeFileSize uint64, err error) { + if depth < 1 { + return nil, 0, errors.New("attempt to fillNode at depth < 1") + } + + if node == nil { + node = db.NewFSNodeOverDag(ft.TFile) + } + + // Child node created on every iteration to add to parent `node`. + // It can be a leaf node or another internal node. + var childNode ipld.Node + // File size from the child node needed to update the `FSNode` + // in `node` when adding the child. + var childFileSize uint64 + + // While we have room and there is data available to be added. + for node.NumChildren() < db.Maxlinks() && !db.Done() { + + if depth == 1 { + // Base case: add leaf node with data. + childNode, childFileSize, err = db.NewLeafDataNode(ft.TFile) + if err != nil { + return nil, 0, err + } + } else { + // Recursion case: create an internal node to in turn keep + // descending in the DAG and adding child nodes to it. + childNode, childFileSize, err = fillNodeRec(db, nil, depth-1) + if err != nil { + return nil, 0, err + } + } + + err = node.AddChild(childNode, childFileSize, db) + if err != nil { + return nil, 0, err + } + } + + nodeFileSize = node.FileSize() + + // Get the final `dag.ProtoNode` with the `FSNode` data encoded inside. + filledNode, err = node.Commit() + if err != nil { + return nil, 0, err + } + + return filledNode, nodeFileSize, nil +} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/dagbuilder.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/dagbuilder.go new file mode 100644 index 0000000000..562e43e827 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/dagbuilder.go @@ -0,0 +1,409 @@ +package helpers + +import ( + "context" + "errors" + "io" + "os" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + pb "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb" + + files "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + pi "gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo" +) + +var ErrMissingFsRef = errors.New("missing file path or URL, can't create filestore reference") + +// DagBuilderHelper wraps together a bunch of objects needed to +// efficiently create unixfs dag trees +type DagBuilderHelper struct { + dserv ipld.DAGService + spl chunker.Splitter + recvdErr error + rawLeaves bool + nextData []byte // the next item to return. + maxlinks int + cidBuilder cid.Builder + + // Filestore support variables. + // ---------------------------- + // TODO: Encapsulate in `FilestoreNode` (which is basically what they are). + // + // Besides having the path this variable (if set) is used as a flag + // to indicate that Filestore should be used. + fullPath string + stat os.FileInfo + // Keeps track of the current file size added to the DAG (used in + // the balanced builder). It is assumed that the `DagBuilderHelper` + // is not reused to construct another DAG, but a new one (with a + // zero `offset`) is created. + offset uint64 +} + +// DagBuilderParams wraps configuration options to create a DagBuilderHelper +// from a chunker.Splitter. +type DagBuilderParams struct { + // Maximum number of links per intermediate node + Maxlinks int + + // RawLeaves signifies that the importer should use raw ipld nodes as leaves + // instead of using the unixfs TRaw type + RawLeaves bool + + // CID Builder to use if set + CidBuilder cid.Builder + + // DAGService to write blocks to (required) + Dagserv ipld.DAGService + + // NoCopy signals to the chunker that it should track fileinfo for + // filestore adds + NoCopy bool + + // URL if non-empty (and NoCopy is also true) indicates that the + // file will not be stored in the datastore but instead retrieved + // from this location via the urlstore. + URL string +} + +// New generates a new DagBuilderHelper from the given params and a given +// chunker.Splitter as data source. +func (dbp *DagBuilderParams) New(spl chunker.Splitter) (*DagBuilderHelper, error) { + db := &DagBuilderHelper{ + dserv: dbp.Dagserv, + spl: spl, + rawLeaves: dbp.RawLeaves, + cidBuilder: dbp.CidBuilder, + maxlinks: dbp.Maxlinks, + } + if fi, ok := spl.Reader().(files.FileInfo); dbp.NoCopy && ok { + db.fullPath = fi.AbsPath() + db.stat = fi.Stat() + } + + if dbp.URL != "" && dbp.NoCopy { + db.fullPath = dbp.URL + } + + if dbp.NoCopy && db.fullPath == "" { // Enforce NoCopy + return nil, ErrMissingFsRef + } + + return db, nil +} + +// prepareNext consumes the next item from the splitter and puts it +// in the nextData field. it is idempotent-- if nextData is full +// it will do nothing. +func (db *DagBuilderHelper) prepareNext() { + // if we already have data waiting to be consumed, we're ready + if db.nextData != nil || db.recvdErr != nil { + return + } + + db.nextData, db.recvdErr = db.spl.NextBytes() + if db.recvdErr == io.EOF { + db.recvdErr = nil + } +} + +// Done returns whether or not we're done consuming the incoming data. +func (db *DagBuilderHelper) Done() bool { + // ensure we have an accurate perspective on data + // as `done` this may be called before `next`. + db.prepareNext() // idempotent + if db.recvdErr != nil { + return false + } + return db.nextData == nil +} + +// Next returns the next chunk of data to be inserted into the dag +// if it returns nil, that signifies that the stream is at an end, and +// that the current building operation should finish. +func (db *DagBuilderHelper) Next() ([]byte, error) { + db.prepareNext() // idempotent + d := db.nextData + db.nextData = nil // signal we've consumed it + if db.recvdErr != nil { + return nil, db.recvdErr + } + return d, nil +} + +// GetDagServ returns the dagservice object this Helper is using +func (db *DagBuilderHelper) GetDagServ() ipld.DAGService { + return db.dserv +} + +// GetCidBuilder returns the internal `cid.CidBuilder` set in the builder. +func (db *DagBuilderHelper) GetCidBuilder() cid.Builder { + return db.cidBuilder +} + +// NewLeafNode creates a leaf node filled with data. If rawLeaves is +// defined then a raw leaf will be returned. Otherwise, it will create +// and return `FSNodeOverDag` with `fsNodeType`. +func (db *DagBuilderHelper) NewLeafNode(data []byte, fsNodeType pb.Data_DataType) (ipld.Node, error) { + if len(data) > BlockSizeLimit { + return nil, ErrSizeLimitExceeded + } + + if db.rawLeaves { + // Encapsulate the data in a raw node. + if db.cidBuilder == nil { + return dag.NewRawNode(data), nil + } + rawnode, err := dag.NewRawNodeWPrefix(data, db.cidBuilder) + if err != nil { + return nil, err + } + return rawnode, nil + } + + // Encapsulate the data in UnixFS node (instead of a raw node). + fsNodeOverDag := db.NewFSNodeOverDag(fsNodeType) + fsNodeOverDag.SetFileData(data) + node, err := fsNodeOverDag.Commit() + if err != nil { + return nil, err + } + // TODO: Encapsulate this sequence of calls into a function that + // just returns the final `ipld.Node` avoiding going through + // `FSNodeOverDag`. + + return node, nil +} + +// FillNodeLayer will add datanodes as children to the give node until +// it is full in this layer or no more data. +// NOTE: This function creates raw data nodes so it only works +// for the `trickle.Layout`. +func (db *DagBuilderHelper) FillNodeLayer(node *FSNodeOverDag) error { + + // while we have room AND we're not done + for node.NumChildren() < db.maxlinks && !db.Done() { + child, childFileSize, err := db.NewLeafDataNode(ft.TRaw) + if err != nil { + return err + } + + if err := node.AddChild(child, childFileSize, db); err != nil { + return err + } + } + node.Commit() + // TODO: Do we need to commit here? The caller who created the + // `FSNodeOverDag` should be in charge of that. + + return nil +} + +// NewLeafDataNode builds the `node` with the data obtained from the +// Splitter with the given constraints (BlockSizeLimit, RawLeaves) +// specified when creating the DagBuilderHelper. It returns +// `ipld.Node` with the `dataSize` (that will be used to keep track of +// the DAG file size). The size of the data is computed here because +// after that it will be hidden by `NewLeafNode` inside a generic +// `ipld.Node` representation. +func (db *DagBuilderHelper) NewLeafDataNode(fsNodeType pb.Data_DataType) (node ipld.Node, dataSize uint64, err error) { + fileData, err := db.Next() + if err != nil { + return nil, 0, err + } + dataSize = uint64(len(fileData)) + + // Create a new leaf node containing the file chunk data. + node, err = db.NewLeafNode(fileData, fsNodeType) + if err != nil { + return nil, 0, err + } + + // Convert this leaf to a `FilestoreNode` if needed. + node = db.ProcessFileStore(node, dataSize) + + return node, dataSize, nil +} + +// ProcessFileStore generates, if Filestore is being used, the +// `FilestoreNode` representation of the `ipld.Node` that +// contains the file data. If Filestore is not being used just +// return the same node to continue with its addition to the DAG. +// +// The `db.offset` is updated at this point (instead of when +// `NewLeafDataNode` is called, both work in tandem but the +// offset is more related to this function). +func (db *DagBuilderHelper) ProcessFileStore(node ipld.Node, dataSize uint64) ipld.Node { + // Check if Filestore is being used. + if db.fullPath != "" { + // Check if the node is actually a raw node (needed for + // Filestore support). + if _, ok := node.(*dag.RawNode); ok { + fn := &pi.FilestoreNode{ + Node: node, + PosInfo: &pi.PosInfo{ + Offset: db.offset, + FullPath: db.fullPath, + Stat: db.stat, + }, + } + + // Update `offset` with the size of the data generated by `db.Next`. + db.offset += dataSize + + return fn + } + } + + // Filestore is not used, return the same `node` argument. + return node +} + +// Add inserts the given node in the DAGService. +func (db *DagBuilderHelper) Add(node ipld.Node) error { + return db.dserv.Add(context.TODO(), node) +} + +// Maxlinks returns the configured maximum number for links +// for nodes built with this helper. +func (db *DagBuilderHelper) Maxlinks() int { + return db.maxlinks +} + +// FSNodeOverDag encapsulates an `unixfs.FSNode` that will be stored in a +// `dag.ProtoNode`. Instead of just having a single `ipld.Node` that +// would need to be constantly (un)packed to access and modify its +// internal `FSNode` in the process of creating a UnixFS DAG, this +// structure stores an `FSNode` cache to manipulate it (add child nodes) +// directly , and only when the node has reached its final (immutable) state +// (signaled by calling `Commit()`) is it committed to a single (indivisible) +// `ipld.Node`. +// +// It is used mainly for internal (non-leaf) nodes, and for some +// representations of data leaf nodes (that don't use raw nodes or +// Filestore). +// +// It aims to replace the `UnixfsNode` structure which encapsulated too +// many possible node state combinations. +// +// TODO: Revisit the name. +type FSNodeOverDag struct { + dag *dag.ProtoNode + file *ft.FSNode +} + +// NewFSNodeOverDag creates a new `dag.ProtoNode` and `ft.FSNode` +// decoupled from one onther (and will continue in that way until +// `Commit` is called), with `fsNodeType` specifying the type of +// the UnixFS layer node (either `File` or `Raw`). +func (db *DagBuilderHelper) NewFSNodeOverDag(fsNodeType pb.Data_DataType) *FSNodeOverDag { + node := new(FSNodeOverDag) + node.dag = new(dag.ProtoNode) + node.dag.SetCidBuilder(db.GetCidBuilder()) + + node.file = ft.NewFSNode(fsNodeType) + + return node +} + +// NewFSNFromDag reconstructs a FSNodeOverDag node from a given dag node +func (db *DagBuilderHelper) NewFSNFromDag(nd *dag.ProtoNode) (*FSNodeOverDag, error) { + return NewFSNFromDag(nd) +} + +// NewFSNFromDag reconstructs a FSNodeOverDag node from a given dag node +func NewFSNFromDag(nd *dag.ProtoNode) (*FSNodeOverDag, error) { + mb, err := ft.FSNodeFromBytes(nd.Data()) + if err != nil { + return nil, err + } + + return &FSNodeOverDag{ + dag: nd, + file: mb, + }, nil +} + +// AddChild adds a `child` `ipld.Node` to both node layers. The +// `dag.ProtoNode` creates a link to the child node while the +// `ft.FSNode` stores its file size (that is, not the size of the +// node but the size of the file data that it is storing at the +// UnixFS layer). The child is also stored in the `DAGService`. +func (n *FSNodeOverDag) AddChild(child ipld.Node, fileSize uint64, db *DagBuilderHelper) error { + err := n.dag.AddNodeLink("", child) + if err != nil { + return err + } + + n.file.AddBlockSize(fileSize) + + return db.Add(child) +} + +// RemoveChild deletes the child node at the given index. +func (n *FSNodeOverDag) RemoveChild(index int, dbh *DagBuilderHelper) { + n.file.RemoveBlockSize(index) + n.dag.SetLinks(append(n.dag.Links()[:index], n.dag.Links()[index+1:]...)) +} + +// Commit unifies (resolves) the cache nodes into a single `ipld.Node` +// that represents them: the `ft.FSNode` is encoded inside the +// `dag.ProtoNode`. +// +// TODO: Make it read-only after committing, allow to commit only once. +func (n *FSNodeOverDag) Commit() (ipld.Node, error) { + fileData, err := n.file.GetBytes() + if err != nil { + return nil, err + } + n.dag.SetData(fileData) + + return n.dag, nil +} + +// NumChildren returns the number of children of the `ft.FSNode`. +func (n *FSNodeOverDag) NumChildren() int { + return n.file.NumChildren() +} + +// FileSize returns the `Filesize` attribute from the underlying +// representation of the `ft.FSNode`. +func (n *FSNodeOverDag) FileSize() uint64 { + return n.file.FileSize() +} + +// SetFileData stores the `fileData` in the `ft.FSNode`. It +// should be used only when `FSNodeOverDag` represents a leaf +// node (internal nodes don't carry data, just file sizes). +func (n *FSNodeOverDag) SetFileData(fileData []byte) { + n.file.SetData(fileData) +} + +// GetDagNode fills out the proper formatting for the FSNodeOverDag node +// inside of a DAG node and returns the dag node. +// TODO: Check if we have committed (passed the UnixFS information +// to the DAG layer) before returning this. +func (n *FSNodeOverDag) GetDagNode() (ipld.Node, error) { + return n.dag, nil +} + +// GetChild gets the ith child of this node from the given DAGService. +func (n *FSNodeOverDag) GetChild(ctx context.Context, i int, ds ipld.DAGService) (*FSNodeOverDag, error) { + nd, err := n.dag.Links()[i].GetNode(ctx, ds) + if err != nil { + return nil, err + } + + pbn, ok := nd.(*dag.ProtoNode) + if !ok { + return nil, dag.ErrNotProtobuf + } + + return NewFSNFromDag(pbn) +} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/helpers.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/helpers.go new file mode 100644 index 0000000000..075b2d2d29 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers/helpers.go @@ -0,0 +1,30 @@ +package helpers + +import ( + "fmt" +) + +// BlockSizeLimit specifies the maximum size an imported block can have. +var BlockSizeLimit = 1048576 // 1 MB + +// rough estimates on expected sizes +var roughLinkBlockSize = 1 << 13 // 8KB +var roughLinkSize = 34 + 8 + 5 // sha256 multihash + size + no name + protobuf framing + +// DefaultLinksPerBlock governs how the importer decides how many links there +// will be per block. This calculation is based on expected distributions of: +// * the expected distribution of block sizes +// * the expected distribution of link sizes +// * desired access speed +// For now, we use: +// +// var roughLinkBlockSize = 1 << 13 // 8KB +// var roughLinkSize = 34 + 8 + 5 // sha256 multihash + size + no name +// // + protobuf framing +// var DefaultLinksPerBlock = (roughLinkBlockSize / roughLinkSize) +// = ( 8192 / 47 ) +// = (approximately) 174 +var DefaultLinksPerBlock = roughLinkBlockSize / roughLinkSize + +// ErrSizeLimitExceeded signals that a block is larger than BlockSizeLimit. +var ErrSizeLimitExceeded = fmt.Errorf("object size limit exceeded") diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/importer.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/importer.go new file mode 100644 index 0000000000..41fcfb84df --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/importer.go @@ -0,0 +1,41 @@ +// Package importer implements utilities used to create IPFS DAGs from files +// and readers. +package importer + +import ( + bal "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/balanced" + h "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers" + trickle "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle" + + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// BuildDagFromReader creates a DAG given a DAGService and a Splitter +// implementation (Splitters are io.Readers), using a Balanced layout. +func BuildDagFromReader(ds ipld.DAGService, spl chunker.Splitter) (ipld.Node, error) { + dbp := h.DagBuilderParams{ + Dagserv: ds, + Maxlinks: h.DefaultLinksPerBlock, + } + db, err := dbp.New(spl) + if err != nil { + return nil, err + } + return bal.Layout(db) +} + +// BuildTrickleDagFromReader creates a DAG given a DAGService and a Splitter +// implementation (Splitters are io.Readers), using a Trickle Layout. +func BuildTrickleDagFromReader(ds ipld.DAGService, spl chunker.Splitter) (ipld.Node, error) { + dbp := h.DagBuilderParams{ + Dagserv: ds, + Maxlinks: h.DefaultLinksPerBlock, + } + + db, err := dbp.New(spl) + if err != nil { + return nil, err + } + return trickle.Layout(db) +} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle/trickledag.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle/trickledag.go new file mode 100644 index 0000000000..67dec0c4d5 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle/trickledag.go @@ -0,0 +1,389 @@ +// Package trickle allows to build trickle DAGs. +// In this type of DAG, non-leave nodes are first filled +// with data leaves, and then incorporate "layers" of subtrees +// as additional links. +// +// Each layer is a trickle sub-tree and is limited by an increasing +// maximum depth. Thus, the nodes first layer +// can only hold leaves (depth 1) but subsequent layers can grow deeper. +// By default, this module places 4 nodes per layer (that is, 4 subtrees +// of the same maximum depth before increasing it). +// +// Trickle DAGs are very good for sequentially reading data, as the +// first data leaves are directly reachable from the root and those +// coming next are always nearby. They are +// suited for things like streaming applications. +package trickle + +import ( + "context" + "errors" + "fmt" + + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + h "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// depthRepeat specifies how many times to append a child tree of a +// given depth. Higher values increase the width of a given node, which +// improves seek speeds. +const depthRepeat = 4 + +// Layout builds a new DAG with the trickle format using the provided +// DagBuilderHelper. See the module's description for a more detailed +// explanation. +func Layout(db *h.DagBuilderHelper) (ipld.Node, error) { + newRoot := db.NewFSNodeOverDag(ft.TFile) + root, _, err := fillTrickleRec(db, newRoot, -1) + if err != nil { + return nil, err + } + + return root, db.Add(root) +} + +// fillTrickleRec creates a trickle (sub-)tree with an optional maximum specified depth +// in the case maxDepth is greater than zero, or with unlimited depth otherwise +// (where the DAG builder will signal the end of data to end the function). +func fillTrickleRec(db *h.DagBuilderHelper, node *h.FSNodeOverDag, maxDepth int) (filledNode ipld.Node, nodeFileSize uint64, err error) { + // Always do this, even in the base case + if err := db.FillNodeLayer(node); err != nil { + return nil, 0, err + } + + // For each depth in [1, `maxDepth`) (or without limit if `maxDepth` is -1, + // initial call from `Layout`) add `depthRepeat` sub-graphs of that depth. + for depth := 1; maxDepth == -1 || depth < maxDepth; depth++ { + if db.Done() { + break + // No more data, stop here, posterior append calls will figure out + // where we left off. + } + + for repeatIndex := 0; repeatIndex < depthRepeat && !db.Done(); repeatIndex++ { + + childNode, childFileSize, err := fillTrickleRec(db, db.NewFSNodeOverDag(ft.TFile), depth) + if err != nil { + return nil, 0, err + } + + if err := node.AddChild(childNode, childFileSize, db); err != nil { + return nil, 0, err + } + } + } + + // Get the final `dag.ProtoNode` with the `FSNode` data encoded inside. + filledNode, err = node.Commit() + if err != nil { + return nil, 0, err + } + + return filledNode, node.FileSize(), nil +} + +// Append appends the data in `db` to the dag, using the Trickledag format +func Append(ctx context.Context, basen ipld.Node, db *h.DagBuilderHelper) (out ipld.Node, errOut error) { + base, ok := basen.(*dag.ProtoNode) + if !ok { + return nil, dag.ErrNotProtobuf + } + + // Convert to unixfs node for working with easily + + fsn, err := h.NewFSNFromDag(base) + if err != nil { + return nil, err + } + + // Get depth of this 'tree' + depth, repeatNumber := trickleDepthInfo(fsn, db.Maxlinks()) + if depth == 0 { + // If direct blocks not filled... + if err := db.FillNodeLayer(fsn); err != nil { + return nil, err + } + + if db.Done() { + // TODO: If `FillNodeLayer` stop `Commit`ing this should be + // the place (besides the function end) to call it. + return fsn.GetDagNode() + } + + // If continuing, our depth has increased by one + depth++ + } + + // Last child in this node may not be a full tree, lets fill it up. + if err := appendFillLastChild(ctx, fsn, depth-1, repeatNumber, db); err != nil { + return nil, err + } + + // after appendFillLastChild, our depth is now increased by one + if !db.Done() { + depth++ + } + + // Now, continue filling out tree like normal + for i := depth; !db.Done(); i++ { + for j := 0; j < depthRepeat && !db.Done(); j++ { + nextChild := db.NewFSNodeOverDag(ft.TFile) + childNode, childFileSize, err := fillTrickleRec(db, nextChild, i) + if err != nil { + return nil, err + } + err = fsn.AddChild(childNode, childFileSize, db) + if err != nil { + return nil, err + } + } + } + _, err = fsn.Commit() + if err != nil { + return nil, err + } + return fsn.GetDagNode() +} + +func appendFillLastChild(ctx context.Context, fsn *h.FSNodeOverDag, depth int, repeatNumber int, db *h.DagBuilderHelper) error { + if fsn.NumChildren() <= db.Maxlinks() { + return nil + } + // TODO: Why do we need this check, didn't the caller already take + // care of this? + + // Recursive step, grab last child + last := fsn.NumChildren() - 1 + lastChild, err := fsn.GetChild(ctx, last, db.GetDagServ()) + if err != nil { + return err + } + + // Fill out last child (may not be full tree) + newChild, nchildSize, err := appendRec(ctx, lastChild, db, depth-1) + if err != nil { + return err + } + + // Update changed child in parent node + fsn.RemoveChild(last, db) + filledNode, err := newChild.Commit() + if err != nil { + return err + } + err = fsn.AddChild(filledNode, nchildSize, db) + if err != nil { + return err + } + + // Partially filled depth layer + if repeatNumber != 0 { + for ; repeatNumber < depthRepeat && !db.Done(); repeatNumber++ { + nextChild := db.NewFSNodeOverDag(ft.TFile) + childNode, childFileSize, err := fillTrickleRec(db, nextChild, depth) + if err != nil { + return err + } + + if err := fsn.AddChild(childNode, childFileSize, db); err != nil { + return err + } + } + } + + return nil +} + +// recursive call for Append +func appendRec(ctx context.Context, fsn *h.FSNodeOverDag, db *h.DagBuilderHelper, maxDepth int) (*h.FSNodeOverDag, uint64, error) { + if maxDepth == 0 || db.Done() { + return fsn, fsn.FileSize(), nil + } + + // Get depth of this 'tree' + depth, repeatNumber := trickleDepthInfo(fsn, db.Maxlinks()) + if depth == 0 { + // If direct blocks not filled... + if err := db.FillNodeLayer(fsn); err != nil { + return nil, 0, err + } + depth++ + } + // TODO: Same as `appendFillLastChild`, when is this case possible? + + // If at correct depth, no need to continue + if depth == maxDepth { + return fsn, fsn.FileSize(), nil + } + + if err := appendFillLastChild(ctx, fsn, depth, repeatNumber, db); err != nil { + return nil, 0, err + } + + // after appendFillLastChild, our depth is now increased by one + if !db.Done() { + depth++ + } + + // Now, continue filling out tree like normal + for i := depth; i < maxDepth && !db.Done(); i++ { + for j := 0; j < depthRepeat && !db.Done(); j++ { + nextChild := db.NewFSNodeOverDag(ft.TFile) + childNode, childFileSize, err := fillTrickleRec(db, nextChild, i) + if err != nil { + return nil, 0, err + } + + if err := fsn.AddChild(childNode, childFileSize, db); err != nil { + return nil, 0, err + } + } + } + + return fsn, fsn.FileSize(), nil +} + +// Deduce where we left off in `fillTrickleRec`, returns the `depth` +// with which new sub-graphs were being added and, within that depth, +// in which `repeatNumber` of the total `depthRepeat` we should add. +func trickleDepthInfo(node *h.FSNodeOverDag, maxlinks int) (depth int, repeatNumber int) { + n := node.NumChildren() + + if n < maxlinks { + // We didn't even added the initial `maxlinks` leaf nodes (`FillNodeLayer`). + return 0, 0 + } + + nonLeafChildren := n - maxlinks + // The number of non-leaf child nodes added in `fillTrickleRec` (after + // the `FillNodeLayer` call). + + depth = nonLeafChildren/depthRepeat + 1 + // "Deduplicate" the added `depthRepeat` sub-graphs at each depth + // (rounding it up since we may be on an unfinished depth with less + // than `depthRepeat` sub-graphs). + + repeatNumber = nonLeafChildren % depthRepeat + // What's left after taking full depths of `depthRepeat` sub-graphs + // is the current `repeatNumber` we're at (this fractional part is + // what we rounded up before). + + return +} + +// VerifyParams is used by VerifyTrickleDagStructure +type VerifyParams struct { + Getter ipld.NodeGetter + Direct int + LayerRepeat int + Prefix *cid.Prefix + RawLeaves bool +} + +// VerifyTrickleDagStructure checks that the given dag matches exactly the trickle dag datastructure +// layout +func VerifyTrickleDagStructure(nd ipld.Node, p VerifyParams) error { + return verifyTDagRec(nd, -1, p) +} + +// Recursive call for verifying the structure of a trickledag +func verifyTDagRec(n ipld.Node, depth int, p VerifyParams) error { + codec := cid.DagProtobuf + if depth == 0 { + if len(n.Links()) > 0 { + return errors.New("expected direct block") + } + // zero depth dag is raw data block + switch nd := n.(type) { + case *dag.ProtoNode: + fsn, err := ft.FSNodeFromBytes(nd.Data()) + if err != nil { + return err + } + + if fsn.Type() != ft.TRaw { + return errors.New("expected raw block") + } + + if p.RawLeaves { + return errors.New("expected raw leaf, got a protobuf node") + } + case *dag.RawNode: + if !p.RawLeaves { + return errors.New("expected protobuf node as leaf") + } + codec = cid.Raw + default: + return errors.New("expected ProtoNode or RawNode") + } + } + + // verify prefix + if p.Prefix != nil { + prefix := n.Cid().Prefix() + expect := *p.Prefix // make a copy + expect.Codec = uint64(codec) + if codec == cid.Raw && expect.Version == 0 { + expect.Version = 1 + } + if expect.MhLength == -1 { + expect.MhLength = prefix.MhLength + } + if prefix != expect { + return fmt.Errorf("unexpected cid prefix: expected: %v; got %v", expect, prefix) + } + } + + if depth == 0 { + return nil + } + + nd, ok := n.(*dag.ProtoNode) + if !ok { + return errors.New("expected ProtoNode") + } + + // Verify this is a branch node + fsn, err := ft.FSNodeFromBytes(nd.Data()) + if err != nil { + return err + } + + if fsn.Type() != ft.TFile { + return fmt.Errorf("expected file as branch node, got: %s", fsn.Type()) + } + + if len(fsn.Data()) > 0 { + return errors.New("branch node should not have data") + } + + for i := 0; i < len(nd.Links()); i++ { + child, err := nd.Links()[i].GetNode(context.TODO(), p.Getter) + if err != nil { + return err + } + + if i < p.Direct { + // Direct blocks + err := verifyTDagRec(child, 0, p) + if err != nil { + return err + } + } else { + // Recursive trickle dags + rdepth := ((i - p.Direct) / p.LayerRepeat) + 1 + if rdepth >= depth && depth > 0 { + return errors.New("child dag was too deep") + } + err := verifyTDagRec(child, rdepth, p) + if err != nil { + return err + } + } + } + return nil +} diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/dagreader.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/dagreader.go new file mode 100644 index 0000000000..880213c174 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/dagreader.go @@ -0,0 +1,491 @@ +package io + +import ( + "bytes" + "context" + "errors" + "io" + + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + unixfs "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" +) + +// Common errors +var ( + ErrIsDir = errors.New("this dag node is a directory") + ErrCantReadSymlinks = errors.New("cannot currently read symlinks") + ErrUnkownNodeType = errors.New("unknown node type") +) + +// TODO: Rename the `DagReader` interface, this doesn't read *any* DAG, just +// DAGs with UnixFS node (and it *belongs* to the `unixfs` package). Some +// alternatives: `FileReader`, `UnixFSFileReader`, `UnixFSReader`. + +// A DagReader provides read-only read and seek acess to a unixfs file. +// Different implementations of readers are used for the different +// types of unixfs/protobuf-encoded nodes. +type DagReader interface { + ReadSeekCloser + Size() uint64 + CtxReadFull(context.Context, []byte) (int, error) +} + +// A ReadSeekCloser implements interfaces to read, copy, seek and close. +type ReadSeekCloser interface { + io.Reader + io.Seeker + io.Closer + io.WriterTo +} + +// NewDagReader creates a new reader object that reads the data represented by +// the given node, using the passed in DAGService for data retrieval. +func NewDagReader(ctx context.Context, n ipld.Node, serv ipld.NodeGetter) (DagReader, error) { + var size uint64 + + switch n := n.(type) { + case *mdag.RawNode: + size = uint64(len(n.RawData())) + + case *mdag.ProtoNode: + fsNode, err := unixfs.FSNodeFromBytes(n.Data()) + if err != nil { + return nil, err + } + + switch fsNode.Type() { + case unixfs.TFile, unixfs.TRaw: + size = fsNode.FileSize() + + case unixfs.TDirectory, unixfs.THAMTShard: + // Dont allow reading directories + return nil, ErrIsDir + + case unixfs.TMetadata: + if len(n.Links()) == 0 { + return nil, errors.New("incorrectly formatted metadata object") + } + child, err := n.Links()[0].GetNode(ctx, serv) + if err != nil { + return nil, err + } + + childpb, ok := child.(*mdag.ProtoNode) + if !ok { + return nil, mdag.ErrNotProtobuf + } + return NewDagReader(ctx, childpb, serv) + case unixfs.TSymlink: + return nil, ErrCantReadSymlinks + default: + return nil, unixfs.ErrUnrecognizedType + } + default: + return nil, ErrUnkownNodeType + } + + ctxWithCancel, cancel := context.WithCancel(ctx) + + return &dagReader{ + ctx: ctxWithCancel, + cancel: cancel, + serv: serv, + size: size, + rootNode: n, + dagWalker: ipld.NewWalker(ctxWithCancel, ipld.NewNavigableIPLDNode(n, serv)), + }, nil +} + +// dagReader provides a way to easily read the data contained in a dag. +type dagReader struct { + + // Structure to perform the DAG iteration and search, the reader + // just needs to add logic to the `Visitor` callback passed to + // `Iterate` and `Seek`. + dagWalker *ipld.Walker + + // Buffer with the data extracted from the current node being visited. + // To avoid revisiting a node to complete a (potential) partial read + // (or read after seek) the node's data is fully extracted in a single + // `readNodeDataBuffer` operation. + currentNodeData *bytes.Reader + + // Implements the `Size()` API. + size uint64 + + // Current offset for the read head within the DAG file. + offset int64 + + // Root node of the DAG, stored to re-create the `dagWalker` (effectively + // re-setting the position of the reader, used during `Seek`). + rootNode ipld.Node + + // Context passed to the `dagWalker`, the `cancel` function is used to + // cancel read operations (cancelling requested child node promises, + // see `ipld.NavigableIPLDNode.FetchChild` for details). + ctx context.Context + cancel func() + + // Passed to the `dagWalker` that will use it to request nodes. + // TODO: Revisit name. + serv ipld.NodeGetter +} + +// Size returns the total size of the data from the DAG structured file. +func (dr *dagReader) Size() uint64 { + return dr.size +} + +// Read implements the `io.Reader` interface through the `CtxReadFull` +// method using the DAG reader's internal context. +func (dr *dagReader) Read(b []byte) (int, error) { + return dr.CtxReadFull(dr.ctx, b) +} + +// CtxReadFull reads data from the DAG structured file. It always +// attempts a full read of the DAG until the `out` buffer is full. +// It uses the `Walker` structure to iterate the file DAG and read +// every node's data into the `out` buffer. +func (dr *dagReader) CtxReadFull(ctx context.Context, out []byte) (n int, err error) { + // Set the `dagWalker`'s context to the `ctx` argument, it will be used + // to fetch the child node promises (see + // `ipld.NavigableIPLDNode.FetchChild` for details). + dr.dagWalker.SetContext(ctx) + + // If there was a partially read buffer from the last visited + // node read it before visiting a new one. + if dr.currentNodeData != nil { + // TODO: Move this check inside `readNodeDataBuffer`? + n = dr.readNodeDataBuffer(out) + + if n == len(out) { + return n, nil + // Output buffer full, no need to traverse the DAG. + } + } + + // Iterate the DAG calling the passed `Visitor` function on every node + // to read its data into the `out` buffer, stop if there is an error or + // if the entire DAG is traversed (`EndOfDag`). + err = dr.dagWalker.Iterate(func(visitedNode ipld.NavigableNode) error { + node := ipld.ExtractIPLDNode(visitedNode) + + // Skip internal nodes, they shouldn't have any file data + // (see the `balanced` package for more details). + if len(node.Links()) > 0 { + return nil + } + + err = dr.saveNodeData(node) + if err != nil { + return err + } + // Save the leaf node file data in a buffer in case it is only + // partially read now and future `CtxReadFull` calls reclaim the + // rest (as each node is visited only once during `Iterate`). + // + // TODO: We could check if the entire node's data can fit in the + // remaining `out` buffer free space to skip this intermediary step. + + n += dr.readNodeDataBuffer(out[n:]) + + if n == len(out) { + // Output buffer full, no need to keep traversing the DAG, + // signal the `Walker` to pause the iteration. + dr.dagWalker.Pause() + } + + return nil + }) + + if err == ipld.EndOfDag { + return n, io.EOF + // Reached the end of the (DAG) file, no more data to read. + } else if err != nil { + return n, err + // Pass along any other errors from the `Visitor`. + } + + return n, nil +} + +// Save the UnixFS `node`'s data into the internal `currentNodeData` buffer to +// later move it to the output buffer (`Read`) or seek into it (`Seek`). +func (dr *dagReader) saveNodeData(node ipld.Node) error { + extractedNodeData, err := unixfs.ReadUnixFSNodeData(node) + if err != nil { + return err + } + + dr.currentNodeData = bytes.NewReader(extractedNodeData) + return nil +} + +// Read the `currentNodeData` buffer into `out`. This function can't have +// any errors as it's always reading from a `bytes.Reader` and asking only +// the available data in it. +func (dr *dagReader) readNodeDataBuffer(out []byte) int { + + n, _ := dr.currentNodeData.Read(out) + // Ignore the error as the EOF may not be returned in the first + // `Read` call, explicitly ask for an empty buffer below to check + // if we've reached the end. + + if dr.currentNodeData.Len() == 0 { + dr.currentNodeData = nil + // Signal that the buffer was consumed (for later `Read` calls). + // This shouldn't return an EOF error as it's just the end of a + // single node's data, not the entire DAG. + } + + dr.offset += int64(n) + // TODO: Should `offset` be incremented here or in the calling function? + // (Doing it here saves LoC but may be confusing as it's more hidden). + + return n +} + +// Similar to `readNodeDataBuffer` but it writes the contents to +// an `io.Writer` argument. +// +// TODO: Check what part of the logic between the two functions +// can be extracted away. +func (dr *dagReader) writeNodeDataBuffer(w io.Writer) (int64, error) { + + n, err := dr.currentNodeData.WriteTo(w) + if err != nil { + return n, err + } + + if dr.currentNodeData.Len() == 0 { + dr.currentNodeData = nil + // Signal that the buffer was consumed (for later `Read` calls). + // This shouldn't return an EOF error as it's just the end of a + // single node's data, not the entire DAG. + } + + dr.offset += int64(n) + return n, nil +} + +// WriteTo writes to the given writer. +// This follows the `bytes.Reader.WriteTo` implementation +// where it starts from the internal index that may have +// been modified by other `Read` calls. +// +// TODO: This implementation is very similar to `CtxReadFull`, +// the common parts should be abstracted away. +func (dr *dagReader) WriteTo(w io.Writer) (n int64, err error) { + // Use the internal reader's context to fetch the child node promises + // (see `ipld.NavigableIPLDNode.FetchChild` for details). + dr.dagWalker.SetContext(dr.ctx) + + // If there was a partially read buffer from the last visited + // node read it before visiting a new one. + if dr.currentNodeData != nil { + n, err = dr.writeNodeDataBuffer(w) + if err != nil { + return n, err + } + } + + // Iterate the DAG calling the passed `Visitor` function on every node + // to read its data into the `out` buffer, stop if there is an error or + // if the entire DAG is traversed (`EndOfDag`). + err = dr.dagWalker.Iterate(func(visitedNode ipld.NavigableNode) error { + node := ipld.ExtractIPLDNode(visitedNode) + + // Skip internal nodes, they shouldn't have any file data + // (see the `balanced` package for more details). + if len(node.Links()) > 0 { + return nil + } + + err = dr.saveNodeData(node) + if err != nil { + return err + } + // Save the leaf node file data in a buffer in case it is only + // partially read now and future `CtxReadFull` calls reclaim the + // rest (as each node is visited only once during `Iterate`). + + written, err := dr.writeNodeDataBuffer(w) + n += written + if err != nil { + return err + } + + return nil + }) + + if err == ipld.EndOfDag { + return n, nil + } + + return n, err +} + +// Close the reader (cancelling fetch node operations requested with +// the internal context, that is, `Read` calls but not `CtxReadFull` +// with user-supplied contexts). +func (dr *dagReader) Close() error { + dr.cancel() + return nil +} + +// Seek implements `io.Seeker` seeking to a given offset in the DAG file, +// it matches the standard unix `seek`. It moves the position of the internal +// `dagWalker` and may also leave a `currentNodeData` buffer loaded in case +// the seek is performed to the middle of the data in a node. +// +// TODO: Support seeking from the current position (relative seek) +// through the `dagWalker` in `io.SeekCurrent`. +func (dr *dagReader) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + if offset < 0 { + return -1, errors.New("invalid offset") + } + + if offset == dr.offset { + return offset, nil + // Already at the requested `offset`, nothing to do. + } + + left := offset + // Amount left to seek. + + // Seek from the beginning of the DAG. + dr.resetPosition() + + // Use the internal reader's context to fetch the child node promises + // (see `ipld.NavigableIPLDNode.FetchChild` for details). + dr.dagWalker.SetContext(dr.ctx) + // TODO: Performance: we could adjust here `preloadSize` of + // `ipld.NavigableIPLDNode` also, when seeking we only want + // to fetch one child at a time. + + // Seek the DAG by calling the provided `Visitor` function on every + // node the `dagWalker` descends to while searching which can be + // either an internal or leaf node. In the internal node case, check + // the child node sizes and set the corresponding child index to go + // down to next. In the leaf case (last visit of the search), if there + // is still an amount `left` to seek do it inside the node's data + // saved in the `currentNodeData` buffer, leaving it ready for a `Read` + // call. + err := dr.dagWalker.Seek(func(visitedNode ipld.NavigableNode) error { + node := ipld.ExtractIPLDNode(visitedNode) + + if len(node.Links()) > 0 { + // Internal node, should be a `mdag.ProtoNode` containing a + // `unixfs.FSNode` (see the `balanced` package for more details). + fsNode, err := unixfs.ExtractFSNode(node) + if err != nil { + return err + } + + // If there aren't enough size hints don't seek + // (see the `io.EOF` handling error comment below). + if fsNode.NumChildren() != len(node.Links()) { + return io.EOF + } + + // Internal nodes have no data, so just iterate through the + // sizes of its children (advancing the child index of the + // `dagWalker`) to find where we need to go down to next in + // the search. + for { + childSize := fsNode.BlockSize(int(dr.dagWalker.ActiveChildIndex())) + + if childSize > uint64(left) { + // This child's data contains the position requested + // in `offset`, go down this child. + return nil + } + + // Else, skip this child. + left -= int64(childSize) + err := dr.dagWalker.NextChild() + if err == ipld.ErrNextNoChild { + // No more child nodes available, nothing to do, + // the `Seek` will stop on its own. + return nil + } else if err != nil { + return err + // Pass along any other errors (that may in future + // implementations be returned by `Next`) to stop + // the search. + } + } + + } else { + // Leaf node, seek inside its data. + err := dr.saveNodeData(node) + if err != nil { + return err + } + + _, err = dr.currentNodeData.Seek(left, io.SeekStart) + if err != nil { + return err + } + // The corner case of a DAG consisting only of a single (leaf) + // node should make no difference here. In that case, where the + // node doesn't have a parent UnixFS node with size hints, this + // implementation would allow this `Seek` to be called with an + // argument larger than the buffer size which normally wouldn't + // happen (because we would skip the node based on the size + // hint) but that would just mean that a future `CtxReadFull` + // call would read no data from the `currentNodeData` buffer. + // TODO: Re-check this reasoning. + + return nil + // In the leaf node case the search will stop here. + } + }) + + if err == io.EOF { + // TODO: Taken from https://github.com/ipfs/go-ipfs/pull/4320, + // check if still valid. + // Return negative number if we can't figure out the file size. Using io.EOF + // for this seems to be good(-enough) solution as it's only returned by + // precalcNextBuf when we step out of file range. + // This is needed for gateway to function properly + return -1, nil + } + + if err != nil { + return 0, err + } + + dr.offset = offset + return dr.offset, nil + + case io.SeekCurrent: + if offset == 0 { + return dr.offset, nil + } + + return dr.Seek(dr.offset+offset, io.SeekStart) + // TODO: Performance. This can be improved supporting relative + // searches in the `Walker` (see `Walker.Seek`). + + case io.SeekEnd: + return dr.Seek(int64(dr.Size())+offset, io.SeekStart) + + default: + return 0, errors.New("invalid whence") + } +} + +// Reset the reader position by resetting the `dagWalker` and discarding +// any partially used node's data in the `currentNodeData` buffer, used +// in the `SeekStart` case. +func (dr *dagReader) resetPosition() { + dr.currentNodeData = nil + + dr.dagWalker = ipld.NewWalker(dr.ctx, ipld.NewNavigableIPLDNode(dr.rootNode, dr.serv)) + // TODO: This could be avoided (along with storing the `dr.rootNode` and + // `dr.serv` just for this call) if `Reset` is supported in the `Walker`. +} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/directory.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/directory.go similarity index 84% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/directory.go rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/directory.go index 9deada365b..8e73f7a31b 100644 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/directory.go +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/directory.go @@ -5,12 +5,13 @@ import ( "fmt" "os" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - format "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - hamt "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt" + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" + format "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + hamt "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt" + + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // UseHAMTSharding is a global flag that signifies whether or not to use the @@ -38,6 +39,10 @@ type Directory interface { // ForEachLink applies the given function to Links in the directory. ForEachLink(context.Context, func(*ipld.Link) error) error + // EnumLinksAsync returns a channel which will receive Links in the directory + // as they are enumerated, where order is not gauranteed + EnumLinksAsync(context.Context) <-chan format.LinkResult + // Links returns the all the links in the directory node. Links(context.Context) ([]*ipld.Link, error) @@ -141,6 +146,26 @@ func (d *BasicDirectory) AddChild(ctx context.Context, name string, node ipld.No return d.node.AddNodeLink(name, node) } +// EnumLinksAsync returns a channel which will receive Links in the directory +// as they are enumerated, where order is not gauranteed +func (d *BasicDirectory) EnumLinksAsync(ctx context.Context) <-chan format.LinkResult { + linkResults := make(chan format.LinkResult) + go func() { + defer close(linkResults) + for _, l := range d.node.Links() { + select { + case linkResults <- format.LinkResult{ + Link: l, + Err: nil, + }: + case <-ctx.Done(): + return + } + } + }() + return linkResults +} + // ForEachLink implements the `Directory` interface. func (d *BasicDirectory) ForEachLink(ctx context.Context, f func(*ipld.Link) error) error { for _, l := range d.node.Links() { @@ -226,6 +251,12 @@ func (d *HAMTDirectory) ForEachLink(ctx context.Context, f func(*ipld.Link) erro return d.shard.ForEachLink(ctx, f) } +// EnumLinksAsync returns a channel which will receive Links in the directory +// as they are enumerated, where order is not gauranteed +func (d *HAMTDirectory) EnumLinksAsync(ctx context.Context) <-chan format.LinkResult { + return d.shard.EnumLinksAsync(ctx) +} + // Links implements the `Directory` interface. func (d *HAMTDirectory) Links(ctx context.Context) ([]*ipld.Link, error) { return d.shard.EnumLinks(ctx) diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/doc.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/doc.go similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/doc.go rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/doc.go diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/resolve.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/resolve.go new file mode 100644 index 0000000000..45d57b8135 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io/resolve.go @@ -0,0 +1,41 @@ +package io + +import ( + "context" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + hamt "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/hamt" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// ResolveUnixfsOnce resolves a single hop of a path through a graph in a +// unixfs context. This includes handling traversing sharded directories. +func ResolveUnixfsOnce(ctx context.Context, ds ipld.NodeGetter, nd ipld.Node, names []string) (*ipld.Link, []string, error) { + pn, ok := nd.(*dag.ProtoNode) + if ok { + fsn, err := ft.FSNodeFromBytes(pn.Data()) + if err != nil { + // Not a unixfs node, use standard object traversal code + return nd.ResolveLink(names) + } + + if fsn.Type() == ft.THAMTShard { + rods := dag.NewReadOnlyDagService(ds) + s, err := hamt.NewHamtFromDag(rods, nd) + if err != nil { + return nil, nil, err + } + + out, err := s.Find(ctx, names[0]) + if err != nil { + return nil, nil, err + } + + return out, names[1:], nil + } + } + + return nd.ResolveLink(names) +} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod/dagmodifier.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod/dagmodifier.go similarity index 94% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod/dagmodifier.go rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod/dagmodifier.go index 120558c275..6f211978fb 100644 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/mod/dagmodifier.go +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/mod/dagmodifier.go @@ -8,15 +8,15 @@ import ( "errors" "io" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - help "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" + ft "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs" + help "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/helpers" + trickle "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/importer/trickle" + uio "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/io" + + mdag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + chunker "gx/ipfs/QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8/go-ipfs-chunker" + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" ) // Common errors @@ -200,6 +200,16 @@ func (dm *DagModifier) Sync() error { // Number of bytes we're going to write buflen := dm.wrBuf.Len() + fs, err := fileSize(dm.curNode) + if err != nil { + return err + } + if fs < dm.writeStart { + if err := dm.expandSparse(int64(dm.writeStart - fs)); err != nil { + return err + } + } + // overwrite existing dag nodes thisc, err := dm.modifyDag(dm.curNode, dm.writeStart) if err != nil { @@ -225,8 +235,8 @@ func (dm *DagModifier) Sync() error { } dm.writeStart += uint64(buflen) - dm.wrBuf = nil + return nil } @@ -349,7 +359,11 @@ func (dm *DagModifier) appendData(nd ipld.Node, spl chunker.Splitter) (ipld.Node CidBuilder: dm.Prefix, RawLeaves: dm.RawLeaves, } - return trickle.Append(dm.ctx, nd, dbp.New(spl)) + db, err := dbp.New(spl) + if err != nil { + return nil, err + } + return trickle.Append(dm.ctx, nd, db) default: return nil, ErrNotUnixfs } diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/package.json b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/package.json new file mode 100644 index 0000000000..65a1ce20b4 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/package.json @@ -0,0 +1,84 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-unixfs" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-unixfs" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx", + "name": "murmur3", + "version": "0.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "why", + "hash": "QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri", + "name": "go-merkledag", + "version": "1.1.37" + }, + { + "author": "hector", + "hash": "QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7", + "name": "go-ipfs-posinfo", + "version": "0.1.5" + }, + { + "author": "Stebalien", + "hash": "QmVA2fUfgswyFdhZZA3MvUtfwTS7TER4Hv4vSBLvoQu1QZ", + "name": "go-bitfield", + "version": "0.1.3" + }, + { + "author": "hsanjuan", + "hash": "QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8", + "name": "go-ipfs-chunker", + "version": "0.1.6" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + }, + { + "author": "magik6k", + "hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb", + "name": "go-ipfs-files", + "version": "2.0.6" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-unixfs", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.3.12" +} + diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/Makefile b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/Makefile rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/Makefile diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/unixfs.pb.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/unixfs.pb.go similarity index 92% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/unixfs.pb.go rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/unixfs.pb.go index 36d2026d4a..b3e0981e01 100644 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/unixfs.pb.go +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/unixfs.pb.go @@ -3,9 +3,11 @@ package unixfs_pb -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -37,6 +39,7 @@ var Data_DataType_name = map[int32]string{ 4: "Symlink", 5: "HAMTShard", } + var Data_DataType_value = map[string]int32{ "Raw": 0, "Directory": 1, @@ -51,9 +54,11 @@ func (x Data_DataType) Enum() *Data_DataType { *p = x return p } + func (x Data_DataType) String() string { return proto.EnumName(Data_DataType_name, int32(x)) } + func (x *Data_DataType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType") if err != nil { @@ -62,8 +67,9 @@ func (x *Data_DataType) UnmarshalJSON(data []byte) error { *x = Data_DataType(value) return nil } + func (Data_DataType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_unixfs_768dd0381a72e0c6, []int{0, 0} + return fileDescriptor_e2fd76cc44dfc7c3, []int{0, 0} } type Data struct { @@ -82,7 +88,7 @@ func (m *Data) Reset() { *m = Data{} } func (m *Data) String() string { return proto.CompactTextString(m) } func (*Data) ProtoMessage() {} func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_unixfs_768dd0381a72e0c6, []int{0} + return fileDescriptor_e2fd76cc44dfc7c3, []int{0} } func (m *Data) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Data.Unmarshal(m, b) @@ -90,8 +96,8 @@ func (m *Data) XXX_Unmarshal(b []byte) error { func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Data.Marshal(b, m, deterministic) } -func (dst *Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Data.Merge(dst, src) +func (m *Data) XXX_Merge(src proto.Message) { + xxx_messageInfo_Data.Merge(m, src) } func (m *Data) XXX_Size() int { return xxx_messageInfo_Data.Size(m) @@ -155,7 +161,7 @@ func (m *Metadata) Reset() { *m = Metadata{} } func (m *Metadata) String() string { return proto.CompactTextString(m) } func (*Metadata) ProtoMessage() {} func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_unixfs_768dd0381a72e0c6, []int{1} + return fileDescriptor_e2fd76cc44dfc7c3, []int{1} } func (m *Metadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Metadata.Unmarshal(m, b) @@ -163,8 +169,8 @@ func (m *Metadata) XXX_Unmarshal(b []byte) error { func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) } -func (dst *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(dst, src) +func (m *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) } func (m *Metadata) XXX_Size() int { return xxx_messageInfo_Metadata.Size(m) @@ -183,14 +189,14 @@ func (m *Metadata) GetMimeType() string { } func init() { + proto.RegisterEnum("unixfs.pb.Data_DataType", Data_DataType_name, Data_DataType_value) proto.RegisterType((*Data)(nil), "unixfs.pb.Data") proto.RegisterType((*Metadata)(nil), "unixfs.pb.Metadata") - proto.RegisterEnum("unixfs.pb.Data_DataType", Data_DataType_name, Data_DataType_value) } -func init() { proto.RegisterFile("unixfs.proto", fileDescriptor_unixfs_768dd0381a72e0c6) } +func init() { proto.RegisterFile("unixfs.proto", fileDescriptor_e2fd76cc44dfc7c3) } -var fileDescriptor_unixfs_768dd0381a72e0c6 = []byte{ +var fileDescriptor_e2fd76cc44dfc7c3 = []byte{ // 254 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xb1, 0x6a, 0xeb, 0x30, 0x18, 0x85, 0xaf, 0x6c, 0x25, 0xb1, 0xff, 0xeb, 0x16, 0xf1, 0x0f, 0x45, 0x74, 0x28, 0xc6, 0x43, diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/unixfs.proto b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/unixfs.proto similarity index 100% rename from vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb/unixfs.proto rename to vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb/unixfs.proto diff --git a/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/unixfs.go b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/unixfs.go new file mode 100644 index 0000000000..5a0b8b2004 --- /dev/null +++ b/vendor/gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/unixfs.go @@ -0,0 +1,408 @@ +// Package unixfs implements a data format for files in the IPFS filesystem It +// is not the only format in ipfs, but it is the one that the filesystem +// assumes +package unixfs + +import ( + "errors" + "fmt" + + dag "gx/ipfs/QmPJNbVw8o3ohC43ppSXyNXwYKsWShG4zygnirHptfbHri/go-merkledag" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" + pb "gx/ipfs/QmcYUTQ7tBZeH1CLsZM2S3xhMEZdvUgXvbjhpMsLDpk3oJ/go-unixfs/pb" +) + +// A LinkResult for any parallel enumeration of links +// TODO: Should this live in go-ipld-format? +type LinkResult struct { + Link *ipld.Link + Err error +} + +// Shorthands for protobuffer types +const ( + TRaw = pb.Data_Raw + TFile = pb.Data_File + TDirectory = pb.Data_Directory + TMetadata = pb.Data_Metadata + TSymlink = pb.Data_Symlink + THAMTShard = pb.Data_HAMTShard +) + +// Common errors +var ( + ErrMalformedFileFormat = errors.New("malformed data in file format") + ErrUnrecognizedType = errors.New("unrecognized node type") +) + +// FromBytes unmarshals a byte slice as protobuf Data. +// Deprecated: Use `FSNodeFromBytes` instead to avoid direct manipulation of `pb.Data`. +func FromBytes(data []byte) (*pb.Data, error) { + pbdata := new(pb.Data) + err := proto.Unmarshal(data, pbdata) + if err != nil { + return nil, err + } + return pbdata, nil +} + +// FilePBData creates a protobuf File with the given +// byte slice and returns the marshaled protobuf bytes representing it. +func FilePBData(data []byte, totalsize uint64) []byte { + pbfile := new(pb.Data) + typ := pb.Data_File + pbfile.Type = &typ + pbfile.Data = data + pbfile.Filesize = proto.Uint64(totalsize) + + data, err := proto.Marshal(pbfile) + if err != nil { + // This really shouldnt happen, i promise + // The only failure case for marshal is if required fields + // are not filled out, and they all are. If the proto object + // gets changed and nobody updates this function, the code + // should panic due to programmer error + panic(err) + } + return data +} + +//FolderPBData returns Bytes that represent a Directory. +func FolderPBData() []byte { + pbfile := new(pb.Data) + typ := pb.Data_Directory + pbfile.Type = &typ + + data, err := proto.Marshal(pbfile) + if err != nil { + //this really shouldnt happen, i promise + panic(err) + } + return data +} + +//WrapData marshals raw bytes into a `Data_Raw` type protobuf message. +func WrapData(b []byte) []byte { + pbdata := new(pb.Data) + typ := pb.Data_Raw + pbdata.Data = b + pbdata.Type = &typ + pbdata.Filesize = proto.Uint64(uint64(len(b))) + + out, err := proto.Marshal(pbdata) + if err != nil { + // This shouldnt happen. seriously. + panic(err) + } + + return out +} + +//SymlinkData returns a `Data_Symlink` protobuf message for the path you specify. +func SymlinkData(path string) ([]byte, error) { + pbdata := new(pb.Data) + typ := pb.Data_Symlink + pbdata.Data = []byte(path) + pbdata.Type = &typ + + out, err := proto.Marshal(pbdata) + if err != nil { + return nil, err + } + + return out, nil +} + +// HAMTShardData return a `Data_HAMTShard` protobuf message +func HAMTShardData(data []byte, fanout uint64, hashType uint64) ([]byte, error) { + pbdata := new(pb.Data) + typ := pb.Data_HAMTShard + pbdata.Type = &typ + pbdata.HashType = proto.Uint64(hashType) + pbdata.Data = data + pbdata.Fanout = proto.Uint64(fanout) + + out, err := proto.Marshal(pbdata) + if err != nil { + return nil, err + } + + return out, nil +} + +// UnwrapData unmarshals a protobuf messages and returns the contents. +func UnwrapData(data []byte) ([]byte, error) { + pbdata := new(pb.Data) + err := proto.Unmarshal(data, pbdata) + if err != nil { + return nil, err + } + return pbdata.GetData(), nil +} + +// DataSize returns the size of the contents in protobuf wrapped slice. +// For raw data it simply provides the length of it. For Data_Files, it +// will return the associated filesize. Note that Data_Directories will +// return an error. +func DataSize(data []byte) (uint64, error) { + pbdata := new(pb.Data) + err := proto.Unmarshal(data, pbdata) + if err != nil { + return 0, err + } + + switch pbdata.GetType() { + case pb.Data_Directory: + return 0, errors.New("can't get data size of directory") + case pb.Data_File: + return pbdata.GetFilesize(), nil + case pb.Data_Raw: + return uint64(len(pbdata.GetData())), nil + default: + return 0, errors.New("unrecognized node data type") + } +} + +// An FSNode represents a filesystem object using the UnixFS specification. +// +// The `NewFSNode` constructor should be used instead of just calling `new(FSNode)` +// to guarantee that the required (`Type` and `Filesize`) fields in the `format` +// structure are initialized before marshaling (in `GetBytes()`). +type FSNode struct { + + // UnixFS format defined as a protocol buffers message. + format pb.Data +} + +// FSNodeFromBytes unmarshal a protobuf message onto an FSNode. +func FSNodeFromBytes(b []byte) (*FSNode, error) { + n := new(FSNode) + err := proto.Unmarshal(b, &n.format) + if err != nil { + return nil, err + } + + return n, nil +} + +// NewFSNode creates a new FSNode structure with the given `dataType`. +// +// It initializes the (required) `Type` field (that doesn't have a `Set()` +// accessor so it must be specified at creation), otherwise the `Marshal()` +// method in `GetBytes()` would fail (`required field "Type" not set`). +// +// It also initializes the `Filesize` pointer field to ensure its value +// is never nil before marshaling, this is not a required field but it is +// done to be backwards compatible with previous `go-ipfs` versions hash. +// (If it wasn't initialized there could be cases where `Filesize` could +// have been left at nil, when the `FSNode` was created but no data or +// child nodes were set to adjust it, as is the case in `NewLeaf()`.) +func NewFSNode(dataType pb.Data_DataType) *FSNode { + n := new(FSNode) + n.format.Type = &dataType + + // Initialize by `Filesize` by updating it with a dummy (zero) value. + n.UpdateFilesize(0) + + return n +} + +// HashType gets hash type of format +func (n *FSNode) HashType() uint64 { + return n.format.GetHashType() +} + +// Fanout gets fanout of format +func (n *FSNode) Fanout() uint64 { + return n.format.GetFanout() +} + +// AddBlockSize adds the size of the next child block of this node +func (n *FSNode) AddBlockSize(s uint64) { + n.UpdateFilesize(int64(s)) + n.format.Blocksizes = append(n.format.Blocksizes, s) +} + +// RemoveBlockSize removes the given child block's size. +func (n *FSNode) RemoveBlockSize(i int) { + n.UpdateFilesize(-int64(n.format.Blocksizes[i])) + n.format.Blocksizes = append(n.format.Blocksizes[:i], n.format.Blocksizes[i+1:]...) +} + +// BlockSize returns the block size indexed by `i`. +// TODO: Evaluate if this function should be bounds checking. +func (n *FSNode) BlockSize(i int) uint64 { + return n.format.Blocksizes[i] +} + +// BlockSizes gets blocksizes of format +func (n *FSNode) BlockSizes() []uint64 { + return n.format.GetBlocksizes() +} + +// RemoveAllBlockSizes removes all the child block sizes of this node. +func (n *FSNode) RemoveAllBlockSizes() { + n.format.Blocksizes = []uint64{} + n.format.Filesize = proto.Uint64(uint64(len(n.Data()))) +} + +// GetBytes marshals this node as a protobuf message. +func (n *FSNode) GetBytes() ([]byte, error) { + return proto.Marshal(&n.format) +} + +// FileSize returns the total size of this tree. That is, the size of +// the data in this node plus the size of all its children. +func (n *FSNode) FileSize() uint64 { + return n.format.GetFilesize() +} + +// NumChildren returns the number of child blocks of this node +func (n *FSNode) NumChildren() int { + return len(n.format.Blocksizes) +} + +// Data retrieves the `Data` field from the internal `format`. +func (n *FSNode) Data() []byte { + return n.format.GetData() +} + +// SetData sets the `Data` field from the internal `format` +// updating its `Filesize`. +func (n *FSNode) SetData(newData []byte) { + n.UpdateFilesize(int64(len(newData) - len(n.Data()))) + n.format.Data = newData +} + +// UpdateFilesize updates the `Filesize` field from the internal `format` +// by a signed difference (`filesizeDiff`). +// TODO: Add assert to check for `Filesize` > 0? +func (n *FSNode) UpdateFilesize(filesizeDiff int64) { + n.format.Filesize = proto.Uint64(uint64( + int64(n.format.GetFilesize()) + filesizeDiff)) +} + +// Type retrieves the `Type` field from the internal `format`. +func (n *FSNode) Type() pb.Data_DataType { + return n.format.GetType() +} + +// IsDir checks whether the node represents a directory +func (n *FSNode) IsDir() bool { + switch n.Type() { + case pb.Data_Directory, pb.Data_HAMTShard: + return true + default: + return false + } +} + +// Metadata is used to store additional FSNode information. +type Metadata struct { + MimeType string + Size uint64 +} + +// MetadataFromBytes Unmarshals a protobuf Data message into Metadata. +// The provided slice should have been encoded with BytesForMetadata(). +func MetadataFromBytes(b []byte) (*Metadata, error) { + pbd := new(pb.Data) + err := proto.Unmarshal(b, pbd) + if err != nil { + return nil, err + } + if pbd.GetType() != pb.Data_Metadata { + return nil, errors.New("incorrect node type") + } + + pbm := new(pb.Metadata) + err = proto.Unmarshal(pbd.Data, pbm) + if err != nil { + return nil, err + } + md := new(Metadata) + md.MimeType = pbm.GetMimeType() + return md, nil +} + +// Bytes marshals Metadata as a protobuf message of Metadata type. +func (m *Metadata) Bytes() ([]byte, error) { + pbm := new(pb.Metadata) + pbm.MimeType = &m.MimeType + return proto.Marshal(pbm) +} + +// BytesForMetadata wraps the given Metadata as a profobuf message of Data type, +// setting the DataType to Metadata. The wrapped bytes are itself the +// result of calling m.Bytes(). +func BytesForMetadata(m *Metadata) ([]byte, error) { + pbd := new(pb.Data) + pbd.Filesize = proto.Uint64(m.Size) + typ := pb.Data_Metadata + pbd.Type = &typ + mdd, err := m.Bytes() + if err != nil { + return nil, err + } + + pbd.Data = mdd + return proto.Marshal(pbd) +} + +// EmptyDirNode creates an empty folder Protonode. +func EmptyDirNode() *dag.ProtoNode { + return dag.NodeWithData(FolderPBData()) +} + +// ReadUnixFSNodeData extracts the UnixFS data from an IPLD node. +// Raw nodes are (also) processed because they are used as leaf +// nodes containing (only) UnixFS data. +func ReadUnixFSNodeData(node ipld.Node) (data []byte, err error) { + switch node := node.(type) { + + case *dag.ProtoNode: + fsNode, err := FSNodeFromBytes(node.Data()) + if err != nil { + return nil, fmt.Errorf("incorrectly formatted protobuf: %s", err) + } + + switch fsNode.Type() { + case pb.Data_File, pb.Data_Raw: + return fsNode.Data(), nil + // Only leaf nodes (of type `Data_Raw`) contain data but due to a + // bug the `Data_File` type (normally used for internal nodes) is + // also used for leaf nodes, so both types are accepted here + // (see the `balanced` package for more details). + default: + return nil, fmt.Errorf("found %s node in unexpected place", + fsNode.Type().String()) + } + + case *dag.RawNode: + return node.RawData(), nil + + default: + return nil, ErrUnrecognizedType + // TODO: To avoid rewriting the error message, but a different error from + // `unixfs.ErrUnrecognizedType` should be used (defining it in the + // `merkledag` or `go-ipld-format` packages). + } +} + +// Extract the `unixfs.FSNode` from the `ipld.Node` (assuming this +// was implemented by a `mdag.ProtoNode`). +func ExtractFSNode(node ipld.Node) (*FSNode, error) { + protoNode, ok := node.(*dag.ProtoNode) + if !ok { + return nil, errors.New("expected a ProtoNode as internal node") + } + + fsNode, err := FSNodeFromBytes(protoNode.Data()) + if err != nil { + return nil, err + } + + return fsNode, nil +} diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/.travis.yml b/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/.travis.yml deleted file mode 100644 index 19b893ed7a..0000000000 --- a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/datastore.go b/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/datastore.go deleted file mode 100644 index 95b8fe5ec4..0000000000 --- a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/datastore.go +++ /dev/null @@ -1,307 +0,0 @@ -package leveldb - -import ( - "os" - "path/filepath" - - "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - dsq "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore/query" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/errors" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/iterator" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/opt" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/storage" - "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/util" -) - -type datastore struct { - *accessor - DB *leveldb.DB - path string -} - -var _ ds.Datastore = (*datastore)(nil) -var _ ds.TxnDatastore = (*datastore)(nil) - -// Options is an alias of syndtr/goleveldb/opt.Options which might be extended -// in the future. -type Options opt.Options - -// NewDatastore returns a new datastore backed by leveldb -// -// for path == "", an in memory bachend will be chosen -func NewDatastore(path string, opts *Options) (*datastore, error) { - var nopts opt.Options - if opts != nil { - nopts = opt.Options(*opts) - } - - var err error - var db *leveldb.DB - - if path == "" { - db, err = leveldb.Open(storage.NewMemStorage(), &nopts) - } else { - db, err = leveldb.OpenFile(path, &nopts) - if errors.IsCorrupted(err) && !nopts.GetReadOnly() { - db, err = leveldb.RecoverFile(path, &nopts) - } - } - - if err != nil { - return nil, err - } - - return &datastore{ - accessor: &accessor{ldb: db}, - DB: db, - path: path, - }, nil -} - -// An extraction of the common interface between LevelDB Transactions and the DB itself. -// -// It allows to plug in either inside the `accessor`. -type levelDbOps interface { - Put(key, value []byte, wo *opt.WriteOptions) error - Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) - Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) - Delete(key []byte, wo *opt.WriteOptions) error - NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator -} - -// Datastore operations using either the DB or a transaction as the backend. -type accessor struct { - ldb levelDbOps -} - -func (a *accessor) Put(key ds.Key, value []byte) (err error) { - return a.ldb.Put(key.Bytes(), value, nil) -} - -func (a *accessor) Get(key ds.Key) (value []byte, err error) { - val, err := a.ldb.Get(key.Bytes(), nil) - if err != nil { - if err == leveldb.ErrNotFound { - return nil, ds.ErrNotFound - } - return nil, err - } - return val, nil -} - -func (a *accessor) Has(key ds.Key) (exists bool, err error) { - return a.ldb.Has(key.Bytes(), nil) -} - -func (d *accessor) GetSize(key ds.Key) (size int, err error) { - return ds.GetBackedSize(d, key) -} - -func (a *accessor) Delete(key ds.Key) (err error) { - // leveldb Delete will not return an error if the key doesn't - // exist (see https://github.com/syndtr/goleveldb/issues/109), - // so check that the key exists first and if not return an - // error - exists, err := a.ldb.Has(key.Bytes(), nil) - if !exists { - return ds.ErrNotFound - } else if err != nil { - return err - } - return a.ldb.Delete(key.Bytes(), nil) -} - -func (a *accessor) Query(q dsq.Query) (dsq.Results, error) { - return a.queryNew(q) -} - -func (a *accessor) queryNew(q dsq.Query) (dsq.Results, error) { - if len(q.Filters) > 0 || - len(q.Orders) > 0 || - q.Limit > 0 || - q.Offset > 0 { - return a.queryOrig(q) - } - var rnge *util.Range - if q.Prefix != "" { - rnge = util.BytesPrefix([]byte(q.Prefix)) - } - i := a.ldb.NewIterator(rnge, nil) - return dsq.ResultsFromIterator(q, dsq.Iterator{ - Next: func() (dsq.Result, bool) { - ok := i.Next() - if !ok { - return dsq.Result{}, false - } - k := string(i.Key()) - e := dsq.Entry{Key: k} - - if !q.KeysOnly { - buf := make([]byte, len(i.Value())) - copy(buf, i.Value()) - e.Value = buf - } - return dsq.Result{Entry: e}, true - }, - Close: func() error { - i.Release() - return nil - }, - }), nil -} - -func (a *accessor) queryOrig(q dsq.Query) (dsq.Results, error) { - // we can use multiple iterators concurrently. see: - // https://godoc.org/github.com/syndtr/goleveldb/leveldb#DB.NewIterator - // advance the iterator only if the reader reads - // - // run query in own sub-process tied to Results.Process(), so that - // it waits for us to finish AND so that clients can signal to us - // that resources should be reclaimed. - qrb := dsq.NewResultBuilder(q) - qrb.Process.Go(func(worker goprocess.Process) { - a.runQuery(worker, qrb) - }) - - // go wait on the worker (without signaling close) - go qrb.Process.CloseAfterChildren() - - // Now, apply remaining things (filters, order) - qr := qrb.Results() - for _, f := range q.Filters { - qr = dsq.NaiveFilter(qr, f) - } - for _, o := range q.Orders { - qr = dsq.NaiveOrder(qr, o) - } - return qr, nil -} - -func (a *accessor) runQuery(worker goprocess.Process, qrb *dsq.ResultBuilder) { - var rnge *util.Range - if qrb.Query.Prefix != "" { - rnge = util.BytesPrefix([]byte(qrb.Query.Prefix)) - } - i := a.ldb.NewIterator(rnge, nil) - defer i.Release() - - // advance iterator for offset - if qrb.Query.Offset > 0 { - for j := 0; j < qrb.Query.Offset; j++ { - i.Next() - } - } - - // iterate, and handle limit, too - for sent := 0; i.Next(); sent++ { - // end early if we hit the limit - if qrb.Query.Limit > 0 && sent >= qrb.Query.Limit { - break - } - - k := string(i.Key()) - e := dsq.Entry{Key: k} - - if !qrb.Query.KeysOnly { - buf := make([]byte, len(i.Value())) - copy(buf, i.Value()) - e.Value = buf - } - - select { - case qrb.Output <- dsq.Result{Entry: e}: // we sent it out - case <-worker.Closing(): // client told us to end early. - break - } - } - - if err := i.Error(); err != nil { - select { - case qrb.Output <- dsq.Result{Error: err}: // client read our error - case <-worker.Closing(): // client told us to end. - return - } - } -} - -// DiskUsage returns the current disk size used by this levelDB. -// For in-mem datastores, it will return 0. -func (d *datastore) DiskUsage() (uint64, error) { - if d.path == "" { // in-mem - return 0, nil - } - - var du uint64 - - err := filepath.Walk(d.path, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - du += uint64(info.Size()) - return nil - }) - - if err != nil { - return 0, err - } - - return du, nil -} - -// LevelDB needs to be closed. -func (d *datastore) Close() (err error) { - return d.DB.Close() -} - -func (d *datastore) IsThreadSafe() {} - -type leveldbBatch struct { - b *leveldb.Batch - db *leveldb.DB -} - -func (d *datastore) Batch() (ds.Batch, error) { - return &leveldbBatch{ - b: new(leveldb.Batch), - db: d.DB, - }, nil -} - -func (b *leveldbBatch) Put(key ds.Key, value []byte) error { - b.b.Put(key.Bytes(), value) - return nil -} - -func (b *leveldbBatch) Commit() error { - return b.db.Write(b.b, nil) -} - -func (b *leveldbBatch) Delete(key ds.Key) error { - b.b.Delete(key.Bytes()) - return nil -} - -// A leveldb transaction embedding the accessor backed by the transaction. -type transaction struct { - *accessor - tx *leveldb.Transaction -} - -func (t *transaction) Commit() error { - return t.tx.Commit() -} - -func (t *transaction) Discard() { - t.tx.Discard() -} - -func (d *datastore) NewTransaction(readOnly bool) (ds.Txn, error) { - tx, err := d.DB.OpenTransaction() - if err != nil { - return nil, err - } - accessor := &accessor{tx} - return &transaction{accessor, tx}, nil -} diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/package.json b/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/package.json deleted file mode 100644 index 79f7c15ba8..0000000000 --- a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/go-ds-leveldb" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ds-leveldb" - }, - "gxDependencies": [ - { - "author": "syndtr", - "hash": "QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g", - "name": "goleveldb", - "version": "0.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", - "name": "goprocess", - "version": "1.0.0" - }, - { - "author": "jbenet", - "hash": "QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D", - "name": "go-datastore", - "version": "3.4.0" - } - ], - "gxVersion": "0.8.0", - "language": "go", - "license": "", - "name": "go-ds-leveldb", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.2.1" -} - diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/.travis.yml b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/.travis.yml new file mode 100644 index 0000000000..4cfe98c242 --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/.travis.yml @@ -0,0 +1,32 @@ +os: + - linux + +language: go + +go: + - 1.11.x + +env: + global: + - GOTFLAGS="-race" + matrix: + - BUILD_DEPTYPE=gx + - BUILD_DEPTYPE=gomod + + +# disable travis install +install: + - true + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + + +cache: + directories: + - $GOPATH/src/gx + - $GOPATH/pkg/mod + - $HOME/.cache/go-build + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/LICENSE b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/LICENSE rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/LICENSE diff --git a/vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/Makefile b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/Makefile similarity index 100% rename from vendor/gx/ipfs/QmccqjKZUTqp4ikWNyAbjBuP5HEdqSqRuAr9mcEhYab54a/go-ds-leveldb/Makefile rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/Makefile diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/README.md b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/README.md similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/README.md rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/README.md diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/codecov.yml b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/codecov.yml rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/codecov.yml diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/convert.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/convert.go new file mode 100644 index 0000000000..db41a75499 --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/convert.go @@ -0,0 +1,182 @@ +// Package flatfs is a Datastore implementation that stores all +// objects in a two-level directory structure in the local file +// system, regardless of the hierarchy of the keys. +package flatfs + +import ( + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" +) + +func UpgradeV0toV1(path string, prefixLen int) error { + fun := Prefix(prefixLen) + err := WriteShardFunc(path, fun) + if err != nil { + return err + } + err = WriteReadme(path, fun) + if err != nil { + return err + } + return nil +} + +func DowngradeV1toV0(path string) error { + fun, err := ReadShardFunc(path) + if err != nil { + return err + } else if fun.funName != "prefix" { + return fmt.Errorf("%s: can only downgrade datastore that use the 'prefix' sharding function", path) + } + + err = os.Remove(filepath.Join(path, SHARDING_FN)) + if err != nil { + return err + } + err = os.Remove(filepath.Join(path, README_FN)) + if err != nil && !os.IsNotExist(err) { + return err + } + return nil +} + +func Move(oldPath string, newPath string, out io.Writer) error { + oldDS, err := Open(oldPath, false) + if err != nil { + return fmt.Errorf("%s: %v", oldPath, err) + } + oldDS.deactivate() + newDS, err := Open(newPath, false) + if err != nil { + return fmt.Errorf("%s: %v", newPath, err) + } + newDS.deactivate() + + res, err := oldDS.Query(query.Query{KeysOnly: true}) + if err != nil { + return err + } + + if out != nil { + fmt.Fprintf(out, "Moving Keys...\n") + } + + // first move the keys + count := 0 + for { + e, ok := res.NextSync() + if !ok { + break + } + if e.Error != nil { + return e.Error + } + + err := moveKey(oldDS, newDS, datastore.RawKey(e.Key)) + if err != nil { + return err + } + + count++ + if out != nil && count%10 == 0 { + fmt.Fprintf(out, "\r%d keys so far", count) + } + } + + if out != nil { + fmt.Fprintf(out, "\nCleaning Up...\n") + } + + // now walk the old top-level directory + dir, err := os.Open(oldDS.path) + if err != nil { + return err + } + defer dir.Close() + names, err := dir.Readdirnames(-1) + if err != nil { + return err + } + for _, fn := range names { + if fn == "." || fn == ".." { + continue + } + oldPath := filepath.Join(oldDS.path, fn) + inf, err := os.Stat(oldPath) + if err != nil { + return err + } + if inf.IsDir() { + indir, err := os.Open(oldPath) + if err != nil { + return err + } + + names, err := indir.Readdirnames(-1) + indir.Close() + if err != nil { + return err + } + + for _, n := range names { + p := filepath.Join(oldPath, n) + // part of unfinished write transaction + // remove it + if strings.HasPrefix(n, "put-") { + err := os.Remove(p) + if err != nil { + return err + } + } else { + return errors.New("unknown file in flatfs: " + p) + } + } + + err = os.Remove(oldPath) + if err != nil { + return err + } + } else if fn == SHARDING_FN || fn == README_FN { + // generated file so just remove it + err := os.Remove(oldPath) + if err != nil { + return err + } + } else { + // else we found something unexpected, so to be safe just move it + log.Warningf("found unexpected file in datastore directory: \"%s\", moving anyway\n", fn) + newPath := filepath.Join(newDS.path, fn) + err := os.Rename(oldPath, newPath) + if err != nil { + return err + } + } + } + + if out != nil { + fmt.Fprintf(out, "All Done.\n") + } + + return nil +} + +func moveKey(oldDS *Datastore, newDS *Datastore, key datastore.Key) error { + _, oldPath := oldDS.encode(key) + dir, newPath := newDS.encode(key) + err := os.Mkdir(dir, 0755) + if err != nil && !os.IsExist(err) { + return err + } + err = os.Rename(oldPath, newPath) + if err != nil { + return err + } + return nil +} diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/flatfs.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/flatfs.go new file mode 100644 index 0000000000..cf2a3f7a58 --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/flatfs.go @@ -0,0 +1,1105 @@ +// Package flatfs is a Datastore implementation that stores all +// objects in a two-level directory structure in the local file +// system, regardless of the hierarchy of the keys. +package flatfs + +import ( + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "math" + "math/rand" + "os" + "path/filepath" + "strings" + "sync" + "sync/atomic" + "time" + + "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("flatfs") + +const ( + extension = ".data" + diskUsageMessageTimeout = 5 * time.Second + diskUsageCheckpointPercent = 1.0 + diskUsageCheckpointTimeout = 2 * time.Second +) + +var ( + // DiskUsageFile is the name of the file to cache the size of the + // datastore in disk + DiskUsageFile = "diskUsage.cache" + // DiskUsageFilesAverage is the maximum number of files per folder + // to stat in order to calculate the size of the datastore. + // The size of the rest of the files in a folder will be assumed + // to be the average of the values obtained. This includes + // regular files and directories. + DiskUsageFilesAverage = 2000 + // DiskUsageCalcTimeout is the maximum time to spend + // calculating the DiskUsage upon a start when no + // DiskUsageFile is present. + // If this period did not suffice to read the size of the datastore, + // the remaining sizes will be stimated. + DiskUsageCalcTimeout = 5 * time.Minute +) + +const ( + opPut = iota + opDelete + opRename +) + +type initAccuracy string + +const ( + unknownA initAccuracy = "unknown" + exactA initAccuracy = "initial-exact" + approxA initAccuracy = "initial-approximate" + timedoutA initAccuracy = "initial-timed-out" +) + +func combineAccuracy(a, b initAccuracy) initAccuracy { + if a == unknownA || b == unknownA { + return unknownA + } + if a == timedoutA || b == timedoutA { + return timedoutA + } + if a == approxA || b == approxA { + return approxA + } + if a == exactA && b == exactA { + return exactA + } + if a == "" { + return b + } + if b == "" { + return a + } + return unknownA +} + +var _ datastore.Datastore = (*Datastore)(nil) + +var ( + ErrDatastoreExists = errors.New("datastore already exists") + ErrDatastoreDoesNotExist = errors.New("datastore directory does not exist") + ErrShardingFileMissing = fmt.Errorf("%s file not found in datastore", SHARDING_FN) + ErrClosed = errors.New("datastore closed") +) + +func init() { + rand.Seed(time.Now().UTC().UnixNano()) +} + +// Datastore implements the go-datastore Interface. +// Note this datastore cannot guarantee order of concurrent +// write operations to the same key. See the explanation in +// Put(). +type Datastore struct { + // atmoic operations should always be used with diskUsage. + // Must be first in struct to ensure correct alignment + // (see https://golang.org/pkg/sync/atomic/#pkg-note-BUG) + diskUsage int64 + + path string + + shardStr string + getDir ShardFunc + + // sychronize all writes and directory changes for added safety + sync bool + + // these values should only be used during internalization or + // inside the checkpoint loop + dirty bool + storedValue diskUsageValue + + // Used to trigger a checkpoint. + checkpointCh chan struct{} + done chan struct{} + + shutdownLock sync.RWMutex + shutdown bool + + // opMap handles concurrent write operations (put/delete) + // to the same key + opMap *opMap +} + +type diskUsageValue struct { + DiskUsage int64 `json:"diskUsage"` + Accuracy initAccuracy `json:"accuracy"` +} + +type ShardFunc func(string) string + +type opT int + +// op wraps useful arguments of write operations +type op struct { + typ opT // operation type + key datastore.Key // datastore key. Mandatory. + tmp string // temp file path + path string // file path + v []byte // value +} + +type opMap struct { + ops sync.Map +} + +type opResult struct { + mu sync.RWMutex + success bool + + opMap *opMap + name string +} + +// Returns nil if there's nothing to do. +func (m *opMap) Begin(name string) *opResult { + for { + myOp := &opResult{opMap: m, name: name} + myOp.mu.Lock() + opIface, loaded := m.ops.LoadOrStore(name, myOp) + if !loaded { // no one else doing ops with this key + return myOp + } + + op := opIface.(*opResult) + // someone else doing ops with this key, wait for + // the result + op.mu.RLock() + if op.success { + return nil + } + + // if we are here, we will retry the operation + } +} + +func (o *opResult) Finish(ok bool) { + o.success = ok + o.opMap.ops.Delete(o.name) + o.mu.Unlock() +} + +func Create(path string, fun *ShardIdV1) error { + + err := os.Mkdir(path, 0755) + if err != nil && !os.IsExist(err) { + return err + } + + dsFun, err := ReadShardFunc(path) + switch err { + case ErrShardingFileMissing: + isEmpty, err := DirIsEmpty(path) + if err != nil { + return err + } + if !isEmpty { + return fmt.Errorf("directory missing %s file: %s", SHARDING_FN, path) + } + + err = WriteShardFunc(path, fun) + if err != nil { + return err + } + err = WriteReadme(path, fun) + return err + case nil: + if fun.String() != dsFun.String() { + return fmt.Errorf("specified shard func '%s' does not match repo shard func '%s'", + fun.String(), dsFun.String()) + } + return ErrDatastoreExists + default: + return err + } +} + +func Open(path string, syncFiles bool) (*Datastore, error) { + _, err := os.Stat(path) + if os.IsNotExist(err) { + return nil, ErrDatastoreDoesNotExist + } else if err != nil { + return nil, err + } + + shardId, err := ReadShardFunc(path) + if err != nil { + return nil, err + } + + fs := &Datastore{ + path: path, + shardStr: shardId.String(), + getDir: shardId.Func(), + sync: syncFiles, + checkpointCh: make(chan struct{}, 1), + done: make(chan struct{}), + diskUsage: 0, + opMap: new(opMap), + } + + // This sets diskUsage to the correct value + // It might be slow, but allowing it to happen + // while the datastore is usable might + // cause diskUsage to not be accurate. + err = fs.calculateDiskUsage() + if err != nil { + // Cannot stat() all + // elements in the datastore. + return nil, err + } + + go fs.checkpointLoop() + return fs, nil +} + +// convenience method +func CreateOrOpen(path string, fun *ShardIdV1, sync bool) (*Datastore, error) { + err := Create(path, fun) + if err != nil && err != ErrDatastoreExists { + return nil, err + } + return Open(path, sync) +} + +func (fs *Datastore) ShardStr() string { + return fs.shardStr +} + +func (fs *Datastore) encode(key datastore.Key) (dir, file string) { + noslash := key.String()[1:] + dir = filepath.Join(fs.path, fs.getDir(noslash)) + file = filepath.Join(dir, noslash+extension) + return dir, file +} + +func (fs *Datastore) decode(file string) (key datastore.Key, ok bool) { + if filepath.Ext(file) != extension { + return datastore.Key{}, false + } + name := file[:len(file)-len(extension)] + return datastore.NewKey(name), true +} + +func (fs *Datastore) makeDir(dir string) error { + if err := fs.makeDirNoSync(dir); err != nil { + return err + } + + // In theory, if we create a new prefix dir and add a file to + // it, the creation of the prefix dir itself might not be + // durable yet. Sync the root dir after a successful mkdir of + // a prefix dir, just to be paranoid. + if fs.sync { + if err := syncDir(fs.path); err != nil { + return err + } + } + return nil +} + +func (fs *Datastore) makeDirNoSync(dir string) error { + if err := os.Mkdir(dir, 0755); err != nil { + // EEXIST is safe to ignore here, that just means the prefix + // directory already existed. + if !os.IsExist(err) { + return err + } + return nil + } + + // Track DiskUsage of this NEW folder + fs.updateDiskUsage(dir, true) + return nil +} + +// This function always runs under an opLock. Therefore, only one thread is +// touching the affected files. +func (fs *Datastore) renameAndUpdateDiskUsage(tmpPath, path string) error { + fi, err := os.Stat(path) + + // Destination exists, we need to discount it from diskUsage + if fs != nil && err == nil { + atomic.AddInt64(&fs.diskUsage, -fi.Size()) + } else if !os.IsNotExist(err) { + return err + } + + // Rename and add new file's diskUsage. If the rename fails, + // it will either a) Re-add the size of an existing file, which + // was sustracted before b) Add 0 if there is no existing file. + err = os.Rename(tmpPath, path) + fs.updateDiskUsage(path, true) + return err +} + +var putMaxRetries = 6 + +// Put stores a key/value in the datastore. +// +// Note, that we do not guarantee order of write operations (Put or Delete) +// to the same key in this datastore. +// +// For example. i.e. in the case of two concurrent Put, we only guarantee +// that one of them will come through, but cannot assure which one even if +// one arrived slightly later than the other. In the case of a +// concurrent Put and a Delete operation, we cannot guarantee which one +// will win. +func (fs *Datastore) Put(key datastore.Key, value []byte) error { + fs.shutdownLock.RLock() + defer fs.shutdownLock.RUnlock() + if fs.shutdown { + return ErrClosed + } + + var err error + for i := 1; i <= putMaxRetries; i++ { + err = fs.doWriteOp(&op{ + typ: opPut, + key: key, + v: value, + }) + if err == nil { + break + } + + if !strings.Contains(err.Error(), "too many open files") { + break + } + + log.Errorf("too many open files, retrying in %dms", 100*i) + time.Sleep(time.Millisecond * 100 * time.Duration(i)) + } + return err +} + +func (fs *Datastore) doOp(oper *op) error { + switch oper.typ { + case opPut: + return fs.doPut(oper.key, oper.v) + case opDelete: + return fs.doDelete(oper.key) + case opRename: + return fs.renameAndUpdateDiskUsage(oper.tmp, oper.path) + default: + panic("bad operation, this is a bug") + } +} + +// doWrite optmizes out write operations (put/delete) to the same +// key by queueing them and suceeding all queued +// operations if one of them does. In such case, +// we assume that the first suceeding operation +// on that key was the last one to happen after +// all successful others. +func (fs *Datastore) doWriteOp(oper *op) error { + keyStr := oper.key.String() + + opRes := fs.opMap.Begin(keyStr) + if opRes == nil { // nothing to do, a concurrent op succeeded + return nil + } + + // Do the operation + err := fs.doOp(oper) + + // Finish it. If no error, it will signal other operations + // waiting on this result to succeed. Otherwise, they will + // retry. + opRes.Finish(err == nil) + return err +} + +func (fs *Datastore) doPut(key datastore.Key, val []byte) error { + + dir, path := fs.encode(key) + if err := fs.makeDir(dir); err != nil { + return err + } + + tmp, err := ioutil.TempFile(dir, "put-") + if err != nil { + return err + } + closed := false + removed := false + defer func() { + if !closed { + // silence errcheck + _ = tmp.Close() + } + if !removed { + // silence errcheck + _ = os.Remove(tmp.Name()) + } + }() + + if _, err := tmp.Write(val); err != nil { + return err + } + if fs.sync { + if err := syncFile(tmp); err != nil { + return err + } + } + if err := tmp.Close(); err != nil { + return err + } + closed = true + + err = fs.renameAndUpdateDiskUsage(tmp.Name(), path) + if err != nil { + return err + } + removed = true + + if fs.sync { + if err := syncDir(dir); err != nil { + return err + } + } + return nil +} + +func (fs *Datastore) putMany(data map[datastore.Key][]byte) error { + fs.shutdownLock.RLock() + defer fs.shutdownLock.RUnlock() + if fs.shutdown { + return ErrClosed + } + + var dirsToSync []string + + files := make(map[*os.File]*op, len(data)) + ops := make(map[*os.File]int, len(data)) + + defer func() { + for fi := range files { + val, _ := ops[fi] + switch val { + case 0: + _ = fi.Close() + fallthrough + case 1: + _ = os.Remove(fi.Name()) + } + } + }() + + for key, value := range data { + dir, path := fs.encode(key) + if err := fs.makeDirNoSync(dir); err != nil { + return err + } + dirsToSync = append(dirsToSync, dir) + + tmp, err := ioutil.TempFile(dir, "put-") + if err != nil { + return err + } + + if _, err := tmp.Write(value); err != nil { + return err + } + + files[tmp] = &op{ + typ: opRename, + path: path, + tmp: tmp.Name(), + key: key, + } + } + + // Now we sync everything + // sync and close files + for fi := range files { + if fs.sync { + if err := syncFile(fi); err != nil { + return err + } + } + + if err := fi.Close(); err != nil { + return err + } + + // signify closed + ops[fi] = 1 + } + + // move files to their proper places + for fi, op := range files { + err := fs.doWriteOp(op) + if err != nil { + return err + } + // signify removed + ops[fi] = 2 + } + + // now sync the dirs for those files + if fs.sync { + for _, dir := range dirsToSync { + if err := syncDir(dir); err != nil { + return err + } + } + + // sync top flatfs dir + if err := syncDir(fs.path); err != nil { + return err + } + } + + return nil +} + +func (fs *Datastore) Get(key datastore.Key) (value []byte, err error) { + _, path := fs.encode(key) + data, err := ioutil.ReadFile(path) + if err != nil { + if os.IsNotExist(err) { + return nil, datastore.ErrNotFound + } + // no specific error to return, so just pass it through + return nil, err + } + return data, nil +} + +func (fs *Datastore) Has(key datastore.Key) (exists bool, err error) { + _, path := fs.encode(key) + switch _, err := os.Stat(path); { + case err == nil: + return true, nil + case os.IsNotExist(err): + return false, nil + default: + return false, err + } +} + +func (fs *Datastore) GetSize(key datastore.Key) (size int, err error) { + _, path := fs.encode(key) + switch s, err := os.Stat(path); { + case err == nil: + return int(s.Size()), nil + case os.IsNotExist(err): + return -1, datastore.ErrNotFound + default: + return -1, err + } +} + +// Delete removes a key/value from the Datastore. Please read +// the Put() explanation about the handling of concurrent write +// operations to the same key. +func (fs *Datastore) Delete(key datastore.Key) error { + fs.shutdownLock.RLock() + defer fs.shutdownLock.RUnlock() + if fs.shutdown { + return ErrClosed + } + + return fs.doWriteOp(&op{ + typ: opDelete, + key: key, + v: nil, + }) +} + +// This function always runs within an opLock for the given +// key, and not concurrently. +func (fs *Datastore) doDelete(key datastore.Key) error { + _, path := fs.encode(key) + + fSize := fileSize(path) + + switch err := os.Remove(path); { + case err == nil: + atomic.AddInt64(&fs.diskUsage, -fSize) + fs.checkpointDiskUsage() + return nil + case os.IsNotExist(err): + return datastore.ErrNotFound + default: + return err + } +} + +func (fs *Datastore) Query(q query.Query) (query.Results, error) { + if (q.Prefix != "" && q.Prefix != "/") || + len(q.Filters) > 0 || + len(q.Orders) > 0 || + q.Limit > 0 || + q.Offset > 0 || + !q.KeysOnly { + // TODO this is overly simplistic, but the only caller is + // `ipfs refs local` for now, and this gets us moving. + return nil, errors.New("flatfs only supports listing all keys in random order") + } + + // Replicates the logic in ResultsWithChan but actually respects calls + // to `Close`. + b := query.NewResultBuilder(q) + b.Process.Go(func(p goprocess.Process) { + err := fs.walkTopLevel(fs.path, b) + if err == nil { + return + } + select { + case b.Output <- query.Result{Error: errors.New("walk failed: " + err.Error())}: + case <-p.Closing(): + } + }) + go b.Process.CloseAfterChildren() + + return b.Results(), nil +} + +func (fs *Datastore) walkTopLevel(path string, result *query.ResultBuilder) error { + dir, err := os.Open(path) + if err != nil { + return err + } + defer dir.Close() + names, err := dir.Readdirnames(-1) + if err != nil { + return err + } + for _, dir := range names { + if len(dir) == 0 || dir[0] == '.' { + continue + } + + err = fs.walk(filepath.Join(path, dir), result) + if err != nil { + return err + } + + // Are we closing? + select { + case <-result.Process.Closing(): + return nil + default: + } + } + return nil +} + +// folderSize estimates the diskUsage of a folder by reading +// up to DiskUsageFilesAverage entries in it and assumming any +// other files will have an avereage size. +func folderSize(path string, deadline time.Time) (int64, initAccuracy, error) { + var du int64 + + folder, err := os.Open(path) + if err != nil { + return 0, "", err + } + defer folder.Close() + + stat, err := folder.Stat() + if err != nil { + return 0, "", err + } + + files, err := folder.Readdirnames(-1) + if err != nil { + return 0, "", err + } + + totalFiles := len(files) + i := 0 + filesProcessed := 0 + maxFiles := DiskUsageFilesAverage + if maxFiles <= 0 { + maxFiles = totalFiles + } + + // randomize file order + // https://stackoverflow.com/a/42776696 + for i := len(files) - 1; i > 0; i-- { + j := rand.Intn(i + 1) + files[i], files[j] = files[j], files[i] + } + + accuracy := exactA + for { + // Do not process any files after deadline is over + if time.Now().After(deadline) { + accuracy = timedoutA + break + } + + if i >= totalFiles || filesProcessed >= maxFiles { + if filesProcessed >= maxFiles { + accuracy = approxA + } + break + } + + // Stat the file + fname := files[i] + subpath := filepath.Join(path, fname) + st, err := os.Stat(subpath) + if err != nil { + return 0, "", err + } + + // Find folder size recursively + if st.IsDir() { + du2, acc, err := folderSize(filepath.Join(subpath), deadline) + if err != nil { + return 0, "", err + } + accuracy = combineAccuracy(acc, accuracy) + du += du2 + filesProcessed++ + } else { // in any other case, add the file size + du += st.Size() + filesProcessed++ + } + + i++ + } + + nonProcessed := totalFiles - filesProcessed + + // Avg is total size in this folder up to now / total files processed + // it includes folders ant not folders + avg := 0.0 + if filesProcessed > 0 { + avg = float64(du) / float64(filesProcessed) + } + duEstimation := int64(avg * float64(nonProcessed)) + du += duEstimation + du += stat.Size() + //fmt.Println(path, "total:", totalFiles, "totalStat:", i, "totalFile:", filesProcessed, "left:", nonProcessed, "avg:", int(avg), "est:", int(duEstimation), "du:", du) + return du, accuracy, nil +} + +// calculateDiskUsage tries to read the DiskUsageFile for a cached +// diskUsage value, otherwise walks the datastore files. +// it is only safe to call in Open() +func (fs *Datastore) calculateDiskUsage() error { + // Try to obtain a previously stored value from disk + if persDu := fs.readDiskUsageFile(); persDu > 0 { + fs.diskUsage = persDu + return nil + } + + msgDone := make(chan struct{}, 1) // prevent race condition + msgTimer := time.AfterFunc(diskUsageMessageTimeout, func() { + fmt.Printf("Calculating datastore size. This might take %s at most and will happen only once\n", + DiskUsageCalcTimeout.String()) + msgDone <- struct{}{} + }) + defer msgTimer.Stop() + deadline := time.Now().Add(DiskUsageCalcTimeout) + du, accuracy, err := folderSize(fs.path, deadline) + if err != nil { + return err + } + if !msgTimer.Stop() { + <-msgDone + } + if accuracy == timedoutA { + fmt.Println("WARN: It took to long to calculate the datastore size") + fmt.Printf("WARN: The total size (%d) is an estimation. You can fix errors by\n", du) + fmt.Printf("WARN: replacing the %s file with the right disk usage in bytes and\n", + filepath.Join(fs.path, DiskUsageFile)) + fmt.Println("WARN: re-opening the datastore") + } + + fs.storedValue.Accuracy = accuracy + fs.diskUsage = du + fs.writeDiskUsageFile(du, true) + + return nil +} + +func fileSize(path string) int64 { + fi, err := os.Stat(path) + if err != nil { + return 0 + } + return fi.Size() +} + +// updateDiskUsage reads the size of path and atomically +// increases or decreases the diskUsage variable. +// setting add to false will subtract from disk usage. +func (fs *Datastore) updateDiskUsage(path string, add bool) { + fsize := fileSize(path) + if !add { + fsize = -fsize + } + + if fsize != 0 { + atomic.AddInt64(&fs.diskUsage, fsize) + fs.checkpointDiskUsage() + } +} + +func (fs *Datastore) checkpointDiskUsage() { + select { + case fs.checkpointCh <- struct{}{}: + // msg sent + default: + // checkpoint request already pending + } +} + +func (fs *Datastore) checkpointLoop() { + defer close(fs.done) + + timerActive := true + timer := time.NewTimer(0) + defer timer.Stop() + for { + select { + case _, more := <-fs.checkpointCh: + du := atomic.LoadInt64(&fs.diskUsage) + fs.dirty = true + if !more { // shutting down + fs.writeDiskUsageFile(du, true) + if fs.dirty { + log.Errorf("could not store final value of disk usage to file, future estimates may be inaccurate") + } + return + } + // If the difference between the checkpointed disk usage and + // current one is larger than than `diskUsageCheckpointPercent` + // of the checkpointed: store it. + newDu := float64(du) + lastCheckpointDu := float64(fs.storedValue.DiskUsage) + diff := math.Abs(newDu - lastCheckpointDu) + if lastCheckpointDu*diskUsageCheckpointPercent < diff*100.0 { + fs.writeDiskUsageFile(du, false) + } + // Otherwise insure the value will be written to disk after + // `diskUsageCheckpointTimeout` + if fs.dirty && !timerActive { + timer.Reset(diskUsageCheckpointTimeout) + timerActive = true + } + case <-timer.C: + timerActive = false + if fs.dirty { + du := atomic.LoadInt64(&fs.diskUsage) + fs.writeDiskUsageFile(du, false) + } + } + } +} + +func (fs *Datastore) writeDiskUsageFile(du int64, doSync bool) { + tmp, err := ioutil.TempFile(fs.path, "du-") + if err != nil { + log.Warningf("cound not write disk usage: %v", err) + return + } + + removed := false + defer func() { + if !removed { + // silence errcheck + _ = os.Remove(tmp.Name()) + } + }() + + toWrite := fs.storedValue + toWrite.DiskUsage = du + encoder := json.NewEncoder(tmp) + if err := encoder.Encode(&toWrite); err != nil { + log.Warningf("cound not write disk usage: %v", err) + return + } + + if doSync { + if err := tmp.Sync(); err != nil { + log.Warningf("cound not sync %s: %v", DiskUsageFile, err) + return + } + } + + if err := tmp.Close(); err != nil { + log.Warningf("cound not write disk usage: %v", err) + return + } + + if err := os.Rename(tmp.Name(), filepath.Join(fs.path, DiskUsageFile)); err != nil { + log.Warningf("cound not write disk usage: %v", err) + return + } + removed = true + + fs.storedValue = toWrite + fs.dirty = false +} + +// readDiskUsageFile is only safe to call in Open() +func (fs *Datastore) readDiskUsageFile() int64 { + fpath := filepath.Join(fs.path, DiskUsageFile) + duB, err := ioutil.ReadFile(fpath) + if err != nil { + return 0 + } + err = json.Unmarshal(duB, &fs.storedValue) + if err != nil { + return 0 + } + return fs.storedValue.DiskUsage +} + +// DiskUsage implements the PersistentDatastore interface +// and returns the current disk usage in bytes used by +// this datastore. +// +// The size is approximative and may slightly differ from +// the real disk values. +func (fs *Datastore) DiskUsage() (uint64, error) { + // it may differ from real disk values if + // the filesystem has allocated for blocks + // for a directory because it has many files in it + // we don't account for "resized" directories. + // In a large datastore, the differences should be + // are negligible though. + + du := atomic.LoadInt64(&fs.diskUsage) + return uint64(du), nil +} + +// Accuracy returns a string representing the accuracy of the +// DiskUsage() result, the value returned is implementation defined +// and for informational purposes only +func (fs *Datastore) Accuracy() string { + return string(fs.storedValue.Accuracy) +} + +func (fs *Datastore) walk(path string, result *query.ResultBuilder) error { + dir, err := os.Open(path) + if err != nil { + if os.IsNotExist(err) { + // not an error if the file disappeared + return nil + } + return err + } + defer dir.Close() + + // ignore non-directories + fileInfo, err := dir.Stat() + if err != nil { + return err + } + if !fileInfo.IsDir() { + return nil + } + + names, err := dir.Readdirnames(-1) + if err != nil { + return err + } + for _, fn := range names { + + if len(fn) == 0 || fn[0] == '.' { + continue + } + + key, ok := fs.decode(fn) + if !ok { + log.Warningf("failed to decode flatfs entry: %s", fn) + continue + } + + select { + case result.Output <- query.Result{ + Entry: query.Entry{ + Key: key.String(), + }, + }: + case <-result.Process.Closing(): + return nil + } + } + return nil +} + +// Deactivate closes background maintenance threads, most write +// operations will fail but readonly operations will continue to +// function +func (fs *Datastore) deactivate() error { + fs.shutdownLock.Lock() + defer fs.shutdownLock.Unlock() + if fs.shutdown { + return nil + } + fs.shutdown = true + close(fs.checkpointCh) + <-fs.done + return nil +} + +func (fs *Datastore) Close() error { + return fs.deactivate() +} + +type flatfsBatch struct { + puts map[datastore.Key][]byte + deletes map[datastore.Key]struct{} + + ds *Datastore +} + +func (fs *Datastore) Batch() (datastore.Batch, error) { + return &flatfsBatch{ + puts: make(map[datastore.Key][]byte), + deletes: make(map[datastore.Key]struct{}), + ds: fs, + }, nil +} + +func (bt *flatfsBatch) Put(key datastore.Key, val []byte) error { + bt.puts[key] = val + return nil +} + +func (bt *flatfsBatch) Delete(key datastore.Key) error { + bt.deletes[key] = struct{}{} + return nil +} + +func (bt *flatfsBatch) Commit() error { + if err := bt.ds.putMany(bt.puts); err != nil { + return err + } + + for k := range bt.deletes { + if err := bt.ds.Delete(k); err != nil { + return err + } + } + + return nil +} + +var _ datastore.ThreadSafeDatastore = (*Datastore)(nil) + +func (*Datastore) IsThreadSafe() {} diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.mod b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.mod new file mode 100644 index 0000000000..f2a9e26676 --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.mod @@ -0,0 +1,7 @@ +module github.com/ipfs/go-ds-flatfs + +require ( + github.com/ipfs/go-datastore v0.0.1 + github.com/ipfs/go-log v0.0.1 + github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 +) diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.sum b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.sum new file mode 100644 index 0000000000..c5e35f8a8a --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/go.sum @@ -0,0 +1,42 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/ipfs/go-datastore v0.0.1 h1:AW/KZCScnBWlSb5JbnEnLKFWXL224LBEh/9KXXOrUms= +github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= +github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= +github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc= +github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +golang.org/x/net v0.0.0-20190227160552-c95aed5357e7 h1:C2F/nMkR/9sfUTpvR3QrjBuTdvMUC/cFajkphs1YLQo= +golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/package.json b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/package.json new file mode 100644 index 0000000000..e8bd0dbdb9 --- /dev/null +++ b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/package.json @@ -0,0 +1,35 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/ipfs/go-ds-flatfs" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ds-flatfs" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "whyrusleeping", + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + } + ], + "gxVersion": "0.8.0", + "language": "go", + "license": "", + "name": "go-ds-flatfs", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.3.7" +} + diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/readme.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/readme.go similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/readme.go rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/readme.go diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/shard.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/shard.go similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/shard.go rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/shard.go diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/sync.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/sync.go similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/sync.go rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/sync.go diff --git a/vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/util.go b/vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/util.go similarity index 100% rename from vendor/gx/ipfs/QmbYQHTSz4Sg4Y2Vyd7hftGgM1yXwSUBKb47VpoPRuP5Nc/go-ds-flatfs/util.go rename to vendor/gx/ipfs/QmcjM6sfVtgGFBCCJaZo33HNi7K4rPkrUQAzLewgWTNkeg/go-ds-flatfs/util.go diff --git a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/interface.go b/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/interface.go deleted file mode 100644 index 867495c9c0..0000000000 --- a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/mock/interface.go +++ /dev/null @@ -1,59 +0,0 @@ -// Package mockrouting provides a virtual routing server. To use it, -// create a virtual routing server and use the Client() method to get a -// routing client (IpfsRouting). The server quacks like a DHT but is -// really a local in-memory hash table. -package mockrouting - -import ( - "context" - - delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" -) - -// MockValidator is a record validator that always returns success. -type MockValidator struct{} - -func (MockValidator) Validate(_ string, _ []byte) error { return nil } -func (MockValidator) Select(_ string, _ [][]byte) (int, error) { return 0, nil } - -// Server provides mockrouting Clients -type Server interface { - Client(p testutil.Identity) Client - ClientWithDatastore(context.Context, testutil.Identity, ds.Datastore) Client -} - -// Client implements IpfsRouting -type Client interface { - routing.IpfsRouting -} - -// NewServer returns a mockrouting Server -func NewServer() Server { - return NewServerWithDelay(DelayConfig{ - ValueVisibility: delay.Fixed(0), - Query: delay.Fixed(0), - }) -} - -// NewServerWithDelay returns a mockrouting Server with a delay! -func NewServerWithDelay(conf DelayConfig) Server { - return &s{ - providers: make(map[string]map[peer.ID]providerRecord), - delayConf: conf, - } -} - -// DelayConfig can be used to configured the fake delays of a mock server. -// Use with NewServerWithDelay(). -type DelayConfig struct { - // ValueVisibility is the time it takes for a value to be visible in the network - // FIXME there _must_ be a better term for this - ValueVisibility delay.D - - // Query is the time it takes to receive a response from a routing query - Query delay.D -} diff --git a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/none/none_client.go b/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/none/none_client.go deleted file mode 100644 index 075e3723c9..0000000000 --- a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/none/none_client.go +++ /dev/null @@ -1,57 +0,0 @@ -// Package nilrouting implements a routing client that does nothing. -package nilrouting - -import ( - "context" - "errors" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" - p2phost "gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host" -) - -type nilclient struct { -} - -func (c *nilclient) PutValue(_ context.Context, _ string, _ []byte, _ ...ropts.Option) error { - return nil -} - -func (c *nilclient) GetValue(_ context.Context, _ string, _ ...ropts.Option) ([]byte, error) { - return nil, errors.New("tried GetValue from nil routing") -} - -func (c *nilclient) SearchValue(_ context.Context, _ string, _ ...ropts.Option) (<-chan []byte, error) { - return nil, errors.New("tried SearchValue from nil routing") -} - -func (c *nilclient) FindPeer(_ context.Context, _ peer.ID) (pstore.PeerInfo, error) { - return pstore.PeerInfo{}, nil -} - -func (c *nilclient) FindProvidersAsync(_ context.Context, _ cid.Cid, _ int) <-chan pstore.PeerInfo { - out := make(chan pstore.PeerInfo) - defer close(out) - return out -} - -func (c *nilclient) Provide(_ context.Context, _ cid.Cid, _ bool) error { - return nil -} - -func (c *nilclient) Bootstrap(_ context.Context) error { - return nil -} - -// ConstructNilRouting creates an IpfsRouting client which does nothing. -func ConstructNilRouting(_ context.Context, _ p2phost.Host, _ ds.Batching, _ record.Validator) (routing.IpfsRouting, error) { - return &nilclient{}, nil -} - -// ensure nilclient satisfies interface -var _ routing.IpfsRouting = &nilclient{} diff --git a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline/offline.go b/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline/offline.go deleted file mode 100644 index 3d14b5d09b..0000000000 --- a/vendor/gx/ipfs/QmcjvUP25nLSwELgUeqWe854S3XVbtsntTr7kZxG63yKhe/go-ipfs-routing/offline/offline.go +++ /dev/null @@ -1,128 +0,0 @@ -// Package offline implements IpfsRouting with a client which -// is only able to perform offline operations. -package offline - -import ( - "bytes" - "context" - "errors" - "time" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - dshelp "gx/ipfs/QmS73grfbWgWrNztd8Lns9GCG3jjRNDfcPYg2VYQzKDZSt/go-ipfs-ds-help" - "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - pstore "gx/ipfs/QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX/go-libp2p-peerstore" - record "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record" - pb "gx/ipfs/Qma9Eqp16mNHDX1EL73pcxhFfzbyXVcAYtaDd1xdmDRDtL/go-libp2p-record/pb" - ds "gx/ipfs/QmaRb5yNXKonhbkpNxNawoydk4N6es6b4fPj19sjEKsh5D/go-datastore" - routing "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing" - ropts "gx/ipfs/QmcQ81jSyWCp1jpkQ8CMbtpXT3jK7Wg6ZtYmoyWFgBoF9c/go-libp2p-routing/options" - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -// ErrOffline is returned when trying to perform operations that -// require connectivity. -var ErrOffline = errors.New("routing system in offline mode") - -// NewOfflineRouter returns an IpfsRouting implementation which only performs -// offline operations. It allows to Put and Get signed dht -// records to and from the local datastore. -func NewOfflineRouter(dstore ds.Datastore, validator record.Validator) routing.IpfsRouting { - return &offlineRouting{ - datastore: dstore, - validator: validator, - } -} - -// offlineRouting implements the IpfsRouting interface, -// but only provides the capability to Put and Get signed dht -// records to and from the local datastore. -type offlineRouting struct { - datastore ds.Datastore - validator record.Validator -} - -func (c *offlineRouting) PutValue(ctx context.Context, key string, val []byte, _ ...ropts.Option) error { - if err := c.validator.Validate(key, val); err != nil { - return err - } - if old, err := c.GetValue(ctx, key); err == nil { - // be idempotent to be nice. - if bytes.Equal(old, val) { - return nil - } - // check to see if the older record is better - i, err := c.validator.Select(key, [][]byte{val, old}) - if err != nil { - // this shouldn't happen for validated records. - return err - } - if i != 0 { - return errors.New("can't replace a newer record with an older one") - } - } - rec := record.MakePutRecord(key, val) - data, err := proto.Marshal(rec) - if err != nil { - return err - } - - return c.datastore.Put(dshelp.NewKeyFromBinary([]byte(key)), data) -} - -func (c *offlineRouting) GetValue(ctx context.Context, key string, _ ...ropts.Option) ([]byte, error) { - buf, err := c.datastore.Get(dshelp.NewKeyFromBinary([]byte(key))) - if err != nil { - return nil, err - } - - rec := new(pb.Record) - err = proto.Unmarshal(buf, rec) - if err != nil { - return nil, err - } - val := rec.GetValue() - - err = c.validator.Validate(key, val) - if err != nil { - return nil, err - } - return val, nil -} - -func (c *offlineRouting) SearchValue(ctx context.Context, key string, _ ...ropts.Option) (<-chan []byte, error) { - out := make(chan []byte, 1) - go func() { - defer close(out) - v, err := c.GetValue(ctx, key) - if err == nil { - out <- v - } - }() - return out, nil -} - -func (c *offlineRouting) FindPeer(ctx context.Context, pid peer.ID) (pstore.PeerInfo, error) { - return pstore.PeerInfo{}, ErrOffline -} - -func (c *offlineRouting) FindProvidersAsync(ctx context.Context, k cid.Cid, max int) <-chan pstore.PeerInfo { - out := make(chan pstore.PeerInfo) - close(out) - return out -} - -func (c *offlineRouting) Provide(_ context.Context, k cid.Cid, _ bool) error { - return ErrOffline -} - -func (c *offlineRouting) Ping(ctx context.Context, p peer.ID) (time.Duration, error) { - return 0, ErrOffline -} - -func (c *offlineRouting) Bootstrap(context.Context) error { - return nil -} - -// ensure offlineRouting matches the IpfsRouting interface -var _ routing.IpfsRouting = &offlineRouting{} diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/LICENSE b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/LICENSE rename to vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/LICENSE diff --git a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info.go b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info.go similarity index 100% rename from vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info.go rename to vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info.go diff --git a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info_darwin.go b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info_darwin.go similarity index 100% rename from vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info_darwin.go rename to vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info_darwin.go diff --git a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info_linux.go b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info_linux.go similarity index 94% rename from vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info_linux.go rename to vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info_linux.go index 71bf85722f..8d5a336671 100644 --- a/vendor/gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo/info_linux.go +++ b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/info_linux.go @@ -7,7 +7,7 @@ import ( "strings" "syscall" - humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" + humanize "gx/ipfs/QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy/go-humanize" ) func init() { diff --git a/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/package.json b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/package.json new file mode 100644 index 0000000000..c75d0fa0e0 --- /dev/null +++ b/vendor/gx/ipfs/QmcoYsZJDtyDTij5dNo7KQCHR3Z6nhPxLkVKg77zg1TL8e/go-sysinfo/package.json @@ -0,0 +1,23 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/whyrusleeping/go-sysinfo/issues" + }, + "gx": { + "dvcsimport": "github.com/whyrusleeping/go-sysinfo" + }, + "gxDependencies": [ + { + "author": "dustin", + "hash": "QmQMxG9D52TirZd9eLA37nxiNspnMRkKbyPWrVAa1gvtSy", + "name": "go-humanize", + "version": "1.0.1" + } + ], + "gxVersion": "0.7.0", + "language": "go", + "license": "MIT", + "name": "go-sysinfo", + "version": "0.0.1" +} + diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/.travis.yml b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/.travis.yml rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/.travis.yml diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/LICENSE b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/LICENSE rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/LICENSE diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/README.md b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/README.md similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/README.md rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/README.md diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/allochound b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/allochound new file mode 100644 index 0000000000..304b6bd276 --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/allochound @@ -0,0 +1,53 @@ +#!/bin/bash +set -euo pipefail + +### Normalize path -- all work should be relative to this script's location. +## Set up gopath -- also relative to this dir, so we work in isolation. +cd "$( dirname "${BASH_SOURCE[0]}" )" +export GOPATH="$PWD/.gopath/" + +funcs=() +funcs+=("Benchmark_ArrayFlatIntToJson_Refmt") +funcs+=("Benchmark_ArrayFlatIntToJson_Stdlib") +funcs+=("Benchmark_ArrayFlatStrToJson_Refmt") +funcs+=("Benchmark_ArrayFlatStrToJson_Stdlib") + +funcs+=("Benchmark_StructToJson_Refmt") +funcs+=("Benchmark_StructToJson_Stdlib") + +profPath=".gopath/tmp/prof/" ; mkdir -p "$profPath" +go test -i . +export GODEBUG=allocfreetrace=1 +while read -r -u3 -d' ' func; do + (go test \ + -run=XXX -bench=$func \ + -count=1 + ) 2> "$profPath/$func.allocfreetrace" | grep "^Benchmark_" +done 3< <(echo "${funcs[@]} ") +ls -lah "$profPath"/*.allocfreetrace + +## +## Recommendations for extracting knowledge: +## - grep for 'refmt' lines with context ~8 +## - you really want to get the 'tracealloc' lines in sight, because they list the object type being allocated in plain english +## - to find the beginning of a run, it's currently correct to grep for 'api.go', then find the start of pump.Run, +## then feed that line number back into a grep (where your first grep for refmt lines emits line numbers). +## - you'll see ~3 different line numbers from api.go; the least frequent is the start of Run. +## - grepping ", tok.Token)" is also valid, since we have succeeded at only allocating that once per Run +## (though actually it's a bit of a wonder to me that it doesn't stay on the stack). +## + +## +## More generally: want: +## - foreach tracealloc line: that line +## - accept the following '^goroutine' line +## - skip lines matching '^runtime.' and '^t' +## - maybe keep the '^runtime.' lines, because they tell you if 'newObject' vs 'makeSlice' +## - accept two lines -- this is the proximate cause, call and source file. +## - you can probably discard the rest +## + +## +## ALTERNATIVELY to all of this: +## just try '-gcflags -m' for things. Result is much shorter, much faster, much more to the point. +## diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborCommon.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborCommon.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborCommon.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborCommon.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborDecoder.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborDecoder.go similarity index 94% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborDecoder.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborDecoder.go index fbd24722f3..7bfe512803 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborDecoder.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborDecoder.go @@ -4,20 +4,22 @@ import ( "fmt" "io" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type Decoder struct { - r shared.SlickReader + cfg DecodeOptions + r shared.SlickReader stack []decoderStep // When empty, and step returns done, all done. step decoderStep // Shortcut to end of stack. left []int // Statekeeping space for definite-len map and array. } -func NewDecoder(r io.Reader) (d *Decoder) { +func NewDecoder(cfg DecodeOptions, r io.Reader) (d *Decoder) { d = &Decoder{ + cfg: cfg, r: shared.NewReader(r), stack: make([]decoderStep, 0, 10), left: make([]int, 0, 10), @@ -181,6 +183,12 @@ func (d *Decoder) stepHelper_acceptValue(majorByte byte, tokenSlot *Token) (done case cborSigilNil: tokenSlot.Type = TNull return true, nil + case cborSigilUndefined: + if d.cfg.CoerceUndefToNull { + tokenSlot.Type = TNull + return true, nil + } + return true, fmt.Errorf("encountered cbor 'undefined' byte (%x) during decoding", cborSigilUndefined) case cborSigilFalse: tokenSlot.Type = TBool tokenSlot.Bool = false diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborDecoderTerminals.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborDecoderTerminals.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborDecoderTerminals.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborDecoderTerminals.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborEncoder.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborEncoder.go similarity index 99% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborEncoder.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborEncoder.go index bc0051bb97..d931342c24 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborEncoder.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborEncoder.go @@ -3,7 +3,7 @@ package cbor import ( "io" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type Encoder struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborEncoderTerminals.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborEncoderTerminals.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborEncoderTerminals.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborEncoderTerminals.go diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborHelpers.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborHelpers.go new file mode 100644 index 0000000000..8ea4810efb --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborHelpers.go @@ -0,0 +1,106 @@ +package cbor + +import ( + "bytes" + "io" + + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared" +) + +// All of the methods in this file are exported, +// and their names and type declarations are intended to be +// identical to the naming and types of the golang stdlib +// 'encoding/json' packages, with ONE EXCEPTION: +// what stdlib calls "NewEncoder", we call "NewMarshaller"; +// what stdlib calls "NewDecoder", we call "NewUnmarshaller"; +// and similarly the types and methods are "Marshaller.Marshal" +// and "Unmarshaller.Unmarshal". +// You should be able to migrate with a sed script! +// +// (In refmt, the encoder/decoder systems are for token streams; +// if you're talking about object mapping, we consistently +// refer to that as marshalling/unmarshalling.) +// +// Most methods also have an "Atlased" variant, +// which lets you specify advanced type mapping instructions. + +func Marshal(v interface{}) ([]byte, error) { + var buf bytes.Buffer + if err := NewMarshaller(&buf).Marshal(v); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func MarshalAtlased(v interface{}, atl atlas.Atlas) ([]byte, error) { + var buf bytes.Buffer + if err := NewMarshallerAtlased(&buf, atl).Marshal(v); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +type Marshaller struct { + marshaller *obj.Marshaller + encoder *Encoder + pump shared.TokenPump +} + +func (x *Marshaller) Marshal(v interface{}) error { + x.marshaller.Bind(v) + x.encoder.Reset() + return x.pump.Run() +} + +func NewMarshaller(wr io.Writer) *Marshaller { + return NewMarshallerAtlased(wr, atlas.MustBuild()) +} + +func NewMarshallerAtlased(wr io.Writer, atl atlas.Atlas) *Marshaller { + x := &Marshaller{ + marshaller: obj.NewMarshaller(atl), + encoder: NewEncoder(wr), + } + x.pump = shared.TokenPump{ + x.marshaller, + x.encoder, + } + return x +} + +func Unmarshal(cfg DecodeOptions, data []byte, v interface{}) error { + return NewUnmarshaller(cfg, bytes.NewBuffer(data)).Unmarshal(v) +} + +func UnmarshalAtlased(cfg DecodeOptions, data []byte, v interface{}, atl atlas.Atlas) error { + return NewUnmarshallerAtlased(cfg, bytes.NewBuffer(data), atl).Unmarshal(v) +} + +type Unmarshaller struct { + unmarshaller *obj.Unmarshaller + decoder *Decoder + pump shared.TokenPump +} + +func (x *Unmarshaller) Unmarshal(v interface{}) error { + x.unmarshaller.Bind(v) + x.decoder.Reset() + return x.pump.Run() +} + +func NewUnmarshaller(cfg DecodeOptions, r io.Reader) *Unmarshaller { + return NewUnmarshallerAtlased(cfg, r, atlas.MustBuild()) +} +func NewUnmarshallerAtlased(cfg DecodeOptions, r io.Reader, atl atlas.Atlas) *Unmarshaller { + x := &Unmarshaller{ + unmarshaller: obj.NewUnmarshaller(atl), + decoder: NewDecoder(cfg, r), + } + x.pump = shared.TokenPump{ + x.decoder, + x.unmarshaller, + } + return x +} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborOptions.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborOptions.go similarity index 95% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborOptions.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborOptions.go index 6aa6a71c4c..69ccd68513 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/cborOptions.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/cborOptions.go @@ -10,6 +10,8 @@ type EncodeOptions struct { func (EncodeOptions) IsEncodeOptions() {} type DecodeOptions struct { + CoerceUndefToNull bool + // future: options to validate canonical serial order } diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/doc.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/doc.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/doc.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/doc.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/encodeWriter.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/encodeWriter.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor/encodeWriter.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/encodeWriter.go diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/errors.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/errors.go new file mode 100644 index 0000000000..579e282792 --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor/errors.go @@ -0,0 +1,22 @@ +package cbor + +import ( + "fmt" + + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" +) + +// Error raised by Encoder when invalid tokens or invalid ordering, e.g. a MapClose with no matching open. +// Should never be seen by the user in practice unless generating their own token streams. +type ErrInvalidTokenStream struct { + Got Token + Acceptable []TokenType +} + +func (e *ErrInvalidTokenStream) Error() string { + return fmt.Sprintf("ErrInvalidTokenStream: unexpected %v, expected %v", e.Got, e.Acceptable) + // More comprehensible strings might include "start of value", "start of key or end of map", "start of value or end of array". +} + +var tokenTypesForKey = []TokenType{TString, TInt, TUint} +var tokenTypesForValue = []TokenType{TMapOpen, TArrOpen, TNull, TString, TBytes, TInt, TUint, TFloat64} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cloneHelpers.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cloneHelpers.go similarity index 83% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cloneHelpers.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cloneHelpers.go index 405c8b2e55..1923c7f64e 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cloneHelpers.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cloneHelpers.go @@ -1,9 +1,9 @@ package refmt import ( - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared" ) func Clone(src, dst interface{}) error { diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cover b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cover new file mode 100644 index 0000000000..e3587f90ce --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cover @@ -0,0 +1,22 @@ +#!/bin/bash +set -euo pipefail + +PROJECT="github.com/polydawn/refmt" +SUBSECTION=${1:-./...} + +export GOPATH="$PWD/.gopath" + +CoverPkg() { + pkg="$1" + + coverFile="$GOPATH/tmp/$pkg.cover" + mkdir -p "$(dirname "$coverFile")" + rm -f "$coverFile" + go test -coverprofile="$coverFile" "$pkg" \ + | tee /dev/stderr | grep "\[no test files\]$" > /dev/null || \ + go tool cover -html="$coverFile" +} + +for pkg in $(go list "$SUBSECTION" | sed "s#^_${PWD}#${PROJECT}#"); do + CoverPkg "$pkg" || true # continue even if errors from packages that lack tests. +done diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/doc.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/doc.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/doc.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/doc.go diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/goad b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/goad new file mode 100644 index 0000000000..0b8b8f6918 --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/goad @@ -0,0 +1,142 @@ +#!/bin/bash +set -euo pipefail + +### Project details +name="refmt" +pkg="github.com/polydawn/$name" # everything under here will be tested +cmd="$pkg/cmd/$name" # if you have a main.main not at the repo root, set this + + + +### Normalize path -- all work should be relative to this script's location. +## Set up gopath -- also relative to this dir, so we work in isolation. +cd "$( dirname "${BASH_SOURCE[0]}" )" +export GOPATH="$PWD/.gopath/" +export GOBIN="$PWD/bin/" + + + +### other config scripts? invoke here. +## pass pointer to project root dir down, for tests (tests run in varying CWDs, so need this hint) +export PROJ="$PWD" +## use LDFLAGS to inject vars at compile time. +LDFLAGS="" + + + +### Last bits of our flag parsery. +# subcommand arg? +SUBCOMMAND=${1:-} +# subsection arg? +SUBSECTION=${2:-"..."} +SUBSECTION="./$SUBSECTION" +# default test timeouts are far too high. override this if you like. +TEST_TIMEOUT="${TEST_TIMEOUT:-"5s"}" + + + +### action begins! +if [ -z "$SUBCOMMAND" ] ; then + ( + go fmt "$SUBSECTION" + go install -ldflags "$LDFLAGS" "$cmd" && { + echo -e "\E[1;32minstall successful.\E[0;m\n" + } || { + echo -e "\E[1;41minstall failed!\E[0;m" + exit 8 + } + go test "$SUBSECTION" -timeout="$TEST_TIMEOUT" && { + echo -e "\n\E[1;32mall tests green.\E[0;m" + } || { + echo -e "\n\E[1;41msome tests failed!\E[0;m" + exit 4 + } + ) +else + shift # munch $subcommand from passing on in "$@" + case "$SUBCOMMAND" in + -) + # passthrough for other commands + go "$@" + ;; + env) + echo "GOROOT=`go env GOROOT`" + echo "GOPATH=`go env GOPATH`" + ;; + path) + echo "$GOPATH" + ;; + init) + # it's your responsibility to do this the first time + # (we don't do it at the front of every build because it will move submodules if you already have them, and that might not be what you want as you're plowing along) + git submodule update --init + # also make sure the self-symlink exists. should be committed anyway (but then, this is also useful for project-first-steps.) + mkdir -p "$(dirname ".gopath/src/$pkg")" + ln -snf "$(echo "${pkg//[^\/]}/" | sed s#/#../#g)"../ ".gopath/src/$pkg" + ;; + test) + set +e ; shift ; set -e # munch $subsection from passing on in "$@" + go test -i "$SUBSECTION" "$@" && + go test -v "$SUBSECTION" -timeout="$TEST_TIMEOUT" "$@" && { + echo -e "\n\E[1;32mall tests green.\E[0;m" + } || { + echo -e "\n\E[1;41msome tests failed!\E[0;m" + exit 4 + } + ;; + install) + go install -ldflags "$LDFLAGS" "$cmd" + ;; + bench) + profPath="$GOPATH/tmp/prof/" + mkdir -p "$profPath" + set +e ; shift ; set -e # munch $subsection from passing on in "$@" + go test -i "$SUBSECTION" "$@" && + GOCONVEY_REPORTER=silent \ + go test \ + -run=XXX -bench=. \ + -o "$profPath/bench.bin" \ + -cpuprofile="$profPath/cpu.pprof" \ + "$SUBSECTION" "$@" || { + echo -e "\E[1;41msome benchmarks failed!\E[0;m" + exit 4 + } + # use e.g.: go tool pprof --text .gopath/tmp/prof/bench.bin .gopath/tmp/prof/cpu.pprof + ;; + fmt) + go fmt "$SUBSECTION" + ;; + doc) + set +e ; shift ; set -e # munch $subsection from passing on in "$@" + for package in $(go list "$SUBSECTION" | sed "s#^_${PWD}#${pkg}#"); do + echo -e "==== $package ====\n" + godoc "$@" "$package" + echo -e "\n\n\n" + done + ;; + cover) + coverFile="$GOPATH/tmp/cover/cover.out" + mkdir -p "$(dirname "$coverFile")" + for package in $(go list "$SUBSECTION" | sed "s#^_${PWD}#${pkg}#"); do + rm -f "$coverFile" + echo "==== $package ====" + go test -coverprofile="$coverFile" "$package" && \ + [ -f "$coverFile" ] && \ + echo ---- && \ + go tool cover -func="$coverFile" && \ + echo ---- && \ + go tool cover -html="$coverFile" + echo ==== + echo + done + rm -f "$coverFile" + ;; + clean) + rm -rf "$GOBIN" "$GOPATH/pkg" "$GOPATH/tmp" + ;; + *) + echo "Usage: $0 {init|test|install|bench|fmt|doc|cover|clean}" 1>&2; + exit 1 + ;; + esac +fi diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/doc.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/doc.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/doc.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/doc.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonCommon.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonCommon.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonCommon.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonCommon.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoder.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoder.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoder.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoder.go index 34271ed546..efb1f8f6b7 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoder.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoder.go @@ -4,8 +4,8 @@ import ( "fmt" "io" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type Decoder struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoderTerminals.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoderTerminals.go similarity index 99% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoderTerminals.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoderTerminals.go index 711ead7017..8de4df3ece 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonDecoderTerminals.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonDecoderTerminals.go @@ -13,7 +13,7 @@ import ( "unicode/utf16" "unicode/utf8" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) func (d *Decoder) decodeString() (string, error) { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonEncoder.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonEncoder.go similarity index 98% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonEncoder.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonEncoder.go index bc5b062431..254a74274c 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonEncoder.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonEncoder.go @@ -5,7 +5,7 @@ import ( "io" "strconv" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) func NewEncoder(wr io.Writer, cfg EncodeOptions) *Encoder { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonEncoderTerminals.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonEncoderTerminals.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonEncoderTerminals.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonEncoderTerminals.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonHelpers.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonHelpers.go similarity index 93% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonHelpers.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonHelpers.go index cecda1794d..25ed8cd92e 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonHelpers.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonHelpers.go @@ -4,9 +4,9 @@ import ( "bytes" "io" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared" ) // All of the methods in this file are exported, diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonOptions.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonOptions.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json/jsonOptions.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json/jsonOptions.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/marshalHelpers.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/marshalHelpers.go similarity index 88% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/marshalHelpers.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/marshalHelpers.go index ad0cbd27b4..6cf928814b 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/marshalHelpers.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/marshalHelpers.go @@ -3,9 +3,9 @@ package refmt import ( "io" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/cbor" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/json" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" ) type EncodeOptions interface { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlas.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlas.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlas.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlas.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlasCommon.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlasCommon.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlasCommon.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlasCommon.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlasEntry.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlasEntry.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/atlasEntry.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/atlasEntry.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/doc.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/doc.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/doc.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/doc.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/errors.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/errors.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/errors.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/errors.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/mapMorphism.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/mapMorphism.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/mapMorphism.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/mapMorphism.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMap.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMap.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMap.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMap.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMapAutogen.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMapAutogen.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMapAutogen.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMapAutogen.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMapBuilding.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMapBuilding.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/structMapBuilding.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/structMapBuilding.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/transformBuilding.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/transformBuilding.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/transformBuilding.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/transformBuilding.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/transformFuncs.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/transformFuncs.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/transformFuncs.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/transformFuncs.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/unionMorphism.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/unionMorphism.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas/unionMorphism.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas/unionMorphism.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/builtins.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/builtins.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/builtins.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/builtins.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/doc.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/doc.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/doc.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/doc.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/empty.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/empty.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/empty.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/empty.go diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/errors.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/errors.go new file mode 100644 index 0000000000..6b653186b0 --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/errors.go @@ -0,0 +1,82 @@ +package obj + +import ( + "fmt" + "reflect" + + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" +) + +// General note: avoid using reflect.Type here. It doesn't do well with `go-cmp`, +// which in turn makes our tests for error paths a lot jankier. + +// ErrInvalidUnmarshalTarget describes an invalid argument passed to Unmarshaller.Bind. +// (Unmarshalling must target a non-nil pointer so that it can address the value.) +type ErrInvalidUnmarshalTarget struct { + Type reflect.Type +} + +func (e ErrInvalidUnmarshalTarget) Error() string { + if e.Type == nil { + return "unmarshal error: invalid target (nil)" + } + if e.Type.Kind() != reflect.Ptr { + return "unmarshal error: invalid target (non-pointer " + e.Type.String() + ")" + } + return "unmarshal error: invalid target (nil " + e.Type.String() + ")" +} + +// ErrUnmarshalTypeCantFit is the error returned when unmarshalling cannot +// coerce the tokens in the stream into the kind of variables the unmarshal is targetting, +// for example if a map open token comes when an int is expected, +// or an int token comes when a string is expected. +type ErrUnmarshalTypeCantFit struct { + Token Token + Value reflect.Value + LenLim int // Set only if Value.Kind == Array and Token is bytes of a mismatch length. +} + +func (e ErrUnmarshalTypeCantFit) Error() string { + switch e.LenLim { + case 0: + return fmt.Sprintf("unmarshal error: cannot assign %s to %s field", e.Token, e.Value.Kind()) + default: + return fmt.Sprintf("unmarshal error: cannot assign %s to fixed length=%d byte array", e.Token, e.Value.Len()) + } +} + +// ErrMalformedTokenStream is the error returned when unmarshalling recieves ae +// completely invalid transition, such as when a map value is expected, but the +// map suddenly closes, or an array close is recieved with no matching array open. +type ErrMalformedTokenStream struct { + Got TokenType // Token in the stream that triggered the error. + Expected string // Freeform string describing valid token types. Often a summary like "array close or start of value", or "map close or key". +} + +func (e ErrMalformedTokenStream) Error() string { + return fmt.Sprintf("malformed stream: invalid appearance of %s token; expected %s", e.Got, e.Expected) +} + +// ErrNoSuchField is the error returned when unmarshalling into a struct and +// the token stream for the map contains a key which is not defined for the struct. +type ErrNoSuchField struct { + Name string // Field name from the token. + Type string // Type name of the struct we're operating on. +} + +func (e ErrNoSuchField) Error() string { + return fmt.Sprintf("unmarshal error: stream contains key %q, but there's no such field in structs of type %s", e.Name, e.Type) +} + +// ErrNoSuchUnionMember is the error returned when unmarshalling into a union +// interface and the token stream contains a key which does not name any of the +// known members of the union. +type ErrNoSuchUnionMember struct { + Name string // Key name from the token. + Type reflect.Type // The interface type we're trying to fill. + KnownMembers []string // Members we expected isntead. +} + +func (e ErrNoSuchUnionMember) Error() string { + return fmt.Sprintf("unmarshal error: cannot unmarshal into union %s: %q is not one of the known members (expected one of %s)", e.Type, e.Name, e.KnownMembers) +} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshal.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshal.go similarity index 96% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshal.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshal.go index de3827b526..8ffd6897e6 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshal.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshal.go @@ -3,8 +3,8 @@ package obj import ( "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) /* diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalBuiltins.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalBuiltins.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalBuiltins.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalBuiltins.go index f1eac7ff28..049c1bfef4 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalBuiltins.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalBuiltins.go @@ -3,7 +3,7 @@ package obj import ( "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type ptrDerefDelegateMarshalMachine struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalMapWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalMapWildcard.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalMapWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalMapWildcard.go index 38a425911a..824b52bcf6 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalMapWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalMapWildcard.go @@ -5,8 +5,8 @@ import ( "reflect" "sort" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type marshalMachineMapWildcard struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSlab.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSlab.go similarity index 96% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSlab.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSlab.go index 5d7d6d6b91..24b25a8a26 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSlab.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSlab.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) /* @@ -173,10 +173,9 @@ func _yieldMarshalMachinePtrForAtlasEntry(row *marshalSlabRow, entry *atlas.Atla // Pick delegate without growing stack. (This currently means recursive transform won't fly.) row.marshalMachineTransform.delegate = _yieldMarshalMachinePtr(row, atl, entry.MarshalTransformTargetType) // If tags are in play: have the transformer machine glue that on. - if entry.Tagged { - row.marshalMachineTransform.tagged = true - row.marshalMachineTransform.tag = entry.Tag - } + + row.marshalMachineTransform.tagged = entry.Tagged + row.marshalMachineTransform.tag = entry.Tag return &row.marshalMachineTransform case entry.StructMap != nil: row.marshalMachineStructAtlas.cfg = entry diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSliceWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSliceWildcard.go similarity index 95% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSliceWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSliceWildcard.go index 99f58d6cce..38b910ac7a 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalSliceWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalSliceWildcard.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) // Encodes a slice. diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalStruct.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalStruct.go similarity index 93% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalStruct.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalStruct.go index 0e8d841ad9..e80c6e5b98 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalStruct.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalStruct.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type marshalMachineStructAtlas struct { @@ -32,10 +32,8 @@ func (mach *marshalMachineStructAtlas) Step(driver *Marshaller, slab *marshalSla if mach.index < 0 { tok.Type = TMapOpen tok.Length = countEmittableStructFields(mach.cfg, mach.target_rv) - if mach.cfg.Tagged { - tok.Tagged = true - tok.Tag = mach.cfg.Tag - } + tok.Tagged = mach.cfg.Tagged + tok.Tag = mach.cfg.Tag mach.index++ return false, nil } diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalTransform.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalTransform.go similarity index 86% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalTransform.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalTransform.go index 68b80cb1fd..760eed747e 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalTransform.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalTransform.go @@ -3,8 +3,8 @@ package obj import ( "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type marshalMachineTransform struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalUnionKeyed.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalUnionKeyed.go similarity index 94% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalUnionKeyed.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalUnionKeyed.go index 31ddb746a3..fd106782d2 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalUnionKeyed.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalUnionKeyed.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type marshalMachineUnionKeyed struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalWildcard.go similarity index 93% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalWildcard.go index a9c7b8e3da..9bff4057b9 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/marshalWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/marshalWildcard.go @@ -3,7 +3,7 @@ package obj import ( "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) /* diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshal.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshal.go new file mode 100644 index 0000000000..fa293c2b9b --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshal.go @@ -0,0 +1,108 @@ +package obj + +import ( + "reflect" + + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" +) + +/* + Allocates the machinery for treating an in-memory object like a `TokenSink`. + This machinery will walk over values, using received tokens to fill in + fields as it visits them. + + Initialization must be finished by calling `Bind` to set the value to visit; + after this, the `Step` function is ready to be pumped. + Subsequent calls to `Bind` do a full reset, leaving `Step` ready to call + again and making all of the machinery reusable without re-allocating. +*/ +func NewUnmarshaller(atl atlas.Atlas) *Unmarshaller { + d := &Unmarshaller{ + unmarshalSlab: unmarshalSlab{ + atlas: atl, + rows: make([]unmarshalSlabRow, 0, 10), + }, + stack: make([]UnmarshalMachine, 0, 10), + } + return d +} + +func (d *Unmarshaller) Bind(v interface{}) error { + d.stack = d.stack[0:0] + d.unmarshalSlab.rows = d.unmarshalSlab.rows[0:0] + rv := reflect.ValueOf(v) + if rv.Kind() != reflect.Ptr || rv.IsNil() { + err := ErrInvalidUnmarshalTarget{reflect.TypeOf(v)} + d.step = &errThunkUnmarshalMachine{err} + return err + } + rv = rv.Elem() // Let's just always be addressible, shall we? + rt := rv.Type() + d.step = d.unmarshalSlab.requisitionMachine(rt) + return d.step.Reset(&d.unmarshalSlab, rv, rt) +} + +type Unmarshaller struct { + unmarshalSlab unmarshalSlab + stack []UnmarshalMachine + step UnmarshalMachine +} + +type UnmarshalMachine interface { + Reset(*unmarshalSlab, reflect.Value, reflect.Type) error + Step(*Unmarshaller, *unmarshalSlab, *Token) (done bool, err error) +} + +type unmarshalMachineStep func(*Unmarshaller, *unmarshalSlab, *Token) (done bool, err error) + +func (d *Unmarshaller) Step(tok *Token) (bool, error) { + done, err := d.step.Step(d, &d.unmarshalSlab, tok) + // If the step errored: out, entirely. + if err != nil { + return true, err + } + // If the step wasn't done, return same status. + if !done { + return false, nil + } + // If it WAS done, pop next, or if stack empty, we're entirely done. + nSteps := len(d.stack) - 1 + if nSteps == -1 { + return true, nil // that's all folks + } + d.step = d.stack[nSteps] + d.stack = d.stack[0:nSteps] + return false, nil +} + +/* + Starts the process of recursing unmarshalling over value `rv`. + + Caller provides the machine to use (this is an optimization for maps and slices, + which already know the machine and keep reusing it for all their entries). + This method pushes the first step with `tok` (the upstream tends to have peeked at + it in order to decide what to do, but if recursing, it belongs to the next obj), + then saves this new machine onto the driver's stack: future calls to step + the driver will then continuing stepping the new machine it returns a done status, + at which point we'll finally "return" by popping back to the last machine on the stack + (which is presumably the same one that just called this Recurse method). + + In other words, your UnmarshalMachine calls this when it wants to deal + with an object, and by the time we call back to your machine again, + that object will be traversed and the stream ready for you to continue. +*/ +func (d *Unmarshaller) Recurse(tok *Token, rv reflect.Value, rt reflect.Type, nextMach UnmarshalMachine) (err error) { + // fmt.Printf(">>> pushing into recursion with %#v\n", nextMach) + // Push the current machine onto the stack (we'll resume it when the new one is done), + d.stack = append(d.stack, d.step) + // Initialize the machine for this new target value. + err = nextMach.Reset(&d.unmarshalSlab, rv, rt) + if err != nil { + return + } + d.step = nextMach + // Immediately make a step (we're still the delegate in charge of someone else's step). + _, err = d.Step(tok) + return +} diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalArrayWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalArrayWildcard.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalArrayWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalArrayWildcard.go index 75725820b8..dee4df184e 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalArrayWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalArrayWildcard.go @@ -3,7 +3,7 @@ package obj import ( "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineArrayWildcard struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalBuiltins.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalBuiltins.go similarity index 94% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalBuiltins.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalBuiltins.go index a511d7cd54..71052c34ae 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalBuiltins.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalBuiltins.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type ptrDerefDelegateUnmarshalMachine struct { @@ -121,6 +121,9 @@ func (mach *unmarshalMachinePrimitive) Step(_ *Unmarshaller, _ *unmarshalSlab, t case TBytes: mach.rv.SetBytes(tok.Bytes) return true, nil + case TNull: + mach.rv.SetBytes(nil) + return true, nil default: return true, ErrUnmarshalTypeCantFit{*tok, mach.rv, 0} } @@ -138,6 +141,12 @@ func (mach *unmarshalMachinePrimitive) Step(_ *Unmarshaller, _ *unmarshalSlab, t mach.rv.Index(i).SetUint(uint64(tok.Bytes[i])) } return true, nil + case TNull: + if mach.rv.Len() != 0 { + return true, ErrUnmarshalTypeCantFit{*tok, mach.rv, 0} + } + mach.rv.SetBytes(nil) + return true, nil default: return true, ErrUnmarshalTypeCantFit{*tok, mach.rv, 0} } diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalMapWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalMapWildcard.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalMapWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalMapWildcard.go index 159cd0e457..c6e775ca72 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalMapWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalMapWildcard.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineMapStringWildcard struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSlab.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSlab.go similarity index 98% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSlab.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSlab.go index 5fdc66b235..463719e715 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSlab.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSlab.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) /* diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSliceWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSliceWildcard.go similarity index 97% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSliceWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSliceWildcard.go index c00aaebe41..a3e7ba2910 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalSliceWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalSliceWildcard.go @@ -3,7 +3,7 @@ package obj import ( "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineSliceWildcard struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalStruct.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalStruct.go similarity index 96% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalStruct.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalStruct.go index e46c9ff77e..7e8450c83f 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalStruct.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalStruct.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineStructAtlas struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalTransform.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalTransform.go similarity index 90% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalTransform.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalTransform.go index 66917d9951..258d42bd02 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalTransform.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalTransform.go @@ -3,8 +3,8 @@ package obj import ( "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineTransform struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalUnionKeyed.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalUnionKeyed.go similarity index 95% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalUnionKeyed.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalUnionKeyed.go index 70ea400442..a5278f2ec8 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalUnionKeyed.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalUnionKeyed.go @@ -3,8 +3,8 @@ package obj import ( "reflect" - "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/atlas" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineUnionKeyed struct { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalWildcard.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalWildcard.go similarity index 98% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalWildcard.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalWildcard.go index 0ea74e0c54..2ac244338c 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/obj/unmarshalWildcard.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/unmarshalWildcard.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type unmarshalMachineWildcard struct { diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/package.json b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/package.json new file mode 100644 index 0000000000..00f3e8c610 --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/package.json @@ -0,0 +1,14 @@ +{ + "author": "why", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/polydawn/refmt" + }, + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "refmt", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.2.1" +} + diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/raceway.formula b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/raceway.formula similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/raceway.formula rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/raceway.formula diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared/pump.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared/pump.go similarity index 92% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared/pump.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared/pump.go index a8486ad2e4..de2ea0eec2 100644 --- a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared/pump.go +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared/pump.go @@ -7,7 +7,7 @@ package shared import ( "fmt" - . "gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok" + . "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok" ) type TokenSource interface { diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared/reader.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared/reader.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/shared/reader.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/shared/reader.go diff --git a/vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok/token.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok/token.go similarity index 100% rename from vendor/gx/ipfs/QmPAdjGx1huCjnrR26qy9QUUNSqA6EStyZ68RrwbtCTDML/refmt/tok/token.go rename to vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/tok/token.go diff --git a/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/unmarshalHelpers.go b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/unmarshalHelpers.go new file mode 100644 index 0000000000..b1d3497f5f --- /dev/null +++ b/vendor/gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/unmarshalHelpers.go @@ -0,0 +1,61 @@ +package refmt + +import ( + "io" + + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/cbor" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/json" + "gx/ipfs/QmdBzoMxsBpojBfN1cv5GnKtB7sfYBMoLH7p9qSyEVYXcu/refmt/obj/atlas" +) + +type DecodeOptions interface { + IsDecodeOptions() // marker method. +} + +func Unmarshal(opts DecodeOptions, data []byte, v interface{}) error { + switch o2 := opts.(type) { + case json.DecodeOptions: + return json.Unmarshal(data, v) + case cbor.DecodeOptions: + return cbor.Unmarshal(o2, data, v) + default: + panic("incorrect usage: unknown DecodeOptions type") + } +} + +func UnmarshalAtlased(opts DecodeOptions, data []byte, v interface{}, atl atlas.Atlas) error { + switch o2 := opts.(type) { + case json.DecodeOptions: + return json.UnmarshalAtlased(data, v, atl) + case cbor.DecodeOptions: + return cbor.UnmarshalAtlased(o2, data, v, atl) + default: + panic("incorrect usage: unknown DecodeOptions type") + } +} + +type Unmarshaller interface { + Unmarshal(v interface{}) error +} + +func NewUnmarshaller(opts DecodeOptions, r io.Reader) Unmarshaller { + switch o2 := opts.(type) { + case json.DecodeOptions: + return json.NewUnmarshaller(r) + case cbor.DecodeOptions: + return cbor.NewUnmarshaller(o2, r) + default: + panic("incorrect usage: unknown DecodeOptions type") + } +} + +func NewUnmarshallerAtlased(opts DecodeOptions, r io.Reader, atl atlas.Atlas) Unmarshaller { + switch o2 := opts.(type) { + case json.DecodeOptions: + return json.NewUnmarshallerAtlased(r, atl) + case cbor.DecodeOptions: + return cbor.NewUnmarshallerAtlased(o2, r, atl) + default: + panic("incorrect usage: unknown DecodeOptions type") + } +} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/Makefile b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/Makefile deleted file mode 100644 index 7811c099ea..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -gx: - go get github.com/whyrusleeping/gx - go get github.com/whyrusleeping/gx-go - -covertools: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover - -deps: gx covertools - gx --verbose install --global - gx-go rewrite - -publish: - gx-go rewrite --undo - diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/README.md b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/README.md deleted file mode 100644 index 7a2ccffa82..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/README.md +++ /dev/null @@ -1,35 +0,0 @@ -go-ipld-format -================== - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Coverage Status](https://codecov.io/gh/ipfs/go-ipld-format/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/go-ipld-format/branch/master) -[![Travis CI](https://travis-ci.org/ipfs/go-ipld-format.svg?branch=master)](https://travis-ci.org/ipfs/go-ipld-format) - -> go-ipld-format is a set of interfaces that a type needs to implement in order to be a part of the ipld merkle-forest. - - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [API](#api) -- [Contribute](#contribute) -- [License](#license) - -## Install - -```sh -make install -``` - -## Contribute - -PRs are welcome! - -Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. - -## License - -MIT © Jeromy Johnson diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch.go deleted file mode 100644 index 754490bcbe..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch.go +++ /dev/null @@ -1,177 +0,0 @@ -package format - -import ( - "context" - "errors" - "runtime" -) - -// ParallelBatchCommits is the number of batch commits that can be in-flight before blocking. -// TODO(ipfs/go-ipfs#4299): Experiment with multiple datastores, storage -// devices, and CPUs to find the right value/formula. -var ParallelBatchCommits = runtime.NumCPU() * 2 - -// ErrNotCommited is returned when closing a batch that hasn't been successfully -// committed. -var ErrNotCommited = errors.New("error: batch not commited") - -// ErrClosed is returned when operating on a batch that has already been closed. -var ErrClosed = errors.New("error: batch closed") - -// NewBatch returns a node buffer (Batch) that buffers nodes internally and -// commits them to the underlying DAGService in batches. Use this if you intend -// to add or remove a lot of nodes all at once. -// -// If the passed context is canceled, any in-progress commits are aborted. -func NewBatch(ctx context.Context, ds DAGService) *Batch { - ctx, cancel := context.WithCancel(ctx) - return &Batch{ - ds: ds, - ctx: ctx, - cancel: cancel, - commitResults: make(chan error, ParallelBatchCommits), - MaxSize: 8 << 20, - - // By default, only batch up to 128 nodes at a time. - // The current implementation of flatfs opens this many file - // descriptors at the same time for the optimized batch write. - MaxNodes: 128, - } -} - -// Batch is a buffer for batching adds to a dag. -type Batch struct { - ds DAGService - - ctx context.Context - cancel func() - - activeCommits int - err error - commitResults chan error - - nodes []Node - size int - - MaxSize int - MaxNodes int -} - -func (t *Batch) processResults() { - for t.activeCommits > 0 { - select { - case err := <-t.commitResults: - t.activeCommits-- - if err != nil { - t.setError(err) - return - } - default: - return - } - } -} - -func (t *Batch) asyncCommit() { - numBlocks := len(t.nodes) - if numBlocks == 0 { - return - } - if t.activeCommits >= ParallelBatchCommits { - select { - case err := <-t.commitResults: - t.activeCommits-- - - if err != nil { - t.setError(err) - return - } - case <-t.ctx.Done(): - t.setError(t.ctx.Err()) - return - } - } - go func(ctx context.Context, b []Node, result chan error, ds DAGService) { - select { - case result <- ds.AddMany(ctx, b): - case <-ctx.Done(): - } - }(t.ctx, t.nodes, t.commitResults, t.ds) - - t.activeCommits++ - t.nodes = make([]Node, 0, numBlocks) - t.size = 0 - - return -} - -// Add adds a node to the batch and commits the batch if necessary. -func (t *Batch) Add(nd Node) error { - if t.err != nil { - return t.err - } - // Not strictly necessary but allows us to catch errors early. - t.processResults() - - if t.err != nil { - return t.err - } - - t.nodes = append(t.nodes, nd) - t.size += len(nd.RawData()) - - if t.size > t.MaxSize || len(t.nodes) > t.MaxNodes { - t.asyncCommit() - } - return t.err -} - -// Commit commits batched nodes. -func (t *Batch) Commit() error { - if t.err != nil { - return t.err - } - - t.asyncCommit() - -loop: - for t.activeCommits > 0 { - select { - case err := <-t.commitResults: - t.activeCommits-- - if err != nil { - t.setError(err) - break loop - } - case <-t.ctx.Done(): - t.setError(t.ctx.Err()) - break loop - } - } - - return t.err -} - -func (t *Batch) setError(err error) { - t.err = err - - t.cancel() - - // Drain as much as we can without blocking. -loop: - for { - select { - case <-t.commitResults: - default: - break loop - } - } - - // Be nice and cleanup. These can take a *lot* of memory. - t.commitResults = nil - t.ds = nil - t.ctx = nil - t.nodes = nil - t.size = 0 - t.activeCommits = 0 -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch_test.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch_test.go deleted file mode 100644 index 025f0638bc..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/batch_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package format - -import ( - "context" - "sync" - "testing" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -// Test dag -type testDag struct { - mu sync.Mutex - nodes map[string]Node -} - -func newTestDag() *testDag { - return &testDag{nodes: make(map[string]Node)} -} - -func (d *testDag) Get(ctx context.Context, cid cid.Cid) (Node, error) { - d.mu.Lock() - defer d.mu.Unlock() - if n, ok := d.nodes[cid.KeyString()]; ok { - return n, nil - } - return nil, ErrNotFound -} - -func (d *testDag) GetMany(ctx context.Context, cids []cid.Cid) <-chan *NodeOption { - d.mu.Lock() - defer d.mu.Unlock() - out := make(chan *NodeOption, len(cids)) - for _, c := range cids { - if n, ok := d.nodes[c.KeyString()]; ok { - out <- &NodeOption{Node: n} - } else { - out <- &NodeOption{Err: ErrNotFound} - } - } - close(out) - return out -} - -func (d *testDag) Add(ctx context.Context, node Node) error { - d.mu.Lock() - defer d.mu.Unlock() - d.nodes[node.Cid().KeyString()] = node - return nil -} - -func (d *testDag) AddMany(ctx context.Context, nodes []Node) error { - d.mu.Lock() - defer d.mu.Unlock() - for _, n := range nodes { - d.nodes[n.Cid().KeyString()] = n - } - return nil -} - -func (d *testDag) Remove(ctx context.Context, c cid.Cid) error { - d.mu.Lock() - defer d.mu.Unlock() - delete(d.nodes, c.KeyString()) - return nil -} - -func (d *testDag) RemoveMany(ctx context.Context, cids []cid.Cid) error { - d.mu.Lock() - defer d.mu.Unlock() - for _, c := range cids { - delete(d.nodes, c.KeyString()) - } - return nil -} - -var _ DAGService = new(testDag) - -func TestBatch(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - d := newTestDag() - b := NewBatch(ctx, d) - for i := 0; i < 1000; i++ { - // It would be great if we could use *many* different nodes here - // but we can't add any dependencies and I don't feel like adding - // any more testing code. - if err := b.Add(new(EmptyNode)); err != nil { - t.Fatal(err) - } - } - if err := b.Commit(); err != nil { - t.Fatal(err) - } - - n, err := d.Get(ctx, new(EmptyNode).Cid()) - if err != nil { - t.Fatal(err) - } - switch n.(type) { - case *EmptyNode: - default: - t.Fatal("expected the node to exist in the dag") - } - - if len(d.nodes) != 1 { - t.Fatal("should have one node") - } -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding.go deleted file mode 100644 index a330ad1ffe..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding.go +++ /dev/null @@ -1,62 +0,0 @@ -package format - -import ( - "fmt" - "sync" - - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" -) - -// DecodeBlockFunc functions decode blocks into nodes. -type DecodeBlockFunc func(block blocks.Block) (Node, error) - -type BlockDecoder interface { - Register(codec uint64, decoder DecodeBlockFunc) - Decode(blocks.Block) (Node, error) -} -type safeBlockDecoder struct { - // Can be replaced with an RCU if necessary. - lock sync.RWMutex - decoders map[uint64]DecodeBlockFunc -} - -// Register registers decoder for all blocks with the passed codec. -// -// This will silently replace any existing registered block decoders. -func (d *safeBlockDecoder) Register(codec uint64, decoder DecodeBlockFunc) { - d.lock.Lock() - defer d.lock.Unlock() - d.decoders[codec] = decoder -} - -func (d *safeBlockDecoder) Decode(block blocks.Block) (Node, error) { - // Short-circuit by cast if we already have a Node. - if node, ok := block.(Node); ok { - return node, nil - } - - ty := block.Cid().Type() - - d.lock.RLock() - decoder, ok := d.decoders[ty] - d.lock.RUnlock() - - if ok { - return decoder(block) - } else { - // TODO: get the *long* name for this format - return nil, fmt.Errorf("unrecognized object type: %d", ty) - } -} - -var DefaultBlockDecoder BlockDecoder = &safeBlockDecoder{decoders: make(map[uint64]DecodeBlockFunc)} - -// Decode decodes the given block using the default BlockDecoder. -func Decode(block blocks.Block) (Node, error) { - return DefaultBlockDecoder.Decode(block) -} - -// Register registers block decoders with the default BlockDecoder. -func Register(codec uint64, decoder DecodeBlockFunc) { - DefaultBlockDecoder.Register(codec, decoder) -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding_test.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding_test.go deleted file mode 100644 index 000f6bb0a3..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/coding_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package format - -import ( - "errors" - "testing" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" -) - -func init() { - Register(cid.Raw, func(b blocks.Block) (Node, error) { - node := &EmptyNode{} - if b.RawData() != nil || !b.Cid().Equals(node.Cid()) { - return nil, errors.New("can only decode empty blocks") - } - return node, nil - }) -} - -func TestDecode(t *testing.T) { - id, err := cid.Prefix{ - Version: 1, - Codec: cid.Raw, - MhType: mh.ID, - MhLength: 0, - }.Sum(nil) - - if err != nil { - t.Fatalf("failed to create cid: %s", err) - } - - block, err := blocks.NewBlockWithCid(nil, id) - if err != nil { - t.Fatalf("failed to create empty block: %s", err) - } - node, err := Decode(block) - if err != nil { - t.Fatalf("failed to decode empty node: %s", err) - } - if !node.Cid().Equals(id) { - t.Fatalf("empty node doesn't have the right cid") - } - - if _, ok := node.(*EmptyNode); !ok { - t.Fatalf("empty node doesn't have the right type") - } - -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers.go deleted file mode 100644 index 0ab9c64008..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers.go +++ /dev/null @@ -1,118 +0,0 @@ -package format - -import ( - "context" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -// GetLinks returns the CIDs of the children of the given node. Prefer this -// method over looking up the node itself and calling `Links()` on it as this -// method may be able to use a link cache. -func GetLinks(ctx context.Context, ng NodeGetter, c cid.Cid) ([]*Link, error) { - if c.Type() == cid.Raw { - return nil, nil - } - if gl, ok := ng.(LinkGetter); ok { - return gl.GetLinks(ctx, c) - } - node, err := ng.Get(ctx, c) - if err != nil { - return nil, err - } - return node.Links(), nil -} - -// GetDAG will fill out all of the links of the given Node. -// It returns an array of NodePromise with the linked nodes all in the proper -// order. -func GetDAG(ctx context.Context, ds NodeGetter, root Node) []*NodePromise { - var cids []cid.Cid - for _, lnk := range root.Links() { - cids = append(cids, lnk.Cid) - } - - return GetNodes(ctx, ds, cids) -} - -// GetNodes returns an array of 'FutureNode' promises, with each corresponding -// to the key with the same index as the passed in keys -func GetNodes(ctx context.Context, ds NodeGetter, keys []cid.Cid) []*NodePromise { - - // Early out if no work to do - if len(keys) == 0 { - return nil - } - - promises := make([]*NodePromise, len(keys)) - for i := range keys { - promises[i] = NewNodePromise(ctx) - } - - dedupedKeys := dedupeKeys(keys) - go func() { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - nodechan := ds.GetMany(ctx, dedupedKeys) - - for count := 0; count < len(keys); { - select { - case opt, ok := <-nodechan: - if !ok { - for _, p := range promises { - p.Fail(ErrNotFound) - } - return - } - - if opt.Err != nil { - for _, p := range promises { - p.Fail(opt.Err) - } - return - } - - nd := opt.Node - c := nd.Cid() - for i, lnk_c := range keys { - if c.Equals(lnk_c) { - count++ - promises[i].Send(nd) - } - } - case <-ctx.Done(): - return - } - } - }() - return promises -} - -func Copy(ctx context.Context, from, to DAGService, root cid.Cid) error { - node, err := from.Get(ctx, root) - if err != nil { - return err - } - links := node.Links() - for _, link := range links { - err := Copy(ctx, from, to, link.Cid) - if err != nil { - return err - } - } - err = to.Add(ctx, node) - if err != nil { - return err - } - return nil -} - -// Remove duplicates from a list of keys -func dedupeKeys(cids []cid.Cid) []cid.Cid { - set := cid.NewSet() - for _, c := range cids { - set.Add(c) - } - return set.Keys() -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers_test.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers_test.go deleted file mode 100644 index bbf3f44192..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/daghelpers_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package format - -import ( - "context" - "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - "testing" -) - -type TestNode struct { - links []*Link - data []byte - builder cid.Builder -} - -var v0CidPrefix = cid.Prefix{ - Codec: cid.DagProtobuf, - MhLength: -1, - MhType: mh.SHA2_256, - Version: 0, -} - -func InitNode(d []byte) *TestNode { - return &TestNode{ - data: d, - builder: v0CidPrefix, - } -} - -func (n *TestNode) Resolve([]string) (interface{}, []string, error) { - return nil, nil, EmptyNodeError -} - -func (n *TestNode) Tree(string, int) []string { - return nil -} - -func (n *TestNode) ResolveLink([]string) (*Link, []string, error) { - return nil, nil, EmptyNodeError -} - -func (n *TestNode) Copy() Node { - return &EmptyNode{} -} - -func (n *TestNode) Cid() cid.Cid { - c, err := n.builder.Sum(n.RawData()) - if err != nil { - return cid.Cid{} - } - return c -} - -func (n *TestNode) Links() []*Link { - return n.links -} - -func (n *TestNode) Loggable() map[string]interface{} { - return nil -} - -func (n *TestNode) String() string { - return string(n.data) -} - -func (n *TestNode) RawData() []byte { - return n.data -} - -func (n *TestNode) Size() (uint64, error) { - return 0, nil -} - -func (n *TestNode) Stat() (*NodeStat, error) { - return &NodeStat{}, nil -} - -// AddNodeLink adds a link to another node. -func (n *TestNode) AddNodeLink(name string, that Node) error { - - lnk, err := MakeLink(that) - if err != nil { - return err - } - - lnk.Name = name - - n.AddRawLink(name, lnk) - - return nil -} - -func (n *TestNode) AddRawLink(name string, l *Link) error { - - n.links = append(n.links, &Link{ - Name: name, - Size: l.Size, - Cid: l.Cid, - }) - return nil -} - -func TestCopy(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - from := newTestDag() - - root := InitNode([]byte("level0")) - l11 := InitNode([]byte("leve1_node1")) - l12 := InitNode([]byte("leve1_node2")) - l21 := InitNode([]byte("leve2_node1")) - l22 := InitNode([]byte("leve2_node2")) - l23 := InitNode([]byte("leve2_node3")) - - l11.AddNodeLink(l21.Cid().String(), l21) - l11.AddNodeLink(l22.Cid().String(), l22) - l11.AddNodeLink(l23.Cid().String(), l23) - root.AddNodeLink(l11.Cid().String(), l11) - root.AddNodeLink(l12.Cid().String(), l12) - - for _, n := range []Node{l23, l22, l21, l12, l11, root} { - err := from.Add(ctx, n) - if err != nil { - t.Fatal(err) - } - } - to := newTestDag() - err := Copy(ctx, from, to, root.Cid()) - if err != nil { - t.Error(err) - } - - r, err := to.Get(ctx, root.Cid()) - if err != nil || len(r.Links()) != 2 { - t.Error("fail to copy dag") - } - l1, err := to.Get(ctx, l11.Cid()) - if err != nil || len(l1.Links()) != 3 { - t.Error("fail to copy dag") - } -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format.go deleted file mode 100644 index 1843e052cc..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format.go +++ /dev/null @@ -1,90 +0,0 @@ -package format - -import ( - "context" - "fmt" - - blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -type Resolver interface { - // Resolve resolves a path through this node, stopping at any link boundary - // and returning the object found as well as the remaining path to traverse - Resolve(path []string) (interface{}, []string, error) - - // Tree lists all paths within the object under 'path', and up to the given depth. - // To list the entire object (similar to `find .`) pass "" and -1 - Tree(path string, depth int) []string -} - -// Node is the base interface all IPLD nodes must implement. -// -// Nodes are **Immutable** and all methods defined on the interface are -// **Thread Safe**. -type Node interface { - blocks.Block - Resolver - - // ResolveLink is a helper function that calls resolve and asserts the - // output is a link - ResolveLink(path []string) (*Link, []string, error) - - // Copy returns a deep copy of this node - Copy() Node - - // Links is a helper function that returns all links within this object - Links() []*Link - - // TODO: not sure if stat deserves to stay - Stat() (*NodeStat, error) - - // Size returns the size in bytes of the serialized object - Size() (uint64, error) -} - -// Link represents an IPFS Merkle DAG Link between Nodes. -type Link struct { - // utf string name. should be unique per object - Name string // utf8 - - // cumulative size of target object - Size uint64 - - // multihash of the target object - Cid cid.Cid -} - -// NodeStat is a statistics object for a Node. Mostly sizes. -type NodeStat struct { - Hash string - NumLinks int // number of links in link table - BlockSize int // size of the raw, encoded data - LinksSize int // size of the links segment - DataSize int // size of the data segment - CumulativeSize int // cumulative size of object and its references -} - -func (ns NodeStat) String() string { - f := "NodeStat{NumLinks: %d, BlockSize: %d, LinksSize: %d, DataSize: %d, CumulativeSize: %d}" - return fmt.Sprintf(f, ns.NumLinks, ns.BlockSize, ns.LinksSize, ns.DataSize, ns.CumulativeSize) -} - -// MakeLink creates a link to the given node -func MakeLink(n Node) (*Link, error) { - s, err := n.Size() - if err != nil { - return nil, err - } - - return &Link{ - Size: s, - Cid: n.Cid(), - }, nil -} - -// GetNode returns the MDAG Node that this link points to -func (l *Link) GetNode(ctx context.Context, serv NodeGetter) (Node, error) { - return serv.Get(ctx, l.Cid) -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format_test.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format_test.go deleted file mode 100644 index 9ca92aa9ce..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/format_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package format - -import ( - "errors" - "testing" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" -) - -type EmptyNode struct{} - -var EmptyNodeError error = errors.New("dummy node") - -func (n *EmptyNode) Resolve([]string) (interface{}, []string, error) { - return nil, nil, EmptyNodeError -} - -func (n *EmptyNode) Tree(string, int) []string { - return nil -} - -func (n *EmptyNode) ResolveLink([]string) (*Link, []string, error) { - return nil, nil, EmptyNodeError -} - -func (n *EmptyNode) Copy() Node { - return &EmptyNode{} -} - -func (n *EmptyNode) Cid() cid.Cid { - id, err := cid.Prefix{ - Version: 1, - Codec: cid.Raw, - MhType: mh.ID, - MhLength: 0, - }.Sum(nil) - - if err != nil { - panic("failed to create an empty cid!") - } - return id -} - -func (n *EmptyNode) Links() []*Link { - return nil -} - -func (n *EmptyNode) Loggable() map[string]interface{} { - return nil -} - -func (n *EmptyNode) String() string { - return "[]" -} - -func (n *EmptyNode) RawData() []byte { - return nil -} - -func (n *EmptyNode) Size() (uint64, error) { - return 0, nil -} - -func (n *EmptyNode) Stat() (*NodeStat, error) { - return &NodeStat{}, nil -} - -func TestNodeType(t *testing.T) { - // Type assertion. - var _ Node = &EmptyNode{} -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/merkledag.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/merkledag.go deleted file mode 100644 index 4725ed26a3..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/merkledag.go +++ /dev/null @@ -1,63 +0,0 @@ -package format - -import ( - "context" - "fmt" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" -) - -var ErrNotFound = fmt.Errorf("merkledag: not found") - -// Either a node or an error. -type NodeOption struct { - Node Node - Err error -} - -// The basic Node resolution service. -type NodeGetter interface { - // Get retrieves nodes by CID. Depending on the NodeGetter - // implementation, this may involve fetching the Node from a remote - // machine; consider setting a deadline in the context. - Get(context.Context, cid.Cid) (Node, error) - - // GetMany returns a channel of NodeOptions given a set of CIDs. - GetMany(context.Context, []cid.Cid) <-chan *NodeOption -} - -// NodeGetters can optionally implement this interface to make finding linked -// objects faster. -type LinkGetter interface { - NodeGetter - - // TODO(ipfs/go-ipld-format#9): This should return []cid.Cid - - // GetLinks returns the children of the node refered to by the given - // CID. - GetLinks(ctx context.Context, nd cid.Cid) ([]*Link, error) -} - -// DAGService is an IPFS Merkle DAG service. -type DAGService interface { - NodeGetter - - // Add adds a node to this DAG. - Add(context.Context, Node) error - - // Remove removes a node from this DAG. - // - // Remove returns no error if the requested node is not present in this DAG. - Remove(context.Context, cid.Cid) error - - // AddMany adds many nodes to this DAG. - // - // Consider using NewBatch instead of calling this directly if you need - // to add an unbounded number of nodes to avoid buffering too much. - AddMany(context.Context, []Node) error - - // RemoveMany removes many nodes from this DAG. - // - // It returns success even if the nodes were not present in the DAG. - RemoveMany(context.Context, []cid.Cid) error -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/package.json b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/package.json deleted file mode 100644 index 7b94482d7f..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/ipfs/go-ipld-format" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipld-format" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "stebalien", - "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", - "name": "go-block-format", - "version": "0.2.0" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "", - "name": "go-ipld-format", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.6.0" -} - diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/promise.go b/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/promise.go deleted file mode 100644 index 02743b03c8..0000000000 --- a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/promise.go +++ /dev/null @@ -1,66 +0,0 @@ -package format - -import ( - "context" -) - -// NodePromise provides a promise like interface for a dag Node -// the first call to Get will block until the Node is received -// from its internal channels, subsequent calls will return the -// cached node. -// -// Thread Safety: This is multiple-consumer/single-producer safe. -func NewNodePromise(ctx context.Context) *NodePromise { - return &NodePromise{ - done: make(chan struct{}), - ctx: ctx, - } -} - -type NodePromise struct { - value Node - err error - done chan struct{} - - ctx context.Context -} - -// Call this function to fail a promise. -// -// Once a promise has been failed or fulfilled, further attempts to fail it will -// be silently dropped. -func (np *NodePromise) Fail(err error) { - if np.err != nil || np.value != nil { - // Already filled. - return - } - np.err = err - close(np.done) -} - -// Fulfill this promise. -// -// Once a promise has been fulfilled or failed, calling this function will -// panic. -func (np *NodePromise) Send(nd Node) { - // if promise has a value, don't fail it - if np.err != nil || np.value != nil { - panic("already filled") - } - np.value = nd - close(np.done) -} - -// Get the value of this promise. -// -// This function is safe to call concurrently from any number of goroutines. -func (np *NodePromise) Get(ctx context.Context) (Node, error) { - select { - case <-np.done: - return np.value, np.err - case <-np.ctx.Done(): - return nil, np.ctx.Err() - case <-ctx.Done(): - return nil, ctx.Err() - } -} diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/.travis.yml b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/.travis.yml rename to vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/.travis.yml diff --git a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/LICENSE b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/LICENSE similarity index 100% rename from vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/LICENSE rename to vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/LICENSE diff --git a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/README.md b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/README.md similarity index 100% rename from vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/README.md rename to vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/README.md diff --git a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/fslock.go b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/fslock.go similarity index 93% rename from vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/fslock.go rename to vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/fslock.go index f27caf724e..4a8212acd5 100644 --- a/vendor/gx/ipfs/Qmc4w3gm2TqoEbTYjpPs5FXP8DEB6cuvZWPy6bUTKiht7a/go-fs-lock/fslock.go +++ b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/fslock.go @@ -8,9 +8,9 @@ import ( "strings" "syscall" - "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" + "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" lock "gx/ipfs/QmYDxsntDcWC7CTisDmeorEvDVjkRAjjY9Vr9DJ6HSkXMS/go4-lock" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) // log is the fsrepo logger diff --git a/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/package.json b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/package.json new file mode 100644 index 0000000000..9000978e86 --- /dev/null +++ b/vendor/gx/ipfs/QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ/go-fs-lock/package.json @@ -0,0 +1,35 @@ +{ + "author": "dignifiedquire", + "bugs": { + "url": "https://github.com/ipfs/go-fs-lock/issues" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-fs-lock" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "hsanjuan", + "hash": "QmYDxsntDcWC7CTisDmeorEvDVjkRAjjY9Vr9DJ6HSkXMS", + "name": "go4-lock", + "version": "0.0.3" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-fs-lock", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.11" +} + diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/.travis.yml b/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/.travis.yml deleted file mode 100644 index f6045685f6..0000000000 --- a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/package.json b/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/package.json deleted file mode 100644 index 2ab95d40cd..0000000000 --- a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-host" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-host" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmcrrEpx3VMUbrbgVroH3YiYyUS5c4YAykzyPJWKspUYLa", - "name": "go-semver", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", - "name": "go-multistream", - "version": "0.3.9" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "why", - "hash": "QmWRvjn5BHMLCGkf48Hk1LDc4W72RPA9H59AAVCXmn9esJ", - "name": "go-libp2p-interface-connmgr", - "version": "0.0.21" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "", - "name": "go-libp2p-host", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.0.15" -} - diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/.travis.yml b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/.travis.yml new file mode 100644 index 0000000000..e4b6347376 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/.travis.yml @@ -0,0 +1,33 @@ +os: + - linux + +language: go + +go: + - 1.11.x + +env: + global: + - GOTFLAGS="-race" + - IPFS_REUSEPORT=false + matrix: + - BUILD_DEPTYPE=gx + - BUILD_DEPTYPE=gomod + + +# disable travis install +install: + - true + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + + +cache: + directories: + - $GOPATH/src/gx + - $GOPATH/pkg/mod + - /home/travis/.cache/go-build + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/LICENSE b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/LICENSE rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/LICENSE diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/Makefile b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/Makefile new file mode 100644 index 0000000000..b1b62d7cd3 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/Makefile @@ -0,0 +1,15 @@ +export IPFS_API ?= v04x.ipfs.io + +gx: + go get -u github.com/whyrusleeping/gx + go get -u github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + +mod_deps: + env GO111MODULE=on go mod download diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/README.md b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/README.md similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/README.md rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/README.md diff --git a/vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/codecov.yml b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format/codecov.yml rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/codecov.yml diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht.go new file mode 100644 index 0000000000..7e97be0b7b --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht.go @@ -0,0 +1,402 @@ +package dht + +import ( + "bytes" + "context" + "errors" + "fmt" + "sync" + "time" + + opts "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts" + pb "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb" + providers "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/providers" + + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + recpb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +var logger = logging.Logger("dht") + +// NumBootstrapQueries defines the number of random dht queries to do to +// collect members of the routing table. +const NumBootstrapQueries = 5 + +// IpfsDHT is an implementation of Kademlia with S/Kademlia modifications. +// It is used to implement the base IpfsRouting module. +type IpfsDHT struct { + host host.Host // the network services we need + self peer.ID // Local peer (yourself) + peerstore pstore.Peerstore // Peer Registry + + datastore ds.Datastore // Local data + + routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes + providers *providers.ProviderManager + + birth time.Time // When this peer started up + + Validator record.Validator + + ctx context.Context + proc goprocess.Process + + strmap map[peer.ID]*messageSender + smlk sync.Mutex + + plk sync.Mutex + + protocols []protocol.ID // DHT protocols +} + +// Assert that IPFS assumptions about interfaces aren't broken. These aren't a +// guarantee, but we can use them to aid refactoring. +var ( + _ routing.ContentRouting = (*IpfsDHT)(nil) + _ routing.IpfsRouting = (*IpfsDHT)(nil) + _ routing.PeerRouting = (*IpfsDHT)(nil) + _ routing.PubKeyFetcher = (*IpfsDHT)(nil) + _ routing.ValueStore = (*IpfsDHT)(nil) +) + +// New creates a new DHT with the specified host and options. +func New(ctx context.Context, h host.Host, options ...opts.Option) (*IpfsDHT, error) { + var cfg opts.Options + if err := cfg.Apply(append([]opts.Option{opts.Defaults}, options...)...); err != nil { + return nil, err + } + dht := makeDHT(ctx, h, cfg.Datastore, cfg.Protocols) + + // register for network notifs. + dht.host.Network().Notify((*netNotifiee)(dht)) + + dht.proc = goprocessctx.WithContextAndTeardown(ctx, func() error { + // remove ourselves from network notifs. + dht.host.Network().StopNotify((*netNotifiee)(dht)) + return nil + }) + + dht.proc.AddChild(dht.providers.Process()) + dht.Validator = cfg.Validator + + if !cfg.Client { + for _, p := range cfg.Protocols { + h.SetStreamHandler(p, dht.handleNewStream) + } + } + return dht, nil +} + +// NewDHT creates a new DHT object with the given peer as the 'local' host. +// IpfsDHT's initialized with this function will respond to DHT requests, +// whereas IpfsDHT's initialized with NewDHTClient will not. +func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { + dht, err := New(ctx, h, opts.Datastore(dstore)) + if err != nil { + panic(err) + } + return dht +} + +// NewDHTClient creates a new DHT object with the given peer as the 'local' +// host. IpfsDHT clients initialized with this function will not respond to DHT +// requests. If you need a peer to respond to DHT requests, use NewDHT instead. +// NewDHTClient creates a new DHT object with the given peer as the 'local' host +func NewDHTClient(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { + dht, err := New(ctx, h, opts.Datastore(dstore), opts.Client(true)) + if err != nil { + panic(err) + } + return dht +} + +func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching, protocols []protocol.ID) *IpfsDHT { + rt := kb.NewRoutingTable(KValue, kb.ConvertPeerID(h.ID()), time.Minute, h.Peerstore()) + + cmgr := h.ConnManager() + rt.PeerAdded = func(p peer.ID) { + cmgr.TagPeer(p, "kbucket", 5) + } + rt.PeerRemoved = func(p peer.ID) { + cmgr.UntagPeer(p, "kbucket") + } + + return &IpfsDHT{ + datastore: dstore, + self: h.ID(), + peerstore: h.Peerstore(), + host: h, + strmap: make(map[peer.ID]*messageSender), + ctx: ctx, + providers: providers.NewProviderManager(ctx, h.ID(), dstore), + birth: time.Now(), + routingTable: rt, + protocols: protocols, + } +} + +// putValueToPeer stores the given key/value pair at the peer 'p' +func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, rec *recpb.Record) error { + + pmes := pb.NewMessage(pb.Message_PUT_VALUE, rec.Key, 0) + pmes.Record = rec + rpmes, err := dht.sendRequest(ctx, p, pmes) + if err != nil { + logger.Debugf("putValueToPeer: %v. (peer: %s, key: %s)", err, p.Pretty(), loggableKey(string(rec.Key))) + return err + } + + if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { + logger.Warningf("putValueToPeer: value not put correctly. (%v != %v)", pmes, rpmes) + return errors.New("value not put correctly") + } + + return nil +} + +var errInvalidRecord = errors.New("received invalid record") + +// getValueOrPeers queries a particular peer p for the value for +// key. It returns either the value or a list of closer peers. +// NOTE: It will update the dht's peerstore with any new addresses +// it finds for the given peer. +func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID, key string) (*recpb.Record, []*pstore.PeerInfo, error) { + + pmes, err := dht.getValueSingle(ctx, p, key) + if err != nil { + return nil, nil, err + } + + // Perhaps we were given closer peers + peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) + + if record := pmes.GetRecord(); record != nil { + // Success! We were given the value + logger.Debug("getValueOrPeers: got value") + + // make sure record is valid. + err = dht.Validator.Validate(string(record.GetKey()), record.GetValue()) + if err != nil { + logger.Info("Received invalid record! (discarded)") + // return a sentinal to signify an invalid record was received + err = errInvalidRecord + record = new(recpb.Record) + } + return record, peers, err + } + + if len(peers) > 0 { + logger.Debug("getValueOrPeers: peers") + return nil, peers, nil + } + + logger.Warning("getValueOrPeers: routing.ErrNotFound") + return nil, nil, routing.ErrNotFound +} + +// getValueSingle simply performs the get value RPC with the given parameters +func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, key string) (*pb.Message, error) { + meta := logging.LoggableMap{ + "key": key, + "peer": p, + } + + eip := logger.EventBegin(ctx, "getValueSingle", meta) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_GET_VALUE, []byte(key), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("getValueSingle: read timeout %s %s", p.Pretty(), key) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +// getLocal attempts to retrieve the value from the datastore +func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) { + logger.Debugf("getLocal %s", key) + rec, err := dht.getRecordFromDatastore(mkDsKey(key)) + if err != nil { + logger.Warningf("getLocal: %s", err) + return nil, err + } + + // Double check the key. Can't hurt. + if rec != nil && string(rec.GetKey()) != key { + logger.Errorf("BUG getLocal: found a DHT record that didn't match it's key: %s != %s", rec.GetKey(), key) + return nil, nil + + } + return rec, nil +} + +// getOwnPrivateKey attempts to load the local peers private +// key from the peerstore. +func (dht *IpfsDHT) getOwnPrivateKey() (ci.PrivKey, error) { + sk := dht.peerstore.PrivKey(dht.self) + if sk == nil { + logger.Warningf("%s dht cannot get own private key!", dht.self) + return nil, fmt.Errorf("cannot get private key to sign record!") + } + return sk, nil +} + +// putLocal stores the key value pair in the datastore +func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error { + logger.Debugf("putLocal: %v %v", key, rec) + data, err := proto.Marshal(rec) + if err != nil { + logger.Warningf("putLocal: %s", err) + return err + } + + return dht.datastore.Put(mkDsKey(key), data) +} + +// Update signals the routingTable to Update its last-seen status +// on the given peer. +func (dht *IpfsDHT) Update(ctx context.Context, p peer.ID) { + logger.Event(ctx, "updatePeer", p) + dht.routingTable.Update(p) +} + +// FindLocal looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in. +func (dht *IpfsDHT) FindLocal(id peer.ID) pstore.PeerInfo { + switch dht.host.Network().Connectedness(id) { + case inet.Connected, inet.CanConnect: + return dht.peerstore.PeerInfo(id) + default: + return pstore.PeerInfo{} + } +} + +// findPeerSingle asks peer 'p' if they know where the peer with id 'id' is +func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (*pb.Message, error) { + eip := logger.EventBegin(ctx, "findPeerSingle", + logging.LoggableMap{ + "peer": p, + "target": id, + }) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_FIND_NODE, []byte(id), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("read timeout: %s %s", p.Pretty(), id) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key cid.Cid) (*pb.Message, error) { + eip := logger.EventBegin(ctx, "findProvidersSingle", p, key) + defer eip.Done() + + pmes := pb.NewMessage(pb.Message_GET_PROVIDERS, key.Bytes(), 0) + resp, err := dht.sendRequest(ctx, p, pmes) + switch err { + case nil: + return resp, nil + case ErrReadTimeout: + logger.Warningf("read timeout: %s %s", p.Pretty(), key) + fallthrough + default: + eip.SetError(err) + return nil, err + } +} + +// nearestPeersToQuery returns the routing tables closest peers. +func (dht *IpfsDHT) nearestPeersToQuery(pmes *pb.Message, count int) []peer.ID { + closer := dht.routingTable.NearestPeers(kb.ConvertKey(string(pmes.GetKey())), count) + return closer +} + +// betterPeersToQuery returns nearestPeersToQuery, but if and only if closer than self. +func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) []peer.ID { + closer := dht.nearestPeersToQuery(pmes, count) + + // no node? nil + if closer == nil { + logger.Warning("betterPeersToQuery: no closer peers to send:", p) + return nil + } + + filtered := make([]peer.ID, 0, len(closer)) + for _, clp := range closer { + + // == to self? thats bad + if clp == dht.self { + logger.Error("BUG betterPeersToQuery: attempted to return self! this shouldn't happen...") + return nil + } + // Dont send a peer back themselves + if clp == p { + continue + } + + filtered = append(filtered, clp) + } + + // ok seems like closer nodes + return filtered +} + +// Context return dht's context +func (dht *IpfsDHT) Context() context.Context { + return dht.ctx +} + +// Process return dht's process +func (dht *IpfsDHT) Process() goprocess.Process { + return dht.proc +} + +// RoutingTable return dht's routingTable +func (dht *IpfsDHT) RoutingTable() *kb.RoutingTable { + return dht.routingTable +} + +// Close calls Process Close +func (dht *IpfsDHT) Close() error { + return dht.proc.Close() +} + +func (dht *IpfsDHT) protocolStrs() []string { + pstrs := make([]string, len(dht.protocols)) + for idx, proto := range dht.protocols { + pstrs[idx] = string(proto) + } + + return pstrs +} + +func mkDsKey(s string) ds.Key { + return ds.NewKey(base32.RawStdEncoding.EncodeToString([]byte(s))) +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_bootstrap.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_bootstrap.go new file mode 100644 index 0000000000..16901ac14f --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_bootstrap.go @@ -0,0 +1,172 @@ +package dht + +import ( + "context" + "crypto/rand" + "fmt" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + multiaddr "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + _ "gx/ipfs/QmU98UaAEh4WJAcir2qjfztU77JQ14kAwHNFkjUXHZA3Vy/go-multiaddr-dns" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" +) + +var DefaultBootstrapPeers []multiaddr.Multiaddr + +func init() { + for _, s := range []string{ + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", + "/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", + "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", // mars.i.ipfs.io + "/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", // pluto.i.ipfs.io + "/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu", // saturn.i.ipfs.io + "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", // venus.i.ipfs.io + "/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", // earth.i.ipfs.io + "/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", // pluto.i.ipfs.io + "/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu", // saturn.i.ipfs.io + "/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", // venus.i.ipfs.io + "/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", // earth.i.ipfs.io + } { + ma, err := multiaddr.NewMultiaddr(s) + if err != nil { + panic(err) + } + DefaultBootstrapPeers = append(DefaultBootstrapPeers, ma) + } +} + +// BootstrapConfig specifies parameters used bootstrapping the DHT. +// +// Note there is a tradeoff between the bootstrap period and the +// number of queries. We could support a higher period with less +// queries. +type BootstrapConfig struct { + Queries int // how many queries to run per period + Period time.Duration // how often to run periodic bootstrap. + Timeout time.Duration // how long to wait for a bootstrap query to run +} + +var DefaultBootstrapConfig = BootstrapConfig{ + // For now, this is set to 1 query. + // We are currently more interested in ensuring we have a properly formed + // DHT than making sure our dht minimizes traffic. Once we are more certain + // of our implementation's robustness, we should lower this down to 8 or 4. + Queries: 1, + + // For now, this is set to 5 minutes, which is a medium period. We are + // We are currently more interested in ensuring we have a properly formed + // DHT than making sure our dht minimizes traffic. + Period: time.Duration(5 * time.Minute), + + Timeout: time.Duration(10 * time.Second), +} + +// A method in the IpfsRouting interface. It calls BootstrapWithConfig with +// the default bootstrap config. +func (dht *IpfsDHT) Bootstrap(ctx context.Context) error { + return dht.BootstrapWithConfig(ctx, DefaultBootstrapConfig) +} + +// Runs cfg.Queries bootstrap queries every cfg.Period. +func (dht *IpfsDHT) BootstrapWithConfig(ctx context.Context, cfg BootstrapConfig) error { + // Because this method is not synchronous, we have to duplicate sanity + // checks on the config so that callers aren't oblivious. + if cfg.Queries <= 0 { + return fmt.Errorf("invalid number of queries: %d", cfg.Queries) + } + go func() { + for { + err := dht.runBootstrap(ctx, cfg) + if err != nil { + logger.Warningf("error bootstrapping: %s", err) + } + select { + case <-time.After(cfg.Period): + case <-ctx.Done(): + return + } + } + }() + return nil +} + +// This is a synchronous bootstrap. cfg.Queries queries will run each with a +// timeout of cfg.Timeout. cfg.Period is not used. +func (dht *IpfsDHT) BootstrapOnce(ctx context.Context, cfg BootstrapConfig) error { + if cfg.Queries <= 0 { + return fmt.Errorf("invalid number of queries: %d", cfg.Queries) + } + return dht.runBootstrap(ctx, cfg) +} + +func newRandomPeerId() peer.ID { + id := make([]byte, 32) // SHA256 is the default. TODO: Use a more canonical way to generate random IDs. + rand.Read(id) + id = u.Hash(id) // TODO: Feed this directly into the multihash instead of hashing it. + return peer.ID(id) +} + +// Traverse the DHT toward the given ID. +func (dht *IpfsDHT) walk(ctx context.Context, target peer.ID) (pstore.PeerInfo, error) { + // TODO: Extract the query action (traversal logic?) inside FindPeer, + // don't actually call through the FindPeer machinery, which can return + // things out of the peer store etc. + return dht.FindPeer(ctx, target) +} + +// Traverse the DHT toward a random ID. +func (dht *IpfsDHT) randomWalk(ctx context.Context) error { + id := newRandomPeerId() + p, err := dht.walk(ctx, id) + switch err { + case routing.ErrNotFound: + return nil + case nil: + // We found a peer from a randomly generated ID. This should be very + // unlikely. + logger.Warningf("random walk toward %s actually found peer: %s", id, p) + return nil + default: + return err + } +} + +// runBootstrap builds up list of peers by requesting random peer IDs +func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error { + bslog := func(msg string) { + logger.Debugf("DHT %s dhtRunBootstrap %s -- routing table size: %d", dht.self, msg, dht.routingTable.Size()) + } + bslog("start") + defer bslog("end") + defer logger.EventBegin(ctx, "dhtRunBootstrap").Done() + + doQuery := func(n int, target string, f func(context.Context) error) error { + logger.Infof("Bootstrapping query (%d/%d) to %s", n, cfg.Queries, target) + queryCtx, cancel := context.WithTimeout(ctx, cfg.Timeout) + defer cancel() + err := f(queryCtx) + if err == context.DeadlineExceeded && queryCtx.Err() == context.DeadlineExceeded && ctx.Err() == nil { + return nil + } + return err + } + + // Do all but one of the bootstrap queries as random walks. + for i := 0; i < cfg.Queries; i++ { + err := doQuery(i, "random ID", dht.randomWalk) + if err != nil { + return err + } + } + + // Find self to distribute peer info to our neighbors. + return doQuery(cfg.Queries, fmt.Sprintf("self: %s", dht.self), func(ctx context.Context) error { + _, err := dht.walk(ctx, dht.self) + return err + }) +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_net.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_net.go new file mode 100644 index 0000000000..6e9750bf59 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dht_net.go @@ -0,0 +1,358 @@ +package dht + +import ( + "bufio" + "context" + "fmt" + "io" + "sync" + "time" + + ctxio "gx/ipfs/QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W/go-context/io" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pb "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb" + ggio "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io" +) + +var dhtReadMessageTimeout = time.Minute +var ErrReadTimeout = fmt.Errorf("timed out reading response") + +type bufferedWriteCloser interface { + ggio.WriteCloser + Flush() error +} + +// The Protobuf writer performs multiple small writes when writing a message. +// We need to buffer those writes, to make sure that we're not sending a new +// packet for every single write. +type bufferedDelimitedWriter struct { + *bufio.Writer + ggio.WriteCloser +} + +func newBufferedDelimitedWriter(str io.Writer) bufferedWriteCloser { + w := bufio.NewWriter(str) + return &bufferedDelimitedWriter{ + Writer: w, + WriteCloser: ggio.NewDelimitedWriter(w), + } +} + +func (w *bufferedDelimitedWriter) Flush() error { + return w.Writer.Flush() +} + +// handleNewStream implements the inet.StreamHandler +func (dht *IpfsDHT) handleNewStream(s inet.Stream) { + defer s.Reset() + if dht.handleNewMessage(s) { + // Gracefully close the stream for writes. + s.Close() + } +} + +// Returns true on orderly completion of writes (so we can Close the stream). +func (dht *IpfsDHT) handleNewMessage(s inet.Stream) bool { + ctx := dht.Context() + cr := ctxio.NewReader(ctx, s) // ok to use. we defer close stream in this func + cw := ctxio.NewWriter(ctx, s) // ok to use. we defer close stream in this func + r := ggio.NewDelimitedReader(cr, inet.MessageSizeMax) + w := newBufferedDelimitedWriter(cw) + mPeer := s.Conn().RemotePeer() + + for { + var req pb.Message + switch err := r.ReadMsg(&req); err { + case io.EOF: + return true + default: + // This string test is necessary because there isn't a single stream reset error + // instance in use. + if err.Error() != "stream reset" { + logger.Debugf("error reading message: %#v", err) + } + return false + case nil: + } + + handler := dht.handlerForMsgType(req.GetType()) + if handler == nil { + logger.Warningf("can't handle received message of type %v", req.GetType()) + return false + } + + resp, err := handler(ctx, mPeer, &req) + if err != nil { + logger.Debugf("error handling message: %v", err) + return false + } + + dht.updateFromMessage(ctx, mPeer, &req) + + if resp == nil { + continue + } + + // send out response msg + err = w.WriteMsg(resp) + if err == nil { + err = w.Flush() + } + if err != nil { + logger.Debugf("error writing response: %v", err) + return false + } + + } +} + +// sendRequest sends out a request, but also makes sure to +// measure the RTT for latency measurements. +func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { + + ms, err := dht.messageSenderForPeer(p) + if err != nil { + return nil, err + } + + start := time.Now() + + rpmes, err := ms.SendRequest(ctx, pmes) + if err != nil { + return nil, err + } + + // update the peer (on valid msgs only) + dht.updateFromMessage(ctx, p, rpmes) + + dht.peerstore.RecordLatency(p, time.Since(start)) + logger.Event(ctx, "dhtReceivedMessage", dht.self, p, rpmes) + return rpmes, nil +} + +// sendMessage sends out a message +func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { + ms, err := dht.messageSenderForPeer(p) + if err != nil { + return err + } + + if err := ms.SendMessage(ctx, pmes); err != nil { + return err + } + logger.Event(ctx, "dhtSentMessage", dht.self, p, pmes) + return nil +} + +func (dht *IpfsDHT) updateFromMessage(ctx context.Context, p peer.ID, mes *pb.Message) error { + // Make sure that this node is actually a DHT server, not just a client. + protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) + if err == nil && len(protos) > 0 { + dht.Update(ctx, p) + } + return nil +} + +func (dht *IpfsDHT) messageSenderForPeer(p peer.ID) (*messageSender, error) { + dht.smlk.Lock() + ms, ok := dht.strmap[p] + if ok { + dht.smlk.Unlock() + return ms, nil + } + ms = &messageSender{p: p, dht: dht} + dht.strmap[p] = ms + dht.smlk.Unlock() + + if err := ms.prepOrInvalidate(); err != nil { + dht.smlk.Lock() + defer dht.smlk.Unlock() + + if msCur, ok := dht.strmap[p]; ok { + // Changed. Use the new one, old one is invalid and + // not in the map so we can just throw it away. + if ms != msCur { + return msCur, nil + } + // Not changed, remove the now invalid stream from the + // map. + delete(dht.strmap, p) + } + // Invalid but not in map. Must have been removed by a disconnect. + return nil, err + } + // All ready to go. + return ms, nil +} + +type messageSender struct { + s inet.Stream + r ggio.ReadCloser + w bufferedWriteCloser + lk sync.Mutex + p peer.ID + dht *IpfsDHT + + invalid bool + singleMes int +} + +// invalidate is called before this messageSender is removed from the strmap. +// It prevents the messageSender from being reused/reinitialized and then +// forgotten (leaving the stream open). +func (ms *messageSender) invalidate() { + ms.invalid = true + if ms.s != nil { + ms.s.Reset() + ms.s = nil + } +} + +func (ms *messageSender) prepOrInvalidate() error { + ms.lk.Lock() + defer ms.lk.Unlock() + if err := ms.prep(); err != nil { + ms.invalidate() + return err + } + return nil +} + +func (ms *messageSender) prep() error { + if ms.invalid { + return fmt.Errorf("message sender has been invalidated") + } + if ms.s != nil { + return nil + } + + nstr, err := ms.dht.host.NewStream(ms.dht.ctx, ms.p, ms.dht.protocols...) + if err != nil { + return err + } + + ms.r = ggio.NewDelimitedReader(nstr, inet.MessageSizeMax) + ms.w = newBufferedDelimitedWriter(nstr) + ms.s = nstr + + return nil +} + +// streamReuseTries is the number of times we will try to reuse a stream to a +// given peer before giving up and reverting to the old one-message-per-stream +// behaviour. +const streamReuseTries = 3 + +func (ms *messageSender) SendMessage(ctx context.Context, pmes *pb.Message) error { + ms.lk.Lock() + defer ms.lk.Unlock() + retry := false + for { + if err := ms.prep(); err != nil { + return err + } + + if err := ms.writeMsg(pmes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error writing message, bailing: ", err) + return err + } else { + logger.Info("error writing message, trying again: ", err) + retry = true + continue + } + } + + logger.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) + + if ms.singleMes > streamReuseTries { + go inet.FullClose(ms.s) + ms.s = nil + } else if retry { + ms.singleMes++ + } + + return nil + } +} + +func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb.Message, error) { + ms.lk.Lock() + defer ms.lk.Unlock() + retry := false + for { + if err := ms.prep(); err != nil { + return nil, err + } + + if err := ms.writeMsg(pmes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error writing message, bailing: ", err) + return nil, err + } else { + logger.Info("error writing message, trying again: ", err) + retry = true + continue + } + } + + mes := new(pb.Message) + if err := ms.ctxReadMsg(ctx, mes); err != nil { + ms.s.Reset() + ms.s = nil + + if retry { + logger.Info("error reading message, bailing: ", err) + return nil, err + } else { + logger.Info("error reading message, trying again: ", err) + retry = true + continue + } + } + + logger.Event(ctx, "dhtSentMessage", ms.dht.self, ms.p, pmes) + + if ms.singleMes > streamReuseTries { + go inet.FullClose(ms.s) + ms.s = nil + } else if retry { + ms.singleMes++ + } + + return mes, nil + } +} + +func (ms *messageSender) writeMsg(pmes *pb.Message) error { + if err := ms.w.WriteMsg(pmes); err != nil { + return err + } + return ms.w.Flush() +} + +func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { + errc := make(chan error, 1) + go func(r ggio.ReadCloser) { + errc <- r.ReadMsg(mes) + }(ms.r) + + t := time.NewTimer(dhtReadMessageTimeout) + defer t.Stop() + + select { + case err := <-errc: + return err + case <-ctx.Done(): + return ctx.Err() + case <-t.C: + return ErrReadTimeout + } +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dial_queue.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dial_queue.go new file mode 100644 index 0000000000..153e60b7b7 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/dial_queue.go @@ -0,0 +1,351 @@ +package dht + +import ( + "context" + "fmt" + "math" + "time" + + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + queue "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue" +) + +const ( + // DefaultDialQueueMinParallelism is the default value for the minimum number of worker dial goroutines that will + // be alive at any time. + DefaultDialQueueMinParallelism = 6 + // DefaultDialQueueMaxParallelism is the default value for the maximum number of worker dial goroutines that can + // be alive at any time. + DefaultDialQueueMaxParallelism = 20 + // DefaultDialQueueMaxIdle is the default value for the period that a worker dial goroutine waits before signalling + // a worker pool downscaling. + DefaultDialQueueMaxIdle = 5 * time.Second + // DefaultDialQueueScalingMutePeriod is the default value for the amount of time to ignore further worker pool + // scaling events, after one is processed. Its role is to reduce jitter. + DefaultDialQueueScalingMutePeriod = 1 * time.Second + // DefaultDialQueueScalingFactor is the default factor by which the current number of workers will be multiplied + // or divided when upscaling and downscaling events occur, respectively. + DefaultDialQueueScalingFactor = 1.5 +) + +type dialQueue struct { + *dqParams + + nWorkers uint + out *queue.ChanQueue + + waitingCh chan waitingCh + dieCh chan struct{} + growCh chan struct{} + shrinkCh chan struct{} +} + +type dqParams struct { + ctx context.Context + target string + dialFn func(context.Context, peer.ID) error + in *queue.ChanQueue + config dqConfig +} + +type dqConfig struct { + // minParallelism is the minimum number of worker dial goroutines that will be alive at any time. + minParallelism uint + // maxParallelism is the maximum number of worker dial goroutines that can be alive at any time. + maxParallelism uint + // scalingFactor is the factor by which the current number of workers will be multiplied or divided when upscaling + // and downscaling events occur, respectively. + scalingFactor float64 + // mutePeriod is the amount of time to ignore further worker pool scaling events, after one is processed. + // Its role is to reduce jitter. + mutePeriod time.Duration + // maxIdle is the period that a worker dial goroutine waits before signalling a worker pool downscaling. + maxIdle time.Duration +} + +// dqDefaultConfig returns the default configuration for dial queues. See const documentation to learn the default values. +func dqDefaultConfig() dqConfig { + return dqConfig{ + minParallelism: DefaultDialQueueMinParallelism, + maxParallelism: DefaultDialQueueMaxParallelism, + scalingFactor: DefaultDialQueueScalingFactor, + maxIdle: DefaultDialQueueMaxIdle, + mutePeriod: DefaultDialQueueScalingMutePeriod, + } +} + +func (dqc *dqConfig) validate() error { + if dqc.minParallelism > dqc.maxParallelism { + return fmt.Errorf("minParallelism must be below maxParallelism; actual values: min=%d, max=%d", + dqc.minParallelism, dqc.maxParallelism) + } + if dqc.scalingFactor < 1 { + return fmt.Errorf("scalingFactor must be >= 1; actual value: %f", dqc.scalingFactor) + } + return nil +} + +type waitingCh struct { + ch chan<- peer.ID + ts time.Time +} + +// newDialQueue returns an adaptive dial queue that spawns a dynamically sized set of goroutines to preemptively +// stage dials for later handoff to the DHT protocol for RPC. It identifies backpressure on both ends (dial consumers +// and dial producers), and takes compensating action by adjusting the worker pool. +// +// Why? Dialing is expensive. It's orders of magnitude slower than running an RPC on an already-established +// connection, as it requires establishing a TCP connection, multistream handshake, crypto handshake, mux handshake, +// and protocol negotiation. +// +// We start with config.minParallelism number of workers, and scale up and down based on demand and supply of +// dialled peers. +// +// The following events trigger scaling: +// - we scale up when we can't immediately return a successful dial to a new consumer. +// - we scale down when we've been idle for a while waiting for new dial attempts. +// - we scale down when we complete a dial and realise nobody was waiting for it. +// +// Dialler throttling (e.g. FD limit exceeded) is a concern, as we can easily spin up more workers to compensate, and +// end up adding fuel to the fire. Since we have no deterministic way to detect this for now, we hard-limit concurrency +// to config.maxParallelism. +func newDialQueue(params *dqParams) (*dialQueue, error) { + dq := &dialQueue{ + dqParams: params, + nWorkers: params.config.minParallelism, + out: queue.NewChanQueue(params.ctx, queue.NewXORDistancePQ(params.target)), + growCh: make(chan struct{}, 1), + shrinkCh: make(chan struct{}, 1), + waitingCh: make(chan waitingCh), + dieCh: make(chan struct{}, params.config.maxParallelism), + } + + for i := 0; i < int(params.config.minParallelism); i++ { + go dq.worker() + } + go dq.control() + return dq, nil +} + +func (dq *dialQueue) control() { + var ( + dialled <-chan peer.ID + waiting []waitingCh + lastScalingEvt = time.Now() + ) + + defer func() { + for _, w := range waiting { + close(w.ch) + } + waiting = nil + }() + + for { + // First process any backlog of dial jobs and waiters -- making progress is the priority. + // This block is copied below; couldn't find a more concise way of doing this. + select { + case <-dq.ctx.Done(): + return + case w := <-dq.waitingCh: + waiting = append(waiting, w) + dialled = dq.out.DeqChan + continue // onto the top. + case p, ok := <-dialled: + if !ok { + return // we're done if the ChanQueue is closed, which happens when the context is closed. + } + w := waiting[0] + logger.Debugf("delivering dialled peer to DHT; took %dms.", time.Since(w.ts)/time.Millisecond) + w.ch <- p + close(w.ch) + waiting = waiting[1:] + if len(waiting) == 0 { + // no more waiters, so stop consuming dialled jobs. + dialled = nil + } + continue // onto the top. + default: + // there's nothing to process, so proceed onto the main select block. + } + + select { + case <-dq.ctx.Done(): + return + case w := <-dq.waitingCh: + waiting = append(waiting, w) + dialled = dq.out.DeqChan + case p, ok := <-dialled: + if !ok { + return // we're done if the ChanQueue is closed, which happens when the context is closed. + } + w := waiting[0] + logger.Debugf("delivering dialled peer to DHT; took %dms.", time.Since(w.ts)/time.Millisecond) + w.ch <- p + close(w.ch) + waiting = waiting[1:] + if len(waiting) == 0 { + // no more waiters, so stop consuming dialled jobs. + dialled = nil + } + case <-dq.growCh: + if time.Since(lastScalingEvt) < dq.config.mutePeriod { + continue + } + dq.grow() + lastScalingEvt = time.Now() + case <-dq.shrinkCh: + if time.Since(lastScalingEvt) < dq.config.mutePeriod { + continue + } + dq.shrink() + lastScalingEvt = time.Now() + } + } +} + +func (dq *dialQueue) Consume() <-chan peer.ID { + ch := make(chan peer.ID, 1) + + select { + case p, ok := <-dq.out.DeqChan: + // short circuit and return a dialled peer if it's immediately available, or abort if DeqChan is closed. + if ok { + ch <- p + } + close(ch) + return ch + case <-dq.ctx.Done(): + // return a closed channel with no value if we're done. + close(ch) + return ch + default: + } + + // we have no finished dials to return, trigger a scale up. + select { + case dq.growCh <- struct{}{}: + default: + } + + // park the channel until a dialled peer becomes available. + select { + case dq.waitingCh <- waitingCh{ch, time.Now()}: + // all good + case <-dq.ctx.Done(): + // return a closed channel with no value if we're done. + close(ch) + } + return ch +} + +func (dq *dialQueue) grow() { + // no mutex needed as this is only called from the (single-threaded) control loop. + defer func(prev uint) { + if prev == dq.nWorkers { + return + } + logger.Debugf("grew dial worker pool: %d => %d", prev, dq.nWorkers) + }(dq.nWorkers) + + if dq.nWorkers == dq.config.maxParallelism { + return + } + // choosing not to worry about uint wrapping beyond max value. + target := uint(math.Floor(float64(dq.nWorkers) * dq.config.scalingFactor)) + if target > dq.config.maxParallelism { + target = dq.config.maxParallelism + } + for ; dq.nWorkers < target; dq.nWorkers++ { + go dq.worker() + } +} + +func (dq *dialQueue) shrink() { + // no mutex needed as this is only called from the (single-threaded) control loop. + defer func(prev uint) { + if prev == dq.nWorkers { + return + } + logger.Debugf("shrunk dial worker pool: %d => %d", prev, dq.nWorkers) + }(dq.nWorkers) + + if dq.nWorkers == dq.config.minParallelism { + return + } + target := uint(math.Floor(float64(dq.nWorkers) / dq.config.scalingFactor)) + if target < dq.config.minParallelism { + target = dq.config.minParallelism + } + // send as many die signals as workers we have to prune. + for ; dq.nWorkers > target; dq.nWorkers-- { + select { + case dq.dieCh <- struct{}{}: + default: + logger.Debugf("too many die signals queued up.") + } + } +} + +func (dq *dialQueue) worker() { + // This idle timer tracks if the environment is slow. If we're waiting to long to acquire a peer to dial, + // it means that the DHT query is progressing slow and we should shrink the worker pool. + idleTimer := time.NewTimer(24 * time.Hour) // placeholder init value which will be overridden immediately. + for { + // trap exit signals first. + select { + case <-dq.ctx.Done(): + return + case <-dq.dieCh: + return + default: + } + + idleTimer.Stop() + select { + case <-idleTimer.C: + default: + } + idleTimer.Reset(dq.config.maxIdle) + + select { + case <-dq.dieCh: + return + case <-dq.ctx.Done(): + return + case <-idleTimer.C: + // no new dial requests during our idle period; time to scale down. + case p, ok := <-dq.in.DeqChan: + if !ok { + return + } + + t := time.Now() + if err := dq.dialFn(dq.ctx, p); err != nil { + logger.Debugf("discarding dialled peer because of error: %v", err) + continue + } + logger.Debugf("dialling %v took %dms (as observed by the dht subsystem).", p, time.Since(t)/time.Millisecond) + waiting := len(dq.waitingCh) + + // by the time we're done dialling, it's possible that the context is closed, in which case there will + // be nobody listening on dq.out.EnqChan and we could block forever. + select { + case dq.out.EnqChan <- p: + case <-dq.ctx.Done(): + return + } + if waiting > 0 { + // we have somebody to deliver this value to, so no need to shrink. + continue + } + } + + // scaling down; control only arrives here if the idle timer fires, or if there are no goroutines + // waiting for the value we just produced. + select { + case dq.shrinkCh <- struct{}{}: + default: + } + } +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/doc.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/doc.go new file mode 100644 index 0000000000..acbb181499 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/doc.go @@ -0,0 +1,3 @@ +// Package dht implements a distributed hash table that satisfies the ipfs routing +// interface. This DHT is modeled after kademlia with S/Kademlia modifications. +package dht diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.mod b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.mod new file mode 100644 index 0000000000..7069caf4ba --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.mod @@ -0,0 +1,73 @@ +module github.com/libp2p/go-libp2p-kad-dht + +require ( + github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32 // indirect + github.com/coreos/go-semver v0.2.0 // indirect + github.com/fd/go-nat v1.0.0 // indirect + github.com/go-check/check v0.0.0-20180628173108-788fd7840127 // indirect + github.com/gogo/protobuf v1.2.1 + github.com/google/uuid v1.1.0 // indirect + github.com/hashicorp/golang-lru v0.5.0 + github.com/ipfs/go-cid v0.9.0 + github.com/ipfs/go-datastore v3.2.0+incompatible + github.com/ipfs/go-detect-race v1.0.1 // indirect + github.com/ipfs/go-ipfs-util v1.2.8 + github.com/ipfs/go-log v1.5.7 + github.com/ipfs/go-todocounter v1.0.1 + github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 + github.com/jbenet/go-randbuf v0.0.0-20160322125720-674640a50e6a // indirect + github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2 // indirect + github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 + github.com/kr/pretty v0.1.0 // indirect + github.com/libp2p/go-addr-util v0.0.0-20190221001233-73d4c93d8ab2 // indirect + github.com/libp2p/go-buffer-pool v0.0.0-20190123225638-a8d831235797 // indirect + github.com/libp2p/go-conn-security v0.0.0-20190218175802-3e30d86de3d7 // indirect + github.com/libp2p/go-conn-security-multistream v0.0.0-20190218181649-199bde7312d5 // indirect + github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853 // indirect + github.com/libp2p/go-libp2p v0.0.0-20190221041601-695d0ce80195 + github.com/libp2p/go-libp2p-blankhost v0.0.0-20190221000941-4dbe4842fd96 // indirect + github.com/libp2p/go-libp2p-crypto v0.0.0-20190218135128-e333f2201582 + github.com/libp2p/go-libp2p-host v0.0.0-20190218184026-1a71c422ef28 + github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190218180940-c8552ddb959e // indirect + github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6 // indirect + github.com/libp2p/go-libp2p-kbucket v0.0.0-20190218185511-f98f2bd87bdf + github.com/libp2p/go-libp2p-loggables v0.0.0-20190218142206-5b80b7ea4ee3 // indirect + github.com/libp2p/go-libp2p-metrics v0.0.0-20190218143726-eb0033e81c5e // indirect + github.com/libp2p/go-libp2p-nat v0.0.0-20190218144058-a304452f6e87 // indirect + github.com/libp2p/go-libp2p-net v0.0.0-20190222114911-e37f4ea19d2f + github.com/libp2p/go-libp2p-netutil v0.0.0-20190218181806-719d15bce148 // indirect + github.com/libp2p/go-libp2p-peer v0.0.0-20190225225425-9b0c59cc3369 + github.com/libp2p/go-libp2p-peerstore v0.0.0-20190222144347-c123410c6409 + github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2 + github.com/libp2p/go-libp2p-record v0.0.0-20190218150535-4e8ffc3e2485 + github.com/libp2p/go-libp2p-routing v0.0.0-20190221041536-330243f43148 + github.com/libp2p/go-libp2p-secio v0.0.0-20190218175819-38f90b017ad1 // indirect + github.com/libp2p/go-libp2p-swarm v0.0.0-20190219121359-7a03ca822298 + github.com/libp2p/go-libp2p-transport v0.0.0-20190218175832-d2bc1c17e028 // indirect + github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190218180826-68cf0192f1d4 // indirect + github.com/libp2p/go-maddr-filter v0.0.0-20181224014115-666a1351c131 // indirect + github.com/libp2p/go-mplex v0.0.0-20190218180303-8ac902b6abdf // indirect + github.com/libp2p/go-msgio v0.0.0-20190117001650-f8aaa1f70c8b // indirect + github.com/libp2p/go-reuseport-transport v0.0.0-20190226153717-a4b1f2833c68 // indirect + github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad // indirect + github.com/libp2p/go-tcp-transport v0.0.0-20190218180853-ddf3e5c50ef0 // indirect + github.com/libp2p/go-testutil v0.0.0-20190218143632-25ef001b4017 + github.com/mattn/go-colorable v0.1.1 // indirect + github.com/mr-tron/base58 v1.1.0 + github.com/multiformats/go-multiaddr v0.0.1 + github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777 + github.com/multiformats/go-multibase v0.0.0-20190219024939-f25b77813c0a // indirect + github.com/multiformats/go-multistream v0.0.0-20181023014559-0c61f185f3d6 + github.com/stretchr/testify v1.3.0 + github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f // indirect + github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible // indirect + github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible // indirect + github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible // indirect + github.com/whyrusleeping/mafmt v1.2.8 // indirect + github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect + github.com/whyrusleeping/yamux v1.1.5 // indirect + golang.org/x/net v0.0.0-20190225153610-fe579d43d832 // indirect +) diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.sum b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.sum new file mode 100644 index 0000000000..e2fae061a3 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/go.sum @@ -0,0 +1,236 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32 h1:qkOC5Gd33k54tobS36cXdAzJbeHaduLtnLQQwNoIi78= +github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fd/go-nat v1.0.0 h1:DPyQ97sxA9ThrWYRPcWUz/z9TnpTIGRYODIQc/dy64M= +github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gxed/hashland/keccakpg v0.0.1 h1:wrk3uMNaMxbXiHibbPO4S0ymqJMm41WiudyFSs7UnsU= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJu4ZbSc= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324 h1:PV190X5/DzQ/tbFFG5YpT5mH6q+cHlfgqI5JuRnH9oE= +github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= +github.com/ipfs/go-cid v0.9.0 h1:EdO7meRzk9MpAo8DbOmPDU3Yh2BQ4ABc0xN2wgEtREA= +github.com/ipfs/go-cid v0.9.0/go.mod h1:DEZAg7ik3SR8PY77P+hNaWtHtBirqeEgHbfmePL8WJA= +github.com/ipfs/go-datastore v3.2.0+incompatible h1:d9fANkqO9u1kgx6FSlZb8eZPDzD2uthVikkJAI7CUII= +github.com/ipfs/go-datastore v3.2.0+incompatible/go.mod h1:bYmHO9fuKO1Ca7dpdDBWQl0mndy5b0HFqSJjGlNYtzs= +github.com/ipfs/go-detect-race v1.0.1 h1:cWfwbM/um9XsEc2qp8cBGqcXIUg9J8NzmjgJr55AAso= +github.com/ipfs/go-detect-race v1.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +github.com/ipfs/go-ipfs-util v1.2.8 h1:iZ+OcHCaN2BaHU0pe9JDGVySHUUmfwqHA2pd7XxMh7A= +github.com/ipfs/go-ipfs-util v1.2.8/go.mod h1:bmXd4M1Sn0MFKptfxu9KuWvtHySyFMzkSd2rcT8Hw80= +github.com/ipfs/go-log v1.5.7 h1:8ef7XW41hzAnvVNkK5009/bOA9/MFr7fhdzkfAqvolI= +github.com/ipfs/go-log v1.5.7/go.mod h1:AKYS9u+ECLT8t30brTaoVwu3f1FpGx6C0352oI1zQ0Q= +github.com/ipfs/go-todocounter v1.0.1 h1:YExLZ2JceUGDc0of36cNGgl0fqHvPHVpgpxHsQ2tYrg= +github.com/ipfs/go-todocounter v1.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= +github.com/jackpal/gateway v1.0.4 h1:LS5EHkLuQ6jzaHwULi0vL+JO0mU/n4yUtK8oUjHHOlM= +github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= +github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA= +github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec h1:DQqZhhDvrTrEQ3Qod5yfavcA064e53xlQ+xajiorXgM= +github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jbenet/go-randbuf v0.0.0-20160322125720-674640a50e6a h1:MUZ5SN21sddytgKf4tb6rKkzO9uMLlZxIV5IpW/ZgRY= +github.com/jbenet/go-randbuf v0.0.0-20160322125720-674640a50e6a/go.mod h1:z659Yhk+3iK3C42MGnioXmP9y8uly7LuJaoDGyQyJp4= +github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2 h1:vhC1OXXiT9R2pczegwz6moDvuRpggaroAXhPIseh57A= +github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw= +github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/libp2p/go-addr-util v0.0.0-20190221001233-73d4c93d8ab2 h1:qsIbxmhITzbXXuD5IgVf86qJxhMDz0GaV9C4bIsyums= +github.com/libp2p/go-addr-util v0.0.0-20190221001233-73d4c93d8ab2/go.mod h1:doh2auL/Rkfq1xHxDrWJGHZ8yDojPerOZoPu9XVwRB8= +github.com/libp2p/go-buffer-pool v0.0.0-20190123225638-a8d831235797 h1:b8OA2bpSqMmSknt5O760k8yWv3q1dc/StPh0pNT35L4= +github.com/libp2p/go-buffer-pool v0.0.0-20190123225638-a8d831235797/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-conn-security v0.0.0-20190218175802-3e30d86de3d7 h1:RxPNbNWHPPouHT55P44KrKuZuhmbg2SPAiiG2UYddOE= +github.com/libp2p/go-conn-security v0.0.0-20190218175802-3e30d86de3d7/go.mod h1:lIqm8x2wrAxlG+6CzJ3z4Nk5/F73zdjkS6RKbHSbaJ4= +github.com/libp2p/go-conn-security-multistream v0.0.0-20190218181649-199bde7312d5 h1:O1htlC6YfEjvuTNL6Av/t/s+ORerm2WapYlKy44iR1g= +github.com/libp2p/go-conn-security-multistream v0.0.0-20190218181649-199bde7312d5/go.mod h1:hBY3HYjGnK86P3pX3wgr9IAfe3A/vZB830LJAMi1g88= +github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853 h1:i/j3E8Pyf/qIMJ7vnQ/NYcb8fvrj/uZ6m13G1gP2e8A= +github.com/libp2p/go-flow-metrics v0.0.0-20180906182756-7e5a55af4853/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= +github.com/libp2p/go-libp2p v0.0.0-20190221041601-695d0ce80195 h1:YR/XZxeopvFTRuga85yT+lHYNNiC099P1apbGujLcwk= +github.com/libp2p/go-libp2p v0.0.0-20190221041601-695d0ce80195/go.mod h1:CyUlFa6Mw04PkmMg8gBIlHUl8j3TrEiA6oFiF4SgD8w= +github.com/libp2p/go-libp2p-blankhost v0.0.0-20190221000941-4dbe4842fd96 h1:uI89awM5Idm+hzb1C6MmOdsX9AKLrJux5enU3Ii0tX8= +github.com/libp2p/go-libp2p-blankhost v0.0.0-20190221000941-4dbe4842fd96/go.mod h1:v1Lnlzn2DFfVeAk2O19BnVm/OaoRlFZwSyq015ZT11I= +github.com/libp2p/go-libp2p-crypto v0.0.0-20190218135128-e333f2201582 h1:8/gpZb/j0TeF1t6Bqu7Z5gpA60YiPl+OjxT+GOQVyEI= +github.com/libp2p/go-libp2p-crypto v0.0.0-20190218135128-e333f2201582/go.mod h1:WHpT3tvhh7GM2INNJhQBuI6J+5z/o3QI0lTF5UVjppk= +github.com/libp2p/go-libp2p-host v0.0.0-20190218184026-1a71c422ef28 h1:8E9/XngQ6AyVI/bKp2LwnqrGPJZD7kgeE3YaUT34MqQ= +github.com/libp2p/go-libp2p-host v0.0.0-20190218184026-1a71c422ef28/go.mod h1:iAthoepYpyqzb89f4RmqzF9+ebsWPFBTvSedSlcWupg= +github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190218180940-c8552ddb959e h1:ztN2yjoKXPWI8ZIgHyCMAtpcEFmU6DSnVwcXsUJcSBg= +github.com/libp2p/go-libp2p-interface-connmgr v0.0.0-20190218180940-c8552ddb959e/go.mod h1:2LbTwxMveREcmkOWo/s6MM7xDvSZbW8J8kYDF4Mj648= +github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6 h1:TiljmHO1c0NEBUZ/gEjxRKBhMl2dLy9+WL8iKdbax00= +github.com/libp2p/go-libp2p-interface-pnet v0.0.0-20180919000501-d240acf619f6/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= +github.com/libp2p/go-libp2p-kbucket v0.0.0-20190218185511-f98f2bd87bdf h1:o5OYwgu4tYl/1QUy5wrCxh4mVL19e9aTy1JZo9/Pp0c= +github.com/libp2p/go-libp2p-kbucket v0.0.0-20190218185511-f98f2bd87bdf/go.mod h1:MTtm31eal94QTxVOWYTDZ6G1YOJRN2G3ESQHbaPytLk= +github.com/libp2p/go-libp2p-loggables v0.0.0-20190218142206-5b80b7ea4ee3 h1:thm6zgssBV4edSE8iPr0H07QQhxVud1n8s8OkeQbLdg= +github.com/libp2p/go-libp2p-loggables v0.0.0-20190218142206-5b80b7ea4ee3/go.mod h1:jcP5HmpEBcQ2w5u9xhLkCv73GBPKz3weC/s6ZWhXn+k= +github.com/libp2p/go-libp2p-metrics v0.0.0-20190218143726-eb0033e81c5e h1:ENn4ERLTIlsEKAIxRK1q12hYbuQJPcykEnXq2GzyLGA= +github.com/libp2p/go-libp2p-metrics v0.0.0-20190218143726-eb0033e81c5e/go.mod h1:ko4lRyuvbgwwxD2TJvt2RHONahjJlkn6l7L/iEbJBf0= +github.com/libp2p/go-libp2p-nat v0.0.0-20190218144058-a304452f6e87 h1:DDIMwgLYXrn+bIM/P8mf5NlZLAGjafZ3nNlGCclOIjM= +github.com/libp2p/go-libp2p-nat v0.0.0-20190218144058-a304452f6e87/go.mod h1:cA6+rN+EcOAzmSL3vQ53VxX/FfOL1WGeJUvZgqjm2eQ= +github.com/libp2p/go-libp2p-net v0.0.0-20190222114911-e37f4ea19d2f h1:cEc7dv9ybQGmNDOGg0OZ8NmkZg6Nai3ZU5Z/mmboidk= +github.com/libp2p/go-libp2p-net v0.0.0-20190222114911-e37f4ea19d2f/go.mod h1:8W6Wx3AZbTRTe8zSMLoAmT3mGyau+w6kGIRk+Z+MZ7Q= +github.com/libp2p/go-libp2p-netutil v0.0.0-20190218181806-719d15bce148 h1:1DrJkQ3X/a4Fv25ZwqUhtXAaINBHAPLeEMcEpKXMQB8= +github.com/libp2p/go-libp2p-netutil v0.0.0-20190218181806-719d15bce148/go.mod h1:lpxjq1x/eUtPYAZAtnC7dKWjQeTuYIYz2ZIPNDDBj3g= +github.com/libp2p/go-libp2p-peer v0.0.0-20190225225425-9b0c59cc3369 h1:XzHzwKIq6x8zEdlDLS/lWs5ItemT/ynjHJJ8VvB3Hic= +github.com/libp2p/go-libp2p-peer v0.0.0-20190225225425-9b0c59cc3369/go.mod h1:fS2eFKRO1IomwBAf+SuE8P1XOT/AAiqSgVPNIFA7Jc0= +github.com/libp2p/go-libp2p-peerstore v0.0.0-20190222144347-c123410c6409 h1:AlbcvejhyhzPX+Gx6KZO1XhTyZJt3LvSzcrMx/5wFlQ= +github.com/libp2p/go-libp2p-peerstore v0.0.0-20190222144347-c123410c6409/go.mod h1:lLfgn0N3z2t+ER57a88K7NTZjMO27ez5TyWSURd428E= +github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2 h1:ftsFA3rhuSWX7hNR1CalvmnCKhmncZG7Nyd79Ll6lh0= +github.com/libp2p/go-libp2p-protocol v0.0.0-20171212212132-b29f3d97e3a2/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= +github.com/libp2p/go-libp2p-record v0.0.0-20190218150535-4e8ffc3e2485 h1:B95yklbLB+6RYblUn3GckaQb5hNxbmNDUeCKGW38vTI= +github.com/libp2p/go-libp2p-record v0.0.0-20190218150535-4e8ffc3e2485/go.mod h1:fsxr7H89UzzL4pG23Aq2n/5aNAXxdGEbyBVepo8oXy8= +github.com/libp2p/go-libp2p-routing v0.0.0-20190221041536-330243f43148 h1:WzSIoluTfnGu6F+haJi007KJsx/V6MH/xIt9H/CFjTg= +github.com/libp2p/go-libp2p-routing v0.0.0-20190221041536-330243f43148/go.mod h1:Alff8O712wWiftX462zvknNmi5RmXtLq/gATcxJ/Hq8= +github.com/libp2p/go-libp2p-secio v0.0.0-20190218175819-38f90b017ad1 h1:k9S6t+08n9ub/aP+sdMjCzNChDzze0+jx1S6Vh2X9J8= +github.com/libp2p/go-libp2p-secio v0.0.0-20190218175819-38f90b017ad1/go.mod h1:U7wBlYK2sZbUiTaGe6xJd/fyNq40gwn+jBk/iEUbUrA= +github.com/libp2p/go-libp2p-swarm v0.0.0-20190219121359-7a03ca822298 h1:z/qTkdyfk4+NoS1/fmgK0jM592Eiz/d0OpwVmoM87QY= +github.com/libp2p/go-libp2p-swarm v0.0.0-20190219121359-7a03ca822298/go.mod h1:NHa7cA4/y8OKFw3BHQjLL9pwPDFXkgECO/k+2gqSFuk= +github.com/libp2p/go-libp2p-transport v0.0.0-20190218175832-d2bc1c17e028 h1:v9JfDRYxPvYbM5NgPCZLKrdQUQ5pvegEVBU/qDHbeeo= +github.com/libp2p/go-libp2p-transport v0.0.0-20190218175832-d2bc1c17e028/go.mod h1:lcwgOszllbhvQXul37Kv5YbSYXPoUhRB2Z+Nr3jaBmo= +github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190218180826-68cf0192f1d4 h1:zpNsLkAArwsGXaad7jdTT+5UXWzfAAeLHt9mKPo/npY= +github.com/libp2p/go-libp2p-transport-upgrader v0.0.0-20190218180826-68cf0192f1d4/go.mod h1:5r+arPlxwtCEF1aVi/fTQF/ZWGSPHLxBov1DlXDevDA= +github.com/libp2p/go-maddr-filter v0.0.0-20181224014115-666a1351c131 h1:gLJLvrjuN7qUbCkBZgel7me9w2tFzHrqkseqziNza2c= +github.com/libp2p/go-maddr-filter v0.0.0-20181224014115-666a1351c131/go.mod h1:9uHkmfw086BVLQyQFAbe/peEO9Iley6dafqm3cKHIAk= +github.com/libp2p/go-mplex v0.0.0-20190218180303-8ac902b6abdf h1:c8XXqVqqZ0hzHpV5dG61KGlLXXuqNHn1xMB3/z7Oyhg= +github.com/libp2p/go-mplex v0.0.0-20190218180303-8ac902b6abdf/go.mod h1:00WmJEYVKH/Kz6wCom3VmxX7re6B/jgSZmkydBYAZ1w= +github.com/libp2p/go-msgio v0.0.0-20190117001650-f8aaa1f70c8b h1:x7AMpYQPtrQ13SAFD/IKsZ35ylOIzM94LLjLBmo3aQA= +github.com/libp2p/go-msgio v0.0.0-20190117001650-f8aaa1f70c8b/go.mod h1:u5M7EDois/gQxdPuEfNYQks5cAu9oxUGDU3dRkGping= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5 h1:EbC40Vr+0RQ/w+m1Oic9tgOd1DA7E+sbdzbkg5wLZ5I= +github.com/libp2p/go-reuseport v0.0.0-20190218233603-6a75ffd916e5/go.mod h1:ViUXkfLbcaqzYb7Yyi7ZP/n8nAezADhH9oLvj6TA83E= +github.com/libp2p/go-reuseport-transport v0.0.0-20190226153717-a4b1f2833c68 h1:P3KkcU9Yk21JPlltJ25FDinxySMoVTtZz6ZO/pesKcw= +github.com/libp2p/go-reuseport-transport v0.0.0-20190226153717-a4b1f2833c68/go.mod h1:MiJFBS1/zt+fK+mK0qVI1A4Pm41U9C8hy/u/CmOFqJc= +github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad h1:xa7wIqxmSF1a7q1drCXFrFeaL0Gd1TG2bJUj6Vlmh1M= +github.com/libp2p/go-stream-muxer v0.0.0-20190218175335-a3f82916c8ad/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= +github.com/libp2p/go-tcp-transport v0.0.0-20190218180853-ddf3e5c50ef0 h1:Y4BRQYtKBrltJhPWF4wPQ91MhtSs/zKuUM7h9PO1Dnw= +github.com/libp2p/go-tcp-transport v0.0.0-20190218180853-ddf3e5c50ef0/go.mod h1:K6Zi9TkPvn5m/m0bktlJ6Fv9Vna2wvr/jiCtTRC7T8o= +github.com/libp2p/go-testutil v0.0.0-20190218143632-25ef001b4017 h1:8b36J4YkhDlIk9J7YhRQl4BGYjIo8GPcC17LU/g8LEU= +github.com/libp2p/go-testutil v0.0.0-20190218143632-25ef001b4017/go.mod h1:8FHCRBHdt9BibhKebrOqVTJyW4cOZc52bfrGmw7ja+4= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XCFOweFD3BNESdnO8ewyYTFT2R+/b8FQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/multiformats/go-multiaddr v0.0.1 h1:/QUV3VBMDI6pi6xfiw7lr6xhDWWvQKn9udPn68kLSdY= +github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777 h1:j35rQ/T6NiLfsBUcX4acVlJsjWYmiH689H4D77O+o5I= +github.com/multiformats/go-multiaddr-dns v0.0.0-20181204224821-b3d6340f0777/go.mod h1:IGZKFM4G96cYgdMcUmHx5gtJxiHmvZLTQ9rdWXMKJyo= +github.com/multiformats/go-multiaddr-net v0.0.0-20190225134306-c8d587e921c0 h1:N1bRpQ94YQMy6mXhbMk6iqTyTg/cTtnhJgKVkpSPfXM= +github.com/multiformats/go-multiaddr-net v0.0.0-20190225134306-c8d587e921c0/go.mod h1:AO4WqKzxLt+paJ0N0kufj6teQ2R6fZbnItDvGTwilmk= +github.com/multiformats/go-multibase v0.0.0-20190219024939-f25b77813c0a h1:UAc/lwPpqX0eZISxIl5eopJZEh0d3Np0ZRDCvAfaYJc= +github.com/multiformats/go-multibase v0.0.0-20190219024939-f25b77813c0a/go.mod h1:RUrDbdRB1mQ1K/3PAh7h7+6NliRK10PA5joM8V0IYLI= +github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +github.com/multiformats/go-multistream v0.0.0-20181023014559-0c61f185f3d6 h1:GeFMOBjHRAu+f3JfrJz7cojfQrlGPc0fLdG5qW4LzH0= +github.com/multiformats/go-multistream v0.0.0-20181023014559-0c61f185f3d6/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f h1:M/lL30eFZTKnomXY6huvM6G0+gVquFNf6mxghaWlFUg= +github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= +github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible h1:iqksILj8STw03EJQe7Laj4ubnw+ojOyik18cd5vPL1o= +github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDbeKFZInPUrAG+bjuJmUXONGdEFW7XL0SpTY1y4= +github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible h1:BdYHctE9HJZLquG9tpTdwWcbG4FaX6tVKPGjCGgiVxo= +github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ= +github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible h1:IGm/UP/JpEFS6D787sZnZg7RA6fZIR9c/Ms9DeAVNuk= +github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= +github.com/whyrusleeping/mafmt v1.2.8 h1:TCghSl5kkwEE0j+sU/gudyhVMRlpBin8fMBBHg59EbA= +github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= +github.com/whyrusleeping/yamux v1.1.5 h1:4CK3aUUJQu0qpKZv5gEWJjNOQtdbdDhVVS6PJ+HimdE= +github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4to18W7R7imwAI/sWS9S8Q= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190225153610-fe579d43d832 h1:2IdId8zoI92l1bUzjAOygcAOkmCe13HY1j0rqPPPzB8= +golang.org/x/net v0.0.0-20190225153610-fe579d43d832/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d h1:Z0Ahzd7HltpJtjAHHxX8QFP3j1yYgiuvjbjRzDj/KH0= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/handlers.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/handlers.go new file mode 100644 index 0000000000..01c97458ed --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/handlers.go @@ -0,0 +1,381 @@ +package dht + +import ( + "bytes" + "context" + "errors" + "fmt" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + recpb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + pb "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +// The number of closer peers to send on requests. +var CloserPeerCount = KValue + +// dhthandler specifies the signature of functions that handle DHT messages. +type dhtHandler func(context.Context, peer.ID, *pb.Message) (*pb.Message, error) + +func (dht *IpfsDHT) handlerForMsgType(t pb.Message_MessageType) dhtHandler { + switch t { + case pb.Message_GET_VALUE: + return dht.handleGetValue + case pb.Message_PUT_VALUE: + return dht.handlePutValue + case pb.Message_FIND_NODE: + return dht.handleFindPeer + case pb.Message_ADD_PROVIDER: + return dht.handleAddProvider + case pb.Message_GET_PROVIDERS: + return dht.handleGetProviders + case pb.Message_PING: + return dht.handlePing + default: + return nil + } +} + +func (dht *IpfsDHT) handleGetValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { + ctx = logger.Start(ctx, "handleGetValue") + logger.SetTag(ctx, "peer", p) + defer func() { logger.FinishWithErr(ctx, err) }() + logger.Debugf("%s handleGetValue for key: %s", dht.self, pmes.GetKey()) + + // setup response + resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) + + // first, is there even a key? + k := pmes.GetKey() + if len(k) == 0 { + return nil, errors.New("handleGetValue but no key was provided") + // TODO: send back an error response? could be bad, but the other node's hanging. + } + + rec, err := dht.checkLocalDatastore(k) + if err != nil { + return nil, err + } + resp.Record = rec + + // Find closest peer on given cluster to desired key and reply with that info + closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) + if len(closer) > 0 { + closerinfos := pstore.PeerInfos(dht.peerstore, closer) + for _, pi := range closerinfos { + logger.Debugf("handleGetValue returning closer peer: '%s'", pi.ID) + if len(pi.Addrs) < 1 { + logger.Warningf(`no addresses on peer being sent! + [local:%s] + [sending:%s] + [remote:%s]`, dht.self, pi.ID, p) + } + } + + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), closerinfos) + } + + return resp, nil +} + +func (dht *IpfsDHT) checkLocalDatastore(k []byte) (*recpb.Record, error) { + logger.Debugf("%s handleGetValue looking into ds", dht.self) + dskey := convertToDsKey(k) + buf, err := dht.datastore.Get(dskey) + logger.Debugf("%s handleGetValue looking into ds GOT %v", dht.self, buf) + + if err == ds.ErrNotFound { + return nil, nil + } + + // if we got an unexpected error, bail. + if err != nil { + return nil, err + } + + // if we have the value, send it back + logger.Debugf("%s handleGetValue success!", dht.self) + + rec := new(recpb.Record) + err = proto.Unmarshal(buf, rec) + if err != nil { + logger.Debug("failed to unmarshal DHT record from datastore") + return nil, err + } + + var recordIsBad bool + recvtime, err := u.ParseRFC3339(rec.GetTimeReceived()) + if err != nil { + logger.Info("either no receive time set on record, or it was invalid: ", err) + recordIsBad = true + } + + if time.Now().Sub(recvtime) > MaxRecordAge { + logger.Debug("old record found, tossing.") + recordIsBad = true + } + + // NOTE: We do not verify the record here beyond checking these timestamps. + // we put the burden of checking the records on the requester as checking a record + // may be computationally expensive + + if recordIsBad { + err := dht.datastore.Delete(dskey) + if err != nil { + logger.Error("Failed to delete bad record from datastore: ", err) + } + + return nil, nil // can treat this as not having the record at all + } + + return rec, nil +} + +// Cleans the record (to avoid storing arbitrary data). +func cleanRecord(rec *recpb.Record) { + rec.TimeReceived = "" +} + +// Store a value in this peer local storage +func (dht *IpfsDHT) handlePutValue(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, err error) { + ctx = logger.Start(ctx, "handlePutValue") + logger.SetTag(ctx, "peer", p) + defer func() { logger.FinishWithErr(ctx, err) }() + + rec := pmes.GetRecord() + if rec == nil { + logger.Infof("Got nil record from: %s", p.Pretty()) + return nil, errors.New("nil record") + } + + if !bytes.Equal(pmes.GetKey(), rec.GetKey()) { + return nil, errors.New("put key doesn't match record key") + } + + cleanRecord(rec) + + // Make sure the record is valid (not expired, valid signature etc) + if err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()); err != nil { + logger.Warningf("Bad dht record in PUT from: %s. %s", p.Pretty(), err) + return nil, err + } + + dskey := convertToDsKey(rec.GetKey()) + + // Make sure the new record is "better" than the record we have locally. + // This prevents a record with for example a lower sequence number from + // overwriting a record with a higher sequence number. + existing, err := dht.getRecordFromDatastore(dskey) + if err != nil { + return nil, err + } + + if existing != nil { + recs := [][]byte{rec.GetValue(), existing.GetValue()} + i, err := dht.Validator.Select(string(rec.GetKey()), recs) + if err != nil { + logger.Warningf("Bad dht record in PUT from %s: %s", p.Pretty(), err) + return nil, err + } + if i != 0 { + logger.Infof("DHT record in PUT from %s is older than existing record. Ignoring", p.Pretty()) + return nil, errors.New("old record") + } + } + + // record the time we receive every record + rec.TimeReceived = u.FormatRFC3339(time.Now()) + + data, err := proto.Marshal(rec) + if err != nil { + return nil, err + } + + err = dht.datastore.Put(dskey, data) + logger.Debugf("%s handlePutValue %v", dht.self, dskey) + return pmes, err +} + +// returns nil, nil when either nothing is found or the value found doesn't properly validate. +// returns nil, some_error when there's a *datastore* error (i.e., something goes very wrong) +func (dht *IpfsDHT) getRecordFromDatastore(dskey ds.Key) (*recpb.Record, error) { + buf, err := dht.datastore.Get(dskey) + if err == ds.ErrNotFound { + return nil, nil + } + if err != nil { + logger.Errorf("Got error retrieving record with key %s from datastore: %s", dskey, err) + return nil, err + } + rec := new(recpb.Record) + err = proto.Unmarshal(buf, rec) + if err != nil { + // Bad data in datastore, log it but don't return an error, we'll just overwrite it + logger.Errorf("Bad record data stored in datastore with key %s: could not unmarshal record", dskey) + return nil, nil + } + + err = dht.Validator.Validate(string(rec.GetKey()), rec.GetValue()) + if err != nil { + // Invalid record in datastore, probably expired but don't return an error, + // we'll just overwrite it + logger.Debugf("Local record verify failed: %s (discarded)", err) + return nil, nil + } + + return rec, nil +} + +func (dht *IpfsDHT) handlePing(_ context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { + logger.Debugf("%s Responding to ping from %s!\n", dht.self, p) + return pmes, nil +} + +func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleFindPeer") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + resp := pb.NewMessage(pmes.GetType(), nil, pmes.GetClusterLevel()) + var closest []peer.ID + + // if looking for self... special case where we send it on CloserPeers. + targetPid := peer.ID(pmes.GetKey()) + if targetPid == dht.self { + closest = []peer.ID{dht.self} + } else { + closest = dht.betterPeersToQuery(pmes, p, CloserPeerCount) + + // Never tell a peer about itself. + if targetPid != p { + // If we're connected to the target peer, report their + // peer info. This makes FindPeer work even if the + // target peer isn't in our routing table. + // + // Alternatively, we could just check our peerstore. + // However, we don't want to return out of date + // information. We can change this in the future when we + // add a progressive, asynchronous `SearchPeer` function + // and improve peer routing in the host. + switch dht.host.Network().Connectedness(targetPid) { + case inet.Connected, inet.CanConnect: + closest = append(closest, targetPid) + } + } + } + + if closest == nil { + logger.Infof("%s handleFindPeer %s: could not find anything.", dht.self, p) + return resp, nil + } + + closestinfos := pstore.PeerInfos(dht.peerstore, closest) + // possibly an over-allocation but this array is temporary anyways. + withAddresses := make([]pstore.PeerInfo, 0, len(closestinfos)) + for _, pi := range closestinfos { + if len(pi.Addrs) > 0 { + withAddresses = append(withAddresses, pi) + } + } + + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), withAddresses) + return resp, nil +} + +func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleGetProviders") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + + resp := pb.NewMessage(pmes.GetType(), pmes.GetKey(), pmes.GetClusterLevel()) + c, err := cid.Cast([]byte(pmes.GetKey())) + if err != nil { + return nil, err + } + logger.SetTag(ctx, "key", c) + + // debug logging niceness. + reqDesc := fmt.Sprintf("%s handleGetProviders(%s, %s): ", dht.self, p, c) + logger.Debugf("%s begin", reqDesc) + defer logger.Debugf("%s end", reqDesc) + + // check if we have this value, to add ourselves as provider. + has, err := dht.datastore.Has(convertToDsKey(c.Bytes())) + if err != nil && err != ds.ErrNotFound { + logger.Debugf("unexpected datastore error: %v\n", err) + has = false + } + + // setup providers + providers := dht.providers.GetProviders(ctx, c) + if has { + providers = append(providers, dht.self) + logger.Debugf("%s have the value. added self as provider", reqDesc) + } + + if providers != nil && len(providers) > 0 { + infos := pstore.PeerInfos(dht.peerstore, providers) + resp.ProviderPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) + logger.Debugf("%s have %d providers: %s", reqDesc, len(providers), infos) + } + + // Also send closer peers. + closer := dht.betterPeersToQuery(pmes, p, CloserPeerCount) + if closer != nil { + infos := pstore.PeerInfos(dht.peerstore, closer) + resp.CloserPeers = pb.PeerInfosToPBPeers(dht.host.Network(), infos) + logger.Debugf("%s have %d closer peers: %s", reqDesc, len(closer), infos) + } + + return resp, nil +} + +func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.Message) (_ *pb.Message, _err error) { + ctx = logger.Start(ctx, "handleAddProvider") + defer func() { logger.FinishWithErr(ctx, _err) }() + logger.SetTag(ctx, "peer", p) + + c, err := cid.Cast([]byte(pmes.GetKey())) + if err != nil { + return nil, err + } + logger.SetTag(ctx, "key", c) + + logger.Debugf("%s adding %s as a provider for '%s'\n", dht.self, p, c) + + // add provider should use the address given in the message + pinfos := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) + for _, pi := range pinfos { + if pi.ID != p { + // we should ignore this provider record! not from originator. + // (we should sign them and check signature later...) + logger.Debugf("handleAddProvider received provider %s from %s. Ignore.", pi.ID, p) + continue + } + + if len(pi.Addrs) < 1 { + logger.Debugf("%s got no valid addresses for provider %s. Ignore.", dht.self, p) + continue + } + + logger.Debugf("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) + if pi.ID != dht.self { // don't add own addrs. + // add the received addresses to our peerstore. + dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL) + } + dht.providers.AddProvider(ctx, c, p) + } + + return nil, nil +} + +func convertToDsKey(s []byte) ds.Key { + return ds.NewKey(base32.RawStdEncoding.EncodeToString(s)) +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/lookup.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/lookup.go new file mode 100644 index 0000000000..0cc7e0dc59 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/lookup.go @@ -0,0 +1,114 @@ +package dht + +import ( + "context" + "fmt" + "strings" + + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + pb "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb" +) + +func tryFormatLoggableKey(k string) (string, error) { + if len(k) == 0 { + return "", fmt.Errorf("loggableKey is empty") + } + var proto, cstr string + if k[0] == '/' { + // it's a path (probably) + protoEnd := strings.IndexByte(k[1:], '/') + if protoEnd < 0 { + return k, fmt.Errorf("loggableKey starts with '/' but is not a path: %x", k) + } + proto = k[1 : protoEnd+1] + cstr = k[protoEnd+2:] + } else { + proto = "provider" + cstr = k + } + + c, err := cid.Cast([]byte(cstr)) + if err != nil { + return "", fmt.Errorf("loggableKey could not cast key to a CID: %x %v", k, err) + } + return fmt.Sprintf("/%s/%s", proto, c.String()), nil +} + +func loggableKey(k string) logging.LoggableMap { + newKey, err := tryFormatLoggableKey(k) + if err != nil { + logger.Debug(err) + } else { + k = newKey + } + + return logging.LoggableMap{ + "key": k, + } +} + +// Kademlia 'node lookup' operation. Returns a channel of the K closest peers +// to the given key +func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error) { + e := logger.EventBegin(ctx, "getClosestPeers", loggableKey(key)) + tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) + if len(tablepeers) == 0 { + return nil, kb.ErrLookupFailure + } + + out := make(chan peer.ID, KValue) + + // since the query doesnt actually pass our context down + // we have to hack this here. whyrusleeping isnt a huge fan of goprocess + parent := ctx + query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + // For DHT query command + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + pmes, err := dht.findPeerSingle(ctx, p, peer.ID(key)) + if err != nil { + logger.Debugf("error getting closer peers: %s", err) + return nil, err + } + peers := pb.PBPeersToPeerInfos(pmes.GetCloserPeers()) + + // For DHT query command + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: peers, + }) + + return &dhtQueryResult{closerPeers: peers}, nil + }) + + go func() { + defer close(out) + defer e.Done() + // run it! + res, err := query.Run(ctx, tablepeers) + if err != nil { + logger.Debugf("closestPeers query run error: %s", err) + } + + if res != nil && res.queriedSet != nil { + sorted := kb.SortClosestPeers(res.queriedSet.Peers(), kb.ConvertKey(key)) + if len(sorted) > KValue { + sorted = sorted[:KValue] + } + + for _, p := range sorted { + out <- p + } + } + }() + + return out, nil +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_posix.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_posix.go new file mode 100644 index 0000000000..11ad5583f3 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_posix.go @@ -0,0 +1,12 @@ +// +build !windows + +package dht + +import "syscall" + +func curFileLimit() uint64 { + var n syscall.Rlimit + syscall.Getrlimit(syscall.RLIMIT_NOFILE, &n) + // cast because some platforms use int64 (e.g., freebsd) + return uint64(n.Cur) +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_windows.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_windows.go new file mode 100644 index 0000000000..888aec0c75 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/nofile_test_windows.go @@ -0,0 +1,5 @@ +package dht + +func curFileLimit() uint64 { + return 16 * 1024 * 1024 +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/notif.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/notif.go new file mode 100644 index 0000000000..5791333453 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/notif.go @@ -0,0 +1,116 @@ +package dht + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + mstream "gx/ipfs/QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8/go-multistream" +) + +// netNotifiee defines methods to be used with the IpfsDHT +type netNotifiee IpfsDHT + +func (nn *netNotifiee) DHT() *IpfsDHT { + return (*IpfsDHT)(nn) +} + +func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) { + dht := nn.DHT() + select { + case <-dht.Process().Closing(): + return + default: + } + + p := v.RemotePeer() + protos, err := dht.peerstore.SupportsProtocols(p, dht.protocolStrs()...) + if err == nil && len(protos) != 0 { + // We lock here for consistency with the lock in testConnection. + // This probably isn't necessary because (dis)connect + // notifications are serialized but it's nice to be consistent. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + dht.Update(dht.Context(), p) + } + return + } + + // Note: Unfortunately, the peerstore may not yet know that this peer is + // a DHT server. So, if it didn't return a positive response above, test + // manually. + go nn.testConnection(v) +} + +func (nn *netNotifiee) testConnection(v inet.Conn) { + dht := nn.DHT() + p := v.RemotePeer() + + // Forcibly use *this* connection. Otherwise, if we have two connections, we could: + // 1. Test it twice. + // 2. Have it closed from under us leaving the second (open) connection untested. + s, err := v.NewStream() + if err != nil { + // Connection error + return + } + defer inet.FullClose(s) + + selected, err := mstream.SelectOneOf(dht.protocolStrs(), s) + if err != nil { + // Doesn't support the protocol + return + } + // Remember this choice (makes subsequent negotiations faster) + dht.peerstore.AddProtocols(p, selected) + + // We lock here as we race with disconnect. If we didn't lock, we could + // finish processing a connect after handling the associated disconnect + // event and add the peer to the routing table after removing it. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + dht.Update(dht.Context(), p) + } +} + +func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) { + dht := nn.DHT() + select { + case <-dht.Process().Closing(): + return + default: + } + + p := v.RemotePeer() + + // Lock and check to see if we're still connected. We lock to make sure + // we don't concurrently process a connect event. + dht.plk.Lock() + defer dht.plk.Unlock() + if dht.host.Network().Connectedness(p) == inet.Connected { + // We're still connected. + return + } + + dht.routingTable.Remove(p) + + dht.smlk.Lock() + defer dht.smlk.Unlock() + ms, ok := dht.strmap[p] + if !ok { + return + } + delete(dht.strmap, p) + + // Do this asynchronously as ms.lk can block for a while. + go func() { + ms.lk.Lock() + defer ms.lk.Unlock() + ms.invalidate() + }() +} + +func (nn *netNotifiee) OpenedStream(n inet.Network, v inet.Stream) {} +func (nn *netNotifiee) ClosedStream(n inet.Network, v inet.Stream) {} +func (nn *netNotifiee) Listen(n inet.Network, a ma.Multiaddr) {} +func (nn *netNotifiee) ListenClose(n inet.Network, a ma.Multiaddr) {} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts/options.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts/options.go new file mode 100644 index 0000000000..95ba339775 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/opts/options.go @@ -0,0 +1,104 @@ +package dhtopts + +import ( + "fmt" + + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + dssync "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/sync" + "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" +) + +var ProtocolDHT protocol.ID = "/ipfs/kad/1.0.0" +var ProtocolDHTOld protocol.ID = "/ipfs/dht" +var DefaultProtocols = []protocol.ID{ProtocolDHT, ProtocolDHTOld} + +// Options is a structure containing all the options that can be used when constructing a DHT. +type Options struct { + Datastore ds.Batching + Validator record.Validator + Client bool + Protocols []protocol.ID +} + +// Apply applies the given options to this Option +func (o *Options) Apply(opts ...Option) error { + for i, opt := range opts { + if err := opt(o); err != nil { + return fmt.Errorf("dht option %d failed: %s", i, err) + } + } + return nil +} + +// Option DHT option type. +type Option func(*Options) error + +// Defaults are the default DHT options. This option will be automatically +// prepended to any options you pass to the DHT constructor. +var Defaults = func(o *Options) error { + o.Validator = record.NamespacedValidator{ + "pk": record.PublicKeyValidator{}, + } + o.Datastore = dssync.MutexWrap(ds.NewMapDatastore()) + o.Protocols = DefaultProtocols + return nil +} + +// Datastore configures the DHT to use the specified datastore. +// +// Defaults to an in-memory (temporary) map. +func Datastore(ds ds.Batching) Option { + return func(o *Options) error { + o.Datastore = ds + return nil + } +} + +// Client configures whether or not the DHT operates in client-only mode. +// +// Defaults to false. +func Client(only bool) Option { + return func(o *Options) error { + o.Client = only + return nil + } +} + +// Validator configures the DHT to use the specified validator. +// +// Defaults to a namespaced validator that can only validate public keys. +func Validator(v record.Validator) Option { + return func(o *Options) error { + o.Validator = v + return nil + } +} + +// NamespacedValidator adds a validator namespaced under `ns`. This option fails +// if the DHT is not using a `record.NamespacedValidator` as it's validator (it +// uses one by default but this can be overridden with the `Validator` option). +// +// Example: Given a validator registered as `NamespacedValidator("ipns", +// myValidator)`, all records with keys starting with `/ipns/` will be validated +// with `myValidator`. +func NamespacedValidator(ns string, v record.Validator) Option { + return func(o *Options) error { + nsval, ok := o.Validator.(record.NamespacedValidator) + if !ok { + return fmt.Errorf("can only add namespaced validators to a NamespacedValidator") + } + nsval[ns] = v + return nil + } +} + +// Protocols sets the protocols for the DHT +// +// Defaults to dht.DefaultProtocols +func Protocols(protocols ...protocol.ID) Option { + return func(o *Options) error { + o.Protocols = protocols + return nil + } +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/package.json b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/package.json new file mode 100644 index 0000000000..03cab846d3 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/package.json @@ -0,0 +1,177 @@ +{ + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-kad-dht" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-kad-dht", + "goversion": "1.5.2" + }, + "gxDependencies": [ + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK", + "name": "go-libp2p-crypto", + "version": "2.0.7" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP", + "name": "goprocess", + "version": "1.0.0" + }, + { + "hash": "QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB", + "name": "gogo-protobuf", + "version": "1.2.1" + }, + { + "author": "jbenet", + "hash": "QmTKsRYeY4simJyf37K93juSq75Lo8MVCDJ7owjmf46u8W", + "name": "go-context", + "version": "1.0.0" + }, + { + "author": "jbenet", + "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", + "name": "go-datastore", + "version": "3.6.1" + }, + { + "author": "hashicorp", + "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", + "name": "golang-lru", + "version": "2017.10.18" + }, + { + "author": "whyrusleeping", + "hash": "QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs", + "name": "go-libp2p-peerstore", + "version": "2.0.19" + }, + { + "author": "whyrusleeping", + "hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6", + "name": "base32", + "version": "0.0.2" + }, + { + "author": "whyrusleeping", + "hash": "QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W", + "name": "go-testutil", + "version": "1.2.19" + }, + { + "author": "whyrusleeping", + "hash": "QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX", + "name": "go-libp2p-record", + "version": "4.1.15" + }, + { + "author": "whyrusleeping", + "hash": "QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M", + "name": "go-libp2p-kbucket", + "version": "2.2.23" + }, + { + "author": "whyrusleeping", + "hash": "QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf", + "name": "go-libp2p-routing", + "version": "2.7.13" + }, + { + "author": "whyrusleeping", + "hash": "QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq", + "name": "go-todocounter", + "version": "1.0.1" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + }, + { + "author": "whyrusleeping", + "hash": "QmUbSLukzZYZvEYxynj9Dtd1WrGLxxg9R4U68vCMPWHmRU", + "name": "go-libp2p-loggables", + "version": "1.1.33" + }, + { + "author": "whyrusleeping", + "hash": "QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd", + "name": "go-libp2p-host", + "version": "3.0.26" + }, + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "whyrusleeping", + "hash": "QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz", + "name": "go-ipfs-util", + "version": "1.2.9" + }, + { + "author": "whyrusleeping", + "hash": "QmabLh8TrJ3emfAoQk5AbqbLTbMyj7XqumMFmAFxa9epo8", + "name": "go-multistream", + "version": "0.3.9" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", + "name": "go-libp2p-protocol", + "version": "1.0.0" + }, + { + "author": "mr-tron", + "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", + "name": "go-base58-fast", + "version": "0.1.1" + }, + { + "author": "whyrusleeping", + "hash": "Qma3Xp3FXFSP4prirEiRYHJ2tgGE8EAx9i6JLziPLpAQjq", + "name": "go-libp2p-swarm", + "version": "3.0.34" + }, + { + "author": "magik6k", + "hash": "QmPVkJMTeRC6iBByPWdrRkD3BE5UXsj5HPzb4kPqL186mS", + "name": "testify", + "version": "1.0.0" + } + ], + "gxVersion": "0.4.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-kad-dht", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "4.4.31" +} + diff --git a/vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/Makefile b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/Makefile similarity index 100% rename from vendor/gx/ipfs/QmaRFtZhVAwXBk4Z3zEsvjScH9fjsDZmhXfa1Gm8eMb9cg/go-ipns/pb/Makefile rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/Makefile diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/dht.pb.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/dht.pb.go new file mode 100644 index 0000000000..c583714469 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/dht.pb.go @@ -0,0 +1,976 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: dht.proto + +package dht_pb + +import ( + fmt "fmt" + pb "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record/pb" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Message_MessageType int32 + +const ( + Message_PUT_VALUE Message_MessageType = 0 + Message_GET_VALUE Message_MessageType = 1 + Message_ADD_PROVIDER Message_MessageType = 2 + Message_GET_PROVIDERS Message_MessageType = 3 + Message_FIND_NODE Message_MessageType = 4 + Message_PING Message_MessageType = 5 +) + +var Message_MessageType_name = map[int32]string{ + 0: "PUT_VALUE", + 1: "GET_VALUE", + 2: "ADD_PROVIDER", + 3: "GET_PROVIDERS", + 4: "FIND_NODE", + 5: "PING", +} + +var Message_MessageType_value = map[string]int32{ + "PUT_VALUE": 0, + "GET_VALUE": 1, + "ADD_PROVIDER": 2, + "GET_PROVIDERS": 3, + "FIND_NODE": 4, + "PING": 5, +} + +func (x Message_MessageType) String() string { + return proto.EnumName(Message_MessageType_name, int32(x)) +} + +func (Message_MessageType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 0} +} + +type Message_ConnectionType int32 + +const ( + // sender does not have a connection to peer, and no extra information (default) + Message_NOT_CONNECTED Message_ConnectionType = 0 + // sender has a live connection to peer + Message_CONNECTED Message_ConnectionType = 1 + // sender recently connected to peer + Message_CAN_CONNECT Message_ConnectionType = 2 + // sender recently tried to connect to peer repeatedly but failed to connect + // ("try" here is loose, but this should signal "made strong effort, failed") + Message_CANNOT_CONNECT Message_ConnectionType = 3 +) + +var Message_ConnectionType_name = map[int32]string{ + 0: "NOT_CONNECTED", + 1: "CONNECTED", + 2: "CAN_CONNECT", + 3: "CANNOT_CONNECT", +} + +var Message_ConnectionType_value = map[string]int32{ + "NOT_CONNECTED": 0, + "CONNECTED": 1, + "CAN_CONNECT": 2, + "CANNOT_CONNECT": 3, +} + +func (x Message_ConnectionType) String() string { + return proto.EnumName(Message_ConnectionType_name, int32(x)) +} + +func (Message_ConnectionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 1} +} + +type Message struct { + // defines what type of message it is. + Type Message_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=dht.pb.Message_MessageType" json:"type,omitempty"` + // defines what coral cluster level this query/response belongs to. + // in case we want to implement coral's cluster rings in the future. + ClusterLevelRaw int32 `protobuf:"varint,10,opt,name=clusterLevelRaw,proto3" json:"clusterLevelRaw,omitempty"` + // Used to specify the key associated with this message. + // PUT_VALUE, GET_VALUE, ADD_PROVIDER, GET_PROVIDERS + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Used to return a value + // PUT_VALUE, GET_VALUE + Record *pb.Record `protobuf:"bytes,3,opt,name=record,proto3" json:"record,omitempty"` + // Used to return peers closer to a key in a query + // GET_VALUE, GET_PROVIDERS, FIND_NODE + CloserPeers []*Message_Peer `protobuf:"bytes,8,rep,name=closerPeers,proto3" json:"closerPeers,omitempty"` + // Used to return Providers + // GET_VALUE, ADD_PROVIDER, GET_PROVIDERS + ProviderPeers []*Message_Peer `protobuf:"bytes,9,rep,name=providerPeers,proto3" json:"providerPeers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetType() Message_MessageType { + if m != nil { + return m.Type + } + return Message_PUT_VALUE +} + +func (m *Message) GetClusterLevelRaw() int32 { + if m != nil { + return m.ClusterLevelRaw + } + return 0 +} + +func (m *Message) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *Message) GetRecord() *pb.Record { + if m != nil { + return m.Record + } + return nil +} + +func (m *Message) GetCloserPeers() []*Message_Peer { + if m != nil { + return m.CloserPeers + } + return nil +} + +func (m *Message) GetProviderPeers() []*Message_Peer { + if m != nil { + return m.ProviderPeers + } + return nil +} + +type Message_Peer struct { + // ID of a given peer. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // multiaddrs for a given peer + Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"` + // used to signal the sender's connection capabilities to the peer + Connection Message_ConnectionType `protobuf:"varint,3,opt,name=connection,proto3,enum=dht.pb.Message_ConnectionType" json:"connection,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message_Peer) Reset() { *m = Message_Peer{} } +func (m *Message_Peer) String() string { return proto.CompactTextString(m) } +func (*Message_Peer) ProtoMessage() {} +func (*Message_Peer) Descriptor() ([]byte, []int) { + return fileDescriptor_616a434b24c97ff4, []int{0, 0} +} +func (m *Message_Peer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message_Peer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Message_Peer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message_Peer.Merge(m, src) +} +func (m *Message_Peer) XXX_Size() int { + return m.Size() +} +func (m *Message_Peer) XXX_DiscardUnknown() { + xxx_messageInfo_Message_Peer.DiscardUnknown(m) +} + +var xxx_messageInfo_Message_Peer proto.InternalMessageInfo + +func (m *Message_Peer) GetId() []byte { + if m != nil { + return m.Id + } + return nil +} + +func (m *Message_Peer) GetAddrs() [][]byte { + if m != nil { + return m.Addrs + } + return nil +} + +func (m *Message_Peer) GetConnection() Message_ConnectionType { + if m != nil { + return m.Connection + } + return Message_NOT_CONNECTED +} + +func init() { + proto.RegisterEnum("dht.pb.Message_MessageType", Message_MessageType_name, Message_MessageType_value) + proto.RegisterEnum("dht.pb.Message_ConnectionType", Message_ConnectionType_name, Message_ConnectionType_value) + proto.RegisterType((*Message)(nil), "dht.pb.Message") + proto.RegisterType((*Message_Peer)(nil), "dht.pb.Message.Peer") +} + +func init() { proto.RegisterFile("dht.proto", fileDescriptor_616a434b24c97ff4) } + +var fileDescriptor_616a434b24c97ff4 = []byte{ + // 428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xc1, 0x6e, 0x9b, 0x40, + 0x10, 0xed, 0x02, 0x76, 0xe3, 0x01, 0x93, 0xcd, 0x28, 0x07, 0x94, 0x4a, 0x16, 0xf2, 0x89, 0x1e, + 0x02, 0x12, 0x95, 0x7a, 0xe8, 0xa1, 0x92, 0x0b, 0x34, 0xb2, 0x94, 0x62, 0x6b, 0xeb, 0xa4, 0x47, + 0xcb, 0xc0, 0xca, 0x41, 0xa5, 0x5e, 0x04, 0x24, 0x95, 0xbf, 0xb0, 0x3d, 0xf6, 0x13, 0x2a, 0x7f, + 0x49, 0x05, 0x84, 0x16, 0xfb, 0xd0, 0xd3, 0xbe, 0x37, 0xf3, 0xde, 0xce, 0xdb, 0xd1, 0xc2, 0x28, + 0x79, 0xa8, 0xec, 0xbc, 0x10, 0x95, 0xc0, 0x61, 0x03, 0xa3, 0x2b, 0x77, 0x9b, 0x56, 0x0f, 0x8f, + 0x91, 0x1d, 0x8b, 0x6f, 0x4e, 0x96, 0x46, 0xb9, 0x9b, 0x3b, 0x5b, 0x71, 0xdd, 0xa2, 0xeb, 0x82, + 0xc7, 0xa2, 0x48, 0x9c, 0x3c, 0x72, 0x5a, 0xd4, 0x7a, 0xa7, 0x3f, 0x14, 0x78, 0xf9, 0x89, 0x97, + 0xe5, 0x66, 0xcb, 0xd1, 0x01, 0xa5, 0xda, 0xe7, 0xdc, 0x20, 0x26, 0xb1, 0x74, 0xf7, 0x95, 0xdd, + 0x5e, 0x6b, 0x3f, 0xb7, 0xbb, 0x73, 0xb5, 0xcf, 0x39, 0x6b, 0x84, 0x68, 0xc1, 0x79, 0x9c, 0x3d, + 0x96, 0x15, 0x2f, 0x6e, 0xf9, 0x13, 0xcf, 0xd8, 0xe6, 0xbb, 0x01, 0x26, 0xb1, 0x06, 0xec, 0xb4, + 0x8c, 0x14, 0xe4, 0xaf, 0x7c, 0x6f, 0x48, 0x26, 0xb1, 0x34, 0x56, 0x43, 0x7c, 0x0d, 0xc3, 0x36, + 0x88, 0x21, 0x9b, 0xc4, 0x52, 0xdd, 0x0b, 0xbb, 0xcb, 0x15, 0xd9, 0xac, 0x41, 0xec, 0x59, 0x80, + 0x6f, 0x41, 0x8d, 0x33, 0x51, 0xf2, 0x62, 0xc9, 0x79, 0x51, 0x1a, 0x67, 0xa6, 0x6c, 0xa9, 0xee, + 0xe5, 0x69, 0xbc, 0xba, 0xc9, 0xfa, 0x42, 0x7c, 0x07, 0xe3, 0xbc, 0x10, 0x4f, 0x69, 0xd2, 0x39, + 0x47, 0xff, 0x71, 0x1e, 0x4b, 0xaf, 0x32, 0x50, 0x6a, 0x80, 0x3a, 0x48, 0x69, 0xd2, 0x6c, 0x44, + 0x63, 0x52, 0x9a, 0xe0, 0x25, 0x0c, 0x36, 0x49, 0x52, 0x94, 0x86, 0x64, 0xca, 0x96, 0xc6, 0x5a, + 0x82, 0xef, 0x01, 0x62, 0xb1, 0xdb, 0xf1, 0xb8, 0x4a, 0xc5, 0xae, 0x79, 0x90, 0xee, 0x4e, 0x4e, + 0xc7, 0x78, 0x7f, 0x15, 0xcd, 0x0a, 0x7b, 0x8e, 0x69, 0x0a, 0x6a, 0x6f, 0xbb, 0x38, 0x86, 0xd1, + 0xf2, 0x6e, 0xb5, 0xbe, 0x9f, 0xdd, 0xde, 0x05, 0xf4, 0x45, 0x4d, 0x6f, 0x82, 0x8e, 0x12, 0xa4, + 0xa0, 0xcd, 0x7c, 0x7f, 0xbd, 0x64, 0x8b, 0xfb, 0xb9, 0x1f, 0x30, 0x2a, 0xe1, 0x05, 0x8c, 0x6b, + 0x41, 0x57, 0xf9, 0x4c, 0xe5, 0xda, 0xf3, 0x71, 0x1e, 0xfa, 0xeb, 0x70, 0xe1, 0x07, 0x54, 0xc1, + 0x33, 0x50, 0x96, 0xf3, 0xf0, 0x86, 0x0e, 0xa6, 0x5f, 0x40, 0x3f, 0x0e, 0x52, 0xbb, 0xc3, 0xc5, + 0x6a, 0xed, 0x2d, 0xc2, 0x30, 0xf0, 0x56, 0x81, 0xdf, 0x4e, 0xfc, 0x47, 0x09, 0x9e, 0x83, 0xea, + 0xcd, 0xc2, 0x4e, 0x41, 0x25, 0x44, 0xd0, 0xbd, 0x59, 0xd8, 0x73, 0x51, 0xf9, 0x83, 0xf6, 0xf3, + 0x30, 0x21, 0xbf, 0x0e, 0x13, 0xf2, 0xfb, 0x30, 0x21, 0xd1, 0xb0, 0xf9, 0x5e, 0x6f, 0xfe, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xf4, 0x3c, 0x3f, 0x3f, 0xa7, 0x02, 0x00, 0x00, +} + +func (m *Message) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Type)) + } + if len(m.Key) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDht(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if m.Record != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Record.Size())) + n1, err := m.Record.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.CloserPeers) > 0 { + for _, msg := range m.CloserPeers { + dAtA[i] = 0x42 + i++ + i = encodeVarintDht(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ProviderPeers) > 0 { + for _, msg := range m.ProviderPeers { + dAtA[i] = 0x4a + i++ + i = encodeVarintDht(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.ClusterLevelRaw != 0 { + dAtA[i] = 0x50 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.ClusterLevelRaw)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Message_Peer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Message_Peer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDht(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + dAtA[i] = 0x12 + i++ + i = encodeVarintDht(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.Connection != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDht(dAtA, i, uint64(m.Connection)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDht(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovDht(uint64(m.Type)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovDht(uint64(l)) + } + if m.Record != nil { + l = m.Record.Size() + n += 1 + l + sovDht(uint64(l)) + } + if len(m.CloserPeers) > 0 { + for _, e := range m.CloserPeers { + l = e.Size() + n += 1 + l + sovDht(uint64(l)) + } + } + if len(m.ProviderPeers) > 0 { + for _, e := range m.ProviderPeers { + l = e.Size() + n += 1 + l + sovDht(uint64(l)) + } + } + if m.ClusterLevelRaw != 0 { + n += 1 + sovDht(uint64(m.ClusterLevelRaw)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message_Peer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovDht(uint64(l)) + } + if len(m.Addrs) > 0 { + for _, b := range m.Addrs { + l = len(b) + n += 1 + l + sovDht(uint64(l)) + } + } + if m.Connection != 0 { + n += 1 + sovDht(uint64(m.Connection)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDht(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDht(x uint64) (n int) { + return sovDht(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= Message_MessageType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Record == nil { + m.Record = &pb.Record{} + } + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CloserPeers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CloserPeers = append(m.CloserPeers, &Message_Peer{}) + if err := m.CloserPeers[len(m.CloserPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderPeers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderPeers = append(m.ProviderPeers, &Message_Peer{}) + if err := m.ProviderPeers[len(m.ProviderPeers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterLevelRaw", wireType) + } + m.ClusterLevelRaw = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClusterLevelRaw |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDht(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Message_Peer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Peer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDht + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDht + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx)) + copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) + } + m.Connection = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDht + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Connection |= Message_ConnectionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDht(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDht + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDht(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDht + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthDht + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDht + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipDht(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthDht + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthDht = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDht = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/dht.proto b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/dht.proto similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/pb/dht.proto rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/dht.proto diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/message.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/message.go new file mode 100644 index 0000000000..6486c06716 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb/message.go @@ -0,0 +1,183 @@ +package dht_pb + +import ( + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var log = logging.Logger("dht.pb") + +type PeerRoutingInfo struct { + pstore.PeerInfo + inet.Connectedness +} + +// NewMessage constructs a new dht message with given type, key, and level +func NewMessage(typ Message_MessageType, key []byte, level int) *Message { + m := &Message{ + Type: typ, + Key: key, + } + m.SetClusterLevel(level) + return m +} + +func peerRoutingInfoToPBPeer(p PeerRoutingInfo) *Message_Peer { + pbp := new(Message_Peer) + + pbp.Addrs = make([][]byte, len(p.Addrs)) + for i, maddr := range p.Addrs { + pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. + } + s := string(p.ID) + pbp.Id = []byte(s) + c := ConnectionType(p.Connectedness) + pbp.Connection = c + return pbp +} + +func peerInfoToPBPeer(p pstore.PeerInfo) *Message_Peer { + pbp := new(Message_Peer) + + pbp.Addrs = make([][]byte, len(p.Addrs)) + for i, maddr := range p.Addrs { + pbp.Addrs[i] = maddr.Bytes() // Bytes, not String. Compressed. + } + pbp.Id = []byte(p.ID) + return pbp +} + +// PBPeerToPeer turns a *Message_Peer into its pstore.PeerInfo counterpart +func PBPeerToPeerInfo(pbp *Message_Peer) *pstore.PeerInfo { + return &pstore.PeerInfo{ + ID: peer.ID(pbp.GetId()), + Addrs: pbp.Addresses(), + } +} + +// RawPeerInfosToPBPeers converts a slice of Peers into a slice of *Message_Peers, +// ready to go out on the wire. +func RawPeerInfosToPBPeers(peers []pstore.PeerInfo) []*Message_Peer { + pbpeers := make([]*Message_Peer, len(peers)) + for i, p := range peers { + pbpeers[i] = peerInfoToPBPeer(p) + } + return pbpeers +} + +// PeersToPBPeers converts given []peer.Peer into a set of []*Message_Peer, +// which can be written to a message and sent out. the key thing this function +// does (in addition to PeersToPBPeers) is set the ConnectionType with +// information from the given inet.Network. +func PeerInfosToPBPeers(n inet.Network, peers []pstore.PeerInfo) []*Message_Peer { + pbps := RawPeerInfosToPBPeers(peers) + for i, pbp := range pbps { + c := ConnectionType(n.Connectedness(peers[i].ID)) + pbp.Connection = c + } + return pbps +} + +func PeerRoutingInfosToPBPeers(peers []PeerRoutingInfo) []*Message_Peer { + pbpeers := make([]*Message_Peer, len(peers)) + for i, p := range peers { + pbpeers[i] = peerRoutingInfoToPBPeer(p) + } + return pbpeers +} + +// PBPeersToPeerInfos converts given []*Message_Peer into []pstore.PeerInfo +// Invalid addresses will be silently omitted. +func PBPeersToPeerInfos(pbps []*Message_Peer) []*pstore.PeerInfo { + peers := make([]*pstore.PeerInfo, 0, len(pbps)) + for _, pbp := range pbps { + peers = append(peers, PBPeerToPeerInfo(pbp)) + } + return peers +} + +// Addresses returns a multiaddr associated with the Message_Peer entry +func (m *Message_Peer) Addresses() []ma.Multiaddr { + if m == nil { + return nil + } + + maddrs := make([]ma.Multiaddr, 0, len(m.Addrs)) + for _, addr := range m.Addrs { + maddr, err := ma.NewMultiaddrBytes(addr) + if err != nil { + log.Warningf("error decoding Multiaddr for peer: %s", m.GetId()) + continue + } + + maddrs = append(maddrs, maddr) + } + return maddrs +} + +// GetClusterLevel gets and adjusts the cluster level on the message. +// a +/- 1 adjustment is needed to distinguish a valid first level (1) and +// default "no value" protobuf behavior (0) +func (m *Message) GetClusterLevel() int { + level := m.GetClusterLevelRaw() - 1 + if level < 0 { + return 0 + } + return int(level) +} + +// SetClusterLevel adjusts and sets the cluster level on the message. +// a +/- 1 adjustment is needed to distinguish a valid first level (1) and +// default "no value" protobuf behavior (0) +func (m *Message) SetClusterLevel(level int) { + lvl := int32(level) + m.ClusterLevelRaw = lvl +} + +// Loggable turns a Message into machine-readable log output +func (m *Message) Loggable() map[string]interface{} { + return map[string]interface{}{ + "message": map[string]string{ + "type": m.Type.String(), + "key": b58.Encode([]byte(m.GetKey())), + }, + } +} + +// ConnectionType returns a Message_ConnectionType associated with the +// inet.Connectedness. +func ConnectionType(c inet.Connectedness) Message_ConnectionType { + switch c { + default: + return Message_NOT_CONNECTED + case inet.NotConnected: + return Message_NOT_CONNECTED + case inet.Connected: + return Message_CONNECTED + case inet.CanConnect: + return Message_CAN_CONNECT + case inet.CannotConnect: + return Message_CANNOT_CONNECT + } +} + +// Connectedness returns an inet.Connectedness associated with the +// Message_ConnectionType. +func Connectedness(c Message_ConnectionType) inet.Connectedness { + switch c { + default: + return inet.NotConnected + case Message_NOT_CONNECTED: + return inet.NotConnected + case Message_CONNECTED: + return inet.Connected + case Message_CAN_CONNECT: + return inet.CanConnect + case Message_CANNOT_CONNECT: + return inet.CannotConnect + } +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/providers/providers.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/providers/providers.go new file mode 100644 index 0000000000..5e3ef5d188 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/providers/providers.go @@ -0,0 +1,358 @@ +package providers + +import ( + "context" + "encoding/binary" + "fmt" + "strings" + "time" + + lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" + goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + ds "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore" + autobatch "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/autobatch" + dsq "gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore/query" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" +) + +var batchBufferSize = 256 + +var log = logging.Logger("providers") + +var lruCacheSize = 256 +var ProvideValidity = time.Hour * 24 +var defaultCleanupInterval = time.Hour + +type ProviderManager struct { + // all non channel fields are meant to be accessed only within + // the run method + providers *lru.Cache + lpeer peer.ID + dstore ds.Datastore + + newprovs chan *addProv + getprovs chan *getProv + period time.Duration + proc goprocess.Process + + cleanupInterval time.Duration +} + +type providerSet struct { + providers []peer.ID + set map[peer.ID]time.Time +} + +type addProv struct { + k cid.Cid + val peer.ID +} + +type getProv struct { + k cid.Cid + resp chan []peer.ID +} + +func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager { + pm := new(ProviderManager) + pm.getprovs = make(chan *getProv) + pm.newprovs = make(chan *addProv) + pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) + cache, err := lru.New(lruCacheSize) + if err != nil { + panic(err) //only happens if negative value is passed to lru constructor + } + pm.providers = cache + + pm.proc = goprocessctx.WithContext(ctx) + pm.cleanupInterval = defaultCleanupInterval + pm.proc.Go(func(p goprocess.Process) { pm.run() }) + + return pm +} + +const providersKeyPrefix = "/providers/" + +func mkProvKey(k cid.Cid) string { + return providersKeyPrefix + base32.RawStdEncoding.EncodeToString(k.Bytes()) +} + +func (pm *ProviderManager) Process() goprocess.Process { + return pm.proc +} + +func (pm *ProviderManager) providersForKey(k cid.Cid) ([]peer.ID, error) { + pset, err := pm.getProvSet(k) + if err != nil { + return nil, err + } + return pset.providers, nil +} + +func (pm *ProviderManager) getProvSet(k cid.Cid) (*providerSet, error) { + cached, ok := pm.providers.Get(k.KeyString()) + if ok { + return cached.(*providerSet), nil + } + + pset, err := loadProvSet(pm.dstore, k) + if err != nil { + return nil, err + } + + if len(pset.providers) > 0 { + pm.providers.Add(k.KeyString(), pset) + } + + return pset, nil +} + +func loadProvSet(dstore ds.Datastore, k cid.Cid) (*providerSet, error) { + res, err := dstore.Query(dsq.Query{Prefix: mkProvKey(k)}) + if err != nil { + return nil, err + } + + out := newProviderSet() + for { + e, ok := res.NextSync() + if !ok { + break + } + if e.Error != nil { + log.Error("got an error: ", e.Error) + continue + } + + lix := strings.LastIndex(e.Key, "/") + + decstr, err := base32.RawStdEncoding.DecodeString(e.Key[lix+1:]) + if err != nil { + log.Error("base32 decoding error: ", err) + continue + } + + pid := peer.ID(decstr) + + t, err := readTimeValue(e.Value) + if err != nil { + log.Warning("parsing providers record from disk: ", err) + continue + } + + out.setVal(pid, t) + } + + return out, nil +} + +func readTimeValue(i interface{}) (time.Time, error) { + data, ok := i.([]byte) + if !ok { + return time.Time{}, fmt.Errorf("data was not a []byte") + } + + nsec, _ := binary.Varint(data) + + return time.Unix(0, nsec), nil +} + +func (pm *ProviderManager) addProv(k cid.Cid, p peer.ID) error { + iprovs, ok := pm.providers.Get(k.KeyString()) + if !ok { + stored, err := loadProvSet(pm.dstore, k) + if err != nil { + return err + } + iprovs = stored + pm.providers.Add(k.KeyString(), iprovs) + } + provs := iprovs.(*providerSet) + now := time.Now() + provs.setVal(p, now) + + return writeProviderEntry(pm.dstore, k, p, now) +} + +func writeProviderEntry(dstore ds.Datastore, k cid.Cid, p peer.ID, t time.Time) error { + dsk := mkProvKey(k) + "/" + base32.RawStdEncoding.EncodeToString([]byte(p)) + + buf := make([]byte, 16) + n := binary.PutVarint(buf, t.UnixNano()) + + return dstore.Put(ds.NewKey(dsk), buf[:n]) +} + +func (pm *ProviderManager) deleteProvSet(k cid.Cid) error { + pm.providers.Remove(k.KeyString()) + + res, err := pm.dstore.Query(dsq.Query{ + KeysOnly: true, + Prefix: mkProvKey(k), + }) + if err != nil { + return err + } + + entries, err := res.Rest() + if err != nil { + return err + } + + for _, e := range entries { + err := pm.dstore.Delete(ds.NewKey(e.Key)) + if err != nil { + log.Error("deleting provider set: ", err) + } + } + return nil +} + +func (pm *ProviderManager) getProvKeys() (func() (cid.Cid, bool), error) { + res, err := pm.dstore.Query(dsq.Query{ + KeysOnly: true, + Prefix: providersKeyPrefix, + }) + if err != nil { + return nil, err + } + + iter := func() (cid.Cid, bool) { + for e := range res.Next() { + parts := strings.Split(e.Key, "/") + if len(parts) != 4 { + log.Warningf("incorrectly formatted provider entry in datastore: %s", e.Key) + continue + } + decoded, err := base32.RawStdEncoding.DecodeString(parts[2]) + if err != nil { + log.Warning("error decoding base32 provider key: %s: %s", parts[2], err) + continue + } + + c, err := cid.Cast(decoded) + if err != nil { + log.Warning("error casting key to cid from datastore key: %s", err) + continue + } + + return c, true + } + return cid.Cid{}, false + } + + return iter, nil +} + +func (pm *ProviderManager) run() { + tick := time.NewTicker(pm.cleanupInterval) + for { + select { + case np := <-pm.newprovs: + err := pm.addProv(np.k, np.val) + if err != nil { + log.Error("error adding new providers: ", err) + } + case gp := <-pm.getprovs: + provs, err := pm.providersForKey(gp.k) + if err != nil && err != ds.ErrNotFound { + log.Error("error reading providers: ", err) + } + + gp.resp <- provs + case <-tick.C: + keys, err := pm.getProvKeys() + if err != nil { + log.Error("Error loading provider keys: ", err) + continue + } + now := time.Now() + for { + k, ok := keys() + if !ok { + break + } + + provs, err := pm.getProvSet(k) + if err != nil { + log.Error("error loading known provset: ", err) + continue + } + for p, t := range provs.set { + if now.Sub(t) > ProvideValidity { + delete(provs.set, p) + } + } + // have we run out of providers? + if len(provs.set) == 0 { + provs.providers = nil + err := pm.deleteProvSet(k) + if err != nil { + log.Error("error deleting provider set: ", err) + } + } else if len(provs.set) < len(provs.providers) { + // We must have modified the providers set, recompute. + provs.providers = make([]peer.ID, 0, len(provs.set)) + for p := range provs.set { + provs.providers = append(provs.providers, p) + } + } + } + case <-pm.proc.Closing(): + tick.Stop() + return + } + } +} + +func (pm *ProviderManager) AddProvider(ctx context.Context, k cid.Cid, val peer.ID) { + prov := &addProv{ + k: k, + val: val, + } + select { + case pm.newprovs <- prov: + case <-ctx.Done(): + } +} + +func (pm *ProviderManager) GetProviders(ctx context.Context, k cid.Cid) []peer.ID { + gp := &getProv{ + k: k, + resp: make(chan []peer.ID, 1), // buffered to prevent sender from blocking + } + select { + case <-ctx.Done(): + return nil + case pm.getprovs <- gp: + } + select { + case <-ctx.Done(): + return nil + case peers := <-gp.resp: + return peers + } +} + +func newProviderSet() *providerSet { + return &providerSet{ + set: make(map[peer.ID]time.Time), + } +} + +func (ps *providerSet) Add(p peer.ID) { + ps.setVal(p, time.Now()) +} + +func (ps *providerSet) setVal(p peer.ID, t time.Time) { + _, found := ps.set[p] + if !found { + ps.providers = append(ps.providers, p) + } + + ps.set[p] = t +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/query.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/query.go new file mode 100644 index 0000000000..6e140d3d5c --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/query.go @@ -0,0 +1,319 @@ +package dht + +import ( + "context" + "sync" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + todoctr "gx/ipfs/QmQNQhNmY4STU1MURjH9vYEMpx2ncMS4gbwxXWtrEjzVAq/go-todocounter" + process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + ctxproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pset "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + queue "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore/queue" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" +) + +var maxQueryConcurrency = AlphaValue + +type dhtQuery struct { + dht *IpfsDHT + key string // the key we're querying for + qfunc queryFunc // the function to execute per peer + concurrency int // the concurrency parameter +} + +type dhtQueryResult struct { + value []byte // GetValue + peer *pstore.PeerInfo // FindPeer + providerPeers []pstore.PeerInfo // GetProviders + closerPeers []*pstore.PeerInfo // * + success bool + + finalSet *pset.PeerSet + queriedSet *pset.PeerSet +} + +// constructs query +func (dht *IpfsDHT) newQuery(k string, f queryFunc) *dhtQuery { + return &dhtQuery{ + key: k, + dht: dht, + qfunc: f, + concurrency: maxQueryConcurrency, + } +} + +// QueryFunc is a function that runs a particular query with a given peer. +// It returns either: +// - the value +// - a list of peers potentially better able to serve the query +// - an error +type queryFunc func(context.Context, peer.ID) (*dhtQueryResult, error) + +// Run runs the query at hand. pass in a list of peers to use first. +func (q *dhtQuery) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + runner := newQueryRunner(q) + return runner.Run(ctx, peers) +} + +type dhtQueryRunner struct { + query *dhtQuery // query to run + peersSeen *pset.PeerSet // all peers queried. prevent querying same peer 2x + peersQueried *pset.PeerSet // peers successfully connected to and queried + peersDialed *dialQueue // peers we have dialed to + peersToQuery *queue.ChanQueue // peers remaining to be queried + peersRemaining todoctr.Counter // peersToQuery + currently processing + + result *dhtQueryResult // query result + errs u.MultiErr // result errors. maybe should be a map[peer.ID]error + + rateLimit chan struct{} // processing semaphore + log logging.EventLogger + + runCtx context.Context + + proc process.Process + sync.RWMutex +} + +func newQueryRunner(q *dhtQuery) *dhtQueryRunner { + proc := process.WithParent(process.Background()) + ctx := ctxproc.OnClosingContext(proc) + peersToQuery := queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))) + r := &dhtQueryRunner{ + query: q, + peersRemaining: todoctr.NewSyncCounter(), + peersSeen: pset.New(), + peersQueried: pset.New(), + rateLimit: make(chan struct{}, q.concurrency), + peersToQuery: peersToQuery, + proc: proc, + } + dq, err := newDialQueue(&dqParams{ + ctx: ctx, + target: q.key, + in: peersToQuery, + dialFn: r.dialPeer, + config: dqDefaultConfig(), + }) + if err != nil { + panic(err) + } + r.peersDialed = dq + return r +} + +func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) { + r.log = logger + r.runCtx = ctx + + if len(peers) == 0 { + logger.Warning("Running query with no peers!") + return nil, nil + } + + // setup concurrency rate limiting + for i := 0; i < r.query.concurrency; i++ { + r.rateLimit <- struct{}{} + } + + // add all the peers we got first. + for _, p := range peers { + r.addPeerToQuery(p) + } + + // go do this thing. + // do it as a child proc to make sure Run exits + // ONLY AFTER spawn workers has exited. + r.proc.Go(r.spawnWorkers) + + // so workers are working. + + // wait until they're done. + err := routing.ErrNotFound + + // now, if the context finishes, close the proc. + // we have to do it here because the logic before is setup, which + // should run without closing the proc. + ctxproc.CloseAfterContext(r.proc, ctx) + + select { + case <-r.peersRemaining.Done(): + r.proc.Close() + r.RLock() + defer r.RUnlock() + + err = routing.ErrNotFound + + // if every query to every peer failed, something must be very wrong. + if len(r.errs) > 0 && len(r.errs) == r.peersSeen.Size() { + logger.Debugf("query errs: %s", r.errs) + err = r.errs[0] + } + + case <-r.proc.Closed(): + r.RLock() + defer r.RUnlock() + err = r.runCtx.Err() + } + + if r.result != nil && r.result.success { + return r.result, nil + } + + return &dhtQueryResult{ + finalSet: r.peersSeen, + queriedSet: r.peersQueried, + }, err +} + +func (r *dhtQueryRunner) addPeerToQuery(next peer.ID) { + // if new peer is ourselves... + if next == r.query.dht.self { + r.log.Debug("addPeerToQuery skip self") + return + } + + if !r.peersSeen.TryAdd(next) { + return + } + + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.AddingPeer, + ID: next, + }) + + r.peersRemaining.Increment(1) + select { + case r.peersToQuery.EnqChan <- next: + case <-r.proc.Closing(): + } +} + +func (r *dhtQueryRunner) spawnWorkers(proc process.Process) { + for { + select { + case <-r.peersRemaining.Done(): + return + + case <-r.proc.Closing(): + return + + case <-r.rateLimit: + ch := r.peersDialed.Consume() + select { + case p, ok := <-ch: + if !ok { + // this signals context cancellation. + return + } + // do it as a child func to make sure Run exits + // ONLY AFTER spawn workers has exited. + proc.Go(func(proc process.Process) { + r.queryPeer(proc, p) + }) + case <-r.proc.Closing(): + return + case <-r.peersRemaining.Done(): + return + } + } + } +} + +func (r *dhtQueryRunner) dialPeer(ctx context.Context, p peer.ID) error { + // short-circuit if we're already connected. + if r.query.dht.host.Network().Connectedness(p) == inet.Connected { + return nil + } + + logger.Debug("not connected. dialing.") + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.DialingPeer, + ID: p, + }) + + pi := pstore.PeerInfo{ID: p} + if err := r.query.dht.host.Connect(ctx, pi); err != nil { + logger.Debugf("error connecting: %s", err) + notif.PublishQueryEvent(r.runCtx, ¬if.QueryEvent{ + Type: notif.QueryError, + Extra: err.Error(), + ID: p, + }) + + r.Lock() + r.errs = append(r.errs, err) + r.Unlock() + + // This peer is dropping out of the race. + r.peersRemaining.Decrement(1) + return err + } + logger.Debugf("connected. dial success.") + return nil +} + +func (r *dhtQueryRunner) queryPeer(proc process.Process, p peer.ID) { + // ok let's do this! + + // create a context from our proc. + ctx := ctxproc.OnClosingContext(proc) + + // make sure we do this when we exit + defer func() { + // signal we're done processing peer p + r.peersRemaining.Decrement(1) + r.rateLimit <- struct{}{} + }() + + // finally, run the query against this peer + res, err := r.query.qfunc(ctx, p) + + r.peersQueried.Add(p) + + if err != nil { + logger.Debugf("ERROR worker for: %v %v", p, err) + r.Lock() + r.errs = append(r.errs, err) + r.Unlock() + + } else if res.success { + logger.Debugf("SUCCESS worker for: %v %s", p, res) + r.Lock() + r.result = res + r.Unlock() + go r.proc.Close() // signal to everyone that we're done. + // must be async, as we're one of the children, and Close blocks. + + } else if len(res.closerPeers) > 0 { + logger.Debugf("PEERS CLOSER -- worker for: %v (%d closer peers)", p, len(res.closerPeers)) + for _, next := range res.closerPeers { + if next.ID == r.query.dht.self { // don't add self. + logger.Debugf("PEERS CLOSER -- worker for: %v found self", p) + continue + } + + // add their addresses to the dialer's peerstore + r.query.dht.peerstore.AddAddrs(next.ID, next.Addrs, pstore.TempAddrTTL) + r.addPeerToQuery(next.ID) + logger.Debugf("PEERS CLOSER -- worker for: %v added %v (%v)", p, next.ID, next.Addrs) + } + } else { + logger.Debugf("QUERY worker for: %v - not found, and no closer peers.", p) + } +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/records.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/records.go new file mode 100644 index 0000000000..f398dd53ae --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/records.go @@ -0,0 +1,136 @@ +package dht + +import ( + "context" + "fmt" + "time" + + ci "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" +) + +// MaxRecordAge specifies the maximum time that any node will hold onto a record +// from the time its received. This does not apply to any other forms of validity that +// the record may contain. +// For example, a record may contain an ipns entry with an EOL saying its valid +// until the year 2020 (a great time in the future). For that record to stick around +// it must be rebroadcasted more frequently than once every 'MaxRecordAge' +const MaxRecordAge = time.Hour * 36 + +type pubkrs struct { + pubk ci.PubKey + err error +} + +func (dht *IpfsDHT) GetPublicKey(ctx context.Context, p peer.ID) (ci.PubKey, error) { + logger.Debugf("getPublicKey for: %s", p) + + // Check locally. Will also try to extract the public key from the peer + // ID itself if possible (if inlined). + pk := dht.peerstore.PubKey(p) + if pk != nil { + return pk, nil + } + + // Try getting the public key both directly from the node it identifies + // and from the DHT, in parallel + ctx, cancel := context.WithCancel(ctx) + defer cancel() + resp := make(chan pubkrs, 2) + go func() { + pubk, err := dht.getPublicKeyFromNode(ctx, p) + resp <- pubkrs{pubk, err} + }() + + // Note that the number of open connections is capped by the dial + // limiter, so there is a chance that getPublicKeyFromDHT(), which + // potentially opens a lot of connections, will block + // getPublicKeyFromNode() from getting a connection. + // Currently this doesn't seem to cause an issue so leaving as is + // for now. + go func() { + pubk, err := dht.getPublicKeyFromDHT(ctx, p) + resp <- pubkrs{pubk, err} + }() + + // Wait for one of the two go routines to return + // a public key (or for both to error out) + var err error + for i := 0; i < 2; i++ { + r := <-resp + if r.err == nil { + // Found the public key + err := dht.peerstore.AddPubKey(p, r.pubk) + if err != nil { + logger.Warningf("Failed to add public key to peerstore for %v", p) + } + return r.pubk, nil + } + err = r.err + } + + // Both go routines failed to find a public key + return nil, err +} + +func (dht *IpfsDHT) getPublicKeyFromDHT(ctx context.Context, p peer.ID) (ci.PubKey, error) { + // Only retrieve one value, because the public key is immutable + // so there's no need to retrieve multiple versions + pkkey := routing.KeyForPublicKey(p) + val, err := dht.GetValue(ctx, pkkey, Quorum(1)) + if err != nil { + return nil, err + } + + pubk, err := ci.UnmarshalPublicKey(val) + if err != nil { + logger.Errorf("Could not unmarshall public key retrieved from DHT for %v", p) + return nil, err + } + + // Note: No need to check that public key hash matches peer ID + // because this is done by GetValues() + logger.Debugf("Got public key for %s from DHT", p) + return pubk, nil +} + +func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.PubKey, error) { + // check locally, just in case... + pk := dht.peerstore.PubKey(p) + if pk != nil { + return pk, nil + } + + // Get the key from the node itself + pkkey := routing.KeyForPublicKey(p) + pmes, err := dht.getValueSingle(ctx, p, pkkey) + if err != nil { + return nil, err + } + + // node doesn't have key :( + record := pmes.GetRecord() + if record == nil { + return nil, fmt.Errorf("node %v not responding with its public key", p) + } + + pubk, err := ci.UnmarshalPublicKey(record.GetValue()) + if err != nil { + logger.Errorf("Could not unmarshall public key for %v", p) + return nil, err + } + + // Make sure the public key matches the peer ID + id, err := peer.IDFromPublicKey(pubk) + if err != nil { + logger.Errorf("Could not extract peer id from public key for %v", p) + return nil, err + } + if id != p { + return nil, fmt.Errorf("public key %v does not match peer %v", id, p) + } + + logger.Debugf("Got public key from node %v itself", p) + return pubk, nil +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing.go new file mode 100644 index 0000000000..bcb94eda72 --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing.go @@ -0,0 +1,711 @@ +package dht + +import ( + "bytes" + "context" + "fmt" + "runtime" + "sync" + "time" + + u "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util" + kb "gx/ipfs/QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M/go-libp2p-kbucket" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + pset "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer/peerset" + routing "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing" + notif "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/notifications" + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" + pstore "gx/ipfs/QmaCTz9RkrU13bm9kMB54f7atgqM4qkjDZpRwRoJiWXEqs/go-libp2p-peerstore" + record "gx/ipfs/QmbeHtaBy9nZsW4cHRcvgVY4CnDhXudE2Dr6qDxS7yg9rX/go-libp2p-record" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + pb "gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/pb" +) + +// asyncQueryBuffer is the size of buffered channels in async queries. This +// buffer allows multiple queries to execute simultaneously, return their +// results and continue querying closer peers. Note that different query +// results will wait for the channel to drain. +var asyncQueryBuffer = 10 + +// This file implements the Routing interface for the IpfsDHT struct. + +// Basic Put/Get + +// PutValue adds value corresponding to given Key. +// This is the top level "Store" operation of the DHT +func (dht *IpfsDHT) PutValue(ctx context.Context, key string, value []byte, opts ...ropts.Option) (err error) { + eip := logger.EventBegin(ctx, "PutValue") + defer func() { + eip.Append(loggableKey(key)) + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + logger.Debugf("PutValue %s", key) + + // don't even allow local users to put bad values. + if err := dht.Validator.Validate(key, value); err != nil { + return err + } + + old, err := dht.getLocal(key) + if err != nil { + // Means something is wrong with the datastore. + return err + } + + // Check if we have an old value that's not the same as the new one. + if old != nil && !bytes.Equal(old.GetValue(), value) { + // Check to see if the new one is better. + i, err := dht.Validator.Select(key, [][]byte{value, old.GetValue()}) + if err != nil { + return err + } + if i != 0 { + return fmt.Errorf("can't replace a newer value with an older value") + } + } + + rec := record.MakePutRecord(key, value) + rec.TimeReceived = u.FormatRFC3339(time.Now()) + err = dht.putLocal(key, rec) + if err != nil { + return err + } + + pchan, err := dht.GetClosestPeers(ctx, key) + if err != nil { + return err + } + + wg := sync.WaitGroup{} + for p := range pchan { + wg.Add(1) + go func(p peer.ID) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + defer wg.Done() + notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ + Type: notif.Value, + ID: p, + }) + + err := dht.putValueToPeer(ctx, p, rec) + if err != nil { + logger.Debugf("failed putting value to peer: %s", err) + } + }(p) + } + wg.Wait() + return nil +} + +// RecvdVal stores a value and the peer from which we got the value. +type RecvdVal struct { + Val []byte + From peer.ID +} + +// GetValue searches for the value corresponding to given Key. +func (dht *IpfsDHT) GetValue(ctx context.Context, key string, opts ...ropts.Option) (_ []byte, err error) { + eip := logger.EventBegin(ctx, "GetValue") + defer func() { + eip.Append(loggableKey(key)) + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // apply defaultQuorum if relevant + var cfg ropts.Options + if err := cfg.Apply(opts...); err != nil { + return nil, err + } + opts = append(opts, Quorum(getQuorum(&cfg, defaultQuorum))) + + responses, err := dht.SearchValue(ctx, key, opts...) + if err != nil { + return nil, err + } + var best []byte + + for r := range responses { + best = r + } + + if ctx.Err() != nil { + return best, ctx.Err() + } + + if best == nil { + return nil, routing.ErrNotFound + } + logger.Debugf("GetValue %v %v", key, best) + return best, nil +} + +func (dht *IpfsDHT) SearchValue(ctx context.Context, key string, opts ...ropts.Option) (<-chan []byte, error) { + var cfg ropts.Options + if err := cfg.Apply(opts...); err != nil { + return nil, err + } + + responsesNeeded := 0 + if !cfg.Offline { + responsesNeeded = getQuorum(&cfg, -1) + } + + valCh, err := dht.getValues(ctx, key, responsesNeeded) + if err != nil { + return nil, err + } + + out := make(chan []byte) + go func() { + defer close(out) + + maxVals := responsesNeeded + if maxVals < 0 { + maxVals = defaultQuorum * 4 // we want some upper bound on how + // much correctional entries we will send + } + + // vals is used collect entries we got so far and send corrections to peers + // when we exit this function + vals := make([]RecvdVal, 0, maxVals) + var best *RecvdVal + + defer func() { + if len(vals) <= 1 || best == nil { + return + } + fixupRec := record.MakePutRecord(key, best.Val) + for _, v := range vals { + // if someone sent us a different 'less-valid' record, lets correct them + if !bytes.Equal(v.Val, best.Val) { + go func(v RecvdVal) { + if v.From == dht.self { + err := dht.putLocal(key, fixupRec) + if err != nil { + logger.Error("Error correcting local dht entry:", err) + } + return + } + ctx, cancel := context.WithTimeout(dht.Context(), time.Second*30) + defer cancel() + err := dht.putValueToPeer(ctx, v.From, fixupRec) + if err != nil { + logger.Debug("Error correcting DHT entry: ", err) + } + }(v) + } + } + }() + + for { + select { + case v, ok := <-valCh: + if !ok { + return + } + + if len(vals) < maxVals { + vals = append(vals, v) + } + + if v.Val == nil { + continue + } + // Select best value + if best != nil { + if bytes.Equal(best.Val, v.Val) { + continue + } + sel, err := dht.Validator.Select(key, [][]byte{best.Val, v.Val}) + if err != nil { + logger.Warning("Failed to select dht key: ", err) + continue + } + if sel != 1 { + continue + } + } + best = &v + select { + case out <- v.Val: + case <-ctx.Done(): + return + } + case <-ctx.Done(): + return + } + } + }() + + return out, nil +} + +// GetValues gets nvals values corresponding to the given key. +func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) { + eip := logger.EventBegin(ctx, "GetValues") + + eip.Append(loggableKey(key)) + defer eip.Done() + + valCh, err := dht.getValues(ctx, key, nvals) + if err != nil { + eip.SetError(err) + return nil, err + } + + out := make([]RecvdVal, 0, nvals) + for val := range valCh { + out = append(out, val) + } + + return out, ctx.Err() +} + +func (dht *IpfsDHT) getValues(ctx context.Context, key string, nvals int) (<-chan RecvdVal, error) { + vals := make(chan RecvdVal, 1) + + done := func(err error) (<-chan RecvdVal, error) { + defer close(vals) + return vals, err + } + + // If we have it local, don't bother doing an RPC! + lrec, err := dht.getLocal(key) + if err != nil { + // something is wrong with the datastore. + return done(err) + } + if lrec != nil { + // TODO: this is tricky, we don't always want to trust our own value + // what if the authoritative source updated it? + logger.Debug("have it locally") + vals <- RecvdVal{ + Val: lrec.GetValue(), + From: dht.self, + } + + if nvals == 0 || nvals == 1 { + return done(nil) + } + + nvals-- + } else if nvals == 0 { + return done(routing.ErrNotFound) + } + + // get closest peers in the routing table + rtp := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue) + logger.Debugf("peers in rt: %d %s", len(rtp), rtp) + if len(rtp) == 0 { + logger.Warning("No peers from routing table!") + return done(kb.ErrLookupFailure) + } + + var valslock sync.Mutex + var got int + + // setup the Query + parent := ctx + query := dht.newQuery(key, func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + rec, peers, err := dht.getValueOrPeers(ctx, p, key) + switch err { + case routing.ErrNotFound: + // in this case, they responded with nothing, + // still send a notification so listeners can know the + // request has completed 'successfully' + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + }) + return nil, err + default: + return nil, err + + case nil, errInvalidRecord: + // in either of these cases, we want to keep going + } + + res := &dhtQueryResult{closerPeers: peers} + + if rec.GetValue() != nil || err == errInvalidRecord { + rv := RecvdVal{ + Val: rec.GetValue(), + From: p, + } + valslock.Lock() + select { + case vals <- rv: + case <-ctx.Done(): + valslock.Unlock() + return nil, ctx.Err() + } + got++ + + // If we have collected enough records, we're done + if nvals == got { + res.success = true + } + valslock.Unlock() + } + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: peers, + }) + + return res, nil + }) + + go func() { + reqCtx, cancel := context.WithTimeout(ctx, time.Minute) + defer cancel() + + _, err = query.Run(reqCtx, rtp) + + // We do have some values but we either ran out of peers to query or + // searched for a whole minute. + // + // We'll just call this a success. + if got > 0 && (err == routing.ErrNotFound || reqCtx.Err() == context.DeadlineExceeded) { + err = nil + } + done(err) + }() + + return vals, nil +} + +// Provider abstraction for indirect stores. +// Some DHTs store values directly, while an indirect store stores pointers to +// locations of the value, similarly to Coral and Mainline DHT. + +// Provide makes this node announce that it can provide a value for the given key +func (dht *IpfsDHT) Provide(ctx context.Context, key cid.Cid, brdcst bool) (err error) { + eip := logger.EventBegin(ctx, "Provide", key, logging.LoggableMap{"broadcast": brdcst}) + defer func() { + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // add self locally + dht.providers.AddProvider(ctx, key, dht.self) + if !brdcst { + return nil + } + + peers, err := dht.GetClosestPeers(ctx, key.KeyString()) + if err != nil { + return err + } + + mes, err := dht.makeProvRecord(key) + if err != nil { + return err + } + + wg := sync.WaitGroup{} + for p := range peers { + wg.Add(1) + go func(p peer.ID) { + defer wg.Done() + logger.Debugf("putProvider(%s, %s)", key, p) + err := dht.sendMessage(ctx, p, mes) + if err != nil { + logger.Debug(err) + } + }(p) + } + wg.Wait() + return nil +} +func (dht *IpfsDHT) makeProvRecord(skey cid.Cid) (*pb.Message, error) { + pi := pstore.PeerInfo{ + ID: dht.self, + Addrs: dht.host.Addrs(), + } + + // // only share WAN-friendly addresses ?? + // pi.Addrs = addrutil.WANShareableAddrs(pi.Addrs) + if len(pi.Addrs) < 1 { + return nil, fmt.Errorf("no known addresses for self. cannot put provider.") + } + + pmes := pb.NewMessage(pb.Message_ADD_PROVIDER, skey.Bytes(), 0) + pmes.ProviderPeers = pb.RawPeerInfosToPBPeers([]pstore.PeerInfo{pi}) + return pmes, nil +} + +// FindProviders searches until the context expires. +func (dht *IpfsDHT) FindProviders(ctx context.Context, c cid.Cid) ([]pstore.PeerInfo, error) { + var providers []pstore.PeerInfo + for p := range dht.FindProvidersAsync(ctx, c, KValue) { + providers = append(providers, p) + } + return providers, nil +} + +// FindProvidersAsync is the same thing as FindProviders, but returns a channel. +// Peers will be returned on the channel as soon as they are found, even before +// the search query completes. +func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan pstore.PeerInfo { + logger.Event(ctx, "findProviders", key) + peerOut := make(chan pstore.PeerInfo, count) + go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) + return peerOut +} + +func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key cid.Cid, count int, peerOut chan pstore.PeerInfo) { + defer logger.EventBegin(ctx, "findProvidersAsync", key).Done() + defer close(peerOut) + + ps := pset.NewLimited(count) + provs := dht.providers.GetProviders(ctx, key) + for _, p := range provs { + // NOTE: Assuming that this list of peers is unique + if ps.TryAdd(p) { + pi := dht.peerstore.PeerInfo(p) + select { + case peerOut <- pi: + case <-ctx.Done(): + return + } + } + + // If we have enough peers locally, don't bother with remote RPC + // TODO: is this a DOS vector? + if ps.Size() >= count { + return + } + } + + // setup the Query + parent := ctx + query := dht.newQuery(key.KeyString(), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + pmes, err := dht.findProvidersSingle(ctx, p, key) + if err != nil { + return nil, err + } + + logger.Debugf("%d provider entries", len(pmes.GetProviderPeers())) + provs := pb.PBPeersToPeerInfos(pmes.GetProviderPeers()) + logger.Debugf("%d provider entries decoded", len(provs)) + + // Add unique providers from request, up to 'count' + for _, prov := range provs { + if prov.ID != dht.self { + dht.peerstore.AddAddrs(prov.ID, prov.Addrs, pstore.TempAddrTTL) + } + logger.Debugf("got provider: %s", prov) + if ps.TryAdd(prov.ID) { + logger.Debugf("using provider: %s", prov) + select { + case peerOut <- *prov: + case <-ctx.Done(): + logger.Debug("context timed out sending more providers") + return nil, ctx.Err() + } + } + if ps.Size() >= count { + logger.Debugf("got enough providers (%d/%d)", ps.Size(), count) + return &dhtQueryResult{success: true}, nil + } + } + + // Give closer peers back to the query to be queried + closer := pmes.GetCloserPeers() + clpeers := pb.PBPeersToPeerInfos(closer) + logger.Debugf("got closer peers: %d %s", len(clpeers), clpeers) + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: clpeers, + }) + return &dhtQueryResult{closerPeers: clpeers}, nil + }) + + peers := dht.routingTable.NearestPeers(kb.ConvertKey(key.KeyString()), AlphaValue) + _, err := query.Run(ctx, peers) + if err != nil { + logger.Debugf("Query error: %s", err) + // Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032 + if fmt.Sprint(err) == "" { + logger.Error("reproduced bug 3032:") + logger.Errorf("Errors type information: %#v", err) + logger.Errorf("go version: %s", runtime.Version()) + logger.Error("please report this information to: https://github.com/ipfs/go-ipfs/issues/3032") + + // replace problematic error with something that won't crash the daemon + err = fmt.Errorf("") + } + notif.PublishQueryEvent(ctx, ¬if.QueryEvent{ + Type: notif.QueryError, + Extra: err.Error(), + }) + } +} + +// FindPeer searches for a peer with given ID. +func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (_ pstore.PeerInfo, err error) { + eip := logger.EventBegin(ctx, "FindPeer", id) + defer func() { + if err != nil { + eip.SetError(err) + } + eip.Done() + }() + + // Check if were already connected to them + if pi := dht.FindLocal(id); pi.ID != "" { + return pi, nil + } + + peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) + if len(peers) == 0 { + return pstore.PeerInfo{}, kb.ErrLookupFailure + } + + // Sanity... + for _, p := range peers { + if p == id { + logger.Debug("found target peer in list of closest peers...") + return dht.peerstore.PeerInfo(p), nil + } + } + + // setup the Query + parent := ctx + query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.SendingQuery, + ID: p, + }) + + pmes, err := dht.findPeerSingle(ctx, p, id) + if err != nil { + return nil, err + } + + closer := pmes.GetCloserPeers() + clpeerInfos := pb.PBPeersToPeerInfos(closer) + + // see if we got the peer here + for _, npi := range clpeerInfos { + if npi.ID == id { + return &dhtQueryResult{ + peer: npi, + success: true, + }, nil + } + } + + notif.PublishQueryEvent(parent, ¬if.QueryEvent{ + Type: notif.PeerResponse, + ID: p, + Responses: clpeerInfos, + }) + + return &dhtQueryResult{closerPeers: clpeerInfos}, nil + }) + + // run it! + result, err := query.Run(ctx, peers) + if err != nil { + return pstore.PeerInfo{}, err + } + + logger.Debugf("FindPeer %v %v", id, result.success) + if result.peer.ID == "" { + return pstore.PeerInfo{}, routing.ErrNotFound + } + + return *result.peer, nil +} + +// FindPeersConnectedToPeer searches for peers directly connected to a given peer. +func (dht *IpfsDHT) FindPeersConnectedToPeer(ctx context.Context, id peer.ID) (<-chan *pstore.PeerInfo, error) { + + peerchan := make(chan *pstore.PeerInfo, asyncQueryBuffer) + peersSeen := make(map[peer.ID]struct{}) + var peersSeenMx sync.Mutex + + peers := dht.routingTable.NearestPeers(kb.ConvertPeerID(id), AlphaValue) + if len(peers) == 0 { + return nil, kb.ErrLookupFailure + } + + // setup the Query + query := dht.newQuery(string(id), func(ctx context.Context, p peer.ID) (*dhtQueryResult, error) { + + pmes, err := dht.findPeerSingle(ctx, p, id) + if err != nil { + return nil, err + } + + var clpeers []*pstore.PeerInfo + closer := pmes.GetCloserPeers() + for _, pbp := range closer { + pi := pb.PBPeerToPeerInfo(pbp) + + // skip peers already seen + peersSeenMx.Lock() + if _, found := peersSeen[pi.ID]; found { + peersSeenMx.Unlock() + continue + } + peersSeen[pi.ID] = struct{}{} + peersSeenMx.Unlock() + + // if peer is connected, send it to our client. + if pb.Connectedness(pbp.Connection) == inet.Connected { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case peerchan <- pi: + } + } + + // if peer is the peer we're looking for, don't bother querying it. + // TODO maybe query it? + if pb.Connectedness(pbp.Connection) != inet.Connected { + clpeers = append(clpeers, pi) + } + } + + return &dhtQueryResult{closerPeers: clpeers}, nil + }) + + // run it! run it asynchronously to gen peers as results are found. + // this does no error checking + go func() { + if _, err := query.Run(ctx, peers); err != nil { + logger.Debug(err) + } + + // close the peerchan channel when done. + close(peerchan) + }() + + return peerchan, nil +} diff --git a/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing_options.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing_options.go new file mode 100644 index 0000000000..b52db74e6a --- /dev/null +++ b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/routing_options.go @@ -0,0 +1,31 @@ +package dht + +import ( + ropts "gx/ipfs/QmYxUdYY9S6yg5tSPVin5GFTvtfsLauVcr7reHDD3dM8xf/go-libp2p-routing/options" +) + +type quorumOptionKey struct{} + +const defaultQuorum = 16 + +// Quorum is a DHT option that tells the DHT how many peers it needs to get +// values from before returning the best one. +// +// Default: 16 +func Quorum(n int) ropts.Option { + return func(opts *ropts.Options) error { + if opts.Other == nil { + opts.Other = make(map[interface{}]interface{}, 1) + } + opts.Other[quorumOptionKey{}] = n + return nil + } +} + +func getQuorum(opts *ropts.Options, ndefault int) int { + responsesNeeded, ok := opts.Other[quorumOptionKey{}].(int) + if !ok { + responsesNeeded = ndefault + } + return responsesNeeded +} diff --git a/vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/util.go b/vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/util.go similarity index 100% rename from vendor/gx/ipfs/QmQHnqaNULV8WeUGgh97o9K3KAW6kWQmDyNf9UuikgnPTe/go-libp2p-kad-dht/util.go rename to vendor/gx/ipfs/QmdR6WN3TUEAVQ9KWE2UiFJikWTbUvgBJay6mjB4yUJebq/go-libp2p-kad-dht/util.go diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index.html b/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index.html deleted file mode 100644 index 160ec2a25c..0000000000 --- a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/dir-index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - {{ .Path }} - - - -
-
-
-
- Index of {{ .Path }} -
- - - - - - - {{ range .Listing }} - - - - - - {{ end }} -
-
 
-
- .. -
-
 
-
- {{ .Name }} - {{ .Size }}
-
-
- - diff --git a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/package.json b/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/package.json deleted file mode 100644 index cd171a8894..0000000000 --- a/vendor/gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "author": "lgierth", - "bugs": { - "url": "https://github.com/ipfs/dir-index-html" - }, - "gx": { - "dvcsimport": "github.com/ipfs/dir-index-html", - "goversion": "1.5.2" - }, - "gxDependencies": [], - "gxVersion": "1.0.2", - "language": "go", - "license": "MIT", - "name": "dir-index-html" -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/Makefile b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/Makefile similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/Makefile rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/Makefile diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/doc.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/doc.go new file mode 100644 index 0000000000..081c86fa8e --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/doc.go @@ -0,0 +1,169 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package gogoproto provides extensions for protocol buffers to achieve: + + - fast marshalling and unmarshalling. + - peace of mind by optionally generating test and benchmark code. + - more canonical Go structures. + - less typing by optionally generating extra helper code. + - goprotobuf compatibility + +More Canonical Go Structures + +A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. +Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. + + - nullable, if false, a field is generated without a pointer (see warning below). + - embed, if true, the field is generated as an embedded field. + - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 + - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. + - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. + - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + +Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +for a quicker overview. + +The following message: + + package test; + + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } + +Will generate a go struct which looks a lot like this: + + type A struct { + Description string + Number int64 + Id github_com_gogo_protobuf_test_custom.Uuid + } + +You will see there are no pointers, since all fields are non-nullable. +You will also see a custom type which marshals to a string. +Be warned it is your responsibility to test your custom types thoroughly. +You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. + +Next we will embed the message A in message B. + + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } + +See below that A is embedded in B. + + type B struct { + A + G []github_com_gogo_protobuf_test_custom.Uint128 + } + +Also see the repeated custom type. + + type Uint128 [2]uint64 + +Next we will create a custom name for one of our fields. + + message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; + } + +See below that the field's name is MySize and not Size. + + type C struct { + MySize *int64 + } + +The is useful when having a protocol buffer message with a field name which conflicts with a generated method. +As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. +Using customname you can fix this error without changing the field name. +This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. + +Gogoprotobuf also has some more subtle changes, these could be changed back: + + - the generated package name for imports do not have the extra /filename.pb, + but are actually the imports specified in the .proto file. + +Gogoprotobuf also has lost some features which should be brought back with time: + + - Marshalling and unmarshalling with reflect and without the unsafe package, + this requires work in pointer_reflect.go + +Why does nullable break protocol buffer specifications: + +The protocol buffer specification states, somewhere, that you should be able to tell whether a +field is set or unset. With the option nullable=false this feature is lost, +since your non-nullable fields will always be set. It can be seen as a layer on top of +protocol buffers, where before and after marshalling all non-nullable fields are set +and they cannot be unset. + +Goprotobuf Compatibility: + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: + + - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. + - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix + - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. + - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face + - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. + - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension + - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. + - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). + +Less Typing and Peace of Mind is explained in their specific plugin folders godoc: + + - github.com/gogo/protobuf/plugin/ + +If you do not use any of these extension the code that is generated +will be the same as if goprotobuf has generated it. + +The most complete way to see examples is to look at + + github.com/gogo/protobuf/test/thetest.proto + +Gogoprototest is a seperate project, +because we want to keep gogoprotobuf independent of goprotobuf, +but we still want to test it thoroughly. + +*/ +package gogoproto diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.pb.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.pb.go new file mode 100644 index 0000000000..ea1e3ff67b --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,874 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogo.proto + +package gogoproto + +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + descriptor "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62001, + Name: "gogoproto.goproto_enum_prefix", + Tag: "varint,62001,opt,name=goproto_enum_prefix", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62021, + Name: "gogoproto.goproto_enum_stringer", + Tag: "varint,62021,opt,name=goproto_enum_stringer", + Filename: "gogo.proto", +} + +var E_EnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62022, + Name: "gogoproto.enum_stringer", + Tag: "varint,62022,opt,name=enum_stringer", + Filename: "gogo.proto", +} + +var E_EnumCustomname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*string)(nil), + Field: 62023, + Name: "gogoproto.enum_customname", + Tag: "bytes,62023,opt,name=enum_customname", + Filename: "gogo.proto", +} + +var E_Enumdecl = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62024, + Name: "gogoproto.enumdecl", + Tag: "varint,62024,opt,name=enumdecl", + Filename: "gogo.proto", +} + +var E_EnumvalueCustomname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 66001, + Name: "gogoproto.enumvalue_customname", + Tag: "bytes,66001,opt,name=enumvalue_customname", + Filename: "gogo.proto", +} + +var E_GoprotoGettersAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63001, + Name: "gogoproto.goproto_getters_all", + Tag: "varint,63001,opt,name=goproto_getters_all", + Filename: "gogo.proto", +} + +var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63002, + Name: "gogoproto.goproto_enum_prefix_all", + Tag: "varint,63002,opt,name=goproto_enum_prefix_all", + Filename: "gogo.proto", +} + +var E_GoprotoStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63003, + Name: "gogoproto.goproto_stringer_all", + Tag: "varint,63003,opt,name=goproto_stringer_all", + Filename: "gogo.proto", +} + +var E_VerboseEqualAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63004, + Name: "gogoproto.verbose_equal_all", + Tag: "varint,63004,opt,name=verbose_equal_all", + Filename: "gogo.proto", +} + +var E_FaceAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63005, + Name: "gogoproto.face_all", + Tag: "varint,63005,opt,name=face_all", + Filename: "gogo.proto", +} + +var E_GostringAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63006, + Name: "gogoproto.gostring_all", + Tag: "varint,63006,opt,name=gostring_all", + Filename: "gogo.proto", +} + +var E_PopulateAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63007, + Name: "gogoproto.populate_all", + Tag: "varint,63007,opt,name=populate_all", + Filename: "gogo.proto", +} + +var E_StringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63008, + Name: "gogoproto.stringer_all", + Tag: "varint,63008,opt,name=stringer_all", + Filename: "gogo.proto", +} + +var E_OnlyoneAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63009, + Name: "gogoproto.onlyone_all", + Tag: "varint,63009,opt,name=onlyone_all", + Filename: "gogo.proto", +} + +var E_EqualAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63013, + Name: "gogoproto.equal_all", + Tag: "varint,63013,opt,name=equal_all", + Filename: "gogo.proto", +} + +var E_DescriptionAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63014, + Name: "gogoproto.description_all", + Tag: "varint,63014,opt,name=description_all", + Filename: "gogo.proto", +} + +var E_TestgenAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63015, + Name: "gogoproto.testgen_all", + Tag: "varint,63015,opt,name=testgen_all", + Filename: "gogo.proto", +} + +var E_BenchgenAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63016, + Name: "gogoproto.benchgen_all", + Tag: "varint,63016,opt,name=benchgen_all", + Filename: "gogo.proto", +} + +var E_MarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63017, + Name: "gogoproto.marshaler_all", + Tag: "varint,63017,opt,name=marshaler_all", + Filename: "gogo.proto", +} + +var E_UnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63018, + Name: "gogoproto.unmarshaler_all", + Tag: "varint,63018,opt,name=unmarshaler_all", + Filename: "gogo.proto", +} + +var E_StableMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63019, + Name: "gogoproto.stable_marshaler_all", + Tag: "varint,63019,opt,name=stable_marshaler_all", + Filename: "gogo.proto", +} + +var E_SizerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63020, + Name: "gogoproto.sizer_all", + Tag: "varint,63020,opt,name=sizer_all", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63021, + Name: "gogoproto.goproto_enum_stringer_all", + Tag: "varint,63021,opt,name=goproto_enum_stringer_all", + Filename: "gogo.proto", +} + +var E_EnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63022, + Name: "gogoproto.enum_stringer_all", + Tag: "varint,63022,opt,name=enum_stringer_all", + Filename: "gogo.proto", +} + +var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63023, + Name: "gogoproto.unsafe_marshaler_all", + Tag: "varint,63023,opt,name=unsafe_marshaler_all", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63024, + Name: "gogoproto.unsafe_unmarshaler_all", + Tag: "varint,63024,opt,name=unsafe_unmarshaler_all", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63025, + Name: "gogoproto.goproto_extensions_map_all", + Tag: "varint,63025,opt,name=goproto_extensions_map_all", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63026, + Name: "gogoproto.goproto_unrecognized_all", + Tag: "varint,63026,opt,name=goproto_unrecognized_all", + Filename: "gogo.proto", +} + +var E_GogoprotoImport = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63027, + Name: "gogoproto.gogoproto_import", + Tag: "varint,63027,opt,name=gogoproto_import", + Filename: "gogo.proto", +} + +var E_ProtosizerAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63028, + Name: "gogoproto.protosizer_all", + Tag: "varint,63028,opt,name=protosizer_all", + Filename: "gogo.proto", +} + +var E_CompareAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63029, + Name: "gogoproto.compare_all", + Tag: "varint,63029,opt,name=compare_all", + Filename: "gogo.proto", +} + +var E_TypedeclAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63030, + Name: "gogoproto.typedecl_all", + Tag: "varint,63030,opt,name=typedecl_all", + Filename: "gogo.proto", +} + +var E_EnumdeclAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63031, + Name: "gogoproto.enumdecl_all", + Tag: "varint,63031,opt,name=enumdecl_all", + Filename: "gogo.proto", +} + +var E_GoprotoRegistration = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63032, + Name: "gogoproto.goproto_registration", + Tag: "varint,63032,opt,name=goproto_registration", + Filename: "gogo.proto", +} + +var E_MessagenameAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63033, + Name: "gogoproto.messagename_all", + Tag: "varint,63033,opt,name=messagename_all", + Filename: "gogo.proto", +} + +var E_GoprotoSizecacheAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63034, + Name: "gogoproto.goproto_sizecache_all", + Tag: "varint,63034,opt,name=goproto_sizecache_all", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyedAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63035, + Name: "gogoproto.goproto_unkeyed_all", + Tag: "varint,63035,opt,name=goproto_unkeyed_all", + Filename: "gogo.proto", +} + +var E_GoprotoGetters = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64001, + Name: "gogoproto.goproto_getters", + Tag: "varint,64001,opt,name=goproto_getters", + Filename: "gogo.proto", +} + +var E_GoprotoStringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64003, + Name: "gogoproto.goproto_stringer", + Tag: "varint,64003,opt,name=goproto_stringer", + Filename: "gogo.proto", +} + +var E_VerboseEqual = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64004, + Name: "gogoproto.verbose_equal", + Tag: "varint,64004,opt,name=verbose_equal", + Filename: "gogo.proto", +} + +var E_Face = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64005, + Name: "gogoproto.face", + Tag: "varint,64005,opt,name=face", + Filename: "gogo.proto", +} + +var E_Gostring = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64006, + Name: "gogoproto.gostring", + Tag: "varint,64006,opt,name=gostring", + Filename: "gogo.proto", +} + +var E_Populate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64007, + Name: "gogoproto.populate", + Tag: "varint,64007,opt,name=populate", + Filename: "gogo.proto", +} + +var E_Stringer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 67008, + Name: "gogoproto.stringer", + Tag: "varint,67008,opt,name=stringer", + Filename: "gogo.proto", +} + +var E_Onlyone = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64009, + Name: "gogoproto.onlyone", + Tag: "varint,64009,opt,name=onlyone", + Filename: "gogo.proto", +} + +var E_Equal = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64013, + Name: "gogoproto.equal", + Tag: "varint,64013,opt,name=equal", + Filename: "gogo.proto", +} + +var E_Description = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64014, + Name: "gogoproto.description", + Tag: "varint,64014,opt,name=description", + Filename: "gogo.proto", +} + +var E_Testgen = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64015, + Name: "gogoproto.testgen", + Tag: "varint,64015,opt,name=testgen", + Filename: "gogo.proto", +} + +var E_Benchgen = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64016, + Name: "gogoproto.benchgen", + Tag: "varint,64016,opt,name=benchgen", + Filename: "gogo.proto", +} + +var E_Marshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64017, + Name: "gogoproto.marshaler", + Tag: "varint,64017,opt,name=marshaler", + Filename: "gogo.proto", +} + +var E_Unmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64018, + Name: "gogoproto.unmarshaler", + Tag: "varint,64018,opt,name=unmarshaler", + Filename: "gogo.proto", +} + +var E_StableMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64019, + Name: "gogoproto.stable_marshaler", + Tag: "varint,64019,opt,name=stable_marshaler", + Filename: "gogo.proto", +} + +var E_Sizer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64020, + Name: "gogoproto.sizer", + Tag: "varint,64020,opt,name=sizer", + Filename: "gogo.proto", +} + +var E_UnsafeMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64023, + Name: "gogoproto.unsafe_marshaler", + Tag: "varint,64023,opt,name=unsafe_marshaler", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64024, + Name: "gogoproto.unsafe_unmarshaler", + Tag: "varint,64024,opt,name=unsafe_unmarshaler", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64025, + Name: "gogoproto.goproto_extensions_map", + Tag: "varint,64025,opt,name=goproto_extensions_map", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognized = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64026, + Name: "gogoproto.goproto_unrecognized", + Tag: "varint,64026,opt,name=goproto_unrecognized", + Filename: "gogo.proto", +} + +var E_Protosizer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64028, + Name: "gogoproto.protosizer", + Tag: "varint,64028,opt,name=protosizer", + Filename: "gogo.proto", +} + +var E_Compare = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64029, + Name: "gogoproto.compare", + Tag: "varint,64029,opt,name=compare", + Filename: "gogo.proto", +} + +var E_Typedecl = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64030, + Name: "gogoproto.typedecl", + Tag: "varint,64030,opt,name=typedecl", + Filename: "gogo.proto", +} + +var E_Messagename = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64033, + Name: "gogoproto.messagename", + Tag: "varint,64033,opt,name=messagename", + Filename: "gogo.proto", +} + +var E_GoprotoSizecache = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64034, + Name: "gogoproto.goproto_sizecache", + Tag: "varint,64034,opt,name=goproto_sizecache", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyed = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64035, + Name: "gogoproto.goproto_unkeyed", + Tag: "varint,64035,opt,name=goproto_unkeyed", + Filename: "gogo.proto", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65001, + Name: "gogoproto.nullable", + Tag: "varint,65001,opt,name=nullable", + Filename: "gogo.proto", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65002, + Name: "gogoproto.embed", + Tag: "varint,65002,opt,name=embed", + Filename: "gogo.proto", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65003, + Name: "gogoproto.customtype", + Tag: "bytes,65003,opt,name=customtype", + Filename: "gogo.proto", +} + +var E_Customname = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65004, + Name: "gogoproto.customname", + Tag: "bytes,65004,opt,name=customname", + Filename: "gogo.proto", +} + +var E_Jsontag = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65005, + Name: "gogoproto.jsontag", + Tag: "bytes,65005,opt,name=jsontag", + Filename: "gogo.proto", +} + +var E_Moretags = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65006, + Name: "gogoproto.moretags", + Tag: "bytes,65006,opt,name=moretags", + Filename: "gogo.proto", +} + +var E_Casttype = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65007, + Name: "gogoproto.casttype", + Tag: "bytes,65007,opt,name=casttype", + Filename: "gogo.proto", +} + +var E_Castkey = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65008, + Name: "gogoproto.castkey", + Tag: "bytes,65008,opt,name=castkey", + Filename: "gogo.proto", +} + +var E_Castvalue = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65009, + Name: "gogoproto.castvalue", + Tag: "bytes,65009,opt,name=castvalue", + Filename: "gogo.proto", +} + +var E_Stdtime = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65010, + Name: "gogoproto.stdtime", + Tag: "varint,65010,opt,name=stdtime", + Filename: "gogo.proto", +} + +var E_Stdduration = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65011, + Name: "gogoproto.stdduration", + Tag: "varint,65011,opt,name=stdduration", + Filename: "gogo.proto", +} + +var E_Wktpointer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65012, + Name: "gogoproto.wktpointer", + Tag: "varint,65012,opt,name=wktpointer", + Filename: "gogo.proto", +} + +func init() { + proto.RegisterExtension(E_GoprotoEnumPrefix) + proto.RegisterExtension(E_GoprotoEnumStringer) + proto.RegisterExtension(E_EnumStringer) + proto.RegisterExtension(E_EnumCustomname) + proto.RegisterExtension(E_Enumdecl) + proto.RegisterExtension(E_EnumvalueCustomname) + proto.RegisterExtension(E_GoprotoGettersAll) + proto.RegisterExtension(E_GoprotoEnumPrefixAll) + proto.RegisterExtension(E_GoprotoStringerAll) + proto.RegisterExtension(E_VerboseEqualAll) + proto.RegisterExtension(E_FaceAll) + proto.RegisterExtension(E_GostringAll) + proto.RegisterExtension(E_PopulateAll) + proto.RegisterExtension(E_StringerAll) + proto.RegisterExtension(E_OnlyoneAll) + proto.RegisterExtension(E_EqualAll) + proto.RegisterExtension(E_DescriptionAll) + proto.RegisterExtension(E_TestgenAll) + proto.RegisterExtension(E_BenchgenAll) + proto.RegisterExtension(E_MarshalerAll) + proto.RegisterExtension(E_UnmarshalerAll) + proto.RegisterExtension(E_StableMarshalerAll) + proto.RegisterExtension(E_SizerAll) + proto.RegisterExtension(E_GoprotoEnumStringerAll) + proto.RegisterExtension(E_EnumStringerAll) + proto.RegisterExtension(E_UnsafeMarshalerAll) + proto.RegisterExtension(E_UnsafeUnmarshalerAll) + proto.RegisterExtension(E_GoprotoExtensionsMapAll) + proto.RegisterExtension(E_GoprotoUnrecognizedAll) + proto.RegisterExtension(E_GogoprotoImport) + proto.RegisterExtension(E_ProtosizerAll) + proto.RegisterExtension(E_CompareAll) + proto.RegisterExtension(E_TypedeclAll) + proto.RegisterExtension(E_EnumdeclAll) + proto.RegisterExtension(E_GoprotoRegistration) + proto.RegisterExtension(E_MessagenameAll) + proto.RegisterExtension(E_GoprotoSizecacheAll) + proto.RegisterExtension(E_GoprotoUnkeyedAll) + proto.RegisterExtension(E_GoprotoGetters) + proto.RegisterExtension(E_GoprotoStringer) + proto.RegisterExtension(E_VerboseEqual) + proto.RegisterExtension(E_Face) + proto.RegisterExtension(E_Gostring) + proto.RegisterExtension(E_Populate) + proto.RegisterExtension(E_Stringer) + proto.RegisterExtension(E_Onlyone) + proto.RegisterExtension(E_Equal) + proto.RegisterExtension(E_Description) + proto.RegisterExtension(E_Testgen) + proto.RegisterExtension(E_Benchgen) + proto.RegisterExtension(E_Marshaler) + proto.RegisterExtension(E_Unmarshaler) + proto.RegisterExtension(E_StableMarshaler) + proto.RegisterExtension(E_Sizer) + proto.RegisterExtension(E_UnsafeMarshaler) + proto.RegisterExtension(E_UnsafeUnmarshaler) + proto.RegisterExtension(E_GoprotoExtensionsMap) + proto.RegisterExtension(E_GoprotoUnrecognized) + proto.RegisterExtension(E_Protosizer) + proto.RegisterExtension(E_Compare) + proto.RegisterExtension(E_Typedecl) + proto.RegisterExtension(E_Messagename) + proto.RegisterExtension(E_GoprotoSizecache) + proto.RegisterExtension(E_GoprotoUnkeyed) + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) + proto.RegisterExtension(E_Customname) + proto.RegisterExtension(E_Jsontag) + proto.RegisterExtension(E_Moretags) + proto.RegisterExtension(E_Casttype) + proto.RegisterExtension(E_Castkey) + proto.RegisterExtension(E_Castvalue) + proto.RegisterExtension(E_Stdtime) + proto.RegisterExtension(E_Stdduration) + proto.RegisterExtension(E_Wktpointer) +} + +func init() { proto.RegisterFile("gogo.proto", fileDescriptor_592445b5231bc2b9) } + +var fileDescriptor_592445b5231bc2b9 = []byte{ + // 1328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x80, 0x85, 0x48, 0x64, 0x4f, 0x79, 0x8b, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, + 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x0e, 0xc6, 0x89, 0xc3, 0x76, 0x18, + 0xf5, 0xf4, 0x94, 0xdb, 0x8d, 0xbb, 0xbb, 0x9a, 0xee, 0xea, 0x10, 0xe7, 0x86, 0xc2, 0x22, 0x84, + 0xd8, 0x91, 0x20, 0x21, 0x09, 0x04, 0xc4, 0xbe, 0x86, 0x7d, 0xb9, 0x70, 0x61, 0xb9, 0xf2, 0x1f, + 0xb8, 0x00, 0x66, 0xf7, 0xcd, 0x17, 0xf4, 0xba, 0xdf, 0xeb, 0xa9, 0x69, 0x8f, 0x54, 0x35, 0xb7, + 0xf6, 0xb8, 0xbe, 0x6f, 0xaa, 0xdf, 0xeb, 0x7a, 0xef, 0x4d, 0x33, 0xe6, 0x49, 0x4f, 0x4e, 0xc6, + 0x89, 0x54, 0xb2, 0x5e, 0x83, 0xeb, 0xfc, 0x72, 0xdf, 0x7e, 0x4f, 0x4a, 0x2f, 0x10, 0x53, 0xf9, + 0x5f, 0xcd, 0x6c, 0x75, 0xaa, 0x25, 0x52, 0x37, 0xf1, 0x63, 0x25, 0x93, 0x62, 0x31, 0x3f, 0xc6, + 0xc6, 0x70, 0x71, 0x43, 0x44, 0x59, 0xd8, 0x88, 0x13, 0xb1, 0xea, 0x9f, 0xae, 0x5f, 0x3f, 0x59, + 0x90, 0x93, 0x44, 0x4e, 0xce, 0x47, 0x59, 0x78, 0x47, 0xac, 0x7c, 0x19, 0xa5, 0x7b, 0xaf, 0xfc, + 0x72, 0xf5, 0xfe, 0xab, 0x6e, 0xe9, 0x5f, 0x1e, 0x45, 0x14, 0xfe, 0xb7, 0x94, 0x83, 0x7c, 0x99, + 0x5d, 0xd3, 0xe1, 0x4b, 0x55, 0xe2, 0x47, 0x9e, 0x48, 0x0c, 0xc6, 0xef, 0xd1, 0x38, 0xa6, 0x19, + 0x8f, 0x23, 0xca, 0xe7, 0xd8, 0x50, 0x2f, 0xae, 0x1f, 0xd0, 0x35, 0x28, 0x74, 0xc9, 0x02, 0x1b, + 0xc9, 0x25, 0x6e, 0x96, 0x2a, 0x19, 0x46, 0x4e, 0x28, 0x0c, 0x9a, 0x1f, 0x73, 0x4d, 0x6d, 0x79, + 0x18, 0xb0, 0xb9, 0x92, 0xe2, 0x9c, 0xf5, 0xc3, 0x27, 0x2d, 0xe1, 0x06, 0x06, 0xc3, 0x4f, 0xb8, + 0x91, 0x72, 0x3d, 0x3f, 0xc9, 0xc6, 0xe1, 0xfa, 0x94, 0x13, 0x64, 0x42, 0xdf, 0xc9, 0x4d, 0x5d, + 0x3d, 0x27, 0x61, 0x19, 0xc9, 0x7e, 0x3e, 0xbb, 0x2b, 0xdf, 0xce, 0x58, 0x29, 0xd0, 0xf6, 0xa4, + 0x65, 0xd1, 0x13, 0x4a, 0x89, 0x24, 0x6d, 0x38, 0x41, 0xb7, 0xed, 0x1d, 0xf1, 0x83, 0xd2, 0x78, + 0x6e, 0xb3, 0x33, 0x8b, 0x0b, 0x05, 0x39, 0x1b, 0x04, 0x7c, 0x85, 0x5d, 0xdb, 0xe5, 0xa9, 0xb0, + 0x70, 0x9e, 0x47, 0xe7, 0xf8, 0x8e, 0x27, 0x03, 0xb4, 0x4b, 0x8c, 0x3e, 0x2f, 0x73, 0x69, 0xe1, + 0x7c, 0x19, 0x9d, 0x75, 0x64, 0x29, 0xa5, 0x60, 0xbc, 0x8d, 0x8d, 0x9e, 0x12, 0x49, 0x53, 0xa6, + 0xa2, 0x21, 0x1e, 0xc8, 0x9c, 0xc0, 0x42, 0x77, 0x01, 0x75, 0x23, 0x08, 0xce, 0x03, 0x07, 0xae, + 0x83, 0xac, 0x7f, 0xd5, 0x71, 0x85, 0x85, 0xe2, 0x22, 0x2a, 0xfa, 0x60, 0x3d, 0xa0, 0xb3, 0x6c, + 0xd0, 0x93, 0xc5, 0x2d, 0x59, 0xe0, 0x97, 0x10, 0x1f, 0x20, 0x06, 0x15, 0xb1, 0x8c, 0xb3, 0xc0, + 0x51, 0x36, 0x3b, 0x78, 0x85, 0x14, 0xc4, 0xa0, 0xa2, 0x87, 0xb0, 0xbe, 0x4a, 0x8a, 0x54, 0x8b, + 0xe7, 0x0c, 0x1b, 0x90, 0x51, 0xb0, 0x21, 0x23, 0x9b, 0x4d, 0x5c, 0x46, 0x03, 0x43, 0x04, 0x04, + 0xd3, 0xac, 0x66, 0x9b, 0x88, 0x37, 0x36, 0xe9, 0x78, 0x50, 0x06, 0x16, 0xd8, 0x08, 0x15, 0x28, + 0x5f, 0x46, 0x16, 0x8a, 0x37, 0x51, 0x31, 0xac, 0x61, 0x78, 0x1b, 0x4a, 0xa4, 0xca, 0x13, 0x36, + 0x92, 0xb7, 0xe8, 0x36, 0x10, 0xc1, 0x50, 0x36, 0x45, 0xe4, 0xae, 0xd9, 0x19, 0xde, 0xa6, 0x50, + 0x12, 0x03, 0x8a, 0x39, 0x36, 0x14, 0x3a, 0x49, 0xba, 0xe6, 0x04, 0x56, 0xe9, 0x78, 0x07, 0x1d, + 0x83, 0x25, 0x84, 0x11, 0xc9, 0xa2, 0x5e, 0x34, 0xef, 0x52, 0x44, 0x34, 0x0c, 0x8f, 0x5e, 0xaa, + 0x9c, 0x66, 0x20, 0x1a, 0xbd, 0xd8, 0xde, 0xa3, 0xa3, 0x57, 0xb0, 0x8b, 0xba, 0x71, 0x9a, 0xd5, + 0x52, 0xff, 0x8c, 0x95, 0xe6, 0x7d, 0xca, 0x74, 0x0e, 0x00, 0x7c, 0x0f, 0xbb, 0xae, 0x6b, 0x9b, + 0xb0, 0x90, 0x7d, 0x80, 0xb2, 0x89, 0x2e, 0xad, 0x02, 0x4b, 0x42, 0xaf, 0xca, 0x0f, 0xa9, 0x24, + 0x88, 0x8a, 0x6b, 0x89, 0x8d, 0x67, 0x51, 0xea, 0xac, 0xf6, 0x16, 0xb5, 0x8f, 0x28, 0x6a, 0x05, + 0xdb, 0x11, 0xb5, 0x13, 0x6c, 0x02, 0x8d, 0xbd, 0xe5, 0xf5, 0x63, 0x2a, 0xac, 0x05, 0xbd, 0xd2, + 0x99, 0xdd, 0xfb, 0xd8, 0xbe, 0x32, 0x9c, 0xa7, 0x95, 0x88, 0x52, 0x60, 0x1a, 0xa1, 0x13, 0x5b, + 0x98, 0xaf, 0xa0, 0x99, 0x2a, 0xfe, 0x7c, 0x29, 0x58, 0x74, 0x62, 0x90, 0xdf, 0xcd, 0xf6, 0x92, + 0x3c, 0x8b, 0x12, 0xe1, 0x4a, 0x2f, 0xf2, 0xcf, 0x88, 0x96, 0x85, 0xfa, 0x93, 0x4a, 0xaa, 0x56, + 0x34, 0x1c, 0xcc, 0x47, 0xd9, 0x9e, 0x72, 0x56, 0x69, 0xf8, 0x61, 0x2c, 0x13, 0x65, 0x30, 0x7e, + 0x4a, 0x99, 0x2a, 0xb9, 0xa3, 0x39, 0xc6, 0xe7, 0xd9, 0x70, 0xfe, 0xa7, 0xed, 0x23, 0xf9, 0x19, + 0x8a, 0x86, 0xda, 0x14, 0x16, 0x0e, 0x57, 0x86, 0xb1, 0x93, 0xd8, 0xd4, 0xbf, 0xcf, 0xa9, 0x70, + 0x20, 0x82, 0x85, 0x43, 0x6d, 0xc4, 0x02, 0xba, 0xbd, 0x85, 0xe1, 0x0b, 0x2a, 0x1c, 0xc4, 0xa0, + 0x82, 0x06, 0x06, 0x0b, 0xc5, 0x97, 0xa4, 0x20, 0x06, 0x14, 0x77, 0xb6, 0x1b, 0x6d, 0x22, 0x3c, + 0x3f, 0x55, 0x89, 0x03, 0xab, 0x0d, 0xaa, 0xaf, 0x36, 0x3b, 0x87, 0xb0, 0x65, 0x0d, 0x85, 0x4a, + 0x14, 0x8a, 0x34, 0x75, 0x3c, 0x01, 0x13, 0x87, 0xc5, 0xc6, 0xbe, 0xa6, 0x4a, 0xa4, 0x61, 0xb0, + 0x37, 0x6d, 0x42, 0x84, 0xb0, 0xbb, 0x8e, 0xbb, 0x66, 0xa3, 0xfb, 0xa6, 0xb2, 0xb9, 0xe3, 0xc4, + 0x82, 0x53, 0x9b, 0x7f, 0xb2, 0x68, 0x5d, 0x6c, 0x58, 0x3d, 0x9d, 0xdf, 0x56, 0xe6, 0x9f, 0x95, + 0x82, 0x2c, 0x6a, 0xc8, 0x48, 0x65, 0x9e, 0xaa, 0xdf, 0xb8, 0xc3, 0xb5, 0x58, 0xdc, 0x17, 0xe9, + 0x1e, 0xda, 0xc2, 0xfb, 0xed, 0x1c, 0xa7, 0xf8, 0xed, 0xf0, 0x90, 0x77, 0x0e, 0x3d, 0x66, 0xd9, + 0xd9, 0xad, 0xf2, 0x39, 0xef, 0x98, 0x79, 0xf8, 0x11, 0x36, 0xd4, 0x31, 0xf0, 0x98, 0x55, 0x0f, + 0xa3, 0x6a, 0x50, 0x9f, 0x77, 0xf8, 0x01, 0xb6, 0x0b, 0x86, 0x17, 0x33, 0xfe, 0x08, 0xe2, 0xf9, + 0x72, 0x7e, 0x88, 0xf5, 0xd3, 0xd0, 0x62, 0x46, 0x1f, 0x45, 0xb4, 0x44, 0x00, 0xa7, 0x81, 0xc5, + 0x8c, 0x3f, 0x46, 0x38, 0x21, 0x80, 0xdb, 0x87, 0xf0, 0xbb, 0x27, 0x76, 0x61, 0xd3, 0xa1, 0xd8, + 0x4d, 0xb3, 0x3e, 0x9c, 0x54, 0xcc, 0xf4, 0xe3, 0xf8, 0xe5, 0x44, 0xf0, 0x5b, 0xd9, 0x6e, 0xcb, + 0x80, 0x3f, 0x89, 0x68, 0xb1, 0x9e, 0xcf, 0xb1, 0x01, 0x6d, 0x3a, 0x31, 0xe3, 0x4f, 0x21, 0xae, + 0x53, 0xb0, 0x75, 0x9c, 0x4e, 0xcc, 0x82, 0xa7, 0x69, 0xeb, 0x48, 0x40, 0xd8, 0x68, 0x30, 0x31, + 0xd3, 0xcf, 0x50, 0xd4, 0x09, 0xe1, 0x33, 0xac, 0x56, 0x36, 0x1b, 0x33, 0xff, 0x2c, 0xf2, 0x6d, + 0x06, 0x22, 0xa0, 0x35, 0x3b, 0xb3, 0xe2, 0x39, 0x8a, 0x80, 0x46, 0xc1, 0x31, 0xaa, 0x0e, 0x30, + 0x66, 0xd3, 0xf3, 0x74, 0x8c, 0x2a, 0xf3, 0x0b, 0x64, 0x33, 0xaf, 0xf9, 0x66, 0xc5, 0x0b, 0x94, + 0xcd, 0x7c, 0x3d, 0x6c, 0xa3, 0x3a, 0x11, 0x98, 0x1d, 0x2f, 0xd2, 0x36, 0x2a, 0x03, 0x01, 0x5f, + 0x62, 0xf5, 0x9d, 0xd3, 0x80, 0xd9, 0xf7, 0x12, 0xfa, 0x46, 0x77, 0x0c, 0x03, 0xfc, 0x2e, 0x36, + 0xd1, 0x7d, 0x12, 0x30, 0x5b, 0xcf, 0x6d, 0x55, 0x7e, 0xbb, 0xe9, 0x83, 0x00, 0x3f, 0xd1, 0x6e, + 0x29, 0xfa, 0x14, 0x60, 0xd6, 0x9e, 0xdf, 0xea, 0x2c, 0xdc, 0xfa, 0x10, 0xc0, 0x67, 0x19, 0x6b, + 0x37, 0x60, 0xb3, 0xeb, 0x02, 0xba, 0x34, 0x08, 0x8e, 0x06, 0xf6, 0x5f, 0x33, 0x7f, 0x91, 0x8e, + 0x06, 0x12, 0x70, 0x34, 0xa8, 0xf5, 0x9a, 0xe9, 0x4b, 0x74, 0x34, 0x08, 0x81, 0x27, 0x5b, 0xeb, + 0x6e, 0x66, 0xc3, 0x65, 0x7a, 0xb2, 0x35, 0x8a, 0x1f, 0x63, 0xa3, 0x3b, 0x1a, 0xa2, 0x59, 0xf5, + 0x1a, 0xaa, 0xf6, 0x54, 0xfb, 0xa1, 0xde, 0xbc, 0xb0, 0x19, 0x9a, 0x6d, 0xaf, 0x57, 0x9a, 0x17, + 0xf6, 0x42, 0x3e, 0xcd, 0xfa, 0xa3, 0x2c, 0x08, 0xe0, 0xf0, 0xd4, 0x6f, 0xe8, 0xd2, 0x4d, 0x45, + 0xd0, 0x22, 0xc5, 0xaf, 0xdb, 0x18, 0x1d, 0x02, 0xf8, 0x01, 0xb6, 0x5b, 0x84, 0x4d, 0xd1, 0x32, + 0x91, 0xbf, 0x6d, 0x53, 0xc1, 0x84, 0xd5, 0x7c, 0x86, 0xb1, 0xe2, 0xd5, 0x08, 0x84, 0xd9, 0xc4, + 0xfe, 0xbe, 0x5d, 0xbc, 0xa5, 0xd1, 0x90, 0xb6, 0x20, 0x4f, 0x8a, 0x41, 0xb0, 0xd9, 0x29, 0xc8, + 0x33, 0x72, 0x90, 0xf5, 0xdd, 0x9f, 0xca, 0x48, 0x39, 0x9e, 0x89, 0xfe, 0x03, 0x69, 0x5a, 0x0f, + 0x01, 0x0b, 0x65, 0x22, 0x94, 0xe3, 0xa5, 0x26, 0xf6, 0x4f, 0x64, 0x4b, 0x00, 0x60, 0xd7, 0x49, + 0x95, 0xcd, 0x7d, 0xff, 0x45, 0x30, 0x01, 0xb0, 0x69, 0xb8, 0x5e, 0x17, 0x1b, 0x26, 0xf6, 0x6f, + 0xda, 0x34, 0xae, 0xe7, 0x87, 0x58, 0x0d, 0x2e, 0xf3, 0xb7, 0x4a, 0x26, 0xf8, 0x1f, 0x84, 0xdb, + 0x04, 0x7c, 0x73, 0xaa, 0x5a, 0xca, 0x37, 0x07, 0xfb, 0x5f, 0xcc, 0x34, 0xad, 0xe7, 0xb3, 0x6c, + 0x20, 0x55, 0xad, 0x56, 0x86, 0xf3, 0xa9, 0x01, 0xff, 0x6f, 0xbb, 0x7c, 0x65, 0x51, 0x32, 0x90, + 0xed, 0x07, 0xd7, 0x55, 0x2c, 0xfd, 0x48, 0x89, 0xc4, 0x64, 0xd8, 0x42, 0x83, 0x86, 0x1c, 0x9e, + 0x67, 0x63, 0xae, 0x0c, 0xab, 0xdc, 0x61, 0xb6, 0x20, 0x17, 0xe4, 0x52, 0x5e, 0x67, 0xee, 0xbd, + 0xd9, 0xf3, 0xd5, 0x5a, 0xd6, 0x9c, 0x74, 0x65, 0x38, 0x05, 0xbf, 0x3c, 0xda, 0x2f, 0x54, 0xcb, + 0xdf, 0x21, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xaf, 0x70, 0x4e, 0x83, 0x15, 0x00, 0x00, +} diff --git a/vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.pb.golden b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.pb.golden similarity index 100% rename from vendor/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV.part/gogo-protobuf/gogoproto/gogo.pb.golden rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.pb.golden diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.proto b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.proto new file mode 100644 index 0000000000..b80c85653f --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/gogo.proto @@ -0,0 +1,144 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/helper.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/helper.go new file mode 100644 index 0000000000..5a3286079e --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/gogoproto/helper.go @@ -0,0 +1,415 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gogoproto + +import google_protobuf "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor" +import proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + +func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Embed, false) +} + +func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Nullable, true) +} + +func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdtime, false) +} + +func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdduration, false) +} + +func IsStdDouble(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.DoubleValue" +} + +func IsStdFloat(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.FloatValue" +} + +func IsStdInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int64Value" +} + +func IsStdUInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt64Value" +} + +func IsStdInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int32Value" +} + +func IsStdUInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt32Value" +} + +func IsStdBool(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BoolValue" +} + +func IsStdString(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.StringValue" +} + +func IsStdBytes(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BytesValue" +} + +func IsStdType(field *google_protobuf.FieldDescriptorProto) bool { + return (IsStdTime(field) || IsStdDuration(field) || + IsStdDouble(field) || IsStdFloat(field) || + IsStdInt64(field) || IsStdUInt64(field) || + IsStdInt32(field) || IsStdUInt32(field) || + IsStdBool(field) || + IsStdString(field) || IsStdBytes(field)) +} + +func IsWktPtr(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) +} + +func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { + nullable := IsNullable(field) + if field.IsMessage() || IsCustomType(field) { + return nullable + } + if proto3 { + return false + } + return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES +} + +func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCustomType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastKey(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastValue(field) + if len(typ) > 0 { + return true + } + return false +} + +func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) +} + +func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) +} + +func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customtype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Casttype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castkey) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castvalue) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { + name := GetCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { + name := GetEnumCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { + name := GetEnumValueCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Jsontag) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Moretags) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool + +func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) +} + +func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) +} + +func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) +} + +func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) +} + +func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) +} + +func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) +} + +func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) +} + +func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) +} + +func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) +} + +func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) +} + +func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) +} + +func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) +} + +func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) +} + +func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) +} + +func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) +} + +func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) +} + +func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) +} + +func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) +} + +func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) +} + +func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) +} + +func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) +} + +func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) +} + +func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) +} + +func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) +} + +func IsProto3(file *google_protobuf.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) +} + +func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) +} + +func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) +} + +func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) +} + +func HasSizecache(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoSizecache, proto.GetBoolExtension(file.Options, E_GoprotoSizecacheAll, true)) +} + +func HasUnkeyed(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoUnkeyed, proto.GetBoolExtension(file.Options, E_GoprotoUnkeyedAll, true)) +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/full.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/full.go new file mode 100644 index 0000000000..c78f9c4469 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/full.go @@ -0,0 +1,102 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + "io" +) + +func NewFullWriter(w io.Writer) WriteCloser { + return &fullWriter{w, nil} +} + +type fullWriter struct { + w io.Writer + buffer []byte +} + +func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + _, err = this.w.Write(data) + return err +} + +func (this *fullWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type fullReader struct { + r io.Reader + buf []byte +} + +func NewFullReader(r io.Reader, maxSize int) ReadCloser { + return &fullReader{r, make([]byte, maxSize)} +} + +func (this *fullReader) ReadMsg(msg proto.Message) error { + length, err := this.r.Read(this.buf) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *fullReader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/io.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/io.go new file mode 100644 index 0000000000..e4e15e1add --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/io.go @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + "io" +) + +type Writer interface { + WriteMsg(proto.Message) error +} + +type WriteCloser interface { + Writer + io.Closer +} + +type Reader interface { + ReadMsg(msg proto.Message) error +} + +type ReadCloser interface { + Reader + io.Closer +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/uint32.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/uint32.go new file mode 100644 index 0000000000..763fc608ff --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/uint32.go @@ -0,0 +1,138 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "encoding/binary" + "io" + + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" +) + +const uint32BinaryLen = 4 + +func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { + return &uint32Writer{w, byteOrder, nil, make([]byte, uint32BinaryLen)} +} + +func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { + return &uint32Writer{w, byteOrder, make([]byte, size), make([]byte, uint32BinaryLen)} +} + +type uint32Writer struct { + w io.Writer + byteOrder binary.ByteOrder + buffer []byte + lenBuf []byte +} + +func (this *uint32Writer) writeFallback(msg proto.Message) error { + data, err := proto.Marshal(msg) + if err != nil { + return err + } + + length := uint32(len(data)) + this.byteOrder.PutUint32(this.lenBuf, length) + if _, err = this.w.Write(this.lenBuf); err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *uint32Writer) WriteMsg(msg proto.Message) error { + m, ok := msg.(marshaler) + if !ok { + return this.writeFallback(msg) + } + + n, ok := getSize(m) + if !ok { + return this.writeFallback(msg) + } + + size := n + uint32BinaryLen + if size > len(this.buffer) { + this.buffer = make([]byte, size) + } + + this.byteOrder.PutUint32(this.buffer, uint32(n)) + if _, err := m.MarshalTo(this.buffer[uint32BinaryLen:]); err != nil { + return err + } + + _, err := this.w.Write(this.buffer[:size]) + return err +} + +func (this *uint32Writer) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type uint32Reader struct { + r io.Reader + byteOrder binary.ByteOrder + lenBuf []byte + buf []byte + maxSize int +} + +func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { + return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} +} + +func (this *uint32Reader) ReadMsg(msg proto.Message) error { + if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { + return err + } + length32 := this.byteOrder.Uint32(this.lenBuf) + length := int(length32) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if length >= len(this.buf) { + this.buf = make([]byte, length) + } + _, err := io.ReadFull(this.r, this.buf[:length]) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *uint32Reader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/varint.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/varint.go new file mode 100644 index 0000000000..98c190d452 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/io/varint.go @@ -0,0 +1,133 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "bufio" + "encoding/binary" + "errors" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + "io" +) + +var ( + errSmallBuffer = errors.New("Buffer Too Small") + errLargeValue = errors.New("Value is Larger than 64 bits") +) + +func NewDelimitedWriter(w io.Writer) WriteCloser { + return &varintWriter{w, make([]byte, binary.MaxVarintLen64), nil} +} + +type varintWriter struct { + w io.Writer + lenBuf []byte + buffer []byte +} + +func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if ok { + if n+binary.MaxVarintLen64 >= len(this.buffer) { + this.buffer = make([]byte, n+binary.MaxVarintLen64) + } + lenOff := binary.PutUvarint(this.buffer, uint64(n)) + _, err = m.MarshalTo(this.buffer[lenOff:]) + if err != nil { + return err + } + _, err = this.w.Write(this.buffer[:lenOff+n]) + return err + } + } + + // fallback + data, err = proto.Marshal(msg) + if err != nil { + return err + } + length := uint64(len(data)) + n := binary.PutUvarint(this.lenBuf, length) + _, err = this.w.Write(this.lenBuf[:n]) + if err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *varintWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { + var closer io.Closer + if c, ok := r.(io.Closer); ok { + closer = c + } + return &varintReader{bufio.NewReader(r), nil, maxSize, closer} +} + +type varintReader struct { + r *bufio.Reader + buf []byte + maxSize int + closer io.Closer +} + +func (this *varintReader) ReadMsg(msg proto.Message) error { + length64, err := binary.ReadUvarint(this.r) + if err != nil { + return err + } + length := int(length64) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if len(this.buf) < length { + this.buf = make([]byte, length) + } + buf := this.buf[:length] + if _, err := io.ReadFull(this.r, buf); err != nil { + return err + } + return proto.Unmarshal(buf, msg) +} + +func (this *varintReader) Close() error { + if this.closer != nil { + return this.closer.Close() + } + return nil +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/Makefile b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/Makefile similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/Makefile rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/Makefile diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/clone.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/clone.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/clone.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/clone.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/custom_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/custom_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/custom_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/custom_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/decode.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/decode.go new file mode 100644 index 0000000000..63b0f08bef --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/decode.go @@ -0,0 +1,427 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +func (p *Buffer) decodeVarintSlow() (x uint64, err error) { + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + i := p.index + buf := p.buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + p.index++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return p.decodeVarintSlow() + } + + var b uint64 + // we already checked the first byte + x = uint64(buf[i]) - 0x80 + i++ + + b = uint64(buf[i]) + i++ + x += b << 7 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 7 + + b = uint64(buf[i]) + i++ + x += b << 14 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 14 + + b = uint64(buf[i]) + i++ + x += b << 21 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 21 + + b = uint64(buf[i]) + i++ + x += b << 28 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 28 + + b = uint64(buf[i]) + i++ + x += b << 35 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 35 + + b = uint64(buf[i]) + i++ + x += b << 42 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 42 + + b = uint64(buf[i]) + i++ + x += b << 49 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 49 + + b = uint64(buf[i]) + i++ + x += b << 56 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 56 + + b = uint64(buf[i]) + i++ + x += b << 63 + if b&0x80 == 0 { + goto done + } + + return 0, errOverflow + +done: + p.index = i + return x, nil +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. +func (p *Buffer) DecodeGroup(pb Message) error { + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF + } + err := Unmarshal(b[:x], pb) + p.index += y + return err +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +// +// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) + return err +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/deprecated.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/deprecated.go new file mode 100644 index 0000000000..35b882c09a --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/deprecated.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import "errors" + +// Deprecated: do not use. +type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } + +// Deprecated: do not use. +func GetStats() Stats { return Stats{} } + +// Deprecated: do not use. +func MarshalMessageSet(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func UnmarshalMessageSet([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func MarshalMessageSetJSON(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func UnmarshalMessageSetJSON([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func RegisterMessageSetType(Message, int32, string) {} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/discard.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/discard.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/discard.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/discard.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/duration.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/duration.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/duration.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/duration.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/duration_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/duration_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/duration_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/duration_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/encode.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/encode.go new file mode 100644 index 0000000000..3abfed2cff --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/encode.go @@ -0,0 +1,203 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "reflect" +) + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/encode_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/encode_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/encode_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/encode_gogo.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/equal.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/equal.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/equal.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/equal.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/extensions.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/extensions.go new file mode 100644 index 0000000000..686bd2a09d --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/extensions.go @@ -0,0 +1,604 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "io" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer generated by the current +// proto compiler that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange + extensionsWrite() map[int32]Extension + extensionsRead() (map[int32]Extension, sync.Locker) +} + +// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous +// version of the proto compiler that may be extended. +type extendableProtoV1 interface { + Message + ExtensionRangeArray() []ExtensionRange + ExtensionMap() map[int32]Extension +} + +// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. +type extensionAdapter struct { + extendableProtoV1 +} + +func (e extensionAdapter) extensionsWrite() map[int32]Extension { + return e.ExtensionMap() +} + +func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + return e.ExtensionMap(), notLocker{} +} + +// notLocker is a sync.Locker whose Lock and Unlock methods are nops. +type notLocker struct{} + +func (n notLocker) Lock() {} +func (n notLocker) Unlock() {} + +// extendable returns the extendableProto interface for the given generated proto message. +// If the proto message has the old extension format, it returns a wrapper that implements +// the extendableProto interface. +func extendable(p interface{}) (extendableProto, error) { + switch p := p.(type) { + case extendableProto: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return p, nil + case extendableProtoV1: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return extensionAdapter{p}, nil + case extensionsBytes: + return slowExtensionAdapter{p}, nil + } + // Don't allocate a specific error containing %T: + // this is the hot path for Clone and MarshalText. + return nil, errNotExtendable +} + +var errNotExtendable = errors.New("proto: not an extendable proto.Message") + +func isNilPtr(x interface{}) bool { + v := reflect.ValueOf(x) + return v.Kind() == reflect.Ptr && v.IsNil() +} + +// XXX_InternalExtensions is an internal representation of proto extensions. +// +// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, +// thus gaining the unexported 'extensions' method, which can be called only from the proto package. +// +// The methods of XXX_InternalExtensions are not concurrency safe in general, +// but calls to logically read-only methods such as has and get may be executed concurrently. +type XXX_InternalExtensions struct { + // The struct must be indirect so that if a user inadvertently copies a + // generated message and its embedded XXX_InternalExtensions, they + // avoid the mayhem of a copied mutex. + // + // The mutex serializes all logically read-only operations to p.extensionMap. + // It is up to the client to ensure that write operations to p.extensionMap are + // mutually exclusive with other accesses. + p *struct { + mu sync.Mutex + extensionMap map[int32]Extension + } +} + +// extensionsWrite returns the extension map, creating it on first use. +func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { + if e.p == nil { + e.p = new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }) + e.p.extensionMap = make(map[int32]Extension) + } + return e.p.extensionMap +} + +// extensionsRead returns the extensions map for read-only use. It may be nil. +// The caller must hold the returned mutex's lock when accessing Elements within the map. +func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { + if e.p == nil { + return nil, nil + } + return e.p.extensionMap, &e.p.mu +} + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style + Filename string // name of the file in which the extension is defined +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + value interface{} + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base Message, id int32, b []byte) { + if ebase, ok := base.(extensionsBytes); ok { + clearExtension(base, id) + ext := ebase.GetExtensions() + *ext = append(*ext, b...) + return + } + epb, err := extendable(base) + if err != nil { + return + } + extmap := epb.extensionsWrite() + extmap[id] = Extension{enc: b} +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + var pbi interface{} = pb + // Check the extended type. + if ea, ok := pbi.(extensionAdapter); ok { + pbi = ea.extendableProtoV1 + } + if ea, ok := pbi.(slowExtensionAdapter); ok { + pbi = ea.extensionsBytes + } + if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { + return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb Message, extension *ExtensionDesc) bool { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + buf := *ext + o := 0 + for o < len(buf) { + tag, n := DecodeVarint(buf[o:]) + fieldNum := int32(tag >> 3) + if int32(fieldNum) == extension.Field { + return true + } + wireType := int(tag & 0x7) + o += n + l, err := size(buf[o:], wireType) + if err != nil { + return false + } + o += l + } + return false + } + // TODO: Check types, field numbers, etc.? + epb, err := extendable(pb) + if err != nil { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok := extmap[extension.Field] + mu.Unlock() + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + clearExtension(pb, extension.Field) +} + +func clearExtension(pb Message, fieldNum int32) { + if epb, ok := pb.(extensionsBytes); ok { + offset := 0 + for offset != -1 { + offset = deleteExtension(epb, fieldNum, offset) + } + return + } + epb, err := extendable(pb) + if err != nil { + return + } + // TODO: Check types, field numbers, etc.? + extmap := epb.extensionsWrite() + delete(extmap, fieldNum) +} + +// GetExtension retrieves a proto2 extended field from pb. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes of the field extension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + return decodeExtensionFromBytes(extension, *ext) + } + + epb, err := extendable(pb) + if err != nil { + return nil, err + } + + if extension.ExtendedType != nil { + // can only check type if this is a complete descriptor + if cerr := checkExtensionTypes(epb, extension); cerr != nil { + return nil, cerr + } + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + if extension.ExtensionType == nil { + // incomplete descriptor + return e.enc, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + if extension.ExtensionType == nil { + // incomplete descriptor, so no default + return nil, ErrMissingExtension + } + + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + unmarshal := typeUnmarshaler(t, extension.Tag) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate space to store the pointer/slice. + value := reflect.New(t).Elem() + + var err error + for { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + wire := int(x) & 7 + + b, err = unmarshal(b, valToPointer(value.Addr()), wire) + if err != nil { + return nil, err + } + + if len(b) == 0 { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. +// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing +// just the Field field, which defines the extension's field number. +func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + registeredExtensions := RegisteredExtensions(pb) + + emap, mu := epb.extensionsRead() + if emap == nil { + return nil, nil + } + mu.Lock() + defer mu.Unlock() + extensions := make([]*ExtensionDesc, 0, len(emap)) + for extid, e := range emap { + desc := e.desc + if desc == nil { + desc = registeredExtensions[extid] + if desc == nil { + desc = &ExtensionDesc{Field: extid} + } + } + + extensions = append(extensions, desc) + } + return extensions, nil +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + if epb, ok := pb.(extensionsBytes); ok { + newb, err := encodeExtension(extension, value) + if err != nil { + return err + } + bb := epb.GetExtensions() + *bb = append(*bb, newb...) + return nil + } + epb, err := extendable(pb) + if err != nil { + return err + } + if err := checkExtensionTypes(epb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType) + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: value} + return nil +} + +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + *ext = []byte{} + return + } + epb, err := extendable(pb) + if err != nil { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) + } +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/extensions_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/extensions_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/extensions_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/extensions_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/lib.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/lib.go new file mode 100644 index 0000000000..d17f802092 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/lib.go @@ -0,0 +1,967 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/gogo/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // read point + + deterministic bool +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + sindex := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = sindex +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or T or []*T or []T + switch f.Kind() { + case reflect.Struct: + setDefaults(f, recur, zeros) + + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.Kind() == reflect.Ptr && e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Struct: + nestedMessage = true // non-nullable + + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr, reflect.Struct: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// mapKeys returns a sort.Interface to be used for sorting the map keys. +// Map fields may have key types of non-float scalars, strings and enums. +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{vs: vs} + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion2 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion2 = true + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion1 = true + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/lib_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/lib_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/lib_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/lib_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/message_set.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/message_set.go new file mode 100644 index 0000000000..f48a756761 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/message_set.go @@ -0,0 +1,181 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Support for message sets. + */ + +import ( + "errors" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + return ms.find(pb) != nil +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func unmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_reflect.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_reflect.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_reflect.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_reflect.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_reflect_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_reflect_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_reflect_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_reflect_gogo.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_unsafe.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_unsafe.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_unsafe.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_unsafe.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_unsafe_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_unsafe_gogo.go new file mode 100644 index 0000000000..aca8eed02a --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/pointer_unsafe_gogo.go @@ -0,0 +1,56 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +func (p pointer) getRef() pointer { + return pointer{p: (unsafe.Pointer)(&p.p)} +} + +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) +} + +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/properties.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/properties.go new file mode 100644 index 0000000000..c9e5fa0207 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/properties.go @@ -0,0 +1,599 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + CustomType string + CastType string + StdTime bool + StdDuration bool + WktPointer bool + + stype reflect.Type // set for struct types only + ctype reflect.Type // set for custom types only + sprop *StructProperties // set for struct types only + + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s += "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + case "fixed32": + p.WireType = WireFixed32 + case "fixed64": + p.WireType = WireFixed64 + case "zigzag32": + p.WireType = WireVarint + case "zigzag64": + p.WireType = WireVarint + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + +outer: + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break outer + } + case strings.HasPrefix(f, "embedded="): + p.OrigName = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "customtype="): + p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] + case f == "stdtime": + p.StdTime = true + case f == "stdduration": + p.StdDuration = true + case f == "wktptr": + p.WktPointer = true + } + } +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + isMap := typ.Kind() == reflect.Map + if len(p.CustomType) > 0 && !isMap { + p.ctype = typ + p.setTag(lockGetProp) + return + } + if p.StdTime && !isMap { + p.setTag(lockGetProp) + return + } + if p.StdDuration && !isMap { + p.setTag(lockGetProp) + return + } + if p.WktPointer && !isMap { + p.setTag(lockGetProp) + return + } + switch t1 := typ; t1.Kind() { + case reflect.Struct: + p.stype = typ + case reflect.Ptr: + if t1.Elem().Kind() == reflect.Struct { + p.stype = t1.Elem() + } + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + case reflect.Struct: + p.stype = t3 + } + case reflect.Struct: + p.stype = t2 + } + + case reflect.Map: + + p.mtype = t1 + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + + p.MapValProp.CustomType = p.CustomType + p.MapValProp.StdDuration = p.StdDuration + p.MapValProp.StdTime = p.StdTime + p.MapValProp.WktPointer = p.WktPointer + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + p.setTag(lockGetProp) +} + +func (p *Properties) setTag(lockGetProp bool) { + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() +) + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if tag == "" { + return + } + p.Parse(tag) + p.setFieldProps(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + return prop + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + isOneofMessage := false + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { + isOneofMessage = true + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { + var oots []interface{} + _, _, _, oots = om.XXX_OneofFuncs() + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) +var enumStringMaps = make(map[string]map[int32]string) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap + if _, ok := enumStringMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumStringMaps[typeName] = unusedNameMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypedNils[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { + type xname interface { + XXX_MessageName() string + } + if m, ok := x.(xname); ok { + return m.XXX_MessageName() + } + return revProtoTypes[reflect.TypeOf(x)] +} + +// MessageType returns the message type (pointer to struct) for a named message. +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/properties_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/properties_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/properties_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/properties_gogo.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/skip_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/skip_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/skip_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/skip_gogo.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_marshal.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_marshal.go similarity index 91% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_marshal.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_marshal.go index 255e7b5088..9b1538d055 100644 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_marshal.go +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_marshal.go @@ -97,6 +97,8 @@ type marshalElemInfo struct { var ( marshalInfoMap = map[reflect.Type]*marshalInfo{} marshalInfoLock sync.Mutex + + uint8SliceType = reflect.TypeOf(([]uint8)(nil)).Kind() ) // getMarshalInfo returns the information to marshal a given type of message. @@ -246,16 +248,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte // If the message can marshal itself, let it do it, for compatibility. // NOTE: This is not efficient. if u.hasmarshaler { - if deterministic { - return nil, errors.New("proto: deterministic not supported by the Marshal method of " + u.typ.String()) - } m := ptr.asPointerTo(u.typ).Interface().(Marshaler) b1, err := m.Marshal() b = append(b, b1...) return b, err } - var err, errreq error + var err, errLater error // The old marshaler encodes extensions at beginning. if u.extensions.IsValid() { e := ptr.offset(u.extensions).toExtensions() @@ -280,11 +279,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte b = append(b, s...) } for _, f := range u.fields { - if f.required && errreq == nil { - if ptr.offset(f.field).getPointer().isNil() { + if f.required { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { // Required field is not set. // We record the error but keep going, to give a complete marshaling. - errreq = &RequiredNotSetError{f.name} + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } continue } } @@ -297,14 +298,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte if err1, ok := err.(*RequiredNotSetError); ok { // Required field in submessage is not set. // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = &RequiredNotSetError{f.name + "." + err1.field} + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} } continue } if err == errRepeatedHasNil { err = errors.New("proto: repeated field " + f.name + " has nil element") } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return b, err } } @@ -312,7 +320,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte s := *ptr.offset(u.unrecognized).toBytes() b = append(b, s...) } - return b, errreq + return b, errLater } // computeMarshalInfo initializes the marshal info. @@ -483,7 +491,7 @@ func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { fi.field = toField(f) - fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. fi.isPointer = true fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) @@ -577,6 +585,8 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma ctype := false isTime := false isDuration := false + isWktPointer := false + validateUTF8 := true for i := 2; i < len(tags); i++ { if tags[i] == "packed" { packed = true @@ -593,7 +603,11 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma if tags[i] == "stdduration" { isDuration = true } + if tags[i] == "wktptr" { + isWktPointer = true + } } + validateUTF8 = validateUTF8 && proto3 if !proto3 && !pointer && !slice { nozero = false } @@ -638,6 +652,112 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma return makeDurationMarshaler(getMarshalInfo(t)) } + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdDoubleValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValueMarshaler(getMarshalInfo(t)) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdFloatValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValueMarshaler(getMarshalInfo(t)) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBoolValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValueMarshaler(getMarshalInfo(t)) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdStringValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValueMarshaler(getMarshalInfo(t)) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBytesValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValueMarshaler(getMarshalInfo(t)) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + switch t.Kind() { case reflect.Bool: if pointer { @@ -834,6 +954,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma } return sizeFloat64Value, appendFloat64Value case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } if pointer { return sizeStringPtr, appendStringPtr } @@ -2089,52 +2221,105 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt return b, nil } func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if v == "" { return b, nil } if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool p := *ptr.toStringPtr() if p == nil { return b, nil } v := *p if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool s := *ptr.toStringSlice() for _, v := range s { if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) } + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { @@ -2213,7 +2398,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2221,22 +2407,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, wiretag) // start group b, err = u.marshal(b, v, deterministic) b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2280,7 +2458,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2289,22 +2468,15 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { siz := u.cachedsize(v) b = appendVarint(b, uint64(siz)) b, err = u.marshal(b, v, deterministic) - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2318,15 +2490,21 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { tags := strings.Split(f.Tag.Get("protobuf"), ",") keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + stdOptions := false for _, t := range tags { if strings.HasPrefix(t, "customtype=") { valTags = append(valTags, t) } if t == "stdtime" { valTags = append(valTags, t) + stdOptions = true } if t == "stdduration" { valTags = append(valTags, t) + stdOptions = true + } + if t == "wktptr" { + valTags = append(valTags, t) } } keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map @@ -2340,6 +2518,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { // value. // Key cannot be pointer-typed. valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && !stdOptions && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } return func(ptr pointer, tagsize int) int { m := ptr.asPointerTo(t).Elem() // the map n := 0 @@ -2360,24 +2557,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { if len(keys) > 1 && deterministic { sort.Sort(mapKeys(keys)) } + + var nerr nonFatal for _, k := range keys { ki := k.Interface() vi := m.MapIndex(k).Interface() kaddr := toAddrPointer(&ki, false) // pointer to key vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value b = appendVarint(b, tag) - siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) b = appendVarint(b, uint64(siz)) b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b, err = valMarshaler(b, vaddr, valWireTag, deterministic) - if err != nil && err != ErrNil { // allow nil value in map + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map return b, err } } - return b, nil + return b, nerr.E } } @@ -2450,6 +2649,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2469,11 +2669,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2500,11 +2700,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // message set format is: @@ -2561,6 +2761,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2587,12 +2788,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b = append(b, 1<<3|WireEndGroup) } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2626,11 +2827,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) b = append(b, 1<<3|WireEndGroup) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // sizeV1Extensions computes the size of encoded data for a V1-API extension field. @@ -2673,6 +2874,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ sort.Ints(keys) var err error + var nerr nonFatal for _, k := range keys { e := m[int32(k)] if e.value == nil || e.desc == nil { @@ -2689,11 +2891,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // newMarshaler is the interface representing objects that can marshal themselves. @@ -2758,6 +2960,11 @@ func Marshal(pb Message) ([]byte, error) { // a Buffer for most applications. func (p *Buffer) Marshal(pb Message) error { var err error + if p.deterministic { + if _, ok := pb.(Marshaler); ok { + return fmt.Errorf("proto: deterministic not supported by the Marshal method of %T", pb) + } + } if m, ok := pb.(newMarshaler); ok { siz := m.XXX_Size() p.grow(siz) // make sure buf has enough capacity diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_marshal_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_marshal_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_marshal_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_marshal_gogo.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_merge.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_merge.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_merge.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_merge.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_unmarshal.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_unmarshal.go similarity index 88% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_unmarshal.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_unmarshal.go index 910e2dd6ad..bb2622f28c 100644 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_unmarshal.go +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_unmarshal.go @@ -99,6 +99,8 @@ type unmarshalFieldInfo struct { // if a required field, contains a single set bit at this field's index in the required field list. reqMask uint64 + + name string // name of the field, for error reporting } var ( @@ -136,10 +138,10 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { u.computeUnmarshalInfo() } if u.isMessageSet { - return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) + return unmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) } - var reqMask uint64 // bitmask of required fields we've seen. - var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage. + var reqMask uint64 // bitmask of required fields we've seen. + var errLater error for len(b) > 0 { // Read tag and wire type. // Special case 1 and 2 byte varints. @@ -178,11 +180,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if r, ok := err.(*RequiredNotSetError); ok { // Remember this error, but keep parsing. We need to produce // a full parse even if a required field is missing. - rnse = r + if errLater == nil { + errLater = r + } reqMask |= f.reqMask continue } if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return err } // Fragments with bad wire type are treated as unknown fields. @@ -244,20 +255,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { emap[int32(tag)] = e } } - if rnse != nil { - // A required field of a submessage/group is missing. Return that error. - return rnse - } - if reqMask != u.reqMask { + if reqMask != u.reqMask && errLater == nil { // A required field of this message is missing. for _, n := range u.reqFields { if reqMask&1 == 0 { - return &RequiredNotSetError{n} + errLater = &RequiredNotSetError{n} } reqMask >>= 1 } } - return nil + return errLater } // computeUnmarshalInfo fills in u with information for use @@ -360,7 +367,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { } // Store the info in the correct slot in the message. - u.setTag(tag, toField(&f), unmarshal, reqMask) + u.setTag(tag, toField(&f), unmarshal, reqMask, name) } // Find any types associated with oneof fields. @@ -376,10 +383,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { f := typ.Field(0) // oneof implementers have one field baseUnmarshal := fieldUnmarshaler(&f) - tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] - tag, err := strconv.Atoi(tagstr) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) if err != nil { - panic("protobuf tag field not an integer: " + tagstr) + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } } // Find the oneof field that this struct implements. @@ -390,7 +404,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // That lets us know where this struct should be stored // when we encounter it during unmarshaling. unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) - u.setTag(tag, of.field, unmarshal, 0) + u.setTag(fieldNum, of.field, unmarshal, 0, name) } } } @@ -411,7 +425,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) - }, 0) + }, 0, "") // Set mask for required field check. u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? for len(u.dense) <= tag { @@ -455,10 +470,16 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { ctype := false isTime := false isDuration := false + isWktPointer := false + proto3 := false + validateUTF8 := true for _, tag := range tagArray[3:] { if strings.HasPrefix(tag, "name=") { name = tag[5:] } + if tag == "proto3" { + proto3 = true + } if strings.HasPrefix(tag, "customtype=") { ctype = true } @@ -468,7 +489,11 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { if tag == "stdduration" { isDuration = true } + if tag == "wktptr" { + isWktPointer = true + } } + validateUTF8 = validateUTF8 && proto3 // Figure out packaging (pointer, slice, or both) slice := false @@ -522,6 +547,112 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { return makeUnmarshalDuration(getUnmarshalInfo(t), name) } + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdDoubleValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdFloatValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBoolValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdStringValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValueUnmarshaler(getUnmarshalInfo(t), name) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBytesValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValueUnmarshaler(getUnmarshalInfo(t), name) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + // We'll never have both pointer and slice for basic types. if pointer && slice && t.Kind() != reflect.Struct { panic("both pointer and slice for basic type in " + t.Name()) @@ -656,6 +787,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { } return unmarshalBytesValue case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } if pointer { return unmarshalStringPtr } @@ -1516,9 +1656,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toString() = v return b[x:], nil } @@ -1536,9 +1673,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toStringPtr() = &v return b[x:], nil } @@ -1556,11 +1690,69 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) s := f.toStringSlice() *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } return b[x:], nil } @@ -1731,6 +1923,9 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { if t == "stdduration" { valTags = append(valTags, t) } + if t == "wktptr" { + valTags = append(valTags, t) + } } unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ",")) @@ -1755,6 +1950,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Maps will be somewhat slow. Oh well. // Read key and value from data. + var nerr nonFatal k := reflect.New(kt) v := reflect.New(vt) for len(b) > 0 { @@ -1775,7 +1971,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { err = errInternalBadWireType // skip unknown tag } - if err == nil { + if nerr.Merge(err) { continue } if err != errInternalBadWireType { @@ -1798,7 +1994,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Insert into map. m.SetMapIndex(k.Elem(), v.Elem()) - return r, nil + return r, nerr.E } } @@ -1824,15 +2020,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal // Unmarshal data into holder. // We unmarshal into the first field of the holder object. var err error + var nerr nonFatal b, err = unmarshal(b, valToPointer(v).offset(field0), w) - if err != nil { + if !nerr.Merge(err) { return nil, err } // Write pointer to holder into target field. f.asPointerTo(ityp).Elem().Set(v) - return b, nil + return b, nerr.E } } @@ -1945,7 +2142,7 @@ func encodeVarint(b []byte, x uint64) []byte { // If there is an error, it returns 0,0. func decodeVarint(b []byte) (uint64, int) { var x, y uint64 - if len(b) <= 0 { + if len(b) == 0 { goto bad } x = uint64(b[0]) diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_unmarshal_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_unmarshal_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/table_unmarshal_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/table_unmarshal_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text.go new file mode 100644 index 0000000000..0407ba85d0 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text.go @@ -0,0 +1,928 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Print("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if name == "XXX_NoUnkeyedLiteral" { + continue + } + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, v, props); err != nil { + return err + } + } else if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.MapValProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, fv, props); err != nil { + return err + } + } else if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv + if pv.CanAddr() { + pv = sv.Addr() + } else { + pv = reflect.New(sv.Type()) + pv.Elem().Set(sv) + } + if _, err := extendable(pv.Interface()); err == nil { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + if props != nil { + if len(props.CustomType) > 0 { + custom, ok := v.Interface().(Marshaler) + if ok { + data, err := custom.Marshal() + if err != nil { + return err + } + if err := writeString(w, string(data)); err != nil { + return err + } + return nil + } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } + } else if props.StdTime { + t, ok := v.Interface().(time.Time) + if !ok { + return fmt.Errorf("stdtime is not time.Time, but %T", v.Interface()) + } + tproto, err := timestampProto(t) + if err != nil { + return err + } + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) + return err + } else if props.StdDuration { + d, ok := v.Interface().(time.Duration) + if !ok { + return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) + } + dproto := durationProto(d) + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) + return err + } + } + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, ferr := fmt.Fprintf(w, "/* %v */\n", err) + return ferr + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, werr := w.Write(endBraceNewline); werr != nil { + return werr + } + continue + } + if _, ferr := fmt.Fprint(w, tag); ferr != nil { + return ferr + } + if wire != WireStartGroup { + if err = w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err = w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + e := pv.Interface().(Message) + + var m map[int32]Extension + var mu sync.Locker + if em, ok := e.(extensionsBytes); ok { + eb := em.GetExtensions() + var err error + m, err = BytesToExtensionsMap(*eb) + if err != nil { + return err + } + mu = notLocker{} + } else if _, ok := e.(extendableProto); ok { + ep, _ := extendable(e) + m, mu = ep.extensionsRead() + if m == nil { + return nil + } + } + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + + mu.Lock() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + mu.Unlock() + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(e, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text_parser.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text_parser.go new file mode 100644 index 0000000000..1ce0be2fa9 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/text_parser.go @@ -0,0 +1,1018 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +// Error string emitted when deserializing Any and fields are already set +const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + ss := string(r) + s[:2] + s = s[2:] + i, err := strconv.ParseUint(ss, 8, 8) + if err != nil { + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) + } + return string([]byte{byte(i)}), s, nil + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) + } + ss := s[:n] + s = s[n:] + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + if fieldSet["type_url"] { + return p.errorf(anyRepeatedlyUnpacked, "type_url") + } + if fieldSet["value"] { + return p.errorf(anyRepeatedlyUnpacked, "value") + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + fieldSet["type_url"] = true + fieldSet["value"] = true + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(Message) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.MapKeyProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.MapValProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + if len(props.CustomType) > 0 { + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + tc := reflect.TypeOf(new(Marshaler)) + ok := t.Elem().Implements(tc.Elem()) + if ok { + fv := v + flen := fv.Len() + if flen == fv.Cap() { + nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) + reflect.Copy(nav, fv) + fv.Set(nav) + } + fv.SetLen(flen + 1) + + // Read one. + p.back() + return p.readAny(fv.Index(flen), props) + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.ValueOf(custom)) + } else { + custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.Indirect(reflect.ValueOf(custom))) + } + return nil + } + if props.StdTime { + fv := v + p.back() + props.StdTime = false + tproto := ×tamp{} + err := p.readAny(reflect.ValueOf(tproto).Elem(), props) + props.StdTime = true + if err != nil { + return err + } + tim, err := timestampFromProto(tproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ts := fv.Interface().([]*time.Time) + ts = append(ts, &tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } else { + ts := fv.Interface().([]time.Time) + ts = append(ts, tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&tim)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&tim))) + } + return nil + } + if props.StdDuration { + fv := v + p.back() + props.StdDuration = false + dproto := &duration{} + err := p.readAny(reflect.ValueOf(dproto).Elem(), props) + props.StdDuration = true + if err != nil { + return err + } + dur, err := durationFromProto(dproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ds := fv.Interface().([]*time.Duration) + ds = append(ds, &dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } else { + ds := fv.Interface().([]time.Duration) + ds = append(ds, dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&dur)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&dur))) + } + return nil + } + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + ntok := p.next() + if ntok.err != nil { + return ntok.err + } + if ntok.value == "]" { + break + } + if ntok.value != "," { + return p.errorf("Expected ']' or ',' found %q", ntok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // true/1/t/True or false/f/0/False. + switch tok.value { + case "true", "1", "t", "True": + fv.SetBool(true) + return nil + case "false", "0", "f", "False": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int8: + if x, err := strconv.ParseInt(tok.value, 0, 8); err == nil { + fv.SetInt(x) + return nil + } + case reflect.Int16: + if x, err := strconv.ParseInt(tok.value, 0, 16); err == nil { + fv.SetInt(x) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint8: + if x, err := strconv.ParseUint(tok.value, 0, 8); err == nil { + fv.SetUint(x) + return nil + } + case reflect.Uint16: + if x, err := strconv.ParseUint(tok.value, 0, 16); err == nil { + fv.SetUint(x) + return nil + } + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + return um.UnmarshalText([]byte(s)) + } + pb.Reset() + v := reflect.ValueOf(pb) + return newTextParser(s).readStruct(v.Elem(), "") +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/timestamp.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/timestamp.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/timestamp.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/timestamp.go diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/timestamp_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/timestamp_gogo.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/timestamp_gogo.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/timestamp_gogo.go diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers.go new file mode 100644 index 0000000000..b175d1b642 --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers.go @@ -0,0 +1,1888 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "io" + "reflect" +) + +func makeStdDoubleValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdDoubleValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers_gogo.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers_gogo.go new file mode 100644 index 0000000000..c1cf7bf85e --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto/wrappers_gogo.go @@ -0,0 +1,113 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +type float64Value struct { + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float64Value) Reset() { *m = float64Value{} } +func (*float64Value) ProtoMessage() {} +func (*float64Value) String() string { return "float64" } + +type float32Value struct { + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float32Value) Reset() { *m = float32Value{} } +func (*float32Value) ProtoMessage() {} +func (*float32Value) String() string { return "float32" } + +type int64Value struct { + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int64Value) Reset() { *m = int64Value{} } +func (*int64Value) ProtoMessage() {} +func (*int64Value) String() string { return "int64" } + +type uint64Value struct { + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint64Value) Reset() { *m = uint64Value{} } +func (*uint64Value) ProtoMessage() {} +func (*uint64Value) String() string { return "uint64" } + +type int32Value struct { + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int32Value) Reset() { *m = int32Value{} } +func (*int32Value) ProtoMessage() {} +func (*int32Value) String() string { return "int32" } + +type uint32Value struct { + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint32Value) Reset() { *m = uint32Value{} } +func (*uint32Value) ProtoMessage() {} +func (*uint32Value) String() string { return "uint32" } + +type boolValue struct { + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *boolValue) Reset() { *m = boolValue{} } +func (*boolValue) ProtoMessage() {} +func (*boolValue) String() string { return "bool" } + +type stringValue struct { + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *stringValue) Reset() { *m = stringValue{} } +func (*stringValue) ProtoMessage() {} +func (*stringValue) String() string { return "string" } + +type bytesValue struct { + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *bytesValue) Reset() { *m = bytesValue{} } +func (*bytesValue) ProtoMessage() {} +func (*bytesValue) String() string { return "[]byte" } + +func init() { + RegisterType((*float64Value)(nil), "gogo.protobuf.proto.DoubleValue") + RegisterType((*float32Value)(nil), "gogo.protobuf.proto.FloatValue") + RegisterType((*int64Value)(nil), "gogo.protobuf.proto.Int64Value") + RegisterType((*uint64Value)(nil), "gogo.protobuf.proto.UInt64Value") + RegisterType((*int32Value)(nil), "gogo.protobuf.proto.Int32Value") + RegisterType((*uint32Value)(nil), "gogo.protobuf.proto.UInt32Value") + RegisterType((*boolValue)(nil), "gogo.protobuf.proto.BoolValue") + RegisterType((*stringValue)(nil), "gogo.protobuf.proto.StringValue") + RegisterType((*bytesValue)(nil), "gogo.protobuf.proto.BytesValue") +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/Makefile diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go similarity index 98% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go index e00eb99236..95c0f76195 100644 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.go @@ -42,7 +42,7 @@ import ( "fmt" "io/ioutil" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" + "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" ) // extractFile extracts a FileDescriptorProto from a gzip'd buffer. diff --git a/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go new file mode 100644 index 0000000000..8940037fcb --- /dev/null +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2865 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: descriptor.proto + +package descriptor + +import ( + fmt "fmt" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type FieldDescriptorProto_Type int32 + +const ( + // 0 is reserved for errors. + // Order is weird for historical reasons. + FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 + FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 + FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 + FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 + FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 + FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 + FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 + FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 + // New in version 2. + FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 + FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 + FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 + FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 + FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 + FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 + FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 +) + +var FieldDescriptorProto_Type_name = map[int32]string{ + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} + +var FieldDescriptorProto_Type_value = map[string]int32{ + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { + p := new(FieldDescriptorProto_Type) + *p = x + return p +} + +func (x FieldDescriptorProto_Type) String() string { + return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) +} + +func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") + if err != nil { + return err + } + *x = FieldDescriptorProto_Type(value) + return nil +} + +func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{4, 0} +} + +type FieldDescriptorProto_Label int32 + +const ( + // 0 is reserved for errors + FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 + FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 +) + +var FieldDescriptorProto_Label_name = map[int32]string{ + 1: "LABEL_OPTIONAL", + 2: "LABEL_REQUIRED", + 3: "LABEL_REPEATED", +} + +var FieldDescriptorProto_Label_value = map[string]int32{ + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3, +} + +func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { + p := new(FieldDescriptorProto_Label) + *p = x + return p +} + +func (x FieldDescriptorProto_Label) String() string { + return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) +} + +func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") + if err != nil { + return err + } + *x = FieldDescriptorProto_Label(value) + return nil +} + +func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{4, 1} +} + +// Generated classes can be optimized for speed or code size. +type FileOptions_OptimizeMode int32 + +const ( + FileOptions_SPEED FileOptions_OptimizeMode = 1 + // etc. + FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 + FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 +) + +var FileOptions_OptimizeMode_name = map[int32]string{ + 1: "SPEED", + 2: "CODE_SIZE", + 3: "LITE_RUNTIME", +} + +var FileOptions_OptimizeMode_value = map[string]int32{ + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3, +} + +func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { + p := new(FileOptions_OptimizeMode) + *p = x + return p +} + +func (x FileOptions_OptimizeMode) String() string { + return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) +} + +func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") + if err != nil { + return err + } + *x = FileOptions_OptimizeMode(value) + return nil +} + +func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{10, 0} +} + +type FieldOptions_CType int32 + +const ( + // Default mode. + FieldOptions_STRING FieldOptions_CType = 0 + FieldOptions_CORD FieldOptions_CType = 1 + FieldOptions_STRING_PIECE FieldOptions_CType = 2 +) + +var FieldOptions_CType_name = map[int32]string{ + 0: "STRING", + 1: "CORD", + 2: "STRING_PIECE", +} + +var FieldOptions_CType_value = map[string]int32{ + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2, +} + +func (x FieldOptions_CType) Enum() *FieldOptions_CType { + p := new(FieldOptions_CType) + *p = x + return p +} + +func (x FieldOptions_CType) String() string { + return proto.EnumName(FieldOptions_CType_name, int32(x)) +} + +func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") + if err != nil { + return err + } + *x = FieldOptions_CType(value) + return nil +} + +func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{12, 0} +} + +type FieldOptions_JSType int32 + +const ( + // Use the default type. + FieldOptions_JS_NORMAL FieldOptions_JSType = 0 + // Use JavaScript strings. + FieldOptions_JS_STRING FieldOptions_JSType = 1 + // Use JavaScript numbers. + FieldOptions_JS_NUMBER FieldOptions_JSType = 2 +) + +var FieldOptions_JSType_name = map[int32]string{ + 0: "JS_NORMAL", + 1: "JS_STRING", + 2: "JS_NUMBER", +} + +var FieldOptions_JSType_value = map[string]int32{ + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2, +} + +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} + +func (x FieldOptions_JSType) String() string { + return proto.EnumName(FieldOptions_JSType_name, int32(x)) +} + +func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") + if err != nil { + return err + } + *x = FieldOptions_JSType(value) + return nil +} + +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{12, 1} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 +) + +var MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", +} + +var MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, +} + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} + +func (x MethodOptions_IdempotencyLevel) String() string { + return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) +} + +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(value) + return nil +} + +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{17, 0} +} + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +type FileDescriptorSet struct { + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{0} +} +func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) +} +func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) +} +func (m *FileDescriptorSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorSet.Merge(m, src) +} +func (m *FileDescriptorSet) XXX_Size() int { + return xxx_messageInfo_FileDescriptorSet.Size(m) +} +func (m *FileDescriptorSet) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo + +func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { + if m != nil { + return m.File + } + return nil +} + +// Describes a complete .proto file. +type FileDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` + // Names of files imported by this file. + Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` + // Indexes of the public imported files in the dependency list above. + PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` + // All top-level definitions in this file. + MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` + Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } +func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorProto) ProtoMessage() {} +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{1} +} +func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) +} +func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) +} +func (m *FileDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorProto.Merge(m, src) +} +func (m *FileDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FileDescriptorProto.Size(m) +} +func (m *FileDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo + +func (m *FileDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FileDescriptorProto) GetPackage() string { + if m != nil && m.Package != nil { + return *m.Package + } + return "" +} + +func (m *FileDescriptorProto) GetDependency() []string { + if m != nil { + return m.Dependency + } + return nil +} + +func (m *FileDescriptorProto) GetPublicDependency() []int32 { + if m != nil { + return m.PublicDependency + } + return nil +} + +func (m *FileDescriptorProto) GetWeakDependency() []int32 { + if m != nil { + return m.WeakDependency + } + return nil +} + +func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { + if m != nil { + return m.MessageType + } + return nil +} + +func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { + if m != nil { + return m.Service + } + return nil +} + +func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *FileDescriptorProto) GetOptions() *FileOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { + if m != nil { + return m.SourceCodeInfo + } + return nil +} + +func (m *FileDescriptorProto) GetSyntax() string { + if m != nil && m.Syntax != nil { + return *m.Syntax + } + return "" +} + +// Describes a message type. +type DescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` + NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` + OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` + Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` + ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } +func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto) ProtoMessage() {} +func (*DescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{2} +} +func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) +} +func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) +} +func (m *DescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto.Merge(m, src) +} +func (m *DescriptorProto) XXX_Size() int { + return xxx_messageInfo_DescriptorProto.Size(m) +} +func (m *DescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo + +func (m *DescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DescriptorProto) GetField() []*FieldDescriptorProto { + if m != nil { + return m.Field + } + return nil +} + +func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *DescriptorProto) GetNestedType() []*DescriptorProto { + if m != nil { + return m.NestedType + } + return nil +} + +func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { + if m != nil { + return m.ExtensionRange + } + return nil +} + +func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { + if m != nil { + return m.OneofDecl + } + return nil +} + +func (m *DescriptorProto) GetOptions() *MessageOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *DescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +type DescriptorProto_ExtensionRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } +func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ExtensionRange) ProtoMessage() {} +func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{2, 0} +} +func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) +} +func (m *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(m, src) +} +func (m *DescriptorProto_ExtensionRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) +} +func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo + +func (m *DescriptorProto_ExtensionRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { + if m != nil { + return m.Options + } + return nil +} + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +type DescriptorProto_ReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } +func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ReservedRange) ProtoMessage() {} +func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{2, 1} +} +func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) +} +func (m *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ReservedRange.Merge(m, src) +} +func (m *DescriptorProto_ReservedRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) +} +func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo + +func (m *DescriptorProto_ReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +type ExtensionRangeOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} } +func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } +func (*ExtensionRangeOptions) ProtoMessage() {} +func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{3} +} + +var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ExtensionRangeOptions +} + +func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) +} +func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) +} +func (m *ExtensionRangeOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionRangeOptions.Merge(m, src) +} +func (m *ExtensionRangeOptions) XXX_Size() int { + return xxx_messageInfo_ExtensionRangeOptions.Size(m) +} +func (m *ExtensionRangeOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo + +func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// Describes a field within a message. +type FieldDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` + Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } +func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FieldDescriptorProto) ProtoMessage() {} +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{4} +} +func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) +} +func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) +} +func (m *FieldDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldDescriptorProto.Merge(m, src) +} +func (m *FieldDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FieldDescriptorProto.Size(m) +} +func (m *FieldDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo + +func (m *FieldDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FieldDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { + if m != nil && m.Label != nil { + return *m.Label + } + return FieldDescriptorProto_LABEL_OPTIONAL +} + +func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return FieldDescriptorProto_TYPE_DOUBLE +} + +func (m *FieldDescriptorProto) GetTypeName() string { + if m != nil && m.TypeName != nil { + return *m.TypeName + } + return "" +} + +func (m *FieldDescriptorProto) GetExtendee() string { + if m != nil && m.Extendee != nil { + return *m.Extendee + } + return "" +} + +func (m *FieldDescriptorProto) GetDefaultValue() string { + if m != nil && m.DefaultValue != nil { + return *m.DefaultValue + } + return "" +} + +func (m *FieldDescriptorProto) GetOneofIndex() int32 { + if m != nil && m.OneofIndex != nil { + return *m.OneofIndex + } + return 0 +} + +func (m *FieldDescriptorProto) GetJsonName() string { + if m != nil && m.JsonName != nil { + return *m.JsonName + } + return "" +} + +func (m *FieldDescriptorProto) GetOptions() *FieldOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a oneof. +type OneofDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } +func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*OneofDescriptorProto) ProtoMessage() {} +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{5} +} +func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) +} +func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) +} +func (m *OneofDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofDescriptorProto.Merge(m, src) +} +func (m *OneofDescriptorProto) XXX_Size() int { + return xxx_messageInfo_OneofDescriptorProto.Size(m) +} +func (m *OneofDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo + +func (m *OneofDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OneofDescriptorProto) GetOptions() *OneofOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes an enum type. +type EnumDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } +func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto) ProtoMessage() {} +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{6} +} +func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) +} +func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) +} +func (m *EnumDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto.Merge(m, src) +} +func (m *EnumDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto.Size(m) +} +func (m *EnumDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo + +func (m *EnumDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { + if m != nil { + return m.Value + } + return nil +} + +func (m *EnumDescriptorProto) GetOptions() *EnumOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +// Range of reserved numeric values. Reserved values may not be used by +// entries in the same enum. Reserved ranges may not overlap. +// +// Note that this is distinct from DescriptorProto.ReservedRange in that it +// is inclusive such that it can appropriately represent the entire int32 +// domain. +type EnumDescriptorProto_EnumReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} } +func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} +func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{6, 0} +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(m, src) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo + +func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Describes a value within an enum. +type EnumValueDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } +func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumValueDescriptorProto) ProtoMessage() {} +func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{7} +} +func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) +} +func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) +} +func (m *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueDescriptorProto.Merge(m, src) +} +func (m *EnumValueDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumValueDescriptorProto.Size(m) +} +func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo + +func (m *EnumValueDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumValueDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a service. +type ServiceDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } +func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*ServiceDescriptorProto) ProtoMessage() {} +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{8} +} +func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) +} +func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) +} +func (m *ServiceDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceDescriptorProto.Merge(m, src) +} +func (m *ServiceDescriptorProto) XXX_Size() int { + return xxx_messageInfo_ServiceDescriptorProto.Size(m) +} +func (m *ServiceDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo + +func (m *ServiceDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { + if m != nil { + return m.Method + } + return nil +} + +func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a method of a service. +type MethodDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` + OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` + Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + // Identifies if client streams multiple client messages + ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` + // Identifies if server streams multiple server messages + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } +func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*MethodDescriptorProto) ProtoMessage() {} +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{9} +} +func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) +} +func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) +} +func (m *MethodDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodDescriptorProto.Merge(m, src) +} +func (m *MethodDescriptorProto) XXX_Size() int { + return xxx_messageInfo_MethodDescriptorProto.Size(m) +} +func (m *MethodDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo + +const Default_MethodDescriptorProto_ClientStreaming bool = false +const Default_MethodDescriptorProto_ServerStreaming bool = false + +func (m *MethodDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MethodDescriptorProto) GetInputType() string { + if m != nil && m.InputType != nil { + return *m.InputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOutputType() string { + if m != nil && m.OutputType != nil { + return *m.OutputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOptions() *MethodOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *MethodDescriptorProto) GetClientStreaming() bool { + if m != nil && m.ClientStreaming != nil { + return *m.ClientStreaming + } + return Default_MethodDescriptorProto_ClientStreaming +} + +func (m *MethodDescriptorProto) GetServerStreaming() bool { + if m != nil && m.ServerStreaming != nil { + return *m.ServerStreaming + } + return Default_MethodDescriptorProto_ServerStreaming +} + +type FileOptions struct { + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` + // This option does nothing. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use. + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` + JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` + PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` + // Namespace for generated classes; defaults to the package. + CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be used + // for determining the namespace. + PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileOptions) Reset() { *m = FileOptions{} } +func (m *FileOptions) String() string { return proto.CompactTextString(m) } +func (*FileOptions) ProtoMessage() {} +func (*FileOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{10} +} + +var extRange_FileOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} + +func (m *FileOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileOptions.Unmarshal(m, b) +} +func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) +} +func (m *FileOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileOptions.Merge(m, src) +} +func (m *FileOptions) XXX_Size() int { + return xxx_messageInfo_FileOptions.Size(m) +} +func (m *FileOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FileOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FileOptions proto.InternalMessageInfo + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaStringCheckUtf8 bool = false +const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED +const Default_FileOptions_CcGenericServices bool = false +const Default_FileOptions_JavaGenericServices bool = false +const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_PhpGenericServices bool = false +const Default_FileOptions_Deprecated bool = false +const Default_FileOptions_CcEnableArenas bool = false + +func (m *FileOptions) GetJavaPackage() string { + if m != nil && m.JavaPackage != nil { + return *m.JavaPackage + } + return "" +} + +func (m *FileOptions) GetJavaOuterClassname() string { + if m != nil && m.JavaOuterClassname != nil { + return *m.JavaOuterClassname + } + return "" +} + +func (m *FileOptions) GetJavaMultipleFiles() bool { + if m != nil && m.JavaMultipleFiles != nil { + return *m.JavaMultipleFiles + } + return Default_FileOptions_JavaMultipleFiles +} + +// Deprecated: Do not use. +func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if m != nil && m.JavaGenerateEqualsAndHash != nil { + return *m.JavaGenerateEqualsAndHash + } + return false +} + +func (m *FileOptions) GetJavaStringCheckUtf8() bool { + if m != nil && m.JavaStringCheckUtf8 != nil { + return *m.JavaStringCheckUtf8 + } + return Default_FileOptions_JavaStringCheckUtf8 +} + +func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { + if m != nil && m.OptimizeFor != nil { + return *m.OptimizeFor + } + return Default_FileOptions_OptimizeFor +} + +func (m *FileOptions) GetGoPackage() string { + if m != nil && m.GoPackage != nil { + return *m.GoPackage + } + return "" +} + +func (m *FileOptions) GetCcGenericServices() bool { + if m != nil && m.CcGenericServices != nil { + return *m.CcGenericServices + } + return Default_FileOptions_CcGenericServices +} + +func (m *FileOptions) GetJavaGenericServices() bool { + if m != nil && m.JavaGenericServices != nil { + return *m.JavaGenericServices + } + return Default_FileOptions_JavaGenericServices +} + +func (m *FileOptions) GetPyGenericServices() bool { + if m != nil && m.PyGenericServices != nil { + return *m.PyGenericServices + } + return Default_FileOptions_PyGenericServices +} + +func (m *FileOptions) GetPhpGenericServices() bool { + if m != nil && m.PhpGenericServices != nil { + return *m.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + +func (m *FileOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FileOptions_Deprecated +} + +func (m *FileOptions) GetCcEnableArenas() bool { + if m != nil && m.CcEnableArenas != nil { + return *m.CcEnableArenas + } + return Default_FileOptions_CcEnableArenas +} + +func (m *FileOptions) GetObjcClassPrefix() string { + if m != nil && m.ObjcClassPrefix != nil { + return *m.ObjcClassPrefix + } + return "" +} + +func (m *FileOptions) GetCsharpNamespace() string { + if m != nil && m.CsharpNamespace != nil { + return *m.CsharpNamespace + } + return "" +} + +func (m *FileOptions) GetSwiftPrefix() string { + if m != nil && m.SwiftPrefix != nil { + return *m.SwiftPrefix + } + return "" +} + +func (m *FileOptions) GetPhpClassPrefix() string { + if m != nil && m.PhpClassPrefix != nil { + return *m.PhpClassPrefix + } + return "" +} + +func (m *FileOptions) GetPhpNamespace() string { + if m != nil && m.PhpNamespace != nil { + return *m.PhpNamespace + } + return "" +} + +func (m *FileOptions) GetPhpMetadataNamespace() string { + if m != nil && m.PhpMetadataNamespace != nil { + return *m.PhpMetadataNamespace + } + return "" +} + +func (m *FileOptions) GetRubyPackage() string { + if m != nil && m.RubyPackage != nil { + return *m.RubyPackage + } + return "" +} + +func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MessageOptions struct { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageOptions) Reset() { *m = MessageOptions{} } +func (m *MessageOptions) String() string { return proto.CompactTextString(m) } +func (*MessageOptions) ProtoMessage() {} +func (*MessageOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{11} +} + +var extRange_MessageOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} + +func (m *MessageOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageOptions.Unmarshal(m, b) +} +func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) +} +func (m *MessageOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageOptions.Merge(m, src) +} +func (m *MessageOptions) XXX_Size() int { + return xxx_messageInfo_MessageOptions.Size(m) +} +func (m *MessageOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MessageOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageOptions proto.InternalMessageInfo + +const Default_MessageOptions_MessageSetWireFormat bool = false +const Default_MessageOptions_NoStandardDescriptorAccessor bool = false +const Default_MessageOptions_Deprecated bool = false + +func (m *MessageOptions) GetMessageSetWireFormat() bool { + if m != nil && m.MessageSetWireFormat != nil { + return *m.MessageSetWireFormat + } + return Default_MessageOptions_MessageSetWireFormat +} + +func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { + if m != nil && m.NoStandardDescriptorAccessor != nil { + return *m.NoStandardDescriptorAccessor + } + return Default_MessageOptions_NoStandardDescriptorAccessor +} + +func (m *MessageOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MessageOptions_Deprecated +} + +func (m *MessageOptions) GetMapEntry() bool { + if m != nil && m.MapEntry != nil { + return *m.MapEntry + } + return false +} + +func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type FieldOptions struct { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // For Google-internal migration only. Do not use. + Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{12} +} + +var extRange_FieldOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} + +func (m *FieldOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldOptions.Unmarshal(m, b) +} +func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) +} +func (m *FieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(m, src) +} +func (m *FieldOptions) XXX_Size() int { + return xxx_messageInfo_FieldOptions.Size(m) +} +func (m *FieldOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FieldOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldOptions proto.InternalMessageInfo + +const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING +const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL +const Default_FieldOptions_Lazy bool = false +const Default_FieldOptions_Deprecated bool = false +const Default_FieldOptions_Weak bool = false + +func (m *FieldOptions) GetCtype() FieldOptions_CType { + if m != nil && m.Ctype != nil { + return *m.Ctype + } + return Default_FieldOptions_Ctype +} + +func (m *FieldOptions) GetPacked() bool { + if m != nil && m.Packed != nil { + return *m.Packed + } + return false +} + +func (m *FieldOptions) GetJstype() FieldOptions_JSType { + if m != nil && m.Jstype != nil { + return *m.Jstype + } + return Default_FieldOptions_Jstype +} + +func (m *FieldOptions) GetLazy() bool { + if m != nil && m.Lazy != nil { + return *m.Lazy + } + return Default_FieldOptions_Lazy +} + +func (m *FieldOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FieldOptions_Deprecated +} + +func (m *FieldOptions) GetWeak() bool { + if m != nil && m.Weak != nil { + return *m.Weak + } + return Default_FieldOptions_Weak +} + +func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type OneofOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofOptions) Reset() { *m = OneofOptions{} } +func (m *OneofOptions) String() string { return proto.CompactTextString(m) } +func (*OneofOptions) ProtoMessage() {} +func (*OneofOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{13} +} + +var extRange_OneofOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OneofOptions +} + +func (m *OneofOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofOptions.Unmarshal(m, b) +} +func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) +} +func (m *OneofOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofOptions.Merge(m, src) +} +func (m *OneofOptions) XXX_Size() int { + return xxx_messageInfo_OneofOptions.Size(m) +} +func (m *OneofOptions) XXX_DiscardUnknown() { + xxx_messageInfo_OneofOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofOptions proto.InternalMessageInfo + +func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumOptions struct { + // Set this option to true to allow mapping different tag names to the same + // value. + AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumOptions) Reset() { *m = EnumOptions{} } +func (m *EnumOptions) String() string { return proto.CompactTextString(m) } +func (*EnumOptions) ProtoMessage() {} +func (*EnumOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{14} +} + +var extRange_EnumOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} + +func (m *EnumOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumOptions.Unmarshal(m, b) +} +func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) +} +func (m *EnumOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumOptions.Merge(m, src) +} +func (m *EnumOptions) XXX_Size() int { + return xxx_messageInfo_EnumOptions.Size(m) +} +func (m *EnumOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumOptions proto.InternalMessageInfo + +const Default_EnumOptions_Deprecated bool = false + +func (m *EnumOptions) GetAllowAlias() bool { + if m != nil && m.AllowAlias != nil { + return *m.AllowAlias + } + return false +} + +func (m *EnumOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumOptions_Deprecated +} + +func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumValueOptions struct { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } +func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } +func (*EnumValueOptions) ProtoMessage() {} +func (*EnumValueOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{15} +} + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} + +func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) +} +func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) +} +func (m *EnumValueOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueOptions.Merge(m, src) +} +func (m *EnumValueOptions) XXX_Size() int { + return xxx_messageInfo_EnumValueOptions.Size(m) +} +func (m *EnumValueOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo + +const Default_EnumValueOptions_Deprecated bool = false + +func (m *EnumValueOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumValueOptions_Deprecated +} + +func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type ServiceOptions struct { + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } +func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } +func (*ServiceOptions) ProtoMessage() {} +func (*ServiceOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{16} +} + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} + +func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) +} +func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) +} +func (m *ServiceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceOptions.Merge(m, src) +} +func (m *ServiceOptions) XXX_Size() int { + return xxx_messageInfo_ServiceOptions.Size(m) +} +func (m *ServiceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo + +const Default_ServiceOptions_Deprecated bool = false + +func (m *ServiceOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_ServiceOptions_Deprecated +} + +func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MethodOptions struct { + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{17} +} + +var extRange_MethodOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} + +func (m *MethodOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodOptions.Unmarshal(m, b) +} +func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) +} +func (m *MethodOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodOptions.Merge(m, src) +} +func (m *MethodOptions) XXX_Size() int { + return xxx_messageInfo_MethodOptions.Size(m) +} +func (m *MethodOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MethodOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodOptions proto.InternalMessageInfo + +const Default_MethodOptions_Deprecated bool = false +const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { + if m != nil && m.IdempotencyLevel != nil { + return *m.IdempotencyLevel + } + return Default_MethodOptions_IdempotencyLevel +} + +func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +type UninterpretedOption struct { + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } +func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption) ProtoMessage() {} +func (*UninterpretedOption) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{18} +} +func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) +} +func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) +} +func (m *UninterpretedOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption.Merge(m, src) +} +func (m *UninterpretedOption) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption.Size(m) +} +func (m *UninterpretedOption) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo + +func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { + if m != nil { + return m.Name + } + return nil +} + +func (m *UninterpretedOption) GetIdentifierValue() string { + if m != nil && m.IdentifierValue != nil { + return *m.IdentifierValue + } + return "" +} + +func (m *UninterpretedOption) GetPositiveIntValue() uint64 { + if m != nil && m.PositiveIntValue != nil { + return *m.PositiveIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetNegativeIntValue() int64 { + if m != nil && m.NegativeIntValue != nil { + return *m.NegativeIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetDoubleValue() float64 { + if m != nil && m.DoubleValue != nil { + return *m.DoubleValue + } + return 0 +} + +func (m *UninterpretedOption) GetStringValue() []byte { + if m != nil { + return m.StringValue + } + return nil +} + +func (m *UninterpretedOption) GetAggregateValue() string { + if m != nil && m.AggregateValue != nil { + return *m.AggregateValue + } + return "" +} + +// The name of the uninterpreted option. Each string represents a segment in +// a dot-separated name. is_extension is true iff a segment represents an +// extension (denoted with parentheses in options specs in .proto files). +// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents +// "foo.(bar.baz).qux". +type UninterpretedOption_NamePart struct { + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } +func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption_NamePart) ProtoMessage() {} +func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{18, 0} +} +func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) +} +func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) +} +func (m *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption_NamePart.Merge(m, src) +} +func (m *UninterpretedOption_NamePart) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) +} +func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo + +func (m *UninterpretedOption_NamePart) GetNamePart() string { + if m != nil && m.NamePart != nil { + return *m.NamePart + } + return "" +} + +func (m *UninterpretedOption_NamePart) GetIsExtension() bool { + if m != nil && m.IsExtension != nil { + return *m.IsExtension + } + return false +} + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +type SourceCodeInfo struct { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } +func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo) ProtoMessage() {} +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{19} +} +func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) +} +func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) +} +func (m *SourceCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo.Merge(m, src) +} +func (m *SourceCodeInfo) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo.Size(m) +} +func (m *SourceCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo + +func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { + if m != nil { + return m.Location + } + return nil +} + +type SourceCodeInfo_Location struct { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` + TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` + LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } +func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo_Location) ProtoMessage() {} +func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{19, 0} +} +func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) +} +func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) +} +func (m *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo_Location.Merge(m, src) +} +func (m *SourceCodeInfo_Location) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo_Location.Size(m) +} +func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo + +func (m *SourceCodeInfo_Location) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *SourceCodeInfo_Location) GetSpan() []int32 { + if m != nil { + return m.Span + } + return nil +} + +func (m *SourceCodeInfo_Location) GetLeadingComments() string { + if m != nil && m.LeadingComments != nil { + return *m.LeadingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetTrailingComments() string { + if m != nil && m.TrailingComments != nil { + return *m.TrailingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { + if m != nil { + return m.LeadingDetachedComments + } + return nil +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +type GeneratedCodeInfo struct { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } +func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo) ProtoMessage() {} +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{20} +} +func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) +} +func (m *GeneratedCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo.Merge(m, src) +} +func (m *GeneratedCodeInfo) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo.Size(m) +} +func (m *GeneratedCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo + +func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { + if m != nil { + return m.Annotation + } + return nil +} + +type GeneratedCodeInfo_Annotation struct { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Identifies the filesystem path to the original source .proto. + SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } +func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} +func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { + return fileDescriptor_308767df5ffe18af, []int{20, 0} +} +func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(m, src) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) +} +func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo + +func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { + if m != nil && m.SourceFile != nil { + return *m.SourceFile + } + return "" +} + +func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { + if m != nil && m.Begin != nil { + return *m.Begin + } + return 0 +} + +func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func init() { + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) + proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) + proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) + proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) + proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) + proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") + proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") + proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") + proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") + proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") + proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions") + proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") + proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") + proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumDescriptorProto_EnumReservedRange)(nil), "google.protobuf.EnumDescriptorProto.EnumReservedRange") + proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") + proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") + proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") + proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") + proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") + proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") + proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") + proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") + proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") + proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") + proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") + proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") + proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") + proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") + proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") + proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") + proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") +} + +func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_308767df5ffe18af) } + +var fileDescriptor_308767df5ffe18af = []byte{ + // 2522 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0x65, 0x7a, 0xec, 0x75, 0x18, 0xef, 0x47, 0x1c, 0xed, 0x66, + 0xe3, 0x24, 0xbb, 0xca, 0xc2, 0x49, 0x9c, 0xac, 0x53, 0x6c, 0x2b, 0x4b, 0x8c, 0x57, 0xa9, 0xbe, + 0x4a, 0xc9, 0xdd, 0x64, 0x8b, 0x82, 0x18, 0x93, 0x23, 0x89, 0x09, 0x45, 0x72, 0x49, 0x2a, 0x89, + 0x83, 0x1e, 0x02, 0xf4, 0x54, 0xa0, 0x7f, 0x40, 0x51, 0x14, 0x3d, 0xf4, 0xb2, 0x40, 0xff, 0x80, + 0x02, 0xed, 0xbd, 0xd7, 0x02, 0xbd, 0xf7, 0x50, 0xa0, 0x05, 0xda, 0x3f, 0xa1, 0xc7, 0x62, 0x66, + 0x48, 0x8a, 0xd4, 0x47, 0xe2, 0x5d, 0x20, 0xd9, 0x93, 0x3d, 0xef, 0xfd, 0xde, 0x9b, 0x37, 0x8f, + 0xbf, 0x79, 0xf3, 0x66, 0x04, 0x82, 0x46, 0x5c, 0xd5, 0xd1, 0x6d, 0xcf, 0x72, 0x2a, 0xb6, 0x63, + 0x79, 0x16, 0x5a, 0x1b, 0x5a, 0xd6, 0xd0, 0x20, 0x7c, 0x74, 0x32, 0x19, 0x94, 0x5b, 0xb0, 0x7e, + 0x4f, 0x37, 0x48, 0x3d, 0x04, 0xf6, 0x88, 0x87, 0xee, 0x40, 0x7a, 0xa0, 0x1b, 0x44, 0x4c, 0xec, + 0xa4, 0x76, 0x0b, 0x7b, 0x1f, 0x56, 0x66, 0x8c, 0x2a, 0x71, 0x8b, 0x2e, 0x15, 0xcb, 0xcc, 0xa2, + 0xfc, 0xef, 0x34, 0x6c, 0x2c, 0xd0, 0x22, 0x04, 0x69, 0x13, 0x8f, 0xa9, 0xc7, 0xc4, 0x6e, 0x5e, + 0x66, 0xff, 0x23, 0x11, 0x56, 0x6c, 0xac, 0x3e, 0xc6, 0x43, 0x22, 0x26, 0x99, 0x38, 0x18, 0xa2, + 0xf7, 0x01, 0x34, 0x62, 0x13, 0x53, 0x23, 0xa6, 0x7a, 0x2a, 0xa6, 0x76, 0x52, 0xbb, 0x79, 0x39, + 0x22, 0x41, 0xd7, 0x60, 0xdd, 0x9e, 0x9c, 0x18, 0xba, 0xaa, 0x44, 0x60, 0xb0, 0x93, 0xda, 0xcd, + 0xc8, 0x02, 0x57, 0xd4, 0xa7, 0xe0, 0xcb, 0xb0, 0xf6, 0x94, 0xe0, 0xc7, 0x51, 0x68, 0x81, 0x41, + 0x4b, 0x54, 0x1c, 0x01, 0xd6, 0xa0, 0x38, 0x26, 0xae, 0x8b, 0x87, 0x44, 0xf1, 0x4e, 0x6d, 0x22, + 0xa6, 0xd9, 0xea, 0x77, 0xe6, 0x56, 0x3f, 0xbb, 0xf2, 0x82, 0x6f, 0xd5, 0x3f, 0xb5, 0x09, 0xaa, + 0x42, 0x9e, 0x98, 0x93, 0x31, 0xf7, 0x90, 0x59, 0x92, 0x3f, 0xc9, 0x9c, 0x8c, 0x67, 0xbd, 0xe4, + 0xa8, 0x99, 0xef, 0x62, 0xc5, 0x25, 0xce, 0x13, 0x5d, 0x25, 0x62, 0x96, 0x39, 0xb8, 0x3c, 0xe7, + 0xa0, 0xc7, 0xf5, 0xb3, 0x3e, 0x02, 0x3b, 0x54, 0x83, 0x3c, 0x79, 0xe6, 0x11, 0xd3, 0xd5, 0x2d, + 0x53, 0x5c, 0x61, 0x4e, 0x2e, 0x2d, 0xf8, 0x8a, 0xc4, 0xd0, 0x66, 0x5d, 0x4c, 0xed, 0xd0, 0x3e, + 0xac, 0x58, 0xb6, 0xa7, 0x5b, 0xa6, 0x2b, 0xe6, 0x76, 0x12, 0xbb, 0x85, 0xbd, 0x77, 0x17, 0x12, + 0xa1, 0xc3, 0x31, 0x72, 0x00, 0x46, 0x0d, 0x10, 0x5c, 0x6b, 0xe2, 0xa8, 0x44, 0x51, 0x2d, 0x8d, + 0x28, 0xba, 0x39, 0xb0, 0xc4, 0x3c, 0x73, 0x70, 0x61, 0x7e, 0x21, 0x0c, 0x58, 0xb3, 0x34, 0xd2, + 0x30, 0x07, 0x96, 0x5c, 0x72, 0x63, 0x63, 0xb4, 0x05, 0x59, 0xf7, 0xd4, 0xf4, 0xf0, 0x33, 0xb1, + 0xc8, 0x18, 0xe2, 0x8f, 0xca, 0x7f, 0xce, 0xc2, 0xda, 0x59, 0x28, 0x76, 0x17, 0x32, 0x03, 0xba, + 0x4a, 0x31, 0xf9, 0x6d, 0x72, 0xc0, 0x6d, 0xe2, 0x49, 0xcc, 0x7e, 0xc7, 0x24, 0x56, 0xa1, 0x60, + 0x12, 0xd7, 0x23, 0x1a, 0x67, 0x44, 0xea, 0x8c, 0x9c, 0x02, 0x6e, 0x34, 0x4f, 0xa9, 0xf4, 0x77, + 0xa2, 0xd4, 0x03, 0x58, 0x0b, 0x43, 0x52, 0x1c, 0x6c, 0x0e, 0x03, 0x6e, 0x5e, 0x7f, 0x55, 0x24, + 0x15, 0x29, 0xb0, 0x93, 0xa9, 0x99, 0x5c, 0x22, 0xb1, 0x31, 0xaa, 0x03, 0x58, 0x26, 0xb1, 0x06, + 0x8a, 0x46, 0x54, 0x43, 0xcc, 0x2d, 0xc9, 0x52, 0x87, 0x42, 0xe6, 0xb2, 0x64, 0x71, 0xa9, 0x6a, + 0xa0, 0xcf, 0xa6, 0x54, 0x5b, 0x59, 0xc2, 0x94, 0x16, 0xdf, 0x64, 0x73, 0x6c, 0x3b, 0x86, 0x92, + 0x43, 0x28, 0xef, 0x89, 0xe6, 0xaf, 0x2c, 0xcf, 0x82, 0xa8, 0xbc, 0x72, 0x65, 0xb2, 0x6f, 0xc6, + 0x17, 0xb6, 0xea, 0x44, 0x87, 0xe8, 0x03, 0x08, 0x05, 0x0a, 0xa3, 0x15, 0xb0, 0x2a, 0x54, 0x0c, + 0x84, 0x6d, 0x3c, 0x26, 0xdb, 0xcf, 0xa1, 0x14, 0x4f, 0x0f, 0xda, 0x84, 0x8c, 0xeb, 0x61, 0xc7, + 0x63, 0x2c, 0xcc, 0xc8, 0x7c, 0x80, 0x04, 0x48, 0x11, 0x53, 0x63, 0x55, 0x2e, 0x23, 0xd3, 0x7f, + 0xd1, 0x8f, 0xa6, 0x0b, 0x4e, 0xb1, 0x05, 0x7f, 0x34, 0xff, 0x45, 0x63, 0x9e, 0x67, 0xd7, 0xbd, + 0x7d, 0x1b, 0x56, 0x63, 0x0b, 0x38, 0xeb, 0xd4, 0xe5, 0x5f, 0xc0, 0xdb, 0x0b, 0x5d, 0xa3, 0x07, + 0xb0, 0x39, 0x31, 0x75, 0xd3, 0x23, 0x8e, 0xed, 0x10, 0xca, 0x58, 0x3e, 0x95, 0xf8, 0x9f, 0x95, + 0x25, 0x9c, 0x3b, 0x8e, 0xa2, 0xb9, 0x17, 0x79, 0x63, 0x32, 0x2f, 0xbc, 0x9a, 0xcf, 0xfd, 0x77, + 0x45, 0x78, 0xf1, 0xe2, 0xc5, 0x8b, 0x64, 0xf9, 0x37, 0x59, 0xd8, 0x5c, 0xb4, 0x67, 0x16, 0x6e, + 0xdf, 0x2d, 0xc8, 0x9a, 0x93, 0xf1, 0x09, 0x71, 0x58, 0x92, 0x32, 0xb2, 0x3f, 0x42, 0x55, 0xc8, + 0x18, 0xf8, 0x84, 0x18, 0x62, 0x7a, 0x27, 0xb1, 0x5b, 0xda, 0xbb, 0x76, 0xa6, 0x5d, 0x59, 0x69, + 0x52, 0x13, 0x99, 0x5b, 0xa2, 0xcf, 0x21, 0xed, 0x97, 0x68, 0xea, 0xe1, 0xea, 0xd9, 0x3c, 0xd0, + 0xbd, 0x24, 0x33, 0x3b, 0xf4, 0x0e, 0xe4, 0xe9, 0x5f, 0xce, 0x8d, 0x2c, 0x8b, 0x39, 0x47, 0x05, + 0x94, 0x17, 0x68, 0x1b, 0x72, 0x6c, 0x9b, 0x68, 0x24, 0x38, 0xda, 0xc2, 0x31, 0x25, 0x96, 0x46, + 0x06, 0x78, 0x62, 0x78, 0xca, 0x13, 0x6c, 0x4c, 0x08, 0x23, 0x7c, 0x5e, 0x2e, 0xfa, 0xc2, 0x9f, + 0x52, 0x19, 0xba, 0x00, 0x05, 0xbe, 0xab, 0x74, 0x53, 0x23, 0xcf, 0x58, 0xf5, 0xcc, 0xc8, 0x7c, + 0xa3, 0x35, 0xa8, 0x84, 0x4e, 0xff, 0xc8, 0xb5, 0xcc, 0x80, 0x9a, 0x6c, 0x0a, 0x2a, 0x60, 0xd3, + 0xdf, 0x9e, 0x2d, 0xdc, 0xef, 0x2d, 0x5e, 0xde, 0x2c, 0xa7, 0xca, 0x7f, 0x4a, 0x42, 0x9a, 0xd5, + 0x8b, 0x35, 0x28, 0xf4, 0x1f, 0x76, 0x25, 0xa5, 0xde, 0x39, 0x3e, 0x6c, 0x4a, 0x42, 0x02, 0x95, + 0x00, 0x98, 0xe0, 0x5e, 0xb3, 0x53, 0xed, 0x0b, 0xc9, 0x70, 0xdc, 0x68, 0xf7, 0xf7, 0x6f, 0x0a, + 0xa9, 0xd0, 0xe0, 0x98, 0x0b, 0xd2, 0x51, 0xc0, 0x8d, 0x3d, 0x21, 0x83, 0x04, 0x28, 0x72, 0x07, + 0x8d, 0x07, 0x52, 0x7d, 0xff, 0xa6, 0x90, 0x8d, 0x4b, 0x6e, 0xec, 0x09, 0x2b, 0x68, 0x15, 0xf2, + 0x4c, 0x72, 0xd8, 0xe9, 0x34, 0x85, 0x5c, 0xe8, 0xb3, 0xd7, 0x97, 0x1b, 0xed, 0x23, 0x21, 0x1f, + 0xfa, 0x3c, 0x92, 0x3b, 0xc7, 0x5d, 0x01, 0x42, 0x0f, 0x2d, 0xa9, 0xd7, 0xab, 0x1e, 0x49, 0x42, + 0x21, 0x44, 0x1c, 0x3e, 0xec, 0x4b, 0x3d, 0xa1, 0x18, 0x0b, 0xeb, 0xc6, 0x9e, 0xb0, 0x1a, 0x4e, + 0x21, 0xb5, 0x8f, 0x5b, 0x42, 0x09, 0xad, 0xc3, 0x2a, 0x9f, 0x22, 0x08, 0x62, 0x6d, 0x46, 0xb4, + 0x7f, 0x53, 0x10, 0xa6, 0x81, 0x70, 0x2f, 0xeb, 0x31, 0xc1, 0xfe, 0x4d, 0x01, 0x95, 0x6b, 0x90, + 0x61, 0xec, 0x42, 0x08, 0x4a, 0xcd, 0xea, 0xa1, 0xd4, 0x54, 0x3a, 0xdd, 0x7e, 0xa3, 0xd3, 0xae, + 0x36, 0x85, 0xc4, 0x54, 0x26, 0x4b, 0x3f, 0x39, 0x6e, 0xc8, 0x52, 0x5d, 0x48, 0x46, 0x65, 0x5d, + 0xa9, 0xda, 0x97, 0xea, 0x42, 0xaa, 0xac, 0xc2, 0xe6, 0xa2, 0x3a, 0xb9, 0x70, 0x67, 0x44, 0x3e, + 0x71, 0x72, 0xc9, 0x27, 0x66, 0xbe, 0xe6, 0x3e, 0xf1, 0xbf, 0x92, 0xb0, 0xb1, 0xe0, 0xac, 0x58, + 0x38, 0xc9, 0x0f, 0x21, 0xc3, 0x29, 0xca, 0x4f, 0xcf, 0x2b, 0x0b, 0x0f, 0x1d, 0x46, 0xd8, 0xb9, + 0x13, 0x94, 0xd9, 0x45, 0x3b, 0x88, 0xd4, 0x92, 0x0e, 0x82, 0xba, 0x98, 0xab, 0xe9, 0x3f, 0x9f, + 0xab, 0xe9, 0xfc, 0xd8, 0xdb, 0x3f, 0xcb, 0xb1, 0xc7, 0x64, 0xdf, 0xae, 0xb6, 0x67, 0x16, 0xd4, + 0xf6, 0xbb, 0xb0, 0x3e, 0xe7, 0xe8, 0xcc, 0x35, 0xf6, 0x97, 0x09, 0x10, 0x97, 0x25, 0xe7, 0x15, + 0x95, 0x2e, 0x19, 0xab, 0x74, 0x77, 0x67, 0x33, 0x78, 0x71, 0xf9, 0x47, 0x98, 0xfb, 0xd6, 0xdf, + 0x24, 0x60, 0x6b, 0x71, 0xa7, 0xb8, 0x30, 0x86, 0xcf, 0x21, 0x3b, 0x26, 0xde, 0xc8, 0x0a, 0xba, + 0xa5, 0x8f, 0x16, 0x9c, 0xc1, 0x54, 0x3d, 0xfb, 0xb1, 0x7d, 0xab, 0xe8, 0x21, 0x9e, 0x5a, 0xd6, + 0xee, 0xf1, 0x68, 0xe6, 0x22, 0xfd, 0x55, 0x12, 0xde, 0x5e, 0xe8, 0x7c, 0x61, 0xa0, 0xef, 0x01, + 0xe8, 0xa6, 0x3d, 0xf1, 0x78, 0x47, 0xc4, 0x0b, 0x6c, 0x9e, 0x49, 0x58, 0xf1, 0xa2, 0xc5, 0x73, + 0xe2, 0x85, 0xfa, 0x14, 0xd3, 0x03, 0x17, 0x31, 0xc0, 0x9d, 0x69, 0xa0, 0x69, 0x16, 0xe8, 0xfb, + 0x4b, 0x56, 0x3a, 0x47, 0xcc, 0x4f, 0x41, 0x50, 0x0d, 0x9d, 0x98, 0x9e, 0xe2, 0x7a, 0x0e, 0xc1, + 0x63, 0xdd, 0x1c, 0xb2, 0x13, 0x24, 0x77, 0x90, 0x19, 0x60, 0xc3, 0x25, 0xf2, 0x1a, 0x57, 0xf7, + 0x02, 0x2d, 0xb5, 0x60, 0x04, 0x72, 0x22, 0x16, 0xd9, 0x98, 0x05, 0x57, 0x87, 0x16, 0xe5, 0x5f, + 0xe7, 0xa1, 0x10, 0xe9, 0xab, 0xd1, 0x45, 0x28, 0x3e, 0xc2, 0x4f, 0xb0, 0x12, 0xdc, 0x95, 0x78, + 0x26, 0x0a, 0x54, 0xd6, 0xf5, 0xef, 0x4b, 0x9f, 0xc2, 0x26, 0x83, 0x58, 0x13, 0x8f, 0x38, 0x8a, + 0x6a, 0x60, 0xd7, 0x65, 0x49, 0xcb, 0x31, 0x28, 0xa2, 0xba, 0x0e, 0x55, 0xd5, 0x02, 0x0d, 0xba, + 0x05, 0x1b, 0xcc, 0x62, 0x3c, 0x31, 0x3c, 0xdd, 0x36, 0x88, 0x42, 0x6f, 0x6f, 0x2e, 0x3b, 0x49, + 0xc2, 0xc8, 0xd6, 0x29, 0xa2, 0xe5, 0x03, 0x68, 0x44, 0x2e, 0xaa, 0xc3, 0x7b, 0xcc, 0x6c, 0x48, + 0x4c, 0xe2, 0x60, 0x8f, 0x28, 0xe4, 0xeb, 0x09, 0x36, 0x5c, 0x05, 0x9b, 0x9a, 0x32, 0xc2, 0xee, + 0x48, 0xdc, 0xa4, 0x0e, 0x0e, 0x93, 0x62, 0x42, 0x3e, 0x4f, 0x81, 0x47, 0x3e, 0x4e, 0x62, 0xb0, + 0xaa, 0xa9, 0x7d, 0x81, 0xdd, 0x11, 0x3a, 0x80, 0x2d, 0xe6, 0xc5, 0xf5, 0x1c, 0xdd, 0x1c, 0x2a, + 0xea, 0x88, 0xa8, 0x8f, 0x95, 0x89, 0x37, 0xb8, 0x23, 0xbe, 0x13, 0x9d, 0x9f, 0x45, 0xd8, 0x63, + 0x98, 0x1a, 0x85, 0x1c, 0x7b, 0x83, 0x3b, 0xa8, 0x07, 0x45, 0xfa, 0x31, 0xc6, 0xfa, 0x73, 0xa2, + 0x0c, 0x2c, 0x87, 0x1d, 0x8d, 0xa5, 0x05, 0xa5, 0x29, 0x92, 0xc1, 0x4a, 0xc7, 0x37, 0x68, 0x59, + 0x1a, 0x39, 0xc8, 0xf4, 0xba, 0x92, 0x54, 0x97, 0x0b, 0x81, 0x97, 0x7b, 0x96, 0x43, 0x09, 0x35, + 0xb4, 0xc2, 0x04, 0x17, 0x38, 0xa1, 0x86, 0x56, 0x90, 0xde, 0x5b, 0xb0, 0xa1, 0xaa, 0x7c, 0xcd, + 0xba, 0xaa, 0xf8, 0x77, 0x2c, 0x57, 0x14, 0x62, 0xc9, 0x52, 0xd5, 0x23, 0x0e, 0xf0, 0x39, 0xee, + 0xa2, 0xcf, 0xe0, 0xed, 0x69, 0xb2, 0xa2, 0x86, 0xeb, 0x73, 0xab, 0x9c, 0x35, 0xbd, 0x05, 0x1b, + 0xf6, 0xe9, 0xbc, 0x21, 0x8a, 0xcd, 0x68, 0x9f, 0xce, 0x9a, 0xdd, 0x86, 0x4d, 0x7b, 0x64, 0xcf, + 0xdb, 0x5d, 0x8d, 0xda, 0x21, 0x7b, 0x64, 0xcf, 0x1a, 0x5e, 0x62, 0x17, 0x6e, 0x87, 0xa8, 0xd8, + 0x23, 0x9a, 0x78, 0x2e, 0x0a, 0x8f, 0x28, 0xd0, 0x75, 0x10, 0x54, 0x55, 0x21, 0x26, 0x3e, 0x31, + 0x88, 0x82, 0x1d, 0x62, 0x62, 0x57, 0xbc, 0x10, 0x05, 0x97, 0x54, 0x55, 0x62, 0xda, 0x2a, 0x53, + 0xa2, 0xab, 0xb0, 0x6e, 0x9d, 0x3c, 0x52, 0x39, 0x25, 0x15, 0xdb, 0x21, 0x03, 0xfd, 0x99, 0xf8, + 0x21, 0xcb, 0xef, 0x1a, 0x55, 0x30, 0x42, 0x76, 0x99, 0x18, 0x5d, 0x01, 0x41, 0x75, 0x47, 0xd8, + 0xb1, 0x59, 0x4d, 0x76, 0x6d, 0xac, 0x12, 0xf1, 0x12, 0x87, 0x72, 0x79, 0x3b, 0x10, 0xd3, 0x2d, + 0xe1, 0x3e, 0xd5, 0x07, 0x5e, 0xe0, 0xf1, 0x32, 0xdf, 0x12, 0x4c, 0xe6, 0x7b, 0xdb, 0x05, 0x81, + 0xa6, 0x22, 0x36, 0xf1, 0x2e, 0x83, 0x95, 0xec, 0x91, 0x1d, 0x9d, 0xf7, 0x03, 0x58, 0xa5, 0xc8, + 0xe9, 0xa4, 0x57, 0x78, 0x43, 0x66, 0x8f, 0x22, 0x33, 0xde, 0x84, 0x2d, 0x0a, 0x1a, 0x13, 0x0f, + 0x6b, 0xd8, 0xc3, 0x11, 0xf4, 0xc7, 0x0c, 0x4d, 0xf3, 0xde, 0xf2, 0x95, 0xb1, 0x38, 0x9d, 0xc9, + 0xc9, 0x69, 0xc8, 0xac, 0x4f, 0x78, 0x9c, 0x54, 0x16, 0x70, 0xeb, 0xb5, 0x35, 0xdd, 0xe5, 0x03, + 0x28, 0x46, 0x89, 0x8f, 0xf2, 0xc0, 0xa9, 0x2f, 0x24, 0x68, 0x17, 0x54, 0xeb, 0xd4, 0x69, 0xff, + 0xf2, 0x95, 0x24, 0x24, 0x69, 0x1f, 0xd5, 0x6c, 0xf4, 0x25, 0x45, 0x3e, 0x6e, 0xf7, 0x1b, 0x2d, + 0x49, 0x48, 0x45, 0x1b, 0xf6, 0xbf, 0x26, 0xa1, 0x14, 0xbf, 0x7b, 0xa1, 0x1f, 0xc0, 0xb9, 0xe0, + 0xa1, 0xc4, 0x25, 0x9e, 0xf2, 0x54, 0x77, 0xd8, 0x5e, 0x1c, 0x63, 0x7e, 0x2e, 0x86, 0x6c, 0xd8, + 0xf4, 0x51, 0x3d, 0xe2, 0x7d, 0xa9, 0x3b, 0x74, 0xa7, 0x8d, 0xb1, 0x87, 0x9a, 0x70, 0xc1, 0xb4, + 0x14, 0xd7, 0xc3, 0xa6, 0x86, 0x1d, 0x4d, 0x99, 0x3e, 0x51, 0x29, 0x58, 0x55, 0x89, 0xeb, 0x5a, + 0xfc, 0x0c, 0x0c, 0xbd, 0xbc, 0x6b, 0x5a, 0x3d, 0x1f, 0x3c, 0x3d, 0x1c, 0xaa, 0x3e, 0x74, 0x86, + 0xb9, 0xa9, 0x65, 0xcc, 0x7d, 0x07, 0xf2, 0x63, 0x6c, 0x2b, 0xc4, 0xf4, 0x9c, 0x53, 0xd6, 0x71, + 0xe7, 0xe4, 0xdc, 0x18, 0xdb, 0x12, 0x1d, 0xbf, 0x99, 0x8b, 0xcf, 0x3f, 0x52, 0x50, 0x8c, 0x76, + 0xdd, 0xf4, 0x12, 0xa3, 0xb2, 0x03, 0x2a, 0xc1, 0x4a, 0xd8, 0x07, 0x2f, 0xed, 0xd1, 0x2b, 0x35, + 0x7a, 0x72, 0x1d, 0x64, 0x79, 0x2f, 0x2c, 0x73, 0x4b, 0xda, 0x35, 0x50, 0x6a, 0x11, 0xde, 0x7b, + 0xe4, 0x64, 0x7f, 0x84, 0x8e, 0x20, 0xfb, 0xc8, 0x65, 0xbe, 0xb3, 0xcc, 0xf7, 0x87, 0x2f, 0xf7, + 0x7d, 0xbf, 0xc7, 0x9c, 0xe7, 0xef, 0xf7, 0x94, 0x76, 0x47, 0x6e, 0x55, 0x9b, 0xb2, 0x6f, 0x8e, + 0xce, 0x43, 0xda, 0xc0, 0xcf, 0x4f, 0xe3, 0x67, 0x1c, 0x13, 0x9d, 0x35, 0xf1, 0xe7, 0x21, 0xfd, + 0x94, 0xe0, 0xc7, 0xf1, 0x93, 0x85, 0x89, 0x5e, 0x23, 0xf5, 0xaf, 0x43, 0x86, 0xe5, 0x0b, 0x01, + 0xf8, 0x19, 0x13, 0xde, 0x42, 0x39, 0x48, 0xd7, 0x3a, 0x32, 0xa5, 0xbf, 0x00, 0x45, 0x2e, 0x55, + 0xba, 0x0d, 0xa9, 0x26, 0x09, 0xc9, 0xf2, 0x2d, 0xc8, 0xf2, 0x24, 0xd0, 0xad, 0x11, 0xa6, 0x41, + 0x78, 0xcb, 0x1f, 0xfa, 0x3e, 0x12, 0x81, 0xf6, 0xb8, 0x75, 0x28, 0xc9, 0x42, 0x32, 0xfa, 0x79, + 0x5d, 0x28, 0x46, 0x1b, 0xee, 0x37, 0xc3, 0xa9, 0xbf, 0x24, 0xa0, 0x10, 0x69, 0xa0, 0x69, 0xe7, + 0x83, 0x0d, 0xc3, 0x7a, 0xaa, 0x60, 0x43, 0xc7, 0xae, 0x4f, 0x0a, 0x60, 0xa2, 0x2a, 0x95, 0x9c, + 0xf5, 0xa3, 0xbd, 0x91, 0xe0, 0x7f, 0x9f, 0x00, 0x61, 0xb6, 0x77, 0x9d, 0x09, 0x30, 0xf1, 0xbd, + 0x06, 0xf8, 0xbb, 0x04, 0x94, 0xe2, 0x0d, 0xeb, 0x4c, 0x78, 0x17, 0xbf, 0xd7, 0xf0, 0xfe, 0x99, + 0x84, 0xd5, 0x58, 0x9b, 0x7a, 0xd6, 0xe8, 0xbe, 0x86, 0x75, 0x5d, 0x23, 0x63, 0xdb, 0xf2, 0x88, + 0xa9, 0x9e, 0x2a, 0x06, 0x79, 0x42, 0x0c, 0xb1, 0xcc, 0x0a, 0xc5, 0xf5, 0x97, 0x37, 0xc2, 0x95, + 0xc6, 0xd4, 0xae, 0x49, 0xcd, 0x0e, 0x36, 0x1a, 0x75, 0xa9, 0xd5, 0xed, 0xf4, 0xa5, 0x76, 0xed, + 0xa1, 0x72, 0xdc, 0xfe, 0x71, 0xbb, 0xf3, 0x65, 0x5b, 0x16, 0xf4, 0x19, 0xd8, 0x6b, 0xdc, 0xea, + 0x5d, 0x10, 0x66, 0x83, 0x42, 0xe7, 0x60, 0x51, 0x58, 0xc2, 0x5b, 0x68, 0x03, 0xd6, 0xda, 0x1d, + 0xa5, 0xd7, 0xa8, 0x4b, 0x8a, 0x74, 0xef, 0x9e, 0x54, 0xeb, 0xf7, 0xf8, 0xd3, 0x46, 0x88, 0xee, + 0xc7, 0x37, 0xf5, 0x6f, 0x53, 0xb0, 0xb1, 0x20, 0x12, 0x54, 0xf5, 0x2f, 0x25, 0xfc, 0x9e, 0xf4, + 0xc9, 0x59, 0xa2, 0xaf, 0xd0, 0xae, 0xa0, 0x8b, 0x1d, 0xcf, 0xbf, 0xc3, 0x5c, 0x01, 0x9a, 0x25, + 0xd3, 0xd3, 0x07, 0x3a, 0x71, 0xfc, 0x97, 0x20, 0x7e, 0x53, 0x59, 0x9b, 0xca, 0xf9, 0x63, 0xd0, + 0xc7, 0x80, 0x6c, 0xcb, 0xd5, 0x3d, 0xfd, 0x09, 0x51, 0x74, 0x33, 0x78, 0x36, 0xa2, 0x37, 0x97, + 0xb4, 0x2c, 0x04, 0x9a, 0x86, 0xe9, 0x85, 0x68, 0x93, 0x0c, 0xf1, 0x0c, 0x9a, 0x16, 0xf0, 0x94, + 0x2c, 0x04, 0x9a, 0x10, 0x7d, 0x11, 0x8a, 0x9a, 0x35, 0xa1, 0xed, 0x1c, 0xc7, 0xd1, 0xf3, 0x22, + 0x21, 0x17, 0xb8, 0x2c, 0x84, 0xf8, 0x8d, 0xfa, 0xf4, 0xbd, 0xaa, 0x28, 0x17, 0xb8, 0x8c, 0x43, + 0x2e, 0xc3, 0x1a, 0x1e, 0x0e, 0x1d, 0xea, 0x3c, 0x70, 0xc4, 0xaf, 0x1e, 0xa5, 0x50, 0xcc, 0x80, + 0xdb, 0xf7, 0x21, 0x17, 0xe4, 0x81, 0x1e, 0xc9, 0x34, 0x13, 0x8a, 0xcd, 0xef, 0xd3, 0xc9, 0xdd, + 0xbc, 0x9c, 0x33, 0x03, 0xe5, 0x45, 0x28, 0xea, 0xae, 0x32, 0x7d, 0x7e, 0x4f, 0xee, 0x24, 0x77, + 0x73, 0x72, 0x41, 0x77, 0xc3, 0xa7, 0xcb, 0xf2, 0x37, 0x49, 0x28, 0xc5, 0x7f, 0x3e, 0x40, 0x75, + 0xc8, 0x19, 0x96, 0x8a, 0x19, 0xb5, 0xf8, 0x6f, 0x57, 0xbb, 0xaf, 0xf8, 0xc5, 0xa1, 0xd2, 0xf4, + 0xf1, 0x72, 0x68, 0xb9, 0xfd, 0xb7, 0x04, 0xe4, 0x02, 0x31, 0xda, 0x82, 0xb4, 0x8d, 0xbd, 0x11, + 0x73, 0x97, 0x39, 0x4c, 0x0a, 0x09, 0x99, 0x8d, 0xa9, 0xdc, 0xb5, 0xb1, 0xc9, 0x28, 0xe0, 0xcb, + 0xe9, 0x98, 0x7e, 0x57, 0x83, 0x60, 0x8d, 0xdd, 0x6b, 0xac, 0xf1, 0x98, 0x98, 0x9e, 0x1b, 0x7c, + 0x57, 0x5f, 0x5e, 0xf3, 0xc5, 0xe8, 0x1a, 0xac, 0x7b, 0x0e, 0xd6, 0x8d, 0x18, 0x36, 0xcd, 0xb0, + 0x42, 0xa0, 0x08, 0xc1, 0x07, 0x70, 0x3e, 0xf0, 0xab, 0x11, 0x0f, 0xab, 0x23, 0xa2, 0x4d, 0x8d, + 0xb2, 0xec, 0xfd, 0xe2, 0x9c, 0x0f, 0xa8, 0xfb, 0xfa, 0xc0, 0xb6, 0xfc, 0xf7, 0x04, 0xac, 0x07, + 0x37, 0x31, 0x2d, 0x4c, 0x56, 0x0b, 0x00, 0x9b, 0xa6, 0xe5, 0x45, 0xd3, 0x35, 0x4f, 0xe5, 0x39, + 0xbb, 0x4a, 0x35, 0x34, 0x92, 0x23, 0x0e, 0xb6, 0xc7, 0x00, 0x53, 0xcd, 0xd2, 0xb4, 0x5d, 0x80, + 0x82, 0xff, 0xdb, 0x10, 0xfb, 0x81, 0x91, 0xdf, 0xdd, 0x81, 0x8b, 0xe8, 0x95, 0x0d, 0x6d, 0x42, + 0xe6, 0x84, 0x0c, 0x75, 0xd3, 0x7f, 0xf1, 0xe5, 0x83, 0xe0, 0x85, 0x25, 0x1d, 0xbe, 0xb0, 0x1c, + 0xfe, 0x0c, 0x36, 0x54, 0x6b, 0x3c, 0x1b, 0xee, 0xa1, 0x30, 0xf3, 0x7e, 0xe0, 0x7e, 0x91, 0xf8, + 0x0a, 0xa6, 0x2d, 0xe6, 0xff, 0x12, 0x89, 0x3f, 0x24, 0x53, 0x47, 0xdd, 0xc3, 0x3f, 0x26, 0xb7, + 0x8f, 0xb8, 0x69, 0x37, 0x58, 0xa9, 0x4c, 0x06, 0x06, 0x51, 0x69, 0xf4, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0xff, 0x88, 0x17, 0xc1, 0xbe, 0x38, 0x1d, 0x00, 0x00, +} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go similarity index 97% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go index 4aedab51d3..a738820cc1 100644 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go +++ b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -3,14 +3,16 @@ package descriptor -import fmt "fmt" -import strings "strings" -import github_com_gogo_protobuf_proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import math "math" +import ( + fmt "fmt" + github_com_gogo_protobuf_proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + proto "gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto" + math "math" + reflect "reflect" + sort "sort" + strconv "strconv" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -358,7 +360,7 @@ func (this *FileOptions) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 23) + s := make([]string, 0, 25) s = append(s, "&descriptor.FileOptions{") if this.JavaPackage != nil { s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") @@ -414,6 +416,12 @@ func (this *FileOptions) GoString() string { if this.PhpNamespace != nil { s = append(s, "PhpNamespace: "+valueToGoStringDescriptor(this.PhpNamespace, "string")+",\n") } + if this.PhpMetadataNamespace != nil { + s = append(s, "PhpMetadataNamespace: "+valueToGoStringDescriptor(this.PhpMetadataNamespace, "string")+",\n") + } + if this.RubyPackage != nil { + s = append(s, "RubyPackage: "+valueToGoStringDescriptor(this.RubyPackage, "string")+",\n") + } if this.UninterpretedOption != nil { s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") } diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go b/vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go similarity index 100% rename from vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go rename to vendor/gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/protoc-gen-gogo/descriptor/helper.go diff --git a/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/.travis.yml b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/.travis.yml new file mode 100644 index 0000000000..62c49be25b --- /dev/null +++ b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/.travis.yml @@ -0,0 +1,21 @@ +os: + - linux + - osx + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/LICENSE b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/LICENSE rename to vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/LICENSE diff --git a/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/Makefile b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/Makefile new file mode 100644 index 0000000000..4f5206e4a2 --- /dev/null +++ b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/Makefile @@ -0,0 +1,13 @@ +export IPFS_API ?= v04x.ipfs.io + +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/README.md b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/README.md similarity index 100% rename from vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/README.md rename to vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/README.md diff --git a/vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/codecov.yml b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmdJfsSbKSZnMkfZ1kpopiyB9i3Hd6cp8VKWZmtWPa7Moc/go-libp2p-host/codecov.yml rename to vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/codecov.yml diff --git a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/ipfsaddr.go b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/ipfsaddr.go similarity index 91% rename from vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/ipfsaddr.go rename to vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/ipfsaddr.go index 8e6c1682e6..eb590d60e4 100644 --- a/vendor/gx/ipfs/QmZc5PLgxW61uTPG24TroxHDF6xzgbhZZQf5i53ciQC47Y/go-ipfs-addr/ipfsaddr.go +++ b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/ipfsaddr.go @@ -4,9 +4,9 @@ import ( "errors" "strings" - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" + ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" ) var log = logging.Logger("ipfsaddr") diff --git a/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/package.json b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/package.json new file mode 100644 index 0000000000..3b0615a3fe --- /dev/null +++ b/vendor/gx/ipfs/Qmdf1djucJ1jX5RMF1bDbFg5ybZnupmSAeETQQ3ZV7z6dU/go-ipfs-addr/package.json @@ -0,0 +1,35 @@ +{ + "author": "why", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-addr" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-addr" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + } + ], + "gxVersion": "0.11.0", + "language": "go", + "license": "", + "name": "go-ipfs-addr", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.33" +} + diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/.travis.yml b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/.travis.yml rename to vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/.travis.yml diff --git a/vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/LICENSE b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmUwXQs8aZ472DmXZ8uJNf7HJNKoMJQVa7RaCz7ujZ3ua9/go-mfs/LICENSE rename to vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/LICENSE diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/Makefile b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/Makefile similarity index 100% rename from vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/Makefile rename to vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/Makefile diff --git a/vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/README.md b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/README.md similarity index 100% rename from vendor/gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo/README.md rename to vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/README.md diff --git a/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/package.json b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/package.json new file mode 100644 index 0000000000..f1815f5825 --- /dev/null +++ b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/package.json @@ -0,0 +1,24 @@ +{ + "author": "hector", + "bugs": { + "url": "https://github.com/ipfs/go-ipfs-posinfo" + }, + "gx": { + "dvcsimport": "github.com/ipfs/go-ipfs-posinfo" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy", + "name": "go-ipld-format", + "version": "0.8.1" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "MIT", + "name": "go-ipfs-posinfo", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.5" +} + diff --git a/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/posinfo.go b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/posinfo.go new file mode 100644 index 0000000000..902a2e3b70 --- /dev/null +++ b/vendor/gx/ipfs/QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7/go-ipfs-posinfo/posinfo.go @@ -0,0 +1,23 @@ +// Package posinfo wraps offset information used by ipfs filestore nodes +package posinfo + +import ( + "os" + + ipld "gx/ipfs/QmZ6nzCLwGLVfRzYLpD7pW6UNuBDKEcA2imJtVpbEx2rxy/go-ipld-format" +) + +// PosInfo stores information about the file offset, its path and +// stat. +type PosInfo struct { + Offset uint64 + FullPath string + Stat os.FileInfo // can be nil +} + +// FilestoreNode is an ipld.Node which arries PosInfo with it +// allowing to map it directly to a filesystem object. +type FilestoreNode struct { + ipld.Node + PosInfo *PosInfo +} diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/.travis.yml b/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/.travis.yml deleted file mode 100644 index 83a2521106..0000000000 --- a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -os: - - linux - - osx - -language: go -sudo: false - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/key.go b/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/key.go deleted file mode 100644 index 6b009f7763..0000000000 --- a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/key.go +++ /dev/null @@ -1,178 +0,0 @@ -package testutil - -import ( - "bytes" - "crypto/rand" - "io" - "testing" - - ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - pb "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto/pb" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - testutil "gx/ipfs/Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L/go-testutil" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" -) - -var log = logging.Logger("boguskey") - -// TestBogusPrivateKey is a key used for testing (to avoid expensive keygen) -type TestBogusPrivateKey []byte - -// TestBogusPublicKey is a key used for testing (to avoid expensive keygen) -type TestBogusPublicKey []byte - -func (pk TestBogusPublicKey) Verify(data, sig []byte) (bool, error) { - log.Errorf("TestBogusPublicKey.Verify -- this better be a test!") - return bytes.Equal(data, reverse(sig)), nil -} - -func (pk TestBogusPublicKey) Bytes() ([]byte, error) { - return []byte(pk), nil -} - -func (pk TestBogusPublicKey) Encrypt(b []byte) ([]byte, error) { - log.Errorf("TestBogusPublicKey.Encrypt -- this better be a test!") - return reverse(b), nil -} - -// Equals checks whether this key is equal to another -func (pk TestBogusPublicKey) Equals(k ic.Key) bool { - return ic.KeyEqual(pk, k) -} - -// Raw returns the raw bytes of the key (not wrapped in the -// libp2p-crypto protobuf). -func (pk TestBogusPublicKey) Raw() ([]byte, error) { - return pk, nil -} - -// Type returns the protobof key type. -func (pk TestBogusPublicKey) Type() pb.KeyType { - return pb.KeyType_RSA -} - -func (sk TestBogusPrivateKey) GenSecret() []byte { - return []byte(sk) -} - -func (sk TestBogusPrivateKey) Sign(message []byte) ([]byte, error) { - log.Errorf("TestBogusPrivateKey.Sign -- this better be a test!") - return reverse(message), nil -} - -func (sk TestBogusPrivateKey) GetPublic() ic.PubKey { - return TestBogusPublicKey(sk) -} - -func (sk TestBogusPrivateKey) Decrypt(b []byte) ([]byte, error) { - log.Errorf("TestBogusPrivateKey.Decrypt -- this better be a test!") - return reverse(b), nil -} - -func (sk TestBogusPrivateKey) Bytes() ([]byte, error) { - return []byte(sk), nil -} - -// Equals checks whether this key is equal to another -func (sk TestBogusPrivateKey) Equals(k ic.Key) bool { - return ic.KeyEqual(sk, k) -} - -// Raw returns the raw bytes of the key (not wrapped in the -// libp2p-crypto protobuf). -func (sk TestBogusPrivateKey) Raw() ([]byte, error) { - return sk, nil -} - -// Type returns the protobof key type. -func (pk TestBogusPrivateKey) Type() pb.KeyType { - return pb.KeyType_RSA -} - -func RandTestBogusPrivateKey() (TestBogusPrivateKey, error) { - k := make([]byte, 5) - if _, err := io.ReadFull(rand.Reader, k); err != nil { - return nil, err - } - return TestBogusPrivateKey(k), nil -} - -func RandTestBogusPublicKey() (TestBogusPublicKey, error) { - k, err := RandTestBogusPrivateKey() - return TestBogusPublicKey(k), err -} - -func RandTestBogusPrivateKeyOrFatal(t *testing.T) TestBogusPrivateKey { - k, err := RandTestBogusPrivateKey() - if err != nil { - t.Fatal(err) - } - return k -} - -func RandTestBogusPublicKeyOrFatal(t *testing.T) TestBogusPublicKey { - k, err := RandTestBogusPublicKey() - if err != nil { - t.Fatal(err) - } - return k -} - -func RandTestBogusIdentity() (testutil.Identity, error) { - k, err := RandTestBogusPrivateKey() - if err != nil { - return nil, err - } - - id, err := peer.IDFromPrivateKey(k) - if err != nil { - return nil, err - } - - return &identity{ - k: k, - id: id, - a: testutil.RandLocalTCPAddress(), - }, nil -} - -func RandTestBogusIdentityOrFatal(t *testing.T) testutil.Identity { - k, err := RandTestBogusIdentity() - if err != nil { - t.Fatal(err) - } - return k -} - -// identity is a temporary shim to delay binding of PeerNetParams. -type identity struct { - k TestBogusPrivateKey - id peer.ID - a ma.Multiaddr -} - -func (p *identity) ID() peer.ID { - return p.id -} - -func (p *identity) Address() ma.Multiaddr { - return p.a -} - -func (p *identity) PrivateKey() ic.PrivKey { - return p.k -} - -func (p *identity) PublicKey() ic.PubKey { - return p.k.GetPublic() -} - -func reverse(a []byte) []byte { - b := make([]byte, len(a)) - for i := 0; i < len(a); i++ { - b[i] = a[len(a)-1-i] - } - return b -} diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/package.json b/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/package.json deleted file mode 100644 index 15408b7ce9..0000000000 --- a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-netutil" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-netutil" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n", - "name": "go-libp2p-crypto", - "version": "2.0.1" - }, - { - "author": "whyrusleeping", - "hash": "QmTTJcDL3gsnGDALjh2fDGg1onGRUdVgNL2hU2WEZcVrMX", - "name": "go-libp2p-peerstore", - "version": "2.0.6" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "Qma6ESRQTf1ZLPgzpCwDTqQJefPnU6uLvMjP18vK8EWp8L", - "name": "go-testutil", - "version": "1.2.10" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "", - "name": "go-libp2p-netutil", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.4.12" -} - diff --git a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/package.json b/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/package.json deleted file mode 100644 index 9ee4c260fa..0000000000 --- a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/whyrusleeping/go-smux-yamux" - }, - "gx": { - "dvcsimport": "github.com/whyrusleeping/go-smux-yamux" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmUNMbRUsVYHi1D14annF7Rr7pQAX7TNLwpRCa975ojKnw", - "name": "yamux", - "version": "1.1.5" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - } - ], - "gxVersion": "0.7.0", - "language": "go", - "license": "", - "name": "go-smux-yamux", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.0.8" -} - diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/LICENSE b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/LICENSE deleted file mode 100644 index 1992900d2e..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2015-2016 The Lightning Network Developers -Copyright (c) 2016-2017 The OpenBazaar Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/README.md b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/README.md deleted file mode 100644 index e84226a735..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# go-colorable - -Colorable writer for windows. - -For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) -This package is possible to handle escape sequence for ansi color on windows. - -## Too Bad! - -![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) - - -## So Good! - -![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) - -## Usage - -```go -logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) -logrus.SetOutput(colorable.NewColorableStdout()) - -logrus.Info("succeeded") -logrus.Warn("not correct") -logrus.Error("something error") -logrus.Fatal("panic") -``` - -You can compile above code on non-windows OSs. - -## Installation - -``` -$ go get github.com/mattn/go-colorable -``` - -# License - -MIT - -# Author - -Yasuhiro Matsumoto (a.k.a mattn) diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/_example/main.go b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/_example/main.go deleted file mode 100644 index 09c4a438f6..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/_example/main.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "github.com/Sirupsen/logrus" - "gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable" -) - -func main() { - logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) - logrus.SetOutput(colorable.NewColorableStdout()) - - logrus.Info("succeeded") - logrus.Warn("not correct") - logrus.Error("something error") - logrus.Fatal("panic") -} diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_others.go b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_others.go deleted file mode 100644 index 52d6653b34..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_others.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build !windows - -package colorable - -import ( - "io" - "os" -) - -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - return file -} - -func NewColorableStdout() io.Writer { - return os.Stdout -} - -func NewColorableStderr() io.Writer { - return os.Stderr -} diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_windows.go b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_windows.go deleted file mode 100644 index 0ba1e49651..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/colorable_windows.go +++ /dev/null @@ -1,809 +0,0 @@ -package colorable - -import ( - "bytes" - "fmt" - "io" - "math" - "os" - "strconv" - "strings" - "syscall" - "unsafe" - - "github.com/mattn/go-isatty" -) - -const ( - foregroundBlue = 0x1 - foregroundGreen = 0x2 - foregroundRed = 0x4 - foregroundIntensity = 0x8 - foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) - backgroundBlue = 0x10 - backgroundGreen = 0x20 - backgroundRed = 0x40 - backgroundIntensity = 0x80 - backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) -) - -type wchar uint16 -type short int16 -type dword uint32 -type word uint16 - -type coord struct { - x short - y short -} - -type smallRect struct { - left short - top short - right short - bottom short -} - -type consoleScreenBufferInfo struct { - size coord - cursorPosition coord - attributes word - window smallRect - maximumWindowSize coord -} - -type consoleCursorInfo struct { - size dword - visible int32 -} - -var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") - procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") - procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") - procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") - procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") - procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") - procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") - procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") -) - -type Writer struct { - out io.Writer - handle syscall.Handle - lastbuf bytes.Buffer - oldattr word -} - -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - if isatty.IsTerminal(file.Fd()) { - var csbi consoleScreenBufferInfo - handle := syscall.Handle(file.Fd()) - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - return &Writer{out: file, handle: handle, oldattr: csbi.attributes} - } else { - return file - } -} - -func NewColorableStdout() io.Writer { - return NewColorable(os.Stdout) -} - -func NewColorableStderr() io.Writer { - return NewColorable(os.Stderr) -} - -var color256 = map[int]int{ - 0: 0x000000, - 1: 0x800000, - 2: 0x008000, - 3: 0x808000, - 4: 0x000080, - 5: 0x800080, - 6: 0x008080, - 7: 0xc0c0c0, - 8: 0x808080, - 9: 0xff0000, - 10: 0x00ff00, - 11: 0xffff00, - 12: 0x0000ff, - 13: 0xff00ff, - 14: 0x00ffff, - 15: 0xffffff, - 16: 0x000000, - 17: 0x00005f, - 18: 0x000087, - 19: 0x0000af, - 20: 0x0000d7, - 21: 0x0000ff, - 22: 0x005f00, - 23: 0x005f5f, - 24: 0x005f87, - 25: 0x005faf, - 26: 0x005fd7, - 27: 0x005fff, - 28: 0x008700, - 29: 0x00875f, - 30: 0x008787, - 31: 0x0087af, - 32: 0x0087d7, - 33: 0x0087ff, - 34: 0x00af00, - 35: 0x00af5f, - 36: 0x00af87, - 37: 0x00afaf, - 38: 0x00afd7, - 39: 0x00afff, - 40: 0x00d700, - 41: 0x00d75f, - 42: 0x00d787, - 43: 0x00d7af, - 44: 0x00d7d7, - 45: 0x00d7ff, - 46: 0x00ff00, - 47: 0x00ff5f, - 48: 0x00ff87, - 49: 0x00ffaf, - 50: 0x00ffd7, - 51: 0x00ffff, - 52: 0x5f0000, - 53: 0x5f005f, - 54: 0x5f0087, - 55: 0x5f00af, - 56: 0x5f00d7, - 57: 0x5f00ff, - 58: 0x5f5f00, - 59: 0x5f5f5f, - 60: 0x5f5f87, - 61: 0x5f5faf, - 62: 0x5f5fd7, - 63: 0x5f5fff, - 64: 0x5f8700, - 65: 0x5f875f, - 66: 0x5f8787, - 67: 0x5f87af, - 68: 0x5f87d7, - 69: 0x5f87ff, - 70: 0x5faf00, - 71: 0x5faf5f, - 72: 0x5faf87, - 73: 0x5fafaf, - 74: 0x5fafd7, - 75: 0x5fafff, - 76: 0x5fd700, - 77: 0x5fd75f, - 78: 0x5fd787, - 79: 0x5fd7af, - 80: 0x5fd7d7, - 81: 0x5fd7ff, - 82: 0x5fff00, - 83: 0x5fff5f, - 84: 0x5fff87, - 85: 0x5fffaf, - 86: 0x5fffd7, - 87: 0x5fffff, - 88: 0x870000, - 89: 0x87005f, - 90: 0x870087, - 91: 0x8700af, - 92: 0x8700d7, - 93: 0x8700ff, - 94: 0x875f00, - 95: 0x875f5f, - 96: 0x875f87, - 97: 0x875faf, - 98: 0x875fd7, - 99: 0x875fff, - 100: 0x878700, - 101: 0x87875f, - 102: 0x878787, - 103: 0x8787af, - 104: 0x8787d7, - 105: 0x8787ff, - 106: 0x87af00, - 107: 0x87af5f, - 108: 0x87af87, - 109: 0x87afaf, - 110: 0x87afd7, - 111: 0x87afff, - 112: 0x87d700, - 113: 0x87d75f, - 114: 0x87d787, - 115: 0x87d7af, - 116: 0x87d7d7, - 117: 0x87d7ff, - 118: 0x87ff00, - 119: 0x87ff5f, - 120: 0x87ff87, - 121: 0x87ffaf, - 122: 0x87ffd7, - 123: 0x87ffff, - 124: 0xaf0000, - 125: 0xaf005f, - 126: 0xaf0087, - 127: 0xaf00af, - 128: 0xaf00d7, - 129: 0xaf00ff, - 130: 0xaf5f00, - 131: 0xaf5f5f, - 132: 0xaf5f87, - 133: 0xaf5faf, - 134: 0xaf5fd7, - 135: 0xaf5fff, - 136: 0xaf8700, - 137: 0xaf875f, - 138: 0xaf8787, - 139: 0xaf87af, - 140: 0xaf87d7, - 141: 0xaf87ff, - 142: 0xafaf00, - 143: 0xafaf5f, - 144: 0xafaf87, - 145: 0xafafaf, - 146: 0xafafd7, - 147: 0xafafff, - 148: 0xafd700, - 149: 0xafd75f, - 150: 0xafd787, - 151: 0xafd7af, - 152: 0xafd7d7, - 153: 0xafd7ff, - 154: 0xafff00, - 155: 0xafff5f, - 156: 0xafff87, - 157: 0xafffaf, - 158: 0xafffd7, - 159: 0xafffff, - 160: 0xd70000, - 161: 0xd7005f, - 162: 0xd70087, - 163: 0xd700af, - 164: 0xd700d7, - 165: 0xd700ff, - 166: 0xd75f00, - 167: 0xd75f5f, - 168: 0xd75f87, - 169: 0xd75faf, - 170: 0xd75fd7, - 171: 0xd75fff, - 172: 0xd78700, - 173: 0xd7875f, - 174: 0xd78787, - 175: 0xd787af, - 176: 0xd787d7, - 177: 0xd787ff, - 178: 0xd7af00, - 179: 0xd7af5f, - 180: 0xd7af87, - 181: 0xd7afaf, - 182: 0xd7afd7, - 183: 0xd7afff, - 184: 0xd7d700, - 185: 0xd7d75f, - 186: 0xd7d787, - 187: 0xd7d7af, - 188: 0xd7d7d7, - 189: 0xd7d7ff, - 190: 0xd7ff00, - 191: 0xd7ff5f, - 192: 0xd7ff87, - 193: 0xd7ffaf, - 194: 0xd7ffd7, - 195: 0xd7ffff, - 196: 0xff0000, - 197: 0xff005f, - 198: 0xff0087, - 199: 0xff00af, - 200: 0xff00d7, - 201: 0xff00ff, - 202: 0xff5f00, - 203: 0xff5f5f, - 204: 0xff5f87, - 205: 0xff5faf, - 206: 0xff5fd7, - 207: 0xff5fff, - 208: 0xff8700, - 209: 0xff875f, - 210: 0xff8787, - 211: 0xff87af, - 212: 0xff87d7, - 213: 0xff87ff, - 214: 0xffaf00, - 215: 0xffaf5f, - 216: 0xffaf87, - 217: 0xffafaf, - 218: 0xffafd7, - 219: 0xffafff, - 220: 0xffd700, - 221: 0xffd75f, - 222: 0xffd787, - 223: 0xffd7af, - 224: 0xffd7d7, - 225: 0xffd7ff, - 226: 0xffff00, - 227: 0xffff5f, - 228: 0xffff87, - 229: 0xffffaf, - 230: 0xffffd7, - 231: 0xffffff, - 232: 0x080808, - 233: 0x121212, - 234: 0x1c1c1c, - 235: 0x262626, - 236: 0x303030, - 237: 0x3a3a3a, - 238: 0x444444, - 239: 0x4e4e4e, - 240: 0x585858, - 241: 0x626262, - 242: 0x6c6c6c, - 243: 0x767676, - 244: 0x808080, - 245: 0x8a8a8a, - 246: 0x949494, - 247: 0x9e9e9e, - 248: 0xa8a8a8, - 249: 0xb2b2b2, - 250: 0xbcbcbc, - 251: 0xc6c6c6, - 252: 0xd0d0d0, - 253: 0xdadada, - 254: 0xe4e4e4, - 255: 0xeeeeee, -} - -func (w *Writer) Write(data []byte) (n int, err error) { - var csbi consoleScreenBufferInfo - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - - er := bytes.NewBuffer(data) -loop: - for { - r1, _, err := procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - if r1 == 0 { - break loop - } - - c1, _, err := er.ReadRune() - if err != nil { - break loop - } - if c1 != 0x1b { - fmt.Fprint(w.out, string(c1)) - continue - } - c2, _, err := er.ReadRune() - if err != nil { - w.lastbuf.WriteRune(c1) - break loop - } - if c2 != 0x5b { - w.lastbuf.WriteRune(c1) - w.lastbuf.WriteRune(c2) - continue - } - - var buf bytes.Buffer - var m rune - for { - c, _, err := er.ReadRune() - if err != nil { - w.lastbuf.WriteRune(c1) - w.lastbuf.WriteRune(c2) - w.lastbuf.Write(buf.Bytes()) - break loop - } - if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { - m = c - break - } - buf.Write([]byte(string(c))) - } - - var csbi consoleScreenBufferInfo - switch m { - case 'A': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.y -= short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'B': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.y += short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'C': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x -= short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'D': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - if n, err = strconv.Atoi(buf.String()); err == nil { - var csbi consoleScreenBufferInfo - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x += short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - } - case 'E': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = 0 - csbi.cursorPosition.y += short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'F': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = 0 - csbi.cursorPosition.y -= short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'G': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = short(n) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'H': - token := strings.Split(buf.String(), ";") - if len(token) != 2 { - continue - } - n1, err := strconv.Atoi(token[0]) - if err != nil { - continue - } - n2, err := strconv.Atoi(token[1]) - if err != nil { - continue - } - csbi.cursorPosition.x = short(n2) - csbi.cursorPosition.y = short(n1) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'J': - n, err := strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - var cursor coord - switch n { - case 0: - cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} - case 1: - cursor = coord{x: csbi.window.left, y: csbi.window.top} - case 2: - cursor = coord{x: csbi.window.left, y: csbi.window.top} - } - var count, written dword - count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x) - procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - case 'K': - n, err := strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - var cursor coord - switch n { - case 0: - cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} - case 1: - cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} - case 2: - cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} - } - var count, written dword - count = dword(csbi.size.x - csbi.cursorPosition.x) - procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - case 'm': - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - attr := csbi.attributes - cs := buf.String() - if cs == "" { - procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(w.oldattr)) - continue - } - token := strings.Split(cs, ";") - for i := 0; i < len(token); i += 1 { - ns := token[i] - if n, err = strconv.Atoi(ns); err == nil { - switch { - case n == 0 || n == 100: - attr = w.oldattr - case 1 <= n && n <= 5: - attr |= foregroundIntensity - case n == 7: - attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) - case 22 == n || n == 25 || n == 25: - attr |= foregroundIntensity - case n == 27: - attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) - case 30 <= n && n <= 37: - attr = (attr & backgroundMask) | (attr & foregroundIntensity) - if (n-30)&1 != 0 { - attr |= foregroundRed - } - if (n-30)&2 != 0 { - attr |= foregroundGreen - } - if (n-30)&4 != 0 { - attr |= foregroundBlue - } - case n == 38: // set foreground color. - if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { - if n256, err := strconv.Atoi(token[i+2]); err == nil { - if n256foreAttr == nil { - n256setup() - } - attr &= backgroundMask - attr |= n256foreAttr[n256] - i += 2 - } - } else { - attr = attr & (w.oldattr & backgroundMask) - } - case n == 39: // reset foreground color. - attr &= backgroundMask - attr |= w.oldattr & foregroundMask - case 40 <= n && n <= 47: - attr = (attr & backgroundMask) | (attr & backgroundIntensity) - if (n-40)&1 != 0 { - attr |= backgroundRed - } - if (n-40)&2 != 0 { - attr |= backgroundGreen - } - if (n-40)&4 != 0 { - attr |= backgroundBlue - } - case n == 48: // set background color. - if i < len(token)-2 && token[i+1] == "5" { - if n256, err := strconv.Atoi(token[i+2]); err == nil { - if n256backAttr == nil { - n256setup() - } - attr &= foregroundMask - attr |= n256backAttr[n256] - i += 2 - } - } else { - attr = attr & (w.oldattr & foregroundMask) - } - case n == 49: // reset foreground color. - attr &= foregroundMask - attr |= w.oldattr & backgroundMask - case 90 <= n && n <= 97: - attr = (attr & backgroundMask) - attr |= foregroundIntensity - if (n-90)&1 != 0 { - attr |= foregroundRed - } - if (n-90)&2 != 0 { - attr |= foregroundGreen - } - if (n-90)&4 != 0 { - attr |= foregroundBlue - } - case 100 <= n && n <= 107: - attr = (attr & foregroundMask) - attr |= backgroundIntensity - if (n-100)&1 != 0 { - attr |= backgroundRed - } - if (n-100)&2 != 0 { - attr |= backgroundGreen - } - if (n-100)&4 != 0 { - attr |= backgroundBlue - } - } - procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr)) - } - } - case 'h': - cs := buf.String() - if cs == "?25" { - var ci consoleCursorInfo - procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 0 - procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) - } - case 'l': - cs := buf.String() - if cs == "?25" { - var ci consoleCursorInfo - procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 1 - procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) - } - } - } - return len(data) - w.lastbuf.Len(), nil -} - -type consoleColor struct { - rgb int - red bool - green bool - blue bool - intensity bool -} - -func (c consoleColor) foregroundAttr() (attr word) { - if c.red { - attr |= foregroundRed - } - if c.green { - attr |= foregroundGreen - } - if c.blue { - attr |= foregroundBlue - } - if c.intensity { - attr |= foregroundIntensity - } - return -} - -func (c consoleColor) backgroundAttr() (attr word) { - if c.red { - attr |= backgroundRed - } - if c.green { - attr |= backgroundGreen - } - if c.blue { - attr |= backgroundBlue - } - if c.intensity { - attr |= backgroundIntensity - } - return -} - -var color16 = []consoleColor{ - consoleColor{0x000000, false, false, false, false}, - consoleColor{0x000080, false, false, true, false}, - consoleColor{0x008000, false, true, false, false}, - consoleColor{0x008080, false, true, true, false}, - consoleColor{0x800000, true, false, false, false}, - consoleColor{0x800080, true, false, true, false}, - consoleColor{0x808000, true, true, false, false}, - consoleColor{0xc0c0c0, true, true, true, false}, - consoleColor{0x808080, false, false, false, true}, - consoleColor{0x0000ff, false, false, true, true}, - consoleColor{0x00ff00, false, true, false, true}, - consoleColor{0x00ffff, false, true, true, true}, - consoleColor{0xff0000, true, false, false, true}, - consoleColor{0xff00ff, true, false, true, true}, - consoleColor{0xffff00, true, true, false, true}, - consoleColor{0xffffff, true, true, true, true}, -} - -type hsv struct { - h, s, v float32 -} - -func (a hsv) dist(b hsv) float32 { - dh := a.h - b.h - switch { - case dh > 0.5: - dh = 1 - dh - case dh < -0.5: - dh = -1 - dh - } - ds := a.s - b.s - dv := a.v - b.v - return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) -} - -func toHSV(rgb int) hsv { - r, g, b := float32((rgb&0xFF0000)>>16)/256.0, - float32((rgb&0x00FF00)>>8)/256.0, - float32(rgb&0x0000FF)/256.0 - min, max := minmax3f(r, g, b) - h := max - min - if h > 0 { - if max == r { - h = (g - b) / h - if h < 0 { - h += 6 - } - } else if max == g { - h = 2 + (b-r)/h - } else { - h = 4 + (r-g)/h - } - } - h /= 6.0 - s := max - min - if max != 0 { - s /= max - } - v := max - return hsv{h: h, s: s, v: v} -} - -type hsvTable []hsv - -func toHSVTable(rgbTable []consoleColor) hsvTable { - t := make(hsvTable, len(rgbTable)) - for i, c := range rgbTable { - t[i] = toHSV(c.rgb) - } - return t -} - -func (t hsvTable) find(rgb int) consoleColor { - hsv := toHSV(rgb) - n := 7 - l := float32(5.0) - for i, p := range t { - d := hsv.dist(p) - if d < l { - l, n = d, i - } - } - return color16[n] -} - -func minmax3f(a, b, c float32) (min, max float32) { - if a < b { - if b < c { - return a, c - } else if a < c { - return a, b - } else { - return c, b - } - } else { - if a < c { - return b, c - } else if b < c { - return b, a - } else { - return c, a - } - } -} - -var n256foreAttr []word -var n256backAttr []word - -func n256setup() { - n256foreAttr = make([]word, 256) - n256backAttr = make([]word, 256) - t := toHSVTable(color16) - for i, rgb := range color256 { - c := t.find(rgb) - n256foreAttr[i] = c.foregroundAttr() - n256backAttr[i] = c.backgroundAttr() - } -} diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/noncolorable.go b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/noncolorable.go deleted file mode 100644 index fb976dbd8b..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/noncolorable.go +++ /dev/null @@ -1,57 +0,0 @@ -package colorable - -import ( - "bytes" - "fmt" - "io" -) - -type NonColorable struct { - out io.Writer - lastbuf bytes.Buffer -} - -func NewNonColorable(w io.Writer) io.Writer { - return &NonColorable{out: w} -} - -func (w *NonColorable) Write(data []byte) (n int, err error) { - er := bytes.NewBuffer(data) -loop: - for { - c1, _, err := er.ReadRune() - if err != nil { - break loop - } - if c1 != 0x1b { - fmt.Fprint(w.out, string(c1)) - continue - } - c2, _, err := er.ReadRune() - if err != nil { - w.lastbuf.WriteRune(c1) - break loop - } - if c2 != 0x5b { - w.lastbuf.WriteRune(c1) - w.lastbuf.WriteRune(c2) - continue - } - - var buf bytes.Buffer - for { - c, _, err := er.ReadRune() - if err != nil { - w.lastbuf.WriteRune(c1) - w.lastbuf.WriteRune(c2) - w.lastbuf.Write(buf.Bytes()) - break loop - } - if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { - break - } - buf.Write([]byte(string(c))) - } - } - return len(data) - w.lastbuf.Len(), nil -} diff --git a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/package.json b/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/package.json deleted file mode 100644 index 2a1fd78c68..0000000000 --- a/vendor/gx/ipfs/QmdvecVcFhbo5x4f3arqmfxyE3NzqwWyp77KzA68EKXJeX/go-colorable/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "author": "mattn", - "bugs": { - "url": "https://github.com/mattn/go-colorable/issues" - }, - "gx": { - "dvcsimport": "github.com/mattn/go-colorable" - }, - "gxVersion": "0.7.0", - "language": "go", - "license": "MIT", - "name": "go-colorable", - "version": "0.0.4" -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/doc.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/doc.go deleted file mode 100644 index 147b5ecc62..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/doc.go +++ /dev/null @@ -1,169 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package gogoproto provides extensions for protocol buffers to achieve: - - - fast marshalling and unmarshalling. - - peace of mind by optionally generating test and benchmark code. - - more canonical Go structures. - - less typing by optionally generating extra helper code. - - goprotobuf compatibility - -More Canonical Go Structures - -A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. -You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. -Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. - - - nullable, if false, a field is generated without a pointer (see warning below). - - embed, if true, the field is generated as an embedded field. - - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 - - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. - - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. - - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - -Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -for a quicker overview. - -The following message: - - package test; - - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -Will generate a go struct which looks a lot like this: - - type A struct { - Description string - Number int64 - Id github_com_gogo_protobuf_test_custom.Uuid - } - -You will see there are no pointers, since all fields are non-nullable. -You will also see a custom type which marshals to a string. -Be warned it is your responsibility to test your custom types thoroughly. -You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. - -Next we will embed the message A in message B. - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -See below that A is embedded in B. - - type B struct { - A - G []github_com_gogo_protobuf_test_custom.Uint128 - } - -Also see the repeated custom type. - - type Uint128 [2]uint64 - -Next we will create a custom name for one of our fields. - - message C { - optional int64 size = 1 [(gogoproto.customname) = "MySize"]; - } - -See below that the field's name is MySize and not Size. - - type C struct { - MySize *int64 - } - -The is useful when having a protocol buffer message with a field name which conflicts with a generated method. -As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. -Using customname you can fix this error without changing the field name. -This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. - -Gogoprotobuf also has some more subtle changes, these could be changed back: - - - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. - -Gogoprotobuf also has lost some features which should be brought back with time: - - - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go - -Why does nullable break protocol buffer specifications: - -The protocol buffer specification states, somewhere, that you should be able to tell whether a -field is set or unset. With the option nullable=false this feature is lost, -since your non-nullable fields will always be set. It can be seen as a layer on top of -protocol buffers, where before and after marshalling all non-nullable fields are set -and they cannot be unset. - -Goprotobuf Compatibility: - -Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. -Gogoprotobuf generates the same code as goprotobuf if no extensions are used. -The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: - - - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. - - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix - - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. - - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face - - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. - - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension - - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. - - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). - -Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - - github.com/gogo/protobuf/plugin/ - -If you do not use any of these extension the code that is generated -will be the same as if goprotobuf has generated it. - -The most complete way to see examples is to look at - - github.com/gogo/protobuf/test/thetest.proto - -Gogoprototest is a seperate project, -because we want to keep gogoprotobuf independant of goprotobuf, -but we still want to test it thoroughly. - -*/ -package gogoproto diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.go deleted file mode 100644 index 80ff9b4a1e..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.go +++ /dev/null @@ -1,817 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gogo.proto - -package gogoproto - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" -import descriptor "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62001, - Name: "gogoproto.goproto_enum_prefix", - Tag: "varint,62001,opt,name=goproto_enum_prefix,json=goprotoEnumPrefix", - Filename: "gogo.proto", -} - -var E_GoprotoEnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62021, - Name: "gogoproto.goproto_enum_stringer", - Tag: "varint,62021,opt,name=goproto_enum_stringer,json=goprotoEnumStringer", - Filename: "gogo.proto", -} - -var E_EnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62022, - Name: "gogoproto.enum_stringer", - Tag: "varint,62022,opt,name=enum_stringer,json=enumStringer", - Filename: "gogo.proto", -} - -var E_EnumCustomname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*string)(nil), - Field: 62023, - Name: "gogoproto.enum_customname", - Tag: "bytes,62023,opt,name=enum_customname,json=enumCustomname", - Filename: "gogo.proto", -} - -var E_Enumdecl = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62024, - Name: "gogoproto.enumdecl", - Tag: "varint,62024,opt,name=enumdecl", - Filename: "gogo.proto", -} - -var E_EnumvalueCustomname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumValueOptions)(nil), - ExtensionType: (*string)(nil), - Field: 66001, - Name: "gogoproto.enumvalue_customname", - Tag: "bytes,66001,opt,name=enumvalue_customname,json=enumvalueCustomname", - Filename: "gogo.proto", -} - -var E_GoprotoGettersAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63001, - Name: "gogoproto.goproto_getters_all", - Tag: "varint,63001,opt,name=goproto_getters_all,json=goprotoGettersAll", - Filename: "gogo.proto", -} - -var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63002, - Name: "gogoproto.goproto_enum_prefix_all", - Tag: "varint,63002,opt,name=goproto_enum_prefix_all,json=goprotoEnumPrefixAll", - Filename: "gogo.proto", -} - -var E_GoprotoStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63003, - Name: "gogoproto.goproto_stringer_all", - Tag: "varint,63003,opt,name=goproto_stringer_all,json=goprotoStringerAll", - Filename: "gogo.proto", -} - -var E_VerboseEqualAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63004, - Name: "gogoproto.verbose_equal_all", - Tag: "varint,63004,opt,name=verbose_equal_all,json=verboseEqualAll", - Filename: "gogo.proto", -} - -var E_FaceAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63005, - Name: "gogoproto.face_all", - Tag: "varint,63005,opt,name=face_all,json=faceAll", - Filename: "gogo.proto", -} - -var E_GostringAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63006, - Name: "gogoproto.gostring_all", - Tag: "varint,63006,opt,name=gostring_all,json=gostringAll", - Filename: "gogo.proto", -} - -var E_PopulateAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63007, - Name: "gogoproto.populate_all", - Tag: "varint,63007,opt,name=populate_all,json=populateAll", - Filename: "gogo.proto", -} - -var E_StringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63008, - Name: "gogoproto.stringer_all", - Tag: "varint,63008,opt,name=stringer_all,json=stringerAll", - Filename: "gogo.proto", -} - -var E_OnlyoneAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63009, - Name: "gogoproto.onlyone_all", - Tag: "varint,63009,opt,name=onlyone_all,json=onlyoneAll", - Filename: "gogo.proto", -} - -var E_EqualAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63013, - Name: "gogoproto.equal_all", - Tag: "varint,63013,opt,name=equal_all,json=equalAll", - Filename: "gogo.proto", -} - -var E_DescriptionAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63014, - Name: "gogoproto.description_all", - Tag: "varint,63014,opt,name=description_all,json=descriptionAll", - Filename: "gogo.proto", -} - -var E_TestgenAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63015, - Name: "gogoproto.testgen_all", - Tag: "varint,63015,opt,name=testgen_all,json=testgenAll", - Filename: "gogo.proto", -} - -var E_BenchgenAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63016, - Name: "gogoproto.benchgen_all", - Tag: "varint,63016,opt,name=benchgen_all,json=benchgenAll", - Filename: "gogo.proto", -} - -var E_MarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63017, - Name: "gogoproto.marshaler_all", - Tag: "varint,63017,opt,name=marshaler_all,json=marshalerAll", - Filename: "gogo.proto", -} - -var E_UnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63018, - Name: "gogoproto.unmarshaler_all", - Tag: "varint,63018,opt,name=unmarshaler_all,json=unmarshalerAll", - Filename: "gogo.proto", -} - -var E_StableMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63019, - Name: "gogoproto.stable_marshaler_all", - Tag: "varint,63019,opt,name=stable_marshaler_all,json=stableMarshalerAll", - Filename: "gogo.proto", -} - -var E_SizerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63020, - Name: "gogoproto.sizer_all", - Tag: "varint,63020,opt,name=sizer_all,json=sizerAll", - Filename: "gogo.proto", -} - -var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63021, - Name: "gogoproto.goproto_enum_stringer_all", - Tag: "varint,63021,opt,name=goproto_enum_stringer_all,json=goprotoEnumStringerAll", - Filename: "gogo.proto", -} - -var E_EnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63022, - Name: "gogoproto.enum_stringer_all", - Tag: "varint,63022,opt,name=enum_stringer_all,json=enumStringerAll", - Filename: "gogo.proto", -} - -var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63023, - Name: "gogoproto.unsafe_marshaler_all", - Tag: "varint,63023,opt,name=unsafe_marshaler_all,json=unsafeMarshalerAll", - Filename: "gogo.proto", -} - -var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63024, - Name: "gogoproto.unsafe_unmarshaler_all", - Tag: "varint,63024,opt,name=unsafe_unmarshaler_all,json=unsafeUnmarshalerAll", - Filename: "gogo.proto", -} - -var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63025, - Name: "gogoproto.goproto_extensions_map_all", - Tag: "varint,63025,opt,name=goproto_extensions_map_all,json=goprotoExtensionsMapAll", - Filename: "gogo.proto", -} - -var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63026, - Name: "gogoproto.goproto_unrecognized_all", - Tag: "varint,63026,opt,name=goproto_unrecognized_all,json=goprotoUnrecognizedAll", - Filename: "gogo.proto", -} - -var E_GogoprotoImport = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63027, - Name: "gogoproto.gogoproto_import", - Tag: "varint,63027,opt,name=gogoproto_import,json=gogoprotoImport", - Filename: "gogo.proto", -} - -var E_ProtosizerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63028, - Name: "gogoproto.protosizer_all", - Tag: "varint,63028,opt,name=protosizer_all,json=protosizerAll", - Filename: "gogo.proto", -} - -var E_CompareAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63029, - Name: "gogoproto.compare_all", - Tag: "varint,63029,opt,name=compare_all,json=compareAll", - Filename: "gogo.proto", -} - -var E_TypedeclAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63030, - Name: "gogoproto.typedecl_all", - Tag: "varint,63030,opt,name=typedecl_all,json=typedeclAll", - Filename: "gogo.proto", -} - -var E_EnumdeclAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63031, - Name: "gogoproto.enumdecl_all", - Tag: "varint,63031,opt,name=enumdecl_all,json=enumdeclAll", - Filename: "gogo.proto", -} - -var E_GoprotoRegistration = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63032, - Name: "gogoproto.goproto_registration", - Tag: "varint,63032,opt,name=goproto_registration,json=goprotoRegistration", - Filename: "gogo.proto", -} - -var E_MessagenameAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63033, - Name: "gogoproto.messagename_all", - Tag: "varint,63033,opt,name=messagename_all,json=messagenameAll", - Filename: "gogo.proto", -} - -var E_GoprotoGetters = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64001, - Name: "gogoproto.goproto_getters", - Tag: "varint,64001,opt,name=goproto_getters,json=goprotoGetters", - Filename: "gogo.proto", -} - -var E_GoprotoStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64003, - Name: "gogoproto.goproto_stringer", - Tag: "varint,64003,opt,name=goproto_stringer,json=goprotoStringer", - Filename: "gogo.proto", -} - -var E_VerboseEqual = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64004, - Name: "gogoproto.verbose_equal", - Tag: "varint,64004,opt,name=verbose_equal,json=verboseEqual", - Filename: "gogo.proto", -} - -var E_Face = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64005, - Name: "gogoproto.face", - Tag: "varint,64005,opt,name=face", - Filename: "gogo.proto", -} - -var E_Gostring = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64006, - Name: "gogoproto.gostring", - Tag: "varint,64006,opt,name=gostring", - Filename: "gogo.proto", -} - -var E_Populate = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64007, - Name: "gogoproto.populate", - Tag: "varint,64007,opt,name=populate", - Filename: "gogo.proto", -} - -var E_Stringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 67008, - Name: "gogoproto.stringer", - Tag: "varint,67008,opt,name=stringer", - Filename: "gogo.proto", -} - -var E_Onlyone = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64009, - Name: "gogoproto.onlyone", - Tag: "varint,64009,opt,name=onlyone", - Filename: "gogo.proto", -} - -var E_Equal = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64013, - Name: "gogoproto.equal", - Tag: "varint,64013,opt,name=equal", - Filename: "gogo.proto", -} - -var E_Description = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64014, - Name: "gogoproto.description", - Tag: "varint,64014,opt,name=description", - Filename: "gogo.proto", -} - -var E_Testgen = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64015, - Name: "gogoproto.testgen", - Tag: "varint,64015,opt,name=testgen", - Filename: "gogo.proto", -} - -var E_Benchgen = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64016, - Name: "gogoproto.benchgen", - Tag: "varint,64016,opt,name=benchgen", - Filename: "gogo.proto", -} - -var E_Marshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64017, - Name: "gogoproto.marshaler", - Tag: "varint,64017,opt,name=marshaler", - Filename: "gogo.proto", -} - -var E_Unmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64018, - Name: "gogoproto.unmarshaler", - Tag: "varint,64018,opt,name=unmarshaler", - Filename: "gogo.proto", -} - -var E_StableMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64019, - Name: "gogoproto.stable_marshaler", - Tag: "varint,64019,opt,name=stable_marshaler,json=stableMarshaler", - Filename: "gogo.proto", -} - -var E_Sizer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64020, - Name: "gogoproto.sizer", - Tag: "varint,64020,opt,name=sizer", - Filename: "gogo.proto", -} - -var E_UnsafeMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64023, - Name: "gogoproto.unsafe_marshaler", - Tag: "varint,64023,opt,name=unsafe_marshaler,json=unsafeMarshaler", - Filename: "gogo.proto", -} - -var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64024, - Name: "gogoproto.unsafe_unmarshaler", - Tag: "varint,64024,opt,name=unsafe_unmarshaler,json=unsafeUnmarshaler", - Filename: "gogo.proto", -} - -var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64025, - Name: "gogoproto.goproto_extensions_map", - Tag: "varint,64025,opt,name=goproto_extensions_map,json=goprotoExtensionsMap", - Filename: "gogo.proto", -} - -var E_GoprotoUnrecognized = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64026, - Name: "gogoproto.goproto_unrecognized", - Tag: "varint,64026,opt,name=goproto_unrecognized,json=goprotoUnrecognized", - Filename: "gogo.proto", -} - -var E_Protosizer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64028, - Name: "gogoproto.protosizer", - Tag: "varint,64028,opt,name=protosizer", - Filename: "gogo.proto", -} - -var E_Compare = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64029, - Name: "gogoproto.compare", - Tag: "varint,64029,opt,name=compare", - Filename: "gogo.proto", -} - -var E_Typedecl = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64030, - Name: "gogoproto.typedecl", - Tag: "varint,64030,opt,name=typedecl", - Filename: "gogo.proto", -} - -var E_Messagename = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64033, - Name: "gogoproto.messagename", - Tag: "varint,64033,opt,name=messagename", - Filename: "gogo.proto", -} - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65001, - Name: "gogoproto.nullable", - Tag: "varint,65001,opt,name=nullable", - Filename: "gogo.proto", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65002, - Name: "gogoproto.embed", - Tag: "varint,65002,opt,name=embed", - Filename: "gogo.proto", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65003, - Name: "gogoproto.customtype", - Tag: "bytes,65003,opt,name=customtype", - Filename: "gogo.proto", -} - -var E_Customname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65004, - Name: "gogoproto.customname", - Tag: "bytes,65004,opt,name=customname", - Filename: "gogo.proto", -} - -var E_Jsontag = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65005, - Name: "gogoproto.jsontag", - Tag: "bytes,65005,opt,name=jsontag", - Filename: "gogo.proto", -} - -var E_Moretags = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65006, - Name: "gogoproto.moretags", - Tag: "bytes,65006,opt,name=moretags", - Filename: "gogo.proto", -} - -var E_Casttype = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65007, - Name: "gogoproto.casttype", - Tag: "bytes,65007,opt,name=casttype", - Filename: "gogo.proto", -} - -var E_Castkey = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65008, - Name: "gogoproto.castkey", - Tag: "bytes,65008,opt,name=castkey", - Filename: "gogo.proto", -} - -var E_Castvalue = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65009, - Name: "gogoproto.castvalue", - Tag: "bytes,65009,opt,name=castvalue", - Filename: "gogo.proto", -} - -var E_Stdtime = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65010, - Name: "gogoproto.stdtime", - Tag: "varint,65010,opt,name=stdtime", - Filename: "gogo.proto", -} - -var E_Stdduration = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65011, - Name: "gogoproto.stdduration", - Tag: "varint,65011,opt,name=stdduration", - Filename: "gogo.proto", -} - -func init() { - proto.RegisterExtension(E_GoprotoEnumPrefix) - proto.RegisterExtension(E_GoprotoEnumStringer) - proto.RegisterExtension(E_EnumStringer) - proto.RegisterExtension(E_EnumCustomname) - proto.RegisterExtension(E_Enumdecl) - proto.RegisterExtension(E_EnumvalueCustomname) - proto.RegisterExtension(E_GoprotoGettersAll) - proto.RegisterExtension(E_GoprotoEnumPrefixAll) - proto.RegisterExtension(E_GoprotoStringerAll) - proto.RegisterExtension(E_VerboseEqualAll) - proto.RegisterExtension(E_FaceAll) - proto.RegisterExtension(E_GostringAll) - proto.RegisterExtension(E_PopulateAll) - proto.RegisterExtension(E_StringerAll) - proto.RegisterExtension(E_OnlyoneAll) - proto.RegisterExtension(E_EqualAll) - proto.RegisterExtension(E_DescriptionAll) - proto.RegisterExtension(E_TestgenAll) - proto.RegisterExtension(E_BenchgenAll) - proto.RegisterExtension(E_MarshalerAll) - proto.RegisterExtension(E_UnmarshalerAll) - proto.RegisterExtension(E_StableMarshalerAll) - proto.RegisterExtension(E_SizerAll) - proto.RegisterExtension(E_GoprotoEnumStringerAll) - proto.RegisterExtension(E_EnumStringerAll) - proto.RegisterExtension(E_UnsafeMarshalerAll) - proto.RegisterExtension(E_UnsafeUnmarshalerAll) - proto.RegisterExtension(E_GoprotoExtensionsMapAll) - proto.RegisterExtension(E_GoprotoUnrecognizedAll) - proto.RegisterExtension(E_GogoprotoImport) - proto.RegisterExtension(E_ProtosizerAll) - proto.RegisterExtension(E_CompareAll) - proto.RegisterExtension(E_TypedeclAll) - proto.RegisterExtension(E_EnumdeclAll) - proto.RegisterExtension(E_GoprotoRegistration) - proto.RegisterExtension(E_MessagenameAll) - proto.RegisterExtension(E_GoprotoGetters) - proto.RegisterExtension(E_GoprotoStringer) - proto.RegisterExtension(E_VerboseEqual) - proto.RegisterExtension(E_Face) - proto.RegisterExtension(E_Gostring) - proto.RegisterExtension(E_Populate) - proto.RegisterExtension(E_Stringer) - proto.RegisterExtension(E_Onlyone) - proto.RegisterExtension(E_Equal) - proto.RegisterExtension(E_Description) - proto.RegisterExtension(E_Testgen) - proto.RegisterExtension(E_Benchgen) - proto.RegisterExtension(E_Marshaler) - proto.RegisterExtension(E_Unmarshaler) - proto.RegisterExtension(E_StableMarshaler) - proto.RegisterExtension(E_Sizer) - proto.RegisterExtension(E_UnsafeMarshaler) - proto.RegisterExtension(E_UnsafeUnmarshaler) - proto.RegisterExtension(E_GoprotoExtensionsMap) - proto.RegisterExtension(E_GoprotoUnrecognized) - proto.RegisterExtension(E_Protosizer) - proto.RegisterExtension(E_Compare) - proto.RegisterExtension(E_Typedecl) - proto.RegisterExtension(E_Messagename) - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) - proto.RegisterExtension(E_Customname) - proto.RegisterExtension(E_Jsontag) - proto.RegisterExtension(E_Moretags) - proto.RegisterExtension(E_Casttype) - proto.RegisterExtension(E_Castkey) - proto.RegisterExtension(E_Castvalue) - proto.RegisterExtension(E_Stdtime) - proto.RegisterExtension(E_Stdduration) -} - -func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_68790841c0f79064) } - -var fileDescriptor_gogo_68790841c0f79064 = []byte{ - // 1246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, - 0x14, 0x80, 0x85, 0x70, 0x64, 0xcf, 0xf3, 0x86, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, - 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x06, 0x63, 0xe2, 0xb0, 0x1d, 0x46, - 0x3d, 0x33, 0xe5, 0x76, 0x43, 0x77, 0xd7, 0xd0, 0x5d, 0x1d, 0xc5, 0xb9, 0xa1, 0xb0, 0x08, 0x21, - 0x76, 0x24, 0x48, 0x48, 0x02, 0x39, 0xb0, 0xaf, 0x61, 0xe7, 0xc6, 0x85, 0xe5, 0xca, 0x7f, 0xe0, - 0x02, 0x98, 0xdd, 0x37, 0x5f, 0xa2, 0xd7, 0xfd, 0x5e, 0x4f, 0xcd, 0x78, 0xa4, 0xaa, 0xb9, 0xb5, - 0xed, 0xfa, 0x3e, 0x57, 0xbf, 0x57, 0xf5, 0xde, 0x9b, 0x01, 0xf0, 0x95, 0xaf, 0x66, 0x5a, 0x89, - 0xd2, 0xaa, 0x5a, 0xc1, 0xe7, 0xfc, 0xf1, 0xc0, 0x41, 0x5f, 0x29, 0x3f, 0x94, 0xb3, 0xf9, 0x4f, - 0xf5, 0x6c, 0x63, 0xb6, 0x29, 0xd3, 0x46, 0x12, 0xb4, 0xb4, 0x4a, 0x8a, 0xc5, 0xe2, 0x6e, 0x98, - 0xa4, 0xc5, 0x35, 0x19, 0x67, 0x51, 0xad, 0x95, 0xc8, 0x8d, 0xe0, 0x74, 0xf5, 0xa6, 0x99, 0x82, - 0x9c, 0x61, 0x72, 0x66, 0x29, 0xce, 0xa2, 0x7b, 0x5a, 0x3a, 0x50, 0x71, 0xba, 0xff, 0xca, 0xaf, - 0xd7, 0x1e, 0xbc, 0xe6, 0xf6, 0xa1, 0xb5, 0x09, 0x42, 0xf1, 0x6f, 0xab, 0x39, 0x28, 0xd6, 0xe0, - 0xfa, 0x0e, 0x5f, 0xaa, 0x93, 0x20, 0xf6, 0x65, 0x62, 0x31, 0xfe, 0x40, 0xc6, 0x49, 0xc3, 0x78, - 0x1f, 0xa1, 0x62, 0x11, 0x46, 0xfb, 0x71, 0xfd, 0x48, 0xae, 0x11, 0x69, 0x4a, 0x96, 0x61, 0x3c, - 0x97, 0x34, 0xb2, 0x54, 0xab, 0x28, 0xf6, 0x22, 0x69, 0xd1, 0xfc, 0x94, 0x6b, 0x2a, 0x6b, 0x63, - 0x88, 0x2d, 0x96, 0x94, 0x10, 0x30, 0x84, 0xbf, 0x69, 0xca, 0x46, 0x68, 0x31, 0xfc, 0x4c, 0x1b, - 0x29, 0xd7, 0x8b, 0x93, 0x30, 0x85, 0xcf, 0xa7, 0xbc, 0x30, 0x93, 0xe6, 0x4e, 0x6e, 0xed, 0xe9, - 0x39, 0x89, 0xcb, 0x58, 0xf6, 0xcb, 0xd9, 0x81, 0x7c, 0x3b, 0x93, 0xa5, 0xc0, 0xd8, 0x93, 0x91, - 0x45, 0x5f, 0x6a, 0x2d, 0x93, 0xb4, 0xe6, 0x85, 0xbd, 0xb6, 0x77, 0x2c, 0x08, 0x4b, 0xe3, 0xb9, - 0xed, 0xce, 0x2c, 0x2e, 0x17, 0xe4, 0x42, 0x18, 0x8a, 0x75, 0xb8, 0xa1, 0xc7, 0xa9, 0x70, 0x70, - 0x9e, 0x27, 0xe7, 0xd4, 0x9e, 0x93, 0x81, 0xda, 0x55, 0xe0, 0xdf, 0x97, 0xb9, 0x74, 0x70, 0xbe, - 0x41, 0xce, 0x2a, 0xb1, 0x9c, 0x52, 0x34, 0xde, 0x09, 0x13, 0xa7, 0x64, 0x52, 0x57, 0xa9, 0xac, - 0xc9, 0xc7, 0x32, 0x2f, 0x74, 0xd0, 0x5d, 0x20, 0xdd, 0x38, 0x81, 0x4b, 0xc8, 0xa1, 0xeb, 0x30, - 0x0c, 0x6d, 0x78, 0x0d, 0xe9, 0xa0, 0xb8, 0x48, 0x8a, 0x41, 0x5c, 0x8f, 0xe8, 0x02, 0x8c, 0xf8, - 0xaa, 0x78, 0x25, 0x07, 0xfc, 0x12, 0xe1, 0xc3, 0xcc, 0x90, 0xa2, 0xa5, 0x5a, 0x59, 0xe8, 0x69, - 0x97, 0x1d, 0xbc, 0xc9, 0x0a, 0x66, 0x48, 0xd1, 0x47, 0x58, 0xdf, 0x62, 0x45, 0x6a, 0xc4, 0x73, - 0x1e, 0x86, 0x55, 0x1c, 0x6e, 0xa9, 0xd8, 0x65, 0x13, 0x97, 0xc9, 0x00, 0x84, 0xa0, 0x60, 0x0e, - 0x2a, 0xae, 0x89, 0x78, 0x7b, 0x9b, 0xaf, 0x07, 0x67, 0x60, 0x19, 0xc6, 0xb9, 0x40, 0x05, 0x2a, - 0x76, 0x50, 0xbc, 0x43, 0x8a, 0x31, 0x03, 0xa3, 0xd7, 0xd0, 0x32, 0xd5, 0xbe, 0x74, 0x91, 0xbc, - 0xcb, 0xaf, 0x41, 0x08, 0x85, 0xb2, 0x2e, 0xe3, 0xc6, 0xa6, 0x9b, 0xe1, 0x3d, 0x0e, 0x25, 0x33, - 0xa8, 0x58, 0x84, 0xd1, 0xc8, 0x4b, 0xd2, 0x4d, 0x2f, 0x74, 0x4a, 0xc7, 0xfb, 0xe4, 0x18, 0x29, - 0x21, 0x8a, 0x48, 0x16, 0xf7, 0xa3, 0xf9, 0x80, 0x23, 0x62, 0x60, 0x74, 0xf5, 0x52, 0xed, 0xd5, - 0x43, 0x59, 0xeb, 0xc7, 0xf6, 0x21, 0x5f, 0xbd, 0x82, 0x5d, 0x31, 0x8d, 0x73, 0x50, 0x49, 0x83, - 0x33, 0x4e, 0x9a, 0x8f, 0x38, 0xd3, 0x39, 0x80, 0xf0, 0x83, 0x70, 0x63, 0xcf, 0x36, 0xe1, 0x20, - 0xfb, 0x98, 0x64, 0xd3, 0x3d, 0x5a, 0x05, 0x95, 0x84, 0x7e, 0x95, 0x9f, 0x70, 0x49, 0x90, 0x5d, - 0xae, 0x55, 0x98, 0xca, 0xe2, 0xd4, 0xdb, 0xe8, 0x2f, 0x6a, 0x9f, 0x72, 0xd4, 0x0a, 0xb6, 0x23, - 0x6a, 0x27, 0x60, 0x9a, 0x8c, 0xfd, 0xe5, 0xf5, 0x33, 0x2e, 0xac, 0x05, 0xbd, 0xde, 0x99, 0xdd, - 0x87, 0xe1, 0x40, 0x19, 0xce, 0xd3, 0x5a, 0xc6, 0x29, 0x32, 0xb5, 0xc8, 0x6b, 0x39, 0x98, 0xaf, - 0x90, 0x99, 0x2b, 0xfe, 0x52, 0x29, 0x58, 0xf1, 0x5a, 0x28, 0x7f, 0x00, 0xf6, 0xb3, 0x3c, 0x8b, - 0x13, 0xd9, 0x50, 0x7e, 0x1c, 0x9c, 0x91, 0x4d, 0x07, 0xf5, 0xe7, 0x5d, 0xa9, 0x5a, 0x37, 0x70, - 0x34, 0x1f, 0x87, 0xeb, 0xca, 0x59, 0xa5, 0x16, 0x44, 0x2d, 0x95, 0x68, 0x8b, 0xf1, 0x0b, 0xce, - 0x54, 0xc9, 0x1d, 0xcf, 0x31, 0xb1, 0x04, 0x63, 0xf9, 0x8f, 0xae, 0x47, 0xf2, 0x4b, 0x12, 0x8d, - 0xb6, 0x29, 0x2a, 0x1c, 0x0d, 0x15, 0xb5, 0xbc, 0xc4, 0xa5, 0xfe, 0x7d, 0xc5, 0x85, 0x83, 0x10, - 0x2a, 0x1c, 0x7a, 0xab, 0x25, 0xb1, 0xdb, 0x3b, 0x18, 0xbe, 0xe6, 0xc2, 0xc1, 0x0c, 0x29, 0x78, - 0x60, 0x70, 0x50, 0x7c, 0xc3, 0x0a, 0x66, 0x50, 0x71, 0x6f, 0xbb, 0xd1, 0x26, 0xd2, 0x0f, 0x52, - 0x9d, 0x78, 0xb8, 0xda, 0xa2, 0xfa, 0x76, 0xbb, 0x73, 0x08, 0x5b, 0x33, 0x50, 0xac, 0x44, 0x91, - 0x4c, 0x53, 0xcf, 0x97, 0x38, 0x71, 0x38, 0x6c, 0xec, 0x3b, 0xae, 0x44, 0x06, 0x56, 0xdc, 0xcf, - 0xf1, 0xae, 0x59, 0xa5, 0x7a, 0xcb, 0x1e, 0xd1, 0x4a, 0xc1, 0xb0, 0xeb, 0xf1, 0x1d, 0x72, 0x75, - 0x8e, 0x2a, 0xe2, 0x2e, 0x3c, 0x40, 0x9d, 0x03, 0x85, 0x5d, 0x76, 0x76, 0xa7, 0x3c, 0x43, 0x1d, - 0xf3, 0x84, 0x38, 0x06, 0xa3, 0x1d, 0xc3, 0x84, 0x5d, 0xf5, 0x04, 0xa9, 0x46, 0xcc, 0x59, 0x42, - 0x1c, 0x82, 0x01, 0x1c, 0x0c, 0xec, 0xf8, 0x93, 0x84, 0xe7, 0xcb, 0xc5, 0x11, 0x18, 0xe2, 0x81, - 0xc0, 0x8e, 0x3e, 0x45, 0x68, 0x89, 0x20, 0xce, 0xc3, 0x80, 0x1d, 0x7f, 0x9a, 0x71, 0x46, 0x10, - 0x77, 0x0f, 0xe1, 0xf7, 0xcf, 0x0e, 0x50, 0x41, 0xe7, 0xd8, 0xcd, 0xc1, 0x20, 0x4d, 0x01, 0x76, - 0xfa, 0x19, 0xfa, 0xe7, 0x4c, 0x88, 0x3b, 0x60, 0x9f, 0x63, 0xc0, 0x9f, 0x23, 0xb4, 0x58, 0x2f, - 0x16, 0x61, 0xd8, 0xe8, 0xfc, 0x76, 0xfc, 0x79, 0xc2, 0x4d, 0x0a, 0xb7, 0x4e, 0x9d, 0xdf, 0x2e, - 0x78, 0x81, 0xb7, 0x4e, 0x04, 0x86, 0x8d, 0x9b, 0xbe, 0x9d, 0x7e, 0x91, 0xa3, 0xce, 0x88, 0x98, - 0x87, 0x4a, 0x59, 0xc8, 0xed, 0xfc, 0x4b, 0xc4, 0xb7, 0x19, 0x8c, 0x80, 0xd1, 0x48, 0xec, 0x8a, - 0x97, 0x39, 0x02, 0x06, 0x85, 0xd7, 0xa8, 0x7b, 0x38, 0xb0, 0x9b, 0x5e, 0xe1, 0x6b, 0xd4, 0x35, - 0x1b, 0x60, 0x36, 0xf3, 0x7a, 0x6a, 0x57, 0xbc, 0xca, 0xd9, 0xcc, 0xd7, 0xe3, 0x36, 0xba, 0xbb, - 0xad, 0xdd, 0xf1, 0x1a, 0x6f, 0xa3, 0xab, 0xd9, 0x8a, 0x55, 0xa8, 0xee, 0xed, 0xb4, 0x76, 0xdf, - 0xeb, 0xe4, 0x9b, 0xd8, 0xd3, 0x68, 0xc5, 0xfd, 0x30, 0xdd, 0xbb, 0xcb, 0xda, 0xad, 0xe7, 0x76, - 0xba, 0x3e, 0x17, 0x99, 0x4d, 0x56, 0x9c, 0x68, 0x97, 0x6b, 0xb3, 0xc3, 0xda, 0xb5, 0xe7, 0x77, - 0x3a, 0x2b, 0xb6, 0xd9, 0x60, 0xc5, 0x02, 0x40, 0xbb, 0xb9, 0xd9, 0x5d, 0x17, 0xc8, 0x65, 0x40, - 0x78, 0x35, 0xa8, 0xb7, 0xd9, 0xf9, 0x8b, 0x7c, 0x35, 0x88, 0xc0, 0xab, 0xc1, 0x6d, 0xcd, 0x4e, - 0x5f, 0xe2, 0xab, 0xc1, 0x08, 0x9e, 0x6c, 0xa3, 0x73, 0xd8, 0x0d, 0x97, 0xf9, 0x64, 0x1b, 0x94, - 0x98, 0x83, 0xa1, 0x38, 0x0b, 0x43, 0x3c, 0xa0, 0xd5, 0x9b, 0x7b, 0xb4, 0x2b, 0x19, 0x36, 0x99, - 0xff, 0x6d, 0x97, 0x76, 0xc0, 0x80, 0x38, 0x04, 0xfb, 0x64, 0x54, 0x97, 0x4d, 0x1b, 0xf9, 0xfb, - 0x2e, 0x17, 0x25, 0x5c, 0x2d, 0xe6, 0x01, 0x8a, 0x8f, 0xf6, 0xf8, 0x2a, 0x36, 0xf6, 0x8f, 0xdd, - 0xe2, 0x5b, 0x06, 0x03, 0x69, 0x0b, 0xf2, 0x17, 0xb7, 0x08, 0xb6, 0x3b, 0x05, 0xf9, 0x5b, 0x1f, - 0x86, 0xc1, 0x47, 0x52, 0x15, 0x6b, 0xcf, 0xb7, 0xd1, 0x7f, 0x12, 0xcd, 0xeb, 0x31, 0x60, 0x91, - 0x4a, 0xa4, 0xf6, 0xfc, 0xd4, 0xc6, 0xfe, 0x45, 0x6c, 0x09, 0x20, 0xdc, 0xf0, 0x52, 0xed, 0xf2, - 0xde, 0x7f, 0x33, 0xcc, 0x00, 0x6e, 0x1a, 0x9f, 0x1f, 0x95, 0x5b, 0x36, 0xf6, 0x1f, 0xde, 0x34, - 0xad, 0x17, 0x47, 0xa0, 0x82, 0x8f, 0xf9, 0xb7, 0x22, 0x36, 0xf8, 0x5f, 0x82, 0xdb, 0x04, 0xfe, - 0xe7, 0x54, 0x37, 0x75, 0x60, 0x0f, 0xf6, 0x7f, 0x94, 0x69, 0x5e, 0x2f, 0x16, 0x60, 0x38, 0xd5, - 0xcd, 0x66, 0x46, 0xf3, 0x95, 0x05, 0xff, 0x7f, 0xb7, 0xfc, 0xc8, 0x5d, 0x32, 0x47, 0x97, 0x60, - 0xb2, 0xa1, 0xa2, 0x6e, 0xf0, 0x28, 0x2c, 0xab, 0x65, 0xb5, 0x9a, 0x5f, 0xc5, 0x87, 0x6e, 0xf3, - 0x03, 0xbd, 0x99, 0xd5, 0x67, 0x1a, 0x2a, 0x9a, 0xc5, 0xc1, 0xb7, 0xfd, 0x7d, 0x5e, 0x39, 0x06, - 0x5f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x51, 0xf0, 0xa5, 0x95, 0x02, 0x14, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.golden b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.golden deleted file mode 100644 index f6502e4b90..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.pb.golden +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by protoc-gen-go. -// source: gogo.proto -// DO NOT EDIT! - -package gogoproto - -import proto "github.com/gogo/protobuf/proto" -import json "encoding/json" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51235, - Name: "gogoproto.nullable", - Tag: "varint,51235,opt,name=nullable", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51236, - Name: "gogoproto.embed", - Tag: "varint,51236,opt,name=embed", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 51237, - Name: "gogoproto.customtype", - Tag: "bytes,51237,opt,name=customtype", -} - -func init() { - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.proto b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.proto deleted file mode 100644 index bc8d889f16..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/gogo.proto +++ /dev/null @@ -1,136 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/helper.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/helper.go deleted file mode 100644 index 35a34ef5e0..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/gogoproto/helper.go +++ /dev/null @@ -1,358 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package gogoproto - -import google_protobuf "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor" -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - -func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Embed, false) -} - -func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Nullable, true) -} - -func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Stdtime, false) -} - -func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Stdduration, false) -} - -func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { - nullable := IsNullable(field) - if field.IsMessage() || IsCustomType(field) { - return nullable - } - if proto3 { - return false - } - return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES -} - -func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCustomType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastKey(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastValue(field) - if len(typ) > 0 { - return true - } - return false -} - -func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) -} - -func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) -} - -func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customtype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastType(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Casttype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castkey) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castvalue) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { - name := GetCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { - name := GetEnumCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { - name := GetEnumValueCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_EnumCustomname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { - if field == nil { - return nil - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Jsontag) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { - if field == nil { - return nil - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Moretags) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool - -func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) -} - -func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) -} - -func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) -} - -func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) -} - -func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) -} - -func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) -} - -func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) -} - -func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) -} - -func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) -} - -func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) -} - -func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) -} - -func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) -} - -func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) -} - -func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) -} - -func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) -} - -func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) -} - -func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) -} - -func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) -} - -func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) -} - -func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) -} - -func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) -} - -func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) -} - -func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) -} - -func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) -} - -func IsProto3(file *google_protobuf.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { - return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) -} - -func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) -} - -func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { - return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) -} - -func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/full.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/full.go deleted file mode 100644 index 48dd9d34af..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/full.go +++ /dev/null @@ -1,102 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - "io" -) - -func NewFullWriter(w io.Writer) WriteCloser { - return &fullWriter{w, nil} -} - -type fullWriter struct { - w io.Writer - buffer []byte -} - -func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n, ok := getSize(m) - if !ok { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - _, err = this.w.Write(data) - return err -} - -func (this *fullWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type fullReader struct { - r io.Reader - buf []byte -} - -func NewFullReader(r io.Reader, maxSize int) ReadCloser { - return &fullReader{r, make([]byte, maxSize)} -} - -func (this *fullReader) ReadMsg(msg proto.Message) error { - length, err := this.r.Read(this.buf) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *fullReader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/io.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/io.go deleted file mode 100644 index d71fa2814b..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/io.go +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - "io" -) - -type Writer interface { - WriteMsg(proto.Message) error -} - -type WriteCloser interface { - Writer - io.Closer -} - -type Reader interface { - ReadMsg(msg proto.Message) error -} - -type ReadCloser interface { - Reader - io.Closer -} - -type marshaler interface { - MarshalTo(data []byte) (n int, err error) -} - -func getSize(v interface{}) (int, bool) { - if sz, ok := v.(interface { - Size() (n int) - }); ok { - return sz.Size(), true - } else if sz, ok := v.(interface { - ProtoSize() (n int) - }); ok { - return sz.ProtoSize(), true - } else { - return 0, false - } -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/uint32.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/uint32.go deleted file mode 100644 index 3ad21d7158..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/uint32.go +++ /dev/null @@ -1,138 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "encoding/binary" - "io" - - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -) - -const uint32BinaryLen = 4 - -func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { - return &uint32Writer{w, byteOrder, nil, make([]byte, uint32BinaryLen)} -} - -func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { - return &uint32Writer{w, byteOrder, make([]byte, size), make([]byte, uint32BinaryLen)} -} - -type uint32Writer struct { - w io.Writer - byteOrder binary.ByteOrder - buffer []byte - lenBuf []byte -} - -func (this *uint32Writer) writeFallback(msg proto.Message) error { - data, err := proto.Marshal(msg) - if err != nil { - return err - } - - length := uint32(len(data)) - this.byteOrder.PutUint32(this.lenBuf, length) - if _, err = this.w.Write(this.lenBuf); err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *uint32Writer) WriteMsg(msg proto.Message) error { - m, ok := msg.(marshaler) - if !ok { - return this.writeFallback(msg) - } - - n, ok := getSize(m) - if !ok { - return this.writeFallback(msg) - } - - size := n + uint32BinaryLen - if size > len(this.buffer) { - this.buffer = make([]byte, size) - } - - this.byteOrder.PutUint32(this.buffer, uint32(n)) - if _, err := m.MarshalTo(this.buffer[uint32BinaryLen:]); err != nil { - return err - } - - _, err := this.w.Write(this.buffer[:size]) - return err -} - -func (this *uint32Writer) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type uint32Reader struct { - r io.Reader - byteOrder binary.ByteOrder - lenBuf []byte - buf []byte - maxSize int -} - -func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { - return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} -} - -func (this *uint32Reader) ReadMsg(msg proto.Message) error { - if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { - return err - } - length32 := this.byteOrder.Uint32(this.lenBuf) - length := int(length32) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if length >= len(this.buf) { - this.buf = make([]byte, length) - } - _, err := io.ReadFull(this.r, this.buf[:length]) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *uint32Reader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/varint.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/varint.go deleted file mode 100644 index 52f177b7b8..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/io/varint.go +++ /dev/null @@ -1,134 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "bufio" - "encoding/binary" - "errors" - "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - "io" -) - -var ( - errSmallBuffer = errors.New("Buffer Too Small") - errLargeValue = errors.New("Value is Larger than 64 bits") -) - -func NewDelimitedWriter(w io.Writer) WriteCloser { - return &varintWriter{w, make([]byte, 10), nil} -} - -type varintWriter struct { - w io.Writer - lenBuf []byte - buffer []byte -} - -func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n, ok := getSize(m) - if !ok { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - length := uint64(len(data)) - n := binary.PutUvarint(this.lenBuf, length) - _, err = this.w.Write(this.lenBuf[:n]) - if err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *varintWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { - var closer io.Closer - if c, ok := r.(io.Closer); ok { - closer = c - } - return &varintReader{bufio.NewReader(r), nil, maxSize, closer} -} - -type varintReader struct { - r *bufio.Reader - buf []byte - maxSize int - closer io.Closer -} - -func (this *varintReader) ReadMsg(msg proto.Message) error { - length64, err := binary.ReadUvarint(this.r) - if err != nil { - return err - } - length := int(length64) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if len(this.buf) < length { - this.buf = make([]byte, length) - } - buf := this.buf[:length] - if _, err := io.ReadFull(this.r, buf); err != nil { - return err - } - return proto.Unmarshal(buf, msg) -} - -func (this *varintReader) Close() error { - if this.closer != nil { - return this.closer.Close() - } - return nil -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/decode.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/decode.go deleted file mode 100644 index d9aa3c42d6..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/decode.go +++ /dev/null @@ -1,428 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for decoding protocol buffer data to construct in-memory representations. - */ - -import ( - "errors" - "fmt" - "io" -) - -// errOverflow is returned when an integer is too large to be represented. -var errOverflow = errors.New("proto: integer overflow") - -// ErrInternalBadWireType is returned by generated code when an incorrect -// wire type is encountered. It does not get returned to user code. -var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") - -// DecodeVarint reads a varint-encoded integer from the slice. -// It returns the integer and the number of bytes consumed, or -// zero if there is not enough. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func DecodeVarint(buf []byte) (x uint64, n int) { - for shift := uint(0); shift < 64; shift += 7 { - if n >= len(buf) { - return 0, 0 - } - b := uint64(buf[n]) - n++ - x |= (b & 0x7F) << shift - if (b & 0x80) == 0 { - return x, n - } - } - - // The number is too large to represent in a 64-bit value. - return 0, 0 -} - -func (p *Buffer) decodeVarintSlow() (x uint64, err error) { - i := p.index - l := len(p.buf) - - for shift := uint(0); shift < 64; shift += 7 { - if i >= l { - err = io.ErrUnexpectedEOF - return - } - b := p.buf[i] - i++ - x |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - p.index = i - return - } - } - - // The number is too large to represent in a 64-bit value. - err = errOverflow - return -} - -// DecodeVarint reads a varint-encoded integer from the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) DecodeVarint() (x uint64, err error) { - i := p.index - buf := p.buf - - if i >= len(buf) { - return 0, io.ErrUnexpectedEOF - } else if buf[i] < 0x80 { - p.index++ - return uint64(buf[i]), nil - } else if len(buf)-i < 10 { - return p.decodeVarintSlow() - } - - var b uint64 - // we already checked the first byte - x = uint64(buf[i]) - 0x80 - i++ - - b = uint64(buf[i]) - i++ - x += b << 7 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 7 - - b = uint64(buf[i]) - i++ - x += b << 14 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 14 - - b = uint64(buf[i]) - i++ - x += b << 21 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 21 - - b = uint64(buf[i]) - i++ - x += b << 28 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 28 - - b = uint64(buf[i]) - i++ - x += b << 35 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 35 - - b = uint64(buf[i]) - i++ - x += b << 42 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 42 - - b = uint64(buf[i]) - i++ - x += b << 49 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 49 - - b = uint64(buf[i]) - i++ - x += b << 56 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 56 - - b = uint64(buf[i]) - i++ - x += b << 63 - if b&0x80 == 0 { - goto done - } - // x -= 0x80 << 63 // Always zero. - - return 0, errOverflow - -done: - p.index = i - return x, nil -} - -// DecodeFixed64 reads a 64-bit integer from the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) DecodeFixed64() (x uint64, err error) { - // x, err already 0 - i := p.index + 8 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-8]) - x |= uint64(p.buf[i-7]) << 8 - x |= uint64(p.buf[i-6]) << 16 - x |= uint64(p.buf[i-5]) << 24 - x |= uint64(p.buf[i-4]) << 32 - x |= uint64(p.buf[i-3]) << 40 - x |= uint64(p.buf[i-2]) << 48 - x |= uint64(p.buf[i-1]) << 56 - return -} - -// DecodeFixed32 reads a 32-bit integer from the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) DecodeFixed32() (x uint64, err error) { - // x, err already 0 - i := p.index + 4 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-4]) - x |= uint64(p.buf[i-3]) << 8 - x |= uint64(p.buf[i-2]) << 16 - x |= uint64(p.buf[i-1]) << 24 - return -} - -// DecodeZigzag64 reads a zigzag-encoded 64-bit integer -// from the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) DecodeZigzag64() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) - return -} - -// DecodeZigzag32 reads a zigzag-encoded 32-bit integer -// from the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) DecodeZigzag32() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) - return -} - -// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { - n, err := p.DecodeVarint() - if err != nil { - return nil, err - } - - nb := int(n) - if nb < 0 { - return nil, fmt.Errorf("proto: bad byte length %d", nb) - } - end := p.index + nb - if end < p.index || end > len(p.buf) { - return nil, io.ErrUnexpectedEOF - } - - if !alloc { - // todo: check if can get more uses of alloc=false - buf = p.buf[p.index:end] - p.index += nb - return - } - - buf = make([]byte, nb) - copy(buf, p.buf[p.index:]) - p.index += nb - return -} - -// DecodeStringBytes reads an encoded string from the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) DecodeStringBytes() (s string, err error) { - buf, err := p.DecodeRawBytes(false) - if err != nil { - return - } - return string(buf), nil -} - -// Unmarshaler is the interface representing objects that can -// unmarshal themselves. The argument points to data that may be -// overwritten, so implementations should not keep references to the -// buffer. -// Unmarshal implementations should not clear the receiver. -// Any unmarshaled data should be merged into the receiver. -// Callers of Unmarshal that do not want to retain existing data -// should Reset the receiver before calling Unmarshal. -type Unmarshaler interface { - Unmarshal([]byte) error -} - -// newUnmarshaler is the interface representing objects that can -// unmarshal themselves. The semantics are identical to Unmarshaler. -// -// This exists to support protoc-gen-go generated messages. -// The proto package will stop type-asserting to this interface in the future. -// -// DO NOT DEPEND ON THIS. -type newUnmarshaler interface { - XXX_Unmarshal([]byte) error -} - -// Unmarshal parses the protocol buffer representation in buf and places the -// decoded result in pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// Unmarshal resets pb before starting to unmarshal, so any -// existing data in pb is always removed. Use UnmarshalMerge -// to preserve and append to existing data. -func Unmarshal(buf []byte, pb Message) error { - pb.Reset() - if u, ok := pb.(newUnmarshaler); ok { - return u.XXX_Unmarshal(buf) - } - if u, ok := pb.(Unmarshaler); ok { - return u.Unmarshal(buf) - } - return NewBuffer(buf).Unmarshal(pb) -} - -// UnmarshalMerge parses the protocol buffer representation in buf and -// writes the decoded result to pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// UnmarshalMerge merges into existing data in pb. -// Most code should use Unmarshal instead. -func UnmarshalMerge(buf []byte, pb Message) error { - if u, ok := pb.(newUnmarshaler); ok { - return u.XXX_Unmarshal(buf) - } - if u, ok := pb.(Unmarshaler); ok { - // NOTE: The history of proto have unfortunately been inconsistent - // whether Unmarshaler should or should not implicitly clear itself. - // Some implementations do, most do not. - // Thus, calling this here may or may not do what people want. - // - // See https://github.com/golang/protobuf/issues/424 - return u.Unmarshal(buf) - } - return NewBuffer(buf).Unmarshal(pb) -} - -// DecodeMessage reads a count-delimited message from the Buffer. -func (p *Buffer) DecodeMessage(pb Message) error { - enc, err := p.DecodeRawBytes(false) - if err != nil { - return err - } - return NewBuffer(enc).Unmarshal(pb) -} - -// DecodeGroup reads a tag-delimited group from the Buffer. -// StartGroup tag is already consumed. This function consumes -// EndGroup tag. -func (p *Buffer) DecodeGroup(pb Message) error { - b := p.buf[p.index:] - x, y := findEndGroup(b) - if x < 0 { - return io.ErrUnexpectedEOF - } - err := Unmarshal(b[:x], pb) - p.index += y - return err -} - -// Unmarshal parses the protocol buffer representation in the -// Buffer and places the decoded result in pb. If the struct -// underlying pb does not match the data in the buffer, the results can be -// unpredictable. -// -// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. -func (p *Buffer) Unmarshal(pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(newUnmarshaler); ok { - err := u.XXX_Unmarshal(p.buf[p.index:]) - p.index = len(p.buf) - return err - } - if u, ok := pb.(Unmarshaler); ok { - // NOTE: The history of proto have unfortunately been inconsistent - // whether Unmarshaler should or should not implicitly clear itself. - // Some implementations do, most do not. - // Thus, calling this here may or may not do what people want. - // - // See https://github.com/golang/protobuf/issues/424 - err := u.Unmarshal(p.buf[p.index:]) - p.index = len(p.buf) - return err - } - - // Slow workaround for messages that aren't Unmarshalers. - // This includes some hand-coded .pb.go files and - // bootstrap protos. - // TODO: fix all of those and then add Unmarshal to - // the Message interface. Then: - // The cast above and code below can be deleted. - // The old unmarshaler can be deleted. - // Clients can call Unmarshal directly (can already do that, actually). - var info InternalMessageInfo - err := info.Unmarshal(pb, p.buf[p.index:]) - p.index = len(p.buf) - return err -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/encode.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/encode.go deleted file mode 100644 index c27d35f866..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/encode.go +++ /dev/null @@ -1,221 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "errors" - "fmt" - "reflect" -) - -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - return fmt.Sprintf("proto: required field %q not set", e.field) -} - -var ( - // errRepeatedHasNil is the error returned if Marshal is called with - // a struct with a repeated field containing a nil element. - errRepeatedHasNil = errors.New("proto: repeated field has nil element") - - // errOneofHasNil is the error returned if Marshal is called with - // a struct with a oneof field containing a nil element. - errOneofHasNil = errors.New("proto: oneof field has nil value") - - // ErrNil is the error returned if Marshal is called with nil. - ErrNil = errors.New("proto: Marshal called with nil") - - // ErrTooLarge is the error returned if Marshal is called with a - // message that encodes to >2GB. - ErrTooLarge = errors.New("proto: message encodes to over 2 GB") -) - -// The fundamental encoders that put bytes on the wire. -// Those that take integer types all accept uint64 and are -// therefore of type valueEncoder. - -const maxVarintBytes = 10 // maximum length of a varint - -// EncodeVarint returns the varint encoding of x. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -// Not used by the package itself, but helpful to clients -// wishing to use the same encoding. -func EncodeVarint(x uint64) []byte { - var buf [maxVarintBytes]byte - var n int - for n = 0; x > 127; n++ { - buf[n] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - buf[n] = uint8(x) - n++ - return buf[0:n] -} - -// EncodeVarint writes a varint-encoded integer to the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) EncodeVarint(x uint64) error { - for x >= 1<<7 { - p.buf = append(p.buf, uint8(x&0x7f|0x80)) - x >>= 7 - } - p.buf = append(p.buf, uint8(x)) - return nil -} - -// SizeVarint returns the varint encoding size of an integer. -func SizeVarint(x uint64) int { - switch { - case x < 1<<7: - return 1 - case x < 1<<14: - return 2 - case x < 1<<21: - return 3 - case x < 1<<28: - return 4 - case x < 1<<35: - return 5 - case x < 1<<42: - return 6 - case x < 1<<49: - return 7 - case x < 1<<56: - return 8 - case x < 1<<63: - return 9 - } - return 10 -} - -// EncodeFixed64 writes a 64-bit integer to the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) EncodeFixed64(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24), - uint8(x>>32), - uint8(x>>40), - uint8(x>>48), - uint8(x>>56)) - return nil -} - -// EncodeFixed32 writes a 32-bit integer to the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) EncodeFixed32(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24)) - return nil -} - -// EncodeZigzag64 writes a zigzag-encoded 64-bit integer -// to the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) EncodeZigzag64(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -// EncodeZigzag32 writes a zigzag-encoded 32-bit integer -// to the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) EncodeZigzag32(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) EncodeRawBytes(b []byte) error { - p.EncodeVarint(uint64(len(b))) - p.buf = append(p.buf, b...) - return nil -} - -// EncodeStringBytes writes an encoded string to the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) EncodeStringBytes(s string) error { - p.EncodeVarint(uint64(len(s))) - p.buf = append(p.buf, s...) - return nil -} - -// Marshaler is the interface representing objects that can marshal themselves. -type Marshaler interface { - Marshal() ([]byte, error) -} - -// EncodeMessage writes the protocol buffer to the Buffer, -// prefixed by a varint-encoded length. -func (p *Buffer) EncodeMessage(pb Message) error { - siz := Size(pb) - p.EncodeVarint(uint64(siz)) - return p.Marshal(pb) -} - -// All protocol buffer fields are nillable, but be careful. -func isNil(v reflect.Value) bool { - switch v.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() - } - return false -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/extensions.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/extensions.go deleted file mode 100644 index 44ebd457cf..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/extensions.go +++ /dev/null @@ -1,604 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Types and routines for supporting protocol buffer extensions. - */ - -import ( - "errors" - "fmt" - "io" - "reflect" - "strconv" - "sync" -) - -// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. -var ErrMissingExtension = errors.New("proto: missing extension") - -// ExtensionRange represents a range of message extensions for a protocol buffer. -// Used in code generated by the protocol compiler. -type ExtensionRange struct { - Start, End int32 // both inclusive -} - -// extendableProto is an interface implemented by any protocol buffer generated by the current -// proto compiler that may be extended. -type extendableProto interface { - Message - ExtensionRangeArray() []ExtensionRange - extensionsWrite() map[int32]Extension - extensionsRead() (map[int32]Extension, sync.Locker) -} - -// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous -// version of the proto compiler that may be extended. -type extendableProtoV1 interface { - Message - ExtensionRangeArray() []ExtensionRange - ExtensionMap() map[int32]Extension -} - -// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. -type extensionAdapter struct { - extendableProtoV1 -} - -func (e extensionAdapter) extensionsWrite() map[int32]Extension { - return e.ExtensionMap() -} - -func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { - return e.ExtensionMap(), notLocker{} -} - -// notLocker is a sync.Locker whose Lock and Unlock methods are nops. -type notLocker struct{} - -func (n notLocker) Lock() {} -func (n notLocker) Unlock() {} - -// extendable returns the extendableProto interface for the given generated proto message. -// If the proto message has the old extension format, it returns a wrapper that implements -// the extendableProto interface. -func extendable(p interface{}) (extendableProto, error) { - switch p := p.(type) { - case extendableProto: - if isNilPtr(p) { - return nil, fmt.Errorf("proto: nil %T is not extendable", p) - } - return p, nil - case extendableProtoV1: - if isNilPtr(p) { - return nil, fmt.Errorf("proto: nil %T is not extendable", p) - } - return extensionAdapter{p}, nil - case extensionsBytes: - return slowExtensionAdapter{p}, nil - } - // Don't allocate a specific error containing %T: - // this is the hot path for Clone and MarshalText. - return nil, errNotExtendable -} - -var errNotExtendable = errors.New("proto: not an extendable proto.Message") - -func isNilPtr(x interface{}) bool { - v := reflect.ValueOf(x) - return v.Kind() == reflect.Ptr && v.IsNil() -} - -// XXX_InternalExtensions is an internal representation of proto extensions. -// -// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, -// thus gaining the unexported 'extensions' method, which can be called only from the proto package. -// -// The methods of XXX_InternalExtensions are not concurrency safe in general, -// but calls to logically read-only methods such as has and get may be executed concurrently. -type XXX_InternalExtensions struct { - // The struct must be indirect so that if a user inadvertently copies a - // generated message and its embedded XXX_InternalExtensions, they - // avoid the mayhem of a copied mutex. - // - // The mutex serializes all logically read-only operations to p.extensionMap. - // It is up to the client to ensure that write operations to p.extensionMap are - // mutually exclusive with other accesses. - p *struct { - mu sync.Mutex - extensionMap map[int32]Extension - } -} - -// extensionsWrite returns the extension map, creating it on first use. -func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { - if e.p == nil { - e.p = new(struct { - mu sync.Mutex - extensionMap map[int32]Extension - }) - e.p.extensionMap = make(map[int32]Extension) - } - return e.p.extensionMap -} - -// extensionsRead returns the extensions map for read-only use. It may be nil. -// The caller must hold the returned mutex's lock when accessing Elements within the map. -func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { - if e.p == nil { - return nil, nil - } - return e.p.extensionMap, &e.p.mu -} - -// ExtensionDesc represents an extension specification. -// Used in generated code from the protocol compiler. -type ExtensionDesc struct { - ExtendedType Message // nil pointer to the type that is being extended - ExtensionType interface{} // nil pointer to the extension type - Field int32 // field number - Name string // fully-qualified name of extension, for text formatting - Tag string // protobuf tag style - Filename string // name of the file in which the extension is defined -} - -func (ed *ExtensionDesc) repeated() bool { - t := reflect.TypeOf(ed.ExtensionType) - return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 -} - -// Extension represents an extension in a message. -type Extension struct { - // When an extension is stored in a message using SetExtension - // only desc and value are set. When the message is marshaled - // enc will be set to the encoded form of the message. - // - // When a message is unmarshaled and contains extensions, each - // extension will have only enc set. When such an extension is - // accessed using GetExtension (or GetExtensions) desc and value - // will be set. - desc *ExtensionDesc - value interface{} - enc []byte -} - -// SetRawExtension is for testing only. -func SetRawExtension(base Message, id int32, b []byte) { - if ebase, ok := base.(extensionsBytes); ok { - clearExtension(base, id) - ext := ebase.GetExtensions() - *ext = append(*ext, b...) - return - } - epb, err := extendable(base) - if err != nil { - return - } - extmap := epb.extensionsWrite() - extmap[id] = Extension{enc: b} -} - -// isExtensionField returns true iff the given field number is in an extension range. -func isExtensionField(pb extendableProto, field int32) bool { - for _, er := range pb.ExtensionRangeArray() { - if er.Start <= field && field <= er.End { - return true - } - } - return false -} - -// checkExtensionTypes checks that the given extension is valid for pb. -func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { - var pbi interface{} = pb - // Check the extended type. - if ea, ok := pbi.(extensionAdapter); ok { - pbi = ea.extendableProtoV1 - } - if ea, ok := pbi.(slowExtensionAdapter); ok { - pbi = ea.extensionsBytes - } - if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { - return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a) - } - // Check the range. - if !isExtensionField(pb, extension.Field) { - return errors.New("proto: bad extension number; not in declared ranges") - } - return nil -} - -// extPropKey is sufficient to uniquely identify an extension. -type extPropKey struct { - base reflect.Type - field int32 -} - -var extProp = struct { - sync.RWMutex - m map[extPropKey]*Properties -}{ - m: make(map[extPropKey]*Properties), -} - -func extensionProperties(ed *ExtensionDesc) *Properties { - key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} - - extProp.RLock() - if prop, ok := extProp.m[key]; ok { - extProp.RUnlock() - return prop - } - extProp.RUnlock() - - extProp.Lock() - defer extProp.Unlock() - // Check again. - if prop, ok := extProp.m[key]; ok { - return prop - } - - prop := new(Properties) - prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) - extProp.m[key] = prop - return prop -} - -// HasExtension returns whether the given extension is present in pb. -func HasExtension(pb Message, extension *ExtensionDesc) bool { - if epb, doki := pb.(extensionsBytes); doki { - ext := epb.GetExtensions() - buf := *ext - o := 0 - for o < len(buf) { - tag, n := DecodeVarint(buf[o:]) - fieldNum := int32(tag >> 3) - if int32(fieldNum) == extension.Field { - return true - } - wireType := int(tag & 0x7) - o += n - l, err := size(buf[o:], wireType) - if err != nil { - return false - } - o += l - } - return false - } - // TODO: Check types, field numbers, etc.? - epb, err := extendable(pb) - if err != nil { - return false - } - extmap, mu := epb.extensionsRead() - if extmap == nil { - return false - } - mu.Lock() - _, ok := extmap[extension.Field] - mu.Unlock() - return ok -} - -// ClearExtension removes the given extension from pb. -func ClearExtension(pb Message, extension *ExtensionDesc) { - clearExtension(pb, extension.Field) -} - -func clearExtension(pb Message, fieldNum int32) { - if epb, ok := pb.(extensionsBytes); ok { - offset := 0 - for offset != -1 { - offset = deleteExtension(epb, fieldNum, offset) - } - return - } - epb, err := extendable(pb) - if err != nil { - return - } - // TODO: Check types, field numbers, etc.? - extmap := epb.extensionsWrite() - delete(extmap, fieldNum) -} - -// GetExtension retrieves a proto2 extended field from pb. -// -// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), -// then GetExtension parses the encoded field and returns a Go value of the specified type. -// If the field is not present, then the default value is returned (if one is specified), -// otherwise ErrMissingExtension is reported. -// -// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), -// then GetExtension returns the raw encoded bytes of the field extension. -func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { - if epb, doki := pb.(extensionsBytes); doki { - ext := epb.GetExtensions() - return decodeExtensionFromBytes(extension, *ext) - } - - epb, err := extendable(pb) - if err != nil { - return nil, err - } - - if extension.ExtendedType != nil { - // can only check type if this is a complete descriptor - if cerr := checkExtensionTypes(epb, extension); cerr != nil { - return nil, cerr - } - } - - emap, mu := epb.extensionsRead() - if emap == nil { - return defaultExtensionValue(extension) - } - mu.Lock() - defer mu.Unlock() - e, ok := emap[extension.Field] - if !ok { - // defaultExtensionValue returns the default value or - // ErrMissingExtension if there is no default. - return defaultExtensionValue(extension) - } - - if e.value != nil { - // Already decoded. Check the descriptor, though. - if e.desc != extension { - // This shouldn't happen. If it does, it means that - // GetExtension was called twice with two different - // descriptors with the same field number. - return nil, errors.New("proto: descriptor conflict") - } - return e.value, nil - } - - if extension.ExtensionType == nil { - // incomplete descriptor - return e.enc, nil - } - - v, err := decodeExtension(e.enc, extension) - if err != nil { - return nil, err - } - - // Remember the decoded version and drop the encoded version. - // That way it is safe to mutate what we return. - e.value = v - e.desc = extension - e.enc = nil - emap[extension.Field] = e - return e.value, nil -} - -// defaultExtensionValue returns the default value for extension. -// If no default for an extension is defined ErrMissingExtension is returned. -func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { - if extension.ExtensionType == nil { - // incomplete descriptor, so no default - return nil, ErrMissingExtension - } - - t := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - - sf, _, err := fieldDefault(t, props) - if err != nil { - return nil, err - } - - if sf == nil || sf.value == nil { - // There is no default value. - return nil, ErrMissingExtension - } - - if t.Kind() != reflect.Ptr { - // We do not need to return a Ptr, we can directly return sf.value. - return sf.value, nil - } - - // We need to return an interface{} that is a pointer to sf.value. - value := reflect.New(t).Elem() - value.Set(reflect.New(value.Type().Elem())) - if sf.kind == reflect.Int32 { - // We may have an int32 or an enum, but the underlying data is int32. - // Since we can't set an int32 into a non int32 reflect.value directly - // set it as a int32. - value.Elem().SetInt(int64(sf.value.(int32))) - } else { - value.Elem().Set(reflect.ValueOf(sf.value)) - } - return value.Interface(), nil -} - -// decodeExtension decodes an extension encoded in b. -func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { - t := reflect.TypeOf(extension.ExtensionType) - unmarshal := typeUnmarshaler(t, extension.Tag) - - // t is a pointer to a struct, pointer to basic type or a slice. - // Allocate space to store the pointer/slice. - value := reflect.New(t).Elem() - - var err error - for { - x, n := decodeVarint(b) - if n == 0 { - return nil, io.ErrUnexpectedEOF - } - b = b[n:] - wire := int(x) & 7 - - b, err = unmarshal(b, valToPointer(value.Addr()), wire) - if err != nil { - return nil, err - } - - if len(b) == 0 { - break - } - } - return value.Interface(), nil -} - -// GetExtensions returns a slice of the extensions present in pb that are also listed in es. -// The returned slice has the same length as es; missing extensions will appear as nil elements. -func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, err := extendable(pb) - if err != nil { - return nil, err - } - extensions = make([]interface{}, len(es)) - for i, e := range es { - extensions[i], err = GetExtension(epb, e) - if err == ErrMissingExtension { - err = nil - } - if err != nil { - return - } - } - return -} - -// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. -// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing -// just the Field field, which defines the extension's field number. -func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { - epb, err := extendable(pb) - if err != nil { - return nil, err - } - registeredExtensions := RegisteredExtensions(pb) - - emap, mu := epb.extensionsRead() - if emap == nil { - return nil, nil - } - mu.Lock() - defer mu.Unlock() - extensions := make([]*ExtensionDesc, 0, len(emap)) - for extid, e := range emap { - desc := e.desc - if desc == nil { - desc = registeredExtensions[extid] - if desc == nil { - desc = &ExtensionDesc{Field: extid} - } - } - - extensions = append(extensions, desc) - } - return extensions, nil -} - -// SetExtension sets the specified extension of pb to the specified value. -func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { - if epb, ok := pb.(extensionsBytes); ok { - newb, err := encodeExtension(extension, value) - if err != nil { - return err - } - bb := epb.GetExtensions() - *bb = append(*bb, newb...) - return nil - } - epb, err := extendable(pb) - if err != nil { - return err - } - if err := checkExtensionTypes(epb, extension); err != nil { - return err - } - typ := reflect.TypeOf(extension.ExtensionType) - if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") - } - // nil extension values need to be caught early, because the - // encoder can't distinguish an ErrNil due to a nil extension - // from an ErrNil due to a missing field. Extensions are - // always optional, so the encoder would just swallow the error - // and drop all the extensions from the encoded message. - if reflect.ValueOf(value).IsNil() { - return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) - } - - extmap := epb.extensionsWrite() - extmap[extension.Field] = Extension{desc: extension, value: value} - return nil -} - -// ClearAllExtensions clears all extensions from pb. -func ClearAllExtensions(pb Message) { - if epb, doki := pb.(extensionsBytes); doki { - ext := epb.GetExtensions() - *ext = []byte{} - return - } - epb, err := extendable(pb) - if err != nil { - return - } - m := epb.extensionsWrite() - for k := range m { - delete(m, k) - } -} - -// A global registry of extensions. -// The generated code will register the generated descriptors by calling RegisterExtension. - -var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) - -// RegisterExtension is called from the generated code. -func RegisterExtension(desc *ExtensionDesc) { - st := reflect.TypeOf(desc.ExtendedType).Elem() - m := extensionMaps[st] - if m == nil { - m = make(map[int32]*ExtensionDesc) - extensionMaps[st] = m - } - if _, ok := m[desc.Field]; ok { - panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) - } - m[desc.Field] = desc -} - -// RegisteredExtensions returns a map of the registered extensions of a -// protocol buffer struct, indexed by the extension number. -// The argument pb should be a nil pointer to the struct type. -func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { - return extensionMaps[reflect.TypeOf(pb).Elem()] -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/lib.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/lib.go deleted file mode 100644 index 0f1950c67e..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/lib.go +++ /dev/null @@ -1,921 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package proto converts data structures to and from the wire format of -protocol buffers. It works in concert with the Go source code generated -for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. - - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Enum types do not get an Enum method. - -The simplest way to describe this is to see an example. -Given file test.proto, containing - - package example; - - enum FOO { X = 17; } - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - oneof union { - int32 number = 6; - string name = 7; - } - } - -The resulting file, test.pb.go, is: - - package example - - import proto "github.com/gogo/protobuf/proto" - import math "math" - - type FOO int32 - const ( - FOO_X FOO = 17 - ) - var FOO_name = map[int32]string{ - 17: "X", - } - var FOO_value = map[string]int32{ - "X": 17, - } - - func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p - } - func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) - } - func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data) - if err != nil { - return err - } - *x = FOO(value) - return nil - } - - type Test struct { - Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` - Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` - Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` - Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - // Types that are valid to be assigned to Union: - // *Test_Number - // *Test_Name - Union isTest_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` - } - func (m *Test) Reset() { *m = Test{} } - func (m *Test) String() string { return proto.CompactTextString(m) } - func (*Test) ProtoMessage() {} - - type isTest_Union interface { - isTest_Union() - } - - type Test_Number struct { - Number int32 `protobuf:"varint,6,opt,name=number"` - } - type Test_Name struct { - Name string `protobuf:"bytes,7,opt,name=name"` - } - - func (*Test_Number) isTest_Union() {} - func (*Test_Name) isTest_Union() {} - - func (m *Test) GetUnion() isTest_Union { - if m != nil { - return m.Union - } - return nil - } - const Default_Test_Type int32 = 77 - - func (m *Test) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" - } - - func (m *Test) GetType() int32 { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_Test_Type - } - - func (m *Test) GetOptionalgroup() *Test_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil - } - - type Test_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` - } - func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } - func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } - - func (m *Test_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" - } - - func (m *Test) GetNumber() int32 { - if x, ok := m.GetUnion().(*Test_Number); ok { - return x.Number - } - return 0 - } - - func (m *Test) GetName() string { - if x, ok := m.GetUnion().(*Test_Name); ok { - return x.Name - } - return "" - } - - func init() { - proto.RegisterEnum("example.FOO", FOO_name, FOO_value) - } - -To create and play with a Test object: - - package main - - import ( - "log" - - "github.com/gogo/protobuf/proto" - pb "./example.pb" - ) - - func main() { - test := &pb.Test{ - Label: proto.String("hello"), - Type: proto.Int32(17), - Reps: []int64{1, 2, 3}, - Optionalgroup: &pb.Test_OptionalGroup{ - RequiredField: proto.String("good bye"), - }, - Union: &pb.Test_Name{"fred"}, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &pb.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // Use a type switch to determine which oneof was set. - switch u := test.Union.(type) { - case *pb.Test_Number: // u.Number contains the number. - case *pb.Test_Name: // u.Name contains the string. - } - // etc. - } -*/ -package proto - -import ( - "encoding/json" - "errors" - "fmt" - "log" - "reflect" - "sort" - "strconv" - "sync" -) - -var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") - -// Message is implemented by generated protocol buffer messages. -type Message interface { - Reset() - String() string - ProtoMessage() -} - -// Stats records allocation details about the protocol buffer encoders -// and decoders. Useful for tuning the library itself. -type Stats struct { - Emalloc uint64 // mallocs in encode - Dmalloc uint64 // mallocs in decode - Encode uint64 // number of encodes - Decode uint64 // number of decodes - Chit uint64 // number of cache hits - Cmiss uint64 // number of cache misses - Size uint64 // number of sizes -} - -// Set to true to enable stats collection. -const collectStats = false - -var stats Stats - -// GetStats returns a copy of the global Stats structure. -func GetStats() Stats { return stats } - -// A Buffer is a buffer manager for marshaling and unmarshaling -// protocol buffers. It may be reused between invocations to -// reduce memory usage. It is not necessary to use a Buffer; -// the global functions Marshal and Unmarshal create a -// temporary Buffer and are fine for most applications. -type Buffer struct { - buf []byte // encode/decode byte stream - index int // read point - - deterministic bool -} - -// NewBuffer allocates a new Buffer and initializes its internal data to -// the contents of the argument slice. -func NewBuffer(e []byte) *Buffer { - return &Buffer{buf: e} -} - -// Reset resets the Buffer, ready for marshaling a new protocol buffer. -func (p *Buffer) Reset() { - p.buf = p.buf[0:0] // for reading/writing - p.index = 0 // for reading -} - -// SetBuf replaces the internal buffer with the slice, -// ready for unmarshaling the contents of the slice. -func (p *Buffer) SetBuf(s []byte) { - p.buf = s - p.index = 0 -} - -// Bytes returns the contents of the Buffer. -func (p *Buffer) Bytes() []byte { return p.buf } - -// SetDeterministic sets whether to use deterministic serialization. -// -// Deterministic serialization guarantees that for a given binary, equal -// messages will always be serialized to the same bytes. This implies: -// -// - Repeated serialization of a message will return the same bytes. -// - Different processes of the same binary (which may be executing on -// different machines) will serialize equal messages to the same bytes. -// -// Note that the deterministic serialization is NOT canonical across -// languages. It is not guaranteed to remain stable over time. It is unstable -// across different builds with schema changes due to unknown fields. -// Users who need canonical serialization (e.g., persistent storage in a -// canonical form, fingerprinting, etc.) should define their own -// canonicalization specification and implement their own serializer rather -// than relying on this API. -// -// If deterministic serialization is requested, map entries will be sorted -// by keys in lexographical order. This is an implementation detail and -// subject to change. -func (p *Buffer) SetDeterministic(deterministic bool) { - p.deterministic = deterministic -} - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { - return &v -} - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -// Int is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it, but unlike Int32 -// its argument value is an int. -func Int(v int) *int32 { - p := new(int32) - *p = int32(v) - return p -} - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { - return &v -} - -// Float32 is a helper routine that allocates a new float32 value -// to store v and returns a pointer to it. -func Float32(v float32) *float32 { - return &v -} - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { - return &v -} - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { - return &v -} - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { - return &v -} - -// EnumName is a helper function to simplify printing protocol buffer enums -// by name. Given an enum map and a value, it returns a useful string. -func EnumName(m map[int32]string, v int32) string { - s, ok := m[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// UnmarshalJSONEnum is a helper function to simplify recovering enum int values -// from their JSON-encoded representation. Given a map from the enum's symbolic -// names to its int values, and a byte buffer containing the JSON-encoded -// value, it returns an int32 that can be cast to the enum type by the caller. -// -// The function can deal with both JSON representations, numeric and symbolic. -func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { - if data[0] == '"' { - // New style: enums are strings. - var repr string - if err := json.Unmarshal(data, &repr); err != nil { - return -1, err - } - val, ok := m[repr] - if !ok { - return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) - } - return val, nil - } - // Old style: enums are ints. - var val int32 - if err := json.Unmarshal(data, &val); err != nil { - return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) - } - return val, nil -} - -// DebugPrint dumps the encoded data in b in a debugging format with a header -// including the string s. Used in testing but made available for general debugging. -func (p *Buffer) DebugPrint(s string, b []byte) { - var u uint64 - - obuf := p.buf - sindex := p.index - p.buf = b - p.index = 0 - depth := 0 - - fmt.Printf("\n--- %s ---\n", s) - -out: - for { - for i := 0; i < depth; i++ { - fmt.Print(" ") - } - - index := p.index - if index == len(p.buf) { - break - } - - op, err := p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: fetching op err %v\n", index, err) - break out - } - tag := op >> 3 - wire := op & 7 - - switch wire { - default: - fmt.Printf("%3d: t=%3d unknown wire=%d\n", - index, tag, wire) - break out - - case WireBytes: - var r []byte - - r, err = p.DecodeRawBytes(false) - if err != nil { - break out - } - fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) - if len(r) <= 6 { - for i := 0; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } else { - for i := 0; i < 3; i++ { - fmt.Printf(" %.2x", r[i]) - } - fmt.Printf(" ..") - for i := len(r) - 3; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } - fmt.Printf("\n") - - case WireFixed32: - u, err = p.DecodeFixed32() - if err != nil { - fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) - - case WireFixed64: - u, err = p.DecodeFixed64() - if err != nil { - fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) - - case WireVarint: - u, err = p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) - - case WireStartGroup: - fmt.Printf("%3d: t=%3d start\n", index, tag) - depth++ - - case WireEndGroup: - depth-- - fmt.Printf("%3d: t=%3d end\n", index, tag) - } - } - - if depth != 0 { - fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) - } - fmt.Printf("\n") - - p.buf = obuf - p.index = sindex -} - -// SetDefaults sets unset protocol buffer fields to their default values. -// It only modifies fields that are both unset and have defined defaults. -// It recursively sets default values in any non-nil sub-messages. -func SetDefaults(pb Message) { - setDefaults(reflect.ValueOf(pb), true, false) -} - -// v is a pointer to a struct. -func setDefaults(v reflect.Value, recur, zeros bool) { - v = v.Elem() - - defaultMu.RLock() - dm, ok := defaults[v.Type()] - defaultMu.RUnlock() - if !ok { - dm = buildDefaultMessage(v.Type()) - defaultMu.Lock() - defaults[v.Type()] = dm - defaultMu.Unlock() - } - - for _, sf := range dm.scalars { - f := v.Field(sf.index) - if !f.IsNil() { - // field already set - continue - } - dv := sf.value - if dv == nil && !zeros { - // no explicit default, and don't want to set zeros - continue - } - fptr := f.Addr().Interface() // **T - // TODO: Consider batching the allocations we do here. - switch sf.kind { - case reflect.Bool: - b := new(bool) - if dv != nil { - *b = dv.(bool) - } - *(fptr.(**bool)) = b - case reflect.Float32: - f := new(float32) - if dv != nil { - *f = dv.(float32) - } - *(fptr.(**float32)) = f - case reflect.Float64: - f := new(float64) - if dv != nil { - *f = dv.(float64) - } - *(fptr.(**float64)) = f - case reflect.Int32: - // might be an enum - if ft := f.Type(); ft != int32PtrType { - // enum - f.Set(reflect.New(ft.Elem())) - if dv != nil { - f.Elem().SetInt(int64(dv.(int32))) - } - } else { - // int32 field - i := new(int32) - if dv != nil { - *i = dv.(int32) - } - *(fptr.(**int32)) = i - } - case reflect.Int64: - i := new(int64) - if dv != nil { - *i = dv.(int64) - } - *(fptr.(**int64)) = i - case reflect.String: - s := new(string) - if dv != nil { - *s = dv.(string) - } - *(fptr.(**string)) = s - case reflect.Uint8: - // exceptional case: []byte - var b []byte - if dv != nil { - db := dv.([]byte) - b = make([]byte, len(db)) - copy(b, db) - } else { - b = []byte{} - } - *(fptr.(*[]byte)) = b - case reflect.Uint32: - u := new(uint32) - if dv != nil { - *u = dv.(uint32) - } - *(fptr.(**uint32)) = u - case reflect.Uint64: - u := new(uint64) - if dv != nil { - *u = dv.(uint64) - } - *(fptr.(**uint64)) = u - default: - log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) - } - } - - for _, ni := range dm.nested { - f := v.Field(ni) - // f is *T or []*T or map[T]*T - switch f.Kind() { - case reflect.Ptr: - if f.IsNil() { - continue - } - setDefaults(f, recur, zeros) - - case reflect.Slice: - for i := 0; i < f.Len(); i++ { - e := f.Index(i) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - - case reflect.Map: - for _, k := range f.MapKeys() { - e := f.MapIndex(k) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - } - } -} - -var ( - // defaults maps a protocol buffer struct type to a slice of the fields, - // with its scalar fields set to their proto-declared non-zero default values. - defaultMu sync.RWMutex - defaults = make(map[reflect.Type]defaultMessage) - - int32PtrType = reflect.TypeOf((*int32)(nil)) -) - -// defaultMessage represents information about the default values of a message. -type defaultMessage struct { - scalars []scalarField - nested []int // struct field index of nested messages -} - -type scalarField struct { - index int // struct field index - kind reflect.Kind // element type (the T in *T or []T) - value interface{} // the proto-declared default value, or nil -} - -// t is a struct type. -func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { - sprop := GetProperties(t) - for _, prop := range sprop.Prop { - fi, ok := sprop.decoderTags.get(prop.Tag) - if !ok { - // XXX_unrecognized - continue - } - ft := t.Field(fi).Type - - sf, nested, err := fieldDefault(ft, prop) - switch { - case err != nil: - log.Print(err) - case nested: - dm.nested = append(dm.nested, fi) - case sf != nil: - sf.index = fi - dm.scalars = append(dm.scalars, *sf) - } - } - - return dm -} - -// fieldDefault returns the scalarField for field type ft. -// sf will be nil if the field can not have a default. -// nestedMessage will be true if this is a nested message. -// Note that sf.index is not set on return. -func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { - var canHaveDefault bool - switch ft.Kind() { - case reflect.Ptr: - if ft.Elem().Kind() == reflect.Struct { - nestedMessage = true - } else { - canHaveDefault = true // proto2 scalar field - } - - case reflect.Slice: - switch ft.Elem().Kind() { - case reflect.Ptr: - nestedMessage = true // repeated message - case reflect.Uint8: - canHaveDefault = true // bytes field - } - - case reflect.Map: - if ft.Elem().Kind() == reflect.Ptr { - nestedMessage = true // map with message values - } - } - - if !canHaveDefault { - if nestedMessage { - return nil, true, nil - } - return nil, false, nil - } - - // We now know that ft is a pointer or slice. - sf = &scalarField{kind: ft.Elem().Kind()} - - // scalar fields without defaults - if !prop.HasDefault { - return sf, false, nil - } - - // a scalar field: either *T or []byte - switch ft.Elem().Kind() { - case reflect.Bool: - x, err := strconv.ParseBool(prop.Default) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Float32: - x, err := strconv.ParseFloat(prop.Default, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) - } - sf.value = float32(x) - case reflect.Float64: - x, err := strconv.ParseFloat(prop.Default, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Int32: - x, err := strconv.ParseInt(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) - } - sf.value = int32(x) - case reflect.Int64: - x, err := strconv.ParseInt(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.String: - sf.value = prop.Default - case reflect.Uint8: - // []byte (not *uint8) - sf.value = []byte(prop.Default) - case reflect.Uint32: - x, err := strconv.ParseUint(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) - } - sf.value = uint32(x) - case reflect.Uint64: - x, err := strconv.ParseUint(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) - } - sf.value = x - default: - return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) - } - - return sf, false, nil -} - -// mapKeys returns a sort.Interface to be used for sorting the map keys. -// Map fields may have key types of non-float scalars, strings and enums. -func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{vs: vs} - - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. - if len(vs) == 0 { - return s - } - switch vs[0].Kind() { - case reflect.Int32, reflect.Int64: - s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } - case reflect.Uint32, reflect.Uint64: - s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } - case reflect.Bool: - s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true - case reflect.String: - s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } - default: - panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) - } - - return s -} - -type mapKeySorter struct { - vs []reflect.Value - less func(a, b reflect.Value) bool -} - -func (s mapKeySorter) Len() int { return len(s.vs) } -func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } -func (s mapKeySorter) Less(i, j int) bool { - return s.less(s.vs[i], s.vs[j]) -} - -// isProto3Zero reports whether v is a zero proto3 value. -func isProto3Zero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint32, reflect.Uint64: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.String: - return v.String() == "" - } - return false -} - -// ProtoPackageIsVersion2 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const GoGoProtoPackageIsVersion2 = true - -// ProtoPackageIsVersion1 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const GoGoProtoPackageIsVersion1 = true - -// InternalMessageInfo is a type used internally by generated .pb.go files. -// This type is not intended to be used by non-generated code. -// This type is not subject to any compatibility guarantee. -type InternalMessageInfo struct { - marshal *marshalInfo - unmarshal *unmarshalInfo - merge *mergeInfo - discard *discardInfo -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/message_set.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/message_set.go deleted file mode 100644 index 3b6ca41d5e..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/message_set.go +++ /dev/null @@ -1,314 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Support for message sets. - */ - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "sync" -) - -// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. -// A message type ID is required for storing a protocol buffer in a message set. -var errNoMessageTypeID = errors.New("proto does not have a message type ID") - -// The first two types (_MessageSet_Item and messageSet) -// model what the protocol compiler produces for the following protocol message: -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required string message = 3; -// }; -// } -// That is the MessageSet wire format. We can't use a proto to generate these -// because that would introduce a circular dependency between it and this package. - -type _MessageSet_Item struct { - TypeId *int32 `protobuf:"varint,2,req,name=type_id"` - Message []byte `protobuf:"bytes,3,req,name=message"` -} - -type messageSet struct { - Item []*_MessageSet_Item `protobuf:"group,1,rep"` - XXX_unrecognized []byte - // TODO: caching? -} - -// Make sure messageSet is a Message. -var _ Message = (*messageSet)(nil) - -// messageTypeIder is an interface satisfied by a protocol buffer type -// that may be stored in a MessageSet. -type messageTypeIder interface { - MessageTypeId() int32 -} - -func (ms *messageSet) find(pb Message) *_MessageSet_Item { - mti, ok := pb.(messageTypeIder) - if !ok { - return nil - } - id := mti.MessageTypeId() - for _, item := range ms.Item { - if *item.TypeId == id { - return item - } - } - return nil -} - -func (ms *messageSet) Has(pb Message) bool { - return ms.find(pb) != nil -} - -func (ms *messageSet) Unmarshal(pb Message) error { - if item := ms.find(pb); item != nil { - return Unmarshal(item.Message, pb) - } - if _, ok := pb.(messageTypeIder); !ok { - return errNoMessageTypeID - } - return nil // TODO: return error instead? -} - -func (ms *messageSet) Marshal(pb Message) error { - msg, err := Marshal(pb) - if err != nil { - return err - } - if item := ms.find(pb); item != nil { - // reuse existing item - item.Message = msg - return nil - } - - mti, ok := pb.(messageTypeIder) - if !ok { - return errNoMessageTypeID - } - - mtid := mti.MessageTypeId() - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: &mtid, - Message: msg, - }) - return nil -} - -func (ms *messageSet) Reset() { *ms = messageSet{} } -func (ms *messageSet) String() string { return CompactTextString(ms) } -func (*messageSet) ProtoMessage() {} - -// Support for the message_set_wire_format message option. - -func skipVarint(buf []byte) []byte { - i := 0 - for ; buf[i]&0x80 != 0; i++ { - } - return buf[i+1:] -} - -// MarshalMessageSet encodes the extension map represented by m in the message set wire format. -// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSet(exts interface{}) ([]byte, error) { - return marshalMessageSet(exts, false) -} - -// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. -func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { - switch exts := exts.(type) { - case *XXX_InternalExtensions: - var u marshalInfo - siz := u.sizeMessageSet(exts) - b := make([]byte, 0, siz) - return u.appendMessageSet(b, exts, deterministic) - - case map[int32]Extension: - // This is an old-style extension map. - // Wrap it in a new-style XXX_InternalExtensions. - ie := XXX_InternalExtensions{ - p: &struct { - mu sync.Mutex - extensionMap map[int32]Extension - }{ - extensionMap: exts, - }, - } - - var u marshalInfo - siz := u.sizeMessageSet(&ie) - b := make([]byte, 0, siz) - return u.appendMessageSet(b, &ie, deterministic) - - default: - return nil, errors.New("proto: not an extension map") - } -} - -// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSet(buf []byte, exts interface{}) error { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - m = exts.extensionsWrite() - case map[int32]Extension: - m = exts - default: - return errors.New("proto: not an extension map") - } - - ms := new(messageSet) - if err := Unmarshal(buf, ms); err != nil { - return err - } - for _, item := range ms.Item { - id := *item.TypeId - msg := item.Message - - // Restore wire type and field number varint, plus length varint. - // Be careful to preserve duplicate items. - b := EncodeVarint(uint64(id)<<3 | WireBytes) - if ext, ok := m[id]; ok { - // Existing data; rip off the tag and length varint - // so we join the new data correctly. - // We can assume that ext.enc is set because we are unmarshaling. - o := ext.enc[len(b):] // skip wire type and field number - _, n := DecodeVarint(o) // calculate length of length varint - o = o[n:] // skip length varint - msg = append(o, msg...) // join old data and new data - } - b = append(b, EncodeVarint(uint64(len(msg)))...) - b = append(b, msg...) - - m[id] = Extension{enc: b} - } - return nil -} - -// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. -// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - var mu sync.Locker - m, mu = exts.extensionsRead() - if m != nil { - // Keep the extensions map locked until we're done marshaling to prevent - // races between marshaling and unmarshaling the lazily-{en,de}coded - // values. - mu.Lock() - defer mu.Unlock() - } - case map[int32]Extension: - m = exts - default: - return nil, errors.New("proto: not an extension map") - } - var b bytes.Buffer - b.WriteByte('{') - - // Process the map in key order for deterministic output. - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) // int32Slice defined in text.go - - for i, id := range ids { - ext := m[id] - msd, ok := messageSetMap[id] - if !ok { - // Unknown type; we can't render it, so skip it. - continue - } - - if i > 0 && b.Len() > 1 { - b.WriteByte(',') - } - - fmt.Fprintf(&b, `"[%s]":`, msd.name) - - x := ext.value - if x == nil { - x = reflect.New(msd.t.Elem()).Interface() - if err := Unmarshal(ext.enc, x.(Message)); err != nil { - return nil, err - } - } - d, err := json.Marshal(x) - if err != nil { - return nil, err - } - b.Write(d) - } - b.WriteByte('}') - return b.Bytes(), nil -} - -// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. -// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { - // Common-case fast path. - if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { - return nil - } - - // This is fairly tricky, and it's not clear that it is needed. - return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") -} - -// A global registry of types that can be used in a MessageSet. - -var messageSetMap = make(map[int32]messageSetDesc) - -type messageSetDesc struct { - t reflect.Type // pointer to struct - name string -} - -// RegisterMessageSetType is called from the generated code. -func RegisterMessageSetType(m Message, fieldNum int32, name string) { - messageSetMap[fieldNum] = messageSetDesc{ - t: reflect.TypeOf(m), - name: name, - } -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_unsafe_gogo.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_unsafe_gogo.go deleted file mode 100644 index b354101b9c..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/pointer_unsafe_gogo.go +++ /dev/null @@ -1,56 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2018, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build !purego !appengine,!js - -// This file contains the implementation of the proto field accesses using package unsafe. - -package proto - -import ( - "reflect" - "unsafe" -) - -func (p pointer) getRef() pointer { - return pointer{p: (unsafe.Pointer)(&p.p)} -} - -func (p pointer) appendRef(v pointer, typ reflect.Type) { - slice := p.getSlice(typ) - elem := v.asPointerTo(typ).Elem() - newSlice := reflect.Append(slice, elem) - slice.Set(newSlice) -} - -func (p pointer) getSlice(typ reflect.Type) reflect.Value { - sliceTyp := reflect.SliceOf(typ) - slice := p.asPointerTo(sliceTyp) - slice = slice.Elem() - return slice -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/properties.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/properties.go deleted file mode 100644 index 7a5e28efe5..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/properties.go +++ /dev/null @@ -1,600 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "fmt" - "log" - "os" - "reflect" - "sort" - "strconv" - "strings" - "sync" -) - -const debug bool = false - -// Constants that identify the encoding of a value on the wire. -const ( - WireVarint = 0 - WireFixed64 = 1 - WireBytes = 2 - WireStartGroup = 3 - WireEndGroup = 4 - WireFixed32 = 5 -) - -// tagMap is an optimization over map[int]int for typical protocol buffer -// use-cases. Encoded protocol buffers are often in tag order with small tag -// numbers. -type tagMap struct { - fastTags []int - slowTags map[int]int -} - -// tagMapFastLimit is the upper bound on the tag number that will be stored in -// the tagMap slice rather than its map. -const tagMapFastLimit = 1024 - -func (p *tagMap) get(t int) (int, bool) { - if t > 0 && t < tagMapFastLimit { - if t >= len(p.fastTags) { - return 0, false - } - fi := p.fastTags[t] - return fi, fi >= 0 - } - fi, ok := p.slowTags[t] - return fi, ok -} - -func (p *tagMap) put(t int, fi int) { - if t > 0 && t < tagMapFastLimit { - for len(p.fastTags) < t+1 { - p.fastTags = append(p.fastTags, -1) - } - p.fastTags[t] = fi - return - } - if p.slowTags == nil { - p.slowTags = make(map[int]int) - } - p.slowTags[t] = fi -} - -// StructProperties represents properties for all the fields of a struct. -// decoderTags and decoderOrigNames should only be used by the decoder. -type StructProperties struct { - Prop []*Properties // properties for each field - reqCount int // required count - decoderTags tagMap // map from proto tag to struct field number - decoderOrigNames map[string]int // map from original name to struct field number - order []int // list of struct field numbers in tag order - - // OneofTypes contains information about the oneof fields in this message. - // It is keyed by the original name of a field. - OneofTypes map[string]*OneofProperties -} - -// OneofProperties represents information about a specific field in a oneof. -type OneofProperties struct { - Type reflect.Type // pointer to generated struct type for this oneof field - Field int // struct field number of the containing oneof in the message - Prop *Properties -} - -// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. -// See encode.go, (*Buffer).enc_struct. - -func (sp *StructProperties) Len() int { return len(sp.order) } -func (sp *StructProperties) Less(i, j int) bool { - return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag -} -func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } - -// Properties represents the protocol-specific behavior of a single struct field. -type Properties struct { - Name string // name of the field, for error messages - OrigName string // original name before protocol compiler (always set) - JSONName string // name to use for JSON; determined by protoc - Wire string - WireType int - Tag int - Required bool - Optional bool - Repeated bool - Packed bool // relevant for repeated primitives only - Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only - oneof bool // whether this is a oneof field - - Default string // default value - HasDefault bool // whether an explicit default was provided - CustomType string - CastType string - StdTime bool - StdDuration bool - - stype reflect.Type // set for struct types only - ctype reflect.Type // set for custom types only - sprop *StructProperties // set for struct types only - - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only -} - -// String formats the properties in the protobuf struct field tag style. -func (p *Properties) String() string { - s := p.Wire - s += "," - s += strconv.Itoa(p.Tag) - if p.Required { - s += ",req" - } - if p.Optional { - s += ",opt" - } - if p.Repeated { - s += ",rep" - } - if p.Packed { - s += ",packed" - } - s += ",name=" + p.OrigName - if p.JSONName != p.OrigName { - s += ",json=" + p.JSONName - } - if p.proto3 { - s += ",proto3" - } - if p.oneof { - s += ",oneof" - } - if len(p.Enum) > 0 { - s += ",enum=" + p.Enum - } - if p.HasDefault { - s += ",def=" + p.Default - } - return s -} - -// Parse populates p by parsing a string in the protobuf struct field tag style. -func (p *Properties) Parse(s string) { - // "bytes,49,opt,name=foo,def=hello!" - fields := strings.Split(s, ",") // breaks def=, but handled below. - if len(fields) < 2 { - fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) - return - } - - p.Wire = fields[0] - switch p.Wire { - case "varint": - p.WireType = WireVarint - case "fixed32": - p.WireType = WireFixed32 - case "fixed64": - p.WireType = WireFixed64 - case "zigzag32": - p.WireType = WireVarint - case "zigzag64": - p.WireType = WireVarint - case "bytes", "group": - p.WireType = WireBytes - // no numeric converter for non-numeric types - default: - fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) - return - } - - var err error - p.Tag, err = strconv.Atoi(fields[1]) - if err != nil { - return - } - -outer: - for i := 2; i < len(fields); i++ { - f := fields[i] - switch { - case f == "req": - p.Required = true - case f == "opt": - p.Optional = true - case f == "rep": - p.Repeated = true - case f == "packed": - p.Packed = true - case strings.HasPrefix(f, "name="): - p.OrigName = f[5:] - case strings.HasPrefix(f, "json="): - p.JSONName = f[5:] - case strings.HasPrefix(f, "enum="): - p.Enum = f[5:] - case f == "proto3": - p.proto3 = true - case f == "oneof": - p.oneof = true - case strings.HasPrefix(f, "def="): - p.HasDefault = true - p.Default = f[4:] // rest of string - if i+1 < len(fields) { - // Commas aren't escaped, and def is always last. - p.Default += "," + strings.Join(fields[i+1:], ",") - break outer - } - case strings.HasPrefix(f, "embedded="): - p.OrigName = strings.Split(f, "=")[1] - case strings.HasPrefix(f, "customtype="): - p.CustomType = strings.Split(f, "=")[1] - case strings.HasPrefix(f, "casttype="): - p.CastType = strings.Split(f, "=")[1] - case f == "stdtime": - p.StdTime = true - case f == "stdduration": - p.StdDuration = true - } - } -} - -var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() - -// setFieldProps initializes the field properties for submessages and maps. -func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - isMap := typ.Kind() == reflect.Map - if len(p.CustomType) > 0 && !isMap { - p.ctype = typ - p.setTag(lockGetProp) - return - } - if p.StdTime && !isMap { - p.setTag(lockGetProp) - return - } - if p.StdDuration && !isMap { - p.setTag(lockGetProp) - return - } - switch t1 := typ; t1.Kind() { - case reflect.Struct: - p.stype = typ - case reflect.Ptr: - if t1.Elem().Kind() == reflect.Struct { - p.stype = t1.Elem() - } - case reflect.Slice: - switch t2 := t1.Elem(); t2.Kind() { - case reflect.Ptr: - switch t3 := t2.Elem(); t3.Kind() { - case reflect.Struct: - p.stype = t3 - } - case reflect.Struct: - p.stype = t2 - } - - case reflect.Map: - - p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} - vtype := p.mtype.Elem() - if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { - // The value type is not a message (*T) or bytes ([]byte), - // so we need encoders for the pointer to this type. - vtype = reflect.PtrTo(vtype) - } - - p.mvalprop.CustomType = p.CustomType - p.mvalprop.StdDuration = p.StdDuration - p.mvalprop.StdTime = p.StdTime - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) - } - p.setTag(lockGetProp) -} - -func (p *Properties) setTag(lockGetProp bool) { - if p.stype != nil { - if lockGetProp { - p.sprop = GetProperties(p.stype) - } else { - p.sprop = getPropertiesLocked(p.stype) - } - } -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() -) - -// Init populates the properties from a protocol buffer struct tag. -func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { - p.init(typ, name, tag, f, true) -} - -func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { - // "bytes,49,opt,def=hello!" - p.Name = name - p.OrigName = name - if tag == "" { - return - } - p.Parse(tag) - p.setFieldProps(typ, f, lockGetProp) -} - -var ( - propertiesMu sync.RWMutex - propertiesMap = make(map[reflect.Type]*StructProperties) -) - -// GetProperties returns the list of properties for the type represented by t. -// t must represent a generated struct type of a protocol message. -func GetProperties(t reflect.Type) *StructProperties { - if t.Kind() != reflect.Struct { - panic("proto: type must have kind struct") - } - - // Most calls to GetProperties in a long-running program will be - // retrieving details for types we have seen before. - propertiesMu.RLock() - sprop, ok := propertiesMap[t] - propertiesMu.RUnlock() - if ok { - if collectStats { - stats.Chit++ - } - return sprop - } - - propertiesMu.Lock() - sprop = getPropertiesLocked(t) - propertiesMu.Unlock() - return sprop -} - -// getPropertiesLocked requires that propertiesMu is held. -func getPropertiesLocked(t reflect.Type) *StructProperties { - if prop, ok := propertiesMap[t]; ok { - if collectStats { - stats.Chit++ - } - return prop - } - if collectStats { - stats.Cmiss++ - } - - prop := new(StructProperties) - // in case of recursive protos, fill this in now. - propertiesMap[t] = prop - - // build properties - prop.Prop = make([]*Properties, t.NumField()) - prop.order = make([]int, t.NumField()) - - isOneofMessage := false - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - p := new(Properties) - name := f.Name - p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - - oneof := f.Tag.Get("protobuf_oneof") // special case - if oneof != "" { - isOneofMessage = true - // Oneof fields don't use the traditional protobuf tag. - p.OrigName = oneof - } - prop.Prop[i] = p - prop.order[i] = i - if debug { - print(i, " ", f.Name, " ", t.String(), " ") - if p.Tag > 0 { - print(p.String()) - } - print("\n") - } - } - - // Re-order prop.order. - sort.Sort(prop) - - type oneofMessage interface { - XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) - } - if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { - var oots []interface{} - _, _, _, oots = om.XXX_OneofFuncs() - - // Interpret oneof metadata. - prop.OneofTypes = make(map[string]*OneofProperties) - for _, oot := range oots { - oop := &OneofProperties{ - Type: reflect.ValueOf(oot).Type(), // *T - Prop: new(Properties), - } - sft := oop.Type.Elem().Field(0) - oop.Prop.Name = sft.Name - oop.Prop.Parse(sft.Tag.Get("protobuf")) - // There will be exactly one interface field that - // this new value is assignable to. - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type.Kind() != reflect.Interface { - continue - } - if !oop.Type.AssignableTo(f.Type) { - continue - } - oop.Field = i - break - } - prop.OneofTypes[oop.Prop.OrigName] = oop - } - } - - // build required counts - // build tags - reqCount := 0 - prop.decoderOrigNames = make(map[string]int) - for i, p := range prop.Prop { - if strings.HasPrefix(p.Name, "XXX_") { - // Internal fields should not appear in tags/origNames maps. - // They are handled specially when encoding and decoding. - continue - } - if p.Required { - reqCount++ - } - prop.decoderTags.put(p.Tag, i) - prop.decoderOrigNames[p.OrigName] = i - } - prop.reqCount = reqCount - - return prop -} - -// A global registry of enum types. -// The generated code will register the generated maps by calling RegisterEnum. - -var enumValueMaps = make(map[string]map[string]int32) -var enumStringMaps = make(map[string]map[int32]string) - -// RegisterEnum is called from the generated code to install the enum descriptor -// maps into the global table to aid parsing text format protocol buffers. -func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { - if _, ok := enumValueMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumValueMaps[typeName] = valueMap - if _, ok := enumStringMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumStringMaps[typeName] = unusedNameMap -} - -// EnumValueMap returns the mapping from names to integers of the -// enum type enumType, or a nil if not found. -func EnumValueMap(enumType string) map[string]int32 { - return enumValueMaps[enumType] -} - -// A registry of all linked message types. -// The string is a fully-qualified proto name ("pkg.Message"). -var ( - protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers - protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types - revProtoTypes = make(map[reflect.Type]string) -) - -// RegisterType is called from generated code and maps from the fully qualified -// proto name to the type (pointer to struct) of the protocol buffer. -func RegisterType(x Message, name string) { - if _, ok := protoTypedNils[name]; ok { - // TODO: Some day, make this a panic. - log.Printf("proto: duplicate proto type registered: %s", name) - return - } - t := reflect.TypeOf(x) - if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { - // Generated code always calls RegisterType with nil x. - // This check is just for extra safety. - protoTypedNils[name] = x - } else { - protoTypedNils[name] = reflect.Zero(t).Interface().(Message) - } - revProtoTypes[t] = name -} - -// RegisterMapType is called from generated code and maps from the fully qualified -// proto name to the native map type of the proto map definition. -func RegisterMapType(x interface{}, name string) { - if reflect.TypeOf(x).Kind() != reflect.Map { - panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) - } - if _, ok := protoMapTypes[name]; ok { - log.Printf("proto: duplicate proto type registered: %s", name) - return - } - t := reflect.TypeOf(x) - protoMapTypes[name] = t - revProtoTypes[t] = name -} - -// MessageName returns the fully-qualified proto name for the given message type. -func MessageName(x Message) string { - type xname interface { - XXX_MessageName() string - } - if m, ok := x.(xname); ok { - return m.XXX_MessageName() - } - return revProtoTypes[reflect.TypeOf(x)] -} - -// MessageType returns the message type (pointer to struct) for a named message. -// The type is not guaranteed to implement proto.Message if the name refers to a -// map entry. -func MessageType(name string) reflect.Type { - if t, ok := protoTypedNils[name]; ok { - return reflect.TypeOf(t) - } - return protoMapTypes[name] -} - -// A registry of all linked proto files. -var ( - protoFiles = make(map[string][]byte) // file name => fileDescriptor -) - -// RegisterFile is called from generated code and maps from the -// full file name of a .proto file to its compressed FileDescriptorProto. -func RegisterFile(filename string, fileDescriptor []byte) { - protoFiles[filename] = fileDescriptor -} - -// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. -func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text.go deleted file mode 100644 index 4f5706dc5f..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text.go +++ /dev/null @@ -1,928 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for writing the text protocol buffer format. - -import ( - "bufio" - "bytes" - "encoding" - "errors" - "fmt" - "io" - "log" - "math" - "reflect" - "sort" - "strings" - "sync" - "time" -) - -var ( - newline = []byte("\n") - spaces = []byte(" ") - endBraceNewline = []byte("}\n") - backslashN = []byte{'\\', 'n'} - backslashR = []byte{'\\', 'r'} - backslashT = []byte{'\\', 't'} - backslashDQ = []byte{'\\', '"'} - backslashBS = []byte{'\\', '\\'} - posInf = []byte("inf") - negInf = []byte("-inf") - nan = []byte("nan") -) - -type writer interface { - io.Writer - WriteByte(byte) error -} - -// textWriter is an io.Writer that tracks its indentation level. -type textWriter struct { - ind int - complete bool // if the current position is a complete line - compact bool // whether to write out as a one-liner - w writer -} - -func (w *textWriter) WriteString(s string) (n int, err error) { - if !strings.Contains(s, "\n") { - if !w.compact && w.complete { - w.writeIndent() - } - w.complete = false - return io.WriteString(w.w, s) - } - // WriteString is typically called without newlines, so this - // codepath and its copy are rare. We copy to avoid - // duplicating all of Write's logic here. - return w.Write([]byte(s)) -} - -func (w *textWriter) Write(p []byte) (n int, err error) { - newlines := bytes.Count(p, newline) - if newlines == 0 { - if !w.compact && w.complete { - w.writeIndent() - } - n, err = w.w.Write(p) - w.complete = false - return n, err - } - - frags := bytes.SplitN(p, newline, newlines+1) - if w.compact { - for i, frag := range frags { - if i > 0 { - if err := w.w.WriteByte(' '); err != nil { - return n, err - } - n++ - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - } - return n, nil - } - - for i, frag := range frags { - if w.complete { - w.writeIndent() - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - if i+1 < len(frags) { - if err := w.w.WriteByte('\n'); err != nil { - return n, err - } - n++ - } - } - w.complete = len(frags[len(frags)-1]) == 0 - return n, nil -} - -func (w *textWriter) WriteByte(c byte) error { - if w.compact && c == '\n' { - c = ' ' - } - if !w.compact && w.complete { - w.writeIndent() - } - err := w.w.WriteByte(c) - w.complete = c == '\n' - return err -} - -func (w *textWriter) indent() { w.ind++ } - -func (w *textWriter) unindent() { - if w.ind == 0 { - log.Print("proto: textWriter unindented too far") - return - } - w.ind-- -} - -func writeName(w *textWriter, props *Properties) error { - if _, err := w.WriteString(props.OrigName); err != nil { - return err - } - if props.Wire != "group" { - return w.WriteByte(':') - } - return nil -} - -func requiresQuotes(u string) bool { - // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. - for _, ch := range u { - switch { - case ch == '.' || ch == '/' || ch == '_': - continue - case '0' <= ch && ch <= '9': - continue - case 'A' <= ch && ch <= 'Z': - continue - case 'a' <= ch && ch <= 'z': - continue - default: - return true - } - } - return false -} - -// isAny reports whether sv is a google.protobuf.Any message -func isAny(sv reflect.Value) bool { - type wkt interface { - XXX_WellKnownType() string - } - t, ok := sv.Addr().Interface().(wkt) - return ok && t.XXX_WellKnownType() == "Any" -} - -// writeProto3Any writes an expanded google.protobuf.Any message. -// -// It returns (false, nil) if sv value can't be unmarshaled (e.g. because -// required messages are not linked in). -// -// It returns (true, error) when sv was written in expanded format or an error -// was encountered. -func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { - turl := sv.FieldByName("TypeUrl") - val := sv.FieldByName("Value") - if !turl.IsValid() || !val.IsValid() { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - b, ok := val.Interface().([]byte) - if !ok { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - parts := strings.Split(turl.String(), "/") - mt := MessageType(parts[len(parts)-1]) - if mt == nil { - return false, nil - } - m := reflect.New(mt.Elem()) - if err := Unmarshal(b, m.Interface().(Message)); err != nil { - return false, nil - } - w.Write([]byte("[")) - u := turl.String() - if requiresQuotes(u) { - writeString(w, u) - } else { - w.Write([]byte(u)) - } - if w.compact { - w.Write([]byte("]:<")) - } else { - w.Write([]byte("]: <\n")) - w.ind++ - } - if err := tm.writeStruct(w, m.Elem()); err != nil { - return true, err - } - if w.compact { - w.Write([]byte("> ")) - } else { - w.ind-- - w.Write([]byte(">\n")) - } - return true, nil -} - -func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { - if tm.ExpandAny && isAny(sv) { - if canExpand, err := tm.writeProto3Any(w, sv); canExpand { - return err - } - } - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < sv.NumField(); i++ { - fv := sv.Field(i) - props := sprops.Prop[i] - name := st.Field(i).Name - - if name == "XXX_NoUnkeyedLiteral" { - continue - } - - if strings.HasPrefix(name, "XXX_") { - // There are two XXX_ fields: - // XXX_unrecognized []byte - // XXX_extensions map[int32]proto.Extension - // The first is handled here; - // the second is handled at the bottom of this function. - if name == "XXX_unrecognized" && !fv.IsNil() { - if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Field not filled in. This could be an optional field or - // a required field that wasn't filled in. Either way, there - // isn't anything we can show for it. - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - // Repeated field that is empty, or a bytes field that is unused. - continue - } - - if props.Repeated && fv.Kind() == reflect.Slice { - // Repeated field. - for j := 0; j < fv.Len(); j++ { - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - v := fv.Index(j) - if v.Kind() == reflect.Ptr && v.IsNil() { - // A nil message in a repeated field is not valid, - // but we can handle that more gracefully than panicking. - if _, err := w.Write([]byte("\n")); err != nil { - return err - } - continue - } - if len(props.Enum) > 0 { - if err := tm.writeEnum(w, v, props); err != nil { - return err - } - } else if err := tm.writeAny(w, v, props); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Map { - // Map fields are rendered as a repeated struct with key/value fields. - keys := fv.MapKeys() - sort.Sort(mapKeys(keys)) - for _, key := range keys { - val := fv.MapIndex(key) - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - // open struct - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - // key - if _, err := w.WriteString("key:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - // nil values aren't legal, but we can avoid panicking because of them. - if val.Kind() != reflect.Ptr || !val.IsNil() { - // value - if _, err := w.WriteString("value:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - // close struct - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { - // empty bytes field - continue - } - if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { - // proto3 non-repeated scalar field; skip if zero value - if isProto3Zero(fv) { - continue - } - } - - if fv.Kind() == reflect.Interface { - // Check if it is a oneof. - if st.Field(i).Tag.Get("protobuf_oneof") != "" { - // fv is nil, or holds a pointer to generated struct. - // That generated struct has exactly one field, - // which has a protobuf struct tag. - if fv.IsNil() { - continue - } - inner := fv.Elem().Elem() // interface -> *T -> T - tag := inner.Type().Field(0).Tag.Get("protobuf") - props = new(Properties) // Overwrite the outer props var, but not its pointee. - props.Parse(tag) - // Write the value in the oneof, not the oneof itself. - fv = inner.Field(0) - - // Special case to cope with malformed messages gracefully: - // If the value in the oneof is a nil pointer, don't panic - // in writeAny. - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Use errors.New so writeAny won't render quotes. - msg := errors.New("/* nil */") - fv = reflect.ValueOf(&msg).Elem() - } - } - } - - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - - if len(props.Enum) > 0 { - if err := tm.writeEnum(w, fv, props); err != nil { - return err - } - } else if err := tm.writeAny(w, fv, props); err != nil { - return err - } - - if err := w.WriteByte('\n'); err != nil { - return err - } - } - - // Extensions (the XXX_extensions field). - pv := sv - if pv.CanAddr() { - pv = sv.Addr() - } else { - pv = reflect.New(sv.Type()) - pv.Elem().Set(sv) - } - if _, err := extendable(pv.Interface()); err == nil { - if err := tm.writeExtensions(w, pv); err != nil { - return err - } - } - - return nil -} - -// writeAny writes an arbitrary field. -func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { - v = reflect.Indirect(v) - - if props != nil { - if len(props.CustomType) > 0 { - custom, ok := v.Interface().(Marshaler) - if ok { - data, err := custom.Marshal() - if err != nil { - return err - } - if err := writeString(w, string(data)); err != nil { - return err - } - return nil - } - } else if len(props.CastType) > 0 { - if _, ok := v.Interface().(interface { - String() string - }); ok { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - _, err := fmt.Fprintf(w, "%d", v.Interface()) - return err - } - } - } else if props.StdTime { - t, ok := v.Interface().(time.Time) - if !ok { - return fmt.Errorf("stdtime is not time.Time, but %T", v.Interface()) - } - tproto, err := timestampProto(t) - if err != nil { - return err - } - propsCopy := *props // Make a copy so that this is goroutine-safe - propsCopy.StdTime = false - err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) - return err - } else if props.StdDuration { - d, ok := v.Interface().(time.Duration) - if !ok { - return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) - } - dproto := durationProto(d) - propsCopy := *props // Make a copy so that this is goroutine-safe - propsCopy.StdDuration = false - err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) - return err - } - } - - // Floats have special cases. - if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { - x := v.Float() - var b []byte - switch { - case math.IsInf(x, 1): - b = posInf - case math.IsInf(x, -1): - b = negInf - case math.IsNaN(x): - b = nan - } - if b != nil { - _, err := w.Write(b) - return err - } - // Other values are handled below. - } - - // We don't attempt to serialise every possible value type; only those - // that can occur in protocol buffers. - switch v.Kind() { - case reflect.Slice: - // Should only be a []byte; repeated fields are handled in writeStruct. - if err := writeString(w, string(v.Bytes())); err != nil { - return err - } - case reflect.String: - if err := writeString(w, v.String()); err != nil { - return err - } - case reflect.Struct: - // Required/optional group/message. - var bra, ket byte = '<', '>' - if props != nil && props.Wire == "group" { - bra, ket = '{', '}' - } - if err := w.WriteByte(bra); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if v.CanAddr() { - // Calling v.Interface on a struct causes the reflect package to - // copy the entire struct. This is racy with the new Marshaler - // since we atomically update the XXX_sizecache. - // - // Thus, we retrieve a pointer to the struct if possible to avoid - // a race since v.Interface on the pointer doesn't copy the struct. - // - // If v is not addressable, then we are not worried about a race - // since it implies that the binary Marshaler cannot possibly be - // mutating this value. - v = v.Addr() - } - if etm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = w.Write(text); err != nil { - return err - } - } else { - if v.Kind() == reflect.Ptr { - v = v.Elem() - } - if err := tm.writeStruct(w, v); err != nil { - return err - } - } - w.unindent() - if err := w.WriteByte(ket); err != nil { - return err - } - default: - _, err := fmt.Fprint(w, v.Interface()) - return err - } - return nil -} - -// equivalent to C's isprint. -func isprint(c byte) bool { - return c >= 0x20 && c < 0x7f -} - -// writeString writes a string in the protocol buffer text format. -// It is similar to strconv.Quote except we don't use Go escape sequences, -// we treat the string as a byte sequence, and we use octal escapes. -// These differences are to maintain interoperability with the other -// languages' implementations of the text format. -func writeString(w *textWriter, s string) error { - // use WriteByte here to get any needed indent - if err := w.WriteByte('"'); err != nil { - return err - } - // Loop over the bytes, not the runes. - for i := 0; i < len(s); i++ { - var err error - // Divergence from C++: we don't escape apostrophes. - // There's no need to escape them, and the C++ parser - // copes with a naked apostrophe. - switch c := s[i]; c { - case '\n': - _, err = w.w.Write(backslashN) - case '\r': - _, err = w.w.Write(backslashR) - case '\t': - _, err = w.w.Write(backslashT) - case '"': - _, err = w.w.Write(backslashDQ) - case '\\': - _, err = w.w.Write(backslashBS) - default: - if isprint(c) { - err = w.w.WriteByte(c) - } else { - _, err = fmt.Fprintf(w.w, "\\%03o", c) - } - } - if err != nil { - return err - } - } - return w.WriteByte('"') -} - -func writeUnknownStruct(w *textWriter, data []byte) (err error) { - if !w.compact { - if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { - return err - } - } - b := NewBuffer(data) - for b.index < len(b.buf) { - x, err := b.DecodeVarint() - if err != nil { - _, ferr := fmt.Fprintf(w, "/* %v */\n", err) - return ferr - } - wire, tag := x&7, x>>3 - if wire == WireEndGroup { - w.unindent() - if _, werr := w.Write(endBraceNewline); werr != nil { - return werr - } - continue - } - if _, ferr := fmt.Fprint(w, tag); ferr != nil { - return ferr - } - if wire != WireStartGroup { - if err = w.WriteByte(':'); err != nil { - return err - } - } - if !w.compact || wire == WireStartGroup { - if err = w.WriteByte(' '); err != nil { - return err - } - } - switch wire { - case WireBytes: - buf, e := b.DecodeRawBytes(false) - if e == nil { - _, err = fmt.Fprintf(w, "%q", buf) - } else { - _, err = fmt.Fprintf(w, "/* %v */", e) - } - case WireFixed32: - x, err = b.DecodeFixed32() - err = writeUnknownInt(w, x, err) - case WireFixed64: - x, err = b.DecodeFixed64() - err = writeUnknownInt(w, x, err) - case WireStartGroup: - err = w.WriteByte('{') - w.indent() - case WireVarint: - x, err = b.DecodeVarint() - err = writeUnknownInt(w, x, err) - default: - _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) - } - if err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - return nil -} - -func writeUnknownInt(w *textWriter, x uint64, err error) error { - if err == nil { - _, err = fmt.Fprint(w, x) - } else { - _, err = fmt.Fprintf(w, "/* %v */", err) - } - return err -} - -type int32Slice []int32 - -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// writeExtensions writes all the extensions in pv. -// pv is assumed to be a pointer to a protocol message struct that is extendable. -func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { - emap := extensionMaps[pv.Type().Elem()] - e := pv.Interface().(Message) - - var m map[int32]Extension - var mu sync.Locker - if em, ok := e.(extensionsBytes); ok { - eb := em.GetExtensions() - var err error - m, err = BytesToExtensionsMap(*eb) - if err != nil { - return err - } - mu = notLocker{} - } else if _, ok := e.(extendableProto); ok { - ep, _ := extendable(e) - m, mu = ep.extensionsRead() - if m == nil { - return nil - } - } - - // Order the extensions by ID. - // This isn't strictly necessary, but it will give us - // canonical output, which will also make testing easier. - - mu.Lock() - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - mu.Unlock() - - for _, extNum := range ids { - ext := m[extNum] - var desc *ExtensionDesc - if emap != nil { - desc = emap[extNum] - } - if desc == nil { - // Unknown extension. - if err := writeUnknownStruct(w, ext.enc); err != nil { - return err - } - continue - } - - pb, err := GetExtension(e, desc) - if err != nil { - return fmt.Errorf("failed getting extension: %v", err) - } - - // Repeated extensions will appear as a slice. - if !desc.repeated() { - if err := tm.writeExtension(w, desc.Name, pb); err != nil { - return err - } - } else { - v := reflect.ValueOf(pb) - for i := 0; i < v.Len(); i++ { - if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { - return err - } - } - } - } - return nil -} - -func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { - if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - return nil -} - -func (w *textWriter) writeIndent() { - if !w.complete { - return - } - remain := w.ind * 2 - for remain > 0 { - n := remain - if n > len(spaces) { - n = len(spaces) - } - w.w.Write(spaces[:n]) - remain -= n - } - w.complete = false -} - -// TextMarshaler is a configurable text format marshaler. -type TextMarshaler struct { - Compact bool // use compact text format (one line). - ExpandAny bool // expand google.protobuf.Any messages of known types -} - -// Marshal writes a given protocol buffer in text format. -// The only errors returned are from w. -func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { - val := reflect.ValueOf(pb) - if pb == nil || val.IsNil() { - w.Write([]byte("")) - return nil - } - var bw *bufio.Writer - ww, ok := w.(writer) - if !ok { - bw = bufio.NewWriter(w) - ww = bw - } - aw := &textWriter{ - w: ww, - complete: true, - compact: tm.Compact, - } - - if etm, ok := pb.(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = aw.Write(text); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil - } - // Dereference the received pointer so we don't have outer < and >. - v := reflect.Indirect(val) - if err := tm.writeStruct(aw, v); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil -} - -// Text is the same as Marshal, but returns the string directly. -func (tm *TextMarshaler) Text(pb Message) string { - var buf bytes.Buffer - tm.Marshal(&buf, pb) - return buf.String() -} - -var ( - defaultTextMarshaler = TextMarshaler{} - compactTextMarshaler = TextMarshaler{Compact: true} -) - -// TODO: consider removing some of the Marshal functions below. - -// MarshalText writes a given protocol buffer in text format. -// The only errors returned are from w. -func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } - -// MarshalTextString is the same as MarshalText, but returns the string directly. -func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } - -// CompactText writes a given protocol buffer in compact text format (one line). -func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } - -// CompactTextString is the same as CompactText, but returns the string directly. -func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text_parser.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text_parser.go deleted file mode 100644 index fbb000d374..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto/text_parser.go +++ /dev/null @@ -1,998 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for parsing the Text protocol buffer format. -// TODO: message sets. - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -// Error string emitted when deserializing Any and fields are already set -const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" - -type ParseError struct { - Message string - Line int // 1-based line number - Offset int // 0-based byte offset from start of input -} - -func (p *ParseError) Error() string { - if p.Line == 1 { - // show offset only for first line - return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) - } - return fmt.Sprintf("line %d: %v", p.Line, p.Message) -} - -type token struct { - value string - err *ParseError - line int // line number - offset int // byte number from start of input, not start of line - unquoted string // the unquoted version of value, if it was a quoted string -} - -func (t *token) String() string { - if t.err == nil { - return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) - } - return fmt.Sprintf("parse error: %v", t.err) -} - -type textParser struct { - s string // remaining input - done bool // whether the parsing is finished (success or error) - backed bool // whether back() was called - offset, line int - cur token -} - -func newTextParser(s string) *textParser { - p := new(textParser) - p.s = s - p.line = 1 - p.cur.line = 1 - return p -} - -func (p *textParser) errorf(format string, a ...interface{}) *ParseError { - pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} - p.cur.err = pe - p.done = true - return pe -} - -// Numbers and identifiers are matched by [-+._A-Za-z0-9] -func isIdentOrNumberChar(c byte) bool { - switch { - case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': - return true - case '0' <= c && c <= '9': - return true - } - switch c { - case '-', '+', '.', '_': - return true - } - return false -} - -func isWhitespace(c byte) bool { - switch c { - case ' ', '\t', '\n', '\r': - return true - } - return false -} - -func isQuote(c byte) bool { - switch c { - case '"', '\'': - return true - } - return false -} - -func (p *textParser) skipWhitespace() { - i := 0 - for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { - if p.s[i] == '#' { - // comment; skip to end of line or input - for i < len(p.s) && p.s[i] != '\n' { - i++ - } - if i == len(p.s) { - break - } - } - if p.s[i] == '\n' { - p.line++ - } - i++ - } - p.offset += i - p.s = p.s[i:len(p.s)] - if len(p.s) == 0 { - p.done = true - } -} - -func (p *textParser) advance() { - // Skip whitespace - p.skipWhitespace() - if p.done { - return - } - - // Start of non-whitespace - p.cur.err = nil - p.cur.offset, p.cur.line = p.offset, p.line - p.cur.unquoted = "" - switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': - // Single symbol - p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] - case '"', '\'': - // Quoted string - i := 1 - for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { - if p.s[i] == '\\' && i+1 < len(p.s) { - // skip escaped char - i++ - } - i++ - } - if i >= len(p.s) || p.s[i] != p.s[0] { - p.errorf("unmatched quote") - return - } - unq, err := unquoteC(p.s[1:i], rune(p.s[0])) - if err != nil { - p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) - return - } - p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] - p.cur.unquoted = unq - default: - i := 0 - for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { - i++ - } - if i == 0 { - p.errorf("unexpected byte %#x", p.s[0]) - return - } - p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] - } - p.offset += len(p.cur.value) -} - -var ( - errBadUTF8 = errors.New("proto: bad UTF-8") -) - -func unquoteC(s string, quote rune) (string, error) { - // This is based on C++'s tokenizer.cc. - // Despite its name, this is *not* parsing C syntax. - // For instance, "\0" is an invalid quoted string. - - // Avoid allocation in trivial cases. - simple := true - for _, r := range s { - if r == '\\' || r == quote { - simple = false - break - } - } - if simple { - return s, nil - } - - buf := make([]byte, 0, 3*len(s)/2) - for len(s) > 0 { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", errBadUTF8 - } - s = s[n:] - if r != '\\' { - if r < utf8.RuneSelf { - buf = append(buf, byte(r)) - } else { - buf = append(buf, string(r)...) - } - continue - } - - ch, tail, err := unescape(s) - if err != nil { - return "", err - } - buf = append(buf, ch...) - s = tail - } - return string(buf), nil -} - -func unescape(s string) (ch string, tail string, err error) { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", "", errBadUTF8 - } - s = s[n:] - switch r { - case 'a': - return "\a", s, nil - case 'b': - return "\b", s, nil - case 'f': - return "\f", s, nil - case 'n': - return "\n", s, nil - case 'r': - return "\r", s, nil - case 't': - return "\t", s, nil - case 'v': - return "\v", s, nil - case '?': - return "?", s, nil // trigraph workaround - case '\'', '"', '\\': - return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7': - if len(s) < 2 { - return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) - } - ss := string(r) + s[:2] - s = s[2:] - i, err := strconv.ParseUint(ss, 8, 8) - if err != nil { - return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) - } - return string([]byte{byte(i)}), s, nil - case 'x', 'X', 'u', 'U': - var n int - switch r { - case 'x', 'X': - n = 2 - case 'u': - n = 4 - case 'U': - n = 8 - } - if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) - } - ss := s[:n] - s = s[n:] - i, err := strconv.ParseUint(ss, 16, 64) - if err != nil { - return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) - } - if r == 'x' || r == 'X' { - return string([]byte{byte(i)}), s, nil - } - if i > utf8.MaxRune { - return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) - } - return string(i), s, nil - } - return "", "", fmt.Errorf(`unknown escape \%c`, r) -} - -// Back off the parser by one token. Can only be done between calls to next(). -// It makes the next advance() a no-op. -func (p *textParser) back() { p.backed = true } - -// Advances the parser and returns the new current token. -func (p *textParser) next() *token { - if p.backed || p.done { - p.backed = false - return &p.cur - } - p.advance() - if p.done { - p.cur.value = "" - } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { - // Look for multiple quoted strings separated by whitespace, - // and concatenate them. - cat := p.cur - for { - p.skipWhitespace() - if p.done || !isQuote(p.s[0]) { - break - } - p.advance() - if p.cur.err != nil { - return &p.cur - } - cat.value += " " + p.cur.value - cat.unquoted += p.cur.unquoted - } - p.done = false // parser may have seen EOF, but we want to return cat - p.cur = cat - } - return &p.cur -} - -func (p *textParser) consumeToken(s string) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != s { - p.back() - return p.errorf("expected %q, found %q", s, tok.value) - } - return nil -} - -// Return a RequiredNotSetError indicating which required field was not set. -func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < st.NumField(); i++ { - if !isNil(sv.Field(i)) { - continue - } - - props := sprops.Prop[i] - if props.Required { - return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} - } - } - return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen -} - -// Returns the index in the struct for the named field, as well as the parsed tag properties. -func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { - i, ok := sprops.decoderOrigNames[name] - if ok { - return i, sprops.Prop[i], true - } - return -1, nil, false -} - -// Consume a ':' from the input stream (if the next token is a colon), -// returning an error if a colon is needed but not present. -func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ":" { - // Colon is optional when the field is a group or message. - needColon := true - switch props.Wire { - case "group": - needColon = false - case "bytes": - // A "bytes" field is either a message, a string, or a repeated field; - // those three become *T, *string and []T respectively, so we can check for - // this field being a pointer to a non-string. - if typ.Kind() == reflect.Ptr { - // *T or *string - if typ.Elem().Kind() == reflect.String { - break - } - } else if typ.Kind() == reflect.Slice { - // []T or []*T - if typ.Elem().Kind() != reflect.Ptr { - break - } - } else if typ.Kind() == reflect.String { - // The proto3 exception is for a string field, - // which requires a colon. - break - } - needColon = false - } - if needColon { - return p.errorf("expected ':', found %q", tok.value) - } - p.back() - } - return nil -} - -func (p *textParser) readStruct(sv reflect.Value, terminator string) error { - st := sv.Type() - sprops := GetProperties(st) - reqCount := sprops.reqCount - var reqFieldErr error - fieldSet := make(map[string]bool) - // A struct is a sequence of "name: value", terminated by one of - // '>' or '}', or the end of the input. A name may also be - // "[extension]" or "[type/url]". - // - // The whole struct can also be an expanded Any message, like: - // [type/url] < ... struct contents ... > - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - if tok.value == "[" { - // Looks like an extension or an Any. - // - // TODO: Check whether we need to handle - // namespace rooted names (e.g. ".something.Foo"). - extName, err := p.consumeExtName() - if err != nil { - return err - } - - if s := strings.LastIndex(extName, "/"); s >= 0 { - // If it contains a slash, it's an Any type URL. - messageName := extName[s+1:] - mt := MessageType(messageName) - if mt == nil { - return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) - } - tok = p.next() - if tok.err != nil { - return tok.err - } - // consume an optional colon - if tok.value == ":" { - tok = p.next() - if tok.err != nil { - return tok.err - } - } - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - v := reflect.New(mt.Elem()) - if pe := p.readStruct(v.Elem(), terminator); pe != nil { - return pe - } - b, err := Marshal(v.Interface().(Message)) - if err != nil { - return p.errorf("failed to marshal message of type %q: %v", messageName, err) - } - if fieldSet["type_url"] { - return p.errorf(anyRepeatedlyUnpacked, "type_url") - } - if fieldSet["value"] { - return p.errorf(anyRepeatedlyUnpacked, "value") - } - sv.FieldByName("TypeUrl").SetString(extName) - sv.FieldByName("Value").SetBytes(b) - fieldSet["type_url"] = true - fieldSet["value"] = true - continue - } - - var desc *ExtensionDesc - // This could be faster, but it's functional. - // TODO: Do something smarter than a linear scan. - for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == extName { - desc = d - break - } - } - if desc == nil { - return p.errorf("unrecognized extension %q", extName) - } - - props := &Properties{} - props.Parse(desc.Tag) - - typ := reflect.TypeOf(desc.ExtensionType) - if err := p.checkForColon(props, typ); err != nil { - return err - } - - rep := desc.repeated() - - // Read the extension structure, and set it in - // the value we're constructing. - var ext reflect.Value - if !rep { - ext = reflect.New(typ).Elem() - } else { - ext = reflect.New(typ.Elem()).Elem() - } - if err := p.readAny(ext, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - ep := sv.Addr().Interface().(Message) - if !rep { - SetExtension(ep, desc, ext.Interface()) - } else { - old, err := GetExtension(ep, desc) - var sl reflect.Value - if err == nil { - sl = reflect.ValueOf(old) // existing slice - } else { - sl = reflect.MakeSlice(typ, 0, 1) - } - sl = reflect.Append(sl, ext) - SetExtension(ep, desc, sl.Interface()) - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - continue - } - - // This is a normal, non-extension field. - name := tok.value - var dst reflect.Value - fi, props, ok := structFieldByName(sprops, name) - if ok { - dst = sv.Field(fi) - } else if oop, ok := sprops.OneofTypes[name]; ok { - // It is a oneof. - props = oop.Prop - nv := reflect.New(oop.Type.Elem()) - dst = nv.Elem().Field(0) - field := sv.Field(oop.Field) - if !field.IsNil() { - return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) - } - field.Set(nv) - } - if !dst.IsValid() { - return p.errorf("unknown field name %q in %v", name, st) - } - - if dst.Kind() == reflect.Map { - // Consume any colon. - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Construct the map if it doesn't already exist. - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - key := reflect.New(dst.Type().Key()).Elem() - val := reflect.New(dst.Type().Elem()).Elem() - - // The map entry should be this sequence of tokens: - // < key : KEY value : VALUE > - // However, implementations may omit key or value, and technically - // we should support them in any order. See b/28924776 for a time - // this went wrong. - - tok := p.next() - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - switch tok.value { - case "key": - if err := p.consumeToken(":"); err != nil { - return err - } - if err := p.readAny(key, props.mkeyprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { - return err - } - if err := p.readAny(val, props.mvalprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - default: - p.back() - return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) - } - } - - dst.SetMapIndex(key, val) - continue - } - - // Check that it's not already set if it's not a repeated field. - if !props.Repeated && fieldSet[name] { - return p.errorf("non-repeated field %q was repeated", name) - } - - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Parse into the field. - fieldSet[name] = true - if err := p.readAny(dst, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - if props.Required { - reqCount-- - } - - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - - } - - if reqCount > 0 { - return p.missingRequiredFieldError(sv) - } - return reqFieldErr -} - -// consumeExtName consumes extension name or expanded Any type URL and the -// following ']'. It returns the name or URL consumed. -func (p *textParser) consumeExtName() (string, error) { - tok := p.next() - if tok.err != nil { - return "", tok.err - } - - // If extension name or type url is quoted, it's a single token. - if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { - name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) - if err != nil { - return "", err - } - return name, p.consumeToken("]") - } - - // Consume everything up to "]" - var parts []string - for tok.value != "]" { - parts = append(parts, tok.value) - tok = p.next() - if tok.err != nil { - return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) - } - if p.done && tok.value != "]" { - return "", p.errorf("unclosed type_url or extension name") - } - } - return strings.Join(parts, ""), nil -} - -// consumeOptionalSeparator consumes an optional semicolon or comma. -// It is used in readStruct to provide backward compatibility. -func (p *textParser) consumeOptionalSeparator() error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ";" && tok.value != "," { - p.back() - } - return nil -} - -func (p *textParser) readAny(v reflect.Value, props *Properties) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "" { - return p.errorf("unexpected EOF") - } - if len(props.CustomType) > 0 { - if props.Repeated { - t := reflect.TypeOf(v.Interface()) - if t.Kind() == reflect.Slice { - tc := reflect.TypeOf(new(Marshaler)) - ok := t.Elem().Implements(tc.Elem()) - if ok { - fv := v - flen := fv.Len() - if flen == fv.Cap() { - nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) - reflect.Copy(nav, fv) - fv.Set(nav) - } - fv.SetLen(flen + 1) - - // Read one. - p.back() - return p.readAny(fv.Index(flen), props) - } - } - } - if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { - custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) - err := custom.Unmarshal([]byte(tok.unquoted)) - if err != nil { - return p.errorf("%v %v: %v", err, v.Type(), tok.value) - } - v.Set(reflect.ValueOf(custom)) - } else { - custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) - err := custom.Unmarshal([]byte(tok.unquoted)) - if err != nil { - return p.errorf("%v %v: %v", err, v.Type(), tok.value) - } - v.Set(reflect.Indirect(reflect.ValueOf(custom))) - } - return nil - } - if props.StdTime { - fv := v - p.back() - props.StdTime = false - tproto := ×tamp{} - err := p.readAny(reflect.ValueOf(tproto).Elem(), props) - props.StdTime = true - if err != nil { - return err - } - tim, err := timestampFromProto(tproto) - if err != nil { - return err - } - if props.Repeated { - t := reflect.TypeOf(v.Interface()) - if t.Kind() == reflect.Slice { - if t.Elem().Kind() == reflect.Ptr { - ts := fv.Interface().([]*time.Time) - ts = append(ts, &tim) - fv.Set(reflect.ValueOf(ts)) - return nil - } else { - ts := fv.Interface().([]time.Time) - ts = append(ts, tim) - fv.Set(reflect.ValueOf(ts)) - return nil - } - } - } - if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { - v.Set(reflect.ValueOf(&tim)) - } else { - v.Set(reflect.Indirect(reflect.ValueOf(&tim))) - } - return nil - } - if props.StdDuration { - fv := v - p.back() - props.StdDuration = false - dproto := &duration{} - err := p.readAny(reflect.ValueOf(dproto).Elem(), props) - props.StdDuration = true - if err != nil { - return err - } - dur, err := durationFromProto(dproto) - if err != nil { - return err - } - if props.Repeated { - t := reflect.TypeOf(v.Interface()) - if t.Kind() == reflect.Slice { - if t.Elem().Kind() == reflect.Ptr { - ds := fv.Interface().([]*time.Duration) - ds = append(ds, &dur) - fv.Set(reflect.ValueOf(ds)) - return nil - } else { - ds := fv.Interface().([]time.Duration) - ds = append(ds, dur) - fv.Set(reflect.ValueOf(ds)) - return nil - } - } - } - if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { - v.Set(reflect.ValueOf(&dur)) - } else { - v.Set(reflect.Indirect(reflect.ValueOf(&dur))) - } - return nil - } - switch fv := v; fv.Kind() { - case reflect.Slice: - at := v.Type() - if at.Elem().Kind() == reflect.Uint8 { - // Special case for []byte - if tok.value[0] != '"' && tok.value[0] != '\'' { - // Deliberately written out here, as the error after - // this switch statement would write "invalid []byte: ...", - // which is not as user-friendly. - return p.errorf("invalid string: %v", tok.value) - } - bytes := []byte(tok.unquoted) - fv.Set(reflect.ValueOf(bytes)) - return nil - } - // Repeated field. - if tok.value == "[" { - // Repeated field with list notation, like [1,2,3]. - for { - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - err := p.readAny(fv.Index(fv.Len()-1), props) - if err != nil { - return err - } - ntok := p.next() - if ntok.err != nil { - return ntok.err - } - if ntok.value == "]" { - break - } - if ntok.value != "," { - return p.errorf("Expected ']' or ',' found %q", ntok.value) - } - } - return nil - } - // One value of the repeated field. - p.back() - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - return p.readAny(fv.Index(fv.Len()-1), props) - case reflect.Bool: - // true/1/t/True or false/f/0/False. - switch tok.value { - case "true", "1", "t", "True": - fv.SetBool(true) - return nil - case "false", "0", "f", "False": - fv.SetBool(false) - return nil - } - case reflect.Float32, reflect.Float64: - v := tok.value - // Ignore 'f' for compatibility with output generated by C++, but don't - // remove 'f' when the value is "-inf" or "inf". - if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { - v = v[:len(v)-1] - } - if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { - fv.SetFloat(f) - return nil - } - case reflect.Int32: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - fv.SetInt(x) - return nil - } - - if len(props.Enum) == 0 { - break - } - m, ok := enumValueMaps[props.Enum] - if !ok { - break - } - x, ok := m[tok.value] - if !ok { - break - } - fv.SetInt(int64(x)) - return nil - case reflect.Int64: - if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { - fv.SetInt(x) - return nil - } - - case reflect.Ptr: - // A basic field (indirected through pointer), or a repeated message/group - p.back() - fv.Set(reflect.New(fv.Type().Elem())) - return p.readAny(fv.Elem(), props) - case reflect.String: - if tok.value[0] == '"' || tok.value[0] == '\'' { - fv.SetString(tok.unquoted) - return nil - } - case reflect.Struct: - var terminator string - switch tok.value { - case "{": - terminator = "}" - case "<": - terminator = ">" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - // TODO: Handle nested messages which implement encoding.TextUnmarshaler. - return p.readStruct(fv, terminator) - case reflect.Uint32: - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(uint64(x)) - return nil - } - case reflect.Uint64: - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - fv.SetUint(x) - return nil - } - } - return p.errorf("invalid %v: %v", v.Type(), tok.value) -} - -// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb -// before starting to unmarshal, so any existing data in pb is always removed. -// If a required field is not set and no other error occurs, -// UnmarshalText returns *RequiredNotSetError. -func UnmarshalText(s string, pb Message) error { - if um, ok := pb.(encoding.TextUnmarshaler); ok { - return um.UnmarshalText([]byte(s)) - } - pb.Reset() - v := reflect.ValueOf(pb) - return newTextParser(s).readStruct(v.Elem(), "") -} diff --git a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go deleted file mode 100644 index 254479a52d..0000000000 --- a/vendor/gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go +++ /dev/null @@ -1,2806 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: descriptor.proto - -package descriptor - -import proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type FieldDescriptorProto_Type int32 - -const ( - // 0 is reserved for errors. - // Order is weird for historical reasons. - FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 - FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 - FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 - FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 - FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 - FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 - FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 - // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. - FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 - FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 - // New in version 2. - FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 - FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 - FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 - FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 - FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 - FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 - FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 -) - -var FieldDescriptorProto_Type_name = map[int32]string{ - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", -} -var FieldDescriptorProto_Type_value = map[string]int32{ - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, -} - -func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { - p := new(FieldDescriptorProto_Type) - *p = x - return p -} -func (x FieldDescriptorProto_Type) String() string { - return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) -} -func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") - if err != nil { - return err - } - *x = FieldDescriptorProto_Type(value) - return nil -} -func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 0} -} - -type FieldDescriptorProto_Label int32 - -const ( - // 0 is reserved for errors - FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 - FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 - FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 -) - -var FieldDescriptorProto_Label_name = map[int32]string{ - 1: "LABEL_OPTIONAL", - 2: "LABEL_REQUIRED", - 3: "LABEL_REPEATED", -} -var FieldDescriptorProto_Label_value = map[string]int32{ - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3, -} - -func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { - p := new(FieldDescriptorProto_Label) - *p = x - return p -} -func (x FieldDescriptorProto_Label) String() string { - return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) -} -func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") - if err != nil { - return err - } - *x = FieldDescriptorProto_Label(value) - return nil -} -func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 1} -} - -// Generated classes can be optimized for speed or code size. -type FileOptions_OptimizeMode int32 - -const ( - FileOptions_SPEED FileOptions_OptimizeMode = 1 - // etc. - FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 - FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 -) - -var FileOptions_OptimizeMode_name = map[int32]string{ - 1: "SPEED", - 2: "CODE_SIZE", - 3: "LITE_RUNTIME", -} -var FileOptions_OptimizeMode_value = map[string]int32{ - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3, -} - -func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { - p := new(FileOptions_OptimizeMode) - *p = x - return p -} -func (x FileOptions_OptimizeMode) String() string { - return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) -} -func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") - if err != nil { - return err - } - *x = FileOptions_OptimizeMode(value) - return nil -} -func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10, 0} -} - -type FieldOptions_CType int32 - -const ( - // Default mode. - FieldOptions_STRING FieldOptions_CType = 0 - FieldOptions_CORD FieldOptions_CType = 1 - FieldOptions_STRING_PIECE FieldOptions_CType = 2 -) - -var FieldOptions_CType_name = map[int32]string{ - 0: "STRING", - 1: "CORD", - 2: "STRING_PIECE", -} -var FieldOptions_CType_value = map[string]int32{ - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2, -} - -func (x FieldOptions_CType) Enum() *FieldOptions_CType { - p := new(FieldOptions_CType) - *p = x - return p -} -func (x FieldOptions_CType) String() string { - return proto.EnumName(FieldOptions_CType_name, int32(x)) -} -func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") - if err != nil { - return err - } - *x = FieldOptions_CType(value) - return nil -} -func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 0} -} - -type FieldOptions_JSType int32 - -const ( - // Use the default type. - FieldOptions_JS_NORMAL FieldOptions_JSType = 0 - // Use JavaScript strings. - FieldOptions_JS_STRING FieldOptions_JSType = 1 - // Use JavaScript numbers. - FieldOptions_JS_NUMBER FieldOptions_JSType = 2 -) - -var FieldOptions_JSType_name = map[int32]string{ - 0: "JS_NORMAL", - 1: "JS_STRING", - 2: "JS_NUMBER", -} -var FieldOptions_JSType_value = map[string]int32{ - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2, -} - -func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { - p := new(FieldOptions_JSType) - *p = x - return p -} -func (x FieldOptions_JSType) String() string { - return proto.EnumName(FieldOptions_JSType_name, int32(x)) -} -func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") - if err != nil { - return err - } - *x = FieldOptions_JSType(value) - return nil -} -func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 1} -} - -// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, -// or neither? HTTP based RPC implementation may choose GET verb for safe -// methods, and PUT verb for idempotent methods instead of the default POST. -type MethodOptions_IdempotencyLevel int32 - -const ( - MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 - MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 - MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 -) - -var MethodOptions_IdempotencyLevel_name = map[int32]string{ - 0: "IDEMPOTENCY_UNKNOWN", - 1: "NO_SIDE_EFFECTS", - 2: "IDEMPOTENT", -} -var MethodOptions_IdempotencyLevel_value = map[string]int32{ - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2, -} - -func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { - p := new(MethodOptions_IdempotencyLevel) - *p = x - return p -} -func (x MethodOptions_IdempotencyLevel) String() string { - return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) -} -func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") - if err != nil { - return err - } - *x = MethodOptions_IdempotencyLevel(value) - return nil -} -func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17, 0} -} - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -type FileDescriptorSet struct { - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } -func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorSet) ProtoMessage() {} -func (*FileDescriptorSet) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{0} -} -func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) -} -func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) -} -func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileDescriptorSet.Merge(dst, src) -} -func (m *FileDescriptorSet) XXX_Size() int { - return xxx_messageInfo_FileDescriptorSet.Size(m) -} -func (m *FileDescriptorSet) XXX_DiscardUnknown() { - xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) -} - -var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo - -func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { - if m != nil { - return m.File - } - return nil -} - -// Describes a complete .proto file. -type FileDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` - // Names of files imported by this file. - Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` - // Indexes of the public imported files in the dependency list above. - PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` - // All top-level definitions in this file. - MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` - Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } -func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorProto) ProtoMessage() {} -func (*FileDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{1} -} -func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) -} -func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileDescriptorProto.Merge(dst, src) -} -func (m *FileDescriptorProto) XXX_Size() int { - return xxx_messageInfo_FileDescriptorProto.Size(m) -} -func (m *FileDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo - -func (m *FileDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FileDescriptorProto) GetPackage() string { - if m != nil && m.Package != nil { - return *m.Package - } - return "" -} - -func (m *FileDescriptorProto) GetDependency() []string { - if m != nil { - return m.Dependency - } - return nil -} - -func (m *FileDescriptorProto) GetPublicDependency() []int32 { - if m != nil { - return m.PublicDependency - } - return nil -} - -func (m *FileDescriptorProto) GetWeakDependency() []int32 { - if m != nil { - return m.WeakDependency - } - return nil -} - -func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { - if m != nil { - return m.MessageType - } - return nil -} - -func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { - if m != nil { - return m.Service - } - return nil -} - -func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *FileDescriptorProto) GetOptions() *FileOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { - if m != nil { - return m.SourceCodeInfo - } - return nil -} - -func (m *FileDescriptorProto) GetSyntax() string { - if m != nil && m.Syntax != nil { - return *m.Syntax - } - return "" -} - -// Describes a message type. -type DescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` - NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` - OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` - Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` - ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } -func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto) ProtoMessage() {} -func (*DescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2} -} -func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) -} -func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) -} -func (dst *DescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescriptorProto.Merge(dst, src) -} -func (m *DescriptorProto) XXX_Size() int { - return xxx_messageInfo_DescriptorProto.Size(m) -} -func (m *DescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_DescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo - -func (m *DescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *DescriptorProto) GetField() []*FieldDescriptorProto { - if m != nil { - return m.Field - } - return nil -} - -func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *DescriptorProto) GetNestedType() []*DescriptorProto { - if m != nil { - return m.NestedType - } - return nil -} - -func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { - if m != nil { - return m.ExtensionRange - } - return nil -} - -func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { - if m != nil { - return m.OneofDecl - } - return nil -} - -func (m *DescriptorProto) GetOptions() *MessageOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { - if m != nil { - return m.ReservedRange - } - return nil -} - -func (m *DescriptorProto) GetReservedName() []string { - if m != nil { - return m.ReservedName - } - return nil -} - -type DescriptorProto_ExtensionRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } -func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ExtensionRange) ProtoMessage() {} -func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 0} -} -func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) -} -func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) -} -func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src) -} -func (m *DescriptorProto_ExtensionRange) XXX_Size() int { - return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) -} -func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() { - xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m) -} - -var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo - -func (m *DescriptorProto_ExtensionRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { - if m != nil { - return m.Options - } - return nil -} - -// Range of reserved tag numbers. Reserved tag numbers may not be used by -// fields or extension ranges in the same message. Reserved ranges may -// not overlap. -type DescriptorProto_ReservedRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } -func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ReservedRange) ProtoMessage() {} -func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 1} -} -func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) -} -func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) -} -func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src) -} -func (m *DescriptorProto_ReservedRange) XXX_Size() int { - return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) -} -func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() { - xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m) -} - -var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo - -func (m *DescriptorProto_ReservedRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ReservedRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -type ExtensionRangeOptions struct { - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} } -func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } -func (*ExtensionRangeOptions) ProtoMessage() {} -func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{3} -} - -var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ExtensionRangeOptions -} -func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) -} -func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) -} -func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src) -} -func (m *ExtensionRangeOptions) XXX_Size() int { - return xxx_messageInfo_ExtensionRangeOptions.Size(m) -} -func (m *ExtensionRangeOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo - -func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -// Describes a field within a message. -type FieldDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` - Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` - Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } -func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FieldDescriptorProto) ProtoMessage() {} -func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4} -} -func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) -} -func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldDescriptorProto.Merge(dst, src) -} -func (m *FieldDescriptorProto) XXX_Size() int { - return xxx_messageInfo_FieldDescriptorProto.Size(m) -} -func (m *FieldDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo - -func (m *FieldDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FieldDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { - if m != nil && m.Label != nil { - return *m.Label - } - return FieldDescriptorProto_LABEL_OPTIONAL -} - -func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return FieldDescriptorProto_TYPE_DOUBLE -} - -func (m *FieldDescriptorProto) GetTypeName() string { - if m != nil && m.TypeName != nil { - return *m.TypeName - } - return "" -} - -func (m *FieldDescriptorProto) GetExtendee() string { - if m != nil && m.Extendee != nil { - return *m.Extendee - } - return "" -} - -func (m *FieldDescriptorProto) GetDefaultValue() string { - if m != nil && m.DefaultValue != nil { - return *m.DefaultValue - } - return "" -} - -func (m *FieldDescriptorProto) GetOneofIndex() int32 { - if m != nil && m.OneofIndex != nil { - return *m.OneofIndex - } - return 0 -} - -func (m *FieldDescriptorProto) GetJsonName() string { - if m != nil && m.JsonName != nil { - return *m.JsonName - } - return "" -} - -func (m *FieldDescriptorProto) GetOptions() *FieldOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a oneof. -type OneofDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } -func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*OneofDescriptorProto) ProtoMessage() {} -func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{5} -} -func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) -} -func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_OneofDescriptorProto.Merge(dst, src) -} -func (m *OneofDescriptorProto) XXX_Size() int { - return xxx_messageInfo_OneofDescriptorProto.Size(m) -} -func (m *OneofDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo - -func (m *OneofDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *OneofDescriptorProto) GetOptions() *OneofOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes an enum type. -type EnumDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } -func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumDescriptorProto) ProtoMessage() {} -func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6} -} -func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) -} -func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumDescriptorProto.Merge(dst, src) -} -func (m *EnumDescriptorProto) XXX_Size() int { - return xxx_messageInfo_EnumDescriptorProto.Size(m) -} -func (m *EnumDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo - -func (m *EnumDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { - if m != nil { - return m.Value - } - return nil -} - -func (m *EnumDescriptorProto) GetOptions() *EnumOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { - if m != nil { - return m.ReservedRange - } - return nil -} - -func (m *EnumDescriptorProto) GetReservedName() []string { - if m != nil { - return m.ReservedName - } - return nil -} - -// Range of reserved numeric values. Reserved values may not be used by -// entries in the same enum. Reserved ranges may not overlap. -// -// Note that this is distinct from DescriptorProto.ReservedRange in that it -// is inclusive such that it can appropriately represent the entire int32 -// domain. -type EnumDescriptorProto_EnumReservedRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} } -func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } -func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} -func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6, 0} -} -func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) -} -func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) -} -func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src) -} -func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { - return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) -} -func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() { - xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo - -func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -// Describes a value within an enum. -type EnumValueDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } -func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumValueDescriptorProto) ProtoMessage() {} -func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{7} -} -func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) -} -func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src) -} -func (m *EnumValueDescriptorProto) XXX_Size() int { - return xxx_messageInfo_EnumValueDescriptorProto.Size(m) -} -func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo - -func (m *EnumValueDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumValueDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a service. -type ServiceDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } -func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*ServiceDescriptorProto) ProtoMessage() {} -func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{8} -} -func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) -} -func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src) -} -func (m *ServiceDescriptorProto) XXX_Size() int { - return xxx_messageInfo_ServiceDescriptorProto.Size(m) -} -func (m *ServiceDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo - -func (m *ServiceDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { - if m != nil { - return m.Method - } - return nil -} - -func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a method of a service. -type MethodDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` - OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` - Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` - // Identifies if client streams multiple client messages - ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` - // Identifies if server streams multiple server messages - ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } -func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*MethodDescriptorProto) ProtoMessage() {} -func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{9} -} -func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) -} -func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) -} -func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_MethodDescriptorProto.Merge(dst, src) -} -func (m *MethodDescriptorProto) XXX_Size() int { - return xxx_messageInfo_MethodDescriptorProto.Size(m) -} -func (m *MethodDescriptorProto) XXX_DiscardUnknown() { - xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m) -} - -var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo - -const Default_MethodDescriptorProto_ClientStreaming bool = false -const Default_MethodDescriptorProto_ServerStreaming bool = false - -func (m *MethodDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MethodDescriptorProto) GetInputType() string { - if m != nil && m.InputType != nil { - return *m.InputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOutputType() string { - if m != nil && m.OutputType != nil { - return *m.OutputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOptions() *MethodOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *MethodDescriptorProto) GetClientStreaming() bool { - if m != nil && m.ClientStreaming != nil { - return *m.ClientStreaming - } - return Default_MethodDescriptorProto_ClientStreaming -} - -func (m *MethodDescriptorProto) GetServerStreaming() bool { - if m != nil && m.ServerStreaming != nil { - return *m.ServerStreaming - } - return Default_MethodDescriptorProto_ServerStreaming -} - -type FileOptions struct { - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` - // This option does nothing. - JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use. - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` - OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` - JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` - PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` - PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` - // Namespace for generated classes; defaults to the package. - CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FileOptions) Reset() { *m = FileOptions{} } -func (m *FileOptions) String() string { return proto.CompactTextString(m) } -func (*FileOptions) ProtoMessage() {} -func (*FileOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10} -} - -var extRange_FileOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FileOptions -} -func (m *FileOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FileOptions.Unmarshal(m, b) -} -func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) -} -func (dst *FileOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileOptions.Merge(dst, src) -} -func (m *FileOptions) XXX_Size() int { - return xxx_messageInfo_FileOptions.Size(m) -} -func (m *FileOptions) XXX_DiscardUnknown() { - xxx_messageInfo_FileOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_FileOptions proto.InternalMessageInfo - -const Default_FileOptions_JavaMultipleFiles bool = false -const Default_FileOptions_JavaStringCheckUtf8 bool = false -const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED -const Default_FileOptions_CcGenericServices bool = false -const Default_FileOptions_JavaGenericServices bool = false -const Default_FileOptions_PyGenericServices bool = false -const Default_FileOptions_PhpGenericServices bool = false -const Default_FileOptions_Deprecated bool = false -const Default_FileOptions_CcEnableArenas bool = false - -func (m *FileOptions) GetJavaPackage() string { - if m != nil && m.JavaPackage != nil { - return *m.JavaPackage - } - return "" -} - -func (m *FileOptions) GetJavaOuterClassname() string { - if m != nil && m.JavaOuterClassname != nil { - return *m.JavaOuterClassname - } - return "" -} - -func (m *FileOptions) GetJavaMultipleFiles() bool { - if m != nil && m.JavaMultipleFiles != nil { - return *m.JavaMultipleFiles - } - return Default_FileOptions_JavaMultipleFiles -} - -// Deprecated: Do not use. -func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { - if m != nil && m.JavaGenerateEqualsAndHash != nil { - return *m.JavaGenerateEqualsAndHash - } - return false -} - -func (m *FileOptions) GetJavaStringCheckUtf8() bool { - if m != nil && m.JavaStringCheckUtf8 != nil { - return *m.JavaStringCheckUtf8 - } - return Default_FileOptions_JavaStringCheckUtf8 -} - -func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { - if m != nil && m.OptimizeFor != nil { - return *m.OptimizeFor - } - return Default_FileOptions_OptimizeFor -} - -func (m *FileOptions) GetGoPackage() string { - if m != nil && m.GoPackage != nil { - return *m.GoPackage - } - return "" -} - -func (m *FileOptions) GetCcGenericServices() bool { - if m != nil && m.CcGenericServices != nil { - return *m.CcGenericServices - } - return Default_FileOptions_CcGenericServices -} - -func (m *FileOptions) GetJavaGenericServices() bool { - if m != nil && m.JavaGenericServices != nil { - return *m.JavaGenericServices - } - return Default_FileOptions_JavaGenericServices -} - -func (m *FileOptions) GetPyGenericServices() bool { - if m != nil && m.PyGenericServices != nil { - return *m.PyGenericServices - } - return Default_FileOptions_PyGenericServices -} - -func (m *FileOptions) GetPhpGenericServices() bool { - if m != nil && m.PhpGenericServices != nil { - return *m.PhpGenericServices - } - return Default_FileOptions_PhpGenericServices -} - -func (m *FileOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FileOptions_Deprecated -} - -func (m *FileOptions) GetCcEnableArenas() bool { - if m != nil && m.CcEnableArenas != nil { - return *m.CcEnableArenas - } - return Default_FileOptions_CcEnableArenas -} - -func (m *FileOptions) GetObjcClassPrefix() string { - if m != nil && m.ObjcClassPrefix != nil { - return *m.ObjcClassPrefix - } - return "" -} - -func (m *FileOptions) GetCsharpNamespace() string { - if m != nil && m.CsharpNamespace != nil { - return *m.CsharpNamespace - } - return "" -} - -func (m *FileOptions) GetSwiftPrefix() string { - if m != nil && m.SwiftPrefix != nil { - return *m.SwiftPrefix - } - return "" -} - -func (m *FileOptions) GetPhpClassPrefix() string { - if m != nil && m.PhpClassPrefix != nil { - return *m.PhpClassPrefix - } - return "" -} - -func (m *FileOptions) GetPhpNamespace() string { - if m != nil && m.PhpNamespace != nil { - return *m.PhpNamespace - } - return "" -} - -func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MessageOptions struct { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MessageOptions) Reset() { *m = MessageOptions{} } -func (m *MessageOptions) String() string { return proto.CompactTextString(m) } -func (*MessageOptions) ProtoMessage() {} -func (*MessageOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{11} -} - -var extRange_MessageOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MessageOptions -} -func (m *MessageOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MessageOptions.Unmarshal(m, b) -} -func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) -} -func (dst *MessageOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_MessageOptions.Merge(dst, src) -} -func (m *MessageOptions) XXX_Size() int { - return xxx_messageInfo_MessageOptions.Size(m) -} -func (m *MessageOptions) XXX_DiscardUnknown() { - xxx_messageInfo_MessageOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_MessageOptions proto.InternalMessageInfo - -const Default_MessageOptions_MessageSetWireFormat bool = false -const Default_MessageOptions_NoStandardDescriptorAccessor bool = false -const Default_MessageOptions_Deprecated bool = false - -func (m *MessageOptions) GetMessageSetWireFormat() bool { - if m != nil && m.MessageSetWireFormat != nil { - return *m.MessageSetWireFormat - } - return Default_MessageOptions_MessageSetWireFormat -} - -func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { - if m != nil && m.NoStandardDescriptorAccessor != nil { - return *m.NoStandardDescriptorAccessor - } - return Default_MessageOptions_NoStandardDescriptorAccessor -} - -func (m *MessageOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MessageOptions_Deprecated -} - -func (m *MessageOptions) GetMapEntry() bool { - if m != nil && m.MapEntry != nil { - return *m.MapEntry - } - return false -} - -func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type FieldOptions struct { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // For Google-internal migration only. Do not use. - Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldOptions) Reset() { *m = FieldOptions{} } -func (m *FieldOptions) String() string { return proto.CompactTextString(m) } -func (*FieldOptions) ProtoMessage() {} -func (*FieldOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12} -} - -var extRange_FieldOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FieldOptions -} -func (m *FieldOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldOptions.Unmarshal(m, b) -} -func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) -} -func (dst *FieldOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldOptions.Merge(dst, src) -} -func (m *FieldOptions) XXX_Size() int { - return xxx_messageInfo_FieldOptions.Size(m) -} -func (m *FieldOptions) XXX_DiscardUnknown() { - xxx_messageInfo_FieldOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldOptions proto.InternalMessageInfo - -const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING -const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL -const Default_FieldOptions_Lazy bool = false -const Default_FieldOptions_Deprecated bool = false -const Default_FieldOptions_Weak bool = false - -func (m *FieldOptions) GetCtype() FieldOptions_CType { - if m != nil && m.Ctype != nil { - return *m.Ctype - } - return Default_FieldOptions_Ctype -} - -func (m *FieldOptions) GetPacked() bool { - if m != nil && m.Packed != nil { - return *m.Packed - } - return false -} - -func (m *FieldOptions) GetJstype() FieldOptions_JSType { - if m != nil && m.Jstype != nil { - return *m.Jstype - } - return Default_FieldOptions_Jstype -} - -func (m *FieldOptions) GetLazy() bool { - if m != nil && m.Lazy != nil { - return *m.Lazy - } - return Default_FieldOptions_Lazy -} - -func (m *FieldOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FieldOptions_Deprecated -} - -func (m *FieldOptions) GetWeak() bool { - if m != nil && m.Weak != nil { - return *m.Weak - } - return Default_FieldOptions_Weak -} - -func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type OneofOptions struct { - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *OneofOptions) Reset() { *m = OneofOptions{} } -func (m *OneofOptions) String() string { return proto.CompactTextString(m) } -func (*OneofOptions) ProtoMessage() {} -func (*OneofOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{13} -} - -var extRange_OneofOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OneofOptions -} -func (m *OneofOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OneofOptions.Unmarshal(m, b) -} -func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) -} -func (dst *OneofOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_OneofOptions.Merge(dst, src) -} -func (m *OneofOptions) XXX_Size() int { - return xxx_messageInfo_OneofOptions.Size(m) -} -func (m *OneofOptions) XXX_DiscardUnknown() { - xxx_messageInfo_OneofOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_OneofOptions proto.InternalMessageInfo - -func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumOptions struct { - // Set this option to true to allow mapping different tag names to the same - // value. - AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumOptions) Reset() { *m = EnumOptions{} } -func (m *EnumOptions) String() string { return proto.CompactTextString(m) } -func (*EnumOptions) ProtoMessage() {} -func (*EnumOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{14} -} - -var extRange_EnumOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumOptions -} -func (m *EnumOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumOptions.Unmarshal(m, b) -} -func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) -} -func (dst *EnumOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumOptions.Merge(dst, src) -} -func (m *EnumOptions) XXX_Size() int { - return xxx_messageInfo_EnumOptions.Size(m) -} -func (m *EnumOptions) XXX_DiscardUnknown() { - xxx_messageInfo_EnumOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumOptions proto.InternalMessageInfo - -const Default_EnumOptions_Deprecated bool = false - -func (m *EnumOptions) GetAllowAlias() bool { - if m != nil && m.AllowAlias != nil { - return *m.AllowAlias - } - return false -} - -func (m *EnumOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumOptions_Deprecated -} - -func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumValueOptions struct { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } -func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } -func (*EnumValueOptions) ProtoMessage() {} -func (*EnumValueOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{15} -} - -var extRange_EnumValueOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumValueOptions -} -func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) -} -func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) -} -func (dst *EnumValueOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumValueOptions.Merge(dst, src) -} -func (m *EnumValueOptions) XXX_Size() int { - return xxx_messageInfo_EnumValueOptions.Size(m) -} -func (m *EnumValueOptions) XXX_DiscardUnknown() { - xxx_messageInfo_EnumValueOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo - -const Default_EnumValueOptions_Deprecated bool = false - -func (m *EnumValueOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumValueOptions_Deprecated -} - -func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type ServiceOptions struct { - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } -func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } -func (*ServiceOptions) ProtoMessage() {} -func (*ServiceOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{16} -} - -var extRange_ServiceOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ServiceOptions -} -func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) -} -func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) -} -func (dst *ServiceOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceOptions.Merge(dst, src) -} -func (m *ServiceOptions) XXX_Size() int { - return xxx_messageInfo_ServiceOptions.Size(m) -} -func (m *ServiceOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo - -const Default_ServiceOptions_Deprecated bool = false - -func (m *ServiceOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_ServiceOptions_Deprecated -} - -func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MethodOptions struct { - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MethodOptions) Reset() { *m = MethodOptions{} } -func (m *MethodOptions) String() string { return proto.CompactTextString(m) } -func (*MethodOptions) ProtoMessage() {} -func (*MethodOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17} -} - -var extRange_MethodOptions = []proto.ExtensionRange{ - {Start: 1000, End: 536870911}, -} - -func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MethodOptions -} -func (m *MethodOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MethodOptions.Unmarshal(m, b) -} -func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) -} -func (dst *MethodOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_MethodOptions.Merge(dst, src) -} -func (m *MethodOptions) XXX_Size() int { - return xxx_messageInfo_MethodOptions.Size(m) -} -func (m *MethodOptions) XXX_DiscardUnknown() { - xxx_messageInfo_MethodOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_MethodOptions proto.InternalMessageInfo - -const Default_MethodOptions_Deprecated bool = false -const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN - -func (m *MethodOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MethodOptions_Deprecated -} - -func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { - if m != nil && m.IdempotencyLevel != nil { - return *m.IdempotencyLevel - } - return Default_MethodOptions_IdempotencyLevel -} - -func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -type UninterpretedOption struct { - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` - PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` - NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` - StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } -func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption) ProtoMessage() {} -func (*UninterpretedOption) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18} -} -func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) -} -func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) -} -func (dst *UninterpretedOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_UninterpretedOption.Merge(dst, src) -} -func (m *UninterpretedOption) XXX_Size() int { - return xxx_messageInfo_UninterpretedOption.Size(m) -} -func (m *UninterpretedOption) XXX_DiscardUnknown() { - xxx_messageInfo_UninterpretedOption.DiscardUnknown(m) -} - -var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo - -func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { - if m != nil { - return m.Name - } - return nil -} - -func (m *UninterpretedOption) GetIdentifierValue() string { - if m != nil && m.IdentifierValue != nil { - return *m.IdentifierValue - } - return "" -} - -func (m *UninterpretedOption) GetPositiveIntValue() uint64 { - if m != nil && m.PositiveIntValue != nil { - return *m.PositiveIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetNegativeIntValue() int64 { - if m != nil && m.NegativeIntValue != nil { - return *m.NegativeIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetDoubleValue() float64 { - if m != nil && m.DoubleValue != nil { - return *m.DoubleValue - } - return 0 -} - -func (m *UninterpretedOption) GetStringValue() []byte { - if m != nil { - return m.StringValue - } - return nil -} - -func (m *UninterpretedOption) GetAggregateValue() string { - if m != nil && m.AggregateValue != nil { - return *m.AggregateValue - } - return "" -} - -// The name of the uninterpreted option. Each string represents a segment in -// a dot-separated name. is_extension is true iff a segment represents an -// extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". -type UninterpretedOption_NamePart struct { - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } -func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption_NamePart) ProtoMessage() {} -func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18, 0} -} -func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) -} -func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) -} -func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { - xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src) -} -func (m *UninterpretedOption_NamePart) XXX_Size() int { - return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) -} -func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() { - xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m) -} - -var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo - -func (m *UninterpretedOption_NamePart) GetNamePart() string { - if m != nil && m.NamePart != nil { - return *m.NamePart - } - return "" -} - -func (m *UninterpretedOption_NamePart) GetIsExtension() bool { - if m != nil && m.IsExtension != nil { - return *m.IsExtension - } - return false -} - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -type SourceCodeInfo struct { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } -func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo) ProtoMessage() {} -func (*SourceCodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19} -} -func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) -} -func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) -} -func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SourceCodeInfo.Merge(dst, src) -} -func (m *SourceCodeInfo) XXX_Size() int { - return xxx_messageInfo_SourceCodeInfo.Size(m) -} -func (m *SourceCodeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo - -func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { - if m != nil { - return m.Location - } - return nil -} - -type SourceCodeInfo_Location struct { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` - TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` - LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } -func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo_Location) ProtoMessage() {} -func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19, 0} -} -func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) -} -func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) -} -func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { - xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src) -} -func (m *SourceCodeInfo_Location) XXX_Size() int { - return xxx_messageInfo_SourceCodeInfo_Location.Size(m) -} -func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() { - xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m) -} - -var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo - -func (m *SourceCodeInfo_Location) GetPath() []int32 { - if m != nil { - return m.Path - } - return nil -} - -func (m *SourceCodeInfo_Location) GetSpan() []int32 { - if m != nil { - return m.Span - } - return nil -} - -func (m *SourceCodeInfo_Location) GetLeadingComments() string { - if m != nil && m.LeadingComments != nil { - return *m.LeadingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetTrailingComments() string { - if m != nil && m.TrailingComments != nil { - return *m.TrailingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { - if m != nil { - return m.LeadingDetachedComments - } - return nil -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -type GeneratedCodeInfo struct { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } -func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } -func (*GeneratedCodeInfo) ProtoMessage() {} -func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20} -} -func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) -} -func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) -} -func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src) -} -func (m *GeneratedCodeInfo) XXX_Size() int { - return xxx_messageInfo_GeneratedCodeInfo.Size(m) -} -func (m *GeneratedCodeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo - -func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { - if m != nil { - return m.Annotation - } - return nil -} - -type GeneratedCodeInfo_Annotation struct { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Identifies the filesystem path to the original source .proto. - SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } -func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } -func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} -func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { - return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20, 0} -} -func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) -} -func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) -} -func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src) -} -func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { - return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) -} -func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m) -} - -var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo - -func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { - if m != nil { - return m.Path - } - return nil -} - -func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { - if m != nil && m.SourceFile != nil { - return *m.SourceFile - } - return "" -} - -func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { - if m != nil && m.Begin != nil { - return *m.Begin - } - return 0 -} - -func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -func init() { - proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") - proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") - proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") - proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") - proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") - proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions") - proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") - proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") - proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") - proto.RegisterType((*EnumDescriptorProto_EnumReservedRange)(nil), "google.protobuf.EnumDescriptorProto.EnumReservedRange") - proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") - proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") - proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") - proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") - proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") - proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") - proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") - proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") - proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") - proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") - proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") - proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") - proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") - proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") - proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") - proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") - proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) - proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) - proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) - proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) - proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) -} - -func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_descriptor_9588782fb9cbecd6) } - -var fileDescriptor_descriptor_9588782fb9cbecd6 = []byte{ - // 2487 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0xe5, 0xf1, 0xd8, 0x9b, 0x30, 0xde, 0x8f, 0x38, 0xda, 0x8f, - 0x38, 0x49, 0xab, 0x2c, 0x9c, 0xc4, 0xc9, 0x3a, 0xc5, 0xb6, 0xb2, 0xc4, 0x78, 0x95, 0xca, 0x92, - 0x4a, 0xc9, 0xdd, 0x64, 0x8b, 0x82, 0x18, 0x93, 0x23, 0x89, 0x09, 0x45, 0x72, 0x49, 0x2a, 0x89, - 0x83, 0x1e, 0x02, 0xf4, 0xd4, 0xff, 0xa0, 0x28, 0x8a, 0x1e, 0x7a, 0x59, 0xa0, 0xd7, 0x02, 0x05, - 0xda, 0x7b, 0xaf, 0x05, 0x7a, 0xef, 0xa1, 0x40, 0x0b, 0xb4, 0x7f, 0x42, 0x8f, 0xc5, 0xcc, 0x90, - 0x14, 0xf5, 0x95, 0x78, 0x17, 0x48, 0xf6, 0x64, 0xcf, 0xef, 0xfd, 0xde, 0xe3, 0x9b, 0x37, 0x6f, - 0xde, 0xbc, 0x19, 0x01, 0xd2, 0xa9, 0xa7, 0xb9, 0x86, 0xe3, 0xdb, 0x6e, 0xc5, 0x71, 0x6d, 0xdf, - 0xc6, 0x6b, 0x03, 0xdb, 0x1e, 0x98, 0x54, 0x8c, 0x4e, 0xc6, 0xfd, 0xf2, 0x11, 0xac, 0xdf, 0x33, - 0x4c, 0x5a, 0x8f, 0x88, 0x5d, 0xea, 0xe3, 0x3b, 0x90, 0xee, 0x1b, 0x26, 0x95, 0x12, 0xdb, 0xa9, - 0x9d, 0xc2, 0xee, 0x87, 0x95, 0x19, 0xa5, 0xca, 0xb4, 0x46, 0x87, 0xc1, 0x0a, 0xd7, 0x28, 0xff, - 0x3b, 0x0d, 0x1b, 0x0b, 0xa4, 0x18, 0x43, 0xda, 0x22, 0x23, 0x66, 0x31, 0xb1, 0x93, 0x57, 0xf8, - 0xff, 0x58, 0x82, 0x15, 0x87, 0x68, 0x8f, 0xc9, 0x80, 0x4a, 0x49, 0x0e, 0x87, 0x43, 0xfc, 0x3e, - 0x80, 0x4e, 0x1d, 0x6a, 0xe9, 0xd4, 0xd2, 0x4e, 0xa5, 0xd4, 0x76, 0x6a, 0x27, 0xaf, 0xc4, 0x10, - 0x7c, 0x0d, 0xd6, 0x9d, 0xf1, 0x89, 0x69, 0x68, 0x6a, 0x8c, 0x06, 0xdb, 0xa9, 0x9d, 0x8c, 0x82, - 0x84, 0xa0, 0x3e, 0x21, 0x5f, 0x86, 0xb5, 0xa7, 0x94, 0x3c, 0x8e, 0x53, 0x0b, 0x9c, 0x5a, 0x62, - 0x70, 0x8c, 0x58, 0x83, 0xe2, 0x88, 0x7a, 0x1e, 0x19, 0x50, 0xd5, 0x3f, 0x75, 0xa8, 0x94, 0xe6, - 0xb3, 0xdf, 0x9e, 0x9b, 0xfd, 0xec, 0xcc, 0x0b, 0x81, 0x56, 0xef, 0xd4, 0xa1, 0xb8, 0x0a, 0x79, - 0x6a, 0x8d, 0x47, 0xc2, 0x42, 0x66, 0x49, 0xfc, 0x64, 0x6b, 0x3c, 0x9a, 0xb5, 0x92, 0x63, 0x6a, - 0x81, 0x89, 0x15, 0x8f, 0xba, 0x4f, 0x0c, 0x8d, 0x4a, 0x59, 0x6e, 0xe0, 0xf2, 0x9c, 0x81, 0xae, - 0x90, 0xcf, 0xda, 0x08, 0xf5, 0x70, 0x0d, 0xf2, 0xf4, 0x99, 0x4f, 0x2d, 0xcf, 0xb0, 0x2d, 0x69, - 0x85, 0x1b, 0xf9, 0x68, 0xc1, 0x2a, 0x52, 0x53, 0x9f, 0x35, 0x31, 0xd1, 0xc3, 0x7b, 0xb0, 0x62, - 0x3b, 0xbe, 0x61, 0x5b, 0x9e, 0x94, 0xdb, 0x4e, 0xec, 0x14, 0x76, 0xdf, 0x5d, 0x98, 0x08, 0x6d, - 0xc1, 0x51, 0x42, 0x32, 0x6e, 0x00, 0xf2, 0xec, 0xb1, 0xab, 0x51, 0x55, 0xb3, 0x75, 0xaa, 0x1a, - 0x56, 0xdf, 0x96, 0xf2, 0xdc, 0xc0, 0xc5, 0xf9, 0x89, 0x70, 0x62, 0xcd, 0xd6, 0x69, 0xc3, 0xea, - 0xdb, 0x4a, 0xc9, 0x9b, 0x1a, 0xe3, 0x73, 0x90, 0xf5, 0x4e, 0x2d, 0x9f, 0x3c, 0x93, 0x8a, 0x3c, - 0x43, 0x82, 0x51, 0xf9, 0xcf, 0x59, 0x58, 0x3b, 0x4b, 0x8a, 0xdd, 0x85, 0x4c, 0x9f, 0xcd, 0x52, - 0x4a, 0x7e, 0x93, 0x18, 0x08, 0x9d, 0xe9, 0x20, 0x66, 0xbf, 0x65, 0x10, 0xab, 0x50, 0xb0, 0xa8, - 0xe7, 0x53, 0x5d, 0x64, 0x44, 0xea, 0x8c, 0x39, 0x05, 0x42, 0x69, 0x3e, 0xa5, 0xd2, 0xdf, 0x2a, - 0xa5, 0x1e, 0xc0, 0x5a, 0xe4, 0x92, 0xea, 0x12, 0x6b, 0x10, 0xe6, 0xe6, 0xf5, 0x57, 0x79, 0x52, - 0x91, 0x43, 0x3d, 0x85, 0xa9, 0x29, 0x25, 0x3a, 0x35, 0xc6, 0x75, 0x00, 0xdb, 0xa2, 0x76, 0x5f, - 0xd5, 0xa9, 0x66, 0x4a, 0xb9, 0x25, 0x51, 0x6a, 0x33, 0xca, 0x5c, 0x94, 0x6c, 0x81, 0x6a, 0x26, - 0xfe, 0x74, 0x92, 0x6a, 0x2b, 0x4b, 0x32, 0xe5, 0x48, 0x6c, 0xb2, 0xb9, 0x6c, 0x3b, 0x86, 0x92, - 0x4b, 0x59, 0xde, 0x53, 0x3d, 0x98, 0x59, 0x9e, 0x3b, 0x51, 0x79, 0xe5, 0xcc, 0x94, 0x40, 0x4d, - 0x4c, 0x6c, 0xd5, 0x8d, 0x0f, 0xf1, 0x07, 0x10, 0x01, 0x2a, 0x4f, 0x2b, 0xe0, 0x55, 0xa8, 0x18, - 0x82, 0x2d, 0x32, 0xa2, 0x5b, 0xcf, 0xa1, 0x34, 0x1d, 0x1e, 0xbc, 0x09, 0x19, 0xcf, 0x27, 0xae, - 0xcf, 0xb3, 0x30, 0xa3, 0x88, 0x01, 0x46, 0x90, 0xa2, 0x96, 0xce, 0xab, 0x5c, 0x46, 0x61, 0xff, - 0xe2, 0x1f, 0x4d, 0x26, 0x9c, 0xe2, 0x13, 0xfe, 0x78, 0x7e, 0x45, 0xa7, 0x2c, 0xcf, 0xce, 0x7b, - 0xeb, 0x36, 0xac, 0x4e, 0x4d, 0xe0, 0xac, 0x9f, 0x2e, 0xff, 0x02, 0xde, 0x5e, 0x68, 0x1a, 0x3f, - 0x80, 0xcd, 0xb1, 0x65, 0x58, 0x3e, 0x75, 0x1d, 0x97, 0xb2, 0x8c, 0x15, 0x9f, 0x92, 0xfe, 0xb3, - 0xb2, 0x24, 0xe7, 0x8e, 0xe3, 0x6c, 0x61, 0x45, 0xd9, 0x18, 0xcf, 0x83, 0x57, 0xf3, 0xb9, 0xff, - 0xae, 0xa0, 0x17, 0x2f, 0x5e, 0xbc, 0x48, 0x96, 0x7f, 0x9d, 0x85, 0xcd, 0x45, 0x7b, 0x66, 0xe1, - 0xf6, 0x3d, 0x07, 0x59, 0x6b, 0x3c, 0x3a, 0xa1, 0x2e, 0x0f, 0x52, 0x46, 0x09, 0x46, 0xb8, 0x0a, - 0x19, 0x93, 0x9c, 0x50, 0x53, 0x4a, 0x6f, 0x27, 0x76, 0x4a, 0xbb, 0xd7, 0xce, 0xb4, 0x2b, 0x2b, - 0x4d, 0xa6, 0xa2, 0x08, 0x4d, 0xfc, 0x19, 0xa4, 0x83, 0x12, 0xcd, 0x2c, 0x5c, 0x3d, 0x9b, 0x05, - 0xb6, 0x97, 0x14, 0xae, 0x87, 0xdf, 0x81, 0x3c, 0xfb, 0x2b, 0x72, 0x23, 0xcb, 0x7d, 0xce, 0x31, - 0x80, 0xe5, 0x05, 0xde, 0x82, 0x1c, 0xdf, 0x26, 0x3a, 0x0d, 0x8f, 0xb6, 0x68, 0xcc, 0x12, 0x4b, - 0xa7, 0x7d, 0x32, 0x36, 0x7d, 0xf5, 0x09, 0x31, 0xc7, 0x94, 0x27, 0x7c, 0x5e, 0x29, 0x06, 0xe0, - 0x4f, 0x19, 0x86, 0x2f, 0x42, 0x41, 0xec, 0x2a, 0xc3, 0xd2, 0xe9, 0x33, 0x5e, 0x3d, 0x33, 0x8a, - 0xd8, 0x68, 0x0d, 0x86, 0xb0, 0xcf, 0x3f, 0xf2, 0x6c, 0x2b, 0x4c, 0x4d, 0xfe, 0x09, 0x06, 0xf0, - 0xcf, 0xdf, 0x9e, 0x2d, 0xdc, 0xef, 0x2d, 0x9e, 0xde, 0x6c, 0x4e, 0x95, 0xff, 0x94, 0x84, 0x34, - 0xaf, 0x17, 0x6b, 0x50, 0xe8, 0x3d, 0xec, 0xc8, 0x6a, 0xbd, 0x7d, 0x7c, 0xd0, 0x94, 0x51, 0x02, - 0x97, 0x00, 0x38, 0x70, 0xaf, 0xd9, 0xae, 0xf6, 0x50, 0x32, 0x1a, 0x37, 0x5a, 0xbd, 0xbd, 0x9b, - 0x28, 0x15, 0x29, 0x1c, 0x0b, 0x20, 0x1d, 0x27, 0xdc, 0xd8, 0x45, 0x19, 0x8c, 0xa0, 0x28, 0x0c, - 0x34, 0x1e, 0xc8, 0xf5, 0xbd, 0x9b, 0x28, 0x3b, 0x8d, 0xdc, 0xd8, 0x45, 0x2b, 0x78, 0x15, 0xf2, - 0x1c, 0x39, 0x68, 0xb7, 0x9b, 0x28, 0x17, 0xd9, 0xec, 0xf6, 0x94, 0x46, 0xeb, 0x10, 0xe5, 0x23, - 0x9b, 0x87, 0x4a, 0xfb, 0xb8, 0x83, 0x20, 0xb2, 0x70, 0x24, 0x77, 0xbb, 0xd5, 0x43, 0x19, 0x15, - 0x22, 0xc6, 0xc1, 0xc3, 0x9e, 0xdc, 0x45, 0xc5, 0x29, 0xb7, 0x6e, 0xec, 0xa2, 0xd5, 0xe8, 0x13, - 0x72, 0xeb, 0xf8, 0x08, 0x95, 0xf0, 0x3a, 0xac, 0x8a, 0x4f, 0x84, 0x4e, 0xac, 0xcd, 0x40, 0x7b, - 0x37, 0x11, 0x9a, 0x38, 0x22, 0xac, 0xac, 0x4f, 0x01, 0x7b, 0x37, 0x11, 0x2e, 0xd7, 0x20, 0xc3, - 0xb3, 0x0b, 0x63, 0x28, 0x35, 0xab, 0x07, 0x72, 0x53, 0x6d, 0x77, 0x7a, 0x8d, 0x76, 0xab, 0xda, - 0x44, 0x89, 0x09, 0xa6, 0xc8, 0x3f, 0x39, 0x6e, 0x28, 0x72, 0x1d, 0x25, 0xe3, 0x58, 0x47, 0xae, - 0xf6, 0xe4, 0x3a, 0x4a, 0x95, 0x35, 0xd8, 0x5c, 0x54, 0x27, 0x17, 0xee, 0x8c, 0xd8, 0x12, 0x27, - 0x97, 0x2c, 0x31, 0xb7, 0x35, 0xb7, 0xc4, 0xff, 0x4a, 0xc2, 0xc6, 0x82, 0xb3, 0x62, 0xe1, 0x47, - 0x7e, 0x08, 0x19, 0x91, 0xa2, 0xe2, 0xf4, 0xbc, 0xb2, 0xf0, 0xd0, 0xe1, 0x09, 0x3b, 0x77, 0x82, - 0x72, 0xbd, 0x78, 0x07, 0x91, 0x5a, 0xd2, 0x41, 0x30, 0x13, 0x73, 0x35, 0xfd, 0xe7, 0x73, 0x35, - 0x5d, 0x1c, 0x7b, 0x7b, 0x67, 0x39, 0xf6, 0x38, 0xf6, 0xcd, 0x6a, 0x7b, 0x66, 0x41, 0x6d, 0xbf, - 0x0b, 0xeb, 0x73, 0x86, 0xce, 0x5c, 0x63, 0x7f, 0x99, 0x00, 0x69, 0x59, 0x70, 0x5e, 0x51, 0xe9, - 0x92, 0x53, 0x95, 0xee, 0xee, 0x6c, 0x04, 0x2f, 0x2d, 0x5f, 0x84, 0xb9, 0xb5, 0xfe, 0x3a, 0x01, - 0xe7, 0x16, 0x77, 0x8a, 0x0b, 0x7d, 0xf8, 0x0c, 0xb2, 0x23, 0xea, 0x0f, 0xed, 0xb0, 0x5b, 0xfa, - 0x78, 0xc1, 0x19, 0xcc, 0xc4, 0xb3, 0x8b, 0x1d, 0x68, 0xc5, 0x0f, 0xf1, 0xd4, 0xb2, 0x76, 0x4f, - 0x78, 0x33, 0xe7, 0xe9, 0xaf, 0x92, 0xf0, 0xf6, 0x42, 0xe3, 0x0b, 0x1d, 0x7d, 0x0f, 0xc0, 0xb0, - 0x9c, 0xb1, 0x2f, 0x3a, 0x22, 0x51, 0x60, 0xf3, 0x1c, 0xe1, 0xc5, 0x8b, 0x15, 0xcf, 0xb1, 0x1f, - 0xc9, 0x53, 0x5c, 0x0e, 0x02, 0xe2, 0x84, 0x3b, 0x13, 0x47, 0xd3, 0xdc, 0xd1, 0xf7, 0x97, 0xcc, - 0x74, 0x2e, 0x31, 0x3f, 0x01, 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x46, 0x86, - 0x35, 0xe0, 0x27, 0x48, 0x6e, 0x3f, 0xd3, 0x27, 0xa6, 0x47, 0x95, 0x35, 0x21, 0xee, 0x86, 0x52, - 0xa6, 0xc1, 0x13, 0xc8, 0x8d, 0x69, 0x64, 0xa7, 0x34, 0x84, 0x38, 0xd2, 0x28, 0xff, 0x31, 0x07, - 0x85, 0x58, 0x5f, 0x8d, 0x2f, 0x41, 0xf1, 0x11, 0x79, 0x42, 0xd4, 0xf0, 0xae, 0x24, 0x22, 0x51, - 0x60, 0x58, 0x27, 0xb8, 0x2f, 0x7d, 0x02, 0x9b, 0x9c, 0x62, 0x8f, 0x7d, 0xea, 0xaa, 0x9a, 0x49, - 0x3c, 0x8f, 0x07, 0x2d, 0xc7, 0xa9, 0x98, 0xc9, 0xda, 0x4c, 0x54, 0x0b, 0x25, 0xf8, 0x16, 0x6c, - 0x70, 0x8d, 0xd1, 0xd8, 0xf4, 0x0d, 0xc7, 0xa4, 0x2a, 0xbb, 0xbd, 0x79, 0xfc, 0x24, 0x89, 0x3c, - 0x5b, 0x67, 0x8c, 0xa3, 0x80, 0xc0, 0x3c, 0xf2, 0x70, 0x1d, 0xde, 0xe3, 0x6a, 0x03, 0x6a, 0x51, - 0x97, 0xf8, 0x54, 0xa5, 0x5f, 0x8d, 0x89, 0xe9, 0xa9, 0xc4, 0xd2, 0xd5, 0x21, 0xf1, 0x86, 0xd2, - 0x26, 0x33, 0x70, 0x90, 0x94, 0x12, 0xca, 0x05, 0x46, 0x3c, 0x0c, 0x78, 0x32, 0xa7, 0x55, 0x2d, - 0xfd, 0x73, 0xe2, 0x0d, 0xf1, 0x3e, 0x9c, 0xe3, 0x56, 0x3c, 0xdf, 0x35, 0xac, 0x81, 0xaa, 0x0d, - 0xa9, 0xf6, 0x58, 0x1d, 0xfb, 0xfd, 0x3b, 0xd2, 0x3b, 0xf1, 0xef, 0x73, 0x0f, 0xbb, 0x9c, 0x53, - 0x63, 0x94, 0x63, 0xbf, 0x7f, 0x07, 0x77, 0xa1, 0xc8, 0x16, 0x63, 0x64, 0x3c, 0xa7, 0x6a, 0xdf, - 0x76, 0xf9, 0xd1, 0x58, 0x5a, 0x50, 0x9a, 0x62, 0x11, 0xac, 0xb4, 0x03, 0x85, 0x23, 0x5b, 0xa7, - 0xfb, 0x99, 0x6e, 0x47, 0x96, 0xeb, 0x4a, 0x21, 0xb4, 0x72, 0xcf, 0x76, 0x59, 0x42, 0x0d, 0xec, - 0x28, 0xc0, 0x05, 0x91, 0x50, 0x03, 0x3b, 0x0c, 0xef, 0x2d, 0xd8, 0xd0, 0x34, 0x31, 0x67, 0x43, - 0x53, 0x83, 0x3b, 0x96, 0x27, 0xa1, 0xa9, 0x60, 0x69, 0xda, 0xa1, 0x20, 0x04, 0x39, 0xee, 0xe1, - 0x4f, 0xe1, 0xed, 0x49, 0xb0, 0xe2, 0x8a, 0xeb, 0x73, 0xb3, 0x9c, 0x55, 0xbd, 0x05, 0x1b, 0xce, - 0xe9, 0xbc, 0x22, 0x9e, 0xfa, 0xa2, 0x73, 0x3a, 0xab, 0x76, 0x1b, 0x36, 0x9d, 0xa1, 0x33, 0xaf, - 0x77, 0x35, 0xae, 0x87, 0x9d, 0xa1, 0x33, 0xab, 0xf8, 0x11, 0xbf, 0x70, 0xbb, 0x54, 0x23, 0x3e, - 0xd5, 0xa5, 0xf3, 0x71, 0x7a, 0x4c, 0x80, 0xaf, 0x03, 0xd2, 0x34, 0x95, 0x5a, 0xe4, 0xc4, 0xa4, - 0x2a, 0x71, 0xa9, 0x45, 0x3c, 0xe9, 0x62, 0x9c, 0x5c, 0xd2, 0x34, 0x99, 0x4b, 0xab, 0x5c, 0x88, - 0xaf, 0xc2, 0xba, 0x7d, 0xf2, 0x48, 0x13, 0x29, 0xa9, 0x3a, 0x2e, 0xed, 0x1b, 0xcf, 0xa4, 0x0f, - 0x79, 0x7c, 0xd7, 0x98, 0x80, 0x27, 0x64, 0x87, 0xc3, 0xf8, 0x0a, 0x20, 0xcd, 0x1b, 0x12, 0xd7, - 0xe1, 0x35, 0xd9, 0x73, 0x88, 0x46, 0xa5, 0x8f, 0x04, 0x55, 0xe0, 0xad, 0x10, 0x66, 0x5b, 0xc2, - 0x7b, 0x6a, 0xf4, 0xfd, 0xd0, 0xe2, 0x65, 0xb1, 0x25, 0x38, 0x16, 0x58, 0xdb, 0x01, 0xc4, 0x42, - 0x31, 0xf5, 0xe1, 0x1d, 0x4e, 0x2b, 0x39, 0x43, 0x27, 0xfe, 0xdd, 0x0f, 0x60, 0x95, 0x31, 0x27, - 0x1f, 0xbd, 0x22, 0x1a, 0x32, 0x67, 0x18, 0xfb, 0xe2, 0x6b, 0xeb, 0x8d, 0xcb, 0xfb, 0x50, 0x8c, - 0xe7, 0x27, 0xce, 0x83, 0xc8, 0x50, 0x94, 0x60, 0xcd, 0x4a, 0xad, 0x5d, 0x67, 0x6d, 0xc6, 0x97, - 0x32, 0x4a, 0xb2, 0x76, 0xa7, 0xd9, 0xe8, 0xc9, 0xaa, 0x72, 0xdc, 0xea, 0x35, 0x8e, 0x64, 0x94, - 0x8a, 0xf7, 0xd5, 0x7f, 0x4d, 0x42, 0x69, 0xfa, 0x8a, 0x84, 0x7f, 0x00, 0xe7, 0xc3, 0xf7, 0x0c, - 0x8f, 0xfa, 0xea, 0x53, 0xc3, 0xe5, 0x5b, 0x66, 0x44, 0xc4, 0xf1, 0x15, 0x2d, 0xda, 0x66, 0xc0, - 0xea, 0x52, 0xff, 0x0b, 0xc3, 0x65, 0x1b, 0x62, 0x44, 0x7c, 0xdc, 0x84, 0x8b, 0x96, 0xad, 0x7a, - 0x3e, 0xb1, 0x74, 0xe2, 0xea, 0xea, 0xe4, 0x25, 0x49, 0x25, 0x9a, 0x46, 0x3d, 0xcf, 0x16, 0x47, - 0x55, 0x64, 0xe5, 0x5d, 0xcb, 0xee, 0x06, 0xe4, 0x49, 0x0d, 0xaf, 0x06, 0xd4, 0x99, 0x04, 0x4b, - 0x2d, 0x4b, 0xb0, 0x77, 0x20, 0x3f, 0x22, 0x8e, 0x4a, 0x2d, 0xdf, 0x3d, 0xe5, 0x8d, 0x71, 0x4e, - 0xc9, 0x8d, 0x88, 0x23, 0xb3, 0xf1, 0x9b, 0xb9, 0x9f, 0xfc, 0x23, 0x05, 0xc5, 0x78, 0x73, 0xcc, - 0xee, 0x1a, 0x1a, 0x3f, 0x47, 0x12, 0xbc, 0xd2, 0x7c, 0xf0, 0xd2, 0x56, 0xba, 0x52, 0x63, 0x07, - 0xcc, 0x7e, 0x56, 0xb4, 0xac, 0x8a, 0xd0, 0x64, 0x87, 0x3b, 0xab, 0x2d, 0x54, 0xb4, 0x08, 0x39, - 0x25, 0x18, 0xe1, 0x43, 0xc8, 0x3e, 0xf2, 0xb8, 0xed, 0x2c, 0xb7, 0xfd, 0xe1, 0xcb, 0x6d, 0xdf, - 0xef, 0x72, 0xe3, 0xf9, 0xfb, 0x5d, 0xb5, 0xd5, 0x56, 0x8e, 0xaa, 0x4d, 0x25, 0x50, 0xc7, 0x17, - 0x20, 0x6d, 0x92, 0xe7, 0xa7, 0xd3, 0x47, 0x11, 0x87, 0xce, 0x1a, 0xf8, 0x0b, 0x90, 0x7e, 0x4a, - 0xc9, 0xe3, 0xe9, 0x03, 0x80, 0x43, 0xaf, 0x31, 0xf5, 0xaf, 0x43, 0x86, 0xc7, 0x0b, 0x03, 0x04, - 0x11, 0x43, 0x6f, 0xe1, 0x1c, 0xa4, 0x6b, 0x6d, 0x85, 0xa5, 0x3f, 0x82, 0xa2, 0x40, 0xd5, 0x4e, - 0x43, 0xae, 0xc9, 0x28, 0x59, 0xbe, 0x05, 0x59, 0x11, 0x04, 0xb6, 0x35, 0xa2, 0x30, 0xa0, 0xb7, - 0x82, 0x61, 0x60, 0x23, 0x11, 0x4a, 0x8f, 0x8f, 0x0e, 0x64, 0x05, 0x25, 0xe3, 0xcb, 0xeb, 0x41, - 0x31, 0xde, 0x17, 0xbf, 0x99, 0x9c, 0xfa, 0x4b, 0x02, 0x0a, 0xb1, 0x3e, 0x97, 0x35, 0x28, 0xc4, - 0x34, 0xed, 0xa7, 0x2a, 0x31, 0x0d, 0xe2, 0x05, 0x49, 0x01, 0x1c, 0xaa, 0x32, 0xe4, 0xac, 0x8b, - 0xf6, 0x46, 0x9c, 0xff, 0x5d, 0x02, 0xd0, 0x6c, 0x8b, 0x39, 0xe3, 0x60, 0xe2, 0x3b, 0x75, 0xf0, - 0xb7, 0x09, 0x28, 0x4d, 0xf7, 0x95, 0x33, 0xee, 0x5d, 0xfa, 0x4e, 0xdd, 0xfb, 0x67, 0x12, 0x56, - 0xa7, 0xba, 0xc9, 0xb3, 0x7a, 0xf7, 0x15, 0xac, 0x1b, 0x3a, 0x1d, 0x39, 0xb6, 0x4f, 0x2d, 0xed, - 0x54, 0x35, 0xe9, 0x13, 0x6a, 0x4a, 0x65, 0x5e, 0x28, 0xae, 0xbf, 0xbc, 0x5f, 0xad, 0x34, 0x26, - 0x7a, 0x4d, 0xa6, 0xb6, 0xbf, 0xd1, 0xa8, 0xcb, 0x47, 0x9d, 0x76, 0x4f, 0x6e, 0xd5, 0x1e, 0xaa, - 0xc7, 0xad, 0x1f, 0xb7, 0xda, 0x5f, 0xb4, 0x14, 0x64, 0xcc, 0xd0, 0x5e, 0xe3, 0x56, 0xef, 0x00, - 0x9a, 0x75, 0x0a, 0x9f, 0x87, 0x45, 0x6e, 0xa1, 0xb7, 0xf0, 0x06, 0xac, 0xb5, 0xda, 0x6a, 0xb7, - 0x51, 0x97, 0x55, 0xf9, 0xde, 0x3d, 0xb9, 0xd6, 0xeb, 0x8a, 0x17, 0x88, 0x88, 0xdd, 0x9b, 0xde, - 0xd4, 0xbf, 0x49, 0xc1, 0xc6, 0x02, 0x4f, 0x70, 0x35, 0xb8, 0x3b, 0x88, 0xeb, 0xcc, 0xf7, 0xcf, - 0xe2, 0x7d, 0x85, 0x1d, 0xf9, 0x1d, 0xe2, 0xfa, 0xc1, 0x55, 0xe3, 0x0a, 0xb0, 0x28, 0x59, 0xbe, - 0xd1, 0x37, 0xa8, 0x1b, 0x3c, 0xd8, 0x88, 0x0b, 0xc5, 0xda, 0x04, 0x17, 0x6f, 0x36, 0xdf, 0x03, - 0xec, 0xd8, 0x9e, 0xe1, 0x1b, 0x4f, 0xa8, 0x6a, 0x58, 0xe1, 0xeb, 0x0e, 0xbb, 0x60, 0xa4, 0x15, - 0x14, 0x4a, 0x1a, 0x96, 0x1f, 0xb1, 0x2d, 0x3a, 0x20, 0x33, 0x6c, 0x56, 0xc0, 0x53, 0x0a, 0x0a, - 0x25, 0x11, 0xfb, 0x12, 0x14, 0x75, 0x7b, 0xcc, 0xba, 0x2e, 0xc1, 0x63, 0xe7, 0x45, 0x42, 0x29, - 0x08, 0x2c, 0xa2, 0x04, 0xfd, 0xf4, 0xe4, 0x59, 0xa9, 0xa8, 0x14, 0x04, 0x26, 0x28, 0x97, 0x61, - 0x8d, 0x0c, 0x06, 0x2e, 0x33, 0x1e, 0x1a, 0x12, 0x37, 0x84, 0x52, 0x04, 0x73, 0xe2, 0xd6, 0x7d, - 0xc8, 0x85, 0x71, 0x60, 0x47, 0x32, 0x8b, 0x84, 0xea, 0x88, 0x6b, 0x6f, 0x72, 0x27, 0xaf, 0xe4, - 0xac, 0x50, 0x78, 0x09, 0x8a, 0x86, 0xa7, 0x4e, 0x5e, 0xc9, 0x93, 0xdb, 0xc9, 0x9d, 0x9c, 0x52, - 0x30, 0xbc, 0xe8, 0x85, 0xb1, 0xfc, 0x75, 0x12, 0x4a, 0xd3, 0xaf, 0xfc, 0xb8, 0x0e, 0x39, 0xd3, - 0xd6, 0x08, 0x4f, 0x2d, 0xf1, 0x13, 0xd3, 0xce, 0x2b, 0x7e, 0x18, 0xa8, 0x34, 0x03, 0xbe, 0x12, - 0x69, 0x6e, 0xfd, 0x2d, 0x01, 0xb9, 0x10, 0xc6, 0xe7, 0x20, 0xed, 0x10, 0x7f, 0xc8, 0xcd, 0x65, - 0x0e, 0x92, 0x28, 0xa1, 0xf0, 0x31, 0xc3, 0x3d, 0x87, 0x58, 0x3c, 0x05, 0x02, 0x9c, 0x8d, 0xd9, - 0xba, 0x9a, 0x94, 0xe8, 0xfc, 0xfa, 0x61, 0x8f, 0x46, 0xd4, 0xf2, 0xbd, 0x70, 0x5d, 0x03, 0xbc, - 0x16, 0xc0, 0xf8, 0x1a, 0xac, 0xfb, 0x2e, 0x31, 0xcc, 0x29, 0x6e, 0x9a, 0x73, 0x51, 0x28, 0x88, - 0xc8, 0xfb, 0x70, 0x21, 0xb4, 0xab, 0x53, 0x9f, 0x68, 0x43, 0xaa, 0x4f, 0x94, 0xb2, 0xfc, 0x99, - 0xe1, 0x7c, 0x40, 0xa8, 0x07, 0xf2, 0x50, 0xb7, 0xfc, 0xf7, 0x04, 0xac, 0x87, 0x17, 0x26, 0x3d, - 0x0a, 0xd6, 0x11, 0x00, 0xb1, 0x2c, 0xdb, 0x8f, 0x87, 0x6b, 0x3e, 0x95, 0xe7, 0xf4, 0x2a, 0xd5, - 0x48, 0x49, 0x89, 0x19, 0xd8, 0x1a, 0x01, 0x4c, 0x24, 0x4b, 0xc3, 0x76, 0x11, 0x0a, 0xc1, 0x4f, - 0x38, 0xfc, 0x77, 0x40, 0x71, 0xc5, 0x06, 0x01, 0xb1, 0x9b, 0x15, 0xde, 0x84, 0xcc, 0x09, 0x1d, - 0x18, 0x56, 0xf0, 0x30, 0x2b, 0x06, 0xe1, 0x43, 0x48, 0x3a, 0x7a, 0x08, 0x39, 0xf8, 0x19, 0x6c, - 0x68, 0xf6, 0x68, 0xd6, 0xdd, 0x03, 0x34, 0x73, 0xcd, 0xf7, 0x3e, 0x4f, 0x7c, 0x09, 0x93, 0x16, - 0xf3, 0x7f, 0x89, 0xc4, 0xef, 0x93, 0xa9, 0xc3, 0xce, 0xc1, 0x1f, 0x92, 0x5b, 0x87, 0x42, 0xb5, - 0x13, 0xce, 0x54, 0xa1, 0x7d, 0x93, 0x6a, 0xcc, 0xfb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, - 0x58, 0x22, 0x30, 0xdf, 0x1c, 0x00, 0x00, -} diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/.travis.yml b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/.travis.yml new file mode 100644 index 0000000000..1b7076a340 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/.travis.yml @@ -0,0 +1,25 @@ +sudo: required + +os: + - linux + - osx + +language: go +go: + - 1.11.x + +install: + - make deps + +script: + - make test-xbuild + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false + +env: GOTFLAGS="-race -cpu=5" diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/LICENSE b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/LICENSE rename to vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/LICENSE diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/Makefile b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/Makefile similarity index 100% rename from vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/Makefile rename to vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/Makefile diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/README.md b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/README.md new file mode 100644 index 0000000000..4a4605ba11 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/README.md @@ -0,0 +1,46 @@ +# go-reuseport + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) +[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](https://libp2p.io/) +[![](https://img.shields.io/badge/freenode-%23libp2p-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23libp2p) +[![codecov](https://codecov.io/gh/libp2p/go-reuseport/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/go-reuseport) +[![Travis CI](https://travis-ci.org/libp2p/go-reuseport.svg?branch=master)](https://travis-ci.org/libp2p/go-reuseport) + +**NOTE:** This package REQUIRES go >= 1.11. + +This package enables listening and dialing from _the same_ TCP or UDP port. +This means that the following sockopts may be set: + +``` +SO_REUSEADDR +SO_REUSEPORT +``` + +- godoc: https://godoc.org/github.com/libp2p/go-reuseport + +This is a simple package to help with address reuse. This is particularly +important when attempting to do TCP NAT holepunching, which requires a process +to both Listen and Dial on the same TCP port. This package provides some +utilities around enabling this behaviour on various OS. + +## Examples + + +```Go +// listen on the same port. oh yeah. +l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") +l2, _ := reuse.Listen("tcp", "127.0.0.1:1234") +``` + +```Go +// dial from the same port. oh yeah. +l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") +l2, _ := reuse.Listen("tcp", "127.0.0.1:1235") +c, _ := reuse.Dial("tcp", "127.0.0.1:1234", "127.0.0.1:1235") +``` + +**Note: cant dial self because tcp/ip stacks use 4-tuples to identify connections, and doing so would clash.** + +## Tested + +Tested on `darwin`, `linux`, and `windows`. diff --git a/vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/addr.go b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/addr.go similarity index 100% rename from vendor/gx/ipfs/QmSvfeW68LC13nVt3BiwHKFneSa4DCdq3erG8RNtJvq7Ni/go-reuseport/addr.go rename to vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/addr.go diff --git a/vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/codecov.yml b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmdjF7Ubi5KNwUYMtKWyUsB6UY3B1wB5CDus9L3JKPWM2j/go-libp2p-netutil/codecov.yml rename to vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/codecov.yml diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_unix.go b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_unix.go new file mode 100644 index 0000000000..4bb2857ab1 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_unix.go @@ -0,0 +1,25 @@ +// +build linux darwin netbsd openbsd + +package reuseport + +import ( + "syscall" + + "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/unix" +) + +func Control(network, address string, c syscall.RawConn) error { + var err error + c.Control(func(fd uintptr) { + err = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1) + if err != nil { + return + } + + err = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1) + if err != nil { + return + } + }) + return err +} diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_windows.go b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_windows.go new file mode 100644 index 0000000000..c14e77bf3c --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/control_windows.go @@ -0,0 +1,14 @@ +// +build windows +package reuseport + +import ( + "syscall" + + "gx/ipfs/QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu/sys/windows" +) + +func Control(network, address string, c syscall.RawConn) (err error) { + return c.Control(func(fd uintptr) { + err = windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_REUSEADDR, 1) + }) +} diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.mod b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.mod new file mode 100644 index 0000000000..52f0c18653 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.mod @@ -0,0 +1,9 @@ +module github.com/libp2p/go-reuseport + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pkg/errors v0.8.0 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 + golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 +) diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.sum b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.sum new file mode 100644 index 0000000000..a6d085e1e8 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/interface.go b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/interface.go new file mode 100644 index 0000000000..8b51debf96 --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/interface.go @@ -0,0 +1,64 @@ +// Package reuseport provides Listen and Dial functions that set socket +// options in order to be able to reuse ports. You should only use this +// package if you know what SO_REUSEADDR and SO_REUSEPORT are. +// +// For example: +// +// // listen on the same port. oh yeah. +// l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") +// l2, _ := reuse.Listen("tcp", "127.0.0.1:1234") +// +// // dial from the same port. oh yeah. +// l1, _ := reuse.Listen("tcp", "127.0.0.1:1234") +// l2, _ := reuse.Listen("tcp", "127.0.0.1:1235") +// c, _ := reuse.Dial("tcp", "127.0.0.1:1234", "127.0.0.1:1235") +// +// Note: cant dial self because tcp/ip stacks use 4-tuples to identify connections, +// and doing so would clash. +package reuseport + +import ( + "context" + "net" + + "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" +) + +// Available returns whether or not SO_REUSEPORT or equivalent behaviour is +// available in the OS. +func Available() bool { + return true +} + +var listenConfig = net.ListenConfig{ + Control: Control, +} + +// Listen listens at the given network and address. see net.Listen +// Returns a net.Listener created from a file discriptor for a socket +// with SO_REUSEPORT and SO_REUSEADDR option set. +func Listen(network, address string) (net.Listener, error) { + return listenConfig.Listen(context.Background(), network, address) +} + +// ListenPacket listens at the given network and address. see net.ListenPacket +// Returns a net.Listener created from a file discriptor for a socket +// with SO_REUSEPORT and SO_REUSEADDR option set. +func ListenPacket(network, address string) (net.PacketConn, error) { + return listenConfig.ListenPacket(context.Background(), network, address) +} + +// Dial dials the given network and address. see net.Dialer.Dial +// Returns a net.Conn created from a file descriptor for a socket +// with SO_REUSEPORT and SO_REUSEADDR option set. +func Dial(network, laddr, raddr string) (net.Conn, error) { + nla, err := ResolveAddr(network, laddr) + if err != nil { + return nil, errors.Wrap(err, "resolving local addr") + } + d := net.Dialer{ + Control: Control, + LocalAddr: nla, + } + return d.Dial(network, raddr) +} diff --git a/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/package.json b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/package.json new file mode 100644 index 0000000000..391d13f0be --- /dev/null +++ b/vendor/gx/ipfs/Qme8kdM7thoCqLqd7GYCRqipoZJS64rhJo5MBcTpyWfsL9/go-reuseport/package.json @@ -0,0 +1,36 @@ +{ + "author": "whyrusleeping", + "bugs": { + "url": "https://github.com/libp2p/go-reuseport" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-reuseport" + }, + "gxDependencies": [ + { + "author": "The Go Authors", + "hash": "QmVGjyM9i2msKvLXwh9VosCTgP4mL91kC7hDmqnwTTx6Hu", + "name": "sys", + "version": "0.2.0" + }, + { + "author": "whyrusleeping", + "hash": "QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy", + "name": "errors", + "version": "0.0.1" + }, + { + "author": "magik6k", + "hash": "QmPVkJMTeRC6iBByPWdrRkD3BE5UXsj5HPzb4kPqL186mS", + "name": "testify", + "version": "1.0.0" + } + ], + "gxVersion": "0.9.0", + "language": "go", + "license": "", + "name": "go-reuseport", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.2" +} + diff --git a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/LICENSE b/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/LICENSE deleted file mode 100644 index abd540fd69..0000000000 --- a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. \ No newline at end of file diff --git a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/README.md b/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/README.md deleted file mode 100644 index 2c8ea14afd..0000000000 --- a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/README.md +++ /dev/null @@ -1,63 +0,0 @@ -GoEndian -======== - -A tool to detect byte order for golang. - -A sample test code : - -``` -package main - -import ( - "encoding/binary" - "fmt" - "github.com/virtao/GoEndian" -) - -func main() { - printEndian() - useEndian() -} - -func printEndian() { - fmt.Println("Machine byte order : ") - if endian.IsBigEndian() { - fmt.Println("Big Endian") - } else { - fmt.Println("Little Endian") - } -} - -func useEndian() { - var iTest int32 = 0x12345678 - var bTest []byte = make([]byte, 4) - fmt.Println("Int32 to Bytes : ") - - fmt.Println("0x12345678 to current endian : ") - endian.Endian.PutUint32(bTest, uint32(iTest)) - fmt.Println(bTest) - - fmt.Println("0x12345678 to big endian : ") - binary.BigEndian.PutUint32(bTest, uint32(iTest)) - fmt.Println(bTest) - - fmt.Println("0x12345678 to little endian : ") - binary.LittleEndian.PutUint32(bTest, uint32(iTest)) - fmt.Println(bTest) - -} -``` - -The result output: - -``` - Machine byte order : - Little Endian - Int32 to Bytes : - 0x12345678 to current endian : - [120 86 52 18] - 0x12345678 to big endian : - [18 52 86 120] - 0x12345678 to little endian : - [120 86 52 18] -``` \ No newline at end of file diff --git a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/endian.go b/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/endian.go deleted file mode 100644 index eb5d1bfab8..0000000000 --- a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/endian.go +++ /dev/null @@ -1,43 +0,0 @@ -package endian - -import ( - "encoding/binary" - "unsafe" -) - -//保存机器大小端 -var Endian binary.ByteOrder -var bigEndian bool - -func IsBigEndian() bool { - return bigEndian -} - -func IsLittleEndian() bool { - return !bigEndian -} - -func init() { - if getEndian() { - Endian = binary.BigEndian - bigEndian = true - } else { - Endian = binary.LittleEndian - bigEndian = false - } -} - -//以下代码判断机器大小端 -const INT_SIZE int = int(unsafe.Sizeof(0)) - -//true = big endian, false = little endian -func getEndian() (ret bool) { - var i int = 0x1 - bs := (*[INT_SIZE]byte)(unsafe.Pointer(&i)) - if bs[0] == 0 { - return true - } else { - return false - } - -} diff --git a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/package.json b/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/package.json deleted file mode 100644 index b36d1e5dca..0000000000 --- a/vendor/gx/ipfs/QmeFPvhFJGXGiXAc9zunNxZjCaWgYQpcsdwip2NWLcccyw/GoEndian/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "author": "gxed", - "bugs": { - "URL": "https://github.com/gxed/GoEndian/issues", - "url": "https://github.com/gxed/GoEndian/issues" - }, - "gx": { - "dvcsimport": "github.com/gxed/GoEndian" - }, - "gxVersion": "0.9.0", - "language": "go", - "license": "", - "name": "GoEndian", - "version": "1.0.0" -} diff --git a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/LICENSE b/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/LICENSE deleted file mode 100644 index c7386b3c94..0000000000 --- a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Juan Batiz-Benet - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/package.json b/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/package.json deleted file mode 100644 index 83dc451ba9..0000000000 --- a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "lgierth", - "bugs": { - "url": "https://github.com/multiformats/go-multiaddr-dns/issues" - }, - "gx": { - "dvcsimport": "github.com/multiformats/go-multiaddr-dns" - }, - "gxDependencies": [ - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - } - ], - "gxVersion": "0.10.0", - "language": "go", - "license": "MIT", - "name": "go-multiaddr-dns", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.2.5" -} - diff --git a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/resolve.go b/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/resolve.go deleted file mode 100644 index f19f87d6cb..0000000000 --- a/vendor/gx/ipfs/QmeHJXPqCNzSFbVkYM1uQLuM2L5FyJB9zukQ7EeqRP8ZC9/go-multiaddr-dns/resolve.go +++ /dev/null @@ -1,181 +0,0 @@ -package madns - -import ( - "context" - "fmt" - "net" - "strings" - - ma "gx/ipfs/QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9/go-multiaddr" -) - -var ResolvableProtocols = []ma.Protocol{DnsaddrProtocol, Dns4Protocol, Dns6Protocol} -var DefaultResolver = &Resolver{Backend: net.DefaultResolver} - -type backend interface { - LookupIPAddr(context.Context, string) ([]net.IPAddr, error) - LookupTXT(context.Context, string) ([]string, error) -} - -type Resolver struct { - Backend backend -} - -type MockBackend struct { - IP map[string][]net.IPAddr - TXT map[string][]string -} - -func (r *MockBackend) LookupIPAddr(ctx context.Context, name string) ([]net.IPAddr, error) { - results, ok := r.IP[name] - if ok { - return results, nil - } else { - return []net.IPAddr{}, nil - } -} - -func (r *MockBackend) LookupTXT(ctx context.Context, name string) ([]string, error) { - results, ok := r.TXT[name] - if ok { - return results, nil - } else { - return []string{}, nil - } -} - -func Matches(maddr ma.Multiaddr) bool { - protos := maddr.Protocols() - if len(protos) == 0 { - return false - } - - for _, p := range ResolvableProtocols { - if protos[0].Code == p.Code { - return true - } - } - - return false -} - -func Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { - return DefaultResolver.Resolve(ctx, maddr) -} - -func (r *Resolver) Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { - if !Matches(maddr) { - return []ma.Multiaddr{maddr}, nil - } - - protos := maddr.Protocols() - if protos[0].Code == Dns4Protocol.Code { - return r.resolveDns4(ctx, maddr) - } - if protos[0].Code == Dns6Protocol.Code { - return r.resolveDns6(ctx, maddr) - } - if protos[0].Code == DnsaddrProtocol.Code { - return r.resolveDnsaddr(ctx, maddr) - } - - panic("unreachable") -} - -func (r *Resolver) resolveDns4(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { - value, err := maddr.ValueForProtocol(Dns4Protocol.Code) - if err != nil { - return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) - } - - encap := ma.Split(maddr)[1:] - - result := []ma.Multiaddr{} - records, err := r.Backend.LookupIPAddr(ctx, value) - if err != nil { - return result, err - } - - for _, r := range records { - ip4 := r.IP.To4() - if ip4 == nil { - continue - } - ip4maddr, err := ma.NewMultiaddr("/ip4/" + ip4.String()) - if err != nil { - return result, err - } - parts := append([]ma.Multiaddr{ip4maddr}, encap...) - result = append(result, ma.Join(parts...)) - } - return result, nil -} - -func (r *Resolver) resolveDns6(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { - value, err := maddr.ValueForProtocol(Dns6Protocol.Code) - if err != nil { - return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) - } - - encap := ma.Split(maddr)[1:] - - result := []ma.Multiaddr{} - records, err := r.Backend.LookupIPAddr(ctx, value) - if err != nil { - return result, err - } - - for _, r := range records { - if r.IP.To4() != nil { - continue - } - ip6maddr, err := ma.NewMultiaddr("/ip6/" + r.IP.To16().String()) - if err != nil { - return result, err - } - parts := append([]ma.Multiaddr{ip6maddr}, encap...) - result = append(result, ma.Join(parts...)) - } - return result, nil -} - -func (r *Resolver) resolveDnsaddr(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) { - value, err := maddr.ValueForProtocol(DnsaddrProtocol.Code) - if err != nil { - return nil, fmt.Errorf("error resolving %s: %s", maddr.String(), err) - } - - trailer := ma.Split(maddr)[1:] - - result := []ma.Multiaddr{} - records, err := r.Backend.LookupTXT(ctx, "_dnsaddr."+value) - if err != nil { - return result, err - } - - for _, r := range records { - rv := strings.Split(r, "dnsaddr=") - if len(rv) != 2 { - continue - } - - rmaddr, err := ma.NewMultiaddr(rv[1]) - if err != nil { - return result, err - } - - if matchDnsaddr(rmaddr, trailer) { - result = append(result, rmaddr) - } - } - return result, nil -} - -// XXX probably insecure -func matchDnsaddr(maddr ma.Multiaddr, trailer []ma.Multiaddr) bool { - parts := ma.Split(maddr) - if ma.Join(parts[len(parts)-len(trailer):]...).Equal(ma.Join(trailer...)) { - return true - } - return false -} diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/.travis.yml b/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/.travis.yml deleted file mode 100644 index f6045685f6..0000000000 --- a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -os: - - linux - - osx - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/conn.go b/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/conn.go deleted file mode 100644 index a53f4bbab9..0000000000 --- a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/conn.go +++ /dev/null @@ -1,35 +0,0 @@ -package stream - -import ( - "fmt" - - inet "gx/ipfs/QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u/go-libp2p-net" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -type transportConn struct { - smux.Conn - inet.ConnMultiaddrs - inet.ConnSecurity - transport transport.Transport -} - -func (t *transportConn) Transport() transport.Transport { - return t.transport -} - -func (t *transportConn) String() string { - ts := "" - if s, ok := t.transport.(fmt.Stringer); ok { - ts = "[" + s.String() + "]" - } - return fmt.Sprintf( - " %s (%s)>", - ts, - t.LocalMultiaddr(), - t.LocalPeer(), - t.RemoteMultiaddr(), - t.RemotePeer(), - ) -} diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/listener.go b/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/listener.go deleted file mode 100644 index 3535fbff8f..0000000000 --- a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/listener.go +++ /dev/null @@ -1,159 +0,0 @@ -package stream - -import ( - "context" - "fmt" - "sync" - - tec "gx/ipfs/QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb/go-temp-err-catcher" - logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" -) - -var log = logging.Logger("stream-upgrader") - -type connErr struct { - conn transport.Conn - err error -} - -type listener struct { - manet.Listener - - transport transport.Transport - upgrader *Upgrader - - incoming chan transport.Conn - err error - - // Used for backpressure - threshold *threshold - - // Canceling this context isn't sufficient to tear down the listener. - // Call close. - ctx context.Context - cancel func() -} - -// Close closes the listener. -func (l *listener) Close() error { - // Do this first to try to get any relevent errors. - err := l.Listener.Close() - - l.cancel() - // Drain and wait. - for c := range l.incoming { - c.Close() - } - return err -} - -// handles inbound connections. -// -// This function does a few interesting things that should be noted: -// -// 1. It logs and discards temporary/transient errors (errors with a Temporary() -// function that returns true). -// 2. It stops accepting new connections once AcceptQueueLength connections have -// been fully negotiated but not accepted. This gives us a basic backpressure -// mechanism while still allowing us to negotiate connections in parallel. -func (l *listener) handleIncoming() { - var wg sync.WaitGroup - defer func() { - // make sure we're closed - l.Listener.Close() - if l.err == nil { - l.err = fmt.Errorf("listener closed") - } - - wg.Wait() - close(l.incoming) - }() - - var catcher tec.TempErrCatcher - for l.ctx.Err() == nil { - maconn, err := l.Listener.Accept() - if err != nil { - // Note: function may pause the accept loop. - if catcher.IsTemporary(err) { - log.Infof("temporary accept error: %s", err) - continue - } - l.err = err - return - } - - // The go routine below calls Release when the context is - // canceled so there's no need to wait on it here. - l.threshold.Wait() - - log.Debugf("listener %s got connection: %s <---> %s", - l, - maconn.LocalMultiaddr(), - maconn.RemoteMultiaddr()) - - wg.Add(1) - go func() { - defer wg.Done() - - ctx, cancel := context.WithTimeout(l.ctx, transport.AcceptTimeout) - defer cancel() - - conn, err := l.upgrader.UpgradeInbound(ctx, l.transport, maconn) - if err != nil { - // Don't bother bubbling this up. We just failed - // to completely negotiate the connection. - log.Debugf("accept upgrade error: %s (%s <--> %s)", - err, - maconn.LocalMultiaddr(), - maconn.RemoteMultiaddr()) - return - } - - log.Debugf("listener %s accepted connection: %s", l, conn) - - // This records the fact that the connection has been - // setup and is waiting to be accepted. This call - // *never* blocks, even if we go over the threshold. It - // simply ensures that calls to Wait block while we're - // over the threshold. - l.threshold.Acquire() - defer l.threshold.Release() - - select { - case l.incoming <- conn: - case <-ctx.Done(): - if l.ctx.Err() == nil { - // Listener *not* closed but the accept timeout expired. - log.Warningf("listener dropped connection due to slow accept") - } - // Wait on the context with a timeout. This way, - // if we stop accepting connections for some reason, - // we'll eventually close all the open ones - // instead of hanging onto them. - conn.Close() - } - }() - } -} - -// Accept accepts a connection. -func (l *listener) Accept() (transport.Conn, error) { - for c := range l.incoming { - // Could have been sitting there for a while. - if !c.IsClosed() { - return c, nil - } - } - return nil, l.err -} - -func (l *listener) String() string { - if s, ok := l.transport.(fmt.Stringer); ok { - return fmt.Sprintf("", s, l.Multiaddr()) - } - return fmt.Sprintf("", l.Multiaddr()) -} - -var _ transport.Listener = (*listener)(nil) diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/package.json b/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/package.json deleted file mode 100644 index 3537fce771..0000000000 --- a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "author": "steb", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-transport-upgrader" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-transport-upgrader" - }, - "gxDependencies": [ - { - "author": "Stebalien", - "hash": "QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK", - "name": "go-conn-security", - "version": "0.1.15" - }, - { - "author": "whyrusleeping", - "hash": "QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw", - "name": "go-stream-muxer", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB", - "name": "go-maddr-filter", - "version": "1.1.10" - }, - { - "author": "whyrusleeping", - "hash": "QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX", - "name": "go-libp2p-transport", - "version": "3.0.15" - }, - { - "author": "libp2p", - "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", - "name": "go-libp2p-interface-pnet", - "version": "3.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmaveCPGVaKJU57tBErGCDjzLaqEMZkFygoiv4BhYwWUGc", - "name": "go-smux-multiplex", - "version": "3.0.16" - }, - { - "author": "multiformats", - "hash": "QmT4U94DnD8FRfqr21obWY32HLM5VExccPKMjQHofeYqr9", - "name": "go-multiaddr", - "version": "1.3.5" - }, - { - "author": "multiformats", - "hash": "Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC", - "name": "go-multiaddr-net", - "version": "1.6.5" - }, - { - "hash": "QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae", - "name": "go-log", - "version": "1.5.7" - }, - { - "author": "whyrusleeping", - "hash": "QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb", - "name": "go-temp-err-catcher", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmXuRkCR7BNQa9uqfpTiFWsTQLzmTWYg91Ja1w95gnqb6u", - "name": "go-libp2p-net", - "version": "3.0.15" - }, - { - "author": "onsi", - "hash": "QmNuLxhqRhfimRZeLttPe6Sa44MNwuHAdaFFa9TDuNZUmf", - "name": "ginkgo", - "version": "1.1.0" - }, - { - "author": "onsi", - "hash": "QmUWtNQd8JdEiYiDqNYTUcaqyteJZ2rTNQLiw3dauLPccy", - "name": "gomega", - "version": "1.1.0" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-libp2p-transport-upgrader", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.16" -} - diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/.travis.yml b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/.travis.yml new file mode 100644 index 0000000000..5f1e06d1ac --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: +- '1.11.x' +install: +- make deps +script: +- make test + +after_success: +- bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/LICENSE b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/LICENSE new file mode 100644 index 0000000000..cea85a4707 --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Hector Sanjuan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/Makefile b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/Makefile new file mode 100644 index 0000000000..bbab212a5d --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/Makefile @@ -0,0 +1,17 @@ +all: deps +clean: rwundo +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go +deps: gx + gx --verbose install --global + gx-go rewrite +test: deps + go test -v -race -covermode=atomic -coverprofile=coverage.txt . +rw: + gx-go rewrite +rwundo: + gx-go rewrite --undo +publish: rwundo + gx publish +.PHONY: all gx deps test rw rwundo publish clean diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/README.md b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/README.md new file mode 100644 index 0000000000..b86747773f --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/README.md @@ -0,0 +1,72 @@ +# go-libp2p-http + +[![Build Status](https://travis-ci.org/hsanjuan/go-libp2p-http.svg?branch=master)](https://travis-ci.org/hsanjuan/go-libp2p-http) +[![codecov](https://codecov.io/gh/hsanjuan/go-libp2p-http/branch/master/graph/badge.svg)](https://codecov.io/gh/hsanjuan/go-libp2p-http) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg)](https://github.com/RichardLitt/standard-readme) + + +> HTTP on top of LibP2P + +Package `p2phttp` allows to serve HTTP endpoints and make HTTP requests through [LibP2P](https://github.com/libp2p/libp2p) using Go's standard "http" and "net" stack. + +Instead of the regular "host:port" addressing, `p2phttp` uses a Peer ID and lets LibP2P take care of the routing, thus taking advantage of features like multi-routes, NAT transversal and stream multiplexing over a single connection. + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Contribute](#contribute) +- [License](#license) + +## Install + +This package uses [`gx`](https://github.com/whyrusleeping/gx-go) for dependencies and should be imported with `gx` on other projects: + +``` +$ gx import github.com/hsanjuan/go-libp2p-http +``` + +The code can be downloaded and tested with: + +``` +$ go get -u -d github.com/hsanjuan/go-libp2p-http +$ cd $GOPATH/src/github.com/hsanjuan/go-libp2p-http +$ make test +``` + +## Usage + +Full documentation can be read at [Godoc](https://godoc.org/github.com/hsanjuan/go-libp2p-http). The important bits follow. + +A simple http.Server on LibP2P works as: + +```go +listener, _ := gostream.Listen(host1, p2phttp.P2PProtocol) +defer listener.Close() +go func() { + http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Hi!")) + }) + server := &http.Server{} + server.Serve(listener) +} +``` + +The listener is provided by https://github.com/hsanjuan/go-libp2p-gostream . + +A client just needs to be initialized with a custom LibP2P host-based transport to perform requests to such server: + +```go +tr := &http.Transport{} +tr.RegisterProtocol("libp2p", p2phttp.NewTransport(clientHost)) +client := &http.Client{Transport: tr} +res, err := client.Get("libp2p://Qmaoi4isbcTbFfohQyn28EiYM5CDWQx9QRCjDh3CTeiY7P/hello") +``` + +## Contribute + +PRs accepted. + +## License + +MIT © Hector Sanjuan diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/p2phttp.go b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/p2phttp.go new file mode 100644 index 0000000000..c7f069013d --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/p2phttp.go @@ -0,0 +1,163 @@ +// Package p2phttp allows to serve HTTP endpoints and make HTTP requests through +// LibP2P (https://github.com/libp2p/libp2p) using Go's standard "http" and +// "net" stacks. +// +// Instead of the regular "host:port" addressing, `p2phttp` uses a Peer ID +// and lets LibP2P take care of the routing, thus taking advantage +// of features like multi-routes, NAT transversal and stream multiplexing +// over a single connection. +// +// When already running a LibP2P facility, this package allows to expose +// existing HTTP-based services (like REST APIs) through LibP2P and to +// use those services with minimal changes to the code-base. +// +// For example, a simple http.Server on LibP2P works as: +// +// listener, _ := gostream.Listen(host1, p2phttp.P2PProtocol) +// defer listener.Close() +// go func() { +// http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { +// w.Write([]byte("Hi!")) +// }) +// server := &http.Server{} +// server.Serve(listener) +// } +// ... +// +// As shown above, a Server only needs a +// "github.com/hsanjuan/go-libp2p-gostream" listener. This listener will +// use a libP2P host to watch for stream tagged with our Protocol. +// +// On the other side, a client just needs to be initialized with a custom +// LibP2P host-based transport to perform requests to such server: +// +// tr := &http.Transport{} +// tr.RegisterProtocol("libp2p", p2phttp.NewTransport(clientHost)) +// client := &http.Client{Transport: tr} +// res, err := client.Get("libp2p://Qmaoi4isbcTbFfohQyn28EiYM5CDWQx9QRCjDh3CTeiY7P/hello") +// ... +// +// In the example above, the client registers a "libp2p" protocol for which the +// custom transport is used. It can still perform regular "http" requests. The +// protocol name used is arbitraty and non standard. +// +// Note that LibP2P hosts cannot dial to themselves, so there is no possibility +// of using the same host as server and as client. +package p2phttp + +import ( + "bufio" + "io" + "net" + "net/http" + + gostream "gx/ipfs/QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9/go-libp2p-gostream" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + host "gx/ipfs/QmYrWiWM4qtrnCeT3R14jY3ZZyirDNJgwK57q4qFYePgbd/go-libp2p-host" + protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" +) + +// DefaultP2PProtocol is used to tag and identify streams +// handled by go-libp2p-http +var DefaultP2PProtocol protocol.ID = "/libp2p-http" + +// options holds configuration options for the transport. +type options struct { + Protocol protocol.ID +} + +// Option allows to set the libp2p transport options. +type Option func(o *options) + +// ProtocolOption sets the Protocol Tag associated to the libp2p roundtripper. +func ProtocolOption(p protocol.ID) Option { + return func(o *options) { + o.Protocol = p + } +} + +// RoundTripper implemenets http.RoundTrip and can be used as +// custom transport with Go http.Client. +type RoundTripper struct { + h host.Host + opts options +} + +// NewTransport returns a new RoundTripper which uses the provided +// libP2P host to perform an http request and obtain the response. +// +// The typical use case for NewTransport is to register the "libp2p" +// protocol with a Transport, as in: +// t := &http.Transport{} +// t.RegisterProtocol("libp2p", p2phttp.NewTransport(host, ProtocolOption(DefaultP2PProtocol))) +// c := &http.Client{Transport: t} +// res, err := c.Get("libp2p://Qmaoi4isbcTbFfohQyn28EiYM5CDWQx9QRCjDh3CTeiY7P/index.html") +// ... +func NewTransport(h host.Host, opts ...Option) *RoundTripper { + defOpts := options{ + Protocol: DefaultP2PProtocol, + } + for _, o := range opts { + o(&defOpts) + } + + return &RoundTripper{h, defOpts} +} + +// we wrap the response body and close the stream +// only when it's closed. +type respBody struct { + io.ReadCloser + conn net.Conn +} + +// Closes the response's body and the connection. +func (rb *respBody) Close() error { + rb.conn.Close() + return rb.ReadCloser.Close() +} + +// RoundTrip executes a single HTTP transaction, returning +// a Response for the provided Request. +func (rt *RoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { + addr := r.Host + if addr == "" { + addr = r.URL.Host + } + + pid, err := peer.IDB58Decode(addr) + if err != nil { + return nil, err + } + + conn, err := gostream.Dial(rt.h, peer.ID(pid), rt.opts.Protocol) + if err != nil { + if r.Body != nil { + r.Body.Close() + } + return nil, err + } + + // Write the request while reading the response + go func() { + err := r.Write(conn) + if err != nil { + conn.Close() + } + if r.Body != nil { + r.Body.Close() + } + }() + + resp, err := http.ReadResponse(bufio.NewReader(conn), r) + if err != nil { + return resp, err + } + + resp.Body = &respBody{ + ReadCloser: resp.Body, + conn: conn, + } + + return resp, nil +} diff --git a/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/package.json b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/package.json new file mode 100644 index 0000000000..7f16d29ce4 --- /dev/null +++ b/vendor/gx/ipfs/QmeXGHY2ntPsXLX28oGD2ufJB9EdvByz41Tt2sWrYPC7JJ/go-libp2p-http/package.json @@ -0,0 +1,30 @@ +{ + "author": "hsanjuan", + "bugs": { + "url": "https://github.com/hsanjuan/go-libp2p-http" + }, + "gx": { + "dvcsimport": "github.com/hsanjuan/go-libp2p-http" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmRxk6AUaGaKCfzS1xSNRojiAPd7h2ih8GuCdjJBF3Y6GK", + "name": "go-libp2p", + "version": "6.0.39" + }, + { + "author": "hsanjuan", + "hash": "QmWmQGZb9dJH3LqGonTeKvLgwcZ6qrPGT1UHQdCDpSi6r9", + "name": "go-libp2p-gostream", + "version": "0.0.29" + } + ], + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "go-libp2p-http", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "1.1.17" +} + diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/.travis.yml b/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/.travis.yml deleted file mode 100644 index 23e425c53d..0000000000 --- a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: - - linux - -sudo: false - -language: go - -go: - - 1.9.x - -install: - - make deps - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - -cache: - directories: - - $GOPATH/src/gx - -notifications: - email: false - -env: GOTFLAGS="-race" diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/LICENSE b/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/LICENSE deleted file mode 100644 index 26100332ba..0000000000 --- a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Jeromy Johnson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/interface.go b/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/interface.go deleted file mode 100644 index 5d349e19f4..0000000000 --- a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/interface.go +++ /dev/null @@ -1,16 +0,0 @@ -package metrics - -import ( - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" - protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol" -) - -type Reporter interface { - LogSentMessage(int64) - LogRecvMessage(int64) - LogSentMessageStream(int64, protocol.ID, peer.ID) - LogRecvMessageStream(int64, protocol.ID, peer.ID) - GetBandwidthForPeer(peer.ID) Stats - GetBandwidthForProtocol(protocol.ID) Stats - GetBandwidthTotals() Stats -} diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/package.json b/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/package.json deleted file mode 100644 index e67c0521d9..0000000000 --- a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": "whyrusleeping", - "bugs": { - "url": "https://github.com/libp2p/go-libp2p-metrics" - }, - "gx": { - "dvcsimport": "github.com/libp2p/go-libp2p-metrics" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB", - "name": "go-libp2p-peer", - "version": "2.4.0" - }, - { - "author": "whyrusleeping", - "hash": "QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN", - "name": "go-libp2p-protocol", - "version": "1.0.0" - }, - { - "author": "Stebalien", - "hash": "QmQFXpvKpF34dK9HcE7k8Ksk8V4BwWYZtdEcjzu5aUgRVr", - "name": "go-flow-metrics", - "version": "0.2.0" - } - ], - "gxVersion": "0.9.1", - "language": "go", - "license": "", - "name": "go-libp2p-metrics", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "2.1.7" -} - diff --git a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/encoder_test.go b/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/encoder_test.go deleted file mode 100644 index 3db2c13518..0000000000 --- a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/encoder_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package multibase - -import ( - "testing" -) - -func TestInvalidCode(t *testing.T) { - _, err := NewEncoder('q') - if err == nil { - t.Error("expected failure") - } -} - -func TestInvalidName(t *testing.T) { - values := []string{"invalid", "", "q"} - for _, val := range values { - _, err := EncoderByName(val) - if err == nil { - t.Errorf("EncoderByName(%v) expected failure", val) - } - } -} - -func TestEncoder(t *testing.T) { - for name, code := range Encodings { - encoder, err := NewEncoder(code) - if err != nil { - t.Fatal(err) - } - // Make sure the MustNewEncoder doesn't panic - MustNewEncoder(code) - str, err := Encode(code, sampleBytes) - if err != nil { - t.Fatal(err) - } - str2 := encoder.Encode(sampleBytes) - if str != str2 { - t.Errorf("encoded string mismatch: %s != %s", str, str2) - } - _, err = EncoderByName(name) - if err != nil { - t.Fatalf("EncoderByName(%s) failed: %v", name, err) - } - // Test that an encoder can be created from the single letter - // prefix - _, err = EncoderByName(str[0:1]) - if err != nil { - t.Fatalf("EncoderByName(%s) failed: %v", str[0:1], err) - } - } -} diff --git a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase-conv/main.go b/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase-conv/main.go deleted file mode 100644 index 81b1ff542a..0000000000 --- a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase-conv/main.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "fmt" - "os" - - multibase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" -) - -func main() { - if len(os.Args) < 3 { - fmt.Printf("usage: %s ...\n", os.Args[0]) - os.Exit(1) - } - - var newBase multibase.Encoding - if baseParm := os.Args[1]; len(baseParm) != 0 { - newBase = multibase.Encoding(baseParm[0]) - } else { - fmt.Fprintln(os.Stderr, " is empty") - os.Exit(1) - } - - input := os.Args[2:] - - for _, strmbase := range input { - _, data, err := multibase.Decode(strmbase) - if err != nil { - fmt.Fprintf(os.Stderr, "error while decoding: %s\n", err) - os.Exit(1) - } - - newCid, err := multibase.Encode(newBase, data) - if err != nil { - fmt.Fprintf(os.Stderr, "error while encoding: %s\n", err) - os.Exit(1) - } - fmt.Println(newCid) - } - -} diff --git a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase_test.go b/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase_test.go deleted file mode 100644 index f389f5cef7..0000000000 --- a/vendor/gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase/multibase_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package multibase - -import ( - "bytes" - "math/rand" - "testing" -) - -func TestMap(t *testing.T) { - for s, e := range Encodings { - s2 := EncodingToStr[e] - if s != s2 { - t.Errorf("round trip failed on encoding map: %s != %s", s, s2) - } - } - for e, s := range EncodingToStr { - e2 := Encodings[s] - if e != e2 { - t.Errorf("round trip failed on encoding map: '%c' != '%c'", e, e2) - } - } -} - -var sampleBytes = []byte("Decentralize everything!!!") -var encodedSamples = map[Encoding]string{ - Identity: string(0x00) + "Decentralize everything!!!", - Base16: "f446563656e7472616c697a652065766572797468696e67212121", - Base16Upper: "F446563656E7472616C697A652065766572797468696E67212121", - Base32: "birswgzloorzgc3djpjssazlwmvzhs5dinfxgoijbee", - Base32Upper: "BIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJBEE", - Base32pad: "cirswgzloorzgc3djpjssazlwmvzhs5dinfxgoijbee======", - Base32padUpper: "CIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJBEE======", - Base32hex: "v8him6pbeehp62r39f9ii0pbmclp7it38d5n6e89144", - Base32hexUpper: "V8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E89144", - Base32hexPad: "t8him6pbeehp62r39f9ii0pbmclp7it38d5n6e89144======", - Base32hexPadUpper: "T8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E89144======", - Base58BTC: "z36UQrhJq9fNDS7DiAHM9YXqDHMPfr4EMArvt", - Base64: "mRGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE", - Base64url: "uRGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE", - Base64pad: "MRGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE=", - Base64urlPad: "URGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE=", -} - -func testEncode(t *testing.T, encoding Encoding, bytes []byte, expected string) { - actual, err := Encode(encoding, bytes) - if err != nil { - t.Error(err) - return - } - if actual != expected { - t.Errorf("encoding failed for %c (%d), expected: %s, got: %s", encoding, encoding, expected, actual) - } -} - -func testDecode(t *testing.T, expectedEncoding Encoding, expectedBytes []byte, data string) { - actualEncoding, actualBytes, err := Decode(data) - if err != nil { - t.Error(err) - return - } - if actualEncoding != expectedEncoding { - t.Errorf("wrong encoding code, expected: %c (%d), got %c (%d)", expectedEncoding, expectedEncoding, actualEncoding, actualEncoding) - } - if !bytes.Equal(actualBytes, expectedBytes) { - t.Errorf("decoding failed for %c (%d), expected: %v, got %v", actualEncoding, actualEncoding, expectedBytes, actualBytes) - } -} - -func TestEncode(t *testing.T) { - for encoding, data := range encodedSamples { - testEncode(t, encoding, sampleBytes, data) - } -} - -func TestDecode(t *testing.T) { - for encoding, data := range encodedSamples { - testDecode(t, encoding, sampleBytes, data) - } -} - -func TestRoundTrip(t *testing.T) { - buf := make([]byte, 17) - rand.Read(buf) - - baseList := []Encoding{Identity, Base16, Base32, Base32hex, Base32pad, Base32hexPad, Base58BTC, Base58Flickr, Base64pad, Base64urlPad} - - for _, base := range baseList { - enc, err := Encode(base, buf) - if err != nil { - t.Fatal(err) - } - - e, out, err := Decode(enc) - if err != nil { - t.Fatal(err) - } - - if e != base { - t.Fatal("got wrong encoding out") - } - - if !bytes.Equal(buf, out) { - t.Fatal("input wasnt the same as output", buf, out) - } - } - - _, _, err := Decode("") - if err == nil { - t.Fatal("shouldnt be able to decode empty string") - } -} - -func BenchmarkRoundTrip(b *testing.B) { - buf := make([]byte, 32) - rand.Read(buf) - b.ResetTimer() - - bases := map[string]Encoding{ - "Identity": Identity, - "Base16": Base16, - "Base16Upper": Base16Upper, - "Base32": Base32, - "Base32Upper": Base32Upper, - "Base32pad": Base32pad, - "Base32padUpper": Base32padUpper, - "Base32hex": Base32hex, - "Base32hexUpper": Base32hexUpper, - "Base32hexPad": Base32hexPad, - "Base32hexPadUpper": Base32hexPadUpper, - "Base58Flickr": Base58Flickr, - "Base58BTC": Base58BTC, - "Base64": Base64, - "Base64url": Base64url, - "Base64pad": Base64pad, - "Base64urlPad": Base64urlPad, - } - - for name, base := range bases { - b.Run(name, func(b *testing.B) { - for i := 0; i < b.N; i++ { - enc, err := Encode(base, buf) - if err != nil { - b.Fatal(err) - } - - e, out, err := Decode(enc) - if err != nil { - b.Fatal(err) - } - - if e != base { - b.Fatal("got wrong encoding out") - } - - if !bytes.Equal(buf, out) { - b.Fatal("input wasnt the same as output", buf, out) - } - } - }) - } -} diff --git a/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/.travis.yml b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/.travis.yml new file mode 100644 index 0000000000..c9285beae0 --- /dev/null +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/.travis.yml @@ -0,0 +1,23 @@ +os: + - linux + - osx + +sudo: false + +language: go + +go: + - 1.11.x + +install: + - make deps + +script: + - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) + +cache: + directories: + - $GOPATH/src/gx + +notifications: + email: false diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/LICENSE b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/LICENSE similarity index 100% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/LICENSE rename to vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/LICENSE diff --git a/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/Makefile b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/Makefile new file mode 100644 index 0000000000..20619413c9 --- /dev/null +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/Makefile @@ -0,0 +1,11 @@ +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/README.md b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/README.md similarity index 100% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/README.md rename to vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/README.md diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/codecov.yml b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/codecov.yml rename to vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/codecov.yml diff --git a/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/conn.go b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/conn.go new file mode 100644 index 0000000000..eecc802158 --- /dev/null +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/conn.go @@ -0,0 +1,35 @@ +package stream + +import ( + "fmt" + + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" + inet "gx/ipfs/QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp/go-libp2p-net" +) + +type transportConn struct { + smux.Conn + inet.ConnMultiaddrs + inet.ConnSecurity + transport transport.Transport +} + +func (t *transportConn) Transport() transport.Transport { + return t.transport +} + +func (t *transportConn) String() string { + ts := "" + if s, ok := t.transport.(fmt.Stringer); ok { + ts = "[" + s.String() + "]" + } + return fmt.Sprintf( + " %s (%s)>", + ts, + t.LocalMultiaddr(), + t.LocalPeer(), + t.RemoteMultiaddr(), + t.RemotePeer(), + ) +} diff --git a/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/listener.go b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/listener.go new file mode 100644 index 0000000000..aaf2445dc3 --- /dev/null +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/listener.go @@ -0,0 +1,159 @@ +package stream + +import ( + "context" + "fmt" + "sync" + + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + tec "gx/ipfs/QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb/go-temp-err-catcher" + logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" +) + +var log = logging.Logger("stream-upgrader") + +type connErr struct { + conn transport.Conn + err error +} + +type listener struct { + manet.Listener + + transport transport.Transport + upgrader *Upgrader + + incoming chan transport.Conn + err error + + // Used for backpressure + threshold *threshold + + // Canceling this context isn't sufficient to tear down the listener. + // Call close. + ctx context.Context + cancel func() +} + +// Close closes the listener. +func (l *listener) Close() error { + // Do this first to try to get any relevent errors. + err := l.Listener.Close() + + l.cancel() + // Drain and wait. + for c := range l.incoming { + c.Close() + } + return err +} + +// handles inbound connections. +// +// This function does a few interesting things that should be noted: +// +// 1. It logs and discards temporary/transient errors (errors with a Temporary() +// function that returns true). +// 2. It stops accepting new connections once AcceptQueueLength connections have +// been fully negotiated but not accepted. This gives us a basic backpressure +// mechanism while still allowing us to negotiate connections in parallel. +func (l *listener) handleIncoming() { + var wg sync.WaitGroup + defer func() { + // make sure we're closed + l.Listener.Close() + if l.err == nil { + l.err = fmt.Errorf("listener closed") + } + + wg.Wait() + close(l.incoming) + }() + + var catcher tec.TempErrCatcher + for l.ctx.Err() == nil { + maconn, err := l.Listener.Accept() + if err != nil { + // Note: function may pause the accept loop. + if catcher.IsTemporary(err) { + log.Infof("temporary accept error: %s", err) + continue + } + l.err = err + return + } + + // The go routine below calls Release when the context is + // canceled so there's no need to wait on it here. + l.threshold.Wait() + + log.Debugf("listener %s got connection: %s <---> %s", + l, + maconn.LocalMultiaddr(), + maconn.RemoteMultiaddr()) + + wg.Add(1) + go func() { + defer wg.Done() + + ctx, cancel := context.WithTimeout(l.ctx, transport.AcceptTimeout) + defer cancel() + + conn, err := l.upgrader.UpgradeInbound(ctx, l.transport, maconn) + if err != nil { + // Don't bother bubbling this up. We just failed + // to completely negotiate the connection. + log.Debugf("accept upgrade error: %s (%s <--> %s)", + err, + maconn.LocalMultiaddr(), + maconn.RemoteMultiaddr()) + return + } + + log.Debugf("listener %s accepted connection: %s", l, conn) + + // This records the fact that the connection has been + // setup and is waiting to be accepted. This call + // *never* blocks, even if we go over the threshold. It + // simply ensures that calls to Wait block while we're + // over the threshold. + l.threshold.Acquire() + defer l.threshold.Release() + + select { + case l.incoming <- conn: + case <-ctx.Done(): + if l.ctx.Err() == nil { + // Listener *not* closed but the accept timeout expired. + log.Warningf("listener dropped connection due to slow accept") + } + // Wait on the context with a timeout. This way, + // if we stop accepting connections for some reason, + // we'll eventually close all the open ones + // instead of hanging onto them. + conn.Close() + } + }() + } +} + +// Accept accepts a connection. +func (l *listener) Accept() (transport.Conn, error) { + for c := range l.incoming { + // Could have been sitting there for a while. + if !c.IsClosed() { + return c, nil + } + } + return nil, l.err +} + +func (l *listener) String() string { + if s, ok := l.transport.(fmt.Stringer); ok { + return fmt.Sprintf("", s, l.Multiaddr()) + } + return fmt.Sprintf("", l.Multiaddr()) +} + +var _ transport.Listener = (*listener)(nil) diff --git a/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/package.json b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/package.json new file mode 100644 index 0000000000..dc5eb7f81a --- /dev/null +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/package.json @@ -0,0 +1,101 @@ +{ + "author": "steb", + "bugs": { + "url": "https://github.com/libp2p/go-libp2p-transport-upgrader" + }, + "gx": { + "dvcsimport": "github.com/libp2p/go-libp2p-transport-upgrader" + }, + "gxDependencies": [ + { + "author": "Stebalien", + "hash": "QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp", + "name": "go-conn-security", + "version": "0.1.28" + }, + { + "author": "whyrusleeping", + "hash": "QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT", + "name": "go-stream-muxer", + "version": "3.1.0" + }, + { + "author": "whyrusleeping", + "hash": "QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd", + "name": "go-maddr-filter", + "version": "1.1.13" + }, + { + "author": "whyrusleeping", + "hash": "QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu", + "name": "go-libp2p-transport", + "version": "3.0.27" + }, + { + "author": "libp2p", + "hash": "QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4", + "name": "go-libp2p-interface-pnet", + "version": "3.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h", + "name": "go-libp2p-peer", + "version": "3.1.2" + }, + { + "author": "whyrusleeping", + "hash": "QmaJvNdDccVkTELQLCGXWrLxgaQ14aMdhzZx1EiHPXKbDc", + "name": "go-smux-multiplex", + "version": "3.0.19" + }, + { + "author": "multiformats", + "hash": "QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL", + "name": "go-multiaddr", + "version": "1.4.1" + }, + { + "author": "multiformats", + "hash": "Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip", + "name": "go-multiaddr-net", + "version": "1.7.2" + }, + { + "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", + "name": "go-log", + "version": "1.5.9" + }, + { + "author": "whyrusleeping", + "hash": "QmWHgLqrghM9zw77nF6gdvT9ExQ2RB9pLxkd8sDHZf1rWb", + "name": "go-temp-err-catcher", + "version": "0.0.0" + }, + { + "author": "whyrusleeping", + "hash": "QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp", + "name": "go-libp2p-net", + "version": "3.0.30" + }, + { + "author": "onsi", + "hash": "QmNuLxhqRhfimRZeLttPe6Sa44MNwuHAdaFFa9TDuNZUmf", + "name": "ginkgo", + "version": "1.1.0" + }, + { + "author": "onsi", + "hash": "QmUWtNQd8JdEiYiDqNYTUcaqyteJZ2rTNQLiw3dauLPccy", + "name": "gomega", + "version": "1.1.0" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-libp2p-transport-upgrader", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.1.28" +} + diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/threshold.go b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/threshold.go similarity index 100% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/threshold.go rename to vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/threshold.go diff --git a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/upgrader.go b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/upgrader.go similarity index 84% rename from vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/upgrader.go rename to vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/upgrader.go index 2a013fc965..e2f60c333e 100644 --- a/vendor/gx/ipfs/QmeUjhpfGkrMtE6s7JjU2xLhfzprSDh16QUxGVr3wTrKSx/go-libp2p-transport-upgrader/upgrader.go +++ b/vendor/gx/ipfs/QmeqC5shQjEBRG9B8roZqQCJ9xb7Pq6AbWxJFMyLgqBBWh/go-libp2p-transport-upgrader/upgrader.go @@ -6,13 +6,13 @@ import ( "fmt" "net" - peer "gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer" + transport "gx/ipfs/QmNQWMWWBmkAcaVEspSNwYB95axzKFhYTdqZtABA2zXoPu/go-libp2p-transport" + ss "gx/ipfs/QmPRoHqULmP4MuKAN5EFaJ64MLpeMY8cny2318xDBDmmkp/go-conn-security" + filter "gx/ipfs/QmT6C5ebDy92zyRzdmSNyda5q7zkNXy68X47RDJiHpvaxd/go-maddr-filter" + smux "gx/ipfs/QmVtV1y2e8W4eQgzsP6qfSpCCZ6zWYE4m6NzJjB7iswwrT/go-stream-muxer" pnet "gx/ipfs/QmW7Ump7YyBMr712Ta3iEVh3ZYcfVvJaPryfbCnyE826b4/go-libp2p-interface-pnet" - smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" - ss "gx/ipfs/QmZ3XKH272gU9px86XqWYeZHU65ayHxWs6Wbswvdj2VqVK/go-conn-security" - manet "gx/ipfs/Qmaabb1tJZ2CX5cp6MuuiGgns71NYoxdgQP6Xdid1dVceC/go-multiaddr-net" - transport "gx/ipfs/QmbCkisBsdejwSzusQcdbYjpSX3yvUw1ek2YSsJ89QbZYX/go-libp2p-transport" - filter "gx/ipfs/QmbuCmYjYK5GQo4zKrK2h3NVsyBYf81ZQXgiE69CLLGHgB/go-maddr-filter" + peer "gx/ipfs/QmYVXrKrKHDC9FobgmcmshCDyWwdrfwfanNQN4oxJ9Fk3h/go-libp2p-peer" + manet "gx/ipfs/Qmc85NSvmSG4Frn9Vb2cBc1rMyULH6D3TNVEfCzSKoUpip/go-multiaddr-net" ) // ErrNilPeer is returned when attempting to upgrade an outbound connection @@ -74,7 +74,7 @@ func (u *Upgrader) upgrade(ctx context.Context, t transport.Transport, maconn ma pconn, err := u.Protector.Protect(conn) if err != nil { conn.Close() - return nil, err + return nil, fmt.Errorf("failed to setup private network protector: %s", err) } conn = pconn } else if pnet.ForcePrivateNetwork { @@ -85,12 +85,12 @@ func (u *Upgrader) upgrade(ctx context.Context, t transport.Transport, maconn ma sconn, err := u.setupSecurity(ctx, conn, p) if err != nil { conn.Close() - return nil, err + return nil, fmt.Errorf("failed to negotiate security protocol: %s", err) } smconn, err := u.setupMuxer(ctx, sconn, p) if err != nil { conn.Close() - return nil, err + return nil, fmt.Errorf("failed to negotiate security stream multiplexer: %s", err) } return &transportConn{ Conn: smconn, diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/.travis.yml b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/.travis.yml similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/.travis.yml rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/.travis.yml diff --git a/vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/LICENSE b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/LICENSE similarity index 100% rename from vendor/gx/ipfs/Qmdps3CYh5htGQSrPvzg5PHouVexLmtpbuLCqc4vuej8PC/go-smux-yamux/LICENSE rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/LICENSE diff --git a/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/Makefile b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/Makefile new file mode 100644 index 0000000000..20619413c9 --- /dev/null +++ b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/Makefile @@ -0,0 +1,11 @@ +gx: + go get github.com/whyrusleeping/gx + go get github.com/whyrusleeping/gx-go + +deps: gx + gx --verbose install --global + gx-go rewrite + +publish: + gx-go rewrite --undo + diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/README.md b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/README.md similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/README.md rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/README.md diff --git a/vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/codecov.yml b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/codecov.yml similarity index 100% rename from vendor/gx/ipfs/QmeaTjsfPf6vQ3WU2BUdjakgvKUHpuv3Fjxvb75N5iksMx/go-libp2p-metrics/codecov.yml rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/codecov.yml diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/io.go b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/io.go similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/io.go rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/io.go diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash.go b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/multihash.go similarity index 100% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/multihash.go rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/multihash.go diff --git a/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/package.json b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/package.json new file mode 100644 index 0000000000..19e646e303 --- /dev/null +++ b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/package.json @@ -0,0 +1,54 @@ +{ + "author": "multiformats", + "bugs": { + "url": "https://github.com/multiformats/go-multihash/issues" + }, + "gx": { + "dvcsimport": "github.com/multiformats/go-multihash" + }, + "gxDependencies": [ + { + "author": "whyrusleeping", + "hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N", + "name": "go-crypto", + "version": "0.2.1" + }, + { + "author": "mr-tron", + "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", + "name": "go-base58-fast", + "version": "0.1.1" + }, + { + "author": "whyrusleeping", + "hash": "QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi", + "name": "keccakpg", + "version": "0.0.1" + }, + { + "author": "whyrusleeping", + "hash": "QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx", + "name": "murmur3", + "version": "0.0.0" + }, + { + "author": "minio", + "hash": "QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU", + "name": "sha256-simd", + "version": "0.1.2" + }, + { + "author": "minio", + "hash": "QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx", + "name": "blake2b-simd", + "version": "0.1.1" + } + ], + "gxVersion": "0.9.0", + "language": "go", + "license": "MIT", + "name": "go-multihash", + "releaseCmd": "git commit -a -m \"gx release $VERSION\"", + "version": "1.0.9" +} + diff --git a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum.go b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/sum.go similarity index 93% rename from vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum.go rename to vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/sum.go index 6949b22a50..81b1e9fdb2 100644 --- a/vendor/gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash/sum.go +++ b/vendor/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash/sum.go @@ -8,9 +8,9 @@ import ( blake2s "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/blake2s" sha3 "gx/ipfs/QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N/go-crypto/sha3" - sha256 "gx/ipfs/QmXTpwq2AkzQsPjKqFQDNY2bMdsAT53hUBETeyj8QRHTZU/sha256-simd" blake2b "gx/ipfs/QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx/blake2b-simd" keccak "gx/ipfs/QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi/keccakpg" + sha256 "gx/ipfs/QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU/sha256-simd" murmur3 "gx/ipfs/QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx/murmur3" ) @@ -78,7 +78,7 @@ func Sum(data []byte, code uint64, length int) (Multihash, error) { case DBL_SHA2_256: d = sumSHA256(sumSHA256(data)) case MURMUR3: - d, err = sumMURMUR3(data) + d = sumMURMUR3(data) case SHAKE_128: d = sumSHAKE128(data) case SHAKE_256: @@ -164,27 +164,19 @@ func sumKeccak512(data []byte) []byte { return h.Sum(nil) } -func sumSHA3(data []byte) ([]byte, error) { - h := sha3.New512() - if _, err := h.Write(data); err != nil { - return nil, err - } - return h.Sum(nil), nil -} - func sumSHA3_512(data []byte) []byte { a := sha3.Sum512(data) return a[:] } -func sumMURMUR3(data []byte) ([]byte, error) { +func sumMURMUR3(data []byte) []byte { number := murmur3.Sum32(data) bytes := make([]byte, 4) for i := range bytes { bytes[i] = byte(number & 0xff) number >>= 8 } - return bytes, nil + return bytes } func sumSHAKE128(data []byte) []byte { diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/.travis.yml b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/.travis.yml new file mode 100644 index 0000000000..63dc659d2e --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/.travis.yml @@ -0,0 +1,24 @@ +sudo: false + + +language: go +go: + - 'tip' + +install: + - go get github.com/whyrusleeping/gx + - go get github.com/whyrusleeping/gx-go + - gx install --global +script: + - gx test -v -race -coverprofile=coverage.txt -covermode=atomic ./... + +after_success: + - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $GOPATH/src/gx + +notifications: +email: false + diff --git a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/README.md b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/README.md similarity index 100% rename from vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/README.md rename to vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/README.md diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc/encoder.go b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc/encoder.go new file mode 100644 index 0000000000..864d4cedf2 --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/cidenc/encoder.go @@ -0,0 +1,59 @@ +package cidenc + +import ( + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mbase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" +) + +// Encoder is a basic Encoder that will encode CIDs using a specified +// base and optionally upgrade a CIDv0 to CIDv1 +type Encoder struct { + Base mbase.Encoder // The multibase to use + Upgrade bool // If true upgrade CIDv0 to CIDv1 when encoding +} + +// Default return a new default encoder +func Default() Encoder { + return Encoder{Base: mbase.MustNewEncoder(mbase.Base58BTC)} +} + +// Encode encodes the cid using the parameters of the Encoder +func (enc Encoder) Encode(c cid.Cid) string { + if enc.Upgrade && c.Version() == 0 { + c = cid.NewCidV1(c.Type(), c.Hash()) + } + return c.Encode(enc.Base) +} + +// Recode reencodes the cid string to match the parameters of the +// encoder +func (enc Encoder) Recode(v string) (string, error) { + skip, err := enc.noopRecode(v) + if skip || err != nil { + return v, err + } + + c, err := cid.Decode(v) + if err != nil { + return v, err + } + + return enc.Encode(c), nil +} + +func (enc Encoder) noopRecode(v string) (bool, error) { + if len(v) < 2 { + return false, cid.ErrCidTooShort + } + ver := cidVer(v) + skip := ver == 0 && !enc.Upgrade || ver == 1 && v[0] == byte(enc.Base.Encoding()) + return skip, nil +} + +func cidVer(v string) int { + if len(v) == 46 && v[:2] == "Qm" { + return 0 + } else { + return 1 + } +} diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/codecov.yml b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/codecov.yml new file mode 100644 index 0000000000..5f88a9ea27 --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/codecov.yml @@ -0,0 +1,3 @@ +coverage: + range: "50...100" +comment: off diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/format.go b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/format.go new file mode 100644 index 0000000000..838ba148d1 --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/format.go @@ -0,0 +1,197 @@ +package cidutil + +import ( + "bytes" + "fmt" + + c "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mb "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" + mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" +) + +// FormatRef is a string documenting the format string for the Format function +const FormatRef = ` + %% literal % + %b multibase name + %B multibase code + %v version string + %V version number + %c codec name + %C codec code + %h multihash name + %H multihash code + %L hash digest length + %m multihash encoded in base %b (with multibase prefix) + %M multihash encoded in base %b without multibase prefix + %d hash digest encoded in base %b (with multibase prefix) + %D hash digest encoded in base %b without multibase prefix + %s cid string encoded in base %b (1) + %S cid string encoded in base %b without multibase prefix + %P cid prefix: %v-%c-%h-%L + +(1) For CID version 0 the multibase must be base58btc and no prefix is +used. For Cid version 1 the multibase prefix is included. +` + +// Format formats a cid according to the format specificer as +// documented in the FormatRef constant +func Format(fmtStr string, base mb.Encoding, cid c.Cid) (string, error) { + p := cid.Prefix() + var out bytes.Buffer + var err error + encoder, err := mb.NewEncoder(base) + if err != nil { + return "", err + } + for i := 0; i < len(fmtStr); i++ { + if fmtStr[i] != '%' { + out.WriteByte(fmtStr[i]) + continue + } + i++ + if i >= len(fmtStr) { + return "", FormatStringError{"premature end of format string", ""} + } + switch fmtStr[i] { + case '%': + out.WriteByte('%') + case 'b': // base name + out.WriteString(baseToString(base)) + case 'B': // base code + out.WriteByte(byte(base)) + case 'v': // version string + fmt.Fprintf(&out, "cidv%d", p.Version) + case 'V': // version num + fmt.Fprintf(&out, "%d", p.Version) + case 'c': // codec name + out.WriteString(codecToString(p.Codec)) + case 'C': // codec code + fmt.Fprintf(&out, "%d", p.Codec) + case 'h': // hash fun name + out.WriteString(hashToString(p.MhType)) + case 'H': // hash fun code + fmt.Fprintf(&out, "%d", p.MhType) + case 'L': // hash length + fmt.Fprintf(&out, "%d", p.MhLength) + case 'm', 'M': // multihash encoded in base %b + out.WriteString(encode(encoder, cid.Hash(), fmtStr[i] == 'M')) + case 'd', 'D': // hash digest encoded in base %b + dec, err := mh.Decode(cid.Hash()) + if err != nil { + return "", err + } + out.WriteString(encode(encoder, dec.Digest, fmtStr[i] == 'D')) + case 's': // cid string encoded in base %b + str, err := cid.StringOfBase(base) + if err != nil { + return "", err + } + out.WriteString(str) + case 'S': // cid string without base prefix + out.WriteString(encode(encoder, cid.Bytes(), true)) + case 'P': // prefix + fmt.Fprintf(&out, "cidv%d-%s-%s-%d", + p.Version, + codecToString(p.Codec), + hashToString(p.MhType), + p.MhLength, + ) + default: + return "", FormatStringError{"unrecognized specifier in format string", fmtStr[i-1 : i+1]} + } + + } + return out.String(), err +} + +// FormatStringError is the error return from Format when the format +// string is ill formed +type FormatStringError struct { + Message string + Specifier string +} + +func (e FormatStringError) Error() string { + if e.Specifier == "" { + return e.Message + } else { + return fmt.Sprintf("%s: %s", e.Message, e.Specifier) + } +} + +func baseToString(base mb.Encoding) string { + baseStr, ok := mb.EncodingToStr[base] + if !ok { + return fmt.Sprintf("base?%c", base) + } + return baseStr +} + +func codecToString(num uint64) string { + name, ok := c.CodecToStr[num] + if !ok { + return fmt.Sprintf("codec?%d", num) + } + return name +} + +func hashToString(num uint64) string { + name, ok := mh.Codes[num] + if !ok { + return fmt.Sprintf("hash?%d", num) + } + return name +} + +func encode(base mb.Encoder, data []byte, strip bool) string { + str := base.Encode(data) + if strip { + return str[1:] + } + return str +} + +// ScanForCid scans bytes for anything resembling a CID. If one is +// found `i` will point to the begging of the cid and `j` to to the +// end and the cid will be returned, otherwise `i` and `j` will point +// the end of the buffer and the cid will be `Undef`. +func ScanForCid(buf []byte) (i, j int, cid c.Cid, cidStr string) { + i = 0 + for { + i = j + for i < len(buf) && !asciiIsAlpha(buf[i]) { + i++ + } + j = i + if i == len(buf) { + return + } + for j < len(buf) && asciiIsAlpha(buf[j]) { + j++ + } + if j-i <= 1 || j-i > 128 || !supported[buf[i]] { + continue + } + var err error + cidStr = string(buf[i:j]) + cid, err = c.Decode(cidStr) + if err == nil { + return + } + } +} + +var supported = make([]bool, 256) + +func init() { + // for now base64 encoding are not supported as they contain non + // alhphanumeric characters + supportedPrefixes := []byte("QfFbBcCvVtThzZ") + for _, b := range supportedPrefixes { + supported[b] = true + } +} + +func asciiIsAlpha(b byte) bool { + return ('A' <= b && b <= 'Z') || ('a' <= b && b <= 'z') || ('0' <= b && b <= '9') +} diff --git a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/inline.go b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/inline.go similarity index 83% rename from vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/inline.go rename to vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/inline.go index 6b72553050..63d71aa811 100644 --- a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/inline.go +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/inline.go @@ -1,8 +1,8 @@ package cidutil import ( - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - mhash "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" + cid "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + mhash "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash" ) // InlineBuilder is a cid.Builder that will use the id multihash when the diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/package.json b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/package.json new file mode 100644 index 0000000000..a286ee0efb --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/package.json @@ -0,0 +1,34 @@ +{ + "author": "kevina", + "bugs": {}, + "gx": { + "dvcsimport": "github.com/ipfs/go-cidutil" + }, + "gxDependencies": [ + { + "author": "multiformats", + "hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW", + "name": "go-multihash", + "version": "1.0.9" + }, + { + "author": "whyrusleeping", + "hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd", + "name": "go-multibase", + "version": "0.3.0" + }, + { + "author": "whyrusleeping", + "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", + "name": "go-cid", + "version": "0.9.3" + } + ], + "gxVersion": "0.12.1", + "language": "go", + "license": "", + "name": "go-cidutil", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "0.2.1" +} + diff --git a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/set.go b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/set.go similarity index 92% rename from vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/set.go rename to vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/set.go index d8a476d731..7e084a840e 100644 --- a/vendor/gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil/set.go +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/set.go @@ -3,7 +3,7 @@ package cidutil import ( "context" - c "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + c "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" ) type Set = c.Set diff --git a/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/slice.go b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/slice.go new file mode 100644 index 0000000000..88ab3a7596 --- /dev/null +++ b/vendor/gx/ipfs/Qmf3gRH2L1QZy92gJHJEwKmBJKJGVf8RpN2kPPD2NQWg8G/go-cidutil/slice.go @@ -0,0 +1,30 @@ +package cidutil + +import ( + "gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN/go-cid" + "sort" +) + +// Slice is a convenience type for sorting CIDs +type Slice []cid.Cid + +func (s Slice) Len() int { + return len(s) +} + +func (s Slice) Less(i, j int) bool { + return s[i].KeyString() < s[j].KeyString() +} + +func (s Slice) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s Slice) Sort() { + sort.Sort(s) +} + +// Sort sorts a slice of CIDs +func Sort(s []cid.Cid) { + Slice(s).Sort() +} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/archive.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/archive.go deleted file mode 100644 index 0c33b78ffd..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/archive.go +++ /dev/null @@ -1,108 +0,0 @@ -// Package archive provides utilities to archive and compress a [Unixfs] DAG. -package archive - -import ( - "bufio" - "compress/gzip" - "context" - "io" - "path" - - tar "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/tar" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// DefaultBufSize is the buffer size for gets. for now, 1MB, which is ~4 blocks. -// TODO: does this need to be configurable? -var DefaultBufSize = 1048576 - -type identityWriteCloser struct { - w io.Writer -} - -func (i *identityWriteCloser) Write(p []byte) (int, error) { - return i.w.Write(p) -} - -func (i *identityWriteCloser) Close() error { - return nil -} - -// DagArchive is equivalent to `ipfs getdag $hash | maybe_tar | maybe_gzip` -func DagArchive(ctx context.Context, nd ipld.Node, name string, dag ipld.DAGService, archive bool, compression int) (io.Reader, error) { - - cleaned := path.Clean(name) - _, filename := path.Split(cleaned) - - // need to connect a writer to a reader - piper, pipew := io.Pipe() - checkErrAndClosePipe := func(err error) bool { - if err != nil { - pipew.CloseWithError(err) - return true - } - return false - } - - // use a buffered writer to parallelize task - bufw := bufio.NewWriterSize(pipew, DefaultBufSize) - - // compression determines whether to use gzip compression. - maybeGzw, err := newMaybeGzWriter(bufw, compression) - if checkErrAndClosePipe(err) { - return nil, err - } - - closeGzwAndPipe := func() { - if err := maybeGzw.Close(); checkErrAndClosePipe(err) { - return - } - if err := bufw.Flush(); checkErrAndClosePipe(err) { - return - } - pipew.Close() // everything seems to be ok. - } - - if !archive && compression != gzip.NoCompression { - // the case when the node is a file - dagr, err := uio.NewDagReader(ctx, nd, dag) - if checkErrAndClosePipe(err) { - return nil, err - } - - go func() { - if _, err := dagr.WriteTo(maybeGzw); checkErrAndClosePipe(err) { - return - } - closeGzwAndPipe() // everything seems to be ok - }() - } else { - // the case for 1. archive, and 2. not archived and not compressed, in which tar is used anyway as a transport format - - // construct the tar writer - w, err := tar.NewWriter(ctx, dag, maybeGzw) - if checkErrAndClosePipe(err) { - return nil, err - } - - go func() { - // write all the nodes recursively - if err := w.WriteNode(nd, filename); checkErrAndClosePipe(err) { - return - } - w.Close() // close tar writer - closeGzwAndPipe() // everything seems to be ok - }() - } - - return piper, nil -} - -func newMaybeGzWriter(w io.Writer, compression int) (io.WriteCloser, error) { - if compression != gzip.NoCompression { - return gzip.NewWriterLevel(w, compression) - } - return &identityWriteCloser{w}, nil -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/tar/writer.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/tar/writer.go deleted file mode 100644 index 1f8ef8df04..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/archive/tar/writer.go +++ /dev/null @@ -1,142 +0,0 @@ -// Package tar provides functionality to write a unixfs merkledag -// as a tar archive. -package tar - -import ( - "archive/tar" - "context" - "fmt" - "io" - "path" - "time" - - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - uio "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// Writer is a utility structure that helps to write -// unixfs merkledag nodes as a tar archive format. -// It wraps any io.Writer. -type Writer struct { - Dag ipld.DAGService - TarW *tar.Writer - - ctx context.Context -} - -// NewWriter wraps given io.Writer. -func NewWriter(ctx context.Context, dag ipld.DAGService, w io.Writer) (*Writer, error) { - return &Writer{ - Dag: dag, - TarW: tar.NewWriter(w), - ctx: ctx, - }, nil -} - -func (w *Writer) writeDir(nd *mdag.ProtoNode, fpath string) error { - dir, err := uio.NewDirectoryFromNode(w.Dag, nd) - if err != nil { - return err - } - if err := writeDirHeader(w.TarW, fpath); err != nil { - return err - } - - return dir.ForEachLink(w.ctx, func(l *ipld.Link) error { - child, err := w.Dag.Get(w.ctx, l.Cid) - if err != nil { - return err - } - npath := path.Join(fpath, l.Name) - return w.WriteNode(child, npath) - }) -} - -func (w *Writer) writeFile(nd *mdag.ProtoNode, fsNode *ft.FSNode, fpath string) error { - if err := writeFileHeader(w.TarW, fpath, fsNode.FileSize()); err != nil { - return err - } - - dagr := uio.NewPBFileReader(w.ctx, nd, fsNode, w.Dag) - if _, err := dagr.WriteTo(w.TarW); err != nil { - return err - } - w.TarW.Flush() - return nil -} - -// WriteNode adds a node to the archive. -func (w *Writer) WriteNode(nd ipld.Node, fpath string) error { - switch nd := nd.(type) { - case *mdag.ProtoNode: - fsNode, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return err - } - - switch fsNode.Type() { - case ft.TMetadata: - fallthrough - case ft.TDirectory, ft.THAMTShard: - return w.writeDir(nd, fpath) - case ft.TRaw: - fallthrough - case ft.TFile: - return w.writeFile(nd, fsNode, fpath) - case ft.TSymlink: - return writeSymlinkHeader(w.TarW, string(fsNode.Data()), fpath) - default: - return ft.ErrUnrecognizedType - } - case *mdag.RawNode: - if err := writeFileHeader(w.TarW, fpath, uint64(len(nd.RawData()))); err != nil { - return err - } - - if _, err := w.TarW.Write(nd.RawData()); err != nil { - return err - } - w.TarW.Flush() - return nil - default: - return fmt.Errorf("nodes of type %T are not supported in unixfs", nd) - } -} - -// Close closes the tar writer. -func (w *Writer) Close() error { - return w.TarW.Close() -} - -func writeDirHeader(w *tar.Writer, fpath string) error { - return w.WriteHeader(&tar.Header{ - Name: fpath, - Typeflag: tar.TypeDir, - Mode: 0777, - ModTime: time.Now(), - // TODO: set mode, dates, etc. when added to unixFS - }) -} - -func writeFileHeader(w *tar.Writer, fpath string, size uint64) error { - return w.WriteHeader(&tar.Header{ - Name: fpath, - Size: int64(size), - Typeflag: tar.TypeReg, - Mode: 0644, - ModTime: time.Now(), - // TODO: set mode, dates, etc. when added to unixFS - }) -} - -func writeSymlinkHeader(w *tar.Writer, target, fpath string) error { - return w.WriteHeader(&tar.Header{ - Name: fpath, - Linkname: target, - Mode: 0777, - Typeflag: tar.TypeSymlink, - }) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/hamt.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/hamt.go deleted file mode 100644 index e5f6ebee4a..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/hamt.go +++ /dev/null @@ -1,582 +0,0 @@ -// Package hamt implements a Hash Array Mapped Trie over ipfs merkledag nodes. -// It is implemented mostly as described in the wikipedia article on HAMTs, -// however the table size is variable (usually 256 in our usages) as opposed to -// 32 as suggested in the article. The hash function used is currently -// Murmur3, but this value is configurable (the datastructure reports which -// hash function its using). -// -// The one algorithmic change we implement that is not mentioned in the -// wikipedia article is the collapsing of empty shards. -// Given the following tree: ( '[' = shards, '{' = values ) -// [ 'A' ] -> [ 'B' ] -> { "ABC" } -// | L-> { "ABD" } -// L-> { "ASDF" } -// If we simply removed "ABC", we would end up with a tree where shard 'B' only -// has a single child. This causes two issues, the first, is that now we have -// an extra lookup required to get to "ABD". The second issue is that now we -// have a tree that contains only "ABD", but is not the same tree that we would -// get by simply inserting "ABD" into a new tree. To address this, we always -// check for empty shard nodes upon deletion and prune them to maintain a -// consistent tree, independent of insertion order. -package hamt - -import ( - "context" - "fmt" - "os" - "sync" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - bitfield "gx/ipfs/QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT/go-bitfield" - format "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - "gx/ipfs/QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx/murmur3" -) - -const ( - // HashMurmur3 is the multiformats identifier for Murmur3 - HashMurmur3 uint64 = 0x22 -) - -func (ds *Shard) isValueNode() bool { - return ds.key != "" && ds.val != nil -} - -// A Shard represents the HAMT. It should be initialized with NewShard(). -type Shard struct { - nd *dag.ProtoNode - - bitfield bitfield.Bitfield - - children []*Shard - - tableSize int - tableSizeLg2 int - - builder cid.Builder - hashFunc uint64 - - prefixPadStr string - maxpadlen int - - dserv ipld.DAGService - - // leaf node - key string - val *ipld.Link -} - -// NewShard creates a new, empty HAMT shard with the given size. -func NewShard(dserv ipld.DAGService, size int) (*Shard, error) { - ds, err := makeShard(dserv, size) - if err != nil { - return nil, err - } - - ds.nd = new(dag.ProtoNode) - ds.hashFunc = HashMurmur3 - return ds, nil -} - -func makeShard(ds ipld.DAGService, size int) (*Shard, error) { - lg2s, err := logtwo(size) - if err != nil { - return nil, err - } - maxpadding := fmt.Sprintf("%X", size-1) - return &Shard{ - tableSizeLg2: lg2s, - prefixPadStr: fmt.Sprintf("%%0%dX", len(maxpadding)), - maxpadlen: len(maxpadding), - bitfield: bitfield.NewBitfield(size), - tableSize: size, - dserv: ds, - }, nil -} - -// NewHamtFromDag creates new a HAMT shard from the given DAG. -func NewHamtFromDag(dserv ipld.DAGService, nd ipld.Node) (*Shard, error) { - pbnd, ok := nd.(*dag.ProtoNode) - if !ok { - return nil, dag.ErrNotProtobuf - } - - fsn, err := format.FSNodeFromBytes(pbnd.Data()) - if err != nil { - return nil, err - } - - if fsn.Type() != format.THAMTShard { - return nil, fmt.Errorf("node was not a dir shard") - } - - if fsn.HashType() != HashMurmur3 { - return nil, fmt.Errorf("only murmur3 supported as hash function") - } - - ds, err := makeShard(dserv, int(fsn.Fanout())) - if err != nil { - return nil, err - } - - ds.nd = pbnd.Copy().(*dag.ProtoNode) - ds.children = make([]*Shard, len(pbnd.Links())) - ds.bitfield.SetBytes(fsn.Data()) - ds.hashFunc = fsn.HashType() - ds.builder = ds.nd.CidBuilder() - - return ds, nil -} - -// SetCidBuilder sets the CID Builder -func (ds *Shard) SetCidBuilder(builder cid.Builder) { - ds.builder = builder -} - -// CidBuilder gets the CID Builder, may be nil if unset -func (ds *Shard) CidBuilder() cid.Builder { - return ds.builder -} - -// Node serializes the HAMT structure into a merkledag node with unixfs formatting -func (ds *Shard) Node() (ipld.Node, error) { - out := new(dag.ProtoNode) - out.SetCidBuilder(ds.builder) - - cindex := 0 - // TODO: optimized 'for each set bit' - for i := 0; i < ds.tableSize; i++ { - if !ds.bitfield.Bit(i) { - continue - } - - ch := ds.children[cindex] - if ch != nil { - clnk, err := ch.Link() - if err != nil { - return nil, err - } - - err = out.AddRawLink(ds.linkNamePrefix(i)+ch.key, clnk) - if err != nil { - return nil, err - } - } else { - // child unloaded, just copy in link with updated name - lnk := ds.nd.Links()[cindex] - label := lnk.Name[ds.maxpadlen:] - - err := out.AddRawLink(ds.linkNamePrefix(i)+label, lnk) - if err != nil { - return nil, err - } - } - cindex++ - } - - data, err := format.HAMTShardData(ds.bitfield.Bytes(), uint64(ds.tableSize), HashMurmur3) - if err != nil { - return nil, err - } - - out.SetData(data) - - err = ds.dserv.Add(context.TODO(), out) - if err != nil { - return nil, err - } - - return out, nil -} - -func (ds *Shard) makeShardValue(lnk *ipld.Link) (*Shard, error) { - lnk2 := *lnk - s, err := makeShard(ds.dserv, ds.tableSize) - if err != nil { - return nil, err - } - - s.key = lnk.Name[ds.maxpadlen:] - s.val = &lnk2 - - return s, nil -} - -func hash(val []byte) []byte { - h := murmur3.New64() - h.Write(val) - return h.Sum(nil) -} - -// Set sets 'name' = nd in the HAMT -func (ds *Shard) Set(ctx context.Context, name string, nd ipld.Node) error { - hv := &hashBits{b: hash([]byte(name))} - err := ds.dserv.Add(ctx, nd) - if err != nil { - return err - } - - lnk, err := ipld.MakeLink(nd) - if err != nil { - return err - } - lnk.Name = ds.linkNamePrefix(0) + name - - return ds.modifyValue(ctx, hv, name, lnk) -} - -// Remove deletes the named entry if it exists, this operation is idempotent. -func (ds *Shard) Remove(ctx context.Context, name string) error { - hv := &hashBits{b: hash([]byte(name))} - return ds.modifyValue(ctx, hv, name, nil) -} - -// Find searches for a child node by 'name' within this hamt -func (ds *Shard) Find(ctx context.Context, name string) (*ipld.Link, error) { - hv := &hashBits{b: hash([]byte(name))} - - var out *ipld.Link - err := ds.getValue(ctx, hv, name, func(sv *Shard) error { - out = sv.val - return nil - }) - if err != nil { - return nil, err - } - - return out, nil -} - -type linkType int - -const ( - invalidLink linkType = iota - shardLink - shardValueLink -) - -func (ds *Shard) childLinkType(lnk *ipld.Link) (linkType, error) { - if len(lnk.Name) < ds.maxpadlen { - return invalidLink, fmt.Errorf("invalid link name '%s'", lnk.Name) - } - if len(lnk.Name) == ds.maxpadlen { - return shardLink, nil - } - return shardValueLink, nil -} - -// getChild returns the i'th child of this shard. If it is cached in the -// children array, it will return it from there. Otherwise, it loads the child -// node from disk. -func (ds *Shard) getChild(ctx context.Context, i int) (*Shard, error) { - if i >= len(ds.children) || i < 0 { - return nil, fmt.Errorf("invalid index passed to getChild (likely corrupt bitfield)") - } - - if len(ds.children) != len(ds.nd.Links()) { - return nil, fmt.Errorf("inconsistent lengths between children array and Links array") - } - - c := ds.children[i] - if c != nil { - return c, nil - } - - return ds.loadChild(ctx, i) -} - -// loadChild reads the i'th child node of this shard from disk and returns it -// as a 'child' interface -func (ds *Shard) loadChild(ctx context.Context, i int) (*Shard, error) { - lnk := ds.nd.Links()[i] - lnkLinkType, err := ds.childLinkType(lnk) - if err != nil { - return nil, err - } - - var c *Shard - if lnkLinkType == shardLink { - nd, err := lnk.GetNode(ctx, ds.dserv) - if err != nil { - return nil, err - } - cds, err := NewHamtFromDag(ds.dserv, nd) - if err != nil { - return nil, err - } - - c = cds - } else { - s, err := ds.makeShardValue(lnk) - if err != nil { - return nil, err - } - c = s - } - - ds.children[i] = c - return c, nil -} - -func (ds *Shard) setChild(i int, c *Shard) { - ds.children[i] = c -} - -// Link returns a merklelink to this shard node -func (ds *Shard) Link() (*ipld.Link, error) { - if ds.isValueNode() { - return ds.val, nil - } - - nd, err := ds.Node() - if err != nil { - return nil, err - } - - err = ds.dserv.Add(context.TODO(), nd) - if err != nil { - return nil, err - } - - return ipld.MakeLink(nd) -} - -func (ds *Shard) insertChild(idx int, key string, lnk *ipld.Link) error { - if lnk == nil { - return os.ErrNotExist - } - - i := ds.indexForBitPos(idx) - ds.bitfield.SetBit(idx) - - lnk.Name = ds.linkNamePrefix(idx) + key - sv := &Shard{ - key: key, - val: lnk, - } - - ds.children = append(ds.children[:i], append([]*Shard{sv}, ds.children[i:]...)...) - ds.nd.SetLinks(append(ds.nd.Links()[:i], append([]*ipld.Link{nil}, ds.nd.Links()[i:]...)...)) - return nil -} - -func (ds *Shard) rmChild(i int) error { - if i < 0 || i >= len(ds.children) || i >= len(ds.nd.Links()) { - return fmt.Errorf("hamt: attempted to remove child with out of range index") - } - - copy(ds.children[i:], ds.children[i+1:]) - ds.children = ds.children[:len(ds.children)-1] - - copy(ds.nd.Links()[i:], ds.nd.Links()[i+1:]) - ds.nd.SetLinks(ds.nd.Links()[:len(ds.nd.Links())-1]) - - return nil -} - -func (ds *Shard) getValue(ctx context.Context, hv *hashBits, key string, cb func(*Shard) error) error { - idx := hv.Next(ds.tableSizeLg2) - if ds.bitfield.Bit(int(idx)) { - cindex := ds.indexForBitPos(idx) - - child, err := ds.getChild(ctx, cindex) - if err != nil { - return err - } - - if child.isValueNode() { - if child.key == key { - return cb(child) - } - } else { - return child.getValue(ctx, hv, key, cb) - } - } - - return os.ErrNotExist -} - -// EnumLinks collects all links in the Shard. -func (ds *Shard) EnumLinks(ctx context.Context) ([]*ipld.Link, error) { - var links []*ipld.Link - var setlk sync.Mutex - - getLinks := makeAsyncTrieGetLinks(ds.dserv, func(sv *Shard) error { - lnk := sv.val - lnk.Name = sv.key - setlk.Lock() - links = append(links, lnk) - setlk.Unlock() - return nil - }) - - cset := cid.NewSet() - - err := dag.EnumerateChildrenAsync(ctx, getLinks, ds.nd.Cid(), cset.Visit) - return links, err -} - -// ForEachLink walks the Shard and calls the given function. -func (ds *Shard) ForEachLink(ctx context.Context, f func(*ipld.Link) error) error { - return ds.walkTrie(ctx, func(sv *Shard) error { - lnk := sv.val - lnk.Name = sv.key - - return f(lnk) - }) -} - -// makeAsyncTrieGetLinks builds a getLinks function that can be used with EnumerateChildrenAsync -// to iterate a HAMT shard. It takes an IPLD Dag Service to fetch nodes, and a call back that will get called -// on all links to leaf nodes in a HAMT tree, so they can be collected for an EnumLinks operation -func makeAsyncTrieGetLinks(dagService ipld.DAGService, onShardValue func(shard *Shard) error) dag.GetLinks { - - return func(ctx context.Context, currentCid cid.Cid) ([]*ipld.Link, error) { - node, err := dagService.Get(ctx, currentCid) - if err != nil { - return nil, err - } - directoryShard, err := NewHamtFromDag(dagService, node) - if err != nil { - return nil, err - } - - childShards := make([]*ipld.Link, 0, len(directoryShard.children)) - links := directoryShard.nd.Links() - for idx := range directoryShard.children { - lnk := links[idx] - lnkLinkType, err := directoryShard.childLinkType(lnk) - - if err != nil { - return nil, err - } - if lnkLinkType == shardLink { - childShards = append(childShards, lnk) - } else { - sv, err := directoryShard.makeShardValue(lnk) - if err != nil { - return nil, err - } - err = onShardValue(sv) - if err != nil { - return nil, err - } - } - } - return childShards, nil - } -} - -func (ds *Shard) walkTrie(ctx context.Context, cb func(*Shard) error) error { - for idx := range ds.children { - c, err := ds.getChild(ctx, idx) - if err != nil { - return err - } - - if c.isValueNode() { - if err := cb(c); err != nil { - return err - } - } else { - if err := c.walkTrie(ctx, cb); err != nil { - return err - } - } - } - return nil -} - -func (ds *Shard) modifyValue(ctx context.Context, hv *hashBits, key string, val *ipld.Link) error { - idx := hv.Next(ds.tableSizeLg2) - if !ds.bitfield.Bit(idx) { - return ds.insertChild(idx, key, val) - } - - cindex := ds.indexForBitPos(idx) - - child, err := ds.getChild(ctx, cindex) - if err != nil { - return err - } - - if child.isValueNode() { - if child.key == key { - // value modification - if val == nil { - ds.bitfield.UnsetBit(idx) - return ds.rmChild(cindex) - } - - child.val = val - return nil - } - - if val == nil { - return os.ErrNotExist - } - - // replace value with another shard, one level deeper - ns, err := NewShard(ds.dserv, ds.tableSize) - if err != nil { - return err - } - ns.builder = ds.builder - chhv := &hashBits{ - b: hash([]byte(child.key)), - consumed: hv.consumed, - } - - err = ns.modifyValue(ctx, hv, key, val) - if err != nil { - return err - } - - err = ns.modifyValue(ctx, chhv, child.key, child.val) - if err != nil { - return err - } - - ds.setChild(cindex, ns) - return nil - } else { - err := child.modifyValue(ctx, hv, key, val) - if err != nil { - return err - } - - if val == nil { - switch len(child.children) { - case 0: - // empty sub-shard, prune it - // Note: this shouldnt normally ever happen - // in the event of another implementation creates flawed - // structures, this will help to normalize them. - ds.bitfield.UnsetBit(idx) - return ds.rmChild(cindex) - case 1: - nchild := child.children[0] - if nchild.isValueNode() { - // sub-shard with a single value element, collapse it - ds.setChild(cindex, nchild) - } - return nil - } - } - - return nil - } -} - -// indexForBitPos returns the index within the collapsed array corresponding to -// the given bit in the bitset. The collapsed array contains only one entry -// per bit set in the bitfield, and this function is used to map the indices. -func (ds *Shard) indexForBitPos(bp int) int { - return ds.bitfield.OnesBefore(bp) -} - -// linkNamePrefix takes in the bitfield index of an entry and returns its hex prefix -func (ds *Shard) linkNamePrefix(idx int) string { - return fmt.Sprintf(ds.prefixPadStr, idx) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/util.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/util.go deleted file mode 100644 index 5f684a21ac..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt/util.go +++ /dev/null @@ -1,52 +0,0 @@ -package hamt - -import ( - "fmt" - "math/bits" -) - -// hashBits is a helper that allows the reading of the 'next n bits' as an integer. -type hashBits struct { - b []byte - consumed int -} - -func mkmask(n int) byte { - return (1 << uint(n)) - 1 -} - -// Next returns the next 'i' bits of the hashBits value as an integer -func (hb *hashBits) Next(i int) int { - curbi := hb.consumed / 8 - leftb := 8 - (hb.consumed % 8) - - curb := hb.b[curbi] - if i == leftb { - out := int(mkmask(i) & curb) - hb.consumed += i - return out - } else if i < leftb { - a := curb & mkmask(leftb) // mask out the high bits we don't want - b := a & ^mkmask(leftb-i) // mask out the low bits we don't want - c := b >> uint(leftb-i) // shift whats left down - hb.consumed += i - return int(c) - } else { - out := int(mkmask(leftb) & curb) - out <<= uint(i - leftb) - hb.consumed += leftb - out += hb.Next(i - leftb) - return out - } -} - -func logtwo(v int) (int, error) { - if v <= 0 { - return 0, fmt.Errorf("hamt size should be a power of two") - } - lg2 := bits.TrailingZeros(uint(v)) - if 1< 0) that can - // be handled by the loop. - root, fileSize, err := db.NewLeafDataNode() - if err != nil { - return nil, err - } - - // Each time a DAG of a certain `depth` is filled (because it - // has reached its maximum capacity of `db.Maxlinks()` per node) - // extend it by making it a sub-DAG of a bigger DAG with `depth+1`. - for depth := 1; !db.Done(); depth++ { - - // Add the old `root` as a child of the `newRoot`. - newRoot := db.NewFSNodeOverDag(ft.TFile) - newRoot.AddChild(root, fileSize, db) - - // Fill the `newRoot` (that has the old `root` already as child) - // and make it the current `root` for the next iteration (when - // it will become "old"). - root, fileSize, err = fillNodeRec(db, newRoot, depth) - if err != nil { - return nil, err - } - } - - return root, db.Add(root) -} - -// fillNodeRec will "fill" the given internal (non-leaf) `node` with data by -// adding child nodes to it, either leaf data nodes (if `depth` is 1) or more -// internal nodes with higher depth (and calling itself recursively on them -// until *they* are filled with data). The data to fill the node with is -// provided by DagBuilderHelper. -// -// `node` represents a (sub-)DAG root that is being filled. If called recursively, -// it is `nil`, a new node is created. If it has been called from `Layout` (see -// diagram below) it points to the new root (that increases the depth of the DAG), -// it already has a child (the old root). New children will be added to this new -// root, and those children will in turn be filled (calling `fillNodeRec` -// recursively). -// -// +-------------+ -// | `node` | -// | (new root) | -// +-------------+ -// | -// +-------------+ - - - - - - + - - - - - - - - - - - + -// | | | -// +--------------+ + - - - - - + + - - - - - + -// | (old root) | | new child | | | -// +--------------+ + - - - - - + + - - - - - + -// | | | -// +------+------+ + - - + - - - + -// | | | | -// +=========+ +=========+ + - - - - + + - - - - + -// | Chunk 1 | | Chunk 2 | | Chunk 3 | | Chunk 4 | -// +=========+ +=========+ + - - - - + + - - - - + -// -// The `node` to be filled uses the `FSNodeOverDag` abstraction that allows adding -// child nodes without packing/unpacking the UnixFS layer node (having an internal -// `ft.FSNode` cache). -// -// It returns the `ipld.Node` representation of the passed `node` filled with -// children and the `nodeFileSize` with the total size of the file chunk (leaf) -// nodes stored under this node (parent nodes store this to enable efficient -// seeking through the DAG when reading data later). -// -// warning: **children** pinned indirectly, but input node IS NOT pinned. -func fillNodeRec(db *h.DagBuilderHelper, node *h.FSNodeOverDag, depth int) (filledNode ipld.Node, nodeFileSize uint64, err error) { - if depth < 1 { - return nil, 0, errors.New("attempt to fillNode at depth < 1") - } - - if node == nil { - node = db.NewFSNodeOverDag(ft.TFile) - } - - // Child node created on every iteration to add to parent `node`. - // It can be a leaf node or another internal node. - var childNode ipld.Node - // File size from the child node needed to update the `FSNode` - // in `node` when adding the child. - var childFileSize uint64 - - // While we have room and there is data available to be added. - for node.NumChildren() < db.Maxlinks() && !db.Done() { - - if depth == 1 { - // Base case: add leaf node with data. - childNode, childFileSize, err = db.NewLeafDataNode() - if err != nil { - return nil, 0, err - } - } else { - // Recursion case: create an internal node to in turn keep - // descending in the DAG and adding child nodes to it. - childNode, childFileSize, err = fillNodeRec(db, nil, depth-1) - if err != nil { - return nil, 0, err - } - } - - err = node.AddChild(childNode, childFileSize, db) - if err != nil { - return nil, 0, err - } - } - - nodeFileSize = node.FileSize() - - // Get the final `dag.ProtoNode` with the `FSNode` data encoded inside. - filledNode, err = node.Commit() - if err != nil { - return nil, 0, err - } - - return filledNode, nodeFileSize, nil -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/dagbuilder.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/dagbuilder.go deleted file mode 100644 index 7cc7f91f0a..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/dagbuilder.go +++ /dev/null @@ -1,438 +0,0 @@ -package helpers - -import ( - "context" - "io" - "os" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - pb "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - pi "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" - files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files" -) - -// DagBuilderHelper wraps together a bunch of objects needed to -// efficiently create unixfs dag trees -type DagBuilderHelper struct { - dserv ipld.DAGService - spl chunker.Splitter - recvdErr error - rawLeaves bool - nextData []byte // the next item to return. - maxlinks int - cidBuilder cid.Builder - - // Filestore support variables. - // ---------------------------- - // TODO: Encapsulate in `FilestoreNode` (which is basically what they are). - // - // Besides having the path this variable (if set) is used as a flag - // to indicate that Filestore should be used. - fullPath string - stat os.FileInfo - // Keeps track of the current file size added to the DAG (used in - // the balanced builder). It is assumed that the `DagBuilderHelper` - // is not reused to construct another DAG, but a new one (with a - // zero `offset`) is created. - offset uint64 -} - -// DagBuilderParams wraps configuration options to create a DagBuilderHelper -// from a chunker.Splitter. -type DagBuilderParams struct { - // Maximum number of links per intermediate node - Maxlinks int - - // RawLeaves signifies that the importer should use raw ipld nodes as leaves - // instead of using the unixfs TRaw type - RawLeaves bool - - // CID Builder to use if set - CidBuilder cid.Builder - - // DAGService to write blocks to (required) - Dagserv ipld.DAGService - - // NoCopy signals to the chunker that it should track fileinfo for - // filestore adds - NoCopy bool - - // URL if non-empty (and NoCopy is also true) indicates that the - // file will not be stored in the datastore but instead retrieved - // from this location via the urlstore. - URL string -} - -// New generates a new DagBuilderHelper from the given params and a given -// chunker.Splitter as data source. -func (dbp *DagBuilderParams) New(spl chunker.Splitter) *DagBuilderHelper { - db := &DagBuilderHelper{ - dserv: dbp.Dagserv, - spl: spl, - rawLeaves: dbp.RawLeaves, - cidBuilder: dbp.CidBuilder, - maxlinks: dbp.Maxlinks, - } - if fi, ok := spl.Reader().(files.FileInfo); dbp.NoCopy && ok { - db.fullPath = fi.AbsPath() - db.stat = fi.Stat() - } - - if dbp.URL != "" && dbp.NoCopy { - db.fullPath = dbp.URL - } - return db -} - -// prepareNext consumes the next item from the splitter and puts it -// in the nextData field. it is idempotent-- if nextData is full -// it will do nothing. -func (db *DagBuilderHelper) prepareNext() { - // if we already have data waiting to be consumed, we're ready - if db.nextData != nil || db.recvdErr != nil { - return - } - - db.nextData, db.recvdErr = db.spl.NextBytes() - if db.recvdErr == io.EOF { - db.recvdErr = nil - } -} - -// Done returns whether or not we're done consuming the incoming data. -func (db *DagBuilderHelper) Done() bool { - // ensure we have an accurate perspective on data - // as `done` this may be called before `next`. - db.prepareNext() // idempotent - if db.recvdErr != nil { - return false - } - return db.nextData == nil -} - -// Next returns the next chunk of data to be inserted into the dag -// if it returns nil, that signifies that the stream is at an end, and -// that the current building operation should finish. -func (db *DagBuilderHelper) Next() ([]byte, error) { - db.prepareNext() // idempotent - d := db.nextData - db.nextData = nil // signal we've consumed it - if db.recvdErr != nil { - return nil, db.recvdErr - } - return d, nil -} - -// GetDagServ returns the dagservice object this Helper is using -func (db *DagBuilderHelper) GetDagServ() ipld.DAGService { - return db.dserv -} - -// NewUnixfsNode creates a new Unixfs node to represent a file. -func (db *DagBuilderHelper) NewUnixfsNode() *UnixfsNode { - n := &UnixfsNode{ - node: new(dag.ProtoNode), - ufmt: ft.NewFSNode(ft.TFile), - } - n.SetCidBuilder(db.cidBuilder) - return n -} - -// GetCidBuilder returns the internal `cid.CidBuilder` set in the builder. -func (db *DagBuilderHelper) GetCidBuilder() cid.Builder { - return db.cidBuilder -} - -// NewLeaf creates a leaf node filled with data. If rawLeaves is -// defined than a raw leaf will be returned. Otherwise, if data is -// nil the type field will be TRaw (for backwards compatibility), if -// data is defined (but possibly empty) the type field will be TRaw. -func (db *DagBuilderHelper) NewLeaf(data []byte) (*UnixfsNode, error) { - if len(data) > BlockSizeLimit { - return nil, ErrSizeLimitExceeded - } - - if db.rawLeaves { - if db.cidBuilder == nil { - return &UnixfsNode{ - rawnode: dag.NewRawNode(data), - raw: true, - }, nil - } - rawnode, err := dag.NewRawNodeWPrefix(data, db.cidBuilder) - if err != nil { - return nil, err - } - return &UnixfsNode{ - rawnode: rawnode, - raw: true, - }, nil - } - - if data == nil { - return db.NewUnixfsNode(), nil - } - - blk := db.newUnixfsBlock() - blk.SetData(data) - return blk, nil -} - -// NewLeafNode is a variation from `NewLeaf` (see its description) that -// returns an `ipld.Node` instead. -func (db *DagBuilderHelper) NewLeafNode(data []byte) (ipld.Node, error) { - if len(data) > BlockSizeLimit { - return nil, ErrSizeLimitExceeded - } - - if db.rawLeaves { - // Encapsulate the data in a raw node. - if db.cidBuilder == nil { - return dag.NewRawNode(data), nil - } - rawnode, err := dag.NewRawNodeWPrefix(data, db.cidBuilder) - if err != nil { - return nil, err - } - return rawnode, nil - } - - // Encapsulate the data in UnixFS node (instead of a raw node). - fsNodeOverDag := db.NewFSNodeOverDag(ft.TFile) - fsNodeOverDag.SetFileData(data) - node, err := fsNodeOverDag.Commit() - if err != nil { - return nil, err - } - // TODO: Encapsulate this sequence of calls into a function that - // just returns the final `ipld.Node` avoiding going through - // `FSNodeOverDag`. - // TODO: Using `TFile` for backwards-compatibility, a bug in the - // balanced builder was causing the leaf nodes to be generated - // with this type instead of `TRaw`, the one that should be used - // (like the trickle builder does). - // (See https://github.com/ipfs/go-ipfs/pull/5120.) - - return node, nil -} - -// newUnixfsBlock creates a new Unixfs node to represent a raw data block -func (db *DagBuilderHelper) newUnixfsBlock() *UnixfsNode { - n := &UnixfsNode{ - node: new(dag.ProtoNode), - ufmt: ft.NewFSNode(ft.TRaw), - } - n.SetCidBuilder(db.cidBuilder) - return n -} - -// FillNodeLayer will add datanodes as children to the give node until -// at most db.indirSize nodes are added. -func (db *DagBuilderHelper) FillNodeLayer(node *UnixfsNode) error { - - // while we have room AND we're not done - for node.NumChildren() < db.maxlinks && !db.Done() { - child, err := db.GetNextDataNode() - if err != nil { - return err - } - - if err := node.AddChild(child, db); err != nil { - return err - } - } - - return nil -} - -// GetNextDataNode builds a UnixFsNode with the data obtained from the -// Splitter, given the constraints (BlockSizeLimit, RawLeaves) specified -// when creating the DagBuilderHelper. -func (db *DagBuilderHelper) GetNextDataNode() (*UnixfsNode, error) { - data, err := db.Next() - if err != nil { - return nil, err - } - - if data == nil { // we're done! - return nil, nil - } - - return db.NewLeaf(data) -} - -// NewLeafDataNode is a variation of `GetNextDataNode` that returns -// an `ipld.Node` instead. It builds the `node` with the data obtained -// from the Splitter and returns it with the `dataSize` (that will be -// used to keep track of the DAG file size). The size of the data is -// computed here because after that it will be hidden by `NewLeafNode` -// inside a generic `ipld.Node` representation. -func (db *DagBuilderHelper) NewLeafDataNode() (node ipld.Node, dataSize uint64, err error) { - fileData, err := db.Next() - if err != nil { - return nil, 0, err - } - dataSize = uint64(len(fileData)) - - // Create a new leaf node containing the file chunk data. - node, err = db.NewLeafNode(fileData) - if err != nil { - return nil, 0, err - } - - // Convert this leaf to a `FilestoreNode` if needed. - node = db.ProcessFileStore(node, dataSize) - - return node, dataSize, nil -} - -// ProcessFileStore generates, if Filestore is being used, the -// `FilestoreNode` representation of the `ipld.Node` that -// contains the file data. If Filestore is not being used just -// return the same node to continue with its addition to the DAG. -// -// The `db.offset` is updated at this point (instead of when -// `NewLeafDataNode` is called, both work in tandem but the -// offset is more related to this function). -func (db *DagBuilderHelper) ProcessFileStore(node ipld.Node, dataSize uint64) ipld.Node { - // Check if Filestore is being used. - if db.fullPath != "" { - // Check if the node is actually a raw node (needed for - // Filestore support). - if _, ok := node.(*dag.RawNode); ok { - fn := &pi.FilestoreNode{ - Node: node, - PosInfo: &pi.PosInfo{ - Offset: db.offset, - FullPath: db.fullPath, - Stat: db.stat, - }, - } - - // Update `offset` with the size of the data generated by `db.Next`. - db.offset += dataSize - - return fn - } - } - - // Filestore is not used, return the same `node` argument. - return node -} - -// AddUnixfsNode sends a node to the DAGService, and returns it as ipld.Node. -func (db *DagBuilderHelper) AddUnixfsNode(node *UnixfsNode) (ipld.Node, error) { - dn, err := node.GetDagNode() - if err != nil { - return nil, err - } - - err = db.dserv.Add(context.TODO(), dn) - if err != nil { - return nil, err - } - - return dn, nil -} - -// Add inserts the given node in the DAGService. -func (db *DagBuilderHelper) Add(node ipld.Node) error { - return db.dserv.Add(context.TODO(), node) -} - -// Maxlinks returns the configured maximum number for links -// for nodes built with this helper. -func (db *DagBuilderHelper) Maxlinks() int { - return db.maxlinks -} - -// FSNodeOverDag encapsulates an `unixfs.FSNode` that will be stored in a -// `dag.ProtoNode`. Instead of just having a single `ipld.Node` that -// would need to be constantly (un)packed to access and modify its -// internal `FSNode` in the process of creating a UnixFS DAG, this -// structure stores an `FSNode` cache to manipulate it (add child nodes) -// directly , and only when the node has reached its final (immutable) state -// (signaled by calling `Commit()`) is it committed to a single (indivisible) -// `ipld.Node`. -// -// It is used mainly for internal (non-leaf) nodes, and for some -// representations of data leaf nodes (that don't use raw nodes or -// Filestore). -// -// It aims to replace the `UnixfsNode` structure which encapsulated too -// many possible node state combinations. -// -// TODO: Revisit the name. -type FSNodeOverDag struct { - dag *dag.ProtoNode - file *ft.FSNode -} - -// NewFSNodeOverDag creates a new `dag.ProtoNode` and `ft.FSNode` -// decoupled from one onther (and will continue in that way until -// `Commit` is called), with `fsNodeType` specifying the type of -// the UnixFS layer node (either `File` or `Raw`). -func (db *DagBuilderHelper) NewFSNodeOverDag(fsNodeType pb.Data_DataType) *FSNodeOverDag { - node := new(FSNodeOverDag) - node.dag = new(dag.ProtoNode) - node.dag.SetCidBuilder(db.GetCidBuilder()) - - node.file = ft.NewFSNode(fsNodeType) - - return node -} - -// AddChild adds a `child` `ipld.Node` to both node layers. The -// `dag.ProtoNode` creates a link to the child node while the -// `ft.FSNode` stores its file size (that is, not the size of the -// node but the size of the file data that it is storing at the -// UnixFS layer). The child is also stored in the `DAGService`. -func (n *FSNodeOverDag) AddChild(child ipld.Node, fileSize uint64, db *DagBuilderHelper) error { - err := n.dag.AddNodeLink("", child) - if err != nil { - return err - } - - n.file.AddBlockSize(fileSize) - - return db.Add(child) -} - -// Commit unifies (resolves) the cache nodes into a single `ipld.Node` -// that represents them: the `ft.FSNode` is encoded inside the -// `dag.ProtoNode`. -// -// TODO: Evaluate making it read-only after committing. -func (n *FSNodeOverDag) Commit() (ipld.Node, error) { - fileData, err := n.file.GetBytes() - if err != nil { - return nil, err - } - n.dag.SetData(fileData) - - return n.dag, nil -} - -// NumChildren returns the number of children of the `ft.FSNode`. -func (n *FSNodeOverDag) NumChildren() int { - return n.file.NumChildren() -} - -// FileSize returns the `Filesize` attribute from the underlying -// representation of the `ft.FSNode`. -func (n *FSNodeOverDag) FileSize() uint64 { - return n.file.FileSize() -} - -// SetFileData stores the `fileData` in the `ft.FSNode`. It -// should be used only when `FSNodeOverDag` represents a leaf -// node (internal nodes don't carry data, just file sizes). -func (n *FSNodeOverDag) SetFileData(fileData []byte) { - n.file.SetData(fileData) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/helpers.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/helpers.go deleted file mode 100644 index b5f2968609..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers/helpers.go +++ /dev/null @@ -1,173 +0,0 @@ -package helpers - -import ( - "context" - "fmt" - "os" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - pi "gx/ipfs/QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg/go-ipfs-posinfo" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// BlockSizeLimit specifies the maximum size an imported block can have. -var BlockSizeLimit = 1048576 // 1 MB - -// rough estimates on expected sizes -var roughLinkBlockSize = 1 << 13 // 8KB -var roughLinkSize = 34 + 8 + 5 // sha256 multihash + size + no name + protobuf framing - -// DefaultLinksPerBlock governs how the importer decides how many links there -// will be per block. This calculation is based on expected distributions of: -// * the expected distribution of block sizes -// * the expected distribution of link sizes -// * desired access speed -// For now, we use: -// -// var roughLinkBlockSize = 1 << 13 // 8KB -// var roughLinkSize = 288 // sha256 + framing + name -// var DefaultLinksPerBlock = (roughLinkBlockSize / roughLinkSize) -// -// See calc_test.go -var DefaultLinksPerBlock = roughLinkBlockSize / roughLinkSize - -// ErrSizeLimitExceeded signals that a block is larger than BlockSizeLimit. -var ErrSizeLimitExceeded = fmt.Errorf("object size limit exceeded") - -// UnixfsNode is a struct created to aid in the generation -// of unixfs DAG trees -type UnixfsNode struct { - raw bool - rawnode *dag.RawNode - node *dag.ProtoNode - ufmt *ft.FSNode - posInfo *pi.PosInfo -} - -// NewUnixfsNodeFromDag reconstructs a Unixfs node from a given dag node -func NewUnixfsNodeFromDag(nd *dag.ProtoNode) (*UnixfsNode, error) { - mb, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return nil, err - } - - return &UnixfsNode{ - node: nd, - ufmt: mb, - }, nil -} - -// SetCidBuilder sets the CID Builder -func (n *UnixfsNode) SetCidBuilder(builder cid.Builder) { - n.node.SetCidBuilder(builder) -} - -// NumChildren returns the number of children referenced by this UnixfsNode. -func (n *UnixfsNode) NumChildren() int { - return n.ufmt.NumChildren() -} - -// GetChild gets the ith child of this node from the given DAGService. -func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds ipld.DAGService) (*UnixfsNode, error) { - nd, err := n.node.Links()[i].GetNode(ctx, ds) - if err != nil { - return nil, err - } - - pbn, ok := nd.(*dag.ProtoNode) - if !ok { - return nil, dag.ErrNotProtobuf - } - - return NewUnixfsNodeFromDag(pbn) -} - -// AddChild adds the given UnixfsNode as a child of the receiver. -// The passed in DagBuilderHelper is used to store the child node an -// pin it locally so it doesnt get lost. -func (n *UnixfsNode) AddChild(child *UnixfsNode, db *DagBuilderHelper) error { - n.ufmt.AddBlockSize(child.FileSize()) - - childnode, err := child.GetDagNode() - if err != nil { - return err - } - - // Add a link to this node without storing a reference to the memory - // This way, we avoid nodes building up and consuming all of our RAM - err = n.node.AddNodeLink("", childnode) - if err != nil { - return err - } - - _, err = db.AddUnixfsNode(child) - return err -} - -// RemoveChild deletes the child node at the given index. -func (n *UnixfsNode) RemoveChild(index int, dbh *DagBuilderHelper) { - n.ufmt.RemoveBlockSize(index) - n.node.SetLinks(append(n.node.Links()[:index], n.node.Links()[index+1:]...)) -} - -// SetData stores data in this node. -func (n *UnixfsNode) SetData(data []byte) { - n.ufmt.SetData(data) -} - -// FileSize returns the total file size of this tree (including children) -// In the case of raw nodes, it returns the length of the -// raw data. -func (n *UnixfsNode) FileSize() uint64 { - if n.raw { - return uint64(len(n.rawnode.RawData())) - } - return n.ufmt.FileSize() -} - -// SetPosInfo sets information about the offset of the data of this node in a -// filesystem file. -func (n *UnixfsNode) SetPosInfo(offset uint64, fullPath string, stat os.FileInfo) { - n.posInfo = &pi.PosInfo{ - Offset: offset, - FullPath: fullPath, - Stat: stat, - } -} - -// GetDagNode fills out the proper formatting for the unixfs node -// inside of a DAG node and returns the dag node. -func (n *UnixfsNode) GetDagNode() (ipld.Node, error) { - nd, err := n.getBaseDagNode() - if err != nil { - return nil, err - } - - if n.posInfo != nil { - if rn, ok := nd.(*dag.RawNode); ok { - return &pi.FilestoreNode{ - Node: rn, - PosInfo: n.posInfo, - }, nil - } - } - - return nd, nil -} - -func (n *UnixfsNode) getBaseDagNode() (ipld.Node, error) { - if n.raw { - return n.rawnode, nil - } - - data, err := n.ufmt.GetBytes() - if err != nil { - return nil, err - } - n.node.SetData(data) - return n.node, nil -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/importer.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/importer.go deleted file mode 100644 index 7797d73b42..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/importer.go +++ /dev/null @@ -1,34 +0,0 @@ -// Package importer implements utilities used to create IPFS DAGs from files -// and readers. -package importer - -import ( - bal "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/balanced" - h "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - chunker "gx/ipfs/QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR/go-ipfs-chunker" -) - -// BuildDagFromReader creates a DAG given a DAGService and a Splitter -// implementation (Splitters are io.Readers), using a Balanced layout. -func BuildDagFromReader(ds ipld.DAGService, spl chunker.Splitter) (ipld.Node, error) { - dbp := h.DagBuilderParams{ - Dagserv: ds, - Maxlinks: h.DefaultLinksPerBlock, - } - - return bal.Layout(dbp.New(spl)) -} - -// BuildTrickleDagFromReader creates a DAG given a DAGService and a Splitter -// implementation (Splitters are io.Readers), using a Trickle Layout. -func BuildTrickleDagFromReader(ds ipld.DAGService, spl chunker.Splitter) (ipld.Node, error) { - dbp := h.DagBuilderParams{ - Dagserv: ds, - Maxlinks: h.DefaultLinksPerBlock, - } - - return trickle.Layout(dbp.New(spl)) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle/trickledag.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle/trickledag.go deleted file mode 100644 index d850edc1a0..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/trickle/trickledag.go +++ /dev/null @@ -1,349 +0,0 @@ -// Package trickle allows to build trickle DAGs. -// In this type of DAG, non-leave nodes are first filled -// with data leaves, and then incorporate "layers" of subtrees -// as additional links. -// -// Each layer is a trickle sub-tree and is limited by an increasing -// maximum depth. Thus, the nodes first layer -// can only hold leaves (depth 1) but subsequent layers can grow deeper. -// By default, this module places 4 nodes per layer (that is, 4 subtrees -// of the same maximum depth before increasing it). -// -// Trickle DAGs are very good for sequentially reading data, as the -// first data leaves are directly reachable from the root and those -// coming next are always nearby. They are -// suited for things like streaming applications. -package trickle - -import ( - "context" - "errors" - "fmt" - - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - h "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/importer/helpers" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" -) - -// layerRepeat specifies how many times to append a child tree of a -// given depth. Higher values increase the width of a given node, which -// improves seek speeds. -const layerRepeat = 4 - -// Layout builds a new DAG with the trickle format using the provided -// DagBuilderHelper. See the module's description for a more detailed -// explanation. -func Layout(db *h.DagBuilderHelper) (ipld.Node, error) { - root := db.NewUnixfsNode() - if err := fillTrickleRec(db, root, -1); err != nil { - return nil, err - } - - return db.AddUnixfsNode(root) -} - -// fillTrickleRec creates a trickle (sub-)tree with an optional maximum specified depth -// in the case maxDepth is greater than zero, or with unlimited depth otherwise -// (where the DAG builder will signal the end of data to end the function). -func fillTrickleRec(db *h.DagBuilderHelper, node *h.UnixfsNode, maxDepth int) error { - // Always do this, even in the base case - if err := db.FillNodeLayer(node); err != nil { - return err - } - - for depth := 1; ; depth++ { - // Apply depth limit only if the parameter is set (> 0). - if maxDepth > 0 && depth == maxDepth { - return nil - } - for layer := 0; layer < layerRepeat; layer++ { - if db.Done() { - return nil - } - - nextChild := db.NewUnixfsNode() - if err := fillTrickleRec(db, nextChild, depth); err != nil { - return err - } - - if err := node.AddChild(nextChild, db); err != nil { - return err - } - } - } -} - -// Append appends the data in `db` to the dag, using the Trickledag format -func Append(ctx context.Context, basen ipld.Node, db *h.DagBuilderHelper) (out ipld.Node, errOut error) { - base, ok := basen.(*dag.ProtoNode) - if !ok { - return nil, dag.ErrNotProtobuf - } - - // Convert to unixfs node for working with easily - ufsn, err := h.NewUnixfsNodeFromDag(base) - if err != nil { - return nil, err - } - - // Get depth of this 'tree' - n, layerProgress := trickleDepthInfo(ufsn, db.Maxlinks()) - if n == 0 { - // If direct blocks not filled... - if err := db.FillNodeLayer(ufsn); err != nil { - return nil, err - } - - if db.Done() { - return ufsn.GetDagNode() - } - - // If continuing, our depth has increased by one - n++ - } - - // Last child in this node may not be a full tree, lets file it up - if err := appendFillLastChild(ctx, ufsn, n-1, layerProgress, db); err != nil { - return nil, err - } - - // after appendFillLastChild, our depth is now increased by one - if !db.Done() { - n++ - } - - // Now, continue filling out tree like normal - for i := n; !db.Done(); i++ { - for j := 0; j < layerRepeat && !db.Done(); j++ { - next := db.NewUnixfsNode() - err := fillTrickleRec(db, next, i) - if err != nil { - return nil, err - } - - err = ufsn.AddChild(next, db) - if err != nil { - return nil, err - } - } - } - - return ufsn.GetDagNode() -} - -// appendFillLastChild will take in an incomplete trickledag node (uncomplete meaning, not full) and -// fill it out to the specified depth with blocks from the given DagBuilderHelper -func appendFillLastChild(ctx context.Context, ufsn *h.UnixfsNode, depth int, layerFill int, db *h.DagBuilderHelper) error { - if ufsn.NumChildren() <= db.Maxlinks() { - return nil - } - // Recursive step, grab last child - last := ufsn.NumChildren() - 1 - lastChild, err := ufsn.GetChild(ctx, last, db.GetDagServ()) - if err != nil { - return err - } - - // Fill out last child (may not be full tree) - nchild, err := appendRec(ctx, lastChild, db, depth-1) - if err != nil { - return err - } - - // Update changed child in parent node - ufsn.RemoveChild(last, db) - err = ufsn.AddChild(nchild, db) - if err != nil { - return err - } - - // Partially filled depth layer - if layerFill != 0 { - for ; layerFill < layerRepeat && !db.Done(); layerFill++ { - next := db.NewUnixfsNode() - err := fillTrickleRec(db, next, depth) - if err != nil { - return err - } - - err = ufsn.AddChild(next, db) - if err != nil { - return err - } - } - } - - return nil -} - -// recursive call for Append -func appendRec(ctx context.Context, ufsn *h.UnixfsNode, db *h.DagBuilderHelper, depth int) (*h.UnixfsNode, error) { - if depth == 0 || db.Done() { - return ufsn, nil - } - - // Get depth of this 'tree' - n, layerProgress := trickleDepthInfo(ufsn, db.Maxlinks()) - if n == 0 { - // If direct blocks not filled... - if err := db.FillNodeLayer(ufsn); err != nil { - return nil, err - } - n++ - } - - // If at correct depth, no need to continue - if n == depth { - return ufsn, nil - } - - if err := appendFillLastChild(ctx, ufsn, n, layerProgress, db); err != nil { - return nil, err - } - - // after appendFillLastChild, our depth is now increased by one - if !db.Done() { - n++ - } - - // Now, continue filling out tree like normal - for i := n; i < depth && !db.Done(); i++ { - for j := 0; j < layerRepeat && !db.Done(); j++ { - next := db.NewUnixfsNode() - if err := fillTrickleRec(db, next, i); err != nil { - return nil, err - } - - if err := ufsn.AddChild(next, db); err != nil { - return nil, err - } - } - } - - return ufsn, nil -} - -func trickleDepthInfo(node *h.UnixfsNode, maxlinks int) (int, int) { - n := node.NumChildren() - if n < maxlinks { - return 0, 0 - } - - return ((n - maxlinks) / layerRepeat) + 1, (n - maxlinks) % layerRepeat -} - -// VerifyParams is used by VerifyTrickleDagStructure -type VerifyParams struct { - Getter ipld.NodeGetter - Direct int - LayerRepeat int - Prefix *cid.Prefix - RawLeaves bool -} - -// VerifyTrickleDagStructure checks that the given dag matches exactly the trickle dag datastructure -// layout -func VerifyTrickleDagStructure(nd ipld.Node, p VerifyParams) error { - return verifyTDagRec(nd, -1, p) -} - -// Recursive call for verifying the structure of a trickledag -func verifyTDagRec(n ipld.Node, depth int, p VerifyParams) error { - codec := cid.DagProtobuf - if depth == 0 { - if len(n.Links()) > 0 { - return errors.New("expected direct block") - } - // zero depth dag is raw data block - switch nd := n.(type) { - case *dag.ProtoNode: - fsn, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return err - } - - if fsn.Type() != ft.TRaw { - return errors.New("expected raw block") - } - - if p.RawLeaves { - return errors.New("expected raw leaf, got a protobuf node") - } - case *dag.RawNode: - if !p.RawLeaves { - return errors.New("expected protobuf node as leaf") - } - codec = cid.Raw - default: - return errors.New("expected ProtoNode or RawNode") - } - } - - // verify prefix - if p.Prefix != nil { - prefix := n.Cid().Prefix() - expect := *p.Prefix // make a copy - expect.Codec = uint64(codec) - if codec == cid.Raw && expect.Version == 0 { - expect.Version = 1 - } - if expect.MhLength == -1 { - expect.MhLength = prefix.MhLength - } - if prefix != expect { - return fmt.Errorf("unexpected cid prefix: expected: %v; got %v", expect, prefix) - } - } - - if depth == 0 { - return nil - } - - nd, ok := n.(*dag.ProtoNode) - if !ok { - return errors.New("expected ProtoNode") - } - - // Verify this is a branch node - fsn, err := ft.FSNodeFromBytes(nd.Data()) - if err != nil { - return err - } - - if fsn.Type() != ft.TFile { - return fmt.Errorf("expected file as branch node, got: %s", fsn.Type()) - } - - if len(fsn.Data()) > 0 { - return errors.New("branch node should not have data") - } - - for i := 0; i < len(nd.Links()); i++ { - child, err := nd.Links()[i].GetNode(context.TODO(), p.Getter) - if err != nil { - return err - } - - if i < p.Direct { - // Direct blocks - err := verifyTDagRec(child, 0, p) - if err != nil { - return err - } - } else { - // Recursive trickle dags - rdepth := ((i - p.Direct) / p.LayerRepeat) + 1 - if rdepth >= depth && depth > 0 { - return errors.New("child dag was too deep") - } - err := verifyTDagRec(child, rdepth, p) - if err != nil { - return err - } - } - } - return nil -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/bufdagreader.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/bufdagreader.go deleted file mode 100644 index 48efe98ad2..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/bufdagreader.go +++ /dev/null @@ -1,39 +0,0 @@ -package io - -import ( - "bytes" - "context" -) - -// BufDagReader implements a DagReader that reads from a byte slice -// using a bytes.Reader. It is used for RawNodes. -type BufDagReader struct { - *bytes.Reader -} - -// NewBufDagReader returns a DAG reader for the given byte slice. -// BufDagReader is used to read RawNodes. -func NewBufDagReader(b []byte) *BufDagReader { - return &BufDagReader{bytes.NewReader(b)} -} - -var _ DagReader = (*BufDagReader)(nil) - -// Close is a nop. -func (*BufDagReader) Close() error { - return nil -} - -// CtxReadFull reads the slice onto b. -func (rd *BufDagReader) CtxReadFull(ctx context.Context, b []byte) (int, error) { - return rd.Read(b) -} - -// Size returns the size of the buffer. -func (rd *BufDagReader) Size() uint64 { - s := rd.Reader.Size() - if s < 0 { - panic("size smaller than 0 (impossible!!)") - } - return uint64(s) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/dagreader.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/dagreader.go deleted file mode 100644 index 4069af219f..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/dagreader.go +++ /dev/null @@ -1,77 +0,0 @@ -package io - -import ( - "context" - "errors" - "io" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" -) - -// Common errors -var ( - ErrIsDir = errors.New("this dag node is a directory") - ErrCantReadSymlinks = errors.New("cannot currently read symlinks") - ErrUnkownNodeType = errors.New("unknown node type") -) - -// A DagReader provides read-only read and seek acess to a unixfs file. -// Different implementations of readers are used for the different -// types of unixfs/protobuf-encoded nodes. -type DagReader interface { - ReadSeekCloser - Size() uint64 - CtxReadFull(context.Context, []byte) (int, error) -} - -// A ReadSeekCloser implements interfaces to read, copy, seek and close. -type ReadSeekCloser interface { - io.Reader - io.Seeker - io.Closer - io.WriterTo -} - -// NewDagReader creates a new reader object that reads the data represented by -// the given node, using the passed in DAGService for data retrieval -func NewDagReader(ctx context.Context, n ipld.Node, serv ipld.NodeGetter) (DagReader, error) { - switch n := n.(type) { - case *mdag.RawNode: - return NewBufDagReader(n.RawData()), nil - case *mdag.ProtoNode: - fsNode, err := ft.FSNodeFromBytes(n.Data()) - if err != nil { - return nil, err - } - - switch fsNode.Type() { - case ft.TDirectory, ft.THAMTShard: - // Dont allow reading directories - return nil, ErrIsDir - case ft.TFile, ft.TRaw: - return NewPBFileReader(ctx, n, fsNode, serv), nil - case ft.TMetadata: - if len(n.Links()) == 0 { - return nil, errors.New("incorrectly formatted metadata object") - } - child, err := n.Links()[0].GetNode(ctx, serv) - if err != nil { - return nil, err - } - - childpb, ok := child.(*mdag.ProtoNode) - if !ok { - return nil, mdag.ErrNotProtobuf - } - return NewDagReader(ctx, childpb, serv) - case ft.TSymlink: - return nil, ErrCantReadSymlinks - default: - return nil, ft.ErrUnrecognizedType - } - default: - return nil, ErrUnkownNodeType - } -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/pbdagreader.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/pbdagreader.go deleted file mode 100644 index 7a42b269d8..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/pbdagreader.go +++ /dev/null @@ -1,326 +0,0 @@ -package io - -import ( - "context" - "errors" - "fmt" - "io" - - cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" - mdag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" -) - -// PBDagReader provides a way to easily read the data contained in a dag. -type PBDagReader struct { - serv ipld.NodeGetter - - // UnixFS file (it should be of type `Data_File` or `Data_Raw` only). - file *ft.FSNode - - // the current data buffer to be read from - // will either be a bytes.Reader or a child DagReader - buf ReadSeekCloser - - // NodePromises for each of 'nodes' child links - promises []*ipld.NodePromise - - // the cid of each child of the current node - links []cid.Cid - - // the index of the child link currently being read from - linkPosition int - - // current offset for the read head within the 'file' - offset int64 - - // Our context - ctx context.Context - - // context cancel for children - cancel func() -} - -var _ DagReader = (*PBDagReader)(nil) - -// NewPBFileReader constructs a new PBFileReader. -func NewPBFileReader(ctx context.Context, n *mdag.ProtoNode, file *ft.FSNode, serv ipld.NodeGetter) *PBDagReader { - fctx, cancel := context.WithCancel(ctx) - curLinks := getLinkCids(n) - return &PBDagReader{ - serv: serv, - buf: NewBufDagReader(file.Data()), - promises: make([]*ipld.NodePromise, len(curLinks)), - links: curLinks, - ctx: fctx, - cancel: cancel, - file: file, - } -} - -const preloadSize = 10 - -func (dr *PBDagReader) preload(ctx context.Context, beg int) { - end := beg + preloadSize - if end >= len(dr.links) { - end = len(dr.links) - } - - copy(dr.promises[beg:], ipld.GetNodes(ctx, dr.serv, dr.links[beg:end])) -} - -// precalcNextBuf follows the next link in line and loads it from the -// DAGService, setting the next buffer to read from -func (dr *PBDagReader) precalcNextBuf(ctx context.Context) error { - if dr.buf != nil { - dr.buf.Close() // Just to make sure - dr.buf = nil - } - - if dr.linkPosition >= len(dr.promises) { - return io.EOF - } - - // If we drop to <= preloadSize/2 preloading nodes, preload the next 10. - for i := dr.linkPosition; i < dr.linkPosition+preloadSize/2 && i < len(dr.promises); i++ { - // TODO: check if canceled. - if dr.promises[i] == nil { - dr.preload(ctx, i) - break - } - } - - nxt, err := dr.promises[dr.linkPosition].Get(ctx) - dr.promises[dr.linkPosition] = nil - switch err { - case nil: - case context.DeadlineExceeded, context.Canceled: - err = ctx.Err() - if err != nil { - return ctx.Err() - } - // In this case, the context used to *preload* the node has been canceled. - // We need to retry the load with our context and we might as - // well preload some extra nodes while we're at it. - // - // Note: When using `Read`, this code will never execute as - // `Read` will use the global context. It only runs if the user - // explicitly reads with a custom context (e.g., by calling - // `CtxReadFull`). - dr.preload(ctx, dr.linkPosition) - nxt, err = dr.promises[dr.linkPosition].Get(ctx) - dr.promises[dr.linkPosition] = nil - if err != nil { - return err - } - default: - return err - } - - dr.linkPosition++ - - return dr.loadBufNode(nxt) -} - -func (dr *PBDagReader) loadBufNode(node ipld.Node) error { - switch node := node.(type) { - case *mdag.ProtoNode: - fsNode, err := ft.FSNodeFromBytes(node.Data()) - if err != nil { - return fmt.Errorf("incorrectly formatted protobuf: %s", err) - } - - switch fsNode.Type() { - case ft.TFile: - dr.buf = NewPBFileReader(dr.ctx, node, fsNode, dr.serv) - return nil - case ft.TRaw: - dr.buf = NewBufDagReader(fsNode.Data()) - return nil - default: - return fmt.Errorf("found %s node in unexpected place", fsNode.Type().String()) - } - case *mdag.RawNode: - dr.buf = NewBufDagReader(node.RawData()) - return nil - default: - return ErrUnkownNodeType - } -} - -func getLinkCids(n ipld.Node) []cid.Cid { - links := n.Links() - out := make([]cid.Cid, 0, len(links)) - for _, l := range links { - out = append(out, l.Cid) - } - return out -} - -// Size return the total length of the data from the DAG structured file. -func (dr *PBDagReader) Size() uint64 { - return dr.file.FileSize() -} - -// Read reads data from the DAG structured file -func (dr *PBDagReader) Read(b []byte) (int, error) { - return dr.CtxReadFull(dr.ctx, b) -} - -// CtxReadFull reads data from the DAG structured file -func (dr *PBDagReader) CtxReadFull(ctx context.Context, b []byte) (int, error) { - if dr.buf == nil { - if err := dr.precalcNextBuf(ctx); err != nil { - return 0, err - } - } - - // If no cached buffer, load one - total := 0 - for { - // Attempt to fill bytes from cached buffer - n, err := io.ReadFull(dr.buf, b[total:]) - total += n - dr.offset += int64(n) - switch err { - // io.EOF will happen is dr.buf had noting more to read (n == 0) - case io.EOF, io.ErrUnexpectedEOF: - // do nothing - case nil: - return total, nil - default: - return total, err - } - - // if we are not done with the output buffer load next block - err = dr.precalcNextBuf(ctx) - if err != nil { - return total, err - } - } -} - -// WriteTo writes to the given writer. -func (dr *PBDagReader) WriteTo(w io.Writer) (int64, error) { - if dr.buf == nil { - if err := dr.precalcNextBuf(dr.ctx); err != nil { - return 0, err - } - } - - // If no cached buffer, load one - total := int64(0) - for { - // Attempt to write bytes from cached buffer - n, err := dr.buf.WriteTo(w) - total += n - dr.offset += n - if err != nil { - if err != io.EOF { - return total, err - } - } - - // Otherwise, load up the next block - err = dr.precalcNextBuf(dr.ctx) - if err != nil { - if err == io.EOF { - return total, nil - } - return total, err - } - } -} - -// Close closes the reader. -func (dr *PBDagReader) Close() error { - dr.cancel() - return nil -} - -// Seek implements io.Seeker, and will seek to a given offset in the file -// interface matches standard unix seek -// TODO: check if we can do relative seeks, to reduce the amount of dagreader -// recreations that need to happen. -func (dr *PBDagReader) Seek(offset int64, whence int) (int64, error) { - switch whence { - case io.SeekStart: - if offset < 0 { - return -1, errors.New("invalid offset") - } - if offset == dr.offset { - return offset, nil - } - - // left represents the number of bytes remaining to seek to (from beginning) - left := offset - if int64(len(dr.file.Data())) >= offset { - // Close current buf to close potential child dagreader - if dr.buf != nil { - dr.buf.Close() - } - dr.buf = NewBufDagReader(dr.file.Data()[offset:]) - - // start reading links from the beginning - dr.linkPosition = 0 - dr.offset = offset - return offset, nil - } - - // skip past root block data - left -= int64(len(dr.file.Data())) - - // iterate through links and find where we need to be - for i := 0; i < dr.file.NumChildren(); i++ { - if dr.file.BlockSize(i) > uint64(left) { - dr.linkPosition = i - break - } else { - left -= int64(dr.file.BlockSize(i)) - } - } - - // start sub-block request - err := dr.precalcNextBuf(dr.ctx) - if err != nil { - return 0, err - } - - // set proper offset within child readseeker - n, err := dr.buf.Seek(left, io.SeekStart) - if err != nil { - return -1, err - } - - // sanity - left -= n - if left != 0 { - return -1, errors.New("failed to seek properly") - } - dr.offset = offset - return offset, nil - case io.SeekCurrent: - // TODO: be smarter here - if offset == 0 { - return dr.offset, nil - } - - noffset := dr.offset + offset - return dr.Seek(noffset, io.SeekStart) - case io.SeekEnd: - noffset := int64(dr.file.FileSize()) - offset - n, err := dr.Seek(noffset, io.SeekStart) - - // Return negative number if we can't figure out the file size. Using io.EOF - // for this seems to be good(-enough) solution as it's only returned by - // precalcNextBuf when we step out of file range. - // This is needed for gateway to function properly - if err == io.EOF && dr.file.Type() == ft.TFile { - return -1, nil - } - return n, err - default: - return 0, errors.New("invalid whence") - } -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/resolve.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/resolve.go deleted file mode 100644 index ca13f4517d..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/io/resolve.go +++ /dev/null @@ -1,41 +0,0 @@ -package io - -import ( - "context" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - ft "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs" - hamt "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/hamt" - - ipld "gx/ipfs/QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o/go-ipld-format" -) - -// ResolveUnixfsOnce resolves a single hop of a path through a graph in a -// unixfs context. This includes handling traversing sharded directories. -func ResolveUnixfsOnce(ctx context.Context, ds ipld.NodeGetter, nd ipld.Node, names []string) (*ipld.Link, []string, error) { - pn, ok := nd.(*dag.ProtoNode) - if ok { - fsn, err := ft.FSNodeFromBytes(pn.Data()) - if err != nil { - // Not a unixfs node, use standard object traversal code - return nd.ResolveLink(names) - } - - if fsn.Type() == ft.THAMTShard { - rods := dag.NewReadOnlyDagService(ds) - s, err := hamt.NewHamtFromDag(rods, nd) - if err != nil { - return nil, nil, err - } - - out, err := s.Find(ctx, names[0]) - if err != nil { - return nil, nil, err - } - - return out, names[1:], nil - } - } - - return nd.ResolveLink(names) -} diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/package.json b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/package.json deleted file mode 100644 index 870d3e5167..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "author": "why", - "bugs": { - "url": "https://github.com/ipfs/go-unixfs" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-unixfs" - }, - "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmfJHywXQu98UeZtGJBQrPAR6AtmDjjbe3qjTo9piXHPnx", - "name": "murmur3", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A", - "name": "go-ipfs-util", - "version": "1.2.8" - }, - { - "author": "multiformats", - "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", - "name": "go-multihash", - "version": "1.0.8" - }, - { - "author": "why", - "hash": "QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc", - "name": "go-merkledag", - "version": "1.1.15" - }, - { - "author": "hector", - "hash": "QmQyUyYcpKG1u53V7N25qRTGw5XwaAxTMKXbduqHotQztg", - "name": "go-ipfs-posinfo", - "version": "0.1.2" - }, - { - "author": "Stebalien", - "hash": "QmTbBs3Y3u5F69XNJzdnnc6SP5GKgcXxCDzx6w8m6piVRT", - "name": "go-bitfield", - "version": "0.1.1" - }, - { - "author": "hsanjuan", - "hash": "QmTUTG9Jg9ZRA1EzTPGTDvnwfcfKhDMnqANnP9fe4rSjMR", - "name": "go-ipfs-chunker", - "version": "0.1.3" - }, - { - "author": "whyrusleeping", - "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", - "name": "go-cid", - "version": "0.9.0" - }, - { - "author": "whyrusleeping", - "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", - "name": "gogo-protobuf", - "version": "0.0.0" - }, - { - "author": "whyrusleeping", - "hash": "QmR7TcHkR9nxkUorfi8XMTAMLUK7GiP64TWWBzY3aacc1o", - "name": "go-ipld-format", - "version": "0.7.1" - }, - { - "author": "magik6k", - "hash": "QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC", - "name": "go-ipfs-files", - "version": "1.0.1" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "", - "name": "go-unixfs", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "1.1.16" -} - diff --git a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/unixfs.go b/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/unixfs.go deleted file mode 100644 index 37a3b8dbe7..0000000000 --- a/vendor/gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/unixfs.go +++ /dev/null @@ -1,348 +0,0 @@ -// Package unixfs implements a data format for files in the IPFS filesystem It -// is not the only format in ipfs, but it is the one that the filesystem -// assumes -package unixfs - -import ( - "errors" - - proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - - dag "gx/ipfs/QmSei8kFMfqdJq7Q68d2LMnHbTWKKg2daA29ezUYFAUNgc/go-merkledag" - pb "gx/ipfs/QmfB3oNXGGq9S4B2a9YeCajoATms3Zw2VvDm8fK7VeLSV8/go-unixfs/pb" -) - -// Shorthands for protobuffer types -const ( - TRaw = pb.Data_Raw - TFile = pb.Data_File - TDirectory = pb.Data_Directory - TMetadata = pb.Data_Metadata - TSymlink = pb.Data_Symlink - THAMTShard = pb.Data_HAMTShard -) - -// Common errors -var ( - ErrMalformedFileFormat = errors.New("malformed data in file format") - ErrUnrecognizedType = errors.New("unrecognized node type") -) - -// FromBytes unmarshals a byte slice as protobuf Data. -// Deprecated: Use `FSNodeFromBytes` instead to avoid direct manipulation of `pb.Data`. -func FromBytes(data []byte) (*pb.Data, error) { - pbdata := new(pb.Data) - err := proto.Unmarshal(data, pbdata) - if err != nil { - return nil, err - } - return pbdata, nil -} - -// FilePBData creates a protobuf File with the given -// byte slice and returns the marshaled protobuf bytes representing it. -func FilePBData(data []byte, totalsize uint64) []byte { - pbfile := new(pb.Data) - typ := pb.Data_File - pbfile.Type = &typ - pbfile.Data = data - pbfile.Filesize = proto.Uint64(totalsize) - - data, err := proto.Marshal(pbfile) - if err != nil { - // This really shouldnt happen, i promise - // The only failure case for marshal is if required fields - // are not filled out, and they all are. If the proto object - // gets changed and nobody updates this function, the code - // should panic due to programmer error - panic(err) - } - return data -} - -//FolderPBData returns Bytes that represent a Directory. -func FolderPBData() []byte { - pbfile := new(pb.Data) - typ := pb.Data_Directory - pbfile.Type = &typ - - data, err := proto.Marshal(pbfile) - if err != nil { - //this really shouldnt happen, i promise - panic(err) - } - return data -} - -//WrapData marshals raw bytes into a `Data_Raw` type protobuf message. -func WrapData(b []byte) []byte { - pbdata := new(pb.Data) - typ := pb.Data_Raw - pbdata.Data = b - pbdata.Type = &typ - pbdata.Filesize = proto.Uint64(uint64(len(b))) - - out, err := proto.Marshal(pbdata) - if err != nil { - // This shouldnt happen. seriously. - panic(err) - } - - return out -} - -//SymlinkData returns a `Data_Symlink` protobuf message for the path you specify. -func SymlinkData(path string) ([]byte, error) { - pbdata := new(pb.Data) - typ := pb.Data_Symlink - pbdata.Data = []byte(path) - pbdata.Type = &typ - - out, err := proto.Marshal(pbdata) - if err != nil { - return nil, err - } - - return out, nil -} - -// HAMTShardData return a `Data_HAMTShard` protobuf message -func HAMTShardData(data []byte, fanout uint64, hashType uint64) ([]byte, error) { - pbdata := new(pb.Data) - typ := pb.Data_HAMTShard - pbdata.Type = &typ - pbdata.HashType = proto.Uint64(hashType) - pbdata.Data = data - pbdata.Fanout = proto.Uint64(fanout) - - out, err := proto.Marshal(pbdata) - if err != nil { - return nil, err - } - - return out, nil -} - -// UnwrapData unmarshals a protobuf messages and returns the contents. -func UnwrapData(data []byte) ([]byte, error) { - pbdata := new(pb.Data) - err := proto.Unmarshal(data, pbdata) - if err != nil { - return nil, err - } - return pbdata.GetData(), nil -} - -// DataSize returns the size of the contents in protobuf wrapped slice. -// For raw data it simply provides the length of it. For Data_Files, it -// will return the associated filesize. Note that Data_Directories will -// return an error. -func DataSize(data []byte) (uint64, error) { - pbdata := new(pb.Data) - err := proto.Unmarshal(data, pbdata) - if err != nil { - return 0, err - } - - switch pbdata.GetType() { - case pb.Data_Directory: - return 0, errors.New("can't get data size of directory") - case pb.Data_File: - return pbdata.GetFilesize(), nil - case pb.Data_Raw: - return uint64(len(pbdata.GetData())), nil - default: - return 0, errors.New("unrecognized node data type") - } -} - -// An FSNode represents a filesystem object using the UnixFS specification. -// -// The `NewFSNode` constructor should be used instead of just calling `new(FSNode)` -// to guarantee that the required (`Type` and `Filesize`) fields in the `format` -// structure are initialized before marshaling (in `GetBytes()`). -type FSNode struct { - - // UnixFS format defined as a protocol buffers message. - format pb.Data -} - -// FSNodeFromBytes unmarshal a protobuf message onto an FSNode. -func FSNodeFromBytes(b []byte) (*FSNode, error) { - n := new(FSNode) - err := proto.Unmarshal(b, &n.format) - if err != nil { - return nil, err - } - - return n, nil -} - -// NewFSNode creates a new FSNode structure with the given `dataType`. -// -// It initializes the (required) `Type` field (that doesn't have a `Set()` -// accessor so it must be specified at creation), otherwise the `Marshal()` -// method in `GetBytes()` would fail (`required field "Type" not set`). -// -// It also initializes the `Filesize` pointer field to ensure its value -// is never nil before marshaling, this is not a required field but it is -// done to be backwards compatible with previous `go-ipfs` versions hash. -// (If it wasn't initialized there could be cases where `Filesize` could -// have been left at nil, when the `FSNode` was created but no data or -// child nodes were set to adjust it, as is the case in `NewLeaf()`.) -func NewFSNode(dataType pb.Data_DataType) *FSNode { - n := new(FSNode) - n.format.Type = &dataType - - // Initialize by `Filesize` by updating it with a dummy (zero) value. - n.UpdateFilesize(0) - - return n -} - -// HashType gets hash type of format -func (n *FSNode) HashType() uint64 { - return n.format.GetHashType() -} - -// Fanout gets fanout of format -func (n *FSNode) Fanout() uint64 { - return n.format.GetFanout() -} - -// AddBlockSize adds the size of the next child block of this node -func (n *FSNode) AddBlockSize(s uint64) { - n.UpdateFilesize(int64(s)) - n.format.Blocksizes = append(n.format.Blocksizes, s) -} - -// RemoveBlockSize removes the given child block's size. -func (n *FSNode) RemoveBlockSize(i int) { - n.UpdateFilesize(-int64(n.format.Blocksizes[i])) - n.format.Blocksizes = append(n.format.Blocksizes[:i], n.format.Blocksizes[i+1:]...) -} - -// BlockSize returns the block size indexed by `i`. -// TODO: Evaluate if this function should be bounds checking. -func (n *FSNode) BlockSize(i int) uint64 { - return n.format.Blocksizes[i] -} - -// BlockSizes gets blocksizes of format -func (n *FSNode) BlockSizes() []uint64 { - return n.format.GetBlocksizes() -} - -// RemoveAllBlockSizes removes all the child block sizes of this node. -func (n *FSNode) RemoveAllBlockSizes() { - n.format.Blocksizes = []uint64{} - n.format.Filesize = proto.Uint64(uint64(len(n.Data()))) -} - -// GetBytes marshals this node as a protobuf message. -func (n *FSNode) GetBytes() ([]byte, error) { - return proto.Marshal(&n.format) -} - -// FileSize returns the total size of this tree. That is, the size of -// the data in this node plus the size of all its children. -func (n *FSNode) FileSize() uint64 { - return n.format.GetFilesize() -} - -// NumChildren returns the number of child blocks of this node -func (n *FSNode) NumChildren() int { - return len(n.format.Blocksizes) -} - -// Data retrieves the `Data` field from the internal `format`. -func (n *FSNode) Data() []byte { - return n.format.GetData() -} - -// SetData sets the `Data` field from the internal `format` -// updating its `Filesize`. -func (n *FSNode) SetData(newData []byte) { - n.UpdateFilesize(int64(len(newData) - len(n.Data()))) - n.format.Data = newData -} - -// UpdateFilesize updates the `Filesize` field from the internal `format` -// by a signed difference (`filesizeDiff`). -// TODO: Add assert to check for `Filesize` > 0? -func (n *FSNode) UpdateFilesize(filesizeDiff int64) { - n.format.Filesize = proto.Uint64(uint64( - int64(n.format.GetFilesize()) + filesizeDiff)) -} - -// Type retrieves the `Type` field from the internal `format`. -func (n *FSNode) Type() pb.Data_DataType { - return n.format.GetType() -} - -// IsDir checks whether the node represents a directory -func (n *FSNode) IsDir() bool { - switch n.Type() { - case pb.Data_Directory, pb.Data_HAMTShard: - return true - default: - return false - } -} - -// Metadata is used to store additional FSNode information. -type Metadata struct { - MimeType string - Size uint64 -} - -// MetadataFromBytes Unmarshals a protobuf Data message into Metadata. -// The provided slice should have been encoded with BytesForMetadata(). -func MetadataFromBytes(b []byte) (*Metadata, error) { - pbd := new(pb.Data) - err := proto.Unmarshal(b, pbd) - if err != nil { - return nil, err - } - if pbd.GetType() != pb.Data_Metadata { - return nil, errors.New("incorrect node type") - } - - pbm := new(pb.Metadata) - err = proto.Unmarshal(pbd.Data, pbm) - if err != nil { - return nil, err - } - md := new(Metadata) - md.MimeType = pbm.GetMimeType() - return md, nil -} - -// Bytes marshals Metadata as a protobuf message of Metadata type. -func (m *Metadata) Bytes() ([]byte, error) { - pbm := new(pb.Metadata) - pbm.MimeType = &m.MimeType - return proto.Marshal(pbm) -} - -// BytesForMetadata wraps the given Metadata as a profobuf message of Data type, -// setting the DataType to Metadata. The wrapped bytes are itself the -// result of calling m.Bytes(). -func BytesForMetadata(m *Metadata) ([]byte, error) { - pbd := new(pb.Data) - pbd.Filesize = proto.Uint64(m.Size) - typ := pb.Data_Metadata - pbd.Type = &typ - mdd, err := m.Bytes() - if err != nil { - return nil, err - } - - pbd.Data = mdd - return proto.Marshal(pbd) -} - -// EmptyDirNode creates an empty folder Protonode. -func EmptyDirNode() *dag.ProtoNode { - return dag.NodeWithData(FolderPBData()) -}